Repository: jesseduffield/lazydocker Branch: master Commit: 2ebe3848d677 Files: 1473 Total size: 14.9 MB Directory structure: gitextract_rgwwibmx/ ├── .circleci/ │ ├── config.yml │ ├── install_snapcraft.sh │ └── update_docs.sh ├── .claude/ │ └── settings.json ├── .devcontainer/ │ ├── Dockerfile │ └── devcontainer.json ├── .dockerignore ├── .github/ │ ├── FUNDING.yml │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report.md │ │ ├── discussion.md │ │ └── feature_request.md │ └── workflows/ │ ├── cd.yml │ ├── ci.yml │ └── sponsors.yml ├── .gitignore ├── .golangci.yml ├── .goreleaser.yml ├── CODE-OF-CONDUCT.md ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── README.md ├── config/ │ └── config.yml ├── coverage.txt ├── docker-compose.yml ├── docs/ │ ├── Config.md │ └── keybindings/ │ ├── Keybindings_de.md │ ├── Keybindings_en.md │ ├── Keybindings_es.md │ ├── Keybindings_fr.md │ ├── Keybindings_nl.md │ ├── Keybindings_pl.md │ ├── Keybindings_pt.md │ ├── Keybindings_tr.md │ └── Keybindings_zh.md ├── go.mod ├── go.sum ├── hooks/ │ └── build ├── main.go ├── pkg/ │ ├── app/ │ │ └── app.go │ ├── cheatsheet/ │ │ ├── generate.go │ │ └── validate.go │ ├── commands/ │ │ ├── container.go │ │ ├── container_stats.go │ │ ├── container_stats_test.go │ │ ├── docker.go │ │ ├── docker_host_unix.go │ │ ├── docker_host_windows.go │ │ ├── docker_test.go │ │ ├── dummies.go │ │ ├── errors.go │ │ ├── image.go │ │ ├── network.go │ │ ├── os.go │ │ ├── os_default_platform.go │ │ ├── os_test.go │ │ ├── os_windows.go │ │ ├── project.go │ │ ├── service.go │ │ ├── ssh/ │ │ │ ├── ssh.go │ │ │ └── ssh_test.go │ │ └── volume.go │ ├── config/ │ │ ├── app_config.go │ │ ├── app_config_test.go │ │ ├── config_default_platform.go │ │ ├── config_linux.go │ │ └── config_windows.go │ ├── gui/ │ │ ├── app_status_manager.go │ │ ├── arrangement.go │ │ ├── confirmation_panel.go │ │ ├── container_logs.go │ │ ├── containers_panel.go │ │ ├── custom_commands.go │ │ ├── filtering.go │ │ ├── focus.go │ │ ├── gocui.go │ │ ├── gui.go │ │ ├── images_panel.go │ │ ├── keybindings.go │ │ ├── layout.go │ │ ├── main_panel.go │ │ ├── menu_panel.go │ │ ├── networks_panel.go │ │ ├── options_menu_panel.go │ │ ├── panels/ │ │ │ ├── context_state.go │ │ │ ├── filtered_list.go │ │ │ ├── filtered_list_test.go │ │ │ ├── list_panel.go │ │ │ └── side_list_panel.go │ │ ├── panels.go │ │ ├── presentation/ │ │ │ ├── container_stats.go │ │ │ ├── containers.go │ │ │ ├── images.go │ │ │ ├── menu_items.go │ │ │ ├── networks.go │ │ │ ├── projects.go │ │ │ ├── services.go │ │ │ └── volumes.go │ │ ├── project_panel.go │ │ ├── services_panel.go │ │ ├── sort_container_test.go │ │ ├── subprocess.go │ │ ├── tasks_adapter.go │ │ ├── theme.go │ │ ├── types/ │ │ │ └── types.go │ │ ├── view_helpers.go │ │ ├── views.go │ │ ├── volumes_panel.go │ │ └── window.go │ ├── i18n/ │ │ ├── chinese.go │ │ ├── dutch.go │ │ ├── english.go │ │ ├── french.go │ │ ├── german.go │ │ ├── i18n.go │ │ ├── polish.go │ │ ├── portuguese.go │ │ ├── spanish.go │ │ └── turkish.go │ ├── log/ │ │ └── log.go │ ├── tasks/ │ │ └── tasks.go │ └── utils/ │ ├── utils.go │ └── utils_test.go ├── scripts/ │ ├── bump_gocui.sh │ ├── bump_lazycore.sh │ ├── cheatsheet/ │ │ └── main.go │ ├── install_update_linux.sh │ └── translations/ │ └── get_required_translations.go ├── test/ │ ├── Dockerfile │ ├── docker-compose.yml │ └── print-random-stuff.sh ├── test.sh └── vendor/ ├── github.com/ │ ├── Microsoft/ │ │ └── go-winio/ │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── .golangci.yml │ │ ├── CODEOWNERS │ │ ├── LICENSE │ │ ├── README.md │ │ ├── SECURITY.md │ │ ├── backup.go │ │ ├── doc.go │ │ ├── ea.go │ │ ├── file.go │ │ ├── fileinfo.go │ │ ├── hvsock.go │ │ ├── internal/ │ │ │ ├── fs/ │ │ │ │ ├── doc.go │ │ │ │ ├── fs.go │ │ │ │ ├── security.go │ │ │ │ └── zsyscall_windows.go │ │ │ ├── socket/ │ │ │ │ ├── rawaddr.go │ │ │ │ ├── socket.go │ │ │ │ └── zsyscall_windows.go │ │ │ └── stringbuffer/ │ │ │ └── wstring.go │ │ ├── pipe.go │ │ ├── pkg/ │ │ │ └── guid/ │ │ │ ├── guid.go │ │ │ ├── guid_nonwindows.go │ │ │ ├── guid_windows.go │ │ │ └── variant_string.go │ │ ├── privilege.go │ │ ├── reparse.go │ │ ├── sd.go │ │ ├── syscall.go │ │ └── zsyscall_windows.go │ ├── OpenPeeDeeP/ │ │ └── xdg/ │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── xdg.go │ │ ├── xdg_bsd.go │ │ ├── xdg_darwin.go │ │ ├── xdg_linux.go │ │ └── xdg_windows.go │ ├── boz/ │ │ └── go-throttle/ │ │ ├── .travis.yml │ │ ├── Makefile │ │ ├── README.md │ │ └── throttle.go │ ├── cloudfoundry/ │ │ └── jibber_jabber/ │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── jibber_jabber.go │ │ ├── jibber_jabber_unix.go │ │ └── jibber_jabber_windows.go │ ├── containerd/ │ │ ├── errdefs/ │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── errors.go │ │ │ ├── pkg/ │ │ │ │ ├── LICENSE │ │ │ │ ├── errhttp/ │ │ │ │ │ └── http.go │ │ │ │ └── internal/ │ │ │ │ └── cause/ │ │ │ │ └── cause.go │ │ │ └── resolve.go │ │ └── log/ │ │ ├── .golangci.yml │ │ ├── LICENSE │ │ ├── README.md │ │ └── context.go │ ├── davecgh/ │ │ └── go-spew/ │ │ ├── LICENSE │ │ └── spew/ │ │ ├── bypass.go │ │ ├── bypasssafe.go │ │ ├── common.go │ │ ├── config.go │ │ ├── doc.go │ │ ├── dump.go │ │ ├── format.go │ │ └── spew.go │ ├── distribution/ │ │ └── reference/ │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── .golangci.yml │ │ ├── CODE-OF-CONDUCT.md │ │ ├── CONTRIBUTING.md │ │ ├── GOVERNANCE.md │ │ ├── LICENSE │ │ ├── MAINTAINERS │ │ ├── Makefile │ │ ├── README.md │ │ ├── SECURITY.md │ │ ├── helpers.go │ │ ├── normalize.go │ │ ├── reference.go │ │ ├── regexp.go │ │ └── sort.go │ ├── docker/ │ │ ├── cli/ │ │ │ ├── AUTHORS │ │ │ ├── LICENSE │ │ │ ├── NOTICE │ │ │ └── cli/ │ │ │ ├── config/ │ │ │ │ ├── config.go │ │ │ │ ├── configfile/ │ │ │ │ │ ├── file.go │ │ │ │ │ ├── file_unix.go │ │ │ │ │ └── file_windows.go │ │ │ │ ├── credentials/ │ │ │ │ │ ├── credentials.go │ │ │ │ │ ├── default_store.go │ │ │ │ │ ├── default_store_darwin.go │ │ │ │ │ ├── default_store_linux.go │ │ │ │ │ ├── default_store_unsupported.go │ │ │ │ │ ├── default_store_windows.go │ │ │ │ │ ├── file_store.go │ │ │ │ │ └── native_store.go │ │ │ │ └── types/ │ │ │ │ └── authconfig.go │ │ │ ├── connhelper/ │ │ │ │ ├── commandconn/ │ │ │ │ │ ├── commandconn.go │ │ │ │ │ ├── pdeathsig_linux.go │ │ │ │ │ ├── pdeathsig_nolinux.go │ │ │ │ │ ├── session_unix.go │ │ │ │ │ └── session_windows.go │ │ │ │ ├── connhelper.go │ │ │ │ └── ssh/ │ │ │ │ └── ssh.go │ │ │ └── context/ │ │ │ ├── docker/ │ │ │ │ ├── constants.go │ │ │ │ └── load.go │ │ │ ├── endpoint.go │ │ │ ├── store/ │ │ │ │ ├── doc.go │ │ │ │ ├── io_utils.go │ │ │ │ ├── metadatastore.go │ │ │ │ ├── store.go │ │ │ │ ├── storeconfig.go │ │ │ │ └── tlsstore.go │ │ │ └── tlsdata.go │ │ ├── docker/ │ │ │ ├── AUTHORS │ │ │ ├── LICENSE │ │ │ ├── NOTICE │ │ │ ├── api/ │ │ │ │ ├── README.md │ │ │ │ ├── common.go │ │ │ │ ├── swagger-gen.yaml │ │ │ │ ├── swagger.yaml │ │ │ │ └── types/ │ │ │ │ ├── blkiodev/ │ │ │ │ │ └── blkio.go │ │ │ │ ├── build/ │ │ │ │ │ ├── build.go │ │ │ │ │ ├── cache.go │ │ │ │ │ └── disk_usage.go │ │ │ │ ├── checkpoint/ │ │ │ │ │ ├── list.go │ │ │ │ │ └── options.go │ │ │ │ ├── client.go │ │ │ │ ├── common/ │ │ │ │ │ └── id_response.go │ │ │ │ ├── container/ │ │ │ │ │ ├── change_type.go │ │ │ │ │ ├── change_types.go │ │ │ │ │ ├── commit.go │ │ │ │ │ ├── config.go │ │ │ │ │ ├── container.go │ │ │ │ │ ├── create_request.go │ │ │ │ │ ├── create_response.go │ │ │ │ │ ├── disk_usage.go │ │ │ │ │ ├── errors.go │ │ │ │ │ ├── exec.go │ │ │ │ │ ├── filesystem_change.go │ │ │ │ │ ├── health.go │ │ │ │ │ ├── hostconfig.go │ │ │ │ │ ├── hostconfig_unix.go │ │ │ │ │ ├── hostconfig_windows.go │ │ │ │ │ ├── network_settings.go │ │ │ │ │ ├── options.go │ │ │ │ │ ├── port.go │ │ │ │ │ ├── state.go │ │ │ │ │ ├── stats.go │ │ │ │ │ ├── top_response.go │ │ │ │ │ ├── update_response.go │ │ │ │ │ ├── wait_exit_error.go │ │ │ │ │ ├── wait_response.go │ │ │ │ │ └── waitcondition.go │ │ │ │ ├── error_response.go │ │ │ │ ├── error_response_ext.go │ │ │ │ ├── events/ │ │ │ │ │ └── events.go │ │ │ │ ├── filters/ │ │ │ │ │ ├── errors.go │ │ │ │ │ ├── filters_deprecated.go │ │ │ │ │ └── parse.go │ │ │ │ ├── image/ │ │ │ │ │ ├── delete_response.go │ │ │ │ │ ├── disk_usage.go │ │ │ │ │ ├── image.go │ │ │ │ │ ├── image_history.go │ │ │ │ │ ├── image_inspect.go │ │ │ │ │ ├── manifest.go │ │ │ │ │ ├── opts.go │ │ │ │ │ └── summary.go │ │ │ │ ├── mount/ │ │ │ │ │ └── mount.go │ │ │ │ ├── network/ │ │ │ │ │ ├── create_response.go │ │ │ │ │ ├── endpoint.go │ │ │ │ │ ├── ipam.go │ │ │ │ │ └── network.go │ │ │ │ ├── plugin.go │ │ │ │ ├── plugin_device.go │ │ │ │ ├── plugin_env.go │ │ │ │ ├── plugin_interface_type.go │ │ │ │ ├── plugin_mount.go │ │ │ │ ├── plugin_responses.go │ │ │ │ ├── registry/ │ │ │ │ │ ├── authconfig.go │ │ │ │ │ ├── authenticate.go │ │ │ │ │ ├── registry.go │ │ │ │ │ └── search.go │ │ │ │ ├── storage/ │ │ │ │ │ └── driver_data.go │ │ │ │ ├── strslice/ │ │ │ │ │ └── strslice.go │ │ │ │ ├── swarm/ │ │ │ │ │ ├── common.go │ │ │ │ │ ├── config.go │ │ │ │ │ ├── container.go │ │ │ │ │ ├── network.go │ │ │ │ │ ├── node.go │ │ │ │ │ ├── runtime/ │ │ │ │ │ │ └── runtime.go │ │ │ │ │ ├── runtime.go │ │ │ │ │ ├── secret.go │ │ │ │ │ ├── service.go │ │ │ │ │ ├── service_create_response.go │ │ │ │ │ ├── service_update_response.go │ │ │ │ │ ├── swarm.go │ │ │ │ │ └── task.go │ │ │ │ ├── system/ │ │ │ │ │ ├── info.go │ │ │ │ │ ├── runtime.go │ │ │ │ │ └── security_opts.go │ │ │ │ ├── time/ │ │ │ │ │ └── timestamp.go │ │ │ │ ├── types.go │ │ │ │ ├── types_deprecated.go │ │ │ │ ├── versions/ │ │ │ │ │ └── compare.go │ │ │ │ └── volume/ │ │ │ │ ├── cluster_volume.go │ │ │ │ ├── create_options.go │ │ │ │ ├── disk_usage.go │ │ │ │ ├── list_response.go │ │ │ │ ├── options.go │ │ │ │ ├── volume.go │ │ │ │ └── volume_update.go │ │ │ ├── client/ │ │ │ │ ├── README.md │ │ │ │ ├── build_cancel.go │ │ │ │ ├── build_prune.go │ │ │ │ ├── checkpoint.go │ │ │ │ ├── checkpoint_create.go │ │ │ │ ├── checkpoint_delete.go │ │ │ │ ├── checkpoint_list.go │ │ │ │ ├── client.go │ │ │ │ ├── client_deprecated.go │ │ │ │ ├── client_interfaces.go │ │ │ │ ├── client_unix.go │ │ │ │ ├── client_windows.go │ │ │ │ ├── config_create.go │ │ │ │ ├── config_inspect.go │ │ │ │ ├── config_list.go │ │ │ │ ├── config_remove.go │ │ │ │ ├── config_update.go │ │ │ │ ├── container_attach.go │ │ │ │ ├── container_commit.go │ │ │ │ ├── container_copy.go │ │ │ │ ├── container_create.go │ │ │ │ ├── container_diff.go │ │ │ │ ├── container_exec.go │ │ │ │ ├── container_export.go │ │ │ │ ├── container_inspect.go │ │ │ │ ├── container_kill.go │ │ │ │ ├── container_list.go │ │ │ │ ├── container_logs.go │ │ │ │ ├── container_pause.go │ │ │ │ ├── container_prune.go │ │ │ │ ├── container_remove.go │ │ │ │ ├── container_rename.go │ │ │ │ ├── container_resize.go │ │ │ │ ├── container_restart.go │ │ │ │ ├── container_start.go │ │ │ │ ├── container_stats.go │ │ │ │ ├── container_stop.go │ │ │ │ ├── container_top.go │ │ │ │ ├── container_unpause.go │ │ │ │ ├── container_update.go │ │ │ │ ├── container_wait.go │ │ │ │ ├── disk_usage.go │ │ │ │ ├── distribution_inspect.go │ │ │ │ ├── envvars.go │ │ │ │ ├── errors.go │ │ │ │ ├── events.go │ │ │ │ ├── hijack.go │ │ │ │ ├── image_build.go │ │ │ │ ├── image_create.go │ │ │ │ ├── image_history.go │ │ │ │ ├── image_history_opts.go │ │ │ │ ├── image_import.go │ │ │ │ ├── image_inspect.go │ │ │ │ ├── image_inspect_opts.go │ │ │ │ ├── image_list.go │ │ │ │ ├── image_load.go │ │ │ │ ├── image_load_opts.go │ │ │ │ ├── image_prune.go │ │ │ │ ├── image_pull.go │ │ │ │ ├── image_push.go │ │ │ │ ├── image_remove.go │ │ │ │ ├── image_save.go │ │ │ │ ├── image_save_opts.go │ │ │ │ ├── image_search.go │ │ │ │ ├── image_tag.go │ │ │ │ ├── info.go │ │ │ │ ├── login.go │ │ │ │ ├── network_connect.go │ │ │ │ ├── network_create.go │ │ │ │ ├── network_disconnect.go │ │ │ │ ├── network_inspect.go │ │ │ │ ├── network_list.go │ │ │ │ ├── network_prune.go │ │ │ │ ├── network_remove.go │ │ │ │ ├── node_inspect.go │ │ │ │ ├── node_list.go │ │ │ │ ├── node_remove.go │ │ │ │ ├── node_update.go │ │ │ │ ├── options.go │ │ │ │ ├── ping.go │ │ │ │ ├── plugin_create.go │ │ │ │ ├── plugin_disable.go │ │ │ │ ├── plugin_enable.go │ │ │ │ ├── plugin_inspect.go │ │ │ │ ├── plugin_install.go │ │ │ │ ├── plugin_list.go │ │ │ │ ├── plugin_push.go │ │ │ │ ├── plugin_remove.go │ │ │ │ ├── plugin_set.go │ │ │ │ ├── plugin_upgrade.go │ │ │ │ ├── request.go │ │ │ │ ├── secret_create.go │ │ │ │ ├── secret_inspect.go │ │ │ │ ├── secret_list.go │ │ │ │ ├── secret_remove.go │ │ │ │ ├── secret_update.go │ │ │ │ ├── service_create.go │ │ │ │ ├── service_inspect.go │ │ │ │ ├── service_list.go │ │ │ │ ├── service_logs.go │ │ │ │ ├── service_remove.go │ │ │ │ ├── service_update.go │ │ │ │ ├── swarm_get_unlock_key.go │ │ │ │ ├── swarm_init.go │ │ │ │ ├── swarm_inspect.go │ │ │ │ ├── swarm_join.go │ │ │ │ ├── swarm_leave.go │ │ │ │ ├── swarm_unlock.go │ │ │ │ ├── swarm_update.go │ │ │ │ ├── task_inspect.go │ │ │ │ ├── task_list.go │ │ │ │ ├── task_logs.go │ │ │ │ ├── utils.go │ │ │ │ ├── version.go │ │ │ │ ├── volume_create.go │ │ │ │ ├── volume_inspect.go │ │ │ │ ├── volume_list.go │ │ │ │ ├── volume_prune.go │ │ │ │ ├── volume_remove.go │ │ │ │ └── volume_update.go │ │ │ ├── errdefs/ │ │ │ │ ├── defs.go │ │ │ │ ├── doc.go │ │ │ │ ├── helpers.go │ │ │ │ ├── http_helpers.go │ │ │ │ └── is.go │ │ │ └── pkg/ │ │ │ ├── ioutils/ │ │ │ │ ├── fswriters_deprecated.go │ │ │ │ ├── readers.go │ │ │ │ ├── writeflusher.go │ │ │ │ └── writers.go │ │ │ └── stdcopy/ │ │ │ └── stdcopy.go │ │ ├── docker-credential-helpers/ │ │ │ ├── LICENSE │ │ │ ├── client/ │ │ │ │ ├── client.go │ │ │ │ └── command.go │ │ │ └── credentials/ │ │ │ ├── credentials.go │ │ │ ├── error.go │ │ │ ├── helper.go │ │ │ └── version.go │ │ ├── go-connections/ │ │ │ ├── LICENSE │ │ │ ├── nat/ │ │ │ │ ├── nat.go │ │ │ │ ├── parse.go │ │ │ │ └── sort.go │ │ │ ├── sockets/ │ │ │ │ ├── README.md │ │ │ │ ├── inmem_socket.go │ │ │ │ ├── proxy.go │ │ │ │ ├── sockets.go │ │ │ │ ├── sockets_unix.go │ │ │ │ ├── sockets_windows.go │ │ │ │ ├── tcp_socket.go │ │ │ │ └── unix_socket.go │ │ │ └── tlsconfig/ │ │ │ ├── certpool.go │ │ │ ├── config.go │ │ │ └── config_client_ciphers.go │ │ └── go-units/ │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── MAINTAINERS │ │ ├── README.md │ │ ├── circle.yml │ │ ├── duration.go │ │ ├── size.go │ │ └── ulimit.go │ ├── fatih/ │ │ └── color/ │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── color.go │ │ └── doc.go │ ├── felixge/ │ │ └── httpsnoop/ │ │ ├── .gitignore │ │ ├── LICENSE.txt │ │ ├── Makefile │ │ ├── README.md │ │ ├── capture_metrics.go │ │ ├── docs.go │ │ ├── wrap_generated_gteq_1.8.go │ │ └── wrap_generated_lt_1.8.go │ ├── fvbommel/ │ │ └── sortorder/ │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── doc.go │ │ └── natsort.go │ ├── gdamore/ │ │ ├── encoding/ │ │ │ ├── .appveyor.yml │ │ │ ├── CODE_OF_CONDUCT.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── SECURITY.md │ │ │ ├── ascii.go │ │ │ ├── charmap.go │ │ │ ├── doc.go │ │ │ ├── ebcdic.go │ │ │ ├── latin1.go │ │ │ ├── latin5.go │ │ │ └── utf8.go │ │ └── tcell/ │ │ └── v2/ │ │ ├── .appveyor.yml │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── AUTHORS │ │ ├── CHANGESv2.md │ │ ├── LICENSE │ │ ├── README-wasm.md │ │ ├── README.md │ │ ├── SECURITY.md │ │ ├── TUTORIAL.md │ │ ├── UKRAINE.md │ │ ├── attr.go │ │ ├── cell.go │ │ ├── charset_stub.go │ │ ├── charset_unix.go │ │ ├── charset_windows.go │ │ ├── color.go │ │ ├── colorfit.go │ │ ├── console_stub.go │ │ ├── console_win.go │ │ ├── doc.go │ │ ├── encoding.go │ │ ├── errors.go │ │ ├── event.go │ │ ├── focus.go │ │ ├── interrupt.go │ │ ├── key.go │ │ ├── mouse.go │ │ ├── nonblock_bsd.go │ │ ├── nonblock_unix.go │ │ ├── paste.go │ │ ├── resize.go │ │ ├── runes.go │ │ ├── screen.go │ │ ├── simulation.go │ │ ├── stdin_unix.go │ │ ├── style.go │ │ ├── terminfo/ │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── TERMINALS.md │ │ │ ├── a/ │ │ │ │ ├── aixterm/ │ │ │ │ │ └── term.go │ │ │ │ ├── alacritty/ │ │ │ │ │ ├── direct.go │ │ │ │ │ └── term.go │ │ │ │ └── ansi/ │ │ │ │ └── term.go │ │ │ ├── b/ │ │ │ │ └── beterm/ │ │ │ │ └── term.go │ │ │ ├── base/ │ │ │ │ └── base.go │ │ │ ├── c/ │ │ │ │ └── cygwin/ │ │ │ │ └── term.go │ │ │ ├── d/ │ │ │ │ └── dtterm/ │ │ │ │ └── term.go │ │ │ ├── dynamic/ │ │ │ │ └── dynamic.go │ │ │ ├── e/ │ │ │ │ └── emacs/ │ │ │ │ └── term.go │ │ │ ├── extended/ │ │ │ │ └── extended.go │ │ │ ├── f/ │ │ │ │ └── foot/ │ │ │ │ └── foot.go │ │ │ ├── g/ │ │ │ │ └── gnome/ │ │ │ │ └── term.go │ │ │ ├── gen.sh │ │ │ ├── h/ │ │ │ │ └── hpterm/ │ │ │ │ └── term.go │ │ │ ├── k/ │ │ │ │ ├── konsole/ │ │ │ │ │ └── term.go │ │ │ │ └── kterm/ │ │ │ │ └── term.go │ │ │ ├── l/ │ │ │ │ └── linux/ │ │ │ │ └── term.go │ │ │ ├── models.txt │ │ │ ├── p/ │ │ │ │ └── pcansi/ │ │ │ │ └── term.go │ │ │ ├── r/ │ │ │ │ └── rxvt/ │ │ │ │ └── term.go │ │ │ ├── s/ │ │ │ │ ├── screen/ │ │ │ │ │ └── term.go │ │ │ │ ├── simpleterm/ │ │ │ │ │ └── term.go │ │ │ │ └── sun/ │ │ │ │ └── term.go │ │ │ ├── t/ │ │ │ │ └── tmux/ │ │ │ │ └── term.go │ │ │ ├── terminfo.go │ │ │ ├── v/ │ │ │ │ ├── vt100/ │ │ │ │ │ └── term.go │ │ │ │ ├── vt102/ │ │ │ │ │ └── term.go │ │ │ │ ├── vt220/ │ │ │ │ │ └── term.go │ │ │ │ ├── vt320/ │ │ │ │ │ └── term.go │ │ │ │ ├── vt400/ │ │ │ │ │ └── term.go │ │ │ │ ├── vt420/ │ │ │ │ │ └── term.go │ │ │ │ └── vt52/ │ │ │ │ └── term.go │ │ │ ├── w/ │ │ │ │ ├── wy50/ │ │ │ │ │ └── term.go │ │ │ │ ├── wy60/ │ │ │ │ │ └── term.go │ │ │ │ └── wy99_ansi/ │ │ │ │ └── term.go │ │ │ └── x/ │ │ │ ├── xfce/ │ │ │ │ └── term.go │ │ │ ├── xterm/ │ │ │ │ ├── direct.go │ │ │ │ └── term.go │ │ │ └── xterm_kitty/ │ │ │ └── term.go │ │ ├── terms_default.go │ │ ├── terms_dynamic.go │ │ ├── terms_static.go │ │ ├── tscreen.go │ │ ├── tscreen_stub.go │ │ ├── tscreen_unix.go │ │ ├── tty.go │ │ ├── tty_unix.go │ │ └── wscreen.go │ ├── go-errors/ │ │ └── errors/ │ │ ├── .travis.yml │ │ ├── LICENSE.MIT │ │ ├── README.md │ │ ├── error.go │ │ ├── error_1_13.go │ │ ├── error_backward.go │ │ ├── join_unwrap_1_20.go │ │ ├── join_unwrap_backward.go │ │ ├── parse_panic.go │ │ └── stackframe.go │ ├── go-logr/ │ │ ├── logr/ │ │ │ ├── .golangci.yaml │ │ │ ├── CHANGELOG.md │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── SECURITY.md │ │ │ ├── context.go │ │ │ ├── context_noslog.go │ │ │ ├── context_slog.go │ │ │ ├── discard.go │ │ │ ├── funcr/ │ │ │ │ ├── funcr.go │ │ │ │ └── slogsink.go │ │ │ ├── logr.go │ │ │ ├── sloghandler.go │ │ │ ├── slogr.go │ │ │ └── slogsink.go │ │ └── stdr/ │ │ ├── LICENSE │ │ ├── README.md │ │ └── stdr.go │ ├── goccy/ │ │ └── go-yaml/ │ │ ├── .codecov.yml │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── ast/ │ │ │ └── ast.go │ │ ├── decode.go │ │ ├── encode.go │ │ ├── error.go │ │ ├── internal/ │ │ │ └── errors/ │ │ │ └── error.go │ │ ├── lexer/ │ │ │ └── lexer.go │ │ ├── option.go │ │ ├── parser/ │ │ │ ├── context.go │ │ │ └── parser.go │ │ ├── path.go │ │ ├── printer/ │ │ │ └── printer.go │ │ ├── scanner/ │ │ │ ├── context.go │ │ │ └── scanner.go │ │ ├── stdlib_quote.go │ │ ├── struct.go │ │ ├── token/ │ │ │ └── token.go │ │ ├── validate.go │ │ └── yaml.go │ ├── gookit/ │ │ └── color/ │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── README.zh-CN.md │ │ ├── color.go │ │ ├── color_16.go │ │ ├── color_256.go │ │ ├── color_rgb.go │ │ ├── color_tag.go │ │ ├── convert.go │ │ ├── detect_env.go │ │ ├── detect_nonwin.go │ │ ├── detect_windows.go │ │ ├── printer.go │ │ ├── quickstart.go │ │ ├── style.go │ │ └── utils.go │ ├── imdario/ │ │ └── mergo/ │ │ ├── .deepsource.toml │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── CODE_OF_CONDUCT.md │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── SECURITY.md │ │ ├── doc.go │ │ ├── map.go │ │ ├── merge.go │ │ └── mergo.go │ ├── integrii/ │ │ └── flaggy/ │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── argumentParser.go │ │ ├── flag.go │ │ ├── help.go │ │ ├── helpValues.go │ │ ├── main.go │ │ ├── parsedValue.go │ │ ├── parser.go │ │ ├── positionalValue.go │ │ └── subCommand.go │ ├── jesseduffield/ │ │ ├── asciigraph/ │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.rst │ │ │ ├── asciigraph.go │ │ │ ├── options.go │ │ │ └── utils.go │ │ ├── gocui/ │ │ │ ├── .gitignore │ │ │ ├── AUTHORS │ │ │ ├── CHANGES_tcell.md │ │ │ ├── CODE_OF_CONDUCT.md │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── attribute.go │ │ │ ├── doc.go │ │ │ ├── edit.go │ │ │ ├── escape.go │ │ │ ├── gui.go │ │ │ ├── gui_others.go │ │ │ ├── gui_windows.go │ │ │ ├── keybinding.go │ │ │ ├── loader.go │ │ │ ├── scrollbar.go │ │ │ ├── task.go │ │ │ ├── task_manager.go │ │ │ ├── tcell_driver.go │ │ │ ├── text_area.go │ │ │ └── view.go │ │ ├── kill/ │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── kill_default_platform.go │ │ │ └── kill_windows.go │ │ ├── lazycore/ │ │ │ ├── LICENSE │ │ │ └── pkg/ │ │ │ ├── boxlayout/ │ │ │ │ └── boxlayout.go │ │ │ └── utils/ │ │ │ ├── once_writer.go │ │ │ └── utils.go │ │ └── yaml/ │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── LICENSE.libyaml │ │ ├── NOTICE │ │ ├── README.md │ │ ├── apic.go │ │ ├── decode.go │ │ ├── emitterc.go │ │ ├── encode.go │ │ ├── parserc.go │ │ ├── readerc.go │ │ ├── resolve.go │ │ ├── scannerc.go │ │ ├── sorter.go │ │ ├── writerc.go │ │ ├── yaml.go │ │ ├── yamlh.go │ │ └── yamlprivateh.go │ ├── mattn/ │ │ ├── go-colorable/ │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── colorable_appengine.go │ │ │ ├── colorable_others.go │ │ │ ├── colorable_windows.go │ │ │ ├── go.test.sh │ │ │ └── noncolorable.go │ │ ├── go-isatty/ │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── doc.go │ │ │ ├── go.test.sh │ │ │ ├── isatty_bsd.go │ │ │ ├── isatty_others.go │ │ │ ├── isatty_plan9.go │ │ │ ├── isatty_solaris.go │ │ │ ├── isatty_tcgets.go │ │ │ ├── isatty_windows.go │ │ │ └── renovate.json │ │ └── go-runewidth/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── runewidth.go │ │ ├── runewidth_appengine.go │ │ ├── runewidth_js.go │ │ ├── runewidth_posix.go │ │ ├── runewidth_table.go │ │ └── runewidth_windows.go │ ├── mcuadros/ │ │ └── go-lookup/ │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ └── lookup.go │ ├── mgutz/ │ │ └── str/ │ │ ├── .gitignore │ │ ├── CREDITS │ │ ├── LICENSE │ │ ├── README.md │ │ ├── VERSION │ │ ├── doc.go │ │ ├── funcsAO.go │ │ └── funcsPZ.go │ ├── moby/ │ │ ├── docker-image-spec/ │ │ │ ├── LICENSE │ │ │ └── specs-go/ │ │ │ └── v1/ │ │ │ └── image.go │ │ └── sys/ │ │ ├── atomicwriter/ │ │ │ ├── LICENSE │ │ │ └── atomicwriter.go │ │ └── sequential/ │ │ ├── LICENSE │ │ ├── doc.go │ │ ├── sequential_unix.go │ │ └── sequential_windows.go │ ├── opencontainers/ │ │ ├── go-digest/ │ │ │ ├── .mailmap │ │ │ ├── .pullapprove.yml │ │ │ ├── .travis.yml │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE │ │ │ ├── LICENSE.docs │ │ │ ├── MAINTAINERS │ │ │ ├── README.md │ │ │ ├── algorithm.go │ │ │ ├── digest.go │ │ │ ├── digester.go │ │ │ ├── doc.go │ │ │ └── verifiers.go │ │ └── image-spec/ │ │ ├── LICENSE │ │ └── specs-go/ │ │ ├── v1/ │ │ │ ├── annotations.go │ │ │ ├── config.go │ │ │ ├── descriptor.go │ │ │ ├── index.go │ │ │ ├── layout.go │ │ │ ├── manifest.go │ │ │ └── mediatype.go │ │ ├── version.go │ │ └── versioned.go │ ├── petermattis/ │ │ └── goid/ │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── goid.go │ │ ├── goid_gccgo.go │ │ ├── goid_go1.3.c │ │ ├── goid_go1.3.go │ │ ├── goid_go1.4.go │ │ ├── goid_go1.4.s │ │ ├── goid_go1.5_amd64.go │ │ ├── goid_go1.5_amd64.s │ │ ├── goid_go1.5_arm.go │ │ ├── goid_go1.5_arm.s │ │ ├── goid_slow.go │ │ ├── runtime_gccgo_go1.8.go │ │ ├── runtime_go1.5.go │ │ ├── runtime_go1.6.go │ │ └── runtime_go1.9.go │ ├── pkg/ │ │ └── errors/ │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── errors.go │ │ ├── go113.go │ │ └── stack.go │ ├── pmezard/ │ │ └── go-difflib/ │ │ ├── LICENSE │ │ └── difflib/ │ │ └── difflib.go │ ├── rivo/ │ │ └── uniseg/ │ │ ├── LICENSE.txt │ │ ├── README.md │ │ ├── doc.go │ │ ├── eastasianwidth.go │ │ ├── emojipresentation.go │ │ ├── gen_breaktest.go │ │ ├── gen_properties.go │ │ ├── grapheme.go │ │ ├── graphemeproperties.go │ │ ├── graphemerules.go │ │ ├── line.go │ │ ├── lineproperties.go │ │ ├── linerules.go │ │ ├── properties.go │ │ ├── sentence.go │ │ ├── sentenceproperties.go │ │ ├── sentencerules.go │ │ ├── step.go │ │ ├── width.go │ │ ├── word.go │ │ ├── wordproperties.go │ │ └── wordrules.go │ ├── sasha-s/ │ │ └── go-deadlock/ │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── Readme.md │ │ ├── deadlock.go │ │ ├── deadlock_map.go │ │ ├── stacktraces.go │ │ └── test.sh │ ├── spkg/ │ │ └── bom/ │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── bom.go │ │ ├── discard_go14.go │ │ └── discard_go15.go │ ├── stretchr/ │ │ └── testify/ │ │ ├── LICENSE │ │ └── assert/ │ │ ├── assertion_compare.go │ │ ├── assertion_format.go │ │ ├── assertion_format.go.tmpl │ │ ├── assertion_forward.go │ │ ├── assertion_forward.go.tmpl │ │ ├── assertion_order.go │ │ ├── assertions.go │ │ ├── doc.go │ │ ├── errors.go │ │ ├── forward_assertions.go │ │ └── http_assertions.go │ └── xo/ │ └── terminfo/ │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ ├── caps.go │ ├── capvals.go │ ├── color.go │ ├── load.go │ ├── param.go │ ├── stack.go │ ├── terminfo.go │ └── util.go ├── go.opentelemetry.io/ │ ├── contrib/ │ │ └── instrumentation/ │ │ └── net/ │ │ └── http/ │ │ └── otelhttp/ │ │ ├── LICENSE │ │ ├── client.go │ │ ├── common.go │ │ ├── config.go │ │ ├── doc.go │ │ ├── handler.go │ │ ├── internal/ │ │ │ ├── semconv/ │ │ │ │ ├── env.go │ │ │ │ ├── util.go │ │ │ │ ├── v1.20.0.go │ │ │ │ └── v1.24.0.go │ │ │ └── semconvutil/ │ │ │ ├── gen.go │ │ │ ├── httpconv.go │ │ │ └── netconv.go │ │ ├── labeler.go │ │ ├── transport.go │ │ ├── version.go │ │ └── wrap.go │ └── otel/ │ ├── .codespellignore │ ├── .codespellrc │ ├── .gitattributes │ ├── .gitignore │ ├── .golangci.yml │ ├── .lycheeignore │ ├── .markdownlint.yaml │ ├── CHANGELOG.md │ ├── CODEOWNERS │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── RELEASING.md │ ├── VERSIONING.md │ ├── attribute/ │ │ ├── README.md │ │ ├── doc.go │ │ ├── encoder.go │ │ ├── filter.go │ │ ├── iterator.go │ │ ├── key.go │ │ ├── kv.go │ │ ├── set.go │ │ ├── type_string.go │ │ └── value.go │ ├── baggage/ │ │ ├── README.md │ │ ├── baggage.go │ │ ├── context.go │ │ └── doc.go │ ├── codes/ │ │ ├── README.md │ │ ├── codes.go │ │ └── doc.go │ ├── doc.go │ ├── error_handler.go │ ├── get_main_pkgs.sh │ ├── handler.go │ ├── internal/ │ │ ├── attribute/ │ │ │ └── attribute.go │ │ ├── baggage/ │ │ │ ├── baggage.go │ │ │ └── context.go │ │ ├── gen.go │ │ ├── global/ │ │ │ ├── handler.go │ │ │ ├── instruments.go │ │ │ ├── internal_logging.go │ │ │ ├── meter.go │ │ │ ├── propagator.go │ │ │ ├── state.go │ │ │ └── trace.go │ │ └── rawhelpers.go │ ├── internal_logging.go │ ├── metric/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── asyncfloat64.go │ │ ├── asyncint64.go │ │ ├── config.go │ │ ├── doc.go │ │ ├── embedded/ │ │ │ ├── README.md │ │ │ └── embedded.go │ │ ├── instrument.go │ │ ├── meter.go │ │ ├── syncfloat64.go │ │ └── syncint64.go │ ├── metric.go │ ├── propagation/ │ │ ├── README.md │ │ ├── baggage.go │ │ ├── doc.go │ │ ├── propagation.go │ │ └── trace_context.go │ ├── propagation.go │ ├── renovate.json │ ├── requirements.txt │ ├── semconv/ │ │ ├── v1.20.0/ │ │ │ ├── README.md │ │ │ ├── attribute_group.go │ │ │ ├── doc.go │ │ │ ├── event.go │ │ │ ├── exception.go │ │ │ ├── http.go │ │ │ ├── resource.go │ │ │ ├── schema.go │ │ │ └── trace.go │ │ └── v1.24.0/ │ │ ├── README.md │ │ ├── attribute_group.go │ │ ├── doc.go │ │ ├── event.go │ │ ├── exception.go │ │ ├── metric.go │ │ ├── resource.go │ │ ├── schema.go │ │ └── trace.go │ ├── trace/ │ │ ├── LICENSE │ │ ├── README.md │ │ ├── config.go │ │ ├── context.go │ │ ├── doc.go │ │ ├── embedded/ │ │ │ ├── README.md │ │ │ └── embedded.go │ │ ├── nonrecording.go │ │ ├── noop.go │ │ ├── trace.go │ │ └── tracestate.go │ ├── trace.go │ ├── verify_examples.sh │ ├── verify_readmes.sh │ ├── version.go │ └── versions.yaml ├── golang.org/ │ └── x/ │ ├── exp/ │ │ ├── LICENSE │ │ ├── PATENTS │ │ └── constraints/ │ │ └── constraints.go │ ├── sys/ │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── plan9/ │ │ │ ├── asm.s │ │ │ ├── asm_plan9_386.s │ │ │ ├── asm_plan9_amd64.s │ │ │ ├── asm_plan9_arm.s │ │ │ ├── const_plan9.go │ │ │ ├── dir_plan9.go │ │ │ ├── env_plan9.go │ │ │ ├── errors_plan9.go │ │ │ ├── mkall.sh │ │ │ ├── mkerrors.sh │ │ │ ├── mksysnum_plan9.sh │ │ │ ├── pwd_go15_plan9.go │ │ │ ├── pwd_plan9.go │ │ │ ├── race.go │ │ │ ├── race0.go │ │ │ ├── str.go │ │ │ ├── syscall.go │ │ │ ├── syscall_plan9.go │ │ │ ├── zsyscall_plan9_386.go │ │ │ ├── zsyscall_plan9_amd64.go │ │ │ ├── zsyscall_plan9_arm.go │ │ │ └── zsysnum_plan9.go │ │ ├── unix/ │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── affinity_linux.go │ │ │ ├── aliases.go │ │ │ ├── asm_aix_ppc64.s │ │ │ ├── asm_bsd_386.s │ │ │ ├── asm_bsd_amd64.s │ │ │ ├── asm_bsd_arm.s │ │ │ ├── asm_bsd_arm64.s │ │ │ ├── asm_bsd_ppc64.s │ │ │ ├── asm_bsd_riscv64.s │ │ │ ├── asm_linux_386.s │ │ │ ├── asm_linux_amd64.s │ │ │ ├── asm_linux_arm.s │ │ │ ├── asm_linux_arm64.s │ │ │ ├── asm_linux_loong64.s │ │ │ ├── asm_linux_mips64x.s │ │ │ ├── asm_linux_mipsx.s │ │ │ ├── asm_linux_ppc64x.s │ │ │ ├── asm_linux_riscv64.s │ │ │ ├── asm_linux_s390x.s │ │ │ ├── asm_openbsd_mips64.s │ │ │ ├── asm_solaris_amd64.s │ │ │ ├── asm_zos_s390x.s │ │ │ ├── bluetooth_linux.go │ │ │ ├── bpxsvc_zos.go │ │ │ ├── bpxsvc_zos.s │ │ │ ├── cap_freebsd.go │ │ │ ├── constants.go │ │ │ ├── dev_aix_ppc.go │ │ │ ├── dev_aix_ppc64.go │ │ │ ├── dev_darwin.go │ │ │ ├── dev_dragonfly.go │ │ │ ├── dev_freebsd.go │ │ │ ├── dev_linux.go │ │ │ ├── dev_netbsd.go │ │ │ ├── dev_openbsd.go │ │ │ ├── dev_zos.go │ │ │ ├── dirent.go │ │ │ ├── endian_big.go │ │ │ ├── endian_little.go │ │ │ ├── env_unix.go │ │ │ ├── fcntl.go │ │ │ ├── fcntl_darwin.go │ │ │ ├── fcntl_linux_32bit.go │ │ │ ├── fdset.go │ │ │ ├── gccgo.go │ │ │ ├── gccgo_c.c │ │ │ ├── gccgo_linux_amd64.go │ │ │ ├── ifreq_linux.go │ │ │ ├── ioctl_linux.go │ │ │ ├── ioctl_signed.go │ │ │ ├── ioctl_unsigned.go │ │ │ ├── ioctl_zos.go │ │ │ ├── mkall.sh │ │ │ ├── mkerrors.sh │ │ │ ├── mmap_nomremap.go │ │ │ ├── mremap.go │ │ │ ├── pagesize_unix.go │ │ │ ├── pledge_openbsd.go │ │ │ ├── ptrace_darwin.go │ │ │ ├── ptrace_ios.go │ │ │ ├── race.go │ │ │ ├── race0.go │ │ │ ├── readdirent_getdents.go │ │ │ ├── readdirent_getdirentries.go │ │ │ ├── sockcmsg_dragonfly.go │ │ │ ├── sockcmsg_linux.go │ │ │ ├── sockcmsg_unix.go │ │ │ ├── sockcmsg_unix_other.go │ │ │ ├── sockcmsg_zos.go │ │ │ ├── symaddr_zos_s390x.s │ │ │ ├── syscall.go │ │ │ ├── syscall_aix.go │ │ │ ├── syscall_aix_ppc.go │ │ │ ├── syscall_aix_ppc64.go │ │ │ ├── syscall_bsd.go │ │ │ ├── syscall_darwin.go │ │ │ ├── syscall_darwin_amd64.go │ │ │ ├── syscall_darwin_arm64.go │ │ │ ├── syscall_darwin_libSystem.go │ │ │ ├── syscall_dragonfly.go │ │ │ ├── syscall_dragonfly_amd64.go │ │ │ ├── syscall_freebsd.go │ │ │ ├── syscall_freebsd_386.go │ │ │ ├── syscall_freebsd_amd64.go │ │ │ ├── syscall_freebsd_arm.go │ │ │ ├── syscall_freebsd_arm64.go │ │ │ ├── syscall_freebsd_riscv64.go │ │ │ ├── syscall_hurd.go │ │ │ ├── syscall_hurd_386.go │ │ │ ├── syscall_illumos.go │ │ │ ├── syscall_linux.go │ │ │ ├── syscall_linux_386.go │ │ │ ├── syscall_linux_alarm.go │ │ │ ├── syscall_linux_amd64.go │ │ │ ├── syscall_linux_amd64_gc.go │ │ │ ├── syscall_linux_arm.go │ │ │ ├── syscall_linux_arm64.go │ │ │ ├── syscall_linux_gc.go │ │ │ ├── syscall_linux_gc_386.go │ │ │ ├── syscall_linux_gc_arm.go │ │ │ ├── syscall_linux_gccgo_386.go │ │ │ ├── syscall_linux_gccgo_arm.go │ │ │ ├── syscall_linux_loong64.go │ │ │ ├── syscall_linux_mips64x.go │ │ │ ├── syscall_linux_mipsx.go │ │ │ ├── syscall_linux_ppc.go │ │ │ ├── syscall_linux_ppc64x.go │ │ │ ├── syscall_linux_riscv64.go │ │ │ ├── syscall_linux_s390x.go │ │ │ ├── syscall_linux_sparc64.go │ │ │ ├── syscall_netbsd.go │ │ │ ├── syscall_netbsd_386.go │ │ │ ├── syscall_netbsd_amd64.go │ │ │ ├── syscall_netbsd_arm.go │ │ │ ├── syscall_netbsd_arm64.go │ │ │ ├── syscall_openbsd.go │ │ │ ├── syscall_openbsd_386.go │ │ │ ├── syscall_openbsd_amd64.go │ │ │ ├── syscall_openbsd_arm.go │ │ │ ├── syscall_openbsd_arm64.go │ │ │ ├── syscall_openbsd_libc.go │ │ │ ├── syscall_openbsd_mips64.go │ │ │ ├── syscall_openbsd_ppc64.go │ │ │ ├── syscall_openbsd_riscv64.go │ │ │ ├── syscall_solaris.go │ │ │ ├── syscall_solaris_amd64.go │ │ │ ├── syscall_unix.go │ │ │ ├── syscall_unix_gc.go │ │ │ ├── syscall_unix_gc_ppc64x.go │ │ │ ├── syscall_zos_s390x.go │ │ │ ├── sysvshm_linux.go │ │ │ ├── sysvshm_unix.go │ │ │ ├── sysvshm_unix_other.go │ │ │ ├── timestruct.go │ │ │ ├── unveil_openbsd.go │ │ │ ├── xattr_bsd.go │ │ │ ├── zerrors_aix_ppc.go │ │ │ ├── zerrors_aix_ppc64.go │ │ │ ├── zerrors_darwin_amd64.go │ │ │ ├── zerrors_darwin_arm64.go │ │ │ ├── zerrors_dragonfly_amd64.go │ │ │ ├── zerrors_freebsd_386.go │ │ │ ├── zerrors_freebsd_amd64.go │ │ │ ├── zerrors_freebsd_arm.go │ │ │ ├── zerrors_freebsd_arm64.go │ │ │ ├── zerrors_freebsd_riscv64.go │ │ │ ├── zerrors_linux.go │ │ │ ├── zerrors_linux_386.go │ │ │ ├── zerrors_linux_amd64.go │ │ │ ├── zerrors_linux_arm.go │ │ │ ├── zerrors_linux_arm64.go │ │ │ ├── zerrors_linux_loong64.go │ │ │ ├── zerrors_linux_mips.go │ │ │ ├── zerrors_linux_mips64.go │ │ │ ├── zerrors_linux_mips64le.go │ │ │ ├── zerrors_linux_mipsle.go │ │ │ ├── zerrors_linux_ppc.go │ │ │ ├── zerrors_linux_ppc64.go │ │ │ ├── zerrors_linux_ppc64le.go │ │ │ ├── zerrors_linux_riscv64.go │ │ │ ├── zerrors_linux_s390x.go │ │ │ ├── zerrors_linux_sparc64.go │ │ │ ├── zerrors_netbsd_386.go │ │ │ ├── zerrors_netbsd_amd64.go │ │ │ ├── zerrors_netbsd_arm.go │ │ │ ├── zerrors_netbsd_arm64.go │ │ │ ├── zerrors_openbsd_386.go │ │ │ ├── zerrors_openbsd_amd64.go │ │ │ ├── zerrors_openbsd_arm.go │ │ │ ├── zerrors_openbsd_arm64.go │ │ │ ├── zerrors_openbsd_mips64.go │ │ │ ├── zerrors_openbsd_ppc64.go │ │ │ ├── zerrors_openbsd_riscv64.go │ │ │ ├── zerrors_solaris_amd64.go │ │ │ ├── zerrors_zos_s390x.go │ │ │ ├── zptrace_armnn_linux.go │ │ │ ├── zptrace_linux_arm64.go │ │ │ ├── zptrace_mipsnn_linux.go │ │ │ ├── zptrace_mipsnnle_linux.go │ │ │ ├── zptrace_x86_linux.go │ │ │ ├── zsymaddr_zos_s390x.s │ │ │ ├── zsyscall_aix_ppc.go │ │ │ ├── zsyscall_aix_ppc64.go │ │ │ ├── zsyscall_aix_ppc64_gc.go │ │ │ ├── zsyscall_aix_ppc64_gccgo.go │ │ │ ├── zsyscall_darwin_amd64.go │ │ │ ├── zsyscall_darwin_amd64.s │ │ │ ├── zsyscall_darwin_arm64.go │ │ │ ├── zsyscall_darwin_arm64.s │ │ │ ├── zsyscall_dragonfly_amd64.go │ │ │ ├── zsyscall_freebsd_386.go │ │ │ ├── zsyscall_freebsd_amd64.go │ │ │ ├── zsyscall_freebsd_arm.go │ │ │ ├── zsyscall_freebsd_arm64.go │ │ │ ├── zsyscall_freebsd_riscv64.go │ │ │ ├── zsyscall_illumos_amd64.go │ │ │ ├── zsyscall_linux.go │ │ │ ├── zsyscall_linux_386.go │ │ │ ├── zsyscall_linux_amd64.go │ │ │ ├── zsyscall_linux_arm.go │ │ │ ├── zsyscall_linux_arm64.go │ │ │ ├── zsyscall_linux_loong64.go │ │ │ ├── zsyscall_linux_mips.go │ │ │ ├── zsyscall_linux_mips64.go │ │ │ ├── zsyscall_linux_mips64le.go │ │ │ ├── zsyscall_linux_mipsle.go │ │ │ ├── zsyscall_linux_ppc.go │ │ │ ├── zsyscall_linux_ppc64.go │ │ │ ├── zsyscall_linux_ppc64le.go │ │ │ ├── zsyscall_linux_riscv64.go │ │ │ ├── zsyscall_linux_s390x.go │ │ │ ├── zsyscall_linux_sparc64.go │ │ │ ├── zsyscall_netbsd_386.go │ │ │ ├── zsyscall_netbsd_amd64.go │ │ │ ├── zsyscall_netbsd_arm.go │ │ │ ├── zsyscall_netbsd_arm64.go │ │ │ ├── zsyscall_openbsd_386.go │ │ │ ├── zsyscall_openbsd_386.s │ │ │ ├── zsyscall_openbsd_amd64.go │ │ │ ├── zsyscall_openbsd_amd64.s │ │ │ ├── zsyscall_openbsd_arm.go │ │ │ ├── zsyscall_openbsd_arm.s │ │ │ ├── zsyscall_openbsd_arm64.go │ │ │ ├── zsyscall_openbsd_arm64.s │ │ │ ├── zsyscall_openbsd_mips64.go │ │ │ ├── zsyscall_openbsd_mips64.s │ │ │ ├── zsyscall_openbsd_ppc64.go │ │ │ ├── zsyscall_openbsd_ppc64.s │ │ │ ├── zsyscall_openbsd_riscv64.go │ │ │ ├── zsyscall_openbsd_riscv64.s │ │ │ ├── zsyscall_solaris_amd64.go │ │ │ ├── zsyscall_zos_s390x.go │ │ │ ├── zsysctl_openbsd_386.go │ │ │ ├── zsysctl_openbsd_amd64.go │ │ │ ├── zsysctl_openbsd_arm.go │ │ │ ├── zsysctl_openbsd_arm64.go │ │ │ ├── zsysctl_openbsd_mips64.go │ │ │ ├── zsysctl_openbsd_ppc64.go │ │ │ ├── zsysctl_openbsd_riscv64.go │ │ │ ├── zsysnum_darwin_amd64.go │ │ │ ├── zsysnum_darwin_arm64.go │ │ │ ├── zsysnum_dragonfly_amd64.go │ │ │ ├── zsysnum_freebsd_386.go │ │ │ ├── zsysnum_freebsd_amd64.go │ │ │ ├── zsysnum_freebsd_arm.go │ │ │ ├── zsysnum_freebsd_arm64.go │ │ │ ├── zsysnum_freebsd_riscv64.go │ │ │ ├── zsysnum_linux_386.go │ │ │ ├── zsysnum_linux_amd64.go │ │ │ ├── zsysnum_linux_arm.go │ │ │ ├── zsysnum_linux_arm64.go │ │ │ ├── zsysnum_linux_loong64.go │ │ │ ├── zsysnum_linux_mips.go │ │ │ ├── zsysnum_linux_mips64.go │ │ │ ├── zsysnum_linux_mips64le.go │ │ │ ├── zsysnum_linux_mipsle.go │ │ │ ├── zsysnum_linux_ppc.go │ │ │ ├── zsysnum_linux_ppc64.go │ │ │ ├── zsysnum_linux_ppc64le.go │ │ │ ├── zsysnum_linux_riscv64.go │ │ │ ├── zsysnum_linux_s390x.go │ │ │ ├── zsysnum_linux_sparc64.go │ │ │ ├── zsysnum_netbsd_386.go │ │ │ ├── zsysnum_netbsd_amd64.go │ │ │ ├── zsysnum_netbsd_arm.go │ │ │ ├── zsysnum_netbsd_arm64.go │ │ │ ├── zsysnum_openbsd_386.go │ │ │ ├── zsysnum_openbsd_amd64.go │ │ │ ├── zsysnum_openbsd_arm.go │ │ │ ├── zsysnum_openbsd_arm64.go │ │ │ ├── zsysnum_openbsd_mips64.go │ │ │ ├── zsysnum_openbsd_ppc64.go │ │ │ ├── zsysnum_openbsd_riscv64.go │ │ │ ├── zsysnum_zos_s390x.go │ │ │ ├── ztypes_aix_ppc.go │ │ │ ├── ztypes_aix_ppc64.go │ │ │ ├── ztypes_darwin_amd64.go │ │ │ ├── ztypes_darwin_arm64.go │ │ │ ├── ztypes_dragonfly_amd64.go │ │ │ ├── ztypes_freebsd_386.go │ │ │ ├── ztypes_freebsd_amd64.go │ │ │ ├── ztypes_freebsd_arm.go │ │ │ ├── ztypes_freebsd_arm64.go │ │ │ ├── ztypes_freebsd_riscv64.go │ │ │ ├── ztypes_linux.go │ │ │ ├── ztypes_linux_386.go │ │ │ ├── ztypes_linux_amd64.go │ │ │ ├── ztypes_linux_arm.go │ │ │ ├── ztypes_linux_arm64.go │ │ │ ├── ztypes_linux_loong64.go │ │ │ ├── ztypes_linux_mips.go │ │ │ ├── ztypes_linux_mips64.go │ │ │ ├── ztypes_linux_mips64le.go │ │ │ ├── ztypes_linux_mipsle.go │ │ │ ├── ztypes_linux_ppc.go │ │ │ ├── ztypes_linux_ppc64.go │ │ │ ├── ztypes_linux_ppc64le.go │ │ │ ├── ztypes_linux_riscv64.go │ │ │ ├── ztypes_linux_s390x.go │ │ │ ├── ztypes_linux_sparc64.go │ │ │ ├── ztypes_netbsd_386.go │ │ │ ├── ztypes_netbsd_amd64.go │ │ │ ├── ztypes_netbsd_arm.go │ │ │ ├── ztypes_netbsd_arm64.go │ │ │ ├── ztypes_openbsd_386.go │ │ │ ├── ztypes_openbsd_amd64.go │ │ │ ├── ztypes_openbsd_arm.go │ │ │ ├── ztypes_openbsd_arm64.go │ │ │ ├── ztypes_openbsd_mips64.go │ │ │ ├── ztypes_openbsd_ppc64.go │ │ │ ├── ztypes_openbsd_riscv64.go │ │ │ ├── ztypes_solaris_amd64.go │ │ │ └── ztypes_zos_s390x.go │ │ └── windows/ │ │ ├── aliases.go │ │ ├── dll_windows.go │ │ ├── env_windows.go │ │ ├── eventlog.go │ │ ├── exec_windows.go │ │ ├── memory_windows.go │ │ ├── mkerrors.bash │ │ ├── mkknownfolderids.bash │ │ ├── mksyscall.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── security_windows.go │ │ ├── service.go │ │ ├── setupapi_windows.go │ │ ├── str.go │ │ ├── syscall.go │ │ ├── syscall_windows.go │ │ ├── types_windows.go │ │ ├── types_windows_386.go │ │ ├── types_windows_amd64.go │ │ ├── types_windows_arm.go │ │ ├── types_windows_arm64.go │ │ ├── zerrors_windows.go │ │ ├── zknownfolderids_windows.go │ │ └── zsyscall_windows.go │ ├── term/ │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── README.md │ │ ├── codereview.cfg │ │ ├── term.go │ │ ├── term_plan9.go │ │ ├── term_unix.go │ │ ├── term_unix_bsd.go │ │ ├── term_unix_other.go │ │ ├── term_unsupported.go │ │ ├── term_windows.go │ │ └── terminal.go │ ├── text/ │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── encoding/ │ │ │ ├── encoding.go │ │ │ └── internal/ │ │ │ └── identifier/ │ │ │ ├── identifier.go │ │ │ └── mib.go │ │ └── transform/ │ │ └── transform.go │ └── xerrors/ │ ├── LICENSE │ ├── PATENTS │ ├── README │ ├── adaptor.go │ ├── codereview.cfg │ ├── doc.go │ ├── errors.go │ ├── fmt.go │ ├── format.go │ ├── frame.go │ ├── internal/ │ │ └── internal.go │ └── wrap.go ├── gopkg.in/ │ └── yaml.v3/ │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── apic.go │ ├── decode.go │ ├── emitterc.go │ ├── encode.go │ ├── parserc.go │ ├── readerc.go │ ├── resolve.go │ ├── scannerc.go │ ├── sorter.go │ ├── writerc.go │ ├── yaml.go │ ├── yamlh.go │ └── yamlprivateh.go └── modules.txt ================================================ FILE CONTENTS ================================================ ================================================ FILE: .circleci/config.yml ================================================ version: 2 # global environment variables # '& ' syntax is a YAML thing for creating referenceable documents env-shared: &env-shared environment: GOFLAGS: "-mod=vendor" # build steps shared across different jobs build-shared: &build-shared steps: - checkout - run: name: Run gofmt -s command: | if [ $(find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \;|wc -l) -gt 0 ]; then find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \; exit 1; fi - restore_cache: keys: - pkg-cache-{{ checksum "go.sum" }}-v5 - run: name: Run tests command: | go test -v ./... - run: name: Get gox # -mod=vendor doesn't work with go get while in source tree with go.mod in it working_directory: "/tmp" command: | go get github.com/mitchellh/gox - run: name: Compile project on every platform command: | gox -parallel 10 -os "linux freebsd" -osarch "darwin/i386 darwin/amd64 windows/i386 windows/amd64" - save_cache: key: pkg-cache-{{ checksum "go.sum" }}-v5 paths: - ~/.cache/go-build jobs: # matrix build jobs run on every commit # building on versioned Go and the latest one # '<<: *' syntax is a YAML thing for including documents "golang:1.17": <<: *env-shared <<: *build-shared docker: - image: circleci/golang:1.17 "golang:latest": <<: *env-shared <<: *build-shared docker: - image: circleci/golang:latest # release job run only when a commit is tagged release: <<: *env-shared docker: - image: circleci/golang:1.17 steps: - checkout - run: name: Run gorelease command: | curl -sL https://git.io/goreleaser | bash - run: name: Update docs command: | ./.circleci/update_docs.sh workflows: version: 2 build: jobs: # build matrix - "golang:1.17" - "golang:latest" release: jobs: - release: filters: tags: only: /v[0-9]+(\.[0-9]+)*/ branches: ignore: /.*/ ================================================ FILE: .circleci/install_snapcraft.sh ================================================ #!/bin/bash sudo apt-get update sudo apt-get install -y \ squashfs-tools \ python3-pip \ python3-apt \ python3-debian \ python3-pyelftools \ python3-yaml \ python3-tabulate \ python3-jsonschema \ python3-click \ python3-pymacaroons \ python3-simplejson \ python3-progressbar \ python3-requests-toolbelt \ python3-requests-unixsocket sudo pip3 install \ petname \ snapcraft snapcraft --version ================================================ FILE: .circleci/update_docs.sh ================================================ #!/bin/bash set -ex # see if we have a new cheatsheet # if other docs end up being generated automatically we can chuck in the relevant scripts here go run scripts/generate_cheatsheet.go # commit and push if we have a change if [[ -z $(git status -s -- docs/*) ]]; then echo "no changes to commit in the docs directory" exit 0 fi echo "committing updated docs" git config user.name "lazydocker bot" git config user.email "jessedduffield@gmail.com" git checkout master # just making sure we're up to date git pull git add docs/* git commit -m "update docs" git push -u origin master ================================================ FILE: .claude/settings.json ================================================ { "hooks": { "PostToolUse": [ { "matcher": "Edit|Write", "hooks": [ { "type": "command", "command": "jq -r '.tool_input.file_path // empty' | xargs -I{} gofumpt -w {}" } ] } ] } } ================================================ FILE: .devcontainer/Dockerfile ================================================ FROM mcr.microsoft.com/devcontainers/go:bullseye RUN apt-get update && apt-get install -y \ curl \ git \ && rm -rf /var/lib/apt/lists/* RUN go install mvdan.cc/gofumpt@latest ENV PATH="/root/go/bin:${PATH}" RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.50.0 RUN golangci-lint --version ================================================ FILE: .devcontainer/devcontainer.json ================================================ { "name": "Docker in Docker", "build": { "dockerfile": "./Dockerfile", "context": "." }, "features": { "ghcr.io/devcontainers/features/common-utils:1": { "installZsh": "true", "upgradePackages": "false", "uid": "1000", "gid": "1000", "installOhMyZsh": "true", "nonFreePackages": "true" }, "ghcr.io/devcontainers/features/docker-from-docker:1": { "version": "latest", "enableNonRootDocker": "true", "moby": "true" }, "ghcr.io/devcontainers/features/git:1": {}, "ghcr.io/devcontainers/features/go:1": {} }, // Configure tool-specific properties. "customizations": { // Configure properties specific to VS Code. "vscode": { // Set *default* container specific settings.json values on container create. "settings": { "go.toolsManagement.checkForUpdates": "local", "go.useLanguageServer": true, "go.gopath": "~/go", "[go]": { "editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.organizeImports": true } }, "go.lintTool": "golangci-lint", "gopls": { "formatting.gofumpt": true, "usePlaceholders": false // add parameter placeholders when completing a function }, "files.eol": "\n" }, // Add the IDs of extensions you want installed when the container is created. "extensions": [ "golang.Go" ] } } // TODO: make this work. // "postStartCommand": "echo \"alias gr=\\\"go run /workspaces/lazydocker/main.go\\\"\" >> ~/.zhsrc" } ================================================ FILE: .dockerignore ================================================ .circleci .github docs test .gitignore .goreleaser.yml *.md coverage.txt Dockerfile LICENSE test.sh .git ================================================ FILE: .github/FUNDING.yml ================================================ # These are supported funding model platforms github: [jesseduffield] custom: ['https://donorbox.org/lazygit'] ================================================ FILE: .github/ISSUE_TEMPLATE/bug_report.md ================================================ --- name: Bug report about: Create a report to help us improve title: '' labels: bug assignees: '' --- **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error **Expected behaviour** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - OS: [e.g. Windows] - Lazydocker Version [e.g. v0.1.45] - The last commit id if you built project from sources (run : ```git rev-parse HEAD```) **Additional context** Add any other context about the problem here. ================================================ FILE: .github/ISSUE_TEMPLATE/discussion.md ================================================ --- name: Discussion about: For starting a discussion title: '' labels: discussion assignees: '' --- ================================================ FILE: .github/ISSUE_TEMPLATE/feature_request.md ================================================ --- name: Feature request about: Suggest an idea for this project title: '' labels: enhancement assignees: '' --- **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] **Describe the solution you'd like** A clear and concise description of what you want to happen. **Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered. **Additional context** Add any other context or screenshots about the feature request here. ================================================ FILE: .github/workflows/cd.yml ================================================ name: Continuous Delivery on: push: tags: - "v*" jobs: goreleaser: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Unshallow repo run: git fetch --prune --unshallow - name: Setup Go uses: actions/setup-go@v6 with: go-version: 1.24.x - name: Run goreleaser uses: goreleaser/goreleaser-action@v1 with: distribution: goreleaser version: v1.17.2 args: release --clean env: GITHUB_TOKEN: ${{secrets.TOKEN_GITHUB}} ================================================ FILE: .github/workflows/ci.yml ================================================ name: Continuous Integration env: GO_VERSION: 1.24 on: push: branches: - master pull_request: jobs: ci: strategy: fail-fast: false matrix: os: - ubuntu-latest - windows-latest name: ci - ${{matrix.os}} runs-on: ${{matrix.os}} env: GOFLAGS: -mod=vendor steps: - name: Checkout code uses: actions/checkout@v2 - name: Setup Go uses: actions/setup-go@v6 with: go-version: 1.24.x - name: Cache build uses: actions/cache@v4 with: path: ~/.cache/go-build key: ${{runner.os}}-go-${{hashFiles('**/go.sum')}}-test restore-keys: | ${{runner.os}}-go- - name: Test code run: | bash ./test.sh build: runs-on: ubuntu-latest env: GOFLAGS: -mod=vendor GOARCH: amd64 steps: - name: Checkout code uses: actions/checkout@v2 - name: Setup Go uses: actions/setup-go@v6 with: go-version: 1.24.x - name: Cache build uses: actions/cache@v4 with: path: ~/.cache/go-build key: ${{runner.os}}-go-${{hashFiles('**/go.sum')}}-build restore-keys: | ${{runner.os}}-go- - name: Build linux binary run: | GOOS=linux go build - name: Build windows binary run: | GOOS=windows go build - name: Build darwin binary run: | GOOS=darwin go build check-codebase: runs-on: ubuntu-latest env: GOFLAGS: -mod=vendor GOARCH: amd64 steps: - name: Checkout code uses: actions/checkout@v2 - name: Setup Go uses: actions/setup-go@v6 with: go-version: 1.24.x - name: Cache build uses: actions/cache@v4 with: path: | ~/.cache/go-build ~/go/pkg/mod key: ${{runner.os}}-go-${{hashFiles('**/go.sum')}}-build restore-keys: | ${{runner.os}}-go- - name: Check Cheatsheet run: | go run scripts/cheatsheet/main.go check - name: Check Vendor Directory # ensure our vendor directory matches up with our go modules run: | go mod vendor && git diff --exit-code || (echo "Unexpected change to vendor directory. Run 'go mod vendor' locally and commit the changes" && exit 1) lint: runs-on: ubuntu-latest env: GOFLAGS: -mod=vendor steps: - name: Checkout code uses: actions/checkout@v2 - name: Setup Go uses: actions/setup-go@v6 with: go-version: 1.24.x - name: Cache build uses: actions/cache@v4 with: path: ~/.cache/go-build key: ${{runner.os}}-go-${{hashFiles('**/go.sum')}}-test restore-keys: | ${{runner.os}}-go- - name: Lint uses: golangci/golangci-lint-action@v3.1.0 with: version: latest - name: Format code run: | if [ $(find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \;|wc -l) -gt 0 ]; then find . ! -path "./vendor/*" -name "*.go" -exec gofmt -s -d {} \; exit 1 fi - name: errors run: golangci-lint run if: ${{ failure() }} ================================================ FILE: .github/workflows/sponsors.yml ================================================ # see https://github.com/JamesIves/github-sponsors-readme-action name: Generate Sponsors README on: push: branches: - master jobs: deploy: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ uses: actions/checkout@v3 - name: Generate Sponsors 💖 uses: JamesIves/github-sponsors-readme-action@v1.2.2 with: token: ${{ secrets.TOKEN_GITHUB }} file: "README.md" if: ${{ github.repository == 'jesseduffield/lazydocker' }} - name: Create Pull Request 🚀 uses: peter-evans/create-pull-request@v6 with: commit-message: "README.md: Update Sponsors" title: "README.md: Update Sponsors" author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" labels: "ignore-for-release" delete-branch: true ================================================ FILE: .gitignore ================================================ lazydocker* TODO.md Lazydocker.code-workspace .vscode .idea ================================================ FILE: .golangci.yml ================================================ linters: enable: - gofumpt - thelper - goimports - tparallel - wastedassign - unparam - prealloc - unconvert - exhaustive - makezero - nakedret # - goconst # TODO: enable and fix issues fast: false linters-settings: exhaustive: default-signifies-exhaustive: true nakedret: # the gods will judge me but I just don't like naked returns at all max-func-lines: 0 run: go: '1.21' timeout: 10m ================================================ FILE: .goreleaser.yml ================================================ # This is an example goreleaser.yaml file with some sane defaults. # Make sure to check the documentation at http://goreleaser.com env: - CGO_ENABLED=0 - GOFLAGS=-mod=vendor - GO111MODULE=auto builds: - id: binary goos: # - freebsd - windows - darwin - linux goarch: - amd64 - arm - arm64 - 386 goarm: - 6 - 7 ldflags: - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.buildSource=binaryRelease - id: snap goos: - linux goarch: - amd64 - arm - arm64 - 386 ldflags: - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.buildSource=snap archives: - builds: - binary replacements: darwin: Darwin linux: Linux windows: Windows 386: x86 amd64: x86_64 format_overrides: - goos: windows format: zip checksum: name_template: "checksums.txt" snapshot: name_template: "{{ .Tag }}-next" changelog: sort: asc filters: exclude: - "^docs:" - "^test:" - "^bump" brews: - tap: owner: jesseduffield name: homebrew-lazydocker # Your app's homepage. # Default is empty. homepage: "https://github.com/jesseduffield/lazydocker/" # Your app's description. # Default is empty. description: "A simple terminal UI for docker, written in Go" #snapcrafts: # - builds: # - snap # # replacements: # linux: Linux # 386: x86 # amd64: x86_64 # # # Wether to publish the snap to the snapcraft store. # # Remember you need to `snapcraft login` first. # # Defaults to false. # publish: false # # # Single-line elevator pitch for your amazing snap. # # 79 char long at most. # summary: The lazier way to manage everything docker # # # This the description of your snap. You have a paragraph or two to tell the # # most important story about your snap. Keep it under 100 words though, # # we live in tweetspace and your description wants to look good in the snap # # store. # description: 'A simple terminal UI for docker, written in Go' # # # A guardrail to prevent you from releasing a snap to all your users before # # it is ready. # # `devel` will let you release only to the `edge` and `beta` channels in the # # store. `stable` will let you release also to the `candidate` and `stable` # # channels. More info about channels here: # # https://snapcraft.io/docs/reference/channels # # TODO: reset to `stable` when we've been manually reviewed: https://forum.snapcraft.io/t/request-for-classic-confinement-for-lazydocker/12155 # grade: devel # # # Snaps can be setup to follow three different confinement policies: # # `strict`, `devmode` and `classic`. A strict confinement where the snap # # can only read and write in its own namespace is recommended. Extra # # permissions for strict snaps can be declared as `plugs` for the app, which # # are explained later. More info about confinement here: # # https://snapcraft.io/docs/reference/confinement # confinement: classic # # # Your app's license, based on SPDX license expressions: https://spdx.org/licenses # # Default is empty. # license: MIT # # # # Each binary built by GoReleaser is an app inside the snap. In this section # # # you can declare extra details for those binaries. It is optional. # # apps: # # # # The name of the app must be the same name as the binary built or the snapcraft name. # # lazydocker: # # # # If your app requires extra permissions to work outside of its default # # # confined space, declare them here. # # # You can read the documentation about the available plugs and the # # # things they allow: # # # https://snapcraft.io/docs/reference/interfaces. # # plugs: [] ================================================ FILE: CODE-OF-CONDUCT.md ================================================ # Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism * Focusing on what is best for the community * Showing empathy towards other community members Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the [project leader](https://github.com/jesseduffield). All complaints will be reviewed and investigated and will result in a response that complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html [homepage]: https://www.contributor-covenant.org ================================================ FILE: CONTRIBUTING.md ================================================ # Contributing Wanna learn Go? This is the project for you! When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change. ## So all code changes happen through Pull Requests Pull requests are the best way to propose changes to the codebase. We actively welcome your pull requests: 1. Fork the repo and create your branch from `master`. 2. If you've added code that should be tested, add tests. 3. If you've added code that need documentation, update the documentation. 4. Make sure your code follows the [effective go](https://golang.org/doc/effective_go.html) guidelines as much as possible. 5. Be sure to test your modifications. 6. Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). 7. Issue that pull request! ## Vendoring We use a vendor directory to store all dependent files. A vendor directory ensures a single source of truth, so that it's clear in each PR what changes are being made, as well as allowing quick testing-out of ideas across various dependent package, or searching the files in your dependent packages via your editor. BUT this currently comes at a cost. I have begrudgingly migrated from dep to go modules, and go modules are still working on their support for vendor directories: https://github.com/golang/go/issues/27227 https://github.com/golang/go/issues/30240 This means there is a little overhead in working with the code base. If you need to make changes to dependent packages, you have two approaches you can take: # 1) a) Set `export GOFLAGS=-mod=vendor` in your ~/.bashrc file b) use `go run main.go` to run lazydocker c) if you need to bump a dependency e.g. jesseduffield/gocui, use ``` GOFLAGS= go get -u github.com/jesseduffield/gocui@master go mod tidy go mod vendor ``` # 2) a) don't worry about your ~/.bashrc file b) use `go run -mod=vendor main.go` to run lazydocker c) if you need to bump a dependency e.g. jesseduffield/gocui, use ``` go get -u github.com/jesseduffield/gocui@master go mod tidy go mod vendor ``` Hopefully this will be much more streamlined in the future :) ## Code of conduct Please note by participating in this project, you agree to abide by the [code of conduct]. [code of conduct]: https://github.com/jesseduffield/lazydocker/blob/master/CODE-OF-CONDUCT.md ## Any contributions you make will be under the MIT Software License In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern. ## Report bugs using Github's [issues](https://github.com/jesseduffield/lazydocker/issues) We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/jesseduffield/lazydocker/issues/new); it's that easy! ================================================ FILE: Dockerfile ================================================ ARG BASE_IMAGE_BUILDER=golang ARG ALPINE_VERSION=3.20 ARG GO_VERSION=1.23 FROM ${BASE_IMAGE_BUILDER}:${GO_VERSION}-alpine${ALPINE_VERSION} AS builder ARG GOARCH=amd64 ARG GOARM ARG VERSION ARG VCS_REF WORKDIR /tmp/gobuild COPY ./ . RUN CGO_ENABLED=0 GOOS=linux GOARCH=${GOARCH} GOARM=${GOARM} \ go build -a -mod=vendor \ -ldflags="-s -w \ -X main.commit=${VCS_REF} \ -X main.version=${VERSION} \ -X main.buildSource=Docker" FROM ${BASE_IMAGE_BUILDER}:${GO_VERSION}-alpine${ALPINE_VERSION} AS docker-builder ARG GOARCH=amd64 ARG GOARM ARG DOCKER_VERSION=v27.0.3 RUN apk add -U -q --progress --no-cache git bash coreutils gcc musl-dev WORKDIR /go/src/github.com/docker/cli RUN git clone --branch ${DOCKER_VERSION} --single-branch --depth 1 https://github.com/docker/cli.git . > /dev/null 2>&1 ENV CGO_ENABLED=0 \ GOARCH=${GOARCH} \ GOARM=${GOARM} \ DISABLE_WARN_OUTSIDE_CONTAINER=1 RUN ./scripts/build/binary RUN rm build/docker && mv build/docker-linux-* build/docker FROM scratch ARG BUILD_DATE ARG VCS_REF ARG VERSION LABEL \ org.opencontainers.image.authors="jessedduffield@gmail.com" \ org.opencontainers.image.created=$BUILD_DATE \ org.opencontainers.image.version=$VERSION \ org.opencontainers.image.revision=$VCS_REF \ org.opencontainers.image.url="https://github.com/jesseduffield/lazydocker" \ org.opencontainers.image.documentation="https://github.com/jesseduffield/lazydocker" \ org.opencontainers.image.source="https://github.com/jesseduffield/lazydocker" \ org.opencontainers.image.title="lazydocker" \ org.opencontainers.image.description="The lazier way to manage everything docker" ENTRYPOINT [ "/bin/lazydocker" ] COPY --from=docker-builder /go/src/github.com/docker/cli/build/docker /bin/docker COPY --from=builder /tmp/gobuild/lazydocker /bin/lazydocker ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2018 Jesse Duffield 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. ================================================ FILE: README.md ================================================
Special thanks to:

Warp
Warp, the intelligent terminal
Available for MacOS and Linux
Visit warp.dev to learn more.


Tuple
Tuple, the premier screen sharing app for developers on macOS and Windows.



Subble
Click here to learn more


A simple terminal UI for both docker and docker-compose, written in Go with the [gocui](https://github.com/jroimartin/gocui 'gocui') library. ![CI](https://github.com/jesseduffield/lazygit/workflows/Continuous%20Integration/badge.svg) [![Go Report Card](https://goreportcard.com/badge/github.com/jesseduffield/lazydocker)](https://goreportcard.com/report/github.com/jesseduffield/lazydocker) [![GolangCI](https://golangci.com/badges/github.com/jesseduffield/lazydocker.svg)](https://golangci.com) [![GoDoc](https://godoc.org/github.com/jesseduffield/lazydocker?status.svg)](http://godoc.org/github.com/jesseduffield/lazydocker) ![GitHub repo size](https://img.shields.io/github/repo-size/jesseduffield/lazydocker) [![GitHub Releases](https://img.shields.io/github/downloads/jesseduffield/lazydocker/total)](https://github.com/jesseduffield/lazydocker/releases) [![GitHub tag](https://img.shields.io/github/tag/jesseduffield/lazydocker.svg)](https://github.com/jesseduffield/lazydocker/releases/latest) [![homebrew](https://img.shields.io/homebrew/v/lazydocker)](https://github.com/Homebrew/homebrew-core/blob/master/Formula/lazydocker.rb) ![Gif](/docs/resources/demo3.gif) [Demo](https://youtu.be/NICqQPxwJWw) ## Sponsors

Maintenance of this project is made possible by all the contributors and sponsors. If you'd like to sponsor this project and have your avatar or company logo appear below click here. 💙

Mark LussierDean HerbertPeter BjorklundReilly WoodOliver GüntherPawan DhananjayBartłomiej DachDavid KarlssonCarsten GehlingCEUKAkos PutzXeteraHolden LucasChau TranmatejciktheAverageDev (Luca Tumedei)Ivan ZaitsevNicholas CloudLightQuantumGabriel SaillardAliaksandr StelmachonakBurgy BenjaminJoe KlemmerTobias LütkeBen BeaumontHollyJames SantucciJeff ForcierMaciej T. NowakFarzad MajidfayyazYuryAndreas KurthBraden SteffaniakJordan GillardSebastianGeorge SpanosFrantisek StankoAndy SlezakMartin KockIllarion KoperskiJesse AlamaCodacyBrettJan HeijmansKevin Nowaldsem pruijsOmar Luq Ethan LiBrian MacAskillMaxinbrJan ZenknerVictor AremuIgor RamazanovElliott Maguiren8n - Workflow Automationkaleb allmonJosh ThomasJJFrederick MorlockDarren CraineMaximilian LangenfeldNurzhanDavis BulsGrec MarcsainuMarc Güell SegarraChris OlsenVladimir PopovNeil LambertShaun GarwoodDavid Heinemeier HanssonWayan jimmy

## Elevator Pitch Minor rant incoming: Something's not working? Maybe a service is down. `docker-compose ps`. Yep, it's that microservice that's still buggy. No issue, I'll just restart it: `docker-compose restart`. Okay now let's try again. Oh wait the issue is still there. Hmm. `docker-compose ps`. Right so the service must have just stopped immediately after starting. I probably would have known that if I was reading the log stream, but there is a lot of clutter in there from other services. I could get the logs for just that one service with `docker compose logs --follow myservice` but that dies everytime the service dies so I'd need to run that command every time I restart the service. I could alternatively run `docker-compose up myservice` and in that terminal window if the service is down I could just `up` it again, but now I've got one service hogging a terminal window even after I no longer care about its logs. I guess when I want to reclaim the terminal realestate I can do `ctrl+P,Q`, but... wait, that's not working for some reason. Should I use ctrl+C instead? I can't remember if that closes the foreground process or kills the actual service. What a headache! Memorising docker commands is hard. Memorising aliases is slightly less hard. Keeping track of your containers across multiple terminal windows is near impossible. What if you had all the information you needed in one terminal window with every common command living one keypress away (and the ability to add custom commands as well). Lazydocker's goal is to make that dream a reality. - [Requirements](https://github.com/jesseduffield/lazydocker#requirements) - [Installation](https://github.com/jesseduffield/lazydocker#installation) - [Usage](https://github.com/jesseduffield/lazydocker#usage) - [Keybindings](/docs/keybindings) - [Cool Features](https://github.com/jesseduffield/lazydocker#cool-features) - [Contributing](https://github.com/jesseduffield/lazydocker#contributing) - [Video Tutorial](https://youtu.be/NICqQPxwJWw) - [Config Docs](/docs/Config.md) - [Twitch Stream](https://www.twitch.tv/jesseduffield) - [FAQ](https://github.com/jesseduffield/lazydocker#faq) ## Requirements - Docker >= **29.0.0** (API >= **1.24**) - Docker-Compose >= **1.23.2** (optional) ## Installation ### Homebrew Normally `lazydocker` formula can be found in the Homebrew core but we suggest you to tap our formula to get frequently updated one. It works with Linux, too. **Tap**: ```sh brew install jesseduffield/lazydocker/lazydocker ``` **Core**: ```sh brew install lazydocker ``` ### Scoop (Windows) You can install `lazydocker` using [scoop](https://scoop.sh/): ```sh scoop install lazydocker ``` ### Chocolatey (Windows) You can install `lazydocker` using [Chocolatey](https://chocolatey.org/): ```sh choco install lazydocker ``` ### asdf-vm You can install [asdf-lazydocker plugin](https://github.com/comdotlinux/asdf-lazydocker) using [asdf-vm](https://asdf-vm.com/): #### Setup (Once) ```sh asdf plugin add lazydocker https://github.com/comdotlinux/asdf-lazydocker.git ``` #### For Install / Upgrade ```sh asdf list all lazydocker asdf install lazydocker latest asdf global lazydocker latest ``` ### Binary Release (Linux/OSX/Windows) You can manually download a binary release from [the release page](https://github.com/jesseduffield/lazydocker/releases). Automated install/update, don't forget to always verify what you're piping into bash: ```sh curl https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update_linux.sh | bash ``` The script installs downloaded binary to `$HOME/.local/bin` directory by default, but it can be changed by setting `DIR` environment variable. ### Go Required Go Version >= **1.19** ```sh go install github.com/jesseduffield/lazydocker@latest ``` Required Go version >= **1.8**, <= **1.17** ```sh go get github.com/jesseduffield/lazydocker ``` ### Arch Linux AUR You can install lazydocker using the [AUR](https://aur.archlinux.org/packages/lazydocker) by running: ```sh yay -S lazydocker ``` ### Docker [![Docker Pulls](https://img.shields.io/docker/pulls/lazyteam/lazydocker.svg)](https://hub.docker.com/r/lazyteam/lazydocker) [![Docker Stars](https://img.shields.io/docker/stars/lazyteam/lazydocker.svg)](https://hub.docker.com/r/lazyteam/lazydocker) [![Docker Automated](https://img.shields.io/docker/cloud/automated/lazyteam/lazydocker.svg)](https://hub.docker.com/r/lazyteam/lazydocker) 1.
Click if you have an ARM device

- If you have a ARM 32 bit v6 architecture ```sh docker build -t lazyteam/lazydocker \ --build-arg BASE_IMAGE_BUILDER=arm32v6/golang \ --build-arg GOARCH=arm \ --build-arg GOARM=6 \ https://github.com/jesseduffield/lazydocker.git ``` - If you have a ARM 32 bit v7 architecture ```sh docker build -t lazyteam/lazydocker \ --build-arg BASE_IMAGE_BUILDER=arm32v7/golang \ --build-arg GOARCH=arm \ --build-arg GOARM=7 \ https://github.com/jesseduffield/lazydocker.git ``` - If you have a ARM 64 bit v8 architecture ```sh docker build -t lazyteam/lazydocker \ --build-arg BASE_IMAGE_BUILDER=arm64v8/golang \ --build-arg GOARCH=arm64 \ https://github.com/jesseduffield/lazydocker.git ```

1. Run the container ```sh docker run --rm -it -v \ /var/run/docker.sock:/var/run/docker.sock \ -v /yourpath:/.config/jesseduffield/lazydocker \ lazyteam/lazydocker ``` - Don't forget to change `/yourpath` to an actual path you created to store lazydocker's config - You can also use this [docker-compose.yml](https://github.com/jesseduffield/lazydocker/blob/master/docker-compose.yml) - You might want to create an alias, for example: ```sh echo "alias lzd='docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock -v /yourpath/config:/.config/jesseduffield/lazydocker lazyteam/lazydocker'" >> ~/.zshrc ``` For development, you can build the image using: ```sh git clone https://github.com/jesseduffield/lazydocker.git cd lazydocker docker build -t lazyteam/lazydocker \ --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ --build-arg VCS_REF=`git rev-parse --short HEAD` \ --build-arg VERSION=`git describe --abbrev=0 --tag` \ . ``` If you encounter a compatibility issue with Docker bundled binary, try rebuilding the image with the build argument `--build-arg DOCKER_VERSION="v$(docker -v | cut -d" " -f3 | rev | cut -c 2- | rev)"` so that the bundled docker binary matches your host docker binary version. ### Manual You'll need to [install Go](https://golang.org/doc/install) ``` git clone https://github.com/jesseduffield/lazydocker.git cd lazydocker go install ``` You can also use `go run main.go` to compile and run in one go (pun definitely intended) ## Usage Call `lazydocker` in your terminal. I personally use this a lot so I've made an alias for it like so: ``` echo "alias lzd='lazydocker'" >> ~/.zshrc ``` (you can substitute .zshrc for whatever rc file you're using) - Basic video tutorial [here](https://youtu.be/NICqQPxwJWw). - List of keybindings [here](/docs/keybindings). ## Cool features everything is one keypress away (or one click away! Mouse support FTW): - viewing the state of your docker or docker-compose container environment at a glance - viewing logs for a container/service - viewing ascii graphs of your containers' metrics so that you can not only feel but also look like a developer - customising those graphs to measure nearly any metric you want - attaching to a container/service - restarting/removing/rebuilding containers/services - viewing the ancestor layers of a given image - pruning containers, images, or volumes that are hogging up disk space ## Contributing There is still a lot of work to go! Please check out the [contributing guide](CONTRIBUTING.md). For contributor discussion about things not better discussed here in the repo, join the discord channel ## Donate If you would like to support the development of lazydocker, consider [sponsoring me](https://github.com/sponsors/jesseduffield) (github is matching all donations dollar-for-dollar for 12 months) ## Social If you want to see what I (Jesse) am up to in terms of development, follow me on [twitter](https://twitter.com/DuffieldJesse) or watch me program on [twitch](https://www.twitch.tv/jesseduffield) ## FAQ ### How do I edit my config? By opening lazydocker, clicking on the 'project' panel in the top left, and pressing 'o' (or 'e' if your editor is vim). See [Config Docs](/docs/Config.md) ### How do I get text to wrap in my main panel? In the future I want to make this the default, but for now there are some CPU issues that arise with wrapping. If you want to enable wrapping, use `gui.wrapMainPanel: true` ### How do you select text? Because we support mouse events, you will need to hold option while dragging the mouse to indicate you're trying to select text rather than click on something. Alternatively you can disable mouse events via the `gui.ignoreMouseEvents` config value. Mac Users: See [Issue #190](https://github.com/jesseduffield/lazydocker/issues/190) for other options. ### Why can't I see my container's logs? By default we only show logs from the last hour, so that we're not putting too much strain on the machine. This may be why you can't see logs when you first start lazydocker. This can be overwritten in the config's `commandTemplates` If you are running lazydocker in Docker container, it is a know bug, that you can't see logs or CPU usage. ## Alternatives - [docui](https://github.com/skanehira/docui) - Skanehira beat me to the punch on making a docker terminal UI, so definitely check out that repo as well! I think the two repos can live in harmony though: lazydocker is more about managing existing containers/services, and docui is more about creating and configuring them. - [Portainer](https://github.com/portainer/portainer) - Portainer tries to solve the same problem but it's accessed via your browser rather than your terminal. It also supports docker swarm. - See [Awesome Docker list](https://github.com/veggiemonk/awesome-docker/blob/master/README.md#terminal) for similar tools to work with Docker. ================================================ FILE: config/config.yml ================================================ ================================================ FILE: coverage.txt ================================================ mode: atomic mode: atomic mode: atomic github.com/jesseduffield/lazydocker/pkg/config/app_config.go:341.36,343.16 2 4 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:343.16,344.13 1 0 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:347.2,462.3 1 4 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:479.157,481.16 2 4 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:481.16,483.3 1 0 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:485.2,486.16 2 4 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:486.16,488.3 1 0 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:491.2,491.27 1 4 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:491.27,493.3 1 2 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:495.2,507.23 2 4 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:510.67,512.24 2 8 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:512.24,514.3 1 0 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:515.2,516.32 2 8 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:519.43,521.67 2 4 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:521.67,523.3 1 0 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:524.2,525.24 2 4 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:528.64,532.16 3 4 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:532.16,534.3 1 0 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:536.2,536.20 1 4 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:539.72,543.2 2 4 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:545.78,548.45 2 6 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:548.45,549.25 1 0 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:549.25,551.18 2 0 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:551.18,553.5 1 0 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:554.4,554.16 1 0 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:555.9,557.4 1 0 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:560.2,561.16 2 6 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:561.16,563.3 1 0 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:565.2,565.54 1 6 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:565.54,567.3 1 0 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:569.2,569.18 1 6 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:576.83,578.16 2 2 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:578.16,580.3 1 0 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:582.2,582.49 1 2 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:582.49,584.3 1 0 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:586.2,587.16 2 2 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:587.16,589.3 1 0 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:591.2,591.49 1 2 github.com/jesseduffield/lazydocker/pkg/config/app_config.go:595.45,597.2 1 4 github.com/jesseduffield/lazydocker/pkg/config/config_default_platform.go:7.42,12.2 1 4 mode: atomic github.com/jesseduffield/lazydocker/pkg/utils/utils.go:29.50,31.54 2 3 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:31.54,33.3 1 2 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:34.2,35.31 2 1 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:35.31,37.3 1 1 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:38.2,38.14 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:42.50,44.33 2 8 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:44.33,46.3 1 1 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:47.2,47.61 1 7 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:52.71,54.37 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:54.37,56.3 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:57.2,58.41 2 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:67.43,68.46 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:68.46,70.3 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:71.2,73.36 3 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:73.36,78.3 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:79.2,79.38 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:79.38,84.3 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:85.2,85.38 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:85.38,90.3 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:91.2,91.38 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:91.38,96.3 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:97.2,97.30 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:102.79,105.2 2 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:109.66,111.2 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:114.44,118.2 3 4 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:121.22,127.2 5 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:130.79,131.36 1 7 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:131.36,133.3 1 5 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:134.2,134.12 1 7 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:138.24,139.11 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:139.11,141.3 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:142.2,142.10 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:146.59,147.28 1 3 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:147.28,149.3 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:150.2,150.41 1 3 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:150.41,152.3 1 1 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:154.2,157.54 3 2 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:161.36,164.2 2 16 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:166.50,167.31 1 5 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:167.31,169.3 1 2 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:170.2,171.27 2 3 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:171.27,172.40 1 4 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:172.40,174.43 2 8 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:174.43,176.5 1 4 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:179.2,179.18 1 3 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:182.81,184.43 2 3 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:184.43,185.28 1 6 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:185.28,186.12 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:188.3,188.38 1 6 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:188.38,190.4 1 6 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:191.3,191.57 1 6 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:193.2,193.29 1 3 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:198.57,199.39 1 5 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:199.39,200.43 1 10 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:200.43,202.4 1 2 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:204.2,204.13 1 3 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:207.38,210.29 3 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:210.29,211.26 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:211.26,213.4 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:213.9,215.22 2 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:215.22,217.5 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:218.4,218.14 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:221.2,221.16 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:224.39,227.29 3 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:227.29,228.26 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:228.26,230.4 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:230.9,232.22 2 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:232.22,234.5 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:235.4,235.14 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:238.2,238.16 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:241.59,245.2 3 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:248.52,264.13 3 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:264.13,266.3 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:267.2,267.27 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:271.52,286.13 3 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:286.13,288.3 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:289.2,289.22 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:293.38,295.29 2 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:295.29,297.22 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:297.22,299.4 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:301.2,301.33 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:305.65,307.2 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:310.57,311.17 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:311.17,313.3 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:315.2,318.21 3 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:318.21,320.3 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:321.2,322.27 2 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:322.27,324.3 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:326.2,326.15 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:331.34,334.24 3 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:334.24,336.3 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:337.2,337.19 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:340.43,342.28 2 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:342.28,344.17 2 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:344.17,346.4 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:348.2,348.19 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:348.19,350.3 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:351.2,351.12 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:354.49,355.22 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:355.22,357.3 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:357.8,359.3 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:362.37,363.32 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:363.32,365.3 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:367.2,367.17 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:367.17,369.3 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:371.2,371.29 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:371.29,372.15 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:373.117,374.12 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:375.11,376.16 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:380.2,380.13 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:384.40,386.2 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:390.56,392.2 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:394.73,397.16 2 3 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:397.16,399.3 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:400.2,400.16 1 3 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:401.14,402.23 1 1 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:403.14,406.63 2 1 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:406.63,408.4 1 0 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:409.3,409.34 1 1 github.com/jesseduffield/lazydocker/pkg/utils/utils.go:410.10,411.86 1 1 mode: atomic github.com/jesseduffield/lazydocker/pkg/gui/app_status_manager.go:20.51,22.36 2 0 github.com/jesseduffield/lazydocker/pkg/gui/app_status_manager.go:22.36,23.26 1 0 github.com/jesseduffield/lazydocker/pkg/gui/app_status_manager.go:23.26,25.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/app_status_manager.go:27.2,27.26 1 0 github.com/jesseduffield/lazydocker/pkg/gui/app_status_manager.go:30.55,38.2 3 0 github.com/jesseduffield/lazydocker/pkg/gui/app_status_manager.go:40.50,41.26 1 0 github.com/jesseduffield/lazydocker/pkg/gui/app_status_manager.go:41.26,43.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/app_status_manager.go:44.2,45.39 2 0 github.com/jesseduffield/lazydocker/pkg/gui/app_status_manager.go:45.39,47.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/app_status_manager.go:48.2,48.23 1 0 github.com/jesseduffield/lazydocker/pkg/gui/app_status_manager.go:52.70,53.12 1 0 github.com/jesseduffield/lazydocker/pkg/gui/app_status_manager.go:53.12,56.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/app_status_manager.go:56.16,58.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/app_status_manager.go:60.3,60.13 1 0 github.com/jesseduffield/lazydocker/pkg/gui/app_status_manager.go:60.13,63.23 3 0 github.com/jesseduffield/lazydocker/pkg/gui/app_status_manager.go:63.23,65.24 2 0 github.com/jesseduffield/lazydocker/pkg/gui/app_status_manager.go:65.24,67.6 1 0 github.com/jesseduffield/lazydocker/pkg/gui/app_status_manager.go:68.5,68.75 1 0 github.com/jesseduffield/lazydocker/pkg/gui/app_status_manager.go:68.75,70.6 1 0 github.com/jesseduffield/lazydocker/pkg/gui/app_status_manager.go:74.3,74.29 1 0 github.com/jesseduffield/lazydocker/pkg/gui/app_status_manager.go:74.29,75.42 1 0 github.com/jesseduffield/lazydocker/pkg/gui/app_status_manager.go:75.42,77.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/app_status_manager.go:81.2,81.12 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:16.110,20.52 4 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:20.52,22.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:24.2,28.18 4 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:28.18,30.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:32.2,34.21 3 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:34.21,36.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:38.2,64.60 2 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:67.51,76.68 5 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:76.68,79.3 2 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:79.8,80.42 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:80.42,82.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:82.9,82.49 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:82.49,84.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:87.2,87.45 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:90.95,93.24 2 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:93.24,100.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:102.2,102.29 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:102.29,113.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:115.2,129.15 2 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:132.42,133.100 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:133.100,135.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:137.2,137.83 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:137.83,139.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:142.75,146.80 3 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:146.80,147.55 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:147.55,148.31 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:148.31,153.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:153.10,158.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:161.3,161.76 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:161.76,163.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:165.8,165.25 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:165.25,167.66 2 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:167.66,168.59 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:168.59,173.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:175.4,175.21 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:178.3,183.76 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:183.76,185.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:186.8,188.19 2 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:188.19,190.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:192.3,192.62 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:192.62,193.31 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:193.31,198.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:198.10,203.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:206.3,206.76 1 0 github.com/jesseduffield/lazydocker/pkg/gui/arrangement.go:206.76,208.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:16.127,17.49 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:17.49,18.55 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:18.55,20.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:22.3,22.22 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:22.22,23.41 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:23.41,25.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:28.3,28.13 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:32.49,33.42 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:33.42,35.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:36.2,38.12 3 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:41.76,45.10 3 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:45.10,46.30 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:46.30,48.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:49.8,51.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:52.2,52.18 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:55.95,63.2 4 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:65.106,68.16 3 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:68.16,70.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:71.2,72.54 2 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:75.86,79.16 4 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:79.16,81.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:82.2,83.15 2 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:83.15,85.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:86.2,88.40 3 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:88.40,90.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:91.2,91.12 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:94.35,97.2 2 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:102.133,104.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:106.142,108.40 2 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:108.40,109.46 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:109.46,110.56 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:110.56,112.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:114.3,115.17 2 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:115.17,117.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:118.3,119.69 2 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:119.69,121.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:122.3,122.59 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:124.2,124.12 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:127.116,129.135 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:129.135,131.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:132.2,132.124 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:132.124,134.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:136.2,136.131 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:136.131,138.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:139.2,139.122 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:139.122,141.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:143.2,143.12 1 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:146.56,150.2 3 0 github.com/jesseduffield/lazydocker/pkg/gui/confirmation_panel.go:152.51,158.2 2 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:19.89,21.64 1 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:21.64,23.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:26.41,26.64 1 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:32.127,34.15 2 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:34.15,36.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:38.2,40.73 2 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:40.73,42.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:46.2,48.6 3 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:48.6,49.10 1 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:50.21,51.10 1 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:52.19,54.18 2 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:54.18,58.5 2 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:59.4,59.28 1 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:59.28,61.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:66.67,71.12 4 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:71.12,75.3 3 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:77.2,77.40 1 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:77.40,80.3 2 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:82.2,82.15 1 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:82.15,83.40 1 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:83.40,85.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:88.2,88.74 1 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:88.74,91.3 2 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:93.2,93.22 1 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:96.34,97.50 1 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:97.50,101.41 2 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:101.41,103.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:107.112,116.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:116.16,118.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:120.2,120.63 1 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:120.63,122.17 2 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:122.17,124.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:125.8,127.17 2 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:127.17,129.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/container_logs.go:132.2,132.12 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:22.81,24.68 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:24.68,25.54 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:25.54,27.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:29.3,29.98 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:29.98,31.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:34.2,36.62 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:36.62,64.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:65.71,72.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:82.65,84.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:85.52,89.89 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:89.89,91.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:93.4,93.80 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:93.80,95.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:97.4,97.15 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:109.89,110.16 1 7 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:110.16,112.3 1 3 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:114.2,116.29 3 4 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:116.29,118.3 1 1 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:120.2,120.80 1 3 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:123.82,124.53 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:124.53,124.91 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:127.68,128.32 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:128.32,130.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:132.2,132.44 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:132.44,134.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:136.2,136.90 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:136.90,140.24 4 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:140.24,142.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:143.3,146.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:149.2,150.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:150.16,153.3 2 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:155.2,155.15 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:158.85,159.53 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:159.53,159.97 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:162.74,163.32 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:163.32,165.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:167.2,177.39 10 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:177.39,179.50 2 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:179.50,180.30 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:180.30,182.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:182.10,184.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:186.8,188.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:190.2,191.54 2 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:191.54,193.61 2 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:193.61,194.27 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:194.27,196.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:198.8,200.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:202.2,203.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:203.16,205.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:207.2,209.15 2 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:212.84,214.64 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:214.64,216.18 2 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:216.18,218.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:220.4,220.36 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:223.41,223.64 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:229.82,231.64 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:231.64,233.18 2 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:233.18,235.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:237.4,237.36 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:240.41,240.64 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:246.54,247.33 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:247.33,250.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:253.2,260.16 4 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:260.16,262.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:264.2,268.23 3 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:268.23,269.63 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:269.63,270.40 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:270.40,271.37 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:271.37,272.11 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:274.5,275.34 2 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:280.2,280.42 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:283.53,284.46 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:284.46,285.60 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:285.60,287.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:290.2,290.61 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:290.61,292.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:294.2,294.12 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:297.80,301.2 2 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:303.79,305.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:305.16,307.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:309.2,309.82 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:309.82,310.68 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:310.68,311.58 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:311.58,312.63 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:312.63,313.132 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:313.132,314.72 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:314.72,317.8 2 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:320.5,320.45 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:322.4,322.14 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:326.2,329.31 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:329.31,329.95 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:333.31,333.114 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:337.2,340.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:343.69,344.72 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:344.72,345.37 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:345.37,347.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:347.9,349.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:351.3,351.17 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:351.17,353.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:355.3,355.44 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:359.73,361.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:361.16,363.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:365.2,365.38 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:368.72,370.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:370.16,372.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:374.2,374.115 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:374.115,375.68 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:375.68,376.43 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:376.43,378.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:380.4,380.14 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:385.75,387.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:387.16,389.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:391.2,391.69 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:391.69,392.45 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:392.45,394.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:396.3,396.13 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:400.74,402.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:402.16,404.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:406.2,407.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:407.16,409.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:411.2,411.29 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:414.47,415.124 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:415.124,416.67 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:416.67,418.18 2 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:418.18,420.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:421.4,421.14 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:426.76,428.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:428.16,430.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:432.2,434.12 2 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:437.78,439.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:439.16,441.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:443.2,443.42 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:446.73,456.2 4 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:458.82,460.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:460.16,462.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:464.2,470.67 3 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:473.46,474.123 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:474.123,475.68 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:475.68,476.71 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:476.71,477.44 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:477.44,479.6 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:482.4,482.14 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:487.48,488.125 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:488.125,489.68 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:489.68,490.71 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:490.71,491.93 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:491.93,493.6 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:496.4,496.14 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:501.80,521.2 4 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:524.89,526.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:526.16,528.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:530.2,530.46 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:533.77,535.41 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:535.41,537.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:539.2,540.19 2 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:540.19,542.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:543.2,544.21 2 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:544.21,546.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/containers_panel.go:547.2,548.37 2 0 github.com/jesseduffield/lazydocker/pkg/gui/custom_commands.go:12.154,13.96 1 0 github.com/jesseduffield/lazydocker/pkg/gui/custom_commands.go:13.96,16.27 2 0 github.com/jesseduffield/lazydocker/pkg/gui/custom_commands.go:16.27,17.39 1 0 github.com/jesseduffield/lazydocker/pkg/gui/custom_commands.go:17.39,19.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/custom_commands.go:21.4,22.21 2 0 github.com/jesseduffield/lazydocker/pkg/gui/custom_commands.go:22.21,24.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/custom_commands.go:27.4,27.22 1 0 github.com/jesseduffield/lazydocker/pkg/gui/custom_commands.go:27.22,29.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/custom_commands.go:31.4,31.61 1 0 github.com/jesseduffield/lazydocker/pkg/gui/custom_commands.go:31.61,32.69 1 0 github.com/jesseduffield/lazydocker/pkg/gui/custom_commands.go:32.69,34.6 1 0 github.com/jesseduffield/lazydocker/pkg/gui/custom_commands.go:35.5,35.15 1 0 github.com/jesseduffield/lazydocker/pkg/gui/custom_commands.go:39.3,45.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/custom_commands.go:48.2,51.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/custom_commands.go:54.124,56.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/custom_commands.go:58.122,60.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/filtering.go:9.42,11.9 2 0 github.com/jesseduffield/lazydocker/pkg/gui/filtering.go:11.9,13.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/filtering.go:15.2,15.30 1 0 github.com/jesseduffield/lazydocker/pkg/gui/filtering.go:15.30,17.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/filtering.go:19.2,22.42 3 0 github.com/jesseduffield/lazydocker/pkg/gui/filtering.go:25.55,29.2 3 0 github.com/jesseduffield/lazydocker/pkg/gui/filtering.go:31.169,32.78 1 0 github.com/jesseduffield/lazydocker/pkg/gui/filtering.go:32.78,34.14 2 0 github.com/jesseduffield/lazydocker/pkg/gui/filtering.go:34.14,35.73 1 0 github.com/jesseduffield/lazydocker/pkg/gui/filtering.go:35.73,37.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/filtering.go:39.3,39.17 1 0 github.com/jesseduffield/lazydocker/pkg/gui/filtering.go:43.44,44.42 1 0 github.com/jesseduffield/lazydocker/pkg/gui/filtering.go:44.42,46.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/filtering.go:48.2,48.26 1 0 github.com/jesseduffield/lazydocker/pkg/gui/filtering.go:51.37,58.18 6 0 github.com/jesseduffield/lazydocker/pkg/gui/filtering.go:58.18,60.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/filtering.go:62.2,64.29 2 0 github.com/jesseduffield/lazydocker/pkg/gui/filtering.go:68.38,69.35 1 0 github.com/jesseduffield/lazydocker/pkg/gui/filtering.go:69.35,70.43 1 0 github.com/jesseduffield/lazydocker/pkg/gui/filtering.go:70.43,72.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/filtering.go:75.2,75.26 1 0 github.com/jesseduffield/lazydocker/pkg/gui/filtering.go:78.39,80.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:8.53,9.14 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:9.14,11.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:13.2,14.8 2 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:14.8,16.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:18.2,18.18 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:19.22,20.13 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:21.14,23.13 2 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:24.16,25.13 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:26.10,27.59 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:32.56,37.2 3 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:39.59,43.64 4 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:43.64,45.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:47.2,49.49 2 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:49.49,51.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:53.2,55.106 2 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:55.106,56.43 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:56.43,58.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:62.2,62.40 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:62.40,64.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:66.2,66.36 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:69.37,73.35 3 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:73.35,75.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:77.2,79.16 3 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:79.16,81.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:83.2,83.41 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:86.55,90.89 3 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:90.89,92.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:96.39,99.22 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:99.22,100.90 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:100.90,102.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:106.2,106.44 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:106.44,108.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:111.2,111.89 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:111.89,113.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:115.2,115.57 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:119.48,123.53 3 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:123.53,124.65 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:124.65,126.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:129.2,129.39 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:132.46,137.39 3 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:137.39,140.49 3 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:140.49,142.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/focus.go:145.2,145.39 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gocui.go:25.52,26.32 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gocui.go:26.32,29.3 2 0 github.com/jesseduffield/lazydocker/pkg/gui/gocui.go:31.2,32.13 2 0 github.com/jesseduffield/lazydocker/pkg/gui/gocui.go:32.13,34.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gocui.go:35.2,35.27 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gocui.go:39.51,41.27 2 0 github.com/jesseduffield/lazydocker/pkg/gui/gocui.go:41.27,43.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gocui.go:44.2,44.18 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:118.189,147.2 5 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:149.45,157.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:159.72,161.12 2 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:161.12,164.22 3 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:164.22,165.34 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:165.34,167.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:169.4,169.18 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:175.29,180.16 3 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:180.16,182.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:183.2,186.50 2 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:186.50,188.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:190.2,194.65 2 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:194.65,196.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:198.2,198.45 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:198.45,200.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:202.2,205.12 3 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:205.12,206.34 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:206.34,207.18 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:207.18,208.13 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:210.4,210.58 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:210.58,213.13 2 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:215.4,215.41 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:219.2,221.45 2 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:221.45,223.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:224.2,224.52 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:224.52,226.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:229.2,231.42 2 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:231.42,233.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:235.2,235.32 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:235.32,238.17 3 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:238.17,240.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:242.3,242.47 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:242.47,244.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:247.2,253.12 5 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:253.12,261.3 5 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:263.2,264.26 2 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:264.26,266.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:267.2,267.12 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:270.29,280.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:282.48,284.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:286.27,287.12 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:287.12,288.46 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:288.46,290.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:292.2,292.12 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:292.12,293.60 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:293.60,295.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:297.2,297.12 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:297.12,298.45 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:298.45,300.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:302.2,302.12 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:302.12,303.46 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:303.46,305.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:307.2,307.12 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:307.12,308.44 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:308.44,310.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:314.70,317.29 2 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:317.29,318.17 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:318.17,320.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:321.3,322.30 2 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:325.1,326.6 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:326.6,329.21 2 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:329.21,330.11 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:331.22,332.11 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:333.26,335.19 2 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:336.12,345.19 3 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:349.3,349.7 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:349.7,350.11 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:351.22,352.11 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:353.34,359.62 2 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:360.26,362.19 2 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:369.47,371.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:373.38,375.21 2 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:375.21,377.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:378.2,378.26 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:378.26,379.41 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:379.41,381.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:383.2,383.12 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:386.57,387.41 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:387.41,388.102 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:388.102,390.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:392.2,392.22 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:397.32,398.29 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:398.29,400.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:402.2,402.12 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:405.65,406.18 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:406.18,408.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:410.2,411.29 2 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:411.29,413.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:414.2,414.76 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:417.49,419.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:419.16,421.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:423.2,423.31 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:426.49,427.57 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:427.57,429.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:430.2,430.12 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:433.72,434.98 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:434.98,437.3 2 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:440.48,441.44 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:441.44,443.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:445.2,446.13 2 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:449.51,450.46 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:450.46,452.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:453.2,453.21 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:456.42,458.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:460.40,461.38 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:461.38,461.52 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:464.60,469.6 3 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:469.6,470.10 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:471.21,472.10 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:473.19,474.71 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:474.71,475.35 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:475.35,477.6 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:486.32,488.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:488.16,489.13 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:491.2,493.45 3 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:493.45,494.13 1 0 github.com/jesseduffield/lazydocker/pkg/gui/gui.go:497.2,497.17 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:21.73,26.58 2 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:26.58,34.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:35.63,37.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:45.57,46.50 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:46.50,48.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:50.4,50.50 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:50.50,52.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:54.4,54.24 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:54.24,56.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:58.4,58.22 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:58.22,60.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:62.4,62.22 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:68.77,70.32 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:70.32,70.68 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:76.62,86.16 9 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:86.16,88.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:90.2,92.15 2 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:95.38,96.49 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:96.49,98.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:100.2,100.41 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:103.44,105.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:105.16,107.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:109.2,111.12 2 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:114.55,115.79 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:115.79,117.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:119.2,119.32 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:122.75,130.16 3 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:130.16,132.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:134.2,160.86 3 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:160.86,166.26 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:166.26,167.62 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:167.62,169.6 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:171.5,171.15 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:176.2,179.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:182.43,183.120 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:183.120,184.67 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:184.67,186.18 2 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:186.18,188.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:189.4,189.29 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:194.78,196.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:196.16,198.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:200.2,206.67 3 0 github.com/jesseduffield/lazydocker/pkg/gui/images_panel.go:209.76,221.2 4 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:21.35,24.22 2 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:25.12,26.26 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:27.17,28.31 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:32.2,32.13 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:33.10,34.15 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:35.10,36.17 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:37.10,38.17 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:39.13,40.15 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:41.13,42.15 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:43.13,44.15 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:45.13,46.15 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:47.13,48.16 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:49.13,50.16 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:53.2,53.31 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:57.52,514.44 2 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:514.44,523.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:525.2,525.112 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:525.112,535.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:537.2,537.44 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:537.44,539.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:541.2,543.44 2 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:543.44,567.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:569.2,569.44 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:569.44,570.32 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:570.32,578.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:581.2,581.17 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:584.49,587.35 2 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:587.35,588.107 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:588.107,590.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:593.2,593.73 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:593.73,595.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:597.2,597.12 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:600.73,601.49 1 0 github.com/jesseduffield/lazydocker/pkg/gui/keybindings.go:601.49,603.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:10.59,12.34 2 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:12.34,14.45 2 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:14.45,16.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:18.3,18.67 1 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:18.67,22.4 3 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:23.3,23.13 1 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:27.39,29.37 2 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:29.37,31.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:32.2,32.12 1 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:35.65,36.14 1 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:36.14,38.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:40.2,40.39 1 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:40.39,42.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:45.2,47.40 2 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:50.40,51.14 1 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:51.14,53.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:55.2,57.42 2 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:61.44,69.89 5 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:69.89,73.17 3 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:73.17,75.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:77.3,77.10 1 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:77.10,85.4 3 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:87.3,88.17 2 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:88.17,90.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:91.3,101.19 3 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:104.2,104.57 1 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:104.57,106.58 2 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:106.58,108.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:115.2,115.39 1 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:118.52,119.17 1 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:119.17,121.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:123.2,124.8 2 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:124.8,126.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/layout.go:129.67,133.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/main_panel.go:9.38,15.2 5 0 github.com/jesseduffield/lazydocker/pkg/gui/main_panel.go:17.40,23.49 5 0 github.com/jesseduffield/lazydocker/pkg/gui/main_panel.go:23.49,26.3 2 0 github.com/jesseduffield/lazydocker/pkg/gui/main_panel.go:28.2,29.36 2 0 github.com/jesseduffield/lazydocker/pkg/gui/main_panel.go:29.36,31.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/main_panel.go:33.2,33.74 1 0 github.com/jesseduffield/lazydocker/pkg/gui/main_panel.go:36.67,42.2 4 0 github.com/jesseduffield/lazydocker/pkg/gui/main_panel.go:44.68,50.30 5 0 github.com/jesseduffield/lazydocker/pkg/gui/main_panel.go:50.30,51.43 1 0 github.com/jesseduffield/lazydocker/pkg/gui/main_panel.go:51.43,53.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/main_panel.go:56.2,57.43 2 0 github.com/jesseduffield/lazydocker/pkg/gui/main_panel.go:57.43,59.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/main_panel.go:61.2,61.74 1 0 github.com/jesseduffield/lazydocker/pkg/gui/main_panel.go:64.67,67.2 2 0 github.com/jesseduffield/lazydocker/pkg/gui/main_panel.go:69.66,74.2 4 0 github.com/jesseduffield/lazydocker/pkg/gui/main_panel.go:76.52,81.9 3 0 github.com/jesseduffield/lazydocker/pkg/gui/main_panel.go:81.9,83.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/main_panel.go:85.2,86.40 2 0 github.com/jesseduffield/lazydocker/pkg/gui/main_panel.go:89.68,94.2 3 0 github.com/jesseduffield/lazydocker/pkg/gui/main_panel.go:96.67,99.2 2 0 github.com/jesseduffield/lazydocker/pkg/gui/main_panel.go:101.41,102.29 1 0 github.com/jesseduffield/lazydocker/pkg/gui/main_panel.go:102.29,104.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/main_panel.go:106.2,108.34 2 0 github.com/jesseduffield/lazydocker/pkg/gui/main_panel.go:108.34,110.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/main_panel.go:112.2,112.40 1 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:16.71,27.28 1 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:27.28,29.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:38.61,39.46 1 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:39.46,41.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:43.2,43.29 1 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:43.29,45.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:47.2,47.12 1 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:50.41,52.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:52.16,54.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:56.2,56.42 1 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:59.52,60.22 1 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:60.22,64.26 1 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:64.26,66.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:70.2,72.34 2 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:72.34,73.31 1 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:73.31,75.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:77.3,77.21 1 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:77.21,79.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:81.3,81.67 1 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:84.2,84.34 1 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:84.34,85.45 1 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:85.45,89.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:92.2,95.55 3 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:95.55,97.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:99.2,102.40 3 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:107.43,114.2 2 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:116.41,121.47 2 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:121.47,122.43 1 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:122.43,124.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:129.3,129.44 1 0 github.com/jesseduffield/lazydocker/pkg/gui/menu_panel.go:132.2,132.26 1 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:18.77,21.60 1 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:21.60,29.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:30.67,32.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:43.61,45.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:50.79,51.53 1 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:51.53,51.93 1 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:54.68,67.41 12 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:67.41,69.48 2 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:69.48,71.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:72.8,74.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:76.2,80.15 4 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:83.40,84.51 1 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:84.51,86.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:88.2,88.43 1 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:91.46,93.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:93.16,95.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:97.2,99.12 2 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:102.77,104.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:104.16,106.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:108.2,120.88 3 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:120.88,123.26 1 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:123.26,124.70 1 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:124.70,125.45 1 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:125.45,127.7 1 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:128.6,128.16 1 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:134.2,137.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:140.45,141.122 1 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:141.122,142.67 1 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:142.67,144.18 2 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:144.18,146.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:147.4,147.14 1 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:152.80,154.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:154.16,156.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:158.2,164.67 3 0 github.com/jesseduffield/lazydocker/pkg/gui/networks_panel.go:167.78,179.2 4 0 github.com/jesseduffield/lazydocker/pkg/gui/options_menu_panel.go:10.55,15.35 3 0 github.com/jesseduffield/lazydocker/pkg/gui/options_menu_panel.go:15.35,16.58 1 0 github.com/jesseduffield/lazydocker/pkg/gui/options_menu_panel.go:16.58,17.28 1 0 github.com/jesseduffield/lazydocker/pkg/gui/options_menu_panel.go:18.12,19.53 1 0 github.com/jesseduffield/lazydocker/pkg/gui/options_menu_panel.go:20.18,21.51 1 0 github.com/jesseduffield/lazydocker/pkg/gui/options_menu_panel.go:27.2,27.25 1 0 github.com/jesseduffield/lazydocker/pkg/gui/options_menu_panel.go:27.25,29.36 1 0 github.com/jesseduffield/lazydocker/pkg/gui/options_menu_panel.go:29.36,30.59 1 0 github.com/jesseduffield/lazydocker/pkg/gui/options_menu_panel.go:30.59,31.48 1 0 github.com/jesseduffield/lazydocker/pkg/gui/options_menu_panel.go:31.48,33.47 1 0 github.com/jesseduffield/lazydocker/pkg/gui/options_menu_panel.go:33.47,34.50 1 0 github.com/jesseduffield/lazydocker/pkg/gui/options_menu_panel.go:34.50,35.18 1 0 github.com/jesseduffield/lazydocker/pkg/gui/options_menu_panel.go:38.6,38.52 1 0 github.com/jesseduffield/lazydocker/pkg/gui/options_menu_panel.go:46.2,47.49 2 0 github.com/jesseduffield/lazydocker/pkg/gui/options_menu_panel.go:50.76,51.32 1 0 github.com/jesseduffield/lazydocker/pkg/gui/options_menu_panel.go:51.32,53.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/options_menu_panel.go:55.2,55.88 1 0 github.com/jesseduffield/lazydocker/pkg/gui/options_menu_panel.go:55.88,58.26 1 0 github.com/jesseduffield/lazydocker/pkg/gui/options_menu_panel.go:58.26,59.27 1 0 github.com/jesseduffield/lazydocker/pkg/gui/options_menu_panel.go:59.27,61.6 1 0 github.com/jesseduffield/lazydocker/pkg/gui/options_menu_panel.go:63.5,63.33 1 0 github.com/jesseduffield/lazydocker/pkg/gui/options_menu_panel.go:68.2,72.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels.go:5.45,7.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:22.76,25.60 1 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:25.60,26.49 1 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:26.49,44.6 1 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:46.5,52.6 1 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:54.67,56.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:66.61,68.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:75.40,78.2 2 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:80.41,82.46 2 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:82.46,83.66 1 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:83.66,85.53 2 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:85.53,87.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:91.2,91.20 1 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:94.74,95.53 1 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:95.53,95.80 1 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:98.37,113.2 3 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:115.74,119.35 1 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:119.35,135.14 7 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:135.14,137.51 2 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:137.51,139.6 1 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:142.4,142.18 1 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:147.86,148.53 1 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:148.53,150.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:153.69,155.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:157.69,159.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:161.31,172.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:175.70,177.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:177.16,179.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/project_panel.go:181.2,181.29 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:20.77,23.60 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:23.60,51.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:52.67,53.33 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:53.33,55.6 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:56.5,56.107 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:66.61,67.48 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:67.48,69.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:71.4,71.48 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:71.48,73.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:75.4,75.26 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:78.21,80.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:84.88,85.30 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:85.30,86.54 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:86.54,86.83 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:89.2,89.53 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:92.85,93.30 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:93.30,94.54 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:94.54,94.83 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:97.2,97.50 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:100.78,101.30 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:101.30,102.54 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:102.54,102.83 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:105.2,105.52 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:108.76,110.64 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:110.64,112.18 2 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:112.18,114.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:116.4,116.36 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:119.41,119.64 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:125.77,126.30 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:126.30,127.54 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:127.54,127.93 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:130.2,130.57 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:139.54,141.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:143.76,145.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:145.16,147.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:149.2,162.82 3 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:162.82,165.26 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:165.26,166.70 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:166.70,167.69 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:167.69,169.7 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:171.6,171.16 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:177.2,180.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:183.71,185.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:185.16,187.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:188.2,188.30 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:188.30,190.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:192.2,192.46 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:195.70,197.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:197.16,199.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:201.2,201.113 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:201.113,202.68 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:202.68,203.41 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:203.41,205.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:207.4,207.14 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:212.68,214.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:214.16,216.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:218.2,218.72 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:218.72,219.38 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:219.38,221.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:223.3,223.13 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:227.73,229.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:229.16,231.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:233.2,233.69 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:233.69,234.43 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:234.43,236.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:238.3,238.13 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:242.71,244.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:244.16,246.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:248.2,248.67 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:248.67,249.41 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:249.41,251.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:253.3,253.13 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:257.72,259.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:259.16,261.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:263.2,263.30 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:263.30,265.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:267.2,268.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:268.16,270.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:272.2,272.29 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:275.82,277.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:277.16,279.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:281.2,282.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:282.16,284.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:286.2,286.29 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:289.68,290.118 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:290.118,296.73 2 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:296.73,297.59 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:297.59,299.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:300.4,300.14 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:305.70,320.26 3 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:320.26,321.69 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:321.69,322.66 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:322.66,324.7 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:325.6,325.16 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:332.26,333.69 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:333.69,334.77 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:334.77,336.7 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:337.6,337.16 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:343.2,343.82 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:343.82,348.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:350.2,353.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:356.77,358.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:358.16,360.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:362.2,379.26 3 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:379.26,380.72 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:380.72,381.46 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:381.46,383.7 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:384.6,384.16 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:394.26,395.72 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:395.72,396.70 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:396.70,398.7 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:399.6,399.16 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:409.26,411.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:415.2,415.82 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:415.82,420.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:422.2,425.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:428.80,430.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:430.16,432.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:434.2,444.44 4 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:444.44,445.33 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:445.33,447.14 2 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:449.3,449.48 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:449.48,450.35 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:450.35,453.15 2 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:458.2,458.30 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:458.30,460.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:462.2,462.67 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:465.78,470.2 3 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:472.76,474.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:474.16,476.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:478.2,479.22 2 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:479.22,481.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:483.2,483.42 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:486.87,488.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:488.16,490.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:492.2,493.22 2 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:493.22,495.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/services_panel.go:497.2,497.46 1 0 github.com/jesseduffield/lazydocker/pkg/gui/subprocess.go:15.52,19.40 3 0 github.com/jesseduffield/lazydocker/pkg/gui/subprocess.go:19.40,21.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/subprocess.go:23.2,27.39 3 0 github.com/jesseduffield/lazydocker/pkg/gui/subprocess.go:27.39,29.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/subprocess.go:31.2,33.12 2 0 github.com/jesseduffield/lazydocker/pkg/gui/subprocess.go:36.43,44.12 6 0 github.com/jesseduffield/lazydocker/pkg/gui/subprocess.go:44.12,48.49 3 0 github.com/jesseduffield/lazydocker/pkg/gui/subprocess.go:48.49,50.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/subprocess.go:53.2,55.34 2 0 github.com/jesseduffield/lazydocker/pkg/gui/subprocess.go:55.34,59.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/subprocess.go:61.2,65.22 4 0 github.com/jesseduffield/lazydocker/pkg/gui/tasks_adapter.go:10.62,12.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/tasks_adapter.go:34.79,38.35 1 0 github.com/jesseduffield/lazydocker/pkg/gui/tasks_adapter.go:38.35,40.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/tasks_adapter.go:43.2,43.30 1 0 github.com/jesseduffield/lazydocker/pkg/gui/tasks_adapter.go:47.84,53.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/tasks_adapter.go:55.55,56.35 1 0 github.com/jesseduffield/lazydocker/pkg/gui/tasks_adapter.go:56.35,62.3 4 0 github.com/jesseduffield/lazydocker/pkg/gui/tasks_adapter.go:68.67,71.36 2 0 github.com/jesseduffield/lazydocker/pkg/gui/tasks_adapter.go:71.36,72.25 1 0 github.com/jesseduffield/lazydocker/pkg/gui/tasks_adapter.go:72.25,74.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/tasks_adapter.go:75.3,79.7 4 0 github.com/jesseduffield/lazydocker/pkg/gui/tasks_adapter.go:79.7,80.11 1 0 github.com/jesseduffield/lazydocker/pkg/gui/tasks_adapter.go:81.25,83.11 2 0 github.com/jesseduffield/lazydocker/pkg/gui/tasks_adapter.go:84.22,86.11 2 0 github.com/jesseduffield/lazydocker/pkg/gui/tasks_adapter.go:87.22,89.34 2 0 github.com/jesseduffield/lazydocker/pkg/gui/tasks_adapter.go:94.2,100.30 2 0 github.com/jesseduffield/lazydocker/pkg/gui/theme.go:8.60,10.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/theme.go:13.40,19.2 5 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:15.61,18.65 3 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:18.65,20.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:20.8,22.32 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:22.32,23.36 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:23.36,25.10 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:27.4,27.33 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:27.33,30.5 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:33.2,34.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:34.16,35.13 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:37.2,38.37 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:41.65,44.46 3 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:44.46,46.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:46.8,48.32 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:48.32,49.36 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:49.36,51.10 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:53.4,53.33 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:53.33,56.5 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:59.2,60.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:60.16,61.13 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:63.2,64.37 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:67.33,70.2 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:74.88,75.44 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:75.44,77.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:78.2,89.29 9 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:89.29,91.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:91.8,91.34 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:91.34,93.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:95.2,95.29 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:95.29,98.3 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:100.2,100.22 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:100.22,102.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:104.2,105.22 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:105.22,107.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:110.69,112.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:114.44,117.2 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:119.46,122.2 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:124.63,128.2 3 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:131.70,132.34 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:132.34,134.17 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:134.17,136.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:137.3,137.43 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:137.43,139.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:140.3,140.43 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:140.43,142.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:143.3,143.34 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:145.2,145.12 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:148.44,150.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:153.46,155.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:158.52,159.38 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:159.38,161.17 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:161.17,163.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:164.3,164.34 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:168.73,170.43 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:170.43,172.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:173.2,174.41 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:177.70,179.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:181.43,183.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:185.54,187.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:189.42,192.24 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:192.24,194.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:195.2,195.27 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:198.61,200.32 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:200.32,202.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:203.2,203.12 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:206.55,212.54 4 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:212.54,214.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:215.2,216.12 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:219.44,221.28 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:222.14,223.33 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:224.22,225.41 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:227.2,227.34 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:230.52,232.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:234.42,236.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:238.33,243.2 4 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:245.111,246.65 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:246.65,248.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:249.2,249.76 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:252.137,253.72 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:253.72,255.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:257.2,262.25 4 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:262.25,264.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:266.2,266.35 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:266.35,268.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:270.2,272.39 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:272.39,273.44 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:273.44,275.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:278.2,278.31 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:281.40,282.37 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:282.37,286.3 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:288.2,290.12 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:293.40,294.37 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:294.37,298.3 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:300.2,302.12 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:305.93,306.25 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:306.25,307.21 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:307.21,308.22 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:308.22,310.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:311.4,311.18 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:314.2,314.14 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:317.93,318.25 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:318.25,319.21 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:319.21,320.13 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:320.13,322.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:323.4,323.24 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:326.2,326.22 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:329.43,331.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:333.66,336.48 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:336.48,337.45 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:337.45,339.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:342.2,342.19 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:346.66,349.48 2 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:349.48,350.45 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:350.45,352.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:355.2,355.19 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:358.57,367.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:369.57,371.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/view_helpers.go:373.54,375.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/views.go:19.29,20.27 1 0 github.com/jesseduffield/lazydocker/pkg/gui/views.go:20.27,23.3 2 0 github.com/jesseduffield/lazydocker/pkg/gui/views.go:25.2,25.24 1 0 github.com/jesseduffield/lazydocker/pkg/gui/views.go:65.61,92.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/views.go:94.40,96.56 2 0 github.com/jesseduffield/lazydocker/pkg/gui/views.go:96.56,98.58 2 0 github.com/jesseduffield/lazydocker/pkg/gui/views.go:98.58,100.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/views.go:101.3,101.50 1 0 github.com/jesseduffield/lazydocker/pkg/gui/views.go:104.2,118.94 10 0 github.com/jesseduffield/lazydocker/pkg/gui/views.go:118.94,120.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/views.go:120.8,122.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/views.go:124.2,164.12 31 0 github.com/jesseduffield/lazydocker/pkg/gui/views.go:167.47,168.92 1 0 github.com/jesseduffield/lazydocker/pkg/gui/views.go:168.92,170.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/views.go:172.2,174.12 2 0 github.com/jesseduffield/lazydocker/pkg/gui/views.go:177.48,179.18 2 0 github.com/jesseduffield/lazydocker/pkg/gui/views.go:179.18,181.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/views.go:183.2,184.24 2 0 github.com/jesseduffield/lazydocker/pkg/gui/views.go:184.24,186.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/views.go:188.2,189.38 2 0 github.com/jesseduffield/lazydocker/pkg/gui/views.go:192.43,194.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/views.go:197.52,198.102 1 0 github.com/jesseduffield/lazydocker/pkg/gui/views.go:198.102,200.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/views.go:202.2,202.75 1 0 github.com/jesseduffield/lazydocker/pkg/gui/views.go:202.75,204.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:18.75,21.59 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:21.59,29.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:30.65,32.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:43.59,44.61 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:44.61,46.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:47.4,47.61 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:47.61,49.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:50.4,50.26 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:56.76,57.53 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:57.53,57.91 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:60.65,71.33 10 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:71.33,73.42 2 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:73.42,75.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:76.8,78.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:80.2,80.36 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:80.36,83.3 2 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:85.2,85.15 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:88.39,89.50 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:89.50,91.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:93.2,93.42 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:96.45,98.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:98.16,100.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:102.2,104.12 2 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:107.76,109.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:109.16,111.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:113.2,132.87 3 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:132.87,135.26 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:135.26,136.70 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:136.70,137.56 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:137.56,139.7 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:140.6,140.16 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:146.2,149.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:152.44,153.121 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:153.121,154.67 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:154.67,156.18 2 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:156.18,158.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:159.4,159.14 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:164.79,166.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:166.16,168.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:170.2,176.67 3 0 github.com/jesseduffield/lazydocker/pkg/gui/volumes_panel.go:179.77,191.2 4 0 github.com/jesseduffield/lazydocker/pkg/gui/window.go:10.50,12.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/window.go:14.48,16.2 1 0 mode: atomic mode: atomic github.com/jesseduffield/lazydocker/pkg/gui/panels/context_state.go:33.58,34.71 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/context_state.go:34.71,36.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/context_state.go:39.66,41.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/context_state.go:43.61,45.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/context_state.go:47.50,50.20 2 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/context_state.go:50.20,52.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/context_state.go:54.2,54.53 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/context_state.go:57.50,60.20 2 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/context_state.go:60.20,62.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/context_state.go:64.2,64.65 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/context_state.go:67.57,69.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/filtered_list.go:16.55,18.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/filtered_list.go:20.50,26.30 5 2 github.com/jesseduffield/lazydocker/pkg/gui/panels/filtered_list.go:26.30,28.3 1 4 github.com/jesseduffield/lazydocker/pkg/gui/panels/filtered_list.go:31.63,36.37 4 2 github.com/jesseduffield/lazydocker/pkg/gui/panels/filtered_list.go:36.37,37.22 1 6 github.com/jesseduffield/lazydocker/pkg/gui/panels/filtered_list.go:37.22,39.4 1 3 github.com/jesseduffield/lazydocker/pkg/gui/panels/filtered_list.go:43.57,47.17 3 2 github.com/jesseduffield/lazydocker/pkg/gui/panels/filtered_list.go:47.17,49.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/filtered_list.go:51.2,51.47 1 2 github.com/jesseduffield/lazydocker/pkg/gui/panels/filtered_list.go:51.47,53.3 1 5 github.com/jesseduffield/lazydocker/pkg/gui/panels/filtered_list.go:56.47,61.2 3 3 github.com/jesseduffield/lazydocker/pkg/gui/panels/filtered_list.go:63.58,67.45 3 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/filtered_list.go:67.45,70.3 2 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/filtered_list.go:72.2,72.49 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/filtered_list.go:76.40,81.2 3 2 github.com/jesseduffield/lazydocker/pkg/gui/panels/filtered_list.go:83.51,87.37 3 3 github.com/jesseduffield/lazydocker/pkg/gui/panels/filtered_list.go:87.37,88.35 1 4 github.com/jesseduffield/lazydocker/pkg/gui/panels/filtered_list.go:88.35,90.4 1 2 github.com/jesseduffield/lazydocker/pkg/gui/panels/filtered_list.go:92.2,92.11 1 1 github.com/jesseduffield/lazydocker/pkg/gui/panels/filtered_list.go:95.45,100.37 4 2 github.com/jesseduffield/lazydocker/pkg/gui/panels/filtered_list.go:100.37,102.3 1 4 github.com/jesseduffield/lazydocker/pkg/gui/panels/filtered_list.go:103.2,103.15 1 2 github.com/jesseduffield/lazydocker/pkg/gui/panels/filtered_list.go:106.48,111.2 3 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/list_panel.go:14.57,16.25 2 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/list_panel.go:16.25,18.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/list_panel.go:20.2,20.33 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/list_panel.go:23.50,26.33 2 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/list_panel.go:26.33,28.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/list_panel.go:32.55,34.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/list_panel.go:36.44,38.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/list_panel.go:40.44,42.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:80.51,85.95 4 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:85.95,87.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:89.2,89.25 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:89.25,91.17 2 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:91.17,93.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:96.2,96.12 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:99.53,101.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:103.52,105.16 2 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:105.16,106.41 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:106.41,108.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:110.3,110.32 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:110.32,111.53 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:111.53,111.83 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:114.3,114.13 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:117.2,119.33 2 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:122.59,123.30 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:123.30,125.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:127.2,128.34 2 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:128.34,130.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:132.2,138.33 5 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:141.60,145.9 3 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:145.9,148.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:150.2,150.18 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:153.54,157.2 2 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:159.54,163.2 2 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:165.57,166.30 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:166.30,168.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:170.2,172.28 2 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:175.57,176.30 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:176.30,178.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:180.2,182.28 2 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:185.41,187.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:189.51,192.2 2 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:194.47,197.48 2 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:197.48,198.47 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:198.47,200.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:202.3,202.67 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:202.67,203.78 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:203.78,205.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:206.6,208.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:210.3,210.25 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:210.25,211.78 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:211.78,213.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:216.3,216.14 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:219.2,221.29 2 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:224.52,227.31 2 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:227.31,229.74 2 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:229.74,231.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:232.3,233.17 2 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:233.17,235.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:236.3,238.29 2 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:238.29,239.44 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:239.44,241.5 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:244.3,244.40 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:244.40,246.4 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:247.3,247.13 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:250.2,250.12 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:253.58,254.30 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:254.30,256.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:258.2,258.42 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:261.55,263.2 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:265.47,266.22 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:266.22,268.3 1 0 github.com/jesseduffield/lazydocker/pkg/gui/panels/side_list_panel.go:270.2,270.20 1 0 mode: atomic mode: atomic mode: atomic github.com/jesseduffield/lazydocker/pkg/commands/container.go:46.78,48.86 2 0 github.com/jesseduffield/lazydocker/pkg/commands/container.go:48.86,49.100 1 0 github.com/jesseduffield/lazydocker/pkg/commands/container.go:49.100,55.4 1 0 github.com/jesseduffield/lazydocker/pkg/commands/container.go:56.3,56.13 1 0 github.com/jesseduffield/lazydocker/pkg/commands/container.go:59.2,59.12 1 0 github.com/jesseduffield/lazydocker/pkg/commands/container.go:63.34,66.2 2 0 github.com/jesseduffield/lazydocker/pkg/commands/container.go:69.35,72.2 2 0 github.com/jesseduffield/lazydocker/pkg/commands/container.go:75.37,78.2 2 0 github.com/jesseduffield/lazydocker/pkg/commands/container.go:81.37,84.2 2 0 github.com/jesseduffield/lazydocker/pkg/commands/container.go:87.49,88.24 1 0 github.com/jesseduffield/lazydocker/pkg/commands/container.go:88.24,90.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/container.go:93.2,93.33 1 0 github.com/jesseduffield/lazydocker/pkg/commands/container.go:93.33,95.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/container.go:97.2,97.35 1 0 github.com/jesseduffield/lazydocker/pkg/commands/container.go:97.35,99.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/container.go:101.2,104.17 3 0 github.com/jesseduffield/lazydocker/pkg/commands/container.go:108.84,110.16 2 0 github.com/jesseduffield/lazydocker/pkg/commands/container.go:110.16,112.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/container.go:115.2,115.27 1 0 github.com/jesseduffield/lazydocker/pkg/commands/container.go:115.27,117.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/container.go:119.2,119.53 1 0 github.com/jesseduffield/lazydocker/pkg/commands/container.go:123.49,126.2 2 0 github.com/jesseduffield/lazydocker/pkg/commands/container.go:129.66,131.2 1 0 github.com/jesseduffield/lazydocker/pkg/commands/container.go:134.68,136.16 2 0 github.com/jesseduffield/lazydocker/pkg/commands/container.go:136.16,138.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/container.go:140.2,140.82 1 0 github.com/jesseduffield/lazydocker/pkg/commands/container.go:144.42,146.2 1 0 github.com/jesseduffield/lazydocker/pkg/commands/container_stats.go:138.68,143.23 4 1 github.com/jesseduffield/lazydocker/pkg/commands/container_stats.go:143.23,145.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/container_stats.go:146.2,146.14 1 1 github.com/jesseduffield/lazydocker/pkg/commands/container_stats.go:150.66,152.23 2 0 github.com/jesseduffield/lazydocker/pkg/commands/container_stats.go:152.23,154.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/container_stats.go:155.2,155.14 1 0 github.com/jesseduffield/lazydocker/pkg/commands/container_stats.go:158.82,164.2 4 0 github.com/jesseduffield/lazydocker/pkg/commands/container_stats.go:167.64,168.22 1 0 github.com/jesseduffield/lazydocker/pkg/commands/container_stats.go:168.22,170.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/container_stats.go:172.2,172.37 1 0 github.com/jesseduffield/lazydocker/pkg/commands/container_stats.go:172.37,173.48 1 0 github.com/jesseduffield/lazydocker/pkg/commands/container_stats.go:173.48,176.4 2 0 github.com/jesseduffield/lazydocker/pkg/commands/container_stats.go:180.59,184.23 4 0 github.com/jesseduffield/lazydocker/pkg/commands/container_stats.go:184.23,186.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/container_stats.go:187.2,187.38 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:66.75,70.2 3 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:73.161,75.16 2 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:75.16,77.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:79.2,80.16 2 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:80.16,82.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:84.2,85.16 2 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:85.16,87.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:89.2,113.16 5 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:113.16,116.3 2 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:118.2,118.27 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:121.39,123.2 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:125.71,128.16 3 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:128.16,134.3 3 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:136.2,139.21 3 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:139.21,154.3 5 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:156.2,156.35 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:159.148,164.16 4 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:164.16,166.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:168.2,170.28 2 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:170.28,172.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:172.8,174.17 2 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:174.17,176.4 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:179.2,181.34 2 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:184.98,186.35 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:186.35,187.40 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:187.40,188.66 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:188.66,190.15 2 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:193.3,193.26 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:198.94,203.16 4 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:203.16,205.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:207.2,209.39 2 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:209.39,213.56 2 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:213.56,214.44 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:214.44,216.10 2 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:221.3,221.26 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:221.26,230.4 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:232.3,234.47 2 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:234.47,236.4 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:236.9,238.4 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:239.3,244.34 5 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:247.2,247.27 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:251.59,252.31 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:252.31,254.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:256.2,258.16 3 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:258.16,260.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:266.2,268.28 3 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:268.28,276.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:278.2,278.22 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:283.79,287.39 3 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:287.39,289.17 2 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:289.17,291.4 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:291.9,293.4 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:296.2,296.12 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:300.58,311.2 3 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:314.54,321.16 2 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:321.16,323.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:324.2,324.15 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:332.44,335.36 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:335.36,337.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:339.2,340.26 2 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:340.26,342.53 2 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:342.53,344.4 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:345.3,346.17 2 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:346.17,348.4 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:349.3,349.37 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:352.2,352.26 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:352.26,357.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:359.2,360.22 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:360.22,360.56 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:361.74,361.108 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:364.2,366.16 3 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:366.16,368.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:369.2,370.9 2 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:370.9,372.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:373.2,374.9 2 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:374.9,376.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:378.2,378.29 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:378.29,380.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/docker.go:388.2,388.31 1 0 github.com/jesseduffield/lazydocker/pkg/commands/dummies.go:14.37,16.2 1 19 github.com/jesseduffield/lazydocker/pkg/commands/dummies.go:19.44,29.2 2 19 github.com/jesseduffield/lazydocker/pkg/commands/dummies.go:32.34,36.2 3 19 github.com/jesseduffield/lazydocker/pkg/commands/dummies.go:39.45,41.2 1 0 github.com/jesseduffield/lazydocker/pkg/commands/dummies.go:44.78,52.2 2 0 github.com/jesseduffield/lazydocker/pkg/commands/errors.go:18.33,19.16 1 1 github.com/jesseduffield/lazydocker/pkg/commands/errors.go:19.16,21.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/errors.go:23.2,23.28 1 1 github.com/jesseduffield/lazydocker/pkg/commands/errors.go:35.61,39.2 3 0 github.com/jesseduffield/lazydocker/pkg/commands/errors.go:42.52,44.2 1 0 github.com/jesseduffield/lazydocker/pkg/commands/errors.go:46.39,48.2 1 0 github.com/jesseduffield/lazydocker/pkg/commands/errors.go:51.45,53.35 2 0 github.com/jesseduffield/lazydocker/pkg/commands/errors.go:53.35,55.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/errors.go:56.2,56.14 1 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:31.70,32.85 1 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:32.85,34.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:36.2,36.12 1 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:39.85,41.25 2 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:41.25,43.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:45.2,46.18 2 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:46.18,48.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:49.2,50.23 2 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:50.23,52.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:54.2,56.64 3 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:56.64,60.3 3 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:62.2,66.18 4 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:66.18,68.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:70.2,75.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:79.49,81.16 2 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:81.16,83.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:85.2,85.85 1 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:85.85,87.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:89.2,92.33 3 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:96.59,98.16 2 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:98.16,100.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:102.2,104.31 2 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:104.31,107.20 3 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:107.20,109.4 1 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:111.3,114.25 4 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:114.25,118.88 3 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:118.88,119.40 1 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:119.40,121.11 2 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:126.3,135.4 1 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:138.2,138.23 1 0 github.com/jesseduffield/lazydocker/pkg/commands/image.go:142.45,145.2 2 0 github.com/jesseduffield/lazydocker/pkg/commands/network.go:23.63,25.16 2 0 github.com/jesseduffield/lazydocker/pkg/commands/network.go:25.16,27.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/network.go:29.2,31.35 2 0 github.com/jesseduffield/lazydocker/pkg/commands/network.go:31.35,40.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/network.go:42.2,42.25 1 0 github.com/jesseduffield/lazydocker/pkg/commands/network.go:46.47,49.2 2 0 github.com/jesseduffield/lazydocker/pkg/commands/network.go:52.34,54.2 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:42.75,50.2 1 19 github.com/jesseduffield/lazydocker/pkg/commands/os.go:54.71,56.2 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:59.74,65.2 5 5 github.com/jesseduffield/lazydocker/pkg/commands/os.go:68.102,74.2 5 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:77.76,79.2 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:82.56,85.2 2 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:88.71,91.2 2 5 github.com/jesseduffield/lazydocker/pkg/commands/os.go:94.99,97.2 2 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:99.73,102.32 2 2 github.com/jesseduffield/lazydocker/pkg/commands/os.go:102.32,111.3 1 1 github.com/jesseduffield/lazydocker/pkg/commands/os.go:111.8,113.3 1 1 github.com/jesseduffield/lazydocker/pkg/commands/os.go:115.2,115.86 1 2 github.com/jesseduffield/lazydocker/pkg/commands/os.go:119.54,122.2 2 3 github.com/jesseduffield/lazydocker/pkg/commands/os.go:125.50,127.16 2 4 github.com/jesseduffield/lazydocker/pkg/commands/os.go:127.16,129.3 1 1 github.com/jesseduffield/lazydocker/pkg/commands/os.go:130.2,130.22 1 3 github.com/jesseduffield/lazydocker/pkg/commands/os.go:130.22,132.3 1 1 github.com/jesseduffield/lazydocker/pkg/commands/os.go:133.2,133.15 1 2 github.com/jesseduffield/lazydocker/pkg/commands/os.go:136.71,138.16 2 5 github.com/jesseduffield/lazydocker/pkg/commands/os.go:138.16,142.9 2 3 github.com/jesseduffield/lazydocker/pkg/commands/os.go:142.9,144.4 1 2 github.com/jesseduffield/lazydocker/pkg/commands/os.go:145.3,145.28 1 1 github.com/jesseduffield/lazydocker/pkg/commands/os.go:147.2,147.26 1 2 github.com/jesseduffield/lazydocker/pkg/commands/os.go:151.53,160.2 5 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:163.49,172.2 5 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:176.66,178.18 2 4 github.com/jesseduffield/lazydocker/pkg/commands/os.go:178.18,180.3 1 3 github.com/jesseduffield/lazydocker/pkg/commands/os.go:181.2,181.18 1 4 github.com/jesseduffield/lazydocker/pkg/commands/os.go:181.18,182.50 1 2 github.com/jesseduffield/lazydocker/pkg/commands/os.go:182.50,184.4 1 1 github.com/jesseduffield/lazydocker/pkg/commands/os.go:186.2,186.18 1 4 github.com/jesseduffield/lazydocker/pkg/commands/os.go:186.18,188.3 1 1 github.com/jesseduffield/lazydocker/pkg/commands/os.go:190.2,190.51 1 3 github.com/jesseduffield/lazydocker/pkg/commands/os.go:194.88,196.2 1 3 github.com/jesseduffield/lazydocker/pkg/commands/os.go:199.50,201.32 2 5 github.com/jesseduffield/lazydocker/pkg/commands/os.go:201.32,207.3 2 1 github.com/jesseduffield/lazydocker/pkg/commands/os.go:207.8,215.3 2 4 github.com/jesseduffield/lazydocker/pkg/commands/os.go:216.2,216.32 1 5 github.com/jesseduffield/lazydocker/pkg/commands/os.go:221.52,223.2 1 1 github.com/jesseduffield/lazydocker/pkg/commands/os.go:226.67,228.16 2 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:228.16,230.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:231.2,234.16 3 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:234.16,236.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:237.2,237.12 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:241.78,243.16 2 1 github.com/jesseduffield/lazydocker/pkg/commands/os.go:243.16,246.3 2 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:248.2,248.56 1 1 github.com/jesseduffield/lazydocker/pkg/commands/os.go:248.56,251.3 2 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:252.2,252.40 1 1 github.com/jesseduffield/lazydocker/pkg/commands/os.go:252.40,255.3 2 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:257.2,257.28 1 1 github.com/jesseduffield/lazydocker/pkg/commands/os.go:261.51,264.2 2 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:267.59,268.41 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:268.41,269.25 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:269.25,271.4 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:272.3,272.20 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:274.2,274.18 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:280.61,284.16 4 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:284.16,285.26 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:285.26,287.4 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:288.3,288.31 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:290.2,290.12 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:294.48,296.16 2 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:296.16,298.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:299.2,299.29 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:303.64,305.2 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:308.66,311.37 2 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:311.37,313.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:315.2,315.35 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:315.35,317.17 2 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:317.17,319.4 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:321.3,321.27 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:327.2,332.27 4 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:332.27,334.13 2 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:334.13,336.18 2 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:336.18,338.5 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:340.4,340.45 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:340.45,342.5 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:344.4,344.52 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:344.52,345.19 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:345.19,347.6 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:350.4,350.44 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:350.44,352.5 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:354.4,354.13 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:358.2,360.26 2 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:360.26,362.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:363.2,363.12 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:367.47,369.2 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os.go:372.55,374.2 1 0 github.com/jesseduffield/lazydocker/pkg/commands/os_default_platform.go:10.30,18.2 1 19 github.com/jesseduffield/lazydocker/pkg/commands/service.go:23.76,25.2 1 0 github.com/jesseduffield/lazydocker/pkg/commands/service.go:28.32,30.2 1 0 github.com/jesseduffield/lazydocker/pkg/commands/service.go:33.30,35.2 1 0 github.com/jesseduffield/lazydocker/pkg/commands/service.go:38.35,40.2 1 0 github.com/jesseduffield/lazydocker/pkg/commands/service.go:43.33,45.2 1 0 github.com/jesseduffield/lazydocker/pkg/commands/service.go:47.59,53.2 2 0 github.com/jesseduffield/lazydocker/pkg/commands/service.go:56.47,58.2 1 0 github.com/jesseduffield/lazydocker/pkg/commands/service.go:61.49,72.2 5 0 github.com/jesseduffield/lazydocker/pkg/commands/service.go:75.66,83.2 3 0 github.com/jesseduffield/lazydocker/pkg/commands/volume.go:23.61,25.16 2 0 github.com/jesseduffield/lazydocker/pkg/commands/volume.go:25.16,27.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/volume.go:29.2,33.33 3 0 github.com/jesseduffield/lazydocker/pkg/commands/volume.go:33.33,42.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/volume.go:44.2,44.24 1 0 github.com/jesseduffield/lazydocker/pkg/commands/volume.go:48.46,51.2 2 0 github.com/jesseduffield/lazydocker/pkg/commands/volume.go:54.43,56.2 1 0 mode: atomic github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:32.53,36.83 1 0 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:36.83,38.4 1 0 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:39.39,39.61 1 0 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:48.66,52.16 4 3 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:52.16,55.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:58.2,58.23 1 3 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:58.23,60.17 2 1 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:60.17,62.4 1 0 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:63.3,64.17 2 1 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:64.17,66.4 1 0 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:68.3,68.21 1 1 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:70.2,70.26 1 2 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:75.33,75.47 1 1 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:85.44,87.2 1 0 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:89.117,91.16 2 1 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:91.16,93.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:94.2,97.16 3 1 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:97.16,99.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:103.2,108.16 5 1 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:108.16,110.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:113.2,118.8 2 1 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:123.87,127.6 3 1 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:127.6,128.10 1 1 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:129.21,130.20 1 0 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:131.14,131.14 0 1 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:134.3,135.17 2 1 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:135.17,136.12 1 0 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:138.3,138.13 1 1 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:143.79,145.16 2 1 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:145.16,147.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:148.2,149.12 2 1 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:152.101,156.16 4 1 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:156.16,158.3 1 0 github.com/jesseduffield/lazydocker/pkg/commands/ssh/ssh.go:159.2,159.17 1 1 mode: atomic mode: atomic ================================================ FILE: docker-compose.yml ================================================ services: lazydocker: build: context: https://github.com/jesseduffield/lazydocker.git args: BASE_IMAGE_BUILDER: golang GOARCH: amd64 GOARM: image: lazyteam/lazydocker container_name: lazydocker stdin_open: true tty: true volumes: - /var/run/docker.sock:/var/run/docker.sock - ./config:/.config/jesseduffield/lazydocker ================================================ FILE: docs/Config.md ================================================ # User Config: ## Opening The User Config The location of the user config will differ depending on your OS. You can open it via lazydocker by opening the application, clicking on the 'project' panel at the top left and pressing 'o' (or pressing 'e' if your files open in vim). Changes to the user config will only take place after closing and re-opening lazydocker ### Locations: - OSX: `~/Library/Application Support/jesseduffield/lazydocker/config.yml` - Linux: `~/.config/lazydocker/config.yml` - Windows: `C:\Users\\AppData\Roaming\lazydocker\config.yml` JSON schema is available for `config.yml` so that IntelliSense in Visual Studio Code (completion and error checking) is automatically enabled when the [YAML Red Hat][yaml] extension is installed. However, note that automatic schema detection only works if your config file is in one of the standard paths mentioned above. If you override the path to the file, you can still make IntelliSense work by adding ```yaml # yaml-language-server: $schema=https://json.schemastore.org/lazydocker.json ``` to the top of your config file or via [Visual Studio Code settings.json config][settings]. [yaml]: https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml [settings]: https://github.com/redhat-developer/vscode-yaml#associating-a-schema-to-a-glob-pattern-via-yamlschemas ## Default: ```yml gui: scrollHeight: 2 language: "auto" # one of 'auto' | 'en' | 'pl' | 'nl' | 'de' | 'tr' border: "rounded" # one of 'rounded' | 'single' | 'double' | 'hidden' theme: activeBorderColor: - green - bold inactiveBorderColor: - white selectedLineBgColor: - blue optionsTextColor: - blue returnImmediately: false wrapMainPanel: true # Side panel width as a ratio of the screen's width sidePanelWidth: 0.333 # Determines whether we show the bottom line (the one containing keybinding # info and the status of the app). showBottomLine: true # When true, increases vertical space used by focused side panel, # creating an accordion effect expandFocusedSidePanel: false # Determines which screen mode will be used on startup screenMode: "normal" # one of 'normal' | 'half' | 'fullscreen' # Determines the style of the container status and container health display in the # containers panel. "long": full words (default), "short": one or two characters, # "icon": unicode emoji. containerStatusHealthStyle: "long" logs: timestamps: false since: '60m' # set to '' to show all logs tail: '' # set to 200 to show last 200 lines of logs commandTemplates: dockerCompose: docker compose # Determines the Docker Compose command to run, referred to as .DockerCompose in commandTemplates restartService: '{{ .DockerCompose }} restart {{ .Service.Name }}' up: '{{ .DockerCompose }} up -d' down: '{{ .DockerCompose }} down' downWithVolumes: '{{ .DockerCompose }} down --volumes' upService: '{{ .DockerCompose }} up -d {{ .Service.Name }}' startService: '{{ .DockerCompose }} start {{ .Service.Name }}' stopService: '{{ .DockerCompose }} stop {{ .Service.Name }}' serviceLogs: '{{ .DockerCompose }} logs --since=60m --follow {{ .Service.Name }}' viewServiceLogs: '{{ .DockerCompose }} logs --follow {{ .Service.Name }}' rebuildService: '{{ .DockerCompose }} up -d --build {{ .Service.Name }}' recreateService: '{{ .DockerCompose }} up -d --force-recreate {{ .Service.Name }}' allLogs: '{{ .DockerCompose }} logs --tail=300 --follow' viewAlLogs: '{{ .DockerCompose }} logs' dockerComposeConfig: '{{ .DockerCompose }} config' checkDockerComposeConfig: '{{ .DockerCompose }} config --quiet' serviceTop: '{{ .DockerCompose }} top {{ .Service.Name }}' oS: openCommand: open {{filename}} openLinkCommand: open {{link}} stats: graphs: - caption: CPU (%) statPath: DerivedStats.CPUPercentage color: blue - caption: Memory (%) statPath: DerivedStats.MemoryPercentage color: green ``` ## To see what all of the config options mean, and what other options you can set, see [here](https://godoc.org/github.com/jesseduffield/lazydocker/pkg/config) ## Color Attributes: For color attributes you can choose an array of attributes (with max one color attribute) The available attributes are: - default - black - red - green - yellow - blue - magenta - cyan - white - bold - reverse # useful for high-contrast - underline ## Custom Commands You can add custom commands like so: ```yaml customCommands: containers: - name: bash attach: true command: 'docker exec -it {{ .Container.ID }} bash' serviceNames: [] ``` You may use the following go templates (such as `{{ .Container.ID }}` above) in your commands: - `{{ .DockerCompose }}`: the docker compose command (default: `docker-compose`) - [`{{ .Container }}`](https://pkg.go.dev/github.com/jesseduffield/lazydocker@v0.20.0/pkg/commands#Container) and its fields. For example: `{{ .Container.Container.ImageID }}` - [`{{ .Service }}`](https://pkg.go.dev/github.com/jesseduffield/lazydocker@v0.20.0/pkg/commands#Service) and its fields. For example: `{{ .Service.Name }}` ## Replacements You can add replacements like so: ```yaml replacements: imageNamePrefixes: '123456789012.dkr.ecr.us-east-1.amazonaws.com': '' '923456789999.dkr.ecr.us-east-1.amazonaws.com': '' ``` ================================================ FILE: docs/keybindings/Keybindings_de.md ================================================ _This file is auto-generated. To update, make the changes in the pkg/i18n directory and then run `go run scripts/cheatsheet/main.go generate` from the project root._ # Lazydocker menü ## Projekt
  e: bearbeite lazydocker Konfiguration
  o: öffne lazydocker Konfiguration
  m: zeige Protokolle
  enter: fokussieren aufs Hauptpanel
  [: vorheriges Tab
  ]: nächstes Tab
  /: filter list
## Container
  d: entfernen
  e: hide/show stopped containers
  p: pause
  s: anhalten
  r: neustarten
  a: anbinden
  m: zeige Protokolle
  E: exec shell
  c: führe vordefinierten benutzerdefinierten Befehl aus
  b: view bulk commands
  w: open in browser (first port is http)
  enter: fokussieren aufs Hauptpanel
  [: vorheriges Tab
  ]: nächstes Tab
  /: filter list
## Dienste
  u: up service
  d: entferne Container
  s: anhalten
  p: pause
  r: neustarten
  S: start
  a: anbinden
  m: zeige Protokolle
  U: up project
  D: down project
  R: zeige Neustartoptionen
  c: führe vordefinierten benutzerdefinierten Befehl aus
  b: view bulk commands
  E: exec shell
  w: open in browser (first port is http)
  enter: fokussieren aufs Hauptpanel
  [: vorheriges Tab
  ]: nächstes Tab
  /: filter list
## Images
  c: führe vordefinierten benutzerdefinierten Befehl aus
  d: entferne Image
  b: view bulk commands
  enter: fokussieren aufs Hauptpanel
  [: vorheriges Tab
  ]: nächstes Tab
  /: filter list
## Volumes
  c: führe vordefinierten benutzerdefinierten Befehl aus
  d: entferne Volume
  b: view bulk commands
  enter: fokussieren aufs Hauptpanel
  [: vorheriges Tab
  ]: nächstes Tab
  /: filter list
## Netzwerk
  c: führe vordefinierten benutzerdefinierten Befehl aus
  d: entferne Netzwerk
  b: view bulk commands
  enter: fokussieren aufs Hauptpanel
  [: vorheriges Tab
  ]: nächstes Tab
  /: filter list
## Haupt
  esc: zurück
## Global
  +: next screen mode (normal/half/fullscreen)
  _: prev screen mode
  1: focus projects panel
  2: focus services panel
  3: focus containers panel
  4: focus images panel
  5: focus volumes panel
  6: focus networks panel
================================================ FILE: docs/keybindings/Keybindings_en.md ================================================ _This file is auto-generated. To update, make the changes in the pkg/i18n directory and then run `go run scripts/cheatsheet/main.go generate` from the project root._ # Lazydocker menu ## Project
  e: edit lazydocker config
  o: open lazydocker config
  m: view logs
  enter: focus main panel
  [: previous tab
  ]: next tab
  /: filter list
## Containers
  d: remove
  e: hide/show stopped containers
  p: pause
  s: stop
  r: restart
  a: attach
  m: view logs
  E: exec shell
  c: run predefined custom command
  b: view bulk commands
  w: open in browser (first port is http)
  enter: focus main panel
  [: previous tab
  ]: next tab
  /: filter list
## Services
  u: up service
  d: remove containers
  s: stop
  p: pause
  r: restart
  S: start
  a: attach
  m: view logs
  U: up project
  D: down project
  R: view restart options
  c: run predefined custom command
  b: view bulk commands
  E: exec shell
  w: open in browser (first port is http)
  enter: focus main panel
  [: previous tab
  ]: next tab
  /: filter list
## Images
  c: run predefined custom command
  d: remove image
  b: view bulk commands
  enter: focus main panel
  [: previous tab
  ]: next tab
  /: filter list
## Volumes
  c: run predefined custom command
  d: remove volume
  b: view bulk commands
  enter: focus main panel
  [: previous tab
  ]: next tab
  /: filter list
## Networks
  c: run predefined custom command
  d: remove network
  b: view bulk commands
  enter: focus main panel
  [: previous tab
  ]: next tab
  /: filter list
## Main
  esc: return
## Global
  +: next screen mode (normal/half/fullscreen)
  _: prev screen mode
  1: focus projects panel
  2: focus services panel
  3: focus containers panel
  4: focus images panel
  5: focus volumes panel
  6: focus networks panel
================================================ FILE: docs/keybindings/Keybindings_es.md ================================================ _This file is auto-generated. To update, make the changes in the pkg/i18n directory and then run `go run scripts/cheatsheet/main.go generate` from the project root._ # Lazydocker menú ## Proyecto
  e: editar configuración de lazydocker
  o: abrir configuración de lazydocker
  m: ver logs
  enter: enfocar panel principal
  [: anterior pestaña
  ]: siguiente pestaña
  /: filtrar lista
## Contenedores
  d: borrar
  e: esconder/mostrar contenedores parados
  p: pausa
  s: parar
  r: reiniciar
  a: attach
  m: ver logs
  E: ejecutar shell
  c: ejecutar comando personalizado
  b: ver comandos masivos
  w: abrir en navegador (first port is http)
  enter: enfocar panel principal
  [: anterior pestaña
  ]: siguiente pestaña
  /: filtrar lista
## Servicios
  u: levantar servicio
  d: borrar contenedores
  s: parar
  p: pausa
  r: reiniciar
  S: iniciar
  a: attach
  m: ver logs
  U: levantar proyecto
  D: dar de baja el proyecto
  R: ver opciones de reinicio
  c: ejecutar comando personalizado
  b: ver comandos masivos
  E: ejecutar shell
  w: abrir en navegador (first port is http)
  enter: enfocar panel principal
  [: anterior pestaña
  ]: siguiente pestaña
  /: filtrar lista
## Imágenes
  c: ejecutar comando personalizado
  d: limpiar imagen
  b: ver comandos masivos
  enter: enfocar panel principal
  [: anterior pestaña
  ]: siguiente pestaña
  /: filtrar lista
## Volúmenes
  c: ejecutar comando personalizado
  d: limpiar volúmen
  b: ver comandos masivos
  enter: enfocar panel principal
  [: anterior pestaña
  ]: siguiente pestaña
  /: filtrar lista
## Redes
  c: ejecutar comando personalizado
  d: limpiar red
  b: ver comandos masivos
  enter: enfocar panel principal
  [: anterior pestaña
  ]: siguiente pestaña
  /: filtrar lista
## Inicio
  esc: regresar
## Global
  +: next screen mode (normal/half/fullscreen)
  _: prev screen mode
  1: focus projects panel
  2: focus services panel
  3: focus containers panel
  4: focus images panel
  5: focus volumes panel
  6: focus networks panel
================================================ FILE: docs/keybindings/Keybindings_fr.md ================================================ _This file is auto-generated. To update, make the changes in the pkg/i18n directory and then run `go run scripts/cheatsheet/main.go generate` from the project root._ # Lazydocker menu ## Projet
  e: modifier la configuration lazydocker
  o: ouvrir la configuration lazydocker
  m: voir les enregistrements
  enter: focus panneau principal
  [: onglet précédent
  ]: onglet suivant
  /: filter list
## Conteneurs
  d: supprimer
  e: cacher/montrer les conteneurs arrêtés
  p: pause
  s: arrêter
  r: redémarrer
  a: attacher
  m: voir les enregistrements
  E: exécuter le shell
  c: exécuter une commande prédéfinie
  b: voir les commandes groupées
  w: ouvrir dans le navigateur (le premier port est http)
  enter: focus panneau principal
  [: onglet précédent
  ]: onglet suivant
  /: filter list
## Services
  u: up service
  d: supprimer les conteneurs
  s: arrêter
  p: pause
  r: redémarrer
  S: démarrer
  a: attacher
  m: voir les enregistrements
  U: up project
  D: down project
  R: voir les options de redémarrage
  c: exécuter une commande prédéfinie
  b: voir les commandes groupées
  E: exécuter le shell
  w: ouvrir dans le navigateur (le premier port est http)
  enter: focus panneau principal
  [: onglet précédent
  ]: onglet suivant
  /: filter list
## Images
  c: exécuter une commande prédéfinie
  d: supprimer l'image
  b: voir les commandes groupées
  enter: focus panneau principal
  [: onglet précédent
  ]: onglet suivant
  /: filter list
## Volumes
  c: exécuter une commande prédéfinie
  d: supprimer le volume
  b: voir les commandes groupées
  enter: focus panneau principal
  [: onglet précédent
  ]: onglet suivant
  /: filter list
## Réseaux
  c: exécuter une commande prédéfinie
  d: supprimer le réseau
  b: voir les commandes groupées
  enter: focus panneau principal
  [: onglet précédent
  ]: onglet suivant
  /: filter list
## Principal
  esc: retour
## Global
  +: next screen mode (normal/half/fullscreen)
  _: prev screen mode
  1: focus projects panel
  2: focus services panel
  3: focus containers panel
  4: focus images panel
  5: focus volumes panel
  6: focus networks panel
================================================ FILE: docs/keybindings/Keybindings_nl.md ================================================ _This file is auto-generated. To update, make the changes in the pkg/i18n directory and then run `go run scripts/cheatsheet/main.go generate` from the project root._ # Lazydocker menu ## Project
  e: verander de lazydocker configuratie
  o: open de lazydocker configuratie
  m: bekijk logs
  enter: focus hoofdpaneel
  [: vorige tab
  ]: volgende tab
  /: filter list
## Containers
  d: verwijder
  e: verberg gestopte containers
  p: pause
  s: stop
  r: herstart
  a: verbinden
  m: bekijk logs
  E: exec shell
  c: draai een vooraf bedacht aangepaste opdracht
  b: view bulk commands
  w: open in browser (first port is http)
  enter: focus hoofdpaneel
  [: vorige tab
  ]: volgende tab
  /: filter list
## Diensten
  u: up service
  d: verwijder containers
  s: stop
  p: pause
  r: herstart
  S: start
  a: verbinden
  m: bekijk logs
  U: up project
  D: down project
  R: bekijk herstart opties
  c: draai een vooraf bedacht aangepaste opdracht
  b: view bulk commands
  E: exec shell
  w: open in browser (first port is http)
  enter: focus hoofdpaneel
  [: vorige tab
  ]: volgende tab
  /: filter list
## Images
  c: draai een vooraf bedacht aangepaste opdracht
  d: verwijder image
  b: view bulk commands
  enter: focus hoofdpaneel
  [: vorige tab
  ]: volgende tab
  /: filter list
## Volumes
  c: draai een vooraf bedacht aangepaste opdracht
  d: verwijder volume
  b: view bulk commands
  enter: focus hoofdpaneel
  [: vorige tab
  ]: volgende tab
  /: filter list
## Networks
  c: draai een vooraf bedacht aangepaste opdracht
  d: verwijder network
  b: view bulk commands
  enter: focus hoofdpaneel
  [: vorige tab
  ]: volgende tab
  /: filter list
## Hoofd
  esc: terug
## Globaal
  +: next screen mode (normal/half/fullscreen)
  _: prev screen mode
  1: focus projects panel
  2: focus services panel
  3: focus containers panel
  4: focus images panel
  5: focus volumes panel
  6: focus networks panel
================================================ FILE: docs/keybindings/Keybindings_pl.md ================================================ _This file is auto-generated. To update, make the changes in the pkg/i18n directory and then run `go run scripts/cheatsheet/main.go generate` from the project root._ # Lazydocker menu ## Projekt
  e: edytuj konfigurację
  o: otwórz konfigurację
  m: pokaż logi
  enter: skup na głównym panelu
  [: poprzednia zakładka
  ]: następna zakładka
  /: filter list
## Kontenery
  d: usuń
  e: hide/show stopped containers
  p: pause
  s: zatrzymaj
  r: restartuj
  a: przyczep
  m: pokaż logi
  E: exec shell
  c: wykonaj predefiniowaną własną komende
  b: view bulk commands
  w: open in browser (first port is http)
  enter: skup na głównym panelu
  [: poprzednia zakładka
  ]: następna zakładka
  /: filter list
## Serwisy
  u: up service
  d: usuń kontenery
  s: zatrzymaj
  p: pause
  r: restartuj
  S: start
  a: przyczep
  m: pokaż logi
  U: up project
  D: down project
  R: pokaż opcje restartu
  c: wykonaj predefiniowaną własną komende
  b: view bulk commands
  E: exec shell
  w: open in browser (first port is http)
  enter: skup na głównym panelu
  [: poprzednia zakładka
  ]: następna zakładka
  /: filter list
## Obrazy
  c: wykonaj predefiniowaną własną komende
  d: usuń obraz
  b: view bulk commands
  enter: skup na głównym panelu
  [: poprzednia zakładka
  ]: następna zakładka
  /: filter list
## Wolumeny
  c: wykonaj predefiniowaną własną komende
  d: usuń wolumen
  b: view bulk commands
  enter: skup na głównym panelu
  [: poprzednia zakładka
  ]: następna zakładka
  /: filter list
## Sieci
  c: wykonaj predefiniowaną własną komende
  d: usuń sieci
  b: view bulk commands
  enter: skup na głównym panelu
  [: poprzednia zakładka
  ]: następna zakładka
  /: filter list
## Główne
  esc: powrót
## Globalne
  +: next screen mode (normal/half/fullscreen)
  _: prev screen mode
  1: focus projects panel
  2: focus services panel
  3: focus containers panel
  4: focus images panel
  5: focus volumes panel
  6: focus networks panel
================================================ FILE: docs/keybindings/Keybindings_pt.md ================================================ _This file is auto-generated. To update, make the changes in the pkg/i18n directory and then run `go run scripts/cheatsheet/main.go generate` from the project root._ # Lazydocker menu ## Projeto
  e: editar configuração do lazydocker
  o: abrir configuração do lazydocker
  m: ver logs
  enter: focar no painel principal
  [: aba anterior
  ]: próxima aba
  /: filtrar lista
## Contêineres
  d: remover
  e: ocultar/mostrar contêineres parados
  p: pausar
  s: parar
  r: reiniciar
  a: anexar
  m: ver logs
  E: executar shell
  c: executar comando personalizado predefinido
  b: ver comandos em massa
  w: abrir no navegador (primeira porta é http)
  enter: focar no painel principal
  [: aba anterior
  ]: próxima aba
  /: filtrar lista
## Serviços
  u: subir serviço
  d: remover contêineres
  s: parar
  p: pausar
  r: reiniciar
  S: iniciar
  a: anexar
  m: ver logs
  U: subir projeto
  D: derrubar projeto
  R: ver opções de reinício
  c: executar comando personalizado predefinido
  b: ver comandos em massa
  E: executar shell
  w: abrir no navegador (primeira porta é http)
  enter: focar no painel principal
  [: aba anterior
  ]: próxima aba
  /: filtrar lista
## Imagens
  c: executar comando personalizado predefinido
  d: remover imagem
  b: ver comandos em massa
  enter: focar no painel principal
  [: aba anterior
  ]: próxima aba
  /: filtrar lista
## Volumes
  c: executar comando personalizado predefinido
  d: remover volume
  b: ver comandos em massa
  enter: focar no painel principal
  [: aba anterior
  ]: próxima aba
  /: filtrar lista
## Redes
  c: executar comando personalizado predefinido
  d: remover rede
  b: ver comandos em massa
  enter: focar no painel principal
  [: aba anterior
  ]: próxima aba
  /: filtrar lista
## Principal
  esc: retornar
## Global
  +: modo de tela seguinte (normal/meia/tela cheia)
  _: modo de tela anterior
  1: focus projects panel
  2: focus services panel
  3: focus containers panel
  4: focus images panel
  5: focus volumes panel
  6: focus networks panel
================================================ FILE: docs/keybindings/Keybindings_tr.md ================================================ _This file is auto-generated. To update, make the changes in the pkg/i18n directory and then run `go run scripts/cheatsheet/main.go generate` from the project root._ # Lazydocker menü ## Proje
  e: lazzydocker ayarlarını düzenle
  o: lazydocker ayarlarını aç
  m: kayıt defterini görüntüle
  enter: ana panele odaklan
  [: önceki sekme
  ]: sonraki sekme
  /: filter list
## Konteynerler
  d: kaldır
  e: hide/show stopped containers
  p: pause
  s: durdur
  r: yeniden başlat
  a: bağlan/iliştir
  m: kayıt defterini görüntüle
  E: exec shell
  c: önceden tanımlanmış özel komutu çalıştır
  b: view bulk commands
  w: open in browser (first port is http)
  enter: ana panele odaklan
  [: önceki sekme
  ]: sonraki sekme
  /: filter list
## Servisler
  u: up service
  d: konteynerleri kaldır
  s: durdur
  p: pause
  r: yeniden başlat
  S: start
  a: bağlan/iliştir
  m: kayıt defterini görüntüle
  U: up project
  D: down project
  R: yeniden başlatma seçeneklerini görüntüle
  c: önceden tanımlanmış özel komutu çalıştır
  b: view bulk commands
  E: exec shell
  w: open in browser (first port is http)
  enter: ana panele odaklan
  [: önceki sekme
  ]: sonraki sekme
  /: filter list
## Imajlar
  c: önceden tanımlanmış özel komutu çalıştır
  d: imajı kaldır
  b: view bulk commands
  enter: ana panele odaklan
  [: önceki sekme
  ]: sonraki sekme
  /: filter list
## Alanlar
  c: önceden tanımlanmış özel komutu çalıştır
  d: alanı kaldır
  b: view bulk commands
  enter: ana panele odaklan
  [: önceki sekme
  ]: sonraki sekme
  /: filter list
## Ağları
  c: önceden tanımlanmış özel komutu çalıştır
  d: ağı kaldır
  b: view bulk commands
  enter: ana panele odaklan
  [: önceki sekme
  ]: sonraki sekme
  /: filter list
## Ana
  esc: dönüş
## Global
  +: next screen mode (normal/half/fullscreen)
  _: prev screen mode
  1: focus projects panel
  2: focus services panel
  3: focus containers panel
  4: focus images panel
  5: focus volumes panel
  6: focus networks panel
================================================ FILE: docs/keybindings/Keybindings_zh.md ================================================ _This file is auto-generated. To update, make the changes in the pkg/i18n directory and then run `go run scripts/cheatsheet/main.go generate` from the project root._ # Lazydocker 菜单 ## 项目
  e: 编辑lazydocker配置
  o: 打开lazydocker配置
  m: 查看日志
  enter: 聚焦主面板
  [: 上一个选项卡
  ]: 下一个选项卡
  /: 过滤列表
## 容器
  d: 移除
  e: 隐藏/显示已停止的容器
  p: 暂停
  s: 停止
  r: 重新启动
  a: attach
  m: 查看日志
  E: 执行shell
  c: 运行预定义的自定义命令
  b: 查看批量命令
  w: 在浏览器中打开(第一个端口为http)
  enter: 聚焦主面板
  [: 上一个选项卡
  ]: 下一个选项卡
  /: 过滤列表
## 服务
  u: 启动服务
  d: 移除容器
  s: 停止
  p: 暂停
  r: 重新启动
  S: 启动项目
  a: attach
  m: 查看日志
  U: 创建并启动容器
  D: 停止并移除容器
  R: 查看重启选项
  c: 运行预定义的自定义命令
  b: 查看批量命令
  E: 执行shell
  w: 在浏览器中打开(第一个端口为http)
  enter: 聚焦主面板
  [: 上一个选项卡
  ]: 下一个选项卡
  /: 过滤列表
## 镜像
  c: 运行预定义的自定义命令
  d: 移除镜像
  b: 查看批量命令
  enter: 聚焦主面板
  [: 上一个选项卡
  ]: 下一个选项卡
  /: 过滤列表
## 卷
  c: 运行预定义的自定义命令
  d: 移除卷
  b: 查看批量命令
  enter: 聚焦主面板
  [: 上一个选项卡
  ]: 下一个选项卡
  /: 过滤列表
## 网络
  c: 运行预定义的自定义命令
  d: 移除网络
  b: 查看批量命令
  enter: 聚焦主面板
  [: 上一个选项卡
  ]: 下一个选项卡
  /: 过滤列表
## 主要
  esc: 返回
## 全局
  +: 下一个屏幕模式(正常/半屏/全屏)
  _: 上一个屏幕模式
  1: focus projects panel
  2: focus services panel
  3: focus containers panel
  4: focus images panel
  5: focus volumes panel
  6: focus networks panel
================================================ FILE: go.mod ================================================ module github.com/jesseduffield/lazydocker go 1.22 toolchain go1.23.6 require ( github.com/OpenPeeDeeP/xdg v0.2.1-0.20190312153938-4ba9e1eb294c github.com/boz/go-throttle v0.0.0-20160922054636-fdc4eab740c1 github.com/cloudfoundry/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21 github.com/docker/cli v27.1.1+incompatible github.com/docker/docker v28.5.2+incompatible github.com/fatih/color v1.10.0 github.com/go-errors/errors v1.5.1 github.com/gookit/color v1.5.0 github.com/imdario/mergo v0.3.16 github.com/integrii/flaggy v1.4.0 github.com/jesseduffield/asciigraph v0.0.0-20190605104717-6d88e39309ee github.com/jesseduffield/gocui v0.3.1-0.20240418080333-8cd33929c513 github.com/jesseduffield/kill v0.0.0-20220618033138-bfbe04675d10 github.com/jesseduffield/lazycore v0.0.0-20221023210126-718a4caea996 github.com/jesseduffield/yaml v0.0.0-20190702115811-b900b7e08b56 github.com/mattn/go-runewidth v0.0.15 github.com/mcuadros/go-lookup v0.0.0-20171110082742-5650f26be767 github.com/mgutz/str v1.2.0 github.com/pmezard/go-difflib v1.0.0 github.com/samber/lo v1.31.0 github.com/sasha-s/go-deadlock v0.3.1 github.com/sirupsen/logrus v1.9.3 github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad github.com/stretchr/testify v1.9.0 golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 ) require ( github.com/containerd/errdefs v1.0.0 // indirect github.com/containerd/errdefs/pkg v0.3.0 // indirect github.com/moby/sys/atomicwriter v0.1.0 // indirect github.com/moby/sys/sequential v0.6.0 // indirect ) require ( github.com/Microsoft/go-winio v0.6.2 // indirect github.com/containerd/log v0.1.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect github.com/docker/docker-credential-helpers v0.8.2 // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fvbommel/sortorder v1.1.0 // indirect github.com/gdamore/encoding v1.0.1 // indirect github.com/gdamore/tcell/v2 v2.7.4 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/goccy/go-yaml v1.11.0 github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/mattn/go-colorable v0.1.8 // indirect github.com/mattn/go-isatty v0.0.12 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/term v0.5.0 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/onsi/ginkgo v1.8.0 // indirect github.com/onsi/gomega v1.5.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 // indirect go.opentelemetry.io/otel/metric v1.28.0 // indirect go.opentelemetry.io/otel/sdk v1.28.0 // indirect go.opentelemetry.io/otel/trace v1.28.0 // indirect golang.org/x/crypto v0.24.0 // indirect golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect golang.org/x/sys v0.24.0 // indirect golang.org/x/term v0.21.0 // indirect golang.org/x/text v0.16.0 // indirect golang.org/x/time v0.5.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect ) ================================================ FILE: go.sum ================================================ github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/OpenPeeDeeP/xdg v0.2.1-0.20190312153938-4ba9e1eb294c h1:YDsGA6tou+tAxVe0Dre29iSbQ8TrWdWfwOisKArJT5E= github.com/OpenPeeDeeP/xdg v0.2.1-0.20190312153938-4ba9e1eb294c/go.mod h1:tMoSueLQlMf0TCldjrJLNIjAc5qAOIcHt5REi88/Ygo= github.com/boz/go-throttle v0.0.0-20160922054636-fdc4eab740c1 h1:1fx+RA5lk1ZkzPAUP7DEgZnVHYxEcHO77vQO/V8z/2Q= github.com/boz/go-throttle v0.0.0-20160922054636-fdc4eab740c1/go.mod h1:z0nyIb42Zs97wyX1V+8MbEFhHeTw1OgFQfR6q57ZuHc= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cloudfoundry/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21 h1:tuijfIjZyjZaHq9xDUh0tNitwXshJpbLkqMOJv4H3do= github.com/cloudfoundry/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21/go.mod h1:po7NpZ/QiTKzBKyrsEAxwnTamCoh8uDk/egRpQ7siIc= github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI= github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M= github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE= github.com/containerd/errdefs/pkg v0.3.0/go.mod h1:NJw6s9HwNuRhnjJhM7pylWwMyAkmCQvQ4GpJHEqRLVk= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/cli v27.1.1+incompatible h1:goaZxOqs4QKxznZjjBWKONQci/MywhtRv2oNn0GkeZE= github.com/docker/cli v27.1.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/docker v28.5.2+incompatible h1:DBX0Y0zAjZbSrm1uzOkdr1onVghKaftjlSWt4AFexzM= github.com/docker/docker v28.5.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZSeVMrFgOr3T+zrFAo= github.com/docker/docker-credential-helpers v0.8.2/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fvbommel/sortorder v1.1.0 h1:fUmoe+HLsBTctBDoaBwpQo5N+nrCp8g/BjKb/6ZQmYw= github.com/fvbommel/sortorder v1.1.0/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl+VrEg= github.com/gdamore/encoding v1.0.1 h1:YzKZckdBL6jVt2Gc+5p82qhrGiqMdG/eNs6Wy0u3Uhw= github.com/gdamore/encoding v1.0.1/go.mod h1:0Z0cMFinngz9kS1QfMjCP8TY7em3bZYeeklsSDPivEo= github.com/gdamore/tcell/v2 v2.7.4 h1:sg6/UnTM9jGpZU+oFYAsDahfchWAFW8Xx2yFinNSAYU= github.com/gdamore/tcell/v2 v2.7.4/go.mod h1:dSXtXTSK0VsW1biw65DZLZ2NKr7j0qP/0J7ONmsraWg= github.com/go-errors/errors v1.0.2/go.mod h1:psDX2osz5VnTOnFWbDeWwS7yejl+uV3FEWEp4lssFEs= github.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk= github.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/goccy/go-yaml v1.11.0 h1:n7Z+zx8S9f9KgzG6KtQKf+kwqXZlLNR2F6018Dgau54= github.com/goccy/go-yaml v1.11.0/go.mod h1:H+mJrWtjPTJAHvRbV09MCK9xYwODM+wRTVFFTWckfng= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gookit/color v1.5.0 h1:1Opow3+BWDwqor78DcJkJCIwnkviFi+rrOANki9BUFw= github.com/gookit/color v1.5.0/go.mod h1:43aQb+Zerm/BWh2GnrgOQm7ffz7tvQXEKV6BFMl7wAo= github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/integrii/flaggy v1.4.0 h1:A1x7SYx4jqu5NSrY14z8Z+0UyX2S5ygfJJrfolWR3zM= github.com/integrii/flaggy v1.4.0/go.mod h1:tnTxHeTJbah0gQ6/K0RW0J7fMUBk9MCF5blhm43LNpI= github.com/jesseduffield/asciigraph v0.0.0-20190605104717-6d88e39309ee h1:7Zi/OQlGbMz4MT2V1+prN/gv1C64NDyVb/MbJnS0ZfA= github.com/jesseduffield/asciigraph v0.0.0-20190605104717-6d88e39309ee/go.mod h1:Z9UKHveKXXgyo8ME7R8yxh/BUTFOK+FgfWKlhy8oOAg= github.com/jesseduffield/gocui v0.3.1-0.20240418080333-8cd33929c513 h1:Y1bw5iItrsDCumATc/rklIJ/6K+68ieiWZJedhrNuXo= github.com/jesseduffield/gocui v0.3.1-0.20240418080333-8cd33929c513/go.mod h1:XtEbqCbn45keRXEu+OMZkjN5gw6AEob59afsgHjokZ8= github.com/jesseduffield/kill v0.0.0-20220618033138-bfbe04675d10 h1:jmpr7KpX2+2GRiE91zTgfq49QvgiqB0nbmlwZ8UnOx0= github.com/jesseduffield/kill v0.0.0-20220618033138-bfbe04675d10/go.mod h1:aA97kHeNA+sj2Hbki0pvLslmE4CbDyhBeSSTUUnOuVo= github.com/jesseduffield/lazycore v0.0.0-20221023210126-718a4caea996 h1:CH1en6GpXSwnXl5Ehc4WX1NpS3uw9qbi7o9A4T2YYmA= github.com/jesseduffield/lazycore v0.0.0-20221023210126-718a4caea996/go.mod h1:qxN4mHOAyeIDLP7IK7defgPClM/z1Kze8VVQiaEjzsQ= github.com/jesseduffield/yaml v0.0.0-20190702115811-b900b7e08b56 h1:33wSxJWU/f2TAozHYtJ8zqBxEnEVYM+22moLoiAkxvg= github.com/jesseduffield/yaml v0.0.0-20190702115811-b900b7e08b56/go.mod h1:FZJBwOhE+RXz8EVZfY+xnbCw2cVOwxlK3/aIi581z/s= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mcuadros/go-lookup v0.0.0-20171110082742-5650f26be767 h1:BrhJNdEFWGuiJk/3/SwsG5Rex3zjFxYsDi2bpd7382Y= github.com/mcuadros/go-lookup v0.0.0-20171110082742-5650f26be767/go.mod h1:ct+byCpkFokm4J0tiuAvB8cf2ttm6GcCe89Yr25nGKg= github.com/mgutz/str v1.2.0 h1:4IzWSdIz9qPQWLfKZ0rJcV0jcUDpxvP4JVZ4GXQyvSw= github.com/mgutz/str v1.2.0/go.mod h1:w1v0ofgLaJdoD0HpQ3fycxKD1WtxpjSo151pK/31q6w= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/sys/atomicwriter v0.1.0 h1:kw5D/EqkBwsBFi0ss9v1VG3wIkVhzGvLklJ+w3A14Sw= github.com/moby/sys/atomicwriter v0.1.0/go.mod h1:Ul8oqv2ZMNHOceF643P6FKPXeCmYtlQMvpizfsSoaWs= github.com/moby/sys/sequential v0.6.0 h1:qrx7XFUd/5DxtqcoH1h438hF5TmOvzC/lspjy7zgvCU= github.com/moby/sys/sequential v0.6.0/go.mod h1:uyv8EUTrca5PnDsdMGXhZe6CCe8U/UiTWd+lL+7b/Ko= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0 h1:VkHVNpR4iVnU8XQR6DBm8BqYjN7CRzw+xKUbVVbbW9w= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/samber/lo v1.31.0 h1:Sfa+/064Tdo4SvlohQUQzBhgSer9v/coGvKQI/XLWAM= github.com/samber/lo v1.31.0/go.mod h1:HLeWcJRRyLKp3+/XBJvOrerCQn9mhdKMHyd7IRlgeQ8= github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad h1:fiWzISvDn0Csy5H0iwgAuJGQTUpVfEMJJd4nRFXogbc= github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/thoas/go-funk v0.9.1 h1:O549iLZqPpTUQ10ykd26sZhzD+rmR5pWhuElrhbC20M= github.com/thoas/go-funk v0.9.1/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q= github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 h1:QldyIu/L63oPpyvQmHgvgickp1Yw510KJOqX7H24mg8= github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 h1:j9+03ymgYhPKmeXGk5Zu+cIZOlVzd9Zv7QIiyItjFBU= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0/go.mod h1:Y5+XiUG4Emn1hTfciPzGPJaSI+RpDts6BnCIir0SLqk= go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0= google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= ================================================ FILE: hooks/build ================================================ #!/bin/bash docker build --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ --build-arg VCS_REF=`git rev-parse --short HEAD` \ --build-arg VERSION=`git describe --abbrev=0 --tag` \ -t $IMAGE_NAME . ================================================ FILE: main.go ================================================ package main import ( "bytes" "fmt" "log" "os" "runtime" "runtime/debug" "github.com/docker/docker/client" "github.com/go-errors/errors" "github.com/integrii/flaggy" "github.com/jesseduffield/lazydocker/pkg/app" "github.com/jesseduffield/lazydocker/pkg/config" "github.com/jesseduffield/lazydocker/pkg/utils" "github.com/jesseduffield/yaml" "github.com/samber/lo" ) const DEFAULT_VERSION = "unversioned" var ( commit string version = DEFAULT_VERSION date string buildSource = "unknown" configFlag = false debuggingFlag = false composeFiles []string projectName string ) func main() { updateBuildInfo() info := fmt.Sprintf( "%s\nDate: %s\nBuildSource: %s\nCommit: %s\nOS: %s\nArch: %s", version, date, buildSource, commit, runtime.GOOS, runtime.GOARCH, ) flaggy.SetName("lazydocker") flaggy.SetDescription("The lazier way to manage everything docker") flaggy.DefaultParser.AdditionalHelpPrepend = "https://github.com/jesseduffield/lazydocker" flaggy.Bool(&configFlag, "c", "config", "Print the current default config") flaggy.Bool(&debuggingFlag, "d", "debug", "a boolean") flaggy.StringSlice(&composeFiles, "f", "file", "Specify alternate compose files") flaggy.String(&projectName, "p", "project", "Specify a docker compose project name") flaggy.SetVersion(info) flaggy.Parse() if configFlag { var buf bytes.Buffer encoder := yaml.NewEncoder(&buf) err := encoder.Encode(config.GetDefaultConfig()) if err != nil { log.Fatal(err.Error()) } fmt.Printf("%v\n", buf.String()) os.Exit(0) } projectDir, err := os.Getwd() if err != nil { log.Fatal(err.Error()) } appConfig, err := config.NewAppConfig("lazydocker", version, commit, date, buildSource, debuggingFlag, composeFiles, projectDir, projectName) if err != nil { log.Fatal(err.Error()) } app, err := app.NewApp(appConfig) if err == nil { err = app.Run() } app.Close() if err != nil { if errMessage, known := app.KnownError(err); known { log.Println(errMessage) os.Exit(0) } if client.IsErrConnectionFailed(err) { log.Println(app.Tr.ConnectionFailed) os.Exit(0) } newErr := errors.Wrap(err, 0) stackTrace := newErr.ErrorStack() app.Log.Error(stackTrace) log.Fatalf("%s\n\n%s", app.Tr.ErrorOccurred, stackTrace) } } func updateBuildInfo() { if version == DEFAULT_VERSION { if buildInfo, ok := debug.ReadBuildInfo(); ok { revision, ok := lo.Find(buildInfo.Settings, func(setting debug.BuildSetting) bool { return setting.Key == "vcs.revision" }) if ok { commit = revision.Value // if lazydocker was built from source we'll show the version as the // abbreviated commit hash version = utils.SafeTruncate(revision.Value, 7) } // if version hasn't been set we assume that neither has the date time, ok := lo.Find(buildInfo.Settings, func(setting debug.BuildSetting) bool { return setting.Key == "vcs.time" }) if ok { date = time.Value } } } } ================================================ FILE: pkg/app/app.go ================================================ package app import ( "io" "strings" "github.com/jesseduffield/lazydocker/pkg/commands" "github.com/jesseduffield/lazydocker/pkg/config" "github.com/jesseduffield/lazydocker/pkg/gui" "github.com/jesseduffield/lazydocker/pkg/i18n" "github.com/jesseduffield/lazydocker/pkg/log" "github.com/jesseduffield/lazydocker/pkg/utils" "github.com/sirupsen/logrus" ) // App struct type App struct { closers []io.Closer Config *config.AppConfig Log *logrus.Entry OSCommand *commands.OSCommand DockerCommand *commands.DockerCommand Gui *gui.Gui Tr *i18n.TranslationSet ErrorChan chan error } // NewApp bootstrap a new application func NewApp(config *config.AppConfig) (*App, error) { app := &App{ closers: []io.Closer{}, Config: config, ErrorChan: make(chan error), } var err error app.Log = log.NewLogger(config, "23432119147a4367abf7c0de2aa99a2d") app.Tr, err = i18n.NewTranslationSetFromConfig(app.Log, config.UserConfig.Gui.Language) if err != nil { return app, err } app.OSCommand = commands.NewOSCommand(app.Log, config) // here is the place to make use of the docker-compose.yml file in the current directory app.DockerCommand, err = commands.NewDockerCommand(app.Log, app.OSCommand, app.Tr, app.Config, app.ErrorChan) if err != nil { return app, err } app.closers = append(app.closers, app.DockerCommand) app.Gui, err = gui.NewGui(app.Log, app.DockerCommand, app.OSCommand, app.Tr, config, app.ErrorChan) if err != nil { return app, err } return app, nil } func (app *App) Run() error { return app.Gui.Run() } func (app *App) Close() error { return utils.CloseMany(app.closers) } type errorMapping struct { originalError string newError string } // KnownError takes an error and tells us whether it's an error that we know about where we can print a nicely formatted version of it rather than panicking with a stack trace func (app *App) KnownError(err error) (string, bool) { errorMessage := err.Error() mappings := []errorMapping{ { originalError: "Got permission denied while trying to connect to the Docker daemon socket", newError: app.Tr.CannotAccessDockerSocketError, }, } for _, mapping := range mappings { if strings.Contains(errorMessage, mapping.originalError) { return mapping.newError, true } } return "", false } ================================================ FILE: pkg/cheatsheet/generate.go ================================================ // This "script" generates a file called Keybindings_{{.LANG}}.md // in current working directory. // // The content of this generated file is a keybindings cheatsheet. // // To generate cheatsheet in english run: // LANG=en go run scripts/cheatsheet/main.go generate package cheatsheet import ( "fmt" "log" "os" "github.com/jesseduffield/lazydocker/pkg/app" "github.com/jesseduffield/lazydocker/pkg/config" "github.com/jesseduffield/lazydocker/pkg/gui" "github.com/jesseduffield/lazydocker/pkg/i18n" ) const ( generateCheatsheetCmd = "go run scripts/cheatsheet/main.go generate" ) type bindingSection struct { title string bindings []*gui.Binding } func Generate() { generateAtDir(GetKeybindingsDir()) } func generateAtDir(dir string) { mConfig, err := config.NewAppConfig("lazydocker", "", "", "", "", true, nil, "", "") if err != nil { panic(err) } for lang := range i18n.GetTranslationSets() { os.Setenv("LC_ALL", lang) mApp, _ := app.NewApp(mConfig) mApp.Gui.SetupFakeGui() file, err := os.Create(dir + "/Keybindings_" + lang + ".md") if err != nil { panic(err) } bindingSections := getBindingSections(mApp) content := formatSections(mApp, bindingSections) content = fmt.Sprintf( "_This file is auto-generated. To update, make the changes in the "+ "pkg/i18n directory and then run `%s` from the project root._\n\n%s", generateCheatsheetCmd, content, ) writeString(file, content) } } func writeString(file *os.File, str string) { _, err := file.WriteString(str) if err != nil { log.Fatal(err) } } func formatTitle(title string) string { return fmt.Sprintf("\n## %s\n\n", title) } func formatBinding(binding *gui.Binding) string { return fmt.Sprintf(" %s: %s\n", binding.GetKey(), binding.Description) } func getBindingSections(mApp *app.App) []*bindingSection { bindingSections := []*bindingSection{} for _, binding := range mApp.Gui.GetInitialKeybindings() { if binding.Description == "" { continue } viewName := binding.ViewName if viewName == "" { viewName = "global" } titleMap := map[string]string{ "global": mApp.Tr.GlobalTitle, "main": mApp.Tr.MainTitle, "project": mApp.Tr.ProjectTitle, "services": mApp.Tr.ServicesTitle, "containers": mApp.Tr.ContainersTitle, "images": mApp.Tr.ImagesTitle, "volumes": mApp.Tr.VolumesTitle, "networks": mApp.Tr.NetworksTitle, } bindingSections = addBinding(titleMap[viewName], bindingSections, binding) } return bindingSections } func addBinding(title string, bindingSections []*bindingSection, binding *gui.Binding) []*bindingSection { if binding.Description == "" { return bindingSections } for _, section := range bindingSections { if title == section.title { section.bindings = append(section.bindings, binding) return bindingSections } } section := &bindingSection{ title: title, bindings: []*gui.Binding{binding}, } return append(bindingSections, section) } func formatSections(mApp *app.App, bindingSections []*bindingSection) string { content := fmt.Sprintf("# Lazydocker %s\n", mApp.Tr.Menu) for _, section := range bindingSections { content += formatTitle(section.title) content += "
\n"
		for _, binding := range section.bindings {
			content += formatBinding(binding)
		}
		content += "
\n" } return content } ================================================ FILE: pkg/cheatsheet/validate.go ================================================ package cheatsheet import ( "fmt" "io/fs" "log" "os" "path/filepath" "regexp" "github.com/jesseduffield/lazycore/pkg/utils" "github.com/pmezard/go-difflib/difflib" ) func Check() { dir := GetKeybindingsDir() tmpDir := filepath.Join(os.TempDir(), "lazydocker_cheatsheet") err := os.RemoveAll(tmpDir) if err != nil { log.Fatalf("Error occurred while checking if cheatsheets are up to date: %v", err) } defer os.RemoveAll(tmpDir) if err = os.Mkdir(tmpDir, 0o700); err != nil { log.Fatalf("Error occurred while checking if cheatsheets are up to date: %v", err) } generateAtDir(tmpDir) actualContent := obtainContent(dir) expectedContent := obtainContent(tmpDir) if expectedContent == "" { log.Fatal("empty expected content") } if actualContent != expectedContent { if err := difflib.WriteUnifiedDiff(os.Stdout, difflib.UnifiedDiff{ A: difflib.SplitLines(expectedContent), B: difflib.SplitLines(actualContent), FromFile: "Expected", FromDate: "", ToFile: "Actual", ToDate: "", Context: 1, }); err != nil { log.Fatalf("Error occurred while checking if cheatsheets are up to date: %v", err) } fmt.Printf( "\nCheatsheets are out of date. Please run `%s` at the project root and commit the changes. "+ "If you run the script and no keybindings files are updated as a result, try rebasing onto master"+ "and trying again.\n", generateCheatsheetCmd, ) os.Exit(1) } fmt.Println("\nCheatsheets are up to date") } func GetKeybindingsDir() string { return utils.GetLazyRootDirectory() + "/docs/keybindings" } func obtainContent(dir string) string { re := regexp.MustCompile(`Keybindings_\w+\.md$`) content := "" err := filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error { if re.MatchString(path) { bytes, err := os.ReadFile(path) if err != nil { log.Fatalf("Error occurred while checking if cheatsheets are up to date: %v", err) } content += fmt.Sprintf("\n%s\n\n", filepath.Base(path)) content += string(bytes) } return nil }) if err != nil { log.Fatalf("Error occurred while checking if cheatsheets are up to date: %v", err) } return content } ================================================ FILE: pkg/commands/container.go ================================================ package commands import ( "context" "fmt" "os/exec" "strings" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/client" "github.com/go-errors/errors" "github.com/jesseduffield/lazydocker/pkg/i18n" "github.com/jesseduffield/lazydocker/pkg/utils" "github.com/sasha-s/go-deadlock" "github.com/sirupsen/logrus" "golang.org/x/xerrors" ) // Container : A docker Container type Container struct { Name string ServiceName string ContainerNumber string // might make this an int in the future if need be // OneOff tells us if the container is just a job container or is actually bound to the service OneOff bool ProjectName string ID string Container container.Summary Client *client.Client OSCommand *OSCommand Log *logrus.Entry StatHistory []*RecordedStats Details container.InspectResponse MonitoringStats bool DockerCommand LimitedDockerCommand Tr *i18n.TranslationSet StatsMutex deadlock.Mutex } // Remove removes the container func (c *Container) Remove(options container.RemoveOptions) error { c.Log.Warn(fmt.Sprintf("removing container %s", c.Name)) if err := c.Client.ContainerRemove(context.Background(), c.ID, options); err != nil { if strings.Contains(err.Error(), "Stop the container before attempting removal or force remove") { return ComplexError{ Code: MustStopContainer, Message: err.Error(), frame: xerrors.Caller(1), } } return err } return nil } // Start starts the container func (c *Container) Start() error { c.Log.Warn(fmt.Sprintf("starting container %s", c.Name)) return c.Client.ContainerStart(context.Background(), c.ID, container.StartOptions{}) } // Stop stops the container func (c *Container) Stop() error { c.Log.Warn(fmt.Sprintf("stopping container %s", c.Name)) return c.Client.ContainerStop(context.Background(), c.ID, container.StopOptions{}) } // Pause pauses the container func (c *Container) Pause() error { c.Log.Warn(fmt.Sprintf("pausing container %s", c.Name)) return c.Client.ContainerPause(context.Background(), c.ID) } // Unpause unpauses the container func (c *Container) Unpause() error { c.Log.Warn(fmt.Sprintf("unpausing container %s", c.Name)) return c.Client.ContainerUnpause(context.Background(), c.ID) } // Restart restarts the container func (c *Container) Restart() error { c.Log.Warn(fmt.Sprintf("restarting container %s", c.Name)) return c.Client.ContainerRestart(context.Background(), c.ID, container.StopOptions{}) } // Attach attaches the container func (c *Container) Attach() (*exec.Cmd, error) { if !c.DetailsLoaded() { return nil, errors.New(c.Tr.WaitingForContainerInfo) } // verify that we can in fact attach to this container if !c.Details.Config.OpenStdin { return nil, errors.New(c.Tr.UnattachableContainerError) } if c.Container.State == "exited" { return nil, errors.New(c.Tr.CannotAttachStoppedContainerError) } c.Log.Warn(fmt.Sprintf("attaching to container %s", c.Name)) // TODO: use SDK cmd := c.OSCommand.NewCmd("docker", "attach", "--sig-proxy=false", c.ID) return cmd, nil } // Top returns process information func (c *Container) Top(ctx context.Context) (container.TopResponse, error) { detail, err := c.Inspect() if err != nil { return container.TopResponse{}, err } // check container status if !detail.State.Running { return container.TopResponse{}, errors.New("container is not running") } return c.Client.ContainerTop(ctx, c.ID, []string{}) } // PruneContainers prunes containers func (c *DockerCommand) PruneContainers() error { _, err := c.Client.ContainersPrune(context.Background(), filters.Args{}) return err } // Inspect returns details about the container func (c *Container) Inspect() (container.InspectResponse, error) { return c.Client.ContainerInspect(context.Background(), c.ID) } // RenderTop returns details about the container func (c *Container) RenderTop(ctx context.Context) (string, error) { result, err := c.Top(ctx) if err != nil { return "", err } return utils.RenderTable(append([][]string{result.Titles}, result.Processes...)) } // DetailsLoaded tells us whether we have yet loaded the details for a container. // Sometimes it takes some time for a container to have its details loaded // after it starts. func (c *Container) DetailsLoaded() bool { return c.Details.ContainerJSONBase != nil } ================================================ FILE: pkg/commands/container_stats.go ================================================ package commands import ( "math" "time" ) // RecordedStats contains both the container stats we've received from docker, and our own derived stats from those container stats. When configuring a graph, you're basically specifying the path of a value in this struct type RecordedStats struct { ClientStats ContainerStats DerivedStats DerivedStats RecordedAt time.Time } // DerivedStats contains some useful stats that we've calculated based on the raw container stats that we got back from docker type DerivedStats struct { CPUPercentage float64 MemoryPercentage float64 } // ContainerStats autogenerated at https://mholt.github.io/json-to-go/ type ContainerStats struct { Read time.Time `json:"read"` Preread time.Time `json:"preread"` PidsStats struct { Current int `json:"current"` } `json:"pids_stats"` BlkioStats struct { IoServiceBytesRecursive []struct { Major int `json:"major"` Minor int `json:"minor"` Op string `json:"op"` Value int `json:"value"` } `json:"io_service_bytes_recursive"` IoServicedRecursive []struct { Major int `json:"major"` Minor int `json:"minor"` Op string `json:"op"` Value int `json:"value"` } `json:"io_serviced_recursive"` IoQueueRecursive []interface{} `json:"io_queue_recursive"` IoServiceTimeRecursive []interface{} `json:"io_service_time_recursive"` IoWaitTimeRecursive []interface{} `json:"io_wait_time_recursive"` IoMergedRecursive []interface{} `json:"io_merged_recursive"` IoTimeRecursive []interface{} `json:"io_time_recursive"` SectorsRecursive []interface{} `json:"sectors_recursive"` } `json:"blkio_stats"` NumProcs int `json:"num_procs"` StorageStats struct{} `json:"storage_stats"` CPUStats struct { CPUUsage struct { TotalUsage int64 `json:"total_usage"` PercpuUsage []int64 `json:"percpu_usage"` UsageInKernelmode int64 `json:"usage_in_kernelmode"` UsageInUsermode int64 `json:"usage_in_usermode"` } `json:"cpu_usage"` SystemCPUUsage int64 `json:"system_cpu_usage"` OnlineCpus int `json:"online_cpus"` ThrottlingData struct { Periods int `json:"periods"` ThrottledPeriods int `json:"throttled_periods"` ThrottledTime int `json:"throttled_time"` } `json:"throttling_data"` } `json:"cpu_stats"` PrecpuStats struct { CPUUsage struct { TotalUsage int64 `json:"total_usage"` PercpuUsage []int64 `json:"percpu_usage"` UsageInKernelmode int64 `json:"usage_in_kernelmode"` UsageInUsermode int64 `json:"usage_in_usermode"` } `json:"cpu_usage"` SystemCPUUsage int64 `json:"system_cpu_usage"` OnlineCpus int `json:"online_cpus"` ThrottlingData struct { Periods int `json:"periods"` ThrottledPeriods int `json:"throttled_periods"` ThrottledTime int `json:"throttled_time"` } `json:"throttling_data"` } `json:"precpu_stats"` MemoryStats struct { Usage int `json:"usage"` MaxUsage int `json:"max_usage"` Stats struct { ActiveAnon int `json:"active_anon"` ActiveFile int `json:"active_file"` Cache int `json:"cache"` Dirty int `json:"dirty"` HierarchicalMemoryLimit int64 `json:"hierarchical_memory_limit"` HierarchicalMemswLimit int64 `json:"hierarchical_memsw_limit"` InactiveAnon int `json:"inactive_anon"` InactiveFile int `json:"inactive_file"` MappedFile int `json:"mapped_file"` Pgfault int `json:"pgfault"` Pgmajfault int `json:"pgmajfault"` Pgpgin int `json:"pgpgin"` Pgpgout int `json:"pgpgout"` Rss int `json:"rss"` RssHuge int `json:"rss_huge"` TotalActiveAnon int `json:"total_active_anon"` TotalActiveFile int `json:"total_active_file"` TotalCache int `json:"total_cache"` TotalDirty int `json:"total_dirty"` TotalInactiveAnon int `json:"total_inactive_anon"` TotalInactiveFile int `json:"total_inactive_file"` TotalMappedFile int `json:"total_mapped_file"` TotalPgfault int `json:"total_pgfault"` TotalPgmajfault int `json:"total_pgmajfault"` TotalPgpgin int `json:"total_pgpgin"` TotalPgpgout int `json:"total_pgpgout"` TotalRss int `json:"total_rss"` TotalRssHuge int `json:"total_rss_huge"` TotalUnevictable int `json:"total_unevictable"` TotalWriteback int `json:"total_writeback"` Unevictable int `json:"unevictable"` Writeback int `json:"writeback"` } `json:"stats"` Limit int64 `json:"limit"` } `json:"memory_stats"` Name string `json:"name"` ID string `json:"id"` Networks struct { Eth0 struct { RxBytes int `json:"rx_bytes"` RxPackets int `json:"rx_packets"` RxErrors int `json:"rx_errors"` RxDropped int `json:"rx_dropped"` TxBytes int `json:"tx_bytes"` TxPackets int `json:"tx_packets"` TxErrors int `json:"tx_errors"` TxDropped int `json:"tx_dropped"` } `json:"eth0"` } `json:"networks"` } // CalculateContainerCPUPercentage calculates the cpu usage of the container as a percent of total CPU usage // to calculate CPU usage, we take the increase in CPU time from the container since the last poll, divide that by the total increase in CPU time since the last poll, times by the number of cores, and times by 100 to get a percentage // I'm not entirely sure why we need to multiply by the number of cores, but the numbers work func (s *ContainerStats) CalculateContainerCPUPercentage() float64 { cpuUsageDelta := s.CPUStats.CPUUsage.TotalUsage - s.PrecpuStats.CPUUsage.TotalUsage cpuTotalUsageDelta := s.CPUStats.SystemCPUUsage - s.PrecpuStats.SystemCPUUsage value := float64(cpuUsageDelta*100) / float64(cpuTotalUsageDelta) if math.IsNaN(value) { return 0 } return value } // CalculateContainerMemoryUsage calculates the memory usage of the container as a percent of total available memory func (s *ContainerStats) CalculateContainerMemoryUsage() float64 { value := float64(s.MemoryStats.Usage*100) / float64(s.MemoryStats.Limit) if math.IsNaN(value) { return 0 } return value } func (c *Container) appendStats(stats *RecordedStats, maxDuration time.Duration) { c.StatsMutex.Lock() defer c.StatsMutex.Unlock() c.StatHistory = append(c.StatHistory, stats) c.eraseOldHistory(maxDuration) } // eraseOldHistory removes any history before the user-specified max duration func (c *Container) eraseOldHistory(maxDuration time.Duration) { if maxDuration == 0 { return } for i, stat := range c.StatHistory { if time.Since(stat.RecordedAt) < maxDuration { c.StatHistory = c.StatHistory[i:] return } } } func (c *Container) GetLastStats() (*RecordedStats, bool) { c.StatsMutex.Lock() defer c.StatsMutex.Unlock() history := c.StatHistory if len(history) == 0 { return nil, false } return history[len(history)-1], true } ================================================ FILE: pkg/commands/container_stats_test.go ================================================ package commands import ( "testing" "github.com/stretchr/testify/assert" ) func TestCalculateContainerCPUPercentage(t *testing.T) { container := &ContainerStats{} container.CPUStats.CPUUsage.TotalUsage = 10 container.CPUStats.SystemCPUUsage = 10 container.PrecpuStats.CPUUsage.TotalUsage = 5 container.PrecpuStats.SystemCPUUsage = 2 assert.EqualValues(t, 62.5, container.CalculateContainerCPUPercentage()) } ================================================ FILE: pkg/commands/docker.go ================================================ package commands import ( "bufio" "context" "encoding/json" "fmt" "io" ogLog "log" "os" "os/exec" "path/filepath" "sort" "strings" "sync" "time" cliconfig "github.com/docker/cli/cli/config" ddocker "github.com/docker/cli/cli/context/docker" ctxstore "github.com/docker/cli/cli/context/store" "github.com/docker/docker/api/types/container" "github.com/docker/docker/client" "github.com/imdario/mergo" "github.com/jesseduffield/lazydocker/pkg/commands/ssh" "github.com/jesseduffield/lazydocker/pkg/config" "github.com/jesseduffield/lazydocker/pkg/i18n" "github.com/jesseduffield/lazydocker/pkg/utils" "github.com/sasha-s/go-deadlock" "github.com/sirupsen/logrus" ) const ( dockerHostEnvKey = "DOCKER_HOST" ) // DockerCommand is our main docker interface type DockerCommand struct { Log *logrus.Entry OSCommand *OSCommand Tr *i18n.TranslationSet Config *config.AppConfig Client *client.Client InDockerComposeProject bool // LocalProjectName is the compose project name for the directory where lazydocker was launched. LocalProjectName string ErrorChan chan error ContainerMutex deadlock.Mutex ServiceMutex deadlock.Mutex Closers []io.Closer } var _ io.Closer = &DockerCommand{} // LimitedDockerCommand is a stripped-down DockerCommand with just the methods the container/service/image might need type LimitedDockerCommand interface { NewCommandObject(CommandObject) CommandObject } // CommandObject is what we pass to our template resolvers when we are running a custom command. We do not guarantee that all fields will be populated: just the ones that make sense for the current context type CommandObject struct { DockerCompose string Service *Service Container *Container Image *Image Volume *Volume Network *Network Project *Project } // NewCommandObject takes a command object and returns a default command object with the passed command object merged in func (c *DockerCommand) NewCommandObject(obj CommandObject) CommandObject { defaultObj := CommandObject{DockerCompose: c.Config.UserConfig.CommandTemplates.DockerCompose} _ = mergo.Merge(&defaultObj, obj) // When operating on a specific project, include -p flag so that // docker compose targets the correct project. if obj.Service != nil && obj.Service.ProjectName != "" { defaultObj.DockerCompose = fmt.Sprintf("%s -p %s", defaultObj.DockerCompose, obj.Service.ProjectName) } else if obj.Project != nil && obj.Project.Name != "" { defaultObj.DockerCompose = fmt.Sprintf("%s -p %s", defaultObj.DockerCompose, obj.Project.Name) } return defaultObj } // newDockerClient creates a Docker client with the given host. // We avoid using client.FromEnv because it includes WithVersionFromEnv() which // sets manualOverride=true when DOCKER_API_VERSION is set, preventing API version // negotiation even when WithAPIVersionNegotiation() is specified. // Instead, we explicitly configure only what we need, and rely on proper // API version negotiation to support older Docker daemons. // See https://github.com/jesseduffield/lazydocker/issues/715 func newDockerClient(dockerHost string) (*client.Client, error) { return client.NewClientWithOpts( client.WithTLSClientConfigFromEnv(), client.WithAPIVersionNegotiation(), client.WithHost(dockerHost), ) } // NewDockerCommand it runs docker commands func NewDockerCommand(log *logrus.Entry, osCommand *OSCommand, tr *i18n.TranslationSet, config *config.AppConfig, errorChan chan error) (*DockerCommand, error) { dockerHost, err := determineDockerHost() if err != nil { ogLog.Printf("> could not determine host %v", err) } // NOTE: Inject the determined docker host to the environment. This allows the // `SSHHandler.HandleSSHDockerHost()` to create a local unix socket tunneled // over SSH to the specified ssh host. if strings.HasPrefix(dockerHost, "ssh://") { os.Setenv(dockerHostEnvKey, dockerHost) } tunnelCloser, err := ssh.NewSSHHandler(osCommand).HandleSSHDockerHost() if err != nil { ogLog.Fatal(err) } // Retrieve the docker host from the environment which could have been set by // the `SSHHandler.HandleSSHDockerHost()` and override `dockerHost`. dockerHostFromEnv := os.Getenv(dockerHostEnvKey) if dockerHostFromEnv != "" { dockerHost = dockerHostFromEnv } cli, err := newDockerClient(dockerHost) if err != nil { ogLog.Fatal(err) } dockerCommand := &DockerCommand{ Log: log, OSCommand: osCommand, Tr: tr, Config: config, Client: cli, ErrorChan: errorChan, InDockerComposeProject: true, Closers: []io.Closer{tunnelCloser}, } dockerCommand.setDockerComposeCommand(config) err = osCommand.RunCommand( utils.ApplyTemplate( config.UserConfig.CommandTemplates.CheckDockerComposeConfig, dockerCommand.NewCommandObject(CommandObject{}), ), ) if err != nil { dockerCommand.InDockerComposeProject = false log.Warn(err.Error()) } return dockerCommand, nil } func (c *DockerCommand) setDockerComposeCommand(config *config.AppConfig) { if config.UserConfig.CommandTemplates.DockerCompose != "docker compose" { return } // it's possible that a user is still using docker-compose, so we'll check if 'docker comopose' is available, and if not, we'll fall back to 'docker-compose' err := c.OSCommand.RunCommand("docker compose version") if err != nil { config.UserConfig.CommandTemplates.DockerCompose = "docker-compose" } } func (c *DockerCommand) Close() error { return utils.CloseMany(c.Closers) } func (c *DockerCommand) CreateClientStatMonitor(container *Container) { container.MonitoringStats = true stream, err := c.Client.ContainerStats(context.Background(), container.ID, true) if err != nil { // not creating error panel because if we've disconnected from docker we'll // have already created an error panel c.Log.Error(err) container.MonitoringStats = false return } defer stream.Body.Close() scanner := bufio.NewScanner(stream.Body) for scanner.Scan() { data := scanner.Bytes() var stats ContainerStats _ = json.Unmarshal(data, &stats) recordedStats := &RecordedStats{ ClientStats: stats, DerivedStats: DerivedStats{ CPUPercentage: stats.CalculateContainerCPUPercentage(), MemoryPercentage: stats.CalculateContainerMemoryUsage(), }, RecordedAt: time.Now(), } container.appendStats(recordedStats, c.Config.UserConfig.Stats.MaxDuration) } container.MonitoringStats = false } func (c *DockerCommand) RefreshContainersAndServices(currentContainers []*Container) ([]*Container, []*Service, error) { c.ServiceMutex.Lock() defer c.ServiceMutex.Unlock() containers, err := c.GetContainers(currentContainers) if err != nil { return nil, nil, err } // Derive services from container labels (covers all projects) services := c.GetServicesFromContainers(containers) var composeServices []*Service if c.InDockerComposeProject { composeServices, err = c.GetServices() if err != nil { c.Log.Warn("Failed to get compose services: " + err.Error()) } } // Determine the local project name before merging services, since // mergeServices needs it. We match compose service names against container // labels to handle cases where the project name differs from the directory // name (e.g. a `name:` directive in the compose file). if c.LocalProjectName == "" && c.InDockerComposeProject && composeServices != nil { for _, ctr := range containers { if ctr.ProjectName == "" || ctr.ServiceName == "" { continue } for _, svc := range composeServices { if ctr.ServiceName == svc.Name { c.LocalProjectName = ctr.ProjectName break } } if c.LocalProjectName != "" { break } } // Fall back to directory name if c.LocalProjectName == "" && c.Config.ProjectDir != "" { c.LocalProjectName = filepath.Base(c.Config.ProjectDir) } } // Merge compose services (which include stopped services) with // container-derived services from all projects if composeServices != nil { services = c.mergeServices(services, composeServices) } c.assignContainersToServices(containers, services) return containers, services, nil } // GetServicesFromContainers derives services from container labels for all projects func (c *DockerCommand) GetServicesFromContainers(containers []*Container) []*Service { // Use project+service as key to avoid duplicates type serviceKey struct { project string service string } seen := make(map[serviceKey]bool) services := make([]*Service, 0, len(containers)) for _, ctr := range containers { if ctr.ServiceName == "" || ctr.OneOff { continue } key := serviceKey{project: ctr.ProjectName, service: ctr.ServiceName} if seen[key] { continue } seen[key] = true services = append(services, &Service{ Name: ctr.ServiceName, ID: ctr.ProjectName + "-" + ctr.ServiceName, ProjectName: ctr.ProjectName, OSCommand: c.OSCommand, Log: c.Log, DockerCommand: c, }) } return services } // mergeServices merges compose services (which may lack ProjectName) with // container-derived services. Compose services take priority because they // include services without running containers. func (c *DockerCommand) mergeServices(containerServices []*Service, composeServices []*Service) []*Service { // Set project name on compose services for _, svc := range composeServices { if svc.ProjectName == "" { svc.ProjectName = c.LocalProjectName } } // Build a set of compose service names for the local project composeServiceNames := make(map[string]bool) for _, svc := range composeServices { composeServiceNames[svc.Name] = true } // Start with compose services, then add container-derived services // that aren't already covered by compose (i.e. from other projects) result := make([]*Service, 0, len(composeServices)+len(containerServices)) result = append(result, composeServices...) for _, svc := range containerServices { if svc.ProjectName == c.LocalProjectName && composeServiceNames[svc.Name] { continue // already covered by compose service } result = append(result, svc) } return result } // GetProjectNames returns all unique project names from containers func (c *DockerCommand) GetProjectNames(containers []*Container) []string { seen := make(map[string]bool) var names []string for _, ctr := range containers { if ctr.ProjectName != "" && !seen[ctr.ProjectName] { seen[ctr.ProjectName] = true names = append(names, ctr.ProjectName) } } sort.Strings(names) return names } func (c *DockerCommand) assignContainersToServices(containers []*Container, services []*Service) { L: for _, service := range services { for _, ctr := range containers { if !ctr.OneOff && ctr.ServiceName == service.Name && ctr.ProjectName == service.ProjectName { service.Container = ctr continue L } } service.Container = nil } } // GetContainers gets the docker containers func (c *DockerCommand) GetContainers(existingContainers []*Container) ([]*Container, error) { c.ContainerMutex.Lock() defer c.ContainerMutex.Unlock() containers, err := c.Client.ContainerList(context.Background(), container.ListOptions{All: true}) if err != nil { return nil, err } ownContainers := make([]*Container, len(containers)) for i, ctr := range containers { var newContainer *Container // check if we already have data stored against the container for _, existingContainer := range existingContainers { if existingContainer.ID == ctr.ID { newContainer = existingContainer break } } // initialise the container if it's completely new if newContainer == nil { newContainer = &Container{ ID: ctr.ID, Client: c.Client, OSCommand: c.OSCommand, Log: c.Log, DockerCommand: c, Tr: c.Tr, } } newContainer.Container = ctr // if the container is made with a name label we will use that if name, ok := ctr.Labels["name"]; ok { newContainer.Name = name } else { if len(ctr.Names) > 0 { newContainer.Name = strings.TrimLeft(ctr.Names[0], "/") } else { newContainer.Name = ctr.ID } } newContainer.ServiceName = ctr.Labels["com.docker.compose.service"] newContainer.ProjectName = ctr.Labels["com.docker.compose.project"] newContainer.ContainerNumber = ctr.Labels["com.docker.compose.container"] newContainer.OneOff = ctr.Labels["com.docker.compose.oneoff"] == "True" ownContainers[i] = newContainer } c.SetContainerDetails(ownContainers) return ownContainers, nil } // GetServices gets services func (c *DockerCommand) GetServices() ([]*Service, error) { if !c.InDockerComposeProject { return nil, nil } composeCommand := c.Config.UserConfig.CommandTemplates.DockerCompose output, err := c.OSCommand.RunCommandWithOutput(fmt.Sprintf("%s config --services", composeCommand)) if err != nil { return nil, err } // output looks like: // service1 // service2 lines := utils.SplitLines(output) services := make([]*Service, len(lines)) for i, str := range lines { services[i] = &Service{ Name: str, ID: c.LocalProjectName + "-" + str, ProjectName: c.LocalProjectName, OSCommand: c.OSCommand, Log: c.Log, DockerCommand: c, } } return services, nil } func (c *DockerCommand) RefreshContainerDetails(containers []*Container) error { c.ContainerMutex.Lock() defer c.ContainerMutex.Unlock() c.SetContainerDetails(containers) return nil } // Attaches the details returned from docker inspect to each of the containers // this contains a bit more info than what you get from the go-docker client func (c *DockerCommand) SetContainerDetails(containers []*Container) { wg := sync.WaitGroup{} for _, ctr := range containers { ctr := ctr wg.Add(1) go func() { details, err := c.Client.ContainerInspect(context.Background(), ctr.ID) if err != nil { c.Log.Error(err) } else { ctr.Details = details } wg.Done() }() } wg.Wait() } // ViewAllLogs attaches to a subprocess viewing all the logs from docker-compose func (c *DockerCommand) ViewAllLogs(project *Project) (*exec.Cmd, error) { cmd := c.OSCommand.ExecutableFromString( utils.ApplyTemplate( c.OSCommand.Config.UserConfig.CommandTemplates.ViewAllLogs, c.NewCommandObject(CommandObject{Project: project}), ), ) c.OSCommand.PrepareForChildren(cmd) return cmd, nil } // DockerComposeConfig returns the result of 'docker-compose config' func (c *DockerCommand) DockerComposeConfig() string { return c.DockerComposeConfigForProject(nil) } // DockerComposeConfigForProject returns the result of 'docker-compose config' for a specific project func (c *DockerCommand) DockerComposeConfigForProject(project *Project) string { output, err := c.OSCommand.RunCommandWithOutput( utils.ApplyTemplate( c.OSCommand.Config.UserConfig.CommandTemplates.DockerComposeConfig, c.NewCommandObject(CommandObject{Project: project}), ), ) if err != nil { output = err.Error() } return output } // determineDockerHost tries to the determine the docker host that we should connect to // in the following order of decreasing precedence: // - value of "DOCKER_HOST" environment variable // - host retrieved from the current context (specified via DOCKER_CONTEXT) // - "default docker host" for the host operating system, otherwise func determineDockerHost() (string, error) { // If the docker host is explicitly set via the "DOCKER_HOST" environment variable, // then its a no-brainer :shrug: if os.Getenv("DOCKER_HOST") != "" { return os.Getenv("DOCKER_HOST"), nil } currentContext := os.Getenv("DOCKER_CONTEXT") if currentContext == "" { cf, err := cliconfig.Load(cliconfig.Dir()) if err != nil { return "", err } currentContext = cf.CurrentContext } // On some systems (windows) `default` is stored in the docker config as the currentContext. if currentContext == "" || currentContext == "default" { // If a docker context is neither specified via the "DOCKER_CONTEXT" environment variable nor via the // $HOME/.docker/config file, then we fall back to connecting to the "default docker host" meant for // the host operating system. return defaultDockerHost, nil } storeConfig := ctxstore.NewConfig( func() interface{} { return &ddocker.EndpointMeta{} }, ctxstore.EndpointTypeGetter(ddocker.DockerEndpoint, func() interface{} { return &ddocker.EndpointMeta{} }), ) st := ctxstore.New(cliconfig.ContextStoreDir(), storeConfig) md, err := st.GetMetadata(currentContext) if err != nil { return "", err } dockerEP, ok := md.Endpoints[ddocker.DockerEndpoint] if !ok { return "", err } dockerEPMeta, ok := dockerEP.(ddocker.EndpointMeta) if !ok { return "", fmt.Errorf("expected docker.EndpointMeta, got %T", dockerEP) } if dockerEPMeta.Host != "" { return dockerEPMeta.Host, nil } // We might end up here, if the context was created with the `host` set to an empty value (i.e. ''). // For example: // ```sh // docker context create foo --docker "host=" // ``` // In such scenario, we mimic the `docker` cli and try to connect to the "default docker host". return defaultDockerHost, nil } ================================================ FILE: pkg/commands/docker_host_unix.go ================================================ //go:build !windows package commands const ( defaultDockerHost = "unix:///var/run/docker.sock" ) ================================================ FILE: pkg/commands/docker_host_windows.go ================================================ package commands const ( defaultDockerHost = "npipe:////./pipe/docker_engine" ) ================================================ FILE: pkg/commands/docker_test.go ================================================ package commands import ( "os" "testing" "github.com/docker/docker/client" "github.com/stretchr/testify/assert" ) // TestNewDockerClientVersionNegotiation verifies that newDockerClient allows // API version negotiation even when DOCKER_API_VERSION is set. // // This is a regression test for https://github.com/jesseduffield/lazydocker/issues/715 // where users got "client version 1.25 is too old" errors because FromEnv() // includes WithVersionFromEnv() which sets manualOverride=true, preventing // API version negotiation. func TestNewDockerClientVersionNegotiation(t *testing.T) { // Save original env var and restore after test originalAPIVersion := os.Getenv("DOCKER_API_VERSION") defer func() { if originalAPIVersion == "" { os.Unsetenv("DOCKER_API_VERSION") } else { os.Setenv("DOCKER_API_VERSION", originalAPIVersion) } }() // Set DOCKER_API_VERSION to an old version that would cause // "client version 1.25 is too old" errors if negotiation is disabled os.Setenv("DOCKER_API_VERSION", "1.25") t.Run("FromEnv locks version preventing negotiation", func(t *testing.T) { // This demonstrates the problematic behavior we're avoiding. // When using FromEnv with DOCKER_API_VERSION set, the client // version gets locked to 1.25 and negotiation is disabled. cli, err := client.NewClientWithOpts( client.FromEnv, client.WithAPIVersionNegotiation(), ) assert.NoError(t, err) defer cli.Close() // Version is locked to the env var value assert.Equal(t, "1.25", cli.ClientVersion()) }) t.Run("newDockerClient allows version negotiation", func(t *testing.T) { // Test the actual production function. // Use DefaultDockerHost for cross-platform compatibility // (unix socket on Linux/macOS, named pipe on Windows). cli, err := newDockerClient(client.DefaultDockerHost) assert.NoError(t, err) defer cli.Close() // Version is NOT locked to the env var value (1.25). // Instead, it uses the library's default version and will negotiate // with the server on first request. This is the key difference that // fixes the "version too old" error. assert.NotEqual(t, "1.25", cli.ClientVersion(), "client version should not be locked to DOCKER_API_VERSION env var") }) } ================================================ FILE: pkg/commands/dummies.go ================================================ package commands import ( "io" "github.com/jesseduffield/lazydocker/pkg/config" "github.com/jesseduffield/lazydocker/pkg/i18n" "github.com/sirupsen/logrus" ) // This file exports dummy constructors for use by tests in other packages // NewDummyOSCommand creates a new dummy OSCommand for testing func NewDummyOSCommand() *OSCommand { return NewOSCommand(NewDummyLog(), NewDummyAppConfig()) } // NewDummyAppConfig creates a new dummy AppConfig for testing func NewDummyAppConfig() *config.AppConfig { appConfig := &config.AppConfig{ Name: "lazydocker", Version: "unversioned", Commit: "", BuildDate: "", Debug: false, BuildSource: "", } return appConfig } // NewDummyLog creates a new dummy Log for testing func NewDummyLog() *logrus.Entry { log := logrus.New() log.Out = io.Discard return log.WithField("test", "test") } // NewDummyDockerCommand creates a new dummy DockerCommand for testing func NewDummyDockerCommand() *DockerCommand { return NewDummyDockerCommandWithOSCommand(NewDummyOSCommand()) } // NewDummyDockerCommandWithOSCommand creates a new dummy DockerCommand for testing func NewDummyDockerCommandWithOSCommand(osCommand *OSCommand) *DockerCommand { newAppConfig := NewDummyAppConfig() return &DockerCommand{ Log: NewDummyLog(), OSCommand: osCommand, Tr: i18n.NewTranslationSet(NewDummyLog(), newAppConfig.UserConfig.Gui.Language), Config: newAppConfig, } } ================================================ FILE: pkg/commands/errors.go ================================================ package commands import ( "fmt" "github.com/go-errors/errors" "golang.org/x/xerrors" ) const ( // MustStopContainer tells us that we must stop the container before removing it MustStopContainer = iota ) // WrapError wraps an error for the sake of showing a stack trace at the top level // the go-errors package, for some reason, does not return nil when you try to wrap // a non-error, so we're just doing it here func WrapError(err error) error { if err == nil { return err } return errors.Wrap(err, 0) } // ComplexError an error which carries a code so that calling code has an easier job to do // adapted from https://medium.com/yakka/better-go-error-handling-with-xerrors-1987650e0c79 type ComplexError struct { Message string Code int frame xerrors.Frame } // FormatError is a function func (ce ComplexError) FormatError(p xerrors.Printer) error { p.Printf("%d %s", ce.Code, ce.Message) ce.frame.Format(p) return nil } // Format is a function func (ce ComplexError) Format(f fmt.State, c rune) { xerrors.FormatError(ce, f, c) } func (ce ComplexError) Error() string { return fmt.Sprint(ce) } // HasErrorCode is a function func HasErrorCode(err error, code int) bool { var originalErr ComplexError if xerrors.As(err, &originalErr) { return originalErr.Code == MustStopContainer } return false } ================================================ FILE: pkg/commands/image.go ================================================ package commands import ( "context" "strings" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/image" "github.com/docker/docker/client" "github.com/fatih/color" "github.com/jesseduffield/lazydocker/pkg/utils" "github.com/samber/lo" "github.com/sirupsen/logrus" ) // Image : A docker Image type Image struct { Name string Tag string ID string Image image.Summary Client *client.Client OSCommand *OSCommand Log *logrus.Entry DockerCommand LimitedDockerCommand } // Remove removes the image func (i *Image) Remove(options image.RemoveOptions) error { if _, err := i.Client.ImageRemove(context.Background(), i.ID, options); err != nil { return err } return nil } func getHistoryResponseItemDisplayStrings(layer image.HistoryResponseItem) []string { tag := "" if len(layer.Tags) > 0 { tag = layer.Tags[0] } id := strings.TrimPrefix(layer.ID, "sha256:") if len(id) > 10 { id = id[0:10] } idColor := color.FgWhite if id == "" { idColor = color.FgBlue } dockerFileCommandPrefix := "/bin/sh -c #(nop) " createdBy := layer.CreatedBy if strings.Contains(layer.CreatedBy, dockerFileCommandPrefix) { createdBy = strings.Trim(strings.TrimPrefix(layer.CreatedBy, dockerFileCommandPrefix), " ") split := strings.Split(createdBy, " ") createdBy = utils.ColoredString(split[0], color.FgYellow) + " " + strings.Join(split[1:], " ") } createdBy = strings.Replace(createdBy, "\t", " ", -1) size := utils.FormatBinaryBytes(int(layer.Size)) sizeColor := color.FgWhite if size == "0B" { sizeColor = color.FgBlue } return []string{ utils.ColoredString(id, idColor), utils.ColoredString(tag, color.FgGreen), utils.ColoredString(size, sizeColor), createdBy, } } // RenderHistory renders the history of the image func (i *Image) RenderHistory() (string, error) { history, err := i.Client.ImageHistory(context.Background(), i.ID) if err != nil { return "", err } tableBody := lo.Map(history, func(layer image.HistoryResponseItem, _ int) []string { return getHistoryResponseItemDisplayStrings(layer) }) headers := [][]string{{"ID", "TAG", "SIZE", "COMMAND"}} table := append(headers, tableBody...) return utils.RenderTable(table) } // RefreshImages returns a slice of docker images func (c *DockerCommand) RefreshImages() ([]*Image, error) { images, err := c.Client.ImageList(context.Background(), image.ListOptions{}) if err != nil { return nil, err } ownImages := make([]*Image, len(images)) for i, img := range images { firstTag := "" tags := img.RepoTags if len(tags) > 0 { firstTag = tags[0] } nameParts := strings.Split(firstTag, ":") tag := "" name := "none" if len(nameParts) > 1 { tag = nameParts[len(nameParts)-1] name = strings.Join(nameParts[:len(nameParts)-1], ":") for prefix, replacement := range c.Config.UserConfig.Replacements.ImageNamePrefixes { if strings.HasPrefix(name, prefix) { name = strings.Replace(name, prefix, replacement, 1) break } } } ownImages[i] = &Image{ ID: img.ID, Name: name, Tag: tag, Image: img, Client: c.Client, OSCommand: c.OSCommand, Log: c.Log, DockerCommand: c, } } return ownImages, nil } // PruneImages prunes images func (c *DockerCommand) PruneImages() error { _, err := c.Client.ImagesPrune(context.Background(), filters.Args{}) return err } ================================================ FILE: pkg/commands/network.go ================================================ package commands import ( "context" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/network" "github.com/docker/docker/client" "github.com/sirupsen/logrus" ) // Network : A docker Network type Network struct { Name string Network network.Inspect Client *client.Client OSCommand *OSCommand Log *logrus.Entry DockerCommand LimitedDockerCommand } // RefreshNetworks gets the networks and stores them func (c *DockerCommand) RefreshNetworks() ([]*Network, error) { networks, err := c.Client.NetworkList(context.Background(), network.ListOptions{}) if err != nil { return nil, err } ownNetworks := make([]*Network, len(networks)) for i, nw := range networks { ownNetworks[i] = &Network{ Name: nw.Name, Network: nw, Client: c.Client, OSCommand: c.OSCommand, Log: c.Log, DockerCommand: c, } } return ownNetworks, nil } // PruneNetworks prunes networks func (c *DockerCommand) PruneNetworks() error { _, err := c.Client.NetworksPrune(context.Background(), filters.Args{}) return err } // Remove removes the network func (v *Network) Remove() error { return v.Client.NetworkRemove(context.Background(), v.Name) } ================================================ FILE: pkg/commands/os.go ================================================ package commands import ( "context" "fmt" "io" "os" "os/exec" "path/filepath" "strings" "sync" "time" "github.com/go-errors/errors" "github.com/jesseduffield/kill" "github.com/jesseduffield/lazydocker/pkg/config" "github.com/jesseduffield/lazydocker/pkg/utils" "github.com/mgutz/str" "github.com/sirupsen/logrus" ) // Platform stores the os state type Platform struct { os string shell string shellArg string openCommand string openLinkCommand string } // OSCommand holds all the os commands type OSCommand struct { Log *logrus.Entry Platform *Platform Config *config.AppConfig command func(string, ...string) *exec.Cmd getenv func(string) string } // NewOSCommand os command runner func NewOSCommand(log *logrus.Entry, config *config.AppConfig) *OSCommand { return &OSCommand{ Log: log, Platform: getPlatform(), Config: config, command: exec.Command, getenv: os.Getenv, } } // SetCommand sets the command function used by the struct. // To be used for testing only func (c *OSCommand) SetCommand(cmd func(string, ...string) *exec.Cmd) { c.command = cmd } // RunCommandWithOutput wrapper around commands returning their output and error func (c *OSCommand) RunCommandWithOutput(command string) (string, error) { cmd := c.ExecutableFromString(command) before := time.Now() output, err := sanitisedCommandOutput(cmd.Output()) c.Log.Warn(fmt.Sprintf("'%s': %s", command, time.Since(before))) return output, err } // RunCommandWithOutput wrapper around commands returning their output and error func (c *OSCommand) RunCommandWithOutputContext(ctx context.Context, command string) (string, error) { cmd := c.ExecutableFromStringContext(ctx, command) before := time.Now() output, err := sanitisedCommandOutput(cmd.Output()) c.Log.Warn(fmt.Sprintf("'%s': %s", command, time.Since(before))) return output, err } // RunExecutableWithOutput runs an executable file and returns its output func (c *OSCommand) RunExecutableWithOutput(cmd *exec.Cmd) (string, error) { return sanitisedCommandOutput(cmd.CombinedOutput()) } // RunExecutable runs an executable file and returns an error if there was one func (c *OSCommand) RunExecutable(cmd *exec.Cmd) error { _, err := c.RunExecutableWithOutput(cmd) return err } // ExecutableFromString takes a string like `docker ps -a` and returns an executable command for it func (c *OSCommand) ExecutableFromString(commandStr string) *exec.Cmd { splitCmd := str.ToArgv(commandStr) return c.NewCmd(splitCmd[0], splitCmd[1:]...) } // Same as ExecutableFromString but cancellable via a context func (c *OSCommand) ExecutableFromStringContext(ctx context.Context, commandStr string) *exec.Cmd { splitCmd := str.ToArgv(commandStr) return exec.CommandContext(ctx, splitCmd[0], splitCmd[1:]...) } func (c *OSCommand) NewCmd(cmdName string, commandArgs ...string) *exec.Cmd { cmd := c.command(cmdName, commandArgs...) cmd.Env = os.Environ() return cmd } func (c *OSCommand) NewCommandStringWithShell(commandStr string) string { var quotedCommand string // Windows does not seem to like quotes around the command if c.Platform.os == "windows" { quotedCommand = strings.NewReplacer( "^", "^^", "&", "^&", "|", "^|", "<", "^<", ">", "^>", "%", "^%", ).Replace(commandStr) } else { quotedCommand = c.Quote(commandStr) } return fmt.Sprintf("%s %s %s", c.Platform.shell, c.Platform.shellArg, quotedCommand) } // RunCommand runs a command and just returns the error func (c *OSCommand) RunCommand(command string) error { _, err := c.RunCommandWithOutput(command) return err } // FileType tells us if the file is a file, directory or other func (c *OSCommand) FileType(path string) string { fileInfo, err := os.Stat(path) if err != nil { return "other" } if fileInfo.IsDir() { return "directory" } return "file" } func sanitisedCommandOutput(output []byte, err error) (string, error) { outputString := string(output) if err != nil { // errors like 'exit status 1' are not very useful so we'll create an error // from stderr if we got an ExitError exitError, ok := err.(*exec.ExitError) if ok { return outputString, errors.New(string(exitError.Stderr)) } return "", WrapError(err) } return outputString, nil } // OpenFile opens a file with the given func (c *OSCommand) OpenFile(filename string) error { commandTemplate := c.Config.UserConfig.OS.OpenCommand templateValues := map[string]string{ "filename": c.Quote(filename), } command := utils.ResolvePlaceholderString(commandTemplate, templateValues) err := c.RunCommand(command) return err } // OpenLink opens a file with the given func (c *OSCommand) OpenLink(link string) error { commandTemplate := c.Config.UserConfig.OS.OpenLinkCommand templateValues := map[string]string{ "link": c.Quote(link), } command := utils.ResolvePlaceholderString(commandTemplate, templateValues) err := c.RunCommand(command) return err } // EditFile opens a file in a subprocess using whatever editor is available, // falling back to core.editor, VISUAL, EDITOR, then vi func (c *OSCommand) EditFile(filename string) (*exec.Cmd, error) { editor := c.getenv("VISUAL") if editor == "" { editor = c.getenv("EDITOR") } if editor == "" { if err := c.RunCommand("which vi"); err == nil { editor = "vi" } } if editor == "" { return nil, errors.New("No editor defined in $VISUAL or $EDITOR") } return c.NewCmd(editor, filename), nil } // Quote wraps a message in platform-specific quotation marks func (c *OSCommand) Quote(message string) string { var quote string if c.Platform.os == "windows" { quote = `\"` message = strings.NewReplacer( `"`, `"'"'"`, `\"`, `\\"`, ).Replace(message) } else { quote = `"` message = strings.NewReplacer( `\`, `\\`, `"`, `\"`, `$`, `\$`, "`", "\\`", ).Replace(message) } return quote + message + quote } // Unquote removes wrapping quotations marks if they are present // this is needed for removing quotes from staged filenames with spaces func (c *OSCommand) Unquote(message string) string { return strings.Replace(message, `"`, "", -1) } // AppendLineToFile adds a new line in file func (c *OSCommand) AppendLineToFile(filename, line string) error { f, err := os.OpenFile(filename, os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0o600) if err != nil { return WrapError(err) } defer f.Close() _, err = f.WriteString("\n" + line) if err != nil { return WrapError(err) } return nil } // CreateTempFile writes a string to a new temp file and returns the file's name func (c *OSCommand) CreateTempFile(filename, content string) (string, error) { tmpfile, err := os.CreateTemp("", filename) if err != nil { c.Log.Error(err) return "", WrapError(err) } if _, err := tmpfile.WriteString(content); err != nil { c.Log.Error(err) return "", WrapError(err) } if err := tmpfile.Close(); err != nil { c.Log.Error(err) return "", WrapError(err) } return tmpfile.Name(), nil } // Remove removes a file or directory at the specified path func (c *OSCommand) Remove(filename string) error { err := os.RemoveAll(filename) return WrapError(err) } // FileExists checks whether a file exists at the specified path func (c *OSCommand) FileExists(path string) (bool, error) { if _, err := os.Stat(path); err != nil { if os.IsNotExist(err) { return false, nil } return false, err } return true, nil } // RunPreparedCommand takes a pointer to an exec.Cmd and runs it // this is useful if you need to give your command some environment variables // before running it func (c *OSCommand) RunPreparedCommand(cmd *exec.Cmd) error { out, err := cmd.CombinedOutput() outString := string(out) c.Log.Info(outString) if err != nil { if len(outString) == 0 { return err } return errors.New(outString) } return nil } // GetLazydockerPath returns the path of the currently executed file func (c *OSCommand) GetLazydockerPath() string { ex, err := os.Executable() // get the executable path for docker to use if err != nil { ex = os.Args[0] // fallback to the first call argument if needed } return filepath.ToSlash(ex) } // RunCustomCommand returns the pointer to a custom command func (c *OSCommand) RunCustomCommand(command string) *exec.Cmd { return c.NewCmd(c.Platform.shell, c.Platform.shellArg, command) } // PipeCommands runs a heap of commands and pipes their inputs/outputs together like A | B | C func (c *OSCommand) PipeCommands(commandStrings ...string) error { cmds := make([]*exec.Cmd, len(commandStrings)) for i, str := range commandStrings { cmds[i] = c.ExecutableFromString(str) } for i := 0; i < len(cmds)-1; i++ { stdout, err := cmds[i].StdoutPipe() if err != nil { return err } cmds[i+1].Stdin = stdout } // keeping this here in case I adapt this code for some other purpose in the future // cmds[len(cmds)-1].Stdout = os.Stdout finalErrors := []string{} wg := sync.WaitGroup{} wg.Add(len(cmds)) for _, cmd := range cmds { currentCmd := cmd go func() { stderr, err := currentCmd.StderrPipe() if err != nil { c.Log.Error(err) } if err := currentCmd.Start(); err != nil { c.Log.Error(err) } if b, err := io.ReadAll(stderr); err == nil { if len(b) > 0 { finalErrors = append(finalErrors, string(b)) } } if err := currentCmd.Wait(); err != nil { c.Log.Error(err) } wg.Done() }() } wg.Wait() if len(finalErrors) > 0 { return errors.New(strings.Join(finalErrors, "\n")) } return nil } // Kill kills a process. If the process has Setpgid == true, then we have anticipated that it might spawn its own child processes, so we've given it a process group ID (PGID) equal to its process id (PID) and given its child processes will inherit the PGID, we can kill that group, rather than killing the process itself. func (c *OSCommand) Kill(cmd *exec.Cmd) error { return kill.Kill(cmd) } // PrepareForChildren sets Setpgid to true on the cmd, so that when we run it as a subprocess, we can kill its group rather than the process itself. This is because some commands, like `docker-compose logs` spawn multiple children processes, and killing the parent process isn't sufficient for killing those child processes. We set the group id here, and then in subprocess.go we check if the group id is set and if so, we kill the whole group rather than just the one process. func (c *OSCommand) PrepareForChildren(cmd *exec.Cmd) { kill.PrepareForChildren(cmd) } ================================================ FILE: pkg/commands/os_default_platform.go ================================================ //go:build !windows // +build !windows package commands import ( "runtime" ) func getPlatform() *Platform { return &Platform{ os: runtime.GOOS, shell: "bash", shellArg: "-c", openCommand: "open {{filename}}", openLinkCommand: "open {{link}}", } } ================================================ FILE: pkg/commands/os_test.go ================================================ package commands import ( "fmt" "os" "os/exec" "testing" "github.com/stretchr/testify/assert" ) // TestOSCommandRunCommandWithOutput is a function. func TestOSCommandRunCommandWithOutput(t *testing.T) { type scenario struct { command string test func(string, error) } scenarios := []scenario{ { "echo -n '123'", func(output string, err error) { assert.NoError(t, err) assert.EqualValues(t, "123", output) }, }, { "rmdir unexisting-folder", func(output string, err error) { assert.Regexp(t, "rmdir.*unexisting-folder.*", err.Error()) }, }, } for _, s := range scenarios { s.test(NewDummyOSCommand().RunCommandWithOutput(s.command)) } } // TestOSCommandRunCommand is a function. func TestOSCommandRunCommand(t *testing.T) { type scenario struct { command string test func(error) } scenarios := []scenario{ { "rmdir unexisting-folder", func(err error) { assert.Regexp(t, "rmdir.*unexisting-folder.*", err.Error()) }, }, } for _, s := range scenarios { s.test(NewDummyOSCommand().RunCommand(s.command)) } } // TestOSCommandEditFile is a function. func TestOSCommandEditFile(t *testing.T) { type scenario struct { filename string command func(string, ...string) *exec.Cmd getenv func(string) string test func(*exec.Cmd, error) } scenarios := []scenario{ { "test", func(name string, arg ...string) *exec.Cmd { return exec.Command("exit", "1") }, func(env string) string { return "" }, func(cmd *exec.Cmd, err error) { assert.EqualError(t, err, "No editor defined in $VISUAL or $EDITOR") }, }, { "test", func(name string, arg ...string) *exec.Cmd { if name == "which" { return exec.Command("exit", "1") } assert.EqualValues(t, "nano", name) return exec.Command("exit", "0") }, func(env string) string { if env == "VISUAL" { return "nano" } return "" }, func(cmd *exec.Cmd, err error) { assert.NoError(t, err) }, }, { "test", func(name string, arg ...string) *exec.Cmd { if name == "which" { return exec.Command("exit", "1") } assert.EqualValues(t, "emacs", name) return exec.Command("exit", "0") }, func(env string) string { if env == "EDITOR" { return "emacs" } return "" }, func(cmd *exec.Cmd, err error) { assert.NoError(t, err) }, }, { "test", func(name string, arg ...string) *exec.Cmd { if name == "which" { return exec.Command("echo") } assert.EqualValues(t, "vi", name) return exec.Command("exit", "0") }, func(env string) string { return "" }, func(cmd *exec.Cmd, err error) { assert.NoError(t, err) }, }, } for _, s := range scenarios { OSCmd := NewDummyOSCommand() OSCmd.command = s.command OSCmd.getenv = s.getenv s.test(OSCmd.EditFile(s.filename)) } } func TestOSCommandQuote(t *testing.T) { osCommand := NewDummyOSCommand() osCommand.Platform.os = "linux" actual := osCommand.Quote("hello `test`") expected := "\"hello \\`test\\`\"" assert.EqualValues(t, expected, actual) } // TestOSCommandQuoteSingleQuote tests the quote function with ' quotes explicitly for Linux func TestOSCommandQuoteSingleQuote(t *testing.T) { osCommand := NewDummyOSCommand() osCommand.Platform.os = "linux" actual := osCommand.Quote("hello 'test'") expected := `"hello 'test'"` assert.EqualValues(t, expected, actual) } // TestOSCommandQuoteDoubleQuote tests the quote function with " quotes explicitly for Linux func TestOSCommandQuoteDoubleQuote(t *testing.T) { osCommand := NewDummyOSCommand() osCommand.Platform.os = "linux" actual := osCommand.Quote(`hello "test"`) expected := `"hello \"test\""` assert.EqualValues(t, expected, actual) } // TestOSCommandQuoteWindows tests the quote function for Windows func TestOSCommandQuoteWindows(t *testing.T) { osCommand := NewDummyOSCommand() osCommand.Platform.os = "windows" actual := osCommand.Quote(`hello "test" 'test2'`) expected := `\"hello "'"'"test"'"'" 'test2'\"` assert.EqualValues(t, expected, actual) } // TestOSCommandUnquote is a function. func TestOSCommandUnquote(t *testing.T) { osCommand := NewDummyOSCommand() actual := osCommand.Unquote(`hello "test"`) expected := "hello test" assert.EqualValues(t, expected, actual) } // TestOSCommandFileType is a function. func TestOSCommandFileType(t *testing.T) { type scenario struct { path string setup func() test func(string) } scenarios := []scenario{ { "testFile", func() { if _, err := os.Create("testFile"); err != nil { panic(err) } }, func(output string) { assert.EqualValues(t, "file", output) }, }, { "file with spaces", func() { if _, err := os.Create("file with spaces"); err != nil { panic(err) } }, func(output string) { assert.EqualValues(t, "file", output) }, }, { "testDirectory", func() { if err := os.Mkdir("testDirectory", 0o644); err != nil { panic(err) } }, func(output string) { assert.EqualValues(t, "directory", output) }, }, { "nonExistant", func() {}, func(output string) { assert.EqualValues(t, "other", output) }, }, } for _, s := range scenarios { s.setup() s.test(NewDummyOSCommand().FileType(s.path)) _ = os.RemoveAll(s.path) } } func TestOSCommandCreateTempFile(t *testing.T) { type scenario struct { testName string filename string content string test func(string, error) } scenarios := []scenario{ { "valid case", "filename", "content", func(path string, err error) { assert.NoError(t, err) content, err := os.ReadFile(path) assert.NoError(t, err) assert.Equal(t, "content", string(content)) }, }, } for _, s := range scenarios { t.Run(s.testName, func(t *testing.T) { s.test(NewDummyOSCommand().CreateTempFile(s.filename, s.content)) }) } } func TestOSCommandExecutableFromStringWithShellLinux(t *testing.T) { osCommand := NewDummyOSCommand() osCommand.Platform.os = "linux" tests := []struct { name string commandStr string want string }{ { "success", "pwd", fmt.Sprintf("%v %v %v", osCommand.Platform.shell, osCommand.Platform.shellArg, "\"pwd\""), }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got := osCommand.NewCommandStringWithShell(tt.commandStr) assert.Equal(t, tt.want, got) }) } } func TestOSCommandNewCommandStringWithShellWindows(t *testing.T) { osCommand := NewDummyOSCommand() osCommand.Platform.os = "windows" tests := []struct { name string commandStr string want string }{ { "success", "pwd", fmt.Sprintf("%v %v %v", osCommand.Platform.shell, osCommand.Platform.shellArg, "pwd"), }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got := osCommand.NewCommandStringWithShell(tt.commandStr) assert.Equal(t, tt.want, got) }) } } ================================================ FILE: pkg/commands/os_windows.go ================================================ package commands func getPlatform() *Platform { return &Platform{ os: "windows", shell: "cmd", shellArg: "/c", } } ================================================ FILE: pkg/commands/project.go ================================================ package commands type Project struct { Name string } ================================================ FILE: pkg/commands/service.go ================================================ package commands import ( "context" "os/exec" "github.com/docker/docker/api/types/container" "github.com/jesseduffield/lazydocker/pkg/utils" "github.com/sirupsen/logrus" ) // Service : A docker Service type Service struct { Name string ID string ProjectName string OSCommand *OSCommand Log *logrus.Entry Container *Container DockerCommand LimitedDockerCommand } // Remove removes the service's containers func (s *Service) Remove(options container.RemoveOptions) error { return s.Container.Remove(options) } // Stop stops the service's containers func (s *Service) Stop() error { return s.runCommand(s.OSCommand.Config.UserConfig.CommandTemplates.StopService) } // Up up's the service func (s *Service) Up() error { return s.runCommand(s.OSCommand.Config.UserConfig.CommandTemplates.UpService) } // Restart restarts the service func (s *Service) Restart() error { return s.runCommand(s.OSCommand.Config.UserConfig.CommandTemplates.RestartService) } // Start starts the service func (s *Service) Start() error { return s.runCommand(s.OSCommand.Config.UserConfig.CommandTemplates.StartService) } func (s *Service) runCommand(templateCmdStr string) error { command := utils.ApplyTemplate( templateCmdStr, s.DockerCommand.NewCommandObject(CommandObject{Service: s}), ) return s.OSCommand.RunCommand(command) } // Attach attaches to the service func (s *Service) Attach() (*exec.Cmd, error) { return s.Container.Attach() } // ViewLogs attaches to a subprocess viewing the service's logs func (s *Service) ViewLogs() (*exec.Cmd, error) { templateString := s.OSCommand.Config.UserConfig.CommandTemplates.ViewServiceLogs command := utils.ApplyTemplate( templateString, s.DockerCommand.NewCommandObject(CommandObject{Service: s}), ) cmd := s.OSCommand.ExecutableFromString(command) s.OSCommand.PrepareForChildren(cmd) return cmd, nil } // RenderTop renders the process list of the service func (s *Service) RenderTop(ctx context.Context) (string, error) { templateString := s.OSCommand.Config.UserConfig.CommandTemplates.ServiceTop command := utils.ApplyTemplate( templateString, s.DockerCommand.NewCommandObject(CommandObject{Service: s}), ) return s.OSCommand.RunCommandWithOutputContext(ctx, command) } ================================================ FILE: pkg/commands/ssh/ssh.go ================================================ package ssh import ( "context" "fmt" "io" "net" "net/url" "os" "os/exec" "path" "time" ) // we only need these two methods from our OSCommand struct, for killing commands type CmdKiller interface { Kill(cmd *exec.Cmd) error PrepareForChildren(cmd *exec.Cmd) } type SSHHandler struct { oSCommand CmdKiller dialContext func(ctx context.Context, network, addr string) (io.Closer, error) startCmd func(*exec.Cmd) error tempDir func(dir string, pattern string) (name string, err error) getenv func(key string) string setenv func(key, value string) error } func NewSSHHandler(oSCommand CmdKiller) *SSHHandler { return &SSHHandler{ oSCommand: oSCommand, dialContext: func(ctx context.Context, network, addr string) (io.Closer, error) { return (&net.Dialer{}).DialContext(ctx, network, addr) }, startCmd: func(cmd *exec.Cmd) error { return cmd.Start() }, tempDir: os.MkdirTemp, getenv: os.Getenv, setenv: os.Setenv, } } // HandleSSHDockerHost overrides the DOCKER_HOST environment variable // to point towards a local unix socket tunneled over SSH to the specified ssh host. func (self *SSHHandler) HandleSSHDockerHost() (io.Closer, error) { const key = "DOCKER_HOST" ctx := context.Background() u, err := url.Parse(self.getenv(key)) if err != nil { // if no or an invalid docker host is specified, continue nominally return noopCloser{}, nil } // if the docker host scheme is "ssh", forward the docker socket before creating the client if u.Scheme == "ssh" { tunnel, err := self.createDockerHostTunnel(ctx, u.Host) if err != nil { return noopCloser{}, fmt.Errorf("tunnel ssh docker host: %w", err) } err = self.setenv(key, tunnel.socketPath) if err != nil { return noopCloser{}, fmt.Errorf("override DOCKER_HOST to tunneled socket: %w", err) } return tunnel, nil } return noopCloser{}, nil } type noopCloser struct{} func (noopCloser) Close() error { return nil } type tunneledDockerHost struct { socketPath string cmd *exec.Cmd oSCommand CmdKiller } var _ io.Closer = (*tunneledDockerHost)(nil) func (t *tunneledDockerHost) Close() error { return t.oSCommand.Kill(t.cmd) } func (self *SSHHandler) createDockerHostTunnel(ctx context.Context, remoteHost string) (*tunneledDockerHost, error) { socketDir, err := self.tempDir("/tmp", "lazydocker-sshtunnel-") if err != nil { return nil, fmt.Errorf("create ssh tunnel tmp file: %w", err) } localSocket := path.Join(socketDir, "dockerhost.sock") cmd, err := self.tunnelSSH(ctx, remoteHost, localSocket) if err != nil { return nil, fmt.Errorf("tunnel docker host over ssh: %w", err) } // set a reasonable timeout, then wait for the socket to dial successfully // before attempting to create a new docker client const socketTunnelTimeout = 8 * time.Second ctx, cancel := context.WithTimeout(ctx, socketTunnelTimeout) defer cancel() err = self.retrySocketDial(ctx, localSocket) if err != nil { return nil, fmt.Errorf("ssh tunneled socket never became available: %w", err) } // construct the new DOCKER_HOST url with the proper scheme newDockerHostURL := url.URL{Scheme: "unix", Path: localSocket} return &tunneledDockerHost{ socketPath: newDockerHostURL.String(), cmd: cmd, oSCommand: self.oSCommand, }, nil } // Attempt to dial the socket until it becomes available. // The retry loop will continue until the parent context is canceled. func (self *SSHHandler) retrySocketDial(ctx context.Context, socketPath string) error { t := time.NewTicker(1 * time.Second) defer t.Stop() for { select { case <-ctx.Done(): return ctx.Err() case <-t.C: } // attempt to dial the socket, exit on success err := self.tryDial(ctx, socketPath) if err != nil { continue } return nil } } // Try to dial the specified unix socket, immediately close the connection if successfully created. func (self *SSHHandler) tryDial(ctx context.Context, socketPath string) error { conn, err := self.dialContext(ctx, "unix", socketPath) if err != nil { return err } defer conn.Close() return nil } func (self *SSHHandler) tunnelSSH(ctx context.Context, host, localSocket string) (*exec.Cmd, error) { cmd := exec.CommandContext(ctx, "ssh", "-L", localSocket+":/var/run/docker.sock", host, "-N") self.oSCommand.PrepareForChildren(cmd) err := self.startCmd(cmd) if err != nil { return nil, err } return cmd, nil } ================================================ FILE: pkg/commands/ssh/ssh_test.go ================================================ package ssh import ( "context" "io" "os/exec" "testing" "github.com/stretchr/testify/assert" ) func TestSSHHandlerHandleSSHDockerHost(t *testing.T) { type scenario struct { testName string envVarValue string expectedDialContextCount int expectedStartCmdCount int } scenarios := []scenario{ { testName: "No env var set", envVarValue: "", expectedDialContextCount: 0, expectedStartCmdCount: 0, }, { testName: "Env var set with https scheme", envVarValue: "https://myhost.com", expectedStartCmdCount: 0, expectedDialContextCount: 0, }, { testName: "Env var set with ssh scheme", envVarValue: "ssh://myhost@192.168.5.178", expectedStartCmdCount: 1, expectedDialContextCount: 1, }, } for _, s := range scenarios { s := s t.Run(s.testName, func(t *testing.T) { getenv := func(key string) string { if key != "DOCKER_HOST" { t.Errorf("Expected key to be DOCKER_HOST, got %s", key) } return s.envVarValue } tempDir := func(dir string, pattern string) (string, error) { assert.Equal(t, "/tmp", dir) assert.Equal(t, "lazydocker-sshtunnel-", pattern) return "/tmp/lazydocker-ssh-tunnel-12345", nil } setenv := func(key, value string) error { assert.Equal(t, "DOCKER_HOST", key) assert.Equal(t, "unix:///tmp/lazydocker-ssh-tunnel-12345/dockerhost.sock", value) return nil } startCmdCount := 0 startCmd := func(cmd *exec.Cmd) error { assert.EqualValues(t, []string{"ssh", "-L", "/tmp/lazydocker-ssh-tunnel-12345/dockerhost.sock:/var/run/docker.sock", "192.168.5.178", "-N"}, cmd.Args) startCmdCount++ return nil } dialContextCount := 0 dialContext := func(ctx context.Context, network string, address string) (io.Closer, error) { assert.Equal(t, "unix", network) assert.Equal(t, "/tmp/lazydocker-ssh-tunnel-12345/dockerhost.sock", address) dialContextCount++ return noopCloser{}, nil } handler := &SSHHandler{ oSCommand: &fakeCmdKiller{}, dialContext: dialContext, startCmd: startCmd, tempDir: tempDir, getenv: getenv, setenv: setenv, } _, err := handler.HandleSSHDockerHost() assert.NoError(t, err) assert.Equal(t, s.expectedDialContextCount, dialContextCount) assert.Equal(t, s.expectedStartCmdCount, startCmdCount) }) } } type fakeCmdKiller struct{} func (self *fakeCmdKiller) Kill(cmd *exec.Cmd) error { return nil } func (self *fakeCmdKiller) PrepareForChildren(cmd *exec.Cmd) {} ================================================ FILE: pkg/commands/volume.go ================================================ package commands import ( "context" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/volume" "github.com/docker/docker/client" "github.com/sirupsen/logrus" ) // Volume : A docker Volume type Volume struct { Name string Volume *volume.Volume Client *client.Client OSCommand *OSCommand Log *logrus.Entry DockerCommand LimitedDockerCommand } // RefreshVolumes gets the volumes and stores them func (c *DockerCommand) RefreshVolumes() ([]*Volume, error) { result, err := c.Client.VolumeList(context.Background(), volume.ListOptions{}) if err != nil { return nil, err } volumes := result.Volumes ownVolumes := make([]*Volume, len(volumes)) for i, vol := range volumes { ownVolumes[i] = &Volume{ Name: vol.Name, Volume: vol, Client: c.Client, OSCommand: c.OSCommand, Log: c.Log, DockerCommand: c, } } return ownVolumes, nil } // PruneVolumes prunes volumes func (c *DockerCommand) PruneVolumes() error { _, err := c.Client.VolumesPrune(context.Background(), filters.Args{}) return err } // Remove removes the volume func (v *Volume) Remove(force bool) error { return v.Client.VolumeRemove(context.Background(), v.Name, force) } ================================================ FILE: pkg/config/app_config.go ================================================ // Package config handles all the user-configuration. The fields here are // all in PascalCase but in your actual config.yml they'll be in camelCase. // You can view the default config with `lazydocker --config`. // You can open your config file by going to the status panel (using left-arrow) // and pressing 'o'. // You can directly edit the file (e.g. in vim) by pressing 'e' instead. // To see the final config after your user-specific options have been merged // with the defaults, go to the 'about' tab in the status panel. // Because of the way we merge your user config with the defaults you may need // to be careful: if for example you set a `commandTemplates:` yaml key but then // give it no child values, it will scrap all of the defaults and the app will // probably crash. package config import ( "os" "path/filepath" "strings" "time" "github.com/OpenPeeDeeP/xdg" "github.com/jesseduffield/yaml" ) // UserConfig holds all of the user-configurable options type UserConfig struct { // Gui is for configuring visual things like colors and whether we show or // hide things Gui GuiConfig `yaml:"gui,omitempty"` // ConfirmOnQuit when enabled prompts you to confirm you want to quit when you // hit esc or q when no confirmation panels are open ConfirmOnQuit bool `yaml:"confirmOnQuit,omitempty"` // Logs determines how we render/filter a container's logs Logs LogsConfig `yaml:"logs,omitempty"` // CommandTemplates determines what commands actually get called when we run // certain commands CommandTemplates CommandTemplatesConfig `yaml:"commandTemplates,omitempty"` // CustomCommands determines what shows up in your custom commands menu when // you press 'c'. You can use go templates to access three items on the // struct: the DockerCompose command (defaulted to 'docker-compose'), the // Service if present, and the Container if present. The struct types for // those are found in the commands package CustomCommands CustomCommands `yaml:"customCommands,omitempty"` // BulkCommands are commands that apply to all items in a panel e.g. // killing all containers, stopping all services, or pruning all images BulkCommands CustomCommands `yaml:"bulkCommands,omitempty"` // OS determines what defaults are set for opening files and links OS OSConfig `yaml:"oS,omitempty"` // Stats determines how long lazydocker will gather container stats for, and // what stat info to graph Stats StatsConfig `yaml:"stats,omitempty"` // Replacements determines how we render an item's info Replacements Replacements `yaml:"replacements,omitempty"` // For demo purposes: any list item with one of these strings as a substring // will be filtered out and not displayed. // Not documented because it's subject to change Ignore []string `yaml:"ignore,omitempty"` } // ThemeConfig is for setting the colors of panels and some text. type ThemeConfig struct { ActiveBorderColor []string `yaml:"activeBorderColor,omitempty"` InactiveBorderColor []string `yaml:"inactiveBorderColor,omitempty"` SelectedLineBgColor []string `yaml:"selectedLineBgColor,omitempty"` OptionsTextColor []string `yaml:"optionsTextColor,omitempty"` } // GuiConfig is for configuring visual things like colors and whether we show or // hide things type GuiConfig struct { // ScrollHeight determines how many characters you scroll at a time when // scrolling the main panel ScrollHeight int `yaml:"scrollHeight,omitempty"` // Language determines which language the GUI displayed. Language string `yaml:"language,omitempty"` // ScrollPastBottom determines whether you can scroll past the bottom of the // main view ScrollPastBottom bool `yaml:"scrollPastBottom,omitempty"` // IgnoreMouseEvents is for when you do not want to use your mouse to interact // with anything IgnoreMouseEvents bool `yaml:"mouseEvents,omitempty"` // Theme determines what colors and color attributes your panel borders have. // I always set inactiveBorderColor to black because in my terminal it's more // of a grey, but that doesn't work in your average terminal. I highly // recommended finding a combination that works for you Theme ThemeConfig `yaml:"theme,omitempty"` // ShowAllContainers determines whether the Containers panel contains all the // containers returned by `docker ps -a`, or just those containers that aren't // directly linked to a service. It is probably desirable to enable this if // you have multiple containers per service, but otherwise it can cause a lot // of clutter ShowAllContainers bool `yaml:"showAllContainers,omitempty"` // ReturnImmediately determines whether you get the 'press enter to return to // lazydocker' message after a subprocess has completed. You would set this to // true if you often want to see the output of subprocesses before returning // to lazydocker. I would default this to false but then people who want it // set to true won't even know the config option exists. ReturnImmediately bool `yaml:"returnImmediately,omitempty"` // WrapMainPanel determines whether we use word wrap on the main panel WrapMainPanel bool `yaml:"wrapMainPanel,omitempty"` // LegacySortContainers determines if containers should be sorted using legacy approach. // By default, containers are now sorted by status. This setting allows users to // use legacy behaviour instead. LegacySortContainers bool `yaml:"legacySortContainers,omitempty"` // If 0.333, then the side panels will be 1/3 of the screen's width SidePanelWidth float64 `yaml:"sidePanelWidth"` // Determines whether we show the bottom line (the one containing keybinding // info and the status of the app). ShowBottomLine bool `yaml:"showBottomLine"` // When true, increases vertical space used by focused side panel, // creating an accordion effect ExpandFocusedSidePanel bool `yaml:"expandFocusedSidePanel"` // ScreenMode allow user to specify which screen mode will be used on startup ScreenMode string `yaml:"screenMode,omitempty"` // Determines the style of the container status and container health display in the // containers panel. "long": full words (default), "short": one or two characters, // "icon": unicode emoji. ContainerStatusHealthStyle string `yaml:"containerStatusHealthStyle"` // Window border style. // One of 'rounded' (default) | 'single' | 'double' | 'hidden' Border string `yaml:"border"` } // CommandTemplatesConfig determines what commands actually get called when we // run certain commands type CommandTemplatesConfig struct { // RestartService is for restarting a service. docker-compose restart {{ // .Service.Name }} works but I prefer docker-compose up --force-recreate {{ // .Service.Name }} RestartService string `yaml:"restartService,omitempty"` // StartService is just like the above but for starting StartService string `yaml:"startService,omitempty"` // UpService ups the service (creates and starts) UpService string `yaml:"upService,omitempty"` // Runs "docker-compose up -d" Up string `yaml:"up,omitempty"` // downs everything Down string `yaml:"down,omitempty"` // downs and removes volumes DownWithVolumes string `yaml:"downWithVolumes,omitempty"` // DockerCompose is for your docker-compose command. You may want to combine a // few different docker-compose.yml files together, in which case you can set // this to "docker compose -f foo/docker-compose.yml -f // bah/docker-compose.yml". The reason that the other docker-compose command // templates all start with {{ .DockerCompose }} is so that they can make use // of whatever you've set in this value rather than you having to copy and // paste it to all the other commands DockerCompose string `yaml:"dockerCompose,omitempty"` // StopService is the command for stopping a service StopService string `yaml:"stopService,omitempty"` // ServiceLogs get the logs for a service. This is actually not currently // used; we just get the logs of the corresponding container. But we should // probably support explicitly returning the logs of the service when you've // selected the service, given that a service may have multiple containers. ServiceLogs string `yaml:"serviceLogs,omitempty"` // ViewServiceLogs is for when you want to view the logs of a service as a // subprocess. This defaults to having no filter, unlike the in-app logs // commands which will usually filter down to the last hour for the sake of // performance. ViewServiceLogs string `yaml:"viewServiceLogs,omitempty"` // RebuildService is the command for rebuilding a service. Defaults to // something along the lines of `{{ .DockerCompose }} up --build {{ // .Service.Name }}` RebuildService string `yaml:"rebuildService,omitempty"` // RecreateService is for force-recreating a service. I prefer this to // restarting a service because it will also restart any dependent services // and ensure they're running before trying to run the service at hand RecreateService string `yaml:"recreateService,omitempty"` // AllLogs is for showing what you get from doing `docker compose logs`. It // combines all the logs together AllLogs string `yaml:"allLogs,omitempty"` // ViewAllLogs is the command we use when you want to see all logs in a subprocess with no filtering ViewAllLogs string `yaml:"viewAlLogs,omitempty"` // DockerComposeConfig is the command for viewing the config of your docker // compose. It basically prints out the yaml from your docker-compose.yml // file(s) DockerComposeConfig string `yaml:"dockerComposeConfig,omitempty"` // CheckDockerComposeConfig is what we use to check whether we are in a // docker-compose context. If the command returns an error then we clearly // aren't in a docker-compose config and we then just hide the services panel // and only show containers CheckDockerComposeConfig string `yaml:"checkDockerComposeConfig,omitempty"` // ServiceTop is the command for viewing the processes under a given service ServiceTop string `yaml:"serviceTop,omitempty"` } // OSConfig contains config on the level of the os type OSConfig struct { // OpenCommand is the command for opening a file OpenCommand string `yaml:"openCommand,omitempty"` // OpenCommand is the command for opening a link OpenLinkCommand string `yaml:"openLinkCommand,omitempty"` } // GraphConfig specifies how to make a graph of recorded container stats type GraphConfig struct { // Min sets the minimum value that you want to display. If you want to set // this, you should also set MinType to "static". The reason for this is that // if Min == 0, it's not clear if it has not been set (given that the // zero-value of an int is 0) or if it's intentionally been set to 0. Min float64 `yaml:"min,omitempty"` // Max sets the maximum value that you want to display. If you want to set // this, you should also set MaxType to "static". The reason for this is that // if Max == 0, it's not clear if it has not been set (given that the // zero-value of an int is 0) or if it's intentionally been set to 0. Max float64 `yaml:"max,omitempty"` // Height sets the height of the graph in ascii characters Height int `yaml:"height,omitempty"` // Caption sets the caption of the graph. If you want to show CPU Percentage // you could set this to "CPU (%)" Caption string `yaml:"caption,omitempty"` // This is the path to the stat that you want to display. It is based on the // RecordedStats struct in container_stats.go, so feel free to look there to // see all the options available. Alternatively if you go into lazydocker and // go to the stats tab, you'll see that same struct in JSON format, so you can // just PascalCase the path and you'll have a valid path. E.g. // ClientStats.blkio_stats -> "ClientStats.BlkioStats" StatPath string `yaml:"statPath,omitempty"` // This determines the color of the graph. This can be any color attribute, // e.g. 'blue', 'green' Color string `yaml:"color,omitempty"` // MinType and MaxType are each one of "", "static". blank means the min/max // of the data set will be used. "static" means the min/max specified will be // used MinType string `yaml:"minType,omitempty"` // MaxType is just like MinType but for the max value MaxType string `yaml:"maxType,omitempty"` } // StatsConfig contains the stuff relating to stats and graphs type StatsConfig struct { // Graphs contains the configuration for the stats graphs we want to show in // the app Graphs []GraphConfig // MaxDuration tells us how long to collect stats for. Currently this defaults // to "5m" i.e. 5 minutes. MaxDuration time.Duration `yaml:"maxDuration,omitempty"` } // CustomCommands contains the custom commands that you might want to use on any // given service or container type CustomCommands struct { // Containers contains the custom commands for containers Containers []CustomCommand `yaml:"containers,omitempty"` // Services contains the custom commands for services Services []CustomCommand `yaml:"services,omitempty"` // Images contains the custom commands for images Images []CustomCommand `yaml:"images,omitempty"` // Volumes contains the custom commands for volumes Volumes []CustomCommand `yaml:"volumes,omitempty"` // Networks contains the custom commands for networks Networks []CustomCommand `yaml:"networks,omitempty"` } // Replacements contains the stuff relating to rendering a container's info type Replacements struct { // ImageNamePrefixes tells us how to replace a prefix in the Docker image name ImageNamePrefixes map[string]string `yaml:"imageNamePrefixes,omitempty"` } // CustomCommand is a template for a command we want to run against a service or // container type CustomCommand struct { // Name is the name of the command, purely for visual display Name string `yaml:"name"` // Attach tells us whether to switch to a subprocess to interact with the // called program, or just read its output. If Attach is set to false, the // command will run in the background. I'm open to the idea of having a third // option where the output plays in the main panel. Attach bool `yaml:"attach"` // Shell indicates whether to invoke the Command on a shell or not. // Example of a bash invoked command: `/bin/bash -c "{Command}". Shell bool `yaml:"shell"` // Command is the command we want to run. We can use the go templates here as // well. One example might be `{{ .DockerCompose }} exec {{ .Service.Name }} // /bin/sh` Command string `yaml:"command"` // ServiceNames is used to restrict this command to just one or more services. // An example might be 'rails migrate' for your rails api service(s). This // field has no effect on customcommands under the 'communications' part of // the customCommand config. ServiceNames []string `yaml:"serviceNames"` // InternalFunction is the name of a function inside lazydocker that we want to run, as opposed to a command-line command. This is only used internally and can't be configured by the user InternalFunction func() error `yaml:"-"` } type LogsConfig struct { Timestamps bool `yaml:"timestamps,omitempty"` Since string `yaml:"since,omitempty"` Tail string `yaml:"tail,omitempty"` } // GetDefaultConfig returns the application default configuration NOTE (to // contributors, not users): do not default a boolean to true, because false is // the boolean zero value and this will be ignored when parsing the user's // config func GetDefaultConfig() UserConfig { duration, err := time.ParseDuration("3m") if err != nil { panic(err) } return UserConfig{ Gui: GuiConfig{ ScrollHeight: 2, Language: "auto", ScrollPastBottom: false, IgnoreMouseEvents: false, Theme: ThemeConfig{ ActiveBorderColor: []string{"green", "bold"}, InactiveBorderColor: []string{"default"}, SelectedLineBgColor: []string{"blue"}, OptionsTextColor: []string{"blue"}, }, ShowAllContainers: false, ReturnImmediately: false, WrapMainPanel: true, LegacySortContainers: false, SidePanelWidth: 0.3333, ShowBottomLine: true, ExpandFocusedSidePanel: false, ScreenMode: "normal", ContainerStatusHealthStyle: "long", }, ConfirmOnQuit: false, Logs: LogsConfig{ Timestamps: false, Since: "60m", Tail: "", }, CommandTemplates: CommandTemplatesConfig{ DockerCompose: "docker compose", RestartService: "{{ .DockerCompose }} restart {{ .Service.Name }}", StartService: "{{ .DockerCompose }} start {{ .Service.Name }}", Up: "{{ .DockerCompose }} up -d", Down: "{{ .DockerCompose }} down", DownWithVolumes: "{{ .DockerCompose }} down --volumes", UpService: "{{ .DockerCompose }} up -d {{ .Service.Name }}", RebuildService: "{{ .DockerCompose }} up -d --build {{ .Service.Name }}", RecreateService: "{{ .DockerCompose }} up -d --force-recreate {{ .Service.Name }}", StopService: "{{ .DockerCompose }} stop {{ .Service.Name }}", ServiceLogs: "{{ .DockerCompose }} logs --since=60m --follow {{ .Service.Name }}", ViewServiceLogs: "{{ .DockerCompose }} logs --follow {{ .Service.Name }}", AllLogs: "{{ .DockerCompose }} logs --tail=300 --follow", ViewAllLogs: "{{ .DockerCompose }} logs", DockerComposeConfig: "{{ .DockerCompose }} config", CheckDockerComposeConfig: "{{ .DockerCompose }} config --quiet", ServiceTop: "{{ .DockerCompose }} top {{ .Service.Name }}", }, CustomCommands: CustomCommands{ Containers: []CustomCommand{}, Services: []CustomCommand{}, Images: []CustomCommand{}, Volumes: []CustomCommand{}, }, BulkCommands: CustomCommands{ Services: []CustomCommand{ { Name: "up", Command: "{{ .DockerCompose }} up -d", }, { Name: "up (attached)", Command: "{{ .DockerCompose }} up", Attach: true, }, { Name: "stop", Command: "{{ .DockerCompose }} stop", }, { Name: "pull", Command: "{{ .DockerCompose }} pull", Attach: true, }, { Name: "build", Command: "{{ .DockerCompose }} build --parallel --force-rm", Attach: true, }, { Name: "down", Command: "{{ .DockerCompose }} down", }, { Name: "down with volumes", Command: "{{ .DockerCompose }} down --volumes", }, { Name: "down with images", Command: "{{ .DockerCompose }} down --rmi all", }, { Name: "down with volumes and images", Command: "{{ .DockerCompose }} down --volumes --rmi all", }, }, Containers: []CustomCommand{}, Images: []CustomCommand{}, Volumes: []CustomCommand{}, }, OS: GetPlatformDefaultConfig(), Stats: StatsConfig{ MaxDuration: duration, Graphs: []GraphConfig{ { Caption: "CPU (%)", StatPath: "DerivedStats.CPUPercentage", Color: "cyan", }, { Caption: "Memory (%)", StatPath: "DerivedStats.MemoryPercentage", Color: "green", }, }, }, Replacements: Replacements{ ImageNamePrefixes: map[string]string{}, }, } } // AppConfig contains the base configuration fields required for lazydocker. type AppConfig struct { Debug bool `long:"debug" env:"DEBUG" default:"false"` Version string `long:"version" env:"VERSION" default:"unversioned"` Commit string `long:"commit" env:"COMMIT"` BuildDate string `long:"build-date" env:"BUILD_DATE"` Name string `long:"name" env:"NAME" default:"lazydocker"` BuildSource string `long:"build-source" env:"BUILD_SOURCE" default:""` UserConfig *UserConfig ConfigDir string ProjectDir string ProjectName string } // NewAppConfig makes a new app config func NewAppConfig(name, version, commit, date string, buildSource string, debuggingFlag bool, composeFiles []string, projectDir string, projectName string) (*AppConfig, error) { configDir, err := findOrCreateConfigDir(name) if err != nil { return nil, err } userConfig, err := loadUserConfigWithDefaults(configDir) if err != nil { return nil, err } // Pass compose files as individual -f flags to docker compose if len(composeFiles) > 0 { userConfig.CommandTemplates.DockerCompose += " -f " + strings.Join(composeFiles, " -f ") } appConfig := &AppConfig{ Name: name, Version: version, Commit: commit, BuildDate: date, Debug: debuggingFlag || os.Getenv("DEBUG") == "TRUE", BuildSource: buildSource, UserConfig: userConfig, ConfigDir: configDir, ProjectDir: projectDir, ProjectName: projectName, } return appConfig, nil } func configDirForVendor(vendor string, projectName string) string { envConfigDir := os.Getenv("CONFIG_DIR") if envConfigDir != "" { return envConfigDir } configDirs := xdg.New(vendor, projectName) return configDirs.ConfigHome() } func configDir(projectName string) string { legacyConfigDirectory := configDirForVendor("jesseduffield", projectName) if _, err := os.Stat(legacyConfigDirectory); !os.IsNotExist(err) { return legacyConfigDirectory } configDirectory := configDirForVendor("", projectName) return configDirectory } func findOrCreateConfigDir(projectName string) (string, error) { folder := configDir(projectName) err := os.MkdirAll(folder, 0o755) if err != nil { return "", err } return folder, nil } func loadUserConfigWithDefaults(configDir string) (*UserConfig, error) { config := GetDefaultConfig() return loadUserConfig(configDir, &config) } func loadUserConfig(configDir string, base *UserConfig) (*UserConfig, error) { fileName := filepath.Join(configDir, "config.yml") if _, err := os.Stat(fileName); err != nil { if os.IsNotExist(err) { file, err := os.Create(fileName) if err != nil { return nil, err } file.Close() } else { return nil, err } } content, err := os.ReadFile(fileName) if err != nil { return nil, err } if err := yaml.Unmarshal(content, base); err != nil { return nil, err } return base, nil } // WriteToUserConfig allows you to set a value on the user config to be saved // note that if you set a zero-value, it may be ignored e.g. a false or 0 or // empty string this is because we are using the omitempty yaml directive so // that we don't write a heap of zero values to the user's config.yml func (c *AppConfig) WriteToUserConfig(updateConfig func(*UserConfig) error) error { userConfig, err := loadUserConfig(c.ConfigDir, &UserConfig{}) if err != nil { return err } if err := updateConfig(userConfig); err != nil { return err } file, err := os.OpenFile(c.ConfigFilename(), os.O_WRONLY|os.O_CREATE, 0o666) if err != nil { return err } return yaml.NewEncoder(file).Encode(userConfig) } // ConfigFilename returns the filename of the current config file func (c *AppConfig) ConfigFilename() string { return filepath.Join(c.ConfigDir, "config.yml") } ================================================ FILE: pkg/config/app_config_test.go ================================================ package config import ( "os" "testing" "github.com/jesseduffield/yaml" ) func TestDockerComposeCommandNoFiles(t *testing.T) { composeFiles := []string{} conf, err := NewAppConfig("name", "version", "commit", "date", "buildSource", false, composeFiles, "projectDir", "") if err != nil { t.Fatalf("Unexpected error: %s", err) } actual := conf.UserConfig.CommandTemplates.DockerCompose expected := "docker compose" if actual != expected { t.Fatalf("Expected %s but got %s", expected, actual) } } func TestDockerComposeCommandSingleFile(t *testing.T) { composeFiles := []string{"one.yml"} conf, err := NewAppConfig("name", "version", "commit", "date", "buildSource", false, composeFiles, "projectDir", "") if err != nil { t.Fatalf("Unexpected error: %s", err) } actual := conf.UserConfig.CommandTemplates.DockerCompose expected := "docker compose -f one.yml" if actual != expected { t.Fatalf("Expected %s but got %s", expected, actual) } } func TestDockerComposeCommandMultipleFiles(t *testing.T) { composeFiles := []string{"one.yml", "two.yml", "three.yml"} conf, err := NewAppConfig("name", "version", "commit", "date", "buildSource", false, composeFiles, "projectDir", "") if err != nil { t.Fatalf("Unexpected error: %s", err) } actual := conf.UserConfig.CommandTemplates.DockerCompose expected := "docker compose -f one.yml -f two.yml -f three.yml" if actual != expected { t.Fatalf("Expected %s but got %s", expected, actual) } } func TestWritingToConfigFile(t *testing.T) { // init the AppConfig emptyComposeFiles := []string{} conf, err := NewAppConfig("name", "version", "commit", "date", "buildSource", false, emptyComposeFiles, "projectDir", "") if err != nil { t.Fatalf("Unexpected error: %s", err) } testFn := func(t *testing.T, ac *AppConfig, newValue bool) { t.Helper() updateFn := func(uc *UserConfig) error { uc.ConfirmOnQuit = newValue return nil } err = ac.WriteToUserConfig(updateFn) if err != nil { t.Fatalf("Unexpected error: %s", err) } file, err := os.OpenFile(ac.ConfigFilename(), os.O_RDONLY, 0o660) if err != nil { t.Fatalf("Unexpected error: %s", err) } sampleUC := UserConfig{} err = yaml.NewDecoder(file).Decode(&sampleUC) if err != nil { t.Fatalf("Unexpected error: %s", err) } err = file.Close() if err != nil { t.Fatalf("Unexpected error: %s", err) } if sampleUC.ConfirmOnQuit != newValue { t.Fatalf("Got %v, Expected %v\n", sampleUC.ConfirmOnQuit, newValue) } } // insert value into an empty file testFn(t, conf, true) // modifying an existing file that already has 'ConfirmOnQuit' testFn(t, conf, false) } ================================================ FILE: pkg/config/config_default_platform.go ================================================ //go:build !windows && !linux // +build !windows,!linux package config // GetPlatformDefaultConfig gets the defaults for the platform func GetPlatformDefaultConfig() OSConfig { return OSConfig{ OpenCommand: "open {{filename}}", OpenLinkCommand: "open {{link}}", } } ================================================ FILE: pkg/config/config_linux.go ================================================ package config // GetPlatformDefaultConfig gets the defaults for the platform func GetPlatformDefaultConfig() OSConfig { return OSConfig{ OpenCommand: `sh -c "xdg-open {{filename}} >/dev/null"`, OpenLinkCommand: `sh -c "xdg-open {{link}} >/dev/null"`, } } ================================================ FILE: pkg/config/config_windows.go ================================================ package config // GetPlatformDefaultConfig gets the defaults for the platform func GetPlatformDefaultConfig() OSConfig { return OSConfig{ OpenCommand: `cmd /c "start "" {{filename}}"`, OpenLinkCommand: `cmd /c "start "" {{link}}"`, } } ================================================ FILE: pkg/gui/app_status_manager.go ================================================ package gui import ( "time" "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazydocker/pkg/utils" ) type appStatus struct { name string statusType string duration int } type statusManager struct { statuses []appStatus } func (m *statusManager) removeStatus(name string) { newStatuses := []appStatus{} for _, status := range m.statuses { if status.name != name { newStatuses = append(newStatuses, status) } } m.statuses = newStatuses } func (m *statusManager) addWaitingStatus(name string) { m.removeStatus(name) newStatus := appStatus{ name: name, statusType: "waiting", duration: 0, } m.statuses = append([]appStatus{newStatus}, m.statuses...) } func (m *statusManager) getStatusString() string { if len(m.statuses) == 0 { return "" } topStatus := m.statuses[0] if topStatus.statusType == "waiting" { return topStatus.name + " " + utils.Loader() } return topStatus.name } // WithWaitingStatus wraps a function and shows a waiting status while the function is still executing func (gui *Gui) WithWaitingStatus(name string, f func() error) error { go func() { gui.statusManager.addWaitingStatus(name) defer func() { gui.statusManager.removeStatus(name) }() go func() { ticker := time.NewTicker(time.Millisecond * 50) defer ticker.Stop() for range ticker.C { appStatus := gui.statusManager.getStatusString() if appStatus == "" { return } if err := gui.renderString(gui.g, "appStatus", appStatus); err != nil { gui.Log.Warn(err) } } }() if err := f(); err != nil { gui.g.Update(func(g *gocui.Gui) error { return gui.createErrorPanel(err.Error()) }) } }() return nil } ================================================ FILE: pkg/gui/arrangement.go ================================================ package gui import ( "github.com/jesseduffield/lazycore/pkg/boxlayout" "github.com/jesseduffield/lazydocker/pkg/gui/panels" "github.com/jesseduffield/lazydocker/pkg/utils" "github.com/mattn/go-runewidth" "github.com/samber/lo" ) // In this file we use the boxlayout package, along with knowledge about the app's state, // to arrange the windows (i.e. panels) on the screen. const INFO_SECTION_PADDING = " " func (gui *Gui) getWindowDimensions(informationStr string, appStatus string) map[string]boxlayout.Dimensions { minimumHeight := 9 minimumWidth := 10 width, height := gui.g.Size() if width < minimumWidth || height < minimumHeight { return boxlayout.ArrangeWindows(&boxlayout.Box{Window: "limit"}, 0, 0, width, height) } sideSectionWeight, mainSectionWeight := gui.getMidSectionWeights() sidePanelsDirection := boxlayout.COLUMN portraitMode := width <= 84 && height > 45 if portraitMode { sidePanelsDirection = boxlayout.ROW } showInfoSection := gui.Config.UserConfig.Gui.ShowBottomLine || gui.State.Filter.active infoSectionSize := 0 if showInfoSection { infoSectionSize = 1 } root := &boxlayout.Box{ Direction: boxlayout.ROW, Children: []*boxlayout.Box{ { Direction: sidePanelsDirection, Weight: 1, Children: []*boxlayout.Box{ { Direction: boxlayout.ROW, Weight: sideSectionWeight, ConditionalChildren: gui.sidePanelChildren, }, { Window: "main", Weight: mainSectionWeight, }, }, }, { Direction: boxlayout.COLUMN, Size: infoSectionSize, Children: gui.infoSectionChildren(informationStr, appStatus), }, }, } return boxlayout.ArrangeWindows(root, 0, 0, width, height) } func (gui *Gui) getMidSectionWeights() (int, int) { currentWindow := gui.currentStaticWindowName() // we originally specified this as a ratio i.e. .20 would correspond to a weight of 1 against 4 sidePanelWidthRatio := gui.Config.UserConfig.Gui.SidePanelWidth // we could make this better by creating ratios like 2:3 rather than always 1:something mainSectionWeight := int(1/sidePanelWidthRatio) - 1 sideSectionWeight := 1 if currentWindow == "main" && gui.State.ScreenMode == SCREEN_FULL { mainSectionWeight = 1 sideSectionWeight = 0 } else { if gui.State.ScreenMode == SCREEN_HALF { mainSectionWeight = 1 } else if gui.State.ScreenMode == SCREEN_FULL { mainSectionWeight = 0 } } return sideSectionWeight, mainSectionWeight } func (gui *Gui) infoSectionChildren(informationStr string, appStatus string) []*boxlayout.Box { result := []*boxlayout.Box{} if len(appStatus) > 0 { result = append(result, &boxlayout.Box{ Window: "appStatus", Size: runewidth.StringWidth(appStatus) + runewidth.StringWidth(INFO_SECTION_PADDING), }, ) } if gui.State.Filter.active { return append(result, []*boxlayout.Box{ { Window: "filterPrefix", Size: runewidth.StringWidth(gui.filterPrompt()), }, { Window: "filter", Weight: 1, }, }...) } result = append(result, []*boxlayout.Box{ { Window: "options", Weight: 1, }, { Window: "information", // unlike appStatus, informationStr has various colors so we need to decolorise before taking the length Size: runewidth.StringWidth(INFO_SECTION_PADDING) + runewidth.StringWidth(utils.Decolorise(informationStr)), }, }..., ) return result } func (gui *Gui) sideViewNames() []string { visibleSidePanels := lo.Filter(gui.allSidePanels(), func(panel panels.ISideListPanel, _ int) bool { return !panel.IsHidden() }) return lo.Map(visibleSidePanels, func(panel panels.ISideListPanel, _ int) string { return panel.GetView().Name() }) } func (gui *Gui) sidePanelChildren(width int, height int) []*boxlayout.Box { currentWindow := gui.currentSideWindowName() sideWindowNames := gui.sideViewNames() if gui.State.ScreenMode == SCREEN_FULL || gui.State.ScreenMode == SCREEN_HALF { fullHeightBox := func(window string) *boxlayout.Box { if window == currentWindow { return &boxlayout.Box{ Window: window, Weight: 1, } } else { return &boxlayout.Box{ Window: window, Size: 0, } } } return lo.Map(sideWindowNames, func(window string, _ int) *boxlayout.Box { return fullHeightBox(window) }) } else if height >= 28 { accordionMode := gui.Config.UserConfig.Gui.ExpandFocusedSidePanel accordionBox := func(defaultBox *boxlayout.Box) *boxlayout.Box { if accordionMode && defaultBox.Window == currentWindow { return &boxlayout.Box{ Window: defaultBox.Window, Weight: 2, } } return defaultBox } // The project panel is compact (Size: 3) when not focused, but expands // when focused to show the list of projects. projectBox := &boxlayout.Box{ Window: sideWindowNames[0], Size: 3, } if currentWindow == sideWindowNames[0] { projectBox = &boxlayout.Box{ Window: sideWindowNames[0], Weight: 2, } } return append([]*boxlayout.Box{ projectBox, }, lo.Map(sideWindowNames[1:], func(window string, _ int) *boxlayout.Box { return accordionBox(&boxlayout.Box{Window: window, Weight: 1}) })...) } else { squashedHeight := 1 if height >= 21 { squashedHeight = 3 } squashedSidePanelBox := func(window string) *boxlayout.Box { if window == currentWindow { return &boxlayout.Box{ Window: window, Weight: 1, } } else { return &boxlayout.Box{ Window: window, Size: squashedHeight, } } } return lo.Map(sideWindowNames, func(window string, _ int) *boxlayout.Box { return squashedSidePanelBox(window) }) } } ================================================ FILE: pkg/gui/confirmation_panel.go ================================================ // lots of this has been directly ported from one of the example files, will brush up later // Copyright 2014 The gocui 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 gui import ( "strings" "github.com/fatih/color" "github.com/jesseduffield/gocui" ) func (gui *Gui) wrappedConfirmationFunction(function func(*gocui.Gui, *gocui.View) error) func(*gocui.Gui, *gocui.View) error { return func(g *gocui.Gui, v *gocui.View) error { if err := gui.closeConfirmationPrompt(); err != nil { return err } if function != nil { if err := function(g, v); err != nil { return err } } return nil } } func (gui *Gui) closeConfirmationPrompt() error { if err := gui.returnFocus(); err != nil { return err } gui.g.DeleteViewKeybindings("confirmation") gui.Views.Confirmation.Visible = false return nil } func (gui *Gui) getMessageHeight(wrap bool, message string, width int) int { lines := strings.Split(message, "\n") lineCount := 0 // if we need to wrap, calculate height to fit content within view's width if wrap { for _, line := range lines { lineCount += len(line)/width + 1 } } else { lineCount = len(lines) } return lineCount } func (gui *Gui) getConfirmationPanelDimensions(wrap bool, prompt string) (int, int, int, int) { width, height := gui.g.Size() panelWidth := width / 2 panelHeight := gui.getMessageHeight(wrap, prompt, panelWidth) return width/2 - panelWidth/2, height/2 - panelHeight/2 - panelHeight%2 - 1, width/2 + panelWidth/2, height/2 + panelHeight/2 } func (gui *Gui) createPromptPanel(title string, handleConfirm func(*gocui.Gui, *gocui.View) error) error { gui.onNewPopupPanel() err := gui.prepareConfirmationPanel(title, "") if err != nil { return err } gui.Views.Confirmation.Editable = true return gui.setKeyBindings(gui.g, handleConfirm, nil) } func (gui *Gui) prepareConfirmationPanel(title, prompt string) error { x0, y0, x1, y1 := gui.getConfirmationPanelDimensions(true, prompt) confirmationView := gui.Views.Confirmation _, err := gui.g.SetView("confirmation", x0, y0, x1, y1, 0) if err != nil { return err } confirmationView.Title = title confirmationView.Visible = true gui.g.Update(func(g *gocui.Gui) error { return gui.switchFocus(confirmationView) }) return nil } func (gui *Gui) onNewPopupPanel() { gui.Views.Menu.Visible = false gui.Views.Confirmation.Visible = false } // It is very important that within this function we never include the original prompt in any error messages, because it may contain e.g. a user password. // The golangcilint unparam linter complains that handleClose is alwans nil but one day it won't be nil. // nolint:unparam func (gui *Gui) createConfirmationPanel(title, prompt string, handleConfirm, handleClose func(*gocui.Gui, *gocui.View) error) error { return gui.createPopupPanel(title, prompt, handleConfirm, handleClose) } func (gui *Gui) createPopupPanel(title, prompt string, handleConfirm, handleClose func(*gocui.Gui, *gocui.View) error) error { gui.onNewPopupPanel() gui.g.Update(func(g *gocui.Gui) error { if gui.currentViewName() == "confirmation" { if err := gui.closeConfirmationPrompt(); err != nil { gui.Log.Error(err.Error()) } } err := gui.prepareConfirmationPanel(title, prompt) if err != nil { return err } gui.Views.Confirmation.Editable = false if err := gui.renderString(g, "confirmation", prompt); err != nil { return err } return gui.setKeyBindings(g, handleConfirm, handleClose) }) return nil } func (gui *Gui) setKeyBindings(g *gocui.Gui, handleConfirm, handleClose func(*gocui.Gui, *gocui.View) error) error { // would use a loop here but because the function takes an interface{} and slices of interfaces require even more boilerplate if err := g.SetKeybinding("confirmation", gocui.KeyEnter, gocui.ModNone, gui.wrappedConfirmationFunction(handleConfirm)); err != nil { return err } if err := g.SetKeybinding("confirmation", 'y', gocui.ModNone, gui.wrappedConfirmationFunction(handleConfirm)); err != nil { return err } if err := g.SetKeybinding("confirmation", gocui.KeyEsc, gocui.ModNone, gui.wrappedConfirmationFunction(handleClose)); err != nil { return err } if err := g.SetKeybinding("confirmation", 'n', gocui.ModNone, gui.wrappedConfirmationFunction(handleClose)); err != nil { return err } return nil } func (gui *Gui) createErrorPanel(message string) error { colorFunction := color.New(color.FgRed).SprintFunc() coloredMessage := colorFunction(strings.TrimSpace(message)) return gui.createConfirmationPanel(gui.Tr.ErrorTitle, coloredMessage, nil, nil) } func (gui *Gui) renderConfirmationOptions() error { optionsMap := map[string]string{ "n/esc": gui.Tr.No, "y/enter": gui.Tr.Yes, } return gui.renderOptionsMap(optionsMap) } ================================================ FILE: pkg/gui/container_logs.go ================================================ package gui import ( "context" "fmt" "io" "os" "os/signal" "time" "github.com/docker/docker/api/types/container" "github.com/docker/docker/pkg/stdcopy" "github.com/fatih/color" "github.com/jesseduffield/lazydocker/pkg/commands" "github.com/jesseduffield/lazydocker/pkg/tasks" "github.com/jesseduffield/lazydocker/pkg/utils" ) func (gui *Gui) renderContainerLogsToMain(container *commands.Container) tasks.TaskFunc { return gui.NewTickerTask(TickerTaskOpts{ Func: func(ctx context.Context, notifyStopped chan struct{}) { gui.renderContainerLogsToMainAux(container, ctx, notifyStopped) }, Duration: time.Millisecond * 200, // TODO: see why this isn't working (when switching from Top tab to Logs tab in the services panel, the tops tab's content isn't removed) Before: func(ctx context.Context) { gui.clearMainView() }, Wrap: gui.Config.UserConfig.Gui.WrapMainPanel, Autoscroll: true, }) } func (gui *Gui) renderContainerLogsToMainAux(container *commands.Container, ctx context.Context, notifyStopped chan struct{}) { gui.clearMainView() defer func() { notifyStopped <- struct{}{} }() mainView := gui.Views.Main if err := gui.writeContainerLogs(container, ctx, mainView); err != nil { gui.Log.Error(err) } // if we are here because the task has been stopped, we should return // if we are here then the container must have exited, meaning we should wait until it's back again before ticker := time.NewTicker(time.Millisecond * 100) defer ticker.Stop() for { select { case <-ctx.Done(): return case <-ticker.C: result, err := container.Inspect() if err != nil { // if we get an error, then the container has probably been removed so we'll get out of here gui.Log.Error(err) return } if result.State.Running { return } } } } func (gui *Gui) renderLogsToStdout(container *commands.Container) { stop := make(chan os.Signal, 1) defer signal.Stop(stop) ctx, cancel := context.WithCancel(context.Background()) go func() { signal.Notify(stop, os.Interrupt) <-stop cancel() }() if err := gui.g.Suspend(); err != nil { gui.Log.Error(err) return } defer func() { if err := gui.g.Resume(); err != nil { gui.Log.Error(err) } }() if err := gui.writeContainerLogs(container, ctx, os.Stdout); err != nil { gui.Log.Error(err) return } gui.promptToReturn() } func (gui *Gui) promptToReturn() { if !gui.Config.UserConfig.Gui.ReturnImmediately { fmt.Fprintf(os.Stdout, "\n\n%s", utils.ColoredString(gui.Tr.PressEnterToReturn, color.FgGreen)) // wait for enter press if _, err := fmt.Scanln(); err != nil { gui.Log.Error(err) } } } func (gui *Gui) writeContainerLogs(ctr *commands.Container, ctx context.Context, writer io.Writer) error { readCloser, err := gui.DockerCommand.Client.ContainerLogs(ctx, ctr.ID, container.LogsOptions{ ShowStdout: true, ShowStderr: true, Timestamps: gui.Config.UserConfig.Logs.Timestamps, Since: gui.Config.UserConfig.Logs.Since, Tail: gui.Config.UserConfig.Logs.Tail, Follow: true, }) if err != nil { gui.Log.Error(err) return err } defer readCloser.Close() if !ctr.DetailsLoaded() { // loop until the details load or context is cancelled, using timer ticker := time.NewTicker(time.Millisecond * 100) defer ticker.Stop() outer: for { select { case <-ctx.Done(): return nil case <-ticker.C: if ctr.DetailsLoaded() { break outer } } } } if ctr.Details.Config.Tty { _, err = io.Copy(writer, readCloser) if err != nil { return err } } else { _, err = stdcopy.StdCopy(writer, writer, readCloser) if err != nil { return err } } return nil } ================================================ FILE: pkg/gui/containers_panel.go ================================================ package gui import ( "context" "fmt" "strings" "time" "github.com/docker/docker/api/types/container" "github.com/fatih/color" "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazydocker/pkg/commands" "github.com/jesseduffield/lazydocker/pkg/config" "github.com/jesseduffield/lazydocker/pkg/gui/panels" "github.com/jesseduffield/lazydocker/pkg/gui/presentation" "github.com/jesseduffield/lazydocker/pkg/gui/types" "github.com/jesseduffield/lazydocker/pkg/tasks" "github.com/jesseduffield/lazydocker/pkg/utils" "github.com/samber/lo" ) func (gui *Gui) getContainersPanel() *panels.SideListPanel[*commands.Container] { // Standalone containers are containers which are either one-off containers, or whose service is not part of this docker-compose context. isStandaloneContainer := func(container *commands.Container) bool { if container.OneOff || container.ServiceName == "" { return true } return !lo.SomeBy(gui.Panels.Services.List.GetAllItems(), func(service *commands.Service) bool { return service.Name == container.ServiceName && service.ProjectName == container.ProjectName }) } return &panels.SideListPanel[*commands.Container]{ ContextState: &panels.ContextState[*commands.Container]{ GetMainTabs: func() []panels.MainTab[*commands.Container] { return []panels.MainTab[*commands.Container]{ { Key: "logs", Title: gui.Tr.LogsTitle, Render: gui.renderContainerLogsToMain, }, { Key: "stats", Title: gui.Tr.StatsTitle, Render: gui.renderContainerStats, }, { Key: "env", Title: gui.Tr.EnvTitle, Render: gui.renderContainerEnv, }, { Key: "config", Title: gui.Tr.ConfigTitle, Render: gui.renderContainerConfig, }, { Key: "top", Title: gui.Tr.TopTitle, Render: gui.renderContainerTop, }, } }, GetItemContextCacheKey: func(container *commands.Container) string { // Including the container state in the cache key so that if the container // restarts we re-read the logs. In the past we've had some glitchiness // where a container restarts but the new logs don't get read. // Note that this might be jarring if we have a lot of logs and the container // restarts a lot, so let's keep an eye on it. return "containers-" + container.ID + "-" + container.Container.State }, }, ListPanel: panels.ListPanel[*commands.Container]{ List: panels.NewFilteredList[*commands.Container](), View: gui.Views.Containers, }, NoItemsMessage: gui.Tr.NoContainers, Gui: gui.intoInterface(), // sortedContainers returns containers sorted by state if c.SortContainersByState is true (follows 1- running, 2- exited, 3- created) // and sorted by name if c.SortContainersByState is false Sort: func(a *commands.Container, b *commands.Container) bool { return sortContainers(a, b, gui.Config.UserConfig.Gui.LegacySortContainers) }, Filter: func(container *commands.Container) bool { // Note that this is O(N*M) time complexity where N is the number of services // and M is the number of containers. We expect N to be small but M may be large, // so we will need to keep an eye on this. if !gui.Config.UserConfig.Gui.ShowAllContainers && !isStandaloneContainer(container) { return false } if !gui.State.ShowExitedContainers && container.Container.State == "exited" { return false } // Filter by selected project. Containers with no project (truly // standalone, not from any compose project) are always shown. selectedProject := gui.getSelectedProjectName() if selectedProject == "" { selectedProject = gui.DockerCommand.LocalProjectName } if selectedProject != "" && container.ProjectName != "" && container.ProjectName != selectedProject { return false } return true }, GetTableCells: func(container *commands.Container) []string { return presentation.GetContainerDisplayStrings(&gui.Config.UserConfig.Gui, container) }, } } var containerStates = map[string]int{ "running": 1, "exited": 2, "created": 3, } func sortContainers(a *commands.Container, b *commands.Container, legacySort bool) bool { if legacySort { return a.Name < b.Name } stateLeft := containerStates[a.Container.State] stateRight := containerStates[b.Container.State] if stateLeft == stateRight { return a.Name < b.Name } return containerStates[a.Container.State] < containerStates[b.Container.State] } func (gui *Gui) renderContainerEnv(container *commands.Container) tasks.TaskFunc { return gui.NewSimpleRenderStringTask(func() string { return gui.containerEnv(container) }) } func (gui *Gui) containerEnv(container *commands.Container) string { if !container.DetailsLoaded() { return gui.Tr.WaitingForContainerInfo } if len(container.Details.Config.Env) == 0 { return gui.Tr.NothingToDisplay } envVarsList := lo.Map(container.Details.Config.Env, func(envVar string, _ int) []string { splitEnv := strings.SplitN(envVar, "=", 2) key := splitEnv[0] value := "" if len(splitEnv) > 1 { value = splitEnv[1] } return []string{ utils.ColoredString(key+":", color.FgGreen), utils.ColoredString(value, color.FgYellow), } }) output, err := utils.RenderTable(envVarsList) if err != nil { gui.Log.Error(err) return gui.Tr.CannotDisplayEnvVariables } return output } func (gui *Gui) renderContainerConfig(container *commands.Container) tasks.TaskFunc { return gui.NewSimpleRenderStringTask(func() string { return gui.containerConfigStr(container) }) } func (gui *Gui) containerConfigStr(container *commands.Container) string { if !container.DetailsLoaded() { return gui.Tr.WaitingForContainerInfo } padding := 10 output := "" output += utils.WithPadding("ID: ", padding) + container.ID + "\n" output += utils.WithPadding("Name: ", padding) + container.Name + "\n" output += utils.WithPadding("Image: ", padding) + container.Details.Config.Image + "\n" output += utils.WithPadding("Command: ", padding) + strings.Join(append([]string{container.Details.Path}, container.Details.Args...), " ") + "\n" output += utils.WithPadding("Labels: ", padding) + utils.FormatMap(padding, container.Details.Config.Labels) output += "\n" output += utils.WithPadding("Mounts: ", padding) if len(container.Details.Mounts) > 0 { output += "\n" for _, mount := range container.Details.Mounts { if mount.Type == "volume" { output += fmt.Sprintf("%s%s %s\n", strings.Repeat(" ", padding), utils.ColoredString(string(mount.Type)+":", color.FgYellow), mount.Name) } else { output += fmt.Sprintf("%s%s %s:%s\n", strings.Repeat(" ", padding), utils.ColoredString(string(mount.Type)+":", color.FgYellow), mount.Source, mount.Destination) } } } else { output += "none\n" } output += utils.WithPadding("Ports: ", padding) if len(container.Details.NetworkSettings.Ports) > 0 { output += "\n" for k, v := range container.Details.NetworkSettings.Ports { for _, host := range v { output += fmt.Sprintf("%s%s %s\n", strings.Repeat(" ", padding), utils.ColoredString(host.HostPort+":", color.FgYellow), k) } } } else { output += "none\n" } data, err := utils.MarshalIntoYaml(&container.Details) if err != nil { return fmt.Sprintf("Error marshalling container details: %v", err) } output += fmt.Sprintf("\nFull details:\n\n%s", utils.ColoredYamlString(string(data))) return output } func (gui *Gui) renderContainerStats(container *commands.Container) tasks.TaskFunc { return gui.NewTickerTask(TickerTaskOpts{ Func: func(ctx context.Context, notifyStopped chan struct{}) { contents, err := presentation.RenderStats(gui.Config.UserConfig, container, gui.Views.Main.Width()) if err != nil { _ = gui.createErrorPanel(err.Error()) } gui.reRenderStringMain(contents) }, Duration: time.Second, Before: func(ctx context.Context) { gui.clearMainView() }, Wrap: false, // wrapping looks bad here so we're overriding the config value Autoscroll: false, }) } func (gui *Gui) renderContainerTop(container *commands.Container) tasks.TaskFunc { return gui.NewTickerTask(TickerTaskOpts{ Func: func(ctx context.Context, notifyStopped chan struct{}) { contents, err := container.RenderTop(ctx) if err != nil { gui.RenderStringMain(err.Error()) } gui.reRenderStringMain(contents) }, Duration: time.Second, Before: func(ctx context.Context) { gui.clearMainView() }, Wrap: gui.Config.UserConfig.Gui.WrapMainPanel, Autoscroll: false, }) } func (gui *Gui) refreshContainersAndServices() error { if gui.Views.Containers == nil { // if the containersView hasn't been instantiated yet we just return return nil } // keep track of current service selected so that we can reposition our cursor if it moves position in the list originalSelectedLineIdx := gui.Panels.Services.SelectedIdx selectedService, isServiceSelected := gui.Panels.Services.List.TryGet(originalSelectedLineIdx) containers, services, err := gui.DockerCommand.RefreshContainersAndServices( gui.Panels.Containers.List.GetAllItems(), ) if err != nil { return err } gui.Panels.Services.SetItems(services) gui.Panels.Containers.SetItems(containers) // see if our selected service has moved if isServiceSelected { for i, service := range gui.Panels.Services.List.GetItems() { if service.ID == selectedService.ID { if i == originalSelectedLineIdx { break } gui.Panels.Services.SetSelectedLineIdx(i) gui.Panels.Services.Refocus() } } } return gui.renderContainersAndServices() } func (gui *Gui) renderContainersAndServices() error { if err := gui.Panels.Services.RerenderList(); err != nil { return err } if err := gui.Panels.Containers.RerenderList(); err != nil { return err } return nil } func (gui *Gui) handleHideStoppedContainers(g *gocui.Gui, v *gocui.View) error { gui.State.ShowExitedContainers = !gui.State.ShowExitedContainers return gui.Panels.Containers.RerenderList() } func (gui *Gui) handleContainersRemoveMenu(g *gocui.Gui, v *gocui.View) error { ctr, err := gui.Panels.Containers.GetSelectedItem() if err != nil { return nil } handleMenuPress := func(configOptions container.RemoveOptions) error { return gui.WithWaitingStatus(gui.Tr.RemovingStatus, func() error { if err := ctr.Remove(configOptions); err != nil { if commands.HasErrorCode(err, commands.MustStopContainer) { return gui.createConfirmationPanel(gui.Tr.Confirm, gui.Tr.MustForceToRemoveContainer, func(g *gocui.Gui, v *gocui.View) error { return gui.WithWaitingStatus(gui.Tr.RemovingStatus, func() error { configOptions.Force = true return ctr.Remove(configOptions) }) }, nil) } return gui.createErrorPanel(err.Error()) } return nil }) } menuItems := []*types.MenuItem{ { LabelColumns: []string{gui.Tr.Remove, "docker rm " + ctr.ID[1:10]}, OnPress: func() error { return handleMenuPress(container.RemoveOptions{}) }, }, { LabelColumns: []string{gui.Tr.RemoveWithVolumes, "docker rm --volumes " + ctr.ID[1:10]}, OnPress: func() error { return handleMenuPress(container.RemoveOptions{RemoveVolumes: true}) }, }, } return gui.Menu(CreateMenuOptions{ Title: "", Items: menuItems, }) } func (gui *Gui) PauseContainer(container *commands.Container) error { return gui.WithWaitingStatus(gui.Tr.PausingStatus, func() (err error) { if container.Details.State.Paused { err = container.Unpause() } else { err = container.Pause() } if err != nil { return gui.createErrorPanel(err.Error()) } return gui.refreshContainersAndServices() }) } func (gui *Gui) handleContainerPause(g *gocui.Gui, v *gocui.View) error { ctr, err := gui.Panels.Containers.GetSelectedItem() if err != nil { return nil } return gui.PauseContainer(ctr) } func (gui *Gui) handleContainerStop(g *gocui.Gui, v *gocui.View) error { ctr, err := gui.Panels.Containers.GetSelectedItem() if err != nil { return nil } return gui.createConfirmationPanel(gui.Tr.Confirm, gui.Tr.StopContainer, func(g *gocui.Gui, v *gocui.View) error { return gui.WithWaitingStatus(gui.Tr.StoppingStatus, func() error { if err := ctr.Stop(); err != nil { return gui.createErrorPanel(err.Error()) } return nil }) }, nil) } func (gui *Gui) handleContainerRestart(g *gocui.Gui, v *gocui.View) error { ctr, err := gui.Panels.Containers.GetSelectedItem() if err != nil { return nil } return gui.WithWaitingStatus(gui.Tr.RestartingStatus, func() error { if err := ctr.Restart(); err != nil { return gui.createErrorPanel(err.Error()) } return nil }) } func (gui *Gui) handleContainerAttach(g *gocui.Gui, v *gocui.View) error { ctr, err := gui.Panels.Containers.GetSelectedItem() if err != nil { return nil } c, err := ctr.Attach() if err != nil { return gui.createErrorPanel(err.Error()) } return gui.runSubprocessWithMessage(c, gui.Tr.DetachFromContainerShortCut) } func (gui *Gui) handlePruneContainers() error { return gui.createConfirmationPanel(gui.Tr.Confirm, gui.Tr.ConfirmPruneContainers, func(g *gocui.Gui, v *gocui.View) error { return gui.WithWaitingStatus(gui.Tr.PruningStatus, func() error { err := gui.DockerCommand.PruneContainers() if err != nil { return gui.createErrorPanel(err.Error()) } return nil }) }, nil) } func (gui *Gui) handleContainerViewLogs(g *gocui.Gui, v *gocui.View) error { ctr, err := gui.Panels.Containers.GetSelectedItem() if err != nil { return nil } gui.renderLogsToStdout(ctr) return nil } func (gui *Gui) handleContainersExecShell(g *gocui.Gui, v *gocui.View) error { ctr, err := gui.Panels.Containers.GetSelectedItem() if err != nil { return nil } return gui.containerExecShell(ctr) } func (gui *Gui) containerExecShell(container *commands.Container) error { commandObject := gui.DockerCommand.NewCommandObject(commands.CommandObject{ Container: container, }) // TODO: use SDK resolvedCommand := utils.ApplyTemplate("docker exec -it {{ .Container.ID }} /bin/sh -c 'eval $(grep ^$(id -un): /etc/passwd | cut -d : -f 7-)'", commandObject) // attach and return the subprocess error cmd := gui.OSCommand.ExecutableFromString(resolvedCommand) return gui.runSubprocess(cmd) } func (gui *Gui) handleContainersCustomCommand(g *gocui.Gui, v *gocui.View) error { ctr, err := gui.Panels.Containers.GetSelectedItem() if err != nil { return nil } commandObject := gui.DockerCommand.NewCommandObject(commands.CommandObject{ Container: ctr, }) customCommands := gui.Config.UserConfig.CustomCommands.Containers return gui.createCustomCommandMenu(customCommands, commandObject) } func (gui *Gui) handleStopContainers() error { return gui.createConfirmationPanel(gui.Tr.Confirm, gui.Tr.ConfirmStopContainers, func(g *gocui.Gui, v *gocui.View) error { return gui.WithWaitingStatus(gui.Tr.StoppingStatus, func() error { for _, ctr := range gui.Panels.Containers.List.GetAllItems() { if err := ctr.Stop(); err != nil { gui.Log.Error(err) } } return nil }) }, nil) } func (gui *Gui) handleRemoveContainers() error { return gui.createConfirmationPanel(gui.Tr.Confirm, gui.Tr.ConfirmRemoveContainers, func(g *gocui.Gui, v *gocui.View) error { return gui.WithWaitingStatus(gui.Tr.RemovingStatus, func() error { for _, ctr := range gui.Panels.Containers.List.GetAllItems() { if err := ctr.Remove(container.RemoveOptions{Force: true}); err != nil { gui.Log.Error(err) } } return nil }) }, nil) } func (gui *Gui) handleContainersBulkCommand(g *gocui.Gui, v *gocui.View) error { baseBulkCommands := []config.CustomCommand{ { Name: gui.Tr.StopAllContainers, InternalFunction: gui.handleStopContainers, }, { Name: gui.Tr.RemoveAllContainers, InternalFunction: gui.handleRemoveContainers, }, { Name: gui.Tr.PruneContainers, InternalFunction: gui.handlePruneContainers, }, } bulkCommands := append(baseBulkCommands, gui.Config.UserConfig.BulkCommands.Containers...) commandObject := gui.DockerCommand.NewCommandObject(commands.CommandObject{}) return gui.createBulkCommandMenu(bulkCommands, commandObject) } // Open first port in browser func (gui *Gui) handleContainersOpenInBrowserCommand(g *gocui.Gui, v *gocui.View) error { ctr, err := gui.Panels.Containers.GetSelectedItem() if err != nil { return nil } return gui.openContainerInBrowser(ctr) } func (gui *Gui) openContainerInBrowser(ctr *commands.Container) error { // skip if no any ports if len(ctr.Container.Ports) == 0 { return nil } // skip if the first port is not published port := ctr.Container.Ports[0] if port.IP == "" { return nil } ip := port.IP if ip == "0.0.0.0" { ip = "localhost" } link := fmt.Sprintf("http://%s:%d/", ip, port.PublicPort) return gui.OSCommand.OpenLink(link) } ================================================ FILE: pkg/gui/custom_commands.go ================================================ package gui import ( "github.com/fatih/color" "github.com/jesseduffield/lazydocker/pkg/commands" "github.com/jesseduffield/lazydocker/pkg/config" "github.com/jesseduffield/lazydocker/pkg/gui/types" "github.com/jesseduffield/lazydocker/pkg/utils" "github.com/samber/lo" ) func (gui *Gui) createCommandMenu(customCommands []config.CustomCommand, commandObject commands.CommandObject, title string, waitingStatus string) error { menuItems := lo.Map(customCommands, func(command config.CustomCommand, _ int) *types.MenuItem { resolvedCommand := utils.ApplyTemplate(command.Command, commandObject) onPress := func() error { if command.InternalFunction != nil { return command.InternalFunction() } if command.Shell { resolvedCommand = gui.OSCommand.NewCommandStringWithShell(resolvedCommand) } // if we have a command for attaching, we attach and return the subprocess error if command.Attach { return gui.runSubprocess(gui.OSCommand.ExecutableFromString(resolvedCommand)) } return gui.WithWaitingStatus(waitingStatus, func() error { if err := gui.OSCommand.RunCommand(resolvedCommand); err != nil { return gui.createErrorPanel(err.Error()) } return nil }) } return &types.MenuItem{ LabelColumns: []string{ command.Name, utils.ColoredString(utils.WithShortSha(resolvedCommand), color.FgCyan), }, OnPress: onPress, } }) return gui.Menu(CreateMenuOptions{ Title: title, Items: menuItems, }) } func (gui *Gui) createCustomCommandMenu(customCommands []config.CustomCommand, commandObject commands.CommandObject) error { return gui.createCommandMenu(customCommands, commandObject, gui.Tr.CustomCommandTitle, gui.Tr.RunningCustomCommandStatus) } func (gui *Gui) createBulkCommandMenu(customCommands []config.CustomCommand, commandObject commands.CommandObject) error { return gui.createCommandMenu(customCommands, commandObject, gui.Tr.BulkCommandTitle, gui.Tr.RunningBulkCommandStatus) } ================================================ FILE: pkg/gui/filtering.go ================================================ package gui import ( "fmt" "github.com/jesseduffield/gocui" ) func (gui *Gui) handleOpenFilter() error { panel, ok := gui.currentListPanel() if !ok { return nil } if panel.IsFilterDisabled() { return nil } gui.State.Filter.active = true gui.State.Filter.panel = panel return gui.switchFocus(gui.Views.Filter) } func (gui *Gui) onNewFilterNeedle(value string) error { gui.State.Filter.needle = value gui.ResetOrigin(gui.State.Filter.panel.GetView()) return gui.State.Filter.panel.RerenderList() } func (gui *Gui) wrapEditor(f func(v *gocui.View, key gocui.Key, ch rune, mod gocui.Modifier) bool) func(v *gocui.View, key gocui.Key, ch rune, mod gocui.Modifier) bool { return func(v *gocui.View, key gocui.Key, ch rune, mod gocui.Modifier) bool { matched := f(v, key, ch, mod) if matched { if err := gui.onNewFilterNeedle(v.TextArea.GetContent()); err != nil { gui.Log.Error(err) } } return matched } } func (gui *Gui) escapeFilterPrompt() error { if err := gui.clearFilter(); err != nil { return err } return gui.returnFocus() } func (gui *Gui) clearFilter() error { gui.State.Filter.needle = "" gui.State.Filter.active = false panel := gui.State.Filter.panel gui.State.Filter.panel = nil gui.Views.Filter.ClearTextArea() if panel == nil { return nil } gui.ResetOrigin(panel.GetView()) return panel.RerenderList() } // returns to the list view with the filter still applied func (gui *Gui) commitFilter() error { if gui.State.Filter.needle == "" { if err := gui.clearFilter(); err != nil { return err } } return gui.returnFocus() } func (gui *Gui) filterPrompt() string { return fmt.Sprintf("%s: ", gui.Tr.FilterPrompt) } ================================================ FILE: pkg/gui/focus.go ================================================ package gui import ( "github.com/jesseduffield/gocui" "github.com/samber/lo" ) func (gui *Gui) newLineFocused(v *gocui.View) error { if v == nil { return nil } currentListPanel, ok := gui.currentListPanel() if ok { return currentListPanel.HandleSelect() } switch v.Name() { case "confirmation": return nil case "main": v.Highlight = false return nil case "filter": return nil default: panic(gui.Tr.NoViewMachingNewLineFocusedSwitchStatement) } } // TODO: move some of this logic into our onFocusLost and onFocus hooks func (gui *Gui) switchFocus(newView *gocui.View) error { gui.Mutexes.ViewStackMutex.Lock() defer gui.Mutexes.ViewStackMutex.Unlock() return gui.switchFocusAux(newView) } func (gui *Gui) switchFocusAux(newView *gocui.View) error { gui.pushView(newView.Name()) gui.Log.Info("setting highlight to true for view " + newView.Name()) gui.Log.Info("new focused view is " + newView.Name()) if _, err := gui.g.SetCurrentView(newView.Name()); err != nil { return err } gui.g.Cursor = newView.Editable if err := gui.renderPanelOptions(); err != nil { return err } newViewStack := gui.State.ViewStack if gui.State.Filter.panel != nil && !lo.Contains(newViewStack, gui.State.Filter.panel.GetView().Name()) { if err := gui.clearFilter(); err != nil { return err } } // TODO: add 'onFocusLost' hook if !lo.Contains(newViewStack, "menu") { gui.Views.Menu.Visible = false } return gui.newLineFocused(newView) } func (gui *Gui) returnFocus() error { gui.Mutexes.ViewStackMutex.Lock() defer gui.Mutexes.ViewStackMutex.Unlock() if len(gui.State.ViewStack) <= 1 { return nil } previousViewName := gui.State.ViewStack[len(gui.State.ViewStack)-2] previousView, err := gui.g.View(previousViewName) if err != nil { return err } return gui.switchFocusAux(previousView) } func (gui *Gui) removeViewFromStack(view *gocui.View) { gui.Mutexes.ViewStackMutex.Lock() defer gui.Mutexes.ViewStackMutex.Unlock() gui.State.ViewStack = lo.Filter(gui.State.ViewStack, func(viewName string, _ int) bool { return viewName != view.Name() }) } // Not to be called directly. Use `switchFocus` instead func (gui *Gui) pushView(name string) { // No matter what view we're pushing, we first remove all popup panels from the stack // (unless it's the search view because we may be searching the menu panel) if name != "filter" { gui.State.ViewStack = lo.Filter(gui.State.ViewStack, func(viewName string, _ int) bool { return !gui.isPopupPanel(viewName) }) } // If we're pushing a side panel, we remove all other panels if lo.Contains(gui.sideViewNames(), name) { gui.State.ViewStack = []string{} } // If we're pushing a panel that's already in the stack, we remove it gui.State.ViewStack = lo.Filter(gui.State.ViewStack, func(viewName string, _ int) bool { return viewName != name }) gui.State.ViewStack = append(gui.State.ViewStack, name) } // excludes popups func (gui *Gui) currentStaticViewName() string { gui.Mutexes.ViewStackMutex.Lock() defer gui.Mutexes.ViewStackMutex.Unlock() for i := len(gui.State.ViewStack) - 1; i >= 0; i-- { if !lo.Contains(gui.popupViewNames(), gui.State.ViewStack[i]) { return gui.State.ViewStack[i] } } return gui.initiallyFocusedViewName() } func (gui *Gui) currentSideViewName() string { gui.Mutexes.ViewStackMutex.Lock() defer gui.Mutexes.ViewStackMutex.Unlock() // we expect that there is a side window somewhere in the view stack, so we will search from top to bottom for idx := range gui.State.ViewStack { reversedIdx := len(gui.State.ViewStack) - 1 - idx viewName := gui.State.ViewStack[reversedIdx] if lo.Contains(gui.sideViewNames(), viewName) { return viewName } } return gui.initiallyFocusedViewName() } ================================================ FILE: pkg/gui/gocui.go ================================================ package gui import ( "github.com/gookit/color" "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazydocker/pkg/utils" ) var gocuiColorMap = map[string]gocui.Attribute{ "default": gocui.ColorDefault, "black": gocui.ColorBlack, "red": gocui.ColorRed, "green": gocui.ColorGreen, "yellow": gocui.ColorYellow, "blue": gocui.ColorBlue, "magenta": gocui.ColorMagenta, "cyan": gocui.ColorCyan, "white": gocui.ColorWhite, "bold": gocui.AttrBold, "reverse": gocui.AttrReverse, "underline": gocui.AttrUnderline, } // GetAttribute gets the gocui color attribute from the string func GetGocuiAttribute(key string) gocui.Attribute { if utils.IsValidHexValue(key) { values := color.HEX(key).Values() return gocui.NewRGBColor(int32(values[0]), int32(values[1]), int32(values[2])) } value, present := gocuiColorMap[key] if present { return value } return gocui.ColorDefault } // GetGocuiStyle bitwise OR's a list of attributes obtained via the given keys func GetGocuiStyle(keys []string) gocui.Attribute { var attribute gocui.Attribute for _, key := range keys { attribute |= GetGocuiAttribute(key) } return attribute } ================================================ FILE: pkg/gui/gui.go ================================================ package gui import ( "context" "os" "strings" "time" "github.com/docker/docker/api/types/events" "github.com/go-errors/errors" throttle "github.com/boz/go-throttle" "github.com/jesseduffield/gocui" lcUtils "github.com/jesseduffield/lazycore/pkg/utils" "github.com/jesseduffield/lazydocker/pkg/commands" "github.com/jesseduffield/lazydocker/pkg/config" "github.com/jesseduffield/lazydocker/pkg/gui/panels" "github.com/jesseduffield/lazydocker/pkg/gui/types" "github.com/jesseduffield/lazydocker/pkg/i18n" "github.com/jesseduffield/lazydocker/pkg/tasks" "github.com/sasha-s/go-deadlock" "github.com/sirupsen/logrus" ) // Gui wraps the gocui Gui object which handles rendering and events type Gui struct { g *gocui.Gui Log *logrus.Entry DockerCommand *commands.DockerCommand OSCommand *commands.OSCommand State guiState Config *config.AppConfig Tr *i18n.TranslationSet statusManager *statusManager taskManager *tasks.TaskManager ErrorChan chan error Views Views // if we've suspended the gui (e.g. because we've switched to a subprocess) // we typically want to pause some things that are running like background // file refreshes PauseBackgroundThreads bool Mutexes Panels Panels } type Panels struct { Projects *panels.SideListPanel[*commands.Project] Services *panels.SideListPanel[*commands.Service] Containers *panels.SideListPanel[*commands.Container] Images *panels.SideListPanel[*commands.Image] Volumes *panels.SideListPanel[*commands.Volume] Networks *panels.SideListPanel[*commands.Network] Menu *panels.SideListPanel[*types.MenuItem] } type Mutexes struct { SubprocessMutex deadlock.Mutex ViewStackMutex deadlock.Mutex } type mainPanelState struct { // ObjectKey tells us what context we are in. For example, if we are looking at the logs of a particular service in the services panel this key might be 'services--logs'. The key is made so that if something changes which might require us to re-run the logs command or run a different command, the key will be different, and we'll then know to do whatever is required. Object key probably isn't the best name for this but Context is already used to refer to tabs. Maybe I should just call them tabs. ObjectKey string } type panelStates struct { Main *mainPanelState } type guiState struct { // the names of views in the current focus stack (last item is the current view) ViewStack []string Platform commands.Platform Panels *panelStates SubProcessOutput string Stats map[string]commands.ContainerStats // if true, we show containers with an 'exited' status in the containers panel ShowExitedContainers bool ScreenMode WindowMaximisation // Maintains the state of manual filtering i.e. typing in a substring // to filter on in the current panel. Filter filterState } type filterState struct { // If true then we're either currently inside the filter view // or we've committed the filter and we're back in the list view active bool // The panel that we're filtering. panel panels.ISideListPanel // The string that we're filtering on needle string } // screen sizing determines how much space your selected window takes up (window // as in panel, not your terminal's window). Sometimes you want a bit more space // to see the contents of a panel, and this keeps track of how much maximisation // you've set type WindowMaximisation int const ( SCREEN_NORMAL WindowMaximisation = iota SCREEN_HALF SCREEN_FULL ) func getScreenMode(config *config.AppConfig) WindowMaximisation { switch config.UserConfig.Gui.ScreenMode { case "normal": return SCREEN_NORMAL case "half": return SCREEN_HALF case "fullscreen": return SCREEN_FULL default: return SCREEN_NORMAL } } // NewGui builds a new gui handler func NewGui(log *logrus.Entry, dockerCommand *commands.DockerCommand, oSCommand *commands.OSCommand, tr *i18n.TranslationSet, config *config.AppConfig, errorChan chan error) (*Gui, error) { initialState := guiState{ Platform: *oSCommand.Platform, Panels: &panelStates{ Main: &mainPanelState{ ObjectKey: "", }, }, ViewStack: []string{}, ShowExitedContainers: true, ScreenMode: getScreenMode(config), } gui := &Gui{ Log: log, DockerCommand: dockerCommand, OSCommand: oSCommand, State: initialState, Config: config, Tr: tr, statusManager: &statusManager{}, taskManager: tasks.NewTaskManager(log, tr), ErrorChan: errorChan, } deadlock.Opts.Disable = !gui.Config.Debug deadlock.Opts.DeadlockTimeout = 10 * time.Second return gui, nil } func (gui *Gui) renderGlobalOptions() error { return gui.renderOptionsMap(map[string]string{ "PgUp/PgDn": gui.Tr.Scroll, "← → ↑ ↓": gui.Tr.Navigate, "q": gui.Tr.Quit, "b": gui.Tr.ViewBulkCommands, "x": gui.Tr.Menu, }) } func (gui *Gui) goEvery(interval time.Duration, function func() error) { _ = function() // time.Tick doesn't run immediately so we'll do that here // TODO: maybe change go func() { ticker := time.NewTicker(interval) defer ticker.Stop() for range ticker.C { if !gui.PauseBackgroundThreads { _ = function() } } }() } // Run setup the gui with keybindings and start the mainloop func (gui *Gui) Run() error { // closing our task manager which in turn closes the current task if there is any, so we aren't leaving processes lying around after closing lazydocker defer gui.taskManager.Close() g, err := gocui.NewGui(gocui.NewGuiOpts{ OutputMode: gocui.OutputTrue, RuneReplacements: map[rune]string{}, }) if err != nil { return err } defer g.Close() // forgive the double-negative, this is because of my yaml `omitempty` woes if !gui.Config.UserConfig.Gui.IgnoreMouseEvents { g.Mouse = true } gui.g = g // TODO: always use gui.g rather than passing g around everywhere // if the deadlock package wants to report a deadlock, we first need to // close the gui so that we can actually read what it prints. deadlock.Opts.LogBuf = lcUtils.NewOnceWriter(os.Stderr, func() { gui.g.Close() }) if err := gui.SetColorScheme(); err != nil { return err } throttledRefresh := throttle.ThrottleFunc(time.Millisecond*50, true, gui.refresh) defer throttledRefresh.Stop() go func() { for err := range gui.ErrorChan { if err == nil { continue } if strings.Contains(err.Error(), "No such container") { // this happens all the time when e.g. restarting containers so we won't worry about it gui.Log.Warn(err) continue } _ = gui.createErrorPanel(err.Error()) } }() g.SetManager(gocui.ManagerFunc(gui.layout), gocui.ManagerFunc(gui.getFocusLayout())) if err := gui.createAllViews(); err != nil { return err } if err := gui.setInitialViewContent(); err != nil { return err } // TODO: see if we can avoid the circular dependency gui.setPanels() if err = gui.keybindings(g); err != nil { return err } if gui.g.CurrentView() == nil { viewName := gui.initiallyFocusedViewName() view, err := gui.g.View(viewName) if err != nil { return err } if err := gui.switchFocus(view); err != nil { return err } } ctx, finish := context.WithCancel(context.Background()) defer finish() go gui.listenForEvents(ctx, throttledRefresh.Trigger) go gui.monitorContainerStats(ctx) go func() { throttledRefresh.Trigger() gui.goEvery(time.Millisecond*30, gui.reRenderMain) gui.goEvery(time.Millisecond*1000, gui.updateContainerDetails) gui.goEvery(time.Millisecond*1000, gui.checkForContextChange) // we need to regularly re-render these because their stats will be changed in the background gui.goEvery(time.Millisecond*1000, gui.renderContainersAndServices) }() err = g.MainLoop() if err == gocui.ErrQuit { return nil } return err } func (gui *Gui) setPanels() { gui.Panels = Panels{ Projects: gui.getProjectPanel(), Services: gui.getServicesPanel(), Containers: gui.getContainersPanel(), Images: gui.getImagesPanel(), Volumes: gui.getVolumesPanel(), Networks: gui.getNetworksPanel(), Menu: gui.getMenuPanel(), } } func (gui *Gui) updateContainerDetails() error { return gui.DockerCommand.RefreshContainerDetails(gui.Panels.Containers.List.GetAllItems()) } func (gui *Gui) refresh() { go func() { // Refresh containers/services first, then projects (which depend on // container labels to discover projects). if err := gui.refreshContainersAndServices(); err != nil { gui.Log.Error(err) } if err := gui.refreshProject(); err != nil { gui.Log.Error(err) } }() go func() { if err := gui.reloadVolumes(); err != nil { gui.Log.Error(err) } }() go func() { if err := gui.reloadNetworks(); err != nil { gui.Log.Error(err) } }() go func() { if err := gui.reloadImages(); err != nil { gui.Log.Error(err) } }() } func (gui *Gui) listenForEvents(ctx context.Context, refresh func()) { errorCount := 0 onError := func(err error) { if err != nil { gui.ErrorChan <- errors.Errorf("Docker event stream returned error: %s\nRetry count: %d", err.Error(), errorCount) } errorCount++ time.Sleep(time.Second * 2) } outer: for { messageChan, errChan := gui.DockerCommand.Client.Events(context.Background(), events.ListOptions{}) if errorCount > 0 { select { case <-ctx.Done(): return case err := <-errChan: onError(err) continue outer default: // If we're here then we lost connection to docker and we just got it back. // The reason we do this refresh explicitly is because successfully // reconnecting with docker does not mean it's going to send us a new // event any time soon. // Assuming the confirmation prompt currently holds the given error _ = gui.closeConfirmationPrompt() refresh() errorCount = 0 } } for { select { case <-ctx.Done(): return case message := <-messageChan: // We could be more granular about what events should trigger which refreshes. // At the moment it's pretty efficient though, and it might not be worth // the maintenance burden of mapping specific events to specific refreshes refresh() gui.Log.Infof("received event of type: %s", message.Type) case err := <-errChan: onError(err) continue outer } } } } // checkForContextChange runs the currently focused panel's 'select' function, simulating the current item having just been selected. This will then trigger a check to see if anything's changed (e.g. a service has a new container) and if so, the appropriate code will run. For example, if you're reading logs from a service and all of a sudden its container changes, this will trigger the 'select' function, which will work out that the context is not different because of the new container, and then it will re-attempt to get the logs, this time for the correct container. This 'context' is stored in the main panel's ObjectKey. I'm using the term 'context' here more broadly than just the different tabs you can view in a panel. func (gui *Gui) checkForContextChange() error { return gui.newLineFocused(gui.g.CurrentView()) } func (gui *Gui) reRenderMain() error { mainView := gui.Views.Main if mainView == nil { return nil } if mainView.IsTainted() { gui.g.Update(func(g *gocui.Gui) error { return nil }) } return nil } func (gui *Gui) quit(g *gocui.Gui, v *gocui.View) error { if gui.Config.UserConfig.ConfirmOnQuit { return gui.createConfirmationPanel("", gui.Tr.ConfirmQuit, func(g *gocui.Gui, v *gocui.View) error { return gocui.ErrQuit }, nil) } return gocui.ErrQuit } // this handler is executed when we press escape when there is only one view // on the stack. func (gui *Gui) escape() error { if gui.State.Filter.active { return gui.clearFilter() } return nil } func (gui *Gui) handleDonate(g *gocui.Gui, v *gocui.View) error { if !gui.g.Mouse { return nil } cx, _ := v.Cursor() if cx > len(gui.Tr.Donate) { return nil } return gui.OSCommand.OpenLink("https://github.com/sponsors/jesseduffield") } func (gui *Gui) editFile(filename string) error { cmd, err := gui.OSCommand.EditFile(filename) if err != nil { return gui.createErrorPanel(err.Error()) } return gui.runSubprocess(cmd) } func (gui *Gui) openFile(filename string) error { if err := gui.OSCommand.OpenFile(filename); err != nil { return gui.createErrorPanel(err.Error()) } return nil } func (gui *Gui) handleCustomCommand(g *gocui.Gui, v *gocui.View) error { return gui.createPromptPanel(gui.Tr.CustomCommandTitle, func(g *gocui.Gui, v *gocui.View) error { command := gui.trimmedContent(v) return gui.runSubprocess(gui.OSCommand.RunCustomCommand(command)) }) } func (gui *Gui) ShouldRefresh(key string) bool { if gui.State.Panels.Main.ObjectKey == key { return false } gui.State.Panels.Main.ObjectKey = key return true } func (gui *Gui) initiallyFocusedViewName() string { if gui.DockerCommand.InDockerComposeProject { return "services" } return "containers" } func (gui *Gui) IgnoreStrings() []string { return gui.Config.UserConfig.Ignore } func (gui *Gui) Update(f func() error) { gui.g.Update(func(*gocui.Gui) error { return f() }) } func (gui *Gui) monitorContainerStats(ctx context.Context) { // periodically loop through running containers and see if we need to create a monitor goroutine for any // every second we check if we need to spawn a new goroutine ticker := time.NewTicker(time.Second) defer ticker.Stop() for { select { case <-ctx.Done(): return case <-ticker.C: for _, container := range gui.Panels.Containers.List.GetAllItems() { if !container.MonitoringStats { go gui.DockerCommand.CreateClientStatMonitor(container) } } } } } // this is used by our cheatsheet code to generate keybindings. We need some views // and panels to exist for us to know what keybindings there are, so we invoke // gocui in headless mode and create them. func (gui *Gui) SetupFakeGui() { g, err := gocui.NewGui(gocui.NewGuiOpts{ OutputMode: gocui.OutputTrue, RuneReplacements: map[rune]string{}, Headless: true, }) if err != nil { panic(err) } gui.g = g defer g.Close() if err := gui.createAllViews(); err != nil { panic(err) } gui.setPanels() } ================================================ FILE: pkg/gui/images_panel.go ================================================ package gui import ( "fmt" "strings" "time" "github.com/docker/docker/api/types/image" "github.com/fatih/color" "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazydocker/pkg/commands" "github.com/jesseduffield/lazydocker/pkg/config" "github.com/jesseduffield/lazydocker/pkg/gui/panels" "github.com/jesseduffield/lazydocker/pkg/gui/presentation" "github.com/jesseduffield/lazydocker/pkg/gui/types" "github.com/jesseduffield/lazydocker/pkg/tasks" "github.com/jesseduffield/lazydocker/pkg/utils" "github.com/samber/lo" ) func (gui *Gui) getImagesPanel() *panels.SideListPanel[*commands.Image] { noneLabel := "" return &panels.SideListPanel[*commands.Image]{ ContextState: &panels.ContextState[*commands.Image]{ GetMainTabs: func() []panels.MainTab[*commands.Image] { return []panels.MainTab[*commands.Image]{ { Key: "config", Title: gui.Tr.ConfigTitle, Render: gui.renderImageConfigTask, }, } }, GetItemContextCacheKey: func(image *commands.Image) string { return "images-" + image.ID }, }, ListPanel: panels.ListPanel[*commands.Image]{ List: panels.NewFilteredList[*commands.Image](), View: gui.Views.Images, }, NoItemsMessage: gui.Tr.NoImages, Gui: gui.intoInterface(), Sort: func(a *commands.Image, b *commands.Image) bool { if a.Name == noneLabel && b.Name != noneLabel { return false } if a.Name != noneLabel && b.Name == noneLabel { return true } if a.Name != b.Name { return a.Name < b.Name } if a.Tag != b.Tag { return a.Tag < b.Tag } return a.ID < b.ID }, GetTableCells: presentation.GetImageDisplayStrings, } } func (gui *Gui) renderImageConfigTask(image *commands.Image) tasks.TaskFunc { return gui.NewRenderStringTask(RenderStringTaskOpts{ GetStrContent: func() string { return gui.imageConfigStr(image) }, Autoscroll: false, Wrap: false, // don't care what your config is this page is ugly without wrapping }) } func (gui *Gui) imageConfigStr(image *commands.Image) string { padding := 10 output := "" output += utils.WithPadding("Name: ", padding) + image.Name + "\n" output += utils.WithPadding("ID: ", padding) + image.Image.ID + "\n" output += utils.WithPadding("Tags: ", padding) + utils.ColoredString(strings.Join(image.Image.RepoTags, ", "), color.FgGreen) + "\n" output += utils.WithPadding("Size: ", padding) + utils.FormatDecimalBytes(int(image.Image.Size)) + "\n" output += utils.WithPadding("Created: ", padding) + fmt.Sprintf("%v", time.Unix(image.Image.Created, 0).Format(time.RFC1123)) + "\n" history, err := image.RenderHistory() if err != nil { gui.Log.Error(err) } output += "\n\n" + history return output } func (gui *Gui) reloadImages() error { if err := gui.refreshStateImages(); err != nil { return err } return gui.Panels.Images.RerenderList() } func (gui *Gui) refreshStateImages() error { images, err := gui.DockerCommand.RefreshImages() if err != nil { return err } gui.Panels.Images.SetItems(images) return nil } func (gui *Gui) FilterString(view *gocui.View) string { if gui.State.Filter.panel != nil && gui.State.Filter.panel.GetView() != view { return "" } return gui.State.Filter.needle } func (gui *Gui) handleImagesRemoveMenu(g *gocui.Gui, v *gocui.View) error { type removeImageOption struct { description string command string configOptions image.RemoveOptions } img, err := gui.Panels.Images.GetSelectedItem() if err != nil { return nil } shortSha := img.ID[7:17] // TODO: have a way of toggling in a menu instead of showing each permutation as a separate menu item options := []*removeImageOption{ { description: gui.Tr.Remove, command: "docker image rm " + shortSha, configOptions: image.RemoveOptions{PruneChildren: true, Force: false}, }, { description: gui.Tr.RemoveWithoutPrune, command: "docker image rm --no-prune " + shortSha, configOptions: image.RemoveOptions{PruneChildren: false, Force: false}, }, { description: gui.Tr.RemoveWithForce, command: "docker image rm --force " + shortSha, configOptions: image.RemoveOptions{PruneChildren: true, Force: true}, }, { description: gui.Tr.RemoveWithoutPruneWithForce, command: "docker image rm --no-prune --force " + shortSha, configOptions: image.RemoveOptions{PruneChildren: false, Force: true}, }, } menuItems := lo.Map(options, func(option *removeImageOption, _ int) *types.MenuItem { return &types.MenuItem{ LabelColumns: []string{ option.description, color.New(color.FgRed).Sprint(option.command), }, OnPress: func() error { if err := img.Remove(option.configOptions); err != nil { return gui.createErrorPanel(err.Error()) } return nil }, } }) return gui.Menu(CreateMenuOptions{ Title: "", Items: menuItems, }) } func (gui *Gui) handlePruneImages() error { return gui.createConfirmationPanel(gui.Tr.Confirm, gui.Tr.ConfirmPruneImages, func(g *gocui.Gui, v *gocui.View) error { return gui.WithWaitingStatus(gui.Tr.PruningStatus, func() error { err := gui.DockerCommand.PruneImages() if err != nil { return gui.createErrorPanel(err.Error()) } return gui.reloadImages() }) }, nil) } func (gui *Gui) handleImagesCustomCommand(g *gocui.Gui, v *gocui.View) error { img, err := gui.Panels.Images.GetSelectedItem() if err != nil { return nil } commandObject := gui.DockerCommand.NewCommandObject(commands.CommandObject{ Image: img, }) customCommands := gui.Config.UserConfig.CustomCommands.Images return gui.createCustomCommandMenu(customCommands, commandObject) } func (gui *Gui) handleImagesBulkCommand(g *gocui.Gui, v *gocui.View) error { baseBulkCommands := []config.CustomCommand{ { Name: gui.Tr.PruneImages, InternalFunction: gui.handlePruneImages, }, } bulkCommands := append(baseBulkCommands, gui.Config.UserConfig.BulkCommands.Images...) commandObject := gui.DockerCommand.NewCommandObject(commands.CommandObject{}) return gui.createBulkCommandMenu(bulkCommands, commandObject) } ================================================ FILE: pkg/gui/keybindings.go ================================================ package gui import ( "fmt" "github.com/jesseduffield/gocui" ) // Binding - a keybinding mapping a key and modifier to a handler. The keypress // is only handled if the given view has focus, or handled globally if the view // is "" type Binding struct { ViewName string Handler func(*gocui.Gui, *gocui.View) error Key interface{} // FIXME: find out how to get `gocui.Key | rune` Modifier gocui.Modifier Description string } // GetKey is a function. func (b *Binding) GetKey() string { key := 0 switch b.Key.(type) { case rune: key = int(b.Key.(rune)) case gocui.Key: key = int(b.Key.(gocui.Key)) } // special keys switch key { case 27: return "esc" case 13: return "enter" case 32: return "space" case 65514: return "►" case 65515: return "◄" case 65517: return "▲" case 65516: return "▼" case 65508: return "PgUp" case 65507: return "PgDn" } return fmt.Sprintf("%c", key) } // GetInitialKeybindings is a function. func (gui *Gui) GetInitialKeybindings() []*Binding { bindings := []*Binding{ { ViewName: "", Key: gocui.KeyEsc, Modifier: gocui.ModNone, Handler: wrappedHandler(gui.escape), }, { ViewName: "", Key: 'q', Modifier: gocui.ModNone, Handler: gui.quit, }, { ViewName: "", Key: gocui.KeyCtrlC, Modifier: gocui.ModNone, Handler: gui.quit, }, { ViewName: "", Key: gocui.KeyPgup, Modifier: gocui.ModNone, Handler: wrappedHandler(gui.scrollUpMain), }, { ViewName: "", Key: gocui.KeyPgdn, Modifier: gocui.ModNone, Handler: wrappedHandler(gui.scrollDownMain), }, { ViewName: "", Key: gocui.KeyCtrlU, Modifier: gocui.ModNone, Handler: wrappedHandler(gui.scrollUpMain), }, { ViewName: "", Key: gocui.KeyCtrlD, Modifier: gocui.ModNone, Handler: wrappedHandler(gui.scrollDownMain), }, { ViewName: "", Key: gocui.KeyEnd, Modifier: gocui.ModNone, Handler: gui.autoScrollMain, }, { ViewName: "", Key: gocui.KeyHome, Modifier: gocui.ModNone, Handler: gui.jumpToTopMain, }, { ViewName: "", Key: 'x', Modifier: gocui.ModNone, Handler: gui.handleCreateOptionsMenu, }, { ViewName: "", Key: '?', Modifier: gocui.ModNone, Handler: gui.handleCreateOptionsMenu, }, { ViewName: "", Key: 'X', Modifier: gocui.ModNone, Handler: gui.handleCustomCommand, }, { ViewName: "project", Key: 'e', Modifier: gocui.ModNone, Handler: gui.handleEditConfig, Description: gui.Tr.EditConfig, }, { ViewName: "project", Key: 'o', Modifier: gocui.ModNone, Handler: gui.handleOpenConfig, Description: gui.Tr.OpenConfig, }, { ViewName: "project", Key: 'm', Modifier: gocui.ModNone, Handler: gui.handleViewAllLogs, Description: gui.Tr.ViewLogs, }, { ViewName: "menu", Key: gocui.KeyEsc, Modifier: gocui.ModNone, Handler: wrappedHandler(gui.handleMenuClose), }, { ViewName: "menu", Key: 'q', Modifier: gocui.ModNone, Handler: wrappedHandler(gui.handleMenuClose), }, { ViewName: "menu", Key: ' ', Modifier: gocui.ModNone, Handler: wrappedHandler(gui.handleMenuPress), }, { ViewName: "menu", Key: gocui.KeyEnter, Modifier: gocui.ModNone, Handler: wrappedHandler(gui.handleMenuPress), }, { ViewName: "menu", Key: 'y', Modifier: gocui.ModNone, Handler: wrappedHandler(gui.handleMenuPress), }, { ViewName: "information", Key: gocui.MouseLeft, Modifier: gocui.ModNone, Handler: gui.handleDonate, }, { ViewName: "containers", Key: 'd', Modifier: gocui.ModNone, Handler: gui.handleContainersRemoveMenu, Description: gui.Tr.Remove, }, { ViewName: "containers", Key: 'e', Modifier: gocui.ModNone, Handler: gui.handleHideStoppedContainers, Description: gui.Tr.HideStopped, }, { ViewName: "containers", Key: 'p', Modifier: gocui.ModNone, Handler: gui.handleContainerPause, Description: gui.Tr.Pause, }, { ViewName: "containers", Key: 's', Modifier: gocui.ModNone, Handler: gui.handleContainerStop, Description: gui.Tr.Stop, }, { ViewName: "containers", Key: 'r', Modifier: gocui.ModNone, Handler: gui.handleContainerRestart, Description: gui.Tr.Restart, }, { ViewName: "containers", Key: 'a', Modifier: gocui.ModNone, Handler: gui.handleContainerAttach, Description: gui.Tr.Attach, }, { ViewName: "containers", Key: 'm', Modifier: gocui.ModNone, Handler: gui.handleContainerViewLogs, Description: gui.Tr.ViewLogs, }, { ViewName: "containers", Key: 'E', Modifier: gocui.ModNone, Handler: gui.handleContainersExecShell, Description: gui.Tr.ExecShell, }, { ViewName: "containers", Key: 'c', Modifier: gocui.ModNone, Handler: gui.handleContainersCustomCommand, Description: gui.Tr.RunCustomCommand, }, { ViewName: "containers", Key: 'b', Modifier: gocui.ModNone, Handler: gui.handleContainersBulkCommand, Description: gui.Tr.ViewBulkCommands, }, { ViewName: "containers", Key: 'w', Modifier: gocui.ModNone, Handler: gui.handleContainersOpenInBrowserCommand, Description: gui.Tr.OpenInBrowser, }, { ViewName: "services", Key: 'u', Modifier: gocui.ModNone, Handler: gui.handleServiceUp, Description: gui.Tr.UpService, }, { ViewName: "services", Key: 'd', Modifier: gocui.ModNone, Handler: gui.handleServiceRemoveMenu, Description: gui.Tr.RemoveService, }, { ViewName: "services", Key: 's', Modifier: gocui.ModNone, Handler: gui.handleServiceStop, Description: gui.Tr.Stop, }, { ViewName: "services", Key: 'p', Modifier: gocui.ModNone, Handler: gui.handleServicePause, Description: gui.Tr.Pause, }, { ViewName: "services", Key: 'r', Modifier: gocui.ModNone, Handler: gui.handleServiceRestart, Description: gui.Tr.Restart, }, { ViewName: "services", Key: 'S', Modifier: gocui.ModNone, Handler: gui.handleServiceStart, Description: gui.Tr.Start, }, { ViewName: "services", Key: 'a', Modifier: gocui.ModNone, Handler: gui.handleServiceAttach, Description: gui.Tr.Attach, }, { ViewName: "services", Key: 'm', Modifier: gocui.ModNone, Handler: gui.handleServiceRenderLogsToMain, Description: gui.Tr.ViewLogs, }, { ViewName: "services", Key: 'U', Modifier: gocui.ModNone, Handler: gui.handleProjectUp, Description: gui.Tr.UpProject, }, { ViewName: "services", Key: 'D', Modifier: gocui.ModNone, Handler: gui.handleProjectDown, Description: gui.Tr.DownProject, }, { ViewName: "services", Key: 'R', Modifier: gocui.ModNone, Handler: gui.handleServiceRestartMenu, Description: gui.Tr.ViewRestartOptions, }, { ViewName: "services", Key: 'c', Modifier: gocui.ModNone, Handler: gui.handleServicesCustomCommand, Description: gui.Tr.RunCustomCommand, }, { ViewName: "services", Key: 'b', Modifier: gocui.ModNone, Handler: gui.handleServicesBulkCommand, Description: gui.Tr.ViewBulkCommands, }, { ViewName: "services", Key: 'E', Modifier: gocui.ModNone, Handler: gui.handleServicesExecShell, Description: gui.Tr.ExecShell, }, { ViewName: "services", Key: 'w', Modifier: gocui.ModNone, Handler: gui.handleServicesOpenInBrowserCommand, Description: gui.Tr.OpenInBrowser, }, { ViewName: "images", Key: 'c', Modifier: gocui.ModNone, Handler: gui.handleImagesCustomCommand, Description: gui.Tr.RunCustomCommand, }, { ViewName: "images", Key: 'd', Modifier: gocui.ModNone, Handler: gui.handleImagesRemoveMenu, Description: gui.Tr.RemoveImage, }, { ViewName: "images", Key: 'b', Modifier: gocui.ModNone, Handler: gui.handleImagesBulkCommand, Description: gui.Tr.ViewBulkCommands, }, { ViewName: "volumes", Key: 'c', Modifier: gocui.ModNone, Handler: gui.handleVolumesCustomCommand, Description: gui.Tr.RunCustomCommand, }, { ViewName: "volumes", Key: 'd', Modifier: gocui.ModNone, Handler: gui.handleVolumesRemoveMenu, Description: gui.Tr.RemoveVolume, }, { ViewName: "volumes", Key: 'b', Modifier: gocui.ModNone, Handler: gui.handleVolumesBulkCommand, Description: gui.Tr.ViewBulkCommands, }, { ViewName: "networks", Key: 'c', Modifier: gocui.ModNone, Handler: gui.handleNetworksCustomCommand, Description: gui.Tr.RunCustomCommand, }, { ViewName: "networks", Key: 'd', Modifier: gocui.ModNone, Handler: gui.handleNetworksRemoveMenu, Description: gui.Tr.RemoveNetwork, }, { ViewName: "networks", Key: 'b', Modifier: gocui.ModNone, Handler: gui.handleNetworksBulkCommand, Description: gui.Tr.ViewBulkCommands, }, { ViewName: "main", Key: gocui.KeyEsc, Modifier: gocui.ModNone, Handler: gui.handleExitMain, Description: gui.Tr.Return, }, { ViewName: "main", Key: gocui.KeyArrowLeft, Modifier: gocui.ModNone, Handler: gui.scrollLeftMain, }, { ViewName: "main", Key: gocui.KeyArrowRight, Modifier: gocui.ModNone, Handler: gui.scrollRightMain, }, { ViewName: "main", Key: 'h', Modifier: gocui.ModNone, Handler: gui.scrollLeftMain, }, { ViewName: "main", Key: 'l', Modifier: gocui.ModNone, Handler: gui.scrollRightMain, }, { ViewName: "filter", Key: gocui.KeyEnter, Modifier: gocui.ModNone, Handler: wrappedHandler(gui.commitFilter), }, { ViewName: "filter", Key: gocui.KeyEsc, Modifier: gocui.ModNone, Handler: wrappedHandler(gui.escapeFilterPrompt), }, { ViewName: "", Key: 'J', Modifier: gocui.ModNone, Handler: wrappedHandler(gui.scrollDownMain), }, { ViewName: "", Key: 'K', Modifier: gocui.ModNone, Handler: wrappedHandler(gui.scrollUpMain), }, { ViewName: "", Key: 'H', Modifier: gocui.ModNone, Handler: gui.scrollLeftMain, }, { ViewName: "", Key: 'L', Modifier: gocui.ModNone, Handler: gui.scrollRightMain, }, { ViewName: "", Key: '+', Handler: wrappedHandler(gui.nextScreenMode), Description: gui.Tr.LcNextScreenMode, }, { ViewName: "", Key: '_', Handler: wrappedHandler(gui.prevScreenMode), Description: gui.Tr.LcPrevScreenMode, }, } for _, panel := range gui.allSidePanels() { bindings = append(bindings, []*Binding{ {ViewName: panel.GetView().Name(), Key: gocui.KeyArrowLeft, Modifier: gocui.ModNone, Handler: gui.previousView}, {ViewName: panel.GetView().Name(), Key: gocui.KeyArrowRight, Modifier: gocui.ModNone, Handler: gui.nextView}, {ViewName: panel.GetView().Name(), Key: 'h', Modifier: gocui.ModNone, Handler: gui.previousView}, {ViewName: panel.GetView().Name(), Key: 'l', Modifier: gocui.ModNone, Handler: gui.nextView}, {ViewName: panel.GetView().Name(), Key: gocui.KeyTab, Modifier: gocui.ModNone, Handler: gui.nextView}, {ViewName: panel.GetView().Name(), Key: gocui.KeyBacktab, Modifier: gocui.ModNone, Handler: gui.previousView}, }...) } setUpDownClickBindings := func(viewName string, onUp func() error, onDown func() error, onClick func() error) { bindings = append(bindings, []*Binding{ {ViewName: viewName, Key: 'k', Modifier: gocui.ModNone, Handler: wrappedHandler(onUp)}, {ViewName: viewName, Key: gocui.KeyArrowUp, Modifier: gocui.ModNone, Handler: wrappedHandler(onUp)}, {ViewName: viewName, Key: gocui.MouseWheelUp, Modifier: gocui.ModNone, Handler: wrappedHandler(onUp)}, {ViewName: viewName, Key: 'j', Modifier: gocui.ModNone, Handler: wrappedHandler(onDown)}, {ViewName: viewName, Key: gocui.KeyArrowDown, Modifier: gocui.ModNone, Handler: wrappedHandler(onDown)}, {ViewName: viewName, Key: gocui.MouseWheelDown, Modifier: gocui.ModNone, Handler: wrappedHandler(onDown)}, {ViewName: viewName, Key: gocui.MouseLeft, Modifier: gocui.ModNone, Handler: wrappedHandler(onClick)}, }...) } bindings = append(bindings, []*Binding{ {Handler: gui.handleGoTo(gui.Panels.Projects.View), Key: '1', Description: gui.Tr.FocusProjects}, {Handler: gui.handleGoTo(gui.Panels.Services.View), Key: '2', Description: gui.Tr.FocusServices}, {Handler: gui.handleGoTo(gui.Panels.Containers.View), Key: '3', Description: gui.Tr.FocusContainers}, {Handler: gui.handleGoTo(gui.Panels.Images.View), Key: '4', Description: gui.Tr.FocusImages}, {Handler: gui.handleGoTo(gui.Panels.Volumes.View), Key: '5', Description: gui.Tr.FocusVolumes}, {Handler: gui.handleGoTo(gui.Panels.Networks.View), Key: '6', Description: gui.Tr.FocusNetworks}, }...) for _, panel := range gui.allListPanels() { setUpDownClickBindings(panel.GetView().Name(), panel.HandlePrevLine, panel.HandleNextLine, panel.HandleClick) } setUpDownClickBindings("main", gui.scrollUpMain, gui.scrollDownMain, gui.handleMainClick) for _, panel := range gui.allSidePanels() { bindings = append(bindings, &Binding{ ViewName: panel.GetView().Name(), Key: gocui.KeyEnter, Modifier: gocui.ModNone, Handler: gui.handleEnterMain, Description: gui.Tr.FocusMain, }, &Binding{ ViewName: panel.GetView().Name(), Key: '[', Modifier: gocui.ModNone, Handler: wrappedHandler(panel.HandlePrevMainTab), Description: gui.Tr.PreviousContext, }, &Binding{ ViewName: panel.GetView().Name(), Key: ']', Modifier: gocui.ModNone, Handler: wrappedHandler(panel.HandleNextMainTab), Description: gui.Tr.NextContext, }, ) } for _, panel := range gui.allListPanels() { if !panel.IsFilterDisabled() { bindings = append(bindings, &Binding{ ViewName: panel.GetView().Name(), Key: '/', Modifier: gocui.ModNone, Handler: wrappedHandler(gui.handleOpenFilter), Description: gui.Tr.LcFilter, }) } } return bindings } func (gui *Gui) keybindings(g *gocui.Gui) error { bindings := gui.GetInitialKeybindings() for _, binding := range bindings { if err := g.SetKeybinding(binding.ViewName, binding.Key, binding.Modifier, binding.Handler); err != nil { return err } } if err := g.SetTabClickBinding("main", gui.onMainTabClick); err != nil { return err } return nil } func wrappedHandler(f func() error) func(*gocui.Gui, *gocui.View) error { return func(g *gocui.Gui, v *gocui.View) error { return f() } } ================================================ FILE: pkg/gui/layout.go ================================================ package gui import ( "github.com/jesseduffield/gocui" ) const UNKNOWN_VIEW_ERROR_MSG = "unknown view" // getFocusLayout returns a manager function for when view gain and lose focus func (gui *Gui) getFocusLayout() func(g *gocui.Gui) error { var previousView *gocui.View return func(g *gocui.Gui) error { newView := gui.g.CurrentView() if err := gui.onFocusChange(); err != nil { return err } // for now we don't consider losing focus to a popup panel as actually losing focus if newView != previousView && !gui.isPopupPanel(newView.Name()) { gui.onFocusLost(previousView, newView) gui.onFocus(newView) previousView = newView } return nil } } func (gui *Gui) onFocusChange() error { currentView := gui.g.CurrentView() for _, view := range gui.g.Views() { view.Highlight = view == currentView && view.Name() != "main" } return nil } func (gui *Gui) onFocusLost(v *gocui.View, newView *gocui.View) { if v == nil { return } if !gui.isPopupPanel(newView.Name()) { v.ParentView = nil } // refocusing because in responsive mode (when the window is very short) we want to ensure that after the view size changes we can still see the last selected item gui.focusPointInView(v) gui.Log.Info(v.Name() + " focus lost") } func (gui *Gui) onFocus(v *gocui.View) { if v == nil { return } gui.focusPointInView(v) gui.Log.Info(v.Name() + " focus gained") } // layout is called for every screen re-render e.g. when the screen is resized func (gui *Gui) layout(g *gocui.Gui) error { g.Highlight = true width, height := g.Size() appStatus := gui.statusManager.getStatusString() viewDimensions := gui.getWindowDimensions(gui.getInformationContent(), appStatus) // we assume that the view has already been created. setViewFromDimensions := func(viewName string, windowName string) (*gocui.View, error) { dimensionsObj, ok := viewDimensions[windowName] view, err := g.View(viewName) if err != nil { return nil, err } if !ok { // view not specified in dimensions object: so create the view and hide it // making the view take up the whole space in the background in case it needs // to render content as soon as it appears, because lazyloaded content (via a pty task) // cares about the size of the view. _, err := g.SetView(viewName, 0, 0, width, height, 0) view.Visible = false return view, err } frameOffset := 1 if view.Frame { frameOffset = 0 } _, err = g.SetView( viewName, dimensionsObj.X0-frameOffset, dimensionsObj.Y0-frameOffset, dimensionsObj.X1+frameOffset, dimensionsObj.Y1+frameOffset, 0, ) view.Visible = true return view, err } for _, viewName := range gui.autoPositionedViewNames() { _, err := setViewFromDimensions(viewName, viewName) if err != nil && err.Error() != UNKNOWN_VIEW_ERROR_MSG { return err } } // here is a good place log some stuff // if you download humanlog and do tail -f development.log | humanlog // this will let you see these branches as prettified json // gui.Log.Info(utils.AsJson(gui.State.Branches[0:4])) return gui.resizeCurrentPopupPanel(g) } func (gui *Gui) focusPointInView(view *gocui.View) { if view == nil { return } for _, panel := range gui.allListPanels() { if panel.GetView() == view { panel.Refocus() return } } } func (gui *Gui) prepareView(viewName string) (*gocui.View, error) { // arbitrarily giving the view enough size so that we don't get an error, but // it's expected that the view will be given the correct size before being shown return gui.g.SetView(viewName, 0, 0, 10, 10, 0) } ================================================ FILE: pkg/gui/main_panel.go ================================================ package gui import ( "math" "github.com/jesseduffield/gocui" ) func (gui *Gui) scrollUpMain() error { mainView := gui.Views.Main mainView.Autoscroll = false ox, oy := mainView.Origin() newOy := int(math.Max(0, float64(oy-gui.Config.UserConfig.Gui.ScrollHeight))) return mainView.SetOrigin(ox, newOy) } func (gui *Gui) scrollDownMain() error { mainView := gui.Views.Main mainView.Autoscroll = false ox, oy := mainView.Origin() reservedLines := 0 if !gui.Config.UserConfig.Gui.ScrollPastBottom { _, sizeY := mainView.Size() reservedLines = sizeY } totalLines := mainView.ViewLinesHeight() if oy+reservedLines >= totalLines { return nil } return mainView.SetOrigin(ox, oy+gui.Config.UserConfig.Gui.ScrollHeight) } func (gui *Gui) scrollLeftMain(g *gocui.Gui, v *gocui.View) error { mainView := gui.Views.Main ox, oy := mainView.Origin() newOx := int(math.Max(0, float64(ox-gui.Config.UserConfig.Gui.ScrollHeight))) return mainView.SetOrigin(newOx, oy) } func (gui *Gui) scrollRightMain(g *gocui.Gui, v *gocui.View) error { mainView := gui.Views.Main ox, oy := mainView.Origin() content := mainView.ViewBufferLines() var largestNumberOfCharacters int for _, txt := range content { if len(txt) > largestNumberOfCharacters { largestNumberOfCharacters = len(txt) } } sizeX, _ := mainView.Size() if ox+sizeX >= largestNumberOfCharacters { return nil } return mainView.SetOrigin(ox+gui.Config.UserConfig.Gui.ScrollHeight, oy) } func (gui *Gui) autoScrollMain(g *gocui.Gui, v *gocui.View) error { gui.Views.Main.Autoscroll = true return nil } func (gui *Gui) jumpToTopMain(g *gocui.Gui, v *gocui.View) error { gui.Views.Main.Autoscroll = false _ = gui.Views.Main.SetOrigin(0, 0) _ = gui.Views.Main.SetCursor(0, 0) return nil } func (gui *Gui) onMainTabClick(tabIndex int) error { gui.Log.Warn(tabIndex) currentSidePanel, ok := gui.currentSidePanel() if !ok { return nil } currentSidePanel.SetMainTabIndex(tabIndex) return currentSidePanel.HandleSelect() } func (gui *Gui) handleEnterMain(g *gocui.Gui, v *gocui.View) error { mainView := gui.Views.Main mainView.ParentView = v return gui.switchFocus(mainView) } func (gui *Gui) handleExitMain(g *gocui.Gui, v *gocui.View) error { v.ParentView = nil return gui.returnFocus() } func (gui *Gui) handleMainClick() error { if gui.popupPanelFocused() { return nil } currentView := gui.g.CurrentView() if currentView.Name() != "main" { gui.Views.Main.ParentView = currentView } return gui.switchFocus(gui.Views.Main) } ================================================ FILE: pkg/gui/menu_panel.go ================================================ package gui import ( "github.com/jesseduffield/lazydocker/pkg/gui/panels" "github.com/jesseduffield/lazydocker/pkg/gui/presentation" "github.com/jesseduffield/lazydocker/pkg/gui/types" "github.com/jesseduffield/lazydocker/pkg/utils" ) type CreateMenuOptions struct { Title string Items []*types.MenuItem HideCancel bool } func (gui *Gui) getMenuPanel() *panels.SideListPanel[*types.MenuItem] { return &panels.SideListPanel[*types.MenuItem]{ ListPanel: panels.ListPanel[*types.MenuItem]{ List: panels.NewFilteredList[*types.MenuItem](), View: gui.Views.Menu, }, NoItemsMessage: "", Gui: gui.intoInterface(), OnClick: gui.onMenuPress, Sort: nil, GetTableCells: presentation.GetMenuItemDisplayStrings, OnRerender: func() error { return gui.resizePopupPanel(gui.Views.Menu) }, // so that we can avoid some UI trickiness, the menu will not have filtering // abillity yet. To support it, we would need to have filter state against // each panel (e.g. for when you filter the images panel, then bring up // the options menu, then try to filter that too. DisableFilter: true, } } func (gui *Gui) onMenuPress(menuItem *types.MenuItem) error { if err := gui.handleMenuClose(); err != nil { return err } if menuItem.OnPress != nil { return menuItem.OnPress() } return nil } func (gui *Gui) handleMenuPress() error { selectedMenuItem, err := gui.Panels.Menu.GetSelectedItem() if err != nil { return nil } return gui.onMenuPress(selectedMenuItem) } func (gui *Gui) Menu(opts CreateMenuOptions) error { if !opts.HideCancel { // this is mutative but I'm okay with that for now opts.Items = append(opts.Items, &types.MenuItem{ LabelColumns: []string{gui.Tr.Cancel}, OnPress: func() error { return nil }, }) } maxColumnSize := 1 for _, item := range opts.Items { if item.LabelColumns == nil { item.LabelColumns = []string{item.Label} } if item.OpensMenu { item.LabelColumns[0] = utils.OpensMenuStyle(item.LabelColumns[0]) } maxColumnSize = utils.Max(maxColumnSize, len(item.LabelColumns)) } for _, item := range opts.Items { if len(item.LabelColumns) < maxColumnSize { // we require that each item has the same number of columns so we're padding out with blank strings // if this item has too few item.LabelColumns = append(item.LabelColumns, make([]string, maxColumnSize-len(item.LabelColumns))...) } } gui.Panels.Menu.SetItems(opts.Items) gui.Panels.Menu.SetSelectedLineIdx(0) if err := gui.Panels.Menu.RerenderList(); err != nil { return err } gui.Views.Menu.Title = opts.Title gui.Views.Menu.Visible = true return gui.switchFocus(gui.Views.Menu) } // specific functions func (gui *Gui) renderMenuOptions() error { optionsMap := map[string]string{ "esc": gui.Tr.Close, "↑ ↓": gui.Tr.Navigate, "enter": gui.Tr.Execute, } return gui.renderOptionsMap(optionsMap) } func (gui *Gui) handleMenuClose() error { gui.Views.Menu.Visible = false // this code is here for when we do add filter ability to the menu panel, // though it's currently disabled if gui.State.Filter.panel == gui.Panels.Menu { if err := gui.clearFilter(); err != nil { return err } // we need to remove the view from the view stack because we're about to // return focus and don't want to land in the search view when it was searching // the menu in the first place gui.removeViewFromStack(gui.Views.Filter) } return gui.returnFocus() } ================================================ FILE: pkg/gui/networks_panel.go ================================================ package gui import ( "strconv" "github.com/fatih/color" "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazydocker/pkg/commands" "github.com/jesseduffield/lazydocker/pkg/config" "github.com/jesseduffield/lazydocker/pkg/gui/panels" "github.com/jesseduffield/lazydocker/pkg/gui/presentation" "github.com/jesseduffield/lazydocker/pkg/gui/types" "github.com/jesseduffield/lazydocker/pkg/tasks" "github.com/jesseduffield/lazydocker/pkg/utils" "github.com/samber/lo" ) func (gui *Gui) getNetworksPanel() *panels.SideListPanel[*commands.Network] { return &panels.SideListPanel[*commands.Network]{ ContextState: &panels.ContextState[*commands.Network]{ GetMainTabs: func() []panels.MainTab[*commands.Network] { return []panels.MainTab[*commands.Network]{ { Key: "config", Title: gui.Tr.ConfigTitle, Render: gui.renderNetworkConfig, }, } }, GetItemContextCacheKey: func(network *commands.Network) string { return "networks-" + network.Name }, }, ListPanel: panels.ListPanel[*commands.Network]{ List: panels.NewFilteredList[*commands.Network](), View: gui.Views.Networks, }, NoItemsMessage: gui.Tr.NoNetworks, Gui: gui.intoInterface(), // we're sorting these networks based on whether they have labels defined, // because those are the ones you typically care about. // Within that, we also sort them alphabetically Sort: func(a *commands.Network, b *commands.Network) bool { return a.Name < b.Name }, GetTableCells: presentation.GetNetworkDisplayStrings, } } func (gui *Gui) renderNetworkConfig(network *commands.Network) tasks.TaskFunc { return gui.NewSimpleRenderStringTask(func() string { return gui.networkConfigStr(network) }) } func (gui *Gui) networkConfigStr(network *commands.Network) string { padding := 15 output := "" output += utils.WithPadding("ID: ", padding) + network.Network.ID + "\n" output += utils.WithPadding("Name: ", padding) + network.Name + "\n" output += utils.WithPadding("Driver: ", padding) + network.Network.Driver + "\n" output += utils.WithPadding("Scope: ", padding) + network.Network.Scope + "\n" output += utils.WithPadding("EnabledIPV6: ", padding) + strconv.FormatBool(network.Network.EnableIPv6) + "\n" output += utils.WithPadding("Internal: ", padding) + strconv.FormatBool(network.Network.Internal) + "\n" output += utils.WithPadding("Attachable: ", padding) + strconv.FormatBool(network.Network.Attachable) + "\n" output += utils.WithPadding("Ingress: ", padding) + strconv.FormatBool(network.Network.Ingress) + "\n" output += utils.WithPadding("Containers: ", padding) if len(network.Network.Containers) > 0 { output += "\n" for _, v := range network.Network.Containers { output += utils.FormatMapItem(padding, v.Name, v.EndpointID) } } else { output += "none\n" } output += "\n" output += utils.WithPadding("Labels: ", padding) + utils.FormatMap(padding, network.Network.Labels) + "\n" output += utils.WithPadding("Options: ", padding) + utils.FormatMap(padding, network.Network.Options) return output } func (gui *Gui) reloadNetworks() error { if err := gui.refreshStateNetworks(); err != nil { return err } return gui.Panels.Networks.RerenderList() } func (gui *Gui) refreshStateNetworks() error { networks, err := gui.DockerCommand.RefreshNetworks() if err != nil { return err } gui.Panels.Networks.SetItems(networks) return nil } func (gui *Gui) handleNetworksRemoveMenu(g *gocui.Gui, v *gocui.View) error { network, err := gui.Panels.Networks.GetSelectedItem() if err != nil { return nil } type removeNetworkOption struct { description string command string } options := []*removeNetworkOption{ { description: gui.Tr.Remove, command: utils.WithShortSha("docker network rm " + network.Name), }, } menuItems := lo.Map(options, func(option *removeNetworkOption, _ int) *types.MenuItem { return &types.MenuItem{ LabelColumns: []string{option.description, color.New(color.FgRed).Sprint(option.command)}, OnPress: func() error { return gui.WithWaitingStatus(gui.Tr.RemovingStatus, func() error { if err := network.Remove(); err != nil { return gui.createErrorPanel(err.Error()) } return nil }) }, } }) return gui.Menu(CreateMenuOptions{ Title: "", Items: menuItems, }) } func (gui *Gui) handlePruneNetworks() error { return gui.createConfirmationPanel(gui.Tr.Confirm, gui.Tr.ConfirmPruneNetworks, func(g *gocui.Gui, v *gocui.View) error { return gui.WithWaitingStatus(gui.Tr.PruningStatus, func() error { err := gui.DockerCommand.PruneNetworks() if err != nil { return gui.createErrorPanel(err.Error()) } return nil }) }, nil) } func (gui *Gui) handleNetworksCustomCommand(g *gocui.Gui, v *gocui.View) error { network, err := gui.Panels.Networks.GetSelectedItem() if err != nil { return nil } commandObject := gui.DockerCommand.NewCommandObject(commands.CommandObject{ Network: network, }) customCommands := gui.Config.UserConfig.CustomCommands.Networks return gui.createCustomCommandMenu(customCommands, commandObject) } func (gui *Gui) handleNetworksBulkCommand(g *gocui.Gui, v *gocui.View) error { baseBulkCommands := []config.CustomCommand{ { Name: gui.Tr.PruneNetworks, InternalFunction: gui.handlePruneNetworks, }, } bulkCommands := append(baseBulkCommands, gui.Config.UserConfig.BulkCommands.Networks...) commandObject := gui.DockerCommand.NewCommandObject(commands.CommandObject{}) return gui.createBulkCommandMenu(bulkCommands, commandObject) } ================================================ FILE: pkg/gui/options_menu_panel.go ================================================ package gui import ( "github.com/samber/lo" "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazydocker/pkg/gui/types" ) func (gui *Gui) getBindings(v *gocui.View) []*Binding { var bindingsGlobal, bindingsPanel []*Binding bindings := gui.GetInitialKeybindings() for _, binding := range bindings { if binding.GetKey() != "" && binding.Description != "" { switch binding.ViewName { case "": bindingsGlobal = append(bindingsGlobal, binding) case v.Name(): bindingsPanel = append(bindingsPanel, binding) } } } // check if we have any keybindings from our parent view to add if v.ParentView != nil { L: for _, binding := range bindings { if binding.GetKey() != "" && binding.Description != "" { if binding.ViewName == v.ParentView.Name() { // if we haven't got a conflict we will display the binding for _, ownBinding := range bindingsPanel { if ownBinding.GetKey() == binding.GetKey() { continue L } } bindingsPanel = append(bindingsPanel, binding) } } } } // append dummy element to have a separator between // panel and global keybindings bindingsPanel = append(bindingsPanel, &Binding{}) return append(bindingsPanel, bindingsGlobal...) } func (gui *Gui) handleCreateOptionsMenu(g *gocui.Gui, v *gocui.View) error { if gui.isPopupPanel(v.Name()) { return nil } menuItems := lo.Map(gui.getBindings(v), func(binding *Binding, _ int) *types.MenuItem { return &types.MenuItem{ LabelColumns: []string{binding.GetKey(), binding.Description}, OnPress: func() error { if binding.Key == nil { return nil } return binding.Handler(g, v) }, } }) return gui.Menu(CreateMenuOptions{ Title: gui.Tr.MenuTitle, Items: menuItems, HideCancel: true, }) } ================================================ FILE: pkg/gui/panels/context_state.go ================================================ package panels import ( "github.com/jesseduffield/lazydocker/pkg/tasks" "github.com/samber/lo" ) // A 'context' generally corresponds to an item and the tab in the main panel that we're // displaying. So if we switch to a new item, or change the tab in the panel panel // for the current item, we end up with a new context. When we have a new context, // we render new content to the main panel. type ContextState[T any] struct { // index of the currently selected tab in the main view. mainTabIdx int // this function returns the tabs that we can display for an item (the tabs // are shown on the main view) GetMainTabs func() []MainTab[T] // This tells us whether we need to re-render to the main panel for a given item. // This should include the item's ID and if you want to invalidate the cache for // some other reason, you can add that to the key as well (e.g. the container's state). GetItemContextCacheKey func(item T) string } type MainTab[T any] struct { // key used as part of the context cache key Key string // title of the tab, rendered in the main view Title string // function to render the content of the tab Render func(item T) tasks.TaskFunc } func (self *ContextState[T]) GetMainTabTitles() []string { return lo.Map(self.GetMainTabs(), func(tab MainTab[T], _ int) string { return tab.Title }) } func (self *ContextState[T]) GetCurrentContextKey(item T) string { return self.GetItemContextCacheKey(item) + "-" + self.GetCurrentMainTab().Key } func (self *ContextState[T]) GetCurrentMainTab() MainTab[T] { return self.GetMainTabs()[self.mainTabIdx] } func (self *ContextState[T]) HandleNextMainTab() { tabs := self.GetMainTabs() if len(tabs) == 0 { return } self.mainTabIdx = (self.mainTabIdx + 1) % len(tabs) } func (self *ContextState[T]) HandlePrevMainTab() { tabs := self.GetMainTabs() if len(tabs) == 0 { return } self.mainTabIdx = (self.mainTabIdx - 1 + len(tabs)) % len(tabs) } func (self *ContextState[T]) SetMainTabIndex(index int) { self.mainTabIdx = index } ================================================ FILE: pkg/gui/panels/filtered_list.go ================================================ package panels import ( "sort" "sync" ) type FilteredList[T comparable] struct { allItems []T // indices of items in the allItems slice that are included in the filtered list indices []int mutex sync.RWMutex } func NewFilteredList[T comparable]() *FilteredList[T] { return &FilteredList[T]{} } func (self *FilteredList[T]) SetItems(items []T) { self.mutex.Lock() defer self.mutex.Unlock() self.allItems = items self.indices = make([]int, len(items)) for i := range self.indices { self.indices[i] = i } } func (self *FilteredList[T]) Filter(filter func(T, int) bool) { self.mutex.Lock() defer self.mutex.Unlock() self.indices = self.indices[:0] for i, item := range self.allItems { if filter(item, i) { self.indices = append(self.indices, i) } } } func (self *FilteredList[T]) Sort(less func(T, T) bool) { self.mutex.Lock() defer self.mutex.Unlock() if less == nil { return } sort.Slice(self.indices, func(i, j int) bool { return less(self.allItems[self.indices[i]], self.allItems[self.indices[j]]) }) } func (self *FilteredList[T]) Get(index int) T { self.mutex.RLock() defer self.mutex.RUnlock() return self.allItems[self.indices[index]] } func (self *FilteredList[T]) TryGet(index int) (T, bool) { self.mutex.RLock() defer self.mutex.RUnlock() if index < 0 || index >= len(self.indices) { var zero T return zero, false } return self.allItems[self.indices[index]], true } // returns the length of the filtered list func (self *FilteredList[T]) Len() int { self.mutex.RLock() defer self.mutex.RUnlock() return len(self.indices) } func (self *FilteredList[T]) GetIndex(item T) int { self.mutex.RLock() defer self.mutex.RUnlock() for i, index := range self.indices { if self.allItems[index] == item { return i } } return -1 } func (self *FilteredList[T]) GetItems() []T { self.mutex.RLock() defer self.mutex.RUnlock() result := make([]T, len(self.indices)) for i, index := range self.indices { result[i] = self.allItems[index] } return result } func (self *FilteredList[T]) GetAllItems() []T { self.mutex.RLock() defer self.mutex.RUnlock() return self.allItems } ================================================ FILE: pkg/gui/panels/filtered_list_test.go ================================================ package panels import ( "testing" "github.com/stretchr/testify/assert" ) func TestFilteredListGet(t *testing.T) { tests := []struct { f *FilteredList[int] args int want int }{ { f: &FilteredList[int]{allItems: []int{1, 2, 3}, indices: []int{0, 1, 2}}, args: 1, want: 2, }, { f: &FilteredList[int]{allItems: []int{1, 2, 3}, indices: []int{0, 1, 2}}, args: 2, want: 3, }, { f: &FilteredList[int]{allItems: []int{1, 2, 3}, indices: []int{1}}, args: 0, want: 2, }, } for _, tt := range tests { if got := tt.f.Get(tt.args); got != tt.want { t.Errorf("FilteredList.Get() = %v, want %v", got, tt.want) } } } func TestFilteredListLen(t *testing.T) { tests := []struct { f *FilteredList[int] want int }{ { f: &FilteredList[int]{allItems: []int{1, 2, 3}, indices: []int{0, 1, 2}}, want: 3, }, { f: &FilteredList[int]{allItems: []int{1, 2, 3}, indices: []int{1}}, want: 1, }, } for _, tt := range tests { if got := tt.f.Len(); got != tt.want { t.Errorf("FilteredList.Len() = %v, want %v", got, tt.want) } } } func TestFilteredListFilter(t *testing.T) { tests := []struct { f *FilteredList[int] args func(int, int) bool want *FilteredList[int] }{ { f: &FilteredList[int]{allItems: []int{1, 2, 3}, indices: []int{0, 1, 2}}, args: func(i int, _ int) bool { return i%2 == 0 }, want: &FilteredList[int]{allItems: []int{1, 2, 3}, indices: []int{1}}, }, { f: &FilteredList[int]{allItems: []int{1, 2, 3}, indices: []int{0, 1, 2}}, args: func(i int, _ int) bool { return i%2 == 1 }, want: &FilteredList[int]{allItems: []int{1, 2, 3}, indices: []int{0, 2}}, }, } for _, tt := range tests { tt.f.Filter(tt.args) assert.EqualValues(t, tt.f.indices, tt.want.indices) } } func TestFilteredListSort(t *testing.T) { tests := []struct { f *FilteredList[int] args func(int, int) bool want *FilteredList[int] }{ { f: &FilteredList[int]{allItems: []int{1, 2, 3}, indices: []int{0, 1, 2}}, args: func(i int, j int) bool { return i < j }, want: &FilteredList[int]{allItems: []int{1, 2, 3}, indices: []int{0, 1, 2}}, }, { f: &FilteredList[int]{allItems: []int{1, 2, 3}, indices: []int{0, 1, 2}}, args: func(i int, j int) bool { return i > j }, want: &FilteredList[int]{allItems: []int{1, 2, 3}, indices: []int{2, 1, 0}}, }, } for _, tt := range tests { tt.f.Sort(tt.args) assert.EqualValues(t, tt.f.indices, tt.want.indices) } } func TestFilteredListGetIndex(t *testing.T) { tests := []struct { f *FilteredList[int] args int want int }{ { f: &FilteredList[int]{allItems: []int{1, 2, 3}, indices: []int{0, 1, 2}}, args: 1, want: 0, }, { f: &FilteredList[int]{allItems: []int{1, 2, 3}, indices: []int{0, 1, 2}}, args: 2, want: 1, }, { f: &FilteredList[int]{allItems: []int{1, 2, 3}, indices: []int{1}}, args: 0, want: -1, }, } for _, tt := range tests { if got := tt.f.GetIndex(tt.args); got != tt.want { t.Errorf("FilteredList.GetIndex() = %v, want %v", got, tt.want) } } } func TestFilteredListGetItems(t *testing.T) { tests := []struct { f *FilteredList[int] want []int }{ { f: &FilteredList[int]{allItems: []int{1, 2, 3}, indices: []int{0, 1, 2}}, want: []int{1, 2, 3}, }, { f: &FilteredList[int]{allItems: []int{1, 2, 3}, indices: []int{1}}, want: []int{2}, }, } for _, tt := range tests { got := tt.f.GetItems() assert.EqualValues(t, got, tt.want) } } func TestFilteredListSetItems(t *testing.T) { tests := []struct { f *FilteredList[int] args []int want *FilteredList[int] }{ { f: &FilteredList[int]{allItems: []int{1, 2, 3}, indices: []int{0, 1, 2}}, args: []int{4, 5, 6}, want: &FilteredList[int]{allItems: []int{4, 5, 6}, indices: []int{0, 1, 2}}, }, { f: &FilteredList[int]{allItems: []int{1, 2, 3}, indices: []int{1}}, args: []int{4}, want: &FilteredList[int]{allItems: []int{4}, indices: []int{0}}, }, } for _, tt := range tests { tt.f.SetItems(tt.args) assert.EqualValues(t, tt.f.indices, tt.want.indices) assert.EqualValues(t, tt.f.allItems, tt.want.allItems) } } ================================================ FILE: pkg/gui/panels/list_panel.go ================================================ package panels import ( "github.com/jesseduffield/gocui" lcUtils "github.com/jesseduffield/lazycore/pkg/utils" ) type ListPanel[T comparable] struct { SelectedIdx int List *FilteredList[T] View *gocui.View } func (self *ListPanel[T]) SetSelectedLineIdx(value int) { clampedValue := 0 if self.List.Len() > 0 { clampedValue = lcUtils.Clamp(value, 0, self.List.Len()-1) } self.SelectedIdx = clampedValue } func (self *ListPanel[T]) clampSelectedLineIdx() { clamped := lcUtils.Clamp(self.SelectedIdx, 0, self.List.Len()-1) if clamped != self.SelectedIdx { self.SelectedIdx = clamped } } // moves the cursor up or down by the given amount (up for negative values) func (self *ListPanel[T]) moveSelectedLine(delta int) { self.SetSelectedLineIdx(self.SelectedIdx + delta) } func (self *ListPanel[T]) SelectNextLine() { self.moveSelectedLine(1) } func (self *ListPanel[T]) SelectPrevLine() { self.moveSelectedLine(-1) } ================================================ FILE: pkg/gui/panels/side_list_panel.go ================================================ package panels import ( "context" "fmt" "strings" "github.com/go-errors/errors" "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazydocker/pkg/tasks" "github.com/jesseduffield/lazydocker/pkg/utils" "github.com/samber/lo" ) type ISideListPanel interface { SetMainTabIndex(int) HandleSelect() error GetView() *gocui.View Refocus() RerenderList() error IsFilterDisabled() bool IsHidden() bool HandleNextLine() error HandlePrevLine() error HandleClick() error HandlePrevMainTab() error HandleNextMainTab() error } // list panel at the side of the screen that renders content to the main panel type SideListPanel[T comparable] struct { ContextState *ContextState[T] ListPanel[T] // message to render in the main view if there are no items in the panel // and it has focus. Leave empty if you don't want to render anything NoItemsMessage string // a representation of the gui Gui IGui // this Filter is applied on top of additional default filters Filter func(T) bool Sort func(a, b T) bool // a callback to invoke when the item is clicked OnClick func(T) error // a callback to invoke when a new item is selected (e.g. keyboard navigation) OnSelect func(T) error // returns the cells that we render to the view in a table format. The cells will // be rendered with padding. GetTableCells func(T) []string // function to be called after re-rendering list. Can be nil OnRerender func() error // set this to true if you don't want to allow manual filtering via '/' DisableFilter bool // This can be nil if you want to always show the panel Hide func() bool } var _ ISideListPanel = &SideListPanel[int]{} type IGui interface { HandleClick(v *gocui.View, itemCount int, selectedLine *int, handleSelect func() error) error NewSimpleRenderStringTask(getContent func() string) tasks.TaskFunc FocusY(selectedLine int, itemCount int, view *gocui.View) ShouldRefresh(contextKey string) bool GetMainView() *gocui.View IsCurrentView(*gocui.View) bool FilterString(view *gocui.View) string IgnoreStrings() []string Update(func() error) QueueTask(f func(ctx context.Context)) error } func (self *SideListPanel[T]) HandleClick() error { itemCount := self.List.Len() handleSelect := self.HandleSelect selectedLine := &self.SelectedIdx if err := self.Gui.HandleClick(self.View, itemCount, selectedLine, handleSelect); err != nil { return err } if self.OnClick != nil { selectedItem, err := self.GetSelectedItem() if err == nil { return self.OnClick(selectedItem) } } return nil } func (self *SideListPanel[T]) GetView() *gocui.View { return self.View } func (self *SideListPanel[T]) HandleSelect() error { item, err := self.GetSelectedItem() if err != nil { if err.Error() != self.NoItemsMessage { return err } if self.NoItemsMessage != "" { self.Gui.NewSimpleRenderStringTask(func() string { return self.NoItemsMessage }) } return nil } self.Refocus() if self.OnSelect != nil { if err := self.OnSelect(item); err != nil { return err } } return self.renderContext(item) } func (self *SideListPanel[T]) renderContext(item T) error { if self.ContextState == nil { return nil } key := self.ContextState.GetCurrentContextKey(item) if !self.Gui.ShouldRefresh(key) { return nil } mainView := self.Gui.GetMainView() mainView.Tabs = self.ContextState.GetMainTabTitles() mainView.TabIndex = self.ContextState.mainTabIdx task := self.ContextState.GetCurrentMainTab().Render(item) return self.Gui.QueueTask(task) } func (self *SideListPanel[T]) GetSelectedItem() (T, error) { var zero T item, ok := self.List.TryGet(self.SelectedIdx) if !ok { // could probably have a better error here return zero, errors.New(self.NoItemsMessage) } return item, nil } func (self *SideListPanel[T]) HandleNextLine() error { self.SelectNextLine() return self.HandleSelect() } func (self *SideListPanel[T]) HandlePrevLine() error { self.SelectPrevLine() return self.HandleSelect() } func (self *SideListPanel[T]) HandleNextMainTab() error { if self.ContextState == nil { return nil } self.ContextState.HandleNextMainTab() return self.HandleSelect() } func (self *SideListPanel[T]) HandlePrevMainTab() error { if self.ContextState == nil { return nil } self.ContextState.HandlePrevMainTab() return self.HandleSelect() } func (self *SideListPanel[T]) Refocus() { self.Gui.FocusY(self.SelectedIdx, self.List.Len(), self.View) } func (self *SideListPanel[T]) SetItems(items []T) { self.List.SetItems(items) self.FilterAndSort() } func (self *SideListPanel[T]) FilterAndSort() { filterString := self.Gui.FilterString(self.View) self.List.Filter(func(item T, index int) bool { if self.Filter != nil && !self.Filter(item) { return false } if lo.SomeBy(self.Gui.IgnoreStrings(), func(ignore string) bool { return lo.SomeBy(self.GetTableCells(item), func(searchString string) bool { return strings.Contains(searchString, ignore) }) }) { return false } if filterString != "" { return lo.SomeBy(self.GetTableCells(item), func(searchString string) bool { return strings.Contains(searchString, filterString) }) } return true }) self.List.Sort(self.Sort) self.clampSelectedLineIdx() } func (self *SideListPanel[T]) RerenderList() error { self.FilterAndSort() self.Gui.Update(func() error { self.View.Clear() table := lo.Map(self.List.GetItems(), func(item T, index int) []string { return self.GetTableCells(item) }) renderedTable, err := utils.RenderTable(table) if err != nil { return err } fmt.Fprint(self.View, renderedTable) if self.OnRerender != nil { if err := self.OnRerender(); err != nil { return err } } if self.Gui.IsCurrentView(self.View) { return self.HandleSelect() } return nil }) return nil } func (self *SideListPanel[T]) SetMainTabIndex(index int) { if self.ContextState == nil { return } self.ContextState.SetMainTabIndex(index) } func (self *SideListPanel[T]) IsFilterDisabled() bool { return self.DisableFilter } func (self *SideListPanel[T]) IsHidden() bool { if self.Hide == nil { return false } return self.Hide() } ================================================ FILE: pkg/gui/panels.go ================================================ package gui import "github.com/jesseduffield/lazydocker/pkg/gui/panels" func (gui *Gui) intoInterface() panels.IGui { return gui } ================================================ FILE: pkg/gui/presentation/container_stats.go ================================================ package presentation import ( "fmt" "math" "reflect" "strconv" "strings" "time" "github.com/fatih/color" "github.com/jesseduffield/asciigraph" "github.com/jesseduffield/lazydocker/pkg/commands" "github.com/jesseduffield/lazydocker/pkg/config" "github.com/jesseduffield/lazydocker/pkg/utils" "github.com/mcuadros/go-lookup" "github.com/samber/lo" ) func RenderStats(userConfig *config.UserConfig, container *commands.Container, viewWidth int) (string, error) { stats, ok := container.GetLastStats() if !ok { return "", nil } graphSpecs := userConfig.Stats.Graphs graphs := make([]string, len(graphSpecs)) for i, spec := range graphSpecs { graph, err := plotGraph(container, spec, viewWidth-10) if err != nil { return "", err } graphs[i] = utils.ColoredString(graph, utils.GetColorAttribute(spec.Color)) } pidsCount := fmt.Sprintf("PIDs: %d", stats.ClientStats.PidsStats.Current) dataReceived := fmt.Sprintf("Traffic received: %s", utils.FormatDecimalBytes(stats.ClientStats.Networks.Eth0.RxBytes)) dataSent := fmt.Sprintf("Traffic sent: %s", utils.FormatDecimalBytes(stats.ClientStats.Networks.Eth0.TxBytes)) originalStats, err := utils.MarshalIntoYaml(stats) if err != nil { return "", err } contents := fmt.Sprintf("\n\n%s\n\n%s\n\n%s\n%s\n\n%s", utils.ColoredString(strings.Join(graphs, "\n\n"), color.FgGreen), pidsCount, dataReceived, dataSent, utils.ColoredYamlString(string(originalStats)), ) return contents, nil } // plotGraph returns the plotted graph based on the graph spec and the stat history func plotGraph(container *commands.Container, spec config.GraphConfig, width int) (string, error) { container.StatsMutex.Lock() defer container.StatsMutex.Unlock() data := make([]float64, len(container.StatHistory)) for i, stats := range container.StatHistory { value, err := lookup.LookupString(stats, spec.StatPath) if err != nil { return "Could not find key: " + spec.StatPath, nil } floatValue, err := getFloat(value.Interface()) if err != nil { return "", err } data[i] = floatValue } max := spec.Max if spec.MaxType == "" { max = lo.Max(data) } min := spec.Min if spec.MinType == "" { min = lo.Min(data) } height := 10 if spec.Height > 0 { height = spec.Height } caption := fmt.Sprintf( "%s: %0.2f (%v)", spec.Caption, data[len(data)-1], time.Since(container.StatHistory[0].RecordedAt).Round(time.Second), ) return asciigraph.Plot( data, asciigraph.Height(height), asciigraph.Width(width), asciigraph.Min(min), asciigraph.Max(max), asciigraph.Caption(caption), ), nil } // from Dave C's answer at https://stackoverflow.com/questions/20767724/converting-unknown-interface-to-float64-in-golang func getFloat(unk interface{}) (float64, error) { floatType := reflect.TypeOf(float64(0)) stringType := reflect.TypeOf("") switch i := unk.(type) { case float64: return i, nil case float32: return float64(i), nil case int64: return float64(i), nil case int32: return float64(i), nil case int: return float64(i), nil case uint64: return float64(i), nil case uint32: return float64(i), nil case uint: return float64(i), nil case string: return strconv.ParseFloat(i, 64) default: v := reflect.ValueOf(unk) v = reflect.Indirect(v) if v.Type().ConvertibleTo(floatType) { fv := v.Convert(floatType) return fv.Float(), nil } else if v.Type().ConvertibleTo(stringType) { sv := v.Convert(stringType) s := sv.String() return strconv.ParseFloat(s, 64) } else { return math.NaN(), fmt.Errorf("Can't convert %v to float64", v.Type()) } } } ================================================ FILE: pkg/gui/presentation/containers.go ================================================ package presentation import ( "fmt" "sort" "strconv" "strings" "github.com/docker/docker/api/types/container" "github.com/fatih/color" "github.com/jesseduffield/lazydocker/pkg/commands" "github.com/jesseduffield/lazydocker/pkg/config" "github.com/jesseduffield/lazydocker/pkg/utils" "github.com/samber/lo" ) func GetContainerDisplayStrings(guiConfig *config.GuiConfig, container *commands.Container) []string { return []string{ getContainerDisplayStatus(guiConfig, container), getContainerDisplaySubstatus(guiConfig, container), container.Name, getDisplayCPUPerc(container), utils.ColoredString(displayPorts(container), color.FgYellow), utils.ColoredString(displayContainerImage(container), color.FgMagenta), } } func displayContainerImage(container *commands.Container) string { return strings.TrimPrefix(container.Container.Image, "sha256:") } func displayPorts(c *commands.Container) string { portStrings := lo.Map(c.Container.Ports, func(port container.Port, _ int) string { if port.PublicPort == 0 { return fmt.Sprintf("%d/%s", port.PrivatePort, port.Type) } // docker ps will show '0.0.0.0:80->80/tcp' but we'll show // '80->80/tcp' instead to save space (unless the IP is something other than // 0.0.0.0) ipString := "" if port.IP != "0.0.0.0" { ipString = port.IP + ":" } return fmt.Sprintf("%s%d->%d/%s", ipString, port.PublicPort, port.PrivatePort, port.Type) }) // sorting because the order of the ports is not deterministic // and we don't want to have them constantly swapping sort.Strings(portStrings) return strings.Join(portStrings, ", ") } // getContainerDisplayStatus returns the colored status of the container func getContainerDisplayStatus(guiConfig *config.GuiConfig, c *commands.Container) string { shortStatusMap := map[string]string{ "paused": "P", "exited": "X", "created": "C", "removing": "RM", "restarting": "RS", "running": "R", "dead": "D", } iconStatusMap := map[string]rune{ "paused": '◫', "exited": '⨯', "created": '+', "removing": '−', "restarting": '⟳', "running": '▶', "dead": '!', } var containerState string switch guiConfig.ContainerStatusHealthStyle { case "short": containerState = shortStatusMap[c.Container.State] case "icon": containerState = string(iconStatusMap[c.Container.State]) case "long": fallthrough default: containerState = c.Container.State } return utils.ColoredString(containerState, getContainerColor(c)) } // GetDisplayStatus returns the exit code if the container has exited, and the health status if the container is running (and has a health check) func getContainerDisplaySubstatus(guiConfig *config.GuiConfig, c *commands.Container) string { if !c.DetailsLoaded() { return "" } switch c.Container.State { case "exited": return utils.ColoredString( fmt.Sprintf("(%s)", strconv.Itoa(c.Details.State.ExitCode)), getContainerColor(c), ) case "running": return getHealthStatus(guiConfig, c) default: return "" } } func getHealthStatus(guiConfig *config.GuiConfig, c *commands.Container) string { if !c.DetailsLoaded() { return "" } healthStatusColorMap := map[string]color.Attribute{ "healthy": color.FgGreen, "unhealthy": color.FgRed, "starting": color.FgYellow, } if c.Details.State.Health == nil { return "" } shortHealthStatusMap := map[string]string{ "healthy": "H", "unhealthy": "U", "starting": "S", } iconHealthStatusMap := map[string]rune{ "healthy": '✔', "unhealthy": '?', "starting": '…', } var healthStatus string switch guiConfig.ContainerStatusHealthStyle { case "short": healthStatus = shortHealthStatusMap[c.Details.State.Health.Status] case "icon": healthStatus = string(iconHealthStatusMap[c.Details.State.Health.Status]) case "long": fallthrough default: healthStatus = c.Details.State.Health.Status } if healthStatusColor, ok := healthStatusColorMap[c.Details.State.Health.Status]; ok { return utils.ColoredString(fmt.Sprintf("(%s)", healthStatus), healthStatusColor) } return "" } // getDisplayCPUPerc colors the cpu percentage based on how extreme it is func getDisplayCPUPerc(c *commands.Container) string { stats, ok := c.GetLastStats() if !ok { return "" } percentage := stats.DerivedStats.CPUPercentage formattedPercentage := fmt.Sprintf("%.2f%%", stats.DerivedStats.CPUPercentage) var clr color.Attribute if percentage > 90 { clr = color.FgRed } else if percentage > 50 { clr = color.FgYellow } else { clr = color.FgWhite } return utils.ColoredString(formattedPercentage, clr) } // getContainerColor Container color func getContainerColor(c *commands.Container) color.Attribute { switch c.Container.State { case "exited": // This means the colour may be briefly yellow and then switch to red upon starting // Not sure what a better alternative is. if !c.DetailsLoaded() || c.Details.State.ExitCode == 0 { return color.FgYellow } return color.FgRed case "created": return color.FgCyan case "running": return color.FgGreen case "paused": return color.FgYellow case "dead": return color.FgRed case "restarting": return color.FgBlue case "removing": return color.FgMagenta default: return color.FgWhite } } ================================================ FILE: pkg/gui/presentation/images.go ================================================ package presentation import ( "github.com/jesseduffield/lazydocker/pkg/commands" "github.com/jesseduffield/lazydocker/pkg/utils" ) func GetImageDisplayStrings(image *commands.Image) []string { return []string{ image.Name, image.Tag, utils.FormatDecimalBytes(int(image.Image.Size)), } } ================================================ FILE: pkg/gui/presentation/menu_items.go ================================================ package presentation import "github.com/jesseduffield/lazydocker/pkg/gui/types" func GetMenuItemDisplayStrings(menuItem *types.MenuItem) []string { return menuItem.LabelColumns } ================================================ FILE: pkg/gui/presentation/networks.go ================================================ package presentation import "github.com/jesseduffield/lazydocker/pkg/commands" func GetNetworkDisplayStrings(network *commands.Network) []string { return []string{network.Network.Driver, network.Name} } ================================================ FILE: pkg/gui/presentation/projects.go ================================================ package presentation import "github.com/jesseduffield/lazydocker/pkg/commands" func GetProjectDisplayStrings(project *commands.Project) []string { return []string{project.Name} } ================================================ FILE: pkg/gui/presentation/services.go ================================================ package presentation import ( "github.com/fatih/color" "github.com/jesseduffield/lazydocker/pkg/commands" "github.com/jesseduffield/lazydocker/pkg/config" "github.com/jesseduffield/lazydocker/pkg/utils" ) func GetServiceDisplayStrings(guiConfig *config.GuiConfig, service *commands.Service) []string { if service.Container == nil { var containerState string switch guiConfig.ContainerStatusHealthStyle { case "short": containerState = "n" case "icon": containerState = "." case "long": fallthrough default: containerState = "none" } return []string{ utils.ColoredString(containerState, color.FgBlue), "", service.Name, "", "", "", } } container := service.Container return []string{ getContainerDisplayStatus(guiConfig, container), getContainerDisplaySubstatus(guiConfig, container), service.Name, getDisplayCPUPerc(container), utils.ColoredString(displayPorts(container), color.FgYellow), utils.ColoredString(displayContainerImage(container), color.FgMagenta), } } ================================================ FILE: pkg/gui/presentation/volumes.go ================================================ package presentation import "github.com/jesseduffield/lazydocker/pkg/commands" func GetVolumeDisplayStrings(volume *commands.Volume) []string { return []string{volume.Volume.Driver, volume.Name} } ================================================ FILE: pkg/gui/project_panel.go ================================================ package gui import ( "bytes" "context" "strings" "github.com/fatih/color" "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazydocker/pkg/commands" "github.com/jesseduffield/lazydocker/pkg/gui/panels" "github.com/jesseduffield/lazydocker/pkg/gui/presentation" "github.com/jesseduffield/lazydocker/pkg/tasks" "github.com/jesseduffield/lazydocker/pkg/utils" "github.com/jesseduffield/yaml" ) func (gui *Gui) getProjectPanel() *panels.SideListPanel[*commands.Project] { return &panels.SideListPanel[*commands.Project]{ ContextState: &panels.ContextState[*commands.Project]{ GetMainTabs: func() []panels.MainTab[*commands.Project] { return []panels.MainTab[*commands.Project]{ { Key: "logs", Title: gui.Tr.LogsTitle, Render: gui.renderAllLogs, }, { Key: "config", Title: gui.Tr.DockerComposeConfigTitle, Render: gui.renderDockerComposeConfig, }, { Key: "credits", Title: gui.Tr.CreditsTitle, Render: gui.renderCredits, }, } }, GetItemContextCacheKey: func(project *commands.Project) string { return "projects-" + project.Name }, }, ListPanel: panels.ListPanel[*commands.Project]{ List: panels.NewFilteredList[*commands.Project](), View: gui.Views.Project, }, NoItemsMessage: "", Gui: gui.intoInterface(), Sort: func(a *commands.Project, b *commands.Project) bool { return a.Name < b.Name }, GetTableCells: presentation.GetProjectDisplayStrings, OnSelect: func(project *commands.Project) error { // When a different project is selected, re-filter services and // containers to show only those belonging to the selected project. return gui.renderContainersAndServices() }, } } func (gui *Gui) refreshProject() error { projects := gui.getDiscoveredProjects() // Preserve the current selection across refreshes. On the first refresh, // select the project specified via -p flag, or fall back to the local project. selectedName := gui.getSelectedProjectName() if selectedName == "" { if gui.Config.ProjectName != "" { selectedName = gui.Config.ProjectName } else { selectedName = gui.DockerCommand.LocalProjectName } } gui.Panels.Projects.SetItems(projects) if selectedName != "" { for i, p := range gui.Panels.Projects.List.GetItems() { if p.Name == selectedName { gui.Panels.Projects.SetSelectedLineIdx(i) gui.Panels.Projects.Refocus() break } } } return gui.Panels.Projects.RerenderList() } // getDiscoveredProjects returns all docker compose projects by examining container labels. // The local project (from docker-compose.yml in the current directory) is included if // it has running containers or if InDockerComposeProject is true. func (gui *Gui) getDiscoveredProjects() []*commands.Project { containers := gui.Panels.Containers.List.GetAllItems() projectNames := gui.DockerCommand.GetProjectNames(containers) // If we're in a docker compose project but it has no running containers, // still include it. We don't fall back to the directory name here to avoid // briefly flashing the wrong project name on startup. localName := gui.DockerCommand.LocalProjectName if gui.DockerCommand.InDockerComposeProject && localName != "" { found := false for _, name := range projectNames { if name == localName { found = true break } } if !found { projectNames = append([]string{localName}, projectNames...) } } projects := make([]*commands.Project, len(projectNames)) for i, name := range projectNames { projects[i] = &commands.Project{Name: name} } return projects } // getSelectedProjectName returns the name of the currently selected project, // or empty string if none is selected. func (gui *Gui) getSelectedProjectName() string { project, err := gui.Panels.Projects.GetSelectedItem() if err != nil { return "" } return project.Name } func (gui *Gui) renderCredits(_project *commands.Project) tasks.TaskFunc { return gui.NewSimpleRenderStringTask(func() string { return gui.creditsStr() }) } func (gui *Gui) creditsStr() string { var configBuf bytes.Buffer _ = yaml.NewEncoder(&configBuf, yaml.IncludeOmitted).Encode(gui.Config.UserConfig) return strings.Join( []string{ lazydockerTitle(), "Copyright (c) 2019 Jesse Duffield", "Keybindings: https://github.com/jesseduffield/lazydocker/blob/master/docs/keybindings", "Config Options: https://github.com/jesseduffield/lazydocker/blob/master/docs/Config.md", "Raise an Issue: https://github.com/jesseduffield/lazydocker/issues", utils.ColoredString("Buy Jesse a coffee: https://github.com/sponsors/jesseduffield", color.FgMagenta), // caffeine ain't free "Here's your lazydocker config when merged in with the defaults (you can open your config by pressing 'o'):", utils.ColoredYamlString(configBuf.String()), }, "\n\n") } func (gui *Gui) renderAllLogs(project *commands.Project) tasks.TaskFunc { return gui.NewTask(TaskOpts{ Autoscroll: true, Wrap: gui.Config.UserConfig.Gui.WrapMainPanel, Func: func(ctx context.Context) { gui.clearMainView() cmd := gui.OSCommand.RunCustomCommand( utils.ApplyTemplate( gui.Config.UserConfig.CommandTemplates.AllLogs, gui.DockerCommand.NewCommandObject(commands.CommandObject{Project: project}), ), ) cmd.Stdout = gui.Views.Main cmd.Stderr = gui.Views.Main gui.OSCommand.PrepareForChildren(cmd) _ = cmd.Start() go func() { <-ctx.Done() if err := gui.OSCommand.Kill(cmd); err != nil { gui.Log.Error(err) } }() _ = cmd.Wait() }, }) } func (gui *Gui) renderDockerComposeConfig(project *commands.Project) tasks.TaskFunc { if project != nil && project.Name != gui.DockerCommand.LocalProjectName { return gui.NewSimpleRenderStringTask(func() string { return "Compose config is not available for non-local projects" }) } return gui.NewSimpleRenderStringTask(func() string { return utils.ColoredYamlString(gui.DockerCommand.DockerComposeConfigForProject(project)) }) } func (gui *Gui) handleOpenConfig(g *gocui.Gui, v *gocui.View) error { return gui.openFile(gui.Config.ConfigFilename()) } func (gui *Gui) handleEditConfig(g *gocui.Gui, v *gocui.View) error { return gui.editFile(gui.Config.ConfigFilename()) } func lazydockerTitle() string { return ` _ _ _ | | | | | | | | __ _ _____ _ __| | ___ ___| | _____ _ __ | |/ _` + "`" + ` |_ / | | |/ _` + "`" + ` |/ _ \ / __| |/ / _ \ '__| | | (_| |/ /| |_| | (_| | (_) | (__| < __/ | |_|\__,_/___|\__, |\__,_|\___/ \___|_|\_\___|_| __/ | |___/ ` } // handleViewAllLogs switches to a subprocess viewing all the logs from docker-compose func (gui *Gui) handleViewAllLogs(g *gocui.Gui, v *gocui.View) error { project, _ := gui.Panels.Projects.GetSelectedItem() c, err := gui.DockerCommand.ViewAllLogs(project) if err != nil { return gui.createErrorPanel(err.Error()) } return gui.runSubprocess(c) } ================================================ FILE: pkg/gui/services_panel.go ================================================ package gui import ( "context" "fmt" "time" "github.com/fatih/color" "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazydocker/pkg/commands" "github.com/jesseduffield/lazydocker/pkg/config" "github.com/jesseduffield/lazydocker/pkg/gui/panels" "github.com/jesseduffield/lazydocker/pkg/gui/presentation" "github.com/jesseduffield/lazydocker/pkg/gui/types" "github.com/jesseduffield/lazydocker/pkg/tasks" "github.com/jesseduffield/lazydocker/pkg/utils" "github.com/samber/lo" ) func (gui *Gui) getServicesPanel() *panels.SideListPanel[*commands.Service] { return &panels.SideListPanel[*commands.Service]{ ContextState: &panels.ContextState[*commands.Service]{ GetMainTabs: func() []panels.MainTab[*commands.Service] { return []panels.MainTab[*commands.Service]{ { Key: "logs", Title: gui.Tr.LogsTitle, Render: gui.renderServiceLogs, }, { Key: "stats", Title: gui.Tr.StatsTitle, Render: gui.renderServiceStats, }, { Key: "container-env", Title: gui.Tr.ContainerEnvTitle, Render: gui.renderServiceContainerEnv, }, { Key: "container-config", Title: gui.Tr.ContainerConfigTitle, Render: gui.renderServiceContainerConfig, }, { Key: "top", Title: gui.Tr.TopTitle, Render: gui.renderServiceTop, }, } }, GetItemContextCacheKey: func(service *commands.Service) string { if service.Container == nil { return "services-" + service.ID } return "services-" + service.ID + "-" + service.Container.ID + "-" + service.Container.Container.State }, }, ListPanel: panels.ListPanel[*commands.Service]{ List: panels.NewFilteredList[*commands.Service](), View: gui.Views.Services, }, NoItemsMessage: gui.Tr.NoServices, Gui: gui.intoInterface(), // sort services first by whether they have a linked container, and second by alphabetical order Sort: func(a *commands.Service, b *commands.Service) bool { if a.Container != nil && b.Container == nil { return true } if a.Container == nil && b.Container != nil { return false } return a.Name < b.Name }, Filter: func(service *commands.Service) bool { selectedProject := gui.getSelectedProjectName() if selectedProject == "" { // Before any project is selected (e.g. startup), default to // the local project so we don't briefly flash all services. selectedProject = gui.DockerCommand.LocalProjectName } if selectedProject == "" { return true } return service.ProjectName == selectedProject }, GetTableCells: func(service *commands.Service) []string { return presentation.GetServiceDisplayStrings(&gui.Config.UserConfig.Gui, service) }, Hide: func() bool { // Show services panel if there are any compose projects (local or discovered) return !gui.DockerCommand.InDockerComposeProject && len(gui.Panels.Services.List.GetAllItems()) == 0 }, } } func (gui *Gui) renderServiceContainerConfig(service *commands.Service) tasks.TaskFunc { if service.Container == nil { return gui.NewSimpleRenderStringTask(func() string { return gui.Tr.NoContainer }) } return gui.renderContainerConfig(service.Container) } func (gui *Gui) renderServiceContainerEnv(service *commands.Service) tasks.TaskFunc { if service.Container == nil { return gui.NewSimpleRenderStringTask(func() string { return gui.Tr.NoContainer }) } return gui.renderContainerEnv(service.Container) } func (gui *Gui) renderServiceStats(service *commands.Service) tasks.TaskFunc { if service.Container == nil { return gui.NewSimpleRenderStringTask(func() string { return gui.Tr.NoContainer }) } return gui.renderContainerStats(service.Container) } func (gui *Gui) renderServiceTop(service *commands.Service) tasks.TaskFunc { return gui.NewTickerTask(TickerTaskOpts{ Func: func(ctx context.Context, notifyStopped chan struct{}) { contents, err := service.RenderTop(ctx) if err != nil { gui.RenderStringMain(err.Error()) } gui.reRenderStringMain(contents) }, Duration: time.Second, Before: func(ctx context.Context) { gui.clearMainView() }, Wrap: gui.Config.UserConfig.Gui.WrapMainPanel, Autoscroll: false, }) } func (gui *Gui) renderServiceLogs(service *commands.Service) tasks.TaskFunc { if service.Container == nil { return gui.NewSimpleRenderStringTask(func() string { return gui.Tr.NoContainerForService }) } return gui.renderContainerLogsToMain(service.Container) } type commandOption struct { description string command string onPress func() error } func (r *commandOption) getDisplayStrings() []string { return []string{r.description, color.New(color.FgCyan).Sprint(r.command)} } // isServiceFromLocalProject returns true if the given service belongs to the // local compose project (the one whose compose file is in the current directory). // Compose commands like up/stop/restart only work for local project services. func (gui *Gui) isServiceFromLocalProject(service *commands.Service) bool { return service.ProjectName == gui.DockerCommand.LocalProjectName } func (gui *Gui) handleServiceRemoveMenu(g *gocui.Gui, v *gocui.View) error { service, err := gui.Panels.Services.GetSelectedItem() if err != nil { return nil } if !gui.isServiceFromLocalProject(service) { return gui.createErrorPanel(gui.Tr.CannotManageNonLocalService) } composeCommand := gui.DockerCommand.NewCommandObject(commands.CommandObject{Service: service}).DockerCompose options := []*commandOption{ { description: gui.Tr.Remove, command: fmt.Sprintf("%s rm --stop --force %s", composeCommand, service.Name), }, { description: gui.Tr.RemoveWithVolumes, command: fmt.Sprintf("%s rm --stop --force -v %s", composeCommand, service.Name), }, } menuItems := lo.Map(options, func(option *commandOption, _ int) *types.MenuItem { return &types.MenuItem{ LabelColumns: option.getDisplayStrings(), OnPress: func() error { return gui.WithWaitingStatus(gui.Tr.RemovingStatus, func() error { if err := gui.OSCommand.RunCommand(option.command); err != nil { return gui.createErrorPanel(err.Error()) } return nil }) }, } }) return gui.Menu(CreateMenuOptions{ Title: "", Items: menuItems, }) } func (gui *Gui) handleServicePause(g *gocui.Gui, v *gocui.View) error { service, err := gui.Panels.Services.GetSelectedItem() if err != nil { return nil } if service.Container == nil { return nil } return gui.PauseContainer(service.Container) } func (gui *Gui) handleServiceStop(g *gocui.Gui, v *gocui.View) error { service, err := gui.Panels.Services.GetSelectedItem() if err != nil { return nil } return gui.createConfirmationPanel(gui.Tr.Confirm, gui.Tr.StopService, func(g *gocui.Gui, v *gocui.View) error { return gui.WithWaitingStatus(gui.Tr.StoppingStatus, func() error { if !gui.isServiceFromLocalProject(service) { if service.Container == nil { return gui.createErrorPanel(gui.Tr.CannotManageNonLocalService) } return service.Container.Stop() } if err := service.Stop(); err != nil { return gui.createErrorPanel(err.Error()) } return nil }) }, nil) } func (gui *Gui) handleServiceUp(g *gocui.Gui, v *gocui.View) error { service, err := gui.Panels.Services.GetSelectedItem() if err != nil { return nil } if !gui.isServiceFromLocalProject(service) { return gui.createErrorPanel(gui.Tr.CannotManageNonLocalService) } return gui.WithWaitingStatus(gui.Tr.UppingServiceStatus, func() error { if err := service.Up(); err != nil { return gui.createErrorPanel(err.Error()) } return nil }) } func (gui *Gui) handleServiceRestart(g *gocui.Gui, v *gocui.View) error { service, err := gui.Panels.Services.GetSelectedItem() if err != nil { return nil } return gui.WithWaitingStatus(gui.Tr.RestartingStatus, func() error { if !gui.isServiceFromLocalProject(service) { if service.Container == nil { return gui.createErrorPanel(gui.Tr.CannotManageNonLocalService) } return service.Container.Restart() } if err := service.Restart(); err != nil { return gui.createErrorPanel(err.Error()) } return nil }) } func (gui *Gui) handleServiceStart(g *gocui.Gui, v *gocui.View) error { service, err := gui.Panels.Services.GetSelectedItem() if err != nil { return nil } if !gui.isServiceFromLocalProject(service) { if service.Container == nil { return gui.createErrorPanel(gui.Tr.CannotManageNonLocalService) } return gui.WithWaitingStatus(gui.Tr.StartingStatus, func() error { return service.Container.Start() }) } return gui.WithWaitingStatus(gui.Tr.StartingStatus, func() error { if err := service.Start(); err != nil { return gui.createErrorPanel(err.Error()) } return nil }) } func (gui *Gui) handleServiceAttach(g *gocui.Gui, v *gocui.View) error { service, err := gui.Panels.Services.GetSelectedItem() if err != nil { return nil } if service.Container == nil { return gui.createErrorPanel(gui.Tr.NoContainers) } c, err := service.Attach() if err != nil { return gui.createErrorPanel(err.Error()) } return gui.runSubprocess(c) } func (gui *Gui) handleServiceRenderLogsToMain(g *gocui.Gui, v *gocui.View) error { service, err := gui.Panels.Services.GetSelectedItem() if err != nil { return nil } c, err := service.ViewLogs() if err != nil { return gui.createErrorPanel(err.Error()) } return gui.runSubprocess(c) } func (gui *Gui) handleProjectUp(g *gocui.Gui, v *gocui.View) error { project, _ := gui.Panels.Projects.GetSelectedItem() if project != nil && project.Name != gui.DockerCommand.LocalProjectName { return gui.createErrorPanel(gui.Tr.CannotManageNonLocalService) } return gui.createConfirmationPanel(gui.Tr.Confirm, gui.Tr.ConfirmUpProject, func(g *gocui.Gui, v *gocui.View) error { cmdStr := utils.ApplyTemplate( gui.Config.UserConfig.CommandTemplates.Up, gui.DockerCommand.NewCommandObject(commands.CommandObject{Project: project}), ) return gui.WithWaitingStatus(gui.Tr.UppingProjectStatus, func() error { if err := gui.OSCommand.RunCommand(cmdStr); err != nil { return gui.createErrorPanel(err.Error()) } return nil }) }, nil) } func (gui *Gui) handleProjectDown(g *gocui.Gui, v *gocui.View) error { project, _ := gui.Panels.Projects.GetSelectedItem() if project != nil && project.Name != gui.DockerCommand.LocalProjectName { return gui.createErrorPanel(gui.Tr.CannotManageNonLocalService) } downCommand := utils.ApplyTemplate( gui.Config.UserConfig.CommandTemplates.Down, gui.DockerCommand.NewCommandObject(commands.CommandObject{Project: project}), ) downWithVolumesCommand := utils.ApplyTemplate( gui.Config.UserConfig.CommandTemplates.DownWithVolumes, gui.DockerCommand.NewCommandObject(commands.CommandObject{Project: project}), ) options := []*commandOption{ { description: gui.Tr.Down, command: downCommand, onPress: func() error { return gui.WithWaitingStatus(gui.Tr.DowningStatus, func() error { if err := gui.OSCommand.RunCommand(downCommand); err != nil { return gui.createErrorPanel(err.Error()) } return nil }) }, }, { description: gui.Tr.DownWithVolumes, command: downWithVolumesCommand, onPress: func() error { return gui.WithWaitingStatus(gui.Tr.DowningStatus, func() error { if err := gui.OSCommand.RunCommand(downWithVolumesCommand); err != nil { return gui.createErrorPanel(err.Error()) } return nil }) }, }, } menuItems := lo.Map(options, func(option *commandOption, _ int) *types.MenuItem { return &types.MenuItem{ LabelColumns: option.getDisplayStrings(), OnPress: option.onPress, } }) return gui.Menu(CreateMenuOptions{ Title: "", Items: menuItems, }) } func (gui *Gui) handleServiceRestartMenu(g *gocui.Gui, v *gocui.View) error { service, err := gui.Panels.Services.GetSelectedItem() if err != nil { return nil } if !gui.isServiceFromLocalProject(service) { return gui.createErrorPanel(gui.Tr.CannotManageNonLocalService) } rebuildCommand := utils.ApplyTemplate( gui.Config.UserConfig.CommandTemplates.RebuildService, gui.DockerCommand.NewCommandObject(commands.CommandObject{Service: service}), ) recreateCommand := utils.ApplyTemplate( gui.Config.UserConfig.CommandTemplates.RecreateService, gui.DockerCommand.NewCommandObject(commands.CommandObject{Service: service}), ) options := []*commandOption{ { description: gui.Tr.Restart, command: utils.ApplyTemplate( gui.Config.UserConfig.CommandTemplates.RestartService, gui.DockerCommand.NewCommandObject(commands.CommandObject{Service: service}), ), onPress: func() error { return gui.WithWaitingStatus(gui.Tr.RestartingStatus, func() error { if err := service.Restart(); err != nil { return gui.createErrorPanel(err.Error()) } return nil }) }, }, { description: gui.Tr.Recreate, command: utils.ApplyTemplate( gui.Config.UserConfig.CommandTemplates.RecreateService, gui.DockerCommand.NewCommandObject(commands.CommandObject{Service: service}), ), onPress: func() error { return gui.WithWaitingStatus(gui.Tr.RestartingStatus, func() error { if err := gui.OSCommand.RunCommand(recreateCommand); err != nil { return gui.createErrorPanel(err.Error()) } return nil }) }, }, { description: gui.Tr.Rebuild, command: utils.ApplyTemplate( gui.Config.UserConfig.CommandTemplates.RebuildService, gui.DockerCommand.NewCommandObject(commands.CommandObject{Service: service}), ), onPress: func() error { return gui.runSubprocess(gui.OSCommand.RunCustomCommand(rebuildCommand)) }, }, } menuItems := lo.Map(options, func(option *commandOption, _ int) *types.MenuItem { return &types.MenuItem{ LabelColumns: option.getDisplayStrings(), OnPress: option.onPress, } }) return gui.Menu(CreateMenuOptions{ Title: "", Items: menuItems, }) } func (gui *Gui) handleServicesCustomCommand(g *gocui.Gui, v *gocui.View) error { service, err := gui.Panels.Services.GetSelectedItem() if err != nil { return nil } commandObject := gui.DockerCommand.NewCommandObject(commands.CommandObject{ Service: service, Container: service.Container, }) var customCommands []config.CustomCommand customServiceCommands := gui.Config.UserConfig.CustomCommands.Services // we only include service commands if they have no serviceNames defined or if our service happens to be one of the serviceNames defined L: for _, cmd := range customServiceCommands { if len(cmd.ServiceNames) == 0 { customCommands = append(customCommands, cmd) continue L } for _, serviceName := range cmd.ServiceNames { if serviceName == service.Name { // appending these to the top given they're more likely to be selected customCommands = append([]config.CustomCommand{cmd}, customCommands...) continue L } } } if service.Container != nil { customCommands = append(customCommands, gui.Config.UserConfig.CustomCommands.Containers...) } return gui.createCustomCommandMenu(customCommands, commandObject) } func (gui *Gui) handleServicesBulkCommand(g *gocui.Gui, v *gocui.View) error { project, _ := gui.Panels.Projects.GetSelectedItem() bulkCommands := gui.Config.UserConfig.BulkCommands.Services commandObject := gui.DockerCommand.NewCommandObject(commands.CommandObject{Project: project}) return gui.createBulkCommandMenu(bulkCommands, commandObject) } func (gui *Gui) handleServicesExecShell(g *gocui.Gui, v *gocui.View) error { service, err := gui.Panels.Services.GetSelectedItem() if err != nil { return nil } container := service.Container if container == nil { return gui.createErrorPanel(gui.Tr.NoContainers) } return gui.containerExecShell(container) } func (gui *Gui) handleServicesOpenInBrowserCommand(g *gocui.Gui, v *gocui.View) error { service, err := gui.Panels.Services.GetSelectedItem() if err != nil { return nil } container := service.Container if container == nil { return gui.createErrorPanel(gui.Tr.NoContainers) } return gui.openContainerInBrowser(container) } ================================================ FILE: pkg/gui/sort_container_test.go ================================================ package gui import ( "sort" "testing" "github.com/docker/docker/api/types/container" "github.com/jesseduffield/lazydocker/pkg/commands" "github.com/stretchr/testify/assert" ) func sampleContainers() []*commands.Container { return []*commands.Container{ { ID: "1", Name: "1", Container: container.Summary{ State: "exited", }, }, { ID: "2", Name: "2", Container: container.Summary{ State: "running", }, }, { ID: "3", Name: "3", Container: container.Summary{ State: "running", }, }, { ID: "4", Name: "4", Container: container.Summary{ State: "created", }, }, } } func expectedPerStatusContainers() []*commands.Container { return []*commands.Container{ { ID: "2", Name: "2", Container: container.Summary{ State: "running", }, }, { ID: "3", Name: "3", Container: container.Summary{ State: "running", }, }, { ID: "1", Name: "1", Container: container.Summary{ State: "exited", }, }, { ID: "4", Name: "4", Container: container.Summary{ State: "created", }, }, } } func expectedLegacySortedContainers() []*commands.Container { return []*commands.Container{ { ID: "1", Name: "1", Container: container.Summary{ State: "exited", }, }, { ID: "2", Name: "2", Container: container.Summary{ State: "running", }, }, { ID: "3", Name: "3", Container: container.Summary{ State: "running", }, }, { ID: "4", Name: "4", Container: container.Summary{ State: "created", }, }, } } func assertEqualContainers(t *testing.T, left *commands.Container, right *commands.Container) { t.Helper() assert.Equal(t, left.Container.State, right.Container.State) assert.Equal(t, left.Container.ID, right.Container.ID) assert.Equal(t, left.Name, right.Name) } func TestSortContainers(t *testing.T) { actual := sampleContainers() expected := expectedPerStatusContainers() sort.Slice(actual, func(i, j int) bool { return sortContainers(actual[i], actual[j], false) }) assert.Equal(t, len(actual), len(expected)) for i := 0; i < len(actual); i++ { assertEqualContainers(t, expected[i], actual[i]) } } func TestLegacySortedContainers(t *testing.T) { actual := sampleContainers() expected := expectedLegacySortedContainers() sort.Slice(actual, func(i, j int) bool { return sortContainers(actual[i], actual[j], true) }) assert.Equal(t, len(actual), len(expected)) for i := 0; i < len(actual); i++ { assertEqualContainers(t, expected[i], actual[i]) } } ================================================ FILE: pkg/gui/subprocess.go ================================================ package gui import ( "fmt" "io" "os" "os/exec" "os/signal" "strings" "github.com/fatih/color" "github.com/jesseduffield/lazydocker/pkg/utils" ) func (gui *Gui) runSubprocess(cmd *exec.Cmd) error { return gui.runSubprocessWithMessage(cmd, "") } func (gui *Gui) runSubprocessWithMessage(cmd *exec.Cmd, msg string) error { gui.Mutexes.SubprocessMutex.Lock() defer gui.Mutexes.SubprocessMutex.Unlock() if err := gui.g.Suspend(); err != nil { return gui.createErrorPanel(err.Error()) } gui.PauseBackgroundThreads = true gui.runCommand(cmd, msg) if err := gui.g.Resume(); err != nil { return gui.createErrorPanel(err.Error()) } gui.PauseBackgroundThreads = false return nil } func (gui *Gui) runCommand(cmd *exec.Cmd, msg string) { cmd.Stdout = os.Stdout cmd.Stderr = os.Stdout cmd.Stdin = os.Stdin stop := make(chan os.Signal, 1) defer signal.Stop(stop) go func() { signal.Notify(stop, os.Interrupt) <-stop if err := gui.OSCommand.Kill(cmd); err != nil { gui.Log.Error(err) } }() fmt.Fprintf(os.Stdout, "\n%s\n\n", utils.ColoredString("+ "+strings.Join(cmd.Args, " "), color.FgBlue)) if msg != "" { fmt.Fprintf(os.Stdout, "\n%s\n\n", utils.ColoredString(msg, color.FgGreen)) } if err := cmd.Run(); err != nil { // not handling the error explicitly because usually we're going to see it // in the output anyway gui.Log.Error(err) } cmd.Stdin = nil cmd.Stdout = io.Discard cmd.Stderr = io.Discard gui.promptToReturn() } ================================================ FILE: pkg/gui/tasks_adapter.go ================================================ package gui import ( "context" "time" "github.com/jesseduffield/lazydocker/pkg/tasks" ) func (gui *Gui) QueueTask(f func(ctx context.Context)) error { return gui.taskManager.NewTask(f) } type RenderStringTaskOpts struct { Autoscroll bool Wrap bool GetStrContent func() string } type TaskOpts struct { Autoscroll bool Wrap bool Func func(ctx context.Context) } type TickerTaskOpts struct { Duration time.Duration Before func(ctx context.Context) Func func(ctx context.Context, notifyStopped chan struct{}) Autoscroll bool Wrap bool } func (gui *Gui) NewRenderStringTask(opts RenderStringTaskOpts) tasks.TaskFunc { taskOpts := TaskOpts{ Autoscroll: opts.Autoscroll, Wrap: opts.Wrap, Func: func(ctx context.Context) { gui.RenderStringMain(opts.GetStrContent()) }, } return gui.NewTask(taskOpts) } // assumes it's cheap to obtain the content (otherwise we would pass a function that returns the content) func (gui *Gui) NewSimpleRenderStringTask(getContent func() string) tasks.TaskFunc { return gui.NewRenderStringTask(RenderStringTaskOpts{ GetStrContent: getContent, Autoscroll: false, Wrap: gui.Config.UserConfig.Gui.WrapMainPanel, }) } func (gui *Gui) NewTask(opts TaskOpts) tasks.TaskFunc { return func(ctx context.Context) { mainView := gui.Views.Main mainView.Autoscroll = opts.Autoscroll mainView.Wrap = opts.Wrap opts.Func(ctx) } } // NewTickerTask is a convenience function for making a new task that repeats some action once per e.g. second // the before function gets called after the lock is obtained, but before the ticker starts. // if you handle a message on the stop channel in f() you need to send a message on the notifyStopped channel because returning is not sufficient. Here, unlike in a regular task, simply returning means we're now going to wait till the next tick to run again. func (gui *Gui) NewTickerTask(opts TickerTaskOpts) tasks.TaskFunc { notifyStopped := make(chan struct{}, 10) task := func(ctx context.Context) { if opts.Before != nil { opts.Before(ctx) } tickChan := time.NewTicker(opts.Duration) defer tickChan.Stop() // calling f first so that we're not waiting for the first tick opts.Func(ctx, notifyStopped) for { select { case <-notifyStopped: gui.Log.Info("exiting ticker task due to notifyStopped channel") return case <-ctx.Done(): gui.Log.Info("exiting ticker task due to stopped channel") return case <-tickChan.C: gui.Log.Info("running ticker task again") opts.Func(ctx, notifyStopped) } } } taskOpts := TaskOpts{ Autoscroll: opts.Autoscroll, Wrap: opts.Wrap, Func: task, } return gui.NewTask(taskOpts) } ================================================ FILE: pkg/gui/theme.go ================================================ package gui import ( "github.com/jesseduffield/gocui" ) // GetOptionsPanelTextColor gets the color of the options panel text func (gui *Gui) GetOptionsPanelTextColor() gocui.Attribute { return GetGocuiStyle(gui.Config.UserConfig.Gui.Theme.OptionsTextColor) } // SetColorScheme sets the color scheme for the app based on the user config func (gui *Gui) SetColorScheme() error { gui.g.FgColor = GetGocuiStyle(gui.Config.UserConfig.Gui.Theme.InactiveBorderColor) gui.g.SelFgColor = GetGocuiStyle(gui.Config.UserConfig.Gui.Theme.ActiveBorderColor) gui.g.FrameColor = gui.g.FgColor gui.g.SelFrameColor = gui.g.SelFgColor return nil } ================================================ FILE: pkg/gui/types/types.go ================================================ package types type MenuItem struct { Label string // alternative to Label. Allows specifying columns which will be auto-aligned LabelColumns []string OnPress func() error // Only applies when Label is used OpensMenu bool } ================================================ FILE: pkg/gui/view_helpers.go ================================================ package gui import ( "fmt" "sort" "strings" "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazydocker/pkg/gui/panels" "github.com/jesseduffield/lazydocker/pkg/utils" "github.com/samber/lo" "github.com/spkg/bom" ) func (gui *Gui) handleGoTo(view *gocui.View) func(g *gocui.Gui, v *gocui.View) error { return func(g *gocui.Gui, v *gocui.View) error { gui.resetMainView() return gui.switchFocus(view) } } func (gui *Gui) nextView(g *gocui.Gui, v *gocui.View) error { sideViewNames := gui.sideViewNames() var focusedViewName string if v == nil || v.Name() == sideViewNames[len(sideViewNames)-1] { focusedViewName = sideViewNames[0] } else { viewName := v.Name() for i := range sideViewNames { if viewName == sideViewNames[i] { focusedViewName = sideViewNames[i+1] break } if i == len(sideViewNames)-1 { gui.Log.Info("not in list of views") return nil } } } focusedView, err := g.View(focusedViewName) if err != nil { panic(err) } gui.resetMainView() return gui.switchFocus(focusedView) } func (gui *Gui) previousView(g *gocui.Gui, v *gocui.View) error { sideViewNames := gui.sideViewNames() var focusedViewName string if v == nil || v.Name() == sideViewNames[0] { focusedViewName = sideViewNames[len(sideViewNames)-1] } else { viewName := v.Name() for i := range sideViewNames { if viewName == sideViewNames[i] { focusedViewName = sideViewNames[i-1] break } if i == len(sideViewNames)-1 { gui.Log.Info("not in list of views") return nil } } } focusedView, err := g.View(focusedViewName) if err != nil { panic(err) } gui.resetMainView() return gui.switchFocus(focusedView) } func (gui *Gui) resetMainView() { gui.State.Panels.Main.ObjectKey = "" gui.Views.Main.Wrap = gui.Config.UserConfig.Gui.WrapMainPanel } // if the cursor down past the last item, move it to the last line // nolint:unparam func (gui *Gui) focusPoint(selectedX int, selectedY int, lineCount int, v *gocui.View) { if selectedY < 0 || selectedY > lineCount { return } ox, oy := v.Origin() originalOy := oy cx, cy := v.Cursor() originalCy := cy _, height := v.Size() ly := utils.Max(height-1, 0) windowStart := oy windowEnd := oy + ly if selectedY < windowStart { oy = utils.Max(oy-(windowStart-selectedY), 0) } else if selectedY > windowEnd { oy += (selectedY - windowEnd) } if windowEnd > lineCount-1 { shiftAmount := (windowEnd - (lineCount - 1)) oy = utils.Max(oy-shiftAmount, 0) } if originalOy != oy { _ = v.SetOrigin(ox, oy) } cy = selectedY - oy if originalCy != cy { _ = v.SetCursor(cx, selectedY-oy) } } func (gui *Gui) FocusY(selectedY int, lineCount int, v *gocui.View) { gui.focusPoint(0, selectedY, lineCount, v) } func (gui *Gui) ResetOrigin(v *gocui.View) { _ = v.SetOrigin(0, 0) _ = v.SetCursor(0, 0) } func (gui *Gui) cleanString(s string) string { output := string(bom.Clean([]byte(s))) return utils.NormalizeLinefeeds(output) } func (gui *Gui) setViewContent(v *gocui.View, s string) error { v.Clear() fmt.Fprint(v, gui.cleanString(s)) return nil } // renderString resets the origin of a view and sets its content func (gui *Gui) renderString(g *gocui.Gui, viewName, s string) error { g.Update(func(*gocui.Gui) error { v, err := g.View(viewName) if err != nil { return nil // return gracefully if view has been deleted } if err := v.SetOrigin(0, 0); err != nil { return err } if err := v.SetCursor(0, 0); err != nil { return err } return gui.setViewContent(v, s) }) return nil } func (gui *Gui) RenderStringMain(s string) { _ = gui.renderString(gui.g, "main", s) } // reRenderString sets the main view's content, without changing its origin func (gui *Gui) reRenderStringMain(s string) { gui.reRenderString("main", s) } // reRenderString sets the view's content, without changing its origin func (gui *Gui) reRenderString(viewName, s string) { gui.g.Update(func(*gocui.Gui) error { v, err := gui.g.View(viewName) if err != nil { return nil // return gracefully if view has been deleted } return gui.setViewContent(v, s) }) } func (gui *Gui) optionsMapToString(optionsMap map[string]string) string { optionsArray := make([]string, 0) for key, description := range optionsMap { optionsArray = append(optionsArray, key+": "+description) } sort.Strings(optionsArray) return strings.Join(optionsArray, ", ") } func (gui *Gui) renderOptionsMap(optionsMap map[string]string) error { return gui.renderString(gui.g, "options", gui.optionsMapToString(optionsMap)) } func (gui *Gui) GetMainView() *gocui.View { return gui.Views.Main } func (gui *Gui) trimmedContent(v *gocui.View) string { return strings.TrimSpace(v.Buffer()) } func (gui *Gui) currentViewName() string { currentView := gui.g.CurrentView() // this can happen when the app is first starting up if currentView == nil { return gui.initiallyFocusedViewName() } return currentView.Name() } func (gui *Gui) resizeCurrentPopupPanel(g *gocui.Gui) error { v := g.CurrentView() if gui.isPopupPanel(v.Name()) { return gui.resizePopupPanel(v) } return nil } func (gui *Gui) resizePopupPanel(v *gocui.View) error { // If the confirmation panel is already displayed, just resize the width, // otherwise continue content := v.Buffer() x0, y0, x1, y1 := gui.getConfirmationPanelDimensions(v.Wrap, content) vx0, vy0, vx1, vy1 := v.Dimensions() if vx0 == x0 && vy0 == y0 && vx1 == x1 && vy1 == y1 { return nil } _, err := gui.g.SetView(v.Name(), x0, y0, x1, y1, 0) return err } func (gui *Gui) renderPanelOptions() error { currentView := gui.g.CurrentView() switch currentView.Name() { case "menu": return gui.renderMenuOptions() case "confirmation": return gui.renderConfirmationOptions() } return gui.renderGlobalOptions() } func (gui *Gui) isPopupPanel(viewName string) bool { return lo.Contains(gui.popupViewNames(), viewName) } func (gui *Gui) popupPanelFocused() bool { return gui.isPopupPanel(gui.currentViewName()) } func (gui *Gui) clearMainView() { mainView := gui.Views.Main mainView.Clear() _ = mainView.SetOrigin(0, 0) _ = mainView.SetCursor(0, 0) } func (gui *Gui) HandleClick(v *gocui.View, itemCount int, selectedLine *int, handleSelect func() error) error { wrappedHandleSelect := func(g *gocui.Gui, v *gocui.View) error { return handleSelect() } return gui.handleClickAux(v, itemCount, selectedLine, wrappedHandleSelect) } func (gui *Gui) handleClickAux(v *gocui.View, itemCount int, selectedLine *int, handleSelect func(*gocui.Gui, *gocui.View) error) error { if gui.popupPanelFocused() && v != nil && !gui.isPopupPanel(v.Name()) { return nil } _, cy := v.Cursor() _, oy := v.Origin() newSelectedLine := cy + oy if newSelectedLine < 0 { newSelectedLine = 0 } if newSelectedLine > itemCount-1 { newSelectedLine = itemCount - 1 } *selectedLine = newSelectedLine if gui.currentViewName() != v.Name() { if err := gui.switchFocus(v); err != nil { return err } } return handleSelect(gui.g, v) } func (gui *Gui) nextScreenMode() error { if gui.currentViewName() == "main" { gui.State.ScreenMode = prevIntInCycle([]WindowMaximisation{SCREEN_NORMAL, SCREEN_HALF, SCREEN_FULL}, gui.State.ScreenMode) return nil } gui.State.ScreenMode = nextIntInCycle([]WindowMaximisation{SCREEN_NORMAL, SCREEN_HALF, SCREEN_FULL}, gui.State.ScreenMode) return nil } func (gui *Gui) prevScreenMode() error { if gui.currentViewName() == "main" { gui.State.ScreenMode = nextIntInCycle([]WindowMaximisation{SCREEN_NORMAL, SCREEN_HALF, SCREEN_FULL}, gui.State.ScreenMode) return nil } gui.State.ScreenMode = prevIntInCycle([]WindowMaximisation{SCREEN_NORMAL, SCREEN_HALF, SCREEN_FULL}, gui.State.ScreenMode) return nil } func nextIntInCycle(sl []WindowMaximisation, current WindowMaximisation) WindowMaximisation { for i, val := range sl { if val == current { if i == len(sl)-1 { return sl[0] } return sl[i+1] } } return sl[0] } func prevIntInCycle(sl []WindowMaximisation, current WindowMaximisation) WindowMaximisation { for i, val := range sl { if val == current { if i > 0 { return sl[i-1] } return sl[len(sl)-1] } } return sl[len(sl)-1] } func (gui *Gui) CurrentView() *gocui.View { return gui.g.CurrentView() } func (gui *Gui) currentSidePanel() (panels.ISideListPanel, bool) { viewName := gui.currentViewName() for _, sidePanel := range gui.allSidePanels() { if sidePanel.GetView().Name() == viewName { return sidePanel, true } } return nil, false } // returns the current list panel. If no list panel is focused, returns false. func (gui *Gui) currentListPanel() (panels.ISideListPanel, bool) { viewName := gui.currentViewName() for _, sidePanel := range gui.allListPanels() { if sidePanel.GetView().Name() == viewName { return sidePanel, true } } return nil, false } func (gui *Gui) allSidePanels() []panels.ISideListPanel { return []panels.ISideListPanel{ gui.Panels.Projects, gui.Panels.Services, gui.Panels.Containers, gui.Panels.Images, gui.Panels.Volumes, gui.Panels.Networks, } } func (gui *Gui) allListPanels() []panels.ISideListPanel { return append(gui.allSidePanels(), gui.Panels.Menu) } func (gui *Gui) IsCurrentView(view *gocui.View) bool { return view == gui.CurrentView() } ================================================ FILE: pkg/gui/views.go ================================================ package gui import ( "os" "github.com/fatih/color" "github.com/jesseduffield/gocui" "github.com/samber/lo" ) // See https://github.com/xtermjs/xterm.js/issues/4238 // VSCode is soon to fix this in an upcoming update. // Once that's done, we can scrap the HIDE_UNDERSCORES variable var ( underscoreEnvChecked bool hideUnderscores bool ) func hideUnderScores() bool { if !underscoreEnvChecked { hideUnderscores = os.Getenv("TERM_PROGRAM") == "vscode" underscoreEnvChecked = true } return hideUnderscores } type Views struct { // side panels Project *gocui.View Services *gocui.View Containers *gocui.View Images *gocui.View Volumes *gocui.View Networks *gocui.View // main panel Main *gocui.View // bottom line Options *gocui.View Information *gocui.View AppStatus *gocui.View // text that prompts you to enter text in the Filter view FilterPrefix *gocui.View // appears next to the SearchPrefix view, it's where you type in the search string Filter *gocui.View // popups Confirmation *gocui.View Menu *gocui.View // will cover everything when it appears Limit *gocui.View } type viewNameMapping struct { viewPtr **gocui.View name string // if true, we handle the position/size of the view in arrangement.go. Otherwise // we handle it manually. autoPosition bool } func (gui *Gui) orderedViewNameMappings() []viewNameMapping { return []viewNameMapping{ // first layer. Ordering within this layer does not matter because there are // no overlapping views {viewPtr: &gui.Views.Project, name: "project", autoPosition: true}, {viewPtr: &gui.Views.Services, name: "services", autoPosition: true}, {viewPtr: &gui.Views.Containers, name: "containers", autoPosition: true}, {viewPtr: &gui.Views.Images, name: "images", autoPosition: true}, {viewPtr: &gui.Views.Volumes, name: "volumes", autoPosition: true}, {viewPtr: &gui.Views.Networks, name: "networks", autoPosition: true}, {viewPtr: &gui.Views.Main, name: "main", autoPosition: true}, // bottom line {viewPtr: &gui.Views.Options, name: "options", autoPosition: true}, {viewPtr: &gui.Views.AppStatus, name: "appStatus", autoPosition: true}, {viewPtr: &gui.Views.Information, name: "information", autoPosition: true}, {viewPtr: &gui.Views.Filter, name: "filter", autoPosition: true}, {viewPtr: &gui.Views.FilterPrefix, name: "filterPrefix", autoPosition: true}, // popups. {viewPtr: &gui.Views.Menu, name: "menu", autoPosition: false}, {viewPtr: &gui.Views.Confirmation, name: "confirmation", autoPosition: false}, // this guy will cover everything else when it appears {viewPtr: &gui.Views.Limit, name: "limit", autoPosition: true}, } } func (gui *Gui) createAllViews() error { frameRunes := []rune{'─', '│', '╭', '╮', '╰', '╯'} switch gui.Config.UserConfig.Gui.Border { case "single": frameRunes = []rune{'─', '│', '┌', '┐', '└', '┘'} case "double": frameRunes = []rune{'═', '║', '╔', '╗', '╚', '╝'} case "hidden": frameRunes = []rune{' ', ' ', ' ', ' ', ' ', ' '} } var err error for _, mapping := range gui.orderedViewNameMappings() { *mapping.viewPtr, err = gui.prepareView(mapping.name) if err != nil && err.Error() != UNKNOWN_VIEW_ERROR_MSG { return err } (*mapping.viewPtr).FrameRunes = frameRunes (*mapping.viewPtr).FgColor = gocui.ColorDefault } selectedLineBgColor := GetGocuiStyle(gui.Config.UserConfig.Gui.Theme.SelectedLineBgColor) gui.Views.Main.Wrap = gui.Config.UserConfig.Gui.WrapMainPanel // when you run a docker container with the -it flags (interactive mode) it adds carriage returns for some reason. This is not docker's fault, it's an os-level default. gui.Views.Main.IgnoreCarriageReturns = true gui.Views.Project.Title = gui.Tr.ProjectTitle gui.Views.Project.TitlePrefix = "[1]" gui.Views.Project.Highlight = true gui.Views.Project.SelBgColor = selectedLineBgColor gui.Views.Services.Highlight = true gui.Views.Services.Title = gui.Tr.ServicesTitle gui.Views.Services.TitlePrefix = "[2]" gui.Views.Services.SelBgColor = selectedLineBgColor gui.Views.Containers.Highlight = true gui.Views.Containers.SelBgColor = selectedLineBgColor if gui.Config.UserConfig.Gui.ShowAllContainers || !gui.DockerCommand.InDockerComposeProject { gui.Views.Containers.Title = gui.Tr.ContainersTitle } else { gui.Views.Containers.Title = gui.Tr.StandaloneContainersTitle } gui.Views.Containers.TitlePrefix = "[3]" gui.Views.Images.Highlight = true gui.Views.Images.Title = gui.Tr.ImagesTitle gui.Views.Images.SelBgColor = selectedLineBgColor gui.Views.Images.TitlePrefix = "[4]" gui.Views.Volumes.Highlight = true gui.Views.Volumes.Title = gui.Tr.VolumesTitle gui.Views.Volumes.TitlePrefix = "[5]" gui.Views.Volumes.SelBgColor = selectedLineBgColor gui.Views.Networks.Highlight = true gui.Views.Networks.Title = gui.Tr.NetworksTitle gui.Views.Networks.TitlePrefix = "[6]" gui.Views.Networks.SelBgColor = selectedLineBgColor gui.Views.Options.Frame = false gui.Views.Options.FgColor = gui.GetOptionsPanelTextColor() gui.Views.AppStatus.FgColor = gocui.ColorCyan gui.Views.AppStatus.Frame = false gui.Views.Information.Frame = false gui.Views.Information.FgColor = gocui.ColorGreen gui.Views.Confirmation.Visible = false gui.Views.Confirmation.Wrap = true gui.Views.Menu.Visible = false gui.Views.Menu.SelBgColor = selectedLineBgColor gui.Views.Limit.Visible = false gui.Views.Limit.Title = gui.Tr.NotEnoughSpace gui.Views.Limit.Wrap = true gui.Views.FilterPrefix.BgColor = gocui.ColorDefault gui.Views.FilterPrefix.FgColor = gocui.ColorGreen gui.Views.FilterPrefix.Frame = false gui.Views.Filter.BgColor = gocui.ColorDefault gui.Views.Filter.FgColor = gocui.ColorGreen gui.Views.Filter.Editable = true gui.Views.Filter.Frame = false gui.Views.Filter.Editor = gocui.EditorFunc(gui.wrapEditor(gocui.SimpleEditor)) return nil } func (gui *Gui) setInitialViewContent() error { if err := gui.renderString(gui.g, "information", gui.getInformationContent()); err != nil { return err } _ = gui.setViewContent(gui.Views.FilterPrefix, gui.filterPrompt()) return nil } func (gui *Gui) getInformationContent() string { informationStr := gui.Config.Version if !gui.g.Mouse { return informationStr } attrs := []color.Attribute{color.FgMagenta} if !hideUnderScores() { attrs = append(attrs, color.Underline) } donate := color.New(attrs...).Sprint(gui.Tr.Donate) return donate + " " + informationStr } func (gui *Gui) popupViewNames() []string { return []string{"confirmation", "menu"} } // these views have their position and size determined by arrangement.go func (gui *Gui) autoPositionedViewNames() []string { views := lo.Filter(gui.orderedViewNameMappings(), func(viewNameMapping viewNameMapping, _ int) bool { return viewNameMapping.autoPosition }) return lo.Map(views, func(viewNameMapping viewNameMapping, _ int) string { return viewNameMapping.name }) } ================================================ FILE: pkg/gui/volumes_panel.go ================================================ package gui import ( "fmt" "github.com/fatih/color" "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazydocker/pkg/commands" "github.com/jesseduffield/lazydocker/pkg/config" "github.com/jesseduffield/lazydocker/pkg/gui/panels" "github.com/jesseduffield/lazydocker/pkg/gui/presentation" "github.com/jesseduffield/lazydocker/pkg/gui/types" "github.com/jesseduffield/lazydocker/pkg/tasks" "github.com/jesseduffield/lazydocker/pkg/utils" "github.com/samber/lo" ) func (gui *Gui) getVolumesPanel() *panels.SideListPanel[*commands.Volume] { return &panels.SideListPanel[*commands.Volume]{ ContextState: &panels.ContextState[*commands.Volume]{ GetMainTabs: func() []panels.MainTab[*commands.Volume] { return []panels.MainTab[*commands.Volume]{ { Key: "config", Title: gui.Tr.ConfigTitle, Render: gui.renderVolumeConfig, }, } }, GetItemContextCacheKey: func(volume *commands.Volume) string { return "volumes-" + volume.Name }, }, ListPanel: panels.ListPanel[*commands.Volume]{ List: panels.NewFilteredList[*commands.Volume](), View: gui.Views.Volumes, }, NoItemsMessage: gui.Tr.NoVolumes, Gui: gui.intoInterface(), // we're sorting these volumes based on whether they have labels defined, // because those are the ones you typically care about. // Within that, we also sort them alphabetically Sort: func(a *commands.Volume, b *commands.Volume) bool { if len(a.Volume.Labels) == 0 && len(b.Volume.Labels) > 0 { return false } if len(a.Volume.Labels) > 0 && len(b.Volume.Labels) == 0 { return true } return a.Name < b.Name }, GetTableCells: presentation.GetVolumeDisplayStrings, } } func (gui *Gui) renderVolumeConfig(volume *commands.Volume) tasks.TaskFunc { return gui.NewSimpleRenderStringTask(func() string { return gui.volumeConfigStr(volume) }) } func (gui *Gui) volumeConfigStr(volume *commands.Volume) string { padding := 15 output := "" output += utils.WithPadding("Name: ", padding) + volume.Name + "\n" output += utils.WithPadding("Driver: ", padding) + volume.Volume.Driver + "\n" output += utils.WithPadding("Scope: ", padding) + volume.Volume.Scope + "\n" output += utils.WithPadding("Mountpoint: ", padding) + volume.Volume.Mountpoint + "\n" output += utils.WithPadding("Labels: ", padding) + utils.FormatMap(padding, volume.Volume.Labels) + "\n" output += utils.WithPadding("Options: ", padding) + utils.FormatMap(padding, volume.Volume.Options) + "\n" output += utils.WithPadding("Status: ", padding) if volume.Volume.Status != nil { output += "\n" for k, v := range volume.Volume.Status { output += utils.FormatMapItem(padding, k, v) } } else { output += "n/a" } if volume.Volume.UsageData != nil { output += utils.WithPadding("RefCount: ", padding) + fmt.Sprintf("%d", volume.Volume.UsageData.RefCount) + "\n" output += utils.WithPadding("Size: ", padding) + utils.FormatBinaryBytes(int(volume.Volume.UsageData.Size)) + "\n" } return output } func (gui *Gui) reloadVolumes() error { if err := gui.refreshStateVolumes(); err != nil { return err } return gui.Panels.Volumes.RerenderList() } func (gui *Gui) refreshStateVolumes() error { volumes, err := gui.DockerCommand.RefreshVolumes() if err != nil { return err } gui.Panels.Volumes.SetItems(volumes) return nil } func (gui *Gui) handleVolumesRemoveMenu(g *gocui.Gui, v *gocui.View) error { volume, err := gui.Panels.Volumes.GetSelectedItem() if err != nil { return nil } type removeVolumeOption struct { description string command string force bool } options := []*removeVolumeOption{ { description: gui.Tr.Remove, command: utils.WithShortSha("docker volume rm " + volume.Name), force: false, }, { description: gui.Tr.ForceRemove, command: utils.WithShortSha("docker volume rm --force " + volume.Name), force: true, }, } menuItems := lo.Map(options, func(option *removeVolumeOption, _ int) *types.MenuItem { return &types.MenuItem{ LabelColumns: []string{option.description, color.New(color.FgRed).Sprint(option.command)}, OnPress: func() error { return gui.WithWaitingStatus(gui.Tr.RemovingStatus, func() error { if err := volume.Remove(option.force); err != nil { return gui.createErrorPanel(err.Error()) } return nil }) }, } }) return gui.Menu(CreateMenuOptions{ Title: "", Items: menuItems, }) } func (gui *Gui) handlePruneVolumes() error { return gui.createConfirmationPanel(gui.Tr.Confirm, gui.Tr.ConfirmPruneVolumes, func(g *gocui.Gui, v *gocui.View) error { return gui.WithWaitingStatus(gui.Tr.PruningStatus, func() error { err := gui.DockerCommand.PruneVolumes() if err != nil { return gui.createErrorPanel(err.Error()) } return nil }) }, nil) } func (gui *Gui) handleVolumesCustomCommand(g *gocui.Gui, v *gocui.View) error { volume, err := gui.Panels.Volumes.GetSelectedItem() if err != nil { return nil } commandObject := gui.DockerCommand.NewCommandObject(commands.CommandObject{ Volume: volume, }) customCommands := gui.Config.UserConfig.CustomCommands.Volumes return gui.createCustomCommandMenu(customCommands, commandObject) } func (gui *Gui) handleVolumesBulkCommand(g *gocui.Gui, v *gocui.View) error { baseBulkCommands := []config.CustomCommand{ { Name: gui.Tr.PruneVolumes, InternalFunction: gui.handlePruneVolumes, }, } bulkCommands := append(baseBulkCommands, gui.Config.UserConfig.BulkCommands.Volumes...) commandObject := gui.DockerCommand.NewCommandObject(commands.CommandObject{}) return gui.createBulkCommandMenu(bulkCommands, commandObject) } ================================================ FILE: pkg/gui/window.go ================================================ package gui // func (gui *Gui) currentWindow() string { // // at the moment, we only have one view per window in lazydocker, so we // // are using the view name as the window name // return gui.currentViewName() // } // excludes popups func (gui *Gui) currentStaticWindowName() string { return gui.currentStaticViewName() } func (gui *Gui) currentSideWindowName() string { return gui.currentSideViewName() } ================================================ FILE: pkg/i18n/chinese.go ================================================ package i18n func chineseSet() TranslationSet { return TranslationSet{ PruningStatus: "修剪中", RemovingStatus: "移除中", RestartingStatus: "重启中", StartingStatus: "启动中", StoppingStatus: "停止中", UppingServiceStatus: "升级服务中", UppingProjectStatus: "升级项目中", DowningStatus: "下架中", PausingStatus: "暂停中", RunningCustomCommandStatus: "正在运行自定义命令", RunningBulkCommandStatus: "正在运行批量命令", NoViewMachingNewLineFocusedSwitchStatement: "没有匹配 newLineFocused switch 语句的视图", ErrorOccurred: "发生错误!请在 https://github.com/jesseduffield/lazydocker/issues 上创建一个问题", ConnectionFailed: "无法连接到 Docker 客户端。您可能需要重新启动 Docker 客户端", UnattachableContainerError: "容器不支持 attaching。您必须使用“-it”标志运行服务,或者在docker-compose.yml文件中使用`stdin_open: true,tty: true`", WaitingForContainerInfo: "在 Docker 给我们更多关于容器的信息之前,无法继续。请几分钟后重试。", CannotAttachStoppedContainerError: "您不能 attach 到已停止的容器,您需要先启动它(您可以用 'r' 键来执行此操作)(是的,我懒得为您自动执行此操作)(很酷的是,我可以通过错误消息与您进行一对一的通讯)", CannotAccessDockerSocketError: "无法访问 Docker 套接字:unix:///var/run/docker.sock\n请以 root 用户身份运行 lazydocker 或阅读https://docs.docker.com/install/linux/linux-postinstall/", CannotKillChildError: "等待三秒钟以停止子进程。可能有一个孤儿进程在您的系统上继续运行。", Donate: "捐赠", Confirm: "确认", Return: "返回", FocusMain: "聚焦主面板", LcFilter: "过滤列表", Navigate: "导航", Execute: "执行", Close: "关闭", Quit: "退出", Menu: "菜单", MenuTitle: "菜单", Scroll: "滚动", OpenConfig: "打开lazydocker配置", EditConfig: "编辑lazydocker配置", Cancel: "取消", Remove: "移除", HideStopped: "隐藏/显示已停止的容器", ForceRemove: "强制移除", RemoveWithVolumes: "移除并删除卷", RemoveService: "移除容器", UpService: "启动服务", Stop: "停止", Pause: "暂停", Restart: "重新启动", Down: "关闭项目", DownWithVolumes: "关闭包括卷的项目", Start: "启动项目", Rebuild: "重建", Recreate: "重新创建", PreviousContext: "上一个选项卡", NextContext: "下一个选项卡", // Attach: "连接/附加", ViewLogs: "查看日志", UpProject: "创建并启动容器", DownProject: "停止并移除容器", RemoveImage: "移除镜像", RemoveVolume: "移除卷", RemoveNetwork: "移除网络", RemoveWithoutPrune: "移除但不删除未标记的父级", RemoveWithoutPruneWithForce: "移除(强制)但不删除未标记的父级", RemoveWithForce: "移除(强制)", PruneContainers: "删除退出的容器", PruneVolumes: "删除未使用的卷", PruneNetworks: "删除未使用的网络", PruneImages: "删除未使用的镜像", StopAllContainers: "停止所有容器", RemoveAllContainers: "删除所有容器(强制)", ViewRestartOptions: "查看重启选项", ExecShell: "执行shell", RunCustomCommand: "运行预定义的自定义命令", ViewBulkCommands: "查看批量命令", FilterList: "过滤列表", OpenInBrowser: "在浏览器中打开(第一个端口为http)", SortContainersByState: "按状态排序容器", GlobalTitle: "全局", MainTitle: "主要", ProjectTitle: "项目", ServicesTitle: "服务", ContainersTitle: "容器", StandaloneContainersTitle: "独立容器", ImagesTitle: "镜像", VolumesTitle: "卷", NetworksTitle: "网络", CustomCommandTitle: "自定义命令:", BulkCommandTitle: "批量命令:", ErrorTitle: "错误", LogsTitle: "日志", ConfigTitle: "配置", EnvTitle: "环境变量", DockerComposeConfigTitle: "Docker-Compose配置", TopTitle: "系统资源管理", StatsTitle: "统计信息", CreditsTitle: "关于我们", ContainerConfigTitle: "容器配置", ContainerEnvTitle: "容器环境变量", NothingToDisplay: "无内容显示", NoContainerForService: "没有日志可以展示;该服务未关联任何容器", CannotDisplayEnvVariables: "展示环境变量时出现问题", NoContainers: "没有容器", NoContainer: "没有容器", NoImages: "没有镜像", NoVolumes: "没有卷", NoNetworks: "没有网络", NoServices: "没有服务", ConfirmQuit: "您确定要退出吗?", ConfirmUpProject: "您确定要“up”的docker compose项目吗?", MustForceToRemoveContainer: "您无法删除正在运行的容器,除非您强制执行。您想强制执行吗?", NotEnoughSpace: "空间不足,无法渲染面板", ConfirmPruneImages: "您确定要删除所有未使用的镜像吗?", ConfirmPruneContainers: "您确定要删除所有停止的容器吗?", ConfirmStopContainers: "您确定要停止所有容器吗?", ConfirmRemoveContainers: "您确定要删除所有容器吗?", ConfirmPruneVolumes: "您确定要删除所有未使用的卷吗?", ConfirmPruneNetworks: "您确定要删除所有未使用的网络吗?", StopService: "您确定要停止此服务的容器吗?", StopContainer: "您确定要停止此容器吗?", PressEnterToReturn: "按 enter 返回 lazydocker(您可以在配置文件中设置 `gui.returnImmediately: true` 来禁用此提示)", No: "否", Yes: "是", LcNextScreenMode: "下一个屏幕模式(正常/半屏/全屏)", LcPrevScreenMode: "上一个屏幕模式", FilterPrompt: "筛选", } } ================================================ FILE: pkg/i18n/dutch.go ================================================ package i18n func dutchSet() TranslationSet { return TranslationSet{ PruningStatus: "vernietigen", RemovingStatus: "verwijderen", RestartingStatus: "herstarten", StoppingStatus: "stoppen", RunningCustomCommandStatus: "Aangepast commando draaien", NoViewMachingNewLineFocusedSwitchStatement: "No view matching newLineFocused switch statement", ErrorOccurred: "Er is iets fout gegaan! Zou je hier een issue aan willen maken: https://github.com/jesseduffield/lazydocker/issues", ConnectionFailed: "connectie naar de docker client mislukt. Het zou kunnen dat je de docker client moet herstarten", UnattachableContainerError: "Container heeft geen ondersteuning voor vastmaken. Je zou de service met het '-it' argument kunnen draaien of stop dit in je `stdin_open: true, tty: true` docker-compose.yml", CannotAttachStoppedContainerError: "Je kan niet een vastgemaakte container stoppen, je moet het eerst starten (dit kan je doen met de 'r' toets) (ja ik ben te leu om dat voor je te doen automatisch)", CannotAccessDockerSocketError: "Kan de docker socket niet bereiken: unix:///var/run/docker.sock\nDraai lazydocker als root of lees https://docs.docker.com/install/linux/linux-postinstall/", Donate: "Doneer", Confirm: "Bevestigen", Return: "terug", FocusMain: "focus hoofdpaneel", Navigate: "navigeer", Execute: "voer uit", Close: "sluit", Menu: "menu", MenuTitle: "Menu", Scroll: "scroll", OpenConfig: "open de lazydocker configuratie", EditConfig: "verander de lazydocker configuratie", Cancel: "annuleren", Remove: "verwijder", HideStopped: "verberg gestopte containers", ForceRemove: "geforceerd verwijderen", RemoveWithVolumes: "verwijder met volumes", RemoveService: "verwijder containers", Stop: "stop", Restart: "herstart", Rebuild: "herbouw", Recreate: "hercreëer", PreviousContext: "vorige tab", NextContext: "volgende tab", Attach: "verbinden", ViewLogs: "bekijk logs", RemoveImage: "verwijder image", RemoveVolume: "verwijder volume", RemoveNetwork: "verwijder network", RemoveWithoutPrune: "verwijder zonder de ongelabeld ouders te verwijderen", PruneContainers: "vernietig bestaande containers", PruneVolumes: "vernietig ongebruikte volumes", PruneNetworks: "vernietig ongebruikte networks", PruneImages: "vernietig ongebruikte images", ViewRestartOptions: "bekijk herstart opties", RunCustomCommand: "draai een vooraf bedacht aangepaste opdracht", GlobalTitle: "Globaal", MainTitle: "Hoofd", ProjectTitle: "Project", ServicesTitle: "Diensten", ContainersTitle: "Containers", StandaloneContainersTitle: "Alleenstaande Containers", ImagesTitle: "Images", VolumesTitle: "Volumes", NetworksTitle: "Networks", CustomCommandTitle: "Aangepast commando:", ErrorTitle: "Fout", LogsTitle: "Logs", ConfigTitle: "Config", EnvTitle: "Env", DockerComposeConfigTitle: "Docker-Compose Configuratie", TopTitle: "Top", StatsTitle: "Stats", CreditsTitle: "Over", ContainerConfigTitle: "Container Configuratie", ContainerEnvTitle: "Container Env", NothingToDisplay: "Nothing to display", CannotDisplayEnvVariables: "Something went wrong while displaying environment variables", NoContainers: "Geen containers", NoContainer: "Geen container", NoImages: "Geen images", NoVolumes: "Geen volumes", NoNetworks: "Geen networks", ConfirmQuit: "Weet je zeker dat je weg wil gaan?", MustForceToRemoveContainer: "Je kan geen draaiende container verwijderen tenzij je het forceert, Wil je het forceren?", NotEnoughSpace: "Niet genoeg ruimte om de panelen te renderen", ConfirmPruneImages: "Weet je zeker dat je alle niet gebruikte images wil vernietigen?", ConfirmPruneContainers: "Weet je zeker dat je alle niet gestopte containers wil vernietigen?", ConfirmPruneVolumes: "Weet je zeker dat je alle niet gebruikte volumes wil vernietigen?", ConfirmPruneNetworks: "Weet je zeker dat je alle niet gebruikte networks wil vernietigen?", StopService: "Weet je zeker dat je deze service zijn containers wil stoppen?", StopContainer: "Weet je zeker dat je deze container wil stoppen?", PressEnterToReturn: "Druk op enter om terug te gaan naar lazydocker (Deze popup kan uit gezet worden door in de config dit neer te zetten `gui.returnImmediately: true`)", DetachFromContainerShortCut: "Als u wilt loskoppelen van de container, drukt u standaard op ctrl-p en vervolgens op ctrl-q", } } ================================================ FILE: pkg/i18n/english.go ================================================ package i18n // TranslationSet is a set of localised strings for a given language type TranslationSet struct { NotEnoughSpace string ProjectTitle string MainTitle string GlobalTitle string Navigate string Menu string MenuTitle string Execute string Scroll string Close string Quit string ErrorTitle string NoViewMachingNewLineFocusedSwitchStatement string OpenConfig string EditConfig string ConfirmQuit string ConfirmUpProject string ErrorOccurred string ConnectionFailed string UnattachableContainerError string WaitingForContainerInfo string CannotAttachStoppedContainerError string CannotAccessDockerSocketError string CannotKillChildError string Donate string Cancel string CustomCommandTitle string BulkCommandTitle string Remove string HideStopped string ForceRemove string RemoveWithVolumes string MustForceToRemoveContainer string Confirm string Return string FocusMain string LcFilter string StopContainer string RestartingStatus string StartingStatus string StoppingStatus string UppingProjectStatus string UppingServiceStatus string PausingStatus string RemovingStatus string DowningStatus string RunningCustomCommandStatus string RunningBulkCommandStatus string RemoveService string UpService string Stop string Pause string Restart string Down string DownWithVolumes string Start string Rebuild string Recreate string PreviousContext string NextContext string Attach string ViewLogs string UpProject string DownProject string ServicesTitle string ContainersTitle string StandaloneContainersTitle string TopTitle string ImagesTitle string VolumesTitle string NetworksTitle string NoContainers string NoContainer string NoImages string NoVolumes string NoNetworks string NoServices string RemoveImage string RemoveVolume string RemoveNetwork string RemoveWithoutPrune string RemoveWithoutPruneWithForce string RemoveWithForce string PruneImages string PruneContainers string PruneVolumes string PruneNetworks string ConfirmPruneContainers string ConfirmStopContainers string ConfirmRemoveContainers string ConfirmPruneImages string ConfirmPruneVolumes string ConfirmPruneNetworks string PruningStatus string StopService string PressEnterToReturn string DetachFromContainerShortCut string StopAllContainers string RemoveAllContainers string ViewRestartOptions string ExecShell string RunCustomCommand string ViewBulkCommands string FilterList string OpenInBrowser string SortContainersByState string LogsTitle string ConfigTitle string EnvTitle string DockerComposeConfigTitle string StatsTitle string CreditsTitle string ContainerConfigTitle string ContainerEnvTitle string NothingToDisplay string NoContainerForService string CannotDisplayEnvVariables string CannotManageNonLocalService string No string Yes string LcNextScreenMode string LcPrevScreenMode string FilterPrompt string FocusProjects string FocusServices string FocusContainers string FocusImages string FocusVolumes string FocusNetworks string } func englishSet() TranslationSet { return TranslationSet{ PruningStatus: "pruning", RemovingStatus: "removing", RestartingStatus: "restarting", StartingStatus: "starting", StoppingStatus: "stopping", UppingServiceStatus: "upping service", UppingProjectStatus: "upping project", DowningStatus: "downing", PausingStatus: "pausing", RunningCustomCommandStatus: "running custom command", RunningBulkCommandStatus: "running bulk command", NoViewMachingNewLineFocusedSwitchStatement: "No view matching newLineFocused switch statement", ErrorOccurred: "An error occurred! Please create an issue at https://github.com/jesseduffield/lazydocker/issues", ConnectionFailed: "connection to docker client failed. You may need to restart the docker client", UnattachableContainerError: "Container does not support attaching. You must either run the service with the '-it' flag or use `stdin_open: true, tty: true` in the docker-compose.yml file", WaitingForContainerInfo: "Cannot proceed until docker gives us more information about the container. Please retry in a few moments.", CannotAttachStoppedContainerError: "You cannot attach to a stopped container, you need to start it first (which you can actually do with the 'r' key) (yes I'm too lazy to do this automatically for you) (pretty cool that I get to communicate one-on-one with you in the form of an error message though)", CannotAccessDockerSocketError: "Can't access docker socket at: unix:///var/run/docker.sock\nRun lazydocker as root or read https://docs.docker.com/install/linux/linux-postinstall/", CannotKillChildError: "Waited three seconds for child process to stop. There may be an orphan process that continues to run on your system.", Donate: "Donate", Confirm: "Confirm", Return: "return", FocusMain: "focus main panel", LcFilter: "filter list", Navigate: "navigate", Execute: "execute", Close: "close", Quit: "quit", Menu: "menu", MenuTitle: "Menu", Scroll: "scroll", OpenConfig: "open lazydocker config", EditConfig: "edit lazydocker config", Cancel: "cancel", Remove: "remove", HideStopped: "hide/show stopped containers", ForceRemove: "force remove", RemoveWithVolumes: "remove with volumes", RemoveService: "remove containers", UpService: "up service", Stop: "stop", Pause: "pause", Restart: "restart", Down: "down project", DownWithVolumes: "down project with volumes", Start: "start", Rebuild: "rebuild", Recreate: "recreate", PreviousContext: "previous tab", NextContext: "next tab", Attach: "attach", ViewLogs: "view logs", UpProject: "up project", DownProject: "down project", RemoveImage: "remove image", RemoveVolume: "remove volume", RemoveNetwork: "remove network", RemoveWithoutPrune: "remove without deleting untagged parents", RemoveWithoutPruneWithForce: "remove (forced) without deleting untagged parents", RemoveWithForce: "remove (forced)", PruneContainers: "prune exited containers", PruneVolumes: "prune unused volumes", PruneNetworks: "prune unused networks", PruneImages: "prune unused images", StopAllContainers: "stop all containers", RemoveAllContainers: "remove all containers (forced)", ViewRestartOptions: "view restart options", ExecShell: "exec shell", RunCustomCommand: "run predefined custom command", ViewBulkCommands: "view bulk commands", FilterList: "filter list", OpenInBrowser: "open in browser (first port is http)", SortContainersByState: "sort containers by state", GlobalTitle: "Global", MainTitle: "Main", ProjectTitle: "Project", ServicesTitle: "Services", ContainersTitle: "Containers", StandaloneContainersTitle: "Standalone Containers", ImagesTitle: "Images", VolumesTitle: "Volumes", NetworksTitle: "Networks", CustomCommandTitle: "Custom Command:", BulkCommandTitle: "Bulk Command:", ErrorTitle: "Error", LogsTitle: "Logs", ConfigTitle: "Config", EnvTitle: "Env", DockerComposeConfigTitle: "Docker-Compose Config", TopTitle: "Top", StatsTitle: "Stats", CreditsTitle: "About", ContainerConfigTitle: "Container Config", ContainerEnvTitle: "Container Env", NothingToDisplay: "Nothing to display", NoContainerForService: "No logs to show; service is not associated with a container", CannotDisplayEnvVariables: "Something went wrong while displaying environment variables", CannotManageNonLocalService: "This service belongs to a different compose project. Run lazydocker from that project's directory to manage it.", NoContainers: "No containers", NoContainer: "No container", NoImages: "No images", NoVolumes: "No volumes", NoNetworks: "No networks", NoServices: "No services", ConfirmQuit: "Are you sure you want to quit?", ConfirmUpProject: "Are you sure you want to 'up' your docker compose project?", MustForceToRemoveContainer: "You cannot remove a running container unless you force it. Do you want to force it?", NotEnoughSpace: "Not enough space to render panels", ConfirmPruneImages: "Are you sure you want to prune all unused images?", ConfirmPruneContainers: "Are you sure you want to prune all stopped containers?", ConfirmStopContainers: "Are you sure you want to stop all containers?", ConfirmRemoveContainers: "Are you sure you want to remove all containers?", ConfirmPruneVolumes: "Are you sure you want to prune all unused volumes?", ConfirmPruneNetworks: "Are you sure you want to prune all unused networks?", StopService: "Are you sure you want to stop this service's containers?", StopContainer: "Are you sure you want to stop this container?", PressEnterToReturn: "Press enter to return to lazydocker (this prompt can be disabled in your config by setting `gui.returnImmediately: true`)", DetachFromContainerShortCut: "By default, to detach from the container press ctrl-p then ctrl-q", No: "no", Yes: "yes", LcNextScreenMode: "next screen mode (normal/half/fullscreen)", LcPrevScreenMode: "prev screen mode", FilterPrompt: "filter", FocusProjects: "focus projects panel", FocusServices: "focus services panel", FocusContainers: "focus containers panel", FocusImages: "focus images panel", FocusVolumes: "focus volumes panel", FocusNetworks: "focus networks panel", } } ================================================ FILE: pkg/i18n/french.go ================================================ package i18n func frenchSet() TranslationSet { return TranslationSet{ PruningStatus: "destruction", RemovingStatus: "suppression", RestartingStatus: "redémarrage", StartingStatus: "démarrage", StoppingStatus: "arrêt", PausingStatus: "mise en pause", RunningCustomCommandStatus: "exécution de la commande personalisée", RunningBulkCommandStatus: "exécution de la commande groupée", NoViewMachingNewLineFocusedSwitchStatement: "Aucune vue correspondant au switch newLineFocused", ErrorOccurred: "Une erreur s'est produite ! Veuillez créer un rapport d'erreur sur https://github.com/jesseduffield/lazydocker/issues", ConnectionFailed: "Erreur lors de la connexion au client Docker. Essayez de redémarrer votre client Docker", UnattachableContainerError: "Le conteneur ne peut pas être attaché. Vous devez exécuter le service avec le drapeau 'it' ou bien utiliser `stdin_open: true, tty: true` dans votre fichier docker-compose.yml", WaitingForContainerInfo: "Le processus ne peut pas continuer avant que Docker ne fournisse plus d'informations. Veuillez réessayer dans quelques instants.", CannotAttachStoppedContainerError: "Vous ne pouvez pas vous attacher à un conteneur arrêté, vous devez le démarrer en amont (ce que vous pouvez faire avec la touche 'r') (oui, je suis trop paresseux pour le faire automatiquement pour vous) (plutôt cool que je puisse communiquer en tête-à-tête avec vous au travers d'un message d'erreur, cependant)", CannotAccessDockerSocketError: "Impossible d'accéder au socket Docker à : unix:///var/run/docker.sock\nLancez lazydocker en tant que root ou alors lisez https://docs.docker.com/install/linux/linux-postinstall/", CannotKillChildError: "Trois secondes se sont écoulées depuis la demande d'arrêt des processus enfants. Il se peut qu'un processus orphelin continue à tourner sur votre système.", Donate: "Donner", Confirm: "Confirmer", Return: "retour", FocusMain: "focus panneau principal", Navigate: "naviguer", Execute: "exécuter", Close: "fermer", Menu: "menu", MenuTitle: "Menu", Scroll: "faire défiler", OpenConfig: "ouvrir la configuration lazydocker", EditConfig: "modifier la configuration lazydocker", Cancel: "annuler", Remove: "supprimer", HideStopped: "cacher/montrer les conteneurs arrêtés", ForceRemove: "forcer la suppression", RemoveWithVolumes: "supprimer avec les volumes", RemoveService: "supprimer les conteneurs", Stop: "arrêter", Pause: "pause", Restart: "redémarrer", Start: "démarrer", Rebuild: "reconstruire", Recreate: "recréer", PreviousContext: "onglet précédent", NextContext: "onglet suivant", Attach: "attacher", ViewLogs: "voir les enregistrements", RemoveImage: "supprimer l'image", RemoveVolume: "supprimer le volume", RemoveNetwork: "supprimer le réseau", RemoveWithoutPrune: "supprimer sans effacer les parents non étiquetés", RemoveWithoutPruneWithForce: "supprimer (forcer) sans effacer les parents non étiquetés", RemoveWithForce: "supprimer (forcer)", PruneContainers: "détruire les conteneurs arrêtés", PruneVolumes: "détruire les volumes non utilisés", PruneNetworks: "détruire les réseaux non utilisés", PruneImages: "détruire les images non utilisées", StopAllContainers: "arrêter tous les conteneurs", RemoveAllContainers: "supprimer tous les conteneurs (forcer)", ViewRestartOptions: "voir les options de redémarrage", ExecShell: "exécuter le shell", RunCustomCommand: "exécuter une commande prédéfinie", ViewBulkCommands: "voir les commandes groupées", OpenInBrowser: "ouvrir dans le navigateur (le premier port est http)", SortContainersByState: "ordonner les conteneurs par état", GlobalTitle: "Global", MainTitle: "Principal", ProjectTitle: "Projet", ServicesTitle: "Services", ContainersTitle: "Conteneurs", StandaloneContainersTitle: "Conteneurs autonomes", ImagesTitle: "Images", VolumesTitle: "Volumes", NetworksTitle: "Réseaux", CustomCommandTitle: "Commande personnalisée :", BulkCommandTitle: "Commande groupée :", ErrorTitle: "Erreur", LogsTitle: "Journaux", ConfigTitle: "Config", EnvTitle: "Env", DockerComposeConfigTitle: "Config Docker-Compose", TopTitle: "Top", StatsTitle: "Statistiques", CreditsTitle: "À propos", ContainerConfigTitle: "Config Conteneur", ContainerEnvTitle: "Env Conteneur", NothingToDisplay: "Rien à afficher", CannotDisplayEnvVariables: "Quelque chose a échoué lors de l'affichage des variables d'environnement", NoContainers: "Aucun conteneur", NoContainer: "Aucun conteneur", NoImages: "Aucune image", NoVolumes: "Aucun volume", NoNetworks: "Aucun réseau", ConfirmQuit: "Êtes-vous certain de vouloir quitter ?", MustForceToRemoveContainer: "Vous ne pouvez pas supprimer un conteneur qui tourne sans le forcer. Voulez-vous le forcer ?", NotEnoughSpace: "Manque d'espace pour afficher les différent panneaux", ConfirmPruneImages: "Êtes-vous certain de vouloir détruire toutes les images non utilisées ?", ConfirmPruneContainers: "Êtes-vous certain de vouloir détruire tous les conteneurs arrêtés ?", ConfirmStopContainers: "Êtes-vous certain de vouloir arrêter tous les conteneurs ?", ConfirmRemoveContainers: "Êtes-vous certain de vouloir supprimer tous les conteneurs ?", ConfirmPruneVolumes: "Êtes-vous certain de vouloir détruire tous les volumes non utilisés ?", ConfirmPruneNetworks: "Êtes-vous certain de vouloir détruire tous les réseaux non utilisés ?", StopService: "Êtes-vous certain de vouloir arrêter le conteneur de ce service ?", StopContainer: "Êtes-vous certain de vouloir arrêter ce conteneur ?", PressEnterToReturn: "Appuyez sur Entrée pour revenir à lazydocker (ce message peut être désactivé dans vos configurations en appliquant `gui.returnImmediately: true`)", DetachFromContainerShortCut: "Par défaut, pour se détacher du conteneur appuyez sur CTRL-P puis CTRL-Q", No: "non", Yes: "oui", } } ================================================ FILE: pkg/i18n/german.go ================================================ package i18n func germanSet() TranslationSet { return TranslationSet{ PruningStatus: "zerstören", RemovingStatus: "entfernen", RestartingStatus: "neustarten", StoppingStatus: "anhalten", RunningCustomCommandStatus: "führt benutzerdefinierten Befehl aus", NoViewMachingNewLineFocusedSwitchStatement: "No view matching newLineFocused switch statement", ErrorOccurred: "Es ist ein Fehler aufgetreten! Bitte erstelle ein Issue hier: https://github.com/jesseduffield/lazydocker/issues", ConnectionFailed: "Verbindung zum Docker Client fehlgeschlagen. Du musst ggf. den Docker Client neustarten.", UnattachableContainerError: "Der Container bietet keine Unterstützung für das Anbinden. Du musst den Dienst entweder mit der '-it' Flagge benutzen oder `stdin_open: true, tty: true` in der docker-compose.yml Datei setzen.", CannotAttachStoppedContainerError: "Du kannst keinen angehaltenen Container anbinden. Du musst ihn erst starten (was du tun kannst, indem du 'r' drückst), (ja, ich bin zu faul um das zu automatisieren) (aber ist schon cool, dass ich so eine Konversation durch eine Fehlermeldung mit dir führen kann)", CannotAccessDockerSocketError: "Kann nicht auf den Socket zugreifen: unix:///var/run/docker.sock\nFühre lazydocker als root aus oder lese https://docs.docker.com/install/linux/linux-postinstall/", Donate: "Spenden", Confirm: "Bestätigen", Return: "zurück", FocusMain: "fokussieren aufs Hauptpanel", Navigate: "navigieren", Execute: "ausführen", Close: "schließen", Menu: "menü", MenuTitle: "Menü", Scroll: "scrollen", OpenConfig: "öffne lazydocker Konfiguration", EditConfig: "bearbeite lazydocker Konfiguration", Cancel: "abbrechen", Remove: "entfernen", ForceRemove: "Entfernen erzwingen", RemoveWithVolumes: "entferne mit Volumes", RemoveService: "entferne Container", Stop: "anhalten", Restart: "neustarten", Rebuild: "neubauen", Recreate: "neuerstellen", PreviousContext: "vorheriges Tab", NextContext: "nächstes Tab", Attach: "anbinden", ViewLogs: "zeige Protokolle", RemoveImage: "entferne Image", RemoveVolume: "entferne Volume", RemoveNetwork: "entferne Netzwerk", RemoveWithoutPrune: "entfernen, ohne die unmarkierten Eltern zu entfernen", PruneContainers: "entferne verlassene Container", PruneVolumes: "entferne unbenutzte Volumes", PruneNetworks: "entferne unbenutzte Netzwerk", PruneImages: "entferne unbenutzte Images", ViewRestartOptions: "zeige Neustartoptionen", RunCustomCommand: "führe vordefinierten benutzerdefinierten Befehl aus", GlobalTitle: "Global", MainTitle: "Haupt", ProjectTitle: "Projekt", ServicesTitle: "Dienste", ContainersTitle: "Container", StandaloneContainersTitle: "Alleinstehende Container", ImagesTitle: "Images", VolumesTitle: "Volumes", NetworksTitle: "Netzwerk", CustomCommandTitle: "Benutzerdefinierter Befehl", ErrorTitle: "Fehler", LogsTitle: "Protokoll", ConfigTitle: "Konfiguration", EnvTitle: "Env", DockerComposeConfigTitle: "Docker-Compose Konfiguration", TopTitle: "Top", StatsTitle: "Statistiken", CreditsTitle: "Über Uns", ContainerConfigTitle: "Container Konfiguration", ContainerEnvTitle: "Container Env", NothingToDisplay: "Nothing to display", CannotDisplayEnvVariables: "Something went wrong while displaying environment variables", NoContainers: "Keine Container", NoContainer: "Kein Container", NoImages: "Keine Images", NoVolumes: "Keine Volumes", NoNetworks: "Keine Netzwerk", ConfirmQuit: "Bist du dir sicher, dass du verlassen möchtest?", MustForceToRemoveContainer: "Du kannst keinen Container entfernen, der noch ausgeführt wird außer du erzwingst es. Möchtest du es erzwingen?", NotEnoughSpace: "Nicht genug Platz um die Panel darzustellen", ConfirmPruneImages: "Bist du dir sicher, dass du alle unbenutzten Images entfernen möchtest?", ConfirmPruneContainers: "Bist du dir sicher, dass du alle angehaltenen Container entfernen möchtes?", ConfirmPruneVolumes: "Bist du dir sicher, dass du alle unbenutzen Volumes entfernen möchtest?", ConfirmPruneNetworks: "Bist du dir sicher, dass du alle unbenutzen Netzwerk entfernen möchtest?", StopService: "Bist du dir sicher, dass du den Dienst dieses Containers anhalten möchtest?", StopContainer: "Bist du dir sicher, dass du den Container anhalten möchtest?", PressEnterToReturn: "Drücke Eingabe um zu lazydocker zurückzukehren. (Diese Nachfrage kann in Deiner Konfiguration deaktiviert werden, indem du folgenden Wert setzt: `gui.returnImmediately: true`)", DetachFromContainerShortCut: "Um sich vom Container zu trennen, drücken Sie standardmäßig ctrl-p ​​und dann ctrl-q", } } ================================================ FILE: pkg/i18n/i18n.go ================================================ package i18n import ( "strings" "github.com/imdario/mergo" "github.com/cloudfoundry/jibber_jabber" "github.com/go-errors/errors" "github.com/sirupsen/logrus" ) // Localizer will translate a message into the user's language type Localizer struct { Log *logrus.Entry S TranslationSet } func NewTranslationSetFromConfig(log *logrus.Entry, configLanguage string) (*TranslationSet, error) { if configLanguage == "auto" { language := detectLanguage(jibber_jabber.DetectLanguage) return NewTranslationSet(log, language), nil } for key := range GetTranslationSets() { if key == configLanguage { return NewTranslationSet(log, configLanguage), nil } } return NewTranslationSet(log, "en"), errors.New("Language not found: " + configLanguage) } func NewTranslationSet(log *logrus.Entry, language string) *TranslationSet { log.Info("language: " + language) baseSet := englishSet() for languageCode, translationSet := range GetTranslationSets() { if strings.HasPrefix(language, languageCode) { _ = mergo.Merge(&baseSet, translationSet, mergo.WithOverride) } } return &baseSet } // GetTranslationSets gets all the translation sets, keyed by language code func GetTranslationSets() map[string]TranslationSet { return map[string]TranslationSet{ "pl": polishSet(), "nl": dutchSet(), "de": germanSet(), "tr": turkishSet(), "en": englishSet(), "fr": frenchSet(), "zh": chineseSet(), "es": spanishSet(), "pt": portugueseSet(), } } // detectLanguage extracts user language from environment func detectLanguage(langDetector func() (string, error)) string { if userLang, err := langDetector(); err == nil { return userLang } return "C" } ================================================ FILE: pkg/i18n/polish.go ================================================ package i18n func polishSet() TranslationSet { return TranslationSet{ PruningStatus: "czyszczenie", RemovingStatus: "usuwanie", RestartingStatus: "restartowanie", StoppingStatus: "zatrzymywanie", RunningCustomCommandStatus: "uruchamianie własnej komendty", NoViewMachingNewLineFocusedSwitchStatement: "Żaden widok nie odpowiada instrukcji przełączenia newLineFocused", ErrorOccurred: "Wystąpił błąd! Proszę go zgłosić na https://github.com/jesseduffield/lazydocker/issues", ConnectionFailed: "Błąd połączenia z Dockerem. Być może należy go zrestartować.", UnattachableContainerError: "Kontener nie obsługuje przyczepiania (attach). Musisz albo użyć flag '-it', albo `stdin_open: true, tty: true` w pliku docker-compose.yml.", CannotAttachStoppedContainerError: "Nie można przyczepić się do zatrzymanego kontenera, należy go najpierw uruchomić (co można wykonać wciskając przycisk 'r')", CannotAccessDockerSocketError: "Nie udało się uzyskać dostępu do unix:///var/run/docker.sock\nUruchom program jako root lub przeczytaj https://docs.docker.com/install/linux/linux-postinstall/", Donate: "Dotacja", Confirm: "Potwierdź", Return: "powrót", FocusMain: "skup na głównym panelu", Navigate: "nawigowanie", Execute: "wykonaj", Close: "zamknij", Menu: "menu", MenuTitle: "Menu", Scroll: "przewiń", OpenConfig: "otwórz konfigurację", EditConfig: "edytuj konfigurację", Cancel: "anuluj", Remove: "usuń", ForceRemove: "usuń siłą", RemoveWithVolumes: "usuń z wolumenami", RemoveService: "usuń kontenery", Stop: "zatrzymaj", Restart: "restartuj", Rebuild: "przebuduj", Recreate: "odtwórz", PreviousContext: "poprzednia zakładka", NextContext: "następna zakładka", Attach: "przyczep", ViewLogs: "pokaż logi", RemoveImage: "usuń obraz", RemoveVolume: "usuń wolumen", RemoveNetwork: "usuń sieci", RemoveWithoutPrune: "usuń bez kasowania nieoznaczonych rodziców", PruneContainers: "wyczyść kontenery", PruneVolumes: "wyczyść nieużywane wolumeny", PruneNetworks: "wyczyść nieużywane sieci", PruneImages: "wyczyść nieużywane obrazy", ViewRestartOptions: "pokaż opcje restartu", RunCustomCommand: "wykonaj predefiniowaną własną komende", GlobalTitle: "Globalne", MainTitle: "Główne", ProjectTitle: "Projekt", ServicesTitle: "Serwisy", ContainersTitle: "Kontenery", StandaloneContainersTitle: "Kontenery samodzielne", ImagesTitle: "Obrazy", VolumesTitle: "Wolumeny", NetworksTitle: "Sieci", CustomCommandTitle: "Własna komenda:", ErrorTitle: "Błąd", LogsTitle: "Logi", ConfigTitle: "Konfiguracja", EnvTitle: "Env", DockerComposeConfigTitle: "Konfiguracja docker-compose", TopTitle: "Top", StatsTitle: "Staty", CreditsTitle: "O", ContainerConfigTitle: "Konfiguracja kontenera", ContainerEnvTitle: "Container Env", NothingToDisplay: "Nothing to display", CannotDisplayEnvVariables: "Something went wrong while displaying environment variables", NoContainers: "Brak kontenerów", NoContainer: "Brak kontenera", NoImages: "Brak obrazów", NoVolumes: "Brak wolumenów", NoNetworks: "Brak sieci", ConfirmQuit: "Na pewno chcesz wyjść?", MustForceToRemoveContainer: "Nie możesz usunąć uruchomionego kontenera dopóki nie zrobisz tego siłą. Chcesz wykonać to z siłą?", NotEnoughSpace: "Niedostateczna ilość miejsca do wyświetlenia paneli", ConfirmPruneImages: "Na pewno wyczyścić wszystkie nieużywane obrazy?", ConfirmPruneContainers: "Na pewno wyczyścić wszystkie nieuruchomione kontenery?", ConfirmPruneVolumes: "Na pewno wyczyścić wszystkie nieużywane wolumeny?", ConfirmPruneNetworks: "Na pewno wyczyścić wszystkie nieużywane sieci?", StopService: "Na pewno zatrzymać kontenery tego serwisu?", StopContainer: "Na pewno zatrzymać ten kontener?", PressEnterToReturn: "Wciśnij enter aby powrócić do lazydockera (ten komunikat może być wyłączony w konfiguracji poprzez ustawienie `gui.returnImmediately: true`)", DetachFromContainerShortCut: "Domyślnie, aby odłączyć się od kontenera, naciśnij ctrl-p, a następnie ctrl-q", } } ================================================ FILE: pkg/i18n/portuguese.go ================================================ package i18n func portugueseSet() TranslationSet { return TranslationSet{ PruningStatus: "destruindo", RemovingStatus: "removendo", RestartingStatus: "reiniciando", StartingStatus: "iniciando", StoppingStatus: "parando", UppingServiceStatus: "subindo serviço", UppingProjectStatus: "subindo projeto", DowningStatus: "derrubando", PausingStatus: "pausando", RunningCustomCommandStatus: "executando comando personalizado", RunningBulkCommandStatus: "executando comando em massa", NoViewMachingNewLineFocusedSwitchStatement: "No view matching newLineFocused switch statement", ErrorOccurred: "Um erro ocorreu! Por favor, crie uma issue em https://github.com/jesseduffield/lazydocker/issues", ConnectionFailed: "Falha na conexão com o cliente Docker. Você pode precisar reiniciar o seu cliente Docker", UnattachableContainerError: "O contêiner não suporta anexação. Você deve executar o serviço com a flag '-it' ou usar `stdin_open: true, tty: true` no arquivo docker-compose.yml", WaitingForContainerInfo: "Não é possível prosseguir até que o Docker forneça mais informações sobre o contêiner. Por favor, tente novamente em alguns momentos.", CannotAttachStoppedContainerError: "Você não pode anexar a um contêiner parado, você precisa iniciá-lo primeiro (o que você pode fazer com a tecla 'r') (sim, sou preguiçoso demais para fazer isso automaticamente para você) (aliás, bem legal que eu posso me comunicar diretamente com você na forma de uma mensagem de erro)", CannotAccessDockerSocketError: "Não é possível acessar o sôquete docker em: unix:///var/run/docker.sock\nExecute o lazydocker como root ou leia https://docs.docker.com/install/linux/linux-postinstall/", CannotKillChildError: "Três segundos foram esperarados para que os processos filhos parassem. Pode haver um processo órfão que continua em execução em seu sistema.", Donate: "Doar", Confirm: "Confirmar", Return: "retornar", FocusMain: "focar no painel principal", LcFilter: "filtrar lista", Navigate: "navegar", Execute: "executar", Close: "fechar", Quit: "sair", Menu: "menu", MenuTitle: "Menu", Scroll: "rolar", OpenConfig: "abrir configuração do lazydocker", EditConfig: "editar configuração do lazydocker", Cancel: "cancelar", Remove: "remover", HideStopped: "ocultar/mostrar contêineres parados", ForceRemove: "forçar remoção", RemoveWithVolumes: "remover com volumes", RemoveService: "remover contêineres", UpService: "subir serviço", Stop: "parar", Pause: "pausar", Restart: "reiniciar", Down: "derrubar projeto", DownWithVolumes: "derrubar projetos com volumes", Start: "iniciar", Rebuild: "reconstuir", Recreate: "recriar", PreviousContext: "aba anterior", NextContext: "próxima aba", Attach: "anexar", ViewLogs: "ver logs", UpProject: "subir projeto", DownProject: "derrubar projeto", RemoveImage: "remover imagem", RemoveVolume: "remover volume", RemoveNetwork: "remover rede", RemoveWithoutPrune: "remover sem deletar pais não etiquetados", RemoveWithoutPruneWithForce: "remover (forçado) sem deletar pais não etiquetados", RemoveWithForce: "remover (forçado)", PruneContainers: "destruir contêineres encerrados", PruneVolumes: "destruir volumes não utilizados", PruneNetworks: "destruir redes não utilizadas", PruneImages: "destruir imagens não utilizadas", StopAllContainers: "parar todos os contêineres", RemoveAllContainers: "remover todos os contêineres (forçado)", ViewRestartOptions: "ver opções de reinício", ExecShell: "executar shell", RunCustomCommand: "executar comando personalizado predefinido", ViewBulkCommands: "ver comandos em massa", FilterList: "filtrar lista", OpenInBrowser: "abrir no navegador (primeira porta é http)", SortContainersByState: "ordenar contêineres por estado", GlobalTitle: "Global", MainTitle: "Principal", ProjectTitle: "Projeto", ServicesTitle: "Serviços", ContainersTitle: "Contêineres", StandaloneContainersTitle: "Contêineres Avulsos", ImagesTitle: "Imagens", VolumesTitle: "Volumes", NetworksTitle: "Redes", CustomCommandTitle: "Comando Personalizado:", BulkCommandTitle: "Comando em Massa:", ErrorTitle: "Erro", LogsTitle: "Registros", ConfigTitle: "Config", EnvTitle: "Env", DockerComposeConfigTitle: "Docker-Compose Config", TopTitle: "Topo", StatsTitle: "Estatísticas", CreditsTitle: "Sobre", ContainerConfigTitle: "Configuração do Contêiner", ContainerEnvTitle: "Contêiner Env", NothingToDisplay: "Nada a exibir", NoContainerForService: "Nenhum log para exibir; o serviço não está associado a nenhum contêiner", CannotDisplayEnvVariables: "Algo deu errado ao exibir as variáveis de ambiente", NoContainers: "Sem contêineres", NoContainer: "Sem contêiner", NoImages: "Sem imagens", NoVolumes: "Sem volumes", NoNetworks: "Sem redes", NoServices: "Sem serviços", ConfirmQuit: "Tem certeza que deseja sair?", ConfirmUpProject: "Tem certeza que deseja 'iniciar' seu projeto docker compose?", MustForceToRemoveContainer: "Você não pode remover um contêiner em execução a menos que o force. Deseja forçar?", NotEnoughSpace: "Sem espaço suficiente para renderizar os painéis", ConfirmPruneImages: "Tem certeza que deseja eliminar todas as imagens não utilizadas?", ConfirmPruneContainers: "Tem certeza que deseja destruir todos os contêineres parados?", ConfirmStopContainers: "Tem certeza que deseja parar todos os contêineres?", ConfirmRemoveContainers: "Tem certeza que deseja remover todos os contêineres?", ConfirmPruneVolumes: "Tem certeza que deseja destruir todos os volumes não utilizados?", ConfirmPruneNetworks: "Tem certeza que deseja destruir todas as redes não utilizadas?", StopService: "Tem certeza que deseja parar os contêineres deste serviço?", StopContainer: "Tem certeza que deseja parar este contêiner?", PressEnterToReturn: "Pressione enter para retornar ao lazydocker (este prompt pode ser desativado em sua configuração definindo `gui.returnImmediately: true`)", DetachFromContainerShortCut: "Por padrão, para desanexar do contêiner, pressione ctrl-p e depois ctrl-q", No: "não", Yes: "sim", LcNextScreenMode: "modo de tela seguinte (normal/meia/tela cheia)", LcPrevScreenMode: "modo de tela anterior", FilterPrompt: "filtro", } } ================================================ FILE: pkg/i18n/spanish.go ================================================ package i18n func spanishSet() TranslationSet { return TranslationSet{ PruningStatus: "limpiando", RemovingStatus: "eliminando", RestartingStatus: "reiniciando", StartingStatus: "iniciando", StoppingStatus: "terminando", UppingServiceStatus: "levantando servicio", UppingProjectStatus: "levantando proyecto", DowningStatus: "dando de baja", PausingStatus: "pausando", RunningCustomCommandStatus: "ejecutando comando personalizado", RunningBulkCommandStatus: "ejecutando comando masivo", ErrorOccurred: "¡Hubo un error! Por favor crea un issue en https://github.com/jesseduffield/lazydocker/issues", ConnectionFailed: "Falló la conexión con el docker client. Quizá necesitas reiniciar tu docker client", UnattachableContainerError: "Container does not support attaching. You must either run the service with the '-it' flag or use `stdin_open: true, tty: true` in the docker-compose.yml file", WaitingForContainerInfo: "No podemos proceder hasta que docker nos de más información sobre el contenedor. Inténtalo otra vez en unos segundos.", CannotAccessDockerSocketError: "No es posible acceder al docker socket en: unix:///var/run/docker.sock\nEjecuta lazydocker como root o lee https://docs.docker.com/install/linux/linux-postinstall/", CannotKillChildError: "Esperamos tres segundos a que el proceso hijo se detenga. Debe de haber un proceso huérfano que continua activo en tu sistema.", Donate: "Donar", Confirm: "Confirmar", Return: "regresar", FocusMain: "enfocar panel principal", LcFilter: "filtrar lista", Navigate: "navegar", Execute: "ejecutar", Close: "cerrar", Quit: "salir", Menu: "menú", MenuTitle: "Menú", OpenConfig: "abrir configuración de lazydocker", EditConfig: "editar configuración de lazydocker", Cancel: "cancelar", Remove: "borrar", HideStopped: "esconder/mostrar contenedores parados", ForceRemove: "borrar(forzado)", RemoveWithVolumes: "borrar con volúmenes", RemoveService: "borrar contenedores", UpService: "levantar servicio", Stop: "parar", Pause: "pausa", Restart: "reiniciar", Down: "bajar proyecto", DownWithVolumes: "bajar proyecto con volúmenes", Start: "iniciar", Rebuild: "recompilar", Recreate: "recrear", PreviousContext: "anterior pestaña", NextContext: "siguiente pestaña", ViewLogs: "ver logs", UpProject: "levantar proyecto", DownProject: "dar de baja el proyecto", RemoveImage: "limpiar imagen", RemoveVolume: "limpiar volúmen", RemoveNetwork: "limpiar red", RemoveWithoutPrune: "limpiar sin borrar padres sin etiqueta", RemoveWithoutPruneWithForce: "limpiar (forzado) sin borrar padres sin etiqueta", RemoveWithForce: "limpiar (forzado)", PruneContainers: "limpiar contenedores finalizados", PruneVolumes: "limpiar volúmenes sin usar", PruneNetworks: "limpiar redes sin usar", PruneImages: "limpiar imágenes sin usar", StopAllContainers: "detener todos los contenedores", RemoveAllContainers: "borrar todos los contenedores (forzado)", ViewRestartOptions: "ver opciones de reinicio", ExecShell: "ejecutar shell", RunCustomCommand: "ejecutar comando personalizado", ViewBulkCommands: "ver comandos masivos", FilterList: "filtar list", OpenInBrowser: "abrir en navegador (first port is http)", SortContainersByState: "ordenar contenedores por estado", GlobalTitle: "Global", MainTitle: "Inicio", ProjectTitle: "Proyecto", ServicesTitle: "Servicios", ContainersTitle: "Contenedores", StandaloneContainersTitle: "Contenedores independientes", ImagesTitle: "Imágenes", VolumesTitle: "Volúmenes", NetworksTitle: "Redes", CustomCommandTitle: "Comando personalizado:", BulkCommandTitle: "Comando masivo:", ErrorTitle: "Error", LogsTitle: "Logs", ConfigTitle: "Configuración", EnvTitle: "Variables de entorno", DockerComposeConfigTitle: "Docker-Compose Config", TopTitle: "Top", StatsTitle: "Estadísticas", CreditsTitle: "Acerca", ContainerConfigTitle: "Configuración", ContainerEnvTitle: "Variables de entorno", NothingToDisplay: "Nada que mostrar", NoContainerForService: "No hay logs que mostrar; el servicio no está asociado con un contenedor", CannotDisplayEnvVariables: "Algo salió mal mientras se mostraban las variables de entorno", NoContainers: "Sin contenedores", NoContainer: "Sin contenedor", NoImages: "Sin imágenes", NoVolumes: "Sin volúmenes", NoNetworks: "Sin redes", NoServices: "Sin servicios", ConfirmQuit: "¿Realmente quieres salir?", ConfirmUpProject: "¿Realmente quieres levantar tu proyecto docker compose?", MustForceToRemoveContainer: "No puedes borrar un contenedor en ejecución a menos de que lo fuerces, ¿quieres hacerlo?", NotEnoughSpace: "No hay suficiente espacio para renderizar los paneles", ConfirmPruneImages: "¿Realmente quieres limpiar todas tus imágenes?", ConfirmPruneContainers: "¿Realmente quieres limpiar todos los contenedores finalizados?", ConfirmStopContainers: "¿Realmente quieres detener todos los contenedores?", ConfirmRemoveContainers: "¿Realmente quieres borrar todos los contenedores?", ConfirmPruneVolumes: "¿Realmente quieres limpiar todos los vólumenes sin usar?", ConfirmPruneNetworks: "¿Realmente quieres limpiar todas las redes sin usar?", StopService: "¿Realmente quieres detener los contenedores de este servicio?", StopContainer: "¿Realmente quieres detener este contenedor?", PressEnterToReturn: "Presionar [enter] para volver a lazydocker (este mensaje puede ser desactivado en tu configuración poniendo `gui.returnImmediately: true`)", No: "no", Yes: "sí", FilterPrompt: "filtrar", } } ================================================ FILE: pkg/i18n/turkish.go ================================================ package i18n func turkishSet() TranslationSet { return TranslationSet{ PruningStatus: "temizleniyor", RemovingStatus: "kaldırılıyor", RestartingStatus: "yeniden başlatılıyor", StoppingStatus: "durduruluyor", RunningCustomCommandStatus: "özel komut çalıştır", NoViewMachingNewLineFocusedSwitchStatement: "NewLineFocused anahtar deyimi ile eşleşen görünüm yok", ErrorOccurred: "Bir hata oluştu! Lütfen https://github.com/jesseduffield/lazydocker/issues adresinden bir hataya ilişkin konu oluşturun", ConnectionFailed: "Docker bağlantısı başarısız oldu. Docker' ı yeniden başlatmanız gerekebilir", UnattachableContainerError: "Konteyner attaching modunda çalışmayı desteklemiyor. Hizmeti '-it' opsiyonu ile çalıştırmanız veya docker-compose.yml dosyasında `stdin_open: true, tty: true` kullanmanız gerekir.", CannotAttachStoppedContainerError: "Durdurulan konteynera bağlanamazsınız, ilk önce başlatmanız gerekir (aslında başlatmayı r tuşu ile yapabilirsiniz) (evet, senin için bunu otomatik olarak yapabilirim fakat çok tembelim) (hata mesajı ile seninle birebir iletişim kurmam çok daha güzel)", CannotAccessDockerSocketError: "Docker' a şu adresten erişilemiyor : unix:///var/run/docker.sock\n lazydocker' ı root(kök kullanıcı) olarak çalıştır veya şu adresteki adımları takip et : https://docs.docker.com/install/linux/linux-postinstall/", Donate: "Bağış", Confirm: "Onayla", Return: "dönüş", FocusMain: "ana panele odaklan", Navigate: "gezin", Execute: "çalıştır", Close: "kapat", Menu: "menü", MenuTitle: "Menü", Scroll: "kaydır", OpenConfig: "lazydocker ayarlarını aç", EditConfig: "lazzydocker ayarlarını düzenle", Cancel: "iptal", Remove: "kaldır", ForceRemove: "kaldırmaya zorla", RemoveWithVolumes: "alanları ile birlikte kaldır", RemoveService: "konteynerleri kaldır", Stop: "durdur", Restart: "yeniden başlat", Rebuild: "yeniden yapılandır", Recreate: "yeniden oluştur", PreviousContext: "önceki sekme", NextContext: "sonraki sekme", Attach: "bağlan/iliştir", ViewLogs: "kayıt defterini görüntüle", RemoveImage: "imajı kaldır", RemoveVolume: "alanı kaldır", RemoveNetwork: "ağı kaldır", RemoveWithoutPrune: "etkisiz ebeveynleri silmeden kaldır", PruneContainers: "çalışmayan konteynerleri temizle", PruneVolumes: "kullanılmayan alanları temizle", PruneNetworks: "kullanılmayan ağları temizle", PruneImages: "kullanılmayan imajları temizle", ViewRestartOptions: "yeniden başlatma seçeneklerini görüntüle", RunCustomCommand: "önceden tanımlanmış özel komutu çalıştır", GlobalTitle: "Global", MainTitle: "Ana", ProjectTitle: "Proje", ServicesTitle: "Servisler", ContainersTitle: "Konteynerler", StandaloneContainersTitle: "Bağımsız Konteynerler", ImagesTitle: "Imajlar", VolumesTitle: "Alanlar", NetworksTitle: "Ağları", CustomCommandTitle: "Özel Komut:", ErrorTitle: "Hata", LogsTitle: "Kayitlar", ConfigTitle: "Ayarlar", EnvTitle: "Env", DockerComposeConfigTitle: "Docker-Compose Ayar", TopTitle: "Top", StatsTitle: "Durumlar", CreditsTitle: "Hakkinda", ContainerConfigTitle: "Konteyner Ayar", ContainerEnvTitle: "Konteyner Env", NothingToDisplay: "Nothing to display", CannotDisplayEnvVariables: "Something went wrong while displaying environment variables", NoContainers: "Konteynerler yok", NoContainer: "Konteyner yok", NoImages: "Imajlar yok", NoVolumes: "Alanlar yok", NoNetworks: "Ağları yok", ConfirmQuit: "Çıkmak istediğine emin misin?", MustForceToRemoveContainer: "Zorlamadan çalışan bir konteyneri kaldıramazsınız. Zorlamak ister misin?", NotEnoughSpace: "Panelleri oluşturmak için yeterli alan yok", ConfirmPruneImages: "Kullanılmayan tüm görüntüleri temizlemek istediğinize emin misiniz?", ConfirmPruneContainers: "Durdurulan tüm konteynerları temizlemek istediğinizden emin misiniz?", ConfirmPruneVolumes: "Kullanılmayan tüm alanları temizlemek istediğinizden emin misiniz?", ConfirmPruneNetworks: "Kullanılmayan tüm ağları temizlemek istediğinizden emin misiniz?", StopService: "Bu servisin konteynerlerini durdurmak istediğinize emin misiniz?", StopContainer: "Bu konteyneri durdurmak istediğinize emin misiniz?", PressEnterToReturn: "lazydocker' a geri dönmek için enter tuşuna basın ( Bu uyarı, `gui.return Immediately: true` ayarıyla devre dışı bırakılabilir)", DetachFromContainerShortCut: "Varsayılan olarak, kaptan ayırmak için ctrl-p ve ardından ctrl-q tuşlarına basın", } } ================================================ FILE: pkg/log/log.go ================================================ package log import ( "fmt" "io" "os" "path/filepath" "github.com/jesseduffield/lazydocker/pkg/config" "github.com/sirupsen/logrus" ) // NewLogger returns a new logger func NewLogger(config *config.AppConfig, rollrusHook string) *logrus.Entry { var log *logrus.Logger if config.Debug || os.Getenv("DEBUG") == "TRUE" { log = newDevelopmentLogger(config) } else { log = newProductionLogger() } // highly recommended: tail -f development.log | humanlog // https://github.com/aybabtme/humanlog log.Formatter = &logrus.JSONFormatter{} return log.WithFields(logrus.Fields{ "debug": config.Debug, "version": config.Version, "commit": config.Commit, "buildDate": config.BuildDate, }) } func getLogLevel() logrus.Level { strLevel := os.Getenv("LOG_LEVEL") level, err := logrus.ParseLevel(strLevel) if err != nil { return logrus.DebugLevel } return level } func newDevelopmentLogger(config *config.AppConfig) *logrus.Logger { log := logrus.New() log.SetLevel(getLogLevel()) file, err := os.OpenFile(filepath.Join(config.ConfigDir, "development.log"), os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0o666) if err != nil { fmt.Println("unable to log to file") os.Exit(1) } log.SetOutput(file) return log } func newProductionLogger() *logrus.Logger { log := logrus.New() log.Out = io.Discard log.SetLevel(logrus.ErrorLevel) return log } ================================================ FILE: pkg/tasks/tasks.go ================================================ package tasks import ( "context" "fmt" "time" "github.com/jesseduffield/lazydocker/pkg/i18n" "github.com/sasha-s/go-deadlock" "github.com/sirupsen/logrus" ) type TaskManager struct { currentTask *Task waitingMutex deadlock.Mutex taskIDMutex deadlock.Mutex Log *logrus.Entry Tr *i18n.TranslationSet newTaskId int } type Task struct { ctx context.Context cancel context.CancelFunc stopped bool stopMutex deadlock.Mutex notifyStopped chan struct{} Log *logrus.Entry f func(ctx context.Context) } type TaskFunc func(ctx context.Context) func NewTaskManager(log *logrus.Entry, translationSet *i18n.TranslationSet) *TaskManager { return &TaskManager{Log: log, Tr: translationSet} } // Close closes the task manager, killing whatever task may currently be running func (t *TaskManager) Close() { if t.currentTask == nil { return } c := make(chan struct{}, 1) go func() { t.currentTask.Stop() c <- struct{}{} }() select { case <-c: return case <-time.After(3 * time.Second): fmt.Println(t.Tr.CannotKillChildError) } } func (t *TaskManager) NewTask(f func(ctx context.Context)) error { go func() { t.taskIDMutex.Lock() t.newTaskId++ taskID := t.newTaskId t.taskIDMutex.Unlock() t.waitingMutex.Lock() defer t.waitingMutex.Unlock() t.taskIDMutex.Lock() if taskID < t.newTaskId { t.taskIDMutex.Unlock() return } t.taskIDMutex.Unlock() ctx, cancel := context.WithCancel(context.Background()) notifyStopped := make(chan struct{}) if t.currentTask != nil { t.Log.Info("asking task to stop") t.currentTask.Stop() t.Log.Info("task stopped") } t.currentTask = &Task{ ctx: ctx, cancel: cancel, notifyStopped: notifyStopped, Log: t.Log, f: f, } go func() { f(ctx) t.Log.Info("returned from function, closing notifyStopped") close(notifyStopped) }() }() return nil } func (t *Task) Stop() { t.stopMutex.Lock() defer t.stopMutex.Unlock() if t.stopped { return } t.cancel() t.Log.Info("closed stop channel, waiting for notifyStopped message") <-t.notifyStopped t.Log.Info("received notifystopped message") t.stopped = true } // NewTickerTask is a convenience function for making a new task that repeats some action once per e.g. second // the before function gets called after the lock is obtained, but before the ticker starts. // if you handle a message on the stop channel in f() you need to send a message on the notifyStopped channel because returning is not sufficient. Here, unlike in a regular task, simply returning means we're now going to wait till the next tick to run again. func (t *TaskManager) NewTickerTask(duration time.Duration, before func(ctx context.Context), f func(ctx context.Context, notifyStopped chan struct{})) error { notifyStopped := make(chan struct{}, 10) return t.NewTask(func(ctx context.Context) { if before != nil { before(ctx) } tickChan := time.NewTicker(duration) defer tickChan.Stop() // calling f first so that we're not waiting for the first tick f(ctx, notifyStopped) for { select { case <-notifyStopped: t.Log.Info("exiting ticker task due to notifyStopped channel") return case <-ctx.Done(): t.Log.Info("exiting ticker task due to stopped cahnnel") return case <-tickChan.C: t.Log.Info("running ticker task again") f(ctx, notifyStopped) } } }) } ================================================ FILE: pkg/utils/utils.go ================================================ package utils import ( "bytes" "encoding/json" "fmt" "html/template" "io" "math" "regexp" "sort" "strings" "time" "github.com/go-errors/errors" "github.com/jesseduffield/gocui" "github.com/mattn/go-runewidth" // "github.com/jesseduffield/yaml" "github.com/fatih/color" "github.com/goccy/go-yaml" "github.com/goccy/go-yaml/lexer" "github.com/goccy/go-yaml/printer" ) // SplitLines takes a multiline string and splits it on newlines // currently we are also stripping \r's which may have adverse effects for // windows users (but no issues have been raised yet) func SplitLines(multilineString string) []string { multilineString = strings.Replace(multilineString, "\r", "", -1) if multilineString == "" || multilineString == "\n" { return make([]string, 0) } lines := strings.Split(multilineString, "\n") if lines[len(lines)-1] == "" { return lines[:len(lines)-1] } return lines } // WithPadding pads a string as much as you want func WithPadding(str string, padding int) string { uncoloredStr := Decolorise(str) if padding < runewidth.StringWidth(uncoloredStr) { return str } return str + strings.Repeat(" ", padding-runewidth.StringWidth(uncoloredStr)) } // ColoredString takes a string and a colour attribute and returns a colored // string with that attribute func ColoredString(str string, colorAttribute color.Attribute) string { // fatih/color does not have a color.Default attribute, so unless we fork that repo the only way for us to express that we don't want to color a string different to the terminal's default is to not call the function in the first place, but that's annoying when you want a streamlined code path. Because I'm too lazy to fork the repo right now, we'll just assume that by FgWhite you really mean Default, for the sake of supporting users with light themed terminals. if colorAttribute == color.FgWhite { return str } colour := color.New(colorAttribute) return ColoredStringDirect(str, colour) } // ColoredYamlString takes an YAML formatted string and returns a colored string // with colors hardcoded as: // keys: cyan // Booleans: magenta // Numbers: yellow // Strings: green func ColoredYamlString(str string) string { format := func(attr color.Attribute) string { return fmt.Sprintf("%s[%dm", "\x1b", attr) } tokens := lexer.Tokenize(str) var p printer.Printer p.Bool = func() *printer.Property { return &printer.Property{ Prefix: format(color.FgMagenta), Suffix: format(color.Reset), } } p.Number = func() *printer.Property { return &printer.Property{ Prefix: format(color.FgYellow), Suffix: format(color.Reset), } } p.MapKey = func() *printer.Property { return &printer.Property{ Prefix: format(color.FgCyan), Suffix: format(color.Reset), } } p.String = func() *printer.Property { return &printer.Property{ Prefix: format(color.FgGreen), Suffix: format(color.Reset), } } return p.PrintTokens(tokens) } // MultiColoredString takes a string and an array of colour attributes and returns a colored // string with those attributes func MultiColoredString(str string, colorAttribute ...color.Attribute) string { colour := color.New(colorAttribute...) return ColoredStringDirect(str, colour) } // ColoredStringDirect used for aggregating a few color attributes rather than // just sending a single one func ColoredStringDirect(str string, colour *color.Color) string { return colour.SprintFunc()(fmt.Sprint(str)) } // NormalizeLinefeeds - Removes all Windows and Mac style line feeds func NormalizeLinefeeds(str string) string { str = strings.Replace(str, "\r\n", "\n", -1) str = strings.Replace(str, "\r", "", -1) return str } // Loader dumps a string to be displayed as a loader func Loader() string { characters := "|/-\\" now := time.Now() nanos := now.UnixNano() index := nanos / 50000000 % int64(len(characters)) return characters[index : index+1] } // ResolvePlaceholderString populates a template with values func ResolvePlaceholderString(str string, arguments map[string]string) string { for key, value := range arguments { str = strings.Replace(str, "{{"+key+"}}", value, -1) } return str } // Max returns the maximum of two integers func Max(x, y int) int { if x > y { return x } return y } // RenderTable takes an array of string arrays and returns a table containing the values func RenderTable(rows [][]string) (string, error) { if len(rows) == 0 { return "", nil } if !displayArraysAligned(rows) { return "", errors.New("Each item must return the same number of strings to display") } columnPadWidths := getPadWidths(rows) paddedDisplayRows := getPaddedDisplayStrings(rows, columnPadWidths) return strings.Join(paddedDisplayRows, "\n"), nil } // Decolorise strips a string of color func Decolorise(str string) string { re := regexp.MustCompile(`\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mK]`) return re.ReplaceAllString(str, "") } func getPadWidths(rows [][]string) []int { if len(rows[0]) <= 1 { return []int{} } columnPadWidths := make([]int, len(rows[0])-1) for i := range columnPadWidths { for _, cells := range rows { uncoloredCell := Decolorise(cells[i]) if runewidth.StringWidth(uncoloredCell) > columnPadWidths[i] { columnPadWidths[i] = runewidth.StringWidth(uncoloredCell) } } } return columnPadWidths } func getPaddedDisplayStrings(rows [][]string, columnPadWidths []int) []string { paddedDisplayRows := make([]string, len(rows)) for i, cells := range rows { for j, columnPadWidth := range columnPadWidths { paddedDisplayRows[i] += WithPadding(cells[j], columnPadWidth) + " " } paddedDisplayRows[i] += cells[len(columnPadWidths)] } return paddedDisplayRows } // displayArraysAligned returns true if every string array returned from our // list of displayables has the same length func displayArraysAligned(stringArrays [][]string) bool { for _, strings := range stringArrays { if len(strings) != len(stringArrays[0]) { return false } } return true } func FormatBinaryBytes(b int) string { n := float64(b) units := []string{"B", "kiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"} for _, unit := range units { if n > math.Pow(2, 10) { n /= math.Pow(2, 10) } else { val := fmt.Sprintf("%.2f%s", n, unit) if val == "0.00B" { return "0B" } return val } } return "a lot" } func FormatDecimalBytes(b int) string { n := float64(b) units := []string{"B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"} for _, unit := range units { if n > math.Pow(10, 3) { n /= math.Pow(10, 3) } else { val := fmt.Sprintf("%.2f%s", n, unit) if val == "0.00B" { return "0B" } return val } } return "a lot" } func ApplyTemplate(str string, object interface{}) string { var buf bytes.Buffer _ = template.Must(template.New("").Parse(str)).Execute(&buf, object) return buf.String() } // GetGocuiAttribute gets the gocui color attribute from the string func GetGocuiAttribute(key string) gocui.Attribute { colorMap := map[string]gocui.Attribute{ "default": gocui.ColorDefault, "black": gocui.ColorBlack, "red": gocui.ColorRed, "green": gocui.ColorGreen, "yellow": gocui.ColorYellow, "blue": gocui.ColorBlue, "magenta": gocui.ColorMagenta, "cyan": gocui.ColorCyan, "white": gocui.ColorWhite, "bold": gocui.AttrBold, "reverse": gocui.AttrReverse, "underline": gocui.AttrUnderline, } value, present := colorMap[key] if present { return value } return gocui.ColorDefault } // GetColorAttribute gets the color attribute from the string func GetColorAttribute(key string) color.Attribute { colorMap := map[string]color.Attribute{ "default": color.FgWhite, "black": color.FgBlack, "red": color.FgRed, "green": color.FgGreen, "yellow": color.FgYellow, "blue": color.FgBlue, "magenta": color.FgMagenta, "cyan": color.FgCyan, "white": color.FgWhite, "bold": color.Bold, "underline": color.Underline, } value, present := colorMap[key] if present { return value } return color.FgWhite } // WithShortSha returns a command but with a shorter SHA. in the terminal we're all used to 10 character SHAs but under the hood they're actually 64 characters long. No need including all the characters when we're just displaying a command func WithShortSha(str string) string { split := strings.Split(str, " ") for i, word := range split { // good enough proxy for now if len(word) == 64 { split[i] = word[0:10] } } return strings.Join(split, " ") } // FormatMapItem is for displaying items in a map func FormatMapItem(padding int, k string, v interface{}) string { return fmt.Sprintf("%s%s %v\n", strings.Repeat(" ", padding), ColoredString(k+":", color.FgYellow), fmt.Sprintf("%v", v)) } // FormatMap is for displaying a map func FormatMap(padding int, m map[string]string) string { if len(m) == 0 { return "none\n" } output := "\n" keys := make([]string, 0, len(m)) for key := range m { keys = append(keys, key) } sort.Strings(keys) for _, key := range keys { output += FormatMapItem(padding, key, m[key]) } return output } type multiErr []error func (m multiErr) Error() string { var b bytes.Buffer b.WriteString("encountered multiple errors:") for _, err := range m { b.WriteString("\n\t... " + err.Error()) } return b.String() } func CloseMany(closers []io.Closer) error { errs := make([]error, 0, len(closers)) for _, c := range closers { err := c.Close() if err != nil { errs = append(errs, err) } } if len(errs) > 0 { return multiErr(errs) } return nil } func SafeTruncate(str string, limit int) string { if len(str) > limit { return str[0:limit] } else { return str } } func IsValidHexValue(v string) bool { if len(v) != 4 && len(v) != 7 { return false } if v[0] != '#' { return false } for _, char := range v[1:] { switch char { case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'A', 'B', 'C', 'D', 'E', 'F': continue default: return false } } return true } // Style used on menu items that open another menu func OpensMenuStyle(str string) string { return ColoredString(fmt.Sprintf("%s...", str), color.FgMagenta) } // MarshalIntoYaml gets any json-tagged data and marshal it into yaml saving original json structure. // Useful for structs from 3rd-party libs without yaml tags. func MarshalIntoYaml(data interface{}) ([]byte, error) { return marshalIntoFormat(data, "yaml") } func marshalIntoFormat(data interface{}, format string) ([]byte, error) { // First marshal struct->json to get the resulting structure declared by json tags dataJSON, err := json.MarshalIndent(data, "", " ") if err != nil { return nil, err } switch format { case "json": return dataJSON, err case "yaml": // Use Unmarshal->Marshal hack to convert json into yaml with the original structure preserved var dataMirror yaml.MapSlice if err := yaml.Unmarshal(dataJSON, &dataMirror); err != nil { return nil, err } return yaml.Marshal(dataMirror) default: return nil, errors.New(fmt.Sprintf("Unsupported detailization format: %s", format)) } } ================================================ FILE: pkg/utils/utils_test.go ================================================ package utils import ( "testing" "github.com/go-errors/errors" "github.com/stretchr/testify/assert" ) // TestSplitLines is a function. func TestSplitLines(t *testing.T) { type scenario struct { multilineString string expected []string } scenarios := []scenario{ { "", []string{}, }, { "\n", []string{}, }, { "hello world !\nhello universe !\n", []string{ "hello world !", "hello universe !", }, }, } for _, s := range scenarios { assert.EqualValues(t, s.expected, SplitLines(s.multilineString)) } } // TestWithPadding is a function. func TestWithPadding(t *testing.T) { type scenario struct { str string padding int expected string } scenarios := []scenario{ { "hello world !", 1, "hello world !", }, { "hello world !", 14, "hello world ! ", }, } for _, s := range scenarios { assert.EqualValues(t, s.expected, WithPadding(s.str, s.padding)) } } // TestNormalizeLinefeeds is a function. func TestNormalizeLinefeeds(t *testing.T) { type scenario struct { byteArray []byte expected []byte } scenarios := []scenario{ { // \r\n []byte{97, 115, 100, 102, 13, 10}, []byte{97, 115, 100, 102, 10}, }, { // bash\r\nblah []byte{97, 115, 100, 102, 13, 10, 97, 115, 100, 102}, []byte{97, 115, 100, 102, 10, 97, 115, 100, 102}, }, { // \r []byte{97, 115, 100, 102, 13}, []byte{97, 115, 100, 102}, }, { // \n []byte{97, 115, 100, 102, 10}, []byte{97, 115, 100, 102, 10}, }, } for _, s := range scenarios { assert.EqualValues(t, string(s.expected), NormalizeLinefeeds(string(s.byteArray))) } } // TestResolvePlaceholderString is a function. func TestResolvePlaceholderString(t *testing.T) { type scenario struct { templateString string arguments map[string]string expected string } scenarios := []scenario{ { "", map[string]string{}, "", }, { "hello", map[string]string{}, "hello", }, { "hello {{arg}}", map[string]string{}, "hello {{arg}}", }, { "hello {{arg}}", map[string]string{"arg": "there"}, "hello there", }, { "hello", map[string]string{"arg": "there"}, "hello", }, { "{{nothing}}", map[string]string{"nothing": ""}, "", }, { "{{}} {{ this }} { should not throw}} an {{{{}}}} error", map[string]string{ "blah": "blah", "this": "won't match", }, "{{}} {{ this }} { should not throw}} an {{{{}}}} error", }, } for _, s := range scenarios { assert.EqualValues(t, s.expected, ResolvePlaceholderString(s.templateString, s.arguments)) } } // TestDisplayArraysAligned is a function. func TestDisplayArraysAligned(t *testing.T) { type scenario struct { input [][]string expected bool } scenarios := []scenario{ { [][]string{{"", ""}, {"", ""}}, true, }, { [][]string{{""}, {"", ""}}, false, }, } for _, s := range scenarios { assert.EqualValues(t, s.expected, displayArraysAligned(s.input)) } } // TestGetPaddedDisplayStrings is a function. func TestGetPaddedDisplayStrings(t *testing.T) { type scenario struct { stringArrays [][]string padWidths []int expected []string } scenarios := []scenario{ { [][]string{{"a", "b"}, {"c", "d"}}, []int{1}, []string{"a b", "c d"}, }, } for _, s := range scenarios { assert.EqualValues(t, s.expected, getPaddedDisplayStrings(s.stringArrays, s.padWidths)) } } // TestGetPadWidths is a function. func TestGetPadWidths(t *testing.T) { type scenario struct { stringArrays [][]string expected []int } scenarios := []scenario{ { [][]string{{""}, {""}}, []int{}, }, { [][]string{{"a"}, {""}}, []int{}, }, { [][]string{{"aa", "b", "ccc"}, {"c", "d", "e"}}, []int{2, 1}, }, } for _, s := range scenarios { assert.EqualValues(t, s.expected, getPadWidths(s.stringArrays)) } } func TestRenderTable(t *testing.T) { type scenario struct { input [][]string expected string expectedErr error } scenarios := []scenario{ { input: [][]string{{"a", "b"}, {"c", "d"}}, expected: "a b\nc d", expectedErr: nil, }, { input: [][]string{{"aaaa", "b"}, {"c", "d"}}, expected: "aaaa b\nc d", expectedErr: nil, }, { input: [][]string{{"a"}, {"c", "d"}}, expected: "", expectedErr: errors.New("Each item must return the same number of strings to display"), }, } for _, s := range scenarios { output, err := RenderTable(s.input) assert.EqualValues(t, s.expected, output) if s.expectedErr != nil { assert.EqualError(t, err, s.expectedErr.Error()) } else { assert.NoError(t, err) } } } func TestMarshalIntoFormat(t *testing.T) { type innerData struct { Foo int `json:"foo"` Bar string `json:"bar"` Baz bool `json:"baz"` } type data struct { Qux int `json:"quz"` Quux innerData `json:"quux"` } type scenario struct { input interface{} format string expected []byte expectedErr error } scenarios := []scenario{ { input: data{1, innerData{2, "foo", true}}, format: "json", expected: []byte(`{ "quz": 1, "quux": { "foo": 2, "bar": "foo", "baz": true } }`), expectedErr: nil, }, { input: data{1, innerData{2, "foo", true}}, format: "yaml", expected: []byte(`quz: 1 quux: bar: foo baz: true foo: 2 `), expectedErr: nil, }, { input: data{1, innerData{2, "foo", true}}, format: "xml", expected: nil, expectedErr: errors.New("Unsupported detailization format: xml"), }, } for _, s := range scenarios { output, err := marshalIntoFormat(s.input, s.format) assert.EqualValues(t, s.expected, output) if s.expectedErr != nil { assert.EqualError(t, err, s.expectedErr.Error()) } else { assert.NoError(t, err) } } } ================================================ FILE: scripts/bump_gocui.sh ================================================ # Go's proxy servers are not very up-to-date so that's why we use `GOPROXY=direct` # We specify the `awesome` branch to avoid the default behaviour of looking for a semver tag. GOPROXY=direct go get -u github.com/jesseduffield/gocui@awesome && go mod vendor && go mod tidy # Note to self if you ever want to fork a repo be sure to use this same approach: it's important to use the branch name (e.g. master) ================================================ FILE: scripts/bump_lazycore.sh ================================================ # Go's proxy servers are not very up-to-date so that's why we use `GOPROXY=direct` # We specify the `awesome` branch to avoid the default behaviour of looking for a semver tag. GOPROXY=direct go get -u github.com/jesseduffield/lazycore@master && go mod vendor && go mod tidy # Note to self if you ever want to fork a repo be sure to use this same approach: it's important to use the branch name (e.g. master) ================================================ FILE: scripts/cheatsheet/main.go ================================================ package main import ( "fmt" "log" "os" "github.com/jesseduffield/lazydocker/pkg/cheatsheet" ) func main() { if len(os.Args) < 2 { log.Fatal("Please provide a command: one of 'generate', 'check'") } command := os.Args[1] switch command { case "generate": cheatsheet.Generate() fmt.Printf("\nGenerated cheatsheets in %s\n", cheatsheet.GetKeybindingsDir()) case "check": cheatsheet.Check() default: log.Fatal("\nUnknown command. Expected one of 'generate', 'check'") } } ================================================ FILE: scripts/install_update_linux.sh ================================================ #!/bin/bash # allow specifying different destination directory DIR="${DIR:-"$HOME/.local/bin"}" # map different architecture variations to the available binaries ARCH=$(uname -m) case $ARCH in i386|i686) ARCH=x86 ;; armv6*) ARCH=armv6 ;; armv7*) ARCH=armv7 ;; aarch64*) ARCH=arm64 ;; esac # prepare the download URL GITHUB_LATEST_VERSION=$(curl -L -s -H 'Accept: application/json' https://github.com/jesseduffield/lazydocker/releases/latest | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/') GITHUB_FILE="lazydocker_${GITHUB_LATEST_VERSION//v/}_$(uname -s)_${ARCH}.tar.gz" GITHUB_URL="https://github.com/jesseduffield/lazydocker/releases/download/${GITHUB_LATEST_VERSION}/${GITHUB_FILE}" # install/update the local binary curl -L -o lazydocker.tar.gz $GITHUB_URL tar xzvf lazydocker.tar.gz lazydocker install -Dm 755 lazydocker -t "$DIR" rm lazydocker lazydocker.tar.gz ================================================ FILE: scripts/translations/get_required_translations.go ================================================ package main import ( "fmt" "reflect" "github.com/jesseduffield/lazydocker/pkg/i18n" ) func main() { fmt.Println(getOutstandingTranslations()) } // adapted from https://github.com/a8m/reflect-examples#read-struct-tags func getOutstandingTranslations() string { output := "" for languageCode, translationSet := range i18n.GetTranslationSets() { output += languageCode + ":\n" v := reflect.ValueOf(translationSet) for i := 0; i < v.NumField(); i++ { value := v.Field(i).String() if value == "" { output += v.Type().Field(i).Name + "\n" } } output += "\n" } return output } ================================================ FILE: test/Dockerfile ================================================ FROM alpine:latest COPY . /app ================================================ FILE: test/docker-compose.yml ================================================ version: "3.5" services: my-service: build: dockerfile: Dockerfile context: . command: /app/print-random-stuff.sh depends_on: - my-service2 ports: - 123:321 my-service2: build: dockerfile: Dockerfile context: . command: /app/print-random-stuff.sh ports: - 12345:12345 my-service3: build: dockerfile: Dockerfile context: . command: /app/print-random-stuff.sh ================================================ FILE: test/print-random-stuff.sh ================================================ #!/bin/sh while true do echo $((1 + $RANDOM % 10)) sleep 1 done ================================================ FILE: test.sh ================================================ #!/usr/bin/env bash set -e echo "" > coverage.txt export GOFLAGS=-mod=vendor use_go_test=false if command -v gotest; then use_go_test=true fi for d in $( find ./* -maxdepth 10 ! -path "./vendor*" ! -path "./.git*" ! -path "./scripts*" -type d); do if ls $d/*.go &> /dev/null; then args="-race -coverprofile=profile.out -covermode=atomic $d" if [ "$use_go_test" == true ]; then gotest $args else go test $args fi if [ -f profile.out ]; then cat profile.out >> coverage.txt rm profile.out fi fi done ================================================ FILE: vendor/github.com/Microsoft/go-winio/.gitattributes ================================================ * text=auto eol=lf ================================================ FILE: vendor/github.com/Microsoft/go-winio/.gitignore ================================================ .vscode/ *.exe # testing testdata # go workspaces go.work go.work.sum ================================================ FILE: vendor/github.com/Microsoft/go-winio/.golangci.yml ================================================ linters: enable: # style - containedctx # struct contains a context - dupl # duplicate code - errname # erorrs are named correctly - nolintlint # "//nolint" directives are properly explained - revive # golint replacement - unconvert # unnecessary conversions - wastedassign # bugs, performance, unused, etc ... - contextcheck # function uses a non-inherited context - errorlint # errors not wrapped for 1.13 - exhaustive # check exhaustiveness of enum switch statements - gofmt # files are gofmt'ed - gosec # security - nilerr # returns nil even with non-nil error - thelper # test helpers without t.Helper() - unparam # unused function params issues: exclude-dirs: - pkg/etw/sample exclude-rules: # err is very often shadowed in nested scopes - linters: - govet text: '^shadow: declaration of "err" shadows declaration' # ignore long lines for skip autogen directives - linters: - revive text: "^line-length-limit: " source: "^//(go:generate|sys) " #TODO: remove after upgrading to go1.18 # ignore comment spacing for nolint and sys directives - linters: - revive text: "^comment-spacings: no space between comment delimiter and comment text" source: "//(cspell:|nolint:|sys |todo)" # not on go 1.18 yet, so no any - linters: - revive text: "^use-any: since GO 1.18 'interface{}' can be replaced by 'any'" # allow unjustified ignores of error checks in defer statements - linters: - nolintlint text: "^directive `//nolint:errcheck` should provide explanation" source: '^\s*defer ' # allow unjustified ignores of error lints for io.EOF - linters: - nolintlint text: "^directive `//nolint:errorlint` should provide explanation" source: '[=|!]= io.EOF' linters-settings: exhaustive: default-signifies-exhaustive: true govet: enable-all: true disable: # struct order is often for Win32 compat # also, ignore pointer bytes/GC issues for now until performance becomes an issue - fieldalignment nolintlint: require-explanation: true require-specific: true revive: # revive is more configurable than static check, so likely the preferred alternative to static-check # (once the perf issue is solved: https://github.com/golangci/golangci-lint/issues/2997) enable-all-rules: true # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md rules: # rules with required arguments - name: argument-limit disabled: true - name: banned-characters disabled: true - name: cognitive-complexity disabled: true - name: cyclomatic disabled: true - name: file-header disabled: true - name: function-length disabled: true - name: function-result-limit disabled: true - name: max-public-structs disabled: true # geneally annoying rules - name: add-constant # complains about any and all strings and integers disabled: true - name: confusing-naming # we frequently use "Foo()" and "foo()" together disabled: true - name: flag-parameter # excessive, and a common idiom we use disabled: true - name: unhandled-error # warns over common fmt.Print* and io.Close; rely on errcheck instead disabled: true # general config - name: line-length-limit arguments: - 140 - name: var-naming arguments: - [] - - CID - CRI - CTRD - DACL - DLL - DOS - ETW - FSCTL - GCS - GMSA - HCS - HV - IO - LCOW - LDAP - LPAC - LTSC - MMIO - NT - OCI - PMEM - PWSH - RX - SACl - SID - SMB - TX - VHD - VHDX - VMID - VPCI - WCOW - WIM ================================================ FILE: vendor/github.com/Microsoft/go-winio/CODEOWNERS ================================================ * @microsoft/containerplat ================================================ FILE: vendor/github.com/Microsoft/go-winio/LICENSE ================================================ The MIT License (MIT) Copyright (c) 2015 Microsoft 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. ================================================ FILE: vendor/github.com/Microsoft/go-winio/README.md ================================================ # go-winio [![Build Status](https://github.com/microsoft/go-winio/actions/workflows/ci.yml/badge.svg)](https://github.com/microsoft/go-winio/actions/workflows/ci.yml) This repository contains utilities for efficiently performing Win32 IO operations in Go. Currently, this is focused on accessing named pipes and other file handles, and for using named pipes as a net transport. This code relies on IO completion ports to avoid blocking IO on system threads, allowing Go to reuse the thread to schedule another goroutine. This limits support to Windows Vista and newer operating systems. This is similar to the implementation of network sockets in Go's net package. Please see the LICENSE file for licensing information. ## Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit [Microsoft CLA](https://cla.microsoft.com). When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. Additionally, the pull request pipeline requires the following steps to be performed before mergining. ### Code Sign-Off We require that contributors sign their commits using [`git commit --signoff`][git-commit-s] to certify they either authored the work themselves or otherwise have permission to use it in this project. A range of commits can be signed off using [`git rebase --signoff`][git-rebase-s]. Please see [the developer certificate](https://developercertificate.org) for more info, as well as to make sure that you can attest to the rules listed. Our CI uses the DCO Github app to ensure that all commits in a given PR are signed-off. ### Linting Code must pass a linting stage, which uses [`golangci-lint`][lint]. The linting settings are stored in [`.golangci.yaml`](./.golangci.yaml), and can be run automatically with VSCode by adding the following to your workspace or folder settings: ```json "go.lintTool": "golangci-lint", "go.lintOnSave": "package", ``` Additional editor [integrations options are also available][lint-ide]. Alternatively, `golangci-lint` can be [installed locally][lint-install] and run from the repo root: ```shell # use . or specify a path to only lint a package # to show all lint errors, use flags "--max-issues-per-linter=0 --max-same-issues=0" > golangci-lint run ./... ``` ### Go Generate The pipeline checks that auto-generated code, via `go generate`, are up to date. This can be done for the entire repo: ```shell > go generate ./... ``` ## Code of Conduct This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. ## Special Thanks Thanks to [natefinch][natefinch] for the inspiration for this library. See [npipe](https://github.com/natefinch/npipe) for another named pipe implementation. [lint]: https://golangci-lint.run/ [lint-ide]: https://golangci-lint.run/usage/integrations/#editor-integration [lint-install]: https://golangci-lint.run/usage/install/#local-installation [git-commit-s]: https://git-scm.com/docs/git-commit#Documentation/git-commit.txt--s [git-rebase-s]: https://git-scm.com/docs/git-rebase#Documentation/git-rebase.txt---signoff [natefinch]: https://github.com/natefinch ================================================ FILE: vendor/github.com/Microsoft/go-winio/SECURITY.md ================================================ ## Security Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. ## Reporting Security Issues **Please do not report security vulnerabilities through public GitHub issues.** Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) * Full paths of source file(s) related to the manifestation of the issue * The location of the affected source code (tag/branch/commit or direct URL) * Any special configuration required to reproduce the issue * Step-by-step instructions to reproduce the issue * Proof-of-concept or exploit code (if possible) * Impact of the issue, including how an attacker might exploit the issue This information will help us triage your report more quickly. If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. ## Preferred Languages We prefer all communications to be in English. ## Policy Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). ================================================ FILE: vendor/github.com/Microsoft/go-winio/backup.go ================================================ //go:build windows // +build windows package winio import ( "encoding/binary" "errors" "fmt" "io" "os" "runtime" "unicode/utf16" "github.com/Microsoft/go-winio/internal/fs" "golang.org/x/sys/windows" ) //sys backupRead(h windows.Handle, b []byte, bytesRead *uint32, abort bool, processSecurity bool, context *uintptr) (err error) = BackupRead //sys backupWrite(h windows.Handle, b []byte, bytesWritten *uint32, abort bool, processSecurity bool, context *uintptr) (err error) = BackupWrite const ( BackupData = uint32(iota + 1) BackupEaData BackupSecurity BackupAlternateData BackupLink BackupPropertyData BackupObjectId //revive:disable-line:var-naming ID, not Id BackupReparseData BackupSparseBlock BackupTxfsData ) const ( StreamSparseAttributes = uint32(8) ) //nolint:revive // var-naming: ALL_CAPS const ( WRITE_DAC = windows.WRITE_DAC WRITE_OWNER = windows.WRITE_OWNER ACCESS_SYSTEM_SECURITY = windows.ACCESS_SYSTEM_SECURITY ) // BackupHeader represents a backup stream of a file. type BackupHeader struct { //revive:disable-next-line:var-naming ID, not Id Id uint32 // The backup stream ID Attributes uint32 // Stream attributes Size int64 // The size of the stream in bytes Name string // The name of the stream (for BackupAlternateData only). Offset int64 // The offset of the stream in the file (for BackupSparseBlock only). } type win32StreamID struct { StreamID uint32 Attributes uint32 Size uint64 NameSize uint32 } // BackupStreamReader reads from a stream produced by the BackupRead Win32 API and produces a series // of BackupHeader values. type BackupStreamReader struct { r io.Reader bytesLeft int64 } // NewBackupStreamReader produces a BackupStreamReader from any io.Reader. func NewBackupStreamReader(r io.Reader) *BackupStreamReader { return &BackupStreamReader{r, 0} } // Next returns the next backup stream and prepares for calls to Read(). It skips the remainder of the current stream if // it was not completely read. func (r *BackupStreamReader) Next() (*BackupHeader, error) { if r.bytesLeft > 0 { //nolint:nestif // todo: flatten this if s, ok := r.r.(io.Seeker); ok { // Make sure Seek on io.SeekCurrent sometimes succeeds // before trying the actual seek. if _, err := s.Seek(0, io.SeekCurrent); err == nil { if _, err = s.Seek(r.bytesLeft, io.SeekCurrent); err != nil { return nil, err } r.bytesLeft = 0 } } if _, err := io.Copy(io.Discard, r); err != nil { return nil, err } } var wsi win32StreamID if err := binary.Read(r.r, binary.LittleEndian, &wsi); err != nil { return nil, err } hdr := &BackupHeader{ Id: wsi.StreamID, Attributes: wsi.Attributes, Size: int64(wsi.Size), } if wsi.NameSize != 0 { name := make([]uint16, int(wsi.NameSize/2)) if err := binary.Read(r.r, binary.LittleEndian, name); err != nil { return nil, err } hdr.Name = windows.UTF16ToString(name) } if wsi.StreamID == BackupSparseBlock { if err := binary.Read(r.r, binary.LittleEndian, &hdr.Offset); err != nil { return nil, err } hdr.Size -= 8 } r.bytesLeft = hdr.Size return hdr, nil } // Read reads from the current backup stream. func (r *BackupStreamReader) Read(b []byte) (int, error) { if r.bytesLeft == 0 { return 0, io.EOF } if int64(len(b)) > r.bytesLeft { b = b[:r.bytesLeft] } n, err := r.r.Read(b) r.bytesLeft -= int64(n) if err == io.EOF { err = io.ErrUnexpectedEOF } else if r.bytesLeft == 0 && err == nil { err = io.EOF } return n, err } // BackupStreamWriter writes a stream compatible with the BackupWrite Win32 API. type BackupStreamWriter struct { w io.Writer bytesLeft int64 } // NewBackupStreamWriter produces a BackupStreamWriter on top of an io.Writer. func NewBackupStreamWriter(w io.Writer) *BackupStreamWriter { return &BackupStreamWriter{w, 0} } // WriteHeader writes the next backup stream header and prepares for calls to Write(). func (w *BackupStreamWriter) WriteHeader(hdr *BackupHeader) error { if w.bytesLeft != 0 { return fmt.Errorf("missing %d bytes", w.bytesLeft) } name := utf16.Encode([]rune(hdr.Name)) wsi := win32StreamID{ StreamID: hdr.Id, Attributes: hdr.Attributes, Size: uint64(hdr.Size), NameSize: uint32(len(name) * 2), } if hdr.Id == BackupSparseBlock { // Include space for the int64 block offset wsi.Size += 8 } if err := binary.Write(w.w, binary.LittleEndian, &wsi); err != nil { return err } if len(name) != 0 { if err := binary.Write(w.w, binary.LittleEndian, name); err != nil { return err } } if hdr.Id == BackupSparseBlock { if err := binary.Write(w.w, binary.LittleEndian, hdr.Offset); err != nil { return err } } w.bytesLeft = hdr.Size return nil } // Write writes to the current backup stream. func (w *BackupStreamWriter) Write(b []byte) (int, error) { if w.bytesLeft < int64(len(b)) { return 0, fmt.Errorf("too many bytes by %d", int64(len(b))-w.bytesLeft) } n, err := w.w.Write(b) w.bytesLeft -= int64(n) return n, err } // BackupFileReader provides an io.ReadCloser interface on top of the BackupRead Win32 API. type BackupFileReader struct { f *os.File includeSecurity bool ctx uintptr } // NewBackupFileReader returns a new BackupFileReader from a file handle. If includeSecurity is true, // Read will attempt to read the security descriptor of the file. func NewBackupFileReader(f *os.File, includeSecurity bool) *BackupFileReader { r := &BackupFileReader{f, includeSecurity, 0} return r } // Read reads a backup stream from the file by calling the Win32 API BackupRead(). func (r *BackupFileReader) Read(b []byte) (int, error) { var bytesRead uint32 err := backupRead(windows.Handle(r.f.Fd()), b, &bytesRead, false, r.includeSecurity, &r.ctx) if err != nil { return 0, &os.PathError{Op: "BackupRead", Path: r.f.Name(), Err: err} } runtime.KeepAlive(r.f) if bytesRead == 0 { return 0, io.EOF } return int(bytesRead), nil } // Close frees Win32 resources associated with the BackupFileReader. It does not close // the underlying file. func (r *BackupFileReader) Close() error { if r.ctx != 0 { _ = backupRead(windows.Handle(r.f.Fd()), nil, nil, true, false, &r.ctx) runtime.KeepAlive(r.f) r.ctx = 0 } return nil } // BackupFileWriter provides an io.WriteCloser interface on top of the BackupWrite Win32 API. type BackupFileWriter struct { f *os.File includeSecurity bool ctx uintptr } // NewBackupFileWriter returns a new BackupFileWriter from a file handle. If includeSecurity is true, // Write() will attempt to restore the security descriptor from the stream. func NewBackupFileWriter(f *os.File, includeSecurity bool) *BackupFileWriter { w := &BackupFileWriter{f, includeSecurity, 0} return w } // Write restores a portion of the file using the provided backup stream. func (w *BackupFileWriter) Write(b []byte) (int, error) { var bytesWritten uint32 err := backupWrite(windows.Handle(w.f.Fd()), b, &bytesWritten, false, w.includeSecurity, &w.ctx) if err != nil { return 0, &os.PathError{Op: "BackupWrite", Path: w.f.Name(), Err: err} } runtime.KeepAlive(w.f) if int(bytesWritten) != len(b) { return int(bytesWritten), errors.New("not all bytes could be written") } return len(b), nil } // Close frees Win32 resources associated with the BackupFileWriter. It does not // close the underlying file. func (w *BackupFileWriter) Close() error { if w.ctx != 0 { _ = backupWrite(windows.Handle(w.f.Fd()), nil, nil, true, false, &w.ctx) runtime.KeepAlive(w.f) w.ctx = 0 } return nil } // OpenForBackup opens a file or directory, potentially skipping access checks if the backup // or restore privileges have been acquired. // // If the file opened was a directory, it cannot be used with Readdir(). func OpenForBackup(path string, access uint32, share uint32, createmode uint32) (*os.File, error) { h, err := fs.CreateFile(path, fs.AccessMask(access), fs.FileShareMode(share), nil, fs.FileCreationDisposition(createmode), fs.FILE_FLAG_BACKUP_SEMANTICS|fs.FILE_FLAG_OPEN_REPARSE_POINT, 0, ) if err != nil { err = &os.PathError{Op: "open", Path: path, Err: err} return nil, err } return os.NewFile(uintptr(h), path), nil } ================================================ FILE: vendor/github.com/Microsoft/go-winio/doc.go ================================================ // This package provides utilities for efficiently performing Win32 IO operations in Go. // Currently, this package is provides support for genreal IO and management of // - named pipes // - files // - [Hyper-V sockets] // // This code is similar to Go's [net] package, and uses IO completion ports to avoid // blocking IO on system threads, allowing Go to reuse the thread to schedule other goroutines. // // This limits support to Windows Vista and newer operating systems. // // Additionally, this package provides support for: // - creating and managing GUIDs // - writing to [ETW] // - opening and manageing VHDs // - parsing [Windows Image files] // - auto-generating Win32 API code // // [Hyper-V sockets]: https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/make-integration-service // [ETW]: https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/event-tracing-for-windows--etw- // [Windows Image files]: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/work-with-windows-images package winio ================================================ FILE: vendor/github.com/Microsoft/go-winio/ea.go ================================================ package winio import ( "bytes" "encoding/binary" "errors" ) type fileFullEaInformation struct { NextEntryOffset uint32 Flags uint8 NameLength uint8 ValueLength uint16 } var ( fileFullEaInformationSize = binary.Size(&fileFullEaInformation{}) errInvalidEaBuffer = errors.New("invalid extended attribute buffer") errEaNameTooLarge = errors.New("extended attribute name too large") errEaValueTooLarge = errors.New("extended attribute value too large") ) // ExtendedAttribute represents a single Windows EA. type ExtendedAttribute struct { Name string Value []byte Flags uint8 } func parseEa(b []byte) (ea ExtendedAttribute, nb []byte, err error) { var info fileFullEaInformation err = binary.Read(bytes.NewReader(b), binary.LittleEndian, &info) if err != nil { err = errInvalidEaBuffer return ea, nb, err } nameOffset := fileFullEaInformationSize nameLen := int(info.NameLength) valueOffset := nameOffset + int(info.NameLength) + 1 valueLen := int(info.ValueLength) nextOffset := int(info.NextEntryOffset) if valueLen+valueOffset > len(b) || nextOffset < 0 || nextOffset > len(b) { err = errInvalidEaBuffer return ea, nb, err } ea.Name = string(b[nameOffset : nameOffset+nameLen]) ea.Value = b[valueOffset : valueOffset+valueLen] ea.Flags = info.Flags if info.NextEntryOffset != 0 { nb = b[info.NextEntryOffset:] } return ea, nb, err } // DecodeExtendedAttributes decodes a list of EAs from a FILE_FULL_EA_INFORMATION // buffer retrieved from BackupRead, ZwQueryEaFile, etc. func DecodeExtendedAttributes(b []byte) (eas []ExtendedAttribute, err error) { for len(b) != 0 { ea, nb, err := parseEa(b) if err != nil { return nil, err } eas = append(eas, ea) b = nb } return eas, err } func writeEa(buf *bytes.Buffer, ea *ExtendedAttribute, last bool) error { if int(uint8(len(ea.Name))) != len(ea.Name) { return errEaNameTooLarge } if int(uint16(len(ea.Value))) != len(ea.Value) { return errEaValueTooLarge } entrySize := uint32(fileFullEaInformationSize + len(ea.Name) + 1 + len(ea.Value)) withPadding := (entrySize + 3) &^ 3 nextOffset := uint32(0) if !last { nextOffset = withPadding } info := fileFullEaInformation{ NextEntryOffset: nextOffset, Flags: ea.Flags, NameLength: uint8(len(ea.Name)), ValueLength: uint16(len(ea.Value)), } err := binary.Write(buf, binary.LittleEndian, &info) if err != nil { return err } _, err = buf.Write([]byte(ea.Name)) if err != nil { return err } err = buf.WriteByte(0) if err != nil { return err } _, err = buf.Write(ea.Value) if err != nil { return err } _, err = buf.Write([]byte{0, 0, 0}[0 : withPadding-entrySize]) if err != nil { return err } return nil } // EncodeExtendedAttributes encodes a list of EAs into a FILE_FULL_EA_INFORMATION // buffer for use with BackupWrite, ZwSetEaFile, etc. func EncodeExtendedAttributes(eas []ExtendedAttribute) ([]byte, error) { var buf bytes.Buffer for i := range eas { last := false if i == len(eas)-1 { last = true } err := writeEa(&buf, &eas[i], last) if err != nil { return nil, err } } return buf.Bytes(), nil } ================================================ FILE: vendor/github.com/Microsoft/go-winio/file.go ================================================ //go:build windows // +build windows package winio import ( "errors" "io" "runtime" "sync" "sync/atomic" "syscall" "time" "golang.org/x/sys/windows" ) //sys cancelIoEx(file windows.Handle, o *windows.Overlapped) (err error) = CancelIoEx //sys createIoCompletionPort(file windows.Handle, port windows.Handle, key uintptr, threadCount uint32) (newport windows.Handle, err error) = CreateIoCompletionPort //sys getQueuedCompletionStatus(port windows.Handle, bytes *uint32, key *uintptr, o **ioOperation, timeout uint32) (err error) = GetQueuedCompletionStatus //sys setFileCompletionNotificationModes(h windows.Handle, flags uint8) (err error) = SetFileCompletionNotificationModes //sys wsaGetOverlappedResult(h windows.Handle, o *windows.Overlapped, bytes *uint32, wait bool, flags *uint32) (err error) = ws2_32.WSAGetOverlappedResult var ( ErrFileClosed = errors.New("file has already been closed") ErrTimeout = &timeoutError{} ) type timeoutError struct{} func (*timeoutError) Error() string { return "i/o timeout" } func (*timeoutError) Timeout() bool { return true } func (*timeoutError) Temporary() bool { return true } type timeoutChan chan struct{} var ioInitOnce sync.Once var ioCompletionPort windows.Handle // ioResult contains the result of an asynchronous IO operation. type ioResult struct { bytes uint32 err error } // ioOperation represents an outstanding asynchronous Win32 IO. type ioOperation struct { o windows.Overlapped ch chan ioResult } func initIO() { h, err := createIoCompletionPort(windows.InvalidHandle, 0, 0, 0xffffffff) if err != nil { panic(err) } ioCompletionPort = h go ioCompletionProcessor(h) } // win32File implements Reader, Writer, and Closer on a Win32 handle without blocking in a syscall. // It takes ownership of this handle and will close it if it is garbage collected. type win32File struct { handle windows.Handle wg sync.WaitGroup wgLock sync.RWMutex closing atomic.Bool socket bool readDeadline deadlineHandler writeDeadline deadlineHandler } type deadlineHandler struct { setLock sync.Mutex channel timeoutChan channelLock sync.RWMutex timer *time.Timer timedout atomic.Bool } // makeWin32File makes a new win32File from an existing file handle. func makeWin32File(h windows.Handle) (*win32File, error) { f := &win32File{handle: h} ioInitOnce.Do(initIO) _, err := createIoCompletionPort(h, ioCompletionPort, 0, 0xffffffff) if err != nil { return nil, err } err = setFileCompletionNotificationModes(h, windows.FILE_SKIP_COMPLETION_PORT_ON_SUCCESS|windows.FILE_SKIP_SET_EVENT_ON_HANDLE) if err != nil { return nil, err } f.readDeadline.channel = make(timeoutChan) f.writeDeadline.channel = make(timeoutChan) return f, nil } // Deprecated: use NewOpenFile instead. func MakeOpenFile(h syscall.Handle) (io.ReadWriteCloser, error) { return NewOpenFile(windows.Handle(h)) } func NewOpenFile(h windows.Handle) (io.ReadWriteCloser, error) { // If we return the result of makeWin32File directly, it can result in an // interface-wrapped nil, rather than a nil interface value. f, err := makeWin32File(h) if err != nil { return nil, err } return f, nil } // closeHandle closes the resources associated with a Win32 handle. func (f *win32File) closeHandle() { f.wgLock.Lock() // Atomically set that we are closing, releasing the resources only once. if !f.closing.Swap(true) { f.wgLock.Unlock() // cancel all IO and wait for it to complete _ = cancelIoEx(f.handle, nil) f.wg.Wait() // at this point, no new IO can start windows.Close(f.handle) f.handle = 0 } else { f.wgLock.Unlock() } } // Close closes a win32File. func (f *win32File) Close() error { f.closeHandle() return nil } // IsClosed checks if the file has been closed. func (f *win32File) IsClosed() bool { return f.closing.Load() } // prepareIO prepares for a new IO operation. // The caller must call f.wg.Done() when the IO is finished, prior to Close() returning. func (f *win32File) prepareIO() (*ioOperation, error) { f.wgLock.RLock() if f.closing.Load() { f.wgLock.RUnlock() return nil, ErrFileClosed } f.wg.Add(1) f.wgLock.RUnlock() c := &ioOperation{} c.ch = make(chan ioResult) return c, nil } // ioCompletionProcessor processes completed async IOs forever. func ioCompletionProcessor(h windows.Handle) { for { var bytes uint32 var key uintptr var op *ioOperation err := getQueuedCompletionStatus(h, &bytes, &key, &op, windows.INFINITE) if op == nil { panic(err) } op.ch <- ioResult{bytes, err} } } // todo: helsaawy - create an asyncIO version that takes a context // asyncIO processes the return value from ReadFile or WriteFile, blocking until // the operation has actually completed. func (f *win32File) asyncIO(c *ioOperation, d *deadlineHandler, bytes uint32, err error) (int, error) { if err != windows.ERROR_IO_PENDING { //nolint:errorlint // err is Errno return int(bytes), err } if f.closing.Load() { _ = cancelIoEx(f.handle, &c.o) } var timeout timeoutChan if d != nil { d.channelLock.Lock() timeout = d.channel d.channelLock.Unlock() } var r ioResult select { case r = <-c.ch: err = r.err if err == windows.ERROR_OPERATION_ABORTED { //nolint:errorlint // err is Errno if f.closing.Load() { err = ErrFileClosed } } else if err != nil && f.socket { // err is from Win32. Query the overlapped structure to get the winsock error. var bytes, flags uint32 err = wsaGetOverlappedResult(f.handle, &c.o, &bytes, false, &flags) } case <-timeout: _ = cancelIoEx(f.handle, &c.o) r = <-c.ch err = r.err if err == windows.ERROR_OPERATION_ABORTED { //nolint:errorlint // err is Errno err = ErrTimeout } } // runtime.KeepAlive is needed, as c is passed via native // code to ioCompletionProcessor, c must remain alive // until the channel read is complete. // todo: (de)allocate *ioOperation via win32 heap functions, instead of needing to KeepAlive? runtime.KeepAlive(c) return int(r.bytes), err } // Read reads from a file handle. func (f *win32File) Read(b []byte) (int, error) { c, err := f.prepareIO() if err != nil { return 0, err } defer f.wg.Done() if f.readDeadline.timedout.Load() { return 0, ErrTimeout } var bytes uint32 err = windows.ReadFile(f.handle, b, &bytes, &c.o) n, err := f.asyncIO(c, &f.readDeadline, bytes, err) runtime.KeepAlive(b) // Handle EOF conditions. if err == nil && n == 0 && len(b) != 0 { return 0, io.EOF } else if err == windows.ERROR_BROKEN_PIPE { //nolint:errorlint // err is Errno return 0, io.EOF } return n, err } // Write writes to a file handle. func (f *win32File) Write(b []byte) (int, error) { c, err := f.prepareIO() if err != nil { return 0, err } defer f.wg.Done() if f.writeDeadline.timedout.Load() { return 0, ErrTimeout } var bytes uint32 err = windows.WriteFile(f.handle, b, &bytes, &c.o) n, err := f.asyncIO(c, &f.writeDeadline, bytes, err) runtime.KeepAlive(b) return n, err } func (f *win32File) SetReadDeadline(deadline time.Time) error { return f.readDeadline.set(deadline) } func (f *win32File) SetWriteDeadline(deadline time.Time) error { return f.writeDeadline.set(deadline) } func (f *win32File) Flush() error { return windows.FlushFileBuffers(f.handle) } func (f *win32File) Fd() uintptr { return uintptr(f.handle) } func (d *deadlineHandler) set(deadline time.Time) error { d.setLock.Lock() defer d.setLock.Unlock() if d.timer != nil { if !d.timer.Stop() { <-d.channel } d.timer = nil } d.timedout.Store(false) select { case <-d.channel: d.channelLock.Lock() d.channel = make(chan struct{}) d.channelLock.Unlock() default: } if deadline.IsZero() { return nil } timeoutIO := func() { d.timedout.Store(true) close(d.channel) } now := time.Now() duration := deadline.Sub(now) if deadline.After(now) { // Deadline is in the future, set a timer to wait d.timer = time.AfterFunc(duration, timeoutIO) } else { // Deadline is in the past. Cancel all pending IO now. timeoutIO() } return nil } ================================================ FILE: vendor/github.com/Microsoft/go-winio/fileinfo.go ================================================ //go:build windows // +build windows package winio import ( "os" "runtime" "unsafe" "golang.org/x/sys/windows" ) // FileBasicInfo contains file access time and file attributes information. type FileBasicInfo struct { CreationTime, LastAccessTime, LastWriteTime, ChangeTime windows.Filetime FileAttributes uint32 _ uint32 // padding } // alignedFileBasicInfo is a FileBasicInfo, but aligned to uint64 by containing // uint64 rather than windows.Filetime. Filetime contains two uint32s. uint64 // alignment is necessary to pass this as FILE_BASIC_INFO. type alignedFileBasicInfo struct { CreationTime, LastAccessTime, LastWriteTime, ChangeTime uint64 FileAttributes uint32 _ uint32 // padding } // GetFileBasicInfo retrieves times and attributes for a file. func GetFileBasicInfo(f *os.File) (*FileBasicInfo, error) { bi := &alignedFileBasicInfo{} if err := windows.GetFileInformationByHandleEx( windows.Handle(f.Fd()), windows.FileBasicInfo, (*byte)(unsafe.Pointer(bi)), uint32(unsafe.Sizeof(*bi)), ); err != nil { return nil, &os.PathError{Op: "GetFileInformationByHandleEx", Path: f.Name(), Err: err} } runtime.KeepAlive(f) // Reinterpret the alignedFileBasicInfo as a FileBasicInfo so it matches the // public API of this module. The data may be unnecessarily aligned. return (*FileBasicInfo)(unsafe.Pointer(bi)), nil } // SetFileBasicInfo sets times and attributes for a file. func SetFileBasicInfo(f *os.File, bi *FileBasicInfo) error { // Create an alignedFileBasicInfo based on a FileBasicInfo. The copy is // suitable to pass to GetFileInformationByHandleEx. biAligned := *(*alignedFileBasicInfo)(unsafe.Pointer(bi)) if err := windows.SetFileInformationByHandle( windows.Handle(f.Fd()), windows.FileBasicInfo, (*byte)(unsafe.Pointer(&biAligned)), uint32(unsafe.Sizeof(biAligned)), ); err != nil { return &os.PathError{Op: "SetFileInformationByHandle", Path: f.Name(), Err: err} } runtime.KeepAlive(f) return nil } // FileStandardInfo contains extended information for the file. // FILE_STANDARD_INFO in WinBase.h // https://docs.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-file_standard_info type FileStandardInfo struct { AllocationSize, EndOfFile int64 NumberOfLinks uint32 DeletePending, Directory bool } // GetFileStandardInfo retrieves ended information for the file. func GetFileStandardInfo(f *os.File) (*FileStandardInfo, error) { si := &FileStandardInfo{} if err := windows.GetFileInformationByHandleEx(windows.Handle(f.Fd()), windows.FileStandardInfo, (*byte)(unsafe.Pointer(si)), uint32(unsafe.Sizeof(*si))); err != nil { return nil, &os.PathError{Op: "GetFileInformationByHandleEx", Path: f.Name(), Err: err} } runtime.KeepAlive(f) return si, nil } // FileIDInfo contains the volume serial number and file ID for a file. This pair should be // unique on a system. type FileIDInfo struct { VolumeSerialNumber uint64 FileID [16]byte } // GetFileID retrieves the unique (volume, file ID) pair for a file. func GetFileID(f *os.File) (*FileIDInfo, error) { fileID := &FileIDInfo{} if err := windows.GetFileInformationByHandleEx( windows.Handle(f.Fd()), windows.FileIdInfo, (*byte)(unsafe.Pointer(fileID)), uint32(unsafe.Sizeof(*fileID)), ); err != nil { return nil, &os.PathError{Op: "GetFileInformationByHandleEx", Path: f.Name(), Err: err} } runtime.KeepAlive(f) return fileID, nil } ================================================ FILE: vendor/github.com/Microsoft/go-winio/hvsock.go ================================================ //go:build windows // +build windows package winio import ( "context" "errors" "fmt" "io" "net" "os" "time" "unsafe" "golang.org/x/sys/windows" "github.com/Microsoft/go-winio/internal/socket" "github.com/Microsoft/go-winio/pkg/guid" ) const afHVSock = 34 // AF_HYPERV // Well known Service and VM IDs // https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/make-integration-service#vmid-wildcards // HvsockGUIDWildcard is the wildcard VmId for accepting connections from all partitions. func HvsockGUIDWildcard() guid.GUID { // 00000000-0000-0000-0000-000000000000 return guid.GUID{} } // HvsockGUIDBroadcast is the wildcard VmId for broadcasting sends to all partitions. func HvsockGUIDBroadcast() guid.GUID { // ffffffff-ffff-ffff-ffff-ffffffffffff return guid.GUID{ Data1: 0xffffffff, Data2: 0xffff, Data3: 0xffff, Data4: [8]uint8{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, } } // HvsockGUIDLoopback is the Loopback VmId for accepting connections to the same partition as the connector. func HvsockGUIDLoopback() guid.GUID { // e0e16197-dd56-4a10-9195-5ee7a155a838 return guid.GUID{ Data1: 0xe0e16197, Data2: 0xdd56, Data3: 0x4a10, Data4: [8]uint8{0x91, 0x95, 0x5e, 0xe7, 0xa1, 0x55, 0xa8, 0x38}, } } // HvsockGUIDSiloHost is the address of a silo's host partition: // - The silo host of a hosted silo is the utility VM. // - The silo host of a silo on a physical host is the physical host. func HvsockGUIDSiloHost() guid.GUID { // 36bd0c5c-7276-4223-88ba-7d03b654c568 return guid.GUID{ Data1: 0x36bd0c5c, Data2: 0x7276, Data3: 0x4223, Data4: [8]byte{0x88, 0xba, 0x7d, 0x03, 0xb6, 0x54, 0xc5, 0x68}, } } // HvsockGUIDChildren is the wildcard VmId for accepting connections from the connector's child partitions. func HvsockGUIDChildren() guid.GUID { // 90db8b89-0d35-4f79-8ce9-49ea0ac8b7cd return guid.GUID{ Data1: 0x90db8b89, Data2: 0xd35, Data3: 0x4f79, Data4: [8]uint8{0x8c, 0xe9, 0x49, 0xea, 0xa, 0xc8, 0xb7, 0xcd}, } } // HvsockGUIDParent is the wildcard VmId for accepting connections from the connector's parent partition. // Listening on this VmId accepts connection from: // - Inside silos: silo host partition. // - Inside hosted silo: host of the VM. // - Inside VM: VM host. // - Physical host: Not supported. func HvsockGUIDParent() guid.GUID { // a42e7cda-d03f-480c-9cc2-a4de20abb878 return guid.GUID{ Data1: 0xa42e7cda, Data2: 0xd03f, Data3: 0x480c, Data4: [8]uint8{0x9c, 0xc2, 0xa4, 0xde, 0x20, 0xab, 0xb8, 0x78}, } } // hvsockVsockServiceTemplate is the Service GUID used for the VSOCK protocol. func hvsockVsockServiceTemplate() guid.GUID { // 00000000-facb-11e6-bd58-64006a7986d3 return guid.GUID{ Data2: 0xfacb, Data3: 0x11e6, Data4: [8]uint8{0xbd, 0x58, 0x64, 0x00, 0x6a, 0x79, 0x86, 0xd3}, } } // An HvsockAddr is an address for a AF_HYPERV socket. type HvsockAddr struct { VMID guid.GUID ServiceID guid.GUID } type rawHvsockAddr struct { Family uint16 _ uint16 VMID guid.GUID ServiceID guid.GUID } var _ socket.RawSockaddr = &rawHvsockAddr{} // Network returns the address's network name, "hvsock". func (*HvsockAddr) Network() string { return "hvsock" } func (addr *HvsockAddr) String() string { return fmt.Sprintf("%s:%s", &addr.VMID, &addr.ServiceID) } // VsockServiceID returns an hvsock service ID corresponding to the specified AF_VSOCK port. func VsockServiceID(port uint32) guid.GUID { g := hvsockVsockServiceTemplate() // make a copy g.Data1 = port return g } func (addr *HvsockAddr) raw() rawHvsockAddr { return rawHvsockAddr{ Family: afHVSock, VMID: addr.VMID, ServiceID: addr.ServiceID, } } func (addr *HvsockAddr) fromRaw(raw *rawHvsockAddr) { addr.VMID = raw.VMID addr.ServiceID = raw.ServiceID } // Sockaddr returns a pointer to and the size of this struct. // // Implements the [socket.RawSockaddr] interface, and allows use in // [socket.Bind] and [socket.ConnectEx]. func (r *rawHvsockAddr) Sockaddr() (unsafe.Pointer, int32, error) { return unsafe.Pointer(r), int32(unsafe.Sizeof(rawHvsockAddr{})), nil } // Sockaddr interface allows use with `sockets.Bind()` and `.ConnectEx()`. func (r *rawHvsockAddr) FromBytes(b []byte) error { n := int(unsafe.Sizeof(rawHvsockAddr{})) if len(b) < n { return fmt.Errorf("got %d, want %d: %w", len(b), n, socket.ErrBufferSize) } copy(unsafe.Slice((*byte)(unsafe.Pointer(r)), n), b[:n]) if r.Family != afHVSock { return fmt.Errorf("got %d, want %d: %w", r.Family, afHVSock, socket.ErrAddrFamily) } return nil } // HvsockListener is a socket listener for the AF_HYPERV address family. type HvsockListener struct { sock *win32File addr HvsockAddr } var _ net.Listener = &HvsockListener{} // HvsockConn is a connected socket of the AF_HYPERV address family. type HvsockConn struct { sock *win32File local, remote HvsockAddr } var _ net.Conn = &HvsockConn{} func newHVSocket() (*win32File, error) { fd, err := windows.Socket(afHVSock, windows.SOCK_STREAM, 1) if err != nil { return nil, os.NewSyscallError("socket", err) } f, err := makeWin32File(fd) if err != nil { windows.Close(fd) return nil, err } f.socket = true return f, nil } // ListenHvsock listens for connections on the specified hvsock address. func ListenHvsock(addr *HvsockAddr) (_ *HvsockListener, err error) { l := &HvsockListener{addr: *addr} var sock *win32File sock, err = newHVSocket() if err != nil { return nil, l.opErr("listen", err) } defer func() { if err != nil { _ = sock.Close() } }() sa := addr.raw() err = socket.Bind(sock.handle, &sa) if err != nil { return nil, l.opErr("listen", os.NewSyscallError("socket", err)) } err = windows.Listen(sock.handle, 16) if err != nil { return nil, l.opErr("listen", os.NewSyscallError("listen", err)) } return &HvsockListener{sock: sock, addr: *addr}, nil } func (l *HvsockListener) opErr(op string, err error) error { return &net.OpError{Op: op, Net: "hvsock", Addr: &l.addr, Err: err} } // Addr returns the listener's network address. func (l *HvsockListener) Addr() net.Addr { return &l.addr } // Accept waits for the next connection and returns it. func (l *HvsockListener) Accept() (_ net.Conn, err error) { sock, err := newHVSocket() if err != nil { return nil, l.opErr("accept", err) } defer func() { if sock != nil { sock.Close() } }() c, err := l.sock.prepareIO() if err != nil { return nil, l.opErr("accept", err) } defer l.sock.wg.Done() // AcceptEx, per documentation, requires an extra 16 bytes per address. // // https://docs.microsoft.com/en-us/windows/win32/api/mswsock/nf-mswsock-acceptex const addrlen = uint32(16 + unsafe.Sizeof(rawHvsockAddr{})) var addrbuf [addrlen * 2]byte var bytes uint32 err = windows.AcceptEx(l.sock.handle, sock.handle, &addrbuf[0], 0 /* rxdatalen */, addrlen, addrlen, &bytes, &c.o) if _, err = l.sock.asyncIO(c, nil, bytes, err); err != nil { return nil, l.opErr("accept", os.NewSyscallError("acceptex", err)) } conn := &HvsockConn{ sock: sock, } // The local address returned in the AcceptEx buffer is the same as the Listener socket's // address. However, the service GUID reported by GetSockName is different from the Listeners // socket, and is sometimes the same as the local address of the socket that dialed the // address, with the service GUID.Data1 incremented, but othertimes is different. // todo: does the local address matter? is the listener's address or the actual address appropriate? conn.local.fromRaw((*rawHvsockAddr)(unsafe.Pointer(&addrbuf[0]))) conn.remote.fromRaw((*rawHvsockAddr)(unsafe.Pointer(&addrbuf[addrlen]))) // initialize the accepted socket and update its properties with those of the listening socket if err = windows.Setsockopt(sock.handle, windows.SOL_SOCKET, windows.SO_UPDATE_ACCEPT_CONTEXT, (*byte)(unsafe.Pointer(&l.sock.handle)), int32(unsafe.Sizeof(l.sock.handle))); err != nil { return nil, conn.opErr("accept", os.NewSyscallError("setsockopt", err)) } sock = nil return conn, nil } // Close closes the listener, causing any pending Accept calls to fail. func (l *HvsockListener) Close() error { return l.sock.Close() } // HvsockDialer configures and dials a Hyper-V Socket (ie, [HvsockConn]). type HvsockDialer struct { // Deadline is the time the Dial operation must connect before erroring. Deadline time.Time // Retries is the number of additional connects to try if the connection times out, is refused, // or the host is unreachable Retries uint // RetryWait is the time to wait after a connection error to retry RetryWait time.Duration rt *time.Timer // redial wait timer } // Dial the Hyper-V socket at addr. // // See [HvsockDialer.Dial] for more information. func Dial(ctx context.Context, addr *HvsockAddr) (conn *HvsockConn, err error) { return (&HvsockDialer{}).Dial(ctx, addr) } // Dial attempts to connect to the Hyper-V socket at addr, and returns a connection if successful. // Will attempt (HvsockDialer).Retries if dialing fails, waiting (HvsockDialer).RetryWait between // retries. // // Dialing can be cancelled either by providing (HvsockDialer).Deadline, or cancelling ctx. func (d *HvsockDialer) Dial(ctx context.Context, addr *HvsockAddr) (conn *HvsockConn, err error) { op := "dial" // create the conn early to use opErr() conn = &HvsockConn{ remote: *addr, } if !d.Deadline.IsZero() { var cancel context.CancelFunc ctx, cancel = context.WithDeadline(ctx, d.Deadline) defer cancel() } // preemptive timeout/cancellation check if err = ctx.Err(); err != nil { return nil, conn.opErr(op, err) } sock, err := newHVSocket() if err != nil { return nil, conn.opErr(op, err) } defer func() { if sock != nil { sock.Close() } }() sa := addr.raw() err = socket.Bind(sock.handle, &sa) if err != nil { return nil, conn.opErr(op, os.NewSyscallError("bind", err)) } c, err := sock.prepareIO() if err != nil { return nil, conn.opErr(op, err) } defer sock.wg.Done() var bytes uint32 for i := uint(0); i <= d.Retries; i++ { err = socket.ConnectEx( sock.handle, &sa, nil, // sendBuf 0, // sendDataLen &bytes, (*windows.Overlapped)(unsafe.Pointer(&c.o))) _, err = sock.asyncIO(c, nil, bytes, err) if i < d.Retries && canRedial(err) { if err = d.redialWait(ctx); err == nil { continue } } break } if err != nil { return nil, conn.opErr(op, os.NewSyscallError("connectex", err)) } // update the connection properties, so shutdown can be used if err = windows.Setsockopt( sock.handle, windows.SOL_SOCKET, windows.SO_UPDATE_CONNECT_CONTEXT, nil, // optvalue 0, // optlen ); err != nil { return nil, conn.opErr(op, os.NewSyscallError("setsockopt", err)) } // get the local name var sal rawHvsockAddr err = socket.GetSockName(sock.handle, &sal) if err != nil { return nil, conn.opErr(op, os.NewSyscallError("getsockname", err)) } conn.local.fromRaw(&sal) // one last check for timeout, since asyncIO doesn't check the context if err = ctx.Err(); err != nil { return nil, conn.opErr(op, err) } conn.sock = sock sock = nil return conn, nil } // redialWait waits before attempting to redial, resetting the timer as appropriate. func (d *HvsockDialer) redialWait(ctx context.Context) (err error) { if d.RetryWait == 0 { return nil } if d.rt == nil { d.rt = time.NewTimer(d.RetryWait) } else { // should already be stopped and drained d.rt.Reset(d.RetryWait) } select { case <-ctx.Done(): case <-d.rt.C: return nil } // stop and drain the timer if !d.rt.Stop() { <-d.rt.C } return ctx.Err() } // assumes error is a plain, unwrapped windows.Errno provided by direct syscall. func canRedial(err error) bool { //nolint:errorlint // guaranteed to be an Errno switch err { case windows.WSAECONNREFUSED, windows.WSAENETUNREACH, windows.WSAETIMEDOUT, windows.ERROR_CONNECTION_REFUSED, windows.ERROR_CONNECTION_UNAVAIL: return true default: return false } } func (conn *HvsockConn) opErr(op string, err error) error { // translate from "file closed" to "socket closed" if errors.Is(err, ErrFileClosed) { err = socket.ErrSocketClosed } return &net.OpError{Op: op, Net: "hvsock", Source: &conn.local, Addr: &conn.remote, Err: err} } func (conn *HvsockConn) Read(b []byte) (int, error) { c, err := conn.sock.prepareIO() if err != nil { return 0, conn.opErr("read", err) } defer conn.sock.wg.Done() buf := windows.WSABuf{Buf: &b[0], Len: uint32(len(b))} var flags, bytes uint32 err = windows.WSARecv(conn.sock.handle, &buf, 1, &bytes, &flags, &c.o, nil) n, err := conn.sock.asyncIO(c, &conn.sock.readDeadline, bytes, err) if err != nil { var eno windows.Errno if errors.As(err, &eno) { err = os.NewSyscallError("wsarecv", eno) } return 0, conn.opErr("read", err) } else if n == 0 { err = io.EOF } return n, err } func (conn *HvsockConn) Write(b []byte) (int, error) { t := 0 for len(b) != 0 { n, err := conn.write(b) if err != nil { return t + n, err } t += n b = b[n:] } return t, nil } func (conn *HvsockConn) write(b []byte) (int, error) { c, err := conn.sock.prepareIO() if err != nil { return 0, conn.opErr("write", err) } defer conn.sock.wg.Done() buf := windows.WSABuf{Buf: &b[0], Len: uint32(len(b))} var bytes uint32 err = windows.WSASend(conn.sock.handle, &buf, 1, &bytes, 0, &c.o, nil) n, err := conn.sock.asyncIO(c, &conn.sock.writeDeadline, bytes, err) if err != nil { var eno windows.Errno if errors.As(err, &eno) { err = os.NewSyscallError("wsasend", eno) } return 0, conn.opErr("write", err) } return n, err } // Close closes the socket connection, failing any pending read or write calls. func (conn *HvsockConn) Close() error { return conn.sock.Close() } func (conn *HvsockConn) IsClosed() bool { return conn.sock.IsClosed() } // shutdown disables sending or receiving on a socket. func (conn *HvsockConn) shutdown(how int) error { if conn.IsClosed() { return socket.ErrSocketClosed } err := windows.Shutdown(conn.sock.handle, how) if err != nil { // If the connection was closed, shutdowns fail with "not connected" if errors.Is(err, windows.WSAENOTCONN) || errors.Is(err, windows.WSAESHUTDOWN) { err = socket.ErrSocketClosed } return os.NewSyscallError("shutdown", err) } return nil } // CloseRead shuts down the read end of the socket, preventing future read operations. func (conn *HvsockConn) CloseRead() error { err := conn.shutdown(windows.SHUT_RD) if err != nil { return conn.opErr("closeread", err) } return nil } // CloseWrite shuts down the write end of the socket, preventing future write operations and // notifying the other endpoint that no more data will be written. func (conn *HvsockConn) CloseWrite() error { err := conn.shutdown(windows.SHUT_WR) if err != nil { return conn.opErr("closewrite", err) } return nil } // LocalAddr returns the local address of the connection. func (conn *HvsockConn) LocalAddr() net.Addr { return &conn.local } // RemoteAddr returns the remote address of the connection. func (conn *HvsockConn) RemoteAddr() net.Addr { return &conn.remote } // SetDeadline implements the net.Conn SetDeadline method. func (conn *HvsockConn) SetDeadline(t time.Time) error { // todo: implement `SetDeadline` for `win32File` if err := conn.SetReadDeadline(t); err != nil { return fmt.Errorf("set read deadline: %w", err) } if err := conn.SetWriteDeadline(t); err != nil { return fmt.Errorf("set write deadline: %w", err) } return nil } // SetReadDeadline implements the net.Conn SetReadDeadline method. func (conn *HvsockConn) SetReadDeadline(t time.Time) error { return conn.sock.SetReadDeadline(t) } // SetWriteDeadline implements the net.Conn SetWriteDeadline method. func (conn *HvsockConn) SetWriteDeadline(t time.Time) error { return conn.sock.SetWriteDeadline(t) } ================================================ FILE: vendor/github.com/Microsoft/go-winio/internal/fs/doc.go ================================================ // This package contains Win32 filesystem functionality. package fs ================================================ FILE: vendor/github.com/Microsoft/go-winio/internal/fs/fs.go ================================================ //go:build windows package fs import ( "golang.org/x/sys/windows" "github.com/Microsoft/go-winio/internal/stringbuffer" ) //go:generate go run github.com/Microsoft/go-winio/tools/mkwinsyscall -output zsyscall_windows.go fs.go // https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilew //sys CreateFile(name string, access AccessMask, mode FileShareMode, sa *windows.SecurityAttributes, createmode FileCreationDisposition, attrs FileFlagOrAttribute, templatefile windows.Handle) (handle windows.Handle, err error) [failretval==windows.InvalidHandle] = CreateFileW const NullHandle windows.Handle = 0 // AccessMask defines standard, specific, and generic rights. // // Used with CreateFile and NtCreateFile (and co.). // // Bitmask: // 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 // 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 // +---------------+---------------+-------------------------------+ // |G|G|G|G|Resvd|A| StandardRights| SpecificRights | // |R|W|E|A| |S| | | // +-+-------------+---------------+-------------------------------+ // // GR Generic Read // GW Generic Write // GE Generic Exectue // GA Generic All // Resvd Reserved // AS Access Security System // // https://learn.microsoft.com/en-us/windows/win32/secauthz/access-mask // // https://learn.microsoft.com/en-us/windows/win32/secauthz/generic-access-rights // // https://learn.microsoft.com/en-us/windows/win32/fileio/file-access-rights-constants type AccessMask = windows.ACCESS_MASK //nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API. const ( // Not actually any. // // For CreateFile: "query certain metadata such as file, directory, or device attributes without accessing that file or device" // https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilew#parameters FILE_ANY_ACCESS AccessMask = 0 GENERIC_READ AccessMask = 0x8000_0000 GENERIC_WRITE AccessMask = 0x4000_0000 GENERIC_EXECUTE AccessMask = 0x2000_0000 GENERIC_ALL AccessMask = 0x1000_0000 ACCESS_SYSTEM_SECURITY AccessMask = 0x0100_0000 // Specific Object Access // from ntioapi.h FILE_READ_DATA AccessMask = (0x0001) // file & pipe FILE_LIST_DIRECTORY AccessMask = (0x0001) // directory FILE_WRITE_DATA AccessMask = (0x0002) // file & pipe FILE_ADD_FILE AccessMask = (0x0002) // directory FILE_APPEND_DATA AccessMask = (0x0004) // file FILE_ADD_SUBDIRECTORY AccessMask = (0x0004) // directory FILE_CREATE_PIPE_INSTANCE AccessMask = (0x0004) // named pipe FILE_READ_EA AccessMask = (0x0008) // file & directory FILE_READ_PROPERTIES AccessMask = FILE_READ_EA FILE_WRITE_EA AccessMask = (0x0010) // file & directory FILE_WRITE_PROPERTIES AccessMask = FILE_WRITE_EA FILE_EXECUTE AccessMask = (0x0020) // file FILE_TRAVERSE AccessMask = (0x0020) // directory FILE_DELETE_CHILD AccessMask = (0x0040) // directory FILE_READ_ATTRIBUTES AccessMask = (0x0080) // all FILE_WRITE_ATTRIBUTES AccessMask = (0x0100) // all FILE_ALL_ACCESS AccessMask = (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x1FF) FILE_GENERIC_READ AccessMask = (STANDARD_RIGHTS_READ | FILE_READ_DATA | FILE_READ_ATTRIBUTES | FILE_READ_EA | SYNCHRONIZE) FILE_GENERIC_WRITE AccessMask = (STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | FILE_APPEND_DATA | SYNCHRONIZE) FILE_GENERIC_EXECUTE AccessMask = (STANDARD_RIGHTS_EXECUTE | FILE_READ_ATTRIBUTES | FILE_EXECUTE | SYNCHRONIZE) SPECIFIC_RIGHTS_ALL AccessMask = 0x0000FFFF // Standard Access // from ntseapi.h DELETE AccessMask = 0x0001_0000 READ_CONTROL AccessMask = 0x0002_0000 WRITE_DAC AccessMask = 0x0004_0000 WRITE_OWNER AccessMask = 0x0008_0000 SYNCHRONIZE AccessMask = 0x0010_0000 STANDARD_RIGHTS_REQUIRED AccessMask = 0x000F_0000 STANDARD_RIGHTS_READ AccessMask = READ_CONTROL STANDARD_RIGHTS_WRITE AccessMask = READ_CONTROL STANDARD_RIGHTS_EXECUTE AccessMask = READ_CONTROL STANDARD_RIGHTS_ALL AccessMask = 0x001F_0000 ) type FileShareMode uint32 //nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API. const ( FILE_SHARE_NONE FileShareMode = 0x00 FILE_SHARE_READ FileShareMode = 0x01 FILE_SHARE_WRITE FileShareMode = 0x02 FILE_SHARE_DELETE FileShareMode = 0x04 FILE_SHARE_VALID_FLAGS FileShareMode = 0x07 ) type FileCreationDisposition uint32 //nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API. const ( // from winbase.h CREATE_NEW FileCreationDisposition = 0x01 CREATE_ALWAYS FileCreationDisposition = 0x02 OPEN_EXISTING FileCreationDisposition = 0x03 OPEN_ALWAYS FileCreationDisposition = 0x04 TRUNCATE_EXISTING FileCreationDisposition = 0x05 ) // Create disposition values for NtCreate* type NTFileCreationDisposition uint32 //nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API. const ( // From ntioapi.h FILE_SUPERSEDE NTFileCreationDisposition = 0x00 FILE_OPEN NTFileCreationDisposition = 0x01 FILE_CREATE NTFileCreationDisposition = 0x02 FILE_OPEN_IF NTFileCreationDisposition = 0x03 FILE_OVERWRITE NTFileCreationDisposition = 0x04 FILE_OVERWRITE_IF NTFileCreationDisposition = 0x05 FILE_MAXIMUM_DISPOSITION NTFileCreationDisposition = 0x05 ) // CreateFile and co. take flags or attributes together as one parameter. // Define alias until we can use generics to allow both // // https://learn.microsoft.com/en-us/windows/win32/fileio/file-attribute-constants type FileFlagOrAttribute uint32 //nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API. const ( // from winnt.h FILE_FLAG_WRITE_THROUGH FileFlagOrAttribute = 0x8000_0000 FILE_FLAG_OVERLAPPED FileFlagOrAttribute = 0x4000_0000 FILE_FLAG_NO_BUFFERING FileFlagOrAttribute = 0x2000_0000 FILE_FLAG_RANDOM_ACCESS FileFlagOrAttribute = 0x1000_0000 FILE_FLAG_SEQUENTIAL_SCAN FileFlagOrAttribute = 0x0800_0000 FILE_FLAG_DELETE_ON_CLOSE FileFlagOrAttribute = 0x0400_0000 FILE_FLAG_BACKUP_SEMANTICS FileFlagOrAttribute = 0x0200_0000 FILE_FLAG_POSIX_SEMANTICS FileFlagOrAttribute = 0x0100_0000 FILE_FLAG_OPEN_REPARSE_POINT FileFlagOrAttribute = 0x0020_0000 FILE_FLAG_OPEN_NO_RECALL FileFlagOrAttribute = 0x0010_0000 FILE_FLAG_FIRST_PIPE_INSTANCE FileFlagOrAttribute = 0x0008_0000 ) // NtCreate* functions take a dedicated CreateOptions parameter. // // https://learn.microsoft.com/en-us/windows/win32/api/Winternl/nf-winternl-ntcreatefile // // https://learn.microsoft.com/en-us/windows/win32/devnotes/nt-create-named-pipe-file type NTCreateOptions uint32 //nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API. const ( // From ntioapi.h FILE_DIRECTORY_FILE NTCreateOptions = 0x0000_0001 FILE_WRITE_THROUGH NTCreateOptions = 0x0000_0002 FILE_SEQUENTIAL_ONLY NTCreateOptions = 0x0000_0004 FILE_NO_INTERMEDIATE_BUFFERING NTCreateOptions = 0x0000_0008 FILE_SYNCHRONOUS_IO_ALERT NTCreateOptions = 0x0000_0010 FILE_SYNCHRONOUS_IO_NONALERT NTCreateOptions = 0x0000_0020 FILE_NON_DIRECTORY_FILE NTCreateOptions = 0x0000_0040 FILE_CREATE_TREE_CONNECTION NTCreateOptions = 0x0000_0080 FILE_COMPLETE_IF_OPLOCKED NTCreateOptions = 0x0000_0100 FILE_NO_EA_KNOWLEDGE NTCreateOptions = 0x0000_0200 FILE_DISABLE_TUNNELING NTCreateOptions = 0x0000_0400 FILE_RANDOM_ACCESS NTCreateOptions = 0x0000_0800 FILE_DELETE_ON_CLOSE NTCreateOptions = 0x0000_1000 FILE_OPEN_BY_FILE_ID NTCreateOptions = 0x0000_2000 FILE_OPEN_FOR_BACKUP_INTENT NTCreateOptions = 0x0000_4000 FILE_NO_COMPRESSION NTCreateOptions = 0x0000_8000 ) type FileSQSFlag = FileFlagOrAttribute //nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API. const ( // from winbase.h SECURITY_ANONYMOUS FileSQSFlag = FileSQSFlag(SecurityAnonymous << 16) SECURITY_IDENTIFICATION FileSQSFlag = FileSQSFlag(SecurityIdentification << 16) SECURITY_IMPERSONATION FileSQSFlag = FileSQSFlag(SecurityImpersonation << 16) SECURITY_DELEGATION FileSQSFlag = FileSQSFlag(SecurityDelegation << 16) SECURITY_SQOS_PRESENT FileSQSFlag = 0x0010_0000 SECURITY_VALID_SQOS_FLAGS FileSQSFlag = 0x001F_0000 ) // GetFinalPathNameByHandle flags // // https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfinalpathnamebyhandlew#parameters type GetFinalPathFlag uint32 //nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API. const ( GetFinalPathDefaultFlag GetFinalPathFlag = 0x0 FILE_NAME_NORMALIZED GetFinalPathFlag = 0x0 FILE_NAME_OPENED GetFinalPathFlag = 0x8 VOLUME_NAME_DOS GetFinalPathFlag = 0x0 VOLUME_NAME_GUID GetFinalPathFlag = 0x1 VOLUME_NAME_NT GetFinalPathFlag = 0x2 VOLUME_NAME_NONE GetFinalPathFlag = 0x4 ) // getFinalPathNameByHandle facilitates calling the Windows API GetFinalPathNameByHandle // with the given handle and flags. It transparently takes care of creating a buffer of the // correct size for the call. // // https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfinalpathnamebyhandlew func GetFinalPathNameByHandle(h windows.Handle, flags GetFinalPathFlag) (string, error) { b := stringbuffer.NewWString() //TODO: can loop infinitely if Win32 keeps returning the same (or a larger) n? for { n, err := windows.GetFinalPathNameByHandle(h, b.Pointer(), b.Cap(), uint32(flags)) if err != nil { return "", err } // If the buffer wasn't large enough, n will be the total size needed (including null terminator). // Resize and try again. if n > b.Cap() { b.ResizeTo(n) continue } // If the buffer is large enough, n will be the size not including the null terminator. // Convert to a Go string and return. return b.String(), nil } } ================================================ FILE: vendor/github.com/Microsoft/go-winio/internal/fs/security.go ================================================ package fs // https://learn.microsoft.com/en-us/windows/win32/api/winnt/ne-winnt-security_impersonation_level type SecurityImpersonationLevel int32 // C default enums underlying type is `int`, which is Go `int32` // Impersonation levels const ( SecurityAnonymous SecurityImpersonationLevel = 0 SecurityIdentification SecurityImpersonationLevel = 1 SecurityImpersonation SecurityImpersonationLevel = 2 SecurityDelegation SecurityImpersonationLevel = 3 ) ================================================ FILE: vendor/github.com/Microsoft/go-winio/internal/fs/zsyscall_windows.go ================================================ //go:build windows // Code generated by 'go generate' using "github.com/Microsoft/go-winio/tools/mkwinsyscall"; DO NOT EDIT. package fs import ( "syscall" "unsafe" "golang.org/x/sys/windows" ) var _ unsafe.Pointer // Do the interface allocations only once for common // Errno values. const ( errnoERROR_IO_PENDING = 997 ) var ( errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING) errERROR_EINVAL error = syscall.EINVAL ) // errnoErr returns common boxed Errno values, to prevent // allocations at runtime. func errnoErr(e syscall.Errno) error { switch e { case 0: return errERROR_EINVAL case errnoERROR_IO_PENDING: return errERROR_IO_PENDING } return e } var ( modkernel32 = windows.NewLazySystemDLL("kernel32.dll") procCreateFileW = modkernel32.NewProc("CreateFileW") ) func CreateFile(name string, access AccessMask, mode FileShareMode, sa *windows.SecurityAttributes, createmode FileCreationDisposition, attrs FileFlagOrAttribute, templatefile windows.Handle) (handle windows.Handle, err error) { var _p0 *uint16 _p0, err = syscall.UTF16PtrFromString(name) if err != nil { return } return _CreateFile(_p0, access, mode, sa, createmode, attrs, templatefile) } func _CreateFile(name *uint16, access AccessMask, mode FileShareMode, sa *windows.SecurityAttributes, createmode FileCreationDisposition, attrs FileFlagOrAttribute, templatefile windows.Handle) (handle windows.Handle, err error) { r0, _, e1 := syscall.SyscallN(procCreateFileW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(access), uintptr(mode), uintptr(unsafe.Pointer(sa)), uintptr(createmode), uintptr(attrs), uintptr(templatefile)) handle = windows.Handle(r0) if handle == windows.InvalidHandle { err = errnoErr(e1) } return } ================================================ FILE: vendor/github.com/Microsoft/go-winio/internal/socket/rawaddr.go ================================================ package socket import ( "unsafe" ) // RawSockaddr allows structs to be used with [Bind] and [ConnectEx]. The // struct must meet the Win32 sockaddr requirements specified here: // https://docs.microsoft.com/en-us/windows/win32/winsock/sockaddr-2 // // Specifically, the struct size must be least larger than an int16 (unsigned short) // for the address family. type RawSockaddr interface { // Sockaddr returns a pointer to the RawSockaddr and its struct size, allowing // for the RawSockaddr's data to be overwritten by syscalls (if necessary). // // It is the callers responsibility to validate that the values are valid; invalid // pointers or size can cause a panic. Sockaddr() (unsafe.Pointer, int32, error) } ================================================ FILE: vendor/github.com/Microsoft/go-winio/internal/socket/socket.go ================================================ //go:build windows package socket import ( "errors" "fmt" "net" "sync" "syscall" "unsafe" "github.com/Microsoft/go-winio/pkg/guid" "golang.org/x/sys/windows" ) //go:generate go run github.com/Microsoft/go-winio/tools/mkwinsyscall -output zsyscall_windows.go socket.go //sys getsockname(s windows.Handle, name unsafe.Pointer, namelen *int32) (err error) [failretval==socketError] = ws2_32.getsockname //sys getpeername(s windows.Handle, name unsafe.Pointer, namelen *int32) (err error) [failretval==socketError] = ws2_32.getpeername //sys bind(s windows.Handle, name unsafe.Pointer, namelen int32) (err error) [failretval==socketError] = ws2_32.bind const socketError = uintptr(^uint32(0)) var ( // todo(helsaawy): create custom error types to store the desired vs actual size and addr family? ErrBufferSize = errors.New("buffer size") ErrAddrFamily = errors.New("address family") ErrInvalidPointer = errors.New("invalid pointer") ErrSocketClosed = fmt.Errorf("socket closed: %w", net.ErrClosed) ) // todo(helsaawy): replace these with generics, ie: GetSockName[S RawSockaddr](s windows.Handle) (S, error) // GetSockName writes the local address of socket s to the [RawSockaddr] rsa. // If rsa is not large enough, the [windows.WSAEFAULT] is returned. func GetSockName(s windows.Handle, rsa RawSockaddr) error { ptr, l, err := rsa.Sockaddr() if err != nil { return fmt.Errorf("could not retrieve socket pointer and size: %w", err) } // although getsockname returns WSAEFAULT if the buffer is too small, it does not set // &l to the correct size, so--apart from doubling the buffer repeatedly--there is no remedy return getsockname(s, ptr, &l) } // GetPeerName returns the remote address the socket is connected to. // // See [GetSockName] for more information. func GetPeerName(s windows.Handle, rsa RawSockaddr) error { ptr, l, err := rsa.Sockaddr() if err != nil { return fmt.Errorf("could not retrieve socket pointer and size: %w", err) } return getpeername(s, ptr, &l) } func Bind(s windows.Handle, rsa RawSockaddr) (err error) { ptr, l, err := rsa.Sockaddr() if err != nil { return fmt.Errorf("could not retrieve socket pointer and size: %w", err) } return bind(s, ptr, l) } // "golang.org/x/sys/windows".ConnectEx and .Bind only accept internal implementations of the // their sockaddr interface, so they cannot be used with HvsockAddr // Replicate functionality here from // https://cs.opensource.google/go/x/sys/+/master:windows/syscall_windows.go // The function pointers to `AcceptEx`, `ConnectEx` and `GetAcceptExSockaddrs` must be loaded at // runtime via a WSAIoctl call: // https://docs.microsoft.com/en-us/windows/win32/api/Mswsock/nc-mswsock-lpfn_connectex#remarks type runtimeFunc struct { id guid.GUID once sync.Once addr uintptr err error } func (f *runtimeFunc) Load() error { f.once.Do(func() { var s windows.Handle s, f.err = windows.Socket(windows.AF_INET, windows.SOCK_STREAM, windows.IPPROTO_TCP) if f.err != nil { return } defer windows.CloseHandle(s) //nolint:errcheck var n uint32 f.err = windows.WSAIoctl(s, windows.SIO_GET_EXTENSION_FUNCTION_POINTER, (*byte)(unsafe.Pointer(&f.id)), uint32(unsafe.Sizeof(f.id)), (*byte)(unsafe.Pointer(&f.addr)), uint32(unsafe.Sizeof(f.addr)), &n, nil, // overlapped 0, // completionRoutine ) }) return f.err } var ( // todo: add `AcceptEx` and `GetAcceptExSockaddrs` WSAID_CONNECTEX = guid.GUID{ //revive:disable-line:var-naming ALL_CAPS Data1: 0x25a207b9, Data2: 0xddf3, Data3: 0x4660, Data4: [8]byte{0x8e, 0xe9, 0x76, 0xe5, 0x8c, 0x74, 0x06, 0x3e}, } connectExFunc = runtimeFunc{id: WSAID_CONNECTEX} ) func ConnectEx( fd windows.Handle, rsa RawSockaddr, sendBuf *byte, sendDataLen uint32, bytesSent *uint32, overlapped *windows.Overlapped, ) error { if err := connectExFunc.Load(); err != nil { return fmt.Errorf("failed to load ConnectEx function pointer: %w", err) } ptr, n, err := rsa.Sockaddr() if err != nil { return err } return connectEx(fd, ptr, n, sendBuf, sendDataLen, bytesSent, overlapped) } // BOOL LpfnConnectex( // [in] SOCKET s, // [in] const sockaddr *name, // [in] int namelen, // [in, optional] PVOID lpSendBuffer, // [in] DWORD dwSendDataLength, // [out] LPDWORD lpdwBytesSent, // [in] LPOVERLAPPED lpOverlapped // ) func connectEx( s windows.Handle, name unsafe.Pointer, namelen int32, sendBuf *byte, sendDataLen uint32, bytesSent *uint32, overlapped *windows.Overlapped, ) (err error) { r1, _, e1 := syscall.SyscallN(connectExFunc.addr, uintptr(s), uintptr(name), uintptr(namelen), uintptr(unsafe.Pointer(sendBuf)), uintptr(sendDataLen), uintptr(unsafe.Pointer(bytesSent)), uintptr(unsafe.Pointer(overlapped)), ) if r1 == 0 { if e1 != 0 { err = error(e1) } else { err = syscall.EINVAL } } return err } ================================================ FILE: vendor/github.com/Microsoft/go-winio/internal/socket/zsyscall_windows.go ================================================ //go:build windows // Code generated by 'go generate' using "github.com/Microsoft/go-winio/tools/mkwinsyscall"; DO NOT EDIT. package socket import ( "syscall" "unsafe" "golang.org/x/sys/windows" ) var _ unsafe.Pointer // Do the interface allocations only once for common // Errno values. const ( errnoERROR_IO_PENDING = 997 ) var ( errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING) errERROR_EINVAL error = syscall.EINVAL ) // errnoErr returns common boxed Errno values, to prevent // allocations at runtime. func errnoErr(e syscall.Errno) error { switch e { case 0: return errERROR_EINVAL case errnoERROR_IO_PENDING: return errERROR_IO_PENDING } return e } var ( modws2_32 = windows.NewLazySystemDLL("ws2_32.dll") procbind = modws2_32.NewProc("bind") procgetpeername = modws2_32.NewProc("getpeername") procgetsockname = modws2_32.NewProc("getsockname") ) func bind(s windows.Handle, name unsafe.Pointer, namelen int32) (err error) { r1, _, e1 := syscall.SyscallN(procbind.Addr(), uintptr(s), uintptr(name), uintptr(namelen)) if r1 == socketError { err = errnoErr(e1) } return } func getpeername(s windows.Handle, name unsafe.Pointer, namelen *int32) (err error) { r1, _, e1 := syscall.SyscallN(procgetpeername.Addr(), uintptr(s), uintptr(name), uintptr(unsafe.Pointer(namelen))) if r1 == socketError { err = errnoErr(e1) } return } func getsockname(s windows.Handle, name unsafe.Pointer, namelen *int32) (err error) { r1, _, e1 := syscall.SyscallN(procgetsockname.Addr(), uintptr(s), uintptr(name), uintptr(unsafe.Pointer(namelen))) if r1 == socketError { err = errnoErr(e1) } return } ================================================ FILE: vendor/github.com/Microsoft/go-winio/internal/stringbuffer/wstring.go ================================================ package stringbuffer import ( "sync" "unicode/utf16" ) // TODO: worth exporting and using in mkwinsyscall? // Uint16BufferSize is the buffer size in the pool, chosen somewhat arbitrarily to accommodate // large path strings: // MAX_PATH (260) + size of volume GUID prefix (49) + null terminator = 310. const MinWStringCap = 310 // use *[]uint16 since []uint16 creates an extra allocation where the slice header // is copied to heap and then referenced via pointer in the interface header that sync.Pool // stores. var pathPool = sync.Pool{ // if go1.18+ adds Pool[T], use that to store []uint16 directly New: func() interface{} { b := make([]uint16, MinWStringCap) return &b }, } func newBuffer() []uint16 { return *(pathPool.Get().(*[]uint16)) } // freeBuffer copies the slice header data, and puts a pointer to that in the pool. // This avoids taking a pointer to the slice header in WString, which can be set to nil. func freeBuffer(b []uint16) { pathPool.Put(&b) } // WString is a wide string buffer ([]uint16) meant for storing UTF-16 encoded strings // for interacting with Win32 APIs. // Sizes are specified as uint32 and not int. // // It is not thread safe. type WString struct { // type-def allows casting to []uint16 directly, use struct to prevent that and allow adding fields in the future. // raw buffer b []uint16 } // NewWString returns a [WString] allocated from a shared pool with an // initial capacity of at least [MinWStringCap]. // Since the buffer may have been previously used, its contents are not guaranteed to be empty. // // The buffer should be freed via [WString.Free] func NewWString() *WString { return &WString{ b: newBuffer(), } } func (b *WString) Free() { if b.empty() { return } freeBuffer(b.b) b.b = nil } // ResizeTo grows the buffer to at least c and returns the new capacity, freeing the // previous buffer back into pool. func (b *WString) ResizeTo(c uint32) uint32 { // already sufficient (or n is 0) if c <= b.Cap() { return b.Cap() } if c <= MinWStringCap { c = MinWStringCap } // allocate at-least double buffer size, as is done in [bytes.Buffer] and other places if c <= 2*b.Cap() { c = 2 * b.Cap() } b2 := make([]uint16, c) if !b.empty() { copy(b2, b.b) freeBuffer(b.b) } b.b = b2 return c } // Buffer returns the underlying []uint16 buffer. func (b *WString) Buffer() []uint16 { if b.empty() { return nil } return b.b } // Pointer returns a pointer to the first uint16 in the buffer. // If the [WString.Free] has already been called, the pointer will be nil. func (b *WString) Pointer() *uint16 { if b.empty() { return nil } return &b.b[0] } // String returns the returns the UTF-8 encoding of the UTF-16 string in the buffer. // // It assumes that the data is null-terminated. func (b *WString) String() string { // Using [windows.UTF16ToString] would require importing "golang.org/x/sys/windows" // and would make this code Windows-only, which makes no sense. // So copy UTF16ToString code into here. // If other windows-specific code is added, switch to [windows.UTF16ToString] s := b.b for i, v := range s { if v == 0 { s = s[:i] break } } return string(utf16.Decode(s)) } // Cap returns the underlying buffer capacity. func (b *WString) Cap() uint32 { if b.empty() { return 0 } return b.cap() } func (b *WString) cap() uint32 { return uint32(cap(b.b)) } func (b *WString) empty() bool { return b == nil || b.cap() == 0 } ================================================ FILE: vendor/github.com/Microsoft/go-winio/pipe.go ================================================ //go:build windows // +build windows package winio import ( "context" "errors" "fmt" "io" "net" "os" "runtime" "time" "unsafe" "golang.org/x/sys/windows" "github.com/Microsoft/go-winio/internal/fs" ) //sys connectNamedPipe(pipe windows.Handle, o *windows.Overlapped) (err error) = ConnectNamedPipe //sys createNamedPipe(name string, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *windows.SecurityAttributes) (handle windows.Handle, err error) [failretval==windows.InvalidHandle] = CreateNamedPipeW //sys disconnectNamedPipe(pipe windows.Handle) (err error) = DisconnectNamedPipe //sys getNamedPipeInfo(pipe windows.Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) = GetNamedPipeInfo //sys getNamedPipeHandleState(pipe windows.Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) = GetNamedPipeHandleStateW //sys ntCreateNamedPipeFile(pipe *windows.Handle, access ntAccessMask, oa *objectAttributes, iosb *ioStatusBlock, share ntFileShareMode, disposition ntFileCreationDisposition, options ntFileOptions, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (status ntStatus) = ntdll.NtCreateNamedPipeFile //sys rtlNtStatusToDosError(status ntStatus) (winerr error) = ntdll.RtlNtStatusToDosErrorNoTeb //sys rtlDosPathNameToNtPathName(name *uint16, ntName *unicodeString, filePart uintptr, reserved uintptr) (status ntStatus) = ntdll.RtlDosPathNameToNtPathName_U //sys rtlDefaultNpAcl(dacl *uintptr) (status ntStatus) = ntdll.RtlDefaultNpAcl type PipeConn interface { net.Conn Disconnect() error Flush() error } // type aliases for mkwinsyscall code type ( ntAccessMask = fs.AccessMask ntFileShareMode = fs.FileShareMode ntFileCreationDisposition = fs.NTFileCreationDisposition ntFileOptions = fs.NTCreateOptions ) type ioStatusBlock struct { Status, Information uintptr } // typedef struct _OBJECT_ATTRIBUTES { // ULONG Length; // HANDLE RootDirectory; // PUNICODE_STRING ObjectName; // ULONG Attributes; // PVOID SecurityDescriptor; // PVOID SecurityQualityOfService; // } OBJECT_ATTRIBUTES; // // https://learn.microsoft.com/en-us/windows/win32/api/ntdef/ns-ntdef-_object_attributes type objectAttributes struct { Length uintptr RootDirectory uintptr ObjectName *unicodeString Attributes uintptr SecurityDescriptor *securityDescriptor SecurityQoS uintptr } type unicodeString struct { Length uint16 MaximumLength uint16 Buffer uintptr } // typedef struct _SECURITY_DESCRIPTOR { // BYTE Revision; // BYTE Sbz1; // SECURITY_DESCRIPTOR_CONTROL Control; // PSID Owner; // PSID Group; // PACL Sacl; // PACL Dacl; // } SECURITY_DESCRIPTOR, *PISECURITY_DESCRIPTOR; // // https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-security_descriptor type securityDescriptor struct { Revision byte Sbz1 byte Control uint16 Owner uintptr Group uintptr Sacl uintptr //revive:disable-line:var-naming SACL, not Sacl Dacl uintptr //revive:disable-line:var-naming DACL, not Dacl } type ntStatus int32 func (status ntStatus) Err() error { if status >= 0 { return nil } return rtlNtStatusToDosError(status) } var ( // ErrPipeListenerClosed is returned for pipe operations on listeners that have been closed. ErrPipeListenerClosed = net.ErrClosed errPipeWriteClosed = errors.New("pipe has been closed for write") ) type win32Pipe struct { *win32File path string } var _ PipeConn = (*win32Pipe)(nil) type win32MessageBytePipe struct { win32Pipe writeClosed bool readEOF bool } type pipeAddress string func (f *win32Pipe) LocalAddr() net.Addr { return pipeAddress(f.path) } func (f *win32Pipe) RemoteAddr() net.Addr { return pipeAddress(f.path) } func (f *win32Pipe) SetDeadline(t time.Time) error { if err := f.SetReadDeadline(t); err != nil { return err } return f.SetWriteDeadline(t) } func (f *win32Pipe) Disconnect() error { return disconnectNamedPipe(f.win32File.handle) } // CloseWrite closes the write side of a message pipe in byte mode. func (f *win32MessageBytePipe) CloseWrite() error { if f.writeClosed { return errPipeWriteClosed } err := f.win32File.Flush() if err != nil { return err } _, err = f.win32File.Write(nil) if err != nil { return err } f.writeClosed = true return nil } // Write writes bytes to a message pipe in byte mode. Zero-byte writes are ignored, since // they are used to implement CloseWrite(). func (f *win32MessageBytePipe) Write(b []byte) (int, error) { if f.writeClosed { return 0, errPipeWriteClosed } if len(b) == 0 { return 0, nil } return f.win32File.Write(b) } // Read reads bytes from a message pipe in byte mode. A read of a zero-byte message on a message // mode pipe will return io.EOF, as will all subsequent reads. func (f *win32MessageBytePipe) Read(b []byte) (int, error) { if f.readEOF { return 0, io.EOF } n, err := f.win32File.Read(b) if err == io.EOF { //nolint:errorlint // If this was the result of a zero-byte read, then // it is possible that the read was due to a zero-size // message. Since we are simulating CloseWrite with a // zero-byte message, ensure that all future Read() calls // also return EOF. f.readEOF = true } else if err == windows.ERROR_MORE_DATA { //nolint:errorlint // err is Errno // ERROR_MORE_DATA indicates that the pipe's read mode is message mode // and the message still has more bytes. Treat this as a success, since // this package presents all named pipes as byte streams. err = nil } return n, err } func (pipeAddress) Network() string { return "pipe" } func (s pipeAddress) String() string { return string(s) } // tryDialPipe attempts to dial the pipe at `path` until `ctx` cancellation or timeout. func tryDialPipe(ctx context.Context, path *string, access fs.AccessMask, impLevel PipeImpLevel) (windows.Handle, error) { for { select { case <-ctx.Done(): return windows.Handle(0), ctx.Err() default: h, err := fs.CreateFile(*path, access, 0, // mode nil, // security attributes fs.OPEN_EXISTING, fs.FILE_FLAG_OVERLAPPED|fs.SECURITY_SQOS_PRESENT|fs.FileSQSFlag(impLevel), 0, // template file handle ) if err == nil { return h, nil } if err != windows.ERROR_PIPE_BUSY { //nolint:errorlint // err is Errno return h, &os.PathError{Err: err, Op: "open", Path: *path} } // Wait 10 msec and try again. This is a rather simplistic // view, as we always try each 10 milliseconds. time.Sleep(10 * time.Millisecond) } } } // DialPipe connects to a named pipe by path, timing out if the connection // takes longer than the specified duration. If timeout is nil, then we use // a default timeout of 2 seconds. (We do not use WaitNamedPipe.) func DialPipe(path string, timeout *time.Duration) (net.Conn, error) { var absTimeout time.Time if timeout != nil { absTimeout = time.Now().Add(*timeout) } else { absTimeout = time.Now().Add(2 * time.Second) } ctx, cancel := context.WithDeadline(context.Background(), absTimeout) defer cancel() conn, err := DialPipeContext(ctx, path) if errors.Is(err, context.DeadlineExceeded) { return nil, ErrTimeout } return conn, err } // DialPipeContext attempts to connect to a named pipe by `path` until `ctx` // cancellation or timeout. func DialPipeContext(ctx context.Context, path string) (net.Conn, error) { return DialPipeAccess(ctx, path, uint32(fs.GENERIC_READ|fs.GENERIC_WRITE)) } // PipeImpLevel is an enumeration of impersonation levels that may be set // when calling DialPipeAccessImpersonation. type PipeImpLevel uint32 const ( PipeImpLevelAnonymous = PipeImpLevel(fs.SECURITY_ANONYMOUS) PipeImpLevelIdentification = PipeImpLevel(fs.SECURITY_IDENTIFICATION) PipeImpLevelImpersonation = PipeImpLevel(fs.SECURITY_IMPERSONATION) PipeImpLevelDelegation = PipeImpLevel(fs.SECURITY_DELEGATION) ) // DialPipeAccess attempts to connect to a named pipe by `path` with `access` until `ctx` // cancellation or timeout. func DialPipeAccess(ctx context.Context, path string, access uint32) (net.Conn, error) { return DialPipeAccessImpLevel(ctx, path, access, PipeImpLevelAnonymous) } // DialPipeAccessImpLevel attempts to connect to a named pipe by `path` with // `access` at `impLevel` until `ctx` cancellation or timeout. The other // DialPipe* implementations use PipeImpLevelAnonymous. func DialPipeAccessImpLevel(ctx context.Context, path string, access uint32, impLevel PipeImpLevel) (net.Conn, error) { var err error var h windows.Handle h, err = tryDialPipe(ctx, &path, fs.AccessMask(access), impLevel) if err != nil { return nil, err } var flags uint32 err = getNamedPipeInfo(h, &flags, nil, nil, nil) if err != nil { return nil, err } f, err := makeWin32File(h) if err != nil { windows.Close(h) return nil, err } // If the pipe is in message mode, return a message byte pipe, which // supports CloseWrite(). if flags&windows.PIPE_TYPE_MESSAGE != 0 { return &win32MessageBytePipe{ win32Pipe: win32Pipe{win32File: f, path: path}, }, nil } return &win32Pipe{win32File: f, path: path}, nil } type acceptResponse struct { f *win32File err error } type win32PipeListener struct { firstHandle windows.Handle path string config PipeConfig acceptCh chan (chan acceptResponse) closeCh chan int doneCh chan int } func makeServerPipeHandle(path string, sd []byte, c *PipeConfig, first bool) (windows.Handle, error) { path16, err := windows.UTF16FromString(path) if err != nil { return 0, &os.PathError{Op: "open", Path: path, Err: err} } var oa objectAttributes oa.Length = unsafe.Sizeof(oa) var ntPath unicodeString if err := rtlDosPathNameToNtPathName(&path16[0], &ntPath, 0, 0, ).Err(); err != nil { return 0, &os.PathError{Op: "open", Path: path, Err: err} } defer windows.LocalFree(windows.Handle(ntPath.Buffer)) //nolint:errcheck oa.ObjectName = &ntPath oa.Attributes = windows.OBJ_CASE_INSENSITIVE // The security descriptor is only needed for the first pipe. if first { if sd != nil { //todo: does `sdb` need to be allocated on the heap, or can go allocate it? l := uint32(len(sd)) sdb, err := windows.LocalAlloc(0, l) if err != nil { return 0, fmt.Errorf("LocalAlloc for security descriptor with of length %d: %w", l, err) } defer windows.LocalFree(windows.Handle(sdb)) //nolint:errcheck copy((*[0xffff]byte)(unsafe.Pointer(sdb))[:], sd) oa.SecurityDescriptor = (*securityDescriptor)(unsafe.Pointer(sdb)) } else { // Construct the default named pipe security descriptor. var dacl uintptr if err := rtlDefaultNpAcl(&dacl).Err(); err != nil { return 0, fmt.Errorf("getting default named pipe ACL: %w", err) } defer windows.LocalFree(windows.Handle(dacl)) //nolint:errcheck sdb := &securityDescriptor{ Revision: 1, Control: windows.SE_DACL_PRESENT, Dacl: dacl, } oa.SecurityDescriptor = sdb } } typ := uint32(windows.FILE_PIPE_REJECT_REMOTE_CLIENTS) if c.MessageMode { typ |= windows.FILE_PIPE_MESSAGE_TYPE } disposition := fs.FILE_OPEN access := fs.GENERIC_READ | fs.GENERIC_WRITE | fs.SYNCHRONIZE if first { disposition = fs.FILE_CREATE // By not asking for read or write access, the named pipe file system // will put this pipe into an initially disconnected state, blocking // client connections until the next call with first == false. access = fs.SYNCHRONIZE } timeout := int64(-50 * 10000) // 50ms var ( h windows.Handle iosb ioStatusBlock ) err = ntCreateNamedPipeFile(&h, access, &oa, &iosb, fs.FILE_SHARE_READ|fs.FILE_SHARE_WRITE, disposition, 0, typ, 0, 0, 0xffffffff, uint32(c.InputBufferSize), uint32(c.OutputBufferSize), &timeout).Err() if err != nil { return 0, &os.PathError{Op: "open", Path: path, Err: err} } runtime.KeepAlive(ntPath) return h, nil } func (l *win32PipeListener) makeServerPipe() (*win32File, error) { h, err := makeServerPipeHandle(l.path, nil, &l.config, false) if err != nil { return nil, err } f, err := makeWin32File(h) if err != nil { windows.Close(h) return nil, err } return f, nil } func (l *win32PipeListener) makeConnectedServerPipe() (*win32File, error) { p, err := l.makeServerPipe() if err != nil { return nil, err } // Wait for the client to connect. ch := make(chan error) go func(p *win32File) { ch <- connectPipe(p) }(p) select { case err = <-ch: if err != nil { p.Close() p = nil } case <-l.closeCh: // Abort the connect request by closing the handle. p.Close() p = nil err = <-ch if err == nil || err == ErrFileClosed { //nolint:errorlint // err is Errno err = ErrPipeListenerClosed } } return p, err } func (l *win32PipeListener) listenerRoutine() { closed := false for !closed { select { case <-l.closeCh: closed = true case responseCh := <-l.acceptCh: var ( p *win32File err error ) for { p, err = l.makeConnectedServerPipe() // If the connection was immediately closed by the client, try // again. if err != windows.ERROR_NO_DATA { //nolint:errorlint // err is Errno break } } responseCh <- acceptResponse{p, err} closed = err == ErrPipeListenerClosed //nolint:errorlint // err is Errno } } windows.Close(l.firstHandle) l.firstHandle = 0 // Notify Close() and Accept() callers that the handle has been closed. close(l.doneCh) } // PipeConfig contain configuration for the pipe listener. type PipeConfig struct { // SecurityDescriptor contains a Windows security descriptor in SDDL format. SecurityDescriptor string // MessageMode determines whether the pipe is in byte or message mode. In either // case the pipe is read in byte mode by default. The only practical difference in // this implementation is that CloseWrite() is only supported for message mode pipes; // CloseWrite() is implemented as a zero-byte write, but zero-byte writes are only // transferred to the reader (and returned as io.EOF in this implementation) // when the pipe is in message mode. MessageMode bool // InputBufferSize specifies the size of the input buffer, in bytes. InputBufferSize int32 // OutputBufferSize specifies the size of the output buffer, in bytes. OutputBufferSize int32 } // ListenPipe creates a listener on a Windows named pipe path, e.g. \\.\pipe\mypipe. // The pipe must not already exist. func ListenPipe(path string, c *PipeConfig) (net.Listener, error) { var ( sd []byte err error ) if c == nil { c = &PipeConfig{} } if c.SecurityDescriptor != "" { sd, err = SddlToSecurityDescriptor(c.SecurityDescriptor) if err != nil { return nil, err } } h, err := makeServerPipeHandle(path, sd, c, true) if err != nil { return nil, err } l := &win32PipeListener{ firstHandle: h, path: path, config: *c, acceptCh: make(chan (chan acceptResponse)), closeCh: make(chan int), doneCh: make(chan int), } go l.listenerRoutine() return l, nil } func connectPipe(p *win32File) error { c, err := p.prepareIO() if err != nil { return err } defer p.wg.Done() err = connectNamedPipe(p.handle, &c.o) _, err = p.asyncIO(c, nil, 0, err) if err != nil && err != windows.ERROR_PIPE_CONNECTED { //nolint:errorlint // err is Errno return err } return nil } func (l *win32PipeListener) Accept() (net.Conn, error) { ch := make(chan acceptResponse) select { case l.acceptCh <- ch: response := <-ch err := response.err if err != nil { return nil, err } if l.config.MessageMode { return &win32MessageBytePipe{ win32Pipe: win32Pipe{win32File: response.f, path: l.path}, }, nil } return &win32Pipe{win32File: response.f, path: l.path}, nil case <-l.doneCh: return nil, ErrPipeListenerClosed } } func (l *win32PipeListener) Close() error { select { case l.closeCh <- 1: <-l.doneCh case <-l.doneCh: } return nil } func (l *win32PipeListener) Addr() net.Addr { return pipeAddress(l.path) } ================================================ FILE: vendor/github.com/Microsoft/go-winio/pkg/guid/guid.go ================================================ // Package guid provides a GUID type. The backing structure for a GUID is // identical to that used by the golang.org/x/sys/windows GUID type. // There are two main binary encodings used for a GUID, the big-endian encoding, // and the Windows (mixed-endian) encoding. See here for details: // https://en.wikipedia.org/wiki/Universally_unique_identifier#Encoding package guid import ( "crypto/rand" "crypto/sha1" //nolint:gosec // not used for secure application "encoding" "encoding/binary" "fmt" "strconv" ) //go:generate go run golang.org/x/tools/cmd/stringer -type=Variant -trimprefix=Variant -linecomment // Variant specifies which GUID variant (or "type") of the GUID. It determines // how the entirety of the rest of the GUID is interpreted. type Variant uint8 // The variants specified by RFC 4122 section 4.1.1. const ( // VariantUnknown specifies a GUID variant which does not conform to one of // the variant encodings specified in RFC 4122. VariantUnknown Variant = iota VariantNCS VariantRFC4122 // RFC 4122 VariantMicrosoft VariantFuture ) // Version specifies how the bits in the GUID were generated. For instance, a // version 4 GUID is randomly generated, and a version 5 is generated from the // hash of an input string. type Version uint8 func (v Version) String() string { return strconv.FormatUint(uint64(v), 10) } var _ = (encoding.TextMarshaler)(GUID{}) var _ = (encoding.TextUnmarshaler)(&GUID{}) // NewV4 returns a new version 4 (pseudorandom) GUID, as defined by RFC 4122. func NewV4() (GUID, error) { var b [16]byte if _, err := rand.Read(b[:]); err != nil { return GUID{}, err } g := FromArray(b) g.setVersion(4) // Version 4 means randomly generated. g.setVariant(VariantRFC4122) return g, nil } // NewV5 returns a new version 5 (generated from a string via SHA-1 hashing) // GUID, as defined by RFC 4122. The RFC is unclear on the encoding of the name, // and the sample code treats it as a series of bytes, so we do the same here. // // Some implementations, such as those found on Windows, treat the name as a // big-endian UTF16 stream of bytes. If that is desired, the string can be // encoded as such before being passed to this function. func NewV5(namespace GUID, name []byte) (GUID, error) { b := sha1.New() //nolint:gosec // not used for secure application namespaceBytes := namespace.ToArray() b.Write(namespaceBytes[:]) b.Write(name) a := [16]byte{} copy(a[:], b.Sum(nil)) g := FromArray(a) g.setVersion(5) // Version 5 means generated from a string. g.setVariant(VariantRFC4122) return g, nil } func fromArray(b [16]byte, order binary.ByteOrder) GUID { var g GUID g.Data1 = order.Uint32(b[0:4]) g.Data2 = order.Uint16(b[4:6]) g.Data3 = order.Uint16(b[6:8]) copy(g.Data4[:], b[8:16]) return g } func (g GUID) toArray(order binary.ByteOrder) [16]byte { b := [16]byte{} order.PutUint32(b[0:4], g.Data1) order.PutUint16(b[4:6], g.Data2) order.PutUint16(b[6:8], g.Data3) copy(b[8:16], g.Data4[:]) return b } // FromArray constructs a GUID from a big-endian encoding array of 16 bytes. func FromArray(b [16]byte) GUID { return fromArray(b, binary.BigEndian) } // ToArray returns an array of 16 bytes representing the GUID in big-endian // encoding. func (g GUID) ToArray() [16]byte { return g.toArray(binary.BigEndian) } // FromWindowsArray constructs a GUID from a Windows encoding array of bytes. func FromWindowsArray(b [16]byte) GUID { return fromArray(b, binary.LittleEndian) } // ToWindowsArray returns an array of 16 bytes representing the GUID in Windows // encoding. func (g GUID) ToWindowsArray() [16]byte { return g.toArray(binary.LittleEndian) } func (g GUID) String() string { return fmt.Sprintf( "%08x-%04x-%04x-%04x-%012x", g.Data1, g.Data2, g.Data3, g.Data4[:2], g.Data4[2:]) } // FromString parses a string containing a GUID and returns the GUID. The only // format currently supported is the `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` // format. func FromString(s string) (GUID, error) { if len(s) != 36 { return GUID{}, fmt.Errorf("invalid GUID %q", s) } if s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-' { return GUID{}, fmt.Errorf("invalid GUID %q", s) } var g GUID data1, err := strconv.ParseUint(s[0:8], 16, 32) if err != nil { return GUID{}, fmt.Errorf("invalid GUID %q", s) } g.Data1 = uint32(data1) data2, err := strconv.ParseUint(s[9:13], 16, 16) if err != nil { return GUID{}, fmt.Errorf("invalid GUID %q", s) } g.Data2 = uint16(data2) data3, err := strconv.ParseUint(s[14:18], 16, 16) if err != nil { return GUID{}, fmt.Errorf("invalid GUID %q", s) } g.Data3 = uint16(data3) for i, x := range []int{19, 21, 24, 26, 28, 30, 32, 34} { v, err := strconv.ParseUint(s[x:x+2], 16, 8) if err != nil { return GUID{}, fmt.Errorf("invalid GUID %q", s) } g.Data4[i] = uint8(v) } return g, nil } func (g *GUID) setVariant(v Variant) { d := g.Data4[0] switch v { case VariantNCS: d = (d & 0x7f) case VariantRFC4122: d = (d & 0x3f) | 0x80 case VariantMicrosoft: d = (d & 0x1f) | 0xc0 case VariantFuture: d = (d & 0x0f) | 0xe0 case VariantUnknown: fallthrough default: panic(fmt.Sprintf("invalid variant: %d", v)) } g.Data4[0] = d } // Variant returns the GUID variant, as defined in RFC 4122. func (g GUID) Variant() Variant { b := g.Data4[0] if b&0x80 == 0 { return VariantNCS } else if b&0xc0 == 0x80 { return VariantRFC4122 } else if b&0xe0 == 0xc0 { return VariantMicrosoft } else if b&0xe0 == 0xe0 { return VariantFuture } return VariantUnknown } func (g *GUID) setVersion(v Version) { g.Data3 = (g.Data3 & 0x0fff) | (uint16(v) << 12) } // Version returns the GUID version, as defined in RFC 4122. func (g GUID) Version() Version { return Version((g.Data3 & 0xF000) >> 12) } // MarshalText returns the textual representation of the GUID. func (g GUID) MarshalText() ([]byte, error) { return []byte(g.String()), nil } // UnmarshalText takes the textual representation of a GUID, and unmarhals it // into this GUID. func (g *GUID) UnmarshalText(text []byte) error { g2, err := FromString(string(text)) if err != nil { return err } *g = g2 return nil } ================================================ FILE: vendor/github.com/Microsoft/go-winio/pkg/guid/guid_nonwindows.go ================================================ //go:build !windows // +build !windows package guid // GUID represents a GUID/UUID. It has the same structure as // golang.org/x/sys/windows.GUID so that it can be used with functions expecting // that type. It is defined as its own type as that is only available to builds // targeted at `windows`. The representation matches that used by native Windows // code. type GUID struct { Data1 uint32 Data2 uint16 Data3 uint16 Data4 [8]byte } ================================================ FILE: vendor/github.com/Microsoft/go-winio/pkg/guid/guid_windows.go ================================================ //go:build windows // +build windows package guid import "golang.org/x/sys/windows" // GUID represents a GUID/UUID. It has the same structure as // golang.org/x/sys/windows.GUID so that it can be used with functions expecting // that type. It is defined as its own type so that stringification and // marshaling can be supported. The representation matches that used by native // Windows code. type GUID windows.GUID ================================================ FILE: vendor/github.com/Microsoft/go-winio/pkg/guid/variant_string.go ================================================ // Code generated by "stringer -type=Variant -trimprefix=Variant -linecomment"; DO NOT EDIT. package guid import "strconv" func _() { // An "invalid array index" compiler error signifies that the constant values have changed. // Re-run the stringer command to generate them again. var x [1]struct{} _ = x[VariantUnknown-0] _ = x[VariantNCS-1] _ = x[VariantRFC4122-2] _ = x[VariantMicrosoft-3] _ = x[VariantFuture-4] } const _Variant_name = "UnknownNCSRFC 4122MicrosoftFuture" var _Variant_index = [...]uint8{0, 7, 10, 18, 27, 33} func (i Variant) String() string { if i >= Variant(len(_Variant_index)-1) { return "Variant(" + strconv.FormatInt(int64(i), 10) + ")" } return _Variant_name[_Variant_index[i]:_Variant_index[i+1]] } ================================================ FILE: vendor/github.com/Microsoft/go-winio/privilege.go ================================================ //go:build windows // +build windows package winio import ( "bytes" "encoding/binary" "fmt" "runtime" "sync" "unicode/utf16" "golang.org/x/sys/windows" ) //sys adjustTokenPrivileges(token windows.Token, releaseAll bool, input *byte, outputSize uint32, output *byte, requiredSize *uint32) (success bool, err error) [true] = advapi32.AdjustTokenPrivileges //sys impersonateSelf(level uint32) (err error) = advapi32.ImpersonateSelf //sys revertToSelf() (err error) = advapi32.RevertToSelf //sys openThreadToken(thread windows.Handle, accessMask uint32, openAsSelf bool, token *windows.Token) (err error) = advapi32.OpenThreadToken //sys getCurrentThread() (h windows.Handle) = GetCurrentThread //sys lookupPrivilegeValue(systemName string, name string, luid *uint64) (err error) = advapi32.LookupPrivilegeValueW //sys lookupPrivilegeName(systemName string, luid *uint64, buffer *uint16, size *uint32) (err error) = advapi32.LookupPrivilegeNameW //sys lookupPrivilegeDisplayName(systemName string, name *uint16, buffer *uint16, size *uint32, languageId *uint32) (err error) = advapi32.LookupPrivilegeDisplayNameW const ( //revive:disable-next-line:var-naming ALL_CAPS SE_PRIVILEGE_ENABLED = windows.SE_PRIVILEGE_ENABLED //revive:disable-next-line:var-naming ALL_CAPS ERROR_NOT_ALL_ASSIGNED windows.Errno = windows.ERROR_NOT_ALL_ASSIGNED SeBackupPrivilege = "SeBackupPrivilege" SeRestorePrivilege = "SeRestorePrivilege" SeSecurityPrivilege = "SeSecurityPrivilege" ) var ( privNames = make(map[string]uint64) privNameMutex sync.Mutex ) // PrivilegeError represents an error enabling privileges. type PrivilegeError struct { privileges []uint64 } func (e *PrivilegeError) Error() string { s := "Could not enable privilege " if len(e.privileges) > 1 { s = "Could not enable privileges " } for i, p := range e.privileges { if i != 0 { s += ", " } s += `"` s += getPrivilegeName(p) s += `"` } return s } // RunWithPrivilege enables a single privilege for a function call. func RunWithPrivilege(name string, fn func() error) error { return RunWithPrivileges([]string{name}, fn) } // RunWithPrivileges enables privileges for a function call. func RunWithPrivileges(names []string, fn func() error) error { privileges, err := mapPrivileges(names) if err != nil { return err } runtime.LockOSThread() defer runtime.UnlockOSThread() token, err := newThreadToken() if err != nil { return err } defer releaseThreadToken(token) err = adjustPrivileges(token, privileges, SE_PRIVILEGE_ENABLED) if err != nil { return err } return fn() } func mapPrivileges(names []string) ([]uint64, error) { privileges := make([]uint64, 0, len(names)) privNameMutex.Lock() defer privNameMutex.Unlock() for _, name := range names { p, ok := privNames[name] if !ok { err := lookupPrivilegeValue("", name, &p) if err != nil { return nil, err } privNames[name] = p } privileges = append(privileges, p) } return privileges, nil } // EnableProcessPrivileges enables privileges globally for the process. func EnableProcessPrivileges(names []string) error { return enableDisableProcessPrivilege(names, SE_PRIVILEGE_ENABLED) } // DisableProcessPrivileges disables privileges globally for the process. func DisableProcessPrivileges(names []string) error { return enableDisableProcessPrivilege(names, 0) } func enableDisableProcessPrivilege(names []string, action uint32) error { privileges, err := mapPrivileges(names) if err != nil { return err } p := windows.CurrentProcess() var token windows.Token err = windows.OpenProcessToken(p, windows.TOKEN_ADJUST_PRIVILEGES|windows.TOKEN_QUERY, &token) if err != nil { return err } defer token.Close() return adjustPrivileges(token, privileges, action) } func adjustPrivileges(token windows.Token, privileges []uint64, action uint32) error { var b bytes.Buffer _ = binary.Write(&b, binary.LittleEndian, uint32(len(privileges))) for _, p := range privileges { _ = binary.Write(&b, binary.LittleEndian, p) _ = binary.Write(&b, binary.LittleEndian, action) } prevState := make([]byte, b.Len()) reqSize := uint32(0) success, err := adjustTokenPrivileges(token, false, &b.Bytes()[0], uint32(len(prevState)), &prevState[0], &reqSize) if !success { return err } if err == ERROR_NOT_ALL_ASSIGNED { //nolint:errorlint // err is Errno return &PrivilegeError{privileges} } return nil } func getPrivilegeName(luid uint64) string { var nameBuffer [256]uint16 bufSize := uint32(len(nameBuffer)) err := lookupPrivilegeName("", &luid, &nameBuffer[0], &bufSize) if err != nil { return fmt.Sprintf("", luid) } var displayNameBuffer [256]uint16 displayBufSize := uint32(len(displayNameBuffer)) var langID uint32 err = lookupPrivilegeDisplayName("", &nameBuffer[0], &displayNameBuffer[0], &displayBufSize, &langID) if err != nil { return fmt.Sprintf("", string(utf16.Decode(nameBuffer[:bufSize]))) } return string(utf16.Decode(displayNameBuffer[:displayBufSize])) } func newThreadToken() (windows.Token, error) { err := impersonateSelf(windows.SecurityImpersonation) if err != nil { return 0, err } var token windows.Token err = openThreadToken(getCurrentThread(), windows.TOKEN_ADJUST_PRIVILEGES|windows.TOKEN_QUERY, false, &token) if err != nil { rerr := revertToSelf() if rerr != nil { panic(rerr) } return 0, err } return token, nil } func releaseThreadToken(h windows.Token) { err := revertToSelf() if err != nil { panic(err) } h.Close() } ================================================ FILE: vendor/github.com/Microsoft/go-winio/reparse.go ================================================ //go:build windows // +build windows package winio import ( "bytes" "encoding/binary" "fmt" "strings" "unicode/utf16" "unsafe" ) const ( reparseTagMountPoint = 0xA0000003 reparseTagSymlink = 0xA000000C ) type reparseDataBuffer struct { ReparseTag uint32 ReparseDataLength uint16 Reserved uint16 SubstituteNameOffset uint16 SubstituteNameLength uint16 PrintNameOffset uint16 PrintNameLength uint16 } // ReparsePoint describes a Win32 symlink or mount point. type ReparsePoint struct { Target string IsMountPoint bool } // UnsupportedReparsePointError is returned when trying to decode a non-symlink or // mount point reparse point. type UnsupportedReparsePointError struct { Tag uint32 } func (e *UnsupportedReparsePointError) Error() string { return fmt.Sprintf("unsupported reparse point %x", e.Tag) } // DecodeReparsePoint decodes a Win32 REPARSE_DATA_BUFFER structure containing either a symlink // or a mount point. func DecodeReparsePoint(b []byte) (*ReparsePoint, error) { tag := binary.LittleEndian.Uint32(b[0:4]) return DecodeReparsePointData(tag, b[8:]) } func DecodeReparsePointData(tag uint32, b []byte) (*ReparsePoint, error) { isMountPoint := false switch tag { case reparseTagMountPoint: isMountPoint = true case reparseTagSymlink: default: return nil, &UnsupportedReparsePointError{tag} } nameOffset := 8 + binary.LittleEndian.Uint16(b[4:6]) if !isMountPoint { nameOffset += 4 } nameLength := binary.LittleEndian.Uint16(b[6:8]) name := make([]uint16, nameLength/2) err := binary.Read(bytes.NewReader(b[nameOffset:nameOffset+nameLength]), binary.LittleEndian, &name) if err != nil { return nil, err } return &ReparsePoint{string(utf16.Decode(name)), isMountPoint}, nil } func isDriveLetter(c byte) bool { return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') } // EncodeReparsePoint encodes a Win32 REPARSE_DATA_BUFFER structure describing a symlink or // mount point. func EncodeReparsePoint(rp *ReparsePoint) []byte { // Generate an NT path and determine if this is a relative path. var ntTarget string relative := false if strings.HasPrefix(rp.Target, `\\?\`) { ntTarget = `\??\` + rp.Target[4:] } else if strings.HasPrefix(rp.Target, `\\`) { ntTarget = `\??\UNC\` + rp.Target[2:] } else if len(rp.Target) >= 2 && isDriveLetter(rp.Target[0]) && rp.Target[1] == ':' { ntTarget = `\??\` + rp.Target } else { ntTarget = rp.Target relative = true } // The paths must be NUL-terminated even though they are counted strings. target16 := utf16.Encode([]rune(rp.Target + "\x00")) ntTarget16 := utf16.Encode([]rune(ntTarget + "\x00")) size := int(unsafe.Sizeof(reparseDataBuffer{})) - 8 size += len(ntTarget16)*2 + len(target16)*2 tag := uint32(reparseTagMountPoint) if !rp.IsMountPoint { tag = reparseTagSymlink size += 4 // Add room for symlink flags } data := reparseDataBuffer{ ReparseTag: tag, ReparseDataLength: uint16(size), SubstituteNameOffset: 0, SubstituteNameLength: uint16((len(ntTarget16) - 1) * 2), PrintNameOffset: uint16(len(ntTarget16) * 2), PrintNameLength: uint16((len(target16) - 1) * 2), } var b bytes.Buffer _ = binary.Write(&b, binary.LittleEndian, &data) if !rp.IsMountPoint { flags := uint32(0) if relative { flags |= 1 } _ = binary.Write(&b, binary.LittleEndian, flags) } _ = binary.Write(&b, binary.LittleEndian, ntTarget16) _ = binary.Write(&b, binary.LittleEndian, target16) return b.Bytes() } ================================================ FILE: vendor/github.com/Microsoft/go-winio/sd.go ================================================ //go:build windows // +build windows package winio import ( "errors" "fmt" "unsafe" "golang.org/x/sys/windows" ) //sys lookupAccountName(systemName *uint16, accountName string, sid *byte, sidSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) = advapi32.LookupAccountNameW //sys lookupAccountSid(systemName *uint16, sid *byte, name *uint16, nameSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) = advapi32.LookupAccountSidW //sys convertSidToStringSid(sid *byte, str **uint16) (err error) = advapi32.ConvertSidToStringSidW //sys convertStringSidToSid(str *uint16, sid **byte) (err error) = advapi32.ConvertStringSidToSidW type AccountLookupError struct { Name string Err error } func (e *AccountLookupError) Error() string { if e.Name == "" { return "lookup account: empty account name specified" } var s string switch { case errors.Is(e.Err, windows.ERROR_INVALID_SID): s = "the security ID structure is invalid" case errors.Is(e.Err, windows.ERROR_NONE_MAPPED): s = "not found" default: s = e.Err.Error() } return "lookup account " + e.Name + ": " + s } func (e *AccountLookupError) Unwrap() error { return e.Err } type SddlConversionError struct { Sddl string Err error } func (e *SddlConversionError) Error() string { return "convert " + e.Sddl + ": " + e.Err.Error() } func (e *SddlConversionError) Unwrap() error { return e.Err } // LookupSidByName looks up the SID of an account by name // //revive:disable-next-line:var-naming SID, not Sid func LookupSidByName(name string) (sid string, err error) { if name == "" { return "", &AccountLookupError{name, windows.ERROR_NONE_MAPPED} } var sidSize, sidNameUse, refDomainSize uint32 err = lookupAccountName(nil, name, nil, &sidSize, nil, &refDomainSize, &sidNameUse) if err != nil && err != windows.ERROR_INSUFFICIENT_BUFFER { //nolint:errorlint // err is Errno return "", &AccountLookupError{name, err} } sidBuffer := make([]byte, sidSize) refDomainBuffer := make([]uint16, refDomainSize) err = lookupAccountName(nil, name, &sidBuffer[0], &sidSize, &refDomainBuffer[0], &refDomainSize, &sidNameUse) if err != nil { return "", &AccountLookupError{name, err} } var strBuffer *uint16 err = convertSidToStringSid(&sidBuffer[0], &strBuffer) if err != nil { return "", &AccountLookupError{name, err} } sid = windows.UTF16ToString((*[0xffff]uint16)(unsafe.Pointer(strBuffer))[:]) _, _ = windows.LocalFree(windows.Handle(unsafe.Pointer(strBuffer))) return sid, nil } // LookupNameBySid looks up the name of an account by SID // //revive:disable-next-line:var-naming SID, not Sid func LookupNameBySid(sid string) (name string, err error) { if sid == "" { return "", &AccountLookupError{sid, windows.ERROR_NONE_MAPPED} } sidBuffer, err := windows.UTF16PtrFromString(sid) if err != nil { return "", &AccountLookupError{sid, err} } var sidPtr *byte if err = convertStringSidToSid(sidBuffer, &sidPtr); err != nil { return "", &AccountLookupError{sid, err} } defer windows.LocalFree(windows.Handle(unsafe.Pointer(sidPtr))) //nolint:errcheck var nameSize, refDomainSize, sidNameUse uint32 err = lookupAccountSid(nil, sidPtr, nil, &nameSize, nil, &refDomainSize, &sidNameUse) if err != nil && err != windows.ERROR_INSUFFICIENT_BUFFER { //nolint:errorlint // err is Errno return "", &AccountLookupError{sid, err} } nameBuffer := make([]uint16, nameSize) refDomainBuffer := make([]uint16, refDomainSize) err = lookupAccountSid(nil, sidPtr, &nameBuffer[0], &nameSize, &refDomainBuffer[0], &refDomainSize, &sidNameUse) if err != nil { return "", &AccountLookupError{sid, err} } name = windows.UTF16ToString(nameBuffer) return name, nil } func SddlToSecurityDescriptor(sddl string) ([]byte, error) { sd, err := windows.SecurityDescriptorFromString(sddl) if err != nil { return nil, &SddlConversionError{Sddl: sddl, Err: err} } b := unsafe.Slice((*byte)(unsafe.Pointer(sd)), sd.Length()) return b, nil } func SecurityDescriptorToSddl(sd []byte) (string, error) { if l := int(unsafe.Sizeof(windows.SECURITY_DESCRIPTOR{})); len(sd) < l { return "", fmt.Errorf("SecurityDescriptor (%d) smaller than expected (%d): %w", len(sd), l, windows.ERROR_INCORRECT_SIZE) } s := (*windows.SECURITY_DESCRIPTOR)(unsafe.Pointer(&sd[0])) return s.String(), nil } ================================================ FILE: vendor/github.com/Microsoft/go-winio/syscall.go ================================================ //go:build windows package winio //go:generate go run github.com/Microsoft/go-winio/tools/mkwinsyscall -output zsyscall_windows.go ./*.go ================================================ FILE: vendor/github.com/Microsoft/go-winio/zsyscall_windows.go ================================================ //go:build windows // Code generated by 'go generate' using "github.com/Microsoft/go-winio/tools/mkwinsyscall"; DO NOT EDIT. package winio import ( "syscall" "unsafe" "golang.org/x/sys/windows" ) var _ unsafe.Pointer // Do the interface allocations only once for common // Errno values. const ( errnoERROR_IO_PENDING = 997 ) var ( errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING) errERROR_EINVAL error = syscall.EINVAL ) // errnoErr returns common boxed Errno values, to prevent // allocations at runtime. func errnoErr(e syscall.Errno) error { switch e { case 0: return errERROR_EINVAL case errnoERROR_IO_PENDING: return errERROR_IO_PENDING } return e } var ( modadvapi32 = windows.NewLazySystemDLL("advapi32.dll") modkernel32 = windows.NewLazySystemDLL("kernel32.dll") modntdll = windows.NewLazySystemDLL("ntdll.dll") modws2_32 = windows.NewLazySystemDLL("ws2_32.dll") procAdjustTokenPrivileges = modadvapi32.NewProc("AdjustTokenPrivileges") procConvertSidToStringSidW = modadvapi32.NewProc("ConvertSidToStringSidW") procConvertStringSidToSidW = modadvapi32.NewProc("ConvertStringSidToSidW") procImpersonateSelf = modadvapi32.NewProc("ImpersonateSelf") procLookupAccountNameW = modadvapi32.NewProc("LookupAccountNameW") procLookupAccountSidW = modadvapi32.NewProc("LookupAccountSidW") procLookupPrivilegeDisplayNameW = modadvapi32.NewProc("LookupPrivilegeDisplayNameW") procLookupPrivilegeNameW = modadvapi32.NewProc("LookupPrivilegeNameW") procLookupPrivilegeValueW = modadvapi32.NewProc("LookupPrivilegeValueW") procOpenThreadToken = modadvapi32.NewProc("OpenThreadToken") procRevertToSelf = modadvapi32.NewProc("RevertToSelf") procBackupRead = modkernel32.NewProc("BackupRead") procBackupWrite = modkernel32.NewProc("BackupWrite") procCancelIoEx = modkernel32.NewProc("CancelIoEx") procConnectNamedPipe = modkernel32.NewProc("ConnectNamedPipe") procCreateIoCompletionPort = modkernel32.NewProc("CreateIoCompletionPort") procCreateNamedPipeW = modkernel32.NewProc("CreateNamedPipeW") procDisconnectNamedPipe = modkernel32.NewProc("DisconnectNamedPipe") procGetCurrentThread = modkernel32.NewProc("GetCurrentThread") procGetNamedPipeHandleStateW = modkernel32.NewProc("GetNamedPipeHandleStateW") procGetNamedPipeInfo = modkernel32.NewProc("GetNamedPipeInfo") procGetQueuedCompletionStatus = modkernel32.NewProc("GetQueuedCompletionStatus") procSetFileCompletionNotificationModes = modkernel32.NewProc("SetFileCompletionNotificationModes") procNtCreateNamedPipeFile = modntdll.NewProc("NtCreateNamedPipeFile") procRtlDefaultNpAcl = modntdll.NewProc("RtlDefaultNpAcl") procRtlDosPathNameToNtPathName_U = modntdll.NewProc("RtlDosPathNameToNtPathName_U") procRtlNtStatusToDosErrorNoTeb = modntdll.NewProc("RtlNtStatusToDosErrorNoTeb") procWSAGetOverlappedResult = modws2_32.NewProc("WSAGetOverlappedResult") ) func adjustTokenPrivileges(token windows.Token, releaseAll bool, input *byte, outputSize uint32, output *byte, requiredSize *uint32) (success bool, err error) { var _p0 uint32 if releaseAll { _p0 = 1 } r0, _, e1 := syscall.SyscallN(procAdjustTokenPrivileges.Addr(), uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(input)), uintptr(outputSize), uintptr(unsafe.Pointer(output)), uintptr(unsafe.Pointer(requiredSize))) success = r0 != 0 if true { err = errnoErr(e1) } return } func convertSidToStringSid(sid *byte, str **uint16) (err error) { r1, _, e1 := syscall.SyscallN(procConvertSidToStringSidW.Addr(), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(str))) if r1 == 0 { err = errnoErr(e1) } return } func convertStringSidToSid(str *uint16, sid **byte) (err error) { r1, _, e1 := syscall.SyscallN(procConvertStringSidToSidW.Addr(), uintptr(unsafe.Pointer(str)), uintptr(unsafe.Pointer(sid))) if r1 == 0 { err = errnoErr(e1) } return } func impersonateSelf(level uint32) (err error) { r1, _, e1 := syscall.SyscallN(procImpersonateSelf.Addr(), uintptr(level)) if r1 == 0 { err = errnoErr(e1) } return } func lookupAccountName(systemName *uint16, accountName string, sid *byte, sidSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) { var _p0 *uint16 _p0, err = syscall.UTF16PtrFromString(accountName) if err != nil { return } return _lookupAccountName(systemName, _p0, sid, sidSize, refDomain, refDomainSize, sidNameUse) } func _lookupAccountName(systemName *uint16, accountName *uint16, sid *byte, sidSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) { r1, _, e1 := syscall.SyscallN(procLookupAccountNameW.Addr(), uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(accountName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sidSize)), uintptr(unsafe.Pointer(refDomain)), uintptr(unsafe.Pointer(refDomainSize)), uintptr(unsafe.Pointer(sidNameUse))) if r1 == 0 { err = errnoErr(e1) } return } func lookupAccountSid(systemName *uint16, sid *byte, name *uint16, nameSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) { r1, _, e1 := syscall.SyscallN(procLookupAccountSidW.Addr(), uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameSize)), uintptr(unsafe.Pointer(refDomain)), uintptr(unsafe.Pointer(refDomainSize)), uintptr(unsafe.Pointer(sidNameUse))) if r1 == 0 { err = errnoErr(e1) } return } func lookupPrivilegeDisplayName(systemName string, name *uint16, buffer *uint16, size *uint32, languageId *uint32) (err error) { var _p0 *uint16 _p0, err = syscall.UTF16PtrFromString(systemName) if err != nil { return } return _lookupPrivilegeDisplayName(_p0, name, buffer, size, languageId) } func _lookupPrivilegeDisplayName(systemName *uint16, name *uint16, buffer *uint16, size *uint32, languageId *uint32) (err error) { r1, _, e1 := syscall.SyscallN(procLookupPrivilegeDisplayNameW.Addr(), uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buffer)), uintptr(unsafe.Pointer(size)), uintptr(unsafe.Pointer(languageId))) if r1 == 0 { err = errnoErr(e1) } return } func lookupPrivilegeName(systemName string, luid *uint64, buffer *uint16, size *uint32) (err error) { var _p0 *uint16 _p0, err = syscall.UTF16PtrFromString(systemName) if err != nil { return } return _lookupPrivilegeName(_p0, luid, buffer, size) } func _lookupPrivilegeName(systemName *uint16, luid *uint64, buffer *uint16, size *uint32) (err error) { r1, _, e1 := syscall.SyscallN(procLookupPrivilegeNameW.Addr(), uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(luid)), uintptr(unsafe.Pointer(buffer)), uintptr(unsafe.Pointer(size))) if r1 == 0 { err = errnoErr(e1) } return } func lookupPrivilegeValue(systemName string, name string, luid *uint64) (err error) { var _p0 *uint16 _p0, err = syscall.UTF16PtrFromString(systemName) if err != nil { return } var _p1 *uint16 _p1, err = syscall.UTF16PtrFromString(name) if err != nil { return } return _lookupPrivilegeValue(_p0, _p1, luid) } func _lookupPrivilegeValue(systemName *uint16, name *uint16, luid *uint64) (err error) { r1, _, e1 := syscall.SyscallN(procLookupPrivilegeValueW.Addr(), uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(luid))) if r1 == 0 { err = errnoErr(e1) } return } func openThreadToken(thread windows.Handle, accessMask uint32, openAsSelf bool, token *windows.Token) (err error) { var _p0 uint32 if openAsSelf { _p0 = 1 } r1, _, e1 := syscall.SyscallN(procOpenThreadToken.Addr(), uintptr(thread), uintptr(accessMask), uintptr(_p0), uintptr(unsafe.Pointer(token))) if r1 == 0 { err = errnoErr(e1) } return } func revertToSelf() (err error) { r1, _, e1 := syscall.SyscallN(procRevertToSelf.Addr()) if r1 == 0 { err = errnoErr(e1) } return } func backupRead(h windows.Handle, b []byte, bytesRead *uint32, abort bool, processSecurity bool, context *uintptr) (err error) { var _p0 *byte if len(b) > 0 { _p0 = &b[0] } var _p1 uint32 if abort { _p1 = 1 } var _p2 uint32 if processSecurity { _p2 = 1 } r1, _, e1 := syscall.SyscallN(procBackupRead.Addr(), uintptr(h), uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(unsafe.Pointer(bytesRead)), uintptr(_p1), uintptr(_p2), uintptr(unsafe.Pointer(context))) if r1 == 0 { err = errnoErr(e1) } return } func backupWrite(h windows.Handle, b []byte, bytesWritten *uint32, abort bool, processSecurity bool, context *uintptr) (err error) { var _p0 *byte if len(b) > 0 { _p0 = &b[0] } var _p1 uint32 if abort { _p1 = 1 } var _p2 uint32 if processSecurity { _p2 = 1 } r1, _, e1 := syscall.SyscallN(procBackupWrite.Addr(), uintptr(h), uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(unsafe.Pointer(bytesWritten)), uintptr(_p1), uintptr(_p2), uintptr(unsafe.Pointer(context))) if r1 == 0 { err = errnoErr(e1) } return } func cancelIoEx(file windows.Handle, o *windows.Overlapped) (err error) { r1, _, e1 := syscall.SyscallN(procCancelIoEx.Addr(), uintptr(file), uintptr(unsafe.Pointer(o))) if r1 == 0 { err = errnoErr(e1) } return } func connectNamedPipe(pipe windows.Handle, o *windows.Overlapped) (err error) { r1, _, e1 := syscall.SyscallN(procConnectNamedPipe.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(o))) if r1 == 0 { err = errnoErr(e1) } return } func createIoCompletionPort(file windows.Handle, port windows.Handle, key uintptr, threadCount uint32) (newport windows.Handle, err error) { r0, _, e1 := syscall.SyscallN(procCreateIoCompletionPort.Addr(), uintptr(file), uintptr(port), uintptr(key), uintptr(threadCount)) newport = windows.Handle(r0) if newport == 0 { err = errnoErr(e1) } return } func createNamedPipe(name string, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *windows.SecurityAttributes) (handle windows.Handle, err error) { var _p0 *uint16 _p0, err = syscall.UTF16PtrFromString(name) if err != nil { return } return _createNamedPipe(_p0, flags, pipeMode, maxInstances, outSize, inSize, defaultTimeout, sa) } func _createNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *windows.SecurityAttributes) (handle windows.Handle, err error) { r0, _, e1 := syscall.SyscallN(procCreateNamedPipeW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(pipeMode), uintptr(maxInstances), uintptr(outSize), uintptr(inSize), uintptr(defaultTimeout), uintptr(unsafe.Pointer(sa))) handle = windows.Handle(r0) if handle == windows.InvalidHandle { err = errnoErr(e1) } return } func disconnectNamedPipe(pipe windows.Handle) (err error) { r1, _, e1 := syscall.SyscallN(procDisconnectNamedPipe.Addr(), uintptr(pipe)) if r1 == 0 { err = errnoErr(e1) } return } func getCurrentThread() (h windows.Handle) { r0, _, _ := syscall.SyscallN(procGetCurrentThread.Addr()) h = windows.Handle(r0) return } func getNamedPipeHandleState(pipe windows.Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) { r1, _, e1 := syscall.SyscallN(procGetNamedPipeHandleStateW.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(curInstances)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)), uintptr(unsafe.Pointer(userName)), uintptr(maxUserNameSize)) if r1 == 0 { err = errnoErr(e1) } return } func getNamedPipeInfo(pipe windows.Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) { r1, _, e1 := syscall.SyscallN(procGetNamedPipeInfo.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(outSize)), uintptr(unsafe.Pointer(inSize)), uintptr(unsafe.Pointer(maxInstances))) if r1 == 0 { err = errnoErr(e1) } return } func getQueuedCompletionStatus(port windows.Handle, bytes *uint32, key *uintptr, o **ioOperation, timeout uint32) (err error) { r1, _, e1 := syscall.SyscallN(procGetQueuedCompletionStatus.Addr(), uintptr(port), uintptr(unsafe.Pointer(bytes)), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(o)), uintptr(timeout)) if r1 == 0 { err = errnoErr(e1) } return } func setFileCompletionNotificationModes(h windows.Handle, flags uint8) (err error) { r1, _, e1 := syscall.SyscallN(procSetFileCompletionNotificationModes.Addr(), uintptr(h), uintptr(flags)) if r1 == 0 { err = errnoErr(e1) } return } func ntCreateNamedPipeFile(pipe *windows.Handle, access ntAccessMask, oa *objectAttributes, iosb *ioStatusBlock, share ntFileShareMode, disposition ntFileCreationDisposition, options ntFileOptions, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (status ntStatus) { r0, _, _ := syscall.SyscallN(procNtCreateNamedPipeFile.Addr(), uintptr(unsafe.Pointer(pipe)), uintptr(access), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(share), uintptr(disposition), uintptr(options), uintptr(typ), uintptr(readMode), uintptr(completionMode), uintptr(maxInstances), uintptr(inboundQuota), uintptr(outputQuota), uintptr(unsafe.Pointer(timeout))) status = ntStatus(r0) return } func rtlDefaultNpAcl(dacl *uintptr) (status ntStatus) { r0, _, _ := syscall.SyscallN(procRtlDefaultNpAcl.Addr(), uintptr(unsafe.Pointer(dacl))) status = ntStatus(r0) return } func rtlDosPathNameToNtPathName(name *uint16, ntName *unicodeString, filePart uintptr, reserved uintptr) (status ntStatus) { r0, _, _ := syscall.SyscallN(procRtlDosPathNameToNtPathName_U.Addr(), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(ntName)), uintptr(filePart), uintptr(reserved)) status = ntStatus(r0) return } func rtlNtStatusToDosError(status ntStatus) (winerr error) { r0, _, _ := syscall.SyscallN(procRtlNtStatusToDosErrorNoTeb.Addr(), uintptr(status)) if r0 != 0 { winerr = syscall.Errno(r0) } return } func wsaGetOverlappedResult(h windows.Handle, o *windows.Overlapped, bytes *uint32, wait bool, flags *uint32) (err error) { var _p0 uint32 if wait { _p0 = 1 } r1, _, e1 := syscall.SyscallN(procWSAGetOverlappedResult.Addr(), uintptr(h), uintptr(unsafe.Pointer(o)), uintptr(unsafe.Pointer(bytes)), uintptr(_p0), uintptr(unsafe.Pointer(flags))) if r1 == 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/github.com/OpenPeeDeeP/xdg/.gitignore ================================================ *.test *.out .DS_STORE ================================================ FILE: vendor/github.com/OpenPeeDeeP/xdg/.travis.yml ================================================ language: go go: - 1.11.x os: - linux - osx before_install: - go get -t -v ./... script: - go test -v -race -covermode=atomic -coverprofile=coverage.txt after_success: - bash <(curl -s https://codecov.io/bash) ================================================ FILE: vendor/github.com/OpenPeeDeeP/xdg/LICENSE ================================================ BSD 3-Clause License Copyright (c) 2017, OpenPeeDeeP 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 the copyright holder 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 HOLDER 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. ================================================ FILE: vendor/github.com/OpenPeeDeeP/xdg/README.md ================================================ # XDG [![Build status](https://ci.appveyor.com/api/projects/status/9eoupq9jgsu2p0jv?svg=true)](https://ci.appveyor.com/project/dixonwille/xdg) [![Build Status](https://travis-ci.org/OpenPeeDeeP/xdg.svg?branch=master)](https://travis-ci.org/OpenPeeDeeP/xdg) [![Go Report Card](https://goreportcard.com/badge/github.com/OpenPeeDeeP/xdg)](https://goreportcard.com/report/github.com/OpenPeeDeeP/xdg) [![GoDoc](https://godoc.org/github.com/OpenPeeDeeP/xdg?status.svg)](https://godoc.org/github.com/OpenPeeDeeP/xdg) [![codecov](https://codecov.io/gh/OpenPeeDeeP/xdg/branch/master/graph/badge.svg)](https://codecov.io/gh/OpenPeeDeeP/xdg) A cross platform package that tries to follow [XDG Standard](https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html) when possible. Since XDG is linux specific, I am only able to follow standards to the T on linux. But for the other operating systems I am finding similar best practice locations for the files. ## Locations Per OS The following table shows what is used if the envrionment variable is not set. If the variable is set then this package uses that. Linux follows the default standards. Mac does when it comes to the home directory but for system wide it uses the standard `/Library/Application Support`. As for Windows, the variable defaults are just other environment variables set up by the operation system. > When creating `XDG` application the `Vendor` and `Application` names are appeneded to the end of the path to keep projects unique. | | Linux(and BSD) | Mac | Windows | | ---: | :---: | :---: | :---: | | `XDG_DATA_DIRS` | [`/usr/local/share`, `/usr/share`] | [`/Library/Application Support`] | `%PROGRAMDATA%` | | `XDG_DATA_HOME` | `~/.local/share` | `~/Library/Application Support` | `%APPDATA%` | | `XDG_CONFIG_DIRS` | [`/etc/xdg`] | [`/Library/Application Support`] | `%PROGRAMDATA%` | | `XDG_CONFIG_HOME` | `~/.config` | `~/Library/Application Support` | `%APPDATA%` | | `XDG_CACHE_HOME` | `~/.cache` | `~/Library/Caches` | `%LOCALAPPDATA%` | ## Notes - This package does not merge files if they exist across different directories. - The `Query` methods search through the system variables, `DIRS`, first (when using environment variables first in the variable has presidence). It then checks home variables, `HOME`. - This package will not create any directories for you. In the standard, it states the following: > If, when attempting to write a file, the destination directory is non-existant an attempt should be made to create it with permission `0700`. If the destination directory exists already the permissions should not be changed. The application should be prepared to handle the case where the file could not be written, either because the directory was non-existant and could not be created, or for any other reason. In such case it may chose to present an error message to the user. ================================================ FILE: vendor/github.com/OpenPeeDeeP/xdg/appveyor.yml ================================================ version: 0.0.1_{build} build: off platform: x64 clone_folder: c:\gopath\src\github.com\OpenPeeDeeP\xdg environment: GOPATH: c:\gopath stack: go 1.11 install: - go get -t -v ./... - cinst codecov before_test: - go vet ./... test_script: - go test -v -race -covermode=atomic -coverprofile=coverage.txt on_success: - codecov -f coverage.txt ================================================ FILE: vendor/github.com/OpenPeeDeeP/xdg/xdg.go ================================================ // Copyright (c) 2017, OpenPeeDeeP. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package xdg impelements the XDG standard for application file locations. package xdg import ( "os" "path/filepath" "strings" ) var defaulter xdgDefaulter = new(osDefaulter) type xdgDefaulter interface { defaultDataHome() string defaultDataDirs() []string defaultConfigHome() string defaultConfigDirs() []string defaultCacheHome() string } type osDefaulter struct { } //This method is used in the testing suit // nolint: deadcode func setDefaulter(def xdgDefaulter) { defaulter = def } // XDG is information about the currently running application type XDG struct { Vendor string Application string } // New returns an instance of XDG that is used to grab files for application use func New(vendor, application string) *XDG { return &XDG{ Vendor: vendor, Application: application, } } // DataHome returns the location that should be used for user specific data files for this specific application func (x *XDG) DataHome() string { return filepath.Join(DataHome(), x.Vendor, x.Application) } // DataDirs returns a list of locations that should be used for system wide data files for this specific application func (x *XDG) DataDirs() []string { dataDirs := DataDirs() for i, dir := range dataDirs { dataDirs[i] = filepath.Join(dir, x.Vendor, x.Application) } return dataDirs } // ConfigHome returns the location that should be used for user specific config files for this specific application func (x *XDG) ConfigHome() string { return filepath.Join(ConfigHome(), x.Vendor, x.Application) } // ConfigDirs returns a list of locations that should be used for system wide config files for this specific application func (x *XDG) ConfigDirs() []string { configDirs := ConfigDirs() for i, dir := range configDirs { configDirs[i] = filepath.Join(dir, x.Vendor, x.Application) } return configDirs } // CacheHome returns the location that should be used for application cache files for this specific application func (x *XDG) CacheHome() string { return filepath.Join(CacheHome(), x.Vendor, x.Application) } // QueryData looks for the given filename in XDG paths for data files. // Returns an empty string if one was not found. func (x *XDG) QueryData(filename string) string { dirs := x.DataDirs() dirs = append([]string{x.DataHome()}, dirs...) return returnExist(filename, dirs) } // QueryConfig looks for the given filename in XDG paths for config files. // Returns an empty string if one was not found. func (x *XDG) QueryConfig(filename string) string { dirs := x.ConfigDirs() dirs = append([]string{x.ConfigHome()}, dirs...) return returnExist(filename, dirs) } // QueryCache looks for the given filename in XDG paths for cache files. // Returns an empty string if one was not found. func (x *XDG) QueryCache(filename string) string { return returnExist(filename, []string{x.CacheHome()}) } func returnExist(filename string, dirs []string) string { for _, dir := range dirs { _, err := os.Stat(filepath.Join(dir, filename)) if (err != nil && os.IsExist(err)) || err == nil { return filepath.Join(dir, filename) } } return "" } // DataHome returns the location that should be used for user specific data files func DataHome() string { dataHome := os.Getenv("XDG_DATA_HOME") if dataHome == "" { dataHome = defaulter.defaultDataHome() } return dataHome } // DataDirs returns a list of locations that should be used for system wide data files func DataDirs() []string { var dataDirs []string dataDirsStr := os.Getenv("XDG_DATA_DIRS") if dataDirsStr != "" { dataDirs = strings.Split(dataDirsStr, string(os.PathListSeparator)) } if len(dataDirs) == 0 { dataDirs = defaulter.defaultDataDirs() } return dataDirs } // ConfigHome returns the location that should be used for user specific config files func ConfigHome() string { configHome := os.Getenv("XDG_CONFIG_HOME") if configHome == "" { configHome = defaulter.defaultConfigHome() } return configHome } // ConfigDirs returns a list of locations that should be used for system wide config files func ConfigDirs() []string { var configDirs []string configDirsStr := os.Getenv("XDG_CONFIG_DIRS") if configDirsStr != "" { configDirs = strings.Split(configDirsStr, string(os.PathListSeparator)) } if len(configDirs) == 0 { configDirs = defaulter.defaultConfigDirs() } return configDirs } // CacheHome returns the location that should be used for application cache files func CacheHome() string { cacheHome := os.Getenv("XDG_CACHE_HOME") if cacheHome == "" { cacheHome = defaulter.defaultCacheHome() } return cacheHome } ================================================ FILE: vendor/github.com/OpenPeeDeeP/xdg/xdg_bsd.go ================================================ // +build freebsd openbsd netbsd // Copyright (c) 2017, OpenPeeDeeP. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package xdg import ( "os" "path/filepath" ) func (o *osDefaulter) defaultDataHome() string { return filepath.Join(os.Getenv("HOME"), ".local", "share") } func (o *osDefaulter) defaultDataDirs() []string { return []string{"/usr/local/share/", "/usr/share/"} } func (o *osDefaulter) defaultConfigHome() string { return filepath.Join(os.Getenv("HOME"), ".config") } func (o *osDefaulter) defaultConfigDirs() []string { return []string{"/etc/xdg"} } func (o *osDefaulter) defaultCacheHome() string { return filepath.Join(os.Getenv("HOME"), ".cache") } ================================================ FILE: vendor/github.com/OpenPeeDeeP/xdg/xdg_darwin.go ================================================ // Copyright (c) 2017, OpenPeeDeeP. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package xdg import ( "os" "path/filepath" ) func (o *osDefaulter) defaultDataHome() string { return filepath.Join(os.Getenv("HOME"), "Library", "Application Support") } func (o *osDefaulter) defaultDataDirs() []string { return []string{filepath.Join("/Library", "Application Support")} } func (o *osDefaulter) defaultConfigHome() string { return filepath.Join(os.Getenv("HOME"), "Library", "Application Support") } func (o *osDefaulter) defaultConfigDirs() []string { return []string{filepath.Join("/Library", "Application Support")} } func (o *osDefaulter) defaultCacheHome() string { return filepath.Join(os.Getenv("HOME"), "Library", "Caches") } ================================================ FILE: vendor/github.com/OpenPeeDeeP/xdg/xdg_linux.go ================================================ // Copyright (c) 2017, OpenPeeDeeP. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package xdg import ( "os" "path/filepath" ) func (o *osDefaulter) defaultDataHome() string { return filepath.Join(os.Getenv("HOME"), ".local", "share") } func (o *osDefaulter) defaultDataDirs() []string { return []string{"/usr/local/share/", "/usr/share/"} } func (o *osDefaulter) defaultConfigHome() string { return filepath.Join(os.Getenv("HOME"), ".config") } func (o *osDefaulter) defaultConfigDirs() []string { return []string{"/etc/xdg"} } func (o *osDefaulter) defaultCacheHome() string { return filepath.Join(os.Getenv("HOME"), ".cache") } ================================================ FILE: vendor/github.com/OpenPeeDeeP/xdg/xdg_windows.go ================================================ // Copyright (c) 2017, OpenPeeDeeP. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package xdg import "os" func (o *osDefaulter) defaultDataHome() string { return os.Getenv("APPDATA") } func (o *osDefaulter) defaultDataDirs() []string { return []string{os.Getenv("PROGRAMDATA")} } func (o *osDefaulter) defaultConfigHome() string { return os.Getenv("APPDATA") } func (o *osDefaulter) defaultConfigDirs() []string { return []string{os.Getenv("PROGRAMDATA")} } func (o *osDefaulter) defaultCacheHome() string { return os.Getenv("LOCALAPPDATA") } ================================================ FILE: vendor/github.com/boz/go-throttle/.travis.yml ================================================ language: go go: - 1.5 - 1.6 - 1.7 - tip ================================================ FILE: vendor/github.com/boz/go-throttle/Makefile ================================================ test: go test ================================================ FILE: vendor/github.com/boz/go-throttle/README.md ================================================ # go-throttle [![GoDoc](https://godoc.org/github.com/boz/go-throttle?status.svg)](https://godoc.org/github.com/boz/go-throttle) [![Build Status](https://travis-ci.org/boz/go-throttle.svg?branch=master)](https://travis-ci.org/boz/go-throttle) Package `throttle` provides functionality to limit the frequency with which code is called Throttling is of the `Trigger()` method and depends on the parameters passed (`period`, `trailing`). The `period` parameter defines how often the throttled code can run. A period of one second means that the throttled code will run at most once per second. The `trailing` parameter defines what hapens if `Trigger()` is called after the throttled code has been started, but before the period is finished. If `trailing` is false then these triggers are ignored. If `trailing` is true then the throttled code is executed one more time at the beginning of the next period. Example with `period = time.Second` and `trailing = false`: Whole seconds after first trigger...|0|0|0|0|1|1|1|1| Trigger() gets called...............|X| |X| | |X| | | Throttled code gets called..........|X| | | | |X| | | Note that the second `Trigger()` had no effect. The third `Trigger()` caused immediate execution of the throttled code. Example with `period = time.Second` and `trailing = true`: Whole seconds after first trigger...|0|0|0|0|1|1|1|1| Trigger() gets called...............|X| |X| | |X| | | Throttled code gets called..........|X| | | |X| | | | Note that the second `Trigger()` causes the throttled code to get called once the first period is over. The third `Trigger()` will do the same. ## Usage Throttling execution of a function: ```go throttle := throttle.ThrottleFunc(period, false, func() { fmt.Println("fun, throttled.") }) go func() { for i := 0; i < 5; i++ { throttle.Trigger() time.Sleep(period / 6) } }() time.Sleep(2 * period) throttle.Stop() // Output: fun, throttled. ``` Throttling arbitrary code: ```go package cache import ( "time" "github.com/boz/go-throttle" ) type CacheRebuilder struct { throttle throttle.Throttle } // Create a cache rebuilder which will rebuild the cache at most once every 5 minutes, regardless // of how often a rebuild is requested. func NewRebuilder() *CacheRebuilder { cr := &CacheRebuilder{NewThrottle(5*time.Minute, true)} go func() { for cr.throttle.Next() { cr.doRebuild() } }() return cr } func (cr *CacheRebuilder) Stop() { cr.throttle.Stop() } func (cr *CacheRebuilder) Rebuild() { cr.throttle.Trigger() } func (cr *CacheRebuilder) doRebuild() { // actually rebuild the cache. } ``` ================================================ FILE: vendor/github.com/boz/go-throttle/throttle.go ================================================ // Package throttle provides functionality to limit the frequency with which code is called // // Throttling is of the Trigger() method and depends on the parameters passed (period, trailing). // // The period parameter defines how often the throttled code can run. A period of one second means // that the throttled code will run at most once per second. // // The trailing parameter defines what hapens if Trigger() is called after the throttled code has been // started, but before the period is finished. If trailing is false then these triggers are ignored. // If trailing is true then the throttled code is executed one more time at the beginning of the next period. // // Example with period = time.Second and trailing = false: // // Whole seconds after first trigger...|0|0|0|0|1|1|1|1| // Trigger() gets called...............|X| |X| | |X| | | // Throttled code gets called..........|X| | | | |X| | | // // Note that the second trigger had no effect. The third Trigger() caused immediate execution of the // throttled code. // // Example with period = time.Second and trailing = true: // // Whole seconds after first trigger...|0|0|0|0|1|1|1|1| // Trigger() gets called...............|X| |X| | |X| | | // Throttled code gets called..........|X| | | |X| | | | // // Note that the second Trigger() causes the throttled code to get called once the first period is over. // The third Trigger() will do the same. package throttle import ( "sync" "time" ) // ThrottleDriver is an interface for requesting execution of the throttled resource // and for stopping the throttler. type ThrottleDriver interface { // Trigger() requests execution of the throttled resource. Trigger() // Stop() stops the throttler. Stop() } // Throttle extends ThrottleDriver with Next(), which is used by the client to throttle its code. type Throttle interface { ThrottleDriver // Next() returns true at most once per `period`. If false is returned the throttler has been stoped. Next() bool } // NewThrottle returns a new Throttle. If trailing is true then a multiple Trigger() calls in one // period will cause a delayed Trigger() to be called in the next period. func NewThrottle(period time.Duration, trailing bool) Throttle { return newThrottler(period, trailing) } // ThottleFunc executes f at most once every period. Stop() must eventually be called // on the return value to prevent a leaked go proc. func ThrottleFunc(period time.Duration, trailing bool, f func()) ThrottleDriver { throttler := newThrottler(period, trailing) go func() { for throttler.Next() { f() } }() return throttler } type throttler struct { cond *sync.Cond period time.Duration trailing bool last time.Time waiting bool stop bool } func newThrottler(period time.Duration, trailing bool) *throttler { return &throttler{ period: period, trailing: trailing, cond: sync.NewCond(&sync.Mutex{}), } } // Trigger signals an attempt to execute the throttled code. // If Trigger is called twice within the same period, Next() will be called once for that period // (and once for the next period if trailing is true). func (t *throttler) Trigger() { t.cond.L.Lock() defer t.cond.L.Unlock() if !t.waiting && !t.stop { delta := time.Now().Sub(t.last) if delta > t.period { t.waiting = true t.cond.Broadcast() } else if t.trailing { t.waiting = true time.AfterFunc(t.period-delta, t.cond.Broadcast) } } } // Next() returns true at most once per period. While it returns true, the throttle is running. // When it returns false the throttle has been stopped. func (t *throttler) Next() bool { t.cond.L.Lock() defer t.cond.L.Unlock() for !t.waiting && !t.stop { t.cond.Wait() } if !t.stop { t.waiting = false t.last = time.Now() } return !t.stop } // Stop the throttle func (t *throttler) Stop() { t.cond.L.Lock() defer t.cond.L.Unlock() t.stop = true t.cond.Broadcast() } ================================================ FILE: vendor/github.com/cloudfoundry/jibber_jabber/.travis.yml ================================================ language: go go: - 1.2 before_install: - go get github.com/onsi/ginkgo/... - go get github.com/onsi/gomega/... - go install github.com/onsi/ginkgo/ginkgo script: PATH=$PATH:$HOME/gopath/bin ginkgo -r . branches: only: - master ================================================ FILE: vendor/github.com/cloudfoundry/jibber_jabber/LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor 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, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2014 Pivotal Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/github.com/cloudfoundry/jibber_jabber/README.md ================================================ # Jibber Jabber [![Build Status](https://travis-ci.org/cloudfoundry/jibber_jabber.svg?branch=master)](https://travis-ci.org/cloudfoundry/jibber_jabber) Jibber Jabber is a GoLang Library that can be used to detect an operating system's current language. ### OS Support OSX and Linux via the `LC_ALL` and `LANG` environment variables. These are standard variables that are used in ALL versions of UNIX for language detection. Windows via [GetUserDefaultLocaleName](http://msdn.microsoft.com/en-us/library/windows/desktop/dd318136.aspx) and [GetSystemDefaultLocaleName](http://msdn.microsoft.com/en-us/library/windows/desktop/dd318122.aspx) system calls. These calls are supported in Windows Vista and up. # Usage Add the following line to your go `import`: ``` "github.com/cloudfoundry/jibber_jabber" ``` ### DetectIETF `DetectIETF` will return the current locale as a string. The format of the locale will be the [ISO 639](http://en.wikipedia.org/wiki/ISO_639) two-letter language code, a DASH, then an [ISO 3166](http://en.wikipedia.org/wiki/ISO_3166-1) two-letter country code. ``` userLocale, err := jibber_jabber.DetectIETF() println("Locale:", userLocale) ``` ### DetectLanguage `DetectLanguage` will return the current languge as a string. The format will be the [ISO 639](http://en.wikipedia.org/wiki/ISO_639) two-letter language code. ``` userLanguage, err := jibber_jabber.DetectLanguage() println("Language:", userLanguage) ``` ### DetectTerritory `DetectTerritory` will return the current locale territory as a string. The format will be the [ISO 3166](http://en.wikipedia.org/wiki/ISO_3166-1) two-letter country code. ``` localeTerritory, err := jibber_jabber.DetectTerritory() println("Territory:", localeTerritory) ``` ### Errors All the Detect commands will return an error if they are unable to read the Locale from the system. For Windows, additional error information is provided due to the nature of the system call being used. ================================================ FILE: vendor/github.com/cloudfoundry/jibber_jabber/jibber_jabber.go ================================================ package jibber_jabber import ( "strings" ) const ( COULD_NOT_DETECT_PACKAGE_ERROR_MESSAGE = "Could not detect Language" ) func splitLocale(locale string) (string, string) { formattedLocale := strings.Split(locale, ".")[0] formattedLocale = strings.Replace(formattedLocale, "-", "_", -1) pieces := strings.Split(formattedLocale, "_") language := pieces[0] territory := "" if len(pieces) > 1 { territory = strings.Split(formattedLocale, "_")[1] } return language, territory } ================================================ FILE: vendor/github.com/cloudfoundry/jibber_jabber/jibber_jabber_unix.go ================================================ // +build darwin freebsd linux netbsd openbsd package jibber_jabber import ( "errors" "os" "strings" ) func getLangFromEnv() (locale string) { locale = os.Getenv("LC_ALL") if locale == "" { locale = os.Getenv("LANG") } return } func getUnixLocale() (unix_locale string, err error) { unix_locale = getLangFromEnv() if unix_locale == "" { err = errors.New(COULD_NOT_DETECT_PACKAGE_ERROR_MESSAGE) } return } func DetectIETF() (locale string, err error) { unix_locale, err := getUnixLocale() if err == nil { language, territory := splitLocale(unix_locale) locale = language if territory != "" { locale = strings.Join([]string{language, territory}, "-") } } return } func DetectLanguage() (language string, err error) { unix_locale, err := getUnixLocale() if err == nil { language, _ = splitLocale(unix_locale) } return } func DetectTerritory() (territory string, err error) { unix_locale, err := getUnixLocale() if err == nil { _, territory = splitLocale(unix_locale) } return } ================================================ FILE: vendor/github.com/cloudfoundry/jibber_jabber/jibber_jabber_windows.go ================================================ // +build windows package jibber_jabber import ( "errors" "syscall" "unsafe" ) const LOCALE_NAME_MAX_LENGTH uint32 = 85 var SUPPORTED_LOCALES = map[uintptr]string{ 0x0407: "de-DE", 0x0409: "en-US", 0x0c0a: "es-ES", //or is it 0x040a 0x040c: "fr-FR", 0x0410: "it-IT", 0x0411: "ja-JA", 0x0412: "ko_KR", 0x0416: "pt-BR", //0x0419: "ru_RU", - Will add support for Russian when nicksnyder/go-i18n supports Russian 0x0804: "zh-CN", 0x0c04: "zh-HK", 0x0404: "zh-TW", } func getWindowsLocaleFrom(sysCall string) (locale string, err error) { buffer := make([]uint16, LOCALE_NAME_MAX_LENGTH) dll := syscall.MustLoadDLL("kernel32") proc := dll.MustFindProc(sysCall) r, _, dllError := proc.Call(uintptr(unsafe.Pointer(&buffer[0])), uintptr(LOCALE_NAME_MAX_LENGTH)) if r == 0 { err = errors.New(COULD_NOT_DETECT_PACKAGE_ERROR_MESSAGE + ":\n" + dllError.Error()) return } locale = syscall.UTF16ToString(buffer) return } func getAllWindowsLocaleFrom(sysCall string) (string, error) { dll, err := syscall.LoadDLL("kernel32") if err != nil { return "", errors.New("Could not find kernel32 dll") } proc, err := dll.FindProc(sysCall) if err != nil { return "", err } locale, _, dllError := proc.Call() if locale == 0 { return "", errors.New(COULD_NOT_DETECT_PACKAGE_ERROR_MESSAGE + ":\n" + dllError.Error()) } return SUPPORTED_LOCALES[locale], nil } func getWindowsLocale() (locale string, err error) { dll, err := syscall.LoadDLL("kernel32") if err != nil { return "", errors.New("Could not find kernel32 dll") } proc, err := dll.FindProc("GetVersion") if err != nil { return "", err } v, _, _ := proc.Call() windowsVersion := byte(v) isVistaOrGreater := (windowsVersion >= 6) if isVistaOrGreater { locale, err = getWindowsLocaleFrom("GetUserDefaultLocaleName") if err != nil { locale, err = getWindowsLocaleFrom("GetSystemDefaultLocaleName") } } else if !isVistaOrGreater { locale, err = getAllWindowsLocaleFrom("GetUserDefaultLCID") if err != nil { locale, err = getAllWindowsLocaleFrom("GetSystemDefaultLCID") } } else { panic(v) } return } func DetectIETF() (locale string, err error) { locale, err = getWindowsLocale() return } func DetectLanguage() (language string, err error) { windows_locale, err := getWindowsLocale() if err == nil { language, _ = splitLocale(windows_locale) } return } func DetectTerritory() (territory string, err error) { windows_locale, err := getWindowsLocale() if err == nil { _, territory = splitLocale(windows_locale) } return } ================================================ FILE: vendor/github.com/containerd/errdefs/LICENSE ================================================ Apache License Version 2.0, January 2004 https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor 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, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS Copyright The containerd Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/github.com/containerd/errdefs/README.md ================================================ # errdefs A Go package for defining and checking common containerd errors. ## Project details **errdefs** is a containerd sub-project, licensed under the [Apache 2.0 license](./LICENSE). As a containerd sub-project, you will find the: * [Project governance](https://github.com/containerd/project/blob/main/GOVERNANCE.md), * [Maintainers](https://github.com/containerd/project/blob/main/MAINTAINERS), * and [Contributing guidelines](https://github.com/containerd/project/blob/main/CONTRIBUTING.md) information in our [`containerd/project`](https://github.com/containerd/project) repository. ================================================ FILE: vendor/github.com/containerd/errdefs/errors.go ================================================ /* Copyright The containerd Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Package errdefs defines the common errors used throughout containerd // packages. // // Use with fmt.Errorf to add context to an error. // // To detect an error class, use the IsXXX functions to tell whether an error // is of a certain type. package errdefs import ( "context" "errors" ) // Definitions of common error types used throughout containerd. All containerd // errors returned by most packages will map into one of these errors classes. // Packages should return errors of these types when they want to instruct a // client to take a particular action. // // These errors map closely to grpc errors. var ( ErrUnknown = errUnknown{} ErrInvalidArgument = errInvalidArgument{} ErrNotFound = errNotFound{} ErrAlreadyExists = errAlreadyExists{} ErrPermissionDenied = errPermissionDenied{} ErrResourceExhausted = errResourceExhausted{} ErrFailedPrecondition = errFailedPrecondition{} ErrConflict = errConflict{} ErrNotModified = errNotModified{} ErrAborted = errAborted{} ErrOutOfRange = errOutOfRange{} ErrNotImplemented = errNotImplemented{} ErrInternal = errInternal{} ErrUnavailable = errUnavailable{} ErrDataLoss = errDataLoss{} ErrUnauthenticated = errUnauthorized{} ) // cancelled maps to Moby's "ErrCancelled" type cancelled interface { Cancelled() } // IsCanceled returns true if the error is due to `context.Canceled`. func IsCanceled(err error) bool { return errors.Is(err, context.Canceled) || isInterface[cancelled](err) } type errUnknown struct{} func (errUnknown) Error() string { return "unknown" } func (errUnknown) Unknown() {} func (e errUnknown) WithMessage(msg string) error { return customMessage{e, msg} } // unknown maps to Moby's "ErrUnknown" type unknown interface { Unknown() } // IsUnknown returns true if the error is due to an unknown error, // unhandled condition or unexpected response. func IsUnknown(err error) bool { return errors.Is(err, errUnknown{}) || isInterface[unknown](err) } type errInvalidArgument struct{} func (errInvalidArgument) Error() string { return "invalid argument" } func (errInvalidArgument) InvalidParameter() {} func (e errInvalidArgument) WithMessage(msg string) error { return customMessage{e, msg} } // invalidParameter maps to Moby's "ErrInvalidParameter" type invalidParameter interface { InvalidParameter() } // IsInvalidArgument returns true if the error is due to an invalid argument func IsInvalidArgument(err error) bool { return errors.Is(err, ErrInvalidArgument) || isInterface[invalidParameter](err) } // deadlineExceed maps to Moby's "ErrDeadline" type deadlineExceeded interface { DeadlineExceeded() } // IsDeadlineExceeded returns true if the error is due to // `context.DeadlineExceeded`. func IsDeadlineExceeded(err error) bool { return errors.Is(err, context.DeadlineExceeded) || isInterface[deadlineExceeded](err) } type errNotFound struct{} func (errNotFound) Error() string { return "not found" } func (errNotFound) NotFound() {} func (e errNotFound) WithMessage(msg string) error { return customMessage{e, msg} } // notFound maps to Moby's "ErrNotFound" type notFound interface { NotFound() } // IsNotFound returns true if the error is due to a missing object func IsNotFound(err error) bool { return errors.Is(err, ErrNotFound) || isInterface[notFound](err) } type errAlreadyExists struct{} func (errAlreadyExists) Error() string { return "already exists" } func (errAlreadyExists) AlreadyExists() {} func (e errAlreadyExists) WithMessage(msg string) error { return customMessage{e, msg} } type alreadyExists interface { AlreadyExists() } // IsAlreadyExists returns true if the error is due to an already existing // metadata item func IsAlreadyExists(err error) bool { return errors.Is(err, ErrAlreadyExists) || isInterface[alreadyExists](err) } type errPermissionDenied struct{} func (errPermissionDenied) Error() string { return "permission denied" } func (errPermissionDenied) Forbidden() {} func (e errPermissionDenied) WithMessage(msg string) error { return customMessage{e, msg} } // forbidden maps to Moby's "ErrForbidden" type forbidden interface { Forbidden() } // IsPermissionDenied returns true if the error is due to permission denied // or forbidden (403) response func IsPermissionDenied(err error) bool { return errors.Is(err, ErrPermissionDenied) || isInterface[forbidden](err) } type errResourceExhausted struct{} func (errResourceExhausted) Error() string { return "resource exhausted" } func (errResourceExhausted) ResourceExhausted() {} func (e errResourceExhausted) WithMessage(msg string) error { return customMessage{e, msg} } type resourceExhausted interface { ResourceExhausted() } // IsResourceExhausted returns true if the error is due to // a lack of resources or too many attempts. func IsResourceExhausted(err error) bool { return errors.Is(err, errResourceExhausted{}) || isInterface[resourceExhausted](err) } type errFailedPrecondition struct{} func (e errFailedPrecondition) Error() string { return "failed precondition" } func (errFailedPrecondition) FailedPrecondition() {} func (e errFailedPrecondition) WithMessage(msg string) error { return customMessage{e, msg} } type failedPrecondition interface { FailedPrecondition() } // IsFailedPrecondition returns true if an operation could not proceed due to // the lack of a particular condition func IsFailedPrecondition(err error) bool { return errors.Is(err, errFailedPrecondition{}) || isInterface[failedPrecondition](err) } type errConflict struct{} func (errConflict) Error() string { return "conflict" } func (errConflict) Conflict() {} func (e errConflict) WithMessage(msg string) error { return customMessage{e, msg} } // conflict maps to Moby's "ErrConflict" type conflict interface { Conflict() } // IsConflict returns true if an operation could not proceed due to // a conflict. func IsConflict(err error) bool { return errors.Is(err, errConflict{}) || isInterface[conflict](err) } type errNotModified struct{} func (errNotModified) Error() string { return "not modified" } func (errNotModified) NotModified() {} func (e errNotModified) WithMessage(msg string) error { return customMessage{e, msg} } // notModified maps to Moby's "ErrNotModified" type notModified interface { NotModified() } // IsNotModified returns true if an operation could not proceed due // to an object not modified from a previous state. func IsNotModified(err error) bool { return errors.Is(err, errNotModified{}) || isInterface[notModified](err) } type errAborted struct{} func (errAborted) Error() string { return "aborted" } func (errAborted) Aborted() {} func (e errAborted) WithMessage(msg string) error { return customMessage{e, msg} } type aborted interface { Aborted() } // IsAborted returns true if an operation was aborted. func IsAborted(err error) bool { return errors.Is(err, errAborted{}) || isInterface[aborted](err) } type errOutOfRange struct{} func (errOutOfRange) Error() string { return "out of range" } func (errOutOfRange) OutOfRange() {} func (e errOutOfRange) WithMessage(msg string) error { return customMessage{e, msg} } type outOfRange interface { OutOfRange() } // IsOutOfRange returns true if an operation could not proceed due // to data being out of the expected range. func IsOutOfRange(err error) bool { return errors.Is(err, errOutOfRange{}) || isInterface[outOfRange](err) } type errNotImplemented struct{} func (errNotImplemented) Error() string { return "not implemented" } func (errNotImplemented) NotImplemented() {} func (e errNotImplemented) WithMessage(msg string) error { return customMessage{e, msg} } // notImplemented maps to Moby's "ErrNotImplemented" type notImplemented interface { NotImplemented() } // IsNotImplemented returns true if the error is due to not being implemented func IsNotImplemented(err error) bool { return errors.Is(err, errNotImplemented{}) || isInterface[notImplemented](err) } type errInternal struct{} func (errInternal) Error() string { return "internal" } func (errInternal) System() {} func (e errInternal) WithMessage(msg string) error { return customMessage{e, msg} } // system maps to Moby's "ErrSystem" type system interface { System() } // IsInternal returns true if the error returns to an internal or system error func IsInternal(err error) bool { return errors.Is(err, errInternal{}) || isInterface[system](err) } type errUnavailable struct{} func (errUnavailable) Error() string { return "unavailable" } func (errUnavailable) Unavailable() {} func (e errUnavailable) WithMessage(msg string) error { return customMessage{e, msg} } // unavailable maps to Moby's "ErrUnavailable" type unavailable interface { Unavailable() } // IsUnavailable returns true if the error is due to a resource being unavailable func IsUnavailable(err error) bool { return errors.Is(err, errUnavailable{}) || isInterface[unavailable](err) } type errDataLoss struct{} func (errDataLoss) Error() string { return "data loss" } func (errDataLoss) DataLoss() {} func (e errDataLoss) WithMessage(msg string) error { return customMessage{e, msg} } // dataLoss maps to Moby's "ErrDataLoss" type dataLoss interface { DataLoss() } // IsDataLoss returns true if data during an operation was lost or corrupted func IsDataLoss(err error) bool { return errors.Is(err, errDataLoss{}) || isInterface[dataLoss](err) } type errUnauthorized struct{} func (errUnauthorized) Error() string { return "unauthorized" } func (errUnauthorized) Unauthorized() {} func (e errUnauthorized) WithMessage(msg string) error { return customMessage{e, msg} } // unauthorized maps to Moby's "ErrUnauthorized" type unauthorized interface { Unauthorized() } // IsUnauthorized returns true if the error indicates that the user was // unauthenticated or unauthorized. func IsUnauthorized(err error) bool { return errors.Is(err, errUnauthorized{}) || isInterface[unauthorized](err) } func isInterface[T any](err error) bool { for { switch x := err.(type) { case T: return true case customMessage: err = x.err case interface{ Unwrap() error }: err = x.Unwrap() if err == nil { return false } case interface{ Unwrap() []error }: for _, err := range x.Unwrap() { if isInterface[T](err) { return true } } return false default: return false } } } // customMessage is used to provide a defined error with a custom message. // The message is not wrapped but can be compared by the `Is(error) bool` interface. type customMessage struct { err error msg string } func (c customMessage) Is(err error) bool { return c.err == err } func (c customMessage) As(target any) bool { return errors.As(c.err, target) } func (c customMessage) Error() string { return c.msg } ================================================ FILE: vendor/github.com/containerd/errdefs/pkg/LICENSE ================================================ Apache License Version 2.0, January 2004 https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor 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, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS Copyright The containerd Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/github.com/containerd/errdefs/pkg/errhttp/http.go ================================================ /* Copyright The containerd Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Package errhttp provides utility functions for translating errors to // and from a HTTP context. // // The functions ToHTTP and ToNative can be used to map server-side and // client-side errors to the correct types. package errhttp import ( "errors" "net/http" "github.com/containerd/errdefs" "github.com/containerd/errdefs/pkg/internal/cause" ) // ToHTTP returns the best status code for the given error func ToHTTP(err error) int { switch { case errdefs.IsNotFound(err): return http.StatusNotFound case errdefs.IsInvalidArgument(err): return http.StatusBadRequest case errdefs.IsConflict(err): return http.StatusConflict case errdefs.IsNotModified(err): return http.StatusNotModified case errdefs.IsFailedPrecondition(err): return http.StatusPreconditionFailed case errdefs.IsUnauthorized(err): return http.StatusUnauthorized case errdefs.IsPermissionDenied(err): return http.StatusForbidden case errdefs.IsResourceExhausted(err): return http.StatusTooManyRequests case errdefs.IsInternal(err): return http.StatusInternalServerError case errdefs.IsNotImplemented(err): return http.StatusNotImplemented case errdefs.IsUnavailable(err): return http.StatusServiceUnavailable case errdefs.IsUnknown(err): var unexpected cause.ErrUnexpectedStatus if errors.As(err, &unexpected) && unexpected.Status >= 200 && unexpected.Status < 600 { return unexpected.Status } return http.StatusInternalServerError default: return http.StatusInternalServerError } } // ToNative returns the error best matching the HTTP status code func ToNative(statusCode int) error { switch statusCode { case http.StatusNotFound: return errdefs.ErrNotFound case http.StatusBadRequest: return errdefs.ErrInvalidArgument case http.StatusConflict: return errdefs.ErrConflict case http.StatusPreconditionFailed: return errdefs.ErrFailedPrecondition case http.StatusUnauthorized: return errdefs.ErrUnauthenticated case http.StatusForbidden: return errdefs.ErrPermissionDenied case http.StatusNotModified: return errdefs.ErrNotModified case http.StatusTooManyRequests: return errdefs.ErrResourceExhausted case http.StatusInternalServerError: return errdefs.ErrInternal case http.StatusNotImplemented: return errdefs.ErrNotImplemented case http.StatusServiceUnavailable: return errdefs.ErrUnavailable default: return cause.ErrUnexpectedStatus{Status: statusCode} } } ================================================ FILE: vendor/github.com/containerd/errdefs/pkg/internal/cause/cause.go ================================================ /* Copyright The containerd Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Package cause is used to define root causes for errors // common to errors packages like grpc and http. package cause import "fmt" type ErrUnexpectedStatus struct { Status int } const UnexpectedStatusPrefix = "unexpected status " func (e ErrUnexpectedStatus) Error() string { return fmt.Sprintf("%s%d", UnexpectedStatusPrefix, e.Status) } func (ErrUnexpectedStatus) Unknown() {} ================================================ FILE: vendor/github.com/containerd/errdefs/resolve.go ================================================ /* Copyright The containerd Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package errdefs import "context" // Resolve returns the first error found in the error chain which matches an // error defined in this package or context error. A raw, unwrapped error is // returned or ErrUnknown if no matching error is found. // // This is useful for determining a response code based on the outermost wrapped // error rather than the original cause. For example, a not found error deep // in the code may be wrapped as an invalid argument. When determining status // code from Is* functions, the depth or ordering of the error is not // considered. // // The search order is depth first, a wrapped error returned from any part of // the chain from `Unwrap() error` will be returned before any joined errors // as returned by `Unwrap() []error`. func Resolve(err error) error { if err == nil { return nil } err = firstError(err) if err == nil { err = ErrUnknown } return err } func firstError(err error) error { for { switch err { case ErrUnknown, ErrInvalidArgument, ErrNotFound, ErrAlreadyExists, ErrPermissionDenied, ErrResourceExhausted, ErrFailedPrecondition, ErrConflict, ErrNotModified, ErrAborted, ErrOutOfRange, ErrNotImplemented, ErrInternal, ErrUnavailable, ErrDataLoss, ErrUnauthenticated, context.DeadlineExceeded, context.Canceled: return err } switch e := err.(type) { case customMessage: err = e.err case unknown: return ErrUnknown case invalidParameter: return ErrInvalidArgument case notFound: return ErrNotFound case alreadyExists: return ErrAlreadyExists case forbidden: return ErrPermissionDenied case resourceExhausted: return ErrResourceExhausted case failedPrecondition: return ErrFailedPrecondition case conflict: return ErrConflict case notModified: return ErrNotModified case aborted: return ErrAborted case errOutOfRange: return ErrOutOfRange case notImplemented: return ErrNotImplemented case system: return ErrInternal case unavailable: return ErrUnavailable case dataLoss: return ErrDataLoss case unauthorized: return ErrUnauthenticated case deadlineExceeded: return context.DeadlineExceeded case cancelled: return context.Canceled case interface{ Unwrap() error }: err = e.Unwrap() if err == nil { return nil } case interface{ Unwrap() []error }: for _, ue := range e.Unwrap() { if fe := firstError(ue); fe != nil { return fe } } return nil case interface{ Is(error) bool }: for _, target := range []error{ErrUnknown, ErrInvalidArgument, ErrNotFound, ErrAlreadyExists, ErrPermissionDenied, ErrResourceExhausted, ErrFailedPrecondition, ErrConflict, ErrNotModified, ErrAborted, ErrOutOfRange, ErrNotImplemented, ErrInternal, ErrUnavailable, ErrDataLoss, ErrUnauthenticated, context.DeadlineExceeded, context.Canceled} { if e.Is(target) { return target } } return nil default: return nil } } } ================================================ FILE: vendor/github.com/containerd/log/.golangci.yml ================================================ linters: enable: - exportloopref # Checks for pointers to enclosing loop variables - gofmt - goimports - gosec - ineffassign - misspell - nolintlint - revive - staticcheck - tenv # Detects using os.Setenv instead of t.Setenv since Go 1.17 - unconvert - unused - vet - dupword # Checks for duplicate words in the source code disable: - errcheck run: timeout: 5m skip-dirs: - api - cluster - design - docs - docs/man - releases - reports - test # e2e scripts ================================================ FILE: vendor/github.com/containerd/log/LICENSE ================================================ Apache License Version 2.0, January 2004 https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor 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, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS Copyright The containerd Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/github.com/containerd/log/README.md ================================================ # log A Go package providing a common logging interface across containerd repositories and a way for clients to use and configure logging in containerd packages. This package is not intended to be used as a standalone logging package outside of the containerd ecosystem and is intended as an interface wrapper around a logging implementation. In the future this package may be replaced with a common go logging interface. ## Project details **log** is a containerd sub-project, licensed under the [Apache 2.0 license](./LICENSE). As a containerd sub-project, you will find the: * [Project governance](https://github.com/containerd/project/blob/main/GOVERNANCE.md), * [Maintainers](https://github.com/containerd/project/blob/main/MAINTAINERS), * and [Contributing guidelines](https://github.com/containerd/project/blob/main/CONTRIBUTING.md) information in our [`containerd/project`](https://github.com/containerd/project) repository. ================================================ FILE: vendor/github.com/containerd/log/context.go ================================================ /* Copyright The containerd Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Package log provides types and functions related to logging, passing // loggers through a context, and attaching context to the logger. // // # Transitional types // // This package contains various types that are aliases for types in [logrus]. // These aliases are intended for transitioning away from hard-coding logrus // as logging implementation. Consumers of this package are encouraged to use // the type-aliases from this package instead of directly using their logrus // equivalent. // // The intent is to replace these aliases with locally defined types and // interfaces once all consumers are no longer directly importing logrus // types. // // IMPORTANT: due to the transitional purpose of this package, it is not // guaranteed for the full logrus API to be provided in the future. As // outlined, these aliases are provided as a step to transition away from // a specific implementation which, as a result, exposes the full logrus API. // While no decisions have been made on the ultimate design and interface // provided by this package, we do not expect carrying "less common" features. package log import ( "context" "fmt" "github.com/sirupsen/logrus" ) // G is a shorthand for [GetLogger]. // // We may want to define this locally to a package to get package tagged log // messages. var G = GetLogger // L is an alias for the standard logger. var L = &Entry{ Logger: logrus.StandardLogger(), // Default is three fields plus a little extra room. Data: make(Fields, 6), } type loggerKey struct{} // Fields type to pass to "WithFields". type Fields = map[string]any // Entry is a logging entry. It contains all the fields passed with // [Entry.WithFields]. It's finally logged when Trace, Debug, Info, Warn, // Error, Fatal or Panic is called on it. These objects can be reused and // passed around as much as you wish to avoid field duplication. // // Entry is a transitional type, and currently an alias for [logrus.Entry]. type Entry = logrus.Entry // RFC3339NanoFixed is [time.RFC3339Nano] with nanoseconds padded using // zeros to ensure the formatted time is always the same number of // characters. const RFC3339NanoFixed = "2006-01-02T15:04:05.000000000Z07:00" // Level is a logging level. type Level = logrus.Level // Supported log levels. const ( // TraceLevel level. Designates finer-grained informational events // than [DebugLevel]. TraceLevel Level = logrus.TraceLevel // DebugLevel level. Usually only enabled when debugging. Very verbose // logging. DebugLevel Level = logrus.DebugLevel // InfoLevel level. General operational entries about what's going on // inside the application. InfoLevel Level = logrus.InfoLevel // WarnLevel level. Non-critical entries that deserve eyes. WarnLevel Level = logrus.WarnLevel // ErrorLevel level. Logs errors that should definitely be noted. // Commonly used for hooks to send errors to an error tracking service. ErrorLevel Level = logrus.ErrorLevel // FatalLevel level. Logs and then calls "logger.Exit(1)". It exits // even if the logging level is set to Panic. FatalLevel Level = logrus.FatalLevel // PanicLevel level. This is the highest level of severity. Logs and // then calls panic with the message passed to Debug, Info, ... PanicLevel Level = logrus.PanicLevel ) // SetLevel sets log level globally. It returns an error if the given // level is not supported. // // level can be one of: // // - "trace" ([TraceLevel]) // - "debug" ([DebugLevel]) // - "info" ([InfoLevel]) // - "warn" ([WarnLevel]) // - "error" ([ErrorLevel]) // - "fatal" ([FatalLevel]) // - "panic" ([PanicLevel]) func SetLevel(level string) error { lvl, err := logrus.ParseLevel(level) if err != nil { return err } L.Logger.SetLevel(lvl) return nil } // GetLevel returns the current log level. func GetLevel() Level { return L.Logger.GetLevel() } // OutputFormat specifies a log output format. type OutputFormat string // Supported log output formats. const ( // TextFormat represents the text logging format. TextFormat OutputFormat = "text" // JSONFormat represents the JSON logging format. JSONFormat OutputFormat = "json" ) // SetFormat sets the log output format ([TextFormat] or [JSONFormat]). func SetFormat(format OutputFormat) error { switch format { case TextFormat: L.Logger.SetFormatter(&logrus.TextFormatter{ TimestampFormat: RFC3339NanoFixed, FullTimestamp: true, }) return nil case JSONFormat: L.Logger.SetFormatter(&logrus.JSONFormatter{ TimestampFormat: RFC3339NanoFixed, }) return nil default: return fmt.Errorf("unknown log format: %s", format) } } // WithLogger returns a new context with the provided logger. Use in // combination with logger.WithField(s) for great effect. func WithLogger(ctx context.Context, logger *Entry) context.Context { return context.WithValue(ctx, loggerKey{}, logger.WithContext(ctx)) } // GetLogger retrieves the current logger from the context. If no logger is // available, the default logger is returned. func GetLogger(ctx context.Context) *Entry { if logger := ctx.Value(loggerKey{}); logger != nil { return logger.(*Entry) } return L.WithContext(ctx) } ================================================ FILE: vendor/github.com/davecgh/go-spew/LICENSE ================================================ ISC License Copyright (c) 2012-2016 Dave Collins Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ================================================ FILE: vendor/github.com/davecgh/go-spew/spew/bypass.go ================================================ // Copyright (c) 2015-2016 Dave Collins // // Permission to use, copy, modify, and distribute this software for any // purpose with or without fee is hereby granted, provided that the above // copyright notice and this permission notice appear in all copies. // // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. // NOTE: Due to the following build constraints, this file will only be compiled // when the code is not running on Google App Engine, compiled by GopherJS, and // "-tags safe" is not added to the go build command line. The "disableunsafe" // tag is deprecated and thus should not be used. // Go versions prior to 1.4 are disabled because they use a different layout // for interfaces which make the implementation of unsafeReflectValue more complex. // +build !js,!appengine,!safe,!disableunsafe,go1.4 package spew import ( "reflect" "unsafe" ) const ( // UnsafeDisabled is a build-time constant which specifies whether or // not access to the unsafe package is available. UnsafeDisabled = false // ptrSize is the size of a pointer on the current arch. ptrSize = unsafe.Sizeof((*byte)(nil)) ) type flag uintptr var ( // flagRO indicates whether the value field of a reflect.Value // is read-only. flagRO flag // flagAddr indicates whether the address of the reflect.Value's // value may be taken. flagAddr flag ) // flagKindMask holds the bits that make up the kind // part of the flags field. In all the supported versions, // it is in the lower 5 bits. const flagKindMask = flag(0x1f) // Different versions of Go have used different // bit layouts for the flags type. This table // records the known combinations. var okFlags = []struct { ro, addr flag }{{ // From Go 1.4 to 1.5 ro: 1 << 5, addr: 1 << 7, }, { // Up to Go tip. ro: 1<<5 | 1<<6, addr: 1 << 8, }} var flagValOffset = func() uintptr { field, ok := reflect.TypeOf(reflect.Value{}).FieldByName("flag") if !ok { panic("reflect.Value has no flag field") } return field.Offset }() // flagField returns a pointer to the flag field of a reflect.Value. func flagField(v *reflect.Value) *flag { return (*flag)(unsafe.Pointer(uintptr(unsafe.Pointer(v)) + flagValOffset)) } // unsafeReflectValue converts the passed reflect.Value into a one that bypasses // the typical safety restrictions preventing access to unaddressable and // unexported data. It works by digging the raw pointer to the underlying // value out of the protected value and generating a new unprotected (unsafe) // reflect.Value to it. // // This allows us to check for implementations of the Stringer and error // interfaces to be used for pretty printing ordinarily unaddressable and // inaccessible values such as unexported struct fields. func unsafeReflectValue(v reflect.Value) reflect.Value { if !v.IsValid() || (v.CanInterface() && v.CanAddr()) { return v } flagFieldPtr := flagField(&v) *flagFieldPtr &^= flagRO *flagFieldPtr |= flagAddr return v } // Sanity checks against future reflect package changes // to the type or semantics of the Value.flag field. func init() { field, ok := reflect.TypeOf(reflect.Value{}).FieldByName("flag") if !ok { panic("reflect.Value has no flag field") } if field.Type.Kind() != reflect.TypeOf(flag(0)).Kind() { panic("reflect.Value flag field has changed kind") } type t0 int var t struct { A t0 // t0 will have flagEmbedRO set. t0 // a will have flagStickyRO set a t0 } vA := reflect.ValueOf(t).FieldByName("A") va := reflect.ValueOf(t).FieldByName("a") vt0 := reflect.ValueOf(t).FieldByName("t0") // Infer flagRO from the difference between the flags // for the (otherwise identical) fields in t. flagPublic := *flagField(&vA) flagWithRO := *flagField(&va) | *flagField(&vt0) flagRO = flagPublic ^ flagWithRO // Infer flagAddr from the difference between a value // taken from a pointer and not. vPtrA := reflect.ValueOf(&t).Elem().FieldByName("A") flagNoPtr := *flagField(&vA) flagPtr := *flagField(&vPtrA) flagAddr = flagNoPtr ^ flagPtr // Check that the inferred flags tally with one of the known versions. for _, f := range okFlags { if flagRO == f.ro && flagAddr == f.addr { return } } panic("reflect.Value read-only flag has changed semantics") } ================================================ FILE: vendor/github.com/davecgh/go-spew/spew/bypasssafe.go ================================================ // Copyright (c) 2015-2016 Dave Collins // // Permission to use, copy, modify, and distribute this software for any // purpose with or without fee is hereby granted, provided that the above // copyright notice and this permission notice appear in all copies. // // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. // NOTE: Due to the following build constraints, this file will only be compiled // when the code is running on Google App Engine, compiled by GopherJS, or // "-tags safe" is added to the go build command line. The "disableunsafe" // tag is deprecated and thus should not be used. // +build js appengine safe disableunsafe !go1.4 package spew import "reflect" const ( // UnsafeDisabled is a build-time constant which specifies whether or // not access to the unsafe package is available. UnsafeDisabled = true ) // unsafeReflectValue typically converts the passed reflect.Value into a one // that bypasses the typical safety restrictions preventing access to // unaddressable and unexported data. However, doing this relies on access to // the unsafe package. This is a stub version which simply returns the passed // reflect.Value when the unsafe package is not available. func unsafeReflectValue(v reflect.Value) reflect.Value { return v } ================================================ FILE: vendor/github.com/davecgh/go-spew/spew/common.go ================================================ /* * Copyright (c) 2013-2016 Dave Collins * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ package spew import ( "bytes" "fmt" "io" "reflect" "sort" "strconv" ) // Some constants in the form of bytes to avoid string overhead. This mirrors // the technique used in the fmt package. var ( panicBytes = []byte("(PANIC=") plusBytes = []byte("+") iBytes = []byte("i") trueBytes = []byte("true") falseBytes = []byte("false") interfaceBytes = []byte("(interface {})") commaNewlineBytes = []byte(",\n") newlineBytes = []byte("\n") openBraceBytes = []byte("{") openBraceNewlineBytes = []byte("{\n") closeBraceBytes = []byte("}") asteriskBytes = []byte("*") colonBytes = []byte(":") colonSpaceBytes = []byte(": ") openParenBytes = []byte("(") closeParenBytes = []byte(")") spaceBytes = []byte(" ") pointerChainBytes = []byte("->") nilAngleBytes = []byte("") maxNewlineBytes = []byte("\n") maxShortBytes = []byte("") circularBytes = []byte("") circularShortBytes = []byte("") invalidAngleBytes = []byte("") openBracketBytes = []byte("[") closeBracketBytes = []byte("]") percentBytes = []byte("%") precisionBytes = []byte(".") openAngleBytes = []byte("<") closeAngleBytes = []byte(">") openMapBytes = []byte("map[") closeMapBytes = []byte("]") lenEqualsBytes = []byte("len=") capEqualsBytes = []byte("cap=") ) // hexDigits is used to map a decimal value to a hex digit. var hexDigits = "0123456789abcdef" // catchPanic handles any panics that might occur during the handleMethods // calls. func catchPanic(w io.Writer, v reflect.Value) { if err := recover(); err != nil { w.Write(panicBytes) fmt.Fprintf(w, "%v", err) w.Write(closeParenBytes) } } // handleMethods attempts to call the Error and String methods on the underlying // type the passed reflect.Value represents and outputes the result to Writer w. // // It handles panics in any called methods by catching and displaying the error // as the formatted value. func handleMethods(cs *ConfigState, w io.Writer, v reflect.Value) (handled bool) { // We need an interface to check if the type implements the error or // Stringer interface. However, the reflect package won't give us an // interface on certain things like unexported struct fields in order // to enforce visibility rules. We use unsafe, when it's available, // to bypass these restrictions since this package does not mutate the // values. if !v.CanInterface() { if UnsafeDisabled { return false } v = unsafeReflectValue(v) } // Choose whether or not to do error and Stringer interface lookups against // the base type or a pointer to the base type depending on settings. // Technically calling one of these methods with a pointer receiver can // mutate the value, however, types which choose to satisify an error or // Stringer interface with a pointer receiver should not be mutating their // state inside these interface methods. if !cs.DisablePointerMethods && !UnsafeDisabled && !v.CanAddr() { v = unsafeReflectValue(v) } if v.CanAddr() { v = v.Addr() } // Is it an error or Stringer? switch iface := v.Interface().(type) { case error: defer catchPanic(w, v) if cs.ContinueOnMethod { w.Write(openParenBytes) w.Write([]byte(iface.Error())) w.Write(closeParenBytes) w.Write(spaceBytes) return false } w.Write([]byte(iface.Error())) return true case fmt.Stringer: defer catchPanic(w, v) if cs.ContinueOnMethod { w.Write(openParenBytes) w.Write([]byte(iface.String())) w.Write(closeParenBytes) w.Write(spaceBytes) return false } w.Write([]byte(iface.String())) return true } return false } // printBool outputs a boolean value as true or false to Writer w. func printBool(w io.Writer, val bool) { if val { w.Write(trueBytes) } else { w.Write(falseBytes) } } // printInt outputs a signed integer value to Writer w. func printInt(w io.Writer, val int64, base int) { w.Write([]byte(strconv.FormatInt(val, base))) } // printUint outputs an unsigned integer value to Writer w. func printUint(w io.Writer, val uint64, base int) { w.Write([]byte(strconv.FormatUint(val, base))) } // printFloat outputs a floating point value using the specified precision, // which is expected to be 32 or 64bit, to Writer w. func printFloat(w io.Writer, val float64, precision int) { w.Write([]byte(strconv.FormatFloat(val, 'g', -1, precision))) } // printComplex outputs a complex value using the specified float precision // for the real and imaginary parts to Writer w. func printComplex(w io.Writer, c complex128, floatPrecision int) { r := real(c) w.Write(openParenBytes) w.Write([]byte(strconv.FormatFloat(r, 'g', -1, floatPrecision))) i := imag(c) if i >= 0 { w.Write(plusBytes) } w.Write([]byte(strconv.FormatFloat(i, 'g', -1, floatPrecision))) w.Write(iBytes) w.Write(closeParenBytes) } // printHexPtr outputs a uintptr formatted as hexadecimal with a leading '0x' // prefix to Writer w. func printHexPtr(w io.Writer, p uintptr) { // Null pointer. num := uint64(p) if num == 0 { w.Write(nilAngleBytes) return } // Max uint64 is 16 bytes in hex + 2 bytes for '0x' prefix buf := make([]byte, 18) // It's simpler to construct the hex string right to left. base := uint64(16) i := len(buf) - 1 for num >= base { buf[i] = hexDigits[num%base] num /= base i-- } buf[i] = hexDigits[num] // Add '0x' prefix. i-- buf[i] = 'x' i-- buf[i] = '0' // Strip unused leading bytes. buf = buf[i:] w.Write(buf) } // valuesSorter implements sort.Interface to allow a slice of reflect.Value // elements to be sorted. type valuesSorter struct { values []reflect.Value strings []string // either nil or same len and values cs *ConfigState } // newValuesSorter initializes a valuesSorter instance, which holds a set of // surrogate keys on which the data should be sorted. It uses flags in // ConfigState to decide if and how to populate those surrogate keys. func newValuesSorter(values []reflect.Value, cs *ConfigState) sort.Interface { vs := &valuesSorter{values: values, cs: cs} if canSortSimply(vs.values[0].Kind()) { return vs } if !cs.DisableMethods { vs.strings = make([]string, len(values)) for i := range vs.values { b := bytes.Buffer{} if !handleMethods(cs, &b, vs.values[i]) { vs.strings = nil break } vs.strings[i] = b.String() } } if vs.strings == nil && cs.SpewKeys { vs.strings = make([]string, len(values)) for i := range vs.values { vs.strings[i] = Sprintf("%#v", vs.values[i].Interface()) } } return vs } // canSortSimply tests whether a reflect.Kind is a primitive that can be sorted // directly, or whether it should be considered for sorting by surrogate keys // (if the ConfigState allows it). func canSortSimply(kind reflect.Kind) bool { // This switch parallels valueSortLess, except for the default case. switch kind { case reflect.Bool: return true case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: return true case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint: return true case reflect.Float32, reflect.Float64: return true case reflect.String: return true case reflect.Uintptr: return true case reflect.Array: return true } return false } // Len returns the number of values in the slice. It is part of the // sort.Interface implementation. func (s *valuesSorter) Len() int { return len(s.values) } // Swap swaps the values at the passed indices. It is part of the // sort.Interface implementation. func (s *valuesSorter) Swap(i, j int) { s.values[i], s.values[j] = s.values[j], s.values[i] if s.strings != nil { s.strings[i], s.strings[j] = s.strings[j], s.strings[i] } } // valueSortLess returns whether the first value should sort before the second // value. It is used by valueSorter.Less as part of the sort.Interface // implementation. func valueSortLess(a, b reflect.Value) bool { switch a.Kind() { case reflect.Bool: return !a.Bool() && b.Bool() case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: return a.Int() < b.Int() case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint: return a.Uint() < b.Uint() case reflect.Float32, reflect.Float64: return a.Float() < b.Float() case reflect.String: return a.String() < b.String() case reflect.Uintptr: return a.Uint() < b.Uint() case reflect.Array: // Compare the contents of both arrays. l := a.Len() for i := 0; i < l; i++ { av := a.Index(i) bv := b.Index(i) if av.Interface() == bv.Interface() { continue } return valueSortLess(av, bv) } } return a.String() < b.String() } // Less returns whether the value at index i should sort before the // value at index j. It is part of the sort.Interface implementation. func (s *valuesSorter) Less(i, j int) bool { if s.strings == nil { return valueSortLess(s.values[i], s.values[j]) } return s.strings[i] < s.strings[j] } // sortValues is a sort function that handles both native types and any type that // can be converted to error or Stringer. Other inputs are sorted according to // their Value.String() value to ensure display stability. func sortValues(values []reflect.Value, cs *ConfigState) { if len(values) == 0 { return } sort.Sort(newValuesSorter(values, cs)) } ================================================ FILE: vendor/github.com/davecgh/go-spew/spew/config.go ================================================ /* * Copyright (c) 2013-2016 Dave Collins * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ package spew import ( "bytes" "fmt" "io" "os" ) // ConfigState houses the configuration options used by spew to format and // display values. There is a global instance, Config, that is used to control // all top-level Formatter and Dump functionality. Each ConfigState instance // provides methods equivalent to the top-level functions. // // The zero value for ConfigState provides no indentation. You would typically // want to set it to a space or a tab. // // Alternatively, you can use NewDefaultConfig to get a ConfigState instance // with default settings. See the documentation of NewDefaultConfig for default // values. type ConfigState struct { // Indent specifies the string to use for each indentation level. The // global config instance that all top-level functions use set this to a // single space by default. If you would like more indentation, you might // set this to a tab with "\t" or perhaps two spaces with " ". Indent string // MaxDepth controls the maximum number of levels to descend into nested // data structures. The default, 0, means there is no limit. // // NOTE: Circular data structures are properly detected, so it is not // necessary to set this value unless you specifically want to limit deeply // nested data structures. MaxDepth int // DisableMethods specifies whether or not error and Stringer interfaces are // invoked for types that implement them. DisableMethods bool // DisablePointerMethods specifies whether or not to check for and invoke // error and Stringer interfaces on types which only accept a pointer // receiver when the current type is not a pointer. // // NOTE: This might be an unsafe action since calling one of these methods // with a pointer receiver could technically mutate the value, however, // in practice, types which choose to satisify an error or Stringer // interface with a pointer receiver should not be mutating their state // inside these interface methods. As a result, this option relies on // access to the unsafe package, so it will not have any effect when // running in environments without access to the unsafe package such as // Google App Engine or with the "safe" build tag specified. DisablePointerMethods bool // DisablePointerAddresses specifies whether to disable the printing of // pointer addresses. This is useful when diffing data structures in tests. DisablePointerAddresses bool // DisableCapacities specifies whether to disable the printing of capacities // for arrays, slices, maps and channels. This is useful when diffing // data structures in tests. DisableCapacities bool // ContinueOnMethod specifies whether or not recursion should continue once // a custom error or Stringer interface is invoked. The default, false, // means it will print the results of invoking the custom error or Stringer // interface and return immediately instead of continuing to recurse into // the internals of the data type. // // NOTE: This flag does not have any effect if method invocation is disabled // via the DisableMethods or DisablePointerMethods options. ContinueOnMethod bool // SortKeys specifies map keys should be sorted before being printed. Use // this to have a more deterministic, diffable output. Note that only // native types (bool, int, uint, floats, uintptr and string) and types // that support the error or Stringer interfaces (if methods are // enabled) are supported, with other types sorted according to the // reflect.Value.String() output which guarantees display stability. SortKeys bool // SpewKeys specifies that, as a last resort attempt, map keys should // be spewed to strings and sorted by those strings. This is only // considered if SortKeys is true. SpewKeys bool } // Config is the active configuration of the top-level functions. // The configuration can be changed by modifying the contents of spew.Config. var Config = ConfigState{Indent: " "} // Errorf is a wrapper for fmt.Errorf that treats each argument as if it were // passed with a Formatter interface returned by c.NewFormatter. It returns // the formatted string as a value that satisfies error. See NewFormatter // for formatting details. // // This function is shorthand for the following syntax: // // fmt.Errorf(format, c.NewFormatter(a), c.NewFormatter(b)) func (c *ConfigState) Errorf(format string, a ...interface{}) (err error) { return fmt.Errorf(format, c.convertArgs(a)...) } // Fprint is a wrapper for fmt.Fprint that treats each argument as if it were // passed with a Formatter interface returned by c.NewFormatter. It returns // the number of bytes written and any write error encountered. See // NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Fprint(w, c.NewFormatter(a), c.NewFormatter(b)) func (c *ConfigState) Fprint(w io.Writer, a ...interface{}) (n int, err error) { return fmt.Fprint(w, c.convertArgs(a)...) } // Fprintf is a wrapper for fmt.Fprintf that treats each argument as if it were // passed with a Formatter interface returned by c.NewFormatter. It returns // the number of bytes written and any write error encountered. See // NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Fprintf(w, format, c.NewFormatter(a), c.NewFormatter(b)) func (c *ConfigState) Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) { return fmt.Fprintf(w, format, c.convertArgs(a)...) } // Fprintln is a wrapper for fmt.Fprintln that treats each argument as if it // passed with a Formatter interface returned by c.NewFormatter. See // NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Fprintln(w, c.NewFormatter(a), c.NewFormatter(b)) func (c *ConfigState) Fprintln(w io.Writer, a ...interface{}) (n int, err error) { return fmt.Fprintln(w, c.convertArgs(a)...) } // Print is a wrapper for fmt.Print that treats each argument as if it were // passed with a Formatter interface returned by c.NewFormatter. It returns // the number of bytes written and any write error encountered. See // NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Print(c.NewFormatter(a), c.NewFormatter(b)) func (c *ConfigState) Print(a ...interface{}) (n int, err error) { return fmt.Print(c.convertArgs(a)...) } // Printf is a wrapper for fmt.Printf that treats each argument as if it were // passed with a Formatter interface returned by c.NewFormatter. It returns // the number of bytes written and any write error encountered. See // NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Printf(format, c.NewFormatter(a), c.NewFormatter(b)) func (c *ConfigState) Printf(format string, a ...interface{}) (n int, err error) { return fmt.Printf(format, c.convertArgs(a)...) } // Println is a wrapper for fmt.Println that treats each argument as if it were // passed with a Formatter interface returned by c.NewFormatter. It returns // the number of bytes written and any write error encountered. See // NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Println(c.NewFormatter(a), c.NewFormatter(b)) func (c *ConfigState) Println(a ...interface{}) (n int, err error) { return fmt.Println(c.convertArgs(a)...) } // Sprint is a wrapper for fmt.Sprint that treats each argument as if it were // passed with a Formatter interface returned by c.NewFormatter. It returns // the resulting string. See NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Sprint(c.NewFormatter(a), c.NewFormatter(b)) func (c *ConfigState) Sprint(a ...interface{}) string { return fmt.Sprint(c.convertArgs(a)...) } // Sprintf is a wrapper for fmt.Sprintf that treats each argument as if it were // passed with a Formatter interface returned by c.NewFormatter. It returns // the resulting string. See NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Sprintf(format, c.NewFormatter(a), c.NewFormatter(b)) func (c *ConfigState) Sprintf(format string, a ...interface{}) string { return fmt.Sprintf(format, c.convertArgs(a)...) } // Sprintln is a wrapper for fmt.Sprintln that treats each argument as if it // were passed with a Formatter interface returned by c.NewFormatter. It // returns the resulting string. See NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Sprintln(c.NewFormatter(a), c.NewFormatter(b)) func (c *ConfigState) Sprintln(a ...interface{}) string { return fmt.Sprintln(c.convertArgs(a)...) } /* NewFormatter returns a custom formatter that satisfies the fmt.Formatter interface. As a result, it integrates cleanly with standard fmt package printing functions. The formatter is useful for inline printing of smaller data types similar to the standard %v format specifier. The custom formatter only responds to the %v (most compact), %+v (adds pointer addresses), %#v (adds types), and %#+v (adds types and pointer addresses) verb combinations. Any other verbs such as %x and %q will be sent to the the standard fmt package for formatting. In addition, the custom formatter ignores the width and precision arguments (however they will still work on the format specifiers not handled by the custom formatter). Typically this function shouldn't be called directly. It is much easier to make use of the custom formatter by calling one of the convenience functions such as c.Printf, c.Println, or c.Printf. */ func (c *ConfigState) NewFormatter(v interface{}) fmt.Formatter { return newFormatter(c, v) } // Fdump formats and displays the passed arguments to io.Writer w. It formats // exactly the same as Dump. func (c *ConfigState) Fdump(w io.Writer, a ...interface{}) { fdump(c, w, a...) } /* Dump displays the passed parameters to standard out with newlines, customizable indentation, and additional debug information such as complete types and all pointer addresses used to indirect to the final value. It provides the following features over the built-in printing facilities provided by the fmt package: * Pointers are dereferenced and followed * Circular data structures are detected and handled properly * Custom Stringer/error interfaces are optionally invoked, including on unexported types * Custom types which only implement the Stringer/error interfaces via a pointer receiver are optionally invoked when passing non-pointer variables * Byte arrays and slices are dumped like the hexdump -C command which includes offsets, byte values in hex, and ASCII output The configuration options are controlled by modifying the public members of c. See ConfigState for options documentation. See Fdump if you would prefer dumping to an arbitrary io.Writer or Sdump to get the formatted result as a string. */ func (c *ConfigState) Dump(a ...interface{}) { fdump(c, os.Stdout, a...) } // Sdump returns a string with the passed arguments formatted exactly the same // as Dump. func (c *ConfigState) Sdump(a ...interface{}) string { var buf bytes.Buffer fdump(c, &buf, a...) return buf.String() } // convertArgs accepts a slice of arguments and returns a slice of the same // length with each argument converted to a spew Formatter interface using // the ConfigState associated with s. func (c *ConfigState) convertArgs(args []interface{}) (formatters []interface{}) { formatters = make([]interface{}, len(args)) for index, arg := range args { formatters[index] = newFormatter(c, arg) } return formatters } // NewDefaultConfig returns a ConfigState with the following default settings. // // Indent: " " // MaxDepth: 0 // DisableMethods: false // DisablePointerMethods: false // ContinueOnMethod: false // SortKeys: false func NewDefaultConfig() *ConfigState { return &ConfigState{Indent: " "} } ================================================ FILE: vendor/github.com/davecgh/go-spew/spew/doc.go ================================================ /* * Copyright (c) 2013-2016 Dave Collins * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /* Package spew implements a deep pretty printer for Go data structures to aid in debugging. A quick overview of the additional features spew provides over the built-in printing facilities for Go data types are as follows: * Pointers are dereferenced and followed * Circular data structures are detected and handled properly * Custom Stringer/error interfaces are optionally invoked, including on unexported types * Custom types which only implement the Stringer/error interfaces via a pointer receiver are optionally invoked when passing non-pointer variables * Byte arrays and slices are dumped like the hexdump -C command which includes offsets, byte values in hex, and ASCII output (only when using Dump style) There are two different approaches spew allows for dumping Go data structures: * Dump style which prints with newlines, customizable indentation, and additional debug information such as types and all pointer addresses used to indirect to the final value * A custom Formatter interface that integrates cleanly with the standard fmt package and replaces %v, %+v, %#v, and %#+v to provide inline printing similar to the default %v while providing the additional functionality outlined above and passing unsupported format verbs such as %x and %q along to fmt Quick Start This section demonstrates how to quickly get started with spew. See the sections below for further details on formatting and configuration options. To dump a variable with full newlines, indentation, type, and pointer information use Dump, Fdump, or Sdump: spew.Dump(myVar1, myVar2, ...) spew.Fdump(someWriter, myVar1, myVar2, ...) str := spew.Sdump(myVar1, myVar2, ...) Alternatively, if you would prefer to use format strings with a compacted inline printing style, use the convenience wrappers Printf, Fprintf, etc with %v (most compact), %+v (adds pointer addresses), %#v (adds types), or %#+v (adds types and pointer addresses): spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2) spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) spew.Fprintf(someWriter, "myVar1: %v -- myVar2: %+v", myVar1, myVar2) spew.Fprintf(someWriter, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) Configuration Options Configuration of spew is handled by fields in the ConfigState type. For convenience, all of the top-level functions use a global state available via the spew.Config global. It is also possible to create a ConfigState instance that provides methods equivalent to the top-level functions. This allows concurrent configuration options. See the ConfigState documentation for more details. The following configuration options are available: * Indent String to use for each indentation level for Dump functions. It is a single space by default. A popular alternative is "\t". * MaxDepth Maximum number of levels to descend into nested data structures. There is no limit by default. * DisableMethods Disables invocation of error and Stringer interface methods. Method invocation is enabled by default. * DisablePointerMethods Disables invocation of error and Stringer interface methods on types which only accept pointer receivers from non-pointer variables. Pointer method invocation is enabled by default. * DisablePointerAddresses DisablePointerAddresses specifies whether to disable the printing of pointer addresses. This is useful when diffing data structures in tests. * DisableCapacities DisableCapacities specifies whether to disable the printing of capacities for arrays, slices, maps and channels. This is useful when diffing data structures in tests. * ContinueOnMethod Enables recursion into types after invoking error and Stringer interface methods. Recursion after method invocation is disabled by default. * SortKeys Specifies map keys should be sorted before being printed. Use this to have a more deterministic, diffable output. Note that only native types (bool, int, uint, floats, uintptr and string) and types which implement error or Stringer interfaces are supported with other types sorted according to the reflect.Value.String() output which guarantees display stability. Natural map order is used by default. * SpewKeys Specifies that, as a last resort attempt, map keys should be spewed to strings and sorted by those strings. This is only considered if SortKeys is true. Dump Usage Simply call spew.Dump with a list of variables you want to dump: spew.Dump(myVar1, myVar2, ...) You may also call spew.Fdump if you would prefer to output to an arbitrary io.Writer. For example, to dump to standard error: spew.Fdump(os.Stderr, myVar1, myVar2, ...) A third option is to call spew.Sdump to get the formatted output as a string: str := spew.Sdump(myVar1, myVar2, ...) Sample Dump Output See the Dump example for details on the setup of the types and variables being shown here. (main.Foo) { unexportedField: (*main.Bar)(0xf84002e210)({ flag: (main.Flag) flagTwo, data: (uintptr) }), ExportedField: (map[interface {}]interface {}) (len=1) { (string) (len=3) "one": (bool) true } } Byte (and uint8) arrays and slices are displayed uniquely like the hexdump -C command as shown. ([]uint8) (len=32 cap=32) { 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |............... | 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'()*+,-./0| 00000020 31 32 |12| } Custom Formatter Spew provides a custom formatter that implements the fmt.Formatter interface so that it integrates cleanly with standard fmt package printing functions. The formatter is useful for inline printing of smaller data types similar to the standard %v format specifier. The custom formatter only responds to the %v (most compact), %+v (adds pointer addresses), %#v (adds types), or %#+v (adds types and pointer addresses) verb combinations. Any other verbs such as %x and %q will be sent to the the standard fmt package for formatting. In addition, the custom formatter ignores the width and precision arguments (however they will still work on the format specifiers not handled by the custom formatter). Custom Formatter Usage The simplest way to make use of the spew custom formatter is to call one of the convenience functions such as spew.Printf, spew.Println, or spew.Printf. The functions have syntax you are most likely already familiar with: spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2) spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) spew.Println(myVar, myVar2) spew.Fprintf(os.Stderr, "myVar1: %v -- myVar2: %+v", myVar1, myVar2) spew.Fprintf(os.Stderr, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) See the Index for the full list convenience functions. Sample Formatter Output Double pointer to a uint8: %v: <**>5 %+v: <**>(0xf8400420d0->0xf8400420c8)5 %#v: (**uint8)5 %#+v: (**uint8)(0xf8400420d0->0xf8400420c8)5 Pointer to circular struct with a uint8 field and a pointer to itself: %v: <*>{1 <*>} %+v: <*>(0xf84003e260){ui8:1 c:<*>(0xf84003e260)} %#v: (*main.circular){ui8:(uint8)1 c:(*main.circular)} %#+v: (*main.circular)(0xf84003e260){ui8:(uint8)1 c:(*main.circular)(0xf84003e260)} See the Printf example for details on the setup of variables being shown here. Errors Since it is possible for custom Stringer/error interfaces to panic, spew detects them and handles them internally by printing the panic information inline with the output. Since spew is intended to provide deep pretty printing capabilities on structures, it intentionally does not return any errors. */ package spew ================================================ FILE: vendor/github.com/davecgh/go-spew/spew/dump.go ================================================ /* * Copyright (c) 2013-2016 Dave Collins * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ package spew import ( "bytes" "encoding/hex" "fmt" "io" "os" "reflect" "regexp" "strconv" "strings" ) var ( // uint8Type is a reflect.Type representing a uint8. It is used to // convert cgo types to uint8 slices for hexdumping. uint8Type = reflect.TypeOf(uint8(0)) // cCharRE is a regular expression that matches a cgo char. // It is used to detect character arrays to hexdump them. cCharRE = regexp.MustCompile(`^.*\._Ctype_char$`) // cUnsignedCharRE is a regular expression that matches a cgo unsigned // char. It is used to detect unsigned character arrays to hexdump // them. cUnsignedCharRE = regexp.MustCompile(`^.*\._Ctype_unsignedchar$`) // cUint8tCharRE is a regular expression that matches a cgo uint8_t. // It is used to detect uint8_t arrays to hexdump them. cUint8tCharRE = regexp.MustCompile(`^.*\._Ctype_uint8_t$`) ) // dumpState contains information about the state of a dump operation. type dumpState struct { w io.Writer depth int pointers map[uintptr]int ignoreNextType bool ignoreNextIndent bool cs *ConfigState } // indent performs indentation according to the depth level and cs.Indent // option. func (d *dumpState) indent() { if d.ignoreNextIndent { d.ignoreNextIndent = false return } d.w.Write(bytes.Repeat([]byte(d.cs.Indent), d.depth)) } // unpackValue returns values inside of non-nil interfaces when possible. // This is useful for data types like structs, arrays, slices, and maps which // can contain varying types packed inside an interface. func (d *dumpState) unpackValue(v reflect.Value) reflect.Value { if v.Kind() == reflect.Interface && !v.IsNil() { v = v.Elem() } return v } // dumpPtr handles formatting of pointers by indirecting them as necessary. func (d *dumpState) dumpPtr(v reflect.Value) { // Remove pointers at or below the current depth from map used to detect // circular refs. for k, depth := range d.pointers { if depth >= d.depth { delete(d.pointers, k) } } // Keep list of all dereferenced pointers to show later. pointerChain := make([]uintptr, 0) // Figure out how many levels of indirection there are by dereferencing // pointers and unpacking interfaces down the chain while detecting circular // references. nilFound := false cycleFound := false indirects := 0 ve := v for ve.Kind() == reflect.Ptr { if ve.IsNil() { nilFound = true break } indirects++ addr := ve.Pointer() pointerChain = append(pointerChain, addr) if pd, ok := d.pointers[addr]; ok && pd < d.depth { cycleFound = true indirects-- break } d.pointers[addr] = d.depth ve = ve.Elem() if ve.Kind() == reflect.Interface { if ve.IsNil() { nilFound = true break } ve = ve.Elem() } } // Display type information. d.w.Write(openParenBytes) d.w.Write(bytes.Repeat(asteriskBytes, indirects)) d.w.Write([]byte(ve.Type().String())) d.w.Write(closeParenBytes) // Display pointer information. if !d.cs.DisablePointerAddresses && len(pointerChain) > 0 { d.w.Write(openParenBytes) for i, addr := range pointerChain { if i > 0 { d.w.Write(pointerChainBytes) } printHexPtr(d.w, addr) } d.w.Write(closeParenBytes) } // Display dereferenced value. d.w.Write(openParenBytes) switch { case nilFound: d.w.Write(nilAngleBytes) case cycleFound: d.w.Write(circularBytes) default: d.ignoreNextType = true d.dump(ve) } d.w.Write(closeParenBytes) } // dumpSlice handles formatting of arrays and slices. Byte (uint8 under // reflection) arrays and slices are dumped in hexdump -C fashion. func (d *dumpState) dumpSlice(v reflect.Value) { // Determine whether this type should be hex dumped or not. Also, // for types which should be hexdumped, try to use the underlying data // first, then fall back to trying to convert them to a uint8 slice. var buf []uint8 doConvert := false doHexDump := false numEntries := v.Len() if numEntries > 0 { vt := v.Index(0).Type() vts := vt.String() switch { // C types that need to be converted. case cCharRE.MatchString(vts): fallthrough case cUnsignedCharRE.MatchString(vts): fallthrough case cUint8tCharRE.MatchString(vts): doConvert = true // Try to use existing uint8 slices and fall back to converting // and copying if that fails. case vt.Kind() == reflect.Uint8: // We need an addressable interface to convert the type // to a byte slice. However, the reflect package won't // give us an interface on certain things like // unexported struct fields in order to enforce // visibility rules. We use unsafe, when available, to // bypass these restrictions since this package does not // mutate the values. vs := v if !vs.CanInterface() || !vs.CanAddr() { vs = unsafeReflectValue(vs) } if !UnsafeDisabled { vs = vs.Slice(0, numEntries) // Use the existing uint8 slice if it can be // type asserted. iface := vs.Interface() if slice, ok := iface.([]uint8); ok { buf = slice doHexDump = true break } } // The underlying data needs to be converted if it can't // be type asserted to a uint8 slice. doConvert = true } // Copy and convert the underlying type if needed. if doConvert && vt.ConvertibleTo(uint8Type) { // Convert and copy each element into a uint8 byte // slice. buf = make([]uint8, numEntries) for i := 0; i < numEntries; i++ { vv := v.Index(i) buf[i] = uint8(vv.Convert(uint8Type).Uint()) } doHexDump = true } } // Hexdump the entire slice as needed. if doHexDump { indent := strings.Repeat(d.cs.Indent, d.depth) str := indent + hex.Dump(buf) str = strings.Replace(str, "\n", "\n"+indent, -1) str = strings.TrimRight(str, d.cs.Indent) d.w.Write([]byte(str)) return } // Recursively call dump for each item. for i := 0; i < numEntries; i++ { d.dump(d.unpackValue(v.Index(i))) if i < (numEntries - 1) { d.w.Write(commaNewlineBytes) } else { d.w.Write(newlineBytes) } } } // dump is the main workhorse for dumping a value. It uses the passed reflect // value to figure out what kind of object we are dealing with and formats it // appropriately. It is a recursive function, however circular data structures // are detected and handled properly. func (d *dumpState) dump(v reflect.Value) { // Handle invalid reflect values immediately. kind := v.Kind() if kind == reflect.Invalid { d.w.Write(invalidAngleBytes) return } // Handle pointers specially. if kind == reflect.Ptr { d.indent() d.dumpPtr(v) return } // Print type information unless already handled elsewhere. if !d.ignoreNextType { d.indent() d.w.Write(openParenBytes) d.w.Write([]byte(v.Type().String())) d.w.Write(closeParenBytes) d.w.Write(spaceBytes) } d.ignoreNextType = false // Display length and capacity if the built-in len and cap functions // work with the value's kind and the len/cap itself is non-zero. valueLen, valueCap := 0, 0 switch v.Kind() { case reflect.Array, reflect.Slice, reflect.Chan: valueLen, valueCap = v.Len(), v.Cap() case reflect.Map, reflect.String: valueLen = v.Len() } if valueLen != 0 || !d.cs.DisableCapacities && valueCap != 0 { d.w.Write(openParenBytes) if valueLen != 0 { d.w.Write(lenEqualsBytes) printInt(d.w, int64(valueLen), 10) } if !d.cs.DisableCapacities && valueCap != 0 { if valueLen != 0 { d.w.Write(spaceBytes) } d.w.Write(capEqualsBytes) printInt(d.w, int64(valueCap), 10) } d.w.Write(closeParenBytes) d.w.Write(spaceBytes) } // Call Stringer/error interfaces if they exist and the handle methods flag // is enabled if !d.cs.DisableMethods { if (kind != reflect.Invalid) && (kind != reflect.Interface) { if handled := handleMethods(d.cs, d.w, v); handled { return } } } switch kind { case reflect.Invalid: // Do nothing. We should never get here since invalid has already // been handled above. case reflect.Bool: printBool(d.w, v.Bool()) case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: printInt(d.w, v.Int(), 10) case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint: printUint(d.w, v.Uint(), 10) case reflect.Float32: printFloat(d.w, v.Float(), 32) case reflect.Float64: printFloat(d.w, v.Float(), 64) case reflect.Complex64: printComplex(d.w, v.Complex(), 32) case reflect.Complex128: printComplex(d.w, v.Complex(), 64) case reflect.Slice: if v.IsNil() { d.w.Write(nilAngleBytes) break } fallthrough case reflect.Array: d.w.Write(openBraceNewlineBytes) d.depth++ if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) { d.indent() d.w.Write(maxNewlineBytes) } else { d.dumpSlice(v) } d.depth-- d.indent() d.w.Write(closeBraceBytes) case reflect.String: d.w.Write([]byte(strconv.Quote(v.String()))) case reflect.Interface: // The only time we should get here is for nil interfaces due to // unpackValue calls. if v.IsNil() { d.w.Write(nilAngleBytes) } case reflect.Ptr: // Do nothing. We should never get here since pointers have already // been handled above. case reflect.Map: // nil maps should be indicated as different than empty maps if v.IsNil() { d.w.Write(nilAngleBytes) break } d.w.Write(openBraceNewlineBytes) d.depth++ if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) { d.indent() d.w.Write(maxNewlineBytes) } else { numEntries := v.Len() keys := v.MapKeys() if d.cs.SortKeys { sortValues(keys, d.cs) } for i, key := range keys { d.dump(d.unpackValue(key)) d.w.Write(colonSpaceBytes) d.ignoreNextIndent = true d.dump(d.unpackValue(v.MapIndex(key))) if i < (numEntries - 1) { d.w.Write(commaNewlineBytes) } else { d.w.Write(newlineBytes) } } } d.depth-- d.indent() d.w.Write(closeBraceBytes) case reflect.Struct: d.w.Write(openBraceNewlineBytes) d.depth++ if (d.cs.MaxDepth != 0) && (d.depth > d.cs.MaxDepth) { d.indent() d.w.Write(maxNewlineBytes) } else { vt := v.Type() numFields := v.NumField() for i := 0; i < numFields; i++ { d.indent() vtf := vt.Field(i) d.w.Write([]byte(vtf.Name)) d.w.Write(colonSpaceBytes) d.ignoreNextIndent = true d.dump(d.unpackValue(v.Field(i))) if i < (numFields - 1) { d.w.Write(commaNewlineBytes) } else { d.w.Write(newlineBytes) } } } d.depth-- d.indent() d.w.Write(closeBraceBytes) case reflect.Uintptr: printHexPtr(d.w, uintptr(v.Uint())) case reflect.UnsafePointer, reflect.Chan, reflect.Func: printHexPtr(d.w, v.Pointer()) // There were not any other types at the time this code was written, but // fall back to letting the default fmt package handle it in case any new // types are added. default: if v.CanInterface() { fmt.Fprintf(d.w, "%v", v.Interface()) } else { fmt.Fprintf(d.w, "%v", v.String()) } } } // fdump is a helper function to consolidate the logic from the various public // methods which take varying writers and config states. func fdump(cs *ConfigState, w io.Writer, a ...interface{}) { for _, arg := range a { if arg == nil { w.Write(interfaceBytes) w.Write(spaceBytes) w.Write(nilAngleBytes) w.Write(newlineBytes) continue } d := dumpState{w: w, cs: cs} d.pointers = make(map[uintptr]int) d.dump(reflect.ValueOf(arg)) d.w.Write(newlineBytes) } } // Fdump formats and displays the passed arguments to io.Writer w. It formats // exactly the same as Dump. func Fdump(w io.Writer, a ...interface{}) { fdump(&Config, w, a...) } // Sdump returns a string with the passed arguments formatted exactly the same // as Dump. func Sdump(a ...interface{}) string { var buf bytes.Buffer fdump(&Config, &buf, a...) return buf.String() } /* Dump displays the passed parameters to standard out with newlines, customizable indentation, and additional debug information such as complete types and all pointer addresses used to indirect to the final value. It provides the following features over the built-in printing facilities provided by the fmt package: * Pointers are dereferenced and followed * Circular data structures are detected and handled properly * Custom Stringer/error interfaces are optionally invoked, including on unexported types * Custom types which only implement the Stringer/error interfaces via a pointer receiver are optionally invoked when passing non-pointer variables * Byte arrays and slices are dumped like the hexdump -C command which includes offsets, byte values in hex, and ASCII output The configuration options are controlled by an exported package global, spew.Config. See ConfigState for options documentation. See Fdump if you would prefer dumping to an arbitrary io.Writer or Sdump to get the formatted result as a string. */ func Dump(a ...interface{}) { fdump(&Config, os.Stdout, a...) } ================================================ FILE: vendor/github.com/davecgh/go-spew/spew/format.go ================================================ /* * Copyright (c) 2013-2016 Dave Collins * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ package spew import ( "bytes" "fmt" "reflect" "strconv" "strings" ) // supportedFlags is a list of all the character flags supported by fmt package. const supportedFlags = "0-+# " // formatState implements the fmt.Formatter interface and contains information // about the state of a formatting operation. The NewFormatter function can // be used to get a new Formatter which can be used directly as arguments // in standard fmt package printing calls. type formatState struct { value interface{} fs fmt.State depth int pointers map[uintptr]int ignoreNextType bool cs *ConfigState } // buildDefaultFormat recreates the original format string without precision // and width information to pass in to fmt.Sprintf in the case of an // unrecognized type. Unless new types are added to the language, this // function won't ever be called. func (f *formatState) buildDefaultFormat() (format string) { buf := bytes.NewBuffer(percentBytes) for _, flag := range supportedFlags { if f.fs.Flag(int(flag)) { buf.WriteRune(flag) } } buf.WriteRune('v') format = buf.String() return format } // constructOrigFormat recreates the original format string including precision // and width information to pass along to the standard fmt package. This allows // automatic deferral of all format strings this package doesn't support. func (f *formatState) constructOrigFormat(verb rune) (format string) { buf := bytes.NewBuffer(percentBytes) for _, flag := range supportedFlags { if f.fs.Flag(int(flag)) { buf.WriteRune(flag) } } if width, ok := f.fs.Width(); ok { buf.WriteString(strconv.Itoa(width)) } if precision, ok := f.fs.Precision(); ok { buf.Write(precisionBytes) buf.WriteString(strconv.Itoa(precision)) } buf.WriteRune(verb) format = buf.String() return format } // unpackValue returns values inside of non-nil interfaces when possible and // ensures that types for values which have been unpacked from an interface // are displayed when the show types flag is also set. // This is useful for data types like structs, arrays, slices, and maps which // can contain varying types packed inside an interface. func (f *formatState) unpackValue(v reflect.Value) reflect.Value { if v.Kind() == reflect.Interface { f.ignoreNextType = false if !v.IsNil() { v = v.Elem() } } return v } // formatPtr handles formatting of pointers by indirecting them as necessary. func (f *formatState) formatPtr(v reflect.Value) { // Display nil if top level pointer is nil. showTypes := f.fs.Flag('#') if v.IsNil() && (!showTypes || f.ignoreNextType) { f.fs.Write(nilAngleBytes) return } // Remove pointers at or below the current depth from map used to detect // circular refs. for k, depth := range f.pointers { if depth >= f.depth { delete(f.pointers, k) } } // Keep list of all dereferenced pointers to possibly show later. pointerChain := make([]uintptr, 0) // Figure out how many levels of indirection there are by derferencing // pointers and unpacking interfaces down the chain while detecting circular // references. nilFound := false cycleFound := false indirects := 0 ve := v for ve.Kind() == reflect.Ptr { if ve.IsNil() { nilFound = true break } indirects++ addr := ve.Pointer() pointerChain = append(pointerChain, addr) if pd, ok := f.pointers[addr]; ok && pd < f.depth { cycleFound = true indirects-- break } f.pointers[addr] = f.depth ve = ve.Elem() if ve.Kind() == reflect.Interface { if ve.IsNil() { nilFound = true break } ve = ve.Elem() } } // Display type or indirection level depending on flags. if showTypes && !f.ignoreNextType { f.fs.Write(openParenBytes) f.fs.Write(bytes.Repeat(asteriskBytes, indirects)) f.fs.Write([]byte(ve.Type().String())) f.fs.Write(closeParenBytes) } else { if nilFound || cycleFound { indirects += strings.Count(ve.Type().String(), "*") } f.fs.Write(openAngleBytes) f.fs.Write([]byte(strings.Repeat("*", indirects))) f.fs.Write(closeAngleBytes) } // Display pointer information depending on flags. if f.fs.Flag('+') && (len(pointerChain) > 0) { f.fs.Write(openParenBytes) for i, addr := range pointerChain { if i > 0 { f.fs.Write(pointerChainBytes) } printHexPtr(f.fs, addr) } f.fs.Write(closeParenBytes) } // Display dereferenced value. switch { case nilFound: f.fs.Write(nilAngleBytes) case cycleFound: f.fs.Write(circularShortBytes) default: f.ignoreNextType = true f.format(ve) } } // format is the main workhorse for providing the Formatter interface. It // uses the passed reflect value to figure out what kind of object we are // dealing with and formats it appropriately. It is a recursive function, // however circular data structures are detected and handled properly. func (f *formatState) format(v reflect.Value) { // Handle invalid reflect values immediately. kind := v.Kind() if kind == reflect.Invalid { f.fs.Write(invalidAngleBytes) return } // Handle pointers specially. if kind == reflect.Ptr { f.formatPtr(v) return } // Print type information unless already handled elsewhere. if !f.ignoreNextType && f.fs.Flag('#') { f.fs.Write(openParenBytes) f.fs.Write([]byte(v.Type().String())) f.fs.Write(closeParenBytes) } f.ignoreNextType = false // Call Stringer/error interfaces if they exist and the handle methods // flag is enabled. if !f.cs.DisableMethods { if (kind != reflect.Invalid) && (kind != reflect.Interface) { if handled := handleMethods(f.cs, f.fs, v); handled { return } } } switch kind { case reflect.Invalid: // Do nothing. We should never get here since invalid has already // been handled above. case reflect.Bool: printBool(f.fs, v.Bool()) case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: printInt(f.fs, v.Int(), 10) case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint: printUint(f.fs, v.Uint(), 10) case reflect.Float32: printFloat(f.fs, v.Float(), 32) case reflect.Float64: printFloat(f.fs, v.Float(), 64) case reflect.Complex64: printComplex(f.fs, v.Complex(), 32) case reflect.Complex128: printComplex(f.fs, v.Complex(), 64) case reflect.Slice: if v.IsNil() { f.fs.Write(nilAngleBytes) break } fallthrough case reflect.Array: f.fs.Write(openBracketBytes) f.depth++ if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) { f.fs.Write(maxShortBytes) } else { numEntries := v.Len() for i := 0; i < numEntries; i++ { if i > 0 { f.fs.Write(spaceBytes) } f.ignoreNextType = true f.format(f.unpackValue(v.Index(i))) } } f.depth-- f.fs.Write(closeBracketBytes) case reflect.String: f.fs.Write([]byte(v.String())) case reflect.Interface: // The only time we should get here is for nil interfaces due to // unpackValue calls. if v.IsNil() { f.fs.Write(nilAngleBytes) } case reflect.Ptr: // Do nothing. We should never get here since pointers have already // been handled above. case reflect.Map: // nil maps should be indicated as different than empty maps if v.IsNil() { f.fs.Write(nilAngleBytes) break } f.fs.Write(openMapBytes) f.depth++ if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) { f.fs.Write(maxShortBytes) } else { keys := v.MapKeys() if f.cs.SortKeys { sortValues(keys, f.cs) } for i, key := range keys { if i > 0 { f.fs.Write(spaceBytes) } f.ignoreNextType = true f.format(f.unpackValue(key)) f.fs.Write(colonBytes) f.ignoreNextType = true f.format(f.unpackValue(v.MapIndex(key))) } } f.depth-- f.fs.Write(closeMapBytes) case reflect.Struct: numFields := v.NumField() f.fs.Write(openBraceBytes) f.depth++ if (f.cs.MaxDepth != 0) && (f.depth > f.cs.MaxDepth) { f.fs.Write(maxShortBytes) } else { vt := v.Type() for i := 0; i < numFields; i++ { if i > 0 { f.fs.Write(spaceBytes) } vtf := vt.Field(i) if f.fs.Flag('+') || f.fs.Flag('#') { f.fs.Write([]byte(vtf.Name)) f.fs.Write(colonBytes) } f.format(f.unpackValue(v.Field(i))) } } f.depth-- f.fs.Write(closeBraceBytes) case reflect.Uintptr: printHexPtr(f.fs, uintptr(v.Uint())) case reflect.UnsafePointer, reflect.Chan, reflect.Func: printHexPtr(f.fs, v.Pointer()) // There were not any other types at the time this code was written, but // fall back to letting the default fmt package handle it if any get added. default: format := f.buildDefaultFormat() if v.CanInterface() { fmt.Fprintf(f.fs, format, v.Interface()) } else { fmt.Fprintf(f.fs, format, v.String()) } } } // Format satisfies the fmt.Formatter interface. See NewFormatter for usage // details. func (f *formatState) Format(fs fmt.State, verb rune) { f.fs = fs // Use standard formatting for verbs that are not v. if verb != 'v' { format := f.constructOrigFormat(verb) fmt.Fprintf(fs, format, f.value) return } if f.value == nil { if fs.Flag('#') { fs.Write(interfaceBytes) } fs.Write(nilAngleBytes) return } f.format(reflect.ValueOf(f.value)) } // newFormatter is a helper function to consolidate the logic from the various // public methods which take varying config states. func newFormatter(cs *ConfigState, v interface{}) fmt.Formatter { fs := &formatState{value: v, cs: cs} fs.pointers = make(map[uintptr]int) return fs } /* NewFormatter returns a custom formatter that satisfies the fmt.Formatter interface. As a result, it integrates cleanly with standard fmt package printing functions. The formatter is useful for inline printing of smaller data types similar to the standard %v format specifier. The custom formatter only responds to the %v (most compact), %+v (adds pointer addresses), %#v (adds types), or %#+v (adds types and pointer addresses) verb combinations. Any other verbs such as %x and %q will be sent to the the standard fmt package for formatting. In addition, the custom formatter ignores the width and precision arguments (however they will still work on the format specifiers not handled by the custom formatter). Typically this function shouldn't be called directly. It is much easier to make use of the custom formatter by calling one of the convenience functions such as Printf, Println, or Fprintf. */ func NewFormatter(v interface{}) fmt.Formatter { return newFormatter(&Config, v) } ================================================ FILE: vendor/github.com/davecgh/go-spew/spew/spew.go ================================================ /* * Copyright (c) 2013-2016 Dave Collins * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ package spew import ( "fmt" "io" ) // Errorf is a wrapper for fmt.Errorf that treats each argument as if it were // passed with a default Formatter interface returned by NewFormatter. It // returns the formatted string as a value that satisfies error. See // NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Errorf(format, spew.NewFormatter(a), spew.NewFormatter(b)) func Errorf(format string, a ...interface{}) (err error) { return fmt.Errorf(format, convertArgs(a)...) } // Fprint is a wrapper for fmt.Fprint that treats each argument as if it were // passed with a default Formatter interface returned by NewFormatter. It // returns the number of bytes written and any write error encountered. See // NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Fprint(w, spew.NewFormatter(a), spew.NewFormatter(b)) func Fprint(w io.Writer, a ...interface{}) (n int, err error) { return fmt.Fprint(w, convertArgs(a)...) } // Fprintf is a wrapper for fmt.Fprintf that treats each argument as if it were // passed with a default Formatter interface returned by NewFormatter. It // returns the number of bytes written and any write error encountered. See // NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Fprintf(w, format, spew.NewFormatter(a), spew.NewFormatter(b)) func Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) { return fmt.Fprintf(w, format, convertArgs(a)...) } // Fprintln is a wrapper for fmt.Fprintln that treats each argument as if it // passed with a default Formatter interface returned by NewFormatter. See // NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Fprintln(w, spew.NewFormatter(a), spew.NewFormatter(b)) func Fprintln(w io.Writer, a ...interface{}) (n int, err error) { return fmt.Fprintln(w, convertArgs(a)...) } // Print is a wrapper for fmt.Print that treats each argument as if it were // passed with a default Formatter interface returned by NewFormatter. It // returns the number of bytes written and any write error encountered. See // NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Print(spew.NewFormatter(a), spew.NewFormatter(b)) func Print(a ...interface{}) (n int, err error) { return fmt.Print(convertArgs(a)...) } // Printf is a wrapper for fmt.Printf that treats each argument as if it were // passed with a default Formatter interface returned by NewFormatter. It // returns the number of bytes written and any write error encountered. See // NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Printf(format, spew.NewFormatter(a), spew.NewFormatter(b)) func Printf(format string, a ...interface{}) (n int, err error) { return fmt.Printf(format, convertArgs(a)...) } // Println is a wrapper for fmt.Println that treats each argument as if it were // passed with a default Formatter interface returned by NewFormatter. It // returns the number of bytes written and any write error encountered. See // NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Println(spew.NewFormatter(a), spew.NewFormatter(b)) func Println(a ...interface{}) (n int, err error) { return fmt.Println(convertArgs(a)...) } // Sprint is a wrapper for fmt.Sprint that treats each argument as if it were // passed with a default Formatter interface returned by NewFormatter. It // returns the resulting string. See NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Sprint(spew.NewFormatter(a), spew.NewFormatter(b)) func Sprint(a ...interface{}) string { return fmt.Sprint(convertArgs(a)...) } // Sprintf is a wrapper for fmt.Sprintf that treats each argument as if it were // passed with a default Formatter interface returned by NewFormatter. It // returns the resulting string. See NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Sprintf(format, spew.NewFormatter(a), spew.NewFormatter(b)) func Sprintf(format string, a ...interface{}) string { return fmt.Sprintf(format, convertArgs(a)...) } // Sprintln is a wrapper for fmt.Sprintln that treats each argument as if it // were passed with a default Formatter interface returned by NewFormatter. It // returns the resulting string. See NewFormatter for formatting details. // // This function is shorthand for the following syntax: // // fmt.Sprintln(spew.NewFormatter(a), spew.NewFormatter(b)) func Sprintln(a ...interface{}) string { return fmt.Sprintln(convertArgs(a)...) } // convertArgs accepts a slice of arguments and returns a slice of the same // length with each argument converted to a default spew Formatter interface. func convertArgs(args []interface{}) (formatters []interface{}) { formatters = make([]interface{}, len(args)) for index, arg := range args { formatters[index] = NewFormatter(arg) } return formatters } ================================================ FILE: vendor/github.com/distribution/reference/.gitattributes ================================================ *.go text eol=lf ================================================ FILE: vendor/github.com/distribution/reference/.gitignore ================================================ # Cover profiles *.out ================================================ FILE: vendor/github.com/distribution/reference/.golangci.yml ================================================ linters: enable: - bodyclose - dupword # Checks for duplicate words in the source code - gofmt - goimports - ineffassign - misspell - revive - staticcheck - unconvert - unused - vet disable: - errcheck run: deadline: 2m ================================================ FILE: vendor/github.com/distribution/reference/CODE-OF-CONDUCT.md ================================================ # Code of Conduct We follow the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md). Please contact the [CNCF Code of Conduct Committee](mailto:conduct@cncf.io) in order to report violations of the Code of Conduct. ================================================ FILE: vendor/github.com/distribution/reference/CONTRIBUTING.md ================================================ # Contributing to the reference library ## Community help If you need help, please ask in the [#distribution](https://cloud-native.slack.com/archives/C01GVR8SY4R) channel on CNCF community slack. [Click here for an invite to the CNCF community slack](https://slack.cncf.io/) ## Reporting security issues The maintainers take security seriously. If you discover a security issue, please bring it to their attention right away! Please **DO NOT** file a public issue, instead send your report privately to [cncf-distribution-security@lists.cncf.io](mailto:cncf-distribution-security@lists.cncf.io). ## Reporting an issue properly By following these simple rules you will get better and faster feedback on your issue. - search the bugtracker for an already reported issue ### If you found an issue that describes your problem: - please read other user comments first, and confirm this is the same issue: a given error condition might be indicative of different problems - you may also find a workaround in the comments - please refrain from adding "same thing here" or "+1" comments - you don't need to comment on an issue to get notified of updates: just hit the "subscribe" button - comment if you have some new, technical and relevant information to add to the case - __DO NOT__ comment on closed issues or merged PRs. If you think you have a related problem, open up a new issue and reference the PR or issue. ### If you have not found an existing issue that describes your problem: 1. create a new issue, with a succinct title that describes your issue: - bad title: "It doesn't work with my docker" - good title: "Private registry push fail: 400 error with E_INVALID_DIGEST" 2. copy the output of (or similar for other container tools): - `docker version` - `docker info` - `docker exec registry --version` 3. copy the command line you used to launch your Registry 4. restart your docker daemon in debug mode (add `-D` to the daemon launch arguments) 5. reproduce your problem and get your docker daemon logs showing the error 6. if relevant, copy your registry logs that show the error 7. provide any relevant detail about your specific Registry configuration (e.g., storage backend used) 8. indicate if you are using an enterprise proxy, Nginx, or anything else between you and your Registry ## Contributing Code Contributions should be made via pull requests. Pull requests will be reviewed by one or more maintainers or reviewers and merged when acceptable. You should follow the basic GitHub workflow: 1. Use your own [fork](https://help.github.com/en/articles/about-forks) 2. Create your [change](https://github.com/containerd/project/blob/master/CONTRIBUTING.md#successful-changes) 3. Test your code 4. [Commit](https://github.com/containerd/project/blob/master/CONTRIBUTING.md#commit-messages) your work, always [sign your commits](https://github.com/containerd/project/blob/master/CONTRIBUTING.md#commit-messages) 5. Push your change to your fork and create a [Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) Refer to [containerd's contribution guide](https://github.com/containerd/project/blob/master/CONTRIBUTING.md#successful-changes) for tips on creating a successful contribution. ## Sign your work The sign-off is a simple line at the end of the explanation for the patch. Your signature certifies that you wrote the patch or otherwise have the right to pass it on as an open-source patch. The rules are pretty simple: if you can certify the below (from [developercertificate.org](http://developercertificate.org/)): ``` Developer Certificate of Origin Version 1.1 Copyright (C) 2004, 2006 The Linux Foundation and its contributors. 660 York Street, Suite 102, San Francisco, CA 94110 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. ``` Then you just add a line to every git commit message: Signed-off-by: Joe Smith Use your real name (sorry, no pseudonyms or anonymous contributions.) If you set your `user.name` and `user.email` git configs, you can sign your commit automatically with `git commit -s`. ================================================ FILE: vendor/github.com/distribution/reference/GOVERNANCE.md ================================================ # distribution/reference Project Governance Distribution [Code of Conduct](./CODE-OF-CONDUCT.md) can be found here. For specific guidance on practical contribution steps please see our [CONTRIBUTING.md](./CONTRIBUTING.md) guide. ## Maintainership There are different types of maintainers, with different responsibilities, but all maintainers have 3 things in common: 1) They share responsibility in the project's success. 2) They have made a long-term, recurring time investment to improve the project. 3) They spend that time doing whatever needs to be done, not necessarily what is the most interesting or fun. Maintainers are often under-appreciated, because their work is harder to appreciate. It's easy to appreciate a really cool and technically advanced feature. It's harder to appreciate the absence of bugs, the slow but steady improvement in stability, or the reliability of a release process. But those things distinguish a good project from a great one. ## Reviewers A reviewer is a core role within the project. They share in reviewing issues and pull requests and their LGTM counts towards the required LGTM count to merge a code change into the project. Reviewers are part of the organization but do not have write access. Becoming a reviewer is a core aspect in the journey to becoming a maintainer. ## Adding maintainers Maintainers are first and foremost contributors that have shown they are committed to the long term success of a project. Contributors wanting to become maintainers are expected to be deeply involved in contributing code, pull request review, and triage of issues in the project for more than three months. Just contributing does not make you a maintainer, it is about building trust with the current maintainers of the project and being a person that they can depend on and trust to make decisions in the best interest of the project. Periodically, the existing maintainers curate a list of contributors that have shown regular activity on the project over the prior months. From this list, maintainer candidates are selected and proposed in a pull request or a maintainers communication channel. After a candidate has been announced to the maintainers, the existing maintainers are given five business days to discuss the candidate, raise objections and cast their vote. Votes may take place on the communication channel or via pull request comment. Candidates must be approved by at least 66% of the current maintainers by adding their vote on the mailing list. The reviewer role has the same process but only requires 33% of current maintainers. Only maintainers of the repository that the candidate is proposed for are allowed to vote. If a candidate is approved, a maintainer will contact the candidate to invite the candidate to open a pull request that adds the contributor to the MAINTAINERS file. The voting process may take place inside a pull request if a maintainer has already discussed the candidacy with the candidate and a maintainer is willing to be a sponsor by opening the pull request. The candidate becomes a maintainer once the pull request is merged. ## Stepping down policy Life priorities, interests, and passions can change. If you're a maintainer but feel you must remove yourself from the list, inform other maintainers that you intend to step down, and if possible, help find someone to pick up your work. At the very least, ensure your work can be continued where you left off. After you've informed other maintainers, create a pull request to remove yourself from the MAINTAINERS file. ## Removal of inactive maintainers Similar to the procedure for adding new maintainers, existing maintainers can be removed from the list if they do not show significant activity on the project. Periodically, the maintainers review the list of maintainers and their activity over the last three months. If a maintainer has shown insufficient activity over this period, a neutral person will contact the maintainer to ask if they want to continue being a maintainer. If the maintainer decides to step down as a maintainer, they open a pull request to be removed from the MAINTAINERS file. If the maintainer wants to remain a maintainer, but is unable to perform the required duties they can be removed with a vote of at least 66% of the current maintainers. In this case, maintainers should first propose the change to maintainers via the maintainers communication channel, then open a pull request for voting. The voting period is five business days. The voting pull request should not come as a surpise to any maintainer and any discussion related to performance must not be discussed on the pull request. ## How are decisions made? Docker distribution is an open-source project with an open design philosophy. This means that the repository is the source of truth for EVERY aspect of the project, including its philosophy, design, road map, and APIs. *If it's part of the project, it's in the repo. If it's in the repo, it's part of the project.* As a result, all decisions can be expressed as changes to the repository. An implementation change is a change to the source code. An API change is a change to the API specification. A philosophy change is a change to the philosophy manifesto, and so on. All decisions affecting distribution, big and small, follow the same 3 steps: * Step 1: Open a pull request. Anyone can do this. * Step 2: Discuss the pull request. Anyone can do this. * Step 3: Merge or refuse the pull request. Who does this depends on the nature of the pull request and which areas of the project it affects. ## Helping contributors with the DCO The [DCO or `Sign your work`](./CONTRIBUTING.md#sign-your-work) requirement is not intended as a roadblock or speed bump. Some contributors are not as familiar with `git`, or have used a web based editor, and thus asking them to `git commit --amend -s` is not the best way forward. In this case, maintainers can update the commits based on clause (c) of the DCO. The most trivial way for a contributor to allow the maintainer to do this, is to add a DCO signature in a pull requests's comment, or a maintainer can simply note that the change is sufficiently trivial that it does not substantially change the existing contribution - i.e., a spelling change. When you add someone's DCO, please also add your own to keep a log. ## I'm a maintainer. Should I make pull requests too? Yes. Nobody should ever push to master directly. All changes should be made through a pull request. ## Conflict Resolution If you have a technical dispute that you feel has reached an impasse with a subset of the community, any contributor may open an issue, specifically calling for a resolution vote of the current core maintainers to resolve the dispute. The same voting quorums required (2/3) for adding and removing maintainers will apply to conflict resolution. ================================================ FILE: vendor/github.com/distribution/reference/LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor 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, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/github.com/distribution/reference/MAINTAINERS ================================================ # Distribution project maintainers & reviewers # # See GOVERNANCE.md for maintainer versus reviewer roles # # MAINTAINERS (cncf-distribution-maintainers@lists.cncf.io) # GitHub ID, Name, Email address "chrispat","Chris Patterson","chrispat@github.com" "clarkbw","Bryan Clark","clarkbw@github.com" "corhere","Cory Snider","csnider@mirantis.com" "deleteriousEffect","Hayley Swimelar","hswimelar@gitlab.com" "heww","He Weiwei","hweiwei@vmware.com" "joaodrp","João Pereira","jpereira@gitlab.com" "justincormack","Justin Cormack","justin.cormack@docker.com" "squizzi","Kyle Squizzato","ksquizzato@mirantis.com" "milosgajdos","Milos Gajdos","milosthegajdos@gmail.com" "sargun","Sargun Dhillon","sargun@sargun.me" "wy65701436","Wang Yan","wangyan@vmware.com" "stevelasker","Steve Lasker","steve.lasker@microsoft.com" # # REVIEWERS # GitHub ID, Name, Email address "dmcgowan","Derek McGowan","derek@mcgstyle.net" "stevvooe","Stephen Day","stevvooe@gmail.com" "thajeztah","Sebastiaan van Stijn","github@gone.nl" "DavidSpek", "David van der Spek", "vanderspek.david@gmail.com" "Jamstah", "James Hewitt", "james.hewitt@gmail.com" ================================================ FILE: vendor/github.com/distribution/reference/Makefile ================================================ # Project packages. PACKAGES=$(shell go list ./...) # Flags passed to `go test` BUILDFLAGS ?= TESTFLAGS ?= .PHONY: all build test coverage .DEFAULT: all all: build build: ## no binaries to build, so just check compilation suceeds go build ${BUILDFLAGS} ./... test: ## run tests go test ${TESTFLAGS} ./... coverage: ## generate coverprofiles from the unit tests rm -f coverage.txt go test ${TESTFLAGS} -cover -coverprofile=cover.out ./... .PHONY: help help: @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[a-zA-Z_\/%-]+:.*?##/ { printf " \033[36m%-27s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) ================================================ FILE: vendor/github.com/distribution/reference/README.md ================================================ # Distribution reference Go library to handle references to container images. [![Build Status](https://github.com/distribution/reference/actions/workflows/test.yml/badge.svg?branch=main&event=push)](https://github.com/distribution/reference/actions?query=workflow%3ACI) [![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/github.com/distribution/reference) [![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](LICENSE) [![codecov](https://codecov.io/gh/distribution/reference/branch/main/graph/badge.svg)](https://codecov.io/gh/distribution/reference) [![FOSSA Status](https://app.fossa.com/api/projects/custom%2B162%2Fgithub.com%2Fdistribution%2Freference.svg?type=shield)](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fdistribution%2Freference?ref=badge_shield) This repository contains a library for handling references to container images held in container registries. Please see [godoc](https://pkg.go.dev/github.com/distribution/reference) for details. ## Contribution Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute issues, fixes, and patches to this project. ## Communication For async communication and long running discussions please use issues and pull requests on the github repo. This will be the best place to discuss design and implementation. For sync communication we have a #distribution channel in the [CNCF Slack](https://slack.cncf.io/) that everyone is welcome to join and chat about development. ## Licenses The distribution codebase is released under the [Apache 2.0 license](LICENSE). ================================================ FILE: vendor/github.com/distribution/reference/SECURITY.md ================================================ # Security Policy ## Reporting a Vulnerability The maintainers take security seriously. If you discover a security issue, please bring it to their attention right away! Please DO NOT file a public issue, instead send your report privately to cncf-distribution-security@lists.cncf.io. ================================================ FILE: vendor/github.com/distribution/reference/helpers.go ================================================ package reference import "path" // IsNameOnly returns true if reference only contains a repo name. func IsNameOnly(ref Named) bool { if _, ok := ref.(NamedTagged); ok { return false } if _, ok := ref.(Canonical); ok { return false } return true } // FamiliarName returns the familiar name string // for the given named, familiarizing if needed. func FamiliarName(ref Named) string { if nn, ok := ref.(normalizedNamed); ok { return nn.Familiar().Name() } return ref.Name() } // FamiliarString returns the familiar string representation // for the given reference, familiarizing if needed. func FamiliarString(ref Reference) string { if nn, ok := ref.(normalizedNamed); ok { return nn.Familiar().String() } return ref.String() } // FamiliarMatch reports whether ref matches the specified pattern. // See [path.Match] for supported patterns. func FamiliarMatch(pattern string, ref Reference) (bool, error) { matched, err := path.Match(pattern, FamiliarString(ref)) if namedRef, isNamed := ref.(Named); isNamed && !matched { matched, _ = path.Match(pattern, FamiliarName(namedRef)) } return matched, err } ================================================ FILE: vendor/github.com/distribution/reference/normalize.go ================================================ package reference import ( "fmt" "strings" "github.com/opencontainers/go-digest" ) const ( // legacyDefaultDomain is the legacy domain for Docker Hub (which was // originally named "the Docker Index"). This domain is still used for // authentication and image search, which were part of the "v1" Docker // registry specification. // // This domain will continue to be supported, but there are plans to consolidate // legacy domains to new "canonical" domains. Once those domains are decided // on, we must update the normalization functions, but preserve compatibility // with existing installs, clients, and user configuration. legacyDefaultDomain = "index.docker.io" // defaultDomain is the default domain used for images on Docker Hub. // It is used to normalize "familiar" names to canonical names, for example, // to convert "ubuntu" to "docker.io/library/ubuntu:latest". // // Note that actual domain of Docker Hub's registry is registry-1.docker.io. // This domain will continue to be supported, but there are plans to consolidate // legacy domains to new "canonical" domains. Once those domains are decided // on, we must update the normalization functions, but preserve compatibility // with existing installs, clients, and user configuration. defaultDomain = "docker.io" // officialRepoPrefix is the namespace used for official images on Docker Hub. // It is used to normalize "familiar" names to canonical names, for example, // to convert "ubuntu" to "docker.io/library/ubuntu:latest". officialRepoPrefix = "library/" // defaultTag is the default tag if no tag is provided. defaultTag = "latest" ) // normalizedNamed represents a name which has been // normalized and has a familiar form. A familiar name // is what is used in Docker UI. An example normalized // name is "docker.io/library/ubuntu" and corresponding // familiar name of "ubuntu". type normalizedNamed interface { Named Familiar() Named } // ParseNormalizedNamed parses a string into a named reference // transforming a familiar name from Docker UI to a fully // qualified reference. If the value may be an identifier // use ParseAnyReference. func ParseNormalizedNamed(s string) (Named, error) { if ok := anchoredIdentifierRegexp.MatchString(s); ok { return nil, fmt.Errorf("invalid repository name (%s), cannot specify 64-byte hexadecimal strings", s) } domain, remainder := splitDockerDomain(s) var remote string if tagSep := strings.IndexRune(remainder, ':'); tagSep > -1 { remote = remainder[:tagSep] } else { remote = remainder } if strings.ToLower(remote) != remote { return nil, fmt.Errorf("invalid reference format: repository name (%s) must be lowercase", remote) } ref, err := Parse(domain + "/" + remainder) if err != nil { return nil, err } named, isNamed := ref.(Named) if !isNamed { return nil, fmt.Errorf("reference %s has no name", ref.String()) } return named, nil } // namedTaggedDigested is a reference that has both a tag and a digest. type namedTaggedDigested interface { NamedTagged Digested } // ParseDockerRef normalizes the image reference following the docker convention, // which allows for references to contain both a tag and a digest. It returns a // reference that is either tagged or digested. For references containing both // a tag and a digest, it returns a digested reference. For example, the following // reference: // // docker.io/library/busybox:latest@sha256:7cc4b5aefd1d0cadf8d97d4350462ba51c694ebca145b08d7d41b41acc8db5aa // // Is returned as a digested reference (with the ":latest" tag removed): // // docker.io/library/busybox@sha256:7cc4b5aefd1d0cadf8d97d4350462ba51c694ebca145b08d7d41b41acc8db5aa // // References that are already "tagged" or "digested" are returned unmodified: // // // Already a digested reference // docker.io/library/busybox@sha256:7cc4b5aefd1d0cadf8d97d4350462ba51c694ebca145b08d7d41b41acc8db5aa // // // Already a named reference // docker.io/library/busybox:latest func ParseDockerRef(ref string) (Named, error) { named, err := ParseNormalizedNamed(ref) if err != nil { return nil, err } if canonical, ok := named.(namedTaggedDigested); ok { // The reference is both tagged and digested; only return digested. newNamed, err := WithName(canonical.Name()) if err != nil { return nil, err } return WithDigest(newNamed, canonical.Digest()) } return TagNameOnly(named), nil } // splitDockerDomain splits a repository name to domain and remote-name. // If no valid domain is found, the default domain is used. Repository name // needs to be already validated before. func splitDockerDomain(name string) (domain, remoteName string) { maybeDomain, maybeRemoteName, ok := strings.Cut(name, "/") if !ok { // Fast-path for single element ("familiar" names), such as "ubuntu" // or "ubuntu:latest". Familiar names must be handled separately, to // prevent them from being handled as "hostname:port". // // Canonicalize them as "docker.io/library/name[:tag]" // FIXME(thaJeztah): account for bare "localhost" or "example.com" names, which SHOULD be considered a domain. return defaultDomain, officialRepoPrefix + name } switch { case maybeDomain == localhost: // localhost is a reserved namespace and always considered a domain. domain, remoteName = maybeDomain, maybeRemoteName case maybeDomain == legacyDefaultDomain: // canonicalize the Docker Hub and legacy "Docker Index" domains. domain, remoteName = defaultDomain, maybeRemoteName case strings.ContainsAny(maybeDomain, ".:"): // Likely a domain or IP-address: // // - contains a "." (e.g., "example.com" or "127.0.0.1") // - contains a ":" (e.g., "example:5000", "::1", or "[::1]:5000") domain, remoteName = maybeDomain, maybeRemoteName case strings.ToLower(maybeDomain) != maybeDomain: // Uppercase namespaces are not allowed, so if the first element // is not lowercase, we assume it to be a domain-name. domain, remoteName = maybeDomain, maybeRemoteName default: // None of the above: it's not a domain, so use the default, and // use the name input the remote-name. domain, remoteName = defaultDomain, name } if domain == defaultDomain && !strings.ContainsRune(remoteName, '/') { // Canonicalize "familiar" names, but only on Docker Hub, not // on other domains: // // "docker.io/ubuntu[:tag]" => "docker.io/library/ubuntu[:tag]" remoteName = officialRepoPrefix + remoteName } return domain, remoteName } // familiarizeName returns a shortened version of the name familiar // to the Docker UI. Familiar names have the default domain // "docker.io" and "library/" repository prefix removed. // For example, "docker.io/library/redis" will have the familiar // name "redis" and "docker.io/dmcgowan/myapp" will be "dmcgowan/myapp". // Returns a familiarized named only reference. func familiarizeName(named namedRepository) repository { repo := repository{ domain: named.Domain(), path: named.Path(), } if repo.domain == defaultDomain { repo.domain = "" // Handle official repositories which have the pattern "library/" if strings.HasPrefix(repo.path, officialRepoPrefix) { // TODO(thaJeztah): this check may be too strict, as it assumes the // "library/" namespace does not have nested namespaces. While this // is true (currently), technically it would be possible for Docker // Hub to use those (e.g. "library/distros/ubuntu:latest"). // See https://github.com/distribution/distribution/pull/3769#issuecomment-1302031785. if remainder := strings.TrimPrefix(repo.path, officialRepoPrefix); !strings.ContainsRune(remainder, '/') { repo.path = remainder } } } return repo } func (r reference) Familiar() Named { return reference{ namedRepository: familiarizeName(r.namedRepository), tag: r.tag, digest: r.digest, } } func (r repository) Familiar() Named { return familiarizeName(r) } func (t taggedReference) Familiar() Named { return taggedReference{ namedRepository: familiarizeName(t.namedRepository), tag: t.tag, } } func (c canonicalReference) Familiar() Named { return canonicalReference{ namedRepository: familiarizeName(c.namedRepository), digest: c.digest, } } // TagNameOnly adds the default tag "latest" to a reference if it only has // a repo name. func TagNameOnly(ref Named) Named { if IsNameOnly(ref) { namedTagged, err := WithTag(ref, defaultTag) if err != nil { // Default tag must be valid, to create a NamedTagged // type with non-validated input the WithTag function // should be used instead panic(err) } return namedTagged } return ref } // ParseAnyReference parses a reference string as a possible identifier, // full digest, or familiar name. func ParseAnyReference(ref string) (Reference, error) { if ok := anchoredIdentifierRegexp.MatchString(ref); ok { return digestReference("sha256:" + ref), nil } if dgst, err := digest.Parse(ref); err == nil { return digestReference(dgst), nil } return ParseNormalizedNamed(ref) } ================================================ FILE: vendor/github.com/distribution/reference/reference.go ================================================ // Package reference provides a general type to represent any way of referencing images within the registry. // Its main purpose is to abstract tags and digests (content-addressable hash). // // Grammar // // reference := name [ ":" tag ] [ "@" digest ] // name := [domain '/'] remote-name // domain := host [':' port-number] // host := domain-name | IPv4address | \[ IPv6address \] ; rfc3986 appendix-A // domain-name := domain-component ['.' domain-component]* // domain-component := /([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])/ // port-number := /[0-9]+/ // path-component := alpha-numeric [separator alpha-numeric]* // path (or "remote-name") := path-component ['/' path-component]* // alpha-numeric := /[a-z0-9]+/ // separator := /[_.]|__|[-]*/ // // tag := /[\w][\w.-]{0,127}/ // // digest := digest-algorithm ":" digest-hex // digest-algorithm := digest-algorithm-component [ digest-algorithm-separator digest-algorithm-component ]* // digest-algorithm-separator := /[+.-_]/ // digest-algorithm-component := /[A-Za-z][A-Za-z0-9]*/ // digest-hex := /[0-9a-fA-F]{32,}/ ; At least 128 bit digest value // // identifier := /[a-f0-9]{64}/ package reference import ( "errors" "fmt" "strings" "github.com/opencontainers/go-digest" ) const ( // RepositoryNameTotalLengthMax is the maximum total number of characters in a repository name. RepositoryNameTotalLengthMax = 255 // NameTotalLengthMax is the maximum total number of characters in a repository name. // // Deprecated: use [RepositoryNameTotalLengthMax] instead. NameTotalLengthMax = RepositoryNameTotalLengthMax ) var ( // ErrReferenceInvalidFormat represents an error while trying to parse a string as a reference. ErrReferenceInvalidFormat = errors.New("invalid reference format") // ErrTagInvalidFormat represents an error while trying to parse a string as a tag. ErrTagInvalidFormat = errors.New("invalid tag format") // ErrDigestInvalidFormat represents an error while trying to parse a string as a tag. ErrDigestInvalidFormat = errors.New("invalid digest format") // ErrNameContainsUppercase is returned for invalid repository names that contain uppercase characters. ErrNameContainsUppercase = errors.New("repository name must be lowercase") // ErrNameEmpty is returned for empty, invalid repository names. ErrNameEmpty = errors.New("repository name must have at least one component") // ErrNameTooLong is returned when a repository name is longer than RepositoryNameTotalLengthMax. ErrNameTooLong = fmt.Errorf("repository name must not be more than %v characters", RepositoryNameTotalLengthMax) // ErrNameNotCanonical is returned when a name is not canonical. ErrNameNotCanonical = errors.New("repository name must be canonical") ) // Reference is an opaque object reference identifier that may include // modifiers such as a hostname, name, tag, and digest. type Reference interface { // String returns the full reference String() string } // Field provides a wrapper type for resolving correct reference types when // working with encoding. type Field struct { reference Reference } // AsField wraps a reference in a Field for encoding. func AsField(reference Reference) Field { return Field{reference} } // Reference unwraps the reference type from the field to // return the Reference object. This object should be // of the appropriate type to further check for different // reference types. func (f Field) Reference() Reference { return f.reference } // MarshalText serializes the field to byte text which // is the string of the reference. func (f Field) MarshalText() (p []byte, err error) { return []byte(f.reference.String()), nil } // UnmarshalText parses text bytes by invoking the // reference parser to ensure the appropriately // typed reference object is wrapped by field. func (f *Field) UnmarshalText(p []byte) error { r, err := Parse(string(p)) if err != nil { return err } f.reference = r return nil } // Named is an object with a full name type Named interface { Reference Name() string } // Tagged is an object which has a tag type Tagged interface { Reference Tag() string } // NamedTagged is an object including a name and tag. type NamedTagged interface { Named Tag() string } // Digested is an object which has a digest // in which it can be referenced by type Digested interface { Reference Digest() digest.Digest } // Canonical reference is an object with a fully unique // name including a name with domain and digest type Canonical interface { Named Digest() digest.Digest } // namedRepository is a reference to a repository with a name. // A namedRepository has both domain and path components. type namedRepository interface { Named Domain() string Path() string } // Domain returns the domain part of the [Named] reference. func Domain(named Named) string { if r, ok := named.(namedRepository); ok { return r.Domain() } domain, _ := splitDomain(named.Name()) return domain } // Path returns the name without the domain part of the [Named] reference. func Path(named Named) (name string) { if r, ok := named.(namedRepository); ok { return r.Path() } _, path := splitDomain(named.Name()) return path } // splitDomain splits a named reference into a hostname and path string. // If no valid hostname is found, the hostname is empty and the full value // is returned as name func splitDomain(name string) (string, string) { match := anchoredNameRegexp.FindStringSubmatch(name) if len(match) != 3 { return "", name } return match[1], match[2] } // Parse parses s and returns a syntactically valid Reference. // If an error was encountered it is returned, along with a nil Reference. func Parse(s string) (Reference, error) { matches := ReferenceRegexp.FindStringSubmatch(s) if matches == nil { if s == "" { return nil, ErrNameEmpty } if ReferenceRegexp.FindStringSubmatch(strings.ToLower(s)) != nil { return nil, ErrNameContainsUppercase } return nil, ErrReferenceInvalidFormat } var repo repository nameMatch := anchoredNameRegexp.FindStringSubmatch(matches[1]) if len(nameMatch) == 3 { repo.domain = nameMatch[1] repo.path = nameMatch[2] } else { repo.domain = "" repo.path = matches[1] } if len(repo.path) > RepositoryNameTotalLengthMax { return nil, ErrNameTooLong } ref := reference{ namedRepository: repo, tag: matches[2], } if matches[3] != "" { var err error ref.digest, err = digest.Parse(matches[3]) if err != nil { return nil, err } } r := getBestReferenceType(ref) if r == nil { return nil, ErrNameEmpty } return r, nil } // ParseNamed parses s and returns a syntactically valid reference implementing // the Named interface. The reference must have a name and be in the canonical // form, otherwise an error is returned. // If an error was encountered it is returned, along with a nil Reference. func ParseNamed(s string) (Named, error) { named, err := ParseNormalizedNamed(s) if err != nil { return nil, err } if named.String() != s { return nil, ErrNameNotCanonical } return named, nil } // WithName returns a named object representing the given string. If the input // is invalid ErrReferenceInvalidFormat will be returned. func WithName(name string) (Named, error) { match := anchoredNameRegexp.FindStringSubmatch(name) if match == nil || len(match) != 3 { return nil, ErrReferenceInvalidFormat } if len(match[2]) > RepositoryNameTotalLengthMax { return nil, ErrNameTooLong } return repository{ domain: match[1], path: match[2], }, nil } // WithTag combines the name from "name" and the tag from "tag" to form a // reference incorporating both the name and the tag. func WithTag(name Named, tag string) (NamedTagged, error) { if !anchoredTagRegexp.MatchString(tag) { return nil, ErrTagInvalidFormat } var repo repository if r, ok := name.(namedRepository); ok { repo.domain = r.Domain() repo.path = r.Path() } else { repo.path = name.Name() } if canonical, ok := name.(Canonical); ok { return reference{ namedRepository: repo, tag: tag, digest: canonical.Digest(), }, nil } return taggedReference{ namedRepository: repo, tag: tag, }, nil } // WithDigest combines the name from "name" and the digest from "digest" to form // a reference incorporating both the name and the digest. func WithDigest(name Named, digest digest.Digest) (Canonical, error) { if !anchoredDigestRegexp.MatchString(digest.String()) { return nil, ErrDigestInvalidFormat } var repo repository if r, ok := name.(namedRepository); ok { repo.domain = r.Domain() repo.path = r.Path() } else { repo.path = name.Name() } if tagged, ok := name.(Tagged); ok { return reference{ namedRepository: repo, tag: tagged.Tag(), digest: digest, }, nil } return canonicalReference{ namedRepository: repo, digest: digest, }, nil } // TrimNamed removes any tag or digest from the named reference. func TrimNamed(ref Named) Named { repo := repository{} if r, ok := ref.(namedRepository); ok { repo.domain, repo.path = r.Domain(), r.Path() } else { repo.domain, repo.path = splitDomain(ref.Name()) } return repo } func getBestReferenceType(ref reference) Reference { if ref.Name() == "" { // Allow digest only references if ref.digest != "" { return digestReference(ref.digest) } return nil } if ref.tag == "" { if ref.digest != "" { return canonicalReference{ namedRepository: ref.namedRepository, digest: ref.digest, } } return ref.namedRepository } if ref.digest == "" { return taggedReference{ namedRepository: ref.namedRepository, tag: ref.tag, } } return ref } type reference struct { namedRepository tag string digest digest.Digest } func (r reference) String() string { return r.Name() + ":" + r.tag + "@" + r.digest.String() } func (r reference) Tag() string { return r.tag } func (r reference) Digest() digest.Digest { return r.digest } type repository struct { domain string path string } func (r repository) String() string { return r.Name() } func (r repository) Name() string { if r.domain == "" { return r.path } return r.domain + "/" + r.path } func (r repository) Domain() string { return r.domain } func (r repository) Path() string { return r.path } type digestReference digest.Digest func (d digestReference) String() string { return digest.Digest(d).String() } func (d digestReference) Digest() digest.Digest { return digest.Digest(d) } type taggedReference struct { namedRepository tag string } func (t taggedReference) String() string { return t.Name() + ":" + t.tag } func (t taggedReference) Tag() string { return t.tag } type canonicalReference struct { namedRepository digest digest.Digest } func (c canonicalReference) String() string { return c.Name() + "@" + c.digest.String() } func (c canonicalReference) Digest() digest.Digest { return c.digest } ================================================ FILE: vendor/github.com/distribution/reference/regexp.go ================================================ package reference import ( "regexp" "strings" ) // DigestRegexp matches well-formed digests, including algorithm (e.g. "sha256:"). var DigestRegexp = regexp.MustCompile(digestPat) // DomainRegexp matches hostname or IP-addresses, optionally including a port // number. It defines the structure of potential domain components that may be // part of image names. This is purposely a subset of what is allowed by DNS to // ensure backwards compatibility with Docker image names. It may be a subset of // DNS domain name, an IPv4 address in decimal format, or an IPv6 address between // square brackets (excluding zone identifiers as defined by [RFC 6874] or special // addresses such as IPv4-Mapped). // // [RFC 6874]: https://www.rfc-editor.org/rfc/rfc6874. var DomainRegexp = regexp.MustCompile(domainAndPort) // IdentifierRegexp is the format for string identifier used as a // content addressable identifier using sha256. These identifiers // are like digests without the algorithm, since sha256 is used. var IdentifierRegexp = regexp.MustCompile(identifier) // NameRegexp is the format for the name component of references, including // an optional domain and port, but without tag or digest suffix. var NameRegexp = regexp.MustCompile(namePat) // ReferenceRegexp is the full supported format of a reference. The regexp // is anchored and has capturing groups for name, tag, and digest // components. var ReferenceRegexp = regexp.MustCompile(referencePat) // TagRegexp matches valid tag names. From [docker/docker:graph/tags.go]. // // [docker/docker:graph/tags.go]: https://github.com/moby/moby/blob/v1.6.0/graph/tags.go#L26-L28 var TagRegexp = regexp.MustCompile(tag) const ( // alphanumeric defines the alphanumeric atom, typically a // component of names. This only allows lower case characters and digits. alphanumeric = `[a-z0-9]+` // separator defines the separators allowed to be embedded in name // components. This allows one period, one or two underscore and multiple // dashes. Repeated dashes and underscores are intentionally treated // differently. In order to support valid hostnames as name components, // supporting repeated dash was added. Additionally double underscore is // now allowed as a separator to loosen the restriction for previously // supported names. separator = `(?:[._]|__|[-]+)` // localhost is treated as a special value for domain-name. Any other // domain-name without a "." or a ":port" are considered a path component. localhost = `localhost` // domainNameComponent restricts the registry domain component of a // repository name to start with a component as defined by DomainRegexp. domainNameComponent = `(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])` // optionalPort matches an optional port-number including the port separator // (e.g. ":80"). optionalPort = `(?::[0-9]+)?` // tag matches valid tag names. From docker/docker:graph/tags.go. tag = `[\w][\w.-]{0,127}` // digestPat matches well-formed digests, including algorithm (e.g. "sha256:"). // // TODO(thaJeztah): this should follow the same rules as https://pkg.go.dev/github.com/opencontainers/go-digest@v1.0.0#DigestRegexp // so that go-digest defines the canonical format. Note that the go-digest is // more relaxed: // - it allows multiple algorithms (e.g. "sha256+b64:") to allow // future expansion of supported algorithms. // - it allows the "" value to use urlsafe base64 encoding as defined // in [rfc4648, section 5]. // // [rfc4648, section 5]: https://www.rfc-editor.org/rfc/rfc4648#section-5. digestPat = `[A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][[:xdigit:]]{32,}` // identifier is the format for a content addressable identifier using sha256. // These identifiers are like digests without the algorithm, since sha256 is used. identifier = `([a-f0-9]{64})` // ipv6address are enclosed between square brackets and may be represented // in many ways, see rfc5952. Only IPv6 in compressed or uncompressed format // are allowed, IPv6 zone identifiers (rfc6874) or Special addresses such as // IPv4-Mapped are deliberately excluded. ipv6address = `\[(?:[a-fA-F0-9:]+)\]` ) var ( // domainName defines the structure of potential domain components // that may be part of image names. This is purposely a subset of what is // allowed by DNS to ensure backwards compatibility with Docker image // names. This includes IPv4 addresses on decimal format. domainName = domainNameComponent + anyTimes(`\.`+domainNameComponent) // host defines the structure of potential domains based on the URI // Host subcomponent on rfc3986. It may be a subset of DNS domain name, // or an IPv4 address in decimal format, or an IPv6 address between square // brackets (excluding zone identifiers as defined by rfc6874 or special // addresses such as IPv4-Mapped). host = `(?:` + domainName + `|` + ipv6address + `)` // allowed by the URI Host subcomponent on rfc3986 to ensure backwards // compatibility with Docker image names. domainAndPort = host + optionalPort // anchoredTagRegexp matches valid tag names, anchored at the start and // end of the matched string. anchoredTagRegexp = regexp.MustCompile(anchored(tag)) // anchoredDigestRegexp matches valid digests, anchored at the start and // end of the matched string. anchoredDigestRegexp = regexp.MustCompile(anchored(digestPat)) // pathComponent restricts path-components to start with an alphanumeric // character, with following parts able to be separated by a separator // (one period, one or two underscore and multiple dashes). pathComponent = alphanumeric + anyTimes(separator+alphanumeric) // remoteName matches the remote-name of a repository. It consists of one // or more forward slash (/) delimited path-components: // // pathComponent[[/pathComponent] ...] // e.g., "library/ubuntu" remoteName = pathComponent + anyTimes(`/`+pathComponent) namePat = optional(domainAndPort+`/`) + remoteName // anchoredNameRegexp is used to parse a name value, capturing the // domain and trailing components. anchoredNameRegexp = regexp.MustCompile(anchored(optional(capture(domainAndPort), `/`), capture(remoteName))) referencePat = anchored(capture(namePat), optional(`:`, capture(tag)), optional(`@`, capture(digestPat))) // anchoredIdentifierRegexp is used to check or match an // identifier value, anchored at start and end of string. anchoredIdentifierRegexp = regexp.MustCompile(anchored(identifier)) ) // optional wraps the expression in a non-capturing group and makes the // production optional. func optional(res ...string) string { return `(?:` + strings.Join(res, "") + `)?` } // anyTimes wraps the expression in a non-capturing group that can occur // any number of times. func anyTimes(res ...string) string { return `(?:` + strings.Join(res, "") + `)*` } // capture wraps the expression in a capturing group. func capture(res ...string) string { return `(` + strings.Join(res, "") + `)` } // anchored anchors the regular expression by adding start and end delimiters. func anchored(res ...string) string { return `^` + strings.Join(res, "") + `$` } ================================================ FILE: vendor/github.com/distribution/reference/sort.go ================================================ /* Copyright The containerd Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package reference import ( "sort" ) // Sort sorts string references preferring higher information references. // // The precedence is as follows: // // 1. [Named] + [Tagged] + [Digested] (e.g., "docker.io/library/busybox:latest@sha256:") // 2. [Named] + [Tagged] (e.g., "docker.io/library/busybox:latest") // 3. [Named] + [Digested] (e.g., "docker.io/library/busybo@sha256:") // 4. [Named] (e.g., "docker.io/library/busybox") // 5. [Digested] (e.g., "docker.io@sha256:") // 6. Parse error func Sort(references []string) []string { var prefs []Reference var bad []string for _, ref := range references { pref, err := ParseAnyReference(ref) if err != nil { bad = append(bad, ref) } else { prefs = append(prefs, pref) } } sort.Slice(prefs, func(a, b int) bool { ar := refRank(prefs[a]) br := refRank(prefs[b]) if ar == br { return prefs[a].String() < prefs[b].String() } return ar < br }) sort.Strings(bad) var refs []string for _, pref := range prefs { refs = append(refs, pref.String()) } return append(refs, bad...) } func refRank(ref Reference) uint8 { if _, ok := ref.(Named); ok { if _, ok = ref.(Tagged); ok { if _, ok = ref.(Digested); ok { return 1 } return 2 } if _, ok = ref.(Digested); ok { return 3 } return 4 } return 5 } ================================================ FILE: vendor/github.com/docker/cli/AUTHORS ================================================ # File @generated by scripts/docs/generate-authors.sh. DO NOT EDIT. # This file lists all contributors to the repository. # See scripts/docs/generate-authors.sh to make modifications. A. Lester Buck III Aanand Prasad Aaron L. Xu Aaron Lehmann Aaron.L.Xu Abdur Rehman Abhinandan Prativadi Abin Shahab Abreto FU Ace Tang Addam Hardy Adolfo Ochagavía Adrian Plata Adrien Duermael Adrien Folie Adyanth Hosavalike Ahmet Alp Balkan Aidan Feldman Aidan Hobson Sayers AJ Bowen Akhil Mohan Akihiro Suda Akim Demaille Alan Thompson Alano Terblanche Albert Callarisa Alberto Roura Albin Kerouanton Aleksa Sarai Aleksander Piotrowski Alessandro Boch Alex Couture-Beil Alex Mavrogiannis Alex Mayer Alexander Boyd Alexander Chneerov Alexander Larsson Alexander Morozov Alexander Ryabov Alexandre González Alexey Igrychev Alexis Couvreur Alfred Landrum Ali Rostami Alicia Lauerman Allen Sun Alvin Deng Amen Belayneh Amey Shrivastava <72866602+AmeyShrivastava@users.noreply.github.com> Amir Goldstein Amit Krishnan Amit Shukla Amy Lindburg Anca Iordache Anda Xu Andrea Luzzardi Andreas Köhler Andres G. Aragoneses Andres Leon Rangel Andrew France Andrew Hsu Andrew Macpherson Andrew McDonnell Andrew Po Andrew-Zipperer Andrey Petrov Andrii Berehuliak André Martins Andy Goldstein Andy Rothfusz Anil Madhavapeddy Ankush Agarwal Anne Henmi Anton Polonskiy Antonio Murdaca Antonis Kalipetis Anusha Ragunathan Ao Li Arash Deshmeh Arko Dasgupta Arnaud Porterie Arnaud Rebillout Arthur Peka Ashly Mathew Ashwini Oruganti Aslam Ahemad Azat Khuyiyakhmetov Bardia Keyoumarsi Barnaby Gray Bastiaan Bakker BastianHofmann Ben Bodenmiller Ben Bonnefoy Ben Creasy Ben Firshman Benjamin Boudreau Benjamin Böhmke Benjamin Nater Benoit Sigoure Bhumika Bayani Bill Wang Bin Liu Bingshen Wang Bishal Das Bjorn Neergaard Boaz Shuster Boban Acimovic Bogdan Anton Boris Pruessmann Brad Baker Bradley Cicenas Brandon Mitchell Brandon Philips Brent Salisbury Bret Fisher Brian (bex) Exelbierd Brian Goff Brian Tracy Brian Wieder Bruno Sousa Bryan Bess Bryan Boreham Bryan Murphy bryfry Calvin Liu Cameron Spear Cao Weiwei Carlo Mion Carlos Alexandro Becker Carlos de Paula Casey Korver Ce Gao Cedric Davies Cezar Sa Espinola Chad Faragher Chao Wang Charles Chan Charles Law Charles Smith Charlie Drage Charlotte Mach ChaYoung You Chee Hau Lim Chen Chuanliang Chen Hanxiao Chen Mingjie Chen Qiu Chris Chinchilla Chris Couzens Chris Gavin Chris Gibson Chris McKinnel Chris Snow Chris Vermilion Chris Weyl Christian Persson Christian Stefanescu Christophe Robin Christophe Vidal Christopher Biscardi Christopher Crone Christopher Jones Christopher Petito <47751006+krissetto@users.noreply.github.com> Christopher Petito Christopher Svensson Christy Norman Chun Chen Clinton Kitson Coenraad Loubser Colin Hebert Collin Guarino Colm Hally Comical Derskeal <27731088+derskeal@users.noreply.github.com> Conner Crosby Corey Farrell Corey Quon Cory Bennet Cory Snider Craig Osterhout Craig Wilhite Cristian Staretu Daehyeok Mun Dafydd Crosby Daisuke Ito dalanlan Damien Nadé Dan Cotora Danial Gharib Daniel Artine Daniel Cassidy Daniel Dao Daniel Farrell Daniel Gasienica Daniel Goosen Daniel Helfand Daniel Hiltgen Daniel J Walsh Daniel Nephin Daniel Norberg Daniel Watkins Daniel Zhang Daniil Nikolenko Danny Berger Darren Shepherd Darren Stahl Dattatraya Kumbhar Dave Goodchild Dave Henderson Dave Tucker David Alvarez David Beitey David Calavera David Cramer David Dooling David Gageot David Karlsson David le Blanc David Lechner David Scott David Sheets David Williamson David Xia David Young Deng Guangxing Denis Defreyne Denis Gladkikh Denis Ollier Dennis Docter dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Derek McGowan Des Preston Deshi Xiao Dharmit Shah Dhawal Yogesh Bhanushali Dieter Reuter Dima Stopel Dimitry Andric Ding Fei Diogo Monica Djordje Lukic Dmitriy Fishman Dmitry Gusev Dmitry Smirnov Dmitry V. Krivenok Dominik Braun Don Kjer Dong Chen DongGeon Lee Doug Davis Drew Erny Ed Costello Ed Morley <501702+edmorley@users.noreply.github.com> Elango Sivanandam Eli Uriegas Eli Uriegas Elias Faxö Elliot Luo <956941328@qq.com> Eric Bode Eric Curtin Eric Engestrom Eric G. Noriega Eric Rosenberg Eric Sage Eric-Olivier Lamey Erica Windisch Erik Hollensbe Erik Humphrey Erik St. Martin Essam A. Hassan Ethan Haynes Euan Kemp Eugene Yakubovich Evan Allrich Evan Hazlett Evan Krall Evan Lezar Evelyn Xu Everett Toews Fabio Falci Fabrizio Soppelsa Felix Geyer Felix Hupfeld Felix Rabe fezzik1620 Filip Jareš Flavio Crisciani Florian Klein Forest Johnson Foysal Iqbal François Scala Fred Lifton Frederic Hemberger Frederick F. Kautz IV Frederik Nordahl Jul Sabroe Frieder Bluemle Gabriel Gore Gabriel Nicolas Avellaneda Gabriela Georgieva Gaetan de Villele Gang Qiao Gary Schaetz Genki Takiuchi George MacRorie George Margaritis George Xie Gianluca Borello Gildas Cuisinier Gio d'Amelio Gleb Stsenov Goksu Toprak Gou Rao Govind Rai Grace Choi Graeme Wiebe Grant Reaber Greg Pflaum Gsealy Guilhem Lettron Guillaume J. Charmes Guillaume Le Floch Guillaume Tardif gwx296173 Günther Jungbluth Hakan Özler Hao Zhang <21521210@zju.edu.cn> Harald Albers Harold Cooper Harry Zhang He Simei Hector S Helen Xie Henning Sprang Henry N Hernan Garcia Hongbin Lu Hu Keping Huayi Zhang Hugo Chastel Hugo Gabriel Eyherabide huqun Huu Nguyen Hyzhou Zhy Iain Samuel McLean Elder Ian Campbell Ian Philpot Ignacio Capurro Ilya Dmitrichenko Ilya Khlopotov Ilya Sotkov Ioan Eugen Stan Isabel Jimenez Ivan Grcic Ivan Grund Ivan Markin Jacob Atzen Jacob Tomlinson Jacopo Rigoli Jaivish Kothari Jake Lambert Jake Sanders Jake Stokes Jakub Panek James Nesbitt James Turnbull Jamie Hannaford Jan Koprowski Jan Pazdziora Jan-Jaap Driessen Jana Radhakrishnan Jared Hocutt Jasmine Hegman Jason Hall Jason Heiss Jason Plum Jay Kamat Jean Lecordier Jean Rouge Jean-Christophe Sirot Jean-Pierre Huynh Jeff Lindsay Jeff Nickoloff Jeff Silberman Jennings Zhang Jeremy Chambers Jeremy Unruh Jeremy Yallop Jeroen Franse Jesse Adametz Jessica Frazelle Jezeniel Zapanta Jian Zhang Jie Luo Jilles Oldenbeuving Jim Chen Jim Galasyn Jim Lin Jimmy Leger Jimmy Song jimmyxian Jintao Zhang Joao Fernandes Joe Abbey Joe Doliner Joe Gordon Joel Handwell Joey Geiger Joffrey F Johan Euphrosine Johannes 'fish' Ziemke John Feminella John Harris John Howard John Howard John Laswell John Maguire John Mulhausen John Starks John Stephens John Tims John V. Martinez John Willis Jon Johnson Jon Zeolla Jonatas Baldin Jonathan A. Sternberg Jonathan Boulle Jonathan Lee Jonathan Lomas Jonathan McCrohan Jonathan Warriss-Simmons Jonh Wendell Jordan Jennings Jorge Vallecillo Jose J. Escobar <53836904+jescobar-docker@users.noreply.github.com> Joseph Kern Josh Bodah Josh Chorlton Josh Hawn Josh Horwitz Josh Soref Julian Julien Barbier Julien Kassar Julien Maitrehenry Justas Brazauskas Justin Chadwell Justin Cormack Justin Simonelis Justyn Temme Jyrki Puttonen Jérémie Drouet Jérôme Petazzoni Jörg Thalheim Kai Blin Kai Qiang Wu (Kennan) Kara Alexandra Kareem Khazem Karthik Nayak Kat Samperi Kathryn Spiers Katie McLaughlin Ke Xu Kei Ohmura Keith Hudgins Kelton Bassingthwaite Ken Cochrane Ken ICHIKAWA Kenfe-Mickaël Laventure Kevin Alvarez Kevin Burke Kevin Feyrer Kevin Kern Kevin Kirsche Kevin Meredith Kevin Richardson Kevin Woblick khaled souf Kim Eik Kir Kolyshkin Kirill A. Korinsky Kotaro Yoshimatsu Krasi Georgiev Kris-Mikael Krister Kun Zhang Kunal Kushwaha Kyle Mitofsky Lachlan Cooper Lai Jiangshan Lars Kellogg-Stedman Laura Brehm Laura Frank Laurent Erignoux Lee Gaines Lei Jitang Lennie Leo Gallucci Leonid Skorospelov Lewis Daly Li Fu Bang Li Yi Li Yi Liang-Chi Hsieh Lihua Tang Lily Guo Lin Lu Linus Heckemann Liping Xue Liron Levin liwenqi lixiaobing10051267 Lloyd Dewolf Lorenzo Fontana Louis Opter Luca Favatella Luca Marturana Lucas Chan Luis Henrique Mulinari Luka Hartwig Lukas Heeren Lukasz Zajaczkowski Lydell Manganti Lénaïc Huard Ma Shimiao Mabin Maciej Kalisz Madhav Puri Madhu Venugopal Madhur Batra Malte Janduda Manjunath A Kumatagi Mansi Nahar mapk0y Marc Bihlmaier Marc Cornellà Marco Mariani Marco Spiess Marco Vedovati Marcus Martins Marianna Tessel Marius Ileana Marius Meschter Marius Sturm Mark Oates Marsh Macy Martin Mosegaard Amdisen Mary Anthony Mason Fish Mason Malone Mateusz Major Mathias Duedahl <64321057+Lussebullen@users.noreply.github.com> Mathieu Champlon Mathieu Rollet Matt Gucci Matt Robenolt Matteo Orefice Matthew Heon Matthieu Hauglustaine Mauro Porras P Max Shytikov Max-Julian Pogner Maxime Petazzoni Maximillian Fan Xavier Mei ChunTao Melroy van den Berg Metal <2466052+tedhexaflow@users.noreply.github.com> Micah Zoltu Michael A. Smith Michael Bridgen Michael Crosby Michael Friis Michael Irwin Michael Käufl Michael Prokop Michael Scharf Michael Spetsiotis Michael Steinert Michael West Michal Minář Michał Czeraszkiewicz Miguel Angel Alvarez Cabrerizo Mihai Borobocea Mihuleacc Sergiu Mike Brown Mike Casas Mike Dalton Mike Danese Mike Dillon Mike Goelzer Mike MacCana mikelinjie <294893458@qq.com> Mikhail Vasin Milind Chawre Mindaugas Rukas Miroslav Gula Misty Stanley-Jones Mohammad Banikazemi Mohammed Aaqib Ansari Mohini Anne Dsouza Moorthy RS Morgan Bauer Morten Hekkvang Morten Linderud Moysés Borges Mozi <29089388+pzhlkj6612@users.noreply.github.com> Mrunal Patel muicoder Murukesh Mohanan Muthukumar R Máximo Cuadros Mårten Cassel Nace Oroz Nahum Shalman Nalin Dahyabhai Nao YONASHIRO Nassim 'Nass' Eddequiouaq Natalie Parker Nate Brennand Nathan Hsieh Nathan LeClaire Nathan McCauley Neil Peterson Nick Adcock Nick Santos Nick Sieger Nico Stapelbroek Nicola Kabar Nicolas Borboën Nicolas De Loof Nikhil Chawla Nikolas Garofil Nikolay Milovanov Nir Soffer Nishant Totla NIWA Hideyuki Noah Treuhaft O.S. Tezer Oded Arbel Odin Ugedal ohmystack OKA Naoya Oliver Pomeroy Olle Jonsson Olli Janatuinen Oscar Wieman Otto Kekäläinen Ovidio Mallo Pascal Borreli Patrick Böänziger Patrick Daigle <114765035+pdaig@users.noreply.github.com> Patrick Hemmer Patrick Lang Paul Paul Kehrer Paul Lietar Paul Mulders Paul Seyfert Paul Weaver Pavel Pospisil Paweł Gronowski Paweł Pokrywka Paweł Szczekutowicz Peeyush Gupta Per Lundberg Peter Dave Hello Peter Edge Peter Hsu Peter Jaffe Peter Kehl Peter Nagy Peter Salvatore Peter Waller Phil Estes Philip Alexander Etling Philipp Gillé Philipp Schmied Phong Tran pidster Pieter E Smit pixelistik Pratik Karki Prayag Verma Preston Cowley Pure White Qiang Huang Qinglan Peng QQ喵 qudongfang Raghavendra K T Rahul Kadyan Rahul Zoldyck Ravi Shekhar Jethani Ray Tsang Reficul Remy Suen Renaud Gaubert Ricardo N Feliciano Rich Moyse Richard Chen Zheng <58443436+rchenzheng@users.noreply.github.com> Richard Mathie Richard Scothern Rick Wieman Ritesh H Shukla Riyaz Faizullabhoy Rob Gulewich Rob Murray Robert Wallis Robin Naundorf Robin Speekenbrink Roch Feuillade Rodolfo Ortiz Rogelio Canedo Rohan Verma Roland Kammerer Roman Dudin Rory Hunter Ross Boucher Rubens Figueiredo Rui Cao Rui JingAn Ryan Belgrave Ryan Detzel Ryan Stelly Ryan Wilson-Perkin Ryan Zhang Sainath Grandhi Sakeven Jiang Sally O'Malley Sam Neirinck Sam Thibault Samarth Shah Sambuddha Basu Sami Tabet Samuel Cochran Samuel Karp Sandro Jäckel Santhosh Manohar Sargun Dhillon Saswat Bhattacharya Saurabh Kumar Scott Brenner Scott Collier Sean Christopherson Sean Rodman Sebastiaan van Stijn Sergey Tryuber Serhat Gülçiçek Sevki Hasirci Shaun Kaasten Sheng Yang Shijiang Wei Shishir Mahajan Shoubhik Bose Shukui Yang Sian Lerk Lau Sidhartha Mani sidharthamani Silvin Lubecki Simei He Simon Ferquel Simon Heimberg Sindhu S Slava Semushin Solomon Hykes Song Gao Spencer Brown Spring Lee squeegels Srini Brahmaroutu Stefan S. Stefan Scherer Stefan Weil Stephane Jeandeaux Stephen Day Stephen Rust Steve Durrheimer Steve Richards Steven Burgess Stoica-Marcu Floris-Andrei Subhajit Ghosh Sun Jianbo Sune Keller Sungwon Han Sunny Gogoi Sven Dowideit Sylvain Baubeau Sébastien HOUZÉ T K Sourabh TAGOMORI Satoshi taiji-tech Takeshi Koenuma Takuya Noguchi Taylor Jones Teiva Harsanyi Tejaswini Duggaraju Tengfei Wang Teppei Fukuda Thatcher Peskens Thibault Coupin Thomas Gazagnaire Thomas Krzero Thomas Leonard Thomas Léveil Thomas Riccardi Thomas Swift Tianon Gravi Tianyi Wang Tibor Vass Tim Dettrick Tim Hockin Tim Sampson Tim Smith Tim Waugh Tim Welsh Tim Wraight timfeirg Timothy Hobbs Tobias Bradtke Tobias Gesellchen Todd Whiteman Tom Denham Tom Fotherby Tom Klingenberg Tom Milligan Tom X. Tobin Tomas Bäckman Tomas Tomecek Tomasz Kopczynski Tomáš Hrčka Tony Abboud Tõnis Tiigi Trapier Marshall Travis Cline Tristan Carel Tycho Andersen Tycho Andersen uhayate Ulrich Bareth Ulysses Souza Umesh Yadav Vaclav Struhar Valentin Lorentz Vardan Pogosian Venkateswara Reddy Bukkasamudram Veres Lajos Victor Vieux Victoria Bialas Viktor Stanchev Ville Skyttä Vimal Raghubir Vincent Batts Vincent Bernat Vincent Demeester Vincent Woo Vishnu Kannan Vivek Goyal Wang Jie Wang Lei Wang Long Wang Ping Wang Xing Wang Yuexiao Wang Yumu <37442693@qq.com> Wataru Ishida Wayne Song Wen Cheng Ma Wenzhi Liang Wes Morgan Wewang Xiaorenfine William Henry Xianglin Gao Xiaodong Liu Xiaodong Zhang Xiaoxi He Xinbo Weng Xuecong Liao Yan Feng Yanqiang Miao Yassine Tijani Yi EungJun Ying Li Yong Tang Yosef Fertel Yu Peng Yuan Sun Yucheng Wu Yue Zhang Yunxiang Huang Zachary Romero Zander Mackie zebrilee Zeel B Patel Zhang Kun Zhang Wei Zhang Wentao ZhangHang zhenghenghuo Zhiwei Liang Zhou Hao Zhoulin Xie Zhu Guihua Zhuo Zhi Álex González Álvaro Lázaro Átila Camurça Alves Александр Менщиков <__Singleton__@hackerdom.ru> 徐俊杰 ================================================ FILE: vendor/github.com/docker/cli/LICENSE ================================================ Apache License Version 2.0, January 2004 https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor 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, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS Copyright 2013-2017 Docker, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/github.com/docker/cli/NOTICE ================================================ Docker Copyright 2012-2017 Docker, Inc. This product includes software developed at Docker, Inc. (https://www.docker.com). This product contains software (https://github.com/creack/pty) developed by Keith Rarick, licensed under the MIT License. The following is courtesy of our legal counsel: Use and transfer of Docker may be subject to certain restrictions by the United States and other governments. It is your responsibility to ensure that your use and/or transfer does not violate applicable laws. For more information, see https://www.bis.doc.gov See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. ================================================ FILE: vendor/github.com/docker/cli/cli/config/config.go ================================================ package config import ( "fmt" "io" "os" "os/user" "path/filepath" "runtime" "strings" "sync" "github.com/docker/cli/cli/config/configfile" "github.com/docker/cli/cli/config/credentials" "github.com/docker/cli/cli/config/types" "github.com/pkg/errors" ) const ( // EnvOverrideConfigDir is the name of the environment variable that can be // used to override the location of the client configuration files (~/.docker). // // It takes priority over the default, but can be overridden by the "--config" // command line option. EnvOverrideConfigDir = "DOCKER_CONFIG" // ConfigFileName is the name of the client configuration file inside the // config-directory. ConfigFileName = "config.json" configFileDir = ".docker" contextsDir = "contexts" ) var ( initConfigDir = new(sync.Once) configDir string ) // resetConfigDir is used in testing to reset the "configDir" package variable // and its sync.Once to force re-lookup between tests. func resetConfigDir() { configDir = "" initConfigDir = new(sync.Once) } // getHomeDir returns the home directory of the current user with the help of // environment variables depending on the target operating system. // Returned path should be used with "path/filepath" to form new paths. // // On non-Windows platforms, it falls back to nss lookups, if the home // directory cannot be obtained from environment-variables. // // If linking statically with cgo enabled against glibc, ensure the // osusergo build tag is used. // // If needing to do nss lookups, do not disable cgo or set osusergo. // // getHomeDir is a copy of [pkg/homedir.Get] to prevent adding docker/docker // as dependency for consumers that only need to read the config-file. // // [pkg/homedir.Get]: https://pkg.go.dev/github.com/docker/docker@v26.1.4+incompatible/pkg/homedir#Get func getHomeDir() string { home, _ := os.UserHomeDir() if home == "" && runtime.GOOS != "windows" { if u, err := user.Current(); err == nil { return u.HomeDir } } return home } // Dir returns the directory the configuration file is stored in func Dir() string { initConfigDir.Do(func() { configDir = os.Getenv(EnvOverrideConfigDir) if configDir == "" { configDir = filepath.Join(getHomeDir(), configFileDir) } }) return configDir } // ContextStoreDir returns the directory the docker contexts are stored in func ContextStoreDir() string { return filepath.Join(Dir(), contextsDir) } // SetDir sets the directory the configuration file is stored in func SetDir(dir string) { // trigger the sync.Once to synchronise with Dir() initConfigDir.Do(func() {}) configDir = filepath.Clean(dir) } // Path returns the path to a file relative to the config dir func Path(p ...string) (string, error) { path := filepath.Join(append([]string{Dir()}, p...)...) if !strings.HasPrefix(path, Dir()+string(filepath.Separator)) { return "", errors.Errorf("path %q is outside of root config directory %q", path, Dir()) } return path, nil } // LoadFromReader is a convenience function that creates a ConfigFile object from // a reader. It returns an error if configData is malformed. func LoadFromReader(configData io.Reader) (*configfile.ConfigFile, error) { configFile := configfile.ConfigFile{ AuthConfigs: make(map[string]types.AuthConfig), } err := configFile.LoadFromReader(configData) return &configFile, err } // Load reads the configuration file ([ConfigFileName]) from the given directory. // If no directory is given, it uses the default [Dir]. A [*configfile.ConfigFile] // is returned containing the contents of the configuration file, or a default // struct if no configfile exists in the given location. // // Load returns an error if a configuration file exists in the given location, // but cannot be read, or is malformed. Consumers must handle errors to prevent // overwriting an existing configuration file. func Load(configDir string) (*configfile.ConfigFile, error) { if configDir == "" { configDir = Dir() } return load(configDir) } func load(configDir string) (*configfile.ConfigFile, error) { filename := filepath.Join(configDir, ConfigFileName) configFile := configfile.New(filename) file, err := os.Open(filename) if err != nil { if os.IsNotExist(err) { // It is OK for no configuration file to be present, in which // case we return a default struct. return configFile, nil } // Any other error happening when failing to read the file must be returned. return configFile, errors.Wrap(err, "loading config file") } defer file.Close() err = configFile.LoadFromReader(file) if err != nil { err = errors.Wrapf(err, "loading config file: %s: ", filename) } return configFile, err } // LoadDefaultConfigFile attempts to load the default config file and returns // a reference to the ConfigFile struct. If none is found or when failing to load // the configuration file, it initializes a default ConfigFile struct. If no // credentials-store is set in the configuration file, it attempts to discover // the default store to use for the current platform. // // Important: LoadDefaultConfigFile prints a warning to stderr when failing to // load the configuration file, but otherwise ignores errors. Consumers should // consider using [Load] (and [credentials.DetectDefaultStore]) to detect errors // when updating the configuration file, to prevent discarding a (malformed) // configuration file. func LoadDefaultConfigFile(stderr io.Writer) *configfile.ConfigFile { configFile, err := load(Dir()) if err != nil { // FIXME(thaJeztah): we should not proceed here to prevent overwriting existing (but malformed) config files; see https://github.com/docker/cli/issues/5075 _, _ = fmt.Fprintln(stderr, "WARNING: Error", err) } if !configFile.ContainsAuth() { configFile.CredentialsStore = credentials.DetectDefaultStore(configFile.CredentialsStore) } return configFile } ================================================ FILE: vendor/github.com/docker/cli/cli/config/configfile/file.go ================================================ package configfile import ( "encoding/base64" "encoding/json" "io" "os" "path/filepath" "strings" "github.com/docker/cli/cli/config/credentials" "github.com/docker/cli/cli/config/types" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) // ConfigFile ~/.docker/config.json file info type ConfigFile struct { AuthConfigs map[string]types.AuthConfig `json:"auths"` HTTPHeaders map[string]string `json:"HttpHeaders,omitempty"` PsFormat string `json:"psFormat,omitempty"` ImagesFormat string `json:"imagesFormat,omitempty"` NetworksFormat string `json:"networksFormat,omitempty"` PluginsFormat string `json:"pluginsFormat,omitempty"` VolumesFormat string `json:"volumesFormat,omitempty"` StatsFormat string `json:"statsFormat,omitempty"` DetachKeys string `json:"detachKeys,omitempty"` CredentialsStore string `json:"credsStore,omitempty"` CredentialHelpers map[string]string `json:"credHelpers,omitempty"` Filename string `json:"-"` // Note: for internal use only ServiceInspectFormat string `json:"serviceInspectFormat,omitempty"` ServicesFormat string `json:"servicesFormat,omitempty"` TasksFormat string `json:"tasksFormat,omitempty"` SecretFormat string `json:"secretFormat,omitempty"` ConfigFormat string `json:"configFormat,omitempty"` NodesFormat string `json:"nodesFormat,omitempty"` PruneFilters []string `json:"pruneFilters,omitempty"` Proxies map[string]ProxyConfig `json:"proxies,omitempty"` Experimental string `json:"experimental,omitempty"` CurrentContext string `json:"currentContext,omitempty"` CLIPluginsExtraDirs []string `json:"cliPluginsExtraDirs,omitempty"` Plugins map[string]map[string]string `json:"plugins,omitempty"` Aliases map[string]string `json:"aliases,omitempty"` Features map[string]string `json:"features,omitempty"` } // ProxyConfig contains proxy configuration settings type ProxyConfig struct { HTTPProxy string `json:"httpProxy,omitempty"` HTTPSProxy string `json:"httpsProxy,omitempty"` NoProxy string `json:"noProxy,omitempty"` FTPProxy string `json:"ftpProxy,omitempty"` AllProxy string `json:"allProxy,omitempty"` } // New initializes an empty configuration file for the given filename 'fn' func New(fn string) *ConfigFile { return &ConfigFile{ AuthConfigs: make(map[string]types.AuthConfig), HTTPHeaders: make(map[string]string), Filename: fn, Plugins: make(map[string]map[string]string), Aliases: make(map[string]string), } } // LoadFromReader reads the configuration data given and sets up the auth config // information with given directory and populates the receiver object func (configFile *ConfigFile) LoadFromReader(configData io.Reader) error { if err := json.NewDecoder(configData).Decode(configFile); err != nil && !errors.Is(err, io.EOF) { return err } var err error for addr, ac := range configFile.AuthConfigs { if ac.Auth != "" { ac.Username, ac.Password, err = decodeAuth(ac.Auth) if err != nil { return err } } ac.Auth = "" ac.ServerAddress = addr configFile.AuthConfigs[addr] = ac } return nil } // ContainsAuth returns whether there is authentication configured // in this file or not. func (configFile *ConfigFile) ContainsAuth() bool { return configFile.CredentialsStore != "" || len(configFile.CredentialHelpers) > 0 || len(configFile.AuthConfigs) > 0 } // GetAuthConfigs returns the mapping of repo to auth configuration func (configFile *ConfigFile) GetAuthConfigs() map[string]types.AuthConfig { if configFile.AuthConfigs == nil { configFile.AuthConfigs = make(map[string]types.AuthConfig) } return configFile.AuthConfigs } // SaveToWriter encodes and writes out all the authorization information to // the given writer func (configFile *ConfigFile) SaveToWriter(writer io.Writer) error { // Encode sensitive data into a new/temp struct tmpAuthConfigs := make(map[string]types.AuthConfig, len(configFile.AuthConfigs)) for k, authConfig := range configFile.AuthConfigs { authCopy := authConfig // encode and save the authstring, while blanking out the original fields authCopy.Auth = encodeAuth(&authCopy) authCopy.Username = "" authCopy.Password = "" authCopy.ServerAddress = "" tmpAuthConfigs[k] = authCopy } saveAuthConfigs := configFile.AuthConfigs configFile.AuthConfigs = tmpAuthConfigs defer func() { configFile.AuthConfigs = saveAuthConfigs }() // User-Agent header is automatically set, and should not be stored in the configuration for v := range configFile.HTTPHeaders { if strings.EqualFold(v, "User-Agent") { delete(configFile.HTTPHeaders, v) } } data, err := json.MarshalIndent(configFile, "", "\t") if err != nil { return err } _, err = writer.Write(data) return err } // Save encodes and writes out all the authorization information func (configFile *ConfigFile) Save() (retErr error) { if configFile.Filename == "" { return errors.Errorf("Can't save config with empty filename") } dir := filepath.Dir(configFile.Filename) if err := os.MkdirAll(dir, 0o700); err != nil { return err } temp, err := os.CreateTemp(dir, filepath.Base(configFile.Filename)) if err != nil { return err } defer func() { temp.Close() if retErr != nil { if err := os.Remove(temp.Name()); err != nil { logrus.WithError(err).WithField("file", temp.Name()).Debug("Error cleaning up temp file") } } }() err = configFile.SaveToWriter(temp) if err != nil { return err } if err := temp.Close(); err != nil { return errors.Wrap(err, "error closing temp file") } // Handle situation where the configfile is a symlink cfgFile := configFile.Filename if f, err := os.Readlink(cfgFile); err == nil { cfgFile = f } // Try copying the current config file (if any) ownership and permissions copyFilePermissions(cfgFile, temp.Name()) return os.Rename(temp.Name(), cfgFile) } // ParseProxyConfig computes proxy configuration by retrieving the config for the provided host and // then checking this against any environment variables provided to the container func (configFile *ConfigFile) ParseProxyConfig(host string, runOpts map[string]*string) map[string]*string { var cfgKey string if _, ok := configFile.Proxies[host]; !ok { cfgKey = "default" } else { cfgKey = host } config := configFile.Proxies[cfgKey] permitted := map[string]*string{ "HTTP_PROXY": &config.HTTPProxy, "HTTPS_PROXY": &config.HTTPSProxy, "NO_PROXY": &config.NoProxy, "FTP_PROXY": &config.FTPProxy, "ALL_PROXY": &config.AllProxy, } m := runOpts if m == nil { m = make(map[string]*string) } for k := range permitted { if *permitted[k] == "" { continue } if _, ok := m[k]; !ok { m[k] = permitted[k] } if _, ok := m[strings.ToLower(k)]; !ok { m[strings.ToLower(k)] = permitted[k] } } return m } // encodeAuth creates a base64 encoded string to containing authorization information func encodeAuth(authConfig *types.AuthConfig) string { if authConfig.Username == "" && authConfig.Password == "" { return "" } authStr := authConfig.Username + ":" + authConfig.Password msg := []byte(authStr) encoded := make([]byte, base64.StdEncoding.EncodedLen(len(msg))) base64.StdEncoding.Encode(encoded, msg) return string(encoded) } // decodeAuth decodes a base64 encoded string and returns username and password func decodeAuth(authStr string) (string, string, error) { if authStr == "" { return "", "", nil } decLen := base64.StdEncoding.DecodedLen(len(authStr)) decoded := make([]byte, decLen) authByte := []byte(authStr) n, err := base64.StdEncoding.Decode(decoded, authByte) if err != nil { return "", "", err } if n > decLen { return "", "", errors.Errorf("Something went wrong decoding auth config") } userName, password, ok := strings.Cut(string(decoded), ":") if !ok || userName == "" { return "", "", errors.Errorf("Invalid auth configuration file") } return userName, strings.Trim(password, "\x00"), nil } // GetCredentialsStore returns a new credentials store from the settings in the // configuration file func (configFile *ConfigFile) GetCredentialsStore(registryHostname string) credentials.Store { if helper := getConfiguredCredentialStore(configFile, registryHostname); helper != "" { return newNativeStore(configFile, helper) } return credentials.NewFileStore(configFile) } // var for unit testing. var newNativeStore = func(configFile *ConfigFile, helperSuffix string) credentials.Store { return credentials.NewNativeStore(configFile, helperSuffix) } // GetAuthConfig for a repository from the credential store func (configFile *ConfigFile) GetAuthConfig(registryHostname string) (types.AuthConfig, error) { return configFile.GetCredentialsStore(registryHostname).Get(registryHostname) } // getConfiguredCredentialStore returns the credential helper configured for the // given registry, the default credsStore, or the empty string if neither are // configured. func getConfiguredCredentialStore(c *ConfigFile, registryHostname string) string { if c.CredentialHelpers != nil && registryHostname != "" { if helper, exists := c.CredentialHelpers[registryHostname]; exists { return helper } } return c.CredentialsStore } // GetAllCredentials returns all of the credentials stored in all of the // configured credential stores. func (configFile *ConfigFile) GetAllCredentials() (map[string]types.AuthConfig, error) { auths := make(map[string]types.AuthConfig) addAll := func(from map[string]types.AuthConfig) { for reg, ac := range from { auths[reg] = ac } } defaultStore := configFile.GetCredentialsStore("") newAuths, err := defaultStore.GetAll() if err != nil { return nil, err } addAll(newAuths) // Auth configs from a registry-specific helper should override those from the default store. for registryHostname := range configFile.CredentialHelpers { newAuth, err := configFile.GetAuthConfig(registryHostname) if err != nil { // TODO(thaJeztah): use context-logger, so that this output can be suppressed (in tests). logrus.WithError(err).Warnf("Failed to get credentials for registry: %s", registryHostname) continue } auths[registryHostname] = newAuth } return auths, nil } // GetFilename returns the file name that this config file is based on. func (configFile *ConfigFile) GetFilename() string { return configFile.Filename } // PluginConfig retrieves the requested option for the given plugin. func (configFile *ConfigFile) PluginConfig(pluginname, option string) (string, bool) { if configFile.Plugins == nil { return "", false } pluginConfig, ok := configFile.Plugins[pluginname] if !ok { return "", false } value, ok := pluginConfig[option] return value, ok } // SetPluginConfig sets the option to the given value for the given // plugin. Passing a value of "" will remove the option. If removing // the final config item for a given plugin then also cleans up the // overall plugin entry. func (configFile *ConfigFile) SetPluginConfig(pluginname, option, value string) { if configFile.Plugins == nil { configFile.Plugins = make(map[string]map[string]string) } pluginConfig, ok := configFile.Plugins[pluginname] if !ok { pluginConfig = make(map[string]string) configFile.Plugins[pluginname] = pluginConfig } if value != "" { pluginConfig[option] = value } else { delete(pluginConfig, option) } if len(pluginConfig) == 0 { delete(configFile.Plugins, pluginname) } } ================================================ FILE: vendor/github.com/docker/cli/cli/config/configfile/file_unix.go ================================================ //go:build !windows package configfile import ( "os" "syscall" ) // copyFilePermissions copies file ownership and permissions from "src" to "dst", // ignoring any error during the process. func copyFilePermissions(src, dst string) { var ( mode os.FileMode = 0o600 uid, gid int ) fi, err := os.Stat(src) if err != nil { return } if fi.Mode().IsRegular() { mode = fi.Mode() } if err := os.Chmod(dst, mode); err != nil { return } uid = int(fi.Sys().(*syscall.Stat_t).Uid) gid = int(fi.Sys().(*syscall.Stat_t).Gid) if uid > 0 && gid > 0 { _ = os.Chown(dst, uid, gid) } } ================================================ FILE: vendor/github.com/docker/cli/cli/config/configfile/file_windows.go ================================================ package configfile func copyFilePermissions(src, dst string) { // TODO implement for Windows } ================================================ FILE: vendor/github.com/docker/cli/cli/config/credentials/credentials.go ================================================ package credentials import ( "github.com/docker/cli/cli/config/types" ) // Store is the interface that any credentials store must implement. type Store interface { // Erase removes credentials from the store for a given server. Erase(serverAddress string) error // Get retrieves credentials from the store for a given server. Get(serverAddress string) (types.AuthConfig, error) // GetAll retrieves all the credentials from the store. GetAll() (map[string]types.AuthConfig, error) // Store saves credentials in the store. Store(authConfig types.AuthConfig) error } ================================================ FILE: vendor/github.com/docker/cli/cli/config/credentials/default_store.go ================================================ package credentials import "os/exec" // DetectDefaultStore return the default credentials store for the platform if // no user-defined store is passed, and the store executable is available. func DetectDefaultStore(store string) string { if store != "" { // use user-defined return store } platformDefault := defaultCredentialsStore() if platformDefault == "" { return "" } if _, err := exec.LookPath(remoteCredentialsPrefix + platformDefault); err != nil { return "" } return platformDefault } ================================================ FILE: vendor/github.com/docker/cli/cli/config/credentials/default_store_darwin.go ================================================ package credentials func defaultCredentialsStore() string { return "osxkeychain" } ================================================ FILE: vendor/github.com/docker/cli/cli/config/credentials/default_store_linux.go ================================================ package credentials import ( "os/exec" ) func defaultCredentialsStore() string { if _, err := exec.LookPath("pass"); err == nil { return "pass" } return "secretservice" } ================================================ FILE: vendor/github.com/docker/cli/cli/config/credentials/default_store_unsupported.go ================================================ //go:build !windows && !darwin && !linux package credentials func defaultCredentialsStore() string { return "" } ================================================ FILE: vendor/github.com/docker/cli/cli/config/credentials/default_store_windows.go ================================================ package credentials func defaultCredentialsStore() string { return "wincred" } ================================================ FILE: vendor/github.com/docker/cli/cli/config/credentials/file_store.go ================================================ package credentials import ( "net" "net/url" "strings" "github.com/docker/cli/cli/config/types" ) type store interface { Save() error GetAuthConfigs() map[string]types.AuthConfig GetFilename() string } // fileStore implements a credentials store using // the docker configuration file to keep the credentials in plain text. type fileStore struct { file store } // NewFileStore creates a new file credentials store. func NewFileStore(file store) Store { return &fileStore{file: file} } // Erase removes the given credentials from the file store. func (c *fileStore) Erase(serverAddress string) error { delete(c.file.GetAuthConfigs(), serverAddress) return c.file.Save() } // Get retrieves credentials for a specific server from the file store. func (c *fileStore) Get(serverAddress string) (types.AuthConfig, error) { authConfig, ok := c.file.GetAuthConfigs()[serverAddress] if !ok { // Maybe they have a legacy config file, we will iterate the keys converting // them to the new format and testing for r, ac := range c.file.GetAuthConfigs() { if serverAddress == ConvertToHostname(r) { return ac, nil } } authConfig = types.AuthConfig{} } return authConfig, nil } func (c *fileStore) GetAll() (map[string]types.AuthConfig, error) { return c.file.GetAuthConfigs(), nil } // Store saves the given credentials in the file store. func (c *fileStore) Store(authConfig types.AuthConfig) error { authConfigs := c.file.GetAuthConfigs() authConfigs[authConfig.ServerAddress] = authConfig return c.file.Save() } func (c *fileStore) GetFilename() string { return c.file.GetFilename() } func (c *fileStore) IsFileStore() bool { return true } // ConvertToHostname converts a registry url which has http|https prepended // to just an hostname. // Copied from github.com/docker/docker/registry.ConvertToHostname to reduce dependencies. func ConvertToHostname(maybeURL string) string { stripped := maybeURL if strings.Contains(stripped, "://") { u, err := url.Parse(stripped) if err == nil && u.Hostname() != "" { if u.Port() == "" { return u.Hostname() } return net.JoinHostPort(u.Hostname(), u.Port()) } } hostName, _, _ := strings.Cut(stripped, "/") return hostName } ================================================ FILE: vendor/github.com/docker/cli/cli/config/credentials/native_store.go ================================================ package credentials import ( "github.com/docker/cli/cli/config/types" "github.com/docker/docker-credential-helpers/client" "github.com/docker/docker-credential-helpers/credentials" ) const ( remoteCredentialsPrefix = "docker-credential-" //nolint:gosec // ignore G101: Potential hardcoded credentials tokenUsername = "" ) // nativeStore implements a credentials store // using native keychain to keep credentials secure. // It piggybacks into a file store to keep users' emails. type nativeStore struct { programFunc client.ProgramFunc fileStore Store } // NewNativeStore creates a new native store that // uses a remote helper program to manage credentials. func NewNativeStore(file store, helperSuffix string) Store { name := remoteCredentialsPrefix + helperSuffix return &nativeStore{ programFunc: client.NewShellProgramFunc(name), fileStore: NewFileStore(file), } } // Erase removes the given credentials from the native store. func (c *nativeStore) Erase(serverAddress string) error { if err := client.Erase(c.programFunc, serverAddress); err != nil { return err } // Fallback to plain text store to remove email return c.fileStore.Erase(serverAddress) } // Get retrieves credentials for a specific server from the native store. func (c *nativeStore) Get(serverAddress string) (types.AuthConfig, error) { // load user email if it exist or an empty auth config. auth, _ := c.fileStore.Get(serverAddress) creds, err := c.getCredentialsFromStore(serverAddress) if err != nil { return auth, err } auth.Username = creds.Username auth.IdentityToken = creds.IdentityToken auth.Password = creds.Password auth.ServerAddress = creds.ServerAddress return auth, nil } // GetAll retrieves all the credentials from the native store. func (c *nativeStore) GetAll() (map[string]types.AuthConfig, error) { auths, err := c.listCredentialsInStore() if err != nil { return nil, err } // Emails are only stored in the file store. // This call can be safely eliminated when emails are removed. fileConfigs, _ := c.fileStore.GetAll() authConfigs := make(map[string]types.AuthConfig) for registry := range auths { creds, err := c.getCredentialsFromStore(registry) if err != nil { return nil, err } ac := fileConfigs[registry] // might contain Email ac.Username = creds.Username ac.Password = creds.Password ac.IdentityToken = creds.IdentityToken if ac.ServerAddress == "" { ac.ServerAddress = creds.ServerAddress } authConfigs[registry] = ac } return authConfigs, nil } // Store saves the given credentials in the file store. func (c *nativeStore) Store(authConfig types.AuthConfig) error { if err := c.storeCredentialsInStore(authConfig); err != nil { return err } authConfig.Username = "" authConfig.Password = "" authConfig.IdentityToken = "" // Fallback to old credential in plain text to save only the email return c.fileStore.Store(authConfig) } // storeCredentialsInStore executes the command to store the credentials in the native store. func (c *nativeStore) storeCredentialsInStore(config types.AuthConfig) error { creds := &credentials.Credentials{ ServerURL: config.ServerAddress, Username: config.Username, Secret: config.Password, } if config.IdentityToken != "" { creds.Username = tokenUsername creds.Secret = config.IdentityToken } return client.Store(c.programFunc, creds) } // getCredentialsFromStore executes the command to get the credentials from the native store. func (c *nativeStore) getCredentialsFromStore(serverAddress string) (types.AuthConfig, error) { var ret types.AuthConfig creds, err := client.Get(c.programFunc, serverAddress) if err != nil { if credentials.IsErrCredentialsNotFound(err) { // do not return an error if the credentials are not // in the keychain. Let docker ask for new credentials. return ret, nil } return ret, err } if creds.Username == tokenUsername { ret.IdentityToken = creds.Secret } else { ret.Password = creds.Secret ret.Username = creds.Username } ret.ServerAddress = serverAddress return ret, nil } // listCredentialsInStore returns a listing of stored credentials as a map of // URL -> username. func (c *nativeStore) listCredentialsInStore() (map[string]string, error) { return client.List(c.programFunc) } ================================================ FILE: vendor/github.com/docker/cli/cli/config/types/authconfig.go ================================================ package types // AuthConfig contains authorization information for connecting to a Registry type AuthConfig struct { Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` Auth string `json:"auth,omitempty"` // Email is an optional value associated with the username. // This field is deprecated and will be removed in a later // version of docker. Email string `json:"email,omitempty"` ServerAddress string `json:"serveraddress,omitempty"` // IdentityToken is used to authenticate the user and get // an access token for the registry. IdentityToken string `json:"identitytoken,omitempty"` // RegistryToken is a bearer token to be sent to a registry RegistryToken string `json:"registrytoken,omitempty"` } ================================================ FILE: vendor/github.com/docker/cli/cli/connhelper/commandconn/commandconn.go ================================================ // Package commandconn provides a net.Conn implementation that can be used for // proxying (or emulating) stream via a custom command. // // For example, to provide an http.Client that can connect to a Docker daemon // running in a Docker container ("DIND"): // // httpClient := &http.Client{ // Transport: &http.Transport{ // DialContext: func(ctx context.Context, _network, _addr string) (net.Conn, error) { // return commandconn.New(ctx, "docker", "exec", "-it", containerID, "docker", "system", "dial-stdio") // }, // }, // } package commandconn import ( "bytes" "context" "fmt" "io" "net" "os" "os/exec" "runtime" "strings" "sync" "sync/atomic" "syscall" "time" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) // New returns net.Conn func New(_ context.Context, cmd string, args ...string) (net.Conn, error) { var ( c commandConn err error ) c.cmd = exec.Command(cmd, args...) // we assume that args never contains sensitive information logrus.Debugf("commandconn: starting %s with %v", cmd, args) c.cmd.Env = os.Environ() c.cmd.SysProcAttr = &syscall.SysProcAttr{} setPdeathsig(c.cmd) createSession(c.cmd) c.stdin, err = c.cmd.StdinPipe() if err != nil { return nil, err } c.stdout, err = c.cmd.StdoutPipe() if err != nil { return nil, err } c.cmd.Stderr = &stderrWriter{ stderrMu: &c.stderrMu, stderr: &c.stderr, debugPrefix: fmt.Sprintf("commandconn (%s):", cmd), } c.localAddr = dummyAddr{network: "dummy", s: "dummy-0"} c.remoteAddr = dummyAddr{network: "dummy", s: "dummy-1"} return &c, c.cmd.Start() } // commandConn implements net.Conn type commandConn struct { cmdMutex sync.Mutex // for cmd, cmdWaitErr cmd *exec.Cmd cmdWaitErr error cmdExited atomic.Bool stdin io.WriteCloser stdout io.ReadCloser stderrMu sync.Mutex // for stderr stderr bytes.Buffer stdinClosed atomic.Bool stdoutClosed atomic.Bool closing atomic.Bool localAddr net.Addr remoteAddr net.Addr } // kill terminates the process. On Windows it kills the process directly, // whereas on other platforms, a SIGTERM is sent, before forcefully terminating // the process after 3 seconds. func (c *commandConn) kill() { if c.cmdExited.Load() { return } c.cmdMutex.Lock() var werr error if runtime.GOOS != "windows" { werrCh := make(chan error) go func() { werrCh <- c.cmd.Wait() }() _ = c.cmd.Process.Signal(syscall.SIGTERM) select { case werr = <-werrCh: case <-time.After(3 * time.Second): _ = c.cmd.Process.Kill() werr = <-werrCh } } else { _ = c.cmd.Process.Kill() werr = c.cmd.Wait() } c.cmdWaitErr = werr c.cmdMutex.Unlock() c.cmdExited.Store(true) } // handleEOF handles io.EOF errors while reading or writing from the underlying // command pipes. // // When we've received an EOF we expect that the command will // be terminated soon. As such, we call Wait() on the command // and return EOF or the error depending on whether the command // exited with an error. // // If Wait() does not return within 10s, an error is returned func (c *commandConn) handleEOF(err error) error { if err != io.EOF { return err } c.cmdMutex.Lock() defer c.cmdMutex.Unlock() var werr error if c.cmdExited.Load() { werr = c.cmdWaitErr } else { werrCh := make(chan error) go func() { werrCh <- c.cmd.Wait() }() select { case werr = <-werrCh: c.cmdWaitErr = werr c.cmdExited.Store(true) case <-time.After(10 * time.Second): c.stderrMu.Lock() stderr := c.stderr.String() c.stderrMu.Unlock() return errors.Errorf("command %v did not exit after %v: stderr=%q", c.cmd.Args, err, stderr) } } if werr == nil { return err } c.stderrMu.Lock() stderr := c.stderr.String() c.stderrMu.Unlock() return errors.Errorf("command %v has exited with %v, make sure the URL is valid, and Docker 18.09 or later is installed on the remote host: stderr=%s", c.cmd.Args, werr, stderr) } func ignorableCloseError(err error) bool { return strings.Contains(err.Error(), os.ErrClosed.Error()) } func (c *commandConn) Read(p []byte) (int, error) { n, err := c.stdout.Read(p) // check after the call to Read, since // it is blocking, and while waiting on it // Close might get called if c.closing.Load() { // If we're currently closing the connection // we don't want to call onEOF return n, err } return n, c.handleEOF(err) } func (c *commandConn) Write(p []byte) (int, error) { n, err := c.stdin.Write(p) // check after the call to Write, since // it is blocking, and while waiting on it // Close might get called if c.closing.Load() { // If we're currently closing the connection // we don't want to call onEOF return n, err } return n, c.handleEOF(err) } // CloseRead allows commandConn to implement halfCloser func (c *commandConn) CloseRead() error { // NOTE: maybe already closed here if err := c.stdout.Close(); err != nil && !ignorableCloseError(err) { return err } c.stdoutClosed.Store(true) if c.stdinClosed.Load() { c.kill() } return nil } // CloseWrite allows commandConn to implement halfCloser func (c *commandConn) CloseWrite() error { // NOTE: maybe already closed here if err := c.stdin.Close(); err != nil && !ignorableCloseError(err) { return err } c.stdinClosed.Store(true) if c.stdoutClosed.Load() { c.kill() } return nil } // Close is the net.Conn func that gets called // by the transport when a dial is cancelled // due to it's context timing out. Any blocked // Read or Write calls will be unblocked and // return errors. It will block until the underlying // command has terminated. func (c *commandConn) Close() error { c.closing.Store(true) defer c.closing.Store(false) if err := c.CloseRead(); err != nil { logrus.Warnf("commandConn.Close: CloseRead: %v", err) return err } if err := c.CloseWrite(); err != nil { logrus.Warnf("commandConn.Close: CloseWrite: %v", err) return err } return nil } func (c *commandConn) LocalAddr() net.Addr { return c.localAddr } func (c *commandConn) RemoteAddr() net.Addr { return c.remoteAddr } func (c *commandConn) SetDeadline(t time.Time) error { logrus.Debugf("unimplemented call: SetDeadline(%v)", t) return nil } func (c *commandConn) SetReadDeadline(t time.Time) error { logrus.Debugf("unimplemented call: SetReadDeadline(%v)", t) return nil } func (c *commandConn) SetWriteDeadline(t time.Time) error { logrus.Debugf("unimplemented call: SetWriteDeadline(%v)", t) return nil } type dummyAddr struct { network string s string } func (d dummyAddr) Network() string { return d.network } func (d dummyAddr) String() string { return d.s } type stderrWriter struct { stderrMu *sync.Mutex stderr *bytes.Buffer debugPrefix string } func (w *stderrWriter) Write(p []byte) (int, error) { logrus.Debugf("%s%s", w.debugPrefix, string(p)) w.stderrMu.Lock() if w.stderr.Len() > 4096 { w.stderr.Reset() } n, err := w.stderr.Write(p) w.stderrMu.Unlock() return n, err } ================================================ FILE: vendor/github.com/docker/cli/cli/connhelper/commandconn/pdeathsig_linux.go ================================================ package commandconn import ( "os/exec" "syscall" ) func setPdeathsig(cmd *exec.Cmd) { cmd.SysProcAttr.Pdeathsig = syscall.SIGKILL } ================================================ FILE: vendor/github.com/docker/cli/cli/connhelper/commandconn/pdeathsig_nolinux.go ================================================ //go:build !linux package commandconn import ( "os/exec" ) func setPdeathsig(*exec.Cmd) {} ================================================ FILE: vendor/github.com/docker/cli/cli/connhelper/commandconn/session_unix.go ================================================ //go:build !windows package commandconn import ( "os/exec" ) func createSession(cmd *exec.Cmd) { // for supporting ssh connection helper with ProxyCommand // https://github.com/docker/cli/issues/1707 cmd.SysProcAttr.Setsid = true } ================================================ FILE: vendor/github.com/docker/cli/cli/connhelper/commandconn/session_windows.go ================================================ package commandconn import ( "os/exec" ) func createSession(cmd *exec.Cmd) { } ================================================ FILE: vendor/github.com/docker/cli/cli/connhelper/connhelper.go ================================================ // Package connhelper provides helpers for connecting to a remote daemon host with custom logic. package connhelper import ( "context" "net" "net/url" "strings" "github.com/docker/cli/cli/connhelper/commandconn" "github.com/docker/cli/cli/connhelper/ssh" "github.com/pkg/errors" ) // ConnectionHelper allows to connect to a remote host with custom stream provider binary. type ConnectionHelper struct { Dialer func(ctx context.Context, network, addr string) (net.Conn, error) Host string // dummy URL used for HTTP requests. e.g. "http://docker" } // GetConnectionHelper returns Docker-specific connection helper for the given URL. // GetConnectionHelper returns nil without error when no helper is registered for the scheme. // // ssh://@ URL requires Docker 18.09 or later on the remote host. func GetConnectionHelper(daemonURL string) (*ConnectionHelper, error) { return getConnectionHelper(daemonURL, nil) } // GetConnectionHelperWithSSHOpts returns Docker-specific connection helper for // the given URL, and accepts additional options for ssh connections. It returns // nil without error when no helper is registered for the scheme. // // Requires Docker 18.09 or later on the remote host. func GetConnectionHelperWithSSHOpts(daemonURL string, sshFlags []string) (*ConnectionHelper, error) { return getConnectionHelper(daemonURL, sshFlags) } func getConnectionHelper(daemonURL string, sshFlags []string) (*ConnectionHelper, error) { u, err := url.Parse(daemonURL) if err != nil { return nil, err } if u.Scheme == "ssh" { sp, err := ssh.ParseURL(daemonURL) if err != nil { return nil, errors.Wrap(err, "ssh host connection is not valid") } return &ConnectionHelper{ Dialer: func(ctx context.Context, network, addr string) (net.Conn, error) { args := []string{"docker"} if sp.Path != "" { args = append(args, "--host", "unix://"+sp.Path) } sshFlags = addSSHTimeout(sshFlags) args = append(args, "system", "dial-stdio") return commandconn.New(ctx, "ssh", append(sshFlags, sp.Args(args...)...)...) }, Host: "http://docker.example.com", }, nil } // Future version may support plugins via ~/.docker/config.json. e.g. "dind" // See docker/cli#889 for the previous discussion. return nil, err } // GetCommandConnectionHelper returns Docker-specific connection helper constructed from an arbitrary command. func GetCommandConnectionHelper(cmd string, flags ...string) (*ConnectionHelper, error) { return &ConnectionHelper{ Dialer: func(ctx context.Context, network, addr string) (net.Conn, error) { return commandconn.New(ctx, cmd, flags...) }, Host: "http://docker.example.com", }, nil } func addSSHTimeout(sshFlags []string) []string { if !strings.Contains(strings.Join(sshFlags, ""), "ConnectTimeout") { sshFlags = append(sshFlags, "-o ConnectTimeout=30") } return sshFlags } ================================================ FILE: vendor/github.com/docker/cli/cli/connhelper/ssh/ssh.go ================================================ // Package ssh provides the connection helper for ssh:// URL. package ssh import ( "net/url" "github.com/pkg/errors" ) // ParseURL parses URL func ParseURL(daemonURL string) (*Spec, error) { u, err := url.Parse(daemonURL) if err != nil { return nil, err } if u.Scheme != "ssh" { return nil, errors.Errorf("expected scheme ssh, got %q", u.Scheme) } var sp Spec if u.User != nil { sp.User = u.User.Username() if _, ok := u.User.Password(); ok { return nil, errors.New("plain-text password is not supported") } } sp.Host = u.Hostname() if sp.Host == "" { return nil, errors.Errorf("no host specified") } sp.Port = u.Port() sp.Path = u.Path if u.RawQuery != "" { return nil, errors.Errorf("extra query after the host: %q", u.RawQuery) } if u.Fragment != "" { return nil, errors.Errorf("extra fragment after the host: %q", u.Fragment) } return &sp, err } // Spec of SSH URL type Spec struct { User string Host string Port string Path string } // Args returns args except "ssh" itself combined with optional additional command args func (sp *Spec) Args(add ...string) []string { var args []string if sp.User != "" { args = append(args, "-l", sp.User) } if sp.Port != "" { args = append(args, "-p", sp.Port) } args = append(args, "--", sp.Host) args = append(args, add...) return args } ================================================ FILE: vendor/github.com/docker/cli/cli/context/docker/constants.go ================================================ package docker const ( // DockerEndpoint is the name of the docker endpoint in a stored context DockerEndpoint = "docker" ) ================================================ FILE: vendor/github.com/docker/cli/cli/context/docker/load.go ================================================ package docker import ( "crypto/tls" "crypto/x509" "encoding/pem" "net" "net/http" "time" "github.com/docker/cli/cli/connhelper" "github.com/docker/cli/cli/context" "github.com/docker/cli/cli/context/store" "github.com/docker/docker/client" "github.com/docker/go-connections/tlsconfig" "github.com/pkg/errors" ) // EndpointMeta is a typed wrapper around a context-store generic endpoint describing // a Docker Engine endpoint, without its tls config type EndpointMeta = context.EndpointMetaBase // Endpoint is a typed wrapper around a context-store generic endpoint describing // a Docker Engine endpoint, with its tls data type Endpoint struct { EndpointMeta TLSData *context.TLSData } // WithTLSData loads TLS materials for the endpoint func WithTLSData(s store.Reader, contextName string, m EndpointMeta) (Endpoint, error) { tlsData, err := context.LoadTLSData(s, contextName, DockerEndpoint) if err != nil { return Endpoint{}, err } return Endpoint{ EndpointMeta: m, TLSData: tlsData, }, nil } // tlsConfig extracts a context docker endpoint TLS config func (ep *Endpoint) tlsConfig() (*tls.Config, error) { if ep.TLSData == nil && !ep.SkipTLSVerify { // there is no specific tls config return nil, nil } var tlsOpts []func(*tls.Config) if ep.TLSData != nil && ep.TLSData.CA != nil { certPool := x509.NewCertPool() if !certPool.AppendCertsFromPEM(ep.TLSData.CA) { return nil, errors.New("failed to retrieve context tls info: ca.pem seems invalid") } tlsOpts = append(tlsOpts, func(cfg *tls.Config) { cfg.RootCAs = certPool }) } if ep.TLSData != nil && ep.TLSData.Key != nil && ep.TLSData.Cert != nil { keyBytes := ep.TLSData.Key pemBlock, _ := pem.Decode(keyBytes) if pemBlock == nil { return nil, errors.New("no valid private key found") } if x509.IsEncryptedPEMBlock(pemBlock) { //nolint:staticcheck // SA1019: x509.IsEncryptedPEMBlock is deprecated, and insecure by design return nil, errors.New("private key is encrypted - support for encrypted private keys has been removed, see https://docs.docker.com/go/deprecated/") } x509cert, err := tls.X509KeyPair(ep.TLSData.Cert, keyBytes) if err != nil { return nil, errors.Wrap(err, "failed to retrieve context tls info") } tlsOpts = append(tlsOpts, func(cfg *tls.Config) { cfg.Certificates = []tls.Certificate{x509cert} }) } if ep.SkipTLSVerify { tlsOpts = append(tlsOpts, func(cfg *tls.Config) { cfg.InsecureSkipVerify = true }) } return tlsconfig.ClientDefault(tlsOpts...), nil } // ClientOpts returns a slice of Client options to configure an API client with this endpoint func (ep *Endpoint) ClientOpts() ([]client.Opt, error) { var result []client.Opt if ep.Host != "" { helper, err := connhelper.GetConnectionHelper(ep.Host) if err != nil { return nil, err } if helper == nil { tlsConfig, err := ep.tlsConfig() if err != nil { return nil, err } result = append(result, withHTTPClient(tlsConfig), client.WithHost(ep.Host), ) } else { result = append(result, client.WithHTTPClient(&http.Client{ // No TLS, and no proxy. Transport: &http.Transport{ DialContext: helper.Dialer, }, }), client.WithHost(helper.Host), client.WithDialContext(helper.Dialer), ) } } result = append(result, client.WithVersionFromEnv(), client.WithAPIVersionNegotiation()) return result, nil } func withHTTPClient(tlsConfig *tls.Config) func(*client.Client) error { return func(c *client.Client) error { if tlsConfig == nil { // Use the default HTTPClient return nil } return client.WithHTTPClient(&http.Client{ Transport: &http.Transport{ TLSClientConfig: tlsConfig, DialContext: (&net.Dialer{ KeepAlive: 30 * time.Second, Timeout: 30 * time.Second, }).DialContext, }, CheckRedirect: client.CheckRedirect, })(c) } } // EndpointFromContext parses a context docker endpoint metadata into a typed EndpointMeta structure func EndpointFromContext(metadata store.Metadata) (EndpointMeta, error) { ep, ok := metadata.Endpoints[DockerEndpoint] if !ok { return EndpointMeta{}, errors.New("cannot find docker endpoint in context") } typed, ok := ep.(EndpointMeta) if !ok { return EndpointMeta{}, errors.Errorf("endpoint %q is not of type EndpointMeta", DockerEndpoint) } return typed, nil } ================================================ FILE: vendor/github.com/docker/cli/cli/context/endpoint.go ================================================ package context // EndpointMetaBase contains fields we expect to be common for most context endpoints type EndpointMetaBase struct { Host string `json:",omitempty"` SkipTLSVerify bool } ================================================ FILE: vendor/github.com/docker/cli/cli/context/store/doc.go ================================================ // Package store provides a generic way to store credentials to connect to // virtually any kind of remote system. // The term `context` comes from the similar feature in Kubernetes kubectl // config files. // // Conceptually, a context is a set of metadata and TLS data, that can be used // to connect to various endpoints of a remote system. TLS data and metadata // are stored separately, so that in the future, we will be able to store // sensitive information in a more secure way, depending on the os we are running // on (e.g.: on Windows we could use the user Certificate Store, on macOS the // user Keychain...). // // Current implementation is purely file based with the following structure: // // ${CONTEXT_ROOT} // meta/ // /meta.json: contains context medata (key/value pairs) as // well as a list of endpoints (themselves containing // key/value pair metadata). // tls/ // /endpoint1/: directory containing TLS data for the endpoint1 // in the corresponding context. // // The context store itself has absolutely no knowledge about what a docker // endpoint should contain in term of metadata or TLS config. Client code is // responsible for generating and parsing endpoint metadata and TLS files. The // multi-endpoints approach of this package allows to combine many different // endpoints in the same "context". // // Context IDs are actually SHA256 hashes of the context name, and are there // only to avoid dealing with special characters in context names. package store ================================================ FILE: vendor/github.com/docker/cli/cli/context/store/io_utils.go ================================================ package store import ( "errors" "io" ) // LimitedReader is a fork of io.LimitedReader to override Read. type LimitedReader struct { R io.Reader N int64 // max bytes remaining } // Read is a fork of io.LimitedReader.Read that returns an error when limit exceeded. func (l *LimitedReader) Read(p []byte) (n int, err error) { if l.N < 0 { return 0, errors.New("read exceeds the defined limit") } if l.N == 0 { return 0, io.EOF } // have to cap N + 1 otherwise we won't hit limit err if int64(len(p)) > l.N+1 { p = p[0 : l.N+1] } n, err = l.R.Read(p) l.N -= int64(n) return n, err } ================================================ FILE: vendor/github.com/docker/cli/cli/context/store/metadatastore.go ================================================ // FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16: //go:build go1.21 package store import ( "encoding/json" "fmt" "os" "path/filepath" "reflect" "sort" "github.com/docker/docker/errdefs" "github.com/docker/docker/pkg/ioutils" "github.com/fvbommel/sortorder" "github.com/pkg/errors" ) const ( metadataDir = "meta" metaFile = "meta.json" ) type metadataStore struct { root string config Config } func (s *metadataStore) contextDir(id contextdir) string { return filepath.Join(s.root, string(id)) } func (s *metadataStore) createOrUpdate(meta Metadata) error { contextDir := s.contextDir(contextdirOf(meta.Name)) if err := os.MkdirAll(contextDir, 0o755); err != nil { return err } bytes, err := json.Marshal(&meta) if err != nil { return err } return ioutils.AtomicWriteFile(filepath.Join(contextDir, metaFile), bytes, 0o644) } func parseTypedOrMap(payload []byte, getter TypeGetter) (any, error) { if len(payload) == 0 || string(payload) == "null" { return nil, nil } if getter == nil { var res map[string]any if err := json.Unmarshal(payload, &res); err != nil { return nil, err } return res, nil } typed := getter() if err := json.Unmarshal(payload, typed); err != nil { return nil, err } return reflect.ValueOf(typed).Elem().Interface(), nil } func (s *metadataStore) get(name string) (Metadata, error) { m, err := s.getByID(contextdirOf(name)) if err != nil { return m, errors.Wrapf(err, "context %q", name) } return m, nil } func (s *metadataStore) getByID(id contextdir) (Metadata, error) { fileName := filepath.Join(s.contextDir(id), metaFile) bytes, err := os.ReadFile(fileName) if err != nil { if errors.Is(err, os.ErrNotExist) { return Metadata{}, errdefs.NotFound(errors.Wrap(err, "context not found")) } return Metadata{}, err } var untyped untypedContextMetadata r := Metadata{ Endpoints: make(map[string]any), } if err := json.Unmarshal(bytes, &untyped); err != nil { return Metadata{}, fmt.Errorf("parsing %s: %v", fileName, err) } r.Name = untyped.Name if r.Metadata, err = parseTypedOrMap(untyped.Metadata, s.config.contextType); err != nil { return Metadata{}, fmt.Errorf("parsing %s: %v", fileName, err) } for k, v := range untyped.Endpoints { if r.Endpoints[k], err = parseTypedOrMap(v, s.config.endpointTypes[k]); err != nil { return Metadata{}, fmt.Errorf("parsing %s: %v", fileName, err) } } return r, err } func (s *metadataStore) remove(name string) error { if err := os.RemoveAll(s.contextDir(contextdirOf(name))); err != nil { return errors.Wrapf(err, "failed to remove metadata") } return nil } func (s *metadataStore) list() ([]Metadata, error) { ctxDirs, err := listRecursivelyMetadataDirs(s.root) if err != nil { if errors.Is(err, os.ErrNotExist) { return nil, nil } return nil, err } res := make([]Metadata, 0, len(ctxDirs)) for _, dir := range ctxDirs { c, err := s.getByID(contextdir(dir)) if err != nil { if errors.Is(err, os.ErrNotExist) { continue } return nil, errors.Wrap(err, "failed to read metadata") } res = append(res, c) } sort.Slice(res, func(i, j int) bool { return sortorder.NaturalLess(res[i].Name, res[j].Name) }) return res, nil } func isContextDir(path string) bool { s, err := os.Stat(filepath.Join(path, metaFile)) if err != nil { return false } return !s.IsDir() } func listRecursivelyMetadataDirs(root string) ([]string, error) { fis, err := os.ReadDir(root) if err != nil { return nil, err } var result []string for _, fi := range fis { if fi.IsDir() { if isContextDir(filepath.Join(root, fi.Name())) { result = append(result, fi.Name()) } subs, err := listRecursivelyMetadataDirs(filepath.Join(root, fi.Name())) if err != nil { return nil, err } for _, s := range subs { result = append(result, filepath.Join(fi.Name(), s)) } } } return result, nil } type untypedContextMetadata struct { Metadata json.RawMessage `json:"metadata,omitempty"` Endpoints map[string]json.RawMessage `json:"endpoints,omitempty"` Name string `json:"name,omitempty"` } ================================================ FILE: vendor/github.com/docker/cli/cli/context/store/store.go ================================================ // FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16: //go:build go1.21 package store import ( "archive/tar" "archive/zip" "bufio" "bytes" _ "crypto/sha256" // ensure ids can be computed "encoding/json" "io" "net/http" "path" "path/filepath" "regexp" "strings" "github.com/docker/docker/errdefs" "github.com/opencontainers/go-digest" "github.com/pkg/errors" ) const restrictedNamePattern = "^[a-zA-Z0-9][a-zA-Z0-9_.+-]+$" var restrictedNameRegEx = regexp.MustCompile(restrictedNamePattern) // Store provides a context store for easily remembering endpoints configuration type Store interface { Reader Lister Writer StorageInfoProvider } // Reader provides read-only (without list) access to context data type Reader interface { GetMetadata(name string) (Metadata, error) ListTLSFiles(name string) (map[string]EndpointFiles, error) GetTLSData(contextName, endpointName, fileName string) ([]byte, error) } // Lister provides listing of contexts type Lister interface { List() ([]Metadata, error) } // ReaderLister combines Reader and Lister interfaces type ReaderLister interface { Reader Lister } // StorageInfoProvider provides more information about storage details of contexts type StorageInfoProvider interface { GetStorageInfo(contextName string) StorageInfo } // Writer provides write access to context data type Writer interface { CreateOrUpdate(meta Metadata) error Remove(name string) error ResetTLSMaterial(name string, data *ContextTLSData) error ResetEndpointTLSMaterial(contextName string, endpointName string, data *EndpointTLSData) error } // ReaderWriter combines Reader and Writer interfaces type ReaderWriter interface { Reader Writer } // Metadata contains metadata about a context and its endpoints type Metadata struct { Name string `json:",omitempty"` Metadata any `json:",omitempty"` Endpoints map[string]any `json:",omitempty"` } // StorageInfo contains data about where a given context is stored type StorageInfo struct { MetadataPath string TLSPath string } // EndpointTLSData represents tls data for a given endpoint type EndpointTLSData struct { Files map[string][]byte } // ContextTLSData represents tls data for a whole context type ContextTLSData struct { Endpoints map[string]EndpointTLSData } // New creates a store from a given directory. // If the directory does not exist or is empty, initialize it func New(dir string, cfg Config) *ContextStore { metaRoot := filepath.Join(dir, metadataDir) tlsRoot := filepath.Join(dir, tlsDir) return &ContextStore{ meta: &metadataStore{ root: metaRoot, config: cfg, }, tls: &tlsStore{ root: tlsRoot, }, } } // ContextStore implements Store. type ContextStore struct { meta *metadataStore tls *tlsStore } // List return all contexts. func (s *ContextStore) List() ([]Metadata, error) { return s.meta.list() } // Names return Metadata names for a Lister func Names(s Lister) ([]string, error) { if s == nil { return nil, errors.New("nil lister") } list, err := s.List() if err != nil { return nil, err } names := make([]string, 0, len(list)) for _, item := range list { names = append(names, item.Name) } return names, nil } // CreateOrUpdate creates or updates metadata for the context. func (s *ContextStore) CreateOrUpdate(meta Metadata) error { return s.meta.createOrUpdate(meta) } // Remove deletes the context with the given name, if found. func (s *ContextStore) Remove(name string) error { if err := s.meta.remove(name); err != nil { return errors.Wrapf(err, "failed to remove context %s", name) } if err := s.tls.remove(name); err != nil { return errors.Wrapf(err, "failed to remove context %s", name) } return nil } // GetMetadata returns the metadata for the context with the given name. // It returns an errdefs.ErrNotFound if the context was not found. func (s *ContextStore) GetMetadata(name string) (Metadata, error) { return s.meta.get(name) } // ResetTLSMaterial removes TLS data for all endpoints in the context and replaces // it with the new data. func (s *ContextStore) ResetTLSMaterial(name string, data *ContextTLSData) error { if err := s.tls.remove(name); err != nil { return err } if data == nil { return nil } for ep, files := range data.Endpoints { for fileName, data := range files.Files { if err := s.tls.createOrUpdate(name, ep, fileName, data); err != nil { return err } } } return nil } // ResetEndpointTLSMaterial removes TLS data for the given context and endpoint, // and replaces it with the new data. func (s *ContextStore) ResetEndpointTLSMaterial(contextName string, endpointName string, data *EndpointTLSData) error { if err := s.tls.removeEndpoint(contextName, endpointName); err != nil { return err } if data == nil { return nil } for fileName, data := range data.Files { if err := s.tls.createOrUpdate(contextName, endpointName, fileName, data); err != nil { return err } } return nil } // ListTLSFiles returns the list of TLS files present for each endpoint in the // context. func (s *ContextStore) ListTLSFiles(name string) (map[string]EndpointFiles, error) { return s.tls.listContextData(name) } // GetTLSData reads, and returns the content of the given fileName for an endpoint. // It returns an errdefs.ErrNotFound if the file was not found. func (s *ContextStore) GetTLSData(contextName, endpointName, fileName string) ([]byte, error) { return s.tls.getData(contextName, endpointName, fileName) } // GetStorageInfo returns the paths where the Metadata and TLS data are stored // for the context. func (s *ContextStore) GetStorageInfo(contextName string) StorageInfo { return StorageInfo{ MetadataPath: s.meta.contextDir(contextdirOf(contextName)), TLSPath: s.tls.contextDir(contextName), } } // ValidateContextName checks a context name is valid. func ValidateContextName(name string) error { if name == "" { return errors.New("context name cannot be empty") } if name == "default" { return errors.New(`"default" is a reserved context name`) } if !restrictedNameRegEx.MatchString(name) { return errors.Errorf("context name %q is invalid, names are validated against regexp %q", name, restrictedNamePattern) } return nil } // Export exports an existing namespace into an opaque data stream // This stream is actually a tarball containing context metadata and TLS materials, but it does // not map 1:1 the layout of the context store (don't try to restore it manually without calling store.Import) func Export(name string, s Reader) io.ReadCloser { reader, writer := io.Pipe() go func() { tw := tar.NewWriter(writer) defer tw.Close() defer writer.Close() meta, err := s.GetMetadata(name) if err != nil { writer.CloseWithError(err) return } metaBytes, err := json.Marshal(&meta) if err != nil { writer.CloseWithError(err) return } if err = tw.WriteHeader(&tar.Header{ Name: metaFile, Mode: 0o644, Size: int64(len(metaBytes)), }); err != nil { writer.CloseWithError(err) return } if _, err = tw.Write(metaBytes); err != nil { writer.CloseWithError(err) return } tlsFiles, err := s.ListTLSFiles(name) if err != nil { writer.CloseWithError(err) return } if err = tw.WriteHeader(&tar.Header{ Name: "tls", Mode: 0o700, Size: 0, Typeflag: tar.TypeDir, }); err != nil { writer.CloseWithError(err) return } for endpointName, endpointFiles := range tlsFiles { if err = tw.WriteHeader(&tar.Header{ Name: path.Join("tls", endpointName), Mode: 0o700, Size: 0, Typeflag: tar.TypeDir, }); err != nil { writer.CloseWithError(err) return } for _, fileName := range endpointFiles { data, err := s.GetTLSData(name, endpointName, fileName) if err != nil { writer.CloseWithError(err) return } if err = tw.WriteHeader(&tar.Header{ Name: path.Join("tls", endpointName, fileName), Mode: 0o600, Size: int64(len(data)), }); err != nil { writer.CloseWithError(err) return } if _, err = tw.Write(data); err != nil { writer.CloseWithError(err) return } } } }() return reader } const ( maxAllowedFileSizeToImport int64 = 10 << 20 zipType string = "application/zip" ) func getImportContentType(r *bufio.Reader) (string, error) { head, err := r.Peek(512) if err != nil && err != io.EOF { return "", err } return http.DetectContentType(head), nil } // Import imports an exported context into a store func Import(name string, s Writer, reader io.Reader) error { // Buffered reader will not advance the buffer, needed to determine content type r := bufio.NewReader(reader) importContentType, err := getImportContentType(r) if err != nil { return err } switch importContentType { case zipType: return importZip(name, s, r) default: // Assume it's a TAR (TAR does not have a "magic number") return importTar(name, s, r) } } func isValidFilePath(p string) error { if p != metaFile && !strings.HasPrefix(p, "tls/") { return errors.New("unexpected context file") } if path.Clean(p) != p { return errors.New("unexpected path format") } if strings.Contains(p, `\`) { return errors.New(`unexpected '\' in path`) } return nil } func importTar(name string, s Writer, reader io.Reader) error { tr := tar.NewReader(&LimitedReader{R: reader, N: maxAllowedFileSizeToImport}) tlsData := ContextTLSData{ Endpoints: map[string]EndpointTLSData{}, } var importedMetaFile bool for { hdr, err := tr.Next() if err == io.EOF { break } if err != nil { return err } if hdr.Typeflag != tar.TypeReg { // skip this entry, only taking files into account continue } if err := isValidFilePath(hdr.Name); err != nil { return errors.Wrap(err, hdr.Name) } if hdr.Name == metaFile { data, err := io.ReadAll(tr) if err != nil { return err } meta, err := parseMetadata(data, name) if err != nil { return err } if err := s.CreateOrUpdate(meta); err != nil { return err } importedMetaFile = true } else if strings.HasPrefix(hdr.Name, "tls/") { data, err := io.ReadAll(tr) if err != nil { return err } if err := importEndpointTLS(&tlsData, hdr.Name, data); err != nil { return err } } } if !importedMetaFile { return errdefs.InvalidParameter(errors.New("invalid context: no metadata found")) } return s.ResetTLSMaterial(name, &tlsData) } func importZip(name string, s Writer, reader io.Reader) error { body, err := io.ReadAll(&LimitedReader{R: reader, N: maxAllowedFileSizeToImport}) if err != nil { return err } zr, err := zip.NewReader(bytes.NewReader(body), int64(len(body))) if err != nil { return err } tlsData := ContextTLSData{ Endpoints: map[string]EndpointTLSData{}, } var importedMetaFile bool for _, zf := range zr.File { fi := zf.FileInfo() if !fi.Mode().IsRegular() { // skip this entry, only taking regular files into account continue } if err := isValidFilePath(zf.Name); err != nil { return errors.Wrap(err, zf.Name) } if zf.Name == metaFile { f, err := zf.Open() if err != nil { return err } data, err := io.ReadAll(&LimitedReader{R: f, N: maxAllowedFileSizeToImport}) defer f.Close() if err != nil { return err } meta, err := parseMetadata(data, name) if err != nil { return err } if err := s.CreateOrUpdate(meta); err != nil { return err } importedMetaFile = true } else if strings.HasPrefix(zf.Name, "tls/") { f, err := zf.Open() if err != nil { return err } data, err := io.ReadAll(f) defer f.Close() if err != nil { return err } err = importEndpointTLS(&tlsData, zf.Name, data) if err != nil { return err } } } if !importedMetaFile { return errdefs.InvalidParameter(errors.New("invalid context: no metadata found")) } return s.ResetTLSMaterial(name, &tlsData) } func parseMetadata(data []byte, name string) (Metadata, error) { var meta Metadata if err := json.Unmarshal(data, &meta); err != nil { return meta, err } if err := ValidateContextName(name); err != nil { return Metadata{}, err } meta.Name = name return meta, nil } func importEndpointTLS(tlsData *ContextTLSData, tlsPath string, data []byte) error { parts := strings.SplitN(strings.TrimPrefix(tlsPath, "tls/"), "/", 2) if len(parts) != 2 { // TLS endpoints require archived file directory with 2 layers // i.e. tls/{endpointName}/{fileName} return errors.New("archive format is invalid") } epName := parts[0] fileName := parts[1] if _, ok := tlsData.Endpoints[epName]; !ok { tlsData.Endpoints[epName] = EndpointTLSData{ Files: map[string][]byte{}, } } tlsData.Endpoints[epName].Files[fileName] = data return nil } type contextdir string func contextdirOf(name string) contextdir { return contextdir(digest.FromString(name).Encoded()) } ================================================ FILE: vendor/github.com/docker/cli/cli/context/store/storeconfig.go ================================================ // FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16: //go:build go1.21 package store // TypeGetter is a func used to determine the concrete type of a context or // endpoint metadata by returning a pointer to an instance of the object // eg: for a context of type DockerContext, the corresponding TypeGetter should return new(DockerContext) type TypeGetter func() any // NamedTypeGetter is a TypeGetter associated with a name type NamedTypeGetter struct { name string typeGetter TypeGetter } // EndpointTypeGetter returns a NamedTypeGetter with the specified name and getter func EndpointTypeGetter(name string, getter TypeGetter) NamedTypeGetter { return NamedTypeGetter{ name: name, typeGetter: getter, } } // Config is used to configure the metadata marshaler of the context ContextStore type Config struct { contextType TypeGetter endpointTypes map[string]TypeGetter } // SetEndpoint set an endpoint typing information func (c Config) SetEndpoint(name string, getter TypeGetter) { c.endpointTypes[name] = getter } // ForeachEndpointType calls cb on every endpoint type registered with the Config func (c Config) ForeachEndpointType(cb func(string, TypeGetter) error) error { for n, ep := range c.endpointTypes { if err := cb(n, ep); err != nil { return err } } return nil } // NewConfig creates a config object func NewConfig(contextType TypeGetter, endpoints ...NamedTypeGetter) Config { res := Config{ contextType: contextType, endpointTypes: make(map[string]TypeGetter), } for _, e := range endpoints { res.endpointTypes[e.name] = e.typeGetter } return res } ================================================ FILE: vendor/github.com/docker/cli/cli/context/store/tlsstore.go ================================================ package store import ( "os" "path/filepath" "github.com/docker/docker/errdefs" "github.com/docker/docker/pkg/ioutils" "github.com/pkg/errors" ) const tlsDir = "tls" type tlsStore struct { root string } func (s *tlsStore) contextDir(name string) string { return filepath.Join(s.root, string(contextdirOf(name))) } func (s *tlsStore) endpointDir(name, endpointName string) string { return filepath.Join(s.contextDir(name), endpointName) } func (s *tlsStore) createOrUpdate(name, endpointName, filename string, data []byte) error { parentOfRoot := filepath.Dir(s.root) if err := os.MkdirAll(parentOfRoot, 0o755); err != nil { return err } endpointDir := s.endpointDir(name, endpointName) if err := os.MkdirAll(endpointDir, 0o700); err != nil { return err } return ioutils.AtomicWriteFile(filepath.Join(endpointDir, filename), data, 0o600) } func (s *tlsStore) getData(name, endpointName, filename string) ([]byte, error) { data, err := os.ReadFile(filepath.Join(s.endpointDir(name, endpointName), filename)) if err != nil { if os.IsNotExist(err) { return nil, errdefs.NotFound(errors.Errorf("TLS data for %s/%s/%s does not exist", name, endpointName, filename)) } return nil, errors.Wrapf(err, "failed to read TLS data for endpoint %s", endpointName) } return data, nil } // remove deletes all TLS data for the given context. func (s *tlsStore) remove(name string) error { if err := os.RemoveAll(s.contextDir(name)); err != nil { return errors.Wrapf(err, "failed to remove TLS data") } return nil } func (s *tlsStore) removeEndpoint(name, endpointName string) error { if err := os.RemoveAll(s.endpointDir(name, endpointName)); err != nil { return errors.Wrapf(err, "failed to remove TLS data for endpoint %s", endpointName) } return nil } func (s *tlsStore) listContextData(name string) (map[string]EndpointFiles, error) { contextDir := s.contextDir(name) epFSs, err := os.ReadDir(contextDir) if err != nil { if os.IsNotExist(err) { return map[string]EndpointFiles{}, nil } return nil, errors.Wrapf(err, "failed to list TLS files for context %s", name) } r := make(map[string]EndpointFiles) for _, epFS := range epFSs { if epFS.IsDir() { fss, err := os.ReadDir(filepath.Join(contextDir, epFS.Name())) if os.IsNotExist(err) { continue } if err != nil { return nil, errors.Wrapf(err, "failed to list TLS files for endpoint %s", epFS.Name()) } var files EndpointFiles for _, fs := range fss { if !fs.IsDir() { files = append(files, fs.Name()) } } r[epFS.Name()] = files } } return r, nil } // EndpointFiles is a slice of strings representing file names type EndpointFiles []string ================================================ FILE: vendor/github.com/docker/cli/cli/context/tlsdata.go ================================================ package context import ( "os" "github.com/docker/cli/cli/context/store" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) const ( caKey = "ca.pem" certKey = "cert.pem" keyKey = "key.pem" ) // TLSData holds ca/cert/key raw data type TLSData struct { CA []byte Key []byte Cert []byte } // ToStoreTLSData converts TLSData to the store representation func (data *TLSData) ToStoreTLSData() *store.EndpointTLSData { if data == nil { return nil } result := store.EndpointTLSData{ Files: make(map[string][]byte), } if data.CA != nil { result.Files[caKey] = data.CA } if data.Cert != nil { result.Files[certKey] = data.Cert } if data.Key != nil { result.Files[keyKey] = data.Key } return &result } // LoadTLSData loads TLS data from the store func LoadTLSData(s store.Reader, contextName, endpointName string) (*TLSData, error) { tlsFiles, err := s.ListTLSFiles(contextName) if err != nil { return nil, errors.Wrapf(err, "failed to retrieve TLS files for context %q", contextName) } if epTLSFiles, ok := tlsFiles[endpointName]; ok { var tlsData TLSData for _, f := range epTLSFiles { data, err := s.GetTLSData(contextName, endpointName, f) if err != nil { return nil, errors.Wrapf(err, "failed to retrieve TLS data (%s) for context %q", f, contextName) } switch f { case caKey: tlsData.CA = data case certKey: tlsData.Cert = data case keyKey: tlsData.Key = data default: logrus.Warnf("unknown file in context %s TLS bundle: %s", contextName, f) } } return &tlsData, nil } return nil, nil } // TLSDataFromFiles reads files into a TLSData struct (or returns nil if all paths are empty) func TLSDataFromFiles(caPath, certPath, keyPath string) (*TLSData, error) { var ( ca, cert, key []byte err error ) if caPath != "" { if ca, err = os.ReadFile(caPath); err != nil { return nil, err } } if certPath != "" { if cert, err = os.ReadFile(certPath); err != nil { return nil, err } } if keyPath != "" { if key, err = os.ReadFile(keyPath); err != nil { return nil, err } } if ca == nil && cert == nil && key == nil { return nil, nil } return &TLSData{CA: ca, Cert: cert, Key: key}, nil } ================================================ FILE: vendor/github.com/docker/docker/AUTHORS ================================================ # File @generated by hack/generate-authors.sh. DO NOT EDIT. # This file lists all contributors to the repository. # See hack/generate-authors.sh to make modifications. 17neverends 7sunarni <710720732@qq.com> Aanand Prasad Aarni Koskela Aaron Davidson Aaron Feng Aaron Hnatiw Aaron Huslage Aaron L. Xu Aaron Lehmann Aaron Welch Aaron Yoshitake Abdur Rehman Abel Muiño Abhijeet Kasurde Abhinandan Prativadi Abhinav Ajgaonkar Abhishek Chanda Abhishek Sharma Abin Shahab Abirdcfly Ada Mancini Adam Avilla Adam Dobrawy Adam Eijdenberg Adam Kunk Adam Lamers Adam Miller Adam Mills Adam Pointer Adam Simon Adam Singer Adam Thornton Adam Walz Adam Williams AdamKorcz Addam Hardy Aditi Rajagopal Aditya Adnan Khan Adolfo Ochagavía Adria Casas Adrian Moisey Adrian Mouat Adrian Oprea Adrien Folie Adrien Gallouët Ahmed Kamal Ahmet Alp Balkan Aidan Feldman Aidan Hobson Sayers AJ Bowen Ajey Charantimath ajneu Akash Gupta Akhil Mohan Akihiro Matsushima Akihiro Suda Akim Demaille Akira Koyasu Akshay Karle Akshay Moghe Al Tobey alambike Alan Hoyle Alan Scherger Alan Thompson Alano Terblanche Albert Callarisa Albert Zhang Albin Kerouanton Alec Benson Alejandro González Hevia Aleksa Sarai Aleksandr Chebotov Aleksandrs Fadins Alena Prokharchyk Alessandro Boch Alessio Biancalana Alex Chan Alex Chen Alex Coventry Alex Crawford Alex Ellis Alex Gaynor Alex Goodman Alex Nordlund Alex Olshansky Alex Samorukov Alex Stockinger Alex Warhawk Alexander Artemenko Alexander Boyd Alexander Larsson Alexander Midlash Alexander Morozov Alexander Polakov Alexander Shopov Alexandre Beslic Alexandre Garnier Alexandre González Alexandre Jomin Alexandru Sfirlogea Alexei Margasov Alexey Guskov Alexey Kotlyarov Alexey Shamrin Alexis Ries Alexis Thomas Alfred Landrum Ali Dehghani Alicia Lauerman Alihan Demir Allen Madsen Allen Sun almoehi Alvaro Saurin Alvin Deng Alvin Richards amangoel Amen Belayneh Ameya Gawde Amir Goldstein AmirBuddy Amit Bakshi Amit Krishnan Amit Shukla Amr Gawish Amy Lindburg Anand Patil AnandkumarPatel Anatoly Borodin Anca Iordache Anchal Agrawal Anda Xu Anders Janmyr Andre Dublin <81dublin@gmail.com> Andre Granovsky Andrea Denisse Gómez Andrea Luzzardi Andrea Turli Andreas Elvers Andreas Köhler Andreas Savvides Andreas Tiefenthaler Andrei Gherzan Andrei Ushakov Andrei Vagin Andrew Baxter <423qpsxzhh8k3h@s.rendaw.me> Andrew C. Bodine Andrew Clay Shafer Andrew Duckworth Andrew France Andrew Gerrand Andrew Guenther Andrew He Andrew Hsu Andrew Kim Andrew Kuklewicz Andrew Macgregor Andrew Macpherson Andrew Martin Andrew McDonnell Andrew Munsell Andrew Pennebaker Andrew Po Andrew Weiss Andrew Williams Andrews Medina Andrey Kolomentsev Andrey Petrov Andrey Stolbovsky André Martins Andrés Maldonado Andy Chambers andy diller Andy Goldstein Andy Kipp Andy Lindeman Andy Rothfusz Andy Smith Andy Wilson Andy Zhang Aneesh Kulkarni Anes Hasicic Angel Velazquez Anil Belur Anil Madhavapeddy Anirudh Aithal Ankit Jain Ankush Agarwal Anonmily Anran Qiao Anshul Pundir Anthon van der Neut Anthony Baire Anthony Bishopric Anthony Dahanne Anthony Sottile Anton Löfgren Anton Nikitin Anton Polonskiy Anton Tiurin Antonio Aguilar Antonio Murdaca Antonis Kalipetis Antony Messerli Anuj Bahuguna Anuj Varma Anusha Ragunathan Anyu Wang apocas Arash Deshmeh arcosx ArikaChen Arko Dasgupta Arnaud Lefebvre Arnaud Porterie Arnaud Rebillout Artem Khramov Arthur Barr Arthur Gautier Artur Meyster Arun Gupta Asad Saeeduddin Asbjørn Enge Ashly Mathew Austin Vazquez averagehuman Avi Das Avi Kivity Avi Miller Avi Vaid Azat Khuyiyakhmetov Bao Yonglei Bardia Keyoumarsi Barnaby Gray Barry Allard Bartłomiej Piotrowski Bastiaan Bakker Bastien Pascard bdevloed Bearice Ren Ben Bonnefoy Ben Firshman Ben Golub Ben Gould Ben Hall Ben Langfeld Ben Lovy Ben Sargent Ben Severson Ben Toews Ben Wiklund Benjamin Atkin Benjamin Baker Benjamin Boudreau Benjamin Böhmke Benjamin Wang Benjamin Yolken Benny Ng Benoit Chesneau Bernerd Schaefer Bernhard M. Wiedemann Bert Goethals Bertrand Roussel Bevisy Zhang Bharath Thiruveedula Bhiraj Butala Bhumika Bayani Bilal Amarni Bill Wang Billy Ridgway Bily Zhang Bin Liu Bingshen Wang Bjorn Neergaard Blake Geno Boaz Shuster bobby abbott Bojun Zhu Boqin Qin Boris Pruessmann Boshi Lian Bouke Haarsma Boyd Hemphill boynux Bradley Cicenas Bradley Wright Brandon Liu Brandon Philips Brandon Rhodes Brendan Dixon Brendon Smith Brennan Kinney <5098581+polarathene@users.noreply.github.com> Brent Salisbury Brett Higgins Brett Kochendorfer Brett Milford Brett Randall Brian (bex) Exelbierd Brian Bland Brian DeHamer Brian Dorsey Brian Flad Brian Goff Brian McCallister Brian Olsen Brian Schwind Brian Shumate Brian Torres-Gil Brian Trump Brice Jaglin Briehan Lombaard Brielle Broder Bruno Bigras Bruno Binet Bruno Gazzera Bruno Renié Bruno Tavares Bryan Bess Bryan Boreham Bryan Matsuo Bryan Murphy Burke Libbey Byung Kang Caleb Spare Calen Pennington Calvin Liu Cameron Boehmer Cameron Sparr Cameron Spear Campbell Allen Candid Dauth Cao Weiwei Carl Henrik Lunde Carl Loa Odin Carl X. Su Carlo Mion Carlos Alexandro Becker Carlos de Paula Carlos Sanchez Carol Fager-Higgins Cary Casey Bisson Catalin Pirvu Ce Gao Cedric Davies Cesar Talledo Cezar Sa Espinola Chad Swenson Chance Zibolski Chander Govindarajan Chanhun Jeong Chao Wang Charity Kathure Charles Chan Charles Hooper Charles Law Charles Lindsay Charles Merriam Charles Sarrazin Charles Smith Charlie Drage Charlie Lewis Chase Bolt ChaYoung You Chee Hau Lim Chen Chao Chen Chuanliang Chen Hanxiao Chen Min Chen Mingjie Chen Qiu Cheng-mean Liu Chengfei Shang Chengguang Xu Chengyu Zhu Chentianze Chenyang Yan chenyuzhu Chetan Birajdar Chewey Chia-liang Kao Chiranjeevi Tirunagari chli Cholerae Hu Chris Alfonso Chris Armstrong Chris Dias Chris Dituri Chris Fordham Chris Gavin Chris Gibson Chris Khoo Chris Kreussling (Flatbush Gardener) Chris McKinnel Chris McKinnel Chris Price Chris Seto Chris Snow Chris St. Pierre Chris Stivers Chris Swan Chris Telfer Chris Wahl Chris Weyl Chris White Christian Becker Christian Berendt Christian Brauner Christian Böhme Christian Muehlhaeuser Christian Persson Christian Rotzoll Christian Simon Christian Stefanescu Christoph Ziebuhr Christophe Mehay Christophe Troestler Christophe Vidal Christopher Biscardi Christopher Crone Christopher Currie Christopher Jones Christopher Latham Christopher Petito Christopher Rigor Christy Norman Chun Chen Ciro S. Costa Clayton Coleman Clint Armstrong Clinton Kitson clubby789 Cody Roseborough Coenraad Loubser Colin Dunklau Colin Hebert Colin Panisset Colin Rice Colin Walters Collin Guarino Colm Hally companycy Conor Evans Corbin Coleman Corey Farrell Cory Forsyth Cory Snider cressie176 Cristian Ariza Cristian Staretu cristiano balducci Cristina Yenyxe Gonzalez Garcia Cruceru Calin-Cristian cui fliter CUI Wei Cuong Manh Le Cyprian Gracz Cyril F Da McGrady Daan van Berkel Daehyeok Mun Dafydd Crosby dalanlan Damian Smyth Damien Nadé Damien Nozay Damjan Georgievski Dan Anolik Dan Buch Dan Cotora Dan Feldman Dan Griffin Dan Hirsch Dan Keder Dan Levy Dan McPherson Dan Plamadeala Dan Stine Dan Williams Dani Hodovic Dani Louca Daniel Antlinger Daniel Black Daniel Dao Daniel Exner Daniel Farrell Daniel Garcia Daniel Gasienica Daniel Grunwell Daniel Guns Daniel Helfand Daniel Hiltgen Daniel J Walsh Daniel Menet Daniel Mizyrycki Daniel Nephin Daniel Norberg Daniel Nordberg Daniel P. Berrangé Daniel Robinson Daniel S Daniel Sweet Daniel Von Fange Daniel Watkins Daniel X Moore Daniel YC Lin Daniel Zhang Daniele Rondina Danny Berger Danny Milosavljevic Danny Yates Danyal Khaliq Darren Coxall Darren Shepherd Darren Stahl Dattatraya Kumbhar Davanum Srinivas Dave Barboza Dave Goodchild Dave Henderson Dave MacDonald Dave Tucker David Anderson David Bellotti David Calavera David Chung David Corking David Cramer David Currie David Davis David Dooling David Gageot David Gebler David Glasser David Karlsson <35727626+dvdksn@users.noreply.github.com> David Lawrence David Lechner David M. Karr David Mackey David Manouchehri David Mat David Mcanulty David McKay David O'Rourke David P Hilton David Pelaez David R. Jenni David Röthlisberger David Sheets David Sissitka David Trott David Wang <00107082@163.com> David Williamson David Xia David Young Davide Ceretti Dawn Chen dbdd dcylabs Debayan De Deborah Gertrude Digges deed02392 Deep Debroy Deng Guangxing Deni Bertovic Denis Defreyne Denis Gladkikh Denis Ollier Dennis Chen Dennis Chen Dennis Docter Derek Derek Derek Ch Derek McGowan Deric Crago Deshi Xiao Devon Estes Devvyn Murphy Dharmit Shah Dhawal Yogesh Bhanushali Dhilip Kumars Diego Romero Diego Siqueira Dieter Reuter Dillon Dixon Dima Stopel Dimitri John Ledkov Dimitris Mandalidis Dimitris Rozakis Dimitry Andric Dinesh Subhraveti Ding Fei dingwei Diogo Monica DiuDiugirl Djibril Koné Djordje Lukic dkumor Dmitri Logvinenko Dmitri Shuralyov Dmitry Demeshchuk Dmitry Gusev Dmitry Kononenko Dmitry Sharshakov Dmitry Shyshkin Dmitry Smirnov Dmitry V. Krivenok Dmitry Vorobev Dmytro Iakovliev docker-unir[bot] Dolph Mathews Dominic Tubach Dominic Yin Dominik Dingel Dominik Finkbeiner Dominik Honnef Don Kirkby Don Kjer Don Spaulding Donald Huang Dong Chen Donghwa Kim Donovan Jones Dorin Geman Doron Podoleanu Doug Davis Doug MacEachern Doug Tangren Douglas Curtis Dr Nic Williams dragon788 Dražen Lučanin Drew Erny Drew Hubl Dustin Sallings Ed Costello Edmund Wagner Eiichi Tsukata Eike Herzbach Eivin Giske Skaaren Eivind Uggedal Elan Ruusamäe Elango Sivanandam Elena Morozova Eli Uriegas Elias Faxö Elias Koromilas Elias Probst Elijah Zupancic eluck Elvir Kuric Emil Davtyan Emil Hernvall Emily Maier Emily Rose Emir Ozer Eng Zer Jun Enguerran Enrico Weigelt, metux IT consult Eohyung Lee epeterso er0k Eric Barch Eric Curtin Eric G. Noriega Eric Hanchrow Eric Lee Eric Mountain Eric Myhre Eric Paris Eric Rafaloff Eric Rosenberg Eric Sage Eric Soderstrom Eric Yang Eric-Olivier Lamey Erica Windisch Erich Cordoba Erik Bray Erik Dubbelboer Erik Hollensbe Erik Inge Bolsø Erik Kristensen Erik Sipsma Erik Sjölund Erik St. Martin Erik Weathers Erno Hopearuoho Erwin van der Koogh Espen Suenson Ethan Bell Ethan Mosbaugh Euan Harris Euan Kemp Eugen Krizo Eugene Yakubovich Evan Allrich Evan Carmi Evan Hazlett Evan Krall Evan Lezar Evan Phoenix Evan Wies Evelyn Xu Everett Toews Evgeniy Makhrov Evgeny Shmarnev Evgeny Vereshchagin Ewa Czechowska Eystein Måløy Stenberg ezbercih Ezra Silvera Fabian Kramm Fabian Lauer Fabian Raetz Fabiano Rosas Fabio Falci Fabio Kung Fabio Rapposelli Fabio Rehm Fabrizio Regini Fabrizio Soppelsa Faiz Khan falmp Fangming Fang Fangyuan Gao <21551127@zju.edu.cn> fanjiyun Fareed Dudhia Fathi Boudra Federico Gimenez Felipe Oliveira Felipe Ruhland Felix Abecassis Felix Geisendörfer Felix Hupfeld Felix Rabe Felix Ruess Felix Schindler Feng Yan Fengtu Wang Ferenc Szabo Fernando Fero Volar Feroz Salam Ferran Rodenas Filipe Brandenburger Filipe Oliveira Filipe Pina Flavio Castelli Flavio Crisciani Florian Florian Klein Florian Maier Florian Noeding Florian Schmaus Florian Weingarten Florin Asavoaie Florin Patan fonglh Foysal Iqbal Francesc Campoy Francesco Degrassi Francesco Mari Francis Chuang Francisco Carriedo Francisco Souza Frank Groeneveld Frank Herrmann Frank Macreery Frank Rosquin Frank Villaro-Dixon Frank Yang François Scala Fred Lifton Frederick F. Kautz IV Frederico F. de Oliveira Frederik Loeffert Frederik Nordahl Jul Sabroe Freek Kalter Frieder Bluemle frobnicaty <92033765+frobnicaty@users.noreply.github.com> Frédéric Dalleau Fu JinLin Félix Baylac-Jacqué Félix Cantournet Gabe Rosenhouse Gabor Nagy Gabriel Adrian Samfira Gabriel Goller Gabriel L. Somlo Gabriel Linder Gabriel Monroy Gabriel Nicolas Avellaneda Gabriel Tomitsuka Gaetan de Villele Galen Sampson Gang Qiao Gareth Rushgrove Garrett Barboza Gary Schaetz Gaurav Gaurav Singh Gaël PORTAY Genki Takiuchi GennadySpb Geoff Levand Geoffrey Bachelet Geon Kim George Adams George Kontridze George Ma George MacRorie George Xie Georgi Hristozov Georgy Yakovlev Gereon Frey German DZ Gert van Valkenhoef Gerwim Feiken Ghislain Bourgeois Giampaolo Mancini Gianluca Borello Gildas Cuisinier Giovan Isa Musthofa gissehel Giuseppe Mazzotta Giuseppe Scrivano Gleb Fotengauer-Malinovskiy Gleb M Borisov Glyn Normington GoBella Goffert van Gool Goldwyn Rodrigues Gopikannan Venugopalsamy Gosuke Miyashita Gou Rao Govinda Fichtner Grace Choi Grant Millar Grant Reaber Graydon Hoare Greg Fausak Greg Pflaum Greg Stephens Greg Thornton Grzegorz Jaśkiewicz Guilhem Lettron Guilherme Salgado Guillaume Dufour Guillaume J. Charmes Gunadhya S. <6939749+gunadhya@users.noreply.github.com> Guoqiang QI guoxiuyan Guri Gurjeet Singh Guruprasad Gustav Sinder gwx296173 Günter Zöchbauer Haichao Yang haikuoliu haining.cao Hakan Özler Hamish Hutchings Hannes Ljungberg Hans Kristian Flaatten Hans Rødtang Hao Shu Wei Hao Zhang <21521210@zju.edu.cn> Harald Albers Harald Niesche Harley Laue Harold Cooper Harrison Turton Harry Zhang Harshal Patil Harshal Patil He Simei He Xiaoxi He Xin heartlock <21521209@zju.edu.cn> Hector Castro Helen Xie Henning Sprang Hiroshi Hatake Hiroyuki Sasagawa Hobofan Hollie Teal Hong Xu Hongbin Lu Hongxu Jia Honza Pokorny Hsing-Hui Hsu Hsing-Yu (David) Chen hsinko <21551195@zju.edu.cn> Hu Keping Hu Tao Huajin Tong huang-jl <1046678590@qq.com> HuanHuan Ye Huanzhong Zhang Huayi Zhang Hugo Barrera Hugo Duncan Hugo Marisco <0x6875676f@gmail.com> Hui Kang Hunter Blanks huqun Huu Nguyen Hyeongkyu Lee Hyzhou Zhy Iago López Galeiras Ian Bishop Ian Bull Ian Calvert Ian Campbell Ian Chen Ian Lee Ian Main Ian Philpot Ian Truslove Iavael Icaro Seara Ignacio Capurro Igor Dolzhikov Igor Karpovich Iliana Weller Ilkka Laukkanen Illia Antypenko Illo Abdulrahim Ilya Dmitrichenko Ilya Gusev Ilya Khlopotov imalasong <2879499479@qq.com> imre Fitos inglesp Ingo Gottwald Innovimax Isaac Dupree Isabel Jimenez Isaiah Grace Isao Jonas Iskander Sharipov Ivan Babrou Ivan Fraixedes Ivan Grcic Ivan Markin J Bruni J. Nunn Jack Danger Canty Jack Laxson Jack Walker <90711509+j2walker@users.noreply.github.com> Jacob Atzen Jacob Edelman Jacob Tomlinson Jacob Vallejo Jacob Wen Jaime Cepeda Jaivish Kothari Jake Champlin Jake Moshenko Jake Sanders Jakub Drahos Jakub Guzik James Allen James Carey James Carr James DeFelice James Harrison Fisher James Kyburz James Kyle James Lal James Mills James Nesbitt James Nugent James Sanders James Turnbull James Watkins-Harvey Jameson Hyde Jamie Hannaford Jamshid Afshar Jan Breig Jan Chren Jan Garcia Jan Götte Jan Keromnes Jan Koprowski Jan Pazdziora Jan Toebes Jan-Gerd Tenberge Jan-Jaap Driessen Jana Radhakrishnan Jannick Fahlbusch Januar Wayong Jared Biel Jared Hocutt Jaroslav Jindrak Jaroslaw Zabiello Jasmine Hegman Jason A. Donenfeld Jason Divock Jason Giedymin Jason Green Jason Hall Jason Heiss Jason Livesay Jason McVetta Jason Plum Jason Shepherd Jason Smith Jason Sommer Jason Stangroome Jasper Siepkes Javier Bassi jaxgeller Jay Jay Kamat Jay Lim Jean Rouge Jean-Baptiste Barth Jean-Baptiste Dalido Jean-Christophe Berthon Jean-Michel Rouet Jean-Paul Calderone Jean-Pierre Huynh Jean-Tiare Le Bigot Jeeva S. Chelladhurai Jeff Anderson Jeff Hajewski Jeff Johnston Jeff Lindsay Jeff Mickey Jeff Minard Jeff Nickoloff Jeff Silberman Jeff Welch Jeff Zvier Jeffrey Bolle Jeffrey Morgan Jeffrey van Gogh Jenny Gebske Jeongseok Kang Jeremy Chambers Jeremy Grosser Jeremy Huntwork Jeremy Price Jeremy Qian Jeremy Unruh Jeremy Yallop Jeroen Franse Jeroen Jacobs Jesse Dearing Jesse Dubay Jessica Frazelle Jeyanthinath Muthuram Jezeniel Zapanta Jhon Honce Ji.Zhilong Jian Liao Jian Zeng Jian Zhang Jiang Jinyang Jianyong Wu Jie Luo Jie Ma Jihyun Hwang Jilles Oldenbeuving Jim Alateras Jim Carroll Jim Ehrismann Jim Galasyn Jim Lin Jim Minter Jim Perrin Jimmy Cuadra Jimmy Puckett Jimmy Song jinjiadu Jinsoo Park Jintao Zhang Jiri Appl Jiri Popelka Jiuyue Ma Jiří Župka jjimbo137 <115816493+jjimbo137@users.noreply.github.com> Joakim Roubert Joan Grau Joao Fernandes Joao Trindade Joe Beda Joe Doliner Joe Ferguson Joe Gordon Joe Shaw Joe Van Dyk Joel Friedly Joel Handwell Joel Hansson Joel Wurtz Joey Geiger Joey Geiger Joey Gibson Joffrey F Johan Euphrosine Johan Rydberg Johanan Lieberman Johannes 'fish' Ziemke John Costa John Feminella John Gardiner Myers John Gossman John Harris John Howard John Laswell John Maguire John Mulhausen John OBrien III John Starks John Stephens John Tims John V. Martinez John Warwick John Willis Jon Johnson Jon Surrell Jon Wedaman Jonas Dohse Jonas Geiler Jonas Heinrich Jonas Pfenniger Jonathan A. Schweder Jonathan A. Sternberg Jonathan Boulle Jonathan Camp Jonathan Choy Jonathan Dowland Jonathan Lebon Jonathan Lomas Jonathan McCrohan Jonathan Mueller Jonathan Pares Jonathan Rudenberg Jonathan Stoppani Jonh Wendell Joni Sar Joost Cassee Jordan Arentsen Jordan Jennings Jordan Sissel Jordi Massaguer Pla Jorge Marin Jorit Kleine-Möllhoff Jose Diaz-Gonzalez Joseph Anthony Pasquale Holsten Joseph Hager Joseph Kern Joseph Rothrock Josh Josh Bodah Josh Bonczkowski Josh Chorlton Josh Eveleth Josh Hawn Josh Horwitz Josh Poimboeuf Josh Soref Josh Wilson Josiah Kiehl José Tomás Albornoz Joyce Jang JP JSchltggr Julian Taylor Julien Barbier Julien Bisconti Julien Bordellier Julien Dubois Julien Kassar Julien Maitrehenry Julien Pervillé Julien Pivotto Julio Guerra Julio Montes Jun Du Jun-Ru Chang junxu Jussi Nummelin Justas Brazauskas Justen Martin Justin Chadwell Justin Cormack Justin Force Justin Keller <85903732+jk-vb@users.noreply.github.com> Justin Menga Justin Plock Justin Simonelis Justin Terry Justyn Temme Jyrki Puttonen Jérémy Leherpeur Jérôme Petazzoni Jörg Thalheim K. Heller Kai Blin Kai Qiang Wu (Kennan) Kaijie Chen Kaita Nakamura Kamil Domański Kamjar Gerami Kanstantsin Shautsou Kara Alexandra Karan Lyons Kareem Khazem kargakis Karl Grzeszczak Karol Duleba Karthik Karanth Karthik Nayak Kasper Fabæch Brandt Kate Heddleston Katie McLaughlin Kato Kazuyoshi Katrina Owen Kawsar Saiyeed Kay Yan kayrus Kazuhiro Sera Kazuyoshi Kato Ke Li Ke Xu Kei Ohmura Keith Hudgins Keli Hu Ken Bannister Ken Cochrane Ken Herner Ken ICHIKAWA Ken Reese Kenfe-Mickaël Laventure Kenjiro Nakayama Kent Johnson Kenta Tada Kevin "qwazerty" Houdebert Kevin Alvarez Kevin Burke Kevin Clark Kevin Feyrer Kevin J. Lynagh Kevin Jing Qiu Kevin Kern Kevin Menard Kevin Meredith Kevin P. Kucharczyk Kevin Parsons Kevin Richardson Kevin Shi Kevin Wallace Kevin Yap Keyvan Fatehi kies Kim BKC Carlbacker Kim Eik Kimbro Staken Kir Kolyshkin Kiran Gangadharan Kirill SIbirev Kirk Easterson knappe Kohei Tsuruta Koichi Shiraishi Konrad Kleine Konrad Ponichtera Konstantin Gribov Konstantin L Konstantin Pelykh Kostadin Plachkov kpcyrd Krasi Georgiev Krasimir Georgiev Kris-Mikael Krister Kristian Haugene Kristian Heljas Kristina Zabunova Krystian Wojcicki Kunal Kushwaha Kunal Tyagi Kyle Conroy Kyle Linden Kyle Squizzato Kyle Wuolle kyu Lachlan Coote Lai Jiangshan Lajos Papp Lakshan Perera Lalatendu Mohanty Lance Chen Lance Kinley Lars Andringa Lars Butler Lars Kellogg-Stedman Lars R. Damerow Lars-Magnus Skog Laszlo Meszaros Laura Brehm Laura Frank Laurent Bernaille Laurent Erignoux Laurent Goderre Laurie Voss Leandro Motta Barros Leandro Siqueira Lee Calcote Lee Chao <932819864@qq.com> Lee, Meng-Han Lei Gong Lei Jitang Leiiwang Len Weincier Lennie Leo Gallucci Leonardo Nodari Leonardo Taccari Leszek Kowalski Levi Blackstone Levi Gross Levi Harrison Lewis Daly Lewis Marshall Lewis Peckover Li Yi Liam Macgillavry Liana Lo Liang Mingqiang Liang-Chi Hsieh liangwei Liao Qingwei Lifubang Lihua Tang Lily Guo limeidan Lin Lu LingFaKe Linus Heckemann Liran Tal Liron Levin Liu Bo Liu Hua liwenqi lixiaobing10051267 Liz Zhang LIZAO LI Lizzie Dixon <_@lizzie.io> Lloyd Dewolf Lokesh Mandvekar longliqiang88 <394564827@qq.com> Lorenz Leutgeb Lorenzo Fontana Lotus Fenn Louis Delossantos Louis Opter Luboslav Pivarc Luca Favatella Luca Marturana Luca Orlandi Luca-Bogdan Grigorescu Lucas Chan Lucas Chi Lucas Molas Lucas Silvestre Luciano Mores Luis Henrique Mulinari Luis Martínez de Bartolomé Izquierdo Luiz Svoboda Lukas Heeren Lukas Waslowski lukaspustina Lukasz Zajaczkowski Luke Marsden Lyn Lynda O'Leary Lénaïc Huard Ma Müller Ma Shimiao Mabin Madhan Raj Mookkandy Madhav Puri Madhu Venugopal Mageee maggie44 <64841595+maggie44@users.noreply.github.com> Mahesh Tiyyagura malnick Malte Janduda Manfred Touron Manfred Zabarauskas Manjunath A Kumatagi Mansi Nahar Manuel Meurer Manuel Rüger Manuel Woelker mapk0y Marat Radchenko Marc Abramowitz Marc Kuo Marc Tamsky Marcel Edmund Franke Marcelo Horacio Fortino Marcelo Salazar Marco Hennings Marcus Cobden Marcus Farkas Marcus Linke Marcus Martins Marcus Ramberg Marek Goldmann Marian Marinov Marianna Tessel Mario Loriedo Marius Gundersen Marius Sturm Marius Voila Mark Allen Mark Feit Mark Jeromin Mark McGranaghan Mark McKinstry Mark Milstein Mark Oates Mark Parker Mark Vainomaa Mark West Markan Patel Marko Mikulicic Marko Tibold Markus Fix Markus Kortlang Martijn Dwars Martijn van Oosterhout Martin Braun Martin Dojcak Martin Honermeyer Martin Jirku Martin Kelly Martin Mosegaard Amdisen Martin Muzatko Martin Redmond Maru Newby Mary Anthony Masahito Zembutsu Masato Ohba Masayuki Morita Mason Malone Mateusz Sulima Mathias Monnerville Mathieu Champlon Mathieu Le Marec - Pasquet Mathieu Parent Mathieu Paturel Matt Apperson Matt Bachmann Matt Bajor Matt Bentley Matt Haggard Matt Hoyle Matt McCormick Matt Moore Matt Morrison <3maven@gmail.com> Matt Richardson Matt Rickard Matt Robenolt Matt Schurenko Matt Williams Matthew Heon Matthew Lapworth Matthew Mayer Matthew Mosesohn Matthew Mueller Matthew Riley Matthias Klumpp Matthias Kühnle Matthias Rampke Matthieu Fronton Matthieu Hauglustaine Matthieu MOREL Mattias Jernberg Mauricio Garavaglia mauriyouth Max Harmathy Max Shytikov Max Timchenko Maxim Fedchyshyn Maxim Ivanov Maxim Kulkin Maxim Treskin Maxime Petazzoni Maximiliano Maccanti Maxwell Meaglith Ma meejah Megan Kostick Mehul Kar Mei ChunTao Mengdi Gao Menghui Chen Mert Yazıcıoğlu mgniu Micah Zoltu Michael A. Smith Michael Beskin Michael Bridgen Michael Brown Michael Chiang Michael Crosby Michael Currie Michael Friis Michael Gorsuch Michael Grauer Michael Holzheu Michael Hudson-Doyle Michael Huettermann Michael Irwin Michael Kebe Michael Kuehn Michael Käufl Michael Neale Michael Nussbaum Michael Prokop Michael Scharf Michael Spetsiotis Michael Stapelberg Michael Steinert Michael Thies Michael Weidmann Michael West Michael Zhao Michal Fojtik Michal Gebauer Michal Jemala Michal Kostrzewa Michal Minář Michal Rostecki Michal Wieczorek Michaël Pailloncy Michał Czeraszkiewicz Michał Gryko Michał Kosek Michiel de Jong Mickaël Fortunato Mickaël Remars Miguel Angel Fernández Miguel Morales Miguel Perez Mihai Borobocea Mihuleacc Sergiu Mikael Davranche Mike Brown Mike Bush Mike Casas Mike Chelen Mike Danese Mike Dillon Mike Dougherty Mike Estes Mike Gaffney Mike Goelzer Mike Leone Mike Lundy Mike MacCana Mike Naberezny Mike Snitzer Mike Sul mikelinjie <294893458@qq.com> Mikhail Sobolev Miklos Szegedi Milas Bowman Milind Chawre Miloslav Trmač mingqing Mingzhen Feng Misty Stanley-Jones Mitch Capper Mizuki Urushida mlarcher Mohammad Banikazemi Mohammad Nasirifar Mohammed Aaqib Ansari Mohd Sadiq Mohit Soni Moorthy RS Morgan Bauer Morgante Pell Morgy93 Morten Siebuhr Morton Fox Moysés Borges mrfly Mrunal Patel Muayyad Alsadi Muhammad Zohaib Aslam Mustafa Akın Muthukumar R Myeongjoon Kim Máximo Cuadros Médi-Rémi Hashim Nace Oroz Nahum Shalman Nakul Pathak Nalin Dahyabhai Nan Monnand Deng Naoki Orii Natalie Parker Natanael Copa Natasha Jarus Nate Brennand Nate Eagleson Nate Jones Nathan Baulch Nathan Carlson Nathan Herald Nathan Hsieh Nathan Kleyn Nathan LeClaire Nathan McCauley Nathan Williams Naveed Jamil Neal McBurnett Neil Horman Neil Peterson Nelson Chen Neyazul Haque Nghia Tran Niall O'Higgins Nicholas E. Rabenau Nick Adcock Nick DeCoursin Nick Irvine Nick Neisen Nick Parker Nick Payne Nick Russo Nick Santos Nick Stenning Nick Stinemates Nick Wood NickrenREN Nicola Kabar Nicolas Borboën Nicolas De Loof Nicolas Dudebout Nicolas Goy Nicolas Kaiser Nicolas Sterchele Nicolas V Castet Nicolás Hock Isaza Niel Drummond Nigel Poulton Nik Nyby Nikhil Chawla NikolaMandic Nikolas Garofil Nikolay Edigaryev Nikolay Milovanov ningmingxiao Nirmal Mehta Nishant Totla NIWA Hideyuki Noah Meyerhans Noah Treuhaft NobodyOnSE noducks Nolan Darilek Nolan Miles Noriki Nakamura nponeccop Nurahmadie Nuutti Kotivuori nzwsch O.S. Tezer objectified Octol1ttle Odin Ugedal Oguz Bilgic Oh Jinkyun Ohad Schneider ohmystack Ole Reifschneider Oliver Neal Oliver Reason Olivier Gambier Olle Jonsson Olli Janatuinen Olly Pomeroy Omri Shiv Onur Filiz Oriol Francès Oscar Bonilla <6f6231@gmail.com> oscar.chen <2972789494@qq.com> Oskar Niburski Otto Kekäläinen Ouyang Liduo Ovidio Mallo Panagiotis Moustafellos Paolo G. Giarrusso Pascal Pascal Bach Pascal Borreli Pascal Hartig Patrick Böänziger Patrick Devine Patrick Haas Patrick Hemmer Patrick St. laurent Patrick Stapleton Patrik Cyvoct Patrik Leifert pattichen Paul "TBBle" Hampson Paul paul Paul Annesley Paul Bellamy Paul Bowsher Paul Furtado Paul Hammond Paul Jimenez Paul Kehrer Paul Lietar Paul Liljenberg Paul Morie Paul Nasrat Paul Seiffert Paul Weaver Paulo Gomes Paulo Ribeiro Pavel Lobashov Pavel Matěja Pavel Pletenev Pavel Pospisil Pavel Sutyrin Pavel Tikhomirov Pavlos Ratis Pavol Vargovcik Pawel Konczalski Paweł Gronowski payall4u Peeyush Gupta Peggy Li Pei Su Peng Tao Penghan Wang Per Weijnitz perhapszzy@sina.com Pete Woods Peter Bourgon Peter Braden Peter Bücker Peter Choi Peter Dave Hello Peter Edge Peter Ericson Peter Esbensen Peter Jaffe Peter Kang Peter Malmgren Peter Salvatore Peter Volpe Peter Waller Petr Švihlík Petros Angelatos Phil Phil Estes Phil Sphicas Phil Spitler Philip Alexander Etling Philip K. Warren Philip Monroe Philipp Fruck Philipp Gillé Philipp Wahala Philipp Weissensteiner Phillip Alexander phineas pidster Piergiuliano Bossi Pierre Pierre Carrier Pierre Dal-Pra Pierre Wacrenier Pierre-Alain RIVIERE pinglanlu Piotr Bogdan Piotr Karbowski Porjo Poul Kjeldager Sørensen Pradeep Chhetri Pradip Dhara Pradipta Kr. Banerjee Prasanna Gautam Pratik Karki Prayag Verma Priya Wadhwa Projjol Banerji Przemek Hejman Puneet Pruthi Pure White pysqz Qiang Huang Qin TianHuan Qinglan Peng Quan Tian qudongfang Quentin Brossard Quentin Perez Quentin Tayssier r0n22 Rachit Sharma Radostin Stoyanov Rafael Fernández López Rafal Jeczalik Rafe Colton Raghavendra K T Raghuram Devarakonda Raja Sami Rajat Pandit Rajdeep Dua Ralf Sippl Ralle Ralph Bean Ramkumar Ramachandra Ramon Brooker Ramon van Alteren RaviTeja Pothana Ray Tsang ReadmeCritic realityone Recursive Madman Reficul Regan McCooey Remi Rampin Remy Suen Renato Riccieri Santos Zannon Renaud Gaubert Rhys Hiltner Ri Xu Ricardo N Feliciano Rich Horwood Rich Moyse Rich Seymour Richard Burnison Richard Hansen Richard Harvey Richard Mathie Richard Metzler Richard Scothern Richo Healey Rick Bradley Rick van de Loo Rick Wieman Rik Nijessen Riku Voipio Riley Guerin Ritesh H Shukla Riyaz Faizullabhoy Rob Cowsill <42620235+rcowsill@users.noreply.github.com> Rob Gulewich Rob Murray Rob Vesse Robert Bachmann Robert Bittle Robert Obryk Robert Schneider Robert Shade Robert Stern Robert Sturla Robert Terhaar Robert Wallis Robert Wang Roberto G. Hashioka Roberto Muñoz Fernández Robin Naundorf Robin Schneider Robin Speekenbrink Robin Thoni robpc Rodolfo Carvalho Rodrigo Campos Rodrigo Vaz Roel Van Nyen Roger Peppe Rohit Jnagal Rohit Kadam Rohit Kapur Rojin George Roland Huß Roland Kammerer Roland Moriz Roma Sokolov Roman Dudin Roman Mazur Roman Strashkin Roman Volosatovs Roman Zabaluev Ron Smits Ron Williams Rong Gao Rong Zhang Rongxiang Song Rony Weng root root root root Rory Hunter Rory McCune Ross Boucher Rovanion Luckey Roy Reznik Royce Remer Rozhnov Alexandr Rudolph Gottesheim Rui Cao Rui JingAn Rui Lopes Ruilin Li Runshen Zhu Russ Magee Ryan Abrams Ryan Anderson Ryan Aslett Ryan Barry Ryan Belgrave Ryan Campbell Ryan Detzel Ryan Fowler Ryan Liu Ryan McLaughlin Ryan O'Donnell Ryan Seto Ryan Shea Ryan Simmen Ryan Stelly Ryan Thomas Ryan Trauntvein Ryan Wallner Ryan Zhang ryancooper7 RyanDeng Ryo Nakao Ryoga Saito Régis Behmo Rémy Greinhofer s. rannou Sabin Basyal Sachin Joshi Sagar Hani Sainath Grandhi Sakeven Jiang Salahuddin Khan Sally O'Malley Sam Abed Sam Alba Sam Bailey Sam J Sharpe Sam Neirinck Sam Reis Sam Rijs Sam Thibault Sam Whited Sambuddha Basu Sami Wagiaalla Samuel Andaya Samuel Dion-Girardeau Samuel Karp Samuel PHAN sanchayanghosh Sandeep Bansal Sankar சங்கர் Sanket Saurav Santhosh Manohar sapphiredev Sargun Dhillon Sascha Andres Sascha Grunert SataQiu Satnam Singh Satoshi Amemiya Satoshi Tagomori Scott Bessler Scott Collier Scott Johnston Scott Moser Scott Percival Scott Stamp Scott Walls sdreyesg Sean Christopherson Sean Cronin Sean Lee Sean McIntyre Sean OMeara Sean P. Kane Sean Rodman Sebastiaan van Steenis Sebastiaan van Stijn Sebastian Höffner Sebastian Radloff Sebastian Thomschke Sebastien Goasguen Senthil Kumar Selvaraj Senthil Kumaran SeongJae Park Seongyeol Lim Serge Hallyn Sergey Alekseev Sergey Evstifeev Sergii Kabashniuk Sergio Lopez Serhat Gülçiçek Serhii Nakon SeungUkLee Sevki Hasirci Shane Canon Shane da Silva Shaun Kaasten Shaun Thompson shaunol Shawn Landden Shawn Siefkas shawnhe Shayan Pooya Shayne Wang Shekhar Gulati Sheng Yang Shengbo Song Shengjing Zhu Shev Yan Shih-Yuan Lee Shihao Xia Shijiang Wei Shijun Qin Shishir Mahajan Shoubhik Bose Shourya Sarcar Shreenidhi Shedi Shu-Wai Chow shuai-z Shukui Yang Sian Lerk Lau Siarhei Rasiukevich Sidhartha Mani sidharthamani Silas Sewell Silvan Jegen Simão Reis Simon Barendse Simon Eskildsen Simon Ferquel Simon Leinen Simon Menke Simon Taranto Simon Vikstrom Sindhu S Sjoerd Langkemper skanehira Smark Meng Solganik Alexander Solomon Hykes Song Gao Soshi Katsuta Sotiris Salloumis Soulou Spencer Brown Spencer Smith Spike Curtis Sridatta Thatipamala Sridhar Ratnakumar Srini Brahmaroutu Srinivasan Srivatsan Staf Wagemakers Stanislav Bondarenko Stanislav Levin Steeve Morin Stefan Berger Stefan Gehrig Stefan J. Wernli Stefan Praszalowicz Stefan S. Stefan Scherer Stefan Staudenmeyer Stefan Weil Steffen Butzer Stephan Henningsen Stephan Spindler Stephen Benjamin Stephen Crosby Stephen Day Stephen Drake Stephen Rust Steve Desmond Steve Dougherty Steve Durrheimer Steve Francia Steve Koch Steven Burgess Steven Erenst Steven Hartland Steven Iveson Steven Merrill Steven Richards Steven Taylor Stéphane Este-Gracias Stig Larsson Su Wang Subhajit Ghosh Sujith Haridasan Sun Gengze <690388648@qq.com> Sun Jianbo Sune Keller Sunny Gogoi Suryakumar Sudar Sven Dowideit Swapnil Daingade Sylvain Baubeau Sylvain Bellemare Sébastien Sébastien HOUZÉ Sébastien Luttringer Sébastien Stormacq Sören Tempel Tabakhase Tadej Janež Tadeusz Dudkiewicz Takuto Sato tang0th Tangi Colin Tatsuki Sugiura Tatsushi Inagaki Taylan Isikdemir Taylor Jones tcpdumppy <847462026@qq.com> Ted M. Young Tehmasp Chaudhri Tejaswini Duggaraju Tejesh Mehta Terry Chu terryding77 <550147740@qq.com> Thatcher Peskens theadactyl Thell 'Bo' Fowler Thermionix Thiago Alves Silva Thijs Terlouw Thomas Bikeev Thomas Frössman Thomas Gazagnaire Thomas Graf Thomas Grainger Thomas Hansen Thomas Ledos Thomas Leonard Thomas Léveil Thomas Orozco Thomas Riccardi Thomas Schroeter Thomas Sjögren Thomas Swift Thomas Tanaka Thomas Texier Ti Zhou Tiago Seabra Tianon Gravi Tianyi Wang Tibor Vass Tiffany Jernigan Tiffany Low Till Claassen Till Wegmüller Tim Tim Bart Tim Bosse Tim Dettrick Tim Düsterhus Tim Hockin Tim Potter Tim Ruffles Tim Smith Tim Terhorst Tim Wagner Tim Wang Tim Waugh Tim Wraight Tim Zju <21651152@zju.edu.cn> timchenxiaoyu <837829664@qq.com> timfeirg Timo Rothenpieler Timothy Hobbs tjwebb123 tobe Tobias Bieniek Tobias Bradtke Tobias Gesellchen Tobias Klauser Tobias Munk Tobias Pfandzelter Tobias Schmidt Tobias Schwab Todd Crane Todd Lunter Todd Whiteman Toli Kuznets Tom Barlow Tom Booth Tom Denham Tom Fotherby Tom Howe Tom Hulihan Tom Maaswinkel Tom Parker Tom Sweeney Tom Wilkie Tom X. Tobin Tom Zhao Tomas Janousek Tomas Kral Tomas Tomecek Tomasz Kopczynski Tomasz Lipinski Tomasz Nurkiewicz Tomek Mańko Tommaso Visconti Tomoya Tabuchi Tomáš Hrčka Tomáš Virtus tonic Tonny Xu Tony Abboud Tony Daws Tony Miller toogley Torstein Husebø Toshiaki Makita Tõnis Tiigi Trace Andreason tracylihui <793912329@qq.com> Trapier Marshall Travis Cline Travis Thieman Trent Ogren Trevor Trevor Pounds Trevor Sullivan Trishna Guha Tristan Carel Troy Denton Tudor Brindus Ty Alexander Tycho Andersen Tyler Brock Tyler Brown Tzu-Jung Lee uhayate Ulysse Carion Umesh Yadav Utz Bacher vagrant Vaidas Jablonskis Valentin Kulesh vanderliang Velko Ivanov Veres Lajos Victor Algaze Victor Coisne Victor Costan Victor I. Wood Victor Lyuboslavsky Victor Marmol Victor Palma Victor Toni Victor Vieux Victoria Bialas Vijaya Kumar K Vikas Choudhary Vikram bir Singh Viktor Stanchev Viktor Vojnovski VinayRaghavanKS Vincent Batts Vincent Bernat Vincent Boulineau Vincent Demeester Vincent Giersch Vincent Mayers Vincent Woo Vinod Kulkarni Vishal Doshi Vishnu Kannan Vitaly Ostrosablin Vitor Anjos Vitor Monteiro Vivek Agarwal Vivek Dasgupta Vivek Goyal Vladimir Bulyga Vladimir Kirillov Vladimir Pouzanov Vladimir Rutsky Vladimir Varankin VladimirAus Vladislav Kolesnikov Vlastimil Zeman Vojtech Vitek (V-Teq) voloder <110066198+voloder@users.noreply.github.com> Walter Leibbrandt Walter Stanish Wang Chao Wang Guoliang Wang Jie Wang Long Wang Ping Wang Xing Wang Yuexiao Wang Yumu <37442693@qq.com> wanghuaiqing Ward Vandewege WarheadsSE Wassim Dhif Wataru Ishida Wayne Chang Wayne Song weebney Weerasak Chongnguluam Wei Fu Wei Wu Wei-Ting Kuo weipeng weiyan Weiyang Zhu Wen Cheng Ma Wendel Fleming Wenjun Tang Wenkai Yin wenlxie Wenxuan Zhao Wenyu You <21551128@zju.edu.cn> Wenzhi Liang Wes Morgan Wesley Pettit Wewang Xiaorenfine Wiktor Kwapisiewicz Will Dietz Will Rouesnel Will Weaver willhf William Delanoue William Henry William Hubbs William Martin William Riancho William Thurston Wilson Júnior Wing-Kam Wong WiseTrem Wolfgang Nagele Wolfgang Powisch Wonjun Kim WuLonghui xamyzhao Xia Wu Xian Chaobo Xianglin Gao Xianjie Xianlu Bird Xiao YongBiao Xiao Zhang XiaoBing Jiang Xiaodong Liu Xiaodong Zhang Xiaohua Ding Xiaoxi He Xiaoxu Chen Xiaoyu Zhang xichengliudui <1693291525@qq.com> xiekeyang Ximo Guanter Gonzálbez xin.li Xinbo Weng Xinfeng Liu Xinzi Zhou Xiuming Chen Xuecong Liao xuzhaokui Yadnyawalkya Tale Yahya yalpul YAMADA Tsuyoshi Yamasaki Masahide Yamazaki Masashi Yan Feng Yan Zhu Yang Bai Yang Li Yang Pengfei yangchenliang Yann Autissier Yanqiang Miao Yao Zaiyong Yash Murty Yassine Tijani Yasunori Mahata Yazhong Liu Yestin Sun Yi EungJun Yibai Zhang Yihang Ho Ying Li Yohei Ueda Yong Tang Yongxin Li Yongzhi Pan Yosef Fertel You-Sheng Yang (楊有勝) youcai Youcef YEKHLEF Youfu Zhang YR Chen Yu Changchun Yu Chengxia Yu Peng Yu-Ju Hong Yuan Sun Yuanhong Peng Yue Zhang Yufei Xiong Yuhao Fang Yuichiro Kaneko YujiOshima Yunxiang Huang Yurii Rashkovskii Yusuf Tarık Günaydın Yves Blusseau <90z7oey02@sneakemail.com> Yves Junqueira Zac Dover Zach Borboa Zach Gershman Zachary Jaffee Zain Memon Zaiste! Zane DeGraffenried Zefan Li Zen Lin(Zhinan Lin) Zhang Kun Zhang Wei Zhang Wentao zhangguanzhang ZhangHang zhangxianwei Zhenan Ye <21551168@zju.edu.cn> zhenghenghuo Zhenhai Gao Zhenkun Bi ZhiPeng Lu zhipengzuo Zhou Hao Zhoulin Xie Zhu Guihua Zhu Kunjia Zhuoyun Wei Ziheng Liu Zilin Du zimbatm Ziming Dong ZJUshuaizhou <21551191@zju.edu.cn> zmarouf Zoltan Tombol Zou Yu zqh Zuhayr Elahi Zunayed Ali Álvaro Lázaro Átila Camurça Alves 吴小白 <296015668@qq.com> 尹吉峰 屈骏 徐俊杰 慕陶 搏通 黄艳红00139573 정재영 ================================================ FILE: vendor/github.com/docker/docker/LICENSE ================================================ Apache License Version 2.0, January 2004 https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor 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, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS Copyright 2013-2018 Docker, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/github.com/docker/docker/NOTICE ================================================ Docker Copyright 2012-2017 Docker, Inc. This product includes software developed at Docker, Inc. (https://www.docker.com). This product contains software (https://github.com/creack/pty) developed by Keith Rarick, licensed under the MIT License. The following is courtesy of our legal counsel: Use and transfer of Docker may be subject to certain restrictions by the United States and other governments. It is your responsibility to ensure that your use and/or transfer does not violate applicable laws. For more information, please see https://www.bis.doc.gov See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. ================================================ FILE: vendor/github.com/docker/docker/api/README.md ================================================ # Working on the Engine API The Engine API is an HTTP API used by the command-line client to communicate with the daemon. It can also be used by third-party software to control the daemon. It consists of various components in this repository: - `api/swagger.yaml` A Swagger definition of the API. - `api/types/` Types shared by both the client and server, representing various objects, options, responses, etc. Most are written manually, but some are automatically generated from the Swagger definition. See [#27919](https://github.com/docker/docker/issues/27919) for progress on this. - `cli/` The command-line client. - `client/` The Go client used by the command-line client. It can also be used by third-party Go programs. - `daemon/` The daemon, which serves the API. ## Swagger definition The API is defined by the [Swagger](http://swagger.io/specification/) definition in `api/swagger.yaml`. This definition can be used to: 1. Automatically generate documentation. 2. Automatically generate the Go server and client. (A work-in-progress.) 3. Provide a machine readable version of the API for introspecting what it can do, automatically generating clients for other languages, etc. ## Updating the API documentation The API documentation is generated entirely from `api/swagger.yaml`. If you make updates to the API, edit this file to represent the change in the documentation. The file is split into two main sections: - `definitions`, which defines re-usable objects used in requests and responses - `paths`, which defines the API endpoints (and some inline objects which don't need to be reusable) To make an edit, first look for the endpoint you want to edit under `paths`, then make the required edits. Endpoints may reference reusable objects with `$ref`, which can be found in the `definitions` section. There is hopefully enough example material in the file for you to copy a similar pattern from elsewhere in the file (e.g. adding new fields or endpoints), but for the full reference, see the [Swagger specification](https://github.com/docker/docker/issues/27919). `swagger.yaml` is validated by `hack/validate/swagger` to ensure it is a valid Swagger definition. This is useful when making edits to ensure you are doing the right thing. ## Viewing the API documentation When you make edits to `swagger.yaml`, you may want to check the generated API documentation to ensure it renders correctly. Run `make swagger-docs` and a preview will be running at `http://localhost:9000`. Some of the styling may be incorrect, but you'll be able to ensure that it is generating the correct documentation. The production documentation is generated by vendoring `swagger.yaml` into [docker/docker.github.io](https://github.com/docker/docker.github.io). ================================================ FILE: vendor/github.com/docker/docker/api/common.go ================================================ package api // Common constants for daemon and client. const ( // DefaultVersion of the current REST API. DefaultVersion = "1.51" // MinSupportedAPIVersion is the minimum API version that can be supported // by the API server, specified as "major.minor". Note that the daemon // may be configured with a different minimum API version, as returned // in [github.com/docker/docker/api/types.Version.MinAPIVersion]. // // API requests for API versions lower than the configured version produce // an error. MinSupportedAPIVersion = "1.24" // NoBaseImageSpecifier is the symbol used by the FROM // command to specify that no base image is to be used. NoBaseImageSpecifier = "scratch" ) ================================================ FILE: vendor/github.com/docker/docker/api/swagger-gen.yaml ================================================ layout: models: - name: definition source: asset:model target: "{{ joinFilePath .Target .ModelPackage }}" file_name: "{{ (snakize (pascalize .Name)) }}.go" operations: - name: handler source: asset:serverOperation target: "{{ joinFilePath .Target .APIPackage .Package }}" file_name: "{{ (snakize (pascalize .Name)) }}.go" ================================================ FILE: vendor/github.com/docker/docker/api/swagger.yaml ================================================ # A Swagger 2.0 (a.k.a. OpenAPI) definition of the Engine API. # # This is used for generating API documentation and the types used by the # client/server. See api/README.md for more information. # # Some style notes: # - This file is used by ReDoc, which allows GitHub Flavored Markdown in # descriptions. # - There is no maximum line length, for ease of editing and pretty diffs. # - operationIds are in the format "NounVerb", with a singular noun. swagger: "2.0" schemes: - "http" - "https" produces: - "application/json" - "text/plain" consumes: - "application/json" - "text/plain" basePath: "/v1.51" info: title: "Docker Engine API" version: "1.51" x-logo: url: "https://docs.docker.com/assets/images/logo-docker-main.png" description: | The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { "message": "page not found" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.50) is used. For example, calling `/info` is the same as calling `/v1.51/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means the server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { "username": "string", "password": "string", "serveraddress": "string" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { "identitytoken": "9cbaf023786cd7..." } ``` # The tags on paths define the menu sections in the ReDoc documentation, so # the usage of tags must make sense for that: # - They should be singular, not plural. # - There should not be too many tags, or the menu becomes unwieldy. For # example, it is preferable to add a path to the "System" tag instead of # creating a tag with a single path in it. # - The order of tags in this list defines the order in the menu. tags: # Primary objects - name: "Container" x-displayName: "Containers" description: | Create and manage containers. - name: "Image" x-displayName: "Images" - name: "Network" x-displayName: "Networks" description: | Networks are user-defined networks that containers can be attached to. See the [networking documentation](https://docs.docker.com/network/) for more information. - name: "Volume" x-displayName: "Volumes" description: | Create and manage persistent storage that can be attached to containers. - name: "Exec" x-displayName: "Exec" description: | Run new commands inside running containers. Refer to the [command-line reference](https://docs.docker.com/engine/reference/commandline/exec/) for more information. To exec a command in a container, you first need to create an exec instance, then start it. These two API endpoints are wrapped up in a single command-line command, `docker exec`. # Swarm things - name: "Swarm" x-displayName: "Swarm" description: | Engines can be clustered together in a swarm. Refer to the [swarm mode documentation](https://docs.docker.com/engine/swarm/) for more information. - name: "Node" x-displayName: "Nodes" description: | Nodes are instances of the Engine participating in a swarm. Swarm mode must be enabled for these endpoints to work. - name: "Service" x-displayName: "Services" description: | Services are the definitions of tasks to run on a swarm. Swarm mode must be enabled for these endpoints to work. - name: "Task" x-displayName: "Tasks" description: | A task is a container running on a swarm. It is the atomic scheduling unit of swarm. Swarm mode must be enabled for these endpoints to work. - name: "Secret" x-displayName: "Secrets" description: | Secrets are sensitive data that can be used by services. Swarm mode must be enabled for these endpoints to work. - name: "Config" x-displayName: "Configs" description: | Configs are application configurations that can be used by services. Swarm mode must be enabled for these endpoints to work. # System things - name: "Plugin" x-displayName: "Plugins" - name: "System" x-displayName: "System" definitions: Port: type: "object" description: "An open port on a container" required: [PrivatePort, Type] properties: IP: type: "string" format: "ip-address" description: "Host IP address that the container's port is mapped to" PrivatePort: type: "integer" format: "uint16" x-nullable: false description: "Port on the container" PublicPort: type: "integer" format: "uint16" description: "Port exposed on the host" Type: type: "string" x-nullable: false enum: ["tcp", "udp", "sctp"] example: PrivatePort: 8080 PublicPort: 80 Type: "tcp" MountPoint: type: "object" description: | MountPoint represents a mount point configuration inside the container. This is used for reporting the mountpoints in use by a container. properties: Type: description: | The mount type: - `bind` a mount of a file or directory from the host into the container. - `volume` a docker volume with the given `Name`. - `image` a docker image - `tmpfs` a `tmpfs`. - `npipe` a named pipe from the host into the container. - `cluster` a Swarm cluster volume type: "string" enum: - "bind" - "volume" - "image" - "tmpfs" - "npipe" - "cluster" example: "volume" Name: description: | Name is the name reference to the underlying data defined by `Source` e.g., the volume name. type: "string" example: "myvolume" Source: description: | Source location of the mount. For volumes, this contains the storage location of the volume (within `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains the source (host) part of the bind-mount. For `tmpfs` mount points, this field is empty. type: "string" example: "/var/lib/docker/volumes/myvolume/_data" Destination: description: | Destination is the path relative to the container root (`/`) where the `Source` is mounted inside the container. type: "string" example: "/usr/share/nginx/html/" Driver: description: | Driver is the volume driver used to create the volume (if it is a volume). type: "string" example: "local" Mode: description: | Mode is a comma separated list of options supplied by the user when creating the bind/volume mount. The default is platform-specific (`"z"` on Linux, empty on Windows). type: "string" example: "z" RW: description: | Whether the mount is mounted writable (read-write). type: "boolean" example: true Propagation: description: | Propagation describes how mounts are propagated from the host into the mount point, and vice-versa. Refer to the [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt) for details. This field is not used on Windows. type: "string" example: "" DeviceMapping: type: "object" description: "A device mapping between the host and container" properties: PathOnHost: type: "string" PathInContainer: type: "string" CgroupPermissions: type: "string" example: PathOnHost: "/dev/deviceName" PathInContainer: "/dev/deviceName" CgroupPermissions: "mrw" DeviceRequest: type: "object" description: "A request for devices to be sent to device drivers" properties: Driver: type: "string" example: "nvidia" Count: type: "integer" example: -1 DeviceIDs: type: "array" items: type: "string" example: - "0" - "1" - "GPU-fef8089b-4820-abfc-e83e-94318197576e" Capabilities: description: | A list of capabilities; an OR list of AND lists of capabilities. type: "array" items: type: "array" items: type: "string" example: # gpu AND nvidia AND compute - ["gpu", "nvidia", "compute"] Options: description: | Driver-specific options, specified as a key/value pairs. These options are passed directly to the driver. type: "object" additionalProperties: type: "string" ThrottleDevice: type: "object" properties: Path: description: "Device path" type: "string" Rate: description: "Rate" type: "integer" format: "int64" minimum: 0 Mount: type: "object" properties: Target: description: "Container path." type: "string" Source: description: "Mount source (e.g. a volume name, a host path)." type: "string" Type: description: | The mount type. Available types: - `bind` Mounts a file or directory from the host into the container. Must exist prior to creating the container. - `volume` Creates a volume with the given name and options (or uses a pre-existing volume with the same name and options). These are **not** removed when the container is removed. - `image` Mounts an image. - `tmpfs` Create a tmpfs with the given options. The mount source cannot be specified for tmpfs. - `npipe` Mounts a named pipe from the host into the container. Must exist prior to creating the container. - `cluster` a Swarm cluster volume type: "string" enum: - "bind" - "volume" - "image" - "tmpfs" - "npipe" - "cluster" ReadOnly: description: "Whether the mount should be read-only." type: "boolean" Consistency: description: "The consistency requirement for the mount: `default`, `consistent`, `cached`, or `delegated`." type: "string" BindOptions: description: "Optional configuration for the `bind` type." type: "object" properties: Propagation: description: "A propagation mode with the value `[r]private`, `[r]shared`, or `[r]slave`." type: "string" enum: - "private" - "rprivate" - "shared" - "rshared" - "slave" - "rslave" NonRecursive: description: "Disable recursive bind mount." type: "boolean" default: false CreateMountpoint: description: "Create mount point on host if missing" type: "boolean" default: false ReadOnlyNonRecursive: description: | Make the mount non-recursively read-only, but still leave the mount recursive (unless NonRecursive is set to `true` in conjunction). Added in v1.44, before that version all read-only mounts were non-recursive by default. To match the previous behaviour this will default to `true` for clients on versions prior to v1.44. type: "boolean" default: false ReadOnlyForceRecursive: description: "Raise an error if the mount cannot be made recursively read-only." type: "boolean" default: false VolumeOptions: description: "Optional configuration for the `volume` type." type: "object" properties: NoCopy: description: "Populate volume with data from the target." type: "boolean" default: false Labels: description: "User-defined key/value metadata." type: "object" additionalProperties: type: "string" DriverConfig: description: "Map of driver specific options" type: "object" properties: Name: description: "Name of the driver to use to create the volume." type: "string" Options: description: "key/value map of driver specific options." type: "object" additionalProperties: type: "string" Subpath: description: "Source path inside the volume. Must be relative without any back traversals." type: "string" example: "dir-inside-volume/subdirectory" ImageOptions: description: "Optional configuration for the `image` type." type: "object" properties: Subpath: description: "Source path inside the image. Must be relative without any back traversals." type: "string" example: "dir-inside-image/subdirectory" TmpfsOptions: description: "Optional configuration for the `tmpfs` type." type: "object" properties: SizeBytes: description: "The size for the tmpfs mount in bytes." type: "integer" format: "int64" Mode: description: "The permission mode for the tmpfs mount in an integer." type: "integer" Options: description: | The options to be passed to the tmpfs mount. An array of arrays. Flag options should be provided as 1-length arrays. Other types should be provided as as 2-length arrays, where the first item is the key and the second the value. type: "array" items: type: "array" minItems: 1 maxItems: 2 items: type: "string" example: [["noexec"]] RestartPolicy: description: | The behavior to apply when the container exits. The default is not to restart. An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server. type: "object" properties: Name: type: "string" description: | - Empty string means not to restart - `no` Do not automatically restart - `always` Always restart - `unless-stopped` Restart always except when the user has manually stopped the container - `on-failure` Restart only when the container exit code is non-zero enum: - "" - "no" - "always" - "unless-stopped" - "on-failure" MaximumRetryCount: type: "integer" description: | If `on-failure` is used, the number of times to retry before giving up. Resources: description: "A container's resources (cgroups config, ulimits, etc)" type: "object" properties: # Applicable to all platforms CpuShares: description: | An integer value representing this container's relative CPU weight versus other containers. type: "integer" Memory: description: "Memory limit in bytes." type: "integer" format: "int64" default: 0 # Applicable to UNIX platforms CgroupParent: description: | Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist. type: "string" BlkioWeight: description: "Block IO weight (relative weight)." type: "integer" minimum: 0 maximum: 1000 BlkioWeightDevice: description: | Block IO weight (relative device weight) in the form: ``` [{"Path": "device_path", "Weight": weight}] ``` type: "array" items: type: "object" properties: Path: type: "string" Weight: type: "integer" minimum: 0 BlkioDeviceReadBps: description: | Limit read rate (bytes per second) from a device, in the form: ``` [{"Path": "device_path", "Rate": rate}] ``` type: "array" items: $ref: "#/definitions/ThrottleDevice" BlkioDeviceWriteBps: description: | Limit write rate (bytes per second) to a device, in the form: ``` [{"Path": "device_path", "Rate": rate}] ``` type: "array" items: $ref: "#/definitions/ThrottleDevice" BlkioDeviceReadIOps: description: | Limit read rate (IO per second) from a device, in the form: ``` [{"Path": "device_path", "Rate": rate}] ``` type: "array" items: $ref: "#/definitions/ThrottleDevice" BlkioDeviceWriteIOps: description: | Limit write rate (IO per second) to a device, in the form: ``` [{"Path": "device_path", "Rate": rate}] ``` type: "array" items: $ref: "#/definitions/ThrottleDevice" CpuPeriod: description: "The length of a CPU period in microseconds." type: "integer" format: "int64" CpuQuota: description: | Microseconds of CPU time that the container can get in a CPU period. type: "integer" format: "int64" CpuRealtimePeriod: description: | The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. type: "integer" format: "int64" CpuRealtimeRuntime: description: | The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. type: "integer" format: "int64" CpusetCpus: description: | CPUs in which to allow execution (e.g., `0-3`, `0,1`). type: "string" example: "0-3" CpusetMems: description: | Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. type: "string" Devices: description: "A list of devices to add to the container." type: "array" items: $ref: "#/definitions/DeviceMapping" DeviceCgroupRules: description: "a list of cgroup rules to apply to the container" type: "array" items: type: "string" example: "c 13:* rwm" DeviceRequests: description: | A list of requests for devices to be sent to device drivers. type: "array" items: $ref: "#/definitions/DeviceRequest" KernelMemoryTCP: description: | Hard limit for kernel TCP buffer memory (in bytes). Depending on the OCI runtime in use, this option may be ignored. It is no longer supported by the default (runc) runtime. This field is omitted when empty. **Deprecated**: This field is deprecated as kernel 6.12 has deprecated `memory.kmem.tcp.limit_in_bytes` field for cgroups v1. This field will be removed in a future release. type: "integer" format: "int64" MemoryReservation: description: "Memory soft limit in bytes." type: "integer" format: "int64" MemorySwap: description: | Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. type: "integer" format: "int64" MemorySwappiness: description: | Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. type: "integer" format: "int64" minimum: 0 maximum: 100 NanoCpus: description: "CPU quota in units of 10-9 CPUs." type: "integer" format: "int64" OomKillDisable: description: "Disable OOM Killer for the container." type: "boolean" Init: description: | Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used. type: "boolean" x-nullable: true PidsLimit: description: | Tune a container's PIDs limit. Set `0` or `-1` for unlimited, or `null` to not change. type: "integer" format: "int64" x-nullable: true Ulimits: description: | A list of resource limits to set in the container. For example: ``` {"Name": "nofile", "Soft": 1024, "Hard": 2048} ``` type: "array" items: type: "object" properties: Name: description: "Name of ulimit" type: "string" Soft: description: "Soft limit" type: "integer" Hard: description: "Hard limit" type: "integer" # Applicable to Windows CpuCount: description: | The number of usable CPUs (Windows only). On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. type: "integer" format: "int64" CpuPercent: description: | The usable percentage of the available CPUs (Windows only). On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last. type: "integer" format: "int64" IOMaximumIOps: description: "Maximum IOps for the container system drive (Windows only)" type: "integer" format: "int64" IOMaximumBandwidth: description: | Maximum IO in bytes per second for the container system drive (Windows only). type: "integer" format: "int64" Limit: description: | An object describing a limit on resources which can be requested by a task. type: "object" properties: NanoCPUs: type: "integer" format: "int64" example: 4000000000 MemoryBytes: type: "integer" format: "int64" example: 8272408576 Pids: description: | Limits the maximum number of PIDs in the container. Set `0` for unlimited. type: "integer" format: "int64" default: 0 example: 100 ResourceObject: description: | An object describing the resources which can be advertised by a node and requested by a task. type: "object" properties: NanoCPUs: type: "integer" format: "int64" example: 4000000000 MemoryBytes: type: "integer" format: "int64" example: 8272408576 GenericResources: $ref: "#/definitions/GenericResources" GenericResources: description: | User-defined resources can be either Integer resources (e.g, `SSD=3`) or String resources (e.g, `GPU=UUID1`). type: "array" items: type: "object" properties: NamedResourceSpec: type: "object" properties: Kind: type: "string" Value: type: "string" DiscreteResourceSpec: type: "object" properties: Kind: type: "string" Value: type: "integer" format: "int64" example: - DiscreteResourceSpec: Kind: "SSD" Value: 3 - NamedResourceSpec: Kind: "GPU" Value: "UUID1" - NamedResourceSpec: Kind: "GPU" Value: "UUID2" HealthConfig: description: "A test to perform to check that the container is healthy." type: "object" properties: Test: description: | The test to perform. Possible values are: - `[]` inherit healthcheck from image or parent image - `["NONE"]` disable healthcheck - `["CMD", args...]` exec arguments directly - `["CMD-SHELL", command]` run command with system's default shell type: "array" items: type: "string" Interval: description: | The time to wait between checks in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit. type: "integer" format: "int64" Timeout: description: | The time to wait before considering the check to have hung. It should be 0 or at least 1000000 (1 ms). 0 means inherit. type: "integer" format: "int64" Retries: description: | The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit. type: "integer" StartPeriod: description: | Start period for the container to initialize before starting health-retries countdown in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit. type: "integer" format: "int64" StartInterval: description: | The time to wait between checks in nanoseconds during the start period. It should be 0 or at least 1000000 (1 ms). 0 means inherit. type: "integer" format: "int64" Health: description: | Health stores information about the container's healthcheck results. type: "object" x-nullable: true properties: Status: description: | Status is one of `none`, `starting`, `healthy` or `unhealthy` - "none" Indicates there is no healthcheck - "starting" Starting indicates that the container is not yet ready - "healthy" Healthy indicates that the container is running correctly - "unhealthy" Unhealthy indicates that the container has a problem type: "string" enum: - "none" - "starting" - "healthy" - "unhealthy" example: "healthy" FailingStreak: description: "FailingStreak is the number of consecutive failures" type: "integer" example: 0 Log: type: "array" description: | Log contains the last few results (oldest first) items: $ref: "#/definitions/HealthcheckResult" HealthcheckResult: description: | HealthcheckResult stores information about a single run of a healthcheck probe type: "object" x-nullable: true properties: Start: description: | Date and time at which this check started in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. type: "string" format: "date-time" example: "2020-01-04T10:44:24.496525531Z" End: description: | Date and time at which this check ended in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. type: "string" format: "dateTime" example: "2020-01-04T10:45:21.364524523Z" ExitCode: description: | ExitCode meanings: - `0` healthy - `1` unhealthy - `2` reserved (considered unhealthy) - other values: error running probe type: "integer" example: 0 Output: description: "Output from last check" type: "string" HostConfig: description: "Container configuration that depends on the host we are running on" allOf: - $ref: "#/definitions/Resources" - type: "object" properties: # Applicable to all platforms Binds: type: "array" description: | A list of volume bindings for this container. Each volume binding is a string in one of these forms: - `host-src:container-dest[:options]` to bind-mount a host path into the container. Both `host-src`, and `container-dest` must be an _absolute_ path. - `volume-name:container-dest[:options]` to bind-mount a volume managed by a volume driver into the container. `container-dest` must be an _absolute_ path. `options` is an optional, comma-delimited list of: - `nocopy` disables automatic copying of data from the container path to the volume. The `nocopy` flag only applies to named volumes. - `[ro|rw]` mounts a volume read-only or read-write, respectively. If omitted or set to `rw`, volumes are mounted read-write. - `[z|Z]` applies SELinux labels to allow or deny multiple containers to read and write to the same volume. - `z`: a _shared_ content label is applied to the content. This label indicates that multiple containers can share the volume content, for both reading and writing. - `Z`: a _private unshared_ label is applied to the content. This label indicates that only the current container can use a private volume. Labeling systems such as SELinux require proper labels to be placed on volume content that is mounted into a container. Without a label, the security system can prevent a container's processes from using the content. By default, the labels set by the host operating system are not modified. - `[[r]shared|[r]slave|[r]private]` specifies mount [propagation behavior](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt). This only applies to bind-mounted volumes, not internal volumes or named volumes. Mount propagation requires the source mount point (the location where the source directory is mounted in the host operating system) to have the correct propagation properties. For shared volumes, the source mount point must be set to `shared`. For slave volumes, the mount must be set to either `shared` or `slave`. items: type: "string" ContainerIDFile: type: "string" description: "Path to a file where the container ID is written" example: "" LogConfig: type: "object" description: "The logging configuration for this container" properties: Type: description: |- Name of the logging driver used for the container or "none" if logging is disabled. type: "string" enum: - "local" - "json-file" - "syslog" - "journald" - "gelf" - "fluentd" - "awslogs" - "splunk" - "etwlogs" - "none" Config: description: |- Driver-specific configuration options for the logging driver. type: "object" additionalProperties: type: "string" example: "max-file": "5" "max-size": "10m" NetworkMode: type: "string" description: | Network mode to use for this container. Supported standard values are: `bridge`, `host`, `none`, and `container:`. Any other value is taken as a custom network's name to which this container should connect to. PortBindings: $ref: "#/definitions/PortMap" RestartPolicy: $ref: "#/definitions/RestartPolicy" AutoRemove: type: "boolean" description: | Automatically remove the container when the container's process exits. This has no effect if `RestartPolicy` is set. VolumeDriver: type: "string" description: "Driver that this container uses to mount volumes." VolumesFrom: type: "array" description: | A list of volumes to inherit from another container, specified in the form `[:]`. items: type: "string" Mounts: description: | Specification for mounts to be added to the container. type: "array" items: $ref: "#/definitions/Mount" ConsoleSize: type: "array" description: | Initial console size, as an `[height, width]` array. x-nullable: true minItems: 2 maxItems: 2 items: type: "integer" minimum: 0 example: [80, 64] Annotations: type: "object" description: | Arbitrary non-identifying metadata attached to container and provided to the runtime when the container is started. additionalProperties: type: "string" # Applicable to UNIX platforms CapAdd: type: "array" description: | A list of kernel capabilities to add to the container. Conflicts with option 'Capabilities'. items: type: "string" CapDrop: type: "array" description: | A list of kernel capabilities to drop from the container. Conflicts with option 'Capabilities'. items: type: "string" CgroupnsMode: type: "string" enum: - "private" - "host" description: | cgroup namespace mode for the container. Possible values are: - `"private"`: the container runs in its own private cgroup namespace - `"host"`: use the host system's cgroup namespace If not specified, the daemon default is used, which can either be `"private"` or `"host"`, depending on daemon version, kernel support and configuration. Dns: type: "array" description: "A list of DNS servers for the container to use." items: type: "string" DnsOptions: type: "array" description: "A list of DNS options." items: type: "string" DnsSearch: type: "array" description: "A list of DNS search domains." items: type: "string" ExtraHosts: type: "array" description: | A list of hostnames/IP mappings to add to the container's `/etc/hosts` file. Specified in the form `["hostname:IP"]`. items: type: "string" GroupAdd: type: "array" description: | A list of additional groups that the container process will run as. items: type: "string" IpcMode: type: "string" description: | IPC sharing mode for the container. Possible values are: - `"none"`: own private IPC namespace, with /dev/shm not mounted - `"private"`: own private IPC namespace - `"shareable"`: own private IPC namespace, with a possibility to share it with other containers - `"container:"`: join another (shareable) container's IPC namespace - `"host"`: use the host system's IPC namespace If not specified, daemon default is used, which can either be `"private"` or `"shareable"`, depending on daemon version and configuration. Cgroup: type: "string" description: "Cgroup to use for the container." Links: type: "array" description: | A list of links for the container in the form `container_name:alias`. items: type: "string" OomScoreAdj: type: "integer" description: | An integer value containing the score given to the container in order to tune OOM killer preferences. example: 500 PidMode: type: "string" description: | Set the PID (Process) Namespace mode for the container. It can be either: - `"container:"`: joins another container's PID namespace - `"host"`: use the host's PID namespace inside the container Privileged: type: "boolean" description: |- Gives the container full access to the host. PublishAllPorts: type: "boolean" description: | Allocates an ephemeral host port for all of a container's exposed ports. Ports are de-allocated when the container stops and allocated when the container starts. The allocated port might be changed when restarting the container. The port is selected from the ephemeral port range that depends on the kernel. For example, on Linux the range is defined by `/proc/sys/net/ipv4/ip_local_port_range`. ReadonlyRootfs: type: "boolean" description: "Mount the container's root filesystem as read only." SecurityOpt: type: "array" description: | A list of string values to customize labels for MLS systems, such as SELinux. items: type: "string" StorageOpt: type: "object" description: | Storage driver options for this container, in the form `{"size": "120G"}`. additionalProperties: type: "string" Tmpfs: type: "object" description: | A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options. For example: ``` { "/run": "rw,noexec,nosuid,size=65536k" } ``` additionalProperties: type: "string" UTSMode: type: "string" description: "UTS namespace to use for the container." UsernsMode: type: "string" description: | Sets the usernamespace mode for the container when usernamespace remapping option is enabled. ShmSize: type: "integer" format: "int64" description: | Size of `/dev/shm` in bytes. If omitted, the system uses 64MB. minimum: 0 Sysctls: type: "object" x-nullable: true description: |- A list of kernel parameters (sysctls) to set in the container. This field is omitted if not set. additionalProperties: type: "string" example: "net.ipv4.ip_forward": "1" Runtime: type: "string" x-nullable: true description: |- Runtime to use with this container. # Applicable to Windows Isolation: type: "string" description: | Isolation technology of the container. (Windows only) enum: - "default" - "process" - "hyperv" - "" MaskedPaths: type: "array" description: | The list of paths to be masked inside the container (this overrides the default set of paths). items: type: "string" example: - "/proc/asound" - "/proc/acpi" - "/proc/kcore" - "/proc/keys" - "/proc/latency_stats" - "/proc/timer_list" - "/proc/timer_stats" - "/proc/sched_debug" - "/proc/scsi" - "/sys/firmware" - "/sys/devices/virtual/powercap" ReadonlyPaths: type: "array" description: | The list of paths to be set as read-only inside the container (this overrides the default set of paths). items: type: "string" example: - "/proc/bus" - "/proc/fs" - "/proc/irq" - "/proc/sys" - "/proc/sysrq-trigger" ContainerConfig: description: | Configuration for a container that is portable between hosts. type: "object" properties: Hostname: description: | The hostname to use for the container, as a valid RFC 1123 hostname. type: "string" example: "439f4e91bd1d" Domainname: description: | The domain name to use for the container. type: "string" User: description: |- Commands run as this user inside the container. If omitted, commands run as the user specified in the image the container was started from. Can be either user-name or UID, and optional group-name or GID, separated by a colon (`[<:group-name|GID>]`). type: "string" example: "123:456" AttachStdin: description: "Whether to attach to `stdin`." type: "boolean" default: false AttachStdout: description: "Whether to attach to `stdout`." type: "boolean" default: true AttachStderr: description: "Whether to attach to `stderr`." type: "boolean" default: true ExposedPorts: description: | An object mapping ports to an empty object in the form: `{"/": {}}` type: "object" x-nullable: true additionalProperties: type: "object" enum: - {} default: {} example: { "80/tcp": {}, "443/tcp": {} } Tty: description: | Attach standard streams to a TTY, including `stdin` if it is not closed. type: "boolean" default: false OpenStdin: description: "Open `stdin`" type: "boolean" default: false StdinOnce: description: "Close `stdin` after one attached client disconnects" type: "boolean" default: false Env: description: | A list of environment variables to set inside the container in the form `["VAR=value", ...]`. A variable without `=` is removed from the environment, rather than to have an empty value. type: "array" items: type: "string" example: - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" Cmd: description: | Command to run specified as a string or an array of strings. type: "array" items: type: "string" example: ["/bin/sh"] Healthcheck: $ref: "#/definitions/HealthConfig" ArgsEscaped: description: "Command is already escaped (Windows only)" type: "boolean" default: false example: false x-nullable: true Image: description: | The name (or reference) of the image to use when creating the container, or which was used when the container was created. type: "string" example: "example-image:1.0" Volumes: description: | An object mapping mount point paths inside the container to empty objects. type: "object" additionalProperties: type: "object" enum: - {} default: {} WorkingDir: description: "The working directory for commands to run in." type: "string" example: "/public/" Entrypoint: description: | The entry point for the container as a string or an array of strings. If the array consists of exactly one empty string (`[""]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). type: "array" items: type: "string" example: [] NetworkDisabled: description: "Disable networking for the container." type: "boolean" x-nullable: true MacAddress: description: | MAC address of the container. Deprecated: this field is deprecated in API v1.44 and up. Use EndpointSettings.MacAddress instead. type: "string" x-nullable: true OnBuild: description: | `ONBUILD` metadata that were defined in the image's `Dockerfile`. type: "array" x-nullable: true items: type: "string" example: [] Labels: description: "User-defined key/value metadata." type: "object" additionalProperties: type: "string" example: com.example.some-label: "some-value" com.example.some-other-label: "some-other-value" StopSignal: description: | Signal to stop a container as a string or unsigned integer. type: "string" example: "SIGTERM" x-nullable: true StopTimeout: description: "Timeout to stop a container in seconds." type: "integer" default: 10 x-nullable: true Shell: description: | Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. type: "array" x-nullable: true items: type: "string" example: ["/bin/sh", "-c"] ImageConfig: description: | Configuration of the image. These fields are used as defaults when starting a container from the image. type: "object" properties: User: description: "The user that commands are run as inside the container." type: "string" example: "web:web" ExposedPorts: description: | An object mapping ports to an empty object in the form: `{"/": {}}` type: "object" x-nullable: true additionalProperties: type: "object" enum: - {} default: {} example: { "80/tcp": {}, "443/tcp": {} } Env: description: | A list of environment variables to set inside the container in the form `["VAR=value", ...]`. A variable without `=` is removed from the environment, rather than to have an empty value. type: "array" items: type: "string" example: - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" Cmd: description: | Command to run specified as a string or an array of strings. type: "array" items: type: "string" example: ["/bin/sh"] Healthcheck: $ref: "#/definitions/HealthConfig" ArgsEscaped: description: "Command is already escaped (Windows only)" type: "boolean" default: false example: false x-nullable: true Volumes: description: | An object mapping mount point paths inside the container to empty objects. type: "object" additionalProperties: type: "object" enum: - {} default: {} example: "/app/data": {} "/app/config": {} WorkingDir: description: "The working directory for commands to run in." type: "string" example: "/public/" Entrypoint: description: | The entry point for the container as a string or an array of strings. If the array consists of exactly one empty string (`[""]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). type: "array" items: type: "string" example: [] OnBuild: description: | `ONBUILD` metadata that were defined in the image's `Dockerfile`. type: "array" x-nullable: true items: type: "string" example: [] Labels: description: "User-defined key/value metadata." type: "object" additionalProperties: type: "string" example: com.example.some-label: "some-value" com.example.some-other-label: "some-other-value" StopSignal: description: | Signal to stop a container as a string or unsigned integer. type: "string" example: "SIGTERM" x-nullable: true Shell: description: | Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. type: "array" x-nullable: true items: type: "string" example: ["/bin/sh", "-c"] NetworkingConfig: description: | NetworkingConfig represents the container's networking configuration for each of its interfaces. It is used for the networking configs specified in the `docker create` and `docker network connect` commands. type: "object" properties: EndpointsConfig: description: | A mapping of network name to endpoint configuration for that network. The endpoint configuration can be left empty to connect to that network with no particular endpoint configuration. type: "object" additionalProperties: $ref: "#/definitions/EndpointSettings" example: # putting an example here, instead of using the example values from # /definitions/EndpointSettings, because EndpointSettings contains # operational data returned when inspecting a container that we don't # accept here. EndpointsConfig: isolated_nw: IPAMConfig: IPv4Address: "172.20.30.33" IPv6Address: "2001:db8:abcd::3033" LinkLocalIPs: - "169.254.34.68" - "fe80::3468" MacAddress: "02:42:ac:12:05:02" Links: - "container_1" - "container_2" Aliases: - "server_x" - "server_y" database_nw: {} NetworkSettings: description: "NetworkSettings exposes the network settings in the API" type: "object" properties: Bridge: description: | Name of the default bridge interface when dockerd's --bridge flag is set. Deprecated: This field is only set when the daemon is started with the --bridge flag specified. type: "string" example: "docker0" SandboxID: description: SandboxID uniquely represents a container's network stack. type: "string" example: "9d12daf2c33f5959c8bf90aa513e4f65b561738661003029ec84830cd503a0c3" HairpinMode: description: | Indicates if hairpin NAT should be enabled on the virtual interface. Deprecated: This field is never set and will be removed in a future release. type: "boolean" example: false LinkLocalIPv6Address: description: | IPv6 unicast address using the link-local prefix. Deprecated: This field is never set and will be removed in a future release. type: "string" example: "" LinkLocalIPv6PrefixLen: description: | Prefix length of the IPv6 unicast address. Deprecated: This field is never set and will be removed in a future release. type: "integer" example: "" Ports: $ref: "#/definitions/PortMap" SandboxKey: description: SandboxKey is the full path of the netns handle type: "string" example: "/var/run/docker/netns/8ab54b426c38" SecondaryIPAddresses: description: "Deprecated: This field is never set and will be removed in a future release." type: "array" items: $ref: "#/definitions/Address" x-nullable: true SecondaryIPv6Addresses: description: "Deprecated: This field is never set and will be removed in a future release." type: "array" items: $ref: "#/definitions/Address" x-nullable: true # TODO properties below are part of DefaultNetworkSettings, which is # marked as deprecated since Docker 1.9 and to be removed in Docker v17.12 EndpointID: description: | EndpointID uniquely represents a service endpoint in a Sandbox.


> **Deprecated**: This field is only propagated when attached to the > default "bridge" network. Use the information from the "bridge" > network inside the `Networks` map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0 type: "string" example: "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b" Gateway: description: | Gateway address for the default "bridge" network.


> **Deprecated**: This field is only propagated when attached to the > default "bridge" network. Use the information from the "bridge" > network inside the `Networks` map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0 type: "string" example: "172.17.0.1" GlobalIPv6Address: description: | Global IPv6 address for the default "bridge" network.


> **Deprecated**: This field is only propagated when attached to the > default "bridge" network. Use the information from the "bridge" > network inside the `Networks` map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0 type: "string" example: "2001:db8::5689" GlobalIPv6PrefixLen: description: | Mask length of the global IPv6 address.


> **Deprecated**: This field is only propagated when attached to the > default "bridge" network. Use the information from the "bridge" > network inside the `Networks` map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0 type: "integer" example: 64 IPAddress: description: | IPv4 address for the default "bridge" network.


> **Deprecated**: This field is only propagated when attached to the > default "bridge" network. Use the information from the "bridge" > network inside the `Networks` map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0 type: "string" example: "172.17.0.4" IPPrefixLen: description: | Mask length of the IPv4 address.


> **Deprecated**: This field is only propagated when attached to the > default "bridge" network. Use the information from the "bridge" > network inside the `Networks` map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0 type: "integer" example: 16 IPv6Gateway: description: | IPv6 gateway address for this network.


> **Deprecated**: This field is only propagated when attached to the > default "bridge" network. Use the information from the "bridge" > network inside the `Networks` map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0 type: "string" example: "2001:db8:2::100" MacAddress: description: | MAC address for the container on the default "bridge" network.


> **Deprecated**: This field is only propagated when attached to the > default "bridge" network. Use the information from the "bridge" > network inside the `Networks` map instead, which contains the same > information. This field was deprecated in Docker 1.9 and is scheduled > to be removed in Docker 17.12.0 type: "string" example: "02:42:ac:11:00:04" Networks: description: | Information about all networks that the container is connected to. type: "object" additionalProperties: $ref: "#/definitions/EndpointSettings" Address: description: Address represents an IPv4 or IPv6 IP address. type: "object" properties: Addr: description: IP address. type: "string" PrefixLen: description: Mask length of the IP address. type: "integer" PortMap: description: | PortMap describes the mapping of container ports to host ports, using the container's port-number and protocol as key in the format `/`, for example, `80/udp`. If a container's port is mapped for multiple protocols, separate entries are added to the mapping table. type: "object" additionalProperties: type: "array" x-nullable: true items: $ref: "#/definitions/PortBinding" example: "443/tcp": - HostIp: "127.0.0.1" HostPort: "4443" "80/tcp": - HostIp: "0.0.0.0" HostPort: "80" - HostIp: "0.0.0.0" HostPort: "8080" "80/udp": - HostIp: "0.0.0.0" HostPort: "80" "53/udp": - HostIp: "0.0.0.0" HostPort: "53" "2377/tcp": null PortBinding: description: | PortBinding represents a binding between a host IP address and a host port. type: "object" properties: HostIp: description: "Host IP address that the container's port is mapped to." type: "string" example: "127.0.0.1" HostPort: description: "Host port number that the container's port is mapped to." type: "string" example: "4443" DriverData: description: | Information about the storage driver used to store the container's and image's filesystem. type: "object" required: [Name, Data] properties: Name: description: "Name of the storage driver." type: "string" x-nullable: false example: "overlay2" Data: description: | Low-level storage metadata, provided as key/value pairs. This information is driver-specific, and depends on the storage-driver in use, and should be used for informational purposes only. type: "object" x-nullable: false additionalProperties: type: "string" example: { "MergedDir": "/var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/merged", "UpperDir": "/var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/diff", "WorkDir": "/var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/work" } FilesystemChange: description: | Change in the container's filesystem. type: "object" required: [Path, Kind] properties: Path: description: | Path to file or directory that has changed. type: "string" x-nullable: false Kind: $ref: "#/definitions/ChangeType" ChangeType: description: | Kind of change Can be one of: - `0`: Modified ("C") - `1`: Added ("A") - `2`: Deleted ("D") type: "integer" format: "uint8" enum: [0, 1, 2] x-nullable: false ImageInspect: description: | Information about an image in the local image cache. type: "object" properties: Id: description: | ID is the content-addressable ID of an image. This identifier is a content-addressable digest calculated from the image's configuration (which includes the digests of layers used by the image). Note that this digest differs from the `RepoDigests` below, which holds digests of image manifests that reference the image. type: "string" x-nullable: false example: "sha256:ec3f0931a6e6b6855d76b2d7b0be30e81860baccd891b2e243280bf1cd8ad710" Descriptor: description: | Descriptor is an OCI descriptor of the image target. In case of a multi-platform image, this descriptor points to the OCI index or a manifest list. This field is only present if the daemon provides a multi-platform image store. WARNING: This is experimental and may change at any time without any backward compatibility. x-nullable: true $ref: "#/definitions/OCIDescriptor" Manifests: description: | Manifests is a list of image manifests available in this image. It provides a more detailed view of the platform-specific image manifests or other image-attached data like build attestations. Only available if the daemon provides a multi-platform image store and the `manifests` option is set in the inspect request. WARNING: This is experimental and may change at any time without any backward compatibility. type: "array" x-nullable: true items: $ref: "#/definitions/ImageManifestSummary" RepoTags: description: | List of image names/tags in the local image cache that reference this image. Multiple image tags can refer to the same image, and this list may be empty if no tags reference the image, in which case the image is "untagged", in which case it can still be referenced by its ID. type: "array" items: type: "string" example: - "example:1.0" - "example:latest" - "example:stable" - "internal.registry.example.com:5000/example:1.0" RepoDigests: description: | List of content-addressable digests of locally available image manifests that the image is referenced from. Multiple manifests can refer to the same image. These digests are usually only available if the image was either pulled from a registry, or if the image was pushed to a registry, which is when the manifest is generated and its digest calculated. type: "array" items: type: "string" example: - "example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb" - "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578" Parent: description: | ID of the parent image. Depending on how the image was created, this field may be empty and is only set for images that were built/created locally. This field is empty if the image was pulled from an image registry. > **Deprecated**: This field is only set when using the deprecated > legacy builder. It is included in API responses for informational > purposes, but should not be depended on as it will be omitted > once the legacy builder is removed. type: "string" x-nullable: false example: "" Comment: description: | Optional message that was set when committing or importing the image. type: "string" x-nullable: false example: "" Created: description: | Date and time at which the image was created, formatted in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. This information is only available if present in the image, and omitted otherwise. type: "string" format: "dateTime" x-nullable: true example: "2022-02-04T21:20:12.497794809Z" DockerVersion: description: | The version of Docker that was used to build the image. Depending on how the image was created, this field may be empty. > **Deprecated**: This field is only set when using the deprecated > legacy builder. It is included in API responses for informational > purposes, but should not be depended on as it will be omitted > once the legacy builder is removed. type: "string" x-nullable: false example: "27.0.1" Author: description: | Name of the author that was specified when committing the image, or as specified through MAINTAINER (deprecated) in the Dockerfile. type: "string" x-nullable: false example: "" Config: $ref: "#/definitions/ImageConfig" Architecture: description: | Hardware CPU architecture that the image runs on. type: "string" x-nullable: false example: "arm" Variant: description: | CPU architecture variant (presently ARM-only). type: "string" x-nullable: true example: "v7" Os: description: | Operating System the image is built to run on. type: "string" x-nullable: false example: "linux" OsVersion: description: | Operating System version the image is built to run on (especially for Windows). type: "string" example: "" x-nullable: true Size: description: | Total size of the image including all layers it is composed of. type: "integer" format: "int64" x-nullable: false example: 1239828 GraphDriver: $ref: "#/definitions/DriverData" RootFS: description: | Information about the image's RootFS, including the layer IDs. type: "object" required: [Type] properties: Type: type: "string" x-nullable: false example: "layers" Layers: type: "array" items: type: "string" example: - "sha256:1834950e52ce4d5a88a1bbd131c537f4d0e56d10ff0dd69e66be3b7dfa9df7e6" - "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef" Metadata: description: | Additional metadata of the image in the local cache. This information is local to the daemon, and not part of the image itself. type: "object" properties: LastTagTime: description: | Date and time at which the image was last tagged in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. This information is only available if the image was tagged locally, and omitted otherwise. type: "string" format: "dateTime" example: "2022-02-28T14:40:02.623929178Z" x-nullable: true ImageSummary: type: "object" x-go-name: "Summary" required: - Id - ParentId - RepoTags - RepoDigests - Created - Size - SharedSize - Labels - Containers properties: Id: description: | ID is the content-addressable ID of an image. This identifier is a content-addressable digest calculated from the image's configuration (which includes the digests of layers used by the image). Note that this digest differs from the `RepoDigests` below, which holds digests of image manifests that reference the image. type: "string" x-nullable: false example: "sha256:ec3f0931a6e6b6855d76b2d7b0be30e81860baccd891b2e243280bf1cd8ad710" ParentId: description: | ID of the parent image. Depending on how the image was created, this field may be empty and is only set for images that were built/created locally. This field is empty if the image was pulled from an image registry. type: "string" x-nullable: false example: "" RepoTags: description: | List of image names/tags in the local image cache that reference this image. Multiple image tags can refer to the same image, and this list may be empty if no tags reference the image, in which case the image is "untagged", in which case it can still be referenced by its ID. type: "array" x-nullable: false items: type: "string" example: - "example:1.0" - "example:latest" - "example:stable" - "internal.registry.example.com:5000/example:1.0" RepoDigests: description: | List of content-addressable digests of locally available image manifests that the image is referenced from. Multiple manifests can refer to the same image. These digests are usually only available if the image was either pulled from a registry, or if the image was pushed to a registry, which is when the manifest is generated and its digest calculated. type: "array" x-nullable: false items: type: "string" example: - "example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb" - "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578" Created: description: | Date and time at which the image was created as a Unix timestamp (number of seconds since EPOCH). type: "integer" x-nullable: false example: "1644009612" Size: description: | Total size of the image including all layers it is composed of. type: "integer" format: "int64" x-nullable: false example: 172064416 SharedSize: description: | Total size of image layers that are shared between this image and other images. This size is not calculated by default. `-1` indicates that the value has not been set / calculated. type: "integer" format: "int64" x-nullable: false example: 1239828 Labels: description: "User-defined key/value metadata." type: "object" x-nullable: false additionalProperties: type: "string" example: com.example.some-label: "some-value" com.example.some-other-label: "some-other-value" Containers: description: | Number of containers using this image. Includes both stopped and running containers. `-1` indicates that the value has not been set / calculated. x-nullable: false type: "integer" example: 2 Manifests: description: | Manifests is a list of manifests available in this image. It provides a more detailed view of the platform-specific image manifests or other image-attached data like build attestations. WARNING: This is experimental and may change at any time without any backward compatibility. type: "array" x-nullable: false x-omitempty: true items: $ref: "#/definitions/ImageManifestSummary" Descriptor: description: | Descriptor is an OCI descriptor of the image target. In case of a multi-platform image, this descriptor points to the OCI index or a manifest list. This field is only present if the daemon provides a multi-platform image store. WARNING: This is experimental and may change at any time without any backward compatibility. x-nullable: true $ref: "#/definitions/OCIDescriptor" AuthConfig: type: "object" properties: username: type: "string" password: type: "string" email: description: | Email is an optional value associated with the username. > **Deprecated**: This field is deprecated since docker 1.11 (API v1.23) and will be removed in a future release. type: "string" serveraddress: type: "string" example: username: "hannibal" password: "xxxx" serveraddress: "https://index.docker.io/v1/" ProcessConfig: type: "object" properties: privileged: type: "boolean" user: type: "string" tty: type: "boolean" entrypoint: type: "string" arguments: type: "array" items: type: "string" Volume: type: "object" required: [Name, Driver, Mountpoint, Labels, Scope, Options] properties: Name: type: "string" description: "Name of the volume." x-nullable: false example: "tardis" Driver: type: "string" description: "Name of the volume driver used by the volume." x-nullable: false example: "custom" Mountpoint: type: "string" description: "Mount path of the volume on the host." x-nullable: false example: "/var/lib/docker/volumes/tardis" CreatedAt: type: "string" format: "dateTime" description: "Date/Time the volume was created." example: "2016-06-07T20:31:11.853781916Z" Status: type: "object" description: | Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{"key":"value","key2":"value2"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature. additionalProperties: type: "object" example: hello: "world" Labels: type: "object" description: "User-defined key/value metadata." x-nullable: false additionalProperties: type: "string" example: com.example.some-label: "some-value" com.example.some-other-label: "some-other-value" Scope: type: "string" description: | The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. default: "local" x-nullable: false enum: ["local", "global"] example: "local" ClusterVolume: $ref: "#/definitions/ClusterVolume" Options: type: "object" description: | The driver specific options used when creating the volume. additionalProperties: type: "string" example: device: "tmpfs" o: "size=100m,uid=1000" type: "tmpfs" UsageData: type: "object" x-nullable: true x-go-name: "UsageData" required: [Size, RefCount] description: | Usage details about the volume. This information is used by the `GET /system/df` endpoint, and omitted in other endpoints. properties: Size: type: "integer" format: "int64" default: -1 description: | Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `"local"` volume driver. For volumes created with other volume drivers, this field is set to `-1` ("not available") x-nullable: false RefCount: type: "integer" format: "int64" default: -1 description: | The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. x-nullable: false VolumeCreateOptions: description: "Volume configuration" type: "object" title: "VolumeConfig" x-go-name: "CreateOptions" properties: Name: description: | The new volume's name. If not specified, Docker generates a name. type: "string" x-nullable: false example: "tardis" Driver: description: "Name of the volume driver to use." type: "string" default: "local" x-nullable: false example: "custom" DriverOpts: description: | A mapping of driver options and values. These options are passed directly to the driver and are driver specific. type: "object" additionalProperties: type: "string" example: device: "tmpfs" o: "size=100m,uid=1000" type: "tmpfs" Labels: description: "User-defined key/value metadata." type: "object" additionalProperties: type: "string" example: com.example.some-label: "some-value" com.example.some-other-label: "some-other-value" ClusterVolumeSpec: $ref: "#/definitions/ClusterVolumeSpec" VolumeListResponse: type: "object" title: "VolumeListResponse" x-go-name: "ListResponse" description: "Volume list response" properties: Volumes: type: "array" description: "List of volumes" items: $ref: "#/definitions/Volume" Warnings: type: "array" description: | Warnings that occurred when fetching the list of volumes. items: type: "string" example: [] Network: type: "object" properties: Name: description: | Name of the network. type: "string" example: "my_network" Id: description: | ID that uniquely identifies a network on a single machine. type: "string" example: "7d86d31b1478e7cca9ebed7e73aa0fdeec46c5ca29497431d3007d2d9e15ed99" Created: description: | Date and time at which the network was created in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. type: "string" format: "dateTime" example: "2016-10-19T04:33:30.360899459Z" Scope: description: | The level at which the network exists (e.g. `swarm` for cluster-wide or `local` for machine level) type: "string" example: "local" Driver: description: | The name of the driver used to create the network (e.g. `bridge`, `overlay`). type: "string" example: "overlay" EnableIPv4: description: | Whether the network was created with IPv4 enabled. type: "boolean" example: true EnableIPv6: description: | Whether the network was created with IPv6 enabled. type: "boolean" example: false IPAM: $ref: "#/definitions/IPAM" Internal: description: | Whether the network is created to only allow internal networking connectivity. type: "boolean" default: false example: false Attachable: description: | Whether a global / swarm scope network is manually attachable by regular containers from workers in swarm mode. type: "boolean" default: false example: false Ingress: description: | Whether the network is providing the routing-mesh for the swarm cluster. type: "boolean" default: false example: false ConfigFrom: $ref: "#/definitions/ConfigReference" ConfigOnly: description: | Whether the network is a config-only network. Config-only networks are placeholder networks for network configurations to be used by other networks. Config-only networks cannot be used directly to run containers or services. type: "boolean" default: false Containers: description: | Contains endpoints attached to the network. type: "object" additionalProperties: $ref: "#/definitions/NetworkContainer" example: 19a4d5d687db25203351ed79d478946f861258f018fe384f229f2efa4b23513c: Name: "test" EndpointID: "628cadb8bcb92de107b2a1e516cbffe463e321f548feb37697cce00ad694f21a" MacAddress: "02:42:ac:13:00:02" IPv4Address: "172.19.0.2/16" IPv6Address: "" Options: description: | Network-specific options uses when creating the network. type: "object" additionalProperties: type: "string" example: com.docker.network.bridge.default_bridge: "true" com.docker.network.bridge.enable_icc: "true" com.docker.network.bridge.enable_ip_masquerade: "true" com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" com.docker.network.bridge.name: "docker0" com.docker.network.driver.mtu: "1500" Labels: description: "User-defined key/value metadata." type: "object" additionalProperties: type: "string" example: com.example.some-label: "some-value" com.example.some-other-label: "some-other-value" Peers: description: | List of peer nodes for an overlay network. This field is only present for overlay networks, and omitted for other network types. type: "array" items: $ref: "#/definitions/PeerInfo" x-nullable: true # TODO: Add Services (only present when "verbose" is set). ConfigReference: description: | The config-only network source to provide the configuration for this network. type: "object" properties: Network: description: | The name of the config-only network that provides the network's configuration. The specified network must be an existing config-only network. Only network names are allowed, not network IDs. type: "string" example: "config_only_network_01" IPAM: type: "object" properties: Driver: description: "Name of the IPAM driver to use." type: "string" default: "default" example: "default" Config: description: | List of IPAM configuration options, specified as a map: ``` {"Subnet": , "IPRange": , "Gateway": , "AuxAddress": } ``` type: "array" items: $ref: "#/definitions/IPAMConfig" Options: description: "Driver-specific options, specified as a map." type: "object" additionalProperties: type: "string" example: foo: "bar" IPAMConfig: type: "object" properties: Subnet: type: "string" example: "172.20.0.0/16" IPRange: type: "string" example: "172.20.10.0/24" Gateway: type: "string" example: "172.20.10.11" AuxiliaryAddresses: type: "object" additionalProperties: type: "string" NetworkContainer: type: "object" properties: Name: type: "string" example: "container_1" EndpointID: type: "string" example: "628cadb8bcb92de107b2a1e516cbffe463e321f548feb37697cce00ad694f21a" MacAddress: type: "string" example: "02:42:ac:13:00:02" IPv4Address: type: "string" example: "172.19.0.2/16" IPv6Address: type: "string" example: "" PeerInfo: description: | PeerInfo represents one peer of an overlay network. type: "object" properties: Name: description: ID of the peer-node in the Swarm cluster. type: "string" example: "6869d7c1732b" IP: description: IP-address of the peer-node in the Swarm cluster. type: "string" example: "10.133.77.91" NetworkCreateResponse: description: "OK response to NetworkCreate operation" type: "object" title: "NetworkCreateResponse" x-go-name: "CreateResponse" required: [Id, Warning] properties: Id: description: "The ID of the created network." type: "string" x-nullable: false example: "b5c4fc71e8022147cd25de22b22173de4e3b170134117172eb595cb91b4e7e5d" Warning: description: "Warnings encountered when creating the container" type: "string" x-nullable: false example: "" BuildInfo: type: "object" properties: id: type: "string" stream: type: "string" error: type: "string" x-nullable: true description: |- errors encountered during the operation. > **Deprecated**: This field is deprecated since API v1.4, and will be omitted in a future API version. Use the information in errorDetail instead. errorDetail: $ref: "#/definitions/ErrorDetail" status: type: "string" progress: type: "string" x-nullable: true description: |- Progress is a pre-formatted presentation of progressDetail. > **Deprecated**: This field is deprecated since API v1.8, and will be omitted in a future API version. Use the information in progressDetail instead. progressDetail: $ref: "#/definitions/ProgressDetail" aux: $ref: "#/definitions/ImageID" BuildCache: type: "object" description: | BuildCache contains information about a build cache record. properties: ID: type: "string" description: | Unique ID of the build cache record. example: "ndlpt0hhvkqcdfkputsk4cq9c" Parents: description: | List of parent build cache record IDs. type: "array" items: type: "string" x-nullable: true example: ["hw53o5aio51xtltp5xjp8v7fx"] Type: type: "string" description: | Cache record type. example: "regular" # see https://github.com/moby/buildkit/blob/fce4a32258dc9d9664f71a4831d5de10f0670677/client/diskusage.go#L75-L84 enum: - "internal" - "frontend" - "source.local" - "source.git.checkout" - "exec.cachemount" - "regular" Description: type: "string" description: | Description of the build-step that produced the build cache. example: "mount / from exec /bin/sh -c echo 'Binary::apt::APT::Keep-Downloaded-Packages \"true\";' > /etc/apt/apt.conf.d/keep-cache" InUse: type: "boolean" description: | Indicates if the build cache is in use. example: false Shared: type: "boolean" description: | Indicates if the build cache is shared. example: true Size: description: | Amount of disk space used by the build cache (in bytes). type: "integer" example: 51 CreatedAt: description: | Date and time at which the build cache was created in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. type: "string" format: "dateTime" example: "2016-08-18T10:44:24.496525531Z" LastUsedAt: description: | Date and time at which the build cache was last used in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. type: "string" format: "dateTime" x-nullable: true example: "2017-08-09T07:09:37.632105588Z" UsageCount: type: "integer" example: 26 ImageID: type: "object" description: "Image ID or Digest" properties: ID: type: "string" example: ID: "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c" CreateImageInfo: type: "object" properties: id: type: "string" error: type: "string" x-nullable: true description: |- errors encountered during the operation. > **Deprecated**: This field is deprecated since API v1.4, and will be omitted in a future API version. Use the information in errorDetail instead. errorDetail: $ref: "#/definitions/ErrorDetail" status: type: "string" progress: type: "string" x-nullable: true description: |- Progress is a pre-formatted presentation of progressDetail. > **Deprecated**: This field is deprecated since API v1.8, and will be omitted in a future API version. Use the information in progressDetail instead. progressDetail: $ref: "#/definitions/ProgressDetail" PushImageInfo: type: "object" properties: error: type: "string" x-nullable: true description: |- errors encountered during the operation. > **Deprecated**: This field is deprecated since API v1.4, and will be omitted in a future API version. Use the information in errorDetail instead. errorDetail: $ref: "#/definitions/ErrorDetail" status: type: "string" progress: type: "string" x-nullable: true description: |- Progress is a pre-formatted presentation of progressDetail. > **Deprecated**: This field is deprecated since API v1.8, and will be omitted in a future API version. Use the information in progressDetail instead. progressDetail: $ref: "#/definitions/ProgressDetail" DeviceInfo: type: "object" description: | DeviceInfo represents a device that can be used by a container. properties: Source: type: "string" example: "cdi" description: | The origin device driver. ID: type: "string" example: "vendor.com/gpu=0" description: | The unique identifier for the device within its source driver. For CDI devices, this would be an FQDN like "vendor.com/gpu=0". ErrorDetail: type: "object" properties: code: type: "integer" message: type: "string" ProgressDetail: type: "object" properties: current: type: "integer" total: type: "integer" ErrorResponse: description: "Represents an error." type: "object" required: ["message"] properties: message: description: "The error message." type: "string" x-nullable: false example: message: "Something went wrong." IDResponse: description: "Response to an API call that returns just an Id" type: "object" x-go-name: "IDResponse" required: ["Id"] properties: Id: description: "The id of the newly created object." type: "string" x-nullable: false EndpointSettings: description: "Configuration for a network endpoint." type: "object" properties: # Configurations IPAMConfig: $ref: "#/definitions/EndpointIPAMConfig" Links: type: "array" items: type: "string" example: - "container_1" - "container_2" MacAddress: description: | MAC address for the endpoint on this network. The network driver might ignore this parameter. type: "string" example: "02:42:ac:11:00:04" Aliases: type: "array" items: type: "string" example: - "server_x" - "server_y" DriverOpts: description: | DriverOpts is a mapping of driver options and values. These options are passed directly to the driver and are driver specific. type: "object" x-nullable: true additionalProperties: type: "string" example: com.example.some-label: "some-value" com.example.some-other-label: "some-other-value" GwPriority: description: | This property determines which endpoint will provide the default gateway for a container. The endpoint with the highest priority will be used. If multiple endpoints have the same priority, endpoints are lexicographically sorted based on their network name, and the one that sorts first is picked. type: "integer" format: "int64" example: - 10 # Operational data NetworkID: description: | Unique ID of the network. type: "string" example: "08754567f1f40222263eab4102e1c733ae697e8e354aa9cd6e18d7402835292a" EndpointID: description: | Unique ID for the service endpoint in a Sandbox. type: "string" example: "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b" Gateway: description: | Gateway address for this network. type: "string" example: "172.17.0.1" IPAddress: description: | IPv4 address. type: "string" example: "172.17.0.4" IPPrefixLen: description: | Mask length of the IPv4 address. type: "integer" example: 16 IPv6Gateway: description: | IPv6 gateway address. type: "string" example: "2001:db8:2::100" GlobalIPv6Address: description: | Global IPv6 address. type: "string" example: "2001:db8::5689" GlobalIPv6PrefixLen: description: | Mask length of the global IPv6 address. type: "integer" format: "int64" example: 64 DNSNames: description: | List of all DNS names an endpoint has on a specific network. This list is based on the container name, network aliases, container short ID, and hostname. These DNS names are non-fully qualified but can contain several dots. You can get fully qualified DNS names by appending `.`. For instance, if container name is `my.ctr` and the network is named `testnet`, `DNSNames` will contain `my.ctr` and the FQDN will be `my.ctr.testnet`. type: array items: type: string example: ["foobar", "server_x", "server_y", "my.ctr"] EndpointIPAMConfig: description: | EndpointIPAMConfig represents an endpoint's IPAM configuration. type: "object" x-nullable: true properties: IPv4Address: type: "string" example: "172.20.30.33" IPv6Address: type: "string" example: "2001:db8:abcd::3033" LinkLocalIPs: type: "array" items: type: "string" example: - "169.254.34.68" - "fe80::3468" PluginMount: type: "object" x-nullable: false required: [Name, Description, Settable, Source, Destination, Type, Options] properties: Name: type: "string" x-nullable: false example: "some-mount" Description: type: "string" x-nullable: false example: "This is a mount that's used by the plugin." Settable: type: "array" items: type: "string" Source: type: "string" example: "/var/lib/docker/plugins/" Destination: type: "string" x-nullable: false example: "/mnt/state" Type: type: "string" x-nullable: false example: "bind" Options: type: "array" items: type: "string" example: - "rbind" - "rw" PluginDevice: type: "object" required: [Name, Description, Settable, Path] x-nullable: false properties: Name: type: "string" x-nullable: false Description: type: "string" x-nullable: false Settable: type: "array" items: type: "string" Path: type: "string" example: "/dev/fuse" PluginEnv: type: "object" x-nullable: false required: [Name, Description, Settable, Value] properties: Name: x-nullable: false type: "string" Description: x-nullable: false type: "string" Settable: type: "array" items: type: "string" Value: type: "string" PluginInterfaceType: type: "object" x-nullable: false required: [Prefix, Capability, Version] properties: Prefix: type: "string" x-nullable: false Capability: type: "string" x-nullable: false Version: type: "string" x-nullable: false PluginPrivilege: description: | Describes a permission the user has to accept upon installing the plugin. type: "object" x-go-name: "PluginPrivilege" properties: Name: type: "string" example: "network" Description: type: "string" Value: type: "array" items: type: "string" example: - "host" Plugin: description: "A plugin for the Engine API" type: "object" required: [Settings, Enabled, Config, Name] properties: Id: type: "string" example: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078" Name: type: "string" x-nullable: false example: "tiborvass/sample-volume-plugin" Enabled: description: True if the plugin is running. False if the plugin is not running, only installed. type: "boolean" x-nullable: false example: true Settings: description: "Settings that can be modified by users." type: "object" x-nullable: false required: [Args, Devices, Env, Mounts] properties: Mounts: type: "array" items: $ref: "#/definitions/PluginMount" Env: type: "array" items: type: "string" example: - "DEBUG=0" Args: type: "array" items: type: "string" Devices: type: "array" items: $ref: "#/definitions/PluginDevice" PluginReference: description: "plugin remote reference used to push/pull the plugin" type: "string" x-nullable: false example: "localhost:5000/tiborvass/sample-volume-plugin:latest" Config: description: "The config of a plugin." type: "object" x-nullable: false required: - Description - Documentation - Interface - Entrypoint - WorkDir - Network - Linux - PidHost - PropagatedMount - IpcHost - Mounts - Env - Args properties: DockerVersion: description: |- Docker Version used to create the plugin. Depending on how the plugin was created, this field may be empty or omitted. Deprecated: this field is no longer set, and will be removed in the next API version. type: "string" x-nullable: false x-omitempty: true Description: type: "string" x-nullable: false example: "A sample volume plugin for Docker" Documentation: type: "string" x-nullable: false example: "https://docs.docker.com/engine/extend/plugins/" Interface: description: "The interface between Docker and the plugin" x-nullable: false type: "object" required: [Types, Socket] properties: Types: type: "array" items: $ref: "#/definitions/PluginInterfaceType" example: - "docker.volumedriver/1.0" Socket: type: "string" x-nullable: false example: "plugins.sock" ProtocolScheme: type: "string" example: "some.protocol/v1.0" description: "Protocol to use for clients connecting to the plugin." enum: - "" - "moby.plugins.http/v1" Entrypoint: type: "array" items: type: "string" example: - "/usr/bin/sample-volume-plugin" - "/data" WorkDir: type: "string" x-nullable: false example: "/bin/" User: type: "object" x-nullable: false properties: UID: type: "integer" format: "uint32" example: 1000 GID: type: "integer" format: "uint32" example: 1000 Network: type: "object" x-nullable: false required: [Type] properties: Type: x-nullable: false type: "string" example: "host" Linux: type: "object" x-nullable: false required: [Capabilities, AllowAllDevices, Devices] properties: Capabilities: type: "array" items: type: "string" example: - "CAP_SYS_ADMIN" - "CAP_SYSLOG" AllowAllDevices: type: "boolean" x-nullable: false example: false Devices: type: "array" items: $ref: "#/definitions/PluginDevice" PropagatedMount: type: "string" x-nullable: false example: "/mnt/volumes" IpcHost: type: "boolean" x-nullable: false example: false PidHost: type: "boolean" x-nullable: false example: false Mounts: type: "array" items: $ref: "#/definitions/PluginMount" Env: type: "array" items: $ref: "#/definitions/PluginEnv" example: - Name: "DEBUG" Description: "If set, prints debug messages" Settable: null Value: "0" Args: type: "object" x-nullable: false required: [Name, Description, Settable, Value] properties: Name: x-nullable: false type: "string" example: "args" Description: x-nullable: false type: "string" example: "command line arguments" Settable: type: "array" items: type: "string" Value: type: "array" items: type: "string" rootfs: type: "object" properties: type: type: "string" example: "layers" diff_ids: type: "array" items: type: "string" example: - "sha256:675532206fbf3030b8458f88d6e26d4eb1577688a25efec97154c94e8b6b4887" - "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8" ObjectVersion: description: | The version number of the object such as node, service, etc. This is needed to avoid conflicting writes. The client must send the version number along with the modified specification when updating these objects. This approach ensures safe concurrency and determinism in that the change on the object may not be applied if the version number has changed from the last read. In other words, if two update requests specify the same base version, only one of the requests can succeed. As a result, two separate update requests that happen at the same time will not unintentionally overwrite each other. type: "object" properties: Index: type: "integer" format: "uint64" example: 373531 NodeSpec: type: "object" properties: Name: description: "Name for the node." type: "string" example: "my-node" Labels: description: "User-defined key/value metadata." type: "object" additionalProperties: type: "string" Role: description: "Role of the node." type: "string" enum: - "worker" - "manager" example: "manager" Availability: description: "Availability of the node." type: "string" enum: - "active" - "pause" - "drain" example: "active" example: Availability: "active" Name: "node-name" Role: "manager" Labels: foo: "bar" Node: type: "object" properties: ID: type: "string" example: "24ifsmvkjbyhk" Version: $ref: "#/definitions/ObjectVersion" CreatedAt: description: | Date and time at which the node was added to the swarm in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. type: "string" format: "dateTime" example: "2016-08-18T10:44:24.496525531Z" UpdatedAt: description: | Date and time at which the node was last updated in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. type: "string" format: "dateTime" example: "2017-08-09T07:09:37.632105588Z" Spec: $ref: "#/definitions/NodeSpec" Description: $ref: "#/definitions/NodeDescription" Status: $ref: "#/definitions/NodeStatus" ManagerStatus: $ref: "#/definitions/ManagerStatus" NodeDescription: description: | NodeDescription encapsulates the properties of the Node as reported by the agent. type: "object" properties: Hostname: type: "string" example: "bf3067039e47" Platform: $ref: "#/definitions/Platform" Resources: $ref: "#/definitions/ResourceObject" Engine: $ref: "#/definitions/EngineDescription" TLSInfo: $ref: "#/definitions/TLSInfo" Platform: description: | Platform represents the platform (Arch/OS). type: "object" properties: Architecture: description: | Architecture represents the hardware architecture (for example, `x86_64`). type: "string" example: "x86_64" OS: description: | OS represents the Operating System (for example, `linux` or `windows`). type: "string" example: "linux" EngineDescription: description: "EngineDescription provides information about an engine." type: "object" properties: EngineVersion: type: "string" example: "17.06.0" Labels: type: "object" additionalProperties: type: "string" example: foo: "bar" Plugins: type: "array" items: type: "object" properties: Type: type: "string" Name: type: "string" example: - Type: "Log" Name: "awslogs" - Type: "Log" Name: "fluentd" - Type: "Log" Name: "gcplogs" - Type: "Log" Name: "gelf" - Type: "Log" Name: "journald" - Type: "Log" Name: "json-file" - Type: "Log" Name: "splunk" - Type: "Log" Name: "syslog" - Type: "Network" Name: "bridge" - Type: "Network" Name: "host" - Type: "Network" Name: "ipvlan" - Type: "Network" Name: "macvlan" - Type: "Network" Name: "null" - Type: "Network" Name: "overlay" - Type: "Volume" Name: "local" - Type: "Volume" Name: "localhost:5000/vieux/sshfs:latest" - Type: "Volume" Name: "vieux/sshfs:latest" TLSInfo: description: | Information about the issuer of leaf TLS certificates and the trusted root CA certificate. type: "object" properties: TrustRoot: description: | The root CA certificate(s) that are used to validate leaf TLS certificates. type: "string" CertIssuerSubject: description: The base64-url-safe-encoded raw subject bytes of the issuer. type: "string" CertIssuerPublicKey: description: | The base64-url-safe-encoded raw public key bytes of the issuer. type: "string" example: TrustRoot: | -----BEGIN CERTIFICATE----- MIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNDI0MjE0MzAwWhcNMzcwNDE5MjE0 MzAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH A0IABJk/VyMPYdaqDXJb/VXh5n/1Yuv7iNrxV3Qb3l06XD46seovcDWs3IZNV1lf 3Skyr0ofcchipoiHkXBODojJydSjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB Af8EBTADAQH/MB0GA1UdDgQWBBRUXxuRcnFjDfR/RIAUQab8ZV/n4jAKBggqhkjO PQQDAgNIADBFAiAy+JTe6Uc3KyLCMiqGl2GyWGQqQDEcO3/YG36x7om65AIhAJvz pxv6zFeVEkAEEkqIYi0omA9+CjanB/6Bz4n1uw8H -----END CERTIFICATE----- CertIssuerSubject: "MBMxETAPBgNVBAMTCHN3YXJtLWNh" CertIssuerPublicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A==" NodeStatus: description: | NodeStatus represents the status of a node. It provides the current status of the node, as seen by the manager. type: "object" properties: State: $ref: "#/definitions/NodeState" Message: type: "string" example: "" Addr: description: "IP address of the node." type: "string" example: "172.17.0.2" NodeState: description: "NodeState represents the state of a node." type: "string" enum: - "unknown" - "down" - "ready" - "disconnected" example: "ready" ManagerStatus: description: | ManagerStatus represents the status of a manager. It provides the current status of a node's manager component, if the node is a manager. x-nullable: true type: "object" properties: Leader: type: "boolean" default: false example: true Reachability: $ref: "#/definitions/Reachability" Addr: description: | The IP address and port at which the manager is reachable. type: "string" example: "10.0.0.46:2377" Reachability: description: "Reachability represents the reachability of a node." type: "string" enum: - "unknown" - "unreachable" - "reachable" example: "reachable" SwarmSpec: description: "User modifiable swarm configuration." type: "object" properties: Name: description: "Name of the swarm." type: "string" example: "default" Labels: description: "User-defined key/value metadata." type: "object" additionalProperties: type: "string" example: com.example.corp.type: "production" com.example.corp.department: "engineering" Orchestration: description: "Orchestration configuration." type: "object" x-nullable: true properties: TaskHistoryRetentionLimit: description: | The number of historic tasks to keep per instance or node. If negative, never remove completed or failed tasks. type: "integer" format: "int64" example: 10 Raft: description: "Raft configuration." type: "object" properties: SnapshotInterval: description: "The number of log entries between snapshots." type: "integer" format: "uint64" example: 10000 KeepOldSnapshots: description: | The number of snapshots to keep beyond the current snapshot. type: "integer" format: "uint64" LogEntriesForSlowFollowers: description: | The number of log entries to keep around to sync up slow followers after a snapshot is created. type: "integer" format: "uint64" example: 500 ElectionTick: description: | The number of ticks that a follower will wait for a message from the leader before becoming a candidate and starting an election. `ElectionTick` must be greater than `HeartbeatTick`. A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. type: "integer" example: 3 HeartbeatTick: description: | The number of ticks between heartbeats. Every HeartbeatTick ticks, the leader will send a heartbeat to the followers. A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. type: "integer" example: 1 Dispatcher: description: "Dispatcher configuration." type: "object" x-nullable: true properties: HeartbeatPeriod: description: | The delay for an agent to send a heartbeat to the dispatcher. type: "integer" format: "int64" example: 5000000000 CAConfig: description: "CA configuration." type: "object" x-nullable: true properties: NodeCertExpiry: description: "The duration node certificates are issued for." type: "integer" format: "int64" example: 7776000000000000 ExternalCAs: description: | Configuration for forwarding signing requests to an external certificate authority. type: "array" items: type: "object" properties: Protocol: description: | Protocol for communication with the external CA (currently only `cfssl` is supported). type: "string" enum: - "cfssl" default: "cfssl" URL: description: | URL where certificate signing requests should be sent. type: "string" Options: description: | An object with key/value pairs that are interpreted as protocol-specific options for the external CA driver. type: "object" additionalProperties: type: "string" CACert: description: | The root CA certificate (in PEM format) this external CA uses to issue TLS certificates (assumed to be to the current swarm root CA certificate if not provided). type: "string" SigningCACert: description: | The desired signing CA certificate for all swarm node TLS leaf certificates, in PEM format. type: "string" SigningCAKey: description: | The desired signing CA key for all swarm node TLS leaf certificates, in PEM format. type: "string" ForceRotate: description: | An integer whose purpose is to force swarm to generate a new signing CA certificate and key, if none have been specified in `SigningCACert` and `SigningCAKey` format: "uint64" type: "integer" EncryptionConfig: description: "Parameters related to encryption-at-rest." type: "object" properties: AutoLockManagers: description: | If set, generate a key and use it to lock data stored on the managers. type: "boolean" example: false TaskDefaults: description: "Defaults for creating tasks in this cluster." type: "object" properties: LogDriver: description: | The log driver to use for tasks created in the orchestrator if unspecified by a service. Updating this value only affects new tasks. Existing tasks continue to use their previously configured log driver until recreated. type: "object" properties: Name: description: | The log driver to use as a default for new tasks. type: "string" example: "json-file" Options: description: | Driver-specific options for the selected log driver, specified as key/value pairs. type: "object" additionalProperties: type: "string" example: "max-file": "10" "max-size": "100m" # The Swarm information for `GET /info`. It is the same as `GET /swarm`, but # without `JoinTokens`. ClusterInfo: description: | ClusterInfo represents information about the swarm as is returned by the "/info" endpoint. Join-tokens are not included. x-nullable: true type: "object" properties: ID: description: "The ID of the swarm." type: "string" example: "abajmipo7b4xz5ip2nrla6b11" Version: $ref: "#/definitions/ObjectVersion" CreatedAt: description: | Date and time at which the swarm was initialised in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. type: "string" format: "dateTime" example: "2016-08-18T10:44:24.496525531Z" UpdatedAt: description: | Date and time at which the swarm was last updated in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. type: "string" format: "dateTime" example: "2017-08-09T07:09:37.632105588Z" Spec: $ref: "#/definitions/SwarmSpec" TLSInfo: $ref: "#/definitions/TLSInfo" RootRotationInProgress: description: | Whether there is currently a root CA rotation in progress for the swarm type: "boolean" example: false DataPathPort: description: | DataPathPort specifies the data path port number for data traffic. Acceptable port range is 1024 to 49151. If no port is set or is set to 0, the default port (4789) is used. type: "integer" format: "uint32" default: 4789 example: 4789 DefaultAddrPool: description: | Default Address Pool specifies default subnet pools for global scope networks. type: "array" items: type: "string" format: "CIDR" example: ["10.10.0.0/16", "20.20.0.0/16"] SubnetSize: description: | SubnetSize specifies the subnet size of the networks created from the default subnet pool. type: "integer" format: "uint32" maximum: 29 default: 24 example: 24 JoinTokens: description: | JoinTokens contains the tokens workers and managers need to join the swarm. type: "object" properties: Worker: description: | The token workers can use to join the swarm. type: "string" example: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx" Manager: description: | The token managers can use to join the swarm. type: "string" example: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" Swarm: type: "object" allOf: - $ref: "#/definitions/ClusterInfo" - type: "object" properties: JoinTokens: $ref: "#/definitions/JoinTokens" TaskSpec: description: "User modifiable task configuration." type: "object" properties: PluginSpec: type: "object" description: | Plugin spec for the service. *(Experimental release only.)*


> **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are > mutually exclusive. PluginSpec is only used when the Runtime field > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime > field is set to `attachment`. properties: Name: description: "The name or 'alias' to use for the plugin." type: "string" Remote: description: "The plugin image reference to use." type: "string" Disabled: description: "Disable the plugin once scheduled." type: "boolean" PluginPrivilege: type: "array" items: $ref: "#/definitions/PluginPrivilege" ContainerSpec: type: "object" description: | Container spec for the service.


> **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are > mutually exclusive. PluginSpec is only used when the Runtime field > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime > field is set to `attachment`. properties: Image: description: "The image name to use for the container" type: "string" Labels: description: "User-defined key/value data." type: "object" additionalProperties: type: "string" Command: description: "The command to be run in the image." type: "array" items: type: "string" Args: description: "Arguments to the command." type: "array" items: type: "string" Hostname: description: | The hostname to use for the container, as a valid [RFC 1123](https://tools.ietf.org/html/rfc1123) hostname. type: "string" Env: description: | A list of environment variables in the form `VAR=value`. type: "array" items: type: "string" Dir: description: "The working directory for commands to run in." type: "string" User: description: "The user inside the container." type: "string" Groups: type: "array" description: | A list of additional groups that the container process will run as. items: type: "string" Privileges: type: "object" description: "Security options for the container" properties: CredentialSpec: type: "object" description: "CredentialSpec for managed service account (Windows only)" properties: Config: type: "string" example: "0bt9dmxjvjiqermk6xrop3ekq" description: | Load credential spec from a Swarm Config with the given ID. The specified config must also be present in the Configs field with the Runtime property set.


> **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, > and `CredentialSpec.Config` are mutually exclusive. File: type: "string" example: "spec.json" description: | Load credential spec from this file. The file is read by the daemon, and must be present in the `CredentialSpecs` subdirectory in the docker data directory, which defaults to `C:\ProgramData\Docker\` on Windows. For example, specifying `spec.json` loads `C:\ProgramData\Docker\CredentialSpecs\spec.json`.


> **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, > and `CredentialSpec.Config` are mutually exclusive. Registry: type: "string" description: | Load credential spec from this value in the Windows registry. The specified registry value must be located in: `HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Containers\CredentialSpecs`


> **Note**: `CredentialSpec.File`, `CredentialSpec.Registry`, > and `CredentialSpec.Config` are mutually exclusive. SELinuxContext: type: "object" description: "SELinux labels of the container" properties: Disable: type: "boolean" description: "Disable SELinux" User: type: "string" description: "SELinux user label" Role: type: "string" description: "SELinux role label" Type: type: "string" description: "SELinux type label" Level: type: "string" description: "SELinux level label" Seccomp: type: "object" description: "Options for configuring seccomp on the container" properties: Mode: type: "string" enum: - "default" - "unconfined" - "custom" Profile: description: "The custom seccomp profile as a json object" type: "string" AppArmor: type: "object" description: "Options for configuring AppArmor on the container" properties: Mode: type: "string" enum: - "default" - "disabled" NoNewPrivileges: type: "boolean" description: "Configuration of the no_new_privs bit in the container" TTY: description: "Whether a pseudo-TTY should be allocated." type: "boolean" OpenStdin: description: "Open `stdin`" type: "boolean" ReadOnly: description: "Mount the container's root filesystem as read only." type: "boolean" Mounts: description: | Specification for mounts to be added to containers created as part of the service. type: "array" items: $ref: "#/definitions/Mount" StopSignal: description: "Signal to stop the container." type: "string" StopGracePeriod: description: | Amount of time to wait for the container to terminate before forcefully killing it. type: "integer" format: "int64" HealthCheck: $ref: "#/definitions/HealthConfig" Hosts: type: "array" description: | A list of hostname/IP mappings to add to the container's `hosts` file. The format of extra hosts is specified in the [hosts(5)](http://man7.org/linux/man-pages/man5/hosts.5.html) man page: IP_address canonical_hostname [aliases...] items: type: "string" DNSConfig: description: | Specification for DNS related configurations in resolver configuration file (`resolv.conf`). type: "object" properties: Nameservers: description: "The IP addresses of the name servers." type: "array" items: type: "string" Search: description: "A search list for host-name lookup." type: "array" items: type: "string" Options: description: | A list of internal resolver variables to be modified (e.g., `debug`, `ndots:3`, etc.). type: "array" items: type: "string" Secrets: description: | Secrets contains references to zero or more secrets that will be exposed to the service. type: "array" items: type: "object" properties: File: description: | File represents a specific target that is backed by a file. type: "object" properties: Name: description: | Name represents the final filename in the filesystem. type: "string" UID: description: "UID represents the file UID." type: "string" GID: description: "GID represents the file GID." type: "string" Mode: description: "Mode represents the FileMode of the file." type: "integer" format: "uint32" SecretID: description: | SecretID represents the ID of the specific secret that we're referencing. type: "string" SecretName: description: | SecretName is the name of the secret that this references, but this is just provided for lookup/display purposes. The secret in the reference will be identified by its ID. type: "string" OomScoreAdj: type: "integer" format: "int64" description: | An integer value containing the score given to the container in order to tune OOM killer preferences. example: 0 Configs: description: | Configs contains references to zero or more configs that will be exposed to the service. type: "array" items: type: "object" properties: File: description: | File represents a specific target that is backed by a file.


> **Note**: `Configs.File` and `Configs.Runtime` are mutually exclusive type: "object" properties: Name: description: | Name represents the final filename in the filesystem. type: "string" UID: description: "UID represents the file UID." type: "string" GID: description: "GID represents the file GID." type: "string" Mode: description: "Mode represents the FileMode of the file." type: "integer" format: "uint32" Runtime: description: | Runtime represents a target that is not mounted into the container but is used by the task


> **Note**: `Configs.File` and `Configs.Runtime` are mutually > exclusive type: "object" ConfigID: description: | ConfigID represents the ID of the specific config that we're referencing. type: "string" ConfigName: description: | ConfigName is the name of the config that this references, but this is just provided for lookup/display purposes. The config in the reference will be identified by its ID. type: "string" Isolation: type: "string" description: | Isolation technology of the containers running the service. (Windows only) enum: - "default" - "process" - "hyperv" - "" Init: description: | Run an init inside the container that forwards signals and reaps processes. This field is omitted if empty, and the default (as configured on the daemon) is used. type: "boolean" x-nullable: true Sysctls: description: | Set kernel namedspaced parameters (sysctls) in the container. The Sysctls option on services accepts the same sysctls as the are supported on containers. Note that while the same sysctls are supported, no guarantees or checks are made about their suitability for a clustered environment, and it's up to the user to determine whether a given sysctl will work properly in a Service. type: "object" additionalProperties: type: "string" # This option is not used by Windows containers CapabilityAdd: type: "array" description: | A list of kernel capabilities to add to the default set for the container. items: type: "string" example: - "CAP_NET_RAW" - "CAP_SYS_ADMIN" - "CAP_SYS_CHROOT" - "CAP_SYSLOG" CapabilityDrop: type: "array" description: | A list of kernel capabilities to drop from the default set for the container. items: type: "string" example: - "CAP_NET_RAW" Ulimits: description: | A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`" type: "array" items: type: "object" properties: Name: description: "Name of ulimit" type: "string" Soft: description: "Soft limit" type: "integer" Hard: description: "Hard limit" type: "integer" NetworkAttachmentSpec: description: | Read-only spec type for non-swarm containers attached to swarm overlay networks.


> **Note**: ContainerSpec, NetworkAttachmentSpec, and PluginSpec are > mutually exclusive. PluginSpec is only used when the Runtime field > is set to `plugin`. NetworkAttachmentSpec is used when the Runtime > field is set to `attachment`. type: "object" properties: ContainerID: description: "ID of the container represented by this task" type: "string" Resources: description: | Resource requirements which apply to each individual container created as part of the service. type: "object" properties: Limits: description: "Define resources limits." $ref: "#/definitions/Limit" Reservations: description: "Define resources reservation." $ref: "#/definitions/ResourceObject" RestartPolicy: description: | Specification for the restart policy which applies to containers created as part of this service. type: "object" properties: Condition: description: "Condition for restart." type: "string" enum: - "none" - "on-failure" - "any" Delay: description: "Delay between restart attempts." type: "integer" format: "int64" MaxAttempts: description: | Maximum attempts to restart a given container before giving up (default value is 0, which is ignored). type: "integer" format: "int64" default: 0 Window: description: | Windows is the time window used to evaluate the restart policy (default value is 0, which is unbounded). type: "integer" format: "int64" default: 0 Placement: type: "object" properties: Constraints: description: | An array of constraint expressions to limit the set of nodes where a task can be scheduled. Constraint expressions can either use a _match_ (`==`) or _exclude_ (`!=`) rule. Multiple constraints find nodes that satisfy every expression (AND match). Constraints can match node or Docker Engine labels as follows: node attribute | matches | example ---------------------|--------------------------------|----------------------------------------------- `node.id` | Node ID | `node.id==2ivku8v2gvtg4` `node.hostname` | Node hostname | `node.hostname!=node-2` `node.role` | Node role (`manager`/`worker`) | `node.role==manager` `node.platform.os` | Node operating system | `node.platform.os==windows` `node.platform.arch` | Node architecture | `node.platform.arch==x86_64` `node.labels` | User-defined node labels | `node.labels.security==high` `engine.labels` | Docker Engine's labels | `engine.labels.operatingsystem==ubuntu-24.04` `engine.labels` apply to Docker Engine labels like operating system, drivers, etc. Swarm administrators add `node.labels` for operational purposes by using the [`node update endpoint`](#operation/NodeUpdate). type: "array" items: type: "string" example: - "node.hostname!=node3.corp.example.com" - "node.role!=manager" - "node.labels.type==production" - "node.platform.os==linux" - "node.platform.arch==x86_64" Preferences: description: | Preferences provide a way to make the scheduler aware of factors such as topology. They are provided in order from highest to lowest precedence. type: "array" items: type: "object" properties: Spread: type: "object" properties: SpreadDescriptor: description: | label descriptor, such as `engine.labels.az`. type: "string" example: - Spread: SpreadDescriptor: "node.labels.datacenter" - Spread: SpreadDescriptor: "node.labels.rack" MaxReplicas: description: | Maximum number of replicas for per node (default value is 0, which is unlimited) type: "integer" format: "int64" default: 0 Platforms: description: | Platforms stores all the platforms that the service's image can run on. This field is used in the platform filter for scheduling. If empty, then the platform filter is off, meaning there are no scheduling restrictions. type: "array" items: $ref: "#/definitions/Platform" ForceUpdate: description: | A counter that triggers an update even if no relevant parameters have been changed. type: "integer" format: "uint64" Runtime: description: | Runtime is the type of runtime specified for the task executor. type: "string" Networks: description: "Specifies which networks the service should attach to." type: "array" items: $ref: "#/definitions/NetworkAttachmentConfig" LogDriver: description: | Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified. type: "object" properties: Name: type: "string" Options: type: "object" additionalProperties: type: "string" TaskState: type: "string" enum: - "new" - "allocated" - "pending" - "assigned" - "accepted" - "preparing" - "ready" - "starting" - "running" - "complete" - "shutdown" - "failed" - "rejected" - "remove" - "orphaned" ContainerStatus: type: "object" description: "represents the status of a container." properties: ContainerID: type: "string" PID: type: "integer" ExitCode: type: "integer" PortStatus: type: "object" description: "represents the port status of a task's host ports whose service has published host ports" properties: Ports: type: "array" items: $ref: "#/definitions/EndpointPortConfig" TaskStatus: type: "object" description: "represents the status of a task." properties: Timestamp: type: "string" format: "dateTime" State: $ref: "#/definitions/TaskState" Message: type: "string" Err: type: "string" ContainerStatus: $ref: "#/definitions/ContainerStatus" PortStatus: $ref: "#/definitions/PortStatus" Task: type: "object" properties: ID: description: "The ID of the task." type: "string" Version: $ref: "#/definitions/ObjectVersion" CreatedAt: type: "string" format: "dateTime" UpdatedAt: type: "string" format: "dateTime" Name: description: "Name of the task." type: "string" Labels: description: "User-defined key/value metadata." type: "object" additionalProperties: type: "string" Spec: $ref: "#/definitions/TaskSpec" ServiceID: description: "The ID of the service this task is part of." type: "string" Slot: type: "integer" NodeID: description: "The ID of the node that this task is on." type: "string" AssignedGenericResources: $ref: "#/definitions/GenericResources" Status: $ref: "#/definitions/TaskStatus" DesiredState: $ref: "#/definitions/TaskState" JobIteration: description: | If the Service this Task belongs to is a job-mode service, contains the JobIteration of the Service this Task was created for. Absent if the Task was created for a Replicated or Global Service. $ref: "#/definitions/ObjectVersion" example: ID: "0kzzo1i0y4jz6027t0k7aezc7" Version: Index: 71 CreatedAt: "2016-06-07T21:07:31.171892745Z" UpdatedAt: "2016-06-07T21:07:31.376370513Z" Spec: ContainerSpec: Image: "redis" Resources: Limits: {} Reservations: {} RestartPolicy: Condition: "any" MaxAttempts: 0 Placement: {} ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" Slot: 1 NodeID: "60gvrl6tm78dmak4yl7srz94v" Status: Timestamp: "2016-06-07T21:07:31.290032978Z" State: "running" Message: "started" ContainerStatus: ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035" PID: 677 DesiredState: "running" NetworksAttachments: - Network: ID: "4qvuz4ko70xaltuqbt8956gd1" Version: Index: 18 CreatedAt: "2016-06-07T20:31:11.912919752Z" UpdatedAt: "2016-06-07T21:07:29.955277358Z" Spec: Name: "ingress" Labels: com.docker.swarm.internal: "true" DriverConfiguration: {} IPAMOptions: Driver: {} Configs: - Subnet: "10.255.0.0/16" Gateway: "10.255.0.1" DriverState: Name: "overlay" Options: com.docker.network.driver.overlay.vxlanid_list: "256" IPAMOptions: Driver: Name: "default" Configs: - Subnet: "10.255.0.0/16" Gateway: "10.255.0.1" Addresses: - "10.255.0.10/16" AssignedGenericResources: - DiscreteResourceSpec: Kind: "SSD" Value: 3 - NamedResourceSpec: Kind: "GPU" Value: "UUID1" - NamedResourceSpec: Kind: "GPU" Value: "UUID2" ServiceSpec: description: "User modifiable configuration for a service." type: object properties: Name: description: "Name of the service." type: "string" Labels: description: "User-defined key/value metadata." type: "object" additionalProperties: type: "string" TaskTemplate: $ref: "#/definitions/TaskSpec" Mode: description: "Scheduling mode for the service." type: "object" properties: Replicated: type: "object" properties: Replicas: type: "integer" format: "int64" Global: type: "object" ReplicatedJob: description: | The mode used for services with a finite number of tasks that run to a completed state. type: "object" properties: MaxConcurrent: description: | The maximum number of replicas to run simultaneously. type: "integer" format: "int64" default: 1 TotalCompletions: description: | The total number of replicas desired to reach the Completed state. If unset, will default to the value of `MaxConcurrent` type: "integer" format: "int64" GlobalJob: description: | The mode used for services which run a task to the completed state on each valid node. type: "object" UpdateConfig: description: "Specification for the update strategy of the service." type: "object" properties: Parallelism: description: | Maximum number of tasks to be updated in one iteration (0 means unlimited parallelism). type: "integer" format: "int64" Delay: description: "Amount of time between updates, in nanoseconds." type: "integer" format: "int64" FailureAction: description: | Action to take if an updated task fails to run, or stops running during the update. type: "string" enum: - "continue" - "pause" - "rollback" Monitor: description: | Amount of time to monitor each updated task for failures, in nanoseconds. type: "integer" format: "int64" MaxFailureRatio: description: | The fraction of tasks that may fail during an update before the failure action is invoked, specified as a floating point number between 0 and 1. type: "number" default: 0 Order: description: | The order of operations when rolling out an updated task. Either the old task is shut down before the new task is started, or the new task is started before the old task is shut down. type: "string" enum: - "stop-first" - "start-first" RollbackConfig: description: "Specification for the rollback strategy of the service." type: "object" properties: Parallelism: description: | Maximum number of tasks to be rolled back in one iteration (0 means unlimited parallelism). type: "integer" format: "int64" Delay: description: | Amount of time between rollback iterations, in nanoseconds. type: "integer" format: "int64" FailureAction: description: | Action to take if an rolled back task fails to run, or stops running during the rollback. type: "string" enum: - "continue" - "pause" Monitor: description: | Amount of time to monitor each rolled back task for failures, in nanoseconds. type: "integer" format: "int64" MaxFailureRatio: description: | The fraction of tasks that may fail during a rollback before the failure action is invoked, specified as a floating point number between 0 and 1. type: "number" default: 0 Order: description: | The order of operations when rolling back a task. Either the old task is shut down before the new task is started, or the new task is started before the old task is shut down. type: "string" enum: - "stop-first" - "start-first" Networks: description: | Specifies which networks the service should attach to. Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. type: "array" items: $ref: "#/definitions/NetworkAttachmentConfig" EndpointSpec: $ref: "#/definitions/EndpointSpec" EndpointPortConfig: type: "object" properties: Name: type: "string" Protocol: type: "string" enum: - "tcp" - "udp" - "sctp" TargetPort: description: "The port inside the container." type: "integer" PublishedPort: description: "The port on the swarm hosts." type: "integer" PublishMode: description: | The mode in which port is published.


- "ingress" makes the target port accessible on every node, regardless of whether there is a task for the service running on that node or not. - "host" bypasses the routing mesh and publish the port directly on the swarm node where that service is running. type: "string" enum: - "ingress" - "host" default: "ingress" example: "ingress" EndpointSpec: description: "Properties that can be configured to access and load balance a service." type: "object" properties: Mode: description: | The mode of resolution to use for internal load balancing between tasks. type: "string" enum: - "vip" - "dnsrr" default: "vip" Ports: description: | List of exposed ports that this service is accessible on from the outside. Ports can only be provided if `vip` resolution mode is used. type: "array" items: $ref: "#/definitions/EndpointPortConfig" Service: type: "object" properties: ID: type: "string" Version: $ref: "#/definitions/ObjectVersion" CreatedAt: type: "string" format: "dateTime" UpdatedAt: type: "string" format: "dateTime" Spec: $ref: "#/definitions/ServiceSpec" Endpoint: type: "object" properties: Spec: $ref: "#/definitions/EndpointSpec" Ports: type: "array" items: $ref: "#/definitions/EndpointPortConfig" VirtualIPs: type: "array" items: type: "object" properties: NetworkID: type: "string" Addr: type: "string" UpdateStatus: description: "The status of a service update." type: "object" properties: State: type: "string" enum: - "updating" - "paused" - "completed" StartedAt: type: "string" format: "dateTime" CompletedAt: type: "string" format: "dateTime" Message: type: "string" ServiceStatus: description: | The status of the service's tasks. Provided only when requested as part of a ServiceList operation. type: "object" properties: RunningTasks: description: | The number of tasks for the service currently in the Running state. type: "integer" format: "uint64" example: 7 DesiredTasks: description: | The number of tasks for the service desired to be running. For replicated services, this is the replica count from the service spec. For global services, this is computed by taking count of all tasks for the service with a Desired State other than Shutdown. type: "integer" format: "uint64" example: 10 CompletedTasks: description: | The number of tasks for a job that are in the Completed state. This field must be cross-referenced with the service type, as the value of 0 may mean the service is not in a job mode, or it may mean the job-mode service has no tasks yet Completed. type: "integer" format: "uint64" JobStatus: description: | The status of the service when it is in one of ReplicatedJob or GlobalJob modes. Absent on Replicated and Global mode services. The JobIteration is an ObjectVersion, but unlike the Service's version, does not need to be sent with an update request. type: "object" properties: JobIteration: description: | JobIteration is a value increased each time a Job is executed, successfully or otherwise. "Executed", in this case, means the job as a whole has been started, not that an individual Task has been launched. A job is "Executed" when its ServiceSpec is updated. JobIteration can be used to disambiguate Tasks belonging to different executions of a job. Though JobIteration will increase with each subsequent execution, it may not necessarily increase by 1, and so JobIteration should not be used to $ref: "#/definitions/ObjectVersion" LastExecution: description: | The last time, as observed by the server, that this job was started. type: "string" format: "dateTime" example: ID: "9mnpnzenvg8p8tdbtq4wvbkcz" Version: Index: 19 CreatedAt: "2016-06-07T21:05:51.880065305Z" UpdatedAt: "2016-06-07T21:07:29.962229872Z" Spec: Name: "hopeful_cori" TaskTemplate: ContainerSpec: Image: "redis" Resources: Limits: {} Reservations: {} RestartPolicy: Condition: "any" MaxAttempts: 0 Placement: {} ForceUpdate: 0 Mode: Replicated: Replicas: 1 UpdateConfig: Parallelism: 1 Delay: 1000000000 FailureAction: "pause" Monitor: 15000000000 MaxFailureRatio: 0.15 RollbackConfig: Parallelism: 1 Delay: 1000000000 FailureAction: "pause" Monitor: 15000000000 MaxFailureRatio: 0.15 EndpointSpec: Mode: "vip" Ports: - Protocol: "tcp" TargetPort: 6379 PublishedPort: 30001 Endpoint: Spec: Mode: "vip" Ports: - Protocol: "tcp" TargetPort: 6379 PublishedPort: 30001 Ports: - Protocol: "tcp" TargetPort: 6379 PublishedPort: 30001 VirtualIPs: - NetworkID: "4qvuz4ko70xaltuqbt8956gd1" Addr: "10.255.0.2/16" - NetworkID: "4qvuz4ko70xaltuqbt8956gd1" Addr: "10.255.0.3/16" ImageDeleteResponseItem: type: "object" x-go-name: "DeleteResponse" properties: Untagged: description: "The image ID of an image that was untagged" type: "string" Deleted: description: "The image ID of an image that was deleted" type: "string" ServiceCreateResponse: type: "object" description: | contains the information returned to a client on the creation of a new service. properties: ID: description: "The ID of the created service." type: "string" x-nullable: false example: "ak7w3gjqoa3kuz8xcpnyy0pvl" Warnings: description: | Optional warning message. FIXME(thaJeztah): this should have "omitempty" in the generated type. type: "array" x-nullable: true items: type: "string" example: - "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" ServiceUpdateResponse: type: "object" properties: Warnings: description: "Optional warning messages" type: "array" items: type: "string" example: Warnings: - "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" ContainerInspectResponse: type: "object" title: "ContainerInspectResponse" x-go-name: "InspectResponse" properties: Id: description: |- The ID of this container as a 128-bit (64-character) hexadecimal string (32 bytes). type: "string" x-go-name: "ID" minLength: 64 maxLength: 64 pattern: "^[0-9a-fA-F]{64}$" example: "aa86eacfb3b3ed4cd362c1e88fc89a53908ad05fb3a4103bca3f9b28292d14bf" Created: description: |- Date and time at which the container was created, formatted in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. type: "string" format: "dateTime" x-nullable: true example: "2025-02-17T17:43:39.64001363Z" Path: description: |- The path to the command being run type: "string" example: "/bin/sh" Args: description: "The arguments to the command being run" type: "array" items: type: "string" example: - "-c" - "exit 9" State: $ref: "#/definitions/ContainerState" Image: description: |- The ID (digest) of the image that this container was created from. type: "string" example: "sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782" ResolvConfPath: description: |- Location of the `/etc/resolv.conf` generated for the container on the host. This file is managed through the docker daemon, and should not be accessed or modified by other tools. type: "string" example: "/var/lib/docker/containers/aa86eacfb3b3ed4cd362c1e88fc89a53908ad05fb3a4103bca3f9b28292d14bf/resolv.conf" HostnamePath: description: |- Location of the `/etc/hostname` generated for the container on the host. This file is managed through the docker daemon, and should not be accessed or modified by other tools. type: "string" example: "/var/lib/docker/containers/aa86eacfb3b3ed4cd362c1e88fc89a53908ad05fb3a4103bca3f9b28292d14bf/hostname" HostsPath: description: |- Location of the `/etc/hosts` generated for the container on the host. This file is managed through the docker daemon, and should not be accessed or modified by other tools. type: "string" example: "/var/lib/docker/containers/aa86eacfb3b3ed4cd362c1e88fc89a53908ad05fb3a4103bca3f9b28292d14bf/hosts" LogPath: description: |- Location of the file used to buffer the container's logs. Depending on the logging-driver used for the container, this field may be omitted. This file is managed through the docker daemon, and should not be accessed or modified by other tools. type: "string" x-nullable: true example: "/var/lib/docker/containers/5b7c7e2b992aa426584ce6c47452756066be0e503a08b4516a433a54d2f69e59/5b7c7e2b992aa426584ce6c47452756066be0e503a08b4516a433a54d2f69e59-json.log" Name: description: |- The name associated with this container. For historic reasons, the name may be prefixed with a forward-slash (`/`). type: "string" example: "/funny_chatelet" RestartCount: description: |- Number of times the container was restarted since it was created, or since daemon was started. type: "integer" example: 0 Driver: description: |- The storage-driver used for the container's filesystem (graph-driver or snapshotter). type: "string" example: "overlayfs" Platform: description: |- The platform (operating system) for which the container was created. This field was introduced for the experimental "LCOW" (Linux Containers On Windows) features, which has been removed. In most cases, this field is equal to the host's operating system (`linux` or `windows`). type: "string" example: "linux" ImageManifestDescriptor: $ref: "#/definitions/OCIDescriptor" description: |- OCI descriptor of the platform-specific manifest of the image the container was created from. Note: Only available if the daemon provides a multi-platform image store. MountLabel: description: |- SELinux mount label set for the container. type: "string" example: "" ProcessLabel: description: |- SELinux process label set for the container. type: "string" example: "" AppArmorProfile: description: |- The AppArmor profile set for the container. type: "string" example: "" ExecIDs: description: |- IDs of exec instances that are running in the container. type: "array" items: type: "string" x-nullable: true example: - "b35395de42bc8abd327f9dd65d913b9ba28c74d2f0734eeeae84fa1c616a0fca" - "3fc1232e5cd20c8de182ed81178503dc6437f4e7ef12b52cc5e8de020652f1c4" HostConfig: $ref: "#/definitions/HostConfig" GraphDriver: $ref: "#/definitions/DriverData" SizeRw: description: |- The size of files that have been created or changed by this container. This field is omitted by default, and only set when size is requested in the API request. type: "integer" format: "int64" x-nullable: true example: "122880" SizeRootFs: description: |- The total size of all files in the read-only layers from the image that the container uses. These layers can be shared between containers. This field is omitted by default, and only set when size is requested in the API request. type: "integer" format: "int64" x-nullable: true example: "1653948416" Mounts: description: |- List of mounts used by the container. type: "array" items: $ref: "#/definitions/MountPoint" Config: $ref: "#/definitions/ContainerConfig" NetworkSettings: $ref: "#/definitions/NetworkSettings" ContainerSummary: type: "object" properties: Id: description: |- The ID of this container as a 128-bit (64-character) hexadecimal string (32 bytes). type: "string" x-go-name: "ID" minLength: 64 maxLength: 64 pattern: "^[0-9a-fA-F]{64}$" example: "aa86eacfb3b3ed4cd362c1e88fc89a53908ad05fb3a4103bca3f9b28292d14bf" Names: description: |- The names associated with this container. Most containers have a single name, but when using legacy "links", the container can have multiple names. For historic reasons, names are prefixed with a forward-slash (`/`). type: "array" items: type: "string" example: - "/funny_chatelet" Image: description: |- The name or ID of the image used to create the container. This field shows the image reference as was specified when creating the container, which can be in its canonical form (e.g., `docker.io/library/ubuntu:latest` or `docker.io/library/ubuntu@sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782`), short form (e.g., `ubuntu:latest`)), or the ID(-prefix) of the image (e.g., `72297848456d`). The content of this field can be updated at runtime if the image used to create the container is untagged, in which case the field is updated to contain the the image ID (digest) it was resolved to in its canonical, non-truncated form (e.g., `sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782`). type: "string" example: "docker.io/library/ubuntu:latest" ImageID: description: |- The ID (digest) of the image that this container was created from. type: "string" example: "sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782" ImageManifestDescriptor: $ref: "#/definitions/OCIDescriptor" x-nullable: true description: | OCI descriptor of the platform-specific manifest of the image the container was created from. Note: Only available if the daemon provides a multi-platform image store. This field is not populated in the `GET /system/df` endpoint. Command: description: "Command to run when starting the container" type: "string" example: "/bin/bash" Created: description: |- Date and time at which the container was created as a Unix timestamp (number of seconds since EPOCH). type: "integer" format: "int64" example: "1739811096" Ports: description: |- Port-mappings for the container. type: "array" items: $ref: "#/definitions/Port" SizeRw: description: |- The size of files that have been created or changed by this container. This field is omitted by default, and only set when size is requested in the API request. type: "integer" format: "int64" x-nullable: true example: "122880" SizeRootFs: description: |- The total size of all files in the read-only layers from the image that the container uses. These layers can be shared between containers. This field is omitted by default, and only set when size is requested in the API request. type: "integer" format: "int64" x-nullable: true example: "1653948416" Labels: description: "User-defined key/value metadata." type: "object" additionalProperties: type: "string" example: com.example.vendor: "Acme" com.example.license: "GPL" com.example.version: "1.0" State: description: | The state of this container. type: "string" enum: - "created" - "running" - "paused" - "restarting" - "exited" - "removing" - "dead" example: "running" Status: description: |- Additional human-readable status of this container (e.g. `Exit 0`) type: "string" example: "Up 4 days" HostConfig: type: "object" description: |- Summary of host-specific runtime information of the container. This is a reduced set of information in the container's "HostConfig" as available in the container "inspect" response. properties: NetworkMode: description: |- Networking mode (`host`, `none`, `container:`) or name of the primary network the container is using. This field is primarily for backward compatibility. The container can be connected to multiple networks for which information can be found in the `NetworkSettings.Networks` field, which enumerates settings per network. type: "string" example: "mynetwork" Annotations: description: |- Arbitrary key-value metadata attached to the container. type: "object" x-nullable: true additionalProperties: type: "string" example: io.kubernetes.docker.type: "container" io.kubernetes.sandbox.id: "3befe639bed0fd6afdd65fd1fa84506756f59360ec4adc270b0fdac9be22b4d3" NetworkSettings: description: |- Summary of the container's network settings type: "object" properties: Networks: type: "object" description: |- Summary of network-settings for each network the container is attached to. additionalProperties: $ref: "#/definitions/EndpointSettings" Mounts: type: "array" description: |- List of mounts used by the container. items: $ref: "#/definitions/MountPoint" Driver: description: "Driver represents a driver (network, logging, secrets)." type: "object" required: [Name] properties: Name: description: "Name of the driver." type: "string" x-nullable: false example: "some-driver" Options: description: "Key/value map of driver-specific options." type: "object" x-nullable: false additionalProperties: type: "string" example: OptionA: "value for driver-specific option A" OptionB: "value for driver-specific option B" SecretSpec: type: "object" properties: Name: description: "User-defined name of the secret." type: "string" Labels: description: "User-defined key/value metadata." type: "object" additionalProperties: type: "string" example: com.example.some-label: "some-value" com.example.some-other-label: "some-other-value" Data: description: | Data is the data to store as a secret, formatted as a Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) string. It must be empty if the Driver field is set, in which case the data is loaded from an external secret store. The maximum allowed size is 500KB, as defined in [MaxSecretSize](https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0-20250103191802-8c1959736554/api/validation#MaxSecretSize). This field is only used to _create_ a secret, and is not returned by other endpoints. type: "string" example: "" Driver: description: | Name of the secrets driver used to fetch the secret's value from an external secret store. $ref: "#/definitions/Driver" Templating: description: | Templating driver, if applicable Templating controls whether and how to evaluate the config payload as a template. If no driver is set, no templating is used. $ref: "#/definitions/Driver" Secret: type: "object" properties: ID: type: "string" example: "blt1owaxmitz71s9v5zh81zun" Version: $ref: "#/definitions/ObjectVersion" CreatedAt: type: "string" format: "dateTime" example: "2017-07-20T13:55:28.678958722Z" UpdatedAt: type: "string" format: "dateTime" example: "2017-07-20T13:55:28.678958722Z" Spec: $ref: "#/definitions/SecretSpec" ConfigSpec: type: "object" properties: Name: description: "User-defined name of the config." type: "string" Labels: description: "User-defined key/value metadata." type: "object" additionalProperties: type: "string" Data: description: | Data is the data to store as a config, formatted as a Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-5)) string. The maximum allowed size is 1000KB, as defined in [MaxConfigSize](https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0-20250103191802-8c1959736554/manager/controlapi#MaxConfigSize). type: "string" Templating: description: | Templating driver, if applicable Templating controls whether and how to evaluate the config payload as a template. If no driver is set, no templating is used. $ref: "#/definitions/Driver" Config: type: "object" properties: ID: type: "string" Version: $ref: "#/definitions/ObjectVersion" CreatedAt: type: "string" format: "dateTime" UpdatedAt: type: "string" format: "dateTime" Spec: $ref: "#/definitions/ConfigSpec" ContainerState: description: | ContainerState stores container's running state. It's part of ContainerJSONBase and will be returned by the "inspect" command. type: "object" x-nullable: true properties: Status: description: | String representation of the container state. Can be one of "created", "running", "paused", "restarting", "removing", "exited", or "dead". type: "string" enum: ["created", "running", "paused", "restarting", "removing", "exited", "dead"] example: "running" Running: description: | Whether this container is running. Note that a running container can be _paused_. The `Running` and `Paused` booleans are not mutually exclusive: When pausing a container (on Linux), the freezer cgroup is used to suspend all processes in the container. Freezing the process requires the process to be running. As a result, paused containers are both `Running` _and_ `Paused`. Use the `Status` field instead to determine if a container's state is "running". type: "boolean" example: true Paused: description: "Whether this container is paused." type: "boolean" example: false Restarting: description: "Whether this container is restarting." type: "boolean" example: false OOMKilled: description: | Whether a process within this container has been killed because it ran out of memory since the container was last started. type: "boolean" example: false Dead: type: "boolean" example: false Pid: description: "The process ID of this container" type: "integer" example: 1234 ExitCode: description: "The last exit code of this container" type: "integer" example: 0 Error: type: "string" StartedAt: description: "The time when this container was last started." type: "string" example: "2020-01-06T09:06:59.461876391Z" FinishedAt: description: "The time when this container last exited." type: "string" example: "2020-01-06T09:07:59.461876391Z" Health: $ref: "#/definitions/Health" ContainerCreateResponse: description: "OK response to ContainerCreate operation" type: "object" title: "ContainerCreateResponse" x-go-name: "CreateResponse" required: [Id, Warnings] properties: Id: description: "The ID of the created container" type: "string" x-nullable: false example: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743" Warnings: description: "Warnings encountered when creating the container" type: "array" x-nullable: false items: type: "string" example: [] ContainerUpdateResponse: type: "object" title: "ContainerUpdateResponse" x-go-name: "UpdateResponse" description: |- Response for a successful container-update. properties: Warnings: type: "array" description: |- Warnings encountered when updating the container. items: type: "string" example: ["Published ports are discarded when using host network mode"] ContainerStatsResponse: description: | Statistics sample for a container. type: "object" x-go-name: "StatsResponse" title: "ContainerStatsResponse" properties: name: description: "Name of the container" type: "string" x-nullable: true example: "boring_wozniak" id: description: "ID of the container" type: "string" x-nullable: true example: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743" read: description: | Date and time at which this sample was collected. The value is formatted as [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) with nano-seconds. type: "string" format: "date-time" example: "2025-01-16T13:55:22.165243637Z" preread: description: | Date and time at which this first sample was collected. This field is not propagated if the "one-shot" option is set. If the "one-shot" option is set, this field may be omitted, empty, or set to a default date (`0001-01-01T00:00:00Z`). The value is formatted as [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) with nano-seconds. type: "string" format: "date-time" example: "2025-01-16T13:55:21.160452595Z" pids_stats: $ref: "#/definitions/ContainerPidsStats" blkio_stats: $ref: "#/definitions/ContainerBlkioStats" num_procs: description: | The number of processors on the system. This field is Windows-specific and always zero for Linux containers. type: "integer" format: "uint32" example: 16 storage_stats: $ref: "#/definitions/ContainerStorageStats" cpu_stats: $ref: "#/definitions/ContainerCPUStats" precpu_stats: $ref: "#/definitions/ContainerCPUStats" memory_stats: $ref: "#/definitions/ContainerMemoryStats" networks: description: | Network statistics for the container per interface. This field is omitted if the container has no networking enabled. x-nullable: true additionalProperties: $ref: "#/definitions/ContainerNetworkStats" example: eth0: rx_bytes: 5338 rx_dropped: 0 rx_errors: 0 rx_packets: 36 tx_bytes: 648 tx_dropped: 0 tx_errors: 0 tx_packets: 8 eth5: rx_bytes: 4641 rx_dropped: 0 rx_errors: 0 rx_packets: 26 tx_bytes: 690 tx_dropped: 0 tx_errors: 0 tx_packets: 9 ContainerBlkioStats: description: | BlkioStats stores all IO service stats for data read and write. This type is Linux-specific and holds many fields that are specific to cgroups v1. On a cgroup v2 host, all fields other than `io_service_bytes_recursive` are omitted or `null`. This type is only populated on Linux and omitted for Windows containers. type: "object" x-go-name: "BlkioStats" x-nullable: true properties: io_service_bytes_recursive: type: "array" items: $ref: "#/definitions/ContainerBlkioStatEntry" io_serviced_recursive: description: | This field is only available when using Linux containers with cgroups v1. It is omitted or `null` when using cgroups v2. x-nullable: true type: "array" items: $ref: "#/definitions/ContainerBlkioStatEntry" io_queue_recursive: description: | This field is only available when using Linux containers with cgroups v1. It is omitted or `null` when using cgroups v2. x-nullable: true type: "array" items: $ref: "#/definitions/ContainerBlkioStatEntry" io_service_time_recursive: description: | This field is only available when using Linux containers with cgroups v1. It is omitted or `null` when using cgroups v2. x-nullable: true type: "array" items: $ref: "#/definitions/ContainerBlkioStatEntry" io_wait_time_recursive: description: | This field is only available when using Linux containers with cgroups v1. It is omitted or `null` when using cgroups v2. x-nullable: true type: "array" items: $ref: "#/definitions/ContainerBlkioStatEntry" io_merged_recursive: description: | This field is only available when using Linux containers with cgroups v1. It is omitted or `null` when using cgroups v2. x-nullable: true type: "array" items: $ref: "#/definitions/ContainerBlkioStatEntry" io_time_recursive: description: | This field is only available when using Linux containers with cgroups v1. It is omitted or `null` when using cgroups v2. x-nullable: true type: "array" items: $ref: "#/definitions/ContainerBlkioStatEntry" sectors_recursive: description: | This field is only available when using Linux containers with cgroups v1. It is omitted or `null` when using cgroups v2. x-nullable: true type: "array" items: $ref: "#/definitions/ContainerBlkioStatEntry" example: io_service_bytes_recursive: [ {"major": 254, "minor": 0, "op": "read", "value": 7593984}, {"major": 254, "minor": 0, "op": "write", "value": 100} ] io_serviced_recursive: null io_queue_recursive: null io_service_time_recursive: null io_wait_time_recursive: null io_merged_recursive: null io_time_recursive: null sectors_recursive: null ContainerBlkioStatEntry: description: | Blkio stats entry. This type is Linux-specific and omitted for Windows containers. type: "object" x-go-name: "BlkioStatEntry" x-nullable: true properties: major: type: "integer" format: "uint64" example: 254 minor: type: "integer" format: "uint64" example: 0 op: type: "string" example: "read" value: type: "integer" format: "uint64" example: 7593984 ContainerCPUStats: description: | CPU related info of the container type: "object" x-go-name: "CPUStats" x-nullable: true properties: cpu_usage: $ref: "#/definitions/ContainerCPUUsage" system_cpu_usage: description: | System Usage. This field is Linux-specific and omitted for Windows containers. type: "integer" format: "uint64" x-nullable: true example: 5 online_cpus: description: | Number of online CPUs. This field is Linux-specific and omitted for Windows containers. type: "integer" format: "uint32" x-nullable: true example: 5 throttling_data: $ref: "#/definitions/ContainerThrottlingData" ContainerCPUUsage: description: | All CPU stats aggregated since container inception. type: "object" x-go-name: "CPUUsage" x-nullable: true properties: total_usage: description: | Total CPU time consumed in nanoseconds (Linux) or 100's of nanoseconds (Windows). type: "integer" format: "uint64" example: 29912000 percpu_usage: description: | Total CPU time (in nanoseconds) consumed per core (Linux). This field is Linux-specific when using cgroups v1. It is omitted when using cgroups v2 and Windows containers. type: "array" x-nullable: true items: type: "integer" format: "uint64" example: 29912000 usage_in_kernelmode: description: | Time (in nanoseconds) spent by tasks of the cgroup in kernel mode (Linux), or time spent (in 100's of nanoseconds) by all container processes in kernel mode (Windows). Not populated for Windows containers using Hyper-V isolation. type: "integer" format: "uint64" example: 21994000 usage_in_usermode: description: | Time (in nanoseconds) spent by tasks of the cgroup in user mode (Linux), or time spent (in 100's of nanoseconds) by all container processes in kernel mode (Windows). Not populated for Windows containers using Hyper-V isolation. type: "integer" format: "uint64" example: 7918000 ContainerPidsStats: description: | PidsStats contains Linux-specific stats of a container's process-IDs (PIDs). This type is Linux-specific and omitted for Windows containers. type: "object" x-go-name: "PidsStats" x-nullable: true properties: current: description: | Current is the number of PIDs in the cgroup. type: "integer" format: "uint64" x-nullable: true example: 5 limit: description: | Limit is the hard limit on the number of pids in the cgroup. A "Limit" of 0 means that there is no limit. type: "integer" format: "uint64" x-nullable: true example: "18446744073709551615" ContainerThrottlingData: description: | CPU throttling stats of the container. This type is Linux-specific and omitted for Windows containers. type: "object" x-go-name: "ThrottlingData" x-nullable: true properties: periods: description: | Number of periods with throttling active. type: "integer" format: "uint64" example: 0 throttled_periods: description: | Number of periods when the container hit its throttling limit. type: "integer" format: "uint64" example: 0 throttled_time: description: | Aggregated time (in nanoseconds) the container was throttled for. type: "integer" format: "uint64" example: 0 ContainerMemoryStats: description: | Aggregates all memory stats since container inception on Linux. Windows returns stats for commit and private working set only. type: "object" x-go-name: "MemoryStats" properties: usage: description: | Current `res_counter` usage for memory. This field is Linux-specific and omitted for Windows containers. type: "integer" format: "uint64" x-nullable: true example: 0 max_usage: description: | Maximum usage ever recorded. This field is Linux-specific and only supported on cgroups v1. It is omitted when using cgroups v2 and for Windows containers. type: "integer" format: "uint64" x-nullable: true example: 0 stats: description: | All the stats exported via memory.stat. when using cgroups v2. This field is Linux-specific and omitted for Windows containers. type: "object" additionalProperties: type: "integer" format: "uint64" x-nullable: true example: { "active_anon": 1572864, "active_file": 5115904, "anon": 1572864, "anon_thp": 0, "file": 7626752, "file_dirty": 0, "file_mapped": 2723840, "file_writeback": 0, "inactive_anon": 0, "inactive_file": 2510848, "kernel_stack": 16384, "pgactivate": 0, "pgdeactivate": 0, "pgfault": 2042, "pglazyfree": 0, "pglazyfreed": 0, "pgmajfault": 45, "pgrefill": 0, "pgscan": 0, "pgsteal": 0, "shmem": 0, "slab": 1180928, "slab_reclaimable": 725576, "slab_unreclaimable": 455352, "sock": 0, "thp_collapse_alloc": 0, "thp_fault_alloc": 1, "unevictable": 0, "workingset_activate": 0, "workingset_nodereclaim": 0, "workingset_refault": 0 } failcnt: description: | Number of times memory usage hits limits. This field is Linux-specific and only supported on cgroups v1. It is omitted when using cgroups v2 and for Windows containers. type: "integer" format: "uint64" x-nullable: true example: 0 limit: description: | This field is Linux-specific and omitted for Windows containers. type: "integer" format: "uint64" x-nullable: true example: 8217579520 commitbytes: description: | Committed bytes. This field is Windows-specific and omitted for Linux containers. type: "integer" format: "uint64" x-nullable: true example: 0 commitpeakbytes: description: | Peak committed bytes. This field is Windows-specific and omitted for Linux containers. type: "integer" format: "uint64" x-nullable: true example: 0 privateworkingset: description: | Private working set. This field is Windows-specific and omitted for Linux containers. type: "integer" format: "uint64" x-nullable: true example: 0 ContainerNetworkStats: description: | Aggregates the network stats of one container type: "object" x-go-name: "NetworkStats" x-nullable: true properties: rx_bytes: description: | Bytes received. Windows and Linux. type: "integer" format: "uint64" example: 5338 rx_packets: description: | Packets received. Windows and Linux. type: "integer" format: "uint64" example: 36 rx_errors: description: | Received errors. Not used on Windows. This field is Linux-specific and always zero for Windows containers. type: "integer" format: "uint64" example: 0 rx_dropped: description: | Incoming packets dropped. Windows and Linux. type: "integer" format: "uint64" example: 0 tx_bytes: description: | Bytes sent. Windows and Linux. type: "integer" format: "uint64" example: 1200 tx_packets: description: | Packets sent. Windows and Linux. type: "integer" format: "uint64" example: 12 tx_errors: description: | Sent errors. Not used on Windows. This field is Linux-specific and always zero for Windows containers. type: "integer" format: "uint64" example: 0 tx_dropped: description: | Outgoing packets dropped. Windows and Linux. type: "integer" format: "uint64" example: 0 endpoint_id: description: | Endpoint ID. Not used on Linux. This field is Windows-specific and omitted for Linux containers. type: "string" x-nullable: true instance_id: description: | Instance ID. Not used on Linux. This field is Windows-specific and omitted for Linux containers. type: "string" x-nullable: true ContainerStorageStats: description: | StorageStats is the disk I/O stats for read/write on Windows. This type is Windows-specific and omitted for Linux containers. type: "object" x-go-name: "StorageStats" x-nullable: true properties: read_count_normalized: type: "integer" format: "uint64" x-nullable: true example: 7593984 read_size_bytes: type: "integer" format: "uint64" x-nullable: true example: 7593984 write_count_normalized: type: "integer" format: "uint64" x-nullable: true example: 7593984 write_size_bytes: type: "integer" format: "uint64" x-nullable: true example: 7593984 ContainerTopResponse: type: "object" x-go-name: "TopResponse" title: "ContainerTopResponse" description: |- Container "top" response. properties: Titles: description: "The ps column titles" type: "array" items: type: "string" example: Titles: - "UID" - "PID" - "PPID" - "C" - "STIME" - "TTY" - "TIME" - "CMD" Processes: description: |- Each process running in the container, where each process is an array of values corresponding to the titles. type: "array" items: type: "array" items: type: "string" example: Processes: - - "root" - "13642" - "882" - "0" - "17:03" - "pts/0" - "00:00:00" - "/bin/bash" - - "root" - "13735" - "13642" - "0" - "17:06" - "pts/0" - "00:00:00" - "sleep 10" ContainerWaitResponse: description: "OK response to ContainerWait operation" type: "object" x-go-name: "WaitResponse" title: "ContainerWaitResponse" required: [StatusCode] properties: StatusCode: description: "Exit code of the container" type: "integer" format: "int64" x-nullable: false Error: $ref: "#/definitions/ContainerWaitExitError" ContainerWaitExitError: description: "container waiting error, if any" type: "object" x-go-name: "WaitExitError" properties: Message: description: "Details of an error" type: "string" SystemVersion: type: "object" description: | Response of Engine API: GET "/version" properties: Platform: type: "object" required: [Name] properties: Name: type: "string" Components: type: "array" description: | Information about system components items: type: "object" x-go-name: ComponentVersion required: [Name, Version] properties: Name: description: | Name of the component type: "string" example: "Engine" Version: description: | Version of the component type: "string" x-nullable: false example: "27.0.1" Details: description: | Key/value pairs of strings with additional information about the component. These values are intended for informational purposes only, and their content is not defined, and not part of the API specification. These messages can be printed by the client as information to the user. type: "object" x-nullable: true Version: description: "The version of the daemon" type: "string" example: "27.0.1" ApiVersion: description: | The default (and highest) API version that is supported by the daemon type: "string" example: "1.47" MinAPIVersion: description: | The minimum API version that is supported by the daemon type: "string" example: "1.24" GitCommit: description: | The Git commit of the source code that was used to build the daemon type: "string" example: "48a66213fe" GoVersion: description: | The version Go used to compile the daemon, and the version of the Go runtime in use. type: "string" example: "go1.22.7" Os: description: | The operating system that the daemon is running on ("linux" or "windows") type: "string" example: "linux" Arch: description: | The architecture that the daemon is running on type: "string" example: "amd64" KernelVersion: description: | The kernel version (`uname -r`) that the daemon is running on. This field is omitted when empty. type: "string" example: "6.8.0-31-generic" Experimental: description: | Indicates if the daemon is started with experimental features enabled. This field is omitted when empty / false. type: "boolean" example: true BuildTime: description: | The date and time that the daemon was compiled. type: "string" example: "2020-06-22T15:49:27.000000000+00:00" SystemInfo: type: "object" properties: ID: description: | Unique identifier of the daemon.


> **Note**: The format of the ID itself is not part of the API, and > should not be considered stable. type: "string" example: "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS" Containers: description: "Total number of containers on the host." type: "integer" example: 14 ContainersRunning: description: | Number of containers with status `"running"`. type: "integer" example: 3 ContainersPaused: description: | Number of containers with status `"paused"`. type: "integer" example: 1 ContainersStopped: description: | Number of containers with status `"stopped"`. type: "integer" example: 10 Images: description: | Total number of images on the host. Both _tagged_ and _untagged_ (dangling) images are counted. type: "integer" example: 508 Driver: description: "Name of the storage driver in use." type: "string" example: "overlay2" DriverStatus: description: | Information specific to the storage driver, provided as "label" / "value" pairs. This information is provided by the storage driver, and formatted in a way consistent with the output of `docker info` on the command line.


> **Note**: The information returned in this field, including the > formatting of values and labels, should not be considered stable, > and may change without notice. type: "array" items: type: "array" items: type: "string" example: - ["Backing Filesystem", "extfs"] - ["Supports d_type", "true"] - ["Native Overlay Diff", "true"] DockerRootDir: description: | Root directory of persistent Docker state. Defaults to `/var/lib/docker` on Linux, and `C:\ProgramData\docker` on Windows. type: "string" example: "/var/lib/docker" Plugins: $ref: "#/definitions/PluginsInfo" MemoryLimit: description: "Indicates if the host has memory limit support enabled." type: "boolean" example: true SwapLimit: description: "Indicates if the host has memory swap limit support enabled." type: "boolean" example: true KernelMemoryTCP: description: | Indicates if the host has kernel memory TCP limit support enabled. This field is omitted if not supported. Kernel memory TCP limits are not supported when using cgroups v2, which does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup. **Deprecated**: This field is deprecated as kernel 6.12 has deprecated kernel memory TCP accounting. type: "boolean" example: true CpuCfsPeriod: description: | Indicates if CPU CFS(Completely Fair Scheduler) period is supported by the host. type: "boolean" example: true CpuCfsQuota: description: | Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by the host. type: "boolean" example: true CPUShares: description: | Indicates if CPU Shares limiting is supported by the host. type: "boolean" example: true CPUSet: description: | Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host. See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt) type: "boolean" example: true PidsLimit: description: "Indicates if the host kernel has PID limit support enabled." type: "boolean" example: true OomKillDisable: description: "Indicates if OOM killer disable is supported on the host." type: "boolean" IPv4Forwarding: description: "Indicates IPv4 forwarding is enabled." type: "boolean" example: true Debug: description: | Indicates if the daemon is running in debug-mode / with debug-level logging enabled. type: "boolean" example: true NFd: description: | The total number of file Descriptors in use by the daemon process. This information is only returned if debug-mode is enabled. type: "integer" example: 64 NGoroutines: description: | The number of goroutines that currently exist. This information is only returned if debug-mode is enabled. type: "integer" example: 174 SystemTime: description: | Current system-time in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. type: "string" example: "2017-08-08T20:28:29.06202363Z" LoggingDriver: description: | The logging driver to use as a default for new containers. type: "string" CgroupDriver: description: | The driver to use for managing cgroups. type: "string" enum: ["cgroupfs", "systemd", "none"] default: "cgroupfs" example: "cgroupfs" CgroupVersion: description: | The version of the cgroup. type: "string" enum: ["1", "2"] default: "1" example: "1" NEventsListener: description: "Number of event listeners subscribed." type: "integer" example: 30 KernelVersion: description: | Kernel version of the host. On Linux, this information obtained from `uname`. On Windows this information is queried from the HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ registry value, for example _"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)"_. type: "string" example: "6.8.0-31-generic" OperatingSystem: description: | Name of the host's operating system, for example: "Ubuntu 24.04 LTS" or "Windows Server 2016 Datacenter" type: "string" example: "Ubuntu 24.04 LTS" OSVersion: description: | Version of the host's operating system


> **Note**: The information returned in this field, including its > very existence, and the formatting of values, should not be considered > stable, and may change without notice. type: "string" example: "24.04" OSType: description: | Generic type of the operating system of the host, as returned by the Go runtime (`GOOS`). Currently returned values are "linux" and "windows". A full list of possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). type: "string" example: "linux" Architecture: description: | Hardware architecture of the host, as returned by the Go runtime (`GOARCH`). A full list of possible values can be found in the [Go documentation](https://go.dev/doc/install/source#environment). type: "string" example: "x86_64" NCPU: description: | The number of logical CPUs usable by the daemon. The number of available CPUs is checked by querying the operating system when the daemon starts. Changes to operating system CPU allocation after the daemon is started are not reflected. type: "integer" example: 4 MemTotal: description: | Total amount of physical memory available on the host, in bytes. type: "integer" format: "int64" example: 2095882240 IndexServerAddress: description: | Address / URL of the index server that is used for image search, and as a default for user authentication for Docker Hub and Docker Cloud. default: "https://index.docker.io/v1/" type: "string" example: "https://index.docker.io/v1/" RegistryConfig: $ref: "#/definitions/RegistryServiceConfig" GenericResources: $ref: "#/definitions/GenericResources" HttpProxy: description: | HTTP-proxy configured for the daemon. This value is obtained from the [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL are masked in the API response. Containers do not automatically inherit this configuration. type: "string" example: "http://xxxxx:xxxxx@proxy.corp.example.com:8080" HttpsProxy: description: | HTTPS-proxy configured for the daemon. This value is obtained from the [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL are masked in the API response. Containers do not automatically inherit this configuration. type: "string" example: "https://xxxxx:xxxxx@proxy.corp.example.com:4443" NoProxy: description: | Comma-separated list of domain extensions for which no proxy should be used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. Containers do not automatically inherit this configuration. type: "string" example: "*.local, 169.254/16" Name: description: "Hostname of the host." type: "string" example: "node5.corp.example.com" Labels: description: | User-defined labels (key/value metadata) as set on the daemon.


> **Note**: When part of a Swarm, nodes can both have _daemon_ labels, > set through the daemon configuration, and _node_ labels, set from a > manager node in the Swarm. Node labels are not included in this > field. Node labels can be retrieved using the `/nodes/(id)` endpoint > on a manager node in the Swarm. type: "array" items: type: "string" example: ["storage=ssd", "production"] ExperimentalBuild: description: | Indicates if experimental features are enabled on the daemon. type: "boolean" example: true ServerVersion: description: | Version string of the daemon. type: "string" example: "27.0.1" Runtimes: description: | List of [OCI compliant](https://github.com/opencontainers/runtime-spec) runtimes configured on the daemon. Keys hold the "name" used to reference the runtime. The Docker daemon relies on an OCI compliant runtime (invoked via the `containerd` daemon) as its interface to the Linux kernel namespaces, cgroups, and SELinux. The default runtime is `runc`, and automatically configured. Additional runtimes can be configured by the user and will be listed here. type: "object" additionalProperties: $ref: "#/definitions/Runtime" default: runc: path: "runc" example: runc: path: "runc" runc-master: path: "/go/bin/runc" custom: path: "/usr/local/bin/my-oci-runtime" runtimeArgs: ["--debug", "--systemd-cgroup=false"] DefaultRuntime: description: | Name of the default OCI runtime that is used when starting containers. The default can be overridden per-container at create time. type: "string" default: "runc" example: "runc" Swarm: $ref: "#/definitions/SwarmInfo" LiveRestoreEnabled: description: | Indicates if live restore is enabled. If enabled, containers are kept running when the daemon is shutdown or upon daemon start if running containers are detected. type: "boolean" default: false example: false Isolation: description: | Represents the isolation technology to use as a default for containers. The supported values are platform-specific. If no isolation value is specified on daemon start, on Windows client, the default is `hyperv`, and on Windows server, the default is `process`. This option is currently not used on other platforms. default: "default" type: "string" enum: - "default" - "hyperv" - "process" - "" InitBinary: description: | Name and, optional, path of the `docker-init` binary. If the path is omitted, the daemon searches the host's `$PATH` for the binary and uses the first result. type: "string" example: "docker-init" ContainerdCommit: $ref: "#/definitions/Commit" RuncCommit: $ref: "#/definitions/Commit" InitCommit: $ref: "#/definitions/Commit" SecurityOptions: description: | List of security features that are enabled on the daemon, such as apparmor, seccomp, SELinux, user-namespaces (userns), rootless and no-new-privileges. Additional configuration options for each security feature may be present, and are included as a comma-separated list of key/value pairs. type: "array" items: type: "string" example: - "name=apparmor" - "name=seccomp,profile=default" - "name=selinux" - "name=userns" - "name=rootless" ProductLicense: description: | Reports a summary of the product license on the daemon. If a commercial license has been applied to the daemon, information such as number of nodes, and expiration are included. type: "string" example: "Community Engine" DefaultAddressPools: description: | List of custom default address pools for local networks, which can be specified in the daemon.json file or dockerd option. Example: a Base "10.10.0.0/16" with Size 24 will define the set of 256 10.10.[0-255].0/24 address pools. type: "array" items: type: "object" properties: Base: description: "The network address in CIDR format" type: "string" example: "10.10.0.0/16" Size: description: "The network pool size" type: "integer" example: "24" FirewallBackend: $ref: "#/definitions/FirewallInfo" DiscoveredDevices: description: | List of devices discovered by device drivers. Each device includes information about its source driver, kind, name, and additional driver-specific attributes. type: "array" items: $ref: "#/definitions/DeviceInfo" Warnings: description: | List of warnings / informational messages about missing features, or issues related to the daemon configuration. These messages can be printed by the client as information to the user. type: "array" items: type: "string" example: - "WARNING: No memory limit support" CDISpecDirs: description: | List of directories where (Container Device Interface) CDI specifications are located. These specifications define vendor-specific modifications to an OCI runtime specification for a container being created. An empty list indicates that CDI device injection is disabled. Note that since using CDI device injection requires the daemon to have experimental enabled. For non-experimental daemons an empty list will always be returned. type: "array" items: type: "string" example: - "/etc/cdi" - "/var/run/cdi" Containerd: $ref: "#/definitions/ContainerdInfo" ContainerdInfo: description: | Information for connecting to the containerd instance that is used by the daemon. This is included for debugging purposes only. type: "object" x-nullable: true properties: Address: description: "The address of the containerd socket." type: "string" example: "/run/containerd/containerd.sock" Namespaces: description: | The namespaces that the daemon uses for running containers and plugins in containerd. These namespaces can be configured in the daemon configuration, and are considered to be used exclusively by the daemon, Tampering with the containerd instance may cause unexpected behavior. As these namespaces are considered to be exclusively accessed by the daemon, it is not recommended to change these values, or to change them to a value that is used by other systems, such as cri-containerd. type: "object" properties: Containers: description: | The default containerd namespace used for containers managed by the daemon. The default namespace for containers is "moby", but will be suffixed with the `.` of the remapped `root` if user-namespaces are enabled and the containerd image-store is used. type: "string" default: "moby" example: "moby" Plugins: description: | The default containerd namespace used for plugins managed by the daemon. The default namespace for plugins is "plugins.moby", but will be suffixed with the `.` of the remapped `root` if user-namespaces are enabled and the containerd image-store is used. type: "string" default: "plugins.moby" example: "plugins.moby" FirewallInfo: description: | Information about the daemon's firewalling configuration. This field is currently only used on Linux, and omitted on other platforms. type: "object" x-nullable: true properties: Driver: description: | The name of the firewall backend driver. type: "string" example: "nftables" Info: description: | Information about the firewall backend, provided as "label" / "value" pairs.


> **Note**: The information returned in this field, including the > formatting of values and labels, should not be considered stable, > and may change without notice. type: "array" items: type: "array" items: type: "string" example: - ["ReloadedAt", "2025-01-01T00:00:00Z"] # PluginsInfo is a temp struct holding Plugins name # registered with docker daemon. It is used by Info struct PluginsInfo: description: | Available plugins per type.


> **Note**: Only unmanaged (V1) plugins are included in this list. > V1 plugins are "lazily" loaded, and are not returned in this list > if there is no resource using the plugin. type: "object" properties: Volume: description: "Names of available volume-drivers, and network-driver plugins." type: "array" items: type: "string" example: ["local"] Network: description: "Names of available network-drivers, and network-driver plugins." type: "array" items: type: "string" example: ["bridge", "host", "ipvlan", "macvlan", "null", "overlay"] Authorization: description: "Names of available authorization plugins." type: "array" items: type: "string" example: ["img-authz-plugin", "hbm"] Log: description: "Names of available logging-drivers, and logging-driver plugins." type: "array" items: type: "string" example: ["awslogs", "fluentd", "gcplogs", "gelf", "journald", "json-file", "splunk", "syslog"] RegistryServiceConfig: description: | RegistryServiceConfig stores daemon registry services configuration. type: "object" x-nullable: true properties: InsecureRegistryCIDRs: description: | List of IP ranges of insecure registries, using the CIDR syntax ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from unknown CAs) communication. By default, local registries (`::1/128` and `127.0.0.0/8`) are configured as insecure. All other registries are secure. Communicating with an insecure registry is not possible if the daemon assumes that registry is secure. This configuration override this behavior, insecure communication with registries whose resolved IP address is within the subnet described by the CIDR syntax. Registries can also be marked insecure by hostname. Those registries are listed under `IndexConfigs` and have their `Secure` field set to `false`. > **Warning**: Using this option can be useful when running a local > registry, but introduces security vulnerabilities. This option > should therefore ONLY be used for testing purposes. For increased > security, users should add their CA to their system's list of trusted > CAs instead of enabling this option. type: "array" items: type: "string" example: ["::1/128", "127.0.0.0/8"] IndexConfigs: type: "object" additionalProperties: $ref: "#/definitions/IndexInfo" example: "127.0.0.1:5000": "Name": "127.0.0.1:5000" "Mirrors": [] "Secure": false "Official": false "[2001:db8:a0b:12f0::1]:80": "Name": "[2001:db8:a0b:12f0::1]:80" "Mirrors": [] "Secure": false "Official": false "docker.io": Name: "docker.io" Mirrors: ["https://hub-mirror.corp.example.com:5000/"] Secure: true Official: true "registry.internal.corp.example.com:3000": Name: "registry.internal.corp.example.com:3000" Mirrors: [] Secure: false Official: false Mirrors: description: | List of registry URLs that act as a mirror for the official (`docker.io`) registry. type: "array" items: type: "string" example: - "https://hub-mirror.corp.example.com:5000/" - "https://[2001:db8:a0b:12f0::1]/" IndexInfo: description: IndexInfo contains information about a registry. type: "object" x-nullable: true properties: Name: description: | Name of the registry, such as "docker.io". type: "string" example: "docker.io" Mirrors: description: | List of mirrors, expressed as URIs. type: "array" items: type: "string" example: - "https://hub-mirror.corp.example.com:5000/" - "https://registry-2.docker.io/" - "https://registry-3.docker.io/" Secure: description: | Indicates if the registry is part of the list of insecure registries. If `false`, the registry is insecure. Insecure registries accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from unknown CAs) communication. > **Warning**: Insecure registries can be useful when running a local > registry. However, because its use creates security vulnerabilities > it should ONLY be enabled for testing purposes. For increased > security, users should add their CA to their system's list of > trusted CAs instead of enabling this option. type: "boolean" example: true Official: description: | Indicates whether this is an official registry (i.e., Docker Hub / docker.io) type: "boolean" example: true Runtime: description: | Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec) runtime. The runtime is invoked by the daemon via the `containerd` daemon. OCI runtimes act as an interface to the Linux kernel namespaces, cgroups, and SELinux. type: "object" properties: path: description: | Name and, optional, path, of the OCI executable binary. If the path is omitted, the daemon searches the host's `$PATH` for the binary and uses the first result. type: "string" example: "/usr/local/bin/my-oci-runtime" runtimeArgs: description: | List of command-line arguments to pass to the runtime when invoked. type: "array" x-nullable: true items: type: "string" example: ["--debug", "--systemd-cgroup=false"] status: description: | Information specific to the runtime. While this API specification does not define data provided by runtimes, the following well-known properties may be provided by runtimes: `org.opencontainers.runtime-spec.features`: features structure as defined in the [OCI Runtime Specification](https://github.com/opencontainers/runtime-spec/blob/main/features.md), in a JSON string representation.


> **Note**: The information returned in this field, including the > formatting of values and labels, should not be considered stable, > and may change without notice. type: "object" x-nullable: true additionalProperties: type: "string" example: "org.opencontainers.runtime-spec.features": "{\"ociVersionMin\":\"1.0.0\",\"ociVersionMax\":\"1.1.0\",\"...\":\"...\"}" Commit: description: | Commit holds the Git-commit (SHA1) that a binary was built from, as reported in the version-string of external tools, such as `containerd`, or `runC`. type: "object" properties: ID: description: "Actual commit ID of external tool." type: "string" example: "cfb82a876ecc11b5ca0977d1733adbe58599088a" SwarmInfo: description: | Represents generic information about swarm. type: "object" properties: NodeID: description: "Unique identifier of for this node in the swarm." type: "string" default: "" example: "k67qz4598weg5unwwffg6z1m1" NodeAddr: description: | IP address at which this node can be reached by other nodes in the swarm. type: "string" default: "" example: "10.0.0.46" LocalNodeState: $ref: "#/definitions/LocalNodeState" ControlAvailable: type: "boolean" default: false example: true Error: type: "string" default: "" RemoteManagers: description: | List of ID's and addresses of other managers in the swarm. type: "array" default: null x-nullable: true items: $ref: "#/definitions/PeerNode" example: - NodeID: "71izy0goik036k48jg985xnds" Addr: "10.0.0.158:2377" - NodeID: "79y6h1o4gv8n120drcprv5nmc" Addr: "10.0.0.159:2377" - NodeID: "k67qz4598weg5unwwffg6z1m1" Addr: "10.0.0.46:2377" Nodes: description: "Total number of nodes in the swarm." type: "integer" x-nullable: true example: 4 Managers: description: "Total number of managers in the swarm." type: "integer" x-nullable: true example: 3 Cluster: $ref: "#/definitions/ClusterInfo" LocalNodeState: description: "Current local status of this node." type: "string" default: "" enum: - "" - "inactive" - "pending" - "active" - "error" - "locked" example: "active" PeerNode: description: "Represents a peer-node in the swarm" type: "object" properties: NodeID: description: "Unique identifier of for this node in the swarm." type: "string" Addr: description: | IP address and ports at which this node can be reached. type: "string" NetworkAttachmentConfig: description: | Specifies how a service should be attached to a particular network. type: "object" properties: Target: description: | The target network for attachment. Must be a network name or ID. type: "string" Aliases: description: | Discoverable alternate names for the service on this network. type: "array" items: type: "string" DriverOpts: description: | Driver attachment options for the network target. type: "object" additionalProperties: type: "string" EventActor: description: | Actor describes something that generates events, like a container, network, or a volume. type: "object" properties: ID: description: "The ID of the object emitting the event" type: "string" example: "ede54ee1afda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c743" Attributes: description: | Various key/value attributes of the object, depending on its type. type: "object" additionalProperties: type: "string" example: com.example.some-label: "some-label-value" image: "alpine:latest" name: "my-container" EventMessage: description: | EventMessage represents the information an event contains. type: "object" title: "SystemEventsResponse" properties: Type: description: "The type of object emitting the event" type: "string" enum: ["builder", "config", "container", "daemon", "image", "network", "node", "plugin", "secret", "service", "volume"] example: "container" Action: description: "The type of event" type: "string" example: "create" Actor: $ref: "#/definitions/EventActor" scope: description: | Scope of the event. Engine events are `local` scope. Cluster (Swarm) events are `swarm` scope. type: "string" enum: ["local", "swarm"] time: description: "Timestamp of event" type: "integer" format: "int64" example: 1629574695 timeNano: description: "Timestamp of event, with nanosecond accuracy" type: "integer" format: "int64" example: 1629574695515050031 OCIDescriptor: type: "object" x-go-name: Descriptor description: | A descriptor struct containing digest, media type, and size, as defined in the [OCI Content Descriptors Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/descriptor.md). properties: mediaType: description: | The media type of the object this schema refers to. type: "string" example: "application/vnd.oci.image.manifest.v1+json" digest: description: | The digest of the targeted content. type: "string" example: "sha256:c0537ff6a5218ef531ece93d4984efc99bbf3f7497c0a7726c88e2bb7584dc96" size: description: | The size in bytes of the blob. type: "integer" format: "int64" example: 424 urls: description: |- List of URLs from which this object MAY be downloaded. type: "array" items: type: "string" format: "uri" x-nullable: true annotations: description: |- Arbitrary metadata relating to the targeted content. type: "object" x-nullable: true additionalProperties: type: "string" example: "com.docker.official-images.bashbrew.arch": "amd64" "org.opencontainers.image.base.digest": "sha256:0d0ef5c914d3ea700147da1bd050c59edb8bb12ca312f3800b29d7c8087eabd8" "org.opencontainers.image.base.name": "scratch" "org.opencontainers.image.created": "2025-01-27T00:00:00Z" "org.opencontainers.image.revision": "9fabb4bad5138435b01857e2fe9363e2dc5f6a79" "org.opencontainers.image.source": "https://git.launchpad.net/cloud-images/+oci/ubuntu-base" "org.opencontainers.image.url": "https://hub.docker.com/_/ubuntu" "org.opencontainers.image.version": "24.04" data: type: string x-nullable: true description: |- Data is an embedding of the targeted content. This is encoded as a base64 string when marshalled to JSON (automatically, by encoding/json). If present, Data can be used directly to avoid fetching the targeted content. example: null platform: $ref: "#/definitions/OCIPlatform" artifactType: description: |- ArtifactType is the IANA media type of this artifact. type: "string" x-nullable: true example: null OCIPlatform: type: "object" x-go-name: Platform x-nullable: true description: | Describes the platform which the image in the manifest runs on, as defined in the [OCI Image Index Specification](https://github.com/opencontainers/image-spec/blob/v1.0.1/image-index.md). properties: architecture: description: | The CPU architecture, for example `amd64` or `ppc64`. type: "string" example: "arm" os: description: | The operating system, for example `linux` or `windows`. type: "string" example: "windows" os.version: description: | Optional field specifying the operating system version, for example on Windows `10.0.19041.1165`. type: "string" example: "10.0.19041.1165" os.features: description: | Optional field specifying an array of strings, each listing a required OS feature (for example on Windows `win32k`). type: "array" items: type: "string" example: - "win32k" variant: description: | Optional field specifying a variant of the CPU, for example `v7` to specify ARMv7 when architecture is `arm`. type: "string" example: "v7" DistributionInspect: type: "object" x-go-name: DistributionInspect title: "DistributionInspectResponse" required: [Descriptor, Platforms] description: | Describes the result obtained from contacting the registry to retrieve image metadata. properties: Descriptor: $ref: "#/definitions/OCIDescriptor" Platforms: type: "array" description: | An array containing all platforms supported by the image. items: $ref: "#/definitions/OCIPlatform" ClusterVolume: type: "object" description: | Options and information specific to, and only present on, Swarm CSI cluster volumes. properties: ID: type: "string" description: | The Swarm ID of this volume. Because cluster volumes are Swarm objects, they have an ID, unlike non-cluster volumes. This ID can be used to refer to the Volume instead of the name. Version: $ref: "#/definitions/ObjectVersion" CreatedAt: type: "string" format: "dateTime" UpdatedAt: type: "string" format: "dateTime" Spec: $ref: "#/definitions/ClusterVolumeSpec" Info: type: "object" description: | Information about the global status of the volume. properties: CapacityBytes: type: "integer" format: "int64" description: | The capacity of the volume in bytes. A value of 0 indicates that the capacity is unknown. VolumeContext: type: "object" description: | A map of strings to strings returned from the storage plugin when the volume is created. additionalProperties: type: "string" VolumeID: type: "string" description: | The ID of the volume as returned by the CSI storage plugin. This is distinct from the volume's ID as provided by Docker. This ID is never used by the user when communicating with Docker to refer to this volume. If the ID is blank, then the Volume has not been successfully created in the plugin yet. AccessibleTopology: type: "array" description: | The topology this volume is actually accessible from. items: $ref: "#/definitions/Topology" PublishStatus: type: "array" description: | The status of the volume as it pertains to its publishing and use on specific nodes items: type: "object" properties: NodeID: type: "string" description: | The ID of the Swarm node the volume is published on. State: type: "string" description: | The published state of the volume. * `pending-publish` The volume should be published to this node, but the call to the controller plugin to do so has not yet been successfully completed. * `published` The volume is published successfully to the node. * `pending-node-unpublish` The volume should be unpublished from the node, and the manager is awaiting confirmation from the worker that it has done so. * `pending-controller-unpublish` The volume is successfully unpublished from the node, but has not yet been successfully unpublished on the controller. enum: - "pending-publish" - "published" - "pending-node-unpublish" - "pending-controller-unpublish" PublishContext: type: "object" description: | A map of strings to strings returned by the CSI controller plugin when a volume is published. additionalProperties: type: "string" ClusterVolumeSpec: type: "object" description: | Cluster-specific options used to create the volume. properties: Group: type: "string" description: | Group defines the volume group of this volume. Volumes belonging to the same group can be referred to by group name when creating Services. Referring to a volume by group instructs Swarm to treat volumes in that group interchangeably for the purpose of scheduling. Volumes with an empty string for a group technically all belong to the same, emptystring group. AccessMode: type: "object" description: | Defines how the volume is used by tasks. properties: Scope: type: "string" description: | The set of nodes this volume can be used on at one time. - `single` The volume may only be scheduled to one node at a time. - `multi` the volume may be scheduled to any supported number of nodes at a time. default: "single" enum: ["single", "multi"] x-nullable: false Sharing: type: "string" description: | The number and way that different tasks can use this volume at one time. - `none` The volume may only be used by one task at a time. - `readonly` The volume may be used by any number of tasks, but they all must mount the volume as readonly - `onewriter` The volume may be used by any number of tasks, but only one may mount it as read/write. - `all` The volume may have any number of readers and writers. default: "none" enum: ["none", "readonly", "onewriter", "all"] x-nullable: false MountVolume: type: "object" description: | Options for using this volume as a Mount-type volume. Either MountVolume or BlockVolume, but not both, must be present. properties: FsType: type: "string" description: | Specifies the filesystem type for the mount volume. Optional. MountFlags: type: "array" description: | Flags to pass when mounting the volume. Optional. items: type: "string" BlockVolume: type: "object" description: | Options for using this volume as a Block-type volume. Intentionally empty. Secrets: type: "array" description: | Swarm Secrets that are passed to the CSI storage plugin when operating on this volume. items: type: "object" description: | One cluster volume secret entry. Defines a key-value pair that is passed to the plugin. properties: Key: type: "string" description: | Key is the name of the key of the key-value pair passed to the plugin. Secret: type: "string" description: | Secret is the swarm Secret object from which to read data. This can be a Secret name or ID. The Secret data is retrieved by swarm and used as the value of the key-value pair passed to the plugin. AccessibilityRequirements: type: "object" description: | Requirements for the accessible topology of the volume. These fields are optional. For an in-depth description of what these fields mean, see the CSI specification. properties: Requisite: type: "array" description: | A list of required topologies, at least one of which the volume must be accessible from. items: $ref: "#/definitions/Topology" Preferred: type: "array" description: | A list of topologies that the volume should attempt to be provisioned in. items: $ref: "#/definitions/Topology" CapacityRange: type: "object" description: | The desired capacity that the volume should be created with. If empty, the plugin will decide the capacity. properties: RequiredBytes: type: "integer" format: "int64" description: | The volume must be at least this big. The value of 0 indicates an unspecified minimum LimitBytes: type: "integer" format: "int64" description: | The volume must not be bigger than this. The value of 0 indicates an unspecified maximum. Availability: type: "string" description: | The availability of the volume for use in tasks. - `active` The volume is fully available for scheduling on the cluster - `pause` No new workloads should use the volume, but existing workloads are not stopped. - `drain` All workloads using this volume should be stopped and rescheduled, and no new ones should be started. default: "active" x-nullable: false enum: - "active" - "pause" - "drain" Topology: description: | A map of topological domains to topological segments. For in depth details, see documentation for the Topology object in the CSI specification. type: "object" additionalProperties: type: "string" ImageManifestSummary: x-go-name: "ManifestSummary" description: | ImageManifestSummary represents a summary of an image manifest. type: "object" required: ["ID", "Descriptor", "Available", "Size", "Kind"] properties: ID: description: | ID is the content-addressable ID of an image and is the same as the digest of the image manifest. type: "string" example: "sha256:95869fbcf224d947ace8d61d0e931d49e31bb7fc67fffbbe9c3198c33aa8e93f" Descriptor: $ref: "#/definitions/OCIDescriptor" Available: description: Indicates whether all the child content (image config, layers) is fully available locally. type: "boolean" example: true Size: type: "object" x-nullable: false required: ["Content", "Total"] properties: Total: type: "integer" format: "int64" example: 8213251 description: | Total is the total size (in bytes) of all the locally present data (both distributable and non-distributable) that's related to this manifest and its children. This equal to the sum of [Content] size AND all the sizes in the [Size] struct present in the Kind-specific data struct. For example, for an image kind (Kind == "image") this would include the size of the image content and unpacked image snapshots ([Size.Content] + [ImageData.Size.Unpacked]). Content: description: | Content is the size (in bytes) of all the locally present content in the content store (e.g. image config, layers) referenced by this manifest and its children. This only includes blobs in the content store. type: "integer" format: "int64" example: 3987495 Kind: type: "string" example: "image" enum: - "image" - "attestation" - "unknown" description: | The kind of the manifest. kind | description -------------|----------------------------------------------------------- image | Image manifest that can be used to start a container. attestation | Attestation manifest produced by the Buildkit builder for a specific image manifest. ImageData: description: | The image data for the image manifest. This field is only populated when Kind is "image". type: "object" x-nullable: true x-omitempty: true required: ["Platform", "Containers", "Size", "UnpackedSize"] properties: Platform: $ref: "#/definitions/OCIPlatform" description: | OCI platform of the image. This will be the platform specified in the manifest descriptor from the index/manifest list. If it's not available, it will be obtained from the image config. Containers: description: | The IDs of the containers that are using this image. type: "array" items: type: "string" example: ["ede54ee1fda366ab42f824e8a5ffd195155d853ceaec74a927f249ea270c7430", "abadbce344c096744d8d6071a90d474d28af8f1034b5ea9fb03c3f4bfc6d005e"] Size: type: "object" x-nullable: false required: ["Unpacked"] properties: Unpacked: type: "integer" format: "int64" example: 3987495 description: | Unpacked is the size (in bytes) of the locally unpacked (uncompressed) image content that's directly usable by the containers running this image. It's independent of the distributable content - e.g. the image might still have an unpacked data that's still used by some container even when the distributable/compressed content is already gone. AttestationData: description: | The image data for the attestation manifest. This field is only populated when Kind is "attestation". type: "object" x-nullable: true x-omitempty: true required: ["For"] properties: For: description: | The digest of the image manifest that this attestation is for. type: "string" example: "sha256:95869fbcf224d947ace8d61d0e931d49e31bb7fc67fffbbe9c3198c33aa8e93f" paths: /containers/json: get: summary: "List containers" description: | Returns a list of containers. For details on the format, see the [inspect endpoint](#operation/ContainerInspect). Note that it uses a different, smaller representation of a container than inspecting a single container. For example, the list of linked containers is not propagated . operationId: "ContainerList" produces: - "application/json" parameters: - name: "all" in: "query" description: | Return all containers. By default, only running containers are shown. type: "boolean" default: false - name: "limit" in: "query" description: | Return this number of most recently created containers, including non-running ones. type: "integer" - name: "size" in: "query" description: | Return the size of container as fields `SizeRw` and `SizeRootFs`. type: "boolean" default: false - name: "filters" in: "query" description: | Filters to process on the container list, encoded as JSON (a `map[string][]string`). For example, `{"status": ["paused"]}` will only return paused containers. Available filters: - `ancestor`=(`[:]`, ``, or ``) - `before`=(`` or ``) - `expose`=(`[/]`|`/[]`) - `exited=` containers with exit code of `` - `health`=(`starting`|`healthy`|`unhealthy`|`none`) - `id=` a container's ID - `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only) - `is-task=`(`true`|`false`) - `label=key` or `label="key=value"` of a container label - `name=` a container's name - `network`=(`` or ``) - `publish`=(`[/]`|`/[]`) - `since`=(`` or ``) - `status=`(`created`|`restarting`|`running`|`removing`|`paused`|`exited`|`dead`) - `volume`=(`` or ``) type: "string" responses: 200: description: "no error" schema: type: "array" items: $ref: "#/definitions/ContainerSummary" 400: description: "bad parameter" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" tags: ["Container"] /containers/create: post: summary: "Create a container" operationId: "ContainerCreate" consumes: - "application/json" - "application/octet-stream" produces: - "application/json" parameters: - name: "name" in: "query" description: | Assign the specified name to the container. Must match `/?[a-zA-Z0-9][a-zA-Z0-9_.-]+`. type: "string" pattern: "^/?[a-zA-Z0-9][a-zA-Z0-9_.-]+$" - name: "platform" in: "query" description: | Platform in the format `os[/arch[/variant]]` used for image lookup. When specified, the daemon checks if the requested image is present in the local image cache with the given OS and Architecture, and otherwise returns a `404` status. If the option is not set, the host's native OS and Architecture are used to look up the image in the image cache. However, if no platform is passed and the given image does exist in the local image cache, but its OS or architecture does not match, the container is created with the available image, and a warning is added to the `Warnings` field in the response, for example; WARNING: The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64) and no specific platform was requested type: "string" default: "" - name: "body" in: "body" description: "Container to create" schema: allOf: - $ref: "#/definitions/ContainerConfig" - type: "object" properties: HostConfig: $ref: "#/definitions/HostConfig" NetworkingConfig: $ref: "#/definitions/NetworkingConfig" example: Hostname: "" Domainname: "" User: "" AttachStdin: false AttachStdout: true AttachStderr: true Tty: false OpenStdin: false StdinOnce: false Env: - "FOO=bar" - "BAZ=quux" Cmd: - "date" Entrypoint: "" Image: "ubuntu" Labels: com.example.vendor: "Acme" com.example.license: "GPL" com.example.version: "1.0" Volumes: /volumes/data: {} WorkingDir: "" NetworkDisabled: false MacAddress: "12:34:56:78:9a:bc" ExposedPorts: 22/tcp: {} StopSignal: "SIGTERM" StopTimeout: 10 HostConfig: Binds: - "/tmp:/tmp" Links: - "redis3:redis" Memory: 0 MemorySwap: 0 MemoryReservation: 0 NanoCpus: 500000 CpuPercent: 80 CpuShares: 512 CpuPeriod: 100000 CpuRealtimePeriod: 1000000 CpuRealtimeRuntime: 10000 CpuQuota: 50000 CpusetCpus: "0,1" CpusetMems: "0,1" MaximumIOps: 0 MaximumIOBps: 0 BlkioWeight: 300 BlkioWeightDevice: - {} BlkioDeviceReadBps: - {} BlkioDeviceReadIOps: - {} BlkioDeviceWriteBps: - {} BlkioDeviceWriteIOps: - {} DeviceRequests: - Driver: "nvidia" Count: -1 DeviceIDs": ["0", "1", "GPU-fef8089b-4820-abfc-e83e-94318197576e"] Capabilities: [["gpu", "nvidia", "compute"]] Options: property1: "string" property2: "string" MemorySwappiness: 60 OomKillDisable: false OomScoreAdj: 500 PidMode: "" PidsLimit: 0 PortBindings: 22/tcp: - HostPort: "11022" PublishAllPorts: false Privileged: false ReadonlyRootfs: false Dns: - "8.8.8.8" DnsOptions: - "" DnsSearch: - "" VolumesFrom: - "parent" - "other:ro" CapAdd: - "NET_ADMIN" CapDrop: - "MKNOD" GroupAdd: - "newgroup" RestartPolicy: Name: "" MaximumRetryCount: 0 AutoRemove: true NetworkMode: "bridge" Devices: [] Ulimits: - {} LogConfig: Type: "json-file" Config: {} SecurityOpt: [] StorageOpt: {} CgroupParent: "" VolumeDriver: "" ShmSize: 67108864 NetworkingConfig: EndpointsConfig: isolated_nw: IPAMConfig: IPv4Address: "172.20.30.33" IPv6Address: "2001:db8:abcd::3033" LinkLocalIPs: - "169.254.34.68" - "fe80::3468" Links: - "container_1" - "container_2" Aliases: - "server_x" - "server_y" database_nw: {} required: true responses: 201: description: "Container created successfully" schema: $ref: "#/definitions/ContainerCreateResponse" 400: description: "bad parameter" schema: $ref: "#/definitions/ErrorResponse" 404: description: "no such image" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such image: c2ada9df5af8" 409: description: "conflict" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" tags: ["Container"] /containers/{id}/json: get: summary: "Inspect a container" description: "Return low-level information about a container." operationId: "ContainerInspect" produces: - "application/json" responses: 200: description: "no error" schema: $ref: "#/definitions/ContainerInspectResponse" 404: description: "no such container" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such container: c2ada9df5af8" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true description: "ID or name of the container" type: "string" - name: "size" in: "query" type: "boolean" default: false description: "Return the size of container as fields `SizeRw` and `SizeRootFs`" tags: ["Container"] /containers/{id}/top: get: summary: "List processes running inside a container" description: | On Unix systems, this is done by running the `ps` command. This endpoint is not supported on Windows. operationId: "ContainerTop" responses: 200: description: "no error" schema: $ref: "#/definitions/ContainerTopResponse" 404: description: "no such container" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such container: c2ada9df5af8" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true description: "ID or name of the container" type: "string" - name: "ps_args" in: "query" description: "The arguments to pass to `ps`. For example, `aux`" type: "string" default: "-ef" tags: ["Container"] /containers/{id}/logs: get: summary: "Get container logs" description: | Get `stdout` and `stderr` logs from a container. Note: This endpoint works only for containers with the `json-file` or `journald` logging driver. produces: - "application/vnd.docker.raw-stream" - "application/vnd.docker.multiplexed-stream" operationId: "ContainerLogs" responses: 200: description: | logs returned as a stream in response body. For the stream format, [see the documentation for the attach endpoint](#operation/ContainerAttach). Note that unlike the attach endpoint, the logs endpoint does not upgrade the connection and does not set Content-Type. schema: type: "string" format: "binary" 404: description: "no such container" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such container: c2ada9df5af8" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true description: "ID or name of the container" type: "string" - name: "follow" in: "query" description: "Keep connection after returning logs." type: "boolean" default: false - name: "stdout" in: "query" description: "Return logs from `stdout`" type: "boolean" default: false - name: "stderr" in: "query" description: "Return logs from `stderr`" type: "boolean" default: false - name: "since" in: "query" description: "Only return logs since this time, as a UNIX timestamp" type: "integer" default: 0 - name: "until" in: "query" description: "Only return logs before this time, as a UNIX timestamp" type: "integer" default: 0 - name: "timestamps" in: "query" description: "Add timestamps to every log line" type: "boolean" default: false - name: "tail" in: "query" description: | Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines. type: "string" default: "all" tags: ["Container"] /containers/{id}/changes: get: summary: "Get changes on a container’s filesystem" description: | Returns which files in a container's filesystem have been added, deleted, or modified. The `Kind` of modification can be one of: - `0`: Modified ("C") - `1`: Added ("A") - `2`: Deleted ("D") operationId: "ContainerChanges" produces: ["application/json"] responses: 200: description: "The list of changes" schema: type: "array" items: $ref: "#/definitions/FilesystemChange" examples: application/json: - Path: "/dev" Kind: 0 - Path: "/dev/kmsg" Kind: 1 - Path: "/test" Kind: 1 404: description: "no such container" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such container: c2ada9df5af8" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true description: "ID or name of the container" type: "string" tags: ["Container"] /containers/{id}/export: get: summary: "Export a container" description: "Export the contents of a container as a tarball." operationId: "ContainerExport" produces: - "application/octet-stream" responses: 200: description: "no error" 404: description: "no such container" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such container: c2ada9df5af8" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true description: "ID or name of the container" type: "string" tags: ["Container"] /containers/{id}/stats: get: summary: "Get container stats based on resource usage" description: | This endpoint returns a live stream of a container’s resource usage statistics. The `precpu_stats` is the CPU statistic of the *previous* read, and is used to calculate the CPU usage percentage. It is not an exact copy of the `cpu_stats` field. If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is nil then for compatibility with older daemons the length of the corresponding `cpu_usage.percpu_usage` array should be used. On a cgroup v2 host, the following fields are not set * `blkio_stats`: all fields other than `io_service_bytes_recursive` * `cpu_stats`: `cpu_usage.percpu_usage` * `memory_stats`: `max_usage` and `failcnt` Also, `memory_stats.stats` fields are incompatible with cgroup v1. To calculate the values shown by the `stats` command of the docker cli tool the following formulas can be used: * used_memory = `memory_stats.usage - memory_stats.stats.cache` * available_memory = `memory_stats.limit` * Memory usage % = `(used_memory / available_memory) * 100.0` * cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage` * system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage` * number_cpus = `length(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus` * CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0` operationId: "ContainerStats" produces: ["application/json"] responses: 200: description: "no error" schema: $ref: "#/definitions/ContainerStatsResponse" 404: description: "no such container" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such container: c2ada9df5af8" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true description: "ID or name of the container" type: "string" - name: "stream" in: "query" description: | Stream the output. If false, the stats will be output once and then it will disconnect. type: "boolean" default: true - name: "one-shot" in: "query" description: | Only get a single stat instead of waiting for 2 cycles. Must be used with `stream=false`. type: "boolean" default: false tags: ["Container"] /containers/{id}/resize: post: summary: "Resize a container TTY" description: "Resize the TTY for a container." operationId: "ContainerResize" consumes: - "application/octet-stream" produces: - "text/plain" responses: 200: description: "no error" 404: description: "no such container" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such container: c2ada9df5af8" 500: description: "cannot resize container" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true description: "ID or name of the container" type: "string" - name: "h" in: "query" required: true description: "Height of the TTY session in characters" type: "integer" - name: "w" in: "query" required: true description: "Width of the TTY session in characters" type: "integer" tags: ["Container"] /containers/{id}/start: post: summary: "Start a container" operationId: "ContainerStart" responses: 204: description: "no error" 304: description: "container already started" 404: description: "no such container" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such container: c2ada9df5af8" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true description: "ID or name of the container" type: "string" - name: "detachKeys" in: "query" description: | Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. type: "string" tags: ["Container"] /containers/{id}/stop: post: summary: "Stop a container" operationId: "ContainerStop" responses: 204: description: "no error" 304: description: "container already stopped" 404: description: "no such container" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such container: c2ada9df5af8" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true description: "ID or name of the container" type: "string" - name: "signal" in: "query" description: | Signal to send to the container as an integer or string (e.g. `SIGINT`). type: "string" - name: "t" in: "query" description: "Number of seconds to wait before killing the container" type: "integer" tags: ["Container"] /containers/{id}/restart: post: summary: "Restart a container" operationId: "ContainerRestart" responses: 204: description: "no error" 404: description: "no such container" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such container: c2ada9df5af8" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true description: "ID or name of the container" type: "string" - name: "signal" in: "query" description: | Signal to send to the container as an integer or string (e.g. `SIGINT`). type: "string" - name: "t" in: "query" description: "Number of seconds to wait before killing the container" type: "integer" tags: ["Container"] /containers/{id}/kill: post: summary: "Kill a container" description: | Send a POSIX signal to a container, defaulting to killing to the container. operationId: "ContainerKill" responses: 204: description: "no error" 404: description: "no such container" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such container: c2ada9df5af8" 409: description: "container is not running" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "Container d37cde0fe4ad63c3a7252023b2f9800282894247d145cb5933ddf6e52cc03a28 is not running" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true description: "ID or name of the container" type: "string" - name: "signal" in: "query" description: | Signal to send to the container as an integer or string (e.g. `SIGINT`). type: "string" default: "SIGKILL" tags: ["Container"] /containers/{id}/update: post: summary: "Update a container" description: | Change various configuration options of a container without having to recreate it. operationId: "ContainerUpdate" consumes: ["application/json"] produces: ["application/json"] responses: 200: description: "The container has been updated." schema: $ref: "#/definitions/ContainerUpdateResponse" 404: description: "no such container" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such container: c2ada9df5af8" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true description: "ID or name of the container" type: "string" - name: "update" in: "body" required: true schema: allOf: - $ref: "#/definitions/Resources" - type: "object" properties: RestartPolicy: $ref: "#/definitions/RestartPolicy" example: BlkioWeight: 300 CpuShares: 512 CpuPeriod: 100000 CpuQuota: 50000 CpuRealtimePeriod: 1000000 CpuRealtimeRuntime: 10000 CpusetCpus: "0,1" CpusetMems: "0" Memory: 314572800 MemorySwap: 514288000 MemoryReservation: 209715200 RestartPolicy: MaximumRetryCount: 4 Name: "on-failure" tags: ["Container"] /containers/{id}/rename: post: summary: "Rename a container" operationId: "ContainerRename" responses: 204: description: "no error" 404: description: "no such container" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such container: c2ada9df5af8" 409: description: "name already in use" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true description: "ID or name of the container" type: "string" - name: "name" in: "query" required: true description: "New name for the container" type: "string" tags: ["Container"] /containers/{id}/pause: post: summary: "Pause a container" description: | Use the freezer cgroup to suspend all processes in a container. Traditionally, when suspending a process the `SIGSTOP` signal is used, which is observable by the process being suspended. With the freezer cgroup the process is unaware, and unable to capture, that it is being suspended, and subsequently resumed. operationId: "ContainerPause" responses: 204: description: "no error" 404: description: "no such container" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such container: c2ada9df5af8" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true description: "ID or name of the container" type: "string" tags: ["Container"] /containers/{id}/unpause: post: summary: "Unpause a container" description: "Resume a container which has been paused." operationId: "ContainerUnpause" responses: 204: description: "no error" 404: description: "no such container" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such container: c2ada9df5af8" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true description: "ID or name of the container" type: "string" tags: ["Container"] /containers/{id}/attach: post: summary: "Attach to a container" description: | Attach to a container to read its output or send it input. You can attach to the same container multiple times and you can reattach to containers that have been detached. Either the `stream` or `logs` parameter must be `true` for this endpoint to do anything. See the [documentation for the `docker attach` command](https://docs.docker.com/engine/reference/commandline/attach/) for more details. ### Hijacking This endpoint hijacks the HTTP connection to transport `stdin`, `stdout`, and `stderr` on the same socket. This is the response from the daemon for an attach request: ``` HTTP/1.1 200 OK Content-Type: application/vnd.docker.raw-stream [STREAM] ``` After the headers and two new lines, the TCP connection can now be used for raw, bidirectional communication between the client and server. To hint potential proxies about connection hijacking, the Docker client can also optionally send connection upgrade headers. For example, the client sends this request to upgrade the connection: ``` POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1 Upgrade: tcp Connection: Upgrade ``` The Docker daemon will respond with a `101 UPGRADED` response, and will similarly follow with the raw stream: ``` HTTP/1.1 101 UPGRADED Content-Type: application/vnd.docker.raw-stream Connection: Upgrade Upgrade: tcp [STREAM] ``` ### Stream format When the TTY setting is disabled in [`POST /containers/create`](#operation/ContainerCreate), the HTTP Content-Type header is set to application/vnd.docker.multiplexed-stream and the stream over the hijacked connected is multiplexed to separate out `stdout` and `stderr`. The stream consists of a series of frames, each containing a header and a payload. The header contains the information which the stream writes (`stdout` or `stderr`). It also contains the size of the associated frame encoded in the last four bytes (`uint32`). It is encoded on the first eight bytes like this: ```go header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4} ``` `STREAM_TYPE` can be: - 0: `stdin` (is written on `stdout`) - 1: `stdout` - 2: `stderr` `SIZE1, SIZE2, SIZE3, SIZE4` are the four bytes of the `uint32` size encoded as big endian. Following the header is the payload, which is the specified number of bytes of `STREAM_TYPE`. The simplest way to implement this protocol is the following: 1. Read 8 bytes. 2. Choose `stdout` or `stderr` depending on the first byte. 3. Extract the frame size from the last four bytes. 4. Read the extracted size and output it on the correct output. 5. Goto 1. ### Stream format when using a TTY When the TTY setting is enabled in [`POST /containers/create`](#operation/ContainerCreate), the stream is not multiplexed. The data exchanged over the hijacked connection is simply the raw data from the process PTY and client's `stdin`. operationId: "ContainerAttach" produces: - "application/vnd.docker.raw-stream" - "application/vnd.docker.multiplexed-stream" responses: 101: description: "no error, hints proxy about hijacking" 200: description: "no error, no upgrade header found" 400: description: "bad parameter" schema: $ref: "#/definitions/ErrorResponse" 404: description: "no such container" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such container: c2ada9df5af8" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true description: "ID or name of the container" type: "string" - name: "detachKeys" in: "query" description: | Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. type: "string" - name: "logs" in: "query" description: | Replay previous logs from the container. This is useful for attaching to a container that has started and you want to output everything since the container started. If `stream` is also enabled, once all the previous output has been returned, it will seamlessly transition into streaming current output. type: "boolean" default: false - name: "stream" in: "query" description: | Stream attached streams from the time the request was made onwards. type: "boolean" default: false - name: "stdin" in: "query" description: "Attach to `stdin`" type: "boolean" default: false - name: "stdout" in: "query" description: "Attach to `stdout`" type: "boolean" default: false - name: "stderr" in: "query" description: "Attach to `stderr`" type: "boolean" default: false tags: ["Container"] /containers/{id}/attach/ws: get: summary: "Attach to a container via a websocket" operationId: "ContainerAttachWebsocket" responses: 101: description: "no error, hints proxy about hijacking" 200: description: "no error, no upgrade header found" 400: description: "bad parameter" schema: $ref: "#/definitions/ErrorResponse" 404: description: "no such container" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such container: c2ada9df5af8" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true description: "ID or name of the container" type: "string" - name: "detachKeys" in: "query" description: | Override the key sequence for detaching a container.Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,`, or `_`. type: "string" - name: "logs" in: "query" description: "Return logs" type: "boolean" default: false - name: "stream" in: "query" description: "Return stream" type: "boolean" default: false - name: "stdin" in: "query" description: "Attach to `stdin`" type: "boolean" default: false - name: "stdout" in: "query" description: "Attach to `stdout`" type: "boolean" default: false - name: "stderr" in: "query" description: "Attach to `stderr`" type: "boolean" default: false tags: ["Container"] /containers/{id}/wait: post: summary: "Wait for a container" description: "Block until a container stops, then returns the exit code." operationId: "ContainerWait" produces: ["application/json"] responses: 200: description: "The container has exit." schema: $ref: "#/definitions/ContainerWaitResponse" 400: description: "bad parameter" schema: $ref: "#/definitions/ErrorResponse" 404: description: "no such container" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such container: c2ada9df5af8" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true description: "ID or name of the container" type: "string" - name: "condition" in: "query" description: | Wait until a container state reaches the given condition. Defaults to `not-running` if omitted or empty. type: "string" enum: - "not-running" - "next-exit" - "removed" default: "not-running" tags: ["Container"] /containers/{id}: delete: summary: "Remove a container" operationId: "ContainerDelete" responses: 204: description: "no error" 400: description: "bad parameter" schema: $ref: "#/definitions/ErrorResponse" 404: description: "no such container" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such container: c2ada9df5af8" 409: description: "conflict" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: | You cannot remove a running container: c2ada9df5af8. Stop the container before attempting removal or force remove 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true description: "ID or name of the container" type: "string" - name: "v" in: "query" description: "Remove anonymous volumes associated with the container." type: "boolean" default: false - name: "force" in: "query" description: "If the container is running, kill it before removing it." type: "boolean" default: false - name: "link" in: "query" description: "Remove the specified link associated with the container." type: "boolean" default: false tags: ["Container"] /containers/{id}/archive: head: summary: "Get information about files in a container" description: | A response header `X-Docker-Container-Path-Stat` is returned, containing a base64 - encoded JSON object with some filesystem header information about the path. operationId: "ContainerArchiveInfo" responses: 200: description: "no error" headers: X-Docker-Container-Path-Stat: type: "string" description: | A base64 - encoded JSON object with some filesystem header information about the path 400: description: "Bad parameter" schema: $ref: "#/definitions/ErrorResponse" 404: description: "Container or path does not exist" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such container: c2ada9df5af8" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true description: "ID or name of the container" type: "string" - name: "path" in: "query" required: true description: "Resource in the container’s filesystem to archive." type: "string" tags: ["Container"] get: summary: "Get an archive of a filesystem resource in a container" description: "Get a tar archive of a resource in the filesystem of container id." operationId: "ContainerArchive" produces: ["application/x-tar"] responses: 200: description: "no error" 400: description: "Bad parameter" schema: $ref: "#/definitions/ErrorResponse" 404: description: "Container or path does not exist" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such container: c2ada9df5af8" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true description: "ID or name of the container" type: "string" - name: "path" in: "query" required: true description: "Resource in the container’s filesystem to archive." type: "string" tags: ["Container"] put: summary: "Extract an archive of files or folders to a directory in a container" description: | Upload a tar archive to be extracted to a path in the filesystem of container id. `path` parameter is asserted to be a directory. If it exists as a file, 400 error will be returned with message "not a directory". operationId: "PutContainerArchive" consumes: ["application/x-tar", "application/octet-stream"] responses: 200: description: "The content was extracted successfully" 400: description: "Bad parameter" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "not a directory" 403: description: "Permission denied, the volume or container rootfs is marked as read-only." schema: $ref: "#/definitions/ErrorResponse" 404: description: "No such container or path does not exist inside the container" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such container: c2ada9df5af8" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true description: "ID or name of the container" type: "string" - name: "path" in: "query" required: true description: "Path to a directory in the container to extract the archive’s contents into. " type: "string" - name: "noOverwriteDirNonDir" in: "query" description: | If `1`, `true`, or `True` then it will be an error if unpacking the given content would cause an existing directory to be replaced with a non-directory and vice versa. type: "string" - name: "copyUIDGID" in: "query" description: | If `1`, `true`, then it will copy UID/GID maps to the dest file or dir type: "string" - name: "inputStream" in: "body" required: true description: | The input stream must be a tar archive compressed with one of the following algorithms: `identity` (no compression), `gzip`, `bzip2`, or `xz`. schema: type: "string" format: "binary" tags: ["Container"] /containers/prune: post: summary: "Delete stopped containers" produces: - "application/json" operationId: "ContainerPrune" parameters: - name: "filters" in: "query" description: | Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: - `until=` Prune containers created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune containers with (or without, in case `label!=...` is used) the specified labels. type: "string" responses: 200: description: "No error" schema: type: "object" title: "ContainerPruneResponse" properties: ContainersDeleted: description: "Container IDs that were deleted" type: "array" items: type: "string" SpaceReclaimed: description: "Disk space reclaimed in bytes" type: "integer" format: "int64" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" tags: ["Container"] /images/json: get: summary: "List Images" description: "Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image." operationId: "ImageList" produces: - "application/json" responses: 200: description: "Summary image data for the images matching the query" schema: type: "array" items: $ref: "#/definitions/ImageSummary" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "all" in: "query" description: "Show all images. Only images from a final layer (no children) are shown by default." type: "boolean" default: false - name: "filters" in: "query" description: | A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: - `before`=(`[:]`, `` or ``) - `dangling=true` - `label=key` or `label="key=value"` of an image label - `reference`=(`[:]`) - `since`=(`[:]`, `` or ``) - `until=` type: "string" - name: "shared-size" in: "query" description: "Compute and show shared size as a `SharedSize` field on each image." type: "boolean" default: false - name: "digests" in: "query" description: "Show digest information as a `RepoDigests` field on each image." type: "boolean" default: false - name: "manifests" in: "query" description: "Include `Manifests` in the image summary." type: "boolean" default: false tags: ["Image"] /build: post: summary: "Build an image" description: | Build an image from a tar archive with a `Dockerfile` in it. The `Dockerfile` specifies how the image is built from the tar archive. It is typically in the archive's root, but can be at a different path or have a different name by specifying the `dockerfile` parameter. [See the `Dockerfile` reference for more information](https://docs.docker.com/engine/reference/builder/). The Docker daemon performs a preliminary validation of the `Dockerfile` before starting the build, and returns an error if the syntax is incorrect. After that, each instruction is run one-by-one until the ID of the new image is output. The build is canceled if the client drops the connection by quitting or being killed. operationId: "ImageBuild" consumes: - "application/octet-stream" produces: - "application/json" parameters: - name: "inputStream" in: "body" description: "A tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz." schema: type: "string" format: "binary" - name: "dockerfile" in: "query" description: "Path within the build context to the `Dockerfile`. This is ignored if `remote` is specified and points to an external `Dockerfile`." type: "string" default: "Dockerfile" - name: "t" in: "query" description: "A name and optional tag to apply to the image in the `name:tag` format. If you omit the tag the default `latest` value is assumed. You can provide several `t` parameters." type: "string" - name: "extrahosts" in: "query" description: "Extra hosts to add to /etc/hosts" type: "string" - name: "remote" in: "query" description: "A Git repository URI or HTTP/HTTPS context URI. If the URI points to a single text file, the file’s contents are placed into a file called `Dockerfile` and the image is built from that file. If the URI points to a tarball, the file is downloaded by the daemon and the contents therein used as the context for the build. If the URI points to a tarball and the `dockerfile` parameter is also specified, there must be a file with the corresponding path inside the tarball." type: "string" - name: "q" in: "query" description: "Suppress verbose build output." type: "boolean" default: false - name: "nocache" in: "query" description: "Do not use the cache when building the image." type: "boolean" default: false - name: "cachefrom" in: "query" description: "JSON array of images used for build cache resolution." type: "string" - name: "pull" in: "query" description: "Attempt to pull the image even if an older image exists locally." type: "string" - name: "rm" in: "query" description: "Remove intermediate containers after a successful build." type: "boolean" default: true - name: "forcerm" in: "query" description: "Always remove intermediate containers, even upon failure." type: "boolean" default: false - name: "memory" in: "query" description: "Set memory limit for build." type: "integer" - name: "memswap" in: "query" description: "Total memory (memory + swap). Set as `-1` to disable swap." type: "integer" - name: "cpushares" in: "query" description: "CPU shares (relative weight)." type: "integer" - name: "cpusetcpus" in: "query" description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)." type: "string" - name: "cpuperiod" in: "query" description: "The length of a CPU period in microseconds." type: "integer" - name: "cpuquota" in: "query" description: "Microseconds of CPU time that the container can get in a CPU period." type: "integer" - name: "buildargs" in: "query" description: > JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the `Dockerfile` RUN instruction, or for variable expansion in other `Dockerfile` instructions. This is not meant for passing secret values. For example, the build arg `FOO=bar` would become `{"FOO":"bar"}` in JSON. This would result in the query parameter `buildargs={"FOO":"bar"}`. Note that `{"FOO":"bar"}` should be URI component encoded. [Read more about the buildargs instruction.](https://docs.docker.com/engine/reference/builder/#arg) type: "string" - name: "shmsize" in: "query" description: "Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB." type: "integer" - name: "squash" in: "query" description: "Squash the resulting images layers into a single layer. *(Experimental release only.)*" type: "boolean" - name: "labels" in: "query" description: "Arbitrary key/value labels to set on the image, as a JSON map of string pairs." type: "string" - name: "networkmode" in: "query" description: | Sets the networking mode for the run commands during build. Supported standard values are: `bridge`, `host`, `none`, and `container:`. Any other value is taken as a custom network's name or ID to which this container should connect to. type: "string" - name: "Content-type" in: "header" type: "string" enum: - "application/x-tar" default: "application/x-tar" - name: "X-Registry-Config" in: "header" description: | This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to. The key is a registry URL, and the value is an auth configuration object, [as described in the authentication section](#section/Authentication). For example: ``` { "docker.example.com": { "username": "janedoe", "password": "hunter2" }, "https://index.docker.io/v1/": { "username": "mobydock", "password": "conta1n3rize14" } } ``` Only the registry domain name (and port if not the default 443) are required. However, for legacy reasons, the Docker Hub registry must be specified with both a `https://` prefix and a `/v1/` suffix even though Docker will prefer to use the v2 registry API. type: "string" - name: "platform" in: "query" description: "Platform in the format os[/arch[/variant]]" type: "string" default: "" - name: "target" in: "query" description: "Target build stage" type: "string" default: "" - name: "outputs" in: "query" description: "BuildKit output configuration" type: "string" default: "" - name: "version" in: "query" type: "string" default: "1" enum: ["1", "2"] description: | Version of the builder backend to use. - `1` is the first generation classic (deprecated) builder in the Docker daemon (default) - `2` is [BuildKit](https://github.com/moby/buildkit) responses: 200: description: "no error" 400: description: "Bad parameter" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" tags: ["Image"] /build/prune: post: summary: "Delete builder cache" produces: - "application/json" operationId: "BuildPrune" parameters: - name: "keep-storage" in: "query" description: | Amount of disk space in bytes to keep for cache > **Deprecated**: This parameter is deprecated and has been renamed to "reserved-space". > It is kept for backward compatibility and will be removed in API v1.49. type: "integer" format: "int64" - name: "reserved-space" in: "query" description: "Amount of disk space in bytes to keep for cache" type: "integer" format: "int64" - name: "max-used-space" in: "query" description: "Maximum amount of disk space allowed to keep for cache" type: "integer" format: "int64" - name: "min-free-space" in: "query" description: "Target amount of free disk space after pruning" type: "integer" format: "int64" - name: "all" in: "query" type: "boolean" description: "Remove all types of build cache" - name: "filters" in: "query" type: "string" description: | A JSON encoded value of the filters (a `map[string][]string`) to process on the list of build cache objects. Available filters: - `until=` remove cache older than ``. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon's local time. - `id=` - `parent=` - `type=` - `description=` - `inuse` - `shared` - `private` responses: 200: description: "No error" schema: type: "object" title: "BuildPruneResponse" properties: CachesDeleted: type: "array" items: description: "ID of build cache object" type: "string" SpaceReclaimed: description: "Disk space reclaimed in bytes" type: "integer" format: "int64" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" tags: ["Image"] /images/create: post: summary: "Create an image" description: "Pull or import an image." operationId: "ImageCreate" consumes: - "text/plain" - "application/octet-stream" produces: - "application/json" responses: 200: description: "no error" 404: description: "repository does not exist or no read access" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "fromImage" in: "query" description: | Name of the image to pull. If the name includes a tag or digest, specific behavior applies: - If only `fromImage` includes a tag, that tag is used. - If both `fromImage` and `tag` are provided, `tag` takes precedence. - If `fromImage` includes a digest, the image is pulled by digest, and `tag` is ignored. - If neither a tag nor digest is specified, all tags are pulled. type: "string" - name: "fromSrc" in: "query" description: "Source to import. The value may be a URL from which the image can be retrieved or `-` to read the image from the request body. This parameter may only be used when importing an image." type: "string" - name: "repo" in: "query" description: "Repository name given to an image when it is imported. The repo may include a tag. This parameter may only be used when importing an image." type: "string" - name: "tag" in: "query" description: "Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled." type: "string" - name: "message" in: "query" description: "Set commit message for imported image." type: "string" - name: "inputImage" in: "body" description: "Image content if the value `-` has been specified in fromSrc query parameter" schema: type: "string" required: false - name: "X-Registry-Auth" in: "header" description: | A base64url-encoded auth configuration. Refer to the [authentication section](#section/Authentication) for details. type: "string" - name: "changes" in: "query" description: | Apply `Dockerfile` instructions to the image that is created, for example: `changes=ENV DEBUG=true`. Note that `ENV DEBUG=true` should be URI component encoded. Supported `Dockerfile` instructions: `CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`ONBUILD`|`USER`|`VOLUME`|`WORKDIR` type: "array" items: type: "string" - name: "platform" in: "query" description: | Platform in the format os[/arch[/variant]]. When used in combination with the `fromImage` option, the daemon checks if the given image is present in the local image cache with the given OS and Architecture, and otherwise attempts to pull the image. If the option is not set, the host's native OS and Architecture are used. If the given image does not exist in the local image cache, the daemon attempts to pull the image with the host's native OS and Architecture. If the given image does exists in the local image cache, but its OS or architecture does not match, a warning is produced. When used with the `fromSrc` option to import an image from an archive, this option sets the platform information for the imported image. If the option is not set, the host's native OS and Architecture are used for the imported image. type: "string" default: "" tags: ["Image"] /images/{name}/json: get: summary: "Inspect an image" description: "Return low-level information about an image." operationId: "ImageInspect" produces: - "application/json" responses: 200: description: "No error" schema: $ref: "#/definitions/ImageInspect" 404: description: "No such image" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such image: someimage (tag: latest)" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "name" in: "path" description: "Image name or id" type: "string" required: true - name: "manifests" in: "query" description: "Include Manifests in the image summary." type: "boolean" default: false required: false tags: ["Image"] /images/{name}/history: get: summary: "Get the history of an image" description: "Return parent layers of an image." operationId: "ImageHistory" produces: ["application/json"] responses: 200: description: "List of image layers" schema: type: "array" items: type: "object" x-go-name: HistoryResponseItem title: "HistoryResponseItem" description: "individual image layer information in response to ImageHistory operation" required: [Id, Created, CreatedBy, Tags, Size, Comment] properties: Id: type: "string" x-nullable: false Created: type: "integer" format: "int64" x-nullable: false CreatedBy: type: "string" x-nullable: false Tags: type: "array" items: type: "string" Size: type: "integer" format: "int64" x-nullable: false Comment: type: "string" x-nullable: false examples: application/json: - Id: "3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710" Created: 1398108230 CreatedBy: "/bin/sh -c #(nop) ADD file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab4801f2e81e2a5148 in /" Tags: - "ubuntu:lucid" - "ubuntu:10.04" Size: 182964289 Comment: "" - Id: "6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8" Created: 1398108222 CreatedBy: "/bin/sh -c #(nop) MAINTAINER Tianon Gravi - mkimage-debootstrap.sh -i iproute,iputils-ping,ubuntu-minimal -t lucid.tar.xz lucid http://archive.ubuntu.com/ubuntu/" Tags: [] Size: 0 Comment: "" - Id: "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158" Created: 1371157430 CreatedBy: "" Tags: - "scratch12:latest" - "scratch:latest" Size: 0 Comment: "Imported from -" 404: description: "No such image" schema: $ref: "#/definitions/ErrorResponse" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "name" in: "path" description: "Image name or ID" type: "string" required: true - name: "platform" type: "string" in: "query" description: | JSON-encoded OCI platform to select the platform-variant. If omitted, it defaults to any locally available platform, prioritizing the daemon's host platform. If the daemon provides a multi-platform image store, this selects the platform-variant to show the history for. If the image is a single-platform image, or if the multi-platform image does not provide a variant matching the given platform, an error is returned. Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}` tags: ["Image"] /images/{name}/push: post: summary: "Push an image" description: | Push an image to a registry. If you wish to push an image on to a private registry, that image must already have a tag which references the registry. For example, `registry.example.com/myimage:latest`. The push is cancelled if the HTTP connection is closed. operationId: "ImagePush" consumes: - "application/octet-stream" responses: 200: description: "No error" 404: description: "No such image" schema: $ref: "#/definitions/ErrorResponse" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "name" in: "path" description: | Name of the image to push. For example, `registry.example.com/myimage`. The image must be present in the local image store with the same name. The name should be provided without tag; if a tag is provided, it is ignored. For example, `registry.example.com/myimage:latest` is considered equivalent to `registry.example.com/myimage`. Use the `tag` parameter to specify the tag to push. type: "string" required: true - name: "tag" in: "query" description: | Tag of the image to push. For example, `latest`. If no tag is provided, all tags of the given image that are present in the local image store are pushed. type: "string" - name: "platform" type: "string" in: "query" description: | JSON-encoded OCI platform to select the platform-variant to push. If not provided, all available variants will attempt to be pushed. If the daemon provides a multi-platform image store, this selects the platform-variant to push to the registry. If the image is a single-platform image, or if the multi-platform image does not provide a variant matching the given platform, an error is returned. Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}` - name: "X-Registry-Auth" in: "header" description: | A base64url-encoded auth configuration. Refer to the [authentication section](#section/Authentication) for details. type: "string" required: true tags: ["Image"] /images/{name}/tag: post: summary: "Tag an image" description: "Tag an image so that it becomes part of a repository." operationId: "ImageTag" responses: 201: description: "No error" 400: description: "Bad parameter" schema: $ref: "#/definitions/ErrorResponse" 404: description: "No such image" schema: $ref: "#/definitions/ErrorResponse" 409: description: "Conflict" schema: $ref: "#/definitions/ErrorResponse" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "name" in: "path" description: "Image name or ID to tag." type: "string" required: true - name: "repo" in: "query" description: "The repository to tag in. For example, `someuser/someimage`." type: "string" - name: "tag" in: "query" description: "The name of the new tag." type: "string" tags: ["Image"] /images/{name}: delete: summary: "Remove an image" description: | Remove an image, along with any untagged parent images that were referenced by that image. Images can't be removed if they have descendant images, are being used by a running container or are being used by a build. operationId: "ImageDelete" produces: ["application/json"] responses: 200: description: "The image was deleted successfully" schema: type: "array" items: $ref: "#/definitions/ImageDeleteResponseItem" examples: application/json: - Untagged: "3e2f21a89f" - Deleted: "3e2f21a89f" - Deleted: "53b4f83ac9" 404: description: "No such image" schema: $ref: "#/definitions/ErrorResponse" 409: description: "Conflict" schema: $ref: "#/definitions/ErrorResponse" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "name" in: "path" description: "Image name or ID" type: "string" required: true - name: "force" in: "query" description: "Remove the image even if it is being used by stopped containers or has other tags" type: "boolean" default: false - name: "noprune" in: "query" description: "Do not delete untagged parent images" type: "boolean" default: false - name: "platforms" in: "query" description: | Select platform-specific content to delete. Multiple values are accepted. Each platform is a OCI platform encoded as a JSON string. type: "array" items: # This should be OCIPlatform # but $ref is not supported for array in query in Swagger 2.0 # $ref: "#/definitions/OCIPlatform" type: "string" tags: ["Image"] /images/search: get: summary: "Search images" description: "Search for an image on Docker Hub." operationId: "ImageSearch" produces: - "application/json" responses: 200: description: "No error" schema: type: "array" items: type: "object" title: "ImageSearchResponseItem" properties: description: type: "string" is_official: type: "boolean" is_automated: description: | Whether this repository has automated builds enabled.


> **Deprecated**: This field is deprecated and will always be "false". type: "boolean" example: false name: type: "string" star_count: type: "integer" examples: application/json: - description: "A minimal Docker image based on Alpine Linux with a complete package index and only 5 MB in size!" is_official: true is_automated: false name: "alpine" star_count: 10093 - description: "Busybox base image." is_official: true is_automated: false name: "Busybox base image." star_count: 3037 - description: "The PostgreSQL object-relational database system provides reliability and data integrity." is_official: true is_automated: false name: "postgres" star_count: 12408 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "term" in: "query" description: "Term to search" type: "string" required: true - name: "limit" in: "query" description: "Maximum number of results to return" type: "integer" - name: "filters" in: "query" description: | A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters: - `is-official=(true|false)` - `stars=` Matches images that has at least 'number' stars. type: "string" tags: ["Image"] /images/prune: post: summary: "Delete unused images" produces: - "application/json" operationId: "ImagePrune" parameters: - name: "filters" in: "query" description: | Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: - `dangling=` When set to `true` (or `1`), prune only unused *and* untagged images. When set to `false` (or `0`), all unused images are pruned. - `until=` Prune images created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune images with (or without, in case `label!=...` is used) the specified labels. type: "string" responses: 200: description: "No error" schema: type: "object" title: "ImagePruneResponse" properties: ImagesDeleted: description: "Images that were deleted" type: "array" items: $ref: "#/definitions/ImageDeleteResponseItem" SpaceReclaimed: description: "Disk space reclaimed in bytes" type: "integer" format: "int64" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" tags: ["Image"] /auth: post: summary: "Check auth configuration" description: | Validate credentials for a registry and, if available, get an identity token for accessing the registry without password. operationId: "SystemAuth" consumes: ["application/json"] produces: ["application/json"] responses: 200: description: "An identity token was generated successfully." schema: type: "object" title: "SystemAuthResponse" required: [Status] properties: Status: description: "The status of the authentication" type: "string" x-nullable: false IdentityToken: description: "An opaque token used to authenticate a user after a successful login" type: "string" x-nullable: false examples: application/json: Status: "Login Succeeded" IdentityToken: "9cbaf023786cd7..." 204: description: "No error" 401: description: "Auth error" schema: $ref: "#/definitions/ErrorResponse" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "authConfig" in: "body" description: "Authentication to check" schema: $ref: "#/definitions/AuthConfig" tags: ["System"] /info: get: summary: "Get system information" operationId: "SystemInfo" produces: - "application/json" responses: 200: description: "No error" schema: $ref: "#/definitions/SystemInfo" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" tags: ["System"] /version: get: summary: "Get version" description: "Returns the version of Docker that is running and various information about the system that Docker is running on." operationId: "SystemVersion" produces: ["application/json"] responses: 200: description: "no error" schema: $ref: "#/definitions/SystemVersion" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" tags: ["System"] /_ping: get: summary: "Ping" description: "This is a dummy endpoint you can use to test if the server is accessible." operationId: "SystemPing" produces: ["text/plain"] responses: 200: description: "no error" schema: type: "string" example: "OK" headers: Api-Version: type: "string" description: "Max API Version the server supports" Builder-Version: type: "string" description: | Default version of docker image builder The default on Linux is version "2" (BuildKit), but the daemon can be configured to recommend version "1" (classic Builder). Windows does not yet support BuildKit for native Windows images, and uses "1" (classic builder) as a default. This value is a recommendation as advertised by the daemon, and it is up to the client to choose which builder to use. default: "2" Docker-Experimental: type: "boolean" description: "If the server is running with experimental mode enabled" Swarm: type: "string" enum: ["inactive", "pending", "error", "locked", "active/worker", "active/manager"] description: | Contains information about Swarm status of the daemon, and if the daemon is acting as a manager or worker node. default: "inactive" Cache-Control: type: "string" default: "no-cache, no-store, must-revalidate" Pragma: type: "string" default: "no-cache" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" headers: Cache-Control: type: "string" default: "no-cache, no-store, must-revalidate" Pragma: type: "string" default: "no-cache" tags: ["System"] head: summary: "Ping" description: "This is a dummy endpoint you can use to test if the server is accessible." operationId: "SystemPingHead" produces: ["text/plain"] responses: 200: description: "no error" schema: type: "string" example: "(empty)" headers: Api-Version: type: "string" description: "Max API Version the server supports" Builder-Version: type: "string" description: "Default version of docker image builder" Docker-Experimental: type: "boolean" description: "If the server is running with experimental mode enabled" Swarm: type: "string" enum: ["inactive", "pending", "error", "locked", "active/worker", "active/manager"] description: | Contains information about Swarm status of the daemon, and if the daemon is acting as a manager or worker node. default: "inactive" Cache-Control: type: "string" default: "no-cache, no-store, must-revalidate" Pragma: type: "string" default: "no-cache" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" tags: ["System"] /commit: post: summary: "Create a new image from a container" operationId: "ImageCommit" consumes: - "application/json" produces: - "application/json" responses: 201: description: "no error" schema: $ref: "#/definitions/IDResponse" 404: description: "no such container" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such container: c2ada9df5af8" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "containerConfig" in: "body" description: "The container configuration" schema: $ref: "#/definitions/ContainerConfig" - name: "container" in: "query" description: "The ID or name of the container to commit" type: "string" - name: "repo" in: "query" description: "Repository name for the created image" type: "string" - name: "tag" in: "query" description: "Tag name for the create image" type: "string" - name: "comment" in: "query" description: "Commit message" type: "string" - name: "author" in: "query" description: "Author of the image (e.g., `John Hannibal Smith `)" type: "string" - name: "pause" in: "query" description: "Whether to pause the container before committing" type: "boolean" default: true - name: "changes" in: "query" description: "`Dockerfile` instructions to apply while committing" type: "string" tags: ["Image"] /events: get: summary: "Monitor events" description: | Stream real-time events from the server. Various objects within Docker report events when something happens to them. Containers report these events: `attach`, `commit`, `copy`, `create`, `destroy`, `detach`, `die`, `exec_create`, `exec_detach`, `exec_start`, `exec_die`, `export`, `health_status`, `kill`, `oom`, `pause`, `rename`, `resize`, `restart`, `start`, `stop`, `top`, `unpause`, `update`, and `prune` Images report these events: `create`, `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, `untag`, and `prune` Volumes report these events: `create`, `mount`, `unmount`, `destroy`, and `prune` Networks report these events: `create`, `connect`, `disconnect`, `destroy`, `update`, `remove`, and `prune` The Docker daemon reports these events: `reload` Services report these events: `create`, `update`, and `remove` Nodes report these events: `create`, `update`, and `remove` Secrets report these events: `create`, `update`, and `remove` Configs report these events: `create`, `update`, and `remove` The Builder reports `prune` events operationId: "SystemEvents" produces: - "application/json" responses: 200: description: "no error" schema: $ref: "#/definitions/EventMessage" 400: description: "bad parameter" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "since" in: "query" description: "Show events created since this timestamp then stream new events." type: "string" - name: "until" in: "query" description: "Show events created until this timestamp then stop streaming." type: "string" - name: "filters" in: "query" description: | A JSON encoded value of filters (a `map[string][]string`) to process on the event list. Available filters: - `config=` config name or ID - `container=` container name or ID - `daemon=` daemon name or ID - `event=` event type - `image=` image name or ID - `label=` image or container label - `network=` network name or ID - `node=` node ID - `plugin`= plugin name or ID - `scope`= local or swarm - `secret=` secret name or ID - `service=` service name or ID - `type=` object to filter by, one of `container`, `image`, `volume`, `network`, `daemon`, `plugin`, `node`, `service`, `secret` or `config` - `volume=` volume name type: "string" tags: ["System"] /system/df: get: summary: "Get data usage information" operationId: "SystemDataUsage" responses: 200: description: "no error" schema: type: "object" title: "SystemDataUsageResponse" properties: LayersSize: type: "integer" format: "int64" Images: type: "array" items: $ref: "#/definitions/ImageSummary" Containers: type: "array" items: $ref: "#/definitions/ContainerSummary" Volumes: type: "array" items: $ref: "#/definitions/Volume" BuildCache: type: "array" items: $ref: "#/definitions/BuildCache" example: LayersSize: 1092588 Images: - Id: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" ParentId: "" RepoTags: - "busybox:latest" RepoDigests: - "busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6" Created: 1466724217 Size: 1092588 SharedSize: 0 Labels: {} Containers: 1 Containers: - Id: "e575172ed11dc01bfce087fb27bee502db149e1a0fad7c296ad300bbff178148" Names: - "/top" Image: "busybox" ImageID: "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" Command: "top" Created: 1472592424 Ports: [] SizeRootFs: 1092588 Labels: {} State: "exited" Status: "Exited (0) 56 minutes ago" HostConfig: NetworkMode: "default" NetworkSettings: Networks: bridge: IPAMConfig: null Links: null Aliases: null NetworkID: "d687bc59335f0e5c9ee8193e5612e8aee000c8c62ea170cfb99c098f95899d92" EndpointID: "8ed5115aeaad9abb174f68dcf135b49f11daf597678315231a32ca28441dec6a" Gateway: "172.18.0.1" IPAddress: "172.18.0.2" IPPrefixLen: 16 IPv6Gateway: "" GlobalIPv6Address: "" GlobalIPv6PrefixLen: 0 MacAddress: "02:42:ac:12:00:02" Mounts: [] Volumes: - Name: "my-volume" Driver: "local" Mountpoint: "/var/lib/docker/volumes/my-volume/_data" Labels: null Scope: "local" Options: null UsageData: Size: 10920104 RefCount: 2 BuildCache: - ID: "hw53o5aio51xtltp5xjp8v7fx" Parents: [] Type: "regular" Description: "pulled from docker.io/library/debian@sha256:234cb88d3020898631af0ccbbcca9a66ae7306ecd30c9720690858c1b007d2a0" InUse: false Shared: true Size: 0 CreatedAt: "2021-06-28T13:31:01.474619385Z" LastUsedAt: "2021-07-07T22:02:32.738075951Z" UsageCount: 26 - ID: "ndlpt0hhvkqcdfkputsk4cq9c" Parents: ["ndlpt0hhvkqcdfkputsk4cq9c"] Type: "regular" Description: "mount / from exec /bin/sh -c echo 'Binary::apt::APT::Keep-Downloaded-Packages \"true\";' > /etc/apt/apt.conf.d/keep-cache" InUse: false Shared: true Size: 51 CreatedAt: "2021-06-28T13:31:03.002625487Z" LastUsedAt: "2021-07-07T22:02:32.773909517Z" UsageCount: 26 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "type" in: "query" description: | Object types, for which to compute and return data. type: "array" collectionFormat: multi items: type: "string" enum: ["container", "image", "volume", "build-cache"] tags: ["System"] /images/{name}/get: get: summary: "Export an image" description: | Get a tarball containing all images and metadata for a repository. If `name` is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned. If `name` is an image ID, similarly only that image (and its parents) are returned, but with the exclusion of the `repositories` file in the tarball, as there were no image names referenced. ### Image tarball format An image tarball contains [Content as defined in the OCI Image Layout Specification](https://github.com/opencontainers/image-spec/blob/v1.1.1/image-layout.md#content). Additionally, includes the manifest.json file associated with a backwards compatible docker save format. If the tarball defines a repository, the tarball should also include a `repositories` file at the root that contains a list of repository and tag names mapped to layer IDs. ```json { "hello-world": { "latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1" } } ``` operationId: "ImageGet" produces: - "application/x-tar" responses: 200: description: "no error" schema: type: "string" format: "binary" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "name" in: "path" description: "Image name or ID" type: "string" required: true - name: "platform" type: "string" in: "query" description: | JSON encoded OCI platform describing a platform which will be used to select a platform-specific image to be saved if the image is multi-platform. If not provided, the full multi-platform image will be saved. Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}` tags: ["Image"] /images/get: get: summary: "Export several images" description: | Get a tarball containing all images and metadata for several image repositories. For each value of the `names` parameter: if it is a specific name and tag (e.g. `ubuntu:latest`), then only that image (and its parents) are returned; if it is an image ID, similarly only that image (and its parents) are returned and there would be no names referenced in the 'repositories' file for this image ID. For details on the format, see the [export image endpoint](#operation/ImageGet). operationId: "ImageGetAll" produces: - "application/x-tar" responses: 200: description: "no error" schema: type: "string" format: "binary" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "names" in: "query" description: "Image names to filter by" type: "array" items: type: "string" - name: "platform" type: "string" in: "query" description: | JSON encoded OCI platform describing a platform which will be used to select a platform-specific image to be saved if the image is multi-platform. If not provided, the full multi-platform image will be saved. Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}` tags: ["Image"] /images/load: post: summary: "Import images" description: | Load a set of images and tags into a repository. For details on the format, see the [export image endpoint](#operation/ImageGet). operationId: "ImageLoad" consumes: - "application/x-tar" produces: - "application/json" responses: 200: description: "no error" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "imagesTarball" in: "body" description: "Tar archive containing images" schema: type: "string" format: "binary" - name: "quiet" in: "query" description: "Suppress progress details during load." type: "boolean" default: false - name: "platform" type: "string" in: "query" description: | JSON encoded OCI platform describing a platform which will be used to select a platform-specific image to be load if the image is multi-platform. If not provided, the full multi-platform image will be loaded. Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}` tags: ["Image"] /containers/{id}/exec: post: summary: "Create an exec instance" description: "Run a command inside a running container." operationId: "ContainerExec" consumes: - "application/json" produces: - "application/json" responses: 201: description: "no error" schema: $ref: "#/definitions/IDResponse" 404: description: "no such container" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such container: c2ada9df5af8" 409: description: "container is paused" schema: $ref: "#/definitions/ErrorResponse" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "execConfig" in: "body" description: "Exec configuration" schema: type: "object" title: "ExecConfig" properties: AttachStdin: type: "boolean" description: "Attach to `stdin` of the exec command." AttachStdout: type: "boolean" description: "Attach to `stdout` of the exec command." AttachStderr: type: "boolean" description: "Attach to `stderr` of the exec command." ConsoleSize: type: "array" description: "Initial console size, as an `[height, width]` array." x-nullable: true minItems: 2 maxItems: 2 items: type: "integer" minimum: 0 example: [80, 64] DetachKeys: type: "string" description: | Override the key sequence for detaching a container. Format is a single character `[a-Z]` or `ctrl-` where `` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. Tty: type: "boolean" description: "Allocate a pseudo-TTY." Env: description: | A list of environment variables in the form `["VAR=value", ...]`. type: "array" items: type: "string" Cmd: type: "array" description: "Command to run, as a string or array of strings." items: type: "string" Privileged: type: "boolean" description: "Runs the exec process with extended privileges." default: false User: type: "string" description: | The user, and optionally, group to run the exec process inside the container. Format is one of: `user`, `user:group`, `uid`, or `uid:gid`. WorkingDir: type: "string" description: | The working directory for the exec process inside the container. example: AttachStdin: false AttachStdout: true AttachStderr: true DetachKeys: "ctrl-p,ctrl-q" Tty: false Cmd: - "date" Env: - "FOO=bar" - "BAZ=quux" required: true - name: "id" in: "path" description: "ID or name of container" type: "string" required: true tags: ["Exec"] /exec/{id}/start: post: summary: "Start an exec instance" description: | Starts a previously set up exec instance. If detach is true, this endpoint returns immediately after starting the command. Otherwise, it sets up an interactive session with the command. operationId: "ExecStart" consumes: - "application/json" produces: - "application/vnd.docker.raw-stream" - "application/vnd.docker.multiplexed-stream" responses: 200: description: "No error" 404: description: "No such exec instance" schema: $ref: "#/definitions/ErrorResponse" 409: description: "Container is stopped or paused" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "execStartConfig" in: "body" schema: type: "object" title: "ExecStartConfig" properties: Detach: type: "boolean" description: "Detach from the command." example: false Tty: type: "boolean" description: "Allocate a pseudo-TTY." example: true ConsoleSize: type: "array" description: "Initial console size, as an `[height, width]` array." x-nullable: true minItems: 2 maxItems: 2 items: type: "integer" minimum: 0 example: [80, 64] - name: "id" in: "path" description: "Exec instance ID" required: true type: "string" tags: ["Exec"] /exec/{id}/resize: post: summary: "Resize an exec instance" description: | Resize the TTY session used by an exec instance. This endpoint only works if `tty` was specified as part of creating and starting the exec instance. operationId: "ExecResize" responses: 200: description: "No error" 400: description: "bad parameter" schema: $ref: "#/definitions/ErrorResponse" 404: description: "No such exec instance" schema: $ref: "#/definitions/ErrorResponse" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" description: "Exec instance ID" required: true type: "string" - name: "h" in: "query" required: true description: "Height of the TTY session in characters" type: "integer" - name: "w" in: "query" required: true description: "Width of the TTY session in characters" type: "integer" tags: ["Exec"] /exec/{id}/json: get: summary: "Inspect an exec instance" description: "Return low-level information about an exec instance." operationId: "ExecInspect" produces: - "application/json" responses: 200: description: "No error" schema: type: "object" title: "ExecInspectResponse" properties: CanRemove: type: "boolean" DetachKeys: type: "string" ID: type: "string" Running: type: "boolean" ExitCode: type: "integer" ProcessConfig: $ref: "#/definitions/ProcessConfig" OpenStdin: type: "boolean" OpenStderr: type: "boolean" OpenStdout: type: "boolean" ContainerID: type: "string" Pid: type: "integer" description: "The system process ID for the exec process." examples: application/json: CanRemove: false ContainerID: "b53ee82b53a40c7dca428523e34f741f3abc51d9f297a14ff874bf761b995126" DetachKeys: "" ExitCode: 2 ID: "f33bbfb39f5b142420f4759b2348913bd4a8d1a6d7fd56499cb41a1bb91d7b3b" OpenStderr: true OpenStdin: true OpenStdout: true ProcessConfig: arguments: - "-c" - "exit 2" entrypoint: "sh" privileged: false tty: true user: "1000" Running: false Pid: 42000 404: description: "No such exec instance" schema: $ref: "#/definitions/ErrorResponse" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" description: "Exec instance ID" required: true type: "string" tags: ["Exec"] /volumes: get: summary: "List volumes" operationId: "VolumeList" produces: ["application/json"] responses: 200: description: "Summary volume data that matches the query" schema: $ref: "#/definitions/VolumeListResponse" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "filters" in: "query" description: | JSON encoded value of the filters (a `map[string][]string`) to process on the volumes list. Available filters: - `dangling=` When set to `true` (or `1`), returns all volumes that are not in use by a container. When set to `false` (or `0`), only volumes that are in use by one or more containers are returned. - `driver=` Matches volumes based on their driver. - `label=` or `label=:` Matches volumes based on the presence of a `label` alone or a `label` and a value. - `name=` Matches all or part of a volume name. type: "string" format: "json" tags: ["Volume"] /volumes/create: post: summary: "Create a volume" operationId: "VolumeCreate" consumes: ["application/json"] produces: ["application/json"] responses: 201: description: "The volume was created successfully" schema: $ref: "#/definitions/Volume" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "volumeConfig" in: "body" required: true description: "Volume configuration" schema: $ref: "#/definitions/VolumeCreateOptions" tags: ["Volume"] /volumes/{name}: get: summary: "Inspect a volume" operationId: "VolumeInspect" produces: ["application/json"] responses: 200: description: "No error" schema: $ref: "#/definitions/Volume" 404: description: "No such volume" schema: $ref: "#/definitions/ErrorResponse" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "name" in: "path" required: true description: "Volume name or ID" type: "string" tags: ["Volume"] put: summary: | "Update a volume. Valid only for Swarm cluster volumes" operationId: "VolumeUpdate" consumes: ["application/json"] produces: ["application/json"] responses: 200: description: "no error" 400: description: "bad parameter" schema: $ref: "#/definitions/ErrorResponse" 404: description: "no such volume" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "name" in: "path" description: "The name or ID of the volume" type: "string" required: true - name: "body" in: "body" schema: # though the schema for is an object that contains only a # ClusterVolumeSpec, wrapping the ClusterVolumeSpec in this object # means that if, later on, we support things like changing the # labels, we can do so without duplicating that information to the # ClusterVolumeSpec. type: "object" description: "Volume configuration" properties: Spec: $ref: "#/definitions/ClusterVolumeSpec" description: | The spec of the volume to update. Currently, only Availability may change. All other fields must remain unchanged. - name: "version" in: "query" description: | The version number of the volume being updated. This is required to avoid conflicting writes. Found in the volume's `ClusterVolume` field. type: "integer" format: "int64" required: true tags: ["Volume"] delete: summary: "Remove a volume" description: "Instruct the driver to remove the volume." operationId: "VolumeDelete" responses: 204: description: "The volume was removed" 404: description: "No such volume or volume driver" schema: $ref: "#/definitions/ErrorResponse" 409: description: "Volume is in use and cannot be removed" schema: $ref: "#/definitions/ErrorResponse" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "name" in: "path" required: true description: "Volume name or ID" type: "string" - name: "force" in: "query" description: "Force the removal of the volume" type: "boolean" default: false tags: ["Volume"] /volumes/prune: post: summary: "Delete unused volumes" produces: - "application/json" operationId: "VolumePrune" parameters: - name: "filters" in: "query" description: | Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune volumes with (or without, in case `label!=...` is used) the specified labels. - `all` (`all=true`) - Consider all (local) volumes for pruning and not just anonymous volumes. type: "string" responses: 200: description: "No error" schema: type: "object" title: "VolumePruneResponse" properties: VolumesDeleted: description: "Volumes that were deleted" type: "array" items: type: "string" SpaceReclaimed: description: "Disk space reclaimed in bytes" type: "integer" format: "int64" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" tags: ["Volume"] /networks: get: summary: "List networks" description: | Returns a list of networks. For details on the format, see the [network inspect endpoint](#operation/NetworkInspect). Note that it uses a different, smaller representation of a network than inspecting a single network. For example, the list of containers attached to the network is not propagated in API versions 1.28 and up. operationId: "NetworkList" produces: - "application/json" responses: 200: description: "No error" schema: type: "array" items: $ref: "#/definitions/Network" examples: application/json: - Name: "bridge" Id: "f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566" Created: "2016-10-19T06:21:00.416543526Z" Scope: "local" Driver: "bridge" EnableIPv4: true EnableIPv6: false Internal: false Attachable: false Ingress: false IPAM: Driver: "default" Config: - Subnet: "172.17.0.0/16" Options: com.docker.network.bridge.default_bridge: "true" com.docker.network.bridge.enable_icc: "true" com.docker.network.bridge.enable_ip_masquerade: "true" com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" com.docker.network.bridge.name: "docker0" com.docker.network.driver.mtu: "1500" - Name: "none" Id: "e086a3893b05ab69242d3c44e49483a3bbbd3a26b46baa8f61ab797c1088d794" Created: "0001-01-01T00:00:00Z" Scope: "local" Driver: "null" EnableIPv4: false EnableIPv6: false Internal: false Attachable: false Ingress: false IPAM: Driver: "default" Config: [] Containers: {} Options: {} - Name: "host" Id: "13e871235c677f196c4e1ecebb9dc733b9b2d2ab589e30c539efeda84a24215e" Created: "0001-01-01T00:00:00Z" Scope: "local" Driver: "host" EnableIPv4: false EnableIPv6: false Internal: false Attachable: false Ingress: false IPAM: Driver: "default" Config: [] Containers: {} Options: {} 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "filters" in: "query" description: | JSON encoded value of the filters (a `map[string][]string`) to process on the networks list. Available filters: - `dangling=` When set to `true` (or `1`), returns all networks that are not in use by a container. When set to `false` (or `0`), only networks that are in use by one or more containers are returned. - `driver=` Matches a network's driver. - `id=` Matches all or part of a network ID. - `label=` or `label==` of a network label. - `name=` Matches all or part of a network name. - `scope=["swarm"|"global"|"local"]` Filters networks by scope (`swarm`, `global`, or `local`). - `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks. type: "string" tags: ["Network"] /networks/{id}: get: summary: "Inspect a network" operationId: "NetworkInspect" produces: - "application/json" responses: 200: description: "No error" schema: $ref: "#/definitions/Network" 404: description: "Network not found" schema: $ref: "#/definitions/ErrorResponse" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" description: "Network ID or name" required: true type: "string" - name: "verbose" in: "query" description: "Detailed inspect output for troubleshooting" type: "boolean" default: false - name: "scope" in: "query" description: "Filter the network by scope (swarm, global, or local)" type: "string" tags: ["Network"] delete: summary: "Remove a network" operationId: "NetworkDelete" responses: 204: description: "No error" 403: description: "operation not supported for pre-defined networks" schema: $ref: "#/definitions/ErrorResponse" 404: description: "no such network" schema: $ref: "#/definitions/ErrorResponse" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" description: "Network ID or name" required: true type: "string" tags: ["Network"] /networks/create: post: summary: "Create a network" operationId: "NetworkCreate" consumes: - "application/json" produces: - "application/json" responses: 201: description: "Network created successfully" schema: $ref: "#/definitions/NetworkCreateResponse" 400: description: "bad parameter" schema: $ref: "#/definitions/ErrorResponse" 403: description: | Forbidden operation. This happens when trying to create a network named after a pre-defined network, or when trying to create an overlay network on a daemon which is not part of a Swarm cluster. schema: $ref: "#/definitions/ErrorResponse" 404: description: "plugin not found" schema: $ref: "#/definitions/ErrorResponse" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "networkConfig" in: "body" description: "Network configuration" required: true schema: type: "object" title: "NetworkCreateRequest" required: ["Name"] properties: Name: description: "The network's name." type: "string" example: "my_network" Driver: description: "Name of the network driver plugin to use." type: "string" default: "bridge" example: "bridge" Scope: description: | The level at which the network exists (e.g. `swarm` for cluster-wide or `local` for machine level). type: "string" Internal: description: "Restrict external access to the network." type: "boolean" Attachable: description: | Globally scoped network is manually attachable by regular containers from workers in swarm mode. type: "boolean" example: true Ingress: description: | Ingress network is the network which provides the routing-mesh in swarm mode. type: "boolean" example: false ConfigOnly: description: | Creates a config-only network. Config-only networks are placeholder networks for network configurations to be used by other networks. Config-only networks cannot be used directly to run containers or services. type: "boolean" default: false example: false ConfigFrom: description: | Specifies the source which will provide the configuration for this network. The specified network must be an existing config-only network; see ConfigOnly. $ref: "#/definitions/ConfigReference" IPAM: description: "Optional custom IP scheme for the network." $ref: "#/definitions/IPAM" EnableIPv4: description: "Enable IPv4 on the network." type: "boolean" example: true EnableIPv6: description: "Enable IPv6 on the network." type: "boolean" example: true Options: description: "Network specific options to be used by the drivers." type: "object" additionalProperties: type: "string" example: com.docker.network.bridge.default_bridge: "true" com.docker.network.bridge.enable_icc: "true" com.docker.network.bridge.enable_ip_masquerade: "true" com.docker.network.bridge.host_binding_ipv4: "0.0.0.0" com.docker.network.bridge.name: "docker0" com.docker.network.driver.mtu: "1500" Labels: description: "User-defined key/value metadata." type: "object" additionalProperties: type: "string" example: com.example.some-label: "some-value" com.example.some-other-label: "some-other-value" tags: ["Network"] /networks/{id}/connect: post: summary: "Connect a container to a network" description: "The network must be either a local-scoped network or a swarm-scoped network with the `attachable` option set. A network cannot be re-attached to a running container" operationId: "NetworkConnect" consumes: - "application/json" responses: 200: description: "No error" 400: description: "bad parameter" schema: $ref: "#/definitions/ErrorResponse" 403: description: "Operation forbidden" schema: $ref: "#/definitions/ErrorResponse" 404: description: "Network or container not found" schema: $ref: "#/definitions/ErrorResponse" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" description: "Network ID or name" required: true type: "string" - name: "container" in: "body" required: true schema: type: "object" title: "NetworkConnectRequest" properties: Container: type: "string" description: "The ID or name of the container to connect to the network." EndpointConfig: $ref: "#/definitions/EndpointSettings" example: Container: "3613f73ba0e4" EndpointConfig: IPAMConfig: IPv4Address: "172.24.56.89" IPv6Address: "2001:db8::5689" MacAddress: "02:42:ac:12:05:02" Priority: 100 tags: ["Network"] /networks/{id}/disconnect: post: summary: "Disconnect a container from a network" operationId: "NetworkDisconnect" consumes: - "application/json" responses: 200: description: "No error" 403: description: "Operation not supported for swarm scoped networks" schema: $ref: "#/definitions/ErrorResponse" 404: description: "Network or container not found" schema: $ref: "#/definitions/ErrorResponse" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" description: "Network ID or name" required: true type: "string" - name: "container" in: "body" required: true schema: type: "object" title: "NetworkDisconnectRequest" properties: Container: type: "string" description: | The ID or name of the container to disconnect from the network. Force: type: "boolean" description: | Force the container to disconnect from the network. tags: ["Network"] /networks/prune: post: summary: "Delete unused networks" produces: - "application/json" operationId: "NetworkPrune" parameters: - name: "filters" in: "query" description: | Filters to process on the prune list, encoded as JSON (a `map[string][]string`). Available filters: - `until=` Prune networks created before this timestamp. The `` can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time. - `label` (`label=`, `label==`, `label!=`, or `label!==`) Prune networks with (or without, in case `label!=...` is used) the specified labels. type: "string" responses: 200: description: "No error" schema: type: "object" title: "NetworkPruneResponse" properties: NetworksDeleted: description: "Networks that were deleted" type: "array" items: type: "string" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" tags: ["Network"] /plugins: get: summary: "List plugins" operationId: "PluginList" description: "Returns information about installed plugins." produces: ["application/json"] responses: 200: description: "No error" schema: type: "array" items: $ref: "#/definitions/Plugin" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "filters" in: "query" type: "string" description: | A JSON encoded value of the filters (a `map[string][]string`) to process on the plugin list. Available filters: - `capability=` - `enable=|` tags: ["Plugin"] /plugins/privileges: get: summary: "Get plugin privileges" operationId: "GetPluginPrivileges" responses: 200: description: "no error" schema: type: "array" items: $ref: "#/definitions/PluginPrivilege" example: - Name: "network" Description: "" Value: - "host" - Name: "mount" Description: "" Value: - "/data" - Name: "device" Description: "" Value: - "/dev/cpu_dma_latency" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "remote" in: "query" description: | The name of the plugin. The `:latest` tag is optional, and is the default if omitted. required: true type: "string" tags: - "Plugin" /plugins/pull: post: summary: "Install a plugin" operationId: "PluginPull" description: | Pulls and installs a plugin. After the plugin is installed, it can be enabled using the [`POST /plugins/{name}/enable` endpoint](#operation/PostPluginsEnable). produces: - "application/json" responses: 204: description: "no error" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "remote" in: "query" description: | Remote reference for plugin to install. The `:latest` tag is optional, and is used as the default if omitted. required: true type: "string" - name: "name" in: "query" description: | Local name for the pulled plugin. The `:latest` tag is optional, and is used as the default if omitted. required: false type: "string" - name: "X-Registry-Auth" in: "header" description: | A base64url-encoded auth configuration to use when pulling a plugin from a registry. Refer to the [authentication section](#section/Authentication) for details. type: "string" - name: "body" in: "body" schema: type: "array" items: $ref: "#/definitions/PluginPrivilege" example: - Name: "network" Description: "" Value: - "host" - Name: "mount" Description: "" Value: - "/data" - Name: "device" Description: "" Value: - "/dev/cpu_dma_latency" tags: ["Plugin"] /plugins/{name}/json: get: summary: "Inspect a plugin" operationId: "PluginInspect" responses: 200: description: "no error" schema: $ref: "#/definitions/Plugin" 404: description: "plugin is not installed" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "name" in: "path" description: | The name of the plugin. The `:latest` tag is optional, and is the default if omitted. required: true type: "string" tags: ["Plugin"] /plugins/{name}: delete: summary: "Remove a plugin" operationId: "PluginDelete" responses: 200: description: "no error" schema: $ref: "#/definitions/Plugin" 404: description: "plugin is not installed" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "name" in: "path" description: | The name of the plugin. The `:latest` tag is optional, and is the default if omitted. required: true type: "string" - name: "force" in: "query" description: | Disable the plugin before removing. This may result in issues if the plugin is in use by a container. type: "boolean" default: false tags: ["Plugin"] /plugins/{name}/enable: post: summary: "Enable a plugin" operationId: "PluginEnable" responses: 200: description: "no error" 404: description: "plugin is not installed" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "name" in: "path" description: | The name of the plugin. The `:latest` tag is optional, and is the default if omitted. required: true type: "string" - name: "timeout" in: "query" description: "Set the HTTP client timeout (in seconds)" type: "integer" default: 0 tags: ["Plugin"] /plugins/{name}/disable: post: summary: "Disable a plugin" operationId: "PluginDisable" responses: 200: description: "no error" 404: description: "plugin is not installed" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "name" in: "path" description: | The name of the plugin. The `:latest` tag is optional, and is the default if omitted. required: true type: "string" - name: "force" in: "query" description: | Force disable a plugin even if still in use. required: false type: "boolean" tags: ["Plugin"] /plugins/{name}/upgrade: post: summary: "Upgrade a plugin" operationId: "PluginUpgrade" responses: 204: description: "no error" 404: description: "plugin not installed" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "name" in: "path" description: | The name of the plugin. The `:latest` tag is optional, and is the default if omitted. required: true type: "string" - name: "remote" in: "query" description: | Remote reference to upgrade to. The `:latest` tag is optional, and is used as the default if omitted. required: true type: "string" - name: "X-Registry-Auth" in: "header" description: | A base64url-encoded auth configuration to use when pulling a plugin from a registry. Refer to the [authentication section](#section/Authentication) for details. type: "string" - name: "body" in: "body" schema: type: "array" items: $ref: "#/definitions/PluginPrivilege" example: - Name: "network" Description: "" Value: - "host" - Name: "mount" Description: "" Value: - "/data" - Name: "device" Description: "" Value: - "/dev/cpu_dma_latency" tags: ["Plugin"] /plugins/create: post: summary: "Create a plugin" operationId: "PluginCreate" consumes: - "application/x-tar" responses: 204: description: "no error" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "name" in: "query" description: | The name of the plugin. The `:latest` tag is optional, and is the default if omitted. required: true type: "string" - name: "tarContext" in: "body" description: "Path to tar containing plugin rootfs and manifest" schema: type: "string" format: "binary" tags: ["Plugin"] /plugins/{name}/push: post: summary: "Push a plugin" operationId: "PluginPush" description: | Push a plugin to the registry. parameters: - name: "name" in: "path" description: | The name of the plugin. The `:latest` tag is optional, and is the default if omitted. required: true type: "string" responses: 200: description: "no error" 404: description: "plugin not installed" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" tags: ["Plugin"] /plugins/{name}/set: post: summary: "Configure a plugin" operationId: "PluginSet" consumes: - "application/json" parameters: - name: "name" in: "path" description: | The name of the plugin. The `:latest` tag is optional, and is the default if omitted. required: true type: "string" - name: "body" in: "body" schema: type: "array" items: type: "string" example: ["DEBUG=1"] responses: 204: description: "No error" 404: description: "Plugin not installed" schema: $ref: "#/definitions/ErrorResponse" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" tags: ["Plugin"] /nodes: get: summary: "List nodes" operationId: "NodeList" responses: 200: description: "no error" schema: type: "array" items: $ref: "#/definitions/Node" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "filters" in: "query" description: | Filters to process on the nodes list, encoded as JSON (a `map[string][]string`). Available filters: - `id=` - `label=` - `membership=`(`accepted`|`pending`)` - `name=` - `node.label=` - `role=`(`manager`|`worker`)` type: "string" tags: ["Node"] /nodes/{id}: get: summary: "Inspect a node" operationId: "NodeInspect" responses: 200: description: "no error" schema: $ref: "#/definitions/Node" 404: description: "no such node" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" description: "The ID or name of the node" type: "string" required: true tags: ["Node"] delete: summary: "Delete a node" operationId: "NodeDelete" responses: 200: description: "no error" 404: description: "no such node" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" description: "The ID or name of the node" type: "string" required: true - name: "force" in: "query" description: "Force remove a node from the swarm" default: false type: "boolean" tags: ["Node"] /nodes/{id}/update: post: summary: "Update a node" operationId: "NodeUpdate" responses: 200: description: "no error" 400: description: "bad parameter" schema: $ref: "#/definitions/ErrorResponse" 404: description: "no such node" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" description: "The ID of the node" type: "string" required: true - name: "body" in: "body" schema: $ref: "#/definitions/NodeSpec" - name: "version" in: "query" description: | The version number of the node object being updated. This is required to avoid conflicting writes. type: "integer" format: "int64" required: true tags: ["Node"] /swarm: get: summary: "Inspect swarm" operationId: "SwarmInspect" responses: 200: description: "no error" schema: $ref: "#/definitions/Swarm" 404: description: "no such swarm" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" tags: ["Swarm"] /swarm/init: post: summary: "Initialize a new swarm" operationId: "SwarmInit" produces: - "application/json" - "text/plain" responses: 200: description: "no error" schema: description: "The node ID" type: "string" example: "7v2t30z9blmxuhnyo6s4cpenp" 400: description: "bad parameter" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is already part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "body" in: "body" required: true schema: type: "object" title: "SwarmInitRequest" properties: ListenAddr: description: | Listen address used for inter-manager communication, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the default swarm listening port is used. type: "string" AdvertiseAddr: description: | Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible. type: "string" DataPathAddr: description: | Address or interface to use for data path traffic (format: ``), for example, `192.168.1.1`, or an interface, like `eth0`. If `DataPathAddr` is unspecified, the same address as `AdvertiseAddr` is used. The `DataPathAddr` specifies the address that global scope network drivers will publish towards other nodes in order to reach the containers running on this node. Using this parameter it is possible to separate the container data traffic from the management traffic of the cluster. type: "string" DataPathPort: description: | DataPathPort specifies the data path port number for data traffic. Acceptable port range is 1024 to 49151. if no port is set or is set to 0, default port 4789 will be used. type: "integer" format: "uint32" DefaultAddrPool: description: | Default Address Pool specifies default subnet pools for global scope networks. type: "array" items: type: "string" example: ["10.10.0.0/16", "20.20.0.0/16"] ForceNewCluster: description: "Force creation of a new swarm." type: "boolean" SubnetSize: description: | SubnetSize specifies the subnet size of the networks created from the default subnet pool. type: "integer" format: "uint32" Spec: $ref: "#/definitions/SwarmSpec" example: ListenAddr: "0.0.0.0:2377" AdvertiseAddr: "192.168.1.1:2377" DataPathPort: 4789 DefaultAddrPool: ["10.10.0.0/8", "20.20.0.0/8"] SubnetSize: 24 ForceNewCluster: false Spec: Orchestration: {} Raft: {} Dispatcher: {} CAConfig: {} EncryptionConfig: AutoLockManagers: false tags: ["Swarm"] /swarm/join: post: summary: "Join an existing swarm" operationId: "SwarmJoin" responses: 200: description: "no error" 400: description: "bad parameter" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is already part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "body" in: "body" required: true schema: type: "object" title: "SwarmJoinRequest" properties: ListenAddr: description: | Listen address used for inter-manager communication if the node gets promoted to manager, as well as determining the networking interface used for the VXLAN Tunnel Endpoint (VTEP). type: "string" AdvertiseAddr: description: | Externally reachable address advertised to other nodes. This can either be an address/port combination in the form `192.168.1.1:4567`, or an interface followed by a port number, like `eth0:4567`. If the port number is omitted, the port number from the listen address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when possible. type: "string" DataPathAddr: description: | Address or interface to use for data path traffic (format: ``), for example, `192.168.1.1`, or an interface, like `eth0`. If `DataPathAddr` is unspecified, the same address as `AdvertiseAddr` is used. The `DataPathAddr` specifies the address that global scope network drivers will publish towards other nodes in order to reach the containers running on this node. Using this parameter it is possible to separate the container data traffic from the management traffic of the cluster. type: "string" RemoteAddrs: description: | Addresses of manager nodes already participating in the swarm. type: "array" items: type: "string" JoinToken: description: "Secret token for joining this swarm." type: "string" example: ListenAddr: "0.0.0.0:2377" AdvertiseAddr: "192.168.1.1:2377" DataPathAddr: "192.168.1.1" RemoteAddrs: - "node1:2377" JoinToken: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" tags: ["Swarm"] /swarm/leave: post: summary: "Leave a swarm" operationId: "SwarmLeave" responses: 200: description: "no error" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "force" description: | Force leave swarm, even if this is the last manager or that it will break the cluster. in: "query" type: "boolean" default: false tags: ["Swarm"] /swarm/update: post: summary: "Update a swarm" operationId: "SwarmUpdate" responses: 200: description: "no error" 400: description: "bad parameter" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "body" in: "body" required: true schema: $ref: "#/definitions/SwarmSpec" - name: "version" in: "query" description: | The version number of the swarm object being updated. This is required to avoid conflicting writes. type: "integer" format: "int64" required: true - name: "rotateWorkerToken" in: "query" description: "Rotate the worker join token." type: "boolean" default: false - name: "rotateManagerToken" in: "query" description: "Rotate the manager join token." type: "boolean" default: false - name: "rotateManagerUnlockKey" in: "query" description: "Rotate the manager unlock key." type: "boolean" default: false tags: ["Swarm"] /swarm/unlockkey: get: summary: "Get the unlock key" operationId: "SwarmUnlockkey" consumes: - "application/json" responses: 200: description: "no error" schema: type: "object" title: "UnlockKeyResponse" properties: UnlockKey: description: "The swarm's unlock key." type: "string" example: UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" tags: ["Swarm"] /swarm/unlock: post: summary: "Unlock a locked manager" operationId: "SwarmUnlock" consumes: - "application/json" produces: - "application/json" parameters: - name: "body" in: "body" required: true schema: type: "object" title: "SwarmUnlockRequest" properties: UnlockKey: description: "The swarm's unlock key." type: "string" example: UnlockKey: "SWMKEY-1-7c37Cc8654o6p38HnroywCi19pllOnGtbdZEgtKxZu8" responses: 200: description: "no error" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" tags: ["Swarm"] /services: get: summary: "List services" operationId: "ServiceList" responses: 200: description: "no error" schema: type: "array" items: $ref: "#/definitions/Service" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "filters" in: "query" type: "string" description: | A JSON encoded value of the filters (a `map[string][]string`) to process on the services list. Available filters: - `id=` - `label=` - `mode=["replicated"|"global"]` - `name=` - name: "status" in: "query" type: "boolean" description: | Include service status, with count of running and desired tasks. tags: ["Service"] /services/create: post: summary: "Create a service" operationId: "ServiceCreate" consumes: - "application/json" produces: - "application/json" responses: 201: description: "no error" schema: $ref: "#/definitions/ServiceCreateResponse" 400: description: "bad parameter" schema: $ref: "#/definitions/ErrorResponse" 403: description: "network is not eligible for services" schema: $ref: "#/definitions/ErrorResponse" 409: description: "name conflicts with an existing service" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "body" in: "body" required: true schema: allOf: - $ref: "#/definitions/ServiceSpec" - type: "object" example: Name: "web" TaskTemplate: ContainerSpec: Image: "nginx:alpine" Mounts: - ReadOnly: true Source: "web-data" Target: "/usr/share/nginx/html" Type: "volume" VolumeOptions: DriverConfig: {} Labels: com.example.something: "something-value" Hosts: ["10.10.10.10 host1", "ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 host2"] User: "33" DNSConfig: Nameservers: ["8.8.8.8"] Search: ["example.org"] Options: ["timeout:3"] Secrets: - File: Name: "www.example.org.key" UID: "33" GID: "33" Mode: 384 SecretID: "fpjqlhnwb19zds35k8wn80lq9" SecretName: "example_org_domain_key" OomScoreAdj: 0 LogDriver: Name: "json-file" Options: max-file: "3" max-size: "10M" Placement: {} Resources: Limits: MemoryBytes: 104857600 Reservations: {} RestartPolicy: Condition: "on-failure" Delay: 10000000000 MaxAttempts: 10 Mode: Replicated: Replicas: 4 UpdateConfig: Parallelism: 2 Delay: 1000000000 FailureAction: "pause" Monitor: 15000000000 MaxFailureRatio: 0.15 RollbackConfig: Parallelism: 1 Delay: 1000000000 FailureAction: "pause" Monitor: 15000000000 MaxFailureRatio: 0.15 EndpointSpec: Ports: - Protocol: "tcp" PublishedPort: 8080 TargetPort: 80 Labels: foo: "bar" - name: "X-Registry-Auth" in: "header" description: | A base64url-encoded auth configuration for pulling from private registries. Refer to the [authentication section](#section/Authentication) for details. type: "string" tags: ["Service"] /services/{id}: get: summary: "Inspect a service" operationId: "ServiceInspect" responses: 200: description: "no error" schema: $ref: "#/definitions/Service" 404: description: "no such service" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" description: "ID or name of service." required: true type: "string" - name: "insertDefaults" in: "query" description: "Fill empty fields with default values." type: "boolean" default: false tags: ["Service"] delete: summary: "Delete a service" operationId: "ServiceDelete" responses: 200: description: "no error" 404: description: "no such service" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" description: "ID or name of service." required: true type: "string" tags: ["Service"] /services/{id}/update: post: summary: "Update a service" operationId: "ServiceUpdate" consumes: ["application/json"] produces: ["application/json"] responses: 200: description: "no error" schema: $ref: "#/definitions/ServiceUpdateResponse" 400: description: "bad parameter" schema: $ref: "#/definitions/ErrorResponse" 404: description: "no such service" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" description: "ID or name of service." required: true type: "string" - name: "body" in: "body" required: true schema: allOf: - $ref: "#/definitions/ServiceSpec" - type: "object" example: Name: "top" TaskTemplate: ContainerSpec: Image: "busybox" Args: - "top" OomScoreAdj: 0 Resources: Limits: {} Reservations: {} RestartPolicy: Condition: "any" MaxAttempts: 0 Placement: {} ForceUpdate: 0 Mode: Replicated: Replicas: 1 UpdateConfig: Parallelism: 2 Delay: 1000000000 FailureAction: "pause" Monitor: 15000000000 MaxFailureRatio: 0.15 RollbackConfig: Parallelism: 1 Delay: 1000000000 FailureAction: "pause" Monitor: 15000000000 MaxFailureRatio: 0.15 EndpointSpec: Mode: "vip" - name: "version" in: "query" description: | The version number of the service object being updated. This is required to avoid conflicting writes. This version number should be the value as currently set on the service *before* the update. You can find the current version by calling `GET /services/{id}` required: true type: "integer" - name: "registryAuthFrom" in: "query" description: | If the `X-Registry-Auth` header is not specified, this parameter indicates where to find registry authorization credentials. type: "string" enum: ["spec", "previous-spec"] default: "spec" - name: "rollback" in: "query" description: | Set to this parameter to `previous` to cause a server-side rollback to the previous service spec. The supplied spec will be ignored in this case. type: "string" - name: "X-Registry-Auth" in: "header" description: | A base64url-encoded auth configuration for pulling from private registries. Refer to the [authentication section](#section/Authentication) for details. type: "string" tags: ["Service"] /services/{id}/logs: get: summary: "Get service logs" description: | Get `stdout` and `stderr` logs from a service. See also [`/containers/{id}/logs`](#operation/ContainerLogs). **Note**: This endpoint works only for services with the `local`, `json-file` or `journald` logging drivers. produces: - "application/vnd.docker.raw-stream" - "application/vnd.docker.multiplexed-stream" operationId: "ServiceLogs" responses: 200: description: "logs returned as a stream in response body" schema: type: "string" format: "binary" 404: description: "no such service" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such service: c2ada9df5af8" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true description: "ID or name of the service" type: "string" - name: "details" in: "query" description: "Show service context and extra details provided to logs." type: "boolean" default: false - name: "follow" in: "query" description: "Keep connection after returning logs." type: "boolean" default: false - name: "stdout" in: "query" description: "Return logs from `stdout`" type: "boolean" default: false - name: "stderr" in: "query" description: "Return logs from `stderr`" type: "boolean" default: false - name: "since" in: "query" description: "Only return logs since this time, as a UNIX timestamp" type: "integer" default: 0 - name: "timestamps" in: "query" description: "Add timestamps to every log line" type: "boolean" default: false - name: "tail" in: "query" description: | Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines. type: "string" default: "all" tags: ["Service"] /tasks: get: summary: "List tasks" operationId: "TaskList" produces: - "application/json" responses: 200: description: "no error" schema: type: "array" items: $ref: "#/definitions/Task" example: - ID: "0kzzo1i0y4jz6027t0k7aezc7" Version: Index: 71 CreatedAt: "2016-06-07T21:07:31.171892745Z" UpdatedAt: "2016-06-07T21:07:31.376370513Z" Spec: ContainerSpec: Image: "redis" Resources: Limits: {} Reservations: {} RestartPolicy: Condition: "any" MaxAttempts: 0 Placement: {} ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" Slot: 1 NodeID: "60gvrl6tm78dmak4yl7srz94v" Status: Timestamp: "2016-06-07T21:07:31.290032978Z" State: "running" Message: "started" ContainerStatus: ContainerID: "e5d62702a1b48d01c3e02ca1e0212a250801fa8d67caca0b6f35919ebc12f035" PID: 677 DesiredState: "running" NetworksAttachments: - Network: ID: "4qvuz4ko70xaltuqbt8956gd1" Version: Index: 18 CreatedAt: "2016-06-07T20:31:11.912919752Z" UpdatedAt: "2016-06-07T21:07:29.955277358Z" Spec: Name: "ingress" Labels: com.docker.swarm.internal: "true" DriverConfiguration: {} IPAMOptions: Driver: {} Configs: - Subnet: "10.255.0.0/16" Gateway: "10.255.0.1" DriverState: Name: "overlay" Options: com.docker.network.driver.overlay.vxlanid_list: "256" IPAMOptions: Driver: Name: "default" Configs: - Subnet: "10.255.0.0/16" Gateway: "10.255.0.1" Addresses: - "10.255.0.10/16" - ID: "1yljwbmlr8er2waf8orvqpwms" Version: Index: 30 CreatedAt: "2016-06-07T21:07:30.019104782Z" UpdatedAt: "2016-06-07T21:07:30.231958098Z" Name: "hopeful_cori" Spec: ContainerSpec: Image: "redis" Resources: Limits: {} Reservations: {} RestartPolicy: Condition: "any" MaxAttempts: 0 Placement: {} ServiceID: "9mnpnzenvg8p8tdbtq4wvbkcz" Slot: 1 NodeID: "60gvrl6tm78dmak4yl7srz94v" Status: Timestamp: "2016-06-07T21:07:30.202183143Z" State: "shutdown" Message: "shutdown" ContainerStatus: ContainerID: "1cf8d63d18e79668b0004a4be4c6ee58cddfad2dae29506d8781581d0688a213" DesiredState: "shutdown" NetworksAttachments: - Network: ID: "4qvuz4ko70xaltuqbt8956gd1" Version: Index: 18 CreatedAt: "2016-06-07T20:31:11.912919752Z" UpdatedAt: "2016-06-07T21:07:29.955277358Z" Spec: Name: "ingress" Labels: com.docker.swarm.internal: "true" DriverConfiguration: {} IPAMOptions: Driver: {} Configs: - Subnet: "10.255.0.0/16" Gateway: "10.255.0.1" DriverState: Name: "overlay" Options: com.docker.network.driver.overlay.vxlanid_list: "256" IPAMOptions: Driver: Name: "default" Configs: - Subnet: "10.255.0.0/16" Gateway: "10.255.0.1" Addresses: - "10.255.0.5/16" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "filters" in: "query" type: "string" description: | A JSON encoded value of the filters (a `map[string][]string`) to process on the tasks list. Available filters: - `desired-state=(running | shutdown | accepted)` - `id=` - `label=key` or `label="key=value"` - `name=` - `node=` - `service=` tags: ["Task"] /tasks/{id}: get: summary: "Inspect a task" operationId: "TaskInspect" produces: - "application/json" responses: 200: description: "no error" schema: $ref: "#/definitions/Task" 404: description: "no such task" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" description: "ID of the task" required: true type: "string" tags: ["Task"] /tasks/{id}/logs: get: summary: "Get task logs" description: | Get `stdout` and `stderr` logs from a task. See also [`/containers/{id}/logs`](#operation/ContainerLogs). **Note**: This endpoint works only for services with the `local`, `json-file` or `journald` logging drivers. operationId: "TaskLogs" produces: - "application/vnd.docker.raw-stream" - "application/vnd.docker.multiplexed-stream" responses: 200: description: "logs returned as a stream in response body" schema: type: "string" format: "binary" 404: description: "no such task" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such task: c2ada9df5af8" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true description: "ID of the task" type: "string" - name: "details" in: "query" description: "Show task context and extra details provided to logs." type: "boolean" default: false - name: "follow" in: "query" description: "Keep connection after returning logs." type: "boolean" default: false - name: "stdout" in: "query" description: "Return logs from `stdout`" type: "boolean" default: false - name: "stderr" in: "query" description: "Return logs from `stderr`" type: "boolean" default: false - name: "since" in: "query" description: "Only return logs since this time, as a UNIX timestamp" type: "integer" default: 0 - name: "timestamps" in: "query" description: "Add timestamps to every log line" type: "boolean" default: false - name: "tail" in: "query" description: | Only return this number of log lines from the end of the logs. Specify as an integer or `all` to output all log lines. type: "string" default: "all" tags: ["Task"] /secrets: get: summary: "List secrets" operationId: "SecretList" produces: - "application/json" responses: 200: description: "no error" schema: type: "array" items: $ref: "#/definitions/Secret" example: - ID: "blt1owaxmitz71s9v5zh81zun" Version: Index: 85 CreatedAt: "2017-07-20T13:55:28.678958722Z" UpdatedAt: "2017-07-20T13:55:28.678958722Z" Spec: Name: "mysql-passwd" Labels: some.label: "some.value" Driver: Name: "secret-bucket" Options: OptionA: "value for driver option A" OptionB: "value for driver option B" - ID: "ktnbjxoalbkvbvedmg1urrz8h" Version: Index: 11 CreatedAt: "2016-11-05T01:20:17.327670065Z" UpdatedAt: "2016-11-05T01:20:17.327670065Z" Spec: Name: "app-dev.crt" Labels: foo: "bar" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "filters" in: "query" type: "string" description: | A JSON encoded value of the filters (a `map[string][]string`) to process on the secrets list. Available filters: - `id=` - `label= or label==value` - `name=` - `names=` tags: ["Secret"] /secrets/create: post: summary: "Create a secret" operationId: "SecretCreate" consumes: - "application/json" produces: - "application/json" responses: 201: description: "no error" schema: $ref: "#/definitions/IDResponse" 409: description: "name conflicts with an existing object" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "body" in: "body" schema: allOf: - $ref: "#/definitions/SecretSpec" - type: "object" example: Name: "app-key.crt" Labels: foo: "bar" Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg==" Driver: Name: "secret-bucket" Options: OptionA: "value for driver option A" OptionB: "value for driver option B" tags: ["Secret"] /secrets/{id}: get: summary: "Inspect a secret" operationId: "SecretInspect" produces: - "application/json" responses: 200: description: "no error" schema: $ref: "#/definitions/Secret" examples: application/json: ID: "ktnbjxoalbkvbvedmg1urrz8h" Version: Index: 11 CreatedAt: "2016-11-05T01:20:17.327670065Z" UpdatedAt: "2016-11-05T01:20:17.327670065Z" Spec: Name: "app-dev.crt" Labels: foo: "bar" Driver: Name: "secret-bucket" Options: OptionA: "value for driver option A" OptionB: "value for driver option B" 404: description: "secret not found" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true type: "string" description: "ID of the secret" tags: ["Secret"] delete: summary: "Delete a secret" operationId: "SecretDelete" produces: - "application/json" responses: 204: description: "no error" 404: description: "secret not found" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true type: "string" description: "ID of the secret" tags: ["Secret"] /secrets/{id}/update: post: summary: "Update a Secret" operationId: "SecretUpdate" responses: 200: description: "no error" 400: description: "bad parameter" schema: $ref: "#/definitions/ErrorResponse" 404: description: "no such secret" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" description: "The ID or name of the secret" type: "string" required: true - name: "body" in: "body" schema: $ref: "#/definitions/SecretSpec" description: | The spec of the secret to update. Currently, only the Labels field can be updated. All other fields must remain unchanged from the [SecretInspect endpoint](#operation/SecretInspect) response values. - name: "version" in: "query" description: | The version number of the secret object being updated. This is required to avoid conflicting writes. type: "integer" format: "int64" required: true tags: ["Secret"] /configs: get: summary: "List configs" operationId: "ConfigList" produces: - "application/json" responses: 200: description: "no error" schema: type: "array" items: $ref: "#/definitions/Config" example: - ID: "ktnbjxoalbkvbvedmg1urrz8h" Version: Index: 11 CreatedAt: "2016-11-05T01:20:17.327670065Z" UpdatedAt: "2016-11-05T01:20:17.327670065Z" Spec: Name: "server.conf" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "filters" in: "query" type: "string" description: | A JSON encoded value of the filters (a `map[string][]string`) to process on the configs list. Available filters: - `id=` - `label= or label==value` - `name=` - `names=` tags: ["Config"] /configs/create: post: summary: "Create a config" operationId: "ConfigCreate" consumes: - "application/json" produces: - "application/json" responses: 201: description: "no error" schema: $ref: "#/definitions/IDResponse" 409: description: "name conflicts with an existing object" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "body" in: "body" schema: allOf: - $ref: "#/definitions/ConfigSpec" - type: "object" example: Name: "server.conf" Labels: foo: "bar" Data: "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg==" tags: ["Config"] /configs/{id}: get: summary: "Inspect a config" operationId: "ConfigInspect" produces: - "application/json" responses: 200: description: "no error" schema: $ref: "#/definitions/Config" examples: application/json: ID: "ktnbjxoalbkvbvedmg1urrz8h" Version: Index: 11 CreatedAt: "2016-11-05T01:20:17.327670065Z" UpdatedAt: "2016-11-05T01:20:17.327670065Z" Spec: Name: "app-dev.crt" 404: description: "config not found" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true type: "string" description: "ID of the config" tags: ["Config"] delete: summary: "Delete a config" operationId: "ConfigDelete" produces: - "application/json" responses: 204: description: "no error" 404: description: "config not found" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" required: true type: "string" description: "ID of the config" tags: ["Config"] /configs/{id}/update: post: summary: "Update a Config" operationId: "ConfigUpdate" responses: 200: description: "no error" 400: description: "bad parameter" schema: $ref: "#/definitions/ErrorResponse" 404: description: "no such config" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" 503: description: "node is not part of a swarm" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" description: "The ID or name of the config" type: "string" required: true - name: "body" in: "body" schema: $ref: "#/definitions/ConfigSpec" description: | The spec of the config to update. Currently, only the Labels field can be updated. All other fields must remain unchanged from the [ConfigInspect endpoint](#operation/ConfigInspect) response values. - name: "version" in: "query" description: | The version number of the config object being updated. This is required to avoid conflicting writes. type: "integer" format: "int64" required: true tags: ["Config"] /distribution/{name}/json: get: summary: "Get image information from the registry" description: | Return image digest and platform information by contacting the registry. operationId: "DistributionInspect" produces: - "application/json" responses: 200: description: "descriptor and platform information" schema: $ref: "#/definitions/DistributionInspect" 401: description: "Failed authentication or no image found" schema: $ref: "#/definitions/ErrorResponse" examples: application/json: message: "No such image: someimage (tag: latest)" 500: description: "Server error" schema: $ref: "#/definitions/ErrorResponse" parameters: - name: "name" in: "path" description: "Image name or id" type: "string" required: true tags: ["Distribution"] /session: post: summary: "Initialize interactive session" description: | Start a new interactive session with a server. Session allows server to call back to the client for advanced capabilities. ### Hijacking This endpoint hijacks the HTTP connection to HTTP2 transport that allows the client to expose gPRC services on that connection. For example, the client sends this request to upgrade the connection: ``` POST /session HTTP/1.1 Upgrade: h2c Connection: Upgrade ``` The Docker daemon responds with a `101 UPGRADED` response follow with the raw stream: ``` HTTP/1.1 101 UPGRADED Connection: Upgrade Upgrade: h2c ``` operationId: "Session" produces: - "application/vnd.docker.raw-stream" responses: 101: description: "no error, hijacking successful" 400: description: "bad parameter" schema: $ref: "#/definitions/ErrorResponse" 500: description: "server error" schema: $ref: "#/definitions/ErrorResponse" tags: ["Session"] ================================================ FILE: vendor/github.com/docker/docker/api/types/blkiodev/blkio.go ================================================ package blkiodev import "fmt" // WeightDevice is a structure that holds device:weight pair type WeightDevice struct { Path string Weight uint16 } func (w *WeightDevice) String() string { return fmt.Sprintf("%s:%d", w.Path, w.Weight) } // ThrottleDevice is a structure that holds device:rate_per_second pair type ThrottleDevice struct { Path string Rate uint64 } func (t *ThrottleDevice) String() string { return fmt.Sprintf("%s:%d", t.Path, t.Rate) } ================================================ FILE: vendor/github.com/docker/docker/api/types/build/build.go ================================================ package build import ( "io" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/registry" ) // BuilderVersion sets the version of underlying builder to use type BuilderVersion string const ( // BuilderV1 is the first generation builder in docker daemon BuilderV1 BuilderVersion = "1" // BuilderBuildKit is builder based on moby/buildkit project BuilderBuildKit BuilderVersion = "2" ) // Result contains the image id of a successful build. type Result struct { ID string } // ImageBuildOptions holds the information // necessary to build images. type ImageBuildOptions struct { Tags []string SuppressOutput bool RemoteContext string NoCache bool Remove bool ForceRemove bool PullParent bool Isolation container.Isolation CPUSetCPUs string CPUSetMems string CPUShares int64 CPUQuota int64 CPUPeriod int64 Memory int64 MemorySwap int64 CgroupParent string NetworkMode string ShmSize int64 Dockerfile string Ulimits []*container.Ulimit // BuildArgs needs to be a *string instead of just a string so that // we can tell the difference between "" (empty string) and no value // at all (nil). See the parsing of buildArgs in // api/server/router/build/build_routes.go for even more info. BuildArgs map[string]*string AuthConfigs map[string]registry.AuthConfig Context io.Reader Labels map[string]string // squash the resulting image's layers to the parent // preserves the original image and creates a new one from the parent with all // the changes applied to a single layer Squash bool // CacheFrom specifies images that are used for matching cache. Images // specified here do not need to have a valid parent chain to match cache. CacheFrom []string SecurityOpt []string ExtraHosts []string // List of extra hosts Target string SessionID string Platform string // Version specifies the version of the underlying builder to use Version BuilderVersion // BuildID is an optional identifier that can be passed together with the // build request. The same identifier can be used to gracefully cancel the // build with the cancel request. BuildID string // Outputs defines configurations for exporting build results. Only supported // in BuildKit mode Outputs []ImageBuildOutput } // ImageBuildOutput defines configuration for exporting a build result type ImageBuildOutput struct { Type string Attrs map[string]string } // ImageBuildResponse holds information // returned by a server after building // an image. type ImageBuildResponse struct { Body io.ReadCloser OSType string } ================================================ FILE: vendor/github.com/docker/docker/api/types/build/cache.go ================================================ package build import ( "time" "github.com/docker/docker/api/types/filters" ) // CacheRecord contains information about a build cache record. type CacheRecord struct { // ID is the unique ID of the build cache record. ID string // Parent is the ID of the parent build cache record. // // Deprecated: deprecated in API v1.42 and up, as it was deprecated in BuildKit; use Parents instead. Parent string `json:"Parent,omitempty"` // Parents is the list of parent build cache record IDs. Parents []string `json:" Parents,omitempty"` // Type is the cache record type. Type string // Description is a description of the build-step that produced the build cache. Description string // InUse indicates if the build cache is in use. InUse bool // Shared indicates if the build cache is shared. Shared bool // Size is the amount of disk space used by the build cache (in bytes). Size int64 // CreatedAt is the date and time at which the build cache was created. CreatedAt time.Time // LastUsedAt is the date and time at which the build cache was last used. LastUsedAt *time.Time UsageCount int } // CachePruneOptions hold parameters to prune the build cache. type CachePruneOptions struct { All bool ReservedSpace int64 MaxUsedSpace int64 MinFreeSpace int64 Filters filters.Args KeepStorage int64 // Deprecated: deprecated in API 1.48. } // CachePruneReport contains the response for Engine API: // POST "/build/prune" type CachePruneReport struct { CachesDeleted []string SpaceReclaimed uint64 } ================================================ FILE: vendor/github.com/docker/docker/api/types/build/disk_usage.go ================================================ package build // CacheDiskUsage contains disk usage for the build cache. // // Deprecated: this type is no longer used and will be removed in the next release. type CacheDiskUsage struct { TotalSize int64 Reclaimable int64 Items []*CacheRecord } ================================================ FILE: vendor/github.com/docker/docker/api/types/checkpoint/list.go ================================================ package checkpoint // Summary represents the details of a checkpoint when listing endpoints. type Summary struct { // Name is the name of the checkpoint. Name string } ================================================ FILE: vendor/github.com/docker/docker/api/types/checkpoint/options.go ================================================ package checkpoint // CreateOptions holds parameters to create a checkpoint from a container. type CreateOptions struct { CheckpointID string CheckpointDir string Exit bool } // ListOptions holds parameters to list checkpoints for a container. type ListOptions struct { CheckpointDir string } // DeleteOptions holds parameters to delete a checkpoint from a container. type DeleteOptions struct { CheckpointID string CheckpointDir string } ================================================ FILE: vendor/github.com/docker/docker/api/types/client.go ================================================ package types import ( "bufio" "context" "net" ) // NewHijackedResponse initializes a [HijackedResponse] type. func NewHijackedResponse(conn net.Conn, mediaType string) HijackedResponse { return HijackedResponse{Conn: conn, Reader: bufio.NewReader(conn), mediaType: mediaType} } // HijackedResponse holds connection information for a hijacked request. type HijackedResponse struct { mediaType string Conn net.Conn Reader *bufio.Reader } // Close closes the hijacked connection and reader. func (h *HijackedResponse) Close() { h.Conn.Close() } // MediaType let client know if HijackedResponse hold a raw or multiplexed stream. // returns false if HTTP Content-Type is not relevant, and container must be inspected func (h *HijackedResponse) MediaType() (string, bool) { if h.mediaType == "" { return "", false } return h.mediaType, true } // CloseWriter is an interface that implements structs // that close input streams to prevent from writing. type CloseWriter interface { CloseWrite() error } // CloseWrite closes a readWriter for writing. func (h *HijackedResponse) CloseWrite() error { if conn, ok := h.Conn.(CloseWriter); ok { return conn.CloseWrite() } return nil } // PluginRemoveOptions holds parameters to remove plugins. type PluginRemoveOptions struct { Force bool } // PluginEnableOptions holds parameters to enable plugins. type PluginEnableOptions struct { Timeout int } // PluginDisableOptions holds parameters to disable plugins. type PluginDisableOptions struct { Force bool } // PluginInstallOptions holds parameters to install a plugin. type PluginInstallOptions struct { Disabled bool AcceptAllPermissions bool RegistryAuth string // RegistryAuth is the base64 encoded credentials for the registry RemoteRef string // RemoteRef is the plugin name on the registry // PrivilegeFunc is a function that clients can supply to retry operations // after getting an authorization error. This function returns the registry // authentication header value in base64 encoded format, or an error if the // privilege request fails. // // For details, refer to [github.com/docker/docker/api/types/registry.RequestAuthConfig]. PrivilegeFunc func(context.Context) (string, error) AcceptPermissionsFunc func(context.Context, PluginPrivileges) (bool, error) Args []string } // PluginCreateOptions hold all options to plugin create. type PluginCreateOptions struct { RepoName string } ================================================ FILE: vendor/github.com/docker/docker/api/types/common/id_response.go ================================================ package common // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command // IDResponse Response to an API call that returns just an Id // swagger:model IDResponse type IDResponse struct { // The id of the newly created object. // Required: true ID string `json:"Id"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/container/change_type.go ================================================ package container // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command // ChangeType Kind of change // // Can be one of: // // - `0`: Modified ("C") // - `1`: Added ("A") // - `2`: Deleted ("D") // // swagger:model ChangeType type ChangeType uint8 ================================================ FILE: vendor/github.com/docker/docker/api/types/container/change_types.go ================================================ package container const ( // ChangeModify represents the modify operation. ChangeModify ChangeType = 0 // ChangeAdd represents the add operation. ChangeAdd ChangeType = 1 // ChangeDelete represents the delete operation. ChangeDelete ChangeType = 2 ) func (ct ChangeType) String() string { switch ct { case ChangeModify: return "C" case ChangeAdd: return "A" case ChangeDelete: return "D" default: return "" } } ================================================ FILE: vendor/github.com/docker/docker/api/types/container/commit.go ================================================ package container import "github.com/docker/docker/api/types/common" // CommitResponse response for the commit API call, containing the ID of the // image that was produced. type CommitResponse = common.IDResponse ================================================ FILE: vendor/github.com/docker/docker/api/types/container/config.go ================================================ package container import ( "time" "github.com/docker/docker/api/types/strslice" "github.com/docker/go-connections/nat" dockerspec "github.com/moby/docker-image-spec/specs-go/v1" ) // MinimumDuration puts a minimum on user configured duration. // This is to prevent API error on time unit. For example, API may // set 3 as healthcheck interval with intention of 3 seconds, but // Docker interprets it as 3 nanoseconds. const MinimumDuration = 1 * time.Millisecond // StopOptions holds the options to stop or restart a container. type StopOptions struct { // Signal (optional) is the signal to send to the container to (gracefully) // stop it before forcibly terminating the container with SIGKILL after the // timeout expires. If not value is set, the default (SIGTERM) is used. Signal string `json:",omitempty"` // Timeout (optional) is the timeout (in seconds) to wait for the container // to stop gracefully before forcibly terminating it with SIGKILL. // // - Use nil to use the default timeout (10 seconds). // - Use '-1' to wait indefinitely. // - Use '0' to not wait for the container to exit gracefully, and // immediately proceeds to forcibly terminating the container. // - Other positive values are used as timeout (in seconds). Timeout *int `json:",omitempty"` } // HealthConfig holds configuration settings for the HEALTHCHECK feature. type HealthConfig = dockerspec.HealthcheckConfig // Config contains the configuration data about a container. // It should hold only portable information about the container. // Here, "portable" means "independent from the host we are running on". // Non-portable information *should* appear in HostConfig. // All fields added to this struct must be marked `omitempty` to keep getting // predictable hashes from the old `v1Compatibility` configuration. type Config struct { Hostname string // Hostname Domainname string // Domainname User string // User that will run the command(s) inside the container, also support user:group AttachStdin bool // Attach the standard input, makes possible user interaction AttachStdout bool // Attach the standard output AttachStderr bool // Attach the standard error ExposedPorts nat.PortSet `json:",omitempty"` // List of exposed ports Tty bool // Attach standard streams to a tty, including stdin if it is not closed. OpenStdin bool // Open stdin StdinOnce bool // If true, close stdin after the 1 attached client disconnects. Env []string // List of environment variable to set in the container Cmd strslice.StrSlice // Command to run when starting the container Healthcheck *HealthConfig `json:",omitempty"` // Healthcheck describes how to check the container is healthy ArgsEscaped bool `json:",omitempty"` // True if command is already escaped (meaning treat as a command line) (Windows specific). Image string // Name of the image as it was passed by the operator (e.g. could be symbolic) Volumes map[string]struct{} // List of volumes (mounts) used for the container WorkingDir string // Current directory (PWD) in the command will be launched Entrypoint strslice.StrSlice // Entrypoint to run when starting the container NetworkDisabled bool `json:",omitempty"` // Is network disabled // Mac Address of the container. // // Deprecated: this field is deprecated since API v1.44. Use EndpointSettings.MacAddress instead. MacAddress string `json:",omitempty"` OnBuild []string // ONBUILD metadata that were defined on the image Dockerfile Labels map[string]string // List of labels set to this container StopSignal string `json:",omitempty"` // Signal to stop a container StopTimeout *int `json:",omitempty"` // Timeout (in seconds) to stop a container Shell strslice.StrSlice `json:",omitempty"` // Shell for shell-form of RUN, CMD, ENTRYPOINT } ================================================ FILE: vendor/github.com/docker/docker/api/types/container/container.go ================================================ package container import ( "io" "os" "time" "github.com/docker/docker/api/types/mount" "github.com/docker/docker/api/types/storage" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) // ContainerUpdateOKBody OK response to ContainerUpdate operation // // Deprecated: use [UpdateResponse]. This alias will be removed in the next release. type ContainerUpdateOKBody = UpdateResponse // ContainerTopOKBody OK response to ContainerTop operation // // Deprecated: use [TopResponse]. This alias will be removed in the next release. type ContainerTopOKBody = TopResponse // PruneReport contains the response for Engine API: // POST "/containers/prune" type PruneReport struct { ContainersDeleted []string SpaceReclaimed uint64 } // PathStat is used to encode the header from // GET "/containers/{name:.*}/archive" // "Name" is the file or directory name. type PathStat struct { Name string `json:"name"` Size int64 `json:"size"` Mode os.FileMode `json:"mode"` Mtime time.Time `json:"mtime"` LinkTarget string `json:"linkTarget"` } // CopyToContainerOptions holds information // about files to copy into a container type CopyToContainerOptions struct { AllowOverwriteDirWithFile bool CopyUIDGID bool } // StatsResponseReader wraps an io.ReadCloser to read (a stream of) stats // for a container, as produced by the GET "/stats" endpoint. // // The OSType field is set to the server's platform to allow // platform-specific handling of the response. // // TODO(thaJeztah): remove this wrapper, and make OSType part of [StatsResponse]. type StatsResponseReader struct { Body io.ReadCloser `json:"body"` OSType string `json:"ostype"` } // MountPoint represents a mount point configuration inside the container. // This is used for reporting the mountpoints in use by a container. type MountPoint struct { // Type is the type of mount, see `Type` definitions in // github.com/docker/docker/api/types/mount.Type Type mount.Type `json:",omitempty"` // Name is the name reference to the underlying data defined by `Source` // e.g., the volume name. Name string `json:",omitempty"` // Source is the source location of the mount. // // For volumes, this contains the storage location of the volume (within // `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains // the source (host) part of the bind-mount. For `tmpfs` mount points, this // field is empty. Source string // Destination is the path relative to the container root (`/`) where the // Source is mounted inside the container. Destination string // Driver is the volume driver used to create the volume (if it is a volume). Driver string `json:",omitempty"` // Mode is a comma separated list of options supplied by the user when // creating the bind/volume mount. // // The default is platform-specific (`"z"` on Linux, empty on Windows). Mode string // RW indicates whether the mount is mounted writable (read-write). RW bool // Propagation describes how mounts are propagated from the host into the // mount point, and vice-versa. Refer to the Linux kernel documentation // for details: // https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt // // This field is not used on Windows. Propagation mount.Propagation } // State stores container's running state // it's part of ContainerJSONBase and returned by "inspect" command type State struct { Status ContainerState // String representation of the container state. Can be one of "created", "running", "paused", "restarting", "removing", "exited", or "dead" Running bool Paused bool Restarting bool OOMKilled bool Dead bool Pid int ExitCode int Error string StartedAt string FinishedAt string Health *Health `json:",omitempty"` } // Summary contains response of Engine API: // GET "/containers/json" type Summary struct { ID string `json:"Id"` Names []string Image string ImageID string ImageManifestDescriptor *ocispec.Descriptor `json:"ImageManifestDescriptor,omitempty"` Command string Created int64 Ports []Port SizeRw int64 `json:",omitempty"` SizeRootFs int64 `json:",omitempty"` Labels map[string]string State ContainerState Status string HostConfig struct { NetworkMode string `json:",omitempty"` Annotations map[string]string `json:",omitempty"` } NetworkSettings *NetworkSettingsSummary Mounts []MountPoint } // ContainerJSONBase contains response of Engine API GET "/containers/{name:.*}/json" // for API version 1.18 and older. // // TODO(thaJeztah): combine ContainerJSONBase and InspectResponse into a single struct. // The split between ContainerJSONBase (ContainerJSONBase) and InspectResponse (InspectResponse) // was done in commit 6deaa58ba5f051039643cedceee97c8695e2af74 (https://github.com/moby/moby/pull/13675). // ContainerJSONBase contained all fields for API < 1.19, and InspectResponse // held fields that were added in API 1.19 and up. Given that the minimum // supported API version is now 1.24, we no longer use the separate type. type ContainerJSONBase struct { ID string `json:"Id"` Created string Path string Args []string State *State Image string ResolvConfPath string HostnamePath string HostsPath string LogPath string Name string RestartCount int Driver string Platform string MountLabel string ProcessLabel string AppArmorProfile string ExecIDs []string HostConfig *HostConfig GraphDriver storage.DriverData SizeRw *int64 `json:",omitempty"` SizeRootFs *int64 `json:",omitempty"` } // InspectResponse is the response for the GET "/containers/{name:.*}/json" // endpoint. type InspectResponse struct { *ContainerJSONBase Mounts []MountPoint Config *Config NetworkSettings *NetworkSettings // ImageManifestDescriptor is the descriptor of a platform-specific manifest of the image used to create the container. ImageManifestDescriptor *ocispec.Descriptor `json:"ImageManifestDescriptor,omitempty"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/container/create_request.go ================================================ package container import "github.com/docker/docker/api/types/network" // CreateRequest is the request message sent to the server for container // create calls. It is a config wrapper that holds the container [Config] // (portable) and the corresponding [HostConfig] (non-portable) and // [network.NetworkingConfig]. type CreateRequest struct { *Config HostConfig *HostConfig `json:"HostConfig,omitempty"` NetworkingConfig *network.NetworkingConfig `json:"NetworkingConfig,omitempty"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/container/create_response.go ================================================ package container // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command // CreateResponse ContainerCreateResponse // // OK response to ContainerCreate operation // swagger:model CreateResponse type CreateResponse struct { // The ID of the created container // Required: true ID string `json:"Id"` // Warnings encountered when creating the container // Required: true Warnings []string `json:"Warnings"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/container/disk_usage.go ================================================ package container // DiskUsage contains disk usage for containers. // // Deprecated: this type is no longer used and will be removed in the next release. type DiskUsage struct { TotalSize int64 Reclaimable int64 Items []*Summary } ================================================ FILE: vendor/github.com/docker/docker/api/types/container/errors.go ================================================ package container type errInvalidParameter struct{ error } func (e *errInvalidParameter) InvalidParameter() {} func (e *errInvalidParameter) Unwrap() error { return e.error } ================================================ FILE: vendor/github.com/docker/docker/api/types/container/exec.go ================================================ package container import "github.com/docker/docker/api/types/common" // ExecCreateResponse is the response for a successful exec-create request. // It holds the ID of the exec that was created. // // TODO(thaJeztah): make this a distinct type. type ExecCreateResponse = common.IDResponse // ExecOptions is a small subset of the Config struct that holds the configuration // for the exec feature of docker. type ExecOptions struct { User string // User that will run the command Privileged bool // Is the container in privileged mode Tty bool // Attach standard streams to a tty. ConsoleSize *[2]uint `json:",omitempty"` // Initial console size [height, width] AttachStdin bool // Attach the standard input, makes possible user interaction AttachStderr bool // Attach the standard error AttachStdout bool // Attach the standard output DetachKeys string // Escape keys for detach Env []string // Environment variables WorkingDir string // Working directory Cmd []string // Execution commands and args // Deprecated: the Detach field is not used, and will be removed in a future release. Detach bool } // ExecStartOptions is a temp struct used by execStart // Config fields is part of ExecConfig in runconfig package type ExecStartOptions struct { // ExecStart will first check if it's detached Detach bool // Check if there's a tty Tty bool // Terminal size [height, width], unused if Tty == false ConsoleSize *[2]uint `json:",omitempty"` } // ExecAttachOptions is a temp struct used by execAttach. // // TODO(thaJeztah): make this a separate type; ContainerExecAttach does not use the Detach option, and cannot run detached. type ExecAttachOptions = ExecStartOptions // ExecInspect holds information returned by exec inspect. type ExecInspect struct { ExecID string `json:"ID"` ContainerID string Running bool ExitCode int Pid int } ================================================ FILE: vendor/github.com/docker/docker/api/types/container/filesystem_change.go ================================================ package container // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command // FilesystemChange Change in the container's filesystem. // // swagger:model FilesystemChange type FilesystemChange struct { // kind // Required: true Kind ChangeType `json:"Kind"` // Path to file or directory that has changed. // // Required: true Path string `json:"Path"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/container/health.go ================================================ package container import ( "fmt" "strings" "time" ) // HealthStatus is a string representation of the container's health. // // It currently is an alias for string, but may become a distinct type in future. type HealthStatus = string // Health states const ( NoHealthcheck HealthStatus = "none" // Indicates there is no healthcheck Starting HealthStatus = "starting" // Starting indicates that the container is not yet ready Healthy HealthStatus = "healthy" // Healthy indicates that the container is running correctly Unhealthy HealthStatus = "unhealthy" // Unhealthy indicates that the container has a problem ) // Health stores information about the container's healthcheck results type Health struct { Status HealthStatus // Status is one of [Starting], [Healthy] or [Unhealthy]. FailingStreak int // FailingStreak is the number of consecutive failures Log []*HealthcheckResult // Log contains the last few results (oldest first) } // HealthcheckResult stores information about a single run of a healthcheck probe type HealthcheckResult struct { Start time.Time // Start is the time this check started End time.Time // End is the time this check ended ExitCode int // ExitCode meanings: 0=healthy, 1=unhealthy, 2=reserved (considered unhealthy), else=error running probe Output string // Output from last check } var validHealths = []string{ NoHealthcheck, Starting, Healthy, Unhealthy, } // ValidateHealthStatus checks if the provided string is a valid // container [HealthStatus]. func ValidateHealthStatus(s HealthStatus) error { switch s { case NoHealthcheck, Starting, Healthy, Unhealthy: return nil default: return errInvalidParameter{error: fmt.Errorf("invalid value for health (%s): must be one of %s", s, strings.Join(validHealths, ", "))} } } ================================================ FILE: vendor/github.com/docker/docker/api/types/container/hostconfig.go ================================================ package container import ( "errors" "fmt" "strings" "github.com/docker/docker/api/types/blkiodev" "github.com/docker/docker/api/types/mount" "github.com/docker/docker/api/types/network" "github.com/docker/docker/api/types/strslice" "github.com/docker/go-connections/nat" "github.com/docker/go-units" ) // CgroupnsMode represents the cgroup namespace mode of the container type CgroupnsMode string // cgroup namespace modes for containers const ( CgroupnsModeEmpty CgroupnsMode = "" CgroupnsModePrivate CgroupnsMode = "private" CgroupnsModeHost CgroupnsMode = "host" ) // IsPrivate indicates whether the container uses its own private cgroup namespace func (c CgroupnsMode) IsPrivate() bool { return c == CgroupnsModePrivate } // IsHost indicates whether the container shares the host's cgroup namespace func (c CgroupnsMode) IsHost() bool { return c == CgroupnsModeHost } // IsEmpty indicates whether the container cgroup namespace mode is unset func (c CgroupnsMode) IsEmpty() bool { return c == CgroupnsModeEmpty } // Valid indicates whether the cgroup namespace mode is valid func (c CgroupnsMode) Valid() bool { return c.IsEmpty() || c.IsPrivate() || c.IsHost() } // Isolation represents the isolation technology of a container. The supported // values are platform specific type Isolation string // Isolation modes for containers const ( IsolationEmpty Isolation = "" // IsolationEmpty is unspecified (same behavior as default) IsolationDefault Isolation = "default" // IsolationDefault is the default isolation mode on current daemon IsolationProcess Isolation = "process" // IsolationProcess is process isolation mode IsolationHyperV Isolation = "hyperv" // IsolationHyperV is HyperV isolation mode ) // IsDefault indicates the default isolation technology of a container. On Linux this // is the native driver. On Windows, this is a Windows Server Container. func (i Isolation) IsDefault() bool { // TODO consider making isolation-mode strict (case-sensitive) v := Isolation(strings.ToLower(string(i))) return v == IsolationDefault || v == IsolationEmpty } // IsHyperV indicates the use of a Hyper-V partition for isolation func (i Isolation) IsHyperV() bool { // TODO consider making isolation-mode strict (case-sensitive) return Isolation(strings.ToLower(string(i))) == IsolationHyperV } // IsProcess indicates the use of process isolation func (i Isolation) IsProcess() bool { // TODO consider making isolation-mode strict (case-sensitive) return Isolation(strings.ToLower(string(i))) == IsolationProcess } // IpcMode represents the container ipc stack. type IpcMode string // IpcMode constants const ( IPCModeNone IpcMode = "none" IPCModeHost IpcMode = "host" IPCModeContainer IpcMode = "container" IPCModePrivate IpcMode = "private" IPCModeShareable IpcMode = "shareable" ) // IsPrivate indicates whether the container uses its own private ipc namespace which can not be shared. func (n IpcMode) IsPrivate() bool { return n == IPCModePrivate } // IsHost indicates whether the container shares the host's ipc namespace. func (n IpcMode) IsHost() bool { return n == IPCModeHost } // IsShareable indicates whether the container's ipc namespace can be shared with another container. func (n IpcMode) IsShareable() bool { return n == IPCModeShareable } // IsContainer indicates whether the container uses another container's ipc namespace. func (n IpcMode) IsContainer() bool { _, ok := containerID(string(n)) return ok } // IsNone indicates whether container IpcMode is set to "none". func (n IpcMode) IsNone() bool { return n == IPCModeNone } // IsEmpty indicates whether container IpcMode is empty func (n IpcMode) IsEmpty() bool { return n == "" } // Valid indicates whether the ipc mode is valid. func (n IpcMode) Valid() bool { // TODO(thaJeztah): align with PidMode, and consider container-mode without a container name/ID to be invalid. return n.IsEmpty() || n.IsNone() || n.IsPrivate() || n.IsHost() || n.IsShareable() || n.IsContainer() } // Container returns the name of the container ipc stack is going to be used. func (n IpcMode) Container() (idOrName string) { idOrName, _ = containerID(string(n)) return idOrName } // NetworkMode represents the container network stack. type NetworkMode string // IsNone indicates whether container isn't using a network stack. func (n NetworkMode) IsNone() bool { return n == network.NetworkNone } // IsDefault indicates whether container uses the default network stack. func (n NetworkMode) IsDefault() bool { return n == network.NetworkDefault } // IsPrivate indicates whether container uses its private network stack. func (n NetworkMode) IsPrivate() bool { return !n.IsHost() && !n.IsContainer() } // IsContainer indicates whether container uses a container network stack. func (n NetworkMode) IsContainer() bool { _, ok := containerID(string(n)) return ok } // ConnectedContainer is the id of the container which network this container is connected to. func (n NetworkMode) ConnectedContainer() (idOrName string) { idOrName, _ = containerID(string(n)) return idOrName } // UserDefined indicates user-created network func (n NetworkMode) UserDefined() string { if n.IsUserDefined() { return string(n) } return "" } // UsernsMode represents userns mode in the container. type UsernsMode string // IsHost indicates whether the container uses the host's userns. func (n UsernsMode) IsHost() bool { return n == "host" } // IsPrivate indicates whether the container uses the a private userns. func (n UsernsMode) IsPrivate() bool { return !n.IsHost() } // Valid indicates whether the userns is valid. func (n UsernsMode) Valid() bool { return n == "" || n.IsHost() } // CgroupSpec represents the cgroup to use for the container. type CgroupSpec string // IsContainer indicates whether the container is using another container cgroup func (c CgroupSpec) IsContainer() bool { _, ok := containerID(string(c)) return ok } // Valid indicates whether the cgroup spec is valid. func (c CgroupSpec) Valid() bool { // TODO(thaJeztah): align with PidMode, and consider container-mode without a container name/ID to be invalid. return c == "" || c.IsContainer() } // Container returns the ID or name of the container whose cgroup will be used. func (c CgroupSpec) Container() (idOrName string) { idOrName, _ = containerID(string(c)) return idOrName } // UTSMode represents the UTS namespace of the container. type UTSMode string // IsPrivate indicates whether the container uses its private UTS namespace. func (n UTSMode) IsPrivate() bool { return !n.IsHost() } // IsHost indicates whether the container uses the host's UTS namespace. func (n UTSMode) IsHost() bool { return n == "host" } // Valid indicates whether the UTS namespace is valid. func (n UTSMode) Valid() bool { return n == "" || n.IsHost() } // PidMode represents the pid namespace of the container. type PidMode string // IsPrivate indicates whether the container uses its own new pid namespace. func (n PidMode) IsPrivate() bool { return !n.IsHost() && !n.IsContainer() } // IsHost indicates whether the container uses the host's pid namespace. func (n PidMode) IsHost() bool { return n == "host" } // IsContainer indicates whether the container uses a container's pid namespace. func (n PidMode) IsContainer() bool { _, ok := containerID(string(n)) return ok } // Valid indicates whether the pid namespace is valid. func (n PidMode) Valid() bool { return n == "" || n.IsHost() || validContainer(string(n)) } // Container returns the name of the container whose pid namespace is going to be used. func (n PidMode) Container() (idOrName string) { idOrName, _ = containerID(string(n)) return idOrName } // DeviceRequest represents a request for devices from a device driver. // Used by GPU device drivers. type DeviceRequest struct { Driver string // Name of device driver Count int // Number of devices to request (-1 = All) DeviceIDs []string // List of device IDs as recognizable by the device driver Capabilities [][]string // An OR list of AND lists of device capabilities (e.g. "gpu") Options map[string]string // Options to pass onto the device driver } // DeviceMapping represents the device mapping between the host and the container. type DeviceMapping struct { PathOnHost string PathInContainer string CgroupPermissions string } // RestartPolicy represents the restart policies of the container. type RestartPolicy struct { Name RestartPolicyMode MaximumRetryCount int } type RestartPolicyMode string const ( RestartPolicyDisabled RestartPolicyMode = "no" RestartPolicyAlways RestartPolicyMode = "always" RestartPolicyOnFailure RestartPolicyMode = "on-failure" RestartPolicyUnlessStopped RestartPolicyMode = "unless-stopped" ) // IsNone indicates whether the container has the "no" restart policy. // This means the container will not automatically restart when exiting. func (rp *RestartPolicy) IsNone() bool { return rp.Name == RestartPolicyDisabled || rp.Name == "" } // IsAlways indicates whether the container has the "always" restart policy. // This means the container will automatically restart regardless of the exit status. func (rp *RestartPolicy) IsAlways() bool { return rp.Name == RestartPolicyAlways } // IsOnFailure indicates whether the container has the "on-failure" restart policy. // This means the container will automatically restart of exiting with a non-zero exit status. func (rp *RestartPolicy) IsOnFailure() bool { return rp.Name == RestartPolicyOnFailure } // IsUnlessStopped indicates whether the container has the // "unless-stopped" restart policy. This means the container will // automatically restart unless user has put it to stopped state. func (rp *RestartPolicy) IsUnlessStopped() bool { return rp.Name == RestartPolicyUnlessStopped } // IsSame compares two RestartPolicy to see if they are the same func (rp *RestartPolicy) IsSame(tp *RestartPolicy) bool { return rp.Name == tp.Name && rp.MaximumRetryCount == tp.MaximumRetryCount } // ValidateRestartPolicy validates the given RestartPolicy. func ValidateRestartPolicy(policy RestartPolicy) error { switch policy.Name { case RestartPolicyAlways, RestartPolicyUnlessStopped, RestartPolicyDisabled: if policy.MaximumRetryCount != 0 { msg := "invalid restart policy: maximum retry count can only be used with 'on-failure'" if policy.MaximumRetryCount < 0 { msg += " and cannot be negative" } return &errInvalidParameter{errors.New(msg)} } return nil case RestartPolicyOnFailure: if policy.MaximumRetryCount < 0 { return &errInvalidParameter{errors.New("invalid restart policy: maximum retry count cannot be negative")} } return nil case "": // Versions before v25.0.0 created an empty restart-policy "name" as // default. Allow an empty name with "any" MaximumRetryCount for // backward-compatibility. return nil default: return &errInvalidParameter{fmt.Errorf("invalid restart policy: unknown policy '%s'; use one of '%s', '%s', '%s', or '%s'", policy.Name, RestartPolicyDisabled, RestartPolicyAlways, RestartPolicyOnFailure, RestartPolicyUnlessStopped)} } } // LogMode is a type to define the available modes for logging // These modes affect how logs are handled when log messages start piling up. type LogMode string // Available logging modes const ( LogModeUnset LogMode = "" LogModeBlocking LogMode = "blocking" LogModeNonBlock LogMode = "non-blocking" ) // LogConfig represents the logging configuration of the container. type LogConfig struct { Type string Config map[string]string } // Ulimit is an alias for [units.Ulimit], which may be moving to a different // location or become a local type. This alias is to help transitioning. // // Users are recommended to use this alias instead of using [units.Ulimit] directly. type Ulimit = units.Ulimit // Resources contains container's resources (cgroups config, ulimits...) type Resources struct { // Applicable to all platforms CPUShares int64 `json:"CpuShares"` // CPU shares (relative weight vs. other containers) Memory int64 // Memory limit (in bytes) NanoCPUs int64 `json:"NanoCpus"` // CPU quota in units of 10-9 CPUs. // Applicable to UNIX platforms CgroupParent string // Parent cgroup. BlkioWeight uint16 // Block IO weight (relative weight vs. other containers) BlkioWeightDevice []*blkiodev.WeightDevice BlkioDeviceReadBps []*blkiodev.ThrottleDevice BlkioDeviceWriteBps []*blkiodev.ThrottleDevice BlkioDeviceReadIOps []*blkiodev.ThrottleDevice BlkioDeviceWriteIOps []*blkiodev.ThrottleDevice CPUPeriod int64 `json:"CpuPeriod"` // CPU CFS (Completely Fair Scheduler) period CPUQuota int64 `json:"CpuQuota"` // CPU CFS (Completely Fair Scheduler) quota CPURealtimePeriod int64 `json:"CpuRealtimePeriod"` // CPU real-time period CPURealtimeRuntime int64 `json:"CpuRealtimeRuntime"` // CPU real-time runtime CpusetCpus string // CpusetCpus 0-2, 0,1 CpusetMems string // CpusetMems 0-2, 0,1 Devices []DeviceMapping // List of devices to map inside the container DeviceCgroupRules []string // List of rule to be added to the device cgroup DeviceRequests []DeviceRequest // List of device requests for device drivers // KernelMemory specifies the kernel memory limit (in bytes) for the container. // Deprecated: kernel 5.4 deprecated kmem.limit_in_bytes. KernelMemory int64 `json:",omitempty"` // Hard limit for kernel TCP buffer memory (in bytes). // // Deprecated: This field is deprecated and will be removed in the next release. // Starting with 6.12, the kernel has deprecated kernel memory tcp accounting // for cgroups v1. KernelMemoryTCP int64 `json:",omitempty"` // Hard limit for kernel TCP buffer memory (in bytes) MemoryReservation int64 // Memory soft limit (in bytes) MemorySwap int64 // Total memory usage (memory + swap); set `-1` to enable unlimited swap MemorySwappiness *int64 // Tuning container memory swappiness behaviour OomKillDisable *bool // Whether to disable OOM Killer or not PidsLimit *int64 // Setting PIDs limit for a container; Set `0` or `-1` for unlimited, or `null` to not change. Ulimits []*Ulimit // List of ulimits to be set in the container // Applicable to Windows CPUCount int64 `json:"CpuCount"` // CPU count CPUPercent int64 `json:"CpuPercent"` // CPU percent IOMaximumIOps uint64 // Maximum IOps for the container system drive IOMaximumBandwidth uint64 // Maximum IO in bytes per second for the container system drive } // UpdateConfig holds the mutable attributes of a Container. // Those attributes can be updated at runtime. type UpdateConfig struct { // Contains container's resources (cgroups, ulimits) Resources RestartPolicy RestartPolicy } // HostConfig the non-portable Config structure of a container. // Here, "non-portable" means "dependent of the host we are running on". // Portable information *should* appear in Config. type HostConfig struct { // Applicable to all platforms Binds []string // List of volume bindings for this container ContainerIDFile string // File (path) where the containerId is written LogConfig LogConfig // Configuration of the logs for this container NetworkMode NetworkMode // Network mode to use for the container PortBindings nat.PortMap // Port mapping between the exposed port (container) and the host RestartPolicy RestartPolicy // Restart policy to be used for the container AutoRemove bool // Automatically remove container when it exits VolumeDriver string // Name of the volume driver used to mount volumes VolumesFrom []string // List of volumes to take from other container ConsoleSize [2]uint // Initial console size (height,width) Annotations map[string]string `json:",omitempty"` // Arbitrary non-identifying metadata attached to container and provided to the runtime // Applicable to UNIX platforms CapAdd strslice.StrSlice // List of kernel capabilities to add to the container CapDrop strslice.StrSlice // List of kernel capabilities to remove from the container CgroupnsMode CgroupnsMode // Cgroup namespace mode to use for the container DNS []string `json:"Dns"` // List of DNS server to lookup DNSOptions []string `json:"DnsOptions"` // List of DNSOption to look for DNSSearch []string `json:"DnsSearch"` // List of DNSSearch to look for ExtraHosts []string // List of extra hosts GroupAdd []string // List of additional groups that the container process will run as IpcMode IpcMode // IPC namespace to use for the container Cgroup CgroupSpec // Cgroup to use for the container Links []string // List of links (in the name:alias form) OomScoreAdj int // Container preference for OOM-killing PidMode PidMode // PID namespace to use for the container Privileged bool // Is the container in privileged mode PublishAllPorts bool // Should docker publish all exposed port for the container ReadonlyRootfs bool // Is the container root filesystem in read-only SecurityOpt []string // List of string values to customize labels for MLS systems, such as SELinux. StorageOpt map[string]string `json:",omitempty"` // Storage driver options per container. Tmpfs map[string]string `json:",omitempty"` // List of tmpfs (mounts) used for the container UTSMode UTSMode // UTS namespace to use for the container UsernsMode UsernsMode // The user namespace to use for the container ShmSize int64 // Total shm memory usage Sysctls map[string]string `json:",omitempty"` // List of Namespaced sysctls used for the container Runtime string `json:",omitempty"` // Runtime to use with this container // Applicable to Windows Isolation Isolation // Isolation technology of the container (e.g. default, hyperv) // Contains container's resources (cgroups, ulimits) Resources // Mounts specs used by the container Mounts []mount.Mount `json:",omitempty"` // MaskedPaths is the list of paths to be masked inside the container (this overrides the default set of paths) MaskedPaths []string // ReadonlyPaths is the list of paths to be set as read-only inside the container (this overrides the default set of paths) ReadonlyPaths []string // Run a custom init inside the container, if null, use the daemon's configured settings Init *bool `json:",omitempty"` } // containerID splits "container:" values. It returns the container // ID or name, and whether an ID/name was found. It returns an empty string and // a "false" if the value does not have a "container:" prefix. Further validation // of the returned, including checking if the value is empty, should be handled // by the caller. func containerID(val string) (idOrName string, ok bool) { k, v, hasSep := strings.Cut(val, ":") if !hasSep || k != "container" { return "", false } return v, true } // validContainer checks if the given value is a "container:" mode with // a non-empty name/ID. func validContainer(val string) bool { id, ok := containerID(val) return ok && id != "" } ================================================ FILE: vendor/github.com/docker/docker/api/types/container/hostconfig_unix.go ================================================ //go:build !windows package container import "github.com/docker/docker/api/types/network" // IsValid indicates if an isolation technology is valid func (i Isolation) IsValid() bool { return i.IsDefault() } // IsBridge indicates whether container uses the bridge network stack func (n NetworkMode) IsBridge() bool { return n == network.NetworkBridge } // IsHost indicates whether container uses the host network stack. func (n NetworkMode) IsHost() bool { return n == network.NetworkHost } // IsUserDefined indicates user-created network func (n NetworkMode) IsUserDefined() bool { return !n.IsDefault() && !n.IsBridge() && !n.IsHost() && !n.IsNone() && !n.IsContainer() } // NetworkName returns the name of the network stack. func (n NetworkMode) NetworkName() string { switch { case n.IsDefault(): return network.NetworkDefault case n.IsBridge(): return network.NetworkBridge case n.IsHost(): return network.NetworkHost case n.IsNone(): return network.NetworkNone case n.IsContainer(): return "container" case n.IsUserDefined(): return n.UserDefined() default: return "" } } ================================================ FILE: vendor/github.com/docker/docker/api/types/container/hostconfig_windows.go ================================================ package container import "github.com/docker/docker/api/types/network" // IsValid indicates if an isolation technology is valid func (i Isolation) IsValid() bool { return i.IsDefault() || i.IsHyperV() || i.IsProcess() } // IsBridge indicates whether container uses the bridge network stack // in windows it is given the name NAT func (n NetworkMode) IsBridge() bool { return n == network.NetworkNat } // IsHost indicates whether container uses the host network stack. // returns false as this is not supported by windows func (n NetworkMode) IsHost() bool { return false } // IsUserDefined indicates user-created network func (n NetworkMode) IsUserDefined() bool { return !n.IsDefault() && !n.IsNone() && !n.IsBridge() && !n.IsContainer() } // NetworkName returns the name of the network stack. func (n NetworkMode) NetworkName() string { switch { case n.IsDefault(): return network.NetworkDefault case n.IsBridge(): return network.NetworkNat case n.IsHost(): // Windows currently doesn't support host network-mode, so // this would currently never happen.. return network.NetworkHost case n.IsNone(): return network.NetworkNone case n.IsContainer(): return "container" case n.IsUserDefined(): return n.UserDefined() default: return "" } } ================================================ FILE: vendor/github.com/docker/docker/api/types/container/network_settings.go ================================================ package container import ( "github.com/docker/docker/api/types/network" "github.com/docker/go-connections/nat" ) // NetworkSettings exposes the network settings in the api type NetworkSettings struct { NetworkSettingsBase DefaultNetworkSettings Networks map[string]*network.EndpointSettings } // NetworkSettingsBase holds networking state for a container when inspecting it. // // Deprecated: Most fields in NetworkSettingsBase are deprecated. Fields which aren't deprecated will move to // NetworkSettings in v29.0, and this struct will be removed. type NetworkSettingsBase struct { Bridge string // Deprecated: This field is only set when the daemon is started with the --bridge flag specified. SandboxID string // SandboxID uniquely represents a container's network stack SandboxKey string // SandboxKey identifies the sandbox Ports nat.PortMap // Ports is a collection of PortBinding indexed by Port // HairpinMode specifies if hairpin NAT should be enabled on the virtual interface // // Deprecated: This field is never set and will be removed in a future release. HairpinMode bool // LinkLocalIPv6Address is an IPv6 unicast address using the link-local prefix // // Deprecated: This field is never set and will be removed in a future release. LinkLocalIPv6Address string // LinkLocalIPv6PrefixLen is the prefix length of an IPv6 unicast address // // Deprecated: This field is never set and will be removed in a future release. LinkLocalIPv6PrefixLen int SecondaryIPAddresses []network.Address // Deprecated: This field is never set and will be removed in a future release. SecondaryIPv6Addresses []network.Address // Deprecated: This field is never set and will be removed in a future release. } // DefaultNetworkSettings holds the networking state for the default bridge, if the container is connected to that // network. // // Deprecated: this struct is deprecated since Docker v1.11 and will be removed in v29. You should look for the default // network in NetworkSettings.Networks instead. type DefaultNetworkSettings struct { // EndpointID uniquely represents a service endpoint in a Sandbox // // Deprecated: This field will be removed in v29. You should look for the default network in NetworkSettings.Networks instead. EndpointID string // Gateway holds the gateway address for the network // // Deprecated: This field will be removed in v29. You should look for the default network in NetworkSettings.Networks instead. Gateway string // GlobalIPv6Address holds network's global IPv6 address // // Deprecated: This field will be removed in v29. You should look for the default network in NetworkSettings.Networks instead. GlobalIPv6Address string // GlobalIPv6PrefixLen represents mask length of network's global IPv6 address // // Deprecated: This field will be removed in v29. You should look for the default network in NetworkSettings.Networks instead. GlobalIPv6PrefixLen int // IPAddress holds the IPv4 address for the network // // Deprecated: This field will be removed in v29. You should look for the default network in NetworkSettings.Networks instead. IPAddress string // IPPrefixLen represents mask length of network's IPv4 address // // Deprecated: This field will be removed in v29. You should look for the default network in NetworkSettings.Networks instead. IPPrefixLen int // IPv6Gateway holds gateway address specific for IPv6 // // Deprecated: This field will be removed in v29. You should look for the default network in NetworkSettings.Networks instead. IPv6Gateway string // MacAddress holds the MAC address for the network // // Deprecated: This field will be removed in v29. You should look for the default network in NetworkSettings.Networks instead. MacAddress string } // NetworkSettingsSummary provides a summary of container's networks // in /containers/json type NetworkSettingsSummary struct { Networks map[string]*network.EndpointSettings } ================================================ FILE: vendor/github.com/docker/docker/api/types/container/options.go ================================================ package container import "github.com/docker/docker/api/types/filters" // ResizeOptions holds parameters to resize a TTY. // It can be used to resize container TTYs and // exec process TTYs too. type ResizeOptions struct { Height uint Width uint } // AttachOptions holds parameters to attach to a container. type AttachOptions struct { Stream bool Stdin bool Stdout bool Stderr bool DetachKeys string Logs bool } // CommitOptions holds parameters to commit changes into a container. type CommitOptions struct { Reference string Comment string Author string Changes []string Pause bool Config *Config } // RemoveOptions holds parameters to remove containers. type RemoveOptions struct { RemoveVolumes bool RemoveLinks bool Force bool } // StartOptions holds parameters to start containers. type StartOptions struct { CheckpointID string CheckpointDir string } // ListOptions holds parameters to list containers with. type ListOptions struct { Size bool All bool Latest bool Since string Before string Limit int Filters filters.Args } // LogsOptions holds parameters to filter logs with. type LogsOptions struct { ShowStdout bool ShowStderr bool Since string Until string Timestamps bool Follow bool Tail string Details bool } ================================================ FILE: vendor/github.com/docker/docker/api/types/container/port.go ================================================ package container // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command // Port An open port on a container // swagger:model Port type Port struct { // Host IP address that the container's port is mapped to IP string `json:"IP,omitempty"` // Port on the container // Required: true PrivatePort uint16 `json:"PrivatePort"` // Port exposed on the host PublicPort uint16 `json:"PublicPort,omitempty"` // type // Required: true Type string `json:"Type"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/container/state.go ================================================ package container import ( "fmt" "strings" ) // ContainerState is a string representation of the container's current state. // // It currently is an alias for string, but may become a distinct type in the future. type ContainerState = string const ( StateCreated ContainerState = "created" // StateCreated indicates the container is created, but not (yet) started. StateRunning ContainerState = "running" // StateRunning indicates that the container is running. StatePaused ContainerState = "paused" // StatePaused indicates that the container's current state is paused. StateRestarting ContainerState = "restarting" // StateRestarting indicates that the container is currently restarting. StateRemoving ContainerState = "removing" // StateRemoving indicates that the container is being removed. StateExited ContainerState = "exited" // StateExited indicates that the container exited. StateDead ContainerState = "dead" // StateDead indicates that the container failed to be deleted. Containers in this state are attempted to be cleaned up when the daemon restarts. ) var validStates = []ContainerState{ StateCreated, StateRunning, StatePaused, StateRestarting, StateRemoving, StateExited, StateDead, } // ValidateContainerState checks if the provided string is a valid // container [ContainerState]. func ValidateContainerState(s ContainerState) error { switch s { case StateCreated, StateRunning, StatePaused, StateRestarting, StateRemoving, StateExited, StateDead: return nil default: return errInvalidParameter{error: fmt.Errorf("invalid value for state (%s): must be one of %s", s, strings.Join(validStates, ", "))} } } // StateStatus is used to return container wait results. // Implements exec.ExitCode interface. // This type is needed as State include a sync.Mutex field which make // copying it unsafe. type StateStatus struct { exitCode int err error } // ExitCode returns current exitcode for the state. func (s StateStatus) ExitCode() int { return s.exitCode } // Err returns current error for the state. Returns nil if the container had // exited on its own. func (s StateStatus) Err() error { return s.err } // NewStateStatus returns a new StateStatus with the given exit code and error. func NewStateStatus(exitCode int, err error) StateStatus { return StateStatus{ exitCode: exitCode, err: err, } } ================================================ FILE: vendor/github.com/docker/docker/api/types/container/stats.go ================================================ package container import "time" // ThrottlingData stores CPU throttling stats of one running container. // Not used on Windows. type ThrottlingData struct { // Number of periods with throttling active Periods uint64 `json:"periods"` // Number of periods when the container hits its throttling limit. ThrottledPeriods uint64 `json:"throttled_periods"` // Aggregate time the container was throttled for in nanoseconds. ThrottledTime uint64 `json:"throttled_time"` } // CPUUsage stores All CPU stats aggregated since container inception. type CPUUsage struct { // Total CPU time consumed. // Units: nanoseconds (Linux) // Units: 100's of nanoseconds (Windows) TotalUsage uint64 `json:"total_usage"` // Total CPU time consumed per core (Linux). Not used on Windows. // Units: nanoseconds. PercpuUsage []uint64 `json:"percpu_usage,omitempty"` // Time spent by tasks of the cgroup in kernel mode (Linux). // Time spent by all container processes in kernel mode (Windows). // Units: nanoseconds (Linux). // Units: 100's of nanoseconds (Windows). Not populated for Hyper-V Containers. UsageInKernelmode uint64 `json:"usage_in_kernelmode"` // Time spent by tasks of the cgroup in user mode (Linux). // Time spent by all container processes in user mode (Windows). // Units: nanoseconds (Linux). // Units: 100's of nanoseconds (Windows). Not populated for Hyper-V Containers UsageInUsermode uint64 `json:"usage_in_usermode"` } // CPUStats aggregates and wraps all CPU related info of container type CPUStats struct { // CPU Usage. Linux and Windows. CPUUsage CPUUsage `json:"cpu_usage"` // System Usage. Linux only. SystemUsage uint64 `json:"system_cpu_usage,omitempty"` // Online CPUs. Linux only. OnlineCPUs uint32 `json:"online_cpus,omitempty"` // Throttling Data. Linux only. ThrottlingData ThrottlingData `json:"throttling_data,omitempty"` } // MemoryStats aggregates all memory stats since container inception on Linux. // Windows returns stats for commit and private working set only. type MemoryStats struct { // Linux Memory Stats // current res_counter usage for memory Usage uint64 `json:"usage,omitempty"` // maximum usage ever recorded. MaxUsage uint64 `json:"max_usage,omitempty"` // TODO(vishh): Export these as stronger types. // all the stats exported via memory.stat. Stats map[string]uint64 `json:"stats,omitempty"` // number of times memory usage hits limits. Failcnt uint64 `json:"failcnt,omitempty"` Limit uint64 `json:"limit,omitempty"` // Windows Memory Stats // See https://technet.microsoft.com/en-us/magazine/ff382715.aspx // committed bytes Commit uint64 `json:"commitbytes,omitempty"` // peak committed bytes CommitPeak uint64 `json:"commitpeakbytes,omitempty"` // private working set PrivateWorkingSet uint64 `json:"privateworkingset,omitempty"` } // BlkioStatEntry is one small entity to store a piece of Blkio stats // Not used on Windows. type BlkioStatEntry struct { Major uint64 `json:"major"` Minor uint64 `json:"minor"` Op string `json:"op"` Value uint64 `json:"value"` } // BlkioStats stores All IO service stats for data read and write. // This is a Linux specific structure as the differences between expressing // block I/O on Windows and Linux are sufficiently significant to make // little sense attempting to morph into a combined structure. type BlkioStats struct { // number of bytes transferred to and from the block device IoServiceBytesRecursive []BlkioStatEntry `json:"io_service_bytes_recursive"` IoServicedRecursive []BlkioStatEntry `json:"io_serviced_recursive"` IoQueuedRecursive []BlkioStatEntry `json:"io_queue_recursive"` IoServiceTimeRecursive []BlkioStatEntry `json:"io_service_time_recursive"` IoWaitTimeRecursive []BlkioStatEntry `json:"io_wait_time_recursive"` IoMergedRecursive []BlkioStatEntry `json:"io_merged_recursive"` IoTimeRecursive []BlkioStatEntry `json:"io_time_recursive"` SectorsRecursive []BlkioStatEntry `json:"sectors_recursive"` } // StorageStats is the disk I/O stats for read/write on Windows. type StorageStats struct { ReadCountNormalized uint64 `json:"read_count_normalized,omitempty"` ReadSizeBytes uint64 `json:"read_size_bytes,omitempty"` WriteCountNormalized uint64 `json:"write_count_normalized,omitempty"` WriteSizeBytes uint64 `json:"write_size_bytes,omitempty"` } // NetworkStats aggregates the network stats of one container type NetworkStats struct { // Bytes received. Windows and Linux. RxBytes uint64 `json:"rx_bytes"` // Packets received. Windows and Linux. RxPackets uint64 `json:"rx_packets"` // Received errors. Not used on Windows. Note that we don't `omitempty` this // field as it is expected in the >=v1.21 API stats structure. RxErrors uint64 `json:"rx_errors"` // Incoming packets dropped. Windows and Linux. RxDropped uint64 `json:"rx_dropped"` // Bytes sent. Windows and Linux. TxBytes uint64 `json:"tx_bytes"` // Packets sent. Windows and Linux. TxPackets uint64 `json:"tx_packets"` // Sent errors. Not used on Windows. Note that we don't `omitempty` this // field as it is expected in the >=v1.21 API stats structure. TxErrors uint64 `json:"tx_errors"` // Outgoing packets dropped. Windows and Linux. TxDropped uint64 `json:"tx_dropped"` // Endpoint ID. Not used on Linux. EndpointID string `json:"endpoint_id,omitempty"` // Instance ID. Not used on Linux. InstanceID string `json:"instance_id,omitempty"` } // PidsStats contains the stats of a container's pids type PidsStats struct { // Current is the number of pids in the cgroup Current uint64 `json:"current,omitempty"` // Limit is the hard limit on the number of pids in the cgroup. // A "Limit" of 0 means that there is no limit. Limit uint64 `json:"limit,omitempty"` } // Stats is Ultimate struct aggregating all types of stats of one container // // Deprecated: use [StatsResponse] instead. This type will be removed in the next release. type Stats = StatsResponse // StatsResponse aggregates all types of stats of one container. type StatsResponse struct { Name string `json:"name,omitempty"` ID string `json:"id,omitempty"` // Common stats Read time.Time `json:"read"` PreRead time.Time `json:"preread"` // Linux specific stats, not populated on Windows. PidsStats PidsStats `json:"pids_stats,omitempty"` BlkioStats BlkioStats `json:"blkio_stats,omitempty"` // Windows specific stats, not populated on Linux. NumProcs uint32 `json:"num_procs"` StorageStats StorageStats `json:"storage_stats,omitempty"` // Shared stats CPUStats CPUStats `json:"cpu_stats,omitempty"` PreCPUStats CPUStats `json:"precpu_stats,omitempty"` // "Pre"="Previous" MemoryStats MemoryStats `json:"memory_stats,omitempty"` Networks map[string]NetworkStats `json:"networks,omitempty"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/container/top_response.go ================================================ package container // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command // TopResponse ContainerTopResponse // // Container "top" response. // swagger:model TopResponse type TopResponse struct { // Each process running in the container, where each process // is an array of values corresponding to the titles. Processes [][]string `json:"Processes"` // The ps column titles Titles []string `json:"Titles"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/container/update_response.go ================================================ package container // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command // UpdateResponse ContainerUpdateResponse // // Response for a successful container-update. // swagger:model UpdateResponse type UpdateResponse struct { // Warnings encountered when updating the container. Warnings []string `json:"Warnings"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/container/wait_exit_error.go ================================================ package container // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command // WaitExitError container waiting error, if any // swagger:model WaitExitError type WaitExitError struct { // Details of an error Message string `json:"Message,omitempty"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/container/wait_response.go ================================================ package container // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command // WaitResponse ContainerWaitResponse // // OK response to ContainerWait operation // swagger:model WaitResponse type WaitResponse struct { // error Error *WaitExitError `json:"Error,omitempty"` // Exit code of the container // Required: true StatusCode int64 `json:"StatusCode"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/container/waitcondition.go ================================================ package container // WaitCondition is a type used to specify a container state for which // to wait. type WaitCondition string // Possible WaitCondition Values. // // WaitConditionNotRunning (default) is used to wait for any of the non-running // states: "created", "exited", "dead", "removing", or "removed". // // WaitConditionNextExit is used to wait for the next time the state changes // to a non-running state. If the state is currently "created" or "exited", // this would cause Wait() to block until either the container runs and exits // or is removed. // // WaitConditionRemoved is used to wait for the container to be removed. const ( WaitConditionNotRunning WaitCondition = "not-running" WaitConditionNextExit WaitCondition = "next-exit" WaitConditionRemoved WaitCondition = "removed" ) ================================================ FILE: vendor/github.com/docker/docker/api/types/error_response.go ================================================ package types // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command // ErrorResponse Represents an error. // swagger:model ErrorResponse type ErrorResponse struct { // The error message. // Required: true Message string `json:"message"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/error_response_ext.go ================================================ package types // Error returns the error message func (e ErrorResponse) Error() string { return e.Message } ================================================ FILE: vendor/github.com/docker/docker/api/types/events/events.go ================================================ package events import "github.com/docker/docker/api/types/filters" // Type is used for event-types. type Type string // List of known event types. const ( BuilderEventType Type = "builder" // BuilderEventType is the event type that the builder generates. ConfigEventType Type = "config" // ConfigEventType is the event type that configs generate. ContainerEventType Type = "container" // ContainerEventType is the event type that containers generate. DaemonEventType Type = "daemon" // DaemonEventType is the event type that daemon generate. ImageEventType Type = "image" // ImageEventType is the event type that images generate. NetworkEventType Type = "network" // NetworkEventType is the event type that networks generate. NodeEventType Type = "node" // NodeEventType is the event type that nodes generate. PluginEventType Type = "plugin" // PluginEventType is the event type that plugins generate. SecretEventType Type = "secret" // SecretEventType is the event type that secrets generate. ServiceEventType Type = "service" // ServiceEventType is the event type that services generate. VolumeEventType Type = "volume" // VolumeEventType is the event type that volumes generate. ) // Action is used for event-actions. type Action string const ( ActionCreate Action = "create" ActionStart Action = "start" ActionRestart Action = "restart" ActionStop Action = "stop" ActionCheckpoint Action = "checkpoint" ActionPause Action = "pause" ActionUnPause Action = "unpause" ActionAttach Action = "attach" ActionDetach Action = "detach" ActionResize Action = "resize" ActionUpdate Action = "update" ActionRename Action = "rename" ActionKill Action = "kill" ActionDie Action = "die" ActionOOM Action = "oom" ActionDestroy Action = "destroy" ActionRemove Action = "remove" ActionCommit Action = "commit" ActionTop Action = "top" ActionCopy Action = "copy" ActionArchivePath Action = "archive-path" ActionExtractToDir Action = "extract-to-dir" ActionExport Action = "export" ActionImport Action = "import" ActionSave Action = "save" ActionLoad Action = "load" ActionTag Action = "tag" ActionUnTag Action = "untag" ActionPush Action = "push" ActionPull Action = "pull" ActionPrune Action = "prune" ActionDelete Action = "delete" ActionEnable Action = "enable" ActionDisable Action = "disable" ActionConnect Action = "connect" ActionDisconnect Action = "disconnect" ActionReload Action = "reload" ActionMount Action = "mount" ActionUnmount Action = "unmount" // ActionExecCreate is the prefix used for exec_create events. These // event-actions are commonly followed by a colon and space (": "), // and the command that's defined for the exec, for example: // // exec_create: /bin/sh -c 'echo hello' // // This is far from ideal; it's a compromise to allow filtering and // to preserve backward-compatibility. ActionExecCreate Action = "exec_create" // ActionExecStart is the prefix used for exec_create events. These // event-actions are commonly followed by a colon and space (": "), // and the command that's defined for the exec, for example: // // exec_start: /bin/sh -c 'echo hello' // // This is far from ideal; it's a compromise to allow filtering and // to preserve backward-compatibility. ActionExecStart Action = "exec_start" ActionExecDie Action = "exec_die" ActionExecDetach Action = "exec_detach" // ActionHealthStatus is the prefix to use for health_status events. // // Health-status events can either have a pre-defined status, in which // case the "health_status" action is followed by a colon, or can be // "free-form", in which case they're followed by the output of the // health-check output. // // This is far form ideal, and a compromise to allow filtering, and // to preserve backward-compatibility. ActionHealthStatus Action = "health_status" ActionHealthStatusRunning Action = "health_status: running" ActionHealthStatusHealthy Action = "health_status: healthy" ActionHealthStatusUnhealthy Action = "health_status: unhealthy" ) // Actor describes something that generates events, // like a container, or a network, or a volume. // It has a defined name and a set of attributes. // The container attributes are its labels, other actors // can generate these attributes from other properties. type Actor struct { ID string Attributes map[string]string } // Message represents the information an event contains type Message struct { // Deprecated: use Action instead. // Information from JSONMessage. // With data only in container events. Status string `json:"status,omitempty"` // Deprecated: use Actor.ID instead. ID string `json:"id,omitempty"` // Deprecated: use Actor.Attributes["image"] instead. From string `json:"from,omitempty"` Type Type Action Action Actor Actor // Engine events are local scope. Cluster events are swarm scope. Scope string `json:"scope,omitempty"` Time int64 `json:"time,omitempty"` TimeNano int64 `json:"timeNano,omitempty"` } // ListOptions holds parameters to filter events with. type ListOptions struct { Since string Until string Filters filters.Args } ================================================ FILE: vendor/github.com/docker/docker/api/types/filters/errors.go ================================================ package filters import "fmt" // invalidFilter indicates that the provided filter or its value is invalid type invalidFilter struct { Filter string Value []string } func (e invalidFilter) Error() string { msg := "invalid filter" if e.Filter != "" { msg += " '" + e.Filter if e.Value != nil { msg = fmt.Sprintf("%s=%s", msg, e.Value) } msg += "'" } return msg } // InvalidParameter marks this error as ErrInvalidParameter func (e invalidFilter) InvalidParameter() {} ================================================ FILE: vendor/github.com/docker/docker/api/types/filters/filters_deprecated.go ================================================ package filters import ( "encoding/json" "github.com/docker/docker/api/types/versions" ) // ToParamWithVersion encodes Args as a JSON string. If version is less than 1.22 // then the encoded format will use an older legacy format where the values are a // list of strings, instead of a set. // // Deprecated: do not use in any new code; use ToJSON instead func ToParamWithVersion(version string, a Args) (string, error) { out, err := ToJSON(a) if out == "" || err != nil { return "", nil } if version != "" && versions.LessThan(version, "1.22") { return encodeLegacyFilters(out) } return out, nil } // encodeLegacyFilters encodes Args in the legacy format as used in API v1.21 and older. // where values are a list of strings, instead of a set. // // Don't use in any new code; use [filters.ToJSON]] instead. func encodeLegacyFilters(currentFormat string) (string, error) { // The Args.fields field is not exported, but used to marshal JSON, // so we'll marshal to the new format, then unmarshal to get the // fields, and marshal again. // // This is far from optimal, but this code is only used for deprecated // API versions, so should not be hit commonly. var argsFields map[string]map[string]bool err := json.Unmarshal([]byte(currentFormat), &argsFields) if err != nil { return "", err } buf, err := json.Marshal(convertArgsToSlice(argsFields)) if err != nil { return "", err } return string(buf), nil } func convertArgsToSlice(f map[string]map[string]bool) map[string][]string { m := map[string][]string{} for k, v := range f { values := []string{} for kk := range v { if v[kk] { values = append(values, kk) } } m[k] = values } return m } ================================================ FILE: vendor/github.com/docker/docker/api/types/filters/parse.go ================================================ /* Package filters provides tools for encoding a mapping of keys to a set of multiple values. */ package filters import ( "encoding/json" "regexp" "strings" ) // Args stores a mapping of keys to a set of multiple values. type Args struct { fields map[string]map[string]bool } // KeyValuePair are used to initialize a new Args type KeyValuePair struct { Key string Value string } // Arg creates a new KeyValuePair for initializing Args func Arg(key, value string) KeyValuePair { return KeyValuePair{Key: key, Value: value} } // NewArgs returns a new Args populated with the initial args func NewArgs(initialArgs ...KeyValuePair) Args { args := Args{fields: map[string]map[string]bool{}} for _, arg := range initialArgs { args.Add(arg.Key, arg.Value) } return args } // Keys returns all the keys in list of Args func (args Args) Keys() []string { keys := make([]string, 0, len(args.fields)) for k := range args.fields { keys = append(keys, k) } return keys } // MarshalJSON returns a JSON byte representation of the Args func (args Args) MarshalJSON() ([]byte, error) { if len(args.fields) == 0 { return []byte("{}"), nil } return json.Marshal(args.fields) } // ToJSON returns the Args as a JSON encoded string func ToJSON(a Args) (string, error) { if a.Len() == 0 { return "", nil } buf, err := json.Marshal(a) return string(buf), err } // FromJSON decodes a JSON encoded string into Args func FromJSON(p string) (Args, error) { args := NewArgs() if p == "" { return args, nil } raw := []byte(p) err := json.Unmarshal(raw, &args) if err == nil { return args, nil } // Fallback to parsing arguments in the legacy slice format deprecated := map[string][]string{} if legacyErr := json.Unmarshal(raw, &deprecated); legacyErr != nil { return args, &invalidFilter{} } args.fields = deprecatedArgs(deprecated) return args, nil } // UnmarshalJSON populates the Args from JSON encode bytes func (args Args) UnmarshalJSON(raw []byte) error { return json.Unmarshal(raw, &args.fields) } // Get returns the list of values associated with the key func (args Args) Get(key string) []string { values := args.fields[key] if values == nil { return make([]string, 0) } slice := make([]string, 0, len(values)) for key := range values { slice = append(slice, key) } return slice } // Add a new value to the set of values func (args Args) Add(key, value string) { if _, ok := args.fields[key]; ok { args.fields[key][value] = true } else { args.fields[key] = map[string]bool{value: true} } } // Del removes a value from the set func (args Args) Del(key, value string) { if _, ok := args.fields[key]; ok { delete(args.fields[key], value) if len(args.fields[key]) == 0 { delete(args.fields, key) } } } // Len returns the number of keys in the mapping func (args Args) Len() int { return len(args.fields) } // MatchKVList returns true if all the pairs in sources exist as key=value // pairs in the mapping at key, or if there are no values at key. func (args Args) MatchKVList(key string, sources map[string]string) bool { fieldValues := args.fields[key] // do not filter if there is no filter set or cannot determine filter if len(fieldValues) == 0 { return true } if len(sources) == 0 { return false } for value := range fieldValues { testK, testV, hasValue := strings.Cut(value, "=") v, ok := sources[testK] if !ok { return false } if hasValue && testV != v { return false } } return true } // Match returns true if any of the values at key match the source string func (args Args) Match(field, source string) bool { if args.ExactMatch(field, source) { return true } fieldValues := args.fields[field] for name2match := range fieldValues { match, err := regexp.MatchString(name2match, source) if err != nil { continue } if match { return true } } return false } // GetBoolOrDefault returns a boolean value of the key if the key is present // and is interpretable as a boolean value. Otherwise the default value is returned. // Error is not nil only if the filter values are not valid boolean or are conflicting. func (args Args) GetBoolOrDefault(key string, defaultValue bool) (bool, error) { fieldValues, ok := args.fields[key] if !ok { return defaultValue, nil } if len(fieldValues) == 0 { return defaultValue, &invalidFilter{key, nil} } isFalse := fieldValues["0"] || fieldValues["false"] isTrue := fieldValues["1"] || fieldValues["true"] if isFalse == isTrue { // Either no or conflicting truthy/falsy value were provided return defaultValue, &invalidFilter{key, args.Get(key)} } return isTrue, nil } // ExactMatch returns true if the source matches exactly one of the values. func (args Args) ExactMatch(key, source string) bool { fieldValues, ok := args.fields[key] // do not filter if there is no filter set or cannot determine filter if !ok || len(fieldValues) == 0 { return true } // try to match full name value to avoid O(N) regular expression matching return fieldValues[source] } // UniqueExactMatch returns true if there is only one value and the source // matches exactly the value. func (args Args) UniqueExactMatch(key, source string) bool { fieldValues := args.fields[key] // do not filter if there is no filter set or cannot determine filter if len(fieldValues) == 0 { return true } if len(args.fields[key]) != 1 { return false } // try to match full name value to avoid O(N) regular expression matching return fieldValues[source] } // FuzzyMatch returns true if the source matches exactly one value, or the // source has one of the values as a prefix. func (args Args) FuzzyMatch(key, source string) bool { if args.ExactMatch(key, source) { return true } fieldValues := args.fields[key] for prefix := range fieldValues { if strings.HasPrefix(source, prefix) { return true } } return false } // Contains returns true if the key exists in the mapping func (args Args) Contains(field string) bool { _, ok := args.fields[field] return ok } // Validate compared the set of accepted keys against the keys in the mapping. // An error is returned if any mapping keys are not in the accepted set. func (args Args) Validate(accepted map[string]bool) error { for name := range args.fields { if !accepted[name] { return &invalidFilter{name, nil} } } return nil } // WalkValues iterates over the list of values for a key in the mapping and calls // op() for each value. If op returns an error the iteration stops and the // error is returned. func (args Args) WalkValues(field string, op func(value string) error) error { if _, ok := args.fields[field]; !ok { return nil } for v := range args.fields[field] { if err := op(v); err != nil { return err } } return nil } // Clone returns a copy of args. func (args Args) Clone() (newArgs Args) { newArgs.fields = make(map[string]map[string]bool, len(args.fields)) for k, m := range args.fields { var mm map[string]bool if m != nil { mm = make(map[string]bool, len(m)) for kk, v := range m { mm[kk] = v } } newArgs.fields[k] = mm } return newArgs } func deprecatedArgs(d map[string][]string) map[string]map[string]bool { m := map[string]map[string]bool{} for k, v := range d { values := map[string]bool{} for _, vv := range v { values[vv] = true } m[k] = values } return m } ================================================ FILE: vendor/github.com/docker/docker/api/types/image/delete_response.go ================================================ package image // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command // DeleteResponse delete response // swagger:model DeleteResponse type DeleteResponse struct { // The image ID of an image that was deleted Deleted string `json:"Deleted,omitempty"` // The image ID of an image that was untagged Untagged string `json:"Untagged,omitempty"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/image/disk_usage.go ================================================ package image // DiskUsage contains disk usage for images. // // Deprecated: this type is no longer used and will be removed in the next release. type DiskUsage struct { TotalSize int64 Reclaimable int64 Items []*Summary } ================================================ FILE: vendor/github.com/docker/docker/api/types/image/image.go ================================================ package image import ( "io" "time" ) // Metadata contains engine-local data about the image. type Metadata struct { // LastTagTime is the date and time at which the image was last tagged. LastTagTime time.Time `json:",omitempty"` } // PruneReport contains the response for Engine API: // POST "/images/prune" type PruneReport struct { ImagesDeleted []DeleteResponse SpaceReclaimed uint64 } // LoadResponse returns information to the client about a load process. // // TODO(thaJeztah): remove this type, and just use an io.ReadCloser // // This type was added in https://github.com/moby/moby/pull/18878, related // to https://github.com/moby/moby/issues/19177; // // Make docker load to output json when the response content type is json // Swarm hijacks the response from docker load and returns JSON rather // than plain text like the Engine does. This makes the API library to return // information to figure that out. // // However the "load" endpoint unconditionally returns JSON; // https://github.com/moby/moby/blob/7b9d2ef6e5518a3d3f3cc418459f8df786cfbbd1/api/server/router/image/image_routes.go#L248-L255 // // PR https://github.com/moby/moby/pull/21959 made the response-type depend // on whether "quiet" was set, but this logic got changed in a follow-up // https://github.com/moby/moby/pull/25557, which made the JSON response-type // unconditionally, but the output produced depend on whether"quiet" was set. // // We should deprecated the "quiet" option, as it's really a client // responsibility. type LoadResponse struct { // Body must be closed to avoid a resource leak Body io.ReadCloser JSON bool } ================================================ FILE: vendor/github.com/docker/docker/api/types/image/image_history.go ================================================ package image // ---------------------------------------------------------------------------- // Code generated by `swagger generate operation`. DO NOT EDIT. // // See hack/generate-swagger-api.sh // ---------------------------------------------------------------------------- // HistoryResponseItem individual image layer information in response to ImageHistory operation // swagger:model HistoryResponseItem type HistoryResponseItem struct { // comment // Required: true Comment string `json:"Comment"` // created // Required: true Created int64 `json:"Created"` // created by // Required: true CreatedBy string `json:"CreatedBy"` // Id // Required: true ID string `json:"Id"` // size // Required: true Size int64 `json:"Size"` // tags // Required: true Tags []string `json:"Tags"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/image/image_inspect.go ================================================ package image import ( "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/storage" dockerspec "github.com/moby/docker-image-spec/specs-go/v1" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) // RootFS returns Image's RootFS description including the layer IDs. type RootFS struct { Type string `json:",omitempty"` Layers []string `json:",omitempty"` } // InspectResponse contains response of Engine API: // GET "/images/{name:.*}/json" type InspectResponse struct { // ID is the content-addressable ID of an image. // // This identifier is a content-addressable digest calculated from the // image's configuration (which includes the digests of layers used by // the image). // // Note that this digest differs from the `RepoDigests` below, which // holds digests of image manifests that reference the image. ID string `json:"Id"` // RepoTags is a list of image names/tags in the local image cache that // reference this image. // // Multiple image tags can refer to the same image, and this list may be // empty if no tags reference the image, in which case the image is // "untagged", in which case it can still be referenced by its ID. RepoTags []string // RepoDigests is a list of content-addressable digests of locally available // image manifests that the image is referenced from. Multiple manifests can // refer to the same image. // // These digests are usually only available if the image was either pulled // from a registry, or if the image was pushed to a registry, which is when // the manifest is generated and its digest calculated. RepoDigests []string // Parent is the ID of the parent image. // // Depending on how the image was created, this field may be empty and // is only set for images that were built/created locally. This field // is empty if the image was pulled from an image registry. // // Deprecated: this field is deprecated, and will be removed in the next release. Parent string // Comment is an optional message that can be set when committing or // importing the image. Comment string // Created is the date and time at which the image was created, formatted in // RFC 3339 nano-seconds (time.RFC3339Nano). // // This information is only available if present in the image, // and omitted otherwise. Created string `json:",omitempty"` // Container is the ID of the container that was used to create the image. // // Depending on how the image was created, this field may be empty. // // Deprecated: this field is omitted in API v1.45, but kept for backward compatibility. Container string `json:",omitempty"` // ContainerConfig is an optional field containing the configuration of the // container that was last committed when creating the image. // // Previous versions of Docker builder used this field to store build cache, // and it is not in active use anymore. // // Deprecated: this field is omitted in API v1.45, but kept for backward compatibility. ContainerConfig *container.Config `json:",omitempty"` // DockerVersion is the version of Docker that was used to build the image. // // Depending on how the image was created, this field may be empty. // // Deprecated: this field is deprecated, and will be removed in the next release. DockerVersion string // Author is the name of the author that was specified when committing the // image, or as specified through MAINTAINER (deprecated) in the Dockerfile. Author string Config *dockerspec.DockerOCIImageConfig // Architecture is the hardware CPU architecture that the image runs on. Architecture string // Variant is the CPU architecture variant (presently ARM-only). Variant string `json:",omitempty"` // OS is the Operating System the image is built to run on. Os string // OsVersion is the version of the Operating System the image is built to // run on (especially for Windows). OsVersion string `json:",omitempty"` // Size is the total size of the image including all layers it is composed of. Size int64 // VirtualSize is the total size of the image including all layers it is // composed of. // // Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead. VirtualSize int64 `json:"VirtualSize,omitempty"` // GraphDriver holds information about the storage driver used to store the // container's and image's filesystem. GraphDriver storage.DriverData // RootFS contains information about the image's RootFS, including the // layer IDs. RootFS RootFS // Metadata of the image in the local cache. // // This information is local to the daemon, and not part of the image itself. Metadata Metadata // Descriptor is the OCI descriptor of the image target. // It's only set if the daemon provides a multi-platform image store. // // WARNING: This is experimental and may change at any time without any backward // compatibility. Descriptor *ocispec.Descriptor `json:"Descriptor,omitempty"` // Manifests is a list of image manifests available in this image. It // provides a more detailed view of the platform-specific image manifests or // other image-attached data like build attestations. // // Only available if the daemon provides a multi-platform image store, the client // requests manifests AND does not request a specific platform. // // WARNING: This is experimental and may change at any time without any backward // compatibility. Manifests []ManifestSummary `json:"Manifests,omitempty"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/image/manifest.go ================================================ package image import ( "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) type ManifestKind string const ( ManifestKindImage ManifestKind = "image" ManifestKindAttestation ManifestKind = "attestation" ManifestKindUnknown ManifestKind = "unknown" ) type ManifestSummary struct { // ID is the content-addressable ID of an image and is the same as the // digest of the image manifest. // // Required: true ID string `json:"ID"` // Descriptor is the OCI descriptor of the image. // // Required: true Descriptor ocispec.Descriptor `json:"Descriptor"` // Indicates whether all the child content (image config, layers) is // fully available locally // // Required: true Available bool `json:"Available"` // Size is the size information of the content related to this manifest. // Note: These sizes only take the locally available content into account. // // Required: true Size struct { // Content is the size (in bytes) of all the locally present // content in the content store (e.g. image config, layers) // referenced by this manifest and its children. // This only includes blobs in the content store. Content int64 `json:"Content"` // Total is the total size (in bytes) of all the locally present // data (both distributable and non-distributable) that's related to // this manifest and its children. // This equal to the sum of [Content] size AND all the sizes in the // [Size] struct present in the Kind-specific data struct. // For example, for an image kind (Kind == ManifestKindImage), // this would include the size of the image content and unpacked // image snapshots ([Size.Content] + [ImageData.Size.Unpacked]). Total int64 `json:"Total"` } `json:"Size"` // Kind is the kind of the image manifest. // // Required: true Kind ManifestKind `json:"Kind"` // Fields below are specific to the kind of the image manifest. // Present only if Kind == ManifestKindImage. ImageData *ImageProperties `json:"ImageData,omitempty"` // Present only if Kind == ManifestKindAttestation. AttestationData *AttestationProperties `json:"AttestationData,omitempty"` } type ImageProperties struct { // Platform is the OCI platform object describing the platform of the image. // // Required: true Platform ocispec.Platform `json:"Platform"` Size struct { // Unpacked is the size (in bytes) of the locally unpacked // (uncompressed) image content that's directly usable by the containers // running this image. // It's independent of the distributable content - e.g. // the image might still have an unpacked data that's still used by // some container even when the distributable/compressed content is // already gone. // // Required: true Unpacked int64 `json:"Unpacked"` } // Containers is an array containing the IDs of the containers that are // using this image. // // Required: true Containers []string `json:"Containers"` } type AttestationProperties struct { // For is the digest of the image manifest that this attestation is for. For digest.Digest `json:"For"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/image/opts.go ================================================ package image import ( "context" "io" "github.com/docker/docker/api/types/filters" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) // ImportSource holds source information for ImageImport type ImportSource struct { Source io.Reader // Source is the data to send to the server to create this image from. You must set SourceName to "-" to leverage this. SourceName string // SourceName is the name of the image to pull. Set to "-" to leverage the Source attribute. } // ImportOptions holds information to import images from the client host. type ImportOptions struct { Tag string // Tag is the name to tag this image with. This attribute is deprecated. Message string // Message is the message to tag the image with Changes []string // Changes are the raw changes to apply to this image Platform string // Platform is the target platform of the image } // CreateOptions holds information to create images. type CreateOptions struct { RegistryAuth string // RegistryAuth is the base64 encoded credentials for the registry. Platform string // Platform is the target platform of the image if it needs to be pulled from the registry. } // PullOptions holds information to pull images. type PullOptions struct { All bool RegistryAuth string // RegistryAuth is the base64 encoded credentials for the registry // PrivilegeFunc is a function that clients can supply to retry operations // after getting an authorization error. This function returns the registry // authentication header value in base64 encoded format, or an error if the // privilege request fails. // // For details, refer to [github.com/docker/docker/api/types/registry.RequestAuthConfig]. PrivilegeFunc func(context.Context) (string, error) Platform string } // PushOptions holds information to push images. type PushOptions struct { All bool RegistryAuth string // RegistryAuth is the base64 encoded credentials for the registry // PrivilegeFunc is a function that clients can supply to retry operations // after getting an authorization error. This function returns the registry // authentication header value in base64 encoded format, or an error if the // privilege request fails. // // For details, refer to [github.com/docker/docker/api/types/registry.RequestAuthConfig]. PrivilegeFunc func(context.Context) (string, error) // Platform is an optional field that selects a specific platform to push // when the image is a multi-platform image. // Using this will only push a single platform-specific manifest. Platform *ocispec.Platform `json:",omitempty"` } // ListOptions holds parameters to list images with. type ListOptions struct { // All controls whether all images in the graph are filtered, or just // the heads. All bool // Filters is a JSON-encoded set of filter arguments. Filters filters.Args // SharedSize indicates whether the shared size of images should be computed. SharedSize bool // ContainerCount indicates whether container count should be computed. // // Deprecated: This field has been unused and is no longer required and will be removed in a future version. ContainerCount bool // Manifests indicates whether the image manifests should be returned. Manifests bool } // RemoveOptions holds parameters to remove images. type RemoveOptions struct { Platforms []ocispec.Platform Force bool PruneChildren bool } // HistoryOptions holds parameters to get image history. type HistoryOptions struct { // Platform from the manifest list to use for history. Platform *ocispec.Platform } // LoadOptions holds parameters to load images. type LoadOptions struct { // Quiet suppresses progress output Quiet bool // Platforms selects the platforms to load if the image is a // multi-platform image and has multiple variants. Platforms []ocispec.Platform } type InspectOptions struct { // Manifests returns the image manifests. Manifests bool // Platform selects the specific platform of a multi-platform image to inspect. // // This option is only available for API version 1.49 and up. Platform *ocispec.Platform } // SaveOptions holds parameters to save images. type SaveOptions struct { // Platforms selects the platforms to save if the image is a // multi-platform image and has multiple variants. Platforms []ocispec.Platform } ================================================ FILE: vendor/github.com/docker/docker/api/types/image/summary.go ================================================ package image import ocispec "github.com/opencontainers/image-spec/specs-go/v1" type Summary struct { // Number of containers using this image. Includes both stopped and running // containers. // // This size is not calculated by default, and depends on which API endpoint // is used. `-1` indicates that the value has not been set / calculated. // // Required: true Containers int64 `json:"Containers"` // Date and time at which the image was created as a Unix timestamp // (number of seconds since EPOCH). // // Required: true Created int64 `json:"Created"` // ID is the content-addressable ID of an image. // // This identifier is a content-addressable digest calculated from the // image's configuration (which includes the digests of layers used by // the image). // // Note that this digest differs from the `RepoDigests` below, which // holds digests of image manifests that reference the image. // // Required: true ID string `json:"Id"` // User-defined key/value metadata. // Required: true Labels map[string]string `json:"Labels"` // ID of the parent image. // // Depending on how the image was created, this field may be empty and // is only set for images that were built/created locally. This field // is empty if the image was pulled from an image registry. // // Required: true ParentID string `json:"ParentId"` // Descriptor is the OCI descriptor of the image target. // It's only set if the daemon provides a multi-platform image store. // // WARNING: This is experimental and may change at any time without any backward // compatibility. Descriptor *ocispec.Descriptor `json:"Descriptor,omitempty"` // Manifests is a list of image manifests available in this image. It // provides a more detailed view of the platform-specific image manifests or // other image-attached data like build attestations. // // WARNING: This is experimental and may change at any time without any backward // compatibility. Manifests []ManifestSummary `json:"Manifests,omitempty"` // List of content-addressable digests of locally available image manifests // that the image is referenced from. Multiple manifests can refer to the // same image. // // These digests are usually only available if the image was either pulled // from a registry, or if the image was pushed to a registry, which is when // the manifest is generated and its digest calculated. // // Required: true RepoDigests []string `json:"RepoDigests"` // List of image names/tags in the local image cache that reference this // image. // // Multiple image tags can refer to the same image, and this list may be // empty if no tags reference the image, in which case the image is // "untagged", in which case it can still be referenced by its ID. // // Required: true RepoTags []string `json:"RepoTags"` // Total size of image layers that are shared between this image and other // images. // // This size is not calculated by default. `-1` indicates that the value // has not been set / calculated. // // Required: true SharedSize int64 `json:"SharedSize"` // Total size of the image including all layers it is composed of. // // Required: true Size int64 `json:"Size"` // Total size of the image including all layers it is composed of. // // Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead. VirtualSize int64 `json:"VirtualSize,omitempty"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/mount/mount.go ================================================ package mount import ( "os" ) // Type represents the type of a mount. type Type string // Type constants const ( // TypeBind is the type for mounting host dir TypeBind Type = "bind" // TypeVolume is the type for remote storage volumes TypeVolume Type = "volume" // TypeTmpfs is the type for mounting tmpfs TypeTmpfs Type = "tmpfs" // TypeNamedPipe is the type for mounting Windows named pipes TypeNamedPipe Type = "npipe" // TypeCluster is the type for Swarm Cluster Volumes. TypeCluster Type = "cluster" // TypeImage is the type for mounting another image's filesystem TypeImage Type = "image" ) // Mount represents a mount (volume). type Mount struct { Type Type `json:",omitempty"` // Source specifies the name of the mount. Depending on mount type, this // may be a volume name or a host path, or even ignored. // Source is not supported for tmpfs (must be an empty value) Source string `json:",omitempty"` Target string `json:",omitempty"` ReadOnly bool `json:",omitempty"` // attempts recursive read-only if possible Consistency Consistency `json:",omitempty"` BindOptions *BindOptions `json:",omitempty"` VolumeOptions *VolumeOptions `json:",omitempty"` ImageOptions *ImageOptions `json:",omitempty"` TmpfsOptions *TmpfsOptions `json:",omitempty"` ClusterOptions *ClusterOptions `json:",omitempty"` } // Propagation represents the propagation of a mount. type Propagation string const ( // PropagationRPrivate RPRIVATE PropagationRPrivate Propagation = "rprivate" // PropagationPrivate PRIVATE PropagationPrivate Propagation = "private" // PropagationRShared RSHARED PropagationRShared Propagation = "rshared" // PropagationShared SHARED PropagationShared Propagation = "shared" // PropagationRSlave RSLAVE PropagationRSlave Propagation = "rslave" // PropagationSlave SLAVE PropagationSlave Propagation = "slave" ) // Propagations is the list of all valid mount propagations var Propagations = []Propagation{ PropagationRPrivate, PropagationPrivate, PropagationRShared, PropagationShared, PropagationRSlave, PropagationSlave, } // Consistency represents the consistency requirements of a mount. type Consistency string const ( // ConsistencyFull guarantees bind mount-like consistency ConsistencyFull Consistency = "consistent" // ConsistencyCached mounts can cache read data and FS structure ConsistencyCached Consistency = "cached" // ConsistencyDelegated mounts can cache read and written data and structure ConsistencyDelegated Consistency = "delegated" // ConsistencyDefault provides "consistent" behavior unless overridden ConsistencyDefault Consistency = "default" ) // BindOptions defines options specific to mounts of type "bind". type BindOptions struct { Propagation Propagation `json:",omitempty"` NonRecursive bool `json:",omitempty"` CreateMountpoint bool `json:",omitempty"` // ReadOnlyNonRecursive makes the mount non-recursively read-only, but still leaves the mount recursive // (unless NonRecursive is set to true in conjunction). ReadOnlyNonRecursive bool `json:",omitempty"` // ReadOnlyForceRecursive raises an error if the mount cannot be made recursively read-only. ReadOnlyForceRecursive bool `json:",omitempty"` } // VolumeOptions represents the options for a mount of type volume. type VolumeOptions struct { NoCopy bool `json:",omitempty"` Labels map[string]string `json:",omitempty"` Subpath string `json:",omitempty"` DriverConfig *Driver `json:",omitempty"` } type ImageOptions struct { Subpath string `json:",omitempty"` } // Driver represents a volume driver. type Driver struct { Name string `json:",omitempty"` Options map[string]string `json:",omitempty"` } // TmpfsOptions defines options specific to mounts of type "tmpfs". type TmpfsOptions struct { // Size sets the size of the tmpfs, in bytes. // // This will be converted to an operating system specific value // depending on the host. For example, on linux, it will be converted to // use a 'k', 'm' or 'g' syntax. BSD, though not widely supported with // docker, uses a straight byte value. // // Percentages are not supported. SizeBytes int64 `json:",omitempty"` // Mode of the tmpfs upon creation Mode os.FileMode `json:",omitempty"` // Options to be passed to the tmpfs mount. An array of arrays. Flag // options should be provided as 1-length arrays. Other types should be // provided as 2-length arrays, where the first item is the key and the // second the value. Options [][]string `json:",omitempty"` // TODO(stevvooe): There are several more tmpfs flags, specified in the // daemon, that are accepted. Only the most basic are added for now. // // From https://github.com/moby/sys/blob/mount/v0.1.1/mount/flags.go#L47-L56 // // var validFlags = map[string]bool{ // "": true, // "size": true, X // "mode": true, X // "uid": true, // "gid": true, // "nr_inodes": true, // "nr_blocks": true, // "mpol": true, // } // // Some of these may be straightforward to add, but others, such as // uid/gid have implications in a clustered system. } // ClusterOptions specifies options for a Cluster volume. type ClusterOptions struct { // intentionally empty } ================================================ FILE: vendor/github.com/docker/docker/api/types/network/create_response.go ================================================ package network // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command // CreateResponse NetworkCreateResponse // // OK response to NetworkCreate operation // swagger:model CreateResponse type CreateResponse struct { // The ID of the created network. // Required: true ID string `json:"Id"` // Warnings encountered when creating the container // Required: true Warning string `json:"Warning"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/network/endpoint.go ================================================ package network import ( "errors" "fmt" "net" ) // EndpointSettings stores the network endpoint details type EndpointSettings struct { // Configurations IPAMConfig *EndpointIPAMConfig Links []string Aliases []string // Aliases holds the list of extra, user-specified DNS names for this endpoint. // MacAddress may be used to specify a MAC address when the container is created. // Once the container is running, it becomes operational data (it may contain a // generated address). MacAddress string DriverOpts map[string]string // GwPriority determines which endpoint will provide the default gateway // for the container. The endpoint with the highest priority will be used. // If multiple endpoints have the same priority, they are lexicographically // sorted based on their network name, and the one that sorts first is picked. GwPriority int // Operational data NetworkID string EndpointID string Gateway string IPAddress string IPPrefixLen int IPv6Gateway string GlobalIPv6Address string GlobalIPv6PrefixLen int // DNSNames holds all the (non fully qualified) DNS names associated to this endpoint. First entry is used to // generate PTR records. DNSNames []string } // Copy makes a deep copy of `EndpointSettings` func (es *EndpointSettings) Copy() *EndpointSettings { epCopy := *es if es.IPAMConfig != nil { epCopy.IPAMConfig = es.IPAMConfig.Copy() } if es.Links != nil { links := make([]string, 0, len(es.Links)) epCopy.Links = append(links, es.Links...) } if es.Aliases != nil { aliases := make([]string, 0, len(es.Aliases)) epCopy.Aliases = append(aliases, es.Aliases...) } if len(es.DNSNames) > 0 { epCopy.DNSNames = make([]string, len(es.DNSNames)) copy(epCopy.DNSNames, es.DNSNames) } return &epCopy } // EndpointIPAMConfig represents IPAM configurations for the endpoint type EndpointIPAMConfig struct { IPv4Address string `json:",omitempty"` IPv6Address string `json:",omitempty"` LinkLocalIPs []string `json:",omitempty"` } // Copy makes a copy of the endpoint ipam config func (cfg *EndpointIPAMConfig) Copy() *EndpointIPAMConfig { cfgCopy := *cfg cfgCopy.LinkLocalIPs = make([]string, 0, len(cfg.LinkLocalIPs)) cfgCopy.LinkLocalIPs = append(cfgCopy.LinkLocalIPs, cfg.LinkLocalIPs...) return &cfgCopy } // NetworkSubnet describes a user-defined subnet for a specific network. It's only used to validate if an // EndpointIPAMConfig is valid for a specific network. type NetworkSubnet interface { // Contains checks whether the NetworkSubnet contains [addr]. Contains(addr net.IP) bool // IsStatic checks whether the subnet was statically allocated (ie. user-defined). IsStatic() bool } // IsInRange checks whether static IP addresses are valid in a specific network. func (cfg *EndpointIPAMConfig) IsInRange(v4Subnets []NetworkSubnet, v6Subnets []NetworkSubnet) error { var errs []error if err := validateEndpointIPAddress(cfg.IPv4Address, v4Subnets); err != nil { errs = append(errs, err) } if err := validateEndpointIPAddress(cfg.IPv6Address, v6Subnets); err != nil { errs = append(errs, err) } return errJoin(errs...) } func validateEndpointIPAddress(epAddr string, ipamSubnets []NetworkSubnet) error { if epAddr == "" { return nil } var staticSubnet bool parsedAddr := net.ParseIP(epAddr) for _, subnet := range ipamSubnets { if subnet.IsStatic() { staticSubnet = true if subnet.Contains(parsedAddr) { return nil } } } if staticSubnet { return fmt.Errorf("no configured subnet or ip-range contain the IP address %s", epAddr) } return errors.New("user specified IP address is supported only when connecting to networks with user configured subnets") } // Validate checks whether cfg is valid. func (cfg *EndpointIPAMConfig) Validate() error { if cfg == nil { return nil } var errs []error if cfg.IPv4Address != "" { if addr := net.ParseIP(cfg.IPv4Address); addr == nil || addr.To4() == nil || addr.IsUnspecified() { errs = append(errs, fmt.Errorf("invalid IPv4 address: %s", cfg.IPv4Address)) } } if cfg.IPv6Address != "" { if addr := net.ParseIP(cfg.IPv6Address); addr == nil || addr.To4() != nil || addr.IsUnspecified() { errs = append(errs, fmt.Errorf("invalid IPv6 address: %s", cfg.IPv6Address)) } } for _, addr := range cfg.LinkLocalIPs { if parsed := net.ParseIP(addr); parsed == nil || parsed.IsUnspecified() { errs = append(errs, fmt.Errorf("invalid link-local IP address: %s", addr)) } } return errJoin(errs...) } ================================================ FILE: vendor/github.com/docker/docker/api/types/network/ipam.go ================================================ package network import ( "errors" "fmt" "net/netip" "strings" ) // IPAM represents IP Address Management type IPAM struct { Driver string Options map[string]string // Per network IPAM driver options Config []IPAMConfig } // IPAMConfig represents IPAM configurations type IPAMConfig struct { Subnet string `json:",omitempty"` IPRange string `json:",omitempty"` Gateway string `json:",omitempty"` AuxAddress map[string]string `json:"AuxiliaryAddresses,omitempty"` } type ipFamily string const ( ip4 ipFamily = "IPv4" ip6 ipFamily = "IPv6" ) // ValidateIPAM checks whether the network's IPAM passed as argument is valid. It returns a joinError of the list of // errors found. func ValidateIPAM(ipam *IPAM, enableIPv6 bool) error { if ipam == nil { return nil } var errs []error for _, cfg := range ipam.Config { subnet, err := netip.ParsePrefix(cfg.Subnet) if err != nil { errs = append(errs, fmt.Errorf("invalid subnet %s: invalid CIDR block notation", cfg.Subnet)) continue } subnetFamily := ip4 if subnet.Addr().Is6() { subnetFamily = ip6 } if !enableIPv6 && subnetFamily == ip6 { continue } if subnet != subnet.Masked() { errs = append(errs, fmt.Errorf("invalid subnet %s: it should be %s", subnet, subnet.Masked())) } if ipRangeErrs := validateIPRange(cfg.IPRange, subnet, subnetFamily); len(ipRangeErrs) > 0 { errs = append(errs, ipRangeErrs...) } if err := validateAddress(cfg.Gateway, subnet, subnetFamily); err != nil { errs = append(errs, fmt.Errorf("invalid gateway %s: %w", cfg.Gateway, err)) } for auxName, aux := range cfg.AuxAddress { if err := validateAddress(aux, subnet, subnetFamily); err != nil { errs = append(errs, fmt.Errorf("invalid auxiliary address %s: %w", auxName, err)) } } } if err := errJoin(errs...); err != nil { return fmt.Errorf("invalid network config:\n%w", err) } return nil } func validateIPRange(ipRange string, subnet netip.Prefix, subnetFamily ipFamily) []error { if ipRange == "" { return nil } prefix, err := netip.ParsePrefix(ipRange) if err != nil { return []error{fmt.Errorf("invalid ip-range %s: invalid CIDR block notation", ipRange)} } family := ip4 if prefix.Addr().Is6() { family = ip6 } if family != subnetFamily { return []error{fmt.Errorf("invalid ip-range %s: parent subnet is an %s block", ipRange, subnetFamily)} } var errs []error if prefix.Bits() < subnet.Bits() { errs = append(errs, fmt.Errorf("invalid ip-range %s: CIDR block is bigger than its parent subnet %s", ipRange, subnet)) } if prefix != prefix.Masked() { errs = append(errs, fmt.Errorf("invalid ip-range %s: it should be %s", prefix, prefix.Masked())) } if !subnet.Overlaps(prefix) { errs = append(errs, fmt.Errorf("invalid ip-range %s: parent subnet %s doesn't contain ip-range", ipRange, subnet)) } return errs } func validateAddress(address string, subnet netip.Prefix, subnetFamily ipFamily) error { if address == "" { return nil } addr, err := netip.ParseAddr(address) if err != nil { return errors.New("invalid address") } family := ip4 if addr.Is6() { family = ip6 } if family != subnetFamily { return fmt.Errorf("parent subnet is an %s block", subnetFamily) } if !subnet.Contains(addr) { return fmt.Errorf("parent subnet %s doesn't contain this address", subnet) } return nil } func errJoin(errs ...error) error { n := 0 for _, err := range errs { if err != nil { n++ } } if n == 0 { return nil } e := &joinError{ errs: make([]error, 0, n), } for _, err := range errs { if err != nil { e.errs = append(e.errs, err) } } return e } type joinError struct { errs []error } func (e *joinError) Error() string { if len(e.errs) == 1 { return strings.TrimSpace(e.errs[0].Error()) } stringErrs := make([]string, 0, len(e.errs)) for _, subErr := range e.errs { stringErrs = append(stringErrs, strings.ReplaceAll(subErr.Error(), "\n", "\n\t")) } return "* " + strings.Join(stringErrs, "\n* ") } func (e *joinError) Unwrap() []error { return e.errs } ================================================ FILE: vendor/github.com/docker/docker/api/types/network/network.go ================================================ package network import ( "time" "github.com/docker/docker/api/types/filters" ) const ( // NetworkDefault is a platform-independent alias to choose the platform-specific default network stack. NetworkDefault = "default" // NetworkHost is the name of the predefined network used when the NetworkMode host is selected (only available on Linux) NetworkHost = "host" // NetworkNone is the name of the predefined network used when the NetworkMode none is selected (available on both Linux and Windows) NetworkNone = "none" // NetworkBridge is the name of the default network on Linux NetworkBridge = "bridge" // NetworkNat is the name of the default network on Windows NetworkNat = "nat" ) // CreateRequest is the request message sent to the server for network create call. type CreateRequest struct { CreateOptions Name string // Name is the requested name of the network. // Deprecated: CheckDuplicate is deprecated since API v1.44, but it defaults to true when sent by the client // package to older daemons. CheckDuplicate *bool `json:",omitempty"` } // CreateOptions holds options to create a network. type CreateOptions struct { Driver string // Driver is the driver-name used to create the network (e.g. `bridge`, `overlay`) Scope string // Scope describes the level at which the network exists (e.g. `swarm` for cluster-wide or `local` for machine level). EnableIPv4 *bool `json:",omitempty"` // EnableIPv4 represents whether to enable IPv4. EnableIPv6 *bool `json:",omitempty"` // EnableIPv6 represents whether to enable IPv6. IPAM *IPAM // IPAM is the network's IP Address Management. Internal bool // Internal represents if the network is used internal only. Attachable bool // Attachable represents if the global scope is manually attachable by regular containers from workers in swarm mode. Ingress bool // Ingress indicates the network is providing the routing-mesh for the swarm cluster. ConfigOnly bool // ConfigOnly creates a config-only network. Config-only networks are place-holder networks for network configurations to be used by other networks. ConfigOnly networks cannot be used directly to run containers or services. ConfigFrom *ConfigReference // ConfigFrom specifies the source which will provide the configuration for this network. The specified network must be a config-only network; see [CreateOptions.ConfigOnly]. Options map[string]string // Options specifies the network-specific options to use for when creating the network. Labels map[string]string // Labels holds metadata specific to the network being created. } // ListOptions holds parameters to filter the list of networks with. type ListOptions struct { Filters filters.Args } // InspectOptions holds parameters to inspect network. type InspectOptions struct { Scope string Verbose bool } // ConnectOptions represents the data to be used to connect a container to the // network. type ConnectOptions struct { Container string EndpointConfig *EndpointSettings `json:",omitempty"` } // DisconnectOptions represents the data to be used to disconnect a container // from the network. type DisconnectOptions struct { Container string Force bool } // Inspect is the body of the "get network" http response message. type Inspect struct { Name string // Name is the name of the network ID string `json:"Id"` // ID uniquely identifies a network on a single machine Created time.Time // Created is the time the network created Scope string // Scope describes the level at which the network exists (e.g. `swarm` for cluster-wide or `local` for machine level) Driver string // Driver is the Driver name used to create the network (e.g. `bridge`, `overlay`) EnableIPv4 bool // EnableIPv4 represents whether IPv4 is enabled EnableIPv6 bool // EnableIPv6 represents whether IPv6 is enabled IPAM IPAM // IPAM is the network's IP Address Management Internal bool // Internal represents if the network is used internal only Attachable bool // Attachable represents if the global scope is manually attachable by regular containers from workers in swarm mode. Ingress bool // Ingress indicates the network is providing the routing-mesh for the swarm cluster. ConfigFrom ConfigReference // ConfigFrom specifies the source which will provide the configuration for this network. ConfigOnly bool // ConfigOnly networks are place-holder networks for network configurations to be used by other networks. ConfigOnly networks cannot be used directly to run containers or services. Containers map[string]EndpointResource // Containers contains endpoints belonging to the network Options map[string]string // Options holds the network specific options to use for when creating the network Labels map[string]string // Labels holds metadata specific to the network being created Peers []PeerInfo `json:",omitempty"` // List of peer nodes for an overlay network Services map[string]ServiceInfo `json:",omitempty"` } // Summary is used as response when listing networks. It currently is an alias // for [Inspect], but may diverge in the future, as not all information may // be included when listing networks. type Summary = Inspect // Address represents an IP address type Address struct { Addr string PrefixLen int } // PeerInfo represents one peer of an overlay network type PeerInfo struct { Name string IP string } // Task carries the information about one backend task type Task struct { Name string EndpointID string EndpointIP string Info map[string]string } // ServiceInfo represents service parameters with the list of service's tasks type ServiceInfo struct { VIP string Ports []string LocalLBIndex int Tasks []Task } // EndpointResource contains network resources allocated and used for a // container in a network. type EndpointResource struct { Name string EndpointID string MacAddress string IPv4Address string IPv6Address string } // NetworkingConfig represents the container's networking configuration for each of its interfaces // Carries the networking configs specified in the `docker run` and `docker network connect` commands type NetworkingConfig struct { EndpointsConfig map[string]*EndpointSettings // Endpoint configs for each connecting network } // ConfigReference specifies the source which provides a network's configuration type ConfigReference struct { Network string } var acceptedFilters = map[string]bool{ "dangling": true, "driver": true, "id": true, "label": true, "name": true, "scope": true, "type": true, } // ValidateFilters validates the list of filter args with the available filters. func ValidateFilters(filter filters.Args) error { return filter.Validate(acceptedFilters) } // PruneReport contains the response for Engine API: // POST "/networks/prune" type PruneReport struct { NetworksDeleted []string } ================================================ FILE: vendor/github.com/docker/docker/api/types/plugin.go ================================================ package types // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command // Plugin A plugin for the Engine API // swagger:model Plugin type Plugin struct { // config // Required: true Config PluginConfig `json:"Config"` // True if the plugin is running. False if the plugin is not running, only installed. // Required: true Enabled bool `json:"Enabled"` // Id ID string `json:"Id,omitempty"` // name // Required: true Name string `json:"Name"` // plugin remote reference used to push/pull the plugin PluginReference string `json:"PluginReference,omitempty"` // settings // Required: true Settings PluginSettings `json:"Settings"` } // PluginConfig The config of a plugin. // swagger:model PluginConfig type PluginConfig struct { // args // Required: true Args PluginConfigArgs `json:"Args"` // description // Required: true Description string `json:"Description"` // Docker Version used to create the plugin. // // Depending on how the plugin was created, this field may be empty or omitted. // // Deprecated: this field is no longer set, and will be removed in the next API version. DockerVersion string `json:"DockerVersion,omitempty"` // documentation // Required: true Documentation string `json:"Documentation"` // entrypoint // Required: true Entrypoint []string `json:"Entrypoint"` // env // Required: true Env []PluginEnv `json:"Env"` // interface // Required: true Interface PluginConfigInterface `json:"Interface"` // ipc host // Required: true IpcHost bool `json:"IpcHost"` // linux // Required: true Linux PluginConfigLinux `json:"Linux"` // mounts // Required: true Mounts []PluginMount `json:"Mounts"` // network // Required: true Network PluginConfigNetwork `json:"Network"` // pid host // Required: true PidHost bool `json:"PidHost"` // propagated mount // Required: true PropagatedMount string `json:"PropagatedMount"` // user User PluginConfigUser `json:"User,omitempty"` // work dir // Required: true WorkDir string `json:"WorkDir"` // rootfs Rootfs *PluginConfigRootfs `json:"rootfs,omitempty"` } // PluginConfigArgs plugin config args // swagger:model PluginConfigArgs type PluginConfigArgs struct { // description // Required: true Description string `json:"Description"` // name // Required: true Name string `json:"Name"` // settable // Required: true Settable []string `json:"Settable"` // value // Required: true Value []string `json:"Value"` } // PluginConfigInterface The interface between Docker and the plugin // swagger:model PluginConfigInterface type PluginConfigInterface struct { // Protocol to use for clients connecting to the plugin. ProtocolScheme string `json:"ProtocolScheme,omitempty"` // socket // Required: true Socket string `json:"Socket"` // types // Required: true Types []PluginInterfaceType `json:"Types"` } // PluginConfigLinux plugin config linux // swagger:model PluginConfigLinux type PluginConfigLinux struct { // allow all devices // Required: true AllowAllDevices bool `json:"AllowAllDevices"` // capabilities // Required: true Capabilities []string `json:"Capabilities"` // devices // Required: true Devices []PluginDevice `json:"Devices"` } // PluginConfigNetwork plugin config network // swagger:model PluginConfigNetwork type PluginConfigNetwork struct { // type // Required: true Type string `json:"Type"` } // PluginConfigRootfs plugin config rootfs // swagger:model PluginConfigRootfs type PluginConfigRootfs struct { // diff ids DiffIds []string `json:"diff_ids"` // type Type string `json:"type,omitempty"` } // PluginConfigUser plugin config user // swagger:model PluginConfigUser type PluginConfigUser struct { // g ID GID uint32 `json:"GID,omitempty"` // UID UID uint32 `json:"UID,omitempty"` } // PluginSettings Settings that can be modified by users. // swagger:model PluginSettings type PluginSettings struct { // args // Required: true Args []string `json:"Args"` // devices // Required: true Devices []PluginDevice `json:"Devices"` // env // Required: true Env []string `json:"Env"` // mounts // Required: true Mounts []PluginMount `json:"Mounts"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/plugin_device.go ================================================ package types // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command // PluginDevice plugin device // swagger:model PluginDevice type PluginDevice struct { // description // Required: true Description string `json:"Description"` // name // Required: true Name string `json:"Name"` // path // Required: true Path *string `json:"Path"` // settable // Required: true Settable []string `json:"Settable"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/plugin_env.go ================================================ package types // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command // PluginEnv plugin env // swagger:model PluginEnv type PluginEnv struct { // description // Required: true Description string `json:"Description"` // name // Required: true Name string `json:"Name"` // settable // Required: true Settable []string `json:"Settable"` // value // Required: true Value *string `json:"Value"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/plugin_interface_type.go ================================================ package types // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command // PluginInterfaceType plugin interface type // swagger:model PluginInterfaceType type PluginInterfaceType struct { // capability // Required: true Capability string `json:"Capability"` // prefix // Required: true Prefix string `json:"Prefix"` // version // Required: true Version string `json:"Version"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/plugin_mount.go ================================================ package types // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command // PluginMount plugin mount // swagger:model PluginMount type PluginMount struct { // description // Required: true Description string `json:"Description"` // destination // Required: true Destination string `json:"Destination"` // name // Required: true Name string `json:"Name"` // options // Required: true Options []string `json:"Options"` // settable // Required: true Settable []string `json:"Settable"` // source // Required: true Source *string `json:"Source"` // type // Required: true Type string `json:"Type"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/plugin_responses.go ================================================ package types import ( "encoding/json" "fmt" "sort" ) // PluginsListResponse contains the response for the Engine API type PluginsListResponse []*Plugin // UnmarshalJSON implements json.Unmarshaler for PluginInterfaceType func (t *PluginInterfaceType) UnmarshalJSON(p []byte) error { versionIndex := len(p) prefixIndex := 0 if len(p) < 2 || p[0] != '"' || p[len(p)-1] != '"' { return fmt.Errorf("%q is not a plugin interface type", p) } p = p[1 : len(p)-1] loop: for i, b := range p { switch b { case '.': prefixIndex = i case '/': versionIndex = i break loop } } t.Prefix = string(p[:prefixIndex]) t.Capability = string(p[prefixIndex+1 : versionIndex]) if versionIndex < len(p) { t.Version = string(p[versionIndex+1:]) } return nil } // MarshalJSON implements json.Marshaler for PluginInterfaceType func (t *PluginInterfaceType) MarshalJSON() ([]byte, error) { return json.Marshal(t.String()) } // String implements fmt.Stringer for PluginInterfaceType func (t PluginInterfaceType) String() string { return fmt.Sprintf("%s.%s/%s", t.Prefix, t.Capability, t.Version) } // PluginPrivilege describes a permission the user has to accept // upon installing a plugin. type PluginPrivilege struct { Name string Description string Value []string } // PluginPrivileges is a list of PluginPrivilege type PluginPrivileges []PluginPrivilege func (s PluginPrivileges) Len() int { return len(s) } func (s PluginPrivileges) Less(i, j int) bool { return s[i].Name < s[j].Name } func (s PluginPrivileges) Swap(i, j int) { sort.Strings(s[i].Value) sort.Strings(s[j].Value) s[i], s[j] = s[j], s[i] } ================================================ FILE: vendor/github.com/docker/docker/api/types/registry/authconfig.go ================================================ package registry import ( "context" "encoding/base64" "encoding/json" "fmt" "io" "strings" ) // AuthHeader is the name of the header used to send encoded registry // authorization credentials for registry operations (push/pull). const AuthHeader = "X-Registry-Auth" // RequestAuthConfig is a function interface that clients can supply // to retry operations after getting an authorization error. // // The function must return the [AuthHeader] value ([AuthConfig]), encoded // in base64url format ([RFC4648, section 5]), which can be decoded by // [DecodeAuthConfig]. // // It must return an error if the privilege request fails. // // [RFC4648, section 5]: https://tools.ietf.org/html/rfc4648#section-5 type RequestAuthConfig func(context.Context) (string, error) // AuthConfig contains authorization information for connecting to a Registry. type AuthConfig struct { Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` Auth string `json:"auth,omitempty"` // Email is an optional value associated with the username. // // Deprecated: This field is deprecated since docker 1.11 (API v1.23) and will be removed in the next release. Email string `json:"email,omitempty"` ServerAddress string `json:"serveraddress,omitempty"` // IdentityToken is used to authenticate the user and get // an access token for the registry. IdentityToken string `json:"identitytoken,omitempty"` // RegistryToken is a bearer token to be sent to a registry RegistryToken string `json:"registrytoken,omitempty"` } // EncodeAuthConfig serializes the auth configuration as a base64url encoded // ([RFC4648, section 5]) JSON string for sending through the X-Registry-Auth header. // // [RFC4648, section 5]: https://tools.ietf.org/html/rfc4648#section-5 func EncodeAuthConfig(authConfig AuthConfig) (string, error) { buf, err := json.Marshal(authConfig) if err != nil { return "", errInvalidParameter{err} } return base64.URLEncoding.EncodeToString(buf), nil } // DecodeAuthConfig decodes base64url encoded ([RFC4648, section 5]) JSON // authentication information as sent through the X-Registry-Auth header. // // This function always returns an [AuthConfig], even if an error occurs. It is up // to the caller to decide if authentication is required, and if the error can // be ignored. // // [RFC4648, section 5]: https://tools.ietf.org/html/rfc4648#section-5 func DecodeAuthConfig(authEncoded string) (*AuthConfig, error) { if authEncoded == "" { return &AuthConfig{}, nil } authJSON := base64.NewDecoder(base64.URLEncoding, strings.NewReader(authEncoded)) return decodeAuthConfigFromReader(authJSON) } // DecodeAuthConfigBody decodes authentication information as sent as JSON in the // body of a request. This function is to provide backward compatibility with old // clients and API versions. Current clients and API versions expect authentication // to be provided through the X-Registry-Auth header. // // Like [DecodeAuthConfig], this function always returns an [AuthConfig], even if an // error occurs. It is up to the caller to decide if authentication is required, // and if the error can be ignored. // // Deprecated: this function is no longer used and will be removed in the next release. func DecodeAuthConfigBody(rdr io.ReadCloser) (*AuthConfig, error) { return decodeAuthConfigFromReader(rdr) } func decodeAuthConfigFromReader(rdr io.Reader) (*AuthConfig, error) { authConfig := &AuthConfig{} if err := json.NewDecoder(rdr).Decode(authConfig); err != nil { // always return an (empty) AuthConfig to increase compatibility with // the existing API. return &AuthConfig{}, invalid(err) } return authConfig, nil } func invalid(err error) error { return errInvalidParameter{fmt.Errorf("invalid X-Registry-Auth header: %w", err)} } type errInvalidParameter struct{ error } func (errInvalidParameter) InvalidParameter() {} func (e errInvalidParameter) Cause() error { return e.error } func (e errInvalidParameter) Unwrap() error { return e.error } ================================================ FILE: vendor/github.com/docker/docker/api/types/registry/authenticate.go ================================================ package registry // ---------------------------------------------------------------------------- // DO NOT EDIT THIS FILE // This file was generated by `swagger generate operation` // // See hack/generate-swagger-api.sh // ---------------------------------------------------------------------------- // AuthenticateOKBody authenticate o k body // swagger:model AuthenticateOKBody type AuthenticateOKBody struct { // An opaque token used to authenticate a user after a successful login // Required: true IdentityToken string `json:"IdentityToken"` // The status of the authentication // Required: true Status string `json:"Status"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/registry/registry.go ================================================ // FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16: //go:build go1.23 package registry import ( "encoding/json" "net" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) // ServiceConfig stores daemon registry services configuration. type ServiceConfig struct { AllowNondistributableArtifactsCIDRs []*NetIPNet `json:"AllowNondistributableArtifactsCIDRs,omitempty"` // Deprecated: non-distributable artifacts are deprecated and enabled by default. This field will be removed in the next release. AllowNondistributableArtifactsHostnames []string `json:"AllowNondistributableArtifactsHostnames,omitempty"` // Deprecated: non-distributable artifacts are deprecated and enabled by default. This field will be removed in the next release. InsecureRegistryCIDRs []*NetIPNet `json:"InsecureRegistryCIDRs"` IndexConfigs map[string]*IndexInfo `json:"IndexConfigs"` Mirrors []string // ExtraFields is for internal use to include deprecated fields on older API versions. ExtraFields map[string]any `json:"-"` } // MarshalJSON implements a custom marshaler to include legacy fields // in API responses. func (sc *ServiceConfig) MarshalJSON() ([]byte, error) { type tmp ServiceConfig base, err := json.Marshal((*tmp)(sc)) if err != nil { return nil, err } var merged map[string]any _ = json.Unmarshal(base, &merged) for k, v := range sc.ExtraFields { merged[k] = v } return json.Marshal(merged) } // NetIPNet is the net.IPNet type, which can be marshalled and // unmarshalled to JSON type NetIPNet net.IPNet // String returns the CIDR notation of ipnet func (ipnet *NetIPNet) String() string { return (*net.IPNet)(ipnet).String() } // MarshalJSON returns the JSON representation of the IPNet func (ipnet *NetIPNet) MarshalJSON() ([]byte, error) { return json.Marshal((*net.IPNet)(ipnet).String()) } // UnmarshalJSON sets the IPNet from a byte array of JSON func (ipnet *NetIPNet) UnmarshalJSON(b []byte) error { var ipnetStr string if err := json.Unmarshal(b, &ipnetStr); err != nil { return err } _, cidr, err := net.ParseCIDR(ipnetStr) if err != nil { return err } *ipnet = NetIPNet(*cidr) return nil } // IndexInfo contains information about a registry // // RepositoryInfo Examples: // // { // "Index" : { // "Name" : "docker.io", // "Mirrors" : ["https://registry-2.docker.io/v1/", "https://registry-3.docker.io/v1/"], // "Secure" : true, // "Official" : true, // }, // "RemoteName" : "library/debian", // "LocalName" : "debian", // "CanonicalName" : "docker.io/debian" // "Official" : true, // } // // { // "Index" : { // "Name" : "127.0.0.1:5000", // "Mirrors" : [], // "Secure" : false, // "Official" : false, // }, // "RemoteName" : "user/repo", // "LocalName" : "127.0.0.1:5000/user/repo", // "CanonicalName" : "127.0.0.1:5000/user/repo", // "Official" : false, // } type IndexInfo struct { // Name is the name of the registry, such as "docker.io" Name string // Mirrors is a list of mirrors, expressed as URIs Mirrors []string // Secure is set to false if the registry is part of the list of // insecure registries. Insecure registries accept HTTP and/or accept // HTTPS with certificates from unknown CAs. Secure bool // Official indicates whether this is an official registry Official bool } // DistributionInspect describes the result obtained from contacting the // registry to retrieve image metadata type DistributionInspect struct { // Descriptor contains information about the manifest, including // the content addressable digest Descriptor ocispec.Descriptor // Platforms contains the list of platforms supported by the image, // obtained by parsing the manifest Platforms []ocispec.Platform } ================================================ FILE: vendor/github.com/docker/docker/api/types/registry/search.go ================================================ package registry import ( "context" "github.com/docker/docker/api/types/filters" ) // SearchOptions holds parameters to search images with. type SearchOptions struct { RegistryAuth string // PrivilegeFunc is a function that clients can supply to retry operations // after getting an authorization error. This function returns the registry // authentication header value in base64 encoded format, or an error if the // privilege request fails. // // For details, refer to [github.com/docker/docker/api/types/registry.RequestAuthConfig]. PrivilegeFunc func(context.Context) (string, error) Filters filters.Args Limit int } // SearchResult describes a search result returned from a registry type SearchResult struct { // StarCount indicates the number of stars this repository has StarCount int `json:"star_count"` // IsOfficial is true if the result is from an official repository. IsOfficial bool `json:"is_official"` // Name is the name of the repository Name string `json:"name"` // IsAutomated indicates whether the result is automated. // // Deprecated: the "is_automated" field is deprecated and will always be "false". IsAutomated bool `json:"is_automated"` // Description is a textual description of the repository Description string `json:"description"` } // SearchResults lists a collection search results returned from a registry type SearchResults struct { // Query contains the query string that generated the search results Query string `json:"query"` // NumResults indicates the number of results the query returned NumResults int `json:"num_results"` // Results is a slice containing the actual results for the search Results []SearchResult `json:"results"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/storage/driver_data.go ================================================ package storage // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command // DriverData Information about the storage driver used to store the container's and // image's filesystem. // // swagger:model DriverData type DriverData struct { // Low-level storage metadata, provided as key/value pairs. // // This information is driver-specific, and depends on the storage-driver // in use, and should be used for informational purposes only. // // Required: true Data map[string]string `json:"Data"` // Name of the storage driver. // Required: true Name string `json:"Name"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/strslice/strslice.go ================================================ package strslice import "encoding/json" // StrSlice represents a string or an array of strings. // We need to override the json decoder to accept both options. type StrSlice []string // UnmarshalJSON decodes the byte slice whether it's a string or an array of // strings. This method is needed to implement json.Unmarshaler. func (e *StrSlice) UnmarshalJSON(b []byte) error { if len(b) == 0 { // With no input, we preserve the existing value by returning nil and // leaving the target alone. This allows defining default values for // the type. return nil } p := make([]string, 0, 1) if err := json.Unmarshal(b, &p); err != nil { var s string if err := json.Unmarshal(b, &s); err != nil { return err } p = append(p, s) } *e = p return nil } ================================================ FILE: vendor/github.com/docker/docker/api/types/swarm/common.go ================================================ package swarm import ( "strconv" "time" ) // Version represents the internal object version. type Version struct { Index uint64 `json:",omitempty"` } // String implements fmt.Stringer interface. func (v Version) String() string { return strconv.FormatUint(v.Index, 10) } // Meta is a base object inherited by most of the other once. type Meta struct { Version Version `json:",omitempty"` CreatedAt time.Time `json:",omitempty"` UpdatedAt time.Time `json:",omitempty"` } // Annotations represents how to describe an object. type Annotations struct { Name string `json:",omitempty"` Labels map[string]string `json:"Labels"` } // Driver represents a driver (network, logging, secrets backend). type Driver struct { Name string `json:",omitempty"` Options map[string]string `json:",omitempty"` } // TLSInfo represents the TLS information about what CA certificate is trusted, // and who the issuer for a TLS certificate is type TLSInfo struct { // TrustRoot is the trusted CA root certificate in PEM format TrustRoot string `json:",omitempty"` // CertIssuer is the raw subject bytes of the issuer CertIssuerSubject []byte `json:",omitempty"` // CertIssuerPublicKey is the raw public key bytes of the issuer CertIssuerPublicKey []byte `json:",omitempty"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/swarm/config.go ================================================ package swarm import ( "os" "github.com/docker/docker/api/types/filters" ) // Config represents a config. type Config struct { ID string Meta Spec ConfigSpec } // ConfigSpec represents a config specification from a config in swarm type ConfigSpec struct { Annotations // Data is the data to store as a config. // // The maximum allowed size is 1000KB, as defined in [MaxConfigSize]. // // [MaxConfigSize]: https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0-20250103191802-8c1959736554/manager/controlapi#MaxConfigSize Data []byte `json:",omitempty"` // Templating controls whether and how to evaluate the config payload as // a template. If it is not set, no templating is used. Templating *Driver `json:",omitempty"` } // ConfigReferenceFileTarget is a file target in a config reference type ConfigReferenceFileTarget struct { Name string UID string GID string Mode os.FileMode } // ConfigReferenceRuntimeTarget is a target for a config specifying that it // isn't mounted into the container but instead has some other purpose. type ConfigReferenceRuntimeTarget struct{} // ConfigReference is a reference to a config in swarm type ConfigReference struct { File *ConfigReferenceFileTarget `json:",omitempty"` Runtime *ConfigReferenceRuntimeTarget `json:",omitempty"` ConfigID string ConfigName string } // ConfigCreateResponse contains the information returned to a client // on the creation of a new config. type ConfigCreateResponse struct { // ID is the id of the created config. ID string } // ConfigListOptions holds parameters to list configs type ConfigListOptions struct { Filters filters.Args } ================================================ FILE: vendor/github.com/docker/docker/api/types/swarm/container.go ================================================ package swarm import ( "time" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/mount" ) // DNSConfig specifies DNS related configurations in resolver configuration file (resolv.conf) // Detailed documentation is available in: // http://man7.org/linux/man-pages/man5/resolv.conf.5.html // `nameserver`, `search`, `options` have been supported. // TODO: `domain` is not supported yet. type DNSConfig struct { // Nameservers specifies the IP addresses of the name servers Nameservers []string `json:",omitempty"` // Search specifies the search list for host-name lookup Search []string `json:",omitempty"` // Options allows certain internal resolver variables to be modified Options []string `json:",omitempty"` } // SELinuxContext contains the SELinux labels of the container. type SELinuxContext struct { Disable bool User string Role string Type string Level string } // SeccompMode is the type used for the enumeration of possible seccomp modes // in SeccompOpts type SeccompMode string const ( SeccompModeDefault SeccompMode = "default" SeccompModeUnconfined SeccompMode = "unconfined" SeccompModeCustom SeccompMode = "custom" ) // SeccompOpts defines the options for configuring seccomp on a swarm-managed // container. type SeccompOpts struct { // Mode is the SeccompMode used for the container. Mode SeccompMode `json:",omitempty"` // Profile is the custom seccomp profile as a json object to be used with // the container. Mode should be set to SeccompModeCustom when using a // custom profile in this manner. Profile []byte `json:",omitempty"` } // AppArmorMode is type used for the enumeration of possible AppArmor modes in // AppArmorOpts type AppArmorMode string const ( AppArmorModeDefault AppArmorMode = "default" AppArmorModeDisabled AppArmorMode = "disabled" ) // AppArmorOpts defines the options for configuring AppArmor on a swarm-managed // container. Currently, custom AppArmor profiles are not supported. type AppArmorOpts struct { Mode AppArmorMode `json:",omitempty"` } // CredentialSpec for managed service account (Windows only) type CredentialSpec struct { Config string File string Registry string } // Privileges defines the security options for the container. type Privileges struct { CredentialSpec *CredentialSpec SELinuxContext *SELinuxContext Seccomp *SeccompOpts `json:",omitempty"` AppArmor *AppArmorOpts `json:",omitempty"` NoNewPrivileges bool } // ContainerSpec represents the spec of a container. type ContainerSpec struct { Image string `json:",omitempty"` Labels map[string]string `json:",omitempty"` Command []string `json:",omitempty"` Args []string `json:",omitempty"` Hostname string `json:",omitempty"` Env []string `json:",omitempty"` Dir string `json:",omitempty"` User string `json:",omitempty"` Groups []string `json:",omitempty"` Privileges *Privileges `json:",omitempty"` Init *bool `json:",omitempty"` StopSignal string `json:",omitempty"` TTY bool `json:",omitempty"` OpenStdin bool `json:",omitempty"` ReadOnly bool `json:",omitempty"` Mounts []mount.Mount `json:",omitempty"` StopGracePeriod *time.Duration `json:",omitempty"` Healthcheck *container.HealthConfig `json:",omitempty"` // The format of extra hosts on swarmkit is specified in: // http://man7.org/linux/man-pages/man5/hosts.5.html // IP_address canonical_hostname [aliases...] Hosts []string `json:",omitempty"` DNSConfig *DNSConfig `json:",omitempty"` Secrets []*SecretReference `json:",omitempty"` Configs []*ConfigReference `json:",omitempty"` Isolation container.Isolation `json:",omitempty"` Sysctls map[string]string `json:",omitempty"` CapabilityAdd []string `json:",omitempty"` CapabilityDrop []string `json:",omitempty"` Ulimits []*container.Ulimit `json:",omitempty"` OomScoreAdj int64 `json:",omitempty"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/swarm/network.go ================================================ package swarm import ( "github.com/docker/docker/api/types/network" ) // Endpoint represents an endpoint. type Endpoint struct { Spec EndpointSpec `json:",omitempty"` Ports []PortConfig `json:",omitempty"` VirtualIPs []EndpointVirtualIP `json:",omitempty"` } // EndpointSpec represents the spec of an endpoint. type EndpointSpec struct { Mode ResolutionMode `json:",omitempty"` Ports []PortConfig `json:",omitempty"` } // ResolutionMode represents a resolution mode. type ResolutionMode string const ( // ResolutionModeVIP VIP ResolutionModeVIP ResolutionMode = "vip" // ResolutionModeDNSRR DNSRR ResolutionModeDNSRR ResolutionMode = "dnsrr" ) // PortConfig represents the config of a port. type PortConfig struct { Name string `json:",omitempty"` Protocol PortConfigProtocol `json:",omitempty"` // TargetPort is the port inside the container TargetPort uint32 `json:",omitempty"` // PublishedPort is the port on the swarm hosts PublishedPort uint32 `json:",omitempty"` // PublishMode is the mode in which port is published PublishMode PortConfigPublishMode `json:",omitempty"` } // PortConfigPublishMode represents the mode in which the port is to // be published. type PortConfigPublishMode string const ( // PortConfigPublishModeIngress is used for ports published // for ingress load balancing using routing mesh. PortConfigPublishModeIngress PortConfigPublishMode = "ingress" // PortConfigPublishModeHost is used for ports published // for direct host level access on the host where the task is running. PortConfigPublishModeHost PortConfigPublishMode = "host" ) // PortConfigProtocol represents the protocol of a port. type PortConfigProtocol string const ( // TODO(stevvooe): These should be used generally, not just for PortConfig. // PortConfigProtocolTCP TCP PortConfigProtocolTCP PortConfigProtocol = "tcp" // PortConfigProtocolUDP UDP PortConfigProtocolUDP PortConfigProtocol = "udp" // PortConfigProtocolSCTP SCTP PortConfigProtocolSCTP PortConfigProtocol = "sctp" ) // EndpointVirtualIP represents the virtual ip of a port. type EndpointVirtualIP struct { NetworkID string `json:",omitempty"` Addr string `json:",omitempty"` } // Network represents a network. type Network struct { ID string Meta Spec NetworkSpec `json:",omitempty"` DriverState Driver `json:",omitempty"` IPAMOptions *IPAMOptions `json:",omitempty"` } // NetworkSpec represents the spec of a network. type NetworkSpec struct { Annotations DriverConfiguration *Driver `json:",omitempty"` IPv6Enabled bool `json:",omitempty"` Internal bool `json:",omitempty"` Attachable bool `json:",omitempty"` Ingress bool `json:",omitempty"` IPAMOptions *IPAMOptions `json:",omitempty"` ConfigFrom *network.ConfigReference `json:",omitempty"` Scope string `json:",omitempty"` } // NetworkAttachmentConfig represents the configuration of a network attachment. type NetworkAttachmentConfig struct { Target string `json:",omitempty"` Aliases []string `json:",omitempty"` DriverOpts map[string]string `json:",omitempty"` } // NetworkAttachment represents a network attachment. type NetworkAttachment struct { Network Network `json:",omitempty"` Addresses []string `json:",omitempty"` } // IPAMOptions represents ipam options. type IPAMOptions struct { Driver Driver `json:",omitempty"` Configs []IPAMConfig `json:",omitempty"` } // IPAMConfig represents ipam configuration. type IPAMConfig struct { Subnet string `json:",omitempty"` Range string `json:",omitempty"` Gateway string `json:",omitempty"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/swarm/node.go ================================================ package swarm import "github.com/docker/docker/api/types/filters" // Node represents a node. type Node struct { ID string Meta // Spec defines the desired state of the node as specified by the user. // The system will honor this and will *never* modify it. Spec NodeSpec `json:",omitempty"` // Description encapsulates the properties of the Node as reported by the // agent. Description NodeDescription `json:",omitempty"` // Status provides the current status of the node, as seen by the manager. Status NodeStatus `json:",omitempty"` // ManagerStatus provides the current status of the node's manager // component, if the node is a manager. ManagerStatus *ManagerStatus `json:",omitempty"` } // NodeSpec represents the spec of a node. type NodeSpec struct { Annotations Role NodeRole `json:",omitempty"` Availability NodeAvailability `json:",omitempty"` } // NodeRole represents the role of a node. type NodeRole string const ( // NodeRoleWorker WORKER NodeRoleWorker NodeRole = "worker" // NodeRoleManager MANAGER NodeRoleManager NodeRole = "manager" ) // NodeAvailability represents the availability of a node. type NodeAvailability string const ( // NodeAvailabilityActive ACTIVE NodeAvailabilityActive NodeAvailability = "active" // NodeAvailabilityPause PAUSE NodeAvailabilityPause NodeAvailability = "pause" // NodeAvailabilityDrain DRAIN NodeAvailabilityDrain NodeAvailability = "drain" ) // NodeDescription represents the description of a node. type NodeDescription struct { Hostname string `json:",omitempty"` Platform Platform `json:",omitempty"` Resources Resources `json:",omitempty"` Engine EngineDescription `json:",omitempty"` TLSInfo TLSInfo `json:",omitempty"` CSIInfo []NodeCSIInfo `json:",omitempty"` } // Platform represents the platform (Arch/OS). type Platform struct { Architecture string `json:",omitempty"` OS string `json:",omitempty"` } // EngineDescription represents the description of an engine. type EngineDescription struct { EngineVersion string `json:",omitempty"` Labels map[string]string `json:",omitempty"` Plugins []PluginDescription `json:",omitempty"` } // NodeCSIInfo represents information about a CSI plugin available on the node type NodeCSIInfo struct { // PluginName is the name of the CSI plugin. PluginName string `json:",omitempty"` // NodeID is the ID of the node as reported by the CSI plugin. This is // different from the swarm node ID. NodeID string `json:",omitempty"` // MaxVolumesPerNode is the maximum number of volumes that may be published // to this node MaxVolumesPerNode int64 `json:",omitempty"` // AccessibleTopology indicates the location of this node in the CSI // plugin's topology AccessibleTopology *Topology `json:",omitempty"` } // PluginDescription represents the description of an engine plugin. type PluginDescription struct { Type string `json:",omitempty"` Name string `json:",omitempty"` } // NodeStatus represents the status of a node. type NodeStatus struct { State NodeState `json:",omitempty"` Message string `json:",omitempty"` Addr string `json:",omitempty"` } // Reachability represents the reachability of a node. type Reachability string const ( // ReachabilityUnknown UNKNOWN ReachabilityUnknown Reachability = "unknown" // ReachabilityUnreachable UNREACHABLE ReachabilityUnreachable Reachability = "unreachable" // ReachabilityReachable REACHABLE ReachabilityReachable Reachability = "reachable" ) // ManagerStatus represents the status of a manager. type ManagerStatus struct { Leader bool `json:",omitempty"` Reachability Reachability `json:",omitempty"` Addr string `json:",omitempty"` } // NodeState represents the state of a node. type NodeState string const ( // NodeStateUnknown UNKNOWN NodeStateUnknown NodeState = "unknown" // NodeStateDown DOWN NodeStateDown NodeState = "down" // NodeStateReady READY NodeStateReady NodeState = "ready" // NodeStateDisconnected DISCONNECTED NodeStateDisconnected NodeState = "disconnected" ) // Topology defines the CSI topology of this node. This type is a duplicate of // github.com/docker/docker/api/types.Topology. Because the type definition // is so simple and to avoid complicated structure or circular imports, we just // duplicate it here. See that type for full documentation type Topology struct { Segments map[string]string `json:",omitempty"` } // NodeListOptions holds parameters to list nodes with. type NodeListOptions struct { Filters filters.Args } // NodeRemoveOptions holds parameters to remove nodes with. type NodeRemoveOptions struct { Force bool } ================================================ FILE: vendor/github.com/docker/docker/api/types/swarm/runtime/runtime.go ================================================ package runtime import "fmt" // PluginSpec defines the base payload which clients can specify for creating // a service with the plugin runtime. type PluginSpec struct { Name string `json:"name,omitempty"` Remote string `json:"remote,omitempty"` Privileges []*PluginPrivilege `json:"privileges,omitempty"` Disabled bool `json:"disabled,omitempty"` Env []string `json:"env,omitempty"` } // PluginPrivilege describes a permission the user has to accept // upon installing a plugin. type PluginPrivilege struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Value []string `json:"value,omitempty"` } var ( ErrInvalidLengthPlugin = fmt.Errorf("proto: negative length found during unmarshaling") // Deprecated: this error was only used internally and is no longer used. ErrIntOverflowPlugin = fmt.Errorf("proto: integer overflow") // Deprecated: this error was only used internally and is no longer used. ErrUnexpectedEndOfGroupPlugin = fmt.Errorf("proto: unexpected end of group") // Deprecated: this error was only used internally and is no longer used. ) ================================================ FILE: vendor/github.com/docker/docker/api/types/swarm/runtime.go ================================================ package swarm import "github.com/docker/docker/api/types/swarm/runtime" // RuntimeType is the type of runtime used for the TaskSpec type RuntimeType string // RuntimeURL is the proto type url type RuntimeURL string const ( // RuntimeContainer is the container based runtime RuntimeContainer RuntimeType = "container" // RuntimePlugin is the plugin based runtime RuntimePlugin RuntimeType = "plugin" // RuntimeNetworkAttachment is the network attachment runtime RuntimeNetworkAttachment RuntimeType = "attachment" // RuntimeURLContainer is the proto url for the container type RuntimeURLContainer RuntimeURL = "types.docker.com/RuntimeContainer" // RuntimeURLPlugin is the proto url for the plugin type RuntimeURLPlugin RuntimeURL = "types.docker.com/RuntimePlugin" ) // NetworkAttachmentSpec represents the runtime spec type for network // attachment tasks type NetworkAttachmentSpec struct { ContainerID string } // RuntimeSpec defines the base payload which clients can specify for creating // a service with the plugin runtime. type RuntimeSpec = runtime.PluginSpec // RuntimePrivilege describes a permission the user has to accept // upon installing a plugin. type RuntimePrivilege = runtime.PluginPrivilege ================================================ FILE: vendor/github.com/docker/docker/api/types/swarm/secret.go ================================================ package swarm import ( "os" "github.com/docker/docker/api/types/filters" ) // Secret represents a secret. type Secret struct { ID string Meta Spec SecretSpec } // SecretSpec represents a secret specification from a secret in swarm type SecretSpec struct { Annotations // Data is the data to store as a secret. It must be empty if a // [Driver] is used, in which case the data is loaded from an external // secret store. The maximum allowed size is 500KB, as defined in // [MaxSecretSize]. // // This field is only used to create the secret, and is not returned // by other endpoints. // // [MaxSecretSize]: https://pkg.go.dev/github.com/moby/swarmkit/v2@v2.0.0-20250103191802-8c1959736554/api/validation#MaxSecretSize Data []byte `json:",omitempty"` // Driver is the name of the secrets driver used to fetch the secret's // value from an external secret store. If not set, the default built-in // store is used. Driver *Driver `json:",omitempty"` // Templating controls whether and how to evaluate the secret payload as // a template. If it is not set, no templating is used. Templating *Driver `json:",omitempty"` } // SecretReferenceFileTarget is a file target in a secret reference type SecretReferenceFileTarget struct { Name string UID string GID string Mode os.FileMode } // SecretReference is a reference to a secret in swarm type SecretReference struct { File *SecretReferenceFileTarget SecretID string SecretName string } // SecretCreateResponse contains the information returned to a client // on the creation of a new secret. type SecretCreateResponse struct { // ID is the id of the created secret. ID string } // SecretListOptions holds parameters to list secrets type SecretListOptions struct { Filters filters.Args } ================================================ FILE: vendor/github.com/docker/docker/api/types/swarm/service.go ================================================ package swarm import ( "time" "github.com/docker/docker/api/types/filters" ) // Service represents a service. type Service struct { ID string Meta Spec ServiceSpec `json:",omitempty"` PreviousSpec *ServiceSpec `json:",omitempty"` Endpoint Endpoint `json:",omitempty"` UpdateStatus *UpdateStatus `json:",omitempty"` // ServiceStatus is an optional, extra field indicating the number of // desired and running tasks. It is provided primarily as a shortcut to // calculating these values client-side, which otherwise would require // listing all tasks for a service, an operation that could be // computation and network expensive. ServiceStatus *ServiceStatus `json:",omitempty"` // JobStatus is the status of a Service which is in one of ReplicatedJob or // GlobalJob modes. It is absent on Replicated and Global services. JobStatus *JobStatus `json:",omitempty"` } // ServiceSpec represents the spec of a service. type ServiceSpec struct { Annotations // TaskTemplate defines how the service should construct new tasks when // orchestrating this service. TaskTemplate TaskSpec `json:",omitempty"` Mode ServiceMode `json:",omitempty"` UpdateConfig *UpdateConfig `json:",omitempty"` RollbackConfig *UpdateConfig `json:",omitempty"` // Networks specifies which networks the service should attach to. // // Deprecated: This field is deprecated since v1.44. The Networks field in TaskSpec should be used instead. Networks []NetworkAttachmentConfig `json:",omitempty"` EndpointSpec *EndpointSpec `json:",omitempty"` } // ServiceMode represents the mode of a service. type ServiceMode struct { Replicated *ReplicatedService `json:",omitempty"` Global *GlobalService `json:",omitempty"` ReplicatedJob *ReplicatedJob `json:",omitempty"` GlobalJob *GlobalJob `json:",omitempty"` } // UpdateState is the state of a service update. type UpdateState string const ( // UpdateStateUpdating is the updating state. UpdateStateUpdating UpdateState = "updating" // UpdateStatePaused is the paused state. UpdateStatePaused UpdateState = "paused" // UpdateStateCompleted is the completed state. UpdateStateCompleted UpdateState = "completed" // UpdateStateRollbackStarted is the state with a rollback in progress. UpdateStateRollbackStarted UpdateState = "rollback_started" // UpdateStateRollbackPaused is the state with a rollback in progress. UpdateStateRollbackPaused UpdateState = "rollback_paused" // UpdateStateRollbackCompleted is the state with a rollback in progress. UpdateStateRollbackCompleted UpdateState = "rollback_completed" ) // UpdateStatus reports the status of a service update. type UpdateStatus struct { State UpdateState `json:",omitempty"` StartedAt *time.Time `json:",omitempty"` CompletedAt *time.Time `json:",omitempty"` Message string `json:",omitempty"` } // ReplicatedService is a kind of ServiceMode. type ReplicatedService struct { Replicas *uint64 `json:",omitempty"` } // GlobalService is a kind of ServiceMode. type GlobalService struct{} // ReplicatedJob is the a type of Service which executes a defined Tasks // in parallel until the specified number of Tasks have succeeded. type ReplicatedJob struct { // MaxConcurrent indicates the maximum number of Tasks that should be // executing simultaneously for this job at any given time. There may be // fewer Tasks that MaxConcurrent executing simultaneously; for example, if // there are fewer than MaxConcurrent tasks needed to reach // TotalCompletions. // // If this field is empty, it will default to a max concurrency of 1. MaxConcurrent *uint64 `json:",omitempty"` // TotalCompletions is the total number of Tasks desired to run to // completion. // // If this field is empty, the value of MaxConcurrent will be used. TotalCompletions *uint64 `json:",omitempty"` } // GlobalJob is the type of a Service which executes a Task on every Node // matching the Service's placement constraints. These tasks run to completion // and then exit. // // This type is deliberately empty. type GlobalJob struct{} const ( // UpdateFailureActionPause PAUSE UpdateFailureActionPause = "pause" // UpdateFailureActionContinue CONTINUE UpdateFailureActionContinue = "continue" // UpdateFailureActionRollback ROLLBACK UpdateFailureActionRollback = "rollback" // UpdateOrderStopFirst STOP_FIRST UpdateOrderStopFirst = "stop-first" // UpdateOrderStartFirst START_FIRST UpdateOrderStartFirst = "start-first" ) // UpdateConfig represents the update configuration. type UpdateConfig struct { // Maximum number of tasks to be updated in one iteration. // 0 means unlimited parallelism. Parallelism uint64 // Amount of time between updates. Delay time.Duration `json:",omitempty"` // FailureAction is the action to take when an update failures. FailureAction string `json:",omitempty"` // Monitor indicates how long to monitor a task for failure after it is // created. If the task fails by ending up in one of the states // REJECTED, COMPLETED, or FAILED, within Monitor from its creation, // this counts as a failure. If it fails after Monitor, it does not // count as a failure. If Monitor is unspecified, a default value will // be used. Monitor time.Duration `json:",omitempty"` // MaxFailureRatio is the fraction of tasks that may fail during // an update before the failure action is invoked. Any task created by // the current update which ends up in one of the states REJECTED, // COMPLETED or FAILED within Monitor from its creation counts as a // failure. The number of failures is divided by the number of tasks // being updated, and if this fraction is greater than // MaxFailureRatio, the failure action is invoked. // // If the failure action is CONTINUE, there is no effect. // If the failure action is PAUSE, no more tasks will be updated until // another update is started. MaxFailureRatio float32 // Order indicates the order of operations when rolling out an updated // task. Either the old task is shut down before the new task is // started, or the new task is started before the old task is shut down. Order string } // ServiceStatus represents the number of running tasks in a service and the // number of tasks desired to be running. type ServiceStatus struct { // RunningTasks is the number of tasks for the service actually in the // Running state RunningTasks uint64 // DesiredTasks is the number of tasks desired to be running by the // service. For replicated services, this is the replica count. For global // services, this is computed by taking the number of tasks with desired // state of not-Shutdown. DesiredTasks uint64 // CompletedTasks is the number of tasks in the state Completed, if this // service is in ReplicatedJob or GlobalJob mode. This field must be // cross-referenced with the service type, because the default value of 0 // may mean that a service is not in a job mode, or it may mean that the // job has yet to complete any tasks. CompletedTasks uint64 } // JobStatus is the status of a job-type service. type JobStatus struct { // JobIteration is a value increased each time a Job is executed, // successfully or otherwise. "Executed", in this case, means the job as a // whole has been started, not that an individual Task has been launched. A // job is "Executed" when its ServiceSpec is updated. JobIteration can be // used to disambiguate Tasks belonging to different executions of a job. // // Though JobIteration will increase with each subsequent execution, it may // not necessarily increase by 1, and so JobIteration should not be used to // keep track of the number of times a job has been executed. JobIteration Version // LastExecution is the time that the job was last executed, as observed by // Swarm manager. LastExecution time.Time `json:",omitempty"` } // ServiceCreateOptions contains the options to use when creating a service. type ServiceCreateOptions struct { // EncodedRegistryAuth is the encoded registry authorization credentials to // use when updating the service. // // This field follows the format of the X-Registry-Auth header. EncodedRegistryAuth string // QueryRegistry indicates whether the service update requires // contacting a registry. A registry may be contacted to retrieve // the image digest and manifest, which in turn can be used to update // platform or other information about the service. QueryRegistry bool } // Values for RegistryAuthFrom in ServiceUpdateOptions const ( RegistryAuthFromSpec = "spec" RegistryAuthFromPreviousSpec = "previous-spec" ) // ServiceUpdateOptions contains the options to be used for updating services. type ServiceUpdateOptions struct { // EncodedRegistryAuth is the encoded registry authorization credentials to // use when updating the service. // // This field follows the format of the X-Registry-Auth header. EncodedRegistryAuth string // TODO(stevvooe): Consider moving the version parameter of ServiceUpdate // into this field. While it does open API users up to racy writes, most // users may not need that level of consistency in practice. // RegistryAuthFrom specifies where to find the registry authorization // credentials if they are not given in EncodedRegistryAuth. Valid // values are "spec" and "previous-spec". RegistryAuthFrom string // Rollback indicates whether a server-side rollback should be // performed. When this is set, the provided spec will be ignored. // The valid values are "previous" and "none". An empty value is the // same as "none". Rollback string // QueryRegistry indicates whether the service update requires // contacting a registry. A registry may be contacted to retrieve // the image digest and manifest, which in turn can be used to update // platform or other information about the service. QueryRegistry bool } // ServiceListOptions holds parameters to list services with. type ServiceListOptions struct { Filters filters.Args // Status indicates whether the server should include the service task // count of running and desired tasks. Status bool } // ServiceInspectOptions holds parameters related to the "service inspect" // operation. type ServiceInspectOptions struct { InsertDefaults bool } ================================================ FILE: vendor/github.com/docker/docker/api/types/swarm/service_create_response.go ================================================ package swarm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command // ServiceCreateResponse contains the information returned to a client on the // creation of a new service. // // swagger:model ServiceCreateResponse type ServiceCreateResponse struct { // The ID of the created service. ID string `json:"ID,omitempty"` // Optional warning message. // // FIXME(thaJeztah): this should have "omitempty" in the generated type. // Warnings []string `json:"Warnings"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/swarm/service_update_response.go ================================================ package swarm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command // ServiceUpdateResponse service update response // swagger:model ServiceUpdateResponse type ServiceUpdateResponse struct { // Optional warning messages Warnings []string `json:"Warnings"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/swarm/swarm.go ================================================ package swarm import ( "time" ) // ClusterInfo represents info about the cluster for outputting in "info" // it contains the same information as "Swarm", but without the JoinTokens type ClusterInfo struct { ID string Meta Spec Spec TLSInfo TLSInfo RootRotationInProgress bool DefaultAddrPool []string SubnetSize uint32 DataPathPort uint32 } // Swarm represents a swarm. type Swarm struct { ClusterInfo JoinTokens JoinTokens } // JoinTokens contains the tokens workers and managers need to join the swarm. type JoinTokens struct { // Worker is the join token workers may use to join the swarm. Worker string // Manager is the join token managers may use to join the swarm. Manager string } // Spec represents the spec of a swarm. type Spec struct { Annotations Orchestration OrchestrationConfig `json:",omitempty"` Raft RaftConfig `json:",omitempty"` Dispatcher DispatcherConfig `json:",omitempty"` CAConfig CAConfig `json:",omitempty"` TaskDefaults TaskDefaults `json:",omitempty"` EncryptionConfig EncryptionConfig `json:",omitempty"` } // OrchestrationConfig represents orchestration configuration. type OrchestrationConfig struct { // TaskHistoryRetentionLimit is the number of historic tasks to keep per instance or // node. If negative, never remove completed or failed tasks. TaskHistoryRetentionLimit *int64 `json:",omitempty"` } // TaskDefaults parameterizes cluster-level task creation with default values. type TaskDefaults struct { // LogDriver selects the log driver to use for tasks created in the // orchestrator if unspecified by a service. // // Updating this value will only have an affect on new tasks. Old tasks // will continue use their previously configured log driver until // recreated. LogDriver *Driver `json:",omitempty"` } // EncryptionConfig controls at-rest encryption of data and keys. type EncryptionConfig struct { // AutoLockManagers specifies whether or not managers TLS keys and raft data // should be encrypted at rest in such a way that they must be unlocked // before the manager node starts up again. AutoLockManagers bool } // RaftConfig represents raft configuration. type RaftConfig struct { // SnapshotInterval is the number of log entries between snapshots. SnapshotInterval uint64 `json:",omitempty"` // KeepOldSnapshots is the number of snapshots to keep beyond the // current snapshot. KeepOldSnapshots *uint64 `json:",omitempty"` // LogEntriesForSlowFollowers is the number of log entries to keep // around to sync up slow followers after a snapshot is created. LogEntriesForSlowFollowers uint64 `json:",omitempty"` // ElectionTick is the number of ticks that a follower will wait for a message // from the leader before becoming a candidate and starting an election. // ElectionTick must be greater than HeartbeatTick. // // A tick currently defaults to one second, so these translate directly to // seconds currently, but this is NOT guaranteed. ElectionTick int // HeartbeatTick is the number of ticks between heartbeats. Every // HeartbeatTick ticks, the leader will send a heartbeat to the // followers. // // A tick currently defaults to one second, so these translate directly to // seconds currently, but this is NOT guaranteed. HeartbeatTick int } // DispatcherConfig represents dispatcher configuration. type DispatcherConfig struct { // HeartbeatPeriod defines how often agent should send heartbeats to // dispatcher. HeartbeatPeriod time.Duration `json:",omitempty"` } // CAConfig represents CA configuration. type CAConfig struct { // NodeCertExpiry is the duration certificates should be issued for NodeCertExpiry time.Duration `json:",omitempty"` // ExternalCAs is a list of CAs to which a manager node will make // certificate signing requests for node certificates. ExternalCAs []*ExternalCA `json:",omitempty"` // SigningCACert and SigningCAKey specify the desired signing root CA and // root CA key for the swarm. When inspecting the cluster, the key will // be redacted. SigningCACert string `json:",omitempty"` SigningCAKey string `json:",omitempty"` // If this value changes, and there is no specified signing cert and key, // then the swarm is forced to generate a new root certificate and key. ForceRotate uint64 `json:",omitempty"` } // ExternalCAProtocol represents type of external CA. type ExternalCAProtocol string // ExternalCAProtocolCFSSL CFSSL const ExternalCAProtocolCFSSL ExternalCAProtocol = "cfssl" // ExternalCA defines external CA to be used by the cluster. type ExternalCA struct { // Protocol is the protocol used by this external CA. Protocol ExternalCAProtocol // URL is the URL where the external CA can be reached. URL string // Options is a set of additional key/value pairs whose interpretation // depends on the specified CA type. Options map[string]string `json:",omitempty"` // CACert specifies which root CA is used by this external CA. This certificate must // be in PEM format. CACert string } // InitRequest is the request used to init a swarm. type InitRequest struct { ListenAddr string AdvertiseAddr string DataPathAddr string DataPathPort uint32 ForceNewCluster bool Spec Spec AutoLockManagers bool Availability NodeAvailability DefaultAddrPool []string SubnetSize uint32 } // JoinRequest is the request used to join a swarm. type JoinRequest struct { ListenAddr string AdvertiseAddr string DataPathAddr string RemoteAddrs []string JoinToken string // accept by secret Availability NodeAvailability } // UnlockRequest is the request used to unlock a swarm. type UnlockRequest struct { // UnlockKey is the unlock key in ASCII-armored format. UnlockKey string } // LocalNodeState represents the state of the local node. type LocalNodeState string const ( // LocalNodeStateInactive INACTIVE LocalNodeStateInactive LocalNodeState = "inactive" // LocalNodeStatePending PENDING LocalNodeStatePending LocalNodeState = "pending" // LocalNodeStateActive ACTIVE LocalNodeStateActive LocalNodeState = "active" // LocalNodeStateError ERROR LocalNodeStateError LocalNodeState = "error" // LocalNodeStateLocked LOCKED LocalNodeStateLocked LocalNodeState = "locked" ) // Info represents generic information about swarm. type Info struct { NodeID string NodeAddr string LocalNodeState LocalNodeState ControlAvailable bool Error string RemoteManagers []Peer Nodes int `json:",omitempty"` Managers int `json:",omitempty"` Cluster *ClusterInfo `json:",omitempty"` Warnings []string `json:",omitempty"` } // Status provides information about the current swarm status and role, // obtained from the "Swarm" header in the API response. type Status struct { // NodeState represents the state of the node. NodeState LocalNodeState // ControlAvailable indicates if the node is a swarm manager. ControlAvailable bool } // Peer represents a peer. type Peer struct { NodeID string Addr string } // UpdateFlags contains flags for SwarmUpdate. type UpdateFlags struct { RotateWorkerToken bool RotateManagerToken bool RotateManagerUnlockKey bool } // UnlockKeyResponse contains the response for Engine API: // GET /swarm/unlockkey type UnlockKeyResponse struct { // UnlockKey is the unlock key in ASCII-armored format. UnlockKey string } ================================================ FILE: vendor/github.com/docker/docker/api/types/swarm/task.go ================================================ package swarm import ( "time" "github.com/docker/docker/api/types/filters" ) // TaskState represents the state of a task. type TaskState string const ( // TaskStateNew NEW TaskStateNew TaskState = "new" // TaskStateAllocated ALLOCATED TaskStateAllocated TaskState = "allocated" // TaskStatePending PENDING TaskStatePending TaskState = "pending" // TaskStateAssigned ASSIGNED TaskStateAssigned TaskState = "assigned" // TaskStateAccepted ACCEPTED TaskStateAccepted TaskState = "accepted" // TaskStatePreparing PREPARING TaskStatePreparing TaskState = "preparing" // TaskStateReady READY TaskStateReady TaskState = "ready" // TaskStateStarting STARTING TaskStateStarting TaskState = "starting" // TaskStateRunning RUNNING TaskStateRunning TaskState = "running" // TaskStateComplete COMPLETE TaskStateComplete TaskState = "complete" // TaskStateShutdown SHUTDOWN TaskStateShutdown TaskState = "shutdown" // TaskStateFailed FAILED TaskStateFailed TaskState = "failed" // TaskStateRejected REJECTED TaskStateRejected TaskState = "rejected" // TaskStateRemove REMOVE TaskStateRemove TaskState = "remove" // TaskStateOrphaned ORPHANED TaskStateOrphaned TaskState = "orphaned" ) // Task represents a task. type Task struct { ID string Meta Annotations Spec TaskSpec `json:",omitempty"` ServiceID string `json:",omitempty"` Slot int `json:",omitempty"` NodeID string `json:",omitempty"` Status TaskStatus `json:",omitempty"` DesiredState TaskState `json:",omitempty"` NetworksAttachments []NetworkAttachment `json:",omitempty"` GenericResources []GenericResource `json:",omitempty"` // JobIteration is the JobIteration of the Service that this Task was // spawned from, if the Service is a ReplicatedJob or GlobalJob. This is // used to determine which Tasks belong to which run of the job. This field // is absent if the Service mode is Replicated or Global. JobIteration *Version `json:",omitempty"` // Volumes is the list of VolumeAttachments for this task. It specifies // which particular volumes are to be used by this particular task, and // fulfilling what mounts in the spec. Volumes []VolumeAttachment } // TaskSpec represents the spec of a task. type TaskSpec struct { // ContainerSpec, NetworkAttachmentSpec, and PluginSpec are mutually exclusive. // PluginSpec is only used when the `Runtime` field is set to `plugin` // NetworkAttachmentSpec is used if the `Runtime` field is set to // `attachment`. ContainerSpec *ContainerSpec `json:",omitempty"` PluginSpec *RuntimeSpec `json:",omitempty"` NetworkAttachmentSpec *NetworkAttachmentSpec `json:",omitempty"` Resources *ResourceRequirements `json:",omitempty"` RestartPolicy *RestartPolicy `json:",omitempty"` Placement *Placement `json:",omitempty"` Networks []NetworkAttachmentConfig `json:",omitempty"` // LogDriver specifies the LogDriver to use for tasks created from this // spec. If not present, the one on cluster default on swarm.Spec will be // used, finally falling back to the engine default if not specified. LogDriver *Driver `json:",omitempty"` // ForceUpdate is a counter that triggers an update even if no relevant // parameters have been changed. ForceUpdate uint64 Runtime RuntimeType `json:",omitempty"` } // Resources represents resources (CPU/Memory) which can be advertised by a // node and requested to be reserved for a task. type Resources struct { NanoCPUs int64 `json:",omitempty"` MemoryBytes int64 `json:",omitempty"` GenericResources []GenericResource `json:",omitempty"` } // Limit describes limits on resources which can be requested by a task. type Limit struct { NanoCPUs int64 `json:",omitempty"` MemoryBytes int64 `json:",omitempty"` Pids int64 `json:",omitempty"` } // GenericResource represents a "user defined" resource which can // be either an integer (e.g: SSD=3) or a string (e.g: SSD=sda1) type GenericResource struct { NamedResourceSpec *NamedGenericResource `json:",omitempty"` DiscreteResourceSpec *DiscreteGenericResource `json:",omitempty"` } // NamedGenericResource represents a "user defined" resource which is defined // as a string. // "Kind" is used to describe the Kind of a resource (e.g: "GPU", "FPGA", "SSD", ...) // Value is used to identify the resource (GPU="UUID-1", FPGA="/dev/sdb5", ...) type NamedGenericResource struct { Kind string `json:",omitempty"` Value string `json:",omitempty"` } // DiscreteGenericResource represents a "user defined" resource which is defined // as an integer // "Kind" is used to describe the Kind of a resource (e.g: "GPU", "FPGA", "SSD", ...) // Value is used to count the resource (SSD=5, HDD=3, ...) type DiscreteGenericResource struct { Kind string `json:",omitempty"` Value int64 `json:",omitempty"` } // ResourceRequirements represents resources requirements. type ResourceRequirements struct { Limits *Limit `json:",omitempty"` Reservations *Resources `json:",omitempty"` } // Placement represents orchestration parameters. type Placement struct { Constraints []string `json:",omitempty"` Preferences []PlacementPreference `json:",omitempty"` MaxReplicas uint64 `json:",omitempty"` // Platforms stores all the platforms that the image can run on. // This field is used in the platform filter for scheduling. If empty, // then the platform filter is off, meaning there are no scheduling restrictions. Platforms []Platform `json:",omitempty"` } // PlacementPreference provides a way to make the scheduler aware of factors // such as topology. type PlacementPreference struct { Spread *SpreadOver } // SpreadOver is a scheduling preference that instructs the scheduler to spread // tasks evenly over groups of nodes identified by labels. type SpreadOver struct { // label descriptor, such as engine.labels.az SpreadDescriptor string } // RestartPolicy represents the restart policy. type RestartPolicy struct { Condition RestartPolicyCondition `json:",omitempty"` Delay *time.Duration `json:",omitempty"` MaxAttempts *uint64 `json:",omitempty"` Window *time.Duration `json:",omitempty"` } // RestartPolicyCondition represents when to restart. type RestartPolicyCondition string const ( // RestartPolicyConditionNone NONE RestartPolicyConditionNone RestartPolicyCondition = "none" // RestartPolicyConditionOnFailure ON_FAILURE RestartPolicyConditionOnFailure RestartPolicyCondition = "on-failure" // RestartPolicyConditionAny ANY RestartPolicyConditionAny RestartPolicyCondition = "any" ) // TaskStatus represents the status of a task. type TaskStatus struct { Timestamp time.Time `json:",omitempty"` State TaskState `json:",omitempty"` Message string `json:",omitempty"` Err string `json:",omitempty"` ContainerStatus *ContainerStatus `json:",omitempty"` PortStatus PortStatus `json:",omitempty"` } // ContainerStatus represents the status of a container. type ContainerStatus struct { ContainerID string PID int ExitCode int } // PortStatus represents the port status of a task's host ports whose // service has published host ports type PortStatus struct { Ports []PortConfig `json:",omitempty"` } // VolumeAttachment contains the associating a Volume to a Task. type VolumeAttachment struct { // ID is the Swarmkit ID of the Volume. This is not the CSI VolumeId. ID string `json:",omitempty"` // Source, together with Target, indicates the Mount, as specified in the // ContainerSpec, that this volume fulfills. Source string `json:",omitempty"` // Target, together with Source, indicates the Mount, as specified // in the ContainerSpec, that this volume fulfills. Target string `json:",omitempty"` } // TaskListOptions holds parameters to list tasks with. type TaskListOptions struct { Filters filters.Args } ================================================ FILE: vendor/github.com/docker/docker/api/types/system/info.go ================================================ package system import ( "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/registry" "github.com/docker/docker/api/types/swarm" ) // Info contains response of Engine API: // GET "/info" type Info struct { ID string Containers int ContainersRunning int ContainersPaused int ContainersStopped int Images int Driver string DriverStatus [][2]string SystemStatus [][2]string `json:",omitempty"` // SystemStatus is only propagated by the Swarm standalone API Plugins PluginsInfo MemoryLimit bool SwapLimit bool KernelMemory bool `json:",omitempty"` // Deprecated: kernel 5.4 deprecated kmem.limit_in_bytes // KernelMemoryLimit is not supported on cgroups v2. // // Deprecated: This field is deprecated and will be removed in the next release. // Starting with kernel 6.12, the kernel has deprecated kernel memory tcp accounting KernelMemoryTCP bool `json:",omitempty"` // KernelMemoryTCP is not supported on cgroups v2. CPUCfsPeriod bool `json:"CpuCfsPeriod"` CPUCfsQuota bool `json:"CpuCfsQuota"` CPUShares bool CPUSet bool PidsLimit bool IPv4Forwarding bool Debug bool NFd int OomKillDisable bool NGoroutines int SystemTime string LoggingDriver string CgroupDriver string CgroupVersion string `json:",omitempty"` NEventsListener int KernelVersion string OperatingSystem string OSVersion string OSType string Architecture string IndexServerAddress string RegistryConfig *registry.ServiceConfig NCPU int MemTotal int64 GenericResources []swarm.GenericResource DockerRootDir string HTTPProxy string `json:"HttpProxy"` HTTPSProxy string `json:"HttpsProxy"` NoProxy string Name string Labels []string ExperimentalBuild bool ServerVersion string Runtimes map[string]RuntimeWithStatus DefaultRuntime string Swarm swarm.Info // LiveRestoreEnabled determines whether containers should be kept // running when the daemon is shutdown or upon daemon start if // running containers are detected LiveRestoreEnabled bool Isolation container.Isolation InitBinary string ContainerdCommit Commit RuncCommit Commit InitCommit Commit SecurityOptions []string ProductLicense string `json:",omitempty"` DefaultAddressPools []NetworkAddressPool `json:",omitempty"` FirewallBackend *FirewallInfo `json:"FirewallBackend,omitempty"` CDISpecDirs []string DiscoveredDevices []DeviceInfo `json:",omitempty"` Containerd *ContainerdInfo `json:",omitempty"` // Warnings contains a slice of warnings that occurred while collecting // system information. These warnings are intended to be informational // messages for the user, and are not intended to be parsed / used for // other purposes, as they do not have a fixed format. Warnings []string } // ContainerdInfo holds information about the containerd instance used by the daemon. type ContainerdInfo struct { // Address is the path to the containerd socket. Address string `json:",omitempty"` // Namespaces is the containerd namespaces used by the daemon. Namespaces ContainerdNamespaces } // ContainerdNamespaces reflects the containerd namespaces used by the daemon. // // These namespaces can be configured in the daemon configuration, and are // considered to be used exclusively by the daemon, // // As these namespaces are considered to be exclusively accessed // by the daemon, it is not recommended to change these values, // or to change them to a value that is used by other systems, // such as cri-containerd. type ContainerdNamespaces struct { // Containers holds the default containerd namespace used for // containers managed by the daemon. // // The default namespace for containers is "moby", but will be // suffixed with the `.` of the remapped `root` if // user-namespaces are enabled and the containerd image-store // is used. Containers string // Plugins holds the default containerd namespace used for // plugins managed by the daemon. // // The default namespace for plugins is "moby", but will be // suffixed with the `.` of the remapped `root` if // user-namespaces are enabled and the containerd image-store // is used. Plugins string } // PluginsInfo is a temp struct holding Plugins name // registered with docker daemon. It is used by [Info] struct type PluginsInfo struct { // List of Volume plugins registered Volume []string // List of Network plugins registered Network []string // List of Authorization plugins registered Authorization []string // List of Log plugins registered Log []string } // Commit holds the Git-commit (SHA1) that a binary was built from, as reported // in the version-string of external tools, such as containerd, or runC. type Commit struct { // ID is the actual commit ID or version of external tool. ID string // Expected is the commit ID of external tool expected by dockerd as set at build time. // // Deprecated: this field is no longer used in API v1.49, but kept for backward-compatibility with older API versions. Expected string `json:",omitempty"` } // NetworkAddressPool is a temp struct used by [Info] struct. type NetworkAddressPool struct { Base string Size int } // FirewallInfo describes the firewall backend. type FirewallInfo struct { // Driver is the name of the firewall backend driver. Driver string `json:"Driver"` // Info is a list of label/value pairs, containing information related to the firewall. Info [][2]string `json:"Info,omitempty"` } // DeviceInfo represents a discoverable device from a device driver. type DeviceInfo struct { // Source indicates the origin device driver. Source string `json:"Source"` // ID is the unique identifier for the device. // Example: CDI FQDN like "vendor.com/gpu=0", or other driver-specific device ID ID string `json:"ID"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/system/runtime.go ================================================ package system // Runtime describes an OCI runtime type Runtime struct { // "Legacy" runtime configuration for runc-compatible runtimes. Path string `json:"path,omitempty"` Args []string `json:"runtimeArgs,omitempty"` // Shimv2 runtime configuration. Mutually exclusive with the legacy config above. Type string `json:"runtimeType,omitempty"` Options map[string]interface{} `json:"options,omitempty"` } // RuntimeWithStatus extends [Runtime] to hold [RuntimeStatus]. type RuntimeWithStatus struct { Runtime Status map[string]string `json:"status,omitempty"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/system/security_opts.go ================================================ package system import ( "errors" "fmt" "strings" ) // SecurityOpt contains the name and options of a security option type SecurityOpt struct { Name string Options []KeyValue } // DecodeSecurityOptions decodes a security options string slice to a // type-safe [SecurityOpt]. func DecodeSecurityOptions(opts []string) ([]SecurityOpt, error) { so := []SecurityOpt{} for _, opt := range opts { // support output from a < 1.13 docker daemon if !strings.Contains(opt, "=") { so = append(so, SecurityOpt{Name: opt}) continue } secopt := SecurityOpt{} for _, s := range strings.Split(opt, ",") { k, v, ok := strings.Cut(s, "=") if !ok { return nil, fmt.Errorf("invalid security option %q", s) } if k == "" || v == "" { return nil, errors.New("invalid empty security option") } if k == "name" { secopt.Name = v continue } secopt.Options = append(secopt.Options, KeyValue{Key: k, Value: v}) } so = append(so, secopt) } return so, nil } // KeyValue holds a key/value pair. type KeyValue struct { Key, Value string } ================================================ FILE: vendor/github.com/docker/docker/api/types/time/timestamp.go ================================================ package time import ( "fmt" "math" "strconv" "strings" "time" ) // These are additional predefined layouts for use in Time.Format and Time.Parse // with --since and --until parameters for `docker logs` and `docker events` const ( rFC3339Local = "2006-01-02T15:04:05" // RFC3339 with local timezone rFC3339NanoLocal = "2006-01-02T15:04:05.999999999" // RFC3339Nano with local timezone dateWithZone = "2006-01-02Z07:00" // RFC3339 with time at 00:00:00 dateLocal = "2006-01-02" // RFC3339 with local timezone and time at 00:00:00 ) // GetTimestamp tries to parse given string as golang duration, // then RFC3339 time and finally as a Unix timestamp. If // any of these were successful, it returns a Unix timestamp // as string otherwise returns the given value back. // In case of duration input, the returned timestamp is computed // as the given reference time minus the amount of the duration. func GetTimestamp(value string, reference time.Time) (string, error) { if d, err := time.ParseDuration(value); value != "0" && err == nil { return strconv.FormatInt(reference.Add(-d).Unix(), 10), nil } var format string // if the string has a Z or a + or three dashes use parse otherwise use parseinlocation parseInLocation := !strings.ContainsAny(value, "zZ+") && strings.Count(value, "-") != 3 if strings.Contains(value, ".") { if parseInLocation { format = rFC3339NanoLocal } else { format = time.RFC3339Nano } } else if strings.Contains(value, "T") { // we want the number of colons in the T portion of the timestamp tcolons := strings.Count(value, ":") // if parseInLocation is off and we have a +/- zone offset (not Z) then // there will be an extra colon in the input for the tz offset subtract that // colon from the tcolons count if !parseInLocation && !strings.ContainsAny(value, "zZ") && tcolons > 0 { tcolons-- } if parseInLocation { switch tcolons { case 0: format = "2006-01-02T15" case 1: format = "2006-01-02T15:04" default: format = rFC3339Local } } else { switch tcolons { case 0: format = "2006-01-02T15Z07:00" case 1: format = "2006-01-02T15:04Z07:00" default: format = time.RFC3339 } } } else if parseInLocation { format = dateLocal } else { format = dateWithZone } var t time.Time var err error if parseInLocation { t, err = time.ParseInLocation(format, value, time.FixedZone(reference.Zone())) } else { t, err = time.Parse(format, value) } if err != nil { // if there is a `-` then it's an RFC3339 like timestamp if strings.Contains(value, "-") { return "", err // was probably an RFC3339 like timestamp but the parser failed with an error } if _, _, err := parseTimestamp(value); err != nil { return "", fmt.Errorf("failed to parse value as time or duration: %q", value) } return value, nil // unix timestamp in and out case (meaning: the value passed at the command line is already in the right format for passing to the server) } return fmt.Sprintf("%d.%09d", t.Unix(), int64(t.Nanosecond())), nil } // ParseTimestamps returns seconds and nanoseconds from a timestamp that has // the format ("%d.%09d", time.Unix(), int64(time.Nanosecond())). // If the incoming nanosecond portion is longer than 9 digits it is truncated. // The expectation is that the seconds and nanoseconds will be used to create a // time variable. For example: // // seconds, nanoseconds, _ := ParseTimestamp("1136073600.000000001",0) // since := time.Unix(seconds, nanoseconds) // // returns seconds as defaultSeconds if value == "" func ParseTimestamps(value string, defaultSeconds int64) (seconds int64, nanoseconds int64, _ error) { if value == "" { return defaultSeconds, 0, nil } return parseTimestamp(value) } func parseTimestamp(value string) (seconds int64, nanoseconds int64, _ error) { s, n, ok := strings.Cut(value, ".") sec, err := strconv.ParseInt(s, 10, 64) if err != nil { return sec, 0, err } if !ok { return sec, 0, nil } nsec, err := strconv.ParseInt(n, 10, 64) if err != nil { return sec, nsec, err } // should already be in nanoseconds but just in case convert n to nanoseconds nsec = int64(float64(nsec) * math.Pow(float64(10), float64(9-len(n)))) return sec, nsec, nil } ================================================ FILE: vendor/github.com/docker/docker/api/types/types.go ================================================ package types import ( "github.com/docker/docker/api/types/build" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/image" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/api/types/volume" ) const ( // MediaTypeRawStream is vendor specific MIME-Type set for raw TTY streams MediaTypeRawStream = "application/vnd.docker.raw-stream" // MediaTypeMultiplexedStream is vendor specific MIME-Type set for stdin/stdout/stderr multiplexed streams MediaTypeMultiplexedStream = "application/vnd.docker.multiplexed-stream" ) // Ping contains response of Engine API: // GET "/_ping" type Ping struct { APIVersion string OSType string Experimental bool BuilderVersion build.BuilderVersion // SwarmStatus provides information about the current swarm status of the // engine, obtained from the "Swarm" header in the API response. // // It can be a nil struct if the API version does not provide this header // in the ping response, or if an error occurred, in which case the client // should use other ways to get the current swarm status, such as the /swarm // endpoint. SwarmStatus *swarm.Status } // ComponentVersion describes the version information for a specific component. type ComponentVersion struct { Name string Version string Details map[string]string `json:",omitempty"` } // Version contains response of Engine API: // GET "/version" type Version struct { Platform struct{ Name string } `json:",omitempty"` Components []ComponentVersion `json:",omitempty"` // The following fields are deprecated, they relate to the Engine component and are kept for backwards compatibility Version string APIVersion string `json:"ApiVersion"` MinAPIVersion string `json:"MinAPIVersion,omitempty"` GitCommit string GoVersion string Os string Arch string KernelVersion string `json:",omitempty"` Experimental bool `json:",omitempty"` BuildTime string `json:",omitempty"` } // DiskUsageObject represents an object type used for disk usage query filtering. type DiskUsageObject string const ( // ContainerObject represents a container DiskUsageObject. ContainerObject DiskUsageObject = "container" // ImageObject represents an image DiskUsageObject. ImageObject DiskUsageObject = "image" // VolumeObject represents a volume DiskUsageObject. VolumeObject DiskUsageObject = "volume" // BuildCacheObject represents a build-cache DiskUsageObject. BuildCacheObject DiskUsageObject = "build-cache" ) // DiskUsageOptions holds parameters for system disk usage query. type DiskUsageOptions struct { // Types specifies what object types to include in the response. If empty, // all object types are returned. Types []DiskUsageObject } // DiskUsage contains response of Engine API: // GET "/system/df" type DiskUsage struct { LayersSize int64 Images []*image.Summary Containers []*container.Summary Volumes []*volume.Volume BuildCache []*build.CacheRecord BuilderSize int64 `json:",omitempty"` // Deprecated: deprecated in API 1.38, and no longer used since API 1.40. } // PushResult contains the tag, manifest digest, and manifest size from the // push. It's used to signal this information to the trust code in the client // so it can sign the manifest if necessary. type PushResult struct { Tag string Digest string Size int } ================================================ FILE: vendor/github.com/docker/docker/api/types/types_deprecated.go ================================================ package types import ( "context" "github.com/docker/docker/api/types/build" "github.com/docker/docker/api/types/common" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/image" "github.com/docker/docker/api/types/storage" "github.com/docker/docker/api/types/swarm" ) // IDResponse Response to an API call that returns just an Id. // // Deprecated: use either [container.CommitResponse] or [container.ExecCreateResponse]. It will be removed in the next release. type IDResponse = common.IDResponse // ContainerJSONBase contains response of Engine API GET "/containers/{name:.*}/json" // for API version 1.18 and older. // // Deprecated: use [container.InspectResponse] or [container.ContainerJSONBase]. It will be removed in the next release. type ContainerJSONBase = container.ContainerJSONBase // ContainerJSON is the response for the GET "/containers/{name:.*}/json" // endpoint. // // Deprecated: use [container.InspectResponse]. It will be removed in the next release. type ContainerJSON = container.InspectResponse // Container contains response of Engine API: // GET "/containers/json" // // Deprecated: use [container.Summary]. type Container = container.Summary // ContainerState stores container's running state // // Deprecated: use [container.State]. type ContainerState = container.State // NetworkSettings exposes the network settings in the api. // // Deprecated: use [container.NetworkSettings]. type NetworkSettings = container.NetworkSettings // NetworkSettingsBase holds networking state for a container when inspecting it. // // Deprecated: [container.NetworkSettingsBase] will be removed in v29. Prefer // accessing the fields it contains through [container.NetworkSettings]. type NetworkSettingsBase = container.NetworkSettingsBase //nolint:staticcheck // ignore SA1019: NetworkSettingsBase is deprecated in v28.4. // DefaultNetworkSettings holds network information // during the 2 release deprecation period. // It will be removed in Docker 1.11. // // Deprecated: use [container.DefaultNetworkSettings]. type DefaultNetworkSettings = container.DefaultNetworkSettings //nolint:staticcheck // ignore SA1019: DefaultNetworkSettings is deprecated in v28.4. // SummaryNetworkSettings provides a summary of container's networks // in /containers/json. // // Deprecated: use [container.NetworkSettingsSummary]. type SummaryNetworkSettings = container.NetworkSettingsSummary // Health states const ( NoHealthcheck = container.NoHealthcheck // Deprecated: use [container.NoHealthcheck]. Starting = container.Starting // Deprecated: use [container.Starting]. Healthy = container.Healthy // Deprecated: use [container.Healthy]. Unhealthy = container.Unhealthy // Deprecated: use [container.Unhealthy]. ) // Health stores information about the container's healthcheck results. // // Deprecated: use [container.Health]. type Health = container.Health // HealthcheckResult stores information about a single run of a healthcheck probe. // // Deprecated: use [container.HealthcheckResult]. type HealthcheckResult = container.HealthcheckResult // MountPoint represents a mount point configuration inside the container. // This is used for reporting the mountpoints in use by a container. // // Deprecated: use [container.MountPoint]. type MountPoint = container.MountPoint // Port An open port on a container // // Deprecated: use [container.Port]. type Port = container.Port // GraphDriverData Information about the storage driver used to store the container's and // image's filesystem. // // Deprecated: use [storage.DriverData]. type GraphDriverData = storage.DriverData // RootFS returns Image's RootFS description including the layer IDs. // // Deprecated: use [image.RootFS]. type RootFS = image.RootFS // ImageInspect contains response of Engine API: // GET "/images/{name:.*}/json" // // Deprecated: use [image.InspectResponse]. type ImageInspect = image.InspectResponse // RequestPrivilegeFunc is a function interface that clients can supply to // retry operations after getting an authorization error. // This function returns the registry authentication header value in base64 // format, or an error if the privilege request fails. // // Deprecated: moved to [github.com/docker/docker/api/types/registry.RequestAuthConfig]. type RequestPrivilegeFunc func(context.Context) (string, error) // SecretCreateResponse contains the information returned to a client // on the creation of a new secret. // // Deprecated: use [swarm.SecretCreateResponse]. type SecretCreateResponse = swarm.SecretCreateResponse // SecretListOptions holds parameters to list secrets // // Deprecated: use [swarm.SecretListOptions]. type SecretListOptions = swarm.SecretListOptions // ConfigCreateResponse contains the information returned to a client // on the creation of a new config. // // Deprecated: use [swarm.ConfigCreateResponse]. type ConfigCreateResponse = swarm.ConfigCreateResponse // ConfigListOptions holds parameters to list configs // // Deprecated: use [swarm.ConfigListOptions]. type ConfigListOptions = swarm.ConfigListOptions // NodeListOptions holds parameters to list nodes with. // // Deprecated: use [swarm.NodeListOptions]. type NodeListOptions = swarm.NodeListOptions // NodeRemoveOptions holds parameters to remove nodes with. // // Deprecated: use [swarm.NodeRemoveOptions]. type NodeRemoveOptions = swarm.NodeRemoveOptions // TaskListOptions holds parameters to list tasks with. // // Deprecated: use [swarm.TaskListOptions]. type TaskListOptions = swarm.TaskListOptions // ServiceCreateOptions contains the options to use when creating a service. // // Deprecated: use [swarm.ServiceCreateOptions]. type ServiceCreateOptions = swarm.ServiceCreateOptions // ServiceUpdateOptions contains the options to be used for updating services. // // Deprecated: use [swarm.ServiceCreateOptions]. type ServiceUpdateOptions = swarm.ServiceUpdateOptions const ( RegistryAuthFromSpec = swarm.RegistryAuthFromSpec // Deprecated: use [swarm.RegistryAuthFromSpec]. RegistryAuthFromPreviousSpec = swarm.RegistryAuthFromPreviousSpec // Deprecated: use [swarm.RegistryAuthFromPreviousSpec]. ) // ServiceListOptions holds parameters to list services with. // // Deprecated: use [swarm.ServiceListOptions]. type ServiceListOptions = swarm.ServiceListOptions // ServiceInspectOptions holds parameters related to the "service inspect" // operation. // // Deprecated: use [swarm.ServiceInspectOptions]. type ServiceInspectOptions = swarm.ServiceInspectOptions // SwarmUnlockKeyResponse contains the response for Engine API: // GET /swarm/unlockkey // // Deprecated: use [swarm.UnlockKeyResponse]. type SwarmUnlockKeyResponse = swarm.UnlockKeyResponse // BuildCache contains information about a build cache record. // // Deprecated: deprecated in API 1.49. Use [build.CacheRecord] instead. type BuildCache = build.CacheRecord // BuildCachePruneOptions hold parameters to prune the build cache // // Deprecated: use [build.CachePruneOptions]. type BuildCachePruneOptions = build.CachePruneOptions // BuildCachePruneReport contains the response for Engine API: // POST "/build/prune" // // Deprecated: use [build.CachePruneReport]. type BuildCachePruneReport = build.CachePruneReport // BuildResult contains the image id of a successful build/ // // Deprecated: use [build.Result]. type BuildResult = build.Result // ImageBuildOptions holds the information // necessary to build images. // // Deprecated: use [build.ImageBuildOptions]. type ImageBuildOptions = build.ImageBuildOptions // ImageBuildOutput defines configuration for exporting a build result // // Deprecated: use [build.ImageBuildOutput]. type ImageBuildOutput = build.ImageBuildOutput // ImageBuildResponse holds information // returned by a server after building // an image. // // Deprecated: use [build.ImageBuildResponse]. type ImageBuildResponse = build.ImageBuildResponse // BuilderVersion sets the version of underlying builder to use // // Deprecated: use [build.BuilderVersion]. type BuilderVersion = build.BuilderVersion const ( // BuilderV1 is the first generation builder in docker daemon // // Deprecated: use [build.BuilderV1]. BuilderV1 = build.BuilderV1 // BuilderBuildKit is builder based on moby/buildkit project // // Deprecated: use [build.BuilderBuildKit]. BuilderBuildKit = build.BuilderBuildKit ) ================================================ FILE: vendor/github.com/docker/docker/api/types/versions/compare.go ================================================ package versions import ( "strconv" "strings" ) // compare compares two version strings // returns -1 if v1 < v2, 1 if v1 > v2, 0 otherwise. func compare(v1, v2 string) int { if v1 == v2 { return 0 } var ( currTab = strings.Split(v1, ".") otherTab = strings.Split(v2, ".") ) maxVer := len(currTab) if len(otherTab) > maxVer { maxVer = len(otherTab) } for i := 0; i < maxVer; i++ { var currInt, otherInt int if len(currTab) > i { currInt, _ = strconv.Atoi(currTab[i]) } if len(otherTab) > i { otherInt, _ = strconv.Atoi(otherTab[i]) } if currInt > otherInt { return 1 } if otherInt > currInt { return -1 } } return 0 } // LessThan checks if a version is less than another func LessThan(v, other string) bool { return compare(v, other) == -1 } // LessThanOrEqualTo checks if a version is less than or equal to another func LessThanOrEqualTo(v, other string) bool { return compare(v, other) <= 0 } // GreaterThan checks if a version is greater than another func GreaterThan(v, other string) bool { return compare(v, other) == 1 } // GreaterThanOrEqualTo checks if a version is greater than or equal to another func GreaterThanOrEqualTo(v, other string) bool { return compare(v, other) >= 0 } // Equal checks if a version is equal to another func Equal(v, other string) bool { return compare(v, other) == 0 } ================================================ FILE: vendor/github.com/docker/docker/api/types/volume/cluster_volume.go ================================================ package volume import ( "github.com/docker/docker/api/types/swarm" ) // ClusterVolume contains options and information specific to, and only present // on, Swarm CSI cluster volumes. type ClusterVolume struct { // ID is the Swarm ID of the volume. Because cluster volumes are Swarm // objects, they have an ID, unlike non-cluster volumes, which only have a // Name. This ID can be used to refer to the cluster volume. ID string // Meta is the swarm metadata about this volume. swarm.Meta // Spec is the cluster-specific options from which this volume is derived. Spec ClusterVolumeSpec // PublishStatus contains the status of the volume as it pertains to its // publishing on Nodes. PublishStatus []*PublishStatus `json:",omitempty"` // Info is information about the global status of the volume. Info *Info `json:",omitempty"` } // ClusterVolumeSpec contains the spec used to create this volume. type ClusterVolumeSpec struct { // Group defines the volume group of this volume. Volumes belonging to the // same group can be referred to by group name when creating Services. // Referring to a volume by group instructs swarm to treat volumes in that // group interchangeably for the purpose of scheduling. Volumes with an // empty string for a group technically all belong to the same, emptystring // group. Group string `json:",omitempty"` // AccessMode defines how the volume is used by tasks. AccessMode *AccessMode `json:",omitempty"` // AccessibilityRequirements specifies where in the cluster a volume must // be accessible from. // // This field must be empty if the plugin does not support // VOLUME_ACCESSIBILITY_CONSTRAINTS capabilities. If it is present but the // plugin does not support it, volume will not be created. // // If AccessibilityRequirements is empty, but the plugin does support // VOLUME_ACCESSIBILITY_CONSTRAINTS, then Swarmkit will assume the entire // cluster is a valid target for the volume. AccessibilityRequirements *TopologyRequirement `json:",omitempty"` // CapacityRange defines the desired capacity that the volume should be // created with. If nil, the plugin will decide the capacity. CapacityRange *CapacityRange `json:",omitempty"` // Secrets defines Swarm Secrets that are passed to the CSI storage plugin // when operating on this volume. Secrets []Secret `json:",omitempty"` // Availability is the Volume's desired availability. Analogous to Node // Availability, this allows the user to take volumes offline in order to // update or delete them. Availability Availability `json:",omitempty"` } // Availability specifies the availability of the volume. type Availability string const ( // AvailabilityActive indicates that the volume is active and fully // schedulable on the cluster. AvailabilityActive Availability = "active" // AvailabilityPause indicates that no new workloads should use the // volume, but existing workloads can continue to use it. AvailabilityPause Availability = "pause" // AvailabilityDrain indicates that all workloads using this volume // should be rescheduled, and the volume unpublished from all nodes. AvailabilityDrain Availability = "drain" ) // AccessMode defines the access mode of a volume. type AccessMode struct { // Scope defines the set of nodes this volume can be used on at one time. Scope Scope `json:",omitempty"` // Sharing defines the number and way that different tasks can use this // volume at one time. Sharing SharingMode `json:",omitempty"` // MountVolume defines options for using this volume as a Mount-type // volume. // // Either BlockVolume or MountVolume, but not both, must be present. MountVolume *TypeMount `json:",omitempty"` // BlockVolume defines options for using this volume as a Block-type // volume. // // Either BlockVolume or MountVolume, but not both, must be present. BlockVolume *TypeBlock `json:",omitempty"` } // Scope defines the Scope of a Cluster Volume. This is how many nodes a // Volume can be accessed simultaneously on. type Scope string const ( // ScopeSingleNode indicates the volume can be used on one node at a // time. ScopeSingleNode Scope = "single" // ScopeMultiNode indicates the volume can be used on many nodes at // the same time. ScopeMultiNode Scope = "multi" ) // SharingMode defines the Sharing of a Cluster Volume. This is how Tasks using a // Volume at the same time can use it. type SharingMode string const ( // SharingNone indicates that only one Task may use the Volume at a // time. SharingNone SharingMode = "none" // SharingReadOnly indicates that the Volume may be shared by any // number of Tasks, but they must be read-only. SharingReadOnly SharingMode = "readonly" // SharingOneWriter indicates that the Volume may be shared by any // number of Tasks, but all after the first must be read-only. SharingOneWriter SharingMode = "onewriter" // SharingAll means that the Volume may be shared by any number of // Tasks, as readers or writers. SharingAll SharingMode = "all" ) // TypeBlock defines options for using a volume as a block-type volume. // // Intentionally empty. type TypeBlock struct{} // TypeMount contains options for using a volume as a Mount-type // volume. type TypeMount struct { // FsType specifies the filesystem type for the mount volume. Optional. FsType string `json:",omitempty"` // MountFlags defines flags to pass when mounting the volume. Optional. MountFlags []string `json:",omitempty"` } // TopologyRequirement expresses the user's requirements for a volume's // accessible topology. type TopologyRequirement struct { // Requisite specifies a list of Topologies, at least one of which the // volume must be accessible from. // // Taken verbatim from the CSI Spec: // // Specifies the list of topologies the provisioned volume MUST be // accessible from. // This field is OPTIONAL. If TopologyRequirement is specified either // requisite or preferred or both MUST be specified. // // If requisite is specified, the provisioned volume MUST be // accessible from at least one of the requisite topologies. // // Given // x = number of topologies provisioned volume is accessible from // n = number of requisite topologies // The CO MUST ensure n >= 1. The SP MUST ensure x >= 1 // If x==n, then the SP MUST make the provisioned volume available to // all topologies from the list of requisite topologies. If it is // unable to do so, the SP MUST fail the CreateVolume call. // For example, if a volume should be accessible from a single zone, // and requisite = // {"region": "R1", "zone": "Z2"} // then the provisioned volume MUST be accessible from the "region" // "R1" and the "zone" "Z2". // Similarly, if a volume should be accessible from two zones, and // requisite = // {"region": "R1", "zone": "Z2"}, // {"region": "R1", "zone": "Z3"} // then the provisioned volume MUST be accessible from the "region" // "R1" and both "zone" "Z2" and "zone" "Z3". // // If xn, then the SP MUST make the provisioned volume available from // all topologies from the list of requisite topologies and MAY choose // the remaining x-n unique topologies from the list of all possible // topologies. If it is unable to do so, the SP MUST fail the // CreateVolume call. // For example, if a volume should be accessible from two zones, and // requisite = // {"region": "R1", "zone": "Z2"} // then the provisioned volume MUST be accessible from the "region" // "R1" and the "zone" "Z2" and the SP may select the second zone // independently, e.g. "R1/Z4". Requisite []Topology `json:",omitempty"` // Preferred is a list of Topologies that the volume should attempt to be // provisioned in. // // Taken from the CSI spec: // // Specifies the list of topologies the CO would prefer the volume to // be provisioned in. // // This field is OPTIONAL. If TopologyRequirement is specified either // requisite or preferred or both MUST be specified. // // An SP MUST attempt to make the provisioned volume available using // the preferred topologies in order from first to last. // // If requisite is specified, all topologies in preferred list MUST // also be present in the list of requisite topologies. // // If the SP is unable to make the provisioned volume available // from any of the preferred topologies, the SP MAY choose a topology // from the list of requisite topologies. // If the list of requisite topologies is not specified, then the SP // MAY choose from the list of all possible topologies. // If the list of requisite topologies is specified and the SP is // unable to make the provisioned volume available from any of the // requisite topologies it MUST fail the CreateVolume call. // // Example 1: // Given a volume should be accessible from a single zone, and // requisite = // {"region": "R1", "zone": "Z2"}, // {"region": "R1", "zone": "Z3"} // preferred = // {"region": "R1", "zone": "Z3"} // then the SP SHOULD first attempt to make the provisioned volume // available from "zone" "Z3" in the "region" "R1" and fall back to // "zone" "Z2" in the "region" "R1" if that is not possible. // // Example 2: // Given a volume should be accessible from a single zone, and // requisite = // {"region": "R1", "zone": "Z2"}, // {"region": "R1", "zone": "Z3"}, // {"region": "R1", "zone": "Z4"}, // {"region": "R1", "zone": "Z5"} // preferred = // {"region": "R1", "zone": "Z4"}, // {"region": "R1", "zone": "Z2"} // then the SP SHOULD first attempt to make the provisioned volume // accessible from "zone" "Z4" in the "region" "R1" and fall back to // "zone" "Z2" in the "region" "R1" if that is not possible. If that // is not possible, the SP may choose between either the "zone" // "Z3" or "Z5" in the "region" "R1". // // Example 3: // Given a volume should be accessible from TWO zones (because an // opaque parameter in CreateVolumeRequest, for example, specifies // the volume is accessible from two zones, aka synchronously // replicated), and // requisite = // {"region": "R1", "zone": "Z2"}, // {"region": "R1", "zone": "Z3"}, // {"region": "R1", "zone": "Z4"}, // {"region": "R1", "zone": "Z5"} // preferred = // {"region": "R1", "zone": "Z5"}, // {"region": "R1", "zone": "Z3"} // then the SP SHOULD first attempt to make the provisioned volume // accessible from the combination of the two "zones" "Z5" and "Z3" in // the "region" "R1". If that's not possible, it should fall back to // a combination of "Z5" and other possibilities from the list of // requisite. If that's not possible, it should fall back to a // combination of "Z3" and other possibilities from the list of // requisite. If that's not possible, it should fall back to a // combination of other possibilities from the list of requisite. Preferred []Topology `json:",omitempty"` } // Topology is a map of topological domains to topological segments. // // This description is taken verbatim from the CSI Spec: // // A topological domain is a sub-division of a cluster, like "region", // "zone", "rack", etc. // A topological segment is a specific instance of a topological domain, // like "zone3", "rack3", etc. // For example {"com.company/zone": "Z1", "com.company/rack": "R3"} // Valid keys have two segments: an OPTIONAL prefix and name, separated // by a slash (/), for example: "com.company.example/zone". // The key name segment is REQUIRED. The prefix is OPTIONAL. // The key name MUST be 63 characters or less, begin and end with an // alphanumeric character ([a-z0-9A-Z]), and contain only dashes (-), // underscores (_), dots (.), or alphanumerics in between, for example // "zone". // The key prefix MUST be 63 characters or less, begin and end with a // lower-case alphanumeric character ([a-z0-9]), contain only // dashes (-), dots (.), or lower-case alphanumerics in between, and // follow domain name notation format // (https://tools.ietf.org/html/rfc1035#section-2.3.1). // The key prefix SHOULD include the plugin's host company name and/or // the plugin name, to minimize the possibility of collisions with keys // from other plugins. // If a key prefix is specified, it MUST be identical across all // topology keys returned by the SP (across all RPCs). // Keys MUST be case-insensitive. Meaning the keys "Zone" and "zone" // MUST not both exist. // Each value (topological segment) MUST contain 1 or more strings. // Each string MUST be 63 characters or less and begin and end with an // alphanumeric character with '-', '_', '.', or alphanumerics in // between. type Topology struct { Segments map[string]string `json:",omitempty"` } // CapacityRange describes the minimum and maximum capacity a volume should be // created with type CapacityRange struct { // RequiredBytes specifies that a volume must be at least this big. The // value of 0 indicates an unspecified minimum. RequiredBytes int64 // LimitBytes specifies that a volume must not be bigger than this. The // value of 0 indicates an unspecified maximum LimitBytes int64 } // Secret represents a Swarm Secret value that must be passed to the CSI // storage plugin when operating on this Volume. It represents one key-value // pair of possibly many. type Secret struct { // Key is the name of the key of the key-value pair passed to the plugin. Key string // Secret is the swarm Secret object from which to read data. This can be a // Secret name or ID. The Secret data is retrieved by Swarm and used as the // value of the key-value pair passed to the plugin. Secret string } // PublishState represents the state of a Volume as it pertains to its // use on a particular Node. type PublishState string const ( // StatePending indicates that the volume should be published on // this node, but the call to ControllerPublishVolume has not been // successfully completed yet and the result recorded by swarmkit. StatePending PublishState = "pending-publish" // StatePublished means the volume is published successfully to the node. StatePublished PublishState = "published" // StatePendingNodeUnpublish indicates that the Volume should be // unpublished on the Node, and we're waiting for confirmation that it has // done so. After the Node has confirmed that the Volume has been // unpublished, the state will move to StatePendingUnpublish. StatePendingNodeUnpublish PublishState = "pending-node-unpublish" // StatePendingUnpublish means the volume is still published to the node // by the controller, awaiting the operation to unpublish it. StatePendingUnpublish PublishState = "pending-controller-unpublish" ) // PublishStatus represents the status of the volume as published to an // individual node type PublishStatus struct { // NodeID is the ID of the swarm node this Volume is published to. NodeID string `json:",omitempty"` // State is the publish state of the volume. State PublishState `json:",omitempty"` // PublishContext is the PublishContext returned by the CSI plugin when // a volume is published. PublishContext map[string]string `json:",omitempty"` } // Info contains information about the Volume as a whole as provided by // the CSI storage plugin. type Info struct { // CapacityBytes is the capacity of the volume in bytes. A value of 0 // indicates that the capacity is unknown. CapacityBytes int64 `json:",omitempty"` // VolumeContext is the context originating from the CSI storage plugin // when the Volume is created. VolumeContext map[string]string `json:",omitempty"` // VolumeID is the ID of the Volume as seen by the CSI storage plugin. This // is distinct from the Volume's Swarm ID, which is the ID used by all of // the Docker Engine to refer to the Volume. If this field is blank, then // the Volume has not been successfully created yet. VolumeID string `json:",omitempty"` // AccessibleTopology is the topology this volume is actually accessible // from. AccessibleTopology []Topology `json:",omitempty"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/volume/create_options.go ================================================ package volume // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command // CreateOptions VolumeConfig // // Volume configuration // swagger:model CreateOptions type CreateOptions struct { // cluster volume spec ClusterVolumeSpec *ClusterVolumeSpec `json:"ClusterVolumeSpec,omitempty"` // Name of the volume driver to use. Driver string `json:"Driver,omitempty"` // A mapping of driver options and values. These options are // passed directly to the driver and are driver specific. // DriverOpts map[string]string `json:"DriverOpts,omitempty"` // User-defined key/value metadata. Labels map[string]string `json:"Labels,omitempty"` // The new volume's name. If not specified, Docker generates a name. // Name string `json:"Name,omitempty"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/volume/disk_usage.go ================================================ package volume // DiskUsage contains disk usage for volumes. // // Deprecated: this type is no longer used and will be removed in the next release. type DiskUsage struct { TotalSize int64 Reclaimable int64 Items []*Volume } ================================================ FILE: vendor/github.com/docker/docker/api/types/volume/list_response.go ================================================ package volume // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command // ListResponse VolumeListResponse // // Volume list response // swagger:model ListResponse type ListResponse struct { // List of volumes Volumes []*Volume `json:"Volumes"` // Warnings that occurred when fetching the list of volumes. // Warnings []string `json:"Warnings"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/volume/options.go ================================================ package volume import "github.com/docker/docker/api/types/filters" // ListOptions holds parameters to list volumes. type ListOptions struct { Filters filters.Args } // PruneReport contains the response for Engine API: // POST "/volumes/prune" type PruneReport struct { VolumesDeleted []string SpaceReclaimed uint64 } ================================================ FILE: vendor/github.com/docker/docker/api/types/volume/volume.go ================================================ package volume // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command // Volume volume // swagger:model Volume type Volume struct { // cluster volume ClusterVolume *ClusterVolume `json:"ClusterVolume,omitempty"` // Date/Time the volume was created. CreatedAt string `json:"CreatedAt,omitempty"` // Name of the volume driver used by the volume. // Required: true Driver string `json:"Driver"` // User-defined key/value metadata. // Required: true Labels map[string]string `json:"Labels"` // Mount path of the volume on the host. // Required: true Mountpoint string `json:"Mountpoint"` // Name of the volume. // Required: true Name string `json:"Name"` // The driver specific options used when creating the volume. // // Required: true Options map[string]string `json:"Options"` // The level at which the volume exists. Either `global` for cluster-wide, // or `local` for machine level. // // Required: true Scope string `json:"Scope"` // Low-level details about the volume, provided by the volume driver. // Details are returned as a map with key/value pairs: // `{"key":"value","key2":"value2"}`. // // The `Status` field is optional, and is omitted if the volume driver // does not support this feature. // Status map[string]interface{} `json:"Status,omitempty"` // usage data UsageData *UsageData `json:"UsageData,omitempty"` } // UsageData Usage details about the volume. This information is used by the // `GET /system/df` endpoint, and omitted in other endpoints. // // swagger:model UsageData type UsageData struct { // The number of containers referencing this volume. This field // is set to `-1` if the reference-count is not available. // // Required: true RefCount int64 `json:"RefCount"` // Amount of disk space used by the volume (in bytes). This information // is only available for volumes created with the `"local"` volume // driver. For volumes created with other volume drivers, this field // is set to `-1` ("not available") // // Required: true Size int64 `json:"Size"` } ================================================ FILE: vendor/github.com/docker/docker/api/types/volume/volume_update.go ================================================ package volume // UpdateOptions is configuration to update a Volume with. type UpdateOptions struct { // Spec is the ClusterVolumeSpec to update the volume to. Spec *ClusterVolumeSpec `json:"Spec,omitempty"` } ================================================ FILE: vendor/github.com/docker/docker/client/README.md ================================================ # Go client for the Docker Engine API The `docker` command uses this package to communicate with the daemon. It can also be used by your own Go applications to do anything the command-line interface does – running containers, pulling images, managing swarms, etc. For example, to list all containers (the equivalent of `docker ps --all`): ```go package main import ( "context" "fmt" "github.com/docker/docker/api/types/container" "github.com/docker/docker/client" ) func main() { apiClient, err := client.NewClientWithOpts(client.FromEnv) if err != nil { panic(err) } defer apiClient.Close() containers, err := apiClient.ContainerList(context.Background(), container.ListOptions{All: true}) if err != nil { panic(err) } for _, ctr := range containers { fmt.Printf("%s %s (status: %s)\n", ctr.ID, ctr.Image, ctr.Status) } } ``` [Full documentation is available on pkg.go.dev.](https://pkg.go.dev/github.com/docker/docker/client) ================================================ FILE: vendor/github.com/docker/docker/client/build_cancel.go ================================================ package client import ( "context" "net/url" ) // BuildCancel requests the daemon to cancel the ongoing build request. func (cli *Client) BuildCancel(ctx context.Context, id string) error { query := url.Values{} query.Set("id", id) resp, err := cli.post(ctx, "/build/cancel", query, nil, nil) ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/build_prune.go ================================================ package client import ( "context" "encoding/json" "net/url" "strconv" "github.com/docker/docker/api/types/build" "github.com/docker/docker/api/types/filters" "github.com/pkg/errors" ) // BuildCachePrune requests the daemon to delete unused cache data func (cli *Client) BuildCachePrune(ctx context.Context, opts build.CachePruneOptions) (*build.CachePruneReport, error) { if err := cli.NewVersionError(ctx, "1.31", "build prune"); err != nil { return nil, err } query := url.Values{} if opts.All { query.Set("all", "1") } if opts.KeepStorage != 0 { query.Set("keep-storage", strconv.Itoa(int(opts.KeepStorage))) } if opts.ReservedSpace != 0 { query.Set("reserved-space", strconv.Itoa(int(opts.ReservedSpace))) } if opts.MaxUsedSpace != 0 { query.Set("max-used-space", strconv.Itoa(int(opts.MaxUsedSpace))) } if opts.MinFreeSpace != 0 { query.Set("min-free-space", strconv.Itoa(int(opts.MinFreeSpace))) } f, err := filters.ToJSON(opts.Filters) if err != nil { return nil, errors.Wrap(err, "prune could not marshal filters option") } query.Set("filters", f) resp, err := cli.post(ctx, "/build/prune", query, nil, nil) defer ensureReaderClosed(resp) if err != nil { return nil, err } report := build.CachePruneReport{} if err := json.NewDecoder(resp.Body).Decode(&report); err != nil { return nil, errors.Wrap(err, "error retrieving disk usage") } return &report, nil } ================================================ FILE: vendor/github.com/docker/docker/client/checkpoint.go ================================================ package client import ( "context" "github.com/docker/docker/api/types/checkpoint" ) // CheckpointAPIClient defines API client methods for the checkpoints. // // Experimental: checkpoint and restore is still an experimental feature, // and only available if the daemon is running with experimental features // enabled. type CheckpointAPIClient interface { CheckpointCreate(ctx context.Context, container string, options checkpoint.CreateOptions) error CheckpointDelete(ctx context.Context, container string, options checkpoint.DeleteOptions) error CheckpointList(ctx context.Context, container string, options checkpoint.ListOptions) ([]checkpoint.Summary, error) } ================================================ FILE: vendor/github.com/docker/docker/client/checkpoint_create.go ================================================ package client import ( "context" "github.com/docker/docker/api/types/checkpoint" ) // CheckpointCreate creates a checkpoint from the given container with the given name func (cli *Client) CheckpointCreate(ctx context.Context, containerID string, options checkpoint.CreateOptions) error { containerID, err := trimID("container", containerID) if err != nil { return err } resp, err := cli.post(ctx, "/containers/"+containerID+"/checkpoints", nil, options, nil) ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/checkpoint_delete.go ================================================ package client import ( "context" "net/url" "github.com/docker/docker/api/types/checkpoint" ) // CheckpointDelete deletes the checkpoint with the given name from the given container func (cli *Client) CheckpointDelete(ctx context.Context, containerID string, options checkpoint.DeleteOptions) error { containerID, err := trimID("container", containerID) if err != nil { return err } query := url.Values{} if options.CheckpointDir != "" { query.Set("dir", options.CheckpointDir) } resp, err := cli.delete(ctx, "/containers/"+containerID+"/checkpoints/"+options.CheckpointID, query, nil) ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/checkpoint_list.go ================================================ package client import ( "context" "encoding/json" "net/url" "github.com/docker/docker/api/types/checkpoint" ) // CheckpointList returns the checkpoints of the given container in the docker host func (cli *Client) CheckpointList(ctx context.Context, container string, options checkpoint.ListOptions) ([]checkpoint.Summary, error) { var checkpoints []checkpoint.Summary query := url.Values{} if options.CheckpointDir != "" { query.Set("dir", options.CheckpointDir) } resp, err := cli.get(ctx, "/containers/"+container+"/checkpoints", query, nil) defer ensureReaderClosed(resp) if err != nil { return checkpoints, err } err = json.NewDecoder(resp.Body).Decode(&checkpoints) return checkpoints, err } ================================================ FILE: vendor/github.com/docker/docker/client/client.go ================================================ /* Package client is a Go client for the Docker Engine API. For more information about the Engine API, see the documentation: https://docs.docker.com/reference/api/engine/ # Usage You use the library by constructing a client object using [NewClientWithOpts] and calling methods on it. The client can be configured from environment variables by passing the [FromEnv] option, or configured manually by passing any of the other available [Opts]. For example, to list running containers (the equivalent of "docker ps"): package main import ( "context" "fmt" "github.com/docker/docker/api/types/container" "github.com/docker/docker/client" ) func main() { cli, err := client.NewClientWithOpts(client.FromEnv) if err != nil { panic(err) } containers, err := cli.ContainerList(context.Background(), container.ListOptions{}) if err != nil { panic(err) } for _, ctr := range containers { fmt.Printf("%s %s\n", ctr.ID, ctr.Image) } } */ package client import ( "context" "crypto/tls" "net" "net/http" "net/url" "path" "strings" "sync" "sync/atomic" "time" "github.com/docker/docker/api" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/versions" "github.com/docker/go-connections/sockets" "github.com/pkg/errors" "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" ) // DummyHost is a hostname used for local communication. // // It acts as a valid formatted hostname for local connections (such as "unix://" // or "npipe://") which do not require a hostname. It should never be resolved, // but uses the special-purpose ".localhost" TLD (as defined in [RFC 2606, Section 2] // and [RFC 6761, Section 6.3]). // // [RFC 7230, Section 5.4] defines that an empty header must be used for such // cases: // // If the authority component is missing or undefined for the target URI, // then a client MUST send a Host header field with an empty field-value. // // However, [Go stdlib] enforces the semantics of HTTP(S) over TCP, does not // allow an empty header to be used, and requires req.URL.Scheme to be either // "http" or "https". // // For further details, refer to: // // - https://github.com/docker/engine-api/issues/189 // - https://github.com/golang/go/issues/13624 // - https://github.com/golang/go/issues/61076 // - https://github.com/moby/moby/issues/45935 // // [RFC 2606, Section 2]: https://www.rfc-editor.org/rfc/rfc2606.html#section-2 // [RFC 6761, Section 6.3]: https://www.rfc-editor.org/rfc/rfc6761#section-6.3 // [RFC 7230, Section 5.4]: https://datatracker.ietf.org/doc/html/rfc7230#section-5.4 // [Go stdlib]: https://github.com/golang/go/blob/6244b1946bc2101b01955468f1be502dbadd6807/src/net/http/transport.go#L558-L569 const DummyHost = "api.moby.localhost" // fallbackAPIVersion is the version to fallback to if API-version negotiation // fails. This version is the highest version of the API before API-version // negotiation was introduced. If negotiation fails (or no API version was // included in the API response), we assume the API server uses the most // recent version before negotiation was introduced. const fallbackAPIVersion = "1.24" // Ensure that Client always implements APIClient. var _ APIClient = &Client{} // Client is the API client that performs all operations // against a docker server. type Client struct { // scheme sets the scheme for the client scheme string // host holds the server address to connect to host string // proto holds the client protocol i.e. unix. proto string // addr holds the client address. addr string // basePath holds the path to prepend to the requests. basePath string // client used to send and receive http requests. client *http.Client // version of the server to talk to. version string // userAgent is the User-Agent header to use for HTTP requests. It takes // precedence over User-Agent headers set in customHTTPHeaders, and other // header variables. When set to an empty string, the User-Agent header // is removed, and no header is sent. userAgent *string // custom HTTP headers configured by users. customHTTPHeaders map[string]string // manualOverride is set to true when the version was set by users. manualOverride bool // negotiateVersion indicates if the client should automatically negotiate // the API version to use when making requests. API version negotiation is // performed on the first request, after which negotiated is set to "true" // so that subsequent requests do not re-negotiate. negotiateVersion bool // negotiated indicates that API version negotiation took place negotiated atomic.Bool // negotiateLock is used to single-flight the version negotiation process negotiateLock sync.Mutex traceOpts []otelhttp.Option // When the client transport is an *http.Transport (default) we need to do some extra things (like closing idle connections). // Store the original transport as the http.Client transport will be wrapped with tracing libs. baseTransport *http.Transport } // ErrRedirect is the error returned by checkRedirect when the request is non-GET. var ErrRedirect = errors.New("unexpected redirect in response") // CheckRedirect specifies the policy for dealing with redirect responses. It // can be set on [http.Client.CheckRedirect] to prevent HTTP redirects for // non-GET requests. It returns an [ErrRedirect] for non-GET request, otherwise // returns a [http.ErrUseLastResponse], which is special-cased by http.Client // to use the last response. // // Go 1.8 changed behavior for HTTP redirects (specifically 301, 307, and 308) // in the client. The client (and by extension API client) can be made to send // a request like "POST /containers//start" where what would normally be in the // name section of the URL is empty. This triggers an HTTP 301 from the daemon. // // In go 1.8 this 301 is converted to a GET request, and ends up getting // a 404 from the daemon. This behavior change manifests in the client in that // before, the 301 was not followed and the client did not generate an error, // but now results in a message like "Error response from daemon: page not found". func CheckRedirect(_ *http.Request, via []*http.Request) error { if via[0].Method == http.MethodGet { return http.ErrUseLastResponse } return ErrRedirect } // NewClientWithOpts initializes a new API client with a default HTTPClient, and // default API host and version. It also initializes the custom HTTP headers to // add to each request. // // It takes an optional list of [Opt] functional arguments, which are applied in // the order they're provided, which allows modifying the defaults when creating // the client. For example, the following initializes a client that configures // itself with values from environment variables ([FromEnv]), and has automatic // API version negotiation enabled ([WithAPIVersionNegotiation]). // // cli, err := client.NewClientWithOpts( // client.FromEnv, // client.WithAPIVersionNegotiation(), // ) func NewClientWithOpts(ops ...Opt) (*Client, error) { hostURL, err := ParseHostURL(DefaultDockerHost) if err != nil { return nil, err } client, err := defaultHTTPClient(hostURL) if err != nil { return nil, err } c := &Client{ host: DefaultDockerHost, version: api.DefaultVersion, client: client, proto: hostURL.Scheme, addr: hostURL.Host, traceOpts: []otelhttp.Option{ otelhttp.WithSpanNameFormatter(func(_ string, req *http.Request) string { return req.Method + " " + req.URL.Path }), }, } for _, op := range ops { if err := op(c); err != nil { return nil, err } } if tr, ok := c.client.Transport.(*http.Transport); ok { // Store the base transport before we wrap it in tracing libs below // This is used, as an example, to close idle connections when the client is closed c.baseTransport = tr } if c.scheme == "" { // TODO(stevvooe): This isn't really the right way to write clients in Go. // `NewClient` should probably only take an `*http.Client` and work from there. // Unfortunately, the model of having a host-ish/url-thingy as the connection // string has us confusing protocol and transport layers. We continue doing // this to avoid breaking existing clients but this should be addressed. if c.tlsConfig() != nil { c.scheme = "https" } else { c.scheme = "http" } } c.client.Transport = otelhttp.NewTransport(c.client.Transport, c.traceOpts...) return c, nil } func (cli *Client) tlsConfig() *tls.Config { if cli.baseTransport == nil { return nil } return cli.baseTransport.TLSClientConfig } func defaultHTTPClient(hostURL *url.URL) (*http.Client, error) { transport := &http.Transport{} // Necessary to prevent long-lived processes using the // client from leaking connections due to idle connections // not being released. // TODO: see if we can also address this from the server side, // or in go-connections. // see: https://github.com/moby/moby/issues/45539 transport.MaxIdleConns = 6 transport.IdleConnTimeout = 30 * time.Second err := sockets.ConfigureTransport(transport, hostURL.Scheme, hostURL.Host) if err != nil { return nil, err } return &http.Client{ Transport: transport, CheckRedirect: CheckRedirect, }, nil } // Close the transport used by the client func (cli *Client) Close() error { if cli.baseTransport != nil { cli.baseTransport.CloseIdleConnections() return nil } return nil } // checkVersion manually triggers API version negotiation (if configured). // This allows for version-dependent code to use the same version as will // be negotiated when making the actual requests, and for which cases // we cannot do the negotiation lazily. func (cli *Client) checkVersion(ctx context.Context) error { if !cli.manualOverride && cli.negotiateVersion && !cli.negotiated.Load() { // Ensure exclusive write access to version and negotiated fields cli.negotiateLock.Lock() defer cli.negotiateLock.Unlock() // May have been set during last execution of critical zone if cli.negotiated.Load() { return nil } ping, err := cli.Ping(ctx) if err != nil { return err } cli.negotiateAPIVersionPing(ping) } return nil } // getAPIPath returns the versioned request path to call the API. // It appends the query parameters to the path if they are not empty. func (cli *Client) getAPIPath(ctx context.Context, p string, query url.Values) string { var apiPath string _ = cli.checkVersion(ctx) if cli.version != "" { apiPath = path.Join(cli.basePath, "/v"+strings.TrimPrefix(cli.version, "v"), p) } else { apiPath = path.Join(cli.basePath, p) } return (&url.URL{Path: apiPath, RawQuery: query.Encode()}).String() } // ClientVersion returns the API version used by this client. func (cli *Client) ClientVersion() string { return cli.version } // NegotiateAPIVersion queries the API and updates the version to match the API // version. NegotiateAPIVersion downgrades the client's API version to match the // APIVersion if the ping version is lower than the default version. If the API // version reported by the server is higher than the maximum version supported // by the client, it uses the client's maximum version. // // If a manual override is in place, either through the "DOCKER_API_VERSION" // ([EnvOverrideAPIVersion]) environment variable, or if the client is initialized // with a fixed version ([WithVersion]), no negotiation is performed. // // If the API server's ping response does not contain an API version, or if the // client did not get a successful ping response, it assumes it is connected with // an old daemon that does not support API version negotiation, in which case it // downgrades to the latest version of the API before version negotiation was // added (1.24). func (cli *Client) NegotiateAPIVersion(ctx context.Context) { if !cli.manualOverride { // Avoid concurrent modification of version-related fields cli.negotiateLock.Lock() defer cli.negotiateLock.Unlock() ping, err := cli.Ping(ctx) if err != nil { // FIXME(thaJeztah): Ping returns an error when failing to connect to the API; we should not swallow the error here, and instead returning it. return } cli.negotiateAPIVersionPing(ping) } } // NegotiateAPIVersionPing downgrades the client's API version to match the // APIVersion in the ping response. If the API version in pingResponse is higher // than the maximum version supported by the client, it uses the client's maximum // version. // // If a manual override is in place, either through the "DOCKER_API_VERSION" // ([EnvOverrideAPIVersion]) environment variable, or if the client is initialized // with a fixed version ([WithVersion]), no negotiation is performed. // // If the API server's ping response does not contain an API version, we assume // we are connected with an old daemon without API version negotiation support, // and downgrade to the latest version of the API before version negotiation was // added (1.24). func (cli *Client) NegotiateAPIVersionPing(pingResponse types.Ping) { if !cli.manualOverride { // Avoid concurrent modification of version-related fields cli.negotiateLock.Lock() defer cli.negotiateLock.Unlock() cli.negotiateAPIVersionPing(pingResponse) } } // negotiateAPIVersionPing queries the API and updates the version to match the // API version from the ping response. func (cli *Client) negotiateAPIVersionPing(pingResponse types.Ping) { // default to the latest version before versioning headers existed if pingResponse.APIVersion == "" { pingResponse.APIVersion = fallbackAPIVersion } // if the client is not initialized with a version, start with the latest supported version if cli.version == "" { cli.version = api.DefaultVersion } // if server version is lower than the client version, downgrade if versions.LessThan(pingResponse.APIVersion, cli.version) { cli.version = pingResponse.APIVersion } // Store the results, so that automatic API version negotiation (if enabled) // won't be performed on the next request. if cli.negotiateVersion { cli.negotiated.Store(true) } } // DaemonHost returns the host address used by the client func (cli *Client) DaemonHost() string { return cli.host } // HTTPClient returns a copy of the HTTP client bound to the server func (cli *Client) HTTPClient() *http.Client { c := *cli.client return &c } // ParseHostURL parses a url string, validates the string is a host url, and // returns the parsed URL func ParseHostURL(host string) (*url.URL, error) { proto, addr, ok := strings.Cut(host, "://") if !ok || addr == "" { return nil, errors.Errorf("unable to parse docker host `%s`", host) } var basePath string if proto == "tcp" { parsed, err := url.Parse("tcp://" + addr) if err != nil { return nil, err } addr = parsed.Host basePath = parsed.Path } return &url.URL{ Scheme: proto, Host: addr, Path: basePath, }, nil } func (cli *Client) dialerFromTransport() func(context.Context, string, string) (net.Conn, error) { if cli.baseTransport == nil || cli.baseTransport.DialContext == nil { return nil } if cli.baseTransport.TLSClientConfig != nil { // When using a tls config we don't use the configured dialer but instead a fallback dialer... // Note: It seems like this should use the normal dialer and wrap the returned net.Conn in a tls.Conn // I honestly don't know why it doesn't do that, but it doesn't and such a change is entirely unrelated to the change in this commit. return nil } return cli.baseTransport.DialContext } // Dialer returns a dialer for a raw stream connection, with an HTTP/1.1 header, // that can be used for proxying the daemon connection. It is used by // ["docker dial-stdio"]. // // ["docker dial-stdio"]: https://github.com/docker/cli/pull/1014 func (cli *Client) Dialer() func(context.Context) (net.Conn, error) { return cli.dialer() } func (cli *Client) dialer() func(context.Context) (net.Conn, error) { return func(ctx context.Context) (net.Conn, error) { if dialFn := cli.dialerFromTransport(); dialFn != nil { return dialFn(ctx, cli.proto, cli.addr) } switch cli.proto { case "unix": return net.Dial(cli.proto, cli.addr) case "npipe": ctx, cancel := context.WithTimeout(ctx, 32*time.Second) defer cancel() return dialPipeContext(ctx, cli.addr) default: if tlsConfig := cli.tlsConfig(); tlsConfig != nil { return tls.Dial(cli.proto, cli.addr, tlsConfig) } return net.Dial(cli.proto, cli.addr) } } } ================================================ FILE: vendor/github.com/docker/docker/client/client_deprecated.go ================================================ package client import "net/http" // NewClient initializes a new API client for the given host and API version. // It uses the given http client as transport. // It also initializes the custom http headers to add to each request. // // It won't send any version information if the version number is empty. It is // highly recommended that you set a version or your client may break if the // server is upgraded. // // Deprecated: use [NewClientWithOpts] passing the [WithHost], [WithVersion], // [WithHTTPClient] and [WithHTTPHeaders] options. We recommend enabling API // version negotiation by passing the [WithAPIVersionNegotiation] option instead // of WithVersion. func NewClient(host string, version string, client *http.Client, httpHeaders map[string]string) (*Client, error) { return NewClientWithOpts(WithHost(host), WithVersion(version), WithHTTPClient(client), WithHTTPHeaders(httpHeaders)) } // NewEnvClient initializes a new API client based on environment variables. // See FromEnv for a list of support environment variables. // // Deprecated: use [NewClientWithOpts] passing the [FromEnv] option. func NewEnvClient() (*Client, error) { return NewClientWithOpts(FromEnv) } ================================================ FILE: vendor/github.com/docker/docker/client/client_interfaces.go ================================================ package client import ( "context" "io" "net" "net/http" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/build" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/events" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/image" "github.com/docker/docker/api/types/network" "github.com/docker/docker/api/types/registry" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/api/types/system" "github.com/docker/docker/api/types/volume" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) // CommonAPIClient is the common methods between stable and experimental versions of APIClient. // // Deprecated: use [APIClient] instead. This type will be an alias for [APIClient] in the next release, and removed after. type CommonAPIClient = stableAPIClient // APIClient is an interface that clients that talk with a docker server must implement. type APIClient interface { stableAPIClient CheckpointAPIClient // CheckpointAPIClient is still experimental. } type stableAPIClient interface { ConfigAPIClient ContainerAPIClient DistributionAPIClient ImageAPIClient NetworkAPIClient PluginAPIClient SystemAPIClient VolumeAPIClient ClientVersion() string DaemonHost() string HTTPClient() *http.Client ServerVersion(ctx context.Context) (types.Version, error) NegotiateAPIVersion(ctx context.Context) NegotiateAPIVersionPing(types.Ping) HijackDialer Dialer() func(context.Context) (net.Conn, error) Close() error SwarmManagementAPIClient } // SwarmManagementAPIClient defines all methods for managing Swarm-specific // objects. type SwarmManagementAPIClient interface { SwarmAPIClient NodeAPIClient ServiceAPIClient SecretAPIClient ConfigAPIClient } // HijackDialer defines methods for a hijack dialer. type HijackDialer interface { DialHijack(ctx context.Context, url, proto string, meta map[string][]string) (net.Conn, error) } // ContainerAPIClient defines API client methods for the containers type ContainerAPIClient interface { ContainerAttach(ctx context.Context, container string, options container.AttachOptions) (types.HijackedResponse, error) ContainerCommit(ctx context.Context, container string, options container.CommitOptions) (container.CommitResponse, error) ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *ocispec.Platform, containerName string) (container.CreateResponse, error) ContainerDiff(ctx context.Context, container string) ([]container.FilesystemChange, error) ContainerExecAttach(ctx context.Context, execID string, options container.ExecAttachOptions) (types.HijackedResponse, error) ContainerExecCreate(ctx context.Context, container string, options container.ExecOptions) (container.ExecCreateResponse, error) ContainerExecInspect(ctx context.Context, execID string) (container.ExecInspect, error) ContainerExecResize(ctx context.Context, execID string, options container.ResizeOptions) error ContainerExecStart(ctx context.Context, execID string, options container.ExecStartOptions) error ContainerExport(ctx context.Context, container string) (io.ReadCloser, error) ContainerInspect(ctx context.Context, container string) (container.InspectResponse, error) ContainerInspectWithRaw(ctx context.Context, container string, getSize bool) (container.InspectResponse, []byte, error) ContainerKill(ctx context.Context, container, signal string) error ContainerList(ctx context.Context, options container.ListOptions) ([]container.Summary, error) ContainerLogs(ctx context.Context, container string, options container.LogsOptions) (io.ReadCloser, error) ContainerPause(ctx context.Context, container string) error ContainerRemove(ctx context.Context, container string, options container.RemoveOptions) error ContainerRename(ctx context.Context, container, newContainerName string) error ContainerResize(ctx context.Context, container string, options container.ResizeOptions) error ContainerRestart(ctx context.Context, container string, options container.StopOptions) error ContainerStatPath(ctx context.Context, container, path string) (container.PathStat, error) ContainerStats(ctx context.Context, container string, stream bool) (container.StatsResponseReader, error) ContainerStatsOneShot(ctx context.Context, container string) (container.StatsResponseReader, error) ContainerStart(ctx context.Context, container string, options container.StartOptions) error ContainerStop(ctx context.Context, container string, options container.StopOptions) error ContainerTop(ctx context.Context, container string, arguments []string) (container.TopResponse, error) ContainerUnpause(ctx context.Context, container string) error ContainerUpdate(ctx context.Context, container string, updateConfig container.UpdateConfig) (container.UpdateResponse, error) ContainerWait(ctx context.Context, container string, condition container.WaitCondition) (<-chan container.WaitResponse, <-chan error) CopyFromContainer(ctx context.Context, container, srcPath string) (io.ReadCloser, container.PathStat, error) CopyToContainer(ctx context.Context, container, path string, content io.Reader, options container.CopyToContainerOptions) error ContainersPrune(ctx context.Context, pruneFilters filters.Args) (container.PruneReport, error) } // DistributionAPIClient defines API client methods for the registry type DistributionAPIClient interface { DistributionInspect(ctx context.Context, image, encodedRegistryAuth string) (registry.DistributionInspect, error) } // ImageAPIClient defines API client methods for the images type ImageAPIClient interface { ImageBuild(ctx context.Context, context io.Reader, options build.ImageBuildOptions) (build.ImageBuildResponse, error) BuildCachePrune(ctx context.Context, opts build.CachePruneOptions) (*build.CachePruneReport, error) BuildCancel(ctx context.Context, id string) error ImageCreate(ctx context.Context, parentReference string, options image.CreateOptions) (io.ReadCloser, error) ImageImport(ctx context.Context, source image.ImportSource, ref string, options image.ImportOptions) (io.ReadCloser, error) ImageList(ctx context.Context, options image.ListOptions) ([]image.Summary, error) ImagePull(ctx context.Context, ref string, options image.PullOptions) (io.ReadCloser, error) ImagePush(ctx context.Context, ref string, options image.PushOptions) (io.ReadCloser, error) ImageRemove(ctx context.Context, image string, options image.RemoveOptions) ([]image.DeleteResponse, error) ImageSearch(ctx context.Context, term string, options registry.SearchOptions) ([]registry.SearchResult, error) ImageTag(ctx context.Context, image, ref string) error ImagesPrune(ctx context.Context, pruneFilter filters.Args) (image.PruneReport, error) ImageInspect(ctx context.Context, image string, _ ...ImageInspectOption) (image.InspectResponse, error) ImageHistory(ctx context.Context, image string, _ ...ImageHistoryOption) ([]image.HistoryResponseItem, error) ImageLoad(ctx context.Context, input io.Reader, _ ...ImageLoadOption) (image.LoadResponse, error) ImageSave(ctx context.Context, images []string, _ ...ImageSaveOption) (io.ReadCloser, error) ImageAPIClientDeprecated } // ImageAPIClientDeprecated defines deprecated methods of the ImageAPIClient. type ImageAPIClientDeprecated interface { // ImageInspectWithRaw returns the image information and its raw representation. // // Deprecated: Use [Client.ImageInspect] instead. Raw response can be obtained using the [ImageInspectWithRawResponse] option. ImageInspectWithRaw(ctx context.Context, image string) (image.InspectResponse, []byte, error) } // NetworkAPIClient defines API client methods for the networks type NetworkAPIClient interface { NetworkConnect(ctx context.Context, network, container string, config *network.EndpointSettings) error NetworkCreate(ctx context.Context, name string, options network.CreateOptions) (network.CreateResponse, error) NetworkDisconnect(ctx context.Context, network, container string, force bool) error NetworkInspect(ctx context.Context, network string, options network.InspectOptions) (network.Inspect, error) NetworkInspectWithRaw(ctx context.Context, network string, options network.InspectOptions) (network.Inspect, []byte, error) NetworkList(ctx context.Context, options network.ListOptions) ([]network.Summary, error) NetworkRemove(ctx context.Context, network string) error NetworksPrune(ctx context.Context, pruneFilter filters.Args) (network.PruneReport, error) } // NodeAPIClient defines API client methods for the nodes type NodeAPIClient interface { NodeInspectWithRaw(ctx context.Context, nodeID string) (swarm.Node, []byte, error) NodeList(ctx context.Context, options swarm.NodeListOptions) ([]swarm.Node, error) NodeRemove(ctx context.Context, nodeID string, options swarm.NodeRemoveOptions) error NodeUpdate(ctx context.Context, nodeID string, version swarm.Version, node swarm.NodeSpec) error } // PluginAPIClient defines API client methods for the plugins type PluginAPIClient interface { PluginList(ctx context.Context, filter filters.Args) (types.PluginsListResponse, error) PluginRemove(ctx context.Context, name string, options types.PluginRemoveOptions) error PluginEnable(ctx context.Context, name string, options types.PluginEnableOptions) error PluginDisable(ctx context.Context, name string, options types.PluginDisableOptions) error PluginInstall(ctx context.Context, name string, options types.PluginInstallOptions) (io.ReadCloser, error) PluginUpgrade(ctx context.Context, name string, options types.PluginInstallOptions) (io.ReadCloser, error) PluginPush(ctx context.Context, name string, registryAuth string) (io.ReadCloser, error) PluginSet(ctx context.Context, name string, args []string) error PluginInspectWithRaw(ctx context.Context, name string) (*types.Plugin, []byte, error) PluginCreate(ctx context.Context, createContext io.Reader, options types.PluginCreateOptions) error } // ServiceAPIClient defines API client methods for the services type ServiceAPIClient interface { ServiceCreate(ctx context.Context, service swarm.ServiceSpec, options swarm.ServiceCreateOptions) (swarm.ServiceCreateResponse, error) ServiceInspectWithRaw(ctx context.Context, serviceID string, options swarm.ServiceInspectOptions) (swarm.Service, []byte, error) ServiceList(ctx context.Context, options swarm.ServiceListOptions) ([]swarm.Service, error) ServiceRemove(ctx context.Context, serviceID string) error ServiceUpdate(ctx context.Context, serviceID string, version swarm.Version, service swarm.ServiceSpec, options swarm.ServiceUpdateOptions) (swarm.ServiceUpdateResponse, error) ServiceLogs(ctx context.Context, serviceID string, options container.LogsOptions) (io.ReadCloser, error) TaskLogs(ctx context.Context, taskID string, options container.LogsOptions) (io.ReadCloser, error) TaskInspectWithRaw(ctx context.Context, taskID string) (swarm.Task, []byte, error) TaskList(ctx context.Context, options swarm.TaskListOptions) ([]swarm.Task, error) } // SwarmAPIClient defines API client methods for the swarm type SwarmAPIClient interface { SwarmInit(ctx context.Context, req swarm.InitRequest) (string, error) SwarmJoin(ctx context.Context, req swarm.JoinRequest) error SwarmGetUnlockKey(ctx context.Context) (swarm.UnlockKeyResponse, error) SwarmUnlock(ctx context.Context, req swarm.UnlockRequest) error SwarmLeave(ctx context.Context, force bool) error SwarmInspect(ctx context.Context) (swarm.Swarm, error) SwarmUpdate(ctx context.Context, version swarm.Version, swarm swarm.Spec, flags swarm.UpdateFlags) error } // SystemAPIClient defines API client methods for the system type SystemAPIClient interface { Events(ctx context.Context, options events.ListOptions) (<-chan events.Message, <-chan error) Info(ctx context.Context) (system.Info, error) RegistryLogin(ctx context.Context, auth registry.AuthConfig) (registry.AuthenticateOKBody, error) DiskUsage(ctx context.Context, options types.DiskUsageOptions) (types.DiskUsage, error) Ping(ctx context.Context) (types.Ping, error) } // VolumeAPIClient defines API client methods for the volumes type VolumeAPIClient interface { VolumeCreate(ctx context.Context, options volume.CreateOptions) (volume.Volume, error) VolumeInspect(ctx context.Context, volumeID string) (volume.Volume, error) VolumeInspectWithRaw(ctx context.Context, volumeID string) (volume.Volume, []byte, error) VolumeList(ctx context.Context, options volume.ListOptions) (volume.ListResponse, error) VolumeRemove(ctx context.Context, volumeID string, force bool) error VolumesPrune(ctx context.Context, pruneFilter filters.Args) (volume.PruneReport, error) VolumeUpdate(ctx context.Context, volumeID string, version swarm.Version, options volume.UpdateOptions) error } // SecretAPIClient defines API client methods for secrets type SecretAPIClient interface { SecretList(ctx context.Context, options swarm.SecretListOptions) ([]swarm.Secret, error) SecretCreate(ctx context.Context, secret swarm.SecretSpec) (swarm.SecretCreateResponse, error) SecretRemove(ctx context.Context, id string) error SecretInspectWithRaw(ctx context.Context, name string) (swarm.Secret, []byte, error) SecretUpdate(ctx context.Context, id string, version swarm.Version, secret swarm.SecretSpec) error } // ConfigAPIClient defines API client methods for configs type ConfigAPIClient interface { ConfigList(ctx context.Context, options swarm.ConfigListOptions) ([]swarm.Config, error) ConfigCreate(ctx context.Context, config swarm.ConfigSpec) (swarm.ConfigCreateResponse, error) ConfigRemove(ctx context.Context, id string) error ConfigInspectWithRaw(ctx context.Context, name string) (swarm.Config, []byte, error) ConfigUpdate(ctx context.Context, id string, version swarm.Version, config swarm.ConfigSpec) error } ================================================ FILE: vendor/github.com/docker/docker/client/client_unix.go ================================================ //go:build !windows package client import ( "context" "net" "syscall" ) // DefaultDockerHost defines OS-specific default host if the DOCKER_HOST // (EnvOverrideHost) environment variable is unset or empty. const DefaultDockerHost = "unix:///var/run/docker.sock" // dialPipeContext connects to a Windows named pipe. It is not supported on non-Windows. func dialPipeContext(_ context.Context, _ string) (net.Conn, error) { return nil, syscall.EAFNOSUPPORT } ================================================ FILE: vendor/github.com/docker/docker/client/client_windows.go ================================================ package client import ( "context" "net" "github.com/Microsoft/go-winio" ) // DefaultDockerHost defines OS-specific default host if the DOCKER_HOST // (EnvOverrideHost) environment variable is unset or empty. const DefaultDockerHost = "npipe:////./pipe/docker_engine" // dialPipeContext connects to a Windows named pipe. It is not supported on non-Windows. func dialPipeContext(ctx context.Context, addr string) (net.Conn, error) { return winio.DialPipeContext(ctx, addr) } ================================================ FILE: vendor/github.com/docker/docker/client/config_create.go ================================================ package client import ( "context" "encoding/json" "github.com/docker/docker/api/types/swarm" ) // ConfigCreate creates a new config. func (cli *Client) ConfigCreate(ctx context.Context, config swarm.ConfigSpec) (swarm.ConfigCreateResponse, error) { var response swarm.ConfigCreateResponse if err := cli.NewVersionError(ctx, "1.30", "config create"); err != nil { return response, err } resp, err := cli.post(ctx, "/configs/create", nil, config, nil) defer ensureReaderClosed(resp) if err != nil { return response, err } err = json.NewDecoder(resp.Body).Decode(&response) return response, err } ================================================ FILE: vendor/github.com/docker/docker/client/config_inspect.go ================================================ package client import ( "bytes" "context" "encoding/json" "io" "github.com/docker/docker/api/types/swarm" ) // ConfigInspectWithRaw returns the config information with raw data func (cli *Client) ConfigInspectWithRaw(ctx context.Context, id string) (swarm.Config, []byte, error) { id, err := trimID("contig", id) if err != nil { return swarm.Config{}, nil, err } if err := cli.NewVersionError(ctx, "1.30", "config inspect"); err != nil { return swarm.Config{}, nil, err } resp, err := cli.get(ctx, "/configs/"+id, nil, nil) defer ensureReaderClosed(resp) if err != nil { return swarm.Config{}, nil, err } body, err := io.ReadAll(resp.Body) if err != nil { return swarm.Config{}, nil, err } var config swarm.Config rdr := bytes.NewReader(body) err = json.NewDecoder(rdr).Decode(&config) return config, body, err } ================================================ FILE: vendor/github.com/docker/docker/client/config_list.go ================================================ package client import ( "context" "encoding/json" "net/url" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/swarm" ) // ConfigList returns the list of configs. func (cli *Client) ConfigList(ctx context.Context, options swarm.ConfigListOptions) ([]swarm.Config, error) { if err := cli.NewVersionError(ctx, "1.30", "config list"); err != nil { return nil, err } query := url.Values{} if options.Filters.Len() > 0 { filterJSON, err := filters.ToJSON(options.Filters) if err != nil { return nil, err } query.Set("filters", filterJSON) } resp, err := cli.get(ctx, "/configs", query, nil) defer ensureReaderClosed(resp) if err != nil { return nil, err } var configs []swarm.Config err = json.NewDecoder(resp.Body).Decode(&configs) return configs, err } ================================================ FILE: vendor/github.com/docker/docker/client/config_remove.go ================================================ package client import "context" // ConfigRemove removes a config. func (cli *Client) ConfigRemove(ctx context.Context, id string) error { id, err := trimID("config", id) if err != nil { return err } if err := cli.NewVersionError(ctx, "1.30", "config remove"); err != nil { return err } resp, err := cli.delete(ctx, "/configs/"+id, nil, nil) defer ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/config_update.go ================================================ package client import ( "context" "net/url" "github.com/docker/docker/api/types/swarm" ) // ConfigUpdate attempts to update a config func (cli *Client) ConfigUpdate(ctx context.Context, id string, version swarm.Version, config swarm.ConfigSpec) error { id, err := trimID("config", id) if err != nil { return err } if err := cli.NewVersionError(ctx, "1.30", "config update"); err != nil { return err } query := url.Values{} query.Set("version", version.String()) resp, err := cli.post(ctx, "/configs/"+id+"/update", query, config, nil) ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/container_attach.go ================================================ package client import ( "context" "net/http" "net/url" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" ) // ContainerAttach attaches a connection to a container in the server. // It returns a types.HijackedConnection with the hijacked connection // and the a reader to get output. It's up to the called to close // the hijacked connection by calling types.HijackedResponse.Close. // // The stream format on the response will be in one of two formats: // // If the container is using a TTY, there is only a single stream (stdout), and // data is copied directly from the container output stream, no extra // multiplexing or headers. // // If the container is *not* using a TTY, streams for stdout and stderr are // multiplexed. // The format of the multiplexed stream is as follows: // // [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}[]byte{OUTPUT} // // STREAM_TYPE can be 1 for stdout and 2 for stderr // // SIZE1, SIZE2, SIZE3, and SIZE4 are four bytes of uint32 encoded as big endian. // This is the size of OUTPUT. // // You can use github.com/docker/docker/pkg/stdcopy.StdCopy to demultiplex this // stream. func (cli *Client) ContainerAttach(ctx context.Context, containerID string, options container.AttachOptions) (types.HijackedResponse, error) { containerID, err := trimID("container", containerID) if err != nil { return types.HijackedResponse{}, err } query := url.Values{} if options.Stream { query.Set("stream", "1") } if options.Stdin { query.Set("stdin", "1") } if options.Stdout { query.Set("stdout", "1") } if options.Stderr { query.Set("stderr", "1") } if options.DetachKeys != "" { query.Set("detachKeys", options.DetachKeys) } if options.Logs { query.Set("logs", "1") } return cli.postHijacked(ctx, "/containers/"+containerID+"/attach", query, nil, http.Header{ "Content-Type": {"text/plain"}, }) } ================================================ FILE: vendor/github.com/docker/docker/client/container_commit.go ================================================ package client import ( "context" "encoding/json" "errors" "net/url" "github.com/distribution/reference" "github.com/docker/docker/api/types/container" ) // ContainerCommit applies changes to a container and creates a new tagged image. func (cli *Client) ContainerCommit(ctx context.Context, containerID string, options container.CommitOptions) (container.CommitResponse, error) { containerID, err := trimID("container", containerID) if err != nil { return container.CommitResponse{}, err } var repository, tag string if options.Reference != "" { ref, err := reference.ParseNormalizedNamed(options.Reference) if err != nil { return container.CommitResponse{}, err } if _, isCanonical := ref.(reference.Canonical); isCanonical { return container.CommitResponse{}, errors.New("refusing to create a tag with a digest reference") } ref = reference.TagNameOnly(ref) if tagged, ok := ref.(reference.Tagged); ok { tag = tagged.Tag() } repository = ref.Name() } query := url.Values{} query.Set("container", containerID) query.Set("repo", repository) query.Set("tag", tag) query.Set("comment", options.Comment) query.Set("author", options.Author) for _, change := range options.Changes { query.Add("changes", change) } if !options.Pause { query.Set("pause", "0") } var response container.CommitResponse resp, err := cli.post(ctx, "/commit", query, options.Config, nil) defer ensureReaderClosed(resp) if err != nil { return response, err } err = json.NewDecoder(resp.Body).Decode(&response) return response, err } ================================================ FILE: vendor/github.com/docker/docker/client/container_copy.go ================================================ package client import ( "context" "encoding/base64" "encoding/json" "fmt" "io" "net/http" "net/url" "path/filepath" "strings" "github.com/docker/docker/api/types/container" ) // ContainerStatPath returns stat information about a path inside the container filesystem. func (cli *Client) ContainerStatPath(ctx context.Context, containerID, path string) (container.PathStat, error) { containerID, err := trimID("container", containerID) if err != nil { return container.PathStat{}, err } query := url.Values{} query.Set("path", filepath.ToSlash(path)) // Normalize the paths used in the API. resp, err := cli.head(ctx, "/containers/"+containerID+"/archive", query, nil) defer ensureReaderClosed(resp) if err != nil { return container.PathStat{}, err } return getContainerPathStatFromHeader(resp.Header) } // CopyToContainer copies content into the container filesystem. // Note that `content` must be a Reader for a TAR archive func (cli *Client) CopyToContainer(ctx context.Context, containerID, dstPath string, content io.Reader, options container.CopyToContainerOptions) error { containerID, err := trimID("container", containerID) if err != nil { return err } query := url.Values{} query.Set("path", filepath.ToSlash(dstPath)) // Normalize the paths used in the API. // Do not allow for an existing directory to be overwritten by a non-directory and vice versa. if !options.AllowOverwriteDirWithFile { query.Set("noOverwriteDirNonDir", "true") } if options.CopyUIDGID { query.Set("copyUIDGID", "true") } response, err := cli.putRaw(ctx, "/containers/"+containerID+"/archive", query, content, nil) defer ensureReaderClosed(response) if err != nil { return err } return nil } // CopyFromContainer gets the content from the container and returns it as a Reader // for a TAR archive to manipulate it in the host. It's up to the caller to close the reader. func (cli *Client) CopyFromContainer(ctx context.Context, containerID, srcPath string) (io.ReadCloser, container.PathStat, error) { containerID, err := trimID("container", containerID) if err != nil { return nil, container.PathStat{}, err } query := make(url.Values, 1) query.Set("path", filepath.ToSlash(srcPath)) // Normalize the paths used in the API. resp, err := cli.get(ctx, "/containers/"+containerID+"/archive", query, nil) if err != nil { return nil, container.PathStat{}, err } // In order to get the copy behavior right, we need to know information // about both the source and the destination. The response headers include // stat info about the source that we can use in deciding exactly how to // copy it locally. Along with the stat info about the local destination, // we have everything we need to handle the multiple possibilities there // can be when copying a file/dir from one location to another file/dir. stat, err := getContainerPathStatFromHeader(resp.Header) if err != nil { return nil, stat, fmt.Errorf("unable to get resource stat from response: %s", err) } return resp.Body, stat, err } func getContainerPathStatFromHeader(header http.Header) (container.PathStat, error) { var stat container.PathStat encodedStat := header.Get("X-Docker-Container-Path-Stat") statDecoder := base64.NewDecoder(base64.StdEncoding, strings.NewReader(encodedStat)) err := json.NewDecoder(statDecoder).Decode(&stat) if err != nil { err = fmt.Errorf("unable to decode container path stat header: %s", err) } return stat, err } ================================================ FILE: vendor/github.com/docker/docker/client/container_create.go ================================================ package client import ( "context" "encoding/json" "errors" "net/url" "path" "sort" "strings" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/network" "github.com/docker/docker/api/types/versions" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) // ContainerCreate creates a new container based on the given configuration. // It can be associated with a name, but it's not mandatory. func (cli *Client) ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *ocispec.Platform, containerName string) (container.CreateResponse, error) { var response container.CreateResponse // Make sure we negotiated (if the client is configured to do so), // as code below contains API-version specific handling of options. // // Normally, version-negotiation (if enabled) would not happen until // the API request is made. if err := cli.checkVersion(ctx); err != nil { return response, err } if err := cli.NewVersionError(ctx, "1.25", "stop timeout"); config != nil && config.StopTimeout != nil && err != nil { return response, err } if err := cli.NewVersionError(ctx, "1.41", "specify container image platform"); platform != nil && err != nil { return response, err } if err := cli.NewVersionError(ctx, "1.44", "specify health-check start interval"); config != nil && config.Healthcheck != nil && config.Healthcheck.StartInterval != 0 && err != nil { return response, err } if err := cli.NewVersionError(ctx, "1.44", "specify mac-address per network"); hasEndpointSpecificMacAddress(networkingConfig) && err != nil { return response, err } if hostConfig != nil { if versions.LessThan(cli.ClientVersion(), "1.25") { // When using API 1.24 and under, the client is responsible for removing the container hostConfig.AutoRemove = false } if versions.GreaterThanOrEqualTo(cli.ClientVersion(), "1.42") || versions.LessThan(cli.ClientVersion(), "1.40") { // KernelMemory was added in API 1.40, and deprecated in API 1.42 hostConfig.KernelMemory = 0 } if platform != nil && platform.OS == "linux" && versions.LessThan(cli.ClientVersion(), "1.42") { // When using API under 1.42, the Linux daemon doesn't respect the ConsoleSize hostConfig.ConsoleSize = [2]uint{0, 0} } if versions.LessThan(cli.ClientVersion(), "1.44") { for _, m := range hostConfig.Mounts { if m.BindOptions != nil { // ReadOnlyNonRecursive can be safely ignored when API < 1.44 if m.BindOptions.ReadOnlyForceRecursive { return response, errors.New("bind-recursive=readonly requires API v1.44 or later") } if m.BindOptions.NonRecursive && versions.LessThan(cli.ClientVersion(), "1.40") { return response, errors.New("bind-recursive=disabled requires API v1.40 or later") } } } } hostConfig.CapAdd = normalizeCapabilities(hostConfig.CapAdd) hostConfig.CapDrop = normalizeCapabilities(hostConfig.CapDrop) } // Since API 1.44, the container-wide MacAddress is deprecated and will trigger a WARNING if it's specified. if versions.GreaterThanOrEqualTo(cli.ClientVersion(), "1.44") { config.MacAddress = "" //nolint:staticcheck // ignore SA1019: field is deprecated, but still used on API < v1.44. } query := url.Values{} if p := formatPlatform(platform); p != "" { query.Set("platform", p) } if containerName != "" { query.Set("name", containerName) } body := container.CreateRequest{ Config: config, HostConfig: hostConfig, NetworkingConfig: networkingConfig, } resp, err := cli.post(ctx, "/containers/create", query, body, nil) defer ensureReaderClosed(resp) if err != nil { return response, err } err = json.NewDecoder(resp.Body).Decode(&response) return response, err } // formatPlatform returns a formatted string representing platform (e.g. linux/arm/v7). // // Similar to containerd's platforms.Format(), but does allow components to be // omitted (e.g. pass "architecture" only, without "os": // https://github.com/containerd/containerd/blob/v1.5.2/platforms/platforms.go#L243-L263 func formatPlatform(platform *ocispec.Platform) string { if platform == nil { return "" } return path.Join(platform.OS, platform.Architecture, platform.Variant) } // hasEndpointSpecificMacAddress checks whether one of the endpoint in networkingConfig has a MacAddress defined. func hasEndpointSpecificMacAddress(networkingConfig *network.NetworkingConfig) bool { if networkingConfig == nil { return false } for _, endpoint := range networkingConfig.EndpointsConfig { if endpoint.MacAddress != "" { return true } } return false } // allCapabilities is a magic value for "all capabilities" const allCapabilities = "ALL" // normalizeCapabilities normalizes capabilities to their canonical form, // removes duplicates, and sorts the results. // // It is similar to [github.com/docker/docker/oci/caps.NormalizeLegacyCapabilities], // but performs no validation based on supported capabilities. func normalizeCapabilities(caps []string) []string { var normalized []string unique := make(map[string]struct{}) for _, c := range caps { c = normalizeCap(c) if _, ok := unique[c]; ok { continue } unique[c] = struct{}{} normalized = append(normalized, c) } sort.Strings(normalized) return normalized } // normalizeCap normalizes a capability to its canonical format by upper-casing // and adding a "CAP_" prefix (if not yet present). It also accepts the "ALL" // magic-value. func normalizeCap(cap string) string { cap = strings.ToUpper(cap) if cap == allCapabilities { return cap } if !strings.HasPrefix(cap, "CAP_") { cap = "CAP_" + cap } return cap } ================================================ FILE: vendor/github.com/docker/docker/client/container_diff.go ================================================ package client import ( "context" "encoding/json" "net/url" "github.com/docker/docker/api/types/container" ) // ContainerDiff shows differences in a container filesystem since it was started. func (cli *Client) ContainerDiff(ctx context.Context, containerID string) ([]container.FilesystemChange, error) { containerID, err := trimID("container", containerID) if err != nil { return nil, err } resp, err := cli.get(ctx, "/containers/"+containerID+"/changes", url.Values{}, nil) defer ensureReaderClosed(resp) if err != nil { return nil, err } var changes []container.FilesystemChange err = json.NewDecoder(resp.Body).Decode(&changes) if err != nil { return nil, err } return changes, err } ================================================ FILE: vendor/github.com/docker/docker/client/container_exec.go ================================================ package client import ( "context" "encoding/json" "net/http" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/versions" ) // ContainerExecCreate creates a new exec configuration to run an exec process. func (cli *Client) ContainerExecCreate(ctx context.Context, containerID string, options container.ExecOptions) (container.ExecCreateResponse, error) { containerID, err := trimID("container", containerID) if err != nil { return container.ExecCreateResponse{}, err } // Make sure we negotiated (if the client is configured to do so), // as code below contains API-version specific handling of options. // // Normally, version-negotiation (if enabled) would not happen until // the API request is made. if err := cli.checkVersion(ctx); err != nil { return container.ExecCreateResponse{}, err } if err := cli.NewVersionError(ctx, "1.25", "env"); len(options.Env) != 0 && err != nil { return container.ExecCreateResponse{}, err } if versions.LessThan(cli.ClientVersion(), "1.42") { options.ConsoleSize = nil } resp, err := cli.post(ctx, "/containers/"+containerID+"/exec", nil, options, nil) defer ensureReaderClosed(resp) if err != nil { return container.ExecCreateResponse{}, err } var response container.ExecCreateResponse err = json.NewDecoder(resp.Body).Decode(&response) return response, err } // ContainerExecStart starts an exec process already created in the docker host. func (cli *Client) ContainerExecStart(ctx context.Context, execID string, config container.ExecStartOptions) error { if versions.LessThan(cli.ClientVersion(), "1.42") { config.ConsoleSize = nil } resp, err := cli.post(ctx, "/exec/"+execID+"/start", nil, config, nil) ensureReaderClosed(resp) return err } // ContainerExecAttach attaches a connection to an exec process in the server. // It returns a types.HijackedConnection with the hijacked connection // and the a reader to get output. It's up to the called to close // the hijacked connection by calling types.HijackedResponse.Close. func (cli *Client) ContainerExecAttach(ctx context.Context, execID string, config container.ExecAttachOptions) (types.HijackedResponse, error) { if versions.LessThan(cli.ClientVersion(), "1.42") { config.ConsoleSize = nil } return cli.postHijacked(ctx, "/exec/"+execID+"/start", nil, config, http.Header{ "Content-Type": {"application/json"}, }) } // ContainerExecInspect returns information about a specific exec process on the docker host. func (cli *Client) ContainerExecInspect(ctx context.Context, execID string) (container.ExecInspect, error) { var response container.ExecInspect resp, err := cli.get(ctx, "/exec/"+execID+"/json", nil, nil) if err != nil { return response, err } err = json.NewDecoder(resp.Body).Decode(&response) ensureReaderClosed(resp) return response, err } ================================================ FILE: vendor/github.com/docker/docker/client/container_export.go ================================================ package client import ( "context" "io" "net/url" ) // ContainerExport retrieves the raw contents of a container // and returns them as an io.ReadCloser. It's up to the caller // to close the stream. func (cli *Client) ContainerExport(ctx context.Context, containerID string) (io.ReadCloser, error) { containerID, err := trimID("container", containerID) if err != nil { return nil, err } resp, err := cli.get(ctx, "/containers/"+containerID+"/export", url.Values{}, nil) if err != nil { return nil, err } return resp.Body, nil } ================================================ FILE: vendor/github.com/docker/docker/client/container_inspect.go ================================================ package client import ( "bytes" "context" "encoding/json" "io" "net/url" "github.com/docker/docker/api/types/container" ) // ContainerInspect returns the container information. func (cli *Client) ContainerInspect(ctx context.Context, containerID string) (container.InspectResponse, error) { containerID, err := trimID("container", containerID) if err != nil { return container.InspectResponse{}, err } resp, err := cli.get(ctx, "/containers/"+containerID+"/json", nil, nil) defer ensureReaderClosed(resp) if err != nil { return container.InspectResponse{}, err } var response container.InspectResponse err = json.NewDecoder(resp.Body).Decode(&response) return response, err } // ContainerInspectWithRaw returns the container information and its raw representation. func (cli *Client) ContainerInspectWithRaw(ctx context.Context, containerID string, getSize bool) (container.InspectResponse, []byte, error) { containerID, err := trimID("container", containerID) if err != nil { return container.InspectResponse{}, nil, err } query := url.Values{} if getSize { query.Set("size", "1") } resp, err := cli.get(ctx, "/containers/"+containerID+"/json", query, nil) defer ensureReaderClosed(resp) if err != nil { return container.InspectResponse{}, nil, err } body, err := io.ReadAll(resp.Body) if err != nil { return container.InspectResponse{}, nil, err } var response container.InspectResponse rdr := bytes.NewReader(body) err = json.NewDecoder(rdr).Decode(&response) return response, body, err } ================================================ FILE: vendor/github.com/docker/docker/client/container_kill.go ================================================ package client import ( "context" "net/url" ) // ContainerKill terminates the container process but does not remove the container from the docker host. func (cli *Client) ContainerKill(ctx context.Context, containerID, signal string) error { containerID, err := trimID("container", containerID) if err != nil { return err } query := url.Values{} if signal != "" { query.Set("signal", signal) } resp, err := cli.post(ctx, "/containers/"+containerID+"/kill", query, nil, nil) ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/container_list.go ================================================ package client import ( "context" "encoding/json" "net/url" "strconv" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/filters" ) // ContainerList returns the list of containers in the docker host. func (cli *Client) ContainerList(ctx context.Context, options container.ListOptions) ([]container.Summary, error) { query := url.Values{} if options.All { query.Set("all", "1") } if options.Limit > 0 { query.Set("limit", strconv.Itoa(options.Limit)) } if options.Since != "" { query.Set("since", options.Since) } if options.Before != "" { query.Set("before", options.Before) } if options.Size { query.Set("size", "1") } if options.Filters.Len() > 0 { //nolint:staticcheck // ignore SA1019 for old code filterJSON, err := filters.ToParamWithVersion(cli.version, options.Filters) if err != nil { return nil, err } query.Set("filters", filterJSON) } resp, err := cli.get(ctx, "/containers/json", query, nil) defer ensureReaderClosed(resp) if err != nil { return nil, err } var containers []container.Summary err = json.NewDecoder(resp.Body).Decode(&containers) return containers, err } ================================================ FILE: vendor/github.com/docker/docker/client/container_logs.go ================================================ package client import ( "context" "io" "net/url" "time" "github.com/docker/docker/api/types/container" timetypes "github.com/docker/docker/api/types/time" "github.com/pkg/errors" ) // ContainerLogs returns the logs generated by a container in an io.ReadCloser. // It's up to the caller to close the stream. // // The stream format on the response will be in one of two formats: // // If the container is using a TTY, there is only a single stream (stdout), and // data is copied directly from the container output stream, no extra // multiplexing or headers. // // If the container is *not* using a TTY, streams for stdout and stderr are // multiplexed. // The format of the multiplexed stream is as follows: // // [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}[]byte{OUTPUT} // // STREAM_TYPE can be 1 for stdout and 2 for stderr // // SIZE1, SIZE2, SIZE3, and SIZE4 are four bytes of uint32 encoded as big endian. // This is the size of OUTPUT. // // You can use github.com/docker/docker/pkg/stdcopy.StdCopy to demultiplex this // stream. func (cli *Client) ContainerLogs(ctx context.Context, containerID string, options container.LogsOptions) (io.ReadCloser, error) { containerID, err := trimID("container", containerID) if err != nil { return nil, err } query := url.Values{} if options.ShowStdout { query.Set("stdout", "1") } if options.ShowStderr { query.Set("stderr", "1") } if options.Since != "" { ts, err := timetypes.GetTimestamp(options.Since, time.Now()) if err != nil { return nil, errors.Wrap(err, `invalid value for "since"`) } query.Set("since", ts) } if options.Until != "" { ts, err := timetypes.GetTimestamp(options.Until, time.Now()) if err != nil { return nil, errors.Wrap(err, `invalid value for "until"`) } query.Set("until", ts) } if options.Timestamps { query.Set("timestamps", "1") } if options.Details { query.Set("details", "1") } if options.Follow { query.Set("follow", "1") } query.Set("tail", options.Tail) resp, err := cli.get(ctx, "/containers/"+containerID+"/logs", query, nil) if err != nil { return nil, err } return resp.Body, nil } ================================================ FILE: vendor/github.com/docker/docker/client/container_pause.go ================================================ package client import "context" // ContainerPause pauses the main process of a given container without terminating it. func (cli *Client) ContainerPause(ctx context.Context, containerID string) error { containerID, err := trimID("container", containerID) if err != nil { return err } resp, err := cli.post(ctx, "/containers/"+containerID+"/pause", nil, nil, nil) ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/container_prune.go ================================================ package client import ( "context" "encoding/json" "fmt" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/filters" ) // ContainersPrune requests the daemon to delete unused data func (cli *Client) ContainersPrune(ctx context.Context, pruneFilters filters.Args) (container.PruneReport, error) { if err := cli.NewVersionError(ctx, "1.25", "container prune"); err != nil { return container.PruneReport{}, err } query, err := getFiltersQuery(pruneFilters) if err != nil { return container.PruneReport{}, err } resp, err := cli.post(ctx, "/containers/prune", query, nil, nil) defer ensureReaderClosed(resp) if err != nil { return container.PruneReport{}, err } var report container.PruneReport if err := json.NewDecoder(resp.Body).Decode(&report); err != nil { return container.PruneReport{}, fmt.Errorf("Error retrieving disk usage: %v", err) } return report, nil } ================================================ FILE: vendor/github.com/docker/docker/client/container_remove.go ================================================ package client import ( "context" "net/url" "github.com/docker/docker/api/types/container" ) // ContainerRemove kills and removes a container from the docker host. func (cli *Client) ContainerRemove(ctx context.Context, containerID string, options container.RemoveOptions) error { containerID, err := trimID("container", containerID) if err != nil { return err } query := url.Values{} if options.RemoveVolumes { query.Set("v", "1") } if options.RemoveLinks { query.Set("link", "1") } if options.Force { query.Set("force", "1") } resp, err := cli.delete(ctx, "/containers/"+containerID, query, nil) defer ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/container_rename.go ================================================ package client import ( "context" "net/url" ) // ContainerRename changes the name of a given container. func (cli *Client) ContainerRename(ctx context.Context, containerID, newContainerName string) error { containerID, err := trimID("container", containerID) if err != nil { return err } query := url.Values{} query.Set("name", newContainerName) resp, err := cli.post(ctx, "/containers/"+containerID+"/rename", query, nil, nil) ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/container_resize.go ================================================ package client import ( "context" "net/url" "strconv" "github.com/docker/docker/api/types/container" ) // ContainerResize changes the size of the tty for a container. func (cli *Client) ContainerResize(ctx context.Context, containerID string, options container.ResizeOptions) error { containerID, err := trimID("container", containerID) if err != nil { return err } return cli.resize(ctx, "/containers/"+containerID, options.Height, options.Width) } // ContainerExecResize changes the size of the tty for an exec process running inside a container. func (cli *Client) ContainerExecResize(ctx context.Context, execID string, options container.ResizeOptions) error { execID, err := trimID("exec", execID) if err != nil { return err } return cli.resize(ctx, "/exec/"+execID, options.Height, options.Width) } func (cli *Client) resize(ctx context.Context, basePath string, height, width uint) error { // FIXME(thaJeztah): the API / backend accepts uint32, but container.ResizeOptions uses uint. query := url.Values{} query.Set("h", strconv.FormatUint(uint64(height), 10)) query.Set("w", strconv.FormatUint(uint64(width), 10)) resp, err := cli.post(ctx, basePath+"/resize", query, nil, nil) ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/container_restart.go ================================================ package client import ( "context" "net/url" "strconv" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/versions" ) // ContainerRestart stops and starts a container again. // It makes the daemon wait for the container to be up again for // a specific amount of time, given the timeout. func (cli *Client) ContainerRestart(ctx context.Context, containerID string, options container.StopOptions) error { containerID, err := trimID("container", containerID) if err != nil { return err } query := url.Values{} if options.Timeout != nil { query.Set("t", strconv.Itoa(*options.Timeout)) } if options.Signal != "" { // Make sure we negotiated (if the client is configured to do so), // as code below contains API-version specific handling of options. // // Normally, version-negotiation (if enabled) would not happen until // the API request is made. if err := cli.checkVersion(ctx); err != nil { return err } if versions.GreaterThanOrEqualTo(cli.version, "1.42") { query.Set("signal", options.Signal) } } resp, err := cli.post(ctx, "/containers/"+containerID+"/restart", query, nil, nil) ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/container_start.go ================================================ package client import ( "context" "net/url" "github.com/docker/docker/api/types/container" ) // ContainerStart sends a request to the docker daemon to start a container. func (cli *Client) ContainerStart(ctx context.Context, containerID string, options container.StartOptions) error { containerID, err := trimID("container", containerID) if err != nil { return err } query := url.Values{} if options.CheckpointID != "" { query.Set("checkpoint", options.CheckpointID) } if options.CheckpointDir != "" { query.Set("checkpoint-dir", options.CheckpointDir) } resp, err := cli.post(ctx, "/containers/"+containerID+"/start", query, nil, nil) ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/container_stats.go ================================================ package client import ( "context" "net/url" "github.com/docker/docker/api/types/container" ) // ContainerStats returns near realtime stats for a given container. // It's up to the caller to close the io.ReadCloser returned. func (cli *Client) ContainerStats(ctx context.Context, containerID string, stream bool) (container.StatsResponseReader, error) { containerID, err := trimID("container", containerID) if err != nil { return container.StatsResponseReader{}, err } query := url.Values{} query.Set("stream", "0") if stream { query.Set("stream", "1") } resp, err := cli.get(ctx, "/containers/"+containerID+"/stats", query, nil) if err != nil { return container.StatsResponseReader{}, err } return container.StatsResponseReader{ Body: resp.Body, OSType: resp.Header.Get("Ostype"), }, nil } // ContainerStatsOneShot gets a single stat entry from a container. // It differs from `ContainerStats` in that the API should not wait to prime the stats func (cli *Client) ContainerStatsOneShot(ctx context.Context, containerID string) (container.StatsResponseReader, error) { containerID, err := trimID("container", containerID) if err != nil { return container.StatsResponseReader{}, err } query := url.Values{} query.Set("stream", "0") query.Set("one-shot", "1") resp, err := cli.get(ctx, "/containers/"+containerID+"/stats", query, nil) if err != nil { return container.StatsResponseReader{}, err } return container.StatsResponseReader{ Body: resp.Body, OSType: resp.Header.Get("Ostype"), }, nil } ================================================ FILE: vendor/github.com/docker/docker/client/container_stop.go ================================================ package client import ( "context" "net/url" "strconv" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/versions" ) // ContainerStop stops a container. In case the container fails to stop // gracefully within a time frame specified by the timeout argument, // it is forcefully terminated (killed). // // If the timeout is nil, the container's StopTimeout value is used, if set, // otherwise the engine default. A negative timeout value can be specified, // meaning no timeout, i.e. no forceful termination is performed. func (cli *Client) ContainerStop(ctx context.Context, containerID string, options container.StopOptions) error { containerID, err := trimID("container", containerID) if err != nil { return err } query := url.Values{} if options.Timeout != nil { query.Set("t", strconv.Itoa(*options.Timeout)) } if options.Signal != "" { // Make sure we negotiated (if the client is configured to do so), // as code below contains API-version specific handling of options. // // Normally, version-negotiation (if enabled) would not happen until // the API request is made. if err := cli.checkVersion(ctx); err != nil { return err } if versions.GreaterThanOrEqualTo(cli.version, "1.42") { query.Set("signal", options.Signal) } } resp, err := cli.post(ctx, "/containers/"+containerID+"/stop", query, nil, nil) ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/container_top.go ================================================ package client import ( "context" "encoding/json" "net/url" "strings" "github.com/docker/docker/api/types/container" ) // ContainerTop shows process information from within a container. func (cli *Client) ContainerTop(ctx context.Context, containerID string, arguments []string) (container.TopResponse, error) { containerID, err := trimID("container", containerID) if err != nil { return container.TopResponse{}, err } query := url.Values{} if len(arguments) > 0 { query.Set("ps_args", strings.Join(arguments, " ")) } resp, err := cli.get(ctx, "/containers/"+containerID+"/top", query, nil) defer ensureReaderClosed(resp) if err != nil { return container.TopResponse{}, err } var response container.TopResponse err = json.NewDecoder(resp.Body).Decode(&response) return response, err } ================================================ FILE: vendor/github.com/docker/docker/client/container_unpause.go ================================================ package client import "context" // ContainerUnpause resumes the process execution within a container func (cli *Client) ContainerUnpause(ctx context.Context, containerID string) error { containerID, err := trimID("container", containerID) if err != nil { return err } resp, err := cli.post(ctx, "/containers/"+containerID+"/unpause", nil, nil, nil) ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/container_update.go ================================================ package client import ( "context" "encoding/json" "github.com/docker/docker/api/types/container" ) // ContainerUpdate updates the resources of a container. func (cli *Client) ContainerUpdate(ctx context.Context, containerID string, updateConfig container.UpdateConfig) (container.UpdateResponse, error) { containerID, err := trimID("container", containerID) if err != nil { return container.UpdateResponse{}, err } resp, err := cli.post(ctx, "/containers/"+containerID+"/update", nil, updateConfig, nil) defer ensureReaderClosed(resp) if err != nil { return container.UpdateResponse{}, err } var response container.UpdateResponse err = json.NewDecoder(resp.Body).Decode(&response) return response, err } ================================================ FILE: vendor/github.com/docker/docker/client/container_wait.go ================================================ package client import ( "bytes" "context" "encoding/json" "errors" "io" "net/url" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/versions" ) const containerWaitErrorMsgLimit = 2 * 1024 /* Max: 2KiB */ // ContainerWait waits until the specified container is in a certain state // indicated by the given condition, either "not-running" (default), // "next-exit", or "removed". // // If this client's API version is before 1.30, condition is ignored and // ContainerWait will return immediately with the two channels, as the server // will wait as if the condition were "not-running". // // If this client's API version is at least 1.30, ContainerWait blocks until // the request has been acknowledged by the server (with a response header), // then returns two channels on which the caller can wait for the exit status // of the container or an error if there was a problem either beginning the // wait request or in getting the response. This allows the caller to // synchronize ContainerWait with other calls, such as specifying a // "next-exit" condition before issuing a ContainerStart request. func (cli *Client) ContainerWait(ctx context.Context, containerID string, condition container.WaitCondition) (<-chan container.WaitResponse, <-chan error) { resultC := make(chan container.WaitResponse) errC := make(chan error, 1) containerID, err := trimID("container", containerID) if err != nil { errC <- err return resultC, errC } // Make sure we negotiated (if the client is configured to do so), // as code below contains API-version specific handling of options. // // Normally, version-negotiation (if enabled) would not happen until // the API request is made. if err := cli.checkVersion(ctx); err != nil { errC <- err return resultC, errC } if versions.LessThan(cli.ClientVersion(), "1.30") { return cli.legacyContainerWait(ctx, containerID) } query := url.Values{} if condition != "" { query.Set("condition", string(condition)) } resp, err := cli.post(ctx, "/containers/"+containerID+"/wait", query, nil, nil) if err != nil { defer ensureReaderClosed(resp) errC <- err return resultC, errC } go func() { defer ensureReaderClosed(resp) responseText := bytes.NewBuffer(nil) stream := io.TeeReader(resp.Body, responseText) var res container.WaitResponse if err := json.NewDecoder(stream).Decode(&res); err != nil { // NOTE(nicks): The /wait API does not work well with HTTP proxies. // At any time, the proxy could cut off the response stream. // // But because the HTTP status has already been written, the proxy's // only option is to write a plaintext error message. // // If there's a JSON parsing error, read the real error message // off the body and send it to the client. if errors.As(err, new(*json.SyntaxError)) { _, _ = io.ReadAll(io.LimitReader(stream, containerWaitErrorMsgLimit)) errC <- errors.New(responseText.String()) } else { errC <- err } return } resultC <- res }() return resultC, errC } // legacyContainerWait returns immediately and doesn't have an option to wait // until the container is removed. func (cli *Client) legacyContainerWait(ctx context.Context, containerID string) (<-chan container.WaitResponse, <-chan error) { resultC := make(chan container.WaitResponse) errC := make(chan error) go func() { resp, err := cli.post(ctx, "/containers/"+containerID+"/wait", nil, nil, nil) if err != nil { errC <- err return } defer ensureReaderClosed(resp) var res container.WaitResponse if err := json.NewDecoder(resp.Body).Decode(&res); err != nil { errC <- err return } resultC <- res }() return resultC, errC } ================================================ FILE: vendor/github.com/docker/docker/client/disk_usage.go ================================================ package client import ( "context" "encoding/json" "fmt" "net/url" "github.com/docker/docker/api/types" ) // DiskUsage requests the current data usage from the daemon func (cli *Client) DiskUsage(ctx context.Context, options types.DiskUsageOptions) (types.DiskUsage, error) { var query url.Values if len(options.Types) > 0 { query = url.Values{} for _, t := range options.Types { query.Add("type", string(t)) } } resp, err := cli.get(ctx, "/system/df", query, nil) defer ensureReaderClosed(resp) if err != nil { return types.DiskUsage{}, err } var du types.DiskUsage if err := json.NewDecoder(resp.Body).Decode(&du); err != nil { return types.DiskUsage{}, fmt.Errorf("Error retrieving disk usage: %v", err) } return du, nil } ================================================ FILE: vendor/github.com/docker/docker/client/distribution_inspect.go ================================================ package client import ( "context" "encoding/json" "net/http" "net/url" "github.com/docker/docker/api/types/registry" ) // DistributionInspect returns the image digest with the full manifest. func (cli *Client) DistributionInspect(ctx context.Context, imageRef, encodedRegistryAuth string) (registry.DistributionInspect, error) { if imageRef == "" { return registry.DistributionInspect{}, objectNotFoundError{object: "distribution", id: imageRef} } if err := cli.NewVersionError(ctx, "1.30", "distribution inspect"); err != nil { return registry.DistributionInspect{}, err } var headers http.Header if encodedRegistryAuth != "" { headers = http.Header{ registry.AuthHeader: {encodedRegistryAuth}, } } // Contact the registry to retrieve digest and platform information resp, err := cli.get(ctx, "/distribution/"+imageRef+"/json", url.Values{}, headers) defer ensureReaderClosed(resp) if err != nil { return registry.DistributionInspect{}, err } var distributionInspect registry.DistributionInspect err = json.NewDecoder(resp.Body).Decode(&distributionInspect) return distributionInspect, err } ================================================ FILE: vendor/github.com/docker/docker/client/envvars.go ================================================ package client const ( // EnvOverrideHost is the name of the environment variable that can be used // to override the default host to connect to (DefaultDockerHost). // // This env-var is read by FromEnv and WithHostFromEnv and when set to a // non-empty value, takes precedence over the default host (which is platform // specific), or any host already set. EnvOverrideHost = "DOCKER_HOST" // EnvOverrideAPIVersion is the name of the environment variable that can // be used to override the API version to use. Value should be // formatted as MAJOR.MINOR, for example, "1.19". // // This env-var is read by FromEnv and WithVersionFromEnv and when set to a // non-empty value, takes precedence over API version negotiation. // // This environment variable should be used for debugging purposes only, as // it can set the client to use an incompatible (or invalid) API version. EnvOverrideAPIVersion = "DOCKER_API_VERSION" // EnvOverrideCertPath is the name of the environment variable that can be // used to specify the directory from which to load the TLS certificates // (ca.pem, cert.pem, key.pem) from. These certificates are used to configure // the Client for a TCP connection protected by TLS client authentication. // // TLS certificate verification is enabled by default if the Client is configured // to use a TLS connection. Refer to EnvTLSVerify below to learn how to // disable verification for testing purposes. // // WARNING: Access to the remote API is equivalent to root access to the // host where the daemon runs. Do not expose the API without protection, // and only if needed. Make sure you are familiar with the "daemon attack // surface" (https://docs.docker.com/go/attack-surface/). // // For local access to the API, it is recommended to connect with the daemon // using the default local socket connection (on Linux), or the named pipe // (on Windows). // // If you need to access the API of a remote daemon, consider using an SSH // (ssh://) connection, which is easier to set up, and requires no additional // configuration if the host is accessible using ssh. // // If you cannot use the alternatives above, and you must expose the API over // a TCP connection, refer to https://docs.docker.com/engine/security/protect-access/ // to learn how to configure the daemon and client to use a TCP connection // with TLS client authentication. Make sure you know the differences between // a regular TLS connection and a TLS connection protected by TLS client // authentication, and verify that the API cannot be accessed by other clients. EnvOverrideCertPath = "DOCKER_CERT_PATH" // EnvTLSVerify is the name of the environment variable that can be used to // enable or disable TLS certificate verification. When set to a non-empty // value, TLS certificate verification is enabled, and the client is configured // to use a TLS connection, using certificates from the default directories // (within `~/.docker`); refer to EnvOverrideCertPath above for additional // details. // // WARNING: Access to the remote API is equivalent to root access to the // host where the daemon runs. Do not expose the API without protection, // and only if needed. Make sure you are familiar with the "daemon attack // surface" (https://docs.docker.com/go/attack-surface/). // // Before setting up your client and daemon to use a TCP connection with TLS // client authentication, consider using one of the alternatives mentioned // in EnvOverrideCertPath above. // // Disabling TLS certificate verification (for testing purposes) // // TLS certificate verification is enabled by default if the Client is configured // to use a TLS connection, and it is highly recommended to keep verification // enabled to prevent machine-in-the-middle attacks. Refer to the documentation // at https://docs.docker.com/engine/security/protect-access/ and pages linked // from that page to learn how to configure the daemon and client to use a // TCP connection with TLS client authentication enabled. // // Set the "DOCKER_TLS_VERIFY" environment to an empty string ("") to // disable TLS certificate verification. Disabling verification is insecure, // so should only be done for testing purposes. From the Go documentation // (https://pkg.go.dev/crypto/tls#Config): // // InsecureSkipVerify controls whether a client verifies the server's // certificate chain and host name. If InsecureSkipVerify is true, crypto/tls // accepts any certificate presented by the server and any host name in that // certificate. In this mode, TLS is susceptible to machine-in-the-middle // attacks unless custom verification is used. This should be used only for // testing or in combination with VerifyConnection or VerifyPeerCertificate. EnvTLSVerify = "DOCKER_TLS_VERIFY" ) ================================================ FILE: vendor/github.com/docker/docker/client/errors.go ================================================ package client import ( "context" "errors" "fmt" "net/http" cerrdefs "github.com/containerd/errdefs" "github.com/containerd/errdefs/pkg/errhttp" "github.com/docker/docker/api/types/versions" ) // errConnectionFailed implements an error returned when connection failed. type errConnectionFailed struct { error } // Error returns a string representation of an errConnectionFailed func (e errConnectionFailed) Error() string { return e.error.Error() } func (e errConnectionFailed) Unwrap() error { return e.error } // IsErrConnectionFailed returns true if the error is caused by connection failed. func IsErrConnectionFailed(err error) bool { return errors.As(err, &errConnectionFailed{}) } // ErrorConnectionFailed returns an error with host in the error message when connection to docker daemon failed. // // Deprecated: this function was only used internally, and will be removed in the next release. func ErrorConnectionFailed(host string) error { return connectionFailed(host) } // connectionFailed returns an error with host in the error message when connection // to docker daemon failed. func connectionFailed(host string) error { var err error if host == "" { err = errors.New("Cannot connect to the Docker daemon. Is the docker daemon running on this host?") } else { err = fmt.Errorf("Cannot connect to the Docker daemon at %s. Is the docker daemon running?", host) } return errConnectionFailed{error: err} } // IsErrNotFound returns true if the error is a NotFound error, which is returned // by the API when some object is not found. It is an alias for [cerrdefs.IsNotFound]. // // Deprecated: use [cerrdefs.IsNotFound] instead. func IsErrNotFound(err error) bool { return cerrdefs.IsNotFound(err) } type objectNotFoundError struct { object string id string } func (e objectNotFoundError) NotFound() {} func (e objectNotFoundError) Error() string { return fmt.Sprintf("Error: No such %s: %s", e.object, e.id) } // NewVersionError returns an error if the APIVersion required is less than the // current supported version. // // It performs API-version negotiation if the Client is configured with this // option, otherwise it assumes the latest API version is used. func (cli *Client) NewVersionError(ctx context.Context, APIrequired, feature string) error { // Make sure we negotiated (if the client is configured to do so), // as code below contains API-version specific handling of options. // // Normally, version-negotiation (if enabled) would not happen until // the API request is made. if err := cli.checkVersion(ctx); err != nil { return err } if cli.version != "" && versions.LessThan(cli.version, APIrequired) { return fmt.Errorf("%q requires API version %s, but the Docker daemon API version is %s", feature, APIrequired, cli.version) } return nil } type httpError struct { err error errdef error } func (e *httpError) Error() string { return e.err.Error() } func (e *httpError) Unwrap() error { return e.err } func (e *httpError) Is(target error) bool { return errors.Is(e.errdef, target) } // httpErrorFromStatusCode creates an errdef error, based on the provided HTTP status-code func httpErrorFromStatusCode(err error, statusCode int) error { if err == nil { return nil } base := errhttp.ToNative(statusCode) if base != nil { return &httpError{err: err, errdef: base} } switch { case statusCode >= http.StatusOK && statusCode < http.StatusBadRequest: // it's a client error return err case statusCode >= http.StatusBadRequest && statusCode < http.StatusInternalServerError: return &httpError{err: err, errdef: cerrdefs.ErrInvalidArgument} case statusCode >= http.StatusInternalServerError && statusCode < 600: return &httpError{err: err, errdef: cerrdefs.ErrInternal} default: return &httpError{err: err, errdef: cerrdefs.ErrUnknown} } } ================================================ FILE: vendor/github.com/docker/docker/client/events.go ================================================ package client import ( "context" "encoding/json" "net/url" "time" "github.com/docker/docker/api/types/events" "github.com/docker/docker/api/types/filters" timetypes "github.com/docker/docker/api/types/time" ) // Events returns a stream of events in the daemon. It's up to the caller to close the stream // by cancelling the context. Once the stream has been completely read an io.EOF error will // be sent over the error channel. If an error is sent all processing will be stopped. It's up // to the caller to reopen the stream in the event of an error by reinvoking this method. func (cli *Client) Events(ctx context.Context, options events.ListOptions) (<-chan events.Message, <-chan error) { messages := make(chan events.Message) errs := make(chan error, 1) started := make(chan struct{}) go func() { defer close(errs) query, err := buildEventsQueryParams(cli.version, options) if err != nil { close(started) errs <- err return } resp, err := cli.get(ctx, "/events", query, nil) if err != nil { close(started) errs <- err return } defer resp.Body.Close() decoder := json.NewDecoder(resp.Body) close(started) for { select { case <-ctx.Done(): errs <- ctx.Err() return default: var event events.Message if err := decoder.Decode(&event); err != nil { errs <- err return } select { case messages <- event: case <-ctx.Done(): errs <- ctx.Err() return } } } }() <-started return messages, errs } func buildEventsQueryParams(cliVersion string, options events.ListOptions) (url.Values, error) { query := url.Values{} ref := time.Now() if options.Since != "" { ts, err := timetypes.GetTimestamp(options.Since, ref) if err != nil { return nil, err } query.Set("since", ts) } if options.Until != "" { ts, err := timetypes.GetTimestamp(options.Until, ref) if err != nil { return nil, err } query.Set("until", ts) } if options.Filters.Len() > 0 { //nolint:staticcheck // ignore SA1019 for old code filterJSON, err := filters.ToParamWithVersion(cliVersion, options.Filters) if err != nil { return nil, err } query.Set("filters", filterJSON) } return query, nil } ================================================ FILE: vendor/github.com/docker/docker/client/hijack.go ================================================ package client import ( "bufio" "context" "fmt" "net" "net/http" "net/url" "time" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/versions" "github.com/pkg/errors" "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" ) // postHijacked sends a POST request and hijacks the connection. func (cli *Client) postHijacked(ctx context.Context, path string, query url.Values, body interface{}, headers map[string][]string) (types.HijackedResponse, error) { bodyEncoded, err := encodeData(body) if err != nil { return types.HijackedResponse{}, err } req, err := cli.buildRequest(ctx, http.MethodPost, cli.getAPIPath(ctx, path, query), bodyEncoded, headers) if err != nil { return types.HijackedResponse{}, err } conn, mediaType, err := setupHijackConn(cli.dialer(), req, "tcp") if err != nil { return types.HijackedResponse{}, err } if versions.LessThan(cli.ClientVersion(), "1.42") { // Prior to 1.42, Content-Type is always set to raw-stream and not relevant mediaType = "" } return types.NewHijackedResponse(conn, mediaType), nil } // DialHijack returns a hijacked connection with negotiated protocol proto. func (cli *Client) DialHijack(ctx context.Context, url, proto string, meta map[string][]string) (net.Conn, error) { req, err := http.NewRequestWithContext(ctx, http.MethodPost, url, http.NoBody) if err != nil { return nil, err } req = cli.addHeaders(req, meta) conn, _, err := setupHijackConn(cli.Dialer(), req, proto) return conn, err } func setupHijackConn(dialer func(context.Context) (net.Conn, error), req *http.Request, proto string) (_ net.Conn, _ string, retErr error) { ctx := req.Context() req.Header.Set("Connection", "Upgrade") req.Header.Set("Upgrade", proto) conn, err := dialer(ctx) if err != nil { return nil, "", errors.Wrap(err, "cannot connect to the Docker daemon. Is 'docker daemon' running on this host?") } defer func() { if retErr != nil { conn.Close() } }() // When we set up a TCP connection for hijack, there could be long periods // of inactivity (a long running command with no output) that in certain // network setups may cause ECONNTIMEOUT, leaving the client in an unknown // state. Setting TCP KeepAlive on the socket connection will prohibit // ECONNTIMEOUT unless the socket connection truly is broken if tcpConn, ok := conn.(*net.TCPConn); ok { _ = tcpConn.SetKeepAlive(true) _ = tcpConn.SetKeepAlivePeriod(30 * time.Second) } hc := &hijackedConn{conn, bufio.NewReader(conn)} // Server hijacks the connection, error 'connection closed' expected resp, err := otelhttp.NewTransport(hc).RoundTrip(req) if err != nil { return nil, "", err } if resp.StatusCode != http.StatusSwitchingProtocols { _ = resp.Body.Close() return nil, "", fmt.Errorf("unable to upgrade to %s, received %d", proto, resp.StatusCode) } if hc.r.Buffered() > 0 { // If there is buffered content, wrap the connection. We return an // object that implements CloseWrite if the underlying connection // implements it. if _, ok := hc.Conn.(types.CloseWriter); ok { conn = &hijackedConnCloseWriter{hc} } else { conn = hc } } else { hc.r.Reset(nil) } return conn, resp.Header.Get("Content-Type"), nil } // hijackedConn wraps a net.Conn and is returned by setupHijackConn in the case // that a) there was already buffered data in the http layer when Hijack() was // called, and b) the underlying net.Conn does *not* implement CloseWrite(). // hijackedConn does not implement CloseWrite() either. type hijackedConn struct { net.Conn r *bufio.Reader } func (c *hijackedConn) RoundTrip(req *http.Request) (*http.Response, error) { if err := req.Write(c.Conn); err != nil { return nil, err } return http.ReadResponse(c.r, req) } func (c *hijackedConn) Read(b []byte) (int, error) { return c.r.Read(b) } // hijackedConnCloseWriter is a hijackedConn which additionally implements // CloseWrite(). It is returned by setupHijackConn in the case that a) there // was already buffered data in the http layer when Hijack() was called, and b) // the underlying net.Conn *does* implement CloseWrite(). type hijackedConnCloseWriter struct { *hijackedConn } var _ types.CloseWriter = &hijackedConnCloseWriter{} func (c *hijackedConnCloseWriter) CloseWrite() error { conn := c.Conn.(types.CloseWriter) return conn.CloseWrite() } ================================================ FILE: vendor/github.com/docker/docker/client/image_build.go ================================================ package client import ( "context" "encoding/base64" "encoding/json" "io" "net/http" "net/url" "strconv" "strings" "github.com/docker/docker/api/types/build" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/network" ) // ImageBuild sends a request to the daemon to build images. // The Body in the response implements an io.ReadCloser and it's up to the caller to // close it. func (cli *Client) ImageBuild(ctx context.Context, buildContext io.Reader, options build.ImageBuildOptions) (build.ImageBuildResponse, error) { query, err := cli.imageBuildOptionsToQuery(ctx, options) if err != nil { return build.ImageBuildResponse{}, err } buf, err := json.Marshal(options.AuthConfigs) if err != nil { return build.ImageBuildResponse{}, err } headers := http.Header{} headers.Add("X-Registry-Config", base64.URLEncoding.EncodeToString(buf)) headers.Set("Content-Type", "application/x-tar") resp, err := cli.postRaw(ctx, "/build", query, buildContext, headers) if err != nil { return build.ImageBuildResponse{}, err } return build.ImageBuildResponse{ Body: resp.Body, OSType: resp.Header.Get("Ostype"), }, nil } func (cli *Client) imageBuildOptionsToQuery(ctx context.Context, options build.ImageBuildOptions) (url.Values, error) { query := url.Values{} if len(options.Tags) > 0 { query["t"] = options.Tags } if len(options.SecurityOpt) > 0 { query["securityopt"] = options.SecurityOpt } if len(options.ExtraHosts) > 0 { query["extrahosts"] = options.ExtraHosts } if options.SuppressOutput { query.Set("q", "1") } if options.RemoteContext != "" { query.Set("remote", options.RemoteContext) } if options.NoCache { query.Set("nocache", "1") } if !options.Remove { // only send value when opting out because the daemon's default is // to remove intermediate containers after a successful build, // // TODO(thaJeztah): deprecate "Remove" option, and provide a "NoRemove" or "Keep" option instead. query.Set("rm", "0") } if options.ForceRemove { query.Set("forcerm", "1") } if options.PullParent { query.Set("pull", "1") } if options.Squash { if err := cli.NewVersionError(ctx, "1.25", "squash"); err != nil { return query, err } query.Set("squash", "1") } if !container.Isolation.IsDefault(options.Isolation) { query.Set("isolation", string(options.Isolation)) } if options.CPUSetCPUs != "" { query.Set("cpusetcpus", options.CPUSetCPUs) } if options.NetworkMode != "" && options.NetworkMode != network.NetworkDefault { query.Set("networkmode", options.NetworkMode) } if options.CPUSetMems != "" { query.Set("cpusetmems", options.CPUSetMems) } if options.CPUShares != 0 { query.Set("cpushares", strconv.FormatInt(options.CPUShares, 10)) } if options.CPUQuota != 0 { query.Set("cpuquota", strconv.FormatInt(options.CPUQuota, 10)) } if options.CPUPeriod != 0 { query.Set("cpuperiod", strconv.FormatInt(options.CPUPeriod, 10)) } if options.Memory != 0 { query.Set("memory", strconv.FormatInt(options.Memory, 10)) } if options.MemorySwap != 0 { query.Set("memswap", strconv.FormatInt(options.MemorySwap, 10)) } if options.CgroupParent != "" { query.Set("cgroupparent", options.CgroupParent) } if options.ShmSize != 0 { query.Set("shmsize", strconv.FormatInt(options.ShmSize, 10)) } if options.Dockerfile != "" { query.Set("dockerfile", options.Dockerfile) } if options.Target != "" { query.Set("target", options.Target) } if len(options.Ulimits) != 0 { ulimitsJSON, err := json.Marshal(options.Ulimits) if err != nil { return query, err } query.Set("ulimits", string(ulimitsJSON)) } if len(options.BuildArgs) != 0 { buildArgsJSON, err := json.Marshal(options.BuildArgs) if err != nil { return query, err } query.Set("buildargs", string(buildArgsJSON)) } if len(options.Labels) != 0 { labelsJSON, err := json.Marshal(options.Labels) if err != nil { return query, err } query.Set("labels", string(labelsJSON)) } if len(options.CacheFrom) != 0 { cacheFromJSON, err := json.Marshal(options.CacheFrom) if err != nil { return query, err } query.Set("cachefrom", string(cacheFromJSON)) } if options.SessionID != "" { query.Set("session", options.SessionID) } if options.Platform != "" { if err := cli.NewVersionError(ctx, "1.32", "platform"); err != nil { return query, err } query.Set("platform", strings.ToLower(options.Platform)) } if options.BuildID != "" { query.Set("buildid", options.BuildID) } if options.Version != "" { query.Set("version", string(options.Version)) } if options.Outputs != nil { outputsJSON, err := json.Marshal(options.Outputs) if err != nil { return query, err } query.Set("outputs", string(outputsJSON)) } return query, nil } ================================================ FILE: vendor/github.com/docker/docker/client/image_create.go ================================================ package client import ( "context" "io" "net/http" "net/url" "strings" "github.com/distribution/reference" "github.com/docker/docker/api/types/image" "github.com/docker/docker/api/types/registry" ) // ImageCreate creates a new image based on the parent options. // It returns the JSON content in the response body. func (cli *Client) ImageCreate(ctx context.Context, parentReference string, options image.CreateOptions) (io.ReadCloser, error) { ref, err := reference.ParseNormalizedNamed(parentReference) if err != nil { return nil, err } query := url.Values{} query.Set("fromImage", ref.Name()) query.Set("tag", getAPITagFromNamedRef(ref)) if options.Platform != "" { query.Set("platform", strings.ToLower(options.Platform)) } resp, err := cli.tryImageCreate(ctx, query, options.RegistryAuth) if err != nil { return nil, err } return resp.Body, nil } func (cli *Client) tryImageCreate(ctx context.Context, query url.Values, registryAuth string) (*http.Response, error) { return cli.post(ctx, "/images/create", query, nil, http.Header{ registry.AuthHeader: {registryAuth}, }) } ================================================ FILE: vendor/github.com/docker/docker/client/image_history.go ================================================ package client import ( "context" "encoding/json" "fmt" "net/url" "github.com/docker/docker/api/types/image" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) // ImageHistoryWithPlatform sets the platform for the image history operation. func ImageHistoryWithPlatform(platform ocispec.Platform) ImageHistoryOption { return imageHistoryOptionFunc(func(opt *imageHistoryOpts) error { if opt.apiOptions.Platform != nil { return fmt.Errorf("platform already set to %s", *opt.apiOptions.Platform) } opt.apiOptions.Platform = &platform return nil }) } // ImageHistory returns the changes in an image in history format. func (cli *Client) ImageHistory(ctx context.Context, imageID string, historyOpts ...ImageHistoryOption) ([]image.HistoryResponseItem, error) { query := url.Values{} var opts imageHistoryOpts for _, o := range historyOpts { if err := o.Apply(&opts); err != nil { return nil, err } } if opts.apiOptions.Platform != nil { if err := cli.NewVersionError(ctx, "1.48", "platform"); err != nil { return nil, err } p, err := encodePlatform(opts.apiOptions.Platform) if err != nil { return nil, err } query.Set("platform", p) } resp, err := cli.get(ctx, "/images/"+imageID+"/history", query, nil) defer ensureReaderClosed(resp) if err != nil { return nil, err } var history []image.HistoryResponseItem err = json.NewDecoder(resp.Body).Decode(&history) return history, err } ================================================ FILE: vendor/github.com/docker/docker/client/image_history_opts.go ================================================ package client import ( "github.com/docker/docker/api/types/image" ) // ImageHistoryOption is a type representing functional options for the image history operation. type ImageHistoryOption interface { Apply(*imageHistoryOpts) error } type imageHistoryOptionFunc func(opt *imageHistoryOpts) error func (f imageHistoryOptionFunc) Apply(o *imageHistoryOpts) error { return f(o) } type imageHistoryOpts struct { apiOptions image.HistoryOptions } ================================================ FILE: vendor/github.com/docker/docker/client/image_import.go ================================================ package client import ( "context" "io" "net/url" "strings" "github.com/distribution/reference" "github.com/docker/docker/api/types/image" ) // ImageImport creates a new image based on the source options. // It returns the JSON content in the response body. func (cli *Client) ImageImport(ctx context.Context, source image.ImportSource, ref string, options image.ImportOptions) (io.ReadCloser, error) { if ref != "" { // Check if the given image name can be resolved if _, err := reference.ParseNormalizedNamed(ref); err != nil { return nil, err } } query := url.Values{} if source.SourceName != "" { query.Set("fromSrc", source.SourceName) } if ref != "" { query.Set("repo", ref) } if options.Tag != "" { query.Set("tag", options.Tag) } if options.Message != "" { query.Set("message", options.Message) } if options.Platform != "" { query.Set("platform", strings.ToLower(options.Platform)) } for _, change := range options.Changes { query.Add("changes", change) } resp, err := cli.postRaw(ctx, "/images/create", query, source.Source, nil) if err != nil { return nil, err } return resp.Body, nil } ================================================ FILE: vendor/github.com/docker/docker/client/image_inspect.go ================================================ package client import ( "bytes" "context" "encoding/json" "fmt" "io" "net/url" "github.com/docker/docker/api/types/image" ) // ImageInspect returns the image information. func (cli *Client) ImageInspect(ctx context.Context, imageID string, inspectOpts ...ImageInspectOption) (image.InspectResponse, error) { if imageID == "" { return image.InspectResponse{}, objectNotFoundError{object: "image", id: imageID} } var opts imageInspectOpts for _, opt := range inspectOpts { if err := opt.Apply(&opts); err != nil { return image.InspectResponse{}, fmt.Errorf("error applying image inspect option: %w", err) } } query := url.Values{} if opts.apiOptions.Manifests { if err := cli.NewVersionError(ctx, "1.48", "manifests"); err != nil { return image.InspectResponse{}, err } query.Set("manifests", "1") } if opts.apiOptions.Platform != nil { if err := cli.NewVersionError(ctx, "1.49", "platform"); err != nil { return image.InspectResponse{}, err } platform, err := encodePlatform(opts.apiOptions.Platform) if err != nil { return image.InspectResponse{}, err } query.Set("platform", platform) } resp, err := cli.get(ctx, "/images/"+imageID+"/json", query, nil) defer ensureReaderClosed(resp) if err != nil { return image.InspectResponse{}, err } buf := opts.raw if buf == nil { buf = &bytes.Buffer{} } if _, err := io.Copy(buf, resp.Body); err != nil { return image.InspectResponse{}, err } var response image.InspectResponse err = json.Unmarshal(buf.Bytes(), &response) return response, err } // ImageInspectWithRaw returns the image information and its raw representation. // // Deprecated: Use [Client.ImageInspect] instead. Raw response can be obtained using the [ImageInspectWithRawResponse] option. func (cli *Client) ImageInspectWithRaw(ctx context.Context, imageID string) (image.InspectResponse, []byte, error) { var buf bytes.Buffer resp, err := cli.ImageInspect(ctx, imageID, ImageInspectWithRawResponse(&buf)) if err != nil { return image.InspectResponse{}, nil, err } return resp, buf.Bytes(), err } ================================================ FILE: vendor/github.com/docker/docker/client/image_inspect_opts.go ================================================ package client import ( "bytes" "github.com/docker/docker/api/types/image" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) // ImageInspectOption is a type representing functional options for the image inspect operation. type ImageInspectOption interface { Apply(*imageInspectOpts) error } type imageInspectOptionFunc func(opt *imageInspectOpts) error func (f imageInspectOptionFunc) Apply(o *imageInspectOpts) error { return f(o) } // ImageInspectWithRawResponse instructs the client to additionally store the // raw inspect response in the provided buffer. func ImageInspectWithRawResponse(raw *bytes.Buffer) ImageInspectOption { return imageInspectOptionFunc(func(opts *imageInspectOpts) error { opts.raw = raw return nil }) } // ImageInspectWithManifests sets manifests API option for the image inspect operation. // This option is only available for API version 1.48 and up. // With this option set, the image inspect operation response will have the // [image.InspectResponse.Manifests] field populated if the server is multi-platform capable. func ImageInspectWithManifests(manifests bool) ImageInspectOption { return imageInspectOptionFunc(func(clientOpts *imageInspectOpts) error { clientOpts.apiOptions.Manifests = manifests return nil }) } // ImageInspectWithPlatform sets platform API option for the image inspect operation. // This option is only available for API version 1.49 and up. // With this option set, the image inspect operation will return information for the // specified platform variant of the multi-platform image. func ImageInspectWithPlatform(platform *ocispec.Platform) ImageInspectOption { return imageInspectOptionFunc(func(clientOpts *imageInspectOpts) error { clientOpts.apiOptions.Platform = platform return nil }) } // ImageInspectWithAPIOpts sets the API options for the image inspect operation. func ImageInspectWithAPIOpts(opts image.InspectOptions) ImageInspectOption { return imageInspectOptionFunc(func(clientOpts *imageInspectOpts) error { clientOpts.apiOptions = opts return nil }) } type imageInspectOpts struct { raw *bytes.Buffer apiOptions image.InspectOptions } ================================================ FILE: vendor/github.com/docker/docker/client/image_list.go ================================================ package client import ( "context" "encoding/json" "net/url" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/image" "github.com/docker/docker/api/types/versions" ) // ImageList returns a list of images in the docker host. // // Experimental: Setting the [options.Manifest] will populate // [image.Summary.Manifests] with information about image manifests. // This is experimental and might change in the future without any backward // compatibility. func (cli *Client) ImageList(ctx context.Context, options image.ListOptions) ([]image.Summary, error) { var images []image.Summary // Make sure we negotiated (if the client is configured to do so), // as code below contains API-version specific handling of options. // // Normally, version-negotiation (if enabled) would not happen until // the API request is made. if err := cli.checkVersion(ctx); err != nil { return images, err } query := url.Values{} optionFilters := options.Filters referenceFilters := optionFilters.Get("reference") if versions.LessThan(cli.version, "1.25") && len(referenceFilters) > 0 { query.Set("filter", referenceFilters[0]) for _, filterValue := range referenceFilters { optionFilters.Del("reference", filterValue) } } if optionFilters.Len() > 0 { //nolint:staticcheck // ignore SA1019 for old code filterJSON, err := filters.ToParamWithVersion(cli.version, optionFilters) if err != nil { return images, err } query.Set("filters", filterJSON) } if options.All { query.Set("all", "1") } if options.SharedSize && versions.GreaterThanOrEqualTo(cli.version, "1.42") { query.Set("shared-size", "1") } if options.Manifests && versions.GreaterThanOrEqualTo(cli.version, "1.47") { query.Set("manifests", "1") } resp, err := cli.get(ctx, "/images/json", query, nil) defer ensureReaderClosed(resp) if err != nil { return images, err } err = json.NewDecoder(resp.Body).Decode(&images) return images, err } ================================================ FILE: vendor/github.com/docker/docker/client/image_load.go ================================================ package client import ( "context" "io" "net/http" "net/url" "github.com/docker/docker/api/types/image" ) // ImageLoad loads an image in the docker host from the client host. // It's up to the caller to close the io.ReadCloser in the // ImageLoadResponse returned by this function. // // Platform is an optional parameter that specifies the platform to load from // the provided multi-platform image. This is only has effect if the input image // is a multi-platform image. func (cli *Client) ImageLoad(ctx context.Context, input io.Reader, loadOpts ...ImageLoadOption) (image.LoadResponse, error) { var opts imageLoadOpts for _, opt := range loadOpts { if err := opt.Apply(&opts); err != nil { return image.LoadResponse{}, err } } query := url.Values{} query.Set("quiet", "0") if opts.apiOptions.Quiet { query.Set("quiet", "1") } if len(opts.apiOptions.Platforms) > 0 { if err := cli.NewVersionError(ctx, "1.48", "platform"); err != nil { return image.LoadResponse{}, err } p, err := encodePlatforms(opts.apiOptions.Platforms...) if err != nil { return image.LoadResponse{}, err } query["platform"] = p } resp, err := cli.postRaw(ctx, "/images/load", query, input, http.Header{ "Content-Type": {"application/x-tar"}, }) if err != nil { return image.LoadResponse{}, err } return image.LoadResponse{ Body: resp.Body, JSON: resp.Header.Get("Content-Type") == "application/json", }, nil } ================================================ FILE: vendor/github.com/docker/docker/client/image_load_opts.go ================================================ package client import ( "fmt" "github.com/docker/docker/api/types/image" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) // ImageLoadOption is a type representing functional options for the image load operation. type ImageLoadOption interface { Apply(*imageLoadOpts) error } type imageLoadOptionFunc func(opt *imageLoadOpts) error func (f imageLoadOptionFunc) Apply(o *imageLoadOpts) error { return f(o) } type imageLoadOpts struct { apiOptions image.LoadOptions } // ImageLoadWithQuiet sets the quiet option for the image load operation. func ImageLoadWithQuiet(quiet bool) ImageLoadOption { return imageLoadOptionFunc(func(opt *imageLoadOpts) error { opt.apiOptions.Quiet = quiet return nil }) } // ImageLoadWithPlatforms sets the platforms to be loaded from the image. func ImageLoadWithPlatforms(platforms ...ocispec.Platform) ImageLoadOption { return imageLoadOptionFunc(func(opt *imageLoadOpts) error { if opt.apiOptions.Platforms != nil { return fmt.Errorf("platforms already set to %v", opt.apiOptions.Platforms) } opt.apiOptions.Platforms = platforms return nil }) } ================================================ FILE: vendor/github.com/docker/docker/client/image_prune.go ================================================ package client import ( "context" "encoding/json" "fmt" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/image" ) // ImagesPrune requests the daemon to delete unused data func (cli *Client) ImagesPrune(ctx context.Context, pruneFilters filters.Args) (image.PruneReport, error) { if err := cli.NewVersionError(ctx, "1.25", "image prune"); err != nil { return image.PruneReport{}, err } query, err := getFiltersQuery(pruneFilters) if err != nil { return image.PruneReport{}, err } resp, err := cli.post(ctx, "/images/prune", query, nil, nil) defer ensureReaderClosed(resp) if err != nil { return image.PruneReport{}, err } var report image.PruneReport if err := json.NewDecoder(resp.Body).Decode(&report); err != nil { return image.PruneReport{}, fmt.Errorf("Error retrieving disk usage: %v", err) } return report, nil } ================================================ FILE: vendor/github.com/docker/docker/client/image_pull.go ================================================ package client import ( "context" "io" "net/url" "strings" cerrdefs "github.com/containerd/errdefs" "github.com/distribution/reference" "github.com/docker/docker/api/types/image" ) // ImagePull requests the docker host to pull an image from a remote registry. // It executes the privileged function if the operation is unauthorized // and it tries one more time. // It's up to the caller to handle the io.ReadCloser and close it properly. // // FIXME(vdemeester): there is currently used in a few way in docker/docker // - if not in trusted content, ref is used to pass the whole reference, and tag is empty // - if in trusted content, ref is used to pass the reference name, and tag for the digest func (cli *Client) ImagePull(ctx context.Context, refStr string, options image.PullOptions) (io.ReadCloser, error) { ref, err := reference.ParseNormalizedNamed(refStr) if err != nil { return nil, err } query := url.Values{} query.Set("fromImage", ref.Name()) if !options.All { query.Set("tag", getAPITagFromNamedRef(ref)) } if options.Platform != "" { query.Set("platform", strings.ToLower(options.Platform)) } resp, err := cli.tryImageCreate(ctx, query, options.RegistryAuth) if cerrdefs.IsUnauthorized(err) && options.PrivilegeFunc != nil { newAuthHeader, privilegeErr := options.PrivilegeFunc(ctx) if privilegeErr != nil { return nil, privilegeErr } resp, err = cli.tryImageCreate(ctx, query, newAuthHeader) } if err != nil { return nil, err } return resp.Body, nil } // getAPITagFromNamedRef returns a tag from the specified reference. // This function is necessary as long as the docker "server" api expects // digests to be sent as tags and makes a distinction between the name // and tag/digest part of a reference. func getAPITagFromNamedRef(ref reference.Named) string { if digested, ok := ref.(reference.Digested); ok { return digested.Digest().String() } ref = reference.TagNameOnly(ref) if tagged, ok := ref.(reference.Tagged); ok { return tagged.Tag() } return "" } ================================================ FILE: vendor/github.com/docker/docker/client/image_push.go ================================================ package client import ( "context" "encoding/json" "errors" "fmt" "io" "net/http" "net/url" cerrdefs "github.com/containerd/errdefs" "github.com/distribution/reference" "github.com/docker/docker/api/types/image" "github.com/docker/docker/api/types/registry" ) // ImagePush requests the docker host to push an image to a remote registry. // It executes the privileged function if the operation is unauthorized // and it tries one more time. // It's up to the caller to handle the io.ReadCloser and close it properly. func (cli *Client) ImagePush(ctx context.Context, image string, options image.PushOptions) (io.ReadCloser, error) { ref, err := reference.ParseNormalizedNamed(image) if err != nil { return nil, err } if _, isCanonical := ref.(reference.Canonical); isCanonical { return nil, errors.New("cannot push a digest reference") } query := url.Values{} if !options.All { ref = reference.TagNameOnly(ref) if tagged, ok := ref.(reference.Tagged); ok { query.Set("tag", tagged.Tag()) } } if options.Platform != nil { if err := cli.NewVersionError(ctx, "1.46", "platform"); err != nil { return nil, err } p := *options.Platform pJson, err := json.Marshal(p) if err != nil { return nil, fmt.Errorf("invalid platform: %v", err) } query.Set("platform", string(pJson)) } resp, err := cli.tryImagePush(ctx, ref.Name(), query, options.RegistryAuth) if cerrdefs.IsUnauthorized(err) && options.PrivilegeFunc != nil { newAuthHeader, privilegeErr := options.PrivilegeFunc(ctx) if privilegeErr != nil { return nil, privilegeErr } resp, err = cli.tryImagePush(ctx, ref.Name(), query, newAuthHeader) } if err != nil { return nil, err } return resp.Body, nil } func (cli *Client) tryImagePush(ctx context.Context, imageID string, query url.Values, registryAuth string) (*http.Response, error) { // Always send a body (which may be an empty JSON document ("{}")) to prevent // EOF errors on older daemons which had faulty fallback code for handling // authentication in the body when no auth-header was set, resulting in; // // Error response from daemon: bad parameters and missing X-Registry-Auth: invalid X-Registry-Auth header: EOF // // We use [http.NoBody], which gets marshaled to an empty JSON document. // // see: https://github.com/moby/moby/commit/ea29dffaa541289591aa44fa85d2a596ce860e16 return cli.post(ctx, "/images/"+imageID+"/push", query, http.NoBody, http.Header{ registry.AuthHeader: {registryAuth}, }) } ================================================ FILE: vendor/github.com/docker/docker/client/image_remove.go ================================================ package client import ( "context" "encoding/json" "net/url" "github.com/docker/docker/api/types/image" ) // ImageRemove removes an image from the docker host. func (cli *Client) ImageRemove(ctx context.Context, imageID string, options image.RemoveOptions) ([]image.DeleteResponse, error) { query := url.Values{} if options.Force { query.Set("force", "1") } if !options.PruneChildren { query.Set("noprune", "1") } if len(options.Platforms) > 0 { p, err := encodePlatforms(options.Platforms...) if err != nil { return nil, err } query["platforms"] = p } resp, err := cli.delete(ctx, "/images/"+imageID, query, nil) defer ensureReaderClosed(resp) if err != nil { return nil, err } var dels []image.DeleteResponse err = json.NewDecoder(resp.Body).Decode(&dels) return dels, err } ================================================ FILE: vendor/github.com/docker/docker/client/image_save.go ================================================ package client import ( "context" "io" "net/url" ) // ImageSave retrieves one or more images from the docker host as an io.ReadCloser. // // Platforms is an optional parameter that specifies the platforms to save from the image. // This is only has effect if the input image is a multi-platform image. func (cli *Client) ImageSave(ctx context.Context, imageIDs []string, saveOpts ...ImageSaveOption) (io.ReadCloser, error) { var opts imageSaveOpts for _, opt := range saveOpts { if err := opt.Apply(&opts); err != nil { return nil, err } } query := url.Values{ "names": imageIDs, } if len(opts.apiOptions.Platforms) > 0 { if err := cli.NewVersionError(ctx, "1.48", "platform"); err != nil { return nil, err } p, err := encodePlatforms(opts.apiOptions.Platforms...) if err != nil { return nil, err } query["platform"] = p } resp, err := cli.get(ctx, "/images/get", query, nil) if err != nil { return nil, err } return resp.Body, nil } ================================================ FILE: vendor/github.com/docker/docker/client/image_save_opts.go ================================================ package client import ( "fmt" "github.com/docker/docker/api/types/image" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) type ImageSaveOption interface { Apply(*imageSaveOpts) error } type imageSaveOptionFunc func(opt *imageSaveOpts) error func (f imageSaveOptionFunc) Apply(o *imageSaveOpts) error { return f(o) } // ImageSaveWithPlatforms sets the platforms to be saved from the image. func ImageSaveWithPlatforms(platforms ...ocispec.Platform) ImageSaveOption { return imageSaveOptionFunc(func(opt *imageSaveOpts) error { if opt.apiOptions.Platforms != nil { return fmt.Errorf("platforms already set to %v", opt.apiOptions.Platforms) } opt.apiOptions.Platforms = platforms return nil }) } type imageSaveOpts struct { apiOptions image.SaveOptions } ================================================ FILE: vendor/github.com/docker/docker/client/image_search.go ================================================ package client import ( "context" "encoding/json" "net/http" "net/url" "strconv" cerrdefs "github.com/containerd/errdefs" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/registry" ) // ImageSearch makes the docker host search by a term in a remote registry. // The list of results is not sorted in any fashion. func (cli *Client) ImageSearch(ctx context.Context, term string, options registry.SearchOptions) ([]registry.SearchResult, error) { var results []registry.SearchResult query := url.Values{} query.Set("term", term) if options.Limit > 0 { query.Set("limit", strconv.Itoa(options.Limit)) } if options.Filters.Len() > 0 { filterJSON, err := filters.ToJSON(options.Filters) if err != nil { return results, err } query.Set("filters", filterJSON) } resp, err := cli.tryImageSearch(ctx, query, options.RegistryAuth) defer ensureReaderClosed(resp) if cerrdefs.IsUnauthorized(err) && options.PrivilegeFunc != nil { newAuthHeader, privilegeErr := options.PrivilegeFunc(ctx) if privilegeErr != nil { return results, privilegeErr } resp, err = cli.tryImageSearch(ctx, query, newAuthHeader) } if err != nil { return results, err } err = json.NewDecoder(resp.Body).Decode(&results) return results, err } func (cli *Client) tryImageSearch(ctx context.Context, query url.Values, registryAuth string) (*http.Response, error) { return cli.get(ctx, "/images/search", query, http.Header{ registry.AuthHeader: {registryAuth}, }) } ================================================ FILE: vendor/github.com/docker/docker/client/image_tag.go ================================================ package client import ( "context" "net/url" "github.com/distribution/reference" "github.com/pkg/errors" ) // ImageTag tags an image in the docker host func (cli *Client) ImageTag(ctx context.Context, source, target string) error { if _, err := reference.ParseAnyReference(source); err != nil { return errors.Wrapf(err, "Error parsing reference: %q is not a valid repository/tag", source) } ref, err := reference.ParseNormalizedNamed(target) if err != nil { return errors.Wrapf(err, "Error parsing reference: %q is not a valid repository/tag", target) } if _, isCanonical := ref.(reference.Canonical); isCanonical { return errors.New("refusing to create a tag with a digest reference") } ref = reference.TagNameOnly(ref) query := url.Values{} query.Set("repo", ref.Name()) if tagged, ok := ref.(reference.Tagged); ok { query.Set("tag", tagged.Tag()) } resp, err := cli.post(ctx, "/images/"+source+"/tag", query, nil, nil) ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/info.go ================================================ package client import ( "context" "encoding/json" "fmt" "net/url" "github.com/docker/docker/api/types/system" ) // Info returns information about the docker server. func (cli *Client) Info(ctx context.Context) (system.Info, error) { var info system.Info resp, err := cli.get(ctx, "/info", url.Values{}, nil) defer ensureReaderClosed(resp) if err != nil { return info, err } if err := json.NewDecoder(resp.Body).Decode(&info); err != nil { return info, fmt.Errorf("Error reading remote info: %v", err) } return info, nil } ================================================ FILE: vendor/github.com/docker/docker/client/login.go ================================================ package client import ( "context" "encoding/json" "net/url" "github.com/docker/docker/api/types/registry" ) // RegistryLogin authenticates the docker server with a given docker registry. // It returns unauthorizedError when the authentication fails. func (cli *Client) RegistryLogin(ctx context.Context, auth registry.AuthConfig) (registry.AuthenticateOKBody, error) { resp, err := cli.post(ctx, "/auth", url.Values{}, auth, nil) defer ensureReaderClosed(resp) if err != nil { return registry.AuthenticateOKBody{}, err } var response registry.AuthenticateOKBody err = json.NewDecoder(resp.Body).Decode(&response) return response, err } ================================================ FILE: vendor/github.com/docker/docker/client/network_connect.go ================================================ package client import ( "context" "github.com/docker/docker/api/types/network" ) // NetworkConnect connects a container to an existent network in the docker host. func (cli *Client) NetworkConnect(ctx context.Context, networkID, containerID string, config *network.EndpointSettings) error { networkID, err := trimID("network", networkID) if err != nil { return err } containerID, err = trimID("container", containerID) if err != nil { return err } nc := network.ConnectOptions{ Container: containerID, EndpointConfig: config, } resp, err := cli.post(ctx, "/networks/"+networkID+"/connect", nil, nc, nil) ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/network_create.go ================================================ package client import ( "context" "encoding/json" "github.com/docker/docker/api/types/network" "github.com/docker/docker/api/types/versions" ) // NetworkCreate creates a new network in the docker host. func (cli *Client) NetworkCreate(ctx context.Context, name string, options network.CreateOptions) (network.CreateResponse, error) { // Make sure we negotiated (if the client is configured to do so), // as code below contains API-version specific handling of options. // // Normally, version-negotiation (if enabled) would not happen until // the API request is made. if err := cli.checkVersion(ctx); err != nil { return network.CreateResponse{}, err } networkCreateRequest := network.CreateRequest{ CreateOptions: options, Name: name, } if versions.LessThan(cli.version, "1.44") { enabled := true networkCreateRequest.CheckDuplicate = &enabled //nolint:staticcheck // ignore SA1019: CheckDuplicate is deprecated since API v1.44. } resp, err := cli.post(ctx, "/networks/create", nil, networkCreateRequest, nil) defer ensureReaderClosed(resp) if err != nil { return network.CreateResponse{}, err } var response network.CreateResponse err = json.NewDecoder(resp.Body).Decode(&response) return response, err } ================================================ FILE: vendor/github.com/docker/docker/client/network_disconnect.go ================================================ package client import ( "context" "github.com/docker/docker/api/types/network" ) // NetworkDisconnect disconnects a container from an existent network in the docker host. func (cli *Client) NetworkDisconnect(ctx context.Context, networkID, containerID string, force bool) error { networkID, err := trimID("network", networkID) if err != nil { return err } containerID, err = trimID("container", containerID) if err != nil { return err } nd := network.DisconnectOptions{ Container: containerID, Force: force, } resp, err := cli.post(ctx, "/networks/"+networkID+"/disconnect", nil, nd, nil) ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/network_inspect.go ================================================ package client import ( "bytes" "context" "encoding/json" "io" "net/url" "github.com/docker/docker/api/types/network" ) // NetworkInspect returns the information for a specific network configured in the docker host. func (cli *Client) NetworkInspect(ctx context.Context, networkID string, options network.InspectOptions) (network.Inspect, error) { networkResource, _, err := cli.NetworkInspectWithRaw(ctx, networkID, options) return networkResource, err } // NetworkInspectWithRaw returns the information for a specific network configured in the docker host and its raw representation. func (cli *Client) NetworkInspectWithRaw(ctx context.Context, networkID string, options network.InspectOptions) (network.Inspect, []byte, error) { networkID, err := trimID("network", networkID) if err != nil { return network.Inspect{}, nil, err } query := url.Values{} if options.Verbose { query.Set("verbose", "true") } if options.Scope != "" { query.Set("scope", options.Scope) } resp, err := cli.get(ctx, "/networks/"+networkID, query, nil) defer ensureReaderClosed(resp) if err != nil { return network.Inspect{}, nil, err } raw, err := io.ReadAll(resp.Body) if err != nil { return network.Inspect{}, nil, err } var nw network.Inspect err = json.NewDecoder(bytes.NewReader(raw)).Decode(&nw) return nw, raw, err } ================================================ FILE: vendor/github.com/docker/docker/client/network_list.go ================================================ package client import ( "context" "encoding/json" "net/url" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/network" ) // NetworkList returns the list of networks configured in the docker host. func (cli *Client) NetworkList(ctx context.Context, options network.ListOptions) ([]network.Summary, error) { query := url.Values{} if options.Filters.Len() > 0 { //nolint:staticcheck // ignore SA1019 for old code filterJSON, err := filters.ToParamWithVersion(cli.version, options.Filters) if err != nil { return nil, err } query.Set("filters", filterJSON) } var networkResources []network.Summary resp, err := cli.get(ctx, "/networks", query, nil) defer ensureReaderClosed(resp) if err != nil { return networkResources, err } err = json.NewDecoder(resp.Body).Decode(&networkResources) return networkResources, err } ================================================ FILE: vendor/github.com/docker/docker/client/network_prune.go ================================================ package client import ( "context" "encoding/json" "fmt" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/network" ) // NetworksPrune requests the daemon to delete unused networks func (cli *Client) NetworksPrune(ctx context.Context, pruneFilters filters.Args) (network.PruneReport, error) { if err := cli.NewVersionError(ctx, "1.25", "network prune"); err != nil { return network.PruneReport{}, err } query, err := getFiltersQuery(pruneFilters) if err != nil { return network.PruneReport{}, err } resp, err := cli.post(ctx, "/networks/prune", query, nil, nil) defer ensureReaderClosed(resp) if err != nil { return network.PruneReport{}, err } var report network.PruneReport if err := json.NewDecoder(resp.Body).Decode(&report); err != nil { return network.PruneReport{}, fmt.Errorf("Error retrieving network prune report: %v", err) } return report, nil } ================================================ FILE: vendor/github.com/docker/docker/client/network_remove.go ================================================ package client import "context" // NetworkRemove removes an existent network from the docker host. func (cli *Client) NetworkRemove(ctx context.Context, networkID string) error { networkID, err := trimID("network", networkID) if err != nil { return err } resp, err := cli.delete(ctx, "/networks/"+networkID, nil, nil) defer ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/node_inspect.go ================================================ package client import ( "bytes" "context" "encoding/json" "io" "github.com/docker/docker/api/types/swarm" ) // NodeInspectWithRaw returns the node information. func (cli *Client) NodeInspectWithRaw(ctx context.Context, nodeID string) (swarm.Node, []byte, error) { nodeID, err := trimID("node", nodeID) if err != nil { return swarm.Node{}, nil, err } resp, err := cli.get(ctx, "/nodes/"+nodeID, nil, nil) defer ensureReaderClosed(resp) if err != nil { return swarm.Node{}, nil, err } body, err := io.ReadAll(resp.Body) if err != nil { return swarm.Node{}, nil, err } var response swarm.Node rdr := bytes.NewReader(body) err = json.NewDecoder(rdr).Decode(&response) return response, body, err } ================================================ FILE: vendor/github.com/docker/docker/client/node_list.go ================================================ package client import ( "context" "encoding/json" "net/url" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/swarm" ) // NodeList returns the list of nodes. func (cli *Client) NodeList(ctx context.Context, options swarm.NodeListOptions) ([]swarm.Node, error) { query := url.Values{} if options.Filters.Len() > 0 { filterJSON, err := filters.ToJSON(options.Filters) if err != nil { return nil, err } query.Set("filters", filterJSON) } resp, err := cli.get(ctx, "/nodes", query, nil) defer ensureReaderClosed(resp) if err != nil { return nil, err } var nodes []swarm.Node err = json.NewDecoder(resp.Body).Decode(&nodes) return nodes, err } ================================================ FILE: vendor/github.com/docker/docker/client/node_remove.go ================================================ package client import ( "context" "net/url" "github.com/docker/docker/api/types/swarm" ) // NodeRemove removes a Node. func (cli *Client) NodeRemove(ctx context.Context, nodeID string, options swarm.NodeRemoveOptions) error { nodeID, err := trimID("node", nodeID) if err != nil { return err } query := url.Values{} if options.Force { query.Set("force", "1") } resp, err := cli.delete(ctx, "/nodes/"+nodeID, query, nil) defer ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/node_update.go ================================================ package client import ( "context" "net/url" "github.com/docker/docker/api/types/swarm" ) // NodeUpdate updates a Node. func (cli *Client) NodeUpdate(ctx context.Context, nodeID string, version swarm.Version, node swarm.NodeSpec) error { nodeID, err := trimID("node", nodeID) if err != nil { return err } query := url.Values{} query.Set("version", version.String()) resp, err := cli.post(ctx, "/nodes/"+nodeID+"/update", query, node, nil) ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/options.go ================================================ package client import ( "context" "net" "net/http" "os" "path/filepath" "strings" "time" "github.com/docker/go-connections/sockets" "github.com/docker/go-connections/tlsconfig" "github.com/pkg/errors" "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" "go.opentelemetry.io/otel/trace" ) // Opt is a configuration option to initialize a [Client]. type Opt func(*Client) error // FromEnv configures the client with values from environment variables. It // is the equivalent of using the [WithTLSClientConfigFromEnv], [WithHostFromEnv], // and [WithVersionFromEnv] options. // // FromEnv uses the following environment variables: // // - DOCKER_HOST ([EnvOverrideHost]) to set the URL to the docker server. // - DOCKER_API_VERSION ([EnvOverrideAPIVersion]) to set the version of the // API to use, leave empty for latest. // - DOCKER_CERT_PATH ([EnvOverrideCertPath]) to specify the directory from // which to load the TLS certificates ("ca.pem", "cert.pem", "key.pem'). // - DOCKER_TLS_VERIFY ([EnvTLSVerify]) to enable or disable TLS verification // (off by default). func FromEnv(c *Client) error { ops := []Opt{ WithTLSClientConfigFromEnv(), WithHostFromEnv(), WithVersionFromEnv(), } for _, op := range ops { if err := op(c); err != nil { return err } } return nil } // WithDialContext applies the dialer to the client transport. This can be // used to set the Timeout and KeepAlive settings of the client. It returns // an error if the client does not have a [http.Transport] configured. func WithDialContext(dialContext func(ctx context.Context, network, addr string) (net.Conn, error)) Opt { return func(c *Client) error { if transport, ok := c.client.Transport.(*http.Transport); ok { transport.DialContext = dialContext return nil } return errors.Errorf("cannot apply dialer to transport: %T", c.client.Transport) } } // WithHost overrides the client host with the specified one. func WithHost(host string) Opt { return func(c *Client) error { hostURL, err := ParseHostURL(host) if err != nil { return err } c.host = host c.proto = hostURL.Scheme c.addr = hostURL.Host c.basePath = hostURL.Path if transport, ok := c.client.Transport.(*http.Transport); ok { return sockets.ConfigureTransport(transport, c.proto, c.addr) } return errors.Errorf("cannot apply host to transport: %T", c.client.Transport) } } // WithHostFromEnv overrides the client host with the host specified in the // DOCKER_HOST ([EnvOverrideHost]) environment variable. If DOCKER_HOST is not set, // or set to an empty value, the host is not modified. func WithHostFromEnv() Opt { return func(c *Client) error { if host := os.Getenv(EnvOverrideHost); host != "" { return WithHost(host)(c) } return nil } } // WithHTTPClient overrides the client's HTTP client with the specified one. func WithHTTPClient(client *http.Client) Opt { return func(c *Client) error { if client != nil { c.client = client } return nil } } // WithTimeout configures the time limit for requests made by the HTTP client. func WithTimeout(timeout time.Duration) Opt { return func(c *Client) error { c.client.Timeout = timeout return nil } } // WithUserAgent configures the User-Agent header to use for HTTP requests. // It overrides any User-Agent set in headers. When set to an empty string, // the User-Agent header is removed, and no header is sent. func WithUserAgent(ua string) Opt { return func(c *Client) error { c.userAgent = &ua return nil } } // WithHTTPHeaders appends custom HTTP headers to the client's default headers. // It does not allow for built-in headers (such as "User-Agent", if set) to // be overridden. Also see [WithUserAgent]. func WithHTTPHeaders(headers map[string]string) Opt { return func(c *Client) error { c.customHTTPHeaders = headers return nil } } // WithScheme overrides the client scheme with the specified one. func WithScheme(scheme string) Opt { return func(c *Client) error { c.scheme = scheme return nil } } // WithTLSClientConfig applies a TLS config to the client transport. func WithTLSClientConfig(cacertPath, certPath, keyPath string) Opt { return func(c *Client) error { transport, ok := c.client.Transport.(*http.Transport) if !ok { return errors.Errorf("cannot apply tls config to transport: %T", c.client.Transport) } config, err := tlsconfig.Client(tlsconfig.Options{ CAFile: cacertPath, CertFile: certPath, KeyFile: keyPath, ExclusiveRootPools: true, }) if err != nil { return errors.Wrap(err, "failed to create tls config") } transport.TLSClientConfig = config return nil } } // WithTLSClientConfigFromEnv configures the client's TLS settings with the // settings in the DOCKER_CERT_PATH ([EnvOverrideCertPath]) and DOCKER_TLS_VERIFY // ([EnvTLSVerify]) environment variables. If DOCKER_CERT_PATH is not set or empty, // TLS configuration is not modified. // // WithTLSClientConfigFromEnv uses the following environment variables: // // - DOCKER_CERT_PATH ([EnvOverrideCertPath]) to specify the directory from // which to load the TLS certificates ("ca.pem", "cert.pem", "key.pem"). // - DOCKER_TLS_VERIFY ([EnvTLSVerify]) to enable or disable TLS verification // (off by default). func WithTLSClientConfigFromEnv() Opt { return func(c *Client) error { dockerCertPath := os.Getenv(EnvOverrideCertPath) if dockerCertPath == "" { return nil } tlsc, err := tlsconfig.Client(tlsconfig.Options{ CAFile: filepath.Join(dockerCertPath, "ca.pem"), CertFile: filepath.Join(dockerCertPath, "cert.pem"), KeyFile: filepath.Join(dockerCertPath, "key.pem"), InsecureSkipVerify: os.Getenv(EnvTLSVerify) == "", }) if err != nil { return err } c.client = &http.Client{ Transport: &http.Transport{TLSClientConfig: tlsc}, CheckRedirect: CheckRedirect, } return nil } } // WithVersion overrides the client version with the specified one. If an empty // version is provided, the value is ignored to allow version negotiation // (see [WithAPIVersionNegotiation]). func WithVersion(version string) Opt { return func(c *Client) error { if v := strings.TrimPrefix(version, "v"); v != "" { c.version = v c.manualOverride = true } return nil } } // WithVersionFromEnv overrides the client version with the version specified in // the DOCKER_API_VERSION ([EnvOverrideAPIVersion]) environment variable. // If DOCKER_API_VERSION is not set, or set to an empty value, the version // is not modified. func WithVersionFromEnv() Opt { return func(c *Client) error { return WithVersion(os.Getenv(EnvOverrideAPIVersion))(c) } } // WithAPIVersionNegotiation enables automatic API version negotiation for the client. // With this option enabled, the client automatically negotiates the API version // to use when making requests. API version negotiation is performed on the first // request; subsequent requests do not re-negotiate. func WithAPIVersionNegotiation() Opt { return func(c *Client) error { c.negotiateVersion = true return nil } } // WithTraceProvider sets the trace provider for the client. // If this is not set then the global trace provider will be used. func WithTraceProvider(provider trace.TracerProvider) Opt { return WithTraceOptions(otelhttp.WithTracerProvider(provider)) } // WithTraceOptions sets tracing span options for the client. func WithTraceOptions(opts ...otelhttp.Option) Opt { return func(c *Client) error { c.traceOpts = append(c.traceOpts, opts...) return nil } } ================================================ FILE: vendor/github.com/docker/docker/client/ping.go ================================================ package client import ( "context" "net/http" "path" "strings" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/build" "github.com/docker/docker/api/types/swarm" ) // Ping pings the server and returns the value of the "Docker-Experimental", // "Builder-Version", "OS-Type" & "API-Version" headers. It attempts to use // a HEAD request on the endpoint, but falls back to GET if HEAD is not supported // by the daemon. It ignores internal server errors returned by the API, which // may be returned if the daemon is in an unhealthy state, but returns errors // for other non-success status codes, failing to connect to the API, or failing // to parse the API response. func (cli *Client) Ping(ctx context.Context) (types.Ping, error) { var ping types.Ping // Using cli.buildRequest() + cli.doRequest() instead of cli.sendRequest() // because ping requests are used during API version negotiation, so we want // to hit the non-versioned /_ping endpoint, not /v1.xx/_ping req, err := cli.buildRequest(ctx, http.MethodHead, path.Join(cli.basePath, "/_ping"), nil, nil) if err != nil { return ping, err } resp, err := cli.doRequest(req) if err != nil { if IsErrConnectionFailed(err) { return ping, err } // We managed to connect, but got some error; continue and try GET request. } else { defer ensureReaderClosed(resp) switch resp.StatusCode { case http.StatusOK, http.StatusInternalServerError: // Server handled the request, so parse the response return parsePingResponse(cli, resp) } } // HEAD failed; fallback to GET. req.Method = http.MethodGet resp, err = cli.doRequest(req) defer ensureReaderClosed(resp) if err != nil { return ping, err } return parsePingResponse(cli, resp) } func parsePingResponse(cli *Client, resp *http.Response) (types.Ping, error) { if resp == nil { return types.Ping{}, nil } var ping types.Ping if resp.Header == nil { return ping, cli.checkResponseErr(resp) } ping.APIVersion = resp.Header.Get("Api-Version") ping.OSType = resp.Header.Get("Ostype") if resp.Header.Get("Docker-Experimental") == "true" { ping.Experimental = true } if bv := resp.Header.Get("Builder-Version"); bv != "" { ping.BuilderVersion = build.BuilderVersion(bv) } if si := resp.Header.Get("Swarm"); si != "" { state, role, _ := strings.Cut(si, "/") ping.SwarmStatus = &swarm.Status{ NodeState: swarm.LocalNodeState(state), ControlAvailable: role == "manager", } } return ping, cli.checkResponseErr(resp) } ================================================ FILE: vendor/github.com/docker/docker/client/plugin_create.go ================================================ package client import ( "context" "io" "net/http" "net/url" "github.com/docker/docker/api/types" ) // PluginCreate creates a plugin func (cli *Client) PluginCreate(ctx context.Context, createContext io.Reader, createOptions types.PluginCreateOptions) error { headers := http.Header(make(map[string][]string)) headers.Set("Content-Type", "application/x-tar") query := url.Values{} query.Set("name", createOptions.RepoName) resp, err := cli.postRaw(ctx, "/plugins/create", query, createContext, headers) ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/plugin_disable.go ================================================ package client import ( "context" "net/url" "github.com/docker/docker/api/types" ) // PluginDisable disables a plugin func (cli *Client) PluginDisable(ctx context.Context, name string, options types.PluginDisableOptions) error { name, err := trimID("plugin", name) if err != nil { return err } query := url.Values{} if options.Force { query.Set("force", "1") } resp, err := cli.post(ctx, "/plugins/"+name+"/disable", query, nil, nil) ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/plugin_enable.go ================================================ package client import ( "context" "net/url" "strconv" "github.com/docker/docker/api/types" ) // PluginEnable enables a plugin func (cli *Client) PluginEnable(ctx context.Context, name string, options types.PluginEnableOptions) error { name, err := trimID("plugin", name) if err != nil { return err } query := url.Values{} query.Set("timeout", strconv.Itoa(options.Timeout)) resp, err := cli.post(ctx, "/plugins/"+name+"/enable", query, nil, nil) ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/plugin_inspect.go ================================================ package client import ( "bytes" "context" "encoding/json" "io" "github.com/docker/docker/api/types" ) // PluginInspectWithRaw inspects an existing plugin func (cli *Client) PluginInspectWithRaw(ctx context.Context, name string) (*types.Plugin, []byte, error) { name, err := trimID("plugin", name) if err != nil { return nil, nil, err } resp, err := cli.get(ctx, "/plugins/"+name+"/json", nil, nil) defer ensureReaderClosed(resp) if err != nil { return nil, nil, err } body, err := io.ReadAll(resp.Body) if err != nil { return nil, nil, err } var p types.Plugin rdr := bytes.NewReader(body) err = json.NewDecoder(rdr).Decode(&p) return &p, body, err } ================================================ FILE: vendor/github.com/docker/docker/client/plugin_install.go ================================================ package client import ( "context" "encoding/json" "io" "net/http" "net/url" cerrdefs "github.com/containerd/errdefs" "github.com/distribution/reference" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/registry" "github.com/pkg/errors" ) // PluginInstall installs a plugin func (cli *Client) PluginInstall(ctx context.Context, name string, options types.PluginInstallOptions) (_ io.ReadCloser, retErr error) { query := url.Values{} if _, err := reference.ParseNormalizedNamed(options.RemoteRef); err != nil { return nil, errors.Wrap(err, "invalid remote reference") } query.Set("remote", options.RemoteRef) privileges, err := cli.checkPluginPermissions(ctx, query, options) if err != nil { return nil, err } // set name for plugin pull, if empty should default to remote reference query.Set("name", name) resp, err := cli.tryPluginPull(ctx, query, privileges, options.RegistryAuth) if err != nil { return nil, err } name = resp.Header.Get("Docker-Plugin-Name") pr, pw := io.Pipe() go func() { // todo: the client should probably be designed more around the actual api _, err := io.Copy(pw, resp.Body) if err != nil { _ = pw.CloseWithError(err) return } defer func() { if retErr != nil { delResp, _ := cli.delete(ctx, "/plugins/"+name, nil, nil) ensureReaderClosed(delResp) } }() if len(options.Args) > 0 { if err := cli.PluginSet(ctx, name, options.Args); err != nil { _ = pw.CloseWithError(err) return } } if options.Disabled { _ = pw.Close() return } enableErr := cli.PluginEnable(ctx, name, types.PluginEnableOptions{Timeout: 0}) _ = pw.CloseWithError(enableErr) }() return pr, nil } func (cli *Client) tryPluginPrivileges(ctx context.Context, query url.Values, registryAuth string) (*http.Response, error) { return cli.get(ctx, "/plugins/privileges", query, http.Header{ registry.AuthHeader: {registryAuth}, }) } func (cli *Client) tryPluginPull(ctx context.Context, query url.Values, privileges types.PluginPrivileges, registryAuth string) (*http.Response, error) { return cli.post(ctx, "/plugins/pull", query, privileges, http.Header{ registry.AuthHeader: {registryAuth}, }) } func (cli *Client) checkPluginPermissions(ctx context.Context, query url.Values, options types.PluginInstallOptions) (types.PluginPrivileges, error) { resp, err := cli.tryPluginPrivileges(ctx, query, options.RegistryAuth) if cerrdefs.IsUnauthorized(err) && options.PrivilegeFunc != nil { // todo: do inspect before to check existing name before checking privileges newAuthHeader, privilegeErr := options.PrivilegeFunc(ctx) if privilegeErr != nil { ensureReaderClosed(resp) return nil, privilegeErr } options.RegistryAuth = newAuthHeader resp, err = cli.tryPluginPrivileges(ctx, query, options.RegistryAuth) } if err != nil { ensureReaderClosed(resp) return nil, err } var privileges types.PluginPrivileges if err := json.NewDecoder(resp.Body).Decode(&privileges); err != nil { ensureReaderClosed(resp) return nil, err } ensureReaderClosed(resp) if !options.AcceptAllPermissions && options.AcceptPermissionsFunc != nil && len(privileges) > 0 { accept, err := options.AcceptPermissionsFunc(ctx, privileges) if err != nil { return nil, err } if !accept { return nil, errors.Errorf("permission denied while installing plugin %s", options.RemoteRef) } } return privileges, nil } ================================================ FILE: vendor/github.com/docker/docker/client/plugin_list.go ================================================ package client import ( "context" "encoding/json" "net/url" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" ) // PluginList returns the installed plugins func (cli *Client) PluginList(ctx context.Context, filter filters.Args) (types.PluginsListResponse, error) { var plugins types.PluginsListResponse query := url.Values{} if filter.Len() > 0 { //nolint:staticcheck // ignore SA1019 for old code filterJSON, err := filters.ToParamWithVersion(cli.version, filter) if err != nil { return plugins, err } query.Set("filters", filterJSON) } resp, err := cli.get(ctx, "/plugins", query, nil) defer ensureReaderClosed(resp) if err != nil { return plugins, err } err = json.NewDecoder(resp.Body).Decode(&plugins) return plugins, err } ================================================ FILE: vendor/github.com/docker/docker/client/plugin_push.go ================================================ package client import ( "context" "io" "net/http" "github.com/docker/docker/api/types/registry" ) // PluginPush pushes a plugin to a registry func (cli *Client) PluginPush(ctx context.Context, name string, registryAuth string) (io.ReadCloser, error) { name, err := trimID("plugin", name) if err != nil { return nil, err } resp, err := cli.post(ctx, "/plugins/"+name+"/push", nil, nil, http.Header{ registry.AuthHeader: {registryAuth}, }) if err != nil { return nil, err } return resp.Body, nil } ================================================ FILE: vendor/github.com/docker/docker/client/plugin_remove.go ================================================ package client import ( "context" "net/url" "github.com/docker/docker/api/types" ) // PluginRemove removes a plugin func (cli *Client) PluginRemove(ctx context.Context, name string, options types.PluginRemoveOptions) error { name, err := trimID("plugin", name) if err != nil { return err } query := url.Values{} if options.Force { query.Set("force", "1") } resp, err := cli.delete(ctx, "/plugins/"+name, query, nil) defer ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/plugin_set.go ================================================ package client import ( "context" ) // PluginSet modifies settings for an existing plugin func (cli *Client) PluginSet(ctx context.Context, name string, args []string) error { name, err := trimID("plugin", name) if err != nil { return err } resp, err := cli.post(ctx, "/plugins/"+name+"/set", nil, args, nil) ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/plugin_upgrade.go ================================================ package client import ( "context" "io" "net/http" "net/url" "github.com/distribution/reference" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/registry" "github.com/pkg/errors" ) // PluginUpgrade upgrades a plugin func (cli *Client) PluginUpgrade(ctx context.Context, name string, options types.PluginInstallOptions) (io.ReadCloser, error) { name, err := trimID("plugin", name) if err != nil { return nil, err } if err := cli.NewVersionError(ctx, "1.26", "plugin upgrade"); err != nil { return nil, err } query := url.Values{} if _, err := reference.ParseNormalizedNamed(options.RemoteRef); err != nil { return nil, errors.Wrap(err, "invalid remote reference") } query.Set("remote", options.RemoteRef) privileges, err := cli.checkPluginPermissions(ctx, query, options) if err != nil { return nil, err } resp, err := cli.tryPluginUpgrade(ctx, query, privileges, name, options.RegistryAuth) if err != nil { return nil, err } return resp.Body, nil } func (cli *Client) tryPluginUpgrade(ctx context.Context, query url.Values, privileges types.PluginPrivileges, name, registryAuth string) (*http.Response, error) { return cli.post(ctx, "/plugins/"+name+"/upgrade", query, privileges, http.Header{ registry.AuthHeader: {registryAuth}, }) } ================================================ FILE: vendor/github.com/docker/docker/client/request.go ================================================ package client import ( "bytes" "context" "encoding/json" "fmt" "io" "net" "net/http" "net/url" "os" "reflect" "strings" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/versions" "github.com/pkg/errors" ) // head sends an http request to the docker API using the method HEAD. func (cli *Client) head(ctx context.Context, path string, query url.Values, headers http.Header) (*http.Response, error) { return cli.sendRequest(ctx, http.MethodHead, path, query, nil, headers) } // get sends an http request to the docker API using the method GET with a specific Go context. func (cli *Client) get(ctx context.Context, path string, query url.Values, headers http.Header) (*http.Response, error) { return cli.sendRequest(ctx, http.MethodGet, path, query, nil, headers) } // post sends an http request to the docker API using the method POST with a specific Go context. func (cli *Client) post(ctx context.Context, path string, query url.Values, obj interface{}, headers http.Header) (*http.Response, error) { body, headers, err := encodeBody(obj, headers) if err != nil { return nil, err } return cli.sendRequest(ctx, http.MethodPost, path, query, body, headers) } func (cli *Client) postRaw(ctx context.Context, path string, query url.Values, body io.Reader, headers http.Header) (*http.Response, error) { return cli.sendRequest(ctx, http.MethodPost, path, query, body, headers) } func (cli *Client) put(ctx context.Context, path string, query url.Values, obj interface{}, headers http.Header) (*http.Response, error) { body, headers, err := encodeBody(obj, headers) if err != nil { return nil, err } return cli.putRaw(ctx, path, query, body, headers) } // putRaw sends an http request to the docker API using the method PUT. func (cli *Client) putRaw(ctx context.Context, path string, query url.Values, body io.Reader, headers http.Header) (*http.Response, error) { // PUT requests are expected to always have a body (apparently) // so explicitly pass an empty body to sendRequest to signal that // it should set the Content-Type header if not already present. if body == nil { body = http.NoBody } return cli.sendRequest(ctx, http.MethodPut, path, query, body, headers) } // delete sends an http request to the docker API using the method DELETE. func (cli *Client) delete(ctx context.Context, path string, query url.Values, headers http.Header) (*http.Response, error) { return cli.sendRequest(ctx, http.MethodDelete, path, query, nil, headers) } func encodeBody(obj interface{}, headers http.Header) (io.Reader, http.Header, error) { if obj == nil { return nil, headers, nil } // encoding/json encodes a nil pointer as the JSON document `null`, // irrespective of whether the type implements json.Marshaler or encoding.TextMarshaler. // That is almost certainly not what the caller intended as the request body. if reflect.TypeOf(obj).Kind() == reflect.Ptr && reflect.ValueOf(obj).IsNil() { return nil, headers, nil } body, err := encodeData(obj) if err != nil { return nil, headers, err } if headers == nil { headers = make(map[string][]string) } headers["Content-Type"] = []string{"application/json"} return body, headers, nil } func (cli *Client) buildRequest(ctx context.Context, method, path string, body io.Reader, headers http.Header) (*http.Request, error) { req, err := http.NewRequestWithContext(ctx, method, path, body) if err != nil { return nil, err } req = cli.addHeaders(req, headers) req.URL.Scheme = cli.scheme req.URL.Host = cli.addr if cli.proto == "unix" || cli.proto == "npipe" { // Override host header for non-tcp connections. req.Host = DummyHost } if body != nil && req.Header.Get("Content-Type") == "" { req.Header.Set("Content-Type", "text/plain") } return req, nil } func (cli *Client) sendRequest(ctx context.Context, method, path string, query url.Values, body io.Reader, headers http.Header) (*http.Response, error) { req, err := cli.buildRequest(ctx, method, cli.getAPIPath(ctx, path, query), body, headers) if err != nil { return nil, err } resp, err := cli.doRequest(req) switch { case errors.Is(err, context.Canceled), errors.Is(err, context.DeadlineExceeded): return nil, err case err == nil: return resp, cli.checkResponseErr(resp) default: return resp, err } } func (cli *Client) doRequest(req *http.Request) (*http.Response, error) { resp, err := cli.client.Do(req) if err != nil { if cli.scheme != "https" && strings.Contains(err.Error(), "malformed HTTP response") { return nil, errConnectionFailed{fmt.Errorf("%v.\n* Are you trying to connect to a TLS-enabled daemon without TLS?", err)} } if cli.scheme == "https" && strings.Contains(err.Error(), "bad certificate") { return nil, errConnectionFailed{errors.Wrap(err, "the server probably has client authentication (--tlsverify) enabled; check your TLS client certification settings")} } // Don't decorate context sentinel errors; users may be comparing to // them directly. if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) { return nil, err } var uErr *url.Error if errors.As(err, &uErr) { var nErr *net.OpError if errors.As(uErr.Err, &nErr) { if os.IsPermission(nErr.Err) { return nil, errConnectionFailed{errors.Wrapf(err, "permission denied while trying to connect to the Docker daemon socket at %v", cli.host)} } } } var nErr net.Error if errors.As(err, &nErr) { // FIXME(thaJeztah): any net.Error should be considered a connection error (but we should include the original error)? if nErr.Timeout() { return nil, connectionFailed(cli.host) } if strings.Contains(nErr.Error(), "connection refused") || strings.Contains(nErr.Error(), "dial unix") { return nil, connectionFailed(cli.host) } } // Although there's not a strongly typed error for this in go-winio, // lots of people are using the default configuration for the docker // daemon on Windows where the daemon is listening on a named pipe // `//./pipe/docker_engine, and the client must be running elevated. // Give users a clue rather than the not-overly useful message // such as `error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.26/info: // open //./pipe/docker_engine: The system cannot find the file specified.`. // Note we can't string compare "The system cannot find the file specified" as // this is localised - for example in French the error would be // `open //./pipe/docker_engine: Le fichier spécifié est introuvable.` if strings.Contains(err.Error(), `open //./pipe/docker_engine`) { // Checks if client is running with elevated privileges if f, elevatedErr := os.Open(`\\.\PHYSICALDRIVE0`); elevatedErr != nil { err = errors.Wrap(err, "in the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect") } else { _ = f.Close() err = errors.Wrap(err, "this error may indicate that the docker daemon is not running") } } return nil, errConnectionFailed{errors.Wrap(err, "error during connect")} } return resp, nil } func (cli *Client) checkResponseErr(serverResp *http.Response) (retErr error) { if serverResp == nil { return nil } if serverResp.StatusCode >= http.StatusOK && serverResp.StatusCode < http.StatusBadRequest { return nil } defer func() { retErr = httpErrorFromStatusCode(retErr, serverResp.StatusCode) }() var body []byte var err error var reqURL string if serverResp.Request != nil { reqURL = serverResp.Request.URL.String() } statusMsg := serverResp.Status if statusMsg == "" { statusMsg = http.StatusText(serverResp.StatusCode) } if serverResp.Body != nil { bodyMax := 1 * 1024 * 1024 // 1 MiB bodyR := &io.LimitedReader{ R: serverResp.Body, N: int64(bodyMax), } body, err = io.ReadAll(bodyR) if err != nil { return err } if bodyR.N == 0 { if reqURL != "" { return fmt.Errorf("request returned %s with a message (> %d bytes) for API route and version %s, check if the server supports the requested API version", statusMsg, bodyMax, reqURL) } return fmt.Errorf("request returned %s with a message (> %d bytes); check if the server supports the requested API version", statusMsg, bodyMax) } } if len(body) == 0 { if reqURL != "" { return fmt.Errorf("request returned %s for API route and version %s, check if the server supports the requested API version", statusMsg, reqURL) } return fmt.Errorf("request returned %s; check if the server supports the requested API version", statusMsg) } var daemonErr error if serverResp.Header.Get("Content-Type") == "application/json" { var errorResponse types.ErrorResponse if err := json.Unmarshal(body, &errorResponse); err != nil { return errors.Wrap(err, "Error reading JSON") } if errorResponse.Message == "" { // Error-message is empty, which means that we successfully parsed the // JSON-response (no error produced), but it didn't contain an error // message. This could either be because the response was empty, or // the response was valid JSON, but not with the expected schema // ([types.ErrorResponse]). // // We cannot use "strict" JSON handling (json.NewDecoder with DisallowUnknownFields) // due to the API using an open schema (we must anticipate fields // being added to [types.ErrorResponse] in the future, and not // reject those responses. // // For these cases, we construct an error with the status-code // returned, but we could consider returning (a truncated version // of) the actual response as-is. // // TODO(thaJeztah): consider adding a log.Debug to allow clients to debug the actual response when enabling debug logging. daemonErr = fmt.Errorf(`API returned a %d (%s) but provided no error-message`, serverResp.StatusCode, http.StatusText(serverResp.StatusCode), ) } else { daemonErr = errors.New(strings.TrimSpace(errorResponse.Message)) } } else { // Fall back to returning the response as-is for API versions < 1.24 // that didn't support JSON error responses, and for situations // where a plain text error is returned. This branch may also catch // situations where a proxy is involved, returning a HTML response. daemonErr = errors.New(strings.TrimSpace(string(body))) } return errors.Wrap(daemonErr, "Error response from daemon") } func (cli *Client) addHeaders(req *http.Request, headers http.Header) *http.Request { // Add CLI Config's HTTP Headers BEFORE we set the Docker headers // then the user can't change OUR headers for k, v := range cli.customHTTPHeaders { if versions.LessThan(cli.version, "1.25") && http.CanonicalHeaderKey(k) == "User-Agent" { continue } req.Header.Set(k, v) } for k, v := range headers { req.Header[http.CanonicalHeaderKey(k)] = v } if cli.userAgent != nil { if *cli.userAgent == "" { req.Header.Del("User-Agent") } else { req.Header.Set("User-Agent", *cli.userAgent) } } return req } func encodeData(data interface{}) (*bytes.Buffer, error) { params := bytes.NewBuffer(nil) if data != nil { if err := json.NewEncoder(params).Encode(data); err != nil { return nil, err } } return params, nil } func ensureReaderClosed(response *http.Response) { if response != nil && response.Body != nil { // Drain up to 512 bytes and close the body to let the Transport reuse the connection // see https://github.com/google/go-github/pull/317/files#r57536827 // // TODO(thaJeztah): see if this optimization is still needed, or already implemented in stdlib, // and check if context-cancellation should handle this as well. If still needed, consider // wrapping response.Body, or returning a "closer()" from [Client.sendRequest] and related // methods. _, _ = io.CopyN(io.Discard, response.Body, 512) _ = response.Body.Close() } } ================================================ FILE: vendor/github.com/docker/docker/client/secret_create.go ================================================ package client import ( "context" "encoding/json" "github.com/docker/docker/api/types/swarm" ) // SecretCreate creates a new secret. func (cli *Client) SecretCreate(ctx context.Context, secret swarm.SecretSpec) (swarm.SecretCreateResponse, error) { if err := cli.NewVersionError(ctx, "1.25", "secret create"); err != nil { return swarm.SecretCreateResponse{}, err } resp, err := cli.post(ctx, "/secrets/create", nil, secret, nil) defer ensureReaderClosed(resp) if err != nil { return swarm.SecretCreateResponse{}, err } var response swarm.SecretCreateResponse err = json.NewDecoder(resp.Body).Decode(&response) return response, err } ================================================ FILE: vendor/github.com/docker/docker/client/secret_inspect.go ================================================ package client import ( "bytes" "context" "encoding/json" "io" "github.com/docker/docker/api/types/swarm" ) // SecretInspectWithRaw returns the secret information with raw data func (cli *Client) SecretInspectWithRaw(ctx context.Context, id string) (swarm.Secret, []byte, error) { id, err := trimID("secret", id) if err != nil { return swarm.Secret{}, nil, err } if err := cli.NewVersionError(ctx, "1.25", "secret inspect"); err != nil { return swarm.Secret{}, nil, err } resp, err := cli.get(ctx, "/secrets/"+id, nil, nil) defer ensureReaderClosed(resp) if err != nil { return swarm.Secret{}, nil, err } body, err := io.ReadAll(resp.Body) if err != nil { return swarm.Secret{}, nil, err } var secret swarm.Secret rdr := bytes.NewReader(body) err = json.NewDecoder(rdr).Decode(&secret) return secret, body, err } ================================================ FILE: vendor/github.com/docker/docker/client/secret_list.go ================================================ package client import ( "context" "encoding/json" "net/url" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/swarm" ) // SecretList returns the list of secrets. func (cli *Client) SecretList(ctx context.Context, options swarm.SecretListOptions) ([]swarm.Secret, error) { if err := cli.NewVersionError(ctx, "1.25", "secret list"); err != nil { return nil, err } query := url.Values{} if options.Filters.Len() > 0 { filterJSON, err := filters.ToJSON(options.Filters) if err != nil { return nil, err } query.Set("filters", filterJSON) } resp, err := cli.get(ctx, "/secrets", query, nil) defer ensureReaderClosed(resp) if err != nil { return nil, err } var secrets []swarm.Secret err = json.NewDecoder(resp.Body).Decode(&secrets) return secrets, err } ================================================ FILE: vendor/github.com/docker/docker/client/secret_remove.go ================================================ package client import "context" // SecretRemove removes a secret. func (cli *Client) SecretRemove(ctx context.Context, id string) error { id, err := trimID("secret", id) if err != nil { return err } if err := cli.NewVersionError(ctx, "1.25", "secret remove"); err != nil { return err } resp, err := cli.delete(ctx, "/secrets/"+id, nil, nil) defer ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/secret_update.go ================================================ package client import ( "context" "net/url" "github.com/docker/docker/api/types/swarm" ) // SecretUpdate attempts to update a secret. func (cli *Client) SecretUpdate(ctx context.Context, id string, version swarm.Version, secret swarm.SecretSpec) error { id, err := trimID("secret", id) if err != nil { return err } if err := cli.NewVersionError(ctx, "1.25", "secret update"); err != nil { return err } query := url.Values{} query.Set("version", version.String()) resp, err := cli.post(ctx, "/secrets/"+id+"/update", query, secret, nil) ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/service_create.go ================================================ package client import ( "context" "encoding/json" "fmt" "net/http" "strings" "github.com/distribution/reference" "github.com/docker/docker/api/types/registry" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/api/types/versions" "github.com/opencontainers/go-digest" "github.com/pkg/errors" ) // ServiceCreate creates a new service. func (cli *Client) ServiceCreate(ctx context.Context, service swarm.ServiceSpec, options swarm.ServiceCreateOptions) (swarm.ServiceCreateResponse, error) { var response swarm.ServiceCreateResponse // Make sure we negotiated (if the client is configured to do so), // as code below contains API-version specific handling of options. // // Normally, version-negotiation (if enabled) would not happen until // the API request is made. if err := cli.checkVersion(ctx); err != nil { return response, err } // Make sure containerSpec is not nil when no runtime is set or the runtime is set to container if service.TaskTemplate.ContainerSpec == nil && (service.TaskTemplate.Runtime == "" || service.TaskTemplate.Runtime == swarm.RuntimeContainer) { service.TaskTemplate.ContainerSpec = &swarm.ContainerSpec{} } if err := validateServiceSpec(service); err != nil { return response, err } if versions.LessThan(cli.version, "1.30") { if err := validateAPIVersion(service, cli.version); err != nil { return response, err } } // ensure that the image is tagged var resolveWarning string switch { case service.TaskTemplate.ContainerSpec != nil: if taggedImg := imageWithTagString(service.TaskTemplate.ContainerSpec.Image); taggedImg != "" { service.TaskTemplate.ContainerSpec.Image = taggedImg } if options.QueryRegistry { resolveWarning = resolveContainerSpecImage(ctx, cli, &service.TaskTemplate, options.EncodedRegistryAuth) } case service.TaskTemplate.PluginSpec != nil: if taggedImg := imageWithTagString(service.TaskTemplate.PluginSpec.Remote); taggedImg != "" { service.TaskTemplate.PluginSpec.Remote = taggedImg } if options.QueryRegistry { resolveWarning = resolvePluginSpecRemote(ctx, cli, &service.TaskTemplate, options.EncodedRegistryAuth) } } headers := http.Header{} if versions.LessThan(cli.version, "1.30") { // the custom "version" header was used by engine API before 20.10 // (API 1.30) to switch between client- and server-side lookup of // image digests. headers["version"] = []string{cli.version} } if options.EncodedRegistryAuth != "" { headers[registry.AuthHeader] = []string{options.EncodedRegistryAuth} } resp, err := cli.post(ctx, "/services/create", nil, service, headers) defer ensureReaderClosed(resp) if err != nil { return response, err } err = json.NewDecoder(resp.Body).Decode(&response) if resolveWarning != "" { response.Warnings = append(response.Warnings, resolveWarning) } return response, err } func resolveContainerSpecImage(ctx context.Context, cli DistributionAPIClient, taskSpec *swarm.TaskSpec, encodedAuth string) string { var warning string if img, imgPlatforms, err := imageDigestAndPlatforms(ctx, cli, taskSpec.ContainerSpec.Image, encodedAuth); err != nil { warning = digestWarning(taskSpec.ContainerSpec.Image) } else { taskSpec.ContainerSpec.Image = img if len(imgPlatforms) > 0 { if taskSpec.Placement == nil { taskSpec.Placement = &swarm.Placement{} } taskSpec.Placement.Platforms = imgPlatforms } } return warning } func resolvePluginSpecRemote(ctx context.Context, cli DistributionAPIClient, taskSpec *swarm.TaskSpec, encodedAuth string) string { var warning string if img, imgPlatforms, err := imageDigestAndPlatforms(ctx, cli, taskSpec.PluginSpec.Remote, encodedAuth); err != nil { warning = digestWarning(taskSpec.PluginSpec.Remote) } else { taskSpec.PluginSpec.Remote = img if len(imgPlatforms) > 0 { if taskSpec.Placement == nil { taskSpec.Placement = &swarm.Placement{} } taskSpec.Placement.Platforms = imgPlatforms } } return warning } func imageDigestAndPlatforms(ctx context.Context, cli DistributionAPIClient, image, encodedAuth string) (string, []swarm.Platform, error) { distributionInspect, err := cli.DistributionInspect(ctx, image, encodedAuth) var platforms []swarm.Platform if err != nil { return "", nil, err } imageWithDigest := imageWithDigestString(image, distributionInspect.Descriptor.Digest) if len(distributionInspect.Platforms) > 0 { platforms = make([]swarm.Platform, 0, len(distributionInspect.Platforms)) for _, p := range distributionInspect.Platforms { // clear architecture field for arm. This is a temporary patch to address // https://github.com/docker/swarmkit/issues/2294. The issue is that while // image manifests report "arm" as the architecture, the node reports // something like "armv7l" (includes the variant), which causes arm images // to stop working with swarm mode. This patch removes the architecture // constraint for arm images to ensure tasks get scheduled. arch := p.Architecture if strings.ToLower(arch) == "arm" { arch = "" } platforms = append(platforms, swarm.Platform{ Architecture: arch, OS: p.OS, }) } } return imageWithDigest, platforms, err } // imageWithDigestString takes an image string and a digest, and updates // the image string if it didn't originally contain a digest. It returns // image unmodified in other situations. func imageWithDigestString(image string, dgst digest.Digest) string { namedRef, err := reference.ParseNormalizedNamed(image) if err == nil { if _, isCanonical := namedRef.(reference.Canonical); !isCanonical { // ensure that image gets a default tag if none is provided img, err := reference.WithDigest(namedRef, dgst) if err == nil { return reference.FamiliarString(img) } } } return image } // imageWithTagString takes an image string, and returns a tagged image // string, adding a 'latest' tag if one was not provided. It returns an // empty string if a canonical reference was provided func imageWithTagString(image string) string { namedRef, err := reference.ParseNormalizedNamed(image) if err == nil { return reference.FamiliarString(reference.TagNameOnly(namedRef)) } return "" } // digestWarning constructs a formatted warning string using the // image name that could not be pinned by digest. The formatting // is hardcoded, but could me made smarter in the future func digestWarning(image string) string { return fmt.Sprintf("image %s could not be accessed on a registry to record\nits digest. Each node will access %s independently,\npossibly leading to different nodes running different\nversions of the image.\n", image, image) } func validateServiceSpec(s swarm.ServiceSpec) error { if s.TaskTemplate.ContainerSpec != nil && s.TaskTemplate.PluginSpec != nil { return errors.New("must not specify both a container spec and a plugin spec in the task template") } if s.TaskTemplate.PluginSpec != nil && s.TaskTemplate.Runtime != swarm.RuntimePlugin { return errors.New("mismatched runtime with plugin spec") } if s.TaskTemplate.ContainerSpec != nil && (s.TaskTemplate.Runtime != "" && s.TaskTemplate.Runtime != swarm.RuntimeContainer) { return errors.New("mismatched runtime with container spec") } return nil } func validateAPIVersion(c swarm.ServiceSpec, apiVersion string) error { for _, m := range c.TaskTemplate.ContainerSpec.Mounts { if m.BindOptions != nil { if m.BindOptions.NonRecursive && versions.LessThan(apiVersion, "1.40") { return errors.Errorf("bind-recursive=disabled requires API v1.40 or later") } // ReadOnlyNonRecursive can be safely ignored when API < 1.44 if m.BindOptions.ReadOnlyForceRecursive && versions.LessThan(apiVersion, "1.44") { return errors.Errorf("bind-recursive=readonly requires API v1.44 or later") } } } return nil } ================================================ FILE: vendor/github.com/docker/docker/client/service_inspect.go ================================================ package client import ( "bytes" "context" "encoding/json" "fmt" "io" "net/url" "github.com/docker/docker/api/types/swarm" ) // ServiceInspectWithRaw returns the service information and the raw data. func (cli *Client) ServiceInspectWithRaw(ctx context.Context, serviceID string, opts swarm.ServiceInspectOptions) (swarm.Service, []byte, error) { serviceID, err := trimID("service", serviceID) if err != nil { return swarm.Service{}, nil, err } query := url.Values{} query.Set("insertDefaults", fmt.Sprintf("%v", opts.InsertDefaults)) resp, err := cli.get(ctx, "/services/"+serviceID, query, nil) defer ensureReaderClosed(resp) if err != nil { return swarm.Service{}, nil, err } body, err := io.ReadAll(resp.Body) if err != nil { return swarm.Service{}, nil, err } var response swarm.Service rdr := bytes.NewReader(body) err = json.NewDecoder(rdr).Decode(&response) return response, body, err } ================================================ FILE: vendor/github.com/docker/docker/client/service_list.go ================================================ package client import ( "context" "encoding/json" "net/url" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/swarm" ) // ServiceList returns the list of services. func (cli *Client) ServiceList(ctx context.Context, options swarm.ServiceListOptions) ([]swarm.Service, error) { query := url.Values{} if options.Filters.Len() > 0 { filterJSON, err := filters.ToJSON(options.Filters) if err != nil { return nil, err } query.Set("filters", filterJSON) } if options.Status { query.Set("status", "true") } resp, err := cli.get(ctx, "/services", query, nil) defer ensureReaderClosed(resp) if err != nil { return nil, err } var services []swarm.Service err = json.NewDecoder(resp.Body).Decode(&services) return services, err } ================================================ FILE: vendor/github.com/docker/docker/client/service_logs.go ================================================ package client import ( "context" "io" "net/url" "time" "github.com/docker/docker/api/types/container" timetypes "github.com/docker/docker/api/types/time" "github.com/pkg/errors" ) // ServiceLogs returns the logs generated by a service in an io.ReadCloser. // It's up to the caller to close the stream. func (cli *Client) ServiceLogs(ctx context.Context, serviceID string, options container.LogsOptions) (io.ReadCloser, error) { serviceID, err := trimID("service", serviceID) if err != nil { return nil, err } query := url.Values{} if options.ShowStdout { query.Set("stdout", "1") } if options.ShowStderr { query.Set("stderr", "1") } if options.Since != "" { ts, err := timetypes.GetTimestamp(options.Since, time.Now()) if err != nil { return nil, errors.Wrap(err, `invalid value for "since"`) } query.Set("since", ts) } if options.Timestamps { query.Set("timestamps", "1") } if options.Details { query.Set("details", "1") } if options.Follow { query.Set("follow", "1") } query.Set("tail", options.Tail) resp, err := cli.get(ctx, "/services/"+serviceID+"/logs", query, nil) if err != nil { return nil, err } return resp.Body, nil } ================================================ FILE: vendor/github.com/docker/docker/client/service_remove.go ================================================ package client import "context" // ServiceRemove kills and removes a service. func (cli *Client) ServiceRemove(ctx context.Context, serviceID string) error { serviceID, err := trimID("service", serviceID) if err != nil { return err } resp, err := cli.delete(ctx, "/services/"+serviceID, nil, nil) defer ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/service_update.go ================================================ package client import ( "context" "encoding/json" "net/http" "net/url" "github.com/docker/docker/api/types/registry" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/api/types/versions" ) // ServiceUpdate updates a Service. The version number is required to avoid conflicting writes. // It should be the value as set *before* the update. You can find this value in the Meta field // of swarm.Service, which can be found using ServiceInspectWithRaw. func (cli *Client) ServiceUpdate(ctx context.Context, serviceID string, version swarm.Version, service swarm.ServiceSpec, options swarm.ServiceUpdateOptions) (swarm.ServiceUpdateResponse, error) { serviceID, err := trimID("service", serviceID) if err != nil { return swarm.ServiceUpdateResponse{}, err } // Make sure we negotiated (if the client is configured to do so), // as code below contains API-version specific handling of options. // // Normally, version-negotiation (if enabled) would not happen until // the API request is made. if err := cli.checkVersion(ctx); err != nil { return swarm.ServiceUpdateResponse{}, err } query := url.Values{} if options.RegistryAuthFrom != "" { query.Set("registryAuthFrom", options.RegistryAuthFrom) } if options.Rollback != "" { query.Set("rollback", options.Rollback) } query.Set("version", version.String()) if err := validateServiceSpec(service); err != nil { return swarm.ServiceUpdateResponse{}, err } // ensure that the image is tagged var resolveWarning string switch { case service.TaskTemplate.ContainerSpec != nil: if taggedImg := imageWithTagString(service.TaskTemplate.ContainerSpec.Image); taggedImg != "" { service.TaskTemplate.ContainerSpec.Image = taggedImg } if options.QueryRegistry { resolveWarning = resolveContainerSpecImage(ctx, cli, &service.TaskTemplate, options.EncodedRegistryAuth) } case service.TaskTemplate.PluginSpec != nil: if taggedImg := imageWithTagString(service.TaskTemplate.PluginSpec.Remote); taggedImg != "" { service.TaskTemplate.PluginSpec.Remote = taggedImg } if options.QueryRegistry { resolveWarning = resolvePluginSpecRemote(ctx, cli, &service.TaskTemplate, options.EncodedRegistryAuth) } } headers := http.Header{} if versions.LessThan(cli.version, "1.30") { // the custom "version" header was used by engine API before 20.10 // (API 1.30) to switch between client- and server-side lookup of // image digests. headers["version"] = []string{cli.version} } if options.EncodedRegistryAuth != "" { headers[registry.AuthHeader] = []string{options.EncodedRegistryAuth} } resp, err := cli.post(ctx, "/services/"+serviceID+"/update", query, service, headers) defer ensureReaderClosed(resp) if err != nil { return swarm.ServiceUpdateResponse{}, err } var response swarm.ServiceUpdateResponse err = json.NewDecoder(resp.Body).Decode(&response) if resolveWarning != "" { response.Warnings = append(response.Warnings, resolveWarning) } return response, err } ================================================ FILE: vendor/github.com/docker/docker/client/swarm_get_unlock_key.go ================================================ package client import ( "context" "encoding/json" "github.com/docker/docker/api/types/swarm" ) // SwarmGetUnlockKey retrieves the swarm's unlock key. func (cli *Client) SwarmGetUnlockKey(ctx context.Context) (swarm.UnlockKeyResponse, error) { resp, err := cli.get(ctx, "/swarm/unlockkey", nil, nil) defer ensureReaderClosed(resp) if err != nil { return swarm.UnlockKeyResponse{}, err } var response swarm.UnlockKeyResponse err = json.NewDecoder(resp.Body).Decode(&response) return response, err } ================================================ FILE: vendor/github.com/docker/docker/client/swarm_init.go ================================================ package client import ( "context" "encoding/json" "github.com/docker/docker/api/types/swarm" ) // SwarmInit initializes the swarm. func (cli *Client) SwarmInit(ctx context.Context, req swarm.InitRequest) (string, error) { resp, err := cli.post(ctx, "/swarm/init", nil, req, nil) defer ensureReaderClosed(resp) if err != nil { return "", err } var response string err = json.NewDecoder(resp.Body).Decode(&response) return response, err } ================================================ FILE: vendor/github.com/docker/docker/client/swarm_inspect.go ================================================ package client import ( "context" "encoding/json" "github.com/docker/docker/api/types/swarm" ) // SwarmInspect inspects the swarm. func (cli *Client) SwarmInspect(ctx context.Context) (swarm.Swarm, error) { resp, err := cli.get(ctx, "/swarm", nil, nil) defer ensureReaderClosed(resp) if err != nil { return swarm.Swarm{}, err } var response swarm.Swarm err = json.NewDecoder(resp.Body).Decode(&response) return response, err } ================================================ FILE: vendor/github.com/docker/docker/client/swarm_join.go ================================================ package client import ( "context" "github.com/docker/docker/api/types/swarm" ) // SwarmJoin joins the swarm. func (cli *Client) SwarmJoin(ctx context.Context, req swarm.JoinRequest) error { resp, err := cli.post(ctx, "/swarm/join", nil, req, nil) ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/swarm_leave.go ================================================ package client import ( "context" "net/url" ) // SwarmLeave leaves the swarm. func (cli *Client) SwarmLeave(ctx context.Context, force bool) error { query := url.Values{} if force { query.Set("force", "1") } resp, err := cli.post(ctx, "/swarm/leave", query, nil, nil) ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/swarm_unlock.go ================================================ package client import ( "context" "github.com/docker/docker/api/types/swarm" ) // SwarmUnlock unlocks locked swarm. func (cli *Client) SwarmUnlock(ctx context.Context, req swarm.UnlockRequest) error { resp, err := cli.post(ctx, "/swarm/unlock", nil, req, nil) ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/swarm_update.go ================================================ package client import ( "context" "net/url" "strconv" "github.com/docker/docker/api/types/swarm" ) // SwarmUpdate updates the swarm. func (cli *Client) SwarmUpdate(ctx context.Context, version swarm.Version, swarm swarm.Spec, flags swarm.UpdateFlags) error { query := url.Values{} query.Set("version", version.String()) query.Set("rotateWorkerToken", strconv.FormatBool(flags.RotateWorkerToken)) query.Set("rotateManagerToken", strconv.FormatBool(flags.RotateManagerToken)) query.Set("rotateManagerUnlockKey", strconv.FormatBool(flags.RotateManagerUnlockKey)) resp, err := cli.post(ctx, "/swarm/update", query, swarm, nil) ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/task_inspect.go ================================================ package client import ( "bytes" "context" "encoding/json" "io" "github.com/docker/docker/api/types/swarm" ) // TaskInspectWithRaw returns the task information and its raw representation. func (cli *Client) TaskInspectWithRaw(ctx context.Context, taskID string) (swarm.Task, []byte, error) { taskID, err := trimID("task", taskID) if err != nil { return swarm.Task{}, nil, err } resp, err := cli.get(ctx, "/tasks/"+taskID, nil, nil) defer ensureReaderClosed(resp) if err != nil { return swarm.Task{}, nil, err } body, err := io.ReadAll(resp.Body) if err != nil { return swarm.Task{}, nil, err } var response swarm.Task rdr := bytes.NewReader(body) err = json.NewDecoder(rdr).Decode(&response) return response, body, err } ================================================ FILE: vendor/github.com/docker/docker/client/task_list.go ================================================ package client import ( "context" "encoding/json" "net/url" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/swarm" ) // TaskList returns the list of tasks. func (cli *Client) TaskList(ctx context.Context, options swarm.TaskListOptions) ([]swarm.Task, error) { query := url.Values{} if options.Filters.Len() > 0 { filterJSON, err := filters.ToJSON(options.Filters) if err != nil { return nil, err } query.Set("filters", filterJSON) } resp, err := cli.get(ctx, "/tasks", query, nil) defer ensureReaderClosed(resp) if err != nil { return nil, err } var tasks []swarm.Task err = json.NewDecoder(resp.Body).Decode(&tasks) return tasks, err } ================================================ FILE: vendor/github.com/docker/docker/client/task_logs.go ================================================ package client import ( "context" "io" "net/url" "time" "github.com/docker/docker/api/types/container" timetypes "github.com/docker/docker/api/types/time" ) // TaskLogs returns the logs generated by a task in an io.ReadCloser. // It's up to the caller to close the stream. func (cli *Client) TaskLogs(ctx context.Context, taskID string, options container.LogsOptions) (io.ReadCloser, error) { query := url.Values{} if options.ShowStdout { query.Set("stdout", "1") } if options.ShowStderr { query.Set("stderr", "1") } if options.Since != "" { ts, err := timetypes.GetTimestamp(options.Since, time.Now()) if err != nil { return nil, err } query.Set("since", ts) } if options.Timestamps { query.Set("timestamps", "1") } if options.Details { query.Set("details", "1") } if options.Follow { query.Set("follow", "1") } query.Set("tail", options.Tail) resp, err := cli.get(ctx, "/tasks/"+taskID+"/logs", query, nil) if err != nil { return nil, err } return resp.Body, nil } ================================================ FILE: vendor/github.com/docker/docker/client/utils.go ================================================ package client import ( "encoding/json" "fmt" "net/url" "strings" cerrdefs "github.com/containerd/errdefs" "github.com/docker/docker/api/types/filters" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) type emptyIDError string func (e emptyIDError) InvalidParameter() {} func (e emptyIDError) Error() string { return "invalid " + string(e) + " name or ID: value is empty" } // trimID trims the given object-ID / name, returning an error if it's empty. func trimID(objType, id string) (string, error) { id = strings.TrimSpace(id) if id == "" { return "", emptyIDError(objType) } return id, nil } // getFiltersQuery returns a url query with "filters" query term, based on the // filters provided. func getFiltersQuery(f filters.Args) (url.Values, error) { query := url.Values{} if f.Len() > 0 { filterJSON, err := filters.ToJSON(f) if err != nil { return query, err } query.Set("filters", filterJSON) } return query, nil } // encodePlatforms marshals the given platform(s) to JSON format, to // be used for query-parameters for filtering / selecting platforms. func encodePlatforms(platform ...ocispec.Platform) ([]string, error) { if len(platform) == 0 { return []string{}, nil } if len(platform) == 1 { p, err := encodePlatform(&platform[0]) if err != nil { return nil, err } return []string{p}, nil } seen := make(map[string]struct{}, len(platform)) out := make([]string, 0, len(platform)) for i := range platform { p, err := encodePlatform(&platform[i]) if err != nil { return nil, err } if _, ok := seen[p]; !ok { out = append(out, p) seen[p] = struct{}{} } } return out, nil } // encodePlatform marshals the given platform to JSON format, to // be used for query-parameters for filtering / selecting platforms. It // is used as a helper for encodePlatforms, func encodePlatform(platform *ocispec.Platform) (string, error) { p, err := json.Marshal(platform) if err != nil { return "", fmt.Errorf("%w: invalid platform: %v", cerrdefs.ErrInvalidArgument, err) } return string(p), nil } ================================================ FILE: vendor/github.com/docker/docker/client/version.go ================================================ package client import ( "context" "encoding/json" "github.com/docker/docker/api/types" ) // ServerVersion returns information of the docker client and server host. func (cli *Client) ServerVersion(ctx context.Context) (types.Version, error) { resp, err := cli.get(ctx, "/version", nil, nil) defer ensureReaderClosed(resp) if err != nil { return types.Version{}, err } var server types.Version err = json.NewDecoder(resp.Body).Decode(&server) return server, err } ================================================ FILE: vendor/github.com/docker/docker/client/volume_create.go ================================================ package client import ( "context" "encoding/json" "github.com/docker/docker/api/types/volume" ) // VolumeCreate creates a volume in the docker host. func (cli *Client) VolumeCreate(ctx context.Context, options volume.CreateOptions) (volume.Volume, error) { resp, err := cli.post(ctx, "/volumes/create", nil, options, nil) defer ensureReaderClosed(resp) if err != nil { return volume.Volume{}, err } var vol volume.Volume err = json.NewDecoder(resp.Body).Decode(&vol) return vol, err } ================================================ FILE: vendor/github.com/docker/docker/client/volume_inspect.go ================================================ package client import ( "bytes" "context" "encoding/json" "io" "github.com/docker/docker/api/types/volume" ) // VolumeInspect returns the information about a specific volume in the docker host. func (cli *Client) VolumeInspect(ctx context.Context, volumeID string) (volume.Volume, error) { vol, _, err := cli.VolumeInspectWithRaw(ctx, volumeID) return vol, err } // VolumeInspectWithRaw returns the information about a specific volume in the docker host and its raw representation func (cli *Client) VolumeInspectWithRaw(ctx context.Context, volumeID string) (volume.Volume, []byte, error) { volumeID, err := trimID("volume", volumeID) if err != nil { return volume.Volume{}, nil, err } resp, err := cli.get(ctx, "/volumes/"+volumeID, nil, nil) defer ensureReaderClosed(resp) if err != nil { return volume.Volume{}, nil, err } body, err := io.ReadAll(resp.Body) if err != nil { return volume.Volume{}, nil, err } var vol volume.Volume rdr := bytes.NewReader(body) err = json.NewDecoder(rdr).Decode(&vol) return vol, body, err } ================================================ FILE: vendor/github.com/docker/docker/client/volume_list.go ================================================ package client import ( "context" "encoding/json" "net/url" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/volume" ) // VolumeList returns the volumes configured in the docker host. func (cli *Client) VolumeList(ctx context.Context, options volume.ListOptions) (volume.ListResponse, error) { query := url.Values{} if options.Filters.Len() > 0 { //nolint:staticcheck // ignore SA1019 for old code filterJSON, err := filters.ToParamWithVersion(cli.version, options.Filters) if err != nil { return volume.ListResponse{}, err } query.Set("filters", filterJSON) } resp, err := cli.get(ctx, "/volumes", query, nil) defer ensureReaderClosed(resp) if err != nil { return volume.ListResponse{}, err } var volumes volume.ListResponse err = json.NewDecoder(resp.Body).Decode(&volumes) return volumes, err } ================================================ FILE: vendor/github.com/docker/docker/client/volume_prune.go ================================================ package client import ( "context" "encoding/json" "fmt" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/volume" ) // VolumesPrune requests the daemon to delete unused data func (cli *Client) VolumesPrune(ctx context.Context, pruneFilters filters.Args) (volume.PruneReport, error) { if err := cli.NewVersionError(ctx, "1.25", "volume prune"); err != nil { return volume.PruneReport{}, err } query, err := getFiltersQuery(pruneFilters) if err != nil { return volume.PruneReport{}, err } resp, err := cli.post(ctx, "/volumes/prune", query, nil, nil) defer ensureReaderClosed(resp) if err != nil { return volume.PruneReport{}, err } var report volume.PruneReport if err := json.NewDecoder(resp.Body).Decode(&report); err != nil { return volume.PruneReport{}, fmt.Errorf("Error retrieving volume prune report: %v", err) } return report, nil } ================================================ FILE: vendor/github.com/docker/docker/client/volume_remove.go ================================================ package client import ( "context" "net/url" "github.com/docker/docker/api/types/versions" ) // VolumeRemove removes a volume from the docker host. func (cli *Client) VolumeRemove(ctx context.Context, volumeID string, force bool) error { volumeID, err := trimID("volume", volumeID) if err != nil { return err } query := url.Values{} if force { // Make sure we negotiated (if the client is configured to do so), // as code below contains API-version specific handling of options. // // Normally, version-negotiation (if enabled) would not happen until // the API request is made. if err := cli.checkVersion(ctx); err != nil { return err } if versions.GreaterThanOrEqualTo(cli.version, "1.25") { query.Set("force", "1") } } resp, err := cli.delete(ctx, "/volumes/"+volumeID, query, nil) defer ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/client/volume_update.go ================================================ package client import ( "context" "net/url" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/api/types/volume" ) // VolumeUpdate updates a volume. This only works for Cluster Volumes, and // only some fields can be updated. func (cli *Client) VolumeUpdate(ctx context.Context, volumeID string, version swarm.Version, options volume.UpdateOptions) error { volumeID, err := trimID("volume", volumeID) if err != nil { return err } if err := cli.NewVersionError(ctx, "1.42", "volume update"); err != nil { return err } query := url.Values{} query.Set("version", version.String()) resp, err := cli.put(ctx, "/volumes/"+volumeID, query, options, nil) ensureReaderClosed(resp) return err } ================================================ FILE: vendor/github.com/docker/docker/errdefs/defs.go ================================================ package errdefs // ErrNotFound signals that the requested object doesn't exist type ErrNotFound interface { NotFound() } // ErrInvalidParameter signals that the user input is invalid type ErrInvalidParameter interface { InvalidParameter() } // ErrConflict signals that some internal state conflicts with the requested action and can't be performed. // A change in state should be able to clear this error. type ErrConflict interface { Conflict() } // ErrUnauthorized is used to signify that the user is not authorized to perform a specific action type ErrUnauthorized interface { Unauthorized() } // ErrUnavailable signals that the requested action/subsystem is not available. type ErrUnavailable interface { Unavailable() } // ErrForbidden signals that the requested action cannot be performed under any circumstances. // When a ErrForbidden is returned, the caller should never retry the action. type ErrForbidden interface { Forbidden() } // ErrSystem signals that some internal error occurred. // An example of this would be a failed mount request. type ErrSystem interface { System() } // ErrNotModified signals that an action can't be performed because it's already in the desired state type ErrNotModified interface { NotModified() } // ErrNotImplemented signals that the requested action/feature is not implemented on the system as configured. type ErrNotImplemented interface { NotImplemented() } // ErrUnknown signals that the kind of error that occurred is not known. type ErrUnknown interface { Unknown() } // ErrCancelled signals that the action was cancelled. type ErrCancelled interface { Cancelled() } // ErrDeadline signals that the deadline was reached before the action completed. type ErrDeadline interface { DeadlineExceeded() } // ErrDataLoss indicates that data was lost or there is data corruption. type ErrDataLoss interface { DataLoss() } ================================================ FILE: vendor/github.com/docker/docker/errdefs/doc.go ================================================ // Package errdefs defines a set of error interfaces that packages should use for communicating classes of errors. // Errors that cross the package boundary should implement one (and only one) of these interfaces. // // Packages should not reference these interfaces directly, only implement them. // To check if a particular error implements one of these interfaces, there are helper // functions provided (e.g. `Is`) which can be used rather than asserting the interfaces directly. // If you must assert on these interfaces, be sure to check the causal chain (`err.Unwrap()`). package errdefs ================================================ FILE: vendor/github.com/docker/docker/errdefs/helpers.go ================================================ package errdefs import ( "context" cerrdefs "github.com/containerd/errdefs" ) type errNotFound struct{ error } func (errNotFound) NotFound() {} func (e errNotFound) Cause() error { return e.error } func (e errNotFound) Unwrap() error { return e.error } // NotFound creates an [ErrNotFound] error from the given error. // It returns the error as-is if it is either nil (no error) or already implements // [ErrNotFound], func NotFound(err error) error { if err == nil || cerrdefs.IsNotFound(err) { return err } return errNotFound{err} } type errInvalidParameter struct{ error } func (errInvalidParameter) InvalidParameter() {} func (e errInvalidParameter) Cause() error { return e.error } func (e errInvalidParameter) Unwrap() error { return e.error } // InvalidParameter creates an [ErrInvalidParameter] error from the given error. // It returns the error as-is if it is either nil (no error) or already implements // [ErrInvalidParameter], func InvalidParameter(err error) error { if err == nil || cerrdefs.IsInvalidArgument(err) { return err } return errInvalidParameter{err} } type errConflict struct{ error } func (errConflict) Conflict() {} func (e errConflict) Cause() error { return e.error } func (e errConflict) Unwrap() error { return e.error } // Conflict creates an [ErrConflict] error from the given error. // It returns the error as-is if it is either nil (no error) or already implements // [ErrConflict], func Conflict(err error) error { if err == nil || cerrdefs.IsConflict(err) { return err } return errConflict{err} } type errUnauthorized struct{ error } func (errUnauthorized) Unauthorized() {} func (e errUnauthorized) Cause() error { return e.error } func (e errUnauthorized) Unwrap() error { return e.error } // Unauthorized creates an [ErrUnauthorized] error from the given error. // It returns the error as-is if it is either nil (no error) or already implements // [ErrUnauthorized], func Unauthorized(err error) error { if err == nil || cerrdefs.IsUnauthorized(err) { return err } return errUnauthorized{err} } type errUnavailable struct{ error } func (errUnavailable) Unavailable() {} func (e errUnavailable) Cause() error { return e.error } func (e errUnavailable) Unwrap() error { return e.error } // Unavailable creates an [ErrUnavailable] error from the given error. // It returns the error as-is if it is either nil (no error) or already implements // [ErrUnavailable], func Unavailable(err error) error { if err == nil || cerrdefs.IsUnavailable(err) { return err } return errUnavailable{err} } type errForbidden struct{ error } func (errForbidden) Forbidden() {} func (e errForbidden) Cause() error { return e.error } func (e errForbidden) Unwrap() error { return e.error } // Forbidden creates an [ErrForbidden] error from the given error. // It returns the error as-is if it is either nil (no error) or already implements // [ErrForbidden], func Forbidden(err error) error { if err == nil || cerrdefs.IsPermissionDenied(err) { return err } return errForbidden{err} } type errSystem struct{ error } func (errSystem) System() {} func (e errSystem) Cause() error { return e.error } func (e errSystem) Unwrap() error { return e.error } // System creates an [ErrSystem] error from the given error. // It returns the error as-is if it is either nil (no error) or already implements // [ErrSystem], func System(err error) error { if err == nil || cerrdefs.IsInternal(err) { return err } return errSystem{err} } type errNotModified struct{ error } func (errNotModified) NotModified() {} func (e errNotModified) Cause() error { return e.error } func (e errNotModified) Unwrap() error { return e.error } // NotModified creates an [ErrNotModified] error from the given error. // It returns the error as-is if it is either nil (no error) or already implements // [NotModified], func NotModified(err error) error { if err == nil || cerrdefs.IsNotModified(err) { return err } return errNotModified{err} } type errNotImplemented struct{ error } func (errNotImplemented) NotImplemented() {} func (e errNotImplemented) Cause() error { return e.error } func (e errNotImplemented) Unwrap() error { return e.error } // NotImplemented creates an [ErrNotImplemented] error from the given error. // It returns the error as-is if it is either nil (no error) or already implements // [ErrNotImplemented], func NotImplemented(err error) error { if err == nil || cerrdefs.IsNotImplemented(err) { return err } return errNotImplemented{err} } type errUnknown struct{ error } func (errUnknown) Unknown() {} func (e errUnknown) Cause() error { return e.error } func (e errUnknown) Unwrap() error { return e.error } // Unknown creates an [ErrUnknown] error from the given error. // It returns the error as-is if it is either nil (no error) or already implements // [ErrUnknown], func Unknown(err error) error { if err == nil || cerrdefs.IsUnknown(err) { return err } return errUnknown{err} } type errCancelled struct{ error } func (errCancelled) Cancelled() {} func (e errCancelled) Cause() error { return e.error } func (e errCancelled) Unwrap() error { return e.error } // Cancelled creates an [ErrCancelled] error from the given error. // It returns the error as-is if it is either nil (no error) or already implements // [ErrCancelled], func Cancelled(err error) error { if err == nil || cerrdefs.IsCanceled(err) { return err } return errCancelled{err} } type errDeadline struct{ error } func (errDeadline) DeadlineExceeded() {} func (e errDeadline) Cause() error { return e.error } func (e errDeadline) Unwrap() error { return e.error } // Deadline creates an [ErrDeadline] error from the given error. // It returns the error as-is if it is either nil (no error) or already implements // [ErrDeadline], func Deadline(err error) error { if err == nil || cerrdefs.IsDeadlineExceeded(err) { return err } return errDeadline{err} } type errDataLoss struct{ error } func (errDataLoss) DataLoss() {} func (e errDataLoss) Cause() error { return e.error } func (e errDataLoss) Unwrap() error { return e.error } // DataLoss creates an [ErrDataLoss] error from the given error. // It returns the error as-is if it is either nil (no error) or already implements // [ErrDataLoss], func DataLoss(err error) error { if err == nil || cerrdefs.IsDataLoss(err) { return err } return errDataLoss{err} } // FromContext returns the error class from the passed in context func FromContext(ctx context.Context) error { e := ctx.Err() if e == nil { return nil } if e == context.Canceled { return Cancelled(e) } if e == context.DeadlineExceeded { return Deadline(e) } return Unknown(e) } ================================================ FILE: vendor/github.com/docker/docker/errdefs/http_helpers.go ================================================ package errdefs import ( "net/http" ) // FromStatusCode creates an errdef error, based on the provided HTTP status-code // // Deprecated: Use [cerrdefs.ToNative] instead func FromStatusCode(err error, statusCode int) error { if err == nil { return nil } switch statusCode { case http.StatusNotFound: return NotFound(err) case http.StatusBadRequest: return InvalidParameter(err) case http.StatusConflict: return Conflict(err) case http.StatusUnauthorized: return Unauthorized(err) case http.StatusServiceUnavailable: return Unavailable(err) case http.StatusForbidden: return Forbidden(err) case http.StatusNotModified: return NotModified(err) case http.StatusNotImplemented: return NotImplemented(err) case http.StatusInternalServerError: if IsCancelled(err) || IsSystem(err) || IsUnknown(err) || IsDataLoss(err) || IsDeadline(err) { return err } return System(err) default: switch { case statusCode >= http.StatusOK && statusCode < http.StatusBadRequest: // it's a client error return err case statusCode >= http.StatusBadRequest && statusCode < http.StatusInternalServerError: return InvalidParameter(err) case statusCode >= http.StatusInternalServerError && statusCode < 600: return System(err) default: return Unknown(err) } } } ================================================ FILE: vendor/github.com/docker/docker/errdefs/is.go ================================================ package errdefs import ( "context" "errors" cerrdefs "github.com/containerd/errdefs" ) // IsNotFound returns if the passed in error is an [ErrNotFound], // // Deprecated: use containerd [cerrdefs.IsNotFound] var IsNotFound = cerrdefs.IsNotFound // IsInvalidParameter returns if the passed in error is an [ErrInvalidParameter]. // // Deprecated: use containerd [cerrdefs.IsInvalidArgument] var IsInvalidParameter = cerrdefs.IsInvalidArgument // IsConflict returns if the passed in error is an [ErrConflict]. // // Deprecated: use containerd [cerrdefs.IsConflict] var IsConflict = cerrdefs.IsConflict // IsUnauthorized returns if the passed in error is an [ErrUnauthorized]. // // Deprecated: use containerd [cerrdefs.IsUnauthorized] var IsUnauthorized = cerrdefs.IsUnauthorized // IsUnavailable returns if the passed in error is an [ErrUnavailable]. // // Deprecated: use containerd [cerrdefs.IsUnavailable] var IsUnavailable = cerrdefs.IsUnavailable // IsForbidden returns if the passed in error is an [ErrForbidden]. // // Deprecated: use containerd [cerrdefs.IsPermissionDenied] var IsForbidden = cerrdefs.IsPermissionDenied // IsSystem returns if the passed in error is an [ErrSystem]. // // Deprecated: use containerd [cerrdefs.IsInternal] var IsSystem = cerrdefs.IsInternal // IsNotModified returns if the passed in error is an [ErrNotModified]. // // Deprecated: use containerd [cerrdefs.IsNotModified] var IsNotModified = cerrdefs.IsNotModified // IsNotImplemented returns if the passed in error is an [ErrNotImplemented]. // // Deprecated: use containerd [cerrdefs.IsNotImplemented] var IsNotImplemented = cerrdefs.IsNotImplemented // IsUnknown returns if the passed in error is an [ErrUnknown]. // // Deprecated: use containerd [cerrdefs.IsUnknown] var IsUnknown = cerrdefs.IsUnknown // IsCancelled returns if the passed in error is an [ErrCancelled]. // // Deprecated: use containerd [cerrdefs.IsCanceled] var IsCancelled = cerrdefs.IsCanceled // IsDeadline returns if the passed in error is an [ErrDeadline]. // // Deprecated: use containerd [cerrdefs.IsDeadlineExceeded] var IsDeadline = cerrdefs.IsDeadlineExceeded // IsDataLoss returns if the passed in error is an [ErrDataLoss]. // // Deprecated: use containerd [cerrdefs.IsDataLoss] var IsDataLoss = cerrdefs.IsDataLoss // IsContext returns if the passed in error is due to context cancellation or deadline exceeded. func IsContext(err error) bool { return errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) } ================================================ FILE: vendor/github.com/docker/docker/pkg/ioutils/fswriters_deprecated.go ================================================ package ioutils import ( "io" "os" "github.com/moby/sys/atomicwriter" ) // NewAtomicFileWriter returns WriteCloser so that writing to it writes to a // temporary file and closing it atomically changes the temporary file to // destination path. Writing and closing concurrently is not allowed. // NOTE: umask is not considered for the file's permissions. // // Deprecated: use [atomicwriter.New] instead. func NewAtomicFileWriter(filename string, perm os.FileMode) (io.WriteCloser, error) { return atomicwriter.New(filename, perm) } // AtomicWriteFile atomically writes data to a file named by filename and with the specified permission bits. // NOTE: umask is not considered for the file's permissions. // // Deprecated: use [atomicwriter.WriteFile] instead. func AtomicWriteFile(filename string, data []byte, perm os.FileMode) error { return atomicwriter.WriteFile(filename, data, perm) } // AtomicWriteSet is used to atomically write a set // of files and ensure they are visible at the same time. // Must be committed to a new directory. // // Deprecated: use [atomicwriter.WriteSet] instead. type AtomicWriteSet = atomicwriter.WriteSet // NewAtomicWriteSet creates a new atomic write set to // atomically create a set of files. The given directory // is used as the base directory for storing files before // commit. If no temporary directory is given the system // default is used. // // Deprecated: use [atomicwriter.NewWriteSet] instead. func NewAtomicWriteSet(tmpDir string) (*atomicwriter.WriteSet, error) { return atomicwriter.NewWriteSet(tmpDir) } ================================================ FILE: vendor/github.com/docker/docker/pkg/ioutils/readers.go ================================================ package ioutils import ( "context" "io" "runtime/debug" "sync/atomic" "github.com/containerd/log" ) // readCloserWrapper wraps an io.Reader, and implements an io.ReadCloser // It calls the given callback function when closed. It should be constructed // with NewReadCloserWrapper type readCloserWrapper struct { io.Reader closer func() error closed atomic.Bool } // Close calls back the passed closer function func (r *readCloserWrapper) Close() error { if !r.closed.CompareAndSwap(false, true) { subsequentCloseWarn("ReadCloserWrapper") return nil } return r.closer() } // NewReadCloserWrapper wraps an io.Reader, and implements an io.ReadCloser. // It calls the given callback function when closed. func NewReadCloserWrapper(r io.Reader, closer func() error) io.ReadCloser { return &readCloserWrapper{ Reader: r, closer: closer, } } // cancelReadCloser wraps an io.ReadCloser with a context for cancelling read // operations. type cancelReadCloser struct { cancel func() pR *io.PipeReader // Stream to read from pW *io.PipeWriter closed atomic.Bool } // NewCancelReadCloser creates a wrapper that closes the ReadCloser when the // context is cancelled. The returned io.ReadCloser must be closed when it is // no longer needed. func NewCancelReadCloser(ctx context.Context, in io.ReadCloser) io.ReadCloser { pR, pW := io.Pipe() // Create a context used to signal when the pipe is closed doneCtx, cancel := context.WithCancel(context.Background()) p := &cancelReadCloser{ cancel: cancel, pR: pR, pW: pW, } go func() { _, err := io.Copy(pW, in) select { case <-ctx.Done(): // If the context was closed, p.closeWithError // was already called. Calling it again would // change the error that Read returns. default: p.closeWithError(err) } in.Close() }() go func() { for { select { case <-ctx.Done(): p.closeWithError(ctx.Err()) case <-doneCtx.Done(): return } } }() return p } // Read wraps the Read method of the pipe that provides data from the wrapped // ReadCloser. func (p *cancelReadCloser) Read(buf []byte) (int, error) { return p.pR.Read(buf) } // closeWithError closes the wrapper and its underlying reader. It will // cause future calls to Read to return err. func (p *cancelReadCloser) closeWithError(err error) { _ = p.pW.CloseWithError(err) p.cancel() } // Close closes the wrapper its underlying reader. It will cause // future calls to Read to return io.EOF. func (p *cancelReadCloser) Close() error { if !p.closed.CompareAndSwap(false, true) { subsequentCloseWarn("cancelReadCloser") return nil } p.closeWithError(io.EOF) return nil } func subsequentCloseWarn(name string) { log.G(context.TODO()).Error("subsequent attempt to close " + name) if log.GetLevel() >= log.DebugLevel { log.G(context.TODO()).Errorf("stack trace: %s", string(debug.Stack())) } } ================================================ FILE: vendor/github.com/docker/docker/pkg/ioutils/writeflusher.go ================================================ package ioutils import ( "io" "sync" ) // WriteFlusher wraps the Write and Flush operation ensuring that every write // is a flush. In addition, the Close method can be called to intercept // Read/Write calls if the targets lifecycle has already ended. type WriteFlusher struct { w io.Writer flusher flusher flushed chan struct{} flushedOnce sync.Once closed chan struct{} closeLock sync.Mutex } type flusher interface { Flush() } func (wf *WriteFlusher) Write(b []byte) (int, error) { select { case <-wf.closed: return 0, io.EOF default: } n, err := wf.w.Write(b) wf.Flush() // every write is a flush. return n, err } // Flush the stream immediately. func (wf *WriteFlusher) Flush() { select { case <-wf.closed: return default: } wf.flushedOnce.Do(func() { close(wf.flushed) }) wf.flusher.Flush() } // Flushed returns the state of flushed. // If it's flushed, return true, or else it return false. func (wf *WriteFlusher) Flushed() bool { // BUG(stevvooe): Remove this method. Its use is inherently racy. Seems to // be used to detect whether or a response code has been issued or not. // Another hook should be used instead. var flushed bool select { case <-wf.flushed: flushed = true default: } return flushed } // Close closes the write flusher, disallowing any further writes to the // target. After the flusher is closed, all calls to write or flush will // result in an error. func (wf *WriteFlusher) Close() error { wf.closeLock.Lock() defer wf.closeLock.Unlock() select { case <-wf.closed: return io.EOF default: close(wf.closed) } return nil } // nopFlusher represents a type which flush operation is nop. type nopFlusher struct{} // Flush is a nop operation. func (f *nopFlusher) Flush() {} // NewWriteFlusher returns a new WriteFlusher. func NewWriteFlusher(w io.Writer) *WriteFlusher { var fl flusher if f, ok := w.(flusher); ok { fl = f } else { fl = &nopFlusher{} } return &WriteFlusher{w: w, flusher: fl, closed: make(chan struct{}), flushed: make(chan struct{})} } ================================================ FILE: vendor/github.com/docker/docker/pkg/ioutils/writers.go ================================================ package ioutils import ( "io" "sync/atomic" ) type writeCloserWrapper struct { io.Writer closer func() error closed atomic.Bool } func (r *writeCloserWrapper) Close() error { if !r.closed.CompareAndSwap(false, true) { subsequentCloseWarn("WriteCloserWrapper") return nil } return r.closer() } // NewWriteCloserWrapper returns a new io.WriteCloser. func NewWriteCloserWrapper(r io.Writer, closer func() error) io.WriteCloser { return &writeCloserWrapper{ Writer: r, closer: closer, } } ================================================ FILE: vendor/github.com/docker/docker/pkg/stdcopy/stdcopy.go ================================================ package stdcopy import ( "bytes" "encoding/binary" "errors" "fmt" "io" "sync" ) // StdType is the type of standard stream // a writer can multiplex to. type StdType byte const ( // Stdin represents standard input stream type. Stdin StdType = iota // Stdout represents standard output stream type. Stdout // Stderr represents standard error steam type. Stderr // Systemerr represents errors originating from the system that make it // into the multiplexed stream. Systemerr stdWriterPrefixLen = 8 stdWriterFdIndex = 0 stdWriterSizeIndex = 4 startingBufLen = 32*1024 + stdWriterPrefixLen + 1 ) var bufPool = &sync.Pool{New: func() interface{} { return bytes.NewBuffer(nil) }} // stdWriter is wrapper of io.Writer with extra customized info. type stdWriter struct { io.Writer prefix byte } // Write sends the buffer to the underneath writer. // It inserts the prefix header before the buffer, // so stdcopy.StdCopy knows where to multiplex the output. // It makes stdWriter to implement io.Writer. func (w *stdWriter) Write(p []byte) (int, error) { if w == nil || w.Writer == nil { return 0, errors.New("writer not instantiated") } if p == nil { return 0, nil } header := [stdWriterPrefixLen]byte{stdWriterFdIndex: w.prefix} binary.BigEndian.PutUint32(header[stdWriterSizeIndex:], uint32(len(p))) buf := bufPool.Get().(*bytes.Buffer) buf.Write(header[:]) buf.Write(p) n, err := w.Writer.Write(buf.Bytes()) n -= stdWriterPrefixLen if n < 0 { n = 0 } buf.Reset() bufPool.Put(buf) return n, err } // NewStdWriter instantiates a new Writer. // Everything written to it will be encapsulated using a custom format, // and written to the underlying `w` stream. // This allows multiple write streams (e.g. stdout and stderr) to be muxed into a single connection. // `t` indicates the id of the stream to encapsulate. // It can be stdcopy.Stdin, stdcopy.Stdout, stdcopy.Stderr. func NewStdWriter(w io.Writer, t StdType) io.Writer { return &stdWriter{ Writer: w, prefix: byte(t), } } // StdCopy is a modified version of io.Copy. // // StdCopy will demultiplex `src`, assuming that it contains two streams, // previously multiplexed together using a StdWriter instance. // As it reads from `src`, StdCopy will write to `dstout` and `dsterr`. // // StdCopy will read until it hits EOF on `src`. It will then return a nil error. // In other words: if `err` is non nil, it indicates a real underlying error. // // `written` will hold the total number of bytes written to `dstout` and `dsterr`. func StdCopy(dstout, dsterr io.Writer, src io.Reader) (written int64, _ error) { var ( buf = make([]byte, startingBufLen) bufLen = len(buf) nr, nw int err error out io.Writer frameSize int ) for { // Make sure we have at least a full header for nr < stdWriterPrefixLen { var nr2 int nr2, err = src.Read(buf[nr:]) nr += nr2 if errors.Is(err, io.EOF) { if nr < stdWriterPrefixLen { return written, nil } break } if err != nil { return 0, err } } stream := StdType(buf[stdWriterFdIndex]) // Check the first byte to know where to write switch stream { case Stdin: fallthrough case Stdout: // Write on stdout out = dstout case Stderr: // Write on stderr out = dsterr case Systemerr: // If we're on Systemerr, we won't write anywhere. // NB: if this code changes later, make sure you don't try to write // to outstream if Systemerr is the stream out = nil default: return 0, fmt.Errorf("Unrecognized input header: %d", buf[stdWriterFdIndex]) } // Retrieve the size of the frame frameSize = int(binary.BigEndian.Uint32(buf[stdWriterSizeIndex : stdWriterSizeIndex+4])) // Check if the buffer is big enough to read the frame. // Extend it if necessary. if frameSize+stdWriterPrefixLen > bufLen { buf = append(buf, make([]byte, frameSize+stdWriterPrefixLen-bufLen+1)...) bufLen = len(buf) } // While the amount of bytes read is less than the size of the frame + header, we keep reading for nr < frameSize+stdWriterPrefixLen { var nr2 int nr2, err = src.Read(buf[nr:]) nr += nr2 if errors.Is(err, io.EOF) { if nr < frameSize+stdWriterPrefixLen { return written, nil } break } if err != nil { return 0, err } } // we might have an error from the source mixed up in our multiplexed // stream. if we do, return it. if stream == Systemerr { return written, fmt.Errorf("error from daemon in stream: %s", string(buf[stdWriterPrefixLen:frameSize+stdWriterPrefixLen])) } // Write the retrieved frame (without header) nw, err = out.Write(buf[stdWriterPrefixLen : frameSize+stdWriterPrefixLen]) if err != nil { return 0, err } // If the frame has not been fully written: error if nw != frameSize { return 0, io.ErrShortWrite } written += int64(nw) // Move the rest of the buffer to the beginning copy(buf, buf[frameSize+stdWriterPrefixLen:]) // Move the index nr -= frameSize + stdWriterPrefixLen } } ================================================ FILE: vendor/github.com/docker/docker-credential-helpers/LICENSE ================================================ Copyright (c) 2016 David Calavera 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. ================================================ FILE: vendor/github.com/docker/docker-credential-helpers/client/client.go ================================================ package client import ( "bytes" "encoding/json" "fmt" "strings" "github.com/docker/docker-credential-helpers/credentials" ) // isValidCredsMessage checks if 'msg' contains invalid credentials error message. // It returns whether the logs are free of invalid credentials errors and the error if it isn't. // error values can be errCredentialsMissingServerURL or errCredentialsMissingUsername. func isValidCredsMessage(msg string) error { if credentials.IsCredentialsMissingServerURLMessage(msg) { return credentials.NewErrCredentialsMissingServerURL() } if credentials.IsCredentialsMissingUsernameMessage(msg) { return credentials.NewErrCredentialsMissingUsername() } return nil } // Store uses an external program to save credentials. func Store(program ProgramFunc, creds *credentials.Credentials) error { cmd := program(credentials.ActionStore) buffer := new(bytes.Buffer) if err := json.NewEncoder(buffer).Encode(creds); err != nil { return err } cmd.Input(buffer) out, err := cmd.Output() if err != nil { if isValidErr := isValidCredsMessage(string(out)); isValidErr != nil { err = isValidErr } return fmt.Errorf("error storing credentials - err: %v, out: `%s`", err, strings.TrimSpace(string(out))) } return nil } // Get executes an external program to get the credentials from a native store. func Get(program ProgramFunc, serverURL string) (*credentials.Credentials, error) { cmd := program(credentials.ActionGet) cmd.Input(strings.NewReader(serverURL)) out, err := cmd.Output() if err != nil { if credentials.IsErrCredentialsNotFoundMessage(string(out)) { return nil, credentials.NewErrCredentialsNotFound() } if isValidErr := isValidCredsMessage(string(out)); isValidErr != nil { err = isValidErr } return nil, fmt.Errorf("error getting credentials - err: %v, out: `%s`", err, strings.TrimSpace(string(out))) } resp := &credentials.Credentials{ ServerURL: serverURL, } if err := json.NewDecoder(bytes.NewReader(out)).Decode(resp); err != nil { return nil, err } return resp, nil } // Erase executes a program to remove the server credentials from the native store. func Erase(program ProgramFunc, serverURL string) error { cmd := program(credentials.ActionErase) cmd.Input(strings.NewReader(serverURL)) out, err := cmd.Output() if err != nil { t := strings.TrimSpace(string(out)) if isValidErr := isValidCredsMessage(t); isValidErr != nil { err = isValidErr } return fmt.Errorf("error erasing credentials - err: %v, out: `%s`", err, t) } return nil } // List executes a program to list server credentials in the native store. func List(program ProgramFunc) (map[string]string, error) { cmd := program(credentials.ActionList) cmd.Input(strings.NewReader("unused")) out, err := cmd.Output() if err != nil { t := strings.TrimSpace(string(out)) if isValidErr := isValidCredsMessage(t); isValidErr != nil { err = isValidErr } return nil, fmt.Errorf("error listing credentials - err: %v, out: `%s`", err, t) } var resp map[string]string if err = json.NewDecoder(bytes.NewReader(out)).Decode(&resp); err != nil { return nil, err } return resp, nil } ================================================ FILE: vendor/github.com/docker/docker-credential-helpers/client/command.go ================================================ package client import ( "io" "os" "os/exec" ) // Program is an interface to execute external programs. type Program interface { Output() ([]byte, error) Input(in io.Reader) } // ProgramFunc is a type of function that initializes programs based on arguments. type ProgramFunc func(args ...string) Program // NewShellProgramFunc creates programs that are executed in a Shell. func NewShellProgramFunc(name string) ProgramFunc { return NewShellProgramFuncWithEnv(name, nil) } // NewShellProgramFuncWithEnv creates programs that are executed in a Shell with environment variables func NewShellProgramFuncWithEnv(name string, env *map[string]string) ProgramFunc { return func(args ...string) Program { return &Shell{cmd: createProgramCmdRedirectErr(name, args, env)} } } func createProgramCmdRedirectErr(commandName string, args []string, env *map[string]string) *exec.Cmd { programCmd := exec.Command(commandName, args...) if env != nil { for k, v := range *env { programCmd.Env = append(programCmd.Environ(), k+"="+v) } } programCmd.Stderr = os.Stderr return programCmd } // Shell invokes shell commands to talk with a remote credentials-helper. type Shell struct { cmd *exec.Cmd } // Output returns responses from the remote credentials-helper. func (s *Shell) Output() ([]byte, error) { return s.cmd.Output() } // Input sets the input to send to a remote credentials-helper. func (s *Shell) Input(in io.Reader) { s.cmd.Stdin = in } ================================================ FILE: vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go ================================================ package credentials import ( "bufio" "bytes" "encoding/json" "fmt" "io" "os" "strings" ) // Action defines the name of an action (sub-command) supported by a // credential-helper binary. It is an alias for "string", and mostly // for convenience. type Action = string // List of actions (sub-commands) supported by credential-helper binaries. const ( ActionStore Action = "store" ActionGet Action = "get" ActionErase Action = "erase" ActionList Action = "list" ActionVersion Action = "version" ) // Credentials holds the information shared between docker and the credentials store. type Credentials struct { ServerURL string Username string Secret string } // isValid checks the integrity of Credentials object such that no credentials lack // a server URL or a username. // It returns whether the credentials are valid and the error if it isn't. // error values can be errCredentialsMissingServerURL or errCredentialsMissingUsername func (c *Credentials) isValid() (bool, error) { if len(c.ServerURL) == 0 { return false, NewErrCredentialsMissingServerURL() } if len(c.Username) == 0 { return false, NewErrCredentialsMissingUsername() } return true, nil } // CredsLabel holds the way Docker credentials should be labeled as such in credentials stores that allow labelling. // That label allows to filter out non-Docker credentials too at lookup/search in macOS keychain, // Windows credentials manager and Linux libsecret. Default value is "Docker Credentials" var CredsLabel = "Docker Credentials" // SetCredsLabel is a simple setter for CredsLabel func SetCredsLabel(label string) { CredsLabel = label } // Serve initializes the credentials-helper and parses the action argument. // This function is designed to be called from a command line interface. // It uses os.Args[1] as the key for the action. // It uses os.Stdin as input and os.Stdout as output. // This function terminates the program with os.Exit(1) if there is an error. func Serve(helper Helper) { if len(os.Args) != 2 { _, _ = fmt.Fprintln(os.Stdout, usage()) os.Exit(1) } switch os.Args[1] { case "--version", "-v": _ = PrintVersion(os.Stdout) os.Exit(0) case "--help", "-h": _, _ = fmt.Fprintln(os.Stdout, usage()) os.Exit(0) } if err := HandleCommand(helper, os.Args[1], os.Stdin, os.Stdout); err != nil { _, _ = fmt.Fprintln(os.Stdout, err) os.Exit(1) } } func usage() string { return fmt.Sprintf("Usage: %s ", Name) } // HandleCommand runs a helper to execute a credential action. func HandleCommand(helper Helper, action Action, in io.Reader, out io.Writer) error { switch action { case ActionStore: return Store(helper, in) case ActionGet: return Get(helper, in, out) case ActionErase: return Erase(helper, in) case ActionList: return List(helper, out) case ActionVersion: return PrintVersion(out) default: return fmt.Errorf("%s: unknown action: %s", Name, action) } } // Store uses a helper and an input reader to save credentials. // The reader must contain the JSON serialization of a Credentials struct. func Store(helper Helper, reader io.Reader) error { scanner := bufio.NewScanner(reader) buffer := new(bytes.Buffer) for scanner.Scan() { buffer.Write(scanner.Bytes()) } if err := scanner.Err(); err != nil && err != io.EOF { return err } var creds Credentials if err := json.NewDecoder(buffer).Decode(&creds); err != nil { return err } if ok, err := creds.isValid(); !ok { return err } return helper.Add(&creds) } // Get retrieves the credentials for a given server url. // The reader must contain the server URL to search. // The writer is used to write the JSON serialization of the credentials. func Get(helper Helper, reader io.Reader, writer io.Writer) error { scanner := bufio.NewScanner(reader) buffer := new(bytes.Buffer) for scanner.Scan() { buffer.Write(scanner.Bytes()) } if err := scanner.Err(); err != nil && err != io.EOF { return err } serverURL := strings.TrimSpace(buffer.String()) if len(serverURL) == 0 { return NewErrCredentialsMissingServerURL() } username, secret, err := helper.Get(serverURL) if err != nil { return err } buffer.Reset() err = json.NewEncoder(buffer).Encode(Credentials{ ServerURL: serverURL, Username: username, Secret: secret, }) if err != nil { return err } _, _ = fmt.Fprint(writer, buffer.String()) return nil } // Erase removes credentials from the store. // The reader must contain the server URL to remove. func Erase(helper Helper, reader io.Reader) error { scanner := bufio.NewScanner(reader) buffer := new(bytes.Buffer) for scanner.Scan() { buffer.Write(scanner.Bytes()) } if err := scanner.Err(); err != nil && err != io.EOF { return err } serverURL := strings.TrimSpace(buffer.String()) if len(serverURL) == 0 { return NewErrCredentialsMissingServerURL() } return helper.Delete(serverURL) } // List returns all the serverURLs of keys in // the OS store as a list of strings func List(helper Helper, writer io.Writer) error { accts, err := helper.List() if err != nil { return err } return json.NewEncoder(writer).Encode(accts) } // PrintVersion outputs the current version. func PrintVersion(writer io.Writer) error { _, _ = fmt.Fprintf(writer, "%s (%s) %s\n", Name, Package, Version) return nil } ================================================ FILE: vendor/github.com/docker/docker-credential-helpers/credentials/error.go ================================================ package credentials import ( "errors" "strings" ) const ( // ErrCredentialsNotFound standardizes the not found error, so every helper returns // the same message and docker can handle it properly. errCredentialsNotFoundMessage = "credentials not found in native keychain" // ErrCredentialsMissingServerURL and ErrCredentialsMissingUsername standardize // invalid credentials or credentials management operations errCredentialsMissingServerURLMessage = "no credentials server URL" errCredentialsMissingUsernameMessage = "no credentials username" ) // errCredentialsNotFound represents an error // raised when credentials are not in the store. type errCredentialsNotFound struct{} // Error returns the standard error message // for when the credentials are not in the store. func (errCredentialsNotFound) Error() string { return errCredentialsNotFoundMessage } // NotFound implements the [ErrNotFound][errdefs.ErrNotFound] interface. // // [errdefs.ErrNotFound]: https://pkg.go.dev/github.com/docker/docker@v24.0.1+incompatible/errdefs#ErrNotFound func (errCredentialsNotFound) NotFound() {} // NewErrCredentialsNotFound creates a new error // for when the credentials are not in the store. func NewErrCredentialsNotFound() error { return errCredentialsNotFound{} } // IsErrCredentialsNotFound returns true if the error // was caused by not having a set of credentials in a store. func IsErrCredentialsNotFound(err error) bool { var target errCredentialsNotFound return errors.As(err, &target) } // IsErrCredentialsNotFoundMessage returns true if the error // was caused by not having a set of credentials in a store. // // This function helps to check messages returned by an // external program via its standard output. func IsErrCredentialsNotFoundMessage(err string) bool { return strings.TrimSpace(err) == errCredentialsNotFoundMessage } // errCredentialsMissingServerURL represents an error raised // when the credentials object has no server URL or when no // server URL is provided to a credentials operation requiring // one. type errCredentialsMissingServerURL struct{} func (errCredentialsMissingServerURL) Error() string { return errCredentialsMissingServerURLMessage } // InvalidParameter implements the [ErrInvalidParameter][errdefs.ErrInvalidParameter] // interface. // // [errdefs.ErrInvalidParameter]: https://pkg.go.dev/github.com/docker/docker@v24.0.1+incompatible/errdefs#ErrInvalidParameter func (errCredentialsMissingServerURL) InvalidParameter() {} // errCredentialsMissingUsername represents an error raised // when the credentials object has no username or when no // username is provided to a credentials operation requiring // one. type errCredentialsMissingUsername struct{} func (errCredentialsMissingUsername) Error() string { return errCredentialsMissingUsernameMessage } // InvalidParameter implements the [ErrInvalidParameter][errdefs.ErrInvalidParameter] // interface. // // [errdefs.ErrInvalidParameter]: https://pkg.go.dev/github.com/docker/docker@v24.0.1+incompatible/errdefs#ErrInvalidParameter func (errCredentialsMissingUsername) InvalidParameter() {} // NewErrCredentialsMissingServerURL creates a new error for // errCredentialsMissingServerURL. func NewErrCredentialsMissingServerURL() error { return errCredentialsMissingServerURL{} } // NewErrCredentialsMissingUsername creates a new error for // errCredentialsMissingUsername. func NewErrCredentialsMissingUsername() error { return errCredentialsMissingUsername{} } // IsCredentialsMissingServerURL returns true if the error // was an errCredentialsMissingServerURL. func IsCredentialsMissingServerURL(err error) bool { var target errCredentialsMissingServerURL return errors.As(err, &target) } // IsCredentialsMissingServerURLMessage checks for an // errCredentialsMissingServerURL in the error message. func IsCredentialsMissingServerURLMessage(err string) bool { return strings.TrimSpace(err) == errCredentialsMissingServerURLMessage } // IsCredentialsMissingUsername returns true if the error // was an errCredentialsMissingUsername. func IsCredentialsMissingUsername(err error) bool { var target errCredentialsMissingUsername return errors.As(err, &target) } // IsCredentialsMissingUsernameMessage checks for an // errCredentialsMissingUsername in the error message. func IsCredentialsMissingUsernameMessage(err string) bool { return strings.TrimSpace(err) == errCredentialsMissingUsernameMessage } ================================================ FILE: vendor/github.com/docker/docker-credential-helpers/credentials/helper.go ================================================ package credentials // Helper is the interface a credentials store helper must implement. type Helper interface { // Add appends credentials to the store. Add(*Credentials) error // Delete removes credentials from the store. Delete(serverURL string) error // Get retrieves credentials from the store. // It returns username and secret as strings. Get(serverURL string) (string, string, error) // List returns the stored serverURLs and their associated usernames. List() (map[string]string, error) } ================================================ FILE: vendor/github.com/docker/docker-credential-helpers/credentials/version.go ================================================ package credentials var ( // Name is filled at linking time Name = "" // Package is filled at linking time Package = "github.com/docker/docker-credential-helpers" // Version holds the complete version number. Filled in at linking time. Version = "v0.0.0+unknown" // Revision is filled with the VCS (e.g. git) revision being used to build // the program at linking time. Revision = "" ) ================================================ FILE: vendor/github.com/docker/go-connections/LICENSE ================================================ Apache License Version 2.0, January 2004 https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor 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, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS Copyright 2015 Docker, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/github.com/docker/go-connections/nat/nat.go ================================================ // Package nat is a convenience package for manipulation of strings describing network ports. package nat import ( "fmt" "net" "strconv" "strings" ) // PortBinding represents a binding between a Host IP address and a Host Port type PortBinding struct { // HostIP is the host IP Address HostIP string `json:"HostIp"` // HostPort is the host port number HostPort string } // PortMap is a collection of PortBinding indexed by Port type PortMap map[Port][]PortBinding // PortSet is a collection of structs indexed by Port type PortSet map[Port]struct{} // Port is a string containing port number and protocol in the format "80/tcp" type Port string // NewPort creates a new instance of a Port given a protocol and port number or port range func NewPort(proto, port string) (Port, error) { // Check for parsing issues on "port" now so we can avoid having // to check it later on. portStartInt, portEndInt, err := ParsePortRangeToInt(port) if err != nil { return "", err } if portStartInt == portEndInt { return Port(fmt.Sprintf("%d/%s", portStartInt, proto)), nil } return Port(fmt.Sprintf("%d-%d/%s", portStartInt, portEndInt, proto)), nil } // ParsePort parses the port number string and returns an int func ParsePort(rawPort string) (int, error) { if len(rawPort) == 0 { return 0, nil } port, err := strconv.ParseUint(rawPort, 10, 16) if err != nil { return 0, err } return int(port), nil } // ParsePortRangeToInt parses the port range string and returns start/end ints func ParsePortRangeToInt(rawPort string) (int, int, error) { if len(rawPort) == 0 { return 0, 0, nil } start, end, err := ParsePortRange(rawPort) if err != nil { return 0, 0, err } return int(start), int(end), nil } // Proto returns the protocol of a Port func (p Port) Proto() string { proto, _ := SplitProtoPort(string(p)) return proto } // Port returns the port number of a Port func (p Port) Port() string { _, port := SplitProtoPort(string(p)) return port } // Int returns the port number of a Port as an int func (p Port) Int() int { portStr := p.Port() // We don't need to check for an error because we're going to // assume that any error would have been found, and reported, in NewPort() port, _ := ParsePort(portStr) return port } // Range returns the start/end port numbers of a Port range as ints func (p Port) Range() (int, int, error) { return ParsePortRangeToInt(p.Port()) } // SplitProtoPort splits a port in the format of proto/port func SplitProtoPort(rawPort string) (string, string) { parts := strings.Split(rawPort, "/") l := len(parts) if len(rawPort) == 0 || l == 0 || len(parts[0]) == 0 { return "", "" } if l == 1 { return "tcp", rawPort } if len(parts[1]) == 0 { return "tcp", parts[0] } return parts[1], parts[0] } func validateProto(proto string) bool { for _, availableProto := range []string{"tcp", "udp", "sctp"} { if availableProto == proto { return true } } return false } // ParsePortSpecs receives port specs in the format of ip:public:private/proto and parses // these in to the internal types func ParsePortSpecs(ports []string) (map[Port]struct{}, map[Port][]PortBinding, error) { var ( exposedPorts = make(map[Port]struct{}, len(ports)) bindings = make(map[Port][]PortBinding) ) for _, rawPort := range ports { portMappings, err := ParsePortSpec(rawPort) if err != nil { return nil, nil, err } for _, portMapping := range portMappings { port := portMapping.Port if _, exists := exposedPorts[port]; !exists { exposedPorts[port] = struct{}{} } bslice, exists := bindings[port] if !exists { bslice = []PortBinding{} } bindings[port] = append(bslice, portMapping.Binding) } } return exposedPorts, bindings, nil } // PortMapping is a data object mapping a Port to a PortBinding type PortMapping struct { Port Port Binding PortBinding } func splitParts(rawport string) (string, string, string) { parts := strings.Split(rawport, ":") n := len(parts) containerPort := parts[n-1] switch n { case 1: return "", "", containerPort case 2: return "", parts[0], containerPort case 3: return parts[0], parts[1], containerPort default: return strings.Join(parts[:n-2], ":"), parts[n-2], containerPort } } // ParsePortSpec parses a port specification string into a slice of PortMappings func ParsePortSpec(rawPort string) ([]PortMapping, error) { var proto string ip, hostPort, containerPort := splitParts(rawPort) proto, containerPort = SplitProtoPort(containerPort) if ip != "" && ip[0] == '[' { // Strip [] from IPV6 addresses rawIP, _, err := net.SplitHostPort(ip + ":") if err != nil { return nil, fmt.Errorf("invalid IP address %v: %w", ip, err) } ip = rawIP } if ip != "" && net.ParseIP(ip) == nil { return nil, fmt.Errorf("invalid IP address: %s", ip) } if containerPort == "" { return nil, fmt.Errorf("no port specified: %s", rawPort) } startPort, endPort, err := ParsePortRange(containerPort) if err != nil { return nil, fmt.Errorf("invalid containerPort: %s", containerPort) } var startHostPort, endHostPort uint64 = 0, 0 if len(hostPort) > 0 { startHostPort, endHostPort, err = ParsePortRange(hostPort) if err != nil { return nil, fmt.Errorf("invalid hostPort: %s", hostPort) } } if hostPort != "" && (endPort-startPort) != (endHostPort-startHostPort) { // Allow host port range iff containerPort is not a range. // In this case, use the host port range as the dynamic // host port range to allocate into. if endPort != startPort { return nil, fmt.Errorf("invalid ranges specified for container and host Ports: %s and %s", containerPort, hostPort) } } if !validateProto(strings.ToLower(proto)) { return nil, fmt.Errorf("invalid proto: %s", proto) } ports := []PortMapping{} for i := uint64(0); i <= (endPort - startPort); i++ { containerPort = strconv.FormatUint(startPort+i, 10) if len(hostPort) > 0 { hostPort = strconv.FormatUint(startHostPort+i, 10) } // Set hostPort to a range only if there is a single container port // and a dynamic host port. if startPort == endPort && startHostPort != endHostPort { hostPort = fmt.Sprintf("%s-%s", hostPort, strconv.FormatUint(endHostPort, 10)) } port, err := NewPort(strings.ToLower(proto), containerPort) if err != nil { return nil, err } binding := PortBinding{ HostIP: ip, HostPort: hostPort, } ports = append(ports, PortMapping{Port: port, Binding: binding}) } return ports, nil } ================================================ FILE: vendor/github.com/docker/go-connections/nat/parse.go ================================================ package nat import ( "fmt" "strconv" "strings" ) // ParsePortRange parses and validates the specified string as a port-range (8000-9000) func ParsePortRange(ports string) (uint64, uint64, error) { if ports == "" { return 0, 0, fmt.Errorf("empty string specified for ports") } if !strings.Contains(ports, "-") { start, err := strconv.ParseUint(ports, 10, 16) end := start return start, end, err } parts := strings.Split(ports, "-") start, err := strconv.ParseUint(parts[0], 10, 16) if err != nil { return 0, 0, err } end, err := strconv.ParseUint(parts[1], 10, 16) if err != nil { return 0, 0, err } if end < start { return 0, 0, fmt.Errorf("invalid range specified for port: %s", ports) } return start, end, nil } ================================================ FILE: vendor/github.com/docker/go-connections/nat/sort.go ================================================ package nat import ( "sort" "strings" ) type portSorter struct { ports []Port by func(i, j Port) bool } func (s *portSorter) Len() int { return len(s.ports) } func (s *portSorter) Swap(i, j int) { s.ports[i], s.ports[j] = s.ports[j], s.ports[i] } func (s *portSorter) Less(i, j int) bool { ip := s.ports[i] jp := s.ports[j] return s.by(ip, jp) } // Sort sorts a list of ports using the provided predicate // This function should compare `i` and `j`, returning true if `i` is // considered to be less than `j` func Sort(ports []Port, predicate func(i, j Port) bool) { s := &portSorter{ports, predicate} sort.Sort(s) } type portMapEntry struct { port Port binding PortBinding } type portMapSorter []portMapEntry func (s portMapSorter) Len() int { return len(s) } func (s portMapSorter) Swap(i, j int) { s[i], s[j] = s[j], s[i] } // Less sorts the port so that the order is: // 1. port with larger specified bindings // 2. larger port // 3. port with tcp protocol func (s portMapSorter) Less(i, j int) bool { pi, pj := s[i].port, s[j].port hpi, hpj := toInt(s[i].binding.HostPort), toInt(s[j].binding.HostPort) return hpi > hpj || pi.Int() > pj.Int() || (pi.Int() == pj.Int() && strings.ToLower(pi.Proto()) == "tcp") } // SortPortMap sorts the list of ports and their respected mapping. The ports // will explicit HostPort will be placed first. func SortPortMap(ports []Port, bindings PortMap) { s := portMapSorter{} for _, p := range ports { if binding, ok := bindings[p]; ok && len(binding) > 0 { for _, b := range binding { s = append(s, portMapEntry{port: p, binding: b}) } bindings[p] = []PortBinding{} } else { s = append(s, portMapEntry{port: p}) } } sort.Sort(s) var ( i int pm = make(map[Port]struct{}) ) // reorder ports for _, entry := range s { if _, ok := pm[entry.port]; !ok { ports[i] = entry.port pm[entry.port] = struct{}{} i++ } // reorder bindings for this port if _, ok := bindings[entry.port]; ok { bindings[entry.port] = append(bindings[entry.port], entry.binding) } } } func toInt(s string) uint64 { i, _, err := ParsePortRange(s) if err != nil { i = 0 } return i } ================================================ FILE: vendor/github.com/docker/go-connections/sockets/README.md ================================================ ================================================ FILE: vendor/github.com/docker/go-connections/sockets/inmem_socket.go ================================================ package sockets import ( "errors" "net" "sync" ) var errClosed = errors.New("use of closed network connection") // InmemSocket implements net.Listener using in-memory only connections. type InmemSocket struct { chConn chan net.Conn chClose chan struct{} addr string mu sync.Mutex } // dummyAddr is used to satisfy net.Addr for the in-mem socket // it is just stored as a string and returns the string for all calls type dummyAddr string // NewInmemSocket creates an in-memory only net.Listener // The addr argument can be any string, but is used to satisfy the `Addr()` part // of the net.Listener interface func NewInmemSocket(addr string, bufSize int) *InmemSocket { return &InmemSocket{ chConn: make(chan net.Conn, bufSize), chClose: make(chan struct{}), addr: addr, } } // Addr returns the socket's addr string to satisfy net.Listener func (s *InmemSocket) Addr() net.Addr { return dummyAddr(s.addr) } // Accept implements the Accept method in the Listener interface; it waits for the next call and returns a generic Conn. func (s *InmemSocket) Accept() (net.Conn, error) { select { case conn := <-s.chConn: return conn, nil case <-s.chClose: return nil, errClosed } } // Close closes the listener. It will be unavailable for use once closed. func (s *InmemSocket) Close() error { s.mu.Lock() defer s.mu.Unlock() select { case <-s.chClose: default: close(s.chClose) } return nil } // Dial is used to establish a connection with the in-mem server func (s *InmemSocket) Dial(network, addr string) (net.Conn, error) { srvConn, clientConn := net.Pipe() select { case s.chConn <- srvConn: case <-s.chClose: return nil, errClosed } return clientConn, nil } // Network returns the addr string, satisfies net.Addr func (a dummyAddr) Network() string { return string(a) } // String returns the string form func (a dummyAddr) String() string { return string(a) } ================================================ FILE: vendor/github.com/docker/go-connections/sockets/proxy.go ================================================ package sockets import ( "net" "os" "strings" ) // GetProxyEnv allows access to the uppercase and the lowercase forms of // proxy-related variables. See the Go specification for details on these // variables. https://golang.org/pkg/net/http/ func GetProxyEnv(key string) string { proxyValue := os.Getenv(strings.ToUpper(key)) if proxyValue == "" { return os.Getenv(strings.ToLower(key)) } return proxyValue } // DialerFromEnvironment was previously used to configure a net.Dialer to route // connections through a SOCKS proxy. // DEPRECATED: SOCKS proxies are now supported by configuring only // http.Transport.Proxy, and no longer require changing http.Transport.Dial. // Therefore, only sockets.ConfigureTransport() needs to be called, and any // sockets.DialerFromEnvironment() calls can be dropped. func DialerFromEnvironment(direct *net.Dialer) (*net.Dialer, error) { return direct, nil } ================================================ FILE: vendor/github.com/docker/go-connections/sockets/sockets.go ================================================ // Package sockets provides helper functions to create and configure Unix or TCP sockets. package sockets import ( "errors" "net" "net/http" "time" ) const defaultTimeout = 10 * time.Second // ErrProtocolNotAvailable is returned when a given transport protocol is not provided by the operating system. var ErrProtocolNotAvailable = errors.New("protocol not available") // ConfigureTransport configures the specified [http.Transport] according to the specified proto // and addr. // // If the proto is unix (using a unix socket to communicate) or npipe the compression is disabled. // For other protos, compression is enabled. If you want to manually enable/disable compression, // make sure you do it _after_ any subsequent calls to ConfigureTransport is made against the same // [http.Transport]. func ConfigureTransport(tr *http.Transport, proto, addr string) error { switch proto { case "unix": return configureUnixTransport(tr, proto, addr) case "npipe": return configureNpipeTransport(tr, proto, addr) default: tr.Proxy = http.ProxyFromEnvironment tr.DisableCompression = false tr.DialContext = (&net.Dialer{ Timeout: defaultTimeout, }).DialContext } return nil } ================================================ FILE: vendor/github.com/docker/go-connections/sockets/sockets_unix.go ================================================ //go:build !windows package sockets import ( "context" "fmt" "net" "net/http" "syscall" "time" ) const maxUnixSocketPathSize = len(syscall.RawSockaddrUnix{}.Path) func configureUnixTransport(tr *http.Transport, proto, addr string) error { if len(addr) > maxUnixSocketPathSize { return fmt.Errorf("unix socket path %q is too long", addr) } // No need for compression in local communications. tr.DisableCompression = true dialer := &net.Dialer{ Timeout: defaultTimeout, } tr.DialContext = func(ctx context.Context, _, _ string) (net.Conn, error) { return dialer.DialContext(ctx, proto, addr) } return nil } func configureNpipeTransport(tr *http.Transport, proto, addr string) error { return ErrProtocolNotAvailable } // DialPipe connects to a Windows named pipe. // This is not supported on other OSes. func DialPipe(_ string, _ time.Duration) (net.Conn, error) { return nil, syscall.EAFNOSUPPORT } ================================================ FILE: vendor/github.com/docker/go-connections/sockets/sockets_windows.go ================================================ package sockets import ( "context" "net" "net/http" "time" "github.com/Microsoft/go-winio" ) func configureUnixTransport(tr *http.Transport, proto, addr string) error { return ErrProtocolNotAvailable } func configureNpipeTransport(tr *http.Transport, proto, addr string) error { // No need for compression in local communications. tr.DisableCompression = true tr.DialContext = func(ctx context.Context, _, _ string) (net.Conn, error) { return winio.DialPipeContext(ctx, addr) } return nil } // DialPipe connects to a Windows named pipe. func DialPipe(addr string, timeout time.Duration) (net.Conn, error) { return winio.DialPipe(addr, &timeout) } ================================================ FILE: vendor/github.com/docker/go-connections/sockets/tcp_socket.go ================================================ // Package sockets provides helper functions to create and configure Unix or TCP sockets. package sockets import ( "crypto/tls" "net" ) // NewTCPSocket creates a TCP socket listener with the specified address and // the specified tls configuration. If TLSConfig is set, will encapsulate the // TCP listener inside a TLS one. func NewTCPSocket(addr string, tlsConfig *tls.Config) (net.Listener, error) { l, err := net.Listen("tcp", addr) if err != nil { return nil, err } if tlsConfig != nil { tlsConfig.NextProtos = []string{"http/1.1"} l = tls.NewListener(l, tlsConfig) } return l, nil } ================================================ FILE: vendor/github.com/docker/go-connections/sockets/unix_socket.go ================================================ //go:build !windows /* Package sockets is a simple unix domain socket wrapper. # Usage For example: import( "fmt" "net" "os" "github.com/docker/go-connections/sockets" ) func main() { l, err := sockets.NewUnixSocketWithOpts("/path/to/sockets", sockets.WithChown(0,0),sockets.WithChmod(0660)) if err != nil { panic(err) } echoStr := "hello" go func() { for { conn, err := l.Accept() if err != nil { return } conn.Write([]byte(echoStr)) conn.Close() } }() conn, err := net.Dial("unix", path) if err != nil { t.Fatal(err) } buf := make([]byte, 5) if _, err := conn.Read(buf); err != nil { panic(err) } else if string(buf) != echoStr { panic(fmt.Errorf("msg may lost")) } } */ package sockets import ( "net" "os" "syscall" ) // SockOption sets up socket file's creating option type SockOption func(string) error // WithChown modifies the socket file's uid and gid func WithChown(uid, gid int) SockOption { return func(path string) error { if err := os.Chown(path, uid, gid); err != nil { return err } return nil } } // WithChmod modifies socket file's access mode. func WithChmod(mask os.FileMode) SockOption { return func(path string) error { if err := os.Chmod(path, mask); err != nil { return err } return nil } } // NewUnixSocketWithOpts creates a unix socket with the specified options. // By default, socket permissions are 0000 (i.e.: no access for anyone); pass // WithChmod() and WithChown() to set the desired ownership and permissions. // // This function temporarily changes the system's "umask" to 0777 to work around // a race condition between creating the socket and setting its permissions. While // this should only be for a short duration, it may affect other processes that // create files/directories during that period. func NewUnixSocketWithOpts(path string, opts ...SockOption) (net.Listener, error) { if err := syscall.Unlink(path); err != nil && !os.IsNotExist(err) { return nil, err } // net.Listen does not allow for permissions to be set. As a result, when // specifying custom permissions ("WithChmod()"), there is a short time // between creating the socket and applying the permissions, during which // the socket permissions are Less restrictive than desired. // // To work around this limitation of net.Listen(), we temporarily set the // umask to 0777, which forces the socket to be created with 000 permissions // (i.e.: no access for anyone). After that, WithChmod() must be used to set // the desired permissions. // // We don't use "defer" here, to reset the umask to its original value as soon // as possible. Ideally we'd be able to detect if WithChmod() was passed as // an option, and skip changing umask if default permissions are used. origUmask := syscall.Umask(0o777) l, err := net.Listen("unix", path) syscall.Umask(origUmask) if err != nil { return nil, err } for _, op := range opts { if err := op(path); err != nil { _ = l.Close() return nil, err } } return l, nil } // NewUnixSocket creates a unix socket with the specified path and group. func NewUnixSocket(path string, gid int) (net.Listener, error) { return NewUnixSocketWithOpts(path, WithChown(0, gid), WithChmod(0o660)) } ================================================ FILE: vendor/github.com/docker/go-connections/tlsconfig/certpool.go ================================================ package tlsconfig import ( "crypto/x509" "runtime" ) // SystemCertPool returns a copy of the system cert pool, // returns an error if failed to load or empty pool on windows. func SystemCertPool() (*x509.CertPool, error) { certpool, err := x509.SystemCertPool() if err != nil && runtime.GOOS == "windows" { return x509.NewCertPool(), nil } return certpool, err } ================================================ FILE: vendor/github.com/docker/go-connections/tlsconfig/config.go ================================================ // Package tlsconfig provides primitives to retrieve secure-enough TLS configurations for both clients and servers. // // As a reminder from https://golang.org/pkg/crypto/tls/#Config: // // A Config structure is used to configure a TLS client or server. After one has been passed to a TLS function it must not be modified. // A Config may be reused; the tls package will also not modify it. package tlsconfig import ( "crypto/tls" "crypto/x509" "encoding/pem" "errors" "fmt" "os" ) // Options represents the information needed to create client and server TLS configurations. type Options struct { CAFile string // If either CertFile or KeyFile is empty, Client() will not load them // preventing the client from authenticating to the server. // However, Server() requires them and will error out if they are empty. CertFile string KeyFile string // client-only option InsecureSkipVerify bool // server-only option ClientAuth tls.ClientAuthType // If ExclusiveRootPools is set, then if a CA file is provided, the root pool used for TLS // creds will include exclusively the roots in that CA file. If no CA file is provided, // the system pool will be used. ExclusiveRootPools bool MinVersion uint16 // If Passphrase is set, it will be used to decrypt a TLS private key // if the key is encrypted. // // Deprecated: Use of encrypted TLS private keys has been deprecated, and // will be removed in a future release. Golang has deprecated support for // legacy PEM encryption (as specified in RFC 1423), as it is insecure by // design (see https://go-review.googlesource.com/c/go/+/264159). Passphrase string } // Extra (server-side) accepted CBC cipher suites - will phase out in the future var acceptedCBCCiphers = []uint16{ tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, } // DefaultServerAcceptedCiphers should be uses by code which already has a crypto/tls // options struct but wants to use a commonly accepted set of TLS cipher suites, with // known weak algorithms removed. var DefaultServerAcceptedCiphers = append(clientCipherSuites, acceptedCBCCiphers...) // ServerDefault returns a secure-enough TLS configuration for the server TLS configuration. func ServerDefault(ops ...func(*tls.Config)) *tls.Config { tlsConfig := &tls.Config{ // Avoid fallback by default to SSL protocols < TLS1.2 MinVersion: tls.VersionTLS12, PreferServerCipherSuites: true, CipherSuites: DefaultServerAcceptedCiphers, } for _, op := range ops { op(tlsConfig) } return tlsConfig } // ClientDefault returns a secure-enough TLS configuration for the client TLS configuration. func ClientDefault(ops ...func(*tls.Config)) *tls.Config { tlsConfig := &tls.Config{ // Prefer TLS1.2 as the client minimum MinVersion: tls.VersionTLS12, CipherSuites: clientCipherSuites, } for _, op := range ops { op(tlsConfig) } return tlsConfig } // certPool returns an X.509 certificate pool from `caFile`, the certificate file. func certPool(caFile string, exclusivePool bool) (*x509.CertPool, error) { // If we should verify the server, we need to load a trusted ca var ( certPool *x509.CertPool err error ) if exclusivePool { certPool = x509.NewCertPool() } else { certPool, err = SystemCertPool() if err != nil { return nil, fmt.Errorf("failed to read system certificates: %v", err) } } pemData, err := os.ReadFile(caFile) if err != nil { return nil, fmt.Errorf("could not read CA certificate %q: %v", caFile, err) } if !certPool.AppendCertsFromPEM(pemData) { return nil, fmt.Errorf("failed to append certificates from PEM file: %q", caFile) } return certPool, nil } // allTLSVersions lists all the TLS versions and is used by the code that validates // a uint16 value as a TLS version. var allTLSVersions = map[uint16]struct{}{ tls.VersionTLS10: {}, tls.VersionTLS11: {}, tls.VersionTLS12: {}, tls.VersionTLS13: {}, } // isValidMinVersion checks that the input value is a valid tls minimum version func isValidMinVersion(version uint16) bool { _, ok := allTLSVersions[version] return ok } // adjustMinVersion sets the MinVersion on `config`, the input configuration. // It assumes the current MinVersion on the `config` is the lowest allowed. func adjustMinVersion(options Options, config *tls.Config) error { if options.MinVersion > 0 { if !isValidMinVersion(options.MinVersion) { return fmt.Errorf("invalid minimum TLS version: %x", options.MinVersion) } if options.MinVersion < config.MinVersion { return fmt.Errorf("requested minimum TLS version is too low. Should be at-least: %x", config.MinVersion) } config.MinVersion = options.MinVersion } return nil } // IsErrEncryptedKey returns true if the 'err' is an error of incorrect // password when trying to decrypt a TLS private key. // // Deprecated: Use of encrypted TLS private keys has been deprecated, and // will be removed in a future release. Golang has deprecated support for // legacy PEM encryption (as specified in RFC 1423), as it is insecure by // design (see https://go-review.googlesource.com/c/go/+/264159). func IsErrEncryptedKey(err error) bool { return errors.Is(err, x509.IncorrectPasswordError) } // getPrivateKey returns the private key in 'keyBytes', in PEM-encoded format. // If the private key is encrypted, 'passphrase' is used to decrypted the // private key. func getPrivateKey(keyBytes []byte, passphrase string) ([]byte, error) { // this section makes some small changes to code from notary/tuf/utils/x509.go pemBlock, _ := pem.Decode(keyBytes) if pemBlock == nil { return nil, fmt.Errorf("no valid private key found") } var err error if x509.IsEncryptedPEMBlock(pemBlock) { //nolint:staticcheck // Ignore SA1019 (IsEncryptedPEMBlock is deprecated) keyBytes, err = x509.DecryptPEMBlock(pemBlock, []byte(passphrase)) //nolint:staticcheck // Ignore SA1019 (DecryptPEMBlock is deprecated) if err != nil { return nil, fmt.Errorf("private key is encrypted, but could not decrypt it: %w", err) } keyBytes = pem.EncodeToMemory(&pem.Block{Type: pemBlock.Type, Bytes: keyBytes}) } return keyBytes, nil } // getCert returns a Certificate from the CertFile and KeyFile in 'options', // if the key is encrypted, the Passphrase in 'options' will be used to // decrypt it. func getCert(options Options) ([]tls.Certificate, error) { if options.CertFile == "" && options.KeyFile == "" { return nil, nil } cert, err := os.ReadFile(options.CertFile) if err != nil { return nil, err } prKeyBytes, err := os.ReadFile(options.KeyFile) if err != nil { return nil, err } prKeyBytes, err = getPrivateKey(prKeyBytes, options.Passphrase) if err != nil { return nil, err } tlsCert, err := tls.X509KeyPair(cert, prKeyBytes) if err != nil { return nil, err } return []tls.Certificate{tlsCert}, nil } // Client returns a TLS configuration meant to be used by a client. func Client(options Options) (*tls.Config, error) { tlsConfig := ClientDefault() tlsConfig.InsecureSkipVerify = options.InsecureSkipVerify if !options.InsecureSkipVerify && options.CAFile != "" { CAs, err := certPool(options.CAFile, options.ExclusiveRootPools) if err != nil { return nil, err } tlsConfig.RootCAs = CAs } tlsCerts, err := getCert(options) if err != nil { return nil, fmt.Errorf("could not load X509 key pair: %w", err) } tlsConfig.Certificates = tlsCerts if err := adjustMinVersion(options, tlsConfig); err != nil { return nil, err } return tlsConfig, nil } // Server returns a TLS configuration meant to be used by a server. func Server(options Options) (*tls.Config, error) { tlsConfig := ServerDefault() tlsConfig.ClientAuth = options.ClientAuth tlsCert, err := tls.LoadX509KeyPair(options.CertFile, options.KeyFile) if err != nil { if os.IsNotExist(err) { return nil, fmt.Errorf("could not load X509 key pair (cert: %q, key: %q): %v", options.CertFile, options.KeyFile, err) } return nil, fmt.Errorf("error reading X509 key pair - make sure the key is not encrypted (cert: %q, key: %q): %v", options.CertFile, options.KeyFile, err) } tlsConfig.Certificates = []tls.Certificate{tlsCert} if options.ClientAuth >= tls.VerifyClientCertIfGiven && options.CAFile != "" { CAs, err := certPool(options.CAFile, options.ExclusiveRootPools) if err != nil { return nil, err } tlsConfig.ClientCAs = CAs } if err := adjustMinVersion(options, tlsConfig); err != nil { return nil, err } return tlsConfig, nil } ================================================ FILE: vendor/github.com/docker/go-connections/tlsconfig/config_client_ciphers.go ================================================ // Package tlsconfig provides primitives to retrieve secure-enough TLS configurations for both clients and servers. package tlsconfig import ( "crypto/tls" ) // Client TLS cipher suites (dropping CBC ciphers for client preferred suite set) var clientCipherSuites = []uint16{ tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, } ================================================ FILE: vendor/github.com/docker/go-units/CONTRIBUTING.md ================================================ # Contributing to go-units Want to hack on go-units? Awesome! Here are instructions to get you started. go-units is a part of the [Docker](https://www.docker.com) project, and follows the same rules and principles. If you're already familiar with the way Docker does things, you'll feel right at home. Otherwise, go read Docker's [contributions guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md), [issue triaging](https://github.com/docker/docker/blob/master/project/ISSUE-TRIAGE.md), [review process](https://github.com/docker/docker/blob/master/project/REVIEWING.md) and [branches and tags](https://github.com/docker/docker/blob/master/project/BRANCHES-AND-TAGS.md). ### Sign your work The sign-off is a simple line at the end of the explanation for the patch. Your signature certifies that you wrote the patch or otherwise have the right to pass it on as an open-source patch. The rules are pretty simple: if you can certify the below (from [developercertificate.org](http://developercertificate.org/)): ``` Developer Certificate of Origin Version 1.1 Copyright (C) 2004, 2006 The Linux Foundation and its contributors. 660 York Street, Suite 102, San Francisco, CA 94110 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. ``` Then you just add a line to every git commit message: Signed-off-by: Joe Smith Use your real name (sorry, no pseudonyms or anonymous contributions.) If you set your `user.name` and `user.email` git configs, you can sign your commit automatically with `git commit -s`. ================================================ FILE: vendor/github.com/docker/go-units/LICENSE ================================================ Apache License Version 2.0, January 2004 https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor 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, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS Copyright 2015 Docker, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/github.com/docker/go-units/MAINTAINERS ================================================ # go-units maintainers file # # This file describes who runs the docker/go-units project and how. # This is a living document - if you see something out of date or missing, speak up! # # It is structured to be consumable by both humans and programs. # To extract its contents programmatically, use any TOML-compliant parser. # # This file is compiled into the MAINTAINERS file in docker/opensource. # [Org] [Org."Core maintainers"] people = [ "akihirosuda", "dnephin", "thajeztah", "vdemeester", ] [people] # A reference list of all people associated with the project. # All other sections should refer to people by their canonical key # in the people section. # ADD YOURSELF HERE IN ALPHABETICAL ORDER [people.akihirosuda] Name = "Akihiro Suda" Email = "akihiro.suda.cz@hco.ntt.co.jp" GitHub = "AkihiroSuda" [people.dnephin] Name = "Daniel Nephin" Email = "dnephin@gmail.com" GitHub = "dnephin" [people.thajeztah] Name = "Sebastiaan van Stijn" Email = "github@gone.nl" GitHub = "thaJeztah" [people.vdemeester] Name = "Vincent Demeester" Email = "vincent@sbr.pm" GitHub = "vdemeester" ================================================ FILE: vendor/github.com/docker/go-units/README.md ================================================ [![GoDoc](https://godoc.org/github.com/docker/go-units?status.svg)](https://godoc.org/github.com/docker/go-units) # Introduction go-units is a library to transform human friendly measurements into machine friendly values. ## Usage See the [docs in godoc](https://godoc.org/github.com/docker/go-units) for examples and documentation. ## Copyright and license Copyright © 2015 Docker, Inc. go-units is licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for the full text of the license. ================================================ FILE: vendor/github.com/docker/go-units/circle.yml ================================================ dependencies: post: # install golint - go get golang.org/x/lint/golint test: pre: # run analysis before tests - go vet ./... - test -z "$(golint ./... | tee /dev/stderr)" - test -z "$(gofmt -s -l . | tee /dev/stderr)" ================================================ FILE: vendor/github.com/docker/go-units/duration.go ================================================ // Package units provides helper function to parse and print size and time units // in human-readable format. package units import ( "fmt" "time" ) // HumanDuration returns a human-readable approximation of a duration // (eg. "About a minute", "4 hours ago", etc.). func HumanDuration(d time.Duration) string { if seconds := int(d.Seconds()); seconds < 1 { return "Less than a second" } else if seconds == 1 { return "1 second" } else if seconds < 60 { return fmt.Sprintf("%d seconds", seconds) } else if minutes := int(d.Minutes()); minutes == 1 { return "About a minute" } else if minutes < 60 { return fmt.Sprintf("%d minutes", minutes) } else if hours := int(d.Hours() + 0.5); hours == 1 { return "About an hour" } else if hours < 48 { return fmt.Sprintf("%d hours", hours) } else if hours < 24*7*2 { return fmt.Sprintf("%d days", hours/24) } else if hours < 24*30*2 { return fmt.Sprintf("%d weeks", hours/24/7) } else if hours < 24*365*2 { return fmt.Sprintf("%d months", hours/24/30) } return fmt.Sprintf("%d years", int(d.Hours())/24/365) } ================================================ FILE: vendor/github.com/docker/go-units/size.go ================================================ package units import ( "fmt" "strconv" "strings" ) // See: http://en.wikipedia.org/wiki/Binary_prefix const ( // Decimal KB = 1000 MB = 1000 * KB GB = 1000 * MB TB = 1000 * GB PB = 1000 * TB // Binary KiB = 1024 MiB = 1024 * KiB GiB = 1024 * MiB TiB = 1024 * GiB PiB = 1024 * TiB ) type unitMap map[byte]int64 var ( decimalMap = unitMap{'k': KB, 'm': MB, 'g': GB, 't': TB, 'p': PB} binaryMap = unitMap{'k': KiB, 'm': MiB, 'g': GiB, 't': TiB, 'p': PiB} ) var ( decimapAbbrs = []string{"B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"} binaryAbbrs = []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"} ) func getSizeAndUnit(size float64, base float64, _map []string) (float64, string) { i := 0 unitsLimit := len(_map) - 1 for size >= base && i < unitsLimit { size = size / base i++ } return size, _map[i] } // CustomSize returns a human-readable approximation of a size // using custom format. func CustomSize(format string, size float64, base float64, _map []string) string { size, unit := getSizeAndUnit(size, base, _map) return fmt.Sprintf(format, size, unit) } // HumanSizeWithPrecision allows the size to be in any precision, // instead of 4 digit precision used in units.HumanSize. func HumanSizeWithPrecision(size float64, precision int) string { size, unit := getSizeAndUnit(size, 1000.0, decimapAbbrs) return fmt.Sprintf("%.*g%s", precision, size, unit) } // HumanSize returns a human-readable approximation of a size // capped at 4 valid numbers (eg. "2.746 MB", "796 KB"). func HumanSize(size float64) string { return HumanSizeWithPrecision(size, 4) } // BytesSize returns a human-readable size in bytes, kibibytes, // mebibytes, gibibytes, or tebibytes (eg. "44kiB", "17MiB"). func BytesSize(size float64) string { return CustomSize("%.4g%s", size, 1024.0, binaryAbbrs) } // FromHumanSize returns an integer from a human-readable specification of a // size using SI standard (eg. "44kB", "17MB"). func FromHumanSize(size string) (int64, error) { return parseSize(size, decimalMap) } // RAMInBytes parses a human-readable string representing an amount of RAM // in bytes, kibibytes, mebibytes, gibibytes, or tebibytes and // returns the number of bytes, or -1 if the string is unparseable. // Units are case-insensitive, and the 'b' suffix is optional. func RAMInBytes(size string) (int64, error) { return parseSize(size, binaryMap) } // Parses the human-readable size string into the amount it represents. func parseSize(sizeStr string, uMap unitMap) (int64, error) { // TODO: rewrite to use strings.Cut if there's a space // once Go < 1.18 is deprecated. sep := strings.LastIndexAny(sizeStr, "01234567890. ") if sep == -1 { // There should be at least a digit. return -1, fmt.Errorf("invalid size: '%s'", sizeStr) } var num, sfx string if sizeStr[sep] != ' ' { num = sizeStr[:sep+1] sfx = sizeStr[sep+1:] } else { // Omit the space separator. num = sizeStr[:sep] sfx = sizeStr[sep+1:] } size, err := strconv.ParseFloat(num, 64) if err != nil { return -1, err } // Backward compatibility: reject negative sizes. if size < 0 { return -1, fmt.Errorf("invalid size: '%s'", sizeStr) } if len(sfx) == 0 { return int64(size), nil } // Process the suffix. if len(sfx) > 3 { // Too long. goto badSuffix } sfx = strings.ToLower(sfx) // Trivial case: b suffix. if sfx[0] == 'b' { if len(sfx) > 1 { // no extra characters allowed after b. goto badSuffix } return int64(size), nil } // A suffix from the map. if mul, ok := uMap[sfx[0]]; ok { size *= float64(mul) } else { goto badSuffix } // The suffix may have extra "b" or "ib" (e.g. KiB or MB). switch { case len(sfx) == 2 && sfx[1] != 'b': goto badSuffix case len(sfx) == 3 && sfx[1:] != "ib": goto badSuffix } return int64(size), nil badSuffix: return -1, fmt.Errorf("invalid suffix: '%s'", sfx) } ================================================ FILE: vendor/github.com/docker/go-units/ulimit.go ================================================ package units import ( "fmt" "strconv" "strings" ) // Ulimit is a human friendly version of Rlimit. type Ulimit struct { Name string Hard int64 Soft int64 } // Rlimit specifies the resource limits, such as max open files. type Rlimit struct { Type int `json:"type,omitempty"` Hard uint64 `json:"hard,omitempty"` Soft uint64 `json:"soft,omitempty"` } const ( // magic numbers for making the syscall // some of these are defined in the syscall package, but not all. // Also since Windows client doesn't get access to the syscall package, need to // define these here rlimitAs = 9 rlimitCore = 4 rlimitCPU = 0 rlimitData = 2 rlimitFsize = 1 rlimitLocks = 10 rlimitMemlock = 8 rlimitMsgqueue = 12 rlimitNice = 13 rlimitNofile = 7 rlimitNproc = 6 rlimitRss = 5 rlimitRtprio = 14 rlimitRttime = 15 rlimitSigpending = 11 rlimitStack = 3 ) var ulimitNameMapping = map[string]int{ //"as": rlimitAs, // Disabled since this doesn't seem usable with the way Docker inits a container. "core": rlimitCore, "cpu": rlimitCPU, "data": rlimitData, "fsize": rlimitFsize, "locks": rlimitLocks, "memlock": rlimitMemlock, "msgqueue": rlimitMsgqueue, "nice": rlimitNice, "nofile": rlimitNofile, "nproc": rlimitNproc, "rss": rlimitRss, "rtprio": rlimitRtprio, "rttime": rlimitRttime, "sigpending": rlimitSigpending, "stack": rlimitStack, } // ParseUlimit parses and returns a Ulimit from the specified string. func ParseUlimit(val string) (*Ulimit, error) { parts := strings.SplitN(val, "=", 2) if len(parts) != 2 { return nil, fmt.Errorf("invalid ulimit argument: %s", val) } if _, exists := ulimitNameMapping[parts[0]]; !exists { return nil, fmt.Errorf("invalid ulimit type: %s", parts[0]) } var ( soft int64 hard = &soft // default to soft in case no hard was set temp int64 err error ) switch limitVals := strings.Split(parts[1], ":"); len(limitVals) { case 2: temp, err = strconv.ParseInt(limitVals[1], 10, 64) if err != nil { return nil, err } hard = &temp fallthrough case 1: soft, err = strconv.ParseInt(limitVals[0], 10, 64) if err != nil { return nil, err } default: return nil, fmt.Errorf("too many limit value arguments - %s, can only have up to two, `soft[:hard]`", parts[1]) } if *hard != -1 { if soft == -1 { return nil, fmt.Errorf("ulimit soft limit must be less than or equal to hard limit: soft: -1 (unlimited), hard: %d", *hard) } if soft > *hard { return nil, fmt.Errorf("ulimit soft limit must be less than or equal to hard limit: %d > %d", soft, *hard) } } return &Ulimit{Name: parts[0], Soft: soft, Hard: *hard}, nil } // GetRlimit returns the RLimit corresponding to Ulimit. func (u *Ulimit) GetRlimit() (*Rlimit, error) { t, exists := ulimitNameMapping[u.Name] if !exists { return nil, fmt.Errorf("invalid ulimit name %s", u.Name) } return &Rlimit{Type: t, Soft: uint64(u.Soft), Hard: uint64(u.Hard)}, nil } func (u *Ulimit) String() string { return fmt.Sprintf("%s=%d:%d", u.Name, u.Soft, u.Hard) } ================================================ FILE: vendor/github.com/fatih/color/LICENSE.md ================================================ The MIT License (MIT) Copyright (c) 2013 Fatih Arslan 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. ================================================ FILE: vendor/github.com/fatih/color/README.md ================================================ # color [![](https://github.com/fatih/color/workflows/build/badge.svg)](https://github.com/fatih/color/actions) [![PkgGoDev](https://pkg.go.dev/badge/github.com/fatih/color)](https://pkg.go.dev/github.com/fatih/color) Color lets you use colorized outputs in terms of [ANSI Escape Codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors) in Go (Golang). It has support for Windows too! The API can be used in several ways, pick one that suits you. ![Color](https://user-images.githubusercontent.com/438920/96832689-03b3e000-13f4-11eb-9803-46f4c4de3406.jpg) ## Install ```bash go get github.com/fatih/color ``` ## Examples ### Standard colors ```go // Print with default helper functions color.Cyan("Prints text in cyan.") // A newline will be appended automatically color.Blue("Prints %s in blue.", "text") // These are using the default foreground colors color.Red("We have red") color.Magenta("And many others ..") ``` ### Mix and reuse colors ```go // Create a new color object c := color.New(color.FgCyan).Add(color.Underline) c.Println("Prints cyan text with an underline.") // Or just add them to New() d := color.New(color.FgCyan, color.Bold) d.Printf("This prints bold cyan %s\n", "too!.") // Mix up foreground and background colors, create new mixes! red := color.New(color.FgRed) boldRed := red.Add(color.Bold) boldRed.Println("This will print text in bold red.") whiteBackground := red.Add(color.BgWhite) whiteBackground.Println("Red text with white background.") ``` ### Use your own output (io.Writer) ```go // Use your own io.Writer output color.New(color.FgBlue).Fprintln(myWriter, "blue color!") blue := color.New(color.FgBlue) blue.Fprint(writer, "This will print text in blue.") ``` ### Custom print functions (PrintFunc) ```go // Create a custom print function for convenience red := color.New(color.FgRed).PrintfFunc() red("Warning") red("Error: %s", err) // Mix up multiple attributes notice := color.New(color.Bold, color.FgGreen).PrintlnFunc() notice("Don't forget this...") ``` ### Custom fprint functions (FprintFunc) ```go blue := color.New(FgBlue).FprintfFunc() blue(myWriter, "important notice: %s", stars) // Mix up with multiple attributes success := color.New(color.Bold, color.FgGreen).FprintlnFunc() success(myWriter, "Don't forget this...") ``` ### Insert into noncolor strings (SprintFunc) ```go // Create SprintXxx functions to mix strings with other non-colorized strings: yellow := color.New(color.FgYellow).SprintFunc() red := color.New(color.FgRed).SprintFunc() fmt.Printf("This is a %s and this is %s.\n", yellow("warning"), red("error")) info := color.New(color.FgWhite, color.BgGreen).SprintFunc() fmt.Printf("This %s rocks!\n", info("package")) // Use helper functions fmt.Println("This", color.RedString("warning"), "should be not neglected.") fmt.Printf("%v %v\n", color.GreenString("Info:"), "an important message.") // Windows supported too! Just don't forget to change the output to color.Output fmt.Fprintf(color.Output, "Windows support: %s", color.GreenString("PASS")) ``` ### Plug into existing code ```go // Use handy standard colors color.Set(color.FgYellow) fmt.Println("Existing text will now be in yellow") fmt.Printf("This one %s\n", "too") color.Unset() // Don't forget to unset // You can mix up parameters color.Set(color.FgMagenta, color.Bold) defer color.Unset() // Use it in your function fmt.Println("All text will now be bold magenta.") ``` ### Disable/Enable color There might be a case where you want to explicitly disable/enable color output. the `go-isatty` package will automatically disable color output for non-tty output streams (for example if the output were piped directly to `less`) `Color` has support to disable/enable colors both globally and for single color definitions. For example suppose you have a CLI app and a `--no-color` bool flag. You can easily disable the color output with: ```go var flagNoColor = flag.Bool("no-color", false, "Disable color output") if *flagNoColor { color.NoColor = true // disables colorized output } ``` It also has support for single color definitions (local). You can disable/enable color output on the fly: ```go c := color.New(color.FgCyan) c.Println("Prints cyan text") c.DisableColor() c.Println("This is printed without any color") c.EnableColor() c.Println("This prints again cyan...") ``` ## Todo * Save/Return previous values * Evaluate fmt.Formatter interface ## Credits * [Fatih Arslan](https://github.com/fatih) * Windows support via @mattn: [colorable](https://github.com/mattn/go-colorable) ## License The MIT License (MIT) - see [`LICENSE.md`](https://github.com/fatih/color/blob/master/LICENSE.md) for more details ================================================ FILE: vendor/github.com/fatih/color/color.go ================================================ package color import ( "fmt" "io" "os" "strconv" "strings" "sync" "github.com/mattn/go-colorable" "github.com/mattn/go-isatty" ) var ( // NoColor defines if the output is colorized or not. It's dynamically set to // false or true based on the stdout's file descriptor referring to a terminal // or not. This is a global option and affects all colors. For more control // over each color block use the methods DisableColor() individually. NoColor = os.Getenv("TERM") == "dumb" || (!isatty.IsTerminal(os.Stdout.Fd()) && !isatty.IsCygwinTerminal(os.Stdout.Fd())) // Output defines the standard output of the print functions. By default // os.Stdout is used. Output = colorable.NewColorableStdout() // Error defines a color supporting writer for os.Stderr. Error = colorable.NewColorableStderr() // colorsCache is used to reduce the count of created Color objects and // allows to reuse already created objects with required Attribute. colorsCache = make(map[Attribute]*Color) colorsCacheMu sync.Mutex // protects colorsCache ) // Color defines a custom color object which is defined by SGR parameters. type Color struct { params []Attribute noColor *bool } // Attribute defines a single SGR Code type Attribute int const escape = "\x1b" // Base attributes const ( Reset Attribute = iota Bold Faint Italic Underline BlinkSlow BlinkRapid ReverseVideo Concealed CrossedOut ) // Foreground text colors const ( FgBlack Attribute = iota + 30 FgRed FgGreen FgYellow FgBlue FgMagenta FgCyan FgWhite ) // Foreground Hi-Intensity text colors const ( FgHiBlack Attribute = iota + 90 FgHiRed FgHiGreen FgHiYellow FgHiBlue FgHiMagenta FgHiCyan FgHiWhite ) // Background text colors const ( BgBlack Attribute = iota + 40 BgRed BgGreen BgYellow BgBlue BgMagenta BgCyan BgWhite ) // Background Hi-Intensity text colors const ( BgHiBlack Attribute = iota + 100 BgHiRed BgHiGreen BgHiYellow BgHiBlue BgHiMagenta BgHiCyan BgHiWhite ) // New returns a newly created color object. func New(value ...Attribute) *Color { c := &Color{params: make([]Attribute, 0)} c.Add(value...) return c } // Set sets the given parameters immediately. It will change the color of // output with the given SGR parameters until color.Unset() is called. func Set(p ...Attribute) *Color { c := New(p...) c.Set() return c } // Unset resets all escape attributes and clears the output. Usually should // be called after Set(). func Unset() { if NoColor { return } fmt.Fprintf(Output, "%s[%dm", escape, Reset) } // Set sets the SGR sequence. func (c *Color) Set() *Color { if c.isNoColorSet() { return c } fmt.Fprintf(Output, c.format()) return c } func (c *Color) unset() { if c.isNoColorSet() { return } Unset() } func (c *Color) setWriter(w io.Writer) *Color { if c.isNoColorSet() { return c } fmt.Fprintf(w, c.format()) return c } func (c *Color) unsetWriter(w io.Writer) { if c.isNoColorSet() { return } if NoColor { return } fmt.Fprintf(w, "%s[%dm", escape, Reset) } // Add is used to chain SGR parameters. Use as many as parameters to combine // and create custom color objects. Example: Add(color.FgRed, color.Underline). func (c *Color) Add(value ...Attribute) *Color { c.params = append(c.params, value...) return c } func (c *Color) prepend(value Attribute) { c.params = append(c.params, 0) copy(c.params[1:], c.params[0:]) c.params[0] = value } // Fprint formats using the default formats for its operands and writes to w. // Spaces are added between operands when neither is a string. // It returns the number of bytes written and any write error encountered. // On Windows, users should wrap w with colorable.NewColorable() if w is of // type *os.File. func (c *Color) Fprint(w io.Writer, a ...interface{}) (n int, err error) { c.setWriter(w) defer c.unsetWriter(w) return fmt.Fprint(w, a...) } // Print formats using the default formats for its operands and writes to // standard output. Spaces are added between operands when neither is a // string. It returns the number of bytes written and any write error // encountered. This is the standard fmt.Print() method wrapped with the given // color. func (c *Color) Print(a ...interface{}) (n int, err error) { c.Set() defer c.unset() return fmt.Fprint(Output, a...) } // Fprintf formats according to a format specifier and writes to w. // It returns the number of bytes written and any write error encountered. // On Windows, users should wrap w with colorable.NewColorable() if w is of // type *os.File. func (c *Color) Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) { c.setWriter(w) defer c.unsetWriter(w) return fmt.Fprintf(w, format, a...) } // Printf formats according to a format specifier and writes to standard output. // It returns the number of bytes written and any write error encountered. // This is the standard fmt.Printf() method wrapped with the given color. func (c *Color) Printf(format string, a ...interface{}) (n int, err error) { c.Set() defer c.unset() return fmt.Fprintf(Output, format, a...) } // Fprintln formats using the default formats for its operands and writes to w. // Spaces are always added between operands and a newline is appended. // On Windows, users should wrap w with colorable.NewColorable() if w is of // type *os.File. func (c *Color) Fprintln(w io.Writer, a ...interface{}) (n int, err error) { c.setWriter(w) defer c.unsetWriter(w) return fmt.Fprintln(w, a...) } // Println formats using the default formats for its operands and writes to // standard output. Spaces are always added between operands and a newline is // appended. It returns the number of bytes written and any write error // encountered. This is the standard fmt.Print() method wrapped with the given // color. func (c *Color) Println(a ...interface{}) (n int, err error) { c.Set() defer c.unset() return fmt.Fprintln(Output, a...) } // Sprint is just like Print, but returns a string instead of printing it. func (c *Color) Sprint(a ...interface{}) string { return c.wrap(fmt.Sprint(a...)) } // Sprintln is just like Println, but returns a string instead of printing it. func (c *Color) Sprintln(a ...interface{}) string { return c.wrap(fmt.Sprintln(a...)) } // Sprintf is just like Printf, but returns a string instead of printing it. func (c *Color) Sprintf(format string, a ...interface{}) string { return c.wrap(fmt.Sprintf(format, a...)) } // FprintFunc returns a new function that prints the passed arguments as // colorized with color.Fprint(). func (c *Color) FprintFunc() func(w io.Writer, a ...interface{}) { return func(w io.Writer, a ...interface{}) { c.Fprint(w, a...) } } // PrintFunc returns a new function that prints the passed arguments as // colorized with color.Print(). func (c *Color) PrintFunc() func(a ...interface{}) { return func(a ...interface{}) { c.Print(a...) } } // FprintfFunc returns a new function that prints the passed arguments as // colorized with color.Fprintf(). func (c *Color) FprintfFunc() func(w io.Writer, format string, a ...interface{}) { return func(w io.Writer, format string, a ...interface{}) { c.Fprintf(w, format, a...) } } // PrintfFunc returns a new function that prints the passed arguments as // colorized with color.Printf(). func (c *Color) PrintfFunc() func(format string, a ...interface{}) { return func(format string, a ...interface{}) { c.Printf(format, a...) } } // FprintlnFunc returns a new function that prints the passed arguments as // colorized with color.Fprintln(). func (c *Color) FprintlnFunc() func(w io.Writer, a ...interface{}) { return func(w io.Writer, a ...interface{}) { c.Fprintln(w, a...) } } // PrintlnFunc returns a new function that prints the passed arguments as // colorized with color.Println(). func (c *Color) PrintlnFunc() func(a ...interface{}) { return func(a ...interface{}) { c.Println(a...) } } // SprintFunc returns a new function that returns colorized strings for the // given arguments with fmt.Sprint(). Useful to put into or mix into other // string. Windows users should use this in conjunction with color.Output, example: // // put := New(FgYellow).SprintFunc() // fmt.Fprintf(color.Output, "This is a %s", put("warning")) func (c *Color) SprintFunc() func(a ...interface{}) string { return func(a ...interface{}) string { return c.wrap(fmt.Sprint(a...)) } } // SprintfFunc returns a new function that returns colorized strings for the // given arguments with fmt.Sprintf(). Useful to put into or mix into other // string. Windows users should use this in conjunction with color.Output. func (c *Color) SprintfFunc() func(format string, a ...interface{}) string { return func(format string, a ...interface{}) string { return c.wrap(fmt.Sprintf(format, a...)) } } // SprintlnFunc returns a new function that returns colorized strings for the // given arguments with fmt.Sprintln(). Useful to put into or mix into other // string. Windows users should use this in conjunction with color.Output. func (c *Color) SprintlnFunc() func(a ...interface{}) string { return func(a ...interface{}) string { return c.wrap(fmt.Sprintln(a...)) } } // sequence returns a formatted SGR sequence to be plugged into a "\x1b[...m" // an example output might be: "1;36" -> bold cyan func (c *Color) sequence() string { format := make([]string, len(c.params)) for i, v := range c.params { format[i] = strconv.Itoa(int(v)) } return strings.Join(format, ";") } // wrap wraps the s string with the colors attributes. The string is ready to // be printed. func (c *Color) wrap(s string) string { if c.isNoColorSet() { return s } return c.format() + s + c.unformat() } func (c *Color) format() string { return fmt.Sprintf("%s[%sm", escape, c.sequence()) } func (c *Color) unformat() string { return fmt.Sprintf("%s[%dm", escape, Reset) } // DisableColor disables the color output. Useful to not change any existing // code and still being able to output. Can be used for flags like // "--no-color". To enable back use EnableColor() method. func (c *Color) DisableColor() { c.noColor = boolPtr(true) } // EnableColor enables the color output. Use it in conjunction with // DisableColor(). Otherwise this method has no side effects. func (c *Color) EnableColor() { c.noColor = boolPtr(false) } func (c *Color) isNoColorSet() bool { // check first if we have user setted action if c.noColor != nil { return *c.noColor } // if not return the global option, which is disabled by default return NoColor } // Equals returns a boolean value indicating whether two colors are equal. func (c *Color) Equals(c2 *Color) bool { if len(c.params) != len(c2.params) { return false } for _, attr := range c.params { if !c2.attrExists(attr) { return false } } return true } func (c *Color) attrExists(a Attribute) bool { for _, attr := range c.params { if attr == a { return true } } return false } func boolPtr(v bool) *bool { return &v } func getCachedColor(p Attribute) *Color { colorsCacheMu.Lock() defer colorsCacheMu.Unlock() c, ok := colorsCache[p] if !ok { c = New(p) colorsCache[p] = c } return c } func colorPrint(format string, p Attribute, a ...interface{}) { c := getCachedColor(p) if !strings.HasSuffix(format, "\n") { format += "\n" } if len(a) == 0 { c.Print(format) } else { c.Printf(format, a...) } } func colorString(format string, p Attribute, a ...interface{}) string { c := getCachedColor(p) if len(a) == 0 { return c.SprintFunc()(format) } return c.SprintfFunc()(format, a...) } // Black is a convenient helper function to print with black foreground. A // newline is appended to format by default. func Black(format string, a ...interface{}) { colorPrint(format, FgBlack, a...) } // Red is a convenient helper function to print with red foreground. A // newline is appended to format by default. func Red(format string, a ...interface{}) { colorPrint(format, FgRed, a...) } // Green is a convenient helper function to print with green foreground. A // newline is appended to format by default. func Green(format string, a ...interface{}) { colorPrint(format, FgGreen, a...) } // Yellow is a convenient helper function to print with yellow foreground. // A newline is appended to format by default. func Yellow(format string, a ...interface{}) { colorPrint(format, FgYellow, a...) } // Blue is a convenient helper function to print with blue foreground. A // newline is appended to format by default. func Blue(format string, a ...interface{}) { colorPrint(format, FgBlue, a...) } // Magenta is a convenient helper function to print with magenta foreground. // A newline is appended to format by default. func Magenta(format string, a ...interface{}) { colorPrint(format, FgMagenta, a...) } // Cyan is a convenient helper function to print with cyan foreground. A // newline is appended to format by default. func Cyan(format string, a ...interface{}) { colorPrint(format, FgCyan, a...) } // White is a convenient helper function to print with white foreground. A // newline is appended to format by default. func White(format string, a ...interface{}) { colorPrint(format, FgWhite, a...) } // BlackString is a convenient helper function to return a string with black // foreground. func BlackString(format string, a ...interface{}) string { return colorString(format, FgBlack, a...) } // RedString is a convenient helper function to return a string with red // foreground. func RedString(format string, a ...interface{}) string { return colorString(format, FgRed, a...) } // GreenString is a convenient helper function to return a string with green // foreground. func GreenString(format string, a ...interface{}) string { return colorString(format, FgGreen, a...) } // YellowString is a convenient helper function to return a string with yellow // foreground. func YellowString(format string, a ...interface{}) string { return colorString(format, FgYellow, a...) } // BlueString is a convenient helper function to return a string with blue // foreground. func BlueString(format string, a ...interface{}) string { return colorString(format, FgBlue, a...) } // MagentaString is a convenient helper function to return a string with magenta // foreground. func MagentaString(format string, a ...interface{}) string { return colorString(format, FgMagenta, a...) } // CyanString is a convenient helper function to return a string with cyan // foreground. func CyanString(format string, a ...interface{}) string { return colorString(format, FgCyan, a...) } // WhiteString is a convenient helper function to return a string with white // foreground. func WhiteString(format string, a ...interface{}) string { return colorString(format, FgWhite, a...) } // HiBlack is a convenient helper function to print with hi-intensity black foreground. A // newline is appended to format by default. func HiBlack(format string, a ...interface{}) { colorPrint(format, FgHiBlack, a...) } // HiRed is a convenient helper function to print with hi-intensity red foreground. A // newline is appended to format by default. func HiRed(format string, a ...interface{}) { colorPrint(format, FgHiRed, a...) } // HiGreen is a convenient helper function to print with hi-intensity green foreground. A // newline is appended to format by default. func HiGreen(format string, a ...interface{}) { colorPrint(format, FgHiGreen, a...) } // HiYellow is a convenient helper function to print with hi-intensity yellow foreground. // A newline is appended to format by default. func HiYellow(format string, a ...interface{}) { colorPrint(format, FgHiYellow, a...) } // HiBlue is a convenient helper function to print with hi-intensity blue foreground. A // newline is appended to format by default. func HiBlue(format string, a ...interface{}) { colorPrint(format, FgHiBlue, a...) } // HiMagenta is a convenient helper function to print with hi-intensity magenta foreground. // A newline is appended to format by default. func HiMagenta(format string, a ...interface{}) { colorPrint(format, FgHiMagenta, a...) } // HiCyan is a convenient helper function to print with hi-intensity cyan foreground. A // newline is appended to format by default. func HiCyan(format string, a ...interface{}) { colorPrint(format, FgHiCyan, a...) } // HiWhite is a convenient helper function to print with hi-intensity white foreground. A // newline is appended to format by default. func HiWhite(format string, a ...interface{}) { colorPrint(format, FgHiWhite, a...) } // HiBlackString is a convenient helper function to return a string with hi-intensity black // foreground. func HiBlackString(format string, a ...interface{}) string { return colorString(format, FgHiBlack, a...) } // HiRedString is a convenient helper function to return a string with hi-intensity red // foreground. func HiRedString(format string, a ...interface{}) string { return colorString(format, FgHiRed, a...) } // HiGreenString is a convenient helper function to return a string with hi-intensity green // foreground. func HiGreenString(format string, a ...interface{}) string { return colorString(format, FgHiGreen, a...) } // HiYellowString is a convenient helper function to return a string with hi-intensity yellow // foreground. func HiYellowString(format string, a ...interface{}) string { return colorString(format, FgHiYellow, a...) } // HiBlueString is a convenient helper function to return a string with hi-intensity blue // foreground. func HiBlueString(format string, a ...interface{}) string { return colorString(format, FgHiBlue, a...) } // HiMagentaString is a convenient helper function to return a string with hi-intensity magenta // foreground. func HiMagentaString(format string, a ...interface{}) string { return colorString(format, FgHiMagenta, a...) } // HiCyanString is a convenient helper function to return a string with hi-intensity cyan // foreground. func HiCyanString(format string, a ...interface{}) string { return colorString(format, FgHiCyan, a...) } // HiWhiteString is a convenient helper function to return a string with hi-intensity white // foreground. func HiWhiteString(format string, a ...interface{}) string { return colorString(format, FgHiWhite, a...) } ================================================ FILE: vendor/github.com/fatih/color/doc.go ================================================ /* Package color is an ANSI color package to output colorized or SGR defined output to the standard output. The API can be used in several way, pick one that suits you. Use simple and default helper functions with predefined foreground colors: color.Cyan("Prints text in cyan.") // a newline will be appended automatically color.Blue("Prints %s in blue.", "text") // More default foreground colors.. color.Red("We have red") color.Yellow("Yellow color too!") color.Magenta("And many others ..") // Hi-intensity colors color.HiGreen("Bright green color.") color.HiBlack("Bright black means gray..") color.HiWhite("Shiny white color!") However there are times where custom color mixes are required. Below are some examples to create custom color objects and use the print functions of each separate color object. // Create a new color object c := color.New(color.FgCyan).Add(color.Underline) c.Println("Prints cyan text with an underline.") // Or just add them to New() d := color.New(color.FgCyan, color.Bold) d.Printf("This prints bold cyan %s\n", "too!.") // Mix up foreground and background colors, create new mixes! red := color.New(color.FgRed) boldRed := red.Add(color.Bold) boldRed.Println("This will print text in bold red.") whiteBackground := red.Add(color.BgWhite) whiteBackground.Println("Red text with White background.") // Use your own io.Writer output color.New(color.FgBlue).Fprintln(myWriter, "blue color!") blue := color.New(color.FgBlue) blue.Fprint(myWriter, "This will print text in blue.") You can create PrintXxx functions to simplify even more: // Create a custom print function for convenient red := color.New(color.FgRed).PrintfFunc() red("warning") red("error: %s", err) // Mix up multiple attributes notice := color.New(color.Bold, color.FgGreen).PrintlnFunc() notice("don't forget this...") You can also FprintXxx functions to pass your own io.Writer: blue := color.New(FgBlue).FprintfFunc() blue(myWriter, "important notice: %s", stars) // Mix up with multiple attributes success := color.New(color.Bold, color.FgGreen).FprintlnFunc() success(myWriter, don't forget this...") Or create SprintXxx functions to mix strings with other non-colorized strings: yellow := New(FgYellow).SprintFunc() red := New(FgRed).SprintFunc() fmt.Printf("this is a %s and this is %s.\n", yellow("warning"), red("error")) info := New(FgWhite, BgGreen).SprintFunc() fmt.Printf("this %s rocks!\n", info("package")) Windows support is enabled by default. All Print functions work as intended. However only for color.SprintXXX functions, user should use fmt.FprintXXX and set the output to color.Output: fmt.Fprintf(color.Output, "Windows support: %s", color.GreenString("PASS")) info := New(FgWhite, BgGreen).SprintFunc() fmt.Fprintf(color.Output, "this %s rocks!\n", info("package")) Using with existing code is possible. Just use the Set() method to set the standard output to the given parameters. That way a rewrite of an existing code is not required. // Use handy standard colors. color.Set(color.FgYellow) fmt.Println("Existing text will be now in Yellow") fmt.Printf("This one %s\n", "too") color.Unset() // don't forget to unset // You can mix up parameters color.Set(color.FgMagenta, color.Bold) defer color.Unset() // use it in your function fmt.Println("All text will be now bold magenta.") There might be a case where you want to disable color output (for example to pipe the standard output of your app to somewhere else). `Color` has support to disable colors both globally and for single color definition. For example suppose you have a CLI app and a `--no-color` bool flag. You can easily disable the color output with: var flagNoColor = flag.Bool("no-color", false, "Disable color output") if *flagNoColor { color.NoColor = true // disables colorized output } It also has support for single color definitions (local). You can disable/enable color output on the fly: c := color.New(color.FgCyan) c.Println("Prints cyan text") c.DisableColor() c.Println("This is printed without any color") c.EnableColor() c.Println("This prints again cyan...") */ package color ================================================ FILE: vendor/github.com/felixge/httpsnoop/.gitignore ================================================ ================================================ FILE: vendor/github.com/felixge/httpsnoop/LICENSE.txt ================================================ Copyright (c) 2016 Felix Geisendörfer (felix@debuggable.com) 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. ================================================ FILE: vendor/github.com/felixge/httpsnoop/Makefile ================================================ .PHONY: ci generate clean ci: clean generate go test -race -v ./... generate: go generate . clean: rm -rf *_generated*.go ================================================ FILE: vendor/github.com/felixge/httpsnoop/README.md ================================================ # httpsnoop Package httpsnoop provides an easy way to capture http related metrics (i.e. response time, bytes written, and http status code) from your application's http.Handlers. Doing this requires non-trivial wrapping of the http.ResponseWriter interface, which is also exposed for users interested in a more low-level API. [![Go Reference](https://pkg.go.dev/badge/github.com/felixge/httpsnoop.svg)](https://pkg.go.dev/github.com/felixge/httpsnoop) [![Build Status](https://github.com/felixge/httpsnoop/actions/workflows/main.yaml/badge.svg)](https://github.com/felixge/httpsnoop/actions/workflows/main.yaml) ## Usage Example ```go // myH is your app's http handler, perhaps a http.ServeMux or similar. var myH http.Handler // wrappedH wraps myH in order to log every request. wrappedH := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { m := httpsnoop.CaptureMetrics(myH, w, r) log.Printf( "%s %s (code=%d dt=%s written=%d)", r.Method, r.URL, m.Code, m.Duration, m.Written, ) }) http.ListenAndServe(":8080", wrappedH) ``` ## Why this package exists Instrumenting an application's http.Handler is surprisingly difficult. However if you google for e.g. "capture ResponseWriter status code" you'll find lots of advise and code examples that suggest it to be a fairly trivial undertaking. Unfortunately everything I've seen so far has a high chance of breaking your application. The main problem is that a `http.ResponseWriter` often implements additional interfaces such as `http.Flusher`, `http.CloseNotifier`, `http.Hijacker`, `http.Pusher`, and `io.ReaderFrom`. So the naive approach of just wrapping `http.ResponseWriter` in your own struct that also implements the `http.ResponseWriter` interface will hide the additional interfaces mentioned above. This has a high change of introducing subtle bugs into any non-trivial application. Another approach I've seen people take is to return a struct that implements all of the interfaces above. However, that's also problematic, because it's difficult to fake some of these interfaces behaviors when the underlying `http.ResponseWriter` doesn't have an implementation. It's also dangerous, because an application may choose to operate differently, merely because it detects the presence of these additional interfaces. This package solves this problem by checking which additional interfaces a `http.ResponseWriter` implements, returning a wrapped version implementing the exact same set of interfaces. Additionally this package properly handles edge cases such as `WriteHeader` not being called, or called more than once, as well as concurrent calls to `http.ResponseWriter` methods, and even calls happening after the wrapped `ServeHTTP` has already returned. Unfortunately this package is not perfect either. It's possible that it is still missing some interfaces provided by the go core (let me know if you find one), and it won't work for applications adding their own interfaces into the mix. You can however use `httpsnoop.Unwrap(w)` to access the underlying `http.ResponseWriter` and type-assert the result to its other interfaces. However, hopefully the explanation above has sufficiently scared you of rolling your own solution to this problem. httpsnoop may still break your application, but at least it tries to avoid it as much as possible. Anyway, the real problem here is that smuggling additional interfaces inside `http.ResponseWriter` is a problematic design choice, but it probably goes as deep as the Go language specification itself. But that's okay, I still prefer Go over the alternatives ;). ## Performance ``` BenchmarkBaseline-8 20000 94912 ns/op BenchmarkCaptureMetrics-8 20000 95461 ns/op ``` As you can see, using `CaptureMetrics` on a vanilla http.Handler introduces an overhead of ~500 ns per http request on my machine. However, the margin of error appears to be larger than that, therefor it should be reasonable to assume that the overhead introduced by `CaptureMetrics` is absolutely negligible. ## License MIT ================================================ FILE: vendor/github.com/felixge/httpsnoop/capture_metrics.go ================================================ package httpsnoop import ( "io" "net/http" "time" ) // Metrics holds metrics captured from CaptureMetrics. type Metrics struct { // Code is the first http response code passed to the WriteHeader func of // the ResponseWriter. If no such call is made, a default code of 200 is // assumed instead. Code int // Duration is the time it took to execute the handler. Duration time.Duration // Written is the number of bytes successfully written by the Write or // ReadFrom function of the ResponseWriter. ResponseWriters may also write // data to their underlaying connection directly (e.g. headers), but those // are not tracked. Therefor the number of Written bytes will usually match // the size of the response body. Written int64 } // CaptureMetrics wraps the given hnd, executes it with the given w and r, and // returns the metrics it captured from it. func CaptureMetrics(hnd http.Handler, w http.ResponseWriter, r *http.Request) Metrics { return CaptureMetricsFn(w, func(ww http.ResponseWriter) { hnd.ServeHTTP(ww, r) }) } // CaptureMetricsFn wraps w and calls fn with the wrapped w and returns the // resulting metrics. This is very similar to CaptureMetrics (which is just // sugar on top of this func), but is a more usable interface if your // application doesn't use the Go http.Handler interface. func CaptureMetricsFn(w http.ResponseWriter, fn func(http.ResponseWriter)) Metrics { m := Metrics{Code: http.StatusOK} m.CaptureMetrics(w, fn) return m } // CaptureMetrics wraps w and calls fn with the wrapped w and updates // Metrics m with the resulting metrics. This is similar to CaptureMetricsFn, // but allows one to customize starting Metrics object. func (m *Metrics) CaptureMetrics(w http.ResponseWriter, fn func(http.ResponseWriter)) { var ( start = time.Now() headerWritten bool hooks = Hooks{ WriteHeader: func(next WriteHeaderFunc) WriteHeaderFunc { return func(code int) { next(code) if !(code >= 100 && code <= 199) && !headerWritten { m.Code = code headerWritten = true } } }, Write: func(next WriteFunc) WriteFunc { return func(p []byte) (int, error) { n, err := next(p) m.Written += int64(n) headerWritten = true return n, err } }, ReadFrom: func(next ReadFromFunc) ReadFromFunc { return func(src io.Reader) (int64, error) { n, err := next(src) headerWritten = true m.Written += n return n, err } }, } ) fn(Wrap(w, hooks)) m.Duration += time.Since(start) } ================================================ FILE: vendor/github.com/felixge/httpsnoop/docs.go ================================================ // Package httpsnoop provides an easy way to capture http related metrics (i.e. // response time, bytes written, and http status code) from your application's // http.Handlers. // // Doing this requires non-trivial wrapping of the http.ResponseWriter // interface, which is also exposed for users interested in a more low-level // API. package httpsnoop //go:generate go run codegen/main.go ================================================ FILE: vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go ================================================ // +build go1.8 // Code generated by "httpsnoop/codegen"; DO NOT EDIT. package httpsnoop import ( "bufio" "io" "net" "net/http" ) // HeaderFunc is part of the http.ResponseWriter interface. type HeaderFunc func() http.Header // WriteHeaderFunc is part of the http.ResponseWriter interface. type WriteHeaderFunc func(code int) // WriteFunc is part of the http.ResponseWriter interface. type WriteFunc func(b []byte) (int, error) // FlushFunc is part of the http.Flusher interface. type FlushFunc func() // CloseNotifyFunc is part of the http.CloseNotifier interface. type CloseNotifyFunc func() <-chan bool // HijackFunc is part of the http.Hijacker interface. type HijackFunc func() (net.Conn, *bufio.ReadWriter, error) // ReadFromFunc is part of the io.ReaderFrom interface. type ReadFromFunc func(src io.Reader) (int64, error) // PushFunc is part of the http.Pusher interface. type PushFunc func(target string, opts *http.PushOptions) error // Hooks defines a set of method interceptors for methods included in // http.ResponseWriter as well as some others. You can think of them as // middleware for the function calls they target. See Wrap for more details. type Hooks struct { Header func(HeaderFunc) HeaderFunc WriteHeader func(WriteHeaderFunc) WriteHeaderFunc Write func(WriteFunc) WriteFunc Flush func(FlushFunc) FlushFunc CloseNotify func(CloseNotifyFunc) CloseNotifyFunc Hijack func(HijackFunc) HijackFunc ReadFrom func(ReadFromFunc) ReadFromFunc Push func(PushFunc) PushFunc } // Wrap returns a wrapped version of w that provides the exact same interface // as w. Specifically if w implements any combination of: // // - http.Flusher // - http.CloseNotifier // - http.Hijacker // - io.ReaderFrom // - http.Pusher // // The wrapped version will implement the exact same combination. If no hooks // are set, the wrapped version also behaves exactly as w. Hooks targeting // methods not supported by w are ignored. Any other hooks will intercept the // method they target and may modify the call's arguments and/or return values. // The CaptureMetrics implementation serves as a working example for how the // hooks can be used. func Wrap(w http.ResponseWriter, hooks Hooks) http.ResponseWriter { rw := &rw{w: w, h: hooks} _, i0 := w.(http.Flusher) _, i1 := w.(http.CloseNotifier) _, i2 := w.(http.Hijacker) _, i3 := w.(io.ReaderFrom) _, i4 := w.(http.Pusher) switch { // combination 1/32 case !i0 && !i1 && !i2 && !i3 && !i4: return struct { Unwrapper http.ResponseWriter }{rw, rw} // combination 2/32 case !i0 && !i1 && !i2 && !i3 && i4: return struct { Unwrapper http.ResponseWriter http.Pusher }{rw, rw, rw} // combination 3/32 case !i0 && !i1 && !i2 && i3 && !i4: return struct { Unwrapper http.ResponseWriter io.ReaderFrom }{rw, rw, rw} // combination 4/32 case !i0 && !i1 && !i2 && i3 && i4: return struct { Unwrapper http.ResponseWriter io.ReaderFrom http.Pusher }{rw, rw, rw, rw} // combination 5/32 case !i0 && !i1 && i2 && !i3 && !i4: return struct { Unwrapper http.ResponseWriter http.Hijacker }{rw, rw, rw} // combination 6/32 case !i0 && !i1 && i2 && !i3 && i4: return struct { Unwrapper http.ResponseWriter http.Hijacker http.Pusher }{rw, rw, rw, rw} // combination 7/32 case !i0 && !i1 && i2 && i3 && !i4: return struct { Unwrapper http.ResponseWriter http.Hijacker io.ReaderFrom }{rw, rw, rw, rw} // combination 8/32 case !i0 && !i1 && i2 && i3 && i4: return struct { Unwrapper http.ResponseWriter http.Hijacker io.ReaderFrom http.Pusher }{rw, rw, rw, rw, rw} // combination 9/32 case !i0 && i1 && !i2 && !i3 && !i4: return struct { Unwrapper http.ResponseWriter http.CloseNotifier }{rw, rw, rw} // combination 10/32 case !i0 && i1 && !i2 && !i3 && i4: return struct { Unwrapper http.ResponseWriter http.CloseNotifier http.Pusher }{rw, rw, rw, rw} // combination 11/32 case !i0 && i1 && !i2 && i3 && !i4: return struct { Unwrapper http.ResponseWriter http.CloseNotifier io.ReaderFrom }{rw, rw, rw, rw} // combination 12/32 case !i0 && i1 && !i2 && i3 && i4: return struct { Unwrapper http.ResponseWriter http.CloseNotifier io.ReaderFrom http.Pusher }{rw, rw, rw, rw, rw} // combination 13/32 case !i0 && i1 && i2 && !i3 && !i4: return struct { Unwrapper http.ResponseWriter http.CloseNotifier http.Hijacker }{rw, rw, rw, rw} // combination 14/32 case !i0 && i1 && i2 && !i3 && i4: return struct { Unwrapper http.ResponseWriter http.CloseNotifier http.Hijacker http.Pusher }{rw, rw, rw, rw, rw} // combination 15/32 case !i0 && i1 && i2 && i3 && !i4: return struct { Unwrapper http.ResponseWriter http.CloseNotifier http.Hijacker io.ReaderFrom }{rw, rw, rw, rw, rw} // combination 16/32 case !i0 && i1 && i2 && i3 && i4: return struct { Unwrapper http.ResponseWriter http.CloseNotifier http.Hijacker io.ReaderFrom http.Pusher }{rw, rw, rw, rw, rw, rw} // combination 17/32 case i0 && !i1 && !i2 && !i3 && !i4: return struct { Unwrapper http.ResponseWriter http.Flusher }{rw, rw, rw} // combination 18/32 case i0 && !i1 && !i2 && !i3 && i4: return struct { Unwrapper http.ResponseWriter http.Flusher http.Pusher }{rw, rw, rw, rw} // combination 19/32 case i0 && !i1 && !i2 && i3 && !i4: return struct { Unwrapper http.ResponseWriter http.Flusher io.ReaderFrom }{rw, rw, rw, rw} // combination 20/32 case i0 && !i1 && !i2 && i3 && i4: return struct { Unwrapper http.ResponseWriter http.Flusher io.ReaderFrom http.Pusher }{rw, rw, rw, rw, rw} // combination 21/32 case i0 && !i1 && i2 && !i3 && !i4: return struct { Unwrapper http.ResponseWriter http.Flusher http.Hijacker }{rw, rw, rw, rw} // combination 22/32 case i0 && !i1 && i2 && !i3 && i4: return struct { Unwrapper http.ResponseWriter http.Flusher http.Hijacker http.Pusher }{rw, rw, rw, rw, rw} // combination 23/32 case i0 && !i1 && i2 && i3 && !i4: return struct { Unwrapper http.ResponseWriter http.Flusher http.Hijacker io.ReaderFrom }{rw, rw, rw, rw, rw} // combination 24/32 case i0 && !i1 && i2 && i3 && i4: return struct { Unwrapper http.ResponseWriter http.Flusher http.Hijacker io.ReaderFrom http.Pusher }{rw, rw, rw, rw, rw, rw} // combination 25/32 case i0 && i1 && !i2 && !i3 && !i4: return struct { Unwrapper http.ResponseWriter http.Flusher http.CloseNotifier }{rw, rw, rw, rw} // combination 26/32 case i0 && i1 && !i2 && !i3 && i4: return struct { Unwrapper http.ResponseWriter http.Flusher http.CloseNotifier http.Pusher }{rw, rw, rw, rw, rw} // combination 27/32 case i0 && i1 && !i2 && i3 && !i4: return struct { Unwrapper http.ResponseWriter http.Flusher http.CloseNotifier io.ReaderFrom }{rw, rw, rw, rw, rw} // combination 28/32 case i0 && i1 && !i2 && i3 && i4: return struct { Unwrapper http.ResponseWriter http.Flusher http.CloseNotifier io.ReaderFrom http.Pusher }{rw, rw, rw, rw, rw, rw} // combination 29/32 case i0 && i1 && i2 && !i3 && !i4: return struct { Unwrapper http.ResponseWriter http.Flusher http.CloseNotifier http.Hijacker }{rw, rw, rw, rw, rw} // combination 30/32 case i0 && i1 && i2 && !i3 && i4: return struct { Unwrapper http.ResponseWriter http.Flusher http.CloseNotifier http.Hijacker http.Pusher }{rw, rw, rw, rw, rw, rw} // combination 31/32 case i0 && i1 && i2 && i3 && !i4: return struct { Unwrapper http.ResponseWriter http.Flusher http.CloseNotifier http.Hijacker io.ReaderFrom }{rw, rw, rw, rw, rw, rw} // combination 32/32 case i0 && i1 && i2 && i3 && i4: return struct { Unwrapper http.ResponseWriter http.Flusher http.CloseNotifier http.Hijacker io.ReaderFrom http.Pusher }{rw, rw, rw, rw, rw, rw, rw} } panic("unreachable") } type rw struct { w http.ResponseWriter h Hooks } func (w *rw) Unwrap() http.ResponseWriter { return w.w } func (w *rw) Header() http.Header { f := w.w.(http.ResponseWriter).Header if w.h.Header != nil { f = w.h.Header(f) } return f() } func (w *rw) WriteHeader(code int) { f := w.w.(http.ResponseWriter).WriteHeader if w.h.WriteHeader != nil { f = w.h.WriteHeader(f) } f(code) } func (w *rw) Write(b []byte) (int, error) { f := w.w.(http.ResponseWriter).Write if w.h.Write != nil { f = w.h.Write(f) } return f(b) } func (w *rw) Flush() { f := w.w.(http.Flusher).Flush if w.h.Flush != nil { f = w.h.Flush(f) } f() } func (w *rw) CloseNotify() <-chan bool { f := w.w.(http.CloseNotifier).CloseNotify if w.h.CloseNotify != nil { f = w.h.CloseNotify(f) } return f() } func (w *rw) Hijack() (net.Conn, *bufio.ReadWriter, error) { f := w.w.(http.Hijacker).Hijack if w.h.Hijack != nil { f = w.h.Hijack(f) } return f() } func (w *rw) ReadFrom(src io.Reader) (int64, error) { f := w.w.(io.ReaderFrom).ReadFrom if w.h.ReadFrom != nil { f = w.h.ReadFrom(f) } return f(src) } func (w *rw) Push(target string, opts *http.PushOptions) error { f := w.w.(http.Pusher).Push if w.h.Push != nil { f = w.h.Push(f) } return f(target, opts) } type Unwrapper interface { Unwrap() http.ResponseWriter } // Unwrap returns the underlying http.ResponseWriter from within zero or more // layers of httpsnoop wrappers. func Unwrap(w http.ResponseWriter) http.ResponseWriter { if rw, ok := w.(Unwrapper); ok { // recurse until rw.Unwrap() returns a non-Unwrapper return Unwrap(rw.Unwrap()) } else { return w } } ================================================ FILE: vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go ================================================ // +build !go1.8 // Code generated by "httpsnoop/codegen"; DO NOT EDIT. package httpsnoop import ( "bufio" "io" "net" "net/http" ) // HeaderFunc is part of the http.ResponseWriter interface. type HeaderFunc func() http.Header // WriteHeaderFunc is part of the http.ResponseWriter interface. type WriteHeaderFunc func(code int) // WriteFunc is part of the http.ResponseWriter interface. type WriteFunc func(b []byte) (int, error) // FlushFunc is part of the http.Flusher interface. type FlushFunc func() // CloseNotifyFunc is part of the http.CloseNotifier interface. type CloseNotifyFunc func() <-chan bool // HijackFunc is part of the http.Hijacker interface. type HijackFunc func() (net.Conn, *bufio.ReadWriter, error) // ReadFromFunc is part of the io.ReaderFrom interface. type ReadFromFunc func(src io.Reader) (int64, error) // Hooks defines a set of method interceptors for methods included in // http.ResponseWriter as well as some others. You can think of them as // middleware for the function calls they target. See Wrap for more details. type Hooks struct { Header func(HeaderFunc) HeaderFunc WriteHeader func(WriteHeaderFunc) WriteHeaderFunc Write func(WriteFunc) WriteFunc Flush func(FlushFunc) FlushFunc CloseNotify func(CloseNotifyFunc) CloseNotifyFunc Hijack func(HijackFunc) HijackFunc ReadFrom func(ReadFromFunc) ReadFromFunc } // Wrap returns a wrapped version of w that provides the exact same interface // as w. Specifically if w implements any combination of: // // - http.Flusher // - http.CloseNotifier // - http.Hijacker // - io.ReaderFrom // // The wrapped version will implement the exact same combination. If no hooks // are set, the wrapped version also behaves exactly as w. Hooks targeting // methods not supported by w are ignored. Any other hooks will intercept the // method they target and may modify the call's arguments and/or return values. // The CaptureMetrics implementation serves as a working example for how the // hooks can be used. func Wrap(w http.ResponseWriter, hooks Hooks) http.ResponseWriter { rw := &rw{w: w, h: hooks} _, i0 := w.(http.Flusher) _, i1 := w.(http.CloseNotifier) _, i2 := w.(http.Hijacker) _, i3 := w.(io.ReaderFrom) switch { // combination 1/16 case !i0 && !i1 && !i2 && !i3: return struct { Unwrapper http.ResponseWriter }{rw, rw} // combination 2/16 case !i0 && !i1 && !i2 && i3: return struct { Unwrapper http.ResponseWriter io.ReaderFrom }{rw, rw, rw} // combination 3/16 case !i0 && !i1 && i2 && !i3: return struct { Unwrapper http.ResponseWriter http.Hijacker }{rw, rw, rw} // combination 4/16 case !i0 && !i1 && i2 && i3: return struct { Unwrapper http.ResponseWriter http.Hijacker io.ReaderFrom }{rw, rw, rw, rw} // combination 5/16 case !i0 && i1 && !i2 && !i3: return struct { Unwrapper http.ResponseWriter http.CloseNotifier }{rw, rw, rw} // combination 6/16 case !i0 && i1 && !i2 && i3: return struct { Unwrapper http.ResponseWriter http.CloseNotifier io.ReaderFrom }{rw, rw, rw, rw} // combination 7/16 case !i0 && i1 && i2 && !i3: return struct { Unwrapper http.ResponseWriter http.CloseNotifier http.Hijacker }{rw, rw, rw, rw} // combination 8/16 case !i0 && i1 && i2 && i3: return struct { Unwrapper http.ResponseWriter http.CloseNotifier http.Hijacker io.ReaderFrom }{rw, rw, rw, rw, rw} // combination 9/16 case i0 && !i1 && !i2 && !i3: return struct { Unwrapper http.ResponseWriter http.Flusher }{rw, rw, rw} // combination 10/16 case i0 && !i1 && !i2 && i3: return struct { Unwrapper http.ResponseWriter http.Flusher io.ReaderFrom }{rw, rw, rw, rw} // combination 11/16 case i0 && !i1 && i2 && !i3: return struct { Unwrapper http.ResponseWriter http.Flusher http.Hijacker }{rw, rw, rw, rw} // combination 12/16 case i0 && !i1 && i2 && i3: return struct { Unwrapper http.ResponseWriter http.Flusher http.Hijacker io.ReaderFrom }{rw, rw, rw, rw, rw} // combination 13/16 case i0 && i1 && !i2 && !i3: return struct { Unwrapper http.ResponseWriter http.Flusher http.CloseNotifier }{rw, rw, rw, rw} // combination 14/16 case i0 && i1 && !i2 && i3: return struct { Unwrapper http.ResponseWriter http.Flusher http.CloseNotifier io.ReaderFrom }{rw, rw, rw, rw, rw} // combination 15/16 case i0 && i1 && i2 && !i3: return struct { Unwrapper http.ResponseWriter http.Flusher http.CloseNotifier http.Hijacker }{rw, rw, rw, rw, rw} // combination 16/16 case i0 && i1 && i2 && i3: return struct { Unwrapper http.ResponseWriter http.Flusher http.CloseNotifier http.Hijacker io.ReaderFrom }{rw, rw, rw, rw, rw, rw} } panic("unreachable") } type rw struct { w http.ResponseWriter h Hooks } func (w *rw) Unwrap() http.ResponseWriter { return w.w } func (w *rw) Header() http.Header { f := w.w.(http.ResponseWriter).Header if w.h.Header != nil { f = w.h.Header(f) } return f() } func (w *rw) WriteHeader(code int) { f := w.w.(http.ResponseWriter).WriteHeader if w.h.WriteHeader != nil { f = w.h.WriteHeader(f) } f(code) } func (w *rw) Write(b []byte) (int, error) { f := w.w.(http.ResponseWriter).Write if w.h.Write != nil { f = w.h.Write(f) } return f(b) } func (w *rw) Flush() { f := w.w.(http.Flusher).Flush if w.h.Flush != nil { f = w.h.Flush(f) } f() } func (w *rw) CloseNotify() <-chan bool { f := w.w.(http.CloseNotifier).CloseNotify if w.h.CloseNotify != nil { f = w.h.CloseNotify(f) } return f() } func (w *rw) Hijack() (net.Conn, *bufio.ReadWriter, error) { f := w.w.(http.Hijacker).Hijack if w.h.Hijack != nil { f = w.h.Hijack(f) } return f() } func (w *rw) ReadFrom(src io.Reader) (int64, error) { f := w.w.(io.ReaderFrom).ReadFrom if w.h.ReadFrom != nil { f = w.h.ReadFrom(f) } return f(src) } type Unwrapper interface { Unwrap() http.ResponseWriter } // Unwrap returns the underlying http.ResponseWriter from within zero or more // layers of httpsnoop wrappers. func Unwrap(w http.ResponseWriter) http.ResponseWriter { if rw, ok := w.(Unwrapper); ok { // recurse until rw.Unwrap() returns a non-Unwrapper return Unwrap(rw.Unwrap()) } else { return w } } ================================================ FILE: vendor/github.com/fvbommel/sortorder/.gitignore ================================================ # 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 *.test *.prof ================================================ FILE: vendor/github.com/fvbommel/sortorder/LICENSE ================================================ The MIT License (MIT) Copyright (c) 2015 Frits van Bommel 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. ================================================ FILE: vendor/github.com/fvbommel/sortorder/README.md ================================================ # sortorder [![PkgGoDev](https://pkg.go.dev/badge/github.com/fvbommel/sortorder)](https://pkg.go.dev/github.com/fvbommel/sortorder) import "github.com/fvbommel/sortorder" Sort orders and comparison functions. Case-insensitive sort orders are in the `casefolded` sub-package because it pulls in the Unicode tables in the standard library, which can add significantly to the size of binaries. ================================================ FILE: vendor/github.com/fvbommel/sortorder/doc.go ================================================ // Package sortorder implements sort orders and comparison functions. // // Currently, it only implements so-called "natural order", where integers // embedded in strings are compared by value. package sortorder // import "github.com/fvbommel/sortorder" ================================================ FILE: vendor/github.com/fvbommel/sortorder/natsort.go ================================================ package sortorder // Natural implements sort.Interface to sort strings in natural order. This // means that e.g. "abc2" < "abc12". // // Non-digit sequences and numbers are compared separately. The former are // compared bytewise, while digits are compared numerically (except that // the number of leading zeros is used as a tie-breaker, so e.g. "2" < "02") // // Limitation: only ASCII digits (0-9) are considered. type Natural []string func (n Natural) Len() int { return len(n) } func (n Natural) Swap(i, j int) { n[i], n[j] = n[j], n[i] } func (n Natural) Less(i, j int) bool { return NaturalLess(n[i], n[j]) } func isDigit(b byte) bool { return '0' <= b && b <= '9' } // NaturalLess compares two strings using natural ordering. This means that e.g. // "abc2" < "abc12". // // Non-digit sequences and numbers are compared separately. The former are // compared bytewise, while digits are compared numerically (except that // the number of leading zeros is used as a tie-breaker, so e.g. "2" < "02") // // Limitation: only ASCII digits (0-9) are considered. func NaturalLess(str1, str2 string) bool { idx1, idx2 := 0, 0 for idx1 < len(str1) && idx2 < len(str2) { c1, c2 := str1[idx1], str2[idx2] dig1, dig2 := isDigit(c1), isDigit(c2) switch { case dig1 != dig2: // Digits before other characters. return dig1 // True if LHS is a digit, false if the RHS is one. case !dig1: // && !dig2, because dig1 == dig2 // UTF-8 compares bytewise-lexicographically, no need to decode // codepoints. if c1 != c2 { return c1 < c2 } idx1++ idx2++ default: // Digits // Eat zeros. for ; idx1 < len(str1) && str1[idx1] == '0'; idx1++ { } for ; idx2 < len(str2) && str2[idx2] == '0'; idx2++ { } // Eat all digits. nonZero1, nonZero2 := idx1, idx2 for ; idx1 < len(str1) && isDigit(str1[idx1]); idx1++ { } for ; idx2 < len(str2) && isDigit(str2[idx2]); idx2++ { } // If lengths of numbers with non-zero prefix differ, the shorter // one is less. if len1, len2 := idx1-nonZero1, idx2-nonZero2; len1 != len2 { return len1 < len2 } // If they're equally long, string comparison is correct. if nr1, nr2 := str1[nonZero1:idx1], str2[nonZero2:idx2]; nr1 != nr2 { return nr1 < nr2 } // Otherwise, the one with less zeros is less. // Because everything up to the number is equal, comparing the index // after the zeros is sufficient. if nonZero1 != nonZero2 { return nonZero1 < nonZero2 } } // They're identical so far, so continue comparing. } // So far they are identical. At least one is ended. If the other continues, // it sorts last. return len(str1) < len(str2) } ================================================ FILE: vendor/github.com/gdamore/encoding/.appveyor.yml ================================================ version: 1.0.{build} clone_folder: c:\gopath\src\github.com\gdamore\encoding environment: GOPATH: c:\gopath build_script: - go version - go env - SET PATH=%LOCALAPPDATA%\atom\bin;%GOPATH%\bin;%PATH% - go get -t ./... - go build - go install ./... test_script: - go test ./... ================================================ FILE: vendor/github.com/gdamore/encoding/CODE_OF_CONDUCT.md ================================================ # Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism * Focusing on what is best for the community * Showing empathy towards other community members Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at garrett@damore.org. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html [homepage]: https://www.contributor-covenant.org ================================================ FILE: vendor/github.com/gdamore/encoding/LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor 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, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/github.com/gdamore/encoding/README.md ================================================ ## encoding [![Linux](https://img.shields.io/github/actions/workflow/status/gdamore/encoding/linux.yml?branch=main&logoColor=grey&logo=linux&label=)](https://github.com/gdamore/encoding/actions/workflows/linux.yml) [![Windows](https://img.shields.io/github/actions/workflow/status/gdamore/encoding/windows.yml?branch=main&logoColor=grey&logo=windows&label=)](https://github.com/gdamore/encoding/actions/workflows/windows.yml) [![Apache License](https://img.shields.io/github/license/gdamore/encoding.svg?logoColor=silver&logo=opensourceinitiative&color=blue&label=)](https://github.com/gdamore/encoding/blob/master/LICENSE) [![Coverage](https://img.shields.io/codecov/c/github/gdamore/encoding?logoColor=grey&logo=codecov&label=)](https://codecov.io/gh/gdamore/encoding) [![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](https://godoc.org/github.com/gdamore/encoding) Package encoding provides a number of encodings that are missing from the standard Go [encoding]("https://godoc.org/golang.org/x/text/encoding") package. We hope that we can contribute these to the standard Go library someday. It turns out that some of these are useful for dealing with I/O streams coming from non-UTF friendly sources. The UTF8 Encoder is also useful for situations where valid UTF-8 might be carried in streams that contain non-valid UTF; in particular I use it for helping me cope with terminals that embed escape sequences in otherwise valid UTF-8. ================================================ FILE: vendor/github.com/gdamore/encoding/SECURITY.md ================================================ # Security Policy We take security very seriously in mangos, since you may be using it in Internet-facing applications. ## Reporting a Vulnerability To report a vulnerability, please contact us on our discord. You may also send an email to garrett@damore.org, or info@staysail.tech. We will keep the reporter updated on any status updates on a regular basis, and will respond within two business days for any reported security issue. ================================================ FILE: vendor/github.com/gdamore/encoding/ascii.go ================================================ // Copyright 2015 Garrett D'Amore // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package encoding import ( "golang.org/x/text/encoding" ) // ASCII represents the 7-bit US-ASCII scheme. It decodes directly to // UTF-8 without change, as all ASCII values are legal UTF-8. // Unicode values less than 128 (i.e. 7 bits) map 1:1 with ASCII. // It encodes runes outside of that to 0x1A, the ASCII substitution character. var ASCII encoding.Encoding func init() { amap := make(map[byte]rune) for i := 128; i <= 255; i++ { amap[byte(i)] = RuneError } cm := &Charmap{Map: amap} cm.Init() ASCII = cm } ================================================ FILE: vendor/github.com/gdamore/encoding/charmap.go ================================================ // Copyright 2024 Garrett D'Amore // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package encoding import ( "sync" "unicode/utf8" "golang.org/x/text/encoding" "golang.org/x/text/transform" ) const ( // RuneError is an alias for the UTF-8 replacement rune, '\uFFFD'. RuneError = '\uFFFD' // RuneSelf is the rune below which UTF-8 and the Unicode values are // identical. Its also the limit for ASCII. RuneSelf = 0x80 // ASCIISub is the ASCII substitution character. ASCIISub = '\x1a' ) // Charmap is a structure for setting up encodings for 8-bit character sets, // for transforming between UTF8 and that other character set. It has some // ideas borrowed from golang.org/x/text/encoding/charmap, but it uses a // different implementation. This implementation uses maps, and supports // user-defined maps. // // We do assume that a character map has a reasonable substitution character, // and that valid encodings are stable (exactly a 1:1 map) and stateless // (that is there is no shift character or anything like that.) Hence this // approach will not work for many East Asian character sets. // // Measurement shows little or no measurable difference in the performance of // the two approaches. The difference was down to a couple of nsec/op, and // no consistent pattern as to which ran faster. With the conversion to // UTF-8 the code takes about 25 nsec/op. The conversion in the reverse // direction takes about 100 nsec/op. (The larger cost for conversion // from UTF-8 is most likely due to the need to convert the UTF-8 byte stream // to a rune before conversion. type Charmap struct { transform.NopResetter bytes map[rune]byte runes [256][]byte once sync.Once // The map between bytes and runes. To indicate that a specific // byte value is invalid for a charcter set, use the rune // utf8.RuneError. Values that are absent from this map will // be assumed to have the identity mapping -- that is the default // is to assume ISO8859-1, where all 8-bit characters have the same // numeric value as their Unicode runes. (Not to be confused with // the UTF-8 values, which *will* be different for non-ASCII runes.) // // If no values less than RuneSelf are changed (or have non-identity // mappings), then the character set is assumed to be an ASCII // superset, and certain assumptions and optimizations become // available for ASCII bytes. Map map[byte]rune // The ReplacementChar is the byte value to use for substitution. // It should normally be ASCIISub for ASCII encodings. This may be // unset (left to zero) for mappings that are strictly ASCII supersets. // In that case ASCIISub will be assumed instead. ReplacementChar byte } type cmapDecoder struct { transform.NopResetter runes [256][]byte } type cmapEncoder struct { transform.NopResetter bytes map[rune]byte replace byte } // Init initializes internal values of a character map. This should // be done early, to minimize the cost of allocation of transforms // later. It is not strictly necessary however, as the allocation // functions will arrange to call it if it has not already been done. func (c *Charmap) Init() { c.once.Do(c.initialize) } func (c *Charmap) initialize() { c.bytes = make(map[rune]byte) ascii := true for i := 0; i < 256; i++ { r, ok := c.Map[byte(i)] if !ok { r = rune(i) } if r < 128 && r != rune(i) { ascii = false } if r != RuneError { c.bytes[r] = byte(i) } utf := make([]byte, utf8.RuneLen(r)) utf8.EncodeRune(utf, r) c.runes[i] = utf } if ascii && c.ReplacementChar == '\x00' { c.ReplacementChar = ASCIISub } } // NewDecoder returns a Decoder the converts from the 8-bit // character set to UTF-8. Unknown mappings, if any, are mapped // to '\uFFFD'. func (c *Charmap) NewDecoder() *encoding.Decoder { c.Init() return &encoding.Decoder{Transformer: &cmapDecoder{runes: c.runes}} } // NewEncoder returns a Transformer that converts from UTF8 to the // 8-bit character set. Unknown mappings are mapped to 0x1A. func (c *Charmap) NewEncoder() *encoding.Encoder { c.Init() return &encoding.Encoder{ Transformer: &cmapEncoder{ bytes: c.bytes, replace: c.ReplacementChar, }, } } func (d *cmapDecoder) Transform(dst, src []byte, atEOF bool) (int, int, error) { var e error var ndst, nsrc int for _, c := range src { b := d.runes[c] l := len(b) if ndst+l > len(dst) { e = transform.ErrShortDst break } for i := 0; i < l; i++ { dst[ndst] = b[i] ndst++ } nsrc++ } return ndst, nsrc, e } func (d *cmapEncoder) Transform(dst, src []byte, atEOF bool) (int, int, error) { var e error var ndst, nsrc int for nsrc < len(src) { if ndst >= len(dst) { e = transform.ErrShortDst break } r, sz := utf8.DecodeRune(src[nsrc:]) if r == utf8.RuneError && sz == 1 { // If its inconclusive due to insufficient data in // in the source, report it if atEOF && !utf8.FullRune(src[nsrc:]) { e = transform.ErrShortSrc break } } if c, ok := d.bytes[r]; ok { dst[ndst] = c } else { dst[ndst] = d.replace } nsrc += sz ndst++ } return ndst, nsrc, e } ================================================ FILE: vendor/github.com/gdamore/encoding/doc.go ================================================ // Copyright 2015 Garrett D'Amore // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // Package encoding provides a few of the encoding structures that are // missing from the Go x/text/encoding tree. package encoding ================================================ FILE: vendor/github.com/gdamore/encoding/ebcdic.go ================================================ // Copyright 2015 Garrett D'Amore // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package encoding import ( "golang.org/x/text/encoding" ) // EBCDIC represents the 8-bit EBCDIC scheme, found in some mainframe // environments. If you don't know what this is, consider yourself lucky. var EBCDIC encoding.Encoding func init() { cm := &Charmap{ ReplacementChar: '\x3f', Map: map[byte]rune{ // 0x00-0x03 match 0x04: RuneError, 0x05: '\t', 0x06: RuneError, 0x07: '\x7f', 0x08: RuneError, 0x09: RuneError, 0x0a: RuneError, // 0x0b-0x13 match 0x14: RuneError, 0x15: '\x85', // Not in any ISO code 0x16: '\x08', 0x17: RuneError, // 0x18-0x19 match 0x1a: RuneError, 0x1b: RuneError, // 0x1c-0x1f match 0x20: RuneError, 0x21: RuneError, 0x22: RuneError, 0x23: RuneError, 0x24: RuneError, 0x25: '\n', 0x26: '\x17', 0x27: '\x1b', 0x28: RuneError, 0x29: RuneError, 0x2a: RuneError, 0x2b: RuneError, 0x2c: RuneError, 0x2d: '\x05', 0x2e: '\x06', 0x2f: '\x07', 0x30: RuneError, 0x31: RuneError, 0x32: '\x16', 0x33: RuneError, 0x34: RuneError, 0x35: RuneError, 0x36: RuneError, 0x37: '\x04', 0x38: RuneError, 0x39: RuneError, 0x3a: RuneError, 0x3b: RuneError, 0x3c: '\x14', 0x3d: '\x15', 0x3e: RuneError, 0x3f: '\x1a', // also replacement char 0x40: ' ', 0x41: '\xa0', 0x42: RuneError, 0x43: RuneError, 0x44: RuneError, 0x45: RuneError, 0x46: RuneError, 0x47: RuneError, 0x48: RuneError, 0x49: RuneError, 0x4a: RuneError, 0x4b: '.', 0x4c: '<', 0x4d: '(', 0x4e: '+', 0x4f: '|', 0x50: '&', 0x51: RuneError, 0x52: RuneError, 0x53: RuneError, 0x54: RuneError, 0x55: RuneError, 0x56: RuneError, 0x57: RuneError, 0x58: RuneError, 0x59: RuneError, 0x5a: '!', 0x5b: '$', 0x5c: '*', 0x5d: ')', 0x5e: ';', 0x5f: '¬', 0x60: '-', 0x61: '/', 0x62: RuneError, 0x63: RuneError, 0x64: RuneError, 0x65: RuneError, 0x66: RuneError, 0x67: RuneError, 0x68: RuneError, 0x69: RuneError, 0x6a: '¦', 0x6b: ',', 0x6c: '%', 0x6d: '_', 0x6e: '>', 0x6f: '?', 0x70: RuneError, 0x71: RuneError, 0x72: RuneError, 0x73: RuneError, 0x74: RuneError, 0x75: RuneError, 0x76: RuneError, 0x77: RuneError, 0x78: RuneError, 0x79: '`', 0x7a: ':', 0x7b: '#', 0x7c: '@', 0x7d: '\'', 0x7e: '=', 0x7f: '"', 0x80: RuneError, 0x81: 'a', 0x82: 'b', 0x83: 'c', 0x84: 'd', 0x85: 'e', 0x86: 'f', 0x87: 'g', 0x88: 'h', 0x89: 'i', 0x8a: RuneError, 0x8b: RuneError, 0x8c: RuneError, 0x8d: RuneError, 0x8e: RuneError, 0x8f: '±', 0x90: RuneError, 0x91: 'j', 0x92: 'k', 0x93: 'l', 0x94: 'm', 0x95: 'n', 0x96: 'o', 0x97: 'p', 0x98: 'q', 0x99: 'r', 0x9a: RuneError, 0x9b: RuneError, 0x9c: RuneError, 0x9d: RuneError, 0x9e: RuneError, 0x9f: RuneError, 0xa0: RuneError, 0xa1: '~', 0xa2: 's', 0xa3: 't', 0xa4: 'u', 0xa5: 'v', 0xa6: 'w', 0xa7: 'x', 0xa8: 'y', 0xa9: 'z', 0xaa: RuneError, 0xab: RuneError, 0xac: RuneError, 0xad: RuneError, 0xae: RuneError, 0xaf: RuneError, 0xb0: '^', 0xb1: RuneError, 0xb2: RuneError, 0xb3: RuneError, 0xb4: RuneError, 0xb5: RuneError, 0xb6: RuneError, 0xb7: RuneError, 0xb8: RuneError, 0xb9: RuneError, 0xba: '[', 0xbb: ']', 0xbc: RuneError, 0xbd: RuneError, 0xbe: RuneError, 0xbf: RuneError, 0xc0: '{', 0xc1: 'A', 0xc2: 'B', 0xc3: 'C', 0xc4: 'D', 0xc5: 'E', 0xc6: 'F', 0xc7: 'G', 0xc8: 'H', 0xc9: 'I', 0xca: '\xad', // NB: soft hyphen 0xcb: RuneError, 0xcc: RuneError, 0xcd: RuneError, 0xce: RuneError, 0xcf: RuneError, 0xd0: '}', 0xd1: 'J', 0xd2: 'K', 0xd3: 'L', 0xd4: 'M', 0xd5: 'N', 0xd6: 'O', 0xd7: 'P', 0xd8: 'Q', 0xd9: 'R', 0xda: RuneError, 0xdb: RuneError, 0xdc: RuneError, 0xdd: RuneError, 0xde: RuneError, 0xdf: RuneError, 0xe0: '\\', 0xe1: '\u2007', // Non-breaking space 0xe2: 'S', 0xe3: 'T', 0xe4: 'U', 0xe5: 'V', 0xe6: 'W', 0xe7: 'X', 0xe8: 'Y', 0xe9: 'Z', 0xea: RuneError, 0xeb: RuneError, 0xec: RuneError, 0xed: RuneError, 0xee: RuneError, 0xef: RuneError, 0xf0: '0', 0xf1: '1', 0xf2: '2', 0xf3: '3', 0xf4: '4', 0xf5: '5', 0xf6: '6', 0xf7: '7', 0xf8: '8', 0xf9: '9', 0xfa: RuneError, 0xfb: RuneError, 0xfc: RuneError, 0xfd: RuneError, 0xfe: RuneError, 0xff: RuneError, }} cm.Init() EBCDIC = cm } ================================================ FILE: vendor/github.com/gdamore/encoding/latin1.go ================================================ // Copyright 2015 Garrett D'Amore // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package encoding import ( "golang.org/x/text/encoding" ) // ISO8859_1 represents the 8-bit ISO8859-1 scheme. It decodes directly to // UTF-8 without change, as all ISO8859-1 values are legal UTF-8. // Unicode values less than 256 (i.e. 8 bits) map 1:1 with 8859-1. // It encodes runes outside of that to 0x1A, the ASCII substitution character. var ISO8859_1 encoding.Encoding func init() { cm := &Charmap{} cm.Init() // 8859-1 is the 8-bit identity map for Unicode. ISO8859_1 = cm } ================================================ FILE: vendor/github.com/gdamore/encoding/latin5.go ================================================ // Copyright 2015 Garrett D'Amore // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package encoding import ( "golang.org/x/text/encoding" ) // ISO8859_9 represents the 8-bit ISO8859-9 scheme. var ISO8859_9 encoding.Encoding func init() { cm := &Charmap{Map: map[byte]rune{ 0xD0: 'Ğ', 0xDD: 'İ', 0xDE: 'Ş', 0xF0: 'ğ', 0xFD: 'ı', 0xFE: 'ş', }} cm.Init() ISO8859_9 = cm } ================================================ FILE: vendor/github.com/gdamore/encoding/utf8.go ================================================ // Copyright 2015 Garrett D'Amore // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package encoding import ( "golang.org/x/text/encoding" ) type validUtf8 struct{} // UTF8 is an encoding for UTF-8. All it does is verify that the UTF-8 // in is valid. The main reason for its existence is that it will detect // and report ErrSrcShort or ErrDstShort, whereas the Nop encoding just // passes every byte, blithely. var UTF8 encoding.Encoding = validUtf8{} func (validUtf8) NewDecoder() *encoding.Decoder { return &encoding.Decoder{Transformer: encoding.UTF8Validator} } func (validUtf8) NewEncoder() *encoding.Encoder { return &encoding.Encoder{Transformer: encoding.UTF8Validator} } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/.appveyor.yml ================================================ version: 1.0.{build} clone_folder: c:\gopath\src\github.com\gdamore\tcell environment: GOPATH: c:\gopath build_script: - go version - go env - SET PATH=%LOCALAPPDATA%\atom\bin;%GOPATH%\bin;%PATH% - go get -t ./... - go build - go install ./... test_script: - go test ./... ================================================ FILE: vendor/github.com/gdamore/tcell/v2/.gitignore ================================================ coverage.txt ================================================ FILE: vendor/github.com/gdamore/tcell/v2/.travis.yml ================================================ language: go go: - 1.15.x - master arch: - amd64 - ppc64le before_install: - go get -t -v ./... script: - go test -race -coverprofile=coverage.txt -covermode=atomic after_success: - bash <(curl -s https://codecov.io/bash) ================================================ FILE: vendor/github.com/gdamore/tcell/v2/AUTHORS ================================================ Garrett D'Amore Zachary Yedidia Junegunn Choi Staysail Systems, Inc. ================================================ FILE: vendor/github.com/gdamore/tcell/v2/CHANGESv2.md ================================================ ## Breaking Changes in _Tcell_ v2 A number of changes were made to _Tcell_ for version two, and some of these are breaking. ### Import Path The import path for tcell has changed to `github.com/gdamore/tcell/v2` to reflect a new major version. ### Style Is Not Numeric The type `Style` has changed to a structure, to allow us to add additional data such as flags for color setting, more attribute bits, and so forth. Applications that relied on this being a number will need to be updated to use the accessor methods. ### Mouse Event Changes The middle mouse button was reported as button 2 on Linux, but as button 3 on Windows, and the right mouse button was reported the reverse way. _Tcell_ now always reports the right mouse button as button 2, and the middle button as button 3. To help make this clearer, new symbols `ButtonPrimary`, `ButtonSecondary`, and `ButtonMiddle` are provided. (Note that which button is right vs. left may be impacted by user preferences. Usually the left button will be considered the Primary, and the right will be the Secondary.) Applications may need to adjust their handling of mouse buttons 2 and 3 accordingly. ### Terminals Removed A number of terminals have been removed. These are mostly ancient definitions unlikely to be used by anyone, such as `adm3a`. ### High Number Function Keys Historically terminfo reported function keys with modifiers set as a different function key altogether. For example, Shift-F1 was reported as F13 on XTerm. _Tcell_ now prefers to report these using the base key (such as F1) with modifiers added. This works on XTerm and VTE based emulators, but some emulators may not support this. The new behavior more closely aligns with behavior on Windows platforms. ## New Features in _Tcell_ v2 These features are not breaking, but are introduced in version 2. ### Improved Modifier Support For terminals that appear to behave like the venerable XTerm, _tcell_ automatically adds modifier reporting for ALT, CTRL, SHIFT, and META keys when the terminal reports them. ### Better Support for Palettes (Themes) When using a color by its name or palette entry, _Tcell_ now tries to use that palette entry as is; this should avoid some inconsistency and respect terminal themes correctly. When true fidelity to RGB values is needed, the new `TrueColor()` API can be used to create a direct color, which bypasses the palette altogether. ### Automatic TrueColor Detection For some terminals, if the `Tc` or `RGB` properties are present in terminfo, _Tcell_ will automatically assume the terminal supports 24-bit color. ### ColorReset A new color value, `ColorReset` can be used on the foreground or background to reset the color the default used by the terminal. ### tmux Support _Tcell_ now has improved support for tmux, when the `$TERM` variable is set to "tmux". ### Strikethrough Support _Tcell_ has support for strikethrough when the terminal supports it, using the new `StrikeThrough()` API. ### Bracketed Paste Support _Tcell_ provides the long requested capability to discriminate paste event by using the bracketed-paste capability present in some terminals. This is automatically available on terminals that support XTerm style mouse handling, but applications must opt-in to this by using the new `EnablePaste()` function. A new `EventPaste` type of event will be delivered when starting and finishing a paste operation. ================================================ FILE: vendor/github.com/gdamore/tcell/v2/LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor 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, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/github.com/gdamore/tcell/v2/README-wasm.md ================================================ # WASM for _Tcell_ You can build _Tcell_ project into a webpage by compiling it slightly differently. This will result in a _Tcell_ project you can embed into another html page, or use as a standalone page. ## Building your project WASM needs special build flags in order to work. You can build it by executing ```sh GOOS=js GOARCH=wasm go build -o yourfile.wasm ``` ## Additional files You also need 5 other files in the same directory as the wasm. Four (`tcell.html`, `tcell.js`, `termstyle.css`, and `beep.wav`) are provided in the `webfiles` directory. The last one, `wasm_exec.js`, can be copied from GOROOT into the current directory by executing ```sh cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" ./ ``` In `tcell.js`, you also need to change the constant ```js const wasmFilePath = "yourfile.wasm" ``` to the file you outputed to when building. ## Displaying your project ### Standalone You can see the project (with an white background around the terminal) by serving the directory. You can do this using any framework, including another golang project: ```golang // server.go package main import ( "log" "net/http" ) func main() { log.Fatal(http.ListenAndServe(":8080", http.FileServer(http.Dir("/path/to/dir/to/serve")), )) } ``` To see the webpage with this example, you can type in `localhost:8080/tcell.html` into your browser while `server.go` is running. ### Embedding It is recomended to use an iframe if you want to embed the app into a webpage: ```html ``` ## Other considerations ### Accessing files `io.Open(filename)` and other related functions for reading file systems do not work; use `http.Get(filename)` instead. ================================================ FILE: vendor/github.com/gdamore/tcell/v2/README.md ================================================ # Tcell _Tcell_ is a _Go_ package that provides a cell based view for text terminals, like _XTerm_. It was inspired by _termbox_, but includes many additional improvements. [![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://stand-with-ukraine.pp.ua) [![Linux](https://img.shields.io/github/actions/workflow/status/gdamore/tcell/linux.yml?branch=main&logoColor=grey&logo=linux&label=)](https://github.com/gdamore/tcell/actions/workflows/linux.yml) [![Windows](https://img.shields.io/github/actions/workflow/status/gdamore/tcell/windows.yml?branch=main&logoColor=grey&logo=windows&label=)](https://github.com/gdamore/tcell/actions/workflows/windows.yml) [![Apache License](https://img.shields.io/github/license/gdamore/tcell.svg?logoColor=silver&logo=opensourceinitiative&color=blue&label=)](https://github.com/gdamore/tcell/blob/master/LICENSE) [![Docs](https://img.shields.io/badge/godoc-reference-blue.svg?label=&logo=go)](https://pkg.go.dev/github.com/gdamore/tcell/v2) [![Discord](https://img.shields.io/discord/639503822733180969?label=&logo=discord)](https://discord.gg/urTTxDN) [![Coverage](https://img.shields.io/codecov/c/github/gdamore/tcell?logoColor=grey&logo=codecov&label=)](https://codecov.io/gh/gdamore/tcell) [![Go Report Card](https://goreportcard.com/badge/github.com/gdamore/tcell/v2)](https://goreportcard.com/report/github.com/gdamore/tcell/v2) Please see [here](UKRAINE.md) for an important message for the people of Russia. NOTE: This is version 2 of _Tcell_. There are breaking changes relative to version 1. Version 1.x remains available using the import `github.com/gdamore/tcell`. ## Tutorial A brief, and still somewhat rough, [tutorial](TUTORIAL.md) is available. ## Examples - [proxima5](https://github.com/gdamore/proxima5) - space shooter ([video](https://youtu.be/jNxKTCmY_bQ)) - [govisor](https://github.com/gdamore/govisor) - service management UI ([screenshot](http://2.bp.blogspot.com/--OsvnfzSNow/Vf7aqMw3zXI/AAAAAAAAARo/uOMtOvw4Sbg/s1600/Screen%2BShot%2B2015-09-20%2Bat%2B9.08.41%2BAM.png)) - mouse demo - included mouse test ([screenshot](http://2.bp.blogspot.com/-fWvW5opT0es/VhIdItdKqJI/AAAAAAAAATE/7Ojc0L1SpB0/s1600/Screen%2BShot%2B2015-10-04%2Bat%2B11.47.13%2BPM.png)) - [gomatrix](https://github.com/gdamore/gomatrix) - converted from Termbox - [micro](https://github.com/zyedidia/micro/) - lightweight text editor with syntax-highlighting and themes - [godu](https://github.com/viktomas/godu) - utility to discover large files/folders - [tview](https://github.com/rivo/tview/) - rich interactive widgets - [cview](https://code.rocketnine.space/tslocum/cview) - user interface toolkit (fork of _tview_) - [awsome gocui](https://github.com/awesome-gocui/gocui) - Go Console User Interface - [gomandelbrot](https://github.com/rgm3/gomandelbrot) - Mandelbrot! - [WTF](https://github.com/senorprogrammer/wtf) - personal information dashboard - [browsh](https://github.com/browsh-org/browsh) - modern web browser ([video](https://www.youtube.com/watch?v=HZq86XfBoRo)) - [go-life](https://github.com/sachaos/go-life) - Conway's Game of Life - [gowid](https://github.com/gcla/gowid) - compositional widgets for terminal UIs, inspired by _urwid_ - [termshark](https://termshark.io) - interface for _tshark_, inspired by Wireshark, built on _gowid_ - [go-tetris](https://github.com/MichaelS11/go-tetris) - Go Tetris with AI option - [fzf](https://github.com/junegunn/fzf) - command-line fuzzy finder - [ascii-fluid](https://github.com/esimov/ascii-fluid) - fluid simulation controlled by webcam - [cbind](https://code.rocketnine.space/tslocum/cbind) - key event encoding, decoding and handling - [tpong](https://github.com/spinzed/tpong) - old-school Pong - [aerc](https://git.sr.ht/~sircmpwn/aerc) - email client - [tblogs](https://github.com/ezeoleaf/tblogs) - development blogs reader - [spinc](https://github.com/lallassu/spinc) - _irssi_ inspired chat application for Cisco Spark/WebEx - [gorss](https://github.com/lallassu/gorss) - RSS/Atom feed reader - [memoryalike](https://github.com/Bios-Marcel/memoryalike) - memorization game - [lf](https://github.com/gokcehan/lf) - file manager - [goful](https://github.com/anmitsu/goful) - CUI file manager - [gokeybr](https://github.com/bunyk/gokeybr) - deliberately practice your typing - [gonano](https://github.com/jbaramidze/gonano) - editor, mimics _nano_ - [uchess](https://github.com/tmountain/uchess) - UCI chess client - [min](https://github.com/a-h/min) - Gemini browser - [ov](https://github.com/noborus/ov) - file pager - [tmux-wormhole](https://github.com/gcla/tmux-wormhole) - _tmux_ plugin to transfer files - [gruid-tcell](https://github.com/anaseto/gruid-tcell) - driver for the grid based UI and game framework - [aretext](https://github.com/aretext/aretext) - minimalist text editor with _vim_ key bindings - [sync](https://github.com/kyprifog/sync) - GitHub repo synchronization tool - [statusbar](https://github.com/kyprifog/statusbar) - statusbar motivation tool for tracking periodic tasks/goals - [todo](https://github.com/kyprifog/todo) - simple todo app - [gosnakego](https://github.com/liweiyi88/gosnakego) - a snake game - [gbb](https://github.com/sdemingo/gbb) - A classical bulletin board app for tildes or public unix servers - [lil](https://github.com/andrievsky/lil) - A simple and flexible interface for any service by implementing only list and get operations - [hero.go](https://github.com/barisbll/hero.go) - 2d monster shooter ([video](https://user-images.githubusercontent.com/40062673/277157369-240d7606-b471-4aa1-8c54-4379a513122b.mp4)) ## Pure Go Terminfo Database _Tcell_ includes a full parser and expander for terminfo capability strings, so that it can avoid hard coding escape strings for formatting. It also favors portability, and includes support for all POSIX systems. The database is also flexible & extensible, and can be modified by either running a program to build the entire database, or an entry for just a single terminal. ## More Portable _Tcell_ is portable to a wide variety of systems, and is pure Go, without any need for CGO. _Tcell_ is believed to work with mainstream systems officially supported by golang. ## No Async IO _Tcell_ is able to operate without requiring `SIGIO` signals (unlike _termbox_), or asynchronous I/O, and can instead use standard Go file objects and Go routines. This means it should be safe, especially for use with programs that use exec, or otherwise need to manipulate the tty streams. This model is also much closer to idiomatic Go, leading to fewer surprises. ## Rich Unicode & non-Unicode support _Tcell_ includes enhanced support for Unicode, including wide characters and combining characters, provided your terminal can support them. Note that Windows terminals generally don't support the full Unicode repertoire. It will also convert to and from Unicode locales, so that the program can work with UTF-8 internally, and get reasonable output in other locales. _Tcell_ tries hard to convert to native characters on both input and output. On output _Tcell_ even makes use of the alternate character set to facilitate drawing certain characters. ## More Function Keys _Tcell_ also has richer support for a larger number of special keys that some terminals can send. ## Better Color Handling _Tcell_ will respect your terminal's color space as specified within your terminfo entries. For example attempts to emit color sequences on VT100 terminals won't result in unintended consequences. In legacy Windows mode, _Tcell_ supports 16 colors, bold, dim, and reverse, instead of just termbox's 8 colors with reverse. (Note that there is some conflation with bold/dim and colors.) Modern Windows 10 can benefit from much richer colors however. _Tcell_ maps 16 colors down to 8, for terminals that need it. (The upper 8 colors are just brighter versions of the lower 8.) ## Better Mouse Support _Tcell_ supports enhanced mouse tracking mode, so your application can receive regular mouse motion events, and wheel events, if your terminal supports it. (Note: The Windows 10 Terminal application suffers from a flaw in this regard, and does not support mouse interaction. The stock Windows 10 console host fired up with cmd.exe or PowerShell works fine however.) ## _Termbox_ Compatibility A compatibility layer for _termbox_ is provided in the `compat` directory. To use it, try importing `github.com/gdamore/tcell/termbox` instead. Most _termbox-go_ programs will probably work without further modification. ## Working With Unicode Internally _Tcell_ uses UTF-8, just like Go. However, _Tcell_ understands how to convert to and from other character sets, using the capabilities of the `golang.org/x/text/encoding packages`. Your application must supply them, as the full set of the most common ones bloats the program by about 2 MB. If you're lazy, and want them all anyway, see the `encoding` sub-directory. ## Wide & Combining Characters The `SetContent()` API takes a primary rune, and an optional list of combining runes. If any of the runes is a wide (East Asian) rune occupying two cells, then the library will skip output from the following cell. Care must be taken in the application to avoid explicitly attempting to set content in the next cell, otherwise the results are undefined. (Normally the wide character is displayed, and the other character is not; do not depend on that behavior.) Older terminal applications (especially on systems like Windows 8) lack support for advanced Unicode, and thus may not fare well. ## Colors _Tcell_ assumes the ANSI/XTerm color model, including the 256 color map that XTerm uses when it supports 256 colors. The terminfo guidance will be honored, with respect to the number of colors supported. Also, only terminals which expose ANSI style `setaf` and `setab` will support color; if you have a color terminal that only has `setf` and `setb`, please submit a ticket. ## 24-bit Color _Tcell_ _supports 24-bit color!_ (That is, if your terminal can support it.) NOTE: Technically the approach of using 24-bit RGB values for color is more accurately described as "direct color", but most people use the term "true color". We follow the (inaccurate) common convention. There are a few ways you can enable (or disable) true color. - For many terminals, we can detect it automatically if your terminal includes the `RGB` or `Tc` capabilities (or rather it did when the database was updated.) - You can force this one by setting the `COLORTERM` environment variable to `24-bit`, `truecolor` or `24bit`. This is the same method used by most other terminal applications that support 24-bit color. - If you set your `TERM` environment variable to a value with the suffix `-truecolor` then 24-bit color compatible with XTerm and ECMA-48 will be assumed. (This feature is deprecated. It is recommended to use one of other methods listed above.) - You can disable 24-bit color by setting `TCELL_TRUECOLOR=disable` in your environment. When using TrueColor, programs will display the colors that the programmer intended, overriding any "`themes`" you may have set in your terminal emulator. (For some cases, accurate color fidelity is more important than respecting themes. For other cases, such as typical text apps that only use a few colors, its more desirable to respect the themes that the user has established.) ## Performance Reasonable attempts have been made to minimize sending data to terminals, avoiding repeated sequences or drawing the same cell on refresh updates. ## Terminfo (Not relevant for Windows users.) The Terminfo implementation operates with a built-in database. This should satisfy most users. However, it can also (on systems with ncurses installed), dynamically parse the output from `infocmp` for terminals it does not already know about. See the `terminfo/` directory for more information about generating new entries for the built-in database. _Tcell_ requires that the terminal support the `cup` mode of cursor addressing. Ancient terminals without the ability to position the cursor directly are not supported. This is unlikely to be a problem; such terminals have not been mass-produced since the early 1970s. ## Mouse Support Mouse support is detected via the `kmous` terminfo variable, however, enablement/disablement and decoding mouse events is done using hard coded sequences based on the XTerm X11 model. All popular terminals with mouse tracking support this model. (Full terminfo support is not possible as terminfo sequences are not defined.) On Windows, the mouse works normally. Mouse wheel buttons on various terminals are known to work, but the support in terminal emulators, as well as support for various buttons and live mouse tracking, varies widely. Modern _xterm_, macOS _Terminal_, and _iTerm_ all work well. ## Bracketed Paste Terminals that appear to support the XTerm mouse model also can support bracketed paste, for applications that opt-in. See `EnablePaste()` for details. ## Testability There is a `SimulationScreen`, that can be used to simulate a real screen for automated testing. The supplied tests do this. The simulation contains event delivery, screen resizing support, and capabilities to inject events and examine "`physical`" screen contents. ## Platforms ### POSIX (Linux, FreeBSD, macOS, Solaris, etc.) Everything works using pure Go on mainstream platforms. Some more esoteric platforms (e.g., AIX) may need to be added. Pull requests are welcome! ### Windows Windows console mode applications are supported. Modern console applications like ConEmu and the Windows 10 terminal, support all the good features (resize, mouse tracking, etc.) ### WASM WASM is supported, but needs additional setup detailed in [README-wasm](README-wasm.md). ### Plan9 and others These platforms won't work, but compilation stubs are supplied for folks that want to include parts of this in software for those platforms. The Simulation screen works, but as _Tcell_ doesn't know how to allocate a real screen object on those platforms, `NewScreen()` will fail. If anyone has wisdom about how to improve support for these, please let me know. PRs are especially welcome. ### Commercial Support _Tcell_ is absolutely free, but if you want to obtain commercial, professional support, there are options. - [TideLift](https://tidelift.com/) subscriptions include support for _Tcell_, as well as many other open source packages. - [Staysail Systems Inc.](mailto:info@staysail.tech) offers direct support, and custom development around _Tcell_ on an hourly basis. ================================================ FILE: vendor/github.com/gdamore/tcell/v2/SECURITY.md ================================================ # SECURITY It's somewhat unlikely that tcell is in a security sensitive path, but we do take security seriously. ## Vulnerabilityu Response If you report a vulnerability, we will respond within 2 business days. ## Report a Vulnerability If you wish to report a vulnerability found in tcell, simply send a message to garrett@damore.org. You may also reach us on our discord channel - https://discord.gg/urTTxDN - a private message to `gdamore` on that channel may be submitted instead of mail. ================================================ FILE: vendor/github.com/gdamore/tcell/v2/TUTORIAL.md ================================================ # _Tcell_ Tutorial _Tcell_ provides a low-level, portable API for building terminal-based programs. A [terminal emulator](https://en.wikipedia.org/wiki/Terminal_emulator) (or a real terminal such as a DEC VT-220) is used to interact with such a program. _Tcell_'s interface is fairly low-level. While it provides a reasonably portable way of dealing with all the usual terminal features, it may be easier to utilize a higher level framework. A number of such frameworks are listed on the _Tcell_ main [README](README.md). This tutorial provides the details of _Tcell_, and is appropriate for developers wishing to create their own application frameworks or needing more direct access to the terminal capabilities. ## Resize events Applications receive an event of type `EventResize` when they are first initialized and each time the terminal is resized. The new size is available as `Size`. ```go switch ev := ev.(type) { case *tcell.EventResize: w, h := ev.Size() logMessage(fmt.Sprintf("Resized to %dx%d", w, h)) } ``` ## Key events When a key is pressed, applications receive an event of type `EventKey`. This event describes the modifier keys pressed (if any) and the pressed key or rune. When a rune key is pressed, an event with its `Key` set to `KeyRune` is dispatched. When a non-rune key is pressed, it is available as the `Key` of the event. ```go switch ev := ev.(type) { case *tcell.EventKey: mod, key, ch := ev.Mod(), ev.Key(), ev.Rune() logMessage(fmt.Sprintf("EventKey Modifiers: %d Key: %d Rune: %d", mod, key, ch)) } ``` ### Key event restrictions Terminal-based programs have less visibility into keyboard activity than graphical applications. When a key is pressed and held, additional key press events are sent by the terminal emulator. The rate of these repeated events depends on the emulator's configuration. Key release events are not available. It is not possible to distinguish runes typed while holding shift and runes typed using caps lock. Capital letters are reported without the Shift modifier. ## Mouse events Applications receive an event of type `EventMouse` when the mouse moves, or a mouse button is pressed or released. Mouse events are only delivered if `EnableMouse` has been called. The mouse buttons being pressed (if any) are available as `Buttons`, and the position of the mouse is available as `Position`. ```go switch ev := ev.(type) { case *tcell.EventMouse: mod := ev.Modifiers() btns := ev.Buttons() x, y := ev.Position() logMessage(fmt.Sprintf("EventMouse Modifiers: %d Buttons: %d Position: %d,%d", mod, btns, x, y)) } ``` ### Mouse buttons Identifier | Alias | Description -----------|-----------------|----------- Button1 | ButtonPrimary | Left button Button2 | ButtonSecondary | Right button Button3 | ButtonMiddle | Middle button Button4 | | Side button (thumb/next) Button5 | | Side button (thumb/prev) WheelUp | | Scroll wheel up WheelDown | | Scroll wheel down WheelLeft | | Horizontal wheel left WheelRight | | Horizontal wheel right ## Usage To create a _Tcell_ application, first initialize a screen to hold it. ```go s, err := tcell.NewScreen() if err != nil { log.Fatalf("%+v", err) } if err := s.Init(); err != nil { log.Fatalf("%+v", err) } // Set default text style defStyle := tcell.StyleDefault.Background(tcell.ColorReset).Foreground(tcell.ColorReset) s.SetStyle(defStyle) // Clear screen s.Clear() ``` Text may be drawn on the screen using `SetContent`. ```go s.SetContent(0, 0, 'H', nil, defStyle) s.SetContent(1, 0, 'i', nil, defStyle) s.SetContent(2, 0, '!', nil, defStyle) ``` To draw text more easily, define a render function. ```go func drawText(s tcell.Screen, x1, y1, x2, y2 int, style tcell.Style, text string) { row := y1 col := x1 for _, r := range []rune(text) { s.SetContent(col, row, r, nil, style) col++ if col >= x2 { row++ col = x1 } if row > y2 { break } } } ``` Lastly, define an event loop to handle user input and update application state. ```go quit := func() { s.Fini() os.Exit(0) } for { // Update screen s.Show() // Poll event ev := s.PollEvent() // Process event switch ev := ev.(type) { case *tcell.EventResize: s.Sync() case *tcell.EventKey: if ev.Key() == tcell.KeyEscape || ev.Key() == tcell.KeyCtrlC { quit() } } } ``` ## Demo application The following demonstrates how to initialize a screen, draw text/graphics and handle user input. ```go package main import ( "fmt" "log" "github.com/gdamore/tcell/v2" ) func drawText(s tcell.Screen, x1, y1, x2, y2 int, style tcell.Style, text string) { row := y1 col := x1 for _, r := range []rune(text) { s.SetContent(col, row, r, nil, style) col++ if col >= x2 { row++ col = x1 } if row > y2 { break } } } func drawBox(s tcell.Screen, x1, y1, x2, y2 int, style tcell.Style, text string) { if y2 < y1 { y1, y2 = y2, y1 } if x2 < x1 { x1, x2 = x2, x1 } // Fill background for row := y1; row <= y2; row++ { for col := x1; col <= x2; col++ { s.SetContent(col, row, ' ', nil, style) } } // Draw borders for col := x1; col <= x2; col++ { s.SetContent(col, y1, tcell.RuneHLine, nil, style) s.SetContent(col, y2, tcell.RuneHLine, nil, style) } for row := y1 + 1; row < y2; row++ { s.SetContent(x1, row, tcell.RuneVLine, nil, style) s.SetContent(x2, row, tcell.RuneVLine, nil, style) } // Only draw corners if necessary if y1 != y2 && x1 != x2 { s.SetContent(x1, y1, tcell.RuneULCorner, nil, style) s.SetContent(x2, y1, tcell.RuneURCorner, nil, style) s.SetContent(x1, y2, tcell.RuneLLCorner, nil, style) s.SetContent(x2, y2, tcell.RuneLRCorner, nil, style) } drawText(s, x1+1, y1+1, x2-1, y2-1, style, text) } func main() { defStyle := tcell.StyleDefault.Background(tcell.ColorReset).Foreground(tcell.ColorReset) boxStyle := tcell.StyleDefault.Foreground(tcell.ColorWhite).Background(tcell.ColorPurple) // Initialize screen s, err := tcell.NewScreen() if err != nil { log.Fatalf("%+v", err) } if err := s.Init(); err != nil { log.Fatalf("%+v", err) } s.SetStyle(defStyle) s.EnableMouse() s.EnablePaste() s.Clear() // Draw initial boxes drawBox(s, 1, 1, 42, 7, boxStyle, "Click and drag to draw a box") drawBox(s, 5, 9, 32, 14, boxStyle, "Press C to reset") quit := func() { // You have to catch panics in a defer, clean up, and // re-raise them - otherwise your application can // die without leaving any diagnostic trace. maybePanic := recover() s.Fini() if maybePanic != nil { panic(maybePanic) } } defer quit() // Here's how to get the screen size when you need it. // xmax, ymax := s.Size() // Here's an example of how to inject a keystroke where it will // be picked up by the next PollEvent call. Note that the // queue is LIFO, it has a limited length, and PostEvent() can // return an error. // s.PostEvent(tcell.NewEventKey(tcell.KeyRune, rune('a'), 0)) // Event loop ox, oy := -1, -1 for { // Update screen s.Show() // Poll event ev := s.PollEvent() // Process event switch ev := ev.(type) { case *tcell.EventResize: s.Sync() case *tcell.EventKey: if ev.Key() == tcell.KeyEscape || ev.Key() == tcell.KeyCtrlC { return } else if ev.Key() == tcell.KeyCtrlL { s.Sync() } else if ev.Rune() == 'C' || ev.Rune() == 'c' { s.Clear() } case *tcell.EventMouse: x, y := ev.Position() switch ev.Buttons() { case tcell.Button1, tcell.Button2: if ox < 0 { ox, oy = x, y // record location when click started } case tcell.ButtonNone: if ox >= 0 { label := fmt.Sprintf("%d,%d to %d,%d", ox, oy, x, y) drawBox(s, ox, oy, x, y, boxStyle, label) ox, oy = -1, -1 } } } } } ``` ================================================ FILE: vendor/github.com/gdamore/tcell/v2/UKRAINE.md ================================================ # Ukraine, Russia, and a World Tragedy ## A message to those inside Russia ### Written March 4, 2022. It is with a very heavy heart that I write this. I am normally opposed to the use of open source projects to communicate political positions or advocate for things outside the immediate relevancy to that project. However, the events occurring in Ukraine, and specifically the unprecedented invasion of Ukraine by Russian forces operating under orders from Russian President Vladimir Putin compel me to speak out. Those who know me, know that I have family, friends, and colleagues in Russia, and Ukraine both. My closest friends have historically been Russian friends my wife's hometown of Chelyabinsk. I myself have in the past frequently traveled to Russia, and indeed operated a software development firm with offices in St. Petersburg. I had a special kinship with Russia and its people. I say "had", because I fear that the actions of Putin, and the massive disinformation campaign that his regime has waged inside Russia, mean that it's likely that I won't see those friends again. At present, I'm not sure my wife will see her own mother again. We no longer feel it's safe for either of us to return Russia given actions taken by the regime to crack down on those who express disagreement. Russian citizens are being led to believe it is acting purely defensively, and that only legitimate military targets are being targeted, and that all the information we have received in the West are fakes. I am confident that nothing could be further from the truth. This has caused many in Russia, including people whom I respect and believe to be smarter than this, to stand by Putin, and endorse his actions. The claim is that the entirety of NATO is operating at the behest of the USA, and that the entirety of Europe was poised to attack Russia. While this is clearly absurd to those of us with any understanding of western politics, Russian citizens are being fed this lie, and believing it. If you're reading this from inside Russia -- YOU are the person that I hope this message reaches. Your government is LYING to you. Of course, all governments lie all the time. But consider this. Almost the entire world has condemned the invasion of Ukraine as criminal, and has applied sanctions. Even countries which have poor relations with the US sanctioning Russia, as well as nations which historically have remained neutral. (Famously neutral -- even during World War II, Switzerland has acted to apply sanctions in concert with the rest of the world.) Ask yourself, why does Putin fear a free press so much, if what he says is true? Why the crack-downs on children expressing only a desire for peace with Ukraine? Why would the entire world unified against him, if Putin was in the right? Why would the only countries that stood with Russia against the UN resolution to condemn these acts as crimes be Belarus, North Korea, and Syria? Even countries normally allied to Russia could not bring themselves to do more than abstain from the vote to condemn it. To be clear, I do not claim that the actions taken by the West or by the Ukrainian government were completely blameless. On the contrary, I understand that Western media is biased, and the truth is rarely exactly as reported. I believe that there is a kernel of truth in the claims of fascists and ultra-nationalist militias operating in Ukraine and specifically Donbas. However, I am also equally certain that Putin's response is out of proportion, and that concerns about such militias are principally just a pretext to justify an invasion. Europe is at war, unlike we've seen in my lifetime. The world is more divided, and closer to nuclear holocaust than it has been since the Cold War. And that is 100% the fault of Putin. While Putin remains in power, there cannot really be any way for Russian international relations to return to normal. Putin has set your country on a path to return to the Cold War, likely because he fancies himself to be a new Stalin. However, unlike the Soviet Union, the Russian economy does not have the wherewithal to stand on its own, and the invasion of Ukraine has fully ensured that Russia will not find any friends anywhere else in Europe, and probably few places in Asia. The *only* paths forward for Russia are either a Russia without Putin (and those who would support his agenda), or a complete breakdown of Russian prosperity, likely followed by the increasing international conflict that will be the natural escalation from a country that is isolated and impoverished. Those of us observing from the West are gravely concerned, because we cannot see any end to this madness that does not result in nuclear conflict, unless from within. In the meantime, the worst prices will be paid for by innocents in Ukraine, and by young Russian mean forced to carry out the orders of Putin's corrupt regime. And *that* is why I write this -- to appeal to those within Russia to open your eyes, and think with your minds. It is right and proper to be proud of your country and its rich heritage. But it is also right and proper to look for ways to save it from the ruinous path that its current leadership has set it upon, and to recognize when that leadership is no longer acting in interest of the country or its people. - Garrett D'Amore, March 4, 2022 ================================================ FILE: vendor/github.com/gdamore/tcell/v2/attr.go ================================================ // Copyright 2020 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell // AttrMask represents a mask of text attributes, apart from color. // Note that support for attributes may vary widely across terminals. type AttrMask int // Attributes are not colors, but affect the display of text. They can // be combined. const ( AttrBold AttrMask = 1 << iota AttrBlink AttrReverse AttrUnderline AttrDim AttrItalic AttrStrikeThrough AttrInvalid // Mark the style or attributes invalid AttrNone AttrMask = 0 // Just normal text. ) ================================================ FILE: vendor/github.com/gdamore/tcell/v2/cell.go ================================================ // Copyright 2024 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell import ( "os" "reflect" runewidth "github.com/mattn/go-runewidth" ) type cell struct { currMain rune currComb []rune currStyle Style lastMain rune lastStyle Style lastComb []rune width int lock bool } // CellBuffer represents a two-dimensional array of character cells. // This is primarily intended for use by Screen implementors; it // contains much of the common code they need. To create one, just // declare a variable of its type; no explicit initialization is necessary. // // CellBuffer is not thread safe. type CellBuffer struct { w int h int cells []cell } // SetContent sets the contents (primary rune, combining runes, // and style) for a cell at a given location. If the background or // foreground of the style is set to ColorNone, then the respective // color is left un changed. func (cb *CellBuffer) SetContent(x int, y int, mainc rune, combc []rune, style Style, ) { if x >= 0 && y >= 0 && x < cb.w && y < cb.h { c := &cb.cells[(y*cb.w)+x] // Wide characters: we want to mark the "wide" cells // dirty as well as the base cell, to make sure we consider // both cells as dirty together. We only need to do this // if we're changing content if (c.width > 0) && (mainc != c.currMain || !reflect.DeepEqual(combc, c.currComb)) { for i := 0; i < c.width; i++ { cb.SetDirty(x+i, y, true) } } c.currComb = append([]rune{}, combc...) if c.currMain != mainc { c.width = runewidth.RuneWidth(mainc) } c.currMain = mainc if style.fg == ColorNone { style.fg = c.currStyle.fg } if style.bg == ColorNone { style.bg = c.currStyle.bg } c.currStyle = style } } // GetContent returns the contents of a character cell, including the // primary rune, any combining character runes (which will usually be // nil), the style, and the display width in cells. (The width can be // either 1, normally, or 2 for East Asian full-width characters.) func (cb *CellBuffer) GetContent(x, y int) (rune, []rune, Style, int) { var mainc rune var combc []rune var style Style var width int if x >= 0 && y >= 0 && x < cb.w && y < cb.h { c := &cb.cells[(y*cb.w)+x] mainc, combc, style = c.currMain, c.currComb, c.currStyle if width = c.width; width == 0 || mainc < ' ' { width = 1 mainc = ' ' } } return mainc, combc, style, width } // Size returns the (width, height) in cells of the buffer. func (cb *CellBuffer) Size() (int, int) { return cb.w, cb.h } // Invalidate marks all characters within the buffer as dirty. func (cb *CellBuffer) Invalidate() { for i := range cb.cells { cb.cells[i].lastMain = rune(0) } } // Dirty checks if a character at the given location needs to be // refreshed on the physical display. This returns true if the cell // content is different since the last time it was marked clean. func (cb *CellBuffer) Dirty(x, y int) bool { if x >= 0 && y >= 0 && x < cb.w && y < cb.h { c := &cb.cells[(y*cb.w)+x] if c.lock { return false } if c.lastMain == rune(0) { return true } if c.lastMain != c.currMain { return true } if c.lastStyle != c.currStyle { return true } if len(c.lastComb) != len(c.currComb) { return true } for i := range c.lastComb { if c.lastComb[i] != c.currComb[i] { return true } } } return false } // SetDirty is normally used to indicate that a cell has // been displayed (in which case dirty is false), or to manually // force a cell to be marked dirty. func (cb *CellBuffer) SetDirty(x, y int, dirty bool) { if x >= 0 && y >= 0 && x < cb.w && y < cb.h { c := &cb.cells[(y*cb.w)+x] if dirty { c.lastMain = rune(0) } else { if c.currMain == rune(0) { c.currMain = ' ' } c.lastMain = c.currMain c.lastComb = c.currComb c.lastStyle = c.currStyle } } } // LockCell locks a cell from being drawn, effectively marking it "clean" until // the lock is removed. This can be used to prevent tcell from drawing a given // cell, even if the underlying content has changed. For example, when drawing a // sixel graphic directly to a TTY screen an implementer must lock the region // underneath the graphic to prevent tcell from drawing on top of the graphic. func (cb *CellBuffer) LockCell(x, y int) { if x < 0 || y < 0 { return } if x >= cb.w || y >= cb.h { return } c := &cb.cells[(y*cb.w)+x] c.lock = true } // UnlockCell removes a lock from the cell and marks it as dirty func (cb *CellBuffer) UnlockCell(x, y int) { if x < 0 || y < 0 { return } if x >= cb.w || y >= cb.h { return } c := &cb.cells[(y*cb.w)+x] c.lock = false cb.SetDirty(x, y, true) } // Resize is used to resize the cells array, with different dimensions, // while preserving the original contents. The cells will be invalidated // so that they can be redrawn. func (cb *CellBuffer) Resize(w, h int) { if cb.h == h && cb.w == w { return } newc := make([]cell, w*h) for y := 0; y < h && y < cb.h; y++ { for x := 0; x < w && x < cb.w; x++ { oc := &cb.cells[(y*cb.w)+x] nc := &newc[(y*w)+x] nc.currMain = oc.currMain nc.currComb = oc.currComb nc.currStyle = oc.currStyle nc.width = oc.width nc.lastMain = rune(0) } } cb.cells = newc cb.h = h cb.w = w } // Fill fills the entire cell buffer array with the specified character // and style. Normally choose ' ' to clear the screen. This API doesn't // support combining characters, or characters with a width larger than one. // If either the foreground or background are ColorNone, then the respective // color is unchanged. func (cb *CellBuffer) Fill(r rune, style Style) { for i := range cb.cells { c := &cb.cells[i] c.currMain = r c.currComb = nil cs := style if cs.fg == ColorNone { cs.fg = c.currStyle.fg } if cs.bg == ColorNone { cs.bg = c.currStyle.bg } c.currStyle = cs c.width = 1 } } var runeConfig *runewidth.Condition func init() { // The defaults for the runewidth package are poorly chosen for terminal // applications. We however will honor the setting in the environment if // it is set. if os.Getenv("RUNEWIDTH_EASTASIAN") == "" { runewidth.DefaultCondition.EastAsianWidth = false } // For performance reasons, we create a lookup table. However, some users // might be more memory conscious. If that's you, set the TCELL_MINIMIZE // environment variable. if os.Getenv("TCELL_MINIMIZE") == "" { runewidth.CreateLUT() } } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/charset_stub.go ================================================ //go:build plan9 || nacl // +build plan9 nacl // Copyright 2015 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell func getCharset() string { return "" } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/charset_unix.go ================================================ //go:build !windows && !nacl && !plan9 // +build !windows,!nacl,!plan9 // Copyright 2016 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell import ( "os" "strings" ) func getCharset() string { // Determine the character set. This can help us later. // Per POSIX, we search for LC_ALL first, then LC_CTYPE, and // finally LANG. First one set wins. locale := "" if locale = os.Getenv("LC_ALL"); locale == "" { if locale = os.Getenv("LC_CTYPE"); locale == "" { locale = os.Getenv("LANG") } } if locale == "POSIX" || locale == "C" { return "US-ASCII" } if i := strings.IndexRune(locale, '@'); i >= 0 { locale = locale[:i] } if i := strings.IndexRune(locale, '.'); i >= 0 { locale = locale[i+1:] } else { // Default assumption, and on Linux we can see LC_ALL // without a character set, which we assume implies UTF-8. return "UTF-8" } // XXX: add support for aliases return locale } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/charset_windows.go ================================================ //go:build windows // +build windows // Copyright 2015 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell func getCharset() string { return "UTF-16" } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/color.go ================================================ // Copyright 2023 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell import ( "fmt" ic "image/color" "strconv" ) // Color represents a color. The low numeric values are the same as used // by ECMA-48, and beyond that XTerm. A 24-bit RGB value may be used by // adding in the ColorIsRGB flag. For Color names we use the W3C approved // color names. // // We use a 64-bit integer to allow future expansion if we want to add an // 8-bit alpha, while still leaving us some room for extra options. // // Note that on various terminals colors may be approximated however, or // not supported at all. If no suitable representation for a color is known, // the library will simply not set any color, deferring to whatever default // attributes the terminal uses. type Color uint64 const ( // ColorDefault is used to leave the Color unchanged from whatever // system or terminal default may exist. It's also the zero value. ColorDefault Color = 0 // ColorValid is used to indicate the color value is actually // valid (initialized). This is useful to permit the zero value // to be treated as the default. ColorValid Color = 1 << 32 // ColorIsRGB is used to indicate that the numeric value is not // a known color constant, but rather an RGB value. The lower // order 3 bytes are RGB. ColorIsRGB Color = 1 << 33 // ColorSpecial is a flag used to indicate that the values have // special meaning, and live outside of the color space(s). ColorSpecial Color = 1 << 34 ) // Note that the order of these options is important -- it follows the // definitions used by ECMA and XTerm. Hence any further named colors // must begin at a value not less than 256. const ( ColorBlack = ColorValid + iota ColorMaroon ColorGreen ColorOlive ColorNavy ColorPurple ColorTeal ColorSilver ColorGray ColorRed ColorLime ColorYellow ColorBlue ColorFuchsia ColorAqua ColorWhite Color16 Color17 Color18 Color19 Color20 Color21 Color22 Color23 Color24 Color25 Color26 Color27 Color28 Color29 Color30 Color31 Color32 Color33 Color34 Color35 Color36 Color37 Color38 Color39 Color40 Color41 Color42 Color43 Color44 Color45 Color46 Color47 Color48 Color49 Color50 Color51 Color52 Color53 Color54 Color55 Color56 Color57 Color58 Color59 Color60 Color61 Color62 Color63 Color64 Color65 Color66 Color67 Color68 Color69 Color70 Color71 Color72 Color73 Color74 Color75 Color76 Color77 Color78 Color79 Color80 Color81 Color82 Color83 Color84 Color85 Color86 Color87 Color88 Color89 Color90 Color91 Color92 Color93 Color94 Color95 Color96 Color97 Color98 Color99 Color100 Color101 Color102 Color103 Color104 Color105 Color106 Color107 Color108 Color109 Color110 Color111 Color112 Color113 Color114 Color115 Color116 Color117 Color118 Color119 Color120 Color121 Color122 Color123 Color124 Color125 Color126 Color127 Color128 Color129 Color130 Color131 Color132 Color133 Color134 Color135 Color136 Color137 Color138 Color139 Color140 Color141 Color142 Color143 Color144 Color145 Color146 Color147 Color148 Color149 Color150 Color151 Color152 Color153 Color154 Color155 Color156 Color157 Color158 Color159 Color160 Color161 Color162 Color163 Color164 Color165 Color166 Color167 Color168 Color169 Color170 Color171 Color172 Color173 Color174 Color175 Color176 Color177 Color178 Color179 Color180 Color181 Color182 Color183 Color184 Color185 Color186 Color187 Color188 Color189 Color190 Color191 Color192 Color193 Color194 Color195 Color196 Color197 Color198 Color199 Color200 Color201 Color202 Color203 Color204 Color205 Color206 Color207 Color208 Color209 Color210 Color211 Color212 Color213 Color214 Color215 Color216 Color217 Color218 Color219 Color220 Color221 Color222 Color223 Color224 Color225 Color226 Color227 Color228 Color229 Color230 Color231 Color232 Color233 Color234 Color235 Color236 Color237 Color238 Color239 Color240 Color241 Color242 Color243 Color244 Color245 Color246 Color247 Color248 Color249 Color250 Color251 Color252 Color253 Color254 Color255 ColorAliceBlue ColorAntiqueWhite ColorAquaMarine ColorAzure ColorBeige ColorBisque ColorBlanchedAlmond ColorBlueViolet ColorBrown ColorBurlyWood ColorCadetBlue ColorChartreuse ColorChocolate ColorCoral ColorCornflowerBlue ColorCornsilk ColorCrimson ColorDarkBlue ColorDarkCyan ColorDarkGoldenrod ColorDarkGray ColorDarkGreen ColorDarkKhaki ColorDarkMagenta ColorDarkOliveGreen ColorDarkOrange ColorDarkOrchid ColorDarkRed ColorDarkSalmon ColorDarkSeaGreen ColorDarkSlateBlue ColorDarkSlateGray ColorDarkTurquoise ColorDarkViolet ColorDeepPink ColorDeepSkyBlue ColorDimGray ColorDodgerBlue ColorFireBrick ColorFloralWhite ColorForestGreen ColorGainsboro ColorGhostWhite ColorGold ColorGoldenrod ColorGreenYellow ColorHoneydew ColorHotPink ColorIndianRed ColorIndigo ColorIvory ColorKhaki ColorLavender ColorLavenderBlush ColorLawnGreen ColorLemonChiffon ColorLightBlue ColorLightCoral ColorLightCyan ColorLightGoldenrodYellow ColorLightGray ColorLightGreen ColorLightPink ColorLightSalmon ColorLightSeaGreen ColorLightSkyBlue ColorLightSlateGray ColorLightSteelBlue ColorLightYellow ColorLimeGreen ColorLinen ColorMediumAquamarine ColorMediumBlue ColorMediumOrchid ColorMediumPurple ColorMediumSeaGreen ColorMediumSlateBlue ColorMediumSpringGreen ColorMediumTurquoise ColorMediumVioletRed ColorMidnightBlue ColorMintCream ColorMistyRose ColorMoccasin ColorNavajoWhite ColorOldLace ColorOliveDrab ColorOrange ColorOrangeRed ColorOrchid ColorPaleGoldenrod ColorPaleGreen ColorPaleTurquoise ColorPaleVioletRed ColorPapayaWhip ColorPeachPuff ColorPeru ColorPink ColorPlum ColorPowderBlue ColorRebeccaPurple ColorRosyBrown ColorRoyalBlue ColorSaddleBrown ColorSalmon ColorSandyBrown ColorSeaGreen ColorSeashell ColorSienna ColorSkyblue ColorSlateBlue ColorSlateGray ColorSnow ColorSpringGreen ColorSteelBlue ColorTan ColorThistle ColorTomato ColorTurquoise ColorViolet ColorWheat ColorWhiteSmoke ColorYellowGreen ) // These are aliases for the color gray, because some of us spell // it as grey. const ( ColorGrey = ColorGray ColorDimGrey = ColorDimGray ColorDarkGrey = ColorDarkGray ColorDarkSlateGrey = ColorDarkSlateGray ColorLightGrey = ColorLightGray ColorLightSlateGrey = ColorLightSlateGray ColorSlateGrey = ColorSlateGray ) // ColorValues maps color constants to their RGB values. var ColorValues = map[Color]int32{ ColorBlack: 0x000000, ColorMaroon: 0x800000, ColorGreen: 0x008000, ColorOlive: 0x808000, ColorNavy: 0x000080, ColorPurple: 0x800080, ColorTeal: 0x008080, ColorSilver: 0xC0C0C0, ColorGray: 0x808080, ColorRed: 0xFF0000, ColorLime: 0x00FF00, ColorYellow: 0xFFFF00, ColorBlue: 0x0000FF, ColorFuchsia: 0xFF00FF, ColorAqua: 0x00FFFF, ColorWhite: 0xFFFFFF, Color16: 0x000000, // black Color17: 0x00005F, Color18: 0x000087, Color19: 0x0000AF, Color20: 0x0000D7, Color21: 0x0000FF, // blue Color22: 0x005F00, Color23: 0x005F5F, Color24: 0x005F87, Color25: 0x005FAF, Color26: 0x005FD7, Color27: 0x005FFF, Color28: 0x008700, Color29: 0x00875F, Color30: 0x008787, Color31: 0x0087Af, Color32: 0x0087D7, Color33: 0x0087FF, Color34: 0x00AF00, Color35: 0x00AF5F, Color36: 0x00AF87, Color37: 0x00AFAF, Color38: 0x00AFD7, Color39: 0x00AFFF, Color40: 0x00D700, Color41: 0x00D75F, Color42: 0x00D787, Color43: 0x00D7AF, Color44: 0x00D7D7, Color45: 0x00D7FF, Color46: 0x00FF00, // lime Color47: 0x00FF5F, Color48: 0x00FF87, Color49: 0x00FFAF, Color50: 0x00FFd7, Color51: 0x00FFFF, // aqua Color52: 0x5F0000, Color53: 0x5F005F, Color54: 0x5F0087, Color55: 0x5F00AF, Color56: 0x5F00D7, Color57: 0x5F00FF, Color58: 0x5F5F00, Color59: 0x5F5F5F, Color60: 0x5F5F87, Color61: 0x5F5FAF, Color62: 0x5F5FD7, Color63: 0x5F5FFF, Color64: 0x5F8700, Color65: 0x5F875F, Color66: 0x5F8787, Color67: 0x5F87AF, Color68: 0x5F87D7, Color69: 0x5F87FF, Color70: 0x5FAF00, Color71: 0x5FAF5F, Color72: 0x5FAF87, Color73: 0x5FAFAF, Color74: 0x5FAFD7, Color75: 0x5FAFFF, Color76: 0x5FD700, Color77: 0x5FD75F, Color78: 0x5FD787, Color79: 0x5FD7AF, Color80: 0x5FD7D7, Color81: 0x5FD7FF, Color82: 0x5FFF00, Color83: 0x5FFF5F, Color84: 0x5FFF87, Color85: 0x5FFFAF, Color86: 0x5FFFD7, Color87: 0x5FFFFF, Color88: 0x870000, Color89: 0x87005F, Color90: 0x870087, Color91: 0x8700AF, Color92: 0x8700D7, Color93: 0x8700FF, Color94: 0x875F00, Color95: 0x875F5F, Color96: 0x875F87, Color97: 0x875FAF, Color98: 0x875FD7, Color99: 0x875FFF, Color100: 0x878700, Color101: 0x87875F, Color102: 0x878787, Color103: 0x8787AF, Color104: 0x8787D7, Color105: 0x8787FF, Color106: 0x87AF00, Color107: 0x87AF5F, Color108: 0x87AF87, Color109: 0x87AFAF, Color110: 0x87AFD7, Color111: 0x87AFFF, Color112: 0x87D700, Color113: 0x87D75F, Color114: 0x87D787, Color115: 0x87D7AF, Color116: 0x87D7D7, Color117: 0x87D7FF, Color118: 0x87FF00, Color119: 0x87FF5F, Color120: 0x87FF87, Color121: 0x87FFAF, Color122: 0x87FFD7, Color123: 0x87FFFF, Color124: 0xAF0000, Color125: 0xAF005F, Color126: 0xAF0087, Color127: 0xAF00AF, Color128: 0xAF00D7, Color129: 0xAF00FF, Color130: 0xAF5F00, Color131: 0xAF5F5F, Color132: 0xAF5F87, Color133: 0xAF5FAF, Color134: 0xAF5FD7, Color135: 0xAF5FFF, Color136: 0xAF8700, Color137: 0xAF875F, Color138: 0xAF8787, Color139: 0xAF87AF, Color140: 0xAF87D7, Color141: 0xAF87FF, Color142: 0xAFAF00, Color143: 0xAFAF5F, Color144: 0xAFAF87, Color145: 0xAFAFAF, Color146: 0xAFAFD7, Color147: 0xAFAFFF, Color148: 0xAFD700, Color149: 0xAFD75F, Color150: 0xAFD787, Color151: 0xAFD7AF, Color152: 0xAFD7D7, Color153: 0xAFD7FF, Color154: 0xAFFF00, Color155: 0xAFFF5F, Color156: 0xAFFF87, Color157: 0xAFFFAF, Color158: 0xAFFFD7, Color159: 0xAFFFFF, Color160: 0xD70000, Color161: 0xD7005F, Color162: 0xD70087, Color163: 0xD700AF, Color164: 0xD700D7, Color165: 0xD700FF, Color166: 0xD75F00, Color167: 0xD75F5F, Color168: 0xD75F87, Color169: 0xD75FAF, Color170: 0xD75FD7, Color171: 0xD75FFF, Color172: 0xD78700, Color173: 0xD7875F, Color174: 0xD78787, Color175: 0xD787AF, Color176: 0xD787D7, Color177: 0xD787FF, Color178: 0xD7AF00, Color179: 0xD7AF5F, Color180: 0xD7AF87, Color181: 0xD7AFAF, Color182: 0xD7AFD7, Color183: 0xD7AFFF, Color184: 0xD7D700, Color185: 0xD7D75F, Color186: 0xD7D787, Color187: 0xD7D7AF, Color188: 0xD7D7D7, Color189: 0xD7D7FF, Color190: 0xD7FF00, Color191: 0xD7FF5F, Color192: 0xD7FF87, Color193: 0xD7FFAF, Color194: 0xD7FFD7, Color195: 0xD7FFFF, Color196: 0xFF0000, // red Color197: 0xFF005F, Color198: 0xFF0087, Color199: 0xFF00AF, Color200: 0xFF00D7, Color201: 0xFF00FF, // fuchsia Color202: 0xFF5F00, Color203: 0xFF5F5F, Color204: 0xFF5F87, Color205: 0xFF5FAF, Color206: 0xFF5FD7, Color207: 0xFF5FFF, Color208: 0xFF8700, Color209: 0xFF875F, Color210: 0xFF8787, Color211: 0xFF87AF, Color212: 0xFF87D7, Color213: 0xFF87FF, Color214: 0xFFAF00, Color215: 0xFFAF5F, Color216: 0xFFAF87, Color217: 0xFFAFAF, Color218: 0xFFAFD7, Color219: 0xFFAFFF, Color220: 0xFFD700, Color221: 0xFFD75F, Color222: 0xFFD787, Color223: 0xFFD7AF, Color224: 0xFFD7D7, Color225: 0xFFD7FF, Color226: 0xFFFF00, // yellow Color227: 0xFFFF5F, Color228: 0xFFFF87, Color229: 0xFFFFAF, Color230: 0xFFFFD7, Color231: 0xFFFFFF, // white Color232: 0x080808, Color233: 0x121212, Color234: 0x1C1C1C, Color235: 0x262626, Color236: 0x303030, Color237: 0x3A3A3A, Color238: 0x444444, Color239: 0x4E4E4E, Color240: 0x585858, Color241: 0x626262, Color242: 0x6C6C6C, Color243: 0x767676, Color244: 0x808080, // grey Color245: 0x8A8A8A, Color246: 0x949494, Color247: 0x9E9E9E, Color248: 0xA8A8A8, Color249: 0xB2B2B2, Color250: 0xBCBCBC, Color251: 0xC6C6C6, Color252: 0xD0D0D0, Color253: 0xDADADA, Color254: 0xE4E4E4, Color255: 0xEEEEEE, ColorAliceBlue: 0xF0F8FF, ColorAntiqueWhite: 0xFAEBD7, ColorAquaMarine: 0x7FFFD4, ColorAzure: 0xF0FFFF, ColorBeige: 0xF5F5DC, ColorBisque: 0xFFE4C4, ColorBlanchedAlmond: 0xFFEBCD, ColorBlueViolet: 0x8A2BE2, ColorBrown: 0xA52A2A, ColorBurlyWood: 0xDEB887, ColorCadetBlue: 0x5F9EA0, ColorChartreuse: 0x7FFF00, ColorChocolate: 0xD2691E, ColorCoral: 0xFF7F50, ColorCornflowerBlue: 0x6495ED, ColorCornsilk: 0xFFF8DC, ColorCrimson: 0xDC143C, ColorDarkBlue: 0x00008B, ColorDarkCyan: 0x008B8B, ColorDarkGoldenrod: 0xB8860B, ColorDarkGray: 0xA9A9A9, ColorDarkGreen: 0x006400, ColorDarkKhaki: 0xBDB76B, ColorDarkMagenta: 0x8B008B, ColorDarkOliveGreen: 0x556B2F, ColorDarkOrange: 0xFF8C00, ColorDarkOrchid: 0x9932CC, ColorDarkRed: 0x8B0000, ColorDarkSalmon: 0xE9967A, ColorDarkSeaGreen: 0x8FBC8F, ColorDarkSlateBlue: 0x483D8B, ColorDarkSlateGray: 0x2F4F4F, ColorDarkTurquoise: 0x00CED1, ColorDarkViolet: 0x9400D3, ColorDeepPink: 0xFF1493, ColorDeepSkyBlue: 0x00BFFF, ColorDimGray: 0x696969, ColorDodgerBlue: 0x1E90FF, ColorFireBrick: 0xB22222, ColorFloralWhite: 0xFFFAF0, ColorForestGreen: 0x228B22, ColorGainsboro: 0xDCDCDC, ColorGhostWhite: 0xF8F8FF, ColorGold: 0xFFD700, ColorGoldenrod: 0xDAA520, ColorGreenYellow: 0xADFF2F, ColorHoneydew: 0xF0FFF0, ColorHotPink: 0xFF69B4, ColorIndianRed: 0xCD5C5C, ColorIndigo: 0x4B0082, ColorIvory: 0xFFFFF0, ColorKhaki: 0xF0E68C, ColorLavender: 0xE6E6FA, ColorLavenderBlush: 0xFFF0F5, ColorLawnGreen: 0x7CFC00, ColorLemonChiffon: 0xFFFACD, ColorLightBlue: 0xADD8E6, ColorLightCoral: 0xF08080, ColorLightCyan: 0xE0FFFF, ColorLightGoldenrodYellow: 0xFAFAD2, ColorLightGray: 0xD3D3D3, ColorLightGreen: 0x90EE90, ColorLightPink: 0xFFB6C1, ColorLightSalmon: 0xFFA07A, ColorLightSeaGreen: 0x20B2AA, ColorLightSkyBlue: 0x87CEFA, ColorLightSlateGray: 0x778899, ColorLightSteelBlue: 0xB0C4DE, ColorLightYellow: 0xFFFFE0, ColorLimeGreen: 0x32CD32, ColorLinen: 0xFAF0E6, ColorMediumAquamarine: 0x66CDAA, ColorMediumBlue: 0x0000CD, ColorMediumOrchid: 0xBA55D3, ColorMediumPurple: 0x9370DB, ColorMediumSeaGreen: 0x3CB371, ColorMediumSlateBlue: 0x7B68EE, ColorMediumSpringGreen: 0x00FA9A, ColorMediumTurquoise: 0x48D1CC, ColorMediumVioletRed: 0xC71585, ColorMidnightBlue: 0x191970, ColorMintCream: 0xF5FFFA, ColorMistyRose: 0xFFE4E1, ColorMoccasin: 0xFFE4B5, ColorNavajoWhite: 0xFFDEAD, ColorOldLace: 0xFDF5E6, ColorOliveDrab: 0x6B8E23, ColorOrange: 0xFFA500, ColorOrangeRed: 0xFF4500, ColorOrchid: 0xDA70D6, ColorPaleGoldenrod: 0xEEE8AA, ColorPaleGreen: 0x98FB98, ColorPaleTurquoise: 0xAFEEEE, ColorPaleVioletRed: 0xDB7093, ColorPapayaWhip: 0xFFEFD5, ColorPeachPuff: 0xFFDAB9, ColorPeru: 0xCD853F, ColorPink: 0xFFC0CB, ColorPlum: 0xDDA0DD, ColorPowderBlue: 0xB0E0E6, ColorRebeccaPurple: 0x663399, ColorRosyBrown: 0xBC8F8F, ColorRoyalBlue: 0x4169E1, ColorSaddleBrown: 0x8B4513, ColorSalmon: 0xFA8072, ColorSandyBrown: 0xF4A460, ColorSeaGreen: 0x2E8B57, ColorSeashell: 0xFFF5EE, ColorSienna: 0xA0522D, ColorSkyblue: 0x87CEEB, ColorSlateBlue: 0x6A5ACD, ColorSlateGray: 0x708090, ColorSnow: 0xFFFAFA, ColorSpringGreen: 0x00FF7F, ColorSteelBlue: 0x4682B4, ColorTan: 0xD2B48C, ColorThistle: 0xD8BFD8, ColorTomato: 0xFF6347, ColorTurquoise: 0x40E0D0, ColorViolet: 0xEE82EE, ColorWheat: 0xF5DEB3, ColorWhiteSmoke: 0xF5F5F5, ColorYellowGreen: 0x9ACD32, } // Special colors. const ( // ColorReset is used to indicate that the color should use the // vanilla terminal colors. (Basically go back to the defaults.) ColorReset = ColorSpecial | iota // ColorNone indicates that we should not change the color from // whatever is already displayed. This can only be used in limited // circumstances. ColorNone ) // ColorNames holds the written names of colors. Useful to present a list of // recognized named colors. var ColorNames = map[string]Color{ "black": ColorBlack, "maroon": ColorMaroon, "green": ColorGreen, "olive": ColorOlive, "navy": ColorNavy, "purple": ColorPurple, "teal": ColorTeal, "silver": ColorSilver, "gray": ColorGray, "red": ColorRed, "lime": ColorLime, "yellow": ColorYellow, "blue": ColorBlue, "fuchsia": ColorFuchsia, "aqua": ColorAqua, "white": ColorWhite, "aliceblue": ColorAliceBlue, "antiquewhite": ColorAntiqueWhite, "aquamarine": ColorAquaMarine, "azure": ColorAzure, "beige": ColorBeige, "bisque": ColorBisque, "blanchedalmond": ColorBlanchedAlmond, "blueviolet": ColorBlueViolet, "brown": ColorBrown, "burlywood": ColorBurlyWood, "cadetblue": ColorCadetBlue, "chartreuse": ColorChartreuse, "chocolate": ColorChocolate, "coral": ColorCoral, "cornflowerblue": ColorCornflowerBlue, "cornsilk": ColorCornsilk, "crimson": ColorCrimson, "darkblue": ColorDarkBlue, "darkcyan": ColorDarkCyan, "darkgoldenrod": ColorDarkGoldenrod, "darkgray": ColorDarkGray, "darkgreen": ColorDarkGreen, "darkkhaki": ColorDarkKhaki, "darkmagenta": ColorDarkMagenta, "darkolivegreen": ColorDarkOliveGreen, "darkorange": ColorDarkOrange, "darkorchid": ColorDarkOrchid, "darkred": ColorDarkRed, "darksalmon": ColorDarkSalmon, "darkseagreen": ColorDarkSeaGreen, "darkslateblue": ColorDarkSlateBlue, "darkslategray": ColorDarkSlateGray, "darkturquoise": ColorDarkTurquoise, "darkviolet": ColorDarkViolet, "deeppink": ColorDeepPink, "deepskyblue": ColorDeepSkyBlue, "dimgray": ColorDimGray, "dodgerblue": ColorDodgerBlue, "firebrick": ColorFireBrick, "floralwhite": ColorFloralWhite, "forestgreen": ColorForestGreen, "gainsboro": ColorGainsboro, "ghostwhite": ColorGhostWhite, "gold": ColorGold, "goldenrod": ColorGoldenrod, "greenyellow": ColorGreenYellow, "honeydew": ColorHoneydew, "hotpink": ColorHotPink, "indianred": ColorIndianRed, "indigo": ColorIndigo, "ivory": ColorIvory, "khaki": ColorKhaki, "lavender": ColorLavender, "lavenderblush": ColorLavenderBlush, "lawngreen": ColorLawnGreen, "lemonchiffon": ColorLemonChiffon, "lightblue": ColorLightBlue, "lightcoral": ColorLightCoral, "lightcyan": ColorLightCyan, "lightgoldenrodyellow": ColorLightGoldenrodYellow, "lightgray": ColorLightGray, "lightgreen": ColorLightGreen, "lightpink": ColorLightPink, "lightsalmon": ColorLightSalmon, "lightseagreen": ColorLightSeaGreen, "lightskyblue": ColorLightSkyBlue, "lightslategray": ColorLightSlateGray, "lightsteelblue": ColorLightSteelBlue, "lightyellow": ColorLightYellow, "limegreen": ColorLimeGreen, "linen": ColorLinen, "mediumaquamarine": ColorMediumAquamarine, "mediumblue": ColorMediumBlue, "mediumorchid": ColorMediumOrchid, "mediumpurple": ColorMediumPurple, "mediumseagreen": ColorMediumSeaGreen, "mediumslateblue": ColorMediumSlateBlue, "mediumspringgreen": ColorMediumSpringGreen, "mediumturquoise": ColorMediumTurquoise, "mediumvioletred": ColorMediumVioletRed, "midnightblue": ColorMidnightBlue, "mintcream": ColorMintCream, "mistyrose": ColorMistyRose, "moccasin": ColorMoccasin, "navajowhite": ColorNavajoWhite, "oldlace": ColorOldLace, "olivedrab": ColorOliveDrab, "orange": ColorOrange, "orangered": ColorOrangeRed, "orchid": ColorOrchid, "palegoldenrod": ColorPaleGoldenrod, "palegreen": ColorPaleGreen, "paleturquoise": ColorPaleTurquoise, "palevioletred": ColorPaleVioletRed, "papayawhip": ColorPapayaWhip, "peachpuff": ColorPeachPuff, "peru": ColorPeru, "pink": ColorPink, "plum": ColorPlum, "powderblue": ColorPowderBlue, "rebeccapurple": ColorRebeccaPurple, "rosybrown": ColorRosyBrown, "royalblue": ColorRoyalBlue, "saddlebrown": ColorSaddleBrown, "salmon": ColorSalmon, "sandybrown": ColorSandyBrown, "seagreen": ColorSeaGreen, "seashell": ColorSeashell, "sienna": ColorSienna, "skyblue": ColorSkyblue, "slateblue": ColorSlateBlue, "slategray": ColorSlateGray, "snow": ColorSnow, "springgreen": ColorSpringGreen, "steelblue": ColorSteelBlue, "tan": ColorTan, "thistle": ColorThistle, "tomato": ColorTomato, "turquoise": ColorTurquoise, "violet": ColorViolet, "wheat": ColorWheat, "whitesmoke": ColorWhiteSmoke, "yellowgreen": ColorYellowGreen, "grey": ColorGray, "dimgrey": ColorDimGray, "darkgrey": ColorDarkGray, "darkslategrey": ColorDarkSlateGray, "lightgrey": ColorLightGray, "lightslategrey": ColorLightSlateGray, "slategrey": ColorSlateGray, } // Valid indicates the color is a valid value (has been set). func (c Color) Valid() bool { return c&ColorValid != 0 } // IsRGB is true if the color is an RGB specific value. func (c Color) IsRGB() bool { return c&(ColorValid|ColorIsRGB) == (ColorValid | ColorIsRGB) } // CSS returns the CSS hex string ( #ABCDEF ) if valid // if not a valid color returns empty string func (c Color) CSS() string { if !c.Valid() { return "" } return fmt.Sprintf("#%06X", c.Hex()) } // String implements fmt.Stringer to return either the // W3C name if it has one or the CSS hex string '#ABCDEF' func (c Color) String() string { if !c.Valid() { switch c { case ColorNone: return "none" case ColorDefault: return "default" case ColorReset: return "reset" } return "" } return c.Name(true) } // Name returns W3C name or an empty string if no arguments // if passed true as an argument it will falls back to // the CSS hex string if no W3C name found '#ABCDEF' func (c Color) Name(css ...bool) string { for name, hex := range ColorNames { if c == hex { return name } } if len(css) > 0 && css[0] { return c.CSS() } return "" } // Hex returns the color's hexadecimal RGB 24-bit value with each component // consisting of a single byte, R << 16 | G << 8 | B. If the color // is unknown or unset, -1 is returned. func (c Color) Hex() int32 { if !c.Valid() { return -1 } if c&ColorIsRGB != 0 { return int32(c & 0xffffff) } if v, ok := ColorValues[c]; ok { return v } return -1 } // RGB returns the red, green, and blue components of the color, with // each component represented as a value 0-255. In the event that the // color cannot be broken up (not set usually), -1 is returned for each value. func (c Color) RGB() (int32, int32, int32) { v := c.Hex() if v < 0 { return -1, -1, -1 } return (v >> 16) & 0xff, (v >> 8) & 0xff, v & 0xff } // TrueColor returns the true color (RGB) version of the provided color. // This is useful for ensuring color accuracy when using named colors. // This will override terminal theme colors. func (c Color) TrueColor() Color { if !c.Valid() { return ColorDefault } if c&ColorIsRGB != 0 { return c | ColorValid } return Color(c.Hex()) | ColorIsRGB | ColorValid } // NewRGBColor returns a new color with the given red, green, and blue values. // Each value must be represented in the range 0-255. func NewRGBColor(r, g, b int32) Color { return NewHexColor(((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff)) } // NewHexColor returns a color using the given 24-bit RGB value. func NewHexColor(v int32) Color { return ColorIsRGB | Color(v) | ColorValid } // GetColor creates a Color from a color name (W3C name). A hex value may // be supplied as a string in the format "#ffffff". func GetColor(name string) Color { if c, ok := ColorNames[name]; ok { return c } if len(name) == 7 && name[0] == '#' { if v, e := strconv.ParseInt(name[1:], 16, 32); e == nil { return NewHexColor(int32(v)) } } return ColorDefault } // PaletteColor creates a color based on the palette index. func PaletteColor(index int) Color { return Color(index) | ColorValid } // FromImageColor converts an image/color.Color into tcell.Color. // The alpha value is dropped, so it should be tracked separately if it is // needed. func FromImageColor(imageColor ic.Color) Color { r, g, b, _ := imageColor.RGBA() // NOTE image/color.Color RGB values range is [0, 0xFFFF] as uint32 return NewRGBColor(int32(r>>8), int32(g>>8), int32(b>>8)) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/colorfit.go ================================================ // Copyright 2016 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell import ( "math" "github.com/lucasb-eyer/go-colorful" ) // FindColor attempts to find a given color, or the best match possible for it, // from the palette given. This is an expensive operation, so results should // be cached by the caller. func FindColor(c Color, palette []Color) Color { match := ColorDefault dist := float64(0) r, g, b := c.RGB() c1 := colorful.Color{ R: float64(r) / 255.0, G: float64(g) / 255.0, B: float64(b) / 255.0, } for _, d := range palette { r, g, b = d.RGB() c2 := colorful.Color{ R: float64(r) / 255.0, G: float64(g) / 255.0, B: float64(b) / 255.0, } // CIE94 is more accurate, but really really expensive. nd := c1.DistanceCIE76(c2) if math.IsNaN(nd) { nd = math.Inf(1) } if match == ColorDefault || nd < dist { match = d dist = nd } } return match } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/console_stub.go ================================================ //go:build !windows // +build !windows // Copyright 2015 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell // NewConsoleScreen returns a console based screen. This platform // doesn't have support for any, so it returns nil and a suitable error. func NewConsoleScreen() (Screen, error) { return nil, ErrNoScreen } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/console_win.go ================================================ //go:build windows // +build windows // Copyright 2024 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell import ( "errors" "fmt" "os" "strings" "sync" "syscall" "unicode/utf16" "unsafe" ) type cScreen struct { in syscall.Handle out syscall.Handle cancelflag syscall.Handle scandone chan struct{} quit chan struct{} curx int cury int style Style fini bool vten bool truecolor bool running bool disableAlt bool // disable the alternate screen w int h int oscreen consoleInfo ocursor cursorInfo cursorStyle CursorStyle oimode uint32 oomode uint32 cells CellBuffer focusEnable bool mouseEnabled bool wg sync.WaitGroup eventQ chan Event stopQ chan struct{} finiOnce sync.Once sync.Mutex } var winLock sync.Mutex var winPalette = []Color{ ColorBlack, ColorMaroon, ColorGreen, ColorNavy, ColorOlive, ColorPurple, ColorTeal, ColorSilver, ColorGray, ColorRed, ColorLime, ColorBlue, ColorYellow, ColorFuchsia, ColorAqua, ColorWhite, } var winColors = map[Color]Color{ ColorBlack: ColorBlack, ColorMaroon: ColorMaroon, ColorGreen: ColorGreen, ColorNavy: ColorNavy, ColorOlive: ColorOlive, ColorPurple: ColorPurple, ColorTeal: ColorTeal, ColorSilver: ColorSilver, ColorGray: ColorGray, ColorRed: ColorRed, ColorLime: ColorLime, ColorBlue: ColorBlue, ColorYellow: ColorYellow, ColorFuchsia: ColorFuchsia, ColorAqua: ColorAqua, ColorWhite: ColorWhite, } var ( k32 = syscall.NewLazyDLL("kernel32.dll") u32 = syscall.NewLazyDLL("user32.dll") ) // We have to bring in the kernel32 and user32 DLLs directly, so we can get // access to some system calls that the core Go API lacks. // // Note that Windows appends some functions with W to indicate that wide // characters (Unicode) are in use. The documentation refers to them // without this suffix, as the resolution is made via preprocessor. var ( procReadConsoleInput = k32.NewProc("ReadConsoleInputW") procWaitForMultipleObjects = k32.NewProc("WaitForMultipleObjects") procCreateEvent = k32.NewProc("CreateEventW") procSetEvent = k32.NewProc("SetEvent") procGetConsoleCursorInfo = k32.NewProc("GetConsoleCursorInfo") procSetConsoleCursorInfo = k32.NewProc("SetConsoleCursorInfo") procSetConsoleCursorPosition = k32.NewProc("SetConsoleCursorPosition") procSetConsoleMode = k32.NewProc("SetConsoleMode") procGetConsoleMode = k32.NewProc("GetConsoleMode") procGetConsoleScreenBufferInfo = k32.NewProc("GetConsoleScreenBufferInfo") procFillConsoleOutputAttribute = k32.NewProc("FillConsoleOutputAttribute") procFillConsoleOutputCharacter = k32.NewProc("FillConsoleOutputCharacterW") procSetConsoleWindowInfo = k32.NewProc("SetConsoleWindowInfo") procSetConsoleScreenBufferSize = k32.NewProc("SetConsoleScreenBufferSize") procSetConsoleTextAttribute = k32.NewProc("SetConsoleTextAttribute") procGetLargestConsoleWindowSize = k32.NewProc("GetLargestConsoleWindowSize") procMessageBeep = u32.NewProc("MessageBeep") ) const ( w32Infinite = ^uintptr(0) w32WaitObject0 = uintptr(0) ) const ( // VT100/XTerm escapes understood by the console vtShowCursor = "\x1b[?25h" vtHideCursor = "\x1b[?25l" vtCursorPos = "\x1b[%d;%dH" // Note that it is Y then X vtSgr0 = "\x1b[0m" vtBold = "\x1b[1m" vtUnderline = "\x1b[4m" vtBlink = "\x1b[5m" // Not sure if this is processed vtReverse = "\x1b[7m" vtSetFg = "\x1b[38;5;%dm" vtSetBg = "\x1b[48;5;%dm" vtSetFgRGB = "\x1b[38;2;%d;%d;%dm" // RGB vtSetBgRGB = "\x1b[48;2;%d;%d;%dm" // RGB vtCursorDefault = "\x1b[0 q" vtCursorBlinkingBlock = "\x1b[1 q" vtCursorSteadyBlock = "\x1b[2 q" vtCursorBlinkingUnderline = "\x1b[3 q" vtCursorSteadyUnderline = "\x1b[4 q" vtCursorBlinkingBar = "\x1b[5 q" vtCursorSteadyBar = "\x1b[6 q" vtDisableAm = "\x1b[?7l" vtEnableAm = "\x1b[?7h" vtEnterCA = "\x1b[?1049h\x1b[22;0;0t" vtExitCA = "\x1b[?1049l\x1b[23;0;0t" ) var vtCursorStyles = map[CursorStyle]string{ CursorStyleDefault: vtCursorDefault, CursorStyleBlinkingBlock: vtCursorBlinkingBlock, CursorStyleSteadyBlock: vtCursorSteadyBlock, CursorStyleBlinkingUnderline: vtCursorBlinkingUnderline, CursorStyleSteadyUnderline: vtCursorSteadyUnderline, CursorStyleBlinkingBar: vtCursorBlinkingBar, CursorStyleSteadyBar: vtCursorSteadyBar, } // NewConsoleScreen returns a Screen for the Windows console associated // with the current process. The Screen makes use of the Windows Console // API to display content and read events. func NewConsoleScreen() (Screen, error) { return &baseScreen{screenImpl: &cScreen{}}, nil } func (s *cScreen) Init() error { s.eventQ = make(chan Event, 10) s.quit = make(chan struct{}) s.scandone = make(chan struct{}) in, e := syscall.Open("CONIN$", syscall.O_RDWR, 0) if e != nil { return e } s.in = in out, e := syscall.Open("CONOUT$", syscall.O_RDWR, 0) if e != nil { _ = syscall.Close(s.in) return e } s.out = out s.truecolor = true // ConEmu handling of colors and scrolling when in VT output mode is extremely poor. // The color palette will scroll even though characters do not, when // emitting stuff for the last character. In the future we might change this to // look at specific versions of ConEmu if they fix the bug. // We can also try disabling auto margin mode. tryVt := true if os.Getenv("ConEmuPID") != "" { s.truecolor = false tryVt = false } switch os.Getenv("TCELL_TRUECOLOR") { case "disable": s.truecolor = false case "enable": s.truecolor = true tryVt = true } s.Lock() s.curx = -1 s.cury = -1 s.style = StyleDefault s.getCursorInfo(&s.ocursor) s.getConsoleInfo(&s.oscreen) s.getOutMode(&s.oomode) s.getInMode(&s.oimode) s.resize() s.fini = false s.setInMode(modeResizeEn | modeExtendFlg) // If a user needs to force old style console, they may do so // by setting TCELL_VTMODE to disable. This is an undocumented safety net for now. // It may be removed in the future. (This mostly exists because of ConEmu.) switch os.Getenv("TCELL_VTMODE") { case "disable": tryVt = false case "enable": tryVt = true } switch os.Getenv("TCELL_ALTSCREEN") { case "enable": s.disableAlt = false // also the default case "disable": s.disableAlt = true } if tryVt { s.setOutMode(modeVtOutput | modeNoAutoNL | modeCookedOut | modeUnderline) var om uint32 s.getOutMode(&om) if om&modeVtOutput == modeVtOutput { s.vten = true } else { s.truecolor = false s.setOutMode(0) } } else { s.setOutMode(0) } s.Unlock() return s.engage() } func (s *cScreen) CharacterSet() string { // We are always UTF-16LE on Windows return "UTF-16LE" } func (s *cScreen) EnableMouse(...MouseFlags) { s.Lock() s.mouseEnabled = true s.enableMouse(true) s.Unlock() } func (s *cScreen) DisableMouse() { s.Lock() s.mouseEnabled = false s.enableMouse(false) s.Unlock() } func (s *cScreen) enableMouse(on bool) { if on { s.setInMode(modeResizeEn | modeMouseEn | modeExtendFlg) } else { s.setInMode(modeResizeEn | modeExtendFlg) } } // Windows lacks bracketed paste (for now) func (s *cScreen) EnablePaste() {} func (s *cScreen) DisablePaste() {} func (s *cScreen) EnableFocus() { s.Lock() s.focusEnable = true s.Unlock() } func (s *cScreen) DisableFocus() { s.Lock() s.focusEnable = false s.Unlock() } func (s *cScreen) Fini() { s.finiOnce.Do(func() { close(s.quit) s.disengage() }) } func (s *cScreen) disengage() { s.Lock() if !s.running { s.Unlock() return } s.running = false stopQ := s.stopQ _, _, _ = procSetEvent.Call(uintptr(s.cancelflag)) close(stopQ) s.Unlock() s.wg.Wait() if s.vten { s.emitVtString(vtCursorStyles[CursorStyleDefault]) s.emitVtString(vtEnableAm) if !s.disableAlt { s.emitVtString(vtExitCA) } } else if !s.disableAlt { s.clearScreen(StyleDefault, s.vten) s.setCursorPos(0, 0, false) } s.setCursorInfo(&s.ocursor) s.setBufferSize(int(s.oscreen.size.x), int(s.oscreen.size.y)) s.setInMode(s.oimode) s.setOutMode(s.oomode) _, _, _ = procSetConsoleTextAttribute.Call( uintptr(s.out), uintptr(s.mapStyle(StyleDefault))) } func (s *cScreen) engage() error { s.Lock() defer s.Unlock() if s.running { return errors.New("already engaged") } s.stopQ = make(chan struct{}) cf, _, e := procCreateEvent.Call( uintptr(0), uintptr(1), uintptr(0), uintptr(0)) if cf == uintptr(0) { return e } s.running = true s.cancelflag = syscall.Handle(cf) s.enableMouse(s.mouseEnabled) if s.vten { s.setOutMode(modeVtOutput | modeNoAutoNL | modeCookedOut | modeUnderline) if !s.disableAlt { s.emitVtString(vtEnterCA) } s.emitVtString(vtDisableAm) } else { s.setOutMode(0) } s.clearScreen(s.style, s.vten) s.hideCursor() s.cells.Invalidate() s.hideCursor() s.resize() s.draw() s.doCursor() s.wg.Add(1) go s.scanInput(s.stopQ) return nil } type cursorInfo struct { size uint32 visible uint32 } type coord struct { x int16 y int16 } func (c coord) uintptr() uintptr { // little endian, put x first return uintptr(c.x) | (uintptr(c.y) << 16) } type rect struct { left int16 top int16 right int16 bottom int16 } func (s *cScreen) emitVtString(vs string) { esc := utf16.Encode([]rune(vs)) _ = syscall.WriteConsole(s.out, &esc[0], uint32(len(esc)), nil, nil) } func (s *cScreen) showCursor() { if s.vten { s.emitVtString(vtShowCursor) s.emitVtString(vtCursorStyles[s.cursorStyle]) } else { s.setCursorInfo(&cursorInfo{size: 100, visible: 1}) } } func (s *cScreen) hideCursor() { if s.vten { s.emitVtString(vtHideCursor) } else { s.setCursorInfo(&cursorInfo{size: 1, visible: 0}) } } func (s *cScreen) ShowCursor(x, y int) { s.Lock() if !s.fini { s.curx = x s.cury = y } s.doCursor() s.Unlock() } func (s *cScreen) SetCursorStyle(cs CursorStyle) { s.Lock() if !s.fini { if _, ok := vtCursorStyles[cs]; ok { s.cursorStyle = cs s.doCursor() } } s.Unlock() } func (s *cScreen) doCursor() { x, y := s.curx, s.cury if x < 0 || y < 0 || x >= s.w || y >= s.h { s.hideCursor() } else { s.setCursorPos(x, y, s.vten) s.showCursor() } } func (s *cScreen) HideCursor() { s.ShowCursor(-1, -1) } type inputRecord struct { typ uint16 _ uint16 data [16]byte } const ( keyEvent uint16 = 1 mouseEvent uint16 = 2 resizeEvent uint16 = 4 menuEvent uint16 = 8 // don't use focusEvent uint16 = 16 ) type mouseRecord struct { x int16 y int16 btns uint32 mod uint32 flags uint32 } type focusRecord struct { focused int32 // actually BOOL } const ( mouseHWheeled uint32 = 0x8 mouseVWheeled uint32 = 0x4 // mouseDoubleClick uint32 = 0x2 // mouseMoved uint32 = 0x1 ) type resizeRecord struct { x int16 y int16 } type keyRecord struct { isdown int32 repeat uint16 kcode uint16 scode uint16 ch uint16 mod uint32 } const ( // Constants per Microsoft. We don't put the modifiers // here. vkCancel = 0x03 vkBack = 0x08 // Backspace vkTab = 0x09 vkClear = 0x0c vkReturn = 0x0d vkPause = 0x13 vkEscape = 0x1b vkSpace = 0x20 vkPrior = 0x21 // PgUp vkNext = 0x22 // PgDn vkEnd = 0x23 vkHome = 0x24 vkLeft = 0x25 vkUp = 0x26 vkRight = 0x27 vkDown = 0x28 vkPrint = 0x2a vkPrtScr = 0x2c vkInsert = 0x2d vkDelete = 0x2e vkHelp = 0x2f vkF1 = 0x70 vkF2 = 0x71 vkF3 = 0x72 vkF4 = 0x73 vkF5 = 0x74 vkF6 = 0x75 vkF7 = 0x76 vkF8 = 0x77 vkF9 = 0x78 vkF10 = 0x79 vkF11 = 0x7a vkF12 = 0x7b vkF13 = 0x7c vkF14 = 0x7d vkF15 = 0x7e vkF16 = 0x7f vkF17 = 0x80 vkF18 = 0x81 vkF19 = 0x82 vkF20 = 0x83 vkF21 = 0x84 vkF22 = 0x85 vkF23 = 0x86 vkF24 = 0x87 ) var vkKeys = map[uint16]Key{ vkCancel: KeyCancel, vkBack: KeyBackspace, vkTab: KeyTab, vkClear: KeyClear, vkPause: KeyPause, vkPrint: KeyPrint, vkPrtScr: KeyPrint, vkPrior: KeyPgUp, vkNext: KeyPgDn, vkReturn: KeyEnter, vkEnd: KeyEnd, vkHome: KeyHome, vkLeft: KeyLeft, vkUp: KeyUp, vkRight: KeyRight, vkDown: KeyDown, vkInsert: KeyInsert, vkDelete: KeyDelete, vkHelp: KeyHelp, vkEscape: KeyEscape, vkSpace: ' ', vkF1: KeyF1, vkF2: KeyF2, vkF3: KeyF3, vkF4: KeyF4, vkF5: KeyF5, vkF6: KeyF6, vkF7: KeyF7, vkF8: KeyF8, vkF9: KeyF9, vkF10: KeyF10, vkF11: KeyF11, vkF12: KeyF12, vkF13: KeyF13, vkF14: KeyF14, vkF15: KeyF15, vkF16: KeyF16, vkF17: KeyF17, vkF18: KeyF18, vkF19: KeyF19, vkF20: KeyF20, vkF21: KeyF21, vkF22: KeyF22, vkF23: KeyF23, vkF24: KeyF24, } // NB: All Windows platforms are little endian. We assume this // never, ever change. The following code is endian safe. and does // not use unsafe pointers. func getu32(v []byte) uint32 { return uint32(v[0]) + (uint32(v[1]) << 8) + (uint32(v[2]) << 16) + (uint32(v[3]) << 24) } func geti32(v []byte) int32 { return int32(getu32(v)) } func getu16(v []byte) uint16 { return uint16(v[0]) + (uint16(v[1]) << 8) } func geti16(v []byte) int16 { return int16(getu16(v)) } // Convert windows dwControlKeyState to modifier mask func mod2mask(cks uint32) ModMask { mm := ModNone // Left or right control ctrl := (cks & (0x0008 | 0x0004)) != 0 // Left or right alt alt := (cks & (0x0002 | 0x0001)) != 0 // Filter out ctrl+alt (it means AltGr) if !(ctrl && alt) { if ctrl { mm |= ModCtrl } if alt { mm |= ModAlt } } // Any shift if (cks & 0x0010) != 0 { mm |= ModShift } return mm } func mrec2btns(mbtns, flags uint32) ButtonMask { btns := ButtonNone if mbtns&0x1 != 0 { btns |= Button1 } if mbtns&0x2 != 0 { btns |= Button2 } if mbtns&0x4 != 0 { btns |= Button3 } if mbtns&0x8 != 0 { btns |= Button4 } if mbtns&0x10 != 0 { btns |= Button5 } if mbtns&0x20 != 0 { btns |= Button6 } if mbtns&0x40 != 0 { btns |= Button7 } if mbtns&0x80 != 0 { btns |= Button8 } if flags&mouseVWheeled != 0 { if mbtns&0x80000000 == 0 { btns |= WheelUp } else { btns |= WheelDown } } if flags&mouseHWheeled != 0 { if mbtns&0x80000000 == 0 { btns |= WheelRight } else { btns |= WheelLeft } } return btns } func (s *cScreen) postEvent(ev Event) { select { case s.eventQ <- ev: case <-s.quit: } } func (s *cScreen) getConsoleInput() error { // cancelFlag comes first as WaitForMultipleObjects returns the lowest index // in the event that both events are signalled. waitObjects := []syscall.Handle{s.cancelflag, s.in} // As arrays are contiguous in memory, a pointer to the first object is the // same as a pointer to the array itself. pWaitObjects := unsafe.Pointer(&waitObjects[0]) rv, _, er := procWaitForMultipleObjects.Call( uintptr(len(waitObjects)), uintptr(pWaitObjects), uintptr(0), w32Infinite) // WaitForMultipleObjects returns WAIT_OBJECT_0 + the index. switch rv { case w32WaitObject0: // s.cancelFlag return errors.New("cancelled") case w32WaitObject0 + 1: // s.in rec := &inputRecord{} var nrec int32 rv, _, er := procReadConsoleInput.Call( uintptr(s.in), uintptr(unsafe.Pointer(rec)), uintptr(1), uintptr(unsafe.Pointer(&nrec))) if rv == 0 { return er } if nrec != 1 { return nil } switch rec.typ { case keyEvent: krec := &keyRecord{} krec.isdown = geti32(rec.data[0:]) krec.repeat = getu16(rec.data[4:]) krec.kcode = getu16(rec.data[6:]) krec.scode = getu16(rec.data[8:]) krec.ch = getu16(rec.data[10:]) krec.mod = getu32(rec.data[12:]) if krec.isdown == 0 || krec.repeat < 1 { // it's a key release event, ignore it return nil } if krec.ch != 0 { // synthesized key code for krec.repeat > 0 { // convert shift+tab to backtab if mod2mask(krec.mod) == ModShift && krec.ch == vkTab { s.postEvent(NewEventKey(KeyBacktab, 0, ModNone)) } else { s.postEvent(NewEventKey(KeyRune, rune(krec.ch), mod2mask(krec.mod))) } krec.repeat-- } return nil } key := KeyNUL // impossible on Windows ok := false if key, ok = vkKeys[krec.kcode]; !ok { return nil } for krec.repeat > 0 { s.postEvent(NewEventKey(key, rune(krec.ch), mod2mask(krec.mod))) krec.repeat-- } case mouseEvent: var mrec mouseRecord mrec.x = geti16(rec.data[0:]) mrec.y = geti16(rec.data[2:]) mrec.btns = getu32(rec.data[4:]) mrec.mod = getu32(rec.data[8:]) mrec.flags = getu32(rec.data[12:]) btns := mrec2btns(mrec.btns, mrec.flags) // we ignore double click, events are delivered normally s.postEvent(NewEventMouse(int(mrec.x), int(mrec.y), btns, mod2mask(mrec.mod))) case resizeEvent: var rrec resizeRecord rrec.x = geti16(rec.data[0:]) rrec.y = geti16(rec.data[2:]) s.postEvent(NewEventResize(int(rrec.x), int(rrec.y))) case focusEvent: var focus focusRecord focus.focused = geti32(rec.data[0:]) s.Lock() enabled := s.focusEnable s.Unlock() if enabled { s.postEvent(NewEventFocus(focus.focused != 0)) } default: } default: return er } return nil } func (s *cScreen) scanInput(stopQ chan struct{}) { defer s.wg.Done() for { select { case <-stopQ: return default: } if e := s.getConsoleInput(); e != nil { return } } } func (s *cScreen) Colors() int { if s.vten { return 1 << 24 } // Windows console can display 8 colors, in either low or high intensity return 16 } var vgaColors = map[Color]uint16{ ColorBlack: 0, ColorMaroon: 0x4, ColorGreen: 0x2, ColorNavy: 0x1, ColorOlive: 0x6, ColorPurple: 0x5, ColorTeal: 0x3, ColorSilver: 0x7, ColorGrey: 0x8, ColorRed: 0xc, ColorLime: 0xa, ColorBlue: 0x9, ColorYellow: 0xe, ColorFuchsia: 0xd, ColorAqua: 0xb, ColorWhite: 0xf, } // Windows uses RGB signals func mapColor2RGB(c Color) uint16 { winLock.Lock() if v, ok := winColors[c]; ok { c = v } else { v = FindColor(c, winPalette) winColors[c] = v c = v } winLock.Unlock() if vc, ok := vgaColors[c]; ok { return vc } return 0 } // Map a tcell style to Windows attributes func (s *cScreen) mapStyle(style Style) uint16 { f, b, a := style.Decompose() fa := s.oscreen.attrs & 0xf ba := (s.oscreen.attrs) >> 4 & 0xf if f != ColorDefault && f != ColorReset { fa = mapColor2RGB(f) } if b != ColorDefault && b != ColorReset { ba = mapColor2RGB(b) } var attr uint16 // We simulate reverse by doing the color swap ourselves. // Apparently windows cannot really do this except in DBCS // views. if a&AttrReverse != 0 { attr = ba attr |= fa << 4 } else { attr = fa attr |= ba << 4 } if a&AttrBold != 0 { attr |= 0x8 } if a&AttrDim != 0 { attr &^= 0x8 } if a&AttrUnderline != 0 { // Best effort -- doesn't seem to work though. attr |= 0x8000 } // Blink is unsupported return attr } func (s *cScreen) sendVtStyle(style Style) { esc := &strings.Builder{} fg, bg, attrs := style.Decompose() esc.WriteString(vtSgr0) if attrs&(AttrBold|AttrDim) == AttrBold { esc.WriteString(vtBold) } if attrs&AttrBlink != 0 { esc.WriteString(vtBlink) } if attrs&AttrUnderline != 0 { esc.WriteString(vtUnderline) } if attrs&AttrReverse != 0 { esc.WriteString(vtReverse) } if fg.IsRGB() { r, g, b := fg.RGB() _, _ = fmt.Fprintf(esc, vtSetFgRGB, r, g, b) } else if fg.Valid() { _, _ = fmt.Fprintf(esc, vtSetFg, fg&0xff) } if bg.IsRGB() { r, g, b := bg.RGB() _, _ = fmt.Fprintf(esc, vtSetBgRGB, r, g, b) } else if bg.Valid() { _, _ = fmt.Fprintf(esc, vtSetBg, bg&0xff) } s.emitVtString(esc.String()) } func (s *cScreen) writeString(x, y int, style Style, ch []uint16) { // we assume the caller has hidden the cursor if len(ch) == 0 { return } s.setCursorPos(x, y, s.vten) if s.vten { s.sendVtStyle(style) } else { _, _, _ = procSetConsoleTextAttribute.Call( uintptr(s.out), uintptr(s.mapStyle(style))) } _ = syscall.WriteConsole(s.out, &ch[0], uint32(len(ch)), nil, nil) } func (s *cScreen) draw() { // allocate a scratch line bit enough for no combining chars. // if you have combining characters, you may pay for extra allocations. buf := make([]uint16, 0, s.w) wcs := buf[:] lstyle := styleInvalid lx, ly := -1, -1 ra := make([]rune, 1) for y := 0; y < s.h; y++ { for x := 0; x < s.w; x++ { mainc, combc, style, width := s.cells.GetContent(x, y) dirty := s.cells.Dirty(x, y) if style == StyleDefault { style = s.style } if !dirty || style != lstyle { // write out any data queued thus far // because we are going to skip over some // cells, or because we need to change styles s.writeString(lx, ly, lstyle, wcs) wcs = buf[0:0] lstyle = StyleDefault if !dirty { continue } } if x > s.w-width { mainc = ' ' combc = nil width = 1 } if len(wcs) == 0 { lstyle = style lx = x ly = y } ra[0] = mainc wcs = append(wcs, utf16.Encode(ra)...) if len(combc) != 0 { wcs = append(wcs, utf16.Encode(combc)...) } for dx := 0; dx < width; dx++ { s.cells.SetDirty(x+dx, y, false) } x += width - 1 } s.writeString(lx, ly, lstyle, wcs) wcs = buf[0:0] lstyle = styleInvalid } } func (s *cScreen) Show() { s.Lock() if !s.fini { s.hideCursor() s.resize() s.draw() s.doCursor() } s.Unlock() } func (s *cScreen) Sync() { s.Lock() if !s.fini { s.cells.Invalidate() s.hideCursor() s.resize() s.draw() s.doCursor() } s.Unlock() } type consoleInfo struct { size coord pos coord attrs uint16 win rect maxsz coord } func (s *cScreen) getConsoleInfo(info *consoleInfo) { _, _, _ = procGetConsoleScreenBufferInfo.Call( uintptr(s.out), uintptr(unsafe.Pointer(info))) } func (s *cScreen) getCursorInfo(info *cursorInfo) { _, _, _ = procGetConsoleCursorInfo.Call( uintptr(s.out), uintptr(unsafe.Pointer(info))) } func (s *cScreen) setCursorInfo(info *cursorInfo) { _, _, _ = procSetConsoleCursorInfo.Call( uintptr(s.out), uintptr(unsafe.Pointer(info))) } func (s *cScreen) setCursorPos(x, y int, vtEnable bool) { if vtEnable { // Note that the string is Y first. Origin is 1,1. s.emitVtString(fmt.Sprintf(vtCursorPos, y+1, x+1)) } else { _, _, _ = procSetConsoleCursorPosition.Call( uintptr(s.out), coord{int16(x), int16(y)}.uintptr()) } } func (s *cScreen) setBufferSize(x, y int) { _, _, _ = procSetConsoleScreenBufferSize.Call( uintptr(s.out), coord{int16(x), int16(y)}.uintptr()) } func (s *cScreen) Size() (int, int) { s.Lock() w, h := s.w, s.h s.Unlock() return w, h } func (s *cScreen) SetSize(w, h int) { xy, _, _ := procGetLargestConsoleWindowSize.Call(uintptr(s.out)) // xy is little endian packed y := int(xy >> 16) x := int(xy & 0xffff) if x == 0 || y == 0 { return } // This is a hacky workaround for Windows Terminal. // Essentially Windows Terminal (Windows 11) does not support application // initiated resizing. To detect this, we look for an extremely large size // for the maximum width. If it is > 500, then this is almost certainly // Windows Terminal, and won't support this. (Note that the legacy console // does support application resizing.) if x >= 500 { return } s.setBufferSize(x, y) r := rect{0, 0, int16(w - 1), int16(h - 1)} _, _, _ = procSetConsoleWindowInfo.Call( uintptr(s.out), uintptr(1), uintptr(unsafe.Pointer(&r))) s.resize() } func (s *cScreen) resize() { info := consoleInfo{} s.getConsoleInfo(&info) w := int((info.win.right - info.win.left) + 1) h := int((info.win.bottom - info.win.top) + 1) if s.w == w && s.h == h { return } s.cells.Resize(w, h) s.w = w s.h = h s.setBufferSize(w, h) r := rect{0, 0, int16(w - 1), int16(h - 1)} _, _, _ = procSetConsoleWindowInfo.Call( uintptr(s.out), uintptr(1), uintptr(unsafe.Pointer(&r))) select { case s.eventQ <- NewEventResize(w, h): default: } } func (s *cScreen) clearScreen(style Style, vtEnable bool) { if vtEnable { s.sendVtStyle(style) row := strings.Repeat(" ", s.w) for y := 0; y < s.h; y++ { s.setCursorPos(0, y, vtEnable) s.emitVtString(row) } s.setCursorPos(0, 0, vtEnable) } else { pos := coord{0, 0} attr := s.mapStyle(style) x, y := s.w, s.h scratch := uint32(0) count := uint32(x * y) _, _, _ = procFillConsoleOutputAttribute.Call( uintptr(s.out), uintptr(attr), uintptr(count), pos.uintptr(), uintptr(unsafe.Pointer(&scratch))) _, _, _ = procFillConsoleOutputCharacter.Call( uintptr(s.out), uintptr(' '), uintptr(count), pos.uintptr(), uintptr(unsafe.Pointer(&scratch))) } } const ( // Input modes modeExtendFlg uint32 = 0x0080 modeMouseEn = 0x0010 modeResizeEn = 0x0008 // modeCooked = 0x0001 // modeVtInput = 0x0200 // Output modes modeCookedOut uint32 = 0x0001 modeVtOutput = 0x0004 modeNoAutoNL = 0x0008 modeUnderline = 0x0010 // ENABLE_LVB_GRID_WORLDWIDE, needed for underlines // modeWrapEOL = 0x0002 ) func (s *cScreen) setInMode(mode uint32) { _, _, _ = procSetConsoleMode.Call( uintptr(s.in), uintptr(mode)) } func (s *cScreen) setOutMode(mode uint32) { _, _, _ = procSetConsoleMode.Call( uintptr(s.out), uintptr(mode)) } func (s *cScreen) getInMode(v *uint32) { _, _, _ = procGetConsoleMode.Call( uintptr(s.in), uintptr(unsafe.Pointer(v))) } func (s *cScreen) getOutMode(v *uint32) { _, _, _ = procGetConsoleMode.Call( uintptr(s.out), uintptr(unsafe.Pointer(v))) } func (s *cScreen) SetStyle(style Style) { s.Lock() s.style = style s.Unlock() } // No fallback rune support, since we have Unicode. Yay! func (s *cScreen) RegisterRuneFallback(_ rune, _ string) { } func (s *cScreen) UnregisterRuneFallback(_ rune) { } func (s *cScreen) CanDisplay(_ rune, _ bool) bool { // We presume we can display anything -- we're Unicode. // (Sadly this not precisely true. Combining characters are especially // poorly supported under Windows.) return true } func (s *cScreen) HasMouse() bool { return true } func (s *cScreen) Resize(int, int, int, int) {} func (s *cScreen) HasKey(k Key) bool { // Microsoft has codes for some keys, but they are unusual, // so we don't include them. We include all the typical // 101, 105 key layout keys. valid := map[Key]bool{ KeyBackspace: true, KeyTab: true, KeyEscape: true, KeyPause: true, KeyPrint: true, KeyPgUp: true, KeyPgDn: true, KeyEnter: true, KeyEnd: true, KeyHome: true, KeyLeft: true, KeyUp: true, KeyRight: true, KeyDown: true, KeyInsert: true, KeyDelete: true, KeyF1: true, KeyF2: true, KeyF3: true, KeyF4: true, KeyF5: true, KeyF6: true, KeyF7: true, KeyF8: true, KeyF9: true, KeyF10: true, KeyF11: true, KeyF12: true, KeyRune: true, } return valid[k] } func (s *cScreen) Beep() error { // A simple beep. If the sound card is not available, the sound is generated // using the speaker. // // Reference: // https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-messagebeep const simpleBeep = 0xffffffff if rv, _, err := procMessageBeep.Call(simpleBeep); rv == 0 { return err } return nil } func (s *cScreen) Suspend() error { s.disengage() return nil } func (s *cScreen) Resume() error { return s.engage() } func (s *cScreen) Tty() (Tty, bool) { return nil, false } func (s *cScreen) GetCells() *CellBuffer { return &s.cells } func (s *cScreen) EventQ() chan Event { return s.eventQ } func (s *cScreen) StopQ() <-chan struct{} { return s.quit } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/doc.go ================================================ // Copyright 2018 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // Package tcell provides a lower-level, portable API for building // programs that interact with terminals or consoles. It works with // both common (and many uncommon!) terminals or terminal emulators, // and Windows console implementations. // // It provides support for up to 256 colors, text attributes, and box drawing // elements. A database of terminals built from a real terminfo database // is provided, along with code to generate new database entries. // // Tcell offers very rich support for mice, dependent upon the terminal // of course. (Windows, XTerm, and iTerm 2 are known to work very well.) // // If the environment is not Unicode by default, such as an ISO8859 based // locale or GB18030, Tcell can convert input and output, so that your // terminal can operate in whatever locale is most convenient, while the // application program can just assume "everything is UTF-8". Reasonable // defaults are used for updating characters to something suitable for // display. Unicode box drawing characters will be converted to use the // alternate character set of your terminal, if native conversions are // not available. If no ACS is available, then some ASCII fallbacks will // be used. // // Note that support for non-UTF-8 locales (other than C) must be enabled // by the application using RegisterEncoding() -- we don't have them all // enabled by default to avoid bloating the application unnecessarily. // (These days UTF-8 is good enough for almost everyone, and nobody should // be using legacy locales anymore.) Also, actual glyphs for various code // point will only be displayed if your terminal or emulator (or the font // the emulator is using) supports them. // // A rich set of key codes is supported, with support for up to 65 function // keys, and various other special keys. package tcell ================================================ FILE: vendor/github.com/gdamore/tcell/v2/encoding.go ================================================ // Copyright 2022 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell import ( "strings" "sync" "golang.org/x/text/encoding" gencoding "github.com/gdamore/encoding" ) var encodings map[string]encoding.Encoding var encodingLk sync.Mutex var encodingFallback EncodingFallback = EncodingFallbackFail // RegisterEncoding may be called by the application to register an encoding. // The presence of additional encodings will facilitate application usage with // terminal environments where the I/O subsystem does not support Unicode. // // Windows systems use Unicode natively, and do not need any of the encoding // subsystem when using Windows Console screens. // // Please see the Go documentation for golang.org/x/text/encoding -- most of // the common ones exist already as stock variables. For example, ISO8859-15 // can be registered using the following code: // // import "golang.org/x/text/encoding/charmap" // // ... // RegisterEncoding("ISO8859-15", charmap.ISO8859_15) // // Aliases can be registered as well, for example "8859-15" could be an alias // for "ISO8859-15". // // For POSIX systems, this package will check the environment variables // LC_ALL, LC_CTYPE, and LANG (in that order) to determine the character set. // These are expected to have the following pattern: // // $language[.$codeset[@$variant] // // We extract only the $codeset part, which will usually be something like // UTF-8 or ISO8859-15 or KOI8-R. Note that if the locale is either "POSIX" // or "C", then we assume US-ASCII (the POSIX 'portable character set' // and assume all other characters are somehow invalid.) // // Modern POSIX systems and terminal emulators may use UTF-8, and for those // systems, this API is also unnecessary. For example, Darwin (MacOS X) and // modern Linux running modern xterm generally will out of the box without // any of this. Use of UTF-8 is recommended when possible, as it saves // quite a lot processing overhead. // // Note that some encodings are quite large (for example GB18030 which is a // superset of Unicode) and so the application size can be expected to // increase quite a bit as each encoding is added. // The East Asian encodings have been seen to add 100-200K per encoding to the // size of the resulting binary. func RegisterEncoding(charset string, enc encoding.Encoding) { encodingLk.Lock() charset = strings.ToLower(charset) encodings[charset] = enc encodingLk.Unlock() } // EncodingFallback describes how the system behaves when the locale // requires a character set that we do not support. The system always // supports UTF-8 and US-ASCII. On Windows consoles, UTF-16LE is also // supported automatically. Other character sets must be added using the // RegisterEncoding API. (A large group of nearly all of them can be // added using the RegisterAll function in the encoding sub package.) type EncodingFallback int const ( // EncodingFallbackFail behavior causes GetEncoding to fail // when it cannot find an encoding. EncodingFallbackFail = iota // EncodingFallbackASCII behavior causes GetEncoding to fall back // to a 7-bit ASCII encoding, if no other encoding can be found. EncodingFallbackASCII // EncodingFallbackUTF8 behavior causes GetEncoding to assume // UTF8 can pass unmodified upon failure. Note that this behavior // is not recommended, unless you are sure your terminal can cope // with real UTF8 sequences. EncodingFallbackUTF8 ) // SetEncodingFallback changes the behavior of GetEncoding when a suitable // encoding is not found. The default is EncodingFallbackFail, which // causes GetEncoding to simply return nil. func SetEncodingFallback(fb EncodingFallback) { encodingLk.Lock() encodingFallback = fb encodingLk.Unlock() } // GetEncoding is used by Screen implementors who want to locate an encoding // for the given character set name. Note that this will return nil for // either the Unicode (UTF-8) or ASCII encodings, since we don't use // encodings for them but instead have our own native methods. func GetEncoding(charset string) encoding.Encoding { charset = strings.ToLower(charset) encodingLk.Lock() defer encodingLk.Unlock() if enc, ok := encodings[charset]; ok { return enc } switch encodingFallback { case EncodingFallbackASCII: return gencoding.ASCII case EncodingFallbackUTF8: return encoding.Nop } return nil } func init() { // We always support UTF-8 and ASCII. encodings = make(map[string]encoding.Encoding) encodings["utf-8"] = gencoding.UTF8 encodings["utf8"] = gencoding.UTF8 encodings["us-ascii"] = gencoding.ASCII encodings["ascii"] = gencoding.ASCII encodings["iso646"] = gencoding.ASCII } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/errors.go ================================================ // Copyright 2015 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell import ( "errors" "time" "github.com/gdamore/tcell/v2/terminfo" ) var ( // ErrTermNotFound indicates that a suitable terminal entry could // not be found. This can result from either not having TERM set, // or from the TERM failing to support certain minimal functionality, // in particular absolute cursor addressability (the cup capability) // is required. For example, legacy "adm3" lacks this capability, // whereas the slightly newer "adm3a" supports it. This failure // occurs most often with "dumb". ErrTermNotFound = terminfo.ErrTermNotFound // ErrNoScreen indicates that no suitable screen could be found. // This may result from attempting to run on a platform where there // is no support for either termios or console I/O (such as nacl), // or from running in an environment where there is no access to // a suitable console/terminal device. (For example, running on // without a controlling TTY or with no /dev/tty on POSIX platforms.) ErrNoScreen = errors.New("no suitable screen available") // ErrNoCharset indicates that the locale environment the // program is not supported by the program, because no suitable // encoding was found for it. This problem never occurs if // the environment is UTF-8 or UTF-16. ErrNoCharset = errors.New("character set not supported") // ErrEventQFull indicates that the event queue is full, and // cannot accept more events. ErrEventQFull = errors.New("event queue full") ) // An EventError is an event representing some sort of error, and carries // an error payload. type EventError struct { t time.Time err error } // When returns the time when the event was created. func (ev *EventError) When() time.Time { return ev.t } // Error implements the error. func (ev *EventError) Error() string { return ev.err.Error() } // NewEventError creates an ErrorEvent with the given error payload. func NewEventError(err error) *EventError { return &EventError{t: time.Now(), err: err} } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/event.go ================================================ // Copyright 2015 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell import ( "time" ) // Event is a generic interface used for passing around Events. // Concrete types follow. type Event interface { // When reports the time when the event was generated. When() time.Time } // EventTime is a simple base event class, suitable for easy reuse. // It can be used to deliver actual timer events as well. type EventTime struct { when time.Time } // When returns the time stamp when the event occurred. func (e *EventTime) When() time.Time { return e.when } // SetEventTime sets the time of occurrence for the event. func (e *EventTime) SetEventTime(t time.Time) { e.when = t } // SetEventNow sets the time of occurrence for the event to the current time. func (e *EventTime) SetEventNow() { e.SetEventTime(time.Now()) } // EventHandler is anything that handles events. If the handler has // consumed the event, it should return true. False otherwise. type EventHandler interface { HandleEvent(Event) bool } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/focus.go ================================================ // Copyright 2023 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell // EventFocus is a focus event. It is sent when the terminal window (or tab) // gets or loses focus. type EventFocus struct { *EventTime // True if the window received focus, false if it lost focus Focused bool } func NewEventFocus(focused bool) *EventFocus { return &EventFocus{Focused: focused} } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/interrupt.go ================================================ // Copyright 2015 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell import ( "time" ) // EventInterrupt is a generic wakeup event. Its can be used to // to request a redraw. It can carry an arbitrary payload, as well. type EventInterrupt struct { t time.Time v interface{} } // When returns the time when this event was created. func (ev *EventInterrupt) When() time.Time { return ev.t } // Data is used to obtain the opaque event payload. func (ev *EventInterrupt) Data() interface{} { return ev.v } // NewEventInterrupt creates an EventInterrupt with the given payload. func NewEventInterrupt(data interface{}) *EventInterrupt { return &EventInterrupt{t: time.Now(), v: data} } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/key.go ================================================ // Copyright 2016 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell import ( "fmt" "strings" "time" ) // EventKey represents a key press. Usually this is a key press followed // by a key release, but since terminal programs don't have a way to report // key release events, we usually get just one event. If a key is held down // then the terminal may synthesize repeated key presses at some predefined // rate. We have no control over that, nor visibility into it. // // In some cases, we can have a modifier key, such as ModAlt, that can be // generated with a key press. (This usually is represented by having the // high bit set, or in some cases, by sending an ESC prior to the rune.) // // If the value of Key() is KeyRune, then the actual key value will be // available with the Rune() method. This will be the case for most keys. // In most situations, the modifiers will not be set. For example, if the // rune is 'A', this will be reported without the ModShift bit set, since // really can't tell if the Shift key was pressed (it might have been CAPSLOCK, // or a terminal that only can send capitals, or keyboard with separate // capital letters from lower case letters). // // Generally, terminal applications have far less visibility into keyboard // activity than graphical applications. Hence, they should avoid depending // overly much on availability of modifiers, or the availability of any // specific keys. type EventKey struct { t time.Time mod ModMask key Key ch rune } // When returns the time when this Event was created, which should closely // match the time when the key was pressed. func (ev *EventKey) When() time.Time { return ev.t } // Rune returns the rune corresponding to the key press, if it makes sense. // The result is only defined if the value of Key() is KeyRune. func (ev *EventKey) Rune() rune { return ev.ch } // Key returns a virtual key code. We use this to identify specific key // codes, such as KeyEnter, etc. Most control and function keys are reported // with unique Key values. Normal alphanumeric and punctuation keys will // generally return KeyRune here; the specific key can be further decoded // using the Rune() function. func (ev *EventKey) Key() Key { return ev.key } // Modifiers returns the modifiers that were present with the key press. Note // that not all platforms and terminals support this equally well, and some // cases we will not not know for sure. Hence, applications should avoid // using this in most circumstances. func (ev *EventKey) Modifiers() ModMask { return ev.mod } // KeyNames holds the written names of special keys. Useful to echo back a key // name, or to look up a key from a string value. var KeyNames = map[Key]string{ KeyEnter: "Enter", KeyBackspace: "Backspace", KeyTab: "Tab", KeyBacktab: "Backtab", KeyEsc: "Esc", KeyBackspace2: "Backspace2", KeyDelete: "Delete", KeyInsert: "Insert", KeyUp: "Up", KeyDown: "Down", KeyLeft: "Left", KeyRight: "Right", KeyHome: "Home", KeyEnd: "End", KeyUpLeft: "UpLeft", KeyUpRight: "UpRight", KeyDownLeft: "DownLeft", KeyDownRight: "DownRight", KeyCenter: "Center", KeyPgDn: "PgDn", KeyPgUp: "PgUp", KeyClear: "Clear", KeyExit: "Exit", KeyCancel: "Cancel", KeyPause: "Pause", KeyPrint: "Print", KeyF1: "F1", KeyF2: "F2", KeyF3: "F3", KeyF4: "F4", KeyF5: "F5", KeyF6: "F6", KeyF7: "F7", KeyF8: "F8", KeyF9: "F9", KeyF10: "F10", KeyF11: "F11", KeyF12: "F12", KeyF13: "F13", KeyF14: "F14", KeyF15: "F15", KeyF16: "F16", KeyF17: "F17", KeyF18: "F18", KeyF19: "F19", KeyF20: "F20", KeyF21: "F21", KeyF22: "F22", KeyF23: "F23", KeyF24: "F24", KeyF25: "F25", KeyF26: "F26", KeyF27: "F27", KeyF28: "F28", KeyF29: "F29", KeyF30: "F30", KeyF31: "F31", KeyF32: "F32", KeyF33: "F33", KeyF34: "F34", KeyF35: "F35", KeyF36: "F36", KeyF37: "F37", KeyF38: "F38", KeyF39: "F39", KeyF40: "F40", KeyF41: "F41", KeyF42: "F42", KeyF43: "F43", KeyF44: "F44", KeyF45: "F45", KeyF46: "F46", KeyF47: "F47", KeyF48: "F48", KeyF49: "F49", KeyF50: "F50", KeyF51: "F51", KeyF52: "F52", KeyF53: "F53", KeyF54: "F54", KeyF55: "F55", KeyF56: "F56", KeyF57: "F57", KeyF58: "F58", KeyF59: "F59", KeyF60: "F60", KeyF61: "F61", KeyF62: "F62", KeyF63: "F63", KeyF64: "F64", KeyCtrlA: "Ctrl-A", KeyCtrlB: "Ctrl-B", KeyCtrlC: "Ctrl-C", KeyCtrlD: "Ctrl-D", KeyCtrlE: "Ctrl-E", KeyCtrlF: "Ctrl-F", KeyCtrlG: "Ctrl-G", KeyCtrlJ: "Ctrl-J", KeyCtrlK: "Ctrl-K", KeyCtrlL: "Ctrl-L", KeyCtrlN: "Ctrl-N", KeyCtrlO: "Ctrl-O", KeyCtrlP: "Ctrl-P", KeyCtrlQ: "Ctrl-Q", KeyCtrlR: "Ctrl-R", KeyCtrlS: "Ctrl-S", KeyCtrlT: "Ctrl-T", KeyCtrlU: "Ctrl-U", KeyCtrlV: "Ctrl-V", KeyCtrlW: "Ctrl-W", KeyCtrlX: "Ctrl-X", KeyCtrlY: "Ctrl-Y", KeyCtrlZ: "Ctrl-Z", KeyCtrlSpace: "Ctrl-Space", KeyCtrlUnderscore: "Ctrl-_", KeyCtrlRightSq: "Ctrl-]", KeyCtrlBackslash: "Ctrl-\\", KeyCtrlCarat: "Ctrl-^", } // Name returns a printable value or the key stroke. This can be used // when printing the event, for example. func (ev *EventKey) Name() string { s := "" m := []string{} if ev.mod&ModShift != 0 { m = append(m, "Shift") } if ev.mod&ModAlt != 0 { m = append(m, "Alt") } if ev.mod&ModMeta != 0 { m = append(m, "Meta") } if ev.mod&ModCtrl != 0 { m = append(m, "Ctrl") } ok := false if s, ok = KeyNames[ev.key]; !ok { if ev.key == KeyRune { s = "Rune[" + string(ev.ch) + "]" } else { s = fmt.Sprintf("Key[%d,%d]", ev.key, int(ev.ch)) } } if len(m) != 0 { if ev.mod&ModCtrl != 0 && strings.HasPrefix(s, "Ctrl-") { s = s[5:] } return fmt.Sprintf("%s+%s", strings.Join(m, "+"), s) } return s } // NewEventKey attempts to create a suitable event. It parses the various // ASCII control sequences if KeyRune is passed for Key, but if the caller // has more precise information it should set that specifically. Callers // that aren't sure about modifier state (most) should just pass ModNone. func NewEventKey(k Key, ch rune, mod ModMask) *EventKey { if k == KeyRune && (ch < ' ' || ch == 0x7f) { // Turn specials into proper key codes. This is for // control characters and the DEL. k = Key(ch) if mod == ModNone && ch < ' ' { switch Key(ch) { case KeyBackspace, KeyTab, KeyEsc, KeyEnter: // these keys are directly typeable without CTRL default: // most likely entered with a CTRL keypress mod = ModCtrl } } } return &EventKey{t: time.Now(), key: k, ch: ch, mod: mod} } // ModMask is a mask of modifier keys. Note that it will not always be // possible to report modifier keys. type ModMask int16 // These are the modifiers keys that can be sent either with a key press, // or a mouse event. Note that as of now, due to the confusion associated // with Meta, and the lack of support for it on many/most platforms, the // current implementations never use it. Instead, they use ModAlt, even for // events that could possibly have been distinguished from ModAlt. const ( ModShift ModMask = 1 << iota ModCtrl ModAlt ModMeta ModNone ModMask = 0 ) // Key is a generic value for representing keys, and especially special // keys (function keys, cursor movement keys, etc.) For normal keys, like // ASCII letters, we use KeyRune, and then expect the application to // inspect the Rune() member of the EventKey. type Key int16 // This is the list of named keys. KeyRune is special however, in that it is // a place holder key indicating that a printable character was sent. The // actual value of the rune will be transported in the Rune of the associated // EventKey. const ( KeyRune Key = iota + 256 KeyUp KeyDown KeyRight KeyLeft KeyUpLeft KeyUpRight KeyDownLeft KeyDownRight KeyCenter KeyPgUp KeyPgDn KeyHome KeyEnd KeyInsert KeyDelete KeyHelp KeyExit KeyClear KeyCancel KeyPrint KeyPause KeyBacktab KeyF1 KeyF2 KeyF3 KeyF4 KeyF5 KeyF6 KeyF7 KeyF8 KeyF9 KeyF10 KeyF11 KeyF12 KeyF13 KeyF14 KeyF15 KeyF16 KeyF17 KeyF18 KeyF19 KeyF20 KeyF21 KeyF22 KeyF23 KeyF24 KeyF25 KeyF26 KeyF27 KeyF28 KeyF29 KeyF30 KeyF31 KeyF32 KeyF33 KeyF34 KeyF35 KeyF36 KeyF37 KeyF38 KeyF39 KeyF40 KeyF41 KeyF42 KeyF43 KeyF44 KeyF45 KeyF46 KeyF47 KeyF48 KeyF49 KeyF50 KeyF51 KeyF52 KeyF53 KeyF54 KeyF55 KeyF56 KeyF57 KeyF58 KeyF59 KeyF60 KeyF61 KeyF62 KeyF63 KeyF64 ) const ( // These key codes are used internally, and will never appear to applications. keyPasteStart Key = iota + 16384 keyPasteEnd ) // These are the control keys. Note that they overlap with other keys, // perhaps. For example, KeyCtrlH is the same as KeyBackspace. const ( KeyCtrlSpace Key = iota KeyCtrlA KeyCtrlB KeyCtrlC KeyCtrlD KeyCtrlE KeyCtrlF KeyCtrlG KeyCtrlH KeyCtrlI KeyCtrlJ KeyCtrlK KeyCtrlL KeyCtrlM KeyCtrlN KeyCtrlO KeyCtrlP KeyCtrlQ KeyCtrlR KeyCtrlS KeyCtrlT KeyCtrlU KeyCtrlV KeyCtrlW KeyCtrlX KeyCtrlY KeyCtrlZ KeyCtrlLeftSq // Escape KeyCtrlBackslash KeyCtrlRightSq KeyCtrlCarat KeyCtrlUnderscore ) // Special values - these are fixed in an attempt to make it more likely // that aliases will encode the same way. // These are the defined ASCII values for key codes. They generally match // with KeyCtrl values. const ( KeyNUL Key = iota KeySOH KeySTX KeyETX KeyEOT KeyENQ KeyACK KeyBEL KeyBS KeyTAB KeyLF KeyVT KeyFF KeyCR KeySO KeySI KeyDLE KeyDC1 KeyDC2 KeyDC3 KeyDC4 KeyNAK KeySYN KeyETB KeyCAN KeyEM KeySUB KeyESC KeyFS KeyGS KeyRS KeyUS KeyDEL Key = 0x7F ) // These keys are aliases for other names. const ( KeyBackspace = KeyBS KeyTab = KeyTAB KeyEsc = KeyESC KeyEscape = KeyESC KeyEnter = KeyCR KeyBackspace2 = KeyDEL ) ================================================ FILE: vendor/github.com/gdamore/tcell/v2/mouse.go ================================================ // Copyright 2020 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell import ( "time" ) // EventMouse is a mouse event. It is sent on either mouse up or mouse down // events. It is also sent on mouse motion events - if the terminal supports // it. We make every effort to ensure that mouse release events are delivered. // Hence, click drag can be identified by a motion event with the mouse down, // without any intervening button release. On some terminals only the initiating // press and terminating release event will be delivered. // // Mouse wheel events, when reported, may appear on their own as individual // impulses; that is, there will normally not be a release event delivered // for mouse wheel movements. // // Most terminals cannot report the state of more than one button at a time -- // and some cannot report motion events unless a button is pressed. // // Applications can inspect the time between events to resolve double or // triple clicks. type EventMouse struct { t time.Time btn ButtonMask mod ModMask x int y int } // When returns the time when this EventMouse was created. func (ev *EventMouse) When() time.Time { return ev.t } // Buttons returns the list of buttons that were pressed or wheel motions. func (ev *EventMouse) Buttons() ButtonMask { return ev.btn } // Modifiers returns a list of keyboard modifiers that were pressed // with the mouse button(s). func (ev *EventMouse) Modifiers() ModMask { return ev.mod } // Position returns the mouse position in character cells. The origin // 0, 0 is at the upper left corner. func (ev *EventMouse) Position() (int, int) { return ev.x, ev.y } // NewEventMouse is used to create a new mouse event. Applications // shouldn't need to use this; its mostly for screen implementors. func NewEventMouse(x, y int, btn ButtonMask, mod ModMask) *EventMouse { return &EventMouse{t: time.Now(), x: x, y: y, btn: btn, mod: mod} } // ButtonMask is a mask of mouse buttons and wheel events. Mouse button presses // are normally delivered as both press and release events. Mouse wheel events // are normally just single impulse events. Windows supports up to eight // separate buttons plus all four wheel directions, but XTerm can only support // mouse buttons 1-3 and wheel up/down. Its not unheard of for terminals // to support only one or two buttons (think Macs). Old terminals, and true // emulations (such as vt100) won't support mice at all, of course. type ButtonMask int16 // These are the actual button values. Note that tcell version 1.x reversed buttons // two and three on *nix based terminals. We use button 1 as the primary, and // button 2 as the secondary, and button 3 (which is often missing) as the middle. const ( Button1 ButtonMask = 1 << iota // Usually the left (primary) mouse button. Button2 // Usually the right (secondary) mouse button. Button3 // Usually the middle mouse button. Button4 // Often a side button (thumb/next). Button5 // Often a side button (thumb/prev). Button6 Button7 Button8 WheelUp // Wheel motion up/away from user. WheelDown // Wheel motion down/towards user. WheelLeft // Wheel motion to left. WheelRight // Wheel motion to right. ButtonNone ButtonMask = 0 // No button or wheel events. ButtonPrimary = Button1 ButtonSecondary = Button2 ButtonMiddle = Button3 ) ================================================ FILE: vendor/github.com/gdamore/tcell/v2/nonblock_bsd.go ================================================ // Copyright 2021 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. //go:build darwin || dragonfly || freebsd || netbsd || openbsd // +build darwin dragonfly freebsd netbsd openbsd package tcell import ( "syscall" "golang.org/x/sys/unix" ) // BSD systems use TIOC style ioctls. // tcSetBufParams is used by the tty driver on UNIX systems to configure the // buffering parameters (minimum character count and minimum wait time in msec.) // This also waits for output to drain first. func tcSetBufParams(fd int, vMin uint8, vTime uint8) error { _ = syscall.SetNonblock(fd, true) tio, err := unix.IoctlGetTermios(fd, unix.TIOCGETA) if err != nil { return err } tio.Cc[unix.VMIN] = vMin tio.Cc[unix.VTIME] = vTime if err = unix.IoctlSetTermios(fd, unix.TIOCSETAW, tio); err != nil { return err } return nil } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/nonblock_unix.go ================================================ // Copyright 2021 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. //go:build linux || aix || zos || solaris // +build linux aix zos solaris package tcell import ( "syscall" "golang.org/x/sys/unix" ) // tcSetBufParams is used by the tty driver on UNIX systems to configure the // buffering parameters (minimum character count and minimum wait time in msec.) // This also waits for output to drain first. func tcSetBufParams(fd int, vMin uint8, vTime uint8) error { _ = syscall.SetNonblock(fd, true) tio, err := unix.IoctlGetTermios(fd, unix.TCGETS) if err != nil { return err } tio.Cc[unix.VMIN] = vMin tio.Cc[unix.VTIME] = vTime if err = unix.IoctlSetTermios(fd, unix.TCSETSW, tio); err != nil { return err } return nil } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/paste.go ================================================ // Copyright 2020 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell import ( "time" ) // EventPaste is used to mark the start and end of a bracketed paste. // An event with .Start() true will be sent to mark the start. // Then a number of keys will be sent to indicate that the content // is pasted in. At the end, an event with .Start() false will be sent. type EventPaste struct { start bool t time.Time } // When returns the time when this EventPaste was created. func (ev *EventPaste) When() time.Time { return ev.t } // Start returns true if this is the start of a paste. func (ev *EventPaste) Start() bool { return ev.start } // End returns true if this is the end of a paste. func (ev *EventPaste) End() bool { return !ev.start } // NewEventPaste returns a new EventPaste. func NewEventPaste(start bool) *EventPaste { return &EventPaste{t: time.Now(), start: start} } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/resize.go ================================================ // Copyright 2015 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell import ( "time" ) // EventResize is sent when the window size changes. type EventResize struct { t time.Time ws WindowSize } // NewEventResize creates an EventResize with the new updated window size, // which is given in character cells. func NewEventResize(width, height int) *EventResize { ws := WindowSize{ Width: width, Height: height, } return &EventResize{t: time.Now(), ws: ws} } // When returns the time when the Event was created. func (ev *EventResize) When() time.Time { return ev.t } // Size returns the new window size as width, height in character cells. func (ev *EventResize) Size() (int, int) { return ev.ws.Width, ev.ws.Height } // PixelSize returns the new window size as width, height in pixels. The size // will be 0,0 if the screen doesn't support this feature func (ev *EventResize) PixelSize() (int, int) { return ev.ws.PixelWidth, ev.ws.PixelHeight } type WindowSize struct { Width int Height int PixelWidth int PixelHeight int } // CellDimensions returns the dimensions of a single cell, in pixels func (ws WindowSize) CellDimensions() (int, int) { if ws.PixelWidth == 0 || ws.PixelHeight == 0 { return 0, 0 } return (ws.PixelWidth / ws.Width), (ws.PixelHeight / ws.Height) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/runes.go ================================================ // Copyright 2015 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell // The names of these constants are chosen to match Terminfo names, // modulo case, and changing the prefix from ACS_ to Rune. These are // the runes we provide extra special handling for, with ASCII fallbacks // for terminals that lack them. const ( RuneSterling = '£' RuneDArrow = '↓' RuneLArrow = '←' RuneRArrow = '→' RuneUArrow = '↑' RuneBullet = '·' RuneBoard = '░' RuneCkBoard = '▒' RuneDegree = '°' RuneDiamond = '◆' RuneGEqual = '≥' RunePi = 'π' RuneHLine = '─' RuneLantern = '§' RunePlus = '┼' RuneLEqual = '≤' RuneLLCorner = '└' RuneLRCorner = '┘' RuneNEqual = '≠' RunePlMinus = '±' RuneS1 = '⎺' RuneS3 = '⎻' RuneS7 = '⎼' RuneS9 = '⎽' RuneBlock = '█' RuneTTee = '┬' RuneRTee = '┤' RuneLTee = '├' RuneBTee = '┴' RuneULCorner = '┌' RuneURCorner = '┐' RuneVLine = '│' ) // RuneFallbacks is the default map of fallback strings that will be // used to replace a rune when no other more appropriate transformation // is available, and the rune cannot be displayed directly. // // New entries may be added to this map over time, as it becomes clear // that such is desirable. Characters that represent either letters or // numbers should not be added to this list unless it is certain that // the meaning will still convey unambiguously. // // As an example, it would be appropriate to add an ASCII mapping for // the full width form of the letter 'A', but it would not be appropriate // to do so a glyph representing the country China. // // Programs that desire richer fallbacks may register additional ones, // or change or even remove these mappings with Screen.RegisterRuneFallback // Screen.UnregisterRuneFallback methods. // // Note that Unicode is presumed to be able to display all glyphs. // This is a pretty poor assumption, but there is no easy way to // figure out which glyphs are supported in a given font. Hence, // some care in selecting the characters you support in your application // is still appropriate. var RuneFallbacks = map[rune]string{ RuneSterling: "f", RuneDArrow: "v", RuneLArrow: "<", RuneRArrow: ">", RuneUArrow: "^", RuneBullet: "o", RuneBoard: "#", RuneCkBoard: ":", RuneDegree: "\\", RuneDiamond: "+", RuneGEqual: ">", RunePi: "*", RuneHLine: "-", RuneLantern: "#", RunePlus: "+", RuneLEqual: "<", RuneLLCorner: "+", RuneLRCorner: "+", RuneNEqual: "!", RunePlMinus: "#", RuneS1: "~", RuneS3: "-", RuneS7: "-", RuneS9: "_", RuneBlock: "#", RuneTTee: "+", RuneRTee: "+", RuneLTee: "+", RuneBTee: "+", RuneULCorner: "+", RuneURCorner: "+", RuneVLine: "|", } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/screen.go ================================================ // Copyright 2023 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell import "sync" // Screen represents the physical (or emulated) screen. // This can be a terminal window or a physical console. Platforms implement // this differently. type Screen interface { // Init initializes the screen for use. Init() error // Fini finalizes the screen also releasing resources. Fini() // Clear logically erases the screen. // This is effectively a short-cut for Fill(' ', StyleDefault). Clear() // Fill fills the screen with the given character and style. // The effect of filling the screen is not visible until Show // is called (or Sync). Fill(rune, Style) // SetCell is an older API, and will be removed. Please use // SetContent instead; SetCell is implemented in terms of SetContent. SetCell(x int, y int, style Style, ch ...rune) // GetContent returns the contents at the given location. If the // coordinates are out of range, then the values will be 0, nil, // StyleDefault. Note that the contents returned are logical contents // and may not actually be what is displayed, but rather are what will // be displayed if Show() or Sync() is called. The width is the width // in screen cells; most often this will be 1, but some East Asian // characters and emoji require two cells. GetContent(x, y int) (primary rune, combining []rune, style Style, width int) // SetContent sets the contents of the given cell location. If // the coordinates are out of range, then the operation is ignored. // // The first rune is the primary non-zero width rune. The array // that follows is a possible list of combining characters to append, // and will usually be nil (no combining characters.) // // The results are not displayed until Show() or Sync() is called. // // Note that wide (East Asian full width and emoji) runes occupy two cells, // and attempts to place character at next cell to the right will have // undefined effects. Wide runes that are printed in the // last column will be replaced with a single width space on output. SetContent(x int, y int, primary rune, combining []rune, style Style) // SetStyle sets the default style to use when clearing the screen // or when StyleDefault is specified. If it is also StyleDefault, // then whatever system/terminal default is relevant will be used. SetStyle(style Style) // ShowCursor is used to display the cursor at a given location. // If the coordinates -1, -1 are given or are otherwise outside the // dimensions of the screen, the cursor will be hidden. ShowCursor(x int, y int) // HideCursor is used to hide the cursor. It's an alias for // ShowCursor(-1, -1).sim HideCursor() // SetCursorStyle is used to set the cursor style. If the style // is not supported (or cursor styles are not supported at all), // then this will have no effect. SetCursorStyle(CursorStyle) // Size returns the screen size as width, height. This changes in // response to a call to Clear or Flush. Size() (width, height int) // ChannelEvents is an infinite loop that waits for an event and // channels it into the user provided channel ch. Closing the // quit channel and calling the Fini method are cancellation // signals. When a cancellation signal is received the method // returns after closing ch. // // This method should be used as a goroutine. // // NOTE: PollEvent should not be called while this method is running. ChannelEvents(ch chan<- Event, quit <-chan struct{}) // PollEvent waits for events to arrive. Main application loops // must spin on this to prevent the application from stalling. // Furthermore, this will return nil if the Screen is finalized. PollEvent() Event // HasPendingEvent returns true if PollEvent would return an event // without blocking. If the screen is stopped and PollEvent would // return nil, then the return value from this function is unspecified. // The purpose of this function is to allow multiple events to be collected // at once, to minimize screen redraws. HasPendingEvent() bool // PostEvent tries to post an event into the event stream. This // can fail if the event queue is full. In that case, the event // is dropped, and ErrEventQFull is returned. PostEvent(ev Event) error // Deprecated: PostEventWait is unsafe, and will be removed // in the future. // // PostEventWait is like PostEvent, but if the queue is full, it // blocks until there is space in the queue, making delivery // reliable. However, it is VERY important that this function // never be called from within whatever event loop is polling // with PollEvent(), otherwise a deadlock may arise. // // For this reason, when using this function, the use of a // Goroutine is recommended to ensure no deadlock can occur. PostEventWait(ev Event) // EnableMouse enables the mouse. (If your terminal supports it.) // If no flags are specified, then all events are reported, if the // terminal supports them. EnableMouse(...MouseFlags) // DisableMouse disables the mouse. DisableMouse() // EnablePaste enables bracketed paste mode, if supported. EnablePaste() // DisablePaste disables bracketed paste mode. DisablePaste() // EnableFocus enables reporting of focus events, if your terminal supports it. EnableFocus() // DisableFocus disables reporting of focus events. DisableFocus() // HasMouse returns true if the terminal (apparently) supports a // mouse. Note that the return value of true doesn't guarantee that // a mouse/pointing device is present; a false return definitely // indicates no mouse support is available. HasMouse() bool // Colors returns the number of colors. All colors are assumed to // use the ANSI color map. If a terminal is monochrome, it will // return 0. Colors() int // Show makes all the content changes made using SetContent() visible // on the display. // // It does so in the most efficient and least visually disruptive // manner possible. Show() // Sync works like Show(), but it updates every visible cell on the // physical display, assuming that it is not synchronized with any // internal model. This may be both expensive and visually jarring, // so it should only be used when believed to actually be necessary. // // Typically, this is called as a result of a user-requested redraw // (e.g. to clear up on-screen corruption caused by some other program), // or during a resize event. Sync() // CharacterSet returns information about the character set. // This isn't the full locale, but it does give us the input/output // character set. Note that this is just for diagnostic purposes, // we normally translate input/output to/from UTF-8, regardless of // what the user's environment is. CharacterSet() string // RegisterRuneFallback adds a fallback for runes that are not // part of the character set -- for example one could register // o as a fallback for ø. This should be done cautiously for // characters that might be displayed ordinarily in language // specific text -- characters that could change the meaning of // written text would be dangerous. The intention here is to // facilitate fallback characters in pseudo-graphical applications. // // If the terminal has fallbacks already in place via an alternate // character set, those are used in preference. Also, standard // fallbacks for graphical characters in the alternate character set // terminfo string are registered implicitly. // // The display string should be the same width as original rune. // This makes it possible to register two character replacements // for full width East Asian characters, for example. // // It is recommended that replacement strings consist only of // 7-bit ASCII, since other characters may not display everywhere. RegisterRuneFallback(r rune, subst string) // UnregisterRuneFallback unmaps a replacement. It will unmap // the implicit ASCII replacements for alternate characters as well. // When an unmapped char needs to be displayed, but no suitable // glyph is available, '?' is emitted instead. It is not possible // to "disable" the use of alternate characters that are supported // by your terminal except by changing the terminal database. UnregisterRuneFallback(r rune) // CanDisplay returns true if the given rune can be displayed on // this screen. Note that this is a best-guess effort -- whether // your fonts support the character or not may be questionable. // Mostly this is for folks who work outside of Unicode. // // If checkFallbacks is true, then if any (possibly imperfect) // fallbacks are registered, this will return true. This will // also return true if the terminal can replace the glyph with // one that is visually indistinguishable from the one requested. CanDisplay(r rune, checkFallbacks bool) bool // Resize does nothing, since it's generally not possible to // ask a screen to resize, but it allows the Screen to implement // the View interface. Resize(int, int, int, int) // HasKey returns true if the keyboard is believed to have the // key. In some cases a keyboard may have keys with this name // but no support for them, while in others a key may be reported // as supported but not actually be usable (such as some emulators // that hijack certain keys). Its best not to depend to strictly // on this function, but it can be used for hinting when building // menus, displayed hot-keys, etc. Note that KeyRune (literal // runes) is always true. HasKey(Key) bool // Suspend pauses input and output processing. It also restores the // terminal settings to what they were when the application started. // This can be used to, for example, run a sub-shell. Suspend() error // Resume resumes after Suspend(). Resume() error // Beep attempts to sound an OS-dependent audible alert and returns an error // when unsuccessful. Beep() error // SetSize attempts to resize the window. It also invalidates the cells and // calls the resize function. Note that if the window size is changed, it will // not be restored upon application exit. // // Many terminals cannot support this. Perversely, the "modern" Windows Terminal // does not support application-initiated resizing, whereas the legacy terminal does. // Also, some emulators can support this but may have it disabled by default. SetSize(int, int) // LockRegion sets or unsets a lock on a region of cells. A lock on a // cell prevents the cell from being redrawn. LockRegion(x, y, width, height int, lock bool) // Tty returns the underlying Tty. If the screen is not a terminal, the // returned bool will be false Tty() (Tty, bool) } // NewScreen returns a default Screen suitable for the user's terminal // environment. func NewScreen() (Screen, error) { // Windows is happier if we try for a console screen first. if s, _ := NewConsoleScreen(); s != nil { return s, nil } else if s, e := NewTerminfoScreen(); s != nil { return s, nil } else { return nil, e } } // MouseFlags are options to modify the handling of mouse events. // Actual events can be ORed together. type MouseFlags int const ( MouseButtonEvents = MouseFlags(1) // Click events only MouseDragEvents = MouseFlags(2) // Click-drag events (includes button events) MouseMotionEvents = MouseFlags(4) // All mouse events (includes click and drag events) ) // CursorStyle represents a given cursor style, which can include the shape and // whether the cursor blinks or is solid. Support for changing this is not universal. type CursorStyle int const ( CursorStyleDefault = CursorStyle(iota) // The default CursorStyleBlinkingBlock CursorStyleSteadyBlock CursorStyleBlinkingUnderline CursorStyleSteadyUnderline CursorStyleBlinkingBar CursorStyleSteadyBar ) // screenImpl is a subset of Screen that can be used with baseScreen to formulate // a complete implementation of Screen. See Screen for doc comments about methods. type screenImpl interface { Init() error Fini() SetStyle(style Style) ShowCursor(x int, y int) HideCursor() SetCursorStyle(CursorStyle) Size() (width, height int) EnableMouse(...MouseFlags) DisableMouse() EnablePaste() DisablePaste() EnableFocus() DisableFocus() HasMouse() bool Colors() int Show() Sync() CharacterSet() string RegisterRuneFallback(r rune, subst string) UnregisterRuneFallback(r rune) CanDisplay(r rune, checkFallbacks bool) bool Resize(int, int, int, int) HasKey(Key) bool Suspend() error Resume() error Beep() error SetSize(int, int) Tty() (Tty, bool) // Following methods are not part of the Screen api, but are used for interaction with // the common layer code. // Locker locks the underlying data structures so that we can access them // in a thread-safe way. sync.Locker // GetCells returns a pointer to the underlying CellBuffer that the implementation uses. // Various methods will write to these for performance, but will use the lock to do so. GetCells() *CellBuffer // StopQ is closed when the screen is shut down via Fini. It remains open if the screen // is merely suspended. StopQ() <-chan struct{} // EventQ delivers events. Events are posted to this by the screen in response to // key presses, resizes, etc. Application code receives events from this via the // Screen.PollEvent, Screen.ChannelEvents APIs. EventQ() chan Event } type baseScreen struct { screenImpl } func (b *baseScreen) SetCell(x int, y int, style Style, ch ...rune) { if len(ch) > 0 { b.SetContent(x, y, ch[0], ch[1:], style) } else { b.SetContent(x, y, ' ', nil, style) } } func (b *baseScreen) Clear() { b.Fill(' ', StyleDefault) } func (b *baseScreen) Fill(r rune, style Style) { cb := b.GetCells() b.Lock() cb.Fill(r, style) b.Unlock() } func (b *baseScreen) SetContent(x, y int, mainc rune, combc []rune, st Style) { cells := b.GetCells() b.Lock() cells.SetContent(x, y, mainc, combc, st) b.Unlock() } func (b *baseScreen) GetContent(x, y int) (rune, []rune, Style, int) { var primary rune var combining []rune var style Style var width int cells := b.GetCells() b.Lock() primary, combining, style, width = cells.GetContent(x, y) b.Unlock() return primary, combining, style, width } func (b *baseScreen) LockRegion(x, y, width, height int, lock bool) { cells := b.GetCells() b.Lock() for j := y; j < (y + height); j += 1 { for i := x; i < (x + width); i += 1 { switch lock { case true: cells.LockCell(i, j) case false: cells.UnlockCell(i, j) } } } b.Unlock() } func (b *baseScreen) ChannelEvents(ch chan<- Event, quit <-chan struct{}) { defer close(ch) for { select { case <-quit: return case <-b.StopQ(): return case ev := <-b.EventQ(): select { case <-quit: return case <-b.StopQ(): return case ch <- ev: } } } } func (b *baseScreen) PollEvent() Event { select { case <-b.StopQ(): return nil case ev := <-b.EventQ(): return ev } } func (b *baseScreen) HasPendingEvent() bool { return len(b.EventQ()) > 0 } func (b *baseScreen) PostEventWait(ev Event) { select { case b.EventQ() <- ev: case <-b.StopQ(): } } func (b *baseScreen) PostEvent(ev Event) error { select { case b.EventQ() <- ev: return nil default: return ErrEventQFull } } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/simulation.go ================================================ // Copyright 2023 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell import ( "sync" "unicode/utf8" "golang.org/x/text/transform" ) // NewSimulationScreen returns a SimulationScreen. Note that // SimulationScreen is also a Screen. func NewSimulationScreen(charset string) SimulationScreen { if charset == "" { charset = "UTF-8" } ss := &simscreen{charset: charset} ss.Screen = &baseScreen{screenImpl: ss} return ss } // SimulationScreen represents a screen simulation. This is intended to // be a superset of normal Screens, but also adds some important interfaces // for testing. type SimulationScreen interface { Screen // InjectKeyBytes injects a stream of bytes corresponding to // the native encoding (see charset). It turns true if the entire // set of bytes were processed and delivered as KeyEvents, false // if any bytes were not fully understood. Any bytes that are not // fully converted are discarded. InjectKeyBytes(buf []byte) bool // InjectKey injects a key event. The rune is a UTF-8 rune, post // any translation. InjectKey(key Key, r rune, mod ModMask) // InjectMouse injects a mouse event. InjectMouse(x, y int, buttons ButtonMask, mod ModMask) // GetContents returns screen contents as an array of // cells, along with the physical width & height. Note that the // physical contents will be used until the next time SetSize() // is called. GetContents() (cells []SimCell, width int, height int) // GetCursor returns the cursor details. GetCursor() (x int, y int, visible bool) } // SimCell represents a simulated screen cell. The purpose of this // is to track on screen content. type SimCell struct { // Bytes is the actual character bytes. Normally this is // rune data, but it could be be data in another encoding system. Bytes []byte // Style is the style used to display the data. Style Style // Runes is the list of runes, unadulterated, in UTF-8. Runes []rune } type simscreen struct { physw int physh int fini bool style Style evch chan Event quit chan struct{} front []SimCell back CellBuffer clear bool cursorx int cursory int cursorvis bool mouse bool paste bool charset string encoder transform.Transformer decoder transform.Transformer fillchar rune fillstyle Style fallback map[rune]string Screen sync.Mutex } func (s *simscreen) Init() error { s.evch = make(chan Event, 10) s.quit = make(chan struct{}) s.fillchar = 'X' s.fillstyle = StyleDefault s.mouse = false s.physw = 80 s.physh = 25 s.cursorx = -1 s.cursory = -1 s.style = StyleDefault if enc := GetEncoding(s.charset); enc != nil { s.encoder = enc.NewEncoder() s.decoder = enc.NewDecoder() } else { return ErrNoCharset } s.front = make([]SimCell, s.physw*s.physh) s.back.Resize(80, 25) // default fallbacks s.fallback = make(map[rune]string) for k, v := range RuneFallbacks { s.fallback[k] = v } return nil } func (s *simscreen) Fini() { s.Lock() s.fini = true s.back.Resize(0, 0) s.Unlock() if s.quit != nil { close(s.quit) } s.physw = 0 s.physh = 0 s.front = nil } func (s *simscreen) SetStyle(style Style) { s.Lock() s.style = style s.Unlock() } func (s *simscreen) drawCell(x, y int) int { mainc, combc, style, width := s.back.GetContent(x, y) if !s.back.Dirty(x, y) { return width } if x >= s.physw || y >= s.physh || x < 0 || y < 0 { return width } simc := &s.front[(y*s.physw)+x] if style == StyleDefault { style = s.style } simc.Style = style simc.Runes = append([]rune{mainc}, combc...) // now emit runes - taking care to not overrun width with a // wide character, and to ensure that we emit exactly one regular // character followed up by any residual combing characters simc.Bytes = nil if x > s.physw-width { simc.Runes = []rune{' '} simc.Bytes = []byte{' '} return width } lbuf := make([]byte, 12) ubuf := make([]byte, 12) nout := 0 for _, r := range simc.Runes { l := utf8.EncodeRune(ubuf, r) nout, _, _ = s.encoder.Transform(lbuf, ubuf[:l], true) if nout == 0 || lbuf[0] == '\x1a' { // skip combining if subst, ok := s.fallback[r]; ok { simc.Bytes = append(simc.Bytes, []byte(subst)...) } else if r >= ' ' && r <= '~' { simc.Bytes = append(simc.Bytes, byte(r)) } else if simc.Bytes == nil { simc.Bytes = append(simc.Bytes, '?') } } else { simc.Bytes = append(simc.Bytes, lbuf[:nout]...) } } s.back.SetDirty(x, y, false) return width } func (s *simscreen) ShowCursor(x, y int) { s.Lock() s.cursorx, s.cursory = x, y s.showCursor() s.Unlock() } func (s *simscreen) HideCursor() { s.ShowCursor(-1, -1) } func (s *simscreen) showCursor() { x, y := s.cursorx, s.cursory if x < 0 || y < 0 || x >= s.physw || y >= s.physh { s.cursorvis = false } else { s.cursorvis = true } } func (s *simscreen) hideCursor() { // does not update cursor position s.cursorvis = false } func (s *simscreen) SetCursorStyle(CursorStyle) {} func (s *simscreen) Show() { s.Lock() s.resize() s.draw() s.Unlock() } func (s *simscreen) clearScreen() { // We emulate a hardware clear by filling with a specific pattern for i := range s.front { s.front[i].Style = s.fillstyle s.front[i].Runes = []rune{s.fillchar} s.front[i].Bytes = []byte{byte(s.fillchar)} } s.clear = false } func (s *simscreen) draw() { s.hideCursor() if s.clear { s.clearScreen() } w, h := s.back.Size() for y := 0; y < h; y++ { for x := 0; x < w; x++ { width := s.drawCell(x, y) x += width - 1 } } s.showCursor() } func (s *simscreen) EnableMouse(...MouseFlags) { s.mouse = true } func (s *simscreen) DisableMouse() { s.mouse = false } func (s *simscreen) EnablePaste() { s.paste = true } func (s *simscreen) DisablePaste() { s.paste = false } func (s *simscreen) EnableFocus() { } func (s *simscreen) DisableFocus() { } func (s *simscreen) Size() (int, int) { s.Lock() w, h := s.back.Size() s.Unlock() return w, h } func (s *simscreen) resize() { w, h := s.physw, s.physh ow, oh := s.back.Size() if w != ow || h != oh { s.back.Resize(w, h) ev := NewEventResize(w, h) s.postEvent(ev) } } func (s *simscreen) Colors() int { return 256 } func (s *simscreen) postEvent(ev Event) { select { case s.evch <- ev: case <-s.quit: } } func (s *simscreen) InjectMouse(x, y int, buttons ButtonMask, mod ModMask) { ev := NewEventMouse(x, y, buttons, mod) s.postEvent(ev) } func (s *simscreen) InjectKey(key Key, r rune, mod ModMask) { ev := NewEventKey(key, r, mod) s.postEvent(ev) } func (s *simscreen) InjectKeyBytes(b []byte) bool { failed := false outer: for len(b) > 0 { if b[0] >= ' ' && b[0] <= 0x7F { // printable ASCII easy to deal with -- no encodings ev := NewEventKey(KeyRune, rune(b[0]), ModNone) s.postEvent(ev) b = b[1:] continue } if b[0] < 0x80 { mod := ModNone // No encodings start with low numbered values if Key(b[0]) >= KeyCtrlA && Key(b[0]) <= KeyCtrlZ { mod = ModCtrl } ev := NewEventKey(Key(b[0]), 0, mod) s.postEvent(ev) b = b[1:] continue } utfb := make([]byte, len(b)*4) // worst case for l := 1; l < len(b); l++ { s.decoder.Reset() nout, nin, _ := s.decoder.Transform(utfb, b[:l], true) if nout != 0 { r, _ := utf8.DecodeRune(utfb[:nout]) if r != utf8.RuneError { ev := NewEventKey(KeyRune, r, ModNone) s.postEvent(ev) } b = b[nin:] continue outer } } failed = true b = b[1:] continue } return !failed } func (s *simscreen) Sync() { s.Lock() s.clear = true s.resize() s.back.Invalidate() s.draw() s.Unlock() } func (s *simscreen) CharacterSet() string { return s.charset } func (s *simscreen) SetSize(w, h int) { s.Lock() newc := make([]SimCell, w*h) for row := 0; row < h && row < s.physh; row++ { for col := 0; col < w && col < s.physw; col++ { newc[(row*w)+col] = s.front[(row*s.physw)+col] } } s.cursorx, s.cursory = -1, -1 s.physw, s.physh = w, h s.front = newc s.back.Resize(w, h) s.Unlock() } func (s *simscreen) GetContents() ([]SimCell, int, int) { s.Lock() cells, w, h := s.front, s.physw, s.physh s.Unlock() return cells, w, h } func (s *simscreen) GetCursor() (int, int, bool) { s.Lock() x, y, vis := s.cursorx, s.cursory, s.cursorvis s.Unlock() return x, y, vis } func (s *simscreen) RegisterRuneFallback(r rune, subst string) { s.Lock() s.fallback[r] = subst s.Unlock() } func (s *simscreen) UnregisterRuneFallback(r rune) { s.Lock() delete(s.fallback, r) s.Unlock() } func (s *simscreen) CanDisplay(r rune, checkFallbacks bool) bool { if enc := s.encoder; enc != nil { nb := make([]byte, 6) ob := make([]byte, 6) num := utf8.EncodeRune(ob, r) enc.Reset() dst, _, err := enc.Transform(nb, ob[:num], true) if dst != 0 && err == nil && nb[0] != '\x1A' { return true } } if !checkFallbacks { return false } if _, ok := s.fallback[r]; ok { return true } return false } func (s *simscreen) HasMouse() bool { return false } func (s *simscreen) Resize(int, int, int, int) {} func (s *simscreen) HasKey(Key) bool { return true } func (s *simscreen) Beep() error { return nil } func (s *simscreen) Suspend() error { return nil } func (s *simscreen) Resume() error { return nil } func (s *simscreen) Tty() (Tty, bool) { return nil, false } func (s *simscreen) GetCells() *CellBuffer { return &s.back } func (s *simscreen) EventQ() chan Event { return s.evch } func (s *simscreen) StopQ() <-chan struct{} { return s.quit } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/stdin_unix.go ================================================ // Copyright 2021 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos package tcell import ( "errors" "fmt" "os" "os/signal" "strconv" "sync" "syscall" "time" "golang.org/x/sys/unix" "golang.org/x/term" ) // stdIoTty is an implementation of the Tty API based upon stdin/stdout. type stdIoTty struct { fd int in *os.File out *os.File saved *term.State sig chan os.Signal cb func() stopQ chan struct{} dev string wg sync.WaitGroup l sync.Mutex } func (tty *stdIoTty) Read(b []byte) (int, error) { return tty.in.Read(b) } func (tty *stdIoTty) Write(b []byte) (int, error) { return tty.out.Write(b) } func (tty *stdIoTty) Close() error { return nil } func (tty *stdIoTty) Start() error { tty.l.Lock() defer tty.l.Unlock() // We open another copy of /dev/tty. This is a workaround for unusual behavior // observed in macOS, apparently caused when a sub-shell (for example) closes our // own tty device (when it exits for example). Getting a fresh new one seems to // resolve the problem. (We believe this is a bug in the macOS tty driver that // fails to account for dup() references to the same file before applying close() // related behaviors to the tty.) We're also holding the original copy we opened // since closing that might have deleterious effects as well. The upshot is that // we will have up to two separate file handles open on /dev/tty. (Note that when // using stdin/stdout instead of /dev/tty this problem is not observed.) var err error tty.in = os.Stdin tty.out = os.Stdout tty.fd = int(tty.in.Fd()) if !term.IsTerminal(tty.fd) { return errors.New("device is not a terminal") } _ = tty.in.SetReadDeadline(time.Time{}) saved, err := term.MakeRaw(tty.fd) // also sets vMin and vTime if err != nil { return err } tty.saved = saved tty.stopQ = make(chan struct{}) tty.wg.Add(1) go func(stopQ chan struct{}) { defer tty.wg.Done() for { select { case <-tty.sig: tty.l.Lock() cb := tty.cb tty.l.Unlock() if cb != nil { cb() } case <-stopQ: return } } }(tty.stopQ) signal.Notify(tty.sig, syscall.SIGWINCH) return nil } func (tty *stdIoTty) Drain() error { _ = tty.in.SetReadDeadline(time.Now()) if err := tcSetBufParams(tty.fd, 0, 0); err != nil { return err } return nil } func (tty *stdIoTty) Stop() error { tty.l.Lock() if err := term.Restore(tty.fd, tty.saved); err != nil { tty.l.Unlock() return err } _ = tty.in.SetReadDeadline(time.Now()) signal.Stop(tty.sig) close(tty.stopQ) tty.l.Unlock() tty.wg.Wait() return nil } func (tty *stdIoTty) WindowSize() (WindowSize, error) { size := WindowSize{} ws, err := unix.IoctlGetWinsize(tty.fd, unix.TIOCGWINSZ) if err != nil { return size, err } w := int(ws.Col) h := int(ws.Row) if w == 0 { w, _ = strconv.Atoi(os.Getenv("COLUMNS")) } if w == 0 { w = 80 // default } if h == 0 { h, _ = strconv.Atoi(os.Getenv("LINES")) } if h == 0 { h = 25 // default } size.Width = w size.Height = h size.PixelWidth = int(ws.Xpixel) size.PixelHeight = int(ws.Ypixel) return size, nil } func (tty *stdIoTty) NotifyResize(cb func()) { tty.l.Lock() tty.cb = cb tty.l.Unlock() } // NewStdioTty opens a tty using standard input/output. func NewStdIoTty() (Tty, error) { tty := &stdIoTty{ sig: make(chan os.Signal), in: os.Stdin, out: os.Stdout, } var err error tty.fd = int(tty.in.Fd()) if !term.IsTerminal(tty.fd) { return nil, errors.New("not a terminal") } if tty.saved, err = term.GetState(tty.fd); err != nil { return nil, fmt.Errorf("failed to get state: %w", err) } return tty, nil } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/style.go ================================================ // Copyright 2022 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell // Style represents a complete text style, including both foreground color, // background color, and additional attributes such as "bold" or "underline". // // Note that not all terminals can display all colors or attributes, and // many might have specific incompatibilities between specific attributes // and color combinations. // // To use Style, just declare a variable of its type. type Style struct { fg Color bg Color attrs AttrMask url string urlId string } // StyleDefault represents a default style, based upon the context. // It is the zero value. var StyleDefault Style // styleInvalid is just an arbitrary invalid style used internally. var styleInvalid = Style{attrs: AttrInvalid} // Foreground returns a new style based on s, with the foreground color set // as requested. ColorDefault can be used to select the global default. func (s Style) Foreground(c Color) Style { return Style{ fg: c, bg: s.bg, attrs: s.attrs, url: s.url, urlId: s.urlId, } } // Background returns a new style based on s, with the background color set // as requested. ColorDefault can be used to select the global default. func (s Style) Background(c Color) Style { return Style{ fg: s.fg, bg: c, attrs: s.attrs, url: s.url, urlId: s.urlId, } } // Decompose breaks a style up, returning the foreground, background, // and other attributes. The URL if set is not included. func (s Style) Decompose() (fg Color, bg Color, attr AttrMask) { return s.fg, s.bg, s.attrs } func (s Style) setAttrs(attrs AttrMask, on bool) Style { if on { return Style{ fg: s.fg, bg: s.bg, attrs: s.attrs | attrs, url: s.url, urlId: s.urlId, } } return Style{ fg: s.fg, bg: s.bg, attrs: s.attrs &^ attrs, url: s.url, urlId: s.urlId, } } // Normal returns the style with all attributes disabled. func (s Style) Normal() Style { return Style{ fg: s.fg, bg: s.bg, } } // Bold returns a new style based on s, with the bold attribute set // as requested. func (s Style) Bold(on bool) Style { return s.setAttrs(AttrBold, on) } // Blink returns a new style based on s, with the blink attribute set // as requested. func (s Style) Blink(on bool) Style { return s.setAttrs(AttrBlink, on) } // Dim returns a new style based on s, with the dim attribute set // as requested. func (s Style) Dim(on bool) Style { return s.setAttrs(AttrDim, on) } // Italic returns a new style based on s, with the italic attribute set // as requested. func (s Style) Italic(on bool) Style { return s.setAttrs(AttrItalic, on) } // Reverse returns a new style based on s, with the reverse attribute set // as requested. (Reverse usually changes the foreground and background // colors.) func (s Style) Reverse(on bool) Style { return s.setAttrs(AttrReverse, on) } // Underline returns a new style based on s, with the underline attribute set // as requested. func (s Style) Underline(on bool) Style { return s.setAttrs(AttrUnderline, on) } // StrikeThrough sets strikethrough mode. func (s Style) StrikeThrough(on bool) Style { return s.setAttrs(AttrStrikeThrough, on) } // Attributes returns a new style based on s, with its attributes set as // specified. func (s Style) Attributes(attrs AttrMask) Style { return Style{ fg: s.fg, bg: s.bg, attrs: attrs, url: s.url, urlId: s.urlId, } } // Url returns a style with the Url set. If the provided Url is not empty, // and the terminal supports it, text will typically be marked up as a clickable // link to that Url. If the Url is empty, then this mode is turned off. func (s Style) Url(url string) Style { return Style{ fg: s.fg, bg: s.bg, attrs: s.attrs, url: url, urlId: s.urlId, } } // UrlId returns a style with the UrlId set. If the provided UrlId is not empty, // any marked up Url with this style will be given the UrlId also. If the // terminal supports it, any text with the same UrlId will be grouped as if it // were one Url, even if it spans multiple lines. func (s Style) UrlId(id string) Style { return Style{ fg: s.fg, bg: s.bg, attrs: s.attrs, url: s.url, urlId: "id=" + id, } } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/.gitignore ================================================ mkinfo ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/README.md ================================================ This package represents the parent for all terminals. In older versions of tcell we had (a couple of) different external file formats for the terminal database. Those are now removed. All terminal definitions are supplied by one of two methods: 1. Compiled Go code 2. For systems with terminfo and infocmp, dynamically generated at runtime. The Go code can be generated using the mkinfo utility in this directory. The database entry should be generated into a package in a directory named as the first character of the package name. (This permits us to group them all without having a huge directory of little packages.) It may be desirable to add new packages to the extended package, or -- rarely -- the base package. Applications which want to have the large set of terminal descriptions built into the binary can simply import the extended package. Otherwise a smaller reasonable default set (the base package) will be included instead. ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/TERMINALS.md ================================================ TERMINALS ========= The best way to populate terminals on Debian is to install ncurses, ncurses-term, screen, tmux, rxvt-unicode, and dvtm. This populates the the terminfo database so that we can have a reasonable set of starting terminals. ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/a/aixterm/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package aixterm import "github.com/gdamore/tcell/v2/terminfo" func init() { // IBM Aixterm Terminal Emulator terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "aixterm", Columns: 80, Lines: 25, Colors: 8, Bell: "\a", Clear: "\x1b[H\x1b[J", AttrOff: "\x1b[0;10m\x1b(B", Underline: "\x1b[4m", Bold: "\x1b[1m", Reverse: "\x1b[7m", SetFg: "\x1b[3%p1%dm", SetBg: "\x1b[4%p1%dm", SetFgBg: "\x1b[3%p1%d;4%p2%dm", ResetFgBg: "\x1b[32m\x1b[40m", PadChar: "\x00", AltChars: "jjkkllmmnnqqttuuvvwwxx", EnterAcs: "\x1b(0", ExitAcs: "\x1b(B", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1b[A", KeyDown: "\x1b[B", KeyRight: "\x1b[C", KeyLeft: "\x1b[D", KeyInsert: "\x1b[139q", KeyDelete: "\x1b[P", KeyBackspace: "\b", KeyHome: "\x1b[H", KeyEnd: "\x1b[146q", KeyPgUp: "\x1b[150q", KeyPgDn: "\x1b[154q", KeyF1: "\x1b[001q", KeyF2: "\x1b[002q", KeyF3: "\x1b[003q", KeyF4: "\x1b[004q", KeyF5: "\x1b[005q", KeyF6: "\x1b[006q", KeyF7: "\x1b[007q", KeyF8: "\x1b[008q", KeyF9: "\x1b[009q", KeyF10: "\x1b[010q", KeyF11: "\x1b[011q", KeyF12: "\x1b[012q", KeyF13: "\x1b[013q", KeyF14: "\x1b[014q", KeyF15: "\x1b[015q", KeyF16: "\x1b[016q", KeyF17: "\x1b[017q", KeyF18: "\x1b[018q", KeyF19: "\x1b[019q", KeyF20: "\x1b[020q", KeyF21: "\x1b[021q", KeyF22: "\x1b[022q", KeyF23: "\x1b[023q", KeyF24: "\x1b[024q", KeyF25: "\x1b[025q", KeyF26: "\x1b[026q", KeyF27: "\x1b[027q", KeyF28: "\x1b[028q", KeyF29: "\x1b[029q", KeyF30: "\x1b[030q", KeyF31: "\x1b[031q", KeyF32: "\x1b[032q", KeyF33: "\x1b[033q", KeyF34: "\x1b[034q", KeyF35: "\x1b[035q", KeyF36: "\x1b[036q", KeyClear: "\x1b[144q", KeyBacktab: "\x1b[Z", AutoMargin: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/a/alacritty/direct.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package alacritty import "github.com/gdamore/tcell/v2/terminfo" func init() { // alacritty with direct color indexing terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "alacritty-direct", Columns: 80, Lines: 24, Colors: 16777216, Bell: "\a", Clear: "\x1b[H\x1b[2J", EnterCA: "\x1b[?1049h\x1b[22;0;0t", ExitCA: "\x1b[?1049l\x1b[23;0;0t", ShowCursor: "\x1b[?12l\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b(B\x1b[m", Underline: "\x1b[4m", Bold: "\x1b[1m", Dim: "\x1b[2m", Italic: "\x1b[3m", Reverse: "\x1b[7m", EnterKeypad: "\x1b[?1h\x1b=", ExitKeypad: "\x1b[?1l\x1b>", SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m", SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m", SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m", ResetFgBg: "\x1b[39;49m", AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x1b(0", ExitAcs: "\x1b(B", StrikeThrough: "\x1b[9m", Mouse: "\x1b[M", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1bOA", KeyDown: "\x1bOB", KeyRight: "\x1bOC", KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\x7f", KeyHome: "\x1bOH", KeyEnd: "\x1bOF", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1bOP", KeyF2: "\x1bOQ", KeyF3: "\x1bOR", KeyF4: "\x1bOS", KeyF5: "\x1b[15~", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyBacktab: "\x1b[Z", Modifiers: 1, TrueColor: true, AutoMargin: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/a/alacritty/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package alacritty import "github.com/gdamore/tcell/v2/terminfo" func init() { // alacritty terminal emulator terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "alacritty", Columns: 80, Lines: 24, Colors: 256, Bell: "\a", Clear: "\x1b[H\x1b[2J", EnterCA: "\x1b[?1049h\x1b[22;0;0t", ExitCA: "\x1b[?1049l\x1b[23;0;0t", ShowCursor: "\x1b[?12l\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b(B\x1b[m", Underline: "\x1b[4m", Bold: "\x1b[1m", Dim: "\x1b[2m", Italic: "\x1b[3m", Blink: "\x1b[5m", Reverse: "\x1b[7m", EnterKeypad: "\x1b[?1h\x1b=", ExitKeypad: "\x1b[?1l\x1b>", SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m", SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m", SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m", ResetFgBg: "\x1b[39;49m", AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x1b(0", ExitAcs: "\x1b(B", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", StrikeThrough: "\x1b[9m", Mouse: "\x1b[<", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1bOA", KeyDown: "\x1bOB", KeyRight: "\x1bOC", KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\x7f", KeyHome: "\x1bOH", KeyEnd: "\x1bOF", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1bOP", KeyF2: "\x1bOQ", KeyF3: "\x1bOR", KeyF4: "\x1bOS", KeyF5: "\x1b[15~", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyBacktab: "\x1b[Z", Modifiers: 1, AutoMargin: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/a/ansi/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package ansi import "github.com/gdamore/tcell/v2/terminfo" func init() { // ansi/pc-term compatible with color terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "ansi", Columns: 80, Lines: 24, Colors: 8, Bell: "\a", Clear: "\x1b[H\x1b[J", AttrOff: "\x1b[0;10m", Underline: "\x1b[4m", Bold: "\x1b[1m", Blink: "\x1b[5m", Reverse: "\x1b[7m", SetFg: "\x1b[3%p1%dm", SetBg: "\x1b[4%p1%dm", SetFgBg: "\x1b[3%p1%d;4%p2%dm", ResetFgBg: "\x1b[39;49m", PadChar: "\x00", AltChars: "+\x10,\x11-\x18.\x190\xdb`\x04a\xb1f\xf8g\xf1h\xb0j\xd9k\xbfl\xdam\xc0n\xc5o~p\xc4q\xc4r\xc4s_t\xc3u\xb4v\xc1w\xc2x\xb3y\xf3z\xf2{\xe3|\xd8}\x9c~\xfe", EnterAcs: "\x1b[11m", ExitAcs: "\x1b[10m", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\x1b[D", CursorUp1: "\x1b[A", KeyUp: "\x1b[A", KeyDown: "\x1b[B", KeyRight: "\x1b[C", KeyLeft: "\x1b[D", KeyInsert: "\x1b[L", KeyBackspace: "\b", KeyHome: "\x1b[H", KeyBacktab: "\x1b[Z", AutoMargin: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/b/beterm/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package beterm import "github.com/gdamore/tcell/v2/terminfo" func init() { // BeOS Terminal terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "beterm", Columns: 80, Lines: 25, Colors: 8, Bell: "\a", Clear: "\x1b[H\x1b[J", AttrOff: "\x1b[0;10m", Underline: "\x1b[4m", Bold: "\x1b[1m", Reverse: "\x1b[7m", EnterKeypad: "\x1b[?4h", ExitKeypad: "\x1b[?4l", SetFg: "\x1b[3%p1%dm", SetBg: "\x1b[4%p1%dm", SetFgBg: "\x1b[3%p1%d;4%p2%dm", ResetFgBg: "\x1b[m", PadChar: "\x00", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1b[A", KeyDown: "\x1b[B", KeyRight: "\x1b[C", KeyLeft: "\x1b[D", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\b", KeyHome: "\x1b[1~", KeyEnd: "\x1b[4~", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1b[11~", KeyF2: "\x1b[12~", KeyF3: "\x1b[13~", KeyF4: "\x1b[14~", KeyF5: "\x1b[15~", KeyF6: "\x1b[16~", KeyF7: "\x1b[17~", KeyF8: "\x1b[18~", KeyF9: "\x1b[19~", KeyF10: "\x1b[20~", KeyF11: "\x1b[21~", KeyF12: "\x1b[22~", AutoMargin: true, InsertChar: "\x1b[@", }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/base/base.go ================================================ // Copyright 2020 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // This is just a "minimalist" set of the base terminal descriptions. // It should be sufficient for most applications. // Package base contains the base terminal descriptions that are likely // to be needed by any stock application. It is imported by default in the // terminfo package, so terminal types listed here will be available to any // tcell application. package base import ( // The following imports just register themselves -- // thse are the terminal types we aggregate in this package. _ "github.com/gdamore/tcell/v2/terminfo/a/ansi" _ "github.com/gdamore/tcell/v2/terminfo/v/vt100" _ "github.com/gdamore/tcell/v2/terminfo/v/vt102" _ "github.com/gdamore/tcell/v2/terminfo/v/vt220" _ "github.com/gdamore/tcell/v2/terminfo/x/xterm" ) ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/c/cygwin/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package cygwin import "github.com/gdamore/tcell/v2/terminfo" func init() { // ANSI emulation for Cygwin terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "cygwin", Colors: 8, Bell: "\a", Clear: "\x1b[H\x1b[J", EnterCA: "\x1b7\x1b[?47h", ExitCA: "\x1b[2J\x1b[?47l\x1b8", AttrOff: "\x1b[0;10m", Underline: "\x1b[4m", Bold: "\x1b[1m", Reverse: "\x1b[7m", SetFg: "\x1b[3%p1%dm", SetBg: "\x1b[4%p1%dm", SetFgBg: "\x1b[3%p1%d;4%p2%dm", ResetFgBg: "\x1b[39;49m", PadChar: "\x00", AltChars: "+\x10,\x11-\x18.\x190\xdb`\x04a\xb1f\xf8g\xf1h\xb0j\xd9k\xbfl\xdam\xc0n\xc5o~p\xc4q\xc4r\xc4s_t\xc3u\xb4v\xc1w\xc2x\xb3y\xf3z\xf2{\xe3|\xd8}\x9c~\xfe", EnterAcs: "\x1b[11m", ExitAcs: "\x1b[10m", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1b[A", KeyDown: "\x1b[B", KeyRight: "\x1b[C", KeyLeft: "\x1b[D", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\b", KeyHome: "\x1b[1~", KeyEnd: "\x1b[4~", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1b[[A", KeyF2: "\x1b[[B", KeyF3: "\x1b[[C", KeyF4: "\x1b[[D", KeyF5: "\x1b[[E", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyF13: "\x1b[25~", KeyF14: "\x1b[26~", KeyF15: "\x1b[28~", KeyF16: "\x1b[29~", KeyF17: "\x1b[31~", KeyF18: "\x1b[32~", KeyF19: "\x1b[33~", KeyF20: "\x1b[34~", AutoMargin: true, InsertChar: "\x1b[@", }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/d/dtterm/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package dtterm import "github.com/gdamore/tcell/v2/terminfo" func init() { // CDE desktop terminal terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "dtterm", Columns: 80, Lines: 24, Colors: 8, Bell: "\a", Clear: "\x1b[H\x1b[J", ShowCursor: "\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b[m\x0f", Underline: "\x1b[4m", Bold: "\x1b[1m", Dim: "\x1b[2m", Blink: "\x1b[5m", Reverse: "\x1b[7m", SetFg: "\x1b[3%p1%dm", SetBg: "\x1b[4%p1%dm", SetFgBg: "\x1b[3%p1%d;4%p2%dm", ResetFgBg: "\x1b[39;49m", PadChar: "\x00", AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x0e", ExitAcs: "\x0f", EnableAcs: "\x1b(B\x1b)0", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1b[A", KeyDown: "\x1b[B", KeyRight: "\x1b[C", KeyLeft: "\x1b[D", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\b", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1b[11~", KeyF2: "\x1b[12~", KeyF3: "\x1b[13~", KeyF4: "\x1b[14~", KeyF5: "\x1b[15~", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyF13: "\x1b[25~", KeyF14: "\x1b[26~", KeyF15: "\x1b[28~", KeyF16: "\x1b[29~", KeyF17: "\x1b[31~", KeyF18: "\x1b[32~", KeyF19: "\x1b[33~", KeyF20: "\x1b[34~", KeyHelp: "\x1b[28~", AutoMargin: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/dynamic/dynamic.go ================================================ // Copyright 2021 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // The dynamic package is used to generate a terminal description dynamically, // using infocmp. This is really a method of last resort, as the performance // will be slow, and it requires a working infocmp. But, the hope is that it // will assist folks who have to deal with a terminal description that isn't // already built in. This requires infocmp to be in the user's path, and to // support reasonably the -1 option. package dynamic import ( "bytes" "errors" "os/exec" "regexp" "strconv" "strings" "github.com/gdamore/tcell/v2/terminfo" ) type termcap struct { name string desc string aliases []string bools map[string]bool nums map[string]int strs map[string]string } func (tc *termcap) getnum(s string) int { return (tc.nums[s]) } func (tc *termcap) getflag(s string) bool { return (tc.bools[s]) } func (tc *termcap) getstr(s string) string { return (tc.strs[s]) } const ( none = iota control escaped ) var errNotAddressable = errors.New("terminal not cursor addressable") func unescape(s string) string { // Various escapes are in \x format. Control codes are // encoded as ^M (carat followed by ASCII equivalent). // escapes are: \e, \E - escape // \0 NULL, \n \l \r \t \b \f \s for equivalent C escape. buf := &bytes.Buffer{} esc := none for i := 0; i < len(s); i++ { c := s[i] switch esc { case none: switch c { case '\\': esc = escaped case '^': esc = control default: buf.WriteByte(c) } case control: buf.WriteByte(c ^ 1<<6) esc = none case escaped: switch c { case 'E', 'e': buf.WriteByte(0x1b) case '0', '1', '2', '3', '4', '5', '6', '7': if i+2 < len(s) && s[i+1] >= '0' && s[i+1] <= '7' && s[i+2] >= '0' && s[i+2] <= '7' { buf.WriteByte(((c - '0') * 64) + ((s[i+1] - '0') * 8) + (s[i+2] - '0')) i = i + 2 } else if c == '0' { buf.WriteByte(0) } case 'n': buf.WriteByte('\n') case 'r': buf.WriteByte('\r') case 't': buf.WriteByte('\t') case 'b': buf.WriteByte('\b') case 'f': buf.WriteByte('\f') case 's': buf.WriteByte(' ') default: buf.WriteByte(c) } esc = none } } return (buf.String()) } func (tc *termcap) setupterm(name string) error { cmd := exec.Command("infocmp", "-1", name) output := &bytes.Buffer{} cmd.Stdout = output tc.strs = make(map[string]string) tc.bools = make(map[string]bool) tc.nums = make(map[string]int) if err := cmd.Run(); err != nil { return err } // Now parse the output. // We get comment lines (starting with "#"), followed by // a header line that looks like "||...|" // then capabilities, one per line, starting with a tab and ending // with a comma and newline. lines := strings.Split(output.String(), "\n") for len(lines) > 0 && strings.HasPrefix(lines[0], "#") { lines = lines[1:] } // Ditch trailing empty last line if lines[len(lines)-1] == "" { lines = lines[:len(lines)-1] } header := lines[0] if strings.HasSuffix(header, ",") { header = header[:len(header)-1] } names := strings.Split(header, "|") tc.name = names[0] names = names[1:] if len(names) > 0 { tc.desc = names[len(names)-1] names = names[:len(names)-1] } tc.aliases = names for _, val := range lines[1:] { if (!strings.HasPrefix(val, "\t")) || (!strings.HasSuffix(val, ",")) { return (errors.New("malformed infocmp: " + val)) } val = val[1:] val = val[:len(val)-1] if k := strings.SplitN(val, "=", 2); len(k) == 2 { tc.strs[k[0]] = unescape(k[1]) } else if k := strings.SplitN(val, "#", 2); len(k) == 2 { u, err := strconv.ParseUint(k[1], 0, 0) if err != nil { return (err) } tc.nums[k[0]] = int(u) } else { tc.bools[val] = true } } return nil } // LoadTerminfo creates a Terminfo by for named terminal by attempting to parse // the output from infocmp. This returns the terminfo entry, a description of // the terminal, and either nil or an error. func LoadTerminfo(name string) (*terminfo.Terminfo, string, error) { var tc termcap if err := tc.setupterm(name); err != nil { return nil, "", err } t := &terminfo.Terminfo{} t.Name = tc.name t.Aliases = tc.aliases t.Colors = tc.getnum("colors") t.Columns = tc.getnum("cols") t.Lines = tc.getnum("lines") t.Bell = tc.getstr("bel") t.Clear = tc.getstr("clear") t.EnterCA = tc.getstr("smcup") t.ExitCA = tc.getstr("rmcup") t.ShowCursor = tc.getstr("cnorm") t.HideCursor = tc.getstr("civis") t.AttrOff = tc.getstr("sgr0") t.Underline = tc.getstr("smul") t.Bold = tc.getstr("bold") t.Blink = tc.getstr("blink") t.Dim = tc.getstr("dim") t.Italic = tc.getstr("sitm") t.Reverse = tc.getstr("rev") t.EnterKeypad = tc.getstr("smkx") t.ExitKeypad = tc.getstr("rmkx") t.SetFg = tc.getstr("setaf") t.SetBg = tc.getstr("setab") t.SetCursor = tc.getstr("cup") t.CursorBack1 = tc.getstr("cub1") t.CursorUp1 = tc.getstr("cuu1") t.KeyF1 = tc.getstr("kf1") t.KeyF2 = tc.getstr("kf2") t.KeyF3 = tc.getstr("kf3") t.KeyF4 = tc.getstr("kf4") t.KeyF5 = tc.getstr("kf5") t.KeyF6 = tc.getstr("kf6") t.KeyF7 = tc.getstr("kf7") t.KeyF8 = tc.getstr("kf8") t.KeyF9 = tc.getstr("kf9") t.KeyF10 = tc.getstr("kf10") t.KeyF11 = tc.getstr("kf11") t.KeyF12 = tc.getstr("kf12") t.KeyF13 = tc.getstr("kf13") t.KeyF14 = tc.getstr("kf14") t.KeyF15 = tc.getstr("kf15") t.KeyF16 = tc.getstr("kf16") t.KeyF17 = tc.getstr("kf17") t.KeyF18 = tc.getstr("kf18") t.KeyF19 = tc.getstr("kf19") t.KeyF20 = tc.getstr("kf20") t.KeyF21 = tc.getstr("kf21") t.KeyF22 = tc.getstr("kf22") t.KeyF23 = tc.getstr("kf23") t.KeyF24 = tc.getstr("kf24") t.KeyF25 = tc.getstr("kf25") t.KeyF26 = tc.getstr("kf26") t.KeyF27 = tc.getstr("kf27") t.KeyF28 = tc.getstr("kf28") t.KeyF29 = tc.getstr("kf29") t.KeyF30 = tc.getstr("kf30") t.KeyF31 = tc.getstr("kf31") t.KeyF32 = tc.getstr("kf32") t.KeyF33 = tc.getstr("kf33") t.KeyF34 = tc.getstr("kf34") t.KeyF35 = tc.getstr("kf35") t.KeyF36 = tc.getstr("kf36") t.KeyF37 = tc.getstr("kf37") t.KeyF38 = tc.getstr("kf38") t.KeyF39 = tc.getstr("kf39") t.KeyF40 = tc.getstr("kf40") t.KeyF41 = tc.getstr("kf41") t.KeyF42 = tc.getstr("kf42") t.KeyF43 = tc.getstr("kf43") t.KeyF44 = tc.getstr("kf44") t.KeyF45 = tc.getstr("kf45") t.KeyF46 = tc.getstr("kf46") t.KeyF47 = tc.getstr("kf47") t.KeyF48 = tc.getstr("kf48") t.KeyF49 = tc.getstr("kf49") t.KeyF50 = tc.getstr("kf50") t.KeyF51 = tc.getstr("kf51") t.KeyF52 = tc.getstr("kf52") t.KeyF53 = tc.getstr("kf53") t.KeyF54 = tc.getstr("kf54") t.KeyF55 = tc.getstr("kf55") t.KeyF56 = tc.getstr("kf56") t.KeyF57 = tc.getstr("kf57") t.KeyF58 = tc.getstr("kf58") t.KeyF59 = tc.getstr("kf59") t.KeyF60 = tc.getstr("kf60") t.KeyF61 = tc.getstr("kf61") t.KeyF62 = tc.getstr("kf62") t.KeyF63 = tc.getstr("kf63") t.KeyF64 = tc.getstr("kf64") t.KeyInsert = tc.getstr("kich1") t.KeyDelete = tc.getstr("kdch1") t.KeyBackspace = tc.getstr("kbs") t.KeyHome = tc.getstr("khome") t.KeyEnd = tc.getstr("kend") t.KeyUp = tc.getstr("kcuu1") t.KeyDown = tc.getstr("kcud1") t.KeyRight = tc.getstr("kcuf1") t.KeyLeft = tc.getstr("kcub1") t.KeyPgDn = tc.getstr("knp") t.KeyPgUp = tc.getstr("kpp") t.KeyBacktab = tc.getstr("kcbt") t.KeyExit = tc.getstr("kext") t.KeyCancel = tc.getstr("kcan") t.KeyPrint = tc.getstr("kprt") t.KeyHelp = tc.getstr("khlp") t.KeyClear = tc.getstr("kclr") t.AltChars = tc.getstr("acsc") t.EnterAcs = tc.getstr("smacs") t.ExitAcs = tc.getstr("rmacs") t.EnableAcs = tc.getstr("enacs") t.Mouse = tc.getstr("kmous") t.KeyShfRight = tc.getstr("kRIT") t.KeyShfLeft = tc.getstr("kLFT") t.KeyShfHome = tc.getstr("kHOM") t.KeyShfEnd = tc.getstr("kEND") // Terminfo lacks descriptions for a bunch of modified keys, // but modern XTerm and emulators often have them. Let's add them, // if the shifted right and left arrows are defined. if t.KeyShfRight == "\x1b[1;2C" && t.KeyShfLeft == "\x1b[1;2D" { t.Modifiers = terminfo.ModifiersXTerm t.KeyShfUp = "\x1b[1;2A" t.KeyShfDown = "\x1b[1;2B" t.KeyMetaUp = "\x1b[1;9A" t.KeyMetaDown = "\x1b[1;9B" t.KeyMetaRight = "\x1b[1;9C" t.KeyMetaLeft = "\x1b[1;9D" t.KeyAltUp = "\x1b[1;3A" t.KeyAltDown = "\x1b[1;3B" t.KeyAltRight = "\x1b[1;3C" t.KeyAltLeft = "\x1b[1;3D" t.KeyCtrlUp = "\x1b[1;5A" t.KeyCtrlDown = "\x1b[1;5B" t.KeyCtrlRight = "\x1b[1;5C" t.KeyCtrlLeft = "\x1b[1;5D" t.KeyAltShfUp = "\x1b[1;4A" t.KeyAltShfDown = "\x1b[1;4B" t.KeyAltShfRight = "\x1b[1;4C" t.KeyAltShfLeft = "\x1b[1;4D" t.KeyMetaShfUp = "\x1b[1;10A" t.KeyMetaShfDown = "\x1b[1;10B" t.KeyMetaShfRight = "\x1b[1;10C" t.KeyMetaShfLeft = "\x1b[1;10D" t.KeyCtrlShfUp = "\x1b[1;6A" t.KeyCtrlShfDown = "\x1b[1;6B" t.KeyCtrlShfRight = "\x1b[1;6C" t.KeyCtrlShfLeft = "\x1b[1;6D" t.KeyShfPgUp = "\x1b[5;2~" t.KeyShfPgDn = "\x1b[6;2~" } // And also for Home and End if t.KeyShfHome == "\x1b[1;2H" && t.KeyShfEnd == "\x1b[1;2F" { t.KeyCtrlHome = "\x1b[1;5H" t.KeyCtrlEnd = "\x1b[1;5F" t.KeyAltHome = "\x1b[1;9H" t.KeyAltEnd = "\x1b[1;9F" t.KeyCtrlShfHome = "\x1b[1;6H" t.KeyCtrlShfEnd = "\x1b[1;6F" t.KeyAltShfHome = "\x1b[1;4H" t.KeyAltShfEnd = "\x1b[1;4F" t.KeyMetaShfHome = "\x1b[1;10H" t.KeyMetaShfEnd = "\x1b[1;10F" } // And the same thing for rxvt and workalikes (Eterm, aterm, etc.) // It seems that urxvt at least send escaped as ALT prefix for these, // although some places seem to indicate a separate ALT key sesquence. if t.KeyShfRight == "\x1b[c" && t.KeyShfLeft == "\x1b[d" { t.KeyShfUp = "\x1b[a" t.KeyShfDown = "\x1b[b" t.KeyCtrlUp = "\x1b[Oa" t.KeyCtrlDown = "\x1b[Ob" t.KeyCtrlRight = "\x1b[Oc" t.KeyCtrlLeft = "\x1b[Od" } if t.KeyShfHome == "\x1b[7$" && t.KeyShfEnd == "\x1b[8$" { t.KeyCtrlHome = "\x1b[7^" t.KeyCtrlEnd = "\x1b[8^" } // Technically the RGB flag that is provided for xterm-direct is not // quite right. The problem is that the -direct flag that was introduced // with ncurses 6.1 requires a parsing for the parameters that we lack. // For this case we'll just assume it's XTerm compatible. Someday this // may be incorrect, but right now it is correct, and nobody uses it // anyway. if tc.getflag("Tc") { // This presumes XTerm 24-bit true color. t.TrueColor = true } else if tc.getflag("RGB") { // This is for xterm-direct, which uses a different scheme entirely. // (ncurses went a very different direction from everyone else, and // so it's unlikely anything is using this definition.) t.TrueColor = true t.SetBg = "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m" t.SetFg = "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m" } // We only support colors in ANSI 8 or 256 color mode. if t.Colors < 8 || t.SetFg == "" { t.Colors = 0 } if t.SetCursor == "" { return nil, "", errNotAddressable } // For padding, we lookup the pad char. If that isn't present, // and npc is *not* set, then we assume a null byte. t.PadChar = tc.getstr("pad") if t.PadChar == "" { if !tc.getflag("npc") { t.PadChar = "\u0000" } } // For terminals that use "standard" SGR sequences, lets combine the // foreground and background together. if strings.HasPrefix(t.SetFg, "\x1b[") && strings.HasPrefix(t.SetBg, "\x1b[") && strings.HasSuffix(t.SetFg, "m") && strings.HasSuffix(t.SetBg, "m") { fg := t.SetFg[:len(t.SetFg)-1] r := regexp.MustCompile("%p1") bg := r.ReplaceAllString(t.SetBg[2:], "%p2") t.SetFgBg = fg + ";" + bg } return t, tc.desc, nil } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/e/emacs/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package emacs import "github.com/gdamore/tcell/v2/terminfo" func init() { // GNU Emacs term.el terminal emulation terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "eterm", Columns: 80, Lines: 24, Bell: "\a", Clear: "\x1b[H\x1b[J", EnterCA: "\x1b7\x1b[?47h", ExitCA: "\x1b[2J\x1b[?47l\x1b8", AttrOff: "\x1b[m", Underline: "\x1b[4m", Bold: "\x1b[1m", Reverse: "\x1b[7m", PadChar: "\x00", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", AutoMargin: true, }) // Emacs term.el terminal emulator term-protocol-version 0.96 terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "eterm-color", Columns: 80, Lines: 24, Colors: 8, Bell: "\a", Clear: "\x1b[H\x1b[J", EnterCA: "\x1b7\x1b[?47h", ExitCA: "\x1b[2J\x1b[?47l\x1b8", AttrOff: "\x1b[m", Underline: "\x1b[4m", Bold: "\x1b[1m", Blink: "\x1b[5m", Reverse: "\x1b[7m", SetFg: "\x1b[%p1%{30}%+%dm", SetBg: "\x1b[%p1%'('%+%dm", SetFgBg: "\x1b[%p1%{30}%+%d;%p2%'('%+%dm", ResetFgBg: "\x1b[39;49m", PadChar: "\x00", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1bOA", KeyDown: "\x1bOB", KeyRight: "\x1bOC", KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\x7f", KeyHome: "\x1b[1~", KeyEnd: "\x1b[4~", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", AutoMargin: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/extended/extended.go ================================================ // Copyright 2024 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // Package extended contains an extended set of terminal descriptions. // Applications desiring to have a better chance of Just Working by // default should include this package. This will significantly increase // the size of the program. package extended import ( // The following imports just register themselves -- // these are the terminal types we aggregate in this package. _ "github.com/gdamore/tcell/v2/terminfo/a/aixterm" _ "github.com/gdamore/tcell/v2/terminfo/a/alacritty" _ "github.com/gdamore/tcell/v2/terminfo/a/ansi" _ "github.com/gdamore/tcell/v2/terminfo/b/beterm" _ "github.com/gdamore/tcell/v2/terminfo/c/cygwin" _ "github.com/gdamore/tcell/v2/terminfo/d/dtterm" _ "github.com/gdamore/tcell/v2/terminfo/e/emacs" _ "github.com/gdamore/tcell/v2/terminfo/f/foot" _ "github.com/gdamore/tcell/v2/terminfo/g/gnome" _ "github.com/gdamore/tcell/v2/terminfo/h/hpterm" _ "github.com/gdamore/tcell/v2/terminfo/k/konsole" _ "github.com/gdamore/tcell/v2/terminfo/k/kterm" _ "github.com/gdamore/tcell/v2/terminfo/l/linux" _ "github.com/gdamore/tcell/v2/terminfo/p/pcansi" _ "github.com/gdamore/tcell/v2/terminfo/r/rxvt" _ "github.com/gdamore/tcell/v2/terminfo/s/screen" _ "github.com/gdamore/tcell/v2/terminfo/s/simpleterm" _ "github.com/gdamore/tcell/v2/terminfo/s/sun" _ "github.com/gdamore/tcell/v2/terminfo/t/tmux" _ "github.com/gdamore/tcell/v2/terminfo/v/vt100" _ "github.com/gdamore/tcell/v2/terminfo/v/vt102" _ "github.com/gdamore/tcell/v2/terminfo/v/vt220" _ "github.com/gdamore/tcell/v2/terminfo/v/vt320" _ "github.com/gdamore/tcell/v2/terminfo/v/vt400" _ "github.com/gdamore/tcell/v2/terminfo/v/vt420" _ "github.com/gdamore/tcell/v2/terminfo/v/vt52" _ "github.com/gdamore/tcell/v2/terminfo/w/wy50" _ "github.com/gdamore/tcell/v2/terminfo/w/wy60" _ "github.com/gdamore/tcell/v2/terminfo/w/wy99_ansi" _ "github.com/gdamore/tcell/v2/terminfo/x/xfce" _ "github.com/gdamore/tcell/v2/terminfo/x/xterm" _ "github.com/gdamore/tcell/v2/terminfo/x/xterm_kitty" ) ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/f/foot/foot.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package foot import "github.com/gdamore/tcell/v2/terminfo" func init() { // foot terminal emulator terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "foot", Aliases: []string{"foot-extra"}, Columns: 80, Lines: 24, Colors: 256, Bell: "\a", Clear: "\x1b[H\x1b[2J", EnterCA: "\x1b[?1049h\x1b[22;0;0t", ExitCA: "\x1b[?1049l\x1b[23;0;0t", ShowCursor: "\x1b[?12l\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b(B\x1b[m", Underline: "\x1b[4m", Bold: "\x1b[1m", Dim: "\x1b[2m", Italic: "\x1b[3m", Blink: "\x1b[5m", Reverse: "\x1b[7m", EnterKeypad: "\x1b[?1h\x1b=", ExitKeypad: "\x1b[?1l\x1b>", SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38:5:%p1%d%;m", SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48:5:%p1%d%;m", SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38:5:%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48:5:%p2%d%;m", ResetFgBg: "\x1b[39;49m", AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x1b(0", ExitAcs: "\x1b(B", StrikeThrough: "\x1b[9m", Mouse: "\x1b[M", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1bOA", KeyDown: "\x1bOB", KeyRight: "\x1bOC", KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\u007f", KeyHome: "\x1bOH", KeyEnd: "\x1bOF", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1bOP", KeyF2: "\x1bOQ", KeyF3: "\x1bOR", KeyF4: "\x1bOS", KeyF5: "\x1b[15~", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyBacktab: "\x1b[Z", Modifiers: 1, AutoMargin: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/g/gnome/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package gnome import "github.com/gdamore/tcell/v2/terminfo" func init() { // GNOME Terminal terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "gnome", Columns: 80, Lines: 24, Colors: 8, Bell: "\a", Clear: "\x1b[H\x1b[2J", EnterCA: "\x1b7\x1b[?47h", ExitCA: "\x1b[2J\x1b[?47l\x1b8", ShowCursor: "\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b[0m\x0f", Underline: "\x1b[4m", Bold: "\x1b[1m", Dim: "\x1b[2m", Italic: "\x1b[3m", Reverse: "\x1b[7m", EnterKeypad: "\x1b[?1h\x1b=", ExitKeypad: "\x1b[?1l\x1b>", SetFg: "\x1b[3%p1%dm", SetBg: "\x1b[4%p1%dm", SetFgBg: "\x1b[3%p1%d;4%p2%dm", ResetFgBg: "\x1b[39;49m", PadChar: "\x00", AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x0e", ExitAcs: "\x0f", EnableAcs: "\x1b)0", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", Mouse: "\x1b[M", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1bOA", KeyDown: "\x1bOB", KeyRight: "\x1bOC", KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\x7f", KeyHome: "\x1bOH", KeyEnd: "\x1bOF", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1bOP", KeyF2: "\x1bOQ", KeyF3: "\x1bOR", KeyF4: "\x1bOS", KeyF5: "\x1b[15~", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyBacktab: "\x1b[Z", Modifiers: 1, AutoMargin: true, }) // GNOME Terminal with xterm 256-colors terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "gnome-256color", Columns: 80, Lines: 24, Colors: 256, Bell: "\a", Clear: "\x1b[H\x1b[2J", EnterCA: "\x1b7\x1b[?47h", ExitCA: "\x1b[2J\x1b[?47l\x1b8", ShowCursor: "\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b[0m\x0f", Underline: "\x1b[4m", Bold: "\x1b[1m", Dim: "\x1b[2m", Italic: "\x1b[3m", Reverse: "\x1b[7m", EnterKeypad: "\x1b[?1h\x1b=", ExitKeypad: "\x1b[?1l\x1b>", SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m", SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m", SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m", ResetFgBg: "\x1b[39;49m", PadChar: "\x00", AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x0e", ExitAcs: "\x0f", EnableAcs: "\x1b)0", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", Mouse: "\x1b[M", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1bOA", KeyDown: "\x1bOB", KeyRight: "\x1bOC", KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\x7f", KeyHome: "\x1bOH", KeyEnd: "\x1bOF", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1bOP", KeyF2: "\x1bOQ", KeyF3: "\x1bOR", KeyF4: "\x1bOS", KeyF5: "\x1b[15~", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyBacktab: "\x1b[Z", Modifiers: 1, AutoMargin: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/gen.sh ================================================ #!/bin/bash while read line do case "$line" in *'|'*) alias=${line#*|} line=${line%|*} ;; *) alias=${line%%,*} ;; esac alias=${alias//-/_} direc=${alias:0:1} mkdir -p ${direc}/${alias} go run mkinfo.go -P ${alias} -go ${direc}/${alias}/term.go ${line//,/ } done < models.txt ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/h/hpterm/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package hpterm import "github.com/gdamore/tcell/v2/terminfo" func init() { // HP X11 terminal emulator (old) terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "hpterm", Aliases: []string{"X-hpterm"}, Columns: 80, Lines: 24, Bell: "\a", Clear: "\x1b&a0y0C\x1bJ", AttrOff: "\x1b&d@\x0f", Underline: "\x1b&dD", Bold: "\x1b&dB", Dim: "\x1b&dH", Reverse: "\x1b&dB", EnterKeypad: "\x1b&s1A", ExitKeypad: "\x1b&s0A", PadChar: "\x00", EnterAcs: "\x0e", ExitAcs: "\x0f", SetCursor: "\x1b&a%p1%dy%p2%dC", CursorBack1: "\b", CursorUp1: "\x1bA", KeyUp: "\x1bA", KeyDown: "\x1bB", KeyRight: "\x1bC", KeyLeft: "\x1bD", KeyInsert: "\x1bQ", KeyDelete: "\x1bP", KeyBackspace: "\b", KeyHome: "\x1bh", KeyPgUp: "\x1bV", KeyPgDn: "\x1bU", KeyF1: "\x1bp", KeyF2: "\x1bq", KeyF3: "\x1br", KeyF4: "\x1bs", KeyF5: "\x1bt", KeyF6: "\x1bu", KeyF7: "\x1bv", KeyF8: "\x1bw", KeyClear: "\x1bJ", AutoMargin: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/k/konsole/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package konsole import "github.com/gdamore/tcell/v2/terminfo" func init() { // KDE console window terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "konsole", Columns: 80, Lines: 24, Colors: 8, Bell: "\a", Clear: "\x1b[H\x1b[2J", EnterCA: "\x1b7\x1b[?47h", ExitCA: "\x1b[2J\x1b[?47l\x1b8", ShowCursor: "\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b[0m\x0f", Underline: "\x1b[4m", Bold: "\x1b[1m", Dim: "\x1b[2m", Italic: "\x1b[3m", Blink: "\x1b[5m", Reverse: "\x1b[7m", EnterKeypad: "\x1b[?1h\x1b=", ExitKeypad: "\x1b[?1l\x1b>", SetFg: "\x1b[3%p1%dm", SetBg: "\x1b[4%p1%dm", SetFgBg: "\x1b[3%p1%d;4%p2%dm", ResetFgBg: "\x1b[39;49m", AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x0e", ExitAcs: "\x0f", EnableAcs: "\x1b)0", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", StrikeThrough: "\x1b[9m", Mouse: "\x1b[<", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1bOA", KeyDown: "\x1bOB", KeyRight: "\x1bOC", KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\x7f", KeyHome: "\x1bOH", KeyEnd: "\x1bOF", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1bOP", KeyF2: "\x1bOQ", KeyF3: "\x1bOR", KeyF4: "\x1bOS", KeyF5: "\x1b[15~", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyBacktab: "\x1b[Z", Modifiers: 1, AutoMargin: true, }) // KDE console window with xterm 256-colors terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "konsole-256color", Columns: 80, Lines: 24, Colors: 256, Bell: "\a", Clear: "\x1b[H\x1b[2J", EnterCA: "\x1b7\x1b[?47h", ExitCA: "\x1b[2J\x1b[?47l\x1b8", ShowCursor: "\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b[0m\x0f", Underline: "\x1b[4m", Bold: "\x1b[1m", Dim: "\x1b[2m", Italic: "\x1b[3m", Blink: "\x1b[5m", Reverse: "\x1b[7m", EnterKeypad: "\x1b[?1h\x1b=", ExitKeypad: "\x1b[?1l\x1b>", SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m", SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m", SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m", ResetFgBg: "\x1b[39;49m", AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x0e", ExitAcs: "\x0f", EnableAcs: "\x1b)0", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", StrikeThrough: "\x1b[9m", Mouse: "\x1b[<", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1bOA", KeyDown: "\x1bOB", KeyRight: "\x1bOC", KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\x7f", KeyHome: "\x1bOH", KeyEnd: "\x1bOF", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1bOP", KeyF2: "\x1bOQ", KeyF3: "\x1bOR", KeyF4: "\x1bOS", KeyF5: "\x1b[15~", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyBacktab: "\x1b[Z", Modifiers: 1, AutoMargin: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/k/kterm/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package kterm import "github.com/gdamore/tcell/v2/terminfo" func init() { // kterm kanji terminal emulator (X window system) terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "kterm", Columns: 80, Lines: 24, Colors: 8, Bell: "\a", Clear: "\x1b[H\x1b[2J", EnterCA: "\x1b7\x1b[?47h", ExitCA: "\x1b[2J\x1b[?47l\x1b8", AttrOff: "\x1b[m\x1b(B", Underline: "\x1b[4m", Bold: "\x1b[1m", Reverse: "\x1b[7m", EnterKeypad: "\x1b[?1h\x1b=", ExitKeypad: "\x1b[?1l\x1b>", SetFg: "\x1b[3%p1%dm", SetBg: "\x1b[4%p1%dm", SetFgBg: "\x1b[3%p1%d;4%p2%dm", ResetFgBg: "\x1b[39;49m", PadChar: "\x00", AltChars: "``aajjkkllmmnnooppqqrrssttuuvvwwxx~~", EnterAcs: "\x1b(0", ExitAcs: "\x1b(B", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", Mouse: "\x1b[M", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1bOA", KeyDown: "\x1bOB", KeyRight: "\x1bOC", KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\x7f", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1b[11~", KeyF2: "\x1b[12~", KeyF3: "\x1b[13~", KeyF4: "\x1b[14~", KeyF5: "\x1b[15~", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyF13: "\x1b[25~", KeyF14: "\x1b[26~", KeyF15: "\x1b[28~", KeyF16: "\x1b[29~", KeyF17: "\x1b[31~", KeyF18: "\x1b[32~", KeyF19: "\x1b[33~", KeyF20: "\x1b[34~", AutoMargin: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/l/linux/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package linux import "github.com/gdamore/tcell/v2/terminfo" func init() { // Linux console terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "linux", Colors: 8, Bell: "\a", Clear: "\x1b[H\x1b[J", ShowCursor: "\x1b[?25h\x1b[?0c", HideCursor: "\x1b[?25l\x1b[?1c", AttrOff: "\x1b[m\x0f", Underline: "\x1b[4m", Bold: "\x1b[1m", Dim: "\x1b[2m", Blink: "\x1b[5m", Reverse: "\x1b[7m", SetFg: "\x1b[3%p1%dm", SetBg: "\x1b[4%p1%dm", SetFgBg: "\x1b[3%p1%d;4%p2%dm", ResetFgBg: "\x1b[39;49m", PadChar: "\x00", AltChars: "++,,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x0e", ExitAcs: "\x0f", EnableAcs: "\x1b)0", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", Mouse: "\x1b[M", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1b[A", KeyDown: "\x1b[B", KeyRight: "\x1b[C", KeyLeft: "\x1b[D", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\x7f", KeyHome: "\x1b[1~", KeyEnd: "\x1b[4~", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1b[[A", KeyF2: "\x1b[[B", KeyF3: "\x1b[[C", KeyF4: "\x1b[[D", KeyF5: "\x1b[[E", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyF13: "\x1b[25~", KeyF14: "\x1b[26~", KeyF15: "\x1b[28~", KeyF16: "\x1b[29~", KeyF17: "\x1b[31~", KeyF18: "\x1b[32~", KeyF19: "\x1b[33~", KeyF20: "\x1b[34~", KeyBacktab: "\x1b\t", AutoMargin: true, InsertChar: "\x1b[@", }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/models.txt ================================================ aixterm alacritty ansi beterm cygwin dtterm eterm,eterm-color|emacs gnome,gnome-256color hpterm konsole,konsole-256color kterm linux pcansi rxvt,rxvt-256color,rxvt-88color,rxvt-unicode,rxvt-unicode-256color screen,screen-256color st,st-256color|simpleterm tmux vt52 vt100 vt102 vt220 vt320 vt400 vt420 wy50 wy60 wy99-ansi,wy99a-ansi xfce xterm,xterm-88color,xterm-256color xterm-kitty ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/p/pcansi/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package pcansi import "github.com/gdamore/tcell/v2/terminfo" func init() { // ibm-pc terminal programs claiming to be ANSI terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "pcansi", Columns: 80, Lines: 24, Colors: 8, Bell: "\a", Clear: "\x1b[H\x1b[J", AttrOff: "\x1b[0;10m", Underline: "\x1b[4m", Bold: "\x1b[1m", Blink: "\x1b[5m", Reverse: "\x1b[7m", SetFg: "\x1b[3%p1%dm", SetBg: "\x1b[4%p1%dm", SetFgBg: "\x1b[3%p1%d;4%p2%dm", ResetFgBg: "\x1b[37;40m", PadChar: "\x00", AltChars: "+\x10,\x11-\x18.\x190\xdb`\x04a\xb1f\xf8g\xf1h\xb0j\xd9k\xbfl\xdam\xc0n\xc5o~p\xc4q\xc4r\xc4s_t\xc3u\xb4v\xc1w\xc2x\xb3y\xf3z\xf2{\xe3|\xd8}\x9c~\xfe", EnterAcs: "\x1b[12m", ExitAcs: "\x1b[10m", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\x1b[D", CursorUp1: "\x1b[A", KeyUp: "\x1b[A", KeyDown: "\x1b[B", KeyRight: "\x1b[C", KeyLeft: "\x1b[D", KeyBackspace: "\b", KeyHome: "\x1b[H", AutoMargin: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/r/rxvt/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package rxvt import "github.com/gdamore/tcell/v2/terminfo" func init() { // rxvt terminal emulator (X Window System) terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "rxvt", Aliases: []string{"rxvt-color"}, Columns: 80, Lines: 24, Colors: 8, Bell: "\a", Clear: "\x1b[H\x1b[2J", EnterCA: "\x1b7\x1b[?47h", ExitCA: "\x1b[2J\x1b[?47l\x1b8", ShowCursor: "\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b[m\x0f", Underline: "\x1b[4m", Bold: "\x1b[1m", Blink: "\x1b[5m", Reverse: "\x1b[7m", EnterKeypad: "\x1b=", ExitKeypad: "\x1b>", SetFg: "\x1b[3%p1%dm", SetBg: "\x1b[4%p1%dm", SetFgBg: "\x1b[3%p1%d;4%p2%dm", ResetFgBg: "\x1b[39;49m", PadChar: "\x00", AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x0e", ExitAcs: "\x0f", EnableAcs: "\x1b(B\x1b)0", Mouse: "\x1b[M", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1b[A", KeyDown: "\x1b[B", KeyRight: "\x1b[C", KeyLeft: "\x1b[D", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\x7f", KeyHome: "\x1b[7~", KeyEnd: "\x1b[8~", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1b[11~", KeyF2: "\x1b[12~", KeyF3: "\x1b[13~", KeyF4: "\x1b[14~", KeyF5: "\x1b[15~", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyF13: "\x1b[25~", KeyF14: "\x1b[26~", KeyF15: "\x1b[28~", KeyF16: "\x1b[29~", KeyF17: "\x1b[31~", KeyF18: "\x1b[32~", KeyF19: "\x1b[33~", KeyF20: "\x1b[34~", KeyF21: "\x1b[23$", KeyF22: "\x1b[24$", KeyF23: "\x1b[11^", KeyF24: "\x1b[12^", KeyF25: "\x1b[13^", KeyF26: "\x1b[14^", KeyF27: "\x1b[15^", KeyF28: "\x1b[17^", KeyF29: "\x1b[18^", KeyF30: "\x1b[19^", KeyF31: "\x1b[20^", KeyF32: "\x1b[21^", KeyF33: "\x1b[23^", KeyF34: "\x1b[24^", KeyF35: "\x1b[25^", KeyF36: "\x1b[26^", KeyF37: "\x1b[28^", KeyF38: "\x1b[29^", KeyF39: "\x1b[31^", KeyF40: "\x1b[32^", KeyF41: "\x1b[33^", KeyF42: "\x1b[34^", KeyF43: "\x1b[23@", KeyF44: "\x1b[24@", KeyBacktab: "\x1b[Z", KeyShfLeft: "\x1b[d", KeyShfRight: "\x1b[c", KeyShfUp: "\x1b[a", KeyShfDown: "\x1b[b", KeyShfHome: "\x1b[7$", KeyShfEnd: "\x1b[8$", KeyShfInsert: "\x1b[2$", KeyShfDelete: "\x1b[3$", KeyCtrlUp: "\x1b[Oa", KeyCtrlDown: "\x1b[Ob", KeyCtrlRight: "\x1b[Oc", KeyCtrlLeft: "\x1b[Od", KeyCtrlHome: "\x1b[7^", KeyCtrlEnd: "\x1b[8^", AutoMargin: true, }) // rxvt 2.7.9 with xterm 256-colors terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "rxvt-256color", Columns: 80, Lines: 24, Colors: 256, Bell: "\a", Clear: "\x1b[H\x1b[2J", EnterCA: "\x1b7\x1b[?47h", ExitCA: "\x1b[2J\x1b[?47l\x1b8", ShowCursor: "\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b[m\x0f", Underline: "\x1b[4m", Bold: "\x1b[1m", Blink: "\x1b[5m", Reverse: "\x1b[7m", EnterKeypad: "\x1b=", ExitKeypad: "\x1b>", SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m", SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m", SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m", ResetFgBg: "\x1b[39;49m", PadChar: "\x00", AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x0e", ExitAcs: "\x0f", EnableAcs: "\x1b(B\x1b)0", Mouse: "\x1b[M", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1b[A", KeyDown: "\x1b[B", KeyRight: "\x1b[C", KeyLeft: "\x1b[D", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\x7f", KeyHome: "\x1b[7~", KeyEnd: "\x1b[8~", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1b[11~", KeyF2: "\x1b[12~", KeyF3: "\x1b[13~", KeyF4: "\x1b[14~", KeyF5: "\x1b[15~", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyF13: "\x1b[25~", KeyF14: "\x1b[26~", KeyF15: "\x1b[28~", KeyF16: "\x1b[29~", KeyF17: "\x1b[31~", KeyF18: "\x1b[32~", KeyF19: "\x1b[33~", KeyF20: "\x1b[34~", KeyF21: "\x1b[23$", KeyF22: "\x1b[24$", KeyF23: "\x1b[11^", KeyF24: "\x1b[12^", KeyF25: "\x1b[13^", KeyF26: "\x1b[14^", KeyF27: "\x1b[15^", KeyF28: "\x1b[17^", KeyF29: "\x1b[18^", KeyF30: "\x1b[19^", KeyF31: "\x1b[20^", KeyF32: "\x1b[21^", KeyF33: "\x1b[23^", KeyF34: "\x1b[24^", KeyF35: "\x1b[25^", KeyF36: "\x1b[26^", KeyF37: "\x1b[28^", KeyF38: "\x1b[29^", KeyF39: "\x1b[31^", KeyF40: "\x1b[32^", KeyF41: "\x1b[33^", KeyF42: "\x1b[34^", KeyF43: "\x1b[23@", KeyF44: "\x1b[24@", KeyBacktab: "\x1b[Z", KeyShfLeft: "\x1b[d", KeyShfRight: "\x1b[c", KeyShfUp: "\x1b[a", KeyShfDown: "\x1b[b", KeyShfHome: "\x1b[7$", KeyShfEnd: "\x1b[8$", KeyShfInsert: "\x1b[2$", KeyShfDelete: "\x1b[3$", KeyCtrlUp: "\x1b[Oa", KeyCtrlDown: "\x1b[Ob", KeyCtrlRight: "\x1b[Oc", KeyCtrlLeft: "\x1b[Od", KeyCtrlHome: "\x1b[7^", KeyCtrlEnd: "\x1b[8^", AutoMargin: true, }) // rxvt 2.7.9 with xterm 88-colors terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "rxvt-88color", Columns: 80, Lines: 24, Colors: 88, Bell: "\a", Clear: "\x1b[H\x1b[2J", EnterCA: "\x1b7\x1b[?47h", ExitCA: "\x1b[2J\x1b[?47l\x1b8", ShowCursor: "\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b[m\x0f", Underline: "\x1b[4m", Bold: "\x1b[1m", Blink: "\x1b[5m", Reverse: "\x1b[7m", EnterKeypad: "\x1b=", ExitKeypad: "\x1b>", SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m", SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m", SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m", ResetFgBg: "\x1b[39;49m", PadChar: "\x00", AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x0e", ExitAcs: "\x0f", EnableAcs: "\x1b(B\x1b)0", Mouse: "\x1b[M", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1b[A", KeyDown: "\x1b[B", KeyRight: "\x1b[C", KeyLeft: "\x1b[D", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\x7f", KeyHome: "\x1b[7~", KeyEnd: "\x1b[8~", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1b[11~", KeyF2: "\x1b[12~", KeyF3: "\x1b[13~", KeyF4: "\x1b[14~", KeyF5: "\x1b[15~", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyF13: "\x1b[25~", KeyF14: "\x1b[26~", KeyF15: "\x1b[28~", KeyF16: "\x1b[29~", KeyF17: "\x1b[31~", KeyF18: "\x1b[32~", KeyF19: "\x1b[33~", KeyF20: "\x1b[34~", KeyF21: "\x1b[23$", KeyF22: "\x1b[24$", KeyF23: "\x1b[11^", KeyF24: "\x1b[12^", KeyF25: "\x1b[13^", KeyF26: "\x1b[14^", KeyF27: "\x1b[15^", KeyF28: "\x1b[17^", KeyF29: "\x1b[18^", KeyF30: "\x1b[19^", KeyF31: "\x1b[20^", KeyF32: "\x1b[21^", KeyF33: "\x1b[23^", KeyF34: "\x1b[24^", KeyF35: "\x1b[25^", KeyF36: "\x1b[26^", KeyF37: "\x1b[28^", KeyF38: "\x1b[29^", KeyF39: "\x1b[31^", KeyF40: "\x1b[32^", KeyF41: "\x1b[33^", KeyF42: "\x1b[34^", KeyF43: "\x1b[23@", KeyF44: "\x1b[24@", KeyBacktab: "\x1b[Z", KeyShfLeft: "\x1b[d", KeyShfRight: "\x1b[c", KeyShfUp: "\x1b[a", KeyShfDown: "\x1b[b", KeyShfHome: "\x1b[7$", KeyShfEnd: "\x1b[8$", KeyShfInsert: "\x1b[2$", KeyShfDelete: "\x1b[3$", KeyCtrlUp: "\x1b[Oa", KeyCtrlDown: "\x1b[Ob", KeyCtrlRight: "\x1b[Oc", KeyCtrlLeft: "\x1b[Od", KeyCtrlHome: "\x1b[7^", KeyCtrlEnd: "\x1b[8^", AutoMargin: true, }) // rxvt-unicode terminal (X Window System) terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "rxvt-unicode", Columns: 80, Lines: 24, Colors: 88, Bell: "\a", Clear: "\x1b[H\x1b[2J", EnterCA: "\x1b[?1049h", ExitCA: "\x1b[r\x1b[?1049l", ShowCursor: "\x1b[?12l\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b[m\x1b(B", Underline: "\x1b[4m", Bold: "\x1b[1m", Italic: "\x1b[3m", Blink: "\x1b[5m", Reverse: "\x1b[7m", EnterKeypad: "\x1b=", ExitKeypad: "\x1b>", SetFg: "\x1b[38;5;%p1%dm", SetBg: "\x1b[48;5;%p1%dm", SetFgBg: "\x1b[38;5;%p1%d;48;5;%p2%dm", ResetFgBg: "\x1b[39;49m", AltChars: "+C,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x1b(0", ExitAcs: "\x1b(B", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", Mouse: "\x1b[M", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1b[A", KeyDown: "\x1b[B", KeyRight: "\x1b[C", KeyLeft: "\x1b[D", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\x7f", KeyHome: "\x1b[7~", KeyEnd: "\x1b[8~", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1b[11~", KeyF2: "\x1b[12~", KeyF3: "\x1b[13~", KeyF4: "\x1b[14~", KeyF5: "\x1b[15~", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyF13: "\x1b[25~", KeyF14: "\x1b[26~", KeyF15: "\x1b[28~", KeyF16: "\x1b[29~", KeyF17: "\x1b[31~", KeyF18: "\x1b[32~", KeyF19: "\x1b[33~", KeyF20: "\x1b[34~", KeyBacktab: "\x1b[Z", KeyShfLeft: "\x1b[d", KeyShfRight: "\x1b[c", KeyShfUp: "\x1b[a", KeyShfDown: "\x1b[b", KeyShfHome: "\x1b[7$", KeyShfEnd: "\x1b[8$", KeyShfInsert: "\x1b[2$", KeyShfDelete: "\x1b[3$", KeyCtrlUp: "\x1b[Oa", KeyCtrlDown: "\x1b[Ob", KeyCtrlRight: "\x1b[Oc", KeyCtrlLeft: "\x1b[Od", KeyCtrlHome: "\x1b[7^", KeyCtrlEnd: "\x1b[8^", AutoMargin: true, InsertChar: "\x1b[@", }) // rxvt-unicode terminal with 256 colors (X Window System) terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "rxvt-unicode-256color", Columns: 80, Lines: 24, Colors: 256, Bell: "\a", Clear: "\x1b[H\x1b[2J", EnterCA: "\x1b[?1049h", ExitCA: "\x1b[r\x1b[?1049l", ShowCursor: "\x1b[?12l\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b[m\x1b(B", Underline: "\x1b[4m", Bold: "\x1b[1m", Italic: "\x1b[3m", Blink: "\x1b[5m", Reverse: "\x1b[7m", EnterKeypad: "\x1b=", ExitKeypad: "\x1b>", SetFg: "\x1b[38;5;%p1%dm", SetBg: "\x1b[48;5;%p1%dm", SetFgBg: "\x1b[38;5;%p1%d;48;5;%p2%dm", ResetFgBg: "\x1b[39;49m", AltChars: "+C,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x1b(0", ExitAcs: "\x1b(B", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", Mouse: "\x1b[M", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1b[A", KeyDown: "\x1b[B", KeyRight: "\x1b[C", KeyLeft: "\x1b[D", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\x7f", KeyHome: "\x1b[7~", KeyEnd: "\x1b[8~", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1b[11~", KeyF2: "\x1b[12~", KeyF3: "\x1b[13~", KeyF4: "\x1b[14~", KeyF5: "\x1b[15~", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyF13: "\x1b[25~", KeyF14: "\x1b[26~", KeyF15: "\x1b[28~", KeyF16: "\x1b[29~", KeyF17: "\x1b[31~", KeyF18: "\x1b[32~", KeyF19: "\x1b[33~", KeyF20: "\x1b[34~", KeyBacktab: "\x1b[Z", KeyShfLeft: "\x1b[d", KeyShfRight: "\x1b[c", KeyShfUp: "\x1b[a", KeyShfDown: "\x1b[b", KeyShfHome: "\x1b[7$", KeyShfEnd: "\x1b[8$", KeyShfInsert: "\x1b[2$", KeyShfDelete: "\x1b[3$", KeyCtrlUp: "\x1b[Oa", KeyCtrlDown: "\x1b[Ob", KeyCtrlRight: "\x1b[Oc", KeyCtrlLeft: "\x1b[Od", KeyCtrlHome: "\x1b[7^", KeyCtrlEnd: "\x1b[8^", AutoMargin: true, InsertChar: "\x1b[@", }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/s/screen/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package screen import "github.com/gdamore/tcell/v2/terminfo" func init() { // VT 100/ANSI X3.64 virtual terminal terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "screen", Columns: 80, Lines: 24, Colors: 8, Bell: "\a", Clear: "\x1b[H\x1b[J", EnterCA: "\x1b[?1049h", ExitCA: "\x1b[?1049l", ShowCursor: "\x1b[34h\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b[m\x0f", Underline: "\x1b[4m", Bold: "\x1b[1m", Dim: "\x1b[2m", Blink: "\x1b[5m", Reverse: "\x1b[7m", EnterKeypad: "\x1b[?1h\x1b=", ExitKeypad: "\x1b[?1l\x1b>", SetFg: "\x1b[3%p1%dm", SetBg: "\x1b[4%p1%dm", SetFgBg: "\x1b[3%p1%d;4%p2%dm", ResetFgBg: "\x1b[39;49m", PadChar: "\x00", AltChars: "++,,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x0e", ExitAcs: "\x0f", EnableAcs: "\x1b(B\x1b)0", Mouse: "\x1b[M", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1bM", KeyUp: "\x1bOA", KeyDown: "\x1bOB", KeyRight: "\x1bOC", KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\x7f", KeyHome: "\x1b[1~", KeyEnd: "\x1b[4~", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1bOP", KeyF2: "\x1bOQ", KeyF3: "\x1bOR", KeyF4: "\x1bOS", KeyF5: "\x1b[15~", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyBacktab: "\x1b[Z", AutoMargin: true, }) // GNU Screen with 256 colors terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "screen-256color", Columns: 80, Lines: 24, Colors: 256, Bell: "\a", Clear: "\x1b[H\x1b[J", EnterCA: "\x1b[?1049h", ExitCA: "\x1b[?1049l", ShowCursor: "\x1b[34h\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b[m\x0f", Underline: "\x1b[4m", Bold: "\x1b[1m", Dim: "\x1b[2m", Blink: "\x1b[5m", Reverse: "\x1b[7m", EnterKeypad: "\x1b[?1h\x1b=", ExitKeypad: "\x1b[?1l\x1b>", SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m", SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m", SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m", ResetFgBg: "\x1b[39;49m", PadChar: "\x00", AltChars: "++,,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x0e", ExitAcs: "\x0f", EnableAcs: "\x1b(B\x1b)0", Mouse: "\x1b[M", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1bM", KeyUp: "\x1bOA", KeyDown: "\x1bOB", KeyRight: "\x1bOC", KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\x7f", KeyHome: "\x1b[1~", KeyEnd: "\x1b[4~", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1bOP", KeyF2: "\x1bOQ", KeyF3: "\x1bOR", KeyF4: "\x1bOS", KeyF5: "\x1b[15~", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyBacktab: "\x1b[Z", AutoMargin: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/s/simpleterm/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package simpleterm import "github.com/gdamore/tcell/v2/terminfo" func init() { // aka simpleterm terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "st", Aliases: []string{"stterm"}, Columns: 80, Lines: 24, Colors: 8, Bell: "\a", Clear: "\x1b[H\x1b[2J", EnterCA: "\x1b[?1049h", ExitCA: "\x1b[?1049l", ShowCursor: "\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b[0m", Underline: "\x1b[4m", Bold: "\x1b[1m", Dim: "\x1b[2m", Italic: "\x1b[3m", Blink: "\x1b[5m", Reverse: "\x1b[7m", EnterKeypad: "\x1b[?1h\x1b=", ExitKeypad: "\x1b[?1l\x1b>", SetFg: "\x1b[3%p1%dm", SetBg: "\x1b[4%p1%dm", SetFgBg: "\x1b[3%p1%d;4%p2%dm", ResetFgBg: "\x1b[39;49m", AltChars: "+C,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x1b(0", ExitAcs: "\x1b(B", EnableAcs: "\x1b)0", StrikeThrough: "\x1b[9m", Mouse: "\x1b[M", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1bOA", KeyDown: "\x1bOB", KeyRight: "\x1bOC", KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\x7f", KeyHome: "\x1b[1~", KeyEnd: "\x1b[4~", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1bOP", KeyF2: "\x1bOQ", KeyF3: "\x1bOR", KeyF4: "\x1bOS", KeyF5: "\x1b[15~", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyClear: "\x1b[3;5~", Modifiers: 1, AutoMargin: true, }) // simpleterm with 256 colors terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "st-256color", Aliases: []string{"stterm-256color"}, Columns: 80, Lines: 24, Colors: 256, Bell: "\a", Clear: "\x1b[H\x1b[2J", EnterCA: "\x1b[?1049h", ExitCA: "\x1b[?1049l", ShowCursor: "\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b[0m", Underline: "\x1b[4m", Bold: "\x1b[1m", Dim: "\x1b[2m", Italic: "\x1b[3m", Blink: "\x1b[5m", Reverse: "\x1b[7m", EnterKeypad: "\x1b[?1h\x1b=", ExitKeypad: "\x1b[?1l\x1b>", SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m", SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m", SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m", ResetFgBg: "\x1b[39;49m", AltChars: "+C,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x1b(0", ExitAcs: "\x1b(B", EnableAcs: "\x1b)0", StrikeThrough: "\x1b[9m", Mouse: "\x1b[M", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1bOA", KeyDown: "\x1bOB", KeyRight: "\x1bOC", KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\x7f", KeyHome: "\x1b[1~", KeyEnd: "\x1b[4~", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1bOP", KeyF2: "\x1bOQ", KeyF3: "\x1bOR", KeyF4: "\x1bOS", KeyF5: "\x1b[15~", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyClear: "\x1b[3;5~", Modifiers: 1, AutoMargin: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/s/sun/term.go ================================================ // Copyright 2021 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // This terminal definition is hand-coded, as the default terminfo for // this terminal is busted with respect to color. Unlike pretty much every // other ANSI compliant terminal, this terminal cannot combine foreground and // background escapes. The default terminfo also only provides escapes for // 16-bit color. package sun import "github.com/gdamore/tcell/v2/terminfo" func init() { // Sun Microsystems Inc. workstation console terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "sun", Aliases: []string{"sun1", "sun2"}, Columns: 80, Lines: 34, Bell: "\a", Clear: "\f", AttrOff: "\x1b[m", Reverse: "\x1b[7m", PadChar: "\x00", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1b[A", KeyDown: "\x1b[B", KeyRight: "\x1b[C", KeyLeft: "\x1b[D", KeyInsert: "\x1b[247z", KeyDelete: "\u007f", KeyBackspace: "\b", KeyHome: "\x1b[214z", KeyEnd: "\x1b[220z", KeyPgUp: "\x1b[216z", KeyPgDn: "\x1b[222z", KeyF1: "\x1b[224z", KeyF2: "\x1b[225z", KeyF3: "\x1b[226z", KeyF4: "\x1b[227z", KeyF5: "\x1b[228z", KeyF6: "\x1b[229z", KeyF7: "\x1b[230z", KeyF8: "\x1b[231z", KeyF9: "\x1b[232z", KeyF10: "\x1b[233z", KeyF11: "\x1b[234z", KeyF12: "\x1b[235z", AutoMargin: true, InsertChar: "\x1b[@", }) // Sun Microsystems Workstation console with color support (IA systems) terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "sun-color", Columns: 80, Lines: 34, Colors: 256, Bell: "\a", Clear: "\f", AttrOff: "\x1b[m", Bold: "\x1b[1m", Reverse: "\x1b[7m", SetFg: "\x1b[38;5;%p1%dm", SetBg: "\x1b[48;5;%p1%dm", ResetFgBg: "\x1b[0m", PadChar: "\x00", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1b[A", KeyDown: "\x1b[B", KeyRight: "\x1b[C", KeyLeft: "\x1b[D", KeyInsert: "\x1b[247z", KeyDelete: "\u007f", KeyBackspace: "\b", KeyHome: "\x1b[214z", KeyEnd: "\x1b[220z", KeyPgUp: "\x1b[216z", KeyPgDn: "\x1b[222z", KeyF1: "\x1b[224z", KeyF2: "\x1b[225z", KeyF3: "\x1b[226z", KeyF4: "\x1b[227z", KeyF5: "\x1b[228z", KeyF6: "\x1b[229z", KeyF7: "\x1b[230z", KeyF8: "\x1b[231z", KeyF9: "\x1b[232z", KeyF10: "\x1b[233z", KeyF11: "\x1b[234z", KeyF12: "\x1b[235z", AutoMargin: true, InsertChar: "\x1b[@", }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/t/tmux/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package tmux import "github.com/gdamore/tcell/v2/terminfo" func init() { // tmux terminal multiplexer terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "tmux", Columns: 80, Lines: 24, Colors: 8, Bell: "\a", Clear: "\x1b[H\x1b[J", EnterCA: "\x1b[?1049h", ExitCA: "\x1b[?1049l", ShowCursor: "\x1b[34h\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b[m\x0f", Underline: "\x1b[4m", Bold: "\x1b[1m", Dim: "\x1b[2m", Italic: "\x1b[3m", Blink: "\x1b[5m", Reverse: "\x1b[7m", EnterKeypad: "\x1b[?1h\x1b=", ExitKeypad: "\x1b[?1l\x1b>", SetFg: "\x1b[3%p1%dm", SetBg: "\x1b[4%p1%dm", SetFgBg: "\x1b[3%p1%d;4%p2%dm", ResetFgBg: "\x1b[39;49m", PadChar: "\x00", AltChars: "++,,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x0e", ExitAcs: "\x0f", EnableAcs: "\x1b(B\x1b)0", StrikeThrough: "\x1b[9m", Mouse: "\x1b[M", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1bM", KeyUp: "\x1bOA", KeyDown: "\x1bOB", KeyRight: "\x1bOC", KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\x7f", KeyHome: "\x1b[1~", KeyEnd: "\x1b[4~", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1bOP", KeyF2: "\x1bOQ", KeyF3: "\x1bOR", KeyF4: "\x1bOS", KeyF5: "\x1b[15~", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyBacktab: "\x1b[Z", Modifiers: 1, AutoMargin: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/terminfo.go ================================================ // Copyright 2024 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package terminfo import ( "bytes" "errors" "fmt" "io" "os" "strconv" "strings" "sync" "time" ) var ( // ErrTermNotFound indicates that a suitable terminal entry could // not be found. This can result from either not having TERM set, // or from the TERM failing to support certain minimal functionality, // in particular absolute cursor addressability (the cup capability) // is required. For example, legacy "adm3" lacks this capability, // whereas the slightly newer "adm3a" supports it. This failure // occurs most often with "dumb". ErrTermNotFound = errors.New("terminal entry not found") ) // Terminfo represents a terminfo entry. Note that we use friendly names // in Go, but when we write out JSON, we use the same names as terminfo. // The name, aliases and smous, rmous fields do not come from terminfo directly. type Terminfo struct { Name string Aliases []string Columns int // cols Lines int // lines Colors int // colors Bell string // bell Clear string // clear EnterCA string // smcup ExitCA string // rmcup ShowCursor string // cnorm HideCursor string // civis AttrOff string // sgr0 Underline string // smul Bold string // bold Blink string // blink Reverse string // rev Dim string // dim Italic string // sitm EnterKeypad string // smkx ExitKeypad string // rmkx SetFg string // setaf SetBg string // setab ResetFgBg string // op SetCursor string // cup CursorBack1 string // cub1 CursorUp1 string // cuu1 PadChar string // pad KeyBackspace string // kbs KeyF1 string // kf1 KeyF2 string // kf2 KeyF3 string // kf3 KeyF4 string // kf4 KeyF5 string // kf5 KeyF6 string // kf6 KeyF7 string // kf7 KeyF8 string // kf8 KeyF9 string // kf9 KeyF10 string // kf10 KeyF11 string // kf11 KeyF12 string // kf12 KeyF13 string // kf13 KeyF14 string // kf14 KeyF15 string // kf15 KeyF16 string // kf16 KeyF17 string // kf17 KeyF18 string // kf18 KeyF19 string // kf19 KeyF20 string // kf20 KeyF21 string // kf21 KeyF22 string // kf22 KeyF23 string // kf23 KeyF24 string // kf24 KeyF25 string // kf25 KeyF26 string // kf26 KeyF27 string // kf27 KeyF28 string // kf28 KeyF29 string // kf29 KeyF30 string // kf30 KeyF31 string // kf31 KeyF32 string // kf32 KeyF33 string // kf33 KeyF34 string // kf34 KeyF35 string // kf35 KeyF36 string // kf36 KeyF37 string // kf37 KeyF38 string // kf38 KeyF39 string // kf39 KeyF40 string // kf40 KeyF41 string // kf41 KeyF42 string // kf42 KeyF43 string // kf43 KeyF44 string // kf44 KeyF45 string // kf45 KeyF46 string // kf46 KeyF47 string // kf47 KeyF48 string // kf48 KeyF49 string // kf49 KeyF50 string // kf50 KeyF51 string // kf51 KeyF52 string // kf52 KeyF53 string // kf53 KeyF54 string // kf54 KeyF55 string // kf55 KeyF56 string // kf56 KeyF57 string // kf57 KeyF58 string // kf58 KeyF59 string // kf59 KeyF60 string // kf60 KeyF61 string // kf61 KeyF62 string // kf62 KeyF63 string // kf63 KeyF64 string // kf64 KeyInsert string // kich1 KeyDelete string // kdch1 KeyHome string // khome KeyEnd string // kend KeyHelp string // khlp KeyPgUp string // kpp KeyPgDn string // knp KeyUp string // kcuu1 KeyDown string // kcud1 KeyLeft string // kcub1 KeyRight string // kcuf1 KeyBacktab string // kcbt KeyExit string // kext KeyClear string // kclr KeyPrint string // kprt KeyCancel string // kcan Mouse string // kmous AltChars string // acsc EnterAcs string // smacs ExitAcs string // rmacs EnableAcs string // enacs KeyShfRight string // kRIT KeyShfLeft string // kLFT KeyShfHome string // kHOM KeyShfEnd string // kEND KeyShfInsert string // kIC KeyShfDelete string // kDC // These are non-standard extensions to terminfo. This includes // true color support, and some additional keys. Its kind of bizarre // that shifted variants of left and right exist, but not up and down. // Terminal support for these are going to vary amongst XTerm // emulations, so don't depend too much on them in your application. StrikeThrough string // smxx SetFgBg string // setfgbg SetFgBgRGB string // setfgbgrgb SetFgRGB string // setfrgb SetBgRGB string // setbrgb KeyShfUp string // shift-up KeyShfDown string // shift-down KeyShfPgUp string // shift-kpp KeyShfPgDn string // shift-knp KeyCtrlUp string // ctrl-up KeyCtrlDown string // ctrl-left KeyCtrlRight string // ctrl-right KeyCtrlLeft string // ctrl-left KeyMetaUp string // meta-up KeyMetaDown string // meta-left KeyMetaRight string // meta-right KeyMetaLeft string // meta-left KeyAltUp string // alt-up KeyAltDown string // alt-left KeyAltRight string // alt-right KeyAltLeft string // alt-left KeyCtrlHome string KeyCtrlEnd string KeyMetaHome string KeyMetaEnd string KeyAltHome string KeyAltEnd string KeyAltShfUp string KeyAltShfDown string KeyAltShfLeft string KeyAltShfRight string KeyMetaShfUp string KeyMetaShfDown string KeyMetaShfLeft string KeyMetaShfRight string KeyCtrlShfUp string KeyCtrlShfDown string KeyCtrlShfLeft string KeyCtrlShfRight string KeyCtrlShfHome string KeyCtrlShfEnd string KeyAltShfHome string KeyAltShfEnd string KeyMetaShfHome string KeyMetaShfEnd string EnablePaste string // bracketed paste mode DisablePaste string PasteStart string PasteEnd string Modifiers int InsertChar string // string to insert a character (ich1) AutoMargin bool // true if writing to last cell in line advances TrueColor bool // true if the terminal supports direct color CursorDefault string CursorBlinkingBlock string CursorSteadyBlock string CursorBlinkingUnderline string CursorSteadyUnderline string CursorBlinkingBar string CursorSteadyBar string EnterUrl string ExitUrl string SetWindowSize string EnableFocusReporting string DisableFocusReporting string DisableAutoMargin string // smam EnableAutoMargin string // rmam } const ( ModifiersNone = 0 ModifiersXTerm = 1 ) type stack []interface{} func (st stack) Push(v interface{}) stack { if b, ok := v.(bool); ok { if b { return append(st, 1) } else { return append(st, 0) } } return append(st, v) } func (st stack) PopString() (string, stack) { if len(st) > 0 { e := st[len(st)-1] var s string switch v := e.(type) { case int: s = strconv.Itoa(v) case string: s = v } return s, st[:len(st)-1] } return "", st } func (st stack) PopInt() (int, stack) { if len(st) > 0 { e := st[len(st)-1] var i int switch v := e.(type) { case int: i = v case string: i, _ = strconv.Atoi(v) } return i, st[:len(st)-1] } return 0, st } // static vars var svars [26]string type paramsBuffer struct { out bytes.Buffer buf bytes.Buffer } // Start initializes the params buffer with the initial string data. // It also locks the paramsBuffer. The caller must call End() when // finished. func (pb *paramsBuffer) Start(s string) { pb.out.Reset() pb.buf.Reset() pb.buf.WriteString(s) } // End returns the final output from TParam, but it also releases the lock. func (pb *paramsBuffer) End() string { s := pb.out.String() return s } // NextCh returns the next input character to the expander. func (pb *paramsBuffer) NextCh() (byte, error) { return pb.buf.ReadByte() } // PutCh "emits" (rather schedules for output) a single byte character. func (pb *paramsBuffer) PutCh(ch byte) { pb.out.WriteByte(ch) } // PutString schedules a string for output. func (pb *paramsBuffer) PutString(s string) { pb.out.WriteString(s) } // TParm takes a terminfo parameterized string, such as setaf or cup, and // evaluates the string, and returns the result with the parameter // applied. func (t *Terminfo) TParm(s string, p ...interface{}) string { var stk stack var a string var ai, bi int var dvars [26]string var params [9]interface{} var pb = ¶msBuffer{} pb.Start(s) // make sure we always have 9 parameters -- makes it easier // later to skip checks for i := 0; i < len(params) && i < len(p); i++ { params[i] = p[i] } const ( emit = iota toEnd toElse ) skip := emit for { ch, err := pb.NextCh() if err != nil { break } if ch != '%' { if skip == emit { pb.PutCh(ch) } continue } ch, err = pb.NextCh() if err != nil { // XXX Error break } if skip == toEnd { if ch == ';' { skip = emit } continue } else if skip == toElse { if ch == 'e' || ch == ';' { skip = emit } continue } switch ch { case '%': // quoted % pb.PutCh(ch) case 'i': // increment both parameters (ANSI cup support) if i, ok := params[0].(int); ok { params[0] = i + 1 } if i, ok := params[1].(int); ok { params[1] = i + 1 } case 's': // NB: 's', 'c', and 'd' below are special cased for // efficiency. They could be handled by the richer // format support below, less efficiently. a, stk = stk.PopString() pb.PutString(a) case 'c': // Integer as special character. ai, stk = stk.PopInt() pb.PutCh(byte(ai)) case 'd': ai, stk = stk.PopInt() pb.PutString(strconv.Itoa(ai)) case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'x', 'X', 'o', ':': // This is pretty suboptimal, but this is rarely used. // None of the mainstream terminals use any of this, // and it would surprise me if this code is ever // executed outside test cases. f := "%" if ch == ':' { ch, _ = pb.NextCh() } f += string(ch) for ch == '+' || ch == '-' || ch == '#' || ch == ' ' { ch, _ = pb.NextCh() f += string(ch) } for (ch >= '0' && ch <= '9') || ch == '.' { ch, _ = pb.NextCh() f += string(ch) } switch ch { case 'd', 'x', 'X', 'o': ai, stk = stk.PopInt() pb.PutString(fmt.Sprintf(f, ai)) case 's': a, stk = stk.PopString() pb.PutString(fmt.Sprintf(f, a)) case 'c': ai, stk = stk.PopInt() pb.PutString(fmt.Sprintf(f, ai)) } case 'p': // push parameter ch, _ = pb.NextCh() ai = int(ch - '1') if ai >= 0 && ai < len(params) { stk = stk.Push(params[ai]) } else { stk = stk.Push(0) } case 'P': // pop & store variable ch, _ = pb.NextCh() if ch >= 'A' && ch <= 'Z' { svars[int(ch-'A')], stk = stk.PopString() } else if ch >= 'a' && ch <= 'z' { dvars[int(ch-'a')], stk = stk.PopString() } case 'g': // recall & push variable ch, _ = pb.NextCh() if ch >= 'A' && ch <= 'Z' { stk = stk.Push(svars[int(ch-'A')]) } else if ch >= 'a' && ch <= 'z' { stk = stk.Push(dvars[int(ch-'a')]) } case '\'': // push(char) - the integer value of it ch, _ = pb.NextCh() _, _ = pb.NextCh() // must be ' but we don't check stk = stk.Push(int(ch)) case '{': // push(int) ai = 0 ch, _ = pb.NextCh() for ch >= '0' && ch <= '9' { ai *= 10 ai += int(ch - '0') ch, _ = pb.NextCh() } // ch must be '}' but no verification stk = stk.Push(ai) case 'l': // push(strlen(pop)) a, stk = stk.PopString() stk = stk.Push(len(a)) case '+': bi, stk = stk.PopInt() ai, stk = stk.PopInt() stk = stk.Push(ai + bi) case '-': bi, stk = stk.PopInt() ai, stk = stk.PopInt() stk = stk.Push(ai - bi) case '*': bi, stk = stk.PopInt() ai, stk = stk.PopInt() stk = stk.Push(ai * bi) case '/': bi, stk = stk.PopInt() ai, stk = stk.PopInt() if bi != 0 { stk = stk.Push(ai / bi) } else { stk = stk.Push(0) } case 'm': // push(pop mod pop) bi, stk = stk.PopInt() ai, stk = stk.PopInt() if bi != 0 { stk = stk.Push(ai % bi) } else { stk = stk.Push(0) } case '&': // AND bi, stk = stk.PopInt() ai, stk = stk.PopInt() stk = stk.Push(ai & bi) case '|': // OR bi, stk = stk.PopInt() ai, stk = stk.PopInt() stk = stk.Push(ai | bi) case '^': // XOR bi, stk = stk.PopInt() ai, stk = stk.PopInt() stk = stk.Push(ai ^ bi) case '~': // bit complement ai, stk = stk.PopInt() stk = stk.Push(ai ^ -1) case '!': // logical NOT ai, stk = stk.PopInt() stk = stk.Push(ai == 0) case '=': // numeric compare bi, stk = stk.PopInt() ai, stk = stk.PopInt() stk = stk.Push(ai == bi) case '>': // greater than, numeric bi, stk = stk.PopInt() ai, stk = stk.PopInt() stk = stk.Push(ai > bi) case '<': // less than, numeric bi, stk = stk.PopInt() ai, stk = stk.PopInt() stk = stk.Push(ai < bi) case '?': // start conditional case ';': skip = emit case 't': ai, stk = stk.PopInt() if ai == 0 { skip = toElse } case 'e': skip = toEnd default: pb.PutString("%" + string(ch)) } } return pb.End() } // TPuts emits the string to the writer, but expands inline padding // indications (of the form $<[delay]> where [delay] is msec) to // a suitable time (unless the terminfo string indicates this isn't needed // by specifying npc - no padding). All Terminfo based strings should be // emitted using this function. func (t *Terminfo) TPuts(w io.Writer, s string) { for { beg := strings.Index(s, "$<") if beg < 0 { // Most strings don't need padding, which is good news! _, _ = io.WriteString(w, s) return } _, _ = io.WriteString(w, s[:beg]) s = s[beg+2:] end := strings.Index(s, ">") if end < 0 { // unterminated.. just emit bytes unadulterated _, _ = io.WriteString(w, "$<"+s) return } val := s[:end] s = s[end+1:] padus := 0 unit := time.Millisecond dot := false loop: for i := range val { switch val[i] { case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': padus *= 10 padus += int(val[i] - '0') if dot { unit /= 10 } case '.': if !dot { dot = true } else { break loop } default: break loop } } // Curses historically uses padding to achieve "fine grained" // delays. We have much better clocks these days, and so we // do not rely on padding but simply sleep a bit. if len(t.PadChar) > 0 { time.Sleep(unit * time.Duration(padus)) } } } // TGoto returns a string suitable for addressing the cursor at the given // row and column. The origin 0, 0 is in the upper left corner of the screen. func (t *Terminfo) TGoto(col, row int) string { return t.TParm(t.SetCursor, row, col) } // TColor returns a string corresponding to the given foreground and background // colors. Either fg or bg can be set to -1 to elide. func (t *Terminfo) TColor(fi, bi int) string { rv := "" // As a special case, we map bright colors to lower versions if the // color table only holds 8. For the remaining 240 colors, the user // is out of luck. Someday we could create a mapping table, but its // not worth it. if t.Colors == 8 { if fi > 7 && fi < 16 { fi -= 8 } if bi > 7 && bi < 16 { bi -= 8 } } if t.Colors > fi && fi >= 0 { rv += t.TParm(t.SetFg, fi) } if t.Colors > bi && bi >= 0 { rv += t.TParm(t.SetBg, bi) } return rv } var ( dblock sync.Mutex terminfos = make(map[string]*Terminfo) ) // AddTerminfo can be called to register a new Terminfo entry. func AddTerminfo(t *Terminfo) { dblock.Lock() terminfos[t.Name] = t for _, x := range t.Aliases { terminfos[x] = t } dblock.Unlock() } // LookupTerminfo attempts to find a definition for the named $TERM. func LookupTerminfo(name string) (*Terminfo, error) { if name == "" { // else on windows: index out of bounds // on the name[0] reference below return nil, ErrTermNotFound } addtruecolor := false add256color := false switch os.Getenv("COLORTERM") { case "truecolor", "24bit", "24-bit": addtruecolor = true } dblock.Lock() t := terminfos[name] dblock.Unlock() // If the name ends in -truecolor, then fabricate an entry // from the corresponding -256color, -color, or bare terminal. if t != nil && t.TrueColor { addtruecolor = true } else if t == nil && strings.HasSuffix(name, "-truecolor") { suffixes := []string{ "-256color", "-88color", "-color", "", } base := name[:len(name)-len("-truecolor")] for _, s := range suffixes { if t, _ = LookupTerminfo(base + s); t != nil { addtruecolor = true break } } } // If the name ends in -256color, maybe fabricate using the xterm 256 color sequences if t == nil && strings.HasSuffix(name, "-256color") { suffixes := []string{ "-88color", "-color", } base := name[:len(name)-len("-256color")] for _, s := range suffixes { if t, _ = LookupTerminfo(base + s); t != nil { add256color = true break } } } if t == nil { return nil, ErrTermNotFound } switch os.Getenv("TCELL_TRUECOLOR") { case "": case "disable": addtruecolor = false default: addtruecolor = true } // If the user has requested 24-bit color with $COLORTERM, then // amend the value (unless already present). This means we don't // need to have a value present. if addtruecolor && t.SetFgBgRGB == "" && t.SetFgRGB == "" && t.SetBgRGB == "" { // Supply vanilla ISO 8613-6:1994 24-bit color sequences. t.SetFgRGB = "\x1b[38;2;%p1%d;%p2%d;%p3%dm" t.SetBgRGB = "\x1b[48;2;%p1%d;%p2%d;%p3%dm" t.SetFgBgRGB = "\x1b[38;2;%p1%d;%p2%d;%p3%d;" + "48;2;%p4%d;%p5%d;%p6%dm" } if add256color { t.Colors = 256 t.SetFg = "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m" t.SetBg = "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m" t.SetFgBg = "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m" t.ResetFgBg = "\x1b[39;49m" } return t, nil } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/v/vt100/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package vt100 import "github.com/gdamore/tcell/v2/terminfo" func init() { // DEC VT100 (w/advanced video) terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "vt100", Aliases: []string{"vt100-am"}, Columns: 80, Lines: 24, Bell: "\a", Clear: "\x1b[H\x1b[J$<50>", AttrOff: "\x1b[m\x0f$<2>", Underline: "\x1b[4m$<2>", Bold: "\x1b[1m$<2>", Blink: "\x1b[5m$<2>", Reverse: "\x1b[7m$<2>", EnterKeypad: "\x1b[?1h\x1b=", ExitKeypad: "\x1b[?1l\x1b>", PadChar: "\x00", AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x0e", ExitAcs: "\x0f", EnableAcs: "\x1b(B\x1b)0", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", SetCursor: "\x1b[%i%p1%d;%p2%dH$<5>", CursorBack1: "\b", CursorUp1: "\x1b[A$<2>", KeyUp: "\x1bOA", KeyDown: "\x1bOB", KeyRight: "\x1bOC", KeyLeft: "\x1bOD", KeyBackspace: "\b", KeyF1: "\x1bOP", KeyF2: "\x1bOQ", KeyF3: "\x1bOR", KeyF4: "\x1bOS", KeyF5: "\x1bOt", KeyF6: "\x1bOu", KeyF7: "\x1bOv", KeyF8: "\x1bOl", KeyF9: "\x1bOw", KeyF10: "\x1bOx", AutoMargin: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/v/vt102/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package vt102 import "github.com/gdamore/tcell/v2/terminfo" func init() { // DEC VT102 terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "vt102", Columns: 80, Lines: 24, Bell: "\a", Clear: "\x1b[H\x1b[J$<50>", AttrOff: "\x1b[m\x0f$<2>", Underline: "\x1b[4m$<2>", Bold: "\x1b[1m$<2>", Blink: "\x1b[5m$<2>", Reverse: "\x1b[7m$<2>", EnterKeypad: "\x1b[?1h\x1b=", ExitKeypad: "\x1b[?1l\x1b>", PadChar: "\x00", AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x0e", ExitAcs: "\x0f", EnableAcs: "\x1b(B\x1b)0", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", SetCursor: "\x1b[%i%p1%d;%p2%dH$<5>", CursorBack1: "\b", CursorUp1: "\x1b[A$<2>", KeyUp: "\x1bOA", KeyDown: "\x1bOB", KeyRight: "\x1bOC", KeyLeft: "\x1bOD", KeyBackspace: "\b", KeyF1: "\x1bOP", KeyF2: "\x1bOQ", KeyF3: "\x1bOR", KeyF4: "\x1bOS", KeyF5: "\x1bOt", KeyF6: "\x1bOu", KeyF7: "\x1bOv", KeyF8: "\x1bOl", KeyF9: "\x1bOw", KeyF10: "\x1bOx", AutoMargin: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/v/vt220/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package vt220 import "github.com/gdamore/tcell/v2/terminfo" func init() { // DEC VT220 terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "vt220", Aliases: []string{"vt200"}, Columns: 80, Lines: 24, Bell: "\a", Clear: "\x1b[H\x1b[J", ShowCursor: "\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b[m\x1b(B", Underline: "\x1b[4m", Bold: "\x1b[1m", Blink: "\x1b[5m", Reverse: "\x1b[7m", PadChar: "\x00", AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x1b(0$<2>", ExitAcs: "\x1b(B$<4>", EnableAcs: "\x1b)0", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1b[A", KeyDown: "\x1b[B", KeyRight: "\x1b[C", KeyLeft: "\x1b[D", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\b", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1bOP", KeyF2: "\x1bOQ", KeyF3: "\x1bOR", KeyF4: "\x1bOS", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyF13: "\x1b[25~", KeyF14: "\x1b[26~", KeyF17: "\x1b[31~", KeyF18: "\x1b[32~", KeyF19: "\x1b[33~", KeyF20: "\x1b[34~", KeyHelp: "\x1b[28~", AutoMargin: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/v/vt320/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package vt320 import "github.com/gdamore/tcell/v2/terminfo" func init() { // DEC VT320 7 bit terminal terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "vt320", Aliases: []string{"vt300"}, Columns: 80, Lines: 24, Bell: "\a", Clear: "\x1b[H\x1b[2J", ShowCursor: "\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b[m\x1b(B", Underline: "\x1b[4m", Bold: "\x1b[1m", Blink: "\x1b[5m", Reverse: "\x1b[7m", EnterKeypad: "\x1b[?1h\x1b=", ExitKeypad: "\x1b[?1l\x1b>", PadChar: "\x00", AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x1b(0", ExitAcs: "\x1b(B", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1bOA", KeyDown: "\x1bOB", KeyRight: "\x1bOC", KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\x7f", KeyHome: "\x1b[1~", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1bOP", KeyF2: "\x1bOQ", KeyF3: "\x1bOR", KeyF4: "\x1bOS", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyF13: "\x1b[25~", KeyF14: "\x1b[26~", KeyF15: "\x1b[28~", KeyF16: "\x1b[29~", KeyF17: "\x1b[31~", KeyF18: "\x1b[32~", KeyF19: "\x1b[33~", KeyF20: "\x1b[34~", AutoMargin: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/v/vt400/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package vt400 import "github.com/gdamore/tcell/v2/terminfo" func init() { // DEC VT400 24x80 column autowrap terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "vt400", Aliases: []string{"vt400-24", "dec-vt400"}, Columns: 80, Lines: 24, Clear: "\x1b[H\x1b[J$<10/>", ShowCursor: "\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b[m\x1b(B", Underline: "\x1b[4m", Bold: "\x1b[1m", Blink: "\x1b[5m", Reverse: "\x1b[7m", EnterKeypad: "\x1b[?1h\x1b=", ExitKeypad: "\x1b[?1l\x1b>", PadChar: "\x00", AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x1b(0", ExitAcs: "\x1b(B", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1bOA", KeyDown: "\x1bOB", KeyRight: "\x1bOC", KeyLeft: "\x1bOD", KeyBackspace: "\b", KeyF1: "\x1bOP", KeyF2: "\x1bOQ", KeyF3: "\x1bOR", KeyF4: "\x1bOS", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", AutoMargin: true, InsertChar: "\x1b[@", }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/v/vt420/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package vt420 import "github.com/gdamore/tcell/v2/terminfo" func init() { // DEC VT420 terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "vt420", Columns: 80, Lines: 24, Bell: "\a", Clear: "\x1b[H\x1b[2J$<50>", ShowCursor: "\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b[m\x1b(B$<2>", Underline: "\x1b[4m", Bold: "\x1b[1m$<2>", Blink: "\x1b[5m$<2>", Reverse: "\x1b[7m$<2>", EnterKeypad: "\x1b=", ExitKeypad: "\x1b>", PadChar: "\x00", AltChars: "``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x1b(0$<2>", ExitAcs: "\x1b(B$<4>", EnableAcs: "\x1b)0", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", SetCursor: "\x1b[%i%p1%d;%p2%dH$<10>", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1b[A", KeyDown: "\x1b[B", KeyRight: "\x1b[C", KeyLeft: "\x1b[D", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\b", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1bOP", KeyF2: "\x1bOQ", KeyF3: "\x1bOR", KeyF4: "\x1bOS", KeyF5: "\x1b[17~", KeyF6: "\x1b[18~", KeyF7: "\x1b[19~", KeyF8: "\x1b[20~", KeyF9: "\x1b[21~", KeyF10: "\x1b[29~", AutoMargin: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/v/vt52/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package vt52 import "github.com/gdamore/tcell/v2/terminfo" func init() { // DEC VT52 terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "vt52", Columns: 80, Lines: 24, Bell: "\a", Clear: "\x1bH\x1bJ", EnterKeypad: "\x1b=", ExitKeypad: "\x1b>", PadChar: "\x00", AltChars: "+h.k0affggolpnqprrss", EnterAcs: "\x1bF", ExitAcs: "\x1bG", SetCursor: "\x1bY%p1%' '%+%c%p2%' '%+%c", CursorBack1: "\x1bD", CursorUp1: "\x1bA", KeyUp: "\x1bA", KeyDown: "\x1bB", KeyRight: "\x1bC", KeyLeft: "\x1bD", KeyBackspace: "\b", KeyF1: "\x1bP", KeyF2: "\x1bQ", KeyF3: "\x1bR", KeyF5: "\x1b?t", KeyF6: "\x1b?u", KeyF7: "\x1b?v", KeyF8: "\x1b?w", KeyF9: "\x1b?x", }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/w/wy50/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package wy50 import "github.com/gdamore/tcell/v2/terminfo" func init() { // Wyse 50 terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "wy50", Aliases: []string{"wyse50"}, Columns: 80, Lines: 24, Bell: "\a", Clear: "\x1b+$<20>", ShowCursor: "\x1b`1", HideCursor: "\x1b`0", AttrOff: "\x1b(\x1bH\x03", Dim: "\x1b`7\x1b)", Reverse: "\x1b`6\x1b)", PadChar: "\x00", AltChars: "a;j5k3l2m1n8q:t4u9v=w0x6", EnterAcs: "\x1bH\x02", ExitAcs: "\x1bH\x03", SetCursor: "\x1b=%p1%' '%+%c%p2%' '%+%c", CursorBack1: "\b", CursorUp1: "\v", KeyUp: "\v", KeyDown: "\n", KeyRight: "\f", KeyLeft: "\b", KeyInsert: "\x1bQ", KeyDelete: "\x1bW", KeyBackspace: "\b", KeyHome: "\x1e", KeyPgUp: "\x1bJ", KeyPgDn: "\x1bK", KeyF1: "\x01@\r", KeyF2: "\x01A\r", KeyF3: "\x01B\r", KeyF4: "\x01C\r", KeyF5: "\x01D\r", KeyF6: "\x01E\r", KeyF7: "\x01F\r", KeyF8: "\x01G\r", KeyF9: "\x01H\r", KeyF10: "\x01I\r", KeyF11: "\x01J\r", KeyF12: "\x01K\r", KeyF13: "\x01L\r", KeyF14: "\x01M\r", KeyF15: "\x01N\r", KeyF16: "\x01O\r", KeyPrint: "\x1bP", KeyBacktab: "\x1bI", KeyShfHome: "\x1b{", AutoMargin: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/w/wy60/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package wy60 import "github.com/gdamore/tcell/v2/terminfo" func init() { // Wyse 60 terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "wy60", Aliases: []string{"wyse60"}, Columns: 80, Lines: 24, Bell: "\a", Clear: "\x1b+$<100>", EnterCA: "\x1bw0", ExitCA: "\x1bw1", ShowCursor: "\x1b`1", HideCursor: "\x1b`0", AttrOff: "\x1b(\x1bH\x03\x1bG0\x1bcD", Underline: "\x1bG8", Dim: "\x1bGp", Blink: "\x1bG2", Reverse: "\x1bG4", PadChar: "\x00", AltChars: "+/,.0[a2fxgqh1ihjYk?lZm@nEqDtCu4vAwBx3yszr{c~~", EnterAcs: "\x1bcE", ExitAcs: "\x1bcD", EnableAutoMargin: "\x1bd/", DisableAutoMargin: "\x1bd.", SetCursor: "\x1b=%p1%' '%+%c%p2%' '%+%c", CursorBack1: "\b", CursorUp1: "\v", KeyUp: "\v", KeyDown: "\n", KeyRight: "\f", KeyLeft: "\b", KeyInsert: "\x1bQ", KeyDelete: "\x1bW", KeyBackspace: "\b", KeyHome: "\x1e", KeyPgUp: "\x1bJ", KeyPgDn: "\x1bK", KeyF1: "\x01@\r", KeyF2: "\x01A\r", KeyF3: "\x01B\r", KeyF4: "\x01C\r", KeyF5: "\x01D\r", KeyF6: "\x01E\r", KeyF7: "\x01F\r", KeyF8: "\x01G\r", KeyF9: "\x01H\r", KeyF10: "\x01I\r", KeyF11: "\x01J\r", KeyF12: "\x01K\r", KeyF13: "\x01L\r", KeyF14: "\x01M\r", KeyF15: "\x01N\r", KeyF16: "\x01O\r", KeyPrint: "\x1bP", KeyBacktab: "\x1bI", KeyShfHome: "\x1b{", AutoMargin: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/w/wy99_ansi/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package wy99_ansi import "github.com/gdamore/tcell/v2/terminfo" func init() { // Wyse WY-99GT in ANSI mode (int'l PC keyboard) terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "wy99-ansi", Columns: 80, Lines: 25, Bell: "\a", Clear: "\x1b[H\x1b[J$<200>", ShowCursor: "\x1b[34h\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b[m\x0f\x1b[\"q", Underline: "\x1b[4m", Bold: "\x1b[1m", Dim: "\x1b[2m", Blink: "\x1b[5m", Reverse: "\x1b[7m", EnterKeypad: "\x1b[?1h", ExitKeypad: "\x1b[?1l", PadChar: "\x00", AltChars: "``aaffggjjkkllmmnnooqqssttuuvvwwxx{{||}}~~", EnterAcs: "\x0e", ExitAcs: "\x0f", EnableAcs: "\x1b)0", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b$<1>", CursorUp1: "\x1bM", KeyUp: "\x1bOA", KeyDown: "\x1bOB", KeyRight: "\x1bOC", KeyLeft: "\x1bOD", KeyBackspace: "\b", KeyF1: "\x1bOP", KeyF2: "\x1bOQ", KeyF3: "\x1bOR", KeyF4: "\x1bOS", KeyF5: "\x1b[M", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyF17: "\x1b[K", KeyF18: "\x1b[31~", KeyF19: "\x1b[32~", KeyF20: "\x1b[33~", KeyF21: "\x1b[34~", KeyF22: "\x1b[35~", KeyF23: "\x1b[1~", KeyF24: "\x1b[2~", KeyBacktab: "\x1b[z", AutoMargin: true, }) // Wyse WY-99GT in ANSI mode (US PC keyboard) terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "wy99a-ansi", Columns: 80, Lines: 25, Bell: "\a", Clear: "\x1b[H\x1b[J$<200>", ShowCursor: "\x1b[34h\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b[m\x0f\x1b[\"q", Underline: "\x1b[4m", Bold: "\x1b[1m", Dim: "\x1b[2m", Blink: "\x1b[5m", Reverse: "\x1b[7m", EnterKeypad: "\x1b[?1h", ExitKeypad: "\x1b[?1l", PadChar: "\x00", AltChars: "``aaffggjjkkllmmnnooqqssttuuvvwwxx{{||}}~~", EnterAcs: "\x0e", ExitAcs: "\x0f", EnableAcs: "\x1b)0", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b$<1>", CursorUp1: "\x1bM", KeyUp: "\x1bOA", KeyDown: "\x1bOB", KeyRight: "\x1bOC", KeyLeft: "\x1bOD", KeyBackspace: "\b", KeyF1: "\x1bOP", KeyF2: "\x1bOQ", KeyF3: "\x1bOR", KeyF4: "\x1bOS", KeyF5: "\x1b[M", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyF17: "\x1b[K", KeyF18: "\x1b[31~", KeyF19: "\x1b[32~", KeyF20: "\x1b[33~", KeyF21: "\x1b[34~", KeyF22: "\x1b[35~", KeyF23: "\x1b[1~", KeyF24: "\x1b[2~", KeyBacktab: "\x1b[z", AutoMargin: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/x/xfce/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package xfce import "github.com/gdamore/tcell/v2/terminfo" func init() { // Xfce Terminal terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "xfce", Columns: 80, Lines: 24, Colors: 8, Bell: "\a", Clear: "\x1b[H\x1b[2J", EnterCA: "\x1b7\x1b[?47h", ExitCA: "\x1b[2J\x1b[?47l\x1b8", ShowCursor: "\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b[0m\x0f", Underline: "\x1b[4m", Bold: "\x1b[1m", Reverse: "\x1b[7m", EnterKeypad: "\x1b[?1h\x1b=", ExitKeypad: "\x1b[?1l\x1b>", SetFg: "\x1b[3%p1%dm", SetBg: "\x1b[4%p1%dm", SetFgBg: "\x1b[3%p1%d;4%p2%dm", ResetFgBg: "\x1b[39;49m", PadChar: "\x00", AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x0e", ExitAcs: "\x0f", EnableAcs: "\x1b)0", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", Mouse: "\x1b[M", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1bOA", KeyDown: "\x1bOB", KeyRight: "\x1bOC", KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\x7f", KeyHome: "\x1bOH", KeyEnd: "\x1bOF", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1bOP", KeyF2: "\x1bOQ", KeyF3: "\x1bOR", KeyF4: "\x1bOS", KeyF5: "\x1b[15~", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyBacktab: "\x1b[Z", Modifiers: 1, AutoMargin: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/x/xterm/direct.go ================================================ // Copyright 2021 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // This terminal definition is derived from the xterm-256color definition, but // makes use of the RGB property these terminals have to support direct color. // The terminfo entry for this uses a new format for the color handling introduced // by ncurses 6.1 (and used by nobody else), so this override ensures we get // good handling even in the face of this. package xterm import "github.com/gdamore/tcell/v2/terminfo" func init() { // derived from xterm-256color, but adds full RGB support terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "xterm-direct", Aliases: []string{"xterm-truecolor"}, Columns: 80, Lines: 24, Colors: 256, Bell: "\a", Clear: "\x1b[H\x1b[2J", EnterCA: "\x1b[?1049h\x1b[22;0;0t", ExitCA: "\x1b[?1049l\x1b[23;0;0t", ShowCursor: "\x1b[?12l\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b(B\x1b[m", Underline: "\x1b[4m", Bold: "\x1b[1m", Dim: "\x1b[2m", Italic: "\x1b[3m", Blink: "\x1b[5m", Reverse: "\x1b[7m", EnterKeypad: "\x1b[?1h\x1b=", ExitKeypad: "\x1b[?1l\x1b>", SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m", SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m", SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m", SetFgRGB: "\x1b[38;2;%p1%d;%p2%d;%p3%dm", SetBgRGB: "\x1b[48;2;%p1%d;%p2%d;%p3%dm", SetFgBgRGB: "\x1b[38;2;%p1%d;%p2%d;%p3%d;48;2;%p4%d;%p5%d;%p6%dm", ResetFgBg: "\x1b[39;49m", AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x1b(0", ExitAcs: "\x1b(B", StrikeThrough: "\x1b[9m", Mouse: "\x1b[M", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1bOA", KeyDown: "\x1bOB", KeyRight: "\x1bOC", KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\u007f", KeyHome: "\x1bOH", KeyEnd: "\x1bOF", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1bOP", KeyF2: "\x1bOQ", KeyF3: "\x1bOR", KeyF4: "\x1bOS", KeyF5: "\x1b[15~", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyBacktab: "\x1b[Z", Modifiers: 1, AutoMargin: true, TrueColor: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/x/xterm/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package xterm import "github.com/gdamore/tcell/v2/terminfo" func init() { // xterm terminal emulator (X Window System) terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "xterm", Aliases: []string{"xterm-debian"}, Columns: 80, Lines: 24, Colors: 8, Bell: "\a", Clear: "\x1b[H\x1b[2J", EnterCA: "\x1b[?1049h\x1b[22;0;0t", ExitCA: "\x1b[?1049l\x1b[23;0;0t", ShowCursor: "\x1b[?12l\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b(B\x1b[m", Underline: "\x1b[4m", Bold: "\x1b[1m", Dim: "\x1b[2m", Italic: "\x1b[3m", Blink: "\x1b[5m", Reverse: "\x1b[7m", EnterKeypad: "\x1b[?1h\x1b=", ExitKeypad: "\x1b[?1l\x1b>", SetFg: "\x1b[3%p1%dm", SetBg: "\x1b[4%p1%dm", SetFgBg: "\x1b[3%p1%d;4%p2%dm", ResetFgBg: "\x1b[39;49m", AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x1b(0", ExitAcs: "\x1b(B", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", StrikeThrough: "\x1b[9m", Mouse: "\x1b[<", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1bOA", KeyDown: "\x1bOB", KeyRight: "\x1bOC", KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\x7f", KeyHome: "\x1bOH", KeyEnd: "\x1bOF", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1bOP", KeyF2: "\x1bOQ", KeyF3: "\x1bOR", KeyF4: "\x1bOS", KeyF5: "\x1b[15~", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyBacktab: "\x1b[Z", Modifiers: 1, AutoMargin: true, }) // xterm with 88 colors terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "xterm-88color", Columns: 80, Lines: 24, Colors: 88, Bell: "\a", Clear: "\x1b[H\x1b[2J", EnterCA: "\x1b[?1049h\x1b[22;0;0t", ExitCA: "\x1b[?1049l\x1b[23;0;0t", ShowCursor: "\x1b[?12l\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b(B\x1b[m", Underline: "\x1b[4m", Bold: "\x1b[1m", Dim: "\x1b[2m", Italic: "\x1b[3m", Blink: "\x1b[5m", Reverse: "\x1b[7m", EnterKeypad: "\x1b[?1h\x1b=", ExitKeypad: "\x1b[?1l\x1b>", SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m", SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m", SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m", ResetFgBg: "\x1b[39;49m", AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x1b(0", ExitAcs: "\x1b(B", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", StrikeThrough: "\x1b[9m", Mouse: "\x1b[<", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1bOA", KeyDown: "\x1bOB", KeyRight: "\x1bOC", KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\x7f", KeyHome: "\x1bOH", KeyEnd: "\x1bOF", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1bOP", KeyF2: "\x1bOQ", KeyF3: "\x1bOR", KeyF4: "\x1bOS", KeyF5: "\x1b[15~", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyBacktab: "\x1b[Z", Modifiers: 1, AutoMargin: true, }) // xterm with 256 colors terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "xterm-256color", Columns: 80, Lines: 24, Colors: 256, Bell: "\a", Clear: "\x1b[H\x1b[2J", EnterCA: "\x1b[?1049h\x1b[22;0;0t", ExitCA: "\x1b[?1049l\x1b[23;0;0t", ShowCursor: "\x1b[?12l\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b(B\x1b[m", Underline: "\x1b[4m", Bold: "\x1b[1m", Dim: "\x1b[2m", Italic: "\x1b[3m", Blink: "\x1b[5m", Reverse: "\x1b[7m", EnterKeypad: "\x1b[?1h\x1b=", ExitKeypad: "\x1b[?1l\x1b>", SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m", SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m", SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m", ResetFgBg: "\x1b[39;49m", AltChars: "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x1b(0", ExitAcs: "\x1b(B", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", StrikeThrough: "\x1b[9m", Mouse: "\x1b[<", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1bOA", KeyDown: "\x1bOB", KeyRight: "\x1bOC", KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\x7f", KeyHome: "\x1bOH", KeyEnd: "\x1bOF", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1bOP", KeyF2: "\x1bOQ", KeyF3: "\x1bOR", KeyF4: "\x1bOS", KeyF5: "\x1b[15~", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyBacktab: "\x1b[Z", Modifiers: 1, AutoMargin: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terminfo/x/xterm_kitty/term.go ================================================ // Generated automatically. DO NOT HAND-EDIT. package xterm_kitty import "github.com/gdamore/tcell/v2/terminfo" func init() { // KovIdTTY terminfo.AddTerminfo(&terminfo.Terminfo{ Name: "xterm-kitty", Columns: 80, Lines: 24, Colors: 256, Bell: "\a", Clear: "\x1b[H\x1b[2J", EnterCA: "\x1b[?1049h", ExitCA: "\x1b[?1049l", ShowCursor: "\x1b[?12h\x1b[?25h", HideCursor: "\x1b[?25l", AttrOff: "\x1b(B\x1b[m", Underline: "\x1b[4m", Bold: "\x1b[1m", Dim: "\x1b[2m", Italic: "\x1b[3m", Reverse: "\x1b[7m", EnterKeypad: "\x1b[?1h", ExitKeypad: "\x1b[?1l", SetFg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m", SetBg: "\x1b[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m", SetFgBg: "\x1b[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;;%?%p2%{8}%<%t4%p2%d%e%p2%{16}%<%t10%p2%{8}%-%d%e48;5;%p2%d%;m", ResetFgBg: "\x1b[39;49m", AltChars: "++,,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~", EnterAcs: "\x1b(0", ExitAcs: "\x1b(B", EnableAutoMargin: "\x1b[?7h", DisableAutoMargin: "\x1b[?7l", StrikeThrough: "\x1b[9m", Mouse: "\x1b[M", SetCursor: "\x1b[%i%p1%d;%p2%dH", CursorBack1: "\b", CursorUp1: "\x1b[A", KeyUp: "\x1bOA", KeyDown: "\x1bOB", KeyRight: "\x1bOC", KeyLeft: "\x1bOD", KeyInsert: "\x1b[2~", KeyDelete: "\x1b[3~", KeyBackspace: "\x7f", KeyHome: "\x1bOH", KeyEnd: "\x1bOF", KeyPgUp: "\x1b[5~", KeyPgDn: "\x1b[6~", KeyF1: "\x1bOP", KeyF2: "\x1bOQ", KeyF3: "\x1bOR", KeyF4: "\x1bOS", KeyF5: "\x1b[15~", KeyF6: "\x1b[17~", KeyF7: "\x1b[18~", KeyF8: "\x1b[19~", KeyF9: "\x1b[20~", KeyF10: "\x1b[21~", KeyF11: "\x1b[23~", KeyF12: "\x1b[24~", KeyBacktab: "\x1b[Z", Modifiers: 1, TrueColor: true, AutoMargin: true, }) } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terms_default.go ================================================ //go:build !tcell_minimal // +build !tcell_minimal // Copyright 2019 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell import ( // This imports the default terminal entries. To disable, use the // tcell_minimal build tag. _ "github.com/gdamore/tcell/v2/terminfo/extended" ) ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terms_dynamic.go ================================================ //go:build !tcell_minimal && !nacl && !js && !zos && !plan9 && !windows && !android // +build !tcell_minimal,!nacl,!js,!zos,!plan9,!windows,!android // Copyright 2019 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell import ( // This imports a dynamic version of the terminal database, which // is built using infocmp. This relies on a working installation // of infocmp (typically supplied with ncurses). We only do this // for systems likely to have that -- i.e. UNIX based hosts. We // also don't support Android here, because you really don't want // to run external programs there. Generally the android terminals // will be automatically included anyway. "github.com/gdamore/tcell/v2/terminfo" "github.com/gdamore/tcell/v2/terminfo/dynamic" ) func loadDynamicTerminfo(term string) (*terminfo.Terminfo, error) { ti, _, e := dynamic.LoadTerminfo(term) if e != nil { return nil, e } return ti, nil } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/terms_static.go ================================================ //go:build tcell_minimal || nacl || zos || plan9 || windows || android || js // +build tcell_minimal nacl zos plan9 windows android js // Copyright 2019 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell import ( "errors" "github.com/gdamore/tcell/v2/terminfo" ) func loadDynamicTerminfo(_ string) (*terminfo.Terminfo, error) { return nil, errors.New("terminal type unsupported") } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/tscreen.go ================================================ // Copyright 2024 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. //go:build !(js && wasm) // +build !js !wasm package tcell import ( "bytes" "errors" "io" "os" "strconv" "strings" "sync" "time" "unicode/utf8" "golang.org/x/term" "golang.org/x/text/transform" "github.com/gdamore/tcell/v2/terminfo" // import the stock terminals _ "github.com/gdamore/tcell/v2/terminfo/base" ) // NewTerminfoScreen returns a Screen that uses the stock TTY interface // and POSIX terminal control, combined with a terminfo description taken from // the $TERM environment variable. It returns an error if the terminal // is not supported for any reason. // // For terminals that do not support dynamic resize events, the $LINES // $COLUMNS environment variables can be set to the actual window size, // otherwise defaults taken from the terminal database are used. func NewTerminfoScreen() (Screen, error) { return NewTerminfoScreenFromTty(nil) } // LookupTerminfo attempts to find a definition for the named $TERM falling // back to attempting to parse the output from infocmp. func LookupTerminfo(name string) (ti *terminfo.Terminfo, e error) { ti, e = terminfo.LookupTerminfo(name) if e != nil { ti, e = loadDynamicTerminfo(name) if e != nil { return nil, e } terminfo.AddTerminfo(ti) } return } // NewTerminfoScreenFromTtyTerminfo returns a Screen using a custom Tty // implementation and custom terminfo specification. // If the passed in tty is nil, then a reasonable default (typically /dev/tty) // is presumed, at least on UNIX hosts. (Windows hosts will typically fail this // call altogether.) // If passed terminfo is nil, then TERM environment variable is queried for // terminal specification. func NewTerminfoScreenFromTtyTerminfo(tty Tty, ti *terminfo.Terminfo) (s Screen, e error) { if ti == nil { ti, e = LookupTerminfo(os.Getenv("TERM")) if e != nil { return } } t := &tScreen{ti: ti, tty: tty} t.keyexist = make(map[Key]bool) t.keycodes = make(map[string]*tKeyCode) if len(ti.Mouse) > 0 { t.mouse = []byte(ti.Mouse) } t.prepareKeys() t.buildAcsMap() t.resizeQ = make(chan bool, 1) t.fallback = make(map[rune]string) for k, v := range RuneFallbacks { t.fallback[k] = v } return &baseScreen{screenImpl: t}, nil } // NewTerminfoScreenFromTty returns a Screen using a custom Tty implementation. // If the passed in tty is nil, then a reasonable default (typically /dev/tty) // is presumed, at least on UNIX hosts. (Windows hosts will typically fail this // call altogether.) func NewTerminfoScreenFromTty(tty Tty) (Screen, error) { return NewTerminfoScreenFromTtyTerminfo(tty, nil) } // tKeyCode represents a combination of a key code and modifiers. type tKeyCode struct { key Key mod ModMask } // tScreen represents a screen backed by a terminfo implementation. type tScreen struct { ti *terminfo.Terminfo tty Tty h int w int fini bool cells CellBuffer buffering bool // true if we are collecting writes to buf instead of sending directly to out buf bytes.Buffer curstyle Style style Style resizeQ chan bool quit chan struct{} keyexist map[Key]bool keycodes map[string]*tKeyCode keychan chan []byte keytimer *time.Timer keyexpire time.Time cx int cy int mouse []byte clear bool cursorx int cursory int acs map[rune]string charset string encoder transform.Transformer decoder transform.Transformer fallback map[rune]string colors map[Color]Color palette []Color truecolor bool escaped bool buttondn bool finiOnce sync.Once enablePaste string disablePaste string enterUrl string exitUrl string setWinSize string enableFocus string disableFocus string cursorStyles map[CursorStyle]string cursorStyle CursorStyle saved *term.State stopQ chan struct{} eventQ chan Event running bool wg sync.WaitGroup mouseFlags MouseFlags pasteEnabled bool focusEnabled bool sync.Mutex } func (t *tScreen) Init() error { if e := t.initialize(); e != nil { return e } t.keychan = make(chan []byte, 10) t.keytimer = time.NewTimer(time.Millisecond * 50) t.charset = "UTF-8" t.charset = getCharset() if enc := GetEncoding(t.charset); enc != nil { t.encoder = enc.NewEncoder() t.decoder = enc.NewDecoder() } else { return ErrNoCharset } ti := t.ti // environment overrides w := ti.Columns h := ti.Lines if i, _ := strconv.Atoi(os.Getenv("LINES")); i != 0 { h = i } if i, _ := strconv.Atoi(os.Getenv("COLUMNS")); i != 0 { w = i } if t.ti.SetFgBgRGB != "" || t.ti.SetFgRGB != "" || t.ti.SetBgRGB != "" { t.truecolor = true } // A user who wants to have his themes honored can // set this environment variable. if os.Getenv("TCELL_TRUECOLOR") == "disable" { t.truecolor = false } nColors := t.nColors() if nColors > 256 { nColors = 256 // clip to reasonable limits } t.colors = make(map[Color]Color, nColors) t.palette = make([]Color, nColors) for i := 0; i < nColors; i++ { t.palette[i] = Color(i) | ColorValid // identity map for our builtin colors t.colors[Color(i)|ColorValid] = Color(i) | ColorValid } t.quit = make(chan struct{}) t.eventQ = make(chan Event, 10) t.Lock() t.cx = -1 t.cy = -1 t.style = StyleDefault t.cells.Resize(w, h) t.cursorx = -1 t.cursory = -1 t.resize() t.Unlock() if err := t.engage(); err != nil { return err } return nil } func (t *tScreen) prepareKeyMod(key Key, mod ModMask, val string) { if val != "" { // Do not override codes that already exist if _, exist := t.keycodes[val]; !exist { t.keyexist[key] = true t.keycodes[val] = &tKeyCode{key: key, mod: mod} } } } func (t *tScreen) prepareKeyModReplace(key Key, replace Key, mod ModMask, val string) { if val != "" { // Do not override codes that already exist if old, exist := t.keycodes[val]; !exist || old.key == replace { t.keyexist[key] = true t.keycodes[val] = &tKeyCode{key: key, mod: mod} } } } func (t *tScreen) prepareKeyModXTerm(key Key, val string) { if strings.HasPrefix(val, "\x1b[") && strings.HasSuffix(val, "~") { // Drop the trailing ~ val = val[:len(val)-1] // These suffixes are calculated assuming Xterm style modifier suffixes. // Please see https://invisible-island.net/xterm/ctlseqs/ctlseqs.pdf for // more information (specifically "PC-Style Function Keys"). t.prepareKeyModReplace(key, key+12, ModShift, val+";2~") t.prepareKeyModReplace(key, key+48, ModAlt, val+";3~") t.prepareKeyModReplace(key, key+60, ModAlt|ModShift, val+";4~") t.prepareKeyModReplace(key, key+24, ModCtrl, val+";5~") t.prepareKeyModReplace(key, key+36, ModCtrl|ModShift, val+";6~") t.prepareKeyMod(key, ModAlt|ModCtrl, val+";7~") t.prepareKeyMod(key, ModShift|ModAlt|ModCtrl, val+";8~") t.prepareKeyMod(key, ModMeta, val+";9~") t.prepareKeyMod(key, ModMeta|ModShift, val+";10~") t.prepareKeyMod(key, ModMeta|ModAlt, val+";11~") t.prepareKeyMod(key, ModMeta|ModAlt|ModShift, val+";12~") t.prepareKeyMod(key, ModMeta|ModCtrl, val+";13~") t.prepareKeyMod(key, ModMeta|ModCtrl|ModShift, val+";14~") t.prepareKeyMod(key, ModMeta|ModCtrl|ModAlt, val+";15~") t.prepareKeyMod(key, ModMeta|ModCtrl|ModAlt|ModShift, val+";16~") } else if strings.HasPrefix(val, "\x1bO") && len(val) == 3 { val = val[2:] t.prepareKeyModReplace(key, key+12, ModShift, "\x1b[1;2"+val) t.prepareKeyModReplace(key, key+48, ModAlt, "\x1b[1;3"+val) t.prepareKeyModReplace(key, key+24, ModCtrl, "\x1b[1;5"+val) t.prepareKeyModReplace(key, key+36, ModCtrl|ModShift, "\x1b[1;6"+val) t.prepareKeyModReplace(key, key+60, ModAlt|ModShift, "\x1b[1;4"+val) t.prepareKeyMod(key, ModAlt|ModCtrl, "\x1b[1;7"+val) t.prepareKeyMod(key, ModShift|ModAlt|ModCtrl, "\x1b[1;8"+val) t.prepareKeyMod(key, ModMeta, "\x1b[1;9"+val) t.prepareKeyMod(key, ModMeta|ModShift, "\x1b[1;10"+val) t.prepareKeyMod(key, ModMeta|ModAlt, "\x1b[1;11"+val) t.prepareKeyMod(key, ModMeta|ModAlt|ModShift, "\x1b[1;12"+val) t.prepareKeyMod(key, ModMeta|ModCtrl, "\x1b[1;13"+val) t.prepareKeyMod(key, ModMeta|ModCtrl|ModShift, "\x1b[1;14"+val) t.prepareKeyMod(key, ModMeta|ModCtrl|ModAlt, "\x1b[1;15"+val) t.prepareKeyMod(key, ModMeta|ModCtrl|ModAlt|ModShift, "\x1b[1;16"+val) } } func (t *tScreen) prepareXtermModifiers() { if t.ti.Modifiers != terminfo.ModifiersXTerm { return } t.prepareKeyModXTerm(KeyRight, t.ti.KeyRight) t.prepareKeyModXTerm(KeyLeft, t.ti.KeyLeft) t.prepareKeyModXTerm(KeyUp, t.ti.KeyUp) t.prepareKeyModXTerm(KeyDown, t.ti.KeyDown) t.prepareKeyModXTerm(KeyInsert, t.ti.KeyInsert) t.prepareKeyModXTerm(KeyDelete, t.ti.KeyDelete) t.prepareKeyModXTerm(KeyPgUp, t.ti.KeyPgUp) t.prepareKeyModXTerm(KeyPgDn, t.ti.KeyPgDn) t.prepareKeyModXTerm(KeyHome, t.ti.KeyHome) t.prepareKeyModXTerm(KeyEnd, t.ti.KeyEnd) t.prepareKeyModXTerm(KeyF1, t.ti.KeyF1) t.prepareKeyModXTerm(KeyF2, t.ti.KeyF2) t.prepareKeyModXTerm(KeyF3, t.ti.KeyF3) t.prepareKeyModXTerm(KeyF4, t.ti.KeyF4) t.prepareKeyModXTerm(KeyF5, t.ti.KeyF5) t.prepareKeyModXTerm(KeyF6, t.ti.KeyF6) t.prepareKeyModXTerm(KeyF7, t.ti.KeyF7) t.prepareKeyModXTerm(KeyF8, t.ti.KeyF8) t.prepareKeyModXTerm(KeyF9, t.ti.KeyF9) t.prepareKeyModXTerm(KeyF10, t.ti.KeyF10) t.prepareKeyModXTerm(KeyF11, t.ti.KeyF11) t.prepareKeyModXTerm(KeyF12, t.ti.KeyF12) } func (t *tScreen) prepareBracketedPaste() { // Another workaround for lack of reporting in terminfo. // We assume if the terminal has a mouse entry, that it // offers bracketed paste. But we allow specific overrides // via our terminal database. if t.ti.EnablePaste != "" { t.enablePaste = t.ti.EnablePaste t.disablePaste = t.ti.DisablePaste t.prepareKey(keyPasteStart, t.ti.PasteStart) t.prepareKey(keyPasteEnd, t.ti.PasteEnd) } else if t.ti.Mouse != "" { t.enablePaste = "\x1b[?2004h" t.disablePaste = "\x1b[?2004l" t.prepareKey(keyPasteStart, "\x1b[200~") t.prepareKey(keyPasteEnd, "\x1b[201~") } } func (t *tScreen) prepareExtendedOSC() { // Linux is a special beast - because it has a mouse entry, but does // not swallow these OSC commands properly. if strings.Contains(t.ti.Name, "linux") { return } // More stuff for limits in terminfo. This time we are applying // the most common OSC (operating system commands). Generally // terminals that don't understand these will ignore them. // Again, we condition this based on mouse capabilities. if t.ti.EnterUrl != "" { t.enterUrl = t.ti.EnterUrl t.exitUrl = t.ti.ExitUrl } else if t.ti.Mouse != "" { t.enterUrl = "\x1b]8;%p2%s;%p1%s\x1b\\" t.exitUrl = "\x1b]8;;\x1b\\" } if t.ti.SetWindowSize != "" { t.setWinSize = t.ti.SetWindowSize } else if t.ti.Mouse != "" { t.setWinSize = "\x1b[8;%p1%p2%d;%dt" } if t.ti.EnableFocusReporting != "" { t.enableFocus = t.ti.EnableFocusReporting } else if t.ti.Mouse != "" { t.enableFocus = "\x1b[?1004h" } if t.ti.DisableFocusReporting != "" { t.disableFocus = t.ti.DisableFocusReporting } else if t.ti.Mouse != "" { t.disableFocus = "\x1b[?1004l" } } func (t *tScreen) prepareCursorStyles() { // Another workaround for lack of reporting in terminfo. // We assume if the terminal has a mouse entry, that it // offers bracketed paste. But we allow specific overrides // via our terminal database. if t.ti.CursorDefault != "" { t.cursorStyles = map[CursorStyle]string{ CursorStyleDefault: t.ti.CursorDefault, CursorStyleBlinkingBlock: t.ti.CursorBlinkingBlock, CursorStyleSteadyBlock: t.ti.CursorSteadyBlock, CursorStyleBlinkingUnderline: t.ti.CursorBlinkingUnderline, CursorStyleSteadyUnderline: t.ti.CursorSteadyUnderline, CursorStyleBlinkingBar: t.ti.CursorBlinkingBar, CursorStyleSteadyBar: t.ti.CursorSteadyBar, } } else if t.ti.Mouse != "" { t.cursorStyles = map[CursorStyle]string{ CursorStyleDefault: "\x1b[0 q", CursorStyleBlinkingBlock: "\x1b[1 q", CursorStyleSteadyBlock: "\x1b[2 q", CursorStyleBlinkingUnderline: "\x1b[3 q", CursorStyleSteadyUnderline: "\x1b[4 q", CursorStyleBlinkingBar: "\x1b[5 q", CursorStyleSteadyBar: "\x1b[6 q", } } } func (t *tScreen) prepareKey(key Key, val string) { t.prepareKeyMod(key, ModNone, val) } func (t *tScreen) prepareKeys() { ti := t.ti t.prepareKey(KeyBackspace, ti.KeyBackspace) t.prepareKey(KeyF1, ti.KeyF1) t.prepareKey(KeyF2, ti.KeyF2) t.prepareKey(KeyF3, ti.KeyF3) t.prepareKey(KeyF4, ti.KeyF4) t.prepareKey(KeyF5, ti.KeyF5) t.prepareKey(KeyF6, ti.KeyF6) t.prepareKey(KeyF7, ti.KeyF7) t.prepareKey(KeyF8, ti.KeyF8) t.prepareKey(KeyF9, ti.KeyF9) t.prepareKey(KeyF10, ti.KeyF10) t.prepareKey(KeyF11, ti.KeyF11) t.prepareKey(KeyF12, ti.KeyF12) t.prepareKey(KeyF13, ti.KeyF13) t.prepareKey(KeyF14, ti.KeyF14) t.prepareKey(KeyF15, ti.KeyF15) t.prepareKey(KeyF16, ti.KeyF16) t.prepareKey(KeyF17, ti.KeyF17) t.prepareKey(KeyF18, ti.KeyF18) t.prepareKey(KeyF19, ti.KeyF19) t.prepareKey(KeyF20, ti.KeyF20) t.prepareKey(KeyF21, ti.KeyF21) t.prepareKey(KeyF22, ti.KeyF22) t.prepareKey(KeyF23, ti.KeyF23) t.prepareKey(KeyF24, ti.KeyF24) t.prepareKey(KeyF25, ti.KeyF25) t.prepareKey(KeyF26, ti.KeyF26) t.prepareKey(KeyF27, ti.KeyF27) t.prepareKey(KeyF28, ti.KeyF28) t.prepareKey(KeyF29, ti.KeyF29) t.prepareKey(KeyF30, ti.KeyF30) t.prepareKey(KeyF31, ti.KeyF31) t.prepareKey(KeyF32, ti.KeyF32) t.prepareKey(KeyF33, ti.KeyF33) t.prepareKey(KeyF34, ti.KeyF34) t.prepareKey(KeyF35, ti.KeyF35) t.prepareKey(KeyF36, ti.KeyF36) t.prepareKey(KeyF37, ti.KeyF37) t.prepareKey(KeyF38, ti.KeyF38) t.prepareKey(KeyF39, ti.KeyF39) t.prepareKey(KeyF40, ti.KeyF40) t.prepareKey(KeyF41, ti.KeyF41) t.prepareKey(KeyF42, ti.KeyF42) t.prepareKey(KeyF43, ti.KeyF43) t.prepareKey(KeyF44, ti.KeyF44) t.prepareKey(KeyF45, ti.KeyF45) t.prepareKey(KeyF46, ti.KeyF46) t.prepareKey(KeyF47, ti.KeyF47) t.prepareKey(KeyF48, ti.KeyF48) t.prepareKey(KeyF49, ti.KeyF49) t.prepareKey(KeyF50, ti.KeyF50) t.prepareKey(KeyF51, ti.KeyF51) t.prepareKey(KeyF52, ti.KeyF52) t.prepareKey(KeyF53, ti.KeyF53) t.prepareKey(KeyF54, ti.KeyF54) t.prepareKey(KeyF55, ti.KeyF55) t.prepareKey(KeyF56, ti.KeyF56) t.prepareKey(KeyF57, ti.KeyF57) t.prepareKey(KeyF58, ti.KeyF58) t.prepareKey(KeyF59, ti.KeyF59) t.prepareKey(KeyF60, ti.KeyF60) t.prepareKey(KeyF61, ti.KeyF61) t.prepareKey(KeyF62, ti.KeyF62) t.prepareKey(KeyF63, ti.KeyF63) t.prepareKey(KeyF64, ti.KeyF64) t.prepareKey(KeyInsert, ti.KeyInsert) t.prepareKey(KeyDelete, ti.KeyDelete) t.prepareKey(KeyHome, ti.KeyHome) t.prepareKey(KeyEnd, ti.KeyEnd) t.prepareKey(KeyUp, ti.KeyUp) t.prepareKey(KeyDown, ti.KeyDown) t.prepareKey(KeyLeft, ti.KeyLeft) t.prepareKey(KeyRight, ti.KeyRight) t.prepareKey(KeyPgUp, ti.KeyPgUp) t.prepareKey(KeyPgDn, ti.KeyPgDn) t.prepareKey(KeyHelp, ti.KeyHelp) t.prepareKey(KeyPrint, ti.KeyPrint) t.prepareKey(KeyCancel, ti.KeyCancel) t.prepareKey(KeyExit, ti.KeyExit) t.prepareKey(KeyBacktab, ti.KeyBacktab) t.prepareKeyMod(KeyRight, ModShift, ti.KeyShfRight) t.prepareKeyMod(KeyLeft, ModShift, ti.KeyShfLeft) t.prepareKeyMod(KeyUp, ModShift, ti.KeyShfUp) t.prepareKeyMod(KeyDown, ModShift, ti.KeyShfDown) t.prepareKeyMod(KeyHome, ModShift, ti.KeyShfHome) t.prepareKeyMod(KeyEnd, ModShift, ti.KeyShfEnd) t.prepareKeyMod(KeyPgUp, ModShift, ti.KeyShfPgUp) t.prepareKeyMod(KeyPgDn, ModShift, ti.KeyShfPgDn) t.prepareKeyMod(KeyRight, ModCtrl, ti.KeyCtrlRight) t.prepareKeyMod(KeyLeft, ModCtrl, ti.KeyCtrlLeft) t.prepareKeyMod(KeyUp, ModCtrl, ti.KeyCtrlUp) t.prepareKeyMod(KeyDown, ModCtrl, ti.KeyCtrlDown) t.prepareKeyMod(KeyHome, ModCtrl, ti.KeyCtrlHome) t.prepareKeyMod(KeyEnd, ModCtrl, ti.KeyCtrlEnd) // Sadly, xterm handling of keycodes is somewhat erratic. In // particular, different codes are sent depending on application // mode is in use or not, and the entries for many of these are // simply absent from terminfo on many systems. So we insert // a number of escape sequences if they are not already used, in // order to have the widest correct usage. Note that prepareKey // will not inject codes if the escape sequence is already known. // We also only do this for terminals that have the application // mode present. // Cursor mode if ti.EnterKeypad != "" { t.prepareKey(KeyUp, "\x1b[A") t.prepareKey(KeyDown, "\x1b[B") t.prepareKey(KeyRight, "\x1b[C") t.prepareKey(KeyLeft, "\x1b[D") t.prepareKey(KeyEnd, "\x1b[F") t.prepareKey(KeyHome, "\x1b[H") t.prepareKey(KeyDelete, "\x1b[3~") t.prepareKey(KeyHome, "\x1b[1~") t.prepareKey(KeyEnd, "\x1b[4~") t.prepareKey(KeyPgUp, "\x1b[5~") t.prepareKey(KeyPgDn, "\x1b[6~") // Application mode t.prepareKey(KeyUp, "\x1bOA") t.prepareKey(KeyDown, "\x1bOB") t.prepareKey(KeyRight, "\x1bOC") t.prepareKey(KeyLeft, "\x1bOD") t.prepareKey(KeyHome, "\x1bOH") } t.prepareKey(keyPasteStart, ti.PasteStart) t.prepareKey(keyPasteEnd, ti.PasteEnd) t.prepareXtermModifiers() t.prepareBracketedPaste() t.prepareCursorStyles() t.prepareExtendedOSC() outer: // Add key mappings for control keys. for i := 0; i < ' '; i++ { // Do not insert direct key codes for ambiguous keys. // For example, ESC is used for lots of other keys, so // when parsing this we don't want to fast path handling // of it, but instead wait a bit before parsing it as in // isolation. for esc := range t.keycodes { if []byte(esc)[0] == byte(i) { continue outer } } t.keyexist[Key(i)] = true mod := ModCtrl switch Key(i) { case KeyBS, KeyTAB, KeyESC, KeyCR: // directly type-able- no control sequence mod = ModNone } t.keycodes[string(rune(i))] = &tKeyCode{key: Key(i), mod: mod} } } func (t *tScreen) Fini() { t.finiOnce.Do(t.finish) } func (t *tScreen) finish() { close(t.quit) t.finalize() } func (t *tScreen) SetStyle(style Style) { t.Lock() if !t.fini { t.style = style } t.Unlock() } func (t *tScreen) encodeRune(r rune, buf []byte) []byte { nb := make([]byte, 6) ob := make([]byte, 6) num := utf8.EncodeRune(ob, r) ob = ob[:num] dst := 0 var err error if enc := t.encoder; enc != nil { enc.Reset() dst, _, err = enc.Transform(nb, ob, true) } if err != nil || dst == 0 || nb[0] == '\x1a' { // Combining characters are elided if len(buf) == 0 { if acs, ok := t.acs[r]; ok { buf = append(buf, []byte(acs)...) } else if fb, ok := t.fallback[r]; ok { buf = append(buf, []byte(fb)...) } else { buf = append(buf, '?') } } } else { buf = append(buf, nb[:dst]...) } return buf } func (t *tScreen) sendFgBg(fg Color, bg Color, attr AttrMask) AttrMask { ti := t.ti if ti.Colors == 0 { // foreground vs background, we calculate luminance // and possibly do a reverse video if !fg.Valid() { return attr } v, ok := t.colors[fg] if !ok { v = FindColor(fg, []Color{ColorBlack, ColorWhite}) t.colors[fg] = v } switch v { case ColorWhite: return attr case ColorBlack: return attr ^ AttrReverse } } if fg == ColorReset || bg == ColorReset { t.TPuts(ti.ResetFgBg) } if t.truecolor { if ti.SetFgBgRGB != "" && fg.IsRGB() && bg.IsRGB() { r1, g1, b1 := fg.RGB() r2, g2, b2 := bg.RGB() t.TPuts(ti.TParm(ti.SetFgBgRGB, int(r1), int(g1), int(b1), int(r2), int(g2), int(b2))) return attr } if fg.IsRGB() && ti.SetFgRGB != "" { r, g, b := fg.RGB() t.TPuts(ti.TParm(ti.SetFgRGB, int(r), int(g), int(b))) fg = ColorDefault } if bg.IsRGB() && ti.SetBgRGB != "" { r, g, b := bg.RGB() t.TPuts(ti.TParm(ti.SetBgRGB, int(r), int(g), int(b))) bg = ColorDefault } } if fg.Valid() { if v, ok := t.colors[fg]; ok { fg = v } else { v = FindColor(fg, t.palette) t.colors[fg] = v fg = v } } if bg.Valid() { if v, ok := t.colors[bg]; ok { bg = v } else { v = FindColor(bg, t.palette) t.colors[bg] = v bg = v } } if fg.Valid() && bg.Valid() && ti.SetFgBg != "" { t.TPuts(ti.TParm(ti.SetFgBg, int(fg&0xff), int(bg&0xff))) } else { if fg.Valid() && ti.SetFg != "" { t.TPuts(ti.TParm(ti.SetFg, int(fg&0xff))) } if bg.Valid() && ti.SetBg != "" { t.TPuts(ti.TParm(ti.SetBg, int(bg&0xff))) } } return attr } func (t *tScreen) drawCell(x, y int) int { ti := t.ti mainc, combc, style, width := t.cells.GetContent(x, y) if !t.cells.Dirty(x, y) { return width } if y == t.h-1 && x == t.w-1 && t.ti.AutoMargin && ti.DisableAutoMargin == "" && ti.InsertChar != "" { // our solution is somewhat goofy. // we write to the second to the last cell what we want in the last cell, then we // insert a character at that 2nd to last position to shift the last column into // place, then we rewrite that 2nd to last cell. Old terminals suck. t.TPuts(ti.TGoto(x-1, y)) defer func() { t.TPuts(ti.TGoto(x-1, y)) t.TPuts(ti.InsertChar) t.cy = y t.cx = x - 1 t.cells.SetDirty(x-1, y, true) _ = t.drawCell(x-1, y) t.TPuts(t.ti.TGoto(0, 0)) t.cy = 0 t.cx = 0 }() } else if t.cy != y || t.cx != x { t.TPuts(ti.TGoto(x, y)) t.cx = x t.cy = y } if style == StyleDefault { style = t.style } if style != t.curstyle { fg, bg, attrs := style.Decompose() t.TPuts(ti.AttrOff) attrs = t.sendFgBg(fg, bg, attrs) if attrs&AttrBold != 0 { t.TPuts(ti.Bold) } if attrs&AttrUnderline != 0 { t.TPuts(ti.Underline) } if attrs&AttrReverse != 0 { t.TPuts(ti.Reverse) } if attrs&AttrBlink != 0 { t.TPuts(ti.Blink) } if attrs&AttrDim != 0 { t.TPuts(ti.Dim) } if attrs&AttrItalic != 0 { t.TPuts(ti.Italic) } if attrs&AttrStrikeThrough != 0 { t.TPuts(ti.StrikeThrough) } // URL string can be long, so don't send it unless we really need to if t.enterUrl != "" && t.curstyle != style { if style.url != "" { t.TPuts(ti.TParm(t.enterUrl, style.url, style.urlId)) } else { t.TPuts(t.exitUrl) } } t.curstyle = style } // now emit runes - taking care to not overrun width with a // wide character, and to ensure that we emit exactly one regular // character followed up by any residual combing characters if width < 1 { width = 1 } var str string buf := make([]byte, 0, 6) buf = t.encodeRune(mainc, buf) for _, r := range combc { buf = t.encodeRune(r, buf) } str = string(buf) if width > 1 && str == "?" { // No FullWidth character support str = "? " t.cx = -1 } if x > t.w-width { // too wide to fit; emit a single space instead width = 1 str = " " } t.writeString(str) t.cx += width t.cells.SetDirty(x, y, false) if width > 1 { t.cx = -1 } return width } func (t *tScreen) ShowCursor(x, y int) { t.Lock() t.cursorx = x t.cursory = y t.Unlock() } func (t *tScreen) SetCursorStyle(cs CursorStyle) { t.Lock() t.cursorStyle = cs t.Unlock() } func (t *tScreen) HideCursor() { t.ShowCursor(-1, -1) } func (t *tScreen) showCursor() { x, y := t.cursorx, t.cursory w, h := t.cells.Size() if x < 0 || y < 0 || x >= w || y >= h { t.hideCursor() return } t.TPuts(t.ti.TGoto(x, y)) t.TPuts(t.ti.ShowCursor) if t.cursorStyles != nil { if esc, ok := t.cursorStyles[t.cursorStyle]; ok { t.TPuts(esc) } } t.cx = x t.cy = y } // writeString sends a string to the terminal. The string is sent as-is and // this function does not expand inline padding indications (of the form // $<[delay]> where [delay] is msec). In order to have these expanded, use // TPuts. If the screen is "buffering", the string is collected in a buffer, // with the intention that the entire buffer be sent to the terminal in one // write operation at some point later. func (t *tScreen) writeString(s string) { if t.buffering { _, _ = io.WriteString(&t.buf, s) } else { _, _ = io.WriteString(t.tty, s) } } func (t *tScreen) TPuts(s string) { if t.buffering { t.ti.TPuts(&t.buf, s) } else { t.ti.TPuts(t.tty, s) } } func (t *tScreen) Show() { t.Lock() if !t.fini { t.resize() t.draw() } t.Unlock() } func (t *tScreen) clearScreen() { t.TPuts(t.ti.AttrOff) t.TPuts(t.exitUrl) fg, bg, _ := t.style.Decompose() _ = t.sendFgBg(fg, bg, AttrNone) t.TPuts(t.ti.Clear) t.clear = false } func (t *tScreen) hideCursor() { // does not update cursor position if t.ti.HideCursor != "" { t.TPuts(t.ti.HideCursor) } else { // No way to hide cursor, stick it // at bottom right of screen t.cx, t.cy = t.cells.Size() t.TPuts(t.ti.TGoto(t.cx, t.cy)) } } func (t *tScreen) draw() { // clobber cursor position, because we're going to change it all t.cx = -1 t.cy = -1 // make no style assumptions t.curstyle = styleInvalid t.buf.Reset() t.buffering = true defer func() { t.buffering = false }() // hide the cursor while we move stuff around t.hideCursor() if t.clear { t.clearScreen() } for y := 0; y < t.h; y++ { for x := 0; x < t.w; x++ { width := t.drawCell(x, y) if width > 1 { if x+1 < t.w { // this is necessary so that if we ever // go back to drawing that cell, we // actually will *draw* it. t.cells.SetDirty(x+1, y, true) } } x += width - 1 } } // restore the cursor t.showCursor() _, _ = t.buf.WriteTo(t.tty) } func (t *tScreen) EnableMouse(flags ...MouseFlags) { var f MouseFlags flagsPresent := false for _, flag := range flags { f |= flag flagsPresent = true } if !flagsPresent { f = MouseMotionEvents | MouseDragEvents | MouseButtonEvents } t.Lock() t.mouseFlags = f t.enableMouse(f) t.Unlock() } func (t *tScreen) enableMouse(f MouseFlags) { // Rather than using terminfo to find mouse escape sequences, we rely on the fact that // pretty much *every* terminal that supports mouse tracking follows the // XTerm standards (the modern ones). if len(t.mouse) != 0 { // start by disabling all tracking. t.TPuts("\x1b[?1000l\x1b[?1002l\x1b[?1003l\x1b[?1006l") if f&MouseButtonEvents != 0 { t.TPuts("\x1b[?1000h") } if f&MouseDragEvents != 0 { t.TPuts("\x1b[?1002h") } if f&MouseMotionEvents != 0 { t.TPuts("\x1b[?1003h") } if f&(MouseButtonEvents|MouseDragEvents|MouseMotionEvents) != 0 { t.TPuts("\x1b[?1006h") } } } func (t *tScreen) DisableMouse() { t.Lock() t.mouseFlags = 0 t.enableMouse(0) t.Unlock() } func (t *tScreen) EnablePaste() { t.Lock() t.pasteEnabled = true t.enablePasting(true) t.Unlock() } func (t *tScreen) DisablePaste() { t.Lock() t.pasteEnabled = false t.enablePasting(false) t.Unlock() } func (t *tScreen) enablePasting(on bool) { var s string if on { s = t.enablePaste } else { s = t.disablePaste } if s != "" { t.TPuts(s) } } func (t *tScreen) EnableFocus() { t.Lock() t.focusEnabled = true t.enableFocusReporting() t.Unlock() } func (t *tScreen) DisableFocus() { t.Lock() t.focusEnabled = false t.disableFocusReporting() t.Unlock() } func (t *tScreen) enableFocusReporting() { if t.enableFocus != "" { t.TPuts(t.enableFocus) } } func (t *tScreen) disableFocusReporting() { if t.disableFocus != "" { t.TPuts(t.disableFocus) } } func (t *tScreen) Size() (int, int) { t.Lock() w, h := t.w, t.h t.Unlock() return w, h } func (t *tScreen) resize() { ws, err := t.tty.WindowSize() if err != nil { return } if ws.Width == t.w && ws.Height == t.h { return } t.cx = -1 t.cy = -1 t.cells.Resize(ws.Width, ws.Height) t.cells.Invalidate() t.h = ws.Height t.w = ws.Width ev := &EventResize{t: time.Now(), ws: ws} select { case t.eventQ <- ev: default: } } func (t *tScreen) Colors() int { // this doesn't change, no need for lock if t.truecolor { return 1 << 24 } return t.ti.Colors } // nColors returns the size of the built-in palette. // This is distinct from Colors(), as it will generally // always be a small number. (<= 256) func (t *tScreen) nColors() int { return t.ti.Colors } // vtACSNames is a map of bytes defined by terminfo that are used in // the terminals Alternate Character Set to represent other glyphs. // For example, the upper left corner of the box drawing set can be // displayed by printing "l" while in the alternate character set. // It's not quite that simple, since the "l" is the terminfo name, // and it may be necessary to use a different character based on // the terminal implementation (or the terminal may lack support for // this altogether). See buildAcsMap below for detail. var vtACSNames = map[byte]rune{ '+': RuneRArrow, ',': RuneLArrow, '-': RuneUArrow, '.': RuneDArrow, '0': RuneBlock, '`': RuneDiamond, 'a': RuneCkBoard, 'b': '␉', // VT100, Not defined by terminfo 'c': '␌', // VT100, Not defined by terminfo 'd': '␋', // VT100, Not defined by terminfo 'e': '␊', // VT100, Not defined by terminfo 'f': RuneDegree, 'g': RunePlMinus, 'h': RuneBoard, 'i': RuneLantern, 'j': RuneLRCorner, 'k': RuneURCorner, 'l': RuneULCorner, 'm': RuneLLCorner, 'n': RunePlus, 'o': RuneS1, 'p': RuneS3, 'q': RuneHLine, 'r': RuneS7, 's': RuneS9, 't': RuneLTee, 'u': RuneRTee, 'v': RuneBTee, 'w': RuneTTee, 'x': RuneVLine, 'y': RuneLEqual, 'z': RuneGEqual, '{': RunePi, '|': RuneNEqual, '}': RuneSterling, '~': RuneBullet, } // buildAcsMap builds a map of characters that we translate from Unicode to // alternate character encodings. To do this, we use the standard VT100 ACS // maps. This is only done if the terminal lacks support for Unicode; we // always prefer to emit Unicode glyphs when we are able. func (t *tScreen) buildAcsMap() { acsstr := t.ti.AltChars t.acs = make(map[rune]string) for len(acsstr) > 2 { srcv := acsstr[0] dstv := string(acsstr[1]) if r, ok := vtACSNames[srcv]; ok { t.acs[r] = t.ti.EnterAcs + dstv + t.ti.ExitAcs } acsstr = acsstr[2:] } } func (t *tScreen) clip(x, y int) (int, int) { w, h := t.cells.Size() if x < 0 { x = 0 } if y < 0 { y = 0 } if x > w-1 { x = w - 1 } if y > h-1 { y = h - 1 } return x, y } // buildMouseEvent returns an event based on the supplied coordinates and button // state. Note that the screen's mouse button state is updated based on the // input to this function (i.e. it mutates the receiver). func (t *tScreen) buildMouseEvent(x, y, btn int) *EventMouse { // XTerm mouse events only report at most one button at a time, // which may include a wheel button. Wheel motion events are // reported as single impulses, while other button events are reported // as separate press & release events. button := ButtonNone mod := ModNone // Mouse wheel has bit 6 set, no release events. It should be noted // that wheel events are sometimes misdelivered as mouse button events // during a click-drag, so we debounce these, considering them to be // button press events unless we see an intervening release event. switch btn & 0x43 { case 0: button = Button1 case 1: button = Button3 // Note we prefer to treat right as button 2 case 2: button = Button2 // And the middle button as button 3 case 3: button = ButtonNone case 0x40: button = WheelUp case 0x41: button = WheelDown } if btn&0x4 != 0 { mod |= ModShift } if btn&0x8 != 0 { mod |= ModAlt } if btn&0x10 != 0 { mod |= ModCtrl } // Some terminals will report mouse coordinates outside the // screen, especially with click-drag events. Clip the coordinates // to the screen in that case. x, y = t.clip(x, y) return NewEventMouse(x, y, button, mod) } // parseSgrMouse attempts to locate an SGR mouse record at the start of the // buffer. It returns true, true if it found one, and the associated bytes // be removed from the buffer. It returns true, false if the buffer might // contain such an event, but more bytes are necessary (partial match), and // false, false if the content is definitely *not* an SGR mouse record. func (t *tScreen) parseSgrMouse(buf *bytes.Buffer, evs *[]Event) (bool, bool) { b := buf.Bytes() var x, y, btn, state int dig := false neg := false motion := false scroll := false i := 0 val := 0 for i = range b { switch b[i] { case '\x1b': if state != 0 { return false, false } state = 1 case '\x9b': if state != 0 { return false, false } state = 2 case '[': if state != 1 { return false, false } state = 2 case '<': if state != 2 { return false, false } val = 0 dig = false neg = false state = 3 case '-': if state != 3 && state != 4 && state != 5 { return false, false } if dig || neg { return false, false } neg = true // stay in state case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': if state != 3 && state != 4 && state != 5 { return false, false } val *= 10 val += int(b[i] - '0') dig = true // stay in state case ';': if neg { val = -val } switch state { case 3: btn, val = val, 0 neg, dig, state = false, false, 4 case 4: x, val = val-1, 0 neg, dig, state = false, false, 5 default: return false, false } case 'm', 'M': if state != 5 { return false, false } if neg { val = -val } y = val - 1 motion = (btn & 32) != 0 scroll = (btn & 0x42) == 0x40 btn &^= 32 if b[i] == 'm' { // mouse release, clear all buttons btn |= 3 btn &^= 0x40 t.buttondn = false } else if motion { /* * Some broken terminals appear to send * mouse button one motion events, instead of * encoding 35 (no buttons) into these events. * We resolve these by looking for a non-motion * event first. */ if !t.buttondn { btn |= 3 btn &^= 0x40 } } else if !scroll { t.buttondn = true } // consume the event bytes for i >= 0 { _, _ = buf.ReadByte() i-- } *evs = append(*evs, t.buildMouseEvent(x, y, btn)) return true, true } } // incomplete & inconclusive at this point return true, false } func (t *tScreen) parseFocus(buf *bytes.Buffer, evs *[]Event) (bool, bool) { state := 0 b := buf.Bytes() for i := range b { switch state { case 0: if b[i] != '\x1b' { return false, false } state = 1 case 1: if b[i] != '[' { return false, false } state = 2 case 2: if b[i] != 'I' && b[i] != 'O' { return false, false } *evs = append(*evs, NewEventFocus(b[i] == 'I')) _, _ = buf.ReadByte() _, _ = buf.ReadByte() _, _ = buf.ReadByte() return true, true } } return true, false } // parseXtermMouse is like parseSgrMouse, but it parses a legacy // X11 mouse record. func (t *tScreen) parseXtermMouse(buf *bytes.Buffer, evs *[]Event) (bool, bool) { b := buf.Bytes() state := 0 btn := 0 x := 0 y := 0 for i := range b { switch state { case 0: switch b[i] { case '\x1b': state = 1 case '\x9b': state = 2 default: return false, false } case 1: if b[i] != '[' { return false, false } state = 2 case 2: if b[i] != 'M' { return false, false } state++ case 3: btn = int(b[i]) state++ case 4: x = int(b[i]) - 32 - 1 state++ case 5: y = int(b[i]) - 32 - 1 for i >= 0 { _, _ = buf.ReadByte() i-- } *evs = append(*evs, t.buildMouseEvent(x, y, btn)) return true, true } } return true, false } func (t *tScreen) parseFunctionKey(buf *bytes.Buffer, evs *[]Event) (bool, bool) { b := buf.Bytes() partial := false for e, k := range t.keycodes { esc := []byte(e) if (len(esc) == 1) && (esc[0] == '\x1b') { continue } if bytes.HasPrefix(b, esc) { // matched var r rune if len(esc) == 1 { r = rune(b[0]) } mod := k.mod if t.escaped { mod |= ModAlt t.escaped = false } switch k.key { case keyPasteStart: *evs = append(*evs, NewEventPaste(true)) case keyPasteEnd: *evs = append(*evs, NewEventPaste(false)) default: *evs = append(*evs, NewEventKey(k.key, r, mod)) } for i := 0; i < len(esc); i++ { _, _ = buf.ReadByte() } return true, true } if bytes.HasPrefix(esc, b) { partial = true } } return partial, false } func (t *tScreen) parseRune(buf *bytes.Buffer, evs *[]Event) (bool, bool) { b := buf.Bytes() if b[0] >= ' ' && b[0] <= 0x7F { // printable ASCII easy to deal with -- no encodings mod := ModNone if t.escaped { mod = ModAlt t.escaped = false } *evs = append(*evs, NewEventKey(KeyRune, rune(b[0]), mod)) _, _ = buf.ReadByte() return true, true } if b[0] < 0x80 { // Low numbered values are control keys, not runes. return false, false } utf := make([]byte, 12) for l := 1; l <= len(b); l++ { t.decoder.Reset() nOut, nIn, e := t.decoder.Transform(utf, b[:l], true) if e == transform.ErrShortSrc { continue } if nOut != 0 { r, _ := utf8.DecodeRune(utf[:nOut]) if r != utf8.RuneError { mod := ModNone if t.escaped { mod = ModAlt t.escaped = false } *evs = append(*evs, NewEventKey(KeyRune, r, mod)) } for nIn > 0 { _, _ = buf.ReadByte() nIn-- } return true, true } } // Looks like potential escape return true, false } func (t *tScreen) scanInput(buf *bytes.Buffer, expire bool) { evs := t.collectEventsFromInput(buf, expire) for _, ev := range evs { select { case t.eventQ <- ev: case <-t.quit: return } } } // Return an array of Events extracted from the supplied buffer. This is done // while holding the screen's lock - the events can then be queued for // application processing with the lock released. func (t *tScreen) collectEventsFromInput(buf *bytes.Buffer, expire bool) []Event { res := make([]Event, 0, 20) t.Lock() defer t.Unlock() for { b := buf.Bytes() if len(b) == 0 { buf.Reset() return res } partials := 0 if part, comp := t.parseRune(buf, &res); comp { continue } else if part { partials++ } if part, comp := t.parseFunctionKey(buf, &res); comp { continue } else if part { partials++ } if part, comp := t.parseFocus(buf, &res); comp { continue } else if part { partials++ } // Only parse mouse records if this term claims to have // mouse support if t.ti.Mouse != "" { if part, comp := t.parseXtermMouse(buf, &res); comp { continue } else if part { partials++ } if part, comp := t.parseSgrMouse(buf, &res); comp { continue } else if part { partials++ } } if partials == 0 || expire { if b[0] == '\x1b' { if len(b) == 1 { res = append(res, NewEventKey(KeyEsc, 0, ModNone)) t.escaped = false } else { t.escaped = true } _, _ = buf.ReadByte() continue } // Nothing was going to match, or we timed-out // waiting for more data -- just deliver the characters // to the app & let them sort it out. Possibly we // should only do this for control characters like ESC. by, _ := buf.ReadByte() mod := ModNone if t.escaped { t.escaped = false mod = ModAlt } res = append(res, NewEventKey(KeyRune, rune(by), mod)) continue } // well we have some partial data, wait until we get // some more break } return res } func (t *tScreen) mainLoop(stopQ chan struct{}) { defer t.wg.Done() buf := &bytes.Buffer{} for { select { case <-stopQ: return case <-t.quit: return case <-t.resizeQ: t.Lock() t.cx = -1 t.cy = -1 t.resize() t.cells.Invalidate() t.draw() t.Unlock() continue case <-t.keytimer.C: // If the timer fired, and the current time // is after the expiration of the escape sequence, // then we assume the escape sequence reached its // conclusion, and process the chunk independently. // This lets us detect conflicts such as a lone ESC. if buf.Len() > 0 { if time.Now().After(t.keyexpire) { t.scanInput(buf, true) } } if buf.Len() > 0 { if !t.keytimer.Stop() { select { case <-t.keytimer.C: default: } } t.keytimer.Reset(time.Millisecond * 50) } case chunk := <-t.keychan: buf.Write(chunk) t.keyexpire = time.Now().Add(time.Millisecond * 50) t.scanInput(buf, false) if !t.keytimer.Stop() { select { case <-t.keytimer.C: default: } } if buf.Len() > 0 { t.keytimer.Reset(time.Millisecond * 50) } } } } func (t *tScreen) inputLoop(stopQ chan struct{}) { defer t.wg.Done() for { select { case <-stopQ: return default: } chunk := make([]byte, 128) n, e := t.tty.Read(chunk) switch e { case nil: default: t.Lock() running := t.running t.Unlock() if running { select { case t.eventQ <- NewEventError(e): case <-t.quit: } } return } if n > 0 { t.keychan <- chunk[:n] } } } func (t *tScreen) Sync() { t.Lock() t.cx = -1 t.cy = -1 if !t.fini { t.resize() t.clear = true t.cells.Invalidate() t.draw() } t.Unlock() } func (t *tScreen) CharacterSet() string { return t.charset } func (t *tScreen) RegisterRuneFallback(orig rune, fallback string) { t.Lock() t.fallback[orig] = fallback t.Unlock() } func (t *tScreen) UnregisterRuneFallback(orig rune) { t.Lock() delete(t.fallback, orig) t.Unlock() } func (t *tScreen) CanDisplay(r rune, checkFallbacks bool) bool { if enc := t.encoder; enc != nil { nb := make([]byte, 6) ob := make([]byte, 6) num := utf8.EncodeRune(ob, r) enc.Reset() dst, _, err := enc.Transform(nb, ob[:num], true) if dst != 0 && err == nil && nb[0] != '\x1A' { return true } } // Terminal fallbacks always permitted, since we assume they are // basically nearly perfect renditions. if _, ok := t.acs[r]; ok { return true } if !checkFallbacks { return false } if _, ok := t.fallback[r]; ok { return true } return false } func (t *tScreen) HasMouse() bool { return len(t.mouse) != 0 } func (t *tScreen) HasKey(k Key) bool { if k == KeyRune { return true } return t.keyexist[k] } func (t *tScreen) SetSize(w, h int) { if t.setWinSize != "" { t.TPuts(t.ti.TParm(t.setWinSize, w, h)) } t.cells.Invalidate() t.resize() } func (t *tScreen) Resize(int, int, int, int) {} func (t *tScreen) Suspend() error { t.disengage() return nil } func (t *tScreen) Resume() error { return t.engage() } func (t *tScreen) Tty() (Tty, bool) { return t.tty, true } // engage is used to place the terminal in raw mode and establish screen size, etc. // Think of this is as tcell "engaging" the clutch, as it's going to be driving the // terminal interface. func (t *tScreen) engage() error { t.Lock() defer t.Unlock() if t.tty == nil { return ErrNoScreen } t.tty.NotifyResize(func() { select { case t.resizeQ <- true: default: } }) if t.running { return errors.New("already engaged") } if err := t.tty.Start(); err != nil { return err } t.running = true if ws, err := t.tty.WindowSize(); err == nil && ws.Width != 0 && ws.Height != 0 { t.cells.Resize(ws.Width, ws.Height) } stopQ := make(chan struct{}) t.stopQ = stopQ t.enableMouse(t.mouseFlags) t.enablePasting(t.pasteEnabled) if t.focusEnabled { t.enableFocusReporting() } ti := t.ti if os.Getenv("TCELL_ALTSCREEN") != "disable" { // Technically this may not be right, but every terminal we know about // (even Wyse 60) uses this to enter the alternate screen buffer, and // possibly save and restore the window title and/or icon. // (In theory there could be terminals that don't support X,Y cursor // positions without a setup command, but we don't support them.) t.TPuts(ti.EnterCA) } t.TPuts(ti.EnterKeypad) t.TPuts(ti.HideCursor) t.TPuts(ti.EnableAcs) t.TPuts(ti.DisableAutoMargin) t.TPuts(ti.Clear) t.wg.Add(2) go t.inputLoop(stopQ) go t.mainLoop(stopQ) return nil } // disengage is used to release the terminal back to support from the caller. // Think of this as tcell disengaging the clutch, so that another application // can take over the terminal interface. This restores the TTY mode that was // present when the application was first started. func (t *tScreen) disengage() { t.Lock() if !t.running { t.Unlock() return } t.running = false stopQ := t.stopQ close(stopQ) _ = t.tty.Drain() t.Unlock() t.tty.NotifyResize(nil) // wait for everything to shut down t.wg.Wait() // shutdown the screen and disable special modes (e.g. mouse and bracketed paste) ti := t.ti t.cells.Resize(0, 0) t.TPuts(ti.ShowCursor) if t.cursorStyles != nil && t.cursorStyle != CursorStyleDefault { t.TPuts(t.cursorStyles[CursorStyleDefault]) } t.TPuts(ti.ResetFgBg) t.TPuts(ti.AttrOff) t.TPuts(ti.ExitKeypad) t.TPuts(ti.EnableAutoMargin) if os.Getenv("TCELL_ALTSCREEN") != "disable" { t.TPuts(ti.Clear) // only needed if ExitCA is empty t.TPuts(ti.ExitCA) } t.enableMouse(0) t.enablePasting(false) t.disableFocusReporting() _ = t.tty.Stop() } // Beep emits a beep to the terminal. func (t *tScreen) Beep() error { t.writeString(string(byte(7))) return nil } // finalize is used to at application shutdown, and restores the terminal // to it's initial state. It should not be called more than once. func (t *tScreen) finalize() { t.disengage() _ = t.tty.Close() } func (t *tScreen) StopQ() <-chan struct{} { return t.quit } func (t *tScreen) EventQ() chan Event { return t.eventQ } func (t *tScreen) GetCells() *CellBuffer { return &t.cells } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/tscreen_stub.go ================================================ //go:build plan9 || windows // +build plan9 windows // Copyright 2022 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell // NB: We might someday wish to move Windows to this model. However, // that would probably mean sacrificing some of the richer key reporting // that we can obtain with the console API present on Windows. func (t *tScreen) initialize() error { if t.tty == nil { return ErrNoScreen } // If a tty was supplied (custom), it should work. // Custom screen implementations will need to provide a TTY // implementation that we can use. return nil } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/tscreen_unix.go ================================================ // Copyright 2021 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos package tcell // initialize is used at application startup, and sets up the initial values // including file descriptors used for terminals and saving the initial state // so that it can be restored when the application terminates. func (t *tScreen) initialize() error { var err error if t.tty == nil { t.tty, err = NewDevTty() if err != nil { return err } } return nil } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/tty.go ================================================ // Copyright 2021 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package tcell import "io" // Tty is an abstraction of a tty (traditionally "teletype"). This allows applications to // provide for alternate backends, as there are situations where the traditional /dev/tty // does not work, or where more flexible handling is required. This interface is for use // with the terminfo-style based API. It extends the io.ReadWriter API. It is reasonable // that the implementation might choose to use different underlying files for the Reader // and Writer sides of this API, as part of it's internal implementation. type Tty interface { // Start is used to activate the Tty for use. Upon return the terminal should be // in raw mode, non-blocking, etc. The implementation should take care of saving // any state that is required so that it may be restored when Stop is called. Start() error // Stop is used to stop using this Tty instance. This may be a suspend, so that other // terminal based applications can run in the foreground. Implementations should // restore any state collected at Start(), and return to ordinary blocking mode, etc. // Drain is called first to drain the input. Once this is called, no more Read // or Write calls will be made until Start is called again. Stop() error // Drain is called before Stop, and ensures that the reader will wake up appropriately // if it was blocked. This workaround is required for /dev/tty on certain UNIX systems // to ensure that Read() does not block forever. This typically arranges for the tty driver // to send data immediately (e.g. VMIN and VTIME both set zero) and sets a deadline on input. // Implementations may reasonably make this a no-op. There will still be control sequences // emitted between the time this is called, and when Stop is called. Drain() error // NotifyResize is used register a callback when the tty thinks the dimensions have // changed. The standard UNIX implementation links this to a handler for SIGWINCH. // If the supplied callback is nil, then any handler should be unregistered. NotifyResize(cb func()) // WindowSize is called to determine the terminal dimensions. This might be determined // by an ioctl or other means. WindowSize() (WindowSize, error) io.ReadWriteCloser } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/tty_unix.go ================================================ // Copyright 2021 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos package tcell import ( "errors" "fmt" "os" "os/signal" "strconv" "sync" "syscall" "time" "golang.org/x/sys/unix" "golang.org/x/term" ) // devTty is an implementation of the Tty API based upon /dev/tty. type devTty struct { fd int f *os.File of *os.File // the first open of /dev/tty saved *term.State sig chan os.Signal cb func() stopQ chan struct{} dev string wg sync.WaitGroup l sync.Mutex } func (tty *devTty) Read(b []byte) (int, error) { return tty.f.Read(b) } func (tty *devTty) Write(b []byte) (int, error) { return tty.f.Write(b) } func (tty *devTty) Close() error { return tty.f.Close() } func (tty *devTty) Start() error { tty.l.Lock() defer tty.l.Unlock() // We open another copy of /dev/tty. This is a workaround for unusual behavior // observed in macOS, apparently caused when a subshell (for example) closes our // own tty device (when it exits for example). Getting a fresh new one seems to // resolve the problem. (We believe this is a bug in the macOS tty driver that // fails to account for dup() references to the same file before applying close() // related behaviors to the tty.) We're also holding the original copy we opened // since closing that might have deleterious effects as well. The upshot is that // we will have up to two separate file handles open on /dev/tty. (Note that when // using stdin/stdout instead of /dev/tty this problem is not observed.) var err error if tty.f, err = os.OpenFile(tty.dev, os.O_RDWR, 0); err != nil { return err } if !term.IsTerminal(tty.fd) { return errors.New("device is not a terminal") } _ = tty.f.SetReadDeadline(time.Time{}) saved, err := term.MakeRaw(tty.fd) // also sets vMin and vTime if err != nil { return err } tty.saved = saved tty.stopQ = make(chan struct{}) tty.wg.Add(1) go func(stopQ chan struct{}) { defer tty.wg.Done() for { select { case <-tty.sig: tty.l.Lock() cb := tty.cb tty.l.Unlock() if cb != nil { cb() } case <-stopQ: return } } }(tty.stopQ) signal.Notify(tty.sig, syscall.SIGWINCH) return nil } func (tty *devTty) Drain() error { _ = tty.f.SetReadDeadline(time.Now()) if err := tcSetBufParams(tty.fd, 0, 0); err != nil { return err } return nil } func (tty *devTty) Stop() error { tty.l.Lock() if err := term.Restore(tty.fd, tty.saved); err != nil { tty.l.Unlock() return err } _ = tty.f.SetReadDeadline(time.Now()) signal.Stop(tty.sig) close(tty.stopQ) tty.l.Unlock() tty.wg.Wait() // close our tty device -- we'll get another one if we Start again later. _ = tty.f.Close() return nil } func (tty *devTty) WindowSize() (WindowSize, error) { size := WindowSize{} ws, err := unix.IoctlGetWinsize(tty.fd, unix.TIOCGWINSZ) if err != nil { return size, err } w := int(ws.Col) h := int(ws.Row) if w == 0 { w, _ = strconv.Atoi(os.Getenv("COLUMNS")) } if w == 0 { w = 80 // default } if h == 0 { h, _ = strconv.Atoi(os.Getenv("LINES")) } if h == 0 { h = 25 // default } size.Width = w size.Height = h size.PixelWidth = int(ws.Xpixel) size.PixelHeight = int(ws.Ypixel) return size, nil } func (tty *devTty) NotifyResize(cb func()) { tty.l.Lock() tty.cb = cb tty.l.Unlock() } // NewDevTty opens a /dev/tty based Tty. func NewDevTty() (Tty, error) { return NewDevTtyFromDev("/dev/tty") } // NewDevTtyFromDev opens a tty device given a path. This can be useful to bind to other nodes. func NewDevTtyFromDev(dev string) (Tty, error) { tty := &devTty{ dev: dev, sig: make(chan os.Signal), } var err error if tty.of, err = os.OpenFile(dev, os.O_RDWR, 0); err != nil { return nil, err } tty.fd = int(tty.of.Fd()) if !term.IsTerminal(tty.fd) { _ = tty.f.Close() return nil, errors.New("not a terminal") } if tty.saved, err = term.GetState(tty.fd); err != nil { _ = tty.f.Close() return nil, fmt.Errorf("failed to get state: %w", err) } return tty, nil } ================================================ FILE: vendor/github.com/gdamore/tcell/v2/wscreen.go ================================================ // Copyright 2023 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use file except in compliance with the License. // You may obtain a copy of the license at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. //go:build js && wasm // +build js,wasm package tcell import ( "errors" "github.com/gdamore/tcell/v2/terminfo" "strings" "sync" "syscall/js" "unicode/utf8" ) func NewTerminfoScreen() (Screen, error) { t := &wScreen{} t.fallback = make(map[rune]string) return &baseScreen{screenImpl: t}, nil } type wScreen struct { w, h int style Style cells CellBuffer running bool clear bool flagsPresent bool pasteEnabled bool mouseFlags MouseFlags cursorStyle CursorStyle quit chan struct{} evch chan Event fallback map[rune]string finiOnce sync.Once sync.Mutex } func (t *wScreen) Init() error { t.w, t.h = 80, 24 // default for html as of now t.evch = make(chan Event, 10) t.quit = make(chan struct{}) t.Lock() t.running = true t.style = StyleDefault t.cells.Resize(t.w, t.h) t.Unlock() js.Global().Set("onKeyEvent", js.FuncOf(t.onKeyEvent)) return nil } func (t *wScreen) Fini() { t.finiOnce.Do(func() { close(t.quit) }) } func (t *wScreen) SetStyle(style Style) { t.Lock() t.style = style t.Unlock() } // paletteColor gives a more natural palette color actually matching // typical XTerm. We might in the future want to permit styling these // via CSS. var palette = map[Color]int32{ ColorBlack: 0x000000, ColorMaroon: 0xcd0000, ColorGreen: 0x00cd00, ColorOlive: 0xcdcd00, ColorNavy: 0x0000ee, ColorPurple: 0xcd00cd, ColorTeal: 0x00cdcd, ColorSilver: 0xe5e5e5, ColorGray: 0x7f7f7f, ColorRed: 0xff0000, ColorLime: 0x00ff00, ColorYellow: 0xffff00, ColorBlue: 0x5c5cff, ColorFuchsia: 0xff00ff, ColorAqua: 0x00ffff, ColorWhite: 0xffffff, } func paletteColor(c Color) int32 { if c.IsRGB() { return int32(c & 0xffffff) } if c >= ColorBlack && c <= ColorWhite { return palette[c] } return c.Hex() } func (t *wScreen) drawCell(x, y int) int { mainc, combc, style, width := t.cells.GetContent(x, y) if !t.cells.Dirty(x, y) { return width } if style == StyleDefault { style = t.style } fg, bg := paletteColor(style.fg), paletteColor(style.bg) if fg == -1 { fg = 0xe5e5e5 } if bg == -1 { bg = 0x000000 } var combcarr []interface{} = make([]interface{}, len(combc)) for i, c := range combc { combcarr[i] = c } t.cells.SetDirty(x, y, false) js.Global().Call("drawCell", x, y, mainc, combcarr, fg, bg, int(style.attrs)) return width } func (t *wScreen) ShowCursor(x, y int) { t.Lock() js.Global().Call("showCursor", x, y) t.Unlock() } func (t *wScreen) SetCursorStyle(cs CursorStyle) { t.Lock() js.Global().Call("setCursorStyle", curStyleClasses[cs]) t.Unlock() } func (t *wScreen) HideCursor() { t.ShowCursor(-1, -1) } func (t *wScreen) Show() { t.Lock() t.resize() t.draw() t.Unlock() } func (t *wScreen) clearScreen() { js.Global().Call("clearScreen", t.style.fg.Hex(), t.style.bg.Hex()) t.clear = false } func (t *wScreen) draw() { if t.clear { t.clearScreen() } for y := 0; y < t.h; y++ { for x := 0; x < t.w; x++ { width := t.drawCell(x, y) x += width - 1 } } js.Global().Call("show") } func (t *wScreen) EnableMouse(flags ...MouseFlags) { var f MouseFlags flagsPresent := false for _, flag := range flags { f |= flag flagsPresent = true } if !flagsPresent { f = MouseMotionEvents | MouseDragEvents | MouseButtonEvents } t.Lock() t.mouseFlags = f t.enableMouse(f) t.Unlock() } func (t *wScreen) enableMouse(f MouseFlags) { if f&MouseButtonEvents != 0 { js.Global().Set("onMouseClick", js.FuncOf(t.onMouseEvent)) } else { js.Global().Set("onMouseClick", js.FuncOf(t.unset)) } if f&MouseDragEvents != 0 || f&MouseMotionEvents != 0 { js.Global().Set("onMouseMove", js.FuncOf(t.onMouseEvent)) } else { js.Global().Set("onMouseMove", js.FuncOf(t.unset)) } } func (t *wScreen) DisableMouse() { t.Lock() t.mouseFlags = 0 t.enableMouse(0) t.Unlock() } func (t *wScreen) EnablePaste() { t.Lock() t.pasteEnabled = true t.enablePasting(true) t.Unlock() } func (t *wScreen) DisablePaste() { t.Lock() t.pasteEnabled = false t.enablePasting(false) t.Unlock() } func (t *wScreen) enablePasting(on bool) { if on { js.Global().Set("onPaste", js.FuncOf(t.onPaste)) } else { js.Global().Set("onPaste", js.FuncOf(t.unset)) } } func (t *wScreen) EnableFocus() { t.Lock() js.Global().Set("onFocus", js.FuncOf(t.onFocus)) t.Unlock() } func (t *wScreen) DisableFocus() { t.Lock() js.Global().Set("onFocus", js.FuncOf(t.unset)) t.Unlock() } func (t *wScreen) Size() (int, int) { t.Lock() w, h := t.w, t.h t.Unlock() return w, h } // resize does nothing, as asking the web window to resize // without a specified width or height will cause no change. func (t *wScreen) resize() {} func (t *wScreen) Colors() int { return 16777216 // 256 ^ 3 } func (t *wScreen) clip(x, y int) (int, int) { w, h := t.cells.Size() if x < 0 { x = 0 } if y < 0 { y = 0 } if x > w-1 { x = w - 1 } if y > h-1 { y = h - 1 } return x, y } func (t *wScreen) postEvent(ev Event) { select { case t.evch <- ev: case <-t.quit: } } func (t *wScreen) onMouseEvent(this js.Value, args []js.Value) interface{} { mod := ModNone button := ButtonNone switch args[2].Int() { case 0: if t.mouseFlags&MouseMotionEvents == 0 { // don't want this event! is a mouse motion event, but user has asked not. return nil } button = ButtonNone case 1: button = Button1 case 2: button = Button3 // Note we prefer to treat right as button 2 case 3: button = Button2 // And the middle button as button 3 } if args[3].Bool() { // mod shift mod |= ModShift } if args[4].Bool() { // mod alt mod |= ModAlt } if args[5].Bool() { // mod ctrl mod |= ModCtrl } t.postEvent(NewEventMouse(args[0].Int(), args[1].Int(), button, mod)) return nil } func (t *wScreen) onKeyEvent(this js.Value, args []js.Value) interface{} { key := args[0].String() // don't accept any modifier keys as their own if key == "Control" || key == "Alt" || key == "Meta" || key == "Shift" { return nil } mod := ModNone if args[1].Bool() { // mod shift mod |= ModShift } if args[2].Bool() { // mod alt mod |= ModAlt } if args[3].Bool() { // mod ctrl mod |= ModCtrl } if args[4].Bool() { // mod meta mod |= ModMeta } // check for special case of Ctrl + key if mod == ModCtrl { if k, ok := WebKeyNames["Ctrl-"+strings.ToLower(key)]; ok { t.postEvent(NewEventKey(k, 0, mod)) return nil } } // next try function keys if k, ok := WebKeyNames[key]; ok { t.postEvent(NewEventKey(k, 0, mod)) return nil } // finally try normal, printable chars r, _ := utf8.DecodeRuneInString(key) t.postEvent(NewEventKey(KeyRune, r, mod)) return nil } func (t *wScreen) onPaste(this js.Value, args []js.Value) interface{} { t.postEvent(NewEventPaste(args[0].Bool())) return nil } func (t *wScreen) onFocus(this js.Value, args []js.Value) interface{} { t.postEvent(NewEventFocus(args[0].Bool())) return nil } // unset is a dummy function for js when we want nothing to // happen when javascript calls a function (for example, when // mouse input is disabled, when onMouseEvent() is called from // js, it redirects here and does nothing). func (t *wScreen) unset(this js.Value, args []js.Value) interface{} { return nil } func (t *wScreen) Sync() { t.Lock() t.resize() t.clear = true t.cells.Invalidate() t.draw() t.Unlock() } func (t *wScreen) CharacterSet() string { return "UTF-8" } func (t *wScreen) RegisterRuneFallback(orig rune, fallback string) { t.Lock() t.fallback[orig] = fallback t.Unlock() } func (t *wScreen) UnregisterRuneFallback(orig rune) { t.Lock() delete(t.fallback, orig) t.Unlock() } func (t *wScreen) CanDisplay(r rune, checkFallbacks bool) bool { if utf8.ValidRune(r) { return true } if !checkFallbacks { return false } if _, ok := t.fallback[r]; ok { return true } return false } func (t *wScreen) HasMouse() bool { return true } func (t *wScreen) HasKey(k Key) bool { return true } func (t *wScreen) SetSize(w, h int) { if w == t.w && h == t.h { return } t.cells.Invalidate() t.cells.Resize(w, h) js.Global().Call("resize", w, h) t.w, t.h = w, h t.postEvent(NewEventResize(w, h)) } func (t *wScreen) Resize(int, int, int, int) {} // Suspend simply pauses all input and output, and clears the screen. // There isn't a "default terminal" to go back to. func (t *wScreen) Suspend() error { t.Lock() if !t.running { t.Unlock() return nil } t.running = false t.clearScreen() t.enableMouse(0) t.enablePasting(false) js.Global().Set("onKeyEvent", js.FuncOf(t.unset)) // stop keypresses return nil } func (t *wScreen) Resume() error { t.Lock() if t.running { return errors.New("already engaged") } t.running = true t.enableMouse(t.mouseFlags) t.enablePasting(t.pasteEnabled) js.Global().Set("onKeyEvent", js.FuncOf(t.onKeyEvent)) t.Unlock() return nil } func (t *wScreen) Beep() error { js.Global().Call("beep") return nil } func (t *wScreen) Tty() (Tty, bool) { return nil, false } func (t *wScreen) GetCells() *CellBuffer { return &t.cells } func (t *wScreen) EventQ() chan Event { return t.evch } func (t *wScreen) StopQ() <-chan struct{} { return t.quit } // WebKeyNames maps string names reported from HTML // (KeyboardEvent.key) to tcell accepted keys. var WebKeyNames = map[string]Key{ "Enter": KeyEnter, "Backspace": KeyBackspace, "Tab": KeyTab, "Backtab": KeyBacktab, "Escape": KeyEsc, "Backspace2": KeyBackspace2, "Delete": KeyDelete, "Insert": KeyInsert, "ArrowUp": KeyUp, "ArrowDown": KeyDown, "ArrowLeft": KeyLeft, "ArrowRight": KeyRight, "Home": KeyHome, "End": KeyEnd, "UpLeft": KeyUpLeft, // not supported by HTML "UpRight": KeyUpRight, // not supported by HTML "DownLeft": KeyDownLeft, // not supported by HTML "DownRight": KeyDownRight, // not supported by HTML "Center": KeyCenter, "PgDn": KeyPgDn, "PgUp": KeyPgUp, "Clear": KeyClear, "Exit": KeyExit, "Cancel": KeyCancel, "Pause": KeyPause, "Print": KeyPrint, "F1": KeyF1, "F2": KeyF2, "F3": KeyF3, "F4": KeyF4, "F5": KeyF5, "F6": KeyF6, "F7": KeyF7, "F8": KeyF8, "F9": KeyF9, "F10": KeyF10, "F11": KeyF11, "F12": KeyF12, "F13": KeyF13, "F14": KeyF14, "F15": KeyF15, "F16": KeyF16, "F17": KeyF17, "F18": KeyF18, "F19": KeyF19, "F20": KeyF20, "F21": KeyF21, "F22": KeyF22, "F23": KeyF23, "F24": KeyF24, "F25": KeyF25, "F26": KeyF26, "F27": KeyF27, "F28": KeyF28, "F29": KeyF29, "F30": KeyF30, "F31": KeyF31, "F32": KeyF32, "F33": KeyF33, "F34": KeyF34, "F35": KeyF35, "F36": KeyF36, "F37": KeyF37, "F38": KeyF38, "F39": KeyF39, "F40": KeyF40, "F41": KeyF41, "F42": KeyF42, "F43": KeyF43, "F44": KeyF44, "F45": KeyF45, "F46": KeyF46, "F47": KeyF47, "F48": KeyF48, "F49": KeyF49, "F50": KeyF50, "F51": KeyF51, "F52": KeyF52, "F53": KeyF53, "F54": KeyF54, "F55": KeyF55, "F56": KeyF56, "F57": KeyF57, "F58": KeyF58, "F59": KeyF59, "F60": KeyF60, "F61": KeyF61, "F62": KeyF62, "F63": KeyF63, "F64": KeyF64, "Ctrl-a": KeyCtrlA, // not reported by HTML- need to do special check "Ctrl-b": KeyCtrlB, // not reported by HTML- need to do special check "Ctrl-c": KeyCtrlC, // not reported by HTML- need to do special check "Ctrl-d": KeyCtrlD, // not reported by HTML- need to do special check "Ctrl-e": KeyCtrlE, // not reported by HTML- need to do special check "Ctrl-f": KeyCtrlF, // not reported by HTML- need to do special check "Ctrl-g": KeyCtrlG, // not reported by HTML- need to do special check "Ctrl-j": KeyCtrlJ, // not reported by HTML- need to do special check "Ctrl-k": KeyCtrlK, // not reported by HTML- need to do special check "Ctrl-l": KeyCtrlL, // not reported by HTML- need to do special check "Ctrl-n": KeyCtrlN, // not reported by HTML- need to do special check "Ctrl-o": KeyCtrlO, // not reported by HTML- need to do special check "Ctrl-p": KeyCtrlP, // not reported by HTML- need to do special check "Ctrl-q": KeyCtrlQ, // not reported by HTML- need to do special check "Ctrl-r": KeyCtrlR, // not reported by HTML- need to do special check "Ctrl-s": KeyCtrlS, // not reported by HTML- need to do special check "Ctrl-t": KeyCtrlT, // not reported by HTML- need to do special check "Ctrl-u": KeyCtrlU, // not reported by HTML- need to do special check "Ctrl-v": KeyCtrlV, // not reported by HTML- need to do special check "Ctrl-w": KeyCtrlW, // not reported by HTML- need to do special check "Ctrl-x": KeyCtrlX, // not reported by HTML- need to do special check "Ctrl-y": KeyCtrlY, // not reported by HTML- need to do special check "Ctrl-z": KeyCtrlZ, // not reported by HTML- need to do special check "Ctrl- ": KeyCtrlSpace, // not reported by HTML- need to do special check "Ctrl-_": KeyCtrlUnderscore, // not reported by HTML- need to do special check "Ctrl-]": KeyCtrlRightSq, // not reported by HTML- need to do special check "Ctrl-\\": KeyCtrlBackslash, // not reported by HTML- need to do special check "Ctrl-^": KeyCtrlCarat, // not reported by HTML- need to do special check } var curStyleClasses = map[CursorStyle]string{ CursorStyleDefault: "cursor-blinking-block", CursorStyleBlinkingBlock: "cursor-blinking-block", CursorStyleSteadyBlock: "cursor-steady-block", CursorStyleBlinkingUnderline: "cursor-blinking-underline", CursorStyleSteadyUnderline: "cursor-steady-underline", CursorStyleBlinkingBar: "cursor-blinking-bar", CursorStyleSteadyBar: "cursor-steady-bar", } func LookupTerminfo(name string) (ti *terminfo.Terminfo, e error) { return nil, errors.New("LookupTermInfo not supported") } ================================================ FILE: vendor/github.com/go-errors/errors/.travis.yml ================================================ language: go go: - "1.8.x" - "1.11.x" - "1.16.x" - "1.21.x" ================================================ FILE: vendor/github.com/go-errors/errors/LICENSE.MIT ================================================ Copyright (c) 2015 Conrad Irwin 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. ================================================ FILE: vendor/github.com/go-errors/errors/README.md ================================================ go-errors/errors ================ [![Build Status](https://travis-ci.org/go-errors/errors.svg?branch=master)](https://travis-ci.org/go-errors/errors) Package errors adds stacktrace support to errors in go. This is particularly useful when you want to understand the state of execution when an error was returned unexpectedly. It provides the type \*Error which implements the standard golang error interface, so you can use this library interchangeably with code that is expecting a normal error return. Usage ----- Full documentation is available on [godoc](https://godoc.org/github.com/go-errors/errors), but here's a simple example: ```go package crashy import "github.com/go-errors/errors" var Crashed = errors.Errorf("oh dear") func Crash() error { return errors.New(Crashed) } ``` This can be called as follows: ```go package main import ( "crashy" "fmt" "github.com/go-errors/errors" ) func main() { err := crashy.Crash() if err != nil { if errors.Is(err, crashy.Crashed) { fmt.Println(err.(*errors.Error).ErrorStack()) } else { panic(err) } } } ``` Meta-fu ------- This package was original written to allow reporting to [Bugsnag](https://bugsnag.com/) from [bugsnag-go](https://github.com/bugsnag/bugsnag-go), but after I found similar packages by Facebook and Dropbox, it was moved to one canonical location so everyone can benefit. This package is licensed under the MIT license, see LICENSE.MIT for details. ## Changelog * v1.1.0 updated to use go1.13's standard-library errors.Is method instead of == in errors.Is * v1.2.0 added `errors.As` from the standard library. * v1.3.0 *BREAKING* updated error methods to return `error` instead of `*Error`. > Code that needs access to the underlying `*Error` can use the new errors.AsError(e) > ``` > // before > errors.New(err).ErrorStack() > // after >. errors.AsError(errors.Wrap(err)).ErrorStack() > ``` * v1.4.0 *BREAKING* v1.4.0 reverted all changes from v1.3.0 and is identical to v1.2.0 * v1.4.1 no code change, but now without an unnecessary cover.out file. * v1.4.2 performance improvement to ErrorStack() to avoid unnecessary work https://github.com/go-errors/errors/pull/40 * v1.5.0 add errors.Join() and errors.Unwrap() copying the stdlib https://github.com/go-errors/errors/pull/40 * v1.5.1 fix build on go1.13..go1.19 (broken by adding Join and Unwrap with wrong build constraints) ================================================ FILE: vendor/github.com/go-errors/errors/error.go ================================================ // Package errors provides errors that have stack-traces. // // This is particularly useful when you want to understand the // state of execution when an error was returned unexpectedly. // // It provides the type *Error which implements the standard // golang error interface, so you can use this library interchangably // with code that is expecting a normal error return. // // For example: // // package crashy // // import "github.com/go-errors/errors" // // var Crashed = errors.Errorf("oh dear") // // func Crash() error { // return errors.New(Crashed) // } // // This can be called as follows: // // package main // // import ( // "crashy" // "fmt" // "github.com/go-errors/errors" // ) // // func main() { // err := crashy.Crash() // if err != nil { // if errors.Is(err, crashy.Crashed) { // fmt.Println(err.(*errors.Error).ErrorStack()) // } else { // panic(err) // } // } // } // // This package was original written to allow reporting to Bugsnag, // but after I found similar packages by Facebook and Dropbox, it // was moved to one canonical location so everyone can benefit. package errors import ( "bytes" "fmt" "reflect" "runtime" ) // The maximum number of stackframes on any error. var MaxStackDepth = 50 // Error is an error with an attached stacktrace. It can be used // wherever the builtin error interface is expected. type Error struct { Err error stack []uintptr frames []StackFrame prefix string } // New makes an Error from the given value. If that value is already an // error then it will be used directly, if not, it will be passed to // fmt.Errorf("%v"). The stacktrace will point to the line of code that // called New. func New(e interface{}) *Error { var err error switch e := e.(type) { case error: err = e default: err = fmt.Errorf("%v", e) } stack := make([]uintptr, MaxStackDepth) length := runtime.Callers(2, stack[:]) return &Error{ Err: err, stack: stack[:length], } } // Wrap makes an Error from the given value. If that value is already an // error then it will be used directly, if not, it will be passed to // fmt.Errorf("%v"). The skip parameter indicates how far up the stack // to start the stacktrace. 0 is from the current call, 1 from its caller, etc. func Wrap(e interface{}, skip int) *Error { if e == nil { return nil } var err error switch e := e.(type) { case *Error: return e case error: err = e default: err = fmt.Errorf("%v", e) } stack := make([]uintptr, MaxStackDepth) length := runtime.Callers(2+skip, stack[:]) return &Error{ Err: err, stack: stack[:length], } } // WrapPrefix makes an Error from the given value. If that value is already an // error then it will be used directly, if not, it will be passed to // fmt.Errorf("%v"). The prefix parameter is used to add a prefix to the // error message when calling Error(). The skip parameter indicates how far // up the stack to start the stacktrace. 0 is from the current call, // 1 from its caller, etc. func WrapPrefix(e interface{}, prefix string, skip int) *Error { if e == nil { return nil } err := Wrap(e, 1+skip) if err.prefix != "" { prefix = fmt.Sprintf("%s: %s", prefix, err.prefix) } return &Error{ Err: err.Err, stack: err.stack, prefix: prefix, } } // Errorf creates a new error with the given message. You can use it // as a drop-in replacement for fmt.Errorf() to provide descriptive // errors in return values. func Errorf(format string, a ...interface{}) *Error { return Wrap(fmt.Errorf(format, a...), 1) } // Error returns the underlying error's message. func (err *Error) Error() string { msg := err.Err.Error() if err.prefix != "" { msg = fmt.Sprintf("%s: %s", err.prefix, msg) } return msg } // Stack returns the callstack formatted the same way that go does // in runtime/debug.Stack() func (err *Error) Stack() []byte { buf := bytes.Buffer{} for _, frame := range err.StackFrames() { buf.WriteString(frame.String()) } return buf.Bytes() } // Callers satisfies the bugsnag ErrorWithCallerS() interface // so that the stack can be read out. func (err *Error) Callers() []uintptr { return err.stack } // ErrorStack returns a string that contains both the // error message and the callstack. func (err *Error) ErrorStack() string { return err.TypeName() + " " + err.Error() + "\n" + string(err.Stack()) } // StackFrames returns an array of frames containing information about the // stack. func (err *Error) StackFrames() []StackFrame { if err.frames == nil { err.frames = make([]StackFrame, len(err.stack)) for i, pc := range err.stack { err.frames[i] = NewStackFrame(pc) } } return err.frames } // TypeName returns the type this error. e.g. *errors.stringError. func (err *Error) TypeName() string { if _, ok := err.Err.(uncaughtPanic); ok { return "panic" } return reflect.TypeOf(err.Err).String() } // Return the wrapped error (implements api for As function). func (err *Error) Unwrap() error { return err.Err } ================================================ FILE: vendor/github.com/go-errors/errors/error_1_13.go ================================================ //go:build go1.13 // +build go1.13 package errors import ( baseErrors "errors" ) // As finds the first error in err's tree that matches target, and if one is found, sets // target to that error value and returns true. Otherwise, it returns false. // // For more information see stdlib errors.As. func As(err error, target interface{}) bool { return baseErrors.As(err, target) } // Is detects whether the error is equal to a given error. Errors // are considered equal by this function if they are matched by errors.Is // or if their contained errors are matched through errors.Is. func Is(e error, original error) bool { if baseErrors.Is(e, original) { return true } if e, ok := e.(*Error); ok { return Is(e.Err, original) } if original, ok := original.(*Error); ok { return Is(e, original.Err) } return false } ================================================ FILE: vendor/github.com/go-errors/errors/error_backward.go ================================================ //go:build !go1.13 // +build !go1.13 package errors import ( "reflect" ) type unwrapper interface { Unwrap() error } // As assigns error or any wrapped error to the value target points // to. If there is no value of the target type of target As returns // false. func As(err error, target interface{}) bool { targetType := reflect.TypeOf(target) for { errType := reflect.TypeOf(err) if errType == nil { return false } if reflect.PtrTo(errType) == targetType { reflect.ValueOf(target).Elem().Set(reflect.ValueOf(err)) return true } wrapped, ok := err.(unwrapper) if ok { err = wrapped.Unwrap() } else { return false } } } // Is detects whether the error is equal to a given error. Errors // are considered equal by this function if they are the same object, // or if they both contain the same error inside an errors.Error. func Is(e error, original error) bool { if e == original { return true } if e, ok := e.(*Error); ok { return Is(e.Err, original) } if original, ok := original.(*Error); ok { return Is(e, original.Err) } return false } // Disclaimer: functions Join and Unwrap are copied from the stdlib errors // package v1.21.0. // Join returns an error that wraps the given errors. // Any nil error values are discarded. // Join returns nil if every value in errs is nil. // The error formats as the concatenation of the strings obtained // by calling the Error method of each element of errs, with a newline // between each string. // // A non-nil error returned by Join implements the Unwrap() []error method. func Join(errs ...error) error { n := 0 for _, err := range errs { if err != nil { n++ } } if n == 0 { return nil } e := &joinError{ errs: make([]error, 0, n), } for _, err := range errs { if err != nil { e.errs = append(e.errs, err) } } return e } type joinError struct { errs []error } func (e *joinError) Error() string { var b []byte for i, err := range e.errs { if i > 0 { b = append(b, '\n') } b = append(b, err.Error()...) } return string(b) } func (e *joinError) Unwrap() []error { return e.errs } // Unwrap returns the result of calling the Unwrap method on err, if err's // type contains an Unwrap method returning error. // Otherwise, Unwrap returns nil. // // Unwrap only calls a method of the form "Unwrap() error". // In particular Unwrap does not unwrap errors returned by [Join]. func Unwrap(err error) error { u, ok := err.(interface { Unwrap() error }) if !ok { return nil } return u.Unwrap() } ================================================ FILE: vendor/github.com/go-errors/errors/join_unwrap_1_20.go ================================================ //go:build go1.20 // +build go1.20 package errors import baseErrors "errors" // Join returns an error that wraps the given errors. // Any nil error values are discarded. // Join returns nil if every value in errs is nil. // The error formats as the concatenation of the strings obtained // by calling the Error method of each element of errs, with a newline // between each string. // // A non-nil error returned by Join implements the Unwrap() []error method. // // For more information see stdlib errors.Join. func Join(errs ...error) error { return baseErrors.Join(errs...) } // Unwrap returns the result of calling the Unwrap method on err, if err's // type contains an Unwrap method returning error. // Otherwise, Unwrap returns nil. // // Unwrap only calls a method of the form "Unwrap() error". // In particular Unwrap does not unwrap errors returned by [Join]. // // For more information see stdlib errors.Unwrap. func Unwrap(err error) error { return baseErrors.Unwrap(err) } ================================================ FILE: vendor/github.com/go-errors/errors/join_unwrap_backward.go ================================================ //go:build !go1.20 // +build !go1.20 package errors // Disclaimer: functions Join and Unwrap are copied from the stdlib errors // package v1.21.0. // Join returns an error that wraps the given errors. // Any nil error values are discarded. // Join returns nil if every value in errs is nil. // The error formats as the concatenation of the strings obtained // by calling the Error method of each element of errs, with a newline // between each string. // // A non-nil error returned by Join implements the Unwrap() []error method. func Join(errs ...error) error { n := 0 for _, err := range errs { if err != nil { n++ } } if n == 0 { return nil } e := &joinError{ errs: make([]error, 0, n), } for _, err := range errs { if err != nil { e.errs = append(e.errs, err) } } return e } type joinError struct { errs []error } func (e *joinError) Error() string { var b []byte for i, err := range e.errs { if i > 0 { b = append(b, '\n') } b = append(b, err.Error()...) } return string(b) } func (e *joinError) Unwrap() []error { return e.errs } // Unwrap returns the result of calling the Unwrap method on err, if err's // type contains an Unwrap method returning error. // Otherwise, Unwrap returns nil. // // Unwrap only calls a method of the form "Unwrap() error". // In particular Unwrap does not unwrap errors returned by [Join]. func Unwrap(err error) error { u, ok := err.(interface { Unwrap() error }) if !ok { return nil } return u.Unwrap() } ================================================ FILE: vendor/github.com/go-errors/errors/parse_panic.go ================================================ package errors import ( "strconv" "strings" ) type uncaughtPanic struct{ message string } func (p uncaughtPanic) Error() string { return p.message } // ParsePanic allows you to get an error object from the output of a go program // that panicked. This is particularly useful with https://github.com/mitchellh/panicwrap. func ParsePanic(text string) (*Error, error) { lines := strings.Split(text, "\n") state := "start" var message string var stack []StackFrame for i := 0; i < len(lines); i++ { line := lines[i] if state == "start" { if strings.HasPrefix(line, "panic: ") { message = strings.TrimPrefix(line, "panic: ") state = "seek" } else { return nil, Errorf("bugsnag.panicParser: Invalid line (no prefix): %s", line) } } else if state == "seek" { if strings.HasPrefix(line, "goroutine ") && strings.HasSuffix(line, "[running]:") { state = "parsing" } } else if state == "parsing" { if line == "" { state = "done" break } createdBy := false if strings.HasPrefix(line, "created by ") { line = strings.TrimPrefix(line, "created by ") createdBy = true } i++ if i >= len(lines) { return nil, Errorf("bugsnag.panicParser: Invalid line (unpaired): %s", line) } frame, err := parsePanicFrame(line, lines[i], createdBy) if err != nil { return nil, err } stack = append(stack, *frame) if createdBy { state = "done" break } } } if state == "done" || state == "parsing" { return &Error{Err: uncaughtPanic{message}, frames: stack}, nil } return nil, Errorf("could not parse panic: %v", text) } // The lines we're passing look like this: // // main.(*foo).destruct(0xc208067e98) // /0/go/src/github.com/bugsnag/bugsnag-go/pan/main.go:22 +0x151 func parsePanicFrame(name string, line string, createdBy bool) (*StackFrame, error) { idx := strings.LastIndex(name, "(") if idx == -1 && !createdBy { return nil, Errorf("bugsnag.panicParser: Invalid line (no call): %s", name) } if idx != -1 { name = name[:idx] } pkg := "" if lastslash := strings.LastIndex(name, "/"); lastslash >= 0 { pkg += name[:lastslash] + "/" name = name[lastslash+1:] } if period := strings.Index(name, "."); period >= 0 { pkg += name[:period] name = name[period+1:] } name = strings.Replace(name, "·", ".", -1) if !strings.HasPrefix(line, "\t") { return nil, Errorf("bugsnag.panicParser: Invalid line (no tab): %s", line) } idx = strings.LastIndex(line, ":") if idx == -1 { return nil, Errorf("bugsnag.panicParser: Invalid line (no line number): %s", line) } file := line[1:idx] number := line[idx+1:] if idx = strings.Index(number, " +"); idx > -1 { number = number[:idx] } lno, err := strconv.ParseInt(number, 10, 32) if err != nil { return nil, Errorf("bugsnag.panicParser: Invalid line (bad line number): %s", line) } return &StackFrame{ File: file, LineNumber: int(lno), Package: pkg, Name: name, }, nil } ================================================ FILE: vendor/github.com/go-errors/errors/stackframe.go ================================================ package errors import ( "bufio" "bytes" "fmt" "os" "runtime" "strings" ) // A StackFrame contains all necessary information about to generate a line // in a callstack. type StackFrame struct { // The path to the file containing this ProgramCounter File string // The LineNumber in that file LineNumber int // The Name of the function that contains this ProgramCounter Name string // The Package that contains this function Package string // The underlying ProgramCounter ProgramCounter uintptr } // NewStackFrame popoulates a stack frame object from the program counter. func NewStackFrame(pc uintptr) (frame StackFrame) { frame = StackFrame{ProgramCounter: pc} if frame.Func() == nil { return } frame.Package, frame.Name = packageAndName(frame.Func()) // pc -1 because the program counters we use are usually return addresses, // and we want to show the line that corresponds to the function call frame.File, frame.LineNumber = frame.Func().FileLine(pc - 1) return } // Func returns the function that contained this frame. func (frame *StackFrame) Func() *runtime.Func { if frame.ProgramCounter == 0 { return nil } return runtime.FuncForPC(frame.ProgramCounter) } // String returns the stackframe formatted in the same way as go does // in runtime/debug.Stack() func (frame *StackFrame) String() string { str := fmt.Sprintf("%s:%d (0x%x)\n", frame.File, frame.LineNumber, frame.ProgramCounter) source, err := frame.sourceLine() if err != nil { return str } return str + fmt.Sprintf("\t%s: %s\n", frame.Name, source) } // SourceLine gets the line of code (from File and Line) of the original source if possible. func (frame *StackFrame) SourceLine() (string, error) { source, err := frame.sourceLine() if err != nil { return source, New(err) } return source, err } func (frame *StackFrame) sourceLine() (string, error) { if frame.LineNumber <= 0 { return "???", nil } file, err := os.Open(frame.File) if err != nil { return "", err } defer file.Close() scanner := bufio.NewScanner(file) currentLine := 1 for scanner.Scan() { if currentLine == frame.LineNumber { return string(bytes.Trim(scanner.Bytes(), " \t")), nil } currentLine++ } if err := scanner.Err(); err != nil { return "", err } return "???", nil } func packageAndName(fn *runtime.Func) (string, string) { name := fn.Name() pkg := "" // The name includes the path name to the package, which is unnecessary // since the file name is already included. Plus, it has center dots. // That is, we see // runtime/debug.*T·ptrmethod // and want // *T.ptrmethod // Since the package path might contains dots (e.g. code.google.com/...), // we first remove the path prefix if there is one. if lastslash := strings.LastIndex(name, "/"); lastslash >= 0 { pkg += name[:lastslash] + "/" name = name[lastslash+1:] } if period := strings.Index(name, "."); period >= 0 { pkg += name[:period] name = name[period+1:] } name = strings.Replace(name, "·", ".", -1) return pkg, name } ================================================ FILE: vendor/github.com/go-logr/logr/.golangci.yaml ================================================ run: timeout: 1m tests: true linters: disable-all: true enable: - asciicheck - errcheck - forcetypeassert - gocritic - gofmt - goimports - gosimple - govet - ineffassign - misspell - revive - staticcheck - typecheck - unused issues: exclude-use-default: false max-issues-per-linter: 0 max-same-issues: 10 ================================================ FILE: vendor/github.com/go-logr/logr/CHANGELOG.md ================================================ # CHANGELOG ## v1.0.0-rc1 This is the first logged release. Major changes (including breaking changes) have occurred since earlier tags. ================================================ FILE: vendor/github.com/go-logr/logr/CONTRIBUTING.md ================================================ # Contributing Logr is open to pull-requests, provided they fit within the intended scope of the project. Specifically, this library aims to be VERY small and minimalist, with no external dependencies. ## Compatibility This project intends to follow [semantic versioning](http://semver.org) and is very strict about compatibility. Any proposed changes MUST follow those rules. ## Performance As a logging library, logr must be as light-weight as possible. Any proposed code change must include results of running the [benchmark](./benchmark) before and after the change. ================================================ FILE: vendor/github.com/go-logr/logr/LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor 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, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/github.com/go-logr/logr/README.md ================================================ # A minimal logging API for Go [![Go Reference](https://pkg.go.dev/badge/github.com/go-logr/logr.svg)](https://pkg.go.dev/github.com/go-logr/logr) [![Go Report Card](https://goreportcard.com/badge/github.com/go-logr/logr)](https://goreportcard.com/report/github.com/go-logr/logr) [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/go-logr/logr/badge)](https://securityscorecards.dev/viewer/?platform=github.com&org=go-logr&repo=logr) logr offers an(other) opinion on how Go programs and libraries can do logging without becoming coupled to a particular logging implementation. This is not an implementation of logging - it is an API. In fact it is two APIs with two different sets of users. The `Logger` type is intended for application and library authors. It provides a relatively small API which can be used everywhere you want to emit logs. It defers the actual act of writing logs (to files, to stdout, or whatever) to the `LogSink` interface. The `LogSink` interface is intended for logging library implementers. It is a pure interface which can be implemented by logging frameworks to provide the actual logging functionality. This decoupling allows application and library developers to write code in terms of `logr.Logger` (which has very low dependency fan-out) while the implementation of logging is managed "up stack" (e.g. in or near `main()`.) Application developers can then switch out implementations as necessary. Many people assert that libraries should not be logging, and as such efforts like this are pointless. Those people are welcome to convince the authors of the tens-of-thousands of libraries that *DO* write logs that they are all wrong. In the meantime, logr takes a more practical approach. ## Typical usage Somewhere, early in an application's life, it will make a decision about which logging library (implementation) it actually wants to use. Something like: ``` func main() { // ... other setup code ... // Create the "root" logger. We have chosen the "logimpl" implementation, // which takes some initial parameters and returns a logr.Logger. logger := logimpl.New(param1, param2) // ... other setup code ... ``` Most apps will call into other libraries, create structures to govern the flow, etc. The `logr.Logger` object can be passed to these other libraries, stored in structs, or even used as a package-global variable, if needed. For example: ``` app := createTheAppObject(logger) app.Run() ``` Outside of this early setup, no other packages need to know about the choice of implementation. They write logs in terms of the `logr.Logger` that they received: ``` type appObject struct { // ... other fields ... logger logr.Logger // ... other fields ... } func (app *appObject) Run() { app.logger.Info("starting up", "timestamp", time.Now()) // ... app code ... ``` ## Background If the Go standard library had defined an interface for logging, this project probably would not be needed. Alas, here we are. When the Go developers started developing such an interface with [slog](https://github.com/golang/go/issues/56345), they adopted some of the logr design but also left out some parts and changed others: | Feature | logr | slog | |---------|------|------| | High-level API | `Logger` (passed by value) | `Logger` (passed by [pointer](https://github.com/golang/go/issues/59126)) | | Low-level API | `LogSink` | `Handler` | | Stack unwinding | done by `LogSink` | done by `Logger` | | Skipping helper functions | `WithCallDepth`, `WithCallStackHelper` | [not supported by Logger](https://github.com/golang/go/issues/59145) | | Generating a value for logging on demand | `Marshaler` | `LogValuer` | | Log levels | >= 0, higher meaning "less important" | positive and negative, with 0 for "info" and higher meaning "more important" | | Error log entries | always logged, don't have a verbosity level | normal log entries with level >= `LevelError` | | Passing logger via context | `NewContext`, `FromContext` | no API | | Adding a name to a logger | `WithName` | no API | | Modify verbosity of log entries in a call chain | `V` | no API | | Grouping of key/value pairs | not supported | `WithGroup`, `GroupValue` | | Pass context for extracting additional values | no API | API variants like `InfoCtx` | The high-level slog API is explicitly meant to be one of many different APIs that can be layered on top of a shared `slog.Handler`. logr is one such alternative API, with [interoperability](#slog-interoperability) provided by some conversion functions. ### Inspiration Before you consider this package, please read [this blog post by the inimitable Dave Cheney][warning-makes-no-sense]. We really appreciate what he has to say, and it largely aligns with our own experiences. ### Differences from Dave's ideas The main differences are: 1. Dave basically proposes doing away with the notion of a logging API in favor of `fmt.Printf()`. We disagree, especially when you consider things like output locations, timestamps, file and line decorations, and structured logging. This package restricts the logging API to just 2 types of logs: info and error. Info logs are things you want to tell the user which are not errors. Error logs are, well, errors. If your code receives an `error` from a subordinate function call and is logging that `error` *and not returning it*, use error logs. 2. Verbosity-levels on info logs. This gives developers a chance to indicate arbitrary grades of importance for info logs, without assigning names with semantic meaning such as "warning", "trace", and "debug." Superficially this may feel very similar, but the primary difference is the lack of semantics. Because verbosity is a numerical value, it's safe to assume that an app running with higher verbosity means more (and less important) logs will be generated. ## Implementations (non-exhaustive) There are implementations for the following logging libraries: - **a function** (can bridge to non-structured libraries): [funcr](https://github.com/go-logr/logr/tree/master/funcr) - **a testing.T** (for use in Go tests, with JSON-like output): [testr](https://github.com/go-logr/logr/tree/master/testr) - **github.com/google/glog**: [glogr](https://github.com/go-logr/glogr) - **k8s.io/klog** (for Kubernetes): [klogr](https://git.k8s.io/klog/klogr) - **a testing.T** (with klog-like text output): [ktesting](https://git.k8s.io/klog/ktesting) - **go.uber.org/zap**: [zapr](https://github.com/go-logr/zapr) - **log** (the Go standard library logger): [stdr](https://github.com/go-logr/stdr) - **github.com/sirupsen/logrus**: [logrusr](https://github.com/bombsimon/logrusr) - **github.com/wojas/genericr**: [genericr](https://github.com/wojas/genericr) (makes it easy to implement your own backend) - **logfmt** (Heroku style [logging](https://www.brandur.org/logfmt)): [logfmtr](https://github.com/iand/logfmtr) - **github.com/rs/zerolog**: [zerologr](https://github.com/go-logr/zerologr) - **github.com/go-kit/log**: [gokitlogr](https://github.com/tonglil/gokitlogr) (also compatible with github.com/go-kit/kit/log since v0.12.0) - **bytes.Buffer** (writing to a buffer): [bufrlogr](https://github.com/tonglil/buflogr) (useful for ensuring values were logged, like during testing) ## slog interoperability Interoperability goes both ways, using the `logr.Logger` API with a `slog.Handler` and using the `slog.Logger` API with a `logr.LogSink`. `FromSlogHandler` and `ToSlogHandler` convert between a `logr.Logger` and a `slog.Handler`. As usual, `slog.New` can be used to wrap such a `slog.Handler` in the high-level slog API. ### Using a `logr.LogSink` as backend for slog Ideally, a logr sink implementation should support both logr and slog by implementing both the normal logr interface(s) and `SlogSink`. Because of a conflict in the parameters of the common `Enabled` method, it is [not possible to implement both slog.Handler and logr.Sink in the same type](https://github.com/golang/go/issues/59110). If both are supported, log calls can go from the high-level APIs to the backend without the need to convert parameters. `FromSlogHandler` and `ToSlogHandler` can convert back and forth without adding additional wrappers, with one exception: when `Logger.V` was used to adjust the verbosity for a `slog.Handler`, then `ToSlogHandler` has to use a wrapper which adjusts the verbosity for future log calls. Such an implementation should also support values that implement specific interfaces from both packages for logging (`logr.Marshaler`, `slog.LogValuer`, `slog.GroupValue`). logr does not convert those. Not supporting slog has several drawbacks: - Recording source code locations works correctly if the handler gets called through `slog.Logger`, but may be wrong in other cases. That's because a `logr.Sink` does its own stack unwinding instead of using the program counter provided by the high-level API. - slog levels <= 0 can be mapped to logr levels by negating the level without a loss of information. But all slog levels > 0 (e.g. `slog.LevelWarning` as used by `slog.Logger.Warn`) must be mapped to 0 before calling the sink because logr does not support "more important than info" levels. - The slog group concept is supported by prefixing each key in a key/value pair with the group names, separated by a dot. For structured output like JSON it would be better to group the key/value pairs inside an object. - Special slog values and interfaces don't work as expected. - The overhead is likely to be higher. These drawbacks are severe enough that applications using a mixture of slog and logr should switch to a different backend. ### Using a `slog.Handler` as backend for logr Using a plain `slog.Handler` without support for logr works better than the other direction: - All logr verbosity levels can be mapped 1:1 to their corresponding slog level by negating them. - Stack unwinding is done by the `SlogSink` and the resulting program counter is passed to the `slog.Handler`. - Names added via `Logger.WithName` are gathered and recorded in an additional attribute with `logger` as key and the names separated by slash as value. - `Logger.Error` is turned into a log record with `slog.LevelError` as level and an additional attribute with `err` as key, if an error was provided. The main drawback is that `logr.Marshaler` will not be supported. Types should ideally support both `logr.Marshaler` and `slog.Valuer`. If compatibility with logr implementations without slog support is not important, then `slog.Valuer` is sufficient. ### Context support for slog Storing a logger in a `context.Context` is not supported by slog. `NewContextWithSlogLogger` and `FromContextAsSlogLogger` can be used to fill this gap. They store and retrieve a `slog.Logger` pointer under the same context key that is also used by `NewContext` and `FromContext` for `logr.Logger` value. When `NewContextWithSlogLogger` is followed by `FromContext`, the latter will automatically convert the `slog.Logger` to a `logr.Logger`. `FromContextAsSlogLogger` does the same for the other direction. With this approach, binaries which use either slog or logr are as efficient as possible with no unnecessary allocations. This is also why the API stores a `slog.Logger` pointer: when storing a `slog.Handler`, creating a `slog.Logger` on retrieval would need to allocate one. The downside is that switching back and forth needs more allocations. Because logr is the API that is already in use by different packages, in particular Kubernetes, the recommendation is to use the `logr.Logger` API in code which uses contextual logging. An alternative to adding values to a logger and storing that logger in the context is to store the values in the context and to configure a logging backend to extract those values when emitting log entries. This only works when log calls are passed the context, which is not supported by the logr API. With the slog API, it is possible, but not required. https://github.com/veqryn/slog-context is a package for slog which provides additional support code for this approach. It also contains wrappers for the context functions in logr, so developers who prefer to not use the logr APIs directly can use those instead and the resulting code will still be interoperable with logr. ## FAQ ### Conceptual #### Why structured logging? - **Structured logs are more easily queryable**: Since you've got key-value pairs, it's much easier to query your structured logs for particular values by filtering on the contents of a particular key -- think searching request logs for error codes, Kubernetes reconcilers for the name and namespace of the reconciled object, etc. - **Structured logging makes it easier to have cross-referenceable logs**: Similarly to searchability, if you maintain conventions around your keys, it becomes easy to gather all log lines related to a particular concept. - **Structured logs allow better dimensions of filtering**: if you have structure to your logs, you've got more precise control over how much information is logged -- you might choose in a particular configuration to log certain keys but not others, only log lines where a certain key matches a certain value, etc., instead of just having v-levels and names to key off of. - **Structured logs better represent structured data**: sometimes, the data that you want to log is inherently structured (think tuple-link objects.) Structured logs allow you to preserve that structure when outputting. #### Why V-levels? **V-levels give operators an easy way to control the chattiness of log operations**. V-levels provide a way for a given package to distinguish the relative importance or verbosity of a given log message. Then, if a particular logger or package is logging too many messages, the user of the package can simply change the v-levels for that library. #### Why not named levels, like Info/Warning/Error? Read [Dave Cheney's post][warning-makes-no-sense]. Then read [Differences from Dave's ideas](#differences-from-daves-ideas). #### Why not allow format strings, too? **Format strings negate many of the benefits of structured logs**: - They're not easily searchable without resorting to fuzzy searching, regular expressions, etc. - They don't store structured data well, since contents are flattened into a string. - They're not cross-referenceable. - They don't compress easily, since the message is not constant. (Unless you turn positional parameters into key-value pairs with numerical keys, at which point you've gotten key-value logging with meaningless keys.) ### Practical #### Why key-value pairs, and not a map? Key-value pairs are *much* easier to optimize, especially around allocations. Zap (a structured logger that inspired logr's interface) has [performance measurements](https://github.com/uber-go/zap#performance) that show this quite nicely. While the interface ends up being a little less obvious, you get potentially better performance, plus avoid making users type `map[string]string{}` every time they want to log. #### What if my V-levels differ between libraries? That's fine. Control your V-levels on a per-logger basis, and use the `WithName` method to pass different loggers to different libraries. Generally, you should take care to ensure that you have relatively consistent V-levels within a given logger, however, as this makes deciding on what verbosity of logs to request easier. #### But I really want to use a format string! That's not actually a question. Assuming your question is "how do I convert my mental model of logging with format strings to logging with constant messages": 1. Figure out what the error actually is, as you'd write in a TL;DR style, and use that as a message. 2. For every place you'd write a format specifier, look to the word before it, and add that as a key value pair. For instance, consider the following examples (all taken from spots in the Kubernetes codebase): - `klog.V(4).Infof("Client is returning errors: code %v, error %v", responseCode, err)` becomes `logger.Error(err, "client returned an error", "code", responseCode)` - `klog.V(4).Infof("Got a Retry-After %ds response for attempt %d to %v", seconds, retries, url)` becomes `logger.V(4).Info("got a retry-after response when requesting url", "attempt", retries, "after seconds", seconds, "url", url)` If you *really* must use a format string, use it in a key's value, and call `fmt.Sprintf` yourself. For instance: `log.Printf("unable to reflect over type %T")` becomes `logger.Info("unable to reflect over type", "type", fmt.Sprintf("%T"))`. In general though, the cases where this is necessary should be few and far between. #### How do I choose my V-levels? This is basically the only hard constraint: increase V-levels to denote more verbose or more debug-y logs. Otherwise, you can start out with `0` as "you always want to see this", `1` as "common logging that you might *possibly* want to turn off", and `10` as "I would like to performance-test your log collection stack." Then gradually choose levels in between as you need them, working your way down from 10 (for debug and trace style logs) and up from 1 (for chattier info-type logs). For reference, slog pre-defines -4 for debug logs (corresponds to 4 in logr), which matches what is [recommended for Kubernetes](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/logging.md#what-method-to-use). #### How do I choose my keys? Keys are fairly flexible, and can hold more or less any string value. For best compatibility with implementations and consistency with existing code in other projects, there are a few conventions you should consider. - Make your keys human-readable. - Constant keys are generally a good idea. - Be consistent across your codebase. - Keys should naturally match parts of the message string. - Use lower case for simple keys and [lowerCamelCase](https://en.wiktionary.org/wiki/lowerCamelCase) for more complex ones. Kubernetes is one example of a project that has [adopted that convention](https://github.com/kubernetes/community/blob/HEAD/contributors/devel/sig-instrumentation/migration-to-structured-logging.md#name-arguments). While key names are mostly unrestricted (and spaces are acceptable), it's generally a good idea to stick to printable ascii characters, or at least match the general character set of your log lines. #### Why should keys be constant values? The point of structured logging is to make later log processing easier. Your keys are, effectively, the schema of each log message. If you use different keys across instances of the same log line, you will make your structured logs much harder to use. `Sprintf()` is for values, not for keys! #### Why is this not a pure interface? The Logger type is implemented as a struct in order to allow the Go compiler to optimize things like high-V `Info` logs that are not triggered. Not all of these implementations are implemented yet, but this structure was suggested as a way to ensure they *can* be implemented. All of the real work is behind the `LogSink` interface. [warning-makes-no-sense]: http://dave.cheney.net/2015/11/05/lets-talk-about-logging ================================================ FILE: vendor/github.com/go-logr/logr/SECURITY.md ================================================ # Security Policy If you have discovered a security vulnerability in this project, please report it privately. **Do not disclose it as a public issue.** This gives us time to work with you to fix the issue before public exposure, reducing the chance that the exploit will be used before a patch is released. You may submit the report in the following ways: - send an email to go-logr-security@googlegroups.com - send us a [private vulnerability report](https://github.com/go-logr/logr/security/advisories/new) Please provide the following information in your report: - A description of the vulnerability and its impact - How to reproduce the issue We ask that you give us 90 days to work on a fix before public exposure. ================================================ FILE: vendor/github.com/go-logr/logr/context.go ================================================ /* Copyright 2023 The logr Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package logr // contextKey is how we find Loggers in a context.Context. With Go < 1.21, // the value is always a Logger value. With Go >= 1.21, the value can be a // Logger value or a slog.Logger pointer. type contextKey struct{} // notFoundError exists to carry an IsNotFound method. type notFoundError struct{} func (notFoundError) Error() string { return "no logr.Logger was present" } func (notFoundError) IsNotFound() bool { return true } ================================================ FILE: vendor/github.com/go-logr/logr/context_noslog.go ================================================ //go:build !go1.21 // +build !go1.21 /* Copyright 2019 The logr Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package logr import ( "context" ) // FromContext returns a Logger from ctx or an error if no Logger is found. func FromContext(ctx context.Context) (Logger, error) { if v, ok := ctx.Value(contextKey{}).(Logger); ok { return v, nil } return Logger{}, notFoundError{} } // FromContextOrDiscard returns a Logger from ctx. If no Logger is found, this // returns a Logger that discards all log messages. func FromContextOrDiscard(ctx context.Context) Logger { if v, ok := ctx.Value(contextKey{}).(Logger); ok { return v } return Discard() } // NewContext returns a new Context, derived from ctx, which carries the // provided Logger. func NewContext(ctx context.Context, logger Logger) context.Context { return context.WithValue(ctx, contextKey{}, logger) } ================================================ FILE: vendor/github.com/go-logr/logr/context_slog.go ================================================ //go:build go1.21 // +build go1.21 /* Copyright 2019 The logr Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package logr import ( "context" "fmt" "log/slog" ) // FromContext returns a Logger from ctx or an error if no Logger is found. func FromContext(ctx context.Context) (Logger, error) { v := ctx.Value(contextKey{}) if v == nil { return Logger{}, notFoundError{} } switch v := v.(type) { case Logger: return v, nil case *slog.Logger: return FromSlogHandler(v.Handler()), nil default: // Not reached. panic(fmt.Sprintf("unexpected value type for logr context key: %T", v)) } } // FromContextAsSlogLogger returns a slog.Logger from ctx or nil if no such Logger is found. func FromContextAsSlogLogger(ctx context.Context) *slog.Logger { v := ctx.Value(contextKey{}) if v == nil { return nil } switch v := v.(type) { case Logger: return slog.New(ToSlogHandler(v)) case *slog.Logger: return v default: // Not reached. panic(fmt.Sprintf("unexpected value type for logr context key: %T", v)) } } // FromContextOrDiscard returns a Logger from ctx. If no Logger is found, this // returns a Logger that discards all log messages. func FromContextOrDiscard(ctx context.Context) Logger { if logger, err := FromContext(ctx); err == nil { return logger } return Discard() } // NewContext returns a new Context, derived from ctx, which carries the // provided Logger. func NewContext(ctx context.Context, logger Logger) context.Context { return context.WithValue(ctx, contextKey{}, logger) } // NewContextWithSlogLogger returns a new Context, derived from ctx, which carries the // provided slog.Logger. func NewContextWithSlogLogger(ctx context.Context, logger *slog.Logger) context.Context { return context.WithValue(ctx, contextKey{}, logger) } ================================================ FILE: vendor/github.com/go-logr/logr/discard.go ================================================ /* Copyright 2020 The logr Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package logr // Discard returns a Logger that discards all messages logged to it. It can be // used whenever the caller is not interested in the logs. Logger instances // produced by this function always compare as equal. func Discard() Logger { return New(nil) } ================================================ FILE: vendor/github.com/go-logr/logr/funcr/funcr.go ================================================ /* Copyright 2021 The logr Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Package funcr implements formatting of structured log messages and // optionally captures the call site and timestamp. // // The simplest way to use it is via its implementation of a // github.com/go-logr/logr.LogSink with output through an arbitrary // "write" function. See New and NewJSON for details. // // # Custom LogSinks // // For users who need more control, a funcr.Formatter can be embedded inside // your own custom LogSink implementation. This is useful when the LogSink // needs to implement additional methods, for example. // // # Formatting // // This will respect logr.Marshaler, fmt.Stringer, and error interfaces for // values which are being logged. When rendering a struct, funcr will use Go's // standard JSON tags (all except "string"). package funcr import ( "bytes" "encoding" "encoding/json" "fmt" "path/filepath" "reflect" "runtime" "strconv" "strings" "time" "github.com/go-logr/logr" ) // New returns a logr.Logger which is implemented by an arbitrary function. func New(fn func(prefix, args string), opts Options) logr.Logger { return logr.New(newSink(fn, NewFormatter(opts))) } // NewJSON returns a logr.Logger which is implemented by an arbitrary function // and produces JSON output. func NewJSON(fn func(obj string), opts Options) logr.Logger { fnWrapper := func(_, obj string) { fn(obj) } return logr.New(newSink(fnWrapper, NewFormatterJSON(opts))) } // Underlier exposes access to the underlying logging function. Since // callers only have a logr.Logger, they have to know which // implementation is in use, so this interface is less of an // abstraction and more of a way to test type conversion. type Underlier interface { GetUnderlying() func(prefix, args string) } func newSink(fn func(prefix, args string), formatter Formatter) logr.LogSink { l := &fnlogger{ Formatter: formatter, write: fn, } // For skipping fnlogger.Info and fnlogger.Error. l.Formatter.AddCallDepth(1) return l } // Options carries parameters which influence the way logs are generated. type Options struct { // LogCaller tells funcr to add a "caller" key to some or all log lines. // This has some overhead, so some users might not want it. LogCaller MessageClass // LogCallerFunc tells funcr to also log the calling function name. This // has no effect if caller logging is not enabled (see Options.LogCaller). LogCallerFunc bool // LogTimestamp tells funcr to add a "ts" key to log lines. This has some // overhead, so some users might not want it. LogTimestamp bool // TimestampFormat tells funcr how to render timestamps when LogTimestamp // is enabled. If not specified, a default format will be used. For more // details, see docs for Go's time.Layout. TimestampFormat string // LogInfoLevel tells funcr what key to use to log the info level. // If not specified, the info level will be logged as "level". // If this is set to "", the info level will not be logged at all. LogInfoLevel *string // Verbosity tells funcr which V logs to produce. Higher values enable // more logs. Info logs at or below this level will be written, while logs // above this level will be discarded. Verbosity int // RenderBuiltinsHook allows users to mutate the list of key-value pairs // while a log line is being rendered. The kvList argument follows logr // conventions - each pair of slice elements is comprised of a string key // and an arbitrary value (verified and sanitized before calling this // hook). The value returned must follow the same conventions. This hook // can be used to audit or modify logged data. For example, you might want // to prefix all of funcr's built-in keys with some string. This hook is // only called for built-in (provided by funcr itself) key-value pairs. // Equivalent hooks are offered for key-value pairs saved via // logr.Logger.WithValues or Formatter.AddValues (see RenderValuesHook) and // for user-provided pairs (see RenderArgsHook). RenderBuiltinsHook func(kvList []any) []any // RenderValuesHook is the same as RenderBuiltinsHook, except that it is // only called for key-value pairs saved via logr.Logger.WithValues. See // RenderBuiltinsHook for more details. RenderValuesHook func(kvList []any) []any // RenderArgsHook is the same as RenderBuiltinsHook, except that it is only // called for key-value pairs passed directly to Info and Error. See // RenderBuiltinsHook for more details. RenderArgsHook func(kvList []any) []any // MaxLogDepth tells funcr how many levels of nested fields (e.g. a struct // that contains a struct, etc.) it may log. Every time it finds a struct, // slice, array, or map the depth is increased by one. When the maximum is // reached, the value will be converted to a string indicating that the max // depth has been exceeded. If this field is not specified, a default // value will be used. MaxLogDepth int } // MessageClass indicates which category or categories of messages to consider. type MessageClass int const ( // None ignores all message classes. None MessageClass = iota // All considers all message classes. All // Info only considers info messages. Info // Error only considers error messages. Error ) // fnlogger inherits some of its LogSink implementation from Formatter // and just needs to add some glue code. type fnlogger struct { Formatter write func(prefix, args string) } func (l fnlogger) WithName(name string) logr.LogSink { l.Formatter.AddName(name) return &l } func (l fnlogger) WithValues(kvList ...any) logr.LogSink { l.Formatter.AddValues(kvList) return &l } func (l fnlogger) WithCallDepth(depth int) logr.LogSink { l.Formatter.AddCallDepth(depth) return &l } func (l fnlogger) Info(level int, msg string, kvList ...any) { prefix, args := l.FormatInfo(level, msg, kvList) l.write(prefix, args) } func (l fnlogger) Error(err error, msg string, kvList ...any) { prefix, args := l.FormatError(err, msg, kvList) l.write(prefix, args) } func (l fnlogger) GetUnderlying() func(prefix, args string) { return l.write } // Assert conformance to the interfaces. var _ logr.LogSink = &fnlogger{} var _ logr.CallDepthLogSink = &fnlogger{} var _ Underlier = &fnlogger{} // NewFormatter constructs a Formatter which emits a JSON-like key=value format. func NewFormatter(opts Options) Formatter { return newFormatter(opts, outputKeyValue) } // NewFormatterJSON constructs a Formatter which emits strict JSON. func NewFormatterJSON(opts Options) Formatter { return newFormatter(opts, outputJSON) } // Defaults for Options. const defaultTimestampFormat = "2006-01-02 15:04:05.000000" const defaultMaxLogDepth = 16 func newFormatter(opts Options, outfmt outputFormat) Formatter { if opts.TimestampFormat == "" { opts.TimestampFormat = defaultTimestampFormat } if opts.MaxLogDepth == 0 { opts.MaxLogDepth = defaultMaxLogDepth } if opts.LogInfoLevel == nil { opts.LogInfoLevel = new(string) *opts.LogInfoLevel = "level" } f := Formatter{ outputFormat: outfmt, prefix: "", values: nil, depth: 0, opts: &opts, } return f } // Formatter is an opaque struct which can be embedded in a LogSink // implementation. It should be constructed with NewFormatter. Some of // its methods directly implement logr.LogSink. type Formatter struct { outputFormat outputFormat prefix string values []any valuesStr string depth int opts *Options groupName string // for slog groups groups []groupDef } // outputFormat indicates which outputFormat to use. type outputFormat int const ( // outputKeyValue emits a JSON-like key=value format, but not strict JSON. outputKeyValue outputFormat = iota // outputJSON emits strict JSON. outputJSON ) // groupDef represents a saved group. The values may be empty, but we don't // know if we need to render the group until the final record is rendered. type groupDef struct { name string values string } // PseudoStruct is a list of key-value pairs that gets logged as a struct. type PseudoStruct []any // render produces a log line, ready to use. func (f Formatter) render(builtins, args []any) string { // Empirically bytes.Buffer is faster than strings.Builder for this. buf := bytes.NewBuffer(make([]byte, 0, 1024)) if f.outputFormat == outputJSON { buf.WriteByte('{') // for the whole record } // Render builtins vals := builtins if hook := f.opts.RenderBuiltinsHook; hook != nil { vals = hook(f.sanitize(vals)) } f.flatten(buf, vals, false) // keys are ours, no need to escape continuing := len(builtins) > 0 // Turn the inner-most group into a string argsStr := func() string { buf := bytes.NewBuffer(make([]byte, 0, 1024)) vals = args if hook := f.opts.RenderArgsHook; hook != nil { vals = hook(f.sanitize(vals)) } f.flatten(buf, vals, true) // escape user-provided keys return buf.String() }() // Render the stack of groups from the inside out. bodyStr := f.renderGroup(f.groupName, f.valuesStr, argsStr) for i := len(f.groups) - 1; i >= 0; i-- { grp := &f.groups[i] if grp.values == "" && bodyStr == "" { // no contents, so we must elide the whole group continue } bodyStr = f.renderGroup(grp.name, grp.values, bodyStr) } if bodyStr != "" { if continuing { buf.WriteByte(f.comma()) } buf.WriteString(bodyStr) } if f.outputFormat == outputJSON { buf.WriteByte('}') // for the whole record } return buf.String() } // renderGroup returns a string representation of the named group with rendered // values and args. If the name is empty, this will return the values and args, // joined. If the name is not empty, this will return a single key-value pair, // where the value is a grouping of the values and args. If the values and // args are both empty, this will return an empty string, even if the name was // specified. func (f Formatter) renderGroup(name string, values string, args string) string { buf := bytes.NewBuffer(make([]byte, 0, 1024)) needClosingBrace := false if name != "" && (values != "" || args != "") { buf.WriteString(f.quoted(name, true)) // escape user-provided keys buf.WriteByte(f.colon()) buf.WriteByte('{') needClosingBrace = true } continuing := false if values != "" { buf.WriteString(values) continuing = true } if args != "" { if continuing { buf.WriteByte(f.comma()) } buf.WriteString(args) } if needClosingBrace { buf.WriteByte('}') } return buf.String() } // flatten renders a list of key-value pairs into a buffer. If escapeKeys is // true, the keys are assumed to have non-JSON-compatible characters in them // and must be evaluated for escapes. // // This function returns a potentially modified version of kvList, which // ensures that there is a value for every key (adding a value if needed) and // that each key is a string (substituting a key if needed). func (f Formatter) flatten(buf *bytes.Buffer, kvList []any, escapeKeys bool) []any { // This logic overlaps with sanitize() but saves one type-cast per key, // which can be measurable. if len(kvList)%2 != 0 { kvList = append(kvList, noValue) } copied := false for i := 0; i < len(kvList); i += 2 { k, ok := kvList[i].(string) if !ok { if !copied { newList := make([]any, len(kvList)) copy(newList, kvList) kvList = newList copied = true } k = f.nonStringKey(kvList[i]) kvList[i] = k } v := kvList[i+1] if i > 0 { if f.outputFormat == outputJSON { buf.WriteByte(f.comma()) } else { // In theory the format could be something we don't understand. In // practice, we control it, so it won't be. buf.WriteByte(' ') } } buf.WriteString(f.quoted(k, escapeKeys)) buf.WriteByte(f.colon()) buf.WriteString(f.pretty(v)) } return kvList } func (f Formatter) quoted(str string, escape bool) string { if escape { return prettyString(str) } // this is faster return `"` + str + `"` } func (f Formatter) comma() byte { if f.outputFormat == outputJSON { return ',' } return ' ' } func (f Formatter) colon() byte { if f.outputFormat == outputJSON { return ':' } return '=' } func (f Formatter) pretty(value any) string { return f.prettyWithFlags(value, 0, 0) } const ( flagRawStruct = 0x1 // do not print braces on structs ) // TODO: This is not fast. Most of the overhead goes here. func (f Formatter) prettyWithFlags(value any, flags uint32, depth int) string { if depth > f.opts.MaxLogDepth { return `""` } // Handle types that take full control of logging. if v, ok := value.(logr.Marshaler); ok { // Replace the value with what the type wants to get logged. // That then gets handled below via reflection. value = invokeMarshaler(v) } // Handle types that want to format themselves. switch v := value.(type) { case fmt.Stringer: value = invokeStringer(v) case error: value = invokeError(v) } // Handling the most common types without reflect is a small perf win. switch v := value.(type) { case bool: return strconv.FormatBool(v) case string: return prettyString(v) case int: return strconv.FormatInt(int64(v), 10) case int8: return strconv.FormatInt(int64(v), 10) case int16: return strconv.FormatInt(int64(v), 10) case int32: return strconv.FormatInt(int64(v), 10) case int64: return strconv.FormatInt(int64(v), 10) case uint: return strconv.FormatUint(uint64(v), 10) case uint8: return strconv.FormatUint(uint64(v), 10) case uint16: return strconv.FormatUint(uint64(v), 10) case uint32: return strconv.FormatUint(uint64(v), 10) case uint64: return strconv.FormatUint(v, 10) case uintptr: return strconv.FormatUint(uint64(v), 10) case float32: return strconv.FormatFloat(float64(v), 'f', -1, 32) case float64: return strconv.FormatFloat(v, 'f', -1, 64) case complex64: return `"` + strconv.FormatComplex(complex128(v), 'f', -1, 64) + `"` case complex128: return `"` + strconv.FormatComplex(v, 'f', -1, 128) + `"` case PseudoStruct: buf := bytes.NewBuffer(make([]byte, 0, 1024)) v = f.sanitize(v) if flags&flagRawStruct == 0 { buf.WriteByte('{') } for i := 0; i < len(v); i += 2 { if i > 0 { buf.WriteByte(f.comma()) } k, _ := v[i].(string) // sanitize() above means no need to check success // arbitrary keys might need escaping buf.WriteString(prettyString(k)) buf.WriteByte(f.colon()) buf.WriteString(f.prettyWithFlags(v[i+1], 0, depth+1)) } if flags&flagRawStruct == 0 { buf.WriteByte('}') } return buf.String() } buf := bytes.NewBuffer(make([]byte, 0, 256)) t := reflect.TypeOf(value) if t == nil { return "null" } v := reflect.ValueOf(value) switch t.Kind() { case reflect.Bool: return strconv.FormatBool(v.Bool()) case reflect.String: return prettyString(v.String()) case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return strconv.FormatInt(int64(v.Int()), 10) case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: return strconv.FormatUint(uint64(v.Uint()), 10) case reflect.Float32: return strconv.FormatFloat(float64(v.Float()), 'f', -1, 32) case reflect.Float64: return strconv.FormatFloat(v.Float(), 'f', -1, 64) case reflect.Complex64: return `"` + strconv.FormatComplex(complex128(v.Complex()), 'f', -1, 64) + `"` case reflect.Complex128: return `"` + strconv.FormatComplex(v.Complex(), 'f', -1, 128) + `"` case reflect.Struct: if flags&flagRawStruct == 0 { buf.WriteByte('{') } printComma := false // testing i>0 is not enough because of JSON omitted fields for i := 0; i < t.NumField(); i++ { fld := t.Field(i) if fld.PkgPath != "" { // reflect says this field is only defined for non-exported fields. continue } if !v.Field(i).CanInterface() { // reflect isn't clear exactly what this means, but we can't use it. continue } name := "" omitempty := false if tag, found := fld.Tag.Lookup("json"); found { if tag == "-" { continue } if comma := strings.Index(tag, ","); comma != -1 { if n := tag[:comma]; n != "" { name = n } rest := tag[comma:] if strings.Contains(rest, ",omitempty,") || strings.HasSuffix(rest, ",omitempty") { omitempty = true } } else { name = tag } } if omitempty && isEmpty(v.Field(i)) { continue } if printComma { buf.WriteByte(f.comma()) } printComma = true // if we got here, we are rendering a field if fld.Anonymous && fld.Type.Kind() == reflect.Struct && name == "" { buf.WriteString(f.prettyWithFlags(v.Field(i).Interface(), flags|flagRawStruct, depth+1)) continue } if name == "" { name = fld.Name } // field names can't contain characters which need escaping buf.WriteString(f.quoted(name, false)) buf.WriteByte(f.colon()) buf.WriteString(f.prettyWithFlags(v.Field(i).Interface(), 0, depth+1)) } if flags&flagRawStruct == 0 { buf.WriteByte('}') } return buf.String() case reflect.Slice, reflect.Array: // If this is outputing as JSON make sure this isn't really a json.RawMessage. // If so just emit "as-is" and don't pretty it as that will just print // it as [X,Y,Z,...] which isn't terribly useful vs the string form you really want. if f.outputFormat == outputJSON { if rm, ok := value.(json.RawMessage); ok { // If it's empty make sure we emit an empty value as the array style would below. if len(rm) > 0 { buf.Write(rm) } else { buf.WriteString("null") } return buf.String() } } buf.WriteByte('[') for i := 0; i < v.Len(); i++ { if i > 0 { buf.WriteByte(f.comma()) } e := v.Index(i) buf.WriteString(f.prettyWithFlags(e.Interface(), 0, depth+1)) } buf.WriteByte(']') return buf.String() case reflect.Map: buf.WriteByte('{') // This does not sort the map keys, for best perf. it := v.MapRange() i := 0 for it.Next() { if i > 0 { buf.WriteByte(f.comma()) } // If a map key supports TextMarshaler, use it. keystr := "" if m, ok := it.Key().Interface().(encoding.TextMarshaler); ok { txt, err := m.MarshalText() if err != nil { keystr = fmt.Sprintf("", err.Error()) } else { keystr = string(txt) } keystr = prettyString(keystr) } else { // prettyWithFlags will produce already-escaped values keystr = f.prettyWithFlags(it.Key().Interface(), 0, depth+1) if t.Key().Kind() != reflect.String { // JSON only does string keys. Unlike Go's standard JSON, we'll // convert just about anything to a string. keystr = prettyString(keystr) } } buf.WriteString(keystr) buf.WriteByte(f.colon()) buf.WriteString(f.prettyWithFlags(it.Value().Interface(), 0, depth+1)) i++ } buf.WriteByte('}') return buf.String() case reflect.Ptr, reflect.Interface: if v.IsNil() { return "null" } return f.prettyWithFlags(v.Elem().Interface(), 0, depth) } return fmt.Sprintf(`""`, t.Kind().String()) } func prettyString(s string) string { // Avoid escaping (which does allocations) if we can. if needsEscape(s) { return strconv.Quote(s) } b := bytes.NewBuffer(make([]byte, 0, 1024)) b.WriteByte('"') b.WriteString(s) b.WriteByte('"') return b.String() } // needsEscape determines whether the input string needs to be escaped or not, // without doing any allocations. func needsEscape(s string) bool { for _, r := range s { if !strconv.IsPrint(r) || r == '\\' || r == '"' { return true } } return false } func isEmpty(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.Complex64, reflect.Complex128: return v.Complex() == 0 case reflect.Interface, reflect.Ptr: return v.IsNil() } return false } func invokeMarshaler(m logr.Marshaler) (ret any) { defer func() { if r := recover(); r != nil { ret = fmt.Sprintf("", r) } }() return m.MarshalLog() } func invokeStringer(s fmt.Stringer) (ret string) { defer func() { if r := recover(); r != nil { ret = fmt.Sprintf("", r) } }() return s.String() } func invokeError(e error) (ret string) { defer func() { if r := recover(); r != nil { ret = fmt.Sprintf("", r) } }() return e.Error() } // Caller represents the original call site for a log line, after considering // logr.Logger.WithCallDepth and logr.Logger.WithCallStackHelper. The File and // Line fields will always be provided, while the Func field is optional. // Users can set the render hook fields in Options to examine logged key-value // pairs, one of which will be {"caller", Caller} if the Options.LogCaller // field is enabled for the given MessageClass. type Caller struct { // File is the basename of the file for this call site. File string `json:"file"` // Line is the line number in the file for this call site. Line int `json:"line"` // Func is the function name for this call site, or empty if // Options.LogCallerFunc is not enabled. Func string `json:"function,omitempty"` } func (f Formatter) caller() Caller { // +1 for this frame, +1 for Info/Error. pc, file, line, ok := runtime.Caller(f.depth + 2) if !ok { return Caller{"", 0, ""} } fn := "" if f.opts.LogCallerFunc { if fp := runtime.FuncForPC(pc); fp != nil { fn = fp.Name() } } return Caller{filepath.Base(file), line, fn} } const noValue = "" func (f Formatter) nonStringKey(v any) string { return fmt.Sprintf("", f.snippet(v)) } // snippet produces a short snippet string of an arbitrary value. func (f Formatter) snippet(v any) string { const snipLen = 16 snip := f.pretty(v) if len(snip) > snipLen { snip = snip[:snipLen] } return snip } // sanitize ensures that a list of key-value pairs has a value for every key // (adding a value if needed) and that each key is a string (substituting a key // if needed). func (f Formatter) sanitize(kvList []any) []any { if len(kvList)%2 != 0 { kvList = append(kvList, noValue) } for i := 0; i < len(kvList); i += 2 { _, ok := kvList[i].(string) if !ok { kvList[i] = f.nonStringKey(kvList[i]) } } return kvList } // startGroup opens a new group scope (basically a sub-struct), which locks all // the current saved values and starts them anew. This is needed to satisfy // slog. func (f *Formatter) startGroup(name string) { // Unnamed groups are just inlined. if name == "" { return } n := len(f.groups) f.groups = append(f.groups[:n:n], groupDef{f.groupName, f.valuesStr}) // Start collecting new values. f.groupName = name f.valuesStr = "" f.values = nil } // Init configures this Formatter from runtime info, such as the call depth // imposed by logr itself. // Note that this receiver is a pointer, so depth can be saved. func (f *Formatter) Init(info logr.RuntimeInfo) { f.depth += info.CallDepth } // Enabled checks whether an info message at the given level should be logged. func (f Formatter) Enabled(level int) bool { return level <= f.opts.Verbosity } // GetDepth returns the current depth of this Formatter. This is useful for // implementations which do their own caller attribution. func (f Formatter) GetDepth() int { return f.depth } // FormatInfo renders an Info log message into strings. The prefix will be // empty when no names were set (via AddNames), or when the output is // configured for JSON. func (f Formatter) FormatInfo(level int, msg string, kvList []any) (prefix, argsStr string) { args := make([]any, 0, 64) // using a constant here impacts perf prefix = f.prefix if f.outputFormat == outputJSON { args = append(args, "logger", prefix) prefix = "" } if f.opts.LogTimestamp { args = append(args, "ts", time.Now().Format(f.opts.TimestampFormat)) } if policy := f.opts.LogCaller; policy == All || policy == Info { args = append(args, "caller", f.caller()) } if key := *f.opts.LogInfoLevel; key != "" { args = append(args, key, level) } args = append(args, "msg", msg) return prefix, f.render(args, kvList) } // FormatError renders an Error log message into strings. The prefix will be // empty when no names were set (via AddNames), or when the output is // configured for JSON. func (f Formatter) FormatError(err error, msg string, kvList []any) (prefix, argsStr string) { args := make([]any, 0, 64) // using a constant here impacts perf prefix = f.prefix if f.outputFormat == outputJSON { args = append(args, "logger", prefix) prefix = "" } if f.opts.LogTimestamp { args = append(args, "ts", time.Now().Format(f.opts.TimestampFormat)) } if policy := f.opts.LogCaller; policy == All || policy == Error { args = append(args, "caller", f.caller()) } args = append(args, "msg", msg) var loggableErr any if err != nil { loggableErr = err.Error() } args = append(args, "error", loggableErr) return prefix, f.render(args, kvList) } // AddName appends the specified name. funcr uses '/' characters to separate // name elements. Callers should not pass '/' in the provided name string, but // this library does not actually enforce that. func (f *Formatter) AddName(name string) { if len(f.prefix) > 0 { f.prefix += "/" } f.prefix += name } // AddValues adds key-value pairs to the set of saved values to be logged with // each log line. func (f *Formatter) AddValues(kvList []any) { // Three slice args forces a copy. n := len(f.values) f.values = append(f.values[:n:n], kvList...) vals := f.values if hook := f.opts.RenderValuesHook; hook != nil { vals = hook(f.sanitize(vals)) } // Pre-render values, so we don't have to do it on each Info/Error call. buf := bytes.NewBuffer(make([]byte, 0, 1024)) f.flatten(buf, vals, true) // escape user-provided keys f.valuesStr = buf.String() } // AddCallDepth increases the number of stack-frames to skip when attributing // the log line to a file and line. func (f *Formatter) AddCallDepth(depth int) { f.depth += depth } ================================================ FILE: vendor/github.com/go-logr/logr/funcr/slogsink.go ================================================ //go:build go1.21 // +build go1.21 /* Copyright 2023 The logr Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package funcr import ( "context" "log/slog" "github.com/go-logr/logr" ) var _ logr.SlogSink = &fnlogger{} const extraSlogSinkDepth = 3 // 2 for slog, 1 for SlogSink func (l fnlogger) Handle(_ context.Context, record slog.Record) error { kvList := make([]any, 0, 2*record.NumAttrs()) record.Attrs(func(attr slog.Attr) bool { kvList = attrToKVs(attr, kvList) return true }) if record.Level >= slog.LevelError { l.WithCallDepth(extraSlogSinkDepth).Error(nil, record.Message, kvList...) } else { level := l.levelFromSlog(record.Level) l.WithCallDepth(extraSlogSinkDepth).Info(level, record.Message, kvList...) } return nil } func (l fnlogger) WithAttrs(attrs []slog.Attr) logr.SlogSink { kvList := make([]any, 0, 2*len(attrs)) for _, attr := range attrs { kvList = attrToKVs(attr, kvList) } l.AddValues(kvList) return &l } func (l fnlogger) WithGroup(name string) logr.SlogSink { l.startGroup(name) return &l } // attrToKVs appends a slog.Attr to a logr-style kvList. It handle slog Groups // and other details of slog. func attrToKVs(attr slog.Attr, kvList []any) []any { attrVal := attr.Value.Resolve() if attrVal.Kind() == slog.KindGroup { groupVal := attrVal.Group() grpKVs := make([]any, 0, 2*len(groupVal)) for _, attr := range groupVal { grpKVs = attrToKVs(attr, grpKVs) } if attr.Key == "" { // slog says we have to inline these kvList = append(kvList, grpKVs...) } else { kvList = append(kvList, attr.Key, PseudoStruct(grpKVs)) } } else if attr.Key != "" { kvList = append(kvList, attr.Key, attrVal.Any()) } return kvList } // levelFromSlog adjusts the level by the logger's verbosity and negates it. // It ensures that the result is >= 0. This is necessary because the result is // passed to a LogSink and that API did not historically document whether // levels could be negative or what that meant. // // Some example usage: // // logrV0 := getMyLogger() // logrV2 := logrV0.V(2) // slogV2 := slog.New(logr.ToSlogHandler(logrV2)) // slogV2.Debug("msg") // =~ logrV2.V(4) =~ logrV0.V(6) // slogV2.Info("msg") // =~ logrV2.V(0) =~ logrV0.V(2) // slogv2.Warn("msg") // =~ logrV2.V(-4) =~ logrV0.V(0) func (l fnlogger) levelFromSlog(level slog.Level) int { result := -level if result < 0 { result = 0 // because LogSink doesn't expect negative V levels } return int(result) } ================================================ FILE: vendor/github.com/go-logr/logr/logr.go ================================================ /* Copyright 2019 The logr Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // This design derives from Dave Cheney's blog: // http://dave.cheney.net/2015/11/05/lets-talk-about-logging // Package logr defines a general-purpose logging API and abstract interfaces // to back that API. Packages in the Go ecosystem can depend on this package, // while callers can implement logging with whatever backend is appropriate. // // # Usage // // Logging is done using a Logger instance. Logger is a concrete type with // methods, which defers the actual logging to a LogSink interface. The main // methods of Logger are Info() and Error(). Arguments to Info() and Error() // are key/value pairs rather than printf-style formatted strings, emphasizing // "structured logging". // // With Go's standard log package, we might write: // // log.Printf("setting target value %s", targetValue) // // With logr's structured logging, we'd write: // // logger.Info("setting target", "value", targetValue) // // Errors are much the same. Instead of: // // log.Printf("failed to open the pod bay door for user %s: %v", user, err) // // We'd write: // // logger.Error(err, "failed to open the pod bay door", "user", user) // // Info() and Error() are very similar, but they are separate methods so that // LogSink implementations can choose to do things like attach additional // information (such as stack traces) on calls to Error(). Error() messages are // always logged, regardless of the current verbosity. If there is no error // instance available, passing nil is valid. // // # Verbosity // // Often we want to log information only when the application in "verbose // mode". To write log lines that are more verbose, Logger has a V() method. // The higher the V-level of a log line, the less critical it is considered. // Log-lines with V-levels that are not enabled (as per the LogSink) will not // be written. Level V(0) is the default, and logger.V(0).Info() has the same // meaning as logger.Info(). Negative V-levels have the same meaning as V(0). // Error messages do not have a verbosity level and are always logged. // // Where we might have written: // // if flVerbose >= 2 { // log.Printf("an unusual thing happened") // } // // We can write: // // logger.V(2).Info("an unusual thing happened") // // # Logger Names // // Logger instances can have name strings so that all messages logged through // that instance have additional context. For example, you might want to add // a subsystem name: // // logger.WithName("compactor").Info("started", "time", time.Now()) // // The WithName() method returns a new Logger, which can be passed to // constructors or other functions for further use. Repeated use of WithName() // will accumulate name "segments". These name segments will be joined in some // way by the LogSink implementation. It is strongly recommended that name // segments contain simple identifiers (letters, digits, and hyphen), and do // not contain characters that could muddle the log output or confuse the // joining operation (e.g. whitespace, commas, periods, slashes, brackets, // quotes, etc). // // # Saved Values // // Logger instances can store any number of key/value pairs, which will be // logged alongside all messages logged through that instance. For example, // you might want to create a Logger instance per managed object: // // With the standard log package, we might write: // // log.Printf("decided to set field foo to value %q for object %s/%s", // targetValue, object.Namespace, object.Name) // // With logr we'd write: // // // Elsewhere: set up the logger to log the object name. // obj.logger = mainLogger.WithValues( // "name", obj.name, "namespace", obj.namespace) // // // later on... // obj.logger.Info("setting foo", "value", targetValue) // // # Best Practices // // Logger has very few hard rules, with the goal that LogSink implementations // might have a lot of freedom to differentiate. There are, however, some // things to consider. // // The log message consists of a constant message attached to the log line. // This should generally be a simple description of what's occurring, and should // never be a format string. Variable information can then be attached using // named values. // // Keys are arbitrary strings, but should generally be constant values. Values // may be any Go value, but how the value is formatted is determined by the // LogSink implementation. // // Logger instances are meant to be passed around by value. Code that receives // such a value can call its methods without having to check whether the // instance is ready for use. // // The zero logger (= Logger{}) is identical to Discard() and discards all log // entries. Code that receives a Logger by value can simply call it, the methods // will never crash. For cases where passing a logger is optional, a pointer to Logger // should be used. // // # Key Naming Conventions // // Keys are not strictly required to conform to any specification or regex, but // it is recommended that they: // - be human-readable and meaningful (not auto-generated or simple ordinals) // - be constant (not dependent on input data) // - contain only printable characters // - not contain whitespace or punctuation // - use lower case for simple keys and lowerCamelCase for more complex ones // // These guidelines help ensure that log data is processed properly regardless // of the log implementation. For example, log implementations will try to // output JSON data or will store data for later database (e.g. SQL) queries. // // While users are generally free to use key names of their choice, it's // generally best to avoid using the following keys, as they're frequently used // by implementations: // - "caller": the calling information (file/line) of a particular log line // - "error": the underlying error value in the `Error` method // - "level": the log level // - "logger": the name of the associated logger // - "msg": the log message // - "stacktrace": the stack trace associated with a particular log line or // error (often from the `Error` message) // - "ts": the timestamp for a log line // // Implementations are encouraged to make use of these keys to represent the // above concepts, when necessary (for example, in a pure-JSON output form, it // would be necessary to represent at least message and timestamp as ordinary // named values). // // # Break Glass // // Implementations may choose to give callers access to the underlying // logging implementation. The recommended pattern for this is: // // // Underlier exposes access to the underlying logging implementation. // // Since callers only have a logr.Logger, they have to know which // // implementation is in use, so this interface is less of an abstraction // // and more of way to test type conversion. // type Underlier interface { // GetUnderlying() // } // // Logger grants access to the sink to enable type assertions like this: // // func DoSomethingWithImpl(log logr.Logger) { // if underlier, ok := log.GetSink().(impl.Underlier); ok { // implLogger := underlier.GetUnderlying() // ... // } // } // // Custom `With*` functions can be implemented by copying the complete // Logger struct and replacing the sink in the copy: // // // WithFooBar changes the foobar parameter in the log sink and returns a // // new logger with that modified sink. It does nothing for loggers where // // the sink doesn't support that parameter. // func WithFoobar(log logr.Logger, foobar int) logr.Logger { // if foobarLogSink, ok := log.GetSink().(FoobarSink); ok { // log = log.WithSink(foobarLogSink.WithFooBar(foobar)) // } // return log // } // // Don't use New to construct a new Logger with a LogSink retrieved from an // existing Logger. Source code attribution might not work correctly and // unexported fields in Logger get lost. // // Beware that the same LogSink instance may be shared by different logger // instances. Calling functions that modify the LogSink will affect all of // those. package logr // New returns a new Logger instance. This is primarily used by libraries // implementing LogSink, rather than end users. Passing a nil sink will create // a Logger which discards all log lines. func New(sink LogSink) Logger { logger := Logger{} logger.setSink(sink) if sink != nil { sink.Init(runtimeInfo) } return logger } // setSink stores the sink and updates any related fields. It mutates the // logger and thus is only safe to use for loggers that are not currently being // used concurrently. func (l *Logger) setSink(sink LogSink) { l.sink = sink } // GetSink returns the stored sink. func (l Logger) GetSink() LogSink { return l.sink } // WithSink returns a copy of the logger with the new sink. func (l Logger) WithSink(sink LogSink) Logger { l.setSink(sink) return l } // Logger is an interface to an abstract logging implementation. This is a // concrete type for performance reasons, but all the real work is passed on to // a LogSink. Implementations of LogSink should provide their own constructors // that return Logger, not LogSink. // // The underlying sink can be accessed through GetSink and be modified through // WithSink. This enables the implementation of custom extensions (see "Break // Glass" in the package documentation). Normally the sink should be used only // indirectly. type Logger struct { sink LogSink level int } // Enabled tests whether this Logger is enabled. For example, commandline // flags might be used to set the logging verbosity and disable some info logs. func (l Logger) Enabled() bool { // Some implementations of LogSink look at the caller in Enabled (e.g. // different verbosity levels per package or file), but we only pass one // CallDepth in (via Init). This means that all calls from Logger to the // LogSink's Enabled, Info, and Error methods must have the same number of // frames. In other words, Logger methods can't call other Logger methods // which call these LogSink methods unless we do it the same in all paths. return l.sink != nil && l.sink.Enabled(l.level) } // Info logs a non-error message with the given key/value pairs as context. // // The msg argument should be used to add some constant description to the log // line. The key/value pairs can then be used to add additional variable // information. The key/value pairs must alternate string keys and arbitrary // values. func (l Logger) Info(msg string, keysAndValues ...any) { if l.sink == nil { return } if l.sink.Enabled(l.level) { // see comment in Enabled if withHelper, ok := l.sink.(CallStackHelperLogSink); ok { withHelper.GetCallStackHelper()() } l.sink.Info(l.level, msg, keysAndValues...) } } // Error logs an error, with the given message and key/value pairs as context. // It functions similarly to Info, but may have unique behavior, and should be // preferred for logging errors (see the package documentations for more // information). The log message will always be emitted, regardless of // verbosity level. // // The msg argument should be used to add context to any underlying error, // while the err argument should be used to attach the actual error that // triggered this log line, if present. The err parameter is optional // and nil may be passed instead of an error instance. func (l Logger) Error(err error, msg string, keysAndValues ...any) { if l.sink == nil { return } if withHelper, ok := l.sink.(CallStackHelperLogSink); ok { withHelper.GetCallStackHelper()() } l.sink.Error(err, msg, keysAndValues...) } // V returns a new Logger instance for a specific verbosity level, relative to // this Logger. In other words, V-levels are additive. A higher verbosity // level means a log message is less important. Negative V-levels are treated // as 0. func (l Logger) V(level int) Logger { if l.sink == nil { return l } if level < 0 { level = 0 } l.level += level return l } // GetV returns the verbosity level of the logger. If the logger's LogSink is // nil as in the Discard logger, this will always return 0. func (l Logger) GetV() int { // 0 if l.sink nil because of the if check in V above. return l.level } // WithValues returns a new Logger instance with additional key/value pairs. // See Info for documentation on how key/value pairs work. func (l Logger) WithValues(keysAndValues ...any) Logger { if l.sink == nil { return l } l.setSink(l.sink.WithValues(keysAndValues...)) return l } // WithName returns a new Logger instance with the specified name element added // to the Logger's name. Successive calls with WithName append additional // suffixes to the Logger's name. It's strongly recommended that name segments // contain only letters, digits, and hyphens (see the package documentation for // more information). func (l Logger) WithName(name string) Logger { if l.sink == nil { return l } l.setSink(l.sink.WithName(name)) return l } // WithCallDepth returns a Logger instance that offsets the call stack by the // specified number of frames when logging call site information, if possible. // This is useful for users who have helper functions between the "real" call // site and the actual calls to Logger methods. If depth is 0 the attribution // should be to the direct caller of this function. If depth is 1 the // attribution should skip 1 call frame, and so on. Successive calls to this // are additive. // // If the underlying log implementation supports a WithCallDepth(int) method, // it will be called and the result returned. If the implementation does not // support CallDepthLogSink, the original Logger will be returned. // // To skip one level, WithCallStackHelper() should be used instead of // WithCallDepth(1) because it works with implementions that support the // CallDepthLogSink and/or CallStackHelperLogSink interfaces. func (l Logger) WithCallDepth(depth int) Logger { if l.sink == nil { return l } if withCallDepth, ok := l.sink.(CallDepthLogSink); ok { l.setSink(withCallDepth.WithCallDepth(depth)) } return l } // WithCallStackHelper returns a new Logger instance that skips the direct // caller when logging call site information, if possible. This is useful for // users who have helper functions between the "real" call site and the actual // calls to Logger methods and want to support loggers which depend on marking // each individual helper function, like loggers based on testing.T. // // In addition to using that new logger instance, callers also must call the // returned function. // // If the underlying log implementation supports a WithCallDepth(int) method, // WithCallDepth(1) will be called to produce a new logger. If it supports a // WithCallStackHelper() method, that will be also called. If the // implementation does not support either of these, the original Logger will be // returned. func (l Logger) WithCallStackHelper() (func(), Logger) { if l.sink == nil { return func() {}, l } var helper func() if withCallDepth, ok := l.sink.(CallDepthLogSink); ok { l.setSink(withCallDepth.WithCallDepth(1)) } if withHelper, ok := l.sink.(CallStackHelperLogSink); ok { helper = withHelper.GetCallStackHelper() } else { helper = func() {} } return helper, l } // IsZero returns true if this logger is an uninitialized zero value func (l Logger) IsZero() bool { return l.sink == nil } // RuntimeInfo holds information that the logr "core" library knows which // LogSinks might want to know. type RuntimeInfo struct { // CallDepth is the number of call frames the logr library adds between the // end-user and the LogSink. LogSink implementations which choose to print // the original logging site (e.g. file & line) should climb this many // additional frames to find it. CallDepth int } // runtimeInfo is a static global. It must not be changed at run time. var runtimeInfo = RuntimeInfo{ CallDepth: 1, } // LogSink represents a logging implementation. End-users will generally not // interact with this type. type LogSink interface { // Init receives optional information about the logr library for LogSink // implementations that need it. Init(info RuntimeInfo) // Enabled tests whether this LogSink is enabled at the specified V-level. // For example, commandline flags might be used to set the logging // verbosity and disable some info logs. Enabled(level int) bool // Info logs a non-error message with the given key/value pairs as context. // The level argument is provided for optional logging. This method will // only be called when Enabled(level) is true. See Logger.Info for more // details. Info(level int, msg string, keysAndValues ...any) // Error logs an error, with the given message and key/value pairs as // context. See Logger.Error for more details. Error(err error, msg string, keysAndValues ...any) // WithValues returns a new LogSink with additional key/value pairs. See // Logger.WithValues for more details. WithValues(keysAndValues ...any) LogSink // WithName returns a new LogSink with the specified name appended. See // Logger.WithName for more details. WithName(name string) LogSink } // CallDepthLogSink represents a LogSink that knows how to climb the call stack // to identify the original call site and can offset the depth by a specified // number of frames. This is useful for users who have helper functions // between the "real" call site and the actual calls to Logger methods. // Implementations that log information about the call site (such as file, // function, or line) would otherwise log information about the intermediate // helper functions. // // This is an optional interface and implementations are not required to // support it. type CallDepthLogSink interface { // WithCallDepth returns a LogSink that will offset the call // stack by the specified number of frames when logging call // site information. // // If depth is 0, the LogSink should skip exactly the number // of call frames defined in RuntimeInfo.CallDepth when Info // or Error are called, i.e. the attribution should be to the // direct caller of Logger.Info or Logger.Error. // // If depth is 1 the attribution should skip 1 call frame, and so on. // Successive calls to this are additive. WithCallDepth(depth int) LogSink } // CallStackHelperLogSink represents a LogSink that knows how to climb // the call stack to identify the original call site and can skip // intermediate helper functions if they mark themselves as // helper. Go's testing package uses that approach. // // This is useful for users who have helper functions between the // "real" call site and the actual calls to Logger methods. // Implementations that log information about the call site (such as // file, function, or line) would otherwise log information about the // intermediate helper functions. // // This is an optional interface and implementations are not required // to support it. Implementations that choose to support this must not // simply implement it as WithCallDepth(1), because // Logger.WithCallStackHelper will call both methods if they are // present. This should only be implemented for LogSinks that actually // need it, as with testing.T. type CallStackHelperLogSink interface { // GetCallStackHelper returns a function that must be called // to mark the direct caller as helper function when logging // call site information. GetCallStackHelper() func() } // Marshaler is an optional interface that logged values may choose to // implement. Loggers with structured output, such as JSON, should // log the object return by the MarshalLog method instead of the // original value. type Marshaler interface { // MarshalLog can be used to: // - ensure that structs are not logged as strings when the original // value has a String method: return a different type without a // String method // - select which fields of a complex type should get logged: // return a simpler struct with fewer fields // - log unexported fields: return a different struct // with exported fields // // It may return any value of any type. MarshalLog() any } ================================================ FILE: vendor/github.com/go-logr/logr/sloghandler.go ================================================ //go:build go1.21 // +build go1.21 /* Copyright 2023 The logr Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package logr import ( "context" "log/slog" ) type slogHandler struct { // May be nil, in which case all logs get discarded. sink LogSink // Non-nil if sink is non-nil and implements SlogSink. slogSink SlogSink // groupPrefix collects values from WithGroup calls. It gets added as // prefix to value keys when handling a log record. groupPrefix string // levelBias can be set when constructing the handler to influence the // slog.Level of log records. A positive levelBias reduces the // slog.Level value. slog has no API to influence this value after the // handler got created, so it can only be set indirectly through // Logger.V. levelBias slog.Level } var _ slog.Handler = &slogHandler{} // groupSeparator is used to concatenate WithGroup names and attribute keys. const groupSeparator = "." // GetLevel is used for black box unit testing. func (l *slogHandler) GetLevel() slog.Level { return l.levelBias } func (l *slogHandler) Enabled(_ context.Context, level slog.Level) bool { return l.sink != nil && (level >= slog.LevelError || l.sink.Enabled(l.levelFromSlog(level))) } func (l *slogHandler) Handle(ctx context.Context, record slog.Record) error { if l.slogSink != nil { // Only adjust verbosity level of log entries < slog.LevelError. if record.Level < slog.LevelError { record.Level -= l.levelBias } return l.slogSink.Handle(ctx, record) } // No need to check for nil sink here because Handle will only be called // when Enabled returned true. kvList := make([]any, 0, 2*record.NumAttrs()) record.Attrs(func(attr slog.Attr) bool { kvList = attrToKVs(attr, l.groupPrefix, kvList) return true }) if record.Level >= slog.LevelError { l.sinkWithCallDepth().Error(nil, record.Message, kvList...) } else { level := l.levelFromSlog(record.Level) l.sinkWithCallDepth().Info(level, record.Message, kvList...) } return nil } // sinkWithCallDepth adjusts the stack unwinding so that when Error or Info // are called by Handle, code in slog gets skipped. // // This offset currently (Go 1.21.0) works for calls through // slog.New(ToSlogHandler(...)). There's no guarantee that the call // chain won't change. Wrapping the handler will also break unwinding. It's // still better than not adjusting at all.... // // This cannot be done when constructing the handler because FromSlogHandler needs // access to the original sink without this adjustment. A second copy would // work, but then WithAttrs would have to be called for both of them. func (l *slogHandler) sinkWithCallDepth() LogSink { if sink, ok := l.sink.(CallDepthLogSink); ok { return sink.WithCallDepth(2) } return l.sink } func (l *slogHandler) WithAttrs(attrs []slog.Attr) slog.Handler { if l.sink == nil || len(attrs) == 0 { return l } clone := *l if l.slogSink != nil { clone.slogSink = l.slogSink.WithAttrs(attrs) clone.sink = clone.slogSink } else { kvList := make([]any, 0, 2*len(attrs)) for _, attr := range attrs { kvList = attrToKVs(attr, l.groupPrefix, kvList) } clone.sink = l.sink.WithValues(kvList...) } return &clone } func (l *slogHandler) WithGroup(name string) slog.Handler { if l.sink == nil { return l } if name == "" { // slog says to inline empty groups return l } clone := *l if l.slogSink != nil { clone.slogSink = l.slogSink.WithGroup(name) clone.sink = clone.slogSink } else { clone.groupPrefix = addPrefix(clone.groupPrefix, name) } return &clone } // attrToKVs appends a slog.Attr to a logr-style kvList. It handle slog Groups // and other details of slog. func attrToKVs(attr slog.Attr, groupPrefix string, kvList []any) []any { attrVal := attr.Value.Resolve() if attrVal.Kind() == slog.KindGroup { groupVal := attrVal.Group() grpKVs := make([]any, 0, 2*len(groupVal)) prefix := groupPrefix if attr.Key != "" { prefix = addPrefix(groupPrefix, attr.Key) } for _, attr := range groupVal { grpKVs = attrToKVs(attr, prefix, grpKVs) } kvList = append(kvList, grpKVs...) } else if attr.Key != "" { kvList = append(kvList, addPrefix(groupPrefix, attr.Key), attrVal.Any()) } return kvList } func addPrefix(prefix, name string) string { if prefix == "" { return name } if name == "" { return prefix } return prefix + groupSeparator + name } // levelFromSlog adjusts the level by the logger's verbosity and negates it. // It ensures that the result is >= 0. This is necessary because the result is // passed to a LogSink and that API did not historically document whether // levels could be negative or what that meant. // // Some example usage: // // logrV0 := getMyLogger() // logrV2 := logrV0.V(2) // slogV2 := slog.New(logr.ToSlogHandler(logrV2)) // slogV2.Debug("msg") // =~ logrV2.V(4) =~ logrV0.V(6) // slogV2.Info("msg") // =~ logrV2.V(0) =~ logrV0.V(2) // slogv2.Warn("msg") // =~ logrV2.V(-4) =~ logrV0.V(0) func (l *slogHandler) levelFromSlog(level slog.Level) int { result := -level result += l.levelBias // in case the original Logger had a V level if result < 0 { result = 0 // because LogSink doesn't expect negative V levels } return int(result) } ================================================ FILE: vendor/github.com/go-logr/logr/slogr.go ================================================ //go:build go1.21 // +build go1.21 /* Copyright 2023 The logr Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package logr import ( "context" "log/slog" ) // FromSlogHandler returns a Logger which writes to the slog.Handler. // // The logr verbosity level is mapped to slog levels such that V(0) becomes // slog.LevelInfo and V(4) becomes slog.LevelDebug. func FromSlogHandler(handler slog.Handler) Logger { if handler, ok := handler.(*slogHandler); ok { if handler.sink == nil { return Discard() } return New(handler.sink).V(int(handler.levelBias)) } return New(&slogSink{handler: handler}) } // ToSlogHandler returns a slog.Handler which writes to the same sink as the Logger. // // The returned logger writes all records with level >= slog.LevelError as // error log entries with LogSink.Error, regardless of the verbosity level of // the Logger: // // logger := // slog.New(ToSlogHandler(logger.V(10))).Error(...) -> logSink.Error(...) // // The level of all other records gets reduced by the verbosity // level of the Logger and the result is negated. If it happens // to be negative, then it gets replaced by zero because a LogSink // is not expected to handled negative levels: // // slog.New(ToSlogHandler(logger)).Debug(...) -> logger.GetSink().Info(level=4, ...) // slog.New(ToSlogHandler(logger)).Warning(...) -> logger.GetSink().Info(level=0, ...) // slog.New(ToSlogHandler(logger)).Info(...) -> logger.GetSink().Info(level=0, ...) // slog.New(ToSlogHandler(logger.V(4))).Info(...) -> logger.GetSink().Info(level=4, ...) func ToSlogHandler(logger Logger) slog.Handler { if sink, ok := logger.GetSink().(*slogSink); ok && logger.GetV() == 0 { return sink.handler } handler := &slogHandler{sink: logger.GetSink(), levelBias: slog.Level(logger.GetV())} if slogSink, ok := handler.sink.(SlogSink); ok { handler.slogSink = slogSink } return handler } // SlogSink is an optional interface that a LogSink can implement to support // logging through the slog.Logger or slog.Handler APIs better. It then should // also support special slog values like slog.Group. When used as a // slog.Handler, the advantages are: // // - stack unwinding gets avoided in favor of logging the pre-recorded PC, // as intended by slog // - proper grouping of key/value pairs via WithGroup // - verbosity levels > slog.LevelInfo can be recorded // - less overhead // // Both APIs (Logger and slog.Logger/Handler) then are supported equally // well. Developers can pick whatever API suits them better and/or mix // packages which use either API in the same binary with a common logging // implementation. // // This interface is necessary because the type implementing the LogSink // interface cannot also implement the slog.Handler interface due to the // different prototype of the common Enabled method. // // An implementation could support both interfaces in two different types, but then // additional interfaces would be needed to convert between those types in FromSlogHandler // and ToSlogHandler. type SlogSink interface { LogSink Handle(ctx context.Context, record slog.Record) error WithAttrs(attrs []slog.Attr) SlogSink WithGroup(name string) SlogSink } ================================================ FILE: vendor/github.com/go-logr/logr/slogsink.go ================================================ //go:build go1.21 // +build go1.21 /* Copyright 2023 The logr Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package logr import ( "context" "log/slog" "runtime" "time" ) var ( _ LogSink = &slogSink{} _ CallDepthLogSink = &slogSink{} _ Underlier = &slogSink{} ) // Underlier is implemented by the LogSink returned by NewFromLogHandler. type Underlier interface { // GetUnderlying returns the Handler used by the LogSink. GetUnderlying() slog.Handler } const ( // nameKey is used to log the `WithName` values as an additional attribute. nameKey = "logger" // errKey is used to log the error parameter of Error as an additional attribute. errKey = "err" ) type slogSink struct { callDepth int name string handler slog.Handler } func (l *slogSink) Init(info RuntimeInfo) { l.callDepth = info.CallDepth } func (l *slogSink) GetUnderlying() slog.Handler { return l.handler } func (l *slogSink) WithCallDepth(depth int) LogSink { newLogger := *l newLogger.callDepth += depth return &newLogger } func (l *slogSink) Enabled(level int) bool { return l.handler.Enabled(context.Background(), slog.Level(-level)) } func (l *slogSink) Info(level int, msg string, kvList ...interface{}) { l.log(nil, msg, slog.Level(-level), kvList...) } func (l *slogSink) Error(err error, msg string, kvList ...interface{}) { l.log(err, msg, slog.LevelError, kvList...) } func (l *slogSink) log(err error, msg string, level slog.Level, kvList ...interface{}) { var pcs [1]uintptr // skip runtime.Callers, this function, Info/Error, and all helper functions above that. runtime.Callers(3+l.callDepth, pcs[:]) record := slog.NewRecord(time.Now(), level, msg, pcs[0]) if l.name != "" { record.AddAttrs(slog.String(nameKey, l.name)) } if err != nil { record.AddAttrs(slog.Any(errKey, err)) } record.Add(kvList...) _ = l.handler.Handle(context.Background(), record) } func (l slogSink) WithName(name string) LogSink { if l.name != "" { l.name += "/" } l.name += name return &l } func (l slogSink) WithValues(kvList ...interface{}) LogSink { l.handler = l.handler.WithAttrs(kvListToAttrs(kvList...)) return &l } func kvListToAttrs(kvList ...interface{}) []slog.Attr { // We don't need the record itself, only its Add method. record := slog.NewRecord(time.Time{}, 0, "", 0) record.Add(kvList...) attrs := make([]slog.Attr, 0, record.NumAttrs()) record.Attrs(func(attr slog.Attr) bool { attrs = append(attrs, attr) return true }) return attrs } ================================================ FILE: vendor/github.com/go-logr/stdr/LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor 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, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/github.com/go-logr/stdr/README.md ================================================ # Minimal Go logging using logr and Go's standard library [![Go Reference](https://pkg.go.dev/badge/github.com/go-logr/stdr.svg)](https://pkg.go.dev/github.com/go-logr/stdr) This package implements the [logr interface](https://github.com/go-logr/logr) in terms of Go's standard log package(https://pkg.go.dev/log). ================================================ FILE: vendor/github.com/go-logr/stdr/stdr.go ================================================ /* Copyright 2019 The logr Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Package stdr implements github.com/go-logr/logr.Logger in terms of // Go's standard log package. package stdr import ( "log" "os" "github.com/go-logr/logr" "github.com/go-logr/logr/funcr" ) // The global verbosity level. See SetVerbosity(). var globalVerbosity int // SetVerbosity sets the global level against which all info logs will be // compared. If this is greater than or equal to the "V" of the logger, the // message will be logged. A higher value here means more logs will be written. // The previous verbosity value is returned. This is not concurrent-safe - // callers must be sure to call it from only one goroutine. func SetVerbosity(v int) int { old := globalVerbosity globalVerbosity = v return old } // New returns a logr.Logger which is implemented by Go's standard log package, // or something like it. If std is nil, this will use a default logger // instead. // // Example: stdr.New(log.New(os.Stderr, "", log.LstdFlags|log.Lshortfile))) func New(std StdLogger) logr.Logger { return NewWithOptions(std, Options{}) } // NewWithOptions returns a logr.Logger which is implemented by Go's standard // log package, or something like it. See New for details. func NewWithOptions(std StdLogger, opts Options) logr.Logger { if std == nil { // Go's log.Default() is only available in 1.16 and higher. std = log.New(os.Stderr, "", log.LstdFlags) } if opts.Depth < 0 { opts.Depth = 0 } fopts := funcr.Options{ LogCaller: funcr.MessageClass(opts.LogCaller), } sl := &logger{ Formatter: funcr.NewFormatter(fopts), std: std, } // For skipping our own logger.Info/Error. sl.Formatter.AddCallDepth(1 + opts.Depth) return logr.New(sl) } // Options carries parameters which influence the way logs are generated. type Options struct { // Depth biases the assumed number of call frames to the "true" caller. // This is useful when the calling code calls a function which then calls // stdr (e.g. a logging shim to another API). Values less than zero will // be treated as zero. Depth int // LogCaller tells stdr to add a "caller" key to some or all log lines. // Go's log package has options to log this natively, too. LogCaller MessageClass // TODO: add an option to log the date/time } // MessageClass indicates which category or categories of messages to consider. type MessageClass int const ( // None ignores all message classes. None MessageClass = iota // All considers all message classes. All // Info only considers info messages. Info // Error only considers error messages. Error ) // StdLogger is the subset of the Go stdlib log.Logger API that is needed for // this adapter. type StdLogger interface { // Output is the same as log.Output and log.Logger.Output. Output(calldepth int, logline string) error } type logger struct { funcr.Formatter std StdLogger } var _ logr.LogSink = &logger{} var _ logr.CallDepthLogSink = &logger{} func (l logger) Enabled(level int) bool { return globalVerbosity >= level } func (l logger) Info(level int, msg string, kvList ...interface{}) { prefix, args := l.FormatInfo(level, msg, kvList) if prefix != "" { args = prefix + ": " + args } _ = l.std.Output(l.Formatter.GetDepth()+1, args) } func (l logger) Error(err error, msg string, kvList ...interface{}) { prefix, args := l.FormatError(err, msg, kvList) if prefix != "" { args = prefix + ": " + args } _ = l.std.Output(l.Formatter.GetDepth()+1, args) } func (l logger) WithName(name string) logr.LogSink { l.Formatter.AddName(name) return &l } func (l logger) WithValues(kvList ...interface{}) logr.LogSink { l.Formatter.AddValues(kvList) return &l } func (l logger) WithCallDepth(depth int) logr.LogSink { l.Formatter.AddCallDepth(depth) return &l } // Underlier exposes access to the underlying logging implementation. Since // callers only have a logr.Logger, they have to know which implementation is // in use, so this interface is less of an abstraction and more of way to test // type conversion. type Underlier interface { GetUnderlying() StdLogger } // GetUnderlying returns the StdLogger underneath this logger. Since StdLogger // is itself an interface, the result may or may not be a Go log.Logger. func (l logger) GetUnderlying() StdLogger { return l.std } ================================================ FILE: vendor/github.com/goccy/go-yaml/.codecov.yml ================================================ codecov: require_ci_to_pass: yes coverage: precision: 2 round: down range: "70...100" status: project: default: target: 75% threshold: 2% patch: off changes: no parsers: gcov: branch_detection: conditional: yes loop: yes method: no macro: no comment: layout: "header,diff" behavior: default require_changes: no ignore: - ast ================================================ FILE: vendor/github.com/goccy/go-yaml/CHANGELOG.md ================================================ # 1.10.1 - 2023-03-28 ### Features - Quote YAML 1.1 bools at encoding time for compatibility with other legacy parsers - Add support of 32-bit architecture ### Fix bugs - Don't trim all space characters in block style sequence - Support strings starting with `@` # 1.10.0 - 2023-03-01 ### Fix bugs Reversible conversion of comments was not working in various cases, which has been corrected. **Breaking Change** exists in the comment map interface. However, if you are dealing with CommentMap directly, there is no problem. # 1.9.8 - 2022-12-19 ### Fix feature - Append new line at the end of file ( #329 ) ### Fix bugs - Fix custom marshaler ( #333, #334 ) - Fix behavior when struct fields conflicted( #335 ) - Fix position calculation for literal, folded and raw folded strings ( #330 ) # 1.9.7 - 2022-12-03 ### Fix bugs - Fix handling of quoted map key ( #328 ) - Fix resusing process of scanning context ( #322 ) ## v1.9.6 - 2022-10-26 ### New Features - Introduce MapKeyNode interface to limit node types for map key ( #312 ) ### Fix bugs - Quote strings with special characters in flow mode ( #270 ) - typeError implements PrettyPrinter interface ( #280 ) - Fix incorrect const type ( #284 ) - Fix large literals type inference on 32 bits ( #293 ) - Fix UTF-8 characters ( #294 ) - Fix decoding of unknown aliases ( #317 ) - Fix stream encoder for insert a separator between each encoded document ( #318 ) ### Update - Update golang.org/x/sys ( #289 ) - Update Go version in CI ( #295 ) - Add test cases for missing keys to struct literals ( #300 ) ## v1.9.5 - 2022-01-12 ### New Features * Add UseSingleQuote option ( #265 ) ### Fix bugs * Preserve defaults while decoding nested structs ( #260 ) * Fix minor typo in decodeInit error ( #264 ) * Handle empty sequence entries ( #275 ) * Fix encoding of sequence with multiline string ( #276 ) * Fix encoding of BytesMarshaler type ( #277 ) * Fix indentState logic for multi-line value ( #278 ) ## v1.9.4 - 2021-10-12 ### Fix bugs * Keep prev/next reference between tokens containing comments when filtering comment tokens ( #257 ) * Supports escaping reserved keywords in PathBuilder ( #258 ) ## v1.9.3 - 2021-09-07 ### New Features * Support encoding and decoding `time.Duration` fields ( #246 ) * Allow reserved characters for key name in YAMLPath ( #251 ) * Support getting YAMLPath from ast.Node ( #252 ) * Support CommentToMap option ( #253 ) ### Fix bugs * Fix encoding nested sequences with `yaml.IndentSequence` ( #241 ) * Fix error reporting on inline structs in strict mode ( #244, #245 ) * Fix encoding of large floats ( #247 ) ### Improve workflow * Migrate CI from CircleCI to GitHub Action ( #249 ) * Add workflow for ycat ( #250 ) ## v1.9.2 - 2021-07-26 ### Support WithComment option ( #238 ) `yaml.WithComment` is a option for encoding with comment. The position where you want to add a comment is represented by YAMLPath, and it is the key of `yaml.CommentMap`. Also, you can select `Head` comment or `Line` comment as the comment type. ## v1.9.1 - 2021-07-20 ### Fix DecodeFromNode ( #237 ) - Fix YAML handling where anchor exists ## v1.9.0 - 2021-07-19 ### New features - Support encoding of comment node ( #233 ) - Support `yaml.NodeToValue(ast.Node, interface{}, ...DecodeOption) error` ( #236 ) - Can convert a AST node to a value directly ### Fix decoder for comment - Fix parsing of literal with comment ( #234 ) ### Rename API ( #235 ) - Rename `MarshalWithContext` to `MarshalContext` - Rename `UnmarshalWithContext` to `UnmarshalContext` ## v1.8.10 - 2021-07-02 ### Fixed bugs - Fix searching anchor by alias name ( #212 ) - Fixing Issue 186, scanner should account for newline characters when processing multi-line text. Without this source annotations line/column number (for this and all subsequent tokens) is inconsistent with plain text editors. e.g. https://github.com/goccy/go-yaml/issues/186. This addresses the issue specifically for single and double quote text only. ( #210 ) - Add error for unterminated flow mapping node ( #213 ) - Handle missing required field validation ( #221 ) - Nicely format unexpected node type errors ( #229 ) - Support to encode map which has defined type key ( #231 ) ### New features - Support sequence indentation by EncodeOption ( #232 ) ## v1.8.9 - 2021-03-01 ### Fixed bugs - Fix origin buffer for DocumentHeader and DocumentEnd and Directive - Fix origin buffer for anchor value - Fix syntax error about map value - Fix parsing MergeKey ('<<') characters - Fix encoding of float value - Fix incorrect column annotation when single or double quotes are used ### New features - Support to encode/decode of ast.Node directly ================================================ FILE: vendor/github.com/goccy/go-yaml/LICENSE ================================================ MIT License Copyright (c) 2019 Masaaki Goshima 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. ================================================ FILE: vendor/github.com/goccy/go-yaml/Makefile ================================================ .PHONY: test test: go test -v -race ./... .PHONY: simple-test simple-test: go test -v ./... .PHONY: cover cover: go test -coverprofile=cover.out ./... .PHONY: cover-html cover-html: cover go tool cover -html=cover.out .PHONY: ycat/build ycat/build: go build -o ycat ./cmd/ycat ================================================ FILE: vendor/github.com/goccy/go-yaml/README.md ================================================ # YAML support for the Go language [![PkgGoDev](https://pkg.go.dev/badge/github.com/goccy/go-yaml)](https://pkg.go.dev/github.com/goccy/go-yaml) ![Go](https://github.com/goccy/go-yaml/workflows/Go/badge.svg) [![codecov](https://codecov.io/gh/goccy/go-yaml/branch/master/graph/badge.svg)](https://codecov.io/gh/goccy/go-yaml) [![Go Report Card](https://goreportcard.com/badge/github.com/goccy/go-yaml)](https://goreportcard.com/report/github.com/goccy/go-yaml) # Why a new library? As of this writing, there already exists a de facto standard library for YAML processing for Go: [https://github.com/go-yaml/yaml](https://github.com/go-yaml/yaml). However we feel that some features are lacking, namely: - Pretty format for error notifications - Direct manipulation of YAML abstract syntax tree - Support for `Anchor` and `Alias` when marshaling - Allow referencing elements declared in another file via anchors # Features - Pretty format for error notifications - Supports `Scanner` or `Lexer` or `Parser` as public API - Supports `Anchor` and `Alias` to Marshaler - Allow referencing elements declared in another file via anchors - Extract value or AST by YAMLPath ( YAMLPath is like a JSONPath ) # Installation ```sh go get -u github.com/goccy/go-yaml ``` # Synopsis ## 1. Simple Encode/Decode Has an interface like `go-yaml/yaml` using `reflect` ```go var v struct { A int B string } v.A = 1 v.B = "hello" bytes, err := yaml.Marshal(v) if err != nil { //... } fmt.Println(string(bytes)) // "a: 1\nb: hello\n" ``` ```go yml := ` %YAML 1.2 --- a: 1 b: c ` var v struct { A int B string } if err := yaml.Unmarshal([]byte(yml), &v); err != nil { //... } ``` To control marshal/unmarshal behavior, you can use the `yaml` tag. ```go yml := `--- foo: 1 bar: c ` var v struct { A int `yaml:"foo"` B string `yaml:"bar"` } if err := yaml.Unmarshal([]byte(yml), &v); err != nil { //... } ``` For convenience, we also accept the `json` tag. Note that not all options from the `json` tag will have significance when parsing YAML documents. If both tags exist, `yaml` tag will take precedence. ```go yml := `--- foo: 1 bar: c ` var v struct { A int `json:"foo"` B string `json:"bar"` } if err := yaml.Unmarshal([]byte(yml), &v); err != nil { //... } ``` For custom marshal/unmarshaling, implement either `Bytes` or `Interface` variant of marshaler/unmarshaler. The difference is that while `BytesMarshaler`/`BytesUnmarshaler` behaves like [`encoding/json`](https://pkg.go.dev/encoding/json) and `InterfaceMarshaler`/`InterfaceUnmarshaler` behaves like [`gopkg.in/yaml.v2`](https://pkg.go.dev/gopkg.in/yaml.v2). Semantically both are the same, but they differ in performance. Because indentation matters in YAML, you cannot simply accept a valid YAML fragment from a Marshaler, and expect it to work when it is attached to the parent container's serialized form. Therefore when we receive use the `BytesMarshaler`, which returns `[]byte`, we must decode it once to figure out how to make it work in the given context. If you use the `InterfaceMarshaler`, we can skip the decoding. If you are repeatedly marshaling complex objects, the latter is always better performance wise. But if you are, for example, just providing a choice between a config file format that is read only once, the former is probably easier to code. ## 2. Reference elements declared in another file `testdata` directory contains `anchor.yml` file: ```shell ├── testdata    └── anchor.yml ``` And `anchor.yml` is defined as follows: ```yaml a: &a b: 1 c: hello ``` Then, if `yaml.ReferenceDirs("testdata")` option is passed to `yaml.Decoder`, `Decoder` tries to find the anchor definition from YAML files the under `testdata` directory. ```go buf := bytes.NewBufferString("a: *a\n") dec := yaml.NewDecoder(buf, yaml.ReferenceDirs("testdata")) var v struct { A struct { B int C string } } if err := dec.Decode(&v); err != nil { //... } fmt.Printf("%+v\n", v) // {A:{B:1 C:hello}} ``` ## 3. Encode with `Anchor` and `Alias` ### 3.1. Explicitly declared `Anchor` name and `Alias` name If you want to use `anchor` or `alias`, you can define it as a struct tag. ```go type T struct { A int B string } var v struct { C *T `yaml:"c,anchor=x"` D *T `yaml:"d,alias=x"` } v.C = &T{A: 1, B: "hello"} v.D = v.C bytes, err := yaml.Marshal(v) if err != nil { panic(err) } fmt.Println(string(bytes)) /* c: &x a: 1 b: hello d: *x */ ``` ### 3.2. Implicitly declared `Anchor` and `Alias` names If you do not explicitly declare the anchor name, the default behavior is to use the equivalent of `strings.ToLower($FieldName)` as the name of the anchor. If you do not explicitly declare the alias name AND the value is a pointer to another element, we look up the anchor name by finding out which anchor field the value is assigned to by looking up its pointer address. ```go type T struct { I int S string } var v struct { A *T `yaml:"a,anchor"` B *T `yaml:"b,anchor"` C *T `yaml:"c,alias"` D *T `yaml:"d,alias"` } v.A = &T{I: 1, S: "hello"} v.B = &T{I: 2, S: "world"} v.C = v.A // C has same pointer address to A v.D = v.B // D has same pointer address to B bytes, err := yaml.Marshal(v) if err != nil { //... } fmt.Println(string(bytes)) /* a: &a i: 1 s: hello b: &b i: 2 s: world c: *a d: *b */ ``` ### 3.3 MergeKey and Alias Merge key and alias ( `<<: *alias` ) can be used by embedding a structure with the `inline,alias` tag. ```go type Person struct { *Person `yaml:",omitempty,inline,alias"` // embed Person type for default value Name string `yaml:",omitempty"` Age int `yaml:",omitempty"` } defaultPerson := &Person{ Name: "John Smith", Age: 20, } people := []*Person{ { Person: defaultPerson, // assign default value Name: "Ken", // override Name property Age: 10, // override Age property }, { Person: defaultPerson, // assign default value only }, } var doc struct { Default *Person `yaml:"default,anchor"` People []*Person `yaml:"people"` } doc.Default = defaultPerson doc.People = people bytes, err := yaml.Marshal(doc) if err != nil { //... } fmt.Println(string(bytes)) /* default: &default name: John Smith age: 20 people: - <<: *default name: Ken age: 10 - <<: *default */ ``` ## 4. Pretty Formatted Errors Error values produced during parsing have two extra features over regular error values. First, by default, they contain extra information on the location of the error from the source YAML document, to make it easier to find the error location. Second, the error messages can optionally be colorized. If you would like to control exactly how the output looks like, consider using `yaml.FormatError`, which accepts two boolean values to control turning these features on or off. ## 5. Use YAMLPath ```go yml := ` store: book: - author: john price: 10 - author: ken price: 12 bicycle: color: red price: 19.95 ` path, err := yaml.PathString("$.store.book[*].author") if err != nil { //... } var authors []string if err := path.Read(strings.NewReader(yml), &authors); err != nil { //... } fmt.Println(authors) // [john ken] ``` ### 5.1 Print customized error with YAML source code ```go package main import ( "fmt" "github.com/goccy/go-yaml" ) func main() { yml := ` a: 1 b: "hello" ` var v struct { A int B string } if err := yaml.Unmarshal([]byte(yml), &v); err != nil { panic(err) } if v.A != 2 { // output error with YAML source path, err := yaml.PathString("$.a") if err != nil { panic(err) } source, err := path.AnnotateSource([]byte(yml), true) if err != nil { panic(err) } fmt.Printf("a value expected 2 but actual %d:\n%s\n", v.A, string(source)) } } ``` output result is the following: # Tools ## ycat print yaml file with color ycat ### Installation ```sh go install github.com/goccy/go-yaml/cmd/ycat@latest ``` # Looking for Sponsors I'm looking for sponsors this library. This library is being developed as a personal project in my spare time. If you want a quick response or problem resolution when using this library in your project, please register as a [sponsor](https://github.com/sponsors/goccy). I will cooperate as much as possible. Of course, this library is developed as an MIT license, so you can use it freely for free. # License MIT ================================================ FILE: vendor/github.com/goccy/go-yaml/ast/ast.go ================================================ package ast import ( "fmt" "io" "math" "strconv" "strings" "github.com/goccy/go-yaml/token" "golang.org/x/xerrors" ) var ( ErrInvalidTokenType = xerrors.New("invalid token type") ErrInvalidAnchorName = xerrors.New("invalid anchor name") ErrInvalidAliasName = xerrors.New("invalid alias name") ) // NodeType type identifier of node type NodeType int const ( // UnknownNodeType type identifier for default UnknownNodeType NodeType = iota // DocumentType type identifier for document node DocumentType // NullType type identifier for null node NullType // BoolType type identifier for boolean node BoolType // IntegerType type identifier for integer node IntegerType // FloatType type identifier for float node FloatType // InfinityType type identifier for infinity node InfinityType // NanType type identifier for nan node NanType // StringType type identifier for string node StringType // MergeKeyType type identifier for merge key node MergeKeyType // LiteralType type identifier for literal node LiteralType // MappingType type identifier for mapping node MappingType // MappingKeyType type identifier for mapping key node MappingKeyType // MappingValueType type identifier for mapping value node MappingValueType // SequenceType type identifier for sequence node SequenceType // AnchorType type identifier for anchor node AnchorType // AliasType type identifier for alias node AliasType // DirectiveType type identifier for directive node DirectiveType // TagType type identifier for tag node TagType // CommentType type identifier for comment node CommentType // CommentGroupType type identifier for comment group node CommentGroupType ) // String node type identifier to text func (t NodeType) String() string { switch t { case UnknownNodeType: return "UnknownNode" case DocumentType: return "Document" case NullType: return "Null" case BoolType: return "Bool" case IntegerType: return "Integer" case FloatType: return "Float" case InfinityType: return "Infinity" case NanType: return "Nan" case StringType: return "String" case MergeKeyType: return "MergeKey" case LiteralType: return "Literal" case MappingType: return "Mapping" case MappingKeyType: return "MappingKey" case MappingValueType: return "MappingValue" case SequenceType: return "Sequence" case AnchorType: return "Anchor" case AliasType: return "Alias" case DirectiveType: return "Directive" case TagType: return "Tag" case CommentType: return "Comment" case CommentGroupType: return "CommentGroup" } return "" } // String node type identifier to YAML Structure name // based on https://yaml.org/spec/1.2/spec.html func (t NodeType) YAMLName() string { switch t { case UnknownNodeType: return "unknown" case DocumentType: return "document" case NullType: return "null" case BoolType: return "boolean" case IntegerType: return "int" case FloatType: return "float" case InfinityType: return "inf" case NanType: return "nan" case StringType: return "string" case MergeKeyType: return "merge key" case LiteralType: return "scalar" case MappingType: return "mapping" case MappingKeyType: return "key" case MappingValueType: return "value" case SequenceType: return "sequence" case AnchorType: return "anchor" case AliasType: return "alias" case DirectiveType: return "directive" case TagType: return "tag" case CommentType: return "comment" case CommentGroupType: return "comment" } return "" } // Node type of node type Node interface { io.Reader // String node to text String() string // GetToken returns token instance GetToken() *token.Token // Type returns type of node Type() NodeType // AddColumn add column number to child nodes recursively AddColumn(int) // SetComment set comment token to node SetComment(*CommentGroupNode) error // Comment returns comment token instance GetComment() *CommentGroupNode // GetPath returns YAMLPath for the current node GetPath() string // SetPath set YAMLPath for the current node SetPath(string) // MarshalYAML MarshalYAML() ([]byte, error) // already read length readLen() int // append read length addReadLen(int) // clean read length clearLen() } // MapKeyNode type for map key node type MapKeyNode interface { Node // String node to text without comment stringWithoutComment() string } // ScalarNode type for scalar node type ScalarNode interface { MapKeyNode GetValue() interface{} } type BaseNode struct { Path string Comment *CommentGroupNode read int } func addCommentString(base string, node *CommentGroupNode) string { return fmt.Sprintf("%s %s", base, node.String()) } func (n *BaseNode) readLen() int { return n.read } func (n *BaseNode) clearLen() { n.read = 0 } func (n *BaseNode) addReadLen(len int) { n.read += len } // GetPath returns YAMLPath for the current node. func (n *BaseNode) GetPath() string { if n == nil { return "" } return n.Path } // SetPath set YAMLPath for the current node. func (n *BaseNode) SetPath(path string) { if n == nil { return } n.Path = path } // GetComment returns comment token instance func (n *BaseNode) GetComment() *CommentGroupNode { return n.Comment } // SetComment set comment token func (n *BaseNode) SetComment(node *CommentGroupNode) error { n.Comment = node return nil } func min(a, b int) int { if a < b { return a } return b } func readNode(p []byte, node Node) (int, error) { s := node.String() readLen := node.readLen() remain := len(s) - readLen if remain == 0 { node.clearLen() return 0, io.EOF } size := min(remain, len(p)) for idx, b := range []byte(s[readLen : readLen+size]) { p[idx] = byte(b) } node.addReadLen(size) return size, nil } // Null create node for null value func Null(tk *token.Token) *NullNode { return &NullNode{ BaseNode: &BaseNode{}, Token: tk, } } // Bool create node for boolean value func Bool(tk *token.Token) *BoolNode { b, _ := strconv.ParseBool(tk.Value) return &BoolNode{ BaseNode: &BaseNode{}, Token: tk, Value: b, } } // Integer create node for integer value func Integer(tk *token.Token) *IntegerNode { value := removeUnderScoreFromNumber(tk.Value) switch tk.Type { case token.BinaryIntegerType: // skip two characters because binary token starts with '0b' skipCharacterNum := 2 negativePrefix := "" if value[0] == '-' { skipCharacterNum++ negativePrefix = "-" } if len(negativePrefix) > 0 { i, _ := strconv.ParseInt(negativePrefix+value[skipCharacterNum:], 2, 64) return &IntegerNode{ BaseNode: &BaseNode{}, Token: tk, Value: i, } } i, _ := strconv.ParseUint(negativePrefix+value[skipCharacterNum:], 2, 64) return &IntegerNode{ BaseNode: &BaseNode{}, Token: tk, Value: i, } case token.OctetIntegerType: // octet token starts with '0o' or '-0o' or '0' or '-0' skipCharacterNum := 1 negativePrefix := "" if value[0] == '-' { skipCharacterNum++ if len(value) > 2 && value[2] == 'o' { skipCharacterNum++ } negativePrefix = "-" } else { if value[1] == 'o' { skipCharacterNum++ } } if len(negativePrefix) > 0 { i, _ := strconv.ParseInt(negativePrefix+value[skipCharacterNum:], 8, 64) return &IntegerNode{ BaseNode: &BaseNode{}, Token: tk, Value: i, } } i, _ := strconv.ParseUint(value[skipCharacterNum:], 8, 64) return &IntegerNode{ BaseNode: &BaseNode{}, Token: tk, Value: i, } case token.HexIntegerType: // hex token starts with '0x' or '-0x' skipCharacterNum := 2 negativePrefix := "" if value[0] == '-' { skipCharacterNum++ negativePrefix = "-" } if len(negativePrefix) > 0 { i, _ := strconv.ParseInt(negativePrefix+value[skipCharacterNum:], 16, 64) return &IntegerNode{ BaseNode: &BaseNode{}, Token: tk, Value: i, } } i, _ := strconv.ParseUint(value[skipCharacterNum:], 16, 64) return &IntegerNode{ BaseNode: &BaseNode{}, Token: tk, Value: i, } } if value[0] == '-' || value[0] == '+' { i, _ := strconv.ParseInt(value, 10, 64) return &IntegerNode{ BaseNode: &BaseNode{}, Token: tk, Value: i, } } i, _ := strconv.ParseUint(value, 10, 64) return &IntegerNode{ BaseNode: &BaseNode{}, Token: tk, Value: i, } } // Float create node for float value func Float(tk *token.Token) *FloatNode { f, _ := strconv.ParseFloat(removeUnderScoreFromNumber(tk.Value), 64) return &FloatNode{ BaseNode: &BaseNode{}, Token: tk, Value: f, } } // Infinity create node for .inf or -.inf value func Infinity(tk *token.Token) *InfinityNode { node := &InfinityNode{ BaseNode: &BaseNode{}, Token: tk, } switch tk.Value { case ".inf", ".Inf", ".INF": node.Value = math.Inf(0) case "-.inf", "-.Inf", "-.INF": node.Value = math.Inf(-1) } return node } // Nan create node for .nan value func Nan(tk *token.Token) *NanNode { return &NanNode{ BaseNode: &BaseNode{}, Token: tk, } } // String create node for string value func String(tk *token.Token) *StringNode { return &StringNode{ BaseNode: &BaseNode{}, Token: tk, Value: tk.Value, } } // Comment create node for comment func Comment(tk *token.Token) *CommentNode { return &CommentNode{ BaseNode: &BaseNode{}, Token: tk, } } func CommentGroup(comments []*token.Token) *CommentGroupNode { nodes := []*CommentNode{} for _, comment := range comments { nodes = append(nodes, Comment(comment)) } return &CommentGroupNode{ BaseNode: &BaseNode{}, Comments: nodes, } } // MergeKey create node for merge key ( << ) func MergeKey(tk *token.Token) *MergeKeyNode { return &MergeKeyNode{ BaseNode: &BaseNode{}, Token: tk, } } // Mapping create node for map func Mapping(tk *token.Token, isFlowStyle bool, values ...*MappingValueNode) *MappingNode { node := &MappingNode{ BaseNode: &BaseNode{}, Start: tk, IsFlowStyle: isFlowStyle, Values: []*MappingValueNode{}, } node.Values = append(node.Values, values...) return node } // MappingValue create node for mapping value func MappingValue(tk *token.Token, key MapKeyNode, value Node) *MappingValueNode { return &MappingValueNode{ BaseNode: &BaseNode{}, Start: tk, Key: key, Value: value, } } // MappingKey create node for map key ( '?' ). func MappingKey(tk *token.Token) *MappingKeyNode { return &MappingKeyNode{ BaseNode: &BaseNode{}, Start: tk, } } // Sequence create node for sequence func Sequence(tk *token.Token, isFlowStyle bool) *SequenceNode { return &SequenceNode{ BaseNode: &BaseNode{}, Start: tk, IsFlowStyle: isFlowStyle, Values: []Node{}, } } func Anchor(tk *token.Token) *AnchorNode { return &AnchorNode{ BaseNode: &BaseNode{}, Start: tk, } } func Alias(tk *token.Token) *AliasNode { return &AliasNode{ BaseNode: &BaseNode{}, Start: tk, } } func Document(tk *token.Token, body Node) *DocumentNode { return &DocumentNode{ BaseNode: &BaseNode{}, Start: tk, Body: body, } } func Directive(tk *token.Token) *DirectiveNode { return &DirectiveNode{ BaseNode: &BaseNode{}, Start: tk, } } func Literal(tk *token.Token) *LiteralNode { return &LiteralNode{ BaseNode: &BaseNode{}, Start: tk, } } func Tag(tk *token.Token) *TagNode { return &TagNode{ BaseNode: &BaseNode{}, Start: tk, } } // File contains all documents in YAML file type File struct { Name string Docs []*DocumentNode } // Read implements (io.Reader).Read func (f *File) Read(p []byte) (int, error) { for _, doc := range f.Docs { n, err := doc.Read(p) if err == io.EOF { continue } return n, nil } return 0, io.EOF } // String all documents to text func (f *File) String() string { docs := []string{} for _, doc := range f.Docs { docs = append(docs, doc.String()) } if len(docs) > 0 { return strings.Join(docs, "\n") + "\n" } else { return "" } } // DocumentNode type of Document type DocumentNode struct { *BaseNode Start *token.Token // position of DocumentHeader ( `---` ) End *token.Token // position of DocumentEnd ( `...` ) Body Node } // Read implements (io.Reader).Read func (d *DocumentNode) Read(p []byte) (int, error) { return readNode(p, d) } // Type returns DocumentNodeType func (d *DocumentNode) Type() NodeType { return DocumentType } // GetToken returns token instance func (d *DocumentNode) GetToken() *token.Token { return d.Body.GetToken() } // AddColumn add column number to child nodes recursively func (d *DocumentNode) AddColumn(col int) { if d.Body != nil { d.Body.AddColumn(col) } } // String document to text func (d *DocumentNode) String() string { doc := []string{} if d.Start != nil { doc = append(doc, d.Start.Value) } doc = append(doc, d.Body.String()) if d.End != nil { doc = append(doc, d.End.Value) } return strings.Join(doc, "\n") } // MarshalYAML encodes to a YAML text func (d *DocumentNode) MarshalYAML() ([]byte, error) { return []byte(d.String()), nil } func removeUnderScoreFromNumber(num string) string { return strings.ReplaceAll(num, "_", "") } // NullNode type of null node type NullNode struct { *BaseNode Token *token.Token } // Read implements (io.Reader).Read func (n *NullNode) Read(p []byte) (int, error) { return readNode(p, n) } // Type returns NullType func (n *NullNode) Type() NodeType { return NullType } // GetToken returns token instance func (n *NullNode) GetToken() *token.Token { return n.Token } // AddColumn add column number to child nodes recursively func (n *NullNode) AddColumn(col int) { n.Token.AddColumn(col) } // GetValue returns nil value func (n *NullNode) GetValue() interface{} { return nil } // String returns `null` text func (n *NullNode) String() string { if n.Comment != nil { return addCommentString("null", n.Comment) } return n.stringWithoutComment() } func (n *NullNode) stringWithoutComment() string { return "null" } // MarshalYAML encodes to a YAML text func (n *NullNode) MarshalYAML() ([]byte, error) { return []byte(n.String()), nil } // IntegerNode type of integer node type IntegerNode struct { *BaseNode Token *token.Token Value interface{} // int64 or uint64 value } // Read implements (io.Reader).Read func (n *IntegerNode) Read(p []byte) (int, error) { return readNode(p, n) } // Type returns IntegerType func (n *IntegerNode) Type() NodeType { return IntegerType } // GetToken returns token instance func (n *IntegerNode) GetToken() *token.Token { return n.Token } // AddColumn add column number to child nodes recursively func (n *IntegerNode) AddColumn(col int) { n.Token.AddColumn(col) } // GetValue returns int64 value func (n *IntegerNode) GetValue() interface{} { return n.Value } // String int64 to text func (n *IntegerNode) String() string { if n.Comment != nil { return addCommentString(n.Token.Value, n.Comment) } return n.stringWithoutComment() } func (n *IntegerNode) stringWithoutComment() string { return n.Token.Value } // MarshalYAML encodes to a YAML text func (n *IntegerNode) MarshalYAML() ([]byte, error) { return []byte(n.String()), nil } // FloatNode type of float node type FloatNode struct { *BaseNode Token *token.Token Precision int Value float64 } // Read implements (io.Reader).Read func (n *FloatNode) Read(p []byte) (int, error) { return readNode(p, n) } // Type returns FloatType func (n *FloatNode) Type() NodeType { return FloatType } // GetToken returns token instance func (n *FloatNode) GetToken() *token.Token { return n.Token } // AddColumn add column number to child nodes recursively func (n *FloatNode) AddColumn(col int) { n.Token.AddColumn(col) } // GetValue returns float64 value func (n *FloatNode) GetValue() interface{} { return n.Value } // String float64 to text func (n *FloatNode) String() string { if n.Comment != nil { return addCommentString(n.Token.Value, n.Comment) } return n.stringWithoutComment() } func (n *FloatNode) stringWithoutComment() string { return n.Token.Value } // MarshalYAML encodes to a YAML text func (n *FloatNode) MarshalYAML() ([]byte, error) { return []byte(n.String()), nil } // StringNode type of string node type StringNode struct { *BaseNode Token *token.Token Value string } // Read implements (io.Reader).Read func (n *StringNode) Read(p []byte) (int, error) { return readNode(p, n) } // Type returns StringType func (n *StringNode) Type() NodeType { return StringType } // GetToken returns token instance func (n *StringNode) GetToken() *token.Token { return n.Token } // AddColumn add column number to child nodes recursively func (n *StringNode) AddColumn(col int) { n.Token.AddColumn(col) } // GetValue returns string value func (n *StringNode) GetValue() interface{} { return n.Value } // escapeSingleQuote escapes s to a single quoted scalar. // https://yaml.org/spec/1.2.2/#732-single-quoted-style func escapeSingleQuote(s string) string { var sb strings.Builder growLen := len(s) + // s includes also one ' from the doubled pair 2 + // opening and closing ' strings.Count(s, "'") // ' added by ReplaceAll sb.Grow(growLen) sb.WriteString("'") sb.WriteString(strings.ReplaceAll(s, "'", "''")) sb.WriteString("'") return sb.String() } // String string value to text with quote or literal header if required func (n *StringNode) String() string { switch n.Token.Type { case token.SingleQuoteType: quoted := escapeSingleQuote(n.Value) if n.Comment != nil { return addCommentString(quoted, n.Comment) } return quoted case token.DoubleQuoteType: quoted := strconv.Quote(n.Value) if n.Comment != nil { return addCommentString(quoted, n.Comment) } return quoted } lbc := token.DetectLineBreakCharacter(n.Value) if strings.Contains(n.Value, lbc) { // This block assumes that the line breaks in this inside scalar content and the Outside scalar content are the same. // It works mostly, but inconsistencies occur if line break characters are mixed. header := token.LiteralBlockHeader(n.Value) space := strings.Repeat(" ", n.Token.Position.Column-1) values := []string{} for _, v := range strings.Split(n.Value, lbc) { values = append(values, fmt.Sprintf("%s %s", space, v)) } block := strings.TrimSuffix(strings.TrimSuffix(strings.Join(values, lbc), fmt.Sprintf("%s %s", lbc, space)), fmt.Sprintf(" %s", space)) return fmt.Sprintf("%s%s%s", header, lbc, block) } else if len(n.Value) > 0 && (n.Value[0] == '{' || n.Value[0] == '[') { return fmt.Sprintf(`'%s'`, n.Value) } if n.Comment != nil { return addCommentString(n.Value, n.Comment) } return n.Value } func (n *StringNode) stringWithoutComment() string { switch n.Token.Type { case token.SingleQuoteType: quoted := fmt.Sprintf(`'%s'`, n.Value) return quoted case token.DoubleQuoteType: quoted := strconv.Quote(n.Value) return quoted } lbc := token.DetectLineBreakCharacter(n.Value) if strings.Contains(n.Value, lbc) { // This block assumes that the line breaks in this inside scalar content and the Outside scalar content are the same. // It works mostly, but inconsistencies occur if line break characters are mixed. header := token.LiteralBlockHeader(n.Value) space := strings.Repeat(" ", n.Token.Position.Column-1) values := []string{} for _, v := range strings.Split(n.Value, lbc) { values = append(values, fmt.Sprintf("%s %s", space, v)) } block := strings.TrimSuffix(strings.TrimSuffix(strings.Join(values, lbc), fmt.Sprintf("%s %s", lbc, space)), fmt.Sprintf(" %s", space)) return fmt.Sprintf("%s%s%s", header, lbc, block) } else if len(n.Value) > 0 && (n.Value[0] == '{' || n.Value[0] == '[') { return fmt.Sprintf(`'%s'`, n.Value) } return n.Value } // MarshalYAML encodes to a YAML text func (n *StringNode) MarshalYAML() ([]byte, error) { return []byte(n.String()), nil } // LiteralNode type of literal node type LiteralNode struct { *BaseNode Start *token.Token Value *StringNode } // Read implements (io.Reader).Read func (n *LiteralNode) Read(p []byte) (int, error) { return readNode(p, n) } // Type returns LiteralType func (n *LiteralNode) Type() NodeType { return LiteralType } // GetToken returns token instance func (n *LiteralNode) GetToken() *token.Token { return n.Start } // AddColumn add column number to child nodes recursively func (n *LiteralNode) AddColumn(col int) { n.Start.AddColumn(col) if n.Value != nil { n.Value.AddColumn(col) } } // GetValue returns string value func (n *LiteralNode) GetValue() interface{} { return n.String() } // String literal to text func (n *LiteralNode) String() string { origin := n.Value.GetToken().Origin lit := strings.TrimRight(strings.TrimRight(origin, " "), "\n") if n.Comment != nil { return fmt.Sprintf("%s %s\n%s", n.Start.Value, n.Comment.String(), lit) } return fmt.Sprintf("%s\n%s", n.Start.Value, lit) } func (n *LiteralNode) stringWithoutComment() string { return n.String() } // MarshalYAML encodes to a YAML text func (n *LiteralNode) MarshalYAML() ([]byte, error) { return []byte(n.String()), nil } // MergeKeyNode type of merge key node type MergeKeyNode struct { *BaseNode Token *token.Token } // Read implements (io.Reader).Read func (n *MergeKeyNode) Read(p []byte) (int, error) { return readNode(p, n) } // Type returns MergeKeyType func (n *MergeKeyNode) Type() NodeType { return MergeKeyType } // GetToken returns token instance func (n *MergeKeyNode) GetToken() *token.Token { return n.Token } // GetValue returns '<<' value func (n *MergeKeyNode) GetValue() interface{} { return n.Token.Value } // String returns '<<' value func (n *MergeKeyNode) String() string { return n.stringWithoutComment() } func (n *MergeKeyNode) stringWithoutComment() string { return n.Token.Value } // AddColumn add column number to child nodes recursively func (n *MergeKeyNode) AddColumn(col int) { n.Token.AddColumn(col) } // MarshalYAML encodes to a YAML text func (n *MergeKeyNode) MarshalYAML() ([]byte, error) { return []byte(n.String()), nil } // BoolNode type of boolean node type BoolNode struct { *BaseNode Token *token.Token Value bool } // Read implements (io.Reader).Read func (n *BoolNode) Read(p []byte) (int, error) { return readNode(p, n) } // Type returns BoolType func (n *BoolNode) Type() NodeType { return BoolType } // GetToken returns token instance func (n *BoolNode) GetToken() *token.Token { return n.Token } // AddColumn add column number to child nodes recursively func (n *BoolNode) AddColumn(col int) { n.Token.AddColumn(col) } // GetValue returns boolean value func (n *BoolNode) GetValue() interface{} { return n.Value } // String boolean to text func (n *BoolNode) String() string { if n.Comment != nil { return addCommentString(n.Token.Value, n.Comment) } return n.stringWithoutComment() } func (n *BoolNode) stringWithoutComment() string { return n.Token.Value } // MarshalYAML encodes to a YAML text func (n *BoolNode) MarshalYAML() ([]byte, error) { return []byte(n.String()), nil } // InfinityNode type of infinity node type InfinityNode struct { *BaseNode Token *token.Token Value float64 } // Read implements (io.Reader).Read func (n *InfinityNode) Read(p []byte) (int, error) { return readNode(p, n) } // Type returns InfinityType func (n *InfinityNode) Type() NodeType { return InfinityType } // GetToken returns token instance func (n *InfinityNode) GetToken() *token.Token { return n.Token } // AddColumn add column number to child nodes recursively func (n *InfinityNode) AddColumn(col int) { n.Token.AddColumn(col) } // GetValue returns math.Inf(0) or math.Inf(-1) func (n *InfinityNode) GetValue() interface{} { return n.Value } // String infinity to text func (n *InfinityNode) String() string { if n.Comment != nil { return addCommentString(n.Token.Value, n.Comment) } return n.stringWithoutComment() } func (n *InfinityNode) stringWithoutComment() string { return n.Token.Value } // MarshalYAML encodes to a YAML text func (n *InfinityNode) MarshalYAML() ([]byte, error) { return []byte(n.String()), nil } // NanNode type of nan node type NanNode struct { *BaseNode Token *token.Token } // Read implements (io.Reader).Read func (n *NanNode) Read(p []byte) (int, error) { return readNode(p, n) } // Type returns NanType func (n *NanNode) Type() NodeType { return NanType } // GetToken returns token instance func (n *NanNode) GetToken() *token.Token { return n.Token } // AddColumn add column number to child nodes recursively func (n *NanNode) AddColumn(col int) { n.Token.AddColumn(col) } // GetValue returns math.NaN() func (n *NanNode) GetValue() interface{} { return math.NaN() } // String returns .nan func (n *NanNode) String() string { if n.Comment != nil { return addCommentString(n.Token.Value, n.Comment) } return n.stringWithoutComment() } func (n *NanNode) stringWithoutComment() string { return n.Token.Value } // MarshalYAML encodes to a YAML text func (n *NanNode) MarshalYAML() ([]byte, error) { return []byte(n.String()), nil } // MapNode interface of MappingValueNode / MappingNode type MapNode interface { MapRange() *MapNodeIter } // MapNodeIter is an iterator for ranging over a MapNode type MapNodeIter struct { values []*MappingValueNode idx int } const ( startRangeIndex = -1 ) // Next advances the map iterator and reports whether there is another entry. // It returns false when the iterator is exhausted. func (m *MapNodeIter) Next() bool { m.idx++ next := m.idx < len(m.values) return next } // Key returns the key of the iterator's current map node entry. func (m *MapNodeIter) Key() MapKeyNode { return m.values[m.idx].Key } // Value returns the value of the iterator's current map node entry. func (m *MapNodeIter) Value() Node { return m.values[m.idx].Value } // MappingNode type of mapping node type MappingNode struct { *BaseNode Start *token.Token End *token.Token IsFlowStyle bool Values []*MappingValueNode FootComment *CommentGroupNode } func (n *MappingNode) startPos() *token.Position { if len(n.Values) == 0 { return n.Start.Position } return n.Values[0].Key.GetToken().Position } // Merge merge key/value of map. func (n *MappingNode) Merge(target *MappingNode) { keyToMapValueMap := map[string]*MappingValueNode{} for _, value := range n.Values { key := value.Key.String() keyToMapValueMap[key] = value } column := n.startPos().Column - target.startPos().Column target.AddColumn(column) for _, value := range target.Values { mapValue, exists := keyToMapValueMap[value.Key.String()] if exists { mapValue.Value = value.Value } else { n.Values = append(n.Values, value) } } } // SetIsFlowStyle set value to IsFlowStyle field recursively. func (n *MappingNode) SetIsFlowStyle(isFlow bool) { n.IsFlowStyle = isFlow for _, value := range n.Values { value.SetIsFlowStyle(isFlow) } } // Read implements (io.Reader).Read func (n *MappingNode) Read(p []byte) (int, error) { return readNode(p, n) } // Type returns MappingType func (n *MappingNode) Type() NodeType { return MappingType } // GetToken returns token instance func (n *MappingNode) GetToken() *token.Token { return n.Start } // AddColumn add column number to child nodes recursively func (n *MappingNode) AddColumn(col int) { n.Start.AddColumn(col) n.End.AddColumn(col) for _, value := range n.Values { value.AddColumn(col) } } func (n *MappingNode) flowStyleString(commentMode bool) string { values := []string{} for _, value := range n.Values { values = append(values, strings.TrimLeft(value.String(), " ")) } mapText := fmt.Sprintf("{%s}", strings.Join(values, ", ")) if commentMode && n.Comment != nil { return addCommentString(mapText, n.Comment) } return mapText } func (n *MappingNode) blockStyleString(commentMode bool) string { values := []string{} for _, value := range n.Values { values = append(values, value.String()) } mapText := strings.Join(values, "\n") if commentMode && n.Comment != nil { value := values[0] var spaceNum int for i := 0; i < len(value); i++ { if value[i] != ' ' { break } spaceNum++ } comment := n.Comment.StringWithSpace(spaceNum) return fmt.Sprintf("%s\n%s", comment, mapText) } return mapText } // String mapping values to text func (n *MappingNode) String() string { if len(n.Values) == 0 { if n.Comment != nil { return addCommentString("{}", n.Comment) } return "{}" } commentMode := true if n.IsFlowStyle || len(n.Values) == 0 { return n.flowStyleString(commentMode) } return n.blockStyleString(commentMode) } // MapRange implements MapNode protocol func (n *MappingNode) MapRange() *MapNodeIter { return &MapNodeIter{ idx: startRangeIndex, values: n.Values, } } // MarshalYAML encodes to a YAML text func (n *MappingNode) MarshalYAML() ([]byte, error) { return []byte(n.String()), nil } // MappingKeyNode type of tag node type MappingKeyNode struct { *BaseNode Start *token.Token Value Node } // Read implements (io.Reader).Read func (n *MappingKeyNode) Read(p []byte) (int, error) { return readNode(p, n) } // Type returns MappingKeyType func (n *MappingKeyNode) Type() NodeType { return MappingKeyType } // GetToken returns token instance func (n *MappingKeyNode) GetToken() *token.Token { return n.Start } // AddColumn add column number to child nodes recursively func (n *MappingKeyNode) AddColumn(col int) { n.Start.AddColumn(col) if n.Value != nil { n.Value.AddColumn(col) } } // String tag to text func (n *MappingKeyNode) String() string { return n.stringWithoutComment() } func (n *MappingKeyNode) stringWithoutComment() string { return fmt.Sprintf("%s %s", n.Start.Value, n.Value.String()) } // MarshalYAML encodes to a YAML text func (n *MappingKeyNode) MarshalYAML() ([]byte, error) { return []byte(n.String()), nil } // MappingValueNode type of mapping value type MappingValueNode struct { *BaseNode Start *token.Token Key MapKeyNode Value Node FootComment *CommentGroupNode } // Replace replace value node. func (n *MappingValueNode) Replace(value Node) error { column := n.Value.GetToken().Position.Column - value.GetToken().Position.Column value.AddColumn(column) n.Value = value return nil } // Read implements (io.Reader).Read func (n *MappingValueNode) Read(p []byte) (int, error) { return readNode(p, n) } // Type returns MappingValueType func (n *MappingValueNode) Type() NodeType { return MappingValueType } // GetToken returns token instance func (n *MappingValueNode) GetToken() *token.Token { return n.Start } // AddColumn add column number to child nodes recursively func (n *MappingValueNode) AddColumn(col int) { n.Start.AddColumn(col) if n.Key != nil { n.Key.AddColumn(col) } if n.Value != nil { n.Value.AddColumn(col) } } // SetIsFlowStyle set value to IsFlowStyle field recursively. func (n *MappingValueNode) SetIsFlowStyle(isFlow bool) { switch value := n.Value.(type) { case *MappingNode: value.SetIsFlowStyle(isFlow) case *MappingValueNode: value.SetIsFlowStyle(isFlow) case *SequenceNode: value.SetIsFlowStyle(isFlow) } } // String mapping value to text func (n *MappingValueNode) String() string { var text string if n.Comment != nil { text = fmt.Sprintf( "%s\n%s", n.Comment.StringWithSpace(n.Key.GetToken().Position.Column-1), n.toString(), ) } else { text = n.toString() } if n.FootComment != nil { text += fmt.Sprintf("\n%s", n.FootComment.StringWithSpace(n.Key.GetToken().Position.Column-1)) } return text } func (n *MappingValueNode) toString() string { space := strings.Repeat(" ", n.Key.GetToken().Position.Column-1) keyIndentLevel := n.Key.GetToken().Position.IndentLevel valueIndentLevel := n.Value.GetToken().Position.IndentLevel keyComment := n.Key.GetComment() if _, ok := n.Value.(ScalarNode); ok { return fmt.Sprintf("%s%s: %s", space, n.Key.String(), n.Value.String()) } else if keyIndentLevel < valueIndentLevel { if keyComment != nil { return fmt.Sprintf( "%s%s: %s\n%s", space, n.Key.stringWithoutComment(), keyComment.String(), n.Value.String(), ) } return fmt.Sprintf("%s%s:\n%s", space, n.Key.String(), n.Value.String()) } else if m, ok := n.Value.(*MappingNode); ok && (m.IsFlowStyle || len(m.Values) == 0) { return fmt.Sprintf("%s%s: %s", space, n.Key.String(), n.Value.String()) } else if s, ok := n.Value.(*SequenceNode); ok && (s.IsFlowStyle || len(s.Values) == 0) { return fmt.Sprintf("%s%s: %s", space, n.Key.String(), n.Value.String()) } else if _, ok := n.Value.(*AnchorNode); ok { return fmt.Sprintf("%s%s: %s", space, n.Key.String(), n.Value.String()) } else if _, ok := n.Value.(*AliasNode); ok { return fmt.Sprintf("%s%s: %s", space, n.Key.String(), n.Value.String()) } if keyComment != nil { return fmt.Sprintf( "%s%s: %s\n%s", space, n.Key.stringWithoutComment(), keyComment.String(), n.Value.String(), ) } if m, ok := n.Value.(*MappingNode); ok && m.Comment != nil { return fmt.Sprintf( "%s%s: %s", space, n.Key.String(), strings.TrimLeft(n.Value.String(), " "), ) } return fmt.Sprintf("%s%s:\n%s", space, n.Key.String(), n.Value.String()) } // MapRange implements MapNode protocol func (n *MappingValueNode) MapRange() *MapNodeIter { return &MapNodeIter{ idx: startRangeIndex, values: []*MappingValueNode{n}, } } // MarshalYAML encodes to a YAML text func (n *MappingValueNode) MarshalYAML() ([]byte, error) { return []byte(n.String()), nil } // ArrayNode interface of SequenceNode type ArrayNode interface { ArrayRange() *ArrayNodeIter } // ArrayNodeIter is an iterator for ranging over a ArrayNode type ArrayNodeIter struct { values []Node idx int } // Next advances the array iterator and reports whether there is another entry. // It returns false when the iterator is exhausted. func (m *ArrayNodeIter) Next() bool { m.idx++ next := m.idx < len(m.values) return next } // Value returns the value of the iterator's current array entry. func (m *ArrayNodeIter) Value() Node { return m.values[m.idx] } // Len returns length of array func (m *ArrayNodeIter) Len() int { return len(m.values) } // SequenceNode type of sequence node type SequenceNode struct { *BaseNode Start *token.Token End *token.Token IsFlowStyle bool Values []Node ValueHeadComments []*CommentGroupNode FootComment *CommentGroupNode } // Replace replace value node. func (n *SequenceNode) Replace(idx int, value Node) error { if len(n.Values) <= idx { return xerrors.Errorf( "invalid index for sequence: sequence length is %d, but specified %d index", len(n.Values), idx, ) } column := n.Values[idx].GetToken().Position.Column - value.GetToken().Position.Column value.AddColumn(column) n.Values[idx] = value return nil } // Merge merge sequence value. func (n *SequenceNode) Merge(target *SequenceNode) { column := n.Start.Position.Column - target.Start.Position.Column target.AddColumn(column) for _, value := range target.Values { n.Values = append(n.Values, value) } } // SetIsFlowStyle set value to IsFlowStyle field recursively. func (n *SequenceNode) SetIsFlowStyle(isFlow bool) { n.IsFlowStyle = isFlow for _, value := range n.Values { switch value := value.(type) { case *MappingNode: value.SetIsFlowStyle(isFlow) case *MappingValueNode: value.SetIsFlowStyle(isFlow) case *SequenceNode: value.SetIsFlowStyle(isFlow) } } } // Read implements (io.Reader).Read func (n *SequenceNode) Read(p []byte) (int, error) { return readNode(p, n) } // Type returns SequenceType func (n *SequenceNode) Type() NodeType { return SequenceType } // GetToken returns token instance func (n *SequenceNode) GetToken() *token.Token { return n.Start } // AddColumn add column number to child nodes recursively func (n *SequenceNode) AddColumn(col int) { n.Start.AddColumn(col) n.End.AddColumn(col) for _, value := range n.Values { value.AddColumn(col) } } func (n *SequenceNode) flowStyleString() string { values := []string{} for _, value := range n.Values { values = append(values, value.String()) } return fmt.Sprintf("[%s]", strings.Join(values, ", ")) } func (n *SequenceNode) blockStyleString() string { space := strings.Repeat(" ", n.Start.Position.Column-1) values := []string{} if n.Comment != nil { values = append(values, n.Comment.StringWithSpace(n.Start.Position.Column-1)) } for idx, value := range n.Values { valueStr := value.String() splittedValues := strings.Split(valueStr, "\n") trimmedFirstValue := strings.TrimLeft(splittedValues[0], " ") diffLength := len(splittedValues[0]) - len(trimmedFirstValue) if len(splittedValues) > 1 && value.Type() == StringType || value.Type() == LiteralType { // If multi-line string, the space characters for indent have already been added, so delete them. prefix := space + " " for i := 1; i < len(splittedValues); i++ { splittedValues[i] = strings.TrimPrefix(splittedValues[i], prefix) } } newValues := []string{trimmedFirstValue} for i := 1; i < len(splittedValues); i++ { if len(splittedValues[i]) <= diffLength { // this line is \n or white space only newValues = append(newValues, "") continue } trimmed := splittedValues[i][diffLength:] newValues = append(newValues, fmt.Sprintf("%s %s", space, trimmed)) } newValue := strings.Join(newValues, "\n") if len(n.ValueHeadComments) == len(n.Values) && n.ValueHeadComments[idx] != nil { values = append(values, n.ValueHeadComments[idx].StringWithSpace(n.Start.Position.Column-1)) } values = append(values, fmt.Sprintf("%s- %s", space, newValue)) } if n.FootComment != nil { values = append(values, n.FootComment.StringWithSpace(n.Start.Position.Column-1)) } return strings.Join(values, "\n") } // String sequence to text func (n *SequenceNode) String() string { if n.IsFlowStyle || len(n.Values) == 0 { return n.flowStyleString() } return n.blockStyleString() } // ArrayRange implements ArrayNode protocol func (n *SequenceNode) ArrayRange() *ArrayNodeIter { return &ArrayNodeIter{ idx: startRangeIndex, values: n.Values, } } // MarshalYAML encodes to a YAML text func (n *SequenceNode) MarshalYAML() ([]byte, error) { return []byte(n.String()), nil } // AnchorNode type of anchor node type AnchorNode struct { *BaseNode Start *token.Token Name Node Value Node } func (n *AnchorNode) SetName(name string) error { if n.Name == nil { return ErrInvalidAnchorName } s, ok := n.Name.(*StringNode) if !ok { return ErrInvalidAnchorName } s.Value = name return nil } // Read implements (io.Reader).Read func (n *AnchorNode) Read(p []byte) (int, error) { return readNode(p, n) } // Type returns AnchorType func (n *AnchorNode) Type() NodeType { return AnchorType } // GetToken returns token instance func (n *AnchorNode) GetToken() *token.Token { return n.Start } // AddColumn add column number to child nodes recursively func (n *AnchorNode) AddColumn(col int) { n.Start.AddColumn(col) if n.Name != nil { n.Name.AddColumn(col) } if n.Value != nil { n.Value.AddColumn(col) } } // String anchor to text func (n *AnchorNode) String() string { value := n.Value.String() if len(strings.Split(value, "\n")) > 1 { return fmt.Sprintf("&%s\n%s", n.Name.String(), value) } else if s, ok := n.Value.(*SequenceNode); ok && !s.IsFlowStyle { return fmt.Sprintf("&%s\n%s", n.Name.String(), value) } else if m, ok := n.Value.(*MappingNode); ok && !m.IsFlowStyle { return fmt.Sprintf("&%s\n%s", n.Name.String(), value) } return fmt.Sprintf("&%s %s", n.Name.String(), value) } // MarshalYAML encodes to a YAML text func (n *AnchorNode) MarshalYAML() ([]byte, error) { return []byte(n.String()), nil } // AliasNode type of alias node type AliasNode struct { *BaseNode Start *token.Token Value Node } func (n *AliasNode) SetName(name string) error { if n.Value == nil { return ErrInvalidAliasName } s, ok := n.Value.(*StringNode) if !ok { return ErrInvalidAliasName } s.Value = name return nil } // Read implements (io.Reader).Read func (n *AliasNode) Read(p []byte) (int, error) { return readNode(p, n) } // Type returns AliasType func (n *AliasNode) Type() NodeType { return AliasType } // GetToken returns token instance func (n *AliasNode) GetToken() *token.Token { return n.Start } // AddColumn add column number to child nodes recursively func (n *AliasNode) AddColumn(col int) { n.Start.AddColumn(col) if n.Value != nil { n.Value.AddColumn(col) } } // String alias to text func (n *AliasNode) String() string { return fmt.Sprintf("*%s", n.Value.String()) } // MarshalYAML encodes to a YAML text func (n *AliasNode) MarshalYAML() ([]byte, error) { return []byte(n.String()), nil } // DirectiveNode type of directive node type DirectiveNode struct { *BaseNode Start *token.Token Value Node } // Read implements (io.Reader).Read func (n *DirectiveNode) Read(p []byte) (int, error) { return readNode(p, n) } // Type returns DirectiveType func (n *DirectiveNode) Type() NodeType { return DirectiveType } // GetToken returns token instance func (n *DirectiveNode) GetToken() *token.Token { return n.Start } // AddColumn add column number to child nodes recursively func (n *DirectiveNode) AddColumn(col int) { if n.Value != nil { n.Value.AddColumn(col) } } // String directive to text func (n *DirectiveNode) String() string { return fmt.Sprintf("%s%s", n.Start.Value, n.Value.String()) } // MarshalYAML encodes to a YAML text func (n *DirectiveNode) MarshalYAML() ([]byte, error) { return []byte(n.String()), nil } // TagNode type of tag node type TagNode struct { *BaseNode Start *token.Token Value Node } // Read implements (io.Reader).Read func (n *TagNode) Read(p []byte) (int, error) { return readNode(p, n) } // Type returns TagType func (n *TagNode) Type() NodeType { return TagType } // GetToken returns token instance func (n *TagNode) GetToken() *token.Token { return n.Start } // AddColumn add column number to child nodes recursively func (n *TagNode) AddColumn(col int) { n.Start.AddColumn(col) if n.Value != nil { n.Value.AddColumn(col) } } // String tag to text func (n *TagNode) String() string { return fmt.Sprintf("%s %s", n.Start.Value, n.Value.String()) } // MarshalYAML encodes to a YAML text func (n *TagNode) MarshalYAML() ([]byte, error) { return []byte(n.String()), nil } // CommentNode type of comment node type CommentNode struct { *BaseNode Token *token.Token } // Read implements (io.Reader).Read func (n *CommentNode) Read(p []byte) (int, error) { return readNode(p, n) } // Type returns TagType func (n *CommentNode) Type() NodeType { return CommentType } // GetToken returns token instance func (n *CommentNode) GetToken() *token.Token { return n.Token } // AddColumn add column number to child nodes recursively func (n *CommentNode) AddColumn(col int) { if n.Token == nil { return } n.Token.AddColumn(col) } // String comment to text func (n *CommentNode) String() string { return fmt.Sprintf("#%s", n.Token.Value) } // MarshalYAML encodes to a YAML text func (n *CommentNode) MarshalYAML() ([]byte, error) { return []byte(n.String()), nil } // CommentGroupNode type of comment node type CommentGroupNode struct { *BaseNode Comments []*CommentNode } // Read implements (io.Reader).Read func (n *CommentGroupNode) Read(p []byte) (int, error) { return readNode(p, n) } // Type returns TagType func (n *CommentGroupNode) Type() NodeType { return CommentType } // GetToken returns token instance func (n *CommentGroupNode) GetToken() *token.Token { if len(n.Comments) > 0 { return n.Comments[0].Token } return nil } // AddColumn add column number to child nodes recursively func (n *CommentGroupNode) AddColumn(col int) { for _, comment := range n.Comments { comment.AddColumn(col) } } // String comment to text func (n *CommentGroupNode) String() string { values := []string{} for _, comment := range n.Comments { values = append(values, comment.String()) } return strings.Join(values, "\n") } func (n *CommentGroupNode) StringWithSpace(col int) string { values := []string{} space := strings.Repeat(" ", col) for _, comment := range n.Comments { values = append(values, space+comment.String()) } return strings.Join(values, "\n") } // MarshalYAML encodes to a YAML text func (n *CommentGroupNode) MarshalYAML() ([]byte, error) { return []byte(n.String()), nil } // Visitor has Visit method that is invokded for each node encountered by Walk. // If the result visitor w is not nil, Walk visits each of the children of node with the visitor w, // followed by a call of w.Visit(nil). type Visitor interface { Visit(Node) Visitor } // Walk traverses an AST in depth-first order: It starts by calling v.Visit(node); node must not be nil. // If the visitor w returned by v.Visit(node) is not nil, // Walk is invoked recursively with visitor w for each of the non-nil children of node, // followed by a call of w.Visit(nil). func Walk(v Visitor, node Node) { if v = v.Visit(node); v == nil { return } switch n := node.(type) { case *CommentNode: case *NullNode: walkComment(v, n.BaseNode) case *IntegerNode: walkComment(v, n.BaseNode) case *FloatNode: walkComment(v, n.BaseNode) case *StringNode: walkComment(v, n.BaseNode) case *MergeKeyNode: walkComment(v, n.BaseNode) case *BoolNode: walkComment(v, n.BaseNode) case *InfinityNode: walkComment(v, n.BaseNode) case *NanNode: walkComment(v, n.BaseNode) case *LiteralNode: walkComment(v, n.BaseNode) Walk(v, n.Value) case *DirectiveNode: walkComment(v, n.BaseNode) Walk(v, n.Value) case *TagNode: walkComment(v, n.BaseNode) Walk(v, n.Value) case *DocumentNode: walkComment(v, n.BaseNode) Walk(v, n.Body) case *MappingNode: walkComment(v, n.BaseNode) for _, value := range n.Values { Walk(v, value) } case *MappingKeyNode: walkComment(v, n.BaseNode) Walk(v, n.Value) case *MappingValueNode: walkComment(v, n.BaseNode) Walk(v, n.Key) Walk(v, n.Value) case *SequenceNode: walkComment(v, n.BaseNode) for _, value := range n.Values { Walk(v, value) } case *AnchorNode: walkComment(v, n.BaseNode) Walk(v, n.Name) Walk(v, n.Value) case *AliasNode: walkComment(v, n.BaseNode) Walk(v, n.Value) } } func walkComment(v Visitor, base *BaseNode) { if base == nil { return } if base.Comment == nil { return } Walk(v, base.Comment) } type filterWalker struct { typ NodeType results []Node } func (v *filterWalker) Visit(n Node) Visitor { if v.typ == n.Type() { v.results = append(v.results, n) } return v } type parentFinder struct { target Node } func (f *parentFinder) walk(parent, node Node) Node { if f.target == node { return parent } switch n := node.(type) { case *CommentNode: return nil case *NullNode: return nil case *IntegerNode: return nil case *FloatNode: return nil case *StringNode: return nil case *MergeKeyNode: return nil case *BoolNode: return nil case *InfinityNode: return nil case *NanNode: return nil case *LiteralNode: return f.walk(node, n.Value) case *DirectiveNode: return f.walk(node, n.Value) case *TagNode: return f.walk(node, n.Value) case *DocumentNode: return f.walk(node, n.Body) case *MappingNode: for _, value := range n.Values { if found := f.walk(node, value); found != nil { return found } } case *MappingKeyNode: return f.walk(node, n.Value) case *MappingValueNode: if found := f.walk(node, n.Key); found != nil { return found } return f.walk(node, n.Value) case *SequenceNode: for _, value := range n.Values { if found := f.walk(node, value); found != nil { return found } } case *AnchorNode: if found := f.walk(node, n.Name); found != nil { return found } return f.walk(node, n.Value) case *AliasNode: return f.walk(node, n.Value) } return nil } // Parent get parent node from child node. func Parent(root, child Node) Node { finder := &parentFinder{target: child} return finder.walk(root, root) } // Filter returns a list of nodes that match the given type. func Filter(typ NodeType, node Node) []Node { walker := &filterWalker{typ: typ} Walk(walker, node) return walker.results } // FilterFile returns a list of nodes that match the given type. func FilterFile(typ NodeType, file *File) []Node { results := []Node{} for _, doc := range file.Docs { walker := &filterWalker{typ: typ} Walk(walker, doc) results = append(results, walker.results...) } return results } type ErrInvalidMergeType struct { dst Node src Node } func (e *ErrInvalidMergeType) Error() string { return fmt.Sprintf("cannot merge %s into %s", e.src.Type(), e.dst.Type()) } // Merge merge document, map, sequence node. func Merge(dst Node, src Node) error { if doc, ok := src.(*DocumentNode); ok { src = doc.Body } err := &ErrInvalidMergeType{dst: dst, src: src} switch dst.Type() { case DocumentType: node := dst.(*DocumentNode) return Merge(node.Body, src) case MappingType: node := dst.(*MappingNode) target, ok := src.(*MappingNode) if !ok { return err } node.Merge(target) return nil case SequenceType: node := dst.(*SequenceNode) target, ok := src.(*SequenceNode) if !ok { return err } node.Merge(target) return nil } return err } ================================================ FILE: vendor/github.com/goccy/go-yaml/decode.go ================================================ package yaml import ( "bytes" "context" "encoding" "encoding/base64" "fmt" "io" "io/ioutil" "math" "os" "path/filepath" "reflect" "sort" "strconv" "time" "github.com/goccy/go-yaml/ast" "github.com/goccy/go-yaml/internal/errors" "github.com/goccy/go-yaml/parser" "github.com/goccy/go-yaml/token" "golang.org/x/xerrors" ) // Decoder reads and decodes YAML values from an input stream. type Decoder struct { reader io.Reader referenceReaders []io.Reader anchorNodeMap map[string]ast.Node anchorValueMap map[string]reflect.Value customUnmarshalerMap map[reflect.Type]func(interface{}, []byte) error toCommentMap CommentMap opts []DecodeOption referenceFiles []string referenceDirs []string isRecursiveDir bool isResolvedReference bool validator StructValidator disallowUnknownField bool disallowDuplicateKey bool useOrderedMap bool useJSONUnmarshaler bool parsedFile *ast.File streamIndex int } // NewDecoder returns a new decoder that reads from r. func NewDecoder(r io.Reader, opts ...DecodeOption) *Decoder { return &Decoder{ reader: r, anchorNodeMap: map[string]ast.Node{}, anchorValueMap: map[string]reflect.Value{}, customUnmarshalerMap: map[reflect.Type]func(interface{}, []byte) error{}, opts: opts, referenceReaders: []io.Reader{}, referenceFiles: []string{}, referenceDirs: []string{}, isRecursiveDir: false, isResolvedReference: false, disallowUnknownField: false, disallowDuplicateKey: false, useOrderedMap: false, } } func (d *Decoder) castToFloat(v interface{}) interface{} { switch vv := v.(type) { case int: return float64(vv) case int8: return float64(vv) case int16: return float64(vv) case int32: return float64(vv) case int64: return float64(vv) case uint: return float64(vv) case uint8: return float64(vv) case uint16: return float64(vv) case uint32: return float64(vv) case uint64: return float64(vv) case float32: return float64(vv) case float64: return vv case string: // if error occurred, return zero value f, _ := strconv.ParseFloat(vv, 64) return f } return 0 } func (d *Decoder) mergeValueNode(value ast.Node) ast.Node { if value.Type() == ast.AliasType { aliasNode := value.(*ast.AliasNode) aliasName := aliasNode.Value.GetToken().Value return d.anchorNodeMap[aliasName] } return value } func (d *Decoder) mapKeyNodeToString(node ast.MapKeyNode) string { key := d.nodeToValue(node) if key == nil { return "null" } if k, ok := key.(string); ok { return k } return fmt.Sprint(key) } func (d *Decoder) setToMapValue(node ast.Node, m map[string]interface{}) { d.setPathToCommentMap(node) switch n := node.(type) { case *ast.MappingValueNode: if n.Key.Type() == ast.MergeKeyType { d.setToMapValue(d.mergeValueNode(n.Value), m) } else { key := d.mapKeyNodeToString(n.Key) m[key] = d.nodeToValue(n.Value) } case *ast.MappingNode: for _, value := range n.Values { d.setToMapValue(value, m) } case *ast.AnchorNode: anchorName := n.Name.GetToken().Value d.anchorNodeMap[anchorName] = n.Value } } func (d *Decoder) setToOrderedMapValue(node ast.Node, m *MapSlice) { switch n := node.(type) { case *ast.MappingValueNode: if n.Key.Type() == ast.MergeKeyType { d.setToOrderedMapValue(d.mergeValueNode(n.Value), m) } else { key := d.mapKeyNodeToString(n.Key) *m = append(*m, MapItem{Key: key, Value: d.nodeToValue(n.Value)}) } case *ast.MappingNode: for _, value := range n.Values { d.setToOrderedMapValue(value, m) } } } func (d *Decoder) setPathToCommentMap(node ast.Node) { if d.toCommentMap == nil { return } d.addHeadOrLineCommentToMap(node) d.addFootCommentToMap(node) } func (d *Decoder) addHeadOrLineCommentToMap(node ast.Node) { sequence, ok := node.(*ast.SequenceNode) if ok { d.addSequenceNodeCommentToMap(sequence) return } commentGroup := node.GetComment() if commentGroup == nil { return } texts := []string{} targetLine := node.GetToken().Position.Line minCommentLine := math.MaxInt for _, comment := range commentGroup.Comments { if minCommentLine > comment.Token.Position.Line { minCommentLine = comment.Token.Position.Line } texts = append(texts, comment.Token.Value) } if len(texts) == 0 { return } commentPath := node.GetPath() if minCommentLine < targetLine { d.addCommentToMap(commentPath, HeadComment(texts...)) } else { d.addCommentToMap(commentPath, LineComment(texts[0])) } } func (d *Decoder) addSequenceNodeCommentToMap(node *ast.SequenceNode) { if len(node.ValueHeadComments) != 0 { for idx, headComment := range node.ValueHeadComments { if headComment == nil { continue } texts := make([]string, 0, len(headComment.Comments)) for _, comment := range headComment.Comments { texts = append(texts, comment.Token.Value) } if len(texts) != 0 { d.addCommentToMap(node.Values[idx].GetPath(), HeadComment(texts...)) } } } firstElemHeadComment := node.GetComment() if firstElemHeadComment != nil { texts := make([]string, 0, len(firstElemHeadComment.Comments)) for _, comment := range firstElemHeadComment.Comments { texts = append(texts, comment.Token.Value) } if len(texts) != 0 { d.addCommentToMap(node.Values[0].GetPath(), HeadComment(texts...)) } } } func (d *Decoder) addFootCommentToMap(node ast.Node) { var ( footComment *ast.CommentGroupNode footCommentPath string = node.GetPath() ) switch n := node.(type) { case *ast.SequenceNode: if len(n.Values) != 0 { footCommentPath = n.Values[len(n.Values)-1].GetPath() } footComment = n.FootComment case *ast.MappingNode: footComment = n.FootComment case *ast.MappingValueNode: footComment = n.FootComment } if footComment == nil { return } var texts []string for _, comment := range footComment.Comments { texts = append(texts, comment.Token.Value) } if len(texts) != 0 { d.addCommentToMap(footCommentPath, FootComment(texts...)) } } func (d *Decoder) addCommentToMap(path string, comment *Comment) { for _, c := range d.toCommentMap[path] { if c.Position == comment.Position { // already added same comment return } } d.toCommentMap[path] = append(d.toCommentMap[path], comment) sort.Slice(d.toCommentMap[path], func(i, j int) bool { return d.toCommentMap[path][i].Position < d.toCommentMap[path][j].Position }) } func (d *Decoder) nodeToValue(node ast.Node) interface{} { d.setPathToCommentMap(node) switch n := node.(type) { case *ast.NullNode: return nil case *ast.StringNode: return n.GetValue() case *ast.IntegerNode: return n.GetValue() case *ast.FloatNode: return n.GetValue() case *ast.BoolNode: return n.GetValue() case *ast.InfinityNode: return n.GetValue() case *ast.NanNode: return n.GetValue() case *ast.TagNode: switch token.ReservedTagKeyword(n.Start.Value) { case token.TimestampTag: t, _ := d.castToTime(n.Value) return t case token.IntegerTag: i, _ := strconv.Atoi(fmt.Sprint(d.nodeToValue(n.Value))) return i case token.FloatTag: return d.castToFloat(d.nodeToValue(n.Value)) case token.NullTag: return nil case token.BinaryTag: b, _ := base64.StdEncoding.DecodeString(d.nodeToValue(n.Value).(string)) return b case token.StringTag: return d.nodeToValue(n.Value) case token.MappingTag: return d.nodeToValue(n.Value) } case *ast.AnchorNode: anchorName := n.Name.GetToken().Value anchorValue := d.nodeToValue(n.Value) d.anchorNodeMap[anchorName] = n.Value return anchorValue case *ast.AliasNode: aliasName := n.Value.GetToken().Value node := d.anchorNodeMap[aliasName] return d.nodeToValue(node) case *ast.LiteralNode: return n.Value.GetValue() case *ast.MappingKeyNode: return d.nodeToValue(n.Value) case *ast.MappingValueNode: if n.Key.Type() == ast.MergeKeyType { value := d.mergeValueNode(n.Value) if d.useOrderedMap { m := MapSlice{} d.setToOrderedMapValue(value, &m) return m } m := map[string]interface{}{} d.setToMapValue(value, m) return m } key := d.mapKeyNodeToString(n.Key) if d.useOrderedMap { return MapSlice{{Key: key, Value: d.nodeToValue(n.Value)}} } return map[string]interface{}{ key: d.nodeToValue(n.Value), } case *ast.MappingNode: if d.useOrderedMap { m := make(MapSlice, 0, len(n.Values)) for _, value := range n.Values { d.setToOrderedMapValue(value, &m) } return m } m := make(map[string]interface{}, len(n.Values)) for _, value := range n.Values { d.setToMapValue(value, m) } return m case *ast.SequenceNode: v := make([]interface{}, 0, len(n.Values)) for _, value := range n.Values { v = append(v, d.nodeToValue(value)) } return v } return nil } func (d *Decoder) resolveAlias(node ast.Node) (ast.Node, error) { switch n := node.(type) { case *ast.MappingNode: for idx, v := range n.Values { value, err := d.resolveAlias(v) if err != nil { return nil, err } n.Values[idx] = value.(*ast.MappingValueNode) } case *ast.TagNode: value, err := d.resolveAlias(n.Value) if err != nil { return nil, err } n.Value = value case *ast.MappingKeyNode: value, err := d.resolveAlias(n.Value) if err != nil { return nil, err } n.Value = value case *ast.MappingValueNode: if n.Key.Type() == ast.MergeKeyType && n.Value.Type() == ast.AliasType { value, err := d.resolveAlias(n.Value) if err != nil { return nil, err } keyColumn := n.Key.GetToken().Position.Column requiredColumn := keyColumn + 2 value.AddColumn(requiredColumn) n.Value = value } else { key, err := d.resolveAlias(n.Key) if err != nil { return nil, err } n.Key = key.(ast.MapKeyNode) value, err := d.resolveAlias(n.Value) if err != nil { return nil, err } n.Value = value } case *ast.SequenceNode: for idx, v := range n.Values { value, err := d.resolveAlias(v) if err != nil { return nil, err } n.Values[idx] = value } case *ast.AliasNode: aliasName := n.Value.GetToken().Value node := d.anchorNodeMap[aliasName] if node == nil { return nil, xerrors.Errorf("cannot find anchor by alias name %s", aliasName) } return d.resolveAlias(node) } return node, nil } func (d *Decoder) getMapNode(node ast.Node) (ast.MapNode, error) { if _, ok := node.(*ast.NullNode); ok { return nil, nil } if anchor, ok := node.(*ast.AnchorNode); ok { mapNode, ok := anchor.Value.(ast.MapNode) if ok { return mapNode, nil } return nil, errUnexpectedNodeType(anchor.Value.Type(), ast.MappingType, node.GetToken()) } if alias, ok := node.(*ast.AliasNode); ok { aliasName := alias.Value.GetToken().Value node := d.anchorNodeMap[aliasName] if node == nil { return nil, xerrors.Errorf("cannot find anchor by alias name %s", aliasName) } mapNode, ok := node.(ast.MapNode) if ok { return mapNode, nil } return nil, errUnexpectedNodeType(node.Type(), ast.MappingType, node.GetToken()) } mapNode, ok := node.(ast.MapNode) if !ok { return nil, errUnexpectedNodeType(node.Type(), ast.MappingType, node.GetToken()) } return mapNode, nil } func (d *Decoder) getArrayNode(node ast.Node) (ast.ArrayNode, error) { if _, ok := node.(*ast.NullNode); ok { return nil, nil } if anchor, ok := node.(*ast.AnchorNode); ok { arrayNode, ok := anchor.Value.(ast.ArrayNode) if ok { return arrayNode, nil } return nil, errUnexpectedNodeType(anchor.Value.Type(), ast.SequenceType, node.GetToken()) } if alias, ok := node.(*ast.AliasNode); ok { aliasName := alias.Value.GetToken().Value node := d.anchorNodeMap[aliasName] if node == nil { return nil, xerrors.Errorf("cannot find anchor by alias name %s", aliasName) } arrayNode, ok := node.(ast.ArrayNode) if ok { return arrayNode, nil } return nil, errUnexpectedNodeType(node.Type(), ast.SequenceType, node.GetToken()) } arrayNode, ok := node.(ast.ArrayNode) if !ok { return nil, errUnexpectedNodeType(node.Type(), ast.SequenceType, node.GetToken()) } return arrayNode, nil } func (d *Decoder) fileToNode(f *ast.File) ast.Node { for _, doc := range f.Docs { if v := d.nodeToValue(doc.Body); v != nil { return doc.Body } } return nil } func (d *Decoder) convertValue(v reflect.Value, typ reflect.Type, src ast.Node) (reflect.Value, error) { if typ.Kind() != reflect.String { if !v.Type().ConvertibleTo(typ) { return reflect.Zero(typ), errTypeMismatch(typ, v.Type(), src.GetToken()) } return v.Convert(typ), nil } // cast value to string switch v.Type().Kind() { case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return reflect.ValueOf(fmt.Sprint(v.Int())), nil case reflect.Float32, reflect.Float64: return reflect.ValueOf(fmt.Sprint(v.Float())), nil case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: return reflect.ValueOf(fmt.Sprint(v.Uint())), nil case reflect.Bool: return reflect.ValueOf(fmt.Sprint(v.Bool())), nil } if !v.Type().ConvertibleTo(typ) { return reflect.Zero(typ), errTypeMismatch(typ, v.Type(), src.GetToken()) } return v.Convert(typ), nil } type overflowError struct { dstType reflect.Type srcNum string } func (e *overflowError) Error() string { return fmt.Sprintf("cannot unmarshal %s into Go value of type %s ( overflow )", e.srcNum, e.dstType) } func errOverflow(dstType reflect.Type, num string) *overflowError { return &overflowError{dstType: dstType, srcNum: num} } func errTypeMismatch(dstType, srcType reflect.Type, token *token.Token) *errors.TypeError { return &errors.TypeError{DstType: dstType, SrcType: srcType, Token: token} } type unknownFieldError struct { err error } func (e *unknownFieldError) Error() string { return e.err.Error() } func errUnknownField(msg string, tk *token.Token) *unknownFieldError { return &unknownFieldError{err: errors.ErrSyntax(msg, tk)} } func errUnexpectedNodeType(actual, expected ast.NodeType, tk *token.Token) error { return errors.ErrSyntax(fmt.Sprintf("%s was used where %s is expected", actual.YAMLName(), expected.YAMLName()), tk) } type duplicateKeyError struct { err error } func (e *duplicateKeyError) Error() string { return e.err.Error() } func errDuplicateKey(msg string, tk *token.Token) *duplicateKeyError { return &duplicateKeyError{err: errors.ErrSyntax(msg, tk)} } func (d *Decoder) deleteStructKeys(structType reflect.Type, unknownFields map[string]ast.Node) error { if structType.Kind() == reflect.Ptr { structType = structType.Elem() } structFieldMap, err := structFieldMap(structType) if err != nil { return errors.Wrapf(err, "failed to create struct field map") } for j := 0; j < structType.NumField(); j++ { field := structType.Field(j) if isIgnoredStructField(field) { continue } structField, exists := structFieldMap[field.Name] if !exists { continue } if structField.IsInline { d.deleteStructKeys(field.Type, unknownFields) } else { delete(unknownFields, structField.RenderName) } } return nil } func (d *Decoder) lastNode(node ast.Node) ast.Node { switch n := node.(type) { case *ast.MappingNode: if len(n.Values) > 0 { return d.lastNode(n.Values[len(n.Values)-1]) } case *ast.MappingValueNode: return d.lastNode(n.Value) case *ast.SequenceNode: if len(n.Values) > 0 { return d.lastNode(n.Values[len(n.Values)-1]) } } return node } func (d *Decoder) unmarshalableDocument(node ast.Node) ([]byte, error) { var err error node, err = d.resolveAlias(node) if err != nil { return nil, err } doc := node.String() last := d.lastNode(node) if last != nil && last.Type() == ast.LiteralType { doc += "\n" } return []byte(doc), nil } func (d *Decoder) unmarshalableText(node ast.Node) ([]byte, bool, error) { var err error node, err = d.resolveAlias(node) if err != nil { return nil, false, err } if node.Type() == ast.AnchorType { node = node.(*ast.AnchorNode).Value } switch n := node.(type) { case *ast.StringNode: return []byte(n.Value), true, nil case *ast.LiteralNode: return []byte(n.Value.GetToken().Value), true, nil default: scalar, ok := n.(ast.ScalarNode) if ok { return []byte(fmt.Sprint(scalar.GetValue())), true, nil } } return nil, false, nil } type jsonUnmarshaler interface { UnmarshalJSON([]byte) error } func (d *Decoder) existsTypeInCustomUnmarshalerMap(t reflect.Type) bool { if _, exists := d.customUnmarshalerMap[t]; exists { return true } globalCustomUnmarshalerMu.Lock() defer globalCustomUnmarshalerMu.Unlock() if _, exists := globalCustomUnmarshalerMap[t]; exists { return true } return false } func (d *Decoder) unmarshalerFromCustomUnmarshalerMap(t reflect.Type) (func(interface{}, []byte) error, bool) { if unmarshaler, exists := d.customUnmarshalerMap[t]; exists { return unmarshaler, exists } globalCustomUnmarshalerMu.Lock() defer globalCustomUnmarshalerMu.Unlock() if unmarshaler, exists := globalCustomUnmarshalerMap[t]; exists { return unmarshaler, exists } return nil, false } func (d *Decoder) canDecodeByUnmarshaler(dst reflect.Value) bool { ptrValue := dst.Addr() if d.existsTypeInCustomUnmarshalerMap(ptrValue.Type()) { return true } iface := ptrValue.Interface() switch iface.(type) { case BytesUnmarshalerContext: return true case BytesUnmarshaler: return true case InterfaceUnmarshalerContext: return true case InterfaceUnmarshaler: return true case *time.Time: return true case *time.Duration: return true case encoding.TextUnmarshaler: return true case jsonUnmarshaler: return d.useJSONUnmarshaler } return false } func (d *Decoder) decodeByUnmarshaler(ctx context.Context, dst reflect.Value, src ast.Node) error { ptrValue := dst.Addr() if unmarshaler, exists := d.unmarshalerFromCustomUnmarshalerMap(ptrValue.Type()); exists { b, err := d.unmarshalableDocument(src) if err != nil { return errors.Wrapf(err, "failed to UnmarshalYAML") } if err := unmarshaler(ptrValue.Interface(), b); err != nil { return errors.Wrapf(err, "failed to UnmarshalYAML") } return nil } iface := ptrValue.Interface() if unmarshaler, ok := iface.(BytesUnmarshalerContext); ok { b, err := d.unmarshalableDocument(src) if err != nil { return errors.Wrapf(err, "failed to UnmarshalYAML") } if err := unmarshaler.UnmarshalYAML(ctx, b); err != nil { return errors.Wrapf(err, "failed to UnmarshalYAML") } return nil } if unmarshaler, ok := iface.(BytesUnmarshaler); ok { b, err := d.unmarshalableDocument(src) if err != nil { return errors.Wrapf(err, "failed to UnmarshalYAML") } if err := unmarshaler.UnmarshalYAML(b); err != nil { return errors.Wrapf(err, "failed to UnmarshalYAML") } return nil } if unmarshaler, ok := iface.(InterfaceUnmarshalerContext); ok { if err := unmarshaler.UnmarshalYAML(ctx, func(v interface{}) error { rv := reflect.ValueOf(v) if rv.Type().Kind() != reflect.Ptr { return errors.ErrDecodeRequiredPointerType } if err := d.decodeValue(ctx, rv.Elem(), src); err != nil { return errors.Wrapf(err, "failed to decode value") } return nil }); err != nil { return errors.Wrapf(err, "failed to UnmarshalYAML") } return nil } if unmarshaler, ok := iface.(InterfaceUnmarshaler); ok { if err := unmarshaler.UnmarshalYAML(func(v interface{}) error { rv := reflect.ValueOf(v) if rv.Type().Kind() != reflect.Ptr { return errors.ErrDecodeRequiredPointerType } if err := d.decodeValue(ctx, rv.Elem(), src); err != nil { return errors.Wrapf(err, "failed to decode value") } return nil }); err != nil { return errors.Wrapf(err, "failed to UnmarshalYAML") } return nil } if _, ok := iface.(*time.Time); ok { return d.decodeTime(ctx, dst, src) } if _, ok := iface.(*time.Duration); ok { return d.decodeDuration(ctx, dst, src) } if unmarshaler, isText := iface.(encoding.TextUnmarshaler); isText { b, ok, err := d.unmarshalableText(src) if err != nil { return errors.Wrapf(err, "failed to UnmarshalText") } if ok { if err := unmarshaler.UnmarshalText(b); err != nil { return errors.Wrapf(err, "failed to UnmarshalText") } return nil } } if d.useJSONUnmarshaler { if unmarshaler, ok := iface.(jsonUnmarshaler); ok { b, err := d.unmarshalableDocument(src) if err != nil { return errors.Wrapf(err, "failed to UnmarshalJSON") } jsonBytes, err := YAMLToJSON(b) if err != nil { return errors.Wrapf(err, "failed to convert yaml to json") } jsonBytes = bytes.TrimRight(jsonBytes, "\n") if err := unmarshaler.UnmarshalJSON(jsonBytes); err != nil { return errors.Wrapf(err, "failed to UnmarshalJSON") } return nil } } return xerrors.Errorf("does not implemented Unmarshaler") } var ( astNodeType = reflect.TypeOf((*ast.Node)(nil)).Elem() ) func (d *Decoder) decodeValue(ctx context.Context, dst reflect.Value, src ast.Node) error { if src.Type() == ast.AnchorType { anchorName := src.(*ast.AnchorNode).Name.GetToken().Value if _, exists := d.anchorValueMap[anchorName]; !exists { d.anchorValueMap[anchorName] = dst } } if d.canDecodeByUnmarshaler(dst) { if err := d.decodeByUnmarshaler(ctx, dst, src); err != nil { return errors.Wrapf(err, "failed to decode by unmarshaler") } return nil } valueType := dst.Type() switch valueType.Kind() { case reflect.Ptr: if dst.IsNil() { return nil } if src.Type() == ast.NullType { // set nil value to pointer dst.Set(reflect.Zero(valueType)) return nil } v := d.createDecodableValue(dst.Type()) if err := d.decodeValue(ctx, v, src); err != nil { return errors.Wrapf(err, "failed to decode ptr value") } dst.Set(d.castToAssignableValue(v, dst.Type())) case reflect.Interface: if dst.Type() == astNodeType { dst.Set(reflect.ValueOf(src)) return nil } v := reflect.ValueOf(d.nodeToValue(src)) if v.IsValid() { dst.Set(v) } case reflect.Map: return d.decodeMap(ctx, dst, src) case reflect.Array: return d.decodeArray(ctx, dst, src) case reflect.Slice: if mapSlice, ok := dst.Addr().Interface().(*MapSlice); ok { return d.decodeMapSlice(ctx, mapSlice, src) } return d.decodeSlice(ctx, dst, src) case reflect.Struct: if mapItem, ok := dst.Addr().Interface().(*MapItem); ok { return d.decodeMapItem(ctx, mapItem, src) } return d.decodeStruct(ctx, dst, src) case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: v := d.nodeToValue(src) switch vv := v.(type) { case int64: if !dst.OverflowInt(vv) { dst.SetInt(vv) return nil } case uint64: if vv <= math.MaxInt64 && !dst.OverflowInt(int64(vv)) { dst.SetInt(int64(vv)) return nil } case float64: if vv <= math.MaxInt64 && !dst.OverflowInt(int64(vv)) { dst.SetInt(int64(vv)) return nil } default: return errTypeMismatch(valueType, reflect.TypeOf(v), src.GetToken()) } return errOverflow(valueType, fmt.Sprint(v)) case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: v := d.nodeToValue(src) switch vv := v.(type) { case int64: if 0 <= vv && !dst.OverflowUint(uint64(vv)) { dst.SetUint(uint64(vv)) return nil } case uint64: if !dst.OverflowUint(vv) { dst.SetUint(vv) return nil } case float64: if 0 <= vv && vv <= math.MaxUint64 && !dst.OverflowUint(uint64(vv)) { dst.SetUint(uint64(vv)) return nil } default: return errTypeMismatch(valueType, reflect.TypeOf(v), src.GetToken()) } return errOverflow(valueType, fmt.Sprint(v)) } v := reflect.ValueOf(d.nodeToValue(src)) if v.IsValid() { convertedValue, err := d.convertValue(v, dst.Type(), src) if err != nil { return errors.Wrapf(err, "failed to convert value") } dst.Set(convertedValue) } return nil } func (d *Decoder) createDecodableValue(typ reflect.Type) reflect.Value { for { if typ.Kind() == reflect.Ptr { typ = typ.Elem() continue } break } return reflect.New(typ).Elem() } func (d *Decoder) castToAssignableValue(value reflect.Value, target reflect.Type) reflect.Value { if target.Kind() != reflect.Ptr { return value } maxTryCount := 5 tryCount := 0 for { if tryCount > maxTryCount { return value } if value.Type().AssignableTo(target) { break } value = value.Addr() tryCount++ } return value } func (d *Decoder) createDecodedNewValue( ctx context.Context, typ reflect.Type, defaultVal reflect.Value, node ast.Node, ) (reflect.Value, error) { if node.Type() == ast.AliasType { aliasName := node.(*ast.AliasNode).Value.GetToken().Value newValue := d.anchorValueMap[aliasName] if newValue.IsValid() { return newValue, nil } } if node.Type() == ast.NullType { return reflect.Zero(typ), nil } newValue := d.createDecodableValue(typ) for defaultVal.Kind() == reflect.Ptr { defaultVal = defaultVal.Elem() } if defaultVal.IsValid() && defaultVal.Type().AssignableTo(newValue.Type()) { newValue.Set(defaultVal) } if err := d.decodeValue(ctx, newValue, node); err != nil { return newValue, errors.Wrapf(err, "failed to decode value") } return newValue, nil } func (d *Decoder) keyToNodeMap(node ast.Node, ignoreMergeKey bool, getKeyOrValueNode func(*ast.MapNodeIter) ast.Node) (map[string]ast.Node, error) { mapNode, err := d.getMapNode(node) if err != nil { return nil, errors.Wrapf(err, "failed to get map node") } keyMap := map[string]struct{}{} keyToNodeMap := map[string]ast.Node{} if mapNode == nil { return keyToNodeMap, nil } mapIter := mapNode.MapRange() for mapIter.Next() { keyNode := mapIter.Key() if keyNode.Type() == ast.MergeKeyType { if ignoreMergeKey { continue } mergeMap, err := d.keyToNodeMap(mapIter.Value(), ignoreMergeKey, getKeyOrValueNode) if err != nil { return nil, errors.Wrapf(err, "failed to get keyToNodeMap by MergeKey node") } for k, v := range mergeMap { if err := d.validateDuplicateKey(keyMap, k, v); err != nil { return nil, errors.Wrapf(err, "invalid struct key") } keyToNodeMap[k] = v } } else { key, ok := d.nodeToValue(keyNode).(string) if !ok { return nil, errors.Wrapf(err, "failed to decode map key") } if err := d.validateDuplicateKey(keyMap, key, keyNode); err != nil { return nil, errors.Wrapf(err, "invalid struct key") } keyToNodeMap[key] = getKeyOrValueNode(mapIter) } } return keyToNodeMap, nil } func (d *Decoder) keyToKeyNodeMap(node ast.Node, ignoreMergeKey bool) (map[string]ast.Node, error) { m, err := d.keyToNodeMap(node, ignoreMergeKey, func(nodeMap *ast.MapNodeIter) ast.Node { return nodeMap.Key() }) if err != nil { return nil, errors.Wrapf(err, "failed to get keyToNodeMap") } return m, nil } func (d *Decoder) keyToValueNodeMap(node ast.Node, ignoreMergeKey bool) (map[string]ast.Node, error) { m, err := d.keyToNodeMap(node, ignoreMergeKey, func(nodeMap *ast.MapNodeIter) ast.Node { return nodeMap.Value() }) if err != nil { return nil, errors.Wrapf(err, "failed to get keyToNodeMap") } return m, nil } func (d *Decoder) setDefaultValueIfConflicted(v reflect.Value, fieldMap StructFieldMap) error { typ := v.Type() if typ.Kind() != reflect.Struct { return nil } embeddedStructFieldMap, err := structFieldMap(typ) if err != nil { return errors.Wrapf(err, "failed to get struct field map by embedded type") } for i := 0; i < typ.NumField(); i++ { field := typ.Field(i) if isIgnoredStructField(field) { continue } structField := embeddedStructFieldMap[field.Name] if !fieldMap.isIncludedRenderName(structField.RenderName) { continue } // if declared same key name, set default value fieldValue := v.Field(i) if fieldValue.CanSet() { fieldValue.Set(reflect.Zero(fieldValue.Type())) } } return nil } // This is a subset of the formats allowed by the regular expression // defined at http://yaml.org/type/timestamp.html. var allowedTimestampFormats = []string{ "2006-1-2T15:4:5.999999999Z07:00", // RCF3339Nano with short date fields. "2006-1-2t15:4:5.999999999Z07:00", // RFC3339Nano with short date fields and lower-case "t". "2006-1-2 15:4:5.999999999", // space separated with no time zone "2006-1-2", // date only } func (d *Decoder) castToTime(src ast.Node) (time.Time, error) { if src == nil { return time.Time{}, nil } v := d.nodeToValue(src) if t, ok := v.(time.Time); ok { return t, nil } s, ok := v.(string) if !ok { return time.Time{}, errTypeMismatch(reflect.TypeOf(time.Time{}), reflect.TypeOf(v), src.GetToken()) } for _, format := range allowedTimestampFormats { t, err := time.Parse(format, s) if err != nil { // invalid format continue } return t, nil } return time.Time{}, nil } func (d *Decoder) decodeTime(ctx context.Context, dst reflect.Value, src ast.Node) error { t, err := d.castToTime(src) if err != nil { return errors.Wrapf(err, "failed to convert to time") } dst.Set(reflect.ValueOf(t)) return nil } func (d *Decoder) castToDuration(src ast.Node) (time.Duration, error) { if src == nil { return 0, nil } v := d.nodeToValue(src) if t, ok := v.(time.Duration); ok { return t, nil } s, ok := v.(string) if !ok { return 0, errTypeMismatch(reflect.TypeOf(time.Duration(0)), reflect.TypeOf(v), src.GetToken()) } t, err := time.ParseDuration(s) if err != nil { return 0, errors.Wrapf(err, "failed to parse duration") } return t, nil } func (d *Decoder) decodeDuration(ctx context.Context, dst reflect.Value, src ast.Node) error { t, err := d.castToDuration(src) if err != nil { return errors.Wrapf(err, "failed to convert to duration") } dst.Set(reflect.ValueOf(t)) return nil } // getMergeAliasName support single alias only func (d *Decoder) getMergeAliasName(src ast.Node) string { mapNode, err := d.getMapNode(src) if err != nil { return "" } if mapNode == nil { return "" } mapIter := mapNode.MapRange() for mapIter.Next() { key := mapIter.Key() value := mapIter.Value() if key.Type() == ast.MergeKeyType && value.Type() == ast.AliasType { return value.(*ast.AliasNode).Value.GetToken().Value } } return "" } func (d *Decoder) decodeStruct(ctx context.Context, dst reflect.Value, src ast.Node) error { if src == nil { return nil } structType := dst.Type() srcValue := reflect.ValueOf(src) srcType := srcValue.Type() if srcType.Kind() == reflect.Ptr { srcType = srcType.Elem() srcValue = srcValue.Elem() } if structType == srcType { // dst value implements ast.Node dst.Set(srcValue) return nil } structFieldMap, err := structFieldMap(structType) if err != nil { return errors.Wrapf(err, "failed to create struct field map") } ignoreMergeKey := structFieldMap.hasMergeProperty() keyToNodeMap, err := d.keyToValueNodeMap(src, ignoreMergeKey) if err != nil { return errors.Wrapf(err, "failed to get keyToValueNodeMap") } var unknownFields map[string]ast.Node if d.disallowUnknownField { unknownFields, err = d.keyToKeyNodeMap(src, ignoreMergeKey) if err != nil { return errors.Wrapf(err, "failed to get keyToKeyNodeMap") } } aliasName := d.getMergeAliasName(src) var foundErr error for i := 0; i < structType.NumField(); i++ { field := structType.Field(i) if isIgnoredStructField(field) { continue } structField := structFieldMap[field.Name] if structField.IsInline { fieldValue := dst.FieldByName(field.Name) if structField.IsAutoAlias { if aliasName != "" { newFieldValue := d.anchorValueMap[aliasName] if newFieldValue.IsValid() { fieldValue.Set(d.castToAssignableValue(newFieldValue, fieldValue.Type())) } } continue } if !fieldValue.CanSet() { return xerrors.Errorf("cannot set embedded type as unexported field %s.%s", field.PkgPath, field.Name) } if fieldValue.Type().Kind() == reflect.Ptr && src.Type() == ast.NullType { // set nil value to pointer fieldValue.Set(reflect.Zero(fieldValue.Type())) continue } mapNode := ast.Mapping(nil, false) for k, v := range keyToNodeMap { key := &ast.StringNode{BaseNode: &ast.BaseNode{}, Value: k} mapNode.Values = append(mapNode.Values, ast.MappingValue(nil, key, v)) } newFieldValue, err := d.createDecodedNewValue(ctx, fieldValue.Type(), fieldValue, mapNode) if d.disallowUnknownField { if err := d.deleteStructKeys(fieldValue.Type(), unknownFields); err != nil { return errors.Wrapf(err, "cannot delete struct keys") } } if err != nil { if foundErr != nil { continue } var te *errors.TypeError if xerrors.As(err, &te) { if te.StructFieldName != nil { fieldName := fmt.Sprintf("%s.%s", structType.Name(), *te.StructFieldName) te.StructFieldName = &fieldName } else { fieldName := fmt.Sprintf("%s.%s", structType.Name(), field.Name) te.StructFieldName = &fieldName } foundErr = te continue } else { foundErr = err } continue } d.setDefaultValueIfConflicted(newFieldValue, structFieldMap) fieldValue.Set(d.castToAssignableValue(newFieldValue, fieldValue.Type())) continue } v, exists := keyToNodeMap[structField.RenderName] if !exists { continue } delete(unknownFields, structField.RenderName) fieldValue := dst.FieldByName(field.Name) if fieldValue.Type().Kind() == reflect.Ptr && src.Type() == ast.NullType { // set nil value to pointer fieldValue.Set(reflect.Zero(fieldValue.Type())) continue } newFieldValue, err := d.createDecodedNewValue(ctx, fieldValue.Type(), fieldValue, v) if err != nil { if foundErr != nil { continue } var te *errors.TypeError if xerrors.As(err, &te) { fieldName := fmt.Sprintf("%s.%s", structType.Name(), field.Name) te.StructFieldName = &fieldName foundErr = te } else { foundErr = err } continue } fieldValue.Set(d.castToAssignableValue(newFieldValue, fieldValue.Type())) } if foundErr != nil { return errors.Wrapf(foundErr, "failed to decode value") } // Ignore unknown fields when parsing an inline struct (recognized by a nil token). // Unknown fields are expected (they could be fields from the parent struct). if len(unknownFields) != 0 && d.disallowUnknownField && src.GetToken() != nil { for key, node := range unknownFields { return errUnknownField(fmt.Sprintf(`unknown field "%s"`, key), node.GetToken()) } } if d.validator != nil { if err := d.validator.Struct(dst.Interface()); err != nil { ev := reflect.ValueOf(err) if ev.Type().Kind() == reflect.Slice { for i := 0; i < ev.Len(); i++ { fieldErr, ok := ev.Index(i).Interface().(FieldError) if !ok { continue } fieldName := fieldErr.StructField() structField, exists := structFieldMap[fieldName] if !exists { continue } node, exists := keyToNodeMap[structField.RenderName] if exists { // TODO: to make FieldError message cutomizable return errors.ErrSyntax(fmt.Sprintf("%s", err), node.GetToken()) } else if t := src.GetToken(); t != nil && t.Prev != nil && t.Prev.Prev != nil { // A missing required field will not be in the keyToNodeMap // the error needs to be associated with the parent of the source node return errors.ErrSyntax(fmt.Sprintf("%s", err), t.Prev.Prev) } } } return err } } return nil } func (d *Decoder) decodeArray(ctx context.Context, dst reflect.Value, src ast.Node) error { arrayNode, err := d.getArrayNode(src) if err != nil { return errors.Wrapf(err, "failed to get array node") } if arrayNode == nil { return nil } iter := arrayNode.ArrayRange() arrayValue := reflect.New(dst.Type()).Elem() arrayType := dst.Type() elemType := arrayType.Elem() idx := 0 var foundErr error for iter.Next() { v := iter.Value() if elemType.Kind() == reflect.Ptr && v.Type() == ast.NullType { // set nil value to pointer arrayValue.Index(idx).Set(reflect.Zero(elemType)) } else { dstValue, err := d.createDecodedNewValue(ctx, elemType, reflect.Value{}, v) if err != nil { if foundErr == nil { foundErr = err } continue } else { arrayValue.Index(idx).Set(d.castToAssignableValue(dstValue, elemType)) } } idx++ } dst.Set(arrayValue) if foundErr != nil { return errors.Wrapf(foundErr, "failed to decode value") } return nil } func (d *Decoder) decodeSlice(ctx context.Context, dst reflect.Value, src ast.Node) error { arrayNode, err := d.getArrayNode(src) if err != nil { return errors.Wrapf(err, "failed to get array node") } if arrayNode == nil { return nil } iter := arrayNode.ArrayRange() sliceType := dst.Type() sliceValue := reflect.MakeSlice(sliceType, 0, iter.Len()) elemType := sliceType.Elem() var foundErr error for iter.Next() { v := iter.Value() if elemType.Kind() == reflect.Ptr && v.Type() == ast.NullType { // set nil value to pointer sliceValue = reflect.Append(sliceValue, reflect.Zero(elemType)) continue } dstValue, err := d.createDecodedNewValue(ctx, elemType, reflect.Value{}, v) if err != nil { if foundErr == nil { foundErr = err } continue } sliceValue = reflect.Append(sliceValue, d.castToAssignableValue(dstValue, elemType)) } dst.Set(sliceValue) if foundErr != nil { return errors.Wrapf(foundErr, "failed to decode value") } return nil } func (d *Decoder) decodeMapItem(ctx context.Context, dst *MapItem, src ast.Node) error { mapNode, err := d.getMapNode(src) if err != nil { return errors.Wrapf(err, "failed to get map node") } if mapNode == nil { return nil } mapIter := mapNode.MapRange() if !mapIter.Next() { return nil } key := mapIter.Key() value := mapIter.Value() if key.Type() == ast.MergeKeyType { if err := d.decodeMapItem(ctx, dst, value); err != nil { return errors.Wrapf(err, "failed to decode map with merge key") } return nil } *dst = MapItem{ Key: d.nodeToValue(key), Value: d.nodeToValue(value), } return nil } func (d *Decoder) validateDuplicateKey(keyMap map[string]struct{}, key interface{}, keyNode ast.Node) error { k, ok := key.(string) if !ok { return nil } if d.disallowDuplicateKey { if _, exists := keyMap[k]; exists { return errDuplicateKey(fmt.Sprintf(`duplicate key "%s"`, k), keyNode.GetToken()) } } keyMap[k] = struct{}{} return nil } func (d *Decoder) decodeMapSlice(ctx context.Context, dst *MapSlice, src ast.Node) error { mapNode, err := d.getMapNode(src) if err != nil { return errors.Wrapf(err, "failed to get map node") } if mapNode == nil { return nil } mapSlice := MapSlice{} mapIter := mapNode.MapRange() keyMap := map[string]struct{}{} for mapIter.Next() { key := mapIter.Key() value := mapIter.Value() if key.Type() == ast.MergeKeyType { var m MapSlice if err := d.decodeMapSlice(ctx, &m, value); err != nil { return errors.Wrapf(err, "failed to decode map with merge key") } for _, v := range m { if err := d.validateDuplicateKey(keyMap, v.Key, value); err != nil { return errors.Wrapf(err, "invalid map key") } mapSlice = append(mapSlice, v) } continue } k := d.nodeToValue(key) if err := d.validateDuplicateKey(keyMap, k, key); err != nil { return errors.Wrapf(err, "invalid map key") } mapSlice = append(mapSlice, MapItem{ Key: k, Value: d.nodeToValue(value), }) } *dst = mapSlice return nil } func (d *Decoder) decodeMap(ctx context.Context, dst reflect.Value, src ast.Node) error { mapNode, err := d.getMapNode(src) if err != nil { return errors.Wrapf(err, "failed to get map node") } if mapNode == nil { return nil } mapType := dst.Type() mapValue := reflect.MakeMap(mapType) keyType := mapValue.Type().Key() valueType := mapValue.Type().Elem() mapIter := mapNode.MapRange() keyMap := map[string]struct{}{} var foundErr error for mapIter.Next() { key := mapIter.Key() value := mapIter.Value() if key.Type() == ast.MergeKeyType { if err := d.decodeMap(ctx, dst, value); err != nil { return errors.Wrapf(err, "failed to decode map with merge key") } iter := dst.MapRange() for iter.Next() { if err := d.validateDuplicateKey(keyMap, iter.Key(), value); err != nil { return errors.Wrapf(err, "invalid map key") } mapValue.SetMapIndex(iter.Key(), iter.Value()) } continue } k := reflect.ValueOf(d.nodeToValue(key)) if k.IsValid() && k.Type().ConvertibleTo(keyType) { k = k.Convert(keyType) } if k.IsValid() { if err := d.validateDuplicateKey(keyMap, k.Interface(), key); err != nil { return errors.Wrapf(err, "invalid map key") } } if valueType.Kind() == reflect.Ptr && value.Type() == ast.NullType { // set nil value to pointer mapValue.SetMapIndex(k, reflect.Zero(valueType)) continue } dstValue, err := d.createDecodedNewValue(ctx, valueType, reflect.Value{}, value) if err != nil { if foundErr == nil { foundErr = err } } if !k.IsValid() { // expect nil key mapValue.SetMapIndex(d.createDecodableValue(keyType), d.castToAssignableValue(dstValue, valueType)) continue } mapValue.SetMapIndex(k, d.castToAssignableValue(dstValue, valueType)) } dst.Set(mapValue) if foundErr != nil { return errors.Wrapf(foundErr, "failed to decode value") } return nil } func (d *Decoder) fileToReader(file string) (io.Reader, error) { reader, err := os.Open(file) if err != nil { return nil, errors.Wrapf(err, "failed to open file") } return reader, nil } func (d *Decoder) isYAMLFile(file string) bool { ext := filepath.Ext(file) if ext == ".yml" { return true } if ext == ".yaml" { return true } return false } func (d *Decoder) readersUnderDir(dir string) ([]io.Reader, error) { pattern := fmt.Sprintf("%s/*", dir) matches, err := filepath.Glob(pattern) if err != nil { return nil, errors.Wrapf(err, "failed to get files by %s", pattern) } readers := []io.Reader{} for _, match := range matches { if !d.isYAMLFile(match) { continue } reader, err := d.fileToReader(match) if err != nil { return nil, errors.Wrapf(err, "failed to get reader") } readers = append(readers, reader) } return readers, nil } func (d *Decoder) readersUnderDirRecursive(dir string) ([]io.Reader, error) { readers := []io.Reader{} if err := filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { if !d.isYAMLFile(path) { return nil } reader, err := d.fileToReader(path) if err != nil { return errors.Wrapf(err, "failed to get reader") } readers = append(readers, reader) return nil }); err != nil { return nil, errors.Wrapf(err, "interrupt walk in %s", dir) } return readers, nil } func (d *Decoder) resolveReference() error { for _, opt := range d.opts { if err := opt(d); err != nil { return errors.Wrapf(err, "failed to exec option") } } for _, file := range d.referenceFiles { reader, err := d.fileToReader(file) if err != nil { return errors.Wrapf(err, "failed to get reader") } d.referenceReaders = append(d.referenceReaders, reader) } for _, dir := range d.referenceDirs { if !d.isRecursiveDir { readers, err := d.readersUnderDir(dir) if err != nil { return errors.Wrapf(err, "failed to get readers from under the %s", dir) } d.referenceReaders = append(d.referenceReaders, readers...) } else { readers, err := d.readersUnderDirRecursive(dir) if err != nil { return errors.Wrapf(err, "failed to get readers from under the %s", dir) } d.referenceReaders = append(d.referenceReaders, readers...) } } for _, reader := range d.referenceReaders { bytes, err := ioutil.ReadAll(reader) if err != nil { return errors.Wrapf(err, "failed to read buffer") } // assign new anchor definition to anchorMap if _, err := d.parse(bytes); err != nil { return errors.Wrapf(err, "failed to decode") } } d.isResolvedReference = true return nil } func (d *Decoder) parse(bytes []byte) (*ast.File, error) { var parseMode parser.Mode if d.toCommentMap != nil { parseMode = parser.ParseComments } f, err := parser.ParseBytes(bytes, parseMode) if err != nil { return nil, errors.Wrapf(err, "failed to parse yaml") } normalizedFile := &ast.File{} for _, doc := range f.Docs { // try to decode ast.Node to value and map anchor value to anchorMap if v := d.nodeToValue(doc.Body); v != nil { normalizedFile.Docs = append(normalizedFile.Docs, doc) } } return normalizedFile, nil } func (d *Decoder) isInitialized() bool { return d.parsedFile != nil } func (d *Decoder) decodeInit() error { if !d.isResolvedReference { if err := d.resolveReference(); err != nil { return errors.Wrapf(err, "failed to resolve reference") } } var buf bytes.Buffer if _, err := io.Copy(&buf, d.reader); err != nil { return errors.Wrapf(err, "failed to copy from reader") } file, err := d.parse(buf.Bytes()) if err != nil { return errors.Wrapf(err, "failed to decode") } d.parsedFile = file return nil } func (d *Decoder) decode(ctx context.Context, v reflect.Value) error { if len(d.parsedFile.Docs) <= d.streamIndex { return io.EOF } body := d.parsedFile.Docs[d.streamIndex].Body if body == nil { return nil } if err := d.decodeValue(ctx, v.Elem(), body); err != nil { return errors.Wrapf(err, "failed to decode value") } d.streamIndex++ return nil } // Decode reads the next YAML-encoded value from its input // and stores it in the value pointed to by v. // // See the documentation for Unmarshal for details about the // conversion of YAML into a Go value. func (d *Decoder) Decode(v interface{}) error { return d.DecodeContext(context.Background(), v) } // DecodeContext reads the next YAML-encoded value from its input // and stores it in the value pointed to by v with context.Context. func (d *Decoder) DecodeContext(ctx context.Context, v interface{}) error { rv := reflect.ValueOf(v) if rv.Type().Kind() != reflect.Ptr { return errors.ErrDecodeRequiredPointerType } if d.isInitialized() { if err := d.decode(ctx, rv); err != nil { if err == io.EOF { return err } return errors.Wrapf(err, "failed to decode") } return nil } if err := d.decodeInit(); err != nil { return errors.Wrapf(err, "failed to decodeInit") } if err := d.decode(ctx, rv); err != nil { if err == io.EOF { return err } return errors.Wrapf(err, "failed to decode") } return nil } // DecodeFromNode decodes node into the value pointed to by v. func (d *Decoder) DecodeFromNode(node ast.Node, v interface{}) error { return d.DecodeFromNodeContext(context.Background(), node, v) } // DecodeFromNodeContext decodes node into the value pointed to by v with context.Context. func (d *Decoder) DecodeFromNodeContext(ctx context.Context, node ast.Node, v interface{}) error { rv := reflect.ValueOf(v) if rv.Type().Kind() != reflect.Ptr { return errors.ErrDecodeRequiredPointerType } if !d.isInitialized() { if err := d.decodeInit(); err != nil { return errors.Wrapf(err, "failed to decodInit") } } // resolve references to the anchor on the same file d.nodeToValue(node) if err := d.decodeValue(ctx, rv.Elem(), node); err != nil { return errors.Wrapf(err, "failed to decode value") } return nil } ================================================ FILE: vendor/github.com/goccy/go-yaml/encode.go ================================================ package yaml import ( "context" "encoding" "fmt" "io" "math" "reflect" "sort" "strconv" "strings" "time" "github.com/goccy/go-yaml/ast" "github.com/goccy/go-yaml/internal/errors" "github.com/goccy/go-yaml/parser" "github.com/goccy/go-yaml/printer" "github.com/goccy/go-yaml/token" "golang.org/x/xerrors" ) const ( // DefaultIndentSpaces default number of space for indent DefaultIndentSpaces = 2 ) // Encoder writes YAML values to an output stream. type Encoder struct { writer io.Writer opts []EncodeOption indent int indentSequence bool singleQuote bool isFlowStyle bool isJSONStyle bool useJSONMarshaler bool anchorCallback func(*ast.AnchorNode, interface{}) error anchorPtrToNameMap map[uintptr]string customMarshalerMap map[reflect.Type]func(interface{}) ([]byte, error) useLiteralStyleIfMultiline bool commentMap map[*Path][]*Comment written bool line int column int offset int indentNum int indentLevel int } // NewEncoder returns a new encoder that writes to w. // The Encoder should be closed after use to flush all data to w. func NewEncoder(w io.Writer, opts ...EncodeOption) *Encoder { return &Encoder{ writer: w, opts: opts, indent: DefaultIndentSpaces, anchorPtrToNameMap: map[uintptr]string{}, customMarshalerMap: map[reflect.Type]func(interface{}) ([]byte, error){}, line: 1, column: 1, offset: 0, } } // Close closes the encoder by writing any remaining data. // It does not write a stream terminating string "...". func (e *Encoder) Close() error { return nil } // Encode writes the YAML encoding of v to the stream. // If multiple items are encoded to the stream, // the second and subsequent document will be preceded with a "---" document separator, // but the first will not. // // See the documentation for Marshal for details about the conversion of Go values to YAML. func (e *Encoder) Encode(v interface{}) error { return e.EncodeContext(context.Background(), v) } // EncodeContext writes the YAML encoding of v to the stream with context.Context. func (e *Encoder) EncodeContext(ctx context.Context, v interface{}) error { node, err := e.EncodeToNodeContext(ctx, v) if err != nil { return errors.Wrapf(err, "failed to encode to node") } if err := e.setCommentByCommentMap(node); err != nil { return errors.Wrapf(err, "failed to set comment by comment map") } if !e.written { e.written = true } else { // write document separator e.writer.Write([]byte("---\n")) } var p printer.Printer e.writer.Write(p.PrintNode(node)) return nil } // EncodeToNode convert v to ast.Node. func (e *Encoder) EncodeToNode(v interface{}) (ast.Node, error) { return e.EncodeToNodeContext(context.Background(), v) } // EncodeToNodeContext convert v to ast.Node with context.Context. func (e *Encoder) EncodeToNodeContext(ctx context.Context, v interface{}) (ast.Node, error) { for _, opt := range e.opts { if err := opt(e); err != nil { return nil, errors.Wrapf(err, "failed to run option for encoder") } } node, err := e.encodeValue(ctx, reflect.ValueOf(v), 1) if err != nil { return nil, errors.Wrapf(err, "failed to encode value") } return node, nil } func (e *Encoder) setCommentByCommentMap(node ast.Node) error { if e.commentMap == nil { return nil } for path, comments := range e.commentMap { n, err := path.FilterNode(node) if err != nil { return errors.Wrapf(err, "failed to filter node") } if n == nil { continue } for _, comment := range comments { commentTokens := []*token.Token{} for _, text := range comment.Texts { commentTokens = append(commentTokens, token.New(text, text, nil)) } commentGroup := ast.CommentGroup(commentTokens) switch comment.Position { case CommentHeadPosition: if err := e.setHeadComment(node, n, commentGroup); err != nil { return errors.Wrapf(err, "failed to set head comment") } case CommentLinePosition: if err := e.setLineComment(node, n, commentGroup); err != nil { return errors.Wrapf(err, "failed to set line comment") } case CommentFootPosition: if err := e.setFootComment(node, n, commentGroup); err != nil { return errors.Wrapf(err, "failed to set foot comment") } default: return ErrUnknownCommentPositionType } } } return nil } func (e *Encoder) setHeadComment(node ast.Node, filtered ast.Node, comment *ast.CommentGroupNode) error { parent := ast.Parent(node, filtered) if parent == nil { return ErrUnsupportedHeadPositionType(node) } switch p := parent.(type) { case *ast.MappingValueNode: if err := p.SetComment(comment); err != nil { return errors.Wrapf(err, "failed to set comment") } case *ast.MappingNode: if err := p.SetComment(comment); err != nil { return errors.Wrapf(err, "failed to set comment") } case *ast.SequenceNode: if len(p.ValueHeadComments) == 0 { p.ValueHeadComments = make([]*ast.CommentGroupNode, len(p.Values)) } var foundIdx int for idx, v := range p.Values { if v == filtered { foundIdx = idx break } } p.ValueHeadComments[foundIdx] = comment default: return ErrUnsupportedHeadPositionType(node) } return nil } func (e *Encoder) setLineComment(node ast.Node, filtered ast.Node, comment *ast.CommentGroupNode) error { switch filtered.(type) { case *ast.MappingValueNode, *ast.SequenceNode: // Line comment cannot be set for mapping value node. // It should probably be set for the parent map node if err := e.setLineCommentToParentMapNode(node, filtered, comment); err != nil { return errors.Wrapf(err, "failed to set line comment to parent node") } default: if err := filtered.SetComment(comment); err != nil { return errors.Wrapf(err, "failed to set comment") } } return nil } func (e *Encoder) setLineCommentToParentMapNode(node ast.Node, filtered ast.Node, comment *ast.CommentGroupNode) error { parent := ast.Parent(node, filtered) if parent == nil { return ErrUnsupportedLinePositionType(node) } switch p := parent.(type) { case *ast.MappingValueNode: if err := p.Key.SetComment(comment); err != nil { return errors.Wrapf(err, "failed to set comment") } case *ast.MappingNode: if err := p.SetComment(comment); err != nil { return errors.Wrapf(err, "failed to set comment") } default: return ErrUnsupportedLinePositionType(parent) } return nil } func (e *Encoder) setFootComment(node ast.Node, filtered ast.Node, comment *ast.CommentGroupNode) error { parent := ast.Parent(node, filtered) if parent == nil { return ErrUnsupportedFootPositionType(node) } switch n := parent.(type) { case *ast.MappingValueNode: n.FootComment = comment case *ast.MappingNode: n.FootComment = comment case *ast.SequenceNode: n.FootComment = comment default: return ErrUnsupportedFootPositionType(n) } return nil } func (e *Encoder) encodeDocument(doc []byte) (ast.Node, error) { f, err := parser.ParseBytes(doc, 0) if err != nil { return nil, errors.Wrapf(err, "failed to parse yaml") } for _, docNode := range f.Docs { if docNode.Body != nil { return docNode.Body, nil } } return nil, nil } func (e *Encoder) isInvalidValue(v reflect.Value) bool { if !v.IsValid() { return true } kind := v.Type().Kind() if kind == reflect.Ptr && v.IsNil() { return true } if kind == reflect.Interface && v.IsNil() { return true } return false } type jsonMarshaler interface { MarshalJSON() ([]byte, error) } func (e *Encoder) existsTypeInCustomMarshalerMap(t reflect.Type) bool { if _, exists := e.customMarshalerMap[t]; exists { return true } globalCustomMarshalerMu.Lock() defer globalCustomMarshalerMu.Unlock() if _, exists := globalCustomMarshalerMap[t]; exists { return true } return false } func (e *Encoder) marshalerFromCustomMarshalerMap(t reflect.Type) (func(interface{}) ([]byte, error), bool) { if marshaler, exists := e.customMarshalerMap[t]; exists { return marshaler, exists } globalCustomMarshalerMu.Lock() defer globalCustomMarshalerMu.Unlock() if marshaler, exists := globalCustomMarshalerMap[t]; exists { return marshaler, exists } return nil, false } func (e *Encoder) canEncodeByMarshaler(v reflect.Value) bool { if !v.CanInterface() { return false } if e.existsTypeInCustomMarshalerMap(v.Type()) { return true } iface := v.Interface() switch iface.(type) { case BytesMarshalerContext: return true case BytesMarshaler: return true case InterfaceMarshalerContext: return true case InterfaceMarshaler: return true case time.Time: return true case time.Duration: return true case encoding.TextMarshaler: return true case jsonMarshaler: return e.useJSONMarshaler } return false } func (e *Encoder) encodeByMarshaler(ctx context.Context, v reflect.Value, column int) (ast.Node, error) { iface := v.Interface() if marshaler, exists := e.marshalerFromCustomMarshalerMap(v.Type()); exists { doc, err := marshaler(iface) if err != nil { return nil, errors.Wrapf(err, "failed to MarshalYAML") } node, err := e.encodeDocument(doc) if err != nil { return nil, errors.Wrapf(err, "failed to encode document") } return node, nil } if marshaler, ok := iface.(BytesMarshalerContext); ok { doc, err := marshaler.MarshalYAML(ctx) if err != nil { return nil, errors.Wrapf(err, "failed to MarshalYAML") } node, err := e.encodeDocument(doc) if err != nil { return nil, errors.Wrapf(err, "failed to encode document") } return node, nil } if marshaler, ok := iface.(BytesMarshaler); ok { doc, err := marshaler.MarshalYAML() if err != nil { return nil, errors.Wrapf(err, "failed to MarshalYAML") } node, err := e.encodeDocument(doc) if err != nil { return nil, errors.Wrapf(err, "failed to encode document") } return node, nil } if marshaler, ok := iface.(InterfaceMarshalerContext); ok { marshalV, err := marshaler.MarshalYAML(ctx) if err != nil { return nil, errors.Wrapf(err, "failed to MarshalYAML") } return e.encodeValue(ctx, reflect.ValueOf(marshalV), column) } if marshaler, ok := iface.(InterfaceMarshaler); ok { marshalV, err := marshaler.MarshalYAML() if err != nil { return nil, errors.Wrapf(err, "failed to MarshalYAML") } return e.encodeValue(ctx, reflect.ValueOf(marshalV), column) } if t, ok := iface.(time.Time); ok { return e.encodeTime(t, column), nil } if t, ok := iface.(time.Duration); ok { return e.encodeDuration(t, column), nil } if marshaler, ok := iface.(encoding.TextMarshaler); ok { doc, err := marshaler.MarshalText() if err != nil { return nil, errors.Wrapf(err, "failed to MarshalText") } node, err := e.encodeDocument(doc) if err != nil { return nil, errors.Wrapf(err, "failed to encode document") } return node, nil } if e.useJSONMarshaler { if marshaler, ok := iface.(jsonMarshaler); ok { jsonBytes, err := marshaler.MarshalJSON() if err != nil { return nil, errors.Wrapf(err, "failed to MarshalJSON") } doc, err := JSONToYAML(jsonBytes) if err != nil { return nil, errors.Wrapf(err, "failed to convert json to yaml") } node, err := e.encodeDocument(doc) if err != nil { return nil, errors.Wrapf(err, "failed to encode document") } return node, nil } } return nil, xerrors.Errorf("does not implemented Marshaler") } func (e *Encoder) encodeValue(ctx context.Context, v reflect.Value, column int) (ast.Node, error) { if e.isInvalidValue(v) { return e.encodeNil(), nil } if e.canEncodeByMarshaler(v) { node, err := e.encodeByMarshaler(ctx, v, column) if err != nil { return nil, errors.Wrapf(err, "failed to encode by marshaler") } return node, nil } switch v.Type().Kind() { case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return e.encodeInt(v.Int()), nil case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: return e.encodeUint(v.Uint()), nil case reflect.Float32: return e.encodeFloat(v.Float(), 32), nil case reflect.Float64: return e.encodeFloat(v.Float(), 64), nil case reflect.Ptr: anchorName := e.anchorPtrToNameMap[v.Pointer()] if anchorName != "" { aliasName := anchorName alias := ast.Alias(token.New("*", "*", e.pos(column))) alias.Value = ast.String(token.New(aliasName, aliasName, e.pos(column))) return alias, nil } return e.encodeValue(ctx, v.Elem(), column) case reflect.Interface: return e.encodeValue(ctx, v.Elem(), column) case reflect.String: return e.encodeString(v.String(), column), nil case reflect.Bool: return e.encodeBool(v.Bool()), nil case reflect.Slice: if mapSlice, ok := v.Interface().(MapSlice); ok { return e.encodeMapSlice(ctx, mapSlice, column) } return e.encodeSlice(ctx, v) case reflect.Array: return e.encodeArray(ctx, v) case reflect.Struct: if v.CanInterface() { if mapItem, ok := v.Interface().(MapItem); ok { return e.encodeMapItem(ctx, mapItem, column) } if t, ok := v.Interface().(time.Time); ok { return e.encodeTime(t, column), nil } } return e.encodeStruct(ctx, v, column) case reflect.Map: return e.encodeMap(ctx, v, column), nil default: return nil, xerrors.Errorf("unknown value type %s", v.Type().String()) } } func (e *Encoder) pos(column int) *token.Position { return &token.Position{ Line: e.line, Column: column, Offset: e.offset, IndentNum: e.indentNum, IndentLevel: e.indentLevel, } } func (e *Encoder) encodeNil() *ast.NullNode { value := "null" return ast.Null(token.New(value, value, e.pos(e.column))) } func (e *Encoder) encodeInt(v int64) *ast.IntegerNode { value := fmt.Sprint(v) return ast.Integer(token.New(value, value, e.pos(e.column))) } func (e *Encoder) encodeUint(v uint64) *ast.IntegerNode { value := fmt.Sprint(v) return ast.Integer(token.New(value, value, e.pos(e.column))) } func (e *Encoder) encodeFloat(v float64, bitSize int) ast.Node { if v == math.Inf(0) { value := ".inf" return ast.Infinity(token.New(value, value, e.pos(e.column))) } else if v == math.Inf(-1) { value := "-.inf" return ast.Infinity(token.New(value, value, e.pos(e.column))) } else if math.IsNaN(v) { value := ".nan" return ast.Nan(token.New(value, value, e.pos(e.column))) } value := strconv.FormatFloat(v, 'g', -1, bitSize) if !strings.Contains(value, ".") && !strings.Contains(value, "e") { // append x.0 suffix to keep float value context value = fmt.Sprintf("%s.0", value) } return ast.Float(token.New(value, value, e.pos(e.column))) } func (e *Encoder) isNeedQuoted(v string) bool { if e.isJSONStyle { return true } if e.useLiteralStyleIfMultiline && strings.ContainsAny(v, "\n\r") { return false } if e.isFlowStyle && strings.ContainsAny(v, `]},'"`) { return true } if token.IsNeedQuoted(v) { return true } return false } func (e *Encoder) encodeString(v string, column int) *ast.StringNode { if e.isNeedQuoted(v) { if e.singleQuote { v = quoteWith(v, '\'') } else { v = strconv.Quote(v) } } return ast.String(token.New(v, v, e.pos(column))) } func (e *Encoder) encodeBool(v bool) *ast.BoolNode { value := fmt.Sprint(v) return ast.Bool(token.New(value, value, e.pos(e.column))) } func (e *Encoder) encodeSlice(ctx context.Context, value reflect.Value) (*ast.SequenceNode, error) { if e.indentSequence { e.column += e.indent } column := e.column sequence := ast.Sequence(token.New("-", "-", e.pos(column)), e.isFlowStyle) for i := 0; i < value.Len(); i++ { node, err := e.encodeValue(ctx, value.Index(i), column) if err != nil { return nil, errors.Wrapf(err, "failed to encode value for slice") } sequence.Values = append(sequence.Values, node) } if e.indentSequence { e.column -= e.indent } return sequence, nil } func (e *Encoder) encodeArray(ctx context.Context, value reflect.Value) (*ast.SequenceNode, error) { if e.indentSequence { e.column += e.indent } column := e.column sequence := ast.Sequence(token.New("-", "-", e.pos(column)), e.isFlowStyle) for i := 0; i < value.Len(); i++ { node, err := e.encodeValue(ctx, value.Index(i), column) if err != nil { return nil, errors.Wrapf(err, "failed to encode value for array") } sequence.Values = append(sequence.Values, node) } if e.indentSequence { e.column -= e.indent } return sequence, nil } func (e *Encoder) encodeMapItem(ctx context.Context, item MapItem, column int) (*ast.MappingValueNode, error) { k := reflect.ValueOf(item.Key) v := reflect.ValueOf(item.Value) value, err := e.encodeValue(ctx, v, column) if err != nil { return nil, errors.Wrapf(err, "failed to encode MapItem") } if e.isMapNode(value) { value.AddColumn(e.indent) } return ast.MappingValue( token.New("", "", e.pos(column)), e.encodeString(k.Interface().(string), column), value, ), nil } func (e *Encoder) encodeMapSlice(ctx context.Context, value MapSlice, column int) (*ast.MappingNode, error) { node := ast.Mapping(token.New("", "", e.pos(column)), e.isFlowStyle) for _, item := range value { value, err := e.encodeMapItem(ctx, item, column) if err != nil { return nil, errors.Wrapf(err, "failed to encode MapItem for MapSlice") } node.Values = append(node.Values, value) } return node, nil } func (e *Encoder) isMapNode(node ast.Node) bool { _, ok := node.(ast.MapNode) return ok } func (e *Encoder) encodeMap(ctx context.Context, value reflect.Value, column int) ast.Node { node := ast.Mapping(token.New("", "", e.pos(column)), e.isFlowStyle) keys := make([]interface{}, len(value.MapKeys())) for i, k := range value.MapKeys() { keys[i] = k.Interface() } sort.Slice(keys, func(i, j int) bool { return fmt.Sprint(keys[i]) < fmt.Sprint(keys[j]) }) for _, key := range keys { k := reflect.ValueOf(key) v := value.MapIndex(k) value, err := e.encodeValue(ctx, v, column) if err != nil { return nil } if e.isMapNode(value) { value.AddColumn(e.indent) } node.Values = append(node.Values, ast.MappingValue( nil, e.encodeString(fmt.Sprint(key), column), value, )) } return node } // IsZeroer is used to check whether an object is zero to determine // whether it should be omitted when marshaling with the omitempty flag. // One notable implementation is time.Time. type IsZeroer interface { IsZero() bool } func (e *Encoder) isZeroValue(v reflect.Value) bool { kind := v.Kind() if z, ok := v.Interface().(IsZeroer); ok { if (kind == reflect.Ptr || kind == reflect.Interface) && v.IsNil() { return true } return z.IsZero() } switch 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 !e.isZeroValue(v.Field(i)) { return false } } return true } return false } func (e *Encoder) encodeTime(v time.Time, column int) *ast.StringNode { value := v.Format(time.RFC3339Nano) if e.isJSONStyle { value = strconv.Quote(value) } return ast.String(token.New(value, value, e.pos(column))) } func (e *Encoder) encodeDuration(v time.Duration, column int) *ast.StringNode { value := v.String() if e.isJSONStyle { value = strconv.Quote(value) } return ast.String(token.New(value, value, e.pos(column))) } func (e *Encoder) encodeAnchor(anchorName string, value ast.Node, fieldValue reflect.Value, column int) (*ast.AnchorNode, error) { anchorNode := ast.Anchor(token.New("&", "&", e.pos(column))) anchorNode.Name = ast.String(token.New(anchorName, anchorName, e.pos(column))) anchorNode.Value = value if e.anchorCallback != nil { if err := e.anchorCallback(anchorNode, fieldValue.Interface()); err != nil { return nil, errors.Wrapf(err, "failed to marshal anchor") } if snode, ok := anchorNode.Name.(*ast.StringNode); ok { anchorName = snode.Value } } if fieldValue.Kind() == reflect.Ptr { e.anchorPtrToNameMap[fieldValue.Pointer()] = anchorName } return anchorNode, nil } func (e *Encoder) encodeStruct(ctx context.Context, value reflect.Value, column int) (ast.Node, error) { node := ast.Mapping(token.New("", "", e.pos(column)), e.isFlowStyle) structType := value.Type() structFieldMap, err := structFieldMap(structType) if err != nil { return nil, errors.Wrapf(err, "failed to get struct field map") } hasInlineAnchorField := false var inlineAnchorValue reflect.Value for i := 0; i < value.NumField(); i++ { field := structType.Field(i) if isIgnoredStructField(field) { continue } fieldValue := value.FieldByName(field.Name) structField := structFieldMap[field.Name] if structField.IsOmitEmpty && e.isZeroValue(fieldValue) { // omit encoding continue } ve := e if !e.isFlowStyle && structField.IsFlow { ve = &Encoder{} *ve = *e ve.isFlowStyle = true } value, err := ve.encodeValue(ctx, fieldValue, column) if err != nil { return nil, errors.Wrapf(err, "failed to encode value") } if e.isMapNode(value) { value.AddColumn(e.indent) } var key ast.MapKeyNode = e.encodeString(structField.RenderName, column) switch { case structField.AnchorName != "": anchorNode, err := e.encodeAnchor(structField.AnchorName, value, fieldValue, column) if err != nil { return nil, errors.Wrapf(err, "failed to encode anchor") } value = anchorNode case structField.IsAutoAlias: if fieldValue.Kind() != reflect.Ptr { return nil, xerrors.Errorf( "%s in struct is not pointer type. but required automatically alias detection", structField.FieldName, ) } anchorName := e.anchorPtrToNameMap[fieldValue.Pointer()] if anchorName == "" { return nil, xerrors.Errorf( "cannot find anchor name from pointer address for automatically alias detection", ) } aliasName := anchorName alias := ast.Alias(token.New("*", "*", e.pos(column))) alias.Value = ast.String(token.New(aliasName, aliasName, e.pos(column))) value = alias if structField.IsInline { // if both used alias and inline, output `<<: *alias` key = ast.MergeKey(token.New("<<", "<<", e.pos(column))) } case structField.AliasName != "": aliasName := structField.AliasName alias := ast.Alias(token.New("*", "*", e.pos(column))) alias.Value = ast.String(token.New(aliasName, aliasName, e.pos(column))) value = alias if structField.IsInline { // if both used alias and inline, output `<<: *alias` key = ast.MergeKey(token.New("<<", "<<", e.pos(column))) } case structField.IsInline: isAutoAnchor := structField.IsAutoAnchor if !hasInlineAnchorField { hasInlineAnchorField = isAutoAnchor } if isAutoAnchor { inlineAnchorValue = fieldValue } mapNode, ok := value.(ast.MapNode) if !ok { return nil, xerrors.Errorf("inline value is must be map or struct type") } mapIter := mapNode.MapRange() for mapIter.Next() { key := mapIter.Key() value := mapIter.Value() keyName := key.GetToken().Value if structFieldMap.isIncludedRenderName(keyName) { // if declared same key name, skip encoding this field continue } key.AddColumn(-e.indent) value.AddColumn(-e.indent) node.Values = append(node.Values, ast.MappingValue(nil, key, value)) } continue case structField.IsAutoAnchor: anchorNode, err := e.encodeAnchor(structField.RenderName, value, fieldValue, column) if err != nil { return nil, errors.Wrapf(err, "failed to encode anchor") } value = anchorNode } node.Values = append(node.Values, ast.MappingValue(nil, key, value)) } if hasInlineAnchorField { node.AddColumn(e.indent) anchorName := "anchor" anchorNode := ast.Anchor(token.New("&", "&", e.pos(column))) anchorNode.Name = ast.String(token.New(anchorName, anchorName, e.pos(column))) anchorNode.Value = node if e.anchorCallback != nil { if err := e.anchorCallback(anchorNode, value.Addr().Interface()); err != nil { return nil, errors.Wrapf(err, "failed to marshal anchor") } if snode, ok := anchorNode.Name.(*ast.StringNode); ok { anchorName = snode.Value } } if inlineAnchorValue.Kind() == reflect.Ptr { e.anchorPtrToNameMap[inlineAnchorValue.Pointer()] = anchorName } return anchorNode, nil } return node, nil } ================================================ FILE: vendor/github.com/goccy/go-yaml/error.go ================================================ package yaml import ( "github.com/goccy/go-yaml/ast" "golang.org/x/xerrors" ) var ( ErrInvalidQuery = xerrors.New("invalid query") ErrInvalidPath = xerrors.New("invalid path instance") ErrInvalidPathString = xerrors.New("invalid path string") ErrNotFoundNode = xerrors.New("node not found") ErrUnknownCommentPositionType = xerrors.New("unknown comment position type") ErrInvalidCommentMapValue = xerrors.New("invalid comment map value. it must be not nil value") ) func ErrUnsupportedHeadPositionType(node ast.Node) error { return xerrors.Errorf("unsupported comment head position for %s", node.Type()) } func ErrUnsupportedLinePositionType(node ast.Node) error { return xerrors.Errorf("unsupported comment line position for %s", node.Type()) } func ErrUnsupportedFootPositionType(node ast.Node) error { return xerrors.Errorf("unsupported comment foot position for %s", node.Type()) } // IsInvalidQueryError whether err is ErrInvalidQuery or not. func IsInvalidQueryError(err error) bool { return xerrors.Is(err, ErrInvalidQuery) } // IsInvalidPathError whether err is ErrInvalidPath or not. func IsInvalidPathError(err error) bool { return xerrors.Is(err, ErrInvalidPath) } // IsInvalidPathStringError whether err is ErrInvalidPathString or not. func IsInvalidPathStringError(err error) bool { return xerrors.Is(err, ErrInvalidPathString) } // IsNotFoundNodeError whether err is ErrNotFoundNode or not. func IsNotFoundNodeError(err error) bool { return xerrors.Is(err, ErrNotFoundNode) } // IsInvalidTokenTypeError whether err is ast.ErrInvalidTokenType or not. func IsInvalidTokenTypeError(err error) bool { return xerrors.Is(err, ast.ErrInvalidTokenType) } // IsInvalidAnchorNameError whether err is ast.ErrInvalidAnchorName or not. func IsInvalidAnchorNameError(err error) bool { return xerrors.Is(err, ast.ErrInvalidAnchorName) } // IsInvalidAliasNameError whether err is ast.ErrInvalidAliasName or not. func IsInvalidAliasNameError(err error) bool { return xerrors.Is(err, ast.ErrInvalidAliasName) } ================================================ FILE: vendor/github.com/goccy/go-yaml/internal/errors/error.go ================================================ package errors import ( "bytes" "fmt" "reflect" "github.com/goccy/go-yaml/printer" "github.com/goccy/go-yaml/token" "golang.org/x/xerrors" ) const ( defaultColorize = false defaultIncludeSource = true ) var ( ErrDecodeRequiredPointerType = xerrors.New("required pointer type value") ) // Wrapf wrap error for stack trace func Wrapf(err error, msg string, args ...interface{}) error { return &wrapError{ baseError: &baseError{}, err: xerrors.Errorf(msg, args...), nextErr: err, frame: xerrors.Caller(1), } } // ErrSyntax create syntax error instance with message and token func ErrSyntax(msg string, tk *token.Token) *syntaxError { return &syntaxError{ baseError: &baseError{}, msg: msg, token: tk, frame: xerrors.Caller(1), } } type baseError struct { state fmt.State verb rune } func (e *baseError) Error() string { return "" } func (e *baseError) chainStateAndVerb(err error) { wrapErr, ok := err.(*wrapError) if ok { wrapErr.state = e.state wrapErr.verb = e.verb } syntaxErr, ok := err.(*syntaxError) if ok { syntaxErr.state = e.state syntaxErr.verb = e.verb } } type wrapError struct { *baseError err error nextErr error frame xerrors.Frame } type FormatErrorPrinter struct { xerrors.Printer Colored bool InclSource bool } func (e *wrapError) As(target interface{}) bool { err := e.nextErr for { if wrapErr, ok := err.(*wrapError); ok { err = wrapErr.nextErr continue } break } return xerrors.As(err, target) } func (e *wrapError) Unwrap() error { return e.nextErr } func (e *wrapError) PrettyPrint(p xerrors.Printer, colored, inclSource bool) error { return e.FormatError(&FormatErrorPrinter{Printer: p, Colored: colored, InclSource: inclSource}) } func (e *wrapError) FormatError(p xerrors.Printer) error { if _, ok := p.(*FormatErrorPrinter); !ok { p = &FormatErrorPrinter{ Printer: p, Colored: defaultColorize, InclSource: defaultIncludeSource, } } if e.verb == 'v' && e.state.Flag('+') { // print stack trace for debugging p.Print(e.err, "\n") e.frame.Format(p) e.chainStateAndVerb(e.nextErr) return e.nextErr } err := e.nextErr for { if wrapErr, ok := err.(*wrapError); ok { err = wrapErr.nextErr continue } break } e.chainStateAndVerb(err) if fmtErr, ok := err.(xerrors.Formatter); ok { fmtErr.FormatError(p) } else { p.Print(err) } return nil } type wrapState struct { org fmt.State } func (s *wrapState) Write(b []byte) (n int, err error) { return s.org.Write(b) } func (s *wrapState) Width() (wid int, ok bool) { return s.org.Width() } func (s *wrapState) Precision() (prec int, ok bool) { return s.org.Precision() } func (s *wrapState) Flag(c int) bool { // set true to 'printDetail' forced because when p.Detail() is false, xerrors.Printer no output any text if c == '#' { // ignore '#' keyword because xerrors.FormatError doesn't set true to printDetail. // ( see https://github.com/golang/xerrors/blob/master/adaptor.go#L39-L43 ) return false } return true } func (e *wrapError) Format(state fmt.State, verb rune) { e.state = state e.verb = verb xerrors.FormatError(e, &wrapState{org: state}, verb) } func (e *wrapError) Error() string { var buf bytes.Buffer e.PrettyPrint(&Sink{&buf}, defaultColorize, defaultIncludeSource) return buf.String() } type syntaxError struct { *baseError msg string token *token.Token frame xerrors.Frame } func (e *syntaxError) PrettyPrint(p xerrors.Printer, colored, inclSource bool) error { return e.FormatError(&FormatErrorPrinter{Printer: p, Colored: colored, InclSource: inclSource}) } func (e *syntaxError) FormatError(p xerrors.Printer) error { var pp printer.Printer var colored, inclSource bool if fep, ok := p.(*FormatErrorPrinter); ok { colored = fep.Colored inclSource = fep.InclSource } pos := fmt.Sprintf("[%d:%d] ", e.token.Position.Line, e.token.Position.Column) msg := pp.PrintErrorMessage(fmt.Sprintf("%s%s", pos, e.msg), colored) if inclSource { msg += "\n" + pp.PrintErrorToken(e.token, colored) } p.Print(msg) if e.verb == 'v' && e.state.Flag('+') { // %+v // print stack trace for debugging e.frame.Format(p) } return nil } type PrettyPrinter interface { PrettyPrint(xerrors.Printer, bool, bool) error } type Sink struct{ *bytes.Buffer } func (es *Sink) Print(args ...interface{}) { fmt.Fprint(es.Buffer, args...) } func (es *Sink) Printf(f string, args ...interface{}) { fmt.Fprintf(es.Buffer, f, args...) } func (es *Sink) Detail() bool { return false } func (e *syntaxError) Error() string { var buf bytes.Buffer e.PrettyPrint(&Sink{&buf}, defaultColorize, defaultIncludeSource) return buf.String() } type TypeError struct { DstType reflect.Type SrcType reflect.Type StructFieldName *string Token *token.Token } func (e *TypeError) Error() string { if e.StructFieldName != nil { return fmt.Sprintf("cannot unmarshal %s into Go struct field %s of type %s", e.SrcType, *e.StructFieldName, e.DstType) } return fmt.Sprintf("cannot unmarshal %s into Go value of type %s", e.SrcType, e.DstType) } func (e *TypeError) PrettyPrint(p xerrors.Printer, colored, inclSource bool) error { return e.FormatError(&FormatErrorPrinter{Printer: p, Colored: colored, InclSource: inclSource}) } func (e *TypeError) FormatError(p xerrors.Printer) error { var pp printer.Printer var colored, inclSource bool if fep, ok := p.(*FormatErrorPrinter); ok { colored = fep.Colored inclSource = fep.InclSource } pos := fmt.Sprintf("[%d:%d] ", e.Token.Position.Line, e.Token.Position.Column) msg := pp.PrintErrorMessage(fmt.Sprintf("%s%s", pos, e.Error()), colored) if inclSource { msg += "\n" + pp.PrintErrorToken(e.Token, colored) } p.Print(msg) return nil } ================================================ FILE: vendor/github.com/goccy/go-yaml/lexer/lexer.go ================================================ package lexer import ( "io" "github.com/goccy/go-yaml/scanner" "github.com/goccy/go-yaml/token" ) // Tokenize split to token instances from string func Tokenize(src string) token.Tokens { var s scanner.Scanner s.Init(src) var tokens token.Tokens for { subTokens, err := s.Scan() if err == io.EOF { break } tokens.Add(subTokens...) } return tokens } ================================================ FILE: vendor/github.com/goccy/go-yaml/option.go ================================================ package yaml import ( "io" "reflect" "github.com/goccy/go-yaml/ast" ) // DecodeOption functional option type for Decoder type DecodeOption func(d *Decoder) error // ReferenceReaders pass to Decoder that reference to anchor defined by passed readers func ReferenceReaders(readers ...io.Reader) DecodeOption { return func(d *Decoder) error { d.referenceReaders = append(d.referenceReaders, readers...) return nil } } // ReferenceFiles pass to Decoder that reference to anchor defined by passed files func ReferenceFiles(files ...string) DecodeOption { return func(d *Decoder) error { d.referenceFiles = files return nil } } // ReferenceDirs pass to Decoder that reference to anchor defined by files under the passed dirs func ReferenceDirs(dirs ...string) DecodeOption { return func(d *Decoder) error { d.referenceDirs = dirs return nil } } // RecursiveDir search yaml file recursively from passed dirs by ReferenceDirs option func RecursiveDir(isRecursive bool) DecodeOption { return func(d *Decoder) error { d.isRecursiveDir = isRecursive return nil } } // Validator set StructValidator instance to Decoder func Validator(v StructValidator) DecodeOption { return func(d *Decoder) error { d.validator = v return nil } } // Strict enable DisallowUnknownField and DisallowDuplicateKey func Strict() DecodeOption { return func(d *Decoder) error { d.disallowUnknownField = true d.disallowDuplicateKey = true return nil } } // DisallowUnknownField causes the Decoder to return an error when the destination // is a struct and the input contains object keys which do not match any // non-ignored, exported fields in the destination. func DisallowUnknownField() DecodeOption { return func(d *Decoder) error { d.disallowUnknownField = true return nil } } // DisallowDuplicateKey causes an error when mapping keys that are duplicates func DisallowDuplicateKey() DecodeOption { return func(d *Decoder) error { d.disallowDuplicateKey = true return nil } } // UseOrderedMap can be interpreted as a map, // and uses MapSlice ( ordered map ) aggressively if there is no type specification func UseOrderedMap() DecodeOption { return func(d *Decoder) error { d.useOrderedMap = true return nil } } // UseJSONUnmarshaler if neither `BytesUnmarshaler` nor `InterfaceUnmarshaler` is implemented // and `UnmashalJSON([]byte)error` is implemented, convert the argument from `YAML` to `JSON` and then call it. func UseJSONUnmarshaler() DecodeOption { return func(d *Decoder) error { d.useJSONUnmarshaler = true return nil } } // CustomUnmarshaler overrides any decoding process for the type specified in generics. // // NOTE: If RegisterCustomUnmarshaler and CustomUnmarshaler of DecodeOption are specified for the same type, // the CustomUnmarshaler specified in DecodeOption takes precedence. func CustomUnmarshaler[T any](unmarshaler func(*T, []byte) error) DecodeOption { return func(d *Decoder) error { var typ *T d.customUnmarshalerMap[reflect.TypeOf(typ)] = func(v interface{}, b []byte) error { return unmarshaler(v.(*T), b) } return nil } } // EncodeOption functional option type for Encoder type EncodeOption func(e *Encoder) error // Indent change indent number func Indent(spaces int) EncodeOption { return func(e *Encoder) error { e.indent = spaces return nil } } // IndentSequence causes sequence values to be indented the same value as Indent func IndentSequence(indent bool) EncodeOption { return func(e *Encoder) error { e.indentSequence = indent return nil } } // UseSingleQuote determines if single or double quotes should be preferred for strings. func UseSingleQuote(sq bool) EncodeOption { return func(e *Encoder) error { e.singleQuote = sq return nil } } // Flow encoding by flow style func Flow(isFlowStyle bool) EncodeOption { return func(e *Encoder) error { e.isFlowStyle = isFlowStyle return nil } } // UseLiteralStyleIfMultiline causes encoding multiline strings with a literal syntax, // no matter what characters they include func UseLiteralStyleIfMultiline(useLiteralStyleIfMultiline bool) EncodeOption { return func(e *Encoder) error { e.useLiteralStyleIfMultiline = useLiteralStyleIfMultiline return nil } } // JSON encode in JSON format func JSON() EncodeOption { return func(e *Encoder) error { e.isJSONStyle = true e.isFlowStyle = true return nil } } // MarshalAnchor call back if encoder find an anchor during encoding func MarshalAnchor(callback func(*ast.AnchorNode, interface{}) error) EncodeOption { return func(e *Encoder) error { e.anchorCallback = callback return nil } } // UseJSONMarshaler if neither `BytesMarshaler` nor `InterfaceMarshaler` // nor `encoding.TextMarshaler` is implemented and `MarshalJSON()([]byte, error)` is implemented, // call `MarshalJSON` to convert the returned `JSON` to `YAML` for processing. func UseJSONMarshaler() EncodeOption { return func(e *Encoder) error { e.useJSONMarshaler = true return nil } } // CustomMarshaler overrides any encoding process for the type specified in generics. // // NOTE: If type T implements MarshalYAML for pointer receiver, the type specified in CustomMarshaler must be *T. // If RegisterCustomMarshaler and CustomMarshaler of EncodeOption are specified for the same type, // the CustomMarshaler specified in EncodeOption takes precedence. func CustomMarshaler[T any](marshaler func(T) ([]byte, error)) EncodeOption { return func(e *Encoder) error { var typ T e.customMarshalerMap[reflect.TypeOf(typ)] = func(v interface{}) ([]byte, error) { return marshaler(v.(T)) } return nil } } // CommentPosition type of the position for comment. type CommentPosition int const ( CommentHeadPosition CommentPosition = CommentPosition(iota) CommentLinePosition CommentFootPosition ) func (p CommentPosition) String() string { switch p { case CommentHeadPosition: return "Head" case CommentLinePosition: return "Line" case CommentFootPosition: return "Foot" default: return "" } } // LineComment create a one-line comment for CommentMap. func LineComment(text string) *Comment { return &Comment{ Texts: []string{text}, Position: CommentLinePosition, } } // HeadComment create a multiline comment for CommentMap. func HeadComment(texts ...string) *Comment { return &Comment{ Texts: texts, Position: CommentHeadPosition, } } // FootComment create a multiline comment for CommentMap. func FootComment(texts ...string) *Comment { return &Comment{ Texts: texts, Position: CommentFootPosition, } } // Comment raw data for comment. type Comment struct { Texts []string Position CommentPosition } // CommentMap map of the position of the comment and the comment information. type CommentMap map[string][]*Comment // WithComment add a comment using the location and text information given in the CommentMap. func WithComment(cm CommentMap) EncodeOption { return func(e *Encoder) error { commentMap := map[*Path][]*Comment{} for k, v := range cm { path, err := PathString(k) if err != nil { return err } commentMap[path] = v } e.commentMap = commentMap return nil } } // CommentToMap apply the position and content of comments in a YAML document to a CommentMap. func CommentToMap(cm CommentMap) DecodeOption { return func(d *Decoder) error { if cm == nil { return ErrInvalidCommentMapValue } d.toCommentMap = cm return nil } } ================================================ FILE: vendor/github.com/goccy/go-yaml/parser/context.go ================================================ package parser import ( "fmt" "strings" "github.com/goccy/go-yaml/token" ) // context context at parsing type context struct { parent *context idx int size int tokens token.Tokens mode Mode path string } var pathSpecialChars = []string{ "$", "*", ".", "[", "]", } func containsPathSpecialChar(path string) bool { for _, char := range pathSpecialChars { if strings.Contains(path, char) { return true } } return false } func normalizePath(path string) string { if containsPathSpecialChar(path) { return fmt.Sprintf("'%s'", path) } return path } func (c *context) withChild(path string) *context { ctx := c.copy() path = normalizePath(path) ctx.path += fmt.Sprintf(".%s", path) return ctx } func (c *context) withIndex(idx uint) *context { ctx := c.copy() ctx.path += fmt.Sprintf("[%d]", idx) return ctx } func (c *context) copy() *context { return &context{ parent: c, idx: c.idx, size: c.size, tokens: append(token.Tokens{}, c.tokens...), mode: c.mode, path: c.path, } } func (c *context) next() bool { return c.idx < c.size } func (c *context) previousToken() *token.Token { if c.idx > 0 { return c.tokens[c.idx-1] } return nil } func (c *context) insertToken(idx int, tk *token.Token) { if c.parent != nil { c.parent.insertToken(idx, tk) } if c.size < idx { return } if c.size == idx { curToken := c.tokens[c.size-1] tk.Next = curToken curToken.Prev = tk c.tokens = append(c.tokens, tk) c.size = len(c.tokens) return } curToken := c.tokens[idx] tk.Next = curToken curToken.Prev = tk c.tokens = append(c.tokens[:idx+1], c.tokens[idx:]...) c.tokens[idx] = tk c.size = len(c.tokens) } func (c *context) currentToken() *token.Token { if c.idx >= c.size { return nil } return c.tokens[c.idx] } func (c *context) nextToken() *token.Token { if c.idx+1 >= c.size { return nil } return c.tokens[c.idx+1] } func (c *context) afterNextToken() *token.Token { if c.idx+2 >= c.size { return nil } return c.tokens[c.idx+2] } func (c *context) nextNotCommentToken() *token.Token { for i := c.idx + 1; i < c.size; i++ { tk := c.tokens[i] if tk.Type == token.CommentType { continue } return tk } return nil } func (c *context) afterNextNotCommentToken() *token.Token { notCommentTokenCount := 0 for i := c.idx + 1; i < c.size; i++ { tk := c.tokens[i] if tk.Type == token.CommentType { continue } notCommentTokenCount++ if notCommentTokenCount == 2 { return tk } } return nil } func (c *context) enabledComment() bool { return c.mode&ParseComments != 0 } func (c *context) isCurrentCommentToken() bool { tk := c.currentToken() if tk == nil { return false } return tk.Type == token.CommentType } func (c *context) progressIgnoreComment(num int) { if c.parent != nil { c.parent.progressIgnoreComment(num) } if c.size <= c.idx+num { c.idx = c.size } else { c.idx += num } } func (c *context) progress(num int) { if c.isCurrentCommentToken() { return } c.progressIgnoreComment(num) } func newContext(tokens token.Tokens, mode Mode) *context { filteredTokens := []*token.Token{} if mode&ParseComments != 0 { filteredTokens = tokens } else { for _, tk := range tokens { if tk.Type == token.CommentType { continue } // keep prev/next reference between tokens containing comments // https://github.com/goccy/go-yaml/issues/254 filteredTokens = append(filteredTokens, tk) } } return &context{ idx: 0, size: len(filteredTokens), tokens: token.Tokens(filteredTokens), mode: mode, path: "$", } } ================================================ FILE: vendor/github.com/goccy/go-yaml/parser/parser.go ================================================ package parser import ( "fmt" "io/ioutil" "strings" "github.com/goccy/go-yaml/ast" "github.com/goccy/go-yaml/internal/errors" "github.com/goccy/go-yaml/lexer" "github.com/goccy/go-yaml/token" "golang.org/x/xerrors" ) type parser struct{} func (p *parser) parseMapping(ctx *context) (*ast.MappingNode, error) { mapTk := ctx.currentToken() node := ast.Mapping(mapTk, true) node.SetPath(ctx.path) ctx.progress(1) // skip MappingStart token for ctx.next() { tk := ctx.currentToken() if tk.Type == token.MappingEndType { node.End = tk return node, nil } else if tk.Type == token.CollectEntryType { ctx.progress(1) continue } value, err := p.parseMappingValue(ctx) if err != nil { return nil, errors.Wrapf(err, "failed to parse mapping value in mapping node") } mvnode, ok := value.(*ast.MappingValueNode) if !ok { return nil, errors.ErrSyntax("failed to parse flow mapping node", value.GetToken()) } node.Values = append(node.Values, mvnode) ctx.progress(1) } return nil, errors.ErrSyntax("unterminated flow mapping", node.GetToken()) } func (p *parser) parseSequence(ctx *context) (*ast.SequenceNode, error) { node := ast.Sequence(ctx.currentToken(), true) node.SetPath(ctx.path) ctx.progress(1) // skip SequenceStart token for ctx.next() { tk := ctx.currentToken() if tk.Type == token.SequenceEndType { node.End = tk break } else if tk.Type == token.CollectEntryType { ctx.progress(1) continue } value, err := p.parseToken(ctx.withIndex(uint(len(node.Values))), tk) if err != nil { return nil, errors.Wrapf(err, "failed to parse sequence value in flow sequence node") } node.Values = append(node.Values, value) ctx.progress(1) } return node, nil } func (p *parser) parseTag(ctx *context) (*ast.TagNode, error) { tagToken := ctx.currentToken() node := ast.Tag(tagToken) node.SetPath(ctx.path) ctx.progress(1) // skip tag token var ( value ast.Node err error ) switch token.ReservedTagKeyword(tagToken.Value) { case token.MappingTag, token.OrderedMapTag: value, err = p.parseMapping(ctx) case token.IntegerTag, token.FloatTag, token.StringTag, token.BinaryTag, token.TimestampTag, token.NullTag: typ := ctx.currentToken().Type if typ == token.LiteralType || typ == token.FoldedType { value, err = p.parseLiteral(ctx) } else { value = p.parseScalarValue(ctx.currentToken()) } case token.SequenceTag, token.SetTag: err = errors.ErrSyntax(fmt.Sprintf("sorry, currently not supported %s tag", tagToken.Value), tagToken) default: // custom tag value, err = p.parseToken(ctx, ctx.currentToken()) } if err != nil { return nil, errors.Wrapf(err, "failed to parse tag value") } node.Value = value return node, nil } func (p *parser) removeLeftSideNewLineCharacter(src string) string { // CR or LF or CRLF return strings.TrimLeft(strings.TrimLeft(strings.TrimLeft(src, "\r"), "\n"), "\r\n") } func (p *parser) existsNewLineCharacter(src string) bool { if strings.Index(src, "\n") > 0 { return true } if strings.Index(src, "\r") > 0 { return true } return false } func (p *parser) validateMapKey(tk *token.Token) error { if tk.Type != token.StringType { return nil } origin := p.removeLeftSideNewLineCharacter(tk.Origin) if p.existsNewLineCharacter(origin) { return errors.ErrSyntax("unexpected key name", tk) } return nil } func (p *parser) createNullToken(base *token.Token) *token.Token { pos := *(base.Position) pos.Column++ return token.New("null", "null", &pos) } func (p *parser) parseMapValue(ctx *context, key ast.MapKeyNode, colonToken *token.Token) (ast.Node, error) { node, err := p.createMapValueNode(ctx, key, colonToken) if err != nil { return nil, errors.Wrapf(err, "failed to create map value node") } if node != nil && node.GetPath() == "" { node.SetPath(ctx.path) } return node, nil } func (p *parser) createMapValueNode(ctx *context, key ast.MapKeyNode, colonToken *token.Token) (ast.Node, error) { tk := ctx.currentToken() if tk == nil { nullToken := p.createNullToken(colonToken) ctx.insertToken(ctx.idx, nullToken) return ast.Null(nullToken), nil } if tk.Position.Column == key.GetToken().Position.Column && tk.Type == token.StringType { // in this case, // ---- // key: // next nullToken := p.createNullToken(colonToken) ctx.insertToken(ctx.idx, nullToken) return ast.Null(nullToken), nil } if tk.Position.Column < key.GetToken().Position.Column { // in this case, // ---- // key: // next nullToken := p.createNullToken(colonToken) ctx.insertToken(ctx.idx, nullToken) return ast.Null(nullToken), nil } value, err := p.parseToken(ctx, ctx.currentToken()) if err != nil { return nil, errors.Wrapf(err, "failed to parse mapping 'value' node") } return value, nil } func (p *parser) validateMapValue(ctx *context, key, value ast.Node) error { keyColumn := key.GetToken().Position.Column valueColumn := value.GetToken().Position.Column if keyColumn != valueColumn { return nil } if value.Type() != ast.StringType { return nil } ntk := ctx.nextToken() if ntk == nil || (ntk.Type != token.MappingValueType && ntk.Type != token.SequenceEntryType) { return errors.ErrSyntax("could not found expected ':' token", value.GetToken()) } return nil } func (p *parser) parseMappingValue(ctx *context) (ast.Node, error) { key, err := p.parseMapKey(ctx) if err != nil { return nil, errors.Wrapf(err, "failed to parse map key") } keyText := key.GetToken().Value key.SetPath(ctx.withChild(keyText).path) if err := p.validateMapKey(key.GetToken()); err != nil { return nil, errors.Wrapf(err, "validate mapping key error") } ctx.progress(1) // progress to mapping value token tk := ctx.currentToken() // get mapping value token if tk == nil { return nil, errors.ErrSyntax("unexpected map", key.GetToken()) } ctx.progress(1) // progress to value token if err := p.setSameLineCommentIfExists(ctx.withChild(keyText), key); err != nil { return nil, errors.Wrapf(err, "failed to set same line comment to node") } if key.GetComment() != nil { // if current token is comment, GetComment() is not nil. // then progress to value token ctx.progressIgnoreComment(1) } value, err := p.parseMapValue(ctx.withChild(keyText), key, tk) if err != nil { return nil, errors.Wrapf(err, "failed to parse map value") } if err := p.validateMapValue(ctx, key, value); err != nil { return nil, errors.Wrapf(err, "failed to validate map value") } mvnode := ast.MappingValue(tk, key, value) mvnode.SetPath(ctx.withChild(keyText).path) node := ast.Mapping(tk, false, mvnode) node.SetPath(ctx.withChild(keyText).path) ntk := ctx.nextNotCommentToken() antk := ctx.afterNextNotCommentToken() for antk != nil && antk.Type == token.MappingValueType && ntk.Position.Column == key.GetToken().Position.Column { ctx.progressIgnoreComment(1) value, err := p.parseToken(ctx, ctx.currentToken()) if err != nil { return nil, errors.Wrapf(err, "failed to parse mapping node") } switch value.Type() { case ast.MappingType: c := value.(*ast.MappingNode) comment := c.GetComment() for idx, v := range c.Values { if idx == 0 && comment != nil { if err := v.SetComment(comment); err != nil { return nil, errors.Wrapf(err, "failed to set comment token to node") } } node.Values = append(node.Values, v) } case ast.MappingValueType: node.Values = append(node.Values, value.(*ast.MappingValueNode)) default: return nil, xerrors.Errorf("failed to parse mapping value node node is %s", value.Type()) } ntk = ctx.nextNotCommentToken() antk = ctx.afterNextNotCommentToken() } if len(node.Values) == 1 { mapKeyCol := mvnode.Key.GetToken().Position.Column commentTk := ctx.nextToken() if commentTk != nil && commentTk.Type == token.CommentType && mapKeyCol <= commentTk.Position.Column { // If the comment is in the same or deeper column as the last element column in map value, // treat it as a footer comment for the last element. comment := p.parseFootComment(ctx, mapKeyCol) mvnode.FootComment = comment } return mvnode, nil } mapCol := node.GetToken().Position.Column commentTk := ctx.nextToken() if commentTk != nil && commentTk.Type == token.CommentType && mapCol <= commentTk.Position.Column { // If the comment is in the same or deeper column as the last element column in map value, // treat it as a footer comment for the last element. comment := p.parseFootComment(ctx, mapCol) node.FootComment = comment } return node, nil } func (p *parser) parseSequenceEntry(ctx *context) (*ast.SequenceNode, error) { tk := ctx.currentToken() sequenceNode := ast.Sequence(tk, false) sequenceNode.SetPath(ctx.path) curColumn := tk.Position.Column for tk.Type == token.SequenceEntryType { ctx.progress(1) // skip sequence token tk = ctx.currentToken() if tk == nil { return nil, errors.ErrSyntax("empty sequence entry", ctx.previousToken()) } var comment *ast.CommentGroupNode if tk.Type == token.CommentType { comment = p.parseCommentOnly(ctx) tk = ctx.currentToken() if tk.Type != token.SequenceEntryType { break } ctx.progress(1) // skip sequence token } value, err := p.parseToken(ctx.withIndex(uint(len(sequenceNode.Values))), ctx.currentToken()) if err != nil { return nil, errors.Wrapf(err, "failed to parse sequence") } if comment != nil { comment.SetPath(ctx.withIndex(uint(len(sequenceNode.Values))).path) sequenceNode.ValueHeadComments = append(sequenceNode.ValueHeadComments, comment) } else { sequenceNode.ValueHeadComments = append(sequenceNode.ValueHeadComments, nil) } sequenceNode.Values = append(sequenceNode.Values, value) tk = ctx.nextNotCommentToken() if tk == nil { break } if tk.Type != token.SequenceEntryType { break } if tk.Position.Column != curColumn { break } ctx.progressIgnoreComment(1) } commentTk := ctx.nextToken() if commentTk != nil && commentTk.Type == token.CommentType && curColumn <= commentTk.Position.Column { // If the comment is in the same or deeper column as the last element column in sequence value, // treat it as a footer comment for the last element. comment := p.parseFootComment(ctx, curColumn) sequenceNode.FootComment = comment } return sequenceNode, nil } func (p *parser) parseAnchor(ctx *context) (*ast.AnchorNode, error) { tk := ctx.currentToken() anchor := ast.Anchor(tk) anchor.SetPath(ctx.path) ntk := ctx.nextToken() if ntk == nil { return nil, errors.ErrSyntax("unexpected anchor. anchor name is undefined", tk) } ctx.progress(1) // skip anchor token name, err := p.parseToken(ctx, ctx.currentToken()) if err != nil { return nil, errors.Wrapf(err, "failed to parser anchor name node") } anchor.Name = name ntk = ctx.nextToken() if ntk == nil { return nil, errors.ErrSyntax("unexpected anchor. anchor value is undefined", ctx.currentToken()) } ctx.progress(1) value, err := p.parseToken(ctx, ctx.currentToken()) if err != nil { return nil, errors.Wrapf(err, "failed to parser anchor name node") } anchor.Value = value return anchor, nil } func (p *parser) parseAlias(ctx *context) (*ast.AliasNode, error) { tk := ctx.currentToken() alias := ast.Alias(tk) alias.SetPath(ctx.path) ntk := ctx.nextToken() if ntk == nil { return nil, errors.ErrSyntax("unexpected alias. alias name is undefined", tk) } ctx.progress(1) // skip alias token name, err := p.parseToken(ctx, ctx.currentToken()) if err != nil { return nil, errors.Wrapf(err, "failed to parser alias name node") } alias.Value = name return alias, nil } func (p *parser) parseMapKey(ctx *context) (ast.MapKeyNode, error) { tk := ctx.currentToken() if value := p.parseScalarValue(tk); value != nil { return value, nil } switch tk.Type { case token.MergeKeyType: return ast.MergeKey(tk), nil case token.MappingKeyType: return p.parseMappingKey(ctx) } return nil, errors.ErrSyntax("unexpected mapping key", tk) } func (p *parser) parseStringValue(tk *token.Token) *ast.StringNode { switch tk.Type { case token.StringType, token.SingleQuoteType, token.DoubleQuoteType: return ast.String(tk) } return nil } func (p *parser) parseScalarValueWithComment(ctx *context, tk *token.Token) (ast.ScalarNode, error) { node := p.parseScalarValue(tk) if node == nil { return nil, nil } node.SetPath(ctx.path) if p.isSameLineComment(ctx.nextToken(), node) { ctx.progress(1) if err := p.setSameLineCommentIfExists(ctx, node); err != nil { return nil, errors.Wrapf(err, "failed to set same line comment to node") } } return node, nil } func (p *parser) parseScalarValue(tk *token.Token) ast.ScalarNode { if node := p.parseStringValue(tk); node != nil { return node } switch tk.Type { case token.NullType: return ast.Null(tk) case token.BoolType: return ast.Bool(tk) case token.IntegerType, token.BinaryIntegerType, token.OctetIntegerType, token.HexIntegerType: return ast.Integer(tk) case token.FloatType: return ast.Float(tk) case token.InfinityType: return ast.Infinity(tk) case token.NanType: return ast.Nan(tk) } return nil } func (p *parser) parseDirective(ctx *context) (*ast.DirectiveNode, error) { node := ast.Directive(ctx.currentToken()) ctx.progress(1) // skip directive token value, err := p.parseToken(ctx, ctx.currentToken()) if err != nil { return nil, errors.Wrapf(err, "failed to parse directive value") } node.Value = value ctx.progress(1) tk := ctx.currentToken() if tk == nil { // Since current token is nil, use the previous token to specify // the syntax error location. return nil, errors.ErrSyntax("unexpected directive value. document not started", ctx.previousToken()) } if tk.Type != token.DocumentHeaderType { return nil, errors.ErrSyntax("unexpected directive value. document not started", ctx.currentToken()) } return node, nil } func (p *parser) parseLiteral(ctx *context) (*ast.LiteralNode, error) { node := ast.Literal(ctx.currentToken()) ctx.progress(1) // skip literal/folded token tk := ctx.currentToken() var comment *ast.CommentGroupNode if tk.Type == token.CommentType { comment = p.parseCommentOnly(ctx) comment.SetPath(ctx.path) if err := node.SetComment(comment); err != nil { return nil, errors.Wrapf(err, "failed to set comment to literal") } tk = ctx.currentToken() } value, err := p.parseToken(ctx, tk) if err != nil { return nil, errors.Wrapf(err, "failed to parse literal/folded value") } snode, ok := value.(*ast.StringNode) if !ok { return nil, errors.ErrSyntax("unexpected token. required string token", value.GetToken()) } node.Value = snode return node, nil } func (p *parser) isSameLineComment(tk *token.Token, node ast.Node) bool { if tk == nil { return false } if tk.Type != token.CommentType { return false } return tk.Position.Line == node.GetToken().Position.Line } func (p *parser) setSameLineCommentIfExists(ctx *context, node ast.Node) error { tk := ctx.currentToken() if !p.isSameLineComment(tk, node) { return nil } comment := ast.CommentGroup([]*token.Token{tk}) comment.SetPath(ctx.path) if err := node.SetComment(comment); err != nil { return errors.Wrapf(err, "failed to set comment token to ast.Node") } return nil } func (p *parser) parseDocument(ctx *context) (*ast.DocumentNode, error) { startTk := ctx.currentToken() ctx.progress(1) // skip document header token body, err := p.parseToken(ctx, ctx.currentToken()) if err != nil { return nil, errors.Wrapf(err, "failed to parse document body") } node := ast.Document(startTk, body) if ntk := ctx.nextToken(); ntk != nil && ntk.Type == token.DocumentEndType { node.End = ntk ctx.progress(1) } return node, nil } func (p *parser) parseCommentOnly(ctx *context) *ast.CommentGroupNode { commentTokens := []*token.Token{} for { tk := ctx.currentToken() if tk == nil { break } if tk.Type != token.CommentType { break } commentTokens = append(commentTokens, tk) ctx.progressIgnoreComment(1) // skip comment token } return ast.CommentGroup(commentTokens) } func (p *parser) parseFootComment(ctx *context, col int) *ast.CommentGroupNode { commentTokens := []*token.Token{} for { ctx.progressIgnoreComment(1) commentTokens = append(commentTokens, ctx.currentToken()) nextTk := ctx.nextToken() if nextTk == nil { break } if nextTk.Type != token.CommentType { break } if col > nextTk.Position.Column { break } } return ast.CommentGroup(commentTokens) } func (p *parser) parseComment(ctx *context) (ast.Node, error) { group := p.parseCommentOnly(ctx) node, err := p.parseToken(ctx, ctx.currentToken()) if err != nil { return nil, errors.Wrapf(err, "failed to parse node after comment") } if node == nil { return group, nil } group.SetPath(node.GetPath()) if err := node.SetComment(group); err != nil { return nil, errors.Wrapf(err, "failed to set comment token to node") } return node, nil } func (p *parser) parseMappingKey(ctx *context) (*ast.MappingKeyNode, error) { keyTk := ctx.currentToken() node := ast.MappingKey(keyTk) node.SetPath(ctx.path) ctx.progress(1) // skip mapping key token value, err := p.parseToken(ctx.withChild(keyTk.Value), ctx.currentToken()) if err != nil { return nil, errors.Wrapf(err, "failed to parse map key") } node.Value = value return node, nil } func (p *parser) parseToken(ctx *context, tk *token.Token) (ast.Node, error) { node, err := p.createNodeFromToken(ctx, tk) if err != nil { return nil, errors.Wrapf(err, "failed to create node from token") } if node != nil && node.GetPath() == "" { node.SetPath(ctx.path) } return node, nil } func (p *parser) createNodeFromToken(ctx *context, tk *token.Token) (ast.Node, error) { if tk == nil { return nil, nil } if tk.NextType() == token.MappingValueType { node, err := p.parseMappingValue(ctx) return node, err } node, err := p.parseScalarValueWithComment(ctx, tk) if err != nil { return nil, errors.Wrapf(err, "failed to parse scalar value") } if node != nil { return node, nil } switch tk.Type { case token.CommentType: return p.parseComment(ctx) case token.MappingKeyType: return p.parseMappingKey(ctx) case token.DocumentHeaderType: return p.parseDocument(ctx) case token.MappingStartType: return p.parseMapping(ctx) case token.SequenceStartType: return p.parseSequence(ctx) case token.SequenceEntryType: return p.parseSequenceEntry(ctx) case token.AnchorType: return p.parseAnchor(ctx) case token.AliasType: return p.parseAlias(ctx) case token.DirectiveType: return p.parseDirective(ctx) case token.TagType: return p.parseTag(ctx) case token.LiteralType, token.FoldedType: return p.parseLiteral(ctx) } return nil, nil } func (p *parser) parse(tokens token.Tokens, mode Mode) (*ast.File, error) { ctx := newContext(tokens, mode) file := &ast.File{Docs: []*ast.DocumentNode{}} for ctx.next() { node, err := p.parseToken(ctx, ctx.currentToken()) if err != nil { return nil, errors.Wrapf(err, "failed to parse") } ctx.progressIgnoreComment(1) if node == nil { continue } if doc, ok := node.(*ast.DocumentNode); ok { file.Docs = append(file.Docs, doc) } else { file.Docs = append(file.Docs, ast.Document(nil, node)) } } return file, nil } type Mode uint const ( ParseComments Mode = 1 << iota // parse comments and add them to AST ) // ParseBytes parse from byte slice, and returns ast.File func ParseBytes(bytes []byte, mode Mode) (*ast.File, error) { tokens := lexer.Tokenize(string(bytes)) f, err := Parse(tokens, mode) if err != nil { return nil, errors.Wrapf(err, "failed to parse") } return f, nil } // Parse parse from token instances, and returns ast.File func Parse(tokens token.Tokens, mode Mode) (*ast.File, error) { var p parser f, err := p.parse(tokens, mode) if err != nil { return nil, errors.Wrapf(err, "failed to parse") } return f, nil } // Parse parse from filename, and returns ast.File func ParseFile(filename string, mode Mode) (*ast.File, error) { file, err := ioutil.ReadFile(filename) if err != nil { return nil, errors.Wrapf(err, "failed to read file: %s", filename) } f, err := ParseBytes(file, mode) if err != nil { return nil, errors.Wrapf(err, "failed to parse") } f.Name = filename return f, nil } ================================================ FILE: vendor/github.com/goccy/go-yaml/path.go ================================================ package yaml import ( "bytes" "fmt" "io" "strconv" "strings" "github.com/goccy/go-yaml/ast" "github.com/goccy/go-yaml/internal/errors" "github.com/goccy/go-yaml/parser" "github.com/goccy/go-yaml/printer" ) // PathString create Path from string // // YAMLPath rule // $ : the root object/element // . : child operator // .. : recursive descent // [num] : object/element of array by number // [*] : all objects/elements for array. // // If you want to use reserved characters such as `.` and `*` as a key name, // enclose them in single quotation as follows ( $.foo.'bar.baz-*'.hoge ). // If you want to use a single quote with reserved characters, escape it with `\` ( $.foo.'bar.baz\'s value'.hoge ). func PathString(s string) (*Path, error) { buf := []rune(s) length := len(buf) cursor := 0 builder := &PathBuilder{} for cursor < length { c := buf[cursor] switch c { case '$': builder = builder.Root() cursor++ case '.': b, buf, c, err := parsePathDot(builder, buf, cursor) if err != nil { return nil, errors.Wrapf(err, "failed to parse path of dot") } length = len(buf) builder = b cursor = c case '[': b, buf, c, err := parsePathIndex(builder, buf, cursor) if err != nil { return nil, errors.Wrapf(err, "failed to parse path of index") } length = len(buf) builder = b cursor = c default: return nil, errors.Wrapf(ErrInvalidPathString, "invalid path at %d", cursor) } } return builder.Build(), nil } func parsePathRecursive(b *PathBuilder, buf []rune, cursor int) (*PathBuilder, []rune, int, error) { length := len(buf) cursor += 2 // skip .. characters start := cursor for ; cursor < length; cursor++ { c := buf[cursor] switch c { case '$': return nil, nil, 0, errors.Wrapf(ErrInvalidPathString, "specified '$' after '..' character") case '*': return nil, nil, 0, errors.Wrapf(ErrInvalidPathString, "specified '*' after '..' character") case '.', '[': goto end case ']': return nil, nil, 0, errors.Wrapf(ErrInvalidPathString, "specified ']' after '..' character") } } end: if start == cursor { return nil, nil, 0, errors.Wrapf(ErrInvalidPathString, "not found recursive selector") } return b.Recursive(string(buf[start:cursor])), buf, cursor, nil } func parsePathDot(b *PathBuilder, buf []rune, cursor int) (*PathBuilder, []rune, int, error) { length := len(buf) if cursor+1 < length && buf[cursor+1] == '.' { b, buf, c, err := parsePathRecursive(b, buf, cursor) if err != nil { return nil, nil, 0, errors.Wrapf(err, "failed to parse path of recursive") } return b, buf, c, nil } cursor++ // skip . character start := cursor // if started single quote, looking for end single quote char if cursor < length && buf[cursor] == '\'' { return parseQuotedKey(b, buf, cursor) } for ; cursor < length; cursor++ { c := buf[cursor] switch c { case '$': return nil, nil, 0, errors.Wrapf(ErrInvalidPathString, "specified '$' after '.' character") case '*': return nil, nil, 0, errors.Wrapf(ErrInvalidPathString, "specified '*' after '.' character") case '.', '[': goto end case ']': return nil, nil, 0, errors.Wrapf(ErrInvalidPathString, "specified ']' after '.' character") } } end: if start == cursor { return nil, nil, 0, errors.Wrapf(ErrInvalidPathString, "cloud not find by empty key") } return b.child(string(buf[start:cursor])), buf, cursor, nil } func parseQuotedKey(b *PathBuilder, buf []rune, cursor int) (*PathBuilder, []rune, int, error) { cursor++ // skip single quote start := cursor length := len(buf) var foundEndDelim bool for ; cursor < length; cursor++ { switch buf[cursor] { case '\\': buf = append(append([]rune{}, buf[:cursor]...), buf[cursor+1:]...) length = len(buf) case '\'': foundEndDelim = true goto end } } end: if !foundEndDelim { return nil, nil, 0, errors.Wrapf(ErrInvalidPathString, "could not find end delimiter for key") } if start == cursor { return nil, nil, 0, errors.Wrapf(ErrInvalidPathString, "could not find by empty key") } selector := buf[start:cursor] cursor++ if cursor < length { switch buf[cursor] { case '$': return nil, nil, 0, errors.Wrapf(ErrInvalidPathString, "specified '$' after '.' character") case '*': return nil, nil, 0, errors.Wrapf(ErrInvalidPathString, "specified '*' after '.' character") case ']': return nil, nil, 0, errors.Wrapf(ErrInvalidPathString, "specified ']' after '.' character") } } return b.child(string(selector)), buf, cursor, nil } func parsePathIndex(b *PathBuilder, buf []rune, cursor int) (*PathBuilder, []rune, int, error) { length := len(buf) cursor++ // skip '[' character if length <= cursor { return nil, nil, 0, errors.Wrapf(ErrInvalidPathString, "unexpected end of YAML Path") } c := buf[cursor] switch c { case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '*': start := cursor cursor++ for ; cursor < length; cursor++ { c := buf[cursor] switch c { case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': continue } break } if buf[cursor] != ']' { return nil, nil, 0, errors.Wrapf(ErrInvalidPathString, "invalid character %s at %d", string(buf[cursor]), cursor) } numOrAll := string(buf[start:cursor]) if numOrAll == "*" { return b.IndexAll(), buf, cursor + 1, nil } num, err := strconv.ParseInt(numOrAll, 10, 64) if err != nil { return nil, nil, 0, errors.Wrapf(err, "failed to parse number") } return b.Index(uint(num)), buf, cursor + 1, nil } return nil, nil, 0, errors.Wrapf(ErrInvalidPathString, "invalid character %s at %d", c, cursor) } // Path represent YAMLPath ( like a JSONPath ). type Path struct { node pathNode } // String path to text. func (p *Path) String() string { return p.node.String() } // Read decode from r and set extracted value by YAMLPath to v. func (p *Path) Read(r io.Reader, v interface{}) error { node, err := p.ReadNode(r) if err != nil { return errors.Wrapf(err, "failed to read node") } if err := Unmarshal([]byte(node.String()), v); err != nil { return errors.Wrapf(err, "failed to unmarshal") } return nil } // ReadNode create AST from r and extract node by YAMLPath. func (p *Path) ReadNode(r io.Reader) (ast.Node, error) { if p.node == nil { return nil, ErrInvalidPath } var buf bytes.Buffer if _, err := io.Copy(&buf, r); err != nil { return nil, errors.Wrapf(err, "failed to copy from reader") } f, err := parser.ParseBytes(buf.Bytes(), 0) if err != nil { return nil, errors.Wrapf(err, "failed to parse yaml") } node, err := p.FilterFile(f) if err != nil { return nil, errors.Wrapf(err, "failed to filter from ast.File") } return node, nil } // Filter filter from target by YAMLPath and set it to v. func (p *Path) Filter(target, v interface{}) error { b, err := Marshal(target) if err != nil { return errors.Wrapf(err, "failed to marshal target value") } if err := p.Read(bytes.NewBuffer(b), v); err != nil { return errors.Wrapf(err, "failed to read") } return nil } // FilterFile filter from ast.File by YAMLPath. func (p *Path) FilterFile(f *ast.File) (ast.Node, error) { for _, doc := range f.Docs { node, err := p.FilterNode(doc.Body) if err != nil { return nil, errors.Wrapf(err, "failed to filter node by path ( %s )", p.node) } if node != nil { return node, nil } } return nil, errors.Wrapf(ErrNotFoundNode, "failed to find path ( %s )", p.node) } // FilterNode filter from node by YAMLPath. func (p *Path) FilterNode(node ast.Node) (ast.Node, error) { n, err := p.node.filter(node) if err != nil { return nil, errors.Wrapf(err, "failed to filter node by path ( %s )", p.node) } return n, nil } // MergeFromReader merge YAML text into ast.File. func (p *Path) MergeFromReader(dst *ast.File, src io.Reader) error { var buf bytes.Buffer if _, err := io.Copy(&buf, src); err != nil { return errors.Wrapf(err, "failed to copy from reader") } file, err := parser.ParseBytes(buf.Bytes(), 0) if err != nil { return errors.Wrapf(err, "failed to parse") } if err := p.MergeFromFile(dst, file); err != nil { return errors.Wrapf(err, "failed to merge file") } return nil } // MergeFromFile merge ast.File into ast.File. func (p *Path) MergeFromFile(dst *ast.File, src *ast.File) error { base, err := p.FilterFile(dst) if err != nil { return errors.Wrapf(err, "failed to filter file") } for _, doc := range src.Docs { if err := ast.Merge(base, doc); err != nil { return errors.Wrapf(err, "failed to merge") } } return nil } // MergeFromNode merge ast.Node into ast.File. func (p *Path) MergeFromNode(dst *ast.File, src ast.Node) error { base, err := p.FilterFile(dst) if err != nil { return errors.Wrapf(err, "failed to filter file") } if err := ast.Merge(base, src); err != nil { return errors.Wrapf(err, "failed to merge") } return nil } // ReplaceWithReader replace ast.File with io.Reader. func (p *Path) ReplaceWithReader(dst *ast.File, src io.Reader) error { var buf bytes.Buffer if _, err := io.Copy(&buf, src); err != nil { return errors.Wrapf(err, "failed to copy from reader") } file, err := parser.ParseBytes(buf.Bytes(), 0) if err != nil { return errors.Wrapf(err, "failed to parse") } if err := p.ReplaceWithFile(dst, file); err != nil { return errors.Wrapf(err, "failed to replace file") } return nil } // ReplaceWithFile replace ast.File with ast.File. func (p *Path) ReplaceWithFile(dst *ast.File, src *ast.File) error { for _, doc := range src.Docs { if err := p.ReplaceWithNode(dst, doc); err != nil { return errors.Wrapf(err, "failed to replace file by path ( %s )", p.node) } } return nil } // ReplaceNode replace ast.File with ast.Node. func (p *Path) ReplaceWithNode(dst *ast.File, node ast.Node) error { for _, doc := range dst.Docs { if node.Type() == ast.DocumentType { node = node.(*ast.DocumentNode).Body } if err := p.node.replace(doc.Body, node); err != nil { return errors.Wrapf(err, "failed to replace node by path ( %s )", p.node) } } return nil } // AnnotateSource add annotation to passed source ( see section 5.1 in README.md ). func (p *Path) AnnotateSource(source []byte, colored bool) ([]byte, error) { file, err := parser.ParseBytes([]byte(source), 0) if err != nil { return nil, err } node, err := p.FilterFile(file) if err != nil { return nil, err } var pp printer.Printer return []byte(pp.PrintErrorToken(node.GetToken(), colored)), nil } // PathBuilder represent builder for YAMLPath. type PathBuilder struct { root *rootNode node pathNode } // Root add '$' to current path. func (b *PathBuilder) Root() *PathBuilder { root := newRootNode() return &PathBuilder{root: root, node: root} } // IndexAll add '[*]' to current path. func (b *PathBuilder) IndexAll() *PathBuilder { b.node = b.node.chain(newIndexAllNode()) return b } // Recursive add '..selector' to current path. func (b *PathBuilder) Recursive(selector string) *PathBuilder { b.node = b.node.chain(newRecursiveNode(selector)) return b } func (b *PathBuilder) containsReservedPathCharacters(path string) bool { if strings.Contains(path, ".") { return true } if strings.Contains(path, "*") { return true } return false } func (b *PathBuilder) enclosedSingleQuote(name string) bool { return strings.HasPrefix(name, "'") && strings.HasSuffix(name, "'") } func (b *PathBuilder) normalizeSelectorName(name string) string { if b.enclosedSingleQuote(name) { // already escaped name return name } if b.containsReservedPathCharacters(name) { escapedName := strings.ReplaceAll(name, `'`, `\'`) return "'" + escapedName + "'" } return name } func (b *PathBuilder) child(name string) *PathBuilder { b.node = b.node.chain(newSelectorNode(name)) return b } // Child add '.name' to current path. func (b *PathBuilder) Child(name string) *PathBuilder { return b.child(b.normalizeSelectorName(name)) } // Index add '[idx]' to current path. func (b *PathBuilder) Index(idx uint) *PathBuilder { b.node = b.node.chain(newIndexNode(idx)) return b } // Build build YAMLPath. func (b *PathBuilder) Build() *Path { return &Path{node: b.root} } type pathNode interface { fmt.Stringer chain(pathNode) pathNode filter(ast.Node) (ast.Node, error) replace(ast.Node, ast.Node) error } type basePathNode struct { child pathNode } func (n *basePathNode) chain(node pathNode) pathNode { n.child = node return node } type rootNode struct { *basePathNode } func newRootNode() *rootNode { return &rootNode{basePathNode: &basePathNode{}} } func (n *rootNode) String() string { s := "$" if n.child != nil { s += n.child.String() } return s } func (n *rootNode) filter(node ast.Node) (ast.Node, error) { if n.child == nil { return nil, nil } filtered, err := n.child.filter(node) if err != nil { return nil, errors.Wrapf(err, "failed to filter") } return filtered, nil } func (n *rootNode) replace(node ast.Node, target ast.Node) error { if n.child == nil { return nil } if err := n.child.replace(node, target); err != nil { return errors.Wrapf(err, "failed to replace") } return nil } type selectorNode struct { *basePathNode selector string } func newSelectorNode(selector string) *selectorNode { return &selectorNode{ basePathNode: &basePathNode{}, selector: selector, } } func (n *selectorNode) filter(node ast.Node) (ast.Node, error) { switch node.Type() { case ast.MappingType: for _, value := range node.(*ast.MappingNode).Values { key := value.Key.GetToken().Value if key == n.selector { if n.child == nil { return value.Value, nil } filtered, err := n.child.filter(value.Value) if err != nil { return nil, errors.Wrapf(err, "failed to filter") } return filtered, nil } } case ast.MappingValueType: value := node.(*ast.MappingValueNode) key := value.Key.GetToken().Value if key == n.selector { if n.child == nil { return value.Value, nil } filtered, err := n.child.filter(value.Value) if err != nil { return nil, errors.Wrapf(err, "failed to filter") } return filtered, nil } default: return nil, errors.Wrapf(ErrInvalidQuery, "expected node type is map or map value. but got %s", node.Type()) } return nil, nil } func (n *selectorNode) replaceMapValue(value *ast.MappingValueNode, target ast.Node) error { key := value.Key.GetToken().Value if key != n.selector { return nil } if n.child == nil { if err := value.Replace(target); err != nil { return errors.Wrapf(err, "failed to replace") } } else { if err := n.child.replace(value.Value, target); err != nil { return errors.Wrapf(err, "failed to replace") } } return nil } func (n *selectorNode) replace(node ast.Node, target ast.Node) error { switch node.Type() { case ast.MappingType: for _, value := range node.(*ast.MappingNode).Values { if err := n.replaceMapValue(value, target); err != nil { return errors.Wrapf(err, "failed to replace map value") } } case ast.MappingValueType: value := node.(*ast.MappingValueNode) if err := n.replaceMapValue(value, target); err != nil { return errors.Wrapf(err, "failed to replace map value") } default: return errors.Wrapf(ErrInvalidQuery, "expected node type is map or map value. but got %s", node.Type()) } return nil } func (n *selectorNode) String() string { s := fmt.Sprintf(".%s", n.selector) if n.child != nil { s += n.child.String() } return s } type indexNode struct { *basePathNode selector uint } func newIndexNode(selector uint) *indexNode { return &indexNode{ basePathNode: &basePathNode{}, selector: selector, } } func (n *indexNode) filter(node ast.Node) (ast.Node, error) { if node.Type() != ast.SequenceType { return nil, errors.Wrapf(ErrInvalidQuery, "expected sequence type node. but got %s", node.Type()) } sequence := node.(*ast.SequenceNode) if n.selector >= uint(len(sequence.Values)) { return nil, errors.Wrapf(ErrInvalidQuery, "expected index is %d. but got sequences has %d items", n.selector, sequence.Values) } value := sequence.Values[n.selector] if n.child == nil { return value, nil } filtered, err := n.child.filter(value) if err != nil { return nil, errors.Wrapf(err, "failed to filter") } return filtered, nil } func (n *indexNode) replace(node ast.Node, target ast.Node) error { if node.Type() != ast.SequenceType { return errors.Wrapf(ErrInvalidQuery, "expected sequence type node. but got %s", node.Type()) } sequence := node.(*ast.SequenceNode) if n.selector >= uint(len(sequence.Values)) { return errors.Wrapf(ErrInvalidQuery, "expected index is %d. but got sequences has %d items", n.selector, sequence.Values) } if n.child == nil { if err := sequence.Replace(int(n.selector), target); err != nil { return errors.Wrapf(err, "failed to replace") } return nil } if err := n.child.replace(sequence.Values[n.selector], target); err != nil { return errors.Wrapf(err, "failed to replace") } return nil } func (n *indexNode) String() string { s := fmt.Sprintf("[%d]", n.selector) if n.child != nil { s += n.child.String() } return s } type indexAllNode struct { *basePathNode } func newIndexAllNode() *indexAllNode { return &indexAllNode{ basePathNode: &basePathNode{}, } } func (n *indexAllNode) String() string { s := "[*]" if n.child != nil { s += n.child.String() } return s } func (n *indexAllNode) filter(node ast.Node) (ast.Node, error) { if node.Type() != ast.SequenceType { return nil, errors.Wrapf(ErrInvalidQuery, "expected sequence type node. but got %s", node.Type()) } sequence := node.(*ast.SequenceNode) if n.child == nil { return sequence, nil } out := *sequence out.Values = []ast.Node{} for _, value := range sequence.Values { filtered, err := n.child.filter(value) if err != nil { return nil, errors.Wrapf(err, "failed to filter") } out.Values = append(out.Values, filtered) } return &out, nil } func (n *indexAllNode) replace(node ast.Node, target ast.Node) error { if node.Type() != ast.SequenceType { return errors.Wrapf(ErrInvalidQuery, "expected sequence type node. but got %s", node.Type()) } sequence := node.(*ast.SequenceNode) if n.child == nil { for idx := range sequence.Values { if err := sequence.Replace(idx, target); err != nil { return errors.Wrapf(err, "failed to replace") } } return nil } for _, value := range sequence.Values { if err := n.child.replace(value, target); err != nil { return errors.Wrapf(err, "failed to replace") } } return nil } type recursiveNode struct { *basePathNode selector string } func newRecursiveNode(selector string) *recursiveNode { return &recursiveNode{ basePathNode: &basePathNode{}, selector: selector, } } func (n *recursiveNode) String() string { s := fmt.Sprintf("..%s", n.selector) if n.child != nil { s += n.child.String() } return s } func (n *recursiveNode) filterNode(node ast.Node) (*ast.SequenceNode, error) { sequence := &ast.SequenceNode{BaseNode: &ast.BaseNode{}} switch typedNode := node.(type) { case *ast.MappingNode: for _, value := range typedNode.Values { seq, err := n.filterNode(value) if err != nil { return nil, errors.Wrapf(err, "failed to filter") } sequence.Values = append(sequence.Values, seq.Values...) } case *ast.MappingValueNode: key := typedNode.Key.GetToken().Value if n.selector == key { sequence.Values = append(sequence.Values, typedNode.Value) } seq, err := n.filterNode(typedNode.Value) if err != nil { return nil, errors.Wrapf(err, "failed to filter") } sequence.Values = append(sequence.Values, seq.Values...) case *ast.SequenceNode: for _, value := range typedNode.Values { seq, err := n.filterNode(value) if err != nil { return nil, errors.Wrapf(err, "failed to filter") } sequence.Values = append(sequence.Values, seq.Values...) } } return sequence, nil } func (n *recursiveNode) filter(node ast.Node) (ast.Node, error) { sequence, err := n.filterNode(node) if err != nil { return nil, errors.Wrapf(err, "failed to filter") } sequence.Start = node.GetToken() return sequence, nil } func (n *recursiveNode) replaceNode(node ast.Node, target ast.Node) error { switch typedNode := node.(type) { case *ast.MappingNode: for _, value := range typedNode.Values { if err := n.replaceNode(value, target); err != nil { return errors.Wrapf(err, "failed to replace") } } case *ast.MappingValueNode: key := typedNode.Key.GetToken().Value if n.selector == key { if err := typedNode.Replace(target); err != nil { return errors.Wrapf(err, "failed to replace") } } if err := n.replaceNode(typedNode.Value, target); err != nil { return errors.Wrapf(err, "failed to replace") } case *ast.SequenceNode: for _, value := range typedNode.Values { if err := n.replaceNode(value, target); err != nil { return errors.Wrapf(err, "failed to replace") } } } return nil } func (n *recursiveNode) replace(node ast.Node, target ast.Node) error { if err := n.replaceNode(node, target); err != nil { return errors.Wrapf(err, "failed to replace") } return nil } ================================================ FILE: vendor/github.com/goccy/go-yaml/printer/printer.go ================================================ package printer import ( "fmt" "math" "strings" "github.com/fatih/color" "github.com/goccy/go-yaml/ast" "github.com/goccy/go-yaml/token" ) // Property additional property set for each the token type Property struct { Prefix string Suffix string } // PrintFunc returns property instance type PrintFunc func() *Property // Printer create text from token collection or ast type Printer struct { LineNumber bool LineNumberFormat func(num int) string MapKey PrintFunc Anchor PrintFunc Alias PrintFunc Bool PrintFunc String PrintFunc Number PrintFunc } func defaultLineNumberFormat(num int) string { return fmt.Sprintf("%2d | ", num) } func (p *Printer) property(tk *token.Token) *Property { prop := &Property{} switch tk.PreviousType() { case token.AnchorType: if p.Anchor != nil { return p.Anchor() } return prop case token.AliasType: if p.Alias != nil { return p.Alias() } return prop } switch tk.NextType() { case token.MappingValueType: if p.MapKey != nil { return p.MapKey() } return prop } switch tk.Type { case token.BoolType: if p.Bool != nil { return p.Bool() } return prop case token.AnchorType: if p.Anchor != nil { return p.Anchor() } return prop case token.AliasType: if p.Anchor != nil { return p.Alias() } return prop case token.StringType, token.SingleQuoteType, token.DoubleQuoteType: if p.String != nil { return p.String() } return prop case token.IntegerType, token.FloatType: if p.Number != nil { return p.Number() } return prop default: } return prop } // PrintTokens create text from token collection func (p *Printer) PrintTokens(tokens token.Tokens) string { if len(tokens) == 0 { return "" } if p.LineNumber { if p.LineNumberFormat == nil { p.LineNumberFormat = defaultLineNumberFormat } } texts := []string{} lineNumber := tokens[0].Position.Line for _, tk := range tokens { lines := strings.Split(tk.Origin, "\n") prop := p.property(tk) header := "" if p.LineNumber { header = p.LineNumberFormat(lineNumber) } if len(lines) == 1 { line := prop.Prefix + lines[0] + prop.Suffix if len(texts) == 0 { texts = append(texts, header+line) lineNumber++ } else { text := texts[len(texts)-1] texts[len(texts)-1] = text + line } } else { for idx, src := range lines { if p.LineNumber { header = p.LineNumberFormat(lineNumber) } line := prop.Prefix + src + prop.Suffix if idx == 0 { if len(texts) == 0 { texts = append(texts, header+line) lineNumber++ } else { text := texts[len(texts)-1] texts[len(texts)-1] = text + line } } else { texts = append(texts, fmt.Sprintf("%s%s", header, line)) lineNumber++ } } } } return strings.Join(texts, "\n") } // PrintNode create text from ast.Node func (p *Printer) PrintNode(node ast.Node) []byte { return []byte(fmt.Sprintf("%+v\n", node)) } const escape = "\x1b" func format(attr color.Attribute) string { return fmt.Sprintf("%s[%dm", escape, attr) } func (p *Printer) setDefaultColorSet() { p.Bool = func() *Property { return &Property{ Prefix: format(color.FgHiMagenta), Suffix: format(color.Reset), } } p.Number = func() *Property { return &Property{ Prefix: format(color.FgHiMagenta), Suffix: format(color.Reset), } } p.MapKey = func() *Property { return &Property{ Prefix: format(color.FgHiCyan), Suffix: format(color.Reset), } } p.Anchor = func() *Property { return &Property{ Prefix: format(color.FgHiYellow), Suffix: format(color.Reset), } } p.Alias = func() *Property { return &Property{ Prefix: format(color.FgHiYellow), Suffix: format(color.Reset), } } p.String = func() *Property { return &Property{ Prefix: format(color.FgHiGreen), Suffix: format(color.Reset), } } } func (p *Printer) PrintErrorMessage(msg string, isColored bool) string { if isColored { return fmt.Sprintf("%s%s%s", format(color.FgHiRed), msg, format(color.Reset), ) } return msg } func (p *Printer) removeLeftSideNewLineChar(src string) string { return strings.TrimLeft(strings.TrimLeft(strings.TrimLeft(src, "\r"), "\n"), "\r\n") } func (p *Printer) removeRightSideNewLineChar(src string) string { return strings.TrimRight(strings.TrimRight(strings.TrimRight(src, "\r"), "\n"), "\r\n") } func (p *Printer) removeRightSideWhiteSpaceChar(src string) string { return p.removeRightSideNewLineChar(strings.TrimRight(src, " ")) } func (p *Printer) newLineCount(s string) int { src := []rune(s) size := len(src) cnt := 0 for i := 0; i < size; i++ { c := src[i] switch c { case '\r': if i+1 < size && src[i+1] == '\n' { i++ } cnt++ case '\n': cnt++ } } return cnt } func (p *Printer) isNewLineLastChar(s string) bool { for i := len(s) - 1; i > 0; i-- { c := s[i] switch c { case ' ': continue case '\n', '\r': return true } break } return false } func (p *Printer) printBeforeTokens(tk *token.Token, minLine, extLine int) token.Tokens { for { if tk.Prev == nil { break } if tk.Prev.Position.Line < minLine { break } tk = tk.Prev } minTk := tk.Clone() if minTk.Prev != nil { // add white spaces to minTk by prev token prev := minTk.Prev whiteSpaceLen := len(prev.Origin) - len(strings.TrimRight(prev.Origin, " ")) minTk.Origin = strings.Repeat(" ", whiteSpaceLen) + minTk.Origin } minTk.Origin = p.removeLeftSideNewLineChar(minTk.Origin) tokens := token.Tokens{minTk} tk = minTk.Next for tk != nil && tk.Position.Line <= extLine { clonedTk := tk.Clone() tokens.Add(clonedTk) tk = clonedTk.Next } lastTk := tokens[len(tokens)-1] trimmedOrigin := p.removeRightSideWhiteSpaceChar(lastTk.Origin) suffix := lastTk.Origin[len(trimmedOrigin):] lastTk.Origin = trimmedOrigin if lastTk.Next != nil && len(suffix) > 1 { next := lastTk.Next.Clone() // add suffix to header of next token if suffix[0] == '\n' || suffix[0] == '\r' { suffix = suffix[1:] } next.Origin = suffix + next.Origin lastTk.Next = next } return tokens } func (p *Printer) printAfterTokens(tk *token.Token, maxLine int) token.Tokens { tokens := token.Tokens{} if tk == nil { return tokens } if tk.Position.Line > maxLine { return tokens } minTk := tk.Clone() minTk.Origin = p.removeLeftSideNewLineChar(minTk.Origin) tokens.Add(minTk) tk = minTk.Next for tk != nil && tk.Position.Line <= maxLine { clonedTk := tk.Clone() tokens.Add(clonedTk) tk = clonedTk.Next } return tokens } func (p *Printer) setupErrorTokenFormat(annotateLine int, isColored bool) { prefix := func(annotateLine, num int) string { if annotateLine == num { return fmt.Sprintf("> %2d | ", num) } return fmt.Sprintf(" %2d | ", num) } p.LineNumber = true p.LineNumberFormat = func(num int) string { if isColored { fn := color.New(color.Bold, color.FgHiWhite).SprintFunc() return fn(prefix(annotateLine, num)) } return prefix(annotateLine, num) } if isColored { p.setDefaultColorSet() } } func (p *Printer) PrintErrorToken(tk *token.Token, isColored bool) string { errToken := tk curLine := tk.Position.Line curExtLine := curLine + p.newLineCount(p.removeLeftSideNewLineChar(tk.Origin)) if p.isNewLineLastChar(tk.Origin) { // if last character ( exclude white space ) is new line character, ignore it. curExtLine-- } minLine := int(math.Max(float64(curLine-3), 1)) maxLine := curExtLine + 3 p.setupErrorTokenFormat(curLine, isColored) beforeTokens := p.printBeforeTokens(tk, minLine, curExtLine) lastTk := beforeTokens[len(beforeTokens)-1] afterTokens := p.printAfterTokens(lastTk.Next, maxLine) beforeSource := p.PrintTokens(beforeTokens) prefixSpaceNum := len(fmt.Sprintf(" %2d | ", curLine)) annotateLine := strings.Repeat(" ", prefixSpaceNum+errToken.Position.Column-1) + "^" afterSource := p.PrintTokens(afterTokens) return fmt.Sprintf("%s\n%s\n%s", beforeSource, annotateLine, afterSource) } ================================================ FILE: vendor/github.com/goccy/go-yaml/scanner/context.go ================================================ package scanner import ( "sync" "github.com/goccy/go-yaml/token" ) const whitespace = ' ' // Context context at scanning type Context struct { idx int size int notSpaceCharPos int notSpaceOrgCharPos int src []rune buf []rune obuf []rune tokens token.Tokens isRawFolded bool isLiteral bool isFolded bool isSingleLine bool literalOpt string } var ( ctxPool = sync.Pool{ New: func() interface{} { return createContext() }, } ) func createContext() *Context { return &Context{ idx: 0, tokens: token.Tokens{}, isSingleLine: true, } } func newContext(src []rune) *Context { ctx := ctxPool.Get().(*Context) ctx.reset(src) return ctx } func (c *Context) release() { ctxPool.Put(c) } func (c *Context) reset(src []rune) { c.idx = 0 c.size = len(src) c.src = src c.tokens = c.tokens[:0] c.resetBuffer() c.isRawFolded = false c.isSingleLine = true c.isLiteral = false c.isFolded = false c.literalOpt = "" } func (c *Context) resetBuffer() { c.buf = c.buf[:0] c.obuf = c.obuf[:0] c.notSpaceCharPos = 0 c.notSpaceOrgCharPos = 0 } func (c *Context) isSaveIndentMode() bool { return c.isLiteral || c.isFolded || c.isRawFolded } func (c *Context) breakLiteral() { c.isLiteral = false c.isRawFolded = false c.isFolded = false c.literalOpt = "" } func (c *Context) addToken(tk *token.Token) { if tk == nil { return } c.tokens = append(c.tokens, tk) } func (c *Context) addBuf(r rune) { if len(c.buf) == 0 && r == ' ' { return } c.buf = append(c.buf, r) if r != ' ' && r != '\t' { c.notSpaceCharPos = len(c.buf) } } func (c *Context) addOriginBuf(r rune) { c.obuf = append(c.obuf, r) if r != ' ' && r != '\t' { c.notSpaceOrgCharPos = len(c.obuf) } } func (c *Context) removeRightSpaceFromBuf() int { trimmedBuf := c.obuf[:c.notSpaceOrgCharPos] buflen := len(trimmedBuf) diff := len(c.obuf) - buflen if diff > 0 { c.obuf = c.obuf[:buflen] c.buf = c.bufferedSrc() } return diff } func (c *Context) isDocument() bool { return c.isLiteral || c.isFolded || c.isRawFolded } func (c *Context) isEOS() bool { return len(c.src)-1 <= c.idx } func (c *Context) isNextEOS() bool { return len(c.src)-1 <= c.idx+1 } func (c *Context) next() bool { return c.idx < c.size } func (c *Context) source(s, e int) string { return string(c.src[s:e]) } func (c *Context) previousChar() rune { if c.idx > 0 { return c.src[c.idx-1] } return rune(0) } func (c *Context) currentChar() rune { if c.size > c.idx { return c.src[c.idx] } return rune(0) } func (c *Context) currentCharWithSkipWhitespace() rune { idx := c.idx for c.size > idx { ch := c.src[idx] if ch != whitespace { return ch } idx++ } return rune(0) } func (c *Context) nextChar() rune { if c.size > c.idx+1 { return c.src[c.idx+1] } return rune(0) } func (c *Context) repeatNum(r rune) int { cnt := 0 for i := c.idx; i < c.size; i++ { if c.src[i] == r { cnt++ } else { break } } return cnt } func (c *Context) progress(num int) { c.idx += num } func (c *Context) nextPos() int { return c.idx + 1 } func (c *Context) existsBuffer() bool { return len(c.bufferedSrc()) != 0 } func (c *Context) bufferedSrc() []rune { src := c.buf[:c.notSpaceCharPos] if len(src) > 0 && src[len(src)-1] == '\n' && c.isDocument() && c.literalOpt == "-" { // remove end '\n' character src = src[:len(src)-1] } return src } func (c *Context) bufferedToken(pos *token.Position) *token.Token { if c.idx == 0 { return nil } source := c.bufferedSrc() if len(source) == 0 { return nil } var tk *token.Token if c.isDocument() { tk = token.String(string(source), string(c.obuf), pos) } else { tk = token.New(string(source), string(c.obuf), pos) } c.resetBuffer() return tk } func (c *Context) lastToken() *token.Token { if len(c.tokens) != 0 { return c.tokens[len(c.tokens)-1] } return nil } ================================================ FILE: vendor/github.com/goccy/go-yaml/scanner/scanner.go ================================================ package scanner import ( "io" "strings" "github.com/goccy/go-yaml/token" "golang.org/x/xerrors" ) // IndentState state for indent type IndentState int const ( // IndentStateEqual equals previous indent IndentStateEqual IndentState = iota // IndentStateUp more indent than previous IndentStateUp // IndentStateDown less indent than previous IndentStateDown // IndentStateKeep uses not indent token IndentStateKeep ) // Scanner holds the scanner's internal state while processing a given text. // It can be allocated as part of another data structure but must be initialized via Init before use. type Scanner struct { source []rune sourcePos int sourceSize int line int column int offset int prevIndentLevel int prevIndentNum int prevIndentColumn int docStartColumn int indentLevel int indentNum int isFirstCharAtLine bool isAnchor bool startedFlowSequenceNum int startedFlowMapNum int indentState IndentState savedPos *token.Position } func (s *Scanner) pos() *token.Position { return &token.Position{ Line: s.line, Column: s.column, Offset: s.offset, IndentNum: s.indentNum, IndentLevel: s.indentLevel, } } func (s *Scanner) bufferedToken(ctx *Context) *token.Token { if s.savedPos != nil { tk := ctx.bufferedToken(s.savedPos) s.savedPos = nil return tk } line := s.line column := s.column - len(ctx.buf) level := s.indentLevel if ctx.isSaveIndentMode() { line -= s.newLineCount(ctx.buf) column = strings.Index(string(ctx.obuf), string(ctx.buf)) + 1 // Since we are in a literal, folded or raw folded // we can use the indent level from the last token. last := ctx.lastToken() if last != nil { // The last token should never be nil here. level = last.Position.IndentLevel + 1 } } return ctx.bufferedToken(&token.Position{ Line: line, Column: column, Offset: s.offset - len(ctx.buf), IndentNum: s.indentNum, IndentLevel: level, }) } func (s *Scanner) progressColumn(ctx *Context, num int) { s.column += num s.offset += num ctx.progress(num) } func (s *Scanner) progressLine(ctx *Context) { s.column = 1 s.line++ s.offset++ s.indentNum = 0 s.isFirstCharAtLine = true s.isAnchor = false ctx.progress(1) } func (s *Scanner) isNeededKeepPreviousIndentNum(ctx *Context, c rune) bool { if !s.isChangedToIndentStateUp() { return false } if ctx.isDocument() { return true } if c == '-' && ctx.existsBuffer() { return true } return false } func (s *Scanner) isNewLineChar(c rune) bool { if c == '\n' { return true } if c == '\r' { return true } return false } func (s *Scanner) newLineCount(src []rune) int { size := len(src) cnt := 0 for i := 0; i < size; i++ { c := src[i] switch c { case '\r': if i+1 < size && src[i+1] == '\n' { i++ } cnt++ case '\n': cnt++ } } return cnt } func (s *Scanner) updateIndentState(ctx *Context) { indentNumBasedIndentState := s.indentState if s.prevIndentNum < s.indentNum { s.indentLevel = s.prevIndentLevel + 1 indentNumBasedIndentState = IndentStateUp } else if s.prevIndentNum == s.indentNum { s.indentLevel = s.prevIndentLevel indentNumBasedIndentState = IndentStateEqual } else { indentNumBasedIndentState = IndentStateDown if s.prevIndentLevel > 0 { s.indentLevel = s.prevIndentLevel - 1 } } if s.prevIndentColumn > 0 { if s.prevIndentColumn < s.column { s.indentState = IndentStateUp } else if s.prevIndentColumn != s.column || indentNumBasedIndentState != IndentStateEqual { // The following case ( current position is 'd' ), some variables becomes like here // - prevIndentColumn: 1 of 'a' // - indentNumBasedIndentState: IndentStateDown because d's indentNum(1) is less than c's indentNum(3). // Therefore, s.prevIndentColumn(1) == s.column(1) is true, but we want to treat this as IndentStateDown. // So, we look also current indentState value by the above prevIndentNum based logic, and determins finally indentState. // --- // a: // b // c // d: e // ^ s.indentState = IndentStateDown } else { s.indentState = IndentStateEqual } } else { s.indentState = indentNumBasedIndentState } } func (s *Scanner) updateIndent(ctx *Context, c rune) { if s.isFirstCharAtLine && s.isNewLineChar(c) && ctx.isDocument() { return } if s.isFirstCharAtLine && c == ' ' { s.indentNum++ return } if !s.isFirstCharAtLine { s.indentState = IndentStateKeep return } s.updateIndentState(ctx) s.isFirstCharAtLine = false if s.isNeededKeepPreviousIndentNum(ctx, c) { return } if s.indentState != IndentStateUp { s.prevIndentColumn = 0 } s.prevIndentNum = s.indentNum s.prevIndentLevel = s.indentLevel } func (s *Scanner) isChangedToIndentStateDown() bool { return s.indentState == IndentStateDown } func (s *Scanner) isChangedToIndentStateUp() bool { return s.indentState == IndentStateUp } func (s *Scanner) isChangedToIndentStateEqual() bool { return s.indentState == IndentStateEqual } func (s *Scanner) addBufferedTokenIfExists(ctx *Context) { ctx.addToken(s.bufferedToken(ctx)) } func (s *Scanner) breakLiteral(ctx *Context) { s.docStartColumn = 0 ctx.breakLiteral() } func (s *Scanner) scanSingleQuote(ctx *Context) (tk *token.Token, pos int) { ctx.addOriginBuf('\'') srcpos := s.pos() startIndex := ctx.idx + 1 src := ctx.src size := len(src) value := []rune{} isFirstLineChar := false isNewLine := false for idx := startIndex; idx < size; idx++ { if !isNewLine { s.progressColumn(ctx, 1) } else { isNewLine = false } c := src[idx] pos = idx + 1 ctx.addOriginBuf(c) if s.isNewLineChar(c) { value = append(value, ' ') isFirstLineChar = true isNewLine = true s.progressLine(ctx) continue } else if c == ' ' && isFirstLineChar { continue } else if c != '\'' { value = append(value, c) isFirstLineChar = false continue } if idx+1 < len(ctx.src) && ctx.src[idx+1] == '\'' { // '' handle as ' character value = append(value, c) ctx.addOriginBuf(c) idx++ continue } s.progressColumn(ctx, 1) tk = token.SingleQuote(string(value), string(ctx.obuf), srcpos) pos = idx - startIndex + 1 return } return } func hexToInt(b rune) int { if b >= 'A' && b <= 'F' { return int(b) - 'A' + 10 } if b >= 'a' && b <= 'f' { return int(b) - 'a' + 10 } return int(b) - '0' } func hexRunesToInt(b []rune) int { sum := 0 for i := 0; i < len(b); i++ { sum += hexToInt(b[i]) << (uint(len(b)-i-1) * 4) } return sum } func (s *Scanner) scanDoubleQuote(ctx *Context) (tk *token.Token, pos int) { ctx.addOriginBuf('"') srcpos := s.pos() startIndex := ctx.idx + 1 src := ctx.src size := len(src) value := []rune{} isFirstLineChar := false isNewLine := false for idx := startIndex; idx < size; idx++ { if !isNewLine { s.progressColumn(ctx, 1) } else { isNewLine = false } c := src[idx] pos = idx + 1 ctx.addOriginBuf(c) if s.isNewLineChar(c) { value = append(value, ' ') isFirstLineChar = true isNewLine = true s.progressLine(ctx) continue } else if c == ' ' && isFirstLineChar { continue } else if c == '\\' { isFirstLineChar = false if idx+1 < size { nextChar := src[idx+1] switch nextChar { case 'b': ctx.addOriginBuf(nextChar) value = append(value, '\b') idx++ continue case 'e': ctx.addOriginBuf(nextChar) value = append(value, '\x1B') idx++ continue case 'f': ctx.addOriginBuf(nextChar) value = append(value, '\f') idx++ continue case 'n': ctx.addOriginBuf(nextChar) value = append(value, '\n') idx++ continue case 'v': ctx.addOriginBuf(nextChar) value = append(value, '\v') idx++ continue case 'L': // LS (#x2028) ctx.addOriginBuf(nextChar) value = append(value, []rune{'\xE2', '\x80', '\xA8'}...) idx++ continue case 'N': // NEL (#x85) ctx.addOriginBuf(nextChar) value = append(value, []rune{'\xC2', '\x85'}...) idx++ continue case 'P': // PS (#x2029) ctx.addOriginBuf(nextChar) value = append(value, []rune{'\xE2', '\x80', '\xA9'}...) idx++ continue case '_': // #xA0 ctx.addOriginBuf(nextChar) value = append(value, []rune{'\xC2', '\xA0'}...) idx++ continue case '"': ctx.addOriginBuf(nextChar) value = append(value, nextChar) idx++ continue case 'x': if idx+3 >= size { // TODO: need to return error //err = xerrors.New("invalid escape character \\x") return } codeNum := hexRunesToInt(src[idx+2 : idx+4]) value = append(value, rune(codeNum)) idx += 3 continue case 'u': if idx+5 >= size { // TODO: need to return error //err = xerrors.New("invalid escape character \\u") return } codeNum := hexRunesToInt(src[idx+2 : idx+6]) value = append(value, rune(codeNum)) idx += 5 continue case 'U': if idx+9 >= size { // TODO: need to return error //err = xerrors.New("invalid escape character \\U") return } codeNum := hexRunesToInt(src[idx+2 : idx+10]) value = append(value, rune(codeNum)) idx += 9 continue case '\\': ctx.addOriginBuf(nextChar) idx++ } } value = append(value, c) continue } else if c != '"' { value = append(value, c) isFirstLineChar = false continue } s.progressColumn(ctx, 1) tk = token.DoubleQuote(string(value), string(ctx.obuf), srcpos) pos = idx - startIndex + 1 return } return } func (s *Scanner) scanQuote(ctx *Context, ch rune) (tk *token.Token, pos int) { if ch == '\'' { return s.scanSingleQuote(ctx) } return s.scanDoubleQuote(ctx) } func (s *Scanner) isMergeKey(ctx *Context) bool { if ctx.repeatNum('<') != 2 { return false } src := ctx.src size := len(src) for idx := ctx.idx + 2; idx < size; idx++ { c := src[idx] if c == ' ' { continue } if c != ':' { return false } if idx+1 < size { nc := src[idx+1] if nc == ' ' || s.isNewLineChar(nc) { return true } } } return false } func (s *Scanner) scanTag(ctx *Context) (tk *token.Token, pos int) { ctx.addOriginBuf('!') ctx.progress(1) // skip '!' character for idx, c := range ctx.src[ctx.idx:] { pos = idx + 1 ctx.addOriginBuf(c) switch c { case ' ', '\n', '\r': value := ctx.source(ctx.idx-1, ctx.idx+idx) tk = token.Tag(value, string(ctx.obuf), s.pos()) pos = len([]rune(value)) return } } return } func (s *Scanner) scanComment(ctx *Context) (tk *token.Token, pos int) { ctx.addOriginBuf('#') ctx.progress(1) // skip '#' character for idx, c := range ctx.src[ctx.idx:] { pos = idx + 1 ctx.addOriginBuf(c) switch c { case '\n', '\r': if ctx.previousChar() == '\\' { continue } value := ctx.source(ctx.idx, ctx.idx+idx) tk = token.Comment(value, string(ctx.obuf), s.pos()) pos = len([]rune(value)) + 1 return } } // document ends with comment. value := string(ctx.src[ctx.idx:]) tk = token.Comment(value, string(ctx.obuf), s.pos()) pos = len([]rune(value)) + 1 return } func trimCommentFromLiteralOpt(text string) (string, error) { idx := strings.Index(text, "#") if idx < 0 { return text, nil } if idx == 0 { return "", xerrors.New("invalid literal header") } return text[:idx-1], nil } func (s *Scanner) scanLiteral(ctx *Context, c rune) { ctx.addOriginBuf(c) if ctx.isEOS() { if ctx.isLiteral { ctx.addBuf(c) } value := ctx.bufferedSrc() ctx.addToken(token.String(string(value), string(ctx.obuf), s.pos())) ctx.resetBuffer() s.progressColumn(ctx, 1) } else if s.isNewLineChar(c) { if ctx.isLiteral { ctx.addBuf(c) } else { ctx.addBuf(' ') } s.progressLine(ctx) } else if s.isFirstCharAtLine && c == ' ' { if 0 < s.docStartColumn && s.docStartColumn <= s.column { ctx.addBuf(c) } s.progressColumn(ctx, 1) } else { if s.docStartColumn == 0 { s.docStartColumn = s.column } ctx.addBuf(c) s.progressColumn(ctx, 1) } } func (s *Scanner) scanLiteralHeader(ctx *Context) (pos int, err error) { header := ctx.currentChar() ctx.addOriginBuf(header) ctx.progress(1) // skip '|' or '>' character for idx, c := range ctx.src[ctx.idx:] { pos = idx ctx.addOriginBuf(c) switch c { case '\n', '\r': value := ctx.source(ctx.idx, ctx.idx+idx) opt := strings.TrimRight(value, " ") orgOptLen := len(opt) opt, err = trimCommentFromLiteralOpt(opt) if err != nil { return } switch opt { case "", "+", "-", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9": hasComment := len(opt) < orgOptLen if header == '|' { if hasComment { commentLen := orgOptLen - len(opt) headerPos := strings.Index(string(ctx.obuf), "|") litBuf := ctx.obuf[:len(ctx.obuf)-commentLen-headerPos] commentBuf := ctx.obuf[len(litBuf):] ctx.addToken(token.Literal("|"+opt, string(litBuf), s.pos())) s.column += len(litBuf) s.offset += len(litBuf) commentHeader := strings.Index(value, "#") ctx.addToken(token.Comment(string(value[commentHeader+1:]), string(commentBuf), s.pos())) } else { ctx.addToken(token.Literal("|"+opt, string(ctx.obuf), s.pos())) } ctx.isLiteral = true } else if header == '>' { if hasComment { commentLen := orgOptLen - len(opt) headerPos := strings.Index(string(ctx.obuf), ">") foldedBuf := ctx.obuf[:len(ctx.obuf)-commentLen-headerPos] commentBuf := ctx.obuf[len(foldedBuf):] ctx.addToken(token.Folded(">"+opt, string(foldedBuf), s.pos())) s.column += len(foldedBuf) s.offset += len(foldedBuf) commentHeader := strings.Index(value, "#") ctx.addToken(token.Comment(string(value[commentHeader+1:]), string(commentBuf), s.pos())) } else { ctx.addToken(token.Folded(">"+opt, string(ctx.obuf), s.pos())) } ctx.isFolded = true } s.indentState = IndentStateKeep ctx.resetBuffer() ctx.literalOpt = opt return } break } } err = xerrors.New("invalid literal header") return } func (s *Scanner) scanNewLine(ctx *Context, c rune) { if len(ctx.buf) > 0 && s.savedPos == nil { s.savedPos = s.pos() s.savedPos.Column -= len(ctx.bufferedSrc()) } // if the following case, origin buffer has unnecessary two spaces. // So, `removeRightSpaceFromOriginBuf` remove them, also fix column number too. // --- // a:[space][space] // b: c removedNum := ctx.removeRightSpaceFromBuf() if removedNum > 0 { s.column -= removedNum s.offset -= removedNum if s.savedPos != nil { s.savedPos.Column -= removedNum } } if ctx.isEOS() { s.addBufferedTokenIfExists(ctx) } else if s.isAnchor { s.addBufferedTokenIfExists(ctx) } ctx.addBuf(' ') ctx.addOriginBuf(c) ctx.isSingleLine = false s.progressLine(ctx) } func (s *Scanner) scan(ctx *Context) (pos int) { for ctx.next() { pos = ctx.nextPos() c := ctx.currentChar() s.updateIndent(ctx, c) if ctx.isDocument() { if s.isChangedToIndentStateEqual() || s.isChangedToIndentStateDown() { s.addBufferedTokenIfExists(ctx) s.breakLiteral(ctx) } else { s.scanLiteral(ctx, c) continue } } else if s.isChangedToIndentStateDown() { s.addBufferedTokenIfExists(ctx) } else if s.isChangedToIndentStateEqual() { // if first character is new line character, buffer expect to raw folded literal if len(ctx.obuf) > 0 && s.newLineCount(ctx.obuf) <= 1 { // doesn't raw folded literal s.addBufferedTokenIfExists(ctx) } } switch c { case '{': if !ctx.existsBuffer() { ctx.addOriginBuf(c) ctx.addToken(token.MappingStart(string(ctx.obuf), s.pos())) s.startedFlowMapNum++ s.progressColumn(ctx, 1) return } case '}': if !ctx.existsBuffer() || s.startedFlowMapNum > 0 { ctx.addToken(s.bufferedToken(ctx)) ctx.addOriginBuf(c) ctx.addToken(token.MappingEnd(string(ctx.obuf), s.pos())) s.startedFlowMapNum-- s.progressColumn(ctx, 1) return } case '.': if s.indentNum == 0 && s.column == 1 && ctx.repeatNum('.') == 3 { ctx.addToken(token.DocumentEnd(string(ctx.obuf)+"...", s.pos())) s.progressColumn(ctx, 3) pos += 2 return } case '<': if s.isMergeKey(ctx) { s.prevIndentColumn = s.column ctx.addToken(token.MergeKey(string(ctx.obuf)+"<<", s.pos())) s.progressColumn(ctx, 1) pos++ return } case '-': if s.indentNum == 0 && s.column == 1 && ctx.repeatNum('-') == 3 { s.addBufferedTokenIfExists(ctx) ctx.addToken(token.DocumentHeader(string(ctx.obuf)+"---", s.pos())) s.progressColumn(ctx, 3) pos += 2 return } if ctx.existsBuffer() && s.isChangedToIndentStateUp() { // raw folded ctx.isRawFolded = true ctx.addBuf(c) ctx.addOriginBuf(c) s.progressColumn(ctx, 1) continue } if ctx.existsBuffer() { // '-' is literal ctx.addBuf(c) ctx.addOriginBuf(c) s.progressColumn(ctx, 1) continue } nc := ctx.nextChar() if nc == ' ' || s.isNewLineChar(nc) { s.addBufferedTokenIfExists(ctx) ctx.addOriginBuf(c) tk := token.SequenceEntry(string(ctx.obuf), s.pos()) s.prevIndentColumn = tk.Position.Column ctx.addToken(tk) s.progressColumn(ctx, 1) return } case '[': if !ctx.existsBuffer() { ctx.addOriginBuf(c) ctx.addToken(token.SequenceStart(string(ctx.obuf), s.pos())) s.startedFlowSequenceNum++ s.progressColumn(ctx, 1) return } case ']': if !ctx.existsBuffer() || s.startedFlowSequenceNum > 0 { s.addBufferedTokenIfExists(ctx) ctx.addOriginBuf(c) ctx.addToken(token.SequenceEnd(string(ctx.obuf), s.pos())) s.startedFlowSequenceNum-- s.progressColumn(ctx, 1) return } case ',': if s.startedFlowSequenceNum > 0 || s.startedFlowMapNum > 0 { s.addBufferedTokenIfExists(ctx) ctx.addOriginBuf(c) ctx.addToken(token.CollectEntry(string(ctx.obuf), s.pos())) s.progressColumn(ctx, 1) return } case ':': nc := ctx.nextChar() if s.startedFlowMapNum > 0 || nc == ' ' || s.isNewLineChar(nc) || ctx.isNextEOS() { // mapping value tk := s.bufferedToken(ctx) if tk != nil { s.prevIndentColumn = tk.Position.Column ctx.addToken(tk) } else if tk := ctx.lastToken(); tk != nil { // If the map key is quote, the buffer does not exist because it has already been cut into tokens. // Therefore, we need to check the last token. if tk.Indicator == token.QuotedScalarIndicator { s.prevIndentColumn = tk.Position.Column } } ctx.addToken(token.MappingValue(s.pos())) s.progressColumn(ctx, 1) return } case '|', '>': if !ctx.existsBuffer() { progress, err := s.scanLiteralHeader(ctx) if err != nil { // TODO: returns syntax error object return } s.progressColumn(ctx, progress) s.progressLine(ctx) continue } case '!': if !ctx.existsBuffer() { token, progress := s.scanTag(ctx) ctx.addToken(token) s.progressColumn(ctx, progress) if c := ctx.previousChar(); s.isNewLineChar(c) { s.progressLine(ctx) } pos += progress return } case '%': if !ctx.existsBuffer() && s.indentNum == 0 { ctx.addToken(token.Directive(string(ctx.obuf)+"%", s.pos())) s.progressColumn(ctx, 1) return } case '?': nc := ctx.nextChar() if !ctx.existsBuffer() && nc == ' ' { ctx.addToken(token.MappingKey(s.pos())) s.progressColumn(ctx, 1) return } case '&': if !ctx.existsBuffer() { s.addBufferedTokenIfExists(ctx) ctx.addOriginBuf(c) ctx.addToken(token.Anchor(string(ctx.obuf), s.pos())) s.progressColumn(ctx, 1) s.isAnchor = true return } case '*': if !ctx.existsBuffer() { s.addBufferedTokenIfExists(ctx) ctx.addOriginBuf(c) ctx.addToken(token.Alias(string(ctx.obuf), s.pos())) s.progressColumn(ctx, 1) return } case '#': if !ctx.existsBuffer() || ctx.previousChar() == ' ' { s.addBufferedTokenIfExists(ctx) token, progress := s.scanComment(ctx) ctx.addToken(token) s.progressColumn(ctx, progress) s.progressLine(ctx) pos += progress return } case '\'', '"': if !ctx.existsBuffer() { token, progress := s.scanQuote(ctx, c) ctx.addToken(token) pos += progress // If the non-whitespace character immediately following the quote is ':', the quote should be treated as a map key. // Therefore, do not return and continue processing as a normal map key. if ctx.currentCharWithSkipWhitespace() == ':' { continue } return } case '\r', '\n': // There is no problem that we ignore CR which followed by LF and normalize it to LF, because of following YAML1.2 spec. // > Line breaks inside scalar content must be normalized by the YAML processor. Each such line break must be parsed into a single line feed character. // > Outside scalar content, YAML allows any line break to be used to terminate lines. // > -- https://yaml.org/spec/1.2/spec.html if c == '\r' && ctx.nextChar() == '\n' { ctx.addOriginBuf('\r') ctx.progress(1) c = '\n' } s.scanNewLine(ctx, c) continue case ' ': if ctx.isSaveIndentMode() || (!s.isAnchor && !s.isFirstCharAtLine) { ctx.addBuf(c) ctx.addOriginBuf(c) s.progressColumn(ctx, 1) continue } if s.isFirstCharAtLine { s.progressColumn(ctx, 1) ctx.addOriginBuf(c) continue } s.addBufferedTokenIfExists(ctx) pos-- // to rescan white space at next scanning for adding white space to next buffer. s.isAnchor = false return } ctx.addBuf(c) ctx.addOriginBuf(c) s.progressColumn(ctx, 1) } s.addBufferedTokenIfExists(ctx) return } // Init prepares the scanner s to tokenize the text src by setting the scanner at the beginning of src. func (s *Scanner) Init(text string) { src := []rune(text) s.source = src s.sourcePos = 0 s.sourceSize = len(src) s.line = 1 s.column = 1 s.offset = 1 s.prevIndentLevel = 0 s.prevIndentNum = 0 s.prevIndentColumn = 0 s.indentLevel = 0 s.indentNum = 0 s.isFirstCharAtLine = true } // Scan scans the next token and returns the token collection. The source end is indicated by io.EOF. func (s *Scanner) Scan() (token.Tokens, error) { if s.sourcePos >= s.sourceSize { return nil, io.EOF } ctx := newContext(s.source[s.sourcePos:]) defer ctx.release() progress := s.scan(ctx) s.sourcePos += progress var tokens token.Tokens tokens = append(tokens, ctx.tokens...) return tokens, nil } ================================================ FILE: vendor/github.com/goccy/go-yaml/stdlib_quote.go ================================================ // Copied and trimmed down from https://github.com/golang/go/blob/e3769299cd3484e018e0e2a6e1b95c2b18ce4f41/src/strconv/quote.go // We want to use the standard library's private "quoteWith" function rather than write our own so that we get robust unicode support. // Every private function called by quoteWith was copied. // There are 2 modifications to simplify the code: // 1. The unicode.IsPrint function was substituted for the custom implementation of IsPrint // 2. All code paths reachable only when ASCIIonly or grphicOnly are set to true were removed. // 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 yaml import ( "unicode" "unicode/utf8" ) const ( lowerhex = "0123456789abcdef" ) func quoteWith(s string, quote byte) string { return string(appendQuotedWith(make([]byte, 0, 3*len(s)/2), s, quote)) } func appendQuotedWith(buf []byte, s string, quote byte) []byte { // Often called with big strings, so preallocate. If there's quoting, // this is conservative but still helps a lot. if cap(buf)-len(buf) < len(s) { nBuf := make([]byte, len(buf), len(buf)+1+len(s)+1) copy(nBuf, buf) buf = nBuf } buf = append(buf, quote) for width := 0; len(s) > 0; s = s[width:] { r := rune(s[0]) width = 1 if r >= utf8.RuneSelf { r, width = utf8.DecodeRuneInString(s) } if width == 1 && r == utf8.RuneError { buf = append(buf, `\x`...) buf = append(buf, lowerhex[s[0]>>4]) buf = append(buf, lowerhex[s[0]&0xF]) continue } buf = appendEscapedRune(buf, r, quote) } buf = append(buf, quote) return buf } func appendEscapedRune(buf []byte, r rune, quote byte) []byte { var runeTmp [utf8.UTFMax]byte if r == rune(quote) || r == '\\' { // always backslashed buf = append(buf, '\\') buf = append(buf, byte(r)) return buf } if unicode.IsPrint(r) { n := utf8.EncodeRune(runeTmp[:], r) buf = append(buf, runeTmp[:n]...) return buf } switch r { case '\a': buf = append(buf, `\a`...) case '\b': buf = append(buf, `\b`...) case '\f': buf = append(buf, `\f`...) case '\n': buf = append(buf, `\n`...) case '\r': buf = append(buf, `\r`...) case '\t': buf = append(buf, `\t`...) case '\v': buf = append(buf, `\v`...) default: switch { case r < ' ': buf = append(buf, `\x`...) buf = append(buf, lowerhex[byte(r)>>4]) buf = append(buf, lowerhex[byte(r)&0xF]) case r > utf8.MaxRune: r = 0xFFFD fallthrough case r < 0x10000: buf = append(buf, `\u`...) for s := 12; s >= 0; s -= 4 { buf = append(buf, lowerhex[r>>uint(s)&0xF]) } default: buf = append(buf, `\U`...) for s := 28; s >= 0; s -= 4 { buf = append(buf, lowerhex[r>>uint(s)&0xF]) } } } return buf } ================================================ FILE: vendor/github.com/goccy/go-yaml/struct.go ================================================ package yaml import ( "reflect" "strings" "golang.org/x/xerrors" ) const ( // StructTagName tag keyword for Marshal/Unmarshal StructTagName = "yaml" ) // StructField information for each the field in structure type StructField struct { FieldName string RenderName string AnchorName string AliasName string IsAutoAnchor bool IsAutoAlias bool IsOmitEmpty bool IsFlow bool IsInline bool } func getTag(field reflect.StructField) string { // If struct tag `yaml` exist, use that. If no `yaml` // exists, but `json` does, use that and try the best to // adhere to its rules tag := field.Tag.Get(StructTagName) if tag == "" { tag = field.Tag.Get(`json`) } return tag } func structField(field reflect.StructField) *StructField { tag := getTag(field) fieldName := strings.ToLower(field.Name) options := strings.Split(tag, ",") if len(options) > 0 { if options[0] != "" { fieldName = options[0] } } structField := &StructField{ FieldName: field.Name, RenderName: fieldName, } if len(options) > 1 { for _, opt := range options[1:] { switch { case opt == "omitempty": structField.IsOmitEmpty = true case opt == "flow": structField.IsFlow = true case opt == "inline": structField.IsInline = true case strings.HasPrefix(opt, "anchor"): anchor := strings.Split(opt, "=") if len(anchor) > 1 { structField.AnchorName = anchor[1] } else { structField.IsAutoAnchor = true } case strings.HasPrefix(opt, "alias"): alias := strings.Split(opt, "=") if len(alias) > 1 { structField.AliasName = alias[1] } else { structField.IsAutoAlias = true } default: } } } return structField } func isIgnoredStructField(field reflect.StructField) bool { if field.PkgPath != "" && !field.Anonymous { // private field return true } tag := getTag(field) if tag == "-" { return true } return false } type StructFieldMap map[string]*StructField func (m StructFieldMap) isIncludedRenderName(name string) bool { for _, v := range m { if !v.IsInline && v.RenderName == name { return true } } return false } func (m StructFieldMap) hasMergeProperty() bool { for _, v := range m { if v.IsOmitEmpty && v.IsInline && v.IsAutoAlias { return true } } return false } func structFieldMap(structType reflect.Type) (StructFieldMap, error) { structFieldMap := StructFieldMap{} renderNameMap := map[string]struct{}{} for i := 0; i < structType.NumField(); i++ { field := structType.Field(i) if isIgnoredStructField(field) { continue } structField := structField(field) if _, exists := renderNameMap[structField.RenderName]; exists { return nil, xerrors.Errorf("duplicated struct field name %s", structField.RenderName) } structFieldMap[structField.FieldName] = structField renderNameMap[structField.RenderName] = struct{}{} } return structFieldMap, nil } ================================================ FILE: vendor/github.com/goccy/go-yaml/token/token.go ================================================ package token import ( "fmt" "strings" ) // Character type for character type Character byte const ( // SequenceEntryCharacter character for sequence entry SequenceEntryCharacter Character = '-' // MappingKeyCharacter character for mapping key MappingKeyCharacter Character = '?' // MappingValueCharacter character for mapping value MappingValueCharacter Character = ':' // CollectEntryCharacter character for collect entry CollectEntryCharacter Character = ',' // SequenceStartCharacter character for sequence start SequenceStartCharacter Character = '[' // SequenceEndCharacter character for sequence end SequenceEndCharacter Character = ']' // MappingStartCharacter character for mapping start MappingStartCharacter Character = '{' // MappingEndCharacter character for mapping end MappingEndCharacter Character = '}' // CommentCharacter character for comment CommentCharacter Character = '#' // AnchorCharacter character for anchor AnchorCharacter Character = '&' // AliasCharacter character for alias AliasCharacter Character = '*' // TagCharacter character for tag TagCharacter Character = '!' // LiteralCharacter character for literal LiteralCharacter Character = '|' // FoldedCharacter character for folded FoldedCharacter Character = '>' // SingleQuoteCharacter character for single quote SingleQuoteCharacter Character = '\'' // DoubleQuoteCharacter character for double quote DoubleQuoteCharacter Character = '"' // DirectiveCharacter character for directive DirectiveCharacter Character = '%' // SpaceCharacter character for space SpaceCharacter Character = ' ' // LineBreakCharacter character for line break LineBreakCharacter Character = '\n' ) // Type type identifier for token type Type int const ( // UnknownType reserve for invalid type UnknownType Type = iota // DocumentHeaderType type for DocumentHeader token DocumentHeaderType // DocumentEndType type for DocumentEnd token DocumentEndType // SequenceEntryType type for SequenceEntry token SequenceEntryType // MappingKeyType type for MappingKey token MappingKeyType // MappingValueType type for MappingValue token MappingValueType // MergeKeyType type for MergeKey token MergeKeyType // CollectEntryType type for CollectEntry token CollectEntryType // SequenceStartType type for SequenceStart token SequenceStartType // SequenceEndType type for SequenceEnd token SequenceEndType // MappingStartType type for MappingStart token MappingStartType // MappingEndType type for MappingEnd token MappingEndType // CommentType type for Comment token CommentType // AnchorType type for Anchor token AnchorType // AliasType type for Alias token AliasType // TagType type for Tag token TagType // LiteralType type for Literal token LiteralType // FoldedType type for Folded token FoldedType // SingleQuoteType type for SingleQuote token SingleQuoteType // DoubleQuoteType type for DoubleQuote token DoubleQuoteType // DirectiveType type for Directive token DirectiveType // SpaceType type for Space token SpaceType // NullType type for Null token NullType // InfinityType type for Infinity token InfinityType // NanType type for Nan token NanType // IntegerType type for Integer token IntegerType // BinaryIntegerType type for BinaryInteger token BinaryIntegerType // OctetIntegerType type for OctetInteger token OctetIntegerType // HexIntegerType type for HexInteger token HexIntegerType // FloatType type for Float token FloatType // StringType type for String token StringType // BoolType type for Bool token BoolType ) // String type identifier to text func (t Type) String() string { switch t { case UnknownType: return "Unknown" case DocumentHeaderType: return "DocumentHeader" case DocumentEndType: return "DocumentEnd" case SequenceEntryType: return "SequenceEntry" case MappingKeyType: return "MappingKey" case MappingValueType: return "MappingValue" case MergeKeyType: return "MergeKey" case CollectEntryType: return "CollectEntry" case SequenceStartType: return "SequenceStart" case SequenceEndType: return "SequenceEnd" case MappingStartType: return "MappingStart" case MappingEndType: return "MappingEnd" case CommentType: return "Comment" case AnchorType: return "Anchor" case AliasType: return "Alias" case TagType: return "Tag" case LiteralType: return "Literal" case FoldedType: return "Folded" case SingleQuoteType: return "SingleQuote" case DoubleQuoteType: return "DoubleQuote" case DirectiveType: return "Directive" case SpaceType: return "Space" case StringType: return "String" case BoolType: return "Bool" case IntegerType: return "Integer" case BinaryIntegerType: return "BinaryInteger" case OctetIntegerType: return "OctetInteger" case HexIntegerType: return "HexInteger" case FloatType: return "Float" case NullType: return "Null" case InfinityType: return "Infinity" case NanType: return "Nan" } return "" } // CharacterType type for character category type CharacterType int const ( // CharacterTypeIndicator type of indicator character CharacterTypeIndicator CharacterType = iota // CharacterTypeWhiteSpace type of white space character CharacterTypeWhiteSpace // CharacterTypeMiscellaneous type of miscellaneous character CharacterTypeMiscellaneous // CharacterTypeEscaped type of escaped character CharacterTypeEscaped ) // String character type identifier to text func (c CharacterType) String() string { switch c { case CharacterTypeIndicator: return "Indicator" case CharacterTypeWhiteSpace: return "WhiteSpcae" case CharacterTypeMiscellaneous: return "Miscellaneous" case CharacterTypeEscaped: return "Escaped" } return "" } // Indicator type for indicator type Indicator int const ( // NotIndicator not indicator NotIndicator Indicator = iota // BlockStructureIndicator indicator for block structure ( '-', '?', ':' ) BlockStructureIndicator // FlowCollectionIndicator indicator for flow collection ( '[', ']', '{', '}', ',' ) FlowCollectionIndicator // CommentIndicator indicator for comment ( '#' ) CommentIndicator // NodePropertyIndicator indicator for node property ( '!', '&', '*' ) NodePropertyIndicator // BlockScalarIndicator indicator for block scalar ( '|', '>' ) BlockScalarIndicator // QuotedScalarIndicator indicator for quoted scalar ( ''', '"' ) QuotedScalarIndicator // DirectiveIndicator indicator for directive ( '%' ) DirectiveIndicator // InvalidUseOfReservedIndicator indicator for invalid use of reserved keyword ( '@', '`' ) InvalidUseOfReservedIndicator ) // String indicator to text func (i Indicator) String() string { switch i { case NotIndicator: return "NotIndicator" case BlockStructureIndicator: return "BlockStructure" case FlowCollectionIndicator: return "FlowCollection" case CommentIndicator: return "Comment" case NodePropertyIndicator: return "NodeProperty" case BlockScalarIndicator: return "BlockScalar" case QuotedScalarIndicator: return "QuotedScalar" case DirectiveIndicator: return "Directive" case InvalidUseOfReservedIndicator: return "InvalidUseOfReserved" } return "" } var ( reservedNullKeywords = []string{ "null", "Null", "NULL", "~", } reservedBoolKeywords = []string{ "true", "True", "TRUE", "false", "False", "FALSE", } // For compatibility with other YAML 1.1 parsers // Note that we use these solely for encoding the bool value with quotes. // go-yaml should not treat these as reserved keywords at parsing time. // as go-yaml is supposed to be compliant only with YAML 1.2. reservedLegacyBoolKeywords = []string{ "y", "Y", "yes", "Yes", "YES", "n", "N", "no", "No", "NO", "on", "On", "ON", "off", "Off", "OFF", } reservedInfKeywords = []string{ ".inf", ".Inf", ".INF", "-.inf", "-.Inf", "-.INF", } reservedNanKeywords = []string{ ".nan", ".NaN", ".NAN", } reservedKeywordMap = map[string]func(string, string, *Position) *Token{} // reservedEncKeywordMap contains is the keyword map used at encoding time. // This is supposed to be a superset of reservedKeywordMap, // and used to quote legacy keywords present in YAML 1.1 or lesser for compatibility reasons, // even though this library is supposed to be YAML 1.2-compliant. reservedEncKeywordMap = map[string]func(string, string, *Position) *Token{} ) func reservedKeywordToken(typ Type, value, org string, pos *Position) *Token { return &Token{ Type: typ, CharacterType: CharacterTypeMiscellaneous, Indicator: NotIndicator, Value: value, Origin: org, Position: pos, } } func init() { for _, keyword := range reservedNullKeywords { reservedKeywordMap[keyword] = func(value, org string, pos *Position) *Token { return reservedKeywordToken(NullType, value, org, pos) } } for _, keyword := range reservedBoolKeywords { f := func(value, org string, pos *Position) *Token { return reservedKeywordToken(BoolType, value, org, pos) } reservedKeywordMap[keyword] = f reservedEncKeywordMap[keyword] = f } for _, keyword := range reservedLegacyBoolKeywords { reservedEncKeywordMap[keyword] = func(value, org string, pos *Position) *Token { return reservedKeywordToken(BoolType, value, org, pos) } } for _, keyword := range reservedInfKeywords { reservedKeywordMap[keyword] = func(value, org string, pos *Position) *Token { return reservedKeywordToken(InfinityType, value, org, pos) } } for _, keyword := range reservedNanKeywords { reservedKeywordMap[keyword] = func(value, org string, pos *Position) *Token { return reservedKeywordToken(NanType, value, org, pos) } } } // ReservedTagKeyword type of reserved tag keyword type ReservedTagKeyword string const ( // IntegerTag `!!int` tag IntegerTag ReservedTagKeyword = "!!int" // FloatTag `!!float` tag FloatTag ReservedTagKeyword = "!!float" // NullTag `!!null` tag NullTag ReservedTagKeyword = "!!null" // SequenceTag `!!seq` tag SequenceTag ReservedTagKeyword = "!!seq" // MappingTag `!!map` tag MappingTag ReservedTagKeyword = "!!map" // StringTag `!!str` tag StringTag ReservedTagKeyword = "!!str" // BinaryTag `!!binary` tag BinaryTag ReservedTagKeyword = "!!binary" // OrderedMapTag `!!omap` tag OrderedMapTag ReservedTagKeyword = "!!omap" // SetTag `!!set` tag SetTag ReservedTagKeyword = "!!set" // TimestampTag `!!timestamp` tag TimestampTag ReservedTagKeyword = "!!timestamp" ) var ( // ReservedTagKeywordMap map for reserved tag keywords ReservedTagKeywordMap = map[ReservedTagKeyword]func(string, string, *Position) *Token{ IntegerTag: func(value, org string, pos *Position) *Token { return &Token{ Type: TagType, CharacterType: CharacterTypeIndicator, Indicator: NodePropertyIndicator, Value: value, Origin: org, Position: pos, } }, FloatTag: func(value, org string, pos *Position) *Token { return &Token{ Type: TagType, CharacterType: CharacterTypeIndicator, Indicator: NodePropertyIndicator, Value: value, Origin: org, Position: pos, } }, NullTag: func(value, org string, pos *Position) *Token { return &Token{ Type: TagType, CharacterType: CharacterTypeIndicator, Indicator: NodePropertyIndicator, Value: value, Origin: org, Position: pos, } }, SequenceTag: func(value, org string, pos *Position) *Token { return &Token{ Type: TagType, CharacterType: CharacterTypeIndicator, Indicator: NodePropertyIndicator, Value: value, Origin: org, Position: pos, } }, MappingTag: func(value, org string, pos *Position) *Token { return &Token{ Type: TagType, CharacterType: CharacterTypeIndicator, Indicator: NodePropertyIndicator, Value: value, Origin: org, Position: pos, } }, StringTag: func(value, org string, pos *Position) *Token { return &Token{ Type: TagType, CharacterType: CharacterTypeIndicator, Indicator: NodePropertyIndicator, Value: value, Origin: org, Position: pos, } }, BinaryTag: func(value, org string, pos *Position) *Token { return &Token{ Type: TagType, CharacterType: CharacterTypeIndicator, Indicator: NodePropertyIndicator, Value: value, Origin: org, Position: pos, } }, OrderedMapTag: func(value, org string, pos *Position) *Token { return &Token{ Type: TagType, CharacterType: CharacterTypeIndicator, Indicator: NodePropertyIndicator, Value: value, Origin: org, Position: pos, } }, SetTag: func(value, org string, pos *Position) *Token { return &Token{ Type: TagType, CharacterType: CharacterTypeIndicator, Indicator: NodePropertyIndicator, Value: value, Origin: org, Position: pos, } }, TimestampTag: func(value, org string, pos *Position) *Token { return &Token{ Type: TagType, CharacterType: CharacterTypeIndicator, Indicator: NodePropertyIndicator, Value: value, Origin: org, Position: pos, } }, } ) type numType int const ( numTypeNone numType = iota numTypeBinary numTypeOctet numTypeHex numTypeFloat ) type numStat struct { isNum bool typ numType } func getNumberStat(str string) *numStat { stat := &numStat{} if str == "" { return stat } if str == "-" || str == "." || str == "+" || str == "_" { return stat } if str[0] == '_' { return stat } dotFound := false isNegative := false isExponent := false if str[0] == '-' { isNegative = true } for idx, c := range str { switch c { case 'x': if (isNegative && idx == 2) || (!isNegative && idx == 1) { continue } case 'o': if (isNegative && idx == 2) || (!isNegative && idx == 1) { continue } case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': continue case 'a', 'b', 'c', 'd', 'e', 'f', 'A', 'B', 'C', 'D', 'E', 'F': if (len(str) > 2 && str[0] == '0' && str[1] == 'x') || (len(str) > 3 && isNegative && str[1] == '0' && str[2] == 'x') { // hex number continue } if c == 'b' && ((isNegative && idx == 2) || (!isNegative && idx == 1)) { // binary number continue } if (c == 'e' || c == 'E') && dotFound { // exponent isExponent = true continue } case '.': if dotFound { // multiple dot return stat } dotFound = true continue case '-': if idx == 0 || isExponent { continue } case '+': if idx == 0 || isExponent { continue } case '_': continue } return stat } stat.isNum = true switch { case dotFound: stat.typ = numTypeFloat case strings.HasPrefix(str, "0b") || strings.HasPrefix(str, "-0b"): stat.typ = numTypeBinary case strings.HasPrefix(str, "0x") || strings.HasPrefix(str, "-0x"): stat.typ = numTypeHex case strings.HasPrefix(str, "0o") || strings.HasPrefix(str, "-0o"): stat.typ = numTypeOctet case (len(str) > 1 && str[0] == '0') || (len(str) > 1 && str[0] == '-' && str[1] == '0'): stat.typ = numTypeOctet } return stat } func looksLikeTimeValue(value string) bool { for i, c := range value { switch c { case ':', '1', '2', '3', '4', '5', '6', '7', '8', '9': continue case '0': if i == 0 { return false } continue } return false } return true } // IsNeedQuoted whether need quote for passed string or not func IsNeedQuoted(value string) bool { if value == "" { return true } if _, exists := reservedEncKeywordMap[value]; exists { return true } if stat := getNumberStat(value); stat.isNum { return true } first := value[0] switch first { case '*', '&', '[', '{', '}', ']', ',', '!', '|', '>', '%', '\'', '"', '@': return true } last := value[len(value)-1] switch last { case ':': return true } if looksLikeTimeValue(value) { return true } for i, c := range value { switch c { case '#', '\\': return true case ':': if i+1 < len(value) && value[i+1] == ' ' { return true } } } return false } // LiteralBlockHeader detect literal block scalar header func LiteralBlockHeader(value string) string { lbc := DetectLineBreakCharacter(value) switch { case !strings.Contains(value, lbc): return "" case strings.HasSuffix(value, fmt.Sprintf("%s%s", lbc, lbc)): return "|+" case strings.HasSuffix(value, lbc): return "|" default: return "|-" } } // New create reserved keyword token or number token and other string token func New(value string, org string, pos *Position) *Token { fn := reservedKeywordMap[value] if fn != nil { return fn(value, org, pos) } if stat := getNumberStat(value); stat.isNum { tk := &Token{ Type: IntegerType, CharacterType: CharacterTypeMiscellaneous, Indicator: NotIndicator, Value: value, Origin: org, Position: pos, } switch stat.typ { case numTypeFloat: tk.Type = FloatType case numTypeBinary: tk.Type = BinaryIntegerType case numTypeOctet: tk.Type = OctetIntegerType case numTypeHex: tk.Type = HexIntegerType } return tk } return String(value, org, pos) } // Position type for position in YAML document type Position struct { Line int Column int Offset int IndentNum int IndentLevel int } // String position to text func (p *Position) String() string { return fmt.Sprintf("[level:%d,line:%d,column:%d,offset:%d]", p.IndentLevel, p.Line, p.Column, p.Offset) } // Token type for token type Token struct { Type Type CharacterType CharacterType Indicator Indicator Value string Origin string Position *Position Next *Token Prev *Token } // PreviousType previous token type func (t *Token) PreviousType() Type { if t.Prev != nil { return t.Prev.Type } return UnknownType } // NextType next token type func (t *Token) NextType() Type { if t.Next != nil { return t.Next.Type } return UnknownType } // AddColumn append column number to current position of column func (t *Token) AddColumn(col int) { if t == nil { return } t.Position.Column += col } // Clone copy token ( preserve Prev/Next reference ) func (t *Token) Clone() *Token { if t == nil { return nil } copied := *t if t.Position != nil { pos := *(t.Position) copied.Position = &pos } return &copied } // Tokens type of token collection type Tokens []*Token func (t *Tokens) add(tk *Token) { tokens := *t if len(tokens) == 0 { tokens = append(tokens, tk) } else { last := tokens[len(tokens)-1] last.Next = tk tk.Prev = last tokens = append(tokens, tk) } *t = tokens } // Add append new some tokens func (t *Tokens) Add(tks ...*Token) { for _, tk := range tks { t.add(tk) } } // Dump dump all token structures for debugging func (t Tokens) Dump() { for _, tk := range t { fmt.Printf("- %+v\n", tk) } } // String create token for String func String(value string, org string, pos *Position) *Token { return &Token{ Type: StringType, CharacterType: CharacterTypeMiscellaneous, Indicator: NotIndicator, Value: value, Origin: org, Position: pos, } } // SequenceEntry create token for SequenceEntry func SequenceEntry(org string, pos *Position) *Token { return &Token{ Type: SequenceEntryType, CharacterType: CharacterTypeIndicator, Indicator: BlockStructureIndicator, Value: string(SequenceEntryCharacter), Origin: org, Position: pos, } } // MappingKey create token for MappingKey func MappingKey(pos *Position) *Token { return &Token{ Type: MappingKeyType, CharacterType: CharacterTypeIndicator, Indicator: BlockStructureIndicator, Value: string(MappingKeyCharacter), Origin: string(MappingKeyCharacter), Position: pos, } } // MappingValue create token for MappingValue func MappingValue(pos *Position) *Token { return &Token{ Type: MappingValueType, CharacterType: CharacterTypeIndicator, Indicator: BlockStructureIndicator, Value: string(MappingValueCharacter), Origin: string(MappingValueCharacter), Position: pos, } } // CollectEntry create token for CollectEntry func CollectEntry(org string, pos *Position) *Token { return &Token{ Type: CollectEntryType, CharacterType: CharacterTypeIndicator, Indicator: FlowCollectionIndicator, Value: string(CollectEntryCharacter), Origin: org, Position: pos, } } // SequenceStart create token for SequenceStart func SequenceStart(org string, pos *Position) *Token { return &Token{ Type: SequenceStartType, CharacterType: CharacterTypeIndicator, Indicator: FlowCollectionIndicator, Value: string(SequenceStartCharacter), Origin: org, Position: pos, } } // SequenceEnd create token for SequenceEnd func SequenceEnd(org string, pos *Position) *Token { return &Token{ Type: SequenceEndType, CharacterType: CharacterTypeIndicator, Indicator: FlowCollectionIndicator, Value: string(SequenceEndCharacter), Origin: org, Position: pos, } } // MappingStart create token for MappingStart func MappingStart(org string, pos *Position) *Token { return &Token{ Type: MappingStartType, CharacterType: CharacterTypeIndicator, Indicator: FlowCollectionIndicator, Value: string(MappingStartCharacter), Origin: org, Position: pos, } } // MappingEnd create token for MappingEnd func MappingEnd(org string, pos *Position) *Token { return &Token{ Type: MappingEndType, CharacterType: CharacterTypeIndicator, Indicator: FlowCollectionIndicator, Value: string(MappingEndCharacter), Origin: org, Position: pos, } } // Comment create token for Comment func Comment(value string, org string, pos *Position) *Token { return &Token{ Type: CommentType, CharacterType: CharacterTypeIndicator, Indicator: CommentIndicator, Value: value, Origin: org, Position: pos, } } // Anchor create token for Anchor func Anchor(org string, pos *Position) *Token { return &Token{ Type: AnchorType, CharacterType: CharacterTypeIndicator, Indicator: NodePropertyIndicator, Value: string(AnchorCharacter), Origin: org, Position: pos, } } // Alias create token for Alias func Alias(org string, pos *Position) *Token { return &Token{ Type: AliasType, CharacterType: CharacterTypeIndicator, Indicator: NodePropertyIndicator, Value: string(AliasCharacter), Origin: org, Position: pos, } } // Tag create token for Tag func Tag(value string, org string, pos *Position) *Token { fn := ReservedTagKeywordMap[ReservedTagKeyword(value)] if fn != nil { return fn(value, org, pos) } return &Token{ Type: TagType, CharacterType: CharacterTypeIndicator, Indicator: NodePropertyIndicator, Value: value, Origin: org, Position: pos, } } // Literal create token for Literal func Literal(value string, org string, pos *Position) *Token { return &Token{ Type: LiteralType, CharacterType: CharacterTypeIndicator, Indicator: BlockScalarIndicator, Value: value, Origin: org, Position: pos, } } // Folded create token for Folded func Folded(value string, org string, pos *Position) *Token { return &Token{ Type: FoldedType, CharacterType: CharacterTypeIndicator, Indicator: BlockScalarIndicator, Value: value, Origin: org, Position: pos, } } // SingleQuote create token for SingleQuote func SingleQuote(value string, org string, pos *Position) *Token { return &Token{ Type: SingleQuoteType, CharacterType: CharacterTypeIndicator, Indicator: QuotedScalarIndicator, Value: value, Origin: org, Position: pos, } } // DoubleQuote create token for DoubleQuote func DoubleQuote(value string, org string, pos *Position) *Token { return &Token{ Type: DoubleQuoteType, CharacterType: CharacterTypeIndicator, Indicator: QuotedScalarIndicator, Value: value, Origin: org, Position: pos, } } // Directive create token for Directive func Directive(org string, pos *Position) *Token { return &Token{ Type: DirectiveType, CharacterType: CharacterTypeIndicator, Indicator: DirectiveIndicator, Value: string(DirectiveCharacter), Origin: org, Position: pos, } } // Space create token for Space func Space(pos *Position) *Token { return &Token{ Type: SpaceType, CharacterType: CharacterTypeWhiteSpace, Indicator: NotIndicator, Value: string(SpaceCharacter), Origin: string(SpaceCharacter), Position: pos, } } // MergeKey create token for MergeKey func MergeKey(org string, pos *Position) *Token { return &Token{ Type: MergeKeyType, CharacterType: CharacterTypeMiscellaneous, Indicator: NotIndicator, Value: "<<", Origin: org, Position: pos, } } // DocumentHeader create token for DocumentHeader func DocumentHeader(org string, pos *Position) *Token { return &Token{ Type: DocumentHeaderType, CharacterType: CharacterTypeMiscellaneous, Indicator: NotIndicator, Value: "---", Origin: org, Position: pos, } } // DocumentEnd create token for DocumentEnd func DocumentEnd(org string, pos *Position) *Token { return &Token{ Type: DocumentEndType, CharacterType: CharacterTypeMiscellaneous, Indicator: NotIndicator, Value: "...", Origin: org, Position: pos, } } // DetectLineBreakCharacter detect line break character in only one inside scalar content scope. func DetectLineBreakCharacter(src string) string { nc := strings.Count(src, "\n") rc := strings.Count(src, "\r") rnc := strings.Count(src, "\r\n") switch { case nc == rnc && rc == rnc: return "\r\n" case rc > nc: return "\r" default: return "\n" } } ================================================ FILE: vendor/github.com/goccy/go-yaml/validate.go ================================================ package yaml // StructValidator need to implement Struct method only // ( see https://pkg.go.dev/github.com/go-playground/validator/v10#Validate.Struct ) type StructValidator interface { Struct(interface{}) error } // FieldError need to implement StructField method only // ( see https://pkg.go.dev/github.com/go-playground/validator/v10#FieldError ) type FieldError interface { StructField() string } ================================================ FILE: vendor/github.com/goccy/go-yaml/yaml.go ================================================ package yaml import ( "bytes" "context" "io" "reflect" "sync" "github.com/goccy/go-yaml/ast" "github.com/goccy/go-yaml/internal/errors" "golang.org/x/xerrors" ) // BytesMarshaler 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 BytesMarshaler interface { MarshalYAML() ([]byte, error) } // BytesMarshalerContext interface use BytesMarshaler with context.Context. type BytesMarshalerContext interface { MarshalYAML(context.Context) ([]byte, error) } // InterfaceMarshaler interface has MarshalYAML compatible with github.com/go-yaml/yaml package. type InterfaceMarshaler interface { MarshalYAML() (interface{}, error) } // InterfaceMarshalerContext interface use InterfaceMarshaler with context.Context. type InterfaceMarshalerContext interface { MarshalYAML(context.Context) (interface{}, error) } // BytesUnmarshaler interface may be implemented by types to customize their // behavior when being unmarshaled from a YAML document. type BytesUnmarshaler interface { UnmarshalYAML([]byte) error } // BytesUnmarshalerContext interface use BytesUnmarshaler with context.Context. type BytesUnmarshalerContext interface { UnmarshalYAML(context.Context, []byte) error } // InterfaceUnmarshaler interface has UnmarshalYAML compatible with github.com/go-yaml/yaml package. type InterfaceUnmarshaler interface { UnmarshalYAML(func(interface{}) error) error } // InterfaceUnmarshalerContext interface use InterfaceUnmarshaler with context.Context. type InterfaceUnmarshalerContext interface { UnmarshalYAML(context.Context, func(interface{}) error) error } // MapItem is an item in a MapSlice. type MapItem struct { Key, Value interface{} } // MapSlice encodes and decodes as a YAML map. // The order of keys is preserved when encoding and decoding. type MapSlice []MapItem // ToMap convert to map[interface{}]interface{}. func (s MapSlice) ToMap() map[interface{}]interface{} { v := map[interface{}]interface{}{} for _, item := range s { v[item.Key] = item.Value } return v } // 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 marshalled if they are exported (have an upper case // first letter), and are marshalled 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. // Zero valued structs will be omitted if all their public // fields are zero, unless they implement an IsZero // method (see the IsZeroer interface type), in which // case the field will be included if that method returns true. // // 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. // // anchor Marshal with anchor. If want to define anchor name explicitly, use anchor=name style. // Otherwise, if used 'anchor' name only, used the field name lowercased as the anchor name // // alias Marshal with alias. If want to define alias name explicitly, use alias=name style. // Otherwise, If omitted alias name and the field type is pointer type, // assigned anchor name automatically from same pointer address. // // In addition, if the key is "-", the field is ignored. // // For example: // // type T struct { // F int `yaml:"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(v interface{}) ([]byte, error) { return MarshalWithOptions(v) } // MarshalWithOptions serializes the value provided into a YAML document with EncodeOptions. func MarshalWithOptions(v interface{}, opts ...EncodeOption) ([]byte, error) { return MarshalContext(context.Background(), v, opts...) } // MarshalContext serializes the value provided into a YAML document with context.Context and EncodeOptions. func MarshalContext(ctx context.Context, v interface{}, opts ...EncodeOption) ([]byte, error) { var buf bytes.Buffer if err := NewEncoder(&buf, opts...).EncodeContext(ctx, v); err != nil { return nil, errors.Wrapf(err, "failed to marshal") } return buf.Bytes(), nil } // ValueToNode convert from value to ast.Node. func ValueToNode(v interface{}, opts ...EncodeOption) (ast.Node, error) { var buf bytes.Buffer node, err := NewEncoder(&buf, opts...).EncodeToNode(v) if err != nil { return nil, errors.Wrapf(err, "failed to convert value to node") } return node, nil } // Unmarshal decodes the first document found within the in byte slice // and assigns decoded values into the out 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(data []byte, v interface{}) error { return UnmarshalWithOptions(data, v) } // UnmarshalWithOptions decodes with DecodeOptions the first document found within the in byte slice // and assigns decoded values into the out value. func UnmarshalWithOptions(data []byte, v interface{}, opts ...DecodeOption) error { return UnmarshalContext(context.Background(), data, v, opts...) } // UnmarshalContext decodes with context.Context and DecodeOptions. func UnmarshalContext(ctx context.Context, data []byte, v interface{}, opts ...DecodeOption) error { dec := NewDecoder(bytes.NewBuffer(data), opts...) if err := dec.DecodeContext(ctx, v); err != nil { if err == io.EOF { return nil } return errors.Wrapf(err, "failed to unmarshal") } return nil } // NodeToValue converts node to the value pointed to by v. func NodeToValue(node ast.Node, v interface{}, opts ...DecodeOption) error { var buf bytes.Buffer if err := NewDecoder(&buf, opts...).DecodeFromNode(node, v); err != nil { return errors.Wrapf(err, "failed to convert node to value") } return nil } // FormatError is a utility function that takes advantage of the metadata // stored in the errors returned by this package's parser. // // If the second argument `colored` is true, the error message is colorized. // If the third argument `inclSource` is true, the error message will // contain snippets of the YAML source that was used. func FormatError(e error, colored, inclSource bool) string { var pp errors.PrettyPrinter if xerrors.As(e, &pp) { var buf bytes.Buffer pp.PrettyPrint(&errors.Sink{&buf}, colored, inclSource) return buf.String() } return e.Error() } // YAMLToJSON convert YAML bytes to JSON. func YAMLToJSON(bytes []byte) ([]byte, error) { var v interface{} if err := UnmarshalWithOptions(bytes, &v, UseOrderedMap()); err != nil { return nil, errors.Wrapf(err, "failed to unmarshal") } out, err := MarshalWithOptions(v, JSON()) if err != nil { return nil, errors.Wrapf(err, "failed to marshal with json option") } return out, nil } // JSONToYAML convert JSON bytes to YAML. func JSONToYAML(bytes []byte) ([]byte, error) { var v interface{} if err := UnmarshalWithOptions(bytes, &v, UseOrderedMap()); err != nil { return nil, errors.Wrapf(err, "failed to unmarshal from json bytes") } out, err := Marshal(v) if err != nil { return nil, errors.Wrapf(err, "failed to marshal") } return out, nil } var ( globalCustomMarshalerMu sync.Mutex globalCustomUnmarshalerMu sync.Mutex globalCustomMarshalerMap = map[reflect.Type]func(interface{}) ([]byte, error){} globalCustomUnmarshalerMap = map[reflect.Type]func(interface{}, []byte) error{} ) // RegisterCustomMarshaler overrides any encoding process for the type specified in generics. // If you want to switch the behavior for each encoder, use `CustomMarshaler` defined as EncodeOption. // // NOTE: If type T implements MarshalYAML for pointer receiver, the type specified in RegisterCustomMarshaler must be *T. // If RegisterCustomMarshaler and CustomMarshaler of EncodeOption are specified for the same type, // the CustomMarshaler specified in EncodeOption takes precedence. func RegisterCustomMarshaler[T any](marshaler func(T) ([]byte, error)) { globalCustomMarshalerMu.Lock() defer globalCustomMarshalerMu.Unlock() var typ T globalCustomMarshalerMap[reflect.TypeOf(typ)] = func(v interface{}) ([]byte, error) { return marshaler(v.(T)) } } // RegisterCustomUnmarshaler overrides any decoding process for the type specified in generics. // If you want to switch the behavior for each decoder, use `CustomUnmarshaler` defined as DecodeOption. // // NOTE: If RegisterCustomUnmarshaler and CustomUnmarshaler of DecodeOption are specified for the same type, // the CustomUnmarshaler specified in DecodeOption takes precedence. func RegisterCustomUnmarshaler[T any](unmarshaler func(*T, []byte) error) { globalCustomUnmarshalerMu.Lock() defer globalCustomUnmarshalerMu.Unlock() var typ *T globalCustomUnmarshalerMap[reflect.TypeOf(typ)] = func(v interface{}, b []byte) error { return unmarshaler(v.(*T), b) } } ================================================ FILE: vendor/github.com/gookit/color/.gitignore ================================================ *.log *.swp .idea *.patch ### Go template # Binaries for programs and plugins *.exe *.exe~ *.dll *.so *.dylib # Test binary, build with `go test -c` *.test # Output of the go coverage tool, specifically when used with LiteIDE *.out .DS_Store app demo ================================================ FILE: vendor/github.com/gookit/color/LICENSE ================================================ The MIT License (MIT) Copyright (c) 2016 inhere 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. ================================================ FILE: vendor/github.com/gookit/color/README.md ================================================ # CLI Color ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/gookit/color?style=flat-square) [![Actions Status](https://github.com/gookit/color/workflows/action-tests/badge.svg)](https://github.com/gookit/color/actions) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/51b28c5f7ffe4cc2b0f12ecf25ed247f)](https://app.codacy.com/app/inhere/color) [![GoDoc](https://godoc.org/github.com/gookit/color?status.svg)](https://pkg.go.dev/github.com/gookit/color?tab=overview) [![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/gookit/color)](https://github.com/gookit/color) [![Build Status](https://travis-ci.org/gookit/color.svg?branch=master)](https://travis-ci.org/gookit/color) [![Coverage Status](https://coveralls.io/repos/github/gookit/color/badge.svg?branch=master)](https://coveralls.io/github/gookit/color?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/gookit/color)](https://goreportcard.com/report/github.com/gookit/color) A command-line color library with true color support, universal API methods and Windows support. > **[中文说明](README.zh-CN.md)** Basic color preview: ![basic-color](_examples/images/basic-color2.png) Now, 256 colors and RGB colors have also been supported to work in Windows CMD and PowerShell: ![color-on-cmd-pwsh](_examples/images/color-on-cmd-pwsh.jpg) ## Features - Simple to use, zero dependencies - Supports rich color output: 16-color (4-bit), 256-color (8-bit), true color (24-bit, RGB) - 16-color output is the most commonly used and most widely supported, working on any Windows version - Since `v1.2.4` **the 256-color (8-bit), true color (24-bit) support windows CMD and PowerShell** - See [this gist](https://gist.github.com/XVilka/8346728) for information on true color support - Support converts `HEX` `HSL` value to RGB color - Generic API methods: `Print`, `Printf`, `Println`, `Sprint`, `Sprintf` - Supports HTML tag-style color rendering, such as `message`. - In addition to using built-in tags, it also supports custom color attributes - Custom color attributes support the use of 16 color names, 256 color values, rgb color values and hex color values - Support working on Windows `cmd` and `powerShell` terminal - Basic colors: `Bold`, `Black`, `White`, `Gray`, `Red`, `Green`, `Yellow`, `Blue`, `Magenta`, `Cyan` - Additional styles: `Info`, `Note`, `Light`, `Error`, `Danger`, `Notice`, `Success`, `Comment`, `Primary`, `Warning`, `Question`, `Secondary` - Support by set `NO_COLOR` for disable color or use `FORCE_COLOR` for force open color render. - Support Rgb, 256, 16 color conversion ## GoDoc - [godoc for gopkg](https://pkg.go.dev/gopkg.in/gookit/color.v1) - [godoc for github](https://pkg.go.dev/github.com/gookit/color) ## Install ```bash go get github.com/gookit/color ``` ## Quick start ```go package main import ( "fmt" "github.com/gookit/color" ) func main() { // quick use package func color.Redp("Simple to use color") color.Redln("Simple to use color") color.Greenp("Simple to use color\n") color.Cyanln("Simple to use color") color.Yellowln("Simple to use color") // quick use like fmt.Print* color.Red.Println("Simple to use color") color.Green.Print("Simple to use color\n") color.Cyan.Printf("Simple to use %s\n", "color") color.Yellow.Printf("Simple to use %s\n", "color") // use like func red := color.FgRed.Render green := color.FgGreen.Render fmt.Printf("%s line %s library\n", red("Command"), green("color")) // custom color color.New(color.FgWhite, color.BgBlack).Println("custom color style") // can also: color.Style{color.FgCyan, color.OpBold}.Println("custom color style") // internal theme/style: color.Info.Tips("message") color.Info.Prompt("message") color.Info.Println("message") color.Warn.Println("message") color.Error.Println("message") // use style tag color.Print("hello, welcome\n") // Custom label attr: Supports the use of 16 color names, 256 color values, rgb color values and hex color values color.Println("hello, welcome") // apply a style tag color.Tag("info").Println("info style text") // prompt message color.Info.Prompt("prompt style message") color.Warn.Prompt("prompt style message") // tips message color.Info.Tips("tips style message") color.Warn.Tips("tips style message") } ``` Run demo: `go run ./_examples/demo.go` ![colored-out](_examples/images/color-demo.jpg) ## Basic/16 color Supported on any Windows version. Provide generic API methods: `Print`, `Printf`, `Println`, `Sprint`, `Sprintf` ```go color.Bold.Println("bold message") color.Black.Println("bold message") color.White.Println("bold message") color.Gray.Println("bold message") color.Red.Println("yellow message") color.Blue.Println("yellow message") color.Cyan.Println("yellow message") color.Yellow.Println("yellow message") color.Magenta.Println("yellow message") // Only use foreground color color.FgCyan.Printf("Simple to use %s\n", "color") // Only use background color color.BgRed.Printf("Simple to use %s\n", "color") ``` Run demo: `go run ./_examples/color_16.go` ![basic-color](_examples/images/basic-color.png) ### Custom build color ```go // Full custom: foreground, background, option myStyle := color.New(color.FgWhite, color.BgBlack, color.OpBold) myStyle.Println("custom color style") // can also: color.Style{color.FgCyan, color.OpBold}.Println("custom color style") ``` custom set console settings: ```go // set console color color.Set(color.FgCyan) // print message fmt.Print("message") // reset console settings color.Reset() ``` ### Additional styles provide generic API methods: `Print`, `Printf`, `Println`, `Sprint`, `Sprintf` print message use defined style: ```go color.Info.Println("Info message") color.Note.Println("Note message") color.Notice.Println("Notice message") color.Error.Println("Error message") color.Danger.Println("Danger message") color.Warn.Println("Warn message") color.Debug.Println("Debug message") color.Primary.Println("Primary message") color.Question.Println("Question message") color.Secondary.Println("Secondary message") ``` Run demo: `go run ./_examples/theme_basic.go` ![theme-basic](_examples/images/theme-basic.png) **Tips style** ```go color.Info.Tips("Info tips message") color.Note.Tips("Note tips message") color.Notice.Tips("Notice tips message") color.Error.Tips("Error tips message") color.Danger.Tips("Danger tips message") color.Warn.Tips("Warn tips message") color.Debug.Tips("Debug tips message") color.Primary.Tips("Primary tips message") color.Question.Tips("Question tips message") color.Secondary.Tips("Secondary tips message") ``` Run demo: `go run ./_examples/theme_tips.go` ![theme-tips](_examples/images/theme-tips.png) **Prompt Style** ```go color.Info.Prompt("Info prompt message") color.Note.Prompt("Note prompt message") color.Notice.Prompt("Notice prompt message") color.Error.Prompt("Error prompt message") color.Danger.Prompt("Danger prompt message") color.Warn.Prompt("Warn prompt message") color.Debug.Prompt("Debug prompt message") color.Primary.Prompt("Primary prompt message") color.Question.Prompt("Question prompt message") color.Secondary.Prompt("Secondary prompt message") ``` Run demo: `go run ./_examples/theme_prompt.go` ![theme-prompt](_examples/images/theme-prompt.png) **Block Style** ```go color.Info.Block("Info block message") color.Note.Block("Note block message") color.Notice.Block("Notice block message") color.Error.Block("Error block message") color.Danger.Block("Danger block message") color.Warn.Block("Warn block message") color.Debug.Block("Debug block message") color.Primary.Block("Primary block message") color.Question.Block("Question block message") color.Secondary.Block("Secondary block message") ``` Run demo: `go run ./_examples/theme_block.go` ![theme-block](_examples/images/theme-block.png) ## 256-color usage > 256 colors support Windows CMD, PowerShell environment after `v1.2.4` ### Set the foreground or background color - `color.C256(val uint8, isBg ...bool) Color256` ```go c := color.C256(132) // fg color c.Println("message") c.Printf("format %s", "message") c := color.C256(132, true) // bg color c.Println("message") c.Printf("format %s", "message") ``` ### 256-color style Can be used to set foreground and background colors at the same time. - `S256(fgAndBg ...uint8) *Style256` ```go s := color.S256(32, 203) s.Println("message") s.Printf("format %s", "message") ``` with options: ```go s := color.S256(32, 203) s.SetOpts(color.Opts{color.OpBold}) s.Println("style with options") s.Printf("style with %s\n", "options") ``` Run demo: `go run ./_examples/color_256.go` ![color-tags](_examples/images/color-256.png) ## RGB/True color > RGB colors support Windows `CMD`, `PowerShell` environment after `v1.2.4` **Preview:** > Run demo: `Run demo: go run ./_examples/color_rgb.go` ![color-rgb](_examples/images/color-rgb.png) example: ```go color.RGB(30, 144, 255).Println("message. use RGB number") color.HEX("#1976D2").Println("blue-darken") color.HEX("#D50000", true).Println("red-accent. use HEX style") color.RGBStyleFromString("213,0,0").Println("red-accent. use RGB number") color.HEXStyle("eee", "D50000").Println("deep-purple color") ``` ### Set the foreground or background color - `color.RGB(r, g, b uint8, isBg ...bool) RGBColor` ```go c := color.RGB(30,144,255) // fg color c.Println("message") c.Printf("format %s", "message") c := color.RGB(30,144,255, true) // bg color c.Println("message") c.Printf("format %s", "message") ``` Create a style from an hexadecimal color string: - `color.HEX(hex string, isBg ...bool) RGBColor` ```go c := color.HEX("ccc") // can also: "cccccc" "#cccccc" c.Println("message") c.Printf("format %s", "message") c = color.HEX("aabbcc", true) // as bg color c.Println("message") c.Printf("format %s", "message") ``` ### RGB color style Can be used to set the foreground and background colors at the same time. - `color.NewRGBStyle(fg RGBColor, bg ...RGBColor) *RGBStyle` ```go s := color.NewRGBStyle(RGB(20, 144, 234), RGB(234, 78, 23)) s.Println("message") s.Printf("format %s", "message") ``` Create a style from an hexadecimal color string: - `color.HEXStyle(fg string, bg ...string) *RGBStyle` ```go s := color.HEXStyle("11aa23", "eee") s.Println("message") s.Printf("format %s", "message") ``` with options: ```go s := color.HEXStyle("11aa23", "eee") s.SetOpts(color.Opts{color.OpBold}) s.Println("style with options") s.Printf("style with %s\n", "options") ``` ## HTML-like tag usage **Supported** on Windows `cmd.exe` `PowerShell` . ```go // use style tag color.Print("hello, welcome") color.Println("hello") color.Println("hello") color.Println("hello") // custom color attributes color.Print("hello, welcome\n") // Custom label attr: Supports the use of 16 color names, 256 color values, rgb color values and hex color values color.Println("hello, welcome") ``` - `color.Tag` ```go // set a style tag color.Tag("info").Print("info style text") color.Tag("info").Printf("%s style text", "info") color.Tag("info").Println("info style text") ``` Run demo: `go run ./_examples/color_tag.go` ![color-tags](_examples/images/color-tags.png) ## Color convert Supports conversion between Rgb, 256, 16 colors, `Rgb <=> 256 <=> 16` ```go basic := color.Red basic.Println("basic color") c256 := color.Red.C256() c256.Println("256 color") c256.C16().Println("basic color") rgb := color.Red.RGB() rgb.Println("rgb color") rgb.C256().Println("256 color") ``` **More functions for convert to `RGBColor`**: - `func RGBFromSlice(rgb []uint8, isBg ...bool) RGBColor` - `func RGBFromString(rgb string, isBg ...bool) RGBColor` - `func HEX(hex string, isBg ...bool) RGBColor` - `func HSL(h, s, l float64, isBg ...bool) RGBColor` - `func HSLInt(h, s, l int, isBg ...bool) RGBColor` ## Func refer There are some useful functions reference - `Disable()` disable color render - `SetOutput(io.Writer)` custom set the colored text output writer - `ForceOpenColor()` force open color render - `Colors2code(colors ...Color) string` Convert colors to code. return like "32;45;3" - `ClearCode(str string) string` Use for clear color codes - `ClearTag(s string) string` clear all color html-tag for a string - `IsConsole(w io.Writer)` Determine whether w is one of stderr, stdout, stdin - `HexToRgb(hex string) (rgb []int)` Convert hex color string to RGB numbers - `RgbToHex(rgb []int) string` Convert RGB to hex code - More useful func please see https://pkg.go.dev/github.com/gookit/color ## Projects using color Check out these projects, which use https://github.com/gookit/color : - https://github.com/Delta456/box-cli-maker Make Highly Customized Boxes for your CLI - https://github.com/flipped-aurora/gin-vue-admin 基于gin+vue搭建的(中)后台系统框架 - https://github.com/JanDeDobbeleer/oh-my-posh A prompt theme engine for any shell. - https://github.com/jesseduffield/lazygit Simple terminal UI for git commands - https://github.com/olivia-ai/olivia 💁‍♀️Your new best friend powered by an artificial neural network - https://github.com/pterm/pterm PTerm is a modern Go module to beautify console output. Featuring charts, progressbars, tables, trees, etc. - https://github.com/securego/gosec Golang security checker - https://github.com/TNK-Studio/lazykube ⎈ The lazier way to manage kubernetes. - [+ See More](https://pkg.go.dev/github.com/gookit/color?tab=importedby) ## Gookit packages - [gookit/ini](https://github.com/gookit/ini) Go config management, use INI files - [gookit/rux](https://github.com/gookit/rux) Simple and fast request router for golang HTTP - [gookit/gcli](https://github.com/gookit/gcli) build CLI application, tool library, running CLI commands - [gookit/slog](https://github.com/gookit/slog) Concise and extensible go log library - [gookit/event](https://github.com/gookit/event) Lightweight event manager and dispatcher implements by Go - [gookit/cache](https://github.com/gookit/cache) Generic cache use and cache manager for golang. support File, Memory, Redis, Memcached. - [gookit/config](https://github.com/gookit/config) Go config management. support JSON, YAML, TOML, INI, HCL, ENV and Flags - [gookit/color](https://github.com/gookit/color) A command-line color library with true color support, universal API methods and Windows support - [gookit/filter](https://github.com/gookit/filter) Provide filtering, sanitizing, and conversion of golang data - [gookit/validate](https://github.com/gookit/validate) Use for data validation and filtering. support Map, Struct, Form data - [gookit/goutil](https://github.com/gookit/goutil) Some utils for the Go: string, array/slice, map, format, cli, env, filesystem, test and more - More, please see https://github.com/gookit ## See also - [inhere/console](https://github.com/inhere/php-console) - [xo/terminfo](https://github.com/xo/terminfo) - [beego/bee](https://github.com/beego/bee) - [issue9/term](https://github.com/issue9/term) - [ANSI escape code](https://en.wikipedia.org/wiki/ANSI_escape_code) - [Standard ANSI color map](https://conemu.github.io/en/AnsiEscapeCodes.html#Standard_ANSI_color_map) - [Terminal Colors](https://gist.github.com/XVilka/8346728) ## License [MIT](/LICENSE) ================================================ FILE: vendor/github.com/gookit/color/README.zh-CN.md ================================================ # CLI Color ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/gookit/color?style=flat-square) [![Actions Status](https://github.com/gookit/color/workflows/action-tests/badge.svg)](https://github.com/gookit/color/actions) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/51b28c5f7ffe4cc2b0f12ecf25ed247f)](https://app.codacy.com/app/inhere/color) [![GoDoc](https://godoc.org/github.com/gookit/color?status.svg)](https://pkg.go.dev/github.com/gookit/color?tab=overview) [![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/gookit/color)](https://github.com/gookit/color) [![Build Status](https://travis-ci.org/gookit/color.svg?branch=master)](https://travis-ci.org/gookit/color) [![Coverage Status](https://coveralls.io/repos/github/gookit/color/badge.svg?branch=master)](https://coveralls.io/github/gookit/color?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/gookit/color)](https://goreportcard.com/report/github.com/gookit/color) Golang下的命令行色彩使用库, 拥有丰富的色彩渲染输出,通用的API方法,兼容Windows系统 > **[EN README](README.md)** 基本颜色预览: ![basic-color](_examples/images/basic-color2.png) 现在,256色和RGB色彩也已经支持windows CMD和PowerShell中工作: ![color-on-cmd-pwsh](_examples/images/color-on-cmd-pwsh.jpg) ## 功能特色 - 使用简单方便 - 支持丰富的颜色输出, 16色(4bit),256色(8bit),RGB色彩(24bit, RGB) - 16色(4bit)是最常用和支持最广的,支持Windows `cmd.exe` - 自 `v1.2.4` 起 **256色(8bit),RGB色彩(24bit)均支持Windows CMD和PowerShell终端** - 请查看 [this gist](https://gist.github.com/XVilka/8346728) 了解支持RGB色彩的终端 - 支持转换 `HEX` `HSL` 等为RGB色彩 - 提供通用的API方法:`Print` `Printf` `Println` `Sprint` `Sprintf` - 同时支持html标签式的颜色渲染,除了使用内置标签,同时支持自定义颜色属性 - 例如: `this an message` 标签内部的文本将会渲染为绿色字体 - 自定义颜色属性: 支持使用16色彩名称,256色彩值,rgb色彩值以及hex色彩值 - 基础色彩: `Bold` `Black` `White` `Gray` `Red` `Green` `Yellow` `Blue` `Magenta` `Cyan` - 扩展风格: `Info` `Note` `Light` `Error` `Danger` `Notice` `Success` `Comment` `Primary` `Warning` `Question` `Secondary` - 支持通过设置环境变量 `NO_COLOR` 来禁用色彩,或者使用 `FORCE_COLOR` 来强制使用色彩渲染. - 支持 Rgb, 256, 16 色彩之间的互相转换 - 支持Linux、Mac,同时兼容Windows系统环境 ## GoDoc - [godoc for gopkg](https://pkg.go.dev/gopkg.in/gookit/color.v1) - [godoc for github](https://pkg.go.dev/github.com/gookit/color) ## 安装 ```bash go get github.com/gookit/color ``` ## 快速开始 如下,引入当前包就可以快速的使用 ```go package main import ( "fmt" "github.com/gookit/color" ) func main() { // 简单快速的使用,跟 fmt.Print* 类似 color.Redp("Simple to use color") color.Redln("Simple to use color") color.Greenp("Simple to use color\n") color.Cyanln("Simple to use color") color.Yellowln("Simple to use color") // 简单快速的使用,跟 fmt.Print* 类似 color.Red.Println("Simple to use color") color.Green.Print("Simple to use color\n") color.Cyan.Printf("Simple to use %s\n", "color") color.Yellow.Printf("Simple to use %s\n", "color") // use like func red := color.FgRed.Render green := color.FgGreen.Render fmt.Printf("%s line %s library\n", red("Command"), green("color")) // 自定义颜色 color.New(color.FgWhite, color.BgBlack).Println("custom color style") // 也可以: color.Style{color.FgCyan, color.OpBold}.Println("custom color style") // internal style: color.Info.Println("message") color.Warn.Println("message") color.Error.Println("message") // 使用内置颜色标签 color.Print("hello, welcome\n") // 自定义标签: 支持使用16色彩名称,256色彩值,rgb色彩值以及hex色彩值 color.Println("hello, welcome") // apply a style tag color.Tag("info").Println("info style text") // prompt message color.Info.Prompt("prompt style message") color.Warn.Prompt("prompt style message") // tips message color.Info.Tips("tips style message") color.Warn.Tips("tips style message") } ``` > 运行 demo: `go run ./_examples/demo.go` ![colored-out](_examples/images/color-demo.jpg) ## 基础颜色(16-color) 提供通用的API方法:`Print` `Printf` `Println` `Sprint` `Sprintf` > 支持在windows `cmd.exe` `powerShell` 等终端使用 ```go color.Bold.Println("bold message") color.Black.Println("bold message") color.White.Println("bold message") color.Gray.Println("bold message") color.Red.Println("yellow message") color.Blue.Println("yellow message") color.Cyan.Println("yellow message") color.Yellow.Println("yellow message") color.Magenta.Println("yellow message") // Only use foreground color color.FgCyan.Printf("Simple to use %s\n", "color") // Only use background color color.BgRed.Printf("Simple to use %s\n", "color") ``` > 运行demo: `go run ./_examples/color_16.go` ![basic-color](_examples/images/basic-color.png) ### 构建风格 ```go // 仅设置前景色 color.FgCyan.Printf("Simple to use %s\n", "color") // 仅设置背景色 color.BgRed.Printf("Simple to use %s\n", "color") // 完全自定义: 前景色 背景色 选项 style := color.New(color.FgWhite, color.BgBlack, color.OpBold) style.Println("custom color style") // 也可以: color.Style{color.FgCyan, color.OpBold}.Println("custom color style") ``` 直接设置控制台属性: ```go // 设置console颜色 color.Set(color.FgCyan) // 输出信息 fmt.Print("message") // 重置console颜色 color.Reset() ``` > 当然,color已经内置丰富的色彩风格支持 ### 扩展风格方法 提供通用的API方法:`Print` `Printf` `Println` `Sprint` `Sprintf` > 支持在windows `cmd.exe` `powerShell` 等终端使用 基础使用: ```go // print message color.Info.Println("Info message") color.Note.Println("Note message") color.Notice.Println("Notice message") color.Error.Println("Error message") color.Danger.Println("Danger message") color.Warn.Println("Warn message") color.Debug.Println("Debug message") color.Primary.Println("Primary message") color.Question.Println("Question message") color.Secondary.Println("Secondary message") ``` Run demo: `go run ./_examples/theme_basic.go` ![theme-basic](_examples/images/theme-basic.png) **简约提示风格** ```go color.Info.Tips("Info tips message") color.Note.Tips("Note tips message") color.Notice.Tips("Notice tips message") color.Error.Tips("Error tips message") color.Danger.Tips("Danger tips message") color.Warn.Tips("Warn tips message") color.Debug.Tips("Debug tips message") color.Primary.Tips("Primary tips message") color.Question.Tips("Question tips message") color.Secondary.Tips("Secondary tips message") ``` Run demo: `go run ./_examples/theme_tips.go` ![theme-tips](_examples/images/theme-tips.png) **着重提示风格** ```go color.Info.Prompt("Info prompt message") color.Note.Prompt("Note prompt message") color.Notice.Prompt("Notice prompt message") color.Error.Prompt("Error prompt message") color.Danger.Prompt("Danger prompt message") ``` Run demo: `go run ./_examples/theme_prompt.go` ![theme-prompt](_examples/images/theme-prompt.png) **强调提示风格** ```go color.Warn.Block("Warn block message") color.Debug.Block("Debug block message") color.Primary.Block("Primary block message") color.Question.Block("Question block message") color.Secondary.Block("Secondary block message") ``` Run demo: `go run ./_examples/theme_block.go` ![theme-block](_examples/images/theme-block.png) ## 256 色彩使用 > 256色彩在 `v1.2.4` 后支持Windows CMD,PowerShell 环境 ### 使用前景或后景色 - `color.C256(val uint8, isBg ...bool) Color256` ```go c := color.C256(132) // fg color c.Println("message") c.Printf("format %s", "message") c := color.C256(132, true) // bg color c.Println("message") c.Printf("format %s", "message") ``` ### 使用256 色彩风格 > 可同时设置前景和背景色 - `color.S256(fgAndBg ...uint8) *Style256` ```go s := color.S256(32, 203) s.Println("message") s.Printf("format %s", "message") ``` 可以同时添加选项设置: ```go s := color.S256(32, 203) s.SetOpts(color.Opts{color.OpBold}) s.Println("style with options") s.Printf("style with %s\n", "options") ``` > 运行 demo: `go run ./_examples/color_256.go` ![color-tags](_examples/images/color-256.png) ## RGB/True色彩使用 > RGB色彩在 `v1.2.4` 后支持 Windows `CMD`, `PowerShell` 环境 **效果预览:** > 运行 demo: `Run demo: go run ./_examples/color_rgb.go` ![color-rgb](_examples/images/color-rgb.png) 代码示例: ```go color.RGB(30, 144, 255).Println("message. use RGB number") color.HEX("#1976D2").Println("blue-darken") color.HEX("#D50000", true).Println("red-accent. use HEX style") color.RGBStyleFromString("213,0,0").Println("red-accent. use RGB number") color.HEXStyle("eee", "D50000").Println("deep-purple color") ``` ### 使用前景或后景色 - `color.RGB(r, g, b uint8, isBg ...bool) RGBColor` ```go c := color.RGB(30,144,255) // fg color c.Println("message") c.Printf("format %s", "message") c := color.RGB(30,144,255, true) // bg color c.Println("message") c.Printf("format %s", "message") ``` - `color.HEX(hex string, isBg ...bool) RGBColor` 从16进制颜色创建 ```go c := color.HEX("ccc") // 也可以写为: "cccccc" "#cccccc" c.Println("message") c.Printf("format %s", "message") c = color.HEX("aabbcc", true) // as bg color c.Println("message") c.Printf("format %s", "message") ``` ### 使用RGB风格 > 可同时设置前景和背景色 - `color.NewRGBStyle(fg RGBColor, bg ...RGBColor) *RGBStyle` ```go s := color.NewRGBStyle(RGB(20, 144, 234), RGB(234, 78, 23)) s.Println("message") s.Printf("format %s", "message") ``` - `color.HEXStyle(fg string, bg ...string) *RGBStyle` 从16进制颜色创建 ```go s := color.HEXStyle("11aa23", "eee") s.Println("message") s.Printf("format %s", "message") ``` - 可以同时添加选项设置: ```go s := color.HEXStyle("11aa23", "eee") s.SetOpts(color.Opts{color.OpBold}) s.Println("style with options") s.Printf("style with %s\n", "options") ``` ## 使用颜色标签 > **支持** 在windows `cmd.exe` `PowerShell` 使用 使用内置的颜色标签,可以非常方便简单的构建自己需要的任何格式 > 同时支持自定义颜色属性: 支持使用16色彩名称,256色彩值,rgb色彩值以及hex色彩值 ```go // 使用内置的 color tag color.Print("hello, welcome") color.Println("hello") color.Println("hello") color.Println("hello") // 自定义颜色属性 color.Print("hello, welcome\n") // 自定义颜色属性: 支持使用16色彩名称,256色彩值,rgb色彩值以及hex色彩值 color.Println("hello, welcome") ``` - 使用 `color.Tag` 给后面输出的文本信息加上给定的颜色风格标签 ```go // set a style tag color.Tag("info").Print("info style text") color.Tag("info").Printf("%s style text", "info") color.Tag("info").Println("info style text") ``` > 运行 demo: `go run ./_examples/color_tag.go` ![color-tags](_examples/images/color-tags.png) ## 颜色转换 支持 Rgb, 256, 16 色彩之间的互相转换 `Rgb <=> 256 <=> 16` ```go basic := color.Red basic.Println("basic color") c256 := color.Red.C256() c256.Println("256 color") c256.C16().Println("basic color") rgb := color.Red.RGB() rgb.Println("rgb color") rgb.C256().Println("256 color") ``` **更多转换方法转换为 `RGBColor`**: - `func RGBFromSlice(rgb []uint8, isBg ...bool) RGBColor` - `func RGBFromString(rgb string, isBg ...bool) RGBColor` - `func HEX(hex string, isBg ...bool) RGBColor` - `func HSL(h, s, l float64, isBg ...bool) RGBColor` - `func HSLInt(h, s, l int, isBg ...bool) RGBColor` ## 方法参考 一些有用的工具方法参考 - `Disable()` disable color render - `SetOutput(io.Writer)` custom set the colored text output writer - `ForceOpenColor()` force open color render - `ClearCode(str string) string` Use for clear color codes - `Colors2code(colors ...Color) string` Convert colors to code. return like "32;45;3" - `ClearTag(s string) string` clear all color html-tag for a string - `IsConsole(w io.Writer)` Determine whether w is one of stderr, stdout, stdin - `HexToRgb(hex string) (rgb []int)` Convert hex color string to RGB numbers - `RgbToHex(rgb []int) string` Convert RGB to hex code - 更多请查看文档 https://pkg.go.dev/github.com/gookit/color ## 使用Color的项目 看看这些使用了 https://github.com/gookit/color 的项目: - https://github.com/Delta456/box-cli-maker Make Highly Customized Boxes for your CLI - https://github.com/flipped-aurora/gin-vue-admin 基于gin+vue搭建的(中)后台系统框架 - https://github.com/JanDeDobbeleer/oh-my-posh A prompt theme engine for any shell. - https://github.com/jesseduffield/lazygit Simple terminal UI for git commands - https://github.com/olivia-ai/olivia 💁‍♀️Your new best friend powered by an artificial neural network - https://github.com/pterm/pterm PTerm is a modern Go module to beautify console output. Featuring charts, progressbars, tables, trees, etc. - https://github.com/securego/gosec Golang security checker - https://github.com/TNK-Studio/lazykube ⎈ The lazier way to manage kubernetes. - [+ See More](https://pkg.go.dev/github.com/gookit/color?tab=importedby) ## Gookit 工具包 - [gookit/ini](https://github.com/gookit/ini) INI配置读取管理,支持多文件加载,数据覆盖合并, 解析ENV变量, 解析变量引用 - [gookit/rux](https://github.com/gookit/rux) Simple and fast request router for golang HTTP - [gookit/gcli](https://github.com/gookit/gcli) Go的命令行应用,工具库,运行CLI命令,支持命令行色彩,用户交互,进度显示,数据格式化显示 - [gookit/slog](https://github.com/gookit/slog) 简洁易扩展的go日志库 - [gookit/event](https://github.com/gookit/event) Go实现的轻量级的事件管理、调度程序库, 支持设置监听器的优先级, 支持对一组事件进行监听 - [gookit/cache](https://github.com/gookit/cache) 通用的缓存使用包装库,通过包装各种常用的驱动,来提供统一的使用API - [gookit/config](https://github.com/gookit/config) Go应用配置管理,支持多种格式(JSON, YAML, TOML, INI, HCL, ENV, Flags),多文件加载,远程文件加载,数据合并 - [gookit/color](https://github.com/gookit/color) CLI 控制台颜色渲染工具库, 拥有简洁的使用API,支持16色,256色,RGB色彩渲染输出 - [gookit/filter](https://github.com/gookit/filter) 提供对Golang数据的过滤,净化,转换 - [gookit/validate](https://github.com/gookit/validate) Go通用的数据验证与过滤库,使用简单,内置大部分常用验证、过滤器 - [gookit/goutil](https://github.com/gookit/goutil) Go 的一些工具函数,格式化,特殊处理,常用信息获取等 - 更多请查看 https://github.com/gookit ## 参考项目 - [inhere/console](https://github.com/inhere/php-console) - [xo/terminfo](https://github.com/xo/terminfo) - [beego/bee](https://github.com/beego/bee) - [issue9/term](https://github.com/issue9/term) - [ANSI转义序列](https://zh.wikipedia.org/wiki/ANSI转义序列) - [Standard ANSI color map](https://conemu.github.io/en/AnsiEscapeCodes.html#Standard_ANSI_color_map) - [Terminal Colors](https://gist.github.com/XVilka/8346728) ## License MIT ================================================ FILE: vendor/github.com/gookit/color/color.go ================================================ /* Package color is Command line color library. Support rich color rendering output, universal API method, compatible with Windows system Source code and other details for the project are available at GitHub: https://github.com/gookit/color More usage please see README and tests. */ package color import ( "fmt" "io" "os" "regexp" "github.com/xo/terminfo" ) // terminal color available level alias of the terminfo.ColorLevel* const ( LevelNo = terminfo.ColorLevelNone // not support color. Level16 = terminfo.ColorLevelBasic // 3/4 bit color supported Level256 = terminfo.ColorLevelHundreds // 8 bit color supported LevelRgb = terminfo.ColorLevelMillions // (24 bit)true color supported ) // color render templates // ESC 操作的表示: // "\033"(Octal 8进制) = "\x1b"(Hexadecimal 16进制) = 27 (10进制) const ( SettingTpl = "\x1b[%sm" FullColorTpl = "\x1b[%sm%s\x1b[0m" ) // ResetSet Close all properties. const ResetSet = "\x1b[0m" // CodeExpr regex to clear color codes eg "\033[1;36mText\x1b[0m" const CodeExpr = `\033\[[\d;?]+m` var ( // Enable switch color render and display // // NOTICE: // if ENV: NO_COLOR is not empty, will disable color render. Enable = os.Getenv("NO_COLOR") == "" // RenderTag render HTML tag on call color.Xprint, color.PrintX RenderTag = true // debug mode for development. // // set env: // COLOR_DEBUG_MODE=on // or: // COLOR_DEBUG_MODE=on go run ./_examples/envcheck.go debugMode = os.Getenv("COLOR_DEBUG_MODE") == "on" // inner errors record on detect color level innerErrs []error // output the default io.Writer message print output io.Writer = os.Stdout // mark current env, It's like in `cmd.exe` // if not in windows, it's always is False. isLikeInCmd bool // the color support level for current terminal // needVTP - need enable VTP, only for windows OS colorLevel, needVTP = detectTermColorLevel() // match color codes codeRegex = regexp.MustCompile(CodeExpr) // mark current env is support color. // Always: isLikeInCmd != supportColor // supportColor = IsSupportColor() ) // TermColorLevel value on current ENV func TermColorLevel() terminfo.ColorLevel { return colorLevel } // SupportColor on the current ENV func SupportColor() bool { return colorLevel > terminfo.ColorLevelNone } // Support16Color on the current ENV // func Support16Color() bool { // return colorLevel > terminfo.ColorLevelNone // } // Support256Color on the current ENV func Support256Color() bool { return colorLevel > terminfo.ColorLevelBasic } // SupportTrueColor on the current ENV func SupportTrueColor() bool { return colorLevel > terminfo.ColorLevelHundreds } /************************************************************* * global settings *************************************************************/ // Set set console color attributes func Set(colors ...Color) (int, error) { code := Colors2code(colors...) err := SetTerminal(code) return 0, err } // Reset reset console color attributes func Reset() (int, error) { err := ResetTerminal() return 0, err } // Disable disable color output func Disable() bool { oldVal := Enable Enable = false return oldVal } // NotRenderTag on call color.Xprint, color.PrintX func NotRenderTag() { RenderTag = false } // SetOutput set default colored text output func SetOutput(w io.Writer) { output = w } // ResetOutput reset output func ResetOutput() { output = os.Stdout } // ResetOptions reset all package option setting func ResetOptions() { RenderTag = true Enable = true output = os.Stdout } // ForceColor force open color render func ForceSetColorLevel(level terminfo.ColorLevel) terminfo.ColorLevel { oldLevelVal := colorLevel colorLevel = level return oldLevelVal } // ForceColor force open color render func ForceColor() terminfo.ColorLevel { return ForceOpenColor() } // ForceOpenColor force open color render func ForceOpenColor() terminfo.ColorLevel { // TODO should set level to ? return ForceSetColorLevel(terminfo.ColorLevelMillions) } // IsLikeInCmd check result // Deprecated func IsLikeInCmd() bool { return isLikeInCmd } // InnerErrs info func InnerErrs() []error { return innerErrs } /************************************************************* * render color code *************************************************************/ // RenderCode render message by color code. // Usage: // msg := RenderCode("3;32;45", "some", "message") func RenderCode(code string, args ...interface{}) string { var message string if ln := len(args); ln == 0 { return "" } message = fmt.Sprint(args...) if len(code) == 0 { return message } // disabled OR not support color if !Enable || !SupportColor() { return ClearCode(message) } return fmt.Sprintf(FullColorTpl, code, message) } // RenderWithSpaces Render code with spaces. // If the number of args is > 1, a space will be added between the args func RenderWithSpaces(code string, args ...interface{}) string { message := formatArgsForPrintln(args) if len(code) == 0 { return message } // disabled OR not support color if !Enable || !SupportColor() { return ClearCode(message) } return fmt.Sprintf(FullColorTpl, code, message) } // RenderString render a string with color code. // Usage: // msg := RenderString("3;32;45", "a message") func RenderString(code string, str string) string { if len(code) == 0 || str == "" { return str } // disabled OR not support color if !Enable || !SupportColor() { return ClearCode(str) } return fmt.Sprintf(FullColorTpl, code, str) } // ClearCode clear color codes. // eg: "\033[36;1mText\x1b[0m" -> "Text" func ClearCode(str string) string { return codeRegex.ReplaceAllString(str, "") } ================================================ FILE: vendor/github.com/gookit/color/color_16.go ================================================ package color import ( "fmt" "strconv" ) // Color Color16, 16 color value type // 3(2^3=8) OR 4(2^4=16) bite color. type Color uint8 type Basic = Color // alias of Color // Opts basic color options. code: 0 - 9 type Opts []Color // Add option value func (o *Opts) Add(ops ...Color) { for _, op := range ops { if uint8(op) < 10 { *o = append(*o, op) } } } // IsValid options func (o Opts) IsValid() bool { return len(o) > 0 } // IsEmpty options func (o Opts) IsEmpty() bool { return len(o) == 0 } // String options to string. eg: "1;3" func (o Opts) String() string { return Colors2code(o...) } /************************************************************* * Basic 16 color definition *************************************************************/ // Base value for foreground/background color // base: fg 30~37, bg 40~47 // light: fg 90~97, bg 100~107 const ( FgBase uint8 = 30 BgBase uint8 = 40 HiFgBase uint8 = 90 HiBgBase uint8 = 100 ) // Foreground colors. basic foreground colors 30 - 37 const ( FgBlack Color = iota + 30 FgRed FgGreen FgYellow FgBlue FgMagenta // 品红 FgCyan // 青色 FgWhite // FgDefault revert default FG FgDefault Color = 39 ) // Extra foreground color 90 - 97(非标准) const ( FgDarkGray Color = iota + 90 // 亮黑(灰) FgLightRed FgLightGreen FgLightYellow FgLightBlue FgLightMagenta FgLightCyan FgLightWhite // FgGray is alias of FgDarkGray FgGray Color = 90 // 亮黑(灰) ) // Background colors. basic background colors 40 - 47 const ( BgBlack Color = iota + 40 BgRed BgGreen BgYellow // BgBrown like yellow BgBlue BgMagenta BgCyan BgWhite // BgDefault revert default BG BgDefault Color = 49 ) // Extra background color 100 - 107(非标准) const ( BgDarkGray Color = iota + 100 BgLightRed BgLightGreen BgLightYellow BgLightBlue BgLightMagenta BgLightCyan BgLightWhite // BgGray is alias of BgDarkGray BgGray Color = 100 ) // Option settings const ( OpReset Color = iota // 0 重置所有设置 OpBold // 1 加粗 OpFuzzy // 2 模糊(不是所有的终端仿真器都支持) OpItalic // 3 斜体(不是所有的终端仿真器都支持) OpUnderscore // 4 下划线 OpBlink // 5 闪烁 OpFastBlink // 5 快速闪烁(未广泛支持) OpReverse // 7 颠倒的 交换背景色与前景色 OpConcealed // 8 隐匿的 OpStrikethrough // 9 删除的,删除线(未广泛支持) ) // There are basic and light foreground color aliases const ( Red = FgRed Cyan = FgCyan Gray = FgDarkGray // is light Black Blue = FgBlue Black = FgBlack Green = FgGreen White = FgWhite Yellow = FgYellow Magenta = FgMagenta // special Bold = OpBold Normal = FgDefault // extra light LightRed = FgLightRed LightCyan = FgLightCyan LightBlue = FgLightBlue LightGreen = FgLightGreen LightWhite = FgLightWhite LightYellow = FgLightYellow LightMagenta = FgLightMagenta HiRed = FgLightRed HiCyan = FgLightCyan HiBlue = FgLightBlue HiGreen = FgLightGreen HiWhite = FgLightWhite HiYellow = FgLightYellow HiMagenta = FgLightMagenta BgHiRed = BgLightRed BgHiCyan = BgLightCyan BgHiBlue = BgLightBlue BgHiGreen = BgLightGreen BgHiWhite = BgLightWhite BgHiYellow = BgLightYellow BgHiMagenta = BgLightMagenta ) // Bit4 an method for create Color func Bit4(code uint8) Color { return Color(code) } /************************************************************* * Color render methods *************************************************************/ // Name get color code name. func (c Color) Name() string { name, ok := basic2nameMap[uint8(c)] if ok { return name } return "unknown" } // Text render a text message func (c Color) Text(message string) string { return RenderString(c.String(), message) } // Render messages by color setting // Usage: // green := color.FgGreen.Render // fmt.Println(green("message")) func (c Color) Render(a ...interface{}) string { return RenderCode(c.String(), a...) } // Renderln messages by color setting. // like Println, will add spaces for each argument // Usage: // green := color.FgGreen.Renderln // fmt.Println(green("message")) func (c Color) Renderln(a ...interface{}) string { return RenderWithSpaces(c.String(), a...) } // Sprint render messages by color setting. is alias of the Render() func (c Color) Sprint(a ...interface{}) string { return RenderCode(c.String(), a...) } // Sprintf format and render message. // Usage: // green := color.Green.Sprintf // colored := green("message") func (c Color) Sprintf(format string, args ...interface{}) string { return RenderString(c.String(), fmt.Sprintf(format, args...)) } // Print messages. // Usage: // color.Green.Print("message") // OR: // green := color.FgGreen.Print // green("message") func (c Color) Print(args ...interface{}) { doPrintV2(c.Code(), fmt.Sprint(args...)) } // Printf format and print messages. // Usage: // color.Cyan.Printf("string %s", "arg0") func (c Color) Printf(format string, a ...interface{}) { doPrintV2(c.Code(), fmt.Sprintf(format, a...)) } // Println messages with new line func (c Color) Println(a ...interface{}) { doPrintlnV2(c.String(), a) } // Light current color. eg: 36(FgCyan) -> 96(FgLightCyan). // // Usage: // lightCyan := Cyan.Light() // lightCyan.Print("message") func (c Color) Light() Color { val := int(c) if val >= 30 && val <= 47 { return Color(uint8(c) + 60) } // don't change return c } // Darken current color. eg. 96(FgLightCyan) -> 36(FgCyan) // // Usage: // cyan := LightCyan.Darken() // cyan.Print("message") func (c Color) Darken() Color { val := int(c) if val >= 90 && val <= 107 { return Color(uint8(c) - 60) } // don't change return c } // C256 convert 16 color to 256-color code. func (c Color) C256() Color256 { val := uint8(c) if val < 10 { // is option code return emptyC256 // empty } var isBg uint8 if val >= BgBase && val <= 47 { // is bg isBg = AsBg val = val - 10 // to fg code } else if val >= HiBgBase && val <= 107 { // is hi bg isBg = AsBg val = val - 10 // to fg code } if c256, ok := basicTo256Map[val]; ok { return Color256{c256, isBg} } // use raw value direct convert return Color256{val} } // ToFg always convert fg func (c Color) ToFg() Color { val := uint8(c) // is option code, don't change if val < 10 { return c } return Color(Bg2Fg(val)) } // ToBg always convert bg func (c Color) ToBg() Color { val := uint8(c) // is option code, don't change if val < 10 { return c } return Color(Fg2Bg(val)) } // RGB convert 16 color to 256-color code. func (c Color) RGB() RGBColor { val := uint8(c) if val < 10 { // is option code return emptyRGBColor } return HEX(Basic2hex(val)) } // Code convert to code string. eg "35" func (c Color) Code() string { // return fmt.Sprintf("%d", c) return strconv.Itoa(int(c)) } // String convert to code string. eg "35" func (c Color) String() string { // return fmt.Sprintf("%d", c) return strconv.Itoa(int(c)) } // IsValid color value func (c Color) IsValid() bool { return c < 107 } /************************************************************* * basic color maps *************************************************************/ // FgColors foreground colors map var FgColors = map[string]Color{ "black": FgBlack, "red": FgRed, "green": FgGreen, "yellow": FgYellow, "blue": FgBlue, "magenta": FgMagenta, "cyan": FgCyan, "white": FgWhite, "default": FgDefault, } // BgColors background colors map var BgColors = map[string]Color{ "black": BgBlack, "red": BgRed, "green": BgGreen, "yellow": BgYellow, "blue": BgBlue, "magenta": BgMagenta, "cyan": BgCyan, "white": BgWhite, "default": BgDefault, } // ExFgColors extra foreground colors map var ExFgColors = map[string]Color{ "darkGray": FgDarkGray, "lightRed": FgLightRed, "lightGreen": FgLightGreen, "lightYellow": FgLightYellow, "lightBlue": FgLightBlue, "lightMagenta": FgLightMagenta, "lightCyan": FgLightCyan, "lightWhite": FgLightWhite, } // ExBgColors extra background colors map var ExBgColors = map[string]Color{ "darkGray": BgDarkGray, "lightRed": BgLightRed, "lightGreen": BgLightGreen, "lightYellow": BgLightYellow, "lightBlue": BgLightBlue, "lightMagenta": BgLightMagenta, "lightCyan": BgLightCyan, "lightWhite": BgLightWhite, } // Options color options map // Deprecated // NOTICE: please use AllOptions instead. var Options = AllOptions // AllOptions color options map var AllOptions = map[string]Color{ "reset": OpReset, "bold": OpBold, "fuzzy": OpFuzzy, "italic": OpItalic, "underscore": OpUnderscore, "blink": OpBlink, "reverse": OpReverse, "concealed": OpConcealed, } var ( // TODO basic name alias // basicNameAlias = map[string]string{} // basic color name to code name2basicMap = initName2basicMap() // basic2nameMap basic color code to name basic2nameMap = map[uint8]string{ 30: "black", 31: "red", 32: "green", 33: "yellow", 34: "blue", 35: "magenta", 36: "cyan", 37: "white", // hi color code 90: "lightBlack", 91: "lightRed", 92: "lightGreen", 93: "lightYellow", 94: "lightBlue", 95: "lightMagenta", 96: "lightCyan", 97: "lightWhite", // options 0: "reset", 1: "bold", 2: "fuzzy", 3: "italic", 4: "underscore", 5: "blink", 7: "reverse", 8: "concealed", } ) // Bg2Fg bg color value to fg value func Bg2Fg(val uint8) uint8 { if val >= BgBase && val <= 47 { // is bg val = val - 10 } else if val >= HiBgBase && val <= 107 { // is hi bg val = val - 10 } return val } // Fg2Bg fg color value to bg value func Fg2Bg(val uint8) uint8 { if val >= FgBase && val <= 37 { // is fg val = val + 10 } else if val >= HiFgBase && val <= 97 { // is hi fg val = val + 10 } return val } // Basic2nameMap data func Basic2nameMap() map[uint8]string { return basic2nameMap } func initName2basicMap() map[string]uint8 { n2b := make(map[string]uint8, len(basic2nameMap)) for u, s := range basic2nameMap { n2b[s] = u } return n2b } ================================================ FILE: vendor/github.com/gookit/color/color_256.go ================================================ package color import ( "fmt" "strconv" "strings" ) /* from wikipedia, 256 color: ESC[ … 38;5; … m选择前景色 ESC[ … 48;5; … m选择背景色 0- 7:标准颜色(同 ESC[30–37m) 8- 15:高强度颜色(同 ESC[90–97m) 16-231:6 × 6 × 6 立方(216色): 16 + 36 × r + 6 × g + b (0 ≤ r, g, b ≤ 5) 232-255:从黑到白的24阶灰度色 */ // tpl for 8 bit 256 color(`2^8`) // // format: // ESC[ … 38;5; … m // 选择前景色 // ESC[ … 48;5; … m // 选择背景色 // // example: // fg "\x1b[38;5;242m" // bg "\x1b[48;5;208m" // both "\x1b[38;5;242;48;5;208m" // // links: // https://zh.wikipedia.org/wiki/ANSI%E8%BD%AC%E4%B9%89%E5%BA%8F%E5%88%97#8位 const ( TplFg256 = "38;5;%d" TplBg256 = "48;5;%d" Fg256Pfx = "38;5;" Bg256Pfx = "48;5;" ) /************************************************************* * 8bit(256) Color: Bit8Color Color256 *************************************************************/ // Color256 256 color (8 bit), uint8 range at 0 - 255 // // 颜色值使用10进制和16进制都可 0x98 = 152 // // The color consists of two uint8: // 0: color value // 1: color type; Fg=0, Bg=1, >1: unset value // // example: // fg color: [152, 0] // bg color: [152, 1] // // NOTICE: now support 256 color on windows CMD, PowerShell // lint warn - Name starts with package name type Color256 [2]uint8 type Bit8Color = Color256 // alias var emptyC256 = Color256{1: 99} // Bit8 create a color256 func Bit8(val uint8, isBg ...bool) Color256 { return C256(val, isBg...) } // C256 create a color256 func C256(val uint8, isBg ...bool) Color256 { bc := Color256{val} // mark is bg color if len(isBg) > 0 && isBg[0] { bc[1] = AsBg } return bc } // Set terminal by 256 color code func (c Color256) Set() error { return SetTerminal(c.String()) } // Reset terminal. alias of the ResetTerminal() func (c Color256) Reset() error { return ResetTerminal() } // Print print message func (c Color256) Print(a ...interface{}) { doPrintV2(c.String(), fmt.Sprint(a...)) } // Printf format and print message func (c Color256) Printf(format string, a ...interface{}) { doPrintV2(c.String(), fmt.Sprintf(format, a...)) } // Println print message with newline func (c Color256) Println(a ...interface{}) { doPrintlnV2(c.String(), a) } // Sprint returns rendered message func (c Color256) Sprint(a ...interface{}) string { return RenderCode(c.String(), a...) } // Sprintf returns format and rendered message func (c Color256) Sprintf(format string, a ...interface{}) string { return RenderString(c.String(), fmt.Sprintf(format, a...)) } // C16 convert color-256 to 16 color. func (c Color256) C16() Color { return c.Basic() } // Basic convert color-256 to basic 16 color. func (c Color256) Basic() Color { return Color(c[0]) // TODO } // RGB convert color-256 to RGB color. func (c Color256) RGB() RGBColor { return RGBFromSlice(C256ToRgb(c[0]), c[1] == AsBg) } // RGBColor convert color-256 to RGB color. func (c Color256) RGBColor() RGBColor { return c.RGB() } // Value return color value func (c Color256) Value() uint8 { return c[0] } // Code convert to color code string. eg: "12" func (c Color256) Code() string { return strconv.Itoa(int(c[0])) } // FullCode convert to color code string with prefix. eg: "38;5;12" func (c Color256) FullCode() string { return c.String() } // String convert to color code string with prefix. eg: "38;5;12" func (c Color256) String() string { if c[1] == AsFg { // 0 is Fg // return fmt.Sprintf(TplFg256, c[0]) return Fg256Pfx + strconv.Itoa(int(c[0])) } if c[1] == AsBg { // 1 is Bg // return fmt.Sprintf(TplBg256, c[0]) return Bg256Pfx + strconv.Itoa(int(c[0])) } return "" // empty } // IsFg color func (c Color256) IsFg() bool { return c[1] == AsFg } // ToFg 256 color func (c Color256) ToFg() Color256 { c[1] = AsFg return c } // IsBg color func (c Color256) IsBg() bool { return c[1] == AsBg } // ToBg 256 color func (c Color256) ToBg() Color256 { c[1] = AsBg return c } // IsEmpty value func (c Color256) IsEmpty() bool { return c[1] > 1 } /************************************************************* * 8bit(256) Style *************************************************************/ // Style256 definition // // 前/背景色 // 都是由两位uint8组成, 第一位是色彩值; // 第二位与 Bit8Color 不一样的是,在这里表示是否设置了值 0 未设置 !=0 已设置 type Style256 struct { // p Printer // Name of the style Name string // color options of the style opts Opts // fg and bg color fg, bg Color256 } // S256 create a color256 style // Usage: // s := color.S256() // s := color.S256(132) // fg // s := color.S256(132, 203) // fg and bg func S256(fgAndBg ...uint8) *Style256 { s := &Style256{} vl := len(fgAndBg) if vl > 0 { // with fg s.fg = Color256{fgAndBg[0], 1} if vl > 1 { // and with bg s.bg = Color256{fgAndBg[1], 1} } } return s } // Set fg and bg color value, can also with color options func (s *Style256) Set(fgVal, bgVal uint8, opts ...Color) *Style256 { s.fg = Color256{fgVal, 1} s.bg = Color256{bgVal, 1} s.opts.Add(opts...) return s } // SetBg set bg color value func (s *Style256) SetBg(bgVal uint8) *Style256 { s.bg = Color256{bgVal, 1} return s } // SetFg set fg color value func (s *Style256) SetFg(fgVal uint8) *Style256 { s.fg = Color256{fgVal, 1} return s } // SetOpts set options func (s *Style256) SetOpts(opts Opts) *Style256 { s.opts = opts return s } // AddOpts add options func (s *Style256) AddOpts(opts ...Color) *Style256 { s.opts.Add(opts...) return s } // Print message func (s *Style256) Print(a ...interface{}) { doPrintV2(s.String(), fmt.Sprint(a...)) } // Printf format and print message func (s *Style256) Printf(format string, a ...interface{}) { doPrintV2(s.String(), fmt.Sprintf(format, a...)) } // Println print message with newline func (s *Style256) Println(a ...interface{}) { doPrintlnV2(s.String(), a) } // Sprint returns rendered message func (s *Style256) Sprint(a ...interface{}) string { return RenderCode(s.Code(), a...) } // Sprintf returns format and rendered message func (s *Style256) Sprintf(format string, a ...interface{}) string { return RenderString(s.Code(), fmt.Sprintf(format, a...)) } // Code convert to color code string func (s *Style256) Code() string { return s.String() } // String convert to color code string func (s *Style256) String() string { var ss []string if s.fg[1] > 0 { ss = append(ss, fmt.Sprintf(TplFg256, s.fg[0])) } if s.bg[1] > 0 { ss = append(ss, fmt.Sprintf(TplBg256, s.bg[0])) } if s.opts.IsValid() { ss = append(ss, s.opts.String()) } return strings.Join(ss, ";") } ================================================ FILE: vendor/github.com/gookit/color/color_rgb.go ================================================ package color import ( "fmt" "strconv" "strings" ) // 24 bit RGB color // RGB: // R 0-255 G 0-255 B 0-255 // R 00-FF G 00-FF B 00-FF (16进制) // // Format: // ESC[ … 38;2;;; … m // Select RGB foreground color // ESC[ … 48;2;;; … m // Choose RGB background color // // links: // https://zh.wikipedia.org/wiki/ANSI%E8%BD%AC%E4%B9%89%E5%BA%8F%E5%88%97#24位 // // example: // fg: \x1b[38;2;30;144;255mMESSAGE\x1b[0m // bg: \x1b[48;2;30;144;255mMESSAGE\x1b[0m // both: \x1b[38;2;233;90;203;48;2;30;144;255mMESSAGE\x1b[0m const ( TplFgRGB = "38;2;%d;%d;%d" TplBgRGB = "48;2;%d;%d;%d" FgRGBPfx = "38;2;" BgRGBPfx = "48;2;" ) // mark color is fg or bg. const ( AsFg uint8 = iota AsBg ) // values from https://github.com/go-terminfo/terminfo // var ( // RgbaBlack = image_color.RGBA{0, 0, 0, 255} // Red = color.RGBA{205, 0, 0, 255} // Green = color.RGBA{0, 205, 0, 255} // Orange = color.RGBA{205, 205, 0, 255} // Blue = color.RGBA{0, 0, 238, 255} // Magenta = color.RGBA{205, 0, 205, 255} // Cyan = color.RGBA{0, 205, 205, 255} // LightGrey = color.RGBA{229, 229, 229, 255} // // DarkGrey = color.RGBA{127, 127, 127, 255} // LightRed = color.RGBA{255, 0, 0, 255} // LightGreen = color.RGBA{0, 255, 0, 255} // Yellow = color.RGBA{255, 255, 0, 255} // LightBlue = color.RGBA{92, 92, 255, 255} // LightMagenta = color.RGBA{255, 0, 255, 255} // LightCyan = color.RGBA{0, 255, 255, 255} // White = color.RGBA{255, 255, 255, 255} // ) /************************************************************* * RGB Color(Bit24Color, TrueColor) *************************************************************/ // RGBColor definition. // // The first to third digits represent the color value. // The last digit represents the foreground(0), background(1), >1 is unset value // // Usage: // // 0, 1, 2 is R,G,B. // // 3rd: Fg=0, Bg=1, >1: unset value // RGBColor{30,144,255, 0} // RGBColor{30,144,255, 1} // // NOTICE: now support RGB color on Windows CMD, PowerShell type RGBColor [4]uint8 // create an empty RGBColor var emptyRGBColor = RGBColor{3: 99} // RGB color create. // Usage: // c := RGB(30,144,255) // c := RGB(30,144,255, true) // c.Print("message") func RGB(r, g, b uint8, isBg ...bool) RGBColor { rgb := RGBColor{r, g, b} if len(isBg) > 0 && isBg[0] { rgb[3] = AsBg } return rgb } // Rgb alias of the RGB() func Rgb(r, g, b uint8, isBg ...bool) RGBColor { return RGB(r, g, b, isBg...) } // Bit24 alias of the RGB() func Bit24(r, g, b uint8, isBg ...bool) RGBColor { return RGB(r, g, b, isBg...) } // RgbFromInt create instance from int r,g,b value func RgbFromInt(r, g, b int, isBg ...bool) RGBColor { return RGB(uint8(r), uint8(g), uint8(b), isBg...) } // RgbFromInts create instance from []int r,g,b value func RgbFromInts(rgb []int, isBg ...bool) RGBColor { return RGB(uint8(rgb[0]), uint8(rgb[1]), uint8(rgb[2]), isBg...) } // HEX create RGB color from a HEX color string. // // Usage: // c := HEX("ccc") // rgb: [204 204 204] // c := HEX("aabbcc") // rgb: [170 187 204] // c := HEX("#aabbcc") // c := HEX("0xaabbcc") // c.Print("message") func HEX(hex string, isBg ...bool) RGBColor { if rgb := HexToRgb(hex); len(rgb) > 0 { return RGB(uint8(rgb[0]), uint8(rgb[1]), uint8(rgb[2]), isBg...) } // mark is empty return emptyRGBColor } // Hex alias of the HEX() func Hex(hex string, isBg ...bool) RGBColor { return HEX(hex, isBg...) } // HSL create RGB color from a hsl value. // more see HslToRgb() func HSL(h, s, l float64, isBg ...bool) RGBColor { if rgb := HslToRgb(h, s, l); len(rgb) > 0 { return RGB(rgb[0], rgb[1], rgb[2], isBg...) } // mark is empty return emptyRGBColor } // Hsl alias of the HSL() func Hsl(h, s, l float64, isBg ...bool) RGBColor { return HSL(h, s, l, isBg...) } // HSLInt create RGB color from a hsl int value. // more see HslIntToRgb() func HSLInt(h, s, l int, isBg ...bool) RGBColor { if rgb := HslIntToRgb(h, s, l); len(rgb) > 0 { return RGB(rgb[0], rgb[1], rgb[2], isBg...) } // mark is empty return emptyRGBColor } // HslInt alias of the HSLInt() func HslInt(h, s, l int, isBg ...bool) RGBColor { return HSLInt(h, s, l, isBg...) } // RGBFromSlice quick RGBColor from slice func RGBFromSlice(rgb []uint8, isBg ...bool) RGBColor { return RGB(rgb[0], rgb[1], rgb[2], isBg...) } // RGBFromString create RGB color from a string. // support use color name in the {namedRgbMap} // // Usage: // c := RGBFromString("170,187,204") // c.Print("message") // // c := RGBFromString("brown") // c.Print("message with color brown") func RGBFromString(rgb string, isBg ...bool) RGBColor { // use color name in the {namedRgbMap} if rgbVal, ok := namedRgbMap[rgb]; ok { rgb = rgbVal } // use rgb string. ss := stringToArr(rgb, ",") if len(ss) != 3 { return emptyRGBColor } var ar [3]int for i, val := range ss { iv, err := strconv.Atoi(val) if err != nil { return emptyRGBColor } ar[i] = iv } return RGB(uint8(ar[0]), uint8(ar[1]), uint8(ar[2]), isBg...) } // Set terminal by rgb/true color code func (c RGBColor) Set() error { return SetTerminal(c.String()) } // Reset terminal. alias of the ResetTerminal() func (c RGBColor) Reset() error { return ResetTerminal() } // Print print message func (c RGBColor) Print(a ...interface{}) { doPrintV2(c.String(), fmt.Sprint(a...)) } // Printf format and print message func (c RGBColor) Printf(format string, a ...interface{}) { doPrintV2(c.String(), fmt.Sprintf(format, a...)) } // Println print message with newline func (c RGBColor) Println(a ...interface{}) { doPrintlnV2(c.String(), a) } // Sprint returns rendered message func (c RGBColor) Sprint(a ...interface{}) string { return RenderCode(c.String(), a...) } // Sprintf returns format and rendered message func (c RGBColor) Sprintf(format string, a ...interface{}) string { return RenderString(c.String(), fmt.Sprintf(format, a...)) } // Values to RGB values func (c RGBColor) Values() []int { return []int{int(c[0]), int(c[1]), int(c[2])} } // Code to color code string without prefix. eg: "204;123;56" func (c RGBColor) Code() string { return fmt.Sprintf("%d;%d;%d", c[0], c[1], c[2]) } // Hex color rgb to hex string. as in "ff0080". func (c RGBColor) Hex() string { return fmt.Sprintf("%02x%02x%02x", c[0], c[1], c[2]) } // RgbString to color code string without prefix. eg: "204,123,56" func (c RGBColor) RgbString() string { return fmt.Sprintf("%d,%d,%d", c[0], c[1], c[2]) } // FullCode to color code string with prefix func (c RGBColor) FullCode() string { return c.String() } // String to color code string with prefix. eg: "38;2;204;123;56" func (c RGBColor) String() string { if c[3] == AsFg { return fmt.Sprintf(TplFgRGB, c[0], c[1], c[2]) } if c[3] == AsBg { return fmt.Sprintf(TplBgRGB, c[0], c[1], c[2]) } // c[3] > 1 is empty return "" } // IsEmpty value func (c RGBColor) IsEmpty() bool { return c[3] > AsBg } // IsValid value // func (c RGBColor) IsValid() bool { // return c[3] <= AsBg // } // C256 returns the closest approximate 256 (8 bit) color func (c RGBColor) C256() Color256 { return C256(RgbTo256(c[0], c[1], c[2]), c[3] == AsBg) } // Basic returns the closest approximate 16 (4 bit) color func (c RGBColor) Basic() Color { // return Color(RgbToAnsi(c[0], c[1], c[2], c[3] == AsBg)) return Color(Rgb2basic(c[0], c[1], c[2], c[3] == AsBg)) } // Color returns the closest approximate 16 (4 bit) color func (c RGBColor) Color() Color { return c.Basic() } // C16 returns the closest approximate 16 (4 bit) color func (c RGBColor) C16() Color { return c.Basic() } /************************************************************* * RGB Style *************************************************************/ // RGBStyle definition. // // Foreground/Background color // All are composed of 4 digits uint8, the first three digits are the color value; // The last bit is different from RGBColor, here it indicates whether the value is set. // - 1 Has been set // - ^1 Not set type RGBStyle struct { // Name of the style Name string // color options of the style opts Opts // fg and bg color fg, bg RGBColor } // NewRGBStyle create a RGBStyle. func NewRGBStyle(fg RGBColor, bg ...RGBColor) *RGBStyle { s := &RGBStyle{} if len(bg) > 0 { s.SetBg(bg[0]) } return s.SetFg(fg) } // HEXStyle create a RGBStyle from HEX color string. // Usage: // s := HEXStyle("aabbcc", "eee") // s.Print("message") func HEXStyle(fg string, bg ...string) *RGBStyle { s := &RGBStyle{} if len(bg) > 0 { s.SetBg(HEX(bg[0])) } if len(fg) > 0 { s.SetFg(HEX(fg)) } return s } // RGBStyleFromString create a RGBStyle from color value string. // Usage: // s := RGBStyleFromString("170,187,204", "70,87,4") // s.Print("message") func RGBStyleFromString(fg string, bg ...string) *RGBStyle { s := &RGBStyle{} if len(bg) > 0 { s.SetBg(RGBFromString(bg[0])) } return s.SetFg(RGBFromString(fg)) } // Set fg and bg color, can also with color options func (s *RGBStyle) Set(fg, bg RGBColor, opts ...Color) *RGBStyle { return s.SetFg(fg).SetBg(bg).SetOpts(opts) } // SetFg set fg color func (s *RGBStyle) SetFg(fg RGBColor) *RGBStyle { fg[3] = 1 // add fixed value, mark is valid s.fg = fg return s } // SetBg set bg color func (s *RGBStyle) SetBg(bg RGBColor) *RGBStyle { bg[3] = 1 // add fixed value, mark is valid s.bg = bg return s } // SetOpts set color options func (s *RGBStyle) SetOpts(opts Opts) *RGBStyle { s.opts = opts return s } // AddOpts add options func (s *RGBStyle) AddOpts(opts ...Color) *RGBStyle { s.opts.Add(opts...) return s } // Print print message func (s *RGBStyle) Print(a ...interface{}) { doPrintV2(s.String(), fmt.Sprint(a...)) } // Printf format and print message func (s *RGBStyle) Printf(format string, a ...interface{}) { doPrintV2(s.String(), fmt.Sprintf(format, a...)) } // Println print message with newline func (s *RGBStyle) Println(a ...interface{}) { doPrintlnV2(s.String(), a) } // Sprint returns rendered message func (s *RGBStyle) Sprint(a ...interface{}) string { return RenderCode(s.String(), a...) } // Sprintf returns format and rendered message func (s *RGBStyle) Sprintf(format string, a ...interface{}) string { return RenderString(s.String(), fmt.Sprintf(format, a...)) } // Code convert to color code string func (s *RGBStyle) Code() string { return s.String() } // FullCode convert to color code string func (s *RGBStyle) FullCode() string { return s.String() } // String convert to color code string func (s *RGBStyle) String() string { var ss []string // last value ensure is enable. if s.fg[3] == 1 { ss = append(ss, fmt.Sprintf(TplFgRGB, s.fg[0], s.fg[1], s.fg[2])) } if s.bg[3] == 1 { ss = append(ss, fmt.Sprintf(TplBgRGB, s.bg[0], s.bg[1], s.bg[2])) } if s.opts.IsValid() { ss = append(ss, s.opts.String()) } return strings.Join(ss, ";") } // IsEmpty style func (s *RGBStyle) IsEmpty() bool { return s.fg[3] != 1 && s.bg[3] != 1 } ================================================ FILE: vendor/github.com/gookit/color/color_tag.go ================================================ package color import ( "fmt" "regexp" "strings" ) // output colored text like use html tag. (not support windows cmd) const ( // MatchExpr regex to match color tags // // Notice: golang 不支持反向引用. 即不支持使用 \1 引用第一个匹配 ([a-z=;]+) // MatchExpr = `<([a-z=;]+)>(.*?)<\/\1>` // 所以调整一下 统一使用 `` 来结束标签,例如 "some text" // // allow custom attrs, eg: "content" // (?s:...) s - 让 "." 匹配换行 MatchExpr = `<([0-9a-zA-Z_=,;]+)>(?s:(.*?))<\/>` // AttrExpr regex to match custom color attributes // eg: "content" AttrExpr = `(fg|bg|op)[\s]*=[\s]*([0-9a-zA-Z,]+);?` // StripExpr regex used for removing color tags // StripExpr = `<[\/]?[a-zA-Z=;]+>` // 随着上面的做一些调整 StripExpr = `<[\/]?[0-9a-zA-Z_=,;]*>` ) var ( attrRegex = regexp.MustCompile(AttrExpr) matchRegex = regexp.MustCompile(MatchExpr) stripRegex = regexp.MustCompile(StripExpr) ) /************************************************************* * internal defined color tags *************************************************************/ // There are internal defined color tags // Usage: content text // @notice 加 0 在前面是为了防止之前的影响到现在的设置 var colorTags = map[string]string{ // basic tags "red": "0;31", "red1": "1;31", // with bold "redB": "1;31", "red_b": "1;31", "blue": "0;34", "blue1": "1;34", // with bold "blueB": "1;34", "blue_b": "1;34", "cyan": "0;36", "cyan1": "1;36", // with bold "cyanB": "1;36", "cyan_b": "1;36", "green": "0;32", "green1": "1;32", // with bold "greenB": "1;32", "green_b": "1;32", "black": "0;30", "white": "1;37", "default": "0;39", // no color "normal": "0;39", // no color "brown": "0;33", // #A52A2A "yellow": "0;33", "ylw0": "0;33", "yellowB": "1;33", // with bold "ylw1": "1;33", "ylwB": "1;33", "magenta": "0;35", "mga": "0;35", // short name "magentaB": "1;35", // with bold "mgb": "1;35", "mgaB": "1;35", // light/hi tags "gray": "0;90", "darkGray": "0;90", "dark_gray": "0;90", "lightYellow": "0;93", "light_yellow": "0;93", "hiYellow": "0;93", "hi_yellow": "0;93", "hiYellowB": "1;93", // with bold "hi_yellow_b": "1;93", "lightMagenta": "0;95", "light_magenta": "0;95", "hiMagenta": "0;95", "hi_magenta": "0;95", "lightMagentaB": "1;95", // with bold "hiMagentaB": "1;95", // with bold "hi_magenta_b": "1;95", "lightRed": "0;91", "light_red": "0;91", "hiRed": "0;91", "hi_red": "0;91", "lightRedB": "1;91", // with bold "light_red_b": "1;91", "hi_red_b": "1;91", "lightGreen": "0;92", "light_green": "0;92", "hiGreen": "0;92", "hi_green": "0;92", "lightGreenB": "1;92", "light_green_b": "1;92", "hi_green_b": "1;92", "lightBlue": "0;94", "light_blue": "0;94", "hiBlue": "0;94", "hi_blue": "0;94", "lightBlueB": "1;94", "light_blue_b": "1;94", "hi_blue_b": "1;94", "lightCyan": "0;96", "light_cyan": "0;96", "hiCyan": "0;96", "hi_cyan": "0;96", "lightCyanB": "1;96", "light_cyan_b": "1;96", "hi_cyan_b": "1;96", "lightWhite": "0;97;40", "light_white": "0;97;40", // option "bold": "1", "b": "1", "underscore": "4", "us": "4", // short name for 'underscore' "reverse": "7", // alert tags, like bootstrap's alert "suc": "1;32", // same "green" and "bold" "success": "1;32", "info": "0;32", // same "green", "comment": "0;33", // same "brown" "note": "36;1", "notice": "36;4", "warn": "0;1;33", "warning": "0;30;43", "primary": "0;34", "danger": "1;31", // same "red" but add bold "err": "97;41", "error": "97;41", // fg light white; bg red } /************************************************************* * parse color tags *************************************************************/ var ( tagParser = TagParser{} rxNumStr = regexp.MustCompile("^[0-9]{1,3}$") rxHexCode = regexp.MustCompile("^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$") ) // TagParser struct type TagParser struct { disable bool } // NewTagParser create func NewTagParser() *TagParser { return &TagParser{} } // func (tp *TagParser) Disable() *TagParser { // tp.disable = true // return tp // } // ParseByEnv parse given string. will check package setting. func (tp *TagParser) ParseByEnv(str string) string { // disable handler TAG if !RenderTag { return str } // disable OR not support color if !Enable || !SupportColor() { return ClearTag(str) } return tp.Parse(str) } // Parse parse given string, replace color tag and return rendered string func (tp *TagParser) Parse(str string) string { // not contains color tag if !strings.Contains(str, "") { return str } // find color tags by regex. str eg: "content" matched := matchRegex.FindAllStringSubmatch(str, -1) // item: 0 full text 1 tag name 2 tag content for _, item := range matched { full, tag, content := item[0], item[1], item[2] // use defined tag name: "content" -> tag: "info" if !strings.ContainsRune(tag, '=') { code := colorTags[tag] if len(code) > 0 { now := RenderString(code, content) // old := WrapTag(content, tag) is equals to var 'full' str = strings.Replace(str, full, now, 1) } continue } // custom color in tag // - basic: "fg=white;bg=blue;op=bold" if code := ParseCodeFromAttr(tag); len(code) > 0 { now := RenderString(code, content) str = strings.Replace(str, full, now, 1) } } return str } // func (tp *TagParser) ParseAttr(attr string) (code string) { // return // } // ReplaceTag parse string, replace color tag and return rendered string func ReplaceTag(str string) string { return tagParser.ParseByEnv(str) } // ParseCodeFromAttr parse color attributes. // // attr format: // // VALUE please see var: FgColors, BgColors, AllOptions // "fg=VALUE;bg=VALUE;op=VALUE" // 16 color: // "fg=yellow" // "bg=red" // "op=bold,underscore" option is allow multi value // "fg=white;bg=blue;op=bold" // "fg=white;op=bold,underscore" // 256 color: // "fg=167" // "fg=167;bg=23" // "fg=167;bg=23;op=bold" // true color: // // hex // "fg=fc1cac" // "fg=fc1cac;bg=c2c3c4" // // r,g,b // "fg=23,45,214" // "fg=23,45,214;bg=109,99,88" func ParseCodeFromAttr(attr string) (code string) { if !strings.ContainsRune(attr, '=') { return } attr = strings.Trim(attr, ";=,") if len(attr) == 0 { return } var codes []string matched := attrRegex.FindAllStringSubmatch(attr, -1) for _, item := range matched { pos, val := item[1], item[2] switch pos { case "fg": if c, ok := FgColors[val]; ok { // basic codes = append(codes, c.String()) } else if c, ok := ExFgColors[val]; ok { // extra codes = append(codes, c.String()) } else if code := rgbHex256toCode(val, false); code != "" { codes = append(codes, code) } case "bg": if c, ok := BgColors[val]; ok { // basic bg codes = append(codes, c.String()) } else if c, ok := ExBgColors[val]; ok { // extra bg codes = append(codes, c.String()) } else if code := rgbHex256toCode(val, true); code != "" { codes = append(codes, code) } case "op": // options allow multi value if strings.Contains(val, ",") { ns := strings.Split(val, ",") for _, n := range ns { if c, ok := AllOptions[n]; ok { codes = append(codes, c.String()) } } } else if c, ok := AllOptions[val]; ok { codes = append(codes, c.String()) } } } return strings.Join(codes, ";") } func rgbHex256toCode(val string, isBg bool) (code string) { if len(val) == 6 && rxHexCode.MatchString(val) { // hex: "fc1cac" code = HEX(val, isBg).String() } else if strings.ContainsRune(val, ',') { // rgb: "231,178,161" code = strings.Replace(val, ",", ";", -1) if isBg { code = BgRGBPfx + code } else { code = FgRGBPfx + code } } else if len(val) < 4 && rxNumStr.MatchString(val) { // 256 code if isBg { code = Bg256Pfx + val } else { code = Fg256Pfx + val } } return } // ClearTag clear all tag for a string func ClearTag(s string) string { if !strings.Contains(s, "") { return s } return stripRegex.ReplaceAllString(s, "") } /************************************************************* * helper methods *************************************************************/ // GetTagCode get color code by tag name func GetTagCode(name string) string { return colorTags[name] } // ApplyTag for messages func ApplyTag(tag string, a ...interface{}) string { return RenderCode(GetTagCode(tag), a...) } // WrapTag wrap a tag for a string "content" func WrapTag(s string, tag string) string { if s == "" || tag == "" { return s } return fmt.Sprintf("<%s>%s", tag, s) } // GetColorTags get all internal color tags func GetColorTags() map[string]string { return colorTags } // IsDefinedTag is defined tag name func IsDefinedTag(name string) bool { _, ok := colorTags[name] return ok } /************************************************************* * Tag extra *************************************************************/ // Tag value is a defined style name // Usage: // Tag("info").Println("message") type Tag string // Print messages func (tg Tag) Print(a ...interface{}) { name := string(tg) str := fmt.Sprint(a...) if stl := GetStyle(name); !stl.IsEmpty() { stl.Print(str) } else { doPrintV2(GetTagCode(name), str) } } // Printf format and print messages func (tg Tag) Printf(format string, a ...interface{}) { name := string(tg) str := fmt.Sprintf(format, a...) if stl := GetStyle(name); !stl.IsEmpty() { stl.Print(str) } else { doPrintV2(GetTagCode(name), str) } } // Println messages line func (tg Tag) Println(a ...interface{}) { name := string(tg) if stl := GetStyle(name); !stl.IsEmpty() { stl.Println(a...) } else { doPrintlnV2(GetTagCode(name), a) } } // Sprint render messages func (tg Tag) Sprint(a ...interface{}) string { name := string(tg) // if stl := GetStyle(name); !stl.IsEmpty() { // return stl.Render(args...) // } return RenderCode(GetTagCode(name), a...) } // Sprintf format and render messages func (tg Tag) Sprintf(format string, a ...interface{}) string { tag := string(tg) str := fmt.Sprintf(format, a...) return RenderString(GetTagCode(tag), str) } ================================================ FILE: vendor/github.com/gookit/color/convert.go ================================================ package color import ( "fmt" "math" "sort" "strconv" "strings" ) var ( // ---------- basic(16) <=> 256 color convert ---------- basicTo256Map = map[uint8]uint8{ 30: 0, // black 000000 31: 160, // red c51e14 32: 34, // green 1dc121 33: 184, // yellow c7c329 34: 20, // blue 0a2fc4 35: 170, // magenta c839c5 36: 44, // cyan 20c5c6 37: 188, // white c7c7c7 90: 59, // lightBlack 686868 91: 203, // lightRed fd6f6b 92: 83, // lightGreen 67f86f 93: 227, // lightYellow fffa72 94: 69, // lightBlue 6a76fb 95: 213, // lightMagenta fd7cfc 96: 87, // lightCyan 68fdfe 97: 15, // lightWhite ffffff } // ---------- basic(16) <=> RGB color convert ---------- // refer from Hyper app basic2hexMap = map[uint8]string{ 30: "000000", // black 31: "c51e14", // red 32: "1dc121", // green 33: "c7c329", // yellow 34: "0a2fc4", // blue 35: "c839c5", // magenta 36: "20c5c6", // cyan 37: "c7c7c7", // white // - don't add bg color // 40: "000000", // black // 41: "c51e14", // red // 42: "1dc121", // green // 43: "c7c329", // yellow // 44: "0a2fc4", // blue // 45: "c839c5", // magenta // 46: "20c5c6", // cyan // 47: "c7c7c7", // white 90: "686868", // lightBlack/darkGray 91: "fd6f6b", // lightRed 92: "67f86f", // lightGreen 93: "fffa72", // lightYellow 94: "6a76fb", // lightBlue 95: "fd7cfc", // lightMagenta 96: "68fdfe", // lightCyan 97: "ffffff", // lightWhite // - don't add bg color // 100: "686868", // lightBlack/darkGray // 101: "fd6f6b", // lightRed // 102: "67f86f", // lightGreen // 103: "fffa72", // lightYellow // 104: "6a76fb", // lightBlue // 105: "fd7cfc", // lightMagenta // 106: "68fdfe", // lightCyan // 107: "ffffff", // lightWhite } // will convert data from basic2hexMap hex2basicMap = initHex2basicMap() // ---------- 256 <=> RGB color convert ---------- // adapted from https://gist.github.com/MicahElliott/719710 c256ToHexMap = init256ToHexMap() // rgb to 256 color look-up table // RGB hex => 256 code hexTo256Table = map[string]uint8{ // Primary 3-bit (8 colors). Unique representation! "000000": 0, "800000": 1, "008000": 2, "808000": 3, "000080": 4, "800080": 5, "008080": 6, "c0c0c0": 7, // Equivalent "bright" versions of original 8 colors. "808080": 8, "ff0000": 9, "00ff00": 10, "ffff00": 11, "0000ff": 12, "ff00ff": 13, "00ffff": 14, "ffffff": 15, // values commented out below are duplicates from the prior sections // Strictly ascending. // "000000": 16, "000001": 16, // up: avoid key conflicts, value + 1 "00005f": 17, "000087": 18, "0000af": 19, "0000d7": 20, // "0000ff": 21, "0000fe": 21, // up: avoid key conflicts, value - 1 "005f00": 22, "005f5f": 23, "005f87": 24, "005faf": 25, "005fd7": 26, "005fff": 27, "008700": 28, "00875f": 29, "008787": 30, "0087af": 31, "0087d7": 32, "0087ff": 33, "00af00": 34, "00af5f": 35, "00af87": 36, "00afaf": 37, "00afd7": 38, "00afff": 39, "00d700": 40, "00d75f": 41, "00d787": 42, "00d7af": 43, "00d7d7": 44, "00d7ff": 45, // "00ff00": 46, "00ff01": 46, // up: avoid key conflicts, value + 1 "00ff5f": 47, "00ff87": 48, "00ffaf": 49, "00ffd7": 50, // "00ffff": 51, "00fffe": 51, // up: avoid key conflicts, value - 1 "5f0000": 52, "5f005f": 53, "5f0087": 54, "5f00af": 55, "5f00d7": 56, "5f00ff": 57, "5f5f00": 58, "5f5f5f": 59, "5f5f87": 60, "5f5faf": 61, "5f5fd7": 62, "5f5fff": 63, "5f8700": 64, "5f875f": 65, "5f8787": 66, "5f87af": 67, "5f87d7": 68, "5f87ff": 69, "5faf00": 70, "5faf5f": 71, "5faf87": 72, "5fafaf": 73, "5fafd7": 74, "5fafff": 75, "5fd700": 76, "5fd75f": 77, "5fd787": 78, "5fd7af": 79, "5fd7d7": 80, "5fd7ff": 81, "5fff00": 82, "5fff5f": 83, "5fff87": 84, "5fffaf": 85, "5fffd7": 86, "5fffff": 87, "870000": 88, "87005f": 89, "870087": 90, "8700af": 91, "8700d7": 92, "8700ff": 93, "875f00": 94, "875f5f": 95, "875f87": 96, "875faf": 97, "875fd7": 98, "875fff": 99, "878700": 100, "87875f": 101, "878787": 102, "8787af": 103, "8787d7": 104, "8787ff": 105, "87af00": 106, "87af5f": 107, "87af87": 108, "87afaf": 109, "87afd7": 110, "87afff": 111, "87d700": 112, "87d75f": 113, "87d787": 114, "87d7af": 115, "87d7d7": 116, "87d7ff": 117, "87ff00": 118, "87ff5f": 119, "87ff87": 120, "87ffaf": 121, "87ffd7": 122, "87ffff": 123, "af0000": 124, "af005f": 125, "af0087": 126, "af00af": 127, "af00d7": 128, "af00ff": 129, "af5f00": 130, "af5f5f": 131, "af5f87": 132, "af5faf": 133, "af5fd7": 134, "af5fff": 135, "af8700": 136, "af875f": 137, "af8787": 138, "af87af": 139, "af87d7": 140, "af87ff": 141, "afaf00": 142, "afaf5f": 143, "afaf87": 144, "afafaf": 145, "afafd7": 146, "afafff": 147, "afd700": 148, "afd75f": 149, "afd787": 150, "afd7af": 151, "afd7d7": 152, "afd7ff": 153, "afff00": 154, "afff5f": 155, "afff87": 156, "afffaf": 157, "afffd7": 158, "afffff": 159, "d70000": 160, "d7005f": 161, "d70087": 162, "d700af": 163, "d700d7": 164, "d700ff": 165, "d75f00": 166, "d75f5f": 167, "d75f87": 168, "d75faf": 169, "d75fd7": 170, "d75fff": 171, "d78700": 172, "d7875f": 173, "d78787": 174, "d787af": 175, "d787d7": 176, "d787ff": 177, "d7af00": 178, "d7af5f": 179, "d7af87": 180, "d7afaf": 181, "d7afd7": 182, "d7afff": 183, "d7d700": 184, "d7d75f": 185, "d7d787": 186, "d7d7af": 187, "d7d7d7": 188, "d7d7ff": 189, "d7ff00": 190, "d7ff5f": 191, "d7ff87": 192, "d7ffaf": 193, "d7ffd7": 194, "d7ffff": 195, // "ff0000": 196, "ff0001": 196, // up: avoid key conflicts, value + 1 "ff005f": 197, "ff0087": 198, "ff00af": 199, "ff00d7": 200, // "ff00ff": 201, "ff00fe": 201, // up: avoid key conflicts, value - 1 "ff5f00": 202, "ff5f5f": 203, "ff5f87": 204, "ff5faf": 205, "ff5fd7": 206, "ff5fff": 207, "ff8700": 208, "ff875f": 209, "ff8787": 210, "ff87af": 211, "ff87d7": 212, "ff87ff": 213, "ffaf00": 214, "ffaf5f": 215, "ffaf87": 216, "ffafaf": 217, "ffafd7": 218, "ffafff": 219, "ffd700": 220, "ffd75f": 221, "ffd787": 222, "ffd7af": 223, "ffd7d7": 224, "ffd7ff": 225, // "ffff00": 226, "ffff01": 226, // up: avoid key conflicts, value + 1 "ffff5f": 227, "ffff87": 228, "ffffaf": 229, "ffffd7": 230, // "ffffff": 231, "fffffe": 231, // up: avoid key conflicts, value - 1 // Gray-scale range. "080808": 232, "121212": 233, "1c1c1c": 234, "262626": 235, "303030": 236, "3a3a3a": 237, "444444": 238, "4e4e4e": 239, "585858": 240, "626262": 241, "6c6c6c": 242, "767676": 243, // "808080": 244, "808081": 244, // up: avoid key conflicts, value + 1 "8a8a8a": 245, "949494": 246, "9e9e9e": 247, "a8a8a8": 248, "b2b2b2": 249, "bcbcbc": 250, "c6c6c6": 251, "d0d0d0": 252, "dadada": 253, "e4e4e4": 254, "eeeeee": 255, } incs = []uint8{0x00, 0x5f, 0x87, 0xaf, 0xd7, 0xff} ) func initHex2basicMap() map[string]uint8 { h2b := make(map[string]uint8, len(basic2hexMap)) // ini data map for u, s := range basic2hexMap { h2b[s] = u } return h2b } func init256ToHexMap() map[uint8]string { c256toh := make(map[uint8]string, len(hexTo256Table)) // ini data map for hex, c256 := range hexTo256Table { c256toh[c256] = hex } return c256toh } // RgbTo256Table mapping data func RgbTo256Table() map[string]uint8 { return hexTo256Table } // Colors2code convert colors to code. return like "32;45;3" func Colors2code(colors ...Color) string { if len(colors) == 0 { return "" } var codes []string for _, color := range colors { codes = append(codes, color.String()) } return strings.Join(codes, ";") } /************************************************************* * HEX code <=> RGB/True color code *************************************************************/ // Hex2rgb alias of the HexToRgb() func Hex2rgb(hex string) []int { return HexToRgb(hex) } // HexToRGB alias of the HexToRgb() func HexToRGB(hex string) []int { return HexToRgb(hex) } // HexToRgb convert hex color string to RGB numbers // // Usage: // rgb := HexToRgb("ccc") // rgb: [204 204 204] // rgb := HexToRgb("aabbcc") // rgb: [170 187 204] // rgb := HexToRgb("#aabbcc") // rgb: [170 187 204] // rgb := HexToRgb("0xad99c0") // rgb: [170 187 204] func HexToRgb(hex string) (rgb []int) { hex = strings.TrimSpace(hex) if hex == "" { return } // like from css. eg "#ccc" "#ad99c0" if hex[0] == '#' { hex = hex[1:] } hex = strings.ToLower(hex) switch len(hex) { case 3: // "ccc" hex = string([]byte{hex[0], hex[0], hex[1], hex[1], hex[2], hex[2]}) case 8: // "0xad99c0" hex = strings.TrimPrefix(hex, "0x") } // recheck if len(hex) != 6 { return } // convert string to int64 if i64, err := strconv.ParseInt(hex, 16, 32); err == nil { color := int(i64) // parse int rgb = make([]int, 3) rgb[0] = color >> 16 rgb[1] = (color & 0x00FF00) >> 8 rgb[2] = color & 0x0000FF } return } // Rgb2hex alias of the RgbToHex() func Rgb2hex(rgb []int) string { return RgbToHex(rgb) } // RgbToHex convert RGB-code to hex-code // // Usage: // hex := RgbToHex([]int{170, 187, 204}) // hex: "aabbcc" func RgbToHex(rgb []int) string { hexNodes := make([]string, len(rgb)) for _, v := range rgb { hexNodes = append(hexNodes, strconv.FormatInt(int64(v), 16)) } return strings.Join(hexNodes, "") } /************************************************************* * 4bit(16) color <=> RGB/True color *************************************************************/ // Basic2hex convert basic color to hex string. func Basic2hex(val uint8) string { val = Fg2Bg(val) return basic2hexMap[val] } // Hex2basic convert hex string to basic color code. func Hex2basic(hex string, asBg ...bool) uint8 { val := hex2basicMap[hex] if len(asBg) > 0 && asBg[0] { return Fg2Bg(val) } return val } // Rgb2basic alias of the RgbToAnsi() func Rgb2basic(r, g, b uint8, isBg bool) uint8 { // is basic color, direct use static map data. hex := RgbToHex([]int{int(r), int(g), int(b)}) if val, ok := hex2basicMap[hex]; ok { if isBg { return val + 10 } return val } return RgbToAnsi(r, g, b, isBg) } // Rgb2ansi alias of the RgbToAnsi() func Rgb2ansi(r, g, b uint8, isBg bool) uint8 { return RgbToAnsi(r, g, b, isBg) } // RgbToAnsi convert RGB-code to 16-code // refer https://github.com/radareorg/radare2/blob/master/libr/cons/rgb.c#L249-L271 func RgbToAnsi(r, g, b uint8, isBg bool) uint8 { var bright, c, k uint8 base := compareVal(isBg, BgBase, FgBase) // eco bright-specific if r == 0x80 && g == 0x80 && b == 0x80 { // 0x80=128 bright = 53 } else if r == 0xff || g == 0xff || b == 0xff { // 0xff=255 bright = 60 } // else bright = 0 if r == g && g == b { // 0x7f=127 // r = (r > 0x7f) ? 1 : 0; r = compareVal(r > 0x7f, 1, 0) g = compareVal(g > 0x7f, 1, 0) b = compareVal(b > 0x7f, 1, 0) } else { k = (r + g + b) / 3 // r = (r >= k) ? 1 : 0; r = compareVal(r >= k, 1, 0) g = compareVal(g >= k, 1, 0) b = compareVal(b >= k, 1, 0) } // c = (r ? 1 : 0) + (g ? (b ? 6 : 2) : (b ? 4 : 0)) c = compareVal(r > 0, 1, 0) if g > 0 { c += compareVal(b > 0, 6, 2) } else { c += compareVal(b > 0, 4, 0) } return base + bright + c } /************************************************************* * 8bit(256) color <=> RGB/True color *************************************************************/ // Rgb2short convert RGB-code to 256-code func Rgb2short(r, g, b uint8) uint8 { return RgbTo256(r, g, b) } // RgbTo256 convert RGB-code to 256-code func RgbTo256(r, g, b uint8) uint8 { res := make([]uint8, 3) for partI, part := range [3]uint8{r, g, b} { i := 0 for i < len(incs)-1 { s, b := incs[i], incs[i+1] // smaller, bigger if s <= part && part <= b { s1 := math.Abs(float64(s) - float64(part)) b1 := math.Abs(float64(b) - float64(part)) var closest uint8 if s1 < b1 { closest = s } else { closest = b } res[partI] = closest break } i++ } } hex := fmt.Sprintf("%02x%02x%02x", res[0], res[1], res[2]) equiv := hexTo256Table[hex] return equiv } // C256ToRgb convert an 256 color code to RGB numbers func C256ToRgb(val uint8) (rgb []uint8) { hex := c256ToHexMap[val] // convert to rgb code rgbInts := Hex2rgb(hex) return []uint8{ uint8(rgbInts[0]), uint8(rgbInts[1]), uint8(rgbInts[2]), } } // C256ToRgbV1 convert an 256 color code to RGB numbers // refer https://github.com/torvalds/linux/commit/cec5b2a97a11ade56a701e83044d0a2a984c67b4 func C256ToRgbV1(val uint8) (rgb []uint8) { var r, g, b uint8 if val < 8 { // Standard colours. // r = val&1 ? 0xaa : 0x00; r = compareVal(val&1 == 1, 0xaa, 0x00) g = compareVal(val&2 == 2, 0xaa, 0x00) b = compareVal(val&4 == 4, 0xaa, 0x00) } else if val < 16 { // r = val & 1 ? 0xff : 0x55; r = compareVal(val&1 == 1, 0xff, 0x55) g = compareVal(val&2 == 2, 0xff, 0x55) b = compareVal(val&4 == 4, 0xff, 0x55) } else if val < 232 { /* 6x6x6 colour cube. */ r = (val - 16) / 36 * 85 / 2 g = (val - 16) / 6 % 6 * 85 / 2 b = (val - 16) % 6 * 85 / 2 } else { /* Grayscale ramp. */ nv := uint8(int(val)*10 - 2312) // set value r, g, b = nv, nv, nv } return []uint8{r, g, b} } /************************************************************** * HSL color <=> RGB/True color ************************************************************ * h,s,l = Hue, Saturation, Lightness * * refers * http://en.wikipedia.org/wiki/HSL_color_space * https://www.w3.org/TR/css-color-3/#hsl-color * https://stackoverflow.com/questions/2353211/hsl-to-rgb-color-conversion * https://github.com/less/less.js/blob/master/packages/less/src/less/functions/color.js * https://github.com/d3/d3-color/blob/v3.0.1/README.md#hsl * * examples: * color: hsl(0, 100%, 50%) // red * color: hsl(120, 100%, 50%) // lime * color: hsl(120, 100%, 25%) // dark green * color: hsl(120, 100%, 75%) // light green * color: hsl(120, 75%, 75%) // pastel green, and so on */ // HslIntToRgb Converts an HSL color value to RGB // Assumes h: 0-360, s: 0-100, l: 0-100 // returns r, g, and b in the set [0, 255]. // // Usage: // HslIntToRgb(0, 100, 50) // red // HslIntToRgb(120, 100, 50) // lime // HslIntToRgb(120, 100, 25) // dark green // HslIntToRgb(120, 100, 75) // light green func HslIntToRgb(h, s, l int) (rgb []uint8) { return HslToRgb(float64(h)/360, float64(s)/100, float64(l)/100) } // HslToRgb Converts an HSL color value to RGB. Conversion formula // adapted from http://en.wikipedia.org/wiki/HSL_color_space. // Assumes h, s, and l are contained in the set [0, 1] // returns r, g, and b in the set [0, 255]. // // Usage: // rgbVals := HslToRgb(0, 1, 0.5) // red func HslToRgb(h, s, l float64) (rgb []uint8) { var r, g, b float64 if s == 0 { // achromatic r, g, b = l, l, l } else { var hue2rgb = func(p, q, t float64) float64 { if t < 0.0 { t += 1 } if t > 1.0 { t -= 1 } if t < 1.0/6.0 { return p + (q-p)*6.0*t } if t < 1.0/2.0 { return q } if t < 2.0/3.0 { return p + (q-p)*(2.0/3.0-t)*6.0 } return p } // q = l < 0.5 ? l * (1 + s) : l + s - l*s var q float64 if l < 0.5 { q = l * (1.0 + s) } else { q = l + s - l*s } var p = 2.0*l - q r = hue2rgb(p, q, h+1.0/3.0) g = hue2rgb(p, q, h) b = hue2rgb(p, q, h-1.0/3.0) } // return []uint8{uint8(r * 255), uint8(g * 255), uint8(b * 255)} return []uint8{ uint8(math.Round(r * 255)), uint8(math.Round(g * 255)), uint8(math.Round(b * 255)), } } // RgbToHslInt Converts an RGB color value to HSL. Conversion formula // Assumes r, g, and b are contained in the set [0, 255] and // returns [h,s,l] h: 0-360, s: 0-100, l: 0-100. func RgbToHslInt(r, g, b uint8) []int { f64s := RgbToHsl(r, g, b) return []int{int(f64s[0] * 360), int(f64s[1] * 100), int(f64s[2] * 100)} } // RgbToHsl Converts an RGB color value to HSL. Conversion formula // adapted from http://en.wikipedia.org/wiki/HSL_color_space. // Assumes r, g, and b are contained in the set [0, 255] and // returns h, s, and l in the set [0, 1]. func RgbToHsl(r, g, b uint8) []float64 { // to float64 fr, fg, fb := float64(r), float64(g), float64(b) // percentage pr, pg, pb := float64(r)/255.0, float64(g)/255.0, float64(b)/255.0 ps := []float64{pr, pg, pb} sort.Float64s(ps) min, max := ps[0], ps[2] // max := math.Max(math.Max(pr, pg), pb) // min := math.Min(math.Min(pr, pg), pb) mid := (max + min) / 2 h, s, l := mid, mid, mid if max == min { h, s = 0, 0 // achromatic } else { var d = max - min // s = l > 0.5 ? d / (2 - max - min) : d / (max + min) s = compareF64Val(l > 0.5, d/(2-max-min), d/(max+min)) switch max { case fr: // h = (g - b) / d + (g < b ? 6 : 0) h = (fg - fb) / d h += compareF64Val(g < b, 6, 0) case fg: h = (fb-fr)/d + 2 case fb: h = (fr-fg)/d + 4 } h /= 6 } return []float64{h, s, l} } /************************************************************** * HSV color <=> RGB/True color ************************************************************ * h,s,l = Hue, Saturation, Value(Brightness) * * refers * https://stackoverflow.com/questions/2353211/hsl-to-rgb-color-conversion * https://github.com/less/less.js/blob/master/packages/less/src/less/functions/color.js * https://github.com/d3/d3-color/blob/v3.0.1/README.md#hsl */ // HsvToRgb Converts an HSL color value to RGB. Conversion formula // adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#HSV_to_RGB // Assumes h: 0-360, s: 0-100, l: 0-100 // returns r, g, and b in the set [0, 255]. func HsvToRgb(h, s, v int) (rgb []uint8) { // TODO ... return } // Named rgb colors // https://www.w3.org/TR/css-color-3/#svg-color var namedRgbMap = map[string]string{ "aliceblue": "240,248,255", // #F0F8FF "antiquewhite": "250,235,215", // #FAEBD7 "aqua": "0,255,255", // #00FFFF "aquamarine": "127,255,212", // #7FFFD4 "azure": "240,255,255", // #F0FFFF "beige": "245,245,220", // #F5F5DC "bisque": "255,228,196", // #FFE4C4 "black": "0,0,0", // #000000 "blanchedalmond": "255,235,205", // #FFEBCD "blue": "0,0,255", // #0000FF "blueviolet": "138,43,226", // #8A2BE2 "brown": "165,42,42", // #A52A2A "burlywood": "222,184,135", // #DEB887 "cadetblue": "95,158,160", // #5F9EA0 "chartreuse": "127,255,0", // #7FFF00 "chocolate": "210,105,30", // #D2691E "coral": "255,127,80", // #FF7F50 "cornflowerblue": "100,149,237", // #6495ED "cornsilk": "255,248,220", // #FFF8DC "crimson": "220,20,60", // #DC143C "cyan": "0,255,255", // #00FFFF "darkblue": "0,0,139", // #00008B "darkcyan": "0,139,139", // #008B8B "darkgoldenrod": "184,134,11", // #B8860B "darkgray": "169,169,169", // #A9A9A9 "darkgreen": "0,100,0", // #006400 "darkgrey": "169,169,169", // #A9A9A9 "darkkhaki": "189,183,107", // #BDB76B "darkmagenta": "139,0,139", // #8B008B "darkolivegreen": "85,107,47", // #556B2F "darkorange": "255,140,0", // #FF8C00 "darkorchid": "153,50,204", // #9932CC "darkred": "139,0,0", // #8B0000 "darksalmon": "233,150,122", // #E9967A "darkseagreen": "143,188,143", // #8FBC8F "darkslateblue": "72,61,139", // #483D8B "darkslategray": "47,79,79", // #2F4F4F "darkslategrey": "47,79,79", // #2F4F4F "darkturquoise": "0,206,209", // #00CED1 "darkviolet": "148,0,211", // #9400D3 "deeppink": "255,20,147", // #FF1493 "deepskyblue": "0,191,255", // #00BFFF "dimgray": "105,105,105", // #696969 "dimgrey": "105,105,105", // #696969 "dodgerblue": "30,144,255", // #1E90FF "firebrick": "178,34,34", // #B22222 "floralwhite": "255,250,240", // #FFFAF0 "forestgreen": "34,139,34", // #228B22 "fuchsia": "255,0,255", // #FF00FF "gainsboro": "220,220,220", // #DCDCDC "ghostwhite": "248,248,255", // #F8F8FF "gold": "255,215,0", // #FFD700 "goldenrod": "218,165,32", // #DAA520 "gray": "128,128,128", // #808080 "green": "0,128,0", // #008000 "greenyellow": "173,255,47", // #ADFF2F "grey": "128,128,128", // #808080 "honeydew": "240,255,240", // #F0FFF0 "hotpink": "255,105,180", // #FF69B4 "indianred": "205,92,92", // #CD5C5C "indigo": "75,0,130", // #4B0082 "ivory": "255,255,240", // #FFFFF0 "khaki": "240,230,140", // #F0E68C "lavender": "230,230,250", // #E6E6FA "lavenderblush": "255,240,245", // #FFF0F5 "lawngreen": "124,252,0", // #7CFC00 "lemonchiffon": "255,250,205", // #FFFACD "lightblue": "173,216,230", // #ADD8E6 "lightcoral": "240,128,128", // #F08080 "lightcyan": "224,255,255", // #E0FFFF "lightgoldenrodyellow": "250,250,210", // #FAFAD2 "lightgray": "211,211,211", // #D3D3D3 "lightgreen": "144,238,144", // #90EE90 "lightgrey": "211,211,211", // #D3D3D3 "lightpink": "255,182,193", // #FFB6C1 "lightsalmon": "255,160,122", // #FFA07A "lightseagreen": "32,178,170", // #20B2AA "lightskyblue": "135,206,250", // #87CEFA "lightslategray": "119,136,153", // #778899 "lightslategrey": "119,136,153", // #778899 "lightsteelblue": "176,196,222", // #B0C4DE "lightyellow": "255,255,224", // #FFFFE0 "lime": "0,255,0", // #00FF00 "limegreen": "50,205,50", // #32CD32 "linen": "250,240,230", // #FAF0E6 "magenta": "255,0,255", // #FF00FF "maroon": "128,0,0", // #800000 "mediumaquamarine": "102,205,170", // #66CDAA "mediumblue": "0,0,205", // #0000CD "mediumorchid": "186,85,211", // #BA55D3 "mediumpurple": "147,112,219", // #9370DB "mediumseagreen": "60,179,113", // #3CB371 "mediumslateblue": "123,104,238", // #7B68EE "mediumspringgreen": "0,250,154", // #00FA9A "mediumturquoise": "72,209,204", // #48D1CC "mediumvioletred": "199,21,133", // #C71585 "midnightblue": "25,25,112", // #191970 "mintcream": "245,255,250", // #F5FFFA "mistyrose": "255,228,225", // #FFE4E1 "moccasin": "255,228,181", // #FFE4B5 "navajowhite": "255,222,173", // #FFDEAD "navy": "0,0,128", // #000080 "oldlace": "253,245,230", // #FDF5E6 "olive": "128,128,0", // #808000 "olivedrab": "107,142,35", // #6B8E23 "orange": "255,165,0", // #FFA500 "orangered": "255,69,0", // #FF4500 "orchid": "218,112,214", // #DA70D6 "palegoldenrod": "238,232,170", // #EEE8AA "palegreen": "152,251,152", // #98FB98 "paleturquoise": "175,238,238", // #AFEEEE "palevioletred": "219,112,147", // #DB7093 "papayawhip": "255,239,213", // #FFEFD5 "peachpuff": "255,218,185", // #FFDAB9 "peru": "205,133,63", // #CD853F "pink": "255,192,203", // #FFC0CB "plum": "221,160,221", // #DDA0DD "powderblue": "176,224,230", // #B0E0E6 "purple": "128,0,128", // #800080 "red": "255,0,0", // #FF0000 "rosybrown": "188,143,143", // #BC8F8F "royalblue": "65,105,225", // #4169E1 "saddlebrown": "139,69,19", // #8B4513 "salmon": "250,128,114", // #FA8072 "sandybrown": "244,164,96", // #F4A460 "seagreen": "46,139,87", // #2E8B57 "seashell": "255,245,238", // #FFF5EE "sienna": "160,82,45", // #A0522D "silver": "192,192,192", // #C0C0C0 "skyblue": "135,206,235", // #87CEEB "slateblue": "106,90,205", // #6A5ACD "slategray": "112,128,144", // #708090 "slategrey": "112,128,144", // #708090 "snow": "255,250,250", // #FFFAFA "springgreen": "0,255,127", // #00FF7F "steelblue": "70,130,180", // #4682B4 "tan": "210,180,140", // #D2B48C "teal": "0,128,128", // #008080 "thistle": "216,191,216", // #D8BFD8 "tomato": "255,99,71", // #FF6347 "turquoise": "64,224,208", // #40E0D0 "violet": "238,130,238", // #EE82EE "wheat": "245,222,179", // #F5DEB3 "white": "255,255,255", // #FFFFFF "whitesmoke": "245,245,245", // #F5F5F5 "yellow": "255,255,0", // #FFFF00 "yellowgreen": "154,205,50", // #9ACD32 } ================================================ FILE: vendor/github.com/gookit/color/detect_env.go ================================================ package color import ( "io" "io/ioutil" "os" "runtime" "strconv" "strings" "syscall" "github.com/xo/terminfo" ) /************************************************************* * helper methods for detect color supports *************************************************************/ // DetectColorLevel for current env // // NOTICE: The method will detect terminal info each times, // if only want get current color level, please direct call SupportColor() or TermColorLevel() func DetectColorLevel() terminfo.ColorLevel { level, _ := detectTermColorLevel() return level } // detect terminal color support level // // refer https://github.com/Delta456/box-cli-maker func detectTermColorLevel() (level terminfo.ColorLevel, needVTP bool) { // on windows WSL: // - runtime.GOOS == "Linux" // - support true-color // env: // WSL_DISTRO_NAME=Debian if val := os.Getenv("WSL_DISTRO_NAME"); val != "" { // detect WSL as it has True Color support if detectWSL() { debugf("True Color support on WSL environment") return terminfo.ColorLevelMillions, false } } isWin := runtime.GOOS == "windows" termVal := os.Getenv("TERM") // on TERM=screen: not support true-color if termVal != "screen" { // On JetBrains Terminal // - support true-color // env: // TERMINAL_EMULATOR=JetBrains-JediTerm val := os.Getenv("TERMINAL_EMULATOR") if val == "JetBrains-JediTerm" { debugf("True Color support on JetBrains-JediTerm, is win: %v", isWin) return terminfo.ColorLevelMillions, isWin } } // level, err = terminfo.ColorLevelFromEnv() level = detectColorLevelFromEnv(termVal, isWin) debugf("color level by detectColorLevelFromEnv: %s", level.String()) // fallback: simple detect by TERM value string. if level == terminfo.ColorLevelNone { debugf("level none - fallback check special term color support") // on Windows: enable VTP as it has True Color support level, needVTP = detectSpecialTermColor(termVal) } return } // detectColorFromEnv returns the color level COLORTERM, FORCE_COLOR, // TERM_PROGRAM, or determined from the TERM environment variable. // // refer the terminfo.ColorLevelFromEnv() // https://en.wikipedia.org/wiki/Terminfo func detectColorLevelFromEnv(termVal string, isWin bool) terminfo.ColorLevel { // check for overriding environment variables colorTerm, termProg, forceColor := os.Getenv("COLORTERM"), os.Getenv("TERM_PROGRAM"), os.Getenv("FORCE_COLOR") switch { case strings.Contains(colorTerm, "truecolor") || strings.Contains(colorTerm, "24bit"): if termVal == "screen" { // on TERM=screen: not support true-color return terminfo.ColorLevelHundreds } return terminfo.ColorLevelMillions case colorTerm != "" || forceColor != "": return terminfo.ColorLevelBasic case termProg == "Apple_Terminal": return terminfo.ColorLevelHundreds case termProg == "Terminus" || termProg == "Hyper": if termVal == "screen" { // on TERM=screen: not support true-color return terminfo.ColorLevelHundreds } return terminfo.ColorLevelMillions case termProg == "iTerm.app": if termVal == "screen" { // on TERM=screen: not support true-color return terminfo.ColorLevelHundreds } // check iTerm version ver := os.Getenv("TERM_PROGRAM_VERSION") if ver != "" { i, err := strconv.Atoi(strings.Split(ver, ".")[0]) if err != nil { saveInternalError(terminfo.ErrInvalidTermProgramVersion) // return terminfo.ColorLevelNone return terminfo.ColorLevelHundreds } if i == 3 { return terminfo.ColorLevelMillions } } return terminfo.ColorLevelHundreds } // otherwise determine from TERM's max_colors capability if !isWin && termVal != "" { debugf("TERM=%s - check color level by load terminfo file", termVal) ti, err := terminfo.Load(termVal) if err != nil { saveInternalError(err) return terminfo.ColorLevelNone } debugf("the loaded term info file is: %s", ti.File) v, ok := ti.Nums[terminfo.MaxColors] switch { case !ok || v <= 16: return terminfo.ColorLevelNone case ok && v >= 256: return terminfo.ColorLevelHundreds } return terminfo.ColorLevelBasic } // no TERM env value. default return none level return terminfo.ColorLevelNone // return terminfo.ColorLevelBasic } var detectedWSL bool var wslContents string // https://github.com/Microsoft/WSL/issues/423#issuecomment-221627364 func detectWSL() bool { if !detectedWSL { detectedWSL = true b := make([]byte, 1024) // `cat /proc/version` // on mac: // !not the file! // on linux(debian,ubuntu,alpine): // Linux version 4.19.121-linuxkit (root@18b3f92ade35) (gcc version 9.2.0 (Alpine 9.2.0)) #1 SMP Thu Jan 21 15:36:34 UTC 2021 // on win git bash, conEmu: // MINGW64_NT-10.0-19042 version 3.1.7-340.x86_64 (@WIN-N0G619FD3UK) (gcc version 9.3.0 (GCC) ) 2020-10-23 13:08 UTC // on WSL: // Linux version 4.4.0-19041-Microsoft (Microsoft@Microsoft.com) (gcc version 5.4.0 (GCC) ) #488-Microsoft Mon Sep 01 13:43:00 PST 2020 f, err := os.Open("/proc/version") if err == nil { _, _ = f.Read(b) // ignore error if err = f.Close(); err != nil { saveInternalError(err) } wslContents = string(b) return strings.Contains(wslContents, "Microsoft") } } return false } // refer // https://github.com/Delta456/box-cli-maker/blob/7b5a1ad8a016ce181e7d8b05e24b54ff60b4b38a/detect_unix.go#L27-L45 // detect WSL as it has True Color support func isWSL() bool { // on windows WSL: // - runtime.GOOS == "Linux" // - support true-color // WSL_DISTRO_NAME=Debian if val := os.Getenv("WSL_DISTRO_NAME"); val == "" { return false } // `cat /proc/sys/kernel/osrelease` // on mac: // !not the file! // on linux: // 4.19.121-linuxkit // on WSL Output: // 4.4.0-19041-Microsoft wsl, err := ioutil.ReadFile("/proc/sys/kernel/osrelease") if err != nil { saveInternalError(err) return false } // it gives "Microsoft" for WSL and "microsoft" for WSL 2 // it support True-color content := strings.ToLower(string(wsl)) return strings.Contains(content, "microsoft") } /************************************************************* * helper methods for check env *************************************************************/ // IsWindows OS env func IsWindows() bool { return runtime.GOOS == "windows" } // IsConsole Determine whether w is one of stderr, stdout, stdin func IsConsole(w io.Writer) bool { o, ok := w.(*os.File) if !ok { return false } fd := o.Fd() // fix: cannot use 'o == os.Stdout' to compare return fd == uintptr(syscall.Stdout) || fd == uintptr(syscall.Stdin) || fd == uintptr(syscall.Stderr) } // IsMSys msys(MINGW64) environment, does not necessarily support color func IsMSys() bool { // like "MSYSTEM=MINGW64" if len(os.Getenv("MSYSTEM")) > 0 { return true } return false } // IsSupportColor check current console is support color. // // NOTICE: The method will detect terminal info each times, // if only want get current color level, please direct call SupportColor() or TermColorLevel() func IsSupportColor() bool { return IsSupport16Color() } // IsSupportColor check current console is support color. // // NOTICE: The method will detect terminal info each times, // if only want get current color level, please direct call SupportColor() or TermColorLevel() func IsSupport16Color() bool { level, _ := detectTermColorLevel() return level > terminfo.ColorLevelNone } // IsSupport256Color render check // // NOTICE: The method will detect terminal info each times, // if only want get current color level, please direct call SupportColor() or TermColorLevel() func IsSupport256Color() bool { level, _ := detectTermColorLevel() return level > terminfo.ColorLevelBasic } // IsSupportRGBColor check. alias of the IsSupportTrueColor() // // NOTICE: The method will detect terminal info each times, // if only want get current color level, please direct call SupportColor() or TermColorLevel() func IsSupportRGBColor() bool { return IsSupportTrueColor() } // IsSupportTrueColor render check. // // NOTICE: The method will detect terminal info each times, // if only want get current color level, please direct call SupportColor() or TermColorLevel() // // ENV: // "COLORTERM=truecolor" // "COLORTERM=24bit" func IsSupportTrueColor() bool { level, _ := detectTermColorLevel() return level > terminfo.ColorLevelHundreds } ================================================ FILE: vendor/github.com/gookit/color/detect_nonwin.go ================================================ // +build !windows // The method in the file has no effect // Only for compatibility with non-Windows systems package color import ( "strings" "syscall" "github.com/xo/terminfo" ) // detect special term color support func detectSpecialTermColor(termVal string) (terminfo.ColorLevel, bool) { if termVal == "" { return terminfo.ColorLevelNone, false } debugf("terminfo check fail - fallback detect color by check TERM value") // on TERM=screen: // - support 256, not support true-color. test on macOS if termVal == "screen" { return terminfo.ColorLevelHundreds, false } if strings.Contains(termVal, "256color") { return terminfo.ColorLevelHundreds, false } if strings.Contains(termVal, "xterm") { return terminfo.ColorLevelHundreds, false // return terminfo.ColorLevelBasic, false } // return terminfo.ColorLevelNone, nil return terminfo.ColorLevelBasic, false } // IsTerminal returns true if the given file descriptor is a terminal. // // Usage: // IsTerminal(os.Stdout.Fd()) func IsTerminal(fd uintptr) bool { return fd == uintptr(syscall.Stdout) || fd == uintptr(syscall.Stdin) || fd == uintptr(syscall.Stderr) } ================================================ FILE: vendor/github.com/gookit/color/detect_windows.go ================================================ // +build windows // Display color on windows // refer: // golang.org/x/sys/windows // golang.org/x/crypto/ssh/terminal // https://docs.microsoft.com/en-us/windows/console package color import ( "os" "syscall" "unsafe" "github.com/xo/terminfo" "golang.org/x/sys/windows" ) // related docs // https://docs.microsoft.com/zh-cn/windows/console/console-virtual-terminal-sequences // https://docs.microsoft.com/zh-cn/windows/console/console-virtual-terminal-sequences#samples var ( // isMSys bool kernel32 *syscall.LazyDLL procGetConsoleMode *syscall.LazyProc procSetConsoleMode *syscall.LazyProc ) func init() { if !SupportColor() { isLikeInCmd = true return } // if disabled. if !Enable { return } // if at windows's ConEmu, Cmder, putty ... terminals not need VTP // -------- try force enable colors on windows terminal ------- tryEnableVTP(needVTP) // fetch console screen buffer info // err := getConsoleScreenBufferInfo(uintptr(syscall.Stdout), &defScreenInfo) } // try force enable colors on windows terminal func tryEnableVTP(enable bool) bool { if !enable { return false } debugf("True-Color by enable VirtualTerminalProcessing on windows") initKernel32Proc() // enable colors on windows terminal if tryEnableOnCONOUT() { return true } return tryEnableOnStdout() } func initKernel32Proc() { if kernel32 != nil { return } // load related windows dll // https://docs.microsoft.com/en-us/windows/console/setconsolemode kernel32 = syscall.NewLazyDLL("kernel32.dll") procGetConsoleMode = kernel32.NewProc("GetConsoleMode") procSetConsoleMode = kernel32.NewProc("SetConsoleMode") } func tryEnableOnCONOUT() bool { outHandle, err := syscall.Open("CONOUT$", syscall.O_RDWR, 0) if err != nil { saveInternalError(err) return false } err = EnableVirtualTerminalProcessing(outHandle, true) if err != nil { saveInternalError(err) return false } return true } func tryEnableOnStdout() bool { // try direct open syscall.Stdout err := EnableVirtualTerminalProcessing(syscall.Stdout, true) if err != nil { saveInternalError(err) return false } return true } // Get the Windows Version and Build Number var ( winVersion, _, buildNumber = windows.RtlGetNtVersionNumbers() ) // refer // https://github.com/Delta456/box-cli-maker/blob/7b5a1ad8a016ce181e7d8b05e24b54ff60b4b38a/detect_windows.go#L30-L57 // https://github.com/gookit/color/issues/25#issuecomment-738727917 // detects the Color Level Supported on windows: cmd, powerShell func detectSpecialTermColor(termVal string) (tl terminfo.ColorLevel, needVTP bool) { if os.Getenv("ConEmuANSI") == "ON" { debugf("support True Color by ConEmuANSI=ON") // ConEmuANSI is "ON" for generic ANSI support // but True Color option is enabled by default // I am just assuming that people wouldn't have disabled it // Even if it is not enabled then ConEmu will auto round off // accordingly return terminfo.ColorLevelMillions, false } // Before Windows 10 Build Number 10586, console never supported ANSI Colors if buildNumber < 10586 || winVersion < 10 { // Detect if using ANSICON on older systems if os.Getenv("ANSICON") != "" { conVersion := os.Getenv("ANSICON_VER") // 8 bit Colors were only supported after v1.81 release if conVersion >= "181" { return terminfo.ColorLevelHundreds, false } return terminfo.ColorLevelBasic, false } return terminfo.ColorLevelNone, false } // True Color is not available before build 14931 so fallback to 8 bit color. if buildNumber < 14931 { return terminfo.ColorLevelHundreds, true } // Windows 10 build 14931 is the first release that supports 16m/TrueColor debugf("support True Color on windows version is >= build 14931") return terminfo.ColorLevelMillions, true } /************************************************************* * render full color code on windows(8,16,24bit color) *************************************************************/ // docs https://docs.microsoft.com/zh-cn/windows/console/getconsolemode#parameters const ( // equals to docs page's ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004 EnableVirtualTerminalProcessingMode uint32 = 0x4 ) // EnableVirtualTerminalProcessing Enable virtual terminal processing // // ref from github.com/konsorten/go-windows-terminal-sequences // doc https://docs.microsoft.com/zh-cn/windows/console/console-virtual-terminal-sequences#samples // // Usage: // err := EnableVirtualTerminalProcessing(syscall.Stdout, true) // // support print color text // err = EnableVirtualTerminalProcessing(syscall.Stdout, false) func EnableVirtualTerminalProcessing(stream syscall.Handle, enable bool) error { var mode uint32 // Check if it is currently in the terminal // err := syscall.GetConsoleMode(syscall.Stdout, &mode) err := syscall.GetConsoleMode(stream, &mode) if err != nil { // fmt.Println("EnableVirtualTerminalProcessing", err) return err } if enable { mode |= EnableVirtualTerminalProcessingMode } else { mode &^= EnableVirtualTerminalProcessingMode } ret, _, err := procSetConsoleMode.Call(uintptr(stream), uintptr(mode)) if ret == 0 { return err } return nil } // renderColorCodeOnCmd enable cmd color render. // func renderColorCodeOnCmd(fn func()) { // err := EnableVirtualTerminalProcessing(syscall.Stdout, true) // // if is not in terminal, will clear color tag. // if err != nil { // // panic(err) // fn() // return // } // // // force open color render // old := ForceOpenColor() // fn() // // revert color setting // supportColor = old // // err = EnableVirtualTerminalProcessing(syscall.Stdout, false) // if err != nil { // panic(err) // } // } /************************************************************* * render simple color code on windows *************************************************************/ // IsTty returns true if the given file descriptor is a terminal. func IsTty(fd uintptr) bool { initKernel32Proc() var st uint32 r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, fd, uintptr(unsafe.Pointer(&st)), 0) return r != 0 && e == 0 } // IsTerminal returns true if the given file descriptor is a terminal. // // Usage: // fd := os.Stdout.Fd() // fd := uintptr(syscall.Stdout) // for windows // IsTerminal(fd) func IsTerminal(fd uintptr) bool { initKernel32Proc() var st uint32 r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, fd, uintptr(unsafe.Pointer(&st)), 0) return r != 0 && e == 0 } ================================================ FILE: vendor/github.com/gookit/color/printer.go ================================================ package color import "fmt" /************************************************************* * colored message Printer *************************************************************/ // PrinterFace interface type PrinterFace interface { fmt.Stringer Sprint(a ...interface{}) string Sprintf(format string, a ...interface{}) string Print(a ...interface{}) Printf(format string, a ...interface{}) Println(a ...interface{}) } // Printer a generic color message printer. // // Usage: // p := &Printer{Code: "32;45;3"} // p.Print("message") type Printer struct { // NoColor disable color. NoColor bool // Code color code string. eg "32;45;3" Code string } // NewPrinter instance func NewPrinter(colorCode string) *Printer { return &Printer{Code: colorCode} } // String returns color code string. eg: "32;45;3" func (p *Printer) String() string { // panic("implement me") return p.Code } // Sprint returns rendering colored messages func (p *Printer) Sprint(a ...interface{}) string { return RenderCode(p.String(), a...) } // Sprintf returns format and rendering colored messages func (p *Printer) Sprintf(format string, a ...interface{}) string { return RenderString(p.String(), fmt.Sprintf(format, a...)) } // Print rendering colored messages func (p *Printer) Print(a ...interface{}) { doPrintV2(p.String(), fmt.Sprint(a...)) } // Printf format and rendering colored messages func (p *Printer) Printf(format string, a ...interface{}) { doPrintV2(p.String(), fmt.Sprintf(format, a...)) } // Println rendering colored messages with newline func (p *Printer) Println(a ...interface{}) { doPrintlnV2(p.Code, a) } // IsEmpty color code func (p *Printer) IsEmpty() bool { return p.Code == "" } /************************************************************* * SimplePrinter struct *************************************************************/ // SimplePrinter use for quick use color print on inject to struct type SimplePrinter struct{} // Print message func (s *SimplePrinter) Print(v ...interface{}) { Print(v...) } // Printf message func (s *SimplePrinter) Printf(format string, v ...interface{}) { Printf(format, v...) } // Println message func (s *SimplePrinter) Println(v ...interface{}) { Println(v...) } // Infof message func (s *SimplePrinter) Infof(format string, a ...interface{}) { Info.Printf(format, a...) } // Infoln message func (s *SimplePrinter) Infoln(a ...interface{}) { Info.Println(a...) } // Warnf message func (s *SimplePrinter) Warnf(format string, a ...interface{}) { Warn.Printf(format, a...) } // Warnln message func (s *SimplePrinter) Warnln(a ...interface{}) { Warn.Println(a...) } // Errorf message func (s *SimplePrinter) Errorf(format string, a ...interface{}) { Error.Printf(format, a...) } // Errorln message func (s *SimplePrinter) Errorln(a ...interface{}) { Error.Println(a...) } ================================================ FILE: vendor/github.com/gookit/color/quickstart.go ================================================ package color /************************************************************* * quick use color print message *************************************************************/ // Redp print message with Red color func Redp(a ...interface{}) { Red.Print(a...) } // Redln print message line with Red color func Redln(a ...interface{}) { Red.Println(a...) } // Bluep print message with Blue color func Bluep(a ...interface{}) { Blue.Print(a...) } // Blueln print message line with Blue color func Blueln(a ...interface{}) { Blue.Println(a...) } // Cyanp print message with Cyan color func Cyanp(a ...interface{}) { Cyan.Print(a...) } // Cyanln print message line with Cyan color func Cyanln(a ...interface{}) { Cyan.Println(a...) } // Grayp print message with Gray color func Grayp(a ...interface{}) { Gray.Print(a...) } // Grayln print message line with Gray color func Grayln(a ...interface{}) { Gray.Println(a...) } // Greenp print message with Green color func Greenp(a ...interface{}) { Green.Print(a...) } // Greenln print message line with Green color func Greenln(a ...interface{}) { Green.Println(a...) } // Yellowp print message with Yellow color func Yellowp(a ...interface{}) { Yellow.Print(a...) } // Yellowln print message line with Yellow color func Yellowln(a ...interface{}) { Yellow.Println(a...) } // Magentap print message with Magenta color func Magentap(a ...interface{}) { Magenta.Print(a...) } // Magentaln print message line with Magenta color func Magentaln(a ...interface{}) { Magenta.Println(a...) } /************************************************************* * quick use style print message *************************************************************/ // Infof print message with Info style func Infof(format string, a ...interface{}) { Info.Printf(format, a...) } // Infoln print message with Info style func Infoln(a ...interface{}) { Info.Println(a...) } // Errorf print message with Error style func Errorf(format string, a ...interface{}) { Error.Printf(format, a...) } // Errorln print message with Error style func Errorln(a ...interface{}) { Error.Println(a...) } // Warnf print message with Warn style func Warnf(format string, a ...interface{}) { Warn.Printf(format, a...) } // Warnln print message with Warn style func Warnln(a ...interface{}) { Warn.Println(a...) } ================================================ FILE: vendor/github.com/gookit/color/style.go ================================================ package color import ( "fmt" "strings" ) /************************************************************* * 16 color Style *************************************************************/ // Style a 16 color style. can add: fg color, bg color, color options // // Example: // color.Style{color.FgGreen}.Print("message") type Style []Color // New create a custom style // // Usage: // color.New(color.FgGreen).Print("message") // equals to: // color.Style{color.FgGreen}.Print("message") func New(colors ...Color) Style { return colors } // Save to global styles map func (s Style) Save(name string) { AddStyle(name, s) } // Add to global styles map func (s *Style) Add(cs ...Color) { *s = append(*s, cs...) } // Render render text // Usage: // color.New(color.FgGreen).Render("text") // color.New(color.FgGreen, color.BgBlack, color.OpBold).Render("text") func (s Style) Render(a ...interface{}) string { return RenderCode(s.String(), a...) } // Renderln render text line. // like Println, will add spaces for each argument // Usage: // color.New(color.FgGreen).Renderln("text", "more") // color.New(color.FgGreen, color.BgBlack, color.OpBold).Render("text", "more") func (s Style) Renderln(a ...interface{}) string { return RenderWithSpaces(s.String(), a...) } // Sprint is alias of the 'Render' func (s Style) Sprint(a ...interface{}) string { return RenderCode(s.String(), a...) } // Sprintf format and render message. func (s Style) Sprintf(format string, a ...interface{}) string { return RenderString(s.String(), fmt.Sprintf(format, a...)) } // Print render and Print text func (s Style) Print(a ...interface{}) { doPrintV2(s.String(), fmt.Sprint(a...)) } // Printf render and print text func (s Style) Printf(format string, a ...interface{}) { doPrintV2(s.Code(), fmt.Sprintf(format, a...)) } // Println render and print text line func (s Style) Println(a ...interface{}) { doPrintlnV2(s.String(), a) } // Code convert to code string. returns like "32;45;3" func (s Style) Code() string { return s.String() } // String convert to code string. returns like "32;45;3" func (s Style) String() string { return Colors2code(s...) } // IsEmpty style func (s Style) IsEmpty() bool { return len(s) == 0 } /************************************************************* * Theme(extended Style) *************************************************************/ // Theme definition. extends from Style type Theme struct { // Name theme name Name string // Style for the theme Style } // NewTheme instance func NewTheme(name string, style Style) *Theme { return &Theme{name, style} } // Save to themes map func (t *Theme) Save() { AddTheme(t.Name, t.Style) } // Tips use name as title, only apply style for name func (t *Theme) Tips(format string, a ...interface{}) { // only apply style for name t.Print(strings.ToUpper(t.Name) + ": ") Printf(format+"\n", a...) } // Prompt use name as title, and apply style for message func (t *Theme) Prompt(format string, a ...interface{}) { title := strings.ToUpper(t.Name) + ":" t.Println(title, fmt.Sprintf(format, a...)) } // Block like Prompt, but will wrap a empty line func (t *Theme) Block(format string, a ...interface{}) { title := strings.ToUpper(t.Name) + ":\n" t.Println(title, fmt.Sprintf(format, a...)) } /************************************************************* * Theme: internal themes *************************************************************/ // internal themes(like bootstrap style) // Usage: // color.Info.Print("message") // color.Info.Printf("a %s message", "test") // color.Warn.Println("message") // color.Error.Println("message") var ( // Info color style Info = &Theme{"info", Style{OpReset, FgGreen}} // Note color style Note = &Theme{"note", Style{OpBold, FgLightCyan}} // Warn color style Warn = &Theme{"warning", Style{OpBold, FgYellow}} // Light color style Light = &Theme{"light", Style{FgLightWhite, BgBlack}} // Error color style Error = &Theme{"error", Style{FgLightWhite, BgRed}} // Danger color style Danger = &Theme{"danger", Style{OpBold, FgRed}} // Debug color style Debug = &Theme{"debug", Style{OpReset, FgCyan}} // Notice color style Notice = &Theme{"notice", Style{OpBold, FgCyan}} // Comment color style Comment = &Theme{"comment", Style{OpReset, FgYellow}} // Success color style Success = &Theme{"success", Style{OpBold, FgGreen}} // Primary color style Primary = &Theme{"primary", Style{OpReset, FgBlue}} // Question color style Question = &Theme{"question", Style{OpReset, FgMagenta}} // Secondary color style Secondary = &Theme{"secondary", Style{FgDarkGray}} ) // Themes internal defined themes. // Usage: // color.Themes["info"].Println("message") var Themes = map[string]*Theme{ "info": Info, "note": Note, "light": Light, "error": Error, "debug": Debug, "danger": Danger, "notice": Notice, "success": Success, "comment": Comment, "primary": Primary, "warning": Warn, "question": Question, "secondary": Secondary, } // AddTheme add a theme and style func AddTheme(name string, style Style) { Themes[name] = NewTheme(name, style) Styles[name] = style } // GetTheme get defined theme by name func GetTheme(name string) *Theme { return Themes[name] } /************************************************************* * internal styles *************************************************************/ // Styles internal defined styles, like bootstrap styles. // Usage: // color.Styles["info"].Println("message") var Styles = map[string]Style{ "info": {OpReset, FgGreen}, "note": {OpBold, FgLightCyan}, "light": {FgLightWhite, BgRed}, "error": {FgLightWhite, BgRed}, "danger": {OpBold, FgRed}, "notice": {OpBold, FgCyan}, "success": {OpBold, FgGreen}, "comment": {OpReset, FgMagenta}, "primary": {OpReset, FgBlue}, "warning": {OpBold, FgYellow}, "question": {OpReset, FgMagenta}, "secondary": {FgDarkGray}, } // some style name alias var styleAliases = map[string]string{ "err": "error", "suc": "success", "warn": "warning", } // AddStyle add a style func AddStyle(name string, s Style) { Styles[name] = s } // GetStyle get defined style by name func GetStyle(name string) Style { if s, ok := Styles[name]; ok { return s } if realName, ok := styleAliases[name]; ok { return Styles[realName] } // empty style return New() } /************************************************************* * color scheme *************************************************************/ // Scheme struct type Scheme struct { Name string Styles map[string]Style } // NewScheme create new Scheme func NewScheme(name string, styles map[string]Style) *Scheme { return &Scheme{Name: name, Styles: styles} } // NewDefaultScheme create an defuault color Scheme func NewDefaultScheme(name string) *Scheme { return NewScheme(name, map[string]Style{ "info": {OpReset, FgGreen}, "warn": {OpBold, FgYellow}, "error": {FgLightWhite, BgRed}, }) } // Style get by name func (s *Scheme) Style(name string) Style { return s.Styles[name] } // Infof message print func (s *Scheme) Infof(format string, a ...interface{}) { s.Styles["info"].Printf(format, a...) } // Infoln message print func (s *Scheme) Infoln(v ...interface{}) { s.Styles["info"].Println(v...) } // Warnf message print func (s *Scheme) Warnf(format string, a ...interface{}) { s.Styles["warn"].Printf(format, a...) } // Warnln message print func (s *Scheme) Warnln(v ...interface{}) { s.Styles["warn"].Println(v...) } // Errorf message print func (s *Scheme) Errorf(format string, a ...interface{}) { s.Styles["error"].Printf(format, a...) } // Errorln message print func (s *Scheme) Errorln(v ...interface{}) { s.Styles["error"].Println(v...) } ================================================ FILE: vendor/github.com/gookit/color/utils.go ================================================ package color import ( "fmt" "io" "log" "strings" ) // SetTerminal by given code. func SetTerminal(code string) error { if !Enable || !SupportColor() { return nil } _, err := fmt.Fprintf(output, SettingTpl, code) return err } // ResetTerminal terminal setting. func ResetTerminal() error { if !Enable || !SupportColor() { return nil } _, err := fmt.Fprint(output, ResetSet) return err } /************************************************************* * print methods(will auto parse color tags) *************************************************************/ // Print render color tag and print messages func Print(a ...interface{}) { Fprint(output, a...) } // Printf format and print messages func Printf(format string, a ...interface{}) { Fprintf(output, format, a...) } // Println messages with new line func Println(a ...interface{}) { Fprintln(output, a...) } // Fprint print rendered messages to writer // Notice: will ignore print error func Fprint(w io.Writer, a ...interface{}) { _, err := fmt.Fprint(w, Render(a...)) saveInternalError(err) // if isLikeInCmd { // renderColorCodeOnCmd(func() { // _, _ = fmt.Fprint(w, Render(a...)) // }) // } else { // _, _ = fmt.Fprint(w, Render(a...)) // } } // Fprintf print format and rendered messages to writer. // Notice: will ignore print error func Fprintf(w io.Writer, format string, a ...interface{}) { str := fmt.Sprintf(format, a...) _, err := fmt.Fprint(w, ReplaceTag(str)) saveInternalError(err) } // Fprintln print rendered messages line to writer // Notice: will ignore print error func Fprintln(w io.Writer, a ...interface{}) { str := formatArgsForPrintln(a) _, err := fmt.Fprintln(w, ReplaceTag(str)) saveInternalError(err) } // Lprint passes colored messages to a log.Logger for printing. // Notice: should be goroutine safe func Lprint(l *log.Logger, a ...interface{}) { l.Print(Render(a...)) } // Render parse color tags, return rendered string. // Usage: // text := Render("hello world!") // fmt.Println(text) func Render(a ...interface{}) string { if len(a) == 0 { return "" } return ReplaceTag(fmt.Sprint(a...)) } // Sprint parse color tags, return rendered string func Sprint(a ...interface{}) string { if len(a) == 0 { return "" } return ReplaceTag(fmt.Sprint(a...)) } // Sprintf format and return rendered string func Sprintf(format string, a ...interface{}) string { return ReplaceTag(fmt.Sprintf(format, a...)) } // String alias of the ReplaceTag func String(s string) string { return ReplaceTag(s) } // Text alias of the ReplaceTag func Text(s string) string { return ReplaceTag(s) } // Uint8sToInts convert []uint8 to []int // func Uint8sToInts(u8s []uint8 ) []int { // ints := make([]int, len(u8s)) // for i, u8 := range u8s { // ints[i] = int(u8) // } // return ints // } /************************************************************* * helper methods for print *************************************************************/ // new implementation, support render full color code on pwsh.exe, cmd.exe func doPrintV2(code, str string) { _, err := fmt.Fprint(output, RenderString(code, str)) saveInternalError(err) // if isLikeInCmd { // renderColorCodeOnCmd(func() { // _, _ = fmt.Fprint(output, RenderString(code, str)) // }) // } else { // _, _ = fmt.Fprint(output, RenderString(code, str)) // } } // new implementation, support render full color code on pwsh.exe, cmd.exe func doPrintlnV2(code string, args []interface{}) { str := formatArgsForPrintln(args) _, err := fmt.Fprintln(output, RenderString(code, str)) saveInternalError(err) } // use Println, will add spaces for each arg func formatArgsForPrintln(args []interface{}) (message string) { if ln := len(args); ln == 0 { message = "" } else if ln == 1 { message = fmt.Sprint(args[0]) } else { message = fmt.Sprintln(args...) // clear last "\n" message = message[:len(message)-1] } return } /************************************************************* * helper methods *************************************************************/ // is on debug mode // func isDebugMode() bool { // return debugMode == "on" // } func debugf(f string, v ...interface{}) { if debugMode { fmt.Print("COLOR_DEBUG: ") fmt.Printf(f, v...) fmt.Println() } } // equals: return ok ? val1 : val2 func compareVal(ok bool, val1, val2 uint8) uint8 { if ok { return val1 } return val2 } // equals: return ok ? val1 : val2 func compareF64Val(ok bool, val1, val2 float64) float64 { if ok { return val1 } return val2 } func saveInternalError(err error) { if err != nil { debugf("inner error: %s", err.Error()) innerErrs = append(innerErrs, err) } } func stringToArr(str, sep string) (arr []string) { str = strings.TrimSpace(str) if str == "" { return } ss := strings.Split(str, sep) for _, val := range ss { if val = strings.TrimSpace(val); val != "" { arr = append(arr, val) } } return } ================================================ FILE: vendor/github.com/imdario/mergo/.deepsource.toml ================================================ version = 1 test_patterns = [ "*_test.go" ] [[analyzers]] name = "go" enabled = true [analyzers.meta] import_path = "github.com/imdario/mergo" ================================================ FILE: vendor/github.com/imdario/mergo/.gitignore ================================================ #### joe made this: http://goel.io/joe #### go #### # Binaries for programs and plugins *.exe *.dll *.so *.dylib # Test binary, build with `go test -c` *.test # Output of the go coverage tool, specifically when used with LiteIDE *.out # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 .glide/ #### vim #### # Swap [._]*.s[a-v][a-z] [._]*.sw[a-p] [._]s[a-v][a-z] [._]sw[a-p] # Session Session.vim # Temporary .netrwhist *~ # Auto-generated tag files tags ================================================ FILE: vendor/github.com/imdario/mergo/.travis.yml ================================================ language: go arch: - amd64 - ppc64le install: - go get -t - go get golang.org/x/tools/cmd/cover - go get github.com/mattn/goveralls script: - go test -race -v ./... after_script: - $HOME/gopath/bin/goveralls -service=travis-ci -repotoken $COVERALLS_TOKEN ================================================ FILE: vendor/github.com/imdario/mergo/CODE_OF_CONDUCT.md ================================================ # Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism * Focusing on what is best for the community * Showing empathy towards other community members Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at i@dario.im. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] [homepage]: http://contributor-covenant.org [version]: http://contributor-covenant.org/version/1/4/ ================================================ FILE: vendor/github.com/imdario/mergo/CONTRIBUTING.md ================================================ # Contributing to mergo First off, thanks for taking the time to contribute! ❤️ All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉 > And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about: > - Star the project > - Tweet about it > - Refer this project in your project's readme > - Mention the project at local meetups and tell your friends/colleagues ## Table of Contents - [Code of Conduct](#code-of-conduct) - [I Have a Question](#i-have-a-question) - [I Want To Contribute](#i-want-to-contribute) - [Reporting Bugs](#reporting-bugs) - [Suggesting Enhancements](#suggesting-enhancements) ## Code of Conduct This project and everyone participating in it is governed by the [mergo Code of Conduct](https://github.com/imdario/mergoblob/master/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to <>. ## I Have a Question > If you want to ask a question, we assume that you have read the available [Documentation](https://pkg.go.dev/github.com/imdario/mergo). Before you ask a question, it is best to search for existing [Issues](https://github.com/imdario/mergo/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first. If you then still feel the need to ask a question and need clarification, we recommend the following: - Open an [Issue](https://github.com/imdario/mergo/issues/new). - Provide as much context as you can about what you're running into. - Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. We will then take care of the issue as soon as possible. ## I Want To Contribute > ### Legal Notice > When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license. ### Reporting Bugs #### Before Submitting a Bug Report A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible. - Make sure that you are using the latest version. - Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](). If you are looking for support, you might want to check [this section](#i-have-a-question)). - To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/imdario/mergoissues?q=label%3Abug). - Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue. - Collect information about the bug: - Stack trace (Traceback) - OS, Platform and Version (Windows, Linux, macOS, x86, ARM) - Version of the interpreter, compiler, SDK, runtime environment, package manager, depending on what seems relevant. - Possibly your input and the output - Can you reliably reproduce the issue? And can you also reproduce it with older versions? #### How Do I Submit a Good Bug Report? > You must never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to . We use GitHub issues to track bugs and errors. If you run into an issue with the project: - Open an [Issue](https://github.com/imdario/mergo/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.) - Explain the behavior you would expect and the actual behavior. - Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case. - Provide the information you collected in the previous section. Once it's filed: - The project team will label the issue accordingly. - A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced. - If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be implemented by someone. ### Suggesting Enhancements This section guides you through submitting an enhancement suggestion for mergo, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions. #### Before Submitting an Enhancement - Make sure that you are using the latest version. - Read the [documentation]() carefully and find out if the functionality is already covered, maybe by an individual configuration. - Perform a [search](https://github.com/imdario/mergo/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one. - Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library. #### How Do I Submit a Good Enhancement Suggestion? Enhancement suggestions are tracked as [GitHub issues](https://github.com/imdario/mergo/issues). - Use a **clear and descriptive title** for the issue to identify the suggestion. - Provide a **step-by-step description of the suggested enhancement** in as many details as possible. - **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you. - You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux. - **Explain why this enhancement would be useful** to most mergo users. You may also want to point out the other projects that solved it better and which could serve as inspiration. ## Attribution This guide is based on the **contributing-gen**. [Make your own](https://github.com/bttger/contributing-gen)! ================================================ FILE: vendor/github.com/imdario/mergo/LICENSE ================================================ Copyright (c) 2013 Dario Castañé. All rights reserved. Copyright (c) 2012 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. ================================================ FILE: vendor/github.com/imdario/mergo/README.md ================================================ # Mergo [![GitHub release][5]][6] [![GoCard][7]][8] [![Test status][1]][2] [![OpenSSF Scorecard][21]][22] [![OpenSSF Best Practices][19]][20] [![Coverage status][9]][10] [![Sourcegraph][11]][12] [![FOSSA status][13]][14] [![GoDoc][3]][4] [![Become my sponsor][15]][16] [![Tidelift][17]][18] [1]: https://github.com/imdario/mergo/workflows/tests/badge.svg?branch=master [2]: https://github.com/imdario/mergo/actions/workflows/tests.yml [3]: https://godoc.org/github.com/imdario/mergo?status.svg [4]: https://godoc.org/github.com/imdario/mergo [5]: https://img.shields.io/github/release/imdario/mergo.svg [6]: https://github.com/imdario/mergo/releases [7]: https://goreportcard.com/badge/imdario/mergo [8]: https://goreportcard.com/report/github.com/imdario/mergo [9]: https://coveralls.io/repos/github/imdario/mergo/badge.svg?branch=master [10]: https://coveralls.io/github/imdario/mergo?branch=master [11]: https://sourcegraph.com/github.com/imdario/mergo/-/badge.svg [12]: https://sourcegraph.com/github.com/imdario/mergo?badge [13]: https://app.fossa.io/api/projects/git%2Bgithub.com%2Fimdario%2Fmergo.svg?type=shield [14]: https://app.fossa.io/projects/git%2Bgithub.com%2Fimdario%2Fmergo?ref=badge_shield [15]: https://img.shields.io/github/sponsors/imdario [16]: https://github.com/sponsors/imdario [17]: https://tidelift.com/badges/package/go/github.com%2Fimdario%2Fmergo [18]: https://tidelift.com/subscription/pkg/go-github.com-imdario-mergo [19]: https://bestpractices.coreinfrastructure.org/projects/7177/badge [20]: https://bestpractices.coreinfrastructure.org/projects/7177 [21]: https://api.securityscorecards.dev/projects/github.com/imdario/mergo/badge [22]: https://api.securityscorecards.dev/projects/github.com/imdario/mergo A helper to merge structs and maps in Golang. Useful for configuration default values, avoiding messy if-statements. Mergo merges same-type structs and maps by setting default values in zero-value fields. Mergo won't merge unexported (private) fields. It will do recursively any exported one. It also won't merge structs inside maps (because they are not addressable using Go reflection). Also a lovely [comune](http://en.wikipedia.org/wiki/Mergo) (municipality) in the Province of Ancona in the Italian region of Marche. ## Status It is ready for production use. [It is used in several projects by Docker, Google, The Linux Foundation, VMWare, Shopify, Microsoft, etc](https://github.com/imdario/mergo#mergo-in-the-wild). ### Important note Please keep in mind that a problematic PR broke [0.3.9](//github.com/imdario/mergo/releases/tag/0.3.9). I reverted it in [0.3.10](//github.com/imdario/mergo/releases/tag/0.3.10), and I consider it stable but not bug-free. Also, this version adds support for go modules. Keep in mind that in [0.3.2](//github.com/imdario/mergo/releases/tag/0.3.2), Mergo changed `Merge()`and `Map()` signatures to support [transformers](#transformers). I added an optional/variadic argument so that it won't break the existing code. If you were using Mergo before April 6th, 2015, please check your project works as intended after updating your local copy with ```go get -u github.com/imdario/mergo```. I apologize for any issue caused by its previous behavior and any future bug that Mergo could cause in existing projects after the change (release 0.2.0). ### Donations If Mergo is useful to you, consider buying me a coffee, a beer, or making a monthly donation to allow me to keep building great free software. :heart_eyes: Buy Me a Coffee at ko-fi.com Donate using Liberapay Become my sponsor ### Mergo in the wild - [moby/moby](https://github.com/moby/moby) - [kubernetes/kubernetes](https://github.com/kubernetes/kubernetes) - [vmware/dispatch](https://github.com/vmware/dispatch) - [Shopify/themekit](https://github.com/Shopify/themekit) - [imdario/zas](https://github.com/imdario/zas) - [matcornic/hermes](https://github.com/matcornic/hermes) - [OpenBazaar/openbazaar-go](https://github.com/OpenBazaar/openbazaar-go) - [kataras/iris](https://github.com/kataras/iris) - [michaelsauter/crane](https://github.com/michaelsauter/crane) - [go-task/task](https://github.com/go-task/task) - [sensu/uchiwa](https://github.com/sensu/uchiwa) - [ory/hydra](https://github.com/ory/hydra) - [sisatech/vcli](https://github.com/sisatech/vcli) - [dairycart/dairycart](https://github.com/dairycart/dairycart) - [projectcalico/felix](https://github.com/projectcalico/felix) - [resin-os/balena](https://github.com/resin-os/balena) - [go-kivik/kivik](https://github.com/go-kivik/kivik) - [Telefonica/govice](https://github.com/Telefonica/govice) - [supergiant/supergiant](supergiant/supergiant) - [SergeyTsalkov/brooce](https://github.com/SergeyTsalkov/brooce) - [soniah/dnsmadeeasy](https://github.com/soniah/dnsmadeeasy) - [ohsu-comp-bio/funnel](https://github.com/ohsu-comp-bio/funnel) - [EagerIO/Stout](https://github.com/EagerIO/Stout) - [lynndylanhurley/defsynth-api](https://github.com/lynndylanhurley/defsynth-api) - [russross/canvasassignments](https://github.com/russross/canvasassignments) - [rdegges/cryptly-api](https://github.com/rdegges/cryptly-api) - [casualjim/exeggutor](https://github.com/casualjim/exeggutor) - [divshot/gitling](https://github.com/divshot/gitling) - [RWJMurphy/gorl](https://github.com/RWJMurphy/gorl) - [andrerocker/deploy42](https://github.com/andrerocker/deploy42) - [elwinar/rambler](https://github.com/elwinar/rambler) - [tmaiaroto/gopartman](https://github.com/tmaiaroto/gopartman) - [jfbus/impressionist](https://github.com/jfbus/impressionist) - [Jmeyering/zealot](https://github.com/Jmeyering/zealot) - [godep-migrator/rigger-host](https://github.com/godep-migrator/rigger-host) - [Dronevery/MultiwaySwitch-Go](https://github.com/Dronevery/MultiwaySwitch-Go) - [thoas/picfit](https://github.com/thoas/picfit) - [mantasmatelis/whooplist-server](https://github.com/mantasmatelis/whooplist-server) - [jnuthong/item_search](https://github.com/jnuthong/item_search) - [bukalapak/snowboard](https://github.com/bukalapak/snowboard) - [containerssh/containerssh](https://github.com/containerssh/containerssh) - [goreleaser/goreleaser](https://github.com/goreleaser/goreleaser) - [tjpnz/structbot](https://github.com/tjpnz/structbot) ## Install go get github.com/imdario/mergo // use in your .go code import ( "github.com/imdario/mergo" ) ## Usage You can only merge same-type structs with exported fields initialized as zero value of their type and same-types maps. Mergo won't merge unexported (private) fields but will do recursively any exported one. It won't merge empty structs value as [they are zero values](https://golang.org/ref/spec#The_zero_value) too. Also, maps will be merged recursively except for structs inside maps (because they are not addressable using Go reflection). ```go if err := mergo.Merge(&dst, src); err != nil { // ... } ``` Also, you can merge overwriting values using the transformer `WithOverride`. ```go if err := mergo.Merge(&dst, src, mergo.WithOverride); err != nil { // ... } ``` Additionally, you can map a `map[string]interface{}` to a struct (and otherwise, from struct to map), following the same restrictions as in `Merge()`. Keys are capitalized to find each corresponding exported field. ```go if err := mergo.Map(&dst, srcMap); err != nil { // ... } ``` Warning: if you map a struct to map, it won't do it recursively. Don't expect Mergo to map struct members of your struct as `map[string]interface{}`. They will be just assigned as values. Here is a nice example: ```go package main import ( "fmt" "github.com/imdario/mergo" ) type Foo struct { A string B int64 } func main() { src := Foo{ A: "one", B: 2, } dest := Foo{ A: "two", } mergo.Merge(&dest, src) fmt.Println(dest) // Will print // {two 2} } ``` Note: if test are failing due missing package, please execute: go get gopkg.in/yaml.v3 ### Transformers Transformers allow to merge specific types differently than in the default behavior. In other words, now you can customize how some types are merged. For example, `time.Time` is a struct; it doesn't have zero value but IsZero can return true because it has fields with zero value. How can we merge a non-zero `time.Time`? ```go package main import ( "fmt" "github.com/imdario/mergo" "reflect" "time" ) type timeTransformer struct { } func (t timeTransformer) Transformer(typ reflect.Type) func(dst, src reflect.Value) error { if typ == reflect.TypeOf(time.Time{}) { return func(dst, src reflect.Value) error { if dst.CanSet() { isZero := dst.MethodByName("IsZero") result := isZero.Call([]reflect.Value{}) if result[0].Bool() { dst.Set(src) } } return nil } } return nil } type Snapshot struct { Time time.Time // ... } func main() { src := Snapshot{time.Now()} dest := Snapshot{} mergo.Merge(&dest, src, mergo.WithTransformers(timeTransformer{})) fmt.Println(dest) // Will print // { 2018-01-12 01:15:00 +0000 UTC m=+0.000000001 } } ``` ## Contact me If I can help you, you have an idea or you are using Mergo in your projects, don't hesitate to drop me a line (or a pull request): [@im_dario](https://twitter.com/im_dario) ## About Written by [Dario Castañé](http://dario.im). ## License [BSD 3-Clause](http://opensource.org/licenses/BSD-3-Clause) license, as [Go language](http://golang.org/LICENSE). [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fimdario%2Fmergo.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fimdario%2Fmergo?ref=badge_large) ================================================ FILE: vendor/github.com/imdario/mergo/SECURITY.md ================================================ # Security Policy ## Supported Versions | Version | Supported | | ------- | ------------------ | | 0.3.x | :white_check_mark: | | < 0.3 | :x: | ## Security contact information To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. ================================================ FILE: vendor/github.com/imdario/mergo/doc.go ================================================ // Copyright 2013 Dario Castañé. All rights reserved. // 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. /* A helper to merge structs and maps in Golang. Useful for configuration default values, avoiding messy if-statements. Mergo merges same-type structs and maps by setting default values in zero-value fields. Mergo won't merge unexported (private) fields. It will do recursively any exported one. It also won't merge structs inside maps (because they are not addressable using Go reflection). Status It is ready for production use. It is used in several projects by Docker, Google, The Linux Foundation, VMWare, Shopify, etc. Important note Please keep in mind that a problematic PR broke 0.3.9. We reverted it in 0.3.10. We consider 0.3.10 as stable but not bug-free. . Also, this version adds suppot for go modules. Keep in mind that in 0.3.2, Mergo changed Merge() and Map() signatures to support transformers. We added an optional/variadic argument so that it won't break the existing code. If you were using Mergo before April 6th, 2015, please check your project works as intended after updating your local copy with go get -u github.com/imdario/mergo. I apologize for any issue caused by its previous behavior and any future bug that Mergo could cause in existing projects after the change (release 0.2.0). Install Do your usual installation procedure: go get github.com/imdario/mergo // use in your .go code import ( "github.com/imdario/mergo" ) Usage You can only merge same-type structs with exported fields initialized as zero value of their type and same-types maps. Mergo won't merge unexported (private) fields but will do recursively any exported one. It won't merge empty structs value as they are zero values too. Also, maps will be merged recursively except for structs inside maps (because they are not addressable using Go reflection). if err := mergo.Merge(&dst, src); err != nil { // ... } Also, you can merge overwriting values using the transformer WithOverride. if err := mergo.Merge(&dst, src, mergo.WithOverride); err != nil { // ... } Additionally, you can map a map[string]interface{} to a struct (and otherwise, from struct to map), following the same restrictions as in Merge(). Keys are capitalized to find each corresponding exported field. if err := mergo.Map(&dst, srcMap); err != nil { // ... } Warning: if you map a struct to map, it won't do it recursively. Don't expect Mergo to map struct members of your struct as map[string]interface{}. They will be just assigned as values. Here is a nice example: package main import ( "fmt" "github.com/imdario/mergo" ) type Foo struct { A string B int64 } func main() { src := Foo{ A: "one", B: 2, } dest := Foo{ A: "two", } mergo.Merge(&dest, src) fmt.Println(dest) // Will print // {two 2} } Transformers Transformers allow to merge specific types differently than in the default behavior. In other words, now you can customize how some types are merged. For example, time.Time is a struct; it doesn't have zero value but IsZero can return true because it has fields with zero value. How can we merge a non-zero time.Time? package main import ( "fmt" "github.com/imdario/mergo" "reflect" "time" ) type timeTransformer struct { } func (t timeTransformer) Transformer(typ reflect.Type) func(dst, src reflect.Value) error { if typ == reflect.TypeOf(time.Time{}) { return func(dst, src reflect.Value) error { if dst.CanSet() { isZero := dst.MethodByName("IsZero") result := isZero.Call([]reflect.Value{}) if result[0].Bool() { dst.Set(src) } } return nil } } return nil } type Snapshot struct { Time time.Time // ... } func main() { src := Snapshot{time.Now()} dest := Snapshot{} mergo.Merge(&dest, src, mergo.WithTransformers(timeTransformer{})) fmt.Println(dest) // Will print // { 2018-01-12 01:15:00 +0000 UTC m=+0.000000001 } } Contact me If I can help you, you have an idea or you are using Mergo in your projects, don't hesitate to drop me a line (or a pull request): https://twitter.com/im_dario About Written by Dario Castañé: https://da.rio.hn License BSD 3-Clause license, as Go language. */ package mergo ================================================ FILE: vendor/github.com/imdario/mergo/map.go ================================================ // Copyright 2014 Dario Castañé. All rights reserved. // 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. // Based on src/pkg/reflect/deepequal.go from official // golang's stdlib. package mergo import ( "fmt" "reflect" "unicode" "unicode/utf8" ) func changeInitialCase(s string, mapper func(rune) rune) string { if s == "" { return s } r, n := utf8.DecodeRuneInString(s) return string(mapper(r)) + s[n:] } func isExported(field reflect.StructField) bool { r, _ := utf8.DecodeRuneInString(field.Name) return r >= 'A' && r <= 'Z' } // Traverses recursively both values, assigning src's fields values to dst. // The map argument tracks comparisons that have already been seen, which allows // short circuiting on recursive types. func deepMap(dst, src reflect.Value, visited map[uintptr]*visit, depth int, config *Config) (err error) { overwrite := config.Overwrite if dst.CanAddr() { addr := dst.UnsafeAddr() h := 17 * addr seen := visited[h] typ := dst.Type() for p := seen; p != nil; p = p.next { if p.ptr == addr && p.typ == typ { return nil } } // Remember, remember... visited[h] = &visit{typ, seen, addr} } zeroValue := reflect.Value{} switch dst.Kind() { case reflect.Map: dstMap := dst.Interface().(map[string]interface{}) for i, n := 0, src.NumField(); i < n; i++ { srcType := src.Type() field := srcType.Field(i) if !isExported(field) { continue } fieldName := field.Name fieldName = changeInitialCase(fieldName, unicode.ToLower) if v, ok := dstMap[fieldName]; !ok || (isEmptyValue(reflect.ValueOf(v), !config.ShouldNotDereference) || overwrite) { dstMap[fieldName] = src.Field(i).Interface() } } case reflect.Ptr: if dst.IsNil() { v := reflect.New(dst.Type().Elem()) dst.Set(v) } dst = dst.Elem() fallthrough case reflect.Struct: srcMap := src.Interface().(map[string]interface{}) for key := range srcMap { config.overwriteWithEmptyValue = true srcValue := srcMap[key] fieldName := changeInitialCase(key, unicode.ToUpper) dstElement := dst.FieldByName(fieldName) if dstElement == zeroValue { // We discard it because the field doesn't exist. continue } srcElement := reflect.ValueOf(srcValue) dstKind := dstElement.Kind() srcKind := srcElement.Kind() if srcKind == reflect.Ptr && dstKind != reflect.Ptr { srcElement = srcElement.Elem() srcKind = reflect.TypeOf(srcElement.Interface()).Kind() } else if dstKind == reflect.Ptr { // Can this work? I guess it can't. if srcKind != reflect.Ptr && srcElement.CanAddr() { srcPtr := srcElement.Addr() srcElement = reflect.ValueOf(srcPtr) srcKind = reflect.Ptr } } if !srcElement.IsValid() { continue } if srcKind == dstKind { if err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil { return } } else if dstKind == reflect.Interface && dstElement.Kind() == reflect.Interface { if err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil { return } } else if srcKind == reflect.Map { if err = deepMap(dstElement, srcElement, visited, depth+1, config); err != nil { return } } else { return fmt.Errorf("type mismatch on %s field: found %v, expected %v", fieldName, srcKind, dstKind) } } } return } // Map sets fields' values in dst from src. // src can be a map with string keys or a struct. dst must be the opposite: // if src is a map, dst must be a valid pointer to struct. If src is a struct, // dst must be map[string]interface{}. // It won't merge unexported (private) fields and will do recursively // any exported field. // If dst is a map, keys will be src fields' names in lower camel case. // Missing key in src that doesn't match a field in dst will be skipped. This // doesn't apply if dst is a map. // This is separated method from Merge because it is cleaner and it keeps sane // semantics: merging equal types, mapping different (restricted) types. func Map(dst, src interface{}, opts ...func(*Config)) error { return _map(dst, src, opts...) } // MapWithOverwrite will do the same as Map except that non-empty dst attributes will be overridden by // non-empty src attribute values. // Deprecated: Use Map(…) with WithOverride func MapWithOverwrite(dst, src interface{}, opts ...func(*Config)) error { return _map(dst, src, append(opts, WithOverride)...) } func _map(dst, src interface{}, opts ...func(*Config)) error { if dst != nil && reflect.ValueOf(dst).Kind() != reflect.Ptr { return ErrNonPointerArgument } var ( vDst, vSrc reflect.Value err error ) config := &Config{} for _, opt := range opts { opt(config) } if vDst, vSrc, err = resolveValues(dst, src); err != nil { return err } // To be friction-less, we redirect equal-type arguments // to deepMerge. Only because arguments can be anything. if vSrc.Kind() == vDst.Kind() { return deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0, config) } switch vSrc.Kind() { case reflect.Struct: if vDst.Kind() != reflect.Map { return ErrExpectedMapAsDestination } case reflect.Map: if vDst.Kind() != reflect.Struct { return ErrExpectedStructAsDestination } default: return ErrNotSupported } return deepMap(vDst, vSrc, make(map[uintptr]*visit), 0, config) } ================================================ FILE: vendor/github.com/imdario/mergo/merge.go ================================================ // Copyright 2013 Dario Castañé. All rights reserved. // 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. // Based on src/pkg/reflect/deepequal.go from official // golang's stdlib. package mergo import ( "fmt" "reflect" ) func hasMergeableFields(dst reflect.Value) (exported bool) { for i, n := 0, dst.NumField(); i < n; i++ { field := dst.Type().Field(i) if field.Anonymous && dst.Field(i).Kind() == reflect.Struct { exported = exported || hasMergeableFields(dst.Field(i)) } else if isExportedComponent(&field) { exported = exported || len(field.PkgPath) == 0 } } return } func isExportedComponent(field *reflect.StructField) bool { pkgPath := field.PkgPath if len(pkgPath) > 0 { return false } c := field.Name[0] if 'a' <= c && c <= 'z' || c == '_' { return false } return true } type Config struct { Transformers Transformers Overwrite bool ShouldNotDereference bool AppendSlice bool TypeCheck bool overwriteWithEmptyValue bool overwriteSliceWithEmptyValue bool sliceDeepCopy bool debug bool } type Transformers interface { Transformer(reflect.Type) func(dst, src reflect.Value) error } // Traverses recursively both values, assigning src's fields values to dst. // The map argument tracks comparisons that have already been seen, which allows // short circuiting on recursive types. func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, config *Config) (err error) { overwrite := config.Overwrite typeCheck := config.TypeCheck overwriteWithEmptySrc := config.overwriteWithEmptyValue overwriteSliceWithEmptySrc := config.overwriteSliceWithEmptyValue sliceDeepCopy := config.sliceDeepCopy if !src.IsValid() { return } if dst.CanAddr() { addr := dst.UnsafeAddr() h := 17 * addr seen := visited[h] typ := dst.Type() for p := seen; p != nil; p = p.next { if p.ptr == addr && p.typ == typ { return nil } } // Remember, remember... visited[h] = &visit{typ, seen, addr} } if config.Transformers != nil && !isReflectNil(dst) && dst.IsValid() { if fn := config.Transformers.Transformer(dst.Type()); fn != nil { err = fn(dst, src) return } } switch dst.Kind() { case reflect.Struct: if hasMergeableFields(dst) { for i, n := 0, dst.NumField(); i < n; i++ { if err = deepMerge(dst.Field(i), src.Field(i), visited, depth+1, config); err != nil { return } } } else { if dst.CanSet() && (isReflectNil(dst) || overwrite) && (!isEmptyValue(src, !config.ShouldNotDereference) || overwriteWithEmptySrc) { dst.Set(src) } } case reflect.Map: if dst.IsNil() && !src.IsNil() { if dst.CanSet() { dst.Set(reflect.MakeMap(dst.Type())) } else { dst = src return } } if src.Kind() != reflect.Map { if overwrite && dst.CanSet() { dst.Set(src) } return } for _, key := range src.MapKeys() { srcElement := src.MapIndex(key) if !srcElement.IsValid() { continue } dstElement := dst.MapIndex(key) switch srcElement.Kind() { case reflect.Chan, reflect.Func, reflect.Map, reflect.Interface, reflect.Slice: if srcElement.IsNil() { if overwrite { dst.SetMapIndex(key, srcElement) } continue } fallthrough default: if !srcElement.CanInterface() { continue } switch reflect.TypeOf(srcElement.Interface()).Kind() { case reflect.Struct: fallthrough case reflect.Ptr: fallthrough case reflect.Map: srcMapElm := srcElement dstMapElm := dstElement if srcMapElm.CanInterface() { srcMapElm = reflect.ValueOf(srcMapElm.Interface()) if dstMapElm.IsValid() { dstMapElm = reflect.ValueOf(dstMapElm.Interface()) } } if err = deepMerge(dstMapElm, srcMapElm, visited, depth+1, config); err != nil { return } case reflect.Slice: srcSlice := reflect.ValueOf(srcElement.Interface()) var dstSlice reflect.Value if !dstElement.IsValid() || dstElement.IsNil() { dstSlice = reflect.MakeSlice(srcSlice.Type(), 0, srcSlice.Len()) } else { dstSlice = reflect.ValueOf(dstElement.Interface()) } if (!isEmptyValue(src, !config.ShouldNotDereference) || overwriteWithEmptySrc || overwriteSliceWithEmptySrc) && (overwrite || isEmptyValue(dst, !config.ShouldNotDereference)) && !config.AppendSlice && !sliceDeepCopy { if typeCheck && srcSlice.Type() != dstSlice.Type() { return fmt.Errorf("cannot override two slices with different type (%s, %s)", srcSlice.Type(), dstSlice.Type()) } dstSlice = srcSlice } else if config.AppendSlice { if srcSlice.Type() != dstSlice.Type() { return fmt.Errorf("cannot append two slices with different type (%s, %s)", srcSlice.Type(), dstSlice.Type()) } dstSlice = reflect.AppendSlice(dstSlice, srcSlice) } else if sliceDeepCopy { i := 0 for ; i < srcSlice.Len() && i < dstSlice.Len(); i++ { srcElement := srcSlice.Index(i) dstElement := dstSlice.Index(i) if srcElement.CanInterface() { srcElement = reflect.ValueOf(srcElement.Interface()) } if dstElement.CanInterface() { dstElement = reflect.ValueOf(dstElement.Interface()) } if err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil { return } } } dst.SetMapIndex(key, dstSlice) } } if dstElement.IsValid() && !isEmptyValue(dstElement, !config.ShouldNotDereference) { if reflect.TypeOf(srcElement.Interface()).Kind() == reflect.Slice { continue } if reflect.TypeOf(srcElement.Interface()).Kind() == reflect.Map && reflect.TypeOf(dstElement.Interface()).Kind() == reflect.Map { continue } } if srcElement.IsValid() && ((srcElement.Kind() != reflect.Ptr && overwrite) || !dstElement.IsValid() || isEmptyValue(dstElement, !config.ShouldNotDereference)) { if dst.IsNil() { dst.Set(reflect.MakeMap(dst.Type())) } dst.SetMapIndex(key, srcElement) } } // Ensure that all keys in dst are deleted if they are not in src. if overwriteWithEmptySrc { for _, key := range dst.MapKeys() { srcElement := src.MapIndex(key) if !srcElement.IsValid() { dst.SetMapIndex(key, reflect.Value{}) } } } case reflect.Slice: if !dst.CanSet() { break } if (!isEmptyValue(src, !config.ShouldNotDereference) || overwriteWithEmptySrc || overwriteSliceWithEmptySrc) && (overwrite || isEmptyValue(dst, !config.ShouldNotDereference)) && !config.AppendSlice && !sliceDeepCopy { dst.Set(src) } else if config.AppendSlice { if src.Type() != dst.Type() { return fmt.Errorf("cannot append two slice with different type (%s, %s)", src.Type(), dst.Type()) } dst.Set(reflect.AppendSlice(dst, src)) } else if sliceDeepCopy { for i := 0; i < src.Len() && i < dst.Len(); i++ { srcElement := src.Index(i) dstElement := dst.Index(i) if srcElement.CanInterface() { srcElement = reflect.ValueOf(srcElement.Interface()) } if dstElement.CanInterface() { dstElement = reflect.ValueOf(dstElement.Interface()) } if err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil { return } } } case reflect.Ptr: fallthrough case reflect.Interface: if isReflectNil(src) { if overwriteWithEmptySrc && dst.CanSet() && src.Type().AssignableTo(dst.Type()) { dst.Set(src) } break } if src.Kind() != reflect.Interface { if dst.IsNil() || (src.Kind() != reflect.Ptr && overwrite) { if dst.CanSet() && (overwrite || isEmptyValue(dst, !config.ShouldNotDereference)) { dst.Set(src) } } else if src.Kind() == reflect.Ptr { if !config.ShouldNotDereference { if err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, config); err != nil { return } } else { if overwriteWithEmptySrc || (overwrite && !src.IsNil()) || dst.IsNil() { dst.Set(src) } } } else if dst.Elem().Type() == src.Type() { if err = deepMerge(dst.Elem(), src, visited, depth+1, config); err != nil { return } } else { return ErrDifferentArgumentsTypes } break } if dst.IsNil() || overwrite { if dst.CanSet() && (overwrite || isEmptyValue(dst, !config.ShouldNotDereference)) { dst.Set(src) } break } if dst.Elem().Kind() == src.Elem().Kind() { if err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, config); err != nil { return } break } default: mustSet := (isEmptyValue(dst, !config.ShouldNotDereference) || overwrite) && (!isEmptyValue(src, !config.ShouldNotDereference) || overwriteWithEmptySrc) if mustSet { if dst.CanSet() { dst.Set(src) } else { dst = src } } } return } // Merge will fill any empty for value type attributes on the dst struct using corresponding // src attributes if they themselves are not empty. dst and src must be valid same-type structs // and dst must be a pointer to struct. // It won't merge unexported (private) fields and will do recursively any exported field. func Merge(dst, src interface{}, opts ...func(*Config)) error { return merge(dst, src, opts...) } // MergeWithOverwrite will do the same as Merge except that non-empty dst attributes will be overridden by // non-empty src attribute values. // Deprecated: use Merge(…) with WithOverride func MergeWithOverwrite(dst, src interface{}, opts ...func(*Config)) error { return merge(dst, src, append(opts, WithOverride)...) } // WithTransformers adds transformers to merge, allowing to customize the merging of some types. func WithTransformers(transformers Transformers) func(*Config) { return func(config *Config) { config.Transformers = transformers } } // WithOverride will make merge override non-empty dst attributes with non-empty src attributes values. func WithOverride(config *Config) { config.Overwrite = true } // WithOverwriteWithEmptyValue will make merge override non empty dst attributes with empty src attributes values. func WithOverwriteWithEmptyValue(config *Config) { config.Overwrite = true config.overwriteWithEmptyValue = true } // WithOverrideEmptySlice will make merge override empty dst slice with empty src slice. func WithOverrideEmptySlice(config *Config) { config.overwriteSliceWithEmptyValue = true } // WithoutDereference prevents dereferencing pointers when evaluating whether they are empty // (i.e. a non-nil pointer is never considered empty). func WithoutDereference(config *Config) { config.ShouldNotDereference = true } // WithAppendSlice will make merge append slices instead of overwriting it. func WithAppendSlice(config *Config) { config.AppendSlice = true } // WithTypeCheck will make merge check types while overwriting it (must be used with WithOverride). func WithTypeCheck(config *Config) { config.TypeCheck = true } // WithSliceDeepCopy will merge slice element one by one with Overwrite flag. func WithSliceDeepCopy(config *Config) { config.sliceDeepCopy = true config.Overwrite = true } func merge(dst, src interface{}, opts ...func(*Config)) error { if dst != nil && reflect.ValueOf(dst).Kind() != reflect.Ptr { return ErrNonPointerArgument } var ( vDst, vSrc reflect.Value err error ) config := &Config{} for _, opt := range opts { opt(config) } if vDst, vSrc, err = resolveValues(dst, src); err != nil { return err } if vDst.Type() != vSrc.Type() { return ErrDifferentArgumentsTypes } return deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0, config) } // IsReflectNil is the reflect value provided nil func isReflectNil(v reflect.Value) bool { k := v.Kind() switch k { case reflect.Interface, reflect.Slice, reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr: // Both interface and slice are nil if first word is 0. // Both are always bigger than a word; assume flagIndir. return v.IsNil() default: return false } } ================================================ FILE: vendor/github.com/imdario/mergo/mergo.go ================================================ // Copyright 2013 Dario Castañé. All rights reserved. // 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. // Based on src/pkg/reflect/deepequal.go from official // golang's stdlib. package mergo import ( "errors" "reflect" ) // Errors reported by Mergo when it finds invalid arguments. var ( ErrNilArguments = errors.New("src and dst must not be nil") ErrDifferentArgumentsTypes = errors.New("src and dst must be of same type") ErrNotSupported = errors.New("only structs, maps, and slices are supported") ErrExpectedMapAsDestination = errors.New("dst was expected to be a map") ErrExpectedStructAsDestination = errors.New("dst was expected to be a struct") ErrNonPointerArgument = errors.New("dst must be a pointer") ) // During deepMerge, must keep track of checks that are // in progress. The comparison algorithm assumes that all // checks in progress are true when it reencounters them. // Visited are stored in a map indexed by 17 * a1 + a2; type visit struct { typ reflect.Type next *visit ptr uintptr } // From src/pkg/encoding/json/encode.go. func isEmptyValue(v reflect.Value, shouldDereference bool) 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: if v.IsNil() { return true } if shouldDereference { return isEmptyValue(v.Elem(), shouldDereference) } return false case reflect.Func: return v.IsNil() case reflect.Invalid: return true } return false } func resolveValues(dst, src interface{}) (vDst, vSrc reflect.Value, err error) { if dst == nil || src == nil { err = ErrNilArguments return } vDst = reflect.ValueOf(dst).Elem() if vDst.Kind() != reflect.Struct && vDst.Kind() != reflect.Map && vDst.Kind() != reflect.Slice { err = ErrNotSupported return } vSrc = reflect.ValueOf(src) // We check if vSrc is a pointer to dereference it. if vSrc.Kind() == reflect.Ptr { vSrc = vSrc.Elem() } return } ================================================ FILE: vendor/github.com/integrii/flaggy/.gitignore ================================================ # Binaries for programs and plugins *.exe *.dll *.so *.dylib # Test binary, build with `go test -c` *.test # Output of the go coverage tool, specifically when used with LiteIDE *.out # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 .glide/ .idea/ ================================================ FILE: vendor/github.com/integrii/flaggy/.travis.yml ================================================ { "language": "go", "os": "linux", "group": "stable", "dist": "trusty", "script": "go get -v && go test -v" } ================================================ FILE: vendor/github.com/integrii/flaggy/LICENSE ================================================ This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. 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 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. For more information, please refer to ================================================ FILE: vendor/github.com/integrii/flaggy/README.md ================================================


Sensible and _fast_ command-line flag parsing with excellent support for **subcommands** and **positional values**. Flags can be at any position. Flaggy has no required project or package layout like [Cobra requires](https://github.com/spf13/cobra/issues/641), and **no external dependencies**! Check out the [godoc](http://godoc.org/github.com/integrii/flaggy), [examples directory](https://github.com/integrii/flaggy/tree/master/examples), and [examples in this readme](https://github.com/integrii/flaggy#super-simple-example) to get started quickly. You can also read the Flaggy introduction post with helpful examples [on my weblog](https://ericgreer.info/post/a-better-flags-package-for-go/). # Installation `go get -u github.com/integrii/flaggy` # Key Features - Very easy to use ([see examples below](https://github.com/integrii/flaggy#super-simple-example)) - 35 different flag types supported - Any flag can be at any position - Pretty and readable help output by default - Positional subcommands - Positional parameters - Suggested subcommands when a subcommand is typo'd - Nested subcommands - Both global and subcommand specific flags - Both global and subcommand specific positional parameters - [Customizable help templates for both the global command and subcommands](https://github.com/integrii/flaggy/blob/master/examples/customTemplate/main.go) - Customizable appended/prepended help messages for both the global command and subcommands - Simple function that displays help followed by a custom message string - Flags and subcommands may have both a short and long name - Unlimited trailing arguments after a `--` - Flags can use a single dash or double dash (`--flag`, `-flag`, `-f`, `--f`) - Flags can have `=` assignment operators, or use a space (`--flag=value`, `--flag value`) - Flags support single quote globs with spaces (`--flag 'this is all one value'`) - Flags of slice types can be passed multiple times (`-f one -f two -f three`) - Optional but default version output with `--version` - Optional but default help output with `-h` or `--help` - Optional but default help output when any invalid or unknown parameter is passed - It's _fast_. All flag and subcommand parsing takes less than `1ms` in most programs. # Example Help Output ``` testCommand - Description goes here. Get more information at http://flaggy. This is a prepend for help Usage: testCommand [subcommandA|subcommandB|subcommandC] [testPositionalA] [testPositionalB] Positional Variables: testPositionalA Test positional A does some things with a positional value. (Required) testPositionalB Test positional B does some less than serious things with a positional value. Subcommands: subcommandA (a) Subcommand A is a command that does stuff subcommandB (b) Subcommand B is a command that does other stuff subcommandC (c) Subcommand C is a command that does SERIOUS stuff Flags: --version Displays the program version string. -h --help Displays help with available flag, subcommand, and positional value parameters. -s --stringFlag This is a test string flag that does some stringy string stuff. -i --intFlg This is a test int flag that does some interesting int stuff. (default: 5) -b --boolFlag This is a test bool flag that does some booly bool stuff. (default: true) -d --durationFlag This is a test duration flag that does some untimely stuff. (default: 1h23s) This is an append for help This is a help add-on message ``` # Super Simple Example `./yourApp -f test` ```go // Declare variables and their defaults var stringFlag = "defaultValue" // Add a flag flaggy.String(&stringFlag, "f", "flag", "A test string flag") // Parse the flag flaggy.Parse() // Use the flag print(stringFlag) ``` # Example with Subcommand `./yourApp subcommandExample -f test` ```go // Declare variables and their defaults var stringFlag = "defaultValue" // Create the subcommand subcommand := flaggy.NewSubcommand("subcommandExample") // Add a flag to the subcommand subcommand.String(&stringFlag, "f", "flag", "A test string flag") // Add the subcommand to the parser at position 1 flaggy.AttachSubcommand(subcommand, 1) // Parse the subcommand and all flags flaggy.Parse() // Use the flag print(stringFlag) ``` # Example with Nested Subcommands, Various Flags and Trailing Arguments `./yourApp subcommandExample --flag=5 nestedSubcommand -t test -y -- trailingArg` ```go // Declare variables and their defaults var stringFlagF = "defaultValueF" var intFlagT = 3 var boolFlagB bool // Create the subcommands subcommandExample := flaggy.NewSubcommand("subcommandExample") nestedSubcommand := flaggy.NewSubcommand("nestedSubcommand") // Add a flag to both subcommands subcommandExample.String(&stringFlagF, "t", "testFlag", "A test string flag") nestedSubcommand.Int(&intFlagT, "f", "flag", "A test int flag") // add a global bool flag for fun flaggy.Bool(&boolFlagB, "y", "yes", "A sample boolean flag") // attach the nested subcommand to the parent subcommand at position 1 subcommandExample.AttachSubcommand(nestedSubcommand, 1) // attach the base subcommand to the parser at position 1 flaggy.AttachSubcommand(subcommandExample, 1) // Parse everything, then use the flags and trailing arguments flaggy.Parse() print(stringFlagF) print(intFlagT) print(boolFlagB) print(flaggy.TrailingArguments[0]) ``` # Supported Flag Types Flaggy has specific flag types for all basic types included in go as well as a slice of any of those types. This includes all of the following types: - string and []string - bool and []bool - all int types and all []int types - all float types and all []float types - all uint types and all []uint types Other more specific types can also be used as flag types. They will be automatically parsed using the standard parsing functions included with those types in those packages. This includes: - net.IP - []net.IP - net.HardwareAddr - []net.HardwareAddr - net.IPMask - []net.IPMask - time.Duration - []time.Duration # An Example Program Best practice when using flaggy includes setting your program's name, description, and version (at build time) as shown in this example program. ```go package main import "github.com/integrii/flaggy" // Make a variable for the version which will be set at build time. var version = "unknown" // Keep subcommands as globals so you can easily check if they were used later on. var mySubcommand *flaggy.Subcommand // Setup the variables you want your incoming flags to set. var testVar string // If you would like an environment variable as the default for a value, just populate the flag // with the value of the environment by default. If the flag corresponding to this value is not // used, then it will not be changed. var myVar = os.Getenv("MY_VAR") func init() { // Set your program's name and description. These appear in help output. flaggy.SetName("Test Program") flaggy.SetDescription("A little example program") // You can disable various things by changing bools on the default parser // (or your own parser if you have created one). flaggy.DefaultParser.ShowHelpOnUnexpected = false // You can set a help prepend or append on the default parser. flaggy.DefaultParser.AdditionalHelpPrepend = "http://github.com/integrii/flaggy" // Add a flag to the main program (this will be available in all subcommands as well). flaggy.String(&testVar, "tv", "testVariable", "A variable just for testing things!") // Create any subcommands and set their parameters. mySubcommand = flaggy.NewSubcommand("mySubcommand") mySubcommand.Description = "My great subcommand!" // Add a flag to the subcommand. mySubcommand.String(&myVar, "mv", "myVariable", "A variable just for me!") // Set the version and parse all inputs into variables. flaggy.SetVersion(version) flaggy.Parse() } func main(){ if mySubcommand.Used { ... } } ``` Then, you can use the following build command to set the `version` variable in the above program at build time. ```bash # build your app and set the version string $ go build -ldflags='-X main.version=1.0.3-a3db3' $ ./yourApp version Version: 1.0.3-a3db3 $ ./yourApp --help Test Program - A little example program http://github.com/integrii/flaggy ``` # Contributions Please feel free to open an issue if you find any bugs or see any features that make sense. Pull requests will be reviewed and accepted if they make sense, but it is always wise to submit a proposal issue before any major changes. ================================================ FILE: vendor/github.com/integrii/flaggy/argumentParser.go ================================================ package flaggy // setValueForParsers sets the value for a specified key in the // specified parsers (which normally include a Parser and Subcommand). // The return values represent the key being set, and any errors // returned when setting the key, such as failures to convert the string // into the appropriate flag value. We stop assigning values as soon // as we find a any parser that accepts it. func setValueForParsers(key string, value string, parsers ...ArgumentParser) (bool, error) { for _, p := range parsers { valueWasSet, err := p.SetValueForKey(key, value) if err != nil { return valueWasSet, err } if valueWasSet { return true, nil } } return false, nil } // ArgumentParser represents a parser or subcommand type ArgumentParser interface { SetValueForKey(key string, value string) (bool, error) } ================================================ FILE: vendor/github.com/integrii/flaggy/flag.go ================================================ package flaggy import ( "errors" "fmt" "net" "reflect" "strconv" "strings" "time" ) // Flag holds the base methods for all flag types type Flag struct { ShortName string LongName string Description string rawValue string // the value as a string before being parsed Hidden bool // indicates this flag should be hidden from help and suggestions AssignmentVar interface{} defaultValue string // the value (as a string), that was set by default before any parsing and assignment parsed bool // indicates that this flag has already been parsed } // HasName indicates that this flag's short or long name matches the // supplied name string func (f *Flag) HasName(name string) bool { name = strings.TrimSpace(name) if f.ShortName == name || f.LongName == name { return true } return false } // identifyAndAssignValue identifies the type of the incoming value // and assigns it to the AssignmentVar pointer's target value. If // the value is a type that needs parsing, that is performed as well. func (f *Flag) identifyAndAssignValue(value string) error { var err error // Only parse this flag default value once. This keeps us from // overwriting the default value in help output if !f.parsed { f.parsed = true // parse the default value as a string and remember it for help output f.defaultValue, err = f.returnAssignmentVarValueAsString() if err != nil { return err } } debugPrint("attempting to assign value", value, "to flag", f.LongName) f.rawValue = value // remember the raw value // depending on the type of the assignment variable, we convert the // incoming string and assign it. We only use pointers to variables // in flagy. No returning vars by value. switch f.AssignmentVar.(type) { case *string: v, _ := (f.AssignmentVar).(*string) *v = value case *[]string: v := f.AssignmentVar.(*[]string) splitString := strings.Split(value, ",") new := append(*v, splitString...) *v = new case *bool: v, err := strconv.ParseBool(value) if err != nil { return err } a, _ := (f.AssignmentVar).(*bool) *a = v case *[]bool: // parse the incoming bool b, err := strconv.ParseBool(value) if err != nil { return err } // cast the assignment var existing := f.AssignmentVar.(*[]bool) // deref the assignment var and append to it v := append(*existing, b) // pointer the new value and assign it a, _ := (f.AssignmentVar).(*[]bool) *a = v case *time.Duration: v, err := time.ParseDuration(value) if err != nil { return err } a, _ := (f.AssignmentVar).(*time.Duration) *a = v case *[]time.Duration: t, err := time.ParseDuration(value) if err != nil { return err } existing := f.AssignmentVar.(*[]time.Duration) // deref the assignment var and append to it v := append(*existing, t) // pointer the new value and assign it a, _ := (f.AssignmentVar).(*[]time.Duration) *a = v case *float32: v, err := strconv.ParseFloat(value, 32) if err != nil { return err } float := float32(v) a, _ := (f.AssignmentVar).(*float32) *a = float case *[]float32: v, err := strconv.ParseFloat(value, 32) if err != nil { return err } float := float32(v) existing := f.AssignmentVar.(*[]float32) new := append(*existing, float) *existing = new case *float64: v, err := strconv.ParseFloat(value, 64) if err != nil { return err } a, _ := (f.AssignmentVar).(*float64) *a = v case *[]float64: v, err := strconv.ParseFloat(value, 64) if err != nil { return err } existing := f.AssignmentVar.(*[]float64) new := append(*existing, v) *existing = new case *int: v, err := strconv.Atoi(value) if err != nil { return err } e := f.AssignmentVar.(*int) *e = v case *[]int: v, err := strconv.Atoi(value) if err != nil { return err } existing := f.AssignmentVar.(*[]int) new := append(*existing, v) *existing = new case *uint: v, err := strconv.ParseUint(value, 10, 64) if err != nil { return err } existing := f.AssignmentVar.(*uint) *existing = uint(v) case *[]uint: v, err := strconv.ParseUint(value, 10, 64) if err != nil { return err } existing := f.AssignmentVar.(*[]uint) new := append(*existing, uint(v)) *existing = new case *uint64: v, err := strconv.ParseUint(value, 10, 64) if err != nil { return err } existing := f.AssignmentVar.(*uint64) *existing = v case *[]uint64: v, err := strconv.ParseUint(value, 10, 64) if err != nil { return err } existing := f.AssignmentVar.(*[]uint64) new := append(*existing, v) *existing = new case *uint32: v, err := strconv.ParseUint(value, 10, 32) if err != nil { return err } existing := f.AssignmentVar.(*uint32) *existing = uint32(v) case *[]uint32: v, err := strconv.ParseUint(value, 10, 32) if err != nil { return err } existing := f.AssignmentVar.(*[]uint32) new := append(*existing, uint32(v)) *existing = new case *uint16: v, err := strconv.ParseUint(value, 10, 16) if err != nil { return err } val := uint16(v) existing := f.AssignmentVar.(*uint16) *existing = val case *[]uint16: v, err := strconv.ParseUint(value, 10, 16) if err != nil { return err } existing := f.AssignmentVar.(*[]uint16) new := append(*existing, uint16(v)) *existing = new case *uint8: v, err := strconv.ParseUint(value, 10, 8) if err != nil { return err } val := uint8(v) existing := f.AssignmentVar.(*uint8) *existing = val case *[]uint8: var newSlice []uint8 v, err := strconv.ParseUint(value, 10, 8) if err != nil { return err } newV := uint8(v) existing := f.AssignmentVar.(*[]uint8) newSlice = append(*existing, newV) *existing = newSlice case *int64: v, err := strconv.ParseInt(value, 10, 64) if err != nil { return err } existing := f.AssignmentVar.(*int64) *existing = v case *[]int64: v, err := strconv.ParseInt(value, 10, 64) if err != nil { return err } existingSlice := f.AssignmentVar.(*[]int64) newSlice := append(*existingSlice, v) *existingSlice = newSlice case *int32: v, err := strconv.ParseInt(value, 10, 32) if err != nil { return err } converted := int32(v) existing := f.AssignmentVar.(*int32) *existing = converted case *[]int32: v, err := strconv.ParseInt(value, 10, 32) if err != nil { return err } existingSlice := f.AssignmentVar.(*[]int32) newSlice := append(*existingSlice, int32(v)) *existingSlice = newSlice case *int16: v, err := strconv.ParseInt(value, 10, 16) if err != nil { return err } converted := int16(v) existing := f.AssignmentVar.(*int16) *existing = converted case *[]int16: v, err := strconv.ParseInt(value, 10, 16) if err != nil { return err } existingSlice := f.AssignmentVar.(*[]int16) newSlice := append(*existingSlice, int16(v)) *existingSlice = newSlice case *int8: v, err := strconv.ParseInt(value, 10, 8) if err != nil { return err } converted := int8(v) existing := f.AssignmentVar.(*int8) *existing = converted case *[]int8: v, err := strconv.ParseInt(value, 10, 8) if err != nil { return err } existingSlice := f.AssignmentVar.(*[]int8) newSlice := append(*existingSlice, int8(v)) *existingSlice = newSlice case *net.IP: v := net.ParseIP(value) existing := f.AssignmentVar.(*net.IP) *existing = v case *[]net.IP: v := net.ParseIP(value) existing := f.AssignmentVar.(*[]net.IP) new := append(*existing, v) *existing = new case *net.HardwareAddr: v, err := net.ParseMAC(value) if err != nil { return err } existing := f.AssignmentVar.(*net.HardwareAddr) *existing = v case *[]net.HardwareAddr: v, err := net.ParseMAC(value) if err != nil { return err } existing := f.AssignmentVar.(*[]net.HardwareAddr) new := append(*existing, v) *existing = new case *net.IPMask: v := net.IPMask(net.ParseIP(value).To4()) existing := f.AssignmentVar.(*net.IPMask) *existing = v case *[]net.IPMask: v := net.IPMask(net.ParseIP(value).To4()) existing := f.AssignmentVar.(*[]net.IPMask) new := append(*existing, v) *existing = new default: return errors.New("Unknown flag assignmentVar supplied in flag " + f.LongName + " " + f.ShortName) } return err } const argIsPositional = "positional" // subcommand or positional value const argIsFlagWithSpace = "flagWithSpace" // -f path or --file path const argIsFlagWithValue = "flagWithValue" // -f=path or --file=path const argIsFinal = "final" // the final argument only '--' // determineArgType determines if the specified arg is a flag with space // separated value, a flag with a connected value, or neither (positional) func determineArgType(arg string) string { // if the arg is --, then its the final arg if arg == "--" { return argIsFinal } // if it has the prefix --, then its a long flag if strings.HasPrefix(arg, "--") { // if it contains an equals, it is a joined value if strings.Contains(arg, "=") { return argIsFlagWithValue } return argIsFlagWithSpace } // if it has the prefix -, then its a short flag if strings.HasPrefix(arg, "-") { // if it contains an equals, it is a joined value if strings.Contains(arg, "=") { return argIsFlagWithValue } return argIsFlagWithSpace } return argIsPositional } // parseArgWithValue parses a key=value concatenated argument into a key and // value func parseArgWithValue(arg string) (key string, value string) { // remove up to two minuses from start of flag arg = strings.TrimPrefix(arg, "-") arg = strings.TrimPrefix(arg, "-") // debugPrint("parseArgWithValue parsing", arg) // break at the equals args := strings.SplitN(arg, "=", 2) // if its a bool arg, with no explicit value, we return a blank if len(args) == 1 { return args[0], "" } // if its a key and value pair, we return those if len(args) == 2 { // debugPrint("parseArgWithValue parsed", args[0], args[1]) return args[0], args[1] } fmt.Println("Warning: attempted to parseArgWithValue but did not have correct parameter count.", arg, "->", args) return "", "" } // parseFlagToName parses a flag with space value down to a key name: // --path -> path // -p -> p func parseFlagToName(arg string) string { // remove minus from start arg = strings.TrimLeft(arg, "-") arg = strings.TrimLeft(arg, "-") return arg } // flagIsBool determines if the flag is a bool within the specified parser // and subcommand's context func flagIsBool(sc *Subcommand, p *Parser, key string) bool { for _, f := range append(sc.Flags, p.Flags...) { if f.HasName(key) { _, isBool := f.AssignmentVar.(*bool) _, isBoolSlice := f.AssignmentVar.(*[]bool) if isBool || isBoolSlice { return true } } } // by default, the answer is false return false } // returnAssignmentVarValueAsString returns the value of the flag's // assignment variable as a string. This is used to display the // default value of flags before they are assigned (like when help is output). func (f *Flag) returnAssignmentVarValueAsString() (string, error) { debugPrint("returning current value of assignment var of flag", f.LongName) var err error // depending on the type of the assignment variable, we convert the // incoming string and assign it. We only use pointers to variables // in flagy. No returning vars by value. switch f.AssignmentVar.(type) { case *string: v, _ := (f.AssignmentVar).(*string) return *v, err case *[]string: v := f.AssignmentVar.(*[]string) return strings.Join(*v, ","), err case *bool: a, _ := (f.AssignmentVar).(*bool) return strconv.FormatBool(*a), err case *[]bool: value := f.AssignmentVar.(*[]bool) var ss []string for _, b := range *value { ss = append(ss, strconv.FormatBool(b)) } return strings.Join(ss, ","), err case *time.Duration: a := f.AssignmentVar.(*time.Duration) return (*a).String(), err case *[]time.Duration: tds := f.AssignmentVar.(*[]time.Duration) var asSlice []string for _, td := range *tds { asSlice = append(asSlice, td.String()) } return strings.Join(asSlice, ","), err case *float32: a := f.AssignmentVar.(*float32) return strconv.FormatFloat(float64(*a), 'f', 2, 32), err case *[]float32: v := f.AssignmentVar.(*[]float32) var strSlice []string for _, f := range *v { formatted := strconv.FormatFloat(float64(f), 'f', 2, 32) strSlice = append(strSlice, formatted) } return strings.Join(strSlice, ","), err case *float64: a := f.AssignmentVar.(*float64) return strconv.FormatFloat(float64(*a), 'f', 2, 64), err case *[]float64: v := f.AssignmentVar.(*[]float64) var strSlice []string for _, f := range *v { formatted := strconv.FormatFloat(float64(f), 'f', 2, 64) strSlice = append(strSlice, formatted) } return strings.Join(strSlice, ","), err case *int: a := f.AssignmentVar.(*int) return strconv.Itoa(*a), err case *[]int: val := f.AssignmentVar.(*[]int) var strSlice []string for _, i := range *val { str := strconv.Itoa(i) strSlice = append(strSlice, str) } return strings.Join(strSlice, ","), err case *uint: v := f.AssignmentVar.(*uint) return strconv.FormatUint(uint64(*v), 10), err case *[]uint: values := f.AssignmentVar.(*[]uint) var strVars []string for _, i := range *values { strVars = append(strVars, strconv.FormatUint(uint64(i), 10)) } return strings.Join(strVars, ","), err case *uint64: v := f.AssignmentVar.(*uint64) return strconv.FormatUint(*v, 10), err case *[]uint64: values := f.AssignmentVar.(*[]uint64) var strVars []string for _, i := range *values { strVars = append(strVars, strconv.FormatUint(i, 10)) } return strings.Join(strVars, ","), err case *uint32: v := f.AssignmentVar.(*uint32) return strconv.FormatUint(uint64(*v), 10), err case *[]uint32: values := f.AssignmentVar.(*[]uint32) var strVars []string for _, i := range *values { strVars = append(strVars, strconv.FormatUint(uint64(i), 10)) } return strings.Join(strVars, ","), err case *uint16: v := f.AssignmentVar.(*uint16) return strconv.FormatUint(uint64(*v), 10), err case *[]uint16: values := f.AssignmentVar.(*[]uint16) var strVars []string for _, i := range *values { strVars = append(strVars, strconv.FormatUint(uint64(i), 10)) } return strings.Join(strVars, ","), err case *uint8: v := f.AssignmentVar.(*uint8) return strconv.FormatUint(uint64(*v), 10), err case *[]uint8: values := f.AssignmentVar.(*[]uint8) var strVars []string for _, i := range *values { strVars = append(strVars, strconv.FormatUint(uint64(i), 10)) } return strings.Join(strVars, ","), err case *int64: v := f.AssignmentVar.(*int64) return strconv.FormatInt(int64(*v), 10), err case *[]int64: values := f.AssignmentVar.(*[]int64) var strVars []string for _, i := range *values { strVars = append(strVars, strconv.FormatInt(i, 10)) } return strings.Join(strVars, ","), err case *int32: v := f.AssignmentVar.(*int32) return strconv.FormatInt(int64(*v), 10), err case *[]int32: values := f.AssignmentVar.(*[]int32) var strVars []string for _, i := range *values { strVars = append(strVars, strconv.FormatInt(int64(i), 10)) } return strings.Join(strVars, ","), err case *int16: v := f.AssignmentVar.(*int16) return strconv.FormatInt(int64(*v), 10), err case *[]int16: values := f.AssignmentVar.(*[]int16) var strVars []string for _, i := range *values { strVars = append(strVars, strconv.FormatInt(int64(i), 10)) } return strings.Join(strVars, ","), err case *int8: v := f.AssignmentVar.(*int8) return strconv.FormatInt(int64(*v), 10), err case *[]int8: values := f.AssignmentVar.(*[]int8) var strVars []string for _, i := range *values { strVars = append(strVars, strconv.FormatInt(int64(i), 10)) } return strings.Join(strVars, ","), err case *net.IP: val := f.AssignmentVar.(*net.IP) return val.String(), err case *[]net.IP: val := f.AssignmentVar.(*[]net.IP) var strSlice []string for _, ip := range *val { strSlice = append(strSlice, ip.String()) } return strings.Join(strSlice, ","), err case *net.HardwareAddr: val := f.AssignmentVar.(*net.HardwareAddr) return val.String(), err case *[]net.HardwareAddr: val := f.AssignmentVar.(*[]net.HardwareAddr) var strSlice []string for _, mac := range *val { strSlice = append(strSlice, mac.String()) } return strings.Join(strSlice, ","), err case *net.IPMask: val := f.AssignmentVar.(*net.IPMask) return val.String(), err case *[]net.IPMask: val := f.AssignmentVar.(*[]net.IPMask) var strSlice []string for _, m := range *val { strSlice = append(strSlice, m.String()) } return strings.Join(strSlice, ","), err default: return "", errors.New("Unknown flag assignmentVar found in flag " + f.LongName + " " + f.ShortName + ". Type not supported: " + reflect.TypeOf(f.AssignmentVar).String()) } } ================================================ FILE: vendor/github.com/integrii/flaggy/help.go ================================================ package flaggy // defaultHelpTemplate is the help template used by default // {{if (or (or (gt (len .StringFlags) 0) (gt (len .IntFlags) 0)) (gt (len .BoolFlags) 0))}} // {{if (or (gt (len .StringFlags) 0) (gt (len .BoolFlags) 0))}} const defaultHelpTemplate = `{{.CommandName}}{{if .Description}} - {{.Description}}{{end}}{{if .PrependMessage}} {{.PrependMessage}}{{end}} {{if .UsageString}} Usage: {{.UsageString}}{{end}}{{if .Positionals}} Positional Variables: {{range .Positionals}} {{.Name}} {{.Spacer}}{{if .Description}} {{.Description}}{{end}}{{if .DefaultValue}} (default: {{.DefaultValue}}){{else}}{{if .Required}} (Required){{end}}{{end}}{{end}}{{end}}{{if .Subcommands}} Subcommands: {{range .Subcommands}} {{.LongName}}{{if .ShortName}} ({{.ShortName}}){{end}}{{if .Position}}{{if gt .Position 1}} (position {{.Position}}){{end}}{{end}}{{if .Description}} {{.Spacer}}{{.Description}}{{end}}{{end}} {{end}}{{if (gt (len .Flags) 0)}} Flags: {{if .Flags}}{{range .Flags}} {{if .ShortName}}-{{.ShortName}} {{else}} {{end}}{{if .LongName}}--{{.LongName}}{{end}}{{if .Description}} {{.Spacer}}{{.Description}}{{if .DefaultValue}} (default: {{.DefaultValue}}){{end}}{{end}}{{end}}{{end}} {{end}}{{if .AppendMessage}}{{.AppendMessage}} {{end}}{{if .Message}} {{.Message}}{{end}} ` ================================================ FILE: vendor/github.com/integrii/flaggy/helpValues.go ================================================ package flaggy import ( "log" "reflect" "strings" "unicode/utf8" ) // Help represents the values needed to render a Help page type Help struct { Subcommands []HelpSubcommand Positionals []HelpPositional Flags []HelpFlag UsageString string CommandName string PrependMessage string AppendMessage string Message string Description string } // HelpSubcommand is used to template subcommand Help output type HelpSubcommand struct { ShortName string LongName string Description string Position int Spacer string } // HelpPositional is used to template positional Help output type HelpPositional struct { Name string Description string Required bool Position int DefaultValue string Spacer string } // HelpFlag is used to template string flag Help output type HelpFlag struct { ShortName string LongName string Description string DefaultValue string Spacer string } // ExtractValues extracts Help template values from a subcommand and its parent // parser. The parser is required in order to detect default flag settings // for help and version output. func (h *Help) ExtractValues(p *Parser, message string) { // accept message string for output h.Message = message // extract Help values from the current subcommand in context // prependMessage string h.PrependMessage = p.subcommandContext.AdditionalHelpPrepend // appendMessage string h.AppendMessage = p.subcommandContext.AdditionalHelpAppend // command name h.CommandName = p.subcommandContext.Name // description h.Description = p.subcommandContext.Description maxLength := getLongestNameLength(p.subcommandContext.Subcommands, 0) // subcommands []HelpSubcommand for _, cmd := range p.subcommandContext.Subcommands { if cmd.Hidden { continue } newHelpSubcommand := HelpSubcommand{ ShortName: cmd.ShortName, LongName: cmd.Name, Description: cmd.Description, Position: cmd.Position, Spacer: makeSpacer(cmd.Name, maxLength), } h.Subcommands = append(h.Subcommands, newHelpSubcommand) } maxLength = getLongestNameLength(p.subcommandContext.PositionalFlags, 0) // parse positional flags into help output structs for _, pos := range p.subcommandContext.PositionalFlags { if pos.Hidden { continue } newHelpPositional := HelpPositional{ Name: pos.Name, Position: pos.Position, Description: pos.Description, Required: pos.Required, DefaultValue: pos.defaultValue, Spacer: makeSpacer(pos.Name, maxLength), } h.Positionals = append(h.Positionals, newHelpPositional) } maxLength = len(versionFlagLongName) if len(helpFlagLongName) > maxLength { maxLength = len(helpFlagLongName) } maxLength = getLongestNameLength(p.subcommandContext.Flags, maxLength) maxLength = getLongestNameLength(p.Flags, maxLength) // if the built-in version flag is enabled, then add it as a help flag if p.ShowVersionWithVersionFlag { defaultVersionFlag := HelpFlag{ ShortName: "", LongName: versionFlagLongName, Description: "Displays the program version string.", DefaultValue: "", Spacer: makeSpacer(versionFlagLongName, maxLength), } h.Flags = append(h.Flags, defaultVersionFlag) } // if the built-in help flag exists, then add it as a help flag if p.ShowHelpWithHFlag { defaultHelpFlag := HelpFlag{ ShortName: helpFlagShortName, LongName: helpFlagLongName, Description: "Displays help with available flag, subcommand, and positional value parameters.", DefaultValue: "", Spacer: makeSpacer(helpFlagLongName, maxLength), } h.Flags = append(h.Flags, defaultHelpFlag) } // go through every flag in the subcommand and add it to help output h.parseFlagsToHelpFlags(p.subcommandContext.Flags, maxLength) // go through every flag in the parent parser and add it to help output h.parseFlagsToHelpFlags(p.Flags, maxLength) // formulate the usage string // first, we capture all the command and positional names by position commandsByPosition := make(map[int]string) for _, pos := range p.subcommandContext.PositionalFlags { if pos.Hidden { continue } if len(commandsByPosition[pos.Position]) > 0 { commandsByPosition[pos.Position] = commandsByPosition[pos.Position] + "|" + pos.Name } else { commandsByPosition[pos.Position] = pos.Name } } for _, cmd := range p.subcommandContext.Subcommands { if cmd.Hidden { continue } if len(commandsByPosition[cmd.Position]) > 0 { commandsByPosition[cmd.Position] = commandsByPosition[cmd.Position] + "|" + cmd.Name } else { commandsByPosition[cmd.Position] = cmd.Name } } // find the highest position count in the map var highestPosition int for i := range commandsByPosition { if i > highestPosition { highestPosition = i } } // only have a usage string if there are positional items var usageString string if highestPosition > 0 { // find each positional value and make our final string usageString = p.subcommandContext.Name for i := 1; i <= highestPosition; i++ { if len(commandsByPosition[i]) > 0 { usageString = usageString + " [" + commandsByPosition[i] + "]" } else { // dont keep listing after the first position without any properties // it will be impossible to reach anything beyond here anyway break } } } h.UsageString = usageString } // parseFlagsToHelpFlags parses the specified slice of flags into // help flags on the the calling help command func (h *Help) parseFlagsToHelpFlags(flags []*Flag, maxLength int) { for _, f := range flags { if f.Hidden { continue } // parse help values out if the flag hasn't been parsed yet if !f.parsed { f.parsed = true // parse the default value as a string and remember it for help output f.defaultValue, _ = f.returnAssignmentVarValueAsString() } // determine the default value based on the assignment variable defaultValue := f.defaultValue // dont show nils if defaultValue == "" { defaultValue = "" } // for bools, dont show a default of false _, isBool := f.AssignmentVar.(*bool) if isBool { b := f.AssignmentVar.(*bool) if *b == false { defaultValue = "" } } newHelpFlag := HelpFlag{ ShortName: f.ShortName, LongName: f.LongName, Description: f.Description, DefaultValue: defaultValue, Spacer: makeSpacer(f.LongName, maxLength), } h.AddFlagToHelp(newHelpFlag) } } // AddFlagToHelp adds a flag to help output if it does not exist func (h *Help) AddFlagToHelp(f HelpFlag) { for _, existingFlag := range h.Flags { if len(existingFlag.ShortName) > 0 && existingFlag.ShortName == f.ShortName { return } if len(existingFlag.LongName) > 0 && existingFlag.LongName == f.LongName { return } } h.Flags = append(h.Flags, f) } // getLongestNameLength takes a slice of any supported flag and returns the length of the longest of their names func getLongestNameLength(slice interface{}, min int) int { var maxLength = min s := reflect.ValueOf(slice) if s.Kind() != reflect.Slice { log.Panicf("Paremeter given to getLongestNameLength() is of type %s. Expected slice", s.Kind()) } for i := 0; i < s.Len(); i++ { option := s.Index(i).Interface() var name string switch t := option.(type) { case *Subcommand: name = t.Name case *Flag: name = t.LongName case *PositionalValue: name = t.Name default: log.Panicf("Unexpected type %T found in slice passed to getLongestNameLength(). Possible types: *Subcommand, *Flag, *PositionalValue", t) } length := len(name) if length > maxLength { maxLength = length } } return maxLength } // makeSpacer creates a string of whitespaces, with a length of the given // maxLength minus the length of the given name func makeSpacer(name string, maxLength int) string { length := maxLength - utf8.RuneCountInString(name) if length < 0 { length = 0 } return strings.Repeat(" ", length) } ================================================ FILE: vendor/github.com/integrii/flaggy/main.go ================================================ // Package flaggy is a input flag parsing package that supports recursive // subcommands, positional values, and any-position flags without // unnecessary complexeties. // // For a getting started tutorial and full feature list, check out the // readme at https://github.com/integrii/flaggy. package flaggy // import "github.com/integrii/flaggy" import ( "fmt" "log" "net" "os" "strconv" "strings" "time" ) // strings used for builtin help and version flags both short and long const versionFlagLongName = "version" const helpFlagLongName = "help" const helpFlagShortName = "h" // defaultVersion is applied to parsers when they are created const defaultVersion = "0.0.0" // DebugMode indicates that debug output should be enabled var DebugMode bool // DefaultHelpTemplate is the help template that will be used // for newly created subcommands and commands var DefaultHelpTemplate = defaultHelpTemplate // DefaultParser is the default parser that is used with the package-level public // functions var DefaultParser *Parser // TrailingArguments holds trailing arguments in the main parser after parsing // has been run. var TrailingArguments []string func init() { // set the default help template // allow usage like flaggy.StringVar by enabling a default Parser ResetParser() } // ResetParser resets the default parser to a fresh instance. Uses the // name of the binary executing as the program name by default. func ResetParser() { if len(os.Args) > 0 { chunks := strings.Split(os.Args[0], "/") DefaultParser = NewParser(chunks[len(chunks)-1]) } else { DefaultParser = NewParser("default") } } // Parse parses flags as requested in the default package parser func Parse() { err := DefaultParser.Parse() TrailingArguments = DefaultParser.TrailingArguments if err != nil { log.Panicln("Error from argument parser:", err) } } // ParseArgs parses the passed args as if they were the arguments to the // running binary. Targets the default main parser for the package. func ParseArgs(args []string) { err := DefaultParser.ParseArgs(args) TrailingArguments = DefaultParser.TrailingArguments if err != nil { log.Panicln("Error from argument parser:", err) } } // String adds a new string flag func String(assignmentVar *string, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // StringSlice adds a new slice of strings flag // Specify the flag multiple times to fill the slice func StringSlice(assignmentVar *[]string, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // Bool adds a new bool flag func Bool(assignmentVar *bool, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // BoolSlice adds a new slice of bools flag // Specify the flag multiple times to fill the slice func BoolSlice(assignmentVar *[]bool, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // ByteSlice adds a new slice of bytes flag // Specify the flag multiple times to fill the slice. Takes hex as input. func ByteSlice(assignmentVar *[]byte, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // Duration adds a new time.Duration flag. // Input format is described in time.ParseDuration(). // Example values: 1h, 1h50m, 32s func Duration(assignmentVar *time.Duration, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // DurationSlice adds a new time.Duration flag. // Input format is described in time.ParseDuration(). // Example values: 1h, 1h50m, 32s // Specify the flag multiple times to fill the slice. func DurationSlice(assignmentVar *[]time.Duration, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // Float32 adds a new float32 flag. func Float32(assignmentVar *float32, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // Float32Slice adds a new float32 flag. // Specify the flag multiple times to fill the slice. func Float32Slice(assignmentVar *[]float32, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // Float64 adds a new float64 flag. func Float64(assignmentVar *float64, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // Float64Slice adds a new float64 flag. // Specify the flag multiple times to fill the slice. func Float64Slice(assignmentVar *[]float64, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // Int adds a new int flag func Int(assignmentVar *int, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // IntSlice adds a new int slice flag. // Specify the flag multiple times to fill the slice. func IntSlice(assignmentVar *[]int, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // UInt adds a new uint flag func UInt(assignmentVar *uint, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // UIntSlice adds a new uint slice flag. // Specify the flag multiple times to fill the slice. func UIntSlice(assignmentVar *[]uint, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // UInt64 adds a new uint64 flag func UInt64(assignmentVar *uint64, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // UInt64Slice adds a new uint64 slice flag. // Specify the flag multiple times to fill the slice. func UInt64Slice(assignmentVar *[]uint64, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // UInt32 adds a new uint32 flag func UInt32(assignmentVar *uint32, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // UInt32Slice adds a new uint32 slice flag. // Specify the flag multiple times to fill the slice. func UInt32Slice(assignmentVar *[]uint32, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // UInt16 adds a new uint16 flag func UInt16(assignmentVar *uint16, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // UInt16Slice adds a new uint16 slice flag. // Specify the flag multiple times to fill the slice. func UInt16Slice(assignmentVar *[]uint16, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // UInt8 adds a new uint8 flag func UInt8(assignmentVar *uint8, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // UInt8Slice adds a new uint8 slice flag. // Specify the flag multiple times to fill the slice. func UInt8Slice(assignmentVar *[]uint8, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // Int64 adds a new int64 flag func Int64(assignmentVar *int64, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // Int64Slice adds a new int64 slice flag. // Specify the flag multiple times to fill the slice. func Int64Slice(assignmentVar *[]int64, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // Int32 adds a new int32 flag func Int32(assignmentVar *int32, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // Int32Slice adds a new int32 slice flag. // Specify the flag multiple times to fill the slice. func Int32Slice(assignmentVar *[]int32, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // Int16 adds a new int16 flag func Int16(assignmentVar *int16, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // Int16Slice adds a new int16 slice flag. // Specify the flag multiple times to fill the slice. func Int16Slice(assignmentVar *[]int16, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // Int8 adds a new int8 flag func Int8(assignmentVar *int8, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // Int8Slice adds a new int8 slice flag. // Specify the flag multiple times to fill the slice. func Int8Slice(assignmentVar *[]int8, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // IP adds a new net.IP flag. func IP(assignmentVar *net.IP, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // IPSlice adds a new int8 slice flag. // Specify the flag multiple times to fill the slice. func IPSlice(assignmentVar *[]net.IP, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // HardwareAddr adds a new net.HardwareAddr flag. func HardwareAddr(assignmentVar *net.HardwareAddr, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // HardwareAddrSlice adds a new net.HardwareAddr slice flag. // Specify the flag multiple times to fill the slice. func HardwareAddrSlice(assignmentVar *[]net.HardwareAddr, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // IPMask adds a new net.IPMask flag. IPv4 Only. func IPMask(assignmentVar *net.IPMask, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // IPMaskSlice adds a new net.HardwareAddr slice flag. IPv4 only. // Specify the flag multiple times to fill the slice. func IPMaskSlice(assignmentVar *[]net.IPMask, shortName string, longName string, description string) { DefaultParser.add(assignmentVar, shortName, longName, description) } // AttachSubcommand adds a subcommand for parsing func AttachSubcommand(subcommand *Subcommand, relativePosition int) { DefaultParser.AttachSubcommand(subcommand, relativePosition) } // ShowHelp shows parser help func ShowHelp(message string) { DefaultParser.ShowHelpWithMessage(message) } // SetDescription sets the description of the default package command parser func SetDescription(description string) { DefaultParser.Description = description } // SetVersion sets the version of the default package command parser func SetVersion(version string) { DefaultParser.Version = version } // SetName sets the name of the default package command parser func SetName(name string) { DefaultParser.Name = name } // ShowHelpAndExit shows parser help and exits with status code 2 func ShowHelpAndExit(message string) { ShowHelp(message) exitOrPanic(2) } // PanicInsteadOfExit is used when running tests var PanicInsteadOfExit bool // exitOrPanic panics instead of calling os.Exit so that tests can catch // more failures func exitOrPanic(code int) { if PanicInsteadOfExit { panic("Panic instead of exit with code: " + strconv.Itoa(code)) } os.Exit(code) } // ShowHelpOnUnexpectedEnable enables the ShowHelpOnUnexpected behavior on the // default parser. This causes unknown inputs to error out. func ShowHelpOnUnexpectedEnable() { DefaultParser.ShowHelpOnUnexpected = true } // ShowHelpOnUnexpectedDisable disables the ShowHelpOnUnexpected behavior on the // default parser. This causes unknown inputs to error out. func ShowHelpOnUnexpectedDisable() { DefaultParser.ShowHelpOnUnexpected = false } // AddPositionalValue adds a positional value to the main parser at the global // context func AddPositionalValue(assignmentVar *string, name string, relativePosition int, required bool, description string) { DefaultParser.AddPositionalValue(assignmentVar, name, relativePosition, required, description) } // debugPrint prints if debugging is enabled func debugPrint(i ...interface{}) { if DebugMode { fmt.Println(i...) } } ================================================ FILE: vendor/github.com/integrii/flaggy/parsedValue.go ================================================ package flaggy // parsedValue represents a flag or subcommand that was parsed. Primairily used // to account for all parsed values in order to determine if unknown values were // passed to the root parser after all subcommands have been parsed. type parsedValue struct { Key string Value string IsPositional bool // indicates that this value was positional and not a key/value } // newParsedValue creates and returns a new parsedValue struct with the // supplied values set func newParsedValue(key string, value string, isPositional bool) parsedValue { if len(key) == 0 && len(value) == 0 { panic("cant add parsed value with no key or value") } return parsedValue{ Key: key, Value: value, IsPositional: isPositional, } } ================================================ FILE: vendor/github.com/integrii/flaggy/parser.go ================================================ package flaggy import ( "errors" "fmt" "os" "strconv" "text/template" ) // Parser represents the set of flags and subcommands we are expecting // from our input arguments. Parser is the top level struct responsible for // parsing an entire set of subcommands and flags. type Parser struct { Subcommand Version string // the optional version of the parser. ShowHelpWithHFlag bool // display help when -h or --help passed ShowVersionWithVersionFlag bool // display the version when --version passed ShowHelpOnUnexpected bool // display help when an unexpected flag or subcommand is passed TrailingArguments []string // everything after a -- is placed here HelpTemplate *template.Template // template for Help output trailingArgumentsExtracted bool // indicates that trailing args have been parsed and should not be appended again parsed bool // indicates this parser has parsed subcommandContext *Subcommand // points to the most specific subcommand being used } // NewParser creates a new ArgumentParser ready to parse inputs func NewParser(name string) *Parser { // this can not be done inline because of struct embedding p := &Parser{} p.Name = name p.Version = defaultVersion p.ShowHelpOnUnexpected = true p.ShowHelpWithHFlag = true p.ShowVersionWithVersionFlag = true p.SetHelpTemplate(DefaultHelpTemplate) p.subcommandContext = &Subcommand{} return p } // ParseArgs parses as if the passed args were the os.Args, but without the // binary at the 0 position in the array. An error is returned if there // is a low level issue converting flags to their proper type. No error // is returned for invalid arguments or missing require subcommands. func (p *Parser) ParseArgs(args []string) error { if p.parsed { return errors.New("Parser.Parse() called twice on parser with name: " + " " + p.Name + " " + p.ShortName) } p.parsed = true debugPrint("Kicking off parsing with args:", args) err := p.parse(p, args, 0) if err != nil { return err } // if we are set to crash on unexpected args, look for those here TODO if p.ShowHelpOnUnexpected { parsedValues := p.findAllParsedValues() debugPrint("parsedValues:", parsedValues) argsNotParsed := findArgsNotInParsedValues(args, parsedValues) if len(argsNotParsed) > 0 { // flatten out unused args for our error message var argsNotParsedFlat string for _, a := range argsNotParsed { argsNotParsedFlat = argsNotParsedFlat + " " + a } p.ShowHelpAndExit("Unknown arguments supplied: " + argsNotParsedFlat) } } return nil } // findArgsNotInParsedValues finds arguments not used in parsed values. The // incoming args should be in the order supplied by the user and should not // include the invoked binary, which is normally the first thing in os.Args. func findArgsNotInParsedValues(args []string, parsedValues []parsedValue) []string { var argsNotUsed []string var skipNext bool for _, a := range args { // if the final argument (--) is seen, then we stop checking because all // further values are trailing arguments. if determineArgType(a) == argIsFinal { return argsNotUsed } // allow for skipping the next arg when needed if skipNext { skipNext = false continue } // strip flag slashes from incoming arguments so they match up with the // keys from parsedValues. arg := parseFlagToName(a) // indicates that we found this arg used in one of the parsed values. Used // to indicate which values should be added to argsNotUsed. var foundArgUsed bool // search all args for a corresponding parsed value for _, pv := range parsedValues { // this argumenet was a key // debugPrint(pv.Key, "==", arg) debugPrint(pv.Key + "==" + arg + " || (" + strconv.FormatBool(pv.IsPositional) + " && " + pv.Value + " == " + arg + ")") if pv.Key == arg || (pv.IsPositional && pv.Value == arg) { debugPrint("Found matching parsed arg for " + pv.Key) foundArgUsed = true // the arg was used in this parsedValues set // if the value is not a positional value and the parsed value had a // value that was not blank, we skip the next value in the argument list if !pv.IsPositional && len(pv.Value) > 0 { skipNext = true break } } // this prevents excessive parsed values from being checked after we find // the arg used for the first time if foundArgUsed { break } } // if the arg was not used in any parsed values, then we add it to the slice // of arguments not used if !foundArgUsed { argsNotUsed = append(argsNotUsed, arg) } } return argsNotUsed } // ShowVersionAndExit shows the version of this parser func (p *Parser) ShowVersionAndExit() { fmt.Println("Version:", p.Version) exitOrPanic(0) } // SetHelpTemplate sets the go template this parser will use when rendering // Help. func (p *Parser) SetHelpTemplate(tmpl string) error { var err error p.HelpTemplate = template.New(helpFlagLongName) p.HelpTemplate, err = p.HelpTemplate.Parse(tmpl) if err != nil { return err } return nil } // Parse calculates all flags and subcommands func (p *Parser) Parse() error { err := p.ParseArgs(os.Args[1:]) if err != nil { return err } return nil } // ShowHelp shows Help without an error message func (p *Parser) ShowHelp() { debugPrint("showing help for", p.subcommandContext.Name) p.ShowHelpWithMessage("") } // ShowHelpAndExit shows parser help and exits with status code 2 func (p *Parser) ShowHelpAndExit(message string) { p.ShowHelpWithMessage(message) exitOrPanic(2) } // ShowHelpWithMessage shows the Help for this parser with an optional string error // message as a header. The supplied subcommand will be the context of Help // displayed to the user. func (p *Parser) ShowHelpWithMessage(message string) { // create a new Help values template and extract values into it help := Help{} help.ExtractValues(p, message) err := p.HelpTemplate.Execute(os.Stderr, help) if err != nil { fmt.Fprintln(os.Stderr, "Error rendering Help template:", err) } } // DisableShowVersionWithVersion disables the showing of version information // with --version. It is enabled by default. func (p *Parser) DisableShowVersionWithVersion() { p.ShowVersionWithVersionFlag = false } ================================================ FILE: vendor/github.com/integrii/flaggy/positionalValue.go ================================================ package flaggy // PositionalValue represents a value which is determined by its position // relative to where a subcommand was detected. type PositionalValue struct { Name string // used in documentation only Description string AssignmentVar *string // the var that will get this variable Position int // the position, not including switches, of this variable Required bool // this subcommand must always be specified Found bool // was this positional found during parsing? Hidden bool // indicates this positional value should be hidden from help defaultValue string // used for help output } ================================================ FILE: vendor/github.com/integrii/flaggy/subCommand.go ================================================ package flaggy import ( "fmt" "log" "net" "os" "strconv" "strings" "time" ) // Subcommand represents a subcommand which contains a set of child // subcommands along with a set of flags relevant to it. Parsing // runs until a subcommand is detected by matching its name and // position. Once a matching subcommand is found, the next set // of parsing occurs within that matched subcommand. type Subcommand struct { Name string ShortName string Description string Position int // the position of this subcommand, not including flags Subcommands []*Subcommand Flags []*Flag PositionalFlags []*PositionalValue ParsedValues []parsedValue // a list of values and positionals parsed AdditionalHelpPrepend string // additional prepended message when Help is displayed AdditionalHelpAppend string // additional appended message when Help is displayed Used bool // indicates this subcommand was found and parsed Hidden bool // indicates this subcommand should be hidden from help } // NewSubcommand creates a new subcommand that can have flags or PositionalFlags // added to it. The position starts with 1, not 0 func NewSubcommand(name string) *Subcommand { if len(name) == 0 { fmt.Fprintln(os.Stderr, "Error creating subcommand (NewSubcommand()). No subcommand name was specified.") exitOrPanic(2) } newSC := &Subcommand{ Name: name, } return newSC } // parseAllFlagsFromArgs parses the non-positional flags such as -f or -v=value // out of the supplied args and returns the resulting positional items in order, // all the flag names found (without values), a bool to indicate if help was // requested, and any errors found during parsing func (sc *Subcommand) parseAllFlagsFromArgs(p *Parser, args []string) ([]string, bool, error) { var positionalOnlyArguments []string var helpRequested bool // indicates the user has supplied -h and we // should render help if we are the last subcommand // indicates we should skip the next argument, like when parsing a flag // that separates key and value by space var skipNext bool // endArgfound indicates that a -- was found and everything // remaining should be added to the trailing arguments slices var endArgFound bool // find all the normal flags (not positional) and parse them out for i, a := range args { debugPrint("parsing arg:", a) // evaluate if there is a following arg to avoid panics var nextArgExists bool var nextArg string if len(args)-1 >= i+1 { nextArgExists = true nextArg = args[i+1] } // if end arg -- has been found, just add everything to TrailingArguments if endArgFound { if !p.trailingArgumentsExtracted { p.TrailingArguments = append(p.TrailingArguments, a) } continue } // skip this run if specified if skipNext { skipNext = false debugPrint("skipping flag because it is an arg:", a) continue } // parse the flag into its name for consideration without dashes flagName := parseFlagToName(a) // if the flag being passed is version or v and the option to display // version with version flags, then display version if p.ShowVersionWithVersionFlag { if flagName == versionFlagLongName { p.ShowVersionAndExit() } } // if the show Help on h flag option is set, then show Help when h or Help // is passed as an option if p.ShowHelpWithHFlag { if flagName == helpFlagShortName || flagName == helpFlagLongName { // Ensure this is the last subcommand passed so we give the correct // help output helpRequested = true continue } } // determine what kind of flag this is argType := determineArgType(a) // strip flags from arg // debugPrint("Parsing flag named", a, "of type", argType) // depending on the flag type, parse the key and value out, then apply it switch argType { case argIsFinal: // debugPrint("Arg", i, "is final:", a) endArgFound = true case argIsPositional: // debugPrint("Arg is positional or subcommand:", a) // this positional argument into a slice of their own, so that // we can determine if its a subcommand or positional value later positionalOnlyArguments = append(positionalOnlyArguments, a) // track this as a parsed value with the subcommand sc.addParsedPositionalValue(a) case argIsFlagWithSpace: // a flag with a space. ex) -k v or --key value a = parseFlagToName(a) // debugPrint("Arg", i, "is flag with space:", a) // parse next arg as value to this flag and apply to subcommand flags // if the flag is a bool flag, then we check for a following positional // and skip it if necessary if flagIsBool(sc, p, a) { debugPrint(sc.Name, "bool flag", a, "next var is:", nextArg) // set the value in this subcommand and its root parser valueSet, err := setValueForParsers(a, "true", p, sc) // if an error occurs, just return it and quit parsing if err != nil { return []string{}, false, err } // log all values parsed by this subcommand. We leave the value blank // because the bool value had no explicit true or false supplied if valueSet { sc.addParsedFlag(a, "") } // we've found and set a standalone bool flag, so we move on to the next // argument in the list of arguments continue } skipNext = true // debugPrint(sc.Name, "NOT bool flag", a) // if the next arg was not found, then show a Help message if !nextArgExists { p.ShowHelpWithMessage("Expected a following arg for flag " + a + ", but it did not exist.") exitOrPanic(2) } valueSet, err := setValueForParsers(a, nextArg, p, sc) if err != nil { return []string{}, false, err } // log all parsed values in the subcommand if valueSet { sc.addParsedFlag(a, nextArg) } case argIsFlagWithValue: // a flag with an equals sign. ex) -k=v or --key=value // debugPrint("Arg", i, "is flag with value:", a) a = parseFlagToName(a) // parse flag into key and value and apply to subcommand flags key, val := parseArgWithValue(a) // set the value in this subcommand and its root parser valueSet, err := setValueForParsers(key, val, p, sc) if err != nil { return []string{}, false, err } // log all values parsed by the subcommand if valueSet { sc.addParsedFlag(a, val) } } } return positionalOnlyArguments, helpRequested, nil } // findAllParsedValues finds all values parsed by all subcommands and this // subcommand and its child subcommands func (sc *Subcommand) findAllParsedValues() []parsedValue { parsedValues := sc.ParsedValues for _, sc := range sc.Subcommands { // skip unused subcommands if !sc.Used { continue } parsedValues = append(parsedValues, sc.findAllParsedValues()...) } return parsedValues } // parse causes the argument parser to parse based on the supplied []string. // depth specifies the non-flag subcommand positional depth. A slice of flags // and subcommands parsed is returned so that the parser can ultimately decide // if there were any unexpected values supplied by the user func (sc *Subcommand) parse(p *Parser, args []string, depth int) error { debugPrint("- Parsing subcommand", sc.Name, "with depth of", depth, "and args", args) // if a command is parsed, its used sc.Used = true debugPrint("used subcommand", sc.Name, sc.ShortName) if len(sc.Name) > 0 { sc.addParsedPositionalValue(sc.Name) } if len(sc.ShortName) > 0 { sc.addParsedPositionalValue(sc.ShortName) } // as subcommands are used, they become the context of the parser. This helps // us understand how to display help based on which subcommand is being used p.subcommandContext = sc // ensure that help and version flags are not used if the parser has the // built-in help and version flags enabled if p.ShowHelpWithHFlag { sc.ensureNoConflictWithBuiltinHelp() } if p.ShowVersionWithVersionFlag { sc.ensureNoConflictWithBuiltinVersion() } // Parse the normal flags out of the argument list and return the positionals // (subcommands and positional values), along with the flags used. // Then the flag values are applied to the parent parser and the current // subcommand being parsed. positionalOnlyArguments, helpRequested, err := sc.parseAllFlagsFromArgs(p, args) if err != nil { return err } // indicate that trailing arguments have been extracted, so that they aren't // appended a second time p.trailingArgumentsExtracted = true // loop over positional values and look for their matching positional // parameter, or their positional command. If neither are found, then // we throw an error var parsedArgCount int for pos, v := range positionalOnlyArguments { // the first relative positional argument will be human natural at position 1 // but offset for the depth of relative commands being parsed for currently. relativeDepth := pos - depth + 1 // debugPrint("Parsing positional only position", relativeDepth, "with value", v) if relativeDepth < 1 { // debugPrint(sc.Name, "skipped value:", v) continue } parsedArgCount++ // determine subcommands and parse them by positional value and name for _, cmd := range sc.Subcommands { // debugPrint("Subcommand being compared", relativeDepth, "==", cmd.Position, "and", v, "==", cmd.Name, "==", cmd.ShortName) if relativeDepth == cmd.Position && (v == cmd.Name || v == cmd.ShortName) { debugPrint("Decending into positional subcommand", cmd.Name, "at relativeDepth", relativeDepth, "and absolute depth", depth+1) return cmd.parse(p, args, depth+parsedArgCount) // continue recursive positional parsing } } // determine positional args and parse them by positional value and name var foundPositional bool for _, val := range sc.PositionalFlags { if relativeDepth == val.Position { debugPrint("Found a positional value at relativePos:", relativeDepth, "value:", v) // set original value for help output val.defaultValue = *val.AssignmentVar // defrerence the struct pointer, then set the pointer property within it *val.AssignmentVar = v // debugPrint("set positional to value", *val.AssignmentVar) foundPositional = true val.Found = true break } } // if there aren't any positional flags but there are subcommands that // were not used, display a useful message with subcommand options. if !foundPositional && p.ShowHelpOnUnexpected { debugPrint("No positional at position", relativeDepth) var foundSubcommandAtDepth bool for _, cmd := range sc.Subcommands { if cmd.Position == relativeDepth { foundSubcommandAtDepth = true } } // if there is a subcommand here but it was not specified, display them all // as a suggestion to the user before exiting. if foundSubcommandAtDepth { // determine which name to use in upcoming help output fmt.Fprintln(os.Stderr, sc.Name+":", "No subcommand or positional value found at position", strconv.Itoa(relativeDepth)+".") var output string for _, cmd := range sc.Subcommands { if cmd.Hidden { continue } output = output + " " + cmd.Name } // if there are available subcommands, let the user know if len(output) > 0 { output = strings.TrimLeft(output, " ") fmt.Println("Available subcommands:", output) } exitOrPanic(2) } // if there were not any flags or subcommands at this position at all, then // throw an error (display Help if necessary) p.ShowHelpWithMessage("Unexpected argument: " + v) exitOrPanic(2) } } // if help was requested and we should show help when h is passed, if helpRequested && p.ShowHelpWithHFlag { p.ShowHelp() exitOrPanic(0) } // find any positionals that were not used on subcommands that were // found and throw help (unknown argument) in the global parse or subcommand for _, pv := range p.PositionalFlags { if pv.Required && !pv.Found { p.ShowHelpWithMessage("Required global positional variable " + pv.Name + " not found at position " + strconv.Itoa(pv.Position)) exitOrPanic(2) } } for _, pv := range sc.PositionalFlags { if pv.Required && !pv.Found { p.ShowHelpWithMessage("Required positional of subcommand " + sc.Name + " named " + pv.Name + " not found at position " + strconv.Itoa(pv.Position)) exitOrPanic(2) } } return nil } // addParsedFlag makes it easy to append flag values parsed by the subcommand func (sc *Subcommand) addParsedFlag(key string, value string) { sc.ParsedValues = append(sc.ParsedValues, newParsedValue(key, value, false)) } // addParsedPositionalValue makes it easy to append positionals parsed by the // subcommand func (sc *Subcommand) addParsedPositionalValue(value string) { sc.ParsedValues = append(sc.ParsedValues, newParsedValue("", value, true)) } // FlagExists lets you know if the flag name exists as either a short or long // name in the (sub)command func (sc *Subcommand) FlagExists(name string) bool { for _, f := range sc.Flags { if f.HasName(name) { return true } } return false } // AttachSubcommand adds a possible subcommand to the Parser. func (sc *Subcommand) AttachSubcommand(newSC *Subcommand, relativePosition int) { // assign the depth of the subcommand when its attached newSC.Position = relativePosition // ensure no subcommands at this depth with this name for _, other := range sc.Subcommands { if newSC.Position == other.Position { if newSC.Name != "" { if newSC.Name == other.Name { log.Panicln("Unable to add subcommand because one already exists at position" + strconv.Itoa(newSC.Position) + " with name " + other.Name) } } if newSC.ShortName != "" { if newSC.ShortName == other.ShortName { log.Panicln("Unable to add subcommand because one already exists at position" + strconv.Itoa(newSC.Position) + " with name " + other.ShortName) } } } } // ensure no positionals at this depth for _, other := range sc.PositionalFlags { if newSC.Position == other.Position { log.Panicln("Unable to add subcommand because a positional value already exists at position " + strconv.Itoa(newSC.Position) + ": " + other.Name) } } sc.Subcommands = append(sc.Subcommands, newSC) } // add is a "generic" to add flags of any type. Checks the supplied parent // parser to ensure that the user isn't setting version or help flags that // conflict with the built-in help and version flag behavior. func (sc *Subcommand) add(assignmentVar interface{}, shortName string, longName string, description string) { // if the flag is already used, throw an error for _, existingFlag := range sc.Flags { if longName != "" && existingFlag.LongName == longName { log.Panicln("Flag " + longName + " added to subcommand " + sc.Name + " but the name is already assigned.") } if shortName != "" && existingFlag.ShortName == shortName { log.Panicln("Flag " + shortName + " added to subcommand " + sc.Name + " but the short name is already assigned.") } } newFlag := Flag{ AssignmentVar: assignmentVar, ShortName: shortName, LongName: longName, Description: description, } sc.Flags = append(sc.Flags, &newFlag) } // String adds a new string flag func (sc *Subcommand) String(assignmentVar *string, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // StringSlice adds a new slice of strings flag // Specify the flag multiple times to fill the slice func (sc *Subcommand) StringSlice(assignmentVar *[]string, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // Bool adds a new bool flag func (sc *Subcommand) Bool(assignmentVar *bool, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // BoolSlice adds a new slice of bools flag // Specify the flag multiple times to fill the slice func (sc *Subcommand) BoolSlice(assignmentVar *[]bool, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // ByteSlice adds a new slice of bytes flag // Specify the flag multiple times to fill the slice. Takes hex as input. func (sc *Subcommand) ByteSlice(assignmentVar *[]byte, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // Duration adds a new time.Duration flag. // Input format is described in time.ParseDuration(). // Example values: 1h, 1h50m, 32s func (sc *Subcommand) Duration(assignmentVar *time.Duration, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // DurationSlice adds a new time.Duration flag. // Input format is described in time.ParseDuration(). // Example values: 1h, 1h50m, 32s // Specify the flag multiple times to fill the slice. func (sc *Subcommand) DurationSlice(assignmentVar *[]time.Duration, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // Float32 adds a new float32 flag. func (sc *Subcommand) Float32(assignmentVar *float32, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // Float32Slice adds a new float32 flag. // Specify the flag multiple times to fill the slice. func (sc *Subcommand) Float32Slice(assignmentVar *[]float32, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // Float64 adds a new float64 flag. func (sc *Subcommand) Float64(assignmentVar *float64, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // Float64Slice adds a new float64 flag. // Specify the flag multiple times to fill the slice. func (sc *Subcommand) Float64Slice(assignmentVar *[]float64, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // Int adds a new int flag func (sc *Subcommand) Int(assignmentVar *int, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // IntSlice adds a new int slice flag. // Specify the flag multiple times to fill the slice. func (sc *Subcommand) IntSlice(assignmentVar *[]int, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // UInt adds a new uint flag func (sc *Subcommand) UInt(assignmentVar *uint, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // UIntSlice adds a new uint slice flag. // Specify the flag multiple times to fill the slice. func (sc *Subcommand) UIntSlice(assignmentVar *[]uint, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // UInt64 adds a new uint64 flag func (sc *Subcommand) UInt64(assignmentVar *uint64, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // UInt64Slice adds a new uint64 slice flag. // Specify the flag multiple times to fill the slice. func (sc *Subcommand) UInt64Slice(assignmentVar *[]uint64, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // UInt32 adds a new uint32 flag func (sc *Subcommand) UInt32(assignmentVar *uint32, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // UInt32Slice adds a new uint32 slice flag. // Specify the flag multiple times to fill the slice. func (sc *Subcommand) UInt32Slice(assignmentVar *[]uint32, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // UInt16 adds a new uint16 flag func (sc *Subcommand) UInt16(assignmentVar *uint16, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // UInt16Slice adds a new uint16 slice flag. // Specify the flag multiple times to fill the slice. func (sc *Subcommand) UInt16Slice(assignmentVar *[]uint16, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // UInt8 adds a new uint8 flag func (sc *Subcommand) UInt8(assignmentVar *uint8, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // UInt8Slice adds a new uint8 slice flag. // Specify the flag multiple times to fill the slice. func (sc *Subcommand) UInt8Slice(assignmentVar *[]uint8, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // Int64 adds a new int64 flag. func (sc *Subcommand) Int64(assignmentVar *int64, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // Int64Slice adds a new int64 slice flag. // Specify the flag multiple times to fill the slice. func (sc *Subcommand) Int64Slice(assignmentVar *[]int64, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // Int32 adds a new int32 flag func (sc *Subcommand) Int32(assignmentVar *int32, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // Int32Slice adds a new int32 slice flag. // Specify the flag multiple times to fill the slice. func (sc *Subcommand) Int32Slice(assignmentVar *[]int32, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // Int16 adds a new int16 flag func (sc *Subcommand) Int16(assignmentVar *int16, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // Int16Slice adds a new int16 slice flag. // Specify the flag multiple times to fill the slice. func (sc *Subcommand) Int16Slice(assignmentVar *[]int16, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // Int8 adds a new int8 flag func (sc *Subcommand) Int8(assignmentVar *int8, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // Int8Slice adds a new int8 slice flag. // Specify the flag multiple times to fill the slice. func (sc *Subcommand) Int8Slice(assignmentVar *[]int8, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // IP adds a new net.IP flag. func (sc *Subcommand) IP(assignmentVar *net.IP, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // IPSlice adds a new int8 slice flag. // Specify the flag multiple times to fill the slice. func (sc *Subcommand) IPSlice(assignmentVar *[]net.IP, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // HardwareAddr adds a new net.HardwareAddr flag. func (sc *Subcommand) HardwareAddr(assignmentVar *net.HardwareAddr, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // HardwareAddrSlice adds a new net.HardwareAddr slice flag. // Specify the flag multiple times to fill the slice. func (sc *Subcommand) HardwareAddrSlice(assignmentVar *[]net.HardwareAddr, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // IPMask adds a new net.IPMask flag. IPv4 Only. func (sc *Subcommand) IPMask(assignmentVar *net.IPMask, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // IPMaskSlice adds a new net.HardwareAddr slice flag. IPv4 only. // Specify the flag multiple times to fill the slice. func (sc *Subcommand) IPMaskSlice(assignmentVar *[]net.IPMask, shortName string, longName string, description string) { sc.add(assignmentVar, shortName, longName, description) } // AddPositionalValue adds a positional value to the subcommand. the // relativePosition starts at 1 and is relative to the subcommand it belongs to func (sc *Subcommand) AddPositionalValue(assignmentVar *string, name string, relativePosition int, required bool, description string) { // ensure no other positionals are at this depth for _, other := range sc.PositionalFlags { if relativePosition == other.Position { log.Panicln("Unable to add positional value because one already exists at position: " + strconv.Itoa(relativePosition)) } } // ensure no subcommands at this depth for _, other := range sc.Subcommands { if relativePosition == other.Position { log.Panicln("Unable to add positional value a subcommand already exists at position: " + strconv.Itoa(relativePosition)) } } newPositionalValue := PositionalValue{ Name: name, Position: relativePosition, AssignmentVar: assignmentVar, Required: required, Description: description, defaultValue: *assignmentVar, } sc.PositionalFlags = append(sc.PositionalFlags, &newPositionalValue) } // SetValueForKey sets the value for the specified key. If setting a bool // value, then send "true" or "false" as strings. The returned bool indicates // that a value was set. func (sc *Subcommand) SetValueForKey(key string, value string) (bool, error) { // debugPrint("Looking to set key", key, "to value", value) // check for and assign flags that match the key for _, f := range sc.Flags { // debugPrint("Evaluating string flag", f.ShortName, "==", key, "||", f.LongName, "==", key) if f.ShortName == key || f.LongName == key { // debugPrint("Setting string value for", key, "to", value) f.identifyAndAssignValue(value) return true, nil } } // debugPrint(sc.Name, "was unable to find a key named", key, "to set to value", value) return false, nil } // ensureNoConflictWithBuiltinHelp ensures that the flags on this subcommand do // not conflict with the builtin help flags (-h or --help). Exits the program // if a conflict is found. func (sc *Subcommand) ensureNoConflictWithBuiltinHelp() { for _, f := range sc.Flags { if f.LongName == helpFlagLongName { sc.exitBecauseOfHelpFlagConflict(f.LongName) } if f.LongName == helpFlagShortName { sc.exitBecauseOfHelpFlagConflict(f.LongName) } if f.ShortName == helpFlagLongName { sc.exitBecauseOfHelpFlagConflict(f.ShortName) } if f.ShortName == helpFlagShortName { sc.exitBecauseOfHelpFlagConflict(f.ShortName) } } } // ensureNoConflictWithBuiltinVersion ensures that the flags on this subcommand do // not conflict with the builtin version flag (--version). Exits the program // if a conflict is found. func (sc *Subcommand) ensureNoConflictWithBuiltinVersion() { for _, f := range sc.Flags { if f.LongName == versionFlagLongName { sc.exitBecauseOfVersionFlagConflict(f.LongName) } if f.ShortName == versionFlagLongName { sc.exitBecauseOfVersionFlagConflict(f.ShortName) } } } // exitBecauseOfVersionFlagConflict exits the program with a message about how to prevent // flags being defined from conflicting with the builtin flags. func (sc *Subcommand) exitBecauseOfVersionFlagConflict(flagName string) { fmt.Println(`Flag with name '` + flagName + `' conflicts with the internal --version flag in flaggy. You must either change the flag's name, or disable flaggy's internal version flag with 'flaggy.DefaultParser.ShowVersionWithVersionFlag = false'. If you are using a custom parser, you must instead set '.ShowVersionWithVersionFlag = false' on it.`) exitOrPanic(1) } // exitBecauseOfHelpFlagConflict exits the program with a message about how to prevent // flags being defined from conflicting with the builtin flags. func (sc *Subcommand) exitBecauseOfHelpFlagConflict(flagName string) { fmt.Println(`Flag with name '` + flagName + `' conflicts with the internal --help or -h flag in flaggy. You must either change the flag's name, or disable flaggy's internal help flag with 'flaggy.DefaultParser.ShowHelpWithHFlag = false'. If you are using a custom parser, you must instead set '.ShowHelpWithHFlag = false' on it.`) exitOrPanic(1) } ================================================ FILE: vendor/github.com/jesseduffield/asciigraph/.gitignore ================================================ # Binaries for programs and plugins *.exe *.exe~ *.dll *.so *.dylib # Test binary, build with `go test -c` *.test # Output of the go coverage tool, specifically when used with LiteIDE *.out # ide .idea ================================================ FILE: vendor/github.com/jesseduffield/asciigraph/.travis.yml ================================================ language: go go: - "1.x" - "1.8.x" - "1.9.x" - "1.10.x" - master install: - go get github.com/mattn/goveralls - go get golang.org/x/tools/cmd/cover script: - go test -v -race ./. - goveralls -service=travis-ci notifications: email: false ================================================ FILE: vendor/github.com/jesseduffield/asciigraph/LICENSE ================================================ BSD 3-Clause License Copyright (c) 2018, Rohit Gupta 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 the copyright holder 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 HOLDER 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. ================================================ FILE: vendor/github.com/jesseduffield/asciigraph/README.rst ================================================ .. -*-restructuredtext-*- asciigraph =========== .. image:: https://travis-ci.org/guptarohit/asciigraph.svg?branch=master :target: https://travis-ci.org/guptarohit/asciigraph :alt: Build status .. image:: https://goreportcard.com/badge/github.com/guptarohit/asciigraph :target: https://goreportcard.com/report/github.com/guptarohit/asciigraph :alt: Go Report Card .. image:: https://coveralls.io/repos/github/guptarohit/asciigraph/badge.svg?branch=master :target: https://coveralls.io/github/guptarohit/asciigraph?branch=master :alt: Coverage Status .. image:: https://godoc.org/github.com/guptarohit/asciigraph?status.svg :target: https://godoc.org/github.com/guptarohit/asciigraph :alt: GoDoc .. image:: https://img.shields.io/badge/licence-BSD-blue.svg :target: https://github.com/guptarohit/asciigraph/blob/master/LICENSE :alt: License | Go package to make lightweight ASCII line graphs ╭┈╯. .. image:: https://user-images.githubusercontent.com/7895001/41509956-b1b2b3d0-7279-11e8-9d19-d7dea17d5e44.png Installation ------------ :: go get github.com/guptarohit/asciigraph Usage ----- Basic graph ^^^^^^^^^^^ .. code:: go package main import ( "fmt" "github.com/guptarohit/asciigraph" ) func main() { data := []float64{3, 4, 9, 6, 2, 4, 5, 8, 5, 10, 2, 7, 2, 5, 6} graph := asciigraph.Plot(data) fmt.Println(graph) } Running this example would render the following graph: :: 10.00 ┤ ╭╮ 9.00 ┤ ╭╮ ││ 8.00 ┤ ││ ╭╮││ 7.00 ┤ ││ ││││╭╮ 6.00 ┤ │╰╮ ││││││ ╭ 5.00 ┤ │ │ ╭╯╰╯│││╭╯ 4.00 ┤╭╯ │╭╯ ││││ 3.00 ┼╯ ││ ││││ 2.00 ┤ ╰╯ ╰╯╰╯ .. Command line interface ---------------------- This package also brings a small utility for command line usage. Assuming ``$GOPATH/bin`` is in your ``$PATH``, simply ``go get`` it then install CLI. CLI Installation ^^^^^^^^^^^^^^^^ :: go install github.com/guptarohit/asciigraph/cmd/asciigraph Feed it data points via stdin: :: $ seq 1 72 | asciigraph -h 10 -c "plot data from stdin" 72.00 ┼ 65.55 ┤ ╭──── 59.09 ┤ ╭──────╯ 52.64 ┤ ╭──────╯ 46.18 ┤ ╭──────╯ 39.73 ┤ ╭──────╯ 33.27 ┤ ╭───────╯ 26.82 ┤ ╭──────╯ 20.36 ┤ ╭──────╯ 13.91 ┤ ╭──────╯ 7.45 ┤ ╭──────╯ 1.00 ┼──╯ plot data from stdin .. Acknowledgement ---------------- This package is golang port of library `asciichart `_ written by `@kroitor `_. Contributing ------------ Feel free to make a pull request! :octocat: ================================================ FILE: vendor/github.com/jesseduffield/asciigraph/asciigraph.go ================================================ package asciigraph import ( "bytes" "fmt" "math" "strings" ) // Plot returns ascii graph for a series. func Plot(series []float64, options ...Option) string { var logMaximum float64 config := configure(config{ Offset: 3, }, options) if config.Width > 0 { series = interpolateArray(series, config.Width) } minimum, maximum := minMaxFloat64Slice(series) if config.Min != nil && *config.Min < minimum { minimum = *config.Min } if config.Max != nil && *config.Max > maximum { maximum = *config.Max } interval := math.Abs(maximum - minimum) if config.Height <= 0 { if int(interval) <= 0 { config.Height = int(interval * math.Pow10(int(math.Ceil(-math.Log10(interval))))) } else { config.Height = int(interval) } } if config.Offset <= 0 { config.Offset = 3 } var min2 float64 var max2 float64 var ratio float64 padding := 0.0 // if we set height to 10 but min and max are both 0, we need 10 units of padding if interval != 0 { ratio = float64(config.Height) / interval } else { ratio = 1 if config.Height > 0 { padding = float64(config.Height) } } min2 = round(minimum * ratio) max2 = round((maximum + padding) * ratio) intmin2 := int(min2) intmax2 := int(max2) rows := int(math.Abs(float64(intmax2 - intmin2))) width := len(series) + config.Offset var plot [][]string // initialise empty 2D grid for i := 0; i < rows+1; i++ { var line []string for j := 0; j < width; j++ { line = append(line, " ") } plot = append(plot, line) } precision := 2 logMaximum = math.Log10(math.Max(math.Abs(maximum), math.Abs(minimum))) //to find number of zeros after decimal if minimum == float64(0) && maximum == float64(0) { logMaximum = float64(-1) } if logMaximum < 0 { // negative log if math.Mod(logMaximum, 1) != 0 { // non-zero digits after decimal precision = precision + int(math.Abs(logMaximum)) } else { precision = precision + int(math.Abs(logMaximum)-1.0) } } else if logMaximum > 2 { precision = 0 } maxNumLength := len(fmt.Sprintf("%0.*f", precision, maximum)) minNumLength := len(fmt.Sprintf("%0.*f", precision, minimum)) maxWidth := int(math.Max(float64(maxNumLength), float64(minNumLength))) // axis and labels for y := intmin2; y < intmax2+1; y++ { var magnitude float64 if rows > 0 { magnitude = maximum - (float64(y-intmin2) * interval / float64(rows)) } else { magnitude = float64(y) } label := fmt.Sprintf("%*.*f", maxWidth+1, precision, magnitude) w := y - intmin2 h := int(math.Max(float64(config.Offset)-float64(len(label)), 0)) plot[w][h] = label if y == 0 { plot[w][config.Offset-1] = "┼" } else { plot[w][config.Offset-1] = "┤" } } y0 := int(round(series[0]*ratio) - min2) var y1 int plot[rows-y0][config.Offset-1] = "┼" // first value for x := 0; x < len(series)-1; x++ { // plot the line y0 = int(round(series[x+0]*ratio) - float64(intmin2)) y1 = int(round(series[x+1]*ratio) - float64(intmin2)) if y0 == y1 { plot[rows-y0][x+config.Offset] = "─" } else { if y0 > y1 { plot[rows-y1][x+config.Offset] = "╰" plot[rows-y0][x+config.Offset] = "╮" } else { plot[rows-y1][x+config.Offset] = "╭" plot[rows-y0][x+config.Offset] = "╯" } start := int(math.Min(float64(y0), float64(y1))) + 1 end := int(math.Max(float64(y0), float64(y1))) for y := start; y < end; y++ { plot[rows-y][x+config.Offset] = "│" } } } // join columns var lines bytes.Buffer for h, horizontal := range plot { if h != 0 { lines.WriteRune('\n') } for _, v := range horizontal { lines.WriteString(v) } } // add caption if not empty if config.Caption != "" { lines.WriteRune('\n') lines.WriteString(strings.Repeat(" ", config.Offset+maxWidth+2)) lines.WriteString(config.Caption) } return lines.String() } ================================================ FILE: vendor/github.com/jesseduffield/asciigraph/options.go ================================================ package asciigraph import ( "strings" ) // Option represents a configuration setting. type Option interface { apply(c *config) } // config holds various graph options type config struct { Width, Height int Min, Max *float64 Offset int Caption string } // An optionFunc applies an option. type optionFunc func(*config) // apply implements the Option interface. func (of optionFunc) apply(c *config) { of(c) } func configure(defaults config, options []Option) *config { for _, o := range options { o.apply(&defaults) } return &defaults } // Width sets the graphs width. By default, the width of the graph is // determined by the number of data points. If the value given is a // positive number, the data points are interpolated on the x axis. // Values <= 0 reset the width to the default value. func Width(w int) Option { return optionFunc(func(c *config) { if w > 0 { c.Width = w } else { c.Width = 0 } }) } // Height sets the graphs height. func Height(h int) Option { return optionFunc(func(c *config) { if h > 0 { c.Height = h } else { c.Height = 0 } }) } // Min sets the graph's minimum value for the vertical axis. It will be ignored // if the series contains a lower value. func Min(min float64) Option { return optionFunc(func(c *config) { c.Min = &min }) } // Max sets the graph's maximum value for the vertical axis. It will be ignored // if the series contains a bigger value. func Max(max float64) Option { return optionFunc(func(c *config) { c.Max = &max }) } // Offset sets the graphs offset. func Offset(o int) Option { return optionFunc(func(c *config) { c.Offset = o }) } // Caption sets the graphs caption. func Caption(caption string) Option { return optionFunc(func(c *config) { c.Caption = strings.TrimSpace(caption) }) } ================================================ FILE: vendor/github.com/jesseduffield/asciigraph/utils.go ================================================ package asciigraph import "math" func minMaxFloat64Slice(v []float64) (min, max float64) { min = math.Inf(1) max = math.Inf(-1) if len(v) == 0 { panic("Empty slice") } for _, e := range v { if e < min { min = e } if e > max { max = e } } return } func round(input float64) float64 { if math.IsNaN(input) { return math.NaN() } sign := 1.0 if input < 0 { sign = -1 input *= -1 } _, decimal := math.Modf(input) var rounded float64 if decimal >= 0.5 { rounded = math.Ceil(input) } else { rounded = math.Floor(input) } return rounded * sign } func linearInterpolate(before, after, atPoint float64) float64 { return before + (after-before)*atPoint } func interpolateArray(data []float64, fitCount int) []float64 { var interpolatedData []float64 springFactor := float64(len(data)-1) / float64(fitCount-1) interpolatedData = append(interpolatedData, data[0]) for i := 1; i < fitCount-1; i++ { spring := float64(i) * springFactor before := math.Floor(spring) after := math.Ceil(spring) atPoint := spring - before interpolatedData = append(interpolatedData, linearInterpolate(data[int(before)], data[int(after)], atPoint)) } interpolatedData = append(interpolatedData, data[len(data)-1]) return interpolatedData } ================================================ FILE: vendor/github.com/jesseduffield/gocui/.gitignore ================================================ *.swp ================================================ FILE: vendor/github.com/jesseduffield/gocui/AUTHORS ================================================ # This is the official list of gocui authors for copyright purposes. # Names should be added to this file as # Name or Organization contribution # Contribution # The email address is not required for organizations. Roi Martin Main developer Ryan Sullivan Toggleable view frames Matthieu Rakotojaona Wrapped views Harry Lawrence Basic mouse support Danny Tylman Masked views Frederik Deweerdt Colored fonts Henri Koski Custom current view color Dustin Willis Webber 256-colors output mode support ================================================ FILE: vendor/github.com/jesseduffield/gocui/CHANGES_tcell.md ================================================ # Change from termbox to tcell Original GOCUI was written on top of [termbox](https://github.com/nsf/termbox-go) package. This document describes changes which were done to be able to use to [tcell/v2](https://github.com/gdamore/tcell) package. ## Attribute color Attribute type represents a terminal attribute like color and font effects. Color and font effects can be combined using bitwise OR (`|`). In `termbox` colors were represented by range 1 to 256. `0` was default color which uses the terminal default setting. In `tcell` colors can be represented in 24bit, and all of them starts from 0. Valid colors have special flag which gives them real value starting from 4294967296. `0` is a default similart to `termbox`. The change to support all these colors was made in a way, that original colors from 1 to 256 are backward compatible and if user has color specified as `Attribute(ansicolor+1)` without the valid color flag, it will be translated to `tcell` color by subtracting 1 and making the color valid by adding the flag. This should ensure backward compatibility. All the color constants are the same with different underlying values. From user perspective, this should be fine unless some arithmetic is done with it. For example `ColorBlack` was `1` in original version but is `4294967296` in new version. GOCUI provides a few helper functions which could be used to get the real color value or to create a color attribute. - `(a Attribute).Hex()` - returns `int32` value of the color represented as `Red << 16 | Green << 8 | Blue` - `(a Attribute).RGB()` - returns 3 `int32` values for red, green and blue color. - `GetColor(string)` - creates `Attribute` from color passed as a string. This can be hex value or color name (W3C name). - `Get256Color(int32)` - creates `Attribute` from color number (ANSI colors). - `GetRGBColor(int32)` - creates `Attribute` from color number created the same way as `Hex()` function returns. - `NewRGBColor(int32, int32, int32)` - creates `Attribute` from color numbers for red, green and blue values. ## Attribute font effect There were 3 attributes for font effect, `AttrBold`, `AttrUnderline` and `AttrReverse`. `tcell` supports more attributes, so they were added. All of these attributes have different values from before. However they can be used in the same way as before. All the font effect attributes: - `AttrBold` - `AttrBlink` - `AttrReverse` - `AttrUnderline` - `AttrDim` - `AttrItalic` - `AttrStrikeThrough` ## OutputMode `OutputMode` in `termbox` was used to translate colors into the correct range. So for example in `OutputGrayscale` you had colors from 1 - 24 all representing gray colors in range 232 - 255, and white and black color. `tcell` colors are 24bit and they are translated by the library into the color which can be read by terminal. The original translation from `termbox` was included in GOCUI to be backward compatible. This is enabled in all the original modes: `OutputNormal`, `Output216`, `OutputGrayscale` and `Output256`. `OutputTrue` is a new mode. It is recomended, because in this mode GOCUI doesn't do any kind of translation of the colors and pass them directly to `tcell`. If user wants to use true color in terminal and this mode doesn't work, it might be because of the terminal setup. `tcell` has a documentation what needs to be done, but in short `COLORTERM=truecolor` environment variable should help (see [_examples/colorstrue.go](./_examples/colorstrue.go)). Other way would be to have `TERM` environment variable having value with suffix `-truecolor`. To disable true color set `TCELL_TRUECOLOR=disable`. ## Keybinding `termbox` had different way of handling input from terminal than `tcell`. This leads to some adjustement on how the keys are represented. In general, all the keys in GOCUI should be presented from before, but the underlying values might be different. This could lead to some problems if a user uses different parser to create the `Key` for the keybinding. If using GOCUI parser, everything should be ok. Mouse is handled differently in `tcell`, but translation was done to keep it in the same way as it was before. However this was harder to test due to different behaviour across the platforms, so if anything is missing or not working, please report. ================================================ FILE: vendor/github.com/jesseduffield/gocui/CODE_OF_CONDUCT.md ================================================ # Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism * Focusing on what is best for the community * Showing empathy towards other community members Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at mkopenga@gmail.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html [homepage]: https://www.contributor-covenant.org For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq ================================================ FILE: vendor/github.com/jesseduffield/gocui/CONTRIBUTING.md ================================================ # Contributing Everyone is welcome to help make gocui better! When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change. ## So all code changes happen through Pull Requests Pull requests are the best way to propose changes to the codebase. We actively welcome your pull requests: 1. Fork the repo and create your branch from `master` with a name like `feature/contributors-guide`. 2. If you've added code that should be tested, add tests. 3. If you've added code that need documentation, update the documentation. 4. Make sure your code follows the [effective go](https://golang.org/doc/effective_go.html) guidelines as much as possible. 5. Be sure to test your modifications. 6. Make sure your branch is up to date with the master branch. 7. Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). 8. Create that pull request! ## Code of conduct Please note by participating in this project, you agree to abide by the [code of conduct]. [code of conduct]: https://github.com/awesome-gocui/gocui/blob/master/CODE-OF-CONDUCT.md ## Any contributions you make will be under the license indicated in the [license](LICENSE.md) In short, when you submit code changes, your submissions are understood to be under the same license as the rest of project. Feel free to contact the maintainers if that's a concern. ## Report bugs using Github's [issues](https://github.com/awesome-gocui/gocui/issues) We use GitHub issues to track public bugs. Report a bug by [opening a new issue](https://github.com/awesome-gocui/gocui/issues/new); it's that easy! ================================================ FILE: vendor/github.com/jesseduffield/gocui/LICENSE ================================================ Copyright (c) 2014 The gocui 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 the gocui Authors 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. ================================================ FILE: vendor/github.com/jesseduffield/gocui/README.md ================================================ # GOCUI - Go Console User Interface [![CircleCI](https://circleci.com/gh/awesome-gocui/gocui/tree/master.svg?style=svg)](https://circleci.com/gh/awesome-gocui/gocui/tree/master) [![CodeCov](https://codecov.io/gh/awesome-gocui/gocui/branch/master/graph/badge.svg)](https://codecov.io/gh/awesome-gocui/gocui) [![Go Report Card](https://goreportcard.com/badge/github.com/awesome-gocui/gocui)](https://goreportcard.com/report/github.com/awesome-gocui/gocui) [![GolangCI](https://golangci.com/badges/github.com/awesome-gocui/gocui.svg)](https://golangci.com/badges/github.com/awesome-gocui/gocui.svg) [![GoDoc](https://godoc.org/github.com/awesome-gocui/gocui?status.svg)](https://godoc.org/github.com/awesome-gocui/gocui) ![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/awesome-gocui/gocui.svg) Minimalist Go package aimed at creating Console User Interfaces. A community fork based on the amazing work of [jroimartin](https://github.com/jroimartin/gocui) ## Features * Minimalist API. * Views (the "windows" in the GUI) implement the interface io.ReadWriter. * Support for overlapping views. * The GUI can be modified at runtime (concurrent-safe). * Global and view-level keybindings. * Mouse support. * Colored text. * Customizable editing mode. * Easy to build reusable widgets, complex layouts... ## About fork This fork has many improvements over the original work from [jroimartin](https://github.com/jroimartin/gocui). * Written ontop of TCell * Better wide character support * Support for 1 Line height views * Better support for running in docker container * Customize frame colors * Improved code comments and quality * Many small improvements * Change Visibility of views For information about this org see: [awesome-gocui/about](https://github.com/awesome-gocui/about). ## Installation Execute: ``` $ go get github.com/awesome-gocui/gocui ``` ## Documentation Execute: ``` $ go doc github.com/awesome-gocui/gocui ``` Or visit [godoc.org](https://godoc.org/github.com/awesome-gocui/gocui) to read it online. ## Example See the [_example](./_example/) folder for more examples ```go package main import ( "fmt" "log" "github.com/awesome-gocui/gocui" ) func main() { g, err := gocui.NewGui(gocui.OutputNormal, true) if err != nil { log.Panicln(err) } defer g.Close() g.SetManagerFunc(layout) if err := g.SetKeybinding("", gocui.KeyCtrlC, gocui.ModNone, quit); err != nil { log.Panicln(err) } if err := g.MainLoop(); err != nil && !gocui.IsQuit(err) { log.Panicln(err) } } func layout(g *gocui.Gui) error { maxX, maxY := g.Size() if v, err := g.SetView("hello", maxX/2-7, maxY/2, maxX/2+7, maxY/2+2, 0); err != nil { if !gocui.IsUnknownView(err) { return err } if _, err := g.SetCurrentView("hello"); err != nil { return err } fmt.Fprintln(v, "Hello world!") } return nil } func quit(g *gocui.Gui, v *gocui.View) error { return gocui.ErrQuit } ``` ## Screenshots ![r2cui](https://cloud.githubusercontent.com/assets/1223476/19418932/63645052-93ce-11e6-867c-da5e97e37237.png) ![_examples/demo.go](https://cloud.githubusercontent.com/assets/1223476/5992750/720b84f0-aa36-11e4-88ec-296fa3247b52.png) ![_examples/dynamic.go](https://cloud.githubusercontent.com/assets/1223476/5992751/76ad5cc2-aa36-11e4-8204-6a90269db827.png) ## Projects using gocui * [komanda-cli](https://github.com/mephux/komanda-cli): IRC Client For Developers. * [vuls](https://github.com/future-architect/vuls): Agentless vulnerability scanner for Linux/FreeBSD. * [wuzz](https://github.com/asciimoo/wuzz): Interactive cli tool for HTTP inspection. * [httplab](https://github.com/gchaincl/httplab): Interactive web server. * [domainr](https://github.com/MichaelThessel/domainr): Tool that checks the availability of domains based on keywords. * [gotime](https://github.com/nanohard/gotime): Time tracker for projects and tasks. * [claws](https://github.com/thehowl/claws): Interactive command line client for testing websockets. * [terminews](http://github.com/antavelos/terminews): Terminal based RSS reader. * [diagram](https://github.com/esimov/diagram): Tool to convert ascii arts into hand drawn diagrams. * [pody](https://github.com/JulienBreux/pody): CLI app to manage Pods in a Kubernetes cluster. * [kubexp](https://github.com/alitari/kubexp): Kubernetes client. * [kcli](https://github.com/cswank/kcli): Tool for inspecting kafka topics/partitions/messages. * [fac](https://github.com/mkchoi212/fac): git merge conflict resolver * [jsonui](https://github.com/gulyasm/jsonui): Interactive JSON explorer for your terminal. * [cointop](https://github.com/miguelmota/cointop): Interactive terminal based UI application for tracking cryptocurrencies. * [lazygit](https://github.com/jesseduffield/lazygit): simple terminal UI for git commands. * [lazydocker](https://github.com/jesseduffield/lazydocker): The lazier way to manage everything docker. Note: if your project is not listed here, let us know! :) ================================================ FILE: vendor/github.com/jesseduffield/gocui/attribute.go ================================================ // Copyright 2020 The gocui 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 gocui import "github.com/gdamore/tcell/v2" // Attribute affects the presentation of characters, such as color, boldness, etc. type Attribute uint64 const ( // ColorDefault is used to leave the Color unchanged from whatever system or teminal default may exist. ColorDefault = Attribute(tcell.ColorDefault) // AttrIsValidColor is used to indicate the color value is actually // valid (initialized). This is useful to permit the zero value // to be treated as the default. AttrIsValidColor = Attribute(tcell.ColorValid) // AttrIsRGBColor is used to indicate that the Attribute value is RGB value of color. // The lower order 3 bytes are RGB. // (It's not a color in basic ANSI range 256). AttrIsRGBColor = Attribute(tcell.ColorIsRGB) // AttrColorBits is a mask where color is located in Attribute AttrColorBits = 0xffffffffff // roughly 5 bytes, tcell uses 4 bytes and half-byte as a special flags for color (rest is reserved for future) // AttrStyleBits is a mask where character attributes (e.g.: bold, italic, underline) are located in Attribute AttrStyleBits = 0xffffff0000000000 // remaining 3 bytes in the 8 bytes Attribute (tcell is not using it, so we should be fine) ) // Color attributes. These colors are compatible with tcell.Color type and can be expanded like: // // g.FgColor := gocui.Attribute(tcell.ColorLime) const ( ColorBlack Attribute = AttrIsValidColor + iota ColorRed ColorGreen ColorYellow ColorBlue ColorMagenta ColorCyan ColorWhite ) // grayscale indexes (for backward compatibility with termbox-go original grayscale) var grayscale = []tcell.Color{ 16, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 231, } // Attributes are not colors, but effects (e.g.: bold, dim) which affect the display of text. // They can be combined. const ( AttrBold Attribute = 1 << (40 + iota) AttrBlink AttrReverse AttrUnderline AttrDim AttrItalic AttrStrikeThrough AttrNone Attribute = 0 // Just normal text. ) // AttrAll represents all the text effect attributes turned on const AttrAll = AttrBold | AttrBlink | AttrReverse | AttrUnderline | AttrDim | AttrItalic // IsValidColor indicates if the Attribute is a valid color value (has been set). func (a Attribute) IsValidColor() bool { return a&AttrIsValidColor != 0 } // Hex returns the color's hexadecimal RGB 24-bit value with each component // consisting of a single byte, ala R << 16 | G << 8 | B. If the color // is unknown or unset, -1 is returned. // // This function produce the same output as `tcell.Hex()` with additional // support for `termbox-go` colors (to 256). func (a Attribute) Hex() int32 { if !a.IsValidColor() { return -1 } tc := getTcellColor(a, OutputTrue) return tc.Hex() } // RGB returns the red, green, and blue components of the color, with // each component represented as a value 0-255. If the color // is unknown or unset, -1 is returned for each component. // // This function produce the same output as `tcell.RGB()` with additional // support for `termbox-go` colors (to 256). func (a Attribute) RGB() (int32, int32, int32) { v := a.Hex() if v < 0 { return -1, -1, -1 } return (v >> 16) & 0xff, (v >> 8) & 0xff, v & 0xff } // GetColor creates a Color from a color name (W3C name). A hex value may // be supplied as a string in the format "#ffffff". func GetColor(color string) Attribute { return Attribute(tcell.GetColor(color)) } // Get256Color creates Attribute which stores ANSI color (0-255) func Get256Color(color int32) Attribute { return Attribute(color) | AttrIsValidColor } // GetRGBColor creates Attribute which stores RGB color. // Color is passed as 24bit RGB value, where R << 16 | G << 8 | B func GetRGBColor(color int32) Attribute { return Attribute(color) | AttrIsValidColor | AttrIsRGBColor } // NewRGBColor creates Attribute which stores RGB color. func NewRGBColor(r, g, b int32) Attribute { return Attribute(tcell.NewRGBColor(r, g, b)) } // getTcellColor transform Attribute into tcell.Color func getTcellColor(c Attribute, omode OutputMode) tcell.Color { c = c & AttrColorBits // Default color is 0 in tcell/v2 and was 0 in termbox-go, so we are good here if c == ColorDefault { return tcell.ColorDefault } tc := tcell.ColorDefault // Check if we have valid color if c.IsValidColor() { tc = tcell.Color(c) } else if c > 0 && c <= 256 { // It's not valid color, but it has value in range 1-256 // This is old Attribute style of color from termbox-go (black=1, etc.) // convert to tcell color (black=0|ColorValid) tc = tcell.Color(c-1) | tcell.ColorValid } switch omode { case OutputTrue: return tc case OutputNormal: tc &= tcell.Color(0xf) | tcell.ColorValid case Output256: tc &= tcell.Color(0xff) | tcell.ColorValid case Output216: tc &= tcell.Color(0xff) if tc > 215 { return tcell.ColorDefault } tc += tcell.Color(16) | tcell.ColorValid case OutputGrayscale: tc &= tcell.Color(0x1f) if tc > 26 { return tcell.ColorDefault } tc = grayscale[tc] | tcell.ColorValid default: return tcell.ColorDefault } return tc } ================================================ FILE: vendor/github.com/jesseduffield/gocui/doc.go ================================================ // Copyright 2014 The gocui 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 gocui allows to create console user interfaces. Create a new GUI: g, err := gocui.NewGui(gocui.OutputNormal, false) if err != nil { // handle error } defer g.Close() // Set GUI managers and key bindings // ... if err := g.MainLoop(); err != nil && !gocui.IsQuit(err) { // handle error } Set GUI managers: g.SetManager(mgr1, mgr2) Managers are in charge of GUI's layout and can be used to build widgets. On each iteration of the GUI's main loop, the Layout function of each configured manager is executed. Managers are used to set-up and update the application's main views, being possible to freely change them during execution. Also, it is important to mention that a main loop iteration is executed on each reported event (key-press, mouse event, window resize, etc). GUIs are composed by Views, you can think of it as buffers. Views implement the io.ReadWriter interface, so you can just write to them if you want to modify their content. The same is valid for reading. Create and initialize a view with absolute coordinates: if v, err := g.SetView("viewname", 2, 2, 22, 7, 0); err != nil { if !gocui.IsUnknownView(err) { // handle error } fmt.Fprintln(v, "This is a new view") // ... } Views can also be created using relative coordinates: maxX, maxY := g.Size() if v, err := g.SetView("viewname", maxX/2-30, maxY/2, maxX/2+30, maxY/2+2, 0); err != nil { // ... } Configure keybindings: if err := g.SetKeybinding("viewname", gocui.KeyEnter, gocui.ModNone, fcn); err != nil { // handle error } gocui implements full mouse support that can be enabled with: g.Mouse = true Mouse events are handled like any other keybinding: if err := g.SetKeybinding("viewname", gocui.MouseLeft, gocui.ModNone, fcn); err != nil { // handle error } IMPORTANT: Views can only be created, destroyed or updated in three ways: from the Layout function within managers, from keybinding callbacks or via *Gui.Update(). The reason for this is that it allows gocui to be concurrent-safe. So, if you want to update your GUI from a goroutine, you must use *Gui.Update(). For example: g.Update(func(g *gocui.Gui) error { v, err := g.View("viewname") if err != nil { // handle error } v.Clear() fmt.Fprintln(v, "Writing from different goroutines") return nil }) By default, gocui provides a basic editing mode. This mode can be extended and customized creating a new Editor and assigning it to *View.Editor: type Editor interface { Edit(v *View, key Key, ch rune, mod Modifier) } DefaultEditor can be taken as example to create your own custom Editor: var DefaultEditor Editor = EditorFunc(simpleEditor) func simpleEditor(v *View, key Key, ch rune, mod Modifier) { switch { case ch != 0 && mod == 0: v.EditWrite(ch) case key == KeySpace: v.EditWrite(' ') case key == KeyBackspace || key == KeyBackspace2: v.EditDelete(true) // ... } } Colored text: Views allow to add colored text using ANSI colors. For example: fmt.Fprintln(v, "\x1b[0;31mHello world") For more information, see the examples in folder "_examples/". */ package gocui ================================================ FILE: vendor/github.com/jesseduffield/gocui/edit.go ================================================ // Copyright 2014 The gocui 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 gocui import ( "unicode" ) // Editor interface must be satisfied by gocui editors. type Editor interface { Edit(v *View, key Key, ch rune, mod Modifier) bool } // The EditorFunc type is an adapter to allow the use of ordinary functions as // Editors. If f is a function with the appropriate signature, EditorFunc(f) // is an Editor object that calls f. type EditorFunc func(v *View, key Key, ch rune, mod Modifier) bool // Edit calls f(v, key, ch, mod) func (f EditorFunc) Edit(v *View, key Key, ch rune, mod Modifier) bool { return f(v, key, ch, mod) } // DefaultEditor is the default editor. var DefaultEditor Editor = EditorFunc(SimpleEditor) // SimpleEditor is used as the default gocui editor. func SimpleEditor(v *View, key Key, ch rune, mod Modifier) bool { switch { case key == KeyBackspace || key == KeyBackspace2: v.TextArea.BackSpaceChar() case key == KeyCtrlD || key == KeyDelete: v.TextArea.DeleteChar() case key == KeyArrowDown: v.TextArea.MoveCursorDown() case key == KeyArrowUp: v.TextArea.MoveCursorUp() case key == KeyArrowLeft && (mod&ModAlt) != 0: v.TextArea.MoveLeftWord() case key == KeyArrowLeft: v.TextArea.MoveCursorLeft() case key == KeyArrowRight && (mod&ModAlt) != 0: v.TextArea.MoveRightWord() case key == KeyArrowRight: v.TextArea.MoveCursorRight() case key == KeyEnter: v.TextArea.TypeRune('\n') case key == KeySpace: v.TextArea.TypeRune(' ') case key == KeyInsert: v.TextArea.ToggleOverwrite() case key == KeyCtrlU: v.TextArea.DeleteToStartOfLine() case key == KeyCtrlK: v.TextArea.DeleteToEndOfLine() case key == KeyCtrlA || key == KeyHome: v.TextArea.GoToStartOfLine() case key == KeyCtrlE || key == KeyEnd: v.TextArea.GoToEndOfLine() case key == KeyCtrlW: v.TextArea.BackSpaceWord() case key == KeyCtrlY: v.TextArea.Yank() case unicode.IsPrint(ch): v.TextArea.TypeRune(ch) default: return false } v.RenderTextArea() return true } ================================================ FILE: vendor/github.com/jesseduffield/gocui/escape.go ================================================ // Copyright 2014 The gocui 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 gocui import ( "strconv" "github.com/go-errors/errors" ) type escapeInterpreter struct { state escapeState curch rune csiParam []string curFgColor, curBgColor Attribute mode OutputMode instruction instruction } type ( escapeState int fontEffect int ) type instruction interface{ isInstruction() } type eraseInLineFromCursor struct{} func (self eraseInLineFromCursor) isInstruction() {} type noInstruction struct{} func (self noInstruction) isInstruction() {} const ( stateNone escapeState = iota stateEscape stateCSI stateParams stateOSC stateOSCEscape bold fontEffect = 1 faint fontEffect = 2 italic fontEffect = 3 underline fontEffect = 4 blink fontEffect = 5 reverse fontEffect = 7 strike fontEffect = 9 setForegroundColor int = 38 defaultForegroundColor int = 39 setBackgroundColor int = 48 defaultBackgroundColor int = 49 ) var ( errNotCSI = errors.New("Not a CSI escape sequence") errCSIParseError = errors.New("CSI escape sequence parsing error") errCSITooLong = errors.New("CSI escape sequence is too long") ) // runes in case of error will output the non-parsed runes as a string. func (ei *escapeInterpreter) runes() []rune { switch ei.state { case stateNone: return []rune{0x1b} case stateEscape: return []rune{0x1b, ei.curch} case stateCSI: return []rune{0x1b, '[', ei.curch} case stateParams: ret := []rune{0x1b, '['} for _, s := range ei.csiParam { ret = append(ret, []rune(s)...) ret = append(ret, ';') } return append(ret, ei.curch) } return nil } // newEscapeInterpreter returns an escapeInterpreter that will be able to parse // terminal escape sequences. func newEscapeInterpreter(mode OutputMode) *escapeInterpreter { ei := &escapeInterpreter{ state: stateNone, curFgColor: ColorDefault, curBgColor: ColorDefault, mode: mode, instruction: noInstruction{}, } return ei } // reset sets the escapeInterpreter in initial state. func (ei *escapeInterpreter) reset() { ei.state = stateNone ei.curFgColor = ColorDefault ei.curBgColor = ColorDefault ei.csiParam = nil } func (ei *escapeInterpreter) instructionRead() { ei.instruction = noInstruction{} } // parseOne parses a rune. If isEscape is true, it means that the rune is part // of an escape sequence, and as such should not be printed verbatim. Otherwise, // it's not an escape sequence. func (ei *escapeInterpreter) parseOne(ch rune) (isEscape bool, err error) { // Sanity checks if len(ei.csiParam) > 20 { return false, errCSITooLong } if len(ei.csiParam) > 0 && len(ei.csiParam[len(ei.csiParam)-1]) > 255 { return false, errCSITooLong } ei.curch = ch switch ei.state { case stateNone: if ch == 0x1b { ei.state = stateEscape return true, nil } return false, nil case stateEscape: switch ch { case '[': ei.state = stateCSI return true, nil case ']': ei.state = stateOSC return true, nil default: return false, errNotCSI } case stateCSI: switch { case ch >= '0' && ch <= '9': ei.csiParam = append(ei.csiParam, "") case ch == 'm': ei.csiParam = append(ei.csiParam, "0") case ch == 'K': // fall through default: return false, errCSIParseError } ei.state = stateParams fallthrough case stateParams: switch { case ch >= '0' && ch <= '9': ei.csiParam[len(ei.csiParam)-1] += string(ch) return true, nil case ch == ';': ei.csiParam = append(ei.csiParam, "") return true, nil case ch == 'm': if err := ei.outputCSI(); err != nil { return false, errCSIParseError } ei.state = stateNone ei.csiParam = nil return true, nil case ch == 'K': p := 0 if len(ei.csiParam) != 0 && ei.csiParam[0] != "" { p, err = strconv.Atoi(ei.csiParam[0]) if err != nil { return false, errCSIParseError } } if p == 0 { ei.instruction = eraseInLineFromCursor{} } else { // non-zero values of P not supported ei.instruction = noInstruction{} } ei.state = stateNone ei.csiParam = nil return true, nil default: return false, errCSIParseError } case stateOSC: switch ch { case 0x1b: ei.state = stateOSCEscape return true, nil } return true, nil case stateOSCEscape: ei.state = stateNone return true, nil } return false, nil } func (ei *escapeInterpreter) outputCSI() error { n := len(ei.csiParam) for i := 0; i < n; { p, err := strconv.Atoi(ei.csiParam[i]) if err != nil { return errCSIParseError } skip := 1 switch { case p == 0: // reset style and color ei.curFgColor = ColorDefault ei.curBgColor = ColorDefault case p >= 1 && p <= 9: // set style ei.curFgColor |= getFontEffect(p) case p >= 21 && p <= 29: // reset style ei.curFgColor &= ^getFontEffect(p - 20) case p >= 30 && p <= 37: // set foreground color ei.curFgColor &= AttrStyleBits ei.curFgColor |= Get256Color(int32(p) - 30) case p == setForegroundColor: // set foreground color (256-color or true color) var color Attribute var err error color, skip, err = ei.csiColor(ei.csiParam[i:]) if err != nil { return err } ei.curFgColor &= AttrStyleBits ei.curFgColor |= color case p == defaultForegroundColor: // reset foreground color ei.curFgColor &= AttrStyleBits ei.curFgColor |= ColorDefault case p >= 40 && p <= 47: // set background color ei.curBgColor &= AttrStyleBits ei.curBgColor |= Get256Color(int32(p) - 40) case p == setBackgroundColor: // set background color (256-color or true color) var color Attribute var err error color, skip, err = ei.csiColor(ei.csiParam[i:]) if err != nil { return err } ei.curBgColor &= AttrStyleBits ei.curBgColor |= color case p == defaultBackgroundColor: // reset background color ei.curBgColor &= AttrStyleBits ei.curBgColor |= ColorDefault case p >= 90 && p <= 97: // set bright foreground color ei.curFgColor &= AttrStyleBits ei.curFgColor |= Get256Color(int32(p) - 90 + 8) case p >= 100 && p <= 107: // set bright background color ei.curBgColor &= AttrStyleBits ei.curBgColor |= Get256Color(int32(p) - 100 + 8) default: } i += skip } return nil } func (ei *escapeInterpreter) csiColor(param []string) (color Attribute, skip int, err error) { if len(param) < 2 { err = errCSIParseError return } switch param[1] { case "2": // 24-bit color if ei.mode < OutputTrue { err = errCSIParseError return } if len(param) < 5 { err = errCSIParseError return } var red, green, blue int red, err = strconv.Atoi(param[2]) if err != nil { err = errCSIParseError return } green, err = strconv.Atoi(param[3]) if err != nil { err = errCSIParseError return } blue, err = strconv.Atoi(param[4]) if err != nil { err = errCSIParseError return } return NewRGBColor(int32(red), int32(green), int32(blue)), 5, nil case "5": // 8-bit color if ei.mode < Output256 { err = errCSIParseError return } if len(param) < 3 { err = errCSIParseError return } var hex int hex, err = strconv.Atoi(param[2]) if err != nil { err = errCSIParseError return } return Get256Color(int32(hex)), 3, nil default: err = errCSIParseError return } } func getFontEffect(f int) Attribute { switch fontEffect(f) { case bold: return AttrBold case faint: return AttrDim case italic: return AttrItalic case underline: return AttrUnderline case blink: return AttrBlink case reverse: return AttrReverse case strike: return AttrStrikeThrough } return AttrNone } ================================================ FILE: vendor/github.com/jesseduffield/gocui/gui.go ================================================ // Copyright 2014 The gocui 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 gocui import ( "context" standardErrors "errors" "runtime" "strings" "sync" "time" "github.com/gdamore/tcell/v2" "github.com/go-errors/errors" "github.com/mattn/go-runewidth" ) // OutputMode represents an output mode, which determines how colors // are used. type OutputMode int var ( // ErrAlreadyBlacklisted is returned when the keybinding is already blacklisted. ErrAlreadyBlacklisted = standardErrors.New("keybind already blacklisted") // ErrBlacklisted is returned when the keybinding being parsed / used is blacklisted. ErrBlacklisted = standardErrors.New("keybind blacklisted") // ErrNotBlacklisted is returned when a keybinding being whitelisted is not blacklisted. ErrNotBlacklisted = standardErrors.New("keybind not blacklisted") // ErrNoSuchKeybind is returned when the keybinding being parsed does not exist. ErrNoSuchKeybind = standardErrors.New("no such keybind") // ErrUnknownView allows to assert if a View must be initialized. ErrUnknownView = standardErrors.New("unknown view") // ErrQuit is used to decide if the MainLoop finished successfully. ErrQuit = standardErrors.New("quit") ) const ( // OutputNormal provides 8-colors terminal mode. OutputNormal OutputMode = iota // Output256 provides 256-colors terminal mode. Output256 // Output216 provides 216 ansi color terminal mode. Output216 // OutputGrayscale provides greyscale terminal mode. OutputGrayscale // OutputTrue provides 24bit color terminal mode. // This mode is recommended even if your terminal doesn't support // such mode. The colors are represented exactly as you // write them (no clamping or truncating). `tcell` should take care // of what your terminal can do. OutputTrue ) type tabClickHandler func(int) error type tabClickBinding struct { viewName string handler tabClickHandler } // TODO: would be good to define inbound and outbound click handlers e.g. // clicking on a file is an inbound thing where we don't care what context you're // in when it happens, whereas clicking on the main view from the files view is an // outbound click with a specific handler. But this requires more thinking about // where handlers should live. type ViewMouseBinding struct { // the view that is clicked ViewName string // the view that has focus when the click occurs. FocusedView string Handler func(ViewMouseBindingOpts) error Modifier Modifier // must be a mouse key Key Key } type ViewMouseBindingOpts struct { X int // i.e. origin x + cursor x Y int // i.e. origin y + cursor y } type GuiMutexes struct { // tickingMutex ensures we don't have two loops ticking. The point of 'ticking' // is to refresh the gui rapidly so that loader characters can be animated. tickingMutex sync.Mutex ViewsMutex sync.Mutex } type replayedEvents struct { Keys chan *TcellKeyEventWrapper Resizes chan *TcellResizeEventWrapper MouseEvents chan *TcellMouseEventWrapper } type RecordingConfig struct { Speed float64 Leeway int } // Gui represents the whole User Interface, including the views, layouts // and keybindings. type Gui struct { RecordingConfig // ReplayedEvents is for passing pre-recorded input events, for the purposes of testing ReplayedEvents replayedEvents playRecording bool tabClickBindings []*tabClickBinding viewMouseBindings []*ViewMouseBinding gEvents chan GocuiEvent userEvents chan userEvent views []*View currentView *View managers []Manager keybindings []*keybinding focusHandler func(bool) error maxX, maxY int outputMode OutputMode stop chan struct{} blacklist []Key // BgColor and FgColor allow to configure the background and foreground // colors of the GUI. BgColor, FgColor, FrameColor Attribute // SelBgColor and SelFgColor allow to configure the background and // foreground colors of the frame of the current view. SelBgColor, SelFgColor, SelFrameColor Attribute // If Highlight is true, Sel{Bg,Fg}Colors will be used to draw the // frame of the current view. Highlight bool // If ShowListFooter is true then show list footer (i.e. the part that says we're at item 5 out of 10) ShowListFooter bool // If Cursor is true then the cursor is enabled. Cursor bool // If Mouse is true then mouse events will be enabled. Mouse bool // If InputEsc is true, when ESC sequence is in the buffer and it doesn't // match any known sequence, ESC means KeyEsc. InputEsc bool // SupportOverlaps is true when we allow for view edges to overlap with other // view edges SupportOverlaps bool Mutexes GuiMutexes OnSearchEscape func() error // these keys must either be of type Key of rune SearchEscapeKey interface{} NextSearchMatchKey interface{} PrevSearchMatchKey interface{} ErrorHandler func(error) error screen tcell.Screen suspendedMutex sync.Mutex suspended bool taskManager *TaskManager } type NewGuiOpts struct { OutputMode OutputMode SupportOverlaps bool PlayRecording bool Headless bool // only applicable when Headless is true Width int // only applicable when Headless is true Height int RuneReplacements map[rune]string } // NewGui returns a new Gui object with a given output mode. func NewGui(opts NewGuiOpts) (*Gui, error) { g := &Gui{} var err error if opts.Headless { err = g.tcellInitSimulation(opts.Width, opts.Height) } else { err = g.tcellInit(runeReplacements) } if err != nil { return nil, err } if opts.Headless || runtime.GOOS == "windows" { g.maxX, g.maxY = g.screen.Size() } else { // TODO: find out if we actually need this bespoke logic for linux g.maxX, g.maxY, err = g.getTermWindowSize() if err != nil { return nil, err } } g.outputMode = opts.OutputMode g.stop = make(chan struct{}) g.gEvents = make(chan GocuiEvent, 20) g.userEvents = make(chan userEvent, 20) g.taskManager = newTaskManager() if opts.PlayRecording { g.ReplayedEvents = replayedEvents{ Keys: make(chan *TcellKeyEventWrapper), Resizes: make(chan *TcellResizeEventWrapper), MouseEvents: make(chan *TcellMouseEventWrapper), } } g.BgColor, g.FgColor, g.FrameColor = ColorDefault, ColorDefault, ColorDefault g.SelBgColor, g.SelFgColor, g.SelFrameColor = ColorDefault, ColorDefault, ColorDefault // SupportOverlaps is true when we allow for view edges to overlap with other // view edges g.SupportOverlaps = opts.SupportOverlaps // default keys for when searching strings in a view g.SearchEscapeKey = KeyEsc g.NextSearchMatchKey = 'n' g.PrevSearchMatchKey = 'N' g.playRecording = opts.PlayRecording return g, nil } func (g *Gui) NewTask() *TaskImpl { return g.taskManager.NewTask() } // An idle listener listens for when the program is idle. This is useful for // integration tests which can wait for the program to be idle before taking // the next step in the test. func (g *Gui) AddIdleListener(c chan struct{}) { g.taskManager.addIdleListener(c) } // Close finalizes the library. It should be called after a successful // initialization and when gocui is not needed anymore. func (g *Gui) Close() { close(g.stop) Screen.Fini() } // Size returns the terminal's size. func (g *Gui) Size() (x, y int) { return g.maxX, g.maxY } // SetRune writes a rune at the given point, relative to the top-left // corner of the terminal. It checks if the position is valid and applies // the given colors. func (g *Gui) SetRune(x, y int, ch rune, fgColor, bgColor Attribute) error { if x < 0 || y < 0 || x >= g.maxX || y >= g.maxY { // swallowing error because it's not that big of a deal return nil } tcellSetCell(x, y, ch, fgColor, bgColor, g.outputMode) return nil } // Rune returns the rune contained in the cell at the given position. // It checks if the position is valid. func (g *Gui) Rune(x, y int) (rune, error) { if x < 0 || y < 0 || x >= g.maxX || y >= g.maxY { return ' ', errors.New("invalid point") } c, _, _, _ := Screen.GetContent(x, y) return c, nil } // SetView creates a new view with its top-left corner at (x0, y0) // and the bottom-right one at (x1, y1). If a view with the same name // already exists, its dimensions are updated; otherwise, the error // ErrUnknownView is returned, which allows to assert if the View must // be initialized. It checks if the position is valid. func (g *Gui) SetView(name string, x0, y0, x1, y1 int, overlaps byte) (*View, error) { if name == "" { return nil, errors.New("invalid name") } if v, err := g.View(name); err == nil { if v.x0 != x0 || v.x1 != x1 || v.y0 != y0 || v.y1 != y1 { v.clearViewLines() } v.x0 = x0 v.y0 = y0 v.x1 = x1 v.y1 = y1 return v, nil } g.Mutexes.ViewsMutex.Lock() v := newView(name, x0, y0, x1, y1, g.outputMode) v.BgColor, v.FgColor = g.BgColor, g.FgColor v.SelBgColor, v.SelFgColor = g.SelBgColor, g.SelFgColor v.Overlaps = overlaps g.views = append(g.views, v) g.Mutexes.ViewsMutex.Unlock() return v, errors.Wrap(ErrUnknownView, 0) } // SetViewBeneath sets a view stacked beneath another view func (g *Gui) SetViewBeneath(name string, aboveViewName string, height int) (*View, error) { aboveView, err := g.View(aboveViewName) if err != nil { return nil, err } viewTop := aboveView.y1 + 1 return g.SetView(name, aboveView.x0, viewTop, aboveView.x1, viewTop+height-1, 0) } // SetViewOnTop sets the given view on top of the existing ones. func (g *Gui) SetViewOnTop(name string) (*View, error) { g.Mutexes.ViewsMutex.Lock() defer g.Mutexes.ViewsMutex.Unlock() for i, v := range g.views { if v.name == name { s := append(g.views[:i], g.views[i+1:]...) g.views = append(s, v) return v, nil } } return nil, errors.Wrap(ErrUnknownView, 0) } // SetViewOnBottom sets the given view on bottom of the existing ones. func (g *Gui) SetViewOnBottom(name string) (*View, error) { g.Mutexes.ViewsMutex.Lock() defer g.Mutexes.ViewsMutex.Unlock() for i, v := range g.views { if v.name == name { s := append(g.views[:i], g.views[i+1:]...) g.views = append([]*View{v}, s...) return v, nil } } return nil, errors.Wrap(ErrUnknownView, 0) } func (g *Gui) SetViewOnTopOf(toMove string, other string) error { g.Mutexes.ViewsMutex.Lock() defer g.Mutexes.ViewsMutex.Unlock() if toMove == other { return nil } // need to find the two current positions and then move toMove before other in the list. toMoveIndex := -1 otherIndex := -1 for i, v := range g.views { if v.name == toMove { toMoveIndex = i } if v.name == other { otherIndex = i } } if toMoveIndex == -1 || otherIndex == -1 { return errors.Wrap(ErrUnknownView, 0) } // already on top if toMoveIndex > otherIndex { return nil } // need to actually do it the other way around. Last is highest viewToMove := g.views[toMoveIndex] g.views = append(g.views[:toMoveIndex], g.views[toMoveIndex+1:]...) g.views = append(g.views[:otherIndex], append([]*View{viewToMove}, g.views[otherIndex:]...)...) return nil } // replaces the content in toView with the content in fromView func (g *Gui) CopyContent(fromView *View, toView *View) { g.Mutexes.ViewsMutex.Lock() defer g.Mutexes.ViewsMutex.Unlock() toView.CopyContent(fromView) } // Views returns all the views in the GUI. func (g *Gui) Views() []*View { return g.views } // View returns a pointer to the view with the given name, or error // ErrUnknownView if a view with that name does not exist. func (g *Gui) View(name string) (*View, error) { g.Mutexes.ViewsMutex.Lock() defer g.Mutexes.ViewsMutex.Unlock() for _, v := range g.views { if v.name == name { return v, nil } } return nil, errors.Wrap(ErrUnknownView, 0) } // VisibleViewByPosition returns a pointer to a view matching the given position, or // error ErrUnknownView if a view in that position does not exist. func (g *Gui) VisibleViewByPosition(x, y int) (*View, error) { g.Mutexes.ViewsMutex.Lock() defer g.Mutexes.ViewsMutex.Unlock() // traverse views in reverse order checking top views first for i := len(g.views); i > 0; i-- { v := g.views[i-1] if !v.Visible { continue } frameOffset := 0 if v.Frame { frameOffset = 1 } if x > v.x0-frameOffset && x < v.x1+frameOffset && y > v.y0-frameOffset && y < v.y1+frameOffset { return v, nil } } return nil, errors.Wrap(ErrUnknownView, 0) } // ViewPosition returns the coordinates of the view with the given name, or // error ErrUnknownView if a view with that name does not exist. func (g *Gui) ViewPosition(name string) (x0, y0, x1, y1 int, err error) { g.Mutexes.ViewsMutex.Lock() defer g.Mutexes.ViewsMutex.Unlock() for _, v := range g.views { if v.name == name { return v.x0, v.y0, v.x1, v.y1, nil } } return 0, 0, 0, 0, errors.Wrap(ErrUnknownView, 0) } // DeleteView deletes a view by name. func (g *Gui) DeleteView(name string) error { g.Mutexes.ViewsMutex.Lock() defer g.Mutexes.ViewsMutex.Unlock() for i, v := range g.views { if v.name == name { g.views = append(g.views[:i], g.views[i+1:]...) return nil } } return errors.Wrap(ErrUnknownView, 0) } // SetCurrentView gives the focus to a given view. func (g *Gui) SetCurrentView(name string) (*View, error) { g.Mutexes.ViewsMutex.Lock() defer g.Mutexes.ViewsMutex.Unlock() for _, v := range g.views { if v.name == name { g.currentView = v return v, nil } } return nil, errors.Wrap(ErrUnknownView, 0) } // CurrentView returns the currently focused view, or nil if no view // owns the focus. func (g *Gui) CurrentView() *View { return g.currentView } // SetKeybinding creates a new keybinding. If viewname equals to "" // (empty string) then the keybinding will apply to all views. key must // be a rune or a Key. // // When mouse keys are used (MouseLeft, MouseRight, ...), modifier might not work correctly. // It behaves differently on different platforms. Somewhere it doesn't register Alt key press, // on others it might report Ctrl as Alt. It's not consistent and therefore it's not recommended // to use with mouse keys. func (g *Gui) SetKeybinding(viewname string, key interface{}, mod Modifier, handler func(*Gui, *View) error) error { var kb *keybinding k, ch, err := getKey(key) if err != nil { return err } if g.isBlacklisted(k) { return ErrBlacklisted } kb = newKeybinding(viewname, k, ch, mod, handler) g.keybindings = append(g.keybindings, kb) return nil } // DeleteKeybinding deletes a keybinding. func (g *Gui) DeleteKeybinding(viewname string, key interface{}, mod Modifier) error { k, ch, err := getKey(key) if err != nil { return err } for i, kb := range g.keybindings { if kb.viewName == viewname && kb.ch == ch && kb.key == k && kb.mod == mod { g.keybindings = append(g.keybindings[:i], g.keybindings[i+1:]...) return nil } } return errors.New("keybinding not found") } // DeleteKeybindings deletes all keybindings of view. func (g *Gui) DeleteAllKeybindings() { g.keybindings = []*keybinding{} g.tabClickBindings = []*tabClickBinding{} g.viewMouseBindings = []*ViewMouseBinding{} } // DeleteKeybindings deletes all keybindings of view. func (g *Gui) DeleteViewKeybindings(viewname string) { var s []*keybinding for _, kb := range g.keybindings { if kb.viewName != viewname { s = append(s, kb) } } g.keybindings = s } // SetTabClickBinding sets a binding for a tab click event func (g *Gui) SetTabClickBinding(viewName string, handler tabClickHandler) error { g.tabClickBindings = append(g.tabClickBindings, &tabClickBinding{ viewName: viewName, handler: handler, }) return nil } func (g *Gui) SetViewClickBinding(binding *ViewMouseBinding) error { g.viewMouseBindings = append(g.viewMouseBindings, binding) return nil } // BlackListKeybinding adds a keybinding to the blacklist func (g *Gui) BlacklistKeybinding(k Key) error { for _, j := range g.blacklist { if j == k { return ErrAlreadyBlacklisted } } g.blacklist = append(g.blacklist, k) return nil } // WhiteListKeybinding removes a keybinding from the blacklist func (g *Gui) WhitelistKeybinding(k Key) error { for i, j := range g.blacklist { if j == k { g.blacklist = append(g.blacklist[:i], g.blacklist[i+1:]...) return nil } } return ErrNotBlacklisted } func (g *Gui) SetFocusHandler(handler func(bool) error) { g.focusHandler = handler } // getKey takes an empty interface with a key and returns the corresponding // typed Key or rune. func getKey(key interface{}) (Key, rune, error) { switch t := key.(type) { case nil: // Ignore keybinding if `nil` return 0, 0, nil case Key: return t, 0, nil case rune: return 0, t, nil default: return 0, 0, errors.New("unknown type") } } // userEvent represents an event triggered by the user. type userEvent struct { f func(*Gui) error task Task } // Update executes the passed function. This method can be called safely from a // goroutine in order to update the GUI. It is important to note that the // passed function won't be executed immediately, instead it will be added to // the user events queue. Given that Update spawns a goroutine, the order in // which the user events will be handled is not guaranteed. func (g *Gui) Update(f func(*Gui) error) { task := g.NewTask() go g.updateAsyncAux(f, task) } // UpdateAsync is a version of Update that does not spawn a go routine, it can // be a bit more efficient in cases where Update is called many times like when // tailing a file. In general you should use Update() func (g *Gui) UpdateAsync(f func(*Gui) error) { task := g.NewTask() g.updateAsyncAux(f, task) } func (g *Gui) updateAsyncAux(f func(*Gui) error, task Task) { g.userEvents <- userEvent{f: f, task: task} } // Calls a function in a goroutine. Handles panics gracefully and tracks // number of background tasks. // Always use this when you want to spawn a goroutine and you want lazygit to // consider itself 'busy` as it runs the code. Don't use for long-running // background goroutines where you wouldn't want lazygit to be considered busy // (i.e. when you wouldn't want a loader to be shown to the user) func (g *Gui) OnWorker(f func(Task) error) { task := g.NewTask() go func() { g.onWorkerAux(f, task) task.Done() }() } func (g *Gui) onWorkerAux(f func(Task) error, task Task) { panicking := true defer func() { if panicking && Screen != nil { Screen.Fini() } }() err := f(task) panicking = false if err != nil { g.Update(func(g *Gui) error { return err }) } } // A Manager is in charge of GUI's layout and can be used to build widgets. type Manager interface { // Layout is called every time the GUI is redrawn, it must contain the // base views and its initializations. Layout(*Gui) error } // The ManagerFunc type is an adapter to allow the use of ordinary functions as // Managers. If f is a function with the appropriate signature, ManagerFunc(f) // is an Manager object that calls f. type ManagerFunc func(*Gui) error // Layout calls f(g) func (f ManagerFunc) Layout(g *Gui) error { return f(g) } // SetManager sets the given GUI managers. It deletes all views and // keybindings. func (g *Gui) SetManager(managers ...Manager) { g.managers = managers g.currentView = nil g.views = nil g.keybindings = nil g.tabClickBindings = nil go func() { g.gEvents <- GocuiEvent{Type: eventResize} }() } // SetManagerFunc sets the given manager function. It deletes all views and // keybindings. func (g *Gui) SetManagerFunc(manager func(*Gui) error) { g.SetManager(ManagerFunc(manager)) } // MainLoop runs the main loop until an error is returned. A successful // finish should return ErrQuit. func (g *Gui) MainLoop() error { go func() { for { select { case <-g.stop: return default: g.gEvents <- g.pollEvent() } } }() if g.Mouse { Screen.EnableMouse() } Screen.EnableFocus() for { err := g.processEvent() if err != nil { return err } } } func (g *Gui) handleError(err error) error { if err != nil && !IsQuit(err) && g.ErrorHandler != nil { return g.ErrorHandler(err) } return err } func (g *Gui) processEvent() error { select { case ev := <-g.gEvents: task := g.NewTask() defer func() { task.Done() }() if err := g.handleError(g.handleEvent(&ev)); err != nil { return err } case ev := <-g.userEvents: defer func() { ev.task.Done() }() if err := g.handleError(ev.f(g)); err != nil { return err } } if err := g.processRemainingEvents(); err != nil { return err } if err := g.flush(); err != nil { return err } return nil } // processRemainingEvents handles the remaining events in the events pool. func (g *Gui) processRemainingEvents() error { for { select { case ev := <-g.gEvents: if err := g.handleError(g.handleEvent(&ev)); err != nil { return err } case ev := <-g.userEvents: err := g.handleError(ev.f(g)) ev.task.Done() if err != nil { return err } default: return nil } } } // handleEvent handles an event, based on its type (key-press, error, // etc.) func (g *Gui) handleEvent(ev *GocuiEvent) error { switch ev.Type { case eventKey, eventMouse: return g.onKey(ev) case eventError: return ev.Err case eventResize: g.onResize() return nil case eventFocus: return g.onFocus(ev) default: return nil } } func (g *Gui) onResize() { // not sure if we actually need this // g.screen.Sync() } // drawFrameEdges draws the horizontal and vertical edges of a view. func (g *Gui) drawFrameEdges(v *View, fgColor, bgColor Attribute) error { runeH, runeV := '─', '│' if len(v.FrameRunes) >= 2 { runeH, runeV = v.FrameRunes[0], v.FrameRunes[1] } for x := v.x0 + 1; x < v.x1 && x < g.maxX; x++ { if x < 0 { continue } if v.y0 > -1 && v.y0 < g.maxY { if err := g.SetRune(x, v.y0, runeH, fgColor, bgColor); err != nil { return err } } if v.y1 > -1 && v.y1 < g.maxY { if err := g.SetRune(x, v.y1, runeH, fgColor, bgColor); err != nil { return err } } } showScrollbar, realScrollbarStart, realScrollbarEnd := calcRealScrollbarStartEnd(v) for y := v.y0 + 1; y < v.y1 && y < g.maxY; y++ { if y < 0 { continue } if v.x0 > -1 && v.x0 < g.maxX { if err := g.SetRune(v.x0, y, runeV, fgColor, bgColor); err != nil { return err } } if v.x1 > -1 && v.x1 < g.maxX { runeToPrint := calcScrollbarRune(showScrollbar, realScrollbarStart, realScrollbarEnd, y, runeV) if err := g.SetRune(v.x1, y, runeToPrint, fgColor, bgColor); err != nil { return err } } } return nil } func calcScrollbarRune( showScrollbar bool, scrollbarStart int, scrollbarEnd int, position int, runeV rune, ) rune { if showScrollbar && (position >= scrollbarStart && position <= scrollbarEnd) { return '▐' } else { return runeV } } func calcRealScrollbarStartEnd(v *View) (bool, int, int) { height := v.InnerHeight() + 1 fullHeight := v.ViewLinesHeight() - v.scrollMargin() if v.CanScrollPastBottom { fullHeight += height } if height < 2 || height >= fullHeight { return false, 0, 0 } originY := v.OriginY() scrollbarStart, scrollbarHeight := calcScrollbar(fullHeight, height, originY, height-1) top := v.y0 + 1 realScrollbarStart := top + scrollbarStart realScrollbarEnd := realScrollbarStart + scrollbarHeight return true, realScrollbarStart, realScrollbarEnd } func cornerRune(index byte) rune { return []rune{' ', '│', '│', '│', '─', '┘', '┐', '┤', '─', '└', '┌', '├', '├', '┴', '┬', '┼'}[index] } // cornerCustomRune returns rune from `v.FrameRunes` slice. If the length of slice is less than 11 // all the missing runes will be translated to the default `cornerRune()` func cornerCustomRune(v *View, index byte) rune { // Translate `cornerRune()` index // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 // ' ', '│', '│', '│', '─', '┘', '┐', '┤', '─', '└', '┌', '├', '├', '┴', '┬', '┼' // into `FrameRunes` index // 0 1 2 3 4 5 6 7 8 9 10 // '─', '│', '┌', '┐', '└', '┘', '├', '┤', '┬', '┴', '┼' switch index { case 1, 2, 3: return v.FrameRunes[1] case 4, 8: return v.FrameRunes[0] case 5: return v.FrameRunes[5] case 6: return v.FrameRunes[3] case 7: if len(v.FrameRunes) < 8 { break } return v.FrameRunes[7] case 9: return v.FrameRunes[4] case 10: return v.FrameRunes[2] case 11, 12: if len(v.FrameRunes) < 7 { break } return v.FrameRunes[6] case 13: if len(v.FrameRunes) < 10 { break } return v.FrameRunes[9] case 14: if len(v.FrameRunes) < 9 { break } return v.FrameRunes[8] case 15: if len(v.FrameRunes) < 11 { break } return v.FrameRunes[10] default: return ' ' // cornerRune(0) } return cornerRune(index) } func corner(v *View, directions byte) rune { index := v.Overlaps | directions if len(v.FrameRunes) >= 6 { return cornerCustomRune(v, index) } return cornerRune(index) } // drawFrameCorners draws the corners of the view. func (g *Gui) drawFrameCorners(v *View, fgColor, bgColor Attribute) error { if v.y0 == v.y1 { if !g.SupportOverlaps && v.x0 >= 0 && v.x1 >= 0 && v.y0 >= 0 && v.x0 < g.maxX && v.x1 < g.maxX && v.y0 < g.maxY { if err := g.SetRune(v.x0, v.y0, '╶', fgColor, bgColor); err != nil { return err } if err := g.SetRune(v.x1, v.y0, '╴', fgColor, bgColor); err != nil { return err } } return nil } runeTL, runeTR, runeBL, runeBR := '┌', '┐', '└', '┘' if len(v.FrameRunes) >= 6 { runeTL, runeTR, runeBL, runeBR = v.FrameRunes[2], v.FrameRunes[3], v.FrameRunes[4], v.FrameRunes[5] } if g.SupportOverlaps { runeTL = corner(v, BOTTOM|RIGHT) runeTR = corner(v, BOTTOM|LEFT) runeBL = corner(v, TOP|RIGHT) runeBR = corner(v, TOP|LEFT) } corners := []struct { x, y int ch rune }{{v.x0, v.y0, runeTL}, {v.x1, v.y0, runeTR}, {v.x0, v.y1, runeBL}, {v.x1, v.y1, runeBR}} for _, c := range corners { if c.x >= 0 && c.y >= 0 && c.x < g.maxX && c.y < g.maxY { if err := g.SetRune(c.x, c.y, c.ch, fgColor, bgColor); err != nil { return err } } } return nil } // drawTitle draws the title of the view. func (g *Gui) drawTitle(v *View, fgColor, bgColor Attribute) error { if v.y0 < 0 || v.y0 >= g.maxY { return nil } tabs := v.Tabs prefix := v.TitlePrefix if prefix != "" { if len(v.FrameRunes) > 0 { prefix += string(v.FrameRunes[0]) } else { prefix += "─" } } separator := " - " charIndex := 0 currentTabStart := -1 currentTabEnd := -1 if len(tabs) == 0 { tabs = []string{v.Title} } else { for i, tab := range tabs { if i == v.TabIndex { currentTabStart = charIndex currentTabEnd = charIndex + len(tab) break } charIndex += len(tab) if i < len(tabs)-1 { charIndex += len(separator) } } } str := strings.Join(tabs, separator) x := v.x0 + 2 for _, ch := range prefix { if err := g.SetRune(x, v.y0, ch, fgColor, bgColor); err != nil { return err } x += runewidth.RuneWidth(ch) } for i, ch := range str { if x < 0 { continue } else if x > v.x1-2 || x >= g.maxX { break } currentFgColor := fgColor currentBgColor := bgColor // if you are the current view and you have multiple tabs, de-highlight the non-selected tabs if v == g.currentView && len(v.Tabs) > 0 { currentFgColor = v.FgColor currentBgColor = v.BgColor } if i >= currentTabStart && i <= currentTabEnd { currentFgColor = v.SelFgColor if v != g.currentView { currentFgColor -= AttrBold } } if err := g.SetRune(x, v.y0, ch, currentFgColor, currentBgColor); err != nil { return err } x += runewidth.RuneWidth(ch) } return nil } // drawSubtitle draws the subtitle of the view. func (g *Gui) drawSubtitle(v *View, fgColor, bgColor Attribute) error { if v.y0 < 0 || v.y0 >= g.maxY { return nil } start := v.x1 - 5 - runewidth.StringWidth(v.Subtitle) if start < v.x0 { return nil } x := start for _, ch := range v.Subtitle { if x >= v.x1 { break } if err := g.SetRune(x, v.y0, ch, fgColor, bgColor); err != nil { return err } x += runewidth.RuneWidth(ch) } return nil } // drawListFooter draws the footer of a list view, showing something like '1 of 10' func (g *Gui) drawListFooter(v *View, fgColor, bgColor Attribute) error { if len(v.lines) == 0 { return nil } message := v.Footer if v.y1 < 0 || v.y1 >= g.maxY { return nil } start := v.x1 - 1 - runewidth.StringWidth(message) if start < v.x0 { return nil } x := start for _, ch := range message { if x >= v.x1 { break } if err := g.SetRune(x, v.y1, ch, fgColor, bgColor); err != nil { return err } x += runewidth.RuneWidth(ch) } return nil } // flush updates the gui, re-drawing frames and buffers. func (g *Gui) flush() error { // pretty sure we don't need this, but keeping it here in case we get weird visual artifacts // g.clear(g.FgColor, g.BgColor) maxX, maxY := Screen.Size() // if GUI's size has changed, we need to redraw all views if maxX != g.maxX || maxY != g.maxY { for _, v := range g.views { v.clearViewLines() } } g.maxX, g.maxY = maxX, maxY for _, m := range g.managers { if err := m.Layout(g); err != nil { return err } } for _, v := range g.views { if err := g.draw(v); err != nil { return err } } Screen.Show() return nil } func (g *Gui) ForceLayoutAndRedraw() error { return g.flush() } // force redrawing one or more views outside of the normal main loop. Useful during longer // operations that block the main thread, to update a spinner in a status view. func (g *Gui) ForceRedrawViews(views ...*View) error { for _, m := range g.managers { if err := m.Layout(g); err != nil { return err } } for _, v := range views { if err := v.draw(); err != nil { return err } } Screen.Show() return nil } // draw manages the cursor and calls the draw function of a view. func (g *Gui) draw(v *View) error { if g.suspended { return nil } if !v.Visible || v.y1 < v.y0 || v.x1 < v.x0 { return nil } if g.Cursor { if curview := g.currentView; curview != nil { vMaxX, vMaxY := curview.Size() if curview.cx < 0 { curview.cx = 0 } else if curview.cx >= vMaxX { curview.cx = vMaxX - 1 } if curview.cy < 0 { curview.cy = 0 } else if curview.cy >= vMaxY { curview.cy = vMaxY - 1 } gMaxX, gMaxY := g.Size() cx, cy := curview.x0+curview.cx+1, curview.y0+curview.cy+1 // This test probably doesn't need to be here. // tcell is hiding cursor by setting coordinates outside of screen. // Keeping it here for now, as I'm not 100% sure :) if cx >= 0 && cx < gMaxX && cy >= 0 && cy < gMaxY { Screen.ShowCursor(cx, cy) } else { Screen.HideCursor() } } } else { Screen.HideCursor() } if err := v.draw(); err != nil { return err } if v.Frame { var fgColor, bgColor, frameColor Attribute if g.Highlight && v == g.currentView { fgColor = g.SelFgColor bgColor = g.SelBgColor frameColor = g.SelFrameColor } else { bgColor = g.BgColor if v.TitleColor != ColorDefault { fgColor = v.TitleColor } else { fgColor = g.FgColor } if v.FrameColor != ColorDefault { frameColor = v.FrameColor } else { frameColor = g.FrameColor } } if err := g.drawFrameEdges(v, frameColor, bgColor); err != nil { return err } if err := g.drawFrameCorners(v, frameColor, bgColor); err != nil { return err } if v.Title != "" || len(v.Tabs) > 0 { if err := g.drawTitle(v, fgColor, bgColor); err != nil { return err } } if v.Subtitle != "" { if err := g.drawSubtitle(v, fgColor, bgColor); err != nil { return err } } if v.Footer != "" && g.ShowListFooter { if err := g.drawListFooter(v, fgColor, bgColor); err != nil { return err } } } return nil } // onKey manages key-press events. A keybinding handler is called when // a key-press or mouse event satisfies a configured keybinding. Furthermore, // currentView's internal buffer is modified if currentView.Editable is true. func (g *Gui) onKey(ev *GocuiEvent) error { switch ev.Type { case eventKey: _, err := g.execKeybindings(g.currentView, ev) if err != nil { return err } case eventMouse: mx, my := ev.MouseX, ev.MouseY v, err := g.VisibleViewByPosition(mx, my) if err != nil { break } if v.Frame && my == v.y0 { if len(v.Tabs) > 0 { tabIndex := v.GetClickedTabIndex(mx - v.x0) if tabIndex >= 0 { for _, binding := range g.tabClickBindings { if binding.viewName == v.Name() { return binding.handler(tabIndex) } } } } } newCx := mx - v.x0 - 1 newCy := my - v.y0 - 1 // if view is editable don't go further than the furthest character for that line if v.Editable && newCy >= 0 && newCy <= len(v.lines)-1 { lastCharForLine := len(v.lines[newCy]) if lastCharForLine < newCx { newCx = lastCharForLine } } if !IsMouseScrollKey(ev.Key) { if err := v.SetCursor(newCx, newCy); err != nil { return err } } if IsMouseKey(ev.Key) { opts := ViewMouseBindingOpts{X: newCx + v.ox, Y: newCy + v.oy} matched, err := g.execMouseKeybindings(v, ev, opts) if err != nil { return err } if matched { return nil } } if _, err := g.execKeybindings(v, ev); err != nil { return err } } return nil } func (g *Gui) execMouseKeybindings(view *View, ev *GocuiEvent, opts ViewMouseBindingOpts) (bool, error) { isMatch := func(binding *ViewMouseBinding) bool { return binding.ViewName == view.Name() && ev.Key == binding.Key && ev.Mod == binding.Modifier } // first pass looks for ones that match the focused view for _, binding := range g.viewMouseBindings { if isMatch(binding) && binding.FocusedView != "" && binding.FocusedView == g.currentView.Name() { return true, binding.Handler(opts) } } for _, binding := range g.viewMouseBindings { if isMatch(binding) && binding.FocusedView == "" { return true, binding.Handler(opts) } } return false, nil } func IsMouseKey(key interface{}) bool { switch key { case MouseLeft, MouseRight, MouseMiddle, MouseRelease, MouseWheelUp, MouseWheelDown, MouseWheelLeft, MouseWheelRight: return true default: return false } } func IsMouseScrollKey(key interface{}) bool { switch key { case MouseWheelUp, MouseWheelDown, MouseWheelLeft, MouseWheelRight: return true default: return false } } // execKeybindings executes the keybinding handlers that match the passed view // and event. The value of matched is true if there is a match and no errors. func (g *Gui) execKeybindings(v *View, ev *GocuiEvent) (matched bool, err error) { var globalKb *keybinding var matchingParentViewKb *keybinding // if we're searching, and we've hit n/N/Esc, we ignore the default keybinding if v != nil && v.IsSearching() && ev.Mod == ModNone { if eventMatchesKey(ev, g.NextSearchMatchKey) { return true, v.gotoNextMatch() } else if eventMatchesKey(ev, g.PrevSearchMatchKey) { return true, v.gotoPreviousMatch() } else if eventMatchesKey(ev, g.SearchEscapeKey) { v.searcher.clearSearch() if g.OnSearchEscape != nil { if err := g.OnSearchEscape(); err != nil { return true, err } } return true, nil } } for _, kb := range g.keybindings { if kb.handler == nil { continue } if !kb.matchKeypress(ev.Key, ev.Ch, ev.Mod) { continue } if g.matchView(v, kb) { return g.execKeybinding(v, kb) } if v != nil && g.matchView(v.ParentView, kb) { matchingParentViewKb = kb } if globalKb == nil && kb.viewName == "" && ((v != nil && !v.Editable) || (kb.ch == 0 && kb.key != KeyCtrlU && kb.key != KeyCtrlA && kb.key != KeyCtrlE)) { globalKb = kb } } if matchingParentViewKb != nil { return g.execKeybinding(v.ParentView, matchingParentViewKb) } if g.currentView != nil && g.currentView.Editable && g.currentView.Editor != nil { matched := g.currentView.Editor.Edit(g.currentView, ev.Key, ev.Ch, ev.Mod) if matched { return true, nil } } if globalKb != nil { return g.execKeybinding(v, globalKb) } return false, nil } // execKeybinding executes a given keybinding func (g *Gui) execKeybinding(v *View, kb *keybinding) (bool, error) { if g.isBlacklisted(kb.key) { return true, nil } if err := kb.handler(g, v); err != nil { return false, err } return true, nil } func (g *Gui) onFocus(ev *GocuiEvent) error { if g.focusHandler != nil { return g.focusHandler(ev.Focused) } return nil } func (g *Gui) StartTicking(ctx context.Context) { go func() { g.Mutexes.tickingMutex.Lock() defer g.Mutexes.tickingMutex.Unlock() ticker := time.NewTicker(time.Millisecond * 50) defer ticker.Stop() outer: for { select { case <-ticker.C: // I'm okay with having a data race here: there's no harm in letting one of these updates through if g.suspended { continue outer } for _, view := range g.Views() { if view.HasLoader { g.UpdateAsync(func(g *Gui) error { return nil }) continue outer } } return case <-ctx.Done(): return case <-g.stop: return } } }() } // isBlacklisted reports whether the key is blacklisted func (g *Gui) isBlacklisted(k Key) bool { for _, j := range g.blacklist { if j == k { return true } } return false } // IsUnknownView reports whether the contents of an error is "unknown view". func IsUnknownView(err error) bool { return err != nil && err.Error() == ErrUnknownView.Error() } // IsQuit reports whether the contents of an error is "quit". func IsQuit(err error) bool { return err != nil && err.Error() == ErrQuit.Error() } func (g *Gui) Suspend() error { g.suspendedMutex.Lock() defer g.suspendedMutex.Unlock() if g.suspended { return errors.New("Already suspended") } g.suspended = true return g.screen.Suspend() } func (g *Gui) Resume() error { g.suspendedMutex.Lock() defer g.suspendedMutex.Unlock() if !g.suspended { return errors.New("Cannot resume because we are not suspended") } g.suspended = false return g.screen.Resume() } // matchView returns if the keybinding matches the current view (and the view's context) func (g *Gui) matchView(v *View, kb *keybinding) bool { // if the user is typing in a field, ignore char keys if v == nil { return false } if v.Editable && kb.ch != 0 { return false } if kb.viewName != v.name { return false } return true } // returns a string representation of the current state of the gui, character-for-character func (g *Gui) Snapshot() string { if g.screen == nil { return "" } width, height := g.screen.Size() builder := &strings.Builder{} for y := 0; y < height; y++ { for x := 0; x < width; x++ { char, _, _, charWidth := g.screen.GetContent(x, y) if charWidth == 0 { continue } builder.WriteRune(char) if charWidth > 1 { x += charWidth - 1 } } builder.WriteRune('\n') } return builder.String() } ================================================ FILE: vendor/github.com/jesseduffield/gocui/gui_others.go ================================================ // Copyright 2014 The gocui Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build !windows // +build !windows package gocui import ( "os" "os/signal" "syscall" "unsafe" "github.com/go-errors/errors" ) // getTermWindowSize is get terminal window size on linux or unix. // When gocui run inside the docker contaienr need to check and get the window size. func (g *Gui) getTermWindowSize() (int, int, error) { var sz struct { rows uint16 cols uint16 _ [2]uint16 // to match underlying syscall; see https://github.com/awesome-gocui/gocui/issues/33 } var termw, termh int out, err := os.OpenFile("/dev/tty", os.O_RDWR, 0) if err != nil { return 0, 0, err } defer out.Close() signalCh := make(chan os.Signal, 1) signal.Notify(signalCh, syscall.SIGWINCH, syscall.SIGINT) for { _, _, _ = syscall.Syscall(syscall.SYS_IOCTL, out.Fd(), uintptr(syscall.TIOCGWINSZ), uintptr(unsafe.Pointer(&sz))) // check terminal window size termw, termh = int(sz.cols), int(sz.rows) if termw > 0 && termh > 0 { return termw, termh, nil } signal := <-signalCh switch signal { // when the terminal window size is changed case syscall.SIGWINCH: continue // ctrl + c to cancel case syscall.SIGINT: return 0, 0, errors.New("stop to get term window size") } } } ================================================ FILE: vendor/github.com/jesseduffield/gocui/gui_windows.go ================================================ // Copyright 2014 The gocui Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build windows // +build windows package gocui import ( "os" "syscall" "unsafe" ) type ( wchar uint16 short int16 dword uint32 word uint16 ) type coord struct { x short y short } type smallRect struct { left short top short right short bottom short } type consoleScreenBufferInfo struct { size coord cursorPosition coord attributes word window smallRect maximumWindowSize coord } var ( kernel32 = syscall.NewLazyDLL("kernel32.dll") procGetConsoleScreenBufferInfo = kernel32.NewProc("GetConsoleScreenBufferInfo") ) // getTermWindowSize is get terminal window size on windows. func (g *Gui) getTermWindowSize() (int, int, error) { var csbi consoleScreenBufferInfo r1, _, err := procGetConsoleScreenBufferInfo.Call(os.Stdout.Fd(), uintptr(unsafe.Pointer(&csbi))) if r1 == 0 { return 0, 0, err } return int(csbi.window.right - csbi.window.left + 1), int(csbi.window.bottom - csbi.window.top + 1), nil } ================================================ FILE: vendor/github.com/jesseduffield/gocui/keybinding.go ================================================ // Copyright 2014 The gocui 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 gocui import ( "strings" "github.com/gdamore/tcell/v2" ) // Key represents special keys or keys combinations. type Key tcell.Key // Modifier allows to define special keys combinations. They can be used // in combination with Keys or Runes when a new keybinding is defined. type Modifier tcell.ModMask // Keybidings are used to link a given key-press event with a handler. type keybinding struct { viewName string key Key ch rune mod Modifier handler func(*Gui, *View) error } // Parse takes the input string and extracts the keybinding. // Returns a Key / rune, a Modifier and an error. func Parse(input string) (interface{}, Modifier, error) { if len(input) == 1 { _, r, err := getKey(rune(input[0])) if err != nil { return nil, ModNone, err } return r, ModNone, nil } var modifier Modifier cleaned := make([]string, 0) tokens := strings.Split(input, "+") for _, t := range tokens { normalized := strings.Title(strings.ToLower(t)) if t == "Alt" { modifier = ModAlt continue } cleaned = append(cleaned, normalized) } key, exist := translate[strings.Join(cleaned, "")] if !exist { return nil, ModNone, ErrNoSuchKeybind } return key, modifier, nil } // ParseAll takes an array of strings and returns a map of all keybindings. func ParseAll(input []string) (map[interface{}]Modifier, error) { ret := make(map[interface{}]Modifier) for _, i := range input { k, m, err := Parse(i) if err != nil { return ret, err } ret[k] = m } return ret, nil } // MustParse takes the input string and returns a Key / rune and a Modifier. // It will panic if any error occured. func MustParse(input string) (interface{}, Modifier) { k, m, err := Parse(input) if err != nil { panic(err) } return k, m } // MustParseAll takes an array of strings and returns a map of all keybindings. // It will panic if any error occured. func MustParseAll(input []string) map[interface{}]Modifier { result, err := ParseAll(input) if err != nil { panic(err) } return result } // newKeybinding returns a new Keybinding object. func newKeybinding(viewname string, key Key, ch rune, mod Modifier, handler func(*Gui, *View) error) (kb *keybinding) { kb = &keybinding{ viewName: viewname, key: key, ch: ch, mod: mod, handler: handler, } return kb } func eventMatchesKey(ev *GocuiEvent, key interface{}) bool { // assuming ModNone for now if ev.Mod != ModNone { return false } k, ch, err := getKey(key) if err != nil { return false } return k == ev.Key && ch == ev.Ch } // matchKeypress returns if the keybinding matches the keypress. func (kb *keybinding) matchKeypress(key Key, ch rune, mod Modifier) bool { return kb.key == key && kb.ch == ch && kb.mod == mod } // translations for strings to keys var translate = map[string]Key{ "F1": KeyF1, "F2": KeyF2, "F3": KeyF3, "F4": KeyF4, "F5": KeyF5, "F6": KeyF6, "F7": KeyF7, "F8": KeyF8, "F9": KeyF9, "F10": KeyF10, "F11": KeyF11, "F12": KeyF12, "Insert": KeyInsert, "Delete": KeyDelete, "Home": KeyHome, "End": KeyEnd, "Pgup": KeyPgup, "Pgdn": KeyPgdn, "ArrowUp": KeyArrowUp, "ShiftArrowUp": KeyShiftArrowUp, "ArrowDown": KeyArrowDown, "ShiftArrowDown": KeyShiftArrowDown, "ArrowLeft": KeyArrowLeft, "ArrowRight": KeyArrowRight, "CtrlTilde": KeyCtrlTilde, "Ctrl2": KeyCtrl2, "CtrlSpace": KeyCtrlSpace, "CtrlA": KeyCtrlA, "CtrlB": KeyCtrlB, "CtrlC": KeyCtrlC, "CtrlD": KeyCtrlD, "CtrlE": KeyCtrlE, "CtrlF": KeyCtrlF, "CtrlG": KeyCtrlG, "Backspace": KeyBackspace, "CtrlH": KeyCtrlH, "Tab": KeyTab, "BackTab": KeyBacktab, "CtrlI": KeyCtrlI, "CtrlJ": KeyCtrlJ, "CtrlK": KeyCtrlK, "CtrlL": KeyCtrlL, "Enter": KeyEnter, "CtrlM": KeyCtrlM, "CtrlN": KeyCtrlN, "CtrlO": KeyCtrlO, "CtrlP": KeyCtrlP, "CtrlQ": KeyCtrlQ, "CtrlR": KeyCtrlR, "CtrlS": KeyCtrlS, "CtrlT": KeyCtrlT, "CtrlU": KeyCtrlU, "CtrlV": KeyCtrlV, "CtrlW": KeyCtrlW, "CtrlX": KeyCtrlX, "CtrlY": KeyCtrlY, "CtrlZ": KeyCtrlZ, "Esc": KeyEsc, "CtrlLsqBracket": KeyCtrlLsqBracket, "Ctrl3": KeyCtrl3, "Ctrl4": KeyCtrl4, "CtrlBackslash": KeyCtrlBackslash, "Ctrl5": KeyCtrl5, "CtrlRsqBracket": KeyCtrlRsqBracket, "Ctrl6": KeyCtrl6, "Ctrl7": KeyCtrl7, "CtrlSlash": KeyCtrlSlash, "CtrlUnderscore": KeyCtrlUnderscore, "Space": KeySpace, "Backspace2": KeyBackspace2, "Ctrl8": KeyCtrl8, "Mouseleft": MouseLeft, "Mousemiddle": MouseMiddle, "Mouseright": MouseRight, "Mouserelease": MouseRelease, "MousewheelUp": MouseWheelUp, "MousewheelDown": MouseWheelDown, } // Special keys. const ( KeyF1 Key = Key(tcell.KeyF1) KeyF2 = Key(tcell.KeyF2) KeyF3 = Key(tcell.KeyF3) KeyF4 = Key(tcell.KeyF4) KeyF5 = Key(tcell.KeyF5) KeyF6 = Key(tcell.KeyF6) KeyF7 = Key(tcell.KeyF7) KeyF8 = Key(tcell.KeyF8) KeyF9 = Key(tcell.KeyF9) KeyF10 = Key(tcell.KeyF10) KeyF11 = Key(tcell.KeyF11) KeyF12 = Key(tcell.KeyF12) KeyInsert = Key(tcell.KeyInsert) KeyDelete = Key(tcell.KeyDelete) KeyHome = Key(tcell.KeyHome) KeyEnd = Key(tcell.KeyEnd) KeyPgdn = Key(tcell.KeyPgDn) KeyPgup = Key(tcell.KeyPgUp) KeyArrowUp = Key(tcell.KeyUp) KeyShiftArrowUp = Key(tcell.KeyF62) KeyArrowDown = Key(tcell.KeyDown) KeyShiftArrowDown = Key(tcell.KeyF63) KeyArrowLeft = Key(tcell.KeyLeft) KeyArrowRight = Key(tcell.KeyRight) ) // Keys combinations. const ( KeyCtrlTilde = Key(tcell.KeyF64) // arbitrary assignment KeyCtrlSpace = Key(tcell.KeyCtrlSpace) KeyCtrlA = Key(tcell.KeyCtrlA) KeyCtrlB = Key(tcell.KeyCtrlB) KeyCtrlC = Key(tcell.KeyCtrlC) KeyCtrlD = Key(tcell.KeyCtrlD) KeyCtrlE = Key(tcell.KeyCtrlE) KeyCtrlF = Key(tcell.KeyCtrlF) KeyCtrlG = Key(tcell.KeyCtrlG) KeyBackspace = Key(tcell.KeyBackspace) KeyCtrlH = Key(tcell.KeyCtrlH) KeyTab = Key(tcell.KeyTab) KeyBacktab = Key(tcell.KeyBacktab) KeyCtrlI = Key(tcell.KeyCtrlI) KeyCtrlJ = Key(tcell.KeyCtrlJ) KeyCtrlK = Key(tcell.KeyCtrlK) KeyCtrlL = Key(tcell.KeyCtrlL) KeyEnter = Key(tcell.KeyEnter) KeyCtrlM = Key(tcell.KeyCtrlM) KeyCtrlN = Key(tcell.KeyCtrlN) KeyCtrlO = Key(tcell.KeyCtrlO) KeyCtrlP = Key(tcell.KeyCtrlP) KeyCtrlQ = Key(tcell.KeyCtrlQ) KeyCtrlR = Key(tcell.KeyCtrlR) KeyCtrlS = Key(tcell.KeyCtrlS) KeyCtrlT = Key(tcell.KeyCtrlT) KeyCtrlU = Key(tcell.KeyCtrlU) KeyCtrlV = Key(tcell.KeyCtrlV) KeyCtrlW = Key(tcell.KeyCtrlW) KeyCtrlX = Key(tcell.KeyCtrlX) KeyCtrlY = Key(tcell.KeyCtrlY) KeyCtrlZ = Key(tcell.KeyCtrlZ) KeyEsc = Key(tcell.KeyEscape) KeyCtrlUnderscore = Key(tcell.KeyCtrlUnderscore) KeySpace = Key(32) KeyBackspace2 = Key(tcell.KeyBackspace2) KeyCtrl8 = Key(tcell.KeyBackspace2) // same key as in termbox-go // The following assignments were used in termbox implementation. // In tcell, these are not keys per se. But in gocui we have them // mapped to the keys so we have to use placeholder keys. KeyAltEnter = Key(tcell.KeyF64) // arbitrary assignments MouseLeft = Key(tcell.KeyF63) MouseRight = Key(tcell.KeyF62) MouseMiddle = Key(tcell.KeyF61) MouseRelease = Key(tcell.KeyF60) MouseWheelUp = Key(tcell.KeyF59) MouseWheelDown = Key(tcell.KeyF58) MouseWheelLeft = Key(tcell.KeyF57) MouseWheelRight = Key(tcell.KeyF56) KeyCtrl2 = Key(tcell.KeyNUL) // termbox defines theses KeyCtrl3 = Key(tcell.KeyEscape) KeyCtrl4 = Key(tcell.KeyCtrlBackslash) KeyCtrl5 = Key(tcell.KeyCtrlRightSq) KeyCtrl6 = Key(tcell.KeyCtrlCarat) KeyCtrl7 = Key(tcell.KeyCtrlUnderscore) KeyCtrlSlash = Key(tcell.KeyCtrlUnderscore) KeyCtrlRsqBracket = Key(tcell.KeyCtrlRightSq) KeyCtrlBackslash = Key(tcell.KeyCtrlBackslash) KeyCtrlLsqBracket = Key(tcell.KeyCtrlLeftSq) ) // Modifiers. const ( ModNone Modifier = Modifier(0) ModAlt = Modifier(tcell.ModAlt) ModMotion = Modifier(2) // just picking an arbitrary number here that doesn't clash with tcell.ModAlt // ModCtrl doesn't work with keyboard keys. Use CtrlKey in Key and ModNone. This is was for mouse clicks only (tcell.v1) // ModCtrl = Modifier(tcell.ModCtrl) ) ================================================ FILE: vendor/github.com/jesseduffield/gocui/loader.go ================================================ package gocui import "time" func (v *View) loaderLines() [][]cell { duplicate := make([][]cell, len(v.lines)) for i := range v.lines { if i < len(v.lines)-1 { duplicate[i] = make([]cell, len(v.lines[i])) copy(duplicate[i], v.lines[i]) } else { duplicate[i] = make([]cell, len(v.lines[i])+2) copy(duplicate[i], v.lines[i]) duplicate[i][len(duplicate[i])-2] = cell{chr: ' '} duplicate[i][len(duplicate[i])-1] = Loader() } } return duplicate } // Loader can show a loading animation func Loader() cell { characters := "|/-\\" now := time.Now() nanos := now.UnixNano() index := nanos / 50000000 % int64(len(characters)) str := characters[index : index+1] chr := []rune(str)[0] return cell{ chr: chr, } } ================================================ FILE: vendor/github.com/jesseduffield/gocui/scrollbar.go ================================================ package gocui import "math" // returns start and height of scrollbar // `max` is the maximum possible value of `position` func calcScrollbar(listSize int, pageSize int, position int, scrollAreaSize int) (int, int) { height := calcScrollbarHeight(listSize, pageSize, scrollAreaSize) // assume we can't scroll past the last item maxPosition := listSize - pageSize if maxPosition <= 0 { return 0, height } if position == maxPosition { return scrollAreaSize - height, height } // we only want to show the scrollbar at the top or bottom positions if we're at the end. Hence the .Ceil (for moving the scrollbar once we scroll down) and the -1 (for pretending there's a smaller range than we actually have, with the above condition ensuring we snap to the bottom once we're at the end of the list) start := int(math.Ceil(((float64(position) / float64(maxPosition)) * float64(scrollAreaSize-height-1)))) return start, height } func calcScrollbarHeight(listSize int, pageSize int, scrollAreaSize int) int { if pageSize >= listSize { return scrollAreaSize } return int((float64(pageSize) / float64(listSize)) * float64(scrollAreaSize)) } ================================================ FILE: vendor/github.com/jesseduffield/gocui/task.go ================================================ package gocui // A task represents the fact that the program is busy doing something, which // is useful for integration tests which only want to proceed when the program // is idle. type Task interface { Done() Pause() Continue() // not exporting because we don't need to isBusy() bool } type TaskImpl struct { id int busy bool onDone func() withMutex func(func()) } func (self *TaskImpl) Done() { self.onDone() } func (self *TaskImpl) Pause() { self.withMutex(func() { self.busy = false }) } func (self *TaskImpl) Continue() { self.withMutex(func() { self.busy = true }) } func (self *TaskImpl) isBusy() bool { return self.busy } type TaskStatus int const ( TaskStatusBusy TaskStatus = iota TaskStatusPaused TaskStatusDone ) type FakeTask struct { status TaskStatus } func NewFakeTask() *FakeTask { return &FakeTask{ status: TaskStatusBusy, } } func (self *FakeTask) Done() { self.status = TaskStatusDone } func (self *FakeTask) Pause() { self.status = TaskStatusPaused } func (self *FakeTask) Continue() { self.status = TaskStatusBusy } func (self *FakeTask) isBusy() bool { return self.status == TaskStatusBusy } func (self *FakeTask) Status() TaskStatus { return self.status } func (self *FakeTask) FormatStatus() string { return formatTaskStatus(self.status) } func formatTaskStatus(status TaskStatus) string { switch status { case TaskStatusBusy: return "busy" case TaskStatusPaused: return "paused" case TaskStatusDone: return "done" } return "unknown" } ================================================ FILE: vendor/github.com/jesseduffield/gocui/task_manager.go ================================================ package gocui import "sync" // Tracks whether the program is busy (i.e. either something is happening on // the main goroutine or a worker goroutine). Used by integration tests // to wait until the program is idle before progressing. type TaskManager struct { // each of these listeners will be notified when the program goes from busy to idle idleListeners []chan struct{} tasks map[int]Task // auto-incrementing id for new tasks nextId int mutex sync.Mutex } func newTaskManager() *TaskManager { return &TaskManager{ tasks: make(map[int]Task), idleListeners: []chan struct{}{}, } } func (self *TaskManager) NewTask() *TaskImpl { self.mutex.Lock() defer self.mutex.Unlock() self.nextId++ taskId := self.nextId onDone := func() { self.delete(taskId) } task := &TaskImpl{id: taskId, busy: true, onDone: onDone, withMutex: self.withMutex} self.tasks[taskId] = task return task } func (self *TaskManager) addIdleListener(c chan struct{}) { self.idleListeners = append(self.idleListeners, c) } func (self *TaskManager) withMutex(f func()) { self.mutex.Lock() defer self.mutex.Unlock() f() // Check if all tasks are done for _, task := range self.tasks { if task.isBusy() { return } } // If we get here, all tasks are done, so // notify listeners that the program is idle for _, listener := range self.idleListeners { listener <- struct{}{} } } func (self *TaskManager) delete(taskId int) { self.withMutex(func() { delete(self.tasks, taskId) }) } ================================================ FILE: vendor/github.com/jesseduffield/gocui/tcell_driver.go ================================================ // Copyright 2020 The gocui 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 gocui import ( "github.com/gdamore/tcell/v2" "github.com/mattn/go-runewidth" ) // We probably don't want this being a global variable for YOLO for now var Screen tcell.Screen // oldStyle is a representation of how a cell would be styled when we were using termbox type oldStyle struct { fg Attribute bg Attribute outputMode OutputMode } var runeReplacements = map[rune]string{ '┌': "+", '┐': "+", '└': "+", '┘': "+", '╭': "+", '╮': "+", '╰': "+", '╯': "+", '─': "-", '═': "-", '║': "|", '╔': "+", '╗': "+", '╚': "+", '╝': "+", // using a hyphen here actually looks weird. // We see these characters when in portrait mode '╶': " ", '╴': " ", '┴': "+", '┬': "+", '╷': "|", '├': "+", '│': "|", '▼': "v", '►': ">", '▲': "^", '◄': "<", } // tcellInit initializes tcell screen for use. func (g *Gui) tcellInit(runeReplacements map[rune]string) error { runewidth.DefaultCondition.EastAsianWidth = false tcell.SetEncodingFallback(tcell.EncodingFallbackASCII) if s, e := tcell.NewScreen(); e != nil { return e } else if e = s.Init(); e != nil { return e } else { registerRuneFallbacks(s, runeReplacements) g.screen = s Screen = s return nil } } func registerRuneFallbacks(s tcell.Screen, additional map[rune]string) { for before, after := range runeReplacements { s.RegisterRuneFallback(before, after) } for before, after := range additional { s.RegisterRuneFallback(before, after) } } // tcellInitSimulation initializes tcell screen for use. func (g *Gui) tcellInitSimulation(width int, height int) error { s := tcell.NewSimulationScreen("") if e := s.Init(); e != nil { return e } else { g.screen = s Screen = s // setting to a larger value than the typical terminal size // so that during a test we're more likely to see an item to select in a view. s.SetSize(width, height) s.Sync() return nil } } // tcellSetCell sets the character cell at a given location to the given // content (rune) and attributes using provided OutputMode func tcellSetCell(x, y int, ch rune, fg, bg Attribute, outputMode OutputMode) { st := getTcellStyle(oldStyle{fg: fg, bg: bg, outputMode: outputMode}) Screen.SetContent(x, y, ch, nil, st) } // getTcellStyle creates tcell.Style from Attributes func getTcellStyle(input oldStyle) tcell.Style { st := tcell.StyleDefault // extract colors and attributes if input.fg != ColorDefault { st = st.Foreground(getTcellColor(input.fg, input.outputMode)) st = setTcellFontEffectStyle(st, input.fg) } if input.bg != ColorDefault { st = st.Background(getTcellColor(input.bg, input.outputMode)) st = setTcellFontEffectStyle(st, input.bg) } return st } // setTcellFontEffectStyle add additional attributes to tcell.Style func setTcellFontEffectStyle(st tcell.Style, attr Attribute) tcell.Style { if attr&AttrBold != 0 { st = st.Bold(true) } if attr&AttrUnderline != 0 { st = st.Underline(true) } if attr&AttrReverse != 0 { st = st.Reverse(true) } if attr&AttrBlink != 0 { st = st.Blink(true) } if attr&AttrDim != 0 { st = st.Dim(true) } if attr&AttrItalic != 0 { st = st.Italic(true) } if attr&AttrStrikeThrough != 0 { st = st.StrikeThrough(true) } return st } // gocuiEventType represents the type of event. type gocuiEventType uint8 // GocuiEvent represents events like a keys, mouse actions, or window resize. // // The 'Mod', 'Key' and 'Ch' fields are valid if 'Type' is 'eventKey'. // The 'MouseX' and 'MouseY' fields are valid if 'Type' is 'eventMouse'. // The 'Width' and 'Height' fields are valid if 'Type' is 'eventResize'. // The 'Focused' field is valid if 'Type' is 'eventFocus'. // The 'Err' field is valid if 'Type' is 'eventError'. type GocuiEvent struct { Type gocuiEventType Mod Modifier Key Key Ch rune Width int Height int Err error MouseX int MouseY int Focused bool N int } // Event types. const ( eventNone gocuiEventType = iota eventKey eventResize eventMouse eventFocus eventInterrupt eventError eventRaw ) const ( NOT_DRAGGING int = iota MAYBE_DRAGGING DRAGGING ) var ( lastMouseKey tcell.ButtonMask = tcell.ButtonNone lastMouseMod tcell.ModMask = tcell.ModNone dragState int = NOT_DRAGGING lastX int = 0 lastY int = 0 ) // this wrapper struct has public keys so we can easily serialize/deserialize to JSON type TcellKeyEventWrapper struct { Timestamp int64 Mod tcell.ModMask Key tcell.Key Ch rune } func NewTcellKeyEventWrapper(event *tcell.EventKey, timestamp int64) *TcellKeyEventWrapper { return &TcellKeyEventWrapper{ Timestamp: timestamp, Mod: event.Modifiers(), Key: event.Key(), Ch: event.Rune(), } } func (wrapper TcellKeyEventWrapper) toTcellEvent() tcell.Event { return tcell.NewEventKey(wrapper.Key, wrapper.Ch, wrapper.Mod) } type TcellMouseEventWrapper struct { Timestamp int64 X int Y int ButtonMask tcell.ButtonMask ModMask tcell.ModMask } func NewTcellMouseEventWrapper(event *tcell.EventMouse, timestamp int64) *TcellMouseEventWrapper { x, y := event.Position() return &TcellMouseEventWrapper{ Timestamp: timestamp, X: x, Y: y, ButtonMask: event.Buttons(), ModMask: event.Modifiers(), } } func (wrapper TcellMouseEventWrapper) toTcellEvent() tcell.Event { return tcell.NewEventMouse(wrapper.X, wrapper.Y, wrapper.ButtonMask, wrapper.ModMask) } type TcellResizeEventWrapper struct { Timestamp int64 Width int Height int } func NewTcellResizeEventWrapper(event *tcell.EventResize, timestamp int64) *TcellResizeEventWrapper { w, h := event.Size() return &TcellResizeEventWrapper{ Timestamp: timestamp, Width: w, Height: h, } } func (wrapper TcellResizeEventWrapper) toTcellEvent() tcell.Event { return tcell.NewEventResize(wrapper.Width, wrapper.Height) } // pollEvent get tcell.Event and transform it into gocuiEvent func (g *Gui) pollEvent() GocuiEvent { var tev tcell.Event if g.playRecording { select { case ev := <-g.ReplayedEvents.Keys: tev = (ev).toTcellEvent() case ev := <-g.ReplayedEvents.Resizes: tev = (ev).toTcellEvent() case ev := <-g.ReplayedEvents.MouseEvents: tev = (ev).toTcellEvent() } } else { tev = Screen.PollEvent() } switch tev := tev.(type) { case *tcell.EventInterrupt: return GocuiEvent{Type: eventInterrupt} case *tcell.EventResize: w, h := tev.Size() return GocuiEvent{Type: eventResize, Width: w, Height: h} case *tcell.EventKey: k := tev.Key() ch := rune(0) if k == tcell.KeyRune { k = 0 // if rune remove key (so it can match rune instead of key) ch = tev.Rune() if ch == ' ' { // special handling for spacebar k = 32 // tcell keys ends at 31 or starts at 256 ch = rune(0) } } mod := tev.Modifiers() // remove control modifier and setup special handling of ctrl+spacebar, etc. if mod == tcell.ModCtrl && k == 32 { mod = 0 ch = rune(0) k = tcell.KeyCtrlSpace } else if mod == tcell.ModShift && k == tcell.KeyUp { mod = 0 ch = rune(0) k = tcell.KeyF62 } else if mod == tcell.ModShift && k == tcell.KeyDown { mod = 0 ch = rune(0) k = tcell.KeyF63 } else if mod == tcell.ModCtrl || mod == tcell.ModShift { // remove Ctrl or Shift if specified // - shift - will be translated to the final code of rune // - ctrl - is translated in the key mod = 0 } else if mod == tcell.ModAlt && k == tcell.KeyEnter { // for the sake of convenience I'm having a KeyAltEnter key. I will likely // regret this laziness in the future. We're arbitrarily mapping that to tcell's // KeyF64. mod = 0 k = tcell.KeyF64 } return GocuiEvent{ Type: eventKey, Key: Key(k), Ch: ch, Mod: Modifier(mod), } case *tcell.EventMouse: x, y := tev.Position() button := tev.Buttons() mouseKey := MouseRelease mouseMod := ModNone // process mouse wheel if button&tcell.WheelUp != 0 { mouseKey = MouseWheelUp } if button&tcell.WheelDown != 0 { mouseKey = MouseWheelDown } if button&tcell.WheelLeft != 0 { mouseKey = MouseWheelLeft } if button&tcell.WheelRight != 0 { mouseKey = MouseWheelRight } wheeling := mouseKey == MouseWheelUp || mouseKey == MouseWheelDown || mouseKey == MouseWheelLeft || mouseKey == MouseWheelRight // process button events (not wheel events) button &= tcell.ButtonMask(0xff) if button != tcell.ButtonNone && lastMouseKey == tcell.ButtonNone { lastMouseKey = button lastMouseMod = tev.Modifiers() switch button { case tcell.ButtonPrimary: mouseKey = MouseLeft dragState = MAYBE_DRAGGING lastX = x lastY = y case tcell.ButtonSecondary: mouseKey = MouseRight case tcell.ButtonMiddle: mouseKey = MouseMiddle } } switch tev.Buttons() { case tcell.ButtonNone: if lastMouseKey != tcell.ButtonNone { switch lastMouseKey { case tcell.ButtonPrimary: dragState = NOT_DRAGGING case tcell.ButtonSecondary: case tcell.ButtonMiddle: } mouseMod = Modifier(lastMouseMod) lastMouseMod = tcell.ModNone lastMouseKey = tcell.ButtonNone } } if !wheeling { switch dragState { case NOT_DRAGGING: return GocuiEvent{Type: eventNone} // if we haven't released the left mouse button and we've moved the cursor then we're dragging case MAYBE_DRAGGING: if x != lastX || y != lastY { dragState = DRAGGING } case DRAGGING: mouseMod = ModMotion mouseKey = MouseLeft } } return GocuiEvent{ Type: eventMouse, MouseX: x, MouseY: y, Key: mouseKey, Ch: 0, Mod: mouseMod, } case *tcell.EventFocus: return GocuiEvent{ Type: eventFocus, Focused: tev.Focused, } default: return GocuiEvent{Type: eventNone} } } ================================================ FILE: vendor/github.com/jesseduffield/gocui/text_area.go ================================================ package gocui import ( "strings" "github.com/mattn/go-runewidth" ) const ( WHITESPACES = " \t" WORD_SEPARATORS = "*?_+-.[]~=/&;!#$%^(){}<>" ) type CursorMapping struct { Orig int Wrapped int } type TextArea struct { content []rune wrappedContent []rune cursorMapping []CursorMapping cursor int overwrite bool clipboard string AutoWrap bool AutoWrapWidth int } func AutoWrapContent(content []rune, autoWrapWidth int) ([]rune, []CursorMapping) { estimatedNumberOfSoftLineBreaks := len(content) / autoWrapWidth cursorMapping := make([]CursorMapping, 0, estimatedNumberOfSoftLineBreaks) wrappedContent := make([]rune, 0, len(content)+estimatedNumberOfSoftLineBreaks) startOfLine := 0 indexOfLastWhitespace := -1 for currentPos, r := range content { if r == '\n' { wrappedContent = append(wrappedContent, content[startOfLine:currentPos+1]...) startOfLine = currentPos + 1 indexOfLastWhitespace = -1 } else { if r == ' ' { indexOfLastWhitespace = currentPos + 1 } else if currentPos-startOfLine >= autoWrapWidth && indexOfLastWhitespace >= 0 { wrapAt := indexOfLastWhitespace wrappedContent = append(wrappedContent, content[startOfLine:wrapAt]...) wrappedContent = append(wrappedContent, '\n') cursorMapping = append(cursorMapping, CursorMapping{wrapAt, len(wrappedContent)}) startOfLine = wrapAt indexOfLastWhitespace = -1 } } } wrappedContent = append(wrappedContent, content[startOfLine:]...) return wrappedContent, cursorMapping } func (self *TextArea) autoWrapContent() { if self.AutoWrap { self.wrappedContent, self.cursorMapping = AutoWrapContent(self.content, self.AutoWrapWidth) } else { self.wrappedContent, self.cursorMapping = self.content, []CursorMapping{} } } func (self *TextArea) TypeRune(r rune) { if self.overwrite && !self.atEnd() { self.content[self.cursor] = r } else { self.content = append( self.content[:self.cursor], append([]rune{r}, self.content[self.cursor:]...)..., ) } self.autoWrapContent() self.cursor++ } func (self *TextArea) BackSpaceChar() { if self.cursor == 0 { return } self.content = append(self.content[:self.cursor-1], self.content[self.cursor:]...) self.autoWrapContent() self.cursor-- } func (self *TextArea) DeleteChar() { if self.atEnd() { return } self.content = append(self.content[:self.cursor], self.content[self.cursor+1:]...) self.autoWrapContent() } func (self *TextArea) MoveCursorLeft() { if self.cursor == 0 { return } self.cursor-- } func (self *TextArea) MoveCursorRight() { if self.cursor == len(self.content) { return } self.cursor++ } func (self *TextArea) MoveLeftWord() { if self.cursor == 0 { return } if self.atLineStart() { self.cursor-- return } for !self.atLineStart() && strings.ContainsRune(WHITESPACES, self.content[self.cursor-1]) { self.cursor-- } separators := false for !self.atLineStart() && strings.ContainsRune(WORD_SEPARATORS, self.content[self.cursor-1]) { self.cursor-- separators = true } if !separators { for !self.atLineStart() && !strings.ContainsRune(WHITESPACES+WORD_SEPARATORS, self.content[self.cursor-1]) { self.cursor-- } } } func (self *TextArea) MoveRightWord() { if self.atEnd() { return } if self.atLineEnd() { self.cursor++ return } for !self.atLineEnd() && strings.ContainsRune(WHITESPACES, self.content[self.cursor]) { self.cursor++ } separators := false for !self.atLineEnd() && strings.ContainsRune(WORD_SEPARATORS, self.content[self.cursor]) { self.cursor++ separators = true } if !separators { for !self.atLineEnd() && !strings.ContainsRune(WHITESPACES+WORD_SEPARATORS, self.content[self.cursor]) { self.cursor++ } } } func (self *TextArea) MoveCursorUp() { x, y := self.GetCursorXY() self.SetCursor2D(x, y-1) } func (self *TextArea) MoveCursorDown() { x, y := self.GetCursorXY() self.SetCursor2D(x, y+1) } func (self *TextArea) GetContent() string { return string(self.wrappedContent) } func (self *TextArea) GetUnwrappedContent() string { return string(self.content) } func (self *TextArea) ToggleOverwrite() { self.overwrite = !self.overwrite } func (self *TextArea) atEnd() bool { return self.cursor == len(self.content) } func (self *TextArea) DeleteToStartOfLine() { // copying vim's logic: if you're at the start of the line, you delete the newline // character and go to the end of the previous line if self.atLineStart() { if self.cursor == 0 { return } self.content = append(self.content[:self.cursor-1], self.content[self.cursor:]...) self.cursor-- self.autoWrapContent() return } // otherwise, if we're at a soft line start, skip left past the soft line // break, so we'll end up deleting the previous line. This seems like the // only reasonable behavior in this case, as you can't delete just the soft // line break. if self.atSoftLineStart() { self.cursor-- } // otherwise, you delete everything up to the start of the current line, without // deleting the newline character newlineIndex := self.closestNewlineOnLeft() self.clipboard = string(self.content[newlineIndex+1 : self.cursor]) self.content = append(self.content[:newlineIndex+1], self.content[self.cursor:]...) self.autoWrapContent() self.cursor = newlineIndex + 1 } func (self *TextArea) DeleteToEndOfLine() { if self.atEnd() { return } // if we're at the end of the line, delete just the newline character if self.atLineEnd() { self.content = append(self.content[:self.cursor], self.content[self.cursor+1:]...) self.autoWrapContent() return } // otherwise, if we're at a soft line end, skip right past the soft line // break, so we'll end up deleting the next line. This seems like the // only reasonable behavior in this case, as you can't delete just the soft // line break. if self.atSoftLineEnd() { self.cursor++ } lineEndIndex := self.closestNewlineOnRight() self.clipboard = string(self.content[self.cursor:lineEndIndex]) self.content = append(self.content[:self.cursor], self.content[lineEndIndex:]...) self.autoWrapContent() } func (self *TextArea) GoToStartOfLine() { if self.atSoftLineStart() { return } // otherwise, you delete everything up to the start of the current line, without // deleting the newline character newlineIndex := self.closestNewlineOnLeft() self.cursor = newlineIndex + 1 } func (self *TextArea) closestNewlineOnLeft() int { wrappedCursor := self.origCursorToWrappedCursor(self.cursor) newlineIndex := -1 for i, r := range self.wrappedContent[0:wrappedCursor] { if r == '\n' { newlineIndex = i } } unwrappedNewlineIndex := self.wrappedCursorToOrigCursor(newlineIndex) if unwrappedNewlineIndex >= 0 && self.content[unwrappedNewlineIndex] != '\n' { unwrappedNewlineIndex-- } return unwrappedNewlineIndex } func (self *TextArea) GoToEndOfLine() { if self.atEnd() { return } self.cursor = self.closestNewlineOnRight() // If the end of line is a soft line break, we need to move left by one so // that we end up at the last whitespace before the line break. Otherwise // we'd be at the start of the next line, since the newline character // doesn't really exist in the real content. if self.cursor < len(self.content) && self.content[self.cursor] != '\n' { self.cursor-- } } func (self *TextArea) closestNewlineOnRight() int { wrappedCursor := self.origCursorToWrappedCursor(self.cursor) for i, r := range self.wrappedContent[wrappedCursor:] { if r == '\n' { return self.wrappedCursorToOrigCursor(wrappedCursor + i) } } return len(self.content) } func (self *TextArea) atLineStart() bool { return self.cursor == 0 || (len(self.content) > self.cursor-1 && self.content[self.cursor-1] == '\n') } func (self *TextArea) atSoftLineStart() bool { wrappedCursor := self.origCursorToWrappedCursor(self.cursor) return wrappedCursor == 0 || (len(self.wrappedContent) > wrappedCursor-1 && self.wrappedContent[wrappedCursor-1] == '\n') } func (self *TextArea) atLineEnd() bool { return self.atEnd() || (len(self.content) > self.cursor && self.content[self.cursor] == '\n') } func (self *TextArea) atSoftLineEnd() bool { wrappedCursor := self.origCursorToWrappedCursor(self.cursor) return wrappedCursor == len(self.wrappedContent) || (len(self.wrappedContent) > wrappedCursor+1 && self.wrappedContent[wrappedCursor+1] == '\n') } func (self *TextArea) BackSpaceWord() { if self.cursor == 0 { return } if self.atLineStart() { self.BackSpaceChar() return } right := self.cursor for !self.atLineStart() && strings.ContainsRune(WHITESPACES, self.content[self.cursor-1]) { self.cursor-- } separators := false for !self.atLineStart() && strings.ContainsRune(WORD_SEPARATORS, self.content[self.cursor-1]) { self.cursor-- separators = true } if !separators { for !self.atLineStart() && !strings.ContainsRune(WHITESPACES+WORD_SEPARATORS, self.content[self.cursor-1]) { self.cursor-- } } self.clipboard = string(self.content[self.cursor:right]) self.content = append(self.content[:self.cursor], self.content[right:]...) self.autoWrapContent() } func (self *TextArea) Yank() { self.TypeString(self.clipboard) } func origCursorToWrappedCursor(origCursor int, cursorMapping []CursorMapping) int { prevMapping := CursorMapping{0, 0} for _, mapping := range cursorMapping { if origCursor < mapping.Orig { break } prevMapping = mapping } return origCursor + prevMapping.Wrapped - prevMapping.Orig } func (self *TextArea) origCursorToWrappedCursor(origCursor int) int { return origCursorToWrappedCursor(origCursor, self.cursorMapping) } func wrappedCursorToOrigCursor(wrappedCursor int, cursorMapping []CursorMapping) int { prevMapping := CursorMapping{0, 0} for _, mapping := range cursorMapping { if wrappedCursor < mapping.Wrapped { break } prevMapping = mapping } return wrappedCursor + prevMapping.Orig - prevMapping.Wrapped } func (self *TextArea) wrappedCursorToOrigCursor(wrappedCursor int) int { return wrappedCursorToOrigCursor(wrappedCursor, self.cursorMapping) } func (self *TextArea) GetCursorXY() (int, int) { cursorX := 0 cursorY := 0 wrappedCursor := self.origCursorToWrappedCursor(self.cursor) for _, r := range self.wrappedContent[0:wrappedCursor] { if r == '\n' { cursorY++ cursorX = 0 } else { chWidth := runewidth.RuneWidth(r) cursorX += chWidth } } return cursorX, cursorY } // takes an x,y position and maps it to a 1D cursor position func (self *TextArea) SetCursor2D(x int, y int) { if y < 0 { y = 0 } if x < 0 { x = 0 } newCursor := 0 for _, r := range self.wrappedContent { if x <= 0 && y == 0 { self.cursor = self.wrappedCursorToOrigCursor(newCursor) return } if r == '\n' { if y == 0 { self.cursor = self.wrappedCursorToOrigCursor(newCursor) return } y-- } else if y == 0 { chWidth := runewidth.RuneWidth(r) x -= chWidth } newCursor++ } // if we weren't able to run-down our arg, the user is trying to move out of // bounds so we'll just return if y > 0 { return } self.cursor = self.wrappedCursorToOrigCursor(newCursor) } func (self *TextArea) Clear() { self.content = []rune{} self.wrappedContent = []rune{} self.cursor = 0 } func (self *TextArea) TypeString(str string) { for _, r := range str { self.TypeRune(r) } } ================================================ FILE: vendor/github.com/jesseduffield/gocui/view.go ================================================ // Copyright 2014 The gocui 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 gocui import ( "bytes" "fmt" "io" "strings" "sync" "unicode" "unicode/utf8" "github.com/gdamore/tcell/v2" "github.com/go-errors/errors" "github.com/mattn/go-runewidth" ) // Constants for overlapping edges const ( TOP = 1 // view is overlapping at top edge BOTTOM = 2 // view is overlapping at bottom edge LEFT = 4 // view is overlapping at left edge RIGHT = 8 // view is overlapping at right edge ) // ErrInvalidPoint is returned when client passed invalid coordinates of a cell. // Most likely client has passed negative coordinates of a cell. var ErrInvalidPoint = errors.New("invalid point") // A View is a window. It maintains its own internal buffer and cursor // position. type View struct { name string x0, y0, x1, y1 int // left top right bottom ox, oy int // view offsets cx, cy int // cursor position rx, ry int // Read() offsets wx, wy int // Write() offsets lines [][]cell // All the data outMode OutputMode // The y position of the first line of a range selection. // This is not relative to the view's origin: it is relative to the first line // of the view's content, so you can scroll the view and this value will remain // the same, unlike the view's cy value. // A value of -1 means that there is no range selection. // This value can be greater than the selected line index, in the event that // a user starts a range select and then moves the cursor up. rangeSelectStartY int // readBuffer is used for storing unread bytes readBuffer []byte // tained is true if the viewLines must be updated tainted bool // internal representation of the view's buffer. We will keep viewLines around // from a previous render until we explicitly set them to nil, allowing us to // render the same content twice without flicker. Wherever we want to render // something without any chance of old content appearing (e.g. when actually // rendering new content or if the view is resized) we should set tainted to // true and viewLines to nil viewLines []viewLine // writeMutex protects locks the write process writeMutex sync.Mutex // ei is used to decode ESC sequences on Write ei *escapeInterpreter // Visible specifies whether the view is visible. Visible bool // BgColor and FgColor allow to configure the background and foreground // colors of the View. BgColor, FgColor Attribute // SelBgColor and SelFgColor are used to configure the background and // foreground colors of the selected line, when it is highlighted. SelBgColor, SelFgColor Attribute // If Editable is true, keystrokes will be added to the view's internal // buffer at the cursor position. Editable bool // Editor allows to define the editor that manages the editing mode, // including keybindings or cursor behaviour. DefaultEditor is used by // default. Editor Editor // Overwrite enables or disables the overwrite mode of the view. Overwrite bool // If Highlight is true, Sel{Bg,Fg}Colors will be used // for the line under the cursor position. Highlight bool // If Frame is true, a border will be drawn around the view. Frame bool // FrameColor allow to configure the color of the Frame when it is not highlighted. FrameColor Attribute // FrameRunes allows to define custom runes for the frame edges. // The rune slice can be defined with 3 different lengths. // If slice doesn't match these lengths, default runes will be used instead of missing one. // // 2 runes with only horizontal and vertical edges. // []rune{'─', '│'} // []rune{'═','║'} // 6 runes with horizontal, vertical edges and top-left, top-right, bottom-left, bottom-right cornes. // []rune{'─', '│', '┌', '┐', '└', '┘'} // []rune{'═','║','╔','╗','╚','╝'} // 11 runes which can be used with `gocui.Gui.SupportOverlaps` property. // []rune{'─', '│', '┌', '┐', '└', '┘', '├', '┤', '┬', '┴', '┼'} // []rune{'═','║','╔','╗','╚','╝','╠','╣','╦','╩','╬'} FrameRunes []rune // If Wrap is true, the content that is written to this View is // automatically wrapped when it is longer than its width. If true the // view's x-origin will be ignored. Wrap bool // If Autoscroll is true, the View will automatically scroll down when the // text overflows. If true the view's y-origin will be ignored. Autoscroll bool // If Frame is true, Title allows to configure a title for the view. Title string // If non-empty, TitlePrefix is prepended to the title of a view regardless on // the the currently selected tab (if any.) TitlePrefix string Tabs []string TabIndex int // TitleColor allow to configure the color of title and subtitle for the view. TitleColor Attribute // If Frame is true, Subtitle allows to configure a subtitle for the view. Subtitle string // If Mask is true, the View will display the mask instead of the real // content Mask rune // Overlaps describes which edges are overlapping with another view's edges Overlaps byte // If HasLoader is true, the message will be appended with a spinning loader animation HasLoader bool // IgnoreCarriageReturns tells us whether to ignore '\r' characters IgnoreCarriageReturns bool // ParentView is the view which catches events bubbled up from the given view if there's no matching handler ParentView *View searcher *searcher // KeybindOnEdit should be set to true when you want to execute keybindings even when the view is editable // (this is usually not the case) KeybindOnEdit bool TextArea *TextArea // something like '1 of 20' for a list view Footer string // if true, the user can scroll all the way past the last item until it appears at the top of the view CanScrollPastBottom bool } // call this in the event of a view resize, or if you want to render new content // without the chance of old content still appearing, or if you want to remove // a line from the existing content func (v *View) clearViewLines() { v.tainted = true v.viewLines = nil } type searcher struct { searchString string searchPositions []cellPos currentSearchIndex int onSelectItem func(int, int, int) error } func (v *View) SetOnSelectItem(onSelectItem func(int, int, int) error) { v.searcher.onSelectItem = onSelectItem } func (v *View) gotoNextMatch() error { if len(v.searcher.searchPositions) == 0 { return nil } if v.searcher.currentSearchIndex >= len(v.searcher.searchPositions)-1 { v.searcher.currentSearchIndex = 0 } else { v.searcher.currentSearchIndex++ } return v.SelectSearchResult(v.searcher.currentSearchIndex) } func (v *View) gotoPreviousMatch() error { if len(v.searcher.searchPositions) == 0 { return nil } if v.searcher.currentSearchIndex == 0 { if len(v.searcher.searchPositions) > 0 { v.searcher.currentSearchIndex = len(v.searcher.searchPositions) - 1 } } else { v.searcher.currentSearchIndex-- } return v.SelectSearchResult(v.searcher.currentSearchIndex) } func (v *View) SelectSearchResult(index int) error { itemCount := len(v.searcher.searchPositions) if itemCount == 0 { return nil } if index > itemCount-1 { index = itemCount - 1 } y := v.searcher.searchPositions[index].y v.FocusPoint(v.ox, y) if v.searcher.onSelectItem != nil { return v.searcher.onSelectItem(y, index, itemCount) } return nil } // Returns , func (v *View) GetSearchStatus() (int, int) { return v.searcher.currentSearchIndex, len(v.searcher.searchPositions) } func (v *View) Search(str string) error { v.writeMutex.Lock() v.searcher.search(str) v.updateSearchPositions() if len(v.searcher.searchPositions) > 0 { // get the first result past the current cursor currentIndex := 0 adjustedY := v.oy + v.cy adjustedX := v.ox + v.cx for i, pos := range v.searcher.searchPositions { if pos.y > adjustedY || (pos.y == adjustedY && pos.x > adjustedX) { currentIndex = i break } } v.searcher.currentSearchIndex = currentIndex v.writeMutex.Unlock() return v.SelectSearchResult(currentIndex) } else { v.writeMutex.Unlock() return v.searcher.onSelectItem(-1, -1, 0) } } func (v *View) ClearSearch() { v.searcher.clearSearch() } func (v *View) IsSearching() bool { return v.searcher.searchString != "" } func (v *View) FocusPoint(cx int, cy int) { lineCount := len(v.lines) if cy < 0 || cy > lineCount { return } _, height := v.Size() ly := height - 1 if ly < 0 { ly = 0 } v.oy = calculateNewOrigin(cy, v.oy, lineCount, ly) v.cx = cx v.cy = cy - v.oy } func (v *View) SetRangeSelectStart(rangeSelectStartY int) { v.rangeSelectStartY = rangeSelectStartY } func (v *View) CancelRangeSelect() { v.rangeSelectStartY = -1 } func calculateNewOrigin(selectedLine int, oldOrigin int, lineCount int, viewHeight int) int { if viewHeight > lineCount { return 0 } else if selectedLine < oldOrigin || selectedLine > oldOrigin+viewHeight { // If the selected line is outside the visible area, scroll the view so // that the selected line is in the middle. newOrigin := selectedLine - viewHeight/2 // However, take care not to overflow if the total line count is less // than the view height. maxOrigin := lineCount - viewHeight - 1 if newOrigin > maxOrigin { newOrigin = maxOrigin } if newOrigin < 0 { newOrigin = 0 } return newOrigin } return oldOrigin } func (s *searcher) search(str string) { s.searchString = str s.searchPositions = []cellPos{} s.currentSearchIndex = 0 } func (s *searcher) clearSearch() { s.searchString = "" s.searchPositions = []cellPos{} s.currentSearchIndex = 0 } type cellPos struct { x int y int } type viewLine struct { linesX, linesY int // coordinates relative to v.lines line []cell } type cell struct { chr rune bgColor, fgColor Attribute } type lineType []cell // String returns a string from a given cell slice. func (l lineType) String() string { str := "" for _, c := range l { str += string(c.chr) } return str } // newView returns a new View object. func newView(name string, x0, y0, x1, y1 int, mode OutputMode) *View { v := &View{ name: name, x0: x0, y0: y0, x1: x1, y1: y1, Visible: true, Frame: true, Editor: DefaultEditor, tainted: true, outMode: mode, ei: newEscapeInterpreter(mode), searcher: &searcher{}, TextArea: &TextArea{}, rangeSelectStartY: -1, } v.FgColor, v.BgColor = ColorDefault, ColorDefault v.SelFgColor, v.SelBgColor = ColorDefault, ColorDefault v.TitleColor, v.FrameColor = ColorDefault, ColorDefault return v } // Dimensions returns the dimensions of the View func (v *View) Dimensions() (int, int, int, int) { return v.x0, v.y0, v.x1, v.y1 } // Size returns the number of visible columns and rows in the View. func (v *View) Size() (x, y int) { return v.Width(), v.Height() } func (v *View) Width() int { return v.x1 - v.x0 - 1 } func (v *View) Height() int { return v.y1 - v.y0 - 1 } // if a view has a frame, that leaves less space for its writeable area func (v *View) InnerWidth() int { innerWidth := v.Width() - v.frameOffset() if innerWidth < 0 { return 0 } return innerWidth } func (v *View) InnerHeight() int { innerHeight := v.Height() - v.frameOffset() if innerHeight < 0 { return 0 } return innerHeight } func (v *View) frameOffset() int { if v.Frame { return 1 } else { return 0 } } // Name returns the name of the view. func (v *View) Name() string { return v.name } // setRune sets a rune at the given point relative to the view. It applies the // specified colors, taking into account if the cell must be highlighted. Also, // it checks if the position is valid. func (v *View) setRune(x, y int, ch rune, fgColor, bgColor Attribute) error { maxX, maxY := v.Size() if x < 0 || x >= maxX || y < 0 || y >= maxY { return ErrInvalidPoint } if v.Mask != 0 { fgColor = v.FgColor bgColor = v.BgColor ch = v.Mask } else if v.Highlight { var ( ry, rcy int err error ) _, ry, err = v.realPosition(x, y) if err != nil { return err } _, rrcy, err := v.realPosition(v.cx, v.cy) // if error is not nil, then the cursor is out of bounds, which is fine if err == nil { rcy = rrcy } rangeSelectStart := rcy rangeSelectEnd := rcy if v.rangeSelectStartY != -1 { _, realRangeSelectStart, err := v.realPosition(0, v.rangeSelectStartY-v.oy) if err != nil { return err } rangeSelectStart = min(realRangeSelectStart, rcy) rangeSelectEnd = max(realRangeSelectStart, rcy) } if ry >= rangeSelectStart && ry <= rangeSelectEnd { // this ensures we use the bright variant of a colour upon highlight fgColorComponent := fgColor & ^AttrAll if fgColorComponent >= AttrIsValidColor && fgColorComponent < AttrIsValidColor+8 { fgColor += 8 } fgColor = fgColor | AttrBold bgColor = bgColor | v.SelBgColor } } // Don't display NUL characters if ch == 0 { ch = ' ' } tcellSetCell(v.x0+x+1, v.y0+y+1, ch, fgColor, bgColor, v.outMode) return nil } func min(a, b int) int { if a < b { return a } return b } func max(a, b int) int { if a > b { return a } return b } // SetCursor sets the cursor position of the view at the given point, // relative to the view. It checks if the position is valid. func (v *View) SetCursor(x, y int) error { maxX, maxY := v.Size() if x < 0 || x >= maxX || y < 0 || y >= maxY { return nil } v.cx = x v.cy = y return nil } func (v *View) SetCursorX(x int) { maxX, _ := v.Size() if x < 0 || x >= maxX { return } v.cx = x } func (v *View) SetCursorY(y int) { _, maxY := v.Size() if y < 0 || y >= maxY { return } v.cy = y } // Cursor returns the cursor position of the view. func (v *View) Cursor() (x, y int) { return v.cx, v.cy } func (v *View) CursorX() int { return v.cx } func (v *View) CursorY() int { return v.cy } // SetOrigin sets the origin position of the view's internal buffer, // so the buffer starts to be printed from this point, which means that // it is linked with the origin point of view. It can be used to // implement Horizontal and Vertical scrolling with just incrementing // or decrementing ox and oy. func (v *View) SetOrigin(x, y int) error { if x < 0 || y < 0 { return ErrInvalidPoint } v.ox = x v.oy = y return nil } func (v *View) SetOriginX(x int) error { if x < 0 { return ErrInvalidPoint } v.ox = x return nil } func (v *View) SetOriginY(y int) error { if y < 0 { return ErrInvalidPoint } v.oy = y return nil } // Origin returns the origin position of the view. func (v *View) Origin() (x, y int) { return v.OriginX(), v.OriginY() } func (v *View) OriginX() int { return v.ox } func (v *View) OriginY() int { return v.oy } // SetWritePos sets the write position of the view's internal buffer. // So the next Write call would write directly to the specified position. func (v *View) SetWritePos(x, y int) error { if x < 0 || y < 0 { return ErrInvalidPoint } v.wx = x v.wy = y return nil } // WritePos returns the current write position of the view's internal buffer. func (v *View) WritePos() (x, y int) { return v.wx, v.wy } // SetReadPos sets the read position of the view's internal buffer. // So the next Read call would read from the specified position. func (v *View) SetReadPos(x, y int) error { if x < 0 || y < 0 { return ErrInvalidPoint } v.readBuffer = nil v.rx = x v.ry = y return nil } // ReadPos returns the current read position of the view's internal buffer. func (v *View) ReadPos() (x, y int) { return v.rx, v.ry } // makeWriteable creates empty cells if required to make position (x, y) writeable. func (v *View) makeWriteable(x, y int) { // TODO: make this more efficient // line `y` must be index-able (that's why `<=`) for len(v.lines) <= y { if cap(v.lines) > len(v.lines) { newLen := cap(v.lines) if newLen > y { newLen = y + 1 } v.lines = v.lines[:newLen] } else { v.lines = append(v.lines, nil) } } // cell `x` must not be index-able (that's why `<`) // append should be used by `lines[y]` user if he wants to write beyond `x` for len(v.lines[y]) < x { if cap(v.lines[y]) > len(v.lines[y]) { newLen := cap(v.lines[y]) if newLen > x { newLen = x } v.lines[y] = v.lines[y][:newLen] } else { v.lines[y] = append(v.lines[y], cell{}) } } } // writeCells copies []cell to specified location (x, y) // !!! caller MUST ensure that specified location (x, y) is writeable by calling makeWriteable func (v *View) writeCells(x, y int, cells []cell) { var newLen int // use maximum len available line := v.lines[y][:cap(v.lines[y])] maxCopy := len(line) - x if maxCopy < len(cells) { copy(line[x:], cells[:maxCopy]) line = append(line, cells[maxCopy:]...) newLen = len(line) } else { // maxCopy >= len(cells) copy(line[x:], cells) newLen = x + len(cells) if newLen < len(v.lines[y]) { newLen = len(v.lines[y]) } } v.lines[y] = line[:newLen] } // readCell gets cell at specified location (x, y) func (v *View) readCell(x, y int) (cell, bool) { if y < 0 || y >= len(v.lines) || x < 0 || x >= len(v.lines[y]) { return cell{}, false } return v.lines[y][x], true } // Write appends a byte slice into the view's internal buffer. Because // View implements the io.Writer interface, it can be passed as parameter // of functions like fmt.Fprintf, fmt.Fprintln, io.Copy, etc. Clear must // be called to clear the view's buffer. func (v *View) Write(p []byte) (n int, err error) { v.writeMutex.Lock() defer v.writeMutex.Unlock() v.writeRunes(bytes.Runes(p)) return len(p), nil } func (v *View) WriteRunes(p []rune) { v.writeMutex.Lock() defer v.writeMutex.Unlock() v.writeRunes(p) } // writeRunes copies slice of runes into internal lines buffer. func (v *View) writeRunes(p []rune) { v.tainted = true // Fill with empty cells, if writing outside current view buffer v.makeWriteable(v.wx, v.wy) for _, r := range p { switch r { case '\n': if c, ok := v.readCell(v.wx+1, v.wy); !ok || c.chr == 0 { v.writeCells(v.wx, v.wy, []cell{{ chr: 0, fgColor: 0, bgColor: 0, }}) } v.wx = 0 v.wy++ if v.wy >= len(v.lines) { v.lines = append(v.lines, nil) } case '\r': if c, ok := v.readCell(v.wx, v.wy); !ok || c.chr == 0 { v.writeCells(v.wx, v.wy, []cell{{ chr: 0, fgColor: 0, bgColor: 0, }}) } v.wx = 0 default: moveCursor, cells := v.parseInput(r, v.wx, v.wy) if cells == nil { continue } v.writeCells(v.wx, v.wy, cells) if moveCursor { v.wx += len(cells) } } } } // exported functions use the mutex. Non-exported functions are for internal use // and a calling function should use a mutex func (v *View) WriteString(s string) { v.WriteRunes([]rune(s)) } func (v *View) writeString(s string) { v.writeRunes([]rune(s)) } // parseInput parses char by char the input written to the View. It returns nil // while processing ESC sequences. Otherwise, it returns a cell slice that // contains the processed data. func (v *View) parseInput(ch rune, x int, _ int) (bool, []cell) { cells := []cell{} moveCursor := true isEscape, err := v.ei.parseOne(ch) if err != nil { for _, r := range v.ei.runes() { c := cell{ fgColor: v.FgColor, bgColor: v.BgColor, chr: r, } cells = append(cells, c) } v.ei.reset() } else { repeatCount := 1 if _, ok := v.ei.instruction.(eraseInLineFromCursor); ok { // fill rest of line v.ei.instructionRead() cx := 0 for _, cell := range v.lines[v.wy] { cx += runewidth.RuneWidth(cell.chr) } repeatCount = v.InnerWidth() - cx ch = ' ' moveCursor = false } else if isEscape { // do not output anything return moveCursor, nil } else if ch == '\t' { // fill tab-sized space const tabStop = 4 ch = ' ' repeatCount = tabStop - (x % tabStop) } c := cell{ fgColor: v.ei.curFgColor, bgColor: v.ei.curBgColor, chr: ch, } for i := 0; i < repeatCount; i++ { cells = append(cells, c) } } return moveCursor, cells } // Read reads data into p from the current reading position set by SetReadPos. // It returns the number of bytes read into p. // At EOF, err will be io.EOF. func (v *View) Read(p []byte) (n int, err error) { buffer := make([]byte, utf8.UTFMax) offset := 0 if v.readBuffer != nil { copy(p, v.readBuffer) if len(v.readBuffer) >= len(p) { if len(v.readBuffer) > len(p) { v.readBuffer = v.readBuffer[len(p):] } return len(p), nil } v.readBuffer = nil } for v.ry < len(v.lines) { for v.rx < len(v.lines[v.ry]) { count := utf8.EncodeRune(buffer, v.lines[v.ry][v.rx].chr) copy(p[offset:], buffer[:count]) v.rx++ newOffset := offset + count if newOffset >= len(p) { if newOffset > len(p) { v.readBuffer = buffer[newOffset-len(p):] } return len(p), nil } offset += count } v.rx = 0 v.ry++ } return offset, io.EOF } // only use this if the calling function has a lock on writeMutex func (v *View) clear() { v.rewind() v.lines = nil v.clearViewLines() } // Clear empties the view's internal buffer. // And resets reading and writing offsets. func (v *View) Clear() { v.writeMutex.Lock() defer v.writeMutex.Unlock() v.clear() } func (v *View) SetContent(str string) { v.writeMutex.Lock() defer v.writeMutex.Unlock() v.clear() v.writeString(str) } func (v *View) CopyContent(from *View) { v.writeMutex.Lock() defer v.writeMutex.Unlock() v.clear() v.lines = from.lines v.viewLines = from.viewLines v.ox = from.ox v.oy = from.oy v.cx = from.cx v.cy = from.cy } // Rewind sets read and write pos to (0, 0). func (v *View) Rewind() { v.writeMutex.Lock() defer v.writeMutex.Unlock() v.rewind() } // similar to Rewind but clears lines. Also similar to Clear but doesn't reset // viewLines func (v *View) Reset() { v.writeMutex.Lock() defer v.writeMutex.Unlock() v.rewind() v.lines = nil } // This is for when we've done a restart for the sake of avoiding a flicker and // we've reached the end of the new content to display: we need to clear the remaining // content from the previous round. We do this by setting v.viewLines to nil so that // we just render the new content from v.lines directly func (v *View) FlushStaleCells() { v.writeMutex.Lock() defer v.writeMutex.Unlock() v.clearViewLines() } func (v *View) rewind() { v.ei.reset() if err := v.SetReadPos(0, 0); err != nil { // SetReadPos returns error only if x and y are negative // we are passing 0, 0, thus no error should occur. panic(err) } if err := v.SetWritePos(0, 0); err != nil { // SetWritePos returns error only if x and y are negative // we are passing 0, 0, thus no error should occur. panic(err) } } func containsUpcaseChar(str string) bool { for _, ch := range str { if unicode.IsUpper(ch) { return true } } return false } func (v *View) updateSearchPositions() { if v.searcher.searchString != "" { var normalizeRune func(r rune) rune var normalizedSearchStr string // if we have any uppercase characters we'll do a case-sensitive search if containsUpcaseChar(v.searcher.searchString) { normalizeRune = func(r rune) rune { return r } normalizedSearchStr = v.searcher.searchString } else { normalizeRune = unicode.ToLower normalizedSearchStr = strings.ToLower(v.searcher.searchString) } v.searcher.searchPositions = []cellPos{} for y, line := range v.lines { x := 0 for startIdx, c := range line { found := true offset := 0 for _, c := range normalizedSearchStr { if len(line)-1 < startIdx+offset { found = false break } if normalizeRune(line[startIdx+offset].chr) != c { found = false break } offset += 1 } if found { v.searcher.searchPositions = append(v.searcher.searchPositions, cellPos{x: x, y: y}) } x += runewidth.RuneWidth(c.chr) } } } } // IsTainted tells us if the view is tainted func (v *View) IsTainted() bool { return v.tainted } // draw re-draws the view's contents. func (v *View) draw() error { v.writeMutex.Lock() defer v.writeMutex.Unlock() if !v.Visible { return nil } v.clearRunes() v.updateSearchPositions() maxX, maxY := v.Size() if v.Wrap { if maxX == 0 { return nil } v.ox = 0 } if v.tainted { lineIdx := 0 lines := v.lines if v.HasLoader { lines = v.loaderLines() } for i, line := range lines { wrap := 0 if v.Wrap { wrap = maxX } ls := lineWrap(line, wrap) for j := range ls { vline := viewLine{linesX: j, linesY: i, line: ls[j]} if lineIdx > len(v.viewLines)-1 { v.viewLines = append(v.viewLines, vline) } else { v.viewLines[lineIdx] = vline } lineIdx++ } } if !v.HasLoader { v.tainted = false } } visibleViewLinesHeight := v.viewLineLengthIgnoringTrailingBlankLines() if v.Autoscroll && visibleViewLinesHeight > maxY { v.oy = visibleViewLinesHeight - maxY } if len(v.viewLines) == 0 { return nil } start := v.oy if start > len(v.viewLines)-1 { start = len(v.viewLines) - 1 } emptyCell := cell{chr: ' ', fgColor: ColorDefault, bgColor: ColorDefault} var prevFgColor Attribute for y, vline := range v.viewLines[start:] { if y >= maxY { break } // x tracks the current x position in the view, and cellIdx tracks the // index of the cell. If we print a double-sized rune, we increment cellIdx // by one but x by two. x := -v.ox cellIdx := 0 var c cell for { if x >= maxX { break } if x < 0 { if cellIdx < len(vline.line) { x += runewidth.RuneWidth(vline.line[cellIdx].chr) cellIdx++ continue } else { // no more characters to write so we're only going to be printing empty cells // past this point x = 0 } } // if we're out of cells to write, we'll just print empty cells. if cellIdx > len(vline.line)-1 { c = emptyCell c.fgColor = prevFgColor } else { c = vline.line[cellIdx] // capturing previous foreground colour so that if we're using the reverse // attribute we honour the final character's colour and don't awkwardly switch // to a new background colour for the remainder of the line prevFgColor = c.fgColor } fgColor := c.fgColor if fgColor == ColorDefault { fgColor = v.FgColor } bgColor := c.bgColor if bgColor == ColorDefault { bgColor = v.BgColor } if matched, selected := v.isPatternMatchedRune(x, y); matched { if selected { bgColor = ColorCyan } else { bgColor = ColorYellow } } if err := v.setRune(x, y, c.chr, fgColor, bgColor); err != nil { return err } // Not sure why the previous code was here but it caused problems // when typing wide characters in an editor x += runewidth.RuneWidth(c.chr) cellIdx++ } } return nil } // if autoscroll is enabled but we only have a single row of cells shown to the // user, we don't want to scroll to the final line if it contains no text. So // this tells us the view lines height when we ignore any trailing blank lines func (v *View) viewLineLengthIgnoringTrailingBlankLines() int { for i := len(v.viewLines) - 1; i >= 0; i-- { if len(v.viewLines[i].line) > 0 { return i + 1 } } return 0 } func (v *View) isPatternMatchedRune(x, y int) (bool, bool) { searchStringWidth := runewidth.StringWidth(v.searcher.searchString) for i, pos := range v.searcher.searchPositions { adjustedY := y + v.oy adjustedX := x + v.ox if adjustedY == pos.y && adjustedX >= pos.x && adjustedX < pos.x+searchStringWidth { return true, i == v.searcher.currentSearchIndex } } return false, false } // realPosition returns the position in the internal buffer corresponding to the // point (x, y) of the view. func (v *View) realPosition(vx, vy int) (x, y int, err error) { vx = v.ox + vx vy = v.oy + vy if vx < 0 || vy < 0 { return 0, 0, ErrInvalidPoint } if len(v.viewLines) == 0 { return vx, vy, nil } if vy < len(v.viewLines) { vline := v.viewLines[vy] x = vline.linesX + vx y = vline.linesY } else { vline := v.viewLines[len(v.viewLines)-1] x = vx y = vline.linesY + vy - len(v.viewLines) + 1 } return x, y, nil } // clearRunes erases all the cells in the view. func (v *View) clearRunes() { maxX, maxY := v.Size() for x := 0; x < maxX; x++ { for y := 0; y < maxY; y++ { tcellSetCell(v.x0+x+1, v.y0+y+1, ' ', v.FgColor, v.BgColor, v.outMode) } } } // BufferLines returns the lines in the view's internal // buffer. func (v *View) BufferLines() []string { v.writeMutex.Lock() defer v.writeMutex.Unlock() lines := make([]string, len(v.lines)) for i, l := range v.lines { str := lineType(l).String() str = strings.Replace(str, "\x00", "", -1) lines[i] = str } return lines } // Buffer returns a string with the contents of the view's internal // buffer. func (v *View) Buffer() string { return linesToString(v.lines) } // ViewBufferLines returns the lines in the view's internal // buffer that is shown to the user. func (v *View) ViewBufferLines() []string { v.writeMutex.Lock() defer v.writeMutex.Unlock() lines := make([]string, len(v.viewLines)) for i, l := range v.viewLines { str := lineType(l.line).String() str = strings.Replace(str, "\x00", "", -1) lines[i] = str } return lines } // LinesHeight is the count of view lines (i.e. lines excluding wrapping) func (v *View) LinesHeight() int { return len(v.lines) } // ViewLinesHeight is the count of view lines (i.e. lines including wrapping) func (v *View) ViewLinesHeight() int { return len(v.viewLines) } // ViewBuffer returns a string with the contents of the view's buffer that is // shown to the user. func (v *View) ViewBuffer() string { lines := make([][]cell, len(v.viewLines)) for i := range v.viewLines { lines[i] = v.viewLines[i].line } return linesToString(lines) } // Line returns a string with the line of the view's internal buffer // at the position corresponding to the point (x, y). func (v *View) Line(y int) (string, error) { _, y, err := v.realPosition(0, y) if err != nil { return "", err } if y < 0 || y >= len(v.lines) { return "", ErrInvalidPoint } return lineType(v.lines[y]).String(), nil } // Word returns a string with the word of the view's internal buffer // at the position corresponding to the point (x, y). func (v *View) Word(x, y int) (string, error) { x, y, err := v.realPosition(x, y) if err != nil { return "", err } if x < 0 || y < 0 || y >= len(v.lines) || x >= len(v.lines[y]) { return "", ErrInvalidPoint } str := lineType(v.lines[y]).String() nl := strings.LastIndexFunc(str[:x], indexFunc) if nl == -1 { nl = 0 } else { nl = nl + 1 } nr := strings.IndexFunc(str[x:], indexFunc) if nr == -1 { nr = len(str) } else { nr = nr + x } return str[nl:nr], nil } // indexFunc allows to split lines by words taking into account spaces // and 0. func indexFunc(r rune) bool { return r == ' ' || r == 0 } // SetHighlight toggles highlighting of separate lines, for custom lists // or multiple selection in views. func (v *View) SetHighlight(y int, on bool) error { if y < 0 || y >= len(v.lines) { err := ErrInvalidPoint return err } line := v.lines[y] cells := make([]cell, 0) for _, c := range line { if on { c.bgColor = v.SelBgColor c.fgColor = v.SelFgColor } else { c.bgColor = v.BgColor c.fgColor = v.FgColor } cells = append(cells, c) } v.tainted = true v.lines[y] = cells return nil } func lineWrap(line []cell, columns int) [][]cell { if columns == 0 { return [][]cell{line} } var n int var offset int lastWhitespaceIndex := -1 lines := make([][]cell, 0, 1) for i := range line { currChr := line[i].chr rw := runewidth.RuneWidth(currChr) n += rw // if currChr == 'g' { // panic(n) // } if n > columns { // This code is convoluted but we've got comprehensive tests so feel free to do whatever you want // to the code to simplify it so long as our tests still pass. if currChr == ' ' { // if the line ends in a space, we'll omit it. This means there'll be no // way to distinguish between a clean break and a mid-word break, but // I think it's worth it. lines = append(lines, line[offset:i]) offset = i + 1 n = 0 } else if currChr == '-' { // if the last character is hyphen and the width of line is equal to the columns lines = append(lines, line[offset:i]) offset = i n = rw } else if lastWhitespaceIndex != -1 && lastWhitespaceIndex+1 != i { // if there is a space in the line and the line is not breaking at a space/hyphen if line[lastWhitespaceIndex].chr == '-' { // if break occurs at hyphen, we'll retain the hyphen lines = append(lines, line[offset:lastWhitespaceIndex+1]) offset = lastWhitespaceIndex + 1 n = i - offset } else { // if break occurs at space, we'll omit the space lines = append(lines, line[offset:lastWhitespaceIndex]) offset = lastWhitespaceIndex + 1 n = i - offset + 1 } } else { // in this case we're breaking mid-word lines = append(lines, line[offset:i]) offset = i n = rw } lastWhitespaceIndex = -1 } else if line[i].chr == ' ' || line[i].chr == '-' { lastWhitespaceIndex = i } } lines = append(lines, line[offset:]) return lines } func linesToString(lines [][]cell) string { str := make([]string, len(lines)) for i := range lines { rns := make([]rune, 0, len(lines[i])) line := lineType(lines[i]).String() for _, c := range line { if c != '\x00' { rns = append(rns, c) } } str[i] = string(rns) } return strings.Join(str, "\n") } // GetClickedTabIndex tells us which tab was clicked func (v *View) GetClickedTabIndex(x int) int { if len(v.Tabs) <= 1 { return 0 } charX := len(v.TitlePrefix) + 1 if v.TitlePrefix != "" { charX += 1 } if x <= charX { return -1 } for i, tab := range v.Tabs { charX += runewidth.StringWidth(tab) if x <= charX { return i } charX += runewidth.StringWidth(" - ") if x <= charX { return -1 } } return -1 } func (v *View) SelectedLineIdx() int { _, seletedLineIdx := v.SelectedPoint() return seletedLineIdx } // expected to only be used in tests func (v *View) SelectedLine() string { v.writeMutex.Lock() defer v.writeMutex.Unlock() if len(v.lines) == 0 { return "" } return v.lineContentAtIdx(v.SelectedLineIdx()) } // expected to only be used in tests func (v *View) SelectedLines() []string { v.writeMutex.Lock() defer v.writeMutex.Unlock() if len(v.lines) == 0 { return nil } startIdx, endIdx := v.SelectedLineRange() lines := make([]string, 0, endIdx-startIdx+1) for i := startIdx; i <= endIdx; i++ { lines = append(lines, v.lineContentAtIdx(i)) } return lines } func (v *View) lineContentAtIdx(idx int) string { line := v.lines[idx] str := lineType(line).String() return strings.Replace(str, "\x00", "", -1) } func (v *View) SelectedPoint() (int, int) { cx, cy := v.Cursor() ox, oy := v.Origin() return cx + ox, cy + oy } func (v *View) SelectedLineRange() (int, int) { _, cy := v.Cursor() _, oy := v.Origin() start := cy + oy if v.rangeSelectStartY == -1 { return start, start } end := v.rangeSelectStartY if start > end { return end, start } else { return start, end } } func (v *View) RenderTextArea() { v.Clear() fmt.Fprint(v, v.TextArea.GetContent()) cursorX, cursorY := v.TextArea.GetCursorXY() prevOriginX, prevOriginY := v.Origin() width, height := v.InnerWidth(), v.InnerHeight() newViewCursorX, newOriginX := updatedCursorAndOrigin(prevOriginX, width, cursorX) newViewCursorY, newOriginY := updatedCursorAndOrigin(prevOriginY, height, cursorY) _ = v.SetCursor(newViewCursorX, newViewCursorY) _ = v.SetOrigin(newOriginX, newOriginY) } func updatedCursorAndOrigin(prevOrigin int, size int, cursor int) (int, int) { var newViewCursor int newOrigin := prevOrigin if cursor > prevOrigin+size { newOrigin = cursor - size newViewCursor = size } else if cursor < prevOrigin { newOrigin = cursor newViewCursor = 0 } else { newViewCursor = cursor - prevOrigin } return newViewCursor, newOrigin } func (v *View) ClearTextArea() { v.Clear() v.writeMutex.Lock() defer v.writeMutex.Unlock() v.TextArea.Clear() _ = v.SetOrigin(0, 0) _ = v.SetCursor(0, 0) } // only call this function if you don't care where v.wx and v.wy end up func (v *View) OverwriteLines(y int, content string) { v.writeMutex.Lock() defer v.writeMutex.Unlock() // break by newline, then for each line, write it, then add that erase command v.wx = 0 v.wy = y lines := strings.Replace(content, "\n", "\x1b[K\n", -1) v.writeString(lines) } func (v *View) ScrollUp(amount int) { if amount > v.oy { amount = v.oy } v.oy -= amount v.cy += amount } // ensures we don't scroll past the end of the view's content func (v *View) ScrollDown(amount int) { adjustedAmount := v.adjustDownwardScrollAmount(amount) if adjustedAmount > 0 { v.oy += adjustedAmount v.cy -= adjustedAmount } } func (v *View) ScrollLeft(amount int) { newOx := v.ox - amount if newOx < 0 { newOx = 0 } v.ox = newOx } // not applying any limits to this func (v *View) ScrollRight(amount int) { v.ox += amount } func (v *View) adjustDownwardScrollAmount(scrollHeight int) int { _, oy := v.Origin() y := oy if !v.CanScrollPastBottom { _, sy := v.Size() y += sy } scrollableLines := v.ViewLinesHeight() - y if scrollableLines < 0 { return 0 } margin := v.scrollMargin() if scrollableLines-margin < scrollHeight { scrollHeight = scrollableLines - margin } if oy+scrollHeight < 0 { return 0 } else { return scrollHeight } } // scrollMargin is about how many lines must still appear if you scroll // all the way down. We'll subtract this from the total amount of scrollable lines func (v *View) scrollMargin() int { if v.CanScrollPastBottom { // Setting to 2 because of the newline at the end of the file that we're likely showing. // If we want to scroll past bottom outside the context of reading a file's contents, // we should make this into a field on the view to be configured by the client. // For now we're hardcoding it. return 2 } else { return 0 } } // Returns true if the view contains a line containing the given text with the given // foreground color func (v *View) ContainsColoredText(fgColor string, text string) bool { for _, line := range v.lines { if containsColoredTextInLine(fgColor, text, line) { return true } } return false } func containsColoredTextInLine(fgColorStr string, text string, line []cell) bool { fgColor := tcell.GetColor(fgColorStr) currentMatch := "" for i := 0; i < len(line); i++ { cell := line[i] // stripping attributes by converting to and from hex cellColor := tcell.NewHexColor(cell.fgColor.Hex()) if cellColor == fgColor { currentMatch += string(cell.chr) } else if currentMatch != "" { if strings.Contains(currentMatch, text) { return true } currentMatch = "" } } return strings.Contains(currentMatch, text) } ================================================ FILE: vendor/github.com/jesseduffield/kill/LICENSE ================================================ MIT License Copyright (c) 2022 Jesse Duffield 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. ================================================ FILE: vendor/github.com/jesseduffield/kill/README.md ================================================ # Kill Go package for killing processes across different platforms. Handles killing children of processes as well as the process itself. ================================================ FILE: vendor/github.com/jesseduffield/kill/kill_default_platform.go ================================================ //go:build !windows // +build !windows package kill import ( "os/exec" "syscall" ) // Kill kills a process. If the process has Setpgid == true, then we have anticipated that it might spawn its own child processes, so we've given it a process group ID (PGID) equal to its process id (PID) and given its child processes will inherit the PGID, we can kill that group, rather than killing the process itself. func Kill(cmd *exec.Cmd) error { if cmd.Process == nil { // You can't kill a person with no body return nil } if cmd.SysProcAttr != nil && cmd.SysProcAttr.Setpgid { // minus sign means we're talking about a PGID as opposed to a PID return syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL) } return cmd.Process.Kill() } // PrepareForChildren ensures that child processes of this parent process will share the same group id // as the parent, meaning when the call Kill on the parent process, we'll kill // the whole group, parent and children both. Gruesome when you think about it. func PrepareForChildren(cmd *exec.Cmd) { cmd.SysProcAttr = &syscall.SysProcAttr{ Setpgid: true, } } ================================================ FILE: vendor/github.com/jesseduffield/kill/kill_windows.go ================================================ // adapted from https://blog.csdn.net/fyxichen/article/details/51857864 package kill import ( "os" "os/exec" "syscall" "unsafe" ) // Kill kills a process, along with any child processes it may have spawned. func Kill(cmd *exec.Cmd) error { if cmd.Process == nil { // You can't kill a person with no body return nil } pids := Getppids(uint32(cmd.Process.Pid)) for _, pid := range pids { pro, err := os.FindProcess(int(pid)) if err != nil { continue } pro.Kill() } return nil } // PrepareForChildren ensures that child processes of this parent process will share the same group id // as the parent, meaning when the call Kill on the parent process, we'll kill // the whole group, parent and children both. Gruesome when you think about it. func PrepareForChildren(cmd *exec.Cmd) { // do nothing because on windows our Kill function handles children by default. } const ( MAX_PATH = 260 TH32CS_SNAPPROCESS = 0x00000002 ) type ProcessInfo struct { Name string Pid uint32 PPid uint32 } type PROCESSENTRY32 struct { DwSize uint32 CntUsage uint32 Th32ProcessID uint32 Th32DefaultHeapID uintptr Th32ModuleID uint32 CntThreads uint32 Th32ParentProcessID uint32 PcPriClassBase int32 DwFlags uint32 SzExeFile [MAX_PATH]uint16 } type HANDLE uintptr var ( modkernel32 = syscall.NewLazyDLL("kernel32.dll") procCreateToolhelp32Snapshot = modkernel32.NewProc("CreateToolhelp32Snapshot") procProcess32First = modkernel32.NewProc("Process32FirstW") procProcess32Next = modkernel32.NewProc("Process32NextW") procCloseHandle = modkernel32.NewProc("CloseHandle") ) func Getppids(pid uint32) []uint32 { infos, err := GetProcs() if err != nil { return []uint32{pid} } var pids []uint32 = make([]uint32, 0, len(infos)) var index int = 0 pids = append(pids, pid) var length int = len(pids) for index < length { for _, info := range infos { if info.PPid == pids[index] { pids = append(pids, info.Pid) } } index += 1 length = len(pids) } return pids } func GetProcs() (procs []ProcessInfo, err error) { snap := createToolhelp32Snapshot(TH32CS_SNAPPROCESS, uint32(0)) if snap == 0 { err = syscall.GetLastError() return } defer closeHandle(snap) var pe32 PROCESSENTRY32 pe32.DwSize = uint32(unsafe.Sizeof(pe32)) if process32First(snap, &pe32) == false { err = syscall.GetLastError() return } procs = append(procs, ProcessInfo{syscall.UTF16ToString(pe32.SzExeFile[:260]), pe32.Th32ProcessID, pe32.Th32ParentProcessID}) for process32Next(snap, &pe32) { procs = append(procs, ProcessInfo{syscall.UTF16ToString(pe32.SzExeFile[:260]), pe32.Th32ProcessID, pe32.Th32ParentProcessID}) } return } func createToolhelp32Snapshot(flags, processId uint32) HANDLE { ret, _, _ := procCreateToolhelp32Snapshot.Call(uintptr(flags), uintptr(processId)) if ret <= 0 { return HANDLE(0) } return HANDLE(ret) } func process32First(snapshot HANDLE, pe *PROCESSENTRY32) bool { ret, _, _ := procProcess32First.Call(uintptr(snapshot), uintptr(unsafe.Pointer(pe))) return ret != 0 } func process32Next(snapshot HANDLE, pe *PROCESSENTRY32) bool { ret, _, _ := procProcess32Next.Call(uintptr(snapshot), uintptr(unsafe.Pointer(pe))) return ret != 0 } func closeHandle(object HANDLE) bool { ret, _, _ := procCloseHandle.Call(uintptr(object)) return ret != 0 } ================================================ FILE: vendor/github.com/jesseduffield/lazycore/LICENSE ================================================ MIT License Copyright (c) 2022 Jesse Duffield 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. ================================================ FILE: vendor/github.com/jesseduffield/lazycore/pkg/boxlayout/boxlayout.go ================================================ package boxlayout import ( "github.com/jesseduffield/lazycore/pkg/utils" "github.com/samber/lo" ) type Dimensions struct { X0 int X1 int Y0 int Y1 int } type Direction int const ( ROW Direction = iota COLUMN ) // to give a high-level explanation of what's going on here. We layout our windows by arranging a bunch of boxes in the available space. // If a box has children, it needs to specify how it wants to arrange those children: ROW or COLUMN. // If a box represents a window, you can put the window name in the Window field. // When determining how to divvy-up the available height (for row children) or width (for column children), we first // give the boxes with a static `size` the space that they want. Then we apportion // the remaining space based on the weights of the dynamic boxes (you can't define // both size and weight at the same time: you gotta pick one). If there are two // boxes, one with weight 1 and the other with weight 2, the first one gets 33% // of the available space and the second one gets the remaining 66% type Box struct { // Direction decides how the children boxes are laid out. ROW means the children will each form a row i.e. that they will be stacked on top of eachother. Direction Direction // function which takes the width and height assigned to the box and decides which orientation it will have ConditionalDirection func(width int, height int) Direction Children []*Box // function which takes the width and height assigned to the box and decides the layout of the children. ConditionalChildren func(width int, height int) []*Box // Window refers to the name of the window this box represents, if there is one Window string // static Size. If parent box's direction is ROW this refers to height, otherwise width Size int // dynamic size. Once all statically sized children have been considered, Weight decides how much of the remaining space will be taken up by the box // TODO: consider making there be one int and a type enum so we can't have size and Weight simultaneously defined Weight int } func ArrangeWindows(root *Box, x0, y0, width, height int) map[string]Dimensions { children := root.getChildren(width, height) if len(children) == 0 { // leaf node if root.Window != "" { dimensionsForWindow := Dimensions{X0: x0, Y0: y0, X1: x0 + width - 1, Y1: y0 + height - 1} return map[string]Dimensions{root.Window: dimensionsForWindow} } return map[string]Dimensions{} } direction := root.getDirection(width, height) var availableSize int if direction == COLUMN { availableSize = width } else { availableSize = height } sizes := calcSizes(children, availableSize) result := map[string]Dimensions{} offset := 0 for i, child := range children { boxSize := sizes[i] var resultForChild map[string]Dimensions if direction == COLUMN { resultForChild = ArrangeWindows(child, x0+offset, y0, boxSize, height) } else { resultForChild = ArrangeWindows(child, x0, y0+offset, width, boxSize) } result = mergeDimensionMaps(result, resultForChild) offset += boxSize } return result } func calcSizes(boxes []*Box, availableSpace int) []int { normalizedWeights := normalizeWeights(lo.Map(boxes, func(box *Box, _ int) int { return box.Weight })) totalWeight := 0 reservedSpace := 0 for i, box := range boxes { if box.isStatic() { reservedSpace += box.Size } else { totalWeight += normalizedWeights[i] } } dynamicSpace := utils.Max(0, availableSpace-reservedSpace) unitSize := 0 extraSpace := 0 if totalWeight > 0 { unitSize = dynamicSpace / totalWeight extraSpace = dynamicSpace % totalWeight } result := make([]int, len(boxes)) for i, box := range boxes { if box.isStatic() { // assuming that only one static child can have a size greater than the // available space. In that case we just crop the size to what's available result[i] = utils.Min(availableSpace, box.Size) } else { result[i] = unitSize * normalizedWeights[i] } } // distribute the remainder across dynamic boxes. for extraSpace > 0 { for i, weight := range normalizedWeights { if weight > 0 { result[i]++ extraSpace-- normalizedWeights[i]-- if extraSpace == 0 { break } } } } return result } // removes common multiple from weights e.g. if we get 2, 4, 4 we return 1, 2, 2. func normalizeWeights(weights []int) []int { if len(weights) == 0 { return []int{} } // to spare us some computation we'll exit early if any of our weights is 1 if lo.SomeBy(weights, func(weight int) bool { return weight == 1 }) { return weights } // map weights to factorSlices and find the lowest common factor positiveWeights := lo.Filter(weights, func(weight int, _ int) bool { return weight > 0 }) factorSlices := lo.Map(positiveWeights, func(weight int, _ int) []int { return calcFactors(weight) }) commonFactors := factorSlices[0] for _, factors := range factorSlices { commonFactors = lo.Intersect(commonFactors, factors) } if len(commonFactors) == 0 { return weights } newWeights := lo.Map(weights, func(weight int, _ int) int { return weight / commonFactors[0] }) return normalizeWeights(newWeights) } func calcFactors(n int) []int { factors := []int{} for i := 2; i <= n; i++ { if n%i == 0 { factors = append(factors, i) } } return factors } func (b *Box) isStatic() bool { return b.Size > 0 } func (b *Box) getDirection(width int, height int) Direction { if b.ConditionalDirection != nil { return b.ConditionalDirection(width, height) } return b.Direction } func (b *Box) getChildren(width int, height int) []*Box { if b.ConditionalChildren != nil { return b.ConditionalChildren(width, height) } return b.Children } func mergeDimensionMaps(a map[string]Dimensions, b map[string]Dimensions) map[string]Dimensions { result := map[string]Dimensions{} for _, dimensionMap := range []map[string]Dimensions{a, b} { for k, v := range dimensionMap { result[k] = v } } return result } ================================================ FILE: vendor/github.com/jesseduffield/lazycore/pkg/utils/once_writer.go ================================================ package utils import ( "io" "sync" ) // This wraps a writer and ensures that before we actually write anything we call a given function first type OnceWriter struct { writer io.Writer once sync.Once f func() } var _ io.Writer = &OnceWriter{} func NewOnceWriter(writer io.Writer, f func()) *OnceWriter { return &OnceWriter{ writer: writer, f: f, } } func (self *OnceWriter) Write(p []byte) (n int, err error) { self.once.Do(func() { self.f() }) return self.writer.Write(p) } ================================================ FILE: vendor/github.com/jesseduffield/lazycore/pkg/utils/utils.go ================================================ package utils import ( "log" "os" "path/filepath" ) // Min returns the minimum of two integers func Min(x, y int) int { if x < y { return x } return y } // Max returns the maximum of two integers func Max(x, y int) int { if x > y { return x } return y } // Clamp returns a value x restricted between min and max func Clamp(x int, min int, max int) int { if x < min { return min } else if x > max { return max } return x } // GetLazyRootDirectory finds a lazy project root directory. // // It's used for cheatsheet scripts and integration tests. Not to be confused with finding the // root directory of _any_ random repo. func GetLazyRootDirectory() string { path, err := os.Getwd() if err != nil { panic(err) } for { _, err := os.Stat(filepath.Join(path, ".git")) if err == nil { return path } if !os.IsNotExist(err) { panic(err) } path = filepath.Dir(path) if path == "/" { log.Fatal("must run in lazy project folder or child folder") } } } ================================================ FILE: vendor/github.com/jesseduffield/yaml/.travis.yml ================================================ language: go go: - 1.4 - 1.5 - 1.6 - 1.7 - 1.8 - 1.9 - tip go_import_path: github.com/jesseduffield/yaml ================================================ FILE: vendor/github.com/jesseduffield/yaml/LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor 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, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/github.com/jesseduffield/yaml/LICENSE.libyaml ================================================ 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. ================================================ FILE: vendor/github.com/jesseduffield/yaml/NOTICE ================================================ Copyright 2011-2016 Canonical Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/github.com/jesseduffield/yaml/README.md ================================================ # 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 *github.com/jesseduffield/yaml*. To install it, run: go get github.com/jesseduffield/yaml API documentation ----------------- If opened in a browser, the import path itself leads to the API documentation: * [https://github.com/jesseduffield/yaml](https://github.com/jesseduffield/yaml) 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 Apache License 2.0. Please see the LICENSE file for details. Example ------- ```Go package main import ( "fmt" "log" "github.com/jesseduffield/yaml" ) var data = ` a: Easy! b: c: 2 d: [3, 4] ` // Note: struct fields must be public in order for unmarshal to // correctly populate the data. type T struct { A string B struct { RenamedC int `yaml:"c"` D []int `yaml:",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 ``` ================================================ FILE: vendor/github.com/jesseduffield/yaml/apic.go ================================================ package yaml import ( "io" ) 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 } // Reader read handler. func yaml_reader_read_handler(parser *yaml_parser_t, buffer []byte) (n int, err error) { return parser.input_reader.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_reader(parser *yaml_parser_t, r io.Reader) { if parser.read_handler != nil { panic("must set the input source only once") } parser.read_handler = yaml_reader_read_handler parser.input_reader = r } // 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) { *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), } } // 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 } // yaml_writer_write_handler uses emitter.output_writer to write the // emitted text. func yaml_writer_write_handler(emitter *yaml_emitter_t, buffer []byte) error { _, err := emitter.output_writer.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_writer(emitter *yaml_emitter_t, w io.Writer) { if emitter.write_handler != nil { panic("must set the output target only once") } emitter.write_handler = yaml_writer_write_handler emitter.output_writer = w } // 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) { *event = yaml_event_t{ typ: yaml_STREAM_START_EVENT, encoding: encoding, } } // Create STREAM-END. func yaml_stream_end_event_initialize(event *yaml_event_t) { *event = yaml_event_t{ typ: yaml_STREAM_END_EVENT, } } // 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, ) { *event = yaml_event_t{ typ: yaml_DOCUMENT_START_EVENT, version_directive: version_directive, tag_directives: tag_directives, implicit: implicit, } } // Create DOCUMENT-END. func yaml_document_end_event_initialize(event *yaml_event_t, implicit bool) { *event = yaml_event_t{ typ: yaml_DOCUMENT_END_EVENT, implicit: implicit, } } ///* // * 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) { *event = yaml_event_t{ typ: yaml_MAPPING_START_EVENT, anchor: anchor, tag: tag, implicit: implicit, style: yaml_style_t(style), } } // Create MAPPING-END. func yaml_mapping_end_event_initialize(event *yaml_event_t) { *event = yaml_event_t{ typ: yaml_MAPPING_END_EVENT, } } // 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 compiler 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 //} // // ================================================ FILE: vendor/github.com/jesseduffield/yaml/decode.go ================================================ package yaml import ( "encoding" "encoding/base64" "fmt" "io" "math" "reflect" "strconv" "time" ) const ( documentNode = 1 << iota mappingNode sequenceNode scalarNode aliasNode ) type node struct { kind int line, column int tag string // For an alias node, alias holds the resolved alias. alias *node 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 doneInit bool } 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) return &p } func newParserFromReader(r io.Reader) *parser { p := parser{} if !yaml_parser_initialize(&p.parser) { panic("failed to initialize YAML emitter") } yaml_parser_set_input_reader(&p.parser, r) return &p } func (p *parser) init() { if p.doneInit { return } p.expect(yaml_STREAM_START_EVENT) p.doneInit = true } func (p *parser) destroy() { if p.event.typ != yaml_NO_EVENT { yaml_event_delete(&p.event) } yaml_parser_delete(&p.parser) } // expect consumes an event from the event stream and // checks that it's of the expected type. func (p *parser) expect(e yaml_event_type_t) { if p.event.typ == yaml_NO_EVENT { if !yaml_parser_parse(&p.parser, &p.event) { p.fail() } } if p.event.typ == yaml_STREAM_END_EVENT { failf("attempted to go past the end of stream; corrupted value?") } if p.event.typ != e { p.parser.problem = fmt.Sprintf("expected %s event but got %s", e, p.event.typ) p.fail() } yaml_event_delete(&p.event) p.event.typ = yaml_NO_EVENT } // peek peeks at the next event in the event stream, // puts the results into p.event and returns the event type. func (p *parser) peek() yaml_event_type_t { if p.event.typ != yaml_NO_EVENT { return p.event.typ } if !yaml_parser_parse(&p.parser, &p.event) { p.fail() } return p.event.typ } func (p *parser) fail() { var where string var line int if p.parser.problem_mark.line != 0 { line = p.parser.problem_mark.line // Scanner errors don't iterate line before returning error if p.parser.error == yaml_SCANNER_ERROR { 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 { p.init() switch p.peek() { 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: " + p.event.typ.String()) } } 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.expect(yaml_DOCUMENT_START_EVENT) n.children = append(n.children, p.parse()) p.expect(yaml_DOCUMENT_END_EVENT) return n } func (p *parser) alias() *node { n := p.node(aliasNode) n.value = string(p.event.anchor) n.alias = p.doc.anchors[n.value] if n.alias == nil { failf("unknown anchor '%s' referenced", n.value) } p.expect(yaml_ALIAS_EVENT) 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.expect(yaml_SCALAR_EVENT) return n } func (p *parser) sequence() *node { n := p.node(sequenceNode) p.anchor(n, p.event.anchor) p.expect(yaml_SEQUENCE_START_EVENT) for p.peek() != yaml_SEQUENCE_END_EVENT { n.children = append(n.children, p.parse()) } p.expect(yaml_SEQUENCE_END_EVENT) return n } func (p *parser) mapping() *node { n := p.node(mappingNode) p.anchor(n, p.event.anchor) p.expect(yaml_MAPPING_START_EVENT) for p.peek() != yaml_MAPPING_END_EVENT { n.children = append(n.children, p.parse(), p.parse()) } p.expect(yaml_MAPPING_END_EVENT) return n } // ---------------------------------------------------------------------------- // Decoder, unmarshals a node into a provided value. type decoder struct { doc *node aliases map[*node]bool mapType reflect.Type terrors []string strict bool } var ( mapItemType = reflect.TypeOf(MapItem{}) durationType = reflect.TypeOf(time.Duration(0)) defaultMapType = reflect.TypeOf(map[interface{}]interface{}{}) ifaceType = defaultMapType.Elem() timeType = reflect.TypeOf(time.Time{}) ptrTimeType = reflect.TypeOf(&time.Time{}) ) func newDecoder(strict bool) *decoder { d := &decoder{mapType: defaultMapType, strict: strict} d.aliases = make(map[*node]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 == "~" || n.value == "" && n.implicit) { 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) { if d.aliases[n] { // TODO this could actually be allowed in some circumstances. failf("anchor '%s' value contains itself", n.value) } d.aliases[n] = true good = d.unmarshal(n.alias, out) delete(d.aliases, n) 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) 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 resolvedv := reflect.ValueOf(resolved); out.Type() == resolvedv.Type() { // We've resolved to exactly the type we want, so use that. out.Set(resolvedv) return true } // Perhaps we can use the value as a TextUnmarshaler to // set its value. if out.CanAddr() { u, ok := out.Addr().Interface().(encoding.TextUnmarshaler) if ok { var text []byte if tag == yaml_BINARY_TAG { text = []byte(resolved.(string)) } else { // We let any value be unmarshaled into TextUnmarshaler. // That might be more lax than we'd like, but the // TextUnmarshaler itself should bowl out any dubious values. text = []byte(n.value) } err := u.UnmarshalText(text) if err != nil { fail(err) } return true } } switch out.Kind() { case reflect.String: if tag == yaml_BINARY_TAG { out.SetString(resolved.(string)) return true } if resolved != nil { out.SetString(n.value) return true } case reflect.Interface: if resolved == nil { out.Set(reflect.Zero(out.Type())) } else if tag == yaml_TIMESTAMP_TAG { // It looks like a timestamp but for backward compatibility // reasons we set it as a string, so that code that unmarshals // timestamp-like values into interface{} will continue to // see a string and not a time.Time. // TODO(v3) Drop this. out.Set(reflect.ValueOf(n.value)) } else { out.Set(reflect.ValueOf(resolved)) } return 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)) return true } case int64: if !out.OverflowInt(resolved) { out.SetInt(resolved) return true } case uint64: if resolved <= math.MaxInt64 && !out.OverflowInt(int64(resolved)) { out.SetInt(int64(resolved)) return true } case float64: if resolved <= math.MaxInt64 && !out.OverflowInt(int64(resolved)) { out.SetInt(int64(resolved)) return true } case string: if out.Type() == durationType { d, err := time.ParseDuration(resolved) if err == nil { out.SetInt(int64(d)) return 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)) return true } case int64: if resolved >= 0 && !out.OverflowUint(uint64(resolved)) { out.SetUint(uint64(resolved)) return true } case uint64: if !out.OverflowUint(uint64(resolved)) { out.SetUint(uint64(resolved)) return true } case float64: if resolved <= math.MaxUint64 && !out.OverflowUint(uint64(resolved)) { out.SetUint(uint64(resolved)) return true } } case reflect.Bool: switch resolved := resolved.(type) { case bool: out.SetBool(resolved) return true } case reflect.Float32, reflect.Float64: switch resolved := resolved.(type) { case int: out.SetFloat(float64(resolved)) return true case int64: out.SetFloat(float64(resolved)) return true case uint64: out.SetFloat(float64(resolved)) return true case float64: out.SetFloat(resolved) return true } case reflect.Struct: if resolvedv := reflect.ValueOf(resolved); out.Type() == resolvedv.Type() { out.Set(resolvedv) return 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) return true } } d.terror(n, tag, out) return false } 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.Array: if l != out.Len() { failf("invalid array: want %d elements but got %d", out.Len(), 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++ } } if out.Kind() != reflect.Array { 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) { d.setMapIndex(n.children[i+1], out, k, e) } } } d.mapType = mapType return true } func (d *decoder) setMapIndex(n *node, out, k, v reflect.Value) { if d.strict && out.MapIndex(k) != zeroValue { d.terrors = append(d.terrors, fmt.Sprintf("line %d: key %#v already set in map", n.line+1, k.Interface())) return } out.SetMapIndex(k, v) } 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() } var doneFields []bool if d.strict { doneFields = make([]bool, len(sinfo.FieldsList)) } 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 { if d.strict { if doneFields[info.Id] { d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s already set in type %s", ni.line+1, name.String(), out.Type())) continue } doneFields[info.Id] = true } 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) d.setMapIndex(n.children[i+1], inlineMap, name, value) } else if d.strict { d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s not found in type %s", ni.line+1, name.String(), out.Type())) } } 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) } ================================================ FILE: vendor/github.com/jesseduffield/yaml/emitterc.go ================================================ package yaml import ( "bytes" "fmt" ) // 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, fmt.Sprintf("expected SCALAR, SEQUENCE-START, MAPPING-START, or ALIAS, but got %v", event.typ)) } } // 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 anchor. 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 preceded_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 } preceded_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 preceded_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. preceded_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 } ================================================ FILE: vendor/github.com/jesseduffield/yaml/encode.go ================================================ package yaml import ( "encoding" "fmt" "io" "reflect" "regexp" "sort" "strconv" "strings" "time" "unicode/utf8" ) // jsonNumber is the interface of the encoding/json.Number datatype. // Repeating the interface here avoids a dependency on encoding/json, and also // supports other libraries like jsoniter, which use a similar datatype with // the same interface. Detecting this interface is useful when dealing with // structures containing json.Number, which is a string under the hood. The // encoder should prefer the use of Int64(), Float64() and string(), in that // order, when encoding this type. type jsonNumber interface { Float64() (float64, error) Int64() (int64, error) String() string } type encoder struct { emitter yaml_emitter_t event yaml_event_t out []byte flow bool // doneInit holds whether the initial stream_start_event has been // emitted. doneInit bool // includOmitted tells us whether we want to include fields that were marked as 'omitEmpty' includeOmitted bool } func newEncoder() *encoder { e := &encoder{} yaml_emitter_initialize(&e.emitter) yaml_emitter_set_output_string(&e.emitter, &e.out) yaml_emitter_set_unicode(&e.emitter, true) return e } func newEncoderWithWriter(w io.Writer) *encoder { e := &encoder{} yaml_emitter_initialize(&e.emitter) yaml_emitter_set_output_writer(&e.emitter, w) yaml_emitter_set_unicode(&e.emitter, true) return e } func (e *encoder) init() { if e.doneInit { return } yaml_stream_start_event_initialize(&e.event, yaml_UTF8_ENCODING) e.emit() e.doneInit = true } func (e *encoder) finish() { e.emitter.open_ended = false 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. e.must(yaml_emitter_emit(&e.emitter, &e.event)) } 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) marshalDoc(tag string, in reflect.Value) { e.init() yaml_document_start_event_initialize(&e.event, nil, nil, true) e.emit() e.marshal(tag, in) yaml_document_end_event_initialize(&e.event, true) e.emit() } func (e *encoder) marshal(tag string, in reflect.Value) { if !in.IsValid() || in.Kind() == reflect.Ptr && in.IsNil() { e.nilv() return } iface := in.Interface() switch m := iface.(type) { case jsonNumber: integer, err := m.Int64() if err == nil { // In this case the json.Number is a valid int64 in = reflect.ValueOf(integer) break } float, err := m.Float64() if err == nil { // In this case the json.Number is a valid float64 in = reflect.ValueOf(float) break } // fallback case - no number could be obtained in = reflect.ValueOf(m.String()) case time.Time, *time.Time: // Although time.Time implements TextMarshaler, // we don't want to treat it as a string for YAML // purposes because YAML has special support for // timestamps. case Marshaler: v, err := m.MarshalYAML() if err != nil { fail(err) } if v == nil { e.nilv() return } in = reflect.ValueOf(v) case encoding.TextMarshaler: text, err := m.MarshalText() if err != nil { fail(err) } in = reflect.ValueOf(string(text)) case nil: e.nilv() return } switch in.Kind() { case reflect.Interface: e.marshal(tag, in.Elem()) case reflect.Map: e.mapv(tag, in) case reflect.Ptr: if in.Type() == ptrTimeType { e.timev(tag, in.Elem()) } else { e.marshal(tag, in.Elem()) } case reflect.Struct: if in.Type() == timeType { e.timev(tag, in) } else { e.structv(tag, in) } case reflect.Slice, reflect.Array: 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) && !e.includeOmitted { 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 } yaml_mapping_start_event_initialize(&e.event, nil, []byte(tag), implicit, style) e.emit() f() 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() canUsePlain := true switch { case !utf8.ValidString(s): if tag == yaml_BINARY_TAG { failf("explicitly tagged !!binary data must be base64-encoded") } if tag != "" { failf("cannot marshal invalid UTF-8 data as %s", shortTag(tag)) } // It can't be encoded directly as YAML so use a binary tag // and encode it as base64. tag = yaml_BINARY_TAG s = encodeBase64(s) case tag == "": // Check to see if it would resolve to a specific // tag when encoded unquoted. If it doesn't, // there's no need to quote it. rtag, _ := resolve("", s) canUsePlain = rtag == yaml_STR_TAG && !isBase60Float(s) } // Note: it's possible for user code to emit invalid YAML // if they explicitly specify a tag and a string containing // text that's incompatible with that tag. switch { case strings.Contains(s, "\n"): style = yaml_LITERAL_SCALAR_STYLE case canUsePlain: style = yaml_PLAIN_SCALAR_STYLE default: style = yaml_DOUBLE_QUOTED_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) timev(tag string, in reflect.Value) { t := in.Interface().(time.Time) s := t.Format(time.RFC3339Nano) e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) } func (e *encoder) floatv(tag string, in reflect.Value) { // Issue #352: When formatting, use the precision of the underlying value precision := 64 if in.Kind() == reflect.Float32 { precision = 32 } s := strconv.FormatFloat(in.Float(), 'g', -1, precision) 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() } ================================================ FILE: vendor/github.com/jesseduffield/yaml/parserc.go ================================================ 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") } } // 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 } ================================================ FILE: vendor/github.com/jesseduffield/yaml/readerc.go ================================================ 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") } // [Go] This function was changed to guarantee the requested length size at EOF. // The fact we need to do this is pretty awful, but the description above implies // for that to be the case, and there are tests // 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) { // [Go] ACTUALLY! Read the documentation of this function above. // This is just broken. To return true, we need to have the // given length in the buffer. Not doing that means every single // check that calls this function to make sure the buffer has a // given length is Go) panicking; or C) accessing invalid memory. //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 { low, high = 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) buffer_len += 1 } 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)) buffer_len += 2 } 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)) buffer_len += 3 } 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 += 4 } parser.unread++ } // On EOF, put NUL into the buffer and return. if parser.eof { parser.buffer[buffer_len] = 0 buffer_len++ parser.unread++ break } } // [Go] Read the documentation of this function above. To return true, // we need to have the given length in the buffer. Not doing that means // every single check that calls this function to make sure the buffer // has a given length is Go) panicking; or C) accessing invalid memory. // This happens here due to the EOF above breaking early. for buffer_len < length { parser.buffer[buffer_len] = 0 buffer_len++ } parser.buffer = parser.buffer[:buffer_len] return true } ================================================ FILE: vendor/github.com/jesseduffield/yaml/resolve.go ================================================ package yaml import ( "encoding/base64" "math" "regexp" "strconv" "strings" "time" ) 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, yaml_TIMESTAMP_TAG: return true } return false } var yamlStyleFloat = regexp.MustCompile(`^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$`) 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 case yaml_FLOAT_TAG: if rtag == yaml_INT_TAG { switch v := out.(type) { case int64: rtag = yaml_FLOAT_TAG out = float64(v) return case int: rtag = yaml_FLOAT_TAG out = float64(v) 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. // Only try values as a timestamp if the value is unquoted or there's an explicit // !!timestamp tag. if tag == "" || tag == yaml_TIMESTAMP_TAG { t, ok := parseTimestamp(in) if ok { return yaml_TIMESTAMP_TAG, t } } 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 } if yamlStyleFloat.MatchString(plain) { 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 true || intv == int64(int(intv)) { return yaml_INT_TAG, int(intv) } else { return yaml_INT_TAG, intv } } } default: panic("resolveTable item not yet handled: " + string(rune(hint)) + " (with " + in + ")") } } return yaml_STR_TAG, 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]) } // This is a subset of the formats allowed by the regular expression // defined at http://yaml.org/type/timestamp.html. var allowedTimestampFormats = []string{ "2006-1-2T15:4:5.999999999Z07:00", // RCF3339Nano with short date fields. "2006-1-2t15:4:5.999999999Z07:00", // RFC3339Nano with short date fields and lower-case "t". "2006-1-2 15:4:5.999999999", // space separated with no time zone "2006-1-2", // date only // Notable exception: time.Parse cannot handle: "2001-12-14 21:59:43.10 -5" // from the set of examples. } // parseTimestamp parses s as a timestamp string and // returns the timestamp and reports whether it succeeded. // Timestamp formats are defined at http://yaml.org/type/timestamp.html func parseTimestamp(s string) (time.Time, bool) { // TODO write code to check all the formats supported by // http://yaml.org/type/timestamp.html instead of using time.Parse. // Quick check: all date formats start with YYYY-. i := 0 for ; i < len(s); i++ { if c := s[i]; c < '0' || c > '9' { break } } if i != 4 || i == len(s) || s[i] != '-' { return time.Time{}, false } for _, format := range allowedTimestampFormats { if t, err := time.Parse(format, s); err == nil { return t, true } } return time.Time{}, false } ================================================ FILE: vendor/github.com/jesseduffield/yaml/scannerc.go ================================================ package yaml import ( "bytes" "fmt" ) // Introduction // ************ // // The following notes assume that you are familiar with the YAML specification // (http://yaml.org/spec/1.2/spec.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, problem) } 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 // // 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 indentation 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 indentation 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 unknown 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 && string(s) != "!" { 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 hasTag := len(head) > 0 // 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 } hasTag = true } if !hasTag { 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 indentation 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 indentation indicator equal to 0") return false } // Get the indentation 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 indentation 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 indentation 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 indentation 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 indentation spaces and line breaks for a block scalar. Determine the // indentation 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 indentation spaces and line breaks. max_indent := 0 for { // Eat the indentation 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 indentation. 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 indentation 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 } } if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { 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. 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 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] == '}')) { 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 characters that abuse indentation. 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 violates indentation") 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 indentation 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 } ================================================ FILE: vendor/github.com/jesseduffield/yaml/sorter.go ================================================ 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 if ar[i] == '0' || br[i] == '0' { for j := i-1; j >= 0 && unicode.IsDigit(ar[j]); j-- { if ar[j] != '0' { an = 1 bn = 1 break } } } 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") } ================================================ FILE: vendor/github.com/jesseduffield/yaml/writerc.go ================================================ 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 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 } ================================================ FILE: vendor/github.com/jesseduffield/yaml/yaml.go ================================================ // 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" "io" "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) { return unmarshal(in, out, false) } // UnmarshalStrict is like Unmarshal except that any fields that are found // in the data that do not have corresponding struct members, or mapping // keys that are duplicates, will result in // an error. func UnmarshalStrict(in []byte, out interface{}) (err error) { return unmarshal(in, out, true) } // A Decorder reads and decodes YAML values from an input stream. type Decoder struct { strict bool parser *parser } // NewDecoder returns a new decoder that reads from r. // // The decoder introduces its own buffering and may read // data from r beyond the YAML values requested. func NewDecoder(r io.Reader) *Decoder { return &Decoder{ parser: newParserFromReader(r), } } // SetStrict sets whether strict decoding behaviour is enabled when // decoding items in the data (see UnmarshalStrict). By default, decoding is not strict. func (dec *Decoder) SetStrict(strict bool) { dec.strict = strict } // Decode reads the next YAML-encoded value from its input // and stores it in the value pointed to by v. // // See the documentation for Unmarshal for details about the // conversion of YAML into a Go value. func (dec *Decoder) Decode(v interface{}) (err error) { d := newDecoder(dec.strict) defer handleErr(&err) node := dec.parser.parse() if node == nil { return io.EOF } out := reflect.ValueOf(v) if out.Kind() == reflect.Ptr && !out.IsNil() { out = out.Elem() } d.unmarshal(node, out) if len(d.terrors) > 0 { return &TypeError{d.terrors} } return nil } func unmarshal(in []byte, out interface{}, strict bool) (err error) { defer handleErr(&err) d := newDecoder(strict) 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 marshalled if they are exported (have an upper case // first letter), and are marshalled 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. // Zero valued structs will be omitted if all their public // fields are zero, unless they implement an IsZero // method (see the IsZeroer interface type), in which // case the field will be included if that method returns true. // // 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 `yaml:"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.marshalDoc("", reflect.ValueOf(in)) e.finish() out = e.out return } // An Encoder writes YAML values to an output stream. type Encoder struct { encoder *encoder } // EncoderOption is an option for construcing an encoder type EncoderOption func(*encoder) // IncludeOmitted is for when we want to encode a struct but including fields that were marked to be omitted func IncludeOmitted(e *encoder) { e.includeOmitted = true } // NewEncoder returns a new encoder that writes to w. // The Encoder should be closed after use to flush all data // to w. func NewEncoder(w io.Writer, opts ...EncoderOption) *Encoder { encoder := newEncoderWithWriter(w) for _, opt := range opts { opt(encoder) } return &Encoder{ encoder: encoder, } } // Encode writes the YAML encoding of v to the stream. // If multiple items are encoded to the stream, the // second and subsequent document will be preceded // with a "---" document separator, but the first will not. // // See the documentation for Marshal for details about the conversion of Go // values to YAML. func (e *Encoder) Encode(v interface{}) (err error) { defer handleErr(&err) e.encoder.marshalDoc("", reflect.ValueOf(v)) return nil } // Close closes the encoder by writing any remaining data. // It does not write a stream terminating string "...". func (e *Encoder) Close() (err error) { defer handleErr(&err) e.encoder.finish() return nil } 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 // Id holds the unique field identifier, so we can cheaply // check for field duplicates without maintaining an extra map. Id int // 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 != "" && !field.Anonymous { 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...) } finfo.Id = len(fieldsList) 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) } info.Id = len(fieldsList) fieldsList = append(fieldsList, info) fieldsMap[info.Key] = info } sinfo = &structInfo{ FieldsMap: fieldsMap, FieldsList: fieldsList, InlineMap: inlineMap, } fieldMapMutex.Lock() structMap[st] = sinfo fieldMapMutex.Unlock() return sinfo, nil } // IsZeroer is used to check whether an object is zero to // determine whether it should be omitted when marshaling // with the omitempty flag. One notable implementation // is time.Time. type IsZeroer interface { IsZero() bool } func isZero(v reflect.Value) bool { kind := v.Kind() if z, ok := v.Interface().(IsZeroer); ok { if (kind == reflect.Ptr || kind == reflect.Interface) && v.IsNil() { return true } return z.IsZero() } switch 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 } ================================================ FILE: vendor/github.com/jesseduffield/yaml/yamlh.go ================================================ package yaml import ( "fmt" "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. ) var eventStrings = []string{ yaml_NO_EVENT: "none", yaml_STREAM_START_EVENT: "stream start", yaml_STREAM_END_EVENT: "stream end", yaml_DOCUMENT_START_EVENT: "document start", yaml_DOCUMENT_END_EVENT: "document end", yaml_ALIAS_EVENT: "alias", yaml_SCALAR_EVENT: "scalar", yaml_SEQUENCE_START_EVENT: "sequence start", yaml_SEQUENCE_END_EVENT: "sequence end", yaml_MAPPING_START_EVENT: "mapping start", yaml_MAPPING_END_EVENT: "mapping end", } func (e yaml_event_type_t) String() string { if e < 0 || int(e) >= len(eventStrings) { return fmt.Sprintf("unknown event %d", e) } return eventStrings[e] } // 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 occurred. 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_reader 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_writer 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. } ================================================ FILE: vendor/github.com/jesseduffield/yaml/yamlprivateh.go ================================================ 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 } ================================================ FILE: vendor/github.com/mattn/go-colorable/.travis.yml ================================================ language: go sudo: false go: - 1.13.x - tip before_install: - go get -t -v ./... script: - ./go.test.sh after_success: - bash <(curl -s https://codecov.io/bash) ================================================ FILE: vendor/github.com/mattn/go-colorable/LICENSE ================================================ The MIT License (MIT) Copyright (c) 2016 Yasuhiro Matsumoto 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. ================================================ FILE: vendor/github.com/mattn/go-colorable/README.md ================================================ # go-colorable [![Build Status](https://travis-ci.org/mattn/go-colorable.svg?branch=master)](https://travis-ci.org/mattn/go-colorable) [![Codecov](https://codecov.io/gh/mattn/go-colorable/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-colorable) [![GoDoc](https://godoc.org/github.com/mattn/go-colorable?status.svg)](http://godoc.org/github.com/mattn/go-colorable) [![Go Report Card](https://goreportcard.com/badge/mattn/go-colorable)](https://goreportcard.com/report/mattn/go-colorable) Colorable writer for windows. For example, most of logger packages doesn't show colors on windows. (I know we can do it with ansicon. But I don't want.) This package is possible to handle escape sequence for ansi color on windows. ## Too Bad! ![](https://raw.githubusercontent.com/mattn/go-colorable/gh-pages/bad.png) ## So Good! ![](https://raw.githubusercontent.com/mattn/go-colorable/gh-pages/good.png) ## Usage ```go logrus.SetFormatter(&logrus.TextFormatter{ForceColors: true}) logrus.SetOutput(colorable.NewColorableStdout()) logrus.Info("succeeded") logrus.Warn("not correct") logrus.Error("something error") logrus.Fatal("panic") ``` You can compile above code on non-windows OSs. ## Installation ``` $ go get github.com/mattn/go-colorable ``` # License MIT # Author Yasuhiro Matsumoto (a.k.a mattn) ================================================ FILE: vendor/github.com/mattn/go-colorable/colorable_appengine.go ================================================ // +build appengine package colorable import ( "io" "os" _ "github.com/mattn/go-isatty" ) // NewColorable returns new instance of Writer which handles escape sequence. func NewColorable(file *os.File) io.Writer { if file == nil { panic("nil passed instead of *os.File to NewColorable()") } return file } // NewColorableStdout returns new instance of Writer which handles escape sequence for stdout. func NewColorableStdout() io.Writer { return os.Stdout } // NewColorableStderr returns new instance of Writer which handles escape sequence for stderr. func NewColorableStderr() io.Writer { return os.Stderr } // EnableColorsStdout enable colors if possible. func EnableColorsStdout(enabled *bool) func() { if enabled != nil { *enabled = true } return func() {} } ================================================ FILE: vendor/github.com/mattn/go-colorable/colorable_others.go ================================================ // +build !windows // +build !appengine package colorable import ( "io" "os" _ "github.com/mattn/go-isatty" ) // NewColorable returns new instance of Writer which handles escape sequence. func NewColorable(file *os.File) io.Writer { if file == nil { panic("nil passed instead of *os.File to NewColorable()") } return file } // NewColorableStdout returns new instance of Writer which handles escape sequence for stdout. func NewColorableStdout() io.Writer { return os.Stdout } // NewColorableStderr returns new instance of Writer which handles escape sequence for stderr. func NewColorableStderr() io.Writer { return os.Stderr } // EnableColorsStdout enable colors if possible. func EnableColorsStdout(enabled *bool) func() { if enabled != nil { *enabled = true } return func() {} } ================================================ FILE: vendor/github.com/mattn/go-colorable/colorable_windows.go ================================================ // +build windows // +build !appengine package colorable import ( "bytes" "io" "math" "os" "strconv" "strings" "sync" "syscall" "unsafe" "github.com/mattn/go-isatty" ) const ( foregroundBlue = 0x1 foregroundGreen = 0x2 foregroundRed = 0x4 foregroundIntensity = 0x8 foregroundMask = (foregroundRed | foregroundBlue | foregroundGreen | foregroundIntensity) backgroundBlue = 0x10 backgroundGreen = 0x20 backgroundRed = 0x40 backgroundIntensity = 0x80 backgroundMask = (backgroundRed | backgroundBlue | backgroundGreen | backgroundIntensity) commonLvbUnderscore = 0x8000 cENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x4 ) const ( genericRead = 0x80000000 genericWrite = 0x40000000 ) const ( consoleTextmodeBuffer = 0x1 ) type wchar uint16 type short int16 type dword uint32 type word uint16 type coord struct { x short y short } type smallRect struct { left short top short right short bottom short } type consoleScreenBufferInfo struct { size coord cursorPosition coord attributes word window smallRect maximumWindowSize coord } type consoleCursorInfo struct { size dword visible int32 } var ( kernel32 = syscall.NewLazyDLL("kernel32.dll") procGetConsoleScreenBufferInfo = kernel32.NewProc("GetConsoleScreenBufferInfo") procSetConsoleTextAttribute = kernel32.NewProc("SetConsoleTextAttribute") procSetConsoleCursorPosition = kernel32.NewProc("SetConsoleCursorPosition") procFillConsoleOutputCharacter = kernel32.NewProc("FillConsoleOutputCharacterW") procFillConsoleOutputAttribute = kernel32.NewProc("FillConsoleOutputAttribute") procGetConsoleCursorInfo = kernel32.NewProc("GetConsoleCursorInfo") procSetConsoleCursorInfo = kernel32.NewProc("SetConsoleCursorInfo") procSetConsoleTitle = kernel32.NewProc("SetConsoleTitleW") procGetConsoleMode = kernel32.NewProc("GetConsoleMode") procSetConsoleMode = kernel32.NewProc("SetConsoleMode") procCreateConsoleScreenBuffer = kernel32.NewProc("CreateConsoleScreenBuffer") ) // Writer provides colorable Writer to the console type Writer struct { out io.Writer handle syscall.Handle althandle syscall.Handle oldattr word oldpos coord rest bytes.Buffer mutex sync.Mutex } // NewColorable returns new instance of Writer which handles escape sequence from File. func NewColorable(file *os.File) io.Writer { if file == nil { panic("nil passed instead of *os.File to NewColorable()") } if isatty.IsTerminal(file.Fd()) { var mode uint32 if r, _, _ := procGetConsoleMode.Call(file.Fd(), uintptr(unsafe.Pointer(&mode))); r != 0 && mode&cENABLE_VIRTUAL_TERMINAL_PROCESSING != 0 { return file } var csbi consoleScreenBufferInfo handle := syscall.Handle(file.Fd()) procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) return &Writer{out: file, handle: handle, oldattr: csbi.attributes, oldpos: coord{0, 0}} } return file } // NewColorableStdout returns new instance of Writer which handles escape sequence for stdout. func NewColorableStdout() io.Writer { return NewColorable(os.Stdout) } // NewColorableStderr returns new instance of Writer which handles escape sequence for stderr. func NewColorableStderr() io.Writer { return NewColorable(os.Stderr) } var color256 = map[int]int{ 0: 0x000000, 1: 0x800000, 2: 0x008000, 3: 0x808000, 4: 0x000080, 5: 0x800080, 6: 0x008080, 7: 0xc0c0c0, 8: 0x808080, 9: 0xff0000, 10: 0x00ff00, 11: 0xffff00, 12: 0x0000ff, 13: 0xff00ff, 14: 0x00ffff, 15: 0xffffff, 16: 0x000000, 17: 0x00005f, 18: 0x000087, 19: 0x0000af, 20: 0x0000d7, 21: 0x0000ff, 22: 0x005f00, 23: 0x005f5f, 24: 0x005f87, 25: 0x005faf, 26: 0x005fd7, 27: 0x005fff, 28: 0x008700, 29: 0x00875f, 30: 0x008787, 31: 0x0087af, 32: 0x0087d7, 33: 0x0087ff, 34: 0x00af00, 35: 0x00af5f, 36: 0x00af87, 37: 0x00afaf, 38: 0x00afd7, 39: 0x00afff, 40: 0x00d700, 41: 0x00d75f, 42: 0x00d787, 43: 0x00d7af, 44: 0x00d7d7, 45: 0x00d7ff, 46: 0x00ff00, 47: 0x00ff5f, 48: 0x00ff87, 49: 0x00ffaf, 50: 0x00ffd7, 51: 0x00ffff, 52: 0x5f0000, 53: 0x5f005f, 54: 0x5f0087, 55: 0x5f00af, 56: 0x5f00d7, 57: 0x5f00ff, 58: 0x5f5f00, 59: 0x5f5f5f, 60: 0x5f5f87, 61: 0x5f5faf, 62: 0x5f5fd7, 63: 0x5f5fff, 64: 0x5f8700, 65: 0x5f875f, 66: 0x5f8787, 67: 0x5f87af, 68: 0x5f87d7, 69: 0x5f87ff, 70: 0x5faf00, 71: 0x5faf5f, 72: 0x5faf87, 73: 0x5fafaf, 74: 0x5fafd7, 75: 0x5fafff, 76: 0x5fd700, 77: 0x5fd75f, 78: 0x5fd787, 79: 0x5fd7af, 80: 0x5fd7d7, 81: 0x5fd7ff, 82: 0x5fff00, 83: 0x5fff5f, 84: 0x5fff87, 85: 0x5fffaf, 86: 0x5fffd7, 87: 0x5fffff, 88: 0x870000, 89: 0x87005f, 90: 0x870087, 91: 0x8700af, 92: 0x8700d7, 93: 0x8700ff, 94: 0x875f00, 95: 0x875f5f, 96: 0x875f87, 97: 0x875faf, 98: 0x875fd7, 99: 0x875fff, 100: 0x878700, 101: 0x87875f, 102: 0x878787, 103: 0x8787af, 104: 0x8787d7, 105: 0x8787ff, 106: 0x87af00, 107: 0x87af5f, 108: 0x87af87, 109: 0x87afaf, 110: 0x87afd7, 111: 0x87afff, 112: 0x87d700, 113: 0x87d75f, 114: 0x87d787, 115: 0x87d7af, 116: 0x87d7d7, 117: 0x87d7ff, 118: 0x87ff00, 119: 0x87ff5f, 120: 0x87ff87, 121: 0x87ffaf, 122: 0x87ffd7, 123: 0x87ffff, 124: 0xaf0000, 125: 0xaf005f, 126: 0xaf0087, 127: 0xaf00af, 128: 0xaf00d7, 129: 0xaf00ff, 130: 0xaf5f00, 131: 0xaf5f5f, 132: 0xaf5f87, 133: 0xaf5faf, 134: 0xaf5fd7, 135: 0xaf5fff, 136: 0xaf8700, 137: 0xaf875f, 138: 0xaf8787, 139: 0xaf87af, 140: 0xaf87d7, 141: 0xaf87ff, 142: 0xafaf00, 143: 0xafaf5f, 144: 0xafaf87, 145: 0xafafaf, 146: 0xafafd7, 147: 0xafafff, 148: 0xafd700, 149: 0xafd75f, 150: 0xafd787, 151: 0xafd7af, 152: 0xafd7d7, 153: 0xafd7ff, 154: 0xafff00, 155: 0xafff5f, 156: 0xafff87, 157: 0xafffaf, 158: 0xafffd7, 159: 0xafffff, 160: 0xd70000, 161: 0xd7005f, 162: 0xd70087, 163: 0xd700af, 164: 0xd700d7, 165: 0xd700ff, 166: 0xd75f00, 167: 0xd75f5f, 168: 0xd75f87, 169: 0xd75faf, 170: 0xd75fd7, 171: 0xd75fff, 172: 0xd78700, 173: 0xd7875f, 174: 0xd78787, 175: 0xd787af, 176: 0xd787d7, 177: 0xd787ff, 178: 0xd7af00, 179: 0xd7af5f, 180: 0xd7af87, 181: 0xd7afaf, 182: 0xd7afd7, 183: 0xd7afff, 184: 0xd7d700, 185: 0xd7d75f, 186: 0xd7d787, 187: 0xd7d7af, 188: 0xd7d7d7, 189: 0xd7d7ff, 190: 0xd7ff00, 191: 0xd7ff5f, 192: 0xd7ff87, 193: 0xd7ffaf, 194: 0xd7ffd7, 195: 0xd7ffff, 196: 0xff0000, 197: 0xff005f, 198: 0xff0087, 199: 0xff00af, 200: 0xff00d7, 201: 0xff00ff, 202: 0xff5f00, 203: 0xff5f5f, 204: 0xff5f87, 205: 0xff5faf, 206: 0xff5fd7, 207: 0xff5fff, 208: 0xff8700, 209: 0xff875f, 210: 0xff8787, 211: 0xff87af, 212: 0xff87d7, 213: 0xff87ff, 214: 0xffaf00, 215: 0xffaf5f, 216: 0xffaf87, 217: 0xffafaf, 218: 0xffafd7, 219: 0xffafff, 220: 0xffd700, 221: 0xffd75f, 222: 0xffd787, 223: 0xffd7af, 224: 0xffd7d7, 225: 0xffd7ff, 226: 0xffff00, 227: 0xffff5f, 228: 0xffff87, 229: 0xffffaf, 230: 0xffffd7, 231: 0xffffff, 232: 0x080808, 233: 0x121212, 234: 0x1c1c1c, 235: 0x262626, 236: 0x303030, 237: 0x3a3a3a, 238: 0x444444, 239: 0x4e4e4e, 240: 0x585858, 241: 0x626262, 242: 0x6c6c6c, 243: 0x767676, 244: 0x808080, 245: 0x8a8a8a, 246: 0x949494, 247: 0x9e9e9e, 248: 0xa8a8a8, 249: 0xb2b2b2, 250: 0xbcbcbc, 251: 0xc6c6c6, 252: 0xd0d0d0, 253: 0xdadada, 254: 0xe4e4e4, 255: 0xeeeeee, } // `\033]0;TITLESTR\007` func doTitleSequence(er *bytes.Reader) error { var c byte var err error c, err = er.ReadByte() if err != nil { return err } if c != '0' && c != '2' { return nil } c, err = er.ReadByte() if err != nil { return err } if c != ';' { return nil } title := make([]byte, 0, 80) for { c, err = er.ReadByte() if err != nil { return err } if c == 0x07 || c == '\n' { break } title = append(title, c) } if len(title) > 0 { title8, err := syscall.UTF16PtrFromString(string(title)) if err == nil { procSetConsoleTitle.Call(uintptr(unsafe.Pointer(title8))) } } return nil } // returns Atoi(s) unless s == "" in which case it returns def func atoiWithDefault(s string, def int) (int, error) { if s == "" { return def, nil } return strconv.Atoi(s) } // Write writes data on console func (w *Writer) Write(data []byte) (n int, err error) { w.mutex.Lock() defer w.mutex.Unlock() var csbi consoleScreenBufferInfo procGetConsoleScreenBufferInfo.Call(uintptr(w.handle), uintptr(unsafe.Pointer(&csbi))) handle := w.handle var er *bytes.Reader if w.rest.Len() > 0 { var rest bytes.Buffer w.rest.WriteTo(&rest) w.rest.Reset() rest.Write(data) er = bytes.NewReader(rest.Bytes()) } else { er = bytes.NewReader(data) } var bw [1]byte loop: for { c1, err := er.ReadByte() if err != nil { break loop } if c1 != 0x1b { bw[0] = c1 w.out.Write(bw[:]) continue } c2, err := er.ReadByte() if err != nil { break loop } switch c2 { case '>': continue case ']': w.rest.WriteByte(c1) w.rest.WriteByte(c2) er.WriteTo(&w.rest) if bytes.IndexByte(w.rest.Bytes(), 0x07) == -1 { break loop } er = bytes.NewReader(w.rest.Bytes()[2:]) err := doTitleSequence(er) if err != nil { break loop } w.rest.Reset() continue // https://github.com/mattn/go-colorable/issues/27 case '7': procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) w.oldpos = csbi.cursorPosition continue case '8': procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&w.oldpos))) continue case 0x5b: // execute part after switch default: continue } w.rest.WriteByte(c1) w.rest.WriteByte(c2) er.WriteTo(&w.rest) var buf bytes.Buffer var m byte for i, c := range w.rest.Bytes()[2:] { if ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || c == '@' { m = c er = bytes.NewReader(w.rest.Bytes()[2+i+1:]) w.rest.Reset() break } buf.Write([]byte(string(c))) } if m == 0 { break loop } switch m { case 'A': n, err = atoiWithDefault(buf.String(), 1) if err != nil { continue } procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) csbi.cursorPosition.y -= short(n) procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) case 'B': n, err = atoiWithDefault(buf.String(), 1) if err != nil { continue } procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) csbi.cursorPosition.y += short(n) procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) case 'C': n, err = atoiWithDefault(buf.String(), 1) if err != nil { continue } procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) csbi.cursorPosition.x += short(n) procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) case 'D': n, err = atoiWithDefault(buf.String(), 1) if err != nil { continue } procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) csbi.cursorPosition.x -= short(n) if csbi.cursorPosition.x < 0 { csbi.cursorPosition.x = 0 } procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) case 'E': n, err = strconv.Atoi(buf.String()) if err != nil { continue } procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) csbi.cursorPosition.x = 0 csbi.cursorPosition.y += short(n) procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) case 'F': n, err = strconv.Atoi(buf.String()) if err != nil { continue } procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) csbi.cursorPosition.x = 0 csbi.cursorPosition.y -= short(n) procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) case 'G': n, err = strconv.Atoi(buf.String()) if err != nil { continue } if n < 1 { n = 1 } procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) csbi.cursorPosition.x = short(n - 1) procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) case 'H', 'f': procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) if buf.Len() > 0 { token := strings.Split(buf.String(), ";") switch len(token) { case 1: n1, err := strconv.Atoi(token[0]) if err != nil { continue } csbi.cursorPosition.y = short(n1 - 1) case 2: n1, err := strconv.Atoi(token[0]) if err != nil { continue } n2, err := strconv.Atoi(token[1]) if err != nil { continue } csbi.cursorPosition.x = short(n2 - 1) csbi.cursorPosition.y = short(n1 - 1) } } else { csbi.cursorPosition.y = 0 } procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) case 'J': n := 0 if buf.Len() > 0 { n, err = strconv.Atoi(buf.String()) if err != nil { continue } } var count, written dword var cursor coord procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) switch n { case 0: cursor = coord{x: csbi.cursorPosition.x, y: csbi.cursorPosition.y} count = dword(csbi.size.x) - dword(csbi.cursorPosition.x) + dword(csbi.size.y-csbi.cursorPosition.y)*dword(csbi.size.x) case 1: cursor = coord{x: csbi.window.left, y: csbi.window.top} count = dword(csbi.size.x) - dword(csbi.cursorPosition.x) + dword(csbi.window.top-csbi.cursorPosition.y)*dword(csbi.size.x) case 2: cursor = coord{x: csbi.window.left, y: csbi.window.top} count = dword(csbi.size.x) - dword(csbi.cursorPosition.x) + dword(csbi.size.y-csbi.cursorPosition.y)*dword(csbi.size.x) } procFillConsoleOutputCharacter.Call(uintptr(handle), uintptr(' '), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) procFillConsoleOutputAttribute.Call(uintptr(handle), uintptr(csbi.attributes), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) case 'K': n := 0 if buf.Len() > 0 { n, err = strconv.Atoi(buf.String()) if err != nil { continue } } procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) var cursor coord var count, written dword switch n { case 0: cursor = coord{x: csbi.cursorPosition.x, y: csbi.cursorPosition.y} count = dword(csbi.size.x - csbi.cursorPosition.x) case 1: cursor = coord{x: csbi.window.left, y: csbi.cursorPosition.y} count = dword(csbi.size.x - csbi.cursorPosition.x) case 2: cursor = coord{x: csbi.window.left, y: csbi.cursorPosition.y} count = dword(csbi.size.x) } procFillConsoleOutputCharacter.Call(uintptr(handle), uintptr(' '), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) procFillConsoleOutputAttribute.Call(uintptr(handle), uintptr(csbi.attributes), uintptr(count), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) case 'X': n := 0 if buf.Len() > 0 { n, err = strconv.Atoi(buf.String()) if err != nil { continue } } procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) var cursor coord var written dword cursor = coord{x: csbi.cursorPosition.x, y: csbi.cursorPosition.y} procFillConsoleOutputCharacter.Call(uintptr(handle), uintptr(' '), uintptr(n), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) procFillConsoleOutputAttribute.Call(uintptr(handle), uintptr(csbi.attributes), uintptr(n), *(*uintptr)(unsafe.Pointer(&cursor)), uintptr(unsafe.Pointer(&written))) case 'm': procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) attr := csbi.attributes cs := buf.String() if cs == "" { procSetConsoleTextAttribute.Call(uintptr(handle), uintptr(w.oldattr)) continue } token := strings.Split(cs, ";") for i := 0; i < len(token); i++ { ns := token[i] if n, err = strconv.Atoi(ns); err == nil { switch { case n == 0 || n == 100: attr = w.oldattr case n == 4: attr |= commonLvbUnderscore case (1 <= n && n <= 3) || n == 5: attr |= foregroundIntensity case n == 7 || n == 27: attr = (attr &^ (foregroundMask | backgroundMask)) | ((attr & foregroundMask) << 4) | ((attr & backgroundMask) >> 4) case n == 22: attr &^= foregroundIntensity case n == 24: attr &^= commonLvbUnderscore case 30 <= n && n <= 37: attr &= backgroundMask if (n-30)&1 != 0 { attr |= foregroundRed } if (n-30)&2 != 0 { attr |= foregroundGreen } if (n-30)&4 != 0 { attr |= foregroundBlue } case n == 38: // set foreground color. if i < len(token)-2 && (token[i+1] == "5" || token[i+1] == "05") { if n256, err := strconv.Atoi(token[i+2]); err == nil { if n256foreAttr == nil { n256setup() } attr &= backgroundMask attr |= n256foreAttr[n256%len(n256foreAttr)] i += 2 } } else if len(token) == 5 && token[i+1] == "2" { var r, g, b int r, _ = strconv.Atoi(token[i+2]) g, _ = strconv.Atoi(token[i+3]) b, _ = strconv.Atoi(token[i+4]) i += 4 if r > 127 { attr |= foregroundRed } if g > 127 { attr |= foregroundGreen } if b > 127 { attr |= foregroundBlue } } else { attr = attr & (w.oldattr & backgroundMask) } case n == 39: // reset foreground color. attr &= backgroundMask attr |= w.oldattr & foregroundMask case 40 <= n && n <= 47: attr &= foregroundMask if (n-40)&1 != 0 { attr |= backgroundRed } if (n-40)&2 != 0 { attr |= backgroundGreen } if (n-40)&4 != 0 { attr |= backgroundBlue } case n == 48: // set background color. if i < len(token)-2 && token[i+1] == "5" { if n256, err := strconv.Atoi(token[i+2]); err == nil { if n256backAttr == nil { n256setup() } attr &= foregroundMask attr |= n256backAttr[n256%len(n256backAttr)] i += 2 } } else if len(token) == 5 && token[i+1] == "2" { var r, g, b int r, _ = strconv.Atoi(token[i+2]) g, _ = strconv.Atoi(token[i+3]) b, _ = strconv.Atoi(token[i+4]) i += 4 if r > 127 { attr |= backgroundRed } if g > 127 { attr |= backgroundGreen } if b > 127 { attr |= backgroundBlue } } else { attr = attr & (w.oldattr & foregroundMask) } case n == 49: // reset foreground color. attr &= foregroundMask attr |= w.oldattr & backgroundMask case 90 <= n && n <= 97: attr = (attr & backgroundMask) attr |= foregroundIntensity if (n-90)&1 != 0 { attr |= foregroundRed } if (n-90)&2 != 0 { attr |= foregroundGreen } if (n-90)&4 != 0 { attr |= foregroundBlue } case 100 <= n && n <= 107: attr = (attr & foregroundMask) attr |= backgroundIntensity if (n-100)&1 != 0 { attr |= backgroundRed } if (n-100)&2 != 0 { attr |= backgroundGreen } if (n-100)&4 != 0 { attr |= backgroundBlue } } procSetConsoleTextAttribute.Call(uintptr(handle), uintptr(attr)) } } case 'h': var ci consoleCursorInfo cs := buf.String() if cs == "5>" { procGetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci))) ci.visible = 0 procSetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci))) } else if cs == "?25" { procGetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci))) ci.visible = 1 procSetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci))) } else if cs == "?1049" { if w.althandle == 0 { h, _, _ := procCreateConsoleScreenBuffer.Call(uintptr(genericRead|genericWrite), 0, 0, uintptr(consoleTextmodeBuffer), 0, 0) w.althandle = syscall.Handle(h) if w.althandle != 0 { handle = w.althandle } } } case 'l': var ci consoleCursorInfo cs := buf.String() if cs == "5>" { procGetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci))) ci.visible = 1 procSetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci))) } else if cs == "?25" { procGetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci))) ci.visible = 0 procSetConsoleCursorInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&ci))) } else if cs == "?1049" { if w.althandle != 0 { syscall.CloseHandle(w.althandle) w.althandle = 0 handle = w.handle } } case 's': procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi))) w.oldpos = csbi.cursorPosition case 'u': procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&w.oldpos))) } } return len(data), nil } type consoleColor struct { rgb int red bool green bool blue bool intensity bool } func (c consoleColor) foregroundAttr() (attr word) { if c.red { attr |= foregroundRed } if c.green { attr |= foregroundGreen } if c.blue { attr |= foregroundBlue } if c.intensity { attr |= foregroundIntensity } return } func (c consoleColor) backgroundAttr() (attr word) { if c.red { attr |= backgroundRed } if c.green { attr |= backgroundGreen } if c.blue { attr |= backgroundBlue } if c.intensity { attr |= backgroundIntensity } return } var color16 = []consoleColor{ {0x000000, false, false, false, false}, {0x000080, false, false, true, false}, {0x008000, false, true, false, false}, {0x008080, false, true, true, false}, {0x800000, true, false, false, false}, {0x800080, true, false, true, false}, {0x808000, true, true, false, false}, {0xc0c0c0, true, true, true, false}, {0x808080, false, false, false, true}, {0x0000ff, false, false, true, true}, {0x00ff00, false, true, false, true}, {0x00ffff, false, true, true, true}, {0xff0000, true, false, false, true}, {0xff00ff, true, false, true, true}, {0xffff00, true, true, false, true}, {0xffffff, true, true, true, true}, } type hsv struct { h, s, v float32 } func (a hsv) dist(b hsv) float32 { dh := a.h - b.h switch { case dh > 0.5: dh = 1 - dh case dh < -0.5: dh = -1 - dh } ds := a.s - b.s dv := a.v - b.v return float32(math.Sqrt(float64(dh*dh + ds*ds + dv*dv))) } func toHSV(rgb int) hsv { r, g, b := float32((rgb&0xFF0000)>>16)/256.0, float32((rgb&0x00FF00)>>8)/256.0, float32(rgb&0x0000FF)/256.0 min, max := minmax3f(r, g, b) h := max - min if h > 0 { if max == r { h = (g - b) / h if h < 0 { h += 6 } } else if max == g { h = 2 + (b-r)/h } else { h = 4 + (r-g)/h } } h /= 6.0 s := max - min if max != 0 { s /= max } v := max return hsv{h: h, s: s, v: v} } type hsvTable []hsv func toHSVTable(rgbTable []consoleColor) hsvTable { t := make(hsvTable, len(rgbTable)) for i, c := range rgbTable { t[i] = toHSV(c.rgb) } return t } func (t hsvTable) find(rgb int) consoleColor { hsv := toHSV(rgb) n := 7 l := float32(5.0) for i, p := range t { d := hsv.dist(p) if d < l { l, n = d, i } } return color16[n] } func minmax3f(a, b, c float32) (min, max float32) { if a < b { if b < c { return a, c } else if a < c { return a, b } else { return c, b } } else { if a < c { return b, c } else if b < c { return b, a } else { return c, a } } } var n256foreAttr []word var n256backAttr []word func n256setup() { n256foreAttr = make([]word, 256) n256backAttr = make([]word, 256) t := toHSVTable(color16) for i, rgb := range color256 { c := t.find(rgb) n256foreAttr[i] = c.foregroundAttr() n256backAttr[i] = c.backgroundAttr() } } // EnableColorsStdout enable colors if possible. func EnableColorsStdout(enabled *bool) func() { var mode uint32 h := os.Stdout.Fd() if r, _, _ := procGetConsoleMode.Call(h, uintptr(unsafe.Pointer(&mode))); r != 0 { if r, _, _ = procSetConsoleMode.Call(h, uintptr(mode|cENABLE_VIRTUAL_TERMINAL_PROCESSING)); r != 0 { if enabled != nil { *enabled = true } return func() { procSetConsoleMode.Call(h, uintptr(mode)) } } } if enabled != nil { *enabled = true } return func() {} } ================================================ FILE: vendor/github.com/mattn/go-colorable/go.test.sh ================================================ #!/usr/bin/env bash set -e echo "" > coverage.txt for d in $(go list ./... | grep -v vendor); do go test -race -coverprofile=profile.out -covermode=atomic "$d" if [ -f profile.out ]; then cat profile.out >> coverage.txt rm profile.out fi done ================================================ FILE: vendor/github.com/mattn/go-colorable/noncolorable.go ================================================ package colorable import ( "bytes" "io" ) // NonColorable holds writer but removes escape sequence. type NonColorable struct { out io.Writer } // NewNonColorable returns new instance of Writer which removes escape sequence from Writer. func NewNonColorable(w io.Writer) io.Writer { return &NonColorable{out: w} } // Write writes data on console func (w *NonColorable) Write(data []byte) (n int, err error) { er := bytes.NewReader(data) var bw [1]byte loop: for { c1, err := er.ReadByte() if err != nil { break loop } if c1 != 0x1b { bw[0] = c1 w.out.Write(bw[:]) continue } c2, err := er.ReadByte() if err != nil { break loop } if c2 != 0x5b { continue } var buf bytes.Buffer for { c, err := er.ReadByte() if err != nil { break loop } if ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || c == '@' { break } buf.Write([]byte(string(c))) } } return len(data), nil } ================================================ FILE: vendor/github.com/mattn/go-isatty/.travis.yml ================================================ language: go sudo: false go: - 1.13.x - tip before_install: - go get -t -v ./... script: - ./go.test.sh after_success: - bash <(curl -s https://codecov.io/bash) ================================================ FILE: vendor/github.com/mattn/go-isatty/LICENSE ================================================ Copyright (c) Yasuhiro MATSUMOTO MIT License (Expat) 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. ================================================ FILE: vendor/github.com/mattn/go-isatty/README.md ================================================ # go-isatty [![Godoc Reference](https://godoc.org/github.com/mattn/go-isatty?status.svg)](http://godoc.org/github.com/mattn/go-isatty) [![Codecov](https://codecov.io/gh/mattn/go-isatty/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-isatty) [![Coverage Status](https://coveralls.io/repos/github/mattn/go-isatty/badge.svg?branch=master)](https://coveralls.io/github/mattn/go-isatty?branch=master) [![Go Report Card](https://goreportcard.com/badge/mattn/go-isatty)](https://goreportcard.com/report/mattn/go-isatty) isatty for golang ## Usage ```go package main import ( "fmt" "github.com/mattn/go-isatty" "os" ) func main() { if isatty.IsTerminal(os.Stdout.Fd()) { fmt.Println("Is Terminal") } else if isatty.IsCygwinTerminal(os.Stdout.Fd()) { fmt.Println("Is Cygwin/MSYS2 Terminal") } else { fmt.Println("Is Not Terminal") } } ``` ## Installation ``` $ go get github.com/mattn/go-isatty ``` ## License MIT ## Author Yasuhiro Matsumoto (a.k.a mattn) ## Thanks * k-takata: base idea for IsCygwinTerminal https://github.com/k-takata/go-iscygpty ================================================ FILE: vendor/github.com/mattn/go-isatty/doc.go ================================================ // Package isatty implements interface to isatty package isatty ================================================ FILE: vendor/github.com/mattn/go-isatty/go.test.sh ================================================ #!/usr/bin/env bash set -e echo "" > coverage.txt for d in $(go list ./... | grep -v vendor); do go test -race -coverprofile=profile.out -covermode=atomic "$d" if [ -f profile.out ]; then cat profile.out >> coverage.txt rm profile.out fi done ================================================ FILE: vendor/github.com/mattn/go-isatty/isatty_bsd.go ================================================ // +build darwin freebsd openbsd netbsd dragonfly // +build !appengine package isatty import "golang.org/x/sys/unix" // IsTerminal return true if the file descriptor is terminal. func IsTerminal(fd uintptr) bool { _, err := unix.IoctlGetTermios(int(fd), unix.TIOCGETA) return err == nil } // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 // terminal. This is also always false on this environment. func IsCygwinTerminal(fd uintptr) bool { return false } ================================================ FILE: vendor/github.com/mattn/go-isatty/isatty_others.go ================================================ // +build appengine js nacl package isatty // IsTerminal returns true if the file descriptor is terminal which // is always false on js and appengine classic which is a sandboxed PaaS. func IsTerminal(fd uintptr) bool { return false } // IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2 // terminal. This is also always false on this environment. func IsCygwinTerminal(fd uintptr) bool { return false } ================================================ FILE: vendor/github.com/mattn/go-isatty/isatty_plan9.go ================================================ // +build plan9 package isatty import ( "syscall" ) // IsTerminal returns true if the given file descriptor is a terminal. func IsTerminal(fd uintptr) bool { path, err := syscall.Fd2path(int(fd)) if err != nil { return false } return path == "/dev/cons" || path == "/mnt/term/dev/cons" } // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 // terminal. This is also always false on this environment. func IsCygwinTerminal(fd uintptr) bool { return false } ================================================ FILE: vendor/github.com/mattn/go-isatty/isatty_solaris.go ================================================ // +build solaris // +build !appengine package isatty import ( "golang.org/x/sys/unix" ) // IsTerminal returns true if the given file descriptor is a terminal. // see: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libbc/libc/gen/common/isatty.c func IsTerminal(fd uintptr) bool { var termio unix.Termio err := unix.IoctlSetTermio(int(fd), unix.TCGETA, &termio) return err == nil } // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 // terminal. This is also always false on this environment. func IsCygwinTerminal(fd uintptr) bool { return false } ================================================ FILE: vendor/github.com/mattn/go-isatty/isatty_tcgets.go ================================================ // +build linux aix // +build !appengine package isatty import "golang.org/x/sys/unix" // IsTerminal return true if the file descriptor is terminal. func IsTerminal(fd uintptr) bool { _, err := unix.IoctlGetTermios(int(fd), unix.TCGETS) return err == nil } // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 // terminal. This is also always false on this environment. func IsCygwinTerminal(fd uintptr) bool { return false } ================================================ FILE: vendor/github.com/mattn/go-isatty/isatty_windows.go ================================================ // +build windows // +build !appengine package isatty import ( "errors" "strings" "syscall" "unicode/utf16" "unsafe" ) const ( objectNameInfo uintptr = 1 fileNameInfo = 2 fileTypePipe = 3 ) var ( kernel32 = syscall.NewLazyDLL("kernel32.dll") ntdll = syscall.NewLazyDLL("ntdll.dll") procGetConsoleMode = kernel32.NewProc("GetConsoleMode") procGetFileInformationByHandleEx = kernel32.NewProc("GetFileInformationByHandleEx") procGetFileType = kernel32.NewProc("GetFileType") procNtQueryObject = ntdll.NewProc("NtQueryObject") ) func init() { // Check if GetFileInformationByHandleEx is available. if procGetFileInformationByHandleEx.Find() != nil { procGetFileInformationByHandleEx = nil } } // IsTerminal return true if the file descriptor is terminal. func IsTerminal(fd uintptr) bool { var st uint32 r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, fd, uintptr(unsafe.Pointer(&st)), 0) return r != 0 && e == 0 } // Check pipe name is used for cygwin/msys2 pty. // Cygwin/MSYS2 PTY has a name like: // \{cygwin,msys}-XXXXXXXXXXXXXXXX-ptyN-{from,to}-master func isCygwinPipeName(name string) bool { token := strings.Split(name, "-") if len(token) < 5 { return false } if token[0] != `\msys` && token[0] != `\cygwin` && token[0] != `\Device\NamedPipe\msys` && token[0] != `\Device\NamedPipe\cygwin` { return false } if token[1] == "" { return false } if !strings.HasPrefix(token[2], "pty") { return false } if token[3] != `from` && token[3] != `to` { return false } if token[4] != "master" { return false } return true } // getFileNameByHandle use the undocomented ntdll NtQueryObject to get file full name from file handler // since GetFileInformationByHandleEx is not avilable under windows Vista and still some old fashion // guys are using Windows XP, this is a workaround for those guys, it will also work on system from // Windows vista to 10 // see https://stackoverflow.com/a/18792477 for details func getFileNameByHandle(fd uintptr) (string, error) { if procNtQueryObject == nil { return "", errors.New("ntdll.dll: NtQueryObject not supported") } var buf [4 + syscall.MAX_PATH]uint16 var result int r, _, e := syscall.Syscall6(procNtQueryObject.Addr(), 5, fd, objectNameInfo, uintptr(unsafe.Pointer(&buf)), uintptr(2*len(buf)), uintptr(unsafe.Pointer(&result)), 0) if r != 0 { return "", e } return string(utf16.Decode(buf[4 : 4+buf[0]/2])), nil } // IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2 // terminal. func IsCygwinTerminal(fd uintptr) bool { if procGetFileInformationByHandleEx == nil { name, err := getFileNameByHandle(fd) if err != nil { return false } return isCygwinPipeName(name) } // Cygwin/msys's pty is a pipe. ft, _, e := syscall.Syscall(procGetFileType.Addr(), 1, fd, 0, 0) if ft != fileTypePipe || e != 0 { return false } var buf [2 + syscall.MAX_PATH]uint16 r, _, e := syscall.Syscall6(procGetFileInformationByHandleEx.Addr(), 4, fd, fileNameInfo, uintptr(unsafe.Pointer(&buf)), uintptr(len(buf)*2), 0, 0) if r == 0 || e != 0 { return false } l := *(*uint32)(unsafe.Pointer(&buf)) return isCygwinPipeName(string(utf16.Decode(buf[2 : 2+l/2]))) } ================================================ FILE: vendor/github.com/mattn/go-isatty/renovate.json ================================================ { "extends": [ "config:base" ], "postUpdateOptions": [ "gomodTidy" ] } ================================================ FILE: vendor/github.com/mattn/go-runewidth/LICENSE ================================================ The MIT License (MIT) Copyright (c) 2016 Yasuhiro Matsumoto 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. ================================================ FILE: vendor/github.com/mattn/go-runewidth/README.md ================================================ go-runewidth ============ [![Build Status](https://github.com/mattn/go-runewidth/workflows/test/badge.svg?branch=master)](https://github.com/mattn/go-runewidth/actions?query=workflow%3Atest) [![Codecov](https://codecov.io/gh/mattn/go-runewidth/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-runewidth) [![GoDoc](https://godoc.org/github.com/mattn/go-runewidth?status.svg)](http://godoc.org/github.com/mattn/go-runewidth) [![Go Report Card](https://goreportcard.com/badge/github.com/mattn/go-runewidth)](https://goreportcard.com/report/github.com/mattn/go-runewidth) Provides functions to get fixed width of the character or string. Usage ----- ```go runewidth.StringWidth("つのだ☆HIRO") == 12 ``` Author ------ Yasuhiro Matsumoto License ------- under the MIT License: http://mattn.mit-license.org/2013 ================================================ FILE: vendor/github.com/mattn/go-runewidth/runewidth.go ================================================ package runewidth import ( "os" "strings" "github.com/rivo/uniseg" ) //go:generate go run script/generate.go var ( // EastAsianWidth will be set true if the current locale is CJK EastAsianWidth bool // StrictEmojiNeutral should be set false if handle broken fonts StrictEmojiNeutral bool = true // DefaultCondition is a condition in current locale DefaultCondition = &Condition{ EastAsianWidth: false, StrictEmojiNeutral: true, } ) func init() { handleEnv() } func handleEnv() { env := os.Getenv("RUNEWIDTH_EASTASIAN") if env == "" { EastAsianWidth = IsEastAsian() } else { EastAsianWidth = env == "1" } // update DefaultCondition if DefaultCondition.EastAsianWidth != EastAsianWidth { DefaultCondition.EastAsianWidth = EastAsianWidth if len(DefaultCondition.combinedLut) > 0 { DefaultCondition.combinedLut = DefaultCondition.combinedLut[:0] CreateLUT() } } } type interval struct { first rune last rune } type table []interval func inTables(r rune, ts ...table) bool { for _, t := range ts { if inTable(r, t) { return true } } return false } func inTable(r rune, t table) bool { if r < t[0].first { return false } bot := 0 top := len(t) - 1 for top >= bot { mid := (bot + top) >> 1 switch { case t[mid].last < r: bot = mid + 1 case t[mid].first > r: top = mid - 1 default: return true } } return false } var private = table{ {0x00E000, 0x00F8FF}, {0x0F0000, 0x0FFFFD}, {0x100000, 0x10FFFD}, } var nonprint = table{ {0x0000, 0x001F}, {0x007F, 0x009F}, {0x00AD, 0x00AD}, {0x070F, 0x070F}, {0x180B, 0x180E}, {0x200B, 0x200F}, {0x2028, 0x202E}, {0x206A, 0x206F}, {0xD800, 0xDFFF}, {0xFEFF, 0xFEFF}, {0xFFF9, 0xFFFB}, {0xFFFE, 0xFFFF}, } // Condition have flag EastAsianWidth whether the current locale is CJK or not. type Condition struct { combinedLut []byte EastAsianWidth bool StrictEmojiNeutral bool } // NewCondition return new instance of Condition which is current locale. func NewCondition() *Condition { return &Condition{ EastAsianWidth: EastAsianWidth, StrictEmojiNeutral: StrictEmojiNeutral, } } // RuneWidth returns the number of cells in r. // See http://www.unicode.org/reports/tr11/ func (c *Condition) RuneWidth(r rune) int { if r < 0 || r > 0x10FFFF { return 0 } if len(c.combinedLut) > 0 { return int(c.combinedLut[r>>1]>>(uint(r&1)*4)) & 3 } // optimized version, verified by TestRuneWidthChecksums() if !c.EastAsianWidth { switch { case r < 0x20: return 0 case (r >= 0x7F && r <= 0x9F) || r == 0xAD: // nonprint return 0 case r < 0x300: return 1 case inTable(r, narrow): return 1 case inTables(r, nonprint, combining): return 0 case inTable(r, doublewidth): return 2 default: return 1 } } else { switch { case inTables(r, nonprint, combining): return 0 case inTable(r, narrow): return 1 case inTables(r, ambiguous, doublewidth): return 2 case !c.StrictEmojiNeutral && inTables(r, ambiguous, emoji, narrow): return 2 default: return 1 } } } // CreateLUT will create an in-memory lookup table of 557056 bytes for faster operation. // This should not be called concurrently with other operations on c. // If options in c is changed, CreateLUT should be called again. func (c *Condition) CreateLUT() { const max = 0x110000 lut := c.combinedLut if len(c.combinedLut) != 0 { // Remove so we don't use it. c.combinedLut = nil } else { lut = make([]byte, max/2) } for i := range lut { i32 := int32(i * 2) x0 := c.RuneWidth(i32) x1 := c.RuneWidth(i32 + 1) lut[i] = uint8(x0) | uint8(x1)<<4 } c.combinedLut = lut } // StringWidth return width as you can see func (c *Condition) StringWidth(s string) (width int) { g := uniseg.NewGraphemes(s) for g.Next() { var chWidth int for _, r := range g.Runes() { chWidth = c.RuneWidth(r) if chWidth > 0 { break // Our best guess at this point is to use the width of the first non-zero-width rune. } } width += chWidth } return } // Truncate return string truncated with w cells func (c *Condition) Truncate(s string, w int, tail string) string { if c.StringWidth(s) <= w { return s } w -= c.StringWidth(tail) var width int pos := len(s) g := uniseg.NewGraphemes(s) for g.Next() { var chWidth int for _, r := range g.Runes() { chWidth = c.RuneWidth(r) if chWidth > 0 { break // See StringWidth() for details. } } if width+chWidth > w { pos, _ = g.Positions() break } width += chWidth } return s[:pos] + tail } // TruncateLeft cuts w cells from the beginning of the `s`. func (c *Condition) TruncateLeft(s string, w int, prefix string) string { if c.StringWidth(s) <= w { return prefix } var width int pos := len(s) g := uniseg.NewGraphemes(s) for g.Next() { var chWidth int for _, r := range g.Runes() { chWidth = c.RuneWidth(r) if chWidth > 0 { break // See StringWidth() for details. } } if width+chWidth > w { if width < w { _, pos = g.Positions() prefix += strings.Repeat(" ", width+chWidth-w) } else { pos, _ = g.Positions() } break } width += chWidth } return prefix + s[pos:] } // Wrap return string wrapped with w cells func (c *Condition) Wrap(s string, w int) string { width := 0 out := "" for _, r := range s { cw := c.RuneWidth(r) if r == '\n' { out += string(r) width = 0 continue } else if width+cw > w { out += "\n" width = 0 out += string(r) width += cw continue } out += string(r) width += cw } return out } // FillLeft return string filled in left by spaces in w cells func (c *Condition) FillLeft(s string, w int) string { width := c.StringWidth(s) count := w - width if count > 0 { b := make([]byte, count) for i := range b { b[i] = ' ' } return string(b) + s } return s } // FillRight return string filled in left by spaces in w cells func (c *Condition) FillRight(s string, w int) string { width := c.StringWidth(s) count := w - width if count > 0 { b := make([]byte, count) for i := range b { b[i] = ' ' } return s + string(b) } return s } // RuneWidth returns the number of cells in r. // See http://www.unicode.org/reports/tr11/ func RuneWidth(r rune) int { return DefaultCondition.RuneWidth(r) } // IsAmbiguousWidth returns whether is ambiguous width or not. func IsAmbiguousWidth(r rune) bool { return inTables(r, private, ambiguous) } // IsNeutralWidth returns whether is neutral width or not. func IsNeutralWidth(r rune) bool { return inTable(r, neutral) } // StringWidth return width as you can see func StringWidth(s string) (width int) { return DefaultCondition.StringWidth(s) } // Truncate return string truncated with w cells func Truncate(s string, w int, tail string) string { return DefaultCondition.Truncate(s, w, tail) } // TruncateLeft cuts w cells from the beginning of the `s`. func TruncateLeft(s string, w int, prefix string) string { return DefaultCondition.TruncateLeft(s, w, prefix) } // Wrap return string wrapped with w cells func Wrap(s string, w int) string { return DefaultCondition.Wrap(s, w) } // FillLeft return string filled in left by spaces in w cells func FillLeft(s string, w int) string { return DefaultCondition.FillLeft(s, w) } // FillRight return string filled in left by spaces in w cells func FillRight(s string, w int) string { return DefaultCondition.FillRight(s, w) } // CreateLUT will create an in-memory lookup table of 557055 bytes for faster operation. // This should not be called concurrently with other operations. func CreateLUT() { if len(DefaultCondition.combinedLut) > 0 { return } DefaultCondition.CreateLUT() } ================================================ FILE: vendor/github.com/mattn/go-runewidth/runewidth_appengine.go ================================================ //go:build appengine // +build appengine package runewidth // IsEastAsian return true if the current locale is CJK func IsEastAsian() bool { return false } ================================================ FILE: vendor/github.com/mattn/go-runewidth/runewidth_js.go ================================================ //go:build js && !appengine // +build js,!appengine package runewidth func IsEastAsian() bool { // TODO: Implement this for the web. Detect east asian in a compatible way, and return true. return false } ================================================ FILE: vendor/github.com/mattn/go-runewidth/runewidth_posix.go ================================================ //go:build !windows && !js && !appengine // +build !windows,!js,!appengine package runewidth import ( "os" "regexp" "strings" ) var reLoc = regexp.MustCompile(`^[a-z][a-z][a-z]?(?:_[A-Z][A-Z])?\.(.+)`) var mblenTable = map[string]int{ "utf-8": 6, "utf8": 6, "jis": 8, "eucjp": 3, "euckr": 2, "euccn": 2, "sjis": 2, "cp932": 2, "cp51932": 2, "cp936": 2, "cp949": 2, "cp950": 2, "big5": 2, "gbk": 2, "gb2312": 2, } func isEastAsian(locale string) bool { charset := strings.ToLower(locale) r := reLoc.FindStringSubmatch(locale) if len(r) == 2 { charset = strings.ToLower(r[1]) } if strings.HasSuffix(charset, "@cjk_narrow") { return false } for pos, b := range []byte(charset) { if b == '@' { charset = charset[:pos] break } } max := 1 if m, ok := mblenTable[charset]; ok { max = m } if max > 1 && (charset[0] != 'u' || strings.HasPrefix(locale, "ja") || strings.HasPrefix(locale, "ko") || strings.HasPrefix(locale, "zh")) { return true } return false } // IsEastAsian return true if the current locale is CJK func IsEastAsian() bool { locale := os.Getenv("LC_ALL") if locale == "" { locale = os.Getenv("LC_CTYPE") } if locale == "" { locale = os.Getenv("LANG") } // ignore C locale if locale == "POSIX" || locale == "C" { return false } if len(locale) > 1 && locale[0] == 'C' && (locale[1] == '.' || locale[1] == '-') { return false } return isEastAsian(locale) } ================================================ FILE: vendor/github.com/mattn/go-runewidth/runewidth_table.go ================================================ // Code generated by script/generate.go. DO NOT EDIT. package runewidth var combining = table{ {0x0300, 0x036F}, {0x0483, 0x0489}, {0x07EB, 0x07F3}, {0x0C00, 0x0C00}, {0x0C04, 0x0C04}, {0x0D00, 0x0D01}, {0x135D, 0x135F}, {0x1A7F, 0x1A7F}, {0x1AB0, 0x1AC0}, {0x1B6B, 0x1B73}, {0x1DC0, 0x1DF9}, {0x1DFB, 0x1DFF}, {0x20D0, 0x20F0}, {0x2CEF, 0x2CF1}, {0x2DE0, 0x2DFF}, {0x3099, 0x309A}, {0xA66F, 0xA672}, {0xA674, 0xA67D}, {0xA69E, 0xA69F}, {0xA6F0, 0xA6F1}, {0xA8E0, 0xA8F1}, {0xFE20, 0xFE2F}, {0x101FD, 0x101FD}, {0x10376, 0x1037A}, {0x10EAB, 0x10EAC}, {0x10F46, 0x10F50}, {0x11300, 0x11301}, {0x1133B, 0x1133C}, {0x11366, 0x1136C}, {0x11370, 0x11374}, {0x16AF0, 0x16AF4}, {0x1D165, 0x1D169}, {0x1D16D, 0x1D172}, {0x1D17B, 0x1D182}, {0x1D185, 0x1D18B}, {0x1D1AA, 0x1D1AD}, {0x1D242, 0x1D244}, {0x1E000, 0x1E006}, {0x1E008, 0x1E018}, {0x1E01B, 0x1E021}, {0x1E023, 0x1E024}, {0x1E026, 0x1E02A}, {0x1E8D0, 0x1E8D6}, } var doublewidth = table{ {0x1100, 0x115F}, {0x231A, 0x231B}, {0x2329, 0x232A}, {0x23E9, 0x23EC}, {0x23F0, 0x23F0}, {0x23F3, 0x23F3}, {0x25FD, 0x25FE}, {0x2614, 0x2615}, {0x2648, 0x2653}, {0x267F, 0x267F}, {0x2693, 0x2693}, {0x26A1, 0x26A1}, {0x26AA, 0x26AB}, {0x26BD, 0x26BE}, {0x26C4, 0x26C5}, {0x26CE, 0x26CE}, {0x26D4, 0x26D4}, {0x26EA, 0x26EA}, {0x26F2, 0x26F3}, {0x26F5, 0x26F5}, {0x26FA, 0x26FA}, {0x26FD, 0x26FD}, {0x2705, 0x2705}, {0x270A, 0x270B}, {0x2728, 0x2728}, {0x274C, 0x274C}, {0x274E, 0x274E}, {0x2753, 0x2755}, {0x2757, 0x2757}, {0x2795, 0x2797}, {0x27B0, 0x27B0}, {0x27BF, 0x27BF}, {0x2B1B, 0x2B1C}, {0x2B50, 0x2B50}, {0x2B55, 0x2B55}, {0x2E80, 0x2E99}, {0x2E9B, 0x2EF3}, {0x2F00, 0x2FD5}, {0x2FF0, 0x2FFB}, {0x3000, 0x303E}, {0x3041, 0x3096}, {0x3099, 0x30FF}, {0x3105, 0x312F}, {0x3131, 0x318E}, {0x3190, 0x31E3}, {0x31F0, 0x321E}, {0x3220, 0x3247}, {0x3250, 0x4DBF}, {0x4E00, 0xA48C}, {0xA490, 0xA4C6}, {0xA960, 0xA97C}, {0xAC00, 0xD7A3}, {0xF900, 0xFAFF}, {0xFE10, 0xFE19}, {0xFE30, 0xFE52}, {0xFE54, 0xFE66}, {0xFE68, 0xFE6B}, {0xFF01, 0xFF60}, {0xFFE0, 0xFFE6}, {0x16FE0, 0x16FE4}, {0x16FF0, 0x16FF1}, {0x17000, 0x187F7}, {0x18800, 0x18CD5}, {0x18D00, 0x18D08}, {0x1B000, 0x1B11E}, {0x1B150, 0x1B152}, {0x1B164, 0x1B167}, {0x1B170, 0x1B2FB}, {0x1F004, 0x1F004}, {0x1F0CF, 0x1F0CF}, {0x1F18E, 0x1F18E}, {0x1F191, 0x1F19A}, {0x1F200, 0x1F202}, {0x1F210, 0x1F23B}, {0x1F240, 0x1F248}, {0x1F250, 0x1F251}, {0x1F260, 0x1F265}, {0x1F300, 0x1F320}, {0x1F32D, 0x1F335}, {0x1F337, 0x1F37C}, {0x1F37E, 0x1F393}, {0x1F3A0, 0x1F3CA}, {0x1F3CF, 0x1F3D3}, {0x1F3E0, 0x1F3F0}, {0x1F3F4, 0x1F3F4}, {0x1F3F8, 0x1F43E}, {0x1F440, 0x1F440}, {0x1F442, 0x1F4FC}, {0x1F4FF, 0x1F53D}, {0x1F54B, 0x1F54E}, {0x1F550, 0x1F567}, {0x1F57A, 0x1F57A}, {0x1F595, 0x1F596}, {0x1F5A4, 0x1F5A4}, {0x1F5FB, 0x1F64F}, {0x1F680, 0x1F6C5}, {0x1F6CC, 0x1F6CC}, {0x1F6D0, 0x1F6D2}, {0x1F6D5, 0x1F6D7}, {0x1F6EB, 0x1F6EC}, {0x1F6F4, 0x1F6FC}, {0x1F7E0, 0x1F7EB}, {0x1F90C, 0x1F93A}, {0x1F93C, 0x1F945}, {0x1F947, 0x1F978}, {0x1F97A, 0x1F9CB}, {0x1F9CD, 0x1F9FF}, {0x1FA70, 0x1FA74}, {0x1FA78, 0x1FA7A}, {0x1FA80, 0x1FA86}, {0x1FA90, 0x1FAA8}, {0x1FAB0, 0x1FAB6}, {0x1FAC0, 0x1FAC2}, {0x1FAD0, 0x1FAD6}, {0x20000, 0x2FFFD}, {0x30000, 0x3FFFD}, } var ambiguous = table{ {0x00A1, 0x00A1}, {0x00A4, 0x00A4}, {0x00A7, 0x00A8}, {0x00AA, 0x00AA}, {0x00AD, 0x00AE}, {0x00B0, 0x00B4}, {0x00B6, 0x00BA}, {0x00BC, 0x00BF}, {0x00C6, 0x00C6}, {0x00D0, 0x00D0}, {0x00D7, 0x00D8}, {0x00DE, 0x00E1}, {0x00E6, 0x00E6}, {0x00E8, 0x00EA}, {0x00EC, 0x00ED}, {0x00F0, 0x00F0}, {0x00F2, 0x00F3}, {0x00F7, 0x00FA}, {0x00FC, 0x00FC}, {0x00FE, 0x00FE}, {0x0101, 0x0101}, {0x0111, 0x0111}, {0x0113, 0x0113}, {0x011B, 0x011B}, {0x0126, 0x0127}, {0x012B, 0x012B}, {0x0131, 0x0133}, {0x0138, 0x0138}, {0x013F, 0x0142}, {0x0144, 0x0144}, {0x0148, 0x014B}, {0x014D, 0x014D}, {0x0152, 0x0153}, {0x0166, 0x0167}, {0x016B, 0x016B}, {0x01CE, 0x01CE}, {0x01D0, 0x01D0}, {0x01D2, 0x01D2}, {0x01D4, 0x01D4}, {0x01D6, 0x01D6}, {0x01D8, 0x01D8}, {0x01DA, 0x01DA}, {0x01DC, 0x01DC}, {0x0251, 0x0251}, {0x0261, 0x0261}, {0x02C4, 0x02C4}, {0x02C7, 0x02C7}, {0x02C9, 0x02CB}, {0x02CD, 0x02CD}, {0x02D0, 0x02D0}, {0x02D8, 0x02DB}, {0x02DD, 0x02DD}, {0x02DF, 0x02DF}, {0x0300, 0x036F}, {0x0391, 0x03A1}, {0x03A3, 0x03A9}, {0x03B1, 0x03C1}, {0x03C3, 0x03C9}, {0x0401, 0x0401}, {0x0410, 0x044F}, {0x0451, 0x0451}, {0x2010, 0x2010}, {0x2013, 0x2016}, {0x2018, 0x2019}, {0x201C, 0x201D}, {0x2020, 0x2022}, {0x2024, 0x2027}, {0x2030, 0x2030}, {0x2032, 0x2033}, {0x2035, 0x2035}, {0x203B, 0x203B}, {0x203E, 0x203E}, {0x2074, 0x2074}, {0x207F, 0x207F}, {0x2081, 0x2084}, {0x20AC, 0x20AC}, {0x2103, 0x2103}, {0x2105, 0x2105}, {0x2109, 0x2109}, {0x2113, 0x2113}, {0x2116, 0x2116}, {0x2121, 0x2122}, {0x2126, 0x2126}, {0x212B, 0x212B}, {0x2153, 0x2154}, {0x215B, 0x215E}, {0x2160, 0x216B}, {0x2170, 0x2179}, {0x2189, 0x2189}, {0x2190, 0x2199}, {0x21B8, 0x21B9}, {0x21D2, 0x21D2}, {0x21D4, 0x21D4}, {0x21E7, 0x21E7}, {0x2200, 0x2200}, {0x2202, 0x2203}, {0x2207, 0x2208}, {0x220B, 0x220B}, {0x220F, 0x220F}, {0x2211, 0x2211}, {0x2215, 0x2215}, {0x221A, 0x221A}, {0x221D, 0x2220}, {0x2223, 0x2223}, {0x2225, 0x2225}, {0x2227, 0x222C}, {0x222E, 0x222E}, {0x2234, 0x2237}, {0x223C, 0x223D}, {0x2248, 0x2248}, {0x224C, 0x224C}, {0x2252, 0x2252}, {0x2260, 0x2261}, {0x2264, 0x2267}, {0x226A, 0x226B}, {0x226E, 0x226F}, {0x2282, 0x2283}, {0x2286, 0x2287}, {0x2295, 0x2295}, {0x2299, 0x2299}, {0x22A5, 0x22A5}, {0x22BF, 0x22BF}, {0x2312, 0x2312}, {0x2460, 0x24E9}, {0x24EB, 0x254B}, {0x2550, 0x2573}, {0x2580, 0x258F}, {0x2592, 0x2595}, {0x25A0, 0x25A1}, {0x25A3, 0x25A9}, {0x25B2, 0x25B3}, {0x25B6, 0x25B7}, {0x25BC, 0x25BD}, {0x25C0, 0x25C1}, {0x25C6, 0x25C8}, {0x25CB, 0x25CB}, {0x25CE, 0x25D1}, {0x25E2, 0x25E5}, {0x25EF, 0x25EF}, {0x2605, 0x2606}, {0x2609, 0x2609}, {0x260E, 0x260F}, {0x261C, 0x261C}, {0x261E, 0x261E}, {0x2640, 0x2640}, {0x2642, 0x2642}, {0x2660, 0x2661}, {0x2663, 0x2665}, {0x2667, 0x266A}, {0x266C, 0x266D}, {0x266F, 0x266F}, {0x269E, 0x269F}, {0x26BF, 0x26BF}, {0x26C6, 0x26CD}, {0x26CF, 0x26D3}, {0x26D5, 0x26E1}, {0x26E3, 0x26E3}, {0x26E8, 0x26E9}, {0x26EB, 0x26F1}, {0x26F4, 0x26F4}, {0x26F6, 0x26F9}, {0x26FB, 0x26FC}, {0x26FE, 0x26FF}, {0x273D, 0x273D}, {0x2776, 0x277F}, {0x2B56, 0x2B59}, {0x3248, 0x324F}, {0xE000, 0xF8FF}, {0xFE00, 0xFE0F}, {0xFFFD, 0xFFFD}, {0x1F100, 0x1F10A}, {0x1F110, 0x1F12D}, {0x1F130, 0x1F169}, {0x1F170, 0x1F18D}, {0x1F18F, 0x1F190}, {0x1F19B, 0x1F1AC}, {0xE0100, 0xE01EF}, {0xF0000, 0xFFFFD}, {0x100000, 0x10FFFD}, } var narrow = table{ {0x0020, 0x007E}, {0x00A2, 0x00A3}, {0x00A5, 0x00A6}, {0x00AC, 0x00AC}, {0x00AF, 0x00AF}, {0x27E6, 0x27ED}, {0x2985, 0x2986}, } var neutral = table{ {0x0000, 0x001F}, {0x007F, 0x00A0}, {0x00A9, 0x00A9}, {0x00AB, 0x00AB}, {0x00B5, 0x00B5}, {0x00BB, 0x00BB}, {0x00C0, 0x00C5}, {0x00C7, 0x00CF}, {0x00D1, 0x00D6}, {0x00D9, 0x00DD}, {0x00E2, 0x00E5}, {0x00E7, 0x00E7}, {0x00EB, 0x00EB}, {0x00EE, 0x00EF}, {0x00F1, 0x00F1}, {0x00F4, 0x00F6}, {0x00FB, 0x00FB}, {0x00FD, 0x00FD}, {0x00FF, 0x0100}, {0x0102, 0x0110}, {0x0112, 0x0112}, {0x0114, 0x011A}, {0x011C, 0x0125}, {0x0128, 0x012A}, {0x012C, 0x0130}, {0x0134, 0x0137}, {0x0139, 0x013E}, {0x0143, 0x0143}, {0x0145, 0x0147}, {0x014C, 0x014C}, {0x014E, 0x0151}, {0x0154, 0x0165}, {0x0168, 0x016A}, {0x016C, 0x01CD}, {0x01CF, 0x01CF}, {0x01D1, 0x01D1}, {0x01D3, 0x01D3}, {0x01D5, 0x01D5}, {0x01D7, 0x01D7}, {0x01D9, 0x01D9}, {0x01DB, 0x01DB}, {0x01DD, 0x0250}, {0x0252, 0x0260}, {0x0262, 0x02C3}, {0x02C5, 0x02C6}, {0x02C8, 0x02C8}, {0x02CC, 0x02CC}, {0x02CE, 0x02CF}, {0x02D1, 0x02D7}, {0x02DC, 0x02DC}, {0x02DE, 0x02DE}, {0x02E0, 0x02FF}, {0x0370, 0x0377}, {0x037A, 0x037F}, {0x0384, 0x038A}, {0x038C, 0x038C}, {0x038E, 0x0390}, {0x03AA, 0x03B0}, {0x03C2, 0x03C2}, {0x03CA, 0x0400}, {0x0402, 0x040F}, {0x0450, 0x0450}, {0x0452, 0x052F}, {0x0531, 0x0556}, {0x0559, 0x058A}, {0x058D, 0x058F}, {0x0591, 0x05C7}, {0x05D0, 0x05EA}, {0x05EF, 0x05F4}, {0x0600, 0x061C}, {0x061E, 0x070D}, {0x070F, 0x074A}, {0x074D, 0x07B1}, {0x07C0, 0x07FA}, {0x07FD, 0x082D}, {0x0830, 0x083E}, {0x0840, 0x085B}, {0x085E, 0x085E}, {0x0860, 0x086A}, {0x08A0, 0x08B4}, {0x08B6, 0x08C7}, {0x08D3, 0x0983}, {0x0985, 0x098C}, {0x098F, 0x0990}, {0x0993, 0x09A8}, {0x09AA, 0x09B0}, {0x09B2, 0x09B2}, {0x09B6, 0x09B9}, {0x09BC, 0x09C4}, {0x09C7, 0x09C8}, {0x09CB, 0x09CE}, {0x09D7, 0x09D7}, {0x09DC, 0x09DD}, {0x09DF, 0x09E3}, {0x09E6, 0x09FE}, {0x0A01, 0x0A03}, {0x0A05, 0x0A0A}, {0x0A0F, 0x0A10}, {0x0A13, 0x0A28}, {0x0A2A, 0x0A30}, {0x0A32, 0x0A33}, {0x0A35, 0x0A36}, {0x0A38, 0x0A39}, {0x0A3C, 0x0A3C}, {0x0A3E, 0x0A42}, {0x0A47, 0x0A48}, {0x0A4B, 0x0A4D}, {0x0A51, 0x0A51}, {0x0A59, 0x0A5C}, {0x0A5E, 0x0A5E}, {0x0A66, 0x0A76}, {0x0A81, 0x0A83}, {0x0A85, 0x0A8D}, {0x0A8F, 0x0A91}, {0x0A93, 0x0AA8}, {0x0AAA, 0x0AB0}, {0x0AB2, 0x0AB3}, {0x0AB5, 0x0AB9}, {0x0ABC, 0x0AC5}, {0x0AC7, 0x0AC9}, {0x0ACB, 0x0ACD}, {0x0AD0, 0x0AD0}, {0x0AE0, 0x0AE3}, {0x0AE6, 0x0AF1}, {0x0AF9, 0x0AFF}, {0x0B01, 0x0B03}, {0x0B05, 0x0B0C}, {0x0B0F, 0x0B10}, {0x0B13, 0x0B28}, {0x0B2A, 0x0B30}, {0x0B32, 0x0B33}, {0x0B35, 0x0B39}, {0x0B3C, 0x0B44}, {0x0B47, 0x0B48}, {0x0B4B, 0x0B4D}, {0x0B55, 0x0B57}, {0x0B5C, 0x0B5D}, {0x0B5F, 0x0B63}, {0x0B66, 0x0B77}, {0x0B82, 0x0B83}, {0x0B85, 0x0B8A}, {0x0B8E, 0x0B90}, {0x0B92, 0x0B95}, {0x0B99, 0x0B9A}, {0x0B9C, 0x0B9C}, {0x0B9E, 0x0B9F}, {0x0BA3, 0x0BA4}, {0x0BA8, 0x0BAA}, {0x0BAE, 0x0BB9}, {0x0BBE, 0x0BC2}, {0x0BC6, 0x0BC8}, {0x0BCA, 0x0BCD}, {0x0BD0, 0x0BD0}, {0x0BD7, 0x0BD7}, {0x0BE6, 0x0BFA}, {0x0C00, 0x0C0C}, {0x0C0E, 0x0C10}, {0x0C12, 0x0C28}, {0x0C2A, 0x0C39}, {0x0C3D, 0x0C44}, {0x0C46, 0x0C48}, {0x0C4A, 0x0C4D}, {0x0C55, 0x0C56}, {0x0C58, 0x0C5A}, {0x0C60, 0x0C63}, {0x0C66, 0x0C6F}, {0x0C77, 0x0C8C}, {0x0C8E, 0x0C90}, {0x0C92, 0x0CA8}, {0x0CAA, 0x0CB3}, {0x0CB5, 0x0CB9}, {0x0CBC, 0x0CC4}, {0x0CC6, 0x0CC8}, {0x0CCA, 0x0CCD}, {0x0CD5, 0x0CD6}, {0x0CDE, 0x0CDE}, {0x0CE0, 0x0CE3}, {0x0CE6, 0x0CEF}, {0x0CF1, 0x0CF2}, {0x0D00, 0x0D0C}, {0x0D0E, 0x0D10}, {0x0D12, 0x0D44}, {0x0D46, 0x0D48}, {0x0D4A, 0x0D4F}, {0x0D54, 0x0D63}, {0x0D66, 0x0D7F}, {0x0D81, 0x0D83}, {0x0D85, 0x0D96}, {0x0D9A, 0x0DB1}, {0x0DB3, 0x0DBB}, {0x0DBD, 0x0DBD}, {0x0DC0, 0x0DC6}, {0x0DCA, 0x0DCA}, {0x0DCF, 0x0DD4}, {0x0DD6, 0x0DD6}, {0x0DD8, 0x0DDF}, {0x0DE6, 0x0DEF}, {0x0DF2, 0x0DF4}, {0x0E01, 0x0E3A}, {0x0E3F, 0x0E5B}, {0x0E81, 0x0E82}, {0x0E84, 0x0E84}, {0x0E86, 0x0E8A}, {0x0E8C, 0x0EA3}, {0x0EA5, 0x0EA5}, {0x0EA7, 0x0EBD}, {0x0EC0, 0x0EC4}, {0x0EC6, 0x0EC6}, {0x0EC8, 0x0ECD}, {0x0ED0, 0x0ED9}, {0x0EDC, 0x0EDF}, {0x0F00, 0x0F47}, {0x0F49, 0x0F6C}, {0x0F71, 0x0F97}, {0x0F99, 0x0FBC}, {0x0FBE, 0x0FCC}, {0x0FCE, 0x0FDA}, {0x1000, 0x10C5}, {0x10C7, 0x10C7}, {0x10CD, 0x10CD}, {0x10D0, 0x10FF}, {0x1160, 0x1248}, {0x124A, 0x124D}, {0x1250, 0x1256}, {0x1258, 0x1258}, {0x125A, 0x125D}, {0x1260, 0x1288}, {0x128A, 0x128D}, {0x1290, 0x12B0}, {0x12B2, 0x12B5}, {0x12B8, 0x12BE}, {0x12C0, 0x12C0}, {0x12C2, 0x12C5}, {0x12C8, 0x12D6}, {0x12D8, 0x1310}, {0x1312, 0x1315}, {0x1318, 0x135A}, {0x135D, 0x137C}, {0x1380, 0x1399}, {0x13A0, 0x13F5}, {0x13F8, 0x13FD}, {0x1400, 0x169C}, {0x16A0, 0x16F8}, {0x1700, 0x170C}, {0x170E, 0x1714}, {0x1720, 0x1736}, {0x1740, 0x1753}, {0x1760, 0x176C}, {0x176E, 0x1770}, {0x1772, 0x1773}, {0x1780, 0x17DD}, {0x17E0, 0x17E9}, {0x17F0, 0x17F9}, {0x1800, 0x180E}, {0x1810, 0x1819}, {0x1820, 0x1878}, {0x1880, 0x18AA}, {0x18B0, 0x18F5}, {0x1900, 0x191E}, {0x1920, 0x192B}, {0x1930, 0x193B}, {0x1940, 0x1940}, {0x1944, 0x196D}, {0x1970, 0x1974}, {0x1980, 0x19AB}, {0x19B0, 0x19C9}, {0x19D0, 0x19DA}, {0x19DE, 0x1A1B}, {0x1A1E, 0x1A5E}, {0x1A60, 0x1A7C}, {0x1A7F, 0x1A89}, {0x1A90, 0x1A99}, {0x1AA0, 0x1AAD}, {0x1AB0, 0x1AC0}, {0x1B00, 0x1B4B}, {0x1B50, 0x1B7C}, {0x1B80, 0x1BF3}, {0x1BFC, 0x1C37}, {0x1C3B, 0x1C49}, {0x1C4D, 0x1C88}, {0x1C90, 0x1CBA}, {0x1CBD, 0x1CC7}, {0x1CD0, 0x1CFA}, {0x1D00, 0x1DF9}, {0x1DFB, 0x1F15}, {0x1F18, 0x1F1D}, {0x1F20, 0x1F45}, {0x1F48, 0x1F4D}, {0x1F50, 0x1F57}, {0x1F59, 0x1F59}, {0x1F5B, 0x1F5B}, {0x1F5D, 0x1F5D}, {0x1F5F, 0x1F7D}, {0x1F80, 0x1FB4}, {0x1FB6, 0x1FC4}, {0x1FC6, 0x1FD3}, {0x1FD6, 0x1FDB}, {0x1FDD, 0x1FEF}, {0x1FF2, 0x1FF4}, {0x1FF6, 0x1FFE}, {0x2000, 0x200F}, {0x2011, 0x2012}, {0x2017, 0x2017}, {0x201A, 0x201B}, {0x201E, 0x201F}, {0x2023, 0x2023}, {0x2028, 0x202F}, {0x2031, 0x2031}, {0x2034, 0x2034}, {0x2036, 0x203A}, {0x203C, 0x203D}, {0x203F, 0x2064}, {0x2066, 0x2071}, {0x2075, 0x207E}, {0x2080, 0x2080}, {0x2085, 0x208E}, {0x2090, 0x209C}, {0x20A0, 0x20A8}, {0x20AA, 0x20AB}, {0x20AD, 0x20BF}, {0x20D0, 0x20F0}, {0x2100, 0x2102}, {0x2104, 0x2104}, {0x2106, 0x2108}, {0x210A, 0x2112}, {0x2114, 0x2115}, {0x2117, 0x2120}, {0x2123, 0x2125}, {0x2127, 0x212A}, {0x212C, 0x2152}, {0x2155, 0x215A}, {0x215F, 0x215F}, {0x216C, 0x216F}, {0x217A, 0x2188}, {0x218A, 0x218B}, {0x219A, 0x21B7}, {0x21BA, 0x21D1}, {0x21D3, 0x21D3}, {0x21D5, 0x21E6}, {0x21E8, 0x21FF}, {0x2201, 0x2201}, {0x2204, 0x2206}, {0x2209, 0x220A}, {0x220C, 0x220E}, {0x2210, 0x2210}, {0x2212, 0x2214}, {0x2216, 0x2219}, {0x221B, 0x221C}, {0x2221, 0x2222}, {0x2224, 0x2224}, {0x2226, 0x2226}, {0x222D, 0x222D}, {0x222F, 0x2233}, {0x2238, 0x223B}, {0x223E, 0x2247}, {0x2249, 0x224B}, {0x224D, 0x2251}, {0x2253, 0x225F}, {0x2262, 0x2263}, {0x2268, 0x2269}, {0x226C, 0x226D}, {0x2270, 0x2281}, {0x2284, 0x2285}, {0x2288, 0x2294}, {0x2296, 0x2298}, {0x229A, 0x22A4}, {0x22A6, 0x22BE}, {0x22C0, 0x2311}, {0x2313, 0x2319}, {0x231C, 0x2328}, {0x232B, 0x23E8}, {0x23ED, 0x23EF}, {0x23F1, 0x23F2}, {0x23F4, 0x2426}, {0x2440, 0x244A}, {0x24EA, 0x24EA}, {0x254C, 0x254F}, {0x2574, 0x257F}, {0x2590, 0x2591}, {0x2596, 0x259F}, {0x25A2, 0x25A2}, {0x25AA, 0x25B1}, {0x25B4, 0x25B5}, {0x25B8, 0x25BB}, {0x25BE, 0x25BF}, {0x25C2, 0x25C5}, {0x25C9, 0x25CA}, {0x25CC, 0x25CD}, {0x25D2, 0x25E1}, {0x25E6, 0x25EE}, {0x25F0, 0x25FC}, {0x25FF, 0x2604}, {0x2607, 0x2608}, {0x260A, 0x260D}, {0x2610, 0x2613}, {0x2616, 0x261B}, {0x261D, 0x261D}, {0x261F, 0x263F}, {0x2641, 0x2641}, {0x2643, 0x2647}, {0x2654, 0x265F}, {0x2662, 0x2662}, {0x2666, 0x2666}, {0x266B, 0x266B}, {0x266E, 0x266E}, {0x2670, 0x267E}, {0x2680, 0x2692}, {0x2694, 0x269D}, {0x26A0, 0x26A0}, {0x26A2, 0x26A9}, {0x26AC, 0x26BC}, {0x26C0, 0x26C3}, {0x26E2, 0x26E2}, {0x26E4, 0x26E7}, {0x2700, 0x2704}, {0x2706, 0x2709}, {0x270C, 0x2727}, {0x2729, 0x273C}, {0x273E, 0x274B}, {0x274D, 0x274D}, {0x274F, 0x2752}, {0x2756, 0x2756}, {0x2758, 0x2775}, {0x2780, 0x2794}, {0x2798, 0x27AF}, {0x27B1, 0x27BE}, {0x27C0, 0x27E5}, {0x27EE, 0x2984}, {0x2987, 0x2B1A}, {0x2B1D, 0x2B4F}, {0x2B51, 0x2B54}, {0x2B5A, 0x2B73}, {0x2B76, 0x2B95}, {0x2B97, 0x2C2E}, {0x2C30, 0x2C5E}, {0x2C60, 0x2CF3}, {0x2CF9, 0x2D25}, {0x2D27, 0x2D27}, {0x2D2D, 0x2D2D}, {0x2D30, 0x2D67}, {0x2D6F, 0x2D70}, {0x2D7F, 0x2D96}, {0x2DA0, 0x2DA6}, {0x2DA8, 0x2DAE}, {0x2DB0, 0x2DB6}, {0x2DB8, 0x2DBE}, {0x2DC0, 0x2DC6}, {0x2DC8, 0x2DCE}, {0x2DD0, 0x2DD6}, {0x2DD8, 0x2DDE}, {0x2DE0, 0x2E52}, {0x303F, 0x303F}, {0x4DC0, 0x4DFF}, {0xA4D0, 0xA62B}, {0xA640, 0xA6F7}, {0xA700, 0xA7BF}, {0xA7C2, 0xA7CA}, {0xA7F5, 0xA82C}, {0xA830, 0xA839}, {0xA840, 0xA877}, {0xA880, 0xA8C5}, {0xA8CE, 0xA8D9}, {0xA8E0, 0xA953}, {0xA95F, 0xA95F}, {0xA980, 0xA9CD}, {0xA9CF, 0xA9D9}, {0xA9DE, 0xA9FE}, {0xAA00, 0xAA36}, {0xAA40, 0xAA4D}, {0xAA50, 0xAA59}, {0xAA5C, 0xAAC2}, {0xAADB, 0xAAF6}, {0xAB01, 0xAB06}, {0xAB09, 0xAB0E}, {0xAB11, 0xAB16}, {0xAB20, 0xAB26}, {0xAB28, 0xAB2E}, {0xAB30, 0xAB6B}, {0xAB70, 0xABED}, {0xABF0, 0xABF9}, {0xD7B0, 0xD7C6}, {0xD7CB, 0xD7FB}, {0xD800, 0xDFFF}, {0xFB00, 0xFB06}, {0xFB13, 0xFB17}, {0xFB1D, 0xFB36}, {0xFB38, 0xFB3C}, {0xFB3E, 0xFB3E}, {0xFB40, 0xFB41}, {0xFB43, 0xFB44}, {0xFB46, 0xFBC1}, {0xFBD3, 0xFD3F}, {0xFD50, 0xFD8F}, {0xFD92, 0xFDC7}, {0xFDF0, 0xFDFD}, {0xFE20, 0xFE2F}, {0xFE70, 0xFE74}, {0xFE76, 0xFEFC}, {0xFEFF, 0xFEFF}, {0xFFF9, 0xFFFC}, {0x10000, 0x1000B}, {0x1000D, 0x10026}, {0x10028, 0x1003A}, {0x1003C, 0x1003D}, {0x1003F, 0x1004D}, {0x10050, 0x1005D}, {0x10080, 0x100FA}, {0x10100, 0x10102}, {0x10107, 0x10133}, {0x10137, 0x1018E}, {0x10190, 0x1019C}, {0x101A0, 0x101A0}, {0x101D0, 0x101FD}, {0x10280, 0x1029C}, {0x102A0, 0x102D0}, {0x102E0, 0x102FB}, {0x10300, 0x10323}, {0x1032D, 0x1034A}, {0x10350, 0x1037A}, {0x10380, 0x1039D}, {0x1039F, 0x103C3}, {0x103C8, 0x103D5}, {0x10400, 0x1049D}, {0x104A0, 0x104A9}, {0x104B0, 0x104D3}, {0x104D8, 0x104FB}, {0x10500, 0x10527}, {0x10530, 0x10563}, {0x1056F, 0x1056F}, {0x10600, 0x10736}, {0x10740, 0x10755}, {0x10760, 0x10767}, {0x10800, 0x10805}, {0x10808, 0x10808}, {0x1080A, 0x10835}, {0x10837, 0x10838}, {0x1083C, 0x1083C}, {0x1083F, 0x10855}, {0x10857, 0x1089E}, {0x108A7, 0x108AF}, {0x108E0, 0x108F2}, {0x108F4, 0x108F5}, {0x108FB, 0x1091B}, {0x1091F, 0x10939}, {0x1093F, 0x1093F}, {0x10980, 0x109B7}, {0x109BC, 0x109CF}, {0x109D2, 0x10A03}, {0x10A05, 0x10A06}, {0x10A0C, 0x10A13}, {0x10A15, 0x10A17}, {0x10A19, 0x10A35}, {0x10A38, 0x10A3A}, {0x10A3F, 0x10A48}, {0x10A50, 0x10A58}, {0x10A60, 0x10A9F}, {0x10AC0, 0x10AE6}, {0x10AEB, 0x10AF6}, {0x10B00, 0x10B35}, {0x10B39, 0x10B55}, {0x10B58, 0x10B72}, {0x10B78, 0x10B91}, {0x10B99, 0x10B9C}, {0x10BA9, 0x10BAF}, {0x10C00, 0x10C48}, {0x10C80, 0x10CB2}, {0x10CC0, 0x10CF2}, {0x10CFA, 0x10D27}, {0x10D30, 0x10D39}, {0x10E60, 0x10E7E}, {0x10E80, 0x10EA9}, {0x10EAB, 0x10EAD}, {0x10EB0, 0x10EB1}, {0x10F00, 0x10F27}, {0x10F30, 0x10F59}, {0x10FB0, 0x10FCB}, {0x10FE0, 0x10FF6}, {0x11000, 0x1104D}, {0x11052, 0x1106F}, {0x1107F, 0x110C1}, {0x110CD, 0x110CD}, {0x110D0, 0x110E8}, {0x110F0, 0x110F9}, {0x11100, 0x11134}, {0x11136, 0x11147}, {0x11150, 0x11176}, {0x11180, 0x111DF}, {0x111E1, 0x111F4}, {0x11200, 0x11211}, {0x11213, 0x1123E}, {0x11280, 0x11286}, {0x11288, 0x11288}, {0x1128A, 0x1128D}, {0x1128F, 0x1129D}, {0x1129F, 0x112A9}, {0x112B0, 0x112EA}, {0x112F0, 0x112F9}, {0x11300, 0x11303}, {0x11305, 0x1130C}, {0x1130F, 0x11310}, {0x11313, 0x11328}, {0x1132A, 0x11330}, {0x11332, 0x11333}, {0x11335, 0x11339}, {0x1133B, 0x11344}, {0x11347, 0x11348}, {0x1134B, 0x1134D}, {0x11350, 0x11350}, {0x11357, 0x11357}, {0x1135D, 0x11363}, {0x11366, 0x1136C}, {0x11370, 0x11374}, {0x11400, 0x1145B}, {0x1145D, 0x11461}, {0x11480, 0x114C7}, {0x114D0, 0x114D9}, {0x11580, 0x115B5}, {0x115B8, 0x115DD}, {0x11600, 0x11644}, {0x11650, 0x11659}, {0x11660, 0x1166C}, {0x11680, 0x116B8}, {0x116C0, 0x116C9}, {0x11700, 0x1171A}, {0x1171D, 0x1172B}, {0x11730, 0x1173F}, {0x11800, 0x1183B}, {0x118A0, 0x118F2}, {0x118FF, 0x11906}, {0x11909, 0x11909}, {0x1190C, 0x11913}, {0x11915, 0x11916}, {0x11918, 0x11935}, {0x11937, 0x11938}, {0x1193B, 0x11946}, {0x11950, 0x11959}, {0x119A0, 0x119A7}, {0x119AA, 0x119D7}, {0x119DA, 0x119E4}, {0x11A00, 0x11A47}, {0x11A50, 0x11AA2}, {0x11AC0, 0x11AF8}, {0x11C00, 0x11C08}, {0x11C0A, 0x11C36}, {0x11C38, 0x11C45}, {0x11C50, 0x11C6C}, {0x11C70, 0x11C8F}, {0x11C92, 0x11CA7}, {0x11CA9, 0x11CB6}, {0x11D00, 0x11D06}, {0x11D08, 0x11D09}, {0x11D0B, 0x11D36}, {0x11D3A, 0x11D3A}, {0x11D3C, 0x11D3D}, {0x11D3F, 0x11D47}, {0x11D50, 0x11D59}, {0x11D60, 0x11D65}, {0x11D67, 0x11D68}, {0x11D6A, 0x11D8E}, {0x11D90, 0x11D91}, {0x11D93, 0x11D98}, {0x11DA0, 0x11DA9}, {0x11EE0, 0x11EF8}, {0x11FB0, 0x11FB0}, {0x11FC0, 0x11FF1}, {0x11FFF, 0x12399}, {0x12400, 0x1246E}, {0x12470, 0x12474}, {0x12480, 0x12543}, {0x13000, 0x1342E}, {0x13430, 0x13438}, {0x14400, 0x14646}, {0x16800, 0x16A38}, {0x16A40, 0x16A5E}, {0x16A60, 0x16A69}, {0x16A6E, 0x16A6F}, {0x16AD0, 0x16AED}, {0x16AF0, 0x16AF5}, {0x16B00, 0x16B45}, {0x16B50, 0x16B59}, {0x16B5B, 0x16B61}, {0x16B63, 0x16B77}, {0x16B7D, 0x16B8F}, {0x16E40, 0x16E9A}, {0x16F00, 0x16F4A}, {0x16F4F, 0x16F87}, {0x16F8F, 0x16F9F}, {0x1BC00, 0x1BC6A}, {0x1BC70, 0x1BC7C}, {0x1BC80, 0x1BC88}, {0x1BC90, 0x1BC99}, {0x1BC9C, 0x1BCA3}, {0x1D000, 0x1D0F5}, {0x1D100, 0x1D126}, {0x1D129, 0x1D1E8}, {0x1D200, 0x1D245}, {0x1D2E0, 0x1D2F3}, {0x1D300, 0x1D356}, {0x1D360, 0x1D378}, {0x1D400, 0x1D454}, {0x1D456, 0x1D49C}, {0x1D49E, 0x1D49F}, {0x1D4A2, 0x1D4A2}, {0x1D4A5, 0x1D4A6}, {0x1D4A9, 0x1D4AC}, {0x1D4AE, 0x1D4B9}, {0x1D4BB, 0x1D4BB}, {0x1D4BD, 0x1D4C3}, {0x1D4C5, 0x1D505}, {0x1D507, 0x1D50A}, {0x1D50D, 0x1D514}, {0x1D516, 0x1D51C}, {0x1D51E, 0x1D539}, {0x1D53B, 0x1D53E}, {0x1D540, 0x1D544}, {0x1D546, 0x1D546}, {0x1D54A, 0x1D550}, {0x1D552, 0x1D6A5}, {0x1D6A8, 0x1D7CB}, {0x1D7CE, 0x1DA8B}, {0x1DA9B, 0x1DA9F}, {0x1DAA1, 0x1DAAF}, {0x1E000, 0x1E006}, {0x1E008, 0x1E018}, {0x1E01B, 0x1E021}, {0x1E023, 0x1E024}, {0x1E026, 0x1E02A}, {0x1E100, 0x1E12C}, {0x1E130, 0x1E13D}, {0x1E140, 0x1E149}, {0x1E14E, 0x1E14F}, {0x1E2C0, 0x1E2F9}, {0x1E2FF, 0x1E2FF}, {0x1E800, 0x1E8C4}, {0x1E8C7, 0x1E8D6}, {0x1E900, 0x1E94B}, {0x1E950, 0x1E959}, {0x1E95E, 0x1E95F}, {0x1EC71, 0x1ECB4}, {0x1ED01, 0x1ED3D}, {0x1EE00, 0x1EE03}, {0x1EE05, 0x1EE1F}, {0x1EE21, 0x1EE22}, {0x1EE24, 0x1EE24}, {0x1EE27, 0x1EE27}, {0x1EE29, 0x1EE32}, {0x1EE34, 0x1EE37}, {0x1EE39, 0x1EE39}, {0x1EE3B, 0x1EE3B}, {0x1EE42, 0x1EE42}, {0x1EE47, 0x1EE47}, {0x1EE49, 0x1EE49}, {0x1EE4B, 0x1EE4B}, {0x1EE4D, 0x1EE4F}, {0x1EE51, 0x1EE52}, {0x1EE54, 0x1EE54}, {0x1EE57, 0x1EE57}, {0x1EE59, 0x1EE59}, {0x1EE5B, 0x1EE5B}, {0x1EE5D, 0x1EE5D}, {0x1EE5F, 0x1EE5F}, {0x1EE61, 0x1EE62}, {0x1EE64, 0x1EE64}, {0x1EE67, 0x1EE6A}, {0x1EE6C, 0x1EE72}, {0x1EE74, 0x1EE77}, {0x1EE79, 0x1EE7C}, {0x1EE7E, 0x1EE7E}, {0x1EE80, 0x1EE89}, {0x1EE8B, 0x1EE9B}, {0x1EEA1, 0x1EEA3}, {0x1EEA5, 0x1EEA9}, {0x1EEAB, 0x1EEBB}, {0x1EEF0, 0x1EEF1}, {0x1F000, 0x1F003}, {0x1F005, 0x1F02B}, {0x1F030, 0x1F093}, {0x1F0A0, 0x1F0AE}, {0x1F0B1, 0x1F0BF}, {0x1F0C1, 0x1F0CE}, {0x1F0D1, 0x1F0F5}, {0x1F10B, 0x1F10F}, {0x1F12E, 0x1F12F}, {0x1F16A, 0x1F16F}, {0x1F1AD, 0x1F1AD}, {0x1F1E6, 0x1F1FF}, {0x1F321, 0x1F32C}, {0x1F336, 0x1F336}, {0x1F37D, 0x1F37D}, {0x1F394, 0x1F39F}, {0x1F3CB, 0x1F3CE}, {0x1F3D4, 0x1F3DF}, {0x1F3F1, 0x1F3F3}, {0x1F3F5, 0x1F3F7}, {0x1F43F, 0x1F43F}, {0x1F441, 0x1F441}, {0x1F4FD, 0x1F4FE}, {0x1F53E, 0x1F54A}, {0x1F54F, 0x1F54F}, {0x1F568, 0x1F579}, {0x1F57B, 0x1F594}, {0x1F597, 0x1F5A3}, {0x1F5A5, 0x1F5FA}, {0x1F650, 0x1F67F}, {0x1F6C6, 0x1F6CB}, {0x1F6CD, 0x1F6CF}, {0x1F6D3, 0x1F6D4}, {0x1F6E0, 0x1F6EA}, {0x1F6F0, 0x1F6F3}, {0x1F700, 0x1F773}, {0x1F780, 0x1F7D8}, {0x1F800, 0x1F80B}, {0x1F810, 0x1F847}, {0x1F850, 0x1F859}, {0x1F860, 0x1F887}, {0x1F890, 0x1F8AD}, {0x1F8B0, 0x1F8B1}, {0x1F900, 0x1F90B}, {0x1F93B, 0x1F93B}, {0x1F946, 0x1F946}, {0x1FA00, 0x1FA53}, {0x1FA60, 0x1FA6D}, {0x1FB00, 0x1FB92}, {0x1FB94, 0x1FBCA}, {0x1FBF0, 0x1FBF9}, {0xE0001, 0xE0001}, {0xE0020, 0xE007F}, } var emoji = table{ {0x203C, 0x203C}, {0x2049, 0x2049}, {0x2122, 0x2122}, {0x2139, 0x2139}, {0x2194, 0x2199}, {0x21A9, 0x21AA}, {0x231A, 0x231B}, {0x2328, 0x2328}, {0x2388, 0x2388}, {0x23CF, 0x23CF}, {0x23E9, 0x23F3}, {0x23F8, 0x23FA}, {0x24C2, 0x24C2}, {0x25AA, 0x25AB}, {0x25B6, 0x25B6}, {0x25C0, 0x25C0}, {0x25FB, 0x25FE}, {0x2600, 0x2605}, {0x2607, 0x2612}, {0x2614, 0x2685}, {0x2690, 0x2705}, {0x2708, 0x2712}, {0x2714, 0x2714}, {0x2716, 0x2716}, {0x271D, 0x271D}, {0x2721, 0x2721}, {0x2728, 0x2728}, {0x2733, 0x2734}, {0x2744, 0x2744}, {0x2747, 0x2747}, {0x274C, 0x274C}, {0x274E, 0x274E}, {0x2753, 0x2755}, {0x2757, 0x2757}, {0x2763, 0x2767}, {0x2795, 0x2797}, {0x27A1, 0x27A1}, {0x27B0, 0x27B0}, {0x27BF, 0x27BF}, {0x2934, 0x2935}, {0x2B05, 0x2B07}, {0x2B1B, 0x2B1C}, {0x2B50, 0x2B50}, {0x2B55, 0x2B55}, {0x3030, 0x3030}, {0x303D, 0x303D}, {0x3297, 0x3297}, {0x3299, 0x3299}, {0x1F000, 0x1F0FF}, {0x1F10D, 0x1F10F}, {0x1F12F, 0x1F12F}, {0x1F16C, 0x1F171}, {0x1F17E, 0x1F17F}, {0x1F18E, 0x1F18E}, {0x1F191, 0x1F19A}, {0x1F1AD, 0x1F1E5}, {0x1F201, 0x1F20F}, {0x1F21A, 0x1F21A}, {0x1F22F, 0x1F22F}, {0x1F232, 0x1F23A}, {0x1F23C, 0x1F23F}, {0x1F249, 0x1F3FA}, {0x1F400, 0x1F53D}, {0x1F546, 0x1F64F}, {0x1F680, 0x1F6FF}, {0x1F774, 0x1F77F}, {0x1F7D5, 0x1F7FF}, {0x1F80C, 0x1F80F}, {0x1F848, 0x1F84F}, {0x1F85A, 0x1F85F}, {0x1F888, 0x1F88F}, {0x1F8AE, 0x1F8FF}, {0x1F90C, 0x1F93A}, {0x1F93C, 0x1F945}, {0x1F947, 0x1FAFF}, {0x1FC00, 0x1FFFD}, } ================================================ FILE: vendor/github.com/mattn/go-runewidth/runewidth_windows.go ================================================ //go:build windows && !appengine // +build windows,!appengine package runewidth import ( "syscall" ) var ( kernel32 = syscall.NewLazyDLL("kernel32") procGetConsoleOutputCP = kernel32.NewProc("GetConsoleOutputCP") ) // IsEastAsian return true if the current locale is CJK func IsEastAsian() bool { r1, _, _ := procGetConsoleOutputCP.Call() if r1 == 0 { return false } switch int(r1) { case 932, 51932, 936, 949, 950: return true } return false } ================================================ FILE: vendor/github.com/mcuadros/go-lookup/.travis.yml ================================================ language: go go: - 1.2 - 1.3 - 1.4 - tip script: - go get gopkg.in/check.v1 - go test -v . ================================================ FILE: vendor/github.com/mcuadros/go-lookup/LICENSE ================================================ The MIT License (MIT) Copyright (c) 2015 Máximo Cuadros 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. ================================================ FILE: vendor/github.com/mcuadros/go-lookup/README.md ================================================ go-lookup [![Build Status](https://travis-ci.org/mcuadros/go-lookup.png?branch=master)](https://travis-ci.org/mcuadros/go-lookup) [![GoDoc](http://godoc.org/github.com/mcuadros/go-lookup?status.png)](http://godoc.org/github.com/mcuadros/go-lookup) ============================== Small library on top of reflect for make lookups to Structs or Maps. Using a very simple DSL you can access to any property, key or value of any value of Go. Installation ------------ The recommended way to install go-lookup ``` go get github.com/mcuadros/go-lookup ``` Example ------- ```go type Cast struct { Actor, Role string } type Serie struct { Cast []Cast } series := map[string]Serie{ "A-Team": {Cast: []Cast{ {Actor: "George Peppard", Role: "Hannibal"}, {Actor: "Dwight Schultz", Role: "Murdock"}, {Actor: "Mr. T", Role: "Baracus"}, {Actor: "Dirk Benedict", Role: "Faceman"}, }}, } q := "A-Team.Cast.Role" value, _ := LookupString(series, q) fmt.Println(q, "->", value.Interface()) // A-Team.Cast.Role -> [Hannibal Murdock Baracus Faceman] q = "A-Team.Cast[0].Actor" value, _ = LookupString(series, q) fmt.Println(q, "->", value.Interface()) // A-Team.Cast[0].Actor -> George Peppard ``` License ------- MIT, see [LICENSE](LICENSE) ================================================ FILE: vendor/github.com/mcuadros/go-lookup/lookup.go ================================================ /* Small library on top of reflect for make lookups to Structs or Maps. Using a very simple DSL you can access to any property, key or value of any value of Go. */ package lookup import ( "errors" "reflect" "strconv" "strings" ) const ( SplitToken = "." IndexCloseChar = "]" IndexOpenChar = "[" ) var ( ErrMalformedIndex = errors.New("Malformed index key") ErrInvalidIndexUsage = errors.New("Invalid index key usage") ErrKeyNotFound = errors.New("Unable to find the key") ) // LookupString performs a lookup into a value, using a string. Same as `Loookup` // but using a string with the keys separated by `.` func LookupString(i interface{}, path string) (reflect.Value, error) { return Lookup(i, strings.Split(path, SplitToken)...) } // Lookup performs a lookup into a value, using a path of keys. The key should // match with a Field or a MapIndex. For slice you can use the syntax key[index] // to access a specific index. If one key owns to a slice and an index is not // specificied the rest of the path will be apllied to evaley value of the // slice, and the value will be merged into a slice. func Lookup(i interface{}, path ...string) (reflect.Value, error) { value := reflect.ValueOf(i) var parent reflect.Value var err error for i, part := range path { parent = value value, err = getValueByName(value, part) if err == nil { continue } if !isAggregable(parent) { break } value, err = aggreateAggregableValue(parent, path[i:]) break } return value, err } func getValueByName(v reflect.Value, key string) (reflect.Value, error) { var value reflect.Value var index int var err error key, index, err = parseIndex(key) if err != nil { return value, err } switch v.Kind() { case reflect.Ptr, reflect.Interface: return getValueByName(v.Elem(), key) case reflect.Struct: value = v.FieldByName(key) case reflect.Map: kValue := reflect.Indirect(reflect.New(v.Type().Key())) kValue.SetString(key) value = v.MapIndex(kValue) } if !value.IsValid() { return reflect.Value{}, ErrKeyNotFound } if index != -1 { if value.Type().Kind() != reflect.Slice { return reflect.Value{}, ErrInvalidIndexUsage } value = value.Index(index) } if value.Kind() == reflect.Ptr || value.Kind() == reflect.Interface { value = value.Elem() } return value, nil } func aggreateAggregableValue(v reflect.Value, path []string) (reflect.Value, error) { values := make([]reflect.Value, 0) l := v.Len() if l == 0 { ty, ok := lookupType(v.Type(), path...) if !ok { return reflect.Value{}, ErrKeyNotFound } return reflect.MakeSlice(reflect.SliceOf(ty), 0, 0), nil } index := indexFunction(v) for i := 0; i < l; i++ { value, err := Lookup(index(i).Interface(), path...) if err != nil { return reflect.Value{}, err } values = append(values, value) } return mergeValue(values), nil } func indexFunction(v reflect.Value) func(i int) reflect.Value { switch v.Kind() { case reflect.Slice: return v.Index case reflect.Map: keys := v.MapKeys() return func(i int) reflect.Value { return v.MapIndex(keys[i]) } default: panic("unsuported kind for index") } } func mergeValue(values []reflect.Value) reflect.Value { values = removeZeroValues(values) l := len(values) if l == 0 { return reflect.Value{} } sample := values[0] mergeable := isMergeable(sample) t := sample.Type() if mergeable { t = t.Elem() } value := reflect.MakeSlice(reflect.SliceOf(t), 0, 0) for i := 0; i < l; i++ { if !values[i].IsValid() { continue } if mergeable { value = reflect.AppendSlice(value, values[i]) } else { value = reflect.Append(value, values[i]) } } return value } func removeZeroValues(values []reflect.Value) []reflect.Value { l := len(values) var v []reflect.Value for i := 0; i < l; i++ { if values[i].IsValid() { v = append(v, values[i]) } } return v } func isAggregable(v reflect.Value) bool { k := v.Kind() return k == reflect.Map || k == reflect.Slice } func isMergeable(v reflect.Value) bool { k := v.Kind() return k == reflect.Map || k == reflect.Slice } func hasIndex(s string) bool { return strings.Index(s, IndexOpenChar) != -1 } func parseIndex(s string) (string, int, error) { start := strings.Index(s, IndexOpenChar) end := strings.Index(s, IndexCloseChar) if start == -1 && end == -1 { return s, -1, nil } if (start != -1 && end == -1) || (start == -1 && end != -1) { return "", -1, ErrMalformedIndex } index, err := strconv.Atoi(s[start+1 : end]) if err != nil { return "", -1, ErrMalformedIndex } return s[:start], index, nil } func lookupType(ty reflect.Type, path ...string) (reflect.Type, bool) { if len(path) == 0 { return ty, true } switch ty.Kind() { case reflect.Slice, reflect.Array, reflect.Map: if hasIndex(path[0]) { return lookupType(ty.Elem(), path[1:]...) } // Aggregate. return lookupType(ty.Elem(), path...) case reflect.Ptr: return lookupType(ty.Elem(), path...) case reflect.Interface: // We can't know from here without a value. Let's just return this type. return ty, true case reflect.Struct: f, ok := ty.FieldByName(path[0]) if ok { return lookupType(f.Type, path[1:]...) } } return nil, false } ================================================ FILE: vendor/github.com/mgutz/str/.gitignore ================================================ tmp/ *.log _* node_modules example/dist /Gododir/godobin* /Gododir/Gododir ================================================ FILE: vendor/github.com/mgutz/str/CREDITS ================================================ * [string.js](http://stringjs.com) - I contributed several functions to this project. * [bbgen.net](http://bbgen.net/blog/2011/06/string-to-argc-argv/) ================================================ FILE: vendor/github.com/mgutz/str/LICENSE ================================================ The MIT License (MIT) Copyright (c) 2013-2014 Mario L. Gutierrez 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. ================================================ FILE: vendor/github.com/mgutz/str/README.md ================================================ # str import "github.com/mgutz/str" Package str is a comprehensive set of string functions to build more Go awesomeness. Str complements Go's standard packages and does not duplicate functionality found in `strings` or `strconv`. Str is based on plain functions instead of object-based methods, consistent with Go standard string packages. str.Between("foo", "", "") == "foo" Str supports pipelining instead of chaining s := str.Pipe("\nabcdef\n", Clean, BetweenF("a", "f"), ChompLeftF("bc")) User-defined filters can be added to the pipeline by inserting a function or closure that returns a function with this signature func(string) string ### Index * [Variables](#variables) * [func Between](#func [godoc](https://godoc.org/github.com/mgutz/str) between) * [func BetweenF](#func--betweenf) * [func Camelize](#func--camelize) * [func Capitalize](#func--capitalize) * [func CharAt](#func--charat) * [func CharAtF](#func--charatf) * [func ChompLeft](#func--chompleft) * [func ChompLeftF](#func--chompleftf) * [func ChompRight](#func--chompright) * [func ChompRightF](#func--chomprightf) * [func Classify](#func--classify) * [func ClassifyF](#func--classifyf) * [func Clean](#func--clean) * [func Dasherize](#func--dasherize) * [func DecodeHTMLEntities](#func--decodehtmlentities) * [func EnsurePrefix](#func--ensureprefix) * [func EnsurePrefixF](#func--ensureprefixf) * [func EnsureSuffix](#func--ensuresuffix) * [func EnsureSuffixF](#func--ensuresuffixf) * [func EscapeHTML](#func--escapehtml) * [func Humanize](#func--humanize) * [func Iif](#func--iif) * [func IndexOf](#func--indexof) * [func IsAlpha](#func--isalpha) * [func IsAlphaNumeric](#func--isalphanumeric) * [func IsEmpty](#func--isempty) * [func IsLower](#func--islower) * [func IsNumeric](#func--isnumeric) * [func IsUpper](#func--isupper) * [func Left](#func--left) * [func LeftF](#func--leftf) * [func LeftOf](#func--leftof) * [func Letters](#func--letters) * [func Lines](#func--lines) * [func Map](#func--map) * [func Match](#func--match) * [func Pad](#func--pad) * [func PadF](#func--padf) * [func PadLeft](#func--padleft) * [func PadLeftF](#func--padleftf) * [func PadRight](#func--padright) * [func PadRightF](#func--padrightf) * [func Pipe](#func--pipe) * [func QuoteItems](#func--quoteitems) * [func ReplaceF](#func--replacef) * [func ReplacePattern](#func--replacepattern) * [func ReplacePatternF](#func--replacepatternf) * [func Reverse](#func--reverse) * [func Right](#func--right) * [func RightF](#func--rightf) * [func RightOf](#func--rightof) * [func SetTemplateDelimiters](#func--settemplatedelimiters) * [func Slice](#func--slice) * [func SliceContains](#func--slicecontains) * [func SliceF](#func--slicef) * [func SliceIndexOf](#func--sliceindexof) * [func Slugify](#func--slugify) * [func StripPunctuation](#func--strippunctuation) * [func StripTags](#func--striptags) * [func Substr](#func--substr) * [func SubstrF](#func--substrf) * [func Template](#func--template) * [func TemplateDelimiters](#func--templatedelimiters) * [func TemplateWithDelimiters](#func--templatewithdelimiters) * [func ToArgv](#func--toargv) * [func ToBool](#func--tobool) * [func ToBoolOr](#func--toboolor) * [func ToFloat32Or](#func--tofloat32or) * [func ToFloat64Or](#func--tofloat64or) * [func ToIntOr](#func--tointor) * [func Underscore](#func--underscore) * [func UnescapeHTML](#func--unescapehtml) * [func WrapHTML](#func--wraphtml) * [func WrapHTMLF](#func--wraphtmlf) #### Variables ```go var ToFloatOr = ToFloat64Or ``` ToFloatOr parses as a float64 or returns defaultValue. ```go var Verbose = false ``` Verbose flag enables console output for those functions that have counterparts in Go's excellent stadard packages. #### func [Between](#between) ```go func Between(s, left, right string) string ``` Between extracts a string between left and right strings. #### func [BetweenF](#betweenf) ```go func BetweenF(left, right string) func(string) string ``` BetweenF is the filter form for Between. #### func [Camelize](#camelize) ```go func Camelize(s string) string ``` Camelize return new string which removes any underscores or dashes and convert a string into camel casing. #### func [Capitalize](#capitalize) ```go func Capitalize(s string) string ``` Capitalize uppercases the first char of s and lowercases the rest. #### func [CharAt](#charat) ```go func CharAt(s string, index int) string ``` CharAt returns a string from the character at the specified position. #### func [CharAtF](#charatf) ```go func CharAtF(index int) func(string) string ``` CharAtF is the filter form of CharAt. #### func [ChompLeft](#chompleft) ```go func ChompLeft(s, prefix string) string ``` ChompLeft removes prefix at the start of a string. #### func [ChompLeftF](#chompleftf) ```go func ChompLeftF(prefix string) func(string) string ``` ChompLeftF is the filter form of ChompLeft. #### func [ChompRight](#chompright) ```go func ChompRight(s, suffix string) string ``` ChompRight removes suffix from end of s. #### func [ChompRightF](#chomprightf) ```go func ChompRightF(suffix string) func(string) string ``` ChompRightF is the filter form of ChompRight. #### func [Classify](#classify) ```go func Classify(s string) string ``` Classify returns a camelized string with the first letter upper cased. #### func [ClassifyF](#classifyf) ```go func ClassifyF(s string) func(string) string ``` ClassifyF is the filter form of Classify. #### func [Clean](#clean) ```go func Clean(s string) string ``` Clean compresses all adjacent whitespace to a single space and trims s. #### func [Dasherize](#dasherize) ```go func Dasherize(s string) string ``` Dasherize converts a camel cased string into a string delimited by dashes. #### func [DecodeHTMLEntities](#decodehtmlentities) ```go func DecodeHTMLEntities(s string) string ``` DecodeHTMLEntities decodes HTML entities into their proper string representation. DecodeHTMLEntities is an alias for html.UnescapeString #### func [EnsurePrefix](#ensureprefix) ```go func EnsurePrefix(s, prefix string) string ``` EnsurePrefix ensures s starts with prefix. #### func [EnsurePrefixF](#ensureprefixf) ```go func EnsurePrefixF(prefix string) func(string) string ``` EnsurePrefixF is the filter form of EnsurePrefix. #### func [EnsureSuffix](#ensuresuffix) ```go func EnsureSuffix(s, suffix string) string ``` EnsureSuffix ensures s ends with suffix. #### func [EnsureSuffixF](#ensuresuffixf) ```go func EnsureSuffixF(suffix string) func(string) string ``` EnsureSuffixF is the filter form of EnsureSuffix. #### func [EscapeHTML](#escapehtml) ```go func EscapeHTML(s string) string ``` EscapeHTML is alias for html.EscapeString. #### func [Humanize](#humanize) ```go func Humanize(s string) string ``` Humanize transforms s into a human friendly form. #### func [Iif](#iif) ```go func Iif(condition bool, truthy string, falsey string) string ``` Iif is short for immediate if. If condition is true return truthy else falsey. #### func [IndexOf](#indexof) ```go func IndexOf(s string, needle string, start int) int ``` IndexOf finds the index of needle in s starting from start. #### func [IsAlpha](#isalpha) ```go func IsAlpha(s string) bool ``` IsAlpha returns true if a string contains only letters from ASCII (a-z,A-Z). Other letters from other languages are not supported. #### func [IsAlphaNumeric](#isalphanumeric) ```go func IsAlphaNumeric(s string) bool ``` IsAlphaNumeric returns true if a string contains letters and digits. #### func [IsEmpty](#isempty) ```go func IsEmpty(s string) bool ``` IsEmpty returns true if the string is solely composed of whitespace. #### func [IsLower](#islower) ```go func IsLower(s string) bool ``` IsLower returns true if s comprised of all lower case characters. #### func [IsNumeric](#isnumeric) ```go func IsNumeric(s string) bool ``` IsNumeric returns true if a string contains only digits from 0-9. Other digits not in Latin (such as Arabic) are not currently supported. #### func [IsUpper](#isupper) ```go func IsUpper(s string) bool ``` IsUpper returns true if s contains all upper case chracters. #### func [Left](#left) ```go func Left(s string, n int) string ``` Left returns the left substring of length n. #### func [LeftF](#leftf) ```go func LeftF(n int) func(string) string ``` LeftF is the filter form of Left. #### func [LeftOf](#leftof) ```go func LeftOf(s string, needle string) string ``` LeftOf returns the substring left of needle. #### func [Letters](#letters) ```go func Letters(s string) []string ``` Letters returns an array of runes as strings so it can be indexed into. #### func [Lines](#lines) ```go func Lines(s string) []string ``` Lines convert windows newlines to unix newlines then convert to an Array of lines. #### func [Map](#map) ```go func Map(arr []string, iterator func(string) string) []string ``` Map maps an array's iitem through an iterator. #### func [Match](#match) ```go func Match(s, pattern string) bool ``` Match returns true if patterns matches the string #### func [Pad](#pad) ```go func Pad(s, c string, n int) string ``` Pad pads string s on both sides with c until it has length of n. #### func [PadF](#padf) ```go func PadF(c string, n int) func(string) string ``` PadF is the filter form of Pad. #### func [PadLeft](#padleft) ```go func PadLeft(s, c string, n int) string ``` PadLeft pads s on left side with c until it has length of n. #### func [PadLeftF](#padleftf) ```go func PadLeftF(c string, n int) func(string) string ``` PadLeftF is the filter form of PadLeft. #### func [PadRight](#padright) ```go func PadRight(s, c string, n int) string ``` PadRight pads s on right side with c until it has length of n. #### func [PadRightF](#padrightf) ```go func PadRightF(c string, n int) func(string) string ``` PadRightF is the filter form of Padright #### func [Pipe](#pipe) ```go func Pipe(s string, funcs ...func(string) string) string ``` Pipe pipes s through one or more string filters. #### func [QuoteItems](#quoteitems) ```go func QuoteItems(arr []string) []string ``` QuoteItems quotes all items in array, mostly for debugging. #### func [ReplaceF](#replacef) ```go func ReplaceF(old, new string, n int) func(string) string ``` ReplaceF is the filter form of strings.Replace. #### func [ReplacePattern](#replacepattern) ```go func ReplacePattern(s, pattern, repl string) string ``` ReplacePattern replaces string with regexp string. ReplacePattern returns a copy of src, replacing matches of the Regexp with the replacement string repl. Inside repl, $ signs are interpreted as in Expand, so for instance $1 represents the text of the first submatch. #### func [ReplacePatternF](#replacepatternf) ```go func ReplacePatternF(pattern, repl string) func(string) string ``` ReplacePatternF is the filter form of ReplaceRegexp. #### func [Reverse](#reverse) ```go func Reverse(s string) string ``` Reverse a string #### func [Right](#right) ```go func Right(s string, n int) string ``` Right returns the right substring of length n. #### func [RightF](#rightf) ```go func RightF(n int) func(string) string ``` RightF is the Filter version of Right. #### func [RightOf](#rightof) ```go func RightOf(s string, prefix string) string ``` RightOf returns the substring to the right of prefix. #### func [SetTemplateDelimiters](#settemplatedelimiters) ```go func SetTemplateDelimiters(opening, closing string) ``` SetTemplateDelimiters sets the delimiters for Template function. Defaults to "{{" and "}}" #### func [Slice](#slice) ```go func Slice(s string, start, end int) string ``` Slice slices a string. If end is negative then it is the from the end of the string. #### func [SliceContains](#slicecontains) ```go func SliceContains(slice []string, val string) bool ``` SliceContains determines whether val is an element in slice. #### func [SliceF](#slicef) ```go func SliceF(start, end int) func(string) string ``` SliceF is the filter for Slice. #### func [SliceIndexOf](#sliceindexof) ```go func SliceIndexOf(slice []string, val string) int ``` SliceIndexOf gets the indx of val in slice. Returns -1 if not found. #### func [Slugify](#slugify) ```go func Slugify(s string) string ``` Slugify converts s into a dasherized string suitable for URL segment. #### func [StripPunctuation](#strippunctuation) ```go func StripPunctuation(s string) string ``` StripPunctuation strips puncation from string. #### func [StripTags](#striptags) ```go func StripTags(s string, tags ...string) string ``` StripTags strips all of the html tags or tags specified by the parameters #### func [Substr](#substr) ```go func Substr(s string, index int, n int) string ``` Substr returns a substring of s starting at index of length n. #### func [SubstrF](#substrf) ```go func SubstrF(index, n int) func(string) string ``` SubstrF is the filter form of Substr. #### func [Template](#template) ```go func Template(s string, values map[string]interface{}) string ``` Template is a string template which replaces template placeholders delimited by "{{" and "}}" with values from map. The global delimiters may be set with SetTemplateDelimiters. #### func [TemplateDelimiters](#templatedelimiters) ```go func TemplateDelimiters() (opening string, closing string) ``` TemplateDelimiters is the getter for the opening and closing delimiters for Template. #### func [TemplateWithDelimiters](#templatewithdelimiters) ```go func TemplateWithDelimiters(s string, values map[string]interface{}, opening, closing string) string ``` TemplateWithDelimiters is string template with user-defineable opening and closing delimiters. #### func [ToArgv](#toargv) ```go func ToArgv(s string) []string ``` ToArgv converts string s into an argv for exec. #### func [ToBool](#tobool) ```go func ToBool(s string) bool ``` ToBool fuzzily converts truthy values. #### func [ToBoolOr](#toboolor) ```go func ToBoolOr(s string, defaultValue bool) bool ``` ToBoolOr parses s as a bool or returns defaultValue. #### func [ToFloat32Or](#tofloat32or) ```go func ToFloat32Or(s string, defaultValue float32) float32 ``` ToFloat32Or parses as a float32 or returns defaultValue on error. #### func [ToFloat64Or](#tofloat64or) ```go func ToFloat64Or(s string, defaultValue float64) float64 ``` ToFloat64Or parses s as a float64 or returns defaultValue. #### func [ToIntOr](#tointor) ```go func ToIntOr(s string, defaultValue int) int ``` ToIntOr parses s as an int or returns defaultValue. #### func [Underscore](#underscore) ```go func Underscore(s string) string ``` Underscore returns converted camel cased string into a string delimited by underscores. #### func [UnescapeHTML](#unescapehtml) ```go func UnescapeHTML(s string) string ``` UnescapeHTML is an alias for html.UnescapeString. #### func [WrapHTML](#wraphtml) ```go func WrapHTML(s string, tag string, attrs map[string]string) string ``` WrapHTML wraps s within HTML tag having attributes attrs. Note, WrapHTML does not escape s value. #### func [WrapHTMLF](#wraphtmlf) ```go func WrapHTMLF(tag string, attrs map[string]string) func(string) string ``` WrapHTMLF is the filter form of WrapHTML. ================================================ FILE: vendor/github.com/mgutz/str/VERSION ================================================ 1.1.0 ================================================ FILE: vendor/github.com/mgutz/str/doc.go ================================================ // Package str is a comprehensive set of string functions to build more // Go awesomeness. Str complements Go's standard packages and does not duplicate // functionality found in `strings` or `strconv`. // // Str is based on plain functions instead of object-based methods, // consistent with Go standard string packages. // // str.Between("foo", "", "") == "foo" // // Str supports pipelining instead of chaining // // s := str.Pipe("\nabcdef\n", Clean, BetweenF("a", "f"), ChompLeftF("bc")) // // User-defined filters can be added to the pipeline by inserting a function // or closure that returns a function with this signature // // func(string) string // package str ================================================ FILE: vendor/github.com/mgutz/str/funcsAO.go ================================================ package str import ( "fmt" "html" //"log" "regexp" "strings" ) // Verbose flag enables console output for those functions that have // counterparts in Go's excellent stadard packages. var Verbose = false var templateOpen = "{{" var templateClose = "}}" var beginEndSpacesRe = regexp.MustCompile("^\\s+|\\s+$") var camelizeRe = regexp.MustCompile(`(\-|_|\s)+(.)?`) var camelizeRe2 = regexp.MustCompile(`(\-|_|\s)+`) var capitalsRe = regexp.MustCompile("([A-Z])") var dashSpaceRe = regexp.MustCompile(`[-\s]+`) var dashesRe = regexp.MustCompile("-+") var isAlphaNumericRe = regexp.MustCompile(`[^0-9a-z\xC0-\xFF]`) var isAlphaRe = regexp.MustCompile(`[^a-z\xC0-\xFF]`) var nWhitespaceRe = regexp.MustCompile(`\s+`) var notDigitsRe = regexp.MustCompile(`[^0-9]`) var slugifyRe = regexp.MustCompile(`[^\w\s\-]`) var spaceUnderscoreRe = regexp.MustCompile("[_\\s]+") var spacesRe = regexp.MustCompile("[\\s\\xA0]+") var stripPuncRe = regexp.MustCompile(`[^\w\s]|_`) var templateRe = regexp.MustCompile(`([\-\[\]()*\s])`) var templateRe2 = regexp.MustCompile(`\$`) var underscoreRe = regexp.MustCompile(`([a-z\d])([A-Z]+)`) var whitespaceRe = regexp.MustCompile(`^[\s\xa0]*$`) func min(a, b int) int { if a < b { return a } return b } func max(a, b int) int { if a > b { return a } return b } // Between extracts a string between left and right strings. func Between(s, left, right string) string { l := len(left) startPos := strings.Index(s, left) if startPos < 0 { return "" } endPos := IndexOf(s, right, startPos+l) //log.Printf("%s: left %s right %s start %d end %d", s, left, right, startPos+l, endPos) if endPos < 0 { return "" } else if right == "" { return s[endPos:] } else { return s[startPos+l : endPos] } } // BetweenF is the filter form for Between. func BetweenF(left, right string) func(string) string { return func(s string) string { return Between(s, left, right) } } // Camelize return new string which removes any underscores or dashes and convert a string into camel casing. func Camelize(s string) string { return camelizeRe.ReplaceAllStringFunc(s, func(val string) string { val = strings.ToUpper(val) val = camelizeRe2.ReplaceAllString(val, "") return val }) } // Capitalize uppercases the first char of s and lowercases the rest. func Capitalize(s string) string { return strings.ToUpper(s[0:1]) + strings.ToLower(s[1:]) } // CharAt returns a string from the character at the specified position. func CharAt(s string, index int) string { l := len(s) shortcut := index < 0 || index > l-1 || l == 0 if shortcut { return "" } return s[index : index+1] } // CharAtF is the filter form of CharAt. func CharAtF(index int) func(string) string { return func(s string) string { return CharAt(s, index) } } // ChompLeft removes prefix at the start of a string. func ChompLeft(s, prefix string) string { if strings.HasPrefix(s, prefix) { return s[len(prefix):] } return s } // ChompLeftF is the filter form of ChompLeft. func ChompLeftF(prefix string) func(string) string { return func(s string) string { return ChompLeft(s, prefix) } } // ChompRight removes suffix from end of s. func ChompRight(s, suffix string) string { if strings.HasSuffix(s, suffix) { return s[:len(s)-len(suffix)] } return s } // ChompRightF is the filter form of ChompRight. func ChompRightF(suffix string) func(string) string { return func(s string) string { return ChompRight(s, suffix) } } // Classify returns a camelized string with the first letter upper cased. func Classify(s string) string { return Camelize("-" + s) } // ClassifyF is the filter form of Classify. func ClassifyF(s string) func(string) string { return func(s string) string { return Classify(s) } } // Clean compresses all adjacent whitespace to a single space and trims s. func Clean(s string) string { s = spacesRe.ReplaceAllString(s, " ") s = beginEndSpacesRe.ReplaceAllString(s, "") return s } // Dasherize converts a camel cased string into a string delimited by dashes. func Dasherize(s string) string { s = strings.TrimSpace(s) s = spaceUnderscoreRe.ReplaceAllString(s, "-") s = capitalsRe.ReplaceAllString(s, "-$1") s = dashesRe.ReplaceAllString(s, "-") s = strings.ToLower(s) return s } // EscapeHTML is alias for html.EscapeString. func EscapeHTML(s string) string { if Verbose { fmt.Println("Use html.EscapeString instead of EscapeHTML") } return html.EscapeString(s) } // DecodeHTMLEntities decodes HTML entities into their proper string representation. // DecodeHTMLEntities is an alias for html.UnescapeString func DecodeHTMLEntities(s string) string { if Verbose { fmt.Println("Use html.UnescapeString instead of DecodeHTMLEntities") } return html.UnescapeString(s) } // EnsurePrefix ensures s starts with prefix. func EnsurePrefix(s, prefix string) string { if strings.HasPrefix(s, prefix) { return s } return prefix + s } // EnsurePrefixF is the filter form of EnsurePrefix. func EnsurePrefixF(prefix string) func(string) string { return func(s string) string { return EnsurePrefix(s, prefix) } } // EnsureSuffix ensures s ends with suffix. func EnsureSuffix(s, suffix string) string { if strings.HasSuffix(s, suffix) { return s } return s + suffix } // EnsureSuffixF is the filter form of EnsureSuffix. func EnsureSuffixF(suffix string) func(string) string { return func(s string) string { return EnsureSuffix(s, suffix) } } // Humanize transforms s into a human friendly form. func Humanize(s string) string { if s == "" { return s } s = Underscore(s) var humanizeRe = regexp.MustCompile(`_id$`) s = humanizeRe.ReplaceAllString(s, "") s = strings.Replace(s, "_", " ", -1) s = strings.TrimSpace(s) s = Capitalize(s) return s } // Iif is short for immediate if. If condition is true return truthy else falsey. func Iif(condition bool, truthy string, falsey string) string { if condition { return truthy } return falsey } // IndexOf finds the index of needle in s starting from start. func IndexOf(s string, needle string, start int) int { l := len(s) if needle == "" { if start < 0 { return 0 } else if start < l { return start } else { return l } } if start < 0 || start > l-1 { return -1 } pos := strings.Index(s[start:], needle) if pos == -1 { return -1 } return start + pos } // IsAlpha returns true if a string contains only letters from ASCII (a-z,A-Z). Other letters from other languages are not supported. func IsAlpha(s string) bool { return !isAlphaRe.MatchString(strings.ToLower(s)) } // IsAlphaNumeric returns true if a string contains letters and digits. func IsAlphaNumeric(s string) bool { return !isAlphaNumericRe.MatchString(strings.ToLower(s)) } // IsLower returns true if s comprised of all lower case characters. func IsLower(s string) bool { return IsAlpha(s) && s == strings.ToLower(s) } // IsNumeric returns true if a string contains only digits from 0-9. Other digits not in Latin (such as Arabic) are not currently supported. func IsNumeric(s string) bool { return !notDigitsRe.MatchString(s) } // IsUpper returns true if s contains all upper case chracters. func IsUpper(s string) bool { return IsAlpha(s) && s == strings.ToUpper(s) } // IsEmpty returns true if the string is solely composed of whitespace. func IsEmpty(s string) bool { if s == "" { return true } return whitespaceRe.MatchString(s) } // Left returns the left substring of length n. func Left(s string, n int) string { if n < 0 { return Right(s, -n) } return Substr(s, 0, n) } // LeftF is the filter form of Left. func LeftF(n int) func(string) string { return func(s string) string { return Left(s, n) } } // LeftOf returns the substring left of needle. func LeftOf(s string, needle string) string { return Between(s, "", needle) } // Letters returns an array of runes as strings so it can be indexed into. func Letters(s string) []string { result := []string{} for _, r := range s { result = append(result, string(r)) } return result } // Lines convert windows newlines to unix newlines then convert to an Array of lines. func Lines(s string) []string { s = strings.Replace(s, "\r\n", "\n", -1) return strings.Split(s, "\n") } // Map maps an array's iitem through an iterator. func Map(arr []string, iterator func(string) string) []string { r := []string{} for _, item := range arr { r = append(r, iterator(item)) } return r } // Match returns true if patterns matches the string func Match(s, pattern string) bool { r := regexp.MustCompile(pattern) return r.MatchString(s) } ================================================ FILE: vendor/github.com/mgutz/str/funcsPZ.go ================================================ package str import ( "fmt" "html" //"log" "math" "regexp" "runtime" "strconv" "strings" "unicode/utf8" ) // Pad pads string s on both sides with c until it has length of n. func Pad(s, c string, n int) string { L := len(s) if L >= n { return s } n -= L left := strings.Repeat(c, int(math.Ceil(float64(n)/2))) right := strings.Repeat(c, int(math.Floor(float64(n)/2))) return left + s + right } // PadF is the filter form of Pad. func PadF(c string, n int) func(string) string { return func(s string) string { return Pad(s, c, n) } } // PadLeft pads s on left side with c until it has length of n. func PadLeft(s, c string, n int) string { L := len(s) if L > n { return s } return strings.Repeat(c, (n-L)) + s } // PadLeftF is the filter form of PadLeft. func PadLeftF(c string, n int) func(string) string { return func(s string) string { return PadLeft(s, c, n) } } // PadRight pads s on right side with c until it has length of n. func PadRight(s, c string, n int) string { L := len(s) if L > n { return s } return s + strings.Repeat(c, n-L) } // PadRightF is the filter form of Padright func PadRightF(c string, n int) func(string) string { return func(s string) string { return PadRight(s, c, n) } } // Pipe pipes s through one or more string filters. func Pipe(s string, funcs ...func(string) string) string { for _, fn := range funcs { s = fn(s) } return s } // QuoteItems quotes all items in array, mostly for debugging. func QuoteItems(arr []string) []string { return Map(arr, func(s string) string { return strconv.Quote(s) }) } // ReplaceF is the filter form of strings.Replace. func ReplaceF(old, new string, n int) func(string) string { return func(s string) string { return strings.Replace(s, old, new, n) } } // ReplacePattern replaces string with regexp string. // ReplacePattern returns a copy of src, replacing matches of the Regexp with the replacement string repl. Inside repl, $ signs are interpreted as in Expand, so for instance $1 represents the text of the first submatch. func ReplacePattern(s, pattern, repl string) string { r := regexp.MustCompile(pattern) return r.ReplaceAllString(s, repl) } // ReplacePatternF is the filter form of ReplaceRegexp. func ReplacePatternF(pattern, repl string) func(string) string { return func(s string) string { return ReplacePattern(s, pattern, repl) } } // Reverse a string func Reverse(s string) string { cs := make([]rune, utf8.RuneCountInString(s)) i := len(cs) for _, c := range s { i-- cs[i] = c } return string(cs) } // Right returns the right substring of length n. func Right(s string, n int) string { if n < 0 { return Left(s, -n) } return Substr(s, len(s)-n, n) } // RightF is the Filter version of Right. func RightF(n int) func(string) string { return func(s string) string { return Right(s, n) } } // RightOf returns the substring to the right of prefix. func RightOf(s string, prefix string) string { return Between(s, prefix, "") } // SetTemplateDelimiters sets the delimiters for Template function. Defaults to "{{" and "}}" func SetTemplateDelimiters(opening, closing string) { templateOpen = opening templateClose = closing } // Slice slices a string. If end is negative then it is the from the end // of the string. func Slice(s string, start, end int) string { if end > -1 { return s[start:end] } L := len(s) if L+end > 0 { return s[start : L-end] } return s[start:] } // SliceF is the filter for Slice. func SliceF(start, end int) func(string) string { return func(s string) string { return Slice(s, start, end) } } // SliceContains determines whether val is an element in slice. func SliceContains(slice []string, val string) bool { if slice == nil { return false } for _, it := range slice { if it == val { return true } } return false } // SliceIndexOf gets the indx of val in slice. Returns -1 if not found. func SliceIndexOf(slice []string, val string) int { if slice == nil { return -1 } for i, it := range slice { if it == val { return i } } return -1 } // Slugify converts s into a dasherized string suitable for URL segment. func Slugify(s string) string { sl := slugifyRe.ReplaceAllString(s, "") sl = strings.ToLower(sl) sl = Dasherize(sl) return sl } // StripPunctuation strips puncation from string. func StripPunctuation(s string) string { s = stripPuncRe.ReplaceAllString(s, "") s = nWhitespaceRe.ReplaceAllString(s, " ") return s } // StripTags strips all of the html tags or tags specified by the parameters func StripTags(s string, tags ...string) string { if len(tags) == 0 { tags = append(tags, "") } for _, tag := range tags { stripTagsRe := regexp.MustCompile(`(?i)<\/?` + tag + `[^<>]*>`) s = stripTagsRe.ReplaceAllString(s, "") } return s } // Substr returns a substring of s starting at index of length n. func Substr(s string, index int, n int) string { L := len(s) if index < 0 || index >= L || s == "" { return "" } end := index + n if end >= L { end = L } if end <= index { return "" } return s[index:end] } // SubstrF is the filter form of Substr. func SubstrF(index, n int) func(string) string { return func(s string) string { return Substr(s, index, n) } } // Template is a string template which replaces template placeholders delimited // by "{{" and "}}" with values from map. The global delimiters may be set with // SetTemplateDelimiters. func Template(s string, values map[string]interface{}) string { return TemplateWithDelimiters(s, values, templateOpen, templateClose) } // TemplateDelimiters is the getter for the opening and closing delimiters for Template. func TemplateDelimiters() (opening string, closing string) { return templateOpen, templateClose } // TemplateWithDelimiters is string template with user-defineable opening and closing delimiters. func TemplateWithDelimiters(s string, values map[string]interface{}, opening, closing string) string { escapeDelimiter := func(delim string) string { result := templateRe.ReplaceAllString(delim, "\\$1") return templateRe2.ReplaceAllString(result, "\\$") } openingDelim := escapeDelimiter(opening) closingDelim := escapeDelimiter(closing) r := regexp.MustCompile(openingDelim + `(.+?)` + closingDelim) matches := r.FindAllStringSubmatch(s, -1) for _, submatches := range matches { match := submatches[0] key := submatches[1] //log.Printf("match %s key %s\n", match, key) if values[key] != nil { v := fmt.Sprintf("%v", values[key]) s = strings.Replace(s, match, v, -1) } } return s } // ToArgv converts string s into an argv for exec. func ToArgv(s string) []string { const ( InArg = iota InArgQuote OutOfArg ) currentState := OutOfArg currentQuoteChar := "\x00" // to distinguish between ' and " quotations // this allows to use "foo'bar" currentArg := "" argv := []string{} isQuote := func(c string) bool { return c == `"` || c == `'` } isEscape := func(c string) bool { return c == `\` } isWhitespace := func(c string) bool { return c == " " || c == "\t" } L := len(s) for i := 0; i < L; i++ { c := s[i : i+1] //fmt.Printf("c %s state %v arg %s argv %v i %d\n", c, currentState, currentArg, args, i) if isQuote(c) { switch currentState { case OutOfArg: currentArg = "" fallthrough case InArg: currentState = InArgQuote currentQuoteChar = c case InArgQuote: if c == currentQuoteChar { currentState = InArg } else { currentArg += c } } } else if isWhitespace(c) { switch currentState { case InArg: argv = append(argv, currentArg) currentState = OutOfArg case InArgQuote: currentArg += c case OutOfArg: // nothing } } else if isEscape(c) { switch currentState { case OutOfArg: currentArg = "" currentState = InArg fallthrough case InArg: fallthrough case InArgQuote: if i == L-1 { if runtime.GOOS == "windows" { // just add \ to end for windows currentArg += c } else { panic("Escape character at end string") } } else { if runtime.GOOS == "windows" { peek := s[i+1 : i+2] if peek != `"` { currentArg += c } } else { i++ c = s[i : i+1] currentArg += c } } } } else { switch currentState { case InArg, InArgQuote: currentArg += c case OutOfArg: currentArg = "" currentArg += c currentState = InArg } } } if currentState == InArg { argv = append(argv, currentArg) } else if currentState == InArgQuote { panic("Starting quote has no ending quote.") } return argv } // ToBool fuzzily converts truthy values. func ToBool(s string) bool { s = strings.ToLower(s) return s == "true" || s == "yes" || s == "on" || s == "1" } // ToBoolOr parses s as a bool or returns defaultValue. func ToBoolOr(s string, defaultValue bool) bool { b, err := strconv.ParseBool(s) if err != nil { return defaultValue } return b } // ToIntOr parses s as an int or returns defaultValue. func ToIntOr(s string, defaultValue int) int { n, err := strconv.Atoi(s) if err != nil { return defaultValue } return n } // ToFloat32Or parses as a float32 or returns defaultValue on error. func ToFloat32Or(s string, defaultValue float32) float32 { f, err := strconv.ParseFloat(s, 32) if err != nil { return defaultValue } return float32(f) } // ToFloat64Or parses s as a float64 or returns defaultValue. func ToFloat64Or(s string, defaultValue float64) float64 { f, err := strconv.ParseFloat(s, 64) if err != nil { return defaultValue } return f } // ToFloatOr parses as a float64 or returns defaultValue. var ToFloatOr = ToFloat64Or // TODO This is not working yet. Go's regexp package does not have some // of the niceities in JavaScript // // Truncate truncates the string, accounting for word placement and chars count // adding a morestr (defaults to ellipsis) // func Truncate(s, morestr string, n int) string { // L := len(s) // if L <= n { // return s // } // // if morestr == "" { // morestr = "..." // } // // tmpl := func(c string) string { // if strings.ToUpper(c) != strings.ToLower(c) { // return "A" // } // return " " // } // template := s[0 : n+1] // var truncateRe = regexp.MustCompile(`.(?=\W*\w*$)`) // truncateRe.ReplaceAllStringFunc(template, tmpl) // 'Hello, world' -> 'HellAA AAAAA' // var wwRe = regexp.MustCompile(`\w\w`) // var whitespaceRe2 = regexp.MustCompile(`\s*\S+$`) // if wwRe.MatchString(template[len(template)-2:]) { // template = whitespaceRe2.ReplaceAllString(template, "") // } else { // template = strings.TrimRight(template, " \t\n") // } // // if len(template+morestr) > L { // return s // } // return s[0:len(template)] + morestr // } // // truncate: function(length, pruneStr) { //from underscore.string, author: github.com/rwz // var str = this.s; // // length = ~~length; // pruneStr = pruneStr || '...'; // // if (str.length <= length) return new this.constructor(str); // // var tmpl = function(c){ return c.toUpperCase() !== c.toLowerCase() ? 'A' : ' '; }, // template = str.slice(0, length+1).replace(/.(?=\W*\w*$)/g, tmpl); // 'Hello, world' -> 'HellAA AAAAA' // // if (template.slice(template.length-2).match(/\w\w/)) // template = template.replace(/\s*\S+$/, ''); // else // template = new S(template.slice(0, template.length-1)).trimRight().s; // // return (template+pruneStr).length > str.length ? new S(str) : new S(str.slice(0, template.length)+pruneStr); // }, // Underscore returns converted camel cased string into a string delimited by underscores. func Underscore(s string) string { if s == "" { return "" } u := strings.TrimSpace(s) u = underscoreRe.ReplaceAllString(u, "${1}_$2") u = dashSpaceRe.ReplaceAllString(u, "_") u = strings.ToLower(u) if IsUpper(s[0:1]) { return "_" + u } return u } // UnescapeHTML is an alias for html.UnescapeString. func UnescapeHTML(s string) string { if Verbose { fmt.Println("Use html.UnescapeString instead of UnescapeHTML") } return html.UnescapeString(s) } // WrapHTML wraps s within HTML tag having attributes attrs. Note, // WrapHTML does not escape s value. func WrapHTML(s string, tag string, attrs map[string]string) string { escapeHTMLAttributeQuotes := func(v string) string { v = strings.Replace(v, "<", "<", -1) v = strings.Replace(v, "&", "&", -1) v = strings.Replace(v, "\"", """, -1) return v } if tag == "" { tag = "div" } el := "<" + tag for name, val := range attrs { el += " " + name + "=\"" + escapeHTMLAttributeQuotes(val) + "\"" } el += ">" + s + "" return el } // WrapHTMLF is the filter form of WrapHTML. func WrapHTMLF(tag string, attrs map[string]string) func(string) string { return func(s string) string { return WrapHTML(s, tag, attrs) } } ================================================ FILE: vendor/github.com/moby/docker-image-spec/LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor 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, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/github.com/moby/docker-image-spec/specs-go/v1/image.go ================================================ package v1 import ( "time" ocispec "github.com/opencontainers/image-spec/specs-go/v1" ) const DockerOCIImageMediaType = "application/vnd.docker.container.image.v1+json" // DockerOCIImage is a ocispec.Image extended with Docker specific Config. type DockerOCIImage struct { ocispec.Image // Shadow ocispec.Image.Config Config DockerOCIImageConfig `json:"config,omitempty"` } // DockerOCIImageConfig is a ocispec.ImageConfig extended with Docker specific fields. type DockerOCIImageConfig struct { ocispec.ImageConfig DockerOCIImageConfigExt } // DockerOCIImageConfigExt contains Docker-specific fields in DockerImageConfig. type DockerOCIImageConfigExt struct { Healthcheck *HealthcheckConfig `json:",omitempty"` // Healthcheck describes how to check the container is healthy OnBuild []string `json:",omitempty"` // ONBUILD metadata that were defined on the image Dockerfile Shell []string `json:",omitempty"` // Shell for shell-form of RUN, CMD, ENTRYPOINT } // HealthcheckConfig holds configuration settings for the HEALTHCHECK feature. type HealthcheckConfig struct { // Test is the test to perform to check that the container is healthy. // An empty slice means to inherit the default. // The options are: // {} : inherit healthcheck // {"NONE"} : disable healthcheck // {"CMD", args...} : exec arguments directly // {"CMD-SHELL", command} : run command with system's default shell Test []string `json:",omitempty"` // Zero means to inherit. Durations are expressed as integer nanoseconds. Interval time.Duration `json:",omitempty"` // Interval is the time to wait between checks. Timeout time.Duration `json:",omitempty"` // Timeout is the time to wait before considering the check to have hung. StartPeriod time.Duration `json:",omitempty"` // The start period for the container to initialize before the retries starts to count down. StartInterval time.Duration `json:",omitempty"` // The interval to attempt healthchecks at during the start period // Retries is the number of consecutive failures needed to consider a container as unhealthy. // Zero means inherit. Retries int `json:",omitempty"` } ================================================ FILE: vendor/github.com/moby/sys/atomicwriter/LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor 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, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/github.com/moby/sys/atomicwriter/atomicwriter.go ================================================ // Package atomicwriter provides utilities to perform atomic writes to a // file or set of files. package atomicwriter import ( "errors" "fmt" "io" "os" "path/filepath" "syscall" "github.com/moby/sys/sequential" ) func validateDestination(fileName string) error { if fileName == "" { return errors.New("file name is empty") } if dir := filepath.Dir(fileName); dir != "" && dir != "." && dir != ".." { di, err := os.Stat(dir) if err != nil { return fmt.Errorf("invalid output path: %w", err) } if !di.IsDir() { return fmt.Errorf("invalid output path: %w", &os.PathError{Op: "stat", Path: dir, Err: syscall.ENOTDIR}) } } // Deliberately using Lstat here to match the behavior of [os.Rename], // which is used when completing the write and does not resolve symlinks. fi, err := os.Lstat(fileName) if err != nil { if os.IsNotExist(err) { return nil } return fmt.Errorf("failed to stat output path: %w", err) } switch mode := fi.Mode(); { case mode.IsRegular(): return nil // Regular file case mode&os.ModeDir != 0: return errors.New("cannot write to a directory") case mode&os.ModeSymlink != 0: return errors.New("cannot write to a symbolic link directly") case mode&os.ModeNamedPipe != 0: return errors.New("cannot write to a named pipe (FIFO)") case mode&os.ModeSocket != 0: return errors.New("cannot write to a socket") case mode&os.ModeDevice != 0: if mode&os.ModeCharDevice != 0 { return errors.New("cannot write to a character device file") } return errors.New("cannot write to a block device file") case mode&os.ModeSetuid != 0: return errors.New("cannot write to a setuid file") case mode&os.ModeSetgid != 0: return errors.New("cannot write to a setgid file") case mode&os.ModeSticky != 0: return errors.New("cannot write to a sticky bit file") default: return fmt.Errorf("unknown file mode: %[1]s (%#[1]o)", mode) } } // New returns a WriteCloser so that writing to it writes to a // temporary file and closing it atomically changes the temporary file to // destination path. Writing and closing concurrently is not allowed. // NOTE: umask is not considered for the file's permissions. // // New uses [sequential.CreateTemp] to use sequential file access on Windows, // avoiding depleting the standby list un-necessarily. On Linux, this equates to // a regular [os.CreateTemp]. Refer to the [Win32 API documentation] for details // on sequential file access. // // [Win32 API documentation]: https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea#FILE_FLAG_SEQUENTIAL_SCAN func New(filename string, perm os.FileMode) (io.WriteCloser, error) { if err := validateDestination(filename); err != nil { return nil, err } abspath, err := filepath.Abs(filename) if err != nil { return nil, err } f, err := sequential.CreateTemp(filepath.Dir(abspath), ".tmp-"+filepath.Base(filename)) if err != nil { return nil, err } return &atomicFileWriter{ f: f, fn: abspath, perm: perm, }, nil } // WriteFile atomically writes data to a file named by filename and with the // specified permission bits. The given filename is created if it does not exist, // but the destination directory must exist. It can be used as a drop-in replacement // for [os.WriteFile], but currently does not allow the destination path to be // a symlink. WriteFile is implemented using [New] for its implementation. // // NOTE: umask is not considered for the file's permissions. func WriteFile(filename string, data []byte, perm os.FileMode) error { f, err := New(filename, perm) if err != nil { return err } n, err := f.Write(data) if err == nil && n < len(data) { err = io.ErrShortWrite f.(*atomicFileWriter).writeErr = err } if err1 := f.Close(); err == nil { err = err1 } return err } type atomicFileWriter struct { f *os.File fn string writeErr error written bool perm os.FileMode } func (w *atomicFileWriter) Write(dt []byte) (int, error) { w.written = true n, err := w.f.Write(dt) if err != nil { w.writeErr = err } return n, err } func (w *atomicFileWriter) Close() (retErr error) { defer func() { if err := os.Remove(w.f.Name()); !errors.Is(err, os.ErrNotExist) && retErr == nil { retErr = err } }() if err := w.f.Sync(); err != nil { _ = w.f.Close() return err } if err := w.f.Close(); err != nil { return err } if err := os.Chmod(w.f.Name(), w.perm); err != nil { return err } if w.writeErr == nil && w.written { return os.Rename(w.f.Name(), w.fn) } return nil } // WriteSet is used to atomically write a set // of files and ensure they are visible at the same time. // Must be committed to a new directory. type WriteSet struct { root string } // NewWriteSet creates a new atomic write set to // atomically create a set of files. The given directory // is used as the base directory for storing files before // commit. If no temporary directory is given the system // default is used. func NewWriteSet(tmpDir string) (*WriteSet, error) { td, err := os.MkdirTemp(tmpDir, "write-set-") if err != nil { return nil, err } return &WriteSet{ root: td, }, nil } // WriteFile writes a file to the set, guaranteeing the file // has been synced. func (ws *WriteSet) WriteFile(filename string, data []byte, perm os.FileMode) error { f, err := ws.FileWriter(filename, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, perm) if err != nil { return err } n, err := f.Write(data) if err == nil && n < len(data) { err = io.ErrShortWrite } if err1 := f.Close(); err == nil { err = err1 } return err } type syncFileCloser struct { *os.File } func (w syncFileCloser) Close() error { err := w.File.Sync() if err1 := w.File.Close(); err == nil { err = err1 } return err } // FileWriter opens a file writer inside the set. The file // should be synced and closed before calling commit. // // FileWriter uses [sequential.OpenFile] to use sequential file access on Windows, // avoiding depleting the standby list un-necessarily. On Linux, this equates to // a regular [os.OpenFile]. Refer to the [Win32 API documentation] for details // on sequential file access. // // [Win32 API documentation]: https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea#FILE_FLAG_SEQUENTIAL_SCAN func (ws *WriteSet) FileWriter(name string, flag int, perm os.FileMode) (io.WriteCloser, error) { f, err := sequential.OpenFile(filepath.Join(ws.root, name), flag, perm) if err != nil { return nil, err } return syncFileCloser{f}, nil } // Cancel cancels the set and removes all temporary data // created in the set. func (ws *WriteSet) Cancel() error { return os.RemoveAll(ws.root) } // Commit moves all created files to the target directory. The // target directory must not exist and the parent of the target // directory must exist. func (ws *WriteSet) Commit(target string) error { return os.Rename(ws.root, target) } // String returns the location the set is writing to. func (ws *WriteSet) String() string { return ws.root } ================================================ FILE: vendor/github.com/moby/sys/sequential/LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor 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, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/github.com/moby/sys/sequential/doc.go ================================================ // Package sequential provides a set of functions for managing sequential // files on Windows. // // The origin of these functions are the golang OS and windows packages, // slightly modified to only cope with files, not directories due to the // specific use case. // // The alteration is to allow a file on Windows to be opened with // FILE_FLAG_SEQUENTIAL_SCAN (particular for docker load), to avoid eating // the standby list, particularly when accessing large files such as layer.tar. // // For non-Windows platforms, the package provides wrappers for the equivalents // in the os packages. They are passthrough on Unix platforms, and only relevant // on Windows. package sequential ================================================ FILE: vendor/github.com/moby/sys/sequential/sequential_unix.go ================================================ //go:build !windows // +build !windows package sequential import "os" // Create is an alias for [os.Create] on non-Windows platforms. func Create(name string) (*os.File, error) { return os.Create(name) } // Open is an alias for [os.Open] on non-Windows platforms. func Open(name string) (*os.File, error) { return os.Open(name) } // OpenFile is an alias for [os.OpenFile] on non-Windows platforms. func OpenFile(name string, flag int, perm os.FileMode) (*os.File, error) { return os.OpenFile(name, flag, perm) } // CreateTemp is an alias for [os.CreateTemp] on non-Windows platforms. func CreateTemp(dir, prefix string) (f *os.File, err error) { return os.CreateTemp(dir, prefix) } ================================================ FILE: vendor/github.com/moby/sys/sequential/sequential_windows.go ================================================ package sequential import ( "os" "path/filepath" "strconv" "sync" "time" "unsafe" "golang.org/x/sys/windows" ) // Create is a copy of [os.Create], modified to use sequential file access. // // It uses [windows.FILE_FLAG_SEQUENTIAL_SCAN] rather than [windows.FILE_ATTRIBUTE_NORMAL] // as implemented in golang. Refer to the [Win32 API documentation] for details // on sequential file access. // // [Win32 API documentation]: https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea#FILE_FLAG_SEQUENTIAL_SCAN func Create(name string) (*os.File, error) { return openFileSequential(name, windows.O_RDWR|windows.O_CREAT|windows.O_TRUNC) } // Open is a copy of [os.Open], modified to use sequential file access. // // It uses [windows.FILE_FLAG_SEQUENTIAL_SCAN] rather than [windows.FILE_ATTRIBUTE_NORMAL] // as implemented in golang. Refer to the [Win32 API documentation] for details // on sequential file access. // // [Win32 API documentation]: https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea#FILE_FLAG_SEQUENTIAL_SCAN func Open(name string) (*os.File, error) { return openFileSequential(name, windows.O_RDONLY) } // OpenFile is a copy of [os.OpenFile], modified to use sequential file access. // // It uses [windows.FILE_FLAG_SEQUENTIAL_SCAN] rather than [windows.FILE_ATTRIBUTE_NORMAL] // as implemented in golang. Refer to the [Win32 API documentation] for details // on sequential file access. // // [Win32 API documentation]: https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea#FILE_FLAG_SEQUENTIAL_SCAN func OpenFile(name string, flag int, _ os.FileMode) (*os.File, error) { return openFileSequential(name, flag) } func openFileSequential(name string, flag int) (file *os.File, err error) { if name == "" { return nil, &os.PathError{Op: "open", Path: name, Err: windows.ERROR_FILE_NOT_FOUND} } r, e := openSequential(name, flag|windows.O_CLOEXEC) if e != nil { return nil, &os.PathError{Op: "open", Path: name, Err: e} } return os.NewFile(uintptr(r), name), nil } func makeInheritSa() *windows.SecurityAttributes { var sa windows.SecurityAttributes sa.Length = uint32(unsafe.Sizeof(sa)) sa.InheritHandle = 1 return &sa } func openSequential(path string, mode int) (fd windows.Handle, err error) { if len(path) == 0 { return windows.InvalidHandle, windows.ERROR_FILE_NOT_FOUND } pathp, err := windows.UTF16PtrFromString(path) if err != nil { return windows.InvalidHandle, err } var access uint32 switch mode & (windows.O_RDONLY | windows.O_WRONLY | windows.O_RDWR) { case windows.O_RDONLY: access = windows.GENERIC_READ case windows.O_WRONLY: access = windows.GENERIC_WRITE case windows.O_RDWR: access = windows.GENERIC_READ | windows.GENERIC_WRITE } if mode&windows.O_CREAT != 0 { access |= windows.GENERIC_WRITE } if mode&windows.O_APPEND != 0 { access &^= windows.GENERIC_WRITE access |= windows.FILE_APPEND_DATA } sharemode := uint32(windows.FILE_SHARE_READ | windows.FILE_SHARE_WRITE) var sa *windows.SecurityAttributes if mode&windows.O_CLOEXEC == 0 { sa = makeInheritSa() } var createmode uint32 switch { case mode&(windows.O_CREAT|windows.O_EXCL) == (windows.O_CREAT | windows.O_EXCL): createmode = windows.CREATE_NEW case mode&(windows.O_CREAT|windows.O_TRUNC) == (windows.O_CREAT | windows.O_TRUNC): createmode = windows.CREATE_ALWAYS case mode&windows.O_CREAT == windows.O_CREAT: createmode = windows.OPEN_ALWAYS case mode&windows.O_TRUNC == windows.O_TRUNC: createmode = windows.TRUNCATE_EXISTING default: createmode = windows.OPEN_EXISTING } // Use FILE_FLAG_SEQUENTIAL_SCAN rather than FILE_ATTRIBUTE_NORMAL as implemented in golang. // https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea#FILE_FLAG_SEQUENTIAL_SCAN h, e := windows.CreateFile(pathp, access, sharemode, sa, createmode, windows.FILE_FLAG_SEQUENTIAL_SCAN, 0) return h, e } // Helpers for CreateTemp var ( rand uint32 randmu sync.Mutex ) func reseed() uint32 { return uint32(time.Now().UnixNano() + int64(os.Getpid())) } func nextSuffix() string { randmu.Lock() r := rand if r == 0 { r = reseed() } r = r*1664525 + 1013904223 // constants from Numerical Recipes rand = r randmu.Unlock() return strconv.Itoa(int(1e9 + r%1e9))[1:] } // CreateTemp is a copy of [os.CreateTemp], modified to use sequential file access. // // It uses [windows.FILE_FLAG_SEQUENTIAL_SCAN] rather than [windows.FILE_ATTRIBUTE_NORMAL] // as implemented in golang. Refer to the [Win32 API documentation] for details // on sequential file access. // // [Win32 API documentation]: https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea#FILE_FLAG_SEQUENTIAL_SCAN func CreateTemp(dir, prefix string) (f *os.File, err error) { if dir == "" { dir = os.TempDir() } nconflict := 0 for i := 0; i < 10000; i++ { name := filepath.Join(dir, prefix+nextSuffix()) f, err = openFileSequential(name, windows.O_RDWR|windows.O_CREAT|windows.O_EXCL) if os.IsExist(err) { if nconflict++; nconflict > 10 { randmu.Lock() rand = reseed() randmu.Unlock() } continue } break } return } ================================================ FILE: vendor/github.com/opencontainers/go-digest/.mailmap ================================================ Aaron Lehmann Derek McGowan Stephen J Day Haibing Zhou ================================================ FILE: vendor/github.com/opencontainers/go-digest/.pullapprove.yml ================================================ version: 2 requirements: signed_off_by: required: true always_pending: title_regex: '^WIP' explanation: 'Work in progress...' group_defaults: required: 2 approve_by_comment: enabled: true approve_regex: '^LGTM' reject_regex: '^Rejected' reset_on_push: enabled: true author_approval: ignored: true conditions: branches: - master groups: go-digest: teams: - go-digest-maintainers ================================================ FILE: vendor/github.com/opencontainers/go-digest/.travis.yml ================================================ language: go go: - 1.12.x - 1.13.x - master ================================================ FILE: vendor/github.com/opencontainers/go-digest/CONTRIBUTING.md ================================================ # Contributing to Docker open source projects Want to hack on this project? Awesome! Here are instructions to get you started. This project is a part of the [Docker](https://www.docker.com) project, and follows the same rules and principles. If you're already familiar with the way Docker does things, you'll feel right at home. Otherwise, go read Docker's [contributions guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md), [issue triaging](https://github.com/docker/docker/blob/master/project/ISSUE-TRIAGE.md), [review process](https://github.com/docker/docker/blob/master/project/REVIEWING.md) and [branches and tags](https://github.com/docker/docker/blob/master/project/BRANCHES-AND-TAGS.md). For an in-depth description of our contribution process, visit the contributors guide: [Understand how to contribute](https://docs.docker.com/opensource/workflow/make-a-contribution/) ### Sign your work The sign-off is a simple line at the end of the explanation for the patch. Your signature certifies that you wrote the patch or otherwise have the right to pass it on as an open-source patch. The rules are pretty simple: if you can certify the below (from [developercertificate.org](http://developercertificate.org/)): ``` Developer Certificate of Origin Version 1.1 Copyright (C) 2004, 2006 The Linux Foundation and its contributors. 1 Letterman Drive Suite D4700 San Francisco, CA, 94129 Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. ``` Then you just add a line to every git commit message: Signed-off-by: Joe Smith Use your real name (sorry, no pseudonyms or anonymous contributions.) If you set your `user.name` and `user.email` git configs, you can sign your commit automatically with `git commit -s`. ================================================ FILE: vendor/github.com/opencontainers/go-digest/LICENSE ================================================ Apache License Version 2.0, January 2004 https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor 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, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS Copyright 2019, 2020 OCI Contributors Copyright 2016 Docker, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/github.com/opencontainers/go-digest/LICENSE.docs ================================================ Attribution-ShareAlike 4.0 International ======================================================================= Creative Commons Corporation ("Creative Commons") is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an "as-is" basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. Using Creative Commons Public Licenses Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC- licensed material, or material used under an exception or limitation to copyright. More considerations for licensors: wiki.creativecommons.org/Considerations_for_licensors Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor's permission is not necessary for any reason--for example, because of any applicable exception or limitation to copyright--then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More_considerations for the public: wiki.creativecommons.org/Considerations_for_licensees ======================================================================= Creative Commons Attribution-ShareAlike 4.0 International Public License By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. Section 1 -- Definitions. a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. c. BY-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License. d. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. e. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. f. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. g. License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike. h. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. i. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. j. Licensor means the individual(s) or entity(ies) granting rights under this Public License. k. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. l. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. m. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. Section 2 -- Scope. a. License grant. 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: a. reproduce and Share the Licensed Material, in whole or in part; and b. produce, reproduce, and Share Adapted Material. 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. 3. Term. The term of this Public License is specified in Section 6(a). 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a) (4) never produces Adapted Material. 5. Downstream recipients. a. Offer from the Licensor -- Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. b. Additional offer from the Licensor -- Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter's License You apply. c. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). b. Other rights. 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. 2. Patent and trademark rights are not licensed under this Public License. 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. Section 3 -- License Conditions. Your exercise of the Licensed Rights is expressly made subject to the following conditions. a. Attribution. 1. If You Share the Licensed Material (including in modified form), You must: a. retain the following if it is supplied by the Licensor with the Licensed Material: i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); ii. a copyright notice; iii. a notice that refers to this Public License; iv. a notice that refers to the disclaimer of warranties; v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; b. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and c. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. b. ShareAlike. In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply. 1. The Adapter's License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License. 2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material. 3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply. Section 4 -- Sui Generis Database Rights. Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. Section 5 -- Disclaimer of Warranties and Limitation of Liability. a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. Section 6 -- Term and Termination. a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or 2. upon express reinstatement by the Licensor. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. Section 7 -- Other Terms and Conditions. a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. Section 8 -- Interpretation. a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. ======================================================================= Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the "Licensor." Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark "Creative Commons" or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. Creative Commons may be contacted at creativecommons.org. ================================================ FILE: vendor/github.com/opencontainers/go-digest/MAINTAINERS ================================================ Derek McGowan (@dmcgowan) Stephen Day (@stevvooe) Vincent Batts (@vbatts) Akihiro Suda (@AkihiroSuda) Sebastiaan van Stijn (@thaJeztah) ================================================ FILE: vendor/github.com/opencontainers/go-digest/README.md ================================================ # go-digest [![GoDoc](https://godoc.org/github.com/opencontainers/go-digest?status.svg)](https://godoc.org/github.com/opencontainers/go-digest) [![Go Report Card](https://goreportcard.com/badge/github.com/opencontainers/go-digest)](https://goreportcard.com/report/github.com/opencontainers/go-digest) [![Build Status](https://travis-ci.org/opencontainers/go-digest.svg?branch=master)](https://travis-ci.org/opencontainers/go-digest) Common digest package used across the container ecosystem. Please see the [godoc](https://godoc.org/github.com/opencontainers/go-digest) for more information. # What is a digest? A digest is just a [hash](https://en.wikipedia.org/wiki/Hash_function). The most common use case for a digest is to create a content identifier for use in [Content Addressable Storage](https://en.wikipedia.org/wiki/Content-addressable_storage) systems: ```go id := digest.FromBytes([]byte("my content")) ``` In the example above, the id can be used to uniquely identify the byte slice "my content". This allows two disparate applications to agree on a verifiable identifier without having to trust one another. An identifying digest can be verified, as follows: ```go if id != digest.FromBytes([]byte("my content")) { return errors.New("the content has changed!") } ``` A `Verifier` type can be used to handle cases where an `io.Reader` makes more sense: ```go rd := getContent() verifier := id.Verifier() io.Copy(verifier, rd) if !verifier.Verified() { return errors.New("the content has changed!") } ``` Using [Merkle DAGs](https://en.wikipedia.org/wiki/Merkle_tree), this can power a rich, safe, content distribution system. # Usage While the [godoc](https://godoc.org/github.com/opencontainers/go-digest) is considered the best resource, a few important items need to be called out when using this package. 1. Make sure to import the hash implementations into your application or the package will panic. You should have something like the following in the main (or other entrypoint) of your application: ```go import ( _ "crypto/sha256" _ "crypto/sha512" ) ``` This may seem inconvenient but it allows you replace the hash implementations with others, such as https://github.com/stevvooe/resumable. 2. Even though `digest.Digest` may be assemblable as a string, _always_ verify your input with `digest.Parse` or use `Digest.Validate` when accepting untrusted input. While there are measures to avoid common problems, this will ensure you have valid digests in the rest of your application. 3. While alternative encodings of hash values (digests) are possible (for example, base64), this package deals exclusively with hex-encoded digests. # Stability The Go API, at this stage, is considered stable, unless otherwise noted. As always, before using a package export, read the [godoc](https://godoc.org/github.com/opencontainers/go-digest). # Contributing This package is considered fairly complete. It has been in production in thousands (millions?) of deployments and is fairly battle-hardened. New additions will be met with skepticism. If you think there is a missing feature, please file a bug clearly describing the problem and the alternatives you tried before submitting a PR. ## Code of Conduct Participation in the OpenContainers community is governed by [OpenContainer's Code of Conduct][code-of-conduct]. ## Security If you find an issue, please follow the [security][security] protocol to report it. # Copyright and license Copyright © 2019, 2020 OCI Contributors Copyright © 2016 Docker, Inc. All rights reserved, except as follows. Code is released under the [Apache 2.0 license](LICENSE). This `README.md` file and the [`CONTRIBUTING.md`](CONTRIBUTING.md) file are licensed under the Creative Commons Attribution 4.0 International License under the terms and conditions set forth in the file [`LICENSE.docs`](LICENSE.docs). You may obtain a duplicate copy of the same license, titled CC BY-SA 4.0, at http://creativecommons.org/licenses/by-sa/4.0/. [security]: https://github.com/opencontainers/org/blob/master/security [code-of-conduct]: https://github.com/opencontainers/org/blob/master/CODE_OF_CONDUCT.md ================================================ FILE: vendor/github.com/opencontainers/go-digest/algorithm.go ================================================ // Copyright 2019, 2020 OCI Contributors // Copyright 2017 Docker, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package digest import ( "crypto" "fmt" "hash" "io" "regexp" ) // Algorithm identifies and implementation of a digester by an identifier. // Note the that this defines both the hash algorithm used and the string // encoding. type Algorithm string // supported digest types const ( SHA256 Algorithm = "sha256" // sha256 with hex encoding (lower case only) SHA384 Algorithm = "sha384" // sha384 with hex encoding (lower case only) SHA512 Algorithm = "sha512" // sha512 with hex encoding (lower case only) // Canonical is the primary digest algorithm used with the distribution // project. Other digests may be used but this one is the primary storage // digest. Canonical = SHA256 ) var ( // TODO(stevvooe): Follow the pattern of the standard crypto package for // registration of digests. Effectively, we are a registerable set and // common symbol access. // algorithms maps values to hash.Hash implementations. Other algorithms // may be available but they cannot be calculated by the digest package. algorithms = map[Algorithm]crypto.Hash{ SHA256: crypto.SHA256, SHA384: crypto.SHA384, SHA512: crypto.SHA512, } // anchoredEncodedRegexps contains anchored regular expressions for hex-encoded digests. // Note that /A-F/ disallowed. anchoredEncodedRegexps = map[Algorithm]*regexp.Regexp{ SHA256: regexp.MustCompile(`^[a-f0-9]{64}$`), SHA384: regexp.MustCompile(`^[a-f0-9]{96}$`), SHA512: regexp.MustCompile(`^[a-f0-9]{128}$`), } ) // Available returns true if the digest type is available for use. If this // returns false, Digester and Hash will return nil. func (a Algorithm) Available() bool { h, ok := algorithms[a] if !ok { return false } // check availability of the hash, as well return h.Available() } func (a Algorithm) String() string { return string(a) } // Size returns number of bytes returned by the hash. func (a Algorithm) Size() int { h, ok := algorithms[a] if !ok { return 0 } return h.Size() } // Set implemented to allow use of Algorithm as a command line flag. func (a *Algorithm) Set(value string) error { if value == "" { *a = Canonical } else { // just do a type conversion, support is queried with Available. *a = Algorithm(value) } if !a.Available() { return ErrDigestUnsupported } return nil } // Digester returns a new digester for the specified algorithm. If the algorithm // does not have a digester implementation, nil will be returned. This can be // checked by calling Available before calling Digester. func (a Algorithm) Digester() Digester { return &digester{ alg: a, hash: a.Hash(), } } // Hash returns a new hash as used by the algorithm. If not available, the // method will panic. Check Algorithm.Available() before calling. func (a Algorithm) Hash() hash.Hash { if !a.Available() { // Empty algorithm string is invalid if a == "" { panic(fmt.Sprintf("empty digest algorithm, validate before calling Algorithm.Hash()")) } // NOTE(stevvooe): A missing hash is usually a programming error that // must be resolved at compile time. We don't import in the digest // package to allow users to choose their hash implementation (such as // when using stevvooe/resumable or a hardware accelerated package). // // Applications that may want to resolve the hash at runtime should // call Algorithm.Available before call Algorithm.Hash(). panic(fmt.Sprintf("%v not available (make sure it is imported)", a)) } return algorithms[a].New() } // Encode encodes the raw bytes of a digest, typically from a hash.Hash, into // the encoded portion of the digest. func (a Algorithm) Encode(d []byte) string { // TODO(stevvooe): Currently, all algorithms use a hex encoding. When we // add support for back registration, we can modify this accordingly. return fmt.Sprintf("%x", d) } // FromReader returns the digest of the reader using the algorithm. func (a Algorithm) FromReader(rd io.Reader) (Digest, error) { digester := a.Digester() if _, err := io.Copy(digester.Hash(), rd); err != nil { return "", err } return digester.Digest(), nil } // FromBytes digests the input and returns a Digest. func (a Algorithm) FromBytes(p []byte) Digest { digester := a.Digester() if _, err := digester.Hash().Write(p); err != nil { // Writes to a Hash should never fail. None of the existing // hash implementations in the stdlib or hashes vendored // here can return errors from Write. Having a panic in this // condition instead of having FromBytes return an error value // avoids unnecessary error handling paths in all callers. panic("write to hash function returned error: " + err.Error()) } return digester.Digest() } // FromString digests the string input and returns a Digest. func (a Algorithm) FromString(s string) Digest { return a.FromBytes([]byte(s)) } // Validate validates the encoded portion string func (a Algorithm) Validate(encoded string) error { r, ok := anchoredEncodedRegexps[a] if !ok { return ErrDigestUnsupported } // Digests much always be hex-encoded, ensuring that their hex portion will // always be size*2 if a.Size()*2 != len(encoded) { return ErrDigestInvalidLength } if r.MatchString(encoded) { return nil } return ErrDigestInvalidFormat } ================================================ FILE: vendor/github.com/opencontainers/go-digest/digest.go ================================================ // Copyright 2019, 2020 OCI Contributors // Copyright 2017 Docker, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package digest import ( "fmt" "hash" "io" "regexp" "strings" ) // Digest allows simple protection of hex formatted digest strings, prefixed // by their algorithm. Strings of type Digest have some guarantee of being in // the correct format and it provides quick access to the components of a // digest string. // // The following is an example of the contents of Digest types: // // sha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc // // This allows to abstract the digest behind this type and work only in those // terms. type Digest string // NewDigest returns a Digest from alg and a hash.Hash object. func NewDigest(alg Algorithm, h hash.Hash) Digest { return NewDigestFromBytes(alg, h.Sum(nil)) } // NewDigestFromBytes returns a new digest from the byte contents of p. // Typically, this can come from hash.Hash.Sum(...) or xxx.SumXXX(...) // functions. This is also useful for rebuilding digests from binary // serializations. func NewDigestFromBytes(alg Algorithm, p []byte) Digest { return NewDigestFromEncoded(alg, alg.Encode(p)) } // NewDigestFromHex is deprecated. Please use NewDigestFromEncoded. func NewDigestFromHex(alg, hex string) Digest { return NewDigestFromEncoded(Algorithm(alg), hex) } // NewDigestFromEncoded returns a Digest from alg and the encoded digest. func NewDigestFromEncoded(alg Algorithm, encoded string) Digest { return Digest(fmt.Sprintf("%s:%s", alg, encoded)) } // DigestRegexp matches valid digest types. var DigestRegexp = regexp.MustCompile(`[a-z0-9]+(?:[.+_-][a-z0-9]+)*:[a-zA-Z0-9=_-]+`) // DigestRegexpAnchored matches valid digest types, anchored to the start and end of the match. var DigestRegexpAnchored = regexp.MustCompile(`^` + DigestRegexp.String() + `$`) var ( // ErrDigestInvalidFormat returned when digest format invalid. ErrDigestInvalidFormat = fmt.Errorf("invalid checksum digest format") // ErrDigestInvalidLength returned when digest has invalid length. ErrDigestInvalidLength = fmt.Errorf("invalid checksum digest length") // ErrDigestUnsupported returned when the digest algorithm is unsupported. ErrDigestUnsupported = fmt.Errorf("unsupported digest algorithm") ) // Parse parses s and returns the validated digest object. An error will // be returned if the format is invalid. func Parse(s string) (Digest, error) { d := Digest(s) return d, d.Validate() } // FromReader consumes the content of rd until io.EOF, returning canonical digest. func FromReader(rd io.Reader) (Digest, error) { return Canonical.FromReader(rd) } // FromBytes digests the input and returns a Digest. func FromBytes(p []byte) Digest { return Canonical.FromBytes(p) } // FromString digests the input and returns a Digest. func FromString(s string) Digest { return Canonical.FromString(s) } // Validate checks that the contents of d is a valid digest, returning an // error if not. func (d Digest) Validate() error { s := string(d) i := strings.Index(s, ":") if i <= 0 || i+1 == len(s) { return ErrDigestInvalidFormat } algorithm, encoded := Algorithm(s[:i]), s[i+1:] if !algorithm.Available() { if !DigestRegexpAnchored.MatchString(s) { return ErrDigestInvalidFormat } return ErrDigestUnsupported } return algorithm.Validate(encoded) } // Algorithm returns the algorithm portion of the digest. This will panic if // the underlying digest is not in a valid format. func (d Digest) Algorithm() Algorithm { return Algorithm(d[:d.sepIndex()]) } // Verifier returns a writer object that can be used to verify a stream of // content against the digest. If the digest is invalid, the method will panic. func (d Digest) Verifier() Verifier { return hashVerifier{ hash: d.Algorithm().Hash(), digest: d, } } // Encoded returns the encoded portion of the digest. This will panic if the // underlying digest is not in a valid format. func (d Digest) Encoded() string { return string(d[d.sepIndex()+1:]) } // Hex is deprecated. Please use Digest.Encoded. func (d Digest) Hex() string { return d.Encoded() } func (d Digest) String() string { return string(d) } func (d Digest) sepIndex() int { i := strings.Index(string(d), ":") if i < 0 { panic(fmt.Sprintf("no ':' separator in digest %q", d)) } return i } ================================================ FILE: vendor/github.com/opencontainers/go-digest/digester.go ================================================ // Copyright 2019, 2020 OCI Contributors // Copyright 2017 Docker, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package digest import "hash" // Digester calculates the digest of written data. Writes should go directly // to the return value of Hash, while calling Digest will return the current // value of the digest. type Digester interface { Hash() hash.Hash // provides direct access to underlying hash instance. Digest() Digest } // digester provides a simple digester definition that embeds a hasher. type digester struct { alg Algorithm hash hash.Hash } func (d *digester) Hash() hash.Hash { return d.hash } func (d *digester) Digest() Digest { return NewDigest(d.alg, d.hash) } ================================================ FILE: vendor/github.com/opencontainers/go-digest/doc.go ================================================ // Copyright 2019, 2020 OCI Contributors // Copyright 2017 Docker, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // Package digest provides a generalized type to opaquely represent message // digests and their operations within the registry. The Digest type is // designed to serve as a flexible identifier in a content-addressable system. // More importantly, it provides tools and wrappers to work with // hash.Hash-based digests with little effort. // // Basics // // The format of a digest is simply a string with two parts, dubbed the // "algorithm" and the "digest", separated by a colon: // // : // // An example of a sha256 digest representation follows: // // sha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc // // The "algorithm" portion defines both the hashing algorithm used to calculate // the digest and the encoding of the resulting digest, which defaults to "hex" // if not otherwise specified. Currently, all supported algorithms have their // digests encoded in hex strings. // // In the example above, the string "sha256" is the algorithm and the hex bytes // are the "digest". // // Because the Digest type is simply a string, once a valid Digest is // obtained, comparisons are cheap, quick and simple to express with the // standard equality operator. // // Verification // // The main benefit of using the Digest type is simple verification against a // given digest. The Verifier interface, modeled after the stdlib hash.Hash // interface, provides a common write sink for digest verification. After // writing is complete, calling the Verifier.Verified method will indicate // whether or not the stream of bytes matches the target digest. // // Missing Features // // In addition to the above, we intend to add the following features to this // package: // // 1. A Digester type that supports write sink digest calculation. // // 2. Suspend and resume of ongoing digest calculations to support efficient digest verification in the registry. // package digest ================================================ FILE: vendor/github.com/opencontainers/go-digest/verifiers.go ================================================ // Copyright 2019, 2020 OCI Contributors // Copyright 2017 Docker, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package digest import ( "hash" "io" ) // Verifier presents a general verification interface to be used with message // digests and other byte stream verifications. Users instantiate a Verifier // from one of the various methods, write the data under test to it then check // the result with the Verified method. type Verifier interface { io.Writer // Verified will return true if the content written to Verifier matches // the digest. Verified() bool } type hashVerifier struct { digest Digest hash hash.Hash } func (hv hashVerifier) Write(p []byte) (n int, err error) { return hv.hash.Write(p) } func (hv hashVerifier) Verified() bool { return hv.digest == NewDigest(hv.digest.Algorithm(), hv.hash) } ================================================ FILE: vendor/github.com/opencontainers/image-spec/LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor 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, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS Copyright 2016 The Linux Foundation. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/github.com/opencontainers/image-spec/specs-go/v1/annotations.go ================================================ // Copyright 2016 The Linux Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package v1 const ( // AnnotationCreated is the annotation key for the date and time on which the image was built (date-time string as defined by RFC 3339). AnnotationCreated = "org.opencontainers.image.created" // AnnotationAuthors is the annotation key for the contact details of the people or organization responsible for the image (freeform string). AnnotationAuthors = "org.opencontainers.image.authors" // AnnotationURL is the annotation key for the URL to find more information on the image. AnnotationURL = "org.opencontainers.image.url" // AnnotationDocumentation is the annotation key for the URL to get documentation on the image. AnnotationDocumentation = "org.opencontainers.image.documentation" // AnnotationSource is the annotation key for the URL to get source code for building the image. AnnotationSource = "org.opencontainers.image.source" // AnnotationVersion is the annotation key for the version of the packaged software. // The version MAY match a label or tag in the source code repository. // The version MAY be Semantic versioning-compatible. AnnotationVersion = "org.opencontainers.image.version" // AnnotationRevision is the annotation key for the source control revision identifier for the packaged software. AnnotationRevision = "org.opencontainers.image.revision" // AnnotationVendor is the annotation key for the name of the distributing entity, organization or individual. AnnotationVendor = "org.opencontainers.image.vendor" // AnnotationLicenses is the annotation key for the license(s) under which contained software is distributed as an SPDX License Expression. AnnotationLicenses = "org.opencontainers.image.licenses" // AnnotationRefName is the annotation key for the name of the reference for a target. // SHOULD only be considered valid when on descriptors on `index.json` within image layout. AnnotationRefName = "org.opencontainers.image.ref.name" // AnnotationTitle is the annotation key for the human-readable title of the image. AnnotationTitle = "org.opencontainers.image.title" // AnnotationDescription is the annotation key for the human-readable description of the software packaged in the image. AnnotationDescription = "org.opencontainers.image.description" // AnnotationBaseImageDigest is the annotation key for the digest of the image's base image. AnnotationBaseImageDigest = "org.opencontainers.image.base.digest" // AnnotationBaseImageName is the annotation key for the image reference of the image's base image. AnnotationBaseImageName = "org.opencontainers.image.base.name" ) ================================================ FILE: vendor/github.com/opencontainers/image-spec/specs-go/v1/config.go ================================================ // Copyright 2016 The Linux Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package v1 import ( "time" digest "github.com/opencontainers/go-digest" ) // ImageConfig defines the execution parameters which should be used as a base when running a container using an image. type ImageConfig struct { // User defines the username or UID which the process in the container should run as. User string `json:"User,omitempty"` // ExposedPorts a set of ports to expose from a container running this image. ExposedPorts map[string]struct{} `json:"ExposedPorts,omitempty"` // Env is a list of environment variables to be used in a container. Env []string `json:"Env,omitempty"` // Entrypoint defines a list of arguments to use as the command to execute when the container starts. Entrypoint []string `json:"Entrypoint,omitempty"` // Cmd defines the default arguments to the entrypoint of the container. Cmd []string `json:"Cmd,omitempty"` // Volumes is a set of directories describing where the process is likely write data specific to a container instance. Volumes map[string]struct{} `json:"Volumes,omitempty"` // WorkingDir sets the current working directory of the entrypoint process in the container. WorkingDir string `json:"WorkingDir,omitempty"` // Labels contains arbitrary metadata for the container. Labels map[string]string `json:"Labels,omitempty"` // StopSignal contains the system call signal that will be sent to the container to exit. StopSignal string `json:"StopSignal,omitempty"` // ArgsEscaped // // Deprecated: This field is present only for legacy compatibility with // Docker and should not be used by new image builders. It is used by Docker // for Windows images to indicate that the `Entrypoint` or `Cmd` or both, // contains only a single element array, that is a pre-escaped, and combined // into a single string `CommandLine`. If `true` the value in `Entrypoint` or // `Cmd` should be used as-is to avoid double escaping. // https://github.com/opencontainers/image-spec/pull/892 ArgsEscaped bool `json:"ArgsEscaped,omitempty"` } // RootFS describes a layer content addresses type RootFS struct { // Type is the type of the rootfs. Type string `json:"type"` // DiffIDs is an array of layer content hashes (DiffIDs), in order from bottom-most to top-most. DiffIDs []digest.Digest `json:"diff_ids"` } // History describes the history of a layer. type History struct { // Created is the combined date and time at which the layer was created, formatted as defined by RFC 3339, section 5.6. Created *time.Time `json:"created,omitempty"` // CreatedBy is the command which created the layer. CreatedBy string `json:"created_by,omitempty"` // Author is the author of the build point. Author string `json:"author,omitempty"` // Comment is a custom message set when creating the layer. Comment string `json:"comment,omitempty"` // EmptyLayer is used to mark if the history item created a filesystem diff. EmptyLayer bool `json:"empty_layer,omitempty"` } // Image is the JSON structure which describes some basic information about the image. // This provides the `application/vnd.oci.image.config.v1+json` mediatype when marshalled to JSON. type Image struct { // Created is the combined date and time at which the image was created, formatted as defined by RFC 3339, section 5.6. Created *time.Time `json:"created,omitempty"` // Author defines the name and/or email address of the person or entity which created and is responsible for maintaining the image. Author string `json:"author,omitempty"` // Platform describes the platform which the image in the manifest runs on. Platform // Config defines the execution parameters which should be used as a base when running a container using the image. Config ImageConfig `json:"config,omitempty"` // RootFS references the layer content addresses used by the image. RootFS RootFS `json:"rootfs"` // History describes the history of each layer. History []History `json:"history,omitempty"` } ================================================ FILE: vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.go ================================================ // Copyright 2016-2022 The Linux Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package v1 import digest "github.com/opencontainers/go-digest" // Descriptor describes the disposition of targeted content. // This structure provides `application/vnd.oci.descriptor.v1+json` mediatype // when marshalled to JSON. type Descriptor struct { // MediaType is the media type of the object this schema refers to. MediaType string `json:"mediaType"` // Digest is the digest of the targeted content. Digest digest.Digest `json:"digest"` // Size specifies the size in bytes of the blob. Size int64 `json:"size"` // URLs specifies a list of URLs from which this object MAY be downloaded URLs []string `json:"urls,omitempty"` // Annotations contains arbitrary metadata relating to the targeted content. Annotations map[string]string `json:"annotations,omitempty"` // Data is an embedding of the targeted content. This is encoded as a base64 // string when marshalled to JSON (automatically, by encoding/json). If // present, Data can be used directly to avoid fetching the targeted content. Data []byte `json:"data,omitempty"` // Platform describes the platform which the image in the manifest runs on. // // This should only be used when referring to a manifest. Platform *Platform `json:"platform,omitempty"` // ArtifactType is the IANA media type of this artifact. ArtifactType string `json:"artifactType,omitempty"` } // Platform describes the platform which the image in the manifest runs on. type Platform struct { // Architecture field specifies the CPU architecture, for example // `amd64` or `ppc64le`. Architecture string `json:"architecture"` // OS specifies the operating system, for example `linux` or `windows`. OS string `json:"os"` // OSVersion is an optional field specifying the operating system // version, for example on Windows `10.0.14393.1066`. OSVersion string `json:"os.version,omitempty"` // OSFeatures is an optional field specifying an array of strings, // each listing a required OS feature (for example on Windows `win32k`). OSFeatures []string `json:"os.features,omitempty"` // Variant is an optional field specifying a variant of the CPU, for // example `v7` to specify ARMv7 when architecture is `arm`. Variant string `json:"variant,omitempty"` } // DescriptorEmptyJSON is the descriptor of a blob with content of `{}`. var DescriptorEmptyJSON = Descriptor{ MediaType: MediaTypeEmptyJSON, Digest: `sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a`, Size: 2, Data: []byte(`{}`), } ================================================ FILE: vendor/github.com/opencontainers/image-spec/specs-go/v1/index.go ================================================ // Copyright 2016 The Linux Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package v1 import "github.com/opencontainers/image-spec/specs-go" // Index references manifests for various platforms. // This structure provides `application/vnd.oci.image.index.v1+json` mediatype when marshalled to JSON. type Index struct { specs.Versioned // MediaType specifies the type of this document data structure e.g. `application/vnd.oci.image.index.v1+json` MediaType string `json:"mediaType,omitempty"` // ArtifactType specifies the IANA media type of artifact when the manifest is used for an artifact. ArtifactType string `json:"artifactType,omitempty"` // Manifests references platform specific manifests. Manifests []Descriptor `json:"manifests"` // Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest. Subject *Descriptor `json:"subject,omitempty"` // Annotations contains arbitrary metadata for the image index. Annotations map[string]string `json:"annotations,omitempty"` } ================================================ FILE: vendor/github.com/opencontainers/image-spec/specs-go/v1/layout.go ================================================ // Copyright 2016 The Linux Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package v1 const ( // ImageLayoutFile is the file name containing ImageLayout in an OCI Image Layout ImageLayoutFile = "oci-layout" // ImageLayoutVersion is the version of ImageLayout ImageLayoutVersion = "1.0.0" // ImageIndexFile is the file name of the entry point for references and descriptors in an OCI Image Layout ImageIndexFile = "index.json" // ImageBlobsDir is the directory name containing content addressable blobs in an OCI Image Layout ImageBlobsDir = "blobs" ) // ImageLayout is the structure in the "oci-layout" file, found in the root // of an OCI Image-layout directory. type ImageLayout struct { Version string `json:"imageLayoutVersion"` } ================================================ FILE: vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go ================================================ // Copyright 2016-2022 The Linux Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package v1 import "github.com/opencontainers/image-spec/specs-go" // Manifest provides `application/vnd.oci.image.manifest.v1+json` mediatype structure when marshalled to JSON. type Manifest struct { specs.Versioned // MediaType specifies the type of this document data structure e.g. `application/vnd.oci.image.manifest.v1+json` MediaType string `json:"mediaType,omitempty"` // ArtifactType specifies the IANA media type of artifact when the manifest is used for an artifact. ArtifactType string `json:"artifactType,omitempty"` // Config references a configuration object for a container, by digest. // The referenced configuration object is a JSON blob that the runtime uses to set up the container. Config Descriptor `json:"config"` // Layers is an indexed list of layers referenced by the manifest. Layers []Descriptor `json:"layers"` // Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest. Subject *Descriptor `json:"subject,omitempty"` // Annotations contains arbitrary metadata for the image manifest. Annotations map[string]string `json:"annotations,omitempty"` } ================================================ FILE: vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.go ================================================ // Copyright 2016 The Linux Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package v1 const ( // MediaTypeDescriptor specifies the media type for a content descriptor. MediaTypeDescriptor = "application/vnd.oci.descriptor.v1+json" // MediaTypeLayoutHeader specifies the media type for the oci-layout. MediaTypeLayoutHeader = "application/vnd.oci.layout.header.v1+json" // MediaTypeImageIndex specifies the media type for an image index. MediaTypeImageIndex = "application/vnd.oci.image.index.v1+json" // MediaTypeImageManifest specifies the media type for an image manifest. MediaTypeImageManifest = "application/vnd.oci.image.manifest.v1+json" // MediaTypeImageConfig specifies the media type for the image configuration. MediaTypeImageConfig = "application/vnd.oci.image.config.v1+json" // MediaTypeEmptyJSON specifies the media type for an unused blob containing the value "{}". MediaTypeEmptyJSON = "application/vnd.oci.empty.v1+json" ) const ( // MediaTypeImageLayer is the media type used for layers referenced by the manifest. MediaTypeImageLayer = "application/vnd.oci.image.layer.v1.tar" // MediaTypeImageLayerGzip is the media type used for gzipped layers // referenced by the manifest. MediaTypeImageLayerGzip = "application/vnd.oci.image.layer.v1.tar+gzip" // MediaTypeImageLayerZstd is the media type used for zstd compressed // layers referenced by the manifest. MediaTypeImageLayerZstd = "application/vnd.oci.image.layer.v1.tar+zstd" ) // Non-distributable layer media-types. // // Deprecated: Non-distributable layers are deprecated, and not recommended // for future use. Implementations SHOULD NOT produce new non-distributable // layers. // https://github.com/opencontainers/image-spec/pull/965 const ( // MediaTypeImageLayerNonDistributable is the media type for layers referenced by // the manifest but with distribution restrictions. // // Deprecated: Non-distributable layers are deprecated, and not recommended // for future use. Implementations SHOULD NOT produce new non-distributable // layers. // https://github.com/opencontainers/image-spec/pull/965 MediaTypeImageLayerNonDistributable = "application/vnd.oci.image.layer.nondistributable.v1.tar" // MediaTypeImageLayerNonDistributableGzip is the media type for // gzipped layers referenced by the manifest but with distribution // restrictions. // // Deprecated: Non-distributable layers are deprecated, and not recommended // for future use. Implementations SHOULD NOT produce new non-distributable // layers. // https://github.com/opencontainers/image-spec/pull/965 MediaTypeImageLayerNonDistributableGzip = "application/vnd.oci.image.layer.nondistributable.v1.tar+gzip" // MediaTypeImageLayerNonDistributableZstd is the media type for zstd // compressed layers referenced by the manifest but with distribution // restrictions. // // Deprecated: Non-distributable layers are deprecated, and not recommended // for future use. Implementations SHOULD NOT produce new non-distributable // layers. // https://github.com/opencontainers/image-spec/pull/965 MediaTypeImageLayerNonDistributableZstd = "application/vnd.oci.image.layer.nondistributable.v1.tar+zstd" ) ================================================ FILE: vendor/github.com/opencontainers/image-spec/specs-go/version.go ================================================ // Copyright 2016 The Linux Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package specs import "fmt" const ( // VersionMajor is for an API incompatible changes VersionMajor = 1 // VersionMinor is for functionality in a backwards-compatible manner VersionMinor = 1 // VersionPatch is for backwards-compatible bug fixes VersionPatch = 0 // VersionDev indicates development branch. Releases will be empty string. VersionDev = "" ) // Version is the specification version that the package types support. var Version = fmt.Sprintf("%d.%d.%d%s", VersionMajor, VersionMinor, VersionPatch, VersionDev) ================================================ FILE: vendor/github.com/opencontainers/image-spec/specs-go/versioned.go ================================================ // Copyright 2016 The Linux Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package specs // Versioned provides a struct with the manifest schemaVersion and mediaType. // Incoming content with unknown schema version can be decoded against this // struct to check the version. type Versioned struct { // SchemaVersion is the image manifest schema that this image follows SchemaVersion int `json:"schemaVersion"` } ================================================ FILE: vendor/github.com/petermattis/goid/.gitignore ================================================ *~ *.test .*.swp .DS_Store ================================================ FILE: vendor/github.com/petermattis/goid/.travis.yml ================================================ language: go go: - 1.3.x - 1.4.x - 1.5.x - 1.6.x - 1.7.x - 1.8.x - 1.9.x - master ================================================ FILE: vendor/github.com/petermattis/goid/LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor 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, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/github.com/petermattis/goid/README.md ================================================ # goid [![Build Status](https://travis-ci.org/petermattis/goid.svg?branch=master)](https://travis-ci.org/petermattis/goid) Programatically retrieve the current goroutine's ID. See [the CI configuration](.travis.yml) for supported Go versions. In addition, gccgo 7.2.1 (Go 1.8.3) is supported. ================================================ FILE: vendor/github.com/petermattis/goid/goid.go ================================================ // Copyright 2016 Peter Mattis. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or // implied. See the License for the specific language governing // permissions and limitations under the License. See the AUTHORS file // for names of contributors. package goid import ( "bytes" "runtime" "strconv" ) func ExtractGID(s []byte) int64 { s = s[len("goroutine "):] s = s[:bytes.IndexByte(s, ' ')] gid, _ := strconv.ParseInt(string(s), 10, 64) return gid } // Parse the goid from runtime.Stack() output. Slow, but it works. func getSlow() int64 { var buf [64]byte return ExtractGID(buf[:runtime.Stack(buf[:], false)]) } ================================================ FILE: vendor/github.com/petermattis/goid/goid_gccgo.go ================================================ // Copyright 2018 Peter Mattis. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or // implied. See the License for the specific language governing // permissions and limitations under the License. See the AUTHORS file // for names of contributors. // +build gccgo package goid //extern runtime.getg func getg() *g func Get() int64 { return getg().goid } ================================================ FILE: vendor/github.com/petermattis/goid/goid_go1.3.c ================================================ // Copyright 2015 Peter Mattis. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or // implied. See the License for the specific language governing // permissions and limitations under the License. See the AUTHORS file // for names of contributors. // +build !go1.4 #include void ·Get(int64 ret) { ret = g->goid; USED(&ret); } ================================================ FILE: vendor/github.com/petermattis/goid/goid_go1.3.go ================================================ // Copyright 2015 Peter Mattis. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or // implied. See the License for the specific language governing // permissions and limitations under the License. See the AUTHORS file // for names of contributors. // +build !go1.4 package goid // Get returns the id of the current goroutine. func Get() int64 ================================================ FILE: vendor/github.com/petermattis/goid/goid_go1.4.go ================================================ // Copyright 2015 Peter Mattis. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or // implied. See the License for the specific language governing // permissions and limitations under the License. See the AUTHORS file // for names of contributors. // +build go1.4,!go1.5 package goid import "unsafe" var pointerSize = unsafe.Sizeof(uintptr(0)) // Backdoor access to runtime·getg(). func getg() uintptr // in goid_go1.4.s // Get returns the id of the current goroutine. func Get() int64 { // The goid is the 16th field in the G struct where each field is a // pointer, uintptr or padded to that size. See runtime.h from the // Go sources. I'm not aware of a cleaner way to determine the // offset. return *(*int64)(unsafe.Pointer(getg() + 16*pointerSize)) } ================================================ FILE: vendor/github.com/petermattis/goid/goid_go1.4.s ================================================ // 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. // Assembly to get into package runtime without using exported symbols. // See https://github.com/golang/go/blob/release-branch.go1.4/misc/cgo/test/backdoor/thunk.s // +build amd64 amd64p32 arm 386 // +build go1.4,!go1.5 #include "textflag.h" #ifdef GOARCH_arm #define JMP B #endif TEXT ·getg(SB),NOSPLIT,$0-0 JMP runtime·getg(SB) ================================================ FILE: vendor/github.com/petermattis/goid/goid_go1.5_amd64.go ================================================ // Copyright 2016 Peter Mattis. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or // implied. See the License for the specific language governing // permissions and limitations under the License. See the AUTHORS file // for names of contributors. // +build amd64 amd64p32 // +build gc,go1.5 package goid func Get() int64 ================================================ FILE: vendor/github.com/petermattis/goid/goid_go1.5_amd64.s ================================================ // Copyright 2016 Peter Mattis. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or // implied. See the License for the specific language governing // permissions and limitations under the License. See the AUTHORS file // for names of contributors. // Assembly to mimic runtime.getg. // +build amd64 amd64p32 // +build gc,go1.5 #include "go_asm.h" #include "textflag.h" // func Get() int64 TEXT ·Get(SB),NOSPLIT,$0-8 MOVQ (TLS), R14 MOVQ g_goid(R14), R13 MOVQ R13, ret+0(FP) RET ================================================ FILE: vendor/github.com/petermattis/goid/goid_go1.5_arm.go ================================================ // Copyright 2016 Peter Mattis. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or // implied. See the License for the specific language governing // permissions and limitations under the License. See the AUTHORS file // for names of contributors. // +build arm // +build gc,go1.5 package goid // Backdoor access to runtime·getg(). func getg() *g // in goid_go1.5plus.s func Get() int64 { return getg().goid } ================================================ FILE: vendor/github.com/petermattis/goid/goid_go1.5_arm.s ================================================ // Copyright 2016 Peter Mattis. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or // implied. See the License for the specific language governing // permissions and limitations under the License. See the AUTHORS file // for names of contributors. // Assembly to mimic runtime.getg. // This should work on arm64 as well, but it hasn't been tested. // +build arm // +build gc,go1.5 #include "textflag.h" // func getg() *g TEXT ·getg(SB),NOSPLIT,$0-8 MOVW g, ret+0(FP) RET ================================================ FILE: vendor/github.com/petermattis/goid/goid_slow.go ================================================ // Copyright 2016 Peter Mattis. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or // implied. See the License for the specific language governing // permissions and limitations under the License. See the AUTHORS file // for names of contributors. // +build go1.4,!go1.5,!amd64,!amd64p32,!arm,!386 go1.5,!go1.6,!amd64,!amd64p32,!arm go1.6,!amd64,!amd64p32,!arm go1.9,!amd64,!amd64p32,!arm package goid // Get returns the id of the current goroutine. func Get() int64 { return getSlow() } ================================================ FILE: vendor/github.com/petermattis/goid/runtime_gccgo_go1.8.go ================================================ // +build gccgo,go1.8 package goid // https://github.com/gcc-mirror/gcc/blob/gcc-7-branch/libgo/go/runtime/runtime2.go#L329-L422 type g struct { _panic uintptr _defer uintptr m uintptr syscallsp uintptr syscallpc uintptr param uintptr atomicstatus uint32 goid int64 // Here it is! } ================================================ FILE: vendor/github.com/petermattis/goid/runtime_go1.5.go ================================================ // Copyright 2016 Peter Mattis. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or // implied. See the License for the specific language governing // permissions and limitations under the License. See the AUTHORS file // for names of contributors. // +build go1.5,!go1.6 package goid // Just enough of the structs from runtime/runtime2.go to get the offset to goid. // See https://github.com/golang/go/blob/release-branch.go1.5/src/runtime/runtime2.go type stack struct { lo uintptr hi uintptr } type gobuf struct { sp uintptr pc uintptr g uintptr ctxt uintptr ret uintptr lr uintptr bp uintptr } type g struct { stack stack stackguard0 uintptr stackguard1 uintptr _panic uintptr _defer uintptr m uintptr stackAlloc uintptr sched gobuf syscallsp uintptr syscallpc uintptr stkbar []uintptr stkbarPos uintptr param uintptr atomicstatus uint32 stackLock uint32 goid int64 // Here it is! } ================================================ FILE: vendor/github.com/petermattis/goid/runtime_go1.6.go ================================================ // +build gc,go1.6,!go1.9 package goid // Just enough of the structs from runtime/runtime2.go to get the offset to goid. // See https://github.com/golang/go/blob/release-branch.go1.6/src/runtime/runtime2.go type stack struct { lo uintptr hi uintptr } type gobuf struct { sp uintptr pc uintptr g uintptr ctxt uintptr ret uintptr lr uintptr bp uintptr } type g struct { stack stack stackguard0 uintptr stackguard1 uintptr _panic uintptr _defer uintptr m uintptr stackAlloc uintptr sched gobuf syscallsp uintptr syscallpc uintptr stkbar []uintptr stkbarPos uintptr stktopsp uintptr param uintptr atomicstatus uint32 stackLock uint32 goid int64 // Here it is! } ================================================ FILE: vendor/github.com/petermattis/goid/runtime_go1.9.go ================================================ // +build gc,go1.9 package goid type stack struct { lo uintptr hi uintptr } type gobuf struct { sp uintptr pc uintptr g uintptr ctxt uintptr ret uintptr lr uintptr bp uintptr } type g struct { stack stack stackguard0 uintptr stackguard1 uintptr _panic uintptr _defer uintptr m uintptr sched gobuf syscallsp uintptr syscallpc uintptr stktopsp uintptr param uintptr atomicstatus uint32 stackLock uint32 goid int64 // Here it is! } ================================================ FILE: vendor/github.com/pkg/errors/.gitignore ================================================ # 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 *.test *.prof ================================================ FILE: vendor/github.com/pkg/errors/.travis.yml ================================================ language: go go_import_path: github.com/pkg/errors go: - 1.11.x - 1.12.x - 1.13.x - tip script: - make check ================================================ FILE: vendor/github.com/pkg/errors/LICENSE ================================================ Copyright (c) 2015, Dave Cheney 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. 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 HOLDER 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. ================================================ FILE: vendor/github.com/pkg/errors/Makefile ================================================ PKGS := github.com/pkg/errors SRCDIRS := $(shell go list -f '{{.Dir}}' $(PKGS)) GO := go check: test vet gofmt misspell unconvert staticcheck ineffassign unparam test: $(GO) test $(PKGS) vet: | test $(GO) vet $(PKGS) staticcheck: $(GO) get honnef.co/go/tools/cmd/staticcheck staticcheck -checks all $(PKGS) misspell: $(GO) get github.com/client9/misspell/cmd/misspell misspell \ -locale GB \ -error \ *.md *.go unconvert: $(GO) get github.com/mdempsky/unconvert unconvert -v $(PKGS) ineffassign: $(GO) get github.com/gordonklaus/ineffassign find $(SRCDIRS) -name '*.go' | xargs ineffassign pedantic: check errcheck unparam: $(GO) get mvdan.cc/unparam unparam ./... errcheck: $(GO) get github.com/kisielk/errcheck errcheck $(PKGS) gofmt: @echo Checking code is gofmted @test -z "$(shell gofmt -s -l -d -e $(SRCDIRS) | tee /dev/stderr)" ================================================ FILE: vendor/github.com/pkg/errors/README.md ================================================ # errors [![Travis-CI](https://travis-ci.org/pkg/errors.svg)](https://travis-ci.org/pkg/errors) [![AppVeyor](https://ci.appveyor.com/api/projects/status/b98mptawhudj53ep/branch/master?svg=true)](https://ci.appveyor.com/project/davecheney/errors/branch/master) [![GoDoc](https://godoc.org/github.com/pkg/errors?status.svg)](http://godoc.org/github.com/pkg/errors) [![Report card](https://goreportcard.com/badge/github.com/pkg/errors)](https://goreportcard.com/report/github.com/pkg/errors) [![Sourcegraph](https://sourcegraph.com/github.com/pkg/errors/-/badge.svg)](https://sourcegraph.com/github.com/pkg/errors?badge) Package errors provides simple error handling primitives. `go get github.com/pkg/errors` The traditional error handling idiom in Go is roughly akin to ```go if err != nil { return err } ``` which applied recursively up the call stack results in error reports without context or debugging information. The errors package allows programmers to add context to the failure path in their code in a way that does not destroy the original value of the error. ## Adding context to an error The errors.Wrap function returns a new error that adds context to the original error. For example ```go _, err := ioutil.ReadAll(r) if err != nil { return errors.Wrap(err, "read failed") } ``` ## Retrieving the cause of an error Using `errors.Wrap` constructs a stack of errors, adding context to the preceding error. Depending on the nature of the error it may be necessary to reverse the operation of errors.Wrap to retrieve the original error for inspection. Any error value which implements this interface can be inspected by `errors.Cause`. ```go type causer interface { Cause() error } ``` `errors.Cause` will recursively retrieve the topmost error which does not implement `causer`, which is assumed to be the original cause. For example: ```go switch err := errors.Cause(err).(type) { case *MyError: // handle specifically default: // unknown error } ``` [Read the package documentation for more information](https://godoc.org/github.com/pkg/errors). ## Roadmap With the upcoming [Go2 error proposals](https://go.googlesource.com/proposal/+/master/design/go2draft.md) this package is moving into maintenance mode. The roadmap for a 1.0 release is as follows: - 0.9. Remove pre Go 1.9 and Go 1.10 support, address outstanding pull requests (if possible) - 1.0. Final release. ## Contributing Because of the Go2 errors changes, this package is not accepting proposals for new functionality. With that said, we welcome pull requests, bug fixes and issue reports. Before sending a PR, please discuss your change by raising an issue. ## License BSD-2-Clause ================================================ FILE: vendor/github.com/pkg/errors/appveyor.yml ================================================ version: build-{build}.{branch} clone_folder: C:\gopath\src\github.com\pkg\errors shallow_clone: true # for startup speed environment: GOPATH: C:\gopath platform: - x64 # http://www.appveyor.com/docs/installed-software install: # some helpful output for debugging builds - go version - go env # pre-installed MinGW at C:\MinGW is 32bit only # but MSYS2 at C:\msys64 has mingw64 - set PATH=C:\msys64\mingw64\bin;%PATH% - gcc --version - g++ --version build_script: - go install -v ./... test_script: - set PATH=C:\gopath\bin;%PATH% - go test -v ./... #artifacts: # - path: '%GOPATH%\bin\*.exe' deploy: off ================================================ FILE: vendor/github.com/pkg/errors/errors.go ================================================ // Package errors provides simple error handling primitives. // // The traditional error handling idiom in Go is roughly akin to // // if err != nil { // return err // } // // which when applied recursively up the call stack results in error reports // without context or debugging information. The errors package allows // programmers to add context to the failure path in their code in a way // that does not destroy the original value of the error. // // Adding context to an error // // The errors.Wrap function returns a new error that adds context to the // original error by recording a stack trace at the point Wrap is called, // together with the supplied message. For example // // _, err := ioutil.ReadAll(r) // if err != nil { // return errors.Wrap(err, "read failed") // } // // If additional control is required, the errors.WithStack and // errors.WithMessage functions destructure errors.Wrap into its component // operations: annotating an error with a stack trace and with a message, // respectively. // // Retrieving the cause of an error // // Using errors.Wrap constructs a stack of errors, adding context to the // preceding error. Depending on the nature of the error it may be necessary // to reverse the operation of errors.Wrap to retrieve the original error // for inspection. Any error value which implements this interface // // type causer interface { // Cause() error // } // // can be inspected by errors.Cause. errors.Cause will recursively retrieve // the topmost error that does not implement causer, which is assumed to be // the original cause. For example: // // switch err := errors.Cause(err).(type) { // case *MyError: // // handle specifically // default: // // unknown error // } // // Although the causer interface is not exported by this package, it is // considered a part of its stable public interface. // // Formatted printing of errors // // All error values returned from this package implement fmt.Formatter and can // be formatted by the fmt package. The following verbs are supported: // // %s print the error. If the error has a Cause it will be // printed recursively. // %v see %s // %+v extended format. Each Frame of the error's StackTrace will // be printed in detail. // // Retrieving the stack trace of an error or wrapper // // New, Errorf, Wrap, and Wrapf record a stack trace at the point they are // invoked. This information can be retrieved with the following interface: // // type stackTracer interface { // StackTrace() errors.StackTrace // } // // The returned errors.StackTrace type is defined as // // type StackTrace []Frame // // The Frame type represents a call site in the stack trace. Frame supports // the fmt.Formatter interface that can be used for printing information about // the stack trace of this error. For example: // // if err, ok := err.(stackTracer); ok { // for _, f := range err.StackTrace() { // fmt.Printf("%+s:%d\n", f, f) // } // } // // Although the stackTracer interface is not exported by this package, it is // considered a part of its stable public interface. // // See the documentation for Frame.Format for more details. package errors import ( "fmt" "io" ) // New returns an error with the supplied message. // New also records the stack trace at the point it was called. func New(message string) error { return &fundamental{ msg: message, stack: callers(), } } // Errorf formats according to a format specifier and returns the string // as a value that satisfies error. // Errorf also records the stack trace at the point it was called. func Errorf(format string, args ...interface{}) error { return &fundamental{ msg: fmt.Sprintf(format, args...), stack: callers(), } } // fundamental is an error that has a message and a stack, but no caller. type fundamental struct { msg string *stack } func (f *fundamental) Error() string { return f.msg } func (f *fundamental) Format(s fmt.State, verb rune) { switch verb { case 'v': if s.Flag('+') { io.WriteString(s, f.msg) f.stack.Format(s, verb) return } fallthrough case 's': io.WriteString(s, f.msg) case 'q': fmt.Fprintf(s, "%q", f.msg) } } // WithStack annotates err with a stack trace at the point WithStack was called. // If err is nil, WithStack returns nil. func WithStack(err error) error { if err == nil { return nil } return &withStack{ err, callers(), } } type withStack struct { error *stack } func (w *withStack) Cause() error { return w.error } // Unwrap provides compatibility for Go 1.13 error chains. func (w *withStack) Unwrap() error { return w.error } func (w *withStack) Format(s fmt.State, verb rune) { switch verb { case 'v': if s.Flag('+') { fmt.Fprintf(s, "%+v", w.Cause()) w.stack.Format(s, verb) return } fallthrough case 's': io.WriteString(s, w.Error()) case 'q': fmt.Fprintf(s, "%q", w.Error()) } } // Wrap returns an error annotating err with a stack trace // at the point Wrap is called, and the supplied message. // If err is nil, Wrap returns nil. func Wrap(err error, message string) error { if err == nil { return nil } err = &withMessage{ cause: err, msg: message, } return &withStack{ err, callers(), } } // Wrapf returns an error annotating err with a stack trace // at the point Wrapf is called, and the format specifier. // If err is nil, Wrapf returns nil. func Wrapf(err error, format string, args ...interface{}) error { if err == nil { return nil } err = &withMessage{ cause: err, msg: fmt.Sprintf(format, args...), } return &withStack{ err, callers(), } } // WithMessage annotates err with a new message. // If err is nil, WithMessage returns nil. func WithMessage(err error, message string) error { if err == nil { return nil } return &withMessage{ cause: err, msg: message, } } // WithMessagef annotates err with the format specifier. // If err is nil, WithMessagef returns nil. func WithMessagef(err error, format string, args ...interface{}) error { if err == nil { return nil } return &withMessage{ cause: err, msg: fmt.Sprintf(format, args...), } } type withMessage struct { cause error msg string } func (w *withMessage) Error() string { return w.msg + ": " + w.cause.Error() } func (w *withMessage) Cause() error { return w.cause } // Unwrap provides compatibility for Go 1.13 error chains. func (w *withMessage) Unwrap() error { return w.cause } func (w *withMessage) Format(s fmt.State, verb rune) { switch verb { case 'v': if s.Flag('+') { fmt.Fprintf(s, "%+v\n", w.Cause()) io.WriteString(s, w.msg) return } fallthrough case 's', 'q': io.WriteString(s, w.Error()) } } // Cause returns the underlying cause of the error, if possible. // An error value has a cause if it implements the following // interface: // // type causer interface { // Cause() error // } // // If the error does not implement Cause, the original error will // be returned. If the error is nil, nil will be returned without further // investigation. func Cause(err error) error { type causer interface { Cause() error } for err != nil { cause, ok := err.(causer) if !ok { break } err = cause.Cause() } return err } ================================================ FILE: vendor/github.com/pkg/errors/go113.go ================================================ // +build go1.13 package errors import ( stderrors "errors" ) // Is reports whether any error in err's chain matches target. // // The chain consists of err itself followed by the sequence of errors obtained by // repeatedly calling Unwrap. // // An error is considered to match a target if it is equal to that target or if // it implements a method Is(error) bool such that Is(target) returns true. func Is(err, target error) bool { return stderrors.Is(err, target) } // As finds the first error in err's chain that matches target, and if so, sets // target to that error value and returns true. // // The chain consists of err itself followed by the sequence of errors obtained by // repeatedly calling Unwrap. // // An error matches target if the error's concrete value is assignable to the value // pointed to by target, or if the error has a method As(interface{}) bool such that // As(target) returns true. In the latter case, the As method is responsible for // setting target. // // As will panic if target is not a non-nil pointer to either a type that implements // error, or to any interface type. As returns false if err is nil. func As(err error, target interface{}) bool { return stderrors.As(err, target) } // Unwrap returns the result of calling the Unwrap method on err, if err's // type contains an Unwrap method returning error. // Otherwise, Unwrap returns nil. func Unwrap(err error) error { return stderrors.Unwrap(err) } ================================================ FILE: vendor/github.com/pkg/errors/stack.go ================================================ package errors import ( "fmt" "io" "path" "runtime" "strconv" "strings" ) // Frame represents a program counter inside a stack frame. // For historical reasons if Frame is interpreted as a uintptr // its value represents the program counter + 1. type Frame uintptr // pc returns the program counter for this frame; // multiple frames may have the same PC value. func (f Frame) pc() uintptr { return uintptr(f) - 1 } // file returns the full path to the file that contains the // function for this Frame's pc. func (f Frame) file() string { fn := runtime.FuncForPC(f.pc()) if fn == nil { return "unknown" } file, _ := fn.FileLine(f.pc()) return file } // line returns the line number of source code of the // function for this Frame's pc. func (f Frame) line() int { fn := runtime.FuncForPC(f.pc()) if fn == nil { return 0 } _, line := fn.FileLine(f.pc()) return line } // name returns the name of this function, if known. func (f Frame) name() string { fn := runtime.FuncForPC(f.pc()) if fn == nil { return "unknown" } return fn.Name() } // Format formats the frame according to the fmt.Formatter interface. // // %s source file // %d source line // %n function name // %v equivalent to %s:%d // // Format accepts flags that alter the printing of some verbs, as follows: // // %+s function name and path of source file relative to the compile time // GOPATH separated by \n\t (\n\t) // %+v equivalent to %+s:%d func (f Frame) Format(s fmt.State, verb rune) { switch verb { case 's': switch { case s.Flag('+'): io.WriteString(s, f.name()) io.WriteString(s, "\n\t") io.WriteString(s, f.file()) default: io.WriteString(s, path.Base(f.file())) } case 'd': io.WriteString(s, strconv.Itoa(f.line())) case 'n': io.WriteString(s, funcname(f.name())) case 'v': f.Format(s, 's') io.WriteString(s, ":") f.Format(s, 'd') } } // MarshalText formats a stacktrace Frame as a text string. The output is the // same as that of fmt.Sprintf("%+v", f), but without newlines or tabs. func (f Frame) MarshalText() ([]byte, error) { name := f.name() if name == "unknown" { return []byte(name), nil } return []byte(fmt.Sprintf("%s %s:%d", name, f.file(), f.line())), nil } // StackTrace is stack of Frames from innermost (newest) to outermost (oldest). type StackTrace []Frame // Format formats the stack of Frames according to the fmt.Formatter interface. // // %s lists source files for each Frame in the stack // %v lists the source file and line number for each Frame in the stack // // Format accepts flags that alter the printing of some verbs, as follows: // // %+v Prints filename, function, and line number for each Frame in the stack. func (st StackTrace) Format(s fmt.State, verb rune) { switch verb { case 'v': switch { case s.Flag('+'): for _, f := range st { io.WriteString(s, "\n") f.Format(s, verb) } case s.Flag('#'): fmt.Fprintf(s, "%#v", []Frame(st)) default: st.formatSlice(s, verb) } case 's': st.formatSlice(s, verb) } } // formatSlice will format this StackTrace into the given buffer as a slice of // Frame, only valid when called with '%s' or '%v'. func (st StackTrace) formatSlice(s fmt.State, verb rune) { io.WriteString(s, "[") for i, f := range st { if i > 0 { io.WriteString(s, " ") } f.Format(s, verb) } io.WriteString(s, "]") } // stack represents a stack of program counters. type stack []uintptr func (s *stack) Format(st fmt.State, verb rune) { switch verb { case 'v': switch { case st.Flag('+'): for _, pc := range *s { f := Frame(pc) fmt.Fprintf(st, "\n%+v", f) } } } } func (s *stack) StackTrace() StackTrace { f := make([]Frame, len(*s)) for i := 0; i < len(f); i++ { f[i] = Frame((*s)[i]) } return f } func callers() *stack { const depth = 32 var pcs [depth]uintptr n := runtime.Callers(3, pcs[:]) var st stack = pcs[0:n] return &st } // funcname removes the path prefix component of a function's name reported by func.Name(). func funcname(name string) string { i := strings.LastIndex(name, "/") name = name[i+1:] i = strings.Index(name, ".") return name[i+1:] } ================================================ FILE: vendor/github.com/pmezard/go-difflib/LICENSE ================================================ Copyright (c) 2013, Patrick Mezard 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. The names of its contributors may not 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 HOLDER 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. ================================================ FILE: vendor/github.com/pmezard/go-difflib/difflib/difflib.go ================================================ // Package difflib is a partial port of Python difflib module. // // It provides tools to compare sequences of strings and generate textual diffs. // // The following class and functions have been ported: // // - SequenceMatcher // // - unified_diff // // - context_diff // // Getting unified diffs was the main goal of the port. Keep in mind this code // is mostly suitable to output text differences in a human friendly way, there // are no guarantees generated diffs are consumable by patch(1). package difflib import ( "bufio" "bytes" "fmt" "io" "strings" ) func min(a, b int) int { if a < b { return a } return b } func max(a, b int) int { if a > b { return a } return b } func calculateRatio(matches, length int) float64 { if length > 0 { return 2.0 * float64(matches) / float64(length) } return 1.0 } type Match struct { A int B int Size int } type OpCode struct { Tag byte I1 int I2 int J1 int J2 int } // SequenceMatcher compares sequence of strings. The basic // algorithm predates, and is a little fancier than, an algorithm // published in the late 1980's by Ratcliff and Obershelp under the // hyperbolic name "gestalt pattern matching". The basic idea is to find // the longest contiguous matching subsequence that contains no "junk" // elements (R-O doesn't address junk). The same idea is then applied // recursively to the pieces of the sequences to the left and to the right // of the matching subsequence. This does not yield minimal edit // sequences, but does tend to yield matches that "look right" to people. // // SequenceMatcher tries to compute a "human-friendly diff" between two // sequences. Unlike e.g. UNIX(tm) diff, the fundamental notion is the // longest *contiguous* & junk-free matching subsequence. That's what // catches peoples' eyes. The Windows(tm) windiff has another interesting // notion, pairing up elements that appear uniquely in each sequence. // That, and the method here, appear to yield more intuitive difference // reports than does diff. This method appears to be the least vulnerable // to synching up on blocks of "junk lines", though (like blank lines in // ordinary text files, or maybe "

" lines in HTML files). That may be // because this is the only method of the 3 that has a *concept* of // "junk" . // // Timing: Basic R-O is cubic time worst case and quadratic time expected // case. SequenceMatcher is quadratic time for the worst case and has // expected-case behavior dependent in a complicated way on how many // elements the sequences have in common; best case time is linear. type SequenceMatcher struct { a []string b []string b2j map[string][]int IsJunk func(string) bool autoJunk bool bJunk map[string]struct{} matchingBlocks []Match fullBCount map[string]int bPopular map[string]struct{} opCodes []OpCode } func NewMatcher(a, b []string) *SequenceMatcher { m := SequenceMatcher{autoJunk: true} m.SetSeqs(a, b) return &m } func NewMatcherWithJunk(a, b []string, autoJunk bool, isJunk func(string) bool) *SequenceMatcher { m := SequenceMatcher{IsJunk: isJunk, autoJunk: autoJunk} m.SetSeqs(a, b) return &m } // Set two sequences to be compared. func (m *SequenceMatcher) SetSeqs(a, b []string) { m.SetSeq1(a) m.SetSeq2(b) } // Set the first sequence to be compared. The second sequence to be compared is // not changed. // // SequenceMatcher computes and caches detailed information about the second // sequence, so if you want to compare one sequence S against many sequences, // use .SetSeq2(s) once and call .SetSeq1(x) repeatedly for each of the other // sequences. // // See also SetSeqs() and SetSeq2(). func (m *SequenceMatcher) SetSeq1(a []string) { if &a == &m.a { return } m.a = a m.matchingBlocks = nil m.opCodes = nil } // Set the second sequence to be compared. The first sequence to be compared is // not changed. func (m *SequenceMatcher) SetSeq2(b []string) { if &b == &m.b { return } m.b = b m.matchingBlocks = nil m.opCodes = nil m.fullBCount = nil m.chainB() } func (m *SequenceMatcher) chainB() { // Populate line -> index mapping b2j := map[string][]int{} for i, s := range m.b { indices := b2j[s] indices = append(indices, i) b2j[s] = indices } // Purge junk elements m.bJunk = map[string]struct{}{} if m.IsJunk != nil { junk := m.bJunk for s, _ := range b2j { if m.IsJunk(s) { junk[s] = struct{}{} } } for s, _ := range junk { delete(b2j, s) } } // Purge remaining popular elements popular := map[string]struct{}{} n := len(m.b) if m.autoJunk && n >= 200 { ntest := n/100 + 1 for s, indices := range b2j { if len(indices) > ntest { popular[s] = struct{}{} } } for s, _ := range popular { delete(b2j, s) } } m.bPopular = popular m.b2j = b2j } func (m *SequenceMatcher) isBJunk(s string) bool { _, ok := m.bJunk[s] return ok } // Find longest matching block in a[alo:ahi] and b[blo:bhi]. // // If IsJunk is not defined: // // Return (i,j,k) such that a[i:i+k] is equal to b[j:j+k], where // alo <= i <= i+k <= ahi // blo <= j <= j+k <= bhi // and for all (i',j',k') meeting those conditions, // k >= k' // i <= i' // and if i == i', j <= j' // // In other words, of all maximal matching blocks, return one that // starts earliest in a, and of all those maximal matching blocks that // start earliest in a, return the one that starts earliest in b. // // If IsJunk is defined, first the longest matching block is // determined as above, but with the additional restriction that no // junk element appears in the block. Then that block is extended as // far as possible by matching (only) junk elements on both sides. So // the resulting block never matches on junk except as identical junk // happens to be adjacent to an "interesting" match. // // If no blocks match, return (alo, blo, 0). func (m *SequenceMatcher) findLongestMatch(alo, ahi, blo, bhi int) Match { // CAUTION: stripping common prefix or suffix would be incorrect. // E.g., // ab // acab // Longest matching block is "ab", but if common prefix is // stripped, it's "a" (tied with "b"). UNIX(tm) diff does so // strip, so ends up claiming that ab is changed to acab by // inserting "ca" in the middle. That's minimal but unintuitive: // "it's obvious" that someone inserted "ac" at the front. // Windiff ends up at the same place as diff, but by pairing up // the unique 'b's and then matching the first two 'a's. besti, bestj, bestsize := alo, blo, 0 // find longest junk-free match // during an iteration of the loop, j2len[j] = length of longest // junk-free match ending with a[i-1] and b[j] j2len := map[int]int{} for i := alo; i != ahi; i++ { // look at all instances of a[i] in b; note that because // b2j has no junk keys, the loop is skipped if a[i] is junk newj2len := map[int]int{} for _, j := range m.b2j[m.a[i]] { // a[i] matches b[j] if j < blo { continue } if j >= bhi { break } k := j2len[j-1] + 1 newj2len[j] = k if k > bestsize { besti, bestj, bestsize = i-k+1, j-k+1, k } } j2len = newj2len } // Extend the best by non-junk elements on each end. In particular, // "popular" non-junk elements aren't in b2j, which greatly speeds // the inner loop above, but also means "the best" match so far // doesn't contain any junk *or* popular non-junk elements. for besti > alo && bestj > blo && !m.isBJunk(m.b[bestj-1]) && m.a[besti-1] == m.b[bestj-1] { besti, bestj, bestsize = besti-1, bestj-1, bestsize+1 } for besti+bestsize < ahi && bestj+bestsize < bhi && !m.isBJunk(m.b[bestj+bestsize]) && m.a[besti+bestsize] == m.b[bestj+bestsize] { bestsize += 1 } // Now that we have a wholly interesting match (albeit possibly // empty!), we may as well suck up the matching junk on each // side of it too. Can't think of a good reason not to, and it // saves post-processing the (possibly considerable) expense of // figuring out what to do with it. In the case of an empty // interesting match, this is clearly the right thing to do, // because no other kind of match is possible in the regions. for besti > alo && bestj > blo && m.isBJunk(m.b[bestj-1]) && m.a[besti-1] == m.b[bestj-1] { besti, bestj, bestsize = besti-1, bestj-1, bestsize+1 } for besti+bestsize < ahi && bestj+bestsize < bhi && m.isBJunk(m.b[bestj+bestsize]) && m.a[besti+bestsize] == m.b[bestj+bestsize] { bestsize += 1 } return Match{A: besti, B: bestj, Size: bestsize} } // Return list of triples describing matching subsequences. // // Each triple is of the form (i, j, n), and means that // a[i:i+n] == b[j:j+n]. The triples are monotonically increasing in // i and in j. It's also guaranteed that if (i, j, n) and (i', j', n') are // adjacent triples in the list, and the second is not the last triple in the // list, then i+n != i' or j+n != j'. IOW, adjacent triples never describe // adjacent equal blocks. // // The last triple is a dummy, (len(a), len(b), 0), and is the only // triple with n==0. func (m *SequenceMatcher) GetMatchingBlocks() []Match { if m.matchingBlocks != nil { return m.matchingBlocks } var matchBlocks func(alo, ahi, blo, bhi int, matched []Match) []Match matchBlocks = func(alo, ahi, blo, bhi int, matched []Match) []Match { match := m.findLongestMatch(alo, ahi, blo, bhi) i, j, k := match.A, match.B, match.Size if match.Size > 0 { if alo < i && blo < j { matched = matchBlocks(alo, i, blo, j, matched) } matched = append(matched, match) if i+k < ahi && j+k < bhi { matched = matchBlocks(i+k, ahi, j+k, bhi, matched) } } return matched } matched := matchBlocks(0, len(m.a), 0, len(m.b), nil) // It's possible that we have adjacent equal blocks in the // matching_blocks list now. nonAdjacent := []Match{} i1, j1, k1 := 0, 0, 0 for _, b := range matched { // Is this block adjacent to i1, j1, k1? i2, j2, k2 := b.A, b.B, b.Size if i1+k1 == i2 && j1+k1 == j2 { // Yes, so collapse them -- this just increases the length of // the first block by the length of the second, and the first // block so lengthened remains the block to compare against. k1 += k2 } else { // Not adjacent. Remember the first block (k1==0 means it's // the dummy we started with), and make the second block the // new block to compare against. if k1 > 0 { nonAdjacent = append(nonAdjacent, Match{i1, j1, k1}) } i1, j1, k1 = i2, j2, k2 } } if k1 > 0 { nonAdjacent = append(nonAdjacent, Match{i1, j1, k1}) } nonAdjacent = append(nonAdjacent, Match{len(m.a), len(m.b), 0}) m.matchingBlocks = nonAdjacent return m.matchingBlocks } // Return list of 5-tuples describing how to turn a into b. // // Each tuple is of the form (tag, i1, i2, j1, j2). The first tuple // has i1 == j1 == 0, and remaining tuples have i1 == the i2 from the // tuple preceding it, and likewise for j1 == the previous j2. // // The tags are characters, with these meanings: // // 'r' (replace): a[i1:i2] should be replaced by b[j1:j2] // // 'd' (delete): a[i1:i2] should be deleted, j1==j2 in this case. // // 'i' (insert): b[j1:j2] should be inserted at a[i1:i1], i1==i2 in this case. // // 'e' (equal): a[i1:i2] == b[j1:j2] func (m *SequenceMatcher) GetOpCodes() []OpCode { if m.opCodes != nil { return m.opCodes } i, j := 0, 0 matching := m.GetMatchingBlocks() opCodes := make([]OpCode, 0, len(matching)) for _, m := range matching { // invariant: we've pumped out correct diffs to change // a[:i] into b[:j], and the next matching block is // a[ai:ai+size] == b[bj:bj+size]. So we need to pump // out a diff to change a[i:ai] into b[j:bj], pump out // the matching block, and move (i,j) beyond the match ai, bj, size := m.A, m.B, m.Size tag := byte(0) if i < ai && j < bj { tag = 'r' } else if i < ai { tag = 'd' } else if j < bj { tag = 'i' } if tag > 0 { opCodes = append(opCodes, OpCode{tag, i, ai, j, bj}) } i, j = ai+size, bj+size // the list of matching blocks is terminated by a // sentinel with size 0 if size > 0 { opCodes = append(opCodes, OpCode{'e', ai, i, bj, j}) } } m.opCodes = opCodes return m.opCodes } // Isolate change clusters by eliminating ranges with no changes. // // Return a generator of groups with up to n lines of context. // Each group is in the same format as returned by GetOpCodes(). func (m *SequenceMatcher) GetGroupedOpCodes(n int) [][]OpCode { if n < 0 { n = 3 } codes := m.GetOpCodes() if len(codes) == 0 { codes = []OpCode{OpCode{'e', 0, 1, 0, 1}} } // Fixup leading and trailing groups if they show no changes. if codes[0].Tag == 'e' { c := codes[0] i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 codes[0] = OpCode{c.Tag, max(i1, i2-n), i2, max(j1, j2-n), j2} } if codes[len(codes)-1].Tag == 'e' { c := codes[len(codes)-1] i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 codes[len(codes)-1] = OpCode{c.Tag, i1, min(i2, i1+n), j1, min(j2, j1+n)} } nn := n + n groups := [][]OpCode{} group := []OpCode{} for _, c := range codes { i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 // End the current group and start a new one whenever // there is a large range with no changes. if c.Tag == 'e' && i2-i1 > nn { group = append(group, OpCode{c.Tag, i1, min(i2, i1+n), j1, min(j2, j1+n)}) groups = append(groups, group) group = []OpCode{} i1, j1 = max(i1, i2-n), max(j1, j2-n) } group = append(group, OpCode{c.Tag, i1, i2, j1, j2}) } if len(group) > 0 && !(len(group) == 1 && group[0].Tag == 'e') { groups = append(groups, group) } return groups } // Return a measure of the sequences' similarity (float in [0,1]). // // Where T is the total number of elements in both sequences, and // M is the number of matches, this is 2.0*M / T. // Note that this is 1 if the sequences are identical, and 0 if // they have nothing in common. // // .Ratio() is expensive to compute if you haven't already computed // .GetMatchingBlocks() or .GetOpCodes(), in which case you may // want to try .QuickRatio() or .RealQuickRation() first to get an // upper bound. func (m *SequenceMatcher) Ratio() float64 { matches := 0 for _, m := range m.GetMatchingBlocks() { matches += m.Size } return calculateRatio(matches, len(m.a)+len(m.b)) } // Return an upper bound on ratio() relatively quickly. // // This isn't defined beyond that it is an upper bound on .Ratio(), and // is faster to compute. func (m *SequenceMatcher) QuickRatio() float64 { // viewing a and b as multisets, set matches to the cardinality // of their intersection; this counts the number of matches // without regard to order, so is clearly an upper bound if m.fullBCount == nil { m.fullBCount = map[string]int{} for _, s := range m.b { m.fullBCount[s] = m.fullBCount[s] + 1 } } // avail[x] is the number of times x appears in 'b' less the // number of times we've seen it in 'a' so far ... kinda avail := map[string]int{} matches := 0 for _, s := range m.a { n, ok := avail[s] if !ok { n = m.fullBCount[s] } avail[s] = n - 1 if n > 0 { matches += 1 } } return calculateRatio(matches, len(m.a)+len(m.b)) } // Return an upper bound on ratio() very quickly. // // This isn't defined beyond that it is an upper bound on .Ratio(), and // is faster to compute than either .Ratio() or .QuickRatio(). func (m *SequenceMatcher) RealQuickRatio() float64 { la, lb := len(m.a), len(m.b) return calculateRatio(min(la, lb), la+lb) } // Convert range to the "ed" format func formatRangeUnified(start, stop int) string { // Per the diff spec at http://www.unix.org/single_unix_specification/ beginning := start + 1 // lines start numbering with one length := stop - start if length == 1 { return fmt.Sprintf("%d", beginning) } if length == 0 { beginning -= 1 // empty ranges begin at line just before the range } return fmt.Sprintf("%d,%d", beginning, length) } // Unified diff parameters type UnifiedDiff struct { A []string // First sequence lines FromFile string // First file name FromDate string // First file time B []string // Second sequence lines ToFile string // Second file name ToDate string // Second file time Eol string // Headers end of line, defaults to LF Context int // Number of context lines } // Compare two sequences of lines; generate the delta as a unified diff. // // Unified diffs are a compact way of showing line changes and a few // lines of context. The number of context lines is set by 'n' which // defaults to three. // // By default, the diff control lines (those with ---, +++, or @@) are // created with a trailing newline. This is helpful so that inputs // created from file.readlines() result in diffs that are suitable for // file.writelines() since both the inputs and outputs have trailing // newlines. // // For inputs that do not have trailing newlines, set the lineterm // argument to "" so that the output will be uniformly newline free. // // The unidiff format normally has a header for filenames and modification // times. Any or all of these may be specified using strings for // 'fromfile', 'tofile', 'fromfiledate', and 'tofiledate'. // The modification times are normally expressed in the ISO 8601 format. func WriteUnifiedDiff(writer io.Writer, diff UnifiedDiff) error { buf := bufio.NewWriter(writer) defer buf.Flush() wf := func(format string, args ...interface{}) error { _, err := buf.WriteString(fmt.Sprintf(format, args...)) return err } ws := func(s string) error { _, err := buf.WriteString(s) return err } if len(diff.Eol) == 0 { diff.Eol = "\n" } started := false m := NewMatcher(diff.A, diff.B) for _, g := range m.GetGroupedOpCodes(diff.Context) { if !started { started = true fromDate := "" if len(diff.FromDate) > 0 { fromDate = "\t" + diff.FromDate } toDate := "" if len(diff.ToDate) > 0 { toDate = "\t" + diff.ToDate } if diff.FromFile != "" || diff.ToFile != "" { err := wf("--- %s%s%s", diff.FromFile, fromDate, diff.Eol) if err != nil { return err } err = wf("+++ %s%s%s", diff.ToFile, toDate, diff.Eol) if err != nil { return err } } } first, last := g[0], g[len(g)-1] range1 := formatRangeUnified(first.I1, last.I2) range2 := formatRangeUnified(first.J1, last.J2) if err := wf("@@ -%s +%s @@%s", range1, range2, diff.Eol); err != nil { return err } for _, c := range g { i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 if c.Tag == 'e' { for _, line := range diff.A[i1:i2] { if err := ws(" " + line); err != nil { return err } } continue } if c.Tag == 'r' || c.Tag == 'd' { for _, line := range diff.A[i1:i2] { if err := ws("-" + line); err != nil { return err } } } if c.Tag == 'r' || c.Tag == 'i' { for _, line := range diff.B[j1:j2] { if err := ws("+" + line); err != nil { return err } } } } } return nil } // Like WriteUnifiedDiff but returns the diff a string. func GetUnifiedDiffString(diff UnifiedDiff) (string, error) { w := &bytes.Buffer{} err := WriteUnifiedDiff(w, diff) return string(w.Bytes()), err } // Convert range to the "ed" format. func formatRangeContext(start, stop int) string { // Per the diff spec at http://www.unix.org/single_unix_specification/ beginning := start + 1 // lines start numbering with one length := stop - start if length == 0 { beginning -= 1 // empty ranges begin at line just before the range } if length <= 1 { return fmt.Sprintf("%d", beginning) } return fmt.Sprintf("%d,%d", beginning, beginning+length-1) } type ContextDiff UnifiedDiff // Compare two sequences of lines; generate the delta as a context diff. // // Context diffs are a compact way of showing line changes and a few // lines of context. The number of context lines is set by diff.Context // which defaults to three. // // By default, the diff control lines (those with *** or ---) are // created with a trailing newline. // // For inputs that do not have trailing newlines, set the diff.Eol // argument to "" so that the output will be uniformly newline free. // // The context diff format normally has a header for filenames and // modification times. Any or all of these may be specified using // strings for diff.FromFile, diff.ToFile, diff.FromDate, diff.ToDate. // The modification times are normally expressed in the ISO 8601 format. // If not specified, the strings default to blanks. func WriteContextDiff(writer io.Writer, diff ContextDiff) error { buf := bufio.NewWriter(writer) defer buf.Flush() var diffErr error wf := func(format string, args ...interface{}) { _, err := buf.WriteString(fmt.Sprintf(format, args...)) if diffErr == nil && err != nil { diffErr = err } } ws := func(s string) { _, err := buf.WriteString(s) if diffErr == nil && err != nil { diffErr = err } } if len(diff.Eol) == 0 { diff.Eol = "\n" } prefix := map[byte]string{ 'i': "+ ", 'd': "- ", 'r': "! ", 'e': " ", } started := false m := NewMatcher(diff.A, diff.B) for _, g := range m.GetGroupedOpCodes(diff.Context) { if !started { started = true fromDate := "" if len(diff.FromDate) > 0 { fromDate = "\t" + diff.FromDate } toDate := "" if len(diff.ToDate) > 0 { toDate = "\t" + diff.ToDate } if diff.FromFile != "" || diff.ToFile != "" { wf("*** %s%s%s", diff.FromFile, fromDate, diff.Eol) wf("--- %s%s%s", diff.ToFile, toDate, diff.Eol) } } first, last := g[0], g[len(g)-1] ws("***************" + diff.Eol) range1 := formatRangeContext(first.I1, last.I2) wf("*** %s ****%s", range1, diff.Eol) for _, c := range g { if c.Tag == 'r' || c.Tag == 'd' { for _, cc := range g { if cc.Tag == 'i' { continue } for _, line := range diff.A[cc.I1:cc.I2] { ws(prefix[cc.Tag] + line) } } break } } range2 := formatRangeContext(first.J1, last.J2) wf("--- %s ----%s", range2, diff.Eol) for _, c := range g { if c.Tag == 'r' || c.Tag == 'i' { for _, cc := range g { if cc.Tag == 'd' { continue } for _, line := range diff.B[cc.J1:cc.J2] { ws(prefix[cc.Tag] + line) } } break } } } return diffErr } // Like WriteContextDiff but returns the diff a string. func GetContextDiffString(diff ContextDiff) (string, error) { w := &bytes.Buffer{} err := WriteContextDiff(w, diff) return string(w.Bytes()), err } // Split a string on "\n" while preserving them. The output can be used // as input for UnifiedDiff and ContextDiff structures. func SplitLines(s string) []string { lines := strings.SplitAfter(s, "\n") lines[len(lines)-1] += "\n" return lines } ================================================ FILE: vendor/github.com/rivo/uniseg/LICENSE.txt ================================================ MIT License Copyright (c) 2019 Oliver Kuederle 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. ================================================ FILE: vendor/github.com/rivo/uniseg/README.md ================================================ # Unicode Text Segmentation for Go [![Go Reference](https://pkg.go.dev/badge/github.com/rivo/uniseg.svg)](https://pkg.go.dev/github.com/rivo/uniseg) [![Go Report](https://img.shields.io/badge/go%20report-A%2B-brightgreen.svg)](https://goreportcard.com/report/github.com/rivo/uniseg) This Go package implements Unicode Text Segmentation according to [Unicode Standard Annex #29](https://unicode.org/reports/tr29/), Unicode Line Breaking according to [Unicode Standard Annex #14](https://unicode.org/reports/tr14/) (Unicode version 15.0.0), and monospace font string width calculation similar to [wcwidth](https://man7.org/linux/man-pages/man3/wcwidth.3.html). ## Background ### Grapheme Clusters In Go, [strings are read-only slices of bytes](https://go.dev/blog/strings). They can be turned into Unicode code points using the `for` loop or by casting: `[]rune(str)`. However, multiple code points may be combined into one user-perceived character or what the Unicode specification calls "grapheme cluster". Here are some examples: |String|Bytes (UTF-8)|Code points (runes)|Grapheme clusters| |-|-|-|-| |Käse|6 bytes: `4b 61 cc 88 73 65`|5 code points: `4b 61 308 73 65`|4 clusters: `[4b],[61 308],[73],[65]`| |🏳️‍🌈|14 bytes: `f0 9f 8f b3 ef b8 8f e2 80 8d f0 9f 8c 88`|4 code points: `1f3f3 fe0f 200d 1f308`|1 cluster: `[1f3f3 fe0f 200d 1f308]`| |🇩🇪|8 bytes: `f0 9f 87 a9 f0 9f 87 aa`|2 code points: `1f1e9 1f1ea`|1 cluster: `[1f1e9 1f1ea]`| This package provides tools to iterate over these grapheme clusters. This may be used to determine the number of user-perceived characters, to split strings in their intended places, or to extract individual characters which form a unit. ### Word Boundaries Word boundaries are used in a number of different contexts. The most familiar ones are selection (double-click mouse selection), cursor movement ("move to next word" control-arrow keys), and the dialog option "Whole Word Search" for search and replace. They are also used in database queries, to determine whether elements are within a certain number of words of one another. Searching may also use word boundaries in determining matching items. This package provides tools to determine word boundaries within strings. ### Sentence Boundaries Sentence boundaries are often used for triple-click or some other method of selecting or iterating through blocks of text that are larger than single words. They are also used to determine whether words occur within the same sentence in database queries. This package provides tools to determine sentence boundaries within strings. ### Line Breaking Line breaking, also known as word wrapping, is the process of breaking a section of text into lines such that it will fit in the available width of a page, window or other display area. This package provides tools to determine where a string may or may not be broken and where it must be broken (for example after newline characters). ### Monospace Width Most terminals or text displays / text editors using a monospace font (for example source code editors) use a fixed width for each character. Some characters such as emojis or characters found in Asian and other languages may take up more than one character cell. This package provides tools to determine the number of cells a string will take up when displayed in a monospace font. See [here](https://pkg.go.dev/github.com/rivo/uniseg#hdr-Monospace_Width) for more information. ## Installation ```bash go get github.com/rivo/uniseg ``` ## Examples ### Counting Characters in a String ```go n := uniseg.GraphemeClusterCount("🇩🇪🏳️‍🌈") fmt.Println(n) // 2 ``` ### Calculating the Monospace String Width ```go width := uniseg.StringWidth("🇩🇪🏳️‍🌈!") fmt.Println(width) // 5 ``` ### Using the [`Graphemes`](https://pkg.go.dev/github.com/rivo/uniseg#Graphemes) Class This is the most convenient method of iterating over grapheme clusters: ```go gr := uniseg.NewGraphemes("👍🏼!") for gr.Next() { fmt.Printf("%x ", gr.Runes()) } // [1f44d 1f3fc] [21] ``` ### Using the [`Step`](https://pkg.go.dev/github.com/rivo/uniseg#Step) or [`StepString`](https://pkg.go.dev/github.com/rivo/uniseg#StepString) Function This avoids allocating a new `Graphemes` object but it requires the handling of states and boundaries: ```go str := "🇩🇪🏳️‍🌈" state := -1 var c string for len(str) > 0 { c, str, _, state = uniseg.StepString(str, state) fmt.Printf("%x ", []rune(c)) } // [1f1e9 1f1ea] [1f3f3 fe0f 200d 1f308] ``` ### Advanced Examples The [`Graphemes`](https://pkg.go.dev/github.com/rivo/uniseg#Graphemes) class offers the most convenient way to access all functionality of this package. But in some cases, it may be better to use the specialized functions directly. For example, if you're only interested in word segmentation, use [`FirstWord`](https://pkg.go.dev/github.com/rivo/uniseg#FirstWord) or [`FirstWordInString`](https://pkg.go.dev/github.com/rivo/uniseg#FirstWordInString): ```go str := "Hello, world!" state := -1 var c string for len(str) > 0 { c, str, state = uniseg.FirstWordInString(str, state) fmt.Printf("(%s)\n", c) } // (Hello) // (,) // ( ) // (world) // (!) ``` Similarly, use - [`FirstGraphemeCluster`](https://pkg.go.dev/github.com/rivo/uniseg#FirstGraphemeCluster) or [`FirstGraphemeClusterInString`](https://pkg.go.dev/github.com/rivo/uniseg#FirstGraphemeClusterInString) for grapheme cluster determination only, - [`FirstSentence`](https://pkg.go.dev/github.com/rivo/uniseg#FirstSentence) or [`FirstSentenceInString`](https://pkg.go.dev/github.com/rivo/uniseg#FirstSentenceInString) for sentence segmentation only, and - [`FirstLineSegment`](https://pkg.go.dev/github.com/rivo/uniseg#FirstLineSegment) or [`FirstLineSegmentInString`](https://pkg.go.dev/github.com/rivo/uniseg#FirstLineSegmentInString) for line breaking / word wrapping (although using [`Step`](https://pkg.go.dev/github.com/rivo/uniseg#Step) or [`StepString`](https://pkg.go.dev/github.com/rivo/uniseg#StepString) is preferred as it will observe grapheme cluster boundaries). If you're only interested in the width of characters, use [`FirstGraphemeCluster`](https://pkg.go.dev/github.com/rivo/uniseg#FirstGraphemeCluster) or [`FirstGraphemeClusterInString`](https://pkg.go.dev/github.com/rivo/uniseg#FirstGraphemeClusterInString). It is much faster than using [`Step`](https://pkg.go.dev/github.com/rivo/uniseg#Step), [`StepString`](https://pkg.go.dev/github.com/rivo/uniseg#StepString), or the [`Graphemes`](https://pkg.go.dev/github.com/rivo/uniseg#Graphemes) class because it does not include the logic for word / sentence / line boundaries. Finally, if you need to reverse a string while preserving grapheme clusters, use [`ReverseString`](https://pkg.go.dev/github.com/rivo/uniseg#ReverseString): ```go fmt.Println(uniseg.ReverseString("🇩🇪🏳️‍🌈")) // 🏳️‍🌈🇩🇪 ``` ## Documentation Refer to https://pkg.go.dev/github.com/rivo/uniseg for the package's documentation. ## Dependencies This package does not depend on any packages outside the standard library. ## Sponsor this Project [Become a Sponsor on GitHub](https://github.com/sponsors/rivo?metadata_source=uniseg_readme) to support this project! ## Your Feedback Add your issue here on GitHub, preferably before submitting any PR's. Feel free to get in touch if you have any questions. ================================================ FILE: vendor/github.com/rivo/uniseg/doc.go ================================================ /* Package uniseg implements Unicode Text Segmentation, Unicode Line Breaking, and string width calculation for monospace fonts. Unicode Text Segmentation conforms to Unicode Standard Annex #29 (https://unicode.org/reports/tr29/) and Unicode Line Breaking conforms to Unicode Standard Annex #14 (https://unicode.org/reports/tr14/). In short, using this package, you can split a string into grapheme clusters (what people would usually refer to as a "character"), into words, and into sentences. Or, in its simplest case, this package allows you to count the number of characters in a string, especially when it contains complex characters such as emojis, combining characters, or characters from Asian, Arabic, Hebrew, or other languages. Additionally, you can use it to implement line breaking (or "word wrapping"), that is, to determine where text can be broken over to the next line when the width of the line is not big enough to fit the entire text. Finally, you can use it to calculate the display width of a string for monospace fonts. # Getting Started If you just want to count the number of characters in a string, you can use [GraphemeClusterCount]. If you want to determine the display width of a string, you can use [StringWidth]. If you want to iterate over a string, you can use [Step], [StepString], or the [Graphemes] class (more convenient but less performant). This will provide you with all information: grapheme clusters, word boundaries, sentence boundaries, line breaks, and monospace character widths. The specialized functions [FirstGraphemeCluster], [FirstGraphemeClusterInString], [FirstWord], [FirstWordInString], [FirstSentence], and [FirstSentenceInString] can be used if only one type of information is needed. # Grapheme Clusters Consider the rainbow flag emoji: 🏳️‍🌈. On most modern systems, it appears as one character. But its string representation actually has 14 bytes, so counting bytes (or using len("🏳️‍🌈")) will not work as expected. Counting runes won't, either: The flag has 4 Unicode code points, thus 4 runes. The stdlib function utf8.RuneCountInString("🏳️‍🌈") and len([]rune("🏳️‍🌈")) will both return 4. The [GraphemeClusterCount] function will return 1 for the rainbow flag emoji. The Graphemes class and a variety of functions in this package will allow you to split strings into its grapheme clusters. # Word Boundaries Word boundaries are used in a number of different contexts. The most familiar ones are selection (double-click mouse selection), cursor movement ("move to next word" control-arrow keys), and the dialog option "Whole Word Search" for search and replace. This package provides methods for determining word boundaries. # Sentence Boundaries Sentence boundaries are often used for triple-click or some other method of selecting or iterating through blocks of text that are larger than single words. They are also used to determine whether words occur within the same sentence in database queries. This package provides methods for determining sentence boundaries. # Line Breaking Line breaking, also known as word wrapping, is the process of breaking a section of text into lines such that it will fit in the available width of a page, window or other display area. This package provides methods to determine the positions in a string where a line must be broken, may be broken, or must not be broken. # Monospace Width Monospace width, as referred to in this package, is the width of a string in a monospace font. This is commonly used in terminal user interfaces or text displays or editors that don't support proportional fonts. A width of 1 corresponds to a single character cell. The C function [wcswidth()] and its implementation in other programming languages is in widespread use for the same purpose. However, there is no standard for the calculation of such widths, and this package differs from wcswidth() in a number of ways, presumably to generate more visually pleasing results. To start, we assume that every code point has a width of 1, with the following exceptions: - Code points with grapheme cluster break properties Control, CR, LF, Extend, and ZWJ have a width of 0. - U+2E3A, Two-Em Dash, has a width of 3. - U+2E3B, Three-Em Dash, has a width of 4. - Characters with the East-Asian Width properties "Fullwidth" (F) and "Wide" (W) have a width of 2. (Properties "Ambiguous" (A) and "Neutral" (N) both have a width of 1.) - Code points with grapheme cluster break property Regional Indicator have a width of 2. - Code points with grapheme cluster break property Extended Pictographic have a width of 2, unless their Emoji Presentation flag is "No", in which case the width is 1. For Hangul grapheme clusters composed of conjoining Jamo and for Regional Indicators (flags), all code points except the first one have a width of 0. For grapheme clusters starting with an Extended Pictographic, any additional code point will force a total width of 2, except if the Variation Selector-15 (U+FE0E) is included, in which case the total width is always 1. Grapheme clusters ending with Variation Selector-16 (U+FE0F) have a width of 2. Note that whether these widths appear correct depends on your application's render engine, to which extent it conforms to the Unicode Standard, and its choice of font. [wcswidth()]: https://man7.org/linux/man-pages/man3/wcswidth.3.html */ package uniseg ================================================ FILE: vendor/github.com/rivo/uniseg/eastasianwidth.go ================================================ // Code generated via go generate from gen_properties.go. DO NOT EDIT. package uniseg // eastAsianWidth are taken from // https://www.unicode.org/Public/15.0.0/ucd/EastAsianWidth.txt // and // https://unicode.org/Public/15.0.0/ucd/emoji/emoji-data.txt // ("Extended_Pictographic" only) // on September 5, 2023. See https://www.unicode.org/license.html for the Unicode // license agreement. var eastAsianWidth = [][3]int{ {0x0000, 0x001F, prN}, // Cc [32] .. {0x0020, 0x0020, prNa}, // Zs SPACE {0x0021, 0x0023, prNa}, // Po [3] EXCLAMATION MARK..NUMBER SIGN {0x0024, 0x0024, prNa}, // Sc DOLLAR SIGN {0x0025, 0x0027, prNa}, // Po [3] PERCENT SIGN..APOSTROPHE {0x0028, 0x0028, prNa}, // Ps LEFT PARENTHESIS {0x0029, 0x0029, prNa}, // Pe RIGHT PARENTHESIS {0x002A, 0x002A, prNa}, // Po ASTERISK {0x002B, 0x002B, prNa}, // Sm PLUS SIGN {0x002C, 0x002C, prNa}, // Po COMMA {0x002D, 0x002D, prNa}, // Pd HYPHEN-MINUS {0x002E, 0x002F, prNa}, // Po [2] FULL STOP..SOLIDUS {0x0030, 0x0039, prNa}, // Nd [10] DIGIT ZERO..DIGIT NINE {0x003A, 0x003B, prNa}, // Po [2] COLON..SEMICOLON {0x003C, 0x003E, prNa}, // Sm [3] LESS-THAN SIGN..GREATER-THAN SIGN {0x003F, 0x0040, prNa}, // Po [2] QUESTION MARK..COMMERCIAL AT {0x0041, 0x005A, prNa}, // Lu [26] LATIN CAPITAL LETTER A..LATIN CAPITAL LETTER Z {0x005B, 0x005B, prNa}, // Ps LEFT SQUARE BRACKET {0x005C, 0x005C, prNa}, // Po REVERSE SOLIDUS {0x005D, 0x005D, prNa}, // Pe RIGHT SQUARE BRACKET {0x005E, 0x005E, prNa}, // Sk CIRCUMFLEX ACCENT {0x005F, 0x005F, prNa}, // Pc LOW LINE {0x0060, 0x0060, prNa}, // Sk GRAVE ACCENT {0x0061, 0x007A, prNa}, // Ll [26] LATIN SMALL LETTER A..LATIN SMALL LETTER Z {0x007B, 0x007B, prNa}, // Ps LEFT CURLY BRACKET {0x007C, 0x007C, prNa}, // Sm VERTICAL LINE {0x007D, 0x007D, prNa}, // Pe RIGHT CURLY BRACKET {0x007E, 0x007E, prNa}, // Sm TILDE {0x007F, 0x007F, prN}, // Cc {0x0080, 0x009F, prN}, // Cc [32] .. {0x00A0, 0x00A0, prN}, // Zs NO-BREAK SPACE {0x00A1, 0x00A1, prA}, // Po INVERTED EXCLAMATION MARK {0x00A2, 0x00A3, prNa}, // Sc [2] CENT SIGN..POUND SIGN {0x00A4, 0x00A4, prA}, // Sc CURRENCY SIGN {0x00A5, 0x00A5, prNa}, // Sc YEN SIGN {0x00A6, 0x00A6, prNa}, // So BROKEN BAR {0x00A7, 0x00A7, prA}, // Po SECTION SIGN {0x00A8, 0x00A8, prA}, // Sk DIAERESIS {0x00A9, 0x00A9, prN}, // So COPYRIGHT SIGN {0x00AA, 0x00AA, prA}, // Lo FEMININE ORDINAL INDICATOR {0x00AB, 0x00AB, prN}, // Pi LEFT-POINTING DOUBLE ANGLE QUOTATION MARK {0x00AC, 0x00AC, prNa}, // Sm NOT SIGN {0x00AD, 0x00AD, prA}, // Cf SOFT HYPHEN {0x00AE, 0x00AE, prA}, // So REGISTERED SIGN {0x00AF, 0x00AF, prNa}, // Sk MACRON {0x00B0, 0x00B0, prA}, // So DEGREE SIGN {0x00B1, 0x00B1, prA}, // Sm PLUS-MINUS SIGN {0x00B2, 0x00B3, prA}, // No [2] SUPERSCRIPT TWO..SUPERSCRIPT THREE {0x00B4, 0x00B4, prA}, // Sk ACUTE ACCENT {0x00B5, 0x00B5, prN}, // Ll MICRO SIGN {0x00B6, 0x00B7, prA}, // Po [2] PILCROW SIGN..MIDDLE DOT {0x00B8, 0x00B8, prA}, // Sk CEDILLA {0x00B9, 0x00B9, prA}, // No SUPERSCRIPT ONE {0x00BA, 0x00BA, prA}, // Lo MASCULINE ORDINAL INDICATOR {0x00BB, 0x00BB, prN}, // Pf RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK {0x00BC, 0x00BE, prA}, // No [3] VULGAR FRACTION ONE QUARTER..VULGAR FRACTION THREE QUARTERS {0x00BF, 0x00BF, prA}, // Po INVERTED QUESTION MARK {0x00C0, 0x00C5, prN}, // Lu [6] LATIN CAPITAL LETTER A WITH GRAVE..LATIN CAPITAL LETTER A WITH RING ABOVE {0x00C6, 0x00C6, prA}, // Lu LATIN CAPITAL LETTER AE {0x00C7, 0x00CF, prN}, // Lu [9] LATIN CAPITAL LETTER C WITH CEDILLA..LATIN CAPITAL LETTER I WITH DIAERESIS {0x00D0, 0x00D0, prA}, // Lu LATIN CAPITAL LETTER ETH {0x00D1, 0x00D6, prN}, // Lu [6] LATIN CAPITAL LETTER N WITH TILDE..LATIN CAPITAL LETTER O WITH DIAERESIS {0x00D7, 0x00D7, prA}, // Sm MULTIPLICATION SIGN {0x00D8, 0x00D8, prA}, // Lu LATIN CAPITAL LETTER O WITH STROKE {0x00D9, 0x00DD, prN}, // Lu [5] LATIN CAPITAL LETTER U WITH GRAVE..LATIN CAPITAL LETTER Y WITH ACUTE {0x00DE, 0x00E1, prA}, // L& [4] LATIN CAPITAL LETTER THORN..LATIN SMALL LETTER A WITH ACUTE {0x00E2, 0x00E5, prN}, // Ll [4] LATIN SMALL LETTER A WITH CIRCUMFLEX..LATIN SMALL LETTER A WITH RING ABOVE {0x00E6, 0x00E6, prA}, // Ll LATIN SMALL LETTER AE {0x00E7, 0x00E7, prN}, // Ll LATIN SMALL LETTER C WITH CEDILLA {0x00E8, 0x00EA, prA}, // Ll [3] LATIN SMALL LETTER E WITH GRAVE..LATIN SMALL LETTER E WITH CIRCUMFLEX {0x00EB, 0x00EB, prN}, // Ll LATIN SMALL LETTER E WITH DIAERESIS {0x00EC, 0x00ED, prA}, // Ll [2] LATIN SMALL LETTER I WITH GRAVE..LATIN SMALL LETTER I WITH ACUTE {0x00EE, 0x00EF, prN}, // Ll [2] LATIN SMALL LETTER I WITH CIRCUMFLEX..LATIN SMALL LETTER I WITH DIAERESIS {0x00F0, 0x00F0, prA}, // Ll LATIN SMALL LETTER ETH {0x00F1, 0x00F1, prN}, // Ll LATIN SMALL LETTER N WITH TILDE {0x00F2, 0x00F3, prA}, // Ll [2] LATIN SMALL LETTER O WITH GRAVE..LATIN SMALL LETTER O WITH ACUTE {0x00F4, 0x00F6, prN}, // Ll [3] LATIN SMALL LETTER O WITH CIRCUMFLEX..LATIN SMALL LETTER O WITH DIAERESIS {0x00F7, 0x00F7, prA}, // Sm DIVISION SIGN {0x00F8, 0x00FA, prA}, // Ll [3] LATIN SMALL LETTER O WITH STROKE..LATIN SMALL LETTER U WITH ACUTE {0x00FB, 0x00FB, prN}, // Ll LATIN SMALL LETTER U WITH CIRCUMFLEX {0x00FC, 0x00FC, prA}, // Ll LATIN SMALL LETTER U WITH DIAERESIS {0x00FD, 0x00FD, prN}, // Ll LATIN SMALL LETTER Y WITH ACUTE {0x00FE, 0x00FE, prA}, // Ll LATIN SMALL LETTER THORN {0x00FF, 0x00FF, prN}, // Ll LATIN SMALL LETTER Y WITH DIAERESIS {0x0100, 0x0100, prN}, // Lu LATIN CAPITAL LETTER A WITH MACRON {0x0101, 0x0101, prA}, // Ll LATIN SMALL LETTER A WITH MACRON {0x0102, 0x0110, prN}, // L& [15] LATIN CAPITAL LETTER A WITH BREVE..LATIN CAPITAL LETTER D WITH STROKE {0x0111, 0x0111, prA}, // Ll LATIN SMALL LETTER D WITH STROKE {0x0112, 0x0112, prN}, // Lu LATIN CAPITAL LETTER E WITH MACRON {0x0113, 0x0113, prA}, // Ll LATIN SMALL LETTER E WITH MACRON {0x0114, 0x011A, prN}, // L& [7] LATIN CAPITAL LETTER E WITH BREVE..LATIN CAPITAL LETTER E WITH CARON {0x011B, 0x011B, prA}, // Ll LATIN SMALL LETTER E WITH CARON {0x011C, 0x0125, prN}, // L& [10] LATIN CAPITAL LETTER G WITH CIRCUMFLEX..LATIN SMALL LETTER H WITH CIRCUMFLEX {0x0126, 0x0127, prA}, // L& [2] LATIN CAPITAL LETTER H WITH STROKE..LATIN SMALL LETTER H WITH STROKE {0x0128, 0x012A, prN}, // L& [3] LATIN CAPITAL LETTER I WITH TILDE..LATIN CAPITAL LETTER I WITH MACRON {0x012B, 0x012B, prA}, // Ll LATIN SMALL LETTER I WITH MACRON {0x012C, 0x0130, prN}, // L& [5] LATIN CAPITAL LETTER I WITH BREVE..LATIN CAPITAL LETTER I WITH DOT ABOVE {0x0131, 0x0133, prA}, // L& [3] LATIN SMALL LETTER DOTLESS I..LATIN SMALL LIGATURE IJ {0x0134, 0x0137, prN}, // L& [4] LATIN CAPITAL LETTER J WITH CIRCUMFLEX..LATIN SMALL LETTER K WITH CEDILLA {0x0138, 0x0138, prA}, // Ll LATIN SMALL LETTER KRA {0x0139, 0x013E, prN}, // L& [6] LATIN CAPITAL LETTER L WITH ACUTE..LATIN SMALL LETTER L WITH CARON {0x013F, 0x0142, prA}, // L& [4] LATIN CAPITAL LETTER L WITH MIDDLE DOT..LATIN SMALL LETTER L WITH STROKE {0x0143, 0x0143, prN}, // Lu LATIN CAPITAL LETTER N WITH ACUTE {0x0144, 0x0144, prA}, // Ll LATIN SMALL LETTER N WITH ACUTE {0x0145, 0x0147, prN}, // L& [3] LATIN CAPITAL LETTER N WITH CEDILLA..LATIN CAPITAL LETTER N WITH CARON {0x0148, 0x014B, prA}, // L& [4] LATIN SMALL LETTER N WITH CARON..LATIN SMALL LETTER ENG {0x014C, 0x014C, prN}, // Lu LATIN CAPITAL LETTER O WITH MACRON {0x014D, 0x014D, prA}, // Ll LATIN SMALL LETTER O WITH MACRON {0x014E, 0x0151, prN}, // L& [4] LATIN CAPITAL LETTER O WITH BREVE..LATIN SMALL LETTER O WITH DOUBLE ACUTE {0x0152, 0x0153, prA}, // L& [2] LATIN CAPITAL LIGATURE OE..LATIN SMALL LIGATURE OE {0x0154, 0x0165, prN}, // L& [18] LATIN CAPITAL LETTER R WITH ACUTE..LATIN SMALL LETTER T WITH CARON {0x0166, 0x0167, prA}, // L& [2] LATIN CAPITAL LETTER T WITH STROKE..LATIN SMALL LETTER T WITH STROKE {0x0168, 0x016A, prN}, // L& [3] LATIN CAPITAL LETTER U WITH TILDE..LATIN CAPITAL LETTER U WITH MACRON {0x016B, 0x016B, prA}, // Ll LATIN SMALL LETTER U WITH MACRON {0x016C, 0x017F, prN}, // L& [20] LATIN CAPITAL LETTER U WITH BREVE..LATIN SMALL LETTER LONG S {0x0180, 0x01BA, prN}, // L& [59] LATIN SMALL LETTER B WITH STROKE..LATIN SMALL LETTER EZH WITH TAIL {0x01BB, 0x01BB, prN}, // Lo LATIN LETTER TWO WITH STROKE {0x01BC, 0x01BF, prN}, // L& [4] LATIN CAPITAL LETTER TONE FIVE..LATIN LETTER WYNN {0x01C0, 0x01C3, prN}, // Lo [4] LATIN LETTER DENTAL CLICK..LATIN LETTER RETROFLEX CLICK {0x01C4, 0x01CD, prN}, // L& [10] LATIN CAPITAL LETTER DZ WITH CARON..LATIN CAPITAL LETTER A WITH CARON {0x01CE, 0x01CE, prA}, // Ll LATIN SMALL LETTER A WITH CARON {0x01CF, 0x01CF, prN}, // Lu LATIN CAPITAL LETTER I WITH CARON {0x01D0, 0x01D0, prA}, // Ll LATIN SMALL LETTER I WITH CARON {0x01D1, 0x01D1, prN}, // Lu LATIN CAPITAL LETTER O WITH CARON {0x01D2, 0x01D2, prA}, // Ll LATIN SMALL LETTER O WITH CARON {0x01D3, 0x01D3, prN}, // Lu LATIN CAPITAL LETTER U WITH CARON {0x01D4, 0x01D4, prA}, // Ll LATIN SMALL LETTER U WITH CARON {0x01D5, 0x01D5, prN}, // Lu LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON {0x01D6, 0x01D6, prA}, // Ll LATIN SMALL LETTER U WITH DIAERESIS AND MACRON {0x01D7, 0x01D7, prN}, // Lu LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE {0x01D8, 0x01D8, prA}, // Ll LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE {0x01D9, 0x01D9, prN}, // Lu LATIN CAPITAL LETTER U WITH DIAERESIS AND CARON {0x01DA, 0x01DA, prA}, // Ll LATIN SMALL LETTER U WITH DIAERESIS AND CARON {0x01DB, 0x01DB, prN}, // Lu LATIN CAPITAL LETTER U WITH DIAERESIS AND GRAVE {0x01DC, 0x01DC, prA}, // Ll LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE {0x01DD, 0x024F, prN}, // L& [115] LATIN SMALL LETTER TURNED E..LATIN SMALL LETTER Y WITH STROKE {0x0250, 0x0250, prN}, // Ll LATIN SMALL LETTER TURNED A {0x0251, 0x0251, prA}, // Ll LATIN SMALL LETTER ALPHA {0x0252, 0x0260, prN}, // Ll [15] LATIN SMALL LETTER TURNED ALPHA..LATIN SMALL LETTER G WITH HOOK {0x0261, 0x0261, prA}, // Ll LATIN SMALL LETTER SCRIPT G {0x0262, 0x0293, prN}, // Ll [50] LATIN LETTER SMALL CAPITAL G..LATIN SMALL LETTER EZH WITH CURL {0x0294, 0x0294, prN}, // Lo LATIN LETTER GLOTTAL STOP {0x0295, 0x02AF, prN}, // Ll [27] LATIN LETTER PHARYNGEAL VOICED FRICATIVE..LATIN SMALL LETTER TURNED H WITH FISHHOOK AND TAIL {0x02B0, 0x02C1, prN}, // Lm [18] MODIFIER LETTER SMALL H..MODIFIER LETTER REVERSED GLOTTAL STOP {0x02C2, 0x02C3, prN}, // Sk [2] MODIFIER LETTER LEFT ARROWHEAD..MODIFIER LETTER RIGHT ARROWHEAD {0x02C4, 0x02C4, prA}, // Sk MODIFIER LETTER UP ARROWHEAD {0x02C5, 0x02C5, prN}, // Sk MODIFIER LETTER DOWN ARROWHEAD {0x02C6, 0x02C6, prN}, // Lm MODIFIER LETTER CIRCUMFLEX ACCENT {0x02C7, 0x02C7, prA}, // Lm CARON {0x02C8, 0x02C8, prN}, // Lm MODIFIER LETTER VERTICAL LINE {0x02C9, 0x02CB, prA}, // Lm [3] MODIFIER LETTER MACRON..MODIFIER LETTER GRAVE ACCENT {0x02CC, 0x02CC, prN}, // Lm MODIFIER LETTER LOW VERTICAL LINE {0x02CD, 0x02CD, prA}, // Lm MODIFIER LETTER LOW MACRON {0x02CE, 0x02CF, prN}, // Lm [2] MODIFIER LETTER LOW GRAVE ACCENT..MODIFIER LETTER LOW ACUTE ACCENT {0x02D0, 0x02D0, prA}, // Lm MODIFIER LETTER TRIANGULAR COLON {0x02D1, 0x02D1, prN}, // Lm MODIFIER LETTER HALF TRIANGULAR COLON {0x02D2, 0x02D7, prN}, // Sk [6] MODIFIER LETTER CENTRED RIGHT HALF RING..MODIFIER LETTER MINUS SIGN {0x02D8, 0x02DB, prA}, // Sk [4] BREVE..OGONEK {0x02DC, 0x02DC, prN}, // Sk SMALL TILDE {0x02DD, 0x02DD, prA}, // Sk DOUBLE ACUTE ACCENT {0x02DE, 0x02DE, prN}, // Sk MODIFIER LETTER RHOTIC HOOK {0x02DF, 0x02DF, prA}, // Sk MODIFIER LETTER CROSS ACCENT {0x02E0, 0x02E4, prN}, // Lm [5] MODIFIER LETTER SMALL GAMMA..MODIFIER LETTER SMALL REVERSED GLOTTAL STOP {0x02E5, 0x02EB, prN}, // Sk [7] MODIFIER LETTER EXTRA-HIGH TONE BAR..MODIFIER LETTER YANG DEPARTING TONE MARK {0x02EC, 0x02EC, prN}, // Lm MODIFIER LETTER VOICING {0x02ED, 0x02ED, prN}, // Sk MODIFIER LETTER UNASPIRATED {0x02EE, 0x02EE, prN}, // Lm MODIFIER LETTER DOUBLE APOSTROPHE {0x02EF, 0x02FF, prN}, // Sk [17] MODIFIER LETTER LOW DOWN ARROWHEAD..MODIFIER LETTER LOW LEFT ARROW {0x0300, 0x036F, prA}, // Mn [112] COMBINING GRAVE ACCENT..COMBINING LATIN SMALL LETTER X {0x0370, 0x0373, prN}, // L& [4] GREEK CAPITAL LETTER HETA..GREEK SMALL LETTER ARCHAIC SAMPI {0x0374, 0x0374, prN}, // Lm GREEK NUMERAL SIGN {0x0375, 0x0375, prN}, // Sk GREEK LOWER NUMERAL SIGN {0x0376, 0x0377, prN}, // L& [2] GREEK CAPITAL LETTER PAMPHYLIAN DIGAMMA..GREEK SMALL LETTER PAMPHYLIAN DIGAMMA {0x037A, 0x037A, prN}, // Lm GREEK YPOGEGRAMMENI {0x037B, 0x037D, prN}, // Ll [3] GREEK SMALL REVERSED LUNATE SIGMA SYMBOL..GREEK SMALL REVERSED DOTTED LUNATE SIGMA SYMBOL {0x037E, 0x037E, prN}, // Po GREEK QUESTION MARK {0x037F, 0x037F, prN}, // Lu GREEK CAPITAL LETTER YOT {0x0384, 0x0385, prN}, // Sk [2] GREEK TONOS..GREEK DIALYTIKA TONOS {0x0386, 0x0386, prN}, // Lu GREEK CAPITAL LETTER ALPHA WITH TONOS {0x0387, 0x0387, prN}, // Po GREEK ANO TELEIA {0x0388, 0x038A, prN}, // Lu [3] GREEK CAPITAL LETTER EPSILON WITH TONOS..GREEK CAPITAL LETTER IOTA WITH TONOS {0x038C, 0x038C, prN}, // Lu GREEK CAPITAL LETTER OMICRON WITH TONOS {0x038E, 0x0390, prN}, // L& [3] GREEK CAPITAL LETTER UPSILON WITH TONOS..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS {0x0391, 0x03A1, prA}, // Lu [17] GREEK CAPITAL LETTER ALPHA..GREEK CAPITAL LETTER RHO {0x03A3, 0x03A9, prA}, // Lu [7] GREEK CAPITAL LETTER SIGMA..GREEK CAPITAL LETTER OMEGA {0x03AA, 0x03B0, prN}, // L& [7] GREEK CAPITAL LETTER IOTA WITH DIALYTIKA..GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS {0x03B1, 0x03C1, prA}, // Ll [17] GREEK SMALL LETTER ALPHA..GREEK SMALL LETTER RHO {0x03C2, 0x03C2, prN}, // Ll GREEK SMALL LETTER FINAL SIGMA {0x03C3, 0x03C9, prA}, // Ll [7] GREEK SMALL LETTER SIGMA..GREEK SMALL LETTER OMEGA {0x03CA, 0x03F5, prN}, // L& [44] GREEK SMALL LETTER IOTA WITH DIALYTIKA..GREEK LUNATE EPSILON SYMBOL {0x03F6, 0x03F6, prN}, // Sm GREEK REVERSED LUNATE EPSILON SYMBOL {0x03F7, 0x03FF, prN}, // L& [9] GREEK CAPITAL LETTER SHO..GREEK CAPITAL REVERSED DOTTED LUNATE SIGMA SYMBOL {0x0400, 0x0400, prN}, // Lu CYRILLIC CAPITAL LETTER IE WITH GRAVE {0x0401, 0x0401, prA}, // Lu CYRILLIC CAPITAL LETTER IO {0x0402, 0x040F, prN}, // Lu [14] CYRILLIC CAPITAL LETTER DJE..CYRILLIC CAPITAL LETTER DZHE {0x0410, 0x044F, prA}, // L& [64] CYRILLIC CAPITAL LETTER A..CYRILLIC SMALL LETTER YA {0x0450, 0x0450, prN}, // Ll CYRILLIC SMALL LETTER IE WITH GRAVE {0x0451, 0x0451, prA}, // Ll CYRILLIC SMALL LETTER IO {0x0452, 0x0481, prN}, // L& [48] CYRILLIC SMALL LETTER DJE..CYRILLIC SMALL LETTER KOPPA {0x0482, 0x0482, prN}, // So CYRILLIC THOUSANDS SIGN {0x0483, 0x0487, prN}, // Mn [5] COMBINING CYRILLIC TITLO..COMBINING CYRILLIC POKRYTIE {0x0488, 0x0489, prN}, // Me [2] COMBINING CYRILLIC HUNDRED THOUSANDS SIGN..COMBINING CYRILLIC MILLIONS SIGN {0x048A, 0x04FF, prN}, // L& [118] CYRILLIC CAPITAL LETTER SHORT I WITH TAIL..CYRILLIC SMALL LETTER HA WITH STROKE {0x0500, 0x052F, prN}, // L& [48] CYRILLIC CAPITAL LETTER KOMI DE..CYRILLIC SMALL LETTER EL WITH DESCENDER {0x0531, 0x0556, prN}, // Lu [38] ARMENIAN CAPITAL LETTER AYB..ARMENIAN CAPITAL LETTER FEH {0x0559, 0x0559, prN}, // Lm ARMENIAN MODIFIER LETTER LEFT HALF RING {0x055A, 0x055F, prN}, // Po [6] ARMENIAN APOSTROPHE..ARMENIAN ABBREVIATION MARK {0x0560, 0x0588, prN}, // Ll [41] ARMENIAN SMALL LETTER TURNED AYB..ARMENIAN SMALL LETTER YI WITH STROKE {0x0589, 0x0589, prN}, // Po ARMENIAN FULL STOP {0x058A, 0x058A, prN}, // Pd ARMENIAN HYPHEN {0x058D, 0x058E, prN}, // So [2] RIGHT-FACING ARMENIAN ETERNITY SIGN..LEFT-FACING ARMENIAN ETERNITY SIGN {0x058F, 0x058F, prN}, // Sc ARMENIAN DRAM SIGN {0x0591, 0x05BD, prN}, // Mn [45] HEBREW ACCENT ETNAHTA..HEBREW POINT METEG {0x05BE, 0x05BE, prN}, // Pd HEBREW PUNCTUATION MAQAF {0x05BF, 0x05BF, prN}, // Mn HEBREW POINT RAFE {0x05C0, 0x05C0, prN}, // Po HEBREW PUNCTUATION PASEQ {0x05C1, 0x05C2, prN}, // Mn [2] HEBREW POINT SHIN DOT..HEBREW POINT SIN DOT {0x05C3, 0x05C3, prN}, // Po HEBREW PUNCTUATION SOF PASUQ {0x05C4, 0x05C5, prN}, // Mn [2] HEBREW MARK UPPER DOT..HEBREW MARK LOWER DOT {0x05C6, 0x05C6, prN}, // Po HEBREW PUNCTUATION NUN HAFUKHA {0x05C7, 0x05C7, prN}, // Mn HEBREW POINT QAMATS QATAN {0x05D0, 0x05EA, prN}, // Lo [27] HEBREW LETTER ALEF..HEBREW LETTER TAV {0x05EF, 0x05F2, prN}, // Lo [4] HEBREW YOD TRIANGLE..HEBREW LIGATURE YIDDISH DOUBLE YOD {0x05F3, 0x05F4, prN}, // Po [2] HEBREW PUNCTUATION GERESH..HEBREW PUNCTUATION GERSHAYIM {0x0600, 0x0605, prN}, // Cf [6] ARABIC NUMBER SIGN..ARABIC NUMBER MARK ABOVE {0x0606, 0x0608, prN}, // Sm [3] ARABIC-INDIC CUBE ROOT..ARABIC RAY {0x0609, 0x060A, prN}, // Po [2] ARABIC-INDIC PER MILLE SIGN..ARABIC-INDIC PER TEN THOUSAND SIGN {0x060B, 0x060B, prN}, // Sc AFGHANI SIGN {0x060C, 0x060D, prN}, // Po [2] ARABIC COMMA..ARABIC DATE SEPARATOR {0x060E, 0x060F, prN}, // So [2] ARABIC POETIC VERSE SIGN..ARABIC SIGN MISRA {0x0610, 0x061A, prN}, // Mn [11] ARABIC SIGN SALLALLAHOU ALAYHE WASSALLAM..ARABIC SMALL KASRA {0x061B, 0x061B, prN}, // Po ARABIC SEMICOLON {0x061C, 0x061C, prN}, // Cf ARABIC LETTER MARK {0x061D, 0x061F, prN}, // Po [3] ARABIC END OF TEXT MARK..ARABIC QUESTION MARK {0x0620, 0x063F, prN}, // Lo [32] ARABIC LETTER KASHMIRI YEH..ARABIC LETTER FARSI YEH WITH THREE DOTS ABOVE {0x0640, 0x0640, prN}, // Lm ARABIC TATWEEL {0x0641, 0x064A, prN}, // Lo [10] ARABIC LETTER FEH..ARABIC LETTER YEH {0x064B, 0x065F, prN}, // Mn [21] ARABIC FATHATAN..ARABIC WAVY HAMZA BELOW {0x0660, 0x0669, prN}, // Nd [10] ARABIC-INDIC DIGIT ZERO..ARABIC-INDIC DIGIT NINE {0x066A, 0x066D, prN}, // Po [4] ARABIC PERCENT SIGN..ARABIC FIVE POINTED STAR {0x066E, 0x066F, prN}, // Lo [2] ARABIC LETTER DOTLESS BEH..ARABIC LETTER DOTLESS QAF {0x0670, 0x0670, prN}, // Mn ARABIC LETTER SUPERSCRIPT ALEF {0x0671, 0x06D3, prN}, // Lo [99] ARABIC LETTER ALEF WASLA..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE {0x06D4, 0x06D4, prN}, // Po ARABIC FULL STOP {0x06D5, 0x06D5, prN}, // Lo ARABIC LETTER AE {0x06D6, 0x06DC, prN}, // Mn [7] ARABIC SMALL HIGH LIGATURE SAD WITH LAM WITH ALEF MAKSURA..ARABIC SMALL HIGH SEEN {0x06DD, 0x06DD, prN}, // Cf ARABIC END OF AYAH {0x06DE, 0x06DE, prN}, // So ARABIC START OF RUB EL HIZB {0x06DF, 0x06E4, prN}, // Mn [6] ARABIC SMALL HIGH ROUNDED ZERO..ARABIC SMALL HIGH MADDA {0x06E5, 0x06E6, prN}, // Lm [2] ARABIC SMALL WAW..ARABIC SMALL YEH {0x06E7, 0x06E8, prN}, // Mn [2] ARABIC SMALL HIGH YEH..ARABIC SMALL HIGH NOON {0x06E9, 0x06E9, prN}, // So ARABIC PLACE OF SAJDAH {0x06EA, 0x06ED, prN}, // Mn [4] ARABIC EMPTY CENTRE LOW STOP..ARABIC SMALL LOW MEEM {0x06EE, 0x06EF, prN}, // Lo [2] ARABIC LETTER DAL WITH INVERTED V..ARABIC LETTER REH WITH INVERTED V {0x06F0, 0x06F9, prN}, // Nd [10] EXTENDED ARABIC-INDIC DIGIT ZERO..EXTENDED ARABIC-INDIC DIGIT NINE {0x06FA, 0x06FC, prN}, // Lo [3] ARABIC LETTER SHEEN WITH DOT BELOW..ARABIC LETTER GHAIN WITH DOT BELOW {0x06FD, 0x06FE, prN}, // So [2] ARABIC SIGN SINDHI AMPERSAND..ARABIC SIGN SINDHI POSTPOSITION MEN {0x06FF, 0x06FF, prN}, // Lo ARABIC LETTER HEH WITH INVERTED V {0x0700, 0x070D, prN}, // Po [14] SYRIAC END OF PARAGRAPH..SYRIAC HARKLEAN ASTERISCUS {0x070F, 0x070F, prN}, // Cf SYRIAC ABBREVIATION MARK {0x0710, 0x0710, prN}, // Lo SYRIAC LETTER ALAPH {0x0711, 0x0711, prN}, // Mn SYRIAC LETTER SUPERSCRIPT ALAPH {0x0712, 0x072F, prN}, // Lo [30] SYRIAC LETTER BETH..SYRIAC LETTER PERSIAN DHALATH {0x0730, 0x074A, prN}, // Mn [27] SYRIAC PTHAHA ABOVE..SYRIAC BARREKH {0x074D, 0x074F, prN}, // Lo [3] SYRIAC LETTER SOGDIAN ZHAIN..SYRIAC LETTER SOGDIAN FE {0x0750, 0x077F, prN}, // Lo [48] ARABIC LETTER BEH WITH THREE DOTS HORIZONTALLY BELOW..ARABIC LETTER KAF WITH TWO DOTS ABOVE {0x0780, 0x07A5, prN}, // Lo [38] THAANA LETTER HAA..THAANA LETTER WAAVU {0x07A6, 0x07B0, prN}, // Mn [11] THAANA ABAFILI..THAANA SUKUN {0x07B1, 0x07B1, prN}, // Lo THAANA LETTER NAA {0x07C0, 0x07C9, prN}, // Nd [10] NKO DIGIT ZERO..NKO DIGIT NINE {0x07CA, 0x07EA, prN}, // Lo [33] NKO LETTER A..NKO LETTER JONA RA {0x07EB, 0x07F3, prN}, // Mn [9] NKO COMBINING SHORT HIGH TONE..NKO COMBINING DOUBLE DOT ABOVE {0x07F4, 0x07F5, prN}, // Lm [2] NKO HIGH TONE APOSTROPHE..NKO LOW TONE APOSTROPHE {0x07F6, 0x07F6, prN}, // So NKO SYMBOL OO DENNEN {0x07F7, 0x07F9, prN}, // Po [3] NKO SYMBOL GBAKURUNEN..NKO EXCLAMATION MARK {0x07FA, 0x07FA, prN}, // Lm NKO LAJANYALAN {0x07FD, 0x07FD, prN}, // Mn NKO DANTAYALAN {0x07FE, 0x07FF, prN}, // Sc [2] NKO DOROME SIGN..NKO TAMAN SIGN {0x0800, 0x0815, prN}, // Lo [22] SAMARITAN LETTER ALAF..SAMARITAN LETTER TAAF {0x0816, 0x0819, prN}, // Mn [4] SAMARITAN MARK IN..SAMARITAN MARK DAGESH {0x081A, 0x081A, prN}, // Lm SAMARITAN MODIFIER LETTER EPENTHETIC YUT {0x081B, 0x0823, prN}, // Mn [9] SAMARITAN MARK EPENTHETIC YUT..SAMARITAN VOWEL SIGN A {0x0824, 0x0824, prN}, // Lm SAMARITAN MODIFIER LETTER SHORT A {0x0825, 0x0827, prN}, // Mn [3] SAMARITAN VOWEL SIGN SHORT A..SAMARITAN VOWEL SIGN U {0x0828, 0x0828, prN}, // Lm SAMARITAN MODIFIER LETTER I {0x0829, 0x082D, prN}, // Mn [5] SAMARITAN VOWEL SIGN LONG I..SAMARITAN MARK NEQUDAA {0x0830, 0x083E, prN}, // Po [15] SAMARITAN PUNCTUATION NEQUDAA..SAMARITAN PUNCTUATION ANNAAU {0x0840, 0x0858, prN}, // Lo [25] MANDAIC LETTER HALQA..MANDAIC LETTER AIN {0x0859, 0x085B, prN}, // Mn [3] MANDAIC AFFRICATION MARK..MANDAIC GEMINATION MARK {0x085E, 0x085E, prN}, // Po MANDAIC PUNCTUATION {0x0860, 0x086A, prN}, // Lo [11] SYRIAC LETTER MALAYALAM NGA..SYRIAC LETTER MALAYALAM SSA {0x0870, 0x0887, prN}, // Lo [24] ARABIC LETTER ALEF WITH ATTACHED FATHA..ARABIC BASELINE ROUND DOT {0x0888, 0x0888, prN}, // Sk ARABIC RAISED ROUND DOT {0x0889, 0x088E, prN}, // Lo [6] ARABIC LETTER NOON WITH INVERTED SMALL V..ARABIC VERTICAL TAIL {0x0890, 0x0891, prN}, // Cf [2] ARABIC POUND MARK ABOVE..ARABIC PIASTRE MARK ABOVE {0x0898, 0x089F, prN}, // Mn [8] ARABIC SMALL HIGH WORD AL-JUZ..ARABIC HALF MADDA OVER MADDA {0x08A0, 0x08C8, prN}, // Lo [41] ARABIC LETTER BEH WITH SMALL V BELOW..ARABIC LETTER GRAF {0x08C9, 0x08C9, prN}, // Lm ARABIC SMALL FARSI YEH {0x08CA, 0x08E1, prN}, // Mn [24] ARABIC SMALL HIGH FARSI YEH..ARABIC SMALL HIGH SIGN SAFHA {0x08E2, 0x08E2, prN}, // Cf ARABIC DISPUTED END OF AYAH {0x08E3, 0x08FF, prN}, // Mn [29] ARABIC TURNED DAMMA BELOW..ARABIC MARK SIDEWAYS NOON GHUNNA {0x0900, 0x0902, prN}, // Mn [3] DEVANAGARI SIGN INVERTED CANDRABINDU..DEVANAGARI SIGN ANUSVARA {0x0903, 0x0903, prN}, // Mc DEVANAGARI SIGN VISARGA {0x0904, 0x0939, prN}, // Lo [54] DEVANAGARI LETTER SHORT A..DEVANAGARI LETTER HA {0x093A, 0x093A, prN}, // Mn DEVANAGARI VOWEL SIGN OE {0x093B, 0x093B, prN}, // Mc DEVANAGARI VOWEL SIGN OOE {0x093C, 0x093C, prN}, // Mn DEVANAGARI SIGN NUKTA {0x093D, 0x093D, prN}, // Lo DEVANAGARI SIGN AVAGRAHA {0x093E, 0x0940, prN}, // Mc [3] DEVANAGARI VOWEL SIGN AA..DEVANAGARI VOWEL SIGN II {0x0941, 0x0948, prN}, // Mn [8] DEVANAGARI VOWEL SIGN U..DEVANAGARI VOWEL SIGN AI {0x0949, 0x094C, prN}, // Mc [4] DEVANAGARI VOWEL SIGN CANDRA O..DEVANAGARI VOWEL SIGN AU {0x094D, 0x094D, prN}, // Mn DEVANAGARI SIGN VIRAMA {0x094E, 0x094F, prN}, // Mc [2] DEVANAGARI VOWEL SIGN PRISHTHAMATRA E..DEVANAGARI VOWEL SIGN AW {0x0950, 0x0950, prN}, // Lo DEVANAGARI OM {0x0951, 0x0957, prN}, // Mn [7] DEVANAGARI STRESS SIGN UDATTA..DEVANAGARI VOWEL SIGN UUE {0x0958, 0x0961, prN}, // Lo [10] DEVANAGARI LETTER QA..DEVANAGARI LETTER VOCALIC LL {0x0962, 0x0963, prN}, // Mn [2] DEVANAGARI VOWEL SIGN VOCALIC L..DEVANAGARI VOWEL SIGN VOCALIC LL {0x0964, 0x0965, prN}, // Po [2] DEVANAGARI DANDA..DEVANAGARI DOUBLE DANDA {0x0966, 0x096F, prN}, // Nd [10] DEVANAGARI DIGIT ZERO..DEVANAGARI DIGIT NINE {0x0970, 0x0970, prN}, // Po DEVANAGARI ABBREVIATION SIGN {0x0971, 0x0971, prN}, // Lm DEVANAGARI SIGN HIGH SPACING DOT {0x0972, 0x097F, prN}, // Lo [14] DEVANAGARI LETTER CANDRA A..DEVANAGARI LETTER BBA {0x0980, 0x0980, prN}, // Lo BENGALI ANJI {0x0981, 0x0981, prN}, // Mn BENGALI SIGN CANDRABINDU {0x0982, 0x0983, prN}, // Mc [2] BENGALI SIGN ANUSVARA..BENGALI SIGN VISARGA {0x0985, 0x098C, prN}, // Lo [8] BENGALI LETTER A..BENGALI LETTER VOCALIC L {0x098F, 0x0990, prN}, // Lo [2] BENGALI LETTER E..BENGALI LETTER AI {0x0993, 0x09A8, prN}, // Lo [22] BENGALI LETTER O..BENGALI LETTER NA {0x09AA, 0x09B0, prN}, // Lo [7] BENGALI LETTER PA..BENGALI LETTER RA {0x09B2, 0x09B2, prN}, // Lo BENGALI LETTER LA {0x09B6, 0x09B9, prN}, // Lo [4] BENGALI LETTER SHA..BENGALI LETTER HA {0x09BC, 0x09BC, prN}, // Mn BENGALI SIGN NUKTA {0x09BD, 0x09BD, prN}, // Lo BENGALI SIGN AVAGRAHA {0x09BE, 0x09C0, prN}, // Mc [3] BENGALI VOWEL SIGN AA..BENGALI VOWEL SIGN II {0x09C1, 0x09C4, prN}, // Mn [4] BENGALI VOWEL SIGN U..BENGALI VOWEL SIGN VOCALIC RR {0x09C7, 0x09C8, prN}, // Mc [2] BENGALI VOWEL SIGN E..BENGALI VOWEL SIGN AI {0x09CB, 0x09CC, prN}, // Mc [2] BENGALI VOWEL SIGN O..BENGALI VOWEL SIGN AU {0x09CD, 0x09CD, prN}, // Mn BENGALI SIGN VIRAMA {0x09CE, 0x09CE, prN}, // Lo BENGALI LETTER KHANDA TA {0x09D7, 0x09D7, prN}, // Mc BENGALI AU LENGTH MARK {0x09DC, 0x09DD, prN}, // Lo [2] BENGALI LETTER RRA..BENGALI LETTER RHA {0x09DF, 0x09E1, prN}, // Lo [3] BENGALI LETTER YYA..BENGALI LETTER VOCALIC LL {0x09E2, 0x09E3, prN}, // Mn [2] BENGALI VOWEL SIGN VOCALIC L..BENGALI VOWEL SIGN VOCALIC LL {0x09E6, 0x09EF, prN}, // Nd [10] BENGALI DIGIT ZERO..BENGALI DIGIT NINE {0x09F0, 0x09F1, prN}, // Lo [2] BENGALI LETTER RA WITH MIDDLE DIAGONAL..BENGALI LETTER RA WITH LOWER DIAGONAL {0x09F2, 0x09F3, prN}, // Sc [2] BENGALI RUPEE MARK..BENGALI RUPEE SIGN {0x09F4, 0x09F9, prN}, // No [6] BENGALI CURRENCY NUMERATOR ONE..BENGALI CURRENCY DENOMINATOR SIXTEEN {0x09FA, 0x09FA, prN}, // So BENGALI ISSHAR {0x09FB, 0x09FB, prN}, // Sc BENGALI GANDA MARK {0x09FC, 0x09FC, prN}, // Lo BENGALI LETTER VEDIC ANUSVARA {0x09FD, 0x09FD, prN}, // Po BENGALI ABBREVIATION SIGN {0x09FE, 0x09FE, prN}, // Mn BENGALI SANDHI MARK {0x0A01, 0x0A02, prN}, // Mn [2] GURMUKHI SIGN ADAK BINDI..GURMUKHI SIGN BINDI {0x0A03, 0x0A03, prN}, // Mc GURMUKHI SIGN VISARGA {0x0A05, 0x0A0A, prN}, // Lo [6] GURMUKHI LETTER A..GURMUKHI LETTER UU {0x0A0F, 0x0A10, prN}, // Lo [2] GURMUKHI LETTER EE..GURMUKHI LETTER AI {0x0A13, 0x0A28, prN}, // Lo [22] GURMUKHI LETTER OO..GURMUKHI LETTER NA {0x0A2A, 0x0A30, prN}, // Lo [7] GURMUKHI LETTER PA..GURMUKHI LETTER RA {0x0A32, 0x0A33, prN}, // Lo [2] GURMUKHI LETTER LA..GURMUKHI LETTER LLA {0x0A35, 0x0A36, prN}, // Lo [2] GURMUKHI LETTER VA..GURMUKHI LETTER SHA {0x0A38, 0x0A39, prN}, // Lo [2] GURMUKHI LETTER SA..GURMUKHI LETTER HA {0x0A3C, 0x0A3C, prN}, // Mn GURMUKHI SIGN NUKTA {0x0A3E, 0x0A40, prN}, // Mc [3] GURMUKHI VOWEL SIGN AA..GURMUKHI VOWEL SIGN II {0x0A41, 0x0A42, prN}, // Mn [2] GURMUKHI VOWEL SIGN U..GURMUKHI VOWEL SIGN UU {0x0A47, 0x0A48, prN}, // Mn [2] GURMUKHI VOWEL SIGN EE..GURMUKHI VOWEL SIGN AI {0x0A4B, 0x0A4D, prN}, // Mn [3] GURMUKHI VOWEL SIGN OO..GURMUKHI SIGN VIRAMA {0x0A51, 0x0A51, prN}, // Mn GURMUKHI SIGN UDAAT {0x0A59, 0x0A5C, prN}, // Lo [4] GURMUKHI LETTER KHHA..GURMUKHI LETTER RRA {0x0A5E, 0x0A5E, prN}, // Lo GURMUKHI LETTER FA {0x0A66, 0x0A6F, prN}, // Nd [10] GURMUKHI DIGIT ZERO..GURMUKHI DIGIT NINE {0x0A70, 0x0A71, prN}, // Mn [2] GURMUKHI TIPPI..GURMUKHI ADDAK {0x0A72, 0x0A74, prN}, // Lo [3] GURMUKHI IRI..GURMUKHI EK ONKAR {0x0A75, 0x0A75, prN}, // Mn GURMUKHI SIGN YAKASH {0x0A76, 0x0A76, prN}, // Po GURMUKHI ABBREVIATION SIGN {0x0A81, 0x0A82, prN}, // Mn [2] GUJARATI SIGN CANDRABINDU..GUJARATI SIGN ANUSVARA {0x0A83, 0x0A83, prN}, // Mc GUJARATI SIGN VISARGA {0x0A85, 0x0A8D, prN}, // Lo [9] GUJARATI LETTER A..GUJARATI VOWEL CANDRA E {0x0A8F, 0x0A91, prN}, // Lo [3] GUJARATI LETTER E..GUJARATI VOWEL CANDRA O {0x0A93, 0x0AA8, prN}, // Lo [22] GUJARATI LETTER O..GUJARATI LETTER NA {0x0AAA, 0x0AB0, prN}, // Lo [7] GUJARATI LETTER PA..GUJARATI LETTER RA {0x0AB2, 0x0AB3, prN}, // Lo [2] GUJARATI LETTER LA..GUJARATI LETTER LLA {0x0AB5, 0x0AB9, prN}, // Lo [5] GUJARATI LETTER VA..GUJARATI LETTER HA {0x0ABC, 0x0ABC, prN}, // Mn GUJARATI SIGN NUKTA {0x0ABD, 0x0ABD, prN}, // Lo GUJARATI SIGN AVAGRAHA {0x0ABE, 0x0AC0, prN}, // Mc [3] GUJARATI VOWEL SIGN AA..GUJARATI VOWEL SIGN II {0x0AC1, 0x0AC5, prN}, // Mn [5] GUJARATI VOWEL SIGN U..GUJARATI VOWEL SIGN CANDRA E {0x0AC7, 0x0AC8, prN}, // Mn [2] GUJARATI VOWEL SIGN E..GUJARATI VOWEL SIGN AI {0x0AC9, 0x0AC9, prN}, // Mc GUJARATI VOWEL SIGN CANDRA O {0x0ACB, 0x0ACC, prN}, // Mc [2] GUJARATI VOWEL SIGN O..GUJARATI VOWEL SIGN AU {0x0ACD, 0x0ACD, prN}, // Mn GUJARATI SIGN VIRAMA {0x0AD0, 0x0AD0, prN}, // Lo GUJARATI OM {0x0AE0, 0x0AE1, prN}, // Lo [2] GUJARATI LETTER VOCALIC RR..GUJARATI LETTER VOCALIC LL {0x0AE2, 0x0AE3, prN}, // Mn [2] GUJARATI VOWEL SIGN VOCALIC L..GUJARATI VOWEL SIGN VOCALIC LL {0x0AE6, 0x0AEF, prN}, // Nd [10] GUJARATI DIGIT ZERO..GUJARATI DIGIT NINE {0x0AF0, 0x0AF0, prN}, // Po GUJARATI ABBREVIATION SIGN {0x0AF1, 0x0AF1, prN}, // Sc GUJARATI RUPEE SIGN {0x0AF9, 0x0AF9, prN}, // Lo GUJARATI LETTER ZHA {0x0AFA, 0x0AFF, prN}, // Mn [6] GUJARATI SIGN SUKUN..GUJARATI SIGN TWO-CIRCLE NUKTA ABOVE {0x0B01, 0x0B01, prN}, // Mn ORIYA SIGN CANDRABINDU {0x0B02, 0x0B03, prN}, // Mc [2] ORIYA SIGN ANUSVARA..ORIYA SIGN VISARGA {0x0B05, 0x0B0C, prN}, // Lo [8] ORIYA LETTER A..ORIYA LETTER VOCALIC L {0x0B0F, 0x0B10, prN}, // Lo [2] ORIYA LETTER E..ORIYA LETTER AI {0x0B13, 0x0B28, prN}, // Lo [22] ORIYA LETTER O..ORIYA LETTER NA {0x0B2A, 0x0B30, prN}, // Lo [7] ORIYA LETTER PA..ORIYA LETTER RA {0x0B32, 0x0B33, prN}, // Lo [2] ORIYA LETTER LA..ORIYA LETTER LLA {0x0B35, 0x0B39, prN}, // Lo [5] ORIYA LETTER VA..ORIYA LETTER HA {0x0B3C, 0x0B3C, prN}, // Mn ORIYA SIGN NUKTA {0x0B3D, 0x0B3D, prN}, // Lo ORIYA SIGN AVAGRAHA {0x0B3E, 0x0B3E, prN}, // Mc ORIYA VOWEL SIGN AA {0x0B3F, 0x0B3F, prN}, // Mn ORIYA VOWEL SIGN I {0x0B40, 0x0B40, prN}, // Mc ORIYA VOWEL SIGN II {0x0B41, 0x0B44, prN}, // Mn [4] ORIYA VOWEL SIGN U..ORIYA VOWEL SIGN VOCALIC RR {0x0B47, 0x0B48, prN}, // Mc [2] ORIYA VOWEL SIGN E..ORIYA VOWEL SIGN AI {0x0B4B, 0x0B4C, prN}, // Mc [2] ORIYA VOWEL SIGN O..ORIYA VOWEL SIGN AU {0x0B4D, 0x0B4D, prN}, // Mn ORIYA SIGN VIRAMA {0x0B55, 0x0B56, prN}, // Mn [2] ORIYA SIGN OVERLINE..ORIYA AI LENGTH MARK {0x0B57, 0x0B57, prN}, // Mc ORIYA AU LENGTH MARK {0x0B5C, 0x0B5D, prN}, // Lo [2] ORIYA LETTER RRA..ORIYA LETTER RHA {0x0B5F, 0x0B61, prN}, // Lo [3] ORIYA LETTER YYA..ORIYA LETTER VOCALIC LL {0x0B62, 0x0B63, prN}, // Mn [2] ORIYA VOWEL SIGN VOCALIC L..ORIYA VOWEL SIGN VOCALIC LL {0x0B66, 0x0B6F, prN}, // Nd [10] ORIYA DIGIT ZERO..ORIYA DIGIT NINE {0x0B70, 0x0B70, prN}, // So ORIYA ISSHAR {0x0B71, 0x0B71, prN}, // Lo ORIYA LETTER WA {0x0B72, 0x0B77, prN}, // No [6] ORIYA FRACTION ONE QUARTER..ORIYA FRACTION THREE SIXTEENTHS {0x0B82, 0x0B82, prN}, // Mn TAMIL SIGN ANUSVARA {0x0B83, 0x0B83, prN}, // Lo TAMIL SIGN VISARGA {0x0B85, 0x0B8A, prN}, // Lo [6] TAMIL LETTER A..TAMIL LETTER UU {0x0B8E, 0x0B90, prN}, // Lo [3] TAMIL LETTER E..TAMIL LETTER AI {0x0B92, 0x0B95, prN}, // Lo [4] TAMIL LETTER O..TAMIL LETTER KA {0x0B99, 0x0B9A, prN}, // Lo [2] TAMIL LETTER NGA..TAMIL LETTER CA {0x0B9C, 0x0B9C, prN}, // Lo TAMIL LETTER JA {0x0B9E, 0x0B9F, prN}, // Lo [2] TAMIL LETTER NYA..TAMIL LETTER TTA {0x0BA3, 0x0BA4, prN}, // Lo [2] TAMIL LETTER NNA..TAMIL LETTER TA {0x0BA8, 0x0BAA, prN}, // Lo [3] TAMIL LETTER NA..TAMIL LETTER PA {0x0BAE, 0x0BB9, prN}, // Lo [12] TAMIL LETTER MA..TAMIL LETTER HA {0x0BBE, 0x0BBF, prN}, // Mc [2] TAMIL VOWEL SIGN AA..TAMIL VOWEL SIGN I {0x0BC0, 0x0BC0, prN}, // Mn TAMIL VOWEL SIGN II {0x0BC1, 0x0BC2, prN}, // Mc [2] TAMIL VOWEL SIGN U..TAMIL VOWEL SIGN UU {0x0BC6, 0x0BC8, prN}, // Mc [3] TAMIL VOWEL SIGN E..TAMIL VOWEL SIGN AI {0x0BCA, 0x0BCC, prN}, // Mc [3] TAMIL VOWEL SIGN O..TAMIL VOWEL SIGN AU {0x0BCD, 0x0BCD, prN}, // Mn TAMIL SIGN VIRAMA {0x0BD0, 0x0BD0, prN}, // Lo TAMIL OM {0x0BD7, 0x0BD7, prN}, // Mc TAMIL AU LENGTH MARK {0x0BE6, 0x0BEF, prN}, // Nd [10] TAMIL DIGIT ZERO..TAMIL DIGIT NINE {0x0BF0, 0x0BF2, prN}, // No [3] TAMIL NUMBER TEN..TAMIL NUMBER ONE THOUSAND {0x0BF3, 0x0BF8, prN}, // So [6] TAMIL DAY SIGN..TAMIL AS ABOVE SIGN {0x0BF9, 0x0BF9, prN}, // Sc TAMIL RUPEE SIGN {0x0BFA, 0x0BFA, prN}, // So TAMIL NUMBER SIGN {0x0C00, 0x0C00, prN}, // Mn TELUGU SIGN COMBINING CANDRABINDU ABOVE {0x0C01, 0x0C03, prN}, // Mc [3] TELUGU SIGN CANDRABINDU..TELUGU SIGN VISARGA {0x0C04, 0x0C04, prN}, // Mn TELUGU SIGN COMBINING ANUSVARA ABOVE {0x0C05, 0x0C0C, prN}, // Lo [8] TELUGU LETTER A..TELUGU LETTER VOCALIC L {0x0C0E, 0x0C10, prN}, // Lo [3] TELUGU LETTER E..TELUGU LETTER AI {0x0C12, 0x0C28, prN}, // Lo [23] TELUGU LETTER O..TELUGU LETTER NA {0x0C2A, 0x0C39, prN}, // Lo [16] TELUGU LETTER PA..TELUGU LETTER HA {0x0C3C, 0x0C3C, prN}, // Mn TELUGU SIGN NUKTA {0x0C3D, 0x0C3D, prN}, // Lo TELUGU SIGN AVAGRAHA {0x0C3E, 0x0C40, prN}, // Mn [3] TELUGU VOWEL SIGN AA..TELUGU VOWEL SIGN II {0x0C41, 0x0C44, prN}, // Mc [4] TELUGU VOWEL SIGN U..TELUGU VOWEL SIGN VOCALIC RR {0x0C46, 0x0C48, prN}, // Mn [3] TELUGU VOWEL SIGN E..TELUGU VOWEL SIGN AI {0x0C4A, 0x0C4D, prN}, // Mn [4] TELUGU VOWEL SIGN O..TELUGU SIGN VIRAMA {0x0C55, 0x0C56, prN}, // Mn [2] TELUGU LENGTH MARK..TELUGU AI LENGTH MARK {0x0C58, 0x0C5A, prN}, // Lo [3] TELUGU LETTER TSA..TELUGU LETTER RRRA {0x0C5D, 0x0C5D, prN}, // Lo TELUGU LETTER NAKAARA POLLU {0x0C60, 0x0C61, prN}, // Lo [2] TELUGU LETTER VOCALIC RR..TELUGU LETTER VOCALIC LL {0x0C62, 0x0C63, prN}, // Mn [2] TELUGU VOWEL SIGN VOCALIC L..TELUGU VOWEL SIGN VOCALIC LL {0x0C66, 0x0C6F, prN}, // Nd [10] TELUGU DIGIT ZERO..TELUGU DIGIT NINE {0x0C77, 0x0C77, prN}, // Po TELUGU SIGN SIDDHAM {0x0C78, 0x0C7E, prN}, // No [7] TELUGU FRACTION DIGIT ZERO FOR ODD POWERS OF FOUR..TELUGU FRACTION DIGIT THREE FOR EVEN POWERS OF FOUR {0x0C7F, 0x0C7F, prN}, // So TELUGU SIGN TUUMU {0x0C80, 0x0C80, prN}, // Lo KANNADA SIGN SPACING CANDRABINDU {0x0C81, 0x0C81, prN}, // Mn KANNADA SIGN CANDRABINDU {0x0C82, 0x0C83, prN}, // Mc [2] KANNADA SIGN ANUSVARA..KANNADA SIGN VISARGA {0x0C84, 0x0C84, prN}, // Po KANNADA SIGN SIDDHAM {0x0C85, 0x0C8C, prN}, // Lo [8] KANNADA LETTER A..KANNADA LETTER VOCALIC L {0x0C8E, 0x0C90, prN}, // Lo [3] KANNADA LETTER E..KANNADA LETTER AI {0x0C92, 0x0CA8, prN}, // Lo [23] KANNADA LETTER O..KANNADA LETTER NA {0x0CAA, 0x0CB3, prN}, // Lo [10] KANNADA LETTER PA..KANNADA LETTER LLA {0x0CB5, 0x0CB9, prN}, // Lo [5] KANNADA LETTER VA..KANNADA LETTER HA {0x0CBC, 0x0CBC, prN}, // Mn KANNADA SIGN NUKTA {0x0CBD, 0x0CBD, prN}, // Lo KANNADA SIGN AVAGRAHA {0x0CBE, 0x0CBE, prN}, // Mc KANNADA VOWEL SIGN AA {0x0CBF, 0x0CBF, prN}, // Mn KANNADA VOWEL SIGN I {0x0CC0, 0x0CC4, prN}, // Mc [5] KANNADA VOWEL SIGN II..KANNADA VOWEL SIGN VOCALIC RR {0x0CC6, 0x0CC6, prN}, // Mn KANNADA VOWEL SIGN E {0x0CC7, 0x0CC8, prN}, // Mc [2] KANNADA VOWEL SIGN EE..KANNADA VOWEL SIGN AI {0x0CCA, 0x0CCB, prN}, // Mc [2] KANNADA VOWEL SIGN O..KANNADA VOWEL SIGN OO {0x0CCC, 0x0CCD, prN}, // Mn [2] KANNADA VOWEL SIGN AU..KANNADA SIGN VIRAMA {0x0CD5, 0x0CD6, prN}, // Mc [2] KANNADA LENGTH MARK..KANNADA AI LENGTH MARK {0x0CDD, 0x0CDE, prN}, // Lo [2] KANNADA LETTER NAKAARA POLLU..KANNADA LETTER FA {0x0CE0, 0x0CE1, prN}, // Lo [2] KANNADA LETTER VOCALIC RR..KANNADA LETTER VOCALIC LL {0x0CE2, 0x0CE3, prN}, // Mn [2] KANNADA VOWEL SIGN VOCALIC L..KANNADA VOWEL SIGN VOCALIC LL {0x0CE6, 0x0CEF, prN}, // Nd [10] KANNADA DIGIT ZERO..KANNADA DIGIT NINE {0x0CF1, 0x0CF2, prN}, // Lo [2] KANNADA SIGN JIHVAMULIYA..KANNADA SIGN UPADHMANIYA {0x0CF3, 0x0CF3, prN}, // Mc KANNADA SIGN COMBINING ANUSVARA ABOVE RIGHT {0x0D00, 0x0D01, prN}, // Mn [2] MALAYALAM SIGN COMBINING ANUSVARA ABOVE..MALAYALAM SIGN CANDRABINDU {0x0D02, 0x0D03, prN}, // Mc [2] MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA {0x0D04, 0x0D0C, prN}, // Lo [9] MALAYALAM LETTER VEDIC ANUSVARA..MALAYALAM LETTER VOCALIC L {0x0D0E, 0x0D10, prN}, // Lo [3] MALAYALAM LETTER E..MALAYALAM LETTER AI {0x0D12, 0x0D3A, prN}, // Lo [41] MALAYALAM LETTER O..MALAYALAM LETTER TTTA {0x0D3B, 0x0D3C, prN}, // Mn [2] MALAYALAM SIGN VERTICAL BAR VIRAMA..MALAYALAM SIGN CIRCULAR VIRAMA {0x0D3D, 0x0D3D, prN}, // Lo MALAYALAM SIGN AVAGRAHA {0x0D3E, 0x0D40, prN}, // Mc [3] MALAYALAM VOWEL SIGN AA..MALAYALAM VOWEL SIGN II {0x0D41, 0x0D44, prN}, // Mn [4] MALAYALAM VOWEL SIGN U..MALAYALAM VOWEL SIGN VOCALIC RR {0x0D46, 0x0D48, prN}, // Mc [3] MALAYALAM VOWEL SIGN E..MALAYALAM VOWEL SIGN AI {0x0D4A, 0x0D4C, prN}, // Mc [3] MALAYALAM VOWEL SIGN O..MALAYALAM VOWEL SIGN AU {0x0D4D, 0x0D4D, prN}, // Mn MALAYALAM SIGN VIRAMA {0x0D4E, 0x0D4E, prN}, // Lo MALAYALAM LETTER DOT REPH {0x0D4F, 0x0D4F, prN}, // So MALAYALAM SIGN PARA {0x0D54, 0x0D56, prN}, // Lo [3] MALAYALAM LETTER CHILLU M..MALAYALAM LETTER CHILLU LLL {0x0D57, 0x0D57, prN}, // Mc MALAYALAM AU LENGTH MARK {0x0D58, 0x0D5E, prN}, // No [7] MALAYALAM FRACTION ONE ONE-HUNDRED-AND-SIXTIETH..MALAYALAM FRACTION ONE FIFTH {0x0D5F, 0x0D61, prN}, // Lo [3] MALAYALAM LETTER ARCHAIC II..MALAYALAM LETTER VOCALIC LL {0x0D62, 0x0D63, prN}, // Mn [2] MALAYALAM VOWEL SIGN VOCALIC L..MALAYALAM VOWEL SIGN VOCALIC LL {0x0D66, 0x0D6F, prN}, // Nd [10] MALAYALAM DIGIT ZERO..MALAYALAM DIGIT NINE {0x0D70, 0x0D78, prN}, // No [9] MALAYALAM NUMBER TEN..MALAYALAM FRACTION THREE SIXTEENTHS {0x0D79, 0x0D79, prN}, // So MALAYALAM DATE MARK {0x0D7A, 0x0D7F, prN}, // Lo [6] MALAYALAM LETTER CHILLU NN..MALAYALAM LETTER CHILLU K {0x0D81, 0x0D81, prN}, // Mn SINHALA SIGN CANDRABINDU {0x0D82, 0x0D83, prN}, // Mc [2] SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARGAYA {0x0D85, 0x0D96, prN}, // Lo [18] SINHALA LETTER AYANNA..SINHALA LETTER AUYANNA {0x0D9A, 0x0DB1, prN}, // Lo [24] SINHALA LETTER ALPAPRAANA KAYANNA..SINHALA LETTER DANTAJA NAYANNA {0x0DB3, 0x0DBB, prN}, // Lo [9] SINHALA LETTER SANYAKA DAYANNA..SINHALA LETTER RAYANNA {0x0DBD, 0x0DBD, prN}, // Lo SINHALA LETTER DANTAJA LAYANNA {0x0DC0, 0x0DC6, prN}, // Lo [7] SINHALA LETTER VAYANNA..SINHALA LETTER FAYANNA {0x0DCA, 0x0DCA, prN}, // Mn SINHALA SIGN AL-LAKUNA {0x0DCF, 0x0DD1, prN}, // Mc [3] SINHALA VOWEL SIGN AELA-PILLA..SINHALA VOWEL SIGN DIGA AEDA-PILLA {0x0DD2, 0x0DD4, prN}, // Mn [3] SINHALA VOWEL SIGN KETTI IS-PILLA..SINHALA VOWEL SIGN KETTI PAA-PILLA {0x0DD6, 0x0DD6, prN}, // Mn SINHALA VOWEL SIGN DIGA PAA-PILLA {0x0DD8, 0x0DDF, prN}, // Mc [8] SINHALA VOWEL SIGN GAETTA-PILLA..SINHALA VOWEL SIGN GAYANUKITTA {0x0DE6, 0x0DEF, prN}, // Nd [10] SINHALA LITH DIGIT ZERO..SINHALA LITH DIGIT NINE {0x0DF2, 0x0DF3, prN}, // Mc [2] SINHALA VOWEL SIGN DIGA GAETTA-PILLA..SINHALA VOWEL SIGN DIGA GAYANUKITTA {0x0DF4, 0x0DF4, prN}, // Po SINHALA PUNCTUATION KUNDDALIYA {0x0E01, 0x0E30, prN}, // Lo [48] THAI CHARACTER KO KAI..THAI CHARACTER SARA A {0x0E31, 0x0E31, prN}, // Mn THAI CHARACTER MAI HAN-AKAT {0x0E32, 0x0E33, prN}, // Lo [2] THAI CHARACTER SARA AA..THAI CHARACTER SARA AM {0x0E34, 0x0E3A, prN}, // Mn [7] THAI CHARACTER SARA I..THAI CHARACTER PHINTHU {0x0E3F, 0x0E3F, prN}, // Sc THAI CURRENCY SYMBOL BAHT {0x0E40, 0x0E45, prN}, // Lo [6] THAI CHARACTER SARA E..THAI CHARACTER LAKKHANGYAO {0x0E46, 0x0E46, prN}, // Lm THAI CHARACTER MAIYAMOK {0x0E47, 0x0E4E, prN}, // Mn [8] THAI CHARACTER MAITAIKHU..THAI CHARACTER YAMAKKAN {0x0E4F, 0x0E4F, prN}, // Po THAI CHARACTER FONGMAN {0x0E50, 0x0E59, prN}, // Nd [10] THAI DIGIT ZERO..THAI DIGIT NINE {0x0E5A, 0x0E5B, prN}, // Po [2] THAI CHARACTER ANGKHANKHU..THAI CHARACTER KHOMUT {0x0E81, 0x0E82, prN}, // Lo [2] LAO LETTER KO..LAO LETTER KHO SUNG {0x0E84, 0x0E84, prN}, // Lo LAO LETTER KHO TAM {0x0E86, 0x0E8A, prN}, // Lo [5] LAO LETTER PALI GHA..LAO LETTER SO TAM {0x0E8C, 0x0EA3, prN}, // Lo [24] LAO LETTER PALI JHA..LAO LETTER LO LING {0x0EA5, 0x0EA5, prN}, // Lo LAO LETTER LO LOOT {0x0EA7, 0x0EB0, prN}, // Lo [10] LAO LETTER WO..LAO VOWEL SIGN A {0x0EB1, 0x0EB1, prN}, // Mn LAO VOWEL SIGN MAI KAN {0x0EB2, 0x0EB3, prN}, // Lo [2] LAO VOWEL SIGN AA..LAO VOWEL SIGN AM {0x0EB4, 0x0EBC, prN}, // Mn [9] LAO VOWEL SIGN I..LAO SEMIVOWEL SIGN LO {0x0EBD, 0x0EBD, prN}, // Lo LAO SEMIVOWEL SIGN NYO {0x0EC0, 0x0EC4, prN}, // Lo [5] LAO VOWEL SIGN E..LAO VOWEL SIGN AI {0x0EC6, 0x0EC6, prN}, // Lm LAO KO LA {0x0EC8, 0x0ECE, prN}, // Mn [7] LAO TONE MAI EK..LAO YAMAKKAN {0x0ED0, 0x0ED9, prN}, // Nd [10] LAO DIGIT ZERO..LAO DIGIT NINE {0x0EDC, 0x0EDF, prN}, // Lo [4] LAO HO NO..LAO LETTER KHMU NYO {0x0F00, 0x0F00, prN}, // Lo TIBETAN SYLLABLE OM {0x0F01, 0x0F03, prN}, // So [3] TIBETAN MARK GTER YIG MGO TRUNCATED A..TIBETAN MARK GTER YIG MGO -UM GTER TSHEG MA {0x0F04, 0x0F12, prN}, // Po [15] TIBETAN MARK INITIAL YIG MGO MDUN MA..TIBETAN MARK RGYA GRAM SHAD {0x0F13, 0x0F13, prN}, // So TIBETAN MARK CARET -DZUD RTAGS ME LONG CAN {0x0F14, 0x0F14, prN}, // Po TIBETAN MARK GTER TSHEG {0x0F15, 0x0F17, prN}, // So [3] TIBETAN LOGOTYPE SIGN CHAD RTAGS..TIBETAN ASTROLOGICAL SIGN SGRA GCAN -CHAR RTAGS {0x0F18, 0x0F19, prN}, // Mn [2] TIBETAN ASTROLOGICAL SIGN -KHYUD PA..TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS {0x0F1A, 0x0F1F, prN}, // So [6] TIBETAN SIGN RDEL DKAR GCIG..TIBETAN SIGN RDEL DKAR RDEL NAG {0x0F20, 0x0F29, prN}, // Nd [10] TIBETAN DIGIT ZERO..TIBETAN DIGIT NINE {0x0F2A, 0x0F33, prN}, // No [10] TIBETAN DIGIT HALF ONE..TIBETAN DIGIT HALF ZERO {0x0F34, 0x0F34, prN}, // So TIBETAN MARK BSDUS RTAGS {0x0F35, 0x0F35, prN}, // Mn TIBETAN MARK NGAS BZUNG NYI ZLA {0x0F36, 0x0F36, prN}, // So TIBETAN MARK CARET -DZUD RTAGS BZHI MIG CAN {0x0F37, 0x0F37, prN}, // Mn TIBETAN MARK NGAS BZUNG SGOR RTAGS {0x0F38, 0x0F38, prN}, // So TIBETAN MARK CHE MGO {0x0F39, 0x0F39, prN}, // Mn TIBETAN MARK TSA -PHRU {0x0F3A, 0x0F3A, prN}, // Ps TIBETAN MARK GUG RTAGS GYON {0x0F3B, 0x0F3B, prN}, // Pe TIBETAN MARK GUG RTAGS GYAS {0x0F3C, 0x0F3C, prN}, // Ps TIBETAN MARK ANG KHANG GYON {0x0F3D, 0x0F3D, prN}, // Pe TIBETAN MARK ANG KHANG GYAS {0x0F3E, 0x0F3F, prN}, // Mc [2] TIBETAN SIGN YAR TSHES..TIBETAN SIGN MAR TSHES {0x0F40, 0x0F47, prN}, // Lo [8] TIBETAN LETTER KA..TIBETAN LETTER JA {0x0F49, 0x0F6C, prN}, // Lo [36] TIBETAN LETTER NYA..TIBETAN LETTER RRA {0x0F71, 0x0F7E, prN}, // Mn [14] TIBETAN VOWEL SIGN AA..TIBETAN SIGN RJES SU NGA RO {0x0F7F, 0x0F7F, prN}, // Mc TIBETAN SIGN RNAM BCAD {0x0F80, 0x0F84, prN}, // Mn [5] TIBETAN VOWEL SIGN REVERSED I..TIBETAN MARK HALANTA {0x0F85, 0x0F85, prN}, // Po TIBETAN MARK PALUTA {0x0F86, 0x0F87, prN}, // Mn [2] TIBETAN SIGN LCI RTAGS..TIBETAN SIGN YANG RTAGS {0x0F88, 0x0F8C, prN}, // Lo [5] TIBETAN SIGN LCE TSA CAN..TIBETAN SIGN INVERTED MCHU CAN {0x0F8D, 0x0F97, prN}, // Mn [11] TIBETAN SUBJOINED SIGN LCE TSA CAN..TIBETAN SUBJOINED LETTER JA {0x0F99, 0x0FBC, prN}, // Mn [36] TIBETAN SUBJOINED LETTER NYA..TIBETAN SUBJOINED LETTER FIXED-FORM RA {0x0FBE, 0x0FC5, prN}, // So [8] TIBETAN KU RU KHA..TIBETAN SYMBOL RDO RJE {0x0FC6, 0x0FC6, prN}, // Mn TIBETAN SYMBOL PADMA GDAN {0x0FC7, 0x0FCC, prN}, // So [6] TIBETAN SYMBOL RDO RJE RGYA GRAM..TIBETAN SYMBOL NOR BU BZHI -KHYIL {0x0FCE, 0x0FCF, prN}, // So [2] TIBETAN SIGN RDEL NAG RDEL DKAR..TIBETAN SIGN RDEL NAG GSUM {0x0FD0, 0x0FD4, prN}, // Po [5] TIBETAN MARK BSKA- SHOG GI MGO RGYAN..TIBETAN MARK CLOSING BRDA RNYING YIG MGO SGAB MA {0x0FD5, 0x0FD8, prN}, // So [4] RIGHT-FACING SVASTI SIGN..LEFT-FACING SVASTI SIGN WITH DOTS {0x0FD9, 0x0FDA, prN}, // Po [2] TIBETAN MARK LEADING MCHAN RTAGS..TIBETAN MARK TRAILING MCHAN RTAGS {0x1000, 0x102A, prN}, // Lo [43] MYANMAR LETTER KA..MYANMAR LETTER AU {0x102B, 0x102C, prN}, // Mc [2] MYANMAR VOWEL SIGN TALL AA..MYANMAR VOWEL SIGN AA {0x102D, 0x1030, prN}, // Mn [4] MYANMAR VOWEL SIGN I..MYANMAR VOWEL SIGN UU {0x1031, 0x1031, prN}, // Mc MYANMAR VOWEL SIGN E {0x1032, 0x1037, prN}, // Mn [6] MYANMAR VOWEL SIGN AI..MYANMAR SIGN DOT BELOW {0x1038, 0x1038, prN}, // Mc MYANMAR SIGN VISARGA {0x1039, 0x103A, prN}, // Mn [2] MYANMAR SIGN VIRAMA..MYANMAR SIGN ASAT {0x103B, 0x103C, prN}, // Mc [2] MYANMAR CONSONANT SIGN MEDIAL YA..MYANMAR CONSONANT SIGN MEDIAL RA {0x103D, 0x103E, prN}, // Mn [2] MYANMAR CONSONANT SIGN MEDIAL WA..MYANMAR CONSONANT SIGN MEDIAL HA {0x103F, 0x103F, prN}, // Lo MYANMAR LETTER GREAT SA {0x1040, 0x1049, prN}, // Nd [10] MYANMAR DIGIT ZERO..MYANMAR DIGIT NINE {0x104A, 0x104F, prN}, // Po [6] MYANMAR SIGN LITTLE SECTION..MYANMAR SYMBOL GENITIVE {0x1050, 0x1055, prN}, // Lo [6] MYANMAR LETTER SHA..MYANMAR LETTER VOCALIC LL {0x1056, 0x1057, prN}, // Mc [2] MYANMAR VOWEL SIGN VOCALIC R..MYANMAR VOWEL SIGN VOCALIC RR {0x1058, 0x1059, prN}, // Mn [2] MYANMAR VOWEL SIGN VOCALIC L..MYANMAR VOWEL SIGN VOCALIC LL {0x105A, 0x105D, prN}, // Lo [4] MYANMAR LETTER MON NGA..MYANMAR LETTER MON BBE {0x105E, 0x1060, prN}, // Mn [3] MYANMAR CONSONANT SIGN MON MEDIAL NA..MYANMAR CONSONANT SIGN MON MEDIAL LA {0x1061, 0x1061, prN}, // Lo MYANMAR LETTER SGAW KAREN SHA {0x1062, 0x1064, prN}, // Mc [3] MYANMAR VOWEL SIGN SGAW KAREN EU..MYANMAR TONE MARK SGAW KAREN KE PHO {0x1065, 0x1066, prN}, // Lo [2] MYANMAR LETTER WESTERN PWO KAREN THA..MYANMAR LETTER WESTERN PWO KAREN PWA {0x1067, 0x106D, prN}, // Mc [7] MYANMAR VOWEL SIGN WESTERN PWO KAREN EU..MYANMAR SIGN WESTERN PWO KAREN TONE-5 {0x106E, 0x1070, prN}, // Lo [3] MYANMAR LETTER EASTERN PWO KAREN NNA..MYANMAR LETTER EASTERN PWO KAREN GHWA {0x1071, 0x1074, prN}, // Mn [4] MYANMAR VOWEL SIGN GEBA KAREN I..MYANMAR VOWEL SIGN KAYAH EE {0x1075, 0x1081, prN}, // Lo [13] MYANMAR LETTER SHAN KA..MYANMAR LETTER SHAN HA {0x1082, 0x1082, prN}, // Mn MYANMAR CONSONANT SIGN SHAN MEDIAL WA {0x1083, 0x1084, prN}, // Mc [2] MYANMAR VOWEL SIGN SHAN AA..MYANMAR VOWEL SIGN SHAN E {0x1085, 0x1086, prN}, // Mn [2] MYANMAR VOWEL SIGN SHAN E ABOVE..MYANMAR VOWEL SIGN SHAN FINAL Y {0x1087, 0x108C, prN}, // Mc [6] MYANMAR SIGN SHAN TONE-2..MYANMAR SIGN SHAN COUNCIL TONE-3 {0x108D, 0x108D, prN}, // Mn MYANMAR SIGN SHAN COUNCIL EMPHATIC TONE {0x108E, 0x108E, prN}, // Lo MYANMAR LETTER RUMAI PALAUNG FA {0x108F, 0x108F, prN}, // Mc MYANMAR SIGN RUMAI PALAUNG TONE-5 {0x1090, 0x1099, prN}, // Nd [10] MYANMAR SHAN DIGIT ZERO..MYANMAR SHAN DIGIT NINE {0x109A, 0x109C, prN}, // Mc [3] MYANMAR SIGN KHAMTI TONE-1..MYANMAR VOWEL SIGN AITON A {0x109D, 0x109D, prN}, // Mn MYANMAR VOWEL SIGN AITON AI {0x109E, 0x109F, prN}, // So [2] MYANMAR SYMBOL SHAN ONE..MYANMAR SYMBOL SHAN EXCLAMATION {0x10A0, 0x10C5, prN}, // Lu [38] GEORGIAN CAPITAL LETTER AN..GEORGIAN CAPITAL LETTER HOE {0x10C7, 0x10C7, prN}, // Lu GEORGIAN CAPITAL LETTER YN {0x10CD, 0x10CD, prN}, // Lu GEORGIAN CAPITAL LETTER AEN {0x10D0, 0x10FA, prN}, // Ll [43] GEORGIAN LETTER AN..GEORGIAN LETTER AIN {0x10FB, 0x10FB, prN}, // Po GEORGIAN PARAGRAPH SEPARATOR {0x10FC, 0x10FC, prN}, // Lm MODIFIER LETTER GEORGIAN NAR {0x10FD, 0x10FF, prN}, // Ll [3] GEORGIAN LETTER AEN..GEORGIAN LETTER LABIAL SIGN {0x1100, 0x115F, prW}, // Lo [96] HANGUL CHOSEONG KIYEOK..HANGUL CHOSEONG FILLER {0x1160, 0x11FF, prN}, // Lo [160] HANGUL JUNGSEONG FILLER..HANGUL JONGSEONG SSANGNIEUN {0x1200, 0x1248, prN}, // Lo [73] ETHIOPIC SYLLABLE HA..ETHIOPIC SYLLABLE QWA {0x124A, 0x124D, prN}, // Lo [4] ETHIOPIC SYLLABLE QWI..ETHIOPIC SYLLABLE QWE {0x1250, 0x1256, prN}, // Lo [7] ETHIOPIC SYLLABLE QHA..ETHIOPIC SYLLABLE QHO {0x1258, 0x1258, prN}, // Lo ETHIOPIC SYLLABLE QHWA {0x125A, 0x125D, prN}, // Lo [4] ETHIOPIC SYLLABLE QHWI..ETHIOPIC SYLLABLE QHWE {0x1260, 0x1288, prN}, // Lo [41] ETHIOPIC SYLLABLE BA..ETHIOPIC SYLLABLE XWA {0x128A, 0x128D, prN}, // Lo [4] ETHIOPIC SYLLABLE XWI..ETHIOPIC SYLLABLE XWE {0x1290, 0x12B0, prN}, // Lo [33] ETHIOPIC SYLLABLE NA..ETHIOPIC SYLLABLE KWA {0x12B2, 0x12B5, prN}, // Lo [4] ETHIOPIC SYLLABLE KWI..ETHIOPIC SYLLABLE KWE {0x12B8, 0x12BE, prN}, // Lo [7] ETHIOPIC SYLLABLE KXA..ETHIOPIC SYLLABLE KXO {0x12C0, 0x12C0, prN}, // Lo ETHIOPIC SYLLABLE KXWA {0x12C2, 0x12C5, prN}, // Lo [4] ETHIOPIC SYLLABLE KXWI..ETHIOPIC SYLLABLE KXWE {0x12C8, 0x12D6, prN}, // Lo [15] ETHIOPIC SYLLABLE WA..ETHIOPIC SYLLABLE PHARYNGEAL O {0x12D8, 0x1310, prN}, // Lo [57] ETHIOPIC SYLLABLE ZA..ETHIOPIC SYLLABLE GWA {0x1312, 0x1315, prN}, // Lo [4] ETHIOPIC SYLLABLE GWI..ETHIOPIC SYLLABLE GWE {0x1318, 0x135A, prN}, // Lo [67] ETHIOPIC SYLLABLE GGA..ETHIOPIC SYLLABLE FYA {0x135D, 0x135F, prN}, // Mn [3] ETHIOPIC COMBINING GEMINATION AND VOWEL LENGTH MARK..ETHIOPIC COMBINING GEMINATION MARK {0x1360, 0x1368, prN}, // Po [9] ETHIOPIC SECTION MARK..ETHIOPIC PARAGRAPH SEPARATOR {0x1369, 0x137C, prN}, // No [20] ETHIOPIC DIGIT ONE..ETHIOPIC NUMBER TEN THOUSAND {0x1380, 0x138F, prN}, // Lo [16] ETHIOPIC SYLLABLE SEBATBEIT MWA..ETHIOPIC SYLLABLE PWE {0x1390, 0x1399, prN}, // So [10] ETHIOPIC TONAL MARK YIZET..ETHIOPIC TONAL MARK KURT {0x13A0, 0x13F5, prN}, // Lu [86] CHEROKEE LETTER A..CHEROKEE LETTER MV {0x13F8, 0x13FD, prN}, // Ll [6] CHEROKEE SMALL LETTER YE..CHEROKEE SMALL LETTER MV {0x1400, 0x1400, prN}, // Pd CANADIAN SYLLABICS HYPHEN {0x1401, 0x166C, prN}, // Lo [620] CANADIAN SYLLABICS E..CANADIAN SYLLABICS CARRIER TTSA {0x166D, 0x166D, prN}, // So CANADIAN SYLLABICS CHI SIGN {0x166E, 0x166E, prN}, // Po CANADIAN SYLLABICS FULL STOP {0x166F, 0x167F, prN}, // Lo [17] CANADIAN SYLLABICS QAI..CANADIAN SYLLABICS BLACKFOOT W {0x1680, 0x1680, prN}, // Zs OGHAM SPACE MARK {0x1681, 0x169A, prN}, // Lo [26] OGHAM LETTER BEITH..OGHAM LETTER PEITH {0x169B, 0x169B, prN}, // Ps OGHAM FEATHER MARK {0x169C, 0x169C, prN}, // Pe OGHAM REVERSED FEATHER MARK {0x16A0, 0x16EA, prN}, // Lo [75] RUNIC LETTER FEHU FEOH FE F..RUNIC LETTER X {0x16EB, 0x16ED, prN}, // Po [3] RUNIC SINGLE PUNCTUATION..RUNIC CROSS PUNCTUATION {0x16EE, 0x16F0, prN}, // Nl [3] RUNIC ARLAUG SYMBOL..RUNIC BELGTHOR SYMBOL {0x16F1, 0x16F8, prN}, // Lo [8] RUNIC LETTER K..RUNIC LETTER FRANKS CASKET AESC {0x1700, 0x1711, prN}, // Lo [18] TAGALOG LETTER A..TAGALOG LETTER HA {0x1712, 0x1714, prN}, // Mn [3] TAGALOG VOWEL SIGN I..TAGALOG SIGN VIRAMA {0x1715, 0x1715, prN}, // Mc TAGALOG SIGN PAMUDPOD {0x171F, 0x171F, prN}, // Lo TAGALOG LETTER ARCHAIC RA {0x1720, 0x1731, prN}, // Lo [18] HANUNOO LETTER A..HANUNOO LETTER HA {0x1732, 0x1733, prN}, // Mn [2] HANUNOO VOWEL SIGN I..HANUNOO VOWEL SIGN U {0x1734, 0x1734, prN}, // Mc HANUNOO SIGN PAMUDPOD {0x1735, 0x1736, prN}, // Po [2] PHILIPPINE SINGLE PUNCTUATION..PHILIPPINE DOUBLE PUNCTUATION {0x1740, 0x1751, prN}, // Lo [18] BUHID LETTER A..BUHID LETTER HA {0x1752, 0x1753, prN}, // Mn [2] BUHID VOWEL SIGN I..BUHID VOWEL SIGN U {0x1760, 0x176C, prN}, // Lo [13] TAGBANWA LETTER A..TAGBANWA LETTER YA {0x176E, 0x1770, prN}, // Lo [3] TAGBANWA LETTER LA..TAGBANWA LETTER SA {0x1772, 0x1773, prN}, // Mn [2] TAGBANWA VOWEL SIGN I..TAGBANWA VOWEL SIGN U {0x1780, 0x17B3, prN}, // Lo [52] KHMER LETTER KA..KHMER INDEPENDENT VOWEL QAU {0x17B4, 0x17B5, prN}, // Mn [2] KHMER VOWEL INHERENT AQ..KHMER VOWEL INHERENT AA {0x17B6, 0x17B6, prN}, // Mc KHMER VOWEL SIGN AA {0x17B7, 0x17BD, prN}, // Mn [7] KHMER VOWEL SIGN I..KHMER VOWEL SIGN UA {0x17BE, 0x17C5, prN}, // Mc [8] KHMER VOWEL SIGN OE..KHMER VOWEL SIGN AU {0x17C6, 0x17C6, prN}, // Mn KHMER SIGN NIKAHIT {0x17C7, 0x17C8, prN}, // Mc [2] KHMER SIGN REAHMUK..KHMER SIGN YUUKALEAPINTU {0x17C9, 0x17D3, prN}, // Mn [11] KHMER SIGN MUUSIKATOAN..KHMER SIGN BATHAMASAT {0x17D4, 0x17D6, prN}, // Po [3] KHMER SIGN KHAN..KHMER SIGN CAMNUC PII KUUH {0x17D7, 0x17D7, prN}, // Lm KHMER SIGN LEK TOO {0x17D8, 0x17DA, prN}, // Po [3] KHMER SIGN BEYYAL..KHMER SIGN KOOMUUT {0x17DB, 0x17DB, prN}, // Sc KHMER CURRENCY SYMBOL RIEL {0x17DC, 0x17DC, prN}, // Lo KHMER SIGN AVAKRAHASANYA {0x17DD, 0x17DD, prN}, // Mn KHMER SIGN ATTHACAN {0x17E0, 0x17E9, prN}, // Nd [10] KHMER DIGIT ZERO..KHMER DIGIT NINE {0x17F0, 0x17F9, prN}, // No [10] KHMER SYMBOL LEK ATTAK SON..KHMER SYMBOL LEK ATTAK PRAM-BUON {0x1800, 0x1805, prN}, // Po [6] MONGOLIAN BIRGA..MONGOLIAN FOUR DOTS {0x1806, 0x1806, prN}, // Pd MONGOLIAN TODO SOFT HYPHEN {0x1807, 0x180A, prN}, // Po [4] MONGOLIAN SIBE SYLLABLE BOUNDARY MARKER..MONGOLIAN NIRUGU {0x180B, 0x180D, prN}, // Mn [3] MONGOLIAN FREE VARIATION SELECTOR ONE..MONGOLIAN FREE VARIATION SELECTOR THREE {0x180E, 0x180E, prN}, // Cf MONGOLIAN VOWEL SEPARATOR {0x180F, 0x180F, prN}, // Mn MONGOLIAN FREE VARIATION SELECTOR FOUR {0x1810, 0x1819, prN}, // Nd [10] MONGOLIAN DIGIT ZERO..MONGOLIAN DIGIT NINE {0x1820, 0x1842, prN}, // Lo [35] MONGOLIAN LETTER A..MONGOLIAN LETTER CHI {0x1843, 0x1843, prN}, // Lm MONGOLIAN LETTER TODO LONG VOWEL SIGN {0x1844, 0x1878, prN}, // Lo [53] MONGOLIAN LETTER TODO E..MONGOLIAN LETTER CHA WITH TWO DOTS {0x1880, 0x1884, prN}, // Lo [5] MONGOLIAN LETTER ALI GALI ANUSVARA ONE..MONGOLIAN LETTER ALI GALI INVERTED UBADAMA {0x1885, 0x1886, prN}, // Mn [2] MONGOLIAN LETTER ALI GALI BALUDA..MONGOLIAN LETTER ALI GALI THREE BALUDA {0x1887, 0x18A8, prN}, // Lo [34] MONGOLIAN LETTER ALI GALI A..MONGOLIAN LETTER MANCHU ALI GALI BHA {0x18A9, 0x18A9, prN}, // Mn MONGOLIAN LETTER ALI GALI DAGALGA {0x18AA, 0x18AA, prN}, // Lo MONGOLIAN LETTER MANCHU ALI GALI LHA {0x18B0, 0x18F5, prN}, // Lo [70] CANADIAN SYLLABICS OY..CANADIAN SYLLABICS CARRIER DENTAL S {0x1900, 0x191E, prN}, // Lo [31] LIMBU VOWEL-CARRIER LETTER..LIMBU LETTER TRA {0x1920, 0x1922, prN}, // Mn [3] LIMBU VOWEL SIGN A..LIMBU VOWEL SIGN U {0x1923, 0x1926, prN}, // Mc [4] LIMBU VOWEL SIGN EE..LIMBU VOWEL SIGN AU {0x1927, 0x1928, prN}, // Mn [2] LIMBU VOWEL SIGN E..LIMBU VOWEL SIGN O {0x1929, 0x192B, prN}, // Mc [3] LIMBU SUBJOINED LETTER YA..LIMBU SUBJOINED LETTER WA {0x1930, 0x1931, prN}, // Mc [2] LIMBU SMALL LETTER KA..LIMBU SMALL LETTER NGA {0x1932, 0x1932, prN}, // Mn LIMBU SMALL LETTER ANUSVARA {0x1933, 0x1938, prN}, // Mc [6] LIMBU SMALL LETTER TA..LIMBU SMALL LETTER LA {0x1939, 0x193B, prN}, // Mn [3] LIMBU SIGN MUKPHRENG..LIMBU SIGN SA-I {0x1940, 0x1940, prN}, // So LIMBU SIGN LOO {0x1944, 0x1945, prN}, // Po [2] LIMBU EXCLAMATION MARK..LIMBU QUESTION MARK {0x1946, 0x194F, prN}, // Nd [10] LIMBU DIGIT ZERO..LIMBU DIGIT NINE {0x1950, 0x196D, prN}, // Lo [30] TAI LE LETTER KA..TAI LE LETTER AI {0x1970, 0x1974, prN}, // Lo [5] TAI LE LETTER TONE-2..TAI LE LETTER TONE-6 {0x1980, 0x19AB, prN}, // Lo [44] NEW TAI LUE LETTER HIGH QA..NEW TAI LUE LETTER LOW SUA {0x19B0, 0x19C9, prN}, // Lo [26] NEW TAI LUE VOWEL SIGN VOWEL SHORTENER..NEW TAI LUE TONE MARK-2 {0x19D0, 0x19D9, prN}, // Nd [10] NEW TAI LUE DIGIT ZERO..NEW TAI LUE DIGIT NINE {0x19DA, 0x19DA, prN}, // No NEW TAI LUE THAM DIGIT ONE {0x19DE, 0x19DF, prN}, // So [2] NEW TAI LUE SIGN LAE..NEW TAI LUE SIGN LAEV {0x19E0, 0x19FF, prN}, // So [32] KHMER SYMBOL PATHAMASAT..KHMER SYMBOL DAP-PRAM ROC {0x1A00, 0x1A16, prN}, // Lo [23] BUGINESE LETTER KA..BUGINESE LETTER HA {0x1A17, 0x1A18, prN}, // Mn [2] BUGINESE VOWEL SIGN I..BUGINESE VOWEL SIGN U {0x1A19, 0x1A1A, prN}, // Mc [2] BUGINESE VOWEL SIGN E..BUGINESE VOWEL SIGN O {0x1A1B, 0x1A1B, prN}, // Mn BUGINESE VOWEL SIGN AE {0x1A1E, 0x1A1F, prN}, // Po [2] BUGINESE PALLAWA..BUGINESE END OF SECTION {0x1A20, 0x1A54, prN}, // Lo [53] TAI THAM LETTER HIGH KA..TAI THAM LETTER GREAT SA {0x1A55, 0x1A55, prN}, // Mc TAI THAM CONSONANT SIGN MEDIAL RA {0x1A56, 0x1A56, prN}, // Mn TAI THAM CONSONANT SIGN MEDIAL LA {0x1A57, 0x1A57, prN}, // Mc TAI THAM CONSONANT SIGN LA TANG LAI {0x1A58, 0x1A5E, prN}, // Mn [7] TAI THAM SIGN MAI KANG LAI..TAI THAM CONSONANT SIGN SA {0x1A60, 0x1A60, prN}, // Mn TAI THAM SIGN SAKOT {0x1A61, 0x1A61, prN}, // Mc TAI THAM VOWEL SIGN A {0x1A62, 0x1A62, prN}, // Mn TAI THAM VOWEL SIGN MAI SAT {0x1A63, 0x1A64, prN}, // Mc [2] TAI THAM VOWEL SIGN AA..TAI THAM VOWEL SIGN TALL AA {0x1A65, 0x1A6C, prN}, // Mn [8] TAI THAM VOWEL SIGN I..TAI THAM VOWEL SIGN OA BELOW {0x1A6D, 0x1A72, prN}, // Mc [6] TAI THAM VOWEL SIGN OY..TAI THAM VOWEL SIGN THAM AI {0x1A73, 0x1A7C, prN}, // Mn [10] TAI THAM VOWEL SIGN OA ABOVE..TAI THAM SIGN KHUEN-LUE KARAN {0x1A7F, 0x1A7F, prN}, // Mn TAI THAM COMBINING CRYPTOGRAMMIC DOT {0x1A80, 0x1A89, prN}, // Nd [10] TAI THAM HORA DIGIT ZERO..TAI THAM HORA DIGIT NINE {0x1A90, 0x1A99, prN}, // Nd [10] TAI THAM THAM DIGIT ZERO..TAI THAM THAM DIGIT NINE {0x1AA0, 0x1AA6, prN}, // Po [7] TAI THAM SIGN WIANG..TAI THAM SIGN REVERSED ROTATED RANA {0x1AA7, 0x1AA7, prN}, // Lm TAI THAM SIGN MAI YAMOK {0x1AA8, 0x1AAD, prN}, // Po [6] TAI THAM SIGN KAAN..TAI THAM SIGN CAANG {0x1AB0, 0x1ABD, prN}, // Mn [14] COMBINING DOUBLED CIRCUMFLEX ACCENT..COMBINING PARENTHESES BELOW {0x1ABE, 0x1ABE, prN}, // Me COMBINING PARENTHESES OVERLAY {0x1ABF, 0x1ACE, prN}, // Mn [16] COMBINING LATIN SMALL LETTER W BELOW..COMBINING LATIN SMALL LETTER INSULAR T {0x1B00, 0x1B03, prN}, // Mn [4] BALINESE SIGN ULU RICEM..BALINESE SIGN SURANG {0x1B04, 0x1B04, prN}, // Mc BALINESE SIGN BISAH {0x1B05, 0x1B33, prN}, // Lo [47] BALINESE LETTER AKARA..BALINESE LETTER HA {0x1B34, 0x1B34, prN}, // Mn BALINESE SIGN REREKAN {0x1B35, 0x1B35, prN}, // Mc BALINESE VOWEL SIGN TEDUNG {0x1B36, 0x1B3A, prN}, // Mn [5] BALINESE VOWEL SIGN ULU..BALINESE VOWEL SIGN RA REPA {0x1B3B, 0x1B3B, prN}, // Mc BALINESE VOWEL SIGN RA REPA TEDUNG {0x1B3C, 0x1B3C, prN}, // Mn BALINESE VOWEL SIGN LA LENGA {0x1B3D, 0x1B41, prN}, // Mc [5] BALINESE VOWEL SIGN LA LENGA TEDUNG..BALINESE VOWEL SIGN TALING REPA TEDUNG {0x1B42, 0x1B42, prN}, // Mn BALINESE VOWEL SIGN PEPET {0x1B43, 0x1B44, prN}, // Mc [2] BALINESE VOWEL SIGN PEPET TEDUNG..BALINESE ADEG ADEG {0x1B45, 0x1B4C, prN}, // Lo [8] BALINESE LETTER KAF SASAK..BALINESE LETTER ARCHAIC JNYA {0x1B50, 0x1B59, prN}, // Nd [10] BALINESE DIGIT ZERO..BALINESE DIGIT NINE {0x1B5A, 0x1B60, prN}, // Po [7] BALINESE PANTI..BALINESE PAMENENG {0x1B61, 0x1B6A, prN}, // So [10] BALINESE MUSICAL SYMBOL DONG..BALINESE MUSICAL SYMBOL DANG GEDE {0x1B6B, 0x1B73, prN}, // Mn [9] BALINESE MUSICAL SYMBOL COMBINING TEGEH..BALINESE MUSICAL SYMBOL COMBINING GONG {0x1B74, 0x1B7C, prN}, // So [9] BALINESE MUSICAL SYMBOL RIGHT-HAND OPEN DUG..BALINESE MUSICAL SYMBOL LEFT-HAND OPEN PING {0x1B7D, 0x1B7E, prN}, // Po [2] BALINESE PANTI LANTANG..BALINESE PAMADA LANTANG {0x1B80, 0x1B81, prN}, // Mn [2] SUNDANESE SIGN PANYECEK..SUNDANESE SIGN PANGLAYAR {0x1B82, 0x1B82, prN}, // Mc SUNDANESE SIGN PANGWISAD {0x1B83, 0x1BA0, prN}, // Lo [30] SUNDANESE LETTER A..SUNDANESE LETTER HA {0x1BA1, 0x1BA1, prN}, // Mc SUNDANESE CONSONANT SIGN PAMINGKAL {0x1BA2, 0x1BA5, prN}, // Mn [4] SUNDANESE CONSONANT SIGN PANYAKRA..SUNDANESE VOWEL SIGN PANYUKU {0x1BA6, 0x1BA7, prN}, // Mc [2] SUNDANESE VOWEL SIGN PANAELAENG..SUNDANESE VOWEL SIGN PANOLONG {0x1BA8, 0x1BA9, prN}, // Mn [2] SUNDANESE VOWEL SIGN PAMEPET..SUNDANESE VOWEL SIGN PANEULEUNG {0x1BAA, 0x1BAA, prN}, // Mc SUNDANESE SIGN PAMAAEH {0x1BAB, 0x1BAD, prN}, // Mn [3] SUNDANESE SIGN VIRAMA..SUNDANESE CONSONANT SIGN PASANGAN WA {0x1BAE, 0x1BAF, prN}, // Lo [2] SUNDANESE LETTER KHA..SUNDANESE LETTER SYA {0x1BB0, 0x1BB9, prN}, // Nd [10] SUNDANESE DIGIT ZERO..SUNDANESE DIGIT NINE {0x1BBA, 0x1BBF, prN}, // Lo [6] SUNDANESE AVAGRAHA..SUNDANESE LETTER FINAL M {0x1BC0, 0x1BE5, prN}, // Lo [38] BATAK LETTER A..BATAK LETTER U {0x1BE6, 0x1BE6, prN}, // Mn BATAK SIGN TOMPI {0x1BE7, 0x1BE7, prN}, // Mc BATAK VOWEL SIGN E {0x1BE8, 0x1BE9, prN}, // Mn [2] BATAK VOWEL SIGN PAKPAK E..BATAK VOWEL SIGN EE {0x1BEA, 0x1BEC, prN}, // Mc [3] BATAK VOWEL SIGN I..BATAK VOWEL SIGN O {0x1BED, 0x1BED, prN}, // Mn BATAK VOWEL SIGN KARO O {0x1BEE, 0x1BEE, prN}, // Mc BATAK VOWEL SIGN U {0x1BEF, 0x1BF1, prN}, // Mn [3] BATAK VOWEL SIGN U FOR SIMALUNGUN SA..BATAK CONSONANT SIGN H {0x1BF2, 0x1BF3, prN}, // Mc [2] BATAK PANGOLAT..BATAK PANONGONAN {0x1BFC, 0x1BFF, prN}, // Po [4] BATAK SYMBOL BINDU NA METEK..BATAK SYMBOL BINDU PANGOLAT {0x1C00, 0x1C23, prN}, // Lo [36] LEPCHA LETTER KA..LEPCHA LETTER A {0x1C24, 0x1C2B, prN}, // Mc [8] LEPCHA SUBJOINED LETTER YA..LEPCHA VOWEL SIGN UU {0x1C2C, 0x1C33, prN}, // Mn [8] LEPCHA VOWEL SIGN E..LEPCHA CONSONANT SIGN T {0x1C34, 0x1C35, prN}, // Mc [2] LEPCHA CONSONANT SIGN NYIN-DO..LEPCHA CONSONANT SIGN KANG {0x1C36, 0x1C37, prN}, // Mn [2] LEPCHA SIGN RAN..LEPCHA SIGN NUKTA {0x1C3B, 0x1C3F, prN}, // Po [5] LEPCHA PUNCTUATION TA-ROL..LEPCHA PUNCTUATION TSHOOK {0x1C40, 0x1C49, prN}, // Nd [10] LEPCHA DIGIT ZERO..LEPCHA DIGIT NINE {0x1C4D, 0x1C4F, prN}, // Lo [3] LEPCHA LETTER TTA..LEPCHA LETTER DDA {0x1C50, 0x1C59, prN}, // Nd [10] OL CHIKI DIGIT ZERO..OL CHIKI DIGIT NINE {0x1C5A, 0x1C77, prN}, // Lo [30] OL CHIKI LETTER LA..OL CHIKI LETTER OH {0x1C78, 0x1C7D, prN}, // Lm [6] OL CHIKI MU TTUDDAG..OL CHIKI AHAD {0x1C7E, 0x1C7F, prN}, // Po [2] OL CHIKI PUNCTUATION MUCAAD..OL CHIKI PUNCTUATION DOUBLE MUCAAD {0x1C80, 0x1C88, prN}, // Ll [9] CYRILLIC SMALL LETTER ROUNDED VE..CYRILLIC SMALL LETTER UNBLENDED UK {0x1C90, 0x1CBA, prN}, // Lu [43] GEORGIAN MTAVRULI CAPITAL LETTER AN..GEORGIAN MTAVRULI CAPITAL LETTER AIN {0x1CBD, 0x1CBF, prN}, // Lu [3] GEORGIAN MTAVRULI CAPITAL LETTER AEN..GEORGIAN MTAVRULI CAPITAL LETTER LABIAL SIGN {0x1CC0, 0x1CC7, prN}, // Po [8] SUNDANESE PUNCTUATION BINDU SURYA..SUNDANESE PUNCTUATION BINDU BA SATANGA {0x1CD0, 0x1CD2, prN}, // Mn [3] VEDIC TONE KARSHANA..VEDIC TONE PRENKHA {0x1CD3, 0x1CD3, prN}, // Po VEDIC SIGN NIHSHVASA {0x1CD4, 0x1CE0, prN}, // Mn [13] VEDIC SIGN YAJURVEDIC MIDLINE SVARITA..VEDIC TONE RIGVEDIC KASHMIRI INDEPENDENT SVARITA {0x1CE1, 0x1CE1, prN}, // Mc VEDIC TONE ATHARVAVEDIC INDEPENDENT SVARITA {0x1CE2, 0x1CE8, prN}, // Mn [7] VEDIC SIGN VISARGA SVARITA..VEDIC SIGN VISARGA ANUDATTA WITH TAIL {0x1CE9, 0x1CEC, prN}, // Lo [4] VEDIC SIGN ANUSVARA ANTARGOMUKHA..VEDIC SIGN ANUSVARA VAMAGOMUKHA WITH TAIL {0x1CED, 0x1CED, prN}, // Mn VEDIC SIGN TIRYAK {0x1CEE, 0x1CF3, prN}, // Lo [6] VEDIC SIGN HEXIFORM LONG ANUSVARA..VEDIC SIGN ROTATED ARDHAVISARGA {0x1CF4, 0x1CF4, prN}, // Mn VEDIC TONE CANDRA ABOVE {0x1CF5, 0x1CF6, prN}, // Lo [2] VEDIC SIGN JIHVAMULIYA..VEDIC SIGN UPADHMANIYA {0x1CF7, 0x1CF7, prN}, // Mc VEDIC SIGN ATIKRAMA {0x1CF8, 0x1CF9, prN}, // Mn [2] VEDIC TONE RING ABOVE..VEDIC TONE DOUBLE RING ABOVE {0x1CFA, 0x1CFA, prN}, // Lo VEDIC SIGN DOUBLE ANUSVARA ANTARGOMUKHA {0x1D00, 0x1D2B, prN}, // Ll [44] LATIN LETTER SMALL CAPITAL A..CYRILLIC LETTER SMALL CAPITAL EL {0x1D2C, 0x1D6A, prN}, // Lm [63] MODIFIER LETTER CAPITAL A..GREEK SUBSCRIPT SMALL LETTER CHI {0x1D6B, 0x1D77, prN}, // Ll [13] LATIN SMALL LETTER UE..LATIN SMALL LETTER TURNED G {0x1D78, 0x1D78, prN}, // Lm MODIFIER LETTER CYRILLIC EN {0x1D79, 0x1D7F, prN}, // Ll [7] LATIN SMALL LETTER INSULAR G..LATIN SMALL LETTER UPSILON WITH STROKE {0x1D80, 0x1D9A, prN}, // Ll [27] LATIN SMALL LETTER B WITH PALATAL HOOK..LATIN SMALL LETTER EZH WITH RETROFLEX HOOK {0x1D9B, 0x1DBF, prN}, // Lm [37] MODIFIER LETTER SMALL TURNED ALPHA..MODIFIER LETTER SMALL THETA {0x1DC0, 0x1DFF, prN}, // Mn [64] COMBINING DOTTED GRAVE ACCENT..COMBINING RIGHT ARROWHEAD AND DOWN ARROWHEAD BELOW {0x1E00, 0x1EFF, prN}, // L& [256] LATIN CAPITAL LETTER A WITH RING BELOW..LATIN SMALL LETTER Y WITH LOOP {0x1F00, 0x1F15, prN}, // L& [22] GREEK SMALL LETTER ALPHA WITH PSILI..GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA {0x1F18, 0x1F1D, prN}, // Lu [6] GREEK CAPITAL LETTER EPSILON WITH PSILI..GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA {0x1F20, 0x1F45, prN}, // L& [38] GREEK SMALL LETTER ETA WITH PSILI..GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA {0x1F48, 0x1F4D, prN}, // Lu [6] GREEK CAPITAL LETTER OMICRON WITH PSILI..GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA {0x1F50, 0x1F57, prN}, // Ll [8] GREEK SMALL LETTER UPSILON WITH PSILI..GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI {0x1F59, 0x1F59, prN}, // Lu GREEK CAPITAL LETTER UPSILON WITH DASIA {0x1F5B, 0x1F5B, prN}, // Lu GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA {0x1F5D, 0x1F5D, prN}, // Lu GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA {0x1F5F, 0x1F7D, prN}, // L& [31] GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI..GREEK SMALL LETTER OMEGA WITH OXIA {0x1F80, 0x1FB4, prN}, // L& [53] GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI..GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI {0x1FB6, 0x1FBC, prN}, // L& [7] GREEK SMALL LETTER ALPHA WITH PERISPOMENI..GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI {0x1FBD, 0x1FBD, prN}, // Sk GREEK KORONIS {0x1FBE, 0x1FBE, prN}, // Ll GREEK PROSGEGRAMMENI {0x1FBF, 0x1FC1, prN}, // Sk [3] GREEK PSILI..GREEK DIALYTIKA AND PERISPOMENI {0x1FC2, 0x1FC4, prN}, // Ll [3] GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI {0x1FC6, 0x1FCC, prN}, // L& [7] GREEK SMALL LETTER ETA WITH PERISPOMENI..GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI {0x1FCD, 0x1FCF, prN}, // Sk [3] GREEK PSILI AND VARIA..GREEK PSILI AND PERISPOMENI {0x1FD0, 0x1FD3, prN}, // Ll [4] GREEK SMALL LETTER IOTA WITH VRACHY..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA {0x1FD6, 0x1FDB, prN}, // L& [6] GREEK SMALL LETTER IOTA WITH PERISPOMENI..GREEK CAPITAL LETTER IOTA WITH OXIA {0x1FDD, 0x1FDF, prN}, // Sk [3] GREEK DASIA AND VARIA..GREEK DASIA AND PERISPOMENI {0x1FE0, 0x1FEC, prN}, // L& [13] GREEK SMALL LETTER UPSILON WITH VRACHY..GREEK CAPITAL LETTER RHO WITH DASIA {0x1FED, 0x1FEF, prN}, // Sk [3] GREEK DIALYTIKA AND VARIA..GREEK VARIA {0x1FF2, 0x1FF4, prN}, // Ll [3] GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI {0x1FF6, 0x1FFC, prN}, // L& [7] GREEK SMALL LETTER OMEGA WITH PERISPOMENI..GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI {0x1FFD, 0x1FFE, prN}, // Sk [2] GREEK OXIA..GREEK DASIA {0x2000, 0x200A, prN}, // Zs [11] EN QUAD..HAIR SPACE {0x200B, 0x200F, prN}, // Cf [5] ZERO WIDTH SPACE..RIGHT-TO-LEFT MARK {0x2010, 0x2010, prA}, // Pd HYPHEN {0x2011, 0x2012, prN}, // Pd [2] NON-BREAKING HYPHEN..FIGURE DASH {0x2013, 0x2015, prA}, // Pd [3] EN DASH..HORIZONTAL BAR {0x2016, 0x2016, prA}, // Po DOUBLE VERTICAL LINE {0x2017, 0x2017, prN}, // Po DOUBLE LOW LINE {0x2018, 0x2018, prA}, // Pi LEFT SINGLE QUOTATION MARK {0x2019, 0x2019, prA}, // Pf RIGHT SINGLE QUOTATION MARK {0x201A, 0x201A, prN}, // Ps SINGLE LOW-9 QUOTATION MARK {0x201B, 0x201B, prN}, // Pi SINGLE HIGH-REVERSED-9 QUOTATION MARK {0x201C, 0x201C, prA}, // Pi LEFT DOUBLE QUOTATION MARK {0x201D, 0x201D, prA}, // Pf RIGHT DOUBLE QUOTATION MARK {0x201E, 0x201E, prN}, // Ps DOUBLE LOW-9 QUOTATION MARK {0x201F, 0x201F, prN}, // Pi DOUBLE HIGH-REVERSED-9 QUOTATION MARK {0x2020, 0x2022, prA}, // Po [3] DAGGER..BULLET {0x2023, 0x2023, prN}, // Po TRIANGULAR BULLET {0x2024, 0x2027, prA}, // Po [4] ONE DOT LEADER..HYPHENATION POINT {0x2028, 0x2028, prN}, // Zl LINE SEPARATOR {0x2029, 0x2029, prN}, // Zp PARAGRAPH SEPARATOR {0x202A, 0x202E, prN}, // Cf [5] LEFT-TO-RIGHT EMBEDDING..RIGHT-TO-LEFT OVERRIDE {0x202F, 0x202F, prN}, // Zs NARROW NO-BREAK SPACE {0x2030, 0x2030, prA}, // Po PER MILLE SIGN {0x2031, 0x2031, prN}, // Po PER TEN THOUSAND SIGN {0x2032, 0x2033, prA}, // Po [2] PRIME..DOUBLE PRIME {0x2034, 0x2034, prN}, // Po TRIPLE PRIME {0x2035, 0x2035, prA}, // Po REVERSED PRIME {0x2036, 0x2038, prN}, // Po [3] REVERSED DOUBLE PRIME..CARET {0x2039, 0x2039, prN}, // Pi SINGLE LEFT-POINTING ANGLE QUOTATION MARK {0x203A, 0x203A, prN}, // Pf SINGLE RIGHT-POINTING ANGLE QUOTATION MARK {0x203B, 0x203B, prA}, // Po REFERENCE MARK {0x203C, 0x203D, prN}, // Po [2] DOUBLE EXCLAMATION MARK..INTERROBANG {0x203E, 0x203E, prA}, // Po OVERLINE {0x203F, 0x2040, prN}, // Pc [2] UNDERTIE..CHARACTER TIE {0x2041, 0x2043, prN}, // Po [3] CARET INSERTION POINT..HYPHEN BULLET {0x2044, 0x2044, prN}, // Sm FRACTION SLASH {0x2045, 0x2045, prN}, // Ps LEFT SQUARE BRACKET WITH QUILL {0x2046, 0x2046, prN}, // Pe RIGHT SQUARE BRACKET WITH QUILL {0x2047, 0x2051, prN}, // Po [11] DOUBLE QUESTION MARK..TWO ASTERISKS ALIGNED VERTICALLY {0x2052, 0x2052, prN}, // Sm COMMERCIAL MINUS SIGN {0x2053, 0x2053, prN}, // Po SWUNG DASH {0x2054, 0x2054, prN}, // Pc INVERTED UNDERTIE {0x2055, 0x205E, prN}, // Po [10] FLOWER PUNCTUATION MARK..VERTICAL FOUR DOTS {0x205F, 0x205F, prN}, // Zs MEDIUM MATHEMATICAL SPACE {0x2060, 0x2064, prN}, // Cf [5] WORD JOINER..INVISIBLE PLUS {0x2066, 0x206F, prN}, // Cf [10] LEFT-TO-RIGHT ISOLATE..NOMINAL DIGIT SHAPES {0x2070, 0x2070, prN}, // No SUPERSCRIPT ZERO {0x2071, 0x2071, prN}, // Lm SUPERSCRIPT LATIN SMALL LETTER I {0x2074, 0x2074, prA}, // No SUPERSCRIPT FOUR {0x2075, 0x2079, prN}, // No [5] SUPERSCRIPT FIVE..SUPERSCRIPT NINE {0x207A, 0x207C, prN}, // Sm [3] SUPERSCRIPT PLUS SIGN..SUPERSCRIPT EQUALS SIGN {0x207D, 0x207D, prN}, // Ps SUPERSCRIPT LEFT PARENTHESIS {0x207E, 0x207E, prN}, // Pe SUPERSCRIPT RIGHT PARENTHESIS {0x207F, 0x207F, prA}, // Lm SUPERSCRIPT LATIN SMALL LETTER N {0x2080, 0x2080, prN}, // No SUBSCRIPT ZERO {0x2081, 0x2084, prA}, // No [4] SUBSCRIPT ONE..SUBSCRIPT FOUR {0x2085, 0x2089, prN}, // No [5] SUBSCRIPT FIVE..SUBSCRIPT NINE {0x208A, 0x208C, prN}, // Sm [3] SUBSCRIPT PLUS SIGN..SUBSCRIPT EQUALS SIGN {0x208D, 0x208D, prN}, // Ps SUBSCRIPT LEFT PARENTHESIS {0x208E, 0x208E, prN}, // Pe SUBSCRIPT RIGHT PARENTHESIS {0x2090, 0x209C, prN}, // Lm [13] LATIN SUBSCRIPT SMALL LETTER A..LATIN SUBSCRIPT SMALL LETTER T {0x20A0, 0x20A8, prN}, // Sc [9] EURO-CURRENCY SIGN..RUPEE SIGN {0x20A9, 0x20A9, prH}, // Sc WON SIGN {0x20AA, 0x20AB, prN}, // Sc [2] NEW SHEQEL SIGN..DONG SIGN {0x20AC, 0x20AC, prA}, // Sc EURO SIGN {0x20AD, 0x20C0, prN}, // Sc [20] KIP SIGN..SOM SIGN {0x20D0, 0x20DC, prN}, // Mn [13] COMBINING LEFT HARPOON ABOVE..COMBINING FOUR DOTS ABOVE {0x20DD, 0x20E0, prN}, // Me [4] COMBINING ENCLOSING CIRCLE..COMBINING ENCLOSING CIRCLE BACKSLASH {0x20E1, 0x20E1, prN}, // Mn COMBINING LEFT RIGHT ARROW ABOVE {0x20E2, 0x20E4, prN}, // Me [3] COMBINING ENCLOSING SCREEN..COMBINING ENCLOSING UPWARD POINTING TRIANGLE {0x20E5, 0x20F0, prN}, // Mn [12] COMBINING REVERSE SOLIDUS OVERLAY..COMBINING ASTERISK ABOVE {0x2100, 0x2101, prN}, // So [2] ACCOUNT OF..ADDRESSED TO THE SUBJECT {0x2102, 0x2102, prN}, // Lu DOUBLE-STRUCK CAPITAL C {0x2103, 0x2103, prA}, // So DEGREE CELSIUS {0x2104, 0x2104, prN}, // So CENTRE LINE SYMBOL {0x2105, 0x2105, prA}, // So CARE OF {0x2106, 0x2106, prN}, // So CADA UNA {0x2107, 0x2107, prN}, // Lu EULER CONSTANT {0x2108, 0x2108, prN}, // So SCRUPLE {0x2109, 0x2109, prA}, // So DEGREE FAHRENHEIT {0x210A, 0x2112, prN}, // L& [9] SCRIPT SMALL G..SCRIPT CAPITAL L {0x2113, 0x2113, prA}, // Ll SCRIPT SMALL L {0x2114, 0x2114, prN}, // So L B BAR SYMBOL {0x2115, 0x2115, prN}, // Lu DOUBLE-STRUCK CAPITAL N {0x2116, 0x2116, prA}, // So NUMERO SIGN {0x2117, 0x2117, prN}, // So SOUND RECORDING COPYRIGHT {0x2118, 0x2118, prN}, // Sm SCRIPT CAPITAL P {0x2119, 0x211D, prN}, // Lu [5] DOUBLE-STRUCK CAPITAL P..DOUBLE-STRUCK CAPITAL R {0x211E, 0x2120, prN}, // So [3] PRESCRIPTION TAKE..SERVICE MARK {0x2121, 0x2122, prA}, // So [2] TELEPHONE SIGN..TRADE MARK SIGN {0x2123, 0x2123, prN}, // So VERSICLE {0x2124, 0x2124, prN}, // Lu DOUBLE-STRUCK CAPITAL Z {0x2125, 0x2125, prN}, // So OUNCE SIGN {0x2126, 0x2126, prA}, // Lu OHM SIGN {0x2127, 0x2127, prN}, // So INVERTED OHM SIGN {0x2128, 0x2128, prN}, // Lu BLACK-LETTER CAPITAL Z {0x2129, 0x2129, prN}, // So TURNED GREEK SMALL LETTER IOTA {0x212A, 0x212A, prN}, // Lu KELVIN SIGN {0x212B, 0x212B, prA}, // Lu ANGSTROM SIGN {0x212C, 0x212D, prN}, // Lu [2] SCRIPT CAPITAL B..BLACK-LETTER CAPITAL C {0x212E, 0x212E, prN}, // So ESTIMATED SYMBOL {0x212F, 0x2134, prN}, // L& [6] SCRIPT SMALL E..SCRIPT SMALL O {0x2135, 0x2138, prN}, // Lo [4] ALEF SYMBOL..DALET SYMBOL {0x2139, 0x2139, prN}, // Ll INFORMATION SOURCE {0x213A, 0x213B, prN}, // So [2] ROTATED CAPITAL Q..FACSIMILE SIGN {0x213C, 0x213F, prN}, // L& [4] DOUBLE-STRUCK SMALL PI..DOUBLE-STRUCK CAPITAL PI {0x2140, 0x2144, prN}, // Sm [5] DOUBLE-STRUCK N-ARY SUMMATION..TURNED SANS-SERIF CAPITAL Y {0x2145, 0x2149, prN}, // L& [5] DOUBLE-STRUCK ITALIC CAPITAL D..DOUBLE-STRUCK ITALIC SMALL J {0x214A, 0x214A, prN}, // So PROPERTY LINE {0x214B, 0x214B, prN}, // Sm TURNED AMPERSAND {0x214C, 0x214D, prN}, // So [2] PER SIGN..AKTIESELSKAB {0x214E, 0x214E, prN}, // Ll TURNED SMALL F {0x214F, 0x214F, prN}, // So SYMBOL FOR SAMARITAN SOURCE {0x2150, 0x2152, prN}, // No [3] VULGAR FRACTION ONE SEVENTH..VULGAR FRACTION ONE TENTH {0x2153, 0x2154, prA}, // No [2] VULGAR FRACTION ONE THIRD..VULGAR FRACTION TWO THIRDS {0x2155, 0x215A, prN}, // No [6] VULGAR FRACTION ONE FIFTH..VULGAR FRACTION FIVE SIXTHS {0x215B, 0x215E, prA}, // No [4] VULGAR FRACTION ONE EIGHTH..VULGAR FRACTION SEVEN EIGHTHS {0x215F, 0x215F, prN}, // No FRACTION NUMERATOR ONE {0x2160, 0x216B, prA}, // Nl [12] ROMAN NUMERAL ONE..ROMAN NUMERAL TWELVE {0x216C, 0x216F, prN}, // Nl [4] ROMAN NUMERAL FIFTY..ROMAN NUMERAL ONE THOUSAND {0x2170, 0x2179, prA}, // Nl [10] SMALL ROMAN NUMERAL ONE..SMALL ROMAN NUMERAL TEN {0x217A, 0x2182, prN}, // Nl [9] SMALL ROMAN NUMERAL ELEVEN..ROMAN NUMERAL TEN THOUSAND {0x2183, 0x2184, prN}, // L& [2] ROMAN NUMERAL REVERSED ONE HUNDRED..LATIN SMALL LETTER REVERSED C {0x2185, 0x2188, prN}, // Nl [4] ROMAN NUMERAL SIX LATE FORM..ROMAN NUMERAL ONE HUNDRED THOUSAND {0x2189, 0x2189, prA}, // No VULGAR FRACTION ZERO THIRDS {0x218A, 0x218B, prN}, // So [2] TURNED DIGIT TWO..TURNED DIGIT THREE {0x2190, 0x2194, prA}, // Sm [5] LEFTWARDS ARROW..LEFT RIGHT ARROW {0x2195, 0x2199, prA}, // So [5] UP DOWN ARROW..SOUTH WEST ARROW {0x219A, 0x219B, prN}, // Sm [2] LEFTWARDS ARROW WITH STROKE..RIGHTWARDS ARROW WITH STROKE {0x219C, 0x219F, prN}, // So [4] LEFTWARDS WAVE ARROW..UPWARDS TWO HEADED ARROW {0x21A0, 0x21A0, prN}, // Sm RIGHTWARDS TWO HEADED ARROW {0x21A1, 0x21A2, prN}, // So [2] DOWNWARDS TWO HEADED ARROW..LEFTWARDS ARROW WITH TAIL {0x21A3, 0x21A3, prN}, // Sm RIGHTWARDS ARROW WITH TAIL {0x21A4, 0x21A5, prN}, // So [2] LEFTWARDS ARROW FROM BAR..UPWARDS ARROW FROM BAR {0x21A6, 0x21A6, prN}, // Sm RIGHTWARDS ARROW FROM BAR {0x21A7, 0x21AD, prN}, // So [7] DOWNWARDS ARROW FROM BAR..LEFT RIGHT WAVE ARROW {0x21AE, 0x21AE, prN}, // Sm LEFT RIGHT ARROW WITH STROKE {0x21AF, 0x21B7, prN}, // So [9] DOWNWARDS ZIGZAG ARROW..CLOCKWISE TOP SEMICIRCLE ARROW {0x21B8, 0x21B9, prA}, // So [2] NORTH WEST ARROW TO LONG BAR..LEFTWARDS ARROW TO BAR OVER RIGHTWARDS ARROW TO BAR {0x21BA, 0x21CD, prN}, // So [20] ANTICLOCKWISE OPEN CIRCLE ARROW..LEFTWARDS DOUBLE ARROW WITH STROKE {0x21CE, 0x21CF, prN}, // Sm [2] LEFT RIGHT DOUBLE ARROW WITH STROKE..RIGHTWARDS DOUBLE ARROW WITH STROKE {0x21D0, 0x21D1, prN}, // So [2] LEFTWARDS DOUBLE ARROW..UPWARDS DOUBLE ARROW {0x21D2, 0x21D2, prA}, // Sm RIGHTWARDS DOUBLE ARROW {0x21D3, 0x21D3, prN}, // So DOWNWARDS DOUBLE ARROW {0x21D4, 0x21D4, prA}, // Sm LEFT RIGHT DOUBLE ARROW {0x21D5, 0x21E6, prN}, // So [18] UP DOWN DOUBLE ARROW..LEFTWARDS WHITE ARROW {0x21E7, 0x21E7, prA}, // So UPWARDS WHITE ARROW {0x21E8, 0x21F3, prN}, // So [12] RIGHTWARDS WHITE ARROW..UP DOWN WHITE ARROW {0x21F4, 0x21FF, prN}, // Sm [12] RIGHT ARROW WITH SMALL CIRCLE..LEFT RIGHT OPEN-HEADED ARROW {0x2200, 0x2200, prA}, // Sm FOR ALL {0x2201, 0x2201, prN}, // Sm COMPLEMENT {0x2202, 0x2203, prA}, // Sm [2] PARTIAL DIFFERENTIAL..THERE EXISTS {0x2204, 0x2206, prN}, // Sm [3] THERE DOES NOT EXIST..INCREMENT {0x2207, 0x2208, prA}, // Sm [2] NABLA..ELEMENT OF {0x2209, 0x220A, prN}, // Sm [2] NOT AN ELEMENT OF..SMALL ELEMENT OF {0x220B, 0x220B, prA}, // Sm CONTAINS AS MEMBER {0x220C, 0x220E, prN}, // Sm [3] DOES NOT CONTAIN AS MEMBER..END OF PROOF {0x220F, 0x220F, prA}, // Sm N-ARY PRODUCT {0x2210, 0x2210, prN}, // Sm N-ARY COPRODUCT {0x2211, 0x2211, prA}, // Sm N-ARY SUMMATION {0x2212, 0x2214, prN}, // Sm [3] MINUS SIGN..DOT PLUS {0x2215, 0x2215, prA}, // Sm DIVISION SLASH {0x2216, 0x2219, prN}, // Sm [4] SET MINUS..BULLET OPERATOR {0x221A, 0x221A, prA}, // Sm SQUARE ROOT {0x221B, 0x221C, prN}, // Sm [2] CUBE ROOT..FOURTH ROOT {0x221D, 0x2220, prA}, // Sm [4] PROPORTIONAL TO..ANGLE {0x2221, 0x2222, prN}, // Sm [2] MEASURED ANGLE..SPHERICAL ANGLE {0x2223, 0x2223, prA}, // Sm DIVIDES {0x2224, 0x2224, prN}, // Sm DOES NOT DIVIDE {0x2225, 0x2225, prA}, // Sm PARALLEL TO {0x2226, 0x2226, prN}, // Sm NOT PARALLEL TO {0x2227, 0x222C, prA}, // Sm [6] LOGICAL AND..DOUBLE INTEGRAL {0x222D, 0x222D, prN}, // Sm TRIPLE INTEGRAL {0x222E, 0x222E, prA}, // Sm CONTOUR INTEGRAL {0x222F, 0x2233, prN}, // Sm [5] SURFACE INTEGRAL..ANTICLOCKWISE CONTOUR INTEGRAL {0x2234, 0x2237, prA}, // Sm [4] THEREFORE..PROPORTION {0x2238, 0x223B, prN}, // Sm [4] DOT MINUS..HOMOTHETIC {0x223C, 0x223D, prA}, // Sm [2] TILDE OPERATOR..REVERSED TILDE {0x223E, 0x2247, prN}, // Sm [10] INVERTED LAZY S..NEITHER APPROXIMATELY NOR ACTUALLY EQUAL TO {0x2248, 0x2248, prA}, // Sm ALMOST EQUAL TO {0x2249, 0x224B, prN}, // Sm [3] NOT ALMOST EQUAL TO..TRIPLE TILDE {0x224C, 0x224C, prA}, // Sm ALL EQUAL TO {0x224D, 0x2251, prN}, // Sm [5] EQUIVALENT TO..GEOMETRICALLY EQUAL TO {0x2252, 0x2252, prA}, // Sm APPROXIMATELY EQUAL TO OR THE IMAGE OF {0x2253, 0x225F, prN}, // Sm [13] IMAGE OF OR APPROXIMATELY EQUAL TO..QUESTIONED EQUAL TO {0x2260, 0x2261, prA}, // Sm [2] NOT EQUAL TO..IDENTICAL TO {0x2262, 0x2263, prN}, // Sm [2] NOT IDENTICAL TO..STRICTLY EQUIVALENT TO {0x2264, 0x2267, prA}, // Sm [4] LESS-THAN OR EQUAL TO..GREATER-THAN OVER EQUAL TO {0x2268, 0x2269, prN}, // Sm [2] LESS-THAN BUT NOT EQUAL TO..GREATER-THAN BUT NOT EQUAL TO {0x226A, 0x226B, prA}, // Sm [2] MUCH LESS-THAN..MUCH GREATER-THAN {0x226C, 0x226D, prN}, // Sm [2] BETWEEN..NOT EQUIVALENT TO {0x226E, 0x226F, prA}, // Sm [2] NOT LESS-THAN..NOT GREATER-THAN {0x2270, 0x2281, prN}, // Sm [18] NEITHER LESS-THAN NOR EQUAL TO..DOES NOT SUCCEED {0x2282, 0x2283, prA}, // Sm [2] SUBSET OF..SUPERSET OF {0x2284, 0x2285, prN}, // Sm [2] NOT A SUBSET OF..NOT A SUPERSET OF {0x2286, 0x2287, prA}, // Sm [2] SUBSET OF OR EQUAL TO..SUPERSET OF OR EQUAL TO {0x2288, 0x2294, prN}, // Sm [13] NEITHER A SUBSET OF NOR EQUAL TO..SQUARE CUP {0x2295, 0x2295, prA}, // Sm CIRCLED PLUS {0x2296, 0x2298, prN}, // Sm [3] CIRCLED MINUS..CIRCLED DIVISION SLASH {0x2299, 0x2299, prA}, // Sm CIRCLED DOT OPERATOR {0x229A, 0x22A4, prN}, // Sm [11] CIRCLED RING OPERATOR..DOWN TACK {0x22A5, 0x22A5, prA}, // Sm UP TACK {0x22A6, 0x22BE, prN}, // Sm [25] ASSERTION..RIGHT ANGLE WITH ARC {0x22BF, 0x22BF, prA}, // Sm RIGHT TRIANGLE {0x22C0, 0x22FF, prN}, // Sm [64] N-ARY LOGICAL AND..Z NOTATION BAG MEMBERSHIP {0x2300, 0x2307, prN}, // So [8] DIAMETER SIGN..WAVY LINE {0x2308, 0x2308, prN}, // Ps LEFT CEILING {0x2309, 0x2309, prN}, // Pe RIGHT CEILING {0x230A, 0x230A, prN}, // Ps LEFT FLOOR {0x230B, 0x230B, prN}, // Pe RIGHT FLOOR {0x230C, 0x2311, prN}, // So [6] BOTTOM RIGHT CROP..SQUARE LOZENGE {0x2312, 0x2312, prA}, // So ARC {0x2313, 0x2319, prN}, // So [7] SEGMENT..TURNED NOT SIGN {0x231A, 0x231B, prW}, // So [2] WATCH..HOURGLASS {0x231C, 0x231F, prN}, // So [4] TOP LEFT CORNER..BOTTOM RIGHT CORNER {0x2320, 0x2321, prN}, // Sm [2] TOP HALF INTEGRAL..BOTTOM HALF INTEGRAL {0x2322, 0x2328, prN}, // So [7] FROWN..KEYBOARD {0x2329, 0x2329, prW}, // Ps LEFT-POINTING ANGLE BRACKET {0x232A, 0x232A, prW}, // Pe RIGHT-POINTING ANGLE BRACKET {0x232B, 0x237B, prN}, // So [81] ERASE TO THE LEFT..NOT CHECK MARK {0x237C, 0x237C, prN}, // Sm RIGHT ANGLE WITH DOWNWARDS ZIGZAG ARROW {0x237D, 0x239A, prN}, // So [30] SHOULDERED OPEN BOX..CLEAR SCREEN SYMBOL {0x239B, 0x23B3, prN}, // Sm [25] LEFT PARENTHESIS UPPER HOOK..SUMMATION BOTTOM {0x23B4, 0x23DB, prN}, // So [40] TOP SQUARE BRACKET..FUSE {0x23DC, 0x23E1, prN}, // Sm [6] TOP PARENTHESIS..BOTTOM TORTOISE SHELL BRACKET {0x23E2, 0x23E8, prN}, // So [7] WHITE TRAPEZIUM..DECIMAL EXPONENT SYMBOL {0x23E9, 0x23EC, prW}, // So [4] BLACK RIGHT-POINTING DOUBLE TRIANGLE..BLACK DOWN-POINTING DOUBLE TRIANGLE {0x23ED, 0x23EF, prN}, // So [3] BLACK RIGHT-POINTING DOUBLE TRIANGLE WITH VERTICAL BAR..BLACK RIGHT-POINTING TRIANGLE WITH DOUBLE VERTICAL BAR {0x23F0, 0x23F0, prW}, // So ALARM CLOCK {0x23F1, 0x23F2, prN}, // So [2] STOPWATCH..TIMER CLOCK {0x23F3, 0x23F3, prW}, // So HOURGLASS WITH FLOWING SAND {0x23F4, 0x23FF, prN}, // So [12] BLACK MEDIUM LEFT-POINTING TRIANGLE..OBSERVER EYE SYMBOL {0x2400, 0x2426, prN}, // So [39] SYMBOL FOR NULL..SYMBOL FOR SUBSTITUTE FORM TWO {0x2440, 0x244A, prN}, // So [11] OCR HOOK..OCR DOUBLE BACKSLASH {0x2460, 0x249B, prA}, // No [60] CIRCLED DIGIT ONE..NUMBER TWENTY FULL STOP {0x249C, 0x24E9, prA}, // So [78] PARENTHESIZED LATIN SMALL LETTER A..CIRCLED LATIN SMALL LETTER Z {0x24EA, 0x24EA, prN}, // No CIRCLED DIGIT ZERO {0x24EB, 0x24FF, prA}, // No [21] NEGATIVE CIRCLED NUMBER ELEVEN..NEGATIVE CIRCLED DIGIT ZERO {0x2500, 0x254B, prA}, // So [76] BOX DRAWINGS LIGHT HORIZONTAL..BOX DRAWINGS HEAVY VERTICAL AND HORIZONTAL {0x254C, 0x254F, prN}, // So [4] BOX DRAWINGS LIGHT DOUBLE DASH HORIZONTAL..BOX DRAWINGS HEAVY DOUBLE DASH VERTICAL {0x2550, 0x2573, prA}, // So [36] BOX DRAWINGS DOUBLE HORIZONTAL..BOX DRAWINGS LIGHT DIAGONAL CROSS {0x2574, 0x257F, prN}, // So [12] BOX DRAWINGS LIGHT LEFT..BOX DRAWINGS HEAVY UP AND LIGHT DOWN {0x2580, 0x258F, prA}, // So [16] UPPER HALF BLOCK..LEFT ONE EIGHTH BLOCK {0x2590, 0x2591, prN}, // So [2] RIGHT HALF BLOCK..LIGHT SHADE {0x2592, 0x2595, prA}, // So [4] MEDIUM SHADE..RIGHT ONE EIGHTH BLOCK {0x2596, 0x259F, prN}, // So [10] QUADRANT LOWER LEFT..QUADRANT UPPER RIGHT AND LOWER LEFT AND LOWER RIGHT {0x25A0, 0x25A1, prA}, // So [2] BLACK SQUARE..WHITE SQUARE {0x25A2, 0x25A2, prN}, // So WHITE SQUARE WITH ROUNDED CORNERS {0x25A3, 0x25A9, prA}, // So [7] WHITE SQUARE CONTAINING BLACK SMALL SQUARE..SQUARE WITH DIAGONAL CROSSHATCH FILL {0x25AA, 0x25B1, prN}, // So [8] BLACK SMALL SQUARE..WHITE PARALLELOGRAM {0x25B2, 0x25B3, prA}, // So [2] BLACK UP-POINTING TRIANGLE..WHITE UP-POINTING TRIANGLE {0x25B4, 0x25B5, prN}, // So [2] BLACK UP-POINTING SMALL TRIANGLE..WHITE UP-POINTING SMALL TRIANGLE {0x25B6, 0x25B6, prA}, // So BLACK RIGHT-POINTING TRIANGLE {0x25B7, 0x25B7, prA}, // Sm WHITE RIGHT-POINTING TRIANGLE {0x25B8, 0x25BB, prN}, // So [4] BLACK RIGHT-POINTING SMALL TRIANGLE..WHITE RIGHT-POINTING POINTER {0x25BC, 0x25BD, prA}, // So [2] BLACK DOWN-POINTING TRIANGLE..WHITE DOWN-POINTING TRIANGLE {0x25BE, 0x25BF, prN}, // So [2] BLACK DOWN-POINTING SMALL TRIANGLE..WHITE DOWN-POINTING SMALL TRIANGLE {0x25C0, 0x25C0, prA}, // So BLACK LEFT-POINTING TRIANGLE {0x25C1, 0x25C1, prA}, // Sm WHITE LEFT-POINTING TRIANGLE {0x25C2, 0x25C5, prN}, // So [4] BLACK LEFT-POINTING SMALL TRIANGLE..WHITE LEFT-POINTING POINTER {0x25C6, 0x25C8, prA}, // So [3] BLACK DIAMOND..WHITE DIAMOND CONTAINING BLACK SMALL DIAMOND {0x25C9, 0x25CA, prN}, // So [2] FISHEYE..LOZENGE {0x25CB, 0x25CB, prA}, // So WHITE CIRCLE {0x25CC, 0x25CD, prN}, // So [2] DOTTED CIRCLE..CIRCLE WITH VERTICAL FILL {0x25CE, 0x25D1, prA}, // So [4] BULLSEYE..CIRCLE WITH RIGHT HALF BLACK {0x25D2, 0x25E1, prN}, // So [16] CIRCLE WITH LOWER HALF BLACK..LOWER HALF CIRCLE {0x25E2, 0x25E5, prA}, // So [4] BLACK LOWER RIGHT TRIANGLE..BLACK UPPER RIGHT TRIANGLE {0x25E6, 0x25EE, prN}, // So [9] WHITE BULLET..UP-POINTING TRIANGLE WITH RIGHT HALF BLACK {0x25EF, 0x25EF, prA}, // So LARGE CIRCLE {0x25F0, 0x25F7, prN}, // So [8] WHITE SQUARE WITH UPPER LEFT QUADRANT..WHITE CIRCLE WITH UPPER RIGHT QUADRANT {0x25F8, 0x25FC, prN}, // Sm [5] UPPER LEFT TRIANGLE..BLACK MEDIUM SQUARE {0x25FD, 0x25FE, prW}, // Sm [2] WHITE MEDIUM SMALL SQUARE..BLACK MEDIUM SMALL SQUARE {0x25FF, 0x25FF, prN}, // Sm LOWER RIGHT TRIANGLE {0x2600, 0x2604, prN}, // So [5] BLACK SUN WITH RAYS..COMET {0x2605, 0x2606, prA}, // So [2] BLACK STAR..WHITE STAR {0x2607, 0x2608, prN}, // So [2] LIGHTNING..THUNDERSTORM {0x2609, 0x2609, prA}, // So SUN {0x260A, 0x260D, prN}, // So [4] ASCENDING NODE..OPPOSITION {0x260E, 0x260F, prA}, // So [2] BLACK TELEPHONE..WHITE TELEPHONE {0x2610, 0x2613, prN}, // So [4] BALLOT BOX..SALTIRE {0x2614, 0x2615, prW}, // So [2] UMBRELLA WITH RAIN DROPS..HOT BEVERAGE {0x2616, 0x261B, prN}, // So [6] WHITE SHOGI PIECE..BLACK RIGHT POINTING INDEX {0x261C, 0x261C, prA}, // So WHITE LEFT POINTING INDEX {0x261D, 0x261D, prN}, // So WHITE UP POINTING INDEX {0x261E, 0x261E, prA}, // So WHITE RIGHT POINTING INDEX {0x261F, 0x263F, prN}, // So [33] WHITE DOWN POINTING INDEX..MERCURY {0x2640, 0x2640, prA}, // So FEMALE SIGN {0x2641, 0x2641, prN}, // So EARTH {0x2642, 0x2642, prA}, // So MALE SIGN {0x2643, 0x2647, prN}, // So [5] JUPITER..PLUTO {0x2648, 0x2653, prW}, // So [12] ARIES..PISCES {0x2654, 0x265F, prN}, // So [12] WHITE CHESS KING..BLACK CHESS PAWN {0x2660, 0x2661, prA}, // So [2] BLACK SPADE SUIT..WHITE HEART SUIT {0x2662, 0x2662, prN}, // So WHITE DIAMOND SUIT {0x2663, 0x2665, prA}, // So [3] BLACK CLUB SUIT..BLACK HEART SUIT {0x2666, 0x2666, prN}, // So BLACK DIAMOND SUIT {0x2667, 0x266A, prA}, // So [4] WHITE CLUB SUIT..EIGHTH NOTE {0x266B, 0x266B, prN}, // So BEAMED EIGHTH NOTES {0x266C, 0x266D, prA}, // So [2] BEAMED SIXTEENTH NOTES..MUSIC FLAT SIGN {0x266E, 0x266E, prN}, // So MUSIC NATURAL SIGN {0x266F, 0x266F, prA}, // Sm MUSIC SHARP SIGN {0x2670, 0x267E, prN}, // So [15] WEST SYRIAC CROSS..PERMANENT PAPER SIGN {0x267F, 0x267F, prW}, // So WHEELCHAIR SYMBOL {0x2680, 0x2692, prN}, // So [19] DIE FACE-1..HAMMER AND PICK {0x2693, 0x2693, prW}, // So ANCHOR {0x2694, 0x269D, prN}, // So [10] CROSSED SWORDS..OUTLINED WHITE STAR {0x269E, 0x269F, prA}, // So [2] THREE LINES CONVERGING RIGHT..THREE LINES CONVERGING LEFT {0x26A0, 0x26A0, prN}, // So WARNING SIGN {0x26A1, 0x26A1, prW}, // So HIGH VOLTAGE SIGN {0x26A2, 0x26A9, prN}, // So [8] DOUBLED FEMALE SIGN..HORIZONTAL MALE WITH STROKE SIGN {0x26AA, 0x26AB, prW}, // So [2] MEDIUM WHITE CIRCLE..MEDIUM BLACK CIRCLE {0x26AC, 0x26BC, prN}, // So [17] MEDIUM SMALL WHITE CIRCLE..SESQUIQUADRATE {0x26BD, 0x26BE, prW}, // So [2] SOCCER BALL..BASEBALL {0x26BF, 0x26BF, prA}, // So SQUARED KEY {0x26C0, 0x26C3, prN}, // So [4] WHITE DRAUGHTS MAN..BLACK DRAUGHTS KING {0x26C4, 0x26C5, prW}, // So [2] SNOWMAN WITHOUT SNOW..SUN BEHIND CLOUD {0x26C6, 0x26CD, prA}, // So [8] RAIN..DISABLED CAR {0x26CE, 0x26CE, prW}, // So OPHIUCHUS {0x26CF, 0x26D3, prA}, // So [5] PICK..CHAINS {0x26D4, 0x26D4, prW}, // So NO ENTRY {0x26D5, 0x26E1, prA}, // So [13] ALTERNATE ONE-WAY LEFT WAY TRAFFIC..RESTRICTED LEFT ENTRY-2 {0x26E2, 0x26E2, prN}, // So ASTRONOMICAL SYMBOL FOR URANUS {0x26E3, 0x26E3, prA}, // So HEAVY CIRCLE WITH STROKE AND TWO DOTS ABOVE {0x26E4, 0x26E7, prN}, // So [4] PENTAGRAM..INVERTED PENTAGRAM {0x26E8, 0x26E9, prA}, // So [2] BLACK CROSS ON SHIELD..SHINTO SHRINE {0x26EA, 0x26EA, prW}, // So CHURCH {0x26EB, 0x26F1, prA}, // So [7] CASTLE..UMBRELLA ON GROUND {0x26F2, 0x26F3, prW}, // So [2] FOUNTAIN..FLAG IN HOLE {0x26F4, 0x26F4, prA}, // So FERRY {0x26F5, 0x26F5, prW}, // So SAILBOAT {0x26F6, 0x26F9, prA}, // So [4] SQUARE FOUR CORNERS..PERSON WITH BALL {0x26FA, 0x26FA, prW}, // So TENT {0x26FB, 0x26FC, prA}, // So [2] JAPANESE BANK SYMBOL..HEADSTONE GRAVEYARD SYMBOL {0x26FD, 0x26FD, prW}, // So FUEL PUMP {0x26FE, 0x26FF, prA}, // So [2] CUP ON BLACK SQUARE..WHITE FLAG WITH HORIZONTAL MIDDLE BLACK STRIPE {0x2700, 0x2704, prN}, // So [5] BLACK SAFETY SCISSORS..WHITE SCISSORS {0x2705, 0x2705, prW}, // So WHITE HEAVY CHECK MARK {0x2706, 0x2709, prN}, // So [4] TELEPHONE LOCATION SIGN..ENVELOPE {0x270A, 0x270B, prW}, // So [2] RAISED FIST..RAISED HAND {0x270C, 0x2727, prN}, // So [28] VICTORY HAND..WHITE FOUR POINTED STAR {0x2728, 0x2728, prW}, // So SPARKLES {0x2729, 0x273C, prN}, // So [20] STRESS OUTLINED WHITE STAR..OPEN CENTRE TEARDROP-SPOKED ASTERISK {0x273D, 0x273D, prA}, // So HEAVY TEARDROP-SPOKED ASTERISK {0x273E, 0x274B, prN}, // So [14] SIX PETALLED BLACK AND WHITE FLORETTE..HEAVY EIGHT TEARDROP-SPOKED PROPELLER ASTERISK {0x274C, 0x274C, prW}, // So CROSS MARK {0x274D, 0x274D, prN}, // So SHADOWED WHITE CIRCLE {0x274E, 0x274E, prW}, // So NEGATIVE SQUARED CROSS MARK {0x274F, 0x2752, prN}, // So [4] LOWER RIGHT DROP-SHADOWED WHITE SQUARE..UPPER RIGHT SHADOWED WHITE SQUARE {0x2753, 0x2755, prW}, // So [3] BLACK QUESTION MARK ORNAMENT..WHITE EXCLAMATION MARK ORNAMENT {0x2756, 0x2756, prN}, // So BLACK DIAMOND MINUS WHITE X {0x2757, 0x2757, prW}, // So HEAVY EXCLAMATION MARK SYMBOL {0x2758, 0x2767, prN}, // So [16] LIGHT VERTICAL BAR..ROTATED FLORAL HEART BULLET {0x2768, 0x2768, prN}, // Ps MEDIUM LEFT PARENTHESIS ORNAMENT {0x2769, 0x2769, prN}, // Pe MEDIUM RIGHT PARENTHESIS ORNAMENT {0x276A, 0x276A, prN}, // Ps MEDIUM FLATTENED LEFT PARENTHESIS ORNAMENT {0x276B, 0x276B, prN}, // Pe MEDIUM FLATTENED RIGHT PARENTHESIS ORNAMENT {0x276C, 0x276C, prN}, // Ps MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT {0x276D, 0x276D, prN}, // Pe MEDIUM RIGHT-POINTING ANGLE BRACKET ORNAMENT {0x276E, 0x276E, prN}, // Ps HEAVY LEFT-POINTING ANGLE QUOTATION MARK ORNAMENT {0x276F, 0x276F, prN}, // Pe HEAVY RIGHT-POINTING ANGLE QUOTATION MARK ORNAMENT {0x2770, 0x2770, prN}, // Ps HEAVY LEFT-POINTING ANGLE BRACKET ORNAMENT {0x2771, 0x2771, prN}, // Pe HEAVY RIGHT-POINTING ANGLE BRACKET ORNAMENT {0x2772, 0x2772, prN}, // Ps LIGHT LEFT TORTOISE SHELL BRACKET ORNAMENT {0x2773, 0x2773, prN}, // Pe LIGHT RIGHT TORTOISE SHELL BRACKET ORNAMENT {0x2774, 0x2774, prN}, // Ps MEDIUM LEFT CURLY BRACKET ORNAMENT {0x2775, 0x2775, prN}, // Pe MEDIUM RIGHT CURLY BRACKET ORNAMENT {0x2776, 0x277F, prA}, // No [10] DINGBAT NEGATIVE CIRCLED DIGIT ONE..DINGBAT NEGATIVE CIRCLED NUMBER TEN {0x2780, 0x2793, prN}, // No [20] DINGBAT CIRCLED SANS-SERIF DIGIT ONE..DINGBAT NEGATIVE CIRCLED SANS-SERIF NUMBER TEN {0x2794, 0x2794, prN}, // So HEAVY WIDE-HEADED RIGHTWARDS ARROW {0x2795, 0x2797, prW}, // So [3] HEAVY PLUS SIGN..HEAVY DIVISION SIGN {0x2798, 0x27AF, prN}, // So [24] HEAVY SOUTH EAST ARROW..NOTCHED LOWER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW {0x27B0, 0x27B0, prW}, // So CURLY LOOP {0x27B1, 0x27BE, prN}, // So [14] NOTCHED UPPER RIGHT-SHADOWED WHITE RIGHTWARDS ARROW..OPEN-OUTLINED RIGHTWARDS ARROW {0x27BF, 0x27BF, prW}, // So DOUBLE CURLY LOOP {0x27C0, 0x27C4, prN}, // Sm [5] THREE DIMENSIONAL ANGLE..OPEN SUPERSET {0x27C5, 0x27C5, prN}, // Ps LEFT S-SHAPED BAG DELIMITER {0x27C6, 0x27C6, prN}, // Pe RIGHT S-SHAPED BAG DELIMITER {0x27C7, 0x27E5, prN}, // Sm [31] OR WITH DOT INSIDE..WHITE SQUARE WITH RIGHTWARDS TICK {0x27E6, 0x27E6, prNa}, // Ps MATHEMATICAL LEFT WHITE SQUARE BRACKET {0x27E7, 0x27E7, prNa}, // Pe MATHEMATICAL RIGHT WHITE SQUARE BRACKET {0x27E8, 0x27E8, prNa}, // Ps MATHEMATICAL LEFT ANGLE BRACKET {0x27E9, 0x27E9, prNa}, // Pe MATHEMATICAL RIGHT ANGLE BRACKET {0x27EA, 0x27EA, prNa}, // Ps MATHEMATICAL LEFT DOUBLE ANGLE BRACKET {0x27EB, 0x27EB, prNa}, // Pe MATHEMATICAL RIGHT DOUBLE ANGLE BRACKET {0x27EC, 0x27EC, prNa}, // Ps MATHEMATICAL LEFT WHITE TORTOISE SHELL BRACKET {0x27ED, 0x27ED, prNa}, // Pe MATHEMATICAL RIGHT WHITE TORTOISE SHELL BRACKET {0x27EE, 0x27EE, prN}, // Ps MATHEMATICAL LEFT FLATTENED PARENTHESIS {0x27EF, 0x27EF, prN}, // Pe MATHEMATICAL RIGHT FLATTENED PARENTHESIS {0x27F0, 0x27FF, prN}, // Sm [16] UPWARDS QUADRUPLE ARROW..LONG RIGHTWARDS SQUIGGLE ARROW {0x2800, 0x28FF, prN}, // So [256] BRAILLE PATTERN BLANK..BRAILLE PATTERN DOTS-12345678 {0x2900, 0x297F, prN}, // Sm [128] RIGHTWARDS TWO-HEADED ARROW WITH VERTICAL STROKE..DOWN FISH TAIL {0x2980, 0x2982, prN}, // Sm [3] TRIPLE VERTICAL BAR DELIMITER..Z NOTATION TYPE COLON {0x2983, 0x2983, prN}, // Ps LEFT WHITE CURLY BRACKET {0x2984, 0x2984, prN}, // Pe RIGHT WHITE CURLY BRACKET {0x2985, 0x2985, prNa}, // Ps LEFT WHITE PARENTHESIS {0x2986, 0x2986, prNa}, // Pe RIGHT WHITE PARENTHESIS {0x2987, 0x2987, prN}, // Ps Z NOTATION LEFT IMAGE BRACKET {0x2988, 0x2988, prN}, // Pe Z NOTATION RIGHT IMAGE BRACKET {0x2989, 0x2989, prN}, // Ps Z NOTATION LEFT BINDING BRACKET {0x298A, 0x298A, prN}, // Pe Z NOTATION RIGHT BINDING BRACKET {0x298B, 0x298B, prN}, // Ps LEFT SQUARE BRACKET WITH UNDERBAR {0x298C, 0x298C, prN}, // Pe RIGHT SQUARE BRACKET WITH UNDERBAR {0x298D, 0x298D, prN}, // Ps LEFT SQUARE BRACKET WITH TICK IN TOP CORNER {0x298E, 0x298E, prN}, // Pe RIGHT SQUARE BRACKET WITH TICK IN BOTTOM CORNER {0x298F, 0x298F, prN}, // Ps LEFT SQUARE BRACKET WITH TICK IN BOTTOM CORNER {0x2990, 0x2990, prN}, // Pe RIGHT SQUARE BRACKET WITH TICK IN TOP CORNER {0x2991, 0x2991, prN}, // Ps LEFT ANGLE BRACKET WITH DOT {0x2992, 0x2992, prN}, // Pe RIGHT ANGLE BRACKET WITH DOT {0x2993, 0x2993, prN}, // Ps LEFT ARC LESS-THAN BRACKET {0x2994, 0x2994, prN}, // Pe RIGHT ARC GREATER-THAN BRACKET {0x2995, 0x2995, prN}, // Ps DOUBLE LEFT ARC GREATER-THAN BRACKET {0x2996, 0x2996, prN}, // Pe DOUBLE RIGHT ARC LESS-THAN BRACKET {0x2997, 0x2997, prN}, // Ps LEFT BLACK TORTOISE SHELL BRACKET {0x2998, 0x2998, prN}, // Pe RIGHT BLACK TORTOISE SHELL BRACKET {0x2999, 0x29D7, prN}, // Sm [63] DOTTED FENCE..BLACK HOURGLASS {0x29D8, 0x29D8, prN}, // Ps LEFT WIGGLY FENCE {0x29D9, 0x29D9, prN}, // Pe RIGHT WIGGLY FENCE {0x29DA, 0x29DA, prN}, // Ps LEFT DOUBLE WIGGLY FENCE {0x29DB, 0x29DB, prN}, // Pe RIGHT DOUBLE WIGGLY FENCE {0x29DC, 0x29FB, prN}, // Sm [32] INCOMPLETE INFINITY..TRIPLE PLUS {0x29FC, 0x29FC, prN}, // Ps LEFT-POINTING CURVED ANGLE BRACKET {0x29FD, 0x29FD, prN}, // Pe RIGHT-POINTING CURVED ANGLE BRACKET {0x29FE, 0x29FF, prN}, // Sm [2] TINY..MINY {0x2A00, 0x2AFF, prN}, // Sm [256] N-ARY CIRCLED DOT OPERATOR..N-ARY WHITE VERTICAL BAR {0x2B00, 0x2B1A, prN}, // So [27] NORTH EAST WHITE ARROW..DOTTED SQUARE {0x2B1B, 0x2B1C, prW}, // So [2] BLACK LARGE SQUARE..WHITE LARGE SQUARE {0x2B1D, 0x2B2F, prN}, // So [19] BLACK VERY SMALL SQUARE..WHITE VERTICAL ELLIPSE {0x2B30, 0x2B44, prN}, // Sm [21] LEFT ARROW WITH SMALL CIRCLE..RIGHTWARDS ARROW THROUGH SUPERSET {0x2B45, 0x2B46, prN}, // So [2] LEFTWARDS QUADRUPLE ARROW..RIGHTWARDS QUADRUPLE ARROW {0x2B47, 0x2B4C, prN}, // Sm [6] REVERSE TILDE OPERATOR ABOVE RIGHTWARDS ARROW..RIGHTWARDS ARROW ABOVE REVERSE TILDE OPERATOR {0x2B4D, 0x2B4F, prN}, // So [3] DOWNWARDS TRIANGLE-HEADED ZIGZAG ARROW..SHORT BACKSLANTED SOUTH ARROW {0x2B50, 0x2B50, prW}, // So WHITE MEDIUM STAR {0x2B51, 0x2B54, prN}, // So [4] BLACK SMALL STAR..WHITE RIGHT-POINTING PENTAGON {0x2B55, 0x2B55, prW}, // So HEAVY LARGE CIRCLE {0x2B56, 0x2B59, prA}, // So [4] HEAVY OVAL WITH OVAL INSIDE..HEAVY CIRCLED SALTIRE {0x2B5A, 0x2B73, prN}, // So [26] SLANTED NORTH ARROW WITH HOOKED HEAD..DOWNWARDS TRIANGLE-HEADED ARROW TO BAR {0x2B76, 0x2B95, prN}, // So [32] NORTH WEST TRIANGLE-HEADED ARROW TO BAR..RIGHTWARDS BLACK ARROW {0x2B97, 0x2BFF, prN}, // So [105] SYMBOL FOR TYPE A ELECTRONICS..HELLSCHREIBER PAUSE SYMBOL {0x2C00, 0x2C5F, prN}, // L& [96] GLAGOLITIC CAPITAL LETTER AZU..GLAGOLITIC SMALL LETTER CAUDATE CHRIVI {0x2C60, 0x2C7B, prN}, // L& [28] LATIN CAPITAL LETTER L WITH DOUBLE BAR..LATIN LETTER SMALL CAPITAL TURNED E {0x2C7C, 0x2C7D, prN}, // Lm [2] LATIN SUBSCRIPT SMALL LETTER J..MODIFIER LETTER CAPITAL V {0x2C7E, 0x2C7F, prN}, // Lu [2] LATIN CAPITAL LETTER S WITH SWASH TAIL..LATIN CAPITAL LETTER Z WITH SWASH TAIL {0x2C80, 0x2CE4, prN}, // L& [101] COPTIC CAPITAL LETTER ALFA..COPTIC SYMBOL KAI {0x2CE5, 0x2CEA, prN}, // So [6] COPTIC SYMBOL MI RO..COPTIC SYMBOL SHIMA SIMA {0x2CEB, 0x2CEE, prN}, // L& [4] COPTIC CAPITAL LETTER CRYPTOGRAMMIC SHEI..COPTIC SMALL LETTER CRYPTOGRAMMIC GANGIA {0x2CEF, 0x2CF1, prN}, // Mn [3] COPTIC COMBINING NI ABOVE..COPTIC COMBINING SPIRITUS LENIS {0x2CF2, 0x2CF3, prN}, // L& [2] COPTIC CAPITAL LETTER BOHAIRIC KHEI..COPTIC SMALL LETTER BOHAIRIC KHEI {0x2CF9, 0x2CFC, prN}, // Po [4] COPTIC OLD NUBIAN FULL STOP..COPTIC OLD NUBIAN VERSE DIVIDER {0x2CFD, 0x2CFD, prN}, // No COPTIC FRACTION ONE HALF {0x2CFE, 0x2CFF, prN}, // Po [2] COPTIC FULL STOP..COPTIC MORPHOLOGICAL DIVIDER {0x2D00, 0x2D25, prN}, // Ll [38] GEORGIAN SMALL LETTER AN..GEORGIAN SMALL LETTER HOE {0x2D27, 0x2D27, prN}, // Ll GEORGIAN SMALL LETTER YN {0x2D2D, 0x2D2D, prN}, // Ll GEORGIAN SMALL LETTER AEN {0x2D30, 0x2D67, prN}, // Lo [56] TIFINAGH LETTER YA..TIFINAGH LETTER YO {0x2D6F, 0x2D6F, prN}, // Lm TIFINAGH MODIFIER LETTER LABIALIZATION MARK {0x2D70, 0x2D70, prN}, // Po TIFINAGH SEPARATOR MARK {0x2D7F, 0x2D7F, prN}, // Mn TIFINAGH CONSONANT JOINER {0x2D80, 0x2D96, prN}, // Lo [23] ETHIOPIC SYLLABLE LOA..ETHIOPIC SYLLABLE GGWE {0x2DA0, 0x2DA6, prN}, // Lo [7] ETHIOPIC SYLLABLE SSA..ETHIOPIC SYLLABLE SSO {0x2DA8, 0x2DAE, prN}, // Lo [7] ETHIOPIC SYLLABLE CCA..ETHIOPIC SYLLABLE CCO {0x2DB0, 0x2DB6, prN}, // Lo [7] ETHIOPIC SYLLABLE ZZA..ETHIOPIC SYLLABLE ZZO {0x2DB8, 0x2DBE, prN}, // Lo [7] ETHIOPIC SYLLABLE CCHA..ETHIOPIC SYLLABLE CCHO {0x2DC0, 0x2DC6, prN}, // Lo [7] ETHIOPIC SYLLABLE QYA..ETHIOPIC SYLLABLE QYO {0x2DC8, 0x2DCE, prN}, // Lo [7] ETHIOPIC SYLLABLE KYA..ETHIOPIC SYLLABLE KYO {0x2DD0, 0x2DD6, prN}, // Lo [7] ETHIOPIC SYLLABLE XYA..ETHIOPIC SYLLABLE XYO {0x2DD8, 0x2DDE, prN}, // Lo [7] ETHIOPIC SYLLABLE GYA..ETHIOPIC SYLLABLE GYO {0x2DE0, 0x2DFF, prN}, // Mn [32] COMBINING CYRILLIC LETTER BE..COMBINING CYRILLIC LETTER IOTIFIED BIG YUS {0x2E00, 0x2E01, prN}, // Po [2] RIGHT ANGLE SUBSTITUTION MARKER..RIGHT ANGLE DOTTED SUBSTITUTION MARKER {0x2E02, 0x2E02, prN}, // Pi LEFT SUBSTITUTION BRACKET {0x2E03, 0x2E03, prN}, // Pf RIGHT SUBSTITUTION BRACKET {0x2E04, 0x2E04, prN}, // Pi LEFT DOTTED SUBSTITUTION BRACKET {0x2E05, 0x2E05, prN}, // Pf RIGHT DOTTED SUBSTITUTION BRACKET {0x2E06, 0x2E08, prN}, // Po [3] RAISED INTERPOLATION MARKER..DOTTED TRANSPOSITION MARKER {0x2E09, 0x2E09, prN}, // Pi LEFT TRANSPOSITION BRACKET {0x2E0A, 0x2E0A, prN}, // Pf RIGHT TRANSPOSITION BRACKET {0x2E0B, 0x2E0B, prN}, // Po RAISED SQUARE {0x2E0C, 0x2E0C, prN}, // Pi LEFT RAISED OMISSION BRACKET {0x2E0D, 0x2E0D, prN}, // Pf RIGHT RAISED OMISSION BRACKET {0x2E0E, 0x2E16, prN}, // Po [9] EDITORIAL CORONIS..DOTTED RIGHT-POINTING ANGLE {0x2E17, 0x2E17, prN}, // Pd DOUBLE OBLIQUE HYPHEN {0x2E18, 0x2E19, prN}, // Po [2] INVERTED INTERROBANG..PALM BRANCH {0x2E1A, 0x2E1A, prN}, // Pd HYPHEN WITH DIAERESIS {0x2E1B, 0x2E1B, prN}, // Po TILDE WITH RING ABOVE {0x2E1C, 0x2E1C, prN}, // Pi LEFT LOW PARAPHRASE BRACKET {0x2E1D, 0x2E1D, prN}, // Pf RIGHT LOW PARAPHRASE BRACKET {0x2E1E, 0x2E1F, prN}, // Po [2] TILDE WITH DOT ABOVE..TILDE WITH DOT BELOW {0x2E20, 0x2E20, prN}, // Pi LEFT VERTICAL BAR WITH QUILL {0x2E21, 0x2E21, prN}, // Pf RIGHT VERTICAL BAR WITH QUILL {0x2E22, 0x2E22, prN}, // Ps TOP LEFT HALF BRACKET {0x2E23, 0x2E23, prN}, // Pe TOP RIGHT HALF BRACKET {0x2E24, 0x2E24, prN}, // Ps BOTTOM LEFT HALF BRACKET {0x2E25, 0x2E25, prN}, // Pe BOTTOM RIGHT HALF BRACKET {0x2E26, 0x2E26, prN}, // Ps LEFT SIDEWAYS U BRACKET {0x2E27, 0x2E27, prN}, // Pe RIGHT SIDEWAYS U BRACKET {0x2E28, 0x2E28, prN}, // Ps LEFT DOUBLE PARENTHESIS {0x2E29, 0x2E29, prN}, // Pe RIGHT DOUBLE PARENTHESIS {0x2E2A, 0x2E2E, prN}, // Po [5] TWO DOTS OVER ONE DOT PUNCTUATION..REVERSED QUESTION MARK {0x2E2F, 0x2E2F, prN}, // Lm VERTICAL TILDE {0x2E30, 0x2E39, prN}, // Po [10] RING POINT..TOP HALF SECTION SIGN {0x2E3A, 0x2E3B, prN}, // Pd [2] TWO-EM DASH..THREE-EM DASH {0x2E3C, 0x2E3F, prN}, // Po [4] STENOGRAPHIC FULL STOP..CAPITULUM {0x2E40, 0x2E40, prN}, // Pd DOUBLE HYPHEN {0x2E41, 0x2E41, prN}, // Po REVERSED COMMA {0x2E42, 0x2E42, prN}, // Ps DOUBLE LOW-REVERSED-9 QUOTATION MARK {0x2E43, 0x2E4F, prN}, // Po [13] DASH WITH LEFT UPTURN..CORNISH VERSE DIVIDER {0x2E50, 0x2E51, prN}, // So [2] CROSS PATTY WITH RIGHT CROSSBAR..CROSS PATTY WITH LEFT CROSSBAR {0x2E52, 0x2E54, prN}, // Po [3] TIRONIAN SIGN CAPITAL ET..MEDIEVAL QUESTION MARK {0x2E55, 0x2E55, prN}, // Ps LEFT SQUARE BRACKET WITH STROKE {0x2E56, 0x2E56, prN}, // Pe RIGHT SQUARE BRACKET WITH STROKE {0x2E57, 0x2E57, prN}, // Ps LEFT SQUARE BRACKET WITH DOUBLE STROKE {0x2E58, 0x2E58, prN}, // Pe RIGHT SQUARE BRACKET WITH DOUBLE STROKE {0x2E59, 0x2E59, prN}, // Ps TOP HALF LEFT PARENTHESIS {0x2E5A, 0x2E5A, prN}, // Pe TOP HALF RIGHT PARENTHESIS {0x2E5B, 0x2E5B, prN}, // Ps BOTTOM HALF LEFT PARENTHESIS {0x2E5C, 0x2E5C, prN}, // Pe BOTTOM HALF RIGHT PARENTHESIS {0x2E5D, 0x2E5D, prN}, // Pd OBLIQUE HYPHEN {0x2E80, 0x2E99, prW}, // So [26] CJK RADICAL REPEAT..CJK RADICAL RAP {0x2E9B, 0x2EF3, prW}, // So [89] CJK RADICAL CHOKE..CJK RADICAL C-SIMPLIFIED TURTLE {0x2F00, 0x2FD5, prW}, // So [214] KANGXI RADICAL ONE..KANGXI RADICAL FLUTE {0x2FF0, 0x2FFB, prW}, // So [12] IDEOGRAPHIC DESCRIPTION CHARACTER LEFT TO RIGHT..IDEOGRAPHIC DESCRIPTION CHARACTER OVERLAID {0x3000, 0x3000, prF}, // Zs IDEOGRAPHIC SPACE {0x3001, 0x3003, prW}, // Po [3] IDEOGRAPHIC COMMA..DITTO MARK {0x3004, 0x3004, prW}, // So JAPANESE INDUSTRIAL STANDARD SYMBOL {0x3005, 0x3005, prW}, // Lm IDEOGRAPHIC ITERATION MARK {0x3006, 0x3006, prW}, // Lo IDEOGRAPHIC CLOSING MARK {0x3007, 0x3007, prW}, // Nl IDEOGRAPHIC NUMBER ZERO {0x3008, 0x3008, prW}, // Ps LEFT ANGLE BRACKET {0x3009, 0x3009, prW}, // Pe RIGHT ANGLE BRACKET {0x300A, 0x300A, prW}, // Ps LEFT DOUBLE ANGLE BRACKET {0x300B, 0x300B, prW}, // Pe RIGHT DOUBLE ANGLE BRACKET {0x300C, 0x300C, prW}, // Ps LEFT CORNER BRACKET {0x300D, 0x300D, prW}, // Pe RIGHT CORNER BRACKET {0x300E, 0x300E, prW}, // Ps LEFT WHITE CORNER BRACKET {0x300F, 0x300F, prW}, // Pe RIGHT WHITE CORNER BRACKET {0x3010, 0x3010, prW}, // Ps LEFT BLACK LENTICULAR BRACKET {0x3011, 0x3011, prW}, // Pe RIGHT BLACK LENTICULAR BRACKET {0x3012, 0x3013, prW}, // So [2] POSTAL MARK..GETA MARK {0x3014, 0x3014, prW}, // Ps LEFT TORTOISE SHELL BRACKET {0x3015, 0x3015, prW}, // Pe RIGHT TORTOISE SHELL BRACKET {0x3016, 0x3016, prW}, // Ps LEFT WHITE LENTICULAR BRACKET {0x3017, 0x3017, prW}, // Pe RIGHT WHITE LENTICULAR BRACKET {0x3018, 0x3018, prW}, // Ps LEFT WHITE TORTOISE SHELL BRACKET {0x3019, 0x3019, prW}, // Pe RIGHT WHITE TORTOISE SHELL BRACKET {0x301A, 0x301A, prW}, // Ps LEFT WHITE SQUARE BRACKET {0x301B, 0x301B, prW}, // Pe RIGHT WHITE SQUARE BRACKET {0x301C, 0x301C, prW}, // Pd WAVE DASH {0x301D, 0x301D, prW}, // Ps REVERSED DOUBLE PRIME QUOTATION MARK {0x301E, 0x301F, prW}, // Pe [2] DOUBLE PRIME QUOTATION MARK..LOW DOUBLE PRIME QUOTATION MARK {0x3020, 0x3020, prW}, // So POSTAL MARK FACE {0x3021, 0x3029, prW}, // Nl [9] HANGZHOU NUMERAL ONE..HANGZHOU NUMERAL NINE {0x302A, 0x302D, prW}, // Mn [4] IDEOGRAPHIC LEVEL TONE MARK..IDEOGRAPHIC ENTERING TONE MARK {0x302E, 0x302F, prW}, // Mc [2] HANGUL SINGLE DOT TONE MARK..HANGUL DOUBLE DOT TONE MARK {0x3030, 0x3030, prW}, // Pd WAVY DASH {0x3031, 0x3035, prW}, // Lm [5] VERTICAL KANA REPEAT MARK..VERTICAL KANA REPEAT MARK LOWER HALF {0x3036, 0x3037, prW}, // So [2] CIRCLED POSTAL MARK..IDEOGRAPHIC TELEGRAPH LINE FEED SEPARATOR SYMBOL {0x3038, 0x303A, prW}, // Nl [3] HANGZHOU NUMERAL TEN..HANGZHOU NUMERAL THIRTY {0x303B, 0x303B, prW}, // Lm VERTICAL IDEOGRAPHIC ITERATION MARK {0x303C, 0x303C, prW}, // Lo MASU MARK {0x303D, 0x303D, prW}, // Po PART ALTERNATION MARK {0x303E, 0x303E, prW}, // So IDEOGRAPHIC VARIATION INDICATOR {0x303F, 0x303F, prN}, // So IDEOGRAPHIC HALF FILL SPACE {0x3041, 0x3096, prW}, // Lo [86] HIRAGANA LETTER SMALL A..HIRAGANA LETTER SMALL KE {0x3099, 0x309A, prW}, // Mn [2] COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK {0x309B, 0x309C, prW}, // Sk [2] KATAKANA-HIRAGANA VOICED SOUND MARK..KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK {0x309D, 0x309E, prW}, // Lm [2] HIRAGANA ITERATION MARK..HIRAGANA VOICED ITERATION MARK {0x309F, 0x309F, prW}, // Lo HIRAGANA DIGRAPH YORI {0x30A0, 0x30A0, prW}, // Pd KATAKANA-HIRAGANA DOUBLE HYPHEN {0x30A1, 0x30FA, prW}, // Lo [90] KATAKANA LETTER SMALL A..KATAKANA LETTER VO {0x30FB, 0x30FB, prW}, // Po KATAKANA MIDDLE DOT {0x30FC, 0x30FE, prW}, // Lm [3] KATAKANA-HIRAGANA PROLONGED SOUND MARK..KATAKANA VOICED ITERATION MARK {0x30FF, 0x30FF, prW}, // Lo KATAKANA DIGRAPH KOTO {0x3105, 0x312F, prW}, // Lo [43] BOPOMOFO LETTER B..BOPOMOFO LETTER NN {0x3131, 0x318E, prW}, // Lo [94] HANGUL LETTER KIYEOK..HANGUL LETTER ARAEAE {0x3190, 0x3191, prW}, // So [2] IDEOGRAPHIC ANNOTATION LINKING MARK..IDEOGRAPHIC ANNOTATION REVERSE MARK {0x3192, 0x3195, prW}, // No [4] IDEOGRAPHIC ANNOTATION ONE MARK..IDEOGRAPHIC ANNOTATION FOUR MARK {0x3196, 0x319F, prW}, // So [10] IDEOGRAPHIC ANNOTATION TOP MARK..IDEOGRAPHIC ANNOTATION MAN MARK {0x31A0, 0x31BF, prW}, // Lo [32] BOPOMOFO LETTER BU..BOPOMOFO LETTER AH {0x31C0, 0x31E3, prW}, // So [36] CJK STROKE T..CJK STROKE Q {0x31F0, 0x31FF, prW}, // Lo [16] KATAKANA LETTER SMALL KU..KATAKANA LETTER SMALL RO {0x3200, 0x321E, prW}, // So [31] PARENTHESIZED HANGUL KIYEOK..PARENTHESIZED KOREAN CHARACTER O HU {0x3220, 0x3229, prW}, // No [10] PARENTHESIZED IDEOGRAPH ONE..PARENTHESIZED IDEOGRAPH TEN {0x322A, 0x3247, prW}, // So [30] PARENTHESIZED IDEOGRAPH MOON..CIRCLED IDEOGRAPH KOTO {0x3248, 0x324F, prA}, // No [8] CIRCLED NUMBER TEN ON BLACK SQUARE..CIRCLED NUMBER EIGHTY ON BLACK SQUARE {0x3250, 0x3250, prW}, // So PARTNERSHIP SIGN {0x3251, 0x325F, prW}, // No [15] CIRCLED NUMBER TWENTY ONE..CIRCLED NUMBER THIRTY FIVE {0x3260, 0x327F, prW}, // So [32] CIRCLED HANGUL KIYEOK..KOREAN STANDARD SYMBOL {0x3280, 0x3289, prW}, // No [10] CIRCLED IDEOGRAPH ONE..CIRCLED IDEOGRAPH TEN {0x328A, 0x32B0, prW}, // So [39] CIRCLED IDEOGRAPH MOON..CIRCLED IDEOGRAPH NIGHT {0x32B1, 0x32BF, prW}, // No [15] CIRCLED NUMBER THIRTY SIX..CIRCLED NUMBER FIFTY {0x32C0, 0x32FF, prW}, // So [64] IDEOGRAPHIC TELEGRAPH SYMBOL FOR JANUARY..SQUARE ERA NAME REIWA {0x3300, 0x33FF, prW}, // So [256] SQUARE APAATO..SQUARE GAL {0x3400, 0x4DBF, prW}, // Lo [6592] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DBF {0x4DC0, 0x4DFF, prN}, // So [64] HEXAGRAM FOR THE CREATIVE HEAVEN..HEXAGRAM FOR BEFORE COMPLETION {0x4E00, 0x9FFF, prW}, // Lo [20992] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FFF {0xA000, 0xA014, prW}, // Lo [21] YI SYLLABLE IT..YI SYLLABLE E {0xA015, 0xA015, prW}, // Lm YI SYLLABLE WU {0xA016, 0xA48C, prW}, // Lo [1143] YI SYLLABLE BIT..YI SYLLABLE YYR {0xA490, 0xA4C6, prW}, // So [55] YI RADICAL QOT..YI RADICAL KE {0xA4D0, 0xA4F7, prN}, // Lo [40] LISU LETTER BA..LISU LETTER OE {0xA4F8, 0xA4FD, prN}, // Lm [6] LISU LETTER TONE MYA TI..LISU LETTER TONE MYA JEU {0xA4FE, 0xA4FF, prN}, // Po [2] LISU PUNCTUATION COMMA..LISU PUNCTUATION FULL STOP {0xA500, 0xA60B, prN}, // Lo [268] VAI SYLLABLE EE..VAI SYLLABLE NG {0xA60C, 0xA60C, prN}, // Lm VAI SYLLABLE LENGTHENER {0xA60D, 0xA60F, prN}, // Po [3] VAI COMMA..VAI QUESTION MARK {0xA610, 0xA61F, prN}, // Lo [16] VAI SYLLABLE NDOLE FA..VAI SYMBOL JONG {0xA620, 0xA629, prN}, // Nd [10] VAI DIGIT ZERO..VAI DIGIT NINE {0xA62A, 0xA62B, prN}, // Lo [2] VAI SYLLABLE NDOLE MA..VAI SYLLABLE NDOLE DO {0xA640, 0xA66D, prN}, // L& [46] CYRILLIC CAPITAL LETTER ZEMLYA..CYRILLIC SMALL LETTER DOUBLE MONOCULAR O {0xA66E, 0xA66E, prN}, // Lo CYRILLIC LETTER MULTIOCULAR O {0xA66F, 0xA66F, prN}, // Mn COMBINING CYRILLIC VZMET {0xA670, 0xA672, prN}, // Me [3] COMBINING CYRILLIC TEN MILLIONS SIGN..COMBINING CYRILLIC THOUSAND MILLIONS SIGN {0xA673, 0xA673, prN}, // Po SLAVONIC ASTERISK {0xA674, 0xA67D, prN}, // Mn [10] COMBINING CYRILLIC LETTER UKRAINIAN IE..COMBINING CYRILLIC PAYEROK {0xA67E, 0xA67E, prN}, // Po CYRILLIC KAVYKA {0xA67F, 0xA67F, prN}, // Lm CYRILLIC PAYEROK {0xA680, 0xA69B, prN}, // L& [28] CYRILLIC CAPITAL LETTER DWE..CYRILLIC SMALL LETTER CROSSED O {0xA69C, 0xA69D, prN}, // Lm [2] MODIFIER LETTER CYRILLIC HARD SIGN..MODIFIER LETTER CYRILLIC SOFT SIGN {0xA69E, 0xA69F, prN}, // Mn [2] COMBINING CYRILLIC LETTER EF..COMBINING CYRILLIC LETTER IOTIFIED E {0xA6A0, 0xA6E5, prN}, // Lo [70] BAMUM LETTER A..BAMUM LETTER KI {0xA6E6, 0xA6EF, prN}, // Nl [10] BAMUM LETTER MO..BAMUM LETTER KOGHOM {0xA6F0, 0xA6F1, prN}, // Mn [2] BAMUM COMBINING MARK KOQNDON..BAMUM COMBINING MARK TUKWENTIS {0xA6F2, 0xA6F7, prN}, // Po [6] BAMUM NJAEMLI..BAMUM QUESTION MARK {0xA700, 0xA716, prN}, // Sk [23] MODIFIER LETTER CHINESE TONE YIN PING..MODIFIER LETTER EXTRA-LOW LEFT-STEM TONE BAR {0xA717, 0xA71F, prN}, // Lm [9] MODIFIER LETTER DOT VERTICAL BAR..MODIFIER LETTER LOW INVERTED EXCLAMATION MARK {0xA720, 0xA721, prN}, // Sk [2] MODIFIER LETTER STRESS AND HIGH TONE..MODIFIER LETTER STRESS AND LOW TONE {0xA722, 0xA76F, prN}, // L& [78] LATIN CAPITAL LETTER EGYPTOLOGICAL ALEF..LATIN SMALL LETTER CON {0xA770, 0xA770, prN}, // Lm MODIFIER LETTER US {0xA771, 0xA787, prN}, // L& [23] LATIN SMALL LETTER DUM..LATIN SMALL LETTER INSULAR T {0xA788, 0xA788, prN}, // Lm MODIFIER LETTER LOW CIRCUMFLEX ACCENT {0xA789, 0xA78A, prN}, // Sk [2] MODIFIER LETTER COLON..MODIFIER LETTER SHORT EQUALS SIGN {0xA78B, 0xA78E, prN}, // L& [4] LATIN CAPITAL LETTER SALTILLO..LATIN SMALL LETTER L WITH RETROFLEX HOOK AND BELT {0xA78F, 0xA78F, prN}, // Lo LATIN LETTER SINOLOGICAL DOT {0xA790, 0xA7CA, prN}, // L& [59] LATIN CAPITAL LETTER N WITH DESCENDER..LATIN SMALL LETTER S WITH SHORT STROKE OVERLAY {0xA7D0, 0xA7D1, prN}, // L& [2] LATIN CAPITAL LETTER CLOSED INSULAR G..LATIN SMALL LETTER CLOSED INSULAR G {0xA7D3, 0xA7D3, prN}, // Ll LATIN SMALL LETTER DOUBLE THORN {0xA7D5, 0xA7D9, prN}, // L& [5] LATIN SMALL LETTER DOUBLE WYNN..LATIN SMALL LETTER SIGMOID S {0xA7F2, 0xA7F4, prN}, // Lm [3] MODIFIER LETTER CAPITAL C..MODIFIER LETTER CAPITAL Q {0xA7F5, 0xA7F6, prN}, // L& [2] LATIN CAPITAL LETTER REVERSED HALF H..LATIN SMALL LETTER REVERSED HALF H {0xA7F7, 0xA7F7, prN}, // Lo LATIN EPIGRAPHIC LETTER SIDEWAYS I {0xA7F8, 0xA7F9, prN}, // Lm [2] MODIFIER LETTER CAPITAL H WITH STROKE..MODIFIER LETTER SMALL LIGATURE OE {0xA7FA, 0xA7FA, prN}, // Ll LATIN LETTER SMALL CAPITAL TURNED M {0xA7FB, 0xA7FF, prN}, // Lo [5] LATIN EPIGRAPHIC LETTER REVERSED F..LATIN EPIGRAPHIC LETTER ARCHAIC M {0xA800, 0xA801, prN}, // Lo [2] SYLOTI NAGRI LETTER A..SYLOTI NAGRI LETTER I {0xA802, 0xA802, prN}, // Mn SYLOTI NAGRI SIGN DVISVARA {0xA803, 0xA805, prN}, // Lo [3] SYLOTI NAGRI LETTER U..SYLOTI NAGRI LETTER O {0xA806, 0xA806, prN}, // Mn SYLOTI NAGRI SIGN HASANTA {0xA807, 0xA80A, prN}, // Lo [4] SYLOTI NAGRI LETTER KO..SYLOTI NAGRI LETTER GHO {0xA80B, 0xA80B, prN}, // Mn SYLOTI NAGRI SIGN ANUSVARA {0xA80C, 0xA822, prN}, // Lo [23] SYLOTI NAGRI LETTER CO..SYLOTI NAGRI LETTER HO {0xA823, 0xA824, prN}, // Mc [2] SYLOTI NAGRI VOWEL SIGN A..SYLOTI NAGRI VOWEL SIGN I {0xA825, 0xA826, prN}, // Mn [2] SYLOTI NAGRI VOWEL SIGN U..SYLOTI NAGRI VOWEL SIGN E {0xA827, 0xA827, prN}, // Mc SYLOTI NAGRI VOWEL SIGN OO {0xA828, 0xA82B, prN}, // So [4] SYLOTI NAGRI POETRY MARK-1..SYLOTI NAGRI POETRY MARK-4 {0xA82C, 0xA82C, prN}, // Mn SYLOTI NAGRI SIGN ALTERNATE HASANTA {0xA830, 0xA835, prN}, // No [6] NORTH INDIC FRACTION ONE QUARTER..NORTH INDIC FRACTION THREE SIXTEENTHS {0xA836, 0xA837, prN}, // So [2] NORTH INDIC QUARTER MARK..NORTH INDIC PLACEHOLDER MARK {0xA838, 0xA838, prN}, // Sc NORTH INDIC RUPEE MARK {0xA839, 0xA839, prN}, // So NORTH INDIC QUANTITY MARK {0xA840, 0xA873, prN}, // Lo [52] PHAGS-PA LETTER KA..PHAGS-PA LETTER CANDRABINDU {0xA874, 0xA877, prN}, // Po [4] PHAGS-PA SINGLE HEAD MARK..PHAGS-PA MARK DOUBLE SHAD {0xA880, 0xA881, prN}, // Mc [2] SAURASHTRA SIGN ANUSVARA..SAURASHTRA SIGN VISARGA {0xA882, 0xA8B3, prN}, // Lo [50] SAURASHTRA LETTER A..SAURASHTRA LETTER LLA {0xA8B4, 0xA8C3, prN}, // Mc [16] SAURASHTRA CONSONANT SIGN HAARU..SAURASHTRA VOWEL SIGN AU {0xA8C4, 0xA8C5, prN}, // Mn [2] SAURASHTRA SIGN VIRAMA..SAURASHTRA SIGN CANDRABINDU {0xA8CE, 0xA8CF, prN}, // Po [2] SAURASHTRA DANDA..SAURASHTRA DOUBLE DANDA {0xA8D0, 0xA8D9, prN}, // Nd [10] SAURASHTRA DIGIT ZERO..SAURASHTRA DIGIT NINE {0xA8E0, 0xA8F1, prN}, // Mn [18] COMBINING DEVANAGARI DIGIT ZERO..COMBINING DEVANAGARI SIGN AVAGRAHA {0xA8F2, 0xA8F7, prN}, // Lo [6] DEVANAGARI SIGN SPACING CANDRABINDU..DEVANAGARI SIGN CANDRABINDU AVAGRAHA {0xA8F8, 0xA8FA, prN}, // Po [3] DEVANAGARI SIGN PUSHPIKA..DEVANAGARI CARET {0xA8FB, 0xA8FB, prN}, // Lo DEVANAGARI HEADSTROKE {0xA8FC, 0xA8FC, prN}, // Po DEVANAGARI SIGN SIDDHAM {0xA8FD, 0xA8FE, prN}, // Lo [2] DEVANAGARI JAIN OM..DEVANAGARI LETTER AY {0xA8FF, 0xA8FF, prN}, // Mn DEVANAGARI VOWEL SIGN AY {0xA900, 0xA909, prN}, // Nd [10] KAYAH LI DIGIT ZERO..KAYAH LI DIGIT NINE {0xA90A, 0xA925, prN}, // Lo [28] KAYAH LI LETTER KA..KAYAH LI LETTER OO {0xA926, 0xA92D, prN}, // Mn [8] KAYAH LI VOWEL UE..KAYAH LI TONE CALYA PLOPHU {0xA92E, 0xA92F, prN}, // Po [2] KAYAH LI SIGN CWI..KAYAH LI SIGN SHYA {0xA930, 0xA946, prN}, // Lo [23] REJANG LETTER KA..REJANG LETTER A {0xA947, 0xA951, prN}, // Mn [11] REJANG VOWEL SIGN I..REJANG CONSONANT SIGN R {0xA952, 0xA953, prN}, // Mc [2] REJANG CONSONANT SIGN H..REJANG VIRAMA {0xA95F, 0xA95F, prN}, // Po REJANG SECTION MARK {0xA960, 0xA97C, prW}, // Lo [29] HANGUL CHOSEONG TIKEUT-MIEUM..HANGUL CHOSEONG SSANGYEORINHIEUH {0xA980, 0xA982, prN}, // Mn [3] JAVANESE SIGN PANYANGGA..JAVANESE SIGN LAYAR {0xA983, 0xA983, prN}, // Mc JAVANESE SIGN WIGNYAN {0xA984, 0xA9B2, prN}, // Lo [47] JAVANESE LETTER A..JAVANESE LETTER HA {0xA9B3, 0xA9B3, prN}, // Mn JAVANESE SIGN CECAK TELU {0xA9B4, 0xA9B5, prN}, // Mc [2] JAVANESE VOWEL SIGN TARUNG..JAVANESE VOWEL SIGN TOLONG {0xA9B6, 0xA9B9, prN}, // Mn [4] JAVANESE VOWEL SIGN WULU..JAVANESE VOWEL SIGN SUKU MENDUT {0xA9BA, 0xA9BB, prN}, // Mc [2] JAVANESE VOWEL SIGN TALING..JAVANESE VOWEL SIGN DIRGA MURE {0xA9BC, 0xA9BD, prN}, // Mn [2] JAVANESE VOWEL SIGN PEPET..JAVANESE CONSONANT SIGN KERET {0xA9BE, 0xA9C0, prN}, // Mc [3] JAVANESE CONSONANT SIGN PENGKAL..JAVANESE PANGKON {0xA9C1, 0xA9CD, prN}, // Po [13] JAVANESE LEFT RERENGGAN..JAVANESE TURNED PADA PISELEH {0xA9CF, 0xA9CF, prN}, // Lm JAVANESE PANGRANGKEP {0xA9D0, 0xA9D9, prN}, // Nd [10] JAVANESE DIGIT ZERO..JAVANESE DIGIT NINE {0xA9DE, 0xA9DF, prN}, // Po [2] JAVANESE PADA TIRTA TUMETES..JAVANESE PADA ISEN-ISEN {0xA9E0, 0xA9E4, prN}, // Lo [5] MYANMAR LETTER SHAN GHA..MYANMAR LETTER SHAN BHA {0xA9E5, 0xA9E5, prN}, // Mn MYANMAR SIGN SHAN SAW {0xA9E6, 0xA9E6, prN}, // Lm MYANMAR MODIFIER LETTER SHAN REDUPLICATION {0xA9E7, 0xA9EF, prN}, // Lo [9] MYANMAR LETTER TAI LAING NYA..MYANMAR LETTER TAI LAING NNA {0xA9F0, 0xA9F9, prN}, // Nd [10] MYANMAR TAI LAING DIGIT ZERO..MYANMAR TAI LAING DIGIT NINE {0xA9FA, 0xA9FE, prN}, // Lo [5] MYANMAR LETTER TAI LAING LLA..MYANMAR LETTER TAI LAING BHA {0xAA00, 0xAA28, prN}, // Lo [41] CHAM LETTER A..CHAM LETTER HA {0xAA29, 0xAA2E, prN}, // Mn [6] CHAM VOWEL SIGN AA..CHAM VOWEL SIGN OE {0xAA2F, 0xAA30, prN}, // Mc [2] CHAM VOWEL SIGN O..CHAM VOWEL SIGN AI {0xAA31, 0xAA32, prN}, // Mn [2] CHAM VOWEL SIGN AU..CHAM VOWEL SIGN UE {0xAA33, 0xAA34, prN}, // Mc [2] CHAM CONSONANT SIGN YA..CHAM CONSONANT SIGN RA {0xAA35, 0xAA36, prN}, // Mn [2] CHAM CONSONANT SIGN LA..CHAM CONSONANT SIGN WA {0xAA40, 0xAA42, prN}, // Lo [3] CHAM LETTER FINAL K..CHAM LETTER FINAL NG {0xAA43, 0xAA43, prN}, // Mn CHAM CONSONANT SIGN FINAL NG {0xAA44, 0xAA4B, prN}, // Lo [8] CHAM LETTER FINAL CH..CHAM LETTER FINAL SS {0xAA4C, 0xAA4C, prN}, // Mn CHAM CONSONANT SIGN FINAL M {0xAA4D, 0xAA4D, prN}, // Mc CHAM CONSONANT SIGN FINAL H {0xAA50, 0xAA59, prN}, // Nd [10] CHAM DIGIT ZERO..CHAM DIGIT NINE {0xAA5C, 0xAA5F, prN}, // Po [4] CHAM PUNCTUATION SPIRAL..CHAM PUNCTUATION TRIPLE DANDA {0xAA60, 0xAA6F, prN}, // Lo [16] MYANMAR LETTER KHAMTI GA..MYANMAR LETTER KHAMTI FA {0xAA70, 0xAA70, prN}, // Lm MYANMAR MODIFIER LETTER KHAMTI REDUPLICATION {0xAA71, 0xAA76, prN}, // Lo [6] MYANMAR LETTER KHAMTI XA..MYANMAR LOGOGRAM KHAMTI HM {0xAA77, 0xAA79, prN}, // So [3] MYANMAR SYMBOL AITON EXCLAMATION..MYANMAR SYMBOL AITON TWO {0xAA7A, 0xAA7A, prN}, // Lo MYANMAR LETTER AITON RA {0xAA7B, 0xAA7B, prN}, // Mc MYANMAR SIGN PAO KAREN TONE {0xAA7C, 0xAA7C, prN}, // Mn MYANMAR SIGN TAI LAING TONE-2 {0xAA7D, 0xAA7D, prN}, // Mc MYANMAR SIGN TAI LAING TONE-5 {0xAA7E, 0xAA7F, prN}, // Lo [2] MYANMAR LETTER SHWE PALAUNG CHA..MYANMAR LETTER SHWE PALAUNG SHA {0xAA80, 0xAAAF, prN}, // Lo [48] TAI VIET LETTER LOW KO..TAI VIET LETTER HIGH O {0xAAB0, 0xAAB0, prN}, // Mn TAI VIET MAI KANG {0xAAB1, 0xAAB1, prN}, // Lo TAI VIET VOWEL AA {0xAAB2, 0xAAB4, prN}, // Mn [3] TAI VIET VOWEL I..TAI VIET VOWEL U {0xAAB5, 0xAAB6, prN}, // Lo [2] TAI VIET VOWEL E..TAI VIET VOWEL O {0xAAB7, 0xAAB8, prN}, // Mn [2] TAI VIET MAI KHIT..TAI VIET VOWEL IA {0xAAB9, 0xAABD, prN}, // Lo [5] TAI VIET VOWEL UEA..TAI VIET VOWEL AN {0xAABE, 0xAABF, prN}, // Mn [2] TAI VIET VOWEL AM..TAI VIET TONE MAI EK {0xAAC0, 0xAAC0, prN}, // Lo TAI VIET TONE MAI NUENG {0xAAC1, 0xAAC1, prN}, // Mn TAI VIET TONE MAI THO {0xAAC2, 0xAAC2, prN}, // Lo TAI VIET TONE MAI SONG {0xAADB, 0xAADC, prN}, // Lo [2] TAI VIET SYMBOL KON..TAI VIET SYMBOL NUENG {0xAADD, 0xAADD, prN}, // Lm TAI VIET SYMBOL SAM {0xAADE, 0xAADF, prN}, // Po [2] TAI VIET SYMBOL HO HOI..TAI VIET SYMBOL KOI KOI {0xAAE0, 0xAAEA, prN}, // Lo [11] MEETEI MAYEK LETTER E..MEETEI MAYEK LETTER SSA {0xAAEB, 0xAAEB, prN}, // Mc MEETEI MAYEK VOWEL SIGN II {0xAAEC, 0xAAED, prN}, // Mn [2] MEETEI MAYEK VOWEL SIGN UU..MEETEI MAYEK VOWEL SIGN AAI {0xAAEE, 0xAAEF, prN}, // Mc [2] MEETEI MAYEK VOWEL SIGN AU..MEETEI MAYEK VOWEL SIGN AAU {0xAAF0, 0xAAF1, prN}, // Po [2] MEETEI MAYEK CHEIKHAN..MEETEI MAYEK AHANG KHUDAM {0xAAF2, 0xAAF2, prN}, // Lo MEETEI MAYEK ANJI {0xAAF3, 0xAAF4, prN}, // Lm [2] MEETEI MAYEK SYLLABLE REPETITION MARK..MEETEI MAYEK WORD REPETITION MARK {0xAAF5, 0xAAF5, prN}, // Mc MEETEI MAYEK VOWEL SIGN VISARGA {0xAAF6, 0xAAF6, prN}, // Mn MEETEI MAYEK VIRAMA {0xAB01, 0xAB06, prN}, // Lo [6] ETHIOPIC SYLLABLE TTHU..ETHIOPIC SYLLABLE TTHO {0xAB09, 0xAB0E, prN}, // Lo [6] ETHIOPIC SYLLABLE DDHU..ETHIOPIC SYLLABLE DDHO {0xAB11, 0xAB16, prN}, // Lo [6] ETHIOPIC SYLLABLE DZU..ETHIOPIC SYLLABLE DZO {0xAB20, 0xAB26, prN}, // Lo [7] ETHIOPIC SYLLABLE CCHHA..ETHIOPIC SYLLABLE CCHHO {0xAB28, 0xAB2E, prN}, // Lo [7] ETHIOPIC SYLLABLE BBA..ETHIOPIC SYLLABLE BBO {0xAB30, 0xAB5A, prN}, // Ll [43] LATIN SMALL LETTER BARRED ALPHA..LATIN SMALL LETTER Y WITH SHORT RIGHT LEG {0xAB5B, 0xAB5B, prN}, // Sk MODIFIER BREVE WITH INVERTED BREVE {0xAB5C, 0xAB5F, prN}, // Lm [4] MODIFIER LETTER SMALL HENG..MODIFIER LETTER SMALL U WITH LEFT HOOK {0xAB60, 0xAB68, prN}, // Ll [9] LATIN SMALL LETTER SAKHA YAT..LATIN SMALL LETTER TURNED R WITH MIDDLE TILDE {0xAB69, 0xAB69, prN}, // Lm MODIFIER LETTER SMALL TURNED W {0xAB6A, 0xAB6B, prN}, // Sk [2] MODIFIER LETTER LEFT TACK..MODIFIER LETTER RIGHT TACK {0xAB70, 0xABBF, prN}, // Ll [80] CHEROKEE SMALL LETTER A..CHEROKEE SMALL LETTER YA {0xABC0, 0xABE2, prN}, // Lo [35] MEETEI MAYEK LETTER KOK..MEETEI MAYEK LETTER I LONSUM {0xABE3, 0xABE4, prN}, // Mc [2] MEETEI MAYEK VOWEL SIGN ONAP..MEETEI MAYEK VOWEL SIGN INAP {0xABE5, 0xABE5, prN}, // Mn MEETEI MAYEK VOWEL SIGN ANAP {0xABE6, 0xABE7, prN}, // Mc [2] MEETEI MAYEK VOWEL SIGN YENAP..MEETEI MAYEK VOWEL SIGN SOUNAP {0xABE8, 0xABE8, prN}, // Mn MEETEI MAYEK VOWEL SIGN UNAP {0xABE9, 0xABEA, prN}, // Mc [2] MEETEI MAYEK VOWEL SIGN CHEINAP..MEETEI MAYEK VOWEL SIGN NUNG {0xABEB, 0xABEB, prN}, // Po MEETEI MAYEK CHEIKHEI {0xABEC, 0xABEC, prN}, // Mc MEETEI MAYEK LUM IYEK {0xABED, 0xABED, prN}, // Mn MEETEI MAYEK APUN IYEK {0xABF0, 0xABF9, prN}, // Nd [10] MEETEI MAYEK DIGIT ZERO..MEETEI MAYEK DIGIT NINE {0xAC00, 0xD7A3, prW}, // Lo [11172] HANGUL SYLLABLE GA..HANGUL SYLLABLE HIH {0xD7B0, 0xD7C6, prN}, // Lo [23] HANGUL JUNGSEONG O-YEO..HANGUL JUNGSEONG ARAEA-E {0xD7CB, 0xD7FB, prN}, // Lo [49] HANGUL JONGSEONG NIEUN-RIEUL..HANGUL JONGSEONG PHIEUPH-THIEUTH {0xD800, 0xDB7F, prN}, // Cs [896] .. {0xDB80, 0xDBFF, prN}, // Cs [128] .. {0xDC00, 0xDFFF, prN}, // Cs [1024] .. {0xE000, 0xF8FF, prA}, // Co [6400] .. {0xF900, 0xFA6D, prW}, // Lo [366] CJK COMPATIBILITY IDEOGRAPH-F900..CJK COMPATIBILITY IDEOGRAPH-FA6D {0xFA6E, 0xFA6F, prW}, // Cn [2] .. {0xFA70, 0xFAD9, prW}, // Lo [106] CJK COMPATIBILITY IDEOGRAPH-FA70..CJK COMPATIBILITY IDEOGRAPH-FAD9 {0xFADA, 0xFAFF, prW}, // Cn [38] .. {0xFB00, 0xFB06, prN}, // Ll [7] LATIN SMALL LIGATURE FF..LATIN SMALL LIGATURE ST {0xFB13, 0xFB17, prN}, // Ll [5] ARMENIAN SMALL LIGATURE MEN NOW..ARMENIAN SMALL LIGATURE MEN XEH {0xFB1D, 0xFB1D, prN}, // Lo HEBREW LETTER YOD WITH HIRIQ {0xFB1E, 0xFB1E, prN}, // Mn HEBREW POINT JUDEO-SPANISH VARIKA {0xFB1F, 0xFB28, prN}, // Lo [10] HEBREW LIGATURE YIDDISH YOD YOD PATAH..HEBREW LETTER WIDE TAV {0xFB29, 0xFB29, prN}, // Sm HEBREW LETTER ALTERNATIVE PLUS SIGN {0xFB2A, 0xFB36, prN}, // Lo [13] HEBREW LETTER SHIN WITH SHIN DOT..HEBREW LETTER ZAYIN WITH DAGESH {0xFB38, 0xFB3C, prN}, // Lo [5] HEBREW LETTER TET WITH DAGESH..HEBREW LETTER LAMED WITH DAGESH {0xFB3E, 0xFB3E, prN}, // Lo HEBREW LETTER MEM WITH DAGESH {0xFB40, 0xFB41, prN}, // Lo [2] HEBREW LETTER NUN WITH DAGESH..HEBREW LETTER SAMEKH WITH DAGESH {0xFB43, 0xFB44, prN}, // Lo [2] HEBREW LETTER FINAL PE WITH DAGESH..HEBREW LETTER PE WITH DAGESH {0xFB46, 0xFB4F, prN}, // Lo [10] HEBREW LETTER TSADI WITH DAGESH..HEBREW LIGATURE ALEF LAMED {0xFB50, 0xFBB1, prN}, // Lo [98] ARABIC LETTER ALEF WASLA ISOLATED FORM..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE FINAL FORM {0xFBB2, 0xFBC2, prN}, // Sk [17] ARABIC SYMBOL DOT ABOVE..ARABIC SYMBOL WASLA ABOVE {0xFBD3, 0xFD3D, prN}, // Lo [363] ARABIC LETTER NG ISOLATED FORM..ARABIC LIGATURE ALEF WITH FATHATAN ISOLATED FORM {0xFD3E, 0xFD3E, prN}, // Pe ORNATE LEFT PARENTHESIS {0xFD3F, 0xFD3F, prN}, // Ps ORNATE RIGHT PARENTHESIS {0xFD40, 0xFD4F, prN}, // So [16] ARABIC LIGATURE RAHIMAHU ALLAAH..ARABIC LIGATURE RAHIMAHUM ALLAAH {0xFD50, 0xFD8F, prN}, // Lo [64] ARABIC LIGATURE TEH WITH JEEM WITH MEEM INITIAL FORM..ARABIC LIGATURE MEEM WITH KHAH WITH MEEM INITIAL FORM {0xFD92, 0xFDC7, prN}, // Lo [54] ARABIC LIGATURE MEEM WITH JEEM WITH KHAH INITIAL FORM..ARABIC LIGATURE NOON WITH JEEM WITH YEH FINAL FORM {0xFDCF, 0xFDCF, prN}, // So ARABIC LIGATURE SALAAMUHU ALAYNAA {0xFDF0, 0xFDFB, prN}, // Lo [12] ARABIC LIGATURE SALLA USED AS KORANIC STOP SIGN ISOLATED FORM..ARABIC LIGATURE JALLAJALALOUHOU {0xFDFC, 0xFDFC, prN}, // Sc RIAL SIGN {0xFDFD, 0xFDFF, prN}, // So [3] ARABIC LIGATURE BISMILLAH AR-RAHMAN AR-RAHEEM..ARABIC LIGATURE AZZA WA JALL {0xFE00, 0xFE0F, prA}, // Mn [16] VARIATION SELECTOR-1..VARIATION SELECTOR-16 {0xFE10, 0xFE16, prW}, // Po [7] PRESENTATION FORM FOR VERTICAL COMMA..PRESENTATION FORM FOR VERTICAL QUESTION MARK {0xFE17, 0xFE17, prW}, // Ps PRESENTATION FORM FOR VERTICAL LEFT WHITE LENTICULAR BRACKET {0xFE18, 0xFE18, prW}, // Pe PRESENTATION FORM FOR VERTICAL RIGHT WHITE LENTICULAR BRAKCET {0xFE19, 0xFE19, prW}, // Po PRESENTATION FORM FOR VERTICAL HORIZONTAL ELLIPSIS {0xFE20, 0xFE2F, prN}, // Mn [16] COMBINING LIGATURE LEFT HALF..COMBINING CYRILLIC TITLO RIGHT HALF {0xFE30, 0xFE30, prW}, // Po PRESENTATION FORM FOR VERTICAL TWO DOT LEADER {0xFE31, 0xFE32, prW}, // Pd [2] PRESENTATION FORM FOR VERTICAL EM DASH..PRESENTATION FORM FOR VERTICAL EN DASH {0xFE33, 0xFE34, prW}, // Pc [2] PRESENTATION FORM FOR VERTICAL LOW LINE..PRESENTATION FORM FOR VERTICAL WAVY LOW LINE {0xFE35, 0xFE35, prW}, // Ps PRESENTATION FORM FOR VERTICAL LEFT PARENTHESIS {0xFE36, 0xFE36, prW}, // Pe PRESENTATION FORM FOR VERTICAL RIGHT PARENTHESIS {0xFE37, 0xFE37, prW}, // Ps PRESENTATION FORM FOR VERTICAL LEFT CURLY BRACKET {0xFE38, 0xFE38, prW}, // Pe PRESENTATION FORM FOR VERTICAL RIGHT CURLY BRACKET {0xFE39, 0xFE39, prW}, // Ps PRESENTATION FORM FOR VERTICAL LEFT TORTOISE SHELL BRACKET {0xFE3A, 0xFE3A, prW}, // Pe PRESENTATION FORM FOR VERTICAL RIGHT TORTOISE SHELL BRACKET {0xFE3B, 0xFE3B, prW}, // Ps PRESENTATION FORM FOR VERTICAL LEFT BLACK LENTICULAR BRACKET {0xFE3C, 0xFE3C, prW}, // Pe PRESENTATION FORM FOR VERTICAL RIGHT BLACK LENTICULAR BRACKET {0xFE3D, 0xFE3D, prW}, // Ps PRESENTATION FORM FOR VERTICAL LEFT DOUBLE ANGLE BRACKET {0xFE3E, 0xFE3E, prW}, // Pe PRESENTATION FORM FOR VERTICAL RIGHT DOUBLE ANGLE BRACKET {0xFE3F, 0xFE3F, prW}, // Ps PRESENTATION FORM FOR VERTICAL LEFT ANGLE BRACKET {0xFE40, 0xFE40, prW}, // Pe PRESENTATION FORM FOR VERTICAL RIGHT ANGLE BRACKET {0xFE41, 0xFE41, prW}, // Ps PRESENTATION FORM FOR VERTICAL LEFT CORNER BRACKET {0xFE42, 0xFE42, prW}, // Pe PRESENTATION FORM FOR VERTICAL RIGHT CORNER BRACKET {0xFE43, 0xFE43, prW}, // Ps PRESENTATION FORM FOR VERTICAL LEFT WHITE CORNER BRACKET {0xFE44, 0xFE44, prW}, // Pe PRESENTATION FORM FOR VERTICAL RIGHT WHITE CORNER BRACKET {0xFE45, 0xFE46, prW}, // Po [2] SESAME DOT..WHITE SESAME DOT {0xFE47, 0xFE47, prW}, // Ps PRESENTATION FORM FOR VERTICAL LEFT SQUARE BRACKET {0xFE48, 0xFE48, prW}, // Pe PRESENTATION FORM FOR VERTICAL RIGHT SQUARE BRACKET {0xFE49, 0xFE4C, prW}, // Po [4] DASHED OVERLINE..DOUBLE WAVY OVERLINE {0xFE4D, 0xFE4F, prW}, // Pc [3] DASHED LOW LINE..WAVY LOW LINE {0xFE50, 0xFE52, prW}, // Po [3] SMALL COMMA..SMALL FULL STOP {0xFE54, 0xFE57, prW}, // Po [4] SMALL SEMICOLON..SMALL EXCLAMATION MARK {0xFE58, 0xFE58, prW}, // Pd SMALL EM DASH {0xFE59, 0xFE59, prW}, // Ps SMALL LEFT PARENTHESIS {0xFE5A, 0xFE5A, prW}, // Pe SMALL RIGHT PARENTHESIS {0xFE5B, 0xFE5B, prW}, // Ps SMALL LEFT CURLY BRACKET {0xFE5C, 0xFE5C, prW}, // Pe SMALL RIGHT CURLY BRACKET {0xFE5D, 0xFE5D, prW}, // Ps SMALL LEFT TORTOISE SHELL BRACKET {0xFE5E, 0xFE5E, prW}, // Pe SMALL RIGHT TORTOISE SHELL BRACKET {0xFE5F, 0xFE61, prW}, // Po [3] SMALL NUMBER SIGN..SMALL ASTERISK {0xFE62, 0xFE62, prW}, // Sm SMALL PLUS SIGN {0xFE63, 0xFE63, prW}, // Pd SMALL HYPHEN-MINUS {0xFE64, 0xFE66, prW}, // Sm [3] SMALL LESS-THAN SIGN..SMALL EQUALS SIGN {0xFE68, 0xFE68, prW}, // Po SMALL REVERSE SOLIDUS {0xFE69, 0xFE69, prW}, // Sc SMALL DOLLAR SIGN {0xFE6A, 0xFE6B, prW}, // Po [2] SMALL PERCENT SIGN..SMALL COMMERCIAL AT {0xFE70, 0xFE74, prN}, // Lo [5] ARABIC FATHATAN ISOLATED FORM..ARABIC KASRATAN ISOLATED FORM {0xFE76, 0xFEFC, prN}, // Lo [135] ARABIC FATHA ISOLATED FORM..ARABIC LIGATURE LAM WITH ALEF FINAL FORM {0xFEFF, 0xFEFF, prN}, // Cf ZERO WIDTH NO-BREAK SPACE {0xFF01, 0xFF03, prF}, // Po [3] FULLWIDTH EXCLAMATION MARK..FULLWIDTH NUMBER SIGN {0xFF04, 0xFF04, prF}, // Sc FULLWIDTH DOLLAR SIGN {0xFF05, 0xFF07, prF}, // Po [3] FULLWIDTH PERCENT SIGN..FULLWIDTH APOSTROPHE {0xFF08, 0xFF08, prF}, // Ps FULLWIDTH LEFT PARENTHESIS {0xFF09, 0xFF09, prF}, // Pe FULLWIDTH RIGHT PARENTHESIS {0xFF0A, 0xFF0A, prF}, // Po FULLWIDTH ASTERISK {0xFF0B, 0xFF0B, prF}, // Sm FULLWIDTH PLUS SIGN {0xFF0C, 0xFF0C, prF}, // Po FULLWIDTH COMMA {0xFF0D, 0xFF0D, prF}, // Pd FULLWIDTH HYPHEN-MINUS {0xFF0E, 0xFF0F, prF}, // Po [2] FULLWIDTH FULL STOP..FULLWIDTH SOLIDUS {0xFF10, 0xFF19, prF}, // Nd [10] FULLWIDTH DIGIT ZERO..FULLWIDTH DIGIT NINE {0xFF1A, 0xFF1B, prF}, // Po [2] FULLWIDTH COLON..FULLWIDTH SEMICOLON {0xFF1C, 0xFF1E, prF}, // Sm [3] FULLWIDTH LESS-THAN SIGN..FULLWIDTH GREATER-THAN SIGN {0xFF1F, 0xFF20, prF}, // Po [2] FULLWIDTH QUESTION MARK..FULLWIDTH COMMERCIAL AT {0xFF21, 0xFF3A, prF}, // Lu [26] FULLWIDTH LATIN CAPITAL LETTER A..FULLWIDTH LATIN CAPITAL LETTER Z {0xFF3B, 0xFF3B, prF}, // Ps FULLWIDTH LEFT SQUARE BRACKET {0xFF3C, 0xFF3C, prF}, // Po FULLWIDTH REVERSE SOLIDUS {0xFF3D, 0xFF3D, prF}, // Pe FULLWIDTH RIGHT SQUARE BRACKET {0xFF3E, 0xFF3E, prF}, // Sk FULLWIDTH CIRCUMFLEX ACCENT {0xFF3F, 0xFF3F, prF}, // Pc FULLWIDTH LOW LINE {0xFF40, 0xFF40, prF}, // Sk FULLWIDTH GRAVE ACCENT {0xFF41, 0xFF5A, prF}, // Ll [26] FULLWIDTH LATIN SMALL LETTER A..FULLWIDTH LATIN SMALL LETTER Z {0xFF5B, 0xFF5B, prF}, // Ps FULLWIDTH LEFT CURLY BRACKET {0xFF5C, 0xFF5C, prF}, // Sm FULLWIDTH VERTICAL LINE {0xFF5D, 0xFF5D, prF}, // Pe FULLWIDTH RIGHT CURLY BRACKET {0xFF5E, 0xFF5E, prF}, // Sm FULLWIDTH TILDE {0xFF5F, 0xFF5F, prF}, // Ps FULLWIDTH LEFT WHITE PARENTHESIS {0xFF60, 0xFF60, prF}, // Pe FULLWIDTH RIGHT WHITE PARENTHESIS {0xFF61, 0xFF61, prH}, // Po HALFWIDTH IDEOGRAPHIC FULL STOP {0xFF62, 0xFF62, prH}, // Ps HALFWIDTH LEFT CORNER BRACKET {0xFF63, 0xFF63, prH}, // Pe HALFWIDTH RIGHT CORNER BRACKET {0xFF64, 0xFF65, prH}, // Po [2] HALFWIDTH IDEOGRAPHIC COMMA..HALFWIDTH KATAKANA MIDDLE DOT {0xFF66, 0xFF6F, prH}, // Lo [10] HALFWIDTH KATAKANA LETTER WO..HALFWIDTH KATAKANA LETTER SMALL TU {0xFF70, 0xFF70, prH}, // Lm HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK {0xFF71, 0xFF9D, prH}, // Lo [45] HALFWIDTH KATAKANA LETTER A..HALFWIDTH KATAKANA LETTER N {0xFF9E, 0xFF9F, prH}, // Lm [2] HALFWIDTH KATAKANA VOICED SOUND MARK..HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK {0xFFA0, 0xFFBE, prH}, // Lo [31] HALFWIDTH HANGUL FILLER..HALFWIDTH HANGUL LETTER HIEUH {0xFFC2, 0xFFC7, prH}, // Lo [6] HALFWIDTH HANGUL LETTER A..HALFWIDTH HANGUL LETTER E {0xFFCA, 0xFFCF, prH}, // Lo [6] HALFWIDTH HANGUL LETTER YEO..HALFWIDTH HANGUL LETTER OE {0xFFD2, 0xFFD7, prH}, // Lo [6] HALFWIDTH HANGUL LETTER YO..HALFWIDTH HANGUL LETTER YU {0xFFDA, 0xFFDC, prH}, // Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL LETTER I {0xFFE0, 0xFFE1, prF}, // Sc [2] FULLWIDTH CENT SIGN..FULLWIDTH POUND SIGN {0xFFE2, 0xFFE2, prF}, // Sm FULLWIDTH NOT SIGN {0xFFE3, 0xFFE3, prF}, // Sk FULLWIDTH MACRON {0xFFE4, 0xFFE4, prF}, // So FULLWIDTH BROKEN BAR {0xFFE5, 0xFFE6, prF}, // Sc [2] FULLWIDTH YEN SIGN..FULLWIDTH WON SIGN {0xFFE8, 0xFFE8, prH}, // So HALFWIDTH FORMS LIGHT VERTICAL {0xFFE9, 0xFFEC, prH}, // Sm [4] HALFWIDTH LEFTWARDS ARROW..HALFWIDTH DOWNWARDS ARROW {0xFFED, 0xFFEE, prH}, // So [2] HALFWIDTH BLACK SQUARE..HALFWIDTH WHITE CIRCLE {0xFFF9, 0xFFFB, prN}, // Cf [3] INTERLINEAR ANNOTATION ANCHOR..INTERLINEAR ANNOTATION TERMINATOR {0xFFFC, 0xFFFC, prN}, // So OBJECT REPLACEMENT CHARACTER {0xFFFD, 0xFFFD, prA}, // So REPLACEMENT CHARACTER {0x10000, 0x1000B, prN}, // Lo [12] LINEAR B SYLLABLE B008 A..LINEAR B SYLLABLE B046 JE {0x1000D, 0x10026, prN}, // Lo [26] LINEAR B SYLLABLE B036 JO..LINEAR B SYLLABLE B032 QO {0x10028, 0x1003A, prN}, // Lo [19] LINEAR B SYLLABLE B060 RA..LINEAR B SYLLABLE B042 WO {0x1003C, 0x1003D, prN}, // Lo [2] LINEAR B SYLLABLE B017 ZA..LINEAR B SYLLABLE B074 ZE {0x1003F, 0x1004D, prN}, // Lo [15] LINEAR B SYLLABLE B020 ZO..LINEAR B SYLLABLE B091 TWO {0x10050, 0x1005D, prN}, // Lo [14] LINEAR B SYMBOL B018..LINEAR B SYMBOL B089 {0x10080, 0x100FA, prN}, // Lo [123] LINEAR B IDEOGRAM B100 MAN..LINEAR B IDEOGRAM VESSEL B305 {0x10100, 0x10102, prN}, // Po [3] AEGEAN WORD SEPARATOR LINE..AEGEAN CHECK MARK {0x10107, 0x10133, prN}, // No [45] AEGEAN NUMBER ONE..AEGEAN NUMBER NINETY THOUSAND {0x10137, 0x1013F, prN}, // So [9] AEGEAN WEIGHT BASE UNIT..AEGEAN MEASURE THIRD SUBUNIT {0x10140, 0x10174, prN}, // Nl [53] GREEK ACROPHONIC ATTIC ONE QUARTER..GREEK ACROPHONIC STRATIAN FIFTY MNAS {0x10175, 0x10178, prN}, // No [4] GREEK ONE HALF SIGN..GREEK THREE QUARTERS SIGN {0x10179, 0x10189, prN}, // So [17] GREEK YEAR SIGN..GREEK TRYBLION BASE SIGN {0x1018A, 0x1018B, prN}, // No [2] GREEK ZERO SIGN..GREEK ONE QUARTER SIGN {0x1018C, 0x1018E, prN}, // So [3] GREEK SINUSOID SIGN..NOMISMA SIGN {0x10190, 0x1019C, prN}, // So [13] ROMAN SEXTANS SIGN..ASCIA SYMBOL {0x101A0, 0x101A0, prN}, // So GREEK SYMBOL TAU RHO {0x101D0, 0x101FC, prN}, // So [45] PHAISTOS DISC SIGN PEDESTRIAN..PHAISTOS DISC SIGN WAVY BAND {0x101FD, 0x101FD, prN}, // Mn PHAISTOS DISC SIGN COMBINING OBLIQUE STROKE {0x10280, 0x1029C, prN}, // Lo [29] LYCIAN LETTER A..LYCIAN LETTER X {0x102A0, 0x102D0, prN}, // Lo [49] CARIAN LETTER A..CARIAN LETTER UUU3 {0x102E0, 0x102E0, prN}, // Mn COPTIC EPACT THOUSANDS MARK {0x102E1, 0x102FB, prN}, // No [27] COPTIC EPACT DIGIT ONE..COPTIC EPACT NUMBER NINE HUNDRED {0x10300, 0x1031F, prN}, // Lo [32] OLD ITALIC LETTER A..OLD ITALIC LETTER ESS {0x10320, 0x10323, prN}, // No [4] OLD ITALIC NUMERAL ONE..OLD ITALIC NUMERAL FIFTY {0x1032D, 0x1032F, prN}, // Lo [3] OLD ITALIC LETTER YE..OLD ITALIC LETTER SOUTHERN TSE {0x10330, 0x10340, prN}, // Lo [17] GOTHIC LETTER AHSA..GOTHIC LETTER PAIRTHRA {0x10341, 0x10341, prN}, // Nl GOTHIC LETTER NINETY {0x10342, 0x10349, prN}, // Lo [8] GOTHIC LETTER RAIDA..GOTHIC LETTER OTHAL {0x1034A, 0x1034A, prN}, // Nl GOTHIC LETTER NINE HUNDRED {0x10350, 0x10375, prN}, // Lo [38] OLD PERMIC LETTER AN..OLD PERMIC LETTER IA {0x10376, 0x1037A, prN}, // Mn [5] COMBINING OLD PERMIC LETTER AN..COMBINING OLD PERMIC LETTER SII {0x10380, 0x1039D, prN}, // Lo [30] UGARITIC LETTER ALPA..UGARITIC LETTER SSU {0x1039F, 0x1039F, prN}, // Po UGARITIC WORD DIVIDER {0x103A0, 0x103C3, prN}, // Lo [36] OLD PERSIAN SIGN A..OLD PERSIAN SIGN HA {0x103C8, 0x103CF, prN}, // Lo [8] OLD PERSIAN SIGN AURAMAZDAA..OLD PERSIAN SIGN BUUMISH {0x103D0, 0x103D0, prN}, // Po OLD PERSIAN WORD DIVIDER {0x103D1, 0x103D5, prN}, // Nl [5] OLD PERSIAN NUMBER ONE..OLD PERSIAN NUMBER HUNDRED {0x10400, 0x1044F, prN}, // L& [80] DESERET CAPITAL LETTER LONG I..DESERET SMALL LETTER EW {0x10450, 0x1047F, prN}, // Lo [48] SHAVIAN LETTER PEEP..SHAVIAN LETTER YEW {0x10480, 0x1049D, prN}, // Lo [30] OSMANYA LETTER ALEF..OSMANYA LETTER OO {0x104A0, 0x104A9, prN}, // Nd [10] OSMANYA DIGIT ZERO..OSMANYA DIGIT NINE {0x104B0, 0x104D3, prN}, // Lu [36] OSAGE CAPITAL LETTER A..OSAGE CAPITAL LETTER ZHA {0x104D8, 0x104FB, prN}, // Ll [36] OSAGE SMALL LETTER A..OSAGE SMALL LETTER ZHA {0x10500, 0x10527, prN}, // Lo [40] ELBASAN LETTER A..ELBASAN LETTER KHE {0x10530, 0x10563, prN}, // Lo [52] CAUCASIAN ALBANIAN LETTER ALT..CAUCASIAN ALBANIAN LETTER KIW {0x1056F, 0x1056F, prN}, // Po CAUCASIAN ALBANIAN CITATION MARK {0x10570, 0x1057A, prN}, // Lu [11] VITHKUQI CAPITAL LETTER A..VITHKUQI CAPITAL LETTER GA {0x1057C, 0x1058A, prN}, // Lu [15] VITHKUQI CAPITAL LETTER HA..VITHKUQI CAPITAL LETTER RE {0x1058C, 0x10592, prN}, // Lu [7] VITHKUQI CAPITAL LETTER SE..VITHKUQI CAPITAL LETTER XE {0x10594, 0x10595, prN}, // Lu [2] VITHKUQI CAPITAL LETTER Y..VITHKUQI CAPITAL LETTER ZE {0x10597, 0x105A1, prN}, // Ll [11] VITHKUQI SMALL LETTER A..VITHKUQI SMALL LETTER GA {0x105A3, 0x105B1, prN}, // Ll [15] VITHKUQI SMALL LETTER HA..VITHKUQI SMALL LETTER RE {0x105B3, 0x105B9, prN}, // Ll [7] VITHKUQI SMALL LETTER SE..VITHKUQI SMALL LETTER XE {0x105BB, 0x105BC, prN}, // Ll [2] VITHKUQI SMALL LETTER Y..VITHKUQI SMALL LETTER ZE {0x10600, 0x10736, prN}, // Lo [311] LINEAR A SIGN AB001..LINEAR A SIGN A664 {0x10740, 0x10755, prN}, // Lo [22] LINEAR A SIGN A701 A..LINEAR A SIGN A732 JE {0x10760, 0x10767, prN}, // Lo [8] LINEAR A SIGN A800..LINEAR A SIGN A807 {0x10780, 0x10785, prN}, // Lm [6] MODIFIER LETTER SMALL CAPITAL AA..MODIFIER LETTER SMALL B WITH HOOK {0x10787, 0x107B0, prN}, // Lm [42] MODIFIER LETTER SMALL DZ DIGRAPH..MODIFIER LETTER SMALL V WITH RIGHT HOOK {0x107B2, 0x107BA, prN}, // Lm [9] MODIFIER LETTER SMALL CAPITAL Y..MODIFIER LETTER SMALL S WITH CURL {0x10800, 0x10805, prN}, // Lo [6] CYPRIOT SYLLABLE A..CYPRIOT SYLLABLE JA {0x10808, 0x10808, prN}, // Lo CYPRIOT SYLLABLE JO {0x1080A, 0x10835, prN}, // Lo [44] CYPRIOT SYLLABLE KA..CYPRIOT SYLLABLE WO {0x10837, 0x10838, prN}, // Lo [2] CYPRIOT SYLLABLE XA..CYPRIOT SYLLABLE XE {0x1083C, 0x1083C, prN}, // Lo CYPRIOT SYLLABLE ZA {0x1083F, 0x1083F, prN}, // Lo CYPRIOT SYLLABLE ZO {0x10840, 0x10855, prN}, // Lo [22] IMPERIAL ARAMAIC LETTER ALEPH..IMPERIAL ARAMAIC LETTER TAW {0x10857, 0x10857, prN}, // Po IMPERIAL ARAMAIC SECTION SIGN {0x10858, 0x1085F, prN}, // No [8] IMPERIAL ARAMAIC NUMBER ONE..IMPERIAL ARAMAIC NUMBER TEN THOUSAND {0x10860, 0x10876, prN}, // Lo [23] PALMYRENE LETTER ALEPH..PALMYRENE LETTER TAW {0x10877, 0x10878, prN}, // So [2] PALMYRENE LEFT-POINTING FLEURON..PALMYRENE RIGHT-POINTING FLEURON {0x10879, 0x1087F, prN}, // No [7] PALMYRENE NUMBER ONE..PALMYRENE NUMBER TWENTY {0x10880, 0x1089E, prN}, // Lo [31] NABATAEAN LETTER FINAL ALEPH..NABATAEAN LETTER TAW {0x108A7, 0x108AF, prN}, // No [9] NABATAEAN NUMBER ONE..NABATAEAN NUMBER ONE HUNDRED {0x108E0, 0x108F2, prN}, // Lo [19] HATRAN LETTER ALEPH..HATRAN LETTER QOPH {0x108F4, 0x108F5, prN}, // Lo [2] HATRAN LETTER SHIN..HATRAN LETTER TAW {0x108FB, 0x108FF, prN}, // No [5] HATRAN NUMBER ONE..HATRAN NUMBER ONE HUNDRED {0x10900, 0x10915, prN}, // Lo [22] PHOENICIAN LETTER ALF..PHOENICIAN LETTER TAU {0x10916, 0x1091B, prN}, // No [6] PHOENICIAN NUMBER ONE..PHOENICIAN NUMBER THREE {0x1091F, 0x1091F, prN}, // Po PHOENICIAN WORD SEPARATOR {0x10920, 0x10939, prN}, // Lo [26] LYDIAN LETTER A..LYDIAN LETTER C {0x1093F, 0x1093F, prN}, // Po LYDIAN TRIANGULAR MARK {0x10980, 0x1099F, prN}, // Lo [32] MEROITIC HIEROGLYPHIC LETTER A..MEROITIC HIEROGLYPHIC SYMBOL VIDJ-2 {0x109A0, 0x109B7, prN}, // Lo [24] MEROITIC CURSIVE LETTER A..MEROITIC CURSIVE LETTER DA {0x109BC, 0x109BD, prN}, // No [2] MEROITIC CURSIVE FRACTION ELEVEN TWELFTHS..MEROITIC CURSIVE FRACTION ONE HALF {0x109BE, 0x109BF, prN}, // Lo [2] MEROITIC CURSIVE LOGOGRAM RMT..MEROITIC CURSIVE LOGOGRAM IMN {0x109C0, 0x109CF, prN}, // No [16] MEROITIC CURSIVE NUMBER ONE..MEROITIC CURSIVE NUMBER SEVENTY {0x109D2, 0x109FF, prN}, // No [46] MEROITIC CURSIVE NUMBER ONE HUNDRED..MEROITIC CURSIVE FRACTION TEN TWELFTHS {0x10A00, 0x10A00, prN}, // Lo KHAROSHTHI LETTER A {0x10A01, 0x10A03, prN}, // Mn [3] KHAROSHTHI VOWEL SIGN I..KHAROSHTHI VOWEL SIGN VOCALIC R {0x10A05, 0x10A06, prN}, // Mn [2] KHAROSHTHI VOWEL SIGN E..KHAROSHTHI VOWEL SIGN O {0x10A0C, 0x10A0F, prN}, // Mn [4] KHAROSHTHI VOWEL LENGTH MARK..KHAROSHTHI SIGN VISARGA {0x10A10, 0x10A13, prN}, // Lo [4] KHAROSHTHI LETTER KA..KHAROSHTHI LETTER GHA {0x10A15, 0x10A17, prN}, // Lo [3] KHAROSHTHI LETTER CA..KHAROSHTHI LETTER JA {0x10A19, 0x10A35, prN}, // Lo [29] KHAROSHTHI LETTER NYA..KHAROSHTHI LETTER VHA {0x10A38, 0x10A3A, prN}, // Mn [3] KHAROSHTHI SIGN BAR ABOVE..KHAROSHTHI SIGN DOT BELOW {0x10A3F, 0x10A3F, prN}, // Mn KHAROSHTHI VIRAMA {0x10A40, 0x10A48, prN}, // No [9] KHAROSHTHI DIGIT ONE..KHAROSHTHI FRACTION ONE HALF {0x10A50, 0x10A58, prN}, // Po [9] KHAROSHTHI PUNCTUATION DOT..KHAROSHTHI PUNCTUATION LINES {0x10A60, 0x10A7C, prN}, // Lo [29] OLD SOUTH ARABIAN LETTER HE..OLD SOUTH ARABIAN LETTER THETH {0x10A7D, 0x10A7E, prN}, // No [2] OLD SOUTH ARABIAN NUMBER ONE..OLD SOUTH ARABIAN NUMBER FIFTY {0x10A7F, 0x10A7F, prN}, // Po OLD SOUTH ARABIAN NUMERIC INDICATOR {0x10A80, 0x10A9C, prN}, // Lo [29] OLD NORTH ARABIAN LETTER HEH..OLD NORTH ARABIAN LETTER ZAH {0x10A9D, 0x10A9F, prN}, // No [3] OLD NORTH ARABIAN NUMBER ONE..OLD NORTH ARABIAN NUMBER TWENTY {0x10AC0, 0x10AC7, prN}, // Lo [8] MANICHAEAN LETTER ALEPH..MANICHAEAN LETTER WAW {0x10AC8, 0x10AC8, prN}, // So MANICHAEAN SIGN UD {0x10AC9, 0x10AE4, prN}, // Lo [28] MANICHAEAN LETTER ZAYIN..MANICHAEAN LETTER TAW {0x10AE5, 0x10AE6, prN}, // Mn [2] MANICHAEAN ABBREVIATION MARK ABOVE..MANICHAEAN ABBREVIATION MARK BELOW {0x10AEB, 0x10AEF, prN}, // No [5] MANICHAEAN NUMBER ONE..MANICHAEAN NUMBER ONE HUNDRED {0x10AF0, 0x10AF6, prN}, // Po [7] MANICHAEAN PUNCTUATION STAR..MANICHAEAN PUNCTUATION LINE FILLER {0x10B00, 0x10B35, prN}, // Lo [54] AVESTAN LETTER A..AVESTAN LETTER HE {0x10B39, 0x10B3F, prN}, // Po [7] AVESTAN ABBREVIATION MARK..LARGE ONE RING OVER TWO RINGS PUNCTUATION {0x10B40, 0x10B55, prN}, // Lo [22] INSCRIPTIONAL PARTHIAN LETTER ALEPH..INSCRIPTIONAL PARTHIAN LETTER TAW {0x10B58, 0x10B5F, prN}, // No [8] INSCRIPTIONAL PARTHIAN NUMBER ONE..INSCRIPTIONAL PARTHIAN NUMBER ONE THOUSAND {0x10B60, 0x10B72, prN}, // Lo [19] INSCRIPTIONAL PAHLAVI LETTER ALEPH..INSCRIPTIONAL PAHLAVI LETTER TAW {0x10B78, 0x10B7F, prN}, // No [8] INSCRIPTIONAL PAHLAVI NUMBER ONE..INSCRIPTIONAL PAHLAVI NUMBER ONE THOUSAND {0x10B80, 0x10B91, prN}, // Lo [18] PSALTER PAHLAVI LETTER ALEPH..PSALTER PAHLAVI LETTER TAW {0x10B99, 0x10B9C, prN}, // Po [4] PSALTER PAHLAVI SECTION MARK..PSALTER PAHLAVI FOUR DOTS WITH DOT {0x10BA9, 0x10BAF, prN}, // No [7] PSALTER PAHLAVI NUMBER ONE..PSALTER PAHLAVI NUMBER ONE HUNDRED {0x10C00, 0x10C48, prN}, // Lo [73] OLD TURKIC LETTER ORKHON A..OLD TURKIC LETTER ORKHON BASH {0x10C80, 0x10CB2, prN}, // Lu [51] OLD HUNGARIAN CAPITAL LETTER A..OLD HUNGARIAN CAPITAL LETTER US {0x10CC0, 0x10CF2, prN}, // Ll [51] OLD HUNGARIAN SMALL LETTER A..OLD HUNGARIAN SMALL LETTER US {0x10CFA, 0x10CFF, prN}, // No [6] OLD HUNGARIAN NUMBER ONE..OLD HUNGARIAN NUMBER ONE THOUSAND {0x10D00, 0x10D23, prN}, // Lo [36] HANIFI ROHINGYA LETTER A..HANIFI ROHINGYA MARK NA KHONNA {0x10D24, 0x10D27, prN}, // Mn [4] HANIFI ROHINGYA SIGN HARBAHAY..HANIFI ROHINGYA SIGN TASSI {0x10D30, 0x10D39, prN}, // Nd [10] HANIFI ROHINGYA DIGIT ZERO..HANIFI ROHINGYA DIGIT NINE {0x10E60, 0x10E7E, prN}, // No [31] RUMI DIGIT ONE..RUMI FRACTION TWO THIRDS {0x10E80, 0x10EA9, prN}, // Lo [42] YEZIDI LETTER ELIF..YEZIDI LETTER ET {0x10EAB, 0x10EAC, prN}, // Mn [2] YEZIDI COMBINING HAMZA MARK..YEZIDI COMBINING MADDA MARK {0x10EAD, 0x10EAD, prN}, // Pd YEZIDI HYPHENATION MARK {0x10EB0, 0x10EB1, prN}, // Lo [2] YEZIDI LETTER LAM WITH DOT ABOVE..YEZIDI LETTER YOT WITH CIRCUMFLEX ABOVE {0x10EFD, 0x10EFF, prN}, // Mn [3] ARABIC SMALL LOW WORD SAKTA..ARABIC SMALL LOW WORD MADDA {0x10F00, 0x10F1C, prN}, // Lo [29] OLD SOGDIAN LETTER ALEPH..OLD SOGDIAN LETTER FINAL TAW WITH VERTICAL TAIL {0x10F1D, 0x10F26, prN}, // No [10] OLD SOGDIAN NUMBER ONE..OLD SOGDIAN FRACTION ONE HALF {0x10F27, 0x10F27, prN}, // Lo OLD SOGDIAN LIGATURE AYIN-DALETH {0x10F30, 0x10F45, prN}, // Lo [22] SOGDIAN LETTER ALEPH..SOGDIAN INDEPENDENT SHIN {0x10F46, 0x10F50, prN}, // Mn [11] SOGDIAN COMBINING DOT BELOW..SOGDIAN COMBINING STROKE BELOW {0x10F51, 0x10F54, prN}, // No [4] SOGDIAN NUMBER ONE..SOGDIAN NUMBER ONE HUNDRED {0x10F55, 0x10F59, prN}, // Po [5] SOGDIAN PUNCTUATION TWO VERTICAL BARS..SOGDIAN PUNCTUATION HALF CIRCLE WITH DOT {0x10F70, 0x10F81, prN}, // Lo [18] OLD UYGHUR LETTER ALEPH..OLD UYGHUR LETTER LESH {0x10F82, 0x10F85, prN}, // Mn [4] OLD UYGHUR COMBINING DOT ABOVE..OLD UYGHUR COMBINING TWO DOTS BELOW {0x10F86, 0x10F89, prN}, // Po [4] OLD UYGHUR PUNCTUATION BAR..OLD UYGHUR PUNCTUATION FOUR DOTS {0x10FB0, 0x10FC4, prN}, // Lo [21] CHORASMIAN LETTER ALEPH..CHORASMIAN LETTER TAW {0x10FC5, 0x10FCB, prN}, // No [7] CHORASMIAN NUMBER ONE..CHORASMIAN NUMBER ONE HUNDRED {0x10FE0, 0x10FF6, prN}, // Lo [23] ELYMAIC LETTER ALEPH..ELYMAIC LIGATURE ZAYIN-YODH {0x11000, 0x11000, prN}, // Mc BRAHMI SIGN CANDRABINDU {0x11001, 0x11001, prN}, // Mn BRAHMI SIGN ANUSVARA {0x11002, 0x11002, prN}, // Mc BRAHMI SIGN VISARGA {0x11003, 0x11037, prN}, // Lo [53] BRAHMI SIGN JIHVAMULIYA..BRAHMI LETTER OLD TAMIL NNNA {0x11038, 0x11046, prN}, // Mn [15] BRAHMI VOWEL SIGN AA..BRAHMI VIRAMA {0x11047, 0x1104D, prN}, // Po [7] BRAHMI DANDA..BRAHMI PUNCTUATION LOTUS {0x11052, 0x11065, prN}, // No [20] BRAHMI NUMBER ONE..BRAHMI NUMBER ONE THOUSAND {0x11066, 0x1106F, prN}, // Nd [10] BRAHMI DIGIT ZERO..BRAHMI DIGIT NINE {0x11070, 0x11070, prN}, // Mn BRAHMI SIGN OLD TAMIL VIRAMA {0x11071, 0x11072, prN}, // Lo [2] BRAHMI LETTER OLD TAMIL SHORT E..BRAHMI LETTER OLD TAMIL SHORT O {0x11073, 0x11074, prN}, // Mn [2] BRAHMI VOWEL SIGN OLD TAMIL SHORT E..BRAHMI VOWEL SIGN OLD TAMIL SHORT O {0x11075, 0x11075, prN}, // Lo BRAHMI LETTER OLD TAMIL LLA {0x1107F, 0x1107F, prN}, // Mn BRAHMI NUMBER JOINER {0x11080, 0x11081, prN}, // Mn [2] KAITHI SIGN CANDRABINDU..KAITHI SIGN ANUSVARA {0x11082, 0x11082, prN}, // Mc KAITHI SIGN VISARGA {0x11083, 0x110AF, prN}, // Lo [45] KAITHI LETTER A..KAITHI LETTER HA {0x110B0, 0x110B2, prN}, // Mc [3] KAITHI VOWEL SIGN AA..KAITHI VOWEL SIGN II {0x110B3, 0x110B6, prN}, // Mn [4] KAITHI VOWEL SIGN U..KAITHI VOWEL SIGN AI {0x110B7, 0x110B8, prN}, // Mc [2] KAITHI VOWEL SIGN O..KAITHI VOWEL SIGN AU {0x110B9, 0x110BA, prN}, // Mn [2] KAITHI SIGN VIRAMA..KAITHI SIGN NUKTA {0x110BB, 0x110BC, prN}, // Po [2] KAITHI ABBREVIATION SIGN..KAITHI ENUMERATION SIGN {0x110BD, 0x110BD, prN}, // Cf KAITHI NUMBER SIGN {0x110BE, 0x110C1, prN}, // Po [4] KAITHI SECTION MARK..KAITHI DOUBLE DANDA {0x110C2, 0x110C2, prN}, // Mn KAITHI VOWEL SIGN VOCALIC R {0x110CD, 0x110CD, prN}, // Cf KAITHI NUMBER SIGN ABOVE {0x110D0, 0x110E8, prN}, // Lo [25] SORA SOMPENG LETTER SAH..SORA SOMPENG LETTER MAE {0x110F0, 0x110F9, prN}, // Nd [10] SORA SOMPENG DIGIT ZERO..SORA SOMPENG DIGIT NINE {0x11100, 0x11102, prN}, // Mn [3] CHAKMA SIGN CANDRABINDU..CHAKMA SIGN VISARGA {0x11103, 0x11126, prN}, // Lo [36] CHAKMA LETTER AA..CHAKMA LETTER HAA {0x11127, 0x1112B, prN}, // Mn [5] CHAKMA VOWEL SIGN A..CHAKMA VOWEL SIGN UU {0x1112C, 0x1112C, prN}, // Mc CHAKMA VOWEL SIGN E {0x1112D, 0x11134, prN}, // Mn [8] CHAKMA VOWEL SIGN AI..CHAKMA MAAYYAA {0x11136, 0x1113F, prN}, // Nd [10] CHAKMA DIGIT ZERO..CHAKMA DIGIT NINE {0x11140, 0x11143, prN}, // Po [4] CHAKMA SECTION MARK..CHAKMA QUESTION MARK {0x11144, 0x11144, prN}, // Lo CHAKMA LETTER LHAA {0x11145, 0x11146, prN}, // Mc [2] CHAKMA VOWEL SIGN AA..CHAKMA VOWEL SIGN EI {0x11147, 0x11147, prN}, // Lo CHAKMA LETTER VAA {0x11150, 0x11172, prN}, // Lo [35] MAHAJANI LETTER A..MAHAJANI LETTER RRA {0x11173, 0x11173, prN}, // Mn MAHAJANI SIGN NUKTA {0x11174, 0x11175, prN}, // Po [2] MAHAJANI ABBREVIATION SIGN..MAHAJANI SECTION MARK {0x11176, 0x11176, prN}, // Lo MAHAJANI LIGATURE SHRI {0x11180, 0x11181, prN}, // Mn [2] SHARADA SIGN CANDRABINDU..SHARADA SIGN ANUSVARA {0x11182, 0x11182, prN}, // Mc SHARADA SIGN VISARGA {0x11183, 0x111B2, prN}, // Lo [48] SHARADA LETTER A..SHARADA LETTER HA {0x111B3, 0x111B5, prN}, // Mc [3] SHARADA VOWEL SIGN AA..SHARADA VOWEL SIGN II {0x111B6, 0x111BE, prN}, // Mn [9] SHARADA VOWEL SIGN U..SHARADA VOWEL SIGN O {0x111BF, 0x111C0, prN}, // Mc [2] SHARADA VOWEL SIGN AU..SHARADA SIGN VIRAMA {0x111C1, 0x111C4, prN}, // Lo [4] SHARADA SIGN AVAGRAHA..SHARADA OM {0x111C5, 0x111C8, prN}, // Po [4] SHARADA DANDA..SHARADA SEPARATOR {0x111C9, 0x111CC, prN}, // Mn [4] SHARADA SANDHI MARK..SHARADA EXTRA SHORT VOWEL MARK {0x111CD, 0x111CD, prN}, // Po SHARADA SUTRA MARK {0x111CE, 0x111CE, prN}, // Mc SHARADA VOWEL SIGN PRISHTHAMATRA E {0x111CF, 0x111CF, prN}, // Mn SHARADA SIGN INVERTED CANDRABINDU {0x111D0, 0x111D9, prN}, // Nd [10] SHARADA DIGIT ZERO..SHARADA DIGIT NINE {0x111DA, 0x111DA, prN}, // Lo SHARADA EKAM {0x111DB, 0x111DB, prN}, // Po SHARADA SIGN SIDDHAM {0x111DC, 0x111DC, prN}, // Lo SHARADA HEADSTROKE {0x111DD, 0x111DF, prN}, // Po [3] SHARADA CONTINUATION SIGN..SHARADA SECTION MARK-2 {0x111E1, 0x111F4, prN}, // No [20] SINHALA ARCHAIC DIGIT ONE..SINHALA ARCHAIC NUMBER ONE THOUSAND {0x11200, 0x11211, prN}, // Lo [18] KHOJKI LETTER A..KHOJKI LETTER JJA {0x11213, 0x1122B, prN}, // Lo [25] KHOJKI LETTER NYA..KHOJKI LETTER LLA {0x1122C, 0x1122E, prN}, // Mc [3] KHOJKI VOWEL SIGN AA..KHOJKI VOWEL SIGN II {0x1122F, 0x11231, prN}, // Mn [3] KHOJKI VOWEL SIGN U..KHOJKI VOWEL SIGN AI {0x11232, 0x11233, prN}, // Mc [2] KHOJKI VOWEL SIGN O..KHOJKI VOWEL SIGN AU {0x11234, 0x11234, prN}, // Mn KHOJKI SIGN ANUSVARA {0x11235, 0x11235, prN}, // Mc KHOJKI SIGN VIRAMA {0x11236, 0x11237, prN}, // Mn [2] KHOJKI SIGN NUKTA..KHOJKI SIGN SHADDA {0x11238, 0x1123D, prN}, // Po [6] KHOJKI DANDA..KHOJKI ABBREVIATION SIGN {0x1123E, 0x1123E, prN}, // Mn KHOJKI SIGN SUKUN {0x1123F, 0x11240, prN}, // Lo [2] KHOJKI LETTER QA..KHOJKI LETTER SHORT I {0x11241, 0x11241, prN}, // Mn KHOJKI VOWEL SIGN VOCALIC R {0x11280, 0x11286, prN}, // Lo [7] MULTANI LETTER A..MULTANI LETTER GA {0x11288, 0x11288, prN}, // Lo MULTANI LETTER GHA {0x1128A, 0x1128D, prN}, // Lo [4] MULTANI LETTER CA..MULTANI LETTER JJA {0x1128F, 0x1129D, prN}, // Lo [15] MULTANI LETTER NYA..MULTANI LETTER BA {0x1129F, 0x112A8, prN}, // Lo [10] MULTANI LETTER BHA..MULTANI LETTER RHA {0x112A9, 0x112A9, prN}, // Po MULTANI SECTION MARK {0x112B0, 0x112DE, prN}, // Lo [47] KHUDAWADI LETTER A..KHUDAWADI LETTER HA {0x112DF, 0x112DF, prN}, // Mn KHUDAWADI SIGN ANUSVARA {0x112E0, 0x112E2, prN}, // Mc [3] KHUDAWADI VOWEL SIGN AA..KHUDAWADI VOWEL SIGN II {0x112E3, 0x112EA, prN}, // Mn [8] KHUDAWADI VOWEL SIGN U..KHUDAWADI SIGN VIRAMA {0x112F0, 0x112F9, prN}, // Nd [10] KHUDAWADI DIGIT ZERO..KHUDAWADI DIGIT NINE {0x11300, 0x11301, prN}, // Mn [2] GRANTHA SIGN COMBINING ANUSVARA ABOVE..GRANTHA SIGN CANDRABINDU {0x11302, 0x11303, prN}, // Mc [2] GRANTHA SIGN ANUSVARA..GRANTHA SIGN VISARGA {0x11305, 0x1130C, prN}, // Lo [8] GRANTHA LETTER A..GRANTHA LETTER VOCALIC L {0x1130F, 0x11310, prN}, // Lo [2] GRANTHA LETTER EE..GRANTHA LETTER AI {0x11313, 0x11328, prN}, // Lo [22] GRANTHA LETTER OO..GRANTHA LETTER NA {0x1132A, 0x11330, prN}, // Lo [7] GRANTHA LETTER PA..GRANTHA LETTER RA {0x11332, 0x11333, prN}, // Lo [2] GRANTHA LETTER LA..GRANTHA LETTER LLA {0x11335, 0x11339, prN}, // Lo [5] GRANTHA LETTER VA..GRANTHA LETTER HA {0x1133B, 0x1133C, prN}, // Mn [2] COMBINING BINDU BELOW..GRANTHA SIGN NUKTA {0x1133D, 0x1133D, prN}, // Lo GRANTHA SIGN AVAGRAHA {0x1133E, 0x1133F, prN}, // Mc [2] GRANTHA VOWEL SIGN AA..GRANTHA VOWEL SIGN I {0x11340, 0x11340, prN}, // Mn GRANTHA VOWEL SIGN II {0x11341, 0x11344, prN}, // Mc [4] GRANTHA VOWEL SIGN U..GRANTHA VOWEL SIGN VOCALIC RR {0x11347, 0x11348, prN}, // Mc [2] GRANTHA VOWEL SIGN EE..GRANTHA VOWEL SIGN AI {0x1134B, 0x1134D, prN}, // Mc [3] GRANTHA VOWEL SIGN OO..GRANTHA SIGN VIRAMA {0x11350, 0x11350, prN}, // Lo GRANTHA OM {0x11357, 0x11357, prN}, // Mc GRANTHA AU LENGTH MARK {0x1135D, 0x11361, prN}, // Lo [5] GRANTHA SIGN PLUTA..GRANTHA LETTER VOCALIC LL {0x11362, 0x11363, prN}, // Mc [2] GRANTHA VOWEL SIGN VOCALIC L..GRANTHA VOWEL SIGN VOCALIC LL {0x11366, 0x1136C, prN}, // Mn [7] COMBINING GRANTHA DIGIT ZERO..COMBINING GRANTHA DIGIT SIX {0x11370, 0x11374, prN}, // Mn [5] COMBINING GRANTHA LETTER A..COMBINING GRANTHA LETTER PA {0x11400, 0x11434, prN}, // Lo [53] NEWA LETTER A..NEWA LETTER HA {0x11435, 0x11437, prN}, // Mc [3] NEWA VOWEL SIGN AA..NEWA VOWEL SIGN II {0x11438, 0x1143F, prN}, // Mn [8] NEWA VOWEL SIGN U..NEWA VOWEL SIGN AI {0x11440, 0x11441, prN}, // Mc [2] NEWA VOWEL SIGN O..NEWA VOWEL SIGN AU {0x11442, 0x11444, prN}, // Mn [3] NEWA SIGN VIRAMA..NEWA SIGN ANUSVARA {0x11445, 0x11445, prN}, // Mc NEWA SIGN VISARGA {0x11446, 0x11446, prN}, // Mn NEWA SIGN NUKTA {0x11447, 0x1144A, prN}, // Lo [4] NEWA SIGN AVAGRAHA..NEWA SIDDHI {0x1144B, 0x1144F, prN}, // Po [5] NEWA DANDA..NEWA ABBREVIATION SIGN {0x11450, 0x11459, prN}, // Nd [10] NEWA DIGIT ZERO..NEWA DIGIT NINE {0x1145A, 0x1145B, prN}, // Po [2] NEWA DOUBLE COMMA..NEWA PLACEHOLDER MARK {0x1145D, 0x1145D, prN}, // Po NEWA INSERTION SIGN {0x1145E, 0x1145E, prN}, // Mn NEWA SANDHI MARK {0x1145F, 0x11461, prN}, // Lo [3] NEWA LETTER VEDIC ANUSVARA..NEWA SIGN UPADHMANIYA {0x11480, 0x114AF, prN}, // Lo [48] TIRHUTA ANJI..TIRHUTA LETTER HA {0x114B0, 0x114B2, prN}, // Mc [3] TIRHUTA VOWEL SIGN AA..TIRHUTA VOWEL SIGN II {0x114B3, 0x114B8, prN}, // Mn [6] TIRHUTA VOWEL SIGN U..TIRHUTA VOWEL SIGN VOCALIC LL {0x114B9, 0x114B9, prN}, // Mc TIRHUTA VOWEL SIGN E {0x114BA, 0x114BA, prN}, // Mn TIRHUTA VOWEL SIGN SHORT E {0x114BB, 0x114BE, prN}, // Mc [4] TIRHUTA VOWEL SIGN AI..TIRHUTA VOWEL SIGN AU {0x114BF, 0x114C0, prN}, // Mn [2] TIRHUTA SIGN CANDRABINDU..TIRHUTA SIGN ANUSVARA {0x114C1, 0x114C1, prN}, // Mc TIRHUTA SIGN VISARGA {0x114C2, 0x114C3, prN}, // Mn [2] TIRHUTA SIGN VIRAMA..TIRHUTA SIGN NUKTA {0x114C4, 0x114C5, prN}, // Lo [2] TIRHUTA SIGN AVAGRAHA..TIRHUTA GVANG {0x114C6, 0x114C6, prN}, // Po TIRHUTA ABBREVIATION SIGN {0x114C7, 0x114C7, prN}, // Lo TIRHUTA OM {0x114D0, 0x114D9, prN}, // Nd [10] TIRHUTA DIGIT ZERO..TIRHUTA DIGIT NINE {0x11580, 0x115AE, prN}, // Lo [47] SIDDHAM LETTER A..SIDDHAM LETTER HA {0x115AF, 0x115B1, prN}, // Mc [3] SIDDHAM VOWEL SIGN AA..SIDDHAM VOWEL SIGN II {0x115B2, 0x115B5, prN}, // Mn [4] SIDDHAM VOWEL SIGN U..SIDDHAM VOWEL SIGN VOCALIC RR {0x115B8, 0x115BB, prN}, // Mc [4] SIDDHAM VOWEL SIGN E..SIDDHAM VOWEL SIGN AU {0x115BC, 0x115BD, prN}, // Mn [2] SIDDHAM SIGN CANDRABINDU..SIDDHAM SIGN ANUSVARA {0x115BE, 0x115BE, prN}, // Mc SIDDHAM SIGN VISARGA {0x115BF, 0x115C0, prN}, // Mn [2] SIDDHAM SIGN VIRAMA..SIDDHAM SIGN NUKTA {0x115C1, 0x115D7, prN}, // Po [23] SIDDHAM SIGN SIDDHAM..SIDDHAM SECTION MARK WITH CIRCLES AND FOUR ENCLOSURES {0x115D8, 0x115DB, prN}, // Lo [4] SIDDHAM LETTER THREE-CIRCLE ALTERNATE I..SIDDHAM LETTER ALTERNATE U {0x115DC, 0x115DD, prN}, // Mn [2] SIDDHAM VOWEL SIGN ALTERNATE U..SIDDHAM VOWEL SIGN ALTERNATE UU {0x11600, 0x1162F, prN}, // Lo [48] MODI LETTER A..MODI LETTER LLA {0x11630, 0x11632, prN}, // Mc [3] MODI VOWEL SIGN AA..MODI VOWEL SIGN II {0x11633, 0x1163A, prN}, // Mn [8] MODI VOWEL SIGN U..MODI VOWEL SIGN AI {0x1163B, 0x1163C, prN}, // Mc [2] MODI VOWEL SIGN O..MODI VOWEL SIGN AU {0x1163D, 0x1163D, prN}, // Mn MODI SIGN ANUSVARA {0x1163E, 0x1163E, prN}, // Mc MODI SIGN VISARGA {0x1163F, 0x11640, prN}, // Mn [2] MODI SIGN VIRAMA..MODI SIGN ARDHACANDRA {0x11641, 0x11643, prN}, // Po [3] MODI DANDA..MODI ABBREVIATION SIGN {0x11644, 0x11644, prN}, // Lo MODI SIGN HUVA {0x11650, 0x11659, prN}, // Nd [10] MODI DIGIT ZERO..MODI DIGIT NINE {0x11660, 0x1166C, prN}, // Po [13] MONGOLIAN BIRGA WITH ORNAMENT..MONGOLIAN TURNED SWIRL BIRGA WITH DOUBLE ORNAMENT {0x11680, 0x116AA, prN}, // Lo [43] TAKRI LETTER A..TAKRI LETTER RRA {0x116AB, 0x116AB, prN}, // Mn TAKRI SIGN ANUSVARA {0x116AC, 0x116AC, prN}, // Mc TAKRI SIGN VISARGA {0x116AD, 0x116AD, prN}, // Mn TAKRI VOWEL SIGN AA {0x116AE, 0x116AF, prN}, // Mc [2] TAKRI VOWEL SIGN I..TAKRI VOWEL SIGN II {0x116B0, 0x116B5, prN}, // Mn [6] TAKRI VOWEL SIGN U..TAKRI VOWEL SIGN AU {0x116B6, 0x116B6, prN}, // Mc TAKRI SIGN VIRAMA {0x116B7, 0x116B7, prN}, // Mn TAKRI SIGN NUKTA {0x116B8, 0x116B8, prN}, // Lo TAKRI LETTER ARCHAIC KHA {0x116B9, 0x116B9, prN}, // Po TAKRI ABBREVIATION SIGN {0x116C0, 0x116C9, prN}, // Nd [10] TAKRI DIGIT ZERO..TAKRI DIGIT NINE {0x11700, 0x1171A, prN}, // Lo [27] AHOM LETTER KA..AHOM LETTER ALTERNATE BA {0x1171D, 0x1171F, prN}, // Mn [3] AHOM CONSONANT SIGN MEDIAL LA..AHOM CONSONANT SIGN MEDIAL LIGATING RA {0x11720, 0x11721, prN}, // Mc [2] AHOM VOWEL SIGN A..AHOM VOWEL SIGN AA {0x11722, 0x11725, prN}, // Mn [4] AHOM VOWEL SIGN I..AHOM VOWEL SIGN UU {0x11726, 0x11726, prN}, // Mc AHOM VOWEL SIGN E {0x11727, 0x1172B, prN}, // Mn [5] AHOM VOWEL SIGN AW..AHOM SIGN KILLER {0x11730, 0x11739, prN}, // Nd [10] AHOM DIGIT ZERO..AHOM DIGIT NINE {0x1173A, 0x1173B, prN}, // No [2] AHOM NUMBER TEN..AHOM NUMBER TWENTY {0x1173C, 0x1173E, prN}, // Po [3] AHOM SIGN SMALL SECTION..AHOM SIGN RULAI {0x1173F, 0x1173F, prN}, // So AHOM SYMBOL VI {0x11740, 0x11746, prN}, // Lo [7] AHOM LETTER CA..AHOM LETTER LLA {0x11800, 0x1182B, prN}, // Lo [44] DOGRA LETTER A..DOGRA LETTER RRA {0x1182C, 0x1182E, prN}, // Mc [3] DOGRA VOWEL SIGN AA..DOGRA VOWEL SIGN II {0x1182F, 0x11837, prN}, // Mn [9] DOGRA VOWEL SIGN U..DOGRA SIGN ANUSVARA {0x11838, 0x11838, prN}, // Mc DOGRA SIGN VISARGA {0x11839, 0x1183A, prN}, // Mn [2] DOGRA SIGN VIRAMA..DOGRA SIGN NUKTA {0x1183B, 0x1183B, prN}, // Po DOGRA ABBREVIATION SIGN {0x118A0, 0x118DF, prN}, // L& [64] WARANG CITI CAPITAL LETTER NGAA..WARANG CITI SMALL LETTER VIYO {0x118E0, 0x118E9, prN}, // Nd [10] WARANG CITI DIGIT ZERO..WARANG CITI DIGIT NINE {0x118EA, 0x118F2, prN}, // No [9] WARANG CITI NUMBER TEN..WARANG CITI NUMBER NINETY {0x118FF, 0x118FF, prN}, // Lo WARANG CITI OM {0x11900, 0x11906, prN}, // Lo [7] DIVES AKURU LETTER A..DIVES AKURU LETTER E {0x11909, 0x11909, prN}, // Lo DIVES AKURU LETTER O {0x1190C, 0x11913, prN}, // Lo [8] DIVES AKURU LETTER KA..DIVES AKURU LETTER JA {0x11915, 0x11916, prN}, // Lo [2] DIVES AKURU LETTER NYA..DIVES AKURU LETTER TTA {0x11918, 0x1192F, prN}, // Lo [24] DIVES AKURU LETTER DDA..DIVES AKURU LETTER ZA {0x11930, 0x11935, prN}, // Mc [6] DIVES AKURU VOWEL SIGN AA..DIVES AKURU VOWEL SIGN E {0x11937, 0x11938, prN}, // Mc [2] DIVES AKURU VOWEL SIGN AI..DIVES AKURU VOWEL SIGN O {0x1193B, 0x1193C, prN}, // Mn [2] DIVES AKURU SIGN ANUSVARA..DIVES AKURU SIGN CANDRABINDU {0x1193D, 0x1193D, prN}, // Mc DIVES AKURU SIGN HALANTA {0x1193E, 0x1193E, prN}, // Mn DIVES AKURU VIRAMA {0x1193F, 0x1193F, prN}, // Lo DIVES AKURU PREFIXED NASAL SIGN {0x11940, 0x11940, prN}, // Mc DIVES AKURU MEDIAL YA {0x11941, 0x11941, prN}, // Lo DIVES AKURU INITIAL RA {0x11942, 0x11942, prN}, // Mc DIVES AKURU MEDIAL RA {0x11943, 0x11943, prN}, // Mn DIVES AKURU SIGN NUKTA {0x11944, 0x11946, prN}, // Po [3] DIVES AKURU DOUBLE DANDA..DIVES AKURU END OF TEXT MARK {0x11950, 0x11959, prN}, // Nd [10] DIVES AKURU DIGIT ZERO..DIVES AKURU DIGIT NINE {0x119A0, 0x119A7, prN}, // Lo [8] NANDINAGARI LETTER A..NANDINAGARI LETTER VOCALIC RR {0x119AA, 0x119D0, prN}, // Lo [39] NANDINAGARI LETTER E..NANDINAGARI LETTER RRA {0x119D1, 0x119D3, prN}, // Mc [3] NANDINAGARI VOWEL SIGN AA..NANDINAGARI VOWEL SIGN II {0x119D4, 0x119D7, prN}, // Mn [4] NANDINAGARI VOWEL SIGN U..NANDINAGARI VOWEL SIGN VOCALIC RR {0x119DA, 0x119DB, prN}, // Mn [2] NANDINAGARI VOWEL SIGN E..NANDINAGARI VOWEL SIGN AI {0x119DC, 0x119DF, prN}, // Mc [4] NANDINAGARI VOWEL SIGN O..NANDINAGARI SIGN VISARGA {0x119E0, 0x119E0, prN}, // Mn NANDINAGARI SIGN VIRAMA {0x119E1, 0x119E1, prN}, // Lo NANDINAGARI SIGN AVAGRAHA {0x119E2, 0x119E2, prN}, // Po NANDINAGARI SIGN SIDDHAM {0x119E3, 0x119E3, prN}, // Lo NANDINAGARI HEADSTROKE {0x119E4, 0x119E4, prN}, // Mc NANDINAGARI VOWEL SIGN PRISHTHAMATRA E {0x11A00, 0x11A00, prN}, // Lo ZANABAZAR SQUARE LETTER A {0x11A01, 0x11A0A, prN}, // Mn [10] ZANABAZAR SQUARE VOWEL SIGN I..ZANABAZAR SQUARE VOWEL LENGTH MARK {0x11A0B, 0x11A32, prN}, // Lo [40] ZANABAZAR SQUARE LETTER KA..ZANABAZAR SQUARE LETTER KSSA {0x11A33, 0x11A38, prN}, // Mn [6] ZANABAZAR SQUARE FINAL CONSONANT MARK..ZANABAZAR SQUARE SIGN ANUSVARA {0x11A39, 0x11A39, prN}, // Mc ZANABAZAR SQUARE SIGN VISARGA {0x11A3A, 0x11A3A, prN}, // Lo ZANABAZAR SQUARE CLUSTER-INITIAL LETTER RA {0x11A3B, 0x11A3E, prN}, // Mn [4] ZANABAZAR SQUARE CLUSTER-FINAL LETTER YA..ZANABAZAR SQUARE CLUSTER-FINAL LETTER VA {0x11A3F, 0x11A46, prN}, // Po [8] ZANABAZAR SQUARE INITIAL HEAD MARK..ZANABAZAR SQUARE CLOSING DOUBLE-LINED HEAD MARK {0x11A47, 0x11A47, prN}, // Mn ZANABAZAR SQUARE SUBJOINER {0x11A50, 0x11A50, prN}, // Lo SOYOMBO LETTER A {0x11A51, 0x11A56, prN}, // Mn [6] SOYOMBO VOWEL SIGN I..SOYOMBO VOWEL SIGN OE {0x11A57, 0x11A58, prN}, // Mc [2] SOYOMBO VOWEL SIGN AI..SOYOMBO VOWEL SIGN AU {0x11A59, 0x11A5B, prN}, // Mn [3] SOYOMBO VOWEL SIGN VOCALIC R..SOYOMBO VOWEL LENGTH MARK {0x11A5C, 0x11A89, prN}, // Lo [46] SOYOMBO LETTER KA..SOYOMBO CLUSTER-INITIAL LETTER SA {0x11A8A, 0x11A96, prN}, // Mn [13] SOYOMBO FINAL CONSONANT SIGN G..SOYOMBO SIGN ANUSVARA {0x11A97, 0x11A97, prN}, // Mc SOYOMBO SIGN VISARGA {0x11A98, 0x11A99, prN}, // Mn [2] SOYOMBO GEMINATION MARK..SOYOMBO SUBJOINER {0x11A9A, 0x11A9C, prN}, // Po [3] SOYOMBO MARK TSHEG..SOYOMBO MARK DOUBLE SHAD {0x11A9D, 0x11A9D, prN}, // Lo SOYOMBO MARK PLUTA {0x11A9E, 0x11AA2, prN}, // Po [5] SOYOMBO HEAD MARK WITH MOON AND SUN AND TRIPLE FLAME..SOYOMBO TERMINAL MARK-2 {0x11AB0, 0x11ABF, prN}, // Lo [16] CANADIAN SYLLABICS NATTILIK HI..CANADIAN SYLLABICS SPA {0x11AC0, 0x11AF8, prN}, // Lo [57] PAU CIN HAU LETTER PA..PAU CIN HAU GLOTTAL STOP FINAL {0x11B00, 0x11B09, prN}, // Po [10] DEVANAGARI HEAD MARK..DEVANAGARI SIGN MINDU {0x11C00, 0x11C08, prN}, // Lo [9] BHAIKSUKI LETTER A..BHAIKSUKI LETTER VOCALIC L {0x11C0A, 0x11C2E, prN}, // Lo [37] BHAIKSUKI LETTER E..BHAIKSUKI LETTER HA {0x11C2F, 0x11C2F, prN}, // Mc BHAIKSUKI VOWEL SIGN AA {0x11C30, 0x11C36, prN}, // Mn [7] BHAIKSUKI VOWEL SIGN I..BHAIKSUKI VOWEL SIGN VOCALIC L {0x11C38, 0x11C3D, prN}, // Mn [6] BHAIKSUKI VOWEL SIGN E..BHAIKSUKI SIGN ANUSVARA {0x11C3E, 0x11C3E, prN}, // Mc BHAIKSUKI SIGN VISARGA {0x11C3F, 0x11C3F, prN}, // Mn BHAIKSUKI SIGN VIRAMA {0x11C40, 0x11C40, prN}, // Lo BHAIKSUKI SIGN AVAGRAHA {0x11C41, 0x11C45, prN}, // Po [5] BHAIKSUKI DANDA..BHAIKSUKI GAP FILLER-2 {0x11C50, 0x11C59, prN}, // Nd [10] BHAIKSUKI DIGIT ZERO..BHAIKSUKI DIGIT NINE {0x11C5A, 0x11C6C, prN}, // No [19] BHAIKSUKI NUMBER ONE..BHAIKSUKI HUNDREDS UNIT MARK {0x11C70, 0x11C71, prN}, // Po [2] MARCHEN HEAD MARK..MARCHEN MARK SHAD {0x11C72, 0x11C8F, prN}, // Lo [30] MARCHEN LETTER KA..MARCHEN LETTER A {0x11C92, 0x11CA7, prN}, // Mn [22] MARCHEN SUBJOINED LETTER KA..MARCHEN SUBJOINED LETTER ZA {0x11CA9, 0x11CA9, prN}, // Mc MARCHEN SUBJOINED LETTER YA {0x11CAA, 0x11CB0, prN}, // Mn [7] MARCHEN SUBJOINED LETTER RA..MARCHEN VOWEL SIGN AA {0x11CB1, 0x11CB1, prN}, // Mc MARCHEN VOWEL SIGN I {0x11CB2, 0x11CB3, prN}, // Mn [2] MARCHEN VOWEL SIGN U..MARCHEN VOWEL SIGN E {0x11CB4, 0x11CB4, prN}, // Mc MARCHEN VOWEL SIGN O {0x11CB5, 0x11CB6, prN}, // Mn [2] MARCHEN SIGN ANUSVARA..MARCHEN SIGN CANDRABINDU {0x11D00, 0x11D06, prN}, // Lo [7] MASARAM GONDI LETTER A..MASARAM GONDI LETTER E {0x11D08, 0x11D09, prN}, // Lo [2] MASARAM GONDI LETTER AI..MASARAM GONDI LETTER O {0x11D0B, 0x11D30, prN}, // Lo [38] MASARAM GONDI LETTER AU..MASARAM GONDI LETTER TRA {0x11D31, 0x11D36, prN}, // Mn [6] MASARAM GONDI VOWEL SIGN AA..MASARAM GONDI VOWEL SIGN VOCALIC R {0x11D3A, 0x11D3A, prN}, // Mn MASARAM GONDI VOWEL SIGN E {0x11D3C, 0x11D3D, prN}, // Mn [2] MASARAM GONDI VOWEL SIGN AI..MASARAM GONDI VOWEL SIGN O {0x11D3F, 0x11D45, prN}, // Mn [7] MASARAM GONDI VOWEL SIGN AU..MASARAM GONDI VIRAMA {0x11D46, 0x11D46, prN}, // Lo MASARAM GONDI REPHA {0x11D47, 0x11D47, prN}, // Mn MASARAM GONDI RA-KARA {0x11D50, 0x11D59, prN}, // Nd [10] MASARAM GONDI DIGIT ZERO..MASARAM GONDI DIGIT NINE {0x11D60, 0x11D65, prN}, // Lo [6] GUNJALA GONDI LETTER A..GUNJALA GONDI LETTER UU {0x11D67, 0x11D68, prN}, // Lo [2] GUNJALA GONDI LETTER EE..GUNJALA GONDI LETTER AI {0x11D6A, 0x11D89, prN}, // Lo [32] GUNJALA GONDI LETTER OO..GUNJALA GONDI LETTER SA {0x11D8A, 0x11D8E, prN}, // Mc [5] GUNJALA GONDI VOWEL SIGN AA..GUNJALA GONDI VOWEL SIGN UU {0x11D90, 0x11D91, prN}, // Mn [2] GUNJALA GONDI VOWEL SIGN EE..GUNJALA GONDI VOWEL SIGN AI {0x11D93, 0x11D94, prN}, // Mc [2] GUNJALA GONDI VOWEL SIGN OO..GUNJALA GONDI VOWEL SIGN AU {0x11D95, 0x11D95, prN}, // Mn GUNJALA GONDI SIGN ANUSVARA {0x11D96, 0x11D96, prN}, // Mc GUNJALA GONDI SIGN VISARGA {0x11D97, 0x11D97, prN}, // Mn GUNJALA GONDI VIRAMA {0x11D98, 0x11D98, prN}, // Lo GUNJALA GONDI OM {0x11DA0, 0x11DA9, prN}, // Nd [10] GUNJALA GONDI DIGIT ZERO..GUNJALA GONDI DIGIT NINE {0x11EE0, 0x11EF2, prN}, // Lo [19] MAKASAR LETTER KA..MAKASAR ANGKA {0x11EF3, 0x11EF4, prN}, // Mn [2] MAKASAR VOWEL SIGN I..MAKASAR VOWEL SIGN U {0x11EF5, 0x11EF6, prN}, // Mc [2] MAKASAR VOWEL SIGN E..MAKASAR VOWEL SIGN O {0x11EF7, 0x11EF8, prN}, // Po [2] MAKASAR PASSIMBANG..MAKASAR END OF SECTION {0x11F00, 0x11F01, prN}, // Mn [2] KAWI SIGN CANDRABINDU..KAWI SIGN ANUSVARA {0x11F02, 0x11F02, prN}, // Lo KAWI SIGN REPHA {0x11F03, 0x11F03, prN}, // Mc KAWI SIGN VISARGA {0x11F04, 0x11F10, prN}, // Lo [13] KAWI LETTER A..KAWI LETTER O {0x11F12, 0x11F33, prN}, // Lo [34] KAWI LETTER KA..KAWI LETTER JNYA {0x11F34, 0x11F35, prN}, // Mc [2] KAWI VOWEL SIGN AA..KAWI VOWEL SIGN ALTERNATE AA {0x11F36, 0x11F3A, prN}, // Mn [5] KAWI VOWEL SIGN I..KAWI VOWEL SIGN VOCALIC R {0x11F3E, 0x11F3F, prN}, // Mc [2] KAWI VOWEL SIGN E..KAWI VOWEL SIGN AI {0x11F40, 0x11F40, prN}, // Mn KAWI VOWEL SIGN EU {0x11F41, 0x11F41, prN}, // Mc KAWI SIGN KILLER {0x11F42, 0x11F42, prN}, // Mn KAWI CONJOINER {0x11F43, 0x11F4F, prN}, // Po [13] KAWI DANDA..KAWI PUNCTUATION CLOSING SPIRAL {0x11F50, 0x11F59, prN}, // Nd [10] KAWI DIGIT ZERO..KAWI DIGIT NINE {0x11FB0, 0x11FB0, prN}, // Lo LISU LETTER YHA {0x11FC0, 0x11FD4, prN}, // No [21] TAMIL FRACTION ONE THREE-HUNDRED-AND-TWENTIETH..TAMIL FRACTION DOWNSCALING FACTOR KIIZH {0x11FD5, 0x11FDC, prN}, // So [8] TAMIL SIGN NEL..TAMIL SIGN MUKKURUNI {0x11FDD, 0x11FE0, prN}, // Sc [4] TAMIL SIGN KAACU..TAMIL SIGN VARAAKAN {0x11FE1, 0x11FF1, prN}, // So [17] TAMIL SIGN PAARAM..TAMIL SIGN VAKAIYARAA {0x11FFF, 0x11FFF, prN}, // Po TAMIL PUNCTUATION END OF TEXT {0x12000, 0x12399, prN}, // Lo [922] CUNEIFORM SIGN A..CUNEIFORM SIGN U U {0x12400, 0x1246E, prN}, // Nl [111] CUNEIFORM NUMERIC SIGN TWO ASH..CUNEIFORM NUMERIC SIGN NINE U VARIANT FORM {0x12470, 0x12474, prN}, // Po [5] CUNEIFORM PUNCTUATION SIGN OLD ASSYRIAN WORD DIVIDER..CUNEIFORM PUNCTUATION SIGN DIAGONAL QUADCOLON {0x12480, 0x12543, prN}, // Lo [196] CUNEIFORM SIGN AB TIMES NUN TENU..CUNEIFORM SIGN ZU5 TIMES THREE DISH TENU {0x12F90, 0x12FF0, prN}, // Lo [97] CYPRO-MINOAN SIGN CM001..CYPRO-MINOAN SIGN CM114 {0x12FF1, 0x12FF2, prN}, // Po [2] CYPRO-MINOAN SIGN CM301..CYPRO-MINOAN SIGN CM302 {0x13000, 0x1342F, prN}, // Lo [1072] EGYPTIAN HIEROGLYPH A001..EGYPTIAN HIEROGLYPH V011D {0x13430, 0x1343F, prN}, // Cf [16] EGYPTIAN HIEROGLYPH VERTICAL JOINER..EGYPTIAN HIEROGLYPH END WALLED ENCLOSURE {0x13440, 0x13440, prN}, // Mn EGYPTIAN HIEROGLYPH MIRROR HORIZONTALLY {0x13441, 0x13446, prN}, // Lo [6] EGYPTIAN HIEROGLYPH FULL BLANK..EGYPTIAN HIEROGLYPH WIDE LOST SIGN {0x13447, 0x13455, prN}, // Mn [15] EGYPTIAN HIEROGLYPH MODIFIER DAMAGED AT TOP START..EGYPTIAN HIEROGLYPH MODIFIER DAMAGED {0x14400, 0x14646, prN}, // Lo [583] ANATOLIAN HIEROGLYPH A001..ANATOLIAN HIEROGLYPH A530 {0x16800, 0x16A38, prN}, // Lo [569] BAMUM LETTER PHASE-A NGKUE MFON..BAMUM LETTER PHASE-F VUEQ {0x16A40, 0x16A5E, prN}, // Lo [31] MRO LETTER TA..MRO LETTER TEK {0x16A60, 0x16A69, prN}, // Nd [10] MRO DIGIT ZERO..MRO DIGIT NINE {0x16A6E, 0x16A6F, prN}, // Po [2] MRO DANDA..MRO DOUBLE DANDA {0x16A70, 0x16ABE, prN}, // Lo [79] TANGSA LETTER OZ..TANGSA LETTER ZA {0x16AC0, 0x16AC9, prN}, // Nd [10] TANGSA DIGIT ZERO..TANGSA DIGIT NINE {0x16AD0, 0x16AED, prN}, // Lo [30] BASSA VAH LETTER ENNI..BASSA VAH LETTER I {0x16AF0, 0x16AF4, prN}, // Mn [5] BASSA VAH COMBINING HIGH TONE..BASSA VAH COMBINING HIGH-LOW TONE {0x16AF5, 0x16AF5, prN}, // Po BASSA VAH FULL STOP {0x16B00, 0x16B2F, prN}, // Lo [48] PAHAWH HMONG VOWEL KEEB..PAHAWH HMONG CONSONANT CAU {0x16B30, 0x16B36, prN}, // Mn [7] PAHAWH HMONG MARK CIM TUB..PAHAWH HMONG MARK CIM TAUM {0x16B37, 0x16B3B, prN}, // Po [5] PAHAWH HMONG SIGN VOS THOM..PAHAWH HMONG SIGN VOS FEEM {0x16B3C, 0x16B3F, prN}, // So [4] PAHAWH HMONG SIGN XYEEM NTXIV..PAHAWH HMONG SIGN XYEEM FAIB {0x16B40, 0x16B43, prN}, // Lm [4] PAHAWH HMONG SIGN VOS SEEV..PAHAWH HMONG SIGN IB YAM {0x16B44, 0x16B44, prN}, // Po PAHAWH HMONG SIGN XAUS {0x16B45, 0x16B45, prN}, // So PAHAWH HMONG SIGN CIM TSOV ROG {0x16B50, 0x16B59, prN}, // Nd [10] PAHAWH HMONG DIGIT ZERO..PAHAWH HMONG DIGIT NINE {0x16B5B, 0x16B61, prN}, // No [7] PAHAWH HMONG NUMBER TENS..PAHAWH HMONG NUMBER TRILLIONS {0x16B63, 0x16B77, prN}, // Lo [21] PAHAWH HMONG SIGN VOS LUB..PAHAWH HMONG SIGN CIM NRES TOS {0x16B7D, 0x16B8F, prN}, // Lo [19] PAHAWH HMONG CLAN SIGN TSHEEJ..PAHAWH HMONG CLAN SIGN VWJ {0x16E40, 0x16E7F, prN}, // L& [64] MEDEFAIDRIN CAPITAL LETTER M..MEDEFAIDRIN SMALL LETTER Y {0x16E80, 0x16E96, prN}, // No [23] MEDEFAIDRIN DIGIT ZERO..MEDEFAIDRIN DIGIT THREE ALTERNATE FORM {0x16E97, 0x16E9A, prN}, // Po [4] MEDEFAIDRIN COMMA..MEDEFAIDRIN EXCLAMATION OH {0x16F00, 0x16F4A, prN}, // Lo [75] MIAO LETTER PA..MIAO LETTER RTE {0x16F4F, 0x16F4F, prN}, // Mn MIAO SIGN CONSONANT MODIFIER BAR {0x16F50, 0x16F50, prN}, // Lo MIAO LETTER NASALIZATION {0x16F51, 0x16F87, prN}, // Mc [55] MIAO SIGN ASPIRATION..MIAO VOWEL SIGN UI {0x16F8F, 0x16F92, prN}, // Mn [4] MIAO TONE RIGHT..MIAO TONE BELOW {0x16F93, 0x16F9F, prN}, // Lm [13] MIAO LETTER TONE-2..MIAO LETTER REFORMED TONE-8 {0x16FE0, 0x16FE1, prW}, // Lm [2] TANGUT ITERATION MARK..NUSHU ITERATION MARK {0x16FE2, 0x16FE2, prW}, // Po OLD CHINESE HOOK MARK {0x16FE3, 0x16FE3, prW}, // Lm OLD CHINESE ITERATION MARK {0x16FE4, 0x16FE4, prW}, // Mn KHITAN SMALL SCRIPT FILLER {0x16FF0, 0x16FF1, prW}, // Mc [2] VIETNAMESE ALTERNATE READING MARK CA..VIETNAMESE ALTERNATE READING MARK NHAY {0x17000, 0x187F7, prW}, // Lo [6136] TANGUT IDEOGRAPH-17000..TANGUT IDEOGRAPH-187F7 {0x18800, 0x18AFF, prW}, // Lo [768] TANGUT COMPONENT-001..TANGUT COMPONENT-768 {0x18B00, 0x18CD5, prW}, // Lo [470] KHITAN SMALL SCRIPT CHARACTER-18B00..KHITAN SMALL SCRIPT CHARACTER-18CD5 {0x18D00, 0x18D08, prW}, // Lo [9] TANGUT IDEOGRAPH-18D00..TANGUT IDEOGRAPH-18D08 {0x1AFF0, 0x1AFF3, prW}, // Lm [4] KATAKANA LETTER MINNAN TONE-2..KATAKANA LETTER MINNAN TONE-5 {0x1AFF5, 0x1AFFB, prW}, // Lm [7] KATAKANA LETTER MINNAN TONE-7..KATAKANA LETTER MINNAN NASALIZED TONE-5 {0x1AFFD, 0x1AFFE, prW}, // Lm [2] KATAKANA LETTER MINNAN NASALIZED TONE-7..KATAKANA LETTER MINNAN NASALIZED TONE-8 {0x1B000, 0x1B0FF, prW}, // Lo [256] KATAKANA LETTER ARCHAIC E..HENTAIGANA LETTER RE-2 {0x1B100, 0x1B122, prW}, // Lo [35] HENTAIGANA LETTER RE-3..KATAKANA LETTER ARCHAIC WU {0x1B132, 0x1B132, prW}, // Lo HIRAGANA LETTER SMALL KO {0x1B150, 0x1B152, prW}, // Lo [3] HIRAGANA LETTER SMALL WI..HIRAGANA LETTER SMALL WO {0x1B155, 0x1B155, prW}, // Lo KATAKANA LETTER SMALL KO {0x1B164, 0x1B167, prW}, // Lo [4] KATAKANA LETTER SMALL WI..KATAKANA LETTER SMALL N {0x1B170, 0x1B2FB, prW}, // Lo [396] NUSHU CHARACTER-1B170..NUSHU CHARACTER-1B2FB {0x1BC00, 0x1BC6A, prN}, // Lo [107] DUPLOYAN LETTER H..DUPLOYAN LETTER VOCALIC M {0x1BC70, 0x1BC7C, prN}, // Lo [13] DUPLOYAN AFFIX LEFT HORIZONTAL SECANT..DUPLOYAN AFFIX ATTACHED TANGENT HOOK {0x1BC80, 0x1BC88, prN}, // Lo [9] DUPLOYAN AFFIX HIGH ACUTE..DUPLOYAN AFFIX HIGH VERTICAL {0x1BC90, 0x1BC99, prN}, // Lo [10] DUPLOYAN AFFIX LOW ACUTE..DUPLOYAN AFFIX LOW ARROW {0x1BC9C, 0x1BC9C, prN}, // So DUPLOYAN SIGN O WITH CROSS {0x1BC9D, 0x1BC9E, prN}, // Mn [2] DUPLOYAN THICK LETTER SELECTOR..DUPLOYAN DOUBLE MARK {0x1BC9F, 0x1BC9F, prN}, // Po DUPLOYAN PUNCTUATION CHINOOK FULL STOP {0x1BCA0, 0x1BCA3, prN}, // Cf [4] SHORTHAND FORMAT LETTER OVERLAP..SHORTHAND FORMAT UP STEP {0x1CF00, 0x1CF2D, prN}, // Mn [46] ZNAMENNY COMBINING MARK GORAZDO NIZKO S KRYZHEM ON LEFT..ZNAMENNY COMBINING MARK KRYZH ON LEFT {0x1CF30, 0x1CF46, prN}, // Mn [23] ZNAMENNY COMBINING TONAL RANGE MARK MRACHNO..ZNAMENNY PRIZNAK MODIFIER ROG {0x1CF50, 0x1CFC3, prN}, // So [116] ZNAMENNY NEUME KRYUK..ZNAMENNY NEUME PAUK {0x1D000, 0x1D0F5, prN}, // So [246] BYZANTINE MUSICAL SYMBOL PSILI..BYZANTINE MUSICAL SYMBOL GORGON NEO KATO {0x1D100, 0x1D126, prN}, // So [39] MUSICAL SYMBOL SINGLE BARLINE..MUSICAL SYMBOL DRUM CLEF-2 {0x1D129, 0x1D164, prN}, // So [60] MUSICAL SYMBOL MULTIPLE MEASURE REST..MUSICAL SYMBOL ONE HUNDRED TWENTY-EIGHTH NOTE {0x1D165, 0x1D166, prN}, // Mc [2] MUSICAL SYMBOL COMBINING STEM..MUSICAL SYMBOL COMBINING SPRECHGESANG STEM {0x1D167, 0x1D169, prN}, // Mn [3] MUSICAL SYMBOL COMBINING TREMOLO-1..MUSICAL SYMBOL COMBINING TREMOLO-3 {0x1D16A, 0x1D16C, prN}, // So [3] MUSICAL SYMBOL FINGERED TREMOLO-1..MUSICAL SYMBOL FINGERED TREMOLO-3 {0x1D16D, 0x1D172, prN}, // Mc [6] MUSICAL SYMBOL COMBINING AUGMENTATION DOT..MUSICAL SYMBOL COMBINING FLAG-5 {0x1D173, 0x1D17A, prN}, // Cf [8] MUSICAL SYMBOL BEGIN BEAM..MUSICAL SYMBOL END PHRASE {0x1D17B, 0x1D182, prN}, // Mn [8] MUSICAL SYMBOL COMBINING ACCENT..MUSICAL SYMBOL COMBINING LOURE {0x1D183, 0x1D184, prN}, // So [2] MUSICAL SYMBOL ARPEGGIATO UP..MUSICAL SYMBOL ARPEGGIATO DOWN {0x1D185, 0x1D18B, prN}, // Mn [7] MUSICAL SYMBOL COMBINING DOIT..MUSICAL SYMBOL COMBINING TRIPLE TONGUE {0x1D18C, 0x1D1A9, prN}, // So [30] MUSICAL SYMBOL RINFORZANDO..MUSICAL SYMBOL DEGREE SLASH {0x1D1AA, 0x1D1AD, prN}, // Mn [4] MUSICAL SYMBOL COMBINING DOWN BOW..MUSICAL SYMBOL COMBINING SNAP PIZZICATO {0x1D1AE, 0x1D1EA, prN}, // So [61] MUSICAL SYMBOL PEDAL MARK..MUSICAL SYMBOL KORON {0x1D200, 0x1D241, prN}, // So [66] GREEK VOCAL NOTATION SYMBOL-1..GREEK INSTRUMENTAL NOTATION SYMBOL-54 {0x1D242, 0x1D244, prN}, // Mn [3] COMBINING GREEK MUSICAL TRISEME..COMBINING GREEK MUSICAL PENTASEME {0x1D245, 0x1D245, prN}, // So GREEK MUSICAL LEIMMA {0x1D2C0, 0x1D2D3, prN}, // No [20] KAKTOVIK NUMERAL ZERO..KAKTOVIK NUMERAL NINETEEN {0x1D2E0, 0x1D2F3, prN}, // No [20] MAYAN NUMERAL ZERO..MAYAN NUMERAL NINETEEN {0x1D300, 0x1D356, prN}, // So [87] MONOGRAM FOR EARTH..TETRAGRAM FOR FOSTERING {0x1D360, 0x1D378, prN}, // No [25] COUNTING ROD UNIT DIGIT ONE..TALLY MARK FIVE {0x1D400, 0x1D454, prN}, // L& [85] MATHEMATICAL BOLD CAPITAL A..MATHEMATICAL ITALIC SMALL G {0x1D456, 0x1D49C, prN}, // L& [71] MATHEMATICAL ITALIC SMALL I..MATHEMATICAL SCRIPT CAPITAL A {0x1D49E, 0x1D49F, prN}, // Lu [2] MATHEMATICAL SCRIPT CAPITAL C..MATHEMATICAL SCRIPT CAPITAL D {0x1D4A2, 0x1D4A2, prN}, // Lu MATHEMATICAL SCRIPT CAPITAL G {0x1D4A5, 0x1D4A6, prN}, // Lu [2] MATHEMATICAL SCRIPT CAPITAL J..MATHEMATICAL SCRIPT CAPITAL K {0x1D4A9, 0x1D4AC, prN}, // Lu [4] MATHEMATICAL SCRIPT CAPITAL N..MATHEMATICAL SCRIPT CAPITAL Q {0x1D4AE, 0x1D4B9, prN}, // L& [12] MATHEMATICAL SCRIPT CAPITAL S..MATHEMATICAL SCRIPT SMALL D {0x1D4BB, 0x1D4BB, prN}, // Ll MATHEMATICAL SCRIPT SMALL F {0x1D4BD, 0x1D4C3, prN}, // Ll [7] MATHEMATICAL SCRIPT SMALL H..MATHEMATICAL SCRIPT SMALL N {0x1D4C5, 0x1D505, prN}, // L& [65] MATHEMATICAL SCRIPT SMALL P..MATHEMATICAL FRAKTUR CAPITAL B {0x1D507, 0x1D50A, prN}, // Lu [4] MATHEMATICAL FRAKTUR CAPITAL D..MATHEMATICAL FRAKTUR CAPITAL G {0x1D50D, 0x1D514, prN}, // Lu [8] MATHEMATICAL FRAKTUR CAPITAL J..MATHEMATICAL FRAKTUR CAPITAL Q {0x1D516, 0x1D51C, prN}, // Lu [7] MATHEMATICAL FRAKTUR CAPITAL S..MATHEMATICAL FRAKTUR CAPITAL Y {0x1D51E, 0x1D539, prN}, // L& [28] MATHEMATICAL FRAKTUR SMALL A..MATHEMATICAL DOUBLE-STRUCK CAPITAL B {0x1D53B, 0x1D53E, prN}, // Lu [4] MATHEMATICAL DOUBLE-STRUCK CAPITAL D..MATHEMATICAL DOUBLE-STRUCK CAPITAL G {0x1D540, 0x1D544, prN}, // Lu [5] MATHEMATICAL DOUBLE-STRUCK CAPITAL I..MATHEMATICAL DOUBLE-STRUCK CAPITAL M {0x1D546, 0x1D546, prN}, // Lu MATHEMATICAL DOUBLE-STRUCK CAPITAL O {0x1D54A, 0x1D550, prN}, // Lu [7] MATHEMATICAL DOUBLE-STRUCK CAPITAL S..MATHEMATICAL DOUBLE-STRUCK CAPITAL Y {0x1D552, 0x1D6A5, prN}, // L& [340] MATHEMATICAL DOUBLE-STRUCK SMALL A..MATHEMATICAL ITALIC SMALL DOTLESS J {0x1D6A8, 0x1D6C0, prN}, // Lu [25] MATHEMATICAL BOLD CAPITAL ALPHA..MATHEMATICAL BOLD CAPITAL OMEGA {0x1D6C1, 0x1D6C1, prN}, // Sm MATHEMATICAL BOLD NABLA {0x1D6C2, 0x1D6DA, prN}, // Ll [25] MATHEMATICAL BOLD SMALL ALPHA..MATHEMATICAL BOLD SMALL OMEGA {0x1D6DB, 0x1D6DB, prN}, // Sm MATHEMATICAL BOLD PARTIAL DIFFERENTIAL {0x1D6DC, 0x1D6FA, prN}, // L& [31] MATHEMATICAL BOLD EPSILON SYMBOL..MATHEMATICAL ITALIC CAPITAL OMEGA {0x1D6FB, 0x1D6FB, prN}, // Sm MATHEMATICAL ITALIC NABLA {0x1D6FC, 0x1D714, prN}, // Ll [25] MATHEMATICAL ITALIC SMALL ALPHA..MATHEMATICAL ITALIC SMALL OMEGA {0x1D715, 0x1D715, prN}, // Sm MATHEMATICAL ITALIC PARTIAL DIFFERENTIAL {0x1D716, 0x1D734, prN}, // L& [31] MATHEMATICAL ITALIC EPSILON SYMBOL..MATHEMATICAL BOLD ITALIC CAPITAL OMEGA {0x1D735, 0x1D735, prN}, // Sm MATHEMATICAL BOLD ITALIC NABLA {0x1D736, 0x1D74E, prN}, // Ll [25] MATHEMATICAL BOLD ITALIC SMALL ALPHA..MATHEMATICAL BOLD ITALIC SMALL OMEGA {0x1D74F, 0x1D74F, prN}, // Sm MATHEMATICAL BOLD ITALIC PARTIAL DIFFERENTIAL {0x1D750, 0x1D76E, prN}, // L& [31] MATHEMATICAL BOLD ITALIC EPSILON SYMBOL..MATHEMATICAL SANS-SERIF BOLD CAPITAL OMEGA {0x1D76F, 0x1D76F, prN}, // Sm MATHEMATICAL SANS-SERIF BOLD NABLA {0x1D770, 0x1D788, prN}, // Ll [25] MATHEMATICAL SANS-SERIF BOLD SMALL ALPHA..MATHEMATICAL SANS-SERIF BOLD SMALL OMEGA {0x1D789, 0x1D789, prN}, // Sm MATHEMATICAL SANS-SERIF BOLD PARTIAL DIFFERENTIAL {0x1D78A, 0x1D7A8, prN}, // L& [31] MATHEMATICAL SANS-SERIF BOLD EPSILON SYMBOL..MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL OMEGA {0x1D7A9, 0x1D7A9, prN}, // Sm MATHEMATICAL SANS-SERIF BOLD ITALIC NABLA {0x1D7AA, 0x1D7C2, prN}, // Ll [25] MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL ALPHA..MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL OMEGA {0x1D7C3, 0x1D7C3, prN}, // Sm MATHEMATICAL SANS-SERIF BOLD ITALIC PARTIAL DIFFERENTIAL {0x1D7C4, 0x1D7CB, prN}, // L& [8] MATHEMATICAL SANS-SERIF BOLD ITALIC EPSILON SYMBOL..MATHEMATICAL BOLD SMALL DIGAMMA {0x1D7CE, 0x1D7FF, prN}, // Nd [50] MATHEMATICAL BOLD DIGIT ZERO..MATHEMATICAL MONOSPACE DIGIT NINE {0x1D800, 0x1D9FF, prN}, // So [512] SIGNWRITING HAND-FIST INDEX..SIGNWRITING HEAD {0x1DA00, 0x1DA36, prN}, // Mn [55] SIGNWRITING HEAD RIM..SIGNWRITING AIR SUCKING IN {0x1DA37, 0x1DA3A, prN}, // So [4] SIGNWRITING AIR BLOW SMALL ROTATIONS..SIGNWRITING BREATH EXHALE {0x1DA3B, 0x1DA6C, prN}, // Mn [50] SIGNWRITING MOUTH CLOSED NEUTRAL..SIGNWRITING EXCITEMENT {0x1DA6D, 0x1DA74, prN}, // So [8] SIGNWRITING SHOULDER HIP SPINE..SIGNWRITING TORSO-FLOORPLANE TWISTING {0x1DA75, 0x1DA75, prN}, // Mn SIGNWRITING UPPER BODY TILTING FROM HIP JOINTS {0x1DA76, 0x1DA83, prN}, // So [14] SIGNWRITING LIMB COMBINATION..SIGNWRITING LOCATION DEPTH {0x1DA84, 0x1DA84, prN}, // Mn SIGNWRITING LOCATION HEAD NECK {0x1DA85, 0x1DA86, prN}, // So [2] SIGNWRITING LOCATION TORSO..SIGNWRITING LOCATION LIMBS DIGITS {0x1DA87, 0x1DA8B, prN}, // Po [5] SIGNWRITING COMMA..SIGNWRITING PARENTHESIS {0x1DA9B, 0x1DA9F, prN}, // Mn [5] SIGNWRITING FILL MODIFIER-2..SIGNWRITING FILL MODIFIER-6 {0x1DAA1, 0x1DAAF, prN}, // Mn [15] SIGNWRITING ROTATION MODIFIER-2..SIGNWRITING ROTATION MODIFIER-16 {0x1DF00, 0x1DF09, prN}, // Ll [10] LATIN SMALL LETTER FENG DIGRAPH WITH TRILL..LATIN SMALL LETTER T WITH HOOK AND RETROFLEX HOOK {0x1DF0A, 0x1DF0A, prN}, // Lo LATIN LETTER RETROFLEX CLICK WITH RETROFLEX HOOK {0x1DF0B, 0x1DF1E, prN}, // Ll [20] LATIN SMALL LETTER ESH WITH DOUBLE BAR..LATIN SMALL LETTER S WITH CURL {0x1DF25, 0x1DF2A, prN}, // Ll [6] LATIN SMALL LETTER D WITH MID-HEIGHT LEFT HOOK..LATIN SMALL LETTER T WITH MID-HEIGHT LEFT HOOK {0x1E000, 0x1E006, prN}, // Mn [7] COMBINING GLAGOLITIC LETTER AZU..COMBINING GLAGOLITIC LETTER ZHIVETE {0x1E008, 0x1E018, prN}, // Mn [17] COMBINING GLAGOLITIC LETTER ZEMLJA..COMBINING GLAGOLITIC LETTER HERU {0x1E01B, 0x1E021, prN}, // Mn [7] COMBINING GLAGOLITIC LETTER SHTA..COMBINING GLAGOLITIC LETTER YATI {0x1E023, 0x1E024, prN}, // Mn [2] COMBINING GLAGOLITIC LETTER YU..COMBINING GLAGOLITIC LETTER SMALL YUS {0x1E026, 0x1E02A, prN}, // Mn [5] COMBINING GLAGOLITIC LETTER YO..COMBINING GLAGOLITIC LETTER FITA {0x1E030, 0x1E06D, prN}, // Lm [62] MODIFIER LETTER CYRILLIC SMALL A..MODIFIER LETTER CYRILLIC SMALL STRAIGHT U WITH STROKE {0x1E08F, 0x1E08F, prN}, // Mn COMBINING CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I {0x1E100, 0x1E12C, prN}, // Lo [45] NYIAKENG PUACHUE HMONG LETTER MA..NYIAKENG PUACHUE HMONG LETTER W {0x1E130, 0x1E136, prN}, // Mn [7] NYIAKENG PUACHUE HMONG TONE-B..NYIAKENG PUACHUE HMONG TONE-D {0x1E137, 0x1E13D, prN}, // Lm [7] NYIAKENG PUACHUE HMONG SIGN FOR PERSON..NYIAKENG PUACHUE HMONG SYLLABLE LENGTHENER {0x1E140, 0x1E149, prN}, // Nd [10] NYIAKENG PUACHUE HMONG DIGIT ZERO..NYIAKENG PUACHUE HMONG DIGIT NINE {0x1E14E, 0x1E14E, prN}, // Lo NYIAKENG PUACHUE HMONG LOGOGRAM NYAJ {0x1E14F, 0x1E14F, prN}, // So NYIAKENG PUACHUE HMONG CIRCLED CA {0x1E290, 0x1E2AD, prN}, // Lo [30] TOTO LETTER PA..TOTO LETTER A {0x1E2AE, 0x1E2AE, prN}, // Mn TOTO SIGN RISING TONE {0x1E2C0, 0x1E2EB, prN}, // Lo [44] WANCHO LETTER AA..WANCHO LETTER YIH {0x1E2EC, 0x1E2EF, prN}, // Mn [4] WANCHO TONE TUP..WANCHO TONE KOINI {0x1E2F0, 0x1E2F9, prN}, // Nd [10] WANCHO DIGIT ZERO..WANCHO DIGIT NINE {0x1E2FF, 0x1E2FF, prN}, // Sc WANCHO NGUN SIGN {0x1E4D0, 0x1E4EA, prN}, // Lo [27] NAG MUNDARI LETTER O..NAG MUNDARI LETTER ELL {0x1E4EB, 0x1E4EB, prN}, // Lm NAG MUNDARI SIGN OJOD {0x1E4EC, 0x1E4EF, prN}, // Mn [4] NAG MUNDARI SIGN MUHOR..NAG MUNDARI SIGN SUTUH {0x1E4F0, 0x1E4F9, prN}, // Nd [10] NAG MUNDARI DIGIT ZERO..NAG MUNDARI DIGIT NINE {0x1E7E0, 0x1E7E6, prN}, // Lo [7] ETHIOPIC SYLLABLE HHYA..ETHIOPIC SYLLABLE HHYO {0x1E7E8, 0x1E7EB, prN}, // Lo [4] ETHIOPIC SYLLABLE GURAGE HHWA..ETHIOPIC SYLLABLE HHWE {0x1E7ED, 0x1E7EE, prN}, // Lo [2] ETHIOPIC SYLLABLE GURAGE MWI..ETHIOPIC SYLLABLE GURAGE MWEE {0x1E7F0, 0x1E7FE, prN}, // Lo [15] ETHIOPIC SYLLABLE GURAGE QWI..ETHIOPIC SYLLABLE GURAGE PWEE {0x1E800, 0x1E8C4, prN}, // Lo [197] MENDE KIKAKUI SYLLABLE M001 KI..MENDE KIKAKUI SYLLABLE M060 NYON {0x1E8C7, 0x1E8CF, prN}, // No [9] MENDE KIKAKUI DIGIT ONE..MENDE KIKAKUI DIGIT NINE {0x1E8D0, 0x1E8D6, prN}, // Mn [7] MENDE KIKAKUI COMBINING NUMBER TEENS..MENDE KIKAKUI COMBINING NUMBER MILLIONS {0x1E900, 0x1E943, prN}, // L& [68] ADLAM CAPITAL LETTER ALIF..ADLAM SMALL LETTER SHA {0x1E944, 0x1E94A, prN}, // Mn [7] ADLAM ALIF LENGTHENER..ADLAM NUKTA {0x1E94B, 0x1E94B, prN}, // Lm ADLAM NASALIZATION MARK {0x1E950, 0x1E959, prN}, // Nd [10] ADLAM DIGIT ZERO..ADLAM DIGIT NINE {0x1E95E, 0x1E95F, prN}, // Po [2] ADLAM INITIAL EXCLAMATION MARK..ADLAM INITIAL QUESTION MARK {0x1EC71, 0x1ECAB, prN}, // No [59] INDIC SIYAQ NUMBER ONE..INDIC SIYAQ NUMBER PREFIXED NINE {0x1ECAC, 0x1ECAC, prN}, // So INDIC SIYAQ PLACEHOLDER {0x1ECAD, 0x1ECAF, prN}, // No [3] INDIC SIYAQ FRACTION ONE QUARTER..INDIC SIYAQ FRACTION THREE QUARTERS {0x1ECB0, 0x1ECB0, prN}, // Sc INDIC SIYAQ RUPEE MARK {0x1ECB1, 0x1ECB4, prN}, // No [4] INDIC SIYAQ NUMBER ALTERNATE ONE..INDIC SIYAQ ALTERNATE LAKH MARK {0x1ED01, 0x1ED2D, prN}, // No [45] OTTOMAN SIYAQ NUMBER ONE..OTTOMAN SIYAQ NUMBER NINETY THOUSAND {0x1ED2E, 0x1ED2E, prN}, // So OTTOMAN SIYAQ MARRATAN {0x1ED2F, 0x1ED3D, prN}, // No [15] OTTOMAN SIYAQ ALTERNATE NUMBER TWO..OTTOMAN SIYAQ FRACTION ONE SIXTH {0x1EE00, 0x1EE03, prN}, // Lo [4] ARABIC MATHEMATICAL ALEF..ARABIC MATHEMATICAL DAL {0x1EE05, 0x1EE1F, prN}, // Lo [27] ARABIC MATHEMATICAL WAW..ARABIC MATHEMATICAL DOTLESS QAF {0x1EE21, 0x1EE22, prN}, // Lo [2] ARABIC MATHEMATICAL INITIAL BEH..ARABIC MATHEMATICAL INITIAL JEEM {0x1EE24, 0x1EE24, prN}, // Lo ARABIC MATHEMATICAL INITIAL HEH {0x1EE27, 0x1EE27, prN}, // Lo ARABIC MATHEMATICAL INITIAL HAH {0x1EE29, 0x1EE32, prN}, // Lo [10] ARABIC MATHEMATICAL INITIAL YEH..ARABIC MATHEMATICAL INITIAL QAF {0x1EE34, 0x1EE37, prN}, // Lo [4] ARABIC MATHEMATICAL INITIAL SHEEN..ARABIC MATHEMATICAL INITIAL KHAH {0x1EE39, 0x1EE39, prN}, // Lo ARABIC MATHEMATICAL INITIAL DAD {0x1EE3B, 0x1EE3B, prN}, // Lo ARABIC MATHEMATICAL INITIAL GHAIN {0x1EE42, 0x1EE42, prN}, // Lo ARABIC MATHEMATICAL TAILED JEEM {0x1EE47, 0x1EE47, prN}, // Lo ARABIC MATHEMATICAL TAILED HAH {0x1EE49, 0x1EE49, prN}, // Lo ARABIC MATHEMATICAL TAILED YEH {0x1EE4B, 0x1EE4B, prN}, // Lo ARABIC MATHEMATICAL TAILED LAM {0x1EE4D, 0x1EE4F, prN}, // Lo [3] ARABIC MATHEMATICAL TAILED NOON..ARABIC MATHEMATICAL TAILED AIN {0x1EE51, 0x1EE52, prN}, // Lo [2] ARABIC MATHEMATICAL TAILED SAD..ARABIC MATHEMATICAL TAILED QAF {0x1EE54, 0x1EE54, prN}, // Lo ARABIC MATHEMATICAL TAILED SHEEN {0x1EE57, 0x1EE57, prN}, // Lo ARABIC MATHEMATICAL TAILED KHAH {0x1EE59, 0x1EE59, prN}, // Lo ARABIC MATHEMATICAL TAILED DAD {0x1EE5B, 0x1EE5B, prN}, // Lo ARABIC MATHEMATICAL TAILED GHAIN {0x1EE5D, 0x1EE5D, prN}, // Lo ARABIC MATHEMATICAL TAILED DOTLESS NOON {0x1EE5F, 0x1EE5F, prN}, // Lo ARABIC MATHEMATICAL TAILED DOTLESS QAF {0x1EE61, 0x1EE62, prN}, // Lo [2] ARABIC MATHEMATICAL STRETCHED BEH..ARABIC MATHEMATICAL STRETCHED JEEM {0x1EE64, 0x1EE64, prN}, // Lo ARABIC MATHEMATICAL STRETCHED HEH {0x1EE67, 0x1EE6A, prN}, // Lo [4] ARABIC MATHEMATICAL STRETCHED HAH..ARABIC MATHEMATICAL STRETCHED KAF {0x1EE6C, 0x1EE72, prN}, // Lo [7] ARABIC MATHEMATICAL STRETCHED MEEM..ARABIC MATHEMATICAL STRETCHED QAF {0x1EE74, 0x1EE77, prN}, // Lo [4] ARABIC MATHEMATICAL STRETCHED SHEEN..ARABIC MATHEMATICAL STRETCHED KHAH {0x1EE79, 0x1EE7C, prN}, // Lo [4] ARABIC MATHEMATICAL STRETCHED DAD..ARABIC MATHEMATICAL STRETCHED DOTLESS BEH {0x1EE7E, 0x1EE7E, prN}, // Lo ARABIC MATHEMATICAL STRETCHED DOTLESS FEH {0x1EE80, 0x1EE89, prN}, // Lo [10] ARABIC MATHEMATICAL LOOPED ALEF..ARABIC MATHEMATICAL LOOPED YEH {0x1EE8B, 0x1EE9B, prN}, // Lo [17] ARABIC MATHEMATICAL LOOPED LAM..ARABIC MATHEMATICAL LOOPED GHAIN {0x1EEA1, 0x1EEA3, prN}, // Lo [3] ARABIC MATHEMATICAL DOUBLE-STRUCK BEH..ARABIC MATHEMATICAL DOUBLE-STRUCK DAL {0x1EEA5, 0x1EEA9, prN}, // Lo [5] ARABIC MATHEMATICAL DOUBLE-STRUCK WAW..ARABIC MATHEMATICAL DOUBLE-STRUCK YEH {0x1EEAB, 0x1EEBB, prN}, // Lo [17] ARABIC MATHEMATICAL DOUBLE-STRUCK LAM..ARABIC MATHEMATICAL DOUBLE-STRUCK GHAIN {0x1EEF0, 0x1EEF1, prN}, // Sm [2] ARABIC MATHEMATICAL OPERATOR MEEM WITH HAH WITH TATWEEL..ARABIC MATHEMATICAL OPERATOR HAH WITH DAL {0x1F000, 0x1F003, prN}, // So [4] MAHJONG TILE EAST WIND..MAHJONG TILE NORTH WIND {0x1F004, 0x1F004, prW}, // So MAHJONG TILE RED DRAGON {0x1F005, 0x1F02B, prN}, // So [39] MAHJONG TILE GREEN DRAGON..MAHJONG TILE BACK {0x1F030, 0x1F093, prN}, // So [100] DOMINO TILE HORIZONTAL BACK..DOMINO TILE VERTICAL-06-06 {0x1F0A0, 0x1F0AE, prN}, // So [15] PLAYING CARD BACK..PLAYING CARD KING OF SPADES {0x1F0B1, 0x1F0BF, prN}, // So [15] PLAYING CARD ACE OF HEARTS..PLAYING CARD RED JOKER {0x1F0C1, 0x1F0CE, prN}, // So [14] PLAYING CARD ACE OF DIAMONDS..PLAYING CARD KING OF DIAMONDS {0x1F0CF, 0x1F0CF, prW}, // So PLAYING CARD BLACK JOKER {0x1F0D1, 0x1F0F5, prN}, // So [37] PLAYING CARD ACE OF CLUBS..PLAYING CARD TRUMP-21 {0x1F100, 0x1F10A, prA}, // No [11] DIGIT ZERO FULL STOP..DIGIT NINE COMMA {0x1F10B, 0x1F10C, prN}, // No [2] DINGBAT CIRCLED SANS-SERIF DIGIT ZERO..DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ZERO {0x1F10D, 0x1F10F, prN}, // So [3] CIRCLED ZERO WITH SLASH..CIRCLED DOLLAR SIGN WITH OVERLAID BACKSLASH {0x1F110, 0x1F12D, prA}, // So [30] PARENTHESIZED LATIN CAPITAL LETTER A..CIRCLED CD {0x1F12E, 0x1F12F, prN}, // So [2] CIRCLED WZ..COPYLEFT SYMBOL {0x1F130, 0x1F169, prA}, // So [58] SQUARED LATIN CAPITAL LETTER A..NEGATIVE CIRCLED LATIN CAPITAL LETTER Z {0x1F16A, 0x1F16F, prN}, // So [6] RAISED MC SIGN..CIRCLED HUMAN FIGURE {0x1F170, 0x1F18D, prA}, // So [30] NEGATIVE SQUARED LATIN CAPITAL LETTER A..NEGATIVE SQUARED SA {0x1F18E, 0x1F18E, prW}, // So NEGATIVE SQUARED AB {0x1F18F, 0x1F190, prA}, // So [2] NEGATIVE SQUARED WC..SQUARE DJ {0x1F191, 0x1F19A, prW}, // So [10] SQUARED CL..SQUARED VS {0x1F19B, 0x1F1AC, prA}, // So [18] SQUARED THREE D..SQUARED VOD {0x1F1AD, 0x1F1AD, prN}, // So MASK WORK SYMBOL {0x1F1E6, 0x1F1FF, prN}, // So [26] REGIONAL INDICATOR SYMBOL LETTER A..REGIONAL INDICATOR SYMBOL LETTER Z {0x1F200, 0x1F202, prW}, // So [3] SQUARE HIRAGANA HOKA..SQUARED KATAKANA SA {0x1F210, 0x1F23B, prW}, // So [44] SQUARED CJK UNIFIED IDEOGRAPH-624B..SQUARED CJK UNIFIED IDEOGRAPH-914D {0x1F240, 0x1F248, prW}, // So [9] TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-672C..TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-6557 {0x1F250, 0x1F251, prW}, // So [2] CIRCLED IDEOGRAPH ADVANTAGE..CIRCLED IDEOGRAPH ACCEPT {0x1F260, 0x1F265, prW}, // So [6] ROUNDED SYMBOL FOR FU..ROUNDED SYMBOL FOR CAI {0x1F300, 0x1F320, prW}, // So [33] CYCLONE..SHOOTING STAR {0x1F321, 0x1F32C, prN}, // So [12] THERMOMETER..WIND BLOWING FACE {0x1F32D, 0x1F335, prW}, // So [9] HOT DOG..CACTUS {0x1F336, 0x1F336, prN}, // So HOT PEPPER {0x1F337, 0x1F37C, prW}, // So [70] TULIP..BABY BOTTLE {0x1F37D, 0x1F37D, prN}, // So FORK AND KNIFE WITH PLATE {0x1F37E, 0x1F393, prW}, // So [22] BOTTLE WITH POPPING CORK..GRADUATION CAP {0x1F394, 0x1F39F, prN}, // So [12] HEART WITH TIP ON THE LEFT..ADMISSION TICKETS {0x1F3A0, 0x1F3CA, prW}, // So [43] CAROUSEL HORSE..SWIMMER {0x1F3CB, 0x1F3CE, prN}, // So [4] WEIGHT LIFTER..RACING CAR {0x1F3CF, 0x1F3D3, prW}, // So [5] CRICKET BAT AND BALL..TABLE TENNIS PADDLE AND BALL {0x1F3D4, 0x1F3DF, prN}, // So [12] SNOW CAPPED MOUNTAIN..STADIUM {0x1F3E0, 0x1F3F0, prW}, // So [17] HOUSE BUILDING..EUROPEAN CASTLE {0x1F3F1, 0x1F3F3, prN}, // So [3] WHITE PENNANT..WAVING WHITE FLAG {0x1F3F4, 0x1F3F4, prW}, // So WAVING BLACK FLAG {0x1F3F5, 0x1F3F7, prN}, // So [3] ROSETTE..LABEL {0x1F3F8, 0x1F3FA, prW}, // So [3] BADMINTON RACQUET AND SHUTTLECOCK..AMPHORA {0x1F3FB, 0x1F3FF, prW}, // Sk [5] EMOJI MODIFIER FITZPATRICK TYPE-1-2..EMOJI MODIFIER FITZPATRICK TYPE-6 {0x1F400, 0x1F43E, prW}, // So [63] RAT..PAW PRINTS {0x1F43F, 0x1F43F, prN}, // So CHIPMUNK {0x1F440, 0x1F440, prW}, // So EYES {0x1F441, 0x1F441, prN}, // So EYE {0x1F442, 0x1F4FC, prW}, // So [187] EAR..VIDEOCASSETTE {0x1F4FD, 0x1F4FE, prN}, // So [2] FILM PROJECTOR..PORTABLE STEREO {0x1F4FF, 0x1F53D, prW}, // So [63] PRAYER BEADS..DOWN-POINTING SMALL RED TRIANGLE {0x1F53E, 0x1F54A, prN}, // So [13] LOWER RIGHT SHADOWED WHITE CIRCLE..DOVE OF PEACE {0x1F54B, 0x1F54E, prW}, // So [4] KAABA..MENORAH WITH NINE BRANCHES {0x1F54F, 0x1F54F, prN}, // So BOWL OF HYGIEIA {0x1F550, 0x1F567, prW}, // So [24] CLOCK FACE ONE OCLOCK..CLOCK FACE TWELVE-THIRTY {0x1F568, 0x1F579, prN}, // So [18] RIGHT SPEAKER..JOYSTICK {0x1F57A, 0x1F57A, prW}, // So MAN DANCING {0x1F57B, 0x1F594, prN}, // So [26] LEFT HAND TELEPHONE RECEIVER..REVERSED VICTORY HAND {0x1F595, 0x1F596, prW}, // So [2] REVERSED HAND WITH MIDDLE FINGER EXTENDED..RAISED HAND WITH PART BETWEEN MIDDLE AND RING FINGERS {0x1F597, 0x1F5A3, prN}, // So [13] WHITE DOWN POINTING LEFT HAND INDEX..BLACK DOWN POINTING BACKHAND INDEX {0x1F5A4, 0x1F5A4, prW}, // So BLACK HEART {0x1F5A5, 0x1F5FA, prN}, // So [86] DESKTOP COMPUTER..WORLD MAP {0x1F5FB, 0x1F5FF, prW}, // So [5] MOUNT FUJI..MOYAI {0x1F600, 0x1F64F, prW}, // So [80] GRINNING FACE..PERSON WITH FOLDED HANDS {0x1F650, 0x1F67F, prN}, // So [48] NORTH WEST POINTING LEAF..REVERSE CHECKER BOARD {0x1F680, 0x1F6C5, prW}, // So [70] ROCKET..LEFT LUGGAGE {0x1F6C6, 0x1F6CB, prN}, // So [6] TRIANGLE WITH ROUNDED CORNERS..COUCH AND LAMP {0x1F6CC, 0x1F6CC, prW}, // So SLEEPING ACCOMMODATION {0x1F6CD, 0x1F6CF, prN}, // So [3] SHOPPING BAGS..BED {0x1F6D0, 0x1F6D2, prW}, // So [3] PLACE OF WORSHIP..SHOPPING TROLLEY {0x1F6D3, 0x1F6D4, prN}, // So [2] STUPA..PAGODA {0x1F6D5, 0x1F6D7, prW}, // So [3] HINDU TEMPLE..ELEVATOR {0x1F6DC, 0x1F6DF, prW}, // So [4] WIRELESS..RING BUOY {0x1F6E0, 0x1F6EA, prN}, // So [11] HAMMER AND WRENCH..NORTHEAST-POINTING AIRPLANE {0x1F6EB, 0x1F6EC, prW}, // So [2] AIRPLANE DEPARTURE..AIRPLANE ARRIVING {0x1F6F0, 0x1F6F3, prN}, // So [4] SATELLITE..PASSENGER SHIP {0x1F6F4, 0x1F6FC, prW}, // So [9] SCOOTER..ROLLER SKATE {0x1F700, 0x1F776, prN}, // So [119] ALCHEMICAL SYMBOL FOR QUINTESSENCE..LUNAR ECLIPSE {0x1F77B, 0x1F77F, prN}, // So [5] HAUMEA..ORCUS {0x1F780, 0x1F7D9, prN}, // So [90] BLACK LEFT-POINTING ISOSCELES RIGHT TRIANGLE..NINE POINTED WHITE STAR {0x1F7E0, 0x1F7EB, prW}, // So [12] LARGE ORANGE CIRCLE..LARGE BROWN SQUARE {0x1F7F0, 0x1F7F0, prW}, // So HEAVY EQUALS SIGN {0x1F800, 0x1F80B, prN}, // So [12] LEFTWARDS ARROW WITH SMALL TRIANGLE ARROWHEAD..DOWNWARDS ARROW WITH LARGE TRIANGLE ARROWHEAD {0x1F810, 0x1F847, prN}, // So [56] LEFTWARDS ARROW WITH SMALL EQUILATERAL ARROWHEAD..DOWNWARDS HEAVY ARROW {0x1F850, 0x1F859, prN}, // So [10] LEFTWARDS SANS-SERIF ARROW..UP DOWN SANS-SERIF ARROW {0x1F860, 0x1F887, prN}, // So [40] WIDE-HEADED LEFTWARDS LIGHT BARB ARROW..WIDE-HEADED SOUTH WEST VERY HEAVY BARB ARROW {0x1F890, 0x1F8AD, prN}, // So [30] LEFTWARDS TRIANGLE ARROWHEAD..WHITE ARROW SHAFT WIDTH TWO THIRDS {0x1F8B0, 0x1F8B1, prN}, // So [2] ARROW POINTING UPWARDS THEN NORTH WEST..ARROW POINTING RIGHTWARDS THEN CURVING SOUTH WEST {0x1F900, 0x1F90B, prN}, // So [12] CIRCLED CROSS FORMEE WITH FOUR DOTS..DOWNWARD FACING NOTCHED HOOK WITH DOT {0x1F90C, 0x1F93A, prW}, // So [47] PINCHED FINGERS..FENCER {0x1F93B, 0x1F93B, prN}, // So MODERN PENTATHLON {0x1F93C, 0x1F945, prW}, // So [10] WRESTLERS..GOAL NET {0x1F946, 0x1F946, prN}, // So RIFLE {0x1F947, 0x1F9FF, prW}, // So [185] FIRST PLACE MEDAL..NAZAR AMULET {0x1FA00, 0x1FA53, prN}, // So [84] NEUTRAL CHESS KING..BLACK CHESS KNIGHT-BISHOP {0x1FA60, 0x1FA6D, prN}, // So [14] XIANGQI RED GENERAL..XIANGQI BLACK SOLDIER {0x1FA70, 0x1FA7C, prW}, // So [13] BALLET SHOES..CRUTCH {0x1FA80, 0x1FA88, prW}, // So [9] YO-YO..FLUTE {0x1FA90, 0x1FABD, prW}, // So [46] RINGED PLANET..WING {0x1FABF, 0x1FAC5, prW}, // So [7] GOOSE..PERSON WITH CROWN {0x1FACE, 0x1FADB, prW}, // So [14] MOOSE..PEA POD {0x1FAE0, 0x1FAE8, prW}, // So [9] MELTING FACE..SHAKING FACE {0x1FAF0, 0x1FAF8, prW}, // So [9] HAND WITH INDEX FINGER AND THUMB CROSSED..RIGHTWARDS PUSHING HAND {0x1FB00, 0x1FB92, prN}, // So [147] BLOCK SEXTANT-1..UPPER HALF INVERSE MEDIUM SHADE AND LOWER HALF BLOCK {0x1FB94, 0x1FBCA, prN}, // So [55] LEFT HALF INVERSE MEDIUM SHADE AND RIGHT HALF BLOCK..WHITE UP-POINTING CHEVRON {0x1FBF0, 0x1FBF9, prN}, // Nd [10] SEGMENTED DIGIT ZERO..SEGMENTED DIGIT NINE {0x20000, 0x2A6DF, prW}, // Lo [42720] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6DF {0x2A6E0, 0x2A6FF, prW}, // Cn [32] .. {0x2A700, 0x2B739, prW}, // Lo [4154] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B739 {0x2B73A, 0x2B73F, prW}, // Cn [6] .. {0x2B740, 0x2B81D, prW}, // Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D {0x2B81E, 0x2B81F, prW}, // Cn [2] .. {0x2B820, 0x2CEA1, prW}, // Lo [5762] CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1 {0x2CEA2, 0x2CEAF, prW}, // Cn [14] .. {0x2CEB0, 0x2EBE0, prW}, // Lo [7473] CJK UNIFIED IDEOGRAPH-2CEB0..CJK UNIFIED IDEOGRAPH-2EBE0 {0x2EBE1, 0x2F7FF, prW}, // Cn [3103] .. {0x2F800, 0x2FA1D, prW}, // Lo [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D {0x2FA1E, 0x2FA1F, prW}, // Cn [2] .. {0x2FA20, 0x2FFFD, prW}, // Cn [1502] .. {0x30000, 0x3134A, prW}, // Lo [4939] CJK UNIFIED IDEOGRAPH-30000..CJK UNIFIED IDEOGRAPH-3134A {0x3134B, 0x3134F, prW}, // Cn [5] .. {0x31350, 0x323AF, prW}, // Lo [4192] CJK UNIFIED IDEOGRAPH-31350..CJK UNIFIED IDEOGRAPH-323AF {0x323B0, 0x3FFFD, prW}, // Cn [56398] .. {0xE0001, 0xE0001, prN}, // Cf LANGUAGE TAG {0xE0020, 0xE007F, prN}, // Cf [96] TAG SPACE..CANCEL TAG {0xE0100, 0xE01EF, prA}, // Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR-256 {0xF0000, 0xFFFFD, prA}, // Co [65534] .. {0x100000, 0x10FFFD, prA}, // Co [65534] .. } ================================================ FILE: vendor/github.com/rivo/uniseg/emojipresentation.go ================================================ // Code generated via go generate from gen_properties.go. DO NOT EDIT. package uniseg // emojiPresentation are taken from // // and // https://unicode.org/Public/15.0.0/ucd/emoji/emoji-data.txt // ("Extended_Pictographic" only) // on September 5, 2023. See https://www.unicode.org/license.html for the Unicode // license agreement. var emojiPresentation = [][3]int{ {0x231A, 0x231B, prEmojiPresentation}, // E0.6 [2] (⌚..⌛) watch..hourglass done {0x23E9, 0x23EC, prEmojiPresentation}, // E0.6 [4] (⏩..⏬) fast-forward button..fast down button {0x23F0, 0x23F0, prEmojiPresentation}, // E0.6 [1] (⏰) alarm clock {0x23F3, 0x23F3, prEmojiPresentation}, // E0.6 [1] (⏳) hourglass not done {0x25FD, 0x25FE, prEmojiPresentation}, // E0.6 [2] (◽..◾) white medium-small square..black medium-small square {0x2614, 0x2615, prEmojiPresentation}, // E0.6 [2] (☔..☕) umbrella with rain drops..hot beverage {0x2648, 0x2653, prEmojiPresentation}, // E0.6 [12] (♈..♓) Aries..Pisces {0x267F, 0x267F, prEmojiPresentation}, // E0.6 [1] (♿) wheelchair symbol {0x2693, 0x2693, prEmojiPresentation}, // E0.6 [1] (⚓) anchor {0x26A1, 0x26A1, prEmojiPresentation}, // E0.6 [1] (⚡) high voltage {0x26AA, 0x26AB, prEmojiPresentation}, // E0.6 [2] (⚪..⚫) white circle..black circle {0x26BD, 0x26BE, prEmojiPresentation}, // E0.6 [2] (⚽..⚾) soccer ball..baseball {0x26C4, 0x26C5, prEmojiPresentation}, // E0.6 [2] (⛄..⛅) snowman without snow..sun behind cloud {0x26CE, 0x26CE, prEmojiPresentation}, // E0.6 [1] (⛎) Ophiuchus {0x26D4, 0x26D4, prEmojiPresentation}, // E0.6 [1] (⛔) no entry {0x26EA, 0x26EA, prEmojiPresentation}, // E0.6 [1] (⛪) church {0x26F2, 0x26F3, prEmojiPresentation}, // E0.6 [2] (⛲..⛳) fountain..flag in hole {0x26F5, 0x26F5, prEmojiPresentation}, // E0.6 [1] (⛵) sailboat {0x26FA, 0x26FA, prEmojiPresentation}, // E0.6 [1] (⛺) tent {0x26FD, 0x26FD, prEmojiPresentation}, // E0.6 [1] (⛽) fuel pump {0x2705, 0x2705, prEmojiPresentation}, // E0.6 [1] (✅) check mark button {0x270A, 0x270B, prEmojiPresentation}, // E0.6 [2] (✊..✋) raised fist..raised hand {0x2728, 0x2728, prEmojiPresentation}, // E0.6 [1] (✨) sparkles {0x274C, 0x274C, prEmojiPresentation}, // E0.6 [1] (❌) cross mark {0x274E, 0x274E, prEmojiPresentation}, // E0.6 [1] (❎) cross mark button {0x2753, 0x2755, prEmojiPresentation}, // E0.6 [3] (❓..❕) red question mark..white exclamation mark {0x2757, 0x2757, prEmojiPresentation}, // E0.6 [1] (❗) red exclamation mark {0x2795, 0x2797, prEmojiPresentation}, // E0.6 [3] (➕..➗) plus..divide {0x27B0, 0x27B0, prEmojiPresentation}, // E0.6 [1] (➰) curly loop {0x27BF, 0x27BF, prEmojiPresentation}, // E1.0 [1] (➿) double curly loop {0x2B1B, 0x2B1C, prEmojiPresentation}, // E0.6 [2] (⬛..⬜) black large square..white large square {0x2B50, 0x2B50, prEmojiPresentation}, // E0.6 [1] (⭐) star {0x2B55, 0x2B55, prEmojiPresentation}, // E0.6 [1] (⭕) hollow red circle {0x1F004, 0x1F004, prEmojiPresentation}, // E0.6 [1] (🀄) mahjong red dragon {0x1F0CF, 0x1F0CF, prEmojiPresentation}, // E0.6 [1] (🃏) joker {0x1F18E, 0x1F18E, prEmojiPresentation}, // E0.6 [1] (🆎) AB button (blood type) {0x1F191, 0x1F19A, prEmojiPresentation}, // E0.6 [10] (🆑..🆚) CL button..VS button {0x1F1E6, 0x1F1FF, prEmojiPresentation}, // E0.0 [26] (🇦..🇿) regional indicator symbol letter a..regional indicator symbol letter z {0x1F201, 0x1F201, prEmojiPresentation}, // E0.6 [1] (🈁) Japanese “here” button {0x1F21A, 0x1F21A, prEmojiPresentation}, // E0.6 [1] (🈚) Japanese “free of charge” button {0x1F22F, 0x1F22F, prEmojiPresentation}, // E0.6 [1] (🈯) Japanese “reserved” button {0x1F232, 0x1F236, prEmojiPresentation}, // E0.6 [5] (🈲..🈶) Japanese “prohibited” button..Japanese “not free of charge” button {0x1F238, 0x1F23A, prEmojiPresentation}, // E0.6 [3] (🈸..🈺) Japanese “application” button..Japanese “open for business” button {0x1F250, 0x1F251, prEmojiPresentation}, // E0.6 [2] (🉐..🉑) Japanese “bargain” button..Japanese “acceptable” button {0x1F300, 0x1F30C, prEmojiPresentation}, // E0.6 [13] (🌀..🌌) cyclone..milky way {0x1F30D, 0x1F30E, prEmojiPresentation}, // E0.7 [2] (🌍..🌎) globe showing Europe-Africa..globe showing Americas {0x1F30F, 0x1F30F, prEmojiPresentation}, // E0.6 [1] (🌏) globe showing Asia-Australia {0x1F310, 0x1F310, prEmojiPresentation}, // E1.0 [1] (🌐) globe with meridians {0x1F311, 0x1F311, prEmojiPresentation}, // E0.6 [1] (🌑) new moon {0x1F312, 0x1F312, prEmojiPresentation}, // E1.0 [1] (🌒) waxing crescent moon {0x1F313, 0x1F315, prEmojiPresentation}, // E0.6 [3] (🌓..🌕) first quarter moon..full moon {0x1F316, 0x1F318, prEmojiPresentation}, // E1.0 [3] (🌖..🌘) waning gibbous moon..waning crescent moon {0x1F319, 0x1F319, prEmojiPresentation}, // E0.6 [1] (🌙) crescent moon {0x1F31A, 0x1F31A, prEmojiPresentation}, // E1.0 [1] (🌚) new moon face {0x1F31B, 0x1F31B, prEmojiPresentation}, // E0.6 [1] (🌛) first quarter moon face {0x1F31C, 0x1F31C, prEmojiPresentation}, // E0.7 [1] (🌜) last quarter moon face {0x1F31D, 0x1F31E, prEmojiPresentation}, // E1.0 [2] (🌝..🌞) full moon face..sun with face {0x1F31F, 0x1F320, prEmojiPresentation}, // E0.6 [2] (🌟..🌠) glowing star..shooting star {0x1F32D, 0x1F32F, prEmojiPresentation}, // E1.0 [3] (🌭..🌯) hot dog..burrito {0x1F330, 0x1F331, prEmojiPresentation}, // E0.6 [2] (🌰..🌱) chestnut..seedling {0x1F332, 0x1F333, prEmojiPresentation}, // E1.0 [2] (🌲..🌳) evergreen tree..deciduous tree {0x1F334, 0x1F335, prEmojiPresentation}, // E0.6 [2] (🌴..🌵) palm tree..cactus {0x1F337, 0x1F34A, prEmojiPresentation}, // E0.6 [20] (🌷..🍊) tulip..tangerine {0x1F34B, 0x1F34B, prEmojiPresentation}, // E1.0 [1] (🍋) lemon {0x1F34C, 0x1F34F, prEmojiPresentation}, // E0.6 [4] (🍌..🍏) banana..green apple {0x1F350, 0x1F350, prEmojiPresentation}, // E1.0 [1] (🍐) pear {0x1F351, 0x1F37B, prEmojiPresentation}, // E0.6 [43] (🍑..🍻) peach..clinking beer mugs {0x1F37C, 0x1F37C, prEmojiPresentation}, // E1.0 [1] (🍼) baby bottle {0x1F37E, 0x1F37F, prEmojiPresentation}, // E1.0 [2] (🍾..🍿) bottle with popping cork..popcorn {0x1F380, 0x1F393, prEmojiPresentation}, // E0.6 [20] (🎀..🎓) ribbon..graduation cap {0x1F3A0, 0x1F3C4, prEmojiPresentation}, // E0.6 [37] (🎠..🏄) carousel horse..person surfing {0x1F3C5, 0x1F3C5, prEmojiPresentation}, // E1.0 [1] (🏅) sports medal {0x1F3C6, 0x1F3C6, prEmojiPresentation}, // E0.6 [1] (🏆) trophy {0x1F3C7, 0x1F3C7, prEmojiPresentation}, // E1.0 [1] (🏇) horse racing {0x1F3C8, 0x1F3C8, prEmojiPresentation}, // E0.6 [1] (🏈) american football {0x1F3C9, 0x1F3C9, prEmojiPresentation}, // E1.0 [1] (🏉) rugby football {0x1F3CA, 0x1F3CA, prEmojiPresentation}, // E0.6 [1] (🏊) person swimming {0x1F3CF, 0x1F3D3, prEmojiPresentation}, // E1.0 [5] (🏏..🏓) cricket game..ping pong {0x1F3E0, 0x1F3E3, prEmojiPresentation}, // E0.6 [4] (🏠..🏣) house..Japanese post office {0x1F3E4, 0x1F3E4, prEmojiPresentation}, // E1.0 [1] (🏤) post office {0x1F3E5, 0x1F3F0, prEmojiPresentation}, // E0.6 [12] (🏥..🏰) hospital..castle {0x1F3F4, 0x1F3F4, prEmojiPresentation}, // E1.0 [1] (🏴) black flag {0x1F3F8, 0x1F407, prEmojiPresentation}, // E1.0 [16] (🏸..🐇) badminton..rabbit {0x1F408, 0x1F408, prEmojiPresentation}, // E0.7 [1] (🐈) cat {0x1F409, 0x1F40B, prEmojiPresentation}, // E1.0 [3] (🐉..🐋) dragon..whale {0x1F40C, 0x1F40E, prEmojiPresentation}, // E0.6 [3] (🐌..🐎) snail..horse {0x1F40F, 0x1F410, prEmojiPresentation}, // E1.0 [2] (🐏..🐐) ram..goat {0x1F411, 0x1F412, prEmojiPresentation}, // E0.6 [2] (🐑..🐒) ewe..monkey {0x1F413, 0x1F413, prEmojiPresentation}, // E1.0 [1] (🐓) rooster {0x1F414, 0x1F414, prEmojiPresentation}, // E0.6 [1] (🐔) chicken {0x1F415, 0x1F415, prEmojiPresentation}, // E0.7 [1] (🐕) dog {0x1F416, 0x1F416, prEmojiPresentation}, // E1.0 [1] (🐖) pig {0x1F417, 0x1F429, prEmojiPresentation}, // E0.6 [19] (🐗..🐩) boar..poodle {0x1F42A, 0x1F42A, prEmojiPresentation}, // E1.0 [1] (🐪) camel {0x1F42B, 0x1F43E, prEmojiPresentation}, // E0.6 [20] (🐫..🐾) two-hump camel..paw prints {0x1F440, 0x1F440, prEmojiPresentation}, // E0.6 [1] (👀) eyes {0x1F442, 0x1F464, prEmojiPresentation}, // E0.6 [35] (👂..👤) ear..bust in silhouette {0x1F465, 0x1F465, prEmojiPresentation}, // E1.0 [1] (👥) busts in silhouette {0x1F466, 0x1F46B, prEmojiPresentation}, // E0.6 [6] (👦..👫) boy..woman and man holding hands {0x1F46C, 0x1F46D, prEmojiPresentation}, // E1.0 [2] (👬..👭) men holding hands..women holding hands {0x1F46E, 0x1F4AC, prEmojiPresentation}, // E0.6 [63] (👮..💬) police officer..speech balloon {0x1F4AD, 0x1F4AD, prEmojiPresentation}, // E1.0 [1] (💭) thought balloon {0x1F4AE, 0x1F4B5, prEmojiPresentation}, // E0.6 [8] (💮..💵) white flower..dollar banknote {0x1F4B6, 0x1F4B7, prEmojiPresentation}, // E1.0 [2] (💶..💷) euro banknote..pound banknote {0x1F4B8, 0x1F4EB, prEmojiPresentation}, // E0.6 [52] (💸..📫) money with wings..closed mailbox with raised flag {0x1F4EC, 0x1F4ED, prEmojiPresentation}, // E0.7 [2] (📬..📭) open mailbox with raised flag..open mailbox with lowered flag {0x1F4EE, 0x1F4EE, prEmojiPresentation}, // E0.6 [1] (📮) postbox {0x1F4EF, 0x1F4EF, prEmojiPresentation}, // E1.0 [1] (📯) postal horn {0x1F4F0, 0x1F4F4, prEmojiPresentation}, // E0.6 [5] (📰..📴) newspaper..mobile phone off {0x1F4F5, 0x1F4F5, prEmojiPresentation}, // E1.0 [1] (📵) no mobile phones {0x1F4F6, 0x1F4F7, prEmojiPresentation}, // E0.6 [2] (📶..📷) antenna bars..camera {0x1F4F8, 0x1F4F8, prEmojiPresentation}, // E1.0 [1] (📸) camera with flash {0x1F4F9, 0x1F4FC, prEmojiPresentation}, // E0.6 [4] (📹..📼) video camera..videocassette {0x1F4FF, 0x1F502, prEmojiPresentation}, // E1.0 [4] (📿..🔂) prayer beads..repeat single button {0x1F503, 0x1F503, prEmojiPresentation}, // E0.6 [1] (🔃) clockwise vertical arrows {0x1F504, 0x1F507, prEmojiPresentation}, // E1.0 [4] (🔄..🔇) counterclockwise arrows button..muted speaker {0x1F508, 0x1F508, prEmojiPresentation}, // E0.7 [1] (🔈) speaker low volume {0x1F509, 0x1F509, prEmojiPresentation}, // E1.0 [1] (🔉) speaker medium volume {0x1F50A, 0x1F514, prEmojiPresentation}, // E0.6 [11] (🔊..🔔) speaker high volume..bell {0x1F515, 0x1F515, prEmojiPresentation}, // E1.0 [1] (🔕) bell with slash {0x1F516, 0x1F52B, prEmojiPresentation}, // E0.6 [22] (🔖..🔫) bookmark..water pistol {0x1F52C, 0x1F52D, prEmojiPresentation}, // E1.0 [2] (🔬..🔭) microscope..telescope {0x1F52E, 0x1F53D, prEmojiPresentation}, // E0.6 [16] (🔮..🔽) crystal ball..downwards button {0x1F54B, 0x1F54E, prEmojiPresentation}, // E1.0 [4] (🕋..🕎) kaaba..menorah {0x1F550, 0x1F55B, prEmojiPresentation}, // E0.6 [12] (🕐..🕛) one o’clock..twelve o’clock {0x1F55C, 0x1F567, prEmojiPresentation}, // E0.7 [12] (🕜..🕧) one-thirty..twelve-thirty {0x1F57A, 0x1F57A, prEmojiPresentation}, // E3.0 [1] (🕺) man dancing {0x1F595, 0x1F596, prEmojiPresentation}, // E1.0 [2] (🖕..🖖) middle finger..vulcan salute {0x1F5A4, 0x1F5A4, prEmojiPresentation}, // E3.0 [1] (🖤) black heart {0x1F5FB, 0x1F5FF, prEmojiPresentation}, // E0.6 [5] (🗻..🗿) mount fuji..moai {0x1F600, 0x1F600, prEmojiPresentation}, // E1.0 [1] (😀) grinning face {0x1F601, 0x1F606, prEmojiPresentation}, // E0.6 [6] (😁..😆) beaming face with smiling eyes..grinning squinting face {0x1F607, 0x1F608, prEmojiPresentation}, // E1.0 [2] (😇..😈) smiling face with halo..smiling face with horns {0x1F609, 0x1F60D, prEmojiPresentation}, // E0.6 [5] (😉..😍) winking face..smiling face with heart-eyes {0x1F60E, 0x1F60E, prEmojiPresentation}, // E1.0 [1] (😎) smiling face with sunglasses {0x1F60F, 0x1F60F, prEmojiPresentation}, // E0.6 [1] (😏) smirking face {0x1F610, 0x1F610, prEmojiPresentation}, // E0.7 [1] (😐) neutral face {0x1F611, 0x1F611, prEmojiPresentation}, // E1.0 [1] (😑) expressionless face {0x1F612, 0x1F614, prEmojiPresentation}, // E0.6 [3] (😒..😔) unamused face..pensive face {0x1F615, 0x1F615, prEmojiPresentation}, // E1.0 [1] (😕) confused face {0x1F616, 0x1F616, prEmojiPresentation}, // E0.6 [1] (😖) confounded face {0x1F617, 0x1F617, prEmojiPresentation}, // E1.0 [1] (😗) kissing face {0x1F618, 0x1F618, prEmojiPresentation}, // E0.6 [1] (😘) face blowing a kiss {0x1F619, 0x1F619, prEmojiPresentation}, // E1.0 [1] (😙) kissing face with smiling eyes {0x1F61A, 0x1F61A, prEmojiPresentation}, // E0.6 [1] (😚) kissing face with closed eyes {0x1F61B, 0x1F61B, prEmojiPresentation}, // E1.0 [1] (😛) face with tongue {0x1F61C, 0x1F61E, prEmojiPresentation}, // E0.6 [3] (😜..😞) winking face with tongue..disappointed face {0x1F61F, 0x1F61F, prEmojiPresentation}, // E1.0 [1] (😟) worried face {0x1F620, 0x1F625, prEmojiPresentation}, // E0.6 [6] (😠..😥) angry face..sad but relieved face {0x1F626, 0x1F627, prEmojiPresentation}, // E1.0 [2] (😦..😧) frowning face with open mouth..anguished face {0x1F628, 0x1F62B, prEmojiPresentation}, // E0.6 [4] (😨..😫) fearful face..tired face {0x1F62C, 0x1F62C, prEmojiPresentation}, // E1.0 [1] (😬) grimacing face {0x1F62D, 0x1F62D, prEmojiPresentation}, // E0.6 [1] (😭) loudly crying face {0x1F62E, 0x1F62F, prEmojiPresentation}, // E1.0 [2] (😮..😯) face with open mouth..hushed face {0x1F630, 0x1F633, prEmojiPresentation}, // E0.6 [4] (😰..😳) anxious face with sweat..flushed face {0x1F634, 0x1F634, prEmojiPresentation}, // E1.0 [1] (😴) sleeping face {0x1F635, 0x1F635, prEmojiPresentation}, // E0.6 [1] (😵) face with crossed-out eyes {0x1F636, 0x1F636, prEmojiPresentation}, // E1.0 [1] (😶) face without mouth {0x1F637, 0x1F640, prEmojiPresentation}, // E0.6 [10] (😷..🙀) face with medical mask..weary cat {0x1F641, 0x1F644, prEmojiPresentation}, // E1.0 [4] (🙁..🙄) slightly frowning face..face with rolling eyes {0x1F645, 0x1F64F, prEmojiPresentation}, // E0.6 [11] (🙅..🙏) person gesturing NO..folded hands {0x1F680, 0x1F680, prEmojiPresentation}, // E0.6 [1] (🚀) rocket {0x1F681, 0x1F682, prEmojiPresentation}, // E1.0 [2] (🚁..🚂) helicopter..locomotive {0x1F683, 0x1F685, prEmojiPresentation}, // E0.6 [3] (🚃..🚅) railway car..bullet train {0x1F686, 0x1F686, prEmojiPresentation}, // E1.0 [1] (🚆) train {0x1F687, 0x1F687, prEmojiPresentation}, // E0.6 [1] (🚇) metro {0x1F688, 0x1F688, prEmojiPresentation}, // E1.0 [1] (🚈) light rail {0x1F689, 0x1F689, prEmojiPresentation}, // E0.6 [1] (🚉) station {0x1F68A, 0x1F68B, prEmojiPresentation}, // E1.0 [2] (🚊..🚋) tram..tram car {0x1F68C, 0x1F68C, prEmojiPresentation}, // E0.6 [1] (🚌) bus {0x1F68D, 0x1F68D, prEmojiPresentation}, // E0.7 [1] (🚍) oncoming bus {0x1F68E, 0x1F68E, prEmojiPresentation}, // E1.0 [1] (🚎) trolleybus {0x1F68F, 0x1F68F, prEmojiPresentation}, // E0.6 [1] (🚏) bus stop {0x1F690, 0x1F690, prEmojiPresentation}, // E1.0 [1] (🚐) minibus {0x1F691, 0x1F693, prEmojiPresentation}, // E0.6 [3] (🚑..🚓) ambulance..police car {0x1F694, 0x1F694, prEmojiPresentation}, // E0.7 [1] (🚔) oncoming police car {0x1F695, 0x1F695, prEmojiPresentation}, // E0.6 [1] (🚕) taxi {0x1F696, 0x1F696, prEmojiPresentation}, // E1.0 [1] (🚖) oncoming taxi {0x1F697, 0x1F697, prEmojiPresentation}, // E0.6 [1] (🚗) automobile {0x1F698, 0x1F698, prEmojiPresentation}, // E0.7 [1] (🚘) oncoming automobile {0x1F699, 0x1F69A, prEmojiPresentation}, // E0.6 [2] (🚙..🚚) sport utility vehicle..delivery truck {0x1F69B, 0x1F6A1, prEmojiPresentation}, // E1.0 [7] (🚛..🚡) articulated lorry..aerial tramway {0x1F6A2, 0x1F6A2, prEmojiPresentation}, // E0.6 [1] (🚢) ship {0x1F6A3, 0x1F6A3, prEmojiPresentation}, // E1.0 [1] (🚣) person rowing boat {0x1F6A4, 0x1F6A5, prEmojiPresentation}, // E0.6 [2] (🚤..🚥) speedboat..horizontal traffic light {0x1F6A6, 0x1F6A6, prEmojiPresentation}, // E1.0 [1] (🚦) vertical traffic light {0x1F6A7, 0x1F6AD, prEmojiPresentation}, // E0.6 [7] (🚧..🚭) construction..no smoking {0x1F6AE, 0x1F6B1, prEmojiPresentation}, // E1.0 [4] (🚮..🚱) litter in bin sign..non-potable water {0x1F6B2, 0x1F6B2, prEmojiPresentation}, // E0.6 [1] (🚲) bicycle {0x1F6B3, 0x1F6B5, prEmojiPresentation}, // E1.0 [3] (🚳..🚵) no bicycles..person mountain biking {0x1F6B6, 0x1F6B6, prEmojiPresentation}, // E0.6 [1] (🚶) person walking {0x1F6B7, 0x1F6B8, prEmojiPresentation}, // E1.0 [2] (🚷..🚸) no pedestrians..children crossing {0x1F6B9, 0x1F6BE, prEmojiPresentation}, // E0.6 [6] (🚹..🚾) men’s room..water closet {0x1F6BF, 0x1F6BF, prEmojiPresentation}, // E1.0 [1] (🚿) shower {0x1F6C0, 0x1F6C0, prEmojiPresentation}, // E0.6 [1] (🛀) person taking bath {0x1F6C1, 0x1F6C5, prEmojiPresentation}, // E1.0 [5] (🛁..🛅) bathtub..left luggage {0x1F6CC, 0x1F6CC, prEmojiPresentation}, // E1.0 [1] (🛌) person in bed {0x1F6D0, 0x1F6D0, prEmojiPresentation}, // E1.0 [1] (🛐) place of worship {0x1F6D1, 0x1F6D2, prEmojiPresentation}, // E3.0 [2] (🛑..🛒) stop sign..shopping cart {0x1F6D5, 0x1F6D5, prEmojiPresentation}, // E12.0 [1] (🛕) hindu temple {0x1F6D6, 0x1F6D7, prEmojiPresentation}, // E13.0 [2] (🛖..🛗) hut..elevator {0x1F6DC, 0x1F6DC, prEmojiPresentation}, // E15.0 [1] (🛜) wireless {0x1F6DD, 0x1F6DF, prEmojiPresentation}, // E14.0 [3] (🛝..🛟) playground slide..ring buoy {0x1F6EB, 0x1F6EC, prEmojiPresentation}, // E1.0 [2] (🛫..🛬) airplane departure..airplane arrival {0x1F6F4, 0x1F6F6, prEmojiPresentation}, // E3.0 [3] (🛴..🛶) kick scooter..canoe {0x1F6F7, 0x1F6F8, prEmojiPresentation}, // E5.0 [2] (🛷..🛸) sled..flying saucer {0x1F6F9, 0x1F6F9, prEmojiPresentation}, // E11.0 [1] (🛹) skateboard {0x1F6FA, 0x1F6FA, prEmojiPresentation}, // E12.0 [1] (🛺) auto rickshaw {0x1F6FB, 0x1F6FC, prEmojiPresentation}, // E13.0 [2] (🛻..🛼) pickup truck..roller skate {0x1F7E0, 0x1F7EB, prEmojiPresentation}, // E12.0 [12] (🟠..🟫) orange circle..brown square {0x1F7F0, 0x1F7F0, prEmojiPresentation}, // E14.0 [1] (🟰) heavy equals sign {0x1F90C, 0x1F90C, prEmojiPresentation}, // E13.0 [1] (🤌) pinched fingers {0x1F90D, 0x1F90F, prEmojiPresentation}, // E12.0 [3] (🤍..🤏) white heart..pinching hand {0x1F910, 0x1F918, prEmojiPresentation}, // E1.0 [9] (🤐..🤘) zipper-mouth face..sign of the horns {0x1F919, 0x1F91E, prEmojiPresentation}, // E3.0 [6] (🤙..🤞) call me hand..crossed fingers {0x1F91F, 0x1F91F, prEmojiPresentation}, // E5.0 [1] (🤟) love-you gesture {0x1F920, 0x1F927, prEmojiPresentation}, // E3.0 [8] (🤠..🤧) cowboy hat face..sneezing face {0x1F928, 0x1F92F, prEmojiPresentation}, // E5.0 [8] (🤨..🤯) face with raised eyebrow..exploding head {0x1F930, 0x1F930, prEmojiPresentation}, // E3.0 [1] (🤰) pregnant woman {0x1F931, 0x1F932, prEmojiPresentation}, // E5.0 [2] (🤱..🤲) breast-feeding..palms up together {0x1F933, 0x1F93A, prEmojiPresentation}, // E3.0 [8] (🤳..🤺) selfie..person fencing {0x1F93C, 0x1F93E, prEmojiPresentation}, // E3.0 [3] (🤼..🤾) people wrestling..person playing handball {0x1F93F, 0x1F93F, prEmojiPresentation}, // E12.0 [1] (🤿) diving mask {0x1F940, 0x1F945, prEmojiPresentation}, // E3.0 [6] (🥀..🥅) wilted flower..goal net {0x1F947, 0x1F94B, prEmojiPresentation}, // E3.0 [5] (🥇..🥋) 1st place medal..martial arts uniform {0x1F94C, 0x1F94C, prEmojiPresentation}, // E5.0 [1] (🥌) curling stone {0x1F94D, 0x1F94F, prEmojiPresentation}, // E11.0 [3] (🥍..🥏) lacrosse..flying disc {0x1F950, 0x1F95E, prEmojiPresentation}, // E3.0 [15] (🥐..🥞) croissant..pancakes {0x1F95F, 0x1F96B, prEmojiPresentation}, // E5.0 [13] (🥟..🥫) dumpling..canned food {0x1F96C, 0x1F970, prEmojiPresentation}, // E11.0 [5] (🥬..🥰) leafy green..smiling face with hearts {0x1F971, 0x1F971, prEmojiPresentation}, // E12.0 [1] (🥱) yawning face {0x1F972, 0x1F972, prEmojiPresentation}, // E13.0 [1] (🥲) smiling face with tear {0x1F973, 0x1F976, prEmojiPresentation}, // E11.0 [4] (🥳..🥶) partying face..cold face {0x1F977, 0x1F978, prEmojiPresentation}, // E13.0 [2] (🥷..🥸) ninja..disguised face {0x1F979, 0x1F979, prEmojiPresentation}, // E14.0 [1] (🥹) face holding back tears {0x1F97A, 0x1F97A, prEmojiPresentation}, // E11.0 [1] (🥺) pleading face {0x1F97B, 0x1F97B, prEmojiPresentation}, // E12.0 [1] (🥻) sari {0x1F97C, 0x1F97F, prEmojiPresentation}, // E11.0 [4] (🥼..🥿) lab coat..flat shoe {0x1F980, 0x1F984, prEmojiPresentation}, // E1.0 [5] (🦀..🦄) crab..unicorn {0x1F985, 0x1F991, prEmojiPresentation}, // E3.0 [13] (🦅..🦑) eagle..squid {0x1F992, 0x1F997, prEmojiPresentation}, // E5.0 [6] (🦒..🦗) giraffe..cricket {0x1F998, 0x1F9A2, prEmojiPresentation}, // E11.0 [11] (🦘..🦢) kangaroo..swan {0x1F9A3, 0x1F9A4, prEmojiPresentation}, // E13.0 [2] (🦣..🦤) mammoth..dodo {0x1F9A5, 0x1F9AA, prEmojiPresentation}, // E12.0 [6] (🦥..🦪) sloth..oyster {0x1F9AB, 0x1F9AD, prEmojiPresentation}, // E13.0 [3] (🦫..🦭) beaver..seal {0x1F9AE, 0x1F9AF, prEmojiPresentation}, // E12.0 [2] (🦮..🦯) guide dog..white cane {0x1F9B0, 0x1F9B9, prEmojiPresentation}, // E11.0 [10] (🦰..🦹) red hair..supervillain {0x1F9BA, 0x1F9BF, prEmojiPresentation}, // E12.0 [6] (🦺..🦿) safety vest..mechanical leg {0x1F9C0, 0x1F9C0, prEmojiPresentation}, // E1.0 [1] (🧀) cheese wedge {0x1F9C1, 0x1F9C2, prEmojiPresentation}, // E11.0 [2] (🧁..🧂) cupcake..salt {0x1F9C3, 0x1F9CA, prEmojiPresentation}, // E12.0 [8] (🧃..🧊) beverage box..ice {0x1F9CB, 0x1F9CB, prEmojiPresentation}, // E13.0 [1] (🧋) bubble tea {0x1F9CC, 0x1F9CC, prEmojiPresentation}, // E14.0 [1] (🧌) troll {0x1F9CD, 0x1F9CF, prEmojiPresentation}, // E12.0 [3] (🧍..🧏) person standing..deaf person {0x1F9D0, 0x1F9E6, prEmojiPresentation}, // E5.0 [23] (🧐..🧦) face with monocle..socks {0x1F9E7, 0x1F9FF, prEmojiPresentation}, // E11.0 [25] (🧧..🧿) red envelope..nazar amulet {0x1FA70, 0x1FA73, prEmojiPresentation}, // E12.0 [4] (🩰..🩳) ballet shoes..shorts {0x1FA74, 0x1FA74, prEmojiPresentation}, // E13.0 [1] (🩴) thong sandal {0x1FA75, 0x1FA77, prEmojiPresentation}, // E15.0 [3] (🩵..🩷) light blue heart..pink heart {0x1FA78, 0x1FA7A, prEmojiPresentation}, // E12.0 [3] (🩸..🩺) drop of blood..stethoscope {0x1FA7B, 0x1FA7C, prEmojiPresentation}, // E14.0 [2] (🩻..🩼) x-ray..crutch {0x1FA80, 0x1FA82, prEmojiPresentation}, // E12.0 [3] (🪀..🪂) yo-yo..parachute {0x1FA83, 0x1FA86, prEmojiPresentation}, // E13.0 [4] (🪃..🪆) boomerang..nesting dolls {0x1FA87, 0x1FA88, prEmojiPresentation}, // E15.0 [2] (🪇..🪈) maracas..flute {0x1FA90, 0x1FA95, prEmojiPresentation}, // E12.0 [6] (🪐..🪕) ringed planet..banjo {0x1FA96, 0x1FAA8, prEmojiPresentation}, // E13.0 [19] (🪖..🪨) military helmet..rock {0x1FAA9, 0x1FAAC, prEmojiPresentation}, // E14.0 [4] (🪩..🪬) mirror ball..hamsa {0x1FAAD, 0x1FAAF, prEmojiPresentation}, // E15.0 [3] (🪭..🪯) folding hand fan..khanda {0x1FAB0, 0x1FAB6, prEmojiPresentation}, // E13.0 [7] (🪰..🪶) fly..feather {0x1FAB7, 0x1FABA, prEmojiPresentation}, // E14.0 [4] (🪷..🪺) lotus..nest with eggs {0x1FABB, 0x1FABD, prEmojiPresentation}, // E15.0 [3] (🪻..🪽) hyacinth..wing {0x1FABF, 0x1FABF, prEmojiPresentation}, // E15.0 [1] (🪿) goose {0x1FAC0, 0x1FAC2, prEmojiPresentation}, // E13.0 [3] (🫀..🫂) anatomical heart..people hugging {0x1FAC3, 0x1FAC5, prEmojiPresentation}, // E14.0 [3] (🫃..🫅) pregnant man..person with crown {0x1FACE, 0x1FACF, prEmojiPresentation}, // E15.0 [2] (🫎..🫏) moose..donkey {0x1FAD0, 0x1FAD6, prEmojiPresentation}, // E13.0 [7] (🫐..🫖) blueberries..teapot {0x1FAD7, 0x1FAD9, prEmojiPresentation}, // E14.0 [3] (🫗..🫙) pouring liquid..jar {0x1FADA, 0x1FADB, prEmojiPresentation}, // E15.0 [2] (🫚..🫛) ginger root..pea pod {0x1FAE0, 0x1FAE7, prEmojiPresentation}, // E14.0 [8] (🫠..🫧) melting face..bubbles {0x1FAE8, 0x1FAE8, prEmojiPresentation}, // E15.0 [1] (🫨) shaking face {0x1FAF0, 0x1FAF6, prEmojiPresentation}, // E14.0 [7] (🫰..🫶) hand with index finger and thumb crossed..heart hands {0x1FAF7, 0x1FAF8, prEmojiPresentation}, // E15.0 [2] (🫷..🫸) leftwards pushing hand..rightwards pushing hand } ================================================ FILE: vendor/github.com/rivo/uniseg/gen_breaktest.go ================================================ //go:build generate // This program generates a Go containing a slice of test cases based on the // Unicode Character Database auxiliary data files. The command line arguments // are as follows: // // 1. The name of the Unicode data file (just the filename, without extension). // 2. The name of the locally generated Go file. // 3. The name of the slice containing the test cases. // 4. The name of the generator, for logging purposes. // //go:generate go run gen_breaktest.go GraphemeBreakTest graphemebreak_test.go graphemeBreakTestCases graphemes //go:generate go run gen_breaktest.go WordBreakTest wordbreak_test.go wordBreakTestCases words //go:generate go run gen_breaktest.go SentenceBreakTest sentencebreak_test.go sentenceBreakTestCases sentences //go:generate go run gen_breaktest.go LineBreakTest linebreak_test.go lineBreakTestCases lines package main import ( "bufio" "bytes" "errors" "fmt" "go/format" "io/ioutil" "log" "net/http" "os" "time" ) // We want to test against a specific version rather than the latest. When the // package is upgraded to a new version, change these to generate new tests. const ( testCaseURL = `https://www.unicode.org/Public/15.0.0/ucd/auxiliary/%s.txt` ) func main() { if len(os.Args) < 5 { fmt.Println("Not enough arguments, see code for details") os.Exit(1) } log.SetPrefix("gen_breaktest (" + os.Args[4] + "): ") log.SetFlags(0) // Read text of testcases and parse into Go source code. src, err := parse(fmt.Sprintf(testCaseURL, os.Args[1])) if err != nil { log.Fatal(err) } // Format the Go code. formatted, err := format.Source(src) if err != nil { log.Fatalln("gofmt:", err) } // Write it out. log.Print("Writing to ", os.Args[2]) if err := ioutil.WriteFile(os.Args[2], formatted, 0644); err != nil { log.Fatal(err) } } // parse reads a break text file, either from a local file or from a URL. It // parses the file data into Go source code representing the test cases. func parse(url string) ([]byte, error) { log.Printf("Parsing %s", url) res, err := http.Get(url) if err != nil { return nil, err } body := res.Body defer body.Close() buf := new(bytes.Buffer) buf.Grow(120 << 10) buf.WriteString(`// Code generated via go generate from gen_breaktest.go. DO NOT EDIT. package uniseg // ` + os.Args[3] + ` are Grapheme testcases taken from // ` + url + ` // on ` + time.Now().Format("January 2, 2006") + `. See // https://www.unicode.org/license.html for the Unicode license agreement. var ` + os.Args[3] + ` = []testCase { `) sc := bufio.NewScanner(body) num := 1 var line []byte original := make([]byte, 0, 64) expected := make([]byte, 0, 64) for sc.Scan() { num++ line = sc.Bytes() if len(line) == 0 || line[0] == '#' { continue } var comment []byte if i := bytes.IndexByte(line, '#'); i >= 0 { comment = bytes.TrimSpace(line[i+1:]) line = bytes.TrimSpace(line[:i]) } original, expected, err := parseRuneSequence(line, original[:0], expected[:0]) if err != nil { return nil, fmt.Errorf(`line %d: %v: %q`, num, err, line) } fmt.Fprintf(buf, "\t{original: \"%s\", expected: %s}, // %s\n", original, expected, comment) } if err := sc.Err(); err != nil { return nil, err } // Check for final "# EOF", useful check if we're streaming via HTTP if !bytes.Equal(line, []byte("# EOF")) { return nil, fmt.Errorf(`line %d: exected "# EOF" as final line, got %q`, num, line) } buf.WriteString("}\n") return buf.Bytes(), nil } // Used by parseRuneSequence to match input via bytes.HasPrefix. var ( prefixBreak = []byte("÷ ") prefixDontBreak = []byte("× ") breakOk = []byte("÷") breakNo = []byte("×") ) // parseRuneSequence parses a rune + breaking opportunity sequence from b // and appends the Go code for testcase.original to orig // and appends the Go code for testcase.expected to exp. // It retuns the new orig and exp slices. // // E.g. for the input b="÷ 0020 × 0308 ÷ 1F1E6 ÷" // it will append // // "\u0020\u0308\U0001F1E6" // // and "[][]rune{{0x0020,0x0308},{0x1F1E6},}" // to orig and exp respectively. // // The formatting of exp is expected to be cleaned up by gofmt or format.Source. // Note we explicitly require the sequence to start with ÷ and we implicitly // require it to end with ÷. func parseRuneSequence(b, orig, exp []byte) ([]byte, []byte, error) { // Check for and remove first ÷ or ×. if !bytes.HasPrefix(b, prefixBreak) && !bytes.HasPrefix(b, prefixDontBreak) { return nil, nil, errors.New("expected ÷ or × as first character") } if bytes.HasPrefix(b, prefixBreak) { b = b[len(prefixBreak):] } else { b = b[len(prefixDontBreak):] } boundary := true exp = append(exp, "[][]rune{"...) for len(b) > 0 { if boundary { exp = append(exp, '{') } exp = append(exp, "0x"...) // Find end of hex digits. var i int for i = 0; i < len(b) && b[i] != ' '; i++ { if d := b[i]; ('0' <= d || d <= '9') || ('A' <= d || d <= 'F') || ('a' <= d || d <= 'f') { continue } return nil, nil, errors.New("bad hex digit") } switch i { case 4: orig = append(orig, "\\u"...) case 5: orig = append(orig, "\\U000"...) default: return nil, nil, errors.New("unsupport code point hex length") } orig = append(orig, b[:i]...) exp = append(exp, b[:i]...) b = b[i:] // Check for space between hex and ÷ or ×. if len(b) < 1 || b[0] != ' ' { return nil, nil, errors.New("bad input") } b = b[1:] // Check for next boundary. switch { case bytes.HasPrefix(b, breakOk): boundary = true b = b[len(breakOk):] case bytes.HasPrefix(b, breakNo): boundary = false b = b[len(breakNo):] default: return nil, nil, errors.New("missing ÷ or ×") } if boundary { exp = append(exp, '}') } exp = append(exp, ',') if len(b) > 0 && b[0] == ' ' { b = b[1:] } } exp = append(exp, '}') return orig, exp, nil } ================================================ FILE: vendor/github.com/rivo/uniseg/gen_properties.go ================================================ //go:build generate // This program generates a property file in Go file from Unicode Character // Database auxiliary data files. The command line arguments are as follows: // // 1. The name of the Unicode data file (just the filename, without extension). // Can be "-" (to skip) if the emoji flag is included. // 2. The name of the locally generated Go file. // 3. The name of the slice mapping code points to properties. // 4. The name of the generator, for logging purposes. // 5. (Optional) Flags, comma-separated. The following flags are available: // - "emojis=": include the specified emoji properties (e.g. // "Extended_Pictographic"). // - "gencat": include general category properties. // //go:generate go run gen_properties.go auxiliary/GraphemeBreakProperty graphemeproperties.go graphemeCodePoints graphemes emojis=Extended_Pictographic //go:generate go run gen_properties.go auxiliary/WordBreakProperty wordproperties.go workBreakCodePoints words emojis=Extended_Pictographic //go:generate go run gen_properties.go auxiliary/SentenceBreakProperty sentenceproperties.go sentenceBreakCodePoints sentences //go:generate go run gen_properties.go LineBreak lineproperties.go lineBreakCodePoints lines gencat //go:generate go run gen_properties.go EastAsianWidth eastasianwidth.go eastAsianWidth eastasianwidth //go:generate go run gen_properties.go - emojipresentation.go emojiPresentation emojipresentation emojis=Emoji_Presentation package main import ( "bufio" "bytes" "errors" "fmt" "go/format" "io/ioutil" "log" "net/http" "os" "regexp" "sort" "strconv" "strings" "time" ) // We want to test against a specific version rather than the latest. When the // package is upgraded to a new version, change these to generate new tests. const ( propertyURL = `https://www.unicode.org/Public/15.0.0/ucd/%s.txt` emojiURL = `https://unicode.org/Public/15.0.0/ucd/emoji/emoji-data.txt` ) // The regular expression for a line containing a code point range property. var propertyPattern = regexp.MustCompile(`^([0-9A-F]{4,6})(\.\.([0-9A-F]{4,6}))?\s*;\s*([A-Za-z0-9_]+)\s*#\s(.+)$`) func main() { if len(os.Args) < 5 { fmt.Println("Not enough arguments, see code for details") os.Exit(1) } log.SetPrefix("gen_properties (" + os.Args[4] + "): ") log.SetFlags(0) // Parse flags. flags := make(map[string]string) if len(os.Args) >= 6 { for _, flag := range strings.Split(os.Args[5], ",") { flagFields := strings.Split(flag, "=") if len(flagFields) == 1 { flags[flagFields[0]] = "yes" } else { flags[flagFields[0]] = flagFields[1] } } } // Parse the text file and generate Go source code from it. _, includeGeneralCategory := flags["gencat"] var mainURL string if os.Args[1] != "-" { mainURL = fmt.Sprintf(propertyURL, os.Args[1]) } src, err := parse(mainURL, flags["emojis"], includeGeneralCategory) if err != nil { log.Fatal(err) } // Format the Go code. formatted, err := format.Source([]byte(src)) if err != nil { log.Fatal("gofmt:", err) } // Save it to the (local) target file. log.Print("Writing to ", os.Args[2]) if err := ioutil.WriteFile(os.Args[2], formatted, 0644); err != nil { log.Fatal(err) } } // parse parses the Unicode Properties text files located at the given URLs and // returns their equivalent Go source code to be used in the uniseg package. If // "emojiProperty" is not an empty string, emoji code points for that emoji // property (e.g. "Extended_Pictographic") will be included. In those cases, you // may pass an empty "propertyURL" to skip parsing the main properties file. If // "includeGeneralCategory" is true, the Unicode General Category property will // be extracted from the comments and included in the output. func parse(propertyURL, emojiProperty string, includeGeneralCategory bool) (string, error) { if propertyURL == "" && emojiProperty == "" { return "", errors.New("no properties to parse") } // Temporary buffer to hold properties. var properties [][4]string // Open the first URL. if propertyURL != "" { log.Printf("Parsing %s", propertyURL) res, err := http.Get(propertyURL) if err != nil { return "", err } in1 := res.Body defer in1.Close() // Parse it. scanner := bufio.NewScanner(in1) num := 0 for scanner.Scan() { num++ line := strings.TrimSpace(scanner.Text()) // Skip comments and empty lines. if strings.HasPrefix(line, "#") || line == "" { continue } // Everything else must be a code point range, a property and a comment. from, to, property, comment, err := parseProperty(line) if err != nil { return "", fmt.Errorf("%s line %d: %v", os.Args[4], num, err) } properties = append(properties, [4]string{from, to, property, comment}) } if err := scanner.Err(); err != nil { return "", err } } // Open the second URL. if emojiProperty != "" { log.Printf("Parsing %s", emojiURL) res, err := http.Get(emojiURL) if err != nil { return "", err } in2 := res.Body defer in2.Close() // Parse it. scanner := bufio.NewScanner(in2) num := 0 for scanner.Scan() { num++ line := scanner.Text() // Skip comments, empty lines, and everything not containing // "Extended_Pictographic". if strings.HasPrefix(line, "#") || line == "" || !strings.Contains(line, emojiProperty) { continue } // Everything else must be a code point range, a property and a comment. from, to, property, comment, err := parseProperty(line) if err != nil { return "", fmt.Errorf("emojis line %d: %v", num, err) } properties = append(properties, [4]string{from, to, property, comment}) } if err := scanner.Err(); err != nil { return "", err } } // Avoid overflow during binary search. if len(properties) >= 1<<31 { return "", errors.New("too many properties") } // Sort properties. sort.Slice(properties, func(i, j int) bool { left, _ := strconv.ParseUint(properties[i][0], 16, 64) right, _ := strconv.ParseUint(properties[j][0], 16, 64) return left < right }) // Header. var ( buf bytes.Buffer emojiComment string ) columns := 3 if includeGeneralCategory { columns = 4 } if emojiURL != "" { emojiComment = ` // and // ` + emojiURL + ` // ("Extended_Pictographic" only)` } buf.WriteString(`// Code generated via go generate from gen_properties.go. DO NOT EDIT. package uniseg // ` + os.Args[3] + ` are taken from // ` + propertyURL + emojiComment + ` // on ` + time.Now().Format("January 2, 2006") + `. See https://www.unicode.org/license.html for the Unicode // license agreement. var ` + os.Args[3] + ` = [][` + strconv.Itoa(columns) + `]int{ `) // Properties. for _, prop := range properties { if includeGeneralCategory { generalCategory := "gc" + prop[3][:2] if generalCategory == "gcL&" { generalCategory = "gcLC" } prop[3] = prop[3][3:] fmt.Fprintf(&buf, "{0x%s,0x%s,%s,%s}, // %s\n", prop[0], prop[1], translateProperty("pr", prop[2]), generalCategory, prop[3]) } else { fmt.Fprintf(&buf, "{0x%s,0x%s,%s}, // %s\n", prop[0], prop[1], translateProperty("pr", prop[2]), prop[3]) } } // Tail. buf.WriteString("}") return buf.String(), nil } // parseProperty parses a line of the Unicode properties text file containing a // property for a code point range and returns it along with its comment. func parseProperty(line string) (from, to, property, comment string, err error) { fields := propertyPattern.FindStringSubmatch(line) if fields == nil { err = errors.New("no property found") return } from = fields[1] to = fields[3] if to == "" { to = from } property = fields[4] comment = fields[5] return } // translateProperty translates a property name as used in the Unicode data file // to a variable used in the Go code. func translateProperty(prefix, property string) string { return prefix + strings.ReplaceAll(property, "_", "") } ================================================ FILE: vendor/github.com/rivo/uniseg/grapheme.go ================================================ package uniseg import "unicode/utf8" // Graphemes implements an iterator over Unicode grapheme clusters, or // user-perceived characters. While iterating, it also provides information // about word boundaries, sentence boundaries, line breaks, and monospace // character widths. // // After constructing the class via [NewGraphemes] for a given string "str", // [Graphemes.Next] is called for every grapheme cluster in a loop until it // returns false. Inside the loop, information about the grapheme cluster as // well as boundary information and character width is available via the various // methods (see examples below). // // This class basically wraps the [StepString] parser and provides a convenient // interface to it. If you are only interested in some parts of this package's // functionality, using the specialized functions starting with "First" is // almost always faster. type Graphemes struct { // The original string. original string // The remaining string to be parsed. remaining string // The current grapheme cluster. cluster string // The byte offset of the current grapheme cluster relative to the original // string. offset int // The current boundary information of the [Step] parser. boundaries int // The current state of the [Step] parser. state int } // NewGraphemes returns a new grapheme cluster iterator. func NewGraphemes(str string) *Graphemes { return &Graphemes{ original: str, remaining: str, state: -1, } } // Next advances the iterator by one grapheme cluster and returns false if no // clusters are left. This function must be called before the first cluster is // accessed. func (g *Graphemes) Next() bool { if len(g.remaining) == 0 { // We're already past the end. g.state = -2 g.cluster = "" return false } g.offset += len(g.cluster) g.cluster, g.remaining, g.boundaries, g.state = StepString(g.remaining, g.state) return true } // Runes returns a slice of runes (code points) which corresponds to the current // grapheme cluster. If the iterator is already past the end or [Graphemes.Next] // has not yet been called, nil is returned. func (g *Graphemes) Runes() []rune { if g.state < 0 { return nil } return []rune(g.cluster) } // Str returns a substring of the original string which corresponds to the // current grapheme cluster. If the iterator is already past the end or // [Graphemes.Next] has not yet been called, an empty string is returned. func (g *Graphemes) Str() string { return g.cluster } // Bytes returns a byte slice which corresponds to the current grapheme cluster. // If the iterator is already past the end or [Graphemes.Next] has not yet been // called, nil is returned. func (g *Graphemes) Bytes() []byte { if g.state < 0 { return nil } return []byte(g.cluster) } // Positions returns the interval of the current grapheme cluster as byte // positions into the original string. The first returned value "from" indexes // the first byte and the second returned value "to" indexes the first byte that // is not included anymore, i.e. str[from:to] is the current grapheme cluster of // the original string "str". If [Graphemes.Next] has not yet been called, both // values are 0. If the iterator is already past the end, both values are 1. func (g *Graphemes) Positions() (int, int) { if g.state == -1 { return 0, 0 } else if g.state == -2 { return 1, 1 } return g.offset, g.offset + len(g.cluster) } // IsWordBoundary returns true if a word ends after the current grapheme // cluster. func (g *Graphemes) IsWordBoundary() bool { if g.state < 0 { return true } return g.boundaries&MaskWord != 0 } // IsSentenceBoundary returns true if a sentence ends after the current // grapheme cluster. func (g *Graphemes) IsSentenceBoundary() bool { if g.state < 0 { return true } return g.boundaries&MaskSentence != 0 } // LineBreak returns whether the line can be broken after the current grapheme // cluster. A value of [LineDontBreak] means the line may not be broken, a value // of [LineMustBreak] means the line must be broken, and a value of // [LineCanBreak] means the line may or may not be broken. func (g *Graphemes) LineBreak() int { if g.state == -1 { return LineDontBreak } if g.state == -2 { return LineMustBreak } return g.boundaries & MaskLine } // Width returns the monospace width of the current grapheme cluster. func (g *Graphemes) Width() int { if g.state < 0 { return 0 } return g.boundaries >> ShiftWidth } // Reset puts the iterator into its initial state such that the next call to // [Graphemes.Next] sets it to the first grapheme cluster again. func (g *Graphemes) Reset() { g.state = -1 g.offset = 0 g.cluster = "" g.remaining = g.original } // GraphemeClusterCount returns the number of user-perceived characters // (grapheme clusters) for the given string. func GraphemeClusterCount(s string) (n int) { state := -1 for len(s) > 0 { _, s, _, state = FirstGraphemeClusterInString(s, state) n++ } return } // ReverseString reverses the given string while observing grapheme cluster // boundaries. func ReverseString(s string) string { str := []byte(s) reversed := make([]byte, len(str)) state := -1 index := len(str) for len(str) > 0 { var cluster []byte cluster, str, _, state = FirstGraphemeCluster(str, state) index -= len(cluster) copy(reversed[index:], cluster) if index <= len(str)/2 { break } } return string(reversed) } // The number of bits the grapheme property must be shifted to make place for // grapheme states. const shiftGraphemePropState = 4 // FirstGraphemeCluster returns the first grapheme cluster found in the given // byte slice according to the rules of [Unicode Standard Annex #29, Grapheme // Cluster Boundaries]. This function can be called continuously to extract all // grapheme clusters from a byte slice, as illustrated in the example below. // // If you don't know the current state, for example when calling the function // for the first time, you must pass -1. For consecutive calls, pass the state // and rest slice returned by the previous call. // // The "rest" slice is the sub-slice of the original byte slice "b" starting // after the last byte of the identified grapheme cluster. If the length of the // "rest" slice is 0, the entire byte slice "b" has been processed. The // "cluster" byte slice is the sub-slice of the input slice containing the // identified grapheme cluster. // // The returned width is the width of the grapheme cluster for most monospace // fonts where a value of 1 represents one character cell. // // Given an empty byte slice "b", the function returns nil values. // // While slightly less convenient than using the Graphemes class, this function // has much better performance and makes no allocations. It lends itself well to // large byte slices. // // [Unicode Standard Annex #29, Grapheme Cluster Boundaries]: http://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries func FirstGraphemeCluster(b []byte, state int) (cluster, rest []byte, width, newState int) { // An empty byte slice returns nothing. if len(b) == 0 { return } // Extract the first rune. r, length := utf8.DecodeRune(b) if len(b) <= length { // If we're already past the end, there is nothing else to parse. var prop int if state < 0 { prop = propertyGraphemes(r) } else { prop = state >> shiftGraphemePropState } return b, nil, runeWidth(r, prop), grAny | (prop << shiftGraphemePropState) } // If we don't know the state, determine it now. var firstProp int if state < 0 { state, firstProp, _ = transitionGraphemeState(state, r) } else { firstProp = state >> shiftGraphemePropState } width += runeWidth(r, firstProp) // Transition until we find a boundary. for { var ( prop int boundary bool ) r, l := utf8.DecodeRune(b[length:]) state, prop, boundary = transitionGraphemeState(state&maskGraphemeState, r) if boundary { return b[:length], b[length:], width, state | (prop << shiftGraphemePropState) } if firstProp == prExtendedPictographic { if r == vs15 { width = 1 } else if r == vs16 { width = 2 } } else if firstProp != prRegionalIndicator && firstProp != prL { width += runeWidth(r, prop) } length += l if len(b) <= length { return b, nil, width, grAny | (prop << shiftGraphemePropState) } } } // FirstGraphemeClusterInString is like [FirstGraphemeCluster] but its input and // outputs are strings. func FirstGraphemeClusterInString(str string, state int) (cluster, rest string, width, newState int) { // An empty string returns nothing. if len(str) == 0 { return } // Extract the first rune. r, length := utf8.DecodeRuneInString(str) if len(str) <= length { // If we're already past the end, there is nothing else to parse. var prop int if state < 0 { prop = propertyGraphemes(r) } else { prop = state >> shiftGraphemePropState } return str, "", runeWidth(r, prop), grAny | (prop << shiftGraphemePropState) } // If we don't know the state, determine it now. var firstProp int if state < 0 { state, firstProp, _ = transitionGraphemeState(state, r) } else { firstProp = state >> shiftGraphemePropState } width += runeWidth(r, firstProp) // Transition until we find a boundary. for { var ( prop int boundary bool ) r, l := utf8.DecodeRuneInString(str[length:]) state, prop, boundary = transitionGraphemeState(state&maskGraphemeState, r) if boundary { return str[:length], str[length:], width, state | (prop << shiftGraphemePropState) } if firstProp == prExtendedPictographic { if r == vs15 { width = 1 } else if r == vs16 { width = 2 } } else if firstProp != prRegionalIndicator && firstProp != prL { width += runeWidth(r, prop) } length += l if len(str) <= length { return str, "", width, grAny | (prop << shiftGraphemePropState) } } } ================================================ FILE: vendor/github.com/rivo/uniseg/graphemeproperties.go ================================================ // Code generated via go generate from gen_properties.go. DO NOT EDIT. package uniseg // graphemeCodePoints are taken from // https://www.unicode.org/Public/15.0.0/ucd/auxiliary/GraphemeBreakProperty.txt // and // https://unicode.org/Public/15.0.0/ucd/emoji/emoji-data.txt // ("Extended_Pictographic" only) // on September 5, 2023. See https://www.unicode.org/license.html for the Unicode // license agreement. var graphemeCodePoints = [][3]int{ {0x0000, 0x0009, prControl}, // Cc [10] .. {0x000A, 0x000A, prLF}, // Cc {0x000B, 0x000C, prControl}, // Cc [2] .. {0x000D, 0x000D, prCR}, // Cc {0x000E, 0x001F, prControl}, // Cc [18] .. {0x007F, 0x009F, prControl}, // Cc [33] .. {0x00A9, 0x00A9, prExtendedPictographic}, // E0.6 [1] (©️) copyright {0x00AD, 0x00AD, prControl}, // Cf SOFT HYPHEN {0x00AE, 0x00AE, prExtendedPictographic}, // E0.6 [1] (®️) registered {0x0300, 0x036F, prExtend}, // Mn [112] COMBINING GRAVE ACCENT..COMBINING LATIN SMALL LETTER X {0x0483, 0x0487, prExtend}, // Mn [5] COMBINING CYRILLIC TITLO..COMBINING CYRILLIC POKRYTIE {0x0488, 0x0489, prExtend}, // Me [2] COMBINING CYRILLIC HUNDRED THOUSANDS SIGN..COMBINING CYRILLIC MILLIONS SIGN {0x0591, 0x05BD, prExtend}, // Mn [45] HEBREW ACCENT ETNAHTA..HEBREW POINT METEG {0x05BF, 0x05BF, prExtend}, // Mn HEBREW POINT RAFE {0x05C1, 0x05C2, prExtend}, // Mn [2] HEBREW POINT SHIN DOT..HEBREW POINT SIN DOT {0x05C4, 0x05C5, prExtend}, // Mn [2] HEBREW MARK UPPER DOT..HEBREW MARK LOWER DOT {0x05C7, 0x05C7, prExtend}, // Mn HEBREW POINT QAMATS QATAN {0x0600, 0x0605, prPrepend}, // Cf [6] ARABIC NUMBER SIGN..ARABIC NUMBER MARK ABOVE {0x0610, 0x061A, prExtend}, // Mn [11] ARABIC SIGN SALLALLAHOU ALAYHE WASSALLAM..ARABIC SMALL KASRA {0x061C, 0x061C, prControl}, // Cf ARABIC LETTER MARK {0x064B, 0x065F, prExtend}, // Mn [21] ARABIC FATHATAN..ARABIC WAVY HAMZA BELOW {0x0670, 0x0670, prExtend}, // Mn ARABIC LETTER SUPERSCRIPT ALEF {0x06D6, 0x06DC, prExtend}, // Mn [7] ARABIC SMALL HIGH LIGATURE SAD WITH LAM WITH ALEF MAKSURA..ARABIC SMALL HIGH SEEN {0x06DD, 0x06DD, prPrepend}, // Cf ARABIC END OF AYAH {0x06DF, 0x06E4, prExtend}, // Mn [6] ARABIC SMALL HIGH ROUNDED ZERO..ARABIC SMALL HIGH MADDA {0x06E7, 0x06E8, prExtend}, // Mn [2] ARABIC SMALL HIGH YEH..ARABIC SMALL HIGH NOON {0x06EA, 0x06ED, prExtend}, // Mn [4] ARABIC EMPTY CENTRE LOW STOP..ARABIC SMALL LOW MEEM {0x070F, 0x070F, prPrepend}, // Cf SYRIAC ABBREVIATION MARK {0x0711, 0x0711, prExtend}, // Mn SYRIAC LETTER SUPERSCRIPT ALAPH {0x0730, 0x074A, prExtend}, // Mn [27] SYRIAC PTHAHA ABOVE..SYRIAC BARREKH {0x07A6, 0x07B0, prExtend}, // Mn [11] THAANA ABAFILI..THAANA SUKUN {0x07EB, 0x07F3, prExtend}, // Mn [9] NKO COMBINING SHORT HIGH TONE..NKO COMBINING DOUBLE DOT ABOVE {0x07FD, 0x07FD, prExtend}, // Mn NKO DANTAYALAN {0x0816, 0x0819, prExtend}, // Mn [4] SAMARITAN MARK IN..SAMARITAN MARK DAGESH {0x081B, 0x0823, prExtend}, // Mn [9] SAMARITAN MARK EPENTHETIC YUT..SAMARITAN VOWEL SIGN A {0x0825, 0x0827, prExtend}, // Mn [3] SAMARITAN VOWEL SIGN SHORT A..SAMARITAN VOWEL SIGN U {0x0829, 0x082D, prExtend}, // Mn [5] SAMARITAN VOWEL SIGN LONG I..SAMARITAN MARK NEQUDAA {0x0859, 0x085B, prExtend}, // Mn [3] MANDAIC AFFRICATION MARK..MANDAIC GEMINATION MARK {0x0890, 0x0891, prPrepend}, // Cf [2] ARABIC POUND MARK ABOVE..ARABIC PIASTRE MARK ABOVE {0x0898, 0x089F, prExtend}, // Mn [8] ARABIC SMALL HIGH WORD AL-JUZ..ARABIC HALF MADDA OVER MADDA {0x08CA, 0x08E1, prExtend}, // Mn [24] ARABIC SMALL HIGH FARSI YEH..ARABIC SMALL HIGH SIGN SAFHA {0x08E2, 0x08E2, prPrepend}, // Cf ARABIC DISPUTED END OF AYAH {0x08E3, 0x0902, prExtend}, // Mn [32] ARABIC TURNED DAMMA BELOW..DEVANAGARI SIGN ANUSVARA {0x0903, 0x0903, prSpacingMark}, // Mc DEVANAGARI SIGN VISARGA {0x093A, 0x093A, prExtend}, // Mn DEVANAGARI VOWEL SIGN OE {0x093B, 0x093B, prSpacingMark}, // Mc DEVANAGARI VOWEL SIGN OOE {0x093C, 0x093C, prExtend}, // Mn DEVANAGARI SIGN NUKTA {0x093E, 0x0940, prSpacingMark}, // Mc [3] DEVANAGARI VOWEL SIGN AA..DEVANAGARI VOWEL SIGN II {0x0941, 0x0948, prExtend}, // Mn [8] DEVANAGARI VOWEL SIGN U..DEVANAGARI VOWEL SIGN AI {0x0949, 0x094C, prSpacingMark}, // Mc [4] DEVANAGARI VOWEL SIGN CANDRA O..DEVANAGARI VOWEL SIGN AU {0x094D, 0x094D, prExtend}, // Mn DEVANAGARI SIGN VIRAMA {0x094E, 0x094F, prSpacingMark}, // Mc [2] DEVANAGARI VOWEL SIGN PRISHTHAMATRA E..DEVANAGARI VOWEL SIGN AW {0x0951, 0x0957, prExtend}, // Mn [7] DEVANAGARI STRESS SIGN UDATTA..DEVANAGARI VOWEL SIGN UUE {0x0962, 0x0963, prExtend}, // Mn [2] DEVANAGARI VOWEL SIGN VOCALIC L..DEVANAGARI VOWEL SIGN VOCALIC LL {0x0981, 0x0981, prExtend}, // Mn BENGALI SIGN CANDRABINDU {0x0982, 0x0983, prSpacingMark}, // Mc [2] BENGALI SIGN ANUSVARA..BENGALI SIGN VISARGA {0x09BC, 0x09BC, prExtend}, // Mn BENGALI SIGN NUKTA {0x09BE, 0x09BE, prExtend}, // Mc BENGALI VOWEL SIGN AA {0x09BF, 0x09C0, prSpacingMark}, // Mc [2] BENGALI VOWEL SIGN I..BENGALI VOWEL SIGN II {0x09C1, 0x09C4, prExtend}, // Mn [4] BENGALI VOWEL SIGN U..BENGALI VOWEL SIGN VOCALIC RR {0x09C7, 0x09C8, prSpacingMark}, // Mc [2] BENGALI VOWEL SIGN E..BENGALI VOWEL SIGN AI {0x09CB, 0x09CC, prSpacingMark}, // Mc [2] BENGALI VOWEL SIGN O..BENGALI VOWEL SIGN AU {0x09CD, 0x09CD, prExtend}, // Mn BENGALI SIGN VIRAMA {0x09D7, 0x09D7, prExtend}, // Mc BENGALI AU LENGTH MARK {0x09E2, 0x09E3, prExtend}, // Mn [2] BENGALI VOWEL SIGN VOCALIC L..BENGALI VOWEL SIGN VOCALIC LL {0x09FE, 0x09FE, prExtend}, // Mn BENGALI SANDHI MARK {0x0A01, 0x0A02, prExtend}, // Mn [2] GURMUKHI SIGN ADAK BINDI..GURMUKHI SIGN BINDI {0x0A03, 0x0A03, prSpacingMark}, // Mc GURMUKHI SIGN VISARGA {0x0A3C, 0x0A3C, prExtend}, // Mn GURMUKHI SIGN NUKTA {0x0A3E, 0x0A40, prSpacingMark}, // Mc [3] GURMUKHI VOWEL SIGN AA..GURMUKHI VOWEL SIGN II {0x0A41, 0x0A42, prExtend}, // Mn [2] GURMUKHI VOWEL SIGN U..GURMUKHI VOWEL SIGN UU {0x0A47, 0x0A48, prExtend}, // Mn [2] GURMUKHI VOWEL SIGN EE..GURMUKHI VOWEL SIGN AI {0x0A4B, 0x0A4D, prExtend}, // Mn [3] GURMUKHI VOWEL SIGN OO..GURMUKHI SIGN VIRAMA {0x0A51, 0x0A51, prExtend}, // Mn GURMUKHI SIGN UDAAT {0x0A70, 0x0A71, prExtend}, // Mn [2] GURMUKHI TIPPI..GURMUKHI ADDAK {0x0A75, 0x0A75, prExtend}, // Mn GURMUKHI SIGN YAKASH {0x0A81, 0x0A82, prExtend}, // Mn [2] GUJARATI SIGN CANDRABINDU..GUJARATI SIGN ANUSVARA {0x0A83, 0x0A83, prSpacingMark}, // Mc GUJARATI SIGN VISARGA {0x0ABC, 0x0ABC, prExtend}, // Mn GUJARATI SIGN NUKTA {0x0ABE, 0x0AC0, prSpacingMark}, // Mc [3] GUJARATI VOWEL SIGN AA..GUJARATI VOWEL SIGN II {0x0AC1, 0x0AC5, prExtend}, // Mn [5] GUJARATI VOWEL SIGN U..GUJARATI VOWEL SIGN CANDRA E {0x0AC7, 0x0AC8, prExtend}, // Mn [2] GUJARATI VOWEL SIGN E..GUJARATI VOWEL SIGN AI {0x0AC9, 0x0AC9, prSpacingMark}, // Mc GUJARATI VOWEL SIGN CANDRA O {0x0ACB, 0x0ACC, prSpacingMark}, // Mc [2] GUJARATI VOWEL SIGN O..GUJARATI VOWEL SIGN AU {0x0ACD, 0x0ACD, prExtend}, // Mn GUJARATI SIGN VIRAMA {0x0AE2, 0x0AE3, prExtend}, // Mn [2] GUJARATI VOWEL SIGN VOCALIC L..GUJARATI VOWEL SIGN VOCALIC LL {0x0AFA, 0x0AFF, prExtend}, // Mn [6] GUJARATI SIGN SUKUN..GUJARATI SIGN TWO-CIRCLE NUKTA ABOVE {0x0B01, 0x0B01, prExtend}, // Mn ORIYA SIGN CANDRABINDU {0x0B02, 0x0B03, prSpacingMark}, // Mc [2] ORIYA SIGN ANUSVARA..ORIYA SIGN VISARGA {0x0B3C, 0x0B3C, prExtend}, // Mn ORIYA SIGN NUKTA {0x0B3E, 0x0B3E, prExtend}, // Mc ORIYA VOWEL SIGN AA {0x0B3F, 0x0B3F, prExtend}, // Mn ORIYA VOWEL SIGN I {0x0B40, 0x0B40, prSpacingMark}, // Mc ORIYA VOWEL SIGN II {0x0B41, 0x0B44, prExtend}, // Mn [4] ORIYA VOWEL SIGN U..ORIYA VOWEL SIGN VOCALIC RR {0x0B47, 0x0B48, prSpacingMark}, // Mc [2] ORIYA VOWEL SIGN E..ORIYA VOWEL SIGN AI {0x0B4B, 0x0B4C, prSpacingMark}, // Mc [2] ORIYA VOWEL SIGN O..ORIYA VOWEL SIGN AU {0x0B4D, 0x0B4D, prExtend}, // Mn ORIYA SIGN VIRAMA {0x0B55, 0x0B56, prExtend}, // Mn [2] ORIYA SIGN OVERLINE..ORIYA AI LENGTH MARK {0x0B57, 0x0B57, prExtend}, // Mc ORIYA AU LENGTH MARK {0x0B62, 0x0B63, prExtend}, // Mn [2] ORIYA VOWEL SIGN VOCALIC L..ORIYA VOWEL SIGN VOCALIC LL {0x0B82, 0x0B82, prExtend}, // Mn TAMIL SIGN ANUSVARA {0x0BBE, 0x0BBE, prExtend}, // Mc TAMIL VOWEL SIGN AA {0x0BBF, 0x0BBF, prSpacingMark}, // Mc TAMIL VOWEL SIGN I {0x0BC0, 0x0BC0, prExtend}, // Mn TAMIL VOWEL SIGN II {0x0BC1, 0x0BC2, prSpacingMark}, // Mc [2] TAMIL VOWEL SIGN U..TAMIL VOWEL SIGN UU {0x0BC6, 0x0BC8, prSpacingMark}, // Mc [3] TAMIL VOWEL SIGN E..TAMIL VOWEL SIGN AI {0x0BCA, 0x0BCC, prSpacingMark}, // Mc [3] TAMIL VOWEL SIGN O..TAMIL VOWEL SIGN AU {0x0BCD, 0x0BCD, prExtend}, // Mn TAMIL SIGN VIRAMA {0x0BD7, 0x0BD7, prExtend}, // Mc TAMIL AU LENGTH MARK {0x0C00, 0x0C00, prExtend}, // Mn TELUGU SIGN COMBINING CANDRABINDU ABOVE {0x0C01, 0x0C03, prSpacingMark}, // Mc [3] TELUGU SIGN CANDRABINDU..TELUGU SIGN VISARGA {0x0C04, 0x0C04, prExtend}, // Mn TELUGU SIGN COMBINING ANUSVARA ABOVE {0x0C3C, 0x0C3C, prExtend}, // Mn TELUGU SIGN NUKTA {0x0C3E, 0x0C40, prExtend}, // Mn [3] TELUGU VOWEL SIGN AA..TELUGU VOWEL SIGN II {0x0C41, 0x0C44, prSpacingMark}, // Mc [4] TELUGU VOWEL SIGN U..TELUGU VOWEL SIGN VOCALIC RR {0x0C46, 0x0C48, prExtend}, // Mn [3] TELUGU VOWEL SIGN E..TELUGU VOWEL SIGN AI {0x0C4A, 0x0C4D, prExtend}, // Mn [4] TELUGU VOWEL SIGN O..TELUGU SIGN VIRAMA {0x0C55, 0x0C56, prExtend}, // Mn [2] TELUGU LENGTH MARK..TELUGU AI LENGTH MARK {0x0C62, 0x0C63, prExtend}, // Mn [2] TELUGU VOWEL SIGN VOCALIC L..TELUGU VOWEL SIGN VOCALIC LL {0x0C81, 0x0C81, prExtend}, // Mn KANNADA SIGN CANDRABINDU {0x0C82, 0x0C83, prSpacingMark}, // Mc [2] KANNADA SIGN ANUSVARA..KANNADA SIGN VISARGA {0x0CBC, 0x0CBC, prExtend}, // Mn KANNADA SIGN NUKTA {0x0CBE, 0x0CBE, prSpacingMark}, // Mc KANNADA VOWEL SIGN AA {0x0CBF, 0x0CBF, prExtend}, // Mn KANNADA VOWEL SIGN I {0x0CC0, 0x0CC1, prSpacingMark}, // Mc [2] KANNADA VOWEL SIGN II..KANNADA VOWEL SIGN U {0x0CC2, 0x0CC2, prExtend}, // Mc KANNADA VOWEL SIGN UU {0x0CC3, 0x0CC4, prSpacingMark}, // Mc [2] KANNADA VOWEL SIGN VOCALIC R..KANNADA VOWEL SIGN VOCALIC RR {0x0CC6, 0x0CC6, prExtend}, // Mn KANNADA VOWEL SIGN E {0x0CC7, 0x0CC8, prSpacingMark}, // Mc [2] KANNADA VOWEL SIGN EE..KANNADA VOWEL SIGN AI {0x0CCA, 0x0CCB, prSpacingMark}, // Mc [2] KANNADA VOWEL SIGN O..KANNADA VOWEL SIGN OO {0x0CCC, 0x0CCD, prExtend}, // Mn [2] KANNADA VOWEL SIGN AU..KANNADA SIGN VIRAMA {0x0CD5, 0x0CD6, prExtend}, // Mc [2] KANNADA LENGTH MARK..KANNADA AI LENGTH MARK {0x0CE2, 0x0CE3, prExtend}, // Mn [2] KANNADA VOWEL SIGN VOCALIC L..KANNADA VOWEL SIGN VOCALIC LL {0x0CF3, 0x0CF3, prSpacingMark}, // Mc KANNADA SIGN COMBINING ANUSVARA ABOVE RIGHT {0x0D00, 0x0D01, prExtend}, // Mn [2] MALAYALAM SIGN COMBINING ANUSVARA ABOVE..MALAYALAM SIGN CANDRABINDU {0x0D02, 0x0D03, prSpacingMark}, // Mc [2] MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA {0x0D3B, 0x0D3C, prExtend}, // Mn [2] MALAYALAM SIGN VERTICAL BAR VIRAMA..MALAYALAM SIGN CIRCULAR VIRAMA {0x0D3E, 0x0D3E, prExtend}, // Mc MALAYALAM VOWEL SIGN AA {0x0D3F, 0x0D40, prSpacingMark}, // Mc [2] MALAYALAM VOWEL SIGN I..MALAYALAM VOWEL SIGN II {0x0D41, 0x0D44, prExtend}, // Mn [4] MALAYALAM VOWEL SIGN U..MALAYALAM VOWEL SIGN VOCALIC RR {0x0D46, 0x0D48, prSpacingMark}, // Mc [3] MALAYALAM VOWEL SIGN E..MALAYALAM VOWEL SIGN AI {0x0D4A, 0x0D4C, prSpacingMark}, // Mc [3] MALAYALAM VOWEL SIGN O..MALAYALAM VOWEL SIGN AU {0x0D4D, 0x0D4D, prExtend}, // Mn MALAYALAM SIGN VIRAMA {0x0D4E, 0x0D4E, prPrepend}, // Lo MALAYALAM LETTER DOT REPH {0x0D57, 0x0D57, prExtend}, // Mc MALAYALAM AU LENGTH MARK {0x0D62, 0x0D63, prExtend}, // Mn [2] MALAYALAM VOWEL SIGN VOCALIC L..MALAYALAM VOWEL SIGN VOCALIC LL {0x0D81, 0x0D81, prExtend}, // Mn SINHALA SIGN CANDRABINDU {0x0D82, 0x0D83, prSpacingMark}, // Mc [2] SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARGAYA {0x0DCA, 0x0DCA, prExtend}, // Mn SINHALA SIGN AL-LAKUNA {0x0DCF, 0x0DCF, prExtend}, // Mc SINHALA VOWEL SIGN AELA-PILLA {0x0DD0, 0x0DD1, prSpacingMark}, // Mc [2] SINHALA VOWEL SIGN KETTI AEDA-PILLA..SINHALA VOWEL SIGN DIGA AEDA-PILLA {0x0DD2, 0x0DD4, prExtend}, // Mn [3] SINHALA VOWEL SIGN KETTI IS-PILLA..SINHALA VOWEL SIGN KETTI PAA-PILLA {0x0DD6, 0x0DD6, prExtend}, // Mn SINHALA VOWEL SIGN DIGA PAA-PILLA {0x0DD8, 0x0DDE, prSpacingMark}, // Mc [7] SINHALA VOWEL SIGN GAETTA-PILLA..SINHALA VOWEL SIGN KOMBUVA HAA GAYANUKITTA {0x0DDF, 0x0DDF, prExtend}, // Mc SINHALA VOWEL SIGN GAYANUKITTA {0x0DF2, 0x0DF3, prSpacingMark}, // Mc [2] SINHALA VOWEL SIGN DIGA GAETTA-PILLA..SINHALA VOWEL SIGN DIGA GAYANUKITTA {0x0E31, 0x0E31, prExtend}, // Mn THAI CHARACTER MAI HAN-AKAT {0x0E33, 0x0E33, prSpacingMark}, // Lo THAI CHARACTER SARA AM {0x0E34, 0x0E3A, prExtend}, // Mn [7] THAI CHARACTER SARA I..THAI CHARACTER PHINTHU {0x0E47, 0x0E4E, prExtend}, // Mn [8] THAI CHARACTER MAITAIKHU..THAI CHARACTER YAMAKKAN {0x0EB1, 0x0EB1, prExtend}, // Mn LAO VOWEL SIGN MAI KAN {0x0EB3, 0x0EB3, prSpacingMark}, // Lo LAO VOWEL SIGN AM {0x0EB4, 0x0EBC, prExtend}, // Mn [9] LAO VOWEL SIGN I..LAO SEMIVOWEL SIGN LO {0x0EC8, 0x0ECE, prExtend}, // Mn [7] LAO TONE MAI EK..LAO YAMAKKAN {0x0F18, 0x0F19, prExtend}, // Mn [2] TIBETAN ASTROLOGICAL SIGN -KHYUD PA..TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS {0x0F35, 0x0F35, prExtend}, // Mn TIBETAN MARK NGAS BZUNG NYI ZLA {0x0F37, 0x0F37, prExtend}, // Mn TIBETAN MARK NGAS BZUNG SGOR RTAGS {0x0F39, 0x0F39, prExtend}, // Mn TIBETAN MARK TSA -PHRU {0x0F3E, 0x0F3F, prSpacingMark}, // Mc [2] TIBETAN SIGN YAR TSHES..TIBETAN SIGN MAR TSHES {0x0F71, 0x0F7E, prExtend}, // Mn [14] TIBETAN VOWEL SIGN AA..TIBETAN SIGN RJES SU NGA RO {0x0F7F, 0x0F7F, prSpacingMark}, // Mc TIBETAN SIGN RNAM BCAD {0x0F80, 0x0F84, prExtend}, // Mn [5] TIBETAN VOWEL SIGN REVERSED I..TIBETAN MARK HALANTA {0x0F86, 0x0F87, prExtend}, // Mn [2] TIBETAN SIGN LCI RTAGS..TIBETAN SIGN YANG RTAGS {0x0F8D, 0x0F97, prExtend}, // Mn [11] TIBETAN SUBJOINED SIGN LCE TSA CAN..TIBETAN SUBJOINED LETTER JA {0x0F99, 0x0FBC, prExtend}, // Mn [36] TIBETAN SUBJOINED LETTER NYA..TIBETAN SUBJOINED LETTER FIXED-FORM RA {0x0FC6, 0x0FC6, prExtend}, // Mn TIBETAN SYMBOL PADMA GDAN {0x102D, 0x1030, prExtend}, // Mn [4] MYANMAR VOWEL SIGN I..MYANMAR VOWEL SIGN UU {0x1031, 0x1031, prSpacingMark}, // Mc MYANMAR VOWEL SIGN E {0x1032, 0x1037, prExtend}, // Mn [6] MYANMAR VOWEL SIGN AI..MYANMAR SIGN DOT BELOW {0x1039, 0x103A, prExtend}, // Mn [2] MYANMAR SIGN VIRAMA..MYANMAR SIGN ASAT {0x103B, 0x103C, prSpacingMark}, // Mc [2] MYANMAR CONSONANT SIGN MEDIAL YA..MYANMAR CONSONANT SIGN MEDIAL RA {0x103D, 0x103E, prExtend}, // Mn [2] MYANMAR CONSONANT SIGN MEDIAL WA..MYANMAR CONSONANT SIGN MEDIAL HA {0x1056, 0x1057, prSpacingMark}, // Mc [2] MYANMAR VOWEL SIGN VOCALIC R..MYANMAR VOWEL SIGN VOCALIC RR {0x1058, 0x1059, prExtend}, // Mn [2] MYANMAR VOWEL SIGN VOCALIC L..MYANMAR VOWEL SIGN VOCALIC LL {0x105E, 0x1060, prExtend}, // Mn [3] MYANMAR CONSONANT SIGN MON MEDIAL NA..MYANMAR CONSONANT SIGN MON MEDIAL LA {0x1071, 0x1074, prExtend}, // Mn [4] MYANMAR VOWEL SIGN GEBA KAREN I..MYANMAR VOWEL SIGN KAYAH EE {0x1082, 0x1082, prExtend}, // Mn MYANMAR CONSONANT SIGN SHAN MEDIAL WA {0x1084, 0x1084, prSpacingMark}, // Mc MYANMAR VOWEL SIGN SHAN E {0x1085, 0x1086, prExtend}, // Mn [2] MYANMAR VOWEL SIGN SHAN E ABOVE..MYANMAR VOWEL SIGN SHAN FINAL Y {0x108D, 0x108D, prExtend}, // Mn MYANMAR SIGN SHAN COUNCIL EMPHATIC TONE {0x109D, 0x109D, prExtend}, // Mn MYANMAR VOWEL SIGN AITON AI {0x1100, 0x115F, prL}, // Lo [96] HANGUL CHOSEONG KIYEOK..HANGUL CHOSEONG FILLER {0x1160, 0x11A7, prV}, // Lo [72] HANGUL JUNGSEONG FILLER..HANGUL JUNGSEONG O-YAE {0x11A8, 0x11FF, prT}, // Lo [88] HANGUL JONGSEONG KIYEOK..HANGUL JONGSEONG SSANGNIEUN {0x135D, 0x135F, prExtend}, // Mn [3] ETHIOPIC COMBINING GEMINATION AND VOWEL LENGTH MARK..ETHIOPIC COMBINING GEMINATION MARK {0x1712, 0x1714, prExtend}, // Mn [3] TAGALOG VOWEL SIGN I..TAGALOG SIGN VIRAMA {0x1715, 0x1715, prSpacingMark}, // Mc TAGALOG SIGN PAMUDPOD {0x1732, 0x1733, prExtend}, // Mn [2] HANUNOO VOWEL SIGN I..HANUNOO VOWEL SIGN U {0x1734, 0x1734, prSpacingMark}, // Mc HANUNOO SIGN PAMUDPOD {0x1752, 0x1753, prExtend}, // Mn [2] BUHID VOWEL SIGN I..BUHID VOWEL SIGN U {0x1772, 0x1773, prExtend}, // Mn [2] TAGBANWA VOWEL SIGN I..TAGBANWA VOWEL SIGN U {0x17B4, 0x17B5, prExtend}, // Mn [2] KHMER VOWEL INHERENT AQ..KHMER VOWEL INHERENT AA {0x17B6, 0x17B6, prSpacingMark}, // Mc KHMER VOWEL SIGN AA {0x17B7, 0x17BD, prExtend}, // Mn [7] KHMER VOWEL SIGN I..KHMER VOWEL SIGN UA {0x17BE, 0x17C5, prSpacingMark}, // Mc [8] KHMER VOWEL SIGN OE..KHMER VOWEL SIGN AU {0x17C6, 0x17C6, prExtend}, // Mn KHMER SIGN NIKAHIT {0x17C7, 0x17C8, prSpacingMark}, // Mc [2] KHMER SIGN REAHMUK..KHMER SIGN YUUKALEAPINTU {0x17C9, 0x17D3, prExtend}, // Mn [11] KHMER SIGN MUUSIKATOAN..KHMER SIGN BATHAMASAT {0x17DD, 0x17DD, prExtend}, // Mn KHMER SIGN ATTHACAN {0x180B, 0x180D, prExtend}, // Mn [3] MONGOLIAN FREE VARIATION SELECTOR ONE..MONGOLIAN FREE VARIATION SELECTOR THREE {0x180E, 0x180E, prControl}, // Cf MONGOLIAN VOWEL SEPARATOR {0x180F, 0x180F, prExtend}, // Mn MONGOLIAN FREE VARIATION SELECTOR FOUR {0x1885, 0x1886, prExtend}, // Mn [2] MONGOLIAN LETTER ALI GALI BALUDA..MONGOLIAN LETTER ALI GALI THREE BALUDA {0x18A9, 0x18A9, prExtend}, // Mn MONGOLIAN LETTER ALI GALI DAGALGA {0x1920, 0x1922, prExtend}, // Mn [3] LIMBU VOWEL SIGN A..LIMBU VOWEL SIGN U {0x1923, 0x1926, prSpacingMark}, // Mc [4] LIMBU VOWEL SIGN EE..LIMBU VOWEL SIGN AU {0x1927, 0x1928, prExtend}, // Mn [2] LIMBU VOWEL SIGN E..LIMBU VOWEL SIGN O {0x1929, 0x192B, prSpacingMark}, // Mc [3] LIMBU SUBJOINED LETTER YA..LIMBU SUBJOINED LETTER WA {0x1930, 0x1931, prSpacingMark}, // Mc [2] LIMBU SMALL LETTER KA..LIMBU SMALL LETTER NGA {0x1932, 0x1932, prExtend}, // Mn LIMBU SMALL LETTER ANUSVARA {0x1933, 0x1938, prSpacingMark}, // Mc [6] LIMBU SMALL LETTER TA..LIMBU SMALL LETTER LA {0x1939, 0x193B, prExtend}, // Mn [3] LIMBU SIGN MUKPHRENG..LIMBU SIGN SA-I {0x1A17, 0x1A18, prExtend}, // Mn [2] BUGINESE VOWEL SIGN I..BUGINESE VOWEL SIGN U {0x1A19, 0x1A1A, prSpacingMark}, // Mc [2] BUGINESE VOWEL SIGN E..BUGINESE VOWEL SIGN O {0x1A1B, 0x1A1B, prExtend}, // Mn BUGINESE VOWEL SIGN AE {0x1A55, 0x1A55, prSpacingMark}, // Mc TAI THAM CONSONANT SIGN MEDIAL RA {0x1A56, 0x1A56, prExtend}, // Mn TAI THAM CONSONANT SIGN MEDIAL LA {0x1A57, 0x1A57, prSpacingMark}, // Mc TAI THAM CONSONANT SIGN LA TANG LAI {0x1A58, 0x1A5E, prExtend}, // Mn [7] TAI THAM SIGN MAI KANG LAI..TAI THAM CONSONANT SIGN SA {0x1A60, 0x1A60, prExtend}, // Mn TAI THAM SIGN SAKOT {0x1A62, 0x1A62, prExtend}, // Mn TAI THAM VOWEL SIGN MAI SAT {0x1A65, 0x1A6C, prExtend}, // Mn [8] TAI THAM VOWEL SIGN I..TAI THAM VOWEL SIGN OA BELOW {0x1A6D, 0x1A72, prSpacingMark}, // Mc [6] TAI THAM VOWEL SIGN OY..TAI THAM VOWEL SIGN THAM AI {0x1A73, 0x1A7C, prExtend}, // Mn [10] TAI THAM VOWEL SIGN OA ABOVE..TAI THAM SIGN KHUEN-LUE KARAN {0x1A7F, 0x1A7F, prExtend}, // Mn TAI THAM COMBINING CRYPTOGRAMMIC DOT {0x1AB0, 0x1ABD, prExtend}, // Mn [14] COMBINING DOUBLED CIRCUMFLEX ACCENT..COMBINING PARENTHESES BELOW {0x1ABE, 0x1ABE, prExtend}, // Me COMBINING PARENTHESES OVERLAY {0x1ABF, 0x1ACE, prExtend}, // Mn [16] COMBINING LATIN SMALL LETTER W BELOW..COMBINING LATIN SMALL LETTER INSULAR T {0x1B00, 0x1B03, prExtend}, // Mn [4] BALINESE SIGN ULU RICEM..BALINESE SIGN SURANG {0x1B04, 0x1B04, prSpacingMark}, // Mc BALINESE SIGN BISAH {0x1B34, 0x1B34, prExtend}, // Mn BALINESE SIGN REREKAN {0x1B35, 0x1B35, prExtend}, // Mc BALINESE VOWEL SIGN TEDUNG {0x1B36, 0x1B3A, prExtend}, // Mn [5] BALINESE VOWEL SIGN ULU..BALINESE VOWEL SIGN RA REPA {0x1B3B, 0x1B3B, prSpacingMark}, // Mc BALINESE VOWEL SIGN RA REPA TEDUNG {0x1B3C, 0x1B3C, prExtend}, // Mn BALINESE VOWEL SIGN LA LENGA {0x1B3D, 0x1B41, prSpacingMark}, // Mc [5] BALINESE VOWEL SIGN LA LENGA TEDUNG..BALINESE VOWEL SIGN TALING REPA TEDUNG {0x1B42, 0x1B42, prExtend}, // Mn BALINESE VOWEL SIGN PEPET {0x1B43, 0x1B44, prSpacingMark}, // Mc [2] BALINESE VOWEL SIGN PEPET TEDUNG..BALINESE ADEG ADEG {0x1B6B, 0x1B73, prExtend}, // Mn [9] BALINESE MUSICAL SYMBOL COMBINING TEGEH..BALINESE MUSICAL SYMBOL COMBINING GONG {0x1B80, 0x1B81, prExtend}, // Mn [2] SUNDANESE SIGN PANYECEK..SUNDANESE SIGN PANGLAYAR {0x1B82, 0x1B82, prSpacingMark}, // Mc SUNDANESE SIGN PANGWISAD {0x1BA1, 0x1BA1, prSpacingMark}, // Mc SUNDANESE CONSONANT SIGN PAMINGKAL {0x1BA2, 0x1BA5, prExtend}, // Mn [4] SUNDANESE CONSONANT SIGN PANYAKRA..SUNDANESE VOWEL SIGN PANYUKU {0x1BA6, 0x1BA7, prSpacingMark}, // Mc [2] SUNDANESE VOWEL SIGN PANAELAENG..SUNDANESE VOWEL SIGN PANOLONG {0x1BA8, 0x1BA9, prExtend}, // Mn [2] SUNDANESE VOWEL SIGN PAMEPET..SUNDANESE VOWEL SIGN PANEULEUNG {0x1BAA, 0x1BAA, prSpacingMark}, // Mc SUNDANESE SIGN PAMAAEH {0x1BAB, 0x1BAD, prExtend}, // Mn [3] SUNDANESE SIGN VIRAMA..SUNDANESE CONSONANT SIGN PASANGAN WA {0x1BE6, 0x1BE6, prExtend}, // Mn BATAK SIGN TOMPI {0x1BE7, 0x1BE7, prSpacingMark}, // Mc BATAK VOWEL SIGN E {0x1BE8, 0x1BE9, prExtend}, // Mn [2] BATAK VOWEL SIGN PAKPAK E..BATAK VOWEL SIGN EE {0x1BEA, 0x1BEC, prSpacingMark}, // Mc [3] BATAK VOWEL SIGN I..BATAK VOWEL SIGN O {0x1BED, 0x1BED, prExtend}, // Mn BATAK VOWEL SIGN KARO O {0x1BEE, 0x1BEE, prSpacingMark}, // Mc BATAK VOWEL SIGN U {0x1BEF, 0x1BF1, prExtend}, // Mn [3] BATAK VOWEL SIGN U FOR SIMALUNGUN SA..BATAK CONSONANT SIGN H {0x1BF2, 0x1BF3, prSpacingMark}, // Mc [2] BATAK PANGOLAT..BATAK PANONGONAN {0x1C24, 0x1C2B, prSpacingMark}, // Mc [8] LEPCHA SUBJOINED LETTER YA..LEPCHA VOWEL SIGN UU {0x1C2C, 0x1C33, prExtend}, // Mn [8] LEPCHA VOWEL SIGN E..LEPCHA CONSONANT SIGN T {0x1C34, 0x1C35, prSpacingMark}, // Mc [2] LEPCHA CONSONANT SIGN NYIN-DO..LEPCHA CONSONANT SIGN KANG {0x1C36, 0x1C37, prExtend}, // Mn [2] LEPCHA SIGN RAN..LEPCHA SIGN NUKTA {0x1CD0, 0x1CD2, prExtend}, // Mn [3] VEDIC TONE KARSHANA..VEDIC TONE PRENKHA {0x1CD4, 0x1CE0, prExtend}, // Mn [13] VEDIC SIGN YAJURVEDIC MIDLINE SVARITA..VEDIC TONE RIGVEDIC KASHMIRI INDEPENDENT SVARITA {0x1CE1, 0x1CE1, prSpacingMark}, // Mc VEDIC TONE ATHARVAVEDIC INDEPENDENT SVARITA {0x1CE2, 0x1CE8, prExtend}, // Mn [7] VEDIC SIGN VISARGA SVARITA..VEDIC SIGN VISARGA ANUDATTA WITH TAIL {0x1CED, 0x1CED, prExtend}, // Mn VEDIC SIGN TIRYAK {0x1CF4, 0x1CF4, prExtend}, // Mn VEDIC TONE CANDRA ABOVE {0x1CF7, 0x1CF7, prSpacingMark}, // Mc VEDIC SIGN ATIKRAMA {0x1CF8, 0x1CF9, prExtend}, // Mn [2] VEDIC TONE RING ABOVE..VEDIC TONE DOUBLE RING ABOVE {0x1DC0, 0x1DFF, prExtend}, // Mn [64] COMBINING DOTTED GRAVE ACCENT..COMBINING RIGHT ARROWHEAD AND DOWN ARROWHEAD BELOW {0x200B, 0x200B, prControl}, // Cf ZERO WIDTH SPACE {0x200C, 0x200C, prExtend}, // Cf ZERO WIDTH NON-JOINER {0x200D, 0x200D, prZWJ}, // Cf ZERO WIDTH JOINER {0x200E, 0x200F, prControl}, // Cf [2] LEFT-TO-RIGHT MARK..RIGHT-TO-LEFT MARK {0x2028, 0x2028, prControl}, // Zl LINE SEPARATOR {0x2029, 0x2029, prControl}, // Zp PARAGRAPH SEPARATOR {0x202A, 0x202E, prControl}, // Cf [5] LEFT-TO-RIGHT EMBEDDING..RIGHT-TO-LEFT OVERRIDE {0x203C, 0x203C, prExtendedPictographic}, // E0.6 [1] (‼️) double exclamation mark {0x2049, 0x2049, prExtendedPictographic}, // E0.6 [1] (⁉️) exclamation question mark {0x2060, 0x2064, prControl}, // Cf [5] WORD JOINER..INVISIBLE PLUS {0x2065, 0x2065, prControl}, // Cn {0x2066, 0x206F, prControl}, // Cf [10] LEFT-TO-RIGHT ISOLATE..NOMINAL DIGIT SHAPES {0x20D0, 0x20DC, prExtend}, // Mn [13] COMBINING LEFT HARPOON ABOVE..COMBINING FOUR DOTS ABOVE {0x20DD, 0x20E0, prExtend}, // Me [4] COMBINING ENCLOSING CIRCLE..COMBINING ENCLOSING CIRCLE BACKSLASH {0x20E1, 0x20E1, prExtend}, // Mn COMBINING LEFT RIGHT ARROW ABOVE {0x20E2, 0x20E4, prExtend}, // Me [3] COMBINING ENCLOSING SCREEN..COMBINING ENCLOSING UPWARD POINTING TRIANGLE {0x20E5, 0x20F0, prExtend}, // Mn [12] COMBINING REVERSE SOLIDUS OVERLAY..COMBINING ASTERISK ABOVE {0x2122, 0x2122, prExtendedPictographic}, // E0.6 [1] (™️) trade mark {0x2139, 0x2139, prExtendedPictographic}, // E0.6 [1] (ℹ️) information {0x2194, 0x2199, prExtendedPictographic}, // E0.6 [6] (↔️..↙️) left-right arrow..down-left arrow {0x21A9, 0x21AA, prExtendedPictographic}, // E0.6 [2] (↩️..↪️) right arrow curving left..left arrow curving right {0x231A, 0x231B, prExtendedPictographic}, // E0.6 [2] (⌚..⌛) watch..hourglass done {0x2328, 0x2328, prExtendedPictographic}, // E1.0 [1] (⌨️) keyboard {0x2388, 0x2388, prExtendedPictographic}, // E0.0 [1] (⎈) HELM SYMBOL {0x23CF, 0x23CF, prExtendedPictographic}, // E1.0 [1] (⏏️) eject button {0x23E9, 0x23EC, prExtendedPictographic}, // E0.6 [4] (⏩..⏬) fast-forward button..fast down button {0x23ED, 0x23EE, prExtendedPictographic}, // E0.7 [2] (⏭️..⏮️) next track button..last track button {0x23EF, 0x23EF, prExtendedPictographic}, // E1.0 [1] (⏯️) play or pause button {0x23F0, 0x23F0, prExtendedPictographic}, // E0.6 [1] (⏰) alarm clock {0x23F1, 0x23F2, prExtendedPictographic}, // E1.0 [2] (⏱️..⏲️) stopwatch..timer clock {0x23F3, 0x23F3, prExtendedPictographic}, // E0.6 [1] (⏳) hourglass not done {0x23F8, 0x23FA, prExtendedPictographic}, // E0.7 [3] (⏸️..⏺️) pause button..record button {0x24C2, 0x24C2, prExtendedPictographic}, // E0.6 [1] (Ⓜ️) circled M {0x25AA, 0x25AB, prExtendedPictographic}, // E0.6 [2] (▪️..▫️) black small square..white small square {0x25B6, 0x25B6, prExtendedPictographic}, // E0.6 [1] (▶️) play button {0x25C0, 0x25C0, prExtendedPictographic}, // E0.6 [1] (◀️) reverse button {0x25FB, 0x25FE, prExtendedPictographic}, // E0.6 [4] (◻️..◾) white medium square..black medium-small square {0x2600, 0x2601, prExtendedPictographic}, // E0.6 [2] (☀️..☁️) sun..cloud {0x2602, 0x2603, prExtendedPictographic}, // E0.7 [2] (☂️..☃️) umbrella..snowman {0x2604, 0x2604, prExtendedPictographic}, // E1.0 [1] (☄️) comet {0x2605, 0x2605, prExtendedPictographic}, // E0.0 [1] (★) BLACK STAR {0x2607, 0x260D, prExtendedPictographic}, // E0.0 [7] (☇..☍) LIGHTNING..OPPOSITION {0x260E, 0x260E, prExtendedPictographic}, // E0.6 [1] (☎️) telephone {0x260F, 0x2610, prExtendedPictographic}, // E0.0 [2] (☏..☐) WHITE TELEPHONE..BALLOT BOX {0x2611, 0x2611, prExtendedPictographic}, // E0.6 [1] (☑️) check box with check {0x2612, 0x2612, prExtendedPictographic}, // E0.0 [1] (☒) BALLOT BOX WITH X {0x2614, 0x2615, prExtendedPictographic}, // E0.6 [2] (☔..☕) umbrella with rain drops..hot beverage {0x2616, 0x2617, prExtendedPictographic}, // E0.0 [2] (☖..☗) WHITE SHOGI PIECE..BLACK SHOGI PIECE {0x2618, 0x2618, prExtendedPictographic}, // E1.0 [1] (☘️) shamrock {0x2619, 0x261C, prExtendedPictographic}, // E0.0 [4] (☙..☜) REVERSED ROTATED FLORAL HEART BULLET..WHITE LEFT POINTING INDEX {0x261D, 0x261D, prExtendedPictographic}, // E0.6 [1] (☝️) index pointing up {0x261E, 0x261F, prExtendedPictographic}, // E0.0 [2] (☞..☟) WHITE RIGHT POINTING INDEX..WHITE DOWN POINTING INDEX {0x2620, 0x2620, prExtendedPictographic}, // E1.0 [1] (☠️) skull and crossbones {0x2621, 0x2621, prExtendedPictographic}, // E0.0 [1] (☡) CAUTION SIGN {0x2622, 0x2623, prExtendedPictographic}, // E1.0 [2] (☢️..☣️) radioactive..biohazard {0x2624, 0x2625, prExtendedPictographic}, // E0.0 [2] (☤..☥) CADUCEUS..ANKH {0x2626, 0x2626, prExtendedPictographic}, // E1.0 [1] (☦️) orthodox cross {0x2627, 0x2629, prExtendedPictographic}, // E0.0 [3] (☧..☩) CHI RHO..CROSS OF JERUSALEM {0x262A, 0x262A, prExtendedPictographic}, // E0.7 [1] (☪️) star and crescent {0x262B, 0x262D, prExtendedPictographic}, // E0.0 [3] (☫..☭) FARSI SYMBOL..HAMMER AND SICKLE {0x262E, 0x262E, prExtendedPictographic}, // E1.0 [1] (☮️) peace symbol {0x262F, 0x262F, prExtendedPictographic}, // E0.7 [1] (☯️) yin yang {0x2630, 0x2637, prExtendedPictographic}, // E0.0 [8] (☰..☷) TRIGRAM FOR HEAVEN..TRIGRAM FOR EARTH {0x2638, 0x2639, prExtendedPictographic}, // E0.7 [2] (☸️..☹️) wheel of dharma..frowning face {0x263A, 0x263A, prExtendedPictographic}, // E0.6 [1] (☺️) smiling face {0x263B, 0x263F, prExtendedPictographic}, // E0.0 [5] (☻..☿) BLACK SMILING FACE..MERCURY {0x2640, 0x2640, prExtendedPictographic}, // E4.0 [1] (♀️) female sign {0x2641, 0x2641, prExtendedPictographic}, // E0.0 [1] (♁) EARTH {0x2642, 0x2642, prExtendedPictographic}, // E4.0 [1] (♂️) male sign {0x2643, 0x2647, prExtendedPictographic}, // E0.0 [5] (♃..♇) JUPITER..PLUTO {0x2648, 0x2653, prExtendedPictographic}, // E0.6 [12] (♈..♓) Aries..Pisces {0x2654, 0x265E, prExtendedPictographic}, // E0.0 [11] (♔..♞) WHITE CHESS KING..BLACK CHESS KNIGHT {0x265F, 0x265F, prExtendedPictographic}, // E11.0 [1] (♟️) chess pawn {0x2660, 0x2660, prExtendedPictographic}, // E0.6 [1] (♠️) spade suit {0x2661, 0x2662, prExtendedPictographic}, // E0.0 [2] (♡..♢) WHITE HEART SUIT..WHITE DIAMOND SUIT {0x2663, 0x2663, prExtendedPictographic}, // E0.6 [1] (♣️) club suit {0x2664, 0x2664, prExtendedPictographic}, // E0.0 [1] (♤) WHITE SPADE SUIT {0x2665, 0x2666, prExtendedPictographic}, // E0.6 [2] (♥️..♦️) heart suit..diamond suit {0x2667, 0x2667, prExtendedPictographic}, // E0.0 [1] (♧) WHITE CLUB SUIT {0x2668, 0x2668, prExtendedPictographic}, // E0.6 [1] (♨️) hot springs {0x2669, 0x267A, prExtendedPictographic}, // E0.0 [18] (♩..♺) QUARTER NOTE..RECYCLING SYMBOL FOR GENERIC MATERIALS {0x267B, 0x267B, prExtendedPictographic}, // E0.6 [1] (♻️) recycling symbol {0x267C, 0x267D, prExtendedPictographic}, // E0.0 [2] (♼..♽) RECYCLED PAPER SYMBOL..PARTIALLY-RECYCLED PAPER SYMBOL {0x267E, 0x267E, prExtendedPictographic}, // E11.0 [1] (♾️) infinity {0x267F, 0x267F, prExtendedPictographic}, // E0.6 [1] (♿) wheelchair symbol {0x2680, 0x2685, prExtendedPictographic}, // E0.0 [6] (⚀..⚅) DIE FACE-1..DIE FACE-6 {0x2690, 0x2691, prExtendedPictographic}, // E0.0 [2] (⚐..⚑) WHITE FLAG..BLACK FLAG {0x2692, 0x2692, prExtendedPictographic}, // E1.0 [1] (⚒️) hammer and pick {0x2693, 0x2693, prExtendedPictographic}, // E0.6 [1] (⚓) anchor {0x2694, 0x2694, prExtendedPictographic}, // E1.0 [1] (⚔️) crossed swords {0x2695, 0x2695, prExtendedPictographic}, // E4.0 [1] (⚕️) medical symbol {0x2696, 0x2697, prExtendedPictographic}, // E1.0 [2] (⚖️..⚗️) balance scale..alembic {0x2698, 0x2698, prExtendedPictographic}, // E0.0 [1] (⚘) FLOWER {0x2699, 0x2699, prExtendedPictographic}, // E1.0 [1] (⚙️) gear {0x269A, 0x269A, prExtendedPictographic}, // E0.0 [1] (⚚) STAFF OF HERMES {0x269B, 0x269C, prExtendedPictographic}, // E1.0 [2] (⚛️..⚜️) atom symbol..fleur-de-lis {0x269D, 0x269F, prExtendedPictographic}, // E0.0 [3] (⚝..⚟) OUTLINED WHITE STAR..THREE LINES CONVERGING LEFT {0x26A0, 0x26A1, prExtendedPictographic}, // E0.6 [2] (⚠️..⚡) warning..high voltage {0x26A2, 0x26A6, prExtendedPictographic}, // E0.0 [5] (⚢..⚦) DOUBLED FEMALE SIGN..MALE WITH STROKE SIGN {0x26A7, 0x26A7, prExtendedPictographic}, // E13.0 [1] (⚧️) transgender symbol {0x26A8, 0x26A9, prExtendedPictographic}, // E0.0 [2] (⚨..⚩) VERTICAL MALE WITH STROKE SIGN..HORIZONTAL MALE WITH STROKE SIGN {0x26AA, 0x26AB, prExtendedPictographic}, // E0.6 [2] (⚪..⚫) white circle..black circle {0x26AC, 0x26AF, prExtendedPictographic}, // E0.0 [4] (⚬..⚯) MEDIUM SMALL WHITE CIRCLE..UNMARRIED PARTNERSHIP SYMBOL {0x26B0, 0x26B1, prExtendedPictographic}, // E1.0 [2] (⚰️..⚱️) coffin..funeral urn {0x26B2, 0x26BC, prExtendedPictographic}, // E0.0 [11] (⚲..⚼) NEUTER..SESQUIQUADRATE {0x26BD, 0x26BE, prExtendedPictographic}, // E0.6 [2] (⚽..⚾) soccer ball..baseball {0x26BF, 0x26C3, prExtendedPictographic}, // E0.0 [5] (⚿..⛃) SQUARED KEY..BLACK DRAUGHTS KING {0x26C4, 0x26C5, prExtendedPictographic}, // E0.6 [2] (⛄..⛅) snowman without snow..sun behind cloud {0x26C6, 0x26C7, prExtendedPictographic}, // E0.0 [2] (⛆..⛇) RAIN..BLACK SNOWMAN {0x26C8, 0x26C8, prExtendedPictographic}, // E0.7 [1] (⛈️) cloud with lightning and rain {0x26C9, 0x26CD, prExtendedPictographic}, // E0.0 [5] (⛉..⛍) TURNED WHITE SHOGI PIECE..DISABLED CAR {0x26CE, 0x26CE, prExtendedPictographic}, // E0.6 [1] (⛎) Ophiuchus {0x26CF, 0x26CF, prExtendedPictographic}, // E0.7 [1] (⛏️) pick {0x26D0, 0x26D0, prExtendedPictographic}, // E0.0 [1] (⛐) CAR SLIDING {0x26D1, 0x26D1, prExtendedPictographic}, // E0.7 [1] (⛑️) rescue worker’s helmet {0x26D2, 0x26D2, prExtendedPictographic}, // E0.0 [1] (⛒) CIRCLED CROSSING LANES {0x26D3, 0x26D3, prExtendedPictographic}, // E0.7 [1] (⛓️) chains {0x26D4, 0x26D4, prExtendedPictographic}, // E0.6 [1] (⛔) no entry {0x26D5, 0x26E8, prExtendedPictographic}, // E0.0 [20] (⛕..⛨) ALTERNATE ONE-WAY LEFT WAY TRAFFIC..BLACK CROSS ON SHIELD {0x26E9, 0x26E9, prExtendedPictographic}, // E0.7 [1] (⛩️) shinto shrine {0x26EA, 0x26EA, prExtendedPictographic}, // E0.6 [1] (⛪) church {0x26EB, 0x26EF, prExtendedPictographic}, // E0.0 [5] (⛫..⛯) CASTLE..MAP SYMBOL FOR LIGHTHOUSE {0x26F0, 0x26F1, prExtendedPictographic}, // E0.7 [2] (⛰️..⛱️) mountain..umbrella on ground {0x26F2, 0x26F3, prExtendedPictographic}, // E0.6 [2] (⛲..⛳) fountain..flag in hole {0x26F4, 0x26F4, prExtendedPictographic}, // E0.7 [1] (⛴️) ferry {0x26F5, 0x26F5, prExtendedPictographic}, // E0.6 [1] (⛵) sailboat {0x26F6, 0x26F6, prExtendedPictographic}, // E0.0 [1] (⛶) SQUARE FOUR CORNERS {0x26F7, 0x26F9, prExtendedPictographic}, // E0.7 [3] (⛷️..⛹️) skier..person bouncing ball {0x26FA, 0x26FA, prExtendedPictographic}, // E0.6 [1] (⛺) tent {0x26FB, 0x26FC, prExtendedPictographic}, // E0.0 [2] (⛻..⛼) JAPANESE BANK SYMBOL..HEADSTONE GRAVEYARD SYMBOL {0x26FD, 0x26FD, prExtendedPictographic}, // E0.6 [1] (⛽) fuel pump {0x26FE, 0x2701, prExtendedPictographic}, // E0.0 [4] (⛾..✁) CUP ON BLACK SQUARE..UPPER BLADE SCISSORS {0x2702, 0x2702, prExtendedPictographic}, // E0.6 [1] (✂️) scissors {0x2703, 0x2704, prExtendedPictographic}, // E0.0 [2] (✃..✄) LOWER BLADE SCISSORS..WHITE SCISSORS {0x2705, 0x2705, prExtendedPictographic}, // E0.6 [1] (✅) check mark button {0x2708, 0x270C, prExtendedPictographic}, // E0.6 [5] (✈️..✌️) airplane..victory hand {0x270D, 0x270D, prExtendedPictographic}, // E0.7 [1] (✍️) writing hand {0x270E, 0x270E, prExtendedPictographic}, // E0.0 [1] (✎) LOWER RIGHT PENCIL {0x270F, 0x270F, prExtendedPictographic}, // E0.6 [1] (✏️) pencil {0x2710, 0x2711, prExtendedPictographic}, // E0.0 [2] (✐..✑) UPPER RIGHT PENCIL..WHITE NIB {0x2712, 0x2712, prExtendedPictographic}, // E0.6 [1] (✒️) black nib {0x2714, 0x2714, prExtendedPictographic}, // E0.6 [1] (✔️) check mark {0x2716, 0x2716, prExtendedPictographic}, // E0.6 [1] (✖️) multiply {0x271D, 0x271D, prExtendedPictographic}, // E0.7 [1] (✝️) latin cross {0x2721, 0x2721, prExtendedPictographic}, // E0.7 [1] (✡️) star of David {0x2728, 0x2728, prExtendedPictographic}, // E0.6 [1] (✨) sparkles {0x2733, 0x2734, prExtendedPictographic}, // E0.6 [2] (✳️..✴️) eight-spoked asterisk..eight-pointed star {0x2744, 0x2744, prExtendedPictographic}, // E0.6 [1] (❄️) snowflake {0x2747, 0x2747, prExtendedPictographic}, // E0.6 [1] (❇️) sparkle {0x274C, 0x274C, prExtendedPictographic}, // E0.6 [1] (❌) cross mark {0x274E, 0x274E, prExtendedPictographic}, // E0.6 [1] (❎) cross mark button {0x2753, 0x2755, prExtendedPictographic}, // E0.6 [3] (❓..❕) red question mark..white exclamation mark {0x2757, 0x2757, prExtendedPictographic}, // E0.6 [1] (❗) red exclamation mark {0x2763, 0x2763, prExtendedPictographic}, // E1.0 [1] (❣️) heart exclamation {0x2764, 0x2764, prExtendedPictographic}, // E0.6 [1] (❤️) red heart {0x2765, 0x2767, prExtendedPictographic}, // E0.0 [3] (❥..❧) ROTATED HEAVY BLACK HEART BULLET..ROTATED FLORAL HEART BULLET {0x2795, 0x2797, prExtendedPictographic}, // E0.6 [3] (➕..➗) plus..divide {0x27A1, 0x27A1, prExtendedPictographic}, // E0.6 [1] (➡️) right arrow {0x27B0, 0x27B0, prExtendedPictographic}, // E0.6 [1] (➰) curly loop {0x27BF, 0x27BF, prExtendedPictographic}, // E1.0 [1] (➿) double curly loop {0x2934, 0x2935, prExtendedPictographic}, // E0.6 [2] (⤴️..⤵️) right arrow curving up..right arrow curving down {0x2B05, 0x2B07, prExtendedPictographic}, // E0.6 [3] (⬅️..⬇️) left arrow..down arrow {0x2B1B, 0x2B1C, prExtendedPictographic}, // E0.6 [2] (⬛..⬜) black large square..white large square {0x2B50, 0x2B50, prExtendedPictographic}, // E0.6 [1] (⭐) star {0x2B55, 0x2B55, prExtendedPictographic}, // E0.6 [1] (⭕) hollow red circle {0x2CEF, 0x2CF1, prExtend}, // Mn [3] COPTIC COMBINING NI ABOVE..COPTIC COMBINING SPIRITUS LENIS {0x2D7F, 0x2D7F, prExtend}, // Mn TIFINAGH CONSONANT JOINER {0x2DE0, 0x2DFF, prExtend}, // Mn [32] COMBINING CYRILLIC LETTER BE..COMBINING CYRILLIC LETTER IOTIFIED BIG YUS {0x302A, 0x302D, prExtend}, // Mn [4] IDEOGRAPHIC LEVEL TONE MARK..IDEOGRAPHIC ENTERING TONE MARK {0x302E, 0x302F, prExtend}, // Mc [2] HANGUL SINGLE DOT TONE MARK..HANGUL DOUBLE DOT TONE MARK {0x3030, 0x3030, prExtendedPictographic}, // E0.6 [1] (〰️) wavy dash {0x303D, 0x303D, prExtendedPictographic}, // E0.6 [1] (〽️) part alternation mark {0x3099, 0x309A, prExtend}, // Mn [2] COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK {0x3297, 0x3297, prExtendedPictographic}, // E0.6 [1] (㊗️) Japanese “congratulations” button {0x3299, 0x3299, prExtendedPictographic}, // E0.6 [1] (㊙️) Japanese “secret” button {0xA66F, 0xA66F, prExtend}, // Mn COMBINING CYRILLIC VZMET {0xA670, 0xA672, prExtend}, // Me [3] COMBINING CYRILLIC TEN MILLIONS SIGN..COMBINING CYRILLIC THOUSAND MILLIONS SIGN {0xA674, 0xA67D, prExtend}, // Mn [10] COMBINING CYRILLIC LETTER UKRAINIAN IE..COMBINING CYRILLIC PAYEROK {0xA69E, 0xA69F, prExtend}, // Mn [2] COMBINING CYRILLIC LETTER EF..COMBINING CYRILLIC LETTER IOTIFIED E {0xA6F0, 0xA6F1, prExtend}, // Mn [2] BAMUM COMBINING MARK KOQNDON..BAMUM COMBINING MARK TUKWENTIS {0xA802, 0xA802, prExtend}, // Mn SYLOTI NAGRI SIGN DVISVARA {0xA806, 0xA806, prExtend}, // Mn SYLOTI NAGRI SIGN HASANTA {0xA80B, 0xA80B, prExtend}, // Mn SYLOTI NAGRI SIGN ANUSVARA {0xA823, 0xA824, prSpacingMark}, // Mc [2] SYLOTI NAGRI VOWEL SIGN A..SYLOTI NAGRI VOWEL SIGN I {0xA825, 0xA826, prExtend}, // Mn [2] SYLOTI NAGRI VOWEL SIGN U..SYLOTI NAGRI VOWEL SIGN E {0xA827, 0xA827, prSpacingMark}, // Mc SYLOTI NAGRI VOWEL SIGN OO {0xA82C, 0xA82C, prExtend}, // Mn SYLOTI NAGRI SIGN ALTERNATE HASANTA {0xA880, 0xA881, prSpacingMark}, // Mc [2] SAURASHTRA SIGN ANUSVARA..SAURASHTRA SIGN VISARGA {0xA8B4, 0xA8C3, prSpacingMark}, // Mc [16] SAURASHTRA CONSONANT SIGN HAARU..SAURASHTRA VOWEL SIGN AU {0xA8C4, 0xA8C5, prExtend}, // Mn [2] SAURASHTRA SIGN VIRAMA..SAURASHTRA SIGN CANDRABINDU {0xA8E0, 0xA8F1, prExtend}, // Mn [18] COMBINING DEVANAGARI DIGIT ZERO..COMBINING DEVANAGARI SIGN AVAGRAHA {0xA8FF, 0xA8FF, prExtend}, // Mn DEVANAGARI VOWEL SIGN AY {0xA926, 0xA92D, prExtend}, // Mn [8] KAYAH LI VOWEL UE..KAYAH LI TONE CALYA PLOPHU {0xA947, 0xA951, prExtend}, // Mn [11] REJANG VOWEL SIGN I..REJANG CONSONANT SIGN R {0xA952, 0xA953, prSpacingMark}, // Mc [2] REJANG CONSONANT SIGN H..REJANG VIRAMA {0xA960, 0xA97C, prL}, // Lo [29] HANGUL CHOSEONG TIKEUT-MIEUM..HANGUL CHOSEONG SSANGYEORINHIEUH {0xA980, 0xA982, prExtend}, // Mn [3] JAVANESE SIGN PANYANGGA..JAVANESE SIGN LAYAR {0xA983, 0xA983, prSpacingMark}, // Mc JAVANESE SIGN WIGNYAN {0xA9B3, 0xA9B3, prExtend}, // Mn JAVANESE SIGN CECAK TELU {0xA9B4, 0xA9B5, prSpacingMark}, // Mc [2] JAVANESE VOWEL SIGN TARUNG..JAVANESE VOWEL SIGN TOLONG {0xA9B6, 0xA9B9, prExtend}, // Mn [4] JAVANESE VOWEL SIGN WULU..JAVANESE VOWEL SIGN SUKU MENDUT {0xA9BA, 0xA9BB, prSpacingMark}, // Mc [2] JAVANESE VOWEL SIGN TALING..JAVANESE VOWEL SIGN DIRGA MURE {0xA9BC, 0xA9BD, prExtend}, // Mn [2] JAVANESE VOWEL SIGN PEPET..JAVANESE CONSONANT SIGN KERET {0xA9BE, 0xA9C0, prSpacingMark}, // Mc [3] JAVANESE CONSONANT SIGN PENGKAL..JAVANESE PANGKON {0xA9E5, 0xA9E5, prExtend}, // Mn MYANMAR SIGN SHAN SAW {0xAA29, 0xAA2E, prExtend}, // Mn [6] CHAM VOWEL SIGN AA..CHAM VOWEL SIGN OE {0xAA2F, 0xAA30, prSpacingMark}, // Mc [2] CHAM VOWEL SIGN O..CHAM VOWEL SIGN AI {0xAA31, 0xAA32, prExtend}, // Mn [2] CHAM VOWEL SIGN AU..CHAM VOWEL SIGN UE {0xAA33, 0xAA34, prSpacingMark}, // Mc [2] CHAM CONSONANT SIGN YA..CHAM CONSONANT SIGN RA {0xAA35, 0xAA36, prExtend}, // Mn [2] CHAM CONSONANT SIGN LA..CHAM CONSONANT SIGN WA {0xAA43, 0xAA43, prExtend}, // Mn CHAM CONSONANT SIGN FINAL NG {0xAA4C, 0xAA4C, prExtend}, // Mn CHAM CONSONANT SIGN FINAL M {0xAA4D, 0xAA4D, prSpacingMark}, // Mc CHAM CONSONANT SIGN FINAL H {0xAA7C, 0xAA7C, prExtend}, // Mn MYANMAR SIGN TAI LAING TONE-2 {0xAAB0, 0xAAB0, prExtend}, // Mn TAI VIET MAI KANG {0xAAB2, 0xAAB4, prExtend}, // Mn [3] TAI VIET VOWEL I..TAI VIET VOWEL U {0xAAB7, 0xAAB8, prExtend}, // Mn [2] TAI VIET MAI KHIT..TAI VIET VOWEL IA {0xAABE, 0xAABF, prExtend}, // Mn [2] TAI VIET VOWEL AM..TAI VIET TONE MAI EK {0xAAC1, 0xAAC1, prExtend}, // Mn TAI VIET TONE MAI THO {0xAAEB, 0xAAEB, prSpacingMark}, // Mc MEETEI MAYEK VOWEL SIGN II {0xAAEC, 0xAAED, prExtend}, // Mn [2] MEETEI MAYEK VOWEL SIGN UU..MEETEI MAYEK VOWEL SIGN AAI {0xAAEE, 0xAAEF, prSpacingMark}, // Mc [2] MEETEI MAYEK VOWEL SIGN AU..MEETEI MAYEK VOWEL SIGN AAU {0xAAF5, 0xAAF5, prSpacingMark}, // Mc MEETEI MAYEK VOWEL SIGN VISARGA {0xAAF6, 0xAAF6, prExtend}, // Mn MEETEI MAYEK VIRAMA {0xABE3, 0xABE4, prSpacingMark}, // Mc [2] MEETEI MAYEK VOWEL SIGN ONAP..MEETEI MAYEK VOWEL SIGN INAP {0xABE5, 0xABE5, prExtend}, // Mn MEETEI MAYEK VOWEL SIGN ANAP {0xABE6, 0xABE7, prSpacingMark}, // Mc [2] MEETEI MAYEK VOWEL SIGN YENAP..MEETEI MAYEK VOWEL SIGN SOUNAP {0xABE8, 0xABE8, prExtend}, // Mn MEETEI MAYEK VOWEL SIGN UNAP {0xABE9, 0xABEA, prSpacingMark}, // Mc [2] MEETEI MAYEK VOWEL SIGN CHEINAP..MEETEI MAYEK VOWEL SIGN NUNG {0xABEC, 0xABEC, prSpacingMark}, // Mc MEETEI MAYEK LUM IYEK {0xABED, 0xABED, prExtend}, // Mn MEETEI MAYEK APUN IYEK {0xAC00, 0xAC00, prLV}, // Lo HANGUL SYLLABLE GA {0xAC01, 0xAC1B, prLVT}, // Lo [27] HANGUL SYLLABLE GAG..HANGUL SYLLABLE GAH {0xAC1C, 0xAC1C, prLV}, // Lo HANGUL SYLLABLE GAE {0xAC1D, 0xAC37, prLVT}, // Lo [27] HANGUL SYLLABLE GAEG..HANGUL SYLLABLE GAEH {0xAC38, 0xAC38, prLV}, // Lo HANGUL SYLLABLE GYA {0xAC39, 0xAC53, prLVT}, // Lo [27] HANGUL SYLLABLE GYAG..HANGUL SYLLABLE GYAH {0xAC54, 0xAC54, prLV}, // Lo HANGUL SYLLABLE GYAE {0xAC55, 0xAC6F, prLVT}, // Lo [27] HANGUL SYLLABLE GYAEG..HANGUL SYLLABLE GYAEH {0xAC70, 0xAC70, prLV}, // Lo HANGUL SYLLABLE GEO {0xAC71, 0xAC8B, prLVT}, // Lo [27] HANGUL SYLLABLE GEOG..HANGUL SYLLABLE GEOH {0xAC8C, 0xAC8C, prLV}, // Lo HANGUL SYLLABLE GE {0xAC8D, 0xACA7, prLVT}, // Lo [27] HANGUL SYLLABLE GEG..HANGUL SYLLABLE GEH {0xACA8, 0xACA8, prLV}, // Lo HANGUL SYLLABLE GYEO {0xACA9, 0xACC3, prLVT}, // Lo [27] HANGUL SYLLABLE GYEOG..HANGUL SYLLABLE GYEOH {0xACC4, 0xACC4, prLV}, // Lo HANGUL SYLLABLE GYE {0xACC5, 0xACDF, prLVT}, // Lo [27] HANGUL SYLLABLE GYEG..HANGUL SYLLABLE GYEH {0xACE0, 0xACE0, prLV}, // Lo HANGUL SYLLABLE GO {0xACE1, 0xACFB, prLVT}, // Lo [27] HANGUL SYLLABLE GOG..HANGUL SYLLABLE GOH {0xACFC, 0xACFC, prLV}, // Lo HANGUL SYLLABLE GWA {0xACFD, 0xAD17, prLVT}, // Lo [27] HANGUL SYLLABLE GWAG..HANGUL SYLLABLE GWAH {0xAD18, 0xAD18, prLV}, // Lo HANGUL SYLLABLE GWAE {0xAD19, 0xAD33, prLVT}, // Lo [27] HANGUL SYLLABLE GWAEG..HANGUL SYLLABLE GWAEH {0xAD34, 0xAD34, prLV}, // Lo HANGUL SYLLABLE GOE {0xAD35, 0xAD4F, prLVT}, // Lo [27] HANGUL SYLLABLE GOEG..HANGUL SYLLABLE GOEH {0xAD50, 0xAD50, prLV}, // Lo HANGUL SYLLABLE GYO {0xAD51, 0xAD6B, prLVT}, // Lo [27] HANGUL SYLLABLE GYOG..HANGUL SYLLABLE GYOH {0xAD6C, 0xAD6C, prLV}, // Lo HANGUL SYLLABLE GU {0xAD6D, 0xAD87, prLVT}, // Lo [27] HANGUL SYLLABLE GUG..HANGUL SYLLABLE GUH {0xAD88, 0xAD88, prLV}, // Lo HANGUL SYLLABLE GWEO {0xAD89, 0xADA3, prLVT}, // Lo [27] HANGUL SYLLABLE GWEOG..HANGUL SYLLABLE GWEOH {0xADA4, 0xADA4, prLV}, // Lo HANGUL SYLLABLE GWE {0xADA5, 0xADBF, prLVT}, // Lo [27] HANGUL SYLLABLE GWEG..HANGUL SYLLABLE GWEH {0xADC0, 0xADC0, prLV}, // Lo HANGUL SYLLABLE GWI {0xADC1, 0xADDB, prLVT}, // Lo [27] HANGUL SYLLABLE GWIG..HANGUL SYLLABLE GWIH {0xADDC, 0xADDC, prLV}, // Lo HANGUL SYLLABLE GYU {0xADDD, 0xADF7, prLVT}, // Lo [27] HANGUL SYLLABLE GYUG..HANGUL SYLLABLE GYUH {0xADF8, 0xADF8, prLV}, // Lo HANGUL SYLLABLE GEU {0xADF9, 0xAE13, prLVT}, // Lo [27] HANGUL SYLLABLE GEUG..HANGUL SYLLABLE GEUH {0xAE14, 0xAE14, prLV}, // Lo HANGUL SYLLABLE GYI {0xAE15, 0xAE2F, prLVT}, // Lo [27] HANGUL SYLLABLE GYIG..HANGUL SYLLABLE GYIH {0xAE30, 0xAE30, prLV}, // Lo HANGUL SYLLABLE GI {0xAE31, 0xAE4B, prLVT}, // Lo [27] HANGUL SYLLABLE GIG..HANGUL SYLLABLE GIH {0xAE4C, 0xAE4C, prLV}, // Lo HANGUL SYLLABLE GGA {0xAE4D, 0xAE67, prLVT}, // Lo [27] HANGUL SYLLABLE GGAG..HANGUL SYLLABLE GGAH {0xAE68, 0xAE68, prLV}, // Lo HANGUL SYLLABLE GGAE {0xAE69, 0xAE83, prLVT}, // Lo [27] HANGUL SYLLABLE GGAEG..HANGUL SYLLABLE GGAEH {0xAE84, 0xAE84, prLV}, // Lo HANGUL SYLLABLE GGYA {0xAE85, 0xAE9F, prLVT}, // Lo [27] HANGUL SYLLABLE GGYAG..HANGUL SYLLABLE GGYAH {0xAEA0, 0xAEA0, prLV}, // Lo HANGUL SYLLABLE GGYAE {0xAEA1, 0xAEBB, prLVT}, // Lo [27] HANGUL SYLLABLE GGYAEG..HANGUL SYLLABLE GGYAEH {0xAEBC, 0xAEBC, prLV}, // Lo HANGUL SYLLABLE GGEO {0xAEBD, 0xAED7, prLVT}, // Lo [27] HANGUL SYLLABLE GGEOG..HANGUL SYLLABLE GGEOH {0xAED8, 0xAED8, prLV}, // Lo HANGUL SYLLABLE GGE {0xAED9, 0xAEF3, prLVT}, // Lo [27] HANGUL SYLLABLE GGEG..HANGUL SYLLABLE GGEH {0xAEF4, 0xAEF4, prLV}, // Lo HANGUL SYLLABLE GGYEO {0xAEF5, 0xAF0F, prLVT}, // Lo [27] HANGUL SYLLABLE GGYEOG..HANGUL SYLLABLE GGYEOH {0xAF10, 0xAF10, prLV}, // Lo HANGUL SYLLABLE GGYE {0xAF11, 0xAF2B, prLVT}, // Lo [27] HANGUL SYLLABLE GGYEG..HANGUL SYLLABLE GGYEH {0xAF2C, 0xAF2C, prLV}, // Lo HANGUL SYLLABLE GGO {0xAF2D, 0xAF47, prLVT}, // Lo [27] HANGUL SYLLABLE GGOG..HANGUL SYLLABLE GGOH {0xAF48, 0xAF48, prLV}, // Lo HANGUL SYLLABLE GGWA {0xAF49, 0xAF63, prLVT}, // Lo [27] HANGUL SYLLABLE GGWAG..HANGUL SYLLABLE GGWAH {0xAF64, 0xAF64, prLV}, // Lo HANGUL SYLLABLE GGWAE {0xAF65, 0xAF7F, prLVT}, // Lo [27] HANGUL SYLLABLE GGWAEG..HANGUL SYLLABLE GGWAEH {0xAF80, 0xAF80, prLV}, // Lo HANGUL SYLLABLE GGOE {0xAF81, 0xAF9B, prLVT}, // Lo [27] HANGUL SYLLABLE GGOEG..HANGUL SYLLABLE GGOEH {0xAF9C, 0xAF9C, prLV}, // Lo HANGUL SYLLABLE GGYO {0xAF9D, 0xAFB7, prLVT}, // Lo [27] HANGUL SYLLABLE GGYOG..HANGUL SYLLABLE GGYOH {0xAFB8, 0xAFB8, prLV}, // Lo HANGUL SYLLABLE GGU {0xAFB9, 0xAFD3, prLVT}, // Lo [27] HANGUL SYLLABLE GGUG..HANGUL SYLLABLE GGUH {0xAFD4, 0xAFD4, prLV}, // Lo HANGUL SYLLABLE GGWEO {0xAFD5, 0xAFEF, prLVT}, // Lo [27] HANGUL SYLLABLE GGWEOG..HANGUL SYLLABLE GGWEOH {0xAFF0, 0xAFF0, prLV}, // Lo HANGUL SYLLABLE GGWE {0xAFF1, 0xB00B, prLVT}, // Lo [27] HANGUL SYLLABLE GGWEG..HANGUL SYLLABLE GGWEH {0xB00C, 0xB00C, prLV}, // Lo HANGUL SYLLABLE GGWI {0xB00D, 0xB027, prLVT}, // Lo [27] HANGUL SYLLABLE GGWIG..HANGUL SYLLABLE GGWIH {0xB028, 0xB028, prLV}, // Lo HANGUL SYLLABLE GGYU {0xB029, 0xB043, prLVT}, // Lo [27] HANGUL SYLLABLE GGYUG..HANGUL SYLLABLE GGYUH {0xB044, 0xB044, prLV}, // Lo HANGUL SYLLABLE GGEU {0xB045, 0xB05F, prLVT}, // Lo [27] HANGUL SYLLABLE GGEUG..HANGUL SYLLABLE GGEUH {0xB060, 0xB060, prLV}, // Lo HANGUL SYLLABLE GGYI {0xB061, 0xB07B, prLVT}, // Lo [27] HANGUL SYLLABLE GGYIG..HANGUL SYLLABLE GGYIH {0xB07C, 0xB07C, prLV}, // Lo HANGUL SYLLABLE GGI {0xB07D, 0xB097, prLVT}, // Lo [27] HANGUL SYLLABLE GGIG..HANGUL SYLLABLE GGIH {0xB098, 0xB098, prLV}, // Lo HANGUL SYLLABLE NA {0xB099, 0xB0B3, prLVT}, // Lo [27] HANGUL SYLLABLE NAG..HANGUL SYLLABLE NAH {0xB0B4, 0xB0B4, prLV}, // Lo HANGUL SYLLABLE NAE {0xB0B5, 0xB0CF, prLVT}, // Lo [27] HANGUL SYLLABLE NAEG..HANGUL SYLLABLE NAEH {0xB0D0, 0xB0D0, prLV}, // Lo HANGUL SYLLABLE NYA {0xB0D1, 0xB0EB, prLVT}, // Lo [27] HANGUL SYLLABLE NYAG..HANGUL SYLLABLE NYAH {0xB0EC, 0xB0EC, prLV}, // Lo HANGUL SYLLABLE NYAE {0xB0ED, 0xB107, prLVT}, // Lo [27] HANGUL SYLLABLE NYAEG..HANGUL SYLLABLE NYAEH {0xB108, 0xB108, prLV}, // Lo HANGUL SYLLABLE NEO {0xB109, 0xB123, prLVT}, // Lo [27] HANGUL SYLLABLE NEOG..HANGUL SYLLABLE NEOH {0xB124, 0xB124, prLV}, // Lo HANGUL SYLLABLE NE {0xB125, 0xB13F, prLVT}, // Lo [27] HANGUL SYLLABLE NEG..HANGUL SYLLABLE NEH {0xB140, 0xB140, prLV}, // Lo HANGUL SYLLABLE NYEO {0xB141, 0xB15B, prLVT}, // Lo [27] HANGUL SYLLABLE NYEOG..HANGUL SYLLABLE NYEOH {0xB15C, 0xB15C, prLV}, // Lo HANGUL SYLLABLE NYE {0xB15D, 0xB177, prLVT}, // Lo [27] HANGUL SYLLABLE NYEG..HANGUL SYLLABLE NYEH {0xB178, 0xB178, prLV}, // Lo HANGUL SYLLABLE NO {0xB179, 0xB193, prLVT}, // Lo [27] HANGUL SYLLABLE NOG..HANGUL SYLLABLE NOH {0xB194, 0xB194, prLV}, // Lo HANGUL SYLLABLE NWA {0xB195, 0xB1AF, prLVT}, // Lo [27] HANGUL SYLLABLE NWAG..HANGUL SYLLABLE NWAH {0xB1B0, 0xB1B0, prLV}, // Lo HANGUL SYLLABLE NWAE {0xB1B1, 0xB1CB, prLVT}, // Lo [27] HANGUL SYLLABLE NWAEG..HANGUL SYLLABLE NWAEH {0xB1CC, 0xB1CC, prLV}, // Lo HANGUL SYLLABLE NOE {0xB1CD, 0xB1E7, prLVT}, // Lo [27] HANGUL SYLLABLE NOEG..HANGUL SYLLABLE NOEH {0xB1E8, 0xB1E8, prLV}, // Lo HANGUL SYLLABLE NYO {0xB1E9, 0xB203, prLVT}, // Lo [27] HANGUL SYLLABLE NYOG..HANGUL SYLLABLE NYOH {0xB204, 0xB204, prLV}, // Lo HANGUL SYLLABLE NU {0xB205, 0xB21F, prLVT}, // Lo [27] HANGUL SYLLABLE NUG..HANGUL SYLLABLE NUH {0xB220, 0xB220, prLV}, // Lo HANGUL SYLLABLE NWEO {0xB221, 0xB23B, prLVT}, // Lo [27] HANGUL SYLLABLE NWEOG..HANGUL SYLLABLE NWEOH {0xB23C, 0xB23C, prLV}, // Lo HANGUL SYLLABLE NWE {0xB23D, 0xB257, prLVT}, // Lo [27] HANGUL SYLLABLE NWEG..HANGUL SYLLABLE NWEH {0xB258, 0xB258, prLV}, // Lo HANGUL SYLLABLE NWI {0xB259, 0xB273, prLVT}, // Lo [27] HANGUL SYLLABLE NWIG..HANGUL SYLLABLE NWIH {0xB274, 0xB274, prLV}, // Lo HANGUL SYLLABLE NYU {0xB275, 0xB28F, prLVT}, // Lo [27] HANGUL SYLLABLE NYUG..HANGUL SYLLABLE NYUH {0xB290, 0xB290, prLV}, // Lo HANGUL SYLLABLE NEU {0xB291, 0xB2AB, prLVT}, // Lo [27] HANGUL SYLLABLE NEUG..HANGUL SYLLABLE NEUH {0xB2AC, 0xB2AC, prLV}, // Lo HANGUL SYLLABLE NYI {0xB2AD, 0xB2C7, prLVT}, // Lo [27] HANGUL SYLLABLE NYIG..HANGUL SYLLABLE NYIH {0xB2C8, 0xB2C8, prLV}, // Lo HANGUL SYLLABLE NI {0xB2C9, 0xB2E3, prLVT}, // Lo [27] HANGUL SYLLABLE NIG..HANGUL SYLLABLE NIH {0xB2E4, 0xB2E4, prLV}, // Lo HANGUL SYLLABLE DA {0xB2E5, 0xB2FF, prLVT}, // Lo [27] HANGUL SYLLABLE DAG..HANGUL SYLLABLE DAH {0xB300, 0xB300, prLV}, // Lo HANGUL SYLLABLE DAE {0xB301, 0xB31B, prLVT}, // Lo [27] HANGUL SYLLABLE DAEG..HANGUL SYLLABLE DAEH {0xB31C, 0xB31C, prLV}, // Lo HANGUL SYLLABLE DYA {0xB31D, 0xB337, prLVT}, // Lo [27] HANGUL SYLLABLE DYAG..HANGUL SYLLABLE DYAH {0xB338, 0xB338, prLV}, // Lo HANGUL SYLLABLE DYAE {0xB339, 0xB353, prLVT}, // Lo [27] HANGUL SYLLABLE DYAEG..HANGUL SYLLABLE DYAEH {0xB354, 0xB354, prLV}, // Lo HANGUL SYLLABLE DEO {0xB355, 0xB36F, prLVT}, // Lo [27] HANGUL SYLLABLE DEOG..HANGUL SYLLABLE DEOH {0xB370, 0xB370, prLV}, // Lo HANGUL SYLLABLE DE {0xB371, 0xB38B, prLVT}, // Lo [27] HANGUL SYLLABLE DEG..HANGUL SYLLABLE DEH {0xB38C, 0xB38C, prLV}, // Lo HANGUL SYLLABLE DYEO {0xB38D, 0xB3A7, prLVT}, // Lo [27] HANGUL SYLLABLE DYEOG..HANGUL SYLLABLE DYEOH {0xB3A8, 0xB3A8, prLV}, // Lo HANGUL SYLLABLE DYE {0xB3A9, 0xB3C3, prLVT}, // Lo [27] HANGUL SYLLABLE DYEG..HANGUL SYLLABLE DYEH {0xB3C4, 0xB3C4, prLV}, // Lo HANGUL SYLLABLE DO {0xB3C5, 0xB3DF, prLVT}, // Lo [27] HANGUL SYLLABLE DOG..HANGUL SYLLABLE DOH {0xB3E0, 0xB3E0, prLV}, // Lo HANGUL SYLLABLE DWA {0xB3E1, 0xB3FB, prLVT}, // Lo [27] HANGUL SYLLABLE DWAG..HANGUL SYLLABLE DWAH {0xB3FC, 0xB3FC, prLV}, // Lo HANGUL SYLLABLE DWAE {0xB3FD, 0xB417, prLVT}, // Lo [27] HANGUL SYLLABLE DWAEG..HANGUL SYLLABLE DWAEH {0xB418, 0xB418, prLV}, // Lo HANGUL SYLLABLE DOE {0xB419, 0xB433, prLVT}, // Lo [27] HANGUL SYLLABLE DOEG..HANGUL SYLLABLE DOEH {0xB434, 0xB434, prLV}, // Lo HANGUL SYLLABLE DYO {0xB435, 0xB44F, prLVT}, // Lo [27] HANGUL SYLLABLE DYOG..HANGUL SYLLABLE DYOH {0xB450, 0xB450, prLV}, // Lo HANGUL SYLLABLE DU {0xB451, 0xB46B, prLVT}, // Lo [27] HANGUL SYLLABLE DUG..HANGUL SYLLABLE DUH {0xB46C, 0xB46C, prLV}, // Lo HANGUL SYLLABLE DWEO {0xB46D, 0xB487, prLVT}, // Lo [27] HANGUL SYLLABLE DWEOG..HANGUL SYLLABLE DWEOH {0xB488, 0xB488, prLV}, // Lo HANGUL SYLLABLE DWE {0xB489, 0xB4A3, prLVT}, // Lo [27] HANGUL SYLLABLE DWEG..HANGUL SYLLABLE DWEH {0xB4A4, 0xB4A4, prLV}, // Lo HANGUL SYLLABLE DWI {0xB4A5, 0xB4BF, prLVT}, // Lo [27] HANGUL SYLLABLE DWIG..HANGUL SYLLABLE DWIH {0xB4C0, 0xB4C0, prLV}, // Lo HANGUL SYLLABLE DYU {0xB4C1, 0xB4DB, prLVT}, // Lo [27] HANGUL SYLLABLE DYUG..HANGUL SYLLABLE DYUH {0xB4DC, 0xB4DC, prLV}, // Lo HANGUL SYLLABLE DEU {0xB4DD, 0xB4F7, prLVT}, // Lo [27] HANGUL SYLLABLE DEUG..HANGUL SYLLABLE DEUH {0xB4F8, 0xB4F8, prLV}, // Lo HANGUL SYLLABLE DYI {0xB4F9, 0xB513, prLVT}, // Lo [27] HANGUL SYLLABLE DYIG..HANGUL SYLLABLE DYIH {0xB514, 0xB514, prLV}, // Lo HANGUL SYLLABLE DI {0xB515, 0xB52F, prLVT}, // Lo [27] HANGUL SYLLABLE DIG..HANGUL SYLLABLE DIH {0xB530, 0xB530, prLV}, // Lo HANGUL SYLLABLE DDA {0xB531, 0xB54B, prLVT}, // Lo [27] HANGUL SYLLABLE DDAG..HANGUL SYLLABLE DDAH {0xB54C, 0xB54C, prLV}, // Lo HANGUL SYLLABLE DDAE {0xB54D, 0xB567, prLVT}, // Lo [27] HANGUL SYLLABLE DDAEG..HANGUL SYLLABLE DDAEH {0xB568, 0xB568, prLV}, // Lo HANGUL SYLLABLE DDYA {0xB569, 0xB583, prLVT}, // Lo [27] HANGUL SYLLABLE DDYAG..HANGUL SYLLABLE DDYAH {0xB584, 0xB584, prLV}, // Lo HANGUL SYLLABLE DDYAE {0xB585, 0xB59F, prLVT}, // Lo [27] HANGUL SYLLABLE DDYAEG..HANGUL SYLLABLE DDYAEH {0xB5A0, 0xB5A0, prLV}, // Lo HANGUL SYLLABLE DDEO {0xB5A1, 0xB5BB, prLVT}, // Lo [27] HANGUL SYLLABLE DDEOG..HANGUL SYLLABLE DDEOH {0xB5BC, 0xB5BC, prLV}, // Lo HANGUL SYLLABLE DDE {0xB5BD, 0xB5D7, prLVT}, // Lo [27] HANGUL SYLLABLE DDEG..HANGUL SYLLABLE DDEH {0xB5D8, 0xB5D8, prLV}, // Lo HANGUL SYLLABLE DDYEO {0xB5D9, 0xB5F3, prLVT}, // Lo [27] HANGUL SYLLABLE DDYEOG..HANGUL SYLLABLE DDYEOH {0xB5F4, 0xB5F4, prLV}, // Lo HANGUL SYLLABLE DDYE {0xB5F5, 0xB60F, prLVT}, // Lo [27] HANGUL SYLLABLE DDYEG..HANGUL SYLLABLE DDYEH {0xB610, 0xB610, prLV}, // Lo HANGUL SYLLABLE DDO {0xB611, 0xB62B, prLVT}, // Lo [27] HANGUL SYLLABLE DDOG..HANGUL SYLLABLE DDOH {0xB62C, 0xB62C, prLV}, // Lo HANGUL SYLLABLE DDWA {0xB62D, 0xB647, prLVT}, // Lo [27] HANGUL SYLLABLE DDWAG..HANGUL SYLLABLE DDWAH {0xB648, 0xB648, prLV}, // Lo HANGUL SYLLABLE DDWAE {0xB649, 0xB663, prLVT}, // Lo [27] HANGUL SYLLABLE DDWAEG..HANGUL SYLLABLE DDWAEH {0xB664, 0xB664, prLV}, // Lo HANGUL SYLLABLE DDOE {0xB665, 0xB67F, prLVT}, // Lo [27] HANGUL SYLLABLE DDOEG..HANGUL SYLLABLE DDOEH {0xB680, 0xB680, prLV}, // Lo HANGUL SYLLABLE DDYO {0xB681, 0xB69B, prLVT}, // Lo [27] HANGUL SYLLABLE DDYOG..HANGUL SYLLABLE DDYOH {0xB69C, 0xB69C, prLV}, // Lo HANGUL SYLLABLE DDU {0xB69D, 0xB6B7, prLVT}, // Lo [27] HANGUL SYLLABLE DDUG..HANGUL SYLLABLE DDUH {0xB6B8, 0xB6B8, prLV}, // Lo HANGUL SYLLABLE DDWEO {0xB6B9, 0xB6D3, prLVT}, // Lo [27] HANGUL SYLLABLE DDWEOG..HANGUL SYLLABLE DDWEOH {0xB6D4, 0xB6D4, prLV}, // Lo HANGUL SYLLABLE DDWE {0xB6D5, 0xB6EF, prLVT}, // Lo [27] HANGUL SYLLABLE DDWEG..HANGUL SYLLABLE DDWEH {0xB6F0, 0xB6F0, prLV}, // Lo HANGUL SYLLABLE DDWI {0xB6F1, 0xB70B, prLVT}, // Lo [27] HANGUL SYLLABLE DDWIG..HANGUL SYLLABLE DDWIH {0xB70C, 0xB70C, prLV}, // Lo HANGUL SYLLABLE DDYU {0xB70D, 0xB727, prLVT}, // Lo [27] HANGUL SYLLABLE DDYUG..HANGUL SYLLABLE DDYUH {0xB728, 0xB728, prLV}, // Lo HANGUL SYLLABLE DDEU {0xB729, 0xB743, prLVT}, // Lo [27] HANGUL SYLLABLE DDEUG..HANGUL SYLLABLE DDEUH {0xB744, 0xB744, prLV}, // Lo HANGUL SYLLABLE DDYI {0xB745, 0xB75F, prLVT}, // Lo [27] HANGUL SYLLABLE DDYIG..HANGUL SYLLABLE DDYIH {0xB760, 0xB760, prLV}, // Lo HANGUL SYLLABLE DDI {0xB761, 0xB77B, prLVT}, // Lo [27] HANGUL SYLLABLE DDIG..HANGUL SYLLABLE DDIH {0xB77C, 0xB77C, prLV}, // Lo HANGUL SYLLABLE RA {0xB77D, 0xB797, prLVT}, // Lo [27] HANGUL SYLLABLE RAG..HANGUL SYLLABLE RAH {0xB798, 0xB798, prLV}, // Lo HANGUL SYLLABLE RAE {0xB799, 0xB7B3, prLVT}, // Lo [27] HANGUL SYLLABLE RAEG..HANGUL SYLLABLE RAEH {0xB7B4, 0xB7B4, prLV}, // Lo HANGUL SYLLABLE RYA {0xB7B5, 0xB7CF, prLVT}, // Lo [27] HANGUL SYLLABLE RYAG..HANGUL SYLLABLE RYAH {0xB7D0, 0xB7D0, prLV}, // Lo HANGUL SYLLABLE RYAE {0xB7D1, 0xB7EB, prLVT}, // Lo [27] HANGUL SYLLABLE RYAEG..HANGUL SYLLABLE RYAEH {0xB7EC, 0xB7EC, prLV}, // Lo HANGUL SYLLABLE REO {0xB7ED, 0xB807, prLVT}, // Lo [27] HANGUL SYLLABLE REOG..HANGUL SYLLABLE REOH {0xB808, 0xB808, prLV}, // Lo HANGUL SYLLABLE RE {0xB809, 0xB823, prLVT}, // Lo [27] HANGUL SYLLABLE REG..HANGUL SYLLABLE REH {0xB824, 0xB824, prLV}, // Lo HANGUL SYLLABLE RYEO {0xB825, 0xB83F, prLVT}, // Lo [27] HANGUL SYLLABLE RYEOG..HANGUL SYLLABLE RYEOH {0xB840, 0xB840, prLV}, // Lo HANGUL SYLLABLE RYE {0xB841, 0xB85B, prLVT}, // Lo [27] HANGUL SYLLABLE RYEG..HANGUL SYLLABLE RYEH {0xB85C, 0xB85C, prLV}, // Lo HANGUL SYLLABLE RO {0xB85D, 0xB877, prLVT}, // Lo [27] HANGUL SYLLABLE ROG..HANGUL SYLLABLE ROH {0xB878, 0xB878, prLV}, // Lo HANGUL SYLLABLE RWA {0xB879, 0xB893, prLVT}, // Lo [27] HANGUL SYLLABLE RWAG..HANGUL SYLLABLE RWAH {0xB894, 0xB894, prLV}, // Lo HANGUL SYLLABLE RWAE {0xB895, 0xB8AF, prLVT}, // Lo [27] HANGUL SYLLABLE RWAEG..HANGUL SYLLABLE RWAEH {0xB8B0, 0xB8B0, prLV}, // Lo HANGUL SYLLABLE ROE {0xB8B1, 0xB8CB, prLVT}, // Lo [27] HANGUL SYLLABLE ROEG..HANGUL SYLLABLE ROEH {0xB8CC, 0xB8CC, prLV}, // Lo HANGUL SYLLABLE RYO {0xB8CD, 0xB8E7, prLVT}, // Lo [27] HANGUL SYLLABLE RYOG..HANGUL SYLLABLE RYOH {0xB8E8, 0xB8E8, prLV}, // Lo HANGUL SYLLABLE RU {0xB8E9, 0xB903, prLVT}, // Lo [27] HANGUL SYLLABLE RUG..HANGUL SYLLABLE RUH {0xB904, 0xB904, prLV}, // Lo HANGUL SYLLABLE RWEO {0xB905, 0xB91F, prLVT}, // Lo [27] HANGUL SYLLABLE RWEOG..HANGUL SYLLABLE RWEOH {0xB920, 0xB920, prLV}, // Lo HANGUL SYLLABLE RWE {0xB921, 0xB93B, prLVT}, // Lo [27] HANGUL SYLLABLE RWEG..HANGUL SYLLABLE RWEH {0xB93C, 0xB93C, prLV}, // Lo HANGUL SYLLABLE RWI {0xB93D, 0xB957, prLVT}, // Lo [27] HANGUL SYLLABLE RWIG..HANGUL SYLLABLE RWIH {0xB958, 0xB958, prLV}, // Lo HANGUL SYLLABLE RYU {0xB959, 0xB973, prLVT}, // Lo [27] HANGUL SYLLABLE RYUG..HANGUL SYLLABLE RYUH {0xB974, 0xB974, prLV}, // Lo HANGUL SYLLABLE REU {0xB975, 0xB98F, prLVT}, // Lo [27] HANGUL SYLLABLE REUG..HANGUL SYLLABLE REUH {0xB990, 0xB990, prLV}, // Lo HANGUL SYLLABLE RYI {0xB991, 0xB9AB, prLVT}, // Lo [27] HANGUL SYLLABLE RYIG..HANGUL SYLLABLE RYIH {0xB9AC, 0xB9AC, prLV}, // Lo HANGUL SYLLABLE RI {0xB9AD, 0xB9C7, prLVT}, // Lo [27] HANGUL SYLLABLE RIG..HANGUL SYLLABLE RIH {0xB9C8, 0xB9C8, prLV}, // Lo HANGUL SYLLABLE MA {0xB9C9, 0xB9E3, prLVT}, // Lo [27] HANGUL SYLLABLE MAG..HANGUL SYLLABLE MAH {0xB9E4, 0xB9E4, prLV}, // Lo HANGUL SYLLABLE MAE {0xB9E5, 0xB9FF, prLVT}, // Lo [27] HANGUL SYLLABLE MAEG..HANGUL SYLLABLE MAEH {0xBA00, 0xBA00, prLV}, // Lo HANGUL SYLLABLE MYA {0xBA01, 0xBA1B, prLVT}, // Lo [27] HANGUL SYLLABLE MYAG..HANGUL SYLLABLE MYAH {0xBA1C, 0xBA1C, prLV}, // Lo HANGUL SYLLABLE MYAE {0xBA1D, 0xBA37, prLVT}, // Lo [27] HANGUL SYLLABLE MYAEG..HANGUL SYLLABLE MYAEH {0xBA38, 0xBA38, prLV}, // Lo HANGUL SYLLABLE MEO {0xBA39, 0xBA53, prLVT}, // Lo [27] HANGUL SYLLABLE MEOG..HANGUL SYLLABLE MEOH {0xBA54, 0xBA54, prLV}, // Lo HANGUL SYLLABLE ME {0xBA55, 0xBA6F, prLVT}, // Lo [27] HANGUL SYLLABLE MEG..HANGUL SYLLABLE MEH {0xBA70, 0xBA70, prLV}, // Lo HANGUL SYLLABLE MYEO {0xBA71, 0xBA8B, prLVT}, // Lo [27] HANGUL SYLLABLE MYEOG..HANGUL SYLLABLE MYEOH {0xBA8C, 0xBA8C, prLV}, // Lo HANGUL SYLLABLE MYE {0xBA8D, 0xBAA7, prLVT}, // Lo [27] HANGUL SYLLABLE MYEG..HANGUL SYLLABLE MYEH {0xBAA8, 0xBAA8, prLV}, // Lo HANGUL SYLLABLE MO {0xBAA9, 0xBAC3, prLVT}, // Lo [27] HANGUL SYLLABLE MOG..HANGUL SYLLABLE MOH {0xBAC4, 0xBAC4, prLV}, // Lo HANGUL SYLLABLE MWA {0xBAC5, 0xBADF, prLVT}, // Lo [27] HANGUL SYLLABLE MWAG..HANGUL SYLLABLE MWAH {0xBAE0, 0xBAE0, prLV}, // Lo HANGUL SYLLABLE MWAE {0xBAE1, 0xBAFB, prLVT}, // Lo [27] HANGUL SYLLABLE MWAEG..HANGUL SYLLABLE MWAEH {0xBAFC, 0xBAFC, prLV}, // Lo HANGUL SYLLABLE MOE {0xBAFD, 0xBB17, prLVT}, // Lo [27] HANGUL SYLLABLE MOEG..HANGUL SYLLABLE MOEH {0xBB18, 0xBB18, prLV}, // Lo HANGUL SYLLABLE MYO {0xBB19, 0xBB33, prLVT}, // Lo [27] HANGUL SYLLABLE MYOG..HANGUL SYLLABLE MYOH {0xBB34, 0xBB34, prLV}, // Lo HANGUL SYLLABLE MU {0xBB35, 0xBB4F, prLVT}, // Lo [27] HANGUL SYLLABLE MUG..HANGUL SYLLABLE MUH {0xBB50, 0xBB50, prLV}, // Lo HANGUL SYLLABLE MWEO {0xBB51, 0xBB6B, prLVT}, // Lo [27] HANGUL SYLLABLE MWEOG..HANGUL SYLLABLE MWEOH {0xBB6C, 0xBB6C, prLV}, // Lo HANGUL SYLLABLE MWE {0xBB6D, 0xBB87, prLVT}, // Lo [27] HANGUL SYLLABLE MWEG..HANGUL SYLLABLE MWEH {0xBB88, 0xBB88, prLV}, // Lo HANGUL SYLLABLE MWI {0xBB89, 0xBBA3, prLVT}, // Lo [27] HANGUL SYLLABLE MWIG..HANGUL SYLLABLE MWIH {0xBBA4, 0xBBA4, prLV}, // Lo HANGUL SYLLABLE MYU {0xBBA5, 0xBBBF, prLVT}, // Lo [27] HANGUL SYLLABLE MYUG..HANGUL SYLLABLE MYUH {0xBBC0, 0xBBC0, prLV}, // Lo HANGUL SYLLABLE MEU {0xBBC1, 0xBBDB, prLVT}, // Lo [27] HANGUL SYLLABLE MEUG..HANGUL SYLLABLE MEUH {0xBBDC, 0xBBDC, prLV}, // Lo HANGUL SYLLABLE MYI {0xBBDD, 0xBBF7, prLVT}, // Lo [27] HANGUL SYLLABLE MYIG..HANGUL SYLLABLE MYIH {0xBBF8, 0xBBF8, prLV}, // Lo HANGUL SYLLABLE MI {0xBBF9, 0xBC13, prLVT}, // Lo [27] HANGUL SYLLABLE MIG..HANGUL SYLLABLE MIH {0xBC14, 0xBC14, prLV}, // Lo HANGUL SYLLABLE BA {0xBC15, 0xBC2F, prLVT}, // Lo [27] HANGUL SYLLABLE BAG..HANGUL SYLLABLE BAH {0xBC30, 0xBC30, prLV}, // Lo HANGUL SYLLABLE BAE {0xBC31, 0xBC4B, prLVT}, // Lo [27] HANGUL SYLLABLE BAEG..HANGUL SYLLABLE BAEH {0xBC4C, 0xBC4C, prLV}, // Lo HANGUL SYLLABLE BYA {0xBC4D, 0xBC67, prLVT}, // Lo [27] HANGUL SYLLABLE BYAG..HANGUL SYLLABLE BYAH {0xBC68, 0xBC68, prLV}, // Lo HANGUL SYLLABLE BYAE {0xBC69, 0xBC83, prLVT}, // Lo [27] HANGUL SYLLABLE BYAEG..HANGUL SYLLABLE BYAEH {0xBC84, 0xBC84, prLV}, // Lo HANGUL SYLLABLE BEO {0xBC85, 0xBC9F, prLVT}, // Lo [27] HANGUL SYLLABLE BEOG..HANGUL SYLLABLE BEOH {0xBCA0, 0xBCA0, prLV}, // Lo HANGUL SYLLABLE BE {0xBCA1, 0xBCBB, prLVT}, // Lo [27] HANGUL SYLLABLE BEG..HANGUL SYLLABLE BEH {0xBCBC, 0xBCBC, prLV}, // Lo HANGUL SYLLABLE BYEO {0xBCBD, 0xBCD7, prLVT}, // Lo [27] HANGUL SYLLABLE BYEOG..HANGUL SYLLABLE BYEOH {0xBCD8, 0xBCD8, prLV}, // Lo HANGUL SYLLABLE BYE {0xBCD9, 0xBCF3, prLVT}, // Lo [27] HANGUL SYLLABLE BYEG..HANGUL SYLLABLE BYEH {0xBCF4, 0xBCF4, prLV}, // Lo HANGUL SYLLABLE BO {0xBCF5, 0xBD0F, prLVT}, // Lo [27] HANGUL SYLLABLE BOG..HANGUL SYLLABLE BOH {0xBD10, 0xBD10, prLV}, // Lo HANGUL SYLLABLE BWA {0xBD11, 0xBD2B, prLVT}, // Lo [27] HANGUL SYLLABLE BWAG..HANGUL SYLLABLE BWAH {0xBD2C, 0xBD2C, prLV}, // Lo HANGUL SYLLABLE BWAE {0xBD2D, 0xBD47, prLVT}, // Lo [27] HANGUL SYLLABLE BWAEG..HANGUL SYLLABLE BWAEH {0xBD48, 0xBD48, prLV}, // Lo HANGUL SYLLABLE BOE {0xBD49, 0xBD63, prLVT}, // Lo [27] HANGUL SYLLABLE BOEG..HANGUL SYLLABLE BOEH {0xBD64, 0xBD64, prLV}, // Lo HANGUL SYLLABLE BYO {0xBD65, 0xBD7F, prLVT}, // Lo [27] HANGUL SYLLABLE BYOG..HANGUL SYLLABLE BYOH {0xBD80, 0xBD80, prLV}, // Lo HANGUL SYLLABLE BU {0xBD81, 0xBD9B, prLVT}, // Lo [27] HANGUL SYLLABLE BUG..HANGUL SYLLABLE BUH {0xBD9C, 0xBD9C, prLV}, // Lo HANGUL SYLLABLE BWEO {0xBD9D, 0xBDB7, prLVT}, // Lo [27] HANGUL SYLLABLE BWEOG..HANGUL SYLLABLE BWEOH {0xBDB8, 0xBDB8, prLV}, // Lo HANGUL SYLLABLE BWE {0xBDB9, 0xBDD3, prLVT}, // Lo [27] HANGUL SYLLABLE BWEG..HANGUL SYLLABLE BWEH {0xBDD4, 0xBDD4, prLV}, // Lo HANGUL SYLLABLE BWI {0xBDD5, 0xBDEF, prLVT}, // Lo [27] HANGUL SYLLABLE BWIG..HANGUL SYLLABLE BWIH {0xBDF0, 0xBDF0, prLV}, // Lo HANGUL SYLLABLE BYU {0xBDF1, 0xBE0B, prLVT}, // Lo [27] HANGUL SYLLABLE BYUG..HANGUL SYLLABLE BYUH {0xBE0C, 0xBE0C, prLV}, // Lo HANGUL SYLLABLE BEU {0xBE0D, 0xBE27, prLVT}, // Lo [27] HANGUL SYLLABLE BEUG..HANGUL SYLLABLE BEUH {0xBE28, 0xBE28, prLV}, // Lo HANGUL SYLLABLE BYI {0xBE29, 0xBE43, prLVT}, // Lo [27] HANGUL SYLLABLE BYIG..HANGUL SYLLABLE BYIH {0xBE44, 0xBE44, prLV}, // Lo HANGUL SYLLABLE BI {0xBE45, 0xBE5F, prLVT}, // Lo [27] HANGUL SYLLABLE BIG..HANGUL SYLLABLE BIH {0xBE60, 0xBE60, prLV}, // Lo HANGUL SYLLABLE BBA {0xBE61, 0xBE7B, prLVT}, // Lo [27] HANGUL SYLLABLE BBAG..HANGUL SYLLABLE BBAH {0xBE7C, 0xBE7C, prLV}, // Lo HANGUL SYLLABLE BBAE {0xBE7D, 0xBE97, prLVT}, // Lo [27] HANGUL SYLLABLE BBAEG..HANGUL SYLLABLE BBAEH {0xBE98, 0xBE98, prLV}, // Lo HANGUL SYLLABLE BBYA {0xBE99, 0xBEB3, prLVT}, // Lo [27] HANGUL SYLLABLE BBYAG..HANGUL SYLLABLE BBYAH {0xBEB4, 0xBEB4, prLV}, // Lo HANGUL SYLLABLE BBYAE {0xBEB5, 0xBECF, prLVT}, // Lo [27] HANGUL SYLLABLE BBYAEG..HANGUL SYLLABLE BBYAEH {0xBED0, 0xBED0, prLV}, // Lo HANGUL SYLLABLE BBEO {0xBED1, 0xBEEB, prLVT}, // Lo [27] HANGUL SYLLABLE BBEOG..HANGUL SYLLABLE BBEOH {0xBEEC, 0xBEEC, prLV}, // Lo HANGUL SYLLABLE BBE {0xBEED, 0xBF07, prLVT}, // Lo [27] HANGUL SYLLABLE BBEG..HANGUL SYLLABLE BBEH {0xBF08, 0xBF08, prLV}, // Lo HANGUL SYLLABLE BBYEO {0xBF09, 0xBF23, prLVT}, // Lo [27] HANGUL SYLLABLE BBYEOG..HANGUL SYLLABLE BBYEOH {0xBF24, 0xBF24, prLV}, // Lo HANGUL SYLLABLE BBYE {0xBF25, 0xBF3F, prLVT}, // Lo [27] HANGUL SYLLABLE BBYEG..HANGUL SYLLABLE BBYEH {0xBF40, 0xBF40, prLV}, // Lo HANGUL SYLLABLE BBO {0xBF41, 0xBF5B, prLVT}, // Lo [27] HANGUL SYLLABLE BBOG..HANGUL SYLLABLE BBOH {0xBF5C, 0xBF5C, prLV}, // Lo HANGUL SYLLABLE BBWA {0xBF5D, 0xBF77, prLVT}, // Lo [27] HANGUL SYLLABLE BBWAG..HANGUL SYLLABLE BBWAH {0xBF78, 0xBF78, prLV}, // Lo HANGUL SYLLABLE BBWAE {0xBF79, 0xBF93, prLVT}, // Lo [27] HANGUL SYLLABLE BBWAEG..HANGUL SYLLABLE BBWAEH {0xBF94, 0xBF94, prLV}, // Lo HANGUL SYLLABLE BBOE {0xBF95, 0xBFAF, prLVT}, // Lo [27] HANGUL SYLLABLE BBOEG..HANGUL SYLLABLE BBOEH {0xBFB0, 0xBFB0, prLV}, // Lo HANGUL SYLLABLE BBYO {0xBFB1, 0xBFCB, prLVT}, // Lo [27] HANGUL SYLLABLE BBYOG..HANGUL SYLLABLE BBYOH {0xBFCC, 0xBFCC, prLV}, // Lo HANGUL SYLLABLE BBU {0xBFCD, 0xBFE7, prLVT}, // Lo [27] HANGUL SYLLABLE BBUG..HANGUL SYLLABLE BBUH {0xBFE8, 0xBFE8, prLV}, // Lo HANGUL SYLLABLE BBWEO {0xBFE9, 0xC003, prLVT}, // Lo [27] HANGUL SYLLABLE BBWEOG..HANGUL SYLLABLE BBWEOH {0xC004, 0xC004, prLV}, // Lo HANGUL SYLLABLE BBWE {0xC005, 0xC01F, prLVT}, // Lo [27] HANGUL SYLLABLE BBWEG..HANGUL SYLLABLE BBWEH {0xC020, 0xC020, prLV}, // Lo HANGUL SYLLABLE BBWI {0xC021, 0xC03B, prLVT}, // Lo [27] HANGUL SYLLABLE BBWIG..HANGUL SYLLABLE BBWIH {0xC03C, 0xC03C, prLV}, // Lo HANGUL SYLLABLE BBYU {0xC03D, 0xC057, prLVT}, // Lo [27] HANGUL SYLLABLE BBYUG..HANGUL SYLLABLE BBYUH {0xC058, 0xC058, prLV}, // Lo HANGUL SYLLABLE BBEU {0xC059, 0xC073, prLVT}, // Lo [27] HANGUL SYLLABLE BBEUG..HANGUL SYLLABLE BBEUH {0xC074, 0xC074, prLV}, // Lo HANGUL SYLLABLE BBYI {0xC075, 0xC08F, prLVT}, // Lo [27] HANGUL SYLLABLE BBYIG..HANGUL SYLLABLE BBYIH {0xC090, 0xC090, prLV}, // Lo HANGUL SYLLABLE BBI {0xC091, 0xC0AB, prLVT}, // Lo [27] HANGUL SYLLABLE BBIG..HANGUL SYLLABLE BBIH {0xC0AC, 0xC0AC, prLV}, // Lo HANGUL SYLLABLE SA {0xC0AD, 0xC0C7, prLVT}, // Lo [27] HANGUL SYLLABLE SAG..HANGUL SYLLABLE SAH {0xC0C8, 0xC0C8, prLV}, // Lo HANGUL SYLLABLE SAE {0xC0C9, 0xC0E3, prLVT}, // Lo [27] HANGUL SYLLABLE SAEG..HANGUL SYLLABLE SAEH {0xC0E4, 0xC0E4, prLV}, // Lo HANGUL SYLLABLE SYA {0xC0E5, 0xC0FF, prLVT}, // Lo [27] HANGUL SYLLABLE SYAG..HANGUL SYLLABLE SYAH {0xC100, 0xC100, prLV}, // Lo HANGUL SYLLABLE SYAE {0xC101, 0xC11B, prLVT}, // Lo [27] HANGUL SYLLABLE SYAEG..HANGUL SYLLABLE SYAEH {0xC11C, 0xC11C, prLV}, // Lo HANGUL SYLLABLE SEO {0xC11D, 0xC137, prLVT}, // Lo [27] HANGUL SYLLABLE SEOG..HANGUL SYLLABLE SEOH {0xC138, 0xC138, prLV}, // Lo HANGUL SYLLABLE SE {0xC139, 0xC153, prLVT}, // Lo [27] HANGUL SYLLABLE SEG..HANGUL SYLLABLE SEH {0xC154, 0xC154, prLV}, // Lo HANGUL SYLLABLE SYEO {0xC155, 0xC16F, prLVT}, // Lo [27] HANGUL SYLLABLE SYEOG..HANGUL SYLLABLE SYEOH {0xC170, 0xC170, prLV}, // Lo HANGUL SYLLABLE SYE {0xC171, 0xC18B, prLVT}, // Lo [27] HANGUL SYLLABLE SYEG..HANGUL SYLLABLE SYEH {0xC18C, 0xC18C, prLV}, // Lo HANGUL SYLLABLE SO {0xC18D, 0xC1A7, prLVT}, // Lo [27] HANGUL SYLLABLE SOG..HANGUL SYLLABLE SOH {0xC1A8, 0xC1A8, prLV}, // Lo HANGUL SYLLABLE SWA {0xC1A9, 0xC1C3, prLVT}, // Lo [27] HANGUL SYLLABLE SWAG..HANGUL SYLLABLE SWAH {0xC1C4, 0xC1C4, prLV}, // Lo HANGUL SYLLABLE SWAE {0xC1C5, 0xC1DF, prLVT}, // Lo [27] HANGUL SYLLABLE SWAEG..HANGUL SYLLABLE SWAEH {0xC1E0, 0xC1E0, prLV}, // Lo HANGUL SYLLABLE SOE {0xC1E1, 0xC1FB, prLVT}, // Lo [27] HANGUL SYLLABLE SOEG..HANGUL SYLLABLE SOEH {0xC1FC, 0xC1FC, prLV}, // Lo HANGUL SYLLABLE SYO {0xC1FD, 0xC217, prLVT}, // Lo [27] HANGUL SYLLABLE SYOG..HANGUL SYLLABLE SYOH {0xC218, 0xC218, prLV}, // Lo HANGUL SYLLABLE SU {0xC219, 0xC233, prLVT}, // Lo [27] HANGUL SYLLABLE SUG..HANGUL SYLLABLE SUH {0xC234, 0xC234, prLV}, // Lo HANGUL SYLLABLE SWEO {0xC235, 0xC24F, prLVT}, // Lo [27] HANGUL SYLLABLE SWEOG..HANGUL SYLLABLE SWEOH {0xC250, 0xC250, prLV}, // Lo HANGUL SYLLABLE SWE {0xC251, 0xC26B, prLVT}, // Lo [27] HANGUL SYLLABLE SWEG..HANGUL SYLLABLE SWEH {0xC26C, 0xC26C, prLV}, // Lo HANGUL SYLLABLE SWI {0xC26D, 0xC287, prLVT}, // Lo [27] HANGUL SYLLABLE SWIG..HANGUL SYLLABLE SWIH {0xC288, 0xC288, prLV}, // Lo HANGUL SYLLABLE SYU {0xC289, 0xC2A3, prLVT}, // Lo [27] HANGUL SYLLABLE SYUG..HANGUL SYLLABLE SYUH {0xC2A4, 0xC2A4, prLV}, // Lo HANGUL SYLLABLE SEU {0xC2A5, 0xC2BF, prLVT}, // Lo [27] HANGUL SYLLABLE SEUG..HANGUL SYLLABLE SEUH {0xC2C0, 0xC2C0, prLV}, // Lo HANGUL SYLLABLE SYI {0xC2C1, 0xC2DB, prLVT}, // Lo [27] HANGUL SYLLABLE SYIG..HANGUL SYLLABLE SYIH {0xC2DC, 0xC2DC, prLV}, // Lo HANGUL SYLLABLE SI {0xC2DD, 0xC2F7, prLVT}, // Lo [27] HANGUL SYLLABLE SIG..HANGUL SYLLABLE SIH {0xC2F8, 0xC2F8, prLV}, // Lo HANGUL SYLLABLE SSA {0xC2F9, 0xC313, prLVT}, // Lo [27] HANGUL SYLLABLE SSAG..HANGUL SYLLABLE SSAH {0xC314, 0xC314, prLV}, // Lo HANGUL SYLLABLE SSAE {0xC315, 0xC32F, prLVT}, // Lo [27] HANGUL SYLLABLE SSAEG..HANGUL SYLLABLE SSAEH {0xC330, 0xC330, prLV}, // Lo HANGUL SYLLABLE SSYA {0xC331, 0xC34B, prLVT}, // Lo [27] HANGUL SYLLABLE SSYAG..HANGUL SYLLABLE SSYAH {0xC34C, 0xC34C, prLV}, // Lo HANGUL SYLLABLE SSYAE {0xC34D, 0xC367, prLVT}, // Lo [27] HANGUL SYLLABLE SSYAEG..HANGUL SYLLABLE SSYAEH {0xC368, 0xC368, prLV}, // Lo HANGUL SYLLABLE SSEO {0xC369, 0xC383, prLVT}, // Lo [27] HANGUL SYLLABLE SSEOG..HANGUL SYLLABLE SSEOH {0xC384, 0xC384, prLV}, // Lo HANGUL SYLLABLE SSE {0xC385, 0xC39F, prLVT}, // Lo [27] HANGUL SYLLABLE SSEG..HANGUL SYLLABLE SSEH {0xC3A0, 0xC3A0, prLV}, // Lo HANGUL SYLLABLE SSYEO {0xC3A1, 0xC3BB, prLVT}, // Lo [27] HANGUL SYLLABLE SSYEOG..HANGUL SYLLABLE SSYEOH {0xC3BC, 0xC3BC, prLV}, // Lo HANGUL SYLLABLE SSYE {0xC3BD, 0xC3D7, prLVT}, // Lo [27] HANGUL SYLLABLE SSYEG..HANGUL SYLLABLE SSYEH {0xC3D8, 0xC3D8, prLV}, // Lo HANGUL SYLLABLE SSO {0xC3D9, 0xC3F3, prLVT}, // Lo [27] HANGUL SYLLABLE SSOG..HANGUL SYLLABLE SSOH {0xC3F4, 0xC3F4, prLV}, // Lo HANGUL SYLLABLE SSWA {0xC3F5, 0xC40F, prLVT}, // Lo [27] HANGUL SYLLABLE SSWAG..HANGUL SYLLABLE SSWAH {0xC410, 0xC410, prLV}, // Lo HANGUL SYLLABLE SSWAE {0xC411, 0xC42B, prLVT}, // Lo [27] HANGUL SYLLABLE SSWAEG..HANGUL SYLLABLE SSWAEH {0xC42C, 0xC42C, prLV}, // Lo HANGUL SYLLABLE SSOE {0xC42D, 0xC447, prLVT}, // Lo [27] HANGUL SYLLABLE SSOEG..HANGUL SYLLABLE SSOEH {0xC448, 0xC448, prLV}, // Lo HANGUL SYLLABLE SSYO {0xC449, 0xC463, prLVT}, // Lo [27] HANGUL SYLLABLE SSYOG..HANGUL SYLLABLE SSYOH {0xC464, 0xC464, prLV}, // Lo HANGUL SYLLABLE SSU {0xC465, 0xC47F, prLVT}, // Lo [27] HANGUL SYLLABLE SSUG..HANGUL SYLLABLE SSUH {0xC480, 0xC480, prLV}, // Lo HANGUL SYLLABLE SSWEO {0xC481, 0xC49B, prLVT}, // Lo [27] HANGUL SYLLABLE SSWEOG..HANGUL SYLLABLE SSWEOH {0xC49C, 0xC49C, prLV}, // Lo HANGUL SYLLABLE SSWE {0xC49D, 0xC4B7, prLVT}, // Lo [27] HANGUL SYLLABLE SSWEG..HANGUL SYLLABLE SSWEH {0xC4B8, 0xC4B8, prLV}, // Lo HANGUL SYLLABLE SSWI {0xC4B9, 0xC4D3, prLVT}, // Lo [27] HANGUL SYLLABLE SSWIG..HANGUL SYLLABLE SSWIH {0xC4D4, 0xC4D4, prLV}, // Lo HANGUL SYLLABLE SSYU {0xC4D5, 0xC4EF, prLVT}, // Lo [27] HANGUL SYLLABLE SSYUG..HANGUL SYLLABLE SSYUH {0xC4F0, 0xC4F0, prLV}, // Lo HANGUL SYLLABLE SSEU {0xC4F1, 0xC50B, prLVT}, // Lo [27] HANGUL SYLLABLE SSEUG..HANGUL SYLLABLE SSEUH {0xC50C, 0xC50C, prLV}, // Lo HANGUL SYLLABLE SSYI {0xC50D, 0xC527, prLVT}, // Lo [27] HANGUL SYLLABLE SSYIG..HANGUL SYLLABLE SSYIH {0xC528, 0xC528, prLV}, // Lo HANGUL SYLLABLE SSI {0xC529, 0xC543, prLVT}, // Lo [27] HANGUL SYLLABLE SSIG..HANGUL SYLLABLE SSIH {0xC544, 0xC544, prLV}, // Lo HANGUL SYLLABLE A {0xC545, 0xC55F, prLVT}, // Lo [27] HANGUL SYLLABLE AG..HANGUL SYLLABLE AH {0xC560, 0xC560, prLV}, // Lo HANGUL SYLLABLE AE {0xC561, 0xC57B, prLVT}, // Lo [27] HANGUL SYLLABLE AEG..HANGUL SYLLABLE AEH {0xC57C, 0xC57C, prLV}, // Lo HANGUL SYLLABLE YA {0xC57D, 0xC597, prLVT}, // Lo [27] HANGUL SYLLABLE YAG..HANGUL SYLLABLE YAH {0xC598, 0xC598, prLV}, // Lo HANGUL SYLLABLE YAE {0xC599, 0xC5B3, prLVT}, // Lo [27] HANGUL SYLLABLE YAEG..HANGUL SYLLABLE YAEH {0xC5B4, 0xC5B4, prLV}, // Lo HANGUL SYLLABLE EO {0xC5B5, 0xC5CF, prLVT}, // Lo [27] HANGUL SYLLABLE EOG..HANGUL SYLLABLE EOH {0xC5D0, 0xC5D0, prLV}, // Lo HANGUL SYLLABLE E {0xC5D1, 0xC5EB, prLVT}, // Lo [27] HANGUL SYLLABLE EG..HANGUL SYLLABLE EH {0xC5EC, 0xC5EC, prLV}, // Lo HANGUL SYLLABLE YEO {0xC5ED, 0xC607, prLVT}, // Lo [27] HANGUL SYLLABLE YEOG..HANGUL SYLLABLE YEOH {0xC608, 0xC608, prLV}, // Lo HANGUL SYLLABLE YE {0xC609, 0xC623, prLVT}, // Lo [27] HANGUL SYLLABLE YEG..HANGUL SYLLABLE YEH {0xC624, 0xC624, prLV}, // Lo HANGUL SYLLABLE O {0xC625, 0xC63F, prLVT}, // Lo [27] HANGUL SYLLABLE OG..HANGUL SYLLABLE OH {0xC640, 0xC640, prLV}, // Lo HANGUL SYLLABLE WA {0xC641, 0xC65B, prLVT}, // Lo [27] HANGUL SYLLABLE WAG..HANGUL SYLLABLE WAH {0xC65C, 0xC65C, prLV}, // Lo HANGUL SYLLABLE WAE {0xC65D, 0xC677, prLVT}, // Lo [27] HANGUL SYLLABLE WAEG..HANGUL SYLLABLE WAEH {0xC678, 0xC678, prLV}, // Lo HANGUL SYLLABLE OE {0xC679, 0xC693, prLVT}, // Lo [27] HANGUL SYLLABLE OEG..HANGUL SYLLABLE OEH {0xC694, 0xC694, prLV}, // Lo HANGUL SYLLABLE YO {0xC695, 0xC6AF, prLVT}, // Lo [27] HANGUL SYLLABLE YOG..HANGUL SYLLABLE YOH {0xC6B0, 0xC6B0, prLV}, // Lo HANGUL SYLLABLE U {0xC6B1, 0xC6CB, prLVT}, // Lo [27] HANGUL SYLLABLE UG..HANGUL SYLLABLE UH {0xC6CC, 0xC6CC, prLV}, // Lo HANGUL SYLLABLE WEO {0xC6CD, 0xC6E7, prLVT}, // Lo [27] HANGUL SYLLABLE WEOG..HANGUL SYLLABLE WEOH {0xC6E8, 0xC6E8, prLV}, // Lo HANGUL SYLLABLE WE {0xC6E9, 0xC703, prLVT}, // Lo [27] HANGUL SYLLABLE WEG..HANGUL SYLLABLE WEH {0xC704, 0xC704, prLV}, // Lo HANGUL SYLLABLE WI {0xC705, 0xC71F, prLVT}, // Lo [27] HANGUL SYLLABLE WIG..HANGUL SYLLABLE WIH {0xC720, 0xC720, prLV}, // Lo HANGUL SYLLABLE YU {0xC721, 0xC73B, prLVT}, // Lo [27] HANGUL SYLLABLE YUG..HANGUL SYLLABLE YUH {0xC73C, 0xC73C, prLV}, // Lo HANGUL SYLLABLE EU {0xC73D, 0xC757, prLVT}, // Lo [27] HANGUL SYLLABLE EUG..HANGUL SYLLABLE EUH {0xC758, 0xC758, prLV}, // Lo HANGUL SYLLABLE YI {0xC759, 0xC773, prLVT}, // Lo [27] HANGUL SYLLABLE YIG..HANGUL SYLLABLE YIH {0xC774, 0xC774, prLV}, // Lo HANGUL SYLLABLE I {0xC775, 0xC78F, prLVT}, // Lo [27] HANGUL SYLLABLE IG..HANGUL SYLLABLE IH {0xC790, 0xC790, prLV}, // Lo HANGUL SYLLABLE JA {0xC791, 0xC7AB, prLVT}, // Lo [27] HANGUL SYLLABLE JAG..HANGUL SYLLABLE JAH {0xC7AC, 0xC7AC, prLV}, // Lo HANGUL SYLLABLE JAE {0xC7AD, 0xC7C7, prLVT}, // Lo [27] HANGUL SYLLABLE JAEG..HANGUL SYLLABLE JAEH {0xC7C8, 0xC7C8, prLV}, // Lo HANGUL SYLLABLE JYA {0xC7C9, 0xC7E3, prLVT}, // Lo [27] HANGUL SYLLABLE JYAG..HANGUL SYLLABLE JYAH {0xC7E4, 0xC7E4, prLV}, // Lo HANGUL SYLLABLE JYAE {0xC7E5, 0xC7FF, prLVT}, // Lo [27] HANGUL SYLLABLE JYAEG..HANGUL SYLLABLE JYAEH {0xC800, 0xC800, prLV}, // Lo HANGUL SYLLABLE JEO {0xC801, 0xC81B, prLVT}, // Lo [27] HANGUL SYLLABLE JEOG..HANGUL SYLLABLE JEOH {0xC81C, 0xC81C, prLV}, // Lo HANGUL SYLLABLE JE {0xC81D, 0xC837, prLVT}, // Lo [27] HANGUL SYLLABLE JEG..HANGUL SYLLABLE JEH {0xC838, 0xC838, prLV}, // Lo HANGUL SYLLABLE JYEO {0xC839, 0xC853, prLVT}, // Lo [27] HANGUL SYLLABLE JYEOG..HANGUL SYLLABLE JYEOH {0xC854, 0xC854, prLV}, // Lo HANGUL SYLLABLE JYE {0xC855, 0xC86F, prLVT}, // Lo [27] HANGUL SYLLABLE JYEG..HANGUL SYLLABLE JYEH {0xC870, 0xC870, prLV}, // Lo HANGUL SYLLABLE JO {0xC871, 0xC88B, prLVT}, // Lo [27] HANGUL SYLLABLE JOG..HANGUL SYLLABLE JOH {0xC88C, 0xC88C, prLV}, // Lo HANGUL SYLLABLE JWA {0xC88D, 0xC8A7, prLVT}, // Lo [27] HANGUL SYLLABLE JWAG..HANGUL SYLLABLE JWAH {0xC8A8, 0xC8A8, prLV}, // Lo HANGUL SYLLABLE JWAE {0xC8A9, 0xC8C3, prLVT}, // Lo [27] HANGUL SYLLABLE JWAEG..HANGUL SYLLABLE JWAEH {0xC8C4, 0xC8C4, prLV}, // Lo HANGUL SYLLABLE JOE {0xC8C5, 0xC8DF, prLVT}, // Lo [27] HANGUL SYLLABLE JOEG..HANGUL SYLLABLE JOEH {0xC8E0, 0xC8E0, prLV}, // Lo HANGUL SYLLABLE JYO {0xC8E1, 0xC8FB, prLVT}, // Lo [27] HANGUL SYLLABLE JYOG..HANGUL SYLLABLE JYOH {0xC8FC, 0xC8FC, prLV}, // Lo HANGUL SYLLABLE JU {0xC8FD, 0xC917, prLVT}, // Lo [27] HANGUL SYLLABLE JUG..HANGUL SYLLABLE JUH {0xC918, 0xC918, prLV}, // Lo HANGUL SYLLABLE JWEO {0xC919, 0xC933, prLVT}, // Lo [27] HANGUL SYLLABLE JWEOG..HANGUL SYLLABLE JWEOH {0xC934, 0xC934, prLV}, // Lo HANGUL SYLLABLE JWE {0xC935, 0xC94F, prLVT}, // Lo [27] HANGUL SYLLABLE JWEG..HANGUL SYLLABLE JWEH {0xC950, 0xC950, prLV}, // Lo HANGUL SYLLABLE JWI {0xC951, 0xC96B, prLVT}, // Lo [27] HANGUL SYLLABLE JWIG..HANGUL SYLLABLE JWIH {0xC96C, 0xC96C, prLV}, // Lo HANGUL SYLLABLE JYU {0xC96D, 0xC987, prLVT}, // Lo [27] HANGUL SYLLABLE JYUG..HANGUL SYLLABLE JYUH {0xC988, 0xC988, prLV}, // Lo HANGUL SYLLABLE JEU {0xC989, 0xC9A3, prLVT}, // Lo [27] HANGUL SYLLABLE JEUG..HANGUL SYLLABLE JEUH {0xC9A4, 0xC9A4, prLV}, // Lo HANGUL SYLLABLE JYI {0xC9A5, 0xC9BF, prLVT}, // Lo [27] HANGUL SYLLABLE JYIG..HANGUL SYLLABLE JYIH {0xC9C0, 0xC9C0, prLV}, // Lo HANGUL SYLLABLE JI {0xC9C1, 0xC9DB, prLVT}, // Lo [27] HANGUL SYLLABLE JIG..HANGUL SYLLABLE JIH {0xC9DC, 0xC9DC, prLV}, // Lo HANGUL SYLLABLE JJA {0xC9DD, 0xC9F7, prLVT}, // Lo [27] HANGUL SYLLABLE JJAG..HANGUL SYLLABLE JJAH {0xC9F8, 0xC9F8, prLV}, // Lo HANGUL SYLLABLE JJAE {0xC9F9, 0xCA13, prLVT}, // Lo [27] HANGUL SYLLABLE JJAEG..HANGUL SYLLABLE JJAEH {0xCA14, 0xCA14, prLV}, // Lo HANGUL SYLLABLE JJYA {0xCA15, 0xCA2F, prLVT}, // Lo [27] HANGUL SYLLABLE JJYAG..HANGUL SYLLABLE JJYAH {0xCA30, 0xCA30, prLV}, // Lo HANGUL SYLLABLE JJYAE {0xCA31, 0xCA4B, prLVT}, // Lo [27] HANGUL SYLLABLE JJYAEG..HANGUL SYLLABLE JJYAEH {0xCA4C, 0xCA4C, prLV}, // Lo HANGUL SYLLABLE JJEO {0xCA4D, 0xCA67, prLVT}, // Lo [27] HANGUL SYLLABLE JJEOG..HANGUL SYLLABLE JJEOH {0xCA68, 0xCA68, prLV}, // Lo HANGUL SYLLABLE JJE {0xCA69, 0xCA83, prLVT}, // Lo [27] HANGUL SYLLABLE JJEG..HANGUL SYLLABLE JJEH {0xCA84, 0xCA84, prLV}, // Lo HANGUL SYLLABLE JJYEO {0xCA85, 0xCA9F, prLVT}, // Lo [27] HANGUL SYLLABLE JJYEOG..HANGUL SYLLABLE JJYEOH {0xCAA0, 0xCAA0, prLV}, // Lo HANGUL SYLLABLE JJYE {0xCAA1, 0xCABB, prLVT}, // Lo [27] HANGUL SYLLABLE JJYEG..HANGUL SYLLABLE JJYEH {0xCABC, 0xCABC, prLV}, // Lo HANGUL SYLLABLE JJO {0xCABD, 0xCAD7, prLVT}, // Lo [27] HANGUL SYLLABLE JJOG..HANGUL SYLLABLE JJOH {0xCAD8, 0xCAD8, prLV}, // Lo HANGUL SYLLABLE JJWA {0xCAD9, 0xCAF3, prLVT}, // Lo [27] HANGUL SYLLABLE JJWAG..HANGUL SYLLABLE JJWAH {0xCAF4, 0xCAF4, prLV}, // Lo HANGUL SYLLABLE JJWAE {0xCAF5, 0xCB0F, prLVT}, // Lo [27] HANGUL SYLLABLE JJWAEG..HANGUL SYLLABLE JJWAEH {0xCB10, 0xCB10, prLV}, // Lo HANGUL SYLLABLE JJOE {0xCB11, 0xCB2B, prLVT}, // Lo [27] HANGUL SYLLABLE JJOEG..HANGUL SYLLABLE JJOEH {0xCB2C, 0xCB2C, prLV}, // Lo HANGUL SYLLABLE JJYO {0xCB2D, 0xCB47, prLVT}, // Lo [27] HANGUL SYLLABLE JJYOG..HANGUL SYLLABLE JJYOH {0xCB48, 0xCB48, prLV}, // Lo HANGUL SYLLABLE JJU {0xCB49, 0xCB63, prLVT}, // Lo [27] HANGUL SYLLABLE JJUG..HANGUL SYLLABLE JJUH {0xCB64, 0xCB64, prLV}, // Lo HANGUL SYLLABLE JJWEO {0xCB65, 0xCB7F, prLVT}, // Lo [27] HANGUL SYLLABLE JJWEOG..HANGUL SYLLABLE JJWEOH {0xCB80, 0xCB80, prLV}, // Lo HANGUL SYLLABLE JJWE {0xCB81, 0xCB9B, prLVT}, // Lo [27] HANGUL SYLLABLE JJWEG..HANGUL SYLLABLE JJWEH {0xCB9C, 0xCB9C, prLV}, // Lo HANGUL SYLLABLE JJWI {0xCB9D, 0xCBB7, prLVT}, // Lo [27] HANGUL SYLLABLE JJWIG..HANGUL SYLLABLE JJWIH {0xCBB8, 0xCBB8, prLV}, // Lo HANGUL SYLLABLE JJYU {0xCBB9, 0xCBD3, prLVT}, // Lo [27] HANGUL SYLLABLE JJYUG..HANGUL SYLLABLE JJYUH {0xCBD4, 0xCBD4, prLV}, // Lo HANGUL SYLLABLE JJEU {0xCBD5, 0xCBEF, prLVT}, // Lo [27] HANGUL SYLLABLE JJEUG..HANGUL SYLLABLE JJEUH {0xCBF0, 0xCBF0, prLV}, // Lo HANGUL SYLLABLE JJYI {0xCBF1, 0xCC0B, prLVT}, // Lo [27] HANGUL SYLLABLE JJYIG..HANGUL SYLLABLE JJYIH {0xCC0C, 0xCC0C, prLV}, // Lo HANGUL SYLLABLE JJI {0xCC0D, 0xCC27, prLVT}, // Lo [27] HANGUL SYLLABLE JJIG..HANGUL SYLLABLE JJIH {0xCC28, 0xCC28, prLV}, // Lo HANGUL SYLLABLE CA {0xCC29, 0xCC43, prLVT}, // Lo [27] HANGUL SYLLABLE CAG..HANGUL SYLLABLE CAH {0xCC44, 0xCC44, prLV}, // Lo HANGUL SYLLABLE CAE {0xCC45, 0xCC5F, prLVT}, // Lo [27] HANGUL SYLLABLE CAEG..HANGUL SYLLABLE CAEH {0xCC60, 0xCC60, prLV}, // Lo HANGUL SYLLABLE CYA {0xCC61, 0xCC7B, prLVT}, // Lo [27] HANGUL SYLLABLE CYAG..HANGUL SYLLABLE CYAH {0xCC7C, 0xCC7C, prLV}, // Lo HANGUL SYLLABLE CYAE {0xCC7D, 0xCC97, prLVT}, // Lo [27] HANGUL SYLLABLE CYAEG..HANGUL SYLLABLE CYAEH {0xCC98, 0xCC98, prLV}, // Lo HANGUL SYLLABLE CEO {0xCC99, 0xCCB3, prLVT}, // Lo [27] HANGUL SYLLABLE CEOG..HANGUL SYLLABLE CEOH {0xCCB4, 0xCCB4, prLV}, // Lo HANGUL SYLLABLE CE {0xCCB5, 0xCCCF, prLVT}, // Lo [27] HANGUL SYLLABLE CEG..HANGUL SYLLABLE CEH {0xCCD0, 0xCCD0, prLV}, // Lo HANGUL SYLLABLE CYEO {0xCCD1, 0xCCEB, prLVT}, // Lo [27] HANGUL SYLLABLE CYEOG..HANGUL SYLLABLE CYEOH {0xCCEC, 0xCCEC, prLV}, // Lo HANGUL SYLLABLE CYE {0xCCED, 0xCD07, prLVT}, // Lo [27] HANGUL SYLLABLE CYEG..HANGUL SYLLABLE CYEH {0xCD08, 0xCD08, prLV}, // Lo HANGUL SYLLABLE CO {0xCD09, 0xCD23, prLVT}, // Lo [27] HANGUL SYLLABLE COG..HANGUL SYLLABLE COH {0xCD24, 0xCD24, prLV}, // Lo HANGUL SYLLABLE CWA {0xCD25, 0xCD3F, prLVT}, // Lo [27] HANGUL SYLLABLE CWAG..HANGUL SYLLABLE CWAH {0xCD40, 0xCD40, prLV}, // Lo HANGUL SYLLABLE CWAE {0xCD41, 0xCD5B, prLVT}, // Lo [27] HANGUL SYLLABLE CWAEG..HANGUL SYLLABLE CWAEH {0xCD5C, 0xCD5C, prLV}, // Lo HANGUL SYLLABLE COE {0xCD5D, 0xCD77, prLVT}, // Lo [27] HANGUL SYLLABLE COEG..HANGUL SYLLABLE COEH {0xCD78, 0xCD78, prLV}, // Lo HANGUL SYLLABLE CYO {0xCD79, 0xCD93, prLVT}, // Lo [27] HANGUL SYLLABLE CYOG..HANGUL SYLLABLE CYOH {0xCD94, 0xCD94, prLV}, // Lo HANGUL SYLLABLE CU {0xCD95, 0xCDAF, prLVT}, // Lo [27] HANGUL SYLLABLE CUG..HANGUL SYLLABLE CUH {0xCDB0, 0xCDB0, prLV}, // Lo HANGUL SYLLABLE CWEO {0xCDB1, 0xCDCB, prLVT}, // Lo [27] HANGUL SYLLABLE CWEOG..HANGUL SYLLABLE CWEOH {0xCDCC, 0xCDCC, prLV}, // Lo HANGUL SYLLABLE CWE {0xCDCD, 0xCDE7, prLVT}, // Lo [27] HANGUL SYLLABLE CWEG..HANGUL SYLLABLE CWEH {0xCDE8, 0xCDE8, prLV}, // Lo HANGUL SYLLABLE CWI {0xCDE9, 0xCE03, prLVT}, // Lo [27] HANGUL SYLLABLE CWIG..HANGUL SYLLABLE CWIH {0xCE04, 0xCE04, prLV}, // Lo HANGUL SYLLABLE CYU {0xCE05, 0xCE1F, prLVT}, // Lo [27] HANGUL SYLLABLE CYUG..HANGUL SYLLABLE CYUH {0xCE20, 0xCE20, prLV}, // Lo HANGUL SYLLABLE CEU {0xCE21, 0xCE3B, prLVT}, // Lo [27] HANGUL SYLLABLE CEUG..HANGUL SYLLABLE CEUH {0xCE3C, 0xCE3C, prLV}, // Lo HANGUL SYLLABLE CYI {0xCE3D, 0xCE57, prLVT}, // Lo [27] HANGUL SYLLABLE CYIG..HANGUL SYLLABLE CYIH {0xCE58, 0xCE58, prLV}, // Lo HANGUL SYLLABLE CI {0xCE59, 0xCE73, prLVT}, // Lo [27] HANGUL SYLLABLE CIG..HANGUL SYLLABLE CIH {0xCE74, 0xCE74, prLV}, // Lo HANGUL SYLLABLE KA {0xCE75, 0xCE8F, prLVT}, // Lo [27] HANGUL SYLLABLE KAG..HANGUL SYLLABLE KAH {0xCE90, 0xCE90, prLV}, // Lo HANGUL SYLLABLE KAE {0xCE91, 0xCEAB, prLVT}, // Lo [27] HANGUL SYLLABLE KAEG..HANGUL SYLLABLE KAEH {0xCEAC, 0xCEAC, prLV}, // Lo HANGUL SYLLABLE KYA {0xCEAD, 0xCEC7, prLVT}, // Lo [27] HANGUL SYLLABLE KYAG..HANGUL SYLLABLE KYAH {0xCEC8, 0xCEC8, prLV}, // Lo HANGUL SYLLABLE KYAE {0xCEC9, 0xCEE3, prLVT}, // Lo [27] HANGUL SYLLABLE KYAEG..HANGUL SYLLABLE KYAEH {0xCEE4, 0xCEE4, prLV}, // Lo HANGUL SYLLABLE KEO {0xCEE5, 0xCEFF, prLVT}, // Lo [27] HANGUL SYLLABLE KEOG..HANGUL SYLLABLE KEOH {0xCF00, 0xCF00, prLV}, // Lo HANGUL SYLLABLE KE {0xCF01, 0xCF1B, prLVT}, // Lo [27] HANGUL SYLLABLE KEG..HANGUL SYLLABLE KEH {0xCF1C, 0xCF1C, prLV}, // Lo HANGUL SYLLABLE KYEO {0xCF1D, 0xCF37, prLVT}, // Lo [27] HANGUL SYLLABLE KYEOG..HANGUL SYLLABLE KYEOH {0xCF38, 0xCF38, prLV}, // Lo HANGUL SYLLABLE KYE {0xCF39, 0xCF53, prLVT}, // Lo [27] HANGUL SYLLABLE KYEG..HANGUL SYLLABLE KYEH {0xCF54, 0xCF54, prLV}, // Lo HANGUL SYLLABLE KO {0xCF55, 0xCF6F, prLVT}, // Lo [27] HANGUL SYLLABLE KOG..HANGUL SYLLABLE KOH {0xCF70, 0xCF70, prLV}, // Lo HANGUL SYLLABLE KWA {0xCF71, 0xCF8B, prLVT}, // Lo [27] HANGUL SYLLABLE KWAG..HANGUL SYLLABLE KWAH {0xCF8C, 0xCF8C, prLV}, // Lo HANGUL SYLLABLE KWAE {0xCF8D, 0xCFA7, prLVT}, // Lo [27] HANGUL SYLLABLE KWAEG..HANGUL SYLLABLE KWAEH {0xCFA8, 0xCFA8, prLV}, // Lo HANGUL SYLLABLE KOE {0xCFA9, 0xCFC3, prLVT}, // Lo [27] HANGUL SYLLABLE KOEG..HANGUL SYLLABLE KOEH {0xCFC4, 0xCFC4, prLV}, // Lo HANGUL SYLLABLE KYO {0xCFC5, 0xCFDF, prLVT}, // Lo [27] HANGUL SYLLABLE KYOG..HANGUL SYLLABLE KYOH {0xCFE0, 0xCFE0, prLV}, // Lo HANGUL SYLLABLE KU {0xCFE1, 0xCFFB, prLVT}, // Lo [27] HANGUL SYLLABLE KUG..HANGUL SYLLABLE KUH {0xCFFC, 0xCFFC, prLV}, // Lo HANGUL SYLLABLE KWEO {0xCFFD, 0xD017, prLVT}, // Lo [27] HANGUL SYLLABLE KWEOG..HANGUL SYLLABLE KWEOH {0xD018, 0xD018, prLV}, // Lo HANGUL SYLLABLE KWE {0xD019, 0xD033, prLVT}, // Lo [27] HANGUL SYLLABLE KWEG..HANGUL SYLLABLE KWEH {0xD034, 0xD034, prLV}, // Lo HANGUL SYLLABLE KWI {0xD035, 0xD04F, prLVT}, // Lo [27] HANGUL SYLLABLE KWIG..HANGUL SYLLABLE KWIH {0xD050, 0xD050, prLV}, // Lo HANGUL SYLLABLE KYU {0xD051, 0xD06B, prLVT}, // Lo [27] HANGUL SYLLABLE KYUG..HANGUL SYLLABLE KYUH {0xD06C, 0xD06C, prLV}, // Lo HANGUL SYLLABLE KEU {0xD06D, 0xD087, prLVT}, // Lo [27] HANGUL SYLLABLE KEUG..HANGUL SYLLABLE KEUH {0xD088, 0xD088, prLV}, // Lo HANGUL SYLLABLE KYI {0xD089, 0xD0A3, prLVT}, // Lo [27] HANGUL SYLLABLE KYIG..HANGUL SYLLABLE KYIH {0xD0A4, 0xD0A4, prLV}, // Lo HANGUL SYLLABLE KI {0xD0A5, 0xD0BF, prLVT}, // Lo [27] HANGUL SYLLABLE KIG..HANGUL SYLLABLE KIH {0xD0C0, 0xD0C0, prLV}, // Lo HANGUL SYLLABLE TA {0xD0C1, 0xD0DB, prLVT}, // Lo [27] HANGUL SYLLABLE TAG..HANGUL SYLLABLE TAH {0xD0DC, 0xD0DC, prLV}, // Lo HANGUL SYLLABLE TAE {0xD0DD, 0xD0F7, prLVT}, // Lo [27] HANGUL SYLLABLE TAEG..HANGUL SYLLABLE TAEH {0xD0F8, 0xD0F8, prLV}, // Lo HANGUL SYLLABLE TYA {0xD0F9, 0xD113, prLVT}, // Lo [27] HANGUL SYLLABLE TYAG..HANGUL SYLLABLE TYAH {0xD114, 0xD114, prLV}, // Lo HANGUL SYLLABLE TYAE {0xD115, 0xD12F, prLVT}, // Lo [27] HANGUL SYLLABLE TYAEG..HANGUL SYLLABLE TYAEH {0xD130, 0xD130, prLV}, // Lo HANGUL SYLLABLE TEO {0xD131, 0xD14B, prLVT}, // Lo [27] HANGUL SYLLABLE TEOG..HANGUL SYLLABLE TEOH {0xD14C, 0xD14C, prLV}, // Lo HANGUL SYLLABLE TE {0xD14D, 0xD167, prLVT}, // Lo [27] HANGUL SYLLABLE TEG..HANGUL SYLLABLE TEH {0xD168, 0xD168, prLV}, // Lo HANGUL SYLLABLE TYEO {0xD169, 0xD183, prLVT}, // Lo [27] HANGUL SYLLABLE TYEOG..HANGUL SYLLABLE TYEOH {0xD184, 0xD184, prLV}, // Lo HANGUL SYLLABLE TYE {0xD185, 0xD19F, prLVT}, // Lo [27] HANGUL SYLLABLE TYEG..HANGUL SYLLABLE TYEH {0xD1A0, 0xD1A0, prLV}, // Lo HANGUL SYLLABLE TO {0xD1A1, 0xD1BB, prLVT}, // Lo [27] HANGUL SYLLABLE TOG..HANGUL SYLLABLE TOH {0xD1BC, 0xD1BC, prLV}, // Lo HANGUL SYLLABLE TWA {0xD1BD, 0xD1D7, prLVT}, // Lo [27] HANGUL SYLLABLE TWAG..HANGUL SYLLABLE TWAH {0xD1D8, 0xD1D8, prLV}, // Lo HANGUL SYLLABLE TWAE {0xD1D9, 0xD1F3, prLVT}, // Lo [27] HANGUL SYLLABLE TWAEG..HANGUL SYLLABLE TWAEH {0xD1F4, 0xD1F4, prLV}, // Lo HANGUL SYLLABLE TOE {0xD1F5, 0xD20F, prLVT}, // Lo [27] HANGUL SYLLABLE TOEG..HANGUL SYLLABLE TOEH {0xD210, 0xD210, prLV}, // Lo HANGUL SYLLABLE TYO {0xD211, 0xD22B, prLVT}, // Lo [27] HANGUL SYLLABLE TYOG..HANGUL SYLLABLE TYOH {0xD22C, 0xD22C, prLV}, // Lo HANGUL SYLLABLE TU {0xD22D, 0xD247, prLVT}, // Lo [27] HANGUL SYLLABLE TUG..HANGUL SYLLABLE TUH {0xD248, 0xD248, prLV}, // Lo HANGUL SYLLABLE TWEO {0xD249, 0xD263, prLVT}, // Lo [27] HANGUL SYLLABLE TWEOG..HANGUL SYLLABLE TWEOH {0xD264, 0xD264, prLV}, // Lo HANGUL SYLLABLE TWE {0xD265, 0xD27F, prLVT}, // Lo [27] HANGUL SYLLABLE TWEG..HANGUL SYLLABLE TWEH {0xD280, 0xD280, prLV}, // Lo HANGUL SYLLABLE TWI {0xD281, 0xD29B, prLVT}, // Lo [27] HANGUL SYLLABLE TWIG..HANGUL SYLLABLE TWIH {0xD29C, 0xD29C, prLV}, // Lo HANGUL SYLLABLE TYU {0xD29D, 0xD2B7, prLVT}, // Lo [27] HANGUL SYLLABLE TYUG..HANGUL SYLLABLE TYUH {0xD2B8, 0xD2B8, prLV}, // Lo HANGUL SYLLABLE TEU {0xD2B9, 0xD2D3, prLVT}, // Lo [27] HANGUL SYLLABLE TEUG..HANGUL SYLLABLE TEUH {0xD2D4, 0xD2D4, prLV}, // Lo HANGUL SYLLABLE TYI {0xD2D5, 0xD2EF, prLVT}, // Lo [27] HANGUL SYLLABLE TYIG..HANGUL SYLLABLE TYIH {0xD2F0, 0xD2F0, prLV}, // Lo HANGUL SYLLABLE TI {0xD2F1, 0xD30B, prLVT}, // Lo [27] HANGUL SYLLABLE TIG..HANGUL SYLLABLE TIH {0xD30C, 0xD30C, prLV}, // Lo HANGUL SYLLABLE PA {0xD30D, 0xD327, prLVT}, // Lo [27] HANGUL SYLLABLE PAG..HANGUL SYLLABLE PAH {0xD328, 0xD328, prLV}, // Lo HANGUL SYLLABLE PAE {0xD329, 0xD343, prLVT}, // Lo [27] HANGUL SYLLABLE PAEG..HANGUL SYLLABLE PAEH {0xD344, 0xD344, prLV}, // Lo HANGUL SYLLABLE PYA {0xD345, 0xD35F, prLVT}, // Lo [27] HANGUL SYLLABLE PYAG..HANGUL SYLLABLE PYAH {0xD360, 0xD360, prLV}, // Lo HANGUL SYLLABLE PYAE {0xD361, 0xD37B, prLVT}, // Lo [27] HANGUL SYLLABLE PYAEG..HANGUL SYLLABLE PYAEH {0xD37C, 0xD37C, prLV}, // Lo HANGUL SYLLABLE PEO {0xD37D, 0xD397, prLVT}, // Lo [27] HANGUL SYLLABLE PEOG..HANGUL SYLLABLE PEOH {0xD398, 0xD398, prLV}, // Lo HANGUL SYLLABLE PE {0xD399, 0xD3B3, prLVT}, // Lo [27] HANGUL SYLLABLE PEG..HANGUL SYLLABLE PEH {0xD3B4, 0xD3B4, prLV}, // Lo HANGUL SYLLABLE PYEO {0xD3B5, 0xD3CF, prLVT}, // Lo [27] HANGUL SYLLABLE PYEOG..HANGUL SYLLABLE PYEOH {0xD3D0, 0xD3D0, prLV}, // Lo HANGUL SYLLABLE PYE {0xD3D1, 0xD3EB, prLVT}, // Lo [27] HANGUL SYLLABLE PYEG..HANGUL SYLLABLE PYEH {0xD3EC, 0xD3EC, prLV}, // Lo HANGUL SYLLABLE PO {0xD3ED, 0xD407, prLVT}, // Lo [27] HANGUL SYLLABLE POG..HANGUL SYLLABLE POH {0xD408, 0xD408, prLV}, // Lo HANGUL SYLLABLE PWA {0xD409, 0xD423, prLVT}, // Lo [27] HANGUL SYLLABLE PWAG..HANGUL SYLLABLE PWAH {0xD424, 0xD424, prLV}, // Lo HANGUL SYLLABLE PWAE {0xD425, 0xD43F, prLVT}, // Lo [27] HANGUL SYLLABLE PWAEG..HANGUL SYLLABLE PWAEH {0xD440, 0xD440, prLV}, // Lo HANGUL SYLLABLE POE {0xD441, 0xD45B, prLVT}, // Lo [27] HANGUL SYLLABLE POEG..HANGUL SYLLABLE POEH {0xD45C, 0xD45C, prLV}, // Lo HANGUL SYLLABLE PYO {0xD45D, 0xD477, prLVT}, // Lo [27] HANGUL SYLLABLE PYOG..HANGUL SYLLABLE PYOH {0xD478, 0xD478, prLV}, // Lo HANGUL SYLLABLE PU {0xD479, 0xD493, prLVT}, // Lo [27] HANGUL SYLLABLE PUG..HANGUL SYLLABLE PUH {0xD494, 0xD494, prLV}, // Lo HANGUL SYLLABLE PWEO {0xD495, 0xD4AF, prLVT}, // Lo [27] HANGUL SYLLABLE PWEOG..HANGUL SYLLABLE PWEOH {0xD4B0, 0xD4B0, prLV}, // Lo HANGUL SYLLABLE PWE {0xD4B1, 0xD4CB, prLVT}, // Lo [27] HANGUL SYLLABLE PWEG..HANGUL SYLLABLE PWEH {0xD4CC, 0xD4CC, prLV}, // Lo HANGUL SYLLABLE PWI {0xD4CD, 0xD4E7, prLVT}, // Lo [27] HANGUL SYLLABLE PWIG..HANGUL SYLLABLE PWIH {0xD4E8, 0xD4E8, prLV}, // Lo HANGUL SYLLABLE PYU {0xD4E9, 0xD503, prLVT}, // Lo [27] HANGUL SYLLABLE PYUG..HANGUL SYLLABLE PYUH {0xD504, 0xD504, prLV}, // Lo HANGUL SYLLABLE PEU {0xD505, 0xD51F, prLVT}, // Lo [27] HANGUL SYLLABLE PEUG..HANGUL SYLLABLE PEUH {0xD520, 0xD520, prLV}, // Lo HANGUL SYLLABLE PYI {0xD521, 0xD53B, prLVT}, // Lo [27] HANGUL SYLLABLE PYIG..HANGUL SYLLABLE PYIH {0xD53C, 0xD53C, prLV}, // Lo HANGUL SYLLABLE PI {0xD53D, 0xD557, prLVT}, // Lo [27] HANGUL SYLLABLE PIG..HANGUL SYLLABLE PIH {0xD558, 0xD558, prLV}, // Lo HANGUL SYLLABLE HA {0xD559, 0xD573, prLVT}, // Lo [27] HANGUL SYLLABLE HAG..HANGUL SYLLABLE HAH {0xD574, 0xD574, prLV}, // Lo HANGUL SYLLABLE HAE {0xD575, 0xD58F, prLVT}, // Lo [27] HANGUL SYLLABLE HAEG..HANGUL SYLLABLE HAEH {0xD590, 0xD590, prLV}, // Lo HANGUL SYLLABLE HYA {0xD591, 0xD5AB, prLVT}, // Lo [27] HANGUL SYLLABLE HYAG..HANGUL SYLLABLE HYAH {0xD5AC, 0xD5AC, prLV}, // Lo HANGUL SYLLABLE HYAE {0xD5AD, 0xD5C7, prLVT}, // Lo [27] HANGUL SYLLABLE HYAEG..HANGUL SYLLABLE HYAEH {0xD5C8, 0xD5C8, prLV}, // Lo HANGUL SYLLABLE HEO {0xD5C9, 0xD5E3, prLVT}, // Lo [27] HANGUL SYLLABLE HEOG..HANGUL SYLLABLE HEOH {0xD5E4, 0xD5E4, prLV}, // Lo HANGUL SYLLABLE HE {0xD5E5, 0xD5FF, prLVT}, // Lo [27] HANGUL SYLLABLE HEG..HANGUL SYLLABLE HEH {0xD600, 0xD600, prLV}, // Lo HANGUL SYLLABLE HYEO {0xD601, 0xD61B, prLVT}, // Lo [27] HANGUL SYLLABLE HYEOG..HANGUL SYLLABLE HYEOH {0xD61C, 0xD61C, prLV}, // Lo HANGUL SYLLABLE HYE {0xD61D, 0xD637, prLVT}, // Lo [27] HANGUL SYLLABLE HYEG..HANGUL SYLLABLE HYEH {0xD638, 0xD638, prLV}, // Lo HANGUL SYLLABLE HO {0xD639, 0xD653, prLVT}, // Lo [27] HANGUL SYLLABLE HOG..HANGUL SYLLABLE HOH {0xD654, 0xD654, prLV}, // Lo HANGUL SYLLABLE HWA {0xD655, 0xD66F, prLVT}, // Lo [27] HANGUL SYLLABLE HWAG..HANGUL SYLLABLE HWAH {0xD670, 0xD670, prLV}, // Lo HANGUL SYLLABLE HWAE {0xD671, 0xD68B, prLVT}, // Lo [27] HANGUL SYLLABLE HWAEG..HANGUL SYLLABLE HWAEH {0xD68C, 0xD68C, prLV}, // Lo HANGUL SYLLABLE HOE {0xD68D, 0xD6A7, prLVT}, // Lo [27] HANGUL SYLLABLE HOEG..HANGUL SYLLABLE HOEH {0xD6A8, 0xD6A8, prLV}, // Lo HANGUL SYLLABLE HYO {0xD6A9, 0xD6C3, prLVT}, // Lo [27] HANGUL SYLLABLE HYOG..HANGUL SYLLABLE HYOH {0xD6C4, 0xD6C4, prLV}, // Lo HANGUL SYLLABLE HU {0xD6C5, 0xD6DF, prLVT}, // Lo [27] HANGUL SYLLABLE HUG..HANGUL SYLLABLE HUH {0xD6E0, 0xD6E0, prLV}, // Lo HANGUL SYLLABLE HWEO {0xD6E1, 0xD6FB, prLVT}, // Lo [27] HANGUL SYLLABLE HWEOG..HANGUL SYLLABLE HWEOH {0xD6FC, 0xD6FC, prLV}, // Lo HANGUL SYLLABLE HWE {0xD6FD, 0xD717, prLVT}, // Lo [27] HANGUL SYLLABLE HWEG..HANGUL SYLLABLE HWEH {0xD718, 0xD718, prLV}, // Lo HANGUL SYLLABLE HWI {0xD719, 0xD733, prLVT}, // Lo [27] HANGUL SYLLABLE HWIG..HANGUL SYLLABLE HWIH {0xD734, 0xD734, prLV}, // Lo HANGUL SYLLABLE HYU {0xD735, 0xD74F, prLVT}, // Lo [27] HANGUL SYLLABLE HYUG..HANGUL SYLLABLE HYUH {0xD750, 0xD750, prLV}, // Lo HANGUL SYLLABLE HEU {0xD751, 0xD76B, prLVT}, // Lo [27] HANGUL SYLLABLE HEUG..HANGUL SYLLABLE HEUH {0xD76C, 0xD76C, prLV}, // Lo HANGUL SYLLABLE HYI {0xD76D, 0xD787, prLVT}, // Lo [27] HANGUL SYLLABLE HYIG..HANGUL SYLLABLE HYIH {0xD788, 0xD788, prLV}, // Lo HANGUL SYLLABLE HI {0xD789, 0xD7A3, prLVT}, // Lo [27] HANGUL SYLLABLE HIG..HANGUL SYLLABLE HIH {0xD7B0, 0xD7C6, prV}, // Lo [23] HANGUL JUNGSEONG O-YEO..HANGUL JUNGSEONG ARAEA-E {0xD7CB, 0xD7FB, prT}, // Lo [49] HANGUL JONGSEONG NIEUN-RIEUL..HANGUL JONGSEONG PHIEUPH-THIEUTH {0xFB1E, 0xFB1E, prExtend}, // Mn HEBREW POINT JUDEO-SPANISH VARIKA {0xFE00, 0xFE0F, prExtend}, // Mn [16] VARIATION SELECTOR-1..VARIATION SELECTOR-16 {0xFE20, 0xFE2F, prExtend}, // Mn [16] COMBINING LIGATURE LEFT HALF..COMBINING CYRILLIC TITLO RIGHT HALF {0xFEFF, 0xFEFF, prControl}, // Cf ZERO WIDTH NO-BREAK SPACE {0xFF9E, 0xFF9F, prExtend}, // Lm [2] HALFWIDTH KATAKANA VOICED SOUND MARK..HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK {0xFFF0, 0xFFF8, prControl}, // Cn [9] .. {0xFFF9, 0xFFFB, prControl}, // Cf [3] INTERLINEAR ANNOTATION ANCHOR..INTERLINEAR ANNOTATION TERMINATOR {0x101FD, 0x101FD, prExtend}, // Mn PHAISTOS DISC SIGN COMBINING OBLIQUE STROKE {0x102E0, 0x102E0, prExtend}, // Mn COPTIC EPACT THOUSANDS MARK {0x10376, 0x1037A, prExtend}, // Mn [5] COMBINING OLD PERMIC LETTER AN..COMBINING OLD PERMIC LETTER SII {0x10A01, 0x10A03, prExtend}, // Mn [3] KHAROSHTHI VOWEL SIGN I..KHAROSHTHI VOWEL SIGN VOCALIC R {0x10A05, 0x10A06, prExtend}, // Mn [2] KHAROSHTHI VOWEL SIGN E..KHAROSHTHI VOWEL SIGN O {0x10A0C, 0x10A0F, prExtend}, // Mn [4] KHAROSHTHI VOWEL LENGTH MARK..KHAROSHTHI SIGN VISARGA {0x10A38, 0x10A3A, prExtend}, // Mn [3] KHAROSHTHI SIGN BAR ABOVE..KHAROSHTHI SIGN DOT BELOW {0x10A3F, 0x10A3F, prExtend}, // Mn KHAROSHTHI VIRAMA {0x10AE5, 0x10AE6, prExtend}, // Mn [2] MANICHAEAN ABBREVIATION MARK ABOVE..MANICHAEAN ABBREVIATION MARK BELOW {0x10D24, 0x10D27, prExtend}, // Mn [4] HANIFI ROHINGYA SIGN HARBAHAY..HANIFI ROHINGYA SIGN TASSI {0x10EAB, 0x10EAC, prExtend}, // Mn [2] YEZIDI COMBINING HAMZA MARK..YEZIDI COMBINING MADDA MARK {0x10EFD, 0x10EFF, prExtend}, // Mn [3] ARABIC SMALL LOW WORD SAKTA..ARABIC SMALL LOW WORD MADDA {0x10F46, 0x10F50, prExtend}, // Mn [11] SOGDIAN COMBINING DOT BELOW..SOGDIAN COMBINING STROKE BELOW {0x10F82, 0x10F85, prExtend}, // Mn [4] OLD UYGHUR COMBINING DOT ABOVE..OLD UYGHUR COMBINING TWO DOTS BELOW {0x11000, 0x11000, prSpacingMark}, // Mc BRAHMI SIGN CANDRABINDU {0x11001, 0x11001, prExtend}, // Mn BRAHMI SIGN ANUSVARA {0x11002, 0x11002, prSpacingMark}, // Mc BRAHMI SIGN VISARGA {0x11038, 0x11046, prExtend}, // Mn [15] BRAHMI VOWEL SIGN AA..BRAHMI VIRAMA {0x11070, 0x11070, prExtend}, // Mn BRAHMI SIGN OLD TAMIL VIRAMA {0x11073, 0x11074, prExtend}, // Mn [2] BRAHMI VOWEL SIGN OLD TAMIL SHORT E..BRAHMI VOWEL SIGN OLD TAMIL SHORT O {0x1107F, 0x11081, prExtend}, // Mn [3] BRAHMI NUMBER JOINER..KAITHI SIGN ANUSVARA {0x11082, 0x11082, prSpacingMark}, // Mc KAITHI SIGN VISARGA {0x110B0, 0x110B2, prSpacingMark}, // Mc [3] KAITHI VOWEL SIGN AA..KAITHI VOWEL SIGN II {0x110B3, 0x110B6, prExtend}, // Mn [4] KAITHI VOWEL SIGN U..KAITHI VOWEL SIGN AI {0x110B7, 0x110B8, prSpacingMark}, // Mc [2] KAITHI VOWEL SIGN O..KAITHI VOWEL SIGN AU {0x110B9, 0x110BA, prExtend}, // Mn [2] KAITHI SIGN VIRAMA..KAITHI SIGN NUKTA {0x110BD, 0x110BD, prPrepend}, // Cf KAITHI NUMBER SIGN {0x110C2, 0x110C2, prExtend}, // Mn KAITHI VOWEL SIGN VOCALIC R {0x110CD, 0x110CD, prPrepend}, // Cf KAITHI NUMBER SIGN ABOVE {0x11100, 0x11102, prExtend}, // Mn [3] CHAKMA SIGN CANDRABINDU..CHAKMA SIGN VISARGA {0x11127, 0x1112B, prExtend}, // Mn [5] CHAKMA VOWEL SIGN A..CHAKMA VOWEL SIGN UU {0x1112C, 0x1112C, prSpacingMark}, // Mc CHAKMA VOWEL SIGN E {0x1112D, 0x11134, prExtend}, // Mn [8] CHAKMA VOWEL SIGN AI..CHAKMA MAAYYAA {0x11145, 0x11146, prSpacingMark}, // Mc [2] CHAKMA VOWEL SIGN AA..CHAKMA VOWEL SIGN EI {0x11173, 0x11173, prExtend}, // Mn MAHAJANI SIGN NUKTA {0x11180, 0x11181, prExtend}, // Mn [2] SHARADA SIGN CANDRABINDU..SHARADA SIGN ANUSVARA {0x11182, 0x11182, prSpacingMark}, // Mc SHARADA SIGN VISARGA {0x111B3, 0x111B5, prSpacingMark}, // Mc [3] SHARADA VOWEL SIGN AA..SHARADA VOWEL SIGN II {0x111B6, 0x111BE, prExtend}, // Mn [9] SHARADA VOWEL SIGN U..SHARADA VOWEL SIGN O {0x111BF, 0x111C0, prSpacingMark}, // Mc [2] SHARADA VOWEL SIGN AU..SHARADA SIGN VIRAMA {0x111C2, 0x111C3, prPrepend}, // Lo [2] SHARADA SIGN JIHVAMULIYA..SHARADA SIGN UPADHMANIYA {0x111C9, 0x111CC, prExtend}, // Mn [4] SHARADA SANDHI MARK..SHARADA EXTRA SHORT VOWEL MARK {0x111CE, 0x111CE, prSpacingMark}, // Mc SHARADA VOWEL SIGN PRISHTHAMATRA E {0x111CF, 0x111CF, prExtend}, // Mn SHARADA SIGN INVERTED CANDRABINDU {0x1122C, 0x1122E, prSpacingMark}, // Mc [3] KHOJKI VOWEL SIGN AA..KHOJKI VOWEL SIGN II {0x1122F, 0x11231, prExtend}, // Mn [3] KHOJKI VOWEL SIGN U..KHOJKI VOWEL SIGN AI {0x11232, 0x11233, prSpacingMark}, // Mc [2] KHOJKI VOWEL SIGN O..KHOJKI VOWEL SIGN AU {0x11234, 0x11234, prExtend}, // Mn KHOJKI SIGN ANUSVARA {0x11235, 0x11235, prSpacingMark}, // Mc KHOJKI SIGN VIRAMA {0x11236, 0x11237, prExtend}, // Mn [2] KHOJKI SIGN NUKTA..KHOJKI SIGN SHADDA {0x1123E, 0x1123E, prExtend}, // Mn KHOJKI SIGN SUKUN {0x11241, 0x11241, prExtend}, // Mn KHOJKI VOWEL SIGN VOCALIC R {0x112DF, 0x112DF, prExtend}, // Mn KHUDAWADI SIGN ANUSVARA {0x112E0, 0x112E2, prSpacingMark}, // Mc [3] KHUDAWADI VOWEL SIGN AA..KHUDAWADI VOWEL SIGN II {0x112E3, 0x112EA, prExtend}, // Mn [8] KHUDAWADI VOWEL SIGN U..KHUDAWADI SIGN VIRAMA {0x11300, 0x11301, prExtend}, // Mn [2] GRANTHA SIGN COMBINING ANUSVARA ABOVE..GRANTHA SIGN CANDRABINDU {0x11302, 0x11303, prSpacingMark}, // Mc [2] GRANTHA SIGN ANUSVARA..GRANTHA SIGN VISARGA {0x1133B, 0x1133C, prExtend}, // Mn [2] COMBINING BINDU BELOW..GRANTHA SIGN NUKTA {0x1133E, 0x1133E, prExtend}, // Mc GRANTHA VOWEL SIGN AA {0x1133F, 0x1133F, prSpacingMark}, // Mc GRANTHA VOWEL SIGN I {0x11340, 0x11340, prExtend}, // Mn GRANTHA VOWEL SIGN II {0x11341, 0x11344, prSpacingMark}, // Mc [4] GRANTHA VOWEL SIGN U..GRANTHA VOWEL SIGN VOCALIC RR {0x11347, 0x11348, prSpacingMark}, // Mc [2] GRANTHA VOWEL SIGN EE..GRANTHA VOWEL SIGN AI {0x1134B, 0x1134D, prSpacingMark}, // Mc [3] GRANTHA VOWEL SIGN OO..GRANTHA SIGN VIRAMA {0x11357, 0x11357, prExtend}, // Mc GRANTHA AU LENGTH MARK {0x11362, 0x11363, prSpacingMark}, // Mc [2] GRANTHA VOWEL SIGN VOCALIC L..GRANTHA VOWEL SIGN VOCALIC LL {0x11366, 0x1136C, prExtend}, // Mn [7] COMBINING GRANTHA DIGIT ZERO..COMBINING GRANTHA DIGIT SIX {0x11370, 0x11374, prExtend}, // Mn [5] COMBINING GRANTHA LETTER A..COMBINING GRANTHA LETTER PA {0x11435, 0x11437, prSpacingMark}, // Mc [3] NEWA VOWEL SIGN AA..NEWA VOWEL SIGN II {0x11438, 0x1143F, prExtend}, // Mn [8] NEWA VOWEL SIGN U..NEWA VOWEL SIGN AI {0x11440, 0x11441, prSpacingMark}, // Mc [2] NEWA VOWEL SIGN O..NEWA VOWEL SIGN AU {0x11442, 0x11444, prExtend}, // Mn [3] NEWA SIGN VIRAMA..NEWA SIGN ANUSVARA {0x11445, 0x11445, prSpacingMark}, // Mc NEWA SIGN VISARGA {0x11446, 0x11446, prExtend}, // Mn NEWA SIGN NUKTA {0x1145E, 0x1145E, prExtend}, // Mn NEWA SANDHI MARK {0x114B0, 0x114B0, prExtend}, // Mc TIRHUTA VOWEL SIGN AA {0x114B1, 0x114B2, prSpacingMark}, // Mc [2] TIRHUTA VOWEL SIGN I..TIRHUTA VOWEL SIGN II {0x114B3, 0x114B8, prExtend}, // Mn [6] TIRHUTA VOWEL SIGN U..TIRHUTA VOWEL SIGN VOCALIC LL {0x114B9, 0x114B9, prSpacingMark}, // Mc TIRHUTA VOWEL SIGN E {0x114BA, 0x114BA, prExtend}, // Mn TIRHUTA VOWEL SIGN SHORT E {0x114BB, 0x114BC, prSpacingMark}, // Mc [2] TIRHUTA VOWEL SIGN AI..TIRHUTA VOWEL SIGN O {0x114BD, 0x114BD, prExtend}, // Mc TIRHUTA VOWEL SIGN SHORT O {0x114BE, 0x114BE, prSpacingMark}, // Mc TIRHUTA VOWEL SIGN AU {0x114BF, 0x114C0, prExtend}, // Mn [2] TIRHUTA SIGN CANDRABINDU..TIRHUTA SIGN ANUSVARA {0x114C1, 0x114C1, prSpacingMark}, // Mc TIRHUTA SIGN VISARGA {0x114C2, 0x114C3, prExtend}, // Mn [2] TIRHUTA SIGN VIRAMA..TIRHUTA SIGN NUKTA {0x115AF, 0x115AF, prExtend}, // Mc SIDDHAM VOWEL SIGN AA {0x115B0, 0x115B1, prSpacingMark}, // Mc [2] SIDDHAM VOWEL SIGN I..SIDDHAM VOWEL SIGN II {0x115B2, 0x115B5, prExtend}, // Mn [4] SIDDHAM VOWEL SIGN U..SIDDHAM VOWEL SIGN VOCALIC RR {0x115B8, 0x115BB, prSpacingMark}, // Mc [4] SIDDHAM VOWEL SIGN E..SIDDHAM VOWEL SIGN AU {0x115BC, 0x115BD, prExtend}, // Mn [2] SIDDHAM SIGN CANDRABINDU..SIDDHAM SIGN ANUSVARA {0x115BE, 0x115BE, prSpacingMark}, // Mc SIDDHAM SIGN VISARGA {0x115BF, 0x115C0, prExtend}, // Mn [2] SIDDHAM SIGN VIRAMA..SIDDHAM SIGN NUKTA {0x115DC, 0x115DD, prExtend}, // Mn [2] SIDDHAM VOWEL SIGN ALTERNATE U..SIDDHAM VOWEL SIGN ALTERNATE UU {0x11630, 0x11632, prSpacingMark}, // Mc [3] MODI VOWEL SIGN AA..MODI VOWEL SIGN II {0x11633, 0x1163A, prExtend}, // Mn [8] MODI VOWEL SIGN U..MODI VOWEL SIGN AI {0x1163B, 0x1163C, prSpacingMark}, // Mc [2] MODI VOWEL SIGN O..MODI VOWEL SIGN AU {0x1163D, 0x1163D, prExtend}, // Mn MODI SIGN ANUSVARA {0x1163E, 0x1163E, prSpacingMark}, // Mc MODI SIGN VISARGA {0x1163F, 0x11640, prExtend}, // Mn [2] MODI SIGN VIRAMA..MODI SIGN ARDHACANDRA {0x116AB, 0x116AB, prExtend}, // Mn TAKRI SIGN ANUSVARA {0x116AC, 0x116AC, prSpacingMark}, // Mc TAKRI SIGN VISARGA {0x116AD, 0x116AD, prExtend}, // Mn TAKRI VOWEL SIGN AA {0x116AE, 0x116AF, prSpacingMark}, // Mc [2] TAKRI VOWEL SIGN I..TAKRI VOWEL SIGN II {0x116B0, 0x116B5, prExtend}, // Mn [6] TAKRI VOWEL SIGN U..TAKRI VOWEL SIGN AU {0x116B6, 0x116B6, prSpacingMark}, // Mc TAKRI SIGN VIRAMA {0x116B7, 0x116B7, prExtend}, // Mn TAKRI SIGN NUKTA {0x1171D, 0x1171F, prExtend}, // Mn [3] AHOM CONSONANT SIGN MEDIAL LA..AHOM CONSONANT SIGN MEDIAL LIGATING RA {0x11722, 0x11725, prExtend}, // Mn [4] AHOM VOWEL SIGN I..AHOM VOWEL SIGN UU {0x11726, 0x11726, prSpacingMark}, // Mc AHOM VOWEL SIGN E {0x11727, 0x1172B, prExtend}, // Mn [5] AHOM VOWEL SIGN AW..AHOM SIGN KILLER {0x1182C, 0x1182E, prSpacingMark}, // Mc [3] DOGRA VOWEL SIGN AA..DOGRA VOWEL SIGN II {0x1182F, 0x11837, prExtend}, // Mn [9] DOGRA VOWEL SIGN U..DOGRA SIGN ANUSVARA {0x11838, 0x11838, prSpacingMark}, // Mc DOGRA SIGN VISARGA {0x11839, 0x1183A, prExtend}, // Mn [2] DOGRA SIGN VIRAMA..DOGRA SIGN NUKTA {0x11930, 0x11930, prExtend}, // Mc DIVES AKURU VOWEL SIGN AA {0x11931, 0x11935, prSpacingMark}, // Mc [5] DIVES AKURU VOWEL SIGN I..DIVES AKURU VOWEL SIGN E {0x11937, 0x11938, prSpacingMark}, // Mc [2] DIVES AKURU VOWEL SIGN AI..DIVES AKURU VOWEL SIGN O {0x1193B, 0x1193C, prExtend}, // Mn [2] DIVES AKURU SIGN ANUSVARA..DIVES AKURU SIGN CANDRABINDU {0x1193D, 0x1193D, prSpacingMark}, // Mc DIVES AKURU SIGN HALANTA {0x1193E, 0x1193E, prExtend}, // Mn DIVES AKURU VIRAMA {0x1193F, 0x1193F, prPrepend}, // Lo DIVES AKURU PREFIXED NASAL SIGN {0x11940, 0x11940, prSpacingMark}, // Mc DIVES AKURU MEDIAL YA {0x11941, 0x11941, prPrepend}, // Lo DIVES AKURU INITIAL RA {0x11942, 0x11942, prSpacingMark}, // Mc DIVES AKURU MEDIAL RA {0x11943, 0x11943, prExtend}, // Mn DIVES AKURU SIGN NUKTA {0x119D1, 0x119D3, prSpacingMark}, // Mc [3] NANDINAGARI VOWEL SIGN AA..NANDINAGARI VOWEL SIGN II {0x119D4, 0x119D7, prExtend}, // Mn [4] NANDINAGARI VOWEL SIGN U..NANDINAGARI VOWEL SIGN VOCALIC RR {0x119DA, 0x119DB, prExtend}, // Mn [2] NANDINAGARI VOWEL SIGN E..NANDINAGARI VOWEL SIGN AI {0x119DC, 0x119DF, prSpacingMark}, // Mc [4] NANDINAGARI VOWEL SIGN O..NANDINAGARI SIGN VISARGA {0x119E0, 0x119E0, prExtend}, // Mn NANDINAGARI SIGN VIRAMA {0x119E4, 0x119E4, prSpacingMark}, // Mc NANDINAGARI VOWEL SIGN PRISHTHAMATRA E {0x11A01, 0x11A0A, prExtend}, // Mn [10] ZANABAZAR SQUARE VOWEL SIGN I..ZANABAZAR SQUARE VOWEL LENGTH MARK {0x11A33, 0x11A38, prExtend}, // Mn [6] ZANABAZAR SQUARE FINAL CONSONANT MARK..ZANABAZAR SQUARE SIGN ANUSVARA {0x11A39, 0x11A39, prSpacingMark}, // Mc ZANABAZAR SQUARE SIGN VISARGA {0x11A3A, 0x11A3A, prPrepend}, // Lo ZANABAZAR SQUARE CLUSTER-INITIAL LETTER RA {0x11A3B, 0x11A3E, prExtend}, // Mn [4] ZANABAZAR SQUARE CLUSTER-FINAL LETTER YA..ZANABAZAR SQUARE CLUSTER-FINAL LETTER VA {0x11A47, 0x11A47, prExtend}, // Mn ZANABAZAR SQUARE SUBJOINER {0x11A51, 0x11A56, prExtend}, // Mn [6] SOYOMBO VOWEL SIGN I..SOYOMBO VOWEL SIGN OE {0x11A57, 0x11A58, prSpacingMark}, // Mc [2] SOYOMBO VOWEL SIGN AI..SOYOMBO VOWEL SIGN AU {0x11A59, 0x11A5B, prExtend}, // Mn [3] SOYOMBO VOWEL SIGN VOCALIC R..SOYOMBO VOWEL LENGTH MARK {0x11A84, 0x11A89, prPrepend}, // Lo [6] SOYOMBO SIGN JIHVAMULIYA..SOYOMBO CLUSTER-INITIAL LETTER SA {0x11A8A, 0x11A96, prExtend}, // Mn [13] SOYOMBO FINAL CONSONANT SIGN G..SOYOMBO SIGN ANUSVARA {0x11A97, 0x11A97, prSpacingMark}, // Mc SOYOMBO SIGN VISARGA {0x11A98, 0x11A99, prExtend}, // Mn [2] SOYOMBO GEMINATION MARK..SOYOMBO SUBJOINER {0x11C2F, 0x11C2F, prSpacingMark}, // Mc BHAIKSUKI VOWEL SIGN AA {0x11C30, 0x11C36, prExtend}, // Mn [7] BHAIKSUKI VOWEL SIGN I..BHAIKSUKI VOWEL SIGN VOCALIC L {0x11C38, 0x11C3D, prExtend}, // Mn [6] BHAIKSUKI VOWEL SIGN E..BHAIKSUKI SIGN ANUSVARA {0x11C3E, 0x11C3E, prSpacingMark}, // Mc BHAIKSUKI SIGN VISARGA {0x11C3F, 0x11C3F, prExtend}, // Mn BHAIKSUKI SIGN VIRAMA {0x11C92, 0x11CA7, prExtend}, // Mn [22] MARCHEN SUBJOINED LETTER KA..MARCHEN SUBJOINED LETTER ZA {0x11CA9, 0x11CA9, prSpacingMark}, // Mc MARCHEN SUBJOINED LETTER YA {0x11CAA, 0x11CB0, prExtend}, // Mn [7] MARCHEN SUBJOINED LETTER RA..MARCHEN VOWEL SIGN AA {0x11CB1, 0x11CB1, prSpacingMark}, // Mc MARCHEN VOWEL SIGN I {0x11CB2, 0x11CB3, prExtend}, // Mn [2] MARCHEN VOWEL SIGN U..MARCHEN VOWEL SIGN E {0x11CB4, 0x11CB4, prSpacingMark}, // Mc MARCHEN VOWEL SIGN O {0x11CB5, 0x11CB6, prExtend}, // Mn [2] MARCHEN SIGN ANUSVARA..MARCHEN SIGN CANDRABINDU {0x11D31, 0x11D36, prExtend}, // Mn [6] MASARAM GONDI VOWEL SIGN AA..MASARAM GONDI VOWEL SIGN VOCALIC R {0x11D3A, 0x11D3A, prExtend}, // Mn MASARAM GONDI VOWEL SIGN E {0x11D3C, 0x11D3D, prExtend}, // Mn [2] MASARAM GONDI VOWEL SIGN AI..MASARAM GONDI VOWEL SIGN O {0x11D3F, 0x11D45, prExtend}, // Mn [7] MASARAM GONDI VOWEL SIGN AU..MASARAM GONDI VIRAMA {0x11D46, 0x11D46, prPrepend}, // Lo MASARAM GONDI REPHA {0x11D47, 0x11D47, prExtend}, // Mn MASARAM GONDI RA-KARA {0x11D8A, 0x11D8E, prSpacingMark}, // Mc [5] GUNJALA GONDI VOWEL SIGN AA..GUNJALA GONDI VOWEL SIGN UU {0x11D90, 0x11D91, prExtend}, // Mn [2] GUNJALA GONDI VOWEL SIGN EE..GUNJALA GONDI VOWEL SIGN AI {0x11D93, 0x11D94, prSpacingMark}, // Mc [2] GUNJALA GONDI VOWEL SIGN OO..GUNJALA GONDI VOWEL SIGN AU {0x11D95, 0x11D95, prExtend}, // Mn GUNJALA GONDI SIGN ANUSVARA {0x11D96, 0x11D96, prSpacingMark}, // Mc GUNJALA GONDI SIGN VISARGA {0x11D97, 0x11D97, prExtend}, // Mn GUNJALA GONDI VIRAMA {0x11EF3, 0x11EF4, prExtend}, // Mn [2] MAKASAR VOWEL SIGN I..MAKASAR VOWEL SIGN U {0x11EF5, 0x11EF6, prSpacingMark}, // Mc [2] MAKASAR VOWEL SIGN E..MAKASAR VOWEL SIGN O {0x11F00, 0x11F01, prExtend}, // Mn [2] KAWI SIGN CANDRABINDU..KAWI SIGN ANUSVARA {0x11F02, 0x11F02, prPrepend}, // Lo KAWI SIGN REPHA {0x11F03, 0x11F03, prSpacingMark}, // Mc KAWI SIGN VISARGA {0x11F34, 0x11F35, prSpacingMark}, // Mc [2] KAWI VOWEL SIGN AA..KAWI VOWEL SIGN ALTERNATE AA {0x11F36, 0x11F3A, prExtend}, // Mn [5] KAWI VOWEL SIGN I..KAWI VOWEL SIGN VOCALIC R {0x11F3E, 0x11F3F, prSpacingMark}, // Mc [2] KAWI VOWEL SIGN E..KAWI VOWEL SIGN AI {0x11F40, 0x11F40, prExtend}, // Mn KAWI VOWEL SIGN EU {0x11F41, 0x11F41, prSpacingMark}, // Mc KAWI SIGN KILLER {0x11F42, 0x11F42, prExtend}, // Mn KAWI CONJOINER {0x13430, 0x1343F, prControl}, // Cf [16] EGYPTIAN HIEROGLYPH VERTICAL JOINER..EGYPTIAN HIEROGLYPH END WALLED ENCLOSURE {0x13440, 0x13440, prExtend}, // Mn EGYPTIAN HIEROGLYPH MIRROR HORIZONTALLY {0x13447, 0x13455, prExtend}, // Mn [15] EGYPTIAN HIEROGLYPH MODIFIER DAMAGED AT TOP START..EGYPTIAN HIEROGLYPH MODIFIER DAMAGED {0x16AF0, 0x16AF4, prExtend}, // Mn [5] BASSA VAH COMBINING HIGH TONE..BASSA VAH COMBINING HIGH-LOW TONE {0x16B30, 0x16B36, prExtend}, // Mn [7] PAHAWH HMONG MARK CIM TUB..PAHAWH HMONG MARK CIM TAUM {0x16F4F, 0x16F4F, prExtend}, // Mn MIAO SIGN CONSONANT MODIFIER BAR {0x16F51, 0x16F87, prSpacingMark}, // Mc [55] MIAO SIGN ASPIRATION..MIAO VOWEL SIGN UI {0x16F8F, 0x16F92, prExtend}, // Mn [4] MIAO TONE RIGHT..MIAO TONE BELOW {0x16FE4, 0x16FE4, prExtend}, // Mn KHITAN SMALL SCRIPT FILLER {0x16FF0, 0x16FF1, prSpacingMark}, // Mc [2] VIETNAMESE ALTERNATE READING MARK CA..VIETNAMESE ALTERNATE READING MARK NHAY {0x1BC9D, 0x1BC9E, prExtend}, // Mn [2] DUPLOYAN THICK LETTER SELECTOR..DUPLOYAN DOUBLE MARK {0x1BCA0, 0x1BCA3, prControl}, // Cf [4] SHORTHAND FORMAT LETTER OVERLAP..SHORTHAND FORMAT UP STEP {0x1CF00, 0x1CF2D, prExtend}, // Mn [46] ZNAMENNY COMBINING MARK GORAZDO NIZKO S KRYZHEM ON LEFT..ZNAMENNY COMBINING MARK KRYZH ON LEFT {0x1CF30, 0x1CF46, prExtend}, // Mn [23] ZNAMENNY COMBINING TONAL RANGE MARK MRACHNO..ZNAMENNY PRIZNAK MODIFIER ROG {0x1D165, 0x1D165, prExtend}, // Mc MUSICAL SYMBOL COMBINING STEM {0x1D166, 0x1D166, prSpacingMark}, // Mc MUSICAL SYMBOL COMBINING SPRECHGESANG STEM {0x1D167, 0x1D169, prExtend}, // Mn [3] MUSICAL SYMBOL COMBINING TREMOLO-1..MUSICAL SYMBOL COMBINING TREMOLO-3 {0x1D16D, 0x1D16D, prSpacingMark}, // Mc MUSICAL SYMBOL COMBINING AUGMENTATION DOT {0x1D16E, 0x1D172, prExtend}, // Mc [5] MUSICAL SYMBOL COMBINING FLAG-1..MUSICAL SYMBOL COMBINING FLAG-5 {0x1D173, 0x1D17A, prControl}, // Cf [8] MUSICAL SYMBOL BEGIN BEAM..MUSICAL SYMBOL END PHRASE {0x1D17B, 0x1D182, prExtend}, // Mn [8] MUSICAL SYMBOL COMBINING ACCENT..MUSICAL SYMBOL COMBINING LOURE {0x1D185, 0x1D18B, prExtend}, // Mn [7] MUSICAL SYMBOL COMBINING DOIT..MUSICAL SYMBOL COMBINING TRIPLE TONGUE {0x1D1AA, 0x1D1AD, prExtend}, // Mn [4] MUSICAL SYMBOL COMBINING DOWN BOW..MUSICAL SYMBOL COMBINING SNAP PIZZICATO {0x1D242, 0x1D244, prExtend}, // Mn [3] COMBINING GREEK MUSICAL TRISEME..COMBINING GREEK MUSICAL PENTASEME {0x1DA00, 0x1DA36, prExtend}, // Mn [55] SIGNWRITING HEAD RIM..SIGNWRITING AIR SUCKING IN {0x1DA3B, 0x1DA6C, prExtend}, // Mn [50] SIGNWRITING MOUTH CLOSED NEUTRAL..SIGNWRITING EXCITEMENT {0x1DA75, 0x1DA75, prExtend}, // Mn SIGNWRITING UPPER BODY TILTING FROM HIP JOINTS {0x1DA84, 0x1DA84, prExtend}, // Mn SIGNWRITING LOCATION HEAD NECK {0x1DA9B, 0x1DA9F, prExtend}, // Mn [5] SIGNWRITING FILL MODIFIER-2..SIGNWRITING FILL MODIFIER-6 {0x1DAA1, 0x1DAAF, prExtend}, // Mn [15] SIGNWRITING ROTATION MODIFIER-2..SIGNWRITING ROTATION MODIFIER-16 {0x1E000, 0x1E006, prExtend}, // Mn [7] COMBINING GLAGOLITIC LETTER AZU..COMBINING GLAGOLITIC LETTER ZHIVETE {0x1E008, 0x1E018, prExtend}, // Mn [17] COMBINING GLAGOLITIC LETTER ZEMLJA..COMBINING GLAGOLITIC LETTER HERU {0x1E01B, 0x1E021, prExtend}, // Mn [7] COMBINING GLAGOLITIC LETTER SHTA..COMBINING GLAGOLITIC LETTER YATI {0x1E023, 0x1E024, prExtend}, // Mn [2] COMBINING GLAGOLITIC LETTER YU..COMBINING GLAGOLITIC LETTER SMALL YUS {0x1E026, 0x1E02A, prExtend}, // Mn [5] COMBINING GLAGOLITIC LETTER YO..COMBINING GLAGOLITIC LETTER FITA {0x1E08F, 0x1E08F, prExtend}, // Mn COMBINING CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I {0x1E130, 0x1E136, prExtend}, // Mn [7] NYIAKENG PUACHUE HMONG TONE-B..NYIAKENG PUACHUE HMONG TONE-D {0x1E2AE, 0x1E2AE, prExtend}, // Mn TOTO SIGN RISING TONE {0x1E2EC, 0x1E2EF, prExtend}, // Mn [4] WANCHO TONE TUP..WANCHO TONE KOINI {0x1E4EC, 0x1E4EF, prExtend}, // Mn [4] NAG MUNDARI SIGN MUHOR..NAG MUNDARI SIGN SUTUH {0x1E8D0, 0x1E8D6, prExtend}, // Mn [7] MENDE KIKAKUI COMBINING NUMBER TEENS..MENDE KIKAKUI COMBINING NUMBER MILLIONS {0x1E944, 0x1E94A, prExtend}, // Mn [7] ADLAM ALIF LENGTHENER..ADLAM NUKTA {0x1F000, 0x1F003, prExtendedPictographic}, // E0.0 [4] (🀀..🀃) MAHJONG TILE EAST WIND..MAHJONG TILE NORTH WIND {0x1F004, 0x1F004, prExtendedPictographic}, // E0.6 [1] (🀄) mahjong red dragon {0x1F005, 0x1F0CE, prExtendedPictographic}, // E0.0 [202] (🀅..🃎) MAHJONG TILE GREEN DRAGON..PLAYING CARD KING OF DIAMONDS {0x1F0CF, 0x1F0CF, prExtendedPictographic}, // E0.6 [1] (🃏) joker {0x1F0D0, 0x1F0FF, prExtendedPictographic}, // E0.0 [48] (🃐..🃿) .. {0x1F10D, 0x1F10F, prExtendedPictographic}, // E0.0 [3] (🄍..🄏) CIRCLED ZERO WITH SLASH..CIRCLED DOLLAR SIGN WITH OVERLAID BACKSLASH {0x1F12F, 0x1F12F, prExtendedPictographic}, // E0.0 [1] (🄯) COPYLEFT SYMBOL {0x1F16C, 0x1F16F, prExtendedPictographic}, // E0.0 [4] (🅬..🅯) RAISED MR SIGN..CIRCLED HUMAN FIGURE {0x1F170, 0x1F171, prExtendedPictographic}, // E0.6 [2] (🅰️..🅱️) A button (blood type)..B button (blood type) {0x1F17E, 0x1F17F, prExtendedPictographic}, // E0.6 [2] (🅾️..🅿️) O button (blood type)..P button {0x1F18E, 0x1F18E, prExtendedPictographic}, // E0.6 [1] (🆎) AB button (blood type) {0x1F191, 0x1F19A, prExtendedPictographic}, // E0.6 [10] (🆑..🆚) CL button..VS button {0x1F1AD, 0x1F1E5, prExtendedPictographic}, // E0.0 [57] (🆭..🇥) MASK WORK SYMBOL.. {0x1F1E6, 0x1F1FF, prRegionalIndicator}, // So [26] REGIONAL INDICATOR SYMBOL LETTER A..REGIONAL INDICATOR SYMBOL LETTER Z {0x1F201, 0x1F202, prExtendedPictographic}, // E0.6 [2] (🈁..🈂️) Japanese “here” button..Japanese “service charge” button {0x1F203, 0x1F20F, prExtendedPictographic}, // E0.0 [13] (🈃..🈏) .. {0x1F21A, 0x1F21A, prExtendedPictographic}, // E0.6 [1] (🈚) Japanese “free of charge” button {0x1F22F, 0x1F22F, prExtendedPictographic}, // E0.6 [1] (🈯) Japanese “reserved” button {0x1F232, 0x1F23A, prExtendedPictographic}, // E0.6 [9] (🈲..🈺) Japanese “prohibited” button..Japanese “open for business” button {0x1F23C, 0x1F23F, prExtendedPictographic}, // E0.0 [4] (🈼..🈿) .. {0x1F249, 0x1F24F, prExtendedPictographic}, // E0.0 [7] (🉉..🉏) .. {0x1F250, 0x1F251, prExtendedPictographic}, // E0.6 [2] (🉐..🉑) Japanese “bargain” button..Japanese “acceptable” button {0x1F252, 0x1F2FF, prExtendedPictographic}, // E0.0 [174] (🉒..🋿) .. {0x1F300, 0x1F30C, prExtendedPictographic}, // E0.6 [13] (🌀..🌌) cyclone..milky way {0x1F30D, 0x1F30E, prExtendedPictographic}, // E0.7 [2] (🌍..🌎) globe showing Europe-Africa..globe showing Americas {0x1F30F, 0x1F30F, prExtendedPictographic}, // E0.6 [1] (🌏) globe showing Asia-Australia {0x1F310, 0x1F310, prExtendedPictographic}, // E1.0 [1] (🌐) globe with meridians {0x1F311, 0x1F311, prExtendedPictographic}, // E0.6 [1] (🌑) new moon {0x1F312, 0x1F312, prExtendedPictographic}, // E1.0 [1] (🌒) waxing crescent moon {0x1F313, 0x1F315, prExtendedPictographic}, // E0.6 [3] (🌓..🌕) first quarter moon..full moon {0x1F316, 0x1F318, prExtendedPictographic}, // E1.0 [3] (🌖..🌘) waning gibbous moon..waning crescent moon {0x1F319, 0x1F319, prExtendedPictographic}, // E0.6 [1] (🌙) crescent moon {0x1F31A, 0x1F31A, prExtendedPictographic}, // E1.0 [1] (🌚) new moon face {0x1F31B, 0x1F31B, prExtendedPictographic}, // E0.6 [1] (🌛) first quarter moon face {0x1F31C, 0x1F31C, prExtendedPictographic}, // E0.7 [1] (🌜) last quarter moon face {0x1F31D, 0x1F31E, prExtendedPictographic}, // E1.0 [2] (🌝..🌞) full moon face..sun with face {0x1F31F, 0x1F320, prExtendedPictographic}, // E0.6 [2] (🌟..🌠) glowing star..shooting star {0x1F321, 0x1F321, prExtendedPictographic}, // E0.7 [1] (🌡️) thermometer {0x1F322, 0x1F323, prExtendedPictographic}, // E0.0 [2] (🌢..🌣) BLACK DROPLET..WHITE SUN {0x1F324, 0x1F32C, prExtendedPictographic}, // E0.7 [9] (🌤️..🌬️) sun behind small cloud..wind face {0x1F32D, 0x1F32F, prExtendedPictographic}, // E1.0 [3] (🌭..🌯) hot dog..burrito {0x1F330, 0x1F331, prExtendedPictographic}, // E0.6 [2] (🌰..🌱) chestnut..seedling {0x1F332, 0x1F333, prExtendedPictographic}, // E1.0 [2] (🌲..🌳) evergreen tree..deciduous tree {0x1F334, 0x1F335, prExtendedPictographic}, // E0.6 [2] (🌴..🌵) palm tree..cactus {0x1F336, 0x1F336, prExtendedPictographic}, // E0.7 [1] (🌶️) hot pepper {0x1F337, 0x1F34A, prExtendedPictographic}, // E0.6 [20] (🌷..🍊) tulip..tangerine {0x1F34B, 0x1F34B, prExtendedPictographic}, // E1.0 [1] (🍋) lemon {0x1F34C, 0x1F34F, prExtendedPictographic}, // E0.6 [4] (🍌..🍏) banana..green apple {0x1F350, 0x1F350, prExtendedPictographic}, // E1.0 [1] (🍐) pear {0x1F351, 0x1F37B, prExtendedPictographic}, // E0.6 [43] (🍑..🍻) peach..clinking beer mugs {0x1F37C, 0x1F37C, prExtendedPictographic}, // E1.0 [1] (🍼) baby bottle {0x1F37D, 0x1F37D, prExtendedPictographic}, // E0.7 [1] (🍽️) fork and knife with plate {0x1F37E, 0x1F37F, prExtendedPictographic}, // E1.0 [2] (🍾..🍿) bottle with popping cork..popcorn {0x1F380, 0x1F393, prExtendedPictographic}, // E0.6 [20] (🎀..🎓) ribbon..graduation cap {0x1F394, 0x1F395, prExtendedPictographic}, // E0.0 [2] (🎔..🎕) HEART WITH TIP ON THE LEFT..BOUQUET OF FLOWERS {0x1F396, 0x1F397, prExtendedPictographic}, // E0.7 [2] (🎖️..🎗️) military medal..reminder ribbon {0x1F398, 0x1F398, prExtendedPictographic}, // E0.0 [1] (🎘) MUSICAL KEYBOARD WITH JACKS {0x1F399, 0x1F39B, prExtendedPictographic}, // E0.7 [3] (🎙️..🎛️) studio microphone..control knobs {0x1F39C, 0x1F39D, prExtendedPictographic}, // E0.0 [2] (🎜..🎝) BEAMED ASCENDING MUSICAL NOTES..BEAMED DESCENDING MUSICAL NOTES {0x1F39E, 0x1F39F, prExtendedPictographic}, // E0.7 [2] (🎞️..🎟️) film frames..admission tickets {0x1F3A0, 0x1F3C4, prExtendedPictographic}, // E0.6 [37] (🎠..🏄) carousel horse..person surfing {0x1F3C5, 0x1F3C5, prExtendedPictographic}, // E1.0 [1] (🏅) sports medal {0x1F3C6, 0x1F3C6, prExtendedPictographic}, // E0.6 [1] (🏆) trophy {0x1F3C7, 0x1F3C7, prExtendedPictographic}, // E1.0 [1] (🏇) horse racing {0x1F3C8, 0x1F3C8, prExtendedPictographic}, // E0.6 [1] (🏈) american football {0x1F3C9, 0x1F3C9, prExtendedPictographic}, // E1.0 [1] (🏉) rugby football {0x1F3CA, 0x1F3CA, prExtendedPictographic}, // E0.6 [1] (🏊) person swimming {0x1F3CB, 0x1F3CE, prExtendedPictographic}, // E0.7 [4] (🏋️..🏎️) person lifting weights..racing car {0x1F3CF, 0x1F3D3, prExtendedPictographic}, // E1.0 [5] (🏏..🏓) cricket game..ping pong {0x1F3D4, 0x1F3DF, prExtendedPictographic}, // E0.7 [12] (🏔️..🏟️) snow-capped mountain..stadium {0x1F3E0, 0x1F3E3, prExtendedPictographic}, // E0.6 [4] (🏠..🏣) house..Japanese post office {0x1F3E4, 0x1F3E4, prExtendedPictographic}, // E1.0 [1] (🏤) post office {0x1F3E5, 0x1F3F0, prExtendedPictographic}, // E0.6 [12] (🏥..🏰) hospital..castle {0x1F3F1, 0x1F3F2, prExtendedPictographic}, // E0.0 [2] (🏱..🏲) WHITE PENNANT..BLACK PENNANT {0x1F3F3, 0x1F3F3, prExtendedPictographic}, // E0.7 [1] (🏳️) white flag {0x1F3F4, 0x1F3F4, prExtendedPictographic}, // E1.0 [1] (🏴) black flag {0x1F3F5, 0x1F3F5, prExtendedPictographic}, // E0.7 [1] (🏵️) rosette {0x1F3F6, 0x1F3F6, prExtendedPictographic}, // E0.0 [1] (🏶) BLACK ROSETTE {0x1F3F7, 0x1F3F7, prExtendedPictographic}, // E0.7 [1] (🏷️) label {0x1F3F8, 0x1F3FA, prExtendedPictographic}, // E1.0 [3] (🏸..🏺) badminton..amphora {0x1F3FB, 0x1F3FF, prExtend}, // Sk [5] EMOJI MODIFIER FITZPATRICK TYPE-1-2..EMOJI MODIFIER FITZPATRICK TYPE-6 {0x1F400, 0x1F407, prExtendedPictographic}, // E1.0 [8] (🐀..🐇) rat..rabbit {0x1F408, 0x1F408, prExtendedPictographic}, // E0.7 [1] (🐈) cat {0x1F409, 0x1F40B, prExtendedPictographic}, // E1.0 [3] (🐉..🐋) dragon..whale {0x1F40C, 0x1F40E, prExtendedPictographic}, // E0.6 [3] (🐌..🐎) snail..horse {0x1F40F, 0x1F410, prExtendedPictographic}, // E1.0 [2] (🐏..🐐) ram..goat {0x1F411, 0x1F412, prExtendedPictographic}, // E0.6 [2] (🐑..🐒) ewe..monkey {0x1F413, 0x1F413, prExtendedPictographic}, // E1.0 [1] (🐓) rooster {0x1F414, 0x1F414, prExtendedPictographic}, // E0.6 [1] (🐔) chicken {0x1F415, 0x1F415, prExtendedPictographic}, // E0.7 [1] (🐕) dog {0x1F416, 0x1F416, prExtendedPictographic}, // E1.0 [1] (🐖) pig {0x1F417, 0x1F429, prExtendedPictographic}, // E0.6 [19] (🐗..🐩) boar..poodle {0x1F42A, 0x1F42A, prExtendedPictographic}, // E1.0 [1] (🐪) camel {0x1F42B, 0x1F43E, prExtendedPictographic}, // E0.6 [20] (🐫..🐾) two-hump camel..paw prints {0x1F43F, 0x1F43F, prExtendedPictographic}, // E0.7 [1] (🐿️) chipmunk {0x1F440, 0x1F440, prExtendedPictographic}, // E0.6 [1] (👀) eyes {0x1F441, 0x1F441, prExtendedPictographic}, // E0.7 [1] (👁️) eye {0x1F442, 0x1F464, prExtendedPictographic}, // E0.6 [35] (👂..👤) ear..bust in silhouette {0x1F465, 0x1F465, prExtendedPictographic}, // E1.0 [1] (👥) busts in silhouette {0x1F466, 0x1F46B, prExtendedPictographic}, // E0.6 [6] (👦..👫) boy..woman and man holding hands {0x1F46C, 0x1F46D, prExtendedPictographic}, // E1.0 [2] (👬..👭) men holding hands..women holding hands {0x1F46E, 0x1F4AC, prExtendedPictographic}, // E0.6 [63] (👮..💬) police officer..speech balloon {0x1F4AD, 0x1F4AD, prExtendedPictographic}, // E1.0 [1] (💭) thought balloon {0x1F4AE, 0x1F4B5, prExtendedPictographic}, // E0.6 [8] (💮..💵) white flower..dollar banknote {0x1F4B6, 0x1F4B7, prExtendedPictographic}, // E1.0 [2] (💶..💷) euro banknote..pound banknote {0x1F4B8, 0x1F4EB, prExtendedPictographic}, // E0.6 [52] (💸..📫) money with wings..closed mailbox with raised flag {0x1F4EC, 0x1F4ED, prExtendedPictographic}, // E0.7 [2] (📬..📭) open mailbox with raised flag..open mailbox with lowered flag {0x1F4EE, 0x1F4EE, prExtendedPictographic}, // E0.6 [1] (📮) postbox {0x1F4EF, 0x1F4EF, prExtendedPictographic}, // E1.0 [1] (📯) postal horn {0x1F4F0, 0x1F4F4, prExtendedPictographic}, // E0.6 [5] (📰..📴) newspaper..mobile phone off {0x1F4F5, 0x1F4F5, prExtendedPictographic}, // E1.0 [1] (📵) no mobile phones {0x1F4F6, 0x1F4F7, prExtendedPictographic}, // E0.6 [2] (📶..📷) antenna bars..camera {0x1F4F8, 0x1F4F8, prExtendedPictographic}, // E1.0 [1] (📸) camera with flash {0x1F4F9, 0x1F4FC, prExtendedPictographic}, // E0.6 [4] (📹..📼) video camera..videocassette {0x1F4FD, 0x1F4FD, prExtendedPictographic}, // E0.7 [1] (📽️) film projector {0x1F4FE, 0x1F4FE, prExtendedPictographic}, // E0.0 [1] (📾) PORTABLE STEREO {0x1F4FF, 0x1F502, prExtendedPictographic}, // E1.0 [4] (📿..🔂) prayer beads..repeat single button {0x1F503, 0x1F503, prExtendedPictographic}, // E0.6 [1] (🔃) clockwise vertical arrows {0x1F504, 0x1F507, prExtendedPictographic}, // E1.0 [4] (🔄..🔇) counterclockwise arrows button..muted speaker {0x1F508, 0x1F508, prExtendedPictographic}, // E0.7 [1] (🔈) speaker low volume {0x1F509, 0x1F509, prExtendedPictographic}, // E1.0 [1] (🔉) speaker medium volume {0x1F50A, 0x1F514, prExtendedPictographic}, // E0.6 [11] (🔊..🔔) speaker high volume..bell {0x1F515, 0x1F515, prExtendedPictographic}, // E1.0 [1] (🔕) bell with slash {0x1F516, 0x1F52B, prExtendedPictographic}, // E0.6 [22] (🔖..🔫) bookmark..water pistol {0x1F52C, 0x1F52D, prExtendedPictographic}, // E1.0 [2] (🔬..🔭) microscope..telescope {0x1F52E, 0x1F53D, prExtendedPictographic}, // E0.6 [16] (🔮..🔽) crystal ball..downwards button {0x1F546, 0x1F548, prExtendedPictographic}, // E0.0 [3] (🕆..🕈) WHITE LATIN CROSS..CELTIC CROSS {0x1F549, 0x1F54A, prExtendedPictographic}, // E0.7 [2] (🕉️..🕊️) om..dove {0x1F54B, 0x1F54E, prExtendedPictographic}, // E1.0 [4] (🕋..🕎) kaaba..menorah {0x1F54F, 0x1F54F, prExtendedPictographic}, // E0.0 [1] (🕏) BOWL OF HYGIEIA {0x1F550, 0x1F55B, prExtendedPictographic}, // E0.6 [12] (🕐..🕛) one o’clock..twelve o’clock {0x1F55C, 0x1F567, prExtendedPictographic}, // E0.7 [12] (🕜..🕧) one-thirty..twelve-thirty {0x1F568, 0x1F56E, prExtendedPictographic}, // E0.0 [7] (🕨..🕮) RIGHT SPEAKER..BOOK {0x1F56F, 0x1F570, prExtendedPictographic}, // E0.7 [2] (🕯️..🕰️) candle..mantelpiece clock {0x1F571, 0x1F572, prExtendedPictographic}, // E0.0 [2] (🕱..🕲) BLACK SKULL AND CROSSBONES..NO PIRACY {0x1F573, 0x1F579, prExtendedPictographic}, // E0.7 [7] (🕳️..🕹️) hole..joystick {0x1F57A, 0x1F57A, prExtendedPictographic}, // E3.0 [1] (🕺) man dancing {0x1F57B, 0x1F586, prExtendedPictographic}, // E0.0 [12] (🕻..🖆) LEFT HAND TELEPHONE RECEIVER..PEN OVER STAMPED ENVELOPE {0x1F587, 0x1F587, prExtendedPictographic}, // E0.7 [1] (🖇️) linked paperclips {0x1F588, 0x1F589, prExtendedPictographic}, // E0.0 [2] (🖈..🖉) BLACK PUSHPIN..LOWER LEFT PENCIL {0x1F58A, 0x1F58D, prExtendedPictographic}, // E0.7 [4] (🖊️..🖍️) pen..crayon {0x1F58E, 0x1F58F, prExtendedPictographic}, // E0.0 [2] (🖎..🖏) LEFT WRITING HAND..TURNED OK HAND SIGN {0x1F590, 0x1F590, prExtendedPictographic}, // E0.7 [1] (🖐️) hand with fingers splayed {0x1F591, 0x1F594, prExtendedPictographic}, // E0.0 [4] (🖑..🖔) REVERSED RAISED HAND WITH FINGERS SPLAYED..REVERSED VICTORY HAND {0x1F595, 0x1F596, prExtendedPictographic}, // E1.0 [2] (🖕..🖖) middle finger..vulcan salute {0x1F597, 0x1F5A3, prExtendedPictographic}, // E0.0 [13] (🖗..🖣) WHITE DOWN POINTING LEFT HAND INDEX..BLACK DOWN POINTING BACKHAND INDEX {0x1F5A4, 0x1F5A4, prExtendedPictographic}, // E3.0 [1] (🖤) black heart {0x1F5A5, 0x1F5A5, prExtendedPictographic}, // E0.7 [1] (🖥️) desktop computer {0x1F5A6, 0x1F5A7, prExtendedPictographic}, // E0.0 [2] (🖦..🖧) KEYBOARD AND MOUSE..THREE NETWORKED COMPUTERS {0x1F5A8, 0x1F5A8, prExtendedPictographic}, // E0.7 [1] (🖨️) printer {0x1F5A9, 0x1F5B0, prExtendedPictographic}, // E0.0 [8] (🖩..🖰) POCKET CALCULATOR..TWO BUTTON MOUSE {0x1F5B1, 0x1F5B2, prExtendedPictographic}, // E0.7 [2] (🖱️..🖲️) computer mouse..trackball {0x1F5B3, 0x1F5BB, prExtendedPictographic}, // E0.0 [9] (🖳..🖻) OLD PERSONAL COMPUTER..DOCUMENT WITH PICTURE {0x1F5BC, 0x1F5BC, prExtendedPictographic}, // E0.7 [1] (🖼️) framed picture {0x1F5BD, 0x1F5C1, prExtendedPictographic}, // E0.0 [5] (🖽..🗁) FRAME WITH TILES..OPEN FOLDER {0x1F5C2, 0x1F5C4, prExtendedPictographic}, // E0.7 [3] (🗂️..🗄️) card index dividers..file cabinet {0x1F5C5, 0x1F5D0, prExtendedPictographic}, // E0.0 [12] (🗅..🗐) EMPTY NOTE..PAGES {0x1F5D1, 0x1F5D3, prExtendedPictographic}, // E0.7 [3] (🗑️..🗓️) wastebasket..spiral calendar {0x1F5D4, 0x1F5DB, prExtendedPictographic}, // E0.0 [8] (🗔..🗛) DESKTOP WINDOW..DECREASE FONT SIZE SYMBOL {0x1F5DC, 0x1F5DE, prExtendedPictographic}, // E0.7 [3] (🗜️..🗞️) clamp..rolled-up newspaper {0x1F5DF, 0x1F5E0, prExtendedPictographic}, // E0.0 [2] (🗟..🗠) PAGE WITH CIRCLED TEXT..STOCK CHART {0x1F5E1, 0x1F5E1, prExtendedPictographic}, // E0.7 [1] (🗡️) dagger {0x1F5E2, 0x1F5E2, prExtendedPictographic}, // E0.0 [1] (🗢) LIPS {0x1F5E3, 0x1F5E3, prExtendedPictographic}, // E0.7 [1] (🗣️) speaking head {0x1F5E4, 0x1F5E7, prExtendedPictographic}, // E0.0 [4] (🗤..🗧) THREE RAYS ABOVE..THREE RAYS RIGHT {0x1F5E8, 0x1F5E8, prExtendedPictographic}, // E2.0 [1] (🗨️) left speech bubble {0x1F5E9, 0x1F5EE, prExtendedPictographic}, // E0.0 [6] (🗩..🗮) RIGHT SPEECH BUBBLE..LEFT ANGER BUBBLE {0x1F5EF, 0x1F5EF, prExtendedPictographic}, // E0.7 [1] (🗯️) right anger bubble {0x1F5F0, 0x1F5F2, prExtendedPictographic}, // E0.0 [3] (🗰..🗲) MOOD BUBBLE..LIGHTNING MOOD {0x1F5F3, 0x1F5F3, prExtendedPictographic}, // E0.7 [1] (🗳️) ballot box with ballot {0x1F5F4, 0x1F5F9, prExtendedPictographic}, // E0.0 [6] (🗴..🗹) BALLOT SCRIPT X..BALLOT BOX WITH BOLD CHECK {0x1F5FA, 0x1F5FA, prExtendedPictographic}, // E0.7 [1] (🗺️) world map {0x1F5FB, 0x1F5FF, prExtendedPictographic}, // E0.6 [5] (🗻..🗿) mount fuji..moai {0x1F600, 0x1F600, prExtendedPictographic}, // E1.0 [1] (😀) grinning face {0x1F601, 0x1F606, prExtendedPictographic}, // E0.6 [6] (😁..😆) beaming face with smiling eyes..grinning squinting face {0x1F607, 0x1F608, prExtendedPictographic}, // E1.0 [2] (😇..😈) smiling face with halo..smiling face with horns {0x1F609, 0x1F60D, prExtendedPictographic}, // E0.6 [5] (😉..😍) winking face..smiling face with heart-eyes {0x1F60E, 0x1F60E, prExtendedPictographic}, // E1.0 [1] (😎) smiling face with sunglasses {0x1F60F, 0x1F60F, prExtendedPictographic}, // E0.6 [1] (😏) smirking face {0x1F610, 0x1F610, prExtendedPictographic}, // E0.7 [1] (😐) neutral face {0x1F611, 0x1F611, prExtendedPictographic}, // E1.0 [1] (😑) expressionless face {0x1F612, 0x1F614, prExtendedPictographic}, // E0.6 [3] (😒..😔) unamused face..pensive face {0x1F615, 0x1F615, prExtendedPictographic}, // E1.0 [1] (😕) confused face {0x1F616, 0x1F616, prExtendedPictographic}, // E0.6 [1] (😖) confounded face {0x1F617, 0x1F617, prExtendedPictographic}, // E1.0 [1] (😗) kissing face {0x1F618, 0x1F618, prExtendedPictographic}, // E0.6 [1] (😘) face blowing a kiss {0x1F619, 0x1F619, prExtendedPictographic}, // E1.0 [1] (😙) kissing face with smiling eyes {0x1F61A, 0x1F61A, prExtendedPictographic}, // E0.6 [1] (😚) kissing face with closed eyes {0x1F61B, 0x1F61B, prExtendedPictographic}, // E1.0 [1] (😛) face with tongue {0x1F61C, 0x1F61E, prExtendedPictographic}, // E0.6 [3] (😜..😞) winking face with tongue..disappointed face {0x1F61F, 0x1F61F, prExtendedPictographic}, // E1.0 [1] (😟) worried face {0x1F620, 0x1F625, prExtendedPictographic}, // E0.6 [6] (😠..😥) angry face..sad but relieved face {0x1F626, 0x1F627, prExtendedPictographic}, // E1.0 [2] (😦..😧) frowning face with open mouth..anguished face {0x1F628, 0x1F62B, prExtendedPictographic}, // E0.6 [4] (😨..😫) fearful face..tired face {0x1F62C, 0x1F62C, prExtendedPictographic}, // E1.0 [1] (😬) grimacing face {0x1F62D, 0x1F62D, prExtendedPictographic}, // E0.6 [1] (😭) loudly crying face {0x1F62E, 0x1F62F, prExtendedPictographic}, // E1.0 [2] (😮..😯) face with open mouth..hushed face {0x1F630, 0x1F633, prExtendedPictographic}, // E0.6 [4] (😰..😳) anxious face with sweat..flushed face {0x1F634, 0x1F634, prExtendedPictographic}, // E1.0 [1] (😴) sleeping face {0x1F635, 0x1F635, prExtendedPictographic}, // E0.6 [1] (😵) face with crossed-out eyes {0x1F636, 0x1F636, prExtendedPictographic}, // E1.0 [1] (😶) face without mouth {0x1F637, 0x1F640, prExtendedPictographic}, // E0.6 [10] (😷..🙀) face with medical mask..weary cat {0x1F641, 0x1F644, prExtendedPictographic}, // E1.0 [4] (🙁..🙄) slightly frowning face..face with rolling eyes {0x1F645, 0x1F64F, prExtendedPictographic}, // E0.6 [11] (🙅..🙏) person gesturing NO..folded hands {0x1F680, 0x1F680, prExtendedPictographic}, // E0.6 [1] (🚀) rocket {0x1F681, 0x1F682, prExtendedPictographic}, // E1.0 [2] (🚁..🚂) helicopter..locomotive {0x1F683, 0x1F685, prExtendedPictographic}, // E0.6 [3] (🚃..🚅) railway car..bullet train {0x1F686, 0x1F686, prExtendedPictographic}, // E1.0 [1] (🚆) train {0x1F687, 0x1F687, prExtendedPictographic}, // E0.6 [1] (🚇) metro {0x1F688, 0x1F688, prExtendedPictographic}, // E1.0 [1] (🚈) light rail {0x1F689, 0x1F689, prExtendedPictographic}, // E0.6 [1] (🚉) station {0x1F68A, 0x1F68B, prExtendedPictographic}, // E1.0 [2] (🚊..🚋) tram..tram car {0x1F68C, 0x1F68C, prExtendedPictographic}, // E0.6 [1] (🚌) bus {0x1F68D, 0x1F68D, prExtendedPictographic}, // E0.7 [1] (🚍) oncoming bus {0x1F68E, 0x1F68E, prExtendedPictographic}, // E1.0 [1] (🚎) trolleybus {0x1F68F, 0x1F68F, prExtendedPictographic}, // E0.6 [1] (🚏) bus stop {0x1F690, 0x1F690, prExtendedPictographic}, // E1.0 [1] (🚐) minibus {0x1F691, 0x1F693, prExtendedPictographic}, // E0.6 [3] (🚑..🚓) ambulance..police car {0x1F694, 0x1F694, prExtendedPictographic}, // E0.7 [1] (🚔) oncoming police car {0x1F695, 0x1F695, prExtendedPictographic}, // E0.6 [1] (🚕) taxi {0x1F696, 0x1F696, prExtendedPictographic}, // E1.0 [1] (🚖) oncoming taxi {0x1F697, 0x1F697, prExtendedPictographic}, // E0.6 [1] (🚗) automobile {0x1F698, 0x1F698, prExtendedPictographic}, // E0.7 [1] (🚘) oncoming automobile {0x1F699, 0x1F69A, prExtendedPictographic}, // E0.6 [2] (🚙..🚚) sport utility vehicle..delivery truck {0x1F69B, 0x1F6A1, prExtendedPictographic}, // E1.0 [7] (🚛..🚡) articulated lorry..aerial tramway {0x1F6A2, 0x1F6A2, prExtendedPictographic}, // E0.6 [1] (🚢) ship {0x1F6A3, 0x1F6A3, prExtendedPictographic}, // E1.0 [1] (🚣) person rowing boat {0x1F6A4, 0x1F6A5, prExtendedPictographic}, // E0.6 [2] (🚤..🚥) speedboat..horizontal traffic light {0x1F6A6, 0x1F6A6, prExtendedPictographic}, // E1.0 [1] (🚦) vertical traffic light {0x1F6A7, 0x1F6AD, prExtendedPictographic}, // E0.6 [7] (🚧..🚭) construction..no smoking {0x1F6AE, 0x1F6B1, prExtendedPictographic}, // E1.0 [4] (🚮..🚱) litter in bin sign..non-potable water {0x1F6B2, 0x1F6B2, prExtendedPictographic}, // E0.6 [1] (🚲) bicycle {0x1F6B3, 0x1F6B5, prExtendedPictographic}, // E1.0 [3] (🚳..🚵) no bicycles..person mountain biking {0x1F6B6, 0x1F6B6, prExtendedPictographic}, // E0.6 [1] (🚶) person walking {0x1F6B7, 0x1F6B8, prExtendedPictographic}, // E1.0 [2] (🚷..🚸) no pedestrians..children crossing {0x1F6B9, 0x1F6BE, prExtendedPictographic}, // E0.6 [6] (🚹..🚾) men’s room..water closet {0x1F6BF, 0x1F6BF, prExtendedPictographic}, // E1.0 [1] (🚿) shower {0x1F6C0, 0x1F6C0, prExtendedPictographic}, // E0.6 [1] (🛀) person taking bath {0x1F6C1, 0x1F6C5, prExtendedPictographic}, // E1.0 [5] (🛁..🛅) bathtub..left luggage {0x1F6C6, 0x1F6CA, prExtendedPictographic}, // E0.0 [5] (🛆..🛊) TRIANGLE WITH ROUNDED CORNERS..GIRLS SYMBOL {0x1F6CB, 0x1F6CB, prExtendedPictographic}, // E0.7 [1] (🛋️) couch and lamp {0x1F6CC, 0x1F6CC, prExtendedPictographic}, // E1.0 [1] (🛌) person in bed {0x1F6CD, 0x1F6CF, prExtendedPictographic}, // E0.7 [3] (🛍️..🛏️) shopping bags..bed {0x1F6D0, 0x1F6D0, prExtendedPictographic}, // E1.0 [1] (🛐) place of worship {0x1F6D1, 0x1F6D2, prExtendedPictographic}, // E3.0 [2] (🛑..🛒) stop sign..shopping cart {0x1F6D3, 0x1F6D4, prExtendedPictographic}, // E0.0 [2] (🛓..🛔) STUPA..PAGODA {0x1F6D5, 0x1F6D5, prExtendedPictographic}, // E12.0 [1] (🛕) hindu temple {0x1F6D6, 0x1F6D7, prExtendedPictographic}, // E13.0 [2] (🛖..🛗) hut..elevator {0x1F6D8, 0x1F6DB, prExtendedPictographic}, // E0.0 [4] (🛘..🛛) .. {0x1F6DC, 0x1F6DC, prExtendedPictographic}, // E15.0 [1] (🛜) wireless {0x1F6DD, 0x1F6DF, prExtendedPictographic}, // E14.0 [3] (🛝..🛟) playground slide..ring buoy {0x1F6E0, 0x1F6E5, prExtendedPictographic}, // E0.7 [6] (🛠️..🛥️) hammer and wrench..motor boat {0x1F6E6, 0x1F6E8, prExtendedPictographic}, // E0.0 [3] (🛦..🛨) UP-POINTING MILITARY AIRPLANE..UP-POINTING SMALL AIRPLANE {0x1F6E9, 0x1F6E9, prExtendedPictographic}, // E0.7 [1] (🛩️) small airplane {0x1F6EA, 0x1F6EA, prExtendedPictographic}, // E0.0 [1] (🛪) NORTHEAST-POINTING AIRPLANE {0x1F6EB, 0x1F6EC, prExtendedPictographic}, // E1.0 [2] (🛫..🛬) airplane departure..airplane arrival {0x1F6ED, 0x1F6EF, prExtendedPictographic}, // E0.0 [3] (🛭..🛯) .. {0x1F6F0, 0x1F6F0, prExtendedPictographic}, // E0.7 [1] (🛰️) satellite {0x1F6F1, 0x1F6F2, prExtendedPictographic}, // E0.0 [2] (🛱..🛲) ONCOMING FIRE ENGINE..DIESEL LOCOMOTIVE {0x1F6F3, 0x1F6F3, prExtendedPictographic}, // E0.7 [1] (🛳️) passenger ship {0x1F6F4, 0x1F6F6, prExtendedPictographic}, // E3.0 [3] (🛴..🛶) kick scooter..canoe {0x1F6F7, 0x1F6F8, prExtendedPictographic}, // E5.0 [2] (🛷..🛸) sled..flying saucer {0x1F6F9, 0x1F6F9, prExtendedPictographic}, // E11.0 [1] (🛹) skateboard {0x1F6FA, 0x1F6FA, prExtendedPictographic}, // E12.0 [1] (🛺) auto rickshaw {0x1F6FB, 0x1F6FC, prExtendedPictographic}, // E13.0 [2] (🛻..🛼) pickup truck..roller skate {0x1F6FD, 0x1F6FF, prExtendedPictographic}, // E0.0 [3] (🛽..🛿) .. {0x1F774, 0x1F77F, prExtendedPictographic}, // E0.0 [12] (🝴..🝿) LOT OF FORTUNE..ORCUS {0x1F7D5, 0x1F7DF, prExtendedPictographic}, // E0.0 [11] (🟕..🟟) CIRCLED TRIANGLE.. {0x1F7E0, 0x1F7EB, prExtendedPictographic}, // E12.0 [12] (🟠..🟫) orange circle..brown square {0x1F7EC, 0x1F7EF, prExtendedPictographic}, // E0.0 [4] (🟬..🟯) .. {0x1F7F0, 0x1F7F0, prExtendedPictographic}, // E14.0 [1] (🟰) heavy equals sign {0x1F7F1, 0x1F7FF, prExtendedPictographic}, // E0.0 [15] (🟱..🟿) .. {0x1F80C, 0x1F80F, prExtendedPictographic}, // E0.0 [4] (🠌..🠏) .. {0x1F848, 0x1F84F, prExtendedPictographic}, // E0.0 [8] (🡈..🡏) .. {0x1F85A, 0x1F85F, prExtendedPictographic}, // E0.0 [6] (🡚..🡟) .. {0x1F888, 0x1F88F, prExtendedPictographic}, // E0.0 [8] (🢈..🢏) .. {0x1F8AE, 0x1F8FF, prExtendedPictographic}, // E0.0 [82] (🢮..🣿) .. {0x1F90C, 0x1F90C, prExtendedPictographic}, // E13.0 [1] (🤌) pinched fingers {0x1F90D, 0x1F90F, prExtendedPictographic}, // E12.0 [3] (🤍..🤏) white heart..pinching hand {0x1F910, 0x1F918, prExtendedPictographic}, // E1.0 [9] (🤐..🤘) zipper-mouth face..sign of the horns {0x1F919, 0x1F91E, prExtendedPictographic}, // E3.0 [6] (🤙..🤞) call me hand..crossed fingers {0x1F91F, 0x1F91F, prExtendedPictographic}, // E5.0 [1] (🤟) love-you gesture {0x1F920, 0x1F927, prExtendedPictographic}, // E3.0 [8] (🤠..🤧) cowboy hat face..sneezing face {0x1F928, 0x1F92F, prExtendedPictographic}, // E5.0 [8] (🤨..🤯) face with raised eyebrow..exploding head {0x1F930, 0x1F930, prExtendedPictographic}, // E3.0 [1] (🤰) pregnant woman {0x1F931, 0x1F932, prExtendedPictographic}, // E5.0 [2] (🤱..🤲) breast-feeding..palms up together {0x1F933, 0x1F93A, prExtendedPictographic}, // E3.0 [8] (🤳..🤺) selfie..person fencing {0x1F93C, 0x1F93E, prExtendedPictographic}, // E3.0 [3] (🤼..🤾) people wrestling..person playing handball {0x1F93F, 0x1F93F, prExtendedPictographic}, // E12.0 [1] (🤿) diving mask {0x1F940, 0x1F945, prExtendedPictographic}, // E3.0 [6] (🥀..🥅) wilted flower..goal net {0x1F947, 0x1F94B, prExtendedPictographic}, // E3.0 [5] (🥇..🥋) 1st place medal..martial arts uniform {0x1F94C, 0x1F94C, prExtendedPictographic}, // E5.0 [1] (🥌) curling stone {0x1F94D, 0x1F94F, prExtendedPictographic}, // E11.0 [3] (🥍..🥏) lacrosse..flying disc {0x1F950, 0x1F95E, prExtendedPictographic}, // E3.0 [15] (🥐..🥞) croissant..pancakes {0x1F95F, 0x1F96B, prExtendedPictographic}, // E5.0 [13] (🥟..🥫) dumpling..canned food {0x1F96C, 0x1F970, prExtendedPictographic}, // E11.0 [5] (🥬..🥰) leafy green..smiling face with hearts {0x1F971, 0x1F971, prExtendedPictographic}, // E12.0 [1] (🥱) yawning face {0x1F972, 0x1F972, prExtendedPictographic}, // E13.0 [1] (🥲) smiling face with tear {0x1F973, 0x1F976, prExtendedPictographic}, // E11.0 [4] (🥳..🥶) partying face..cold face {0x1F977, 0x1F978, prExtendedPictographic}, // E13.0 [2] (🥷..🥸) ninja..disguised face {0x1F979, 0x1F979, prExtendedPictographic}, // E14.0 [1] (🥹) face holding back tears {0x1F97A, 0x1F97A, prExtendedPictographic}, // E11.0 [1] (🥺) pleading face {0x1F97B, 0x1F97B, prExtendedPictographic}, // E12.0 [1] (🥻) sari {0x1F97C, 0x1F97F, prExtendedPictographic}, // E11.0 [4] (🥼..🥿) lab coat..flat shoe {0x1F980, 0x1F984, prExtendedPictographic}, // E1.0 [5] (🦀..🦄) crab..unicorn {0x1F985, 0x1F991, prExtendedPictographic}, // E3.0 [13] (🦅..🦑) eagle..squid {0x1F992, 0x1F997, prExtendedPictographic}, // E5.0 [6] (🦒..🦗) giraffe..cricket {0x1F998, 0x1F9A2, prExtendedPictographic}, // E11.0 [11] (🦘..🦢) kangaroo..swan {0x1F9A3, 0x1F9A4, prExtendedPictographic}, // E13.0 [2] (🦣..🦤) mammoth..dodo {0x1F9A5, 0x1F9AA, prExtendedPictographic}, // E12.0 [6] (🦥..🦪) sloth..oyster {0x1F9AB, 0x1F9AD, prExtendedPictographic}, // E13.0 [3] (🦫..🦭) beaver..seal {0x1F9AE, 0x1F9AF, prExtendedPictographic}, // E12.0 [2] (🦮..🦯) guide dog..white cane {0x1F9B0, 0x1F9B9, prExtendedPictographic}, // E11.0 [10] (🦰..🦹) red hair..supervillain {0x1F9BA, 0x1F9BF, prExtendedPictographic}, // E12.0 [6] (🦺..🦿) safety vest..mechanical leg {0x1F9C0, 0x1F9C0, prExtendedPictographic}, // E1.0 [1] (🧀) cheese wedge {0x1F9C1, 0x1F9C2, prExtendedPictographic}, // E11.0 [2] (🧁..🧂) cupcake..salt {0x1F9C3, 0x1F9CA, prExtendedPictographic}, // E12.0 [8] (🧃..🧊) beverage box..ice {0x1F9CB, 0x1F9CB, prExtendedPictographic}, // E13.0 [1] (🧋) bubble tea {0x1F9CC, 0x1F9CC, prExtendedPictographic}, // E14.0 [1] (🧌) troll {0x1F9CD, 0x1F9CF, prExtendedPictographic}, // E12.0 [3] (🧍..🧏) person standing..deaf person {0x1F9D0, 0x1F9E6, prExtendedPictographic}, // E5.0 [23] (🧐..🧦) face with monocle..socks {0x1F9E7, 0x1F9FF, prExtendedPictographic}, // E11.0 [25] (🧧..🧿) red envelope..nazar amulet {0x1FA00, 0x1FA6F, prExtendedPictographic}, // E0.0 [112] (🨀..🩯) NEUTRAL CHESS KING.. {0x1FA70, 0x1FA73, prExtendedPictographic}, // E12.0 [4] (🩰..🩳) ballet shoes..shorts {0x1FA74, 0x1FA74, prExtendedPictographic}, // E13.0 [1] (🩴) thong sandal {0x1FA75, 0x1FA77, prExtendedPictographic}, // E15.0 [3] (🩵..🩷) light blue heart..pink heart {0x1FA78, 0x1FA7A, prExtendedPictographic}, // E12.0 [3] (🩸..🩺) drop of blood..stethoscope {0x1FA7B, 0x1FA7C, prExtendedPictographic}, // E14.0 [2] (🩻..🩼) x-ray..crutch {0x1FA7D, 0x1FA7F, prExtendedPictographic}, // E0.0 [3] (🩽..🩿) .. {0x1FA80, 0x1FA82, prExtendedPictographic}, // E12.0 [3] (🪀..🪂) yo-yo..parachute {0x1FA83, 0x1FA86, prExtendedPictographic}, // E13.0 [4] (🪃..🪆) boomerang..nesting dolls {0x1FA87, 0x1FA88, prExtendedPictographic}, // E15.0 [2] (🪇..🪈) maracas..flute {0x1FA89, 0x1FA8F, prExtendedPictographic}, // E0.0 [7] (🪉..🪏) .. {0x1FA90, 0x1FA95, prExtendedPictographic}, // E12.0 [6] (🪐..🪕) ringed planet..banjo {0x1FA96, 0x1FAA8, prExtendedPictographic}, // E13.0 [19] (🪖..🪨) military helmet..rock {0x1FAA9, 0x1FAAC, prExtendedPictographic}, // E14.0 [4] (🪩..🪬) mirror ball..hamsa {0x1FAAD, 0x1FAAF, prExtendedPictographic}, // E15.0 [3] (🪭..🪯) folding hand fan..khanda {0x1FAB0, 0x1FAB6, prExtendedPictographic}, // E13.0 [7] (🪰..🪶) fly..feather {0x1FAB7, 0x1FABA, prExtendedPictographic}, // E14.0 [4] (🪷..🪺) lotus..nest with eggs {0x1FABB, 0x1FABD, prExtendedPictographic}, // E15.0 [3] (🪻..🪽) hyacinth..wing {0x1FABE, 0x1FABE, prExtendedPictographic}, // E0.0 [1] (🪾) {0x1FABF, 0x1FABF, prExtendedPictographic}, // E15.0 [1] (🪿) goose {0x1FAC0, 0x1FAC2, prExtendedPictographic}, // E13.0 [3] (🫀..🫂) anatomical heart..people hugging {0x1FAC3, 0x1FAC5, prExtendedPictographic}, // E14.0 [3] (🫃..🫅) pregnant man..person with crown {0x1FAC6, 0x1FACD, prExtendedPictographic}, // E0.0 [8] (🫆..🫍) .. {0x1FACE, 0x1FACF, prExtendedPictographic}, // E15.0 [2] (🫎..🫏) moose..donkey {0x1FAD0, 0x1FAD6, prExtendedPictographic}, // E13.0 [7] (🫐..🫖) blueberries..teapot {0x1FAD7, 0x1FAD9, prExtendedPictographic}, // E14.0 [3] (🫗..🫙) pouring liquid..jar {0x1FADA, 0x1FADB, prExtendedPictographic}, // E15.0 [2] (🫚..🫛) ginger root..pea pod {0x1FADC, 0x1FADF, prExtendedPictographic}, // E0.0 [4] (🫜..🫟) .. {0x1FAE0, 0x1FAE7, prExtendedPictographic}, // E14.0 [8] (🫠..🫧) melting face..bubbles {0x1FAE8, 0x1FAE8, prExtendedPictographic}, // E15.0 [1] (🫨) shaking face {0x1FAE9, 0x1FAEF, prExtendedPictographic}, // E0.0 [7] (🫩..🫯) .. {0x1FAF0, 0x1FAF6, prExtendedPictographic}, // E14.0 [7] (🫰..🫶) hand with index finger and thumb crossed..heart hands {0x1FAF7, 0x1FAF8, prExtendedPictographic}, // E15.0 [2] (🫷..🫸) leftwards pushing hand..rightwards pushing hand {0x1FAF9, 0x1FAFF, prExtendedPictographic}, // E0.0 [7] (🫹..🫿) .. {0x1FC00, 0x1FFFD, prExtendedPictographic}, // E0.0[1022] (🰀..🿽) .. {0xE0000, 0xE0000, prControl}, // Cn {0xE0001, 0xE0001, prControl}, // Cf LANGUAGE TAG {0xE0002, 0xE001F, prControl}, // Cn [30] .. {0xE0020, 0xE007F, prExtend}, // Cf [96] TAG SPACE..CANCEL TAG {0xE0080, 0xE00FF, prControl}, // Cn [128] .. {0xE0100, 0xE01EF, prExtend}, // Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR-256 {0xE01F0, 0xE0FFF, prControl}, // Cn [3600] .. } ================================================ FILE: vendor/github.com/rivo/uniseg/graphemerules.go ================================================ package uniseg // The states of the grapheme cluster parser. const ( grAny = iota grCR grControlLF grL grLVV grLVTT grPrepend grExtendedPictographic grExtendedPictographicZWJ grRIOdd grRIEven ) // The grapheme cluster parser's breaking instructions. const ( grNoBoundary = iota grBoundary ) // grTransitions implements the grapheme cluster parser's state transitions. // Maps state and property to a new state, a breaking instruction, and rule // number. The breaking instruction always refers to the boundary between the // last and next code point. Returns negative values if no transition is found. // // This function is used as follows: // // 1. Find specific state + specific property. Stop if found. // 2. Find specific state + any property. // 3. Find any state + specific property. // 4. If only (2) or (3) (but not both) was found, stop. // 5. If both (2) and (3) were found, use state from (3) and breaking instruction // from the transition with the lower rule number, prefer (3) if rule numbers // are equal. Stop. // 6. Assume grAny and grBoundary. // // Unicode version 15.0.0. func grTransitions(state, prop int) (newState int, newProp int, boundary int) { // It turns out that using a big switch statement is much faster than using // a map. switch uint64(state) | uint64(prop)<<32 { // GB5 case grAny | prCR<<32: return grCR, grBoundary, 50 case grAny | prLF<<32: return grControlLF, grBoundary, 50 case grAny | prControl<<32: return grControlLF, grBoundary, 50 // GB4 case grCR | prAny<<32: return grAny, grBoundary, 40 case grControlLF | prAny<<32: return grAny, grBoundary, 40 // GB3 case grCR | prLF<<32: return grControlLF, grNoBoundary, 30 // GB6 case grAny | prL<<32: return grL, grBoundary, 9990 case grL | prL<<32: return grL, grNoBoundary, 60 case grL | prV<<32: return grLVV, grNoBoundary, 60 case grL | prLV<<32: return grLVV, grNoBoundary, 60 case grL | prLVT<<32: return grLVTT, grNoBoundary, 60 // GB7 case grAny | prLV<<32: return grLVV, grBoundary, 9990 case grAny | prV<<32: return grLVV, grBoundary, 9990 case grLVV | prV<<32: return grLVV, grNoBoundary, 70 case grLVV | prT<<32: return grLVTT, grNoBoundary, 70 // GB8 case grAny | prLVT<<32: return grLVTT, grBoundary, 9990 case grAny | prT<<32: return grLVTT, grBoundary, 9990 case grLVTT | prT<<32: return grLVTT, grNoBoundary, 80 // GB9 case grAny | prExtend<<32: return grAny, grNoBoundary, 90 case grAny | prZWJ<<32: return grAny, grNoBoundary, 90 // GB9a case grAny | prSpacingMark<<32: return grAny, grNoBoundary, 91 // GB9b case grAny | prPrepend<<32: return grPrepend, grBoundary, 9990 case grPrepend | prAny<<32: return grAny, grNoBoundary, 92 // GB11 case grAny | prExtendedPictographic<<32: return grExtendedPictographic, grBoundary, 9990 case grExtendedPictographic | prExtend<<32: return grExtendedPictographic, grNoBoundary, 110 case grExtendedPictographic | prZWJ<<32: return grExtendedPictographicZWJ, grNoBoundary, 110 case grExtendedPictographicZWJ | prExtendedPictographic<<32: return grExtendedPictographic, grNoBoundary, 110 // GB12 / GB13 case grAny | prRegionalIndicator<<32: return grRIOdd, grBoundary, 9990 case grRIOdd | prRegionalIndicator<<32: return grRIEven, grNoBoundary, 120 case grRIEven | prRegionalIndicator<<32: return grRIOdd, grBoundary, 120 default: return -1, -1, -1 } } // transitionGraphemeState determines the new state of the grapheme cluster // parser given the current state and the next code point. It also returns the // code point's grapheme property (the value mapped by the [graphemeCodePoints] // table) and whether a cluster boundary was detected. func transitionGraphemeState(state int, r rune) (newState, prop int, boundary bool) { // Determine the property of the next character. prop = propertyGraphemes(r) // Find the applicable transition. nextState, nextProp, _ := grTransitions(state, prop) if nextState >= 0 { // We have a specific transition. We'll use it. return nextState, prop, nextProp == grBoundary } // No specific transition found. Try the less specific ones. anyPropState, anyPropProp, anyPropRule := grTransitions(state, prAny) anyStateState, anyStateProp, anyStateRule := grTransitions(grAny, prop) if anyPropState >= 0 && anyStateState >= 0 { // Both apply. We'll use a mix (see comments for grTransitions). newState = anyStateState boundary = anyStateProp == grBoundary if anyPropRule < anyStateRule { boundary = anyPropProp == grBoundary } return } if anyPropState >= 0 { // We only have a specific state. return anyPropState, prop, anyPropProp == grBoundary // This branch will probably never be reached because okAnyState will // always be true given the current transition map. But we keep it here // for future modifications to the transition map where this may not be // true anymore. } if anyStateState >= 0 { // We only have a specific property. return anyStateState, prop, anyStateProp == grBoundary } // No known transition. GB999: Any ÷ Any. return grAny, prop, true } ================================================ FILE: vendor/github.com/rivo/uniseg/line.go ================================================ package uniseg import "unicode/utf8" // FirstLineSegment returns the prefix of the given byte slice after which a // decision to break the string over to the next line can or must be made, // according to the rules of [Unicode Standard Annex #14]. This is used to // implement line breaking. // // Line breaking, also known as word wrapping, is the process of breaking a // section of text into lines such that it will fit in the available width of a // page, window or other display area. // // The returned "segment" may not be broken into smaller parts, unless no other // breaking opportunities present themselves, in which case you may break by // grapheme clusters (using the [FirstGraphemeCluster] function to determine the // grapheme clusters). // // The "mustBreak" flag indicates whether you MUST break the line after the // given segment (true), for example after newline characters, or you MAY break // the line after the given segment (false). // // This function can be called continuously to extract all non-breaking sub-sets // from a byte slice, as illustrated in the example below. // // If you don't know the current state, for example when calling the function // for the first time, you must pass -1. For consecutive calls, pass the state // and rest slice returned by the previous call. // // The "rest" slice is the sub-slice of the original byte slice "b" starting // after the last byte of the identified line segment. If the length of the // "rest" slice is 0, the entire byte slice "b" has been processed. The // "segment" byte slice is the sub-slice of the input slice containing the // identified line segment. // // Given an empty byte slice "b", the function returns nil values. // // Note that in accordance with [UAX #14 LB3], the final segment will end with // "mustBreak" set to true. You can choose to ignore this by checking if the // length of the "rest" slice is 0 and calling [HasTrailingLineBreak] or // [HasTrailingLineBreakInString] on the last rune. // // Note also that this algorithm may break within grapheme clusters. This is // addressed in Section 8.2 Example 6 of UAX #14. To avoid this, you can use // the [Step] function instead. // // [Unicode Standard Annex #14]: https://www.unicode.org/reports/tr14/ // [UAX #14 LB3]: https://www.unicode.org/reports/tr14/#Algorithm func FirstLineSegment(b []byte, state int) (segment, rest []byte, mustBreak bool, newState int) { // An empty byte slice returns nothing. if len(b) == 0 { return } // Extract the first rune. r, length := utf8.DecodeRune(b) if len(b) <= length { // If we're already past the end, there is nothing else to parse. return b, nil, true, lbAny // LB3. } // If we don't know the state, determine it now. if state < 0 { state, _ = transitionLineBreakState(state, r, b[length:], "") } // Transition until we find a boundary. var boundary int for { r, l := utf8.DecodeRune(b[length:]) state, boundary = transitionLineBreakState(state, r, b[length+l:], "") if boundary != LineDontBreak { return b[:length], b[length:], boundary == LineMustBreak, state } length += l if len(b) <= length { return b, nil, true, lbAny // LB3 } } } // FirstLineSegmentInString is like [FirstLineSegment] but its input and outputs // are strings. func FirstLineSegmentInString(str string, state int) (segment, rest string, mustBreak bool, newState int) { // An empty byte slice returns nothing. if len(str) == 0 { return } // Extract the first rune. r, length := utf8.DecodeRuneInString(str) if len(str) <= length { // If we're already past the end, there is nothing else to parse. return str, "", true, lbAny // LB3. } // If we don't know the state, determine it now. if state < 0 { state, _ = transitionLineBreakState(state, r, nil, str[length:]) } // Transition until we find a boundary. var boundary int for { r, l := utf8.DecodeRuneInString(str[length:]) state, boundary = transitionLineBreakState(state, r, nil, str[length+l:]) if boundary != LineDontBreak { return str[:length], str[length:], boundary == LineMustBreak, state } length += l if len(str) <= length { return str, "", true, lbAny // LB3. } } } // HasTrailingLineBreak returns true if the last rune in the given byte slice is // one of the hard line break code points defined in LB4 and LB5 of [UAX #14]. // // [UAX #14]: https://www.unicode.org/reports/tr14/#Algorithm func HasTrailingLineBreak(b []byte) bool { r, _ := utf8.DecodeLastRune(b) property, _ := propertyLineBreak(r) return property == prBK || property == prCR || property == prLF || property == prNL } // HasTrailingLineBreakInString is like [HasTrailingLineBreak] but for a string. func HasTrailingLineBreakInString(str string) bool { r, _ := utf8.DecodeLastRuneInString(str) property, _ := propertyLineBreak(r) return property == prBK || property == prCR || property == prLF || property == prNL } ================================================ FILE: vendor/github.com/rivo/uniseg/lineproperties.go ================================================ // Code generated via go generate from gen_properties.go. DO NOT EDIT. package uniseg // lineBreakCodePoints are taken from // https://www.unicode.org/Public/15.0.0/ucd/LineBreak.txt // and // https://unicode.org/Public/15.0.0/ucd/emoji/emoji-data.txt // ("Extended_Pictographic" only) // on September 5, 2023. See https://www.unicode.org/license.html for the Unicode // license agreement. var lineBreakCodePoints = [][4]int{ {0x0000, 0x0008, prCM, gcCc}, // [9] .. {0x0009, 0x0009, prBA, gcCc}, // {0x000A, 0x000A, prLF, gcCc}, // {0x000B, 0x000C, prBK, gcCc}, // [2] .. {0x000D, 0x000D, prCR, gcCc}, // {0x000E, 0x001F, prCM, gcCc}, // [18] .. {0x0020, 0x0020, prSP, gcZs}, // SPACE {0x0021, 0x0021, prEX, gcPo}, // EXCLAMATION MARK {0x0022, 0x0022, prQU, gcPo}, // QUOTATION MARK {0x0023, 0x0023, prAL, gcPo}, // NUMBER SIGN {0x0024, 0x0024, prPR, gcSc}, // DOLLAR SIGN {0x0025, 0x0025, prPO, gcPo}, // PERCENT SIGN {0x0026, 0x0026, prAL, gcPo}, // AMPERSAND {0x0027, 0x0027, prQU, gcPo}, // APOSTROPHE {0x0028, 0x0028, prOP, gcPs}, // LEFT PARENTHESIS {0x0029, 0x0029, prCP, gcPe}, // RIGHT PARENTHESIS {0x002A, 0x002A, prAL, gcPo}, // ASTERISK {0x002B, 0x002B, prPR, gcSm}, // PLUS SIGN {0x002C, 0x002C, prIS, gcPo}, // COMMA {0x002D, 0x002D, prHY, gcPd}, // HYPHEN-MINUS {0x002E, 0x002E, prIS, gcPo}, // FULL STOP {0x002F, 0x002F, prSY, gcPo}, // SOLIDUS {0x0030, 0x0039, prNU, gcNd}, // [10] DIGIT ZERO..DIGIT NINE {0x003A, 0x003B, prIS, gcPo}, // [2] COLON..SEMICOLON {0x003C, 0x003E, prAL, gcSm}, // [3] LESS-THAN SIGN..GREATER-THAN SIGN {0x003F, 0x003F, prEX, gcPo}, // QUESTION MARK {0x0040, 0x0040, prAL, gcPo}, // COMMERCIAL AT {0x0041, 0x005A, prAL, gcLu}, // [26] LATIN CAPITAL LETTER A..LATIN CAPITAL LETTER Z {0x005B, 0x005B, prOP, gcPs}, // LEFT SQUARE BRACKET {0x005C, 0x005C, prPR, gcPo}, // REVERSE SOLIDUS {0x005D, 0x005D, prCP, gcPe}, // RIGHT SQUARE BRACKET {0x005E, 0x005E, prAL, gcSk}, // CIRCUMFLEX ACCENT {0x005F, 0x005F, prAL, gcPc}, // LOW LINE {0x0060, 0x0060, prAL, gcSk}, // GRAVE ACCENT {0x0061, 0x007A, prAL, gcLl}, // [26] LATIN SMALL LETTER A..LATIN SMALL LETTER Z {0x007B, 0x007B, prOP, gcPs}, // LEFT CURLY BRACKET {0x007C, 0x007C, prBA, gcSm}, // VERTICAL LINE {0x007D, 0x007D, prCL, gcPe}, // RIGHT CURLY BRACKET {0x007E, 0x007E, prAL, gcSm}, // TILDE {0x007F, 0x007F, prCM, gcCc}, // {0x0080, 0x0084, prCM, gcCc}, // [5] .. {0x0085, 0x0085, prNL, gcCc}, // {0x0086, 0x009F, prCM, gcCc}, // [26] .. {0x00A0, 0x00A0, prGL, gcZs}, // NO-BREAK SPACE {0x00A1, 0x00A1, prOP, gcPo}, // INVERTED EXCLAMATION MARK {0x00A2, 0x00A2, prPO, gcSc}, // CENT SIGN {0x00A3, 0x00A5, prPR, gcSc}, // [3] POUND SIGN..YEN SIGN {0x00A6, 0x00A6, prAL, gcSo}, // BROKEN BAR {0x00A7, 0x00A7, prAI, gcPo}, // SECTION SIGN {0x00A8, 0x00A8, prAI, gcSk}, // DIAERESIS {0x00A9, 0x00A9, prAL, gcSo}, // COPYRIGHT SIGN {0x00AA, 0x00AA, prAI, gcLo}, // FEMININE ORDINAL INDICATOR {0x00AB, 0x00AB, prQU, gcPi}, // LEFT-POINTING DOUBLE ANGLE QUOTATION MARK {0x00AC, 0x00AC, prAL, gcSm}, // NOT SIGN {0x00AD, 0x00AD, prBA, gcCf}, // SOFT HYPHEN {0x00AE, 0x00AE, prAL, gcSo}, // REGISTERED SIGN {0x00AF, 0x00AF, prAL, gcSk}, // MACRON {0x00B0, 0x00B0, prPO, gcSo}, // DEGREE SIGN {0x00B1, 0x00B1, prPR, gcSm}, // PLUS-MINUS SIGN {0x00B2, 0x00B3, prAI, gcNo}, // [2] SUPERSCRIPT TWO..SUPERSCRIPT THREE {0x00B4, 0x00B4, prBB, gcSk}, // ACUTE ACCENT {0x00B5, 0x00B5, prAL, gcLl}, // MICRO SIGN {0x00B6, 0x00B7, prAI, gcPo}, // [2] PILCROW SIGN..MIDDLE DOT {0x00B8, 0x00B8, prAI, gcSk}, // CEDILLA {0x00B9, 0x00B9, prAI, gcNo}, // SUPERSCRIPT ONE {0x00BA, 0x00BA, prAI, gcLo}, // MASCULINE ORDINAL INDICATOR {0x00BB, 0x00BB, prQU, gcPf}, // RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK {0x00BC, 0x00BE, prAI, gcNo}, // [3] VULGAR FRACTION ONE QUARTER..VULGAR FRACTION THREE QUARTERS {0x00BF, 0x00BF, prOP, gcPo}, // INVERTED QUESTION MARK {0x00C0, 0x00D6, prAL, gcLu}, // [23] LATIN CAPITAL LETTER A WITH GRAVE..LATIN CAPITAL LETTER O WITH DIAERESIS {0x00D7, 0x00D7, prAI, gcSm}, // MULTIPLICATION SIGN {0x00D8, 0x00F6, prAL, gcLC}, // [31] LATIN CAPITAL LETTER O WITH STROKE..LATIN SMALL LETTER O WITH DIAERESIS {0x00F7, 0x00F7, prAI, gcSm}, // DIVISION SIGN {0x00F8, 0x00FF, prAL, gcLl}, // [8] LATIN SMALL LETTER O WITH STROKE..LATIN SMALL LETTER Y WITH DIAERESIS {0x0100, 0x017F, prAL, gcLC}, // [128] LATIN CAPITAL LETTER A WITH MACRON..LATIN SMALL LETTER LONG S {0x0180, 0x01BA, prAL, gcLC}, // [59] LATIN SMALL LETTER B WITH STROKE..LATIN SMALL LETTER EZH WITH TAIL {0x01BB, 0x01BB, prAL, gcLo}, // LATIN LETTER TWO WITH STROKE {0x01BC, 0x01BF, prAL, gcLC}, // [4] LATIN CAPITAL LETTER TONE FIVE..LATIN LETTER WYNN {0x01C0, 0x01C3, prAL, gcLo}, // [4] LATIN LETTER DENTAL CLICK..LATIN LETTER RETROFLEX CLICK {0x01C4, 0x024F, prAL, gcLC}, // [140] LATIN CAPITAL LETTER DZ WITH CARON..LATIN SMALL LETTER Y WITH STROKE {0x0250, 0x0293, prAL, gcLl}, // [68] LATIN SMALL LETTER TURNED A..LATIN SMALL LETTER EZH WITH CURL {0x0294, 0x0294, prAL, gcLo}, // LATIN LETTER GLOTTAL STOP {0x0295, 0x02AF, prAL, gcLl}, // [27] LATIN LETTER PHARYNGEAL VOICED FRICATIVE..LATIN SMALL LETTER TURNED H WITH FISHHOOK AND TAIL {0x02B0, 0x02C1, prAL, gcLm}, // [18] MODIFIER LETTER SMALL H..MODIFIER LETTER REVERSED GLOTTAL STOP {0x02C2, 0x02C5, prAL, gcSk}, // [4] MODIFIER LETTER LEFT ARROWHEAD..MODIFIER LETTER DOWN ARROWHEAD {0x02C6, 0x02C6, prAL, gcLm}, // MODIFIER LETTER CIRCUMFLEX ACCENT {0x02C7, 0x02C7, prAI, gcLm}, // CARON {0x02C8, 0x02C8, prBB, gcLm}, // MODIFIER LETTER VERTICAL LINE {0x02C9, 0x02CB, prAI, gcLm}, // [3] MODIFIER LETTER MACRON..MODIFIER LETTER GRAVE ACCENT {0x02CC, 0x02CC, prBB, gcLm}, // MODIFIER LETTER LOW VERTICAL LINE {0x02CD, 0x02CD, prAI, gcLm}, // MODIFIER LETTER LOW MACRON {0x02CE, 0x02CF, prAL, gcLm}, // [2] MODIFIER LETTER LOW GRAVE ACCENT..MODIFIER LETTER LOW ACUTE ACCENT {0x02D0, 0x02D0, prAI, gcLm}, // MODIFIER LETTER TRIANGULAR COLON {0x02D1, 0x02D1, prAL, gcLm}, // MODIFIER LETTER HALF TRIANGULAR COLON {0x02D2, 0x02D7, prAL, gcSk}, // [6] MODIFIER LETTER CENTRED RIGHT HALF RING..MODIFIER LETTER MINUS SIGN {0x02D8, 0x02DB, prAI, gcSk}, // [4] BREVE..OGONEK {0x02DC, 0x02DC, prAL, gcSk}, // SMALL TILDE {0x02DD, 0x02DD, prAI, gcSk}, // DOUBLE ACUTE ACCENT {0x02DE, 0x02DE, prAL, gcSk}, // MODIFIER LETTER RHOTIC HOOK {0x02DF, 0x02DF, prBB, gcSk}, // MODIFIER LETTER CROSS ACCENT {0x02E0, 0x02E4, prAL, gcLm}, // [5] MODIFIER LETTER SMALL GAMMA..MODIFIER LETTER SMALL REVERSED GLOTTAL STOP {0x02E5, 0x02EB, prAL, gcSk}, // [7] MODIFIER LETTER EXTRA-HIGH TONE BAR..MODIFIER LETTER YANG DEPARTING TONE MARK {0x02EC, 0x02EC, prAL, gcLm}, // MODIFIER LETTER VOICING {0x02ED, 0x02ED, prAL, gcSk}, // MODIFIER LETTER UNASPIRATED {0x02EE, 0x02EE, prAL, gcLm}, // MODIFIER LETTER DOUBLE APOSTROPHE {0x02EF, 0x02FF, prAL, gcSk}, // [17] MODIFIER LETTER LOW DOWN ARROWHEAD..MODIFIER LETTER LOW LEFT ARROW {0x0300, 0x034E, prCM, gcMn}, // [79] COMBINING GRAVE ACCENT..COMBINING UPWARDS ARROW BELOW {0x034F, 0x034F, prGL, gcMn}, // COMBINING GRAPHEME JOINER {0x0350, 0x035B, prCM, gcMn}, // [12] COMBINING RIGHT ARROWHEAD ABOVE..COMBINING ZIGZAG ABOVE {0x035C, 0x0362, prGL, gcMn}, // [7] COMBINING DOUBLE BREVE BELOW..COMBINING DOUBLE RIGHTWARDS ARROW BELOW {0x0363, 0x036F, prCM, gcMn}, // [13] COMBINING LATIN SMALL LETTER A..COMBINING LATIN SMALL LETTER X {0x0370, 0x0373, prAL, gcLC}, // [4] GREEK CAPITAL LETTER HETA..GREEK SMALL LETTER ARCHAIC SAMPI {0x0374, 0x0374, prAL, gcLm}, // GREEK NUMERAL SIGN {0x0375, 0x0375, prAL, gcSk}, // GREEK LOWER NUMERAL SIGN {0x0376, 0x0377, prAL, gcLC}, // [2] GREEK CAPITAL LETTER PAMPHYLIAN DIGAMMA..GREEK SMALL LETTER PAMPHYLIAN DIGAMMA {0x037A, 0x037A, prAL, gcLm}, // GREEK YPOGEGRAMMENI {0x037B, 0x037D, prAL, gcLl}, // [3] GREEK SMALL REVERSED LUNATE SIGMA SYMBOL..GREEK SMALL REVERSED DOTTED LUNATE SIGMA SYMBOL {0x037E, 0x037E, prIS, gcPo}, // GREEK QUESTION MARK {0x037F, 0x037F, prAL, gcLu}, // GREEK CAPITAL LETTER YOT {0x0384, 0x0385, prAL, gcSk}, // [2] GREEK TONOS..GREEK DIALYTIKA TONOS {0x0386, 0x0386, prAL, gcLu}, // GREEK CAPITAL LETTER ALPHA WITH TONOS {0x0387, 0x0387, prAL, gcPo}, // GREEK ANO TELEIA {0x0388, 0x038A, prAL, gcLu}, // [3] GREEK CAPITAL LETTER EPSILON WITH TONOS..GREEK CAPITAL LETTER IOTA WITH TONOS {0x038C, 0x038C, prAL, gcLu}, // GREEK CAPITAL LETTER OMICRON WITH TONOS {0x038E, 0x03A1, prAL, gcLC}, // [20] GREEK CAPITAL LETTER UPSILON WITH TONOS..GREEK CAPITAL LETTER RHO {0x03A3, 0x03F5, prAL, gcLC}, // [83] GREEK CAPITAL LETTER SIGMA..GREEK LUNATE EPSILON SYMBOL {0x03F6, 0x03F6, prAL, gcSm}, // GREEK REVERSED LUNATE EPSILON SYMBOL {0x03F7, 0x03FF, prAL, gcLC}, // [9] GREEK CAPITAL LETTER SHO..GREEK CAPITAL REVERSED DOTTED LUNATE SIGMA SYMBOL {0x0400, 0x0481, prAL, gcLC}, // [130] CYRILLIC CAPITAL LETTER IE WITH GRAVE..CYRILLIC SMALL LETTER KOPPA {0x0482, 0x0482, prAL, gcSo}, // CYRILLIC THOUSANDS SIGN {0x0483, 0x0487, prCM, gcMn}, // [5] COMBINING CYRILLIC TITLO..COMBINING CYRILLIC POKRYTIE {0x0488, 0x0489, prCM, gcMe}, // [2] COMBINING CYRILLIC HUNDRED THOUSANDS SIGN..COMBINING CYRILLIC MILLIONS SIGN {0x048A, 0x04FF, prAL, gcLC}, // [118] CYRILLIC CAPITAL LETTER SHORT I WITH TAIL..CYRILLIC SMALL LETTER HA WITH STROKE {0x0500, 0x052F, prAL, gcLC}, // [48] CYRILLIC CAPITAL LETTER KOMI DE..CYRILLIC SMALL LETTER EL WITH DESCENDER {0x0531, 0x0556, prAL, gcLu}, // [38] ARMENIAN CAPITAL LETTER AYB..ARMENIAN CAPITAL LETTER FEH {0x0559, 0x0559, prAL, gcLm}, // ARMENIAN MODIFIER LETTER LEFT HALF RING {0x055A, 0x055F, prAL, gcPo}, // [6] ARMENIAN APOSTROPHE..ARMENIAN ABBREVIATION MARK {0x0560, 0x0588, prAL, gcLl}, // [41] ARMENIAN SMALL LETTER TURNED AYB..ARMENIAN SMALL LETTER YI WITH STROKE {0x0589, 0x0589, prIS, gcPo}, // ARMENIAN FULL STOP {0x058A, 0x058A, prBA, gcPd}, // ARMENIAN HYPHEN {0x058D, 0x058E, prAL, gcSo}, // [2] RIGHT-FACING ARMENIAN ETERNITY SIGN..LEFT-FACING ARMENIAN ETERNITY SIGN {0x058F, 0x058F, prPR, gcSc}, // ARMENIAN DRAM SIGN {0x0591, 0x05BD, prCM, gcMn}, // [45] HEBREW ACCENT ETNAHTA..HEBREW POINT METEG {0x05BE, 0x05BE, prBA, gcPd}, // HEBREW PUNCTUATION MAQAF {0x05BF, 0x05BF, prCM, gcMn}, // HEBREW POINT RAFE {0x05C0, 0x05C0, prAL, gcPo}, // HEBREW PUNCTUATION PASEQ {0x05C1, 0x05C2, prCM, gcMn}, // [2] HEBREW POINT SHIN DOT..HEBREW POINT SIN DOT {0x05C3, 0x05C3, prAL, gcPo}, // HEBREW PUNCTUATION SOF PASUQ {0x05C4, 0x05C5, prCM, gcMn}, // [2] HEBREW MARK UPPER DOT..HEBREW MARK LOWER DOT {0x05C6, 0x05C6, prEX, gcPo}, // HEBREW PUNCTUATION NUN HAFUKHA {0x05C7, 0x05C7, prCM, gcMn}, // HEBREW POINT QAMATS QATAN {0x05D0, 0x05EA, prHL, gcLo}, // [27] HEBREW LETTER ALEF..HEBREW LETTER TAV {0x05EF, 0x05F2, prHL, gcLo}, // [4] HEBREW YOD TRIANGLE..HEBREW LIGATURE YIDDISH DOUBLE YOD {0x05F3, 0x05F4, prAL, gcPo}, // [2] HEBREW PUNCTUATION GERESH..HEBREW PUNCTUATION GERSHAYIM {0x0600, 0x0605, prAL, gcCf}, // [6] ARABIC NUMBER SIGN..ARABIC NUMBER MARK ABOVE {0x0606, 0x0608, prAL, gcSm}, // [3] ARABIC-INDIC CUBE ROOT..ARABIC RAY {0x0609, 0x060A, prPO, gcPo}, // [2] ARABIC-INDIC PER MILLE SIGN..ARABIC-INDIC PER TEN THOUSAND SIGN {0x060B, 0x060B, prPO, gcSc}, // AFGHANI SIGN {0x060C, 0x060D, prIS, gcPo}, // [2] ARABIC COMMA..ARABIC DATE SEPARATOR {0x060E, 0x060F, prAL, gcSo}, // [2] ARABIC POETIC VERSE SIGN..ARABIC SIGN MISRA {0x0610, 0x061A, prCM, gcMn}, // [11] ARABIC SIGN SALLALLAHOU ALAYHE WASSALLAM..ARABIC SMALL KASRA {0x061B, 0x061B, prEX, gcPo}, // ARABIC SEMICOLON {0x061C, 0x061C, prCM, gcCf}, // ARABIC LETTER MARK {0x061D, 0x061F, prEX, gcPo}, // [3] ARABIC END OF TEXT MARK..ARABIC QUESTION MARK {0x0620, 0x063F, prAL, gcLo}, // [32] ARABIC LETTER KASHMIRI YEH..ARABIC LETTER FARSI YEH WITH THREE DOTS ABOVE {0x0640, 0x0640, prAL, gcLm}, // ARABIC TATWEEL {0x0641, 0x064A, prAL, gcLo}, // [10] ARABIC LETTER FEH..ARABIC LETTER YEH {0x064B, 0x065F, prCM, gcMn}, // [21] ARABIC FATHATAN..ARABIC WAVY HAMZA BELOW {0x0660, 0x0669, prNU, gcNd}, // [10] ARABIC-INDIC DIGIT ZERO..ARABIC-INDIC DIGIT NINE {0x066A, 0x066A, prPO, gcPo}, // ARABIC PERCENT SIGN {0x066B, 0x066C, prNU, gcPo}, // [2] ARABIC DECIMAL SEPARATOR..ARABIC THOUSANDS SEPARATOR {0x066D, 0x066D, prAL, gcPo}, // ARABIC FIVE POINTED STAR {0x066E, 0x066F, prAL, gcLo}, // [2] ARABIC LETTER DOTLESS BEH..ARABIC LETTER DOTLESS QAF {0x0670, 0x0670, prCM, gcMn}, // ARABIC LETTER SUPERSCRIPT ALEF {0x0671, 0x06D3, prAL, gcLo}, // [99] ARABIC LETTER ALEF WASLA..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE {0x06D4, 0x06D4, prEX, gcPo}, // ARABIC FULL STOP {0x06D5, 0x06D5, prAL, gcLo}, // ARABIC LETTER AE {0x06D6, 0x06DC, prCM, gcMn}, // [7] ARABIC SMALL HIGH LIGATURE SAD WITH LAM WITH ALEF MAKSURA..ARABIC SMALL HIGH SEEN {0x06DD, 0x06DD, prAL, gcCf}, // ARABIC END OF AYAH {0x06DE, 0x06DE, prAL, gcSo}, // ARABIC START OF RUB EL HIZB {0x06DF, 0x06E4, prCM, gcMn}, // [6] ARABIC SMALL HIGH ROUNDED ZERO..ARABIC SMALL HIGH MADDA {0x06E5, 0x06E6, prAL, gcLm}, // [2] ARABIC SMALL WAW..ARABIC SMALL YEH {0x06E7, 0x06E8, prCM, gcMn}, // [2] ARABIC SMALL HIGH YEH..ARABIC SMALL HIGH NOON {0x06E9, 0x06E9, prAL, gcSo}, // ARABIC PLACE OF SAJDAH {0x06EA, 0x06ED, prCM, gcMn}, // [4] ARABIC EMPTY CENTRE LOW STOP..ARABIC SMALL LOW MEEM {0x06EE, 0x06EF, prAL, gcLo}, // [2] ARABIC LETTER DAL WITH INVERTED V..ARABIC LETTER REH WITH INVERTED V {0x06F0, 0x06F9, prNU, gcNd}, // [10] EXTENDED ARABIC-INDIC DIGIT ZERO..EXTENDED ARABIC-INDIC DIGIT NINE {0x06FA, 0x06FC, prAL, gcLo}, // [3] ARABIC LETTER SHEEN WITH DOT BELOW..ARABIC LETTER GHAIN WITH DOT BELOW {0x06FD, 0x06FE, prAL, gcSo}, // [2] ARABIC SIGN SINDHI AMPERSAND..ARABIC SIGN SINDHI POSTPOSITION MEN {0x06FF, 0x06FF, prAL, gcLo}, // ARABIC LETTER HEH WITH INVERTED V {0x0700, 0x070D, prAL, gcPo}, // [14] SYRIAC END OF PARAGRAPH..SYRIAC HARKLEAN ASTERISCUS {0x070F, 0x070F, prAL, gcCf}, // SYRIAC ABBREVIATION MARK {0x0710, 0x0710, prAL, gcLo}, // SYRIAC LETTER ALAPH {0x0711, 0x0711, prCM, gcMn}, // SYRIAC LETTER SUPERSCRIPT ALAPH {0x0712, 0x072F, prAL, gcLo}, // [30] SYRIAC LETTER BETH..SYRIAC LETTER PERSIAN DHALATH {0x0730, 0x074A, prCM, gcMn}, // [27] SYRIAC PTHAHA ABOVE..SYRIAC BARREKH {0x074D, 0x074F, prAL, gcLo}, // [3] SYRIAC LETTER SOGDIAN ZHAIN..SYRIAC LETTER SOGDIAN FE {0x0750, 0x077F, prAL, gcLo}, // [48] ARABIC LETTER BEH WITH THREE DOTS HORIZONTALLY BELOW..ARABIC LETTER KAF WITH TWO DOTS ABOVE {0x0780, 0x07A5, prAL, gcLo}, // [38] THAANA LETTER HAA..THAANA LETTER WAAVU {0x07A6, 0x07B0, prCM, gcMn}, // [11] THAANA ABAFILI..THAANA SUKUN {0x07B1, 0x07B1, prAL, gcLo}, // THAANA LETTER NAA {0x07C0, 0x07C9, prNU, gcNd}, // [10] NKO DIGIT ZERO..NKO DIGIT NINE {0x07CA, 0x07EA, prAL, gcLo}, // [33] NKO LETTER A..NKO LETTER JONA RA {0x07EB, 0x07F3, prCM, gcMn}, // [9] NKO COMBINING SHORT HIGH TONE..NKO COMBINING DOUBLE DOT ABOVE {0x07F4, 0x07F5, prAL, gcLm}, // [2] NKO HIGH TONE APOSTROPHE..NKO LOW TONE APOSTROPHE {0x07F6, 0x07F6, prAL, gcSo}, // NKO SYMBOL OO DENNEN {0x07F7, 0x07F7, prAL, gcPo}, // NKO SYMBOL GBAKURUNEN {0x07F8, 0x07F8, prIS, gcPo}, // NKO COMMA {0x07F9, 0x07F9, prEX, gcPo}, // NKO EXCLAMATION MARK {0x07FA, 0x07FA, prAL, gcLm}, // NKO LAJANYALAN {0x07FD, 0x07FD, prCM, gcMn}, // NKO DANTAYALAN {0x07FE, 0x07FF, prPR, gcSc}, // [2] NKO DOROME SIGN..NKO TAMAN SIGN {0x0800, 0x0815, prAL, gcLo}, // [22] SAMARITAN LETTER ALAF..SAMARITAN LETTER TAAF {0x0816, 0x0819, prCM, gcMn}, // [4] SAMARITAN MARK IN..SAMARITAN MARK DAGESH {0x081A, 0x081A, prAL, gcLm}, // SAMARITAN MODIFIER LETTER EPENTHETIC YUT {0x081B, 0x0823, prCM, gcMn}, // [9] SAMARITAN MARK EPENTHETIC YUT..SAMARITAN VOWEL SIGN A {0x0824, 0x0824, prAL, gcLm}, // SAMARITAN MODIFIER LETTER SHORT A {0x0825, 0x0827, prCM, gcMn}, // [3] SAMARITAN VOWEL SIGN SHORT A..SAMARITAN VOWEL SIGN U {0x0828, 0x0828, prAL, gcLm}, // SAMARITAN MODIFIER LETTER I {0x0829, 0x082D, prCM, gcMn}, // [5] SAMARITAN VOWEL SIGN LONG I..SAMARITAN MARK NEQUDAA {0x0830, 0x083E, prAL, gcPo}, // [15] SAMARITAN PUNCTUATION NEQUDAA..SAMARITAN PUNCTUATION ANNAAU {0x0840, 0x0858, prAL, gcLo}, // [25] MANDAIC LETTER HALQA..MANDAIC LETTER AIN {0x0859, 0x085B, prCM, gcMn}, // [3] MANDAIC AFFRICATION MARK..MANDAIC GEMINATION MARK {0x085E, 0x085E, prAL, gcPo}, // MANDAIC PUNCTUATION {0x0860, 0x086A, prAL, gcLo}, // [11] SYRIAC LETTER MALAYALAM NGA..SYRIAC LETTER MALAYALAM SSA {0x0870, 0x0887, prAL, gcLo}, // [24] ARABIC LETTER ALEF WITH ATTACHED FATHA..ARABIC BASELINE ROUND DOT {0x0888, 0x0888, prAL, gcSk}, // ARABIC RAISED ROUND DOT {0x0889, 0x088E, prAL, gcLo}, // [6] ARABIC LETTER NOON WITH INVERTED SMALL V..ARABIC VERTICAL TAIL {0x0890, 0x0891, prAL, gcCf}, // [2] ARABIC POUND MARK ABOVE..ARABIC PIASTRE MARK ABOVE {0x0898, 0x089F, prCM, gcMn}, // [8] ARABIC SMALL HIGH WORD AL-JUZ..ARABIC HALF MADDA OVER MADDA {0x08A0, 0x08C8, prAL, gcLo}, // [41] ARABIC LETTER BEH WITH SMALL V BELOW..ARABIC LETTER GRAF {0x08C9, 0x08C9, prAL, gcLm}, // ARABIC SMALL FARSI YEH {0x08CA, 0x08E1, prCM, gcMn}, // [24] ARABIC SMALL HIGH FARSI YEH..ARABIC SMALL HIGH SIGN SAFHA {0x08E2, 0x08E2, prAL, gcCf}, // ARABIC DISPUTED END OF AYAH {0x08E3, 0x08FF, prCM, gcMn}, // [29] ARABIC TURNED DAMMA BELOW..ARABIC MARK SIDEWAYS NOON GHUNNA {0x0900, 0x0902, prCM, gcMn}, // [3] DEVANAGARI SIGN INVERTED CANDRABINDU..DEVANAGARI SIGN ANUSVARA {0x0903, 0x0903, prCM, gcMc}, // DEVANAGARI SIGN VISARGA {0x0904, 0x0939, prAL, gcLo}, // [54] DEVANAGARI LETTER SHORT A..DEVANAGARI LETTER HA {0x093A, 0x093A, prCM, gcMn}, // DEVANAGARI VOWEL SIGN OE {0x093B, 0x093B, prCM, gcMc}, // DEVANAGARI VOWEL SIGN OOE {0x093C, 0x093C, prCM, gcMn}, // DEVANAGARI SIGN NUKTA {0x093D, 0x093D, prAL, gcLo}, // DEVANAGARI SIGN AVAGRAHA {0x093E, 0x0940, prCM, gcMc}, // [3] DEVANAGARI VOWEL SIGN AA..DEVANAGARI VOWEL SIGN II {0x0941, 0x0948, prCM, gcMn}, // [8] DEVANAGARI VOWEL SIGN U..DEVANAGARI VOWEL SIGN AI {0x0949, 0x094C, prCM, gcMc}, // [4] DEVANAGARI VOWEL SIGN CANDRA O..DEVANAGARI VOWEL SIGN AU {0x094D, 0x094D, prCM, gcMn}, // DEVANAGARI SIGN VIRAMA {0x094E, 0x094F, prCM, gcMc}, // [2] DEVANAGARI VOWEL SIGN PRISHTHAMATRA E..DEVANAGARI VOWEL SIGN AW {0x0950, 0x0950, prAL, gcLo}, // DEVANAGARI OM {0x0951, 0x0957, prCM, gcMn}, // [7] DEVANAGARI STRESS SIGN UDATTA..DEVANAGARI VOWEL SIGN UUE {0x0958, 0x0961, prAL, gcLo}, // [10] DEVANAGARI LETTER QA..DEVANAGARI LETTER VOCALIC LL {0x0962, 0x0963, prCM, gcMn}, // [2] DEVANAGARI VOWEL SIGN VOCALIC L..DEVANAGARI VOWEL SIGN VOCALIC LL {0x0964, 0x0965, prBA, gcPo}, // [2] DEVANAGARI DANDA..DEVANAGARI DOUBLE DANDA {0x0966, 0x096F, prNU, gcNd}, // [10] DEVANAGARI DIGIT ZERO..DEVANAGARI DIGIT NINE {0x0970, 0x0970, prAL, gcPo}, // DEVANAGARI ABBREVIATION SIGN {0x0971, 0x0971, prAL, gcLm}, // DEVANAGARI SIGN HIGH SPACING DOT {0x0972, 0x097F, prAL, gcLo}, // [14] DEVANAGARI LETTER CANDRA A..DEVANAGARI LETTER BBA {0x0980, 0x0980, prAL, gcLo}, // BENGALI ANJI {0x0981, 0x0981, prCM, gcMn}, // BENGALI SIGN CANDRABINDU {0x0982, 0x0983, prCM, gcMc}, // [2] BENGALI SIGN ANUSVARA..BENGALI SIGN VISARGA {0x0985, 0x098C, prAL, gcLo}, // [8] BENGALI LETTER A..BENGALI LETTER VOCALIC L {0x098F, 0x0990, prAL, gcLo}, // [2] BENGALI LETTER E..BENGALI LETTER AI {0x0993, 0x09A8, prAL, gcLo}, // [22] BENGALI LETTER O..BENGALI LETTER NA {0x09AA, 0x09B0, prAL, gcLo}, // [7] BENGALI LETTER PA..BENGALI LETTER RA {0x09B2, 0x09B2, prAL, gcLo}, // BENGALI LETTER LA {0x09B6, 0x09B9, prAL, gcLo}, // [4] BENGALI LETTER SHA..BENGALI LETTER HA {0x09BC, 0x09BC, prCM, gcMn}, // BENGALI SIGN NUKTA {0x09BD, 0x09BD, prAL, gcLo}, // BENGALI SIGN AVAGRAHA {0x09BE, 0x09C0, prCM, gcMc}, // [3] BENGALI VOWEL SIGN AA..BENGALI VOWEL SIGN II {0x09C1, 0x09C4, prCM, gcMn}, // [4] BENGALI VOWEL SIGN U..BENGALI VOWEL SIGN VOCALIC RR {0x09C7, 0x09C8, prCM, gcMc}, // [2] BENGALI VOWEL SIGN E..BENGALI VOWEL SIGN AI {0x09CB, 0x09CC, prCM, gcMc}, // [2] BENGALI VOWEL SIGN O..BENGALI VOWEL SIGN AU {0x09CD, 0x09CD, prCM, gcMn}, // BENGALI SIGN VIRAMA {0x09CE, 0x09CE, prAL, gcLo}, // BENGALI LETTER KHANDA TA {0x09D7, 0x09D7, prCM, gcMc}, // BENGALI AU LENGTH MARK {0x09DC, 0x09DD, prAL, gcLo}, // [2] BENGALI LETTER RRA..BENGALI LETTER RHA {0x09DF, 0x09E1, prAL, gcLo}, // [3] BENGALI LETTER YYA..BENGALI LETTER VOCALIC LL {0x09E2, 0x09E3, prCM, gcMn}, // [2] BENGALI VOWEL SIGN VOCALIC L..BENGALI VOWEL SIGN VOCALIC LL {0x09E6, 0x09EF, prNU, gcNd}, // [10] BENGALI DIGIT ZERO..BENGALI DIGIT NINE {0x09F0, 0x09F1, prAL, gcLo}, // [2] BENGALI LETTER RA WITH MIDDLE DIAGONAL..BENGALI LETTER RA WITH LOWER DIAGONAL {0x09F2, 0x09F3, prPO, gcSc}, // [2] BENGALI RUPEE MARK..BENGALI RUPEE SIGN {0x09F4, 0x09F8, prAL, gcNo}, // [5] BENGALI CURRENCY NUMERATOR ONE..BENGALI CURRENCY NUMERATOR ONE LESS THAN THE DENOMINATOR {0x09F9, 0x09F9, prPO, gcNo}, // BENGALI CURRENCY DENOMINATOR SIXTEEN {0x09FA, 0x09FA, prAL, gcSo}, // BENGALI ISSHAR {0x09FB, 0x09FB, prPR, gcSc}, // BENGALI GANDA MARK {0x09FC, 0x09FC, prAL, gcLo}, // BENGALI LETTER VEDIC ANUSVARA {0x09FD, 0x09FD, prAL, gcPo}, // BENGALI ABBREVIATION SIGN {0x09FE, 0x09FE, prCM, gcMn}, // BENGALI SANDHI MARK {0x0A01, 0x0A02, prCM, gcMn}, // [2] GURMUKHI SIGN ADAK BINDI..GURMUKHI SIGN BINDI {0x0A03, 0x0A03, prCM, gcMc}, // GURMUKHI SIGN VISARGA {0x0A05, 0x0A0A, prAL, gcLo}, // [6] GURMUKHI LETTER A..GURMUKHI LETTER UU {0x0A0F, 0x0A10, prAL, gcLo}, // [2] GURMUKHI LETTER EE..GURMUKHI LETTER AI {0x0A13, 0x0A28, prAL, gcLo}, // [22] GURMUKHI LETTER OO..GURMUKHI LETTER NA {0x0A2A, 0x0A30, prAL, gcLo}, // [7] GURMUKHI LETTER PA..GURMUKHI LETTER RA {0x0A32, 0x0A33, prAL, gcLo}, // [2] GURMUKHI LETTER LA..GURMUKHI LETTER LLA {0x0A35, 0x0A36, prAL, gcLo}, // [2] GURMUKHI LETTER VA..GURMUKHI LETTER SHA {0x0A38, 0x0A39, prAL, gcLo}, // [2] GURMUKHI LETTER SA..GURMUKHI LETTER HA {0x0A3C, 0x0A3C, prCM, gcMn}, // GURMUKHI SIGN NUKTA {0x0A3E, 0x0A40, prCM, gcMc}, // [3] GURMUKHI VOWEL SIGN AA..GURMUKHI VOWEL SIGN II {0x0A41, 0x0A42, prCM, gcMn}, // [2] GURMUKHI VOWEL SIGN U..GURMUKHI VOWEL SIGN UU {0x0A47, 0x0A48, prCM, gcMn}, // [2] GURMUKHI VOWEL SIGN EE..GURMUKHI VOWEL SIGN AI {0x0A4B, 0x0A4D, prCM, gcMn}, // [3] GURMUKHI VOWEL SIGN OO..GURMUKHI SIGN VIRAMA {0x0A51, 0x0A51, prCM, gcMn}, // GURMUKHI SIGN UDAAT {0x0A59, 0x0A5C, prAL, gcLo}, // [4] GURMUKHI LETTER KHHA..GURMUKHI LETTER RRA {0x0A5E, 0x0A5E, prAL, gcLo}, // GURMUKHI LETTER FA {0x0A66, 0x0A6F, prNU, gcNd}, // [10] GURMUKHI DIGIT ZERO..GURMUKHI DIGIT NINE {0x0A70, 0x0A71, prCM, gcMn}, // [2] GURMUKHI TIPPI..GURMUKHI ADDAK {0x0A72, 0x0A74, prAL, gcLo}, // [3] GURMUKHI IRI..GURMUKHI EK ONKAR {0x0A75, 0x0A75, prCM, gcMn}, // GURMUKHI SIGN YAKASH {0x0A76, 0x0A76, prAL, gcPo}, // GURMUKHI ABBREVIATION SIGN {0x0A81, 0x0A82, prCM, gcMn}, // [2] GUJARATI SIGN CANDRABINDU..GUJARATI SIGN ANUSVARA {0x0A83, 0x0A83, prCM, gcMc}, // GUJARATI SIGN VISARGA {0x0A85, 0x0A8D, prAL, gcLo}, // [9] GUJARATI LETTER A..GUJARATI VOWEL CANDRA E {0x0A8F, 0x0A91, prAL, gcLo}, // [3] GUJARATI LETTER E..GUJARATI VOWEL CANDRA O {0x0A93, 0x0AA8, prAL, gcLo}, // [22] GUJARATI LETTER O..GUJARATI LETTER NA {0x0AAA, 0x0AB0, prAL, gcLo}, // [7] GUJARATI LETTER PA..GUJARATI LETTER RA {0x0AB2, 0x0AB3, prAL, gcLo}, // [2] GUJARATI LETTER LA..GUJARATI LETTER LLA {0x0AB5, 0x0AB9, prAL, gcLo}, // [5] GUJARATI LETTER VA..GUJARATI LETTER HA {0x0ABC, 0x0ABC, prCM, gcMn}, // GUJARATI SIGN NUKTA {0x0ABD, 0x0ABD, prAL, gcLo}, // GUJARATI SIGN AVAGRAHA {0x0ABE, 0x0AC0, prCM, gcMc}, // [3] GUJARATI VOWEL SIGN AA..GUJARATI VOWEL SIGN II {0x0AC1, 0x0AC5, prCM, gcMn}, // [5] GUJARATI VOWEL SIGN U..GUJARATI VOWEL SIGN CANDRA E {0x0AC7, 0x0AC8, prCM, gcMn}, // [2] GUJARATI VOWEL SIGN E..GUJARATI VOWEL SIGN AI {0x0AC9, 0x0AC9, prCM, gcMc}, // GUJARATI VOWEL SIGN CANDRA O {0x0ACB, 0x0ACC, prCM, gcMc}, // [2] GUJARATI VOWEL SIGN O..GUJARATI VOWEL SIGN AU {0x0ACD, 0x0ACD, prCM, gcMn}, // GUJARATI SIGN VIRAMA {0x0AD0, 0x0AD0, prAL, gcLo}, // GUJARATI OM {0x0AE0, 0x0AE1, prAL, gcLo}, // [2] GUJARATI LETTER VOCALIC RR..GUJARATI LETTER VOCALIC LL {0x0AE2, 0x0AE3, prCM, gcMn}, // [2] GUJARATI VOWEL SIGN VOCALIC L..GUJARATI VOWEL SIGN VOCALIC LL {0x0AE6, 0x0AEF, prNU, gcNd}, // [10] GUJARATI DIGIT ZERO..GUJARATI DIGIT NINE {0x0AF0, 0x0AF0, prAL, gcPo}, // GUJARATI ABBREVIATION SIGN {0x0AF1, 0x0AF1, prPR, gcSc}, // GUJARATI RUPEE SIGN {0x0AF9, 0x0AF9, prAL, gcLo}, // GUJARATI LETTER ZHA {0x0AFA, 0x0AFF, prCM, gcMn}, // [6] GUJARATI SIGN SUKUN..GUJARATI SIGN TWO-CIRCLE NUKTA ABOVE {0x0B01, 0x0B01, prCM, gcMn}, // ORIYA SIGN CANDRABINDU {0x0B02, 0x0B03, prCM, gcMc}, // [2] ORIYA SIGN ANUSVARA..ORIYA SIGN VISARGA {0x0B05, 0x0B0C, prAL, gcLo}, // [8] ORIYA LETTER A..ORIYA LETTER VOCALIC L {0x0B0F, 0x0B10, prAL, gcLo}, // [2] ORIYA LETTER E..ORIYA LETTER AI {0x0B13, 0x0B28, prAL, gcLo}, // [22] ORIYA LETTER O..ORIYA LETTER NA {0x0B2A, 0x0B30, prAL, gcLo}, // [7] ORIYA LETTER PA..ORIYA LETTER RA {0x0B32, 0x0B33, prAL, gcLo}, // [2] ORIYA LETTER LA..ORIYA LETTER LLA {0x0B35, 0x0B39, prAL, gcLo}, // [5] ORIYA LETTER VA..ORIYA LETTER HA {0x0B3C, 0x0B3C, prCM, gcMn}, // ORIYA SIGN NUKTA {0x0B3D, 0x0B3D, prAL, gcLo}, // ORIYA SIGN AVAGRAHA {0x0B3E, 0x0B3E, prCM, gcMc}, // ORIYA VOWEL SIGN AA {0x0B3F, 0x0B3F, prCM, gcMn}, // ORIYA VOWEL SIGN I {0x0B40, 0x0B40, prCM, gcMc}, // ORIYA VOWEL SIGN II {0x0B41, 0x0B44, prCM, gcMn}, // [4] ORIYA VOWEL SIGN U..ORIYA VOWEL SIGN VOCALIC RR {0x0B47, 0x0B48, prCM, gcMc}, // [2] ORIYA VOWEL SIGN E..ORIYA VOWEL SIGN AI {0x0B4B, 0x0B4C, prCM, gcMc}, // [2] ORIYA VOWEL SIGN O..ORIYA VOWEL SIGN AU {0x0B4D, 0x0B4D, prCM, gcMn}, // ORIYA SIGN VIRAMA {0x0B55, 0x0B56, prCM, gcMn}, // [2] ORIYA SIGN OVERLINE..ORIYA AI LENGTH MARK {0x0B57, 0x0B57, prCM, gcMc}, // ORIYA AU LENGTH MARK {0x0B5C, 0x0B5D, prAL, gcLo}, // [2] ORIYA LETTER RRA..ORIYA LETTER RHA {0x0B5F, 0x0B61, prAL, gcLo}, // [3] ORIYA LETTER YYA..ORIYA LETTER VOCALIC LL {0x0B62, 0x0B63, prCM, gcMn}, // [2] ORIYA VOWEL SIGN VOCALIC L..ORIYA VOWEL SIGN VOCALIC LL {0x0B66, 0x0B6F, prNU, gcNd}, // [10] ORIYA DIGIT ZERO..ORIYA DIGIT NINE {0x0B70, 0x0B70, prAL, gcSo}, // ORIYA ISSHAR {0x0B71, 0x0B71, prAL, gcLo}, // ORIYA LETTER WA {0x0B72, 0x0B77, prAL, gcNo}, // [6] ORIYA FRACTION ONE QUARTER..ORIYA FRACTION THREE SIXTEENTHS {0x0B82, 0x0B82, prCM, gcMn}, // TAMIL SIGN ANUSVARA {0x0B83, 0x0B83, prAL, gcLo}, // TAMIL SIGN VISARGA {0x0B85, 0x0B8A, prAL, gcLo}, // [6] TAMIL LETTER A..TAMIL LETTER UU {0x0B8E, 0x0B90, prAL, gcLo}, // [3] TAMIL LETTER E..TAMIL LETTER AI {0x0B92, 0x0B95, prAL, gcLo}, // [4] TAMIL LETTER O..TAMIL LETTER KA {0x0B99, 0x0B9A, prAL, gcLo}, // [2] TAMIL LETTER NGA..TAMIL LETTER CA {0x0B9C, 0x0B9C, prAL, gcLo}, // TAMIL LETTER JA {0x0B9E, 0x0B9F, prAL, gcLo}, // [2] TAMIL LETTER NYA..TAMIL LETTER TTA {0x0BA3, 0x0BA4, prAL, gcLo}, // [2] TAMIL LETTER NNA..TAMIL LETTER TA {0x0BA8, 0x0BAA, prAL, gcLo}, // [3] TAMIL LETTER NA..TAMIL LETTER PA {0x0BAE, 0x0BB9, prAL, gcLo}, // [12] TAMIL LETTER MA..TAMIL LETTER HA {0x0BBE, 0x0BBF, prCM, gcMc}, // [2] TAMIL VOWEL SIGN AA..TAMIL VOWEL SIGN I {0x0BC0, 0x0BC0, prCM, gcMn}, // TAMIL VOWEL SIGN II {0x0BC1, 0x0BC2, prCM, gcMc}, // [2] TAMIL VOWEL SIGN U..TAMIL VOWEL SIGN UU {0x0BC6, 0x0BC8, prCM, gcMc}, // [3] TAMIL VOWEL SIGN E..TAMIL VOWEL SIGN AI {0x0BCA, 0x0BCC, prCM, gcMc}, // [3] TAMIL VOWEL SIGN O..TAMIL VOWEL SIGN AU {0x0BCD, 0x0BCD, prCM, gcMn}, // TAMIL SIGN VIRAMA {0x0BD0, 0x0BD0, prAL, gcLo}, // TAMIL OM {0x0BD7, 0x0BD7, prCM, gcMc}, // TAMIL AU LENGTH MARK {0x0BE6, 0x0BEF, prNU, gcNd}, // [10] TAMIL DIGIT ZERO..TAMIL DIGIT NINE {0x0BF0, 0x0BF2, prAL, gcNo}, // [3] TAMIL NUMBER TEN..TAMIL NUMBER ONE THOUSAND {0x0BF3, 0x0BF8, prAL, gcSo}, // [6] TAMIL DAY SIGN..TAMIL AS ABOVE SIGN {0x0BF9, 0x0BF9, prPR, gcSc}, // TAMIL RUPEE SIGN {0x0BFA, 0x0BFA, prAL, gcSo}, // TAMIL NUMBER SIGN {0x0C00, 0x0C00, prCM, gcMn}, // TELUGU SIGN COMBINING CANDRABINDU ABOVE {0x0C01, 0x0C03, prCM, gcMc}, // [3] TELUGU SIGN CANDRABINDU..TELUGU SIGN VISARGA {0x0C04, 0x0C04, prCM, gcMn}, // TELUGU SIGN COMBINING ANUSVARA ABOVE {0x0C05, 0x0C0C, prAL, gcLo}, // [8] TELUGU LETTER A..TELUGU LETTER VOCALIC L {0x0C0E, 0x0C10, prAL, gcLo}, // [3] TELUGU LETTER E..TELUGU LETTER AI {0x0C12, 0x0C28, prAL, gcLo}, // [23] TELUGU LETTER O..TELUGU LETTER NA {0x0C2A, 0x0C39, prAL, gcLo}, // [16] TELUGU LETTER PA..TELUGU LETTER HA {0x0C3C, 0x0C3C, prCM, gcMn}, // TELUGU SIGN NUKTA {0x0C3D, 0x0C3D, prAL, gcLo}, // TELUGU SIGN AVAGRAHA {0x0C3E, 0x0C40, prCM, gcMn}, // [3] TELUGU VOWEL SIGN AA..TELUGU VOWEL SIGN II {0x0C41, 0x0C44, prCM, gcMc}, // [4] TELUGU VOWEL SIGN U..TELUGU VOWEL SIGN VOCALIC RR {0x0C46, 0x0C48, prCM, gcMn}, // [3] TELUGU VOWEL SIGN E..TELUGU VOWEL SIGN AI {0x0C4A, 0x0C4D, prCM, gcMn}, // [4] TELUGU VOWEL SIGN O..TELUGU SIGN VIRAMA {0x0C55, 0x0C56, prCM, gcMn}, // [2] TELUGU LENGTH MARK..TELUGU AI LENGTH MARK {0x0C58, 0x0C5A, prAL, gcLo}, // [3] TELUGU LETTER TSA..TELUGU LETTER RRRA {0x0C5D, 0x0C5D, prAL, gcLo}, // TELUGU LETTER NAKAARA POLLU {0x0C60, 0x0C61, prAL, gcLo}, // [2] TELUGU LETTER VOCALIC RR..TELUGU LETTER VOCALIC LL {0x0C62, 0x0C63, prCM, gcMn}, // [2] TELUGU VOWEL SIGN VOCALIC L..TELUGU VOWEL SIGN VOCALIC LL {0x0C66, 0x0C6F, prNU, gcNd}, // [10] TELUGU DIGIT ZERO..TELUGU DIGIT NINE {0x0C77, 0x0C77, prBB, gcPo}, // TELUGU SIGN SIDDHAM {0x0C78, 0x0C7E, prAL, gcNo}, // [7] TELUGU FRACTION DIGIT ZERO FOR ODD POWERS OF FOUR..TELUGU FRACTION DIGIT THREE FOR EVEN POWERS OF FOUR {0x0C7F, 0x0C7F, prAL, gcSo}, // TELUGU SIGN TUUMU {0x0C80, 0x0C80, prAL, gcLo}, // KANNADA SIGN SPACING CANDRABINDU {0x0C81, 0x0C81, prCM, gcMn}, // KANNADA SIGN CANDRABINDU {0x0C82, 0x0C83, prCM, gcMc}, // [2] KANNADA SIGN ANUSVARA..KANNADA SIGN VISARGA {0x0C84, 0x0C84, prBB, gcPo}, // KANNADA SIGN SIDDHAM {0x0C85, 0x0C8C, prAL, gcLo}, // [8] KANNADA LETTER A..KANNADA LETTER VOCALIC L {0x0C8E, 0x0C90, prAL, gcLo}, // [3] KANNADA LETTER E..KANNADA LETTER AI {0x0C92, 0x0CA8, prAL, gcLo}, // [23] KANNADA LETTER O..KANNADA LETTER NA {0x0CAA, 0x0CB3, prAL, gcLo}, // [10] KANNADA LETTER PA..KANNADA LETTER LLA {0x0CB5, 0x0CB9, prAL, gcLo}, // [5] KANNADA LETTER VA..KANNADA LETTER HA {0x0CBC, 0x0CBC, prCM, gcMn}, // KANNADA SIGN NUKTA {0x0CBD, 0x0CBD, prAL, gcLo}, // KANNADA SIGN AVAGRAHA {0x0CBE, 0x0CBE, prCM, gcMc}, // KANNADA VOWEL SIGN AA {0x0CBF, 0x0CBF, prCM, gcMn}, // KANNADA VOWEL SIGN I {0x0CC0, 0x0CC4, prCM, gcMc}, // [5] KANNADA VOWEL SIGN II..KANNADA VOWEL SIGN VOCALIC RR {0x0CC6, 0x0CC6, prCM, gcMn}, // KANNADA VOWEL SIGN E {0x0CC7, 0x0CC8, prCM, gcMc}, // [2] KANNADA VOWEL SIGN EE..KANNADA VOWEL SIGN AI {0x0CCA, 0x0CCB, prCM, gcMc}, // [2] KANNADA VOWEL SIGN O..KANNADA VOWEL SIGN OO {0x0CCC, 0x0CCD, prCM, gcMn}, // [2] KANNADA VOWEL SIGN AU..KANNADA SIGN VIRAMA {0x0CD5, 0x0CD6, prCM, gcMc}, // [2] KANNADA LENGTH MARK..KANNADA AI LENGTH MARK {0x0CDD, 0x0CDE, prAL, gcLo}, // [2] KANNADA LETTER NAKAARA POLLU..KANNADA LETTER FA {0x0CE0, 0x0CE1, prAL, gcLo}, // [2] KANNADA LETTER VOCALIC RR..KANNADA LETTER VOCALIC LL {0x0CE2, 0x0CE3, prCM, gcMn}, // [2] KANNADA VOWEL SIGN VOCALIC L..KANNADA VOWEL SIGN VOCALIC LL {0x0CE6, 0x0CEF, prNU, gcNd}, // [10] KANNADA DIGIT ZERO..KANNADA DIGIT NINE {0x0CF1, 0x0CF2, prAL, gcLo}, // [2] KANNADA SIGN JIHVAMULIYA..KANNADA SIGN UPADHMANIYA {0x0CF3, 0x0CF3, prCM, gcMc}, // KANNADA SIGN COMBINING ANUSVARA ABOVE RIGHT {0x0D00, 0x0D01, prCM, gcMn}, // [2] MALAYALAM SIGN COMBINING ANUSVARA ABOVE..MALAYALAM SIGN CANDRABINDU {0x0D02, 0x0D03, prCM, gcMc}, // [2] MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA {0x0D04, 0x0D0C, prAL, gcLo}, // [9] MALAYALAM LETTER VEDIC ANUSVARA..MALAYALAM LETTER VOCALIC L {0x0D0E, 0x0D10, prAL, gcLo}, // [3] MALAYALAM LETTER E..MALAYALAM LETTER AI {0x0D12, 0x0D3A, prAL, gcLo}, // [41] MALAYALAM LETTER O..MALAYALAM LETTER TTTA {0x0D3B, 0x0D3C, prCM, gcMn}, // [2] MALAYALAM SIGN VERTICAL BAR VIRAMA..MALAYALAM SIGN CIRCULAR VIRAMA {0x0D3D, 0x0D3D, prAL, gcLo}, // MALAYALAM SIGN AVAGRAHA {0x0D3E, 0x0D40, prCM, gcMc}, // [3] MALAYALAM VOWEL SIGN AA..MALAYALAM VOWEL SIGN II {0x0D41, 0x0D44, prCM, gcMn}, // [4] MALAYALAM VOWEL SIGN U..MALAYALAM VOWEL SIGN VOCALIC RR {0x0D46, 0x0D48, prCM, gcMc}, // [3] MALAYALAM VOWEL SIGN E..MALAYALAM VOWEL SIGN AI {0x0D4A, 0x0D4C, prCM, gcMc}, // [3] MALAYALAM VOWEL SIGN O..MALAYALAM VOWEL SIGN AU {0x0D4D, 0x0D4D, prCM, gcMn}, // MALAYALAM SIGN VIRAMA {0x0D4E, 0x0D4E, prAL, gcLo}, // MALAYALAM LETTER DOT REPH {0x0D4F, 0x0D4F, prAL, gcSo}, // MALAYALAM SIGN PARA {0x0D54, 0x0D56, prAL, gcLo}, // [3] MALAYALAM LETTER CHILLU M..MALAYALAM LETTER CHILLU LLL {0x0D57, 0x0D57, prCM, gcMc}, // MALAYALAM AU LENGTH MARK {0x0D58, 0x0D5E, prAL, gcNo}, // [7] MALAYALAM FRACTION ONE ONE-HUNDRED-AND-SIXTIETH..MALAYALAM FRACTION ONE FIFTH {0x0D5F, 0x0D61, prAL, gcLo}, // [3] MALAYALAM LETTER ARCHAIC II..MALAYALAM LETTER VOCALIC LL {0x0D62, 0x0D63, prCM, gcMn}, // [2] MALAYALAM VOWEL SIGN VOCALIC L..MALAYALAM VOWEL SIGN VOCALIC LL {0x0D66, 0x0D6F, prNU, gcNd}, // [10] MALAYALAM DIGIT ZERO..MALAYALAM DIGIT NINE {0x0D70, 0x0D78, prAL, gcNo}, // [9] MALAYALAM NUMBER TEN..MALAYALAM FRACTION THREE SIXTEENTHS {0x0D79, 0x0D79, prPO, gcSo}, // MALAYALAM DATE MARK {0x0D7A, 0x0D7F, prAL, gcLo}, // [6] MALAYALAM LETTER CHILLU NN..MALAYALAM LETTER CHILLU K {0x0D81, 0x0D81, prCM, gcMn}, // SINHALA SIGN CANDRABINDU {0x0D82, 0x0D83, prCM, gcMc}, // [2] SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARGAYA {0x0D85, 0x0D96, prAL, gcLo}, // [18] SINHALA LETTER AYANNA..SINHALA LETTER AUYANNA {0x0D9A, 0x0DB1, prAL, gcLo}, // [24] SINHALA LETTER ALPAPRAANA KAYANNA..SINHALA LETTER DANTAJA NAYANNA {0x0DB3, 0x0DBB, prAL, gcLo}, // [9] SINHALA LETTER SANYAKA DAYANNA..SINHALA LETTER RAYANNA {0x0DBD, 0x0DBD, prAL, gcLo}, // SINHALA LETTER DANTAJA LAYANNA {0x0DC0, 0x0DC6, prAL, gcLo}, // [7] SINHALA LETTER VAYANNA..SINHALA LETTER FAYANNA {0x0DCA, 0x0DCA, prCM, gcMn}, // SINHALA SIGN AL-LAKUNA {0x0DCF, 0x0DD1, prCM, gcMc}, // [3] SINHALA VOWEL SIGN AELA-PILLA..SINHALA VOWEL SIGN DIGA AEDA-PILLA {0x0DD2, 0x0DD4, prCM, gcMn}, // [3] SINHALA VOWEL SIGN KETTI IS-PILLA..SINHALA VOWEL SIGN KETTI PAA-PILLA {0x0DD6, 0x0DD6, prCM, gcMn}, // SINHALA VOWEL SIGN DIGA PAA-PILLA {0x0DD8, 0x0DDF, prCM, gcMc}, // [8] SINHALA VOWEL SIGN GAETTA-PILLA..SINHALA VOWEL SIGN GAYANUKITTA {0x0DE6, 0x0DEF, prNU, gcNd}, // [10] SINHALA LITH DIGIT ZERO..SINHALA LITH DIGIT NINE {0x0DF2, 0x0DF3, prCM, gcMc}, // [2] SINHALA VOWEL SIGN DIGA GAETTA-PILLA..SINHALA VOWEL SIGN DIGA GAYANUKITTA {0x0DF4, 0x0DF4, prAL, gcPo}, // SINHALA PUNCTUATION KUNDDALIYA {0x0E01, 0x0E30, prSA, gcLo}, // [48] THAI CHARACTER KO KAI..THAI CHARACTER SARA A {0x0E31, 0x0E31, prSA, gcMn}, // THAI CHARACTER MAI HAN-AKAT {0x0E32, 0x0E33, prSA, gcLo}, // [2] THAI CHARACTER SARA AA..THAI CHARACTER SARA AM {0x0E34, 0x0E3A, prSA, gcMn}, // [7] THAI CHARACTER SARA I..THAI CHARACTER PHINTHU {0x0E3F, 0x0E3F, prPR, gcSc}, // THAI CURRENCY SYMBOL BAHT {0x0E40, 0x0E45, prSA, gcLo}, // [6] THAI CHARACTER SARA E..THAI CHARACTER LAKKHANGYAO {0x0E46, 0x0E46, prSA, gcLm}, // THAI CHARACTER MAIYAMOK {0x0E47, 0x0E4E, prSA, gcMn}, // [8] THAI CHARACTER MAITAIKHU..THAI CHARACTER YAMAKKAN {0x0E4F, 0x0E4F, prAL, gcPo}, // THAI CHARACTER FONGMAN {0x0E50, 0x0E59, prNU, gcNd}, // [10] THAI DIGIT ZERO..THAI DIGIT NINE {0x0E5A, 0x0E5B, prBA, gcPo}, // [2] THAI CHARACTER ANGKHANKHU..THAI CHARACTER KHOMUT {0x0E81, 0x0E82, prSA, gcLo}, // [2] LAO LETTER KO..LAO LETTER KHO SUNG {0x0E84, 0x0E84, prSA, gcLo}, // LAO LETTER KHO TAM {0x0E86, 0x0E8A, prSA, gcLo}, // [5] LAO LETTER PALI GHA..LAO LETTER SO TAM {0x0E8C, 0x0EA3, prSA, gcLo}, // [24] LAO LETTER PALI JHA..LAO LETTER LO LING {0x0EA5, 0x0EA5, prSA, gcLo}, // LAO LETTER LO LOOT {0x0EA7, 0x0EB0, prSA, gcLo}, // [10] LAO LETTER WO..LAO VOWEL SIGN A {0x0EB1, 0x0EB1, prSA, gcMn}, // LAO VOWEL SIGN MAI KAN {0x0EB2, 0x0EB3, prSA, gcLo}, // [2] LAO VOWEL SIGN AA..LAO VOWEL SIGN AM {0x0EB4, 0x0EBC, prSA, gcMn}, // [9] LAO VOWEL SIGN I..LAO SEMIVOWEL SIGN LO {0x0EBD, 0x0EBD, prSA, gcLo}, // LAO SEMIVOWEL SIGN NYO {0x0EC0, 0x0EC4, prSA, gcLo}, // [5] LAO VOWEL SIGN E..LAO VOWEL SIGN AI {0x0EC6, 0x0EC6, prSA, gcLm}, // LAO KO LA {0x0EC8, 0x0ECE, prSA, gcMn}, // [7] LAO TONE MAI EK..LAO YAMAKKAN {0x0ED0, 0x0ED9, prNU, gcNd}, // [10] LAO DIGIT ZERO..LAO DIGIT NINE {0x0EDC, 0x0EDF, prSA, gcLo}, // [4] LAO HO NO..LAO LETTER KHMU NYO {0x0F00, 0x0F00, prAL, gcLo}, // TIBETAN SYLLABLE OM {0x0F01, 0x0F03, prBB, gcSo}, // [3] TIBETAN MARK GTER YIG MGO TRUNCATED A..TIBETAN MARK GTER YIG MGO -UM GTER TSHEG MA {0x0F04, 0x0F04, prBB, gcPo}, // TIBETAN MARK INITIAL YIG MGO MDUN MA {0x0F05, 0x0F05, prAL, gcPo}, // TIBETAN MARK CLOSING YIG MGO SGAB MA {0x0F06, 0x0F07, prBB, gcPo}, // [2] TIBETAN MARK CARET YIG MGO PHUR SHAD MA..TIBETAN MARK YIG MGO TSHEG SHAD MA {0x0F08, 0x0F08, prGL, gcPo}, // TIBETAN MARK SBRUL SHAD {0x0F09, 0x0F0A, prBB, gcPo}, // [2] TIBETAN MARK BSKUR YIG MGO..TIBETAN MARK BKA- SHOG YIG MGO {0x0F0B, 0x0F0B, prBA, gcPo}, // TIBETAN MARK INTERSYLLABIC TSHEG {0x0F0C, 0x0F0C, prGL, gcPo}, // TIBETAN MARK DELIMITER TSHEG BSTAR {0x0F0D, 0x0F11, prEX, gcPo}, // [5] TIBETAN MARK SHAD..TIBETAN MARK RIN CHEN SPUNGS SHAD {0x0F12, 0x0F12, prGL, gcPo}, // TIBETAN MARK RGYA GRAM SHAD {0x0F13, 0x0F13, prAL, gcSo}, // TIBETAN MARK CARET -DZUD RTAGS ME LONG CAN {0x0F14, 0x0F14, prEX, gcPo}, // TIBETAN MARK GTER TSHEG {0x0F15, 0x0F17, prAL, gcSo}, // [3] TIBETAN LOGOTYPE SIGN CHAD RTAGS..TIBETAN ASTROLOGICAL SIGN SGRA GCAN -CHAR RTAGS {0x0F18, 0x0F19, prCM, gcMn}, // [2] TIBETAN ASTROLOGICAL SIGN -KHYUD PA..TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS {0x0F1A, 0x0F1F, prAL, gcSo}, // [6] TIBETAN SIGN RDEL DKAR GCIG..TIBETAN SIGN RDEL DKAR RDEL NAG {0x0F20, 0x0F29, prNU, gcNd}, // [10] TIBETAN DIGIT ZERO..TIBETAN DIGIT NINE {0x0F2A, 0x0F33, prAL, gcNo}, // [10] TIBETAN DIGIT HALF ONE..TIBETAN DIGIT HALF ZERO {0x0F34, 0x0F34, prBA, gcSo}, // TIBETAN MARK BSDUS RTAGS {0x0F35, 0x0F35, prCM, gcMn}, // TIBETAN MARK NGAS BZUNG NYI ZLA {0x0F36, 0x0F36, prAL, gcSo}, // TIBETAN MARK CARET -DZUD RTAGS BZHI MIG CAN {0x0F37, 0x0F37, prCM, gcMn}, // TIBETAN MARK NGAS BZUNG SGOR RTAGS {0x0F38, 0x0F38, prAL, gcSo}, // TIBETAN MARK CHE MGO {0x0F39, 0x0F39, prCM, gcMn}, // TIBETAN MARK TSA -PHRU {0x0F3A, 0x0F3A, prOP, gcPs}, // TIBETAN MARK GUG RTAGS GYON {0x0F3B, 0x0F3B, prCL, gcPe}, // TIBETAN MARK GUG RTAGS GYAS {0x0F3C, 0x0F3C, prOP, gcPs}, // TIBETAN MARK ANG KHANG GYON {0x0F3D, 0x0F3D, prCL, gcPe}, // TIBETAN MARK ANG KHANG GYAS {0x0F3E, 0x0F3F, prCM, gcMc}, // [2] TIBETAN SIGN YAR TSHES..TIBETAN SIGN MAR TSHES {0x0F40, 0x0F47, prAL, gcLo}, // [8] TIBETAN LETTER KA..TIBETAN LETTER JA {0x0F49, 0x0F6C, prAL, gcLo}, // [36] TIBETAN LETTER NYA..TIBETAN LETTER RRA {0x0F71, 0x0F7E, prCM, gcMn}, // [14] TIBETAN VOWEL SIGN AA..TIBETAN SIGN RJES SU NGA RO {0x0F7F, 0x0F7F, prBA, gcMc}, // TIBETAN SIGN RNAM BCAD {0x0F80, 0x0F84, prCM, gcMn}, // [5] TIBETAN VOWEL SIGN REVERSED I..TIBETAN MARK HALANTA {0x0F85, 0x0F85, prBA, gcPo}, // TIBETAN MARK PALUTA {0x0F86, 0x0F87, prCM, gcMn}, // [2] TIBETAN SIGN LCI RTAGS..TIBETAN SIGN YANG RTAGS {0x0F88, 0x0F8C, prAL, gcLo}, // [5] TIBETAN SIGN LCE TSA CAN..TIBETAN SIGN INVERTED MCHU CAN {0x0F8D, 0x0F97, prCM, gcMn}, // [11] TIBETAN SUBJOINED SIGN LCE TSA CAN..TIBETAN SUBJOINED LETTER JA {0x0F99, 0x0FBC, prCM, gcMn}, // [36] TIBETAN SUBJOINED LETTER NYA..TIBETAN SUBJOINED LETTER FIXED-FORM RA {0x0FBE, 0x0FBF, prBA, gcSo}, // [2] TIBETAN KU RU KHA..TIBETAN KU RU KHA BZHI MIG CAN {0x0FC0, 0x0FC5, prAL, gcSo}, // [6] TIBETAN CANTILLATION SIGN HEAVY BEAT..TIBETAN SYMBOL RDO RJE {0x0FC6, 0x0FC6, prCM, gcMn}, // TIBETAN SYMBOL PADMA GDAN {0x0FC7, 0x0FCC, prAL, gcSo}, // [6] TIBETAN SYMBOL RDO RJE RGYA GRAM..TIBETAN SYMBOL NOR BU BZHI -KHYIL {0x0FCE, 0x0FCF, prAL, gcSo}, // [2] TIBETAN SIGN RDEL NAG RDEL DKAR..TIBETAN SIGN RDEL NAG GSUM {0x0FD0, 0x0FD1, prBB, gcPo}, // [2] TIBETAN MARK BSKA- SHOG GI MGO RGYAN..TIBETAN MARK MNYAM YIG GI MGO RGYAN {0x0FD2, 0x0FD2, prBA, gcPo}, // TIBETAN MARK NYIS TSHEG {0x0FD3, 0x0FD3, prBB, gcPo}, // TIBETAN MARK INITIAL BRDA RNYING YIG MGO MDUN MA {0x0FD4, 0x0FD4, prAL, gcPo}, // TIBETAN MARK CLOSING BRDA RNYING YIG MGO SGAB MA {0x0FD5, 0x0FD8, prAL, gcSo}, // [4] RIGHT-FACING SVASTI SIGN..LEFT-FACING SVASTI SIGN WITH DOTS {0x0FD9, 0x0FDA, prGL, gcPo}, // [2] TIBETAN MARK LEADING MCHAN RTAGS..TIBETAN MARK TRAILING MCHAN RTAGS {0x1000, 0x102A, prSA, gcLo}, // [43] MYANMAR LETTER KA..MYANMAR LETTER AU {0x102B, 0x102C, prSA, gcMc}, // [2] MYANMAR VOWEL SIGN TALL AA..MYANMAR VOWEL SIGN AA {0x102D, 0x1030, prSA, gcMn}, // [4] MYANMAR VOWEL SIGN I..MYANMAR VOWEL SIGN UU {0x1031, 0x1031, prSA, gcMc}, // MYANMAR VOWEL SIGN E {0x1032, 0x1037, prSA, gcMn}, // [6] MYANMAR VOWEL SIGN AI..MYANMAR SIGN DOT BELOW {0x1038, 0x1038, prSA, gcMc}, // MYANMAR SIGN VISARGA {0x1039, 0x103A, prSA, gcMn}, // [2] MYANMAR SIGN VIRAMA..MYANMAR SIGN ASAT {0x103B, 0x103C, prSA, gcMc}, // [2] MYANMAR CONSONANT SIGN MEDIAL YA..MYANMAR CONSONANT SIGN MEDIAL RA {0x103D, 0x103E, prSA, gcMn}, // [2] MYANMAR CONSONANT SIGN MEDIAL WA..MYANMAR CONSONANT SIGN MEDIAL HA {0x103F, 0x103F, prSA, gcLo}, // MYANMAR LETTER GREAT SA {0x1040, 0x1049, prNU, gcNd}, // [10] MYANMAR DIGIT ZERO..MYANMAR DIGIT NINE {0x104A, 0x104B, prBA, gcPo}, // [2] MYANMAR SIGN LITTLE SECTION..MYANMAR SIGN SECTION {0x104C, 0x104F, prAL, gcPo}, // [4] MYANMAR SYMBOL LOCATIVE..MYANMAR SYMBOL GENITIVE {0x1050, 0x1055, prSA, gcLo}, // [6] MYANMAR LETTER SHA..MYANMAR LETTER VOCALIC LL {0x1056, 0x1057, prSA, gcMc}, // [2] MYANMAR VOWEL SIGN VOCALIC R..MYANMAR VOWEL SIGN VOCALIC RR {0x1058, 0x1059, prSA, gcMn}, // [2] MYANMAR VOWEL SIGN VOCALIC L..MYANMAR VOWEL SIGN VOCALIC LL {0x105A, 0x105D, prSA, gcLo}, // [4] MYANMAR LETTER MON NGA..MYANMAR LETTER MON BBE {0x105E, 0x1060, prSA, gcMn}, // [3] MYANMAR CONSONANT SIGN MON MEDIAL NA..MYANMAR CONSONANT SIGN MON MEDIAL LA {0x1061, 0x1061, prSA, gcLo}, // MYANMAR LETTER SGAW KAREN SHA {0x1062, 0x1064, prSA, gcMc}, // [3] MYANMAR VOWEL SIGN SGAW KAREN EU..MYANMAR TONE MARK SGAW KAREN KE PHO {0x1065, 0x1066, prSA, gcLo}, // [2] MYANMAR LETTER WESTERN PWO KAREN THA..MYANMAR LETTER WESTERN PWO KAREN PWA {0x1067, 0x106D, prSA, gcMc}, // [7] MYANMAR VOWEL SIGN WESTERN PWO KAREN EU..MYANMAR SIGN WESTERN PWO KAREN TONE-5 {0x106E, 0x1070, prSA, gcLo}, // [3] MYANMAR LETTER EASTERN PWO KAREN NNA..MYANMAR LETTER EASTERN PWO KAREN GHWA {0x1071, 0x1074, prSA, gcMn}, // [4] MYANMAR VOWEL SIGN GEBA KAREN I..MYANMAR VOWEL SIGN KAYAH EE {0x1075, 0x1081, prSA, gcLo}, // [13] MYANMAR LETTER SHAN KA..MYANMAR LETTER SHAN HA {0x1082, 0x1082, prSA, gcMn}, // MYANMAR CONSONANT SIGN SHAN MEDIAL WA {0x1083, 0x1084, prSA, gcMc}, // [2] MYANMAR VOWEL SIGN SHAN AA..MYANMAR VOWEL SIGN SHAN E {0x1085, 0x1086, prSA, gcMn}, // [2] MYANMAR VOWEL SIGN SHAN E ABOVE..MYANMAR VOWEL SIGN SHAN FINAL Y {0x1087, 0x108C, prSA, gcMc}, // [6] MYANMAR SIGN SHAN TONE-2..MYANMAR SIGN SHAN COUNCIL TONE-3 {0x108D, 0x108D, prSA, gcMn}, // MYANMAR SIGN SHAN COUNCIL EMPHATIC TONE {0x108E, 0x108E, prSA, gcLo}, // MYANMAR LETTER RUMAI PALAUNG FA {0x108F, 0x108F, prSA, gcMc}, // MYANMAR SIGN RUMAI PALAUNG TONE-5 {0x1090, 0x1099, prNU, gcNd}, // [10] MYANMAR SHAN DIGIT ZERO..MYANMAR SHAN DIGIT NINE {0x109A, 0x109C, prSA, gcMc}, // [3] MYANMAR SIGN KHAMTI TONE-1..MYANMAR VOWEL SIGN AITON A {0x109D, 0x109D, prSA, gcMn}, // MYANMAR VOWEL SIGN AITON AI {0x109E, 0x109F, prSA, gcSo}, // [2] MYANMAR SYMBOL SHAN ONE..MYANMAR SYMBOL SHAN EXCLAMATION {0x10A0, 0x10C5, prAL, gcLu}, // [38] GEORGIAN CAPITAL LETTER AN..GEORGIAN CAPITAL LETTER HOE {0x10C7, 0x10C7, prAL, gcLu}, // GEORGIAN CAPITAL LETTER YN {0x10CD, 0x10CD, prAL, gcLu}, // GEORGIAN CAPITAL LETTER AEN {0x10D0, 0x10FA, prAL, gcLl}, // [43] GEORGIAN LETTER AN..GEORGIAN LETTER AIN {0x10FB, 0x10FB, prAL, gcPo}, // GEORGIAN PARAGRAPH SEPARATOR {0x10FC, 0x10FC, prAL, gcLm}, // MODIFIER LETTER GEORGIAN NAR {0x10FD, 0x10FF, prAL, gcLl}, // [3] GEORGIAN LETTER AEN..GEORGIAN LETTER LABIAL SIGN {0x1100, 0x115F, prJL, gcLo}, // [96] HANGUL CHOSEONG KIYEOK..HANGUL CHOSEONG FILLER {0x1160, 0x11A7, prJV, gcLo}, // [72] HANGUL JUNGSEONG FILLER..HANGUL JUNGSEONG O-YAE {0x11A8, 0x11FF, prJT, gcLo}, // [88] HANGUL JONGSEONG KIYEOK..HANGUL JONGSEONG SSANGNIEUN {0x1200, 0x1248, prAL, gcLo}, // [73] ETHIOPIC SYLLABLE HA..ETHIOPIC SYLLABLE QWA {0x124A, 0x124D, prAL, gcLo}, // [4] ETHIOPIC SYLLABLE QWI..ETHIOPIC SYLLABLE QWE {0x1250, 0x1256, prAL, gcLo}, // [7] ETHIOPIC SYLLABLE QHA..ETHIOPIC SYLLABLE QHO {0x1258, 0x1258, prAL, gcLo}, // ETHIOPIC SYLLABLE QHWA {0x125A, 0x125D, prAL, gcLo}, // [4] ETHIOPIC SYLLABLE QHWI..ETHIOPIC SYLLABLE QHWE {0x1260, 0x1288, prAL, gcLo}, // [41] ETHIOPIC SYLLABLE BA..ETHIOPIC SYLLABLE XWA {0x128A, 0x128D, prAL, gcLo}, // [4] ETHIOPIC SYLLABLE XWI..ETHIOPIC SYLLABLE XWE {0x1290, 0x12B0, prAL, gcLo}, // [33] ETHIOPIC SYLLABLE NA..ETHIOPIC SYLLABLE KWA {0x12B2, 0x12B5, prAL, gcLo}, // [4] ETHIOPIC SYLLABLE KWI..ETHIOPIC SYLLABLE KWE {0x12B8, 0x12BE, prAL, gcLo}, // [7] ETHIOPIC SYLLABLE KXA..ETHIOPIC SYLLABLE KXO {0x12C0, 0x12C0, prAL, gcLo}, // ETHIOPIC SYLLABLE KXWA {0x12C2, 0x12C5, prAL, gcLo}, // [4] ETHIOPIC SYLLABLE KXWI..ETHIOPIC SYLLABLE KXWE {0x12C8, 0x12D6, prAL, gcLo}, // [15] ETHIOPIC SYLLABLE WA..ETHIOPIC SYLLABLE PHARYNGEAL O {0x12D8, 0x1310, prAL, gcLo}, // [57] ETHIOPIC SYLLABLE ZA..ETHIOPIC SYLLABLE GWA {0x1312, 0x1315, prAL, gcLo}, // [4] ETHIOPIC SYLLABLE GWI..ETHIOPIC SYLLABLE GWE {0x1318, 0x135A, prAL, gcLo}, // [67] ETHIOPIC SYLLABLE GGA..ETHIOPIC SYLLABLE FYA {0x135D, 0x135F, prCM, gcMn}, // [3] ETHIOPIC COMBINING GEMINATION AND VOWEL LENGTH MARK..ETHIOPIC COMBINING GEMINATION MARK {0x1360, 0x1360, prAL, gcPo}, // ETHIOPIC SECTION MARK {0x1361, 0x1361, prBA, gcPo}, // ETHIOPIC WORDSPACE {0x1362, 0x1368, prAL, gcPo}, // [7] ETHIOPIC FULL STOP..ETHIOPIC PARAGRAPH SEPARATOR {0x1369, 0x137C, prAL, gcNo}, // [20] ETHIOPIC DIGIT ONE..ETHIOPIC NUMBER TEN THOUSAND {0x1380, 0x138F, prAL, gcLo}, // [16] ETHIOPIC SYLLABLE SEBATBEIT MWA..ETHIOPIC SYLLABLE PWE {0x1390, 0x1399, prAL, gcSo}, // [10] ETHIOPIC TONAL MARK YIZET..ETHIOPIC TONAL MARK KURT {0x13A0, 0x13F5, prAL, gcLu}, // [86] CHEROKEE LETTER A..CHEROKEE LETTER MV {0x13F8, 0x13FD, prAL, gcLl}, // [6] CHEROKEE SMALL LETTER YE..CHEROKEE SMALL LETTER MV {0x1400, 0x1400, prBA, gcPd}, // CANADIAN SYLLABICS HYPHEN {0x1401, 0x166C, prAL, gcLo}, // [620] CANADIAN SYLLABICS E..CANADIAN SYLLABICS CARRIER TTSA {0x166D, 0x166D, prAL, gcSo}, // CANADIAN SYLLABICS CHI SIGN {0x166E, 0x166E, prAL, gcPo}, // CANADIAN SYLLABICS FULL STOP {0x166F, 0x167F, prAL, gcLo}, // [17] CANADIAN SYLLABICS QAI..CANADIAN SYLLABICS BLACKFOOT W {0x1680, 0x1680, prBA, gcZs}, // OGHAM SPACE MARK {0x1681, 0x169A, prAL, gcLo}, // [26] OGHAM LETTER BEITH..OGHAM LETTER PEITH {0x169B, 0x169B, prOP, gcPs}, // OGHAM FEATHER MARK {0x169C, 0x169C, prCL, gcPe}, // OGHAM REVERSED FEATHER MARK {0x16A0, 0x16EA, prAL, gcLo}, // [75] RUNIC LETTER FEHU FEOH FE F..RUNIC LETTER X {0x16EB, 0x16ED, prBA, gcPo}, // [3] RUNIC SINGLE PUNCTUATION..RUNIC CROSS PUNCTUATION {0x16EE, 0x16F0, prAL, gcNl}, // [3] RUNIC ARLAUG SYMBOL..RUNIC BELGTHOR SYMBOL {0x16F1, 0x16F8, prAL, gcLo}, // [8] RUNIC LETTER K..RUNIC LETTER FRANKS CASKET AESC {0x1700, 0x1711, prAL, gcLo}, // [18] TAGALOG LETTER A..TAGALOG LETTER HA {0x1712, 0x1714, prCM, gcMn}, // [3] TAGALOG VOWEL SIGN I..TAGALOG SIGN VIRAMA {0x1715, 0x1715, prCM, gcMc}, // TAGALOG SIGN PAMUDPOD {0x171F, 0x171F, prAL, gcLo}, // TAGALOG LETTER ARCHAIC RA {0x1720, 0x1731, prAL, gcLo}, // [18] HANUNOO LETTER A..HANUNOO LETTER HA {0x1732, 0x1733, prCM, gcMn}, // [2] HANUNOO VOWEL SIGN I..HANUNOO VOWEL SIGN U {0x1734, 0x1734, prCM, gcMc}, // HANUNOO SIGN PAMUDPOD {0x1735, 0x1736, prBA, gcPo}, // [2] PHILIPPINE SINGLE PUNCTUATION..PHILIPPINE DOUBLE PUNCTUATION {0x1740, 0x1751, prAL, gcLo}, // [18] BUHID LETTER A..BUHID LETTER HA {0x1752, 0x1753, prCM, gcMn}, // [2] BUHID VOWEL SIGN I..BUHID VOWEL SIGN U {0x1760, 0x176C, prAL, gcLo}, // [13] TAGBANWA LETTER A..TAGBANWA LETTER YA {0x176E, 0x1770, prAL, gcLo}, // [3] TAGBANWA LETTER LA..TAGBANWA LETTER SA {0x1772, 0x1773, prCM, gcMn}, // [2] TAGBANWA VOWEL SIGN I..TAGBANWA VOWEL SIGN U {0x1780, 0x17B3, prSA, gcLo}, // [52] KHMER LETTER KA..KHMER INDEPENDENT VOWEL QAU {0x17B4, 0x17B5, prSA, gcMn}, // [2] KHMER VOWEL INHERENT AQ..KHMER VOWEL INHERENT AA {0x17B6, 0x17B6, prSA, gcMc}, // KHMER VOWEL SIGN AA {0x17B7, 0x17BD, prSA, gcMn}, // [7] KHMER VOWEL SIGN I..KHMER VOWEL SIGN UA {0x17BE, 0x17C5, prSA, gcMc}, // [8] KHMER VOWEL SIGN OE..KHMER VOWEL SIGN AU {0x17C6, 0x17C6, prSA, gcMn}, // KHMER SIGN NIKAHIT {0x17C7, 0x17C8, prSA, gcMc}, // [2] KHMER SIGN REAHMUK..KHMER SIGN YUUKALEAPINTU {0x17C9, 0x17D3, prSA, gcMn}, // [11] KHMER SIGN MUUSIKATOAN..KHMER SIGN BATHAMASAT {0x17D4, 0x17D5, prBA, gcPo}, // [2] KHMER SIGN KHAN..KHMER SIGN BARIYOOSAN {0x17D6, 0x17D6, prNS, gcPo}, // KHMER SIGN CAMNUC PII KUUH {0x17D7, 0x17D7, prSA, gcLm}, // KHMER SIGN LEK TOO {0x17D8, 0x17D8, prBA, gcPo}, // KHMER SIGN BEYYAL {0x17D9, 0x17D9, prAL, gcPo}, // KHMER SIGN PHNAEK MUAN {0x17DA, 0x17DA, prBA, gcPo}, // KHMER SIGN KOOMUUT {0x17DB, 0x17DB, prPR, gcSc}, // KHMER CURRENCY SYMBOL RIEL {0x17DC, 0x17DC, prSA, gcLo}, // KHMER SIGN AVAKRAHASANYA {0x17DD, 0x17DD, prSA, gcMn}, // KHMER SIGN ATTHACAN {0x17E0, 0x17E9, prNU, gcNd}, // [10] KHMER DIGIT ZERO..KHMER DIGIT NINE {0x17F0, 0x17F9, prAL, gcNo}, // [10] KHMER SYMBOL LEK ATTAK SON..KHMER SYMBOL LEK ATTAK PRAM-BUON {0x1800, 0x1801, prAL, gcPo}, // [2] MONGOLIAN BIRGA..MONGOLIAN ELLIPSIS {0x1802, 0x1803, prEX, gcPo}, // [2] MONGOLIAN COMMA..MONGOLIAN FULL STOP {0x1804, 0x1805, prBA, gcPo}, // [2] MONGOLIAN COLON..MONGOLIAN FOUR DOTS {0x1806, 0x1806, prBB, gcPd}, // MONGOLIAN TODO SOFT HYPHEN {0x1807, 0x1807, prAL, gcPo}, // MONGOLIAN SIBE SYLLABLE BOUNDARY MARKER {0x1808, 0x1809, prEX, gcPo}, // [2] MONGOLIAN MANCHU COMMA..MONGOLIAN MANCHU FULL STOP {0x180A, 0x180A, prAL, gcPo}, // MONGOLIAN NIRUGU {0x180B, 0x180D, prCM, gcMn}, // [3] MONGOLIAN FREE VARIATION SELECTOR ONE..MONGOLIAN FREE VARIATION SELECTOR THREE {0x180E, 0x180E, prGL, gcCf}, // MONGOLIAN VOWEL SEPARATOR {0x180F, 0x180F, prCM, gcMn}, // MONGOLIAN FREE VARIATION SELECTOR FOUR {0x1810, 0x1819, prNU, gcNd}, // [10] MONGOLIAN DIGIT ZERO..MONGOLIAN DIGIT NINE {0x1820, 0x1842, prAL, gcLo}, // [35] MONGOLIAN LETTER A..MONGOLIAN LETTER CHI {0x1843, 0x1843, prAL, gcLm}, // MONGOLIAN LETTER TODO LONG VOWEL SIGN {0x1844, 0x1878, prAL, gcLo}, // [53] MONGOLIAN LETTER TODO E..MONGOLIAN LETTER CHA WITH TWO DOTS {0x1880, 0x1884, prAL, gcLo}, // [5] MONGOLIAN LETTER ALI GALI ANUSVARA ONE..MONGOLIAN LETTER ALI GALI INVERTED UBADAMA {0x1885, 0x1886, prCM, gcMn}, // [2] MONGOLIAN LETTER ALI GALI BALUDA..MONGOLIAN LETTER ALI GALI THREE BALUDA {0x1887, 0x18A8, prAL, gcLo}, // [34] MONGOLIAN LETTER ALI GALI A..MONGOLIAN LETTER MANCHU ALI GALI BHA {0x18A9, 0x18A9, prCM, gcMn}, // MONGOLIAN LETTER ALI GALI DAGALGA {0x18AA, 0x18AA, prAL, gcLo}, // MONGOLIAN LETTER MANCHU ALI GALI LHA {0x18B0, 0x18F5, prAL, gcLo}, // [70] CANADIAN SYLLABICS OY..CANADIAN SYLLABICS CARRIER DENTAL S {0x1900, 0x191E, prAL, gcLo}, // [31] LIMBU VOWEL-CARRIER LETTER..LIMBU LETTER TRA {0x1920, 0x1922, prCM, gcMn}, // [3] LIMBU VOWEL SIGN A..LIMBU VOWEL SIGN U {0x1923, 0x1926, prCM, gcMc}, // [4] LIMBU VOWEL SIGN EE..LIMBU VOWEL SIGN AU {0x1927, 0x1928, prCM, gcMn}, // [2] LIMBU VOWEL SIGN E..LIMBU VOWEL SIGN O {0x1929, 0x192B, prCM, gcMc}, // [3] LIMBU SUBJOINED LETTER YA..LIMBU SUBJOINED LETTER WA {0x1930, 0x1931, prCM, gcMc}, // [2] LIMBU SMALL LETTER KA..LIMBU SMALL LETTER NGA {0x1932, 0x1932, prCM, gcMn}, // LIMBU SMALL LETTER ANUSVARA {0x1933, 0x1938, prCM, gcMc}, // [6] LIMBU SMALL LETTER TA..LIMBU SMALL LETTER LA {0x1939, 0x193B, prCM, gcMn}, // [3] LIMBU SIGN MUKPHRENG..LIMBU SIGN SA-I {0x1940, 0x1940, prAL, gcSo}, // LIMBU SIGN LOO {0x1944, 0x1945, prEX, gcPo}, // [2] LIMBU EXCLAMATION MARK..LIMBU QUESTION MARK {0x1946, 0x194F, prNU, gcNd}, // [10] LIMBU DIGIT ZERO..LIMBU DIGIT NINE {0x1950, 0x196D, prSA, gcLo}, // [30] TAI LE LETTER KA..TAI LE LETTER AI {0x1970, 0x1974, prSA, gcLo}, // [5] TAI LE LETTER TONE-2..TAI LE LETTER TONE-6 {0x1980, 0x19AB, prSA, gcLo}, // [44] NEW TAI LUE LETTER HIGH QA..NEW TAI LUE LETTER LOW SUA {0x19B0, 0x19C9, prSA, gcLo}, // [26] NEW TAI LUE VOWEL SIGN VOWEL SHORTENER..NEW TAI LUE TONE MARK-2 {0x19D0, 0x19D9, prNU, gcNd}, // [10] NEW TAI LUE DIGIT ZERO..NEW TAI LUE DIGIT NINE {0x19DA, 0x19DA, prSA, gcNo}, // NEW TAI LUE THAM DIGIT ONE {0x19DE, 0x19DF, prSA, gcSo}, // [2] NEW TAI LUE SIGN LAE..NEW TAI LUE SIGN LAEV {0x19E0, 0x19FF, prAL, gcSo}, // [32] KHMER SYMBOL PATHAMASAT..KHMER SYMBOL DAP-PRAM ROC {0x1A00, 0x1A16, prAL, gcLo}, // [23] BUGINESE LETTER KA..BUGINESE LETTER HA {0x1A17, 0x1A18, prCM, gcMn}, // [2] BUGINESE VOWEL SIGN I..BUGINESE VOWEL SIGN U {0x1A19, 0x1A1A, prCM, gcMc}, // [2] BUGINESE VOWEL SIGN E..BUGINESE VOWEL SIGN O {0x1A1B, 0x1A1B, prCM, gcMn}, // BUGINESE VOWEL SIGN AE {0x1A1E, 0x1A1F, prAL, gcPo}, // [2] BUGINESE PALLAWA..BUGINESE END OF SECTION {0x1A20, 0x1A54, prSA, gcLo}, // [53] TAI THAM LETTER HIGH KA..TAI THAM LETTER GREAT SA {0x1A55, 0x1A55, prSA, gcMc}, // TAI THAM CONSONANT SIGN MEDIAL RA {0x1A56, 0x1A56, prSA, gcMn}, // TAI THAM CONSONANT SIGN MEDIAL LA {0x1A57, 0x1A57, prSA, gcMc}, // TAI THAM CONSONANT SIGN LA TANG LAI {0x1A58, 0x1A5E, prSA, gcMn}, // [7] TAI THAM SIGN MAI KANG LAI..TAI THAM CONSONANT SIGN SA {0x1A60, 0x1A60, prSA, gcMn}, // TAI THAM SIGN SAKOT {0x1A61, 0x1A61, prSA, gcMc}, // TAI THAM VOWEL SIGN A {0x1A62, 0x1A62, prSA, gcMn}, // TAI THAM VOWEL SIGN MAI SAT {0x1A63, 0x1A64, prSA, gcMc}, // [2] TAI THAM VOWEL SIGN AA..TAI THAM VOWEL SIGN TALL AA {0x1A65, 0x1A6C, prSA, gcMn}, // [8] TAI THAM VOWEL SIGN I..TAI THAM VOWEL SIGN OA BELOW {0x1A6D, 0x1A72, prSA, gcMc}, // [6] TAI THAM VOWEL SIGN OY..TAI THAM VOWEL SIGN THAM AI {0x1A73, 0x1A7C, prSA, gcMn}, // [10] TAI THAM VOWEL SIGN OA ABOVE..TAI THAM SIGN KHUEN-LUE KARAN {0x1A7F, 0x1A7F, prCM, gcMn}, // TAI THAM COMBINING CRYPTOGRAMMIC DOT {0x1A80, 0x1A89, prNU, gcNd}, // [10] TAI THAM HORA DIGIT ZERO..TAI THAM HORA DIGIT NINE {0x1A90, 0x1A99, prNU, gcNd}, // [10] TAI THAM THAM DIGIT ZERO..TAI THAM THAM DIGIT NINE {0x1AA0, 0x1AA6, prSA, gcPo}, // [7] TAI THAM SIGN WIANG..TAI THAM SIGN REVERSED ROTATED RANA {0x1AA7, 0x1AA7, prSA, gcLm}, // TAI THAM SIGN MAI YAMOK {0x1AA8, 0x1AAD, prSA, gcPo}, // [6] TAI THAM SIGN KAAN..TAI THAM SIGN CAANG {0x1AB0, 0x1ABD, prCM, gcMn}, // [14] COMBINING DOUBLED CIRCUMFLEX ACCENT..COMBINING PARENTHESES BELOW {0x1ABE, 0x1ABE, prCM, gcMe}, // COMBINING PARENTHESES OVERLAY {0x1ABF, 0x1ACE, prCM, gcMn}, // [16] COMBINING LATIN SMALL LETTER W BELOW..COMBINING LATIN SMALL LETTER INSULAR T {0x1B00, 0x1B03, prCM, gcMn}, // [4] BALINESE SIGN ULU RICEM..BALINESE SIGN SURANG {0x1B04, 0x1B04, prCM, gcMc}, // BALINESE SIGN BISAH {0x1B05, 0x1B33, prAL, gcLo}, // [47] BALINESE LETTER AKARA..BALINESE LETTER HA {0x1B34, 0x1B34, prCM, gcMn}, // BALINESE SIGN REREKAN {0x1B35, 0x1B35, prCM, gcMc}, // BALINESE VOWEL SIGN TEDUNG {0x1B36, 0x1B3A, prCM, gcMn}, // [5] BALINESE VOWEL SIGN ULU..BALINESE VOWEL SIGN RA REPA {0x1B3B, 0x1B3B, prCM, gcMc}, // BALINESE VOWEL SIGN RA REPA TEDUNG {0x1B3C, 0x1B3C, prCM, gcMn}, // BALINESE VOWEL SIGN LA LENGA {0x1B3D, 0x1B41, prCM, gcMc}, // [5] BALINESE VOWEL SIGN LA LENGA TEDUNG..BALINESE VOWEL SIGN TALING REPA TEDUNG {0x1B42, 0x1B42, prCM, gcMn}, // BALINESE VOWEL SIGN PEPET {0x1B43, 0x1B44, prCM, gcMc}, // [2] BALINESE VOWEL SIGN PEPET TEDUNG..BALINESE ADEG ADEG {0x1B45, 0x1B4C, prAL, gcLo}, // [8] BALINESE LETTER KAF SASAK..BALINESE LETTER ARCHAIC JNYA {0x1B50, 0x1B59, prNU, gcNd}, // [10] BALINESE DIGIT ZERO..BALINESE DIGIT NINE {0x1B5A, 0x1B5B, prBA, gcPo}, // [2] BALINESE PANTI..BALINESE PAMADA {0x1B5C, 0x1B5C, prAL, gcPo}, // BALINESE WINDU {0x1B5D, 0x1B60, prBA, gcPo}, // [4] BALINESE CARIK PAMUNGKAH..BALINESE PAMENENG {0x1B61, 0x1B6A, prAL, gcSo}, // [10] BALINESE MUSICAL SYMBOL DONG..BALINESE MUSICAL SYMBOL DANG GEDE {0x1B6B, 0x1B73, prCM, gcMn}, // [9] BALINESE MUSICAL SYMBOL COMBINING TEGEH..BALINESE MUSICAL SYMBOL COMBINING GONG {0x1B74, 0x1B7C, prAL, gcSo}, // [9] BALINESE MUSICAL SYMBOL RIGHT-HAND OPEN DUG..BALINESE MUSICAL SYMBOL LEFT-HAND OPEN PING {0x1B7D, 0x1B7E, prBA, gcPo}, // [2] BALINESE PANTI LANTANG..BALINESE PAMADA LANTANG {0x1B80, 0x1B81, prCM, gcMn}, // [2] SUNDANESE SIGN PANYECEK..SUNDANESE SIGN PANGLAYAR {0x1B82, 0x1B82, prCM, gcMc}, // SUNDANESE SIGN PANGWISAD {0x1B83, 0x1BA0, prAL, gcLo}, // [30] SUNDANESE LETTER A..SUNDANESE LETTER HA {0x1BA1, 0x1BA1, prCM, gcMc}, // SUNDANESE CONSONANT SIGN PAMINGKAL {0x1BA2, 0x1BA5, prCM, gcMn}, // [4] SUNDANESE CONSONANT SIGN PANYAKRA..SUNDANESE VOWEL SIGN PANYUKU {0x1BA6, 0x1BA7, prCM, gcMc}, // [2] SUNDANESE VOWEL SIGN PANAELAENG..SUNDANESE VOWEL SIGN PANOLONG {0x1BA8, 0x1BA9, prCM, gcMn}, // [2] SUNDANESE VOWEL SIGN PAMEPET..SUNDANESE VOWEL SIGN PANEULEUNG {0x1BAA, 0x1BAA, prCM, gcMc}, // SUNDANESE SIGN PAMAAEH {0x1BAB, 0x1BAD, prCM, gcMn}, // [3] SUNDANESE SIGN VIRAMA..SUNDANESE CONSONANT SIGN PASANGAN WA {0x1BAE, 0x1BAF, prAL, gcLo}, // [2] SUNDANESE LETTER KHA..SUNDANESE LETTER SYA {0x1BB0, 0x1BB9, prNU, gcNd}, // [10] SUNDANESE DIGIT ZERO..SUNDANESE DIGIT NINE {0x1BBA, 0x1BBF, prAL, gcLo}, // [6] SUNDANESE AVAGRAHA..SUNDANESE LETTER FINAL M {0x1BC0, 0x1BE5, prAL, gcLo}, // [38] BATAK LETTER A..BATAK LETTER U {0x1BE6, 0x1BE6, prCM, gcMn}, // BATAK SIGN TOMPI {0x1BE7, 0x1BE7, prCM, gcMc}, // BATAK VOWEL SIGN E {0x1BE8, 0x1BE9, prCM, gcMn}, // [2] BATAK VOWEL SIGN PAKPAK E..BATAK VOWEL SIGN EE {0x1BEA, 0x1BEC, prCM, gcMc}, // [3] BATAK VOWEL SIGN I..BATAK VOWEL SIGN O {0x1BED, 0x1BED, prCM, gcMn}, // BATAK VOWEL SIGN KARO O {0x1BEE, 0x1BEE, prCM, gcMc}, // BATAK VOWEL SIGN U {0x1BEF, 0x1BF1, prCM, gcMn}, // [3] BATAK VOWEL SIGN U FOR SIMALUNGUN SA..BATAK CONSONANT SIGN H {0x1BF2, 0x1BF3, prCM, gcMc}, // [2] BATAK PANGOLAT..BATAK PANONGONAN {0x1BFC, 0x1BFF, prAL, gcPo}, // [4] BATAK SYMBOL BINDU NA METEK..BATAK SYMBOL BINDU PANGOLAT {0x1C00, 0x1C23, prAL, gcLo}, // [36] LEPCHA LETTER KA..LEPCHA LETTER A {0x1C24, 0x1C2B, prCM, gcMc}, // [8] LEPCHA SUBJOINED LETTER YA..LEPCHA VOWEL SIGN UU {0x1C2C, 0x1C33, prCM, gcMn}, // [8] LEPCHA VOWEL SIGN E..LEPCHA CONSONANT SIGN T {0x1C34, 0x1C35, prCM, gcMc}, // [2] LEPCHA CONSONANT SIGN NYIN-DO..LEPCHA CONSONANT SIGN KANG {0x1C36, 0x1C37, prCM, gcMn}, // [2] LEPCHA SIGN RAN..LEPCHA SIGN NUKTA {0x1C3B, 0x1C3F, prBA, gcPo}, // [5] LEPCHA PUNCTUATION TA-ROL..LEPCHA PUNCTUATION TSHOOK {0x1C40, 0x1C49, prNU, gcNd}, // [10] LEPCHA DIGIT ZERO..LEPCHA DIGIT NINE {0x1C4D, 0x1C4F, prAL, gcLo}, // [3] LEPCHA LETTER TTA..LEPCHA LETTER DDA {0x1C50, 0x1C59, prNU, gcNd}, // [10] OL CHIKI DIGIT ZERO..OL CHIKI DIGIT NINE {0x1C5A, 0x1C77, prAL, gcLo}, // [30] OL CHIKI LETTER LA..OL CHIKI LETTER OH {0x1C78, 0x1C7D, prAL, gcLm}, // [6] OL CHIKI MU TTUDDAG..OL CHIKI AHAD {0x1C7E, 0x1C7F, prBA, gcPo}, // [2] OL CHIKI PUNCTUATION MUCAAD..OL CHIKI PUNCTUATION DOUBLE MUCAAD {0x1C80, 0x1C88, prAL, gcLl}, // [9] CYRILLIC SMALL LETTER ROUNDED VE..CYRILLIC SMALL LETTER UNBLENDED UK {0x1C90, 0x1CBA, prAL, gcLu}, // [43] GEORGIAN MTAVRULI CAPITAL LETTER AN..GEORGIAN MTAVRULI CAPITAL LETTER AIN {0x1CBD, 0x1CBF, prAL, gcLu}, // [3] GEORGIAN MTAVRULI CAPITAL LETTER AEN..GEORGIAN MTAVRULI CAPITAL LETTER LABIAL SIGN {0x1CC0, 0x1CC7, prAL, gcPo}, // [8] SUNDANESE PUNCTUATION BINDU SURYA..SUNDANESE PUNCTUATION BINDU BA SATANGA {0x1CD0, 0x1CD2, prCM, gcMn}, // [3] VEDIC TONE KARSHANA..VEDIC TONE PRENKHA {0x1CD3, 0x1CD3, prAL, gcPo}, // VEDIC SIGN NIHSHVASA {0x1CD4, 0x1CE0, prCM, gcMn}, // [13] VEDIC SIGN YAJURVEDIC MIDLINE SVARITA..VEDIC TONE RIGVEDIC KASHMIRI INDEPENDENT SVARITA {0x1CE1, 0x1CE1, prCM, gcMc}, // VEDIC TONE ATHARVAVEDIC INDEPENDENT SVARITA {0x1CE2, 0x1CE8, prCM, gcMn}, // [7] VEDIC SIGN VISARGA SVARITA..VEDIC SIGN VISARGA ANUDATTA WITH TAIL {0x1CE9, 0x1CEC, prAL, gcLo}, // [4] VEDIC SIGN ANUSVARA ANTARGOMUKHA..VEDIC SIGN ANUSVARA VAMAGOMUKHA WITH TAIL {0x1CED, 0x1CED, prCM, gcMn}, // VEDIC SIGN TIRYAK {0x1CEE, 0x1CF3, prAL, gcLo}, // [6] VEDIC SIGN HEXIFORM LONG ANUSVARA..VEDIC SIGN ROTATED ARDHAVISARGA {0x1CF4, 0x1CF4, prCM, gcMn}, // VEDIC TONE CANDRA ABOVE {0x1CF5, 0x1CF6, prAL, gcLo}, // [2] VEDIC SIGN JIHVAMULIYA..VEDIC SIGN UPADHMANIYA {0x1CF7, 0x1CF7, prCM, gcMc}, // VEDIC SIGN ATIKRAMA {0x1CF8, 0x1CF9, prCM, gcMn}, // [2] VEDIC TONE RING ABOVE..VEDIC TONE DOUBLE RING ABOVE {0x1CFA, 0x1CFA, prAL, gcLo}, // VEDIC SIGN DOUBLE ANUSVARA ANTARGOMUKHA {0x1D00, 0x1D2B, prAL, gcLl}, // [44] LATIN LETTER SMALL CAPITAL A..CYRILLIC LETTER SMALL CAPITAL EL {0x1D2C, 0x1D6A, prAL, gcLm}, // [63] MODIFIER LETTER CAPITAL A..GREEK SUBSCRIPT SMALL LETTER CHI {0x1D6B, 0x1D77, prAL, gcLl}, // [13] LATIN SMALL LETTER UE..LATIN SMALL LETTER TURNED G {0x1D78, 0x1D78, prAL, gcLm}, // MODIFIER LETTER CYRILLIC EN {0x1D79, 0x1D7F, prAL, gcLl}, // [7] LATIN SMALL LETTER INSULAR G..LATIN SMALL LETTER UPSILON WITH STROKE {0x1D80, 0x1D9A, prAL, gcLl}, // [27] LATIN SMALL LETTER B WITH PALATAL HOOK..LATIN SMALL LETTER EZH WITH RETROFLEX HOOK {0x1D9B, 0x1DBF, prAL, gcLm}, // [37] MODIFIER LETTER SMALL TURNED ALPHA..MODIFIER LETTER SMALL THETA {0x1DC0, 0x1DCC, prCM, gcMn}, // [13] COMBINING DOTTED GRAVE ACCENT..COMBINING MACRON-BREVE {0x1DCD, 0x1DCD, prGL, gcMn}, // COMBINING DOUBLE CIRCUMFLEX ABOVE {0x1DCE, 0x1DFB, prCM, gcMn}, // [46] COMBINING OGONEK ABOVE..COMBINING DELETION MARK {0x1DFC, 0x1DFC, prGL, gcMn}, // COMBINING DOUBLE INVERTED BREVE BELOW {0x1DFD, 0x1DFF, prCM, gcMn}, // [3] COMBINING ALMOST EQUAL TO BELOW..COMBINING RIGHT ARROWHEAD AND DOWN ARROWHEAD BELOW {0x1E00, 0x1EFF, prAL, gcLC}, // [256] LATIN CAPITAL LETTER A WITH RING BELOW..LATIN SMALL LETTER Y WITH LOOP {0x1F00, 0x1F15, prAL, gcLC}, // [22] GREEK SMALL LETTER ALPHA WITH PSILI..GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA {0x1F18, 0x1F1D, prAL, gcLu}, // [6] GREEK CAPITAL LETTER EPSILON WITH PSILI..GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA {0x1F20, 0x1F45, prAL, gcLC}, // [38] GREEK SMALL LETTER ETA WITH PSILI..GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA {0x1F48, 0x1F4D, prAL, gcLu}, // [6] GREEK CAPITAL LETTER OMICRON WITH PSILI..GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA {0x1F50, 0x1F57, prAL, gcLl}, // [8] GREEK SMALL LETTER UPSILON WITH PSILI..GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI {0x1F59, 0x1F59, prAL, gcLu}, // GREEK CAPITAL LETTER UPSILON WITH DASIA {0x1F5B, 0x1F5B, prAL, gcLu}, // GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA {0x1F5D, 0x1F5D, prAL, gcLu}, // GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA {0x1F5F, 0x1F7D, prAL, gcLC}, // [31] GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI..GREEK SMALL LETTER OMEGA WITH OXIA {0x1F80, 0x1FB4, prAL, gcLC}, // [53] GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI..GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI {0x1FB6, 0x1FBC, prAL, gcLC}, // [7] GREEK SMALL LETTER ALPHA WITH PERISPOMENI..GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI {0x1FBD, 0x1FBD, prAL, gcSk}, // GREEK KORONIS {0x1FBE, 0x1FBE, prAL, gcLl}, // GREEK PROSGEGRAMMENI {0x1FBF, 0x1FC1, prAL, gcSk}, // [3] GREEK PSILI..GREEK DIALYTIKA AND PERISPOMENI {0x1FC2, 0x1FC4, prAL, gcLl}, // [3] GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI {0x1FC6, 0x1FCC, prAL, gcLC}, // [7] GREEK SMALL LETTER ETA WITH PERISPOMENI..GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI {0x1FCD, 0x1FCF, prAL, gcSk}, // [3] GREEK PSILI AND VARIA..GREEK PSILI AND PERISPOMENI {0x1FD0, 0x1FD3, prAL, gcLl}, // [4] GREEK SMALL LETTER IOTA WITH VRACHY..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA {0x1FD6, 0x1FDB, prAL, gcLC}, // [6] GREEK SMALL LETTER IOTA WITH PERISPOMENI..GREEK CAPITAL LETTER IOTA WITH OXIA {0x1FDD, 0x1FDF, prAL, gcSk}, // [3] GREEK DASIA AND VARIA..GREEK DASIA AND PERISPOMENI {0x1FE0, 0x1FEC, prAL, gcLC}, // [13] GREEK SMALL LETTER UPSILON WITH VRACHY..GREEK CAPITAL LETTER RHO WITH DASIA {0x1FED, 0x1FEF, prAL, gcSk}, // [3] GREEK DIALYTIKA AND VARIA..GREEK VARIA {0x1FF2, 0x1FF4, prAL, gcLl}, // [3] GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI {0x1FF6, 0x1FFC, prAL, gcLC}, // [7] GREEK SMALL LETTER OMEGA WITH PERISPOMENI..GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI {0x1FFD, 0x1FFD, prBB, gcSk}, // GREEK OXIA {0x1FFE, 0x1FFE, prAL, gcSk}, // GREEK DASIA {0x2000, 0x2006, prBA, gcZs}, // [7] EN QUAD..SIX-PER-EM SPACE {0x2007, 0x2007, prGL, gcZs}, // FIGURE SPACE {0x2008, 0x200A, prBA, gcZs}, // [3] PUNCTUATION SPACE..HAIR SPACE {0x200B, 0x200B, prZW, gcCf}, // ZERO WIDTH SPACE {0x200C, 0x200C, prCM, gcCf}, // ZERO WIDTH NON-JOINER {0x200D, 0x200D, prZWJ, gcCf}, // ZERO WIDTH JOINER {0x200E, 0x200F, prCM, gcCf}, // [2] LEFT-TO-RIGHT MARK..RIGHT-TO-LEFT MARK {0x2010, 0x2010, prBA, gcPd}, // HYPHEN {0x2011, 0x2011, prGL, gcPd}, // NON-BREAKING HYPHEN {0x2012, 0x2013, prBA, gcPd}, // [2] FIGURE DASH..EN DASH {0x2014, 0x2014, prB2, gcPd}, // EM DASH {0x2015, 0x2015, prAI, gcPd}, // HORIZONTAL BAR {0x2016, 0x2016, prAI, gcPo}, // DOUBLE VERTICAL LINE {0x2017, 0x2017, prAL, gcPo}, // DOUBLE LOW LINE {0x2018, 0x2018, prQU, gcPi}, // LEFT SINGLE QUOTATION MARK {0x2019, 0x2019, prQU, gcPf}, // RIGHT SINGLE QUOTATION MARK {0x201A, 0x201A, prOP, gcPs}, // SINGLE LOW-9 QUOTATION MARK {0x201B, 0x201C, prQU, gcPi}, // [2] SINGLE HIGH-REVERSED-9 QUOTATION MARK..LEFT DOUBLE QUOTATION MARK {0x201D, 0x201D, prQU, gcPf}, // RIGHT DOUBLE QUOTATION MARK {0x201E, 0x201E, prOP, gcPs}, // DOUBLE LOW-9 QUOTATION MARK {0x201F, 0x201F, prQU, gcPi}, // DOUBLE HIGH-REVERSED-9 QUOTATION MARK {0x2020, 0x2021, prAI, gcPo}, // [2] DAGGER..DOUBLE DAGGER {0x2022, 0x2023, prAL, gcPo}, // [2] BULLET..TRIANGULAR BULLET {0x2024, 0x2026, prIN, gcPo}, // [3] ONE DOT LEADER..HORIZONTAL ELLIPSIS {0x2027, 0x2027, prBA, gcPo}, // HYPHENATION POINT {0x2028, 0x2028, prBK, gcZl}, // LINE SEPARATOR {0x2029, 0x2029, prBK, gcZp}, // PARAGRAPH SEPARATOR {0x202A, 0x202E, prCM, gcCf}, // [5] LEFT-TO-RIGHT EMBEDDING..RIGHT-TO-LEFT OVERRIDE {0x202F, 0x202F, prGL, gcZs}, // NARROW NO-BREAK SPACE {0x2030, 0x2037, prPO, gcPo}, // [8] PER MILLE SIGN..REVERSED TRIPLE PRIME {0x2038, 0x2038, prAL, gcPo}, // CARET {0x2039, 0x2039, prQU, gcPi}, // SINGLE LEFT-POINTING ANGLE QUOTATION MARK {0x203A, 0x203A, prQU, gcPf}, // SINGLE RIGHT-POINTING ANGLE QUOTATION MARK {0x203B, 0x203B, prAI, gcPo}, // REFERENCE MARK {0x203C, 0x203D, prNS, gcPo}, // [2] DOUBLE EXCLAMATION MARK..INTERROBANG {0x203E, 0x203E, prAL, gcPo}, // OVERLINE {0x203F, 0x2040, prAL, gcPc}, // [2] UNDERTIE..CHARACTER TIE {0x2041, 0x2043, prAL, gcPo}, // [3] CARET INSERTION POINT..HYPHEN BULLET {0x2044, 0x2044, prIS, gcSm}, // FRACTION SLASH {0x2045, 0x2045, prOP, gcPs}, // LEFT SQUARE BRACKET WITH QUILL {0x2046, 0x2046, prCL, gcPe}, // RIGHT SQUARE BRACKET WITH QUILL {0x2047, 0x2049, prNS, gcPo}, // [3] DOUBLE QUESTION MARK..EXCLAMATION QUESTION MARK {0x204A, 0x2051, prAL, gcPo}, // [8] TIRONIAN SIGN ET..TWO ASTERISKS ALIGNED VERTICALLY {0x2052, 0x2052, prAL, gcSm}, // COMMERCIAL MINUS SIGN {0x2053, 0x2053, prAL, gcPo}, // SWUNG DASH {0x2054, 0x2054, prAL, gcPc}, // INVERTED UNDERTIE {0x2055, 0x2055, prAL, gcPo}, // FLOWER PUNCTUATION MARK {0x2056, 0x2056, prBA, gcPo}, // THREE DOT PUNCTUATION {0x2057, 0x2057, prPO, gcPo}, // QUADRUPLE PRIME {0x2058, 0x205B, prBA, gcPo}, // [4] FOUR DOT PUNCTUATION..FOUR DOT MARK {0x205C, 0x205C, prAL, gcPo}, // DOTTED CROSS {0x205D, 0x205E, prBA, gcPo}, // [2] TRICOLON..VERTICAL FOUR DOTS {0x205F, 0x205F, prBA, gcZs}, // MEDIUM MATHEMATICAL SPACE {0x2060, 0x2060, prWJ, gcCf}, // WORD JOINER {0x2061, 0x2064, prAL, gcCf}, // [4] FUNCTION APPLICATION..INVISIBLE PLUS {0x2066, 0x206F, prCM, gcCf}, // [10] LEFT-TO-RIGHT ISOLATE..NOMINAL DIGIT SHAPES {0x2070, 0x2070, prAL, gcNo}, // SUPERSCRIPT ZERO {0x2071, 0x2071, prAL, gcLm}, // SUPERSCRIPT LATIN SMALL LETTER I {0x2074, 0x2074, prAI, gcNo}, // SUPERSCRIPT FOUR {0x2075, 0x2079, prAL, gcNo}, // [5] SUPERSCRIPT FIVE..SUPERSCRIPT NINE {0x207A, 0x207C, prAL, gcSm}, // [3] SUPERSCRIPT PLUS SIGN..SUPERSCRIPT EQUALS SIGN {0x207D, 0x207D, prOP, gcPs}, // SUPERSCRIPT LEFT PARENTHESIS {0x207E, 0x207E, prCL, gcPe}, // SUPERSCRIPT RIGHT PARENTHESIS {0x207F, 0x207F, prAI, gcLm}, // SUPERSCRIPT LATIN SMALL LETTER N {0x2080, 0x2080, prAL, gcNo}, // SUBSCRIPT ZERO {0x2081, 0x2084, prAI, gcNo}, // [4] SUBSCRIPT ONE..SUBSCRIPT FOUR {0x2085, 0x2089, prAL, gcNo}, // [5] SUBSCRIPT FIVE..SUBSCRIPT NINE {0x208A, 0x208C, prAL, gcSm}, // [3] SUBSCRIPT PLUS SIGN..SUBSCRIPT EQUALS SIGN {0x208D, 0x208D, prOP, gcPs}, // SUBSCRIPT LEFT PARENTHESIS {0x208E, 0x208E, prCL, gcPe}, // SUBSCRIPT RIGHT PARENTHESIS {0x2090, 0x209C, prAL, gcLm}, // [13] LATIN SUBSCRIPT SMALL LETTER A..LATIN SUBSCRIPT SMALL LETTER T {0x20A0, 0x20A6, prPR, gcSc}, // [7] EURO-CURRENCY SIGN..NAIRA SIGN {0x20A7, 0x20A7, prPO, gcSc}, // PESETA SIGN {0x20A8, 0x20B5, prPR, gcSc}, // [14] RUPEE SIGN..CEDI SIGN {0x20B6, 0x20B6, prPO, gcSc}, // LIVRE TOURNOIS SIGN {0x20B7, 0x20BA, prPR, gcSc}, // [4] SPESMILO SIGN..TURKISH LIRA SIGN {0x20BB, 0x20BB, prPO, gcSc}, // NORDIC MARK SIGN {0x20BC, 0x20BD, prPR, gcSc}, // [2] MANAT SIGN..RUBLE SIGN {0x20BE, 0x20BE, prPO, gcSc}, // LARI SIGN {0x20BF, 0x20BF, prPR, gcSc}, // BITCOIN SIGN {0x20C0, 0x20C0, prPO, gcSc}, // SOM SIGN {0x20C1, 0x20CF, prPR, gcCn}, // [15] .. {0x20D0, 0x20DC, prCM, gcMn}, // [13] COMBINING LEFT HARPOON ABOVE..COMBINING FOUR DOTS ABOVE {0x20DD, 0x20E0, prCM, gcMe}, // [4] COMBINING ENCLOSING CIRCLE..COMBINING ENCLOSING CIRCLE BACKSLASH {0x20E1, 0x20E1, prCM, gcMn}, // COMBINING LEFT RIGHT ARROW ABOVE {0x20E2, 0x20E4, prCM, gcMe}, // [3] COMBINING ENCLOSING SCREEN..COMBINING ENCLOSING UPWARD POINTING TRIANGLE {0x20E5, 0x20F0, prCM, gcMn}, // [12] COMBINING REVERSE SOLIDUS OVERLAY..COMBINING ASTERISK ABOVE {0x2100, 0x2101, prAL, gcSo}, // [2] ACCOUNT OF..ADDRESSED TO THE SUBJECT {0x2102, 0x2102, prAL, gcLu}, // DOUBLE-STRUCK CAPITAL C {0x2103, 0x2103, prPO, gcSo}, // DEGREE CELSIUS {0x2104, 0x2104, prAL, gcSo}, // CENTRE LINE SYMBOL {0x2105, 0x2105, prAI, gcSo}, // CARE OF {0x2106, 0x2106, prAL, gcSo}, // CADA UNA {0x2107, 0x2107, prAL, gcLu}, // EULER CONSTANT {0x2108, 0x2108, prAL, gcSo}, // SCRUPLE {0x2109, 0x2109, prPO, gcSo}, // DEGREE FAHRENHEIT {0x210A, 0x2112, prAL, gcLC}, // [9] SCRIPT SMALL G..SCRIPT CAPITAL L {0x2113, 0x2113, prAI, gcLl}, // SCRIPT SMALL L {0x2114, 0x2114, prAL, gcSo}, // L B BAR SYMBOL {0x2115, 0x2115, prAL, gcLu}, // DOUBLE-STRUCK CAPITAL N {0x2116, 0x2116, prPR, gcSo}, // NUMERO SIGN {0x2117, 0x2117, prAL, gcSo}, // SOUND RECORDING COPYRIGHT {0x2118, 0x2118, prAL, gcSm}, // SCRIPT CAPITAL P {0x2119, 0x211D, prAL, gcLu}, // [5] DOUBLE-STRUCK CAPITAL P..DOUBLE-STRUCK CAPITAL R {0x211E, 0x2120, prAL, gcSo}, // [3] PRESCRIPTION TAKE..SERVICE MARK {0x2121, 0x2122, prAI, gcSo}, // [2] TELEPHONE SIGN..TRADE MARK SIGN {0x2123, 0x2123, prAL, gcSo}, // VERSICLE {0x2124, 0x2124, prAL, gcLu}, // DOUBLE-STRUCK CAPITAL Z {0x2125, 0x2125, prAL, gcSo}, // OUNCE SIGN {0x2126, 0x2126, prAL, gcLu}, // OHM SIGN {0x2127, 0x2127, prAL, gcSo}, // INVERTED OHM SIGN {0x2128, 0x2128, prAL, gcLu}, // BLACK-LETTER CAPITAL Z {0x2129, 0x2129, prAL, gcSo}, // TURNED GREEK SMALL LETTER IOTA {0x212A, 0x212A, prAL, gcLu}, // KELVIN SIGN {0x212B, 0x212B, prAI, gcLu}, // ANGSTROM SIGN {0x212C, 0x212D, prAL, gcLu}, // [2] SCRIPT CAPITAL B..BLACK-LETTER CAPITAL C {0x212E, 0x212E, prAL, gcSo}, // ESTIMATED SYMBOL {0x212F, 0x2134, prAL, gcLC}, // [6] SCRIPT SMALL E..SCRIPT SMALL O {0x2135, 0x2138, prAL, gcLo}, // [4] ALEF SYMBOL..DALET SYMBOL {0x2139, 0x2139, prAL, gcLl}, // INFORMATION SOURCE {0x213A, 0x213B, prAL, gcSo}, // [2] ROTATED CAPITAL Q..FACSIMILE SIGN {0x213C, 0x213F, prAL, gcLC}, // [4] DOUBLE-STRUCK SMALL PI..DOUBLE-STRUCK CAPITAL PI {0x2140, 0x2144, prAL, gcSm}, // [5] DOUBLE-STRUCK N-ARY SUMMATION..TURNED SANS-SERIF CAPITAL Y {0x2145, 0x2149, prAL, gcLC}, // [5] DOUBLE-STRUCK ITALIC CAPITAL D..DOUBLE-STRUCK ITALIC SMALL J {0x214A, 0x214A, prAL, gcSo}, // PROPERTY LINE {0x214B, 0x214B, prAL, gcSm}, // TURNED AMPERSAND {0x214C, 0x214D, prAL, gcSo}, // [2] PER SIGN..AKTIESELSKAB {0x214E, 0x214E, prAL, gcLl}, // TURNED SMALL F {0x214F, 0x214F, prAL, gcSo}, // SYMBOL FOR SAMARITAN SOURCE {0x2150, 0x2153, prAL, gcNo}, // [4] VULGAR FRACTION ONE SEVENTH..VULGAR FRACTION ONE THIRD {0x2154, 0x2155, prAI, gcNo}, // [2] VULGAR FRACTION TWO THIRDS..VULGAR FRACTION ONE FIFTH {0x2156, 0x215A, prAL, gcNo}, // [5] VULGAR FRACTION TWO FIFTHS..VULGAR FRACTION FIVE SIXTHS {0x215B, 0x215B, prAI, gcNo}, // VULGAR FRACTION ONE EIGHTH {0x215C, 0x215D, prAL, gcNo}, // [2] VULGAR FRACTION THREE EIGHTHS..VULGAR FRACTION FIVE EIGHTHS {0x215E, 0x215E, prAI, gcNo}, // VULGAR FRACTION SEVEN EIGHTHS {0x215F, 0x215F, prAL, gcNo}, // FRACTION NUMERATOR ONE {0x2160, 0x216B, prAI, gcNl}, // [12] ROMAN NUMERAL ONE..ROMAN NUMERAL TWELVE {0x216C, 0x216F, prAL, gcNl}, // [4] ROMAN NUMERAL FIFTY..ROMAN NUMERAL ONE THOUSAND {0x2170, 0x2179, prAI, gcNl}, // [10] SMALL ROMAN NUMERAL ONE..SMALL ROMAN NUMERAL TEN {0x217A, 0x2182, prAL, gcNl}, // [9] SMALL ROMAN NUMERAL ELEVEN..ROMAN NUMERAL TEN THOUSAND {0x2183, 0x2184, prAL, gcLC}, // [2] ROMAN NUMERAL REVERSED ONE HUNDRED..LATIN SMALL LETTER REVERSED C {0x2185, 0x2188, prAL, gcNl}, // [4] ROMAN NUMERAL SIX LATE FORM..ROMAN NUMERAL ONE HUNDRED THOUSAND {0x2189, 0x2189, prAI, gcNo}, // VULGAR FRACTION ZERO THIRDS {0x218A, 0x218B, prAL, gcSo}, // [2] TURNED DIGIT TWO..TURNED DIGIT THREE {0x2190, 0x2194, prAI, gcSm}, // [5] LEFTWARDS ARROW..LEFT RIGHT ARROW {0x2195, 0x2199, prAI, gcSo}, // [5] UP DOWN ARROW..SOUTH WEST ARROW {0x219A, 0x219B, prAL, gcSm}, // [2] LEFTWARDS ARROW WITH STROKE..RIGHTWARDS ARROW WITH STROKE {0x219C, 0x219F, prAL, gcSo}, // [4] LEFTWARDS WAVE ARROW..UPWARDS TWO HEADED ARROW {0x21A0, 0x21A0, prAL, gcSm}, // RIGHTWARDS TWO HEADED ARROW {0x21A1, 0x21A2, prAL, gcSo}, // [2] DOWNWARDS TWO HEADED ARROW..LEFTWARDS ARROW WITH TAIL {0x21A3, 0x21A3, prAL, gcSm}, // RIGHTWARDS ARROW WITH TAIL {0x21A4, 0x21A5, prAL, gcSo}, // [2] LEFTWARDS ARROW FROM BAR..UPWARDS ARROW FROM BAR {0x21A6, 0x21A6, prAL, gcSm}, // RIGHTWARDS ARROW FROM BAR {0x21A7, 0x21AD, prAL, gcSo}, // [7] DOWNWARDS ARROW FROM BAR..LEFT RIGHT WAVE ARROW {0x21AE, 0x21AE, prAL, gcSm}, // LEFT RIGHT ARROW WITH STROKE {0x21AF, 0x21CD, prAL, gcSo}, // [31] DOWNWARDS ZIGZAG ARROW..LEFTWARDS DOUBLE ARROW WITH STROKE {0x21CE, 0x21CF, prAL, gcSm}, // [2] LEFT RIGHT DOUBLE ARROW WITH STROKE..RIGHTWARDS DOUBLE ARROW WITH STROKE {0x21D0, 0x21D1, prAL, gcSo}, // [2] LEFTWARDS DOUBLE ARROW..UPWARDS DOUBLE ARROW {0x21D2, 0x21D2, prAI, gcSm}, // RIGHTWARDS DOUBLE ARROW {0x21D3, 0x21D3, prAL, gcSo}, // DOWNWARDS DOUBLE ARROW {0x21D4, 0x21D4, prAI, gcSm}, // LEFT RIGHT DOUBLE ARROW {0x21D5, 0x21F3, prAL, gcSo}, // [31] UP DOWN DOUBLE ARROW..UP DOWN WHITE ARROW {0x21F4, 0x21FF, prAL, gcSm}, // [12] RIGHT ARROW WITH SMALL CIRCLE..LEFT RIGHT OPEN-HEADED ARROW {0x2200, 0x2200, prAI, gcSm}, // FOR ALL {0x2201, 0x2201, prAL, gcSm}, // COMPLEMENT {0x2202, 0x2203, prAI, gcSm}, // [2] PARTIAL DIFFERENTIAL..THERE EXISTS {0x2204, 0x2206, prAL, gcSm}, // [3] THERE DOES NOT EXIST..INCREMENT {0x2207, 0x2208, prAI, gcSm}, // [2] NABLA..ELEMENT OF {0x2209, 0x220A, prAL, gcSm}, // [2] NOT AN ELEMENT OF..SMALL ELEMENT OF {0x220B, 0x220B, prAI, gcSm}, // CONTAINS AS MEMBER {0x220C, 0x220E, prAL, gcSm}, // [3] DOES NOT CONTAIN AS MEMBER..END OF PROOF {0x220F, 0x220F, prAI, gcSm}, // N-ARY PRODUCT {0x2210, 0x2210, prAL, gcSm}, // N-ARY COPRODUCT {0x2211, 0x2211, prAI, gcSm}, // N-ARY SUMMATION {0x2212, 0x2213, prPR, gcSm}, // [2] MINUS SIGN..MINUS-OR-PLUS SIGN {0x2214, 0x2214, prAL, gcSm}, // DOT PLUS {0x2215, 0x2215, prAI, gcSm}, // DIVISION SLASH {0x2216, 0x2219, prAL, gcSm}, // [4] SET MINUS..BULLET OPERATOR {0x221A, 0x221A, prAI, gcSm}, // SQUARE ROOT {0x221B, 0x221C, prAL, gcSm}, // [2] CUBE ROOT..FOURTH ROOT {0x221D, 0x2220, prAI, gcSm}, // [4] PROPORTIONAL TO..ANGLE {0x2221, 0x2222, prAL, gcSm}, // [2] MEASURED ANGLE..SPHERICAL ANGLE {0x2223, 0x2223, prAI, gcSm}, // DIVIDES {0x2224, 0x2224, prAL, gcSm}, // DOES NOT DIVIDE {0x2225, 0x2225, prAI, gcSm}, // PARALLEL TO {0x2226, 0x2226, prAL, gcSm}, // NOT PARALLEL TO {0x2227, 0x222C, prAI, gcSm}, // [6] LOGICAL AND..DOUBLE INTEGRAL {0x222D, 0x222D, prAL, gcSm}, // TRIPLE INTEGRAL {0x222E, 0x222E, prAI, gcSm}, // CONTOUR INTEGRAL {0x222F, 0x2233, prAL, gcSm}, // [5] SURFACE INTEGRAL..ANTICLOCKWISE CONTOUR INTEGRAL {0x2234, 0x2237, prAI, gcSm}, // [4] THEREFORE..PROPORTION {0x2238, 0x223B, prAL, gcSm}, // [4] DOT MINUS..HOMOTHETIC {0x223C, 0x223D, prAI, gcSm}, // [2] TILDE OPERATOR..REVERSED TILDE {0x223E, 0x2247, prAL, gcSm}, // [10] INVERTED LAZY S..NEITHER APPROXIMATELY NOR ACTUALLY EQUAL TO {0x2248, 0x2248, prAI, gcSm}, // ALMOST EQUAL TO {0x2249, 0x224B, prAL, gcSm}, // [3] NOT ALMOST EQUAL TO..TRIPLE TILDE {0x224C, 0x224C, prAI, gcSm}, // ALL EQUAL TO {0x224D, 0x2251, prAL, gcSm}, // [5] EQUIVALENT TO..GEOMETRICALLY EQUAL TO {0x2252, 0x2252, prAI, gcSm}, // APPROXIMATELY EQUAL TO OR THE IMAGE OF {0x2253, 0x225F, prAL, gcSm}, // [13] IMAGE OF OR APPROXIMATELY EQUAL TO..QUESTIONED EQUAL TO {0x2260, 0x2261, prAI, gcSm}, // [2] NOT EQUAL TO..IDENTICAL TO {0x2262, 0x2263, prAL, gcSm}, // [2] NOT IDENTICAL TO..STRICTLY EQUIVALENT TO {0x2264, 0x2267, prAI, gcSm}, // [4] LESS-THAN OR EQUAL TO..GREATER-THAN OVER EQUAL TO {0x2268, 0x2269, prAL, gcSm}, // [2] LESS-THAN BUT NOT EQUAL TO..GREATER-THAN BUT NOT EQUAL TO {0x226A, 0x226B, prAI, gcSm}, // [2] MUCH LESS-THAN..MUCH GREATER-THAN {0x226C, 0x226D, prAL, gcSm}, // [2] BETWEEN..NOT EQUIVALENT TO {0x226E, 0x226F, prAI, gcSm}, // [2] NOT LESS-THAN..NOT GREATER-THAN {0x2270, 0x2281, prAL, gcSm}, // [18] NEITHER LESS-THAN NOR EQUAL TO..DOES NOT SUCCEED {0x2282, 0x2283, prAI, gcSm}, // [2] SUBSET OF..SUPERSET OF {0x2284, 0x2285, prAL, gcSm}, // [2] NOT A SUBSET OF..NOT A SUPERSET OF {0x2286, 0x2287, prAI, gcSm}, // [2] SUBSET OF OR EQUAL TO..SUPERSET OF OR EQUAL TO {0x2288, 0x2294, prAL, gcSm}, // [13] NEITHER A SUBSET OF NOR EQUAL TO..SQUARE CUP {0x2295, 0x2295, prAI, gcSm}, // CIRCLED PLUS {0x2296, 0x2298, prAL, gcSm}, // [3] CIRCLED MINUS..CIRCLED DIVISION SLASH {0x2299, 0x2299, prAI, gcSm}, // CIRCLED DOT OPERATOR {0x229A, 0x22A4, prAL, gcSm}, // [11] CIRCLED RING OPERATOR..DOWN TACK {0x22A5, 0x22A5, prAI, gcSm}, // UP TACK {0x22A6, 0x22BE, prAL, gcSm}, // [25] ASSERTION..RIGHT ANGLE WITH ARC {0x22BF, 0x22BF, prAI, gcSm}, // RIGHT TRIANGLE {0x22C0, 0x22EE, prAL, gcSm}, // [47] N-ARY LOGICAL AND..VERTICAL ELLIPSIS {0x22EF, 0x22EF, prIN, gcSm}, // MIDLINE HORIZONTAL ELLIPSIS {0x22F0, 0x22FF, prAL, gcSm}, // [16] UP RIGHT DIAGONAL ELLIPSIS..Z NOTATION BAG MEMBERSHIP {0x2300, 0x2307, prAL, gcSo}, // [8] DIAMETER SIGN..WAVY LINE {0x2308, 0x2308, prOP, gcPs}, // LEFT CEILING {0x2309, 0x2309, prCL, gcPe}, // RIGHT CEILING {0x230A, 0x230A, prOP, gcPs}, // LEFT FLOOR {0x230B, 0x230B, prCL, gcPe}, // RIGHT FLOOR {0x230C, 0x2311, prAL, gcSo}, // [6] BOTTOM RIGHT CROP..SQUARE LOZENGE {0x2312, 0x2312, prAI, gcSo}, // ARC {0x2313, 0x2319, prAL, gcSo}, // [7] SEGMENT..TURNED NOT SIGN {0x231A, 0x231B, prID, gcSo}, // [2] WATCH..HOURGLASS {0x231C, 0x231F, prAL, gcSo}, // [4] TOP LEFT CORNER..BOTTOM RIGHT CORNER {0x2320, 0x2321, prAL, gcSm}, // [2] TOP HALF INTEGRAL..BOTTOM HALF INTEGRAL {0x2322, 0x2328, prAL, gcSo}, // [7] FROWN..KEYBOARD {0x2329, 0x2329, prOP, gcPs}, // LEFT-POINTING ANGLE BRACKET {0x232A, 0x232A, prCL, gcPe}, // RIGHT-POINTING ANGLE BRACKET {0x232B, 0x237B, prAL, gcSo}, // [81] ERASE TO THE LEFT..NOT CHECK MARK {0x237C, 0x237C, prAL, gcSm}, // RIGHT ANGLE WITH DOWNWARDS ZIGZAG ARROW {0x237D, 0x239A, prAL, gcSo}, // [30] SHOULDERED OPEN BOX..CLEAR SCREEN SYMBOL {0x239B, 0x23B3, prAL, gcSm}, // [25] LEFT PARENTHESIS UPPER HOOK..SUMMATION BOTTOM {0x23B4, 0x23DB, prAL, gcSo}, // [40] TOP SQUARE BRACKET..FUSE {0x23DC, 0x23E1, prAL, gcSm}, // [6] TOP PARENTHESIS..BOTTOM TORTOISE SHELL BRACKET {0x23E2, 0x23EF, prAL, gcSo}, // [14] WHITE TRAPEZIUM..BLACK RIGHT-POINTING TRIANGLE WITH DOUBLE VERTICAL BAR {0x23F0, 0x23F3, prID, gcSo}, // [4] ALARM CLOCK..HOURGLASS WITH FLOWING SAND {0x23F4, 0x23FF, prAL, gcSo}, // [12] BLACK MEDIUM LEFT-POINTING TRIANGLE..OBSERVER EYE SYMBOL {0x2400, 0x2426, prAL, gcSo}, // [39] SYMBOL FOR NULL..SYMBOL FOR SUBSTITUTE FORM TWO {0x2440, 0x244A, prAL, gcSo}, // [11] OCR HOOK..OCR DOUBLE BACKSLASH {0x2460, 0x249B, prAI, gcNo}, // [60] CIRCLED DIGIT ONE..NUMBER TWENTY FULL STOP {0x249C, 0x24E9, prAI, gcSo}, // [78] PARENTHESIZED LATIN SMALL LETTER A..CIRCLED LATIN SMALL LETTER Z {0x24EA, 0x24FE, prAI, gcNo}, // [21] CIRCLED DIGIT ZERO..DOUBLE CIRCLED NUMBER TEN {0x24FF, 0x24FF, prAL, gcNo}, // NEGATIVE CIRCLED DIGIT ZERO {0x2500, 0x254B, prAI, gcSo}, // [76] BOX DRAWINGS LIGHT HORIZONTAL..BOX DRAWINGS HEAVY VERTICAL AND HORIZONTAL {0x254C, 0x254F, prAL, gcSo}, // [4] BOX DRAWINGS LIGHT DOUBLE DASH HORIZONTAL..BOX DRAWINGS HEAVY DOUBLE DASH VERTICAL {0x2550, 0x2574, prAI, gcSo}, // [37] BOX DRAWINGS DOUBLE HORIZONTAL..BOX DRAWINGS LIGHT LEFT {0x2575, 0x257F, prAL, gcSo}, // [11] BOX DRAWINGS LIGHT UP..BOX DRAWINGS HEAVY UP AND LIGHT DOWN {0x2580, 0x258F, prAI, gcSo}, // [16] UPPER HALF BLOCK..LEFT ONE EIGHTH BLOCK {0x2590, 0x2591, prAL, gcSo}, // [2] RIGHT HALF BLOCK..LIGHT SHADE {0x2592, 0x2595, prAI, gcSo}, // [4] MEDIUM SHADE..RIGHT ONE EIGHTH BLOCK {0x2596, 0x259F, prAL, gcSo}, // [10] QUADRANT LOWER LEFT..QUADRANT UPPER RIGHT AND LOWER LEFT AND LOWER RIGHT {0x25A0, 0x25A1, prAI, gcSo}, // [2] BLACK SQUARE..WHITE SQUARE {0x25A2, 0x25A2, prAL, gcSo}, // WHITE SQUARE WITH ROUNDED CORNERS {0x25A3, 0x25A9, prAI, gcSo}, // [7] WHITE SQUARE CONTAINING BLACK SMALL SQUARE..SQUARE WITH DIAGONAL CROSSHATCH FILL {0x25AA, 0x25B1, prAL, gcSo}, // [8] BLACK SMALL SQUARE..WHITE PARALLELOGRAM {0x25B2, 0x25B3, prAI, gcSo}, // [2] BLACK UP-POINTING TRIANGLE..WHITE UP-POINTING TRIANGLE {0x25B4, 0x25B5, prAL, gcSo}, // [2] BLACK UP-POINTING SMALL TRIANGLE..WHITE UP-POINTING SMALL TRIANGLE {0x25B6, 0x25B6, prAI, gcSo}, // BLACK RIGHT-POINTING TRIANGLE {0x25B7, 0x25B7, prAI, gcSm}, // WHITE RIGHT-POINTING TRIANGLE {0x25B8, 0x25BB, prAL, gcSo}, // [4] BLACK RIGHT-POINTING SMALL TRIANGLE..WHITE RIGHT-POINTING POINTER {0x25BC, 0x25BD, prAI, gcSo}, // [2] BLACK DOWN-POINTING TRIANGLE..WHITE DOWN-POINTING TRIANGLE {0x25BE, 0x25BF, prAL, gcSo}, // [2] BLACK DOWN-POINTING SMALL TRIANGLE..WHITE DOWN-POINTING SMALL TRIANGLE {0x25C0, 0x25C0, prAI, gcSo}, // BLACK LEFT-POINTING TRIANGLE {0x25C1, 0x25C1, prAI, gcSm}, // WHITE LEFT-POINTING TRIANGLE {0x25C2, 0x25C5, prAL, gcSo}, // [4] BLACK LEFT-POINTING SMALL TRIANGLE..WHITE LEFT-POINTING POINTER {0x25C6, 0x25C8, prAI, gcSo}, // [3] BLACK DIAMOND..WHITE DIAMOND CONTAINING BLACK SMALL DIAMOND {0x25C9, 0x25CA, prAL, gcSo}, // [2] FISHEYE..LOZENGE {0x25CB, 0x25CB, prAI, gcSo}, // WHITE CIRCLE {0x25CC, 0x25CD, prAL, gcSo}, // [2] DOTTED CIRCLE..CIRCLE WITH VERTICAL FILL {0x25CE, 0x25D1, prAI, gcSo}, // [4] BULLSEYE..CIRCLE WITH RIGHT HALF BLACK {0x25D2, 0x25E1, prAL, gcSo}, // [16] CIRCLE WITH LOWER HALF BLACK..LOWER HALF CIRCLE {0x25E2, 0x25E5, prAI, gcSo}, // [4] BLACK LOWER RIGHT TRIANGLE..BLACK UPPER RIGHT TRIANGLE {0x25E6, 0x25EE, prAL, gcSo}, // [9] WHITE BULLET..UP-POINTING TRIANGLE WITH RIGHT HALF BLACK {0x25EF, 0x25EF, prAI, gcSo}, // LARGE CIRCLE {0x25F0, 0x25F7, prAL, gcSo}, // [8] WHITE SQUARE WITH UPPER LEFT QUADRANT..WHITE CIRCLE WITH UPPER RIGHT QUADRANT {0x25F8, 0x25FF, prAL, gcSm}, // [8] UPPER LEFT TRIANGLE..LOWER RIGHT TRIANGLE {0x2600, 0x2603, prID, gcSo}, // [4] BLACK SUN WITH RAYS..SNOWMAN {0x2604, 0x2604, prAL, gcSo}, // COMET {0x2605, 0x2606, prAI, gcSo}, // [2] BLACK STAR..WHITE STAR {0x2607, 0x2608, prAL, gcSo}, // [2] LIGHTNING..THUNDERSTORM {0x2609, 0x2609, prAI, gcSo}, // SUN {0x260A, 0x260D, prAL, gcSo}, // [4] ASCENDING NODE..OPPOSITION {0x260E, 0x260F, prAI, gcSo}, // [2] BLACK TELEPHONE..WHITE TELEPHONE {0x2610, 0x2613, prAL, gcSo}, // [4] BALLOT BOX..SALTIRE {0x2614, 0x2615, prID, gcSo}, // [2] UMBRELLA WITH RAIN DROPS..HOT BEVERAGE {0x2616, 0x2617, prAI, gcSo}, // [2] WHITE SHOGI PIECE..BLACK SHOGI PIECE {0x2618, 0x2618, prID, gcSo}, // SHAMROCK {0x2619, 0x2619, prAL, gcSo}, // REVERSED ROTATED FLORAL HEART BULLET {0x261A, 0x261C, prID, gcSo}, // [3] BLACK LEFT POINTING INDEX..WHITE LEFT POINTING INDEX {0x261D, 0x261D, prEB, gcSo}, // WHITE UP POINTING INDEX {0x261E, 0x261F, prID, gcSo}, // [2] WHITE RIGHT POINTING INDEX..WHITE DOWN POINTING INDEX {0x2620, 0x2638, prAL, gcSo}, // [25] SKULL AND CROSSBONES..WHEEL OF DHARMA {0x2639, 0x263B, prID, gcSo}, // [3] WHITE FROWNING FACE..BLACK SMILING FACE {0x263C, 0x263F, prAL, gcSo}, // [4] WHITE SUN WITH RAYS..MERCURY {0x2640, 0x2640, prAI, gcSo}, // FEMALE SIGN {0x2641, 0x2641, prAL, gcSo}, // EARTH {0x2642, 0x2642, prAI, gcSo}, // MALE SIGN {0x2643, 0x265F, prAL, gcSo}, // [29] JUPITER..BLACK CHESS PAWN {0x2660, 0x2661, prAI, gcSo}, // [2] BLACK SPADE SUIT..WHITE HEART SUIT {0x2662, 0x2662, prAL, gcSo}, // WHITE DIAMOND SUIT {0x2663, 0x2665, prAI, gcSo}, // [3] BLACK CLUB SUIT..BLACK HEART SUIT {0x2666, 0x2666, prAL, gcSo}, // BLACK DIAMOND SUIT {0x2667, 0x2667, prAI, gcSo}, // WHITE CLUB SUIT {0x2668, 0x2668, prID, gcSo}, // HOT SPRINGS {0x2669, 0x266A, prAI, gcSo}, // [2] QUARTER NOTE..EIGHTH NOTE {0x266B, 0x266B, prAL, gcSo}, // BEAMED EIGHTH NOTES {0x266C, 0x266D, prAI, gcSo}, // [2] BEAMED SIXTEENTH NOTES..MUSIC FLAT SIGN {0x266E, 0x266E, prAL, gcSo}, // MUSIC NATURAL SIGN {0x266F, 0x266F, prAI, gcSm}, // MUSIC SHARP SIGN {0x2670, 0x267E, prAL, gcSo}, // [15] WEST SYRIAC CROSS..PERMANENT PAPER SIGN {0x267F, 0x267F, prID, gcSo}, // WHEELCHAIR SYMBOL {0x2680, 0x269D, prAL, gcSo}, // [30] DIE FACE-1..OUTLINED WHITE STAR {0x269E, 0x269F, prAI, gcSo}, // [2] THREE LINES CONVERGING RIGHT..THREE LINES CONVERGING LEFT {0x26A0, 0x26BC, prAL, gcSo}, // [29] WARNING SIGN..SESQUIQUADRATE {0x26BD, 0x26C8, prID, gcSo}, // [12] SOCCER BALL..THUNDER CLOUD AND RAIN {0x26C9, 0x26CC, prAI, gcSo}, // [4] TURNED WHITE SHOGI PIECE..CROSSING LANES {0x26CD, 0x26CD, prID, gcSo}, // DISABLED CAR {0x26CE, 0x26CE, prAL, gcSo}, // OPHIUCHUS {0x26CF, 0x26D1, prID, gcSo}, // [3] PICK..HELMET WITH WHITE CROSS {0x26D2, 0x26D2, prAI, gcSo}, // CIRCLED CROSSING LANES {0x26D3, 0x26D4, prID, gcSo}, // [2] CHAINS..NO ENTRY {0x26D5, 0x26D7, prAI, gcSo}, // [3] ALTERNATE ONE-WAY LEFT WAY TRAFFIC..WHITE TWO-WAY LEFT WAY TRAFFIC {0x26D8, 0x26D9, prID, gcSo}, // [2] BLACK LEFT LANE MERGE..WHITE LEFT LANE MERGE {0x26DA, 0x26DB, prAI, gcSo}, // [2] DRIVE SLOW SIGN..HEAVY WHITE DOWN-POINTING TRIANGLE {0x26DC, 0x26DC, prID, gcSo}, // LEFT CLOSED ENTRY {0x26DD, 0x26DE, prAI, gcSo}, // [2] SQUARED SALTIRE..FALLING DIAGONAL IN WHITE CIRCLE IN BLACK SQUARE {0x26DF, 0x26E1, prID, gcSo}, // [3] BLACK TRUCK..RESTRICTED LEFT ENTRY-2 {0x26E2, 0x26E2, prAL, gcSo}, // ASTRONOMICAL SYMBOL FOR URANUS {0x26E3, 0x26E3, prAI, gcSo}, // HEAVY CIRCLE WITH STROKE AND TWO DOTS ABOVE {0x26E4, 0x26E7, prAL, gcSo}, // [4] PENTAGRAM..INVERTED PENTAGRAM {0x26E8, 0x26E9, prAI, gcSo}, // [2] BLACK CROSS ON SHIELD..SHINTO SHRINE {0x26EA, 0x26EA, prID, gcSo}, // CHURCH {0x26EB, 0x26F0, prAI, gcSo}, // [6] CASTLE..MOUNTAIN {0x26F1, 0x26F5, prID, gcSo}, // [5] UMBRELLA ON GROUND..SAILBOAT {0x26F6, 0x26F6, prAI, gcSo}, // SQUARE FOUR CORNERS {0x26F7, 0x26F8, prID, gcSo}, // [2] SKIER..ICE SKATE {0x26F9, 0x26F9, prEB, gcSo}, // PERSON WITH BALL {0x26FA, 0x26FA, prID, gcSo}, // TENT {0x26FB, 0x26FC, prAI, gcSo}, // [2] JAPANESE BANK SYMBOL..HEADSTONE GRAVEYARD SYMBOL {0x26FD, 0x26FF, prID, gcSo}, // [3] FUEL PUMP..WHITE FLAG WITH HORIZONTAL MIDDLE BLACK STRIPE {0x2700, 0x2704, prID, gcSo}, // [5] BLACK SAFETY SCISSORS..WHITE SCISSORS {0x2705, 0x2707, prAL, gcSo}, // [3] WHITE HEAVY CHECK MARK..TAPE DRIVE {0x2708, 0x2709, prID, gcSo}, // [2] AIRPLANE..ENVELOPE {0x270A, 0x270D, prEB, gcSo}, // [4] RAISED FIST..WRITING HAND {0x270E, 0x2756, prAL, gcSo}, // [73] LOWER RIGHT PENCIL..BLACK DIAMOND MINUS WHITE X {0x2757, 0x2757, prAI, gcSo}, // HEAVY EXCLAMATION MARK SYMBOL {0x2758, 0x275A, prAL, gcSo}, // [3] LIGHT VERTICAL BAR..HEAVY VERTICAL BAR {0x275B, 0x2760, prQU, gcSo}, // [6] HEAVY SINGLE TURNED COMMA QUOTATION MARK ORNAMENT..HEAVY LOW DOUBLE COMMA QUOTATION MARK ORNAMENT {0x2761, 0x2761, prAL, gcSo}, // CURVED STEM PARAGRAPH SIGN ORNAMENT {0x2762, 0x2763, prEX, gcSo}, // [2] HEAVY EXCLAMATION MARK ORNAMENT..HEAVY HEART EXCLAMATION MARK ORNAMENT {0x2764, 0x2764, prID, gcSo}, // HEAVY BLACK HEART {0x2765, 0x2767, prAL, gcSo}, // [3] ROTATED HEAVY BLACK HEART BULLET..ROTATED FLORAL HEART BULLET {0x2768, 0x2768, prOP, gcPs}, // MEDIUM LEFT PARENTHESIS ORNAMENT {0x2769, 0x2769, prCL, gcPe}, // MEDIUM RIGHT PARENTHESIS ORNAMENT {0x276A, 0x276A, prOP, gcPs}, // MEDIUM FLATTENED LEFT PARENTHESIS ORNAMENT {0x276B, 0x276B, prCL, gcPe}, // MEDIUM FLATTENED RIGHT PARENTHESIS ORNAMENT {0x276C, 0x276C, prOP, gcPs}, // MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT {0x276D, 0x276D, prCL, gcPe}, // MEDIUM RIGHT-POINTING ANGLE BRACKET ORNAMENT {0x276E, 0x276E, prOP, gcPs}, // HEAVY LEFT-POINTING ANGLE QUOTATION MARK ORNAMENT {0x276F, 0x276F, prCL, gcPe}, // HEAVY RIGHT-POINTING ANGLE QUOTATION MARK ORNAMENT {0x2770, 0x2770, prOP, gcPs}, // HEAVY LEFT-POINTING ANGLE BRACKET ORNAMENT {0x2771, 0x2771, prCL, gcPe}, // HEAVY RIGHT-POINTING ANGLE BRACKET ORNAMENT {0x2772, 0x2772, prOP, gcPs}, // LIGHT LEFT TORTOISE SHELL BRACKET ORNAMENT {0x2773, 0x2773, prCL, gcPe}, // LIGHT RIGHT TORTOISE SHELL BRACKET ORNAMENT {0x2774, 0x2774, prOP, gcPs}, // MEDIUM LEFT CURLY BRACKET ORNAMENT {0x2775, 0x2775, prCL, gcPe}, // MEDIUM RIGHT CURLY BRACKET ORNAMENT {0x2776, 0x2793, prAI, gcNo}, // [30] DINGBAT NEGATIVE CIRCLED DIGIT ONE..DINGBAT NEGATIVE CIRCLED SANS-SERIF NUMBER TEN {0x2794, 0x27BF, prAL, gcSo}, // [44] HEAVY WIDE-HEADED RIGHTWARDS ARROW..DOUBLE CURLY LOOP {0x27C0, 0x27C4, prAL, gcSm}, // [5] THREE DIMENSIONAL ANGLE..OPEN SUPERSET {0x27C5, 0x27C5, prOP, gcPs}, // LEFT S-SHAPED BAG DELIMITER {0x27C6, 0x27C6, prCL, gcPe}, // RIGHT S-SHAPED BAG DELIMITER {0x27C7, 0x27E5, prAL, gcSm}, // [31] OR WITH DOT INSIDE..WHITE SQUARE WITH RIGHTWARDS TICK {0x27E6, 0x27E6, prOP, gcPs}, // MATHEMATICAL LEFT WHITE SQUARE BRACKET {0x27E7, 0x27E7, prCL, gcPe}, // MATHEMATICAL RIGHT WHITE SQUARE BRACKET {0x27E8, 0x27E8, prOP, gcPs}, // MATHEMATICAL LEFT ANGLE BRACKET {0x27E9, 0x27E9, prCL, gcPe}, // MATHEMATICAL RIGHT ANGLE BRACKET {0x27EA, 0x27EA, prOP, gcPs}, // MATHEMATICAL LEFT DOUBLE ANGLE BRACKET {0x27EB, 0x27EB, prCL, gcPe}, // MATHEMATICAL RIGHT DOUBLE ANGLE BRACKET {0x27EC, 0x27EC, prOP, gcPs}, // MATHEMATICAL LEFT WHITE TORTOISE SHELL BRACKET {0x27ED, 0x27ED, prCL, gcPe}, // MATHEMATICAL RIGHT WHITE TORTOISE SHELL BRACKET {0x27EE, 0x27EE, prOP, gcPs}, // MATHEMATICAL LEFT FLATTENED PARENTHESIS {0x27EF, 0x27EF, prCL, gcPe}, // MATHEMATICAL RIGHT FLATTENED PARENTHESIS {0x27F0, 0x27FF, prAL, gcSm}, // [16] UPWARDS QUADRUPLE ARROW..LONG RIGHTWARDS SQUIGGLE ARROW {0x2800, 0x28FF, prAL, gcSo}, // [256] BRAILLE PATTERN BLANK..BRAILLE PATTERN DOTS-12345678 {0x2900, 0x297F, prAL, gcSm}, // [128] RIGHTWARDS TWO-HEADED ARROW WITH VERTICAL STROKE..DOWN FISH TAIL {0x2980, 0x2982, prAL, gcSm}, // [3] TRIPLE VERTICAL BAR DELIMITER..Z NOTATION TYPE COLON {0x2983, 0x2983, prOP, gcPs}, // LEFT WHITE CURLY BRACKET {0x2984, 0x2984, prCL, gcPe}, // RIGHT WHITE CURLY BRACKET {0x2985, 0x2985, prOP, gcPs}, // LEFT WHITE PARENTHESIS {0x2986, 0x2986, prCL, gcPe}, // RIGHT WHITE PARENTHESIS {0x2987, 0x2987, prOP, gcPs}, // Z NOTATION LEFT IMAGE BRACKET {0x2988, 0x2988, prCL, gcPe}, // Z NOTATION RIGHT IMAGE BRACKET {0x2989, 0x2989, prOP, gcPs}, // Z NOTATION LEFT BINDING BRACKET {0x298A, 0x298A, prCL, gcPe}, // Z NOTATION RIGHT BINDING BRACKET {0x298B, 0x298B, prOP, gcPs}, // LEFT SQUARE BRACKET WITH UNDERBAR {0x298C, 0x298C, prCL, gcPe}, // RIGHT SQUARE BRACKET WITH UNDERBAR {0x298D, 0x298D, prOP, gcPs}, // LEFT SQUARE BRACKET WITH TICK IN TOP CORNER {0x298E, 0x298E, prCL, gcPe}, // RIGHT SQUARE BRACKET WITH TICK IN BOTTOM CORNER {0x298F, 0x298F, prOP, gcPs}, // LEFT SQUARE BRACKET WITH TICK IN BOTTOM CORNER {0x2990, 0x2990, prCL, gcPe}, // RIGHT SQUARE BRACKET WITH TICK IN TOP CORNER {0x2991, 0x2991, prOP, gcPs}, // LEFT ANGLE BRACKET WITH DOT {0x2992, 0x2992, prCL, gcPe}, // RIGHT ANGLE BRACKET WITH DOT {0x2993, 0x2993, prOP, gcPs}, // LEFT ARC LESS-THAN BRACKET {0x2994, 0x2994, prCL, gcPe}, // RIGHT ARC GREATER-THAN BRACKET {0x2995, 0x2995, prOP, gcPs}, // DOUBLE LEFT ARC GREATER-THAN BRACKET {0x2996, 0x2996, prCL, gcPe}, // DOUBLE RIGHT ARC LESS-THAN BRACKET {0x2997, 0x2997, prOP, gcPs}, // LEFT BLACK TORTOISE SHELL BRACKET {0x2998, 0x2998, prCL, gcPe}, // RIGHT BLACK TORTOISE SHELL BRACKET {0x2999, 0x29D7, prAL, gcSm}, // [63] DOTTED FENCE..BLACK HOURGLASS {0x29D8, 0x29D8, prOP, gcPs}, // LEFT WIGGLY FENCE {0x29D9, 0x29D9, prCL, gcPe}, // RIGHT WIGGLY FENCE {0x29DA, 0x29DA, prOP, gcPs}, // LEFT DOUBLE WIGGLY FENCE {0x29DB, 0x29DB, prCL, gcPe}, // RIGHT DOUBLE WIGGLY FENCE {0x29DC, 0x29FB, prAL, gcSm}, // [32] INCOMPLETE INFINITY..TRIPLE PLUS {0x29FC, 0x29FC, prOP, gcPs}, // LEFT-POINTING CURVED ANGLE BRACKET {0x29FD, 0x29FD, prCL, gcPe}, // RIGHT-POINTING CURVED ANGLE BRACKET {0x29FE, 0x29FF, prAL, gcSm}, // [2] TINY..MINY {0x2A00, 0x2AFF, prAL, gcSm}, // [256] N-ARY CIRCLED DOT OPERATOR..N-ARY WHITE VERTICAL BAR {0x2B00, 0x2B2F, prAL, gcSo}, // [48] NORTH EAST WHITE ARROW..WHITE VERTICAL ELLIPSE {0x2B30, 0x2B44, prAL, gcSm}, // [21] LEFT ARROW WITH SMALL CIRCLE..RIGHTWARDS ARROW THROUGH SUPERSET {0x2B45, 0x2B46, prAL, gcSo}, // [2] LEFTWARDS QUADRUPLE ARROW..RIGHTWARDS QUADRUPLE ARROW {0x2B47, 0x2B4C, prAL, gcSm}, // [6] REVERSE TILDE OPERATOR ABOVE RIGHTWARDS ARROW..RIGHTWARDS ARROW ABOVE REVERSE TILDE OPERATOR {0x2B4D, 0x2B54, prAL, gcSo}, // [8] DOWNWARDS TRIANGLE-HEADED ZIGZAG ARROW..WHITE RIGHT-POINTING PENTAGON {0x2B55, 0x2B59, prAI, gcSo}, // [5] HEAVY LARGE CIRCLE..HEAVY CIRCLED SALTIRE {0x2B5A, 0x2B73, prAL, gcSo}, // [26] SLANTED NORTH ARROW WITH HOOKED HEAD..DOWNWARDS TRIANGLE-HEADED ARROW TO BAR {0x2B76, 0x2B95, prAL, gcSo}, // [32] NORTH WEST TRIANGLE-HEADED ARROW TO BAR..RIGHTWARDS BLACK ARROW {0x2B97, 0x2BFF, prAL, gcSo}, // [105] SYMBOL FOR TYPE A ELECTRONICS..HELLSCHREIBER PAUSE SYMBOL {0x2C00, 0x2C5F, prAL, gcLC}, // [96] GLAGOLITIC CAPITAL LETTER AZU..GLAGOLITIC SMALL LETTER CAUDATE CHRIVI {0x2C60, 0x2C7B, prAL, gcLC}, // [28] LATIN CAPITAL LETTER L WITH DOUBLE BAR..LATIN LETTER SMALL CAPITAL TURNED E {0x2C7C, 0x2C7D, prAL, gcLm}, // [2] LATIN SUBSCRIPT SMALL LETTER J..MODIFIER LETTER CAPITAL V {0x2C7E, 0x2C7F, prAL, gcLu}, // [2] LATIN CAPITAL LETTER S WITH SWASH TAIL..LATIN CAPITAL LETTER Z WITH SWASH TAIL {0x2C80, 0x2CE4, prAL, gcLC}, // [101] COPTIC CAPITAL LETTER ALFA..COPTIC SYMBOL KAI {0x2CE5, 0x2CEA, prAL, gcSo}, // [6] COPTIC SYMBOL MI RO..COPTIC SYMBOL SHIMA SIMA {0x2CEB, 0x2CEE, prAL, gcLC}, // [4] COPTIC CAPITAL LETTER CRYPTOGRAMMIC SHEI..COPTIC SMALL LETTER CRYPTOGRAMMIC GANGIA {0x2CEF, 0x2CF1, prCM, gcMn}, // [3] COPTIC COMBINING NI ABOVE..COPTIC COMBINING SPIRITUS LENIS {0x2CF2, 0x2CF3, prAL, gcLC}, // [2] COPTIC CAPITAL LETTER BOHAIRIC KHEI..COPTIC SMALL LETTER BOHAIRIC KHEI {0x2CF9, 0x2CF9, prEX, gcPo}, // COPTIC OLD NUBIAN FULL STOP {0x2CFA, 0x2CFC, prBA, gcPo}, // [3] COPTIC OLD NUBIAN DIRECT QUESTION MARK..COPTIC OLD NUBIAN VERSE DIVIDER {0x2CFD, 0x2CFD, prAL, gcNo}, // COPTIC FRACTION ONE HALF {0x2CFE, 0x2CFE, prEX, gcPo}, // COPTIC FULL STOP {0x2CFF, 0x2CFF, prBA, gcPo}, // COPTIC MORPHOLOGICAL DIVIDER {0x2D00, 0x2D25, prAL, gcLl}, // [38] GEORGIAN SMALL LETTER AN..GEORGIAN SMALL LETTER HOE {0x2D27, 0x2D27, prAL, gcLl}, // GEORGIAN SMALL LETTER YN {0x2D2D, 0x2D2D, prAL, gcLl}, // GEORGIAN SMALL LETTER AEN {0x2D30, 0x2D67, prAL, gcLo}, // [56] TIFINAGH LETTER YA..TIFINAGH LETTER YO {0x2D6F, 0x2D6F, prAL, gcLm}, // TIFINAGH MODIFIER LETTER LABIALIZATION MARK {0x2D70, 0x2D70, prBA, gcPo}, // TIFINAGH SEPARATOR MARK {0x2D7F, 0x2D7F, prCM, gcMn}, // TIFINAGH CONSONANT JOINER {0x2D80, 0x2D96, prAL, gcLo}, // [23] ETHIOPIC SYLLABLE LOA..ETHIOPIC SYLLABLE GGWE {0x2DA0, 0x2DA6, prAL, gcLo}, // [7] ETHIOPIC SYLLABLE SSA..ETHIOPIC SYLLABLE SSO {0x2DA8, 0x2DAE, prAL, gcLo}, // [7] ETHIOPIC SYLLABLE CCA..ETHIOPIC SYLLABLE CCO {0x2DB0, 0x2DB6, prAL, gcLo}, // [7] ETHIOPIC SYLLABLE ZZA..ETHIOPIC SYLLABLE ZZO {0x2DB8, 0x2DBE, prAL, gcLo}, // [7] ETHIOPIC SYLLABLE CCHA..ETHIOPIC SYLLABLE CCHO {0x2DC0, 0x2DC6, prAL, gcLo}, // [7] ETHIOPIC SYLLABLE QYA..ETHIOPIC SYLLABLE QYO {0x2DC8, 0x2DCE, prAL, gcLo}, // [7] ETHIOPIC SYLLABLE KYA..ETHIOPIC SYLLABLE KYO {0x2DD0, 0x2DD6, prAL, gcLo}, // [7] ETHIOPIC SYLLABLE XYA..ETHIOPIC SYLLABLE XYO {0x2DD8, 0x2DDE, prAL, gcLo}, // [7] ETHIOPIC SYLLABLE GYA..ETHIOPIC SYLLABLE GYO {0x2DE0, 0x2DFF, prCM, gcMn}, // [32] COMBINING CYRILLIC LETTER BE..COMBINING CYRILLIC LETTER IOTIFIED BIG YUS {0x2E00, 0x2E01, prQU, gcPo}, // [2] RIGHT ANGLE SUBSTITUTION MARKER..RIGHT ANGLE DOTTED SUBSTITUTION MARKER {0x2E02, 0x2E02, prQU, gcPi}, // LEFT SUBSTITUTION BRACKET {0x2E03, 0x2E03, prQU, gcPf}, // RIGHT SUBSTITUTION BRACKET {0x2E04, 0x2E04, prQU, gcPi}, // LEFT DOTTED SUBSTITUTION BRACKET {0x2E05, 0x2E05, prQU, gcPf}, // RIGHT DOTTED SUBSTITUTION BRACKET {0x2E06, 0x2E08, prQU, gcPo}, // [3] RAISED INTERPOLATION MARKER..DOTTED TRANSPOSITION MARKER {0x2E09, 0x2E09, prQU, gcPi}, // LEFT TRANSPOSITION BRACKET {0x2E0A, 0x2E0A, prQU, gcPf}, // RIGHT TRANSPOSITION BRACKET {0x2E0B, 0x2E0B, prQU, gcPo}, // RAISED SQUARE {0x2E0C, 0x2E0C, prQU, gcPi}, // LEFT RAISED OMISSION BRACKET {0x2E0D, 0x2E0D, prQU, gcPf}, // RIGHT RAISED OMISSION BRACKET {0x2E0E, 0x2E15, prBA, gcPo}, // [8] EDITORIAL CORONIS..UPWARDS ANCORA {0x2E16, 0x2E16, prAL, gcPo}, // DOTTED RIGHT-POINTING ANGLE {0x2E17, 0x2E17, prBA, gcPd}, // DOUBLE OBLIQUE HYPHEN {0x2E18, 0x2E18, prOP, gcPo}, // INVERTED INTERROBANG {0x2E19, 0x2E19, prBA, gcPo}, // PALM BRANCH {0x2E1A, 0x2E1A, prAL, gcPd}, // HYPHEN WITH DIAERESIS {0x2E1B, 0x2E1B, prAL, gcPo}, // TILDE WITH RING ABOVE {0x2E1C, 0x2E1C, prQU, gcPi}, // LEFT LOW PARAPHRASE BRACKET {0x2E1D, 0x2E1D, prQU, gcPf}, // RIGHT LOW PARAPHRASE BRACKET {0x2E1E, 0x2E1F, prAL, gcPo}, // [2] TILDE WITH DOT ABOVE..TILDE WITH DOT BELOW {0x2E20, 0x2E20, prQU, gcPi}, // LEFT VERTICAL BAR WITH QUILL {0x2E21, 0x2E21, prQU, gcPf}, // RIGHT VERTICAL BAR WITH QUILL {0x2E22, 0x2E22, prOP, gcPs}, // TOP LEFT HALF BRACKET {0x2E23, 0x2E23, prCL, gcPe}, // TOP RIGHT HALF BRACKET {0x2E24, 0x2E24, prOP, gcPs}, // BOTTOM LEFT HALF BRACKET {0x2E25, 0x2E25, prCL, gcPe}, // BOTTOM RIGHT HALF BRACKET {0x2E26, 0x2E26, prOP, gcPs}, // LEFT SIDEWAYS U BRACKET {0x2E27, 0x2E27, prCL, gcPe}, // RIGHT SIDEWAYS U BRACKET {0x2E28, 0x2E28, prOP, gcPs}, // LEFT DOUBLE PARENTHESIS {0x2E29, 0x2E29, prCL, gcPe}, // RIGHT DOUBLE PARENTHESIS {0x2E2A, 0x2E2D, prBA, gcPo}, // [4] TWO DOTS OVER ONE DOT PUNCTUATION..FIVE DOT MARK {0x2E2E, 0x2E2E, prEX, gcPo}, // REVERSED QUESTION MARK {0x2E2F, 0x2E2F, prAL, gcLm}, // VERTICAL TILDE {0x2E30, 0x2E31, prBA, gcPo}, // [2] RING POINT..WORD SEPARATOR MIDDLE DOT {0x2E32, 0x2E32, prAL, gcPo}, // TURNED COMMA {0x2E33, 0x2E34, prBA, gcPo}, // [2] RAISED DOT..RAISED COMMA {0x2E35, 0x2E39, prAL, gcPo}, // [5] TURNED SEMICOLON..TOP HALF SECTION SIGN {0x2E3A, 0x2E3B, prB2, gcPd}, // [2] TWO-EM DASH..THREE-EM DASH {0x2E3C, 0x2E3E, prBA, gcPo}, // [3] STENOGRAPHIC FULL STOP..WIGGLY VERTICAL LINE {0x2E3F, 0x2E3F, prAL, gcPo}, // CAPITULUM {0x2E40, 0x2E40, prBA, gcPd}, // DOUBLE HYPHEN {0x2E41, 0x2E41, prBA, gcPo}, // REVERSED COMMA {0x2E42, 0x2E42, prOP, gcPs}, // DOUBLE LOW-REVERSED-9 QUOTATION MARK {0x2E43, 0x2E4A, prBA, gcPo}, // [8] DASH WITH LEFT UPTURN..DOTTED SOLIDUS {0x2E4B, 0x2E4B, prAL, gcPo}, // TRIPLE DAGGER {0x2E4C, 0x2E4C, prBA, gcPo}, // MEDIEVAL COMMA {0x2E4D, 0x2E4D, prAL, gcPo}, // PARAGRAPHUS MARK {0x2E4E, 0x2E4F, prBA, gcPo}, // [2] PUNCTUS ELEVATUS MARK..CORNISH VERSE DIVIDER {0x2E50, 0x2E51, prAL, gcSo}, // [2] CROSS PATTY WITH RIGHT CROSSBAR..CROSS PATTY WITH LEFT CROSSBAR {0x2E52, 0x2E52, prAL, gcPo}, // TIRONIAN SIGN CAPITAL ET {0x2E53, 0x2E54, prEX, gcPo}, // [2] MEDIEVAL EXCLAMATION MARK..MEDIEVAL QUESTION MARK {0x2E55, 0x2E55, prOP, gcPs}, // LEFT SQUARE BRACKET WITH STROKE {0x2E56, 0x2E56, prCL, gcPe}, // RIGHT SQUARE BRACKET WITH STROKE {0x2E57, 0x2E57, prOP, gcPs}, // LEFT SQUARE BRACKET WITH DOUBLE STROKE {0x2E58, 0x2E58, prCL, gcPe}, // RIGHT SQUARE BRACKET WITH DOUBLE STROKE {0x2E59, 0x2E59, prOP, gcPs}, // TOP HALF LEFT PARENTHESIS {0x2E5A, 0x2E5A, prCL, gcPe}, // TOP HALF RIGHT PARENTHESIS {0x2E5B, 0x2E5B, prOP, gcPs}, // BOTTOM HALF LEFT PARENTHESIS {0x2E5C, 0x2E5C, prCL, gcPe}, // BOTTOM HALF RIGHT PARENTHESIS {0x2E5D, 0x2E5D, prBA, gcPd}, // OBLIQUE HYPHEN {0x2E80, 0x2E99, prID, gcSo}, // [26] CJK RADICAL REPEAT..CJK RADICAL RAP {0x2E9B, 0x2EF3, prID, gcSo}, // [89] CJK RADICAL CHOKE..CJK RADICAL C-SIMPLIFIED TURTLE {0x2F00, 0x2FD5, prID, gcSo}, // [214] KANGXI RADICAL ONE..KANGXI RADICAL FLUTE {0x2FF0, 0x2FFB, prID, gcSo}, // [12] IDEOGRAPHIC DESCRIPTION CHARACTER LEFT TO RIGHT..IDEOGRAPHIC DESCRIPTION CHARACTER OVERLAID {0x3000, 0x3000, prBA, gcZs}, // IDEOGRAPHIC SPACE {0x3001, 0x3002, prCL, gcPo}, // [2] IDEOGRAPHIC COMMA..IDEOGRAPHIC FULL STOP {0x3003, 0x3003, prID, gcPo}, // DITTO MARK {0x3004, 0x3004, prID, gcSo}, // JAPANESE INDUSTRIAL STANDARD SYMBOL {0x3005, 0x3005, prNS, gcLm}, // IDEOGRAPHIC ITERATION MARK {0x3006, 0x3006, prID, gcLo}, // IDEOGRAPHIC CLOSING MARK {0x3007, 0x3007, prID, gcNl}, // IDEOGRAPHIC NUMBER ZERO {0x3008, 0x3008, prOP, gcPs}, // LEFT ANGLE BRACKET {0x3009, 0x3009, prCL, gcPe}, // RIGHT ANGLE BRACKET {0x300A, 0x300A, prOP, gcPs}, // LEFT DOUBLE ANGLE BRACKET {0x300B, 0x300B, prCL, gcPe}, // RIGHT DOUBLE ANGLE BRACKET {0x300C, 0x300C, prOP, gcPs}, // LEFT CORNER BRACKET {0x300D, 0x300D, prCL, gcPe}, // RIGHT CORNER BRACKET {0x300E, 0x300E, prOP, gcPs}, // LEFT WHITE CORNER BRACKET {0x300F, 0x300F, prCL, gcPe}, // RIGHT WHITE CORNER BRACKET {0x3010, 0x3010, prOP, gcPs}, // LEFT BLACK LENTICULAR BRACKET {0x3011, 0x3011, prCL, gcPe}, // RIGHT BLACK LENTICULAR BRACKET {0x3012, 0x3013, prID, gcSo}, // [2] POSTAL MARK..GETA MARK {0x3014, 0x3014, prOP, gcPs}, // LEFT TORTOISE SHELL BRACKET {0x3015, 0x3015, prCL, gcPe}, // RIGHT TORTOISE SHELL BRACKET {0x3016, 0x3016, prOP, gcPs}, // LEFT WHITE LENTICULAR BRACKET {0x3017, 0x3017, prCL, gcPe}, // RIGHT WHITE LENTICULAR BRACKET {0x3018, 0x3018, prOP, gcPs}, // LEFT WHITE TORTOISE SHELL BRACKET {0x3019, 0x3019, prCL, gcPe}, // RIGHT WHITE TORTOISE SHELL BRACKET {0x301A, 0x301A, prOP, gcPs}, // LEFT WHITE SQUARE BRACKET {0x301B, 0x301B, prCL, gcPe}, // RIGHT WHITE SQUARE BRACKET {0x301C, 0x301C, prNS, gcPd}, // WAVE DASH {0x301D, 0x301D, prOP, gcPs}, // REVERSED DOUBLE PRIME QUOTATION MARK {0x301E, 0x301F, prCL, gcPe}, // [2] DOUBLE PRIME QUOTATION MARK..LOW DOUBLE PRIME QUOTATION MARK {0x3020, 0x3020, prID, gcSo}, // POSTAL MARK FACE {0x3021, 0x3029, prID, gcNl}, // [9] HANGZHOU NUMERAL ONE..HANGZHOU NUMERAL NINE {0x302A, 0x302D, prCM, gcMn}, // [4] IDEOGRAPHIC LEVEL TONE MARK..IDEOGRAPHIC ENTERING TONE MARK {0x302E, 0x302F, prCM, gcMc}, // [2] HANGUL SINGLE DOT TONE MARK..HANGUL DOUBLE DOT TONE MARK {0x3030, 0x3030, prID, gcPd}, // WAVY DASH {0x3031, 0x3034, prID, gcLm}, // [4] VERTICAL KANA REPEAT MARK..VERTICAL KANA REPEAT WITH VOICED SOUND MARK UPPER HALF {0x3035, 0x3035, prCM, gcLm}, // VERTICAL KANA REPEAT MARK LOWER HALF {0x3036, 0x3037, prID, gcSo}, // [2] CIRCLED POSTAL MARK..IDEOGRAPHIC TELEGRAPH LINE FEED SEPARATOR SYMBOL {0x3038, 0x303A, prID, gcNl}, // [3] HANGZHOU NUMERAL TEN..HANGZHOU NUMERAL THIRTY {0x303B, 0x303B, prNS, gcLm}, // VERTICAL IDEOGRAPHIC ITERATION MARK {0x303C, 0x303C, prNS, gcLo}, // MASU MARK {0x303D, 0x303D, prID, gcPo}, // PART ALTERNATION MARK {0x303E, 0x303F, prID, gcSo}, // [2] IDEOGRAPHIC VARIATION INDICATOR..IDEOGRAPHIC HALF FILL SPACE {0x3041, 0x3041, prCJ, gcLo}, // HIRAGANA LETTER SMALL A {0x3042, 0x3042, prID, gcLo}, // HIRAGANA LETTER A {0x3043, 0x3043, prCJ, gcLo}, // HIRAGANA LETTER SMALL I {0x3044, 0x3044, prID, gcLo}, // HIRAGANA LETTER I {0x3045, 0x3045, prCJ, gcLo}, // HIRAGANA LETTER SMALL U {0x3046, 0x3046, prID, gcLo}, // HIRAGANA LETTER U {0x3047, 0x3047, prCJ, gcLo}, // HIRAGANA LETTER SMALL E {0x3048, 0x3048, prID, gcLo}, // HIRAGANA LETTER E {0x3049, 0x3049, prCJ, gcLo}, // HIRAGANA LETTER SMALL O {0x304A, 0x3062, prID, gcLo}, // [25] HIRAGANA LETTER O..HIRAGANA LETTER DI {0x3063, 0x3063, prCJ, gcLo}, // HIRAGANA LETTER SMALL TU {0x3064, 0x3082, prID, gcLo}, // [31] HIRAGANA LETTER TU..HIRAGANA LETTER MO {0x3083, 0x3083, prCJ, gcLo}, // HIRAGANA LETTER SMALL YA {0x3084, 0x3084, prID, gcLo}, // HIRAGANA LETTER YA {0x3085, 0x3085, prCJ, gcLo}, // HIRAGANA LETTER SMALL YU {0x3086, 0x3086, prID, gcLo}, // HIRAGANA LETTER YU {0x3087, 0x3087, prCJ, gcLo}, // HIRAGANA LETTER SMALL YO {0x3088, 0x308D, prID, gcLo}, // [6] HIRAGANA LETTER YO..HIRAGANA LETTER RO {0x308E, 0x308E, prCJ, gcLo}, // HIRAGANA LETTER SMALL WA {0x308F, 0x3094, prID, gcLo}, // [6] HIRAGANA LETTER WA..HIRAGANA LETTER VU {0x3095, 0x3096, prCJ, gcLo}, // [2] HIRAGANA LETTER SMALL KA..HIRAGANA LETTER SMALL KE {0x3099, 0x309A, prCM, gcMn}, // [2] COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK {0x309B, 0x309C, prNS, gcSk}, // [2] KATAKANA-HIRAGANA VOICED SOUND MARK..KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK {0x309D, 0x309E, prNS, gcLm}, // [2] HIRAGANA ITERATION MARK..HIRAGANA VOICED ITERATION MARK {0x309F, 0x309F, prID, gcLo}, // HIRAGANA DIGRAPH YORI {0x30A0, 0x30A0, prNS, gcPd}, // KATAKANA-HIRAGANA DOUBLE HYPHEN {0x30A1, 0x30A1, prCJ, gcLo}, // KATAKANA LETTER SMALL A {0x30A2, 0x30A2, prID, gcLo}, // KATAKANA LETTER A {0x30A3, 0x30A3, prCJ, gcLo}, // KATAKANA LETTER SMALL I {0x30A4, 0x30A4, prID, gcLo}, // KATAKANA LETTER I {0x30A5, 0x30A5, prCJ, gcLo}, // KATAKANA LETTER SMALL U {0x30A6, 0x30A6, prID, gcLo}, // KATAKANA LETTER U {0x30A7, 0x30A7, prCJ, gcLo}, // KATAKANA LETTER SMALL E {0x30A8, 0x30A8, prID, gcLo}, // KATAKANA LETTER E {0x30A9, 0x30A9, prCJ, gcLo}, // KATAKANA LETTER SMALL O {0x30AA, 0x30C2, prID, gcLo}, // [25] KATAKANA LETTER O..KATAKANA LETTER DI {0x30C3, 0x30C3, prCJ, gcLo}, // KATAKANA LETTER SMALL TU {0x30C4, 0x30E2, prID, gcLo}, // [31] KATAKANA LETTER TU..KATAKANA LETTER MO {0x30E3, 0x30E3, prCJ, gcLo}, // KATAKANA LETTER SMALL YA {0x30E4, 0x30E4, prID, gcLo}, // KATAKANA LETTER YA {0x30E5, 0x30E5, prCJ, gcLo}, // KATAKANA LETTER SMALL YU {0x30E6, 0x30E6, prID, gcLo}, // KATAKANA LETTER YU {0x30E7, 0x30E7, prCJ, gcLo}, // KATAKANA LETTER SMALL YO {0x30E8, 0x30ED, prID, gcLo}, // [6] KATAKANA LETTER YO..KATAKANA LETTER RO {0x30EE, 0x30EE, prCJ, gcLo}, // KATAKANA LETTER SMALL WA {0x30EF, 0x30F4, prID, gcLo}, // [6] KATAKANA LETTER WA..KATAKANA LETTER VU {0x30F5, 0x30F6, prCJ, gcLo}, // [2] KATAKANA LETTER SMALL KA..KATAKANA LETTER SMALL KE {0x30F7, 0x30FA, prID, gcLo}, // [4] KATAKANA LETTER VA..KATAKANA LETTER VO {0x30FB, 0x30FB, prNS, gcPo}, // KATAKANA MIDDLE DOT {0x30FC, 0x30FC, prCJ, gcLm}, // KATAKANA-HIRAGANA PROLONGED SOUND MARK {0x30FD, 0x30FE, prNS, gcLm}, // [2] KATAKANA ITERATION MARK..KATAKANA VOICED ITERATION MARK {0x30FF, 0x30FF, prID, gcLo}, // KATAKANA DIGRAPH KOTO {0x3105, 0x312F, prID, gcLo}, // [43] BOPOMOFO LETTER B..BOPOMOFO LETTER NN {0x3131, 0x318E, prID, gcLo}, // [94] HANGUL LETTER KIYEOK..HANGUL LETTER ARAEAE {0x3190, 0x3191, prID, gcSo}, // [2] IDEOGRAPHIC ANNOTATION LINKING MARK..IDEOGRAPHIC ANNOTATION REVERSE MARK {0x3192, 0x3195, prID, gcNo}, // [4] IDEOGRAPHIC ANNOTATION ONE MARK..IDEOGRAPHIC ANNOTATION FOUR MARK {0x3196, 0x319F, prID, gcSo}, // [10] IDEOGRAPHIC ANNOTATION TOP MARK..IDEOGRAPHIC ANNOTATION MAN MARK {0x31A0, 0x31BF, prID, gcLo}, // [32] BOPOMOFO LETTER BU..BOPOMOFO LETTER AH {0x31C0, 0x31E3, prID, gcSo}, // [36] CJK STROKE T..CJK STROKE Q {0x31F0, 0x31FF, prCJ, gcLo}, // [16] KATAKANA LETTER SMALL KU..KATAKANA LETTER SMALL RO {0x3200, 0x321E, prID, gcSo}, // [31] PARENTHESIZED HANGUL KIYEOK..PARENTHESIZED KOREAN CHARACTER O HU {0x3220, 0x3229, prID, gcNo}, // [10] PARENTHESIZED IDEOGRAPH ONE..PARENTHESIZED IDEOGRAPH TEN {0x322A, 0x3247, prID, gcSo}, // [30] PARENTHESIZED IDEOGRAPH MOON..CIRCLED IDEOGRAPH KOTO {0x3248, 0x324F, prAI, gcNo}, // [8] CIRCLED NUMBER TEN ON BLACK SQUARE..CIRCLED NUMBER EIGHTY ON BLACK SQUARE {0x3250, 0x3250, prID, gcSo}, // PARTNERSHIP SIGN {0x3251, 0x325F, prID, gcNo}, // [15] CIRCLED NUMBER TWENTY ONE..CIRCLED NUMBER THIRTY FIVE {0x3260, 0x327F, prID, gcSo}, // [32] CIRCLED HANGUL KIYEOK..KOREAN STANDARD SYMBOL {0x3280, 0x3289, prID, gcNo}, // [10] CIRCLED IDEOGRAPH ONE..CIRCLED IDEOGRAPH TEN {0x328A, 0x32B0, prID, gcSo}, // [39] CIRCLED IDEOGRAPH MOON..CIRCLED IDEOGRAPH NIGHT {0x32B1, 0x32BF, prID, gcNo}, // [15] CIRCLED NUMBER THIRTY SIX..CIRCLED NUMBER FIFTY {0x32C0, 0x32FF, prID, gcSo}, // [64] IDEOGRAPHIC TELEGRAPH SYMBOL FOR JANUARY..SQUARE ERA NAME REIWA {0x3300, 0x33FF, prID, gcSo}, // [256] SQUARE APAATO..SQUARE GAL {0x3400, 0x4DBF, prID, gcLo}, // [6592] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DBF {0x4DC0, 0x4DFF, prAL, gcSo}, // [64] HEXAGRAM FOR THE CREATIVE HEAVEN..HEXAGRAM FOR BEFORE COMPLETION {0x4E00, 0x9FFF, prID, gcLo}, // [20992] CJK UNIFIED IDEOGRAPH-4E00..CJK UNIFIED IDEOGRAPH-9FFF {0xA000, 0xA014, prID, gcLo}, // [21] YI SYLLABLE IT..YI SYLLABLE E {0xA015, 0xA015, prNS, gcLm}, // YI SYLLABLE WU {0xA016, 0xA48C, prID, gcLo}, // [1143] YI SYLLABLE BIT..YI SYLLABLE YYR {0xA490, 0xA4C6, prID, gcSo}, // [55] YI RADICAL QOT..YI RADICAL KE {0xA4D0, 0xA4F7, prAL, gcLo}, // [40] LISU LETTER BA..LISU LETTER OE {0xA4F8, 0xA4FD, prAL, gcLm}, // [6] LISU LETTER TONE MYA TI..LISU LETTER TONE MYA JEU {0xA4FE, 0xA4FF, prBA, gcPo}, // [2] LISU PUNCTUATION COMMA..LISU PUNCTUATION FULL STOP {0xA500, 0xA60B, prAL, gcLo}, // [268] VAI SYLLABLE EE..VAI SYLLABLE NG {0xA60C, 0xA60C, prAL, gcLm}, // VAI SYLLABLE LENGTHENER {0xA60D, 0xA60D, prBA, gcPo}, // VAI COMMA {0xA60E, 0xA60E, prEX, gcPo}, // VAI FULL STOP {0xA60F, 0xA60F, prBA, gcPo}, // VAI QUESTION MARK {0xA610, 0xA61F, prAL, gcLo}, // [16] VAI SYLLABLE NDOLE FA..VAI SYMBOL JONG {0xA620, 0xA629, prNU, gcNd}, // [10] VAI DIGIT ZERO..VAI DIGIT NINE {0xA62A, 0xA62B, prAL, gcLo}, // [2] VAI SYLLABLE NDOLE MA..VAI SYLLABLE NDOLE DO {0xA640, 0xA66D, prAL, gcLC}, // [46] CYRILLIC CAPITAL LETTER ZEMLYA..CYRILLIC SMALL LETTER DOUBLE MONOCULAR O {0xA66E, 0xA66E, prAL, gcLo}, // CYRILLIC LETTER MULTIOCULAR O {0xA66F, 0xA66F, prCM, gcMn}, // COMBINING CYRILLIC VZMET {0xA670, 0xA672, prCM, gcMe}, // [3] COMBINING CYRILLIC TEN MILLIONS SIGN..COMBINING CYRILLIC THOUSAND MILLIONS SIGN {0xA673, 0xA673, prAL, gcPo}, // SLAVONIC ASTERISK {0xA674, 0xA67D, prCM, gcMn}, // [10] COMBINING CYRILLIC LETTER UKRAINIAN IE..COMBINING CYRILLIC PAYEROK {0xA67E, 0xA67E, prAL, gcPo}, // CYRILLIC KAVYKA {0xA67F, 0xA67F, prAL, gcLm}, // CYRILLIC PAYEROK {0xA680, 0xA69B, prAL, gcLC}, // [28] CYRILLIC CAPITAL LETTER DWE..CYRILLIC SMALL LETTER CROSSED O {0xA69C, 0xA69D, prAL, gcLm}, // [2] MODIFIER LETTER CYRILLIC HARD SIGN..MODIFIER LETTER CYRILLIC SOFT SIGN {0xA69E, 0xA69F, prCM, gcMn}, // [2] COMBINING CYRILLIC LETTER EF..COMBINING CYRILLIC LETTER IOTIFIED E {0xA6A0, 0xA6E5, prAL, gcLo}, // [70] BAMUM LETTER A..BAMUM LETTER KI {0xA6E6, 0xA6EF, prAL, gcNl}, // [10] BAMUM LETTER MO..BAMUM LETTER KOGHOM {0xA6F0, 0xA6F1, prCM, gcMn}, // [2] BAMUM COMBINING MARK KOQNDON..BAMUM COMBINING MARK TUKWENTIS {0xA6F2, 0xA6F2, prAL, gcPo}, // BAMUM NJAEMLI {0xA6F3, 0xA6F7, prBA, gcPo}, // [5] BAMUM FULL STOP..BAMUM QUESTION MARK {0xA700, 0xA716, prAL, gcSk}, // [23] MODIFIER LETTER CHINESE TONE YIN PING..MODIFIER LETTER EXTRA-LOW LEFT-STEM TONE BAR {0xA717, 0xA71F, prAL, gcLm}, // [9] MODIFIER LETTER DOT VERTICAL BAR..MODIFIER LETTER LOW INVERTED EXCLAMATION MARK {0xA720, 0xA721, prAL, gcSk}, // [2] MODIFIER LETTER STRESS AND HIGH TONE..MODIFIER LETTER STRESS AND LOW TONE {0xA722, 0xA76F, prAL, gcLC}, // [78] LATIN CAPITAL LETTER EGYPTOLOGICAL ALEF..LATIN SMALL LETTER CON {0xA770, 0xA770, prAL, gcLm}, // MODIFIER LETTER US {0xA771, 0xA787, prAL, gcLC}, // [23] LATIN SMALL LETTER DUM..LATIN SMALL LETTER INSULAR T {0xA788, 0xA788, prAL, gcLm}, // MODIFIER LETTER LOW CIRCUMFLEX ACCENT {0xA789, 0xA78A, prAL, gcSk}, // [2] MODIFIER LETTER COLON..MODIFIER LETTER SHORT EQUALS SIGN {0xA78B, 0xA78E, prAL, gcLC}, // [4] LATIN CAPITAL LETTER SALTILLO..LATIN SMALL LETTER L WITH RETROFLEX HOOK AND BELT {0xA78F, 0xA78F, prAL, gcLo}, // LATIN LETTER SINOLOGICAL DOT {0xA790, 0xA7CA, prAL, gcLC}, // [59] LATIN CAPITAL LETTER N WITH DESCENDER..LATIN SMALL LETTER S WITH SHORT STROKE OVERLAY {0xA7D0, 0xA7D1, prAL, gcLC}, // [2] LATIN CAPITAL LETTER CLOSED INSULAR G..LATIN SMALL LETTER CLOSED INSULAR G {0xA7D3, 0xA7D3, prAL, gcLl}, // LATIN SMALL LETTER DOUBLE THORN {0xA7D5, 0xA7D9, prAL, gcLC}, // [5] LATIN SMALL LETTER DOUBLE WYNN..LATIN SMALL LETTER SIGMOID S {0xA7F2, 0xA7F4, prAL, gcLm}, // [3] MODIFIER LETTER CAPITAL C..MODIFIER LETTER CAPITAL Q {0xA7F5, 0xA7F6, prAL, gcLC}, // [2] LATIN CAPITAL LETTER REVERSED HALF H..LATIN SMALL LETTER REVERSED HALF H {0xA7F7, 0xA7F7, prAL, gcLo}, // LATIN EPIGRAPHIC LETTER SIDEWAYS I {0xA7F8, 0xA7F9, prAL, gcLm}, // [2] MODIFIER LETTER CAPITAL H WITH STROKE..MODIFIER LETTER SMALL LIGATURE OE {0xA7FA, 0xA7FA, prAL, gcLl}, // LATIN LETTER SMALL CAPITAL TURNED M {0xA7FB, 0xA7FF, prAL, gcLo}, // [5] LATIN EPIGRAPHIC LETTER REVERSED F..LATIN EPIGRAPHIC LETTER ARCHAIC M {0xA800, 0xA801, prAL, gcLo}, // [2] SYLOTI NAGRI LETTER A..SYLOTI NAGRI LETTER I {0xA802, 0xA802, prCM, gcMn}, // SYLOTI NAGRI SIGN DVISVARA {0xA803, 0xA805, prAL, gcLo}, // [3] SYLOTI NAGRI LETTER U..SYLOTI NAGRI LETTER O {0xA806, 0xA806, prCM, gcMn}, // SYLOTI NAGRI SIGN HASANTA {0xA807, 0xA80A, prAL, gcLo}, // [4] SYLOTI NAGRI LETTER KO..SYLOTI NAGRI LETTER GHO {0xA80B, 0xA80B, prCM, gcMn}, // SYLOTI NAGRI SIGN ANUSVARA {0xA80C, 0xA822, prAL, gcLo}, // [23] SYLOTI NAGRI LETTER CO..SYLOTI NAGRI LETTER HO {0xA823, 0xA824, prCM, gcMc}, // [2] SYLOTI NAGRI VOWEL SIGN A..SYLOTI NAGRI VOWEL SIGN I {0xA825, 0xA826, prCM, gcMn}, // [2] SYLOTI NAGRI VOWEL SIGN U..SYLOTI NAGRI VOWEL SIGN E {0xA827, 0xA827, prCM, gcMc}, // SYLOTI NAGRI VOWEL SIGN OO {0xA828, 0xA82B, prAL, gcSo}, // [4] SYLOTI NAGRI POETRY MARK-1..SYLOTI NAGRI POETRY MARK-4 {0xA82C, 0xA82C, prCM, gcMn}, // SYLOTI NAGRI SIGN ALTERNATE HASANTA {0xA830, 0xA835, prAL, gcNo}, // [6] NORTH INDIC FRACTION ONE QUARTER..NORTH INDIC FRACTION THREE SIXTEENTHS {0xA836, 0xA837, prAL, gcSo}, // [2] NORTH INDIC QUARTER MARK..NORTH INDIC PLACEHOLDER MARK {0xA838, 0xA838, prPO, gcSc}, // NORTH INDIC RUPEE MARK {0xA839, 0xA839, prAL, gcSo}, // NORTH INDIC QUANTITY MARK {0xA840, 0xA873, prAL, gcLo}, // [52] PHAGS-PA LETTER KA..PHAGS-PA LETTER CANDRABINDU {0xA874, 0xA875, prBB, gcPo}, // [2] PHAGS-PA SINGLE HEAD MARK..PHAGS-PA DOUBLE HEAD MARK {0xA876, 0xA877, prEX, gcPo}, // [2] PHAGS-PA MARK SHAD..PHAGS-PA MARK DOUBLE SHAD {0xA880, 0xA881, prCM, gcMc}, // [2] SAURASHTRA SIGN ANUSVARA..SAURASHTRA SIGN VISARGA {0xA882, 0xA8B3, prAL, gcLo}, // [50] SAURASHTRA LETTER A..SAURASHTRA LETTER LLA {0xA8B4, 0xA8C3, prCM, gcMc}, // [16] SAURASHTRA CONSONANT SIGN HAARU..SAURASHTRA VOWEL SIGN AU {0xA8C4, 0xA8C5, prCM, gcMn}, // [2] SAURASHTRA SIGN VIRAMA..SAURASHTRA SIGN CANDRABINDU {0xA8CE, 0xA8CF, prBA, gcPo}, // [2] SAURASHTRA DANDA..SAURASHTRA DOUBLE DANDA {0xA8D0, 0xA8D9, prNU, gcNd}, // [10] SAURASHTRA DIGIT ZERO..SAURASHTRA DIGIT NINE {0xA8E0, 0xA8F1, prCM, gcMn}, // [18] COMBINING DEVANAGARI DIGIT ZERO..COMBINING DEVANAGARI SIGN AVAGRAHA {0xA8F2, 0xA8F7, prAL, gcLo}, // [6] DEVANAGARI SIGN SPACING CANDRABINDU..DEVANAGARI SIGN CANDRABINDU AVAGRAHA {0xA8F8, 0xA8FA, prAL, gcPo}, // [3] DEVANAGARI SIGN PUSHPIKA..DEVANAGARI CARET {0xA8FB, 0xA8FB, prAL, gcLo}, // DEVANAGARI HEADSTROKE {0xA8FC, 0xA8FC, prBB, gcPo}, // DEVANAGARI SIGN SIDDHAM {0xA8FD, 0xA8FE, prAL, gcLo}, // [2] DEVANAGARI JAIN OM..DEVANAGARI LETTER AY {0xA8FF, 0xA8FF, prCM, gcMn}, // DEVANAGARI VOWEL SIGN AY {0xA900, 0xA909, prNU, gcNd}, // [10] KAYAH LI DIGIT ZERO..KAYAH LI DIGIT NINE {0xA90A, 0xA925, prAL, gcLo}, // [28] KAYAH LI LETTER KA..KAYAH LI LETTER OO {0xA926, 0xA92D, prCM, gcMn}, // [8] KAYAH LI VOWEL UE..KAYAH LI TONE CALYA PLOPHU {0xA92E, 0xA92F, prBA, gcPo}, // [2] KAYAH LI SIGN CWI..KAYAH LI SIGN SHYA {0xA930, 0xA946, prAL, gcLo}, // [23] REJANG LETTER KA..REJANG LETTER A {0xA947, 0xA951, prCM, gcMn}, // [11] REJANG VOWEL SIGN I..REJANG CONSONANT SIGN R {0xA952, 0xA953, prCM, gcMc}, // [2] REJANG CONSONANT SIGN H..REJANG VIRAMA {0xA95F, 0xA95F, prAL, gcPo}, // REJANG SECTION MARK {0xA960, 0xA97C, prJL, gcLo}, // [29] HANGUL CHOSEONG TIKEUT-MIEUM..HANGUL CHOSEONG SSANGYEORINHIEUH {0xA980, 0xA982, prCM, gcMn}, // [3] JAVANESE SIGN PANYANGGA..JAVANESE SIGN LAYAR {0xA983, 0xA983, prCM, gcMc}, // JAVANESE SIGN WIGNYAN {0xA984, 0xA9B2, prAL, gcLo}, // [47] JAVANESE LETTER A..JAVANESE LETTER HA {0xA9B3, 0xA9B3, prCM, gcMn}, // JAVANESE SIGN CECAK TELU {0xA9B4, 0xA9B5, prCM, gcMc}, // [2] JAVANESE VOWEL SIGN TARUNG..JAVANESE VOWEL SIGN TOLONG {0xA9B6, 0xA9B9, prCM, gcMn}, // [4] JAVANESE VOWEL SIGN WULU..JAVANESE VOWEL SIGN SUKU MENDUT {0xA9BA, 0xA9BB, prCM, gcMc}, // [2] JAVANESE VOWEL SIGN TALING..JAVANESE VOWEL SIGN DIRGA MURE {0xA9BC, 0xA9BD, prCM, gcMn}, // [2] JAVANESE VOWEL SIGN PEPET..JAVANESE CONSONANT SIGN KERET {0xA9BE, 0xA9C0, prCM, gcMc}, // [3] JAVANESE CONSONANT SIGN PENGKAL..JAVANESE PANGKON {0xA9C1, 0xA9C6, prAL, gcPo}, // [6] JAVANESE LEFT RERENGGAN..JAVANESE PADA WINDU {0xA9C7, 0xA9C9, prBA, gcPo}, // [3] JAVANESE PADA PANGKAT..JAVANESE PADA LUNGSI {0xA9CA, 0xA9CD, prAL, gcPo}, // [4] JAVANESE PADA ADEG..JAVANESE TURNED PADA PISELEH {0xA9CF, 0xA9CF, prAL, gcLm}, // JAVANESE PANGRANGKEP {0xA9D0, 0xA9D9, prNU, gcNd}, // [10] JAVANESE DIGIT ZERO..JAVANESE DIGIT NINE {0xA9DE, 0xA9DF, prAL, gcPo}, // [2] JAVANESE PADA TIRTA TUMETES..JAVANESE PADA ISEN-ISEN {0xA9E0, 0xA9E4, prSA, gcLo}, // [5] MYANMAR LETTER SHAN GHA..MYANMAR LETTER SHAN BHA {0xA9E5, 0xA9E5, prSA, gcMn}, // MYANMAR SIGN SHAN SAW {0xA9E6, 0xA9E6, prSA, gcLm}, // MYANMAR MODIFIER LETTER SHAN REDUPLICATION {0xA9E7, 0xA9EF, prSA, gcLo}, // [9] MYANMAR LETTER TAI LAING NYA..MYANMAR LETTER TAI LAING NNA {0xA9F0, 0xA9F9, prNU, gcNd}, // [10] MYANMAR TAI LAING DIGIT ZERO..MYANMAR TAI LAING DIGIT NINE {0xA9FA, 0xA9FE, prSA, gcLo}, // [5] MYANMAR LETTER TAI LAING LLA..MYANMAR LETTER TAI LAING BHA {0xAA00, 0xAA28, prAL, gcLo}, // [41] CHAM LETTER A..CHAM LETTER HA {0xAA29, 0xAA2E, prCM, gcMn}, // [6] CHAM VOWEL SIGN AA..CHAM VOWEL SIGN OE {0xAA2F, 0xAA30, prCM, gcMc}, // [2] CHAM VOWEL SIGN O..CHAM VOWEL SIGN AI {0xAA31, 0xAA32, prCM, gcMn}, // [2] CHAM VOWEL SIGN AU..CHAM VOWEL SIGN UE {0xAA33, 0xAA34, prCM, gcMc}, // [2] CHAM CONSONANT SIGN YA..CHAM CONSONANT SIGN RA {0xAA35, 0xAA36, prCM, gcMn}, // [2] CHAM CONSONANT SIGN LA..CHAM CONSONANT SIGN WA {0xAA40, 0xAA42, prAL, gcLo}, // [3] CHAM LETTER FINAL K..CHAM LETTER FINAL NG {0xAA43, 0xAA43, prCM, gcMn}, // CHAM CONSONANT SIGN FINAL NG {0xAA44, 0xAA4B, prAL, gcLo}, // [8] CHAM LETTER FINAL CH..CHAM LETTER FINAL SS {0xAA4C, 0xAA4C, prCM, gcMn}, // CHAM CONSONANT SIGN FINAL M {0xAA4D, 0xAA4D, prCM, gcMc}, // CHAM CONSONANT SIGN FINAL H {0xAA50, 0xAA59, prNU, gcNd}, // [10] CHAM DIGIT ZERO..CHAM DIGIT NINE {0xAA5C, 0xAA5C, prAL, gcPo}, // CHAM PUNCTUATION SPIRAL {0xAA5D, 0xAA5F, prBA, gcPo}, // [3] CHAM PUNCTUATION DANDA..CHAM PUNCTUATION TRIPLE DANDA {0xAA60, 0xAA6F, prSA, gcLo}, // [16] MYANMAR LETTER KHAMTI GA..MYANMAR LETTER KHAMTI FA {0xAA70, 0xAA70, prSA, gcLm}, // MYANMAR MODIFIER LETTER KHAMTI REDUPLICATION {0xAA71, 0xAA76, prSA, gcLo}, // [6] MYANMAR LETTER KHAMTI XA..MYANMAR LOGOGRAM KHAMTI HM {0xAA77, 0xAA79, prSA, gcSo}, // [3] MYANMAR SYMBOL AITON EXCLAMATION..MYANMAR SYMBOL AITON TWO {0xAA7A, 0xAA7A, prSA, gcLo}, // MYANMAR LETTER AITON RA {0xAA7B, 0xAA7B, prSA, gcMc}, // MYANMAR SIGN PAO KAREN TONE {0xAA7C, 0xAA7C, prSA, gcMn}, // MYANMAR SIGN TAI LAING TONE-2 {0xAA7D, 0xAA7D, prSA, gcMc}, // MYANMAR SIGN TAI LAING TONE-5 {0xAA7E, 0xAA7F, prSA, gcLo}, // [2] MYANMAR LETTER SHWE PALAUNG CHA..MYANMAR LETTER SHWE PALAUNG SHA {0xAA80, 0xAAAF, prSA, gcLo}, // [48] TAI VIET LETTER LOW KO..TAI VIET LETTER HIGH O {0xAAB0, 0xAAB0, prSA, gcMn}, // TAI VIET MAI KANG {0xAAB1, 0xAAB1, prSA, gcLo}, // TAI VIET VOWEL AA {0xAAB2, 0xAAB4, prSA, gcMn}, // [3] TAI VIET VOWEL I..TAI VIET VOWEL U {0xAAB5, 0xAAB6, prSA, gcLo}, // [2] TAI VIET VOWEL E..TAI VIET VOWEL O {0xAAB7, 0xAAB8, prSA, gcMn}, // [2] TAI VIET MAI KHIT..TAI VIET VOWEL IA {0xAAB9, 0xAABD, prSA, gcLo}, // [5] TAI VIET VOWEL UEA..TAI VIET VOWEL AN {0xAABE, 0xAABF, prSA, gcMn}, // [2] TAI VIET VOWEL AM..TAI VIET TONE MAI EK {0xAAC0, 0xAAC0, prSA, gcLo}, // TAI VIET TONE MAI NUENG {0xAAC1, 0xAAC1, prSA, gcMn}, // TAI VIET TONE MAI THO {0xAAC2, 0xAAC2, prSA, gcLo}, // TAI VIET TONE MAI SONG {0xAADB, 0xAADC, prSA, gcLo}, // [2] TAI VIET SYMBOL KON..TAI VIET SYMBOL NUENG {0xAADD, 0xAADD, prSA, gcLm}, // TAI VIET SYMBOL SAM {0xAADE, 0xAADF, prSA, gcPo}, // [2] TAI VIET SYMBOL HO HOI..TAI VIET SYMBOL KOI KOI {0xAAE0, 0xAAEA, prAL, gcLo}, // [11] MEETEI MAYEK LETTER E..MEETEI MAYEK LETTER SSA {0xAAEB, 0xAAEB, prCM, gcMc}, // MEETEI MAYEK VOWEL SIGN II {0xAAEC, 0xAAED, prCM, gcMn}, // [2] MEETEI MAYEK VOWEL SIGN UU..MEETEI MAYEK VOWEL SIGN AAI {0xAAEE, 0xAAEF, prCM, gcMc}, // [2] MEETEI MAYEK VOWEL SIGN AU..MEETEI MAYEK VOWEL SIGN AAU {0xAAF0, 0xAAF1, prBA, gcPo}, // [2] MEETEI MAYEK CHEIKHAN..MEETEI MAYEK AHANG KHUDAM {0xAAF2, 0xAAF2, prAL, gcLo}, // MEETEI MAYEK ANJI {0xAAF3, 0xAAF4, prAL, gcLm}, // [2] MEETEI MAYEK SYLLABLE REPETITION MARK..MEETEI MAYEK WORD REPETITION MARK {0xAAF5, 0xAAF5, prCM, gcMc}, // MEETEI MAYEK VOWEL SIGN VISARGA {0xAAF6, 0xAAF6, prCM, gcMn}, // MEETEI MAYEK VIRAMA {0xAB01, 0xAB06, prAL, gcLo}, // [6] ETHIOPIC SYLLABLE TTHU..ETHIOPIC SYLLABLE TTHO {0xAB09, 0xAB0E, prAL, gcLo}, // [6] ETHIOPIC SYLLABLE DDHU..ETHIOPIC SYLLABLE DDHO {0xAB11, 0xAB16, prAL, gcLo}, // [6] ETHIOPIC SYLLABLE DZU..ETHIOPIC SYLLABLE DZO {0xAB20, 0xAB26, prAL, gcLo}, // [7] ETHIOPIC SYLLABLE CCHHA..ETHIOPIC SYLLABLE CCHHO {0xAB28, 0xAB2E, prAL, gcLo}, // [7] ETHIOPIC SYLLABLE BBA..ETHIOPIC SYLLABLE BBO {0xAB30, 0xAB5A, prAL, gcLl}, // [43] LATIN SMALL LETTER BARRED ALPHA..LATIN SMALL LETTER Y WITH SHORT RIGHT LEG {0xAB5B, 0xAB5B, prAL, gcSk}, // MODIFIER BREVE WITH INVERTED BREVE {0xAB5C, 0xAB5F, prAL, gcLm}, // [4] MODIFIER LETTER SMALL HENG..MODIFIER LETTER SMALL U WITH LEFT HOOK {0xAB60, 0xAB68, prAL, gcLl}, // [9] LATIN SMALL LETTER SAKHA YAT..LATIN SMALL LETTER TURNED R WITH MIDDLE TILDE {0xAB69, 0xAB69, prAL, gcLm}, // MODIFIER LETTER SMALL TURNED W {0xAB6A, 0xAB6B, prAL, gcSk}, // [2] MODIFIER LETTER LEFT TACK..MODIFIER LETTER RIGHT TACK {0xAB70, 0xABBF, prAL, gcLl}, // [80] CHEROKEE SMALL LETTER A..CHEROKEE SMALL LETTER YA {0xABC0, 0xABE2, prAL, gcLo}, // [35] MEETEI MAYEK LETTER KOK..MEETEI MAYEK LETTER I LONSUM {0xABE3, 0xABE4, prCM, gcMc}, // [2] MEETEI MAYEK VOWEL SIGN ONAP..MEETEI MAYEK VOWEL SIGN INAP {0xABE5, 0xABE5, prCM, gcMn}, // MEETEI MAYEK VOWEL SIGN ANAP {0xABE6, 0xABE7, prCM, gcMc}, // [2] MEETEI MAYEK VOWEL SIGN YENAP..MEETEI MAYEK VOWEL SIGN SOUNAP {0xABE8, 0xABE8, prCM, gcMn}, // MEETEI MAYEK VOWEL SIGN UNAP {0xABE9, 0xABEA, prCM, gcMc}, // [2] MEETEI MAYEK VOWEL SIGN CHEINAP..MEETEI MAYEK VOWEL SIGN NUNG {0xABEB, 0xABEB, prBA, gcPo}, // MEETEI MAYEK CHEIKHEI {0xABEC, 0xABEC, prCM, gcMc}, // MEETEI MAYEK LUM IYEK {0xABED, 0xABED, prCM, gcMn}, // MEETEI MAYEK APUN IYEK {0xABF0, 0xABF9, prNU, gcNd}, // [10] MEETEI MAYEK DIGIT ZERO..MEETEI MAYEK DIGIT NINE {0xAC00, 0xAC00, prH2, gcLo}, // HANGUL SYLLABLE GA {0xAC01, 0xAC1B, prH3, gcLo}, // [27] HANGUL SYLLABLE GAG..HANGUL SYLLABLE GAH {0xAC1C, 0xAC1C, prH2, gcLo}, // HANGUL SYLLABLE GAE {0xAC1D, 0xAC37, prH3, gcLo}, // [27] HANGUL SYLLABLE GAEG..HANGUL SYLLABLE GAEH {0xAC38, 0xAC38, prH2, gcLo}, // HANGUL SYLLABLE GYA {0xAC39, 0xAC53, prH3, gcLo}, // [27] HANGUL SYLLABLE GYAG..HANGUL SYLLABLE GYAH {0xAC54, 0xAC54, prH2, gcLo}, // HANGUL SYLLABLE GYAE {0xAC55, 0xAC6F, prH3, gcLo}, // [27] HANGUL SYLLABLE GYAEG..HANGUL SYLLABLE GYAEH {0xAC70, 0xAC70, prH2, gcLo}, // HANGUL SYLLABLE GEO {0xAC71, 0xAC8B, prH3, gcLo}, // [27] HANGUL SYLLABLE GEOG..HANGUL SYLLABLE GEOH {0xAC8C, 0xAC8C, prH2, gcLo}, // HANGUL SYLLABLE GE {0xAC8D, 0xACA7, prH3, gcLo}, // [27] HANGUL SYLLABLE GEG..HANGUL SYLLABLE GEH {0xACA8, 0xACA8, prH2, gcLo}, // HANGUL SYLLABLE GYEO {0xACA9, 0xACC3, prH3, gcLo}, // [27] HANGUL SYLLABLE GYEOG..HANGUL SYLLABLE GYEOH {0xACC4, 0xACC4, prH2, gcLo}, // HANGUL SYLLABLE GYE {0xACC5, 0xACDF, prH3, gcLo}, // [27] HANGUL SYLLABLE GYEG..HANGUL SYLLABLE GYEH {0xACE0, 0xACE0, prH2, gcLo}, // HANGUL SYLLABLE GO {0xACE1, 0xACFB, prH3, gcLo}, // [27] HANGUL SYLLABLE GOG..HANGUL SYLLABLE GOH {0xACFC, 0xACFC, prH2, gcLo}, // HANGUL SYLLABLE GWA {0xACFD, 0xAD17, prH3, gcLo}, // [27] HANGUL SYLLABLE GWAG..HANGUL SYLLABLE GWAH {0xAD18, 0xAD18, prH2, gcLo}, // HANGUL SYLLABLE GWAE {0xAD19, 0xAD33, prH3, gcLo}, // [27] HANGUL SYLLABLE GWAEG..HANGUL SYLLABLE GWAEH {0xAD34, 0xAD34, prH2, gcLo}, // HANGUL SYLLABLE GOE {0xAD35, 0xAD4F, prH3, gcLo}, // [27] HANGUL SYLLABLE GOEG..HANGUL SYLLABLE GOEH {0xAD50, 0xAD50, prH2, gcLo}, // HANGUL SYLLABLE GYO {0xAD51, 0xAD6B, prH3, gcLo}, // [27] HANGUL SYLLABLE GYOG..HANGUL SYLLABLE GYOH {0xAD6C, 0xAD6C, prH2, gcLo}, // HANGUL SYLLABLE GU {0xAD6D, 0xAD87, prH3, gcLo}, // [27] HANGUL SYLLABLE GUG..HANGUL SYLLABLE GUH {0xAD88, 0xAD88, prH2, gcLo}, // HANGUL SYLLABLE GWEO {0xAD89, 0xADA3, prH3, gcLo}, // [27] HANGUL SYLLABLE GWEOG..HANGUL SYLLABLE GWEOH {0xADA4, 0xADA4, prH2, gcLo}, // HANGUL SYLLABLE GWE {0xADA5, 0xADBF, prH3, gcLo}, // [27] HANGUL SYLLABLE GWEG..HANGUL SYLLABLE GWEH {0xADC0, 0xADC0, prH2, gcLo}, // HANGUL SYLLABLE GWI {0xADC1, 0xADDB, prH3, gcLo}, // [27] HANGUL SYLLABLE GWIG..HANGUL SYLLABLE GWIH {0xADDC, 0xADDC, prH2, gcLo}, // HANGUL SYLLABLE GYU {0xADDD, 0xADF7, prH3, gcLo}, // [27] HANGUL SYLLABLE GYUG..HANGUL SYLLABLE GYUH {0xADF8, 0xADF8, prH2, gcLo}, // HANGUL SYLLABLE GEU {0xADF9, 0xAE13, prH3, gcLo}, // [27] HANGUL SYLLABLE GEUG..HANGUL SYLLABLE GEUH {0xAE14, 0xAE14, prH2, gcLo}, // HANGUL SYLLABLE GYI {0xAE15, 0xAE2F, prH3, gcLo}, // [27] HANGUL SYLLABLE GYIG..HANGUL SYLLABLE GYIH {0xAE30, 0xAE30, prH2, gcLo}, // HANGUL SYLLABLE GI {0xAE31, 0xAE4B, prH3, gcLo}, // [27] HANGUL SYLLABLE GIG..HANGUL SYLLABLE GIH {0xAE4C, 0xAE4C, prH2, gcLo}, // HANGUL SYLLABLE GGA {0xAE4D, 0xAE67, prH3, gcLo}, // [27] HANGUL SYLLABLE GGAG..HANGUL SYLLABLE GGAH {0xAE68, 0xAE68, prH2, gcLo}, // HANGUL SYLLABLE GGAE {0xAE69, 0xAE83, prH3, gcLo}, // [27] HANGUL SYLLABLE GGAEG..HANGUL SYLLABLE GGAEH {0xAE84, 0xAE84, prH2, gcLo}, // HANGUL SYLLABLE GGYA {0xAE85, 0xAE9F, prH3, gcLo}, // [27] HANGUL SYLLABLE GGYAG..HANGUL SYLLABLE GGYAH {0xAEA0, 0xAEA0, prH2, gcLo}, // HANGUL SYLLABLE GGYAE {0xAEA1, 0xAEBB, prH3, gcLo}, // [27] HANGUL SYLLABLE GGYAEG..HANGUL SYLLABLE GGYAEH {0xAEBC, 0xAEBC, prH2, gcLo}, // HANGUL SYLLABLE GGEO {0xAEBD, 0xAED7, prH3, gcLo}, // [27] HANGUL SYLLABLE GGEOG..HANGUL SYLLABLE GGEOH {0xAED8, 0xAED8, prH2, gcLo}, // HANGUL SYLLABLE GGE {0xAED9, 0xAEF3, prH3, gcLo}, // [27] HANGUL SYLLABLE GGEG..HANGUL SYLLABLE GGEH {0xAEF4, 0xAEF4, prH2, gcLo}, // HANGUL SYLLABLE GGYEO {0xAEF5, 0xAF0F, prH3, gcLo}, // [27] HANGUL SYLLABLE GGYEOG..HANGUL SYLLABLE GGYEOH {0xAF10, 0xAF10, prH2, gcLo}, // HANGUL SYLLABLE GGYE {0xAF11, 0xAF2B, prH3, gcLo}, // [27] HANGUL SYLLABLE GGYEG..HANGUL SYLLABLE GGYEH {0xAF2C, 0xAF2C, prH2, gcLo}, // HANGUL SYLLABLE GGO {0xAF2D, 0xAF47, prH3, gcLo}, // [27] HANGUL SYLLABLE GGOG..HANGUL SYLLABLE GGOH {0xAF48, 0xAF48, prH2, gcLo}, // HANGUL SYLLABLE GGWA {0xAF49, 0xAF63, prH3, gcLo}, // [27] HANGUL SYLLABLE GGWAG..HANGUL SYLLABLE GGWAH {0xAF64, 0xAF64, prH2, gcLo}, // HANGUL SYLLABLE GGWAE {0xAF65, 0xAF7F, prH3, gcLo}, // [27] HANGUL SYLLABLE GGWAEG..HANGUL SYLLABLE GGWAEH {0xAF80, 0xAF80, prH2, gcLo}, // HANGUL SYLLABLE GGOE {0xAF81, 0xAF9B, prH3, gcLo}, // [27] HANGUL SYLLABLE GGOEG..HANGUL SYLLABLE GGOEH {0xAF9C, 0xAF9C, prH2, gcLo}, // HANGUL SYLLABLE GGYO {0xAF9D, 0xAFB7, prH3, gcLo}, // [27] HANGUL SYLLABLE GGYOG..HANGUL SYLLABLE GGYOH {0xAFB8, 0xAFB8, prH2, gcLo}, // HANGUL SYLLABLE GGU {0xAFB9, 0xAFD3, prH3, gcLo}, // [27] HANGUL SYLLABLE GGUG..HANGUL SYLLABLE GGUH {0xAFD4, 0xAFD4, prH2, gcLo}, // HANGUL SYLLABLE GGWEO {0xAFD5, 0xAFEF, prH3, gcLo}, // [27] HANGUL SYLLABLE GGWEOG..HANGUL SYLLABLE GGWEOH {0xAFF0, 0xAFF0, prH2, gcLo}, // HANGUL SYLLABLE GGWE {0xAFF1, 0xB00B, prH3, gcLo}, // [27] HANGUL SYLLABLE GGWEG..HANGUL SYLLABLE GGWEH {0xB00C, 0xB00C, prH2, gcLo}, // HANGUL SYLLABLE GGWI {0xB00D, 0xB027, prH3, gcLo}, // [27] HANGUL SYLLABLE GGWIG..HANGUL SYLLABLE GGWIH {0xB028, 0xB028, prH2, gcLo}, // HANGUL SYLLABLE GGYU {0xB029, 0xB043, prH3, gcLo}, // [27] HANGUL SYLLABLE GGYUG..HANGUL SYLLABLE GGYUH {0xB044, 0xB044, prH2, gcLo}, // HANGUL SYLLABLE GGEU {0xB045, 0xB05F, prH3, gcLo}, // [27] HANGUL SYLLABLE GGEUG..HANGUL SYLLABLE GGEUH {0xB060, 0xB060, prH2, gcLo}, // HANGUL SYLLABLE GGYI {0xB061, 0xB07B, prH3, gcLo}, // [27] HANGUL SYLLABLE GGYIG..HANGUL SYLLABLE GGYIH {0xB07C, 0xB07C, prH2, gcLo}, // HANGUL SYLLABLE GGI {0xB07D, 0xB097, prH3, gcLo}, // [27] HANGUL SYLLABLE GGIG..HANGUL SYLLABLE GGIH {0xB098, 0xB098, prH2, gcLo}, // HANGUL SYLLABLE NA {0xB099, 0xB0B3, prH3, gcLo}, // [27] HANGUL SYLLABLE NAG..HANGUL SYLLABLE NAH {0xB0B4, 0xB0B4, prH2, gcLo}, // HANGUL SYLLABLE NAE {0xB0B5, 0xB0CF, prH3, gcLo}, // [27] HANGUL SYLLABLE NAEG..HANGUL SYLLABLE NAEH {0xB0D0, 0xB0D0, prH2, gcLo}, // HANGUL SYLLABLE NYA {0xB0D1, 0xB0EB, prH3, gcLo}, // [27] HANGUL SYLLABLE NYAG..HANGUL SYLLABLE NYAH {0xB0EC, 0xB0EC, prH2, gcLo}, // HANGUL SYLLABLE NYAE {0xB0ED, 0xB107, prH3, gcLo}, // [27] HANGUL SYLLABLE NYAEG..HANGUL SYLLABLE NYAEH {0xB108, 0xB108, prH2, gcLo}, // HANGUL SYLLABLE NEO {0xB109, 0xB123, prH3, gcLo}, // [27] HANGUL SYLLABLE NEOG..HANGUL SYLLABLE NEOH {0xB124, 0xB124, prH2, gcLo}, // HANGUL SYLLABLE NE {0xB125, 0xB13F, prH3, gcLo}, // [27] HANGUL SYLLABLE NEG..HANGUL SYLLABLE NEH {0xB140, 0xB140, prH2, gcLo}, // HANGUL SYLLABLE NYEO {0xB141, 0xB15B, prH3, gcLo}, // [27] HANGUL SYLLABLE NYEOG..HANGUL SYLLABLE NYEOH {0xB15C, 0xB15C, prH2, gcLo}, // HANGUL SYLLABLE NYE {0xB15D, 0xB177, prH3, gcLo}, // [27] HANGUL SYLLABLE NYEG..HANGUL SYLLABLE NYEH {0xB178, 0xB178, prH2, gcLo}, // HANGUL SYLLABLE NO {0xB179, 0xB193, prH3, gcLo}, // [27] HANGUL SYLLABLE NOG..HANGUL SYLLABLE NOH {0xB194, 0xB194, prH2, gcLo}, // HANGUL SYLLABLE NWA {0xB195, 0xB1AF, prH3, gcLo}, // [27] HANGUL SYLLABLE NWAG..HANGUL SYLLABLE NWAH {0xB1B0, 0xB1B0, prH2, gcLo}, // HANGUL SYLLABLE NWAE {0xB1B1, 0xB1CB, prH3, gcLo}, // [27] HANGUL SYLLABLE NWAEG..HANGUL SYLLABLE NWAEH {0xB1CC, 0xB1CC, prH2, gcLo}, // HANGUL SYLLABLE NOE {0xB1CD, 0xB1E7, prH3, gcLo}, // [27] HANGUL SYLLABLE NOEG..HANGUL SYLLABLE NOEH {0xB1E8, 0xB1E8, prH2, gcLo}, // HANGUL SYLLABLE NYO {0xB1E9, 0xB203, prH3, gcLo}, // [27] HANGUL SYLLABLE NYOG..HANGUL SYLLABLE NYOH {0xB204, 0xB204, prH2, gcLo}, // HANGUL SYLLABLE NU {0xB205, 0xB21F, prH3, gcLo}, // [27] HANGUL SYLLABLE NUG..HANGUL SYLLABLE NUH {0xB220, 0xB220, prH2, gcLo}, // HANGUL SYLLABLE NWEO {0xB221, 0xB23B, prH3, gcLo}, // [27] HANGUL SYLLABLE NWEOG..HANGUL SYLLABLE NWEOH {0xB23C, 0xB23C, prH2, gcLo}, // HANGUL SYLLABLE NWE {0xB23D, 0xB257, prH3, gcLo}, // [27] HANGUL SYLLABLE NWEG..HANGUL SYLLABLE NWEH {0xB258, 0xB258, prH2, gcLo}, // HANGUL SYLLABLE NWI {0xB259, 0xB273, prH3, gcLo}, // [27] HANGUL SYLLABLE NWIG..HANGUL SYLLABLE NWIH {0xB274, 0xB274, prH2, gcLo}, // HANGUL SYLLABLE NYU {0xB275, 0xB28F, prH3, gcLo}, // [27] HANGUL SYLLABLE NYUG..HANGUL SYLLABLE NYUH {0xB290, 0xB290, prH2, gcLo}, // HANGUL SYLLABLE NEU {0xB291, 0xB2AB, prH3, gcLo}, // [27] HANGUL SYLLABLE NEUG..HANGUL SYLLABLE NEUH {0xB2AC, 0xB2AC, prH2, gcLo}, // HANGUL SYLLABLE NYI {0xB2AD, 0xB2C7, prH3, gcLo}, // [27] HANGUL SYLLABLE NYIG..HANGUL SYLLABLE NYIH {0xB2C8, 0xB2C8, prH2, gcLo}, // HANGUL SYLLABLE NI {0xB2C9, 0xB2E3, prH3, gcLo}, // [27] HANGUL SYLLABLE NIG..HANGUL SYLLABLE NIH {0xB2E4, 0xB2E4, prH2, gcLo}, // HANGUL SYLLABLE DA {0xB2E5, 0xB2FF, prH3, gcLo}, // [27] HANGUL SYLLABLE DAG..HANGUL SYLLABLE DAH {0xB300, 0xB300, prH2, gcLo}, // HANGUL SYLLABLE DAE {0xB301, 0xB31B, prH3, gcLo}, // [27] HANGUL SYLLABLE DAEG..HANGUL SYLLABLE DAEH {0xB31C, 0xB31C, prH2, gcLo}, // HANGUL SYLLABLE DYA {0xB31D, 0xB337, prH3, gcLo}, // [27] HANGUL SYLLABLE DYAG..HANGUL SYLLABLE DYAH {0xB338, 0xB338, prH2, gcLo}, // HANGUL SYLLABLE DYAE {0xB339, 0xB353, prH3, gcLo}, // [27] HANGUL SYLLABLE DYAEG..HANGUL SYLLABLE DYAEH {0xB354, 0xB354, prH2, gcLo}, // HANGUL SYLLABLE DEO {0xB355, 0xB36F, prH3, gcLo}, // [27] HANGUL SYLLABLE DEOG..HANGUL SYLLABLE DEOH {0xB370, 0xB370, prH2, gcLo}, // HANGUL SYLLABLE DE {0xB371, 0xB38B, prH3, gcLo}, // [27] HANGUL SYLLABLE DEG..HANGUL SYLLABLE DEH {0xB38C, 0xB38C, prH2, gcLo}, // HANGUL SYLLABLE DYEO {0xB38D, 0xB3A7, prH3, gcLo}, // [27] HANGUL SYLLABLE DYEOG..HANGUL SYLLABLE DYEOH {0xB3A8, 0xB3A8, prH2, gcLo}, // HANGUL SYLLABLE DYE {0xB3A9, 0xB3C3, prH3, gcLo}, // [27] HANGUL SYLLABLE DYEG..HANGUL SYLLABLE DYEH {0xB3C4, 0xB3C4, prH2, gcLo}, // HANGUL SYLLABLE DO {0xB3C5, 0xB3DF, prH3, gcLo}, // [27] HANGUL SYLLABLE DOG..HANGUL SYLLABLE DOH {0xB3E0, 0xB3E0, prH2, gcLo}, // HANGUL SYLLABLE DWA {0xB3E1, 0xB3FB, prH3, gcLo}, // [27] HANGUL SYLLABLE DWAG..HANGUL SYLLABLE DWAH {0xB3FC, 0xB3FC, prH2, gcLo}, // HANGUL SYLLABLE DWAE {0xB3FD, 0xB417, prH3, gcLo}, // [27] HANGUL SYLLABLE DWAEG..HANGUL SYLLABLE DWAEH {0xB418, 0xB418, prH2, gcLo}, // HANGUL SYLLABLE DOE {0xB419, 0xB433, prH3, gcLo}, // [27] HANGUL SYLLABLE DOEG..HANGUL SYLLABLE DOEH {0xB434, 0xB434, prH2, gcLo}, // HANGUL SYLLABLE DYO {0xB435, 0xB44F, prH3, gcLo}, // [27] HANGUL SYLLABLE DYOG..HANGUL SYLLABLE DYOH {0xB450, 0xB450, prH2, gcLo}, // HANGUL SYLLABLE DU {0xB451, 0xB46B, prH3, gcLo}, // [27] HANGUL SYLLABLE DUG..HANGUL SYLLABLE DUH {0xB46C, 0xB46C, prH2, gcLo}, // HANGUL SYLLABLE DWEO {0xB46D, 0xB487, prH3, gcLo}, // [27] HANGUL SYLLABLE DWEOG..HANGUL SYLLABLE DWEOH {0xB488, 0xB488, prH2, gcLo}, // HANGUL SYLLABLE DWE {0xB489, 0xB4A3, prH3, gcLo}, // [27] HANGUL SYLLABLE DWEG..HANGUL SYLLABLE DWEH {0xB4A4, 0xB4A4, prH2, gcLo}, // HANGUL SYLLABLE DWI {0xB4A5, 0xB4BF, prH3, gcLo}, // [27] HANGUL SYLLABLE DWIG..HANGUL SYLLABLE DWIH {0xB4C0, 0xB4C0, prH2, gcLo}, // HANGUL SYLLABLE DYU {0xB4C1, 0xB4DB, prH3, gcLo}, // [27] HANGUL SYLLABLE DYUG..HANGUL SYLLABLE DYUH {0xB4DC, 0xB4DC, prH2, gcLo}, // HANGUL SYLLABLE DEU {0xB4DD, 0xB4F7, prH3, gcLo}, // [27] HANGUL SYLLABLE DEUG..HANGUL SYLLABLE DEUH {0xB4F8, 0xB4F8, prH2, gcLo}, // HANGUL SYLLABLE DYI {0xB4F9, 0xB513, prH3, gcLo}, // [27] HANGUL SYLLABLE DYIG..HANGUL SYLLABLE DYIH {0xB514, 0xB514, prH2, gcLo}, // HANGUL SYLLABLE DI {0xB515, 0xB52F, prH3, gcLo}, // [27] HANGUL SYLLABLE DIG..HANGUL SYLLABLE DIH {0xB530, 0xB530, prH2, gcLo}, // HANGUL SYLLABLE DDA {0xB531, 0xB54B, prH3, gcLo}, // [27] HANGUL SYLLABLE DDAG..HANGUL SYLLABLE DDAH {0xB54C, 0xB54C, prH2, gcLo}, // HANGUL SYLLABLE DDAE {0xB54D, 0xB567, prH3, gcLo}, // [27] HANGUL SYLLABLE DDAEG..HANGUL SYLLABLE DDAEH {0xB568, 0xB568, prH2, gcLo}, // HANGUL SYLLABLE DDYA {0xB569, 0xB583, prH3, gcLo}, // [27] HANGUL SYLLABLE DDYAG..HANGUL SYLLABLE DDYAH {0xB584, 0xB584, prH2, gcLo}, // HANGUL SYLLABLE DDYAE {0xB585, 0xB59F, prH3, gcLo}, // [27] HANGUL SYLLABLE DDYAEG..HANGUL SYLLABLE DDYAEH {0xB5A0, 0xB5A0, prH2, gcLo}, // HANGUL SYLLABLE DDEO {0xB5A1, 0xB5BB, prH3, gcLo}, // [27] HANGUL SYLLABLE DDEOG..HANGUL SYLLABLE DDEOH {0xB5BC, 0xB5BC, prH2, gcLo}, // HANGUL SYLLABLE DDE {0xB5BD, 0xB5D7, prH3, gcLo}, // [27] HANGUL SYLLABLE DDEG..HANGUL SYLLABLE DDEH {0xB5D8, 0xB5D8, prH2, gcLo}, // HANGUL SYLLABLE DDYEO {0xB5D9, 0xB5F3, prH3, gcLo}, // [27] HANGUL SYLLABLE DDYEOG..HANGUL SYLLABLE DDYEOH {0xB5F4, 0xB5F4, prH2, gcLo}, // HANGUL SYLLABLE DDYE {0xB5F5, 0xB60F, prH3, gcLo}, // [27] HANGUL SYLLABLE DDYEG..HANGUL SYLLABLE DDYEH {0xB610, 0xB610, prH2, gcLo}, // HANGUL SYLLABLE DDO {0xB611, 0xB62B, prH3, gcLo}, // [27] HANGUL SYLLABLE DDOG..HANGUL SYLLABLE DDOH {0xB62C, 0xB62C, prH2, gcLo}, // HANGUL SYLLABLE DDWA {0xB62D, 0xB647, prH3, gcLo}, // [27] HANGUL SYLLABLE DDWAG..HANGUL SYLLABLE DDWAH {0xB648, 0xB648, prH2, gcLo}, // HANGUL SYLLABLE DDWAE {0xB649, 0xB663, prH3, gcLo}, // [27] HANGUL SYLLABLE DDWAEG..HANGUL SYLLABLE DDWAEH {0xB664, 0xB664, prH2, gcLo}, // HANGUL SYLLABLE DDOE {0xB665, 0xB67F, prH3, gcLo}, // [27] HANGUL SYLLABLE DDOEG..HANGUL SYLLABLE DDOEH {0xB680, 0xB680, prH2, gcLo}, // HANGUL SYLLABLE DDYO {0xB681, 0xB69B, prH3, gcLo}, // [27] HANGUL SYLLABLE DDYOG..HANGUL SYLLABLE DDYOH {0xB69C, 0xB69C, prH2, gcLo}, // HANGUL SYLLABLE DDU {0xB69D, 0xB6B7, prH3, gcLo}, // [27] HANGUL SYLLABLE DDUG..HANGUL SYLLABLE DDUH {0xB6B8, 0xB6B8, prH2, gcLo}, // HANGUL SYLLABLE DDWEO {0xB6B9, 0xB6D3, prH3, gcLo}, // [27] HANGUL SYLLABLE DDWEOG..HANGUL SYLLABLE DDWEOH {0xB6D4, 0xB6D4, prH2, gcLo}, // HANGUL SYLLABLE DDWE {0xB6D5, 0xB6EF, prH3, gcLo}, // [27] HANGUL SYLLABLE DDWEG..HANGUL SYLLABLE DDWEH {0xB6F0, 0xB6F0, prH2, gcLo}, // HANGUL SYLLABLE DDWI {0xB6F1, 0xB70B, prH3, gcLo}, // [27] HANGUL SYLLABLE DDWIG..HANGUL SYLLABLE DDWIH {0xB70C, 0xB70C, prH2, gcLo}, // HANGUL SYLLABLE DDYU {0xB70D, 0xB727, prH3, gcLo}, // [27] HANGUL SYLLABLE DDYUG..HANGUL SYLLABLE DDYUH {0xB728, 0xB728, prH2, gcLo}, // HANGUL SYLLABLE DDEU {0xB729, 0xB743, prH3, gcLo}, // [27] HANGUL SYLLABLE DDEUG..HANGUL SYLLABLE DDEUH {0xB744, 0xB744, prH2, gcLo}, // HANGUL SYLLABLE DDYI {0xB745, 0xB75F, prH3, gcLo}, // [27] HANGUL SYLLABLE DDYIG..HANGUL SYLLABLE DDYIH {0xB760, 0xB760, prH2, gcLo}, // HANGUL SYLLABLE DDI {0xB761, 0xB77B, prH3, gcLo}, // [27] HANGUL SYLLABLE DDIG..HANGUL SYLLABLE DDIH {0xB77C, 0xB77C, prH2, gcLo}, // HANGUL SYLLABLE RA {0xB77D, 0xB797, prH3, gcLo}, // [27] HANGUL SYLLABLE RAG..HANGUL SYLLABLE RAH {0xB798, 0xB798, prH2, gcLo}, // HANGUL SYLLABLE RAE {0xB799, 0xB7B3, prH3, gcLo}, // [27] HANGUL SYLLABLE RAEG..HANGUL SYLLABLE RAEH {0xB7B4, 0xB7B4, prH2, gcLo}, // HANGUL SYLLABLE RYA {0xB7B5, 0xB7CF, prH3, gcLo}, // [27] HANGUL SYLLABLE RYAG..HANGUL SYLLABLE RYAH {0xB7D0, 0xB7D0, prH2, gcLo}, // HANGUL SYLLABLE RYAE {0xB7D1, 0xB7EB, prH3, gcLo}, // [27] HANGUL SYLLABLE RYAEG..HANGUL SYLLABLE RYAEH {0xB7EC, 0xB7EC, prH2, gcLo}, // HANGUL SYLLABLE REO {0xB7ED, 0xB807, prH3, gcLo}, // [27] HANGUL SYLLABLE REOG..HANGUL SYLLABLE REOH {0xB808, 0xB808, prH2, gcLo}, // HANGUL SYLLABLE RE {0xB809, 0xB823, prH3, gcLo}, // [27] HANGUL SYLLABLE REG..HANGUL SYLLABLE REH {0xB824, 0xB824, prH2, gcLo}, // HANGUL SYLLABLE RYEO {0xB825, 0xB83F, prH3, gcLo}, // [27] HANGUL SYLLABLE RYEOG..HANGUL SYLLABLE RYEOH {0xB840, 0xB840, prH2, gcLo}, // HANGUL SYLLABLE RYE {0xB841, 0xB85B, prH3, gcLo}, // [27] HANGUL SYLLABLE RYEG..HANGUL SYLLABLE RYEH {0xB85C, 0xB85C, prH2, gcLo}, // HANGUL SYLLABLE RO {0xB85D, 0xB877, prH3, gcLo}, // [27] HANGUL SYLLABLE ROG..HANGUL SYLLABLE ROH {0xB878, 0xB878, prH2, gcLo}, // HANGUL SYLLABLE RWA {0xB879, 0xB893, prH3, gcLo}, // [27] HANGUL SYLLABLE RWAG..HANGUL SYLLABLE RWAH {0xB894, 0xB894, prH2, gcLo}, // HANGUL SYLLABLE RWAE {0xB895, 0xB8AF, prH3, gcLo}, // [27] HANGUL SYLLABLE RWAEG..HANGUL SYLLABLE RWAEH {0xB8B0, 0xB8B0, prH2, gcLo}, // HANGUL SYLLABLE ROE {0xB8B1, 0xB8CB, prH3, gcLo}, // [27] HANGUL SYLLABLE ROEG..HANGUL SYLLABLE ROEH {0xB8CC, 0xB8CC, prH2, gcLo}, // HANGUL SYLLABLE RYO {0xB8CD, 0xB8E7, prH3, gcLo}, // [27] HANGUL SYLLABLE RYOG..HANGUL SYLLABLE RYOH {0xB8E8, 0xB8E8, prH2, gcLo}, // HANGUL SYLLABLE RU {0xB8E9, 0xB903, prH3, gcLo}, // [27] HANGUL SYLLABLE RUG..HANGUL SYLLABLE RUH {0xB904, 0xB904, prH2, gcLo}, // HANGUL SYLLABLE RWEO {0xB905, 0xB91F, prH3, gcLo}, // [27] HANGUL SYLLABLE RWEOG..HANGUL SYLLABLE RWEOH {0xB920, 0xB920, prH2, gcLo}, // HANGUL SYLLABLE RWE {0xB921, 0xB93B, prH3, gcLo}, // [27] HANGUL SYLLABLE RWEG..HANGUL SYLLABLE RWEH {0xB93C, 0xB93C, prH2, gcLo}, // HANGUL SYLLABLE RWI {0xB93D, 0xB957, prH3, gcLo}, // [27] HANGUL SYLLABLE RWIG..HANGUL SYLLABLE RWIH {0xB958, 0xB958, prH2, gcLo}, // HANGUL SYLLABLE RYU {0xB959, 0xB973, prH3, gcLo}, // [27] HANGUL SYLLABLE RYUG..HANGUL SYLLABLE RYUH {0xB974, 0xB974, prH2, gcLo}, // HANGUL SYLLABLE REU {0xB975, 0xB98F, prH3, gcLo}, // [27] HANGUL SYLLABLE REUG..HANGUL SYLLABLE REUH {0xB990, 0xB990, prH2, gcLo}, // HANGUL SYLLABLE RYI {0xB991, 0xB9AB, prH3, gcLo}, // [27] HANGUL SYLLABLE RYIG..HANGUL SYLLABLE RYIH {0xB9AC, 0xB9AC, prH2, gcLo}, // HANGUL SYLLABLE RI {0xB9AD, 0xB9C7, prH3, gcLo}, // [27] HANGUL SYLLABLE RIG..HANGUL SYLLABLE RIH {0xB9C8, 0xB9C8, prH2, gcLo}, // HANGUL SYLLABLE MA {0xB9C9, 0xB9E3, prH3, gcLo}, // [27] HANGUL SYLLABLE MAG..HANGUL SYLLABLE MAH {0xB9E4, 0xB9E4, prH2, gcLo}, // HANGUL SYLLABLE MAE {0xB9E5, 0xB9FF, prH3, gcLo}, // [27] HANGUL SYLLABLE MAEG..HANGUL SYLLABLE MAEH {0xBA00, 0xBA00, prH2, gcLo}, // HANGUL SYLLABLE MYA {0xBA01, 0xBA1B, prH3, gcLo}, // [27] HANGUL SYLLABLE MYAG..HANGUL SYLLABLE MYAH {0xBA1C, 0xBA1C, prH2, gcLo}, // HANGUL SYLLABLE MYAE {0xBA1D, 0xBA37, prH3, gcLo}, // [27] HANGUL SYLLABLE MYAEG..HANGUL SYLLABLE MYAEH {0xBA38, 0xBA38, prH2, gcLo}, // HANGUL SYLLABLE MEO {0xBA39, 0xBA53, prH3, gcLo}, // [27] HANGUL SYLLABLE MEOG..HANGUL SYLLABLE MEOH {0xBA54, 0xBA54, prH2, gcLo}, // HANGUL SYLLABLE ME {0xBA55, 0xBA6F, prH3, gcLo}, // [27] HANGUL SYLLABLE MEG..HANGUL SYLLABLE MEH {0xBA70, 0xBA70, prH2, gcLo}, // HANGUL SYLLABLE MYEO {0xBA71, 0xBA8B, prH3, gcLo}, // [27] HANGUL SYLLABLE MYEOG..HANGUL SYLLABLE MYEOH {0xBA8C, 0xBA8C, prH2, gcLo}, // HANGUL SYLLABLE MYE {0xBA8D, 0xBAA7, prH3, gcLo}, // [27] HANGUL SYLLABLE MYEG..HANGUL SYLLABLE MYEH {0xBAA8, 0xBAA8, prH2, gcLo}, // HANGUL SYLLABLE MO {0xBAA9, 0xBAC3, prH3, gcLo}, // [27] HANGUL SYLLABLE MOG..HANGUL SYLLABLE MOH {0xBAC4, 0xBAC4, prH2, gcLo}, // HANGUL SYLLABLE MWA {0xBAC5, 0xBADF, prH3, gcLo}, // [27] HANGUL SYLLABLE MWAG..HANGUL SYLLABLE MWAH {0xBAE0, 0xBAE0, prH2, gcLo}, // HANGUL SYLLABLE MWAE {0xBAE1, 0xBAFB, prH3, gcLo}, // [27] HANGUL SYLLABLE MWAEG..HANGUL SYLLABLE MWAEH {0xBAFC, 0xBAFC, prH2, gcLo}, // HANGUL SYLLABLE MOE {0xBAFD, 0xBB17, prH3, gcLo}, // [27] HANGUL SYLLABLE MOEG..HANGUL SYLLABLE MOEH {0xBB18, 0xBB18, prH2, gcLo}, // HANGUL SYLLABLE MYO {0xBB19, 0xBB33, prH3, gcLo}, // [27] HANGUL SYLLABLE MYOG..HANGUL SYLLABLE MYOH {0xBB34, 0xBB34, prH2, gcLo}, // HANGUL SYLLABLE MU {0xBB35, 0xBB4F, prH3, gcLo}, // [27] HANGUL SYLLABLE MUG..HANGUL SYLLABLE MUH {0xBB50, 0xBB50, prH2, gcLo}, // HANGUL SYLLABLE MWEO {0xBB51, 0xBB6B, prH3, gcLo}, // [27] HANGUL SYLLABLE MWEOG..HANGUL SYLLABLE MWEOH {0xBB6C, 0xBB6C, prH2, gcLo}, // HANGUL SYLLABLE MWE {0xBB6D, 0xBB87, prH3, gcLo}, // [27] HANGUL SYLLABLE MWEG..HANGUL SYLLABLE MWEH {0xBB88, 0xBB88, prH2, gcLo}, // HANGUL SYLLABLE MWI {0xBB89, 0xBBA3, prH3, gcLo}, // [27] HANGUL SYLLABLE MWIG..HANGUL SYLLABLE MWIH {0xBBA4, 0xBBA4, prH2, gcLo}, // HANGUL SYLLABLE MYU {0xBBA5, 0xBBBF, prH3, gcLo}, // [27] HANGUL SYLLABLE MYUG..HANGUL SYLLABLE MYUH {0xBBC0, 0xBBC0, prH2, gcLo}, // HANGUL SYLLABLE MEU {0xBBC1, 0xBBDB, prH3, gcLo}, // [27] HANGUL SYLLABLE MEUG..HANGUL SYLLABLE MEUH {0xBBDC, 0xBBDC, prH2, gcLo}, // HANGUL SYLLABLE MYI {0xBBDD, 0xBBF7, prH3, gcLo}, // [27] HANGUL SYLLABLE MYIG..HANGUL SYLLABLE MYIH {0xBBF8, 0xBBF8, prH2, gcLo}, // HANGUL SYLLABLE MI {0xBBF9, 0xBC13, prH3, gcLo}, // [27] HANGUL SYLLABLE MIG..HANGUL SYLLABLE MIH {0xBC14, 0xBC14, prH2, gcLo}, // HANGUL SYLLABLE BA {0xBC15, 0xBC2F, prH3, gcLo}, // [27] HANGUL SYLLABLE BAG..HANGUL SYLLABLE BAH {0xBC30, 0xBC30, prH2, gcLo}, // HANGUL SYLLABLE BAE {0xBC31, 0xBC4B, prH3, gcLo}, // [27] HANGUL SYLLABLE BAEG..HANGUL SYLLABLE BAEH {0xBC4C, 0xBC4C, prH2, gcLo}, // HANGUL SYLLABLE BYA {0xBC4D, 0xBC67, prH3, gcLo}, // [27] HANGUL SYLLABLE BYAG..HANGUL SYLLABLE BYAH {0xBC68, 0xBC68, prH2, gcLo}, // HANGUL SYLLABLE BYAE {0xBC69, 0xBC83, prH3, gcLo}, // [27] HANGUL SYLLABLE BYAEG..HANGUL SYLLABLE BYAEH {0xBC84, 0xBC84, prH2, gcLo}, // HANGUL SYLLABLE BEO {0xBC85, 0xBC9F, prH3, gcLo}, // [27] HANGUL SYLLABLE BEOG..HANGUL SYLLABLE BEOH {0xBCA0, 0xBCA0, prH2, gcLo}, // HANGUL SYLLABLE BE {0xBCA1, 0xBCBB, prH3, gcLo}, // [27] HANGUL SYLLABLE BEG..HANGUL SYLLABLE BEH {0xBCBC, 0xBCBC, prH2, gcLo}, // HANGUL SYLLABLE BYEO {0xBCBD, 0xBCD7, prH3, gcLo}, // [27] HANGUL SYLLABLE BYEOG..HANGUL SYLLABLE BYEOH {0xBCD8, 0xBCD8, prH2, gcLo}, // HANGUL SYLLABLE BYE {0xBCD9, 0xBCF3, prH3, gcLo}, // [27] HANGUL SYLLABLE BYEG..HANGUL SYLLABLE BYEH {0xBCF4, 0xBCF4, prH2, gcLo}, // HANGUL SYLLABLE BO {0xBCF5, 0xBD0F, prH3, gcLo}, // [27] HANGUL SYLLABLE BOG..HANGUL SYLLABLE BOH {0xBD10, 0xBD10, prH2, gcLo}, // HANGUL SYLLABLE BWA {0xBD11, 0xBD2B, prH3, gcLo}, // [27] HANGUL SYLLABLE BWAG..HANGUL SYLLABLE BWAH {0xBD2C, 0xBD2C, prH2, gcLo}, // HANGUL SYLLABLE BWAE {0xBD2D, 0xBD47, prH3, gcLo}, // [27] HANGUL SYLLABLE BWAEG..HANGUL SYLLABLE BWAEH {0xBD48, 0xBD48, prH2, gcLo}, // HANGUL SYLLABLE BOE {0xBD49, 0xBD63, prH3, gcLo}, // [27] HANGUL SYLLABLE BOEG..HANGUL SYLLABLE BOEH {0xBD64, 0xBD64, prH2, gcLo}, // HANGUL SYLLABLE BYO {0xBD65, 0xBD7F, prH3, gcLo}, // [27] HANGUL SYLLABLE BYOG..HANGUL SYLLABLE BYOH {0xBD80, 0xBD80, prH2, gcLo}, // HANGUL SYLLABLE BU {0xBD81, 0xBD9B, prH3, gcLo}, // [27] HANGUL SYLLABLE BUG..HANGUL SYLLABLE BUH {0xBD9C, 0xBD9C, prH2, gcLo}, // HANGUL SYLLABLE BWEO {0xBD9D, 0xBDB7, prH3, gcLo}, // [27] HANGUL SYLLABLE BWEOG..HANGUL SYLLABLE BWEOH {0xBDB8, 0xBDB8, prH2, gcLo}, // HANGUL SYLLABLE BWE {0xBDB9, 0xBDD3, prH3, gcLo}, // [27] HANGUL SYLLABLE BWEG..HANGUL SYLLABLE BWEH {0xBDD4, 0xBDD4, prH2, gcLo}, // HANGUL SYLLABLE BWI {0xBDD5, 0xBDEF, prH3, gcLo}, // [27] HANGUL SYLLABLE BWIG..HANGUL SYLLABLE BWIH {0xBDF0, 0xBDF0, prH2, gcLo}, // HANGUL SYLLABLE BYU {0xBDF1, 0xBE0B, prH3, gcLo}, // [27] HANGUL SYLLABLE BYUG..HANGUL SYLLABLE BYUH {0xBE0C, 0xBE0C, prH2, gcLo}, // HANGUL SYLLABLE BEU {0xBE0D, 0xBE27, prH3, gcLo}, // [27] HANGUL SYLLABLE BEUG..HANGUL SYLLABLE BEUH {0xBE28, 0xBE28, prH2, gcLo}, // HANGUL SYLLABLE BYI {0xBE29, 0xBE43, prH3, gcLo}, // [27] HANGUL SYLLABLE BYIG..HANGUL SYLLABLE BYIH {0xBE44, 0xBE44, prH2, gcLo}, // HANGUL SYLLABLE BI {0xBE45, 0xBE5F, prH3, gcLo}, // [27] HANGUL SYLLABLE BIG..HANGUL SYLLABLE BIH {0xBE60, 0xBE60, prH2, gcLo}, // HANGUL SYLLABLE BBA {0xBE61, 0xBE7B, prH3, gcLo}, // [27] HANGUL SYLLABLE BBAG..HANGUL SYLLABLE BBAH {0xBE7C, 0xBE7C, prH2, gcLo}, // HANGUL SYLLABLE BBAE {0xBE7D, 0xBE97, prH3, gcLo}, // [27] HANGUL SYLLABLE BBAEG..HANGUL SYLLABLE BBAEH {0xBE98, 0xBE98, prH2, gcLo}, // HANGUL SYLLABLE BBYA {0xBE99, 0xBEB3, prH3, gcLo}, // [27] HANGUL SYLLABLE BBYAG..HANGUL SYLLABLE BBYAH {0xBEB4, 0xBEB4, prH2, gcLo}, // HANGUL SYLLABLE BBYAE {0xBEB5, 0xBECF, prH3, gcLo}, // [27] HANGUL SYLLABLE BBYAEG..HANGUL SYLLABLE BBYAEH {0xBED0, 0xBED0, prH2, gcLo}, // HANGUL SYLLABLE BBEO {0xBED1, 0xBEEB, prH3, gcLo}, // [27] HANGUL SYLLABLE BBEOG..HANGUL SYLLABLE BBEOH {0xBEEC, 0xBEEC, prH2, gcLo}, // HANGUL SYLLABLE BBE {0xBEED, 0xBF07, prH3, gcLo}, // [27] HANGUL SYLLABLE BBEG..HANGUL SYLLABLE BBEH {0xBF08, 0xBF08, prH2, gcLo}, // HANGUL SYLLABLE BBYEO {0xBF09, 0xBF23, prH3, gcLo}, // [27] HANGUL SYLLABLE BBYEOG..HANGUL SYLLABLE BBYEOH {0xBF24, 0xBF24, prH2, gcLo}, // HANGUL SYLLABLE BBYE {0xBF25, 0xBF3F, prH3, gcLo}, // [27] HANGUL SYLLABLE BBYEG..HANGUL SYLLABLE BBYEH {0xBF40, 0xBF40, prH2, gcLo}, // HANGUL SYLLABLE BBO {0xBF41, 0xBF5B, prH3, gcLo}, // [27] HANGUL SYLLABLE BBOG..HANGUL SYLLABLE BBOH {0xBF5C, 0xBF5C, prH2, gcLo}, // HANGUL SYLLABLE BBWA {0xBF5D, 0xBF77, prH3, gcLo}, // [27] HANGUL SYLLABLE BBWAG..HANGUL SYLLABLE BBWAH {0xBF78, 0xBF78, prH2, gcLo}, // HANGUL SYLLABLE BBWAE {0xBF79, 0xBF93, prH3, gcLo}, // [27] HANGUL SYLLABLE BBWAEG..HANGUL SYLLABLE BBWAEH {0xBF94, 0xBF94, prH2, gcLo}, // HANGUL SYLLABLE BBOE {0xBF95, 0xBFAF, prH3, gcLo}, // [27] HANGUL SYLLABLE BBOEG..HANGUL SYLLABLE BBOEH {0xBFB0, 0xBFB0, prH2, gcLo}, // HANGUL SYLLABLE BBYO {0xBFB1, 0xBFCB, prH3, gcLo}, // [27] HANGUL SYLLABLE BBYOG..HANGUL SYLLABLE BBYOH {0xBFCC, 0xBFCC, prH2, gcLo}, // HANGUL SYLLABLE BBU {0xBFCD, 0xBFE7, prH3, gcLo}, // [27] HANGUL SYLLABLE BBUG..HANGUL SYLLABLE BBUH {0xBFE8, 0xBFE8, prH2, gcLo}, // HANGUL SYLLABLE BBWEO {0xBFE9, 0xC003, prH3, gcLo}, // [27] HANGUL SYLLABLE BBWEOG..HANGUL SYLLABLE BBWEOH {0xC004, 0xC004, prH2, gcLo}, // HANGUL SYLLABLE BBWE {0xC005, 0xC01F, prH3, gcLo}, // [27] HANGUL SYLLABLE BBWEG..HANGUL SYLLABLE BBWEH {0xC020, 0xC020, prH2, gcLo}, // HANGUL SYLLABLE BBWI {0xC021, 0xC03B, prH3, gcLo}, // [27] HANGUL SYLLABLE BBWIG..HANGUL SYLLABLE BBWIH {0xC03C, 0xC03C, prH2, gcLo}, // HANGUL SYLLABLE BBYU {0xC03D, 0xC057, prH3, gcLo}, // [27] HANGUL SYLLABLE BBYUG..HANGUL SYLLABLE BBYUH {0xC058, 0xC058, prH2, gcLo}, // HANGUL SYLLABLE BBEU {0xC059, 0xC073, prH3, gcLo}, // [27] HANGUL SYLLABLE BBEUG..HANGUL SYLLABLE BBEUH {0xC074, 0xC074, prH2, gcLo}, // HANGUL SYLLABLE BBYI {0xC075, 0xC08F, prH3, gcLo}, // [27] HANGUL SYLLABLE BBYIG..HANGUL SYLLABLE BBYIH {0xC090, 0xC090, prH2, gcLo}, // HANGUL SYLLABLE BBI {0xC091, 0xC0AB, prH3, gcLo}, // [27] HANGUL SYLLABLE BBIG..HANGUL SYLLABLE BBIH {0xC0AC, 0xC0AC, prH2, gcLo}, // HANGUL SYLLABLE SA {0xC0AD, 0xC0C7, prH3, gcLo}, // [27] HANGUL SYLLABLE SAG..HANGUL SYLLABLE SAH {0xC0C8, 0xC0C8, prH2, gcLo}, // HANGUL SYLLABLE SAE {0xC0C9, 0xC0E3, prH3, gcLo}, // [27] HANGUL SYLLABLE SAEG..HANGUL SYLLABLE SAEH {0xC0E4, 0xC0E4, prH2, gcLo}, // HANGUL SYLLABLE SYA {0xC0E5, 0xC0FF, prH3, gcLo}, // [27] HANGUL SYLLABLE SYAG..HANGUL SYLLABLE SYAH {0xC100, 0xC100, prH2, gcLo}, // HANGUL SYLLABLE SYAE {0xC101, 0xC11B, prH3, gcLo}, // [27] HANGUL SYLLABLE SYAEG..HANGUL SYLLABLE SYAEH {0xC11C, 0xC11C, prH2, gcLo}, // HANGUL SYLLABLE SEO {0xC11D, 0xC137, prH3, gcLo}, // [27] HANGUL SYLLABLE SEOG..HANGUL SYLLABLE SEOH {0xC138, 0xC138, prH2, gcLo}, // HANGUL SYLLABLE SE {0xC139, 0xC153, prH3, gcLo}, // [27] HANGUL SYLLABLE SEG..HANGUL SYLLABLE SEH {0xC154, 0xC154, prH2, gcLo}, // HANGUL SYLLABLE SYEO {0xC155, 0xC16F, prH3, gcLo}, // [27] HANGUL SYLLABLE SYEOG..HANGUL SYLLABLE SYEOH {0xC170, 0xC170, prH2, gcLo}, // HANGUL SYLLABLE SYE {0xC171, 0xC18B, prH3, gcLo}, // [27] HANGUL SYLLABLE SYEG..HANGUL SYLLABLE SYEH {0xC18C, 0xC18C, prH2, gcLo}, // HANGUL SYLLABLE SO {0xC18D, 0xC1A7, prH3, gcLo}, // [27] HANGUL SYLLABLE SOG..HANGUL SYLLABLE SOH {0xC1A8, 0xC1A8, prH2, gcLo}, // HANGUL SYLLABLE SWA {0xC1A9, 0xC1C3, prH3, gcLo}, // [27] HANGUL SYLLABLE SWAG..HANGUL SYLLABLE SWAH {0xC1C4, 0xC1C4, prH2, gcLo}, // HANGUL SYLLABLE SWAE {0xC1C5, 0xC1DF, prH3, gcLo}, // [27] HANGUL SYLLABLE SWAEG..HANGUL SYLLABLE SWAEH {0xC1E0, 0xC1E0, prH2, gcLo}, // HANGUL SYLLABLE SOE {0xC1E1, 0xC1FB, prH3, gcLo}, // [27] HANGUL SYLLABLE SOEG..HANGUL SYLLABLE SOEH {0xC1FC, 0xC1FC, prH2, gcLo}, // HANGUL SYLLABLE SYO {0xC1FD, 0xC217, prH3, gcLo}, // [27] HANGUL SYLLABLE SYOG..HANGUL SYLLABLE SYOH {0xC218, 0xC218, prH2, gcLo}, // HANGUL SYLLABLE SU {0xC219, 0xC233, prH3, gcLo}, // [27] HANGUL SYLLABLE SUG..HANGUL SYLLABLE SUH {0xC234, 0xC234, prH2, gcLo}, // HANGUL SYLLABLE SWEO {0xC235, 0xC24F, prH3, gcLo}, // [27] HANGUL SYLLABLE SWEOG..HANGUL SYLLABLE SWEOH {0xC250, 0xC250, prH2, gcLo}, // HANGUL SYLLABLE SWE {0xC251, 0xC26B, prH3, gcLo}, // [27] HANGUL SYLLABLE SWEG..HANGUL SYLLABLE SWEH {0xC26C, 0xC26C, prH2, gcLo}, // HANGUL SYLLABLE SWI {0xC26D, 0xC287, prH3, gcLo}, // [27] HANGUL SYLLABLE SWIG..HANGUL SYLLABLE SWIH {0xC288, 0xC288, prH2, gcLo}, // HANGUL SYLLABLE SYU {0xC289, 0xC2A3, prH3, gcLo}, // [27] HANGUL SYLLABLE SYUG..HANGUL SYLLABLE SYUH {0xC2A4, 0xC2A4, prH2, gcLo}, // HANGUL SYLLABLE SEU {0xC2A5, 0xC2BF, prH3, gcLo}, // [27] HANGUL SYLLABLE SEUG..HANGUL SYLLABLE SEUH {0xC2C0, 0xC2C0, prH2, gcLo}, // HANGUL SYLLABLE SYI {0xC2C1, 0xC2DB, prH3, gcLo}, // [27] HANGUL SYLLABLE SYIG..HANGUL SYLLABLE SYIH {0xC2DC, 0xC2DC, prH2, gcLo}, // HANGUL SYLLABLE SI {0xC2DD, 0xC2F7, prH3, gcLo}, // [27] HANGUL SYLLABLE SIG..HANGUL SYLLABLE SIH {0xC2F8, 0xC2F8, prH2, gcLo}, // HANGUL SYLLABLE SSA {0xC2F9, 0xC313, prH3, gcLo}, // [27] HANGUL SYLLABLE SSAG..HANGUL SYLLABLE SSAH {0xC314, 0xC314, prH2, gcLo}, // HANGUL SYLLABLE SSAE {0xC315, 0xC32F, prH3, gcLo}, // [27] HANGUL SYLLABLE SSAEG..HANGUL SYLLABLE SSAEH {0xC330, 0xC330, prH2, gcLo}, // HANGUL SYLLABLE SSYA {0xC331, 0xC34B, prH3, gcLo}, // [27] HANGUL SYLLABLE SSYAG..HANGUL SYLLABLE SSYAH {0xC34C, 0xC34C, prH2, gcLo}, // HANGUL SYLLABLE SSYAE {0xC34D, 0xC367, prH3, gcLo}, // [27] HANGUL SYLLABLE SSYAEG..HANGUL SYLLABLE SSYAEH {0xC368, 0xC368, prH2, gcLo}, // HANGUL SYLLABLE SSEO {0xC369, 0xC383, prH3, gcLo}, // [27] HANGUL SYLLABLE SSEOG..HANGUL SYLLABLE SSEOH {0xC384, 0xC384, prH2, gcLo}, // HANGUL SYLLABLE SSE {0xC385, 0xC39F, prH3, gcLo}, // [27] HANGUL SYLLABLE SSEG..HANGUL SYLLABLE SSEH {0xC3A0, 0xC3A0, prH2, gcLo}, // HANGUL SYLLABLE SSYEO {0xC3A1, 0xC3BB, prH3, gcLo}, // [27] HANGUL SYLLABLE SSYEOG..HANGUL SYLLABLE SSYEOH {0xC3BC, 0xC3BC, prH2, gcLo}, // HANGUL SYLLABLE SSYE {0xC3BD, 0xC3D7, prH3, gcLo}, // [27] HANGUL SYLLABLE SSYEG..HANGUL SYLLABLE SSYEH {0xC3D8, 0xC3D8, prH2, gcLo}, // HANGUL SYLLABLE SSO {0xC3D9, 0xC3F3, prH3, gcLo}, // [27] HANGUL SYLLABLE SSOG..HANGUL SYLLABLE SSOH {0xC3F4, 0xC3F4, prH2, gcLo}, // HANGUL SYLLABLE SSWA {0xC3F5, 0xC40F, prH3, gcLo}, // [27] HANGUL SYLLABLE SSWAG..HANGUL SYLLABLE SSWAH {0xC410, 0xC410, prH2, gcLo}, // HANGUL SYLLABLE SSWAE {0xC411, 0xC42B, prH3, gcLo}, // [27] HANGUL SYLLABLE SSWAEG..HANGUL SYLLABLE SSWAEH {0xC42C, 0xC42C, prH2, gcLo}, // HANGUL SYLLABLE SSOE {0xC42D, 0xC447, prH3, gcLo}, // [27] HANGUL SYLLABLE SSOEG..HANGUL SYLLABLE SSOEH {0xC448, 0xC448, prH2, gcLo}, // HANGUL SYLLABLE SSYO {0xC449, 0xC463, prH3, gcLo}, // [27] HANGUL SYLLABLE SSYOG..HANGUL SYLLABLE SSYOH {0xC464, 0xC464, prH2, gcLo}, // HANGUL SYLLABLE SSU {0xC465, 0xC47F, prH3, gcLo}, // [27] HANGUL SYLLABLE SSUG..HANGUL SYLLABLE SSUH {0xC480, 0xC480, prH2, gcLo}, // HANGUL SYLLABLE SSWEO {0xC481, 0xC49B, prH3, gcLo}, // [27] HANGUL SYLLABLE SSWEOG..HANGUL SYLLABLE SSWEOH {0xC49C, 0xC49C, prH2, gcLo}, // HANGUL SYLLABLE SSWE {0xC49D, 0xC4B7, prH3, gcLo}, // [27] HANGUL SYLLABLE SSWEG..HANGUL SYLLABLE SSWEH {0xC4B8, 0xC4B8, prH2, gcLo}, // HANGUL SYLLABLE SSWI {0xC4B9, 0xC4D3, prH3, gcLo}, // [27] HANGUL SYLLABLE SSWIG..HANGUL SYLLABLE SSWIH {0xC4D4, 0xC4D4, prH2, gcLo}, // HANGUL SYLLABLE SSYU {0xC4D5, 0xC4EF, prH3, gcLo}, // [27] HANGUL SYLLABLE SSYUG..HANGUL SYLLABLE SSYUH {0xC4F0, 0xC4F0, prH2, gcLo}, // HANGUL SYLLABLE SSEU {0xC4F1, 0xC50B, prH3, gcLo}, // [27] HANGUL SYLLABLE SSEUG..HANGUL SYLLABLE SSEUH {0xC50C, 0xC50C, prH2, gcLo}, // HANGUL SYLLABLE SSYI {0xC50D, 0xC527, prH3, gcLo}, // [27] HANGUL SYLLABLE SSYIG..HANGUL SYLLABLE SSYIH {0xC528, 0xC528, prH2, gcLo}, // HANGUL SYLLABLE SSI {0xC529, 0xC543, prH3, gcLo}, // [27] HANGUL SYLLABLE SSIG..HANGUL SYLLABLE SSIH {0xC544, 0xC544, prH2, gcLo}, // HANGUL SYLLABLE A {0xC545, 0xC55F, prH3, gcLo}, // [27] HANGUL SYLLABLE AG..HANGUL SYLLABLE AH {0xC560, 0xC560, prH2, gcLo}, // HANGUL SYLLABLE AE {0xC561, 0xC57B, prH3, gcLo}, // [27] HANGUL SYLLABLE AEG..HANGUL SYLLABLE AEH {0xC57C, 0xC57C, prH2, gcLo}, // HANGUL SYLLABLE YA {0xC57D, 0xC597, prH3, gcLo}, // [27] HANGUL SYLLABLE YAG..HANGUL SYLLABLE YAH {0xC598, 0xC598, prH2, gcLo}, // HANGUL SYLLABLE YAE {0xC599, 0xC5B3, prH3, gcLo}, // [27] HANGUL SYLLABLE YAEG..HANGUL SYLLABLE YAEH {0xC5B4, 0xC5B4, prH2, gcLo}, // HANGUL SYLLABLE EO {0xC5B5, 0xC5CF, prH3, gcLo}, // [27] HANGUL SYLLABLE EOG..HANGUL SYLLABLE EOH {0xC5D0, 0xC5D0, prH2, gcLo}, // HANGUL SYLLABLE E {0xC5D1, 0xC5EB, prH3, gcLo}, // [27] HANGUL SYLLABLE EG..HANGUL SYLLABLE EH {0xC5EC, 0xC5EC, prH2, gcLo}, // HANGUL SYLLABLE YEO {0xC5ED, 0xC607, prH3, gcLo}, // [27] HANGUL SYLLABLE YEOG..HANGUL SYLLABLE YEOH {0xC608, 0xC608, prH2, gcLo}, // HANGUL SYLLABLE YE {0xC609, 0xC623, prH3, gcLo}, // [27] HANGUL SYLLABLE YEG..HANGUL SYLLABLE YEH {0xC624, 0xC624, prH2, gcLo}, // HANGUL SYLLABLE O {0xC625, 0xC63F, prH3, gcLo}, // [27] HANGUL SYLLABLE OG..HANGUL SYLLABLE OH {0xC640, 0xC640, prH2, gcLo}, // HANGUL SYLLABLE WA {0xC641, 0xC65B, prH3, gcLo}, // [27] HANGUL SYLLABLE WAG..HANGUL SYLLABLE WAH {0xC65C, 0xC65C, prH2, gcLo}, // HANGUL SYLLABLE WAE {0xC65D, 0xC677, prH3, gcLo}, // [27] HANGUL SYLLABLE WAEG..HANGUL SYLLABLE WAEH {0xC678, 0xC678, prH2, gcLo}, // HANGUL SYLLABLE OE {0xC679, 0xC693, prH3, gcLo}, // [27] HANGUL SYLLABLE OEG..HANGUL SYLLABLE OEH {0xC694, 0xC694, prH2, gcLo}, // HANGUL SYLLABLE YO {0xC695, 0xC6AF, prH3, gcLo}, // [27] HANGUL SYLLABLE YOG..HANGUL SYLLABLE YOH {0xC6B0, 0xC6B0, prH2, gcLo}, // HANGUL SYLLABLE U {0xC6B1, 0xC6CB, prH3, gcLo}, // [27] HANGUL SYLLABLE UG..HANGUL SYLLABLE UH {0xC6CC, 0xC6CC, prH2, gcLo}, // HANGUL SYLLABLE WEO {0xC6CD, 0xC6E7, prH3, gcLo}, // [27] HANGUL SYLLABLE WEOG..HANGUL SYLLABLE WEOH {0xC6E8, 0xC6E8, prH2, gcLo}, // HANGUL SYLLABLE WE {0xC6E9, 0xC703, prH3, gcLo}, // [27] HANGUL SYLLABLE WEG..HANGUL SYLLABLE WEH {0xC704, 0xC704, prH2, gcLo}, // HANGUL SYLLABLE WI {0xC705, 0xC71F, prH3, gcLo}, // [27] HANGUL SYLLABLE WIG..HANGUL SYLLABLE WIH {0xC720, 0xC720, prH2, gcLo}, // HANGUL SYLLABLE YU {0xC721, 0xC73B, prH3, gcLo}, // [27] HANGUL SYLLABLE YUG..HANGUL SYLLABLE YUH {0xC73C, 0xC73C, prH2, gcLo}, // HANGUL SYLLABLE EU {0xC73D, 0xC757, prH3, gcLo}, // [27] HANGUL SYLLABLE EUG..HANGUL SYLLABLE EUH {0xC758, 0xC758, prH2, gcLo}, // HANGUL SYLLABLE YI {0xC759, 0xC773, prH3, gcLo}, // [27] HANGUL SYLLABLE YIG..HANGUL SYLLABLE YIH {0xC774, 0xC774, prH2, gcLo}, // HANGUL SYLLABLE I {0xC775, 0xC78F, prH3, gcLo}, // [27] HANGUL SYLLABLE IG..HANGUL SYLLABLE IH {0xC790, 0xC790, prH2, gcLo}, // HANGUL SYLLABLE JA {0xC791, 0xC7AB, prH3, gcLo}, // [27] HANGUL SYLLABLE JAG..HANGUL SYLLABLE JAH {0xC7AC, 0xC7AC, prH2, gcLo}, // HANGUL SYLLABLE JAE {0xC7AD, 0xC7C7, prH3, gcLo}, // [27] HANGUL SYLLABLE JAEG..HANGUL SYLLABLE JAEH {0xC7C8, 0xC7C8, prH2, gcLo}, // HANGUL SYLLABLE JYA {0xC7C9, 0xC7E3, prH3, gcLo}, // [27] HANGUL SYLLABLE JYAG..HANGUL SYLLABLE JYAH {0xC7E4, 0xC7E4, prH2, gcLo}, // HANGUL SYLLABLE JYAE {0xC7E5, 0xC7FF, prH3, gcLo}, // [27] HANGUL SYLLABLE JYAEG..HANGUL SYLLABLE JYAEH {0xC800, 0xC800, prH2, gcLo}, // HANGUL SYLLABLE JEO {0xC801, 0xC81B, prH3, gcLo}, // [27] HANGUL SYLLABLE JEOG..HANGUL SYLLABLE JEOH {0xC81C, 0xC81C, prH2, gcLo}, // HANGUL SYLLABLE JE {0xC81D, 0xC837, prH3, gcLo}, // [27] HANGUL SYLLABLE JEG..HANGUL SYLLABLE JEH {0xC838, 0xC838, prH2, gcLo}, // HANGUL SYLLABLE JYEO {0xC839, 0xC853, prH3, gcLo}, // [27] HANGUL SYLLABLE JYEOG..HANGUL SYLLABLE JYEOH {0xC854, 0xC854, prH2, gcLo}, // HANGUL SYLLABLE JYE {0xC855, 0xC86F, prH3, gcLo}, // [27] HANGUL SYLLABLE JYEG..HANGUL SYLLABLE JYEH {0xC870, 0xC870, prH2, gcLo}, // HANGUL SYLLABLE JO {0xC871, 0xC88B, prH3, gcLo}, // [27] HANGUL SYLLABLE JOG..HANGUL SYLLABLE JOH {0xC88C, 0xC88C, prH2, gcLo}, // HANGUL SYLLABLE JWA {0xC88D, 0xC8A7, prH3, gcLo}, // [27] HANGUL SYLLABLE JWAG..HANGUL SYLLABLE JWAH {0xC8A8, 0xC8A8, prH2, gcLo}, // HANGUL SYLLABLE JWAE {0xC8A9, 0xC8C3, prH3, gcLo}, // [27] HANGUL SYLLABLE JWAEG..HANGUL SYLLABLE JWAEH {0xC8C4, 0xC8C4, prH2, gcLo}, // HANGUL SYLLABLE JOE {0xC8C5, 0xC8DF, prH3, gcLo}, // [27] HANGUL SYLLABLE JOEG..HANGUL SYLLABLE JOEH {0xC8E0, 0xC8E0, prH2, gcLo}, // HANGUL SYLLABLE JYO {0xC8E1, 0xC8FB, prH3, gcLo}, // [27] HANGUL SYLLABLE JYOG..HANGUL SYLLABLE JYOH {0xC8FC, 0xC8FC, prH2, gcLo}, // HANGUL SYLLABLE JU {0xC8FD, 0xC917, prH3, gcLo}, // [27] HANGUL SYLLABLE JUG..HANGUL SYLLABLE JUH {0xC918, 0xC918, prH2, gcLo}, // HANGUL SYLLABLE JWEO {0xC919, 0xC933, prH3, gcLo}, // [27] HANGUL SYLLABLE JWEOG..HANGUL SYLLABLE JWEOH {0xC934, 0xC934, prH2, gcLo}, // HANGUL SYLLABLE JWE {0xC935, 0xC94F, prH3, gcLo}, // [27] HANGUL SYLLABLE JWEG..HANGUL SYLLABLE JWEH {0xC950, 0xC950, prH2, gcLo}, // HANGUL SYLLABLE JWI {0xC951, 0xC96B, prH3, gcLo}, // [27] HANGUL SYLLABLE JWIG..HANGUL SYLLABLE JWIH {0xC96C, 0xC96C, prH2, gcLo}, // HANGUL SYLLABLE JYU {0xC96D, 0xC987, prH3, gcLo}, // [27] HANGUL SYLLABLE JYUG..HANGUL SYLLABLE JYUH {0xC988, 0xC988, prH2, gcLo}, // HANGUL SYLLABLE JEU {0xC989, 0xC9A3, prH3, gcLo}, // [27] HANGUL SYLLABLE JEUG..HANGUL SYLLABLE JEUH {0xC9A4, 0xC9A4, prH2, gcLo}, // HANGUL SYLLABLE JYI {0xC9A5, 0xC9BF, prH3, gcLo}, // [27] HANGUL SYLLABLE JYIG..HANGUL SYLLABLE JYIH {0xC9C0, 0xC9C0, prH2, gcLo}, // HANGUL SYLLABLE JI {0xC9C1, 0xC9DB, prH3, gcLo}, // [27] HANGUL SYLLABLE JIG..HANGUL SYLLABLE JIH {0xC9DC, 0xC9DC, prH2, gcLo}, // HANGUL SYLLABLE JJA {0xC9DD, 0xC9F7, prH3, gcLo}, // [27] HANGUL SYLLABLE JJAG..HANGUL SYLLABLE JJAH {0xC9F8, 0xC9F8, prH2, gcLo}, // HANGUL SYLLABLE JJAE {0xC9F9, 0xCA13, prH3, gcLo}, // [27] HANGUL SYLLABLE JJAEG..HANGUL SYLLABLE JJAEH {0xCA14, 0xCA14, prH2, gcLo}, // HANGUL SYLLABLE JJYA {0xCA15, 0xCA2F, prH3, gcLo}, // [27] HANGUL SYLLABLE JJYAG..HANGUL SYLLABLE JJYAH {0xCA30, 0xCA30, prH2, gcLo}, // HANGUL SYLLABLE JJYAE {0xCA31, 0xCA4B, prH3, gcLo}, // [27] HANGUL SYLLABLE JJYAEG..HANGUL SYLLABLE JJYAEH {0xCA4C, 0xCA4C, prH2, gcLo}, // HANGUL SYLLABLE JJEO {0xCA4D, 0xCA67, prH3, gcLo}, // [27] HANGUL SYLLABLE JJEOG..HANGUL SYLLABLE JJEOH {0xCA68, 0xCA68, prH2, gcLo}, // HANGUL SYLLABLE JJE {0xCA69, 0xCA83, prH3, gcLo}, // [27] HANGUL SYLLABLE JJEG..HANGUL SYLLABLE JJEH {0xCA84, 0xCA84, prH2, gcLo}, // HANGUL SYLLABLE JJYEO {0xCA85, 0xCA9F, prH3, gcLo}, // [27] HANGUL SYLLABLE JJYEOG..HANGUL SYLLABLE JJYEOH {0xCAA0, 0xCAA0, prH2, gcLo}, // HANGUL SYLLABLE JJYE {0xCAA1, 0xCABB, prH3, gcLo}, // [27] HANGUL SYLLABLE JJYEG..HANGUL SYLLABLE JJYEH {0xCABC, 0xCABC, prH2, gcLo}, // HANGUL SYLLABLE JJO {0xCABD, 0xCAD7, prH3, gcLo}, // [27] HANGUL SYLLABLE JJOG..HANGUL SYLLABLE JJOH {0xCAD8, 0xCAD8, prH2, gcLo}, // HANGUL SYLLABLE JJWA {0xCAD9, 0xCAF3, prH3, gcLo}, // [27] HANGUL SYLLABLE JJWAG..HANGUL SYLLABLE JJWAH {0xCAF4, 0xCAF4, prH2, gcLo}, // HANGUL SYLLABLE JJWAE {0xCAF5, 0xCB0F, prH3, gcLo}, // [27] HANGUL SYLLABLE JJWAEG..HANGUL SYLLABLE JJWAEH {0xCB10, 0xCB10, prH2, gcLo}, // HANGUL SYLLABLE JJOE {0xCB11, 0xCB2B, prH3, gcLo}, // [27] HANGUL SYLLABLE JJOEG..HANGUL SYLLABLE JJOEH {0xCB2C, 0xCB2C, prH2, gcLo}, // HANGUL SYLLABLE JJYO {0xCB2D, 0xCB47, prH3, gcLo}, // [27] HANGUL SYLLABLE JJYOG..HANGUL SYLLABLE JJYOH {0xCB48, 0xCB48, prH2, gcLo}, // HANGUL SYLLABLE JJU {0xCB49, 0xCB63, prH3, gcLo}, // [27] HANGUL SYLLABLE JJUG..HANGUL SYLLABLE JJUH {0xCB64, 0xCB64, prH2, gcLo}, // HANGUL SYLLABLE JJWEO {0xCB65, 0xCB7F, prH3, gcLo}, // [27] HANGUL SYLLABLE JJWEOG..HANGUL SYLLABLE JJWEOH {0xCB80, 0xCB80, prH2, gcLo}, // HANGUL SYLLABLE JJWE {0xCB81, 0xCB9B, prH3, gcLo}, // [27] HANGUL SYLLABLE JJWEG..HANGUL SYLLABLE JJWEH {0xCB9C, 0xCB9C, prH2, gcLo}, // HANGUL SYLLABLE JJWI {0xCB9D, 0xCBB7, prH3, gcLo}, // [27] HANGUL SYLLABLE JJWIG..HANGUL SYLLABLE JJWIH {0xCBB8, 0xCBB8, prH2, gcLo}, // HANGUL SYLLABLE JJYU {0xCBB9, 0xCBD3, prH3, gcLo}, // [27] HANGUL SYLLABLE JJYUG..HANGUL SYLLABLE JJYUH {0xCBD4, 0xCBD4, prH2, gcLo}, // HANGUL SYLLABLE JJEU {0xCBD5, 0xCBEF, prH3, gcLo}, // [27] HANGUL SYLLABLE JJEUG..HANGUL SYLLABLE JJEUH {0xCBF0, 0xCBF0, prH2, gcLo}, // HANGUL SYLLABLE JJYI {0xCBF1, 0xCC0B, prH3, gcLo}, // [27] HANGUL SYLLABLE JJYIG..HANGUL SYLLABLE JJYIH {0xCC0C, 0xCC0C, prH2, gcLo}, // HANGUL SYLLABLE JJI {0xCC0D, 0xCC27, prH3, gcLo}, // [27] HANGUL SYLLABLE JJIG..HANGUL SYLLABLE JJIH {0xCC28, 0xCC28, prH2, gcLo}, // HANGUL SYLLABLE CA {0xCC29, 0xCC43, prH3, gcLo}, // [27] HANGUL SYLLABLE CAG..HANGUL SYLLABLE CAH {0xCC44, 0xCC44, prH2, gcLo}, // HANGUL SYLLABLE CAE {0xCC45, 0xCC5F, prH3, gcLo}, // [27] HANGUL SYLLABLE CAEG..HANGUL SYLLABLE CAEH {0xCC60, 0xCC60, prH2, gcLo}, // HANGUL SYLLABLE CYA {0xCC61, 0xCC7B, prH3, gcLo}, // [27] HANGUL SYLLABLE CYAG..HANGUL SYLLABLE CYAH {0xCC7C, 0xCC7C, prH2, gcLo}, // HANGUL SYLLABLE CYAE {0xCC7D, 0xCC97, prH3, gcLo}, // [27] HANGUL SYLLABLE CYAEG..HANGUL SYLLABLE CYAEH {0xCC98, 0xCC98, prH2, gcLo}, // HANGUL SYLLABLE CEO {0xCC99, 0xCCB3, prH3, gcLo}, // [27] HANGUL SYLLABLE CEOG..HANGUL SYLLABLE CEOH {0xCCB4, 0xCCB4, prH2, gcLo}, // HANGUL SYLLABLE CE {0xCCB5, 0xCCCF, prH3, gcLo}, // [27] HANGUL SYLLABLE CEG..HANGUL SYLLABLE CEH {0xCCD0, 0xCCD0, prH2, gcLo}, // HANGUL SYLLABLE CYEO {0xCCD1, 0xCCEB, prH3, gcLo}, // [27] HANGUL SYLLABLE CYEOG..HANGUL SYLLABLE CYEOH {0xCCEC, 0xCCEC, prH2, gcLo}, // HANGUL SYLLABLE CYE {0xCCED, 0xCD07, prH3, gcLo}, // [27] HANGUL SYLLABLE CYEG..HANGUL SYLLABLE CYEH {0xCD08, 0xCD08, prH2, gcLo}, // HANGUL SYLLABLE CO {0xCD09, 0xCD23, prH3, gcLo}, // [27] HANGUL SYLLABLE COG..HANGUL SYLLABLE COH {0xCD24, 0xCD24, prH2, gcLo}, // HANGUL SYLLABLE CWA {0xCD25, 0xCD3F, prH3, gcLo}, // [27] HANGUL SYLLABLE CWAG..HANGUL SYLLABLE CWAH {0xCD40, 0xCD40, prH2, gcLo}, // HANGUL SYLLABLE CWAE {0xCD41, 0xCD5B, prH3, gcLo}, // [27] HANGUL SYLLABLE CWAEG..HANGUL SYLLABLE CWAEH {0xCD5C, 0xCD5C, prH2, gcLo}, // HANGUL SYLLABLE COE {0xCD5D, 0xCD77, prH3, gcLo}, // [27] HANGUL SYLLABLE COEG..HANGUL SYLLABLE COEH {0xCD78, 0xCD78, prH2, gcLo}, // HANGUL SYLLABLE CYO {0xCD79, 0xCD93, prH3, gcLo}, // [27] HANGUL SYLLABLE CYOG..HANGUL SYLLABLE CYOH {0xCD94, 0xCD94, prH2, gcLo}, // HANGUL SYLLABLE CU {0xCD95, 0xCDAF, prH3, gcLo}, // [27] HANGUL SYLLABLE CUG..HANGUL SYLLABLE CUH {0xCDB0, 0xCDB0, prH2, gcLo}, // HANGUL SYLLABLE CWEO {0xCDB1, 0xCDCB, prH3, gcLo}, // [27] HANGUL SYLLABLE CWEOG..HANGUL SYLLABLE CWEOH {0xCDCC, 0xCDCC, prH2, gcLo}, // HANGUL SYLLABLE CWE {0xCDCD, 0xCDE7, prH3, gcLo}, // [27] HANGUL SYLLABLE CWEG..HANGUL SYLLABLE CWEH {0xCDE8, 0xCDE8, prH2, gcLo}, // HANGUL SYLLABLE CWI {0xCDE9, 0xCE03, prH3, gcLo}, // [27] HANGUL SYLLABLE CWIG..HANGUL SYLLABLE CWIH {0xCE04, 0xCE04, prH2, gcLo}, // HANGUL SYLLABLE CYU {0xCE05, 0xCE1F, prH3, gcLo}, // [27] HANGUL SYLLABLE CYUG..HANGUL SYLLABLE CYUH {0xCE20, 0xCE20, prH2, gcLo}, // HANGUL SYLLABLE CEU {0xCE21, 0xCE3B, prH3, gcLo}, // [27] HANGUL SYLLABLE CEUG..HANGUL SYLLABLE CEUH {0xCE3C, 0xCE3C, prH2, gcLo}, // HANGUL SYLLABLE CYI {0xCE3D, 0xCE57, prH3, gcLo}, // [27] HANGUL SYLLABLE CYIG..HANGUL SYLLABLE CYIH {0xCE58, 0xCE58, prH2, gcLo}, // HANGUL SYLLABLE CI {0xCE59, 0xCE73, prH3, gcLo}, // [27] HANGUL SYLLABLE CIG..HANGUL SYLLABLE CIH {0xCE74, 0xCE74, prH2, gcLo}, // HANGUL SYLLABLE KA {0xCE75, 0xCE8F, prH3, gcLo}, // [27] HANGUL SYLLABLE KAG..HANGUL SYLLABLE KAH {0xCE90, 0xCE90, prH2, gcLo}, // HANGUL SYLLABLE KAE {0xCE91, 0xCEAB, prH3, gcLo}, // [27] HANGUL SYLLABLE KAEG..HANGUL SYLLABLE KAEH {0xCEAC, 0xCEAC, prH2, gcLo}, // HANGUL SYLLABLE KYA {0xCEAD, 0xCEC7, prH3, gcLo}, // [27] HANGUL SYLLABLE KYAG..HANGUL SYLLABLE KYAH {0xCEC8, 0xCEC8, prH2, gcLo}, // HANGUL SYLLABLE KYAE {0xCEC9, 0xCEE3, prH3, gcLo}, // [27] HANGUL SYLLABLE KYAEG..HANGUL SYLLABLE KYAEH {0xCEE4, 0xCEE4, prH2, gcLo}, // HANGUL SYLLABLE KEO {0xCEE5, 0xCEFF, prH3, gcLo}, // [27] HANGUL SYLLABLE KEOG..HANGUL SYLLABLE KEOH {0xCF00, 0xCF00, prH2, gcLo}, // HANGUL SYLLABLE KE {0xCF01, 0xCF1B, prH3, gcLo}, // [27] HANGUL SYLLABLE KEG..HANGUL SYLLABLE KEH {0xCF1C, 0xCF1C, prH2, gcLo}, // HANGUL SYLLABLE KYEO {0xCF1D, 0xCF37, prH3, gcLo}, // [27] HANGUL SYLLABLE KYEOG..HANGUL SYLLABLE KYEOH {0xCF38, 0xCF38, prH2, gcLo}, // HANGUL SYLLABLE KYE {0xCF39, 0xCF53, prH3, gcLo}, // [27] HANGUL SYLLABLE KYEG..HANGUL SYLLABLE KYEH {0xCF54, 0xCF54, prH2, gcLo}, // HANGUL SYLLABLE KO {0xCF55, 0xCF6F, prH3, gcLo}, // [27] HANGUL SYLLABLE KOG..HANGUL SYLLABLE KOH {0xCF70, 0xCF70, prH2, gcLo}, // HANGUL SYLLABLE KWA {0xCF71, 0xCF8B, prH3, gcLo}, // [27] HANGUL SYLLABLE KWAG..HANGUL SYLLABLE KWAH {0xCF8C, 0xCF8C, prH2, gcLo}, // HANGUL SYLLABLE KWAE {0xCF8D, 0xCFA7, prH3, gcLo}, // [27] HANGUL SYLLABLE KWAEG..HANGUL SYLLABLE KWAEH {0xCFA8, 0xCFA8, prH2, gcLo}, // HANGUL SYLLABLE KOE {0xCFA9, 0xCFC3, prH3, gcLo}, // [27] HANGUL SYLLABLE KOEG..HANGUL SYLLABLE KOEH {0xCFC4, 0xCFC4, prH2, gcLo}, // HANGUL SYLLABLE KYO {0xCFC5, 0xCFDF, prH3, gcLo}, // [27] HANGUL SYLLABLE KYOG..HANGUL SYLLABLE KYOH {0xCFE0, 0xCFE0, prH2, gcLo}, // HANGUL SYLLABLE KU {0xCFE1, 0xCFFB, prH3, gcLo}, // [27] HANGUL SYLLABLE KUG..HANGUL SYLLABLE KUH {0xCFFC, 0xCFFC, prH2, gcLo}, // HANGUL SYLLABLE KWEO {0xCFFD, 0xD017, prH3, gcLo}, // [27] HANGUL SYLLABLE KWEOG..HANGUL SYLLABLE KWEOH {0xD018, 0xD018, prH2, gcLo}, // HANGUL SYLLABLE KWE {0xD019, 0xD033, prH3, gcLo}, // [27] HANGUL SYLLABLE KWEG..HANGUL SYLLABLE KWEH {0xD034, 0xD034, prH2, gcLo}, // HANGUL SYLLABLE KWI {0xD035, 0xD04F, prH3, gcLo}, // [27] HANGUL SYLLABLE KWIG..HANGUL SYLLABLE KWIH {0xD050, 0xD050, prH2, gcLo}, // HANGUL SYLLABLE KYU {0xD051, 0xD06B, prH3, gcLo}, // [27] HANGUL SYLLABLE KYUG..HANGUL SYLLABLE KYUH {0xD06C, 0xD06C, prH2, gcLo}, // HANGUL SYLLABLE KEU {0xD06D, 0xD087, prH3, gcLo}, // [27] HANGUL SYLLABLE KEUG..HANGUL SYLLABLE KEUH {0xD088, 0xD088, prH2, gcLo}, // HANGUL SYLLABLE KYI {0xD089, 0xD0A3, prH3, gcLo}, // [27] HANGUL SYLLABLE KYIG..HANGUL SYLLABLE KYIH {0xD0A4, 0xD0A4, prH2, gcLo}, // HANGUL SYLLABLE KI {0xD0A5, 0xD0BF, prH3, gcLo}, // [27] HANGUL SYLLABLE KIG..HANGUL SYLLABLE KIH {0xD0C0, 0xD0C0, prH2, gcLo}, // HANGUL SYLLABLE TA {0xD0C1, 0xD0DB, prH3, gcLo}, // [27] HANGUL SYLLABLE TAG..HANGUL SYLLABLE TAH {0xD0DC, 0xD0DC, prH2, gcLo}, // HANGUL SYLLABLE TAE {0xD0DD, 0xD0F7, prH3, gcLo}, // [27] HANGUL SYLLABLE TAEG..HANGUL SYLLABLE TAEH {0xD0F8, 0xD0F8, prH2, gcLo}, // HANGUL SYLLABLE TYA {0xD0F9, 0xD113, prH3, gcLo}, // [27] HANGUL SYLLABLE TYAG..HANGUL SYLLABLE TYAH {0xD114, 0xD114, prH2, gcLo}, // HANGUL SYLLABLE TYAE {0xD115, 0xD12F, prH3, gcLo}, // [27] HANGUL SYLLABLE TYAEG..HANGUL SYLLABLE TYAEH {0xD130, 0xD130, prH2, gcLo}, // HANGUL SYLLABLE TEO {0xD131, 0xD14B, prH3, gcLo}, // [27] HANGUL SYLLABLE TEOG..HANGUL SYLLABLE TEOH {0xD14C, 0xD14C, prH2, gcLo}, // HANGUL SYLLABLE TE {0xD14D, 0xD167, prH3, gcLo}, // [27] HANGUL SYLLABLE TEG..HANGUL SYLLABLE TEH {0xD168, 0xD168, prH2, gcLo}, // HANGUL SYLLABLE TYEO {0xD169, 0xD183, prH3, gcLo}, // [27] HANGUL SYLLABLE TYEOG..HANGUL SYLLABLE TYEOH {0xD184, 0xD184, prH2, gcLo}, // HANGUL SYLLABLE TYE {0xD185, 0xD19F, prH3, gcLo}, // [27] HANGUL SYLLABLE TYEG..HANGUL SYLLABLE TYEH {0xD1A0, 0xD1A0, prH2, gcLo}, // HANGUL SYLLABLE TO {0xD1A1, 0xD1BB, prH3, gcLo}, // [27] HANGUL SYLLABLE TOG..HANGUL SYLLABLE TOH {0xD1BC, 0xD1BC, prH2, gcLo}, // HANGUL SYLLABLE TWA {0xD1BD, 0xD1D7, prH3, gcLo}, // [27] HANGUL SYLLABLE TWAG..HANGUL SYLLABLE TWAH {0xD1D8, 0xD1D8, prH2, gcLo}, // HANGUL SYLLABLE TWAE {0xD1D9, 0xD1F3, prH3, gcLo}, // [27] HANGUL SYLLABLE TWAEG..HANGUL SYLLABLE TWAEH {0xD1F4, 0xD1F4, prH2, gcLo}, // HANGUL SYLLABLE TOE {0xD1F5, 0xD20F, prH3, gcLo}, // [27] HANGUL SYLLABLE TOEG..HANGUL SYLLABLE TOEH {0xD210, 0xD210, prH2, gcLo}, // HANGUL SYLLABLE TYO {0xD211, 0xD22B, prH3, gcLo}, // [27] HANGUL SYLLABLE TYOG..HANGUL SYLLABLE TYOH {0xD22C, 0xD22C, prH2, gcLo}, // HANGUL SYLLABLE TU {0xD22D, 0xD247, prH3, gcLo}, // [27] HANGUL SYLLABLE TUG..HANGUL SYLLABLE TUH {0xD248, 0xD248, prH2, gcLo}, // HANGUL SYLLABLE TWEO {0xD249, 0xD263, prH3, gcLo}, // [27] HANGUL SYLLABLE TWEOG..HANGUL SYLLABLE TWEOH {0xD264, 0xD264, prH2, gcLo}, // HANGUL SYLLABLE TWE {0xD265, 0xD27F, prH3, gcLo}, // [27] HANGUL SYLLABLE TWEG..HANGUL SYLLABLE TWEH {0xD280, 0xD280, prH2, gcLo}, // HANGUL SYLLABLE TWI {0xD281, 0xD29B, prH3, gcLo}, // [27] HANGUL SYLLABLE TWIG..HANGUL SYLLABLE TWIH {0xD29C, 0xD29C, prH2, gcLo}, // HANGUL SYLLABLE TYU {0xD29D, 0xD2B7, prH3, gcLo}, // [27] HANGUL SYLLABLE TYUG..HANGUL SYLLABLE TYUH {0xD2B8, 0xD2B8, prH2, gcLo}, // HANGUL SYLLABLE TEU {0xD2B9, 0xD2D3, prH3, gcLo}, // [27] HANGUL SYLLABLE TEUG..HANGUL SYLLABLE TEUH {0xD2D4, 0xD2D4, prH2, gcLo}, // HANGUL SYLLABLE TYI {0xD2D5, 0xD2EF, prH3, gcLo}, // [27] HANGUL SYLLABLE TYIG..HANGUL SYLLABLE TYIH {0xD2F0, 0xD2F0, prH2, gcLo}, // HANGUL SYLLABLE TI {0xD2F1, 0xD30B, prH3, gcLo}, // [27] HANGUL SYLLABLE TIG..HANGUL SYLLABLE TIH {0xD30C, 0xD30C, prH2, gcLo}, // HANGUL SYLLABLE PA {0xD30D, 0xD327, prH3, gcLo}, // [27] HANGUL SYLLABLE PAG..HANGUL SYLLABLE PAH {0xD328, 0xD328, prH2, gcLo}, // HANGUL SYLLABLE PAE {0xD329, 0xD343, prH3, gcLo}, // [27] HANGUL SYLLABLE PAEG..HANGUL SYLLABLE PAEH {0xD344, 0xD344, prH2, gcLo}, // HANGUL SYLLABLE PYA {0xD345, 0xD35F, prH3, gcLo}, // [27] HANGUL SYLLABLE PYAG..HANGUL SYLLABLE PYAH {0xD360, 0xD360, prH2, gcLo}, // HANGUL SYLLABLE PYAE {0xD361, 0xD37B, prH3, gcLo}, // [27] HANGUL SYLLABLE PYAEG..HANGUL SYLLABLE PYAEH {0xD37C, 0xD37C, prH2, gcLo}, // HANGUL SYLLABLE PEO {0xD37D, 0xD397, prH3, gcLo}, // [27] HANGUL SYLLABLE PEOG..HANGUL SYLLABLE PEOH {0xD398, 0xD398, prH2, gcLo}, // HANGUL SYLLABLE PE {0xD399, 0xD3B3, prH3, gcLo}, // [27] HANGUL SYLLABLE PEG..HANGUL SYLLABLE PEH {0xD3B4, 0xD3B4, prH2, gcLo}, // HANGUL SYLLABLE PYEO {0xD3B5, 0xD3CF, prH3, gcLo}, // [27] HANGUL SYLLABLE PYEOG..HANGUL SYLLABLE PYEOH {0xD3D0, 0xD3D0, prH2, gcLo}, // HANGUL SYLLABLE PYE {0xD3D1, 0xD3EB, prH3, gcLo}, // [27] HANGUL SYLLABLE PYEG..HANGUL SYLLABLE PYEH {0xD3EC, 0xD3EC, prH2, gcLo}, // HANGUL SYLLABLE PO {0xD3ED, 0xD407, prH3, gcLo}, // [27] HANGUL SYLLABLE POG..HANGUL SYLLABLE POH {0xD408, 0xD408, prH2, gcLo}, // HANGUL SYLLABLE PWA {0xD409, 0xD423, prH3, gcLo}, // [27] HANGUL SYLLABLE PWAG..HANGUL SYLLABLE PWAH {0xD424, 0xD424, prH2, gcLo}, // HANGUL SYLLABLE PWAE {0xD425, 0xD43F, prH3, gcLo}, // [27] HANGUL SYLLABLE PWAEG..HANGUL SYLLABLE PWAEH {0xD440, 0xD440, prH2, gcLo}, // HANGUL SYLLABLE POE {0xD441, 0xD45B, prH3, gcLo}, // [27] HANGUL SYLLABLE POEG..HANGUL SYLLABLE POEH {0xD45C, 0xD45C, prH2, gcLo}, // HANGUL SYLLABLE PYO {0xD45D, 0xD477, prH3, gcLo}, // [27] HANGUL SYLLABLE PYOG..HANGUL SYLLABLE PYOH {0xD478, 0xD478, prH2, gcLo}, // HANGUL SYLLABLE PU {0xD479, 0xD493, prH3, gcLo}, // [27] HANGUL SYLLABLE PUG..HANGUL SYLLABLE PUH {0xD494, 0xD494, prH2, gcLo}, // HANGUL SYLLABLE PWEO {0xD495, 0xD4AF, prH3, gcLo}, // [27] HANGUL SYLLABLE PWEOG..HANGUL SYLLABLE PWEOH {0xD4B0, 0xD4B0, prH2, gcLo}, // HANGUL SYLLABLE PWE {0xD4B1, 0xD4CB, prH3, gcLo}, // [27] HANGUL SYLLABLE PWEG..HANGUL SYLLABLE PWEH {0xD4CC, 0xD4CC, prH2, gcLo}, // HANGUL SYLLABLE PWI {0xD4CD, 0xD4E7, prH3, gcLo}, // [27] HANGUL SYLLABLE PWIG..HANGUL SYLLABLE PWIH {0xD4E8, 0xD4E8, prH2, gcLo}, // HANGUL SYLLABLE PYU {0xD4E9, 0xD503, prH3, gcLo}, // [27] HANGUL SYLLABLE PYUG..HANGUL SYLLABLE PYUH {0xD504, 0xD504, prH2, gcLo}, // HANGUL SYLLABLE PEU {0xD505, 0xD51F, prH3, gcLo}, // [27] HANGUL SYLLABLE PEUG..HANGUL SYLLABLE PEUH {0xD520, 0xD520, prH2, gcLo}, // HANGUL SYLLABLE PYI {0xD521, 0xD53B, prH3, gcLo}, // [27] HANGUL SYLLABLE PYIG..HANGUL SYLLABLE PYIH {0xD53C, 0xD53C, prH2, gcLo}, // HANGUL SYLLABLE PI {0xD53D, 0xD557, prH3, gcLo}, // [27] HANGUL SYLLABLE PIG..HANGUL SYLLABLE PIH {0xD558, 0xD558, prH2, gcLo}, // HANGUL SYLLABLE HA {0xD559, 0xD573, prH3, gcLo}, // [27] HANGUL SYLLABLE HAG..HANGUL SYLLABLE HAH {0xD574, 0xD574, prH2, gcLo}, // HANGUL SYLLABLE HAE {0xD575, 0xD58F, prH3, gcLo}, // [27] HANGUL SYLLABLE HAEG..HANGUL SYLLABLE HAEH {0xD590, 0xD590, prH2, gcLo}, // HANGUL SYLLABLE HYA {0xD591, 0xD5AB, prH3, gcLo}, // [27] HANGUL SYLLABLE HYAG..HANGUL SYLLABLE HYAH {0xD5AC, 0xD5AC, prH2, gcLo}, // HANGUL SYLLABLE HYAE {0xD5AD, 0xD5C7, prH3, gcLo}, // [27] HANGUL SYLLABLE HYAEG..HANGUL SYLLABLE HYAEH {0xD5C8, 0xD5C8, prH2, gcLo}, // HANGUL SYLLABLE HEO {0xD5C9, 0xD5E3, prH3, gcLo}, // [27] HANGUL SYLLABLE HEOG..HANGUL SYLLABLE HEOH {0xD5E4, 0xD5E4, prH2, gcLo}, // HANGUL SYLLABLE HE {0xD5E5, 0xD5FF, prH3, gcLo}, // [27] HANGUL SYLLABLE HEG..HANGUL SYLLABLE HEH {0xD600, 0xD600, prH2, gcLo}, // HANGUL SYLLABLE HYEO {0xD601, 0xD61B, prH3, gcLo}, // [27] HANGUL SYLLABLE HYEOG..HANGUL SYLLABLE HYEOH {0xD61C, 0xD61C, prH2, gcLo}, // HANGUL SYLLABLE HYE {0xD61D, 0xD637, prH3, gcLo}, // [27] HANGUL SYLLABLE HYEG..HANGUL SYLLABLE HYEH {0xD638, 0xD638, prH2, gcLo}, // HANGUL SYLLABLE HO {0xD639, 0xD653, prH3, gcLo}, // [27] HANGUL SYLLABLE HOG..HANGUL SYLLABLE HOH {0xD654, 0xD654, prH2, gcLo}, // HANGUL SYLLABLE HWA {0xD655, 0xD66F, prH3, gcLo}, // [27] HANGUL SYLLABLE HWAG..HANGUL SYLLABLE HWAH {0xD670, 0xD670, prH2, gcLo}, // HANGUL SYLLABLE HWAE {0xD671, 0xD68B, prH3, gcLo}, // [27] HANGUL SYLLABLE HWAEG..HANGUL SYLLABLE HWAEH {0xD68C, 0xD68C, prH2, gcLo}, // HANGUL SYLLABLE HOE {0xD68D, 0xD6A7, prH3, gcLo}, // [27] HANGUL SYLLABLE HOEG..HANGUL SYLLABLE HOEH {0xD6A8, 0xD6A8, prH2, gcLo}, // HANGUL SYLLABLE HYO {0xD6A9, 0xD6C3, prH3, gcLo}, // [27] HANGUL SYLLABLE HYOG..HANGUL SYLLABLE HYOH {0xD6C4, 0xD6C4, prH2, gcLo}, // HANGUL SYLLABLE HU {0xD6C5, 0xD6DF, prH3, gcLo}, // [27] HANGUL SYLLABLE HUG..HANGUL SYLLABLE HUH {0xD6E0, 0xD6E0, prH2, gcLo}, // HANGUL SYLLABLE HWEO {0xD6E1, 0xD6FB, prH3, gcLo}, // [27] HANGUL SYLLABLE HWEOG..HANGUL SYLLABLE HWEOH {0xD6FC, 0xD6FC, prH2, gcLo}, // HANGUL SYLLABLE HWE {0xD6FD, 0xD717, prH3, gcLo}, // [27] HANGUL SYLLABLE HWEG..HANGUL SYLLABLE HWEH {0xD718, 0xD718, prH2, gcLo}, // HANGUL SYLLABLE HWI {0xD719, 0xD733, prH3, gcLo}, // [27] HANGUL SYLLABLE HWIG..HANGUL SYLLABLE HWIH {0xD734, 0xD734, prH2, gcLo}, // HANGUL SYLLABLE HYU {0xD735, 0xD74F, prH3, gcLo}, // [27] HANGUL SYLLABLE HYUG..HANGUL SYLLABLE HYUH {0xD750, 0xD750, prH2, gcLo}, // HANGUL SYLLABLE HEU {0xD751, 0xD76B, prH3, gcLo}, // [27] HANGUL SYLLABLE HEUG..HANGUL SYLLABLE HEUH {0xD76C, 0xD76C, prH2, gcLo}, // HANGUL SYLLABLE HYI {0xD76D, 0xD787, prH3, gcLo}, // [27] HANGUL SYLLABLE HYIG..HANGUL SYLLABLE HYIH {0xD788, 0xD788, prH2, gcLo}, // HANGUL SYLLABLE HI {0xD789, 0xD7A3, prH3, gcLo}, // [27] HANGUL SYLLABLE HIG..HANGUL SYLLABLE HIH {0xD7B0, 0xD7C6, prJV, gcLo}, // [23] HANGUL JUNGSEONG O-YEO..HANGUL JUNGSEONG ARAEA-E {0xD7CB, 0xD7FB, prJT, gcLo}, // [49] HANGUL JONGSEONG NIEUN-RIEUL..HANGUL JONGSEONG PHIEUPH-THIEUTH {0xD800, 0xDB7F, prSG, gcCs}, // [896] .. {0xDB80, 0xDBFF, prSG, gcCs}, // [128] .. {0xDC00, 0xDFFF, prSG, gcCs}, // [1024] .. {0xE000, 0xF8FF, prXX, gcCo}, // [6400] .. {0xF900, 0xFA6D, prID, gcLo}, // [366] CJK COMPATIBILITY IDEOGRAPH-F900..CJK COMPATIBILITY IDEOGRAPH-FA6D {0xFA6E, 0xFA6F, prID, gcCn}, // [2] .. {0xFA70, 0xFAD9, prID, gcLo}, // [106] CJK COMPATIBILITY IDEOGRAPH-FA70..CJK COMPATIBILITY IDEOGRAPH-FAD9 {0xFADA, 0xFAFF, prID, gcCn}, // [38] .. {0xFB00, 0xFB06, prAL, gcLl}, // [7] LATIN SMALL LIGATURE FF..LATIN SMALL LIGATURE ST {0xFB13, 0xFB17, prAL, gcLl}, // [5] ARMENIAN SMALL LIGATURE MEN NOW..ARMENIAN SMALL LIGATURE MEN XEH {0xFB1D, 0xFB1D, prHL, gcLo}, // HEBREW LETTER YOD WITH HIRIQ {0xFB1E, 0xFB1E, prCM, gcMn}, // HEBREW POINT JUDEO-SPANISH VARIKA {0xFB1F, 0xFB28, prHL, gcLo}, // [10] HEBREW LIGATURE YIDDISH YOD YOD PATAH..HEBREW LETTER WIDE TAV {0xFB29, 0xFB29, prAL, gcSm}, // HEBREW LETTER ALTERNATIVE PLUS SIGN {0xFB2A, 0xFB36, prHL, gcLo}, // [13] HEBREW LETTER SHIN WITH SHIN DOT..HEBREW LETTER ZAYIN WITH DAGESH {0xFB38, 0xFB3C, prHL, gcLo}, // [5] HEBREW LETTER TET WITH DAGESH..HEBREW LETTER LAMED WITH DAGESH {0xFB3E, 0xFB3E, prHL, gcLo}, // HEBREW LETTER MEM WITH DAGESH {0xFB40, 0xFB41, prHL, gcLo}, // [2] HEBREW LETTER NUN WITH DAGESH..HEBREW LETTER SAMEKH WITH DAGESH {0xFB43, 0xFB44, prHL, gcLo}, // [2] HEBREW LETTER FINAL PE WITH DAGESH..HEBREW LETTER PE WITH DAGESH {0xFB46, 0xFB4F, prHL, gcLo}, // [10] HEBREW LETTER TSADI WITH DAGESH..HEBREW LIGATURE ALEF LAMED {0xFB50, 0xFBB1, prAL, gcLo}, // [98] ARABIC LETTER ALEF WASLA ISOLATED FORM..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE FINAL FORM {0xFBB2, 0xFBC2, prAL, gcSk}, // [17] ARABIC SYMBOL DOT ABOVE..ARABIC SYMBOL WASLA ABOVE {0xFBD3, 0xFD3D, prAL, gcLo}, // [363] ARABIC LETTER NG ISOLATED FORM..ARABIC LIGATURE ALEF WITH FATHATAN ISOLATED FORM {0xFD3E, 0xFD3E, prCL, gcPe}, // ORNATE LEFT PARENTHESIS {0xFD3F, 0xFD3F, prOP, gcPs}, // ORNATE RIGHT PARENTHESIS {0xFD40, 0xFD4F, prAL, gcSo}, // [16] ARABIC LIGATURE RAHIMAHU ALLAAH..ARABIC LIGATURE RAHIMAHUM ALLAAH {0xFD50, 0xFD8F, prAL, gcLo}, // [64] ARABIC LIGATURE TEH WITH JEEM WITH MEEM INITIAL FORM..ARABIC LIGATURE MEEM WITH KHAH WITH MEEM INITIAL FORM {0xFD92, 0xFDC7, prAL, gcLo}, // [54] ARABIC LIGATURE MEEM WITH JEEM WITH KHAH INITIAL FORM..ARABIC LIGATURE NOON WITH JEEM WITH YEH FINAL FORM {0xFDCF, 0xFDCF, prAL, gcSo}, // ARABIC LIGATURE SALAAMUHU ALAYNAA {0xFDF0, 0xFDFB, prAL, gcLo}, // [12] ARABIC LIGATURE SALLA USED AS KORANIC STOP SIGN ISOLATED FORM..ARABIC LIGATURE JALLAJALALOUHOU {0xFDFC, 0xFDFC, prPO, gcSc}, // RIAL SIGN {0xFDFD, 0xFDFF, prAL, gcSo}, // [3] ARABIC LIGATURE BISMILLAH AR-RAHMAN AR-RAHEEM..ARABIC LIGATURE AZZA WA JALL {0xFE00, 0xFE0F, prCM, gcMn}, // [16] VARIATION SELECTOR-1..VARIATION SELECTOR-16 {0xFE10, 0xFE10, prIS, gcPo}, // PRESENTATION FORM FOR VERTICAL COMMA {0xFE11, 0xFE12, prCL, gcPo}, // [2] PRESENTATION FORM FOR VERTICAL IDEOGRAPHIC COMMA..PRESENTATION FORM FOR VERTICAL IDEOGRAPHIC FULL STOP {0xFE13, 0xFE14, prIS, gcPo}, // [2] PRESENTATION FORM FOR VERTICAL COLON..PRESENTATION FORM FOR VERTICAL SEMICOLON {0xFE15, 0xFE16, prEX, gcPo}, // [2] PRESENTATION FORM FOR VERTICAL EXCLAMATION MARK..PRESENTATION FORM FOR VERTICAL QUESTION MARK {0xFE17, 0xFE17, prOP, gcPs}, // PRESENTATION FORM FOR VERTICAL LEFT WHITE LENTICULAR BRACKET {0xFE18, 0xFE18, prCL, gcPe}, // PRESENTATION FORM FOR VERTICAL RIGHT WHITE LENTICULAR BRAKCET {0xFE19, 0xFE19, prIN, gcPo}, // PRESENTATION FORM FOR VERTICAL HORIZONTAL ELLIPSIS {0xFE20, 0xFE2F, prCM, gcMn}, // [16] COMBINING LIGATURE LEFT HALF..COMBINING CYRILLIC TITLO RIGHT HALF {0xFE30, 0xFE30, prID, gcPo}, // PRESENTATION FORM FOR VERTICAL TWO DOT LEADER {0xFE31, 0xFE32, prID, gcPd}, // [2] PRESENTATION FORM FOR VERTICAL EM DASH..PRESENTATION FORM FOR VERTICAL EN DASH {0xFE33, 0xFE34, prID, gcPc}, // [2] PRESENTATION FORM FOR VERTICAL LOW LINE..PRESENTATION FORM FOR VERTICAL WAVY LOW LINE {0xFE35, 0xFE35, prOP, gcPs}, // PRESENTATION FORM FOR VERTICAL LEFT PARENTHESIS {0xFE36, 0xFE36, prCL, gcPe}, // PRESENTATION FORM FOR VERTICAL RIGHT PARENTHESIS {0xFE37, 0xFE37, prOP, gcPs}, // PRESENTATION FORM FOR VERTICAL LEFT CURLY BRACKET {0xFE38, 0xFE38, prCL, gcPe}, // PRESENTATION FORM FOR VERTICAL RIGHT CURLY BRACKET {0xFE39, 0xFE39, prOP, gcPs}, // PRESENTATION FORM FOR VERTICAL LEFT TORTOISE SHELL BRACKET {0xFE3A, 0xFE3A, prCL, gcPe}, // PRESENTATION FORM FOR VERTICAL RIGHT TORTOISE SHELL BRACKET {0xFE3B, 0xFE3B, prOP, gcPs}, // PRESENTATION FORM FOR VERTICAL LEFT BLACK LENTICULAR BRACKET {0xFE3C, 0xFE3C, prCL, gcPe}, // PRESENTATION FORM FOR VERTICAL RIGHT BLACK LENTICULAR BRACKET {0xFE3D, 0xFE3D, prOP, gcPs}, // PRESENTATION FORM FOR VERTICAL LEFT DOUBLE ANGLE BRACKET {0xFE3E, 0xFE3E, prCL, gcPe}, // PRESENTATION FORM FOR VERTICAL RIGHT DOUBLE ANGLE BRACKET {0xFE3F, 0xFE3F, prOP, gcPs}, // PRESENTATION FORM FOR VERTICAL LEFT ANGLE BRACKET {0xFE40, 0xFE40, prCL, gcPe}, // PRESENTATION FORM FOR VERTICAL RIGHT ANGLE BRACKET {0xFE41, 0xFE41, prOP, gcPs}, // PRESENTATION FORM FOR VERTICAL LEFT CORNER BRACKET {0xFE42, 0xFE42, prCL, gcPe}, // PRESENTATION FORM FOR VERTICAL RIGHT CORNER BRACKET {0xFE43, 0xFE43, prOP, gcPs}, // PRESENTATION FORM FOR VERTICAL LEFT WHITE CORNER BRACKET {0xFE44, 0xFE44, prCL, gcPe}, // PRESENTATION FORM FOR VERTICAL RIGHT WHITE CORNER BRACKET {0xFE45, 0xFE46, prID, gcPo}, // [2] SESAME DOT..WHITE SESAME DOT {0xFE47, 0xFE47, prOP, gcPs}, // PRESENTATION FORM FOR VERTICAL LEFT SQUARE BRACKET {0xFE48, 0xFE48, prCL, gcPe}, // PRESENTATION FORM FOR VERTICAL RIGHT SQUARE BRACKET {0xFE49, 0xFE4C, prID, gcPo}, // [4] DASHED OVERLINE..DOUBLE WAVY OVERLINE {0xFE4D, 0xFE4F, prID, gcPc}, // [3] DASHED LOW LINE..WAVY LOW LINE {0xFE50, 0xFE50, prCL, gcPo}, // SMALL COMMA {0xFE51, 0xFE51, prID, gcPo}, // SMALL IDEOGRAPHIC COMMA {0xFE52, 0xFE52, prCL, gcPo}, // SMALL FULL STOP {0xFE54, 0xFE55, prNS, gcPo}, // [2] SMALL SEMICOLON..SMALL COLON {0xFE56, 0xFE57, prEX, gcPo}, // [2] SMALL QUESTION MARK..SMALL EXCLAMATION MARK {0xFE58, 0xFE58, prID, gcPd}, // SMALL EM DASH {0xFE59, 0xFE59, prOP, gcPs}, // SMALL LEFT PARENTHESIS {0xFE5A, 0xFE5A, prCL, gcPe}, // SMALL RIGHT PARENTHESIS {0xFE5B, 0xFE5B, prOP, gcPs}, // SMALL LEFT CURLY BRACKET {0xFE5C, 0xFE5C, prCL, gcPe}, // SMALL RIGHT CURLY BRACKET {0xFE5D, 0xFE5D, prOP, gcPs}, // SMALL LEFT TORTOISE SHELL BRACKET {0xFE5E, 0xFE5E, prCL, gcPe}, // SMALL RIGHT TORTOISE SHELL BRACKET {0xFE5F, 0xFE61, prID, gcPo}, // [3] SMALL NUMBER SIGN..SMALL ASTERISK {0xFE62, 0xFE62, prID, gcSm}, // SMALL PLUS SIGN {0xFE63, 0xFE63, prID, gcPd}, // SMALL HYPHEN-MINUS {0xFE64, 0xFE66, prID, gcSm}, // [3] SMALL LESS-THAN SIGN..SMALL EQUALS SIGN {0xFE68, 0xFE68, prID, gcPo}, // SMALL REVERSE SOLIDUS {0xFE69, 0xFE69, prPR, gcSc}, // SMALL DOLLAR SIGN {0xFE6A, 0xFE6A, prPO, gcPo}, // SMALL PERCENT SIGN {0xFE6B, 0xFE6B, prID, gcPo}, // SMALL COMMERCIAL AT {0xFE70, 0xFE74, prAL, gcLo}, // [5] ARABIC FATHATAN ISOLATED FORM..ARABIC KASRATAN ISOLATED FORM {0xFE76, 0xFEFC, prAL, gcLo}, // [135] ARABIC FATHA ISOLATED FORM..ARABIC LIGATURE LAM WITH ALEF FINAL FORM {0xFEFF, 0xFEFF, prWJ, gcCf}, // ZERO WIDTH NO-BREAK SPACE {0xFF01, 0xFF01, prEX, gcPo}, // FULLWIDTH EXCLAMATION MARK {0xFF02, 0xFF03, prID, gcPo}, // [2] FULLWIDTH QUOTATION MARK..FULLWIDTH NUMBER SIGN {0xFF04, 0xFF04, prPR, gcSc}, // FULLWIDTH DOLLAR SIGN {0xFF05, 0xFF05, prPO, gcPo}, // FULLWIDTH PERCENT SIGN {0xFF06, 0xFF07, prID, gcPo}, // [2] FULLWIDTH AMPERSAND..FULLWIDTH APOSTROPHE {0xFF08, 0xFF08, prOP, gcPs}, // FULLWIDTH LEFT PARENTHESIS {0xFF09, 0xFF09, prCL, gcPe}, // FULLWIDTH RIGHT PARENTHESIS {0xFF0A, 0xFF0A, prID, gcPo}, // FULLWIDTH ASTERISK {0xFF0B, 0xFF0B, prID, gcSm}, // FULLWIDTH PLUS SIGN {0xFF0C, 0xFF0C, prCL, gcPo}, // FULLWIDTH COMMA {0xFF0D, 0xFF0D, prID, gcPd}, // FULLWIDTH HYPHEN-MINUS {0xFF0E, 0xFF0E, prCL, gcPo}, // FULLWIDTH FULL STOP {0xFF0F, 0xFF0F, prID, gcPo}, // FULLWIDTH SOLIDUS {0xFF10, 0xFF19, prID, gcNd}, // [10] FULLWIDTH DIGIT ZERO..FULLWIDTH DIGIT NINE {0xFF1A, 0xFF1B, prNS, gcPo}, // [2] FULLWIDTH COLON..FULLWIDTH SEMICOLON {0xFF1C, 0xFF1E, prID, gcSm}, // [3] FULLWIDTH LESS-THAN SIGN..FULLWIDTH GREATER-THAN SIGN {0xFF1F, 0xFF1F, prEX, gcPo}, // FULLWIDTH QUESTION MARK {0xFF20, 0xFF20, prID, gcPo}, // FULLWIDTH COMMERCIAL AT {0xFF21, 0xFF3A, prID, gcLu}, // [26] FULLWIDTH LATIN CAPITAL LETTER A..FULLWIDTH LATIN CAPITAL LETTER Z {0xFF3B, 0xFF3B, prOP, gcPs}, // FULLWIDTH LEFT SQUARE BRACKET {0xFF3C, 0xFF3C, prID, gcPo}, // FULLWIDTH REVERSE SOLIDUS {0xFF3D, 0xFF3D, prCL, gcPe}, // FULLWIDTH RIGHT SQUARE BRACKET {0xFF3E, 0xFF3E, prID, gcSk}, // FULLWIDTH CIRCUMFLEX ACCENT {0xFF3F, 0xFF3F, prID, gcPc}, // FULLWIDTH LOW LINE {0xFF40, 0xFF40, prID, gcSk}, // FULLWIDTH GRAVE ACCENT {0xFF41, 0xFF5A, prID, gcLl}, // [26] FULLWIDTH LATIN SMALL LETTER A..FULLWIDTH LATIN SMALL LETTER Z {0xFF5B, 0xFF5B, prOP, gcPs}, // FULLWIDTH LEFT CURLY BRACKET {0xFF5C, 0xFF5C, prID, gcSm}, // FULLWIDTH VERTICAL LINE {0xFF5D, 0xFF5D, prCL, gcPe}, // FULLWIDTH RIGHT CURLY BRACKET {0xFF5E, 0xFF5E, prID, gcSm}, // FULLWIDTH TILDE {0xFF5F, 0xFF5F, prOP, gcPs}, // FULLWIDTH LEFT WHITE PARENTHESIS {0xFF60, 0xFF60, prCL, gcPe}, // FULLWIDTH RIGHT WHITE PARENTHESIS {0xFF61, 0xFF61, prCL, gcPo}, // HALFWIDTH IDEOGRAPHIC FULL STOP {0xFF62, 0xFF62, prOP, gcPs}, // HALFWIDTH LEFT CORNER BRACKET {0xFF63, 0xFF63, prCL, gcPe}, // HALFWIDTH RIGHT CORNER BRACKET {0xFF64, 0xFF64, prCL, gcPo}, // HALFWIDTH IDEOGRAPHIC COMMA {0xFF65, 0xFF65, prNS, gcPo}, // HALFWIDTH KATAKANA MIDDLE DOT {0xFF66, 0xFF66, prID, gcLo}, // HALFWIDTH KATAKANA LETTER WO {0xFF67, 0xFF6F, prCJ, gcLo}, // [9] HALFWIDTH KATAKANA LETTER SMALL A..HALFWIDTH KATAKANA LETTER SMALL TU {0xFF70, 0xFF70, prCJ, gcLm}, // HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK {0xFF71, 0xFF9D, prID, gcLo}, // [45] HALFWIDTH KATAKANA LETTER A..HALFWIDTH KATAKANA LETTER N {0xFF9E, 0xFF9F, prNS, gcLm}, // [2] HALFWIDTH KATAKANA VOICED SOUND MARK..HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK {0xFFA0, 0xFFBE, prID, gcLo}, // [31] HALFWIDTH HANGUL FILLER..HALFWIDTH HANGUL LETTER HIEUH {0xFFC2, 0xFFC7, prID, gcLo}, // [6] HALFWIDTH HANGUL LETTER A..HALFWIDTH HANGUL LETTER E {0xFFCA, 0xFFCF, prID, gcLo}, // [6] HALFWIDTH HANGUL LETTER YEO..HALFWIDTH HANGUL LETTER OE {0xFFD2, 0xFFD7, prID, gcLo}, // [6] HALFWIDTH HANGUL LETTER YO..HALFWIDTH HANGUL LETTER YU {0xFFDA, 0xFFDC, prID, gcLo}, // [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL LETTER I {0xFFE0, 0xFFE0, prPO, gcSc}, // FULLWIDTH CENT SIGN {0xFFE1, 0xFFE1, prPR, gcSc}, // FULLWIDTH POUND SIGN {0xFFE2, 0xFFE2, prID, gcSm}, // FULLWIDTH NOT SIGN {0xFFE3, 0xFFE3, prID, gcSk}, // FULLWIDTH MACRON {0xFFE4, 0xFFE4, prID, gcSo}, // FULLWIDTH BROKEN BAR {0xFFE5, 0xFFE6, prPR, gcSc}, // [2] FULLWIDTH YEN SIGN..FULLWIDTH WON SIGN {0xFFE8, 0xFFE8, prAL, gcSo}, // HALFWIDTH FORMS LIGHT VERTICAL {0xFFE9, 0xFFEC, prAL, gcSm}, // [4] HALFWIDTH LEFTWARDS ARROW..HALFWIDTH DOWNWARDS ARROW {0xFFED, 0xFFEE, prAL, gcSo}, // [2] HALFWIDTH BLACK SQUARE..HALFWIDTH WHITE CIRCLE {0xFFF9, 0xFFFB, prCM, gcCf}, // [3] INTERLINEAR ANNOTATION ANCHOR..INTERLINEAR ANNOTATION TERMINATOR {0xFFFC, 0xFFFC, prCB, gcSo}, // OBJECT REPLACEMENT CHARACTER {0xFFFD, 0xFFFD, prAI, gcSo}, // REPLACEMENT CHARACTER {0x10000, 0x1000B, prAL, gcLo}, // [12] LINEAR B SYLLABLE B008 A..LINEAR B SYLLABLE B046 JE {0x1000D, 0x10026, prAL, gcLo}, // [26] LINEAR B SYLLABLE B036 JO..LINEAR B SYLLABLE B032 QO {0x10028, 0x1003A, prAL, gcLo}, // [19] LINEAR B SYLLABLE B060 RA..LINEAR B SYLLABLE B042 WO {0x1003C, 0x1003D, prAL, gcLo}, // [2] LINEAR B SYLLABLE B017 ZA..LINEAR B SYLLABLE B074 ZE {0x1003F, 0x1004D, prAL, gcLo}, // [15] LINEAR B SYLLABLE B020 ZO..LINEAR B SYLLABLE B091 TWO {0x10050, 0x1005D, prAL, gcLo}, // [14] LINEAR B SYMBOL B018..LINEAR B SYMBOL B089 {0x10080, 0x100FA, prAL, gcLo}, // [123] LINEAR B IDEOGRAM B100 MAN..LINEAR B IDEOGRAM VESSEL B305 {0x10100, 0x10102, prBA, gcPo}, // [3] AEGEAN WORD SEPARATOR LINE..AEGEAN CHECK MARK {0x10107, 0x10133, prAL, gcNo}, // [45] AEGEAN NUMBER ONE..AEGEAN NUMBER NINETY THOUSAND {0x10137, 0x1013F, prAL, gcSo}, // [9] AEGEAN WEIGHT BASE UNIT..AEGEAN MEASURE THIRD SUBUNIT {0x10140, 0x10174, prAL, gcNl}, // [53] GREEK ACROPHONIC ATTIC ONE QUARTER..GREEK ACROPHONIC STRATIAN FIFTY MNAS {0x10175, 0x10178, prAL, gcNo}, // [4] GREEK ONE HALF SIGN..GREEK THREE QUARTERS SIGN {0x10179, 0x10189, prAL, gcSo}, // [17] GREEK YEAR SIGN..GREEK TRYBLION BASE SIGN {0x1018A, 0x1018B, prAL, gcNo}, // [2] GREEK ZERO SIGN..GREEK ONE QUARTER SIGN {0x1018C, 0x1018E, prAL, gcSo}, // [3] GREEK SINUSOID SIGN..NOMISMA SIGN {0x10190, 0x1019C, prAL, gcSo}, // [13] ROMAN SEXTANS SIGN..ASCIA SYMBOL {0x101A0, 0x101A0, prAL, gcSo}, // GREEK SYMBOL TAU RHO {0x101D0, 0x101FC, prAL, gcSo}, // [45] PHAISTOS DISC SIGN PEDESTRIAN..PHAISTOS DISC SIGN WAVY BAND {0x101FD, 0x101FD, prCM, gcMn}, // PHAISTOS DISC SIGN COMBINING OBLIQUE STROKE {0x10280, 0x1029C, prAL, gcLo}, // [29] LYCIAN LETTER A..LYCIAN LETTER X {0x102A0, 0x102D0, prAL, gcLo}, // [49] CARIAN LETTER A..CARIAN LETTER UUU3 {0x102E0, 0x102E0, prCM, gcMn}, // COPTIC EPACT THOUSANDS MARK {0x102E1, 0x102FB, prAL, gcNo}, // [27] COPTIC EPACT DIGIT ONE..COPTIC EPACT NUMBER NINE HUNDRED {0x10300, 0x1031F, prAL, gcLo}, // [32] OLD ITALIC LETTER A..OLD ITALIC LETTER ESS {0x10320, 0x10323, prAL, gcNo}, // [4] OLD ITALIC NUMERAL ONE..OLD ITALIC NUMERAL FIFTY {0x1032D, 0x1032F, prAL, gcLo}, // [3] OLD ITALIC LETTER YE..OLD ITALIC LETTER SOUTHERN TSE {0x10330, 0x10340, prAL, gcLo}, // [17] GOTHIC LETTER AHSA..GOTHIC LETTER PAIRTHRA {0x10341, 0x10341, prAL, gcNl}, // GOTHIC LETTER NINETY {0x10342, 0x10349, prAL, gcLo}, // [8] GOTHIC LETTER RAIDA..GOTHIC LETTER OTHAL {0x1034A, 0x1034A, prAL, gcNl}, // GOTHIC LETTER NINE HUNDRED {0x10350, 0x10375, prAL, gcLo}, // [38] OLD PERMIC LETTER AN..OLD PERMIC LETTER IA {0x10376, 0x1037A, prCM, gcMn}, // [5] COMBINING OLD PERMIC LETTER AN..COMBINING OLD PERMIC LETTER SII {0x10380, 0x1039D, prAL, gcLo}, // [30] UGARITIC LETTER ALPA..UGARITIC LETTER SSU {0x1039F, 0x1039F, prBA, gcPo}, // UGARITIC WORD DIVIDER {0x103A0, 0x103C3, prAL, gcLo}, // [36] OLD PERSIAN SIGN A..OLD PERSIAN SIGN HA {0x103C8, 0x103CF, prAL, gcLo}, // [8] OLD PERSIAN SIGN AURAMAZDAA..OLD PERSIAN SIGN BUUMISH {0x103D0, 0x103D0, prBA, gcPo}, // OLD PERSIAN WORD DIVIDER {0x103D1, 0x103D5, prAL, gcNl}, // [5] OLD PERSIAN NUMBER ONE..OLD PERSIAN NUMBER HUNDRED {0x10400, 0x1044F, prAL, gcLC}, // [80] DESERET CAPITAL LETTER LONG I..DESERET SMALL LETTER EW {0x10450, 0x1047F, prAL, gcLo}, // [48] SHAVIAN LETTER PEEP..SHAVIAN LETTER YEW {0x10480, 0x1049D, prAL, gcLo}, // [30] OSMANYA LETTER ALEF..OSMANYA LETTER OO {0x104A0, 0x104A9, prNU, gcNd}, // [10] OSMANYA DIGIT ZERO..OSMANYA DIGIT NINE {0x104B0, 0x104D3, prAL, gcLu}, // [36] OSAGE CAPITAL LETTER A..OSAGE CAPITAL LETTER ZHA {0x104D8, 0x104FB, prAL, gcLl}, // [36] OSAGE SMALL LETTER A..OSAGE SMALL LETTER ZHA {0x10500, 0x10527, prAL, gcLo}, // [40] ELBASAN LETTER A..ELBASAN LETTER KHE {0x10530, 0x10563, prAL, gcLo}, // [52] CAUCASIAN ALBANIAN LETTER ALT..CAUCASIAN ALBANIAN LETTER KIW {0x1056F, 0x1056F, prAL, gcPo}, // CAUCASIAN ALBANIAN CITATION MARK {0x10570, 0x1057A, prAL, gcLu}, // [11] VITHKUQI CAPITAL LETTER A..VITHKUQI CAPITAL LETTER GA {0x1057C, 0x1058A, prAL, gcLu}, // [15] VITHKUQI CAPITAL LETTER HA..VITHKUQI CAPITAL LETTER RE {0x1058C, 0x10592, prAL, gcLu}, // [7] VITHKUQI CAPITAL LETTER SE..VITHKUQI CAPITAL LETTER XE {0x10594, 0x10595, prAL, gcLu}, // [2] VITHKUQI CAPITAL LETTER Y..VITHKUQI CAPITAL LETTER ZE {0x10597, 0x105A1, prAL, gcLl}, // [11] VITHKUQI SMALL LETTER A..VITHKUQI SMALL LETTER GA {0x105A3, 0x105B1, prAL, gcLl}, // [15] VITHKUQI SMALL LETTER HA..VITHKUQI SMALL LETTER RE {0x105B3, 0x105B9, prAL, gcLl}, // [7] VITHKUQI SMALL LETTER SE..VITHKUQI SMALL LETTER XE {0x105BB, 0x105BC, prAL, gcLl}, // [2] VITHKUQI SMALL LETTER Y..VITHKUQI SMALL LETTER ZE {0x10600, 0x10736, prAL, gcLo}, // [311] LINEAR A SIGN AB001..LINEAR A SIGN A664 {0x10740, 0x10755, prAL, gcLo}, // [22] LINEAR A SIGN A701 A..LINEAR A SIGN A732 JE {0x10760, 0x10767, prAL, gcLo}, // [8] LINEAR A SIGN A800..LINEAR A SIGN A807 {0x10780, 0x10785, prAL, gcLm}, // [6] MODIFIER LETTER SMALL CAPITAL AA..MODIFIER LETTER SMALL B WITH HOOK {0x10787, 0x107B0, prAL, gcLm}, // [42] MODIFIER LETTER SMALL DZ DIGRAPH..MODIFIER LETTER SMALL V WITH RIGHT HOOK {0x107B2, 0x107BA, prAL, gcLm}, // [9] MODIFIER LETTER SMALL CAPITAL Y..MODIFIER LETTER SMALL S WITH CURL {0x10800, 0x10805, prAL, gcLo}, // [6] CYPRIOT SYLLABLE A..CYPRIOT SYLLABLE JA {0x10808, 0x10808, prAL, gcLo}, // CYPRIOT SYLLABLE JO {0x1080A, 0x10835, prAL, gcLo}, // [44] CYPRIOT SYLLABLE KA..CYPRIOT SYLLABLE WO {0x10837, 0x10838, prAL, gcLo}, // [2] CYPRIOT SYLLABLE XA..CYPRIOT SYLLABLE XE {0x1083C, 0x1083C, prAL, gcLo}, // CYPRIOT SYLLABLE ZA {0x1083F, 0x1083F, prAL, gcLo}, // CYPRIOT SYLLABLE ZO {0x10840, 0x10855, prAL, gcLo}, // [22] IMPERIAL ARAMAIC LETTER ALEPH..IMPERIAL ARAMAIC LETTER TAW {0x10857, 0x10857, prBA, gcPo}, // IMPERIAL ARAMAIC SECTION SIGN {0x10858, 0x1085F, prAL, gcNo}, // [8] IMPERIAL ARAMAIC NUMBER ONE..IMPERIAL ARAMAIC NUMBER TEN THOUSAND {0x10860, 0x10876, prAL, gcLo}, // [23] PALMYRENE LETTER ALEPH..PALMYRENE LETTER TAW {0x10877, 0x10878, prAL, gcSo}, // [2] PALMYRENE LEFT-POINTING FLEURON..PALMYRENE RIGHT-POINTING FLEURON {0x10879, 0x1087F, prAL, gcNo}, // [7] PALMYRENE NUMBER ONE..PALMYRENE NUMBER TWENTY {0x10880, 0x1089E, prAL, gcLo}, // [31] NABATAEAN LETTER FINAL ALEPH..NABATAEAN LETTER TAW {0x108A7, 0x108AF, prAL, gcNo}, // [9] NABATAEAN NUMBER ONE..NABATAEAN NUMBER ONE HUNDRED {0x108E0, 0x108F2, prAL, gcLo}, // [19] HATRAN LETTER ALEPH..HATRAN LETTER QOPH {0x108F4, 0x108F5, prAL, gcLo}, // [2] HATRAN LETTER SHIN..HATRAN LETTER TAW {0x108FB, 0x108FF, prAL, gcNo}, // [5] HATRAN NUMBER ONE..HATRAN NUMBER ONE HUNDRED {0x10900, 0x10915, prAL, gcLo}, // [22] PHOENICIAN LETTER ALF..PHOENICIAN LETTER TAU {0x10916, 0x1091B, prAL, gcNo}, // [6] PHOENICIAN NUMBER ONE..PHOENICIAN NUMBER THREE {0x1091F, 0x1091F, prBA, gcPo}, // PHOENICIAN WORD SEPARATOR {0x10920, 0x10939, prAL, gcLo}, // [26] LYDIAN LETTER A..LYDIAN LETTER C {0x1093F, 0x1093F, prAL, gcPo}, // LYDIAN TRIANGULAR MARK {0x10980, 0x1099F, prAL, gcLo}, // [32] MEROITIC HIEROGLYPHIC LETTER A..MEROITIC HIEROGLYPHIC SYMBOL VIDJ-2 {0x109A0, 0x109B7, prAL, gcLo}, // [24] MEROITIC CURSIVE LETTER A..MEROITIC CURSIVE LETTER DA {0x109BC, 0x109BD, prAL, gcNo}, // [2] MEROITIC CURSIVE FRACTION ELEVEN TWELFTHS..MEROITIC CURSIVE FRACTION ONE HALF {0x109BE, 0x109BF, prAL, gcLo}, // [2] MEROITIC CURSIVE LOGOGRAM RMT..MEROITIC CURSIVE LOGOGRAM IMN {0x109C0, 0x109CF, prAL, gcNo}, // [16] MEROITIC CURSIVE NUMBER ONE..MEROITIC CURSIVE NUMBER SEVENTY {0x109D2, 0x109FF, prAL, gcNo}, // [46] MEROITIC CURSIVE NUMBER ONE HUNDRED..MEROITIC CURSIVE FRACTION TEN TWELFTHS {0x10A00, 0x10A00, prAL, gcLo}, // KHAROSHTHI LETTER A {0x10A01, 0x10A03, prCM, gcMn}, // [3] KHAROSHTHI VOWEL SIGN I..KHAROSHTHI VOWEL SIGN VOCALIC R {0x10A05, 0x10A06, prCM, gcMn}, // [2] KHAROSHTHI VOWEL SIGN E..KHAROSHTHI VOWEL SIGN O {0x10A0C, 0x10A0F, prCM, gcMn}, // [4] KHAROSHTHI VOWEL LENGTH MARK..KHAROSHTHI SIGN VISARGA {0x10A10, 0x10A13, prAL, gcLo}, // [4] KHAROSHTHI LETTER KA..KHAROSHTHI LETTER GHA {0x10A15, 0x10A17, prAL, gcLo}, // [3] KHAROSHTHI LETTER CA..KHAROSHTHI LETTER JA {0x10A19, 0x10A35, prAL, gcLo}, // [29] KHAROSHTHI LETTER NYA..KHAROSHTHI LETTER VHA {0x10A38, 0x10A3A, prCM, gcMn}, // [3] KHAROSHTHI SIGN BAR ABOVE..KHAROSHTHI SIGN DOT BELOW {0x10A3F, 0x10A3F, prCM, gcMn}, // KHAROSHTHI VIRAMA {0x10A40, 0x10A48, prAL, gcNo}, // [9] KHAROSHTHI DIGIT ONE..KHAROSHTHI FRACTION ONE HALF {0x10A50, 0x10A57, prBA, gcPo}, // [8] KHAROSHTHI PUNCTUATION DOT..KHAROSHTHI PUNCTUATION DOUBLE DANDA {0x10A58, 0x10A58, prAL, gcPo}, // KHAROSHTHI PUNCTUATION LINES {0x10A60, 0x10A7C, prAL, gcLo}, // [29] OLD SOUTH ARABIAN LETTER HE..OLD SOUTH ARABIAN LETTER THETH {0x10A7D, 0x10A7E, prAL, gcNo}, // [2] OLD SOUTH ARABIAN NUMBER ONE..OLD SOUTH ARABIAN NUMBER FIFTY {0x10A7F, 0x10A7F, prAL, gcPo}, // OLD SOUTH ARABIAN NUMERIC INDICATOR {0x10A80, 0x10A9C, prAL, gcLo}, // [29] OLD NORTH ARABIAN LETTER HEH..OLD NORTH ARABIAN LETTER ZAH {0x10A9D, 0x10A9F, prAL, gcNo}, // [3] OLD NORTH ARABIAN NUMBER ONE..OLD NORTH ARABIAN NUMBER TWENTY {0x10AC0, 0x10AC7, prAL, gcLo}, // [8] MANICHAEAN LETTER ALEPH..MANICHAEAN LETTER WAW {0x10AC8, 0x10AC8, prAL, gcSo}, // MANICHAEAN SIGN UD {0x10AC9, 0x10AE4, prAL, gcLo}, // [28] MANICHAEAN LETTER ZAYIN..MANICHAEAN LETTER TAW {0x10AE5, 0x10AE6, prCM, gcMn}, // [2] MANICHAEAN ABBREVIATION MARK ABOVE..MANICHAEAN ABBREVIATION MARK BELOW {0x10AEB, 0x10AEF, prAL, gcNo}, // [5] MANICHAEAN NUMBER ONE..MANICHAEAN NUMBER ONE HUNDRED {0x10AF0, 0x10AF5, prBA, gcPo}, // [6] MANICHAEAN PUNCTUATION STAR..MANICHAEAN PUNCTUATION TWO DOTS {0x10AF6, 0x10AF6, prIN, gcPo}, // MANICHAEAN PUNCTUATION LINE FILLER {0x10B00, 0x10B35, prAL, gcLo}, // [54] AVESTAN LETTER A..AVESTAN LETTER HE {0x10B39, 0x10B3F, prBA, gcPo}, // [7] AVESTAN ABBREVIATION MARK..LARGE ONE RING OVER TWO RINGS PUNCTUATION {0x10B40, 0x10B55, prAL, gcLo}, // [22] INSCRIPTIONAL PARTHIAN LETTER ALEPH..INSCRIPTIONAL PARTHIAN LETTER TAW {0x10B58, 0x10B5F, prAL, gcNo}, // [8] INSCRIPTIONAL PARTHIAN NUMBER ONE..INSCRIPTIONAL PARTHIAN NUMBER ONE THOUSAND {0x10B60, 0x10B72, prAL, gcLo}, // [19] INSCRIPTIONAL PAHLAVI LETTER ALEPH..INSCRIPTIONAL PAHLAVI LETTER TAW {0x10B78, 0x10B7F, prAL, gcNo}, // [8] INSCRIPTIONAL PAHLAVI NUMBER ONE..INSCRIPTIONAL PAHLAVI NUMBER ONE THOUSAND {0x10B80, 0x10B91, prAL, gcLo}, // [18] PSALTER PAHLAVI LETTER ALEPH..PSALTER PAHLAVI LETTER TAW {0x10B99, 0x10B9C, prAL, gcPo}, // [4] PSALTER PAHLAVI SECTION MARK..PSALTER PAHLAVI FOUR DOTS WITH DOT {0x10BA9, 0x10BAF, prAL, gcNo}, // [7] PSALTER PAHLAVI NUMBER ONE..PSALTER PAHLAVI NUMBER ONE HUNDRED {0x10C00, 0x10C48, prAL, gcLo}, // [73] OLD TURKIC LETTER ORKHON A..OLD TURKIC LETTER ORKHON BASH {0x10C80, 0x10CB2, prAL, gcLu}, // [51] OLD HUNGARIAN CAPITAL LETTER A..OLD HUNGARIAN CAPITAL LETTER US {0x10CC0, 0x10CF2, prAL, gcLl}, // [51] OLD HUNGARIAN SMALL LETTER A..OLD HUNGARIAN SMALL LETTER US {0x10CFA, 0x10CFF, prAL, gcNo}, // [6] OLD HUNGARIAN NUMBER ONE..OLD HUNGARIAN NUMBER ONE THOUSAND {0x10D00, 0x10D23, prAL, gcLo}, // [36] HANIFI ROHINGYA LETTER A..HANIFI ROHINGYA MARK NA KHONNA {0x10D24, 0x10D27, prCM, gcMn}, // [4] HANIFI ROHINGYA SIGN HARBAHAY..HANIFI ROHINGYA SIGN TASSI {0x10D30, 0x10D39, prNU, gcNd}, // [10] HANIFI ROHINGYA DIGIT ZERO..HANIFI ROHINGYA DIGIT NINE {0x10E60, 0x10E7E, prAL, gcNo}, // [31] RUMI DIGIT ONE..RUMI FRACTION TWO THIRDS {0x10E80, 0x10EA9, prAL, gcLo}, // [42] YEZIDI LETTER ELIF..YEZIDI LETTER ET {0x10EAB, 0x10EAC, prCM, gcMn}, // [2] YEZIDI COMBINING HAMZA MARK..YEZIDI COMBINING MADDA MARK {0x10EAD, 0x10EAD, prBA, gcPd}, // YEZIDI HYPHENATION MARK {0x10EB0, 0x10EB1, prAL, gcLo}, // [2] YEZIDI LETTER LAM WITH DOT ABOVE..YEZIDI LETTER YOT WITH CIRCUMFLEX ABOVE {0x10EFD, 0x10EFF, prCM, gcMn}, // [3] ARABIC SMALL LOW WORD SAKTA..ARABIC SMALL LOW WORD MADDA {0x10F00, 0x10F1C, prAL, gcLo}, // [29] OLD SOGDIAN LETTER ALEPH..OLD SOGDIAN LETTER FINAL TAW WITH VERTICAL TAIL {0x10F1D, 0x10F26, prAL, gcNo}, // [10] OLD SOGDIAN NUMBER ONE..OLD SOGDIAN FRACTION ONE HALF {0x10F27, 0x10F27, prAL, gcLo}, // OLD SOGDIAN LIGATURE AYIN-DALETH {0x10F30, 0x10F45, prAL, gcLo}, // [22] SOGDIAN LETTER ALEPH..SOGDIAN INDEPENDENT SHIN {0x10F46, 0x10F50, prCM, gcMn}, // [11] SOGDIAN COMBINING DOT BELOW..SOGDIAN COMBINING STROKE BELOW {0x10F51, 0x10F54, prAL, gcNo}, // [4] SOGDIAN NUMBER ONE..SOGDIAN NUMBER ONE HUNDRED {0x10F55, 0x10F59, prAL, gcPo}, // [5] SOGDIAN PUNCTUATION TWO VERTICAL BARS..SOGDIAN PUNCTUATION HALF CIRCLE WITH DOT {0x10F70, 0x10F81, prAL, gcLo}, // [18] OLD UYGHUR LETTER ALEPH..OLD UYGHUR LETTER LESH {0x10F82, 0x10F85, prCM, gcMn}, // [4] OLD UYGHUR COMBINING DOT ABOVE..OLD UYGHUR COMBINING TWO DOTS BELOW {0x10F86, 0x10F89, prAL, gcPo}, // [4] OLD UYGHUR PUNCTUATION BAR..OLD UYGHUR PUNCTUATION FOUR DOTS {0x10FB0, 0x10FC4, prAL, gcLo}, // [21] CHORASMIAN LETTER ALEPH..CHORASMIAN LETTER TAW {0x10FC5, 0x10FCB, prAL, gcNo}, // [7] CHORASMIAN NUMBER ONE..CHORASMIAN NUMBER ONE HUNDRED {0x10FE0, 0x10FF6, prAL, gcLo}, // [23] ELYMAIC LETTER ALEPH..ELYMAIC LIGATURE ZAYIN-YODH {0x11000, 0x11000, prCM, gcMc}, // BRAHMI SIGN CANDRABINDU {0x11001, 0x11001, prCM, gcMn}, // BRAHMI SIGN ANUSVARA {0x11002, 0x11002, prCM, gcMc}, // BRAHMI SIGN VISARGA {0x11003, 0x11037, prAL, gcLo}, // [53] BRAHMI SIGN JIHVAMULIYA..BRAHMI LETTER OLD TAMIL NNNA {0x11038, 0x11046, prCM, gcMn}, // [15] BRAHMI VOWEL SIGN AA..BRAHMI VIRAMA {0x11047, 0x11048, prBA, gcPo}, // [2] BRAHMI DANDA..BRAHMI DOUBLE DANDA {0x11049, 0x1104D, prAL, gcPo}, // [5] BRAHMI PUNCTUATION DOT..BRAHMI PUNCTUATION LOTUS {0x11052, 0x11065, prAL, gcNo}, // [20] BRAHMI NUMBER ONE..BRAHMI NUMBER ONE THOUSAND {0x11066, 0x1106F, prNU, gcNd}, // [10] BRAHMI DIGIT ZERO..BRAHMI DIGIT NINE {0x11070, 0x11070, prCM, gcMn}, // BRAHMI SIGN OLD TAMIL VIRAMA {0x11071, 0x11072, prAL, gcLo}, // [2] BRAHMI LETTER OLD TAMIL SHORT E..BRAHMI LETTER OLD TAMIL SHORT O {0x11073, 0x11074, prCM, gcMn}, // [2] BRAHMI VOWEL SIGN OLD TAMIL SHORT E..BRAHMI VOWEL SIGN OLD TAMIL SHORT O {0x11075, 0x11075, prAL, gcLo}, // BRAHMI LETTER OLD TAMIL LLA {0x1107F, 0x1107F, prCM, gcMn}, // BRAHMI NUMBER JOINER {0x11080, 0x11081, prCM, gcMn}, // [2] KAITHI SIGN CANDRABINDU..KAITHI SIGN ANUSVARA {0x11082, 0x11082, prCM, gcMc}, // KAITHI SIGN VISARGA {0x11083, 0x110AF, prAL, gcLo}, // [45] KAITHI LETTER A..KAITHI LETTER HA {0x110B0, 0x110B2, prCM, gcMc}, // [3] KAITHI VOWEL SIGN AA..KAITHI VOWEL SIGN II {0x110B3, 0x110B6, prCM, gcMn}, // [4] KAITHI VOWEL SIGN U..KAITHI VOWEL SIGN AI {0x110B7, 0x110B8, prCM, gcMc}, // [2] KAITHI VOWEL SIGN O..KAITHI VOWEL SIGN AU {0x110B9, 0x110BA, prCM, gcMn}, // [2] KAITHI SIGN VIRAMA..KAITHI SIGN NUKTA {0x110BB, 0x110BC, prAL, gcPo}, // [2] KAITHI ABBREVIATION SIGN..KAITHI ENUMERATION SIGN {0x110BD, 0x110BD, prAL, gcCf}, // KAITHI NUMBER SIGN {0x110BE, 0x110C1, prBA, gcPo}, // [4] KAITHI SECTION MARK..KAITHI DOUBLE DANDA {0x110C2, 0x110C2, prCM, gcMn}, // KAITHI VOWEL SIGN VOCALIC R {0x110CD, 0x110CD, prAL, gcCf}, // KAITHI NUMBER SIGN ABOVE {0x110D0, 0x110E8, prAL, gcLo}, // [25] SORA SOMPENG LETTER SAH..SORA SOMPENG LETTER MAE {0x110F0, 0x110F9, prNU, gcNd}, // [10] SORA SOMPENG DIGIT ZERO..SORA SOMPENG DIGIT NINE {0x11100, 0x11102, prCM, gcMn}, // [3] CHAKMA SIGN CANDRABINDU..CHAKMA SIGN VISARGA {0x11103, 0x11126, prAL, gcLo}, // [36] CHAKMA LETTER AA..CHAKMA LETTER HAA {0x11127, 0x1112B, prCM, gcMn}, // [5] CHAKMA VOWEL SIGN A..CHAKMA VOWEL SIGN UU {0x1112C, 0x1112C, prCM, gcMc}, // CHAKMA VOWEL SIGN E {0x1112D, 0x11134, prCM, gcMn}, // [8] CHAKMA VOWEL SIGN AI..CHAKMA MAAYYAA {0x11136, 0x1113F, prNU, gcNd}, // [10] CHAKMA DIGIT ZERO..CHAKMA DIGIT NINE {0x11140, 0x11143, prBA, gcPo}, // [4] CHAKMA SECTION MARK..CHAKMA QUESTION MARK {0x11144, 0x11144, prAL, gcLo}, // CHAKMA LETTER LHAA {0x11145, 0x11146, prCM, gcMc}, // [2] CHAKMA VOWEL SIGN AA..CHAKMA VOWEL SIGN EI {0x11147, 0x11147, prAL, gcLo}, // CHAKMA LETTER VAA {0x11150, 0x11172, prAL, gcLo}, // [35] MAHAJANI LETTER A..MAHAJANI LETTER RRA {0x11173, 0x11173, prCM, gcMn}, // MAHAJANI SIGN NUKTA {0x11174, 0x11174, prAL, gcPo}, // MAHAJANI ABBREVIATION SIGN {0x11175, 0x11175, prBB, gcPo}, // MAHAJANI SECTION MARK {0x11176, 0x11176, prAL, gcLo}, // MAHAJANI LIGATURE SHRI {0x11180, 0x11181, prCM, gcMn}, // [2] SHARADA SIGN CANDRABINDU..SHARADA SIGN ANUSVARA {0x11182, 0x11182, prCM, gcMc}, // SHARADA SIGN VISARGA {0x11183, 0x111B2, prAL, gcLo}, // [48] SHARADA LETTER A..SHARADA LETTER HA {0x111B3, 0x111B5, prCM, gcMc}, // [3] SHARADA VOWEL SIGN AA..SHARADA VOWEL SIGN II {0x111B6, 0x111BE, prCM, gcMn}, // [9] SHARADA VOWEL SIGN U..SHARADA VOWEL SIGN O {0x111BF, 0x111C0, prCM, gcMc}, // [2] SHARADA VOWEL SIGN AU..SHARADA SIGN VIRAMA {0x111C1, 0x111C4, prAL, gcLo}, // [4] SHARADA SIGN AVAGRAHA..SHARADA OM {0x111C5, 0x111C6, prBA, gcPo}, // [2] SHARADA DANDA..SHARADA DOUBLE DANDA {0x111C7, 0x111C7, prAL, gcPo}, // SHARADA ABBREVIATION SIGN {0x111C8, 0x111C8, prBA, gcPo}, // SHARADA SEPARATOR {0x111C9, 0x111CC, prCM, gcMn}, // [4] SHARADA SANDHI MARK..SHARADA EXTRA SHORT VOWEL MARK {0x111CD, 0x111CD, prAL, gcPo}, // SHARADA SUTRA MARK {0x111CE, 0x111CE, prCM, gcMc}, // SHARADA VOWEL SIGN PRISHTHAMATRA E {0x111CF, 0x111CF, prCM, gcMn}, // SHARADA SIGN INVERTED CANDRABINDU {0x111D0, 0x111D9, prNU, gcNd}, // [10] SHARADA DIGIT ZERO..SHARADA DIGIT NINE {0x111DA, 0x111DA, prAL, gcLo}, // SHARADA EKAM {0x111DB, 0x111DB, prBB, gcPo}, // SHARADA SIGN SIDDHAM {0x111DC, 0x111DC, prAL, gcLo}, // SHARADA HEADSTROKE {0x111DD, 0x111DF, prBA, gcPo}, // [3] SHARADA CONTINUATION SIGN..SHARADA SECTION MARK-2 {0x111E1, 0x111F4, prAL, gcNo}, // [20] SINHALA ARCHAIC DIGIT ONE..SINHALA ARCHAIC NUMBER ONE THOUSAND {0x11200, 0x11211, prAL, gcLo}, // [18] KHOJKI LETTER A..KHOJKI LETTER JJA {0x11213, 0x1122B, prAL, gcLo}, // [25] KHOJKI LETTER NYA..KHOJKI LETTER LLA {0x1122C, 0x1122E, prCM, gcMc}, // [3] KHOJKI VOWEL SIGN AA..KHOJKI VOWEL SIGN II {0x1122F, 0x11231, prCM, gcMn}, // [3] KHOJKI VOWEL SIGN U..KHOJKI VOWEL SIGN AI {0x11232, 0x11233, prCM, gcMc}, // [2] KHOJKI VOWEL SIGN O..KHOJKI VOWEL SIGN AU {0x11234, 0x11234, prCM, gcMn}, // KHOJKI SIGN ANUSVARA {0x11235, 0x11235, prCM, gcMc}, // KHOJKI SIGN VIRAMA {0x11236, 0x11237, prCM, gcMn}, // [2] KHOJKI SIGN NUKTA..KHOJKI SIGN SHADDA {0x11238, 0x11239, prBA, gcPo}, // [2] KHOJKI DANDA..KHOJKI DOUBLE DANDA {0x1123A, 0x1123A, prAL, gcPo}, // KHOJKI WORD SEPARATOR {0x1123B, 0x1123C, prBA, gcPo}, // [2] KHOJKI SECTION MARK..KHOJKI DOUBLE SECTION MARK {0x1123D, 0x1123D, prAL, gcPo}, // KHOJKI ABBREVIATION SIGN {0x1123E, 0x1123E, prCM, gcMn}, // KHOJKI SIGN SUKUN {0x1123F, 0x11240, prAL, gcLo}, // [2] KHOJKI LETTER QA..KHOJKI LETTER SHORT I {0x11241, 0x11241, prCM, gcMn}, // KHOJKI VOWEL SIGN VOCALIC R {0x11280, 0x11286, prAL, gcLo}, // [7] MULTANI LETTER A..MULTANI LETTER GA {0x11288, 0x11288, prAL, gcLo}, // MULTANI LETTER GHA {0x1128A, 0x1128D, prAL, gcLo}, // [4] MULTANI LETTER CA..MULTANI LETTER JJA {0x1128F, 0x1129D, prAL, gcLo}, // [15] MULTANI LETTER NYA..MULTANI LETTER BA {0x1129F, 0x112A8, prAL, gcLo}, // [10] MULTANI LETTER BHA..MULTANI LETTER RHA {0x112A9, 0x112A9, prBA, gcPo}, // MULTANI SECTION MARK {0x112B0, 0x112DE, prAL, gcLo}, // [47] KHUDAWADI LETTER A..KHUDAWADI LETTER HA {0x112DF, 0x112DF, prCM, gcMn}, // KHUDAWADI SIGN ANUSVARA {0x112E0, 0x112E2, prCM, gcMc}, // [3] KHUDAWADI VOWEL SIGN AA..KHUDAWADI VOWEL SIGN II {0x112E3, 0x112EA, prCM, gcMn}, // [8] KHUDAWADI VOWEL SIGN U..KHUDAWADI SIGN VIRAMA {0x112F0, 0x112F9, prNU, gcNd}, // [10] KHUDAWADI DIGIT ZERO..KHUDAWADI DIGIT NINE {0x11300, 0x11301, prCM, gcMn}, // [2] GRANTHA SIGN COMBINING ANUSVARA ABOVE..GRANTHA SIGN CANDRABINDU {0x11302, 0x11303, prCM, gcMc}, // [2] GRANTHA SIGN ANUSVARA..GRANTHA SIGN VISARGA {0x11305, 0x1130C, prAL, gcLo}, // [8] GRANTHA LETTER A..GRANTHA LETTER VOCALIC L {0x1130F, 0x11310, prAL, gcLo}, // [2] GRANTHA LETTER EE..GRANTHA LETTER AI {0x11313, 0x11328, prAL, gcLo}, // [22] GRANTHA LETTER OO..GRANTHA LETTER NA {0x1132A, 0x11330, prAL, gcLo}, // [7] GRANTHA LETTER PA..GRANTHA LETTER RA {0x11332, 0x11333, prAL, gcLo}, // [2] GRANTHA LETTER LA..GRANTHA LETTER LLA {0x11335, 0x11339, prAL, gcLo}, // [5] GRANTHA LETTER VA..GRANTHA LETTER HA {0x1133B, 0x1133C, prCM, gcMn}, // [2] COMBINING BINDU BELOW..GRANTHA SIGN NUKTA {0x1133D, 0x1133D, prAL, gcLo}, // GRANTHA SIGN AVAGRAHA {0x1133E, 0x1133F, prCM, gcMc}, // [2] GRANTHA VOWEL SIGN AA..GRANTHA VOWEL SIGN I {0x11340, 0x11340, prCM, gcMn}, // GRANTHA VOWEL SIGN II {0x11341, 0x11344, prCM, gcMc}, // [4] GRANTHA VOWEL SIGN U..GRANTHA VOWEL SIGN VOCALIC RR {0x11347, 0x11348, prCM, gcMc}, // [2] GRANTHA VOWEL SIGN EE..GRANTHA VOWEL SIGN AI {0x1134B, 0x1134D, prCM, gcMc}, // [3] GRANTHA VOWEL SIGN OO..GRANTHA SIGN VIRAMA {0x11350, 0x11350, prAL, gcLo}, // GRANTHA OM {0x11357, 0x11357, prCM, gcMc}, // GRANTHA AU LENGTH MARK {0x1135D, 0x11361, prAL, gcLo}, // [5] GRANTHA SIGN PLUTA..GRANTHA LETTER VOCALIC LL {0x11362, 0x11363, prCM, gcMc}, // [2] GRANTHA VOWEL SIGN VOCALIC L..GRANTHA VOWEL SIGN VOCALIC LL {0x11366, 0x1136C, prCM, gcMn}, // [7] COMBINING GRANTHA DIGIT ZERO..COMBINING GRANTHA DIGIT SIX {0x11370, 0x11374, prCM, gcMn}, // [5] COMBINING GRANTHA LETTER A..COMBINING GRANTHA LETTER PA {0x11400, 0x11434, prAL, gcLo}, // [53] NEWA LETTER A..NEWA LETTER HA {0x11435, 0x11437, prCM, gcMc}, // [3] NEWA VOWEL SIGN AA..NEWA VOWEL SIGN II {0x11438, 0x1143F, prCM, gcMn}, // [8] NEWA VOWEL SIGN U..NEWA VOWEL SIGN AI {0x11440, 0x11441, prCM, gcMc}, // [2] NEWA VOWEL SIGN O..NEWA VOWEL SIGN AU {0x11442, 0x11444, prCM, gcMn}, // [3] NEWA SIGN VIRAMA..NEWA SIGN ANUSVARA {0x11445, 0x11445, prCM, gcMc}, // NEWA SIGN VISARGA {0x11446, 0x11446, prCM, gcMn}, // NEWA SIGN NUKTA {0x11447, 0x1144A, prAL, gcLo}, // [4] NEWA SIGN AVAGRAHA..NEWA SIDDHI {0x1144B, 0x1144E, prBA, gcPo}, // [4] NEWA DANDA..NEWA GAP FILLER {0x1144F, 0x1144F, prAL, gcPo}, // NEWA ABBREVIATION SIGN {0x11450, 0x11459, prNU, gcNd}, // [10] NEWA DIGIT ZERO..NEWA DIGIT NINE {0x1145A, 0x1145B, prBA, gcPo}, // [2] NEWA DOUBLE COMMA..NEWA PLACEHOLDER MARK {0x1145D, 0x1145D, prAL, gcPo}, // NEWA INSERTION SIGN {0x1145E, 0x1145E, prCM, gcMn}, // NEWA SANDHI MARK {0x1145F, 0x11461, prAL, gcLo}, // [3] NEWA LETTER VEDIC ANUSVARA..NEWA SIGN UPADHMANIYA {0x11480, 0x114AF, prAL, gcLo}, // [48] TIRHUTA ANJI..TIRHUTA LETTER HA {0x114B0, 0x114B2, prCM, gcMc}, // [3] TIRHUTA VOWEL SIGN AA..TIRHUTA VOWEL SIGN II {0x114B3, 0x114B8, prCM, gcMn}, // [6] TIRHUTA VOWEL SIGN U..TIRHUTA VOWEL SIGN VOCALIC LL {0x114B9, 0x114B9, prCM, gcMc}, // TIRHUTA VOWEL SIGN E {0x114BA, 0x114BA, prCM, gcMn}, // TIRHUTA VOWEL SIGN SHORT E {0x114BB, 0x114BE, prCM, gcMc}, // [4] TIRHUTA VOWEL SIGN AI..TIRHUTA VOWEL SIGN AU {0x114BF, 0x114C0, prCM, gcMn}, // [2] TIRHUTA SIGN CANDRABINDU..TIRHUTA SIGN ANUSVARA {0x114C1, 0x114C1, prCM, gcMc}, // TIRHUTA SIGN VISARGA {0x114C2, 0x114C3, prCM, gcMn}, // [2] TIRHUTA SIGN VIRAMA..TIRHUTA SIGN NUKTA {0x114C4, 0x114C5, prAL, gcLo}, // [2] TIRHUTA SIGN AVAGRAHA..TIRHUTA GVANG {0x114C6, 0x114C6, prAL, gcPo}, // TIRHUTA ABBREVIATION SIGN {0x114C7, 0x114C7, prAL, gcLo}, // TIRHUTA OM {0x114D0, 0x114D9, prNU, gcNd}, // [10] TIRHUTA DIGIT ZERO..TIRHUTA DIGIT NINE {0x11580, 0x115AE, prAL, gcLo}, // [47] SIDDHAM LETTER A..SIDDHAM LETTER HA {0x115AF, 0x115B1, prCM, gcMc}, // [3] SIDDHAM VOWEL SIGN AA..SIDDHAM VOWEL SIGN II {0x115B2, 0x115B5, prCM, gcMn}, // [4] SIDDHAM VOWEL SIGN U..SIDDHAM VOWEL SIGN VOCALIC RR {0x115B8, 0x115BB, prCM, gcMc}, // [4] SIDDHAM VOWEL SIGN E..SIDDHAM VOWEL SIGN AU {0x115BC, 0x115BD, prCM, gcMn}, // [2] SIDDHAM SIGN CANDRABINDU..SIDDHAM SIGN ANUSVARA {0x115BE, 0x115BE, prCM, gcMc}, // SIDDHAM SIGN VISARGA {0x115BF, 0x115C0, prCM, gcMn}, // [2] SIDDHAM SIGN VIRAMA..SIDDHAM SIGN NUKTA {0x115C1, 0x115C1, prBB, gcPo}, // SIDDHAM SIGN SIDDHAM {0x115C2, 0x115C3, prBA, gcPo}, // [2] SIDDHAM DANDA..SIDDHAM DOUBLE DANDA {0x115C4, 0x115C5, prEX, gcPo}, // [2] SIDDHAM SEPARATOR DOT..SIDDHAM SEPARATOR BAR {0x115C6, 0x115C8, prAL, gcPo}, // [3] SIDDHAM REPETITION MARK-1..SIDDHAM REPETITION MARK-3 {0x115C9, 0x115D7, prBA, gcPo}, // [15] SIDDHAM END OF TEXT MARK..SIDDHAM SECTION MARK WITH CIRCLES AND FOUR ENCLOSURES {0x115D8, 0x115DB, prAL, gcLo}, // [4] SIDDHAM LETTER THREE-CIRCLE ALTERNATE I..SIDDHAM LETTER ALTERNATE U {0x115DC, 0x115DD, prCM, gcMn}, // [2] SIDDHAM VOWEL SIGN ALTERNATE U..SIDDHAM VOWEL SIGN ALTERNATE UU {0x11600, 0x1162F, prAL, gcLo}, // [48] MODI LETTER A..MODI LETTER LLA {0x11630, 0x11632, prCM, gcMc}, // [3] MODI VOWEL SIGN AA..MODI VOWEL SIGN II {0x11633, 0x1163A, prCM, gcMn}, // [8] MODI VOWEL SIGN U..MODI VOWEL SIGN AI {0x1163B, 0x1163C, prCM, gcMc}, // [2] MODI VOWEL SIGN O..MODI VOWEL SIGN AU {0x1163D, 0x1163D, prCM, gcMn}, // MODI SIGN ANUSVARA {0x1163E, 0x1163E, prCM, gcMc}, // MODI SIGN VISARGA {0x1163F, 0x11640, prCM, gcMn}, // [2] MODI SIGN VIRAMA..MODI SIGN ARDHACANDRA {0x11641, 0x11642, prBA, gcPo}, // [2] MODI DANDA..MODI DOUBLE DANDA {0x11643, 0x11643, prAL, gcPo}, // MODI ABBREVIATION SIGN {0x11644, 0x11644, prAL, gcLo}, // MODI SIGN HUVA {0x11650, 0x11659, prNU, gcNd}, // [10] MODI DIGIT ZERO..MODI DIGIT NINE {0x11660, 0x1166C, prBB, gcPo}, // [13] MONGOLIAN BIRGA WITH ORNAMENT..MONGOLIAN TURNED SWIRL BIRGA WITH DOUBLE ORNAMENT {0x11680, 0x116AA, prAL, gcLo}, // [43] TAKRI LETTER A..TAKRI LETTER RRA {0x116AB, 0x116AB, prCM, gcMn}, // TAKRI SIGN ANUSVARA {0x116AC, 0x116AC, prCM, gcMc}, // TAKRI SIGN VISARGA {0x116AD, 0x116AD, prCM, gcMn}, // TAKRI VOWEL SIGN AA {0x116AE, 0x116AF, prCM, gcMc}, // [2] TAKRI VOWEL SIGN I..TAKRI VOWEL SIGN II {0x116B0, 0x116B5, prCM, gcMn}, // [6] TAKRI VOWEL SIGN U..TAKRI VOWEL SIGN AU {0x116B6, 0x116B6, prCM, gcMc}, // TAKRI SIGN VIRAMA {0x116B7, 0x116B7, prCM, gcMn}, // TAKRI SIGN NUKTA {0x116B8, 0x116B8, prAL, gcLo}, // TAKRI LETTER ARCHAIC KHA {0x116B9, 0x116B9, prAL, gcPo}, // TAKRI ABBREVIATION SIGN {0x116C0, 0x116C9, prNU, gcNd}, // [10] TAKRI DIGIT ZERO..TAKRI DIGIT NINE {0x11700, 0x1171A, prSA, gcLo}, // [27] AHOM LETTER KA..AHOM LETTER ALTERNATE BA {0x1171D, 0x1171F, prSA, gcMn}, // [3] AHOM CONSONANT SIGN MEDIAL LA..AHOM CONSONANT SIGN MEDIAL LIGATING RA {0x11720, 0x11721, prSA, gcMc}, // [2] AHOM VOWEL SIGN A..AHOM VOWEL SIGN AA {0x11722, 0x11725, prSA, gcMn}, // [4] AHOM VOWEL SIGN I..AHOM VOWEL SIGN UU {0x11726, 0x11726, prSA, gcMc}, // AHOM VOWEL SIGN E {0x11727, 0x1172B, prSA, gcMn}, // [5] AHOM VOWEL SIGN AW..AHOM SIGN KILLER {0x11730, 0x11739, prNU, gcNd}, // [10] AHOM DIGIT ZERO..AHOM DIGIT NINE {0x1173A, 0x1173B, prSA, gcNo}, // [2] AHOM NUMBER TEN..AHOM NUMBER TWENTY {0x1173C, 0x1173E, prBA, gcPo}, // [3] AHOM SIGN SMALL SECTION..AHOM SIGN RULAI {0x1173F, 0x1173F, prSA, gcSo}, // AHOM SYMBOL VI {0x11740, 0x11746, prSA, gcLo}, // [7] AHOM LETTER CA..AHOM LETTER LLA {0x11800, 0x1182B, prAL, gcLo}, // [44] DOGRA LETTER A..DOGRA LETTER RRA {0x1182C, 0x1182E, prCM, gcMc}, // [3] DOGRA VOWEL SIGN AA..DOGRA VOWEL SIGN II {0x1182F, 0x11837, prCM, gcMn}, // [9] DOGRA VOWEL SIGN U..DOGRA SIGN ANUSVARA {0x11838, 0x11838, prCM, gcMc}, // DOGRA SIGN VISARGA {0x11839, 0x1183A, prCM, gcMn}, // [2] DOGRA SIGN VIRAMA..DOGRA SIGN NUKTA {0x1183B, 0x1183B, prAL, gcPo}, // DOGRA ABBREVIATION SIGN {0x118A0, 0x118DF, prAL, gcLC}, // [64] WARANG CITI CAPITAL LETTER NGAA..WARANG CITI SMALL LETTER VIYO {0x118E0, 0x118E9, prNU, gcNd}, // [10] WARANG CITI DIGIT ZERO..WARANG CITI DIGIT NINE {0x118EA, 0x118F2, prAL, gcNo}, // [9] WARANG CITI NUMBER TEN..WARANG CITI NUMBER NINETY {0x118FF, 0x118FF, prAL, gcLo}, // WARANG CITI OM {0x11900, 0x11906, prAL, gcLo}, // [7] DIVES AKURU LETTER A..DIVES AKURU LETTER E {0x11909, 0x11909, prAL, gcLo}, // DIVES AKURU LETTER O {0x1190C, 0x11913, prAL, gcLo}, // [8] DIVES AKURU LETTER KA..DIVES AKURU LETTER JA {0x11915, 0x11916, prAL, gcLo}, // [2] DIVES AKURU LETTER NYA..DIVES AKURU LETTER TTA {0x11918, 0x1192F, prAL, gcLo}, // [24] DIVES AKURU LETTER DDA..DIVES AKURU LETTER ZA {0x11930, 0x11935, prCM, gcMc}, // [6] DIVES AKURU VOWEL SIGN AA..DIVES AKURU VOWEL SIGN E {0x11937, 0x11938, prCM, gcMc}, // [2] DIVES AKURU VOWEL SIGN AI..DIVES AKURU VOWEL SIGN O {0x1193B, 0x1193C, prCM, gcMn}, // [2] DIVES AKURU SIGN ANUSVARA..DIVES AKURU SIGN CANDRABINDU {0x1193D, 0x1193D, prCM, gcMc}, // DIVES AKURU SIGN HALANTA {0x1193E, 0x1193E, prCM, gcMn}, // DIVES AKURU VIRAMA {0x1193F, 0x1193F, prAL, gcLo}, // DIVES AKURU PREFIXED NASAL SIGN {0x11940, 0x11940, prCM, gcMc}, // DIVES AKURU MEDIAL YA {0x11941, 0x11941, prAL, gcLo}, // DIVES AKURU INITIAL RA {0x11942, 0x11942, prCM, gcMc}, // DIVES AKURU MEDIAL RA {0x11943, 0x11943, prCM, gcMn}, // DIVES AKURU SIGN NUKTA {0x11944, 0x11946, prBA, gcPo}, // [3] DIVES AKURU DOUBLE DANDA..DIVES AKURU END OF TEXT MARK {0x11950, 0x11959, prNU, gcNd}, // [10] DIVES AKURU DIGIT ZERO..DIVES AKURU DIGIT NINE {0x119A0, 0x119A7, prAL, gcLo}, // [8] NANDINAGARI LETTER A..NANDINAGARI LETTER VOCALIC RR {0x119AA, 0x119D0, prAL, gcLo}, // [39] NANDINAGARI LETTER E..NANDINAGARI LETTER RRA {0x119D1, 0x119D3, prCM, gcMc}, // [3] NANDINAGARI VOWEL SIGN AA..NANDINAGARI VOWEL SIGN II {0x119D4, 0x119D7, prCM, gcMn}, // [4] NANDINAGARI VOWEL SIGN U..NANDINAGARI VOWEL SIGN VOCALIC RR {0x119DA, 0x119DB, prCM, gcMn}, // [2] NANDINAGARI VOWEL SIGN E..NANDINAGARI VOWEL SIGN AI {0x119DC, 0x119DF, prCM, gcMc}, // [4] NANDINAGARI VOWEL SIGN O..NANDINAGARI SIGN VISARGA {0x119E0, 0x119E0, prCM, gcMn}, // NANDINAGARI SIGN VIRAMA {0x119E1, 0x119E1, prAL, gcLo}, // NANDINAGARI SIGN AVAGRAHA {0x119E2, 0x119E2, prBB, gcPo}, // NANDINAGARI SIGN SIDDHAM {0x119E3, 0x119E3, prAL, gcLo}, // NANDINAGARI HEADSTROKE {0x119E4, 0x119E4, prCM, gcMc}, // NANDINAGARI VOWEL SIGN PRISHTHAMATRA E {0x11A00, 0x11A00, prAL, gcLo}, // ZANABAZAR SQUARE LETTER A {0x11A01, 0x11A0A, prCM, gcMn}, // [10] ZANABAZAR SQUARE VOWEL SIGN I..ZANABAZAR SQUARE VOWEL LENGTH MARK {0x11A0B, 0x11A32, prAL, gcLo}, // [40] ZANABAZAR SQUARE LETTER KA..ZANABAZAR SQUARE LETTER KSSA {0x11A33, 0x11A38, prCM, gcMn}, // [6] ZANABAZAR SQUARE FINAL CONSONANT MARK..ZANABAZAR SQUARE SIGN ANUSVARA {0x11A39, 0x11A39, prCM, gcMc}, // ZANABAZAR SQUARE SIGN VISARGA {0x11A3A, 0x11A3A, prAL, gcLo}, // ZANABAZAR SQUARE CLUSTER-INITIAL LETTER RA {0x11A3B, 0x11A3E, prCM, gcMn}, // [4] ZANABAZAR SQUARE CLUSTER-FINAL LETTER YA..ZANABAZAR SQUARE CLUSTER-FINAL LETTER VA {0x11A3F, 0x11A3F, prBB, gcPo}, // ZANABAZAR SQUARE INITIAL HEAD MARK {0x11A40, 0x11A40, prAL, gcPo}, // ZANABAZAR SQUARE CLOSING HEAD MARK {0x11A41, 0x11A44, prBA, gcPo}, // [4] ZANABAZAR SQUARE MARK TSHEG..ZANABAZAR SQUARE MARK LONG TSHEG {0x11A45, 0x11A45, prBB, gcPo}, // ZANABAZAR SQUARE INITIAL DOUBLE-LINED HEAD MARK {0x11A46, 0x11A46, prAL, gcPo}, // ZANABAZAR SQUARE CLOSING DOUBLE-LINED HEAD MARK {0x11A47, 0x11A47, prCM, gcMn}, // ZANABAZAR SQUARE SUBJOINER {0x11A50, 0x11A50, prAL, gcLo}, // SOYOMBO LETTER A {0x11A51, 0x11A56, prCM, gcMn}, // [6] SOYOMBO VOWEL SIGN I..SOYOMBO VOWEL SIGN OE {0x11A57, 0x11A58, prCM, gcMc}, // [2] SOYOMBO VOWEL SIGN AI..SOYOMBO VOWEL SIGN AU {0x11A59, 0x11A5B, prCM, gcMn}, // [3] SOYOMBO VOWEL SIGN VOCALIC R..SOYOMBO VOWEL LENGTH MARK {0x11A5C, 0x11A89, prAL, gcLo}, // [46] SOYOMBO LETTER KA..SOYOMBO CLUSTER-INITIAL LETTER SA {0x11A8A, 0x11A96, prCM, gcMn}, // [13] SOYOMBO FINAL CONSONANT SIGN G..SOYOMBO SIGN ANUSVARA {0x11A97, 0x11A97, prCM, gcMc}, // SOYOMBO SIGN VISARGA {0x11A98, 0x11A99, prCM, gcMn}, // [2] SOYOMBO GEMINATION MARK..SOYOMBO SUBJOINER {0x11A9A, 0x11A9C, prBA, gcPo}, // [3] SOYOMBO MARK TSHEG..SOYOMBO MARK DOUBLE SHAD {0x11A9D, 0x11A9D, prAL, gcLo}, // SOYOMBO MARK PLUTA {0x11A9E, 0x11AA0, prBB, gcPo}, // [3] SOYOMBO HEAD MARK WITH MOON AND SUN AND TRIPLE FLAME..SOYOMBO HEAD MARK WITH MOON AND SUN {0x11AA1, 0x11AA2, prBA, gcPo}, // [2] SOYOMBO TERMINAL MARK-1..SOYOMBO TERMINAL MARK-2 {0x11AB0, 0x11ABF, prAL, gcLo}, // [16] CANADIAN SYLLABICS NATTILIK HI..CANADIAN SYLLABICS SPA {0x11AC0, 0x11AF8, prAL, gcLo}, // [57] PAU CIN HAU LETTER PA..PAU CIN HAU GLOTTAL STOP FINAL {0x11B00, 0x11B09, prBB, gcPo}, // [10] DEVANAGARI HEAD MARK..DEVANAGARI SIGN MINDU {0x11C00, 0x11C08, prAL, gcLo}, // [9] BHAIKSUKI LETTER A..BHAIKSUKI LETTER VOCALIC L {0x11C0A, 0x11C2E, prAL, gcLo}, // [37] BHAIKSUKI LETTER E..BHAIKSUKI LETTER HA {0x11C2F, 0x11C2F, prCM, gcMc}, // BHAIKSUKI VOWEL SIGN AA {0x11C30, 0x11C36, prCM, gcMn}, // [7] BHAIKSUKI VOWEL SIGN I..BHAIKSUKI VOWEL SIGN VOCALIC L {0x11C38, 0x11C3D, prCM, gcMn}, // [6] BHAIKSUKI VOWEL SIGN E..BHAIKSUKI SIGN ANUSVARA {0x11C3E, 0x11C3E, prCM, gcMc}, // BHAIKSUKI SIGN VISARGA {0x11C3F, 0x11C3F, prCM, gcMn}, // BHAIKSUKI SIGN VIRAMA {0x11C40, 0x11C40, prAL, gcLo}, // BHAIKSUKI SIGN AVAGRAHA {0x11C41, 0x11C45, prBA, gcPo}, // [5] BHAIKSUKI DANDA..BHAIKSUKI GAP FILLER-2 {0x11C50, 0x11C59, prNU, gcNd}, // [10] BHAIKSUKI DIGIT ZERO..BHAIKSUKI DIGIT NINE {0x11C5A, 0x11C6C, prAL, gcNo}, // [19] BHAIKSUKI NUMBER ONE..BHAIKSUKI HUNDREDS UNIT MARK {0x11C70, 0x11C70, prBB, gcPo}, // MARCHEN HEAD MARK {0x11C71, 0x11C71, prEX, gcPo}, // MARCHEN MARK SHAD {0x11C72, 0x11C8F, prAL, gcLo}, // [30] MARCHEN LETTER KA..MARCHEN LETTER A {0x11C92, 0x11CA7, prCM, gcMn}, // [22] MARCHEN SUBJOINED LETTER KA..MARCHEN SUBJOINED LETTER ZA {0x11CA9, 0x11CA9, prCM, gcMc}, // MARCHEN SUBJOINED LETTER YA {0x11CAA, 0x11CB0, prCM, gcMn}, // [7] MARCHEN SUBJOINED LETTER RA..MARCHEN VOWEL SIGN AA {0x11CB1, 0x11CB1, prCM, gcMc}, // MARCHEN VOWEL SIGN I {0x11CB2, 0x11CB3, prCM, gcMn}, // [2] MARCHEN VOWEL SIGN U..MARCHEN VOWEL SIGN E {0x11CB4, 0x11CB4, prCM, gcMc}, // MARCHEN VOWEL SIGN O {0x11CB5, 0x11CB6, prCM, gcMn}, // [2] MARCHEN SIGN ANUSVARA..MARCHEN SIGN CANDRABINDU {0x11D00, 0x11D06, prAL, gcLo}, // [7] MASARAM GONDI LETTER A..MASARAM GONDI LETTER E {0x11D08, 0x11D09, prAL, gcLo}, // [2] MASARAM GONDI LETTER AI..MASARAM GONDI LETTER O {0x11D0B, 0x11D30, prAL, gcLo}, // [38] MASARAM GONDI LETTER AU..MASARAM GONDI LETTER TRA {0x11D31, 0x11D36, prCM, gcMn}, // [6] MASARAM GONDI VOWEL SIGN AA..MASARAM GONDI VOWEL SIGN VOCALIC R {0x11D3A, 0x11D3A, prCM, gcMn}, // MASARAM GONDI VOWEL SIGN E {0x11D3C, 0x11D3D, prCM, gcMn}, // [2] MASARAM GONDI VOWEL SIGN AI..MASARAM GONDI VOWEL SIGN O {0x11D3F, 0x11D45, prCM, gcMn}, // [7] MASARAM GONDI VOWEL SIGN AU..MASARAM GONDI VIRAMA {0x11D46, 0x11D46, prAL, gcLo}, // MASARAM GONDI REPHA {0x11D47, 0x11D47, prCM, gcMn}, // MASARAM GONDI RA-KARA {0x11D50, 0x11D59, prNU, gcNd}, // [10] MASARAM GONDI DIGIT ZERO..MASARAM GONDI DIGIT NINE {0x11D60, 0x11D65, prAL, gcLo}, // [6] GUNJALA GONDI LETTER A..GUNJALA GONDI LETTER UU {0x11D67, 0x11D68, prAL, gcLo}, // [2] GUNJALA GONDI LETTER EE..GUNJALA GONDI LETTER AI {0x11D6A, 0x11D89, prAL, gcLo}, // [32] GUNJALA GONDI LETTER OO..GUNJALA GONDI LETTER SA {0x11D8A, 0x11D8E, prCM, gcMc}, // [5] GUNJALA GONDI VOWEL SIGN AA..GUNJALA GONDI VOWEL SIGN UU {0x11D90, 0x11D91, prCM, gcMn}, // [2] GUNJALA GONDI VOWEL SIGN EE..GUNJALA GONDI VOWEL SIGN AI {0x11D93, 0x11D94, prCM, gcMc}, // [2] GUNJALA GONDI VOWEL SIGN OO..GUNJALA GONDI VOWEL SIGN AU {0x11D95, 0x11D95, prCM, gcMn}, // GUNJALA GONDI SIGN ANUSVARA {0x11D96, 0x11D96, prCM, gcMc}, // GUNJALA GONDI SIGN VISARGA {0x11D97, 0x11D97, prCM, gcMn}, // GUNJALA GONDI VIRAMA {0x11D98, 0x11D98, prAL, gcLo}, // GUNJALA GONDI OM {0x11DA0, 0x11DA9, prNU, gcNd}, // [10] GUNJALA GONDI DIGIT ZERO..GUNJALA GONDI DIGIT NINE {0x11EE0, 0x11EF2, prAL, gcLo}, // [19] MAKASAR LETTER KA..MAKASAR ANGKA {0x11EF3, 0x11EF4, prCM, gcMn}, // [2] MAKASAR VOWEL SIGN I..MAKASAR VOWEL SIGN U {0x11EF5, 0x11EF6, prCM, gcMc}, // [2] MAKASAR VOWEL SIGN E..MAKASAR VOWEL SIGN O {0x11EF7, 0x11EF8, prAL, gcPo}, // [2] MAKASAR PASSIMBANG..MAKASAR END OF SECTION {0x11F00, 0x11F01, prCM, gcMn}, // [2] KAWI SIGN CANDRABINDU..KAWI SIGN ANUSVARA {0x11F02, 0x11F02, prAL, gcLo}, // KAWI SIGN REPHA {0x11F03, 0x11F03, prCM, gcMc}, // KAWI SIGN VISARGA {0x11F04, 0x11F10, prAL, gcLo}, // [13] KAWI LETTER A..KAWI LETTER O {0x11F12, 0x11F33, prAL, gcLo}, // [34] KAWI LETTER KA..KAWI LETTER JNYA {0x11F34, 0x11F35, prCM, gcMc}, // [2] KAWI VOWEL SIGN AA..KAWI VOWEL SIGN ALTERNATE AA {0x11F36, 0x11F3A, prCM, gcMn}, // [5] KAWI VOWEL SIGN I..KAWI VOWEL SIGN VOCALIC R {0x11F3E, 0x11F3F, prCM, gcMc}, // [2] KAWI VOWEL SIGN E..KAWI VOWEL SIGN AI {0x11F40, 0x11F40, prCM, gcMn}, // KAWI VOWEL SIGN EU {0x11F41, 0x11F41, prCM, gcMc}, // KAWI SIGN KILLER {0x11F42, 0x11F42, prCM, gcMn}, // KAWI CONJOINER {0x11F43, 0x11F44, prBA, gcPo}, // [2] KAWI DANDA..KAWI DOUBLE DANDA {0x11F45, 0x11F4F, prID, gcPo}, // [11] KAWI PUNCTUATION SECTION MARKER..KAWI PUNCTUATION CLOSING SPIRAL {0x11F50, 0x11F59, prNU, gcNd}, // [10] KAWI DIGIT ZERO..KAWI DIGIT NINE {0x11FB0, 0x11FB0, prAL, gcLo}, // LISU LETTER YHA {0x11FC0, 0x11FD4, prAL, gcNo}, // [21] TAMIL FRACTION ONE THREE-HUNDRED-AND-TWENTIETH..TAMIL FRACTION DOWNSCALING FACTOR KIIZH {0x11FD5, 0x11FDC, prAL, gcSo}, // [8] TAMIL SIGN NEL..TAMIL SIGN MUKKURUNI {0x11FDD, 0x11FE0, prPO, gcSc}, // [4] TAMIL SIGN KAACU..TAMIL SIGN VARAAKAN {0x11FE1, 0x11FF1, prAL, gcSo}, // [17] TAMIL SIGN PAARAM..TAMIL SIGN VAKAIYARAA {0x11FFF, 0x11FFF, prBA, gcPo}, // TAMIL PUNCTUATION END OF TEXT {0x12000, 0x12399, prAL, gcLo}, // [922] CUNEIFORM SIGN A..CUNEIFORM SIGN U U {0x12400, 0x1246E, prAL, gcNl}, // [111] CUNEIFORM NUMERIC SIGN TWO ASH..CUNEIFORM NUMERIC SIGN NINE U VARIANT FORM {0x12470, 0x12474, prBA, gcPo}, // [5] CUNEIFORM PUNCTUATION SIGN OLD ASSYRIAN WORD DIVIDER..CUNEIFORM PUNCTUATION SIGN DIAGONAL QUADCOLON {0x12480, 0x12543, prAL, gcLo}, // [196] CUNEIFORM SIGN AB TIMES NUN TENU..CUNEIFORM SIGN ZU5 TIMES THREE DISH TENU {0x12F90, 0x12FF0, prAL, gcLo}, // [97] CYPRO-MINOAN SIGN CM001..CYPRO-MINOAN SIGN CM114 {0x12FF1, 0x12FF2, prAL, gcPo}, // [2] CYPRO-MINOAN SIGN CM301..CYPRO-MINOAN SIGN CM302 {0x13000, 0x13257, prAL, gcLo}, // [600] EGYPTIAN HIEROGLYPH A001..EGYPTIAN HIEROGLYPH O006 {0x13258, 0x1325A, prOP, gcLo}, // [3] EGYPTIAN HIEROGLYPH O006A..EGYPTIAN HIEROGLYPH O006C {0x1325B, 0x1325D, prCL, gcLo}, // [3] EGYPTIAN HIEROGLYPH O006D..EGYPTIAN HIEROGLYPH O006F {0x1325E, 0x13281, prAL, gcLo}, // [36] EGYPTIAN HIEROGLYPH O007..EGYPTIAN HIEROGLYPH O033 {0x13282, 0x13282, prCL, gcLo}, // EGYPTIAN HIEROGLYPH O033A {0x13283, 0x13285, prAL, gcLo}, // [3] EGYPTIAN HIEROGLYPH O034..EGYPTIAN HIEROGLYPH O036 {0x13286, 0x13286, prOP, gcLo}, // EGYPTIAN HIEROGLYPH O036A {0x13287, 0x13287, prCL, gcLo}, // EGYPTIAN HIEROGLYPH O036B {0x13288, 0x13288, prOP, gcLo}, // EGYPTIAN HIEROGLYPH O036C {0x13289, 0x13289, prCL, gcLo}, // EGYPTIAN HIEROGLYPH O036D {0x1328A, 0x13378, prAL, gcLo}, // [239] EGYPTIAN HIEROGLYPH O037..EGYPTIAN HIEROGLYPH V011 {0x13379, 0x13379, prOP, gcLo}, // EGYPTIAN HIEROGLYPH V011A {0x1337A, 0x1337B, prCL, gcLo}, // [2] EGYPTIAN HIEROGLYPH V011B..EGYPTIAN HIEROGLYPH V011C {0x1337C, 0x1342F, prAL, gcLo}, // [180] EGYPTIAN HIEROGLYPH V012..EGYPTIAN HIEROGLYPH V011D {0x13430, 0x13436, prGL, gcCf}, // [7] EGYPTIAN HIEROGLYPH VERTICAL JOINER..EGYPTIAN HIEROGLYPH OVERLAY MIDDLE {0x13437, 0x13437, prOP, gcCf}, // EGYPTIAN HIEROGLYPH BEGIN SEGMENT {0x13438, 0x13438, prCL, gcCf}, // EGYPTIAN HIEROGLYPH END SEGMENT {0x13439, 0x1343B, prGL, gcCf}, // [3] EGYPTIAN HIEROGLYPH INSERT AT MIDDLE..EGYPTIAN HIEROGLYPH INSERT AT BOTTOM {0x1343C, 0x1343C, prOP, gcCf}, // EGYPTIAN HIEROGLYPH BEGIN ENCLOSURE {0x1343D, 0x1343D, prCL, gcCf}, // EGYPTIAN HIEROGLYPH END ENCLOSURE {0x1343E, 0x1343E, prOP, gcCf}, // EGYPTIAN HIEROGLYPH BEGIN WALLED ENCLOSURE {0x1343F, 0x1343F, prCL, gcCf}, // EGYPTIAN HIEROGLYPH END WALLED ENCLOSURE {0x13440, 0x13440, prCM, gcMn}, // EGYPTIAN HIEROGLYPH MIRROR HORIZONTALLY {0x13441, 0x13446, prAL, gcLo}, // [6] EGYPTIAN HIEROGLYPH FULL BLANK..EGYPTIAN HIEROGLYPH WIDE LOST SIGN {0x13447, 0x13455, prCM, gcMn}, // [15] EGYPTIAN HIEROGLYPH MODIFIER DAMAGED AT TOP START..EGYPTIAN HIEROGLYPH MODIFIER DAMAGED {0x14400, 0x145CD, prAL, gcLo}, // [462] ANATOLIAN HIEROGLYPH A001..ANATOLIAN HIEROGLYPH A409 {0x145CE, 0x145CE, prOP, gcLo}, // ANATOLIAN HIEROGLYPH A410 BEGIN LOGOGRAM MARK {0x145CF, 0x145CF, prCL, gcLo}, // ANATOLIAN HIEROGLYPH A410A END LOGOGRAM MARK {0x145D0, 0x14646, prAL, gcLo}, // [119] ANATOLIAN HIEROGLYPH A411..ANATOLIAN HIEROGLYPH A530 {0x16800, 0x16A38, prAL, gcLo}, // [569] BAMUM LETTER PHASE-A NGKUE MFON..BAMUM LETTER PHASE-F VUEQ {0x16A40, 0x16A5E, prAL, gcLo}, // [31] MRO LETTER TA..MRO LETTER TEK {0x16A60, 0x16A69, prNU, gcNd}, // [10] MRO DIGIT ZERO..MRO DIGIT NINE {0x16A6E, 0x16A6F, prBA, gcPo}, // [2] MRO DANDA..MRO DOUBLE DANDA {0x16A70, 0x16ABE, prAL, gcLo}, // [79] TANGSA LETTER OZ..TANGSA LETTER ZA {0x16AC0, 0x16AC9, prNU, gcNd}, // [10] TANGSA DIGIT ZERO..TANGSA DIGIT NINE {0x16AD0, 0x16AED, prAL, gcLo}, // [30] BASSA VAH LETTER ENNI..BASSA VAH LETTER I {0x16AF0, 0x16AF4, prCM, gcMn}, // [5] BASSA VAH COMBINING HIGH TONE..BASSA VAH COMBINING HIGH-LOW TONE {0x16AF5, 0x16AF5, prBA, gcPo}, // BASSA VAH FULL STOP {0x16B00, 0x16B2F, prAL, gcLo}, // [48] PAHAWH HMONG VOWEL KEEB..PAHAWH HMONG CONSONANT CAU {0x16B30, 0x16B36, prCM, gcMn}, // [7] PAHAWH HMONG MARK CIM TUB..PAHAWH HMONG MARK CIM TAUM {0x16B37, 0x16B39, prBA, gcPo}, // [3] PAHAWH HMONG SIGN VOS THOM..PAHAWH HMONG SIGN CIM CHEEM {0x16B3A, 0x16B3B, prAL, gcPo}, // [2] PAHAWH HMONG SIGN VOS THIAB..PAHAWH HMONG SIGN VOS FEEM {0x16B3C, 0x16B3F, prAL, gcSo}, // [4] PAHAWH HMONG SIGN XYEEM NTXIV..PAHAWH HMONG SIGN XYEEM FAIB {0x16B40, 0x16B43, prAL, gcLm}, // [4] PAHAWH HMONG SIGN VOS SEEV..PAHAWH HMONG SIGN IB YAM {0x16B44, 0x16B44, prBA, gcPo}, // PAHAWH HMONG SIGN XAUS {0x16B45, 0x16B45, prAL, gcSo}, // PAHAWH HMONG SIGN CIM TSOV ROG {0x16B50, 0x16B59, prNU, gcNd}, // [10] PAHAWH HMONG DIGIT ZERO..PAHAWH HMONG DIGIT NINE {0x16B5B, 0x16B61, prAL, gcNo}, // [7] PAHAWH HMONG NUMBER TENS..PAHAWH HMONG NUMBER TRILLIONS {0x16B63, 0x16B77, prAL, gcLo}, // [21] PAHAWH HMONG SIGN VOS LUB..PAHAWH HMONG SIGN CIM NRES TOS {0x16B7D, 0x16B8F, prAL, gcLo}, // [19] PAHAWH HMONG CLAN SIGN TSHEEJ..PAHAWH HMONG CLAN SIGN VWJ {0x16E40, 0x16E7F, prAL, gcLC}, // [64] MEDEFAIDRIN CAPITAL LETTER M..MEDEFAIDRIN SMALL LETTER Y {0x16E80, 0x16E96, prAL, gcNo}, // [23] MEDEFAIDRIN DIGIT ZERO..MEDEFAIDRIN DIGIT THREE ALTERNATE FORM {0x16E97, 0x16E98, prBA, gcPo}, // [2] MEDEFAIDRIN COMMA..MEDEFAIDRIN FULL STOP {0x16E99, 0x16E9A, prAL, gcPo}, // [2] MEDEFAIDRIN SYMBOL AIVA..MEDEFAIDRIN EXCLAMATION OH {0x16F00, 0x16F4A, prAL, gcLo}, // [75] MIAO LETTER PA..MIAO LETTER RTE {0x16F4F, 0x16F4F, prCM, gcMn}, // MIAO SIGN CONSONANT MODIFIER BAR {0x16F50, 0x16F50, prAL, gcLo}, // MIAO LETTER NASALIZATION {0x16F51, 0x16F87, prCM, gcMc}, // [55] MIAO SIGN ASPIRATION..MIAO VOWEL SIGN UI {0x16F8F, 0x16F92, prCM, gcMn}, // [4] MIAO TONE RIGHT..MIAO TONE BELOW {0x16F93, 0x16F9F, prAL, gcLm}, // [13] MIAO LETTER TONE-2..MIAO LETTER REFORMED TONE-8 {0x16FE0, 0x16FE1, prNS, gcLm}, // [2] TANGUT ITERATION MARK..NUSHU ITERATION MARK {0x16FE2, 0x16FE2, prNS, gcPo}, // OLD CHINESE HOOK MARK {0x16FE3, 0x16FE3, prNS, gcLm}, // OLD CHINESE ITERATION MARK {0x16FE4, 0x16FE4, prGL, gcMn}, // KHITAN SMALL SCRIPT FILLER {0x16FF0, 0x16FF1, prCM, gcMc}, // [2] VIETNAMESE ALTERNATE READING MARK CA..VIETNAMESE ALTERNATE READING MARK NHAY {0x17000, 0x187F7, prID, gcLo}, // [6136] TANGUT IDEOGRAPH-17000..TANGUT IDEOGRAPH-187F7 {0x18800, 0x18AFF, prID, gcLo}, // [768] TANGUT COMPONENT-001..TANGUT COMPONENT-768 {0x18B00, 0x18CD5, prAL, gcLo}, // [470] KHITAN SMALL SCRIPT CHARACTER-18B00..KHITAN SMALL SCRIPT CHARACTER-18CD5 {0x18D00, 0x18D08, prID, gcLo}, // [9] TANGUT IDEOGRAPH-18D00..TANGUT IDEOGRAPH-18D08 {0x1AFF0, 0x1AFF3, prAL, gcLm}, // [4] KATAKANA LETTER MINNAN TONE-2..KATAKANA LETTER MINNAN TONE-5 {0x1AFF5, 0x1AFFB, prAL, gcLm}, // [7] KATAKANA LETTER MINNAN TONE-7..KATAKANA LETTER MINNAN NASALIZED TONE-5 {0x1AFFD, 0x1AFFE, prAL, gcLm}, // [2] KATAKANA LETTER MINNAN NASALIZED TONE-7..KATAKANA LETTER MINNAN NASALIZED TONE-8 {0x1B000, 0x1B0FF, prID, gcLo}, // [256] KATAKANA LETTER ARCHAIC E..HENTAIGANA LETTER RE-2 {0x1B100, 0x1B122, prID, gcLo}, // [35] HENTAIGANA LETTER RE-3..KATAKANA LETTER ARCHAIC WU {0x1B132, 0x1B132, prCJ, gcLo}, // HIRAGANA LETTER SMALL KO {0x1B150, 0x1B152, prCJ, gcLo}, // [3] HIRAGANA LETTER SMALL WI..HIRAGANA LETTER SMALL WO {0x1B155, 0x1B155, prCJ, gcLo}, // KATAKANA LETTER SMALL KO {0x1B164, 0x1B167, prCJ, gcLo}, // [4] KATAKANA LETTER SMALL WI..KATAKANA LETTER SMALL N {0x1B170, 0x1B2FB, prID, gcLo}, // [396] NUSHU CHARACTER-1B170..NUSHU CHARACTER-1B2FB {0x1BC00, 0x1BC6A, prAL, gcLo}, // [107] DUPLOYAN LETTER H..DUPLOYAN LETTER VOCALIC M {0x1BC70, 0x1BC7C, prAL, gcLo}, // [13] DUPLOYAN AFFIX LEFT HORIZONTAL SECANT..DUPLOYAN AFFIX ATTACHED TANGENT HOOK {0x1BC80, 0x1BC88, prAL, gcLo}, // [9] DUPLOYAN AFFIX HIGH ACUTE..DUPLOYAN AFFIX HIGH VERTICAL {0x1BC90, 0x1BC99, prAL, gcLo}, // [10] DUPLOYAN AFFIX LOW ACUTE..DUPLOYAN AFFIX LOW ARROW {0x1BC9C, 0x1BC9C, prAL, gcSo}, // DUPLOYAN SIGN O WITH CROSS {0x1BC9D, 0x1BC9E, prCM, gcMn}, // [2] DUPLOYAN THICK LETTER SELECTOR..DUPLOYAN DOUBLE MARK {0x1BC9F, 0x1BC9F, prBA, gcPo}, // DUPLOYAN PUNCTUATION CHINOOK FULL STOP {0x1BCA0, 0x1BCA3, prCM, gcCf}, // [4] SHORTHAND FORMAT LETTER OVERLAP..SHORTHAND FORMAT UP STEP {0x1CF00, 0x1CF2D, prCM, gcMn}, // [46] ZNAMENNY COMBINING MARK GORAZDO NIZKO S KRYZHEM ON LEFT..ZNAMENNY COMBINING MARK KRYZH ON LEFT {0x1CF30, 0x1CF46, prCM, gcMn}, // [23] ZNAMENNY COMBINING TONAL RANGE MARK MRACHNO..ZNAMENNY PRIZNAK MODIFIER ROG {0x1CF50, 0x1CFC3, prAL, gcSo}, // [116] ZNAMENNY NEUME KRYUK..ZNAMENNY NEUME PAUK {0x1D000, 0x1D0F5, prAL, gcSo}, // [246] BYZANTINE MUSICAL SYMBOL PSILI..BYZANTINE MUSICAL SYMBOL GORGON NEO KATO {0x1D100, 0x1D126, prAL, gcSo}, // [39] MUSICAL SYMBOL SINGLE BARLINE..MUSICAL SYMBOL DRUM CLEF-2 {0x1D129, 0x1D164, prAL, gcSo}, // [60] MUSICAL SYMBOL MULTIPLE MEASURE REST..MUSICAL SYMBOL ONE HUNDRED TWENTY-EIGHTH NOTE {0x1D165, 0x1D166, prCM, gcMc}, // [2] MUSICAL SYMBOL COMBINING STEM..MUSICAL SYMBOL COMBINING SPRECHGESANG STEM {0x1D167, 0x1D169, prCM, gcMn}, // [3] MUSICAL SYMBOL COMBINING TREMOLO-1..MUSICAL SYMBOL COMBINING TREMOLO-3 {0x1D16A, 0x1D16C, prAL, gcSo}, // [3] MUSICAL SYMBOL FINGERED TREMOLO-1..MUSICAL SYMBOL FINGERED TREMOLO-3 {0x1D16D, 0x1D172, prCM, gcMc}, // [6] MUSICAL SYMBOL COMBINING AUGMENTATION DOT..MUSICAL SYMBOL COMBINING FLAG-5 {0x1D173, 0x1D17A, prCM, gcCf}, // [8] MUSICAL SYMBOL BEGIN BEAM..MUSICAL SYMBOL END PHRASE {0x1D17B, 0x1D182, prCM, gcMn}, // [8] MUSICAL SYMBOL COMBINING ACCENT..MUSICAL SYMBOL COMBINING LOURE {0x1D183, 0x1D184, prAL, gcSo}, // [2] MUSICAL SYMBOL ARPEGGIATO UP..MUSICAL SYMBOL ARPEGGIATO DOWN {0x1D185, 0x1D18B, prCM, gcMn}, // [7] MUSICAL SYMBOL COMBINING DOIT..MUSICAL SYMBOL COMBINING TRIPLE TONGUE {0x1D18C, 0x1D1A9, prAL, gcSo}, // [30] MUSICAL SYMBOL RINFORZANDO..MUSICAL SYMBOL DEGREE SLASH {0x1D1AA, 0x1D1AD, prCM, gcMn}, // [4] MUSICAL SYMBOL COMBINING DOWN BOW..MUSICAL SYMBOL COMBINING SNAP PIZZICATO {0x1D1AE, 0x1D1EA, prAL, gcSo}, // [61] MUSICAL SYMBOL PEDAL MARK..MUSICAL SYMBOL KORON {0x1D200, 0x1D241, prAL, gcSo}, // [66] GREEK VOCAL NOTATION SYMBOL-1..GREEK INSTRUMENTAL NOTATION SYMBOL-54 {0x1D242, 0x1D244, prCM, gcMn}, // [3] COMBINING GREEK MUSICAL TRISEME..COMBINING GREEK MUSICAL PENTASEME {0x1D245, 0x1D245, prAL, gcSo}, // GREEK MUSICAL LEIMMA {0x1D2C0, 0x1D2D3, prAL, gcNo}, // [20] KAKTOVIK NUMERAL ZERO..KAKTOVIK NUMERAL NINETEEN {0x1D2E0, 0x1D2F3, prAL, gcNo}, // [20] MAYAN NUMERAL ZERO..MAYAN NUMERAL NINETEEN {0x1D300, 0x1D356, prAL, gcSo}, // [87] MONOGRAM FOR EARTH..TETRAGRAM FOR FOSTERING {0x1D360, 0x1D378, prAL, gcNo}, // [25] COUNTING ROD UNIT DIGIT ONE..TALLY MARK FIVE {0x1D400, 0x1D454, prAL, gcLC}, // [85] MATHEMATICAL BOLD CAPITAL A..MATHEMATICAL ITALIC SMALL G {0x1D456, 0x1D49C, prAL, gcLC}, // [71] MATHEMATICAL ITALIC SMALL I..MATHEMATICAL SCRIPT CAPITAL A {0x1D49E, 0x1D49F, prAL, gcLu}, // [2] MATHEMATICAL SCRIPT CAPITAL C..MATHEMATICAL SCRIPT CAPITAL D {0x1D4A2, 0x1D4A2, prAL, gcLu}, // MATHEMATICAL SCRIPT CAPITAL G {0x1D4A5, 0x1D4A6, prAL, gcLu}, // [2] MATHEMATICAL SCRIPT CAPITAL J..MATHEMATICAL SCRIPT CAPITAL K {0x1D4A9, 0x1D4AC, prAL, gcLu}, // [4] MATHEMATICAL SCRIPT CAPITAL N..MATHEMATICAL SCRIPT CAPITAL Q {0x1D4AE, 0x1D4B9, prAL, gcLC}, // [12] MATHEMATICAL SCRIPT CAPITAL S..MATHEMATICAL SCRIPT SMALL D {0x1D4BB, 0x1D4BB, prAL, gcLl}, // MATHEMATICAL SCRIPT SMALL F {0x1D4BD, 0x1D4C3, prAL, gcLl}, // [7] MATHEMATICAL SCRIPT SMALL H..MATHEMATICAL SCRIPT SMALL N {0x1D4C5, 0x1D505, prAL, gcLC}, // [65] MATHEMATICAL SCRIPT SMALL P..MATHEMATICAL FRAKTUR CAPITAL B {0x1D507, 0x1D50A, prAL, gcLu}, // [4] MATHEMATICAL FRAKTUR CAPITAL D..MATHEMATICAL FRAKTUR CAPITAL G {0x1D50D, 0x1D514, prAL, gcLu}, // [8] MATHEMATICAL FRAKTUR CAPITAL J..MATHEMATICAL FRAKTUR CAPITAL Q {0x1D516, 0x1D51C, prAL, gcLu}, // [7] MATHEMATICAL FRAKTUR CAPITAL S..MATHEMATICAL FRAKTUR CAPITAL Y {0x1D51E, 0x1D539, prAL, gcLC}, // [28] MATHEMATICAL FRAKTUR SMALL A..MATHEMATICAL DOUBLE-STRUCK CAPITAL B {0x1D53B, 0x1D53E, prAL, gcLu}, // [4] MATHEMATICAL DOUBLE-STRUCK CAPITAL D..MATHEMATICAL DOUBLE-STRUCK CAPITAL G {0x1D540, 0x1D544, prAL, gcLu}, // [5] MATHEMATICAL DOUBLE-STRUCK CAPITAL I..MATHEMATICAL DOUBLE-STRUCK CAPITAL M {0x1D546, 0x1D546, prAL, gcLu}, // MATHEMATICAL DOUBLE-STRUCK CAPITAL O {0x1D54A, 0x1D550, prAL, gcLu}, // [7] MATHEMATICAL DOUBLE-STRUCK CAPITAL S..MATHEMATICAL DOUBLE-STRUCK CAPITAL Y {0x1D552, 0x1D6A5, prAL, gcLC}, // [340] MATHEMATICAL DOUBLE-STRUCK SMALL A..MATHEMATICAL ITALIC SMALL DOTLESS J {0x1D6A8, 0x1D6C0, prAL, gcLu}, // [25] MATHEMATICAL BOLD CAPITAL ALPHA..MATHEMATICAL BOLD CAPITAL OMEGA {0x1D6C1, 0x1D6C1, prAL, gcSm}, // MATHEMATICAL BOLD NABLA {0x1D6C2, 0x1D6DA, prAL, gcLl}, // [25] MATHEMATICAL BOLD SMALL ALPHA..MATHEMATICAL BOLD SMALL OMEGA {0x1D6DB, 0x1D6DB, prAL, gcSm}, // MATHEMATICAL BOLD PARTIAL DIFFERENTIAL {0x1D6DC, 0x1D6FA, prAL, gcLC}, // [31] MATHEMATICAL BOLD EPSILON SYMBOL..MATHEMATICAL ITALIC CAPITAL OMEGA {0x1D6FB, 0x1D6FB, prAL, gcSm}, // MATHEMATICAL ITALIC NABLA {0x1D6FC, 0x1D714, prAL, gcLl}, // [25] MATHEMATICAL ITALIC SMALL ALPHA..MATHEMATICAL ITALIC SMALL OMEGA {0x1D715, 0x1D715, prAL, gcSm}, // MATHEMATICAL ITALIC PARTIAL DIFFERENTIAL {0x1D716, 0x1D734, prAL, gcLC}, // [31] MATHEMATICAL ITALIC EPSILON SYMBOL..MATHEMATICAL BOLD ITALIC CAPITAL OMEGA {0x1D735, 0x1D735, prAL, gcSm}, // MATHEMATICAL BOLD ITALIC NABLA {0x1D736, 0x1D74E, prAL, gcLl}, // [25] MATHEMATICAL BOLD ITALIC SMALL ALPHA..MATHEMATICAL BOLD ITALIC SMALL OMEGA {0x1D74F, 0x1D74F, prAL, gcSm}, // MATHEMATICAL BOLD ITALIC PARTIAL DIFFERENTIAL {0x1D750, 0x1D76E, prAL, gcLC}, // [31] MATHEMATICAL BOLD ITALIC EPSILON SYMBOL..MATHEMATICAL SANS-SERIF BOLD CAPITAL OMEGA {0x1D76F, 0x1D76F, prAL, gcSm}, // MATHEMATICAL SANS-SERIF BOLD NABLA {0x1D770, 0x1D788, prAL, gcLl}, // [25] MATHEMATICAL SANS-SERIF BOLD SMALL ALPHA..MATHEMATICAL SANS-SERIF BOLD SMALL OMEGA {0x1D789, 0x1D789, prAL, gcSm}, // MATHEMATICAL SANS-SERIF BOLD PARTIAL DIFFERENTIAL {0x1D78A, 0x1D7A8, prAL, gcLC}, // [31] MATHEMATICAL SANS-SERIF BOLD EPSILON SYMBOL..MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL OMEGA {0x1D7A9, 0x1D7A9, prAL, gcSm}, // MATHEMATICAL SANS-SERIF BOLD ITALIC NABLA {0x1D7AA, 0x1D7C2, prAL, gcLl}, // [25] MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL ALPHA..MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL OMEGA {0x1D7C3, 0x1D7C3, prAL, gcSm}, // MATHEMATICAL SANS-SERIF BOLD ITALIC PARTIAL DIFFERENTIAL {0x1D7C4, 0x1D7CB, prAL, gcLC}, // [8] MATHEMATICAL SANS-SERIF BOLD ITALIC EPSILON SYMBOL..MATHEMATICAL BOLD SMALL DIGAMMA {0x1D7CE, 0x1D7FF, prNU, gcNd}, // [50] MATHEMATICAL BOLD DIGIT ZERO..MATHEMATICAL MONOSPACE DIGIT NINE {0x1D800, 0x1D9FF, prAL, gcSo}, // [512] SIGNWRITING HAND-FIST INDEX..SIGNWRITING HEAD {0x1DA00, 0x1DA36, prCM, gcMn}, // [55] SIGNWRITING HEAD RIM..SIGNWRITING AIR SUCKING IN {0x1DA37, 0x1DA3A, prAL, gcSo}, // [4] SIGNWRITING AIR BLOW SMALL ROTATIONS..SIGNWRITING BREATH EXHALE {0x1DA3B, 0x1DA6C, prCM, gcMn}, // [50] SIGNWRITING MOUTH CLOSED NEUTRAL..SIGNWRITING EXCITEMENT {0x1DA6D, 0x1DA74, prAL, gcSo}, // [8] SIGNWRITING SHOULDER HIP SPINE..SIGNWRITING TORSO-FLOORPLANE TWISTING {0x1DA75, 0x1DA75, prCM, gcMn}, // SIGNWRITING UPPER BODY TILTING FROM HIP JOINTS {0x1DA76, 0x1DA83, prAL, gcSo}, // [14] SIGNWRITING LIMB COMBINATION..SIGNWRITING LOCATION DEPTH {0x1DA84, 0x1DA84, prCM, gcMn}, // SIGNWRITING LOCATION HEAD NECK {0x1DA85, 0x1DA86, prAL, gcSo}, // [2] SIGNWRITING LOCATION TORSO..SIGNWRITING LOCATION LIMBS DIGITS {0x1DA87, 0x1DA8A, prBA, gcPo}, // [4] SIGNWRITING COMMA..SIGNWRITING COLON {0x1DA8B, 0x1DA8B, prAL, gcPo}, // SIGNWRITING PARENTHESIS {0x1DA9B, 0x1DA9F, prCM, gcMn}, // [5] SIGNWRITING FILL MODIFIER-2..SIGNWRITING FILL MODIFIER-6 {0x1DAA1, 0x1DAAF, prCM, gcMn}, // [15] SIGNWRITING ROTATION MODIFIER-2..SIGNWRITING ROTATION MODIFIER-16 {0x1DF00, 0x1DF09, prAL, gcLl}, // [10] LATIN SMALL LETTER FENG DIGRAPH WITH TRILL..LATIN SMALL LETTER T WITH HOOK AND RETROFLEX HOOK {0x1DF0A, 0x1DF0A, prAL, gcLo}, // LATIN LETTER RETROFLEX CLICK WITH RETROFLEX HOOK {0x1DF0B, 0x1DF1E, prAL, gcLl}, // [20] LATIN SMALL LETTER ESH WITH DOUBLE BAR..LATIN SMALL LETTER S WITH CURL {0x1DF25, 0x1DF2A, prAL, gcLl}, // [6] LATIN SMALL LETTER D WITH MID-HEIGHT LEFT HOOK..LATIN SMALL LETTER T WITH MID-HEIGHT LEFT HOOK {0x1E000, 0x1E006, prCM, gcMn}, // [7] COMBINING GLAGOLITIC LETTER AZU..COMBINING GLAGOLITIC LETTER ZHIVETE {0x1E008, 0x1E018, prCM, gcMn}, // [17] COMBINING GLAGOLITIC LETTER ZEMLJA..COMBINING GLAGOLITIC LETTER HERU {0x1E01B, 0x1E021, prCM, gcMn}, // [7] COMBINING GLAGOLITIC LETTER SHTA..COMBINING GLAGOLITIC LETTER YATI {0x1E023, 0x1E024, prCM, gcMn}, // [2] COMBINING GLAGOLITIC LETTER YU..COMBINING GLAGOLITIC LETTER SMALL YUS {0x1E026, 0x1E02A, prCM, gcMn}, // [5] COMBINING GLAGOLITIC LETTER YO..COMBINING GLAGOLITIC LETTER FITA {0x1E030, 0x1E06D, prAL, gcLm}, // [62] MODIFIER LETTER CYRILLIC SMALL A..MODIFIER LETTER CYRILLIC SMALL STRAIGHT U WITH STROKE {0x1E08F, 0x1E08F, prCM, gcMn}, // COMBINING CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I {0x1E100, 0x1E12C, prAL, gcLo}, // [45] NYIAKENG PUACHUE HMONG LETTER MA..NYIAKENG PUACHUE HMONG LETTER W {0x1E130, 0x1E136, prCM, gcMn}, // [7] NYIAKENG PUACHUE HMONG TONE-B..NYIAKENG PUACHUE HMONG TONE-D {0x1E137, 0x1E13D, prAL, gcLm}, // [7] NYIAKENG PUACHUE HMONG SIGN FOR PERSON..NYIAKENG PUACHUE HMONG SYLLABLE LENGTHENER {0x1E140, 0x1E149, prNU, gcNd}, // [10] NYIAKENG PUACHUE HMONG DIGIT ZERO..NYIAKENG PUACHUE HMONG DIGIT NINE {0x1E14E, 0x1E14E, prAL, gcLo}, // NYIAKENG PUACHUE HMONG LOGOGRAM NYAJ {0x1E14F, 0x1E14F, prAL, gcSo}, // NYIAKENG PUACHUE HMONG CIRCLED CA {0x1E290, 0x1E2AD, prAL, gcLo}, // [30] TOTO LETTER PA..TOTO LETTER A {0x1E2AE, 0x1E2AE, prCM, gcMn}, // TOTO SIGN RISING TONE {0x1E2C0, 0x1E2EB, prAL, gcLo}, // [44] WANCHO LETTER AA..WANCHO LETTER YIH {0x1E2EC, 0x1E2EF, prCM, gcMn}, // [4] WANCHO TONE TUP..WANCHO TONE KOINI {0x1E2F0, 0x1E2F9, prNU, gcNd}, // [10] WANCHO DIGIT ZERO..WANCHO DIGIT NINE {0x1E2FF, 0x1E2FF, prPR, gcSc}, // WANCHO NGUN SIGN {0x1E4D0, 0x1E4EA, prAL, gcLo}, // [27] NAG MUNDARI LETTER O..NAG MUNDARI LETTER ELL {0x1E4EB, 0x1E4EB, prAL, gcLm}, // NAG MUNDARI SIGN OJOD {0x1E4EC, 0x1E4EF, prCM, gcMn}, // [4] NAG MUNDARI SIGN MUHOR..NAG MUNDARI SIGN SUTUH {0x1E4F0, 0x1E4F9, prNU, gcNd}, // [10] NAG MUNDARI DIGIT ZERO..NAG MUNDARI DIGIT NINE {0x1E7E0, 0x1E7E6, prAL, gcLo}, // [7] ETHIOPIC SYLLABLE HHYA..ETHIOPIC SYLLABLE HHYO {0x1E7E8, 0x1E7EB, prAL, gcLo}, // [4] ETHIOPIC SYLLABLE GURAGE HHWA..ETHIOPIC SYLLABLE HHWE {0x1E7ED, 0x1E7EE, prAL, gcLo}, // [2] ETHIOPIC SYLLABLE GURAGE MWI..ETHIOPIC SYLLABLE GURAGE MWEE {0x1E7F0, 0x1E7FE, prAL, gcLo}, // [15] ETHIOPIC SYLLABLE GURAGE QWI..ETHIOPIC SYLLABLE GURAGE PWEE {0x1E800, 0x1E8C4, prAL, gcLo}, // [197] MENDE KIKAKUI SYLLABLE M001 KI..MENDE KIKAKUI SYLLABLE M060 NYON {0x1E8C7, 0x1E8CF, prAL, gcNo}, // [9] MENDE KIKAKUI DIGIT ONE..MENDE KIKAKUI DIGIT NINE {0x1E8D0, 0x1E8D6, prCM, gcMn}, // [7] MENDE KIKAKUI COMBINING NUMBER TEENS..MENDE KIKAKUI COMBINING NUMBER MILLIONS {0x1E900, 0x1E943, prAL, gcLC}, // [68] ADLAM CAPITAL LETTER ALIF..ADLAM SMALL LETTER SHA {0x1E944, 0x1E94A, prCM, gcMn}, // [7] ADLAM ALIF LENGTHENER..ADLAM NUKTA {0x1E94B, 0x1E94B, prAL, gcLm}, // ADLAM NASALIZATION MARK {0x1E950, 0x1E959, prNU, gcNd}, // [10] ADLAM DIGIT ZERO..ADLAM DIGIT NINE {0x1E95E, 0x1E95F, prOP, gcPo}, // [2] ADLAM INITIAL EXCLAMATION MARK..ADLAM INITIAL QUESTION MARK {0x1EC71, 0x1ECAB, prAL, gcNo}, // [59] INDIC SIYAQ NUMBER ONE..INDIC SIYAQ NUMBER PREFIXED NINE {0x1ECAC, 0x1ECAC, prPO, gcSo}, // INDIC SIYAQ PLACEHOLDER {0x1ECAD, 0x1ECAF, prAL, gcNo}, // [3] INDIC SIYAQ FRACTION ONE QUARTER..INDIC SIYAQ FRACTION THREE QUARTERS {0x1ECB0, 0x1ECB0, prPO, gcSc}, // INDIC SIYAQ RUPEE MARK {0x1ECB1, 0x1ECB4, prAL, gcNo}, // [4] INDIC SIYAQ NUMBER ALTERNATE ONE..INDIC SIYAQ ALTERNATE LAKH MARK {0x1ED01, 0x1ED2D, prAL, gcNo}, // [45] OTTOMAN SIYAQ NUMBER ONE..OTTOMAN SIYAQ NUMBER NINETY THOUSAND {0x1ED2E, 0x1ED2E, prAL, gcSo}, // OTTOMAN SIYAQ MARRATAN {0x1ED2F, 0x1ED3D, prAL, gcNo}, // [15] OTTOMAN SIYAQ ALTERNATE NUMBER TWO..OTTOMAN SIYAQ FRACTION ONE SIXTH {0x1EE00, 0x1EE03, prAL, gcLo}, // [4] ARABIC MATHEMATICAL ALEF..ARABIC MATHEMATICAL DAL {0x1EE05, 0x1EE1F, prAL, gcLo}, // [27] ARABIC MATHEMATICAL WAW..ARABIC MATHEMATICAL DOTLESS QAF {0x1EE21, 0x1EE22, prAL, gcLo}, // [2] ARABIC MATHEMATICAL INITIAL BEH..ARABIC MATHEMATICAL INITIAL JEEM {0x1EE24, 0x1EE24, prAL, gcLo}, // ARABIC MATHEMATICAL INITIAL HEH {0x1EE27, 0x1EE27, prAL, gcLo}, // ARABIC MATHEMATICAL INITIAL HAH {0x1EE29, 0x1EE32, prAL, gcLo}, // [10] ARABIC MATHEMATICAL INITIAL YEH..ARABIC MATHEMATICAL INITIAL QAF {0x1EE34, 0x1EE37, prAL, gcLo}, // [4] ARABIC MATHEMATICAL INITIAL SHEEN..ARABIC MATHEMATICAL INITIAL KHAH {0x1EE39, 0x1EE39, prAL, gcLo}, // ARABIC MATHEMATICAL INITIAL DAD {0x1EE3B, 0x1EE3B, prAL, gcLo}, // ARABIC MATHEMATICAL INITIAL GHAIN {0x1EE42, 0x1EE42, prAL, gcLo}, // ARABIC MATHEMATICAL TAILED JEEM {0x1EE47, 0x1EE47, prAL, gcLo}, // ARABIC MATHEMATICAL TAILED HAH {0x1EE49, 0x1EE49, prAL, gcLo}, // ARABIC MATHEMATICAL TAILED YEH {0x1EE4B, 0x1EE4B, prAL, gcLo}, // ARABIC MATHEMATICAL TAILED LAM {0x1EE4D, 0x1EE4F, prAL, gcLo}, // [3] ARABIC MATHEMATICAL TAILED NOON..ARABIC MATHEMATICAL TAILED AIN {0x1EE51, 0x1EE52, prAL, gcLo}, // [2] ARABIC MATHEMATICAL TAILED SAD..ARABIC MATHEMATICAL TAILED QAF {0x1EE54, 0x1EE54, prAL, gcLo}, // ARABIC MATHEMATICAL TAILED SHEEN {0x1EE57, 0x1EE57, prAL, gcLo}, // ARABIC MATHEMATICAL TAILED KHAH {0x1EE59, 0x1EE59, prAL, gcLo}, // ARABIC MATHEMATICAL TAILED DAD {0x1EE5B, 0x1EE5B, prAL, gcLo}, // ARABIC MATHEMATICAL TAILED GHAIN {0x1EE5D, 0x1EE5D, prAL, gcLo}, // ARABIC MATHEMATICAL TAILED DOTLESS NOON {0x1EE5F, 0x1EE5F, prAL, gcLo}, // ARABIC MATHEMATICAL TAILED DOTLESS QAF {0x1EE61, 0x1EE62, prAL, gcLo}, // [2] ARABIC MATHEMATICAL STRETCHED BEH..ARABIC MATHEMATICAL STRETCHED JEEM {0x1EE64, 0x1EE64, prAL, gcLo}, // ARABIC MATHEMATICAL STRETCHED HEH {0x1EE67, 0x1EE6A, prAL, gcLo}, // [4] ARABIC MATHEMATICAL STRETCHED HAH..ARABIC MATHEMATICAL STRETCHED KAF {0x1EE6C, 0x1EE72, prAL, gcLo}, // [7] ARABIC MATHEMATICAL STRETCHED MEEM..ARABIC MATHEMATICAL STRETCHED QAF {0x1EE74, 0x1EE77, prAL, gcLo}, // [4] ARABIC MATHEMATICAL STRETCHED SHEEN..ARABIC MATHEMATICAL STRETCHED KHAH {0x1EE79, 0x1EE7C, prAL, gcLo}, // [4] ARABIC MATHEMATICAL STRETCHED DAD..ARABIC MATHEMATICAL STRETCHED DOTLESS BEH {0x1EE7E, 0x1EE7E, prAL, gcLo}, // ARABIC MATHEMATICAL STRETCHED DOTLESS FEH {0x1EE80, 0x1EE89, prAL, gcLo}, // [10] ARABIC MATHEMATICAL LOOPED ALEF..ARABIC MATHEMATICAL LOOPED YEH {0x1EE8B, 0x1EE9B, prAL, gcLo}, // [17] ARABIC MATHEMATICAL LOOPED LAM..ARABIC MATHEMATICAL LOOPED GHAIN {0x1EEA1, 0x1EEA3, prAL, gcLo}, // [3] ARABIC MATHEMATICAL DOUBLE-STRUCK BEH..ARABIC MATHEMATICAL DOUBLE-STRUCK DAL {0x1EEA5, 0x1EEA9, prAL, gcLo}, // [5] ARABIC MATHEMATICAL DOUBLE-STRUCK WAW..ARABIC MATHEMATICAL DOUBLE-STRUCK YEH {0x1EEAB, 0x1EEBB, prAL, gcLo}, // [17] ARABIC MATHEMATICAL DOUBLE-STRUCK LAM..ARABIC MATHEMATICAL DOUBLE-STRUCK GHAIN {0x1EEF0, 0x1EEF1, prAL, gcSm}, // [2] ARABIC MATHEMATICAL OPERATOR MEEM WITH HAH WITH TATWEEL..ARABIC MATHEMATICAL OPERATOR HAH WITH DAL {0x1F000, 0x1F02B, prID, gcSo}, // [44] MAHJONG TILE EAST WIND..MAHJONG TILE BACK {0x1F02C, 0x1F02F, prID, gcCn}, // [4] .. {0x1F030, 0x1F093, prID, gcSo}, // [100] DOMINO TILE HORIZONTAL BACK..DOMINO TILE VERTICAL-06-06 {0x1F094, 0x1F09F, prID, gcCn}, // [12] .. {0x1F0A0, 0x1F0AE, prID, gcSo}, // [15] PLAYING CARD BACK..PLAYING CARD KING OF SPADES {0x1F0AF, 0x1F0B0, prID, gcCn}, // [2] .. {0x1F0B1, 0x1F0BF, prID, gcSo}, // [15] PLAYING CARD ACE OF HEARTS..PLAYING CARD RED JOKER {0x1F0C0, 0x1F0C0, prID, gcCn}, // {0x1F0C1, 0x1F0CF, prID, gcSo}, // [15] PLAYING CARD ACE OF DIAMONDS..PLAYING CARD BLACK JOKER {0x1F0D0, 0x1F0D0, prID, gcCn}, // {0x1F0D1, 0x1F0F5, prID, gcSo}, // [37] PLAYING CARD ACE OF CLUBS..PLAYING CARD TRUMP-21 {0x1F0F6, 0x1F0FF, prID, gcCn}, // [10] .. {0x1F100, 0x1F10C, prAI, gcNo}, // [13] DIGIT ZERO FULL STOP..DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT ZERO {0x1F10D, 0x1F10F, prID, gcSo}, // [3] CIRCLED ZERO WITH SLASH..CIRCLED DOLLAR SIGN WITH OVERLAID BACKSLASH {0x1F110, 0x1F12D, prAI, gcSo}, // [30] PARENTHESIZED LATIN CAPITAL LETTER A..CIRCLED CD {0x1F12E, 0x1F12F, prAL, gcSo}, // [2] CIRCLED WZ..COPYLEFT SYMBOL {0x1F130, 0x1F169, prAI, gcSo}, // [58] SQUARED LATIN CAPITAL LETTER A..NEGATIVE CIRCLED LATIN CAPITAL LETTER Z {0x1F16A, 0x1F16C, prAL, gcSo}, // [3] RAISED MC SIGN..RAISED MR SIGN {0x1F16D, 0x1F16F, prID, gcSo}, // [3] CIRCLED CC..CIRCLED HUMAN FIGURE {0x1F170, 0x1F1AC, prAI, gcSo}, // [61] NEGATIVE SQUARED LATIN CAPITAL LETTER A..SQUARED VOD {0x1F1AD, 0x1F1AD, prID, gcSo}, // MASK WORK SYMBOL {0x1F1AE, 0x1F1E5, prID, gcCn}, // [56] .. {0x1F1E6, 0x1F1FF, prRI, gcSo}, // [26] REGIONAL INDICATOR SYMBOL LETTER A..REGIONAL INDICATOR SYMBOL LETTER Z {0x1F200, 0x1F202, prID, gcSo}, // [3] SQUARE HIRAGANA HOKA..SQUARED KATAKANA SA {0x1F203, 0x1F20F, prID, gcCn}, // [13] .. {0x1F210, 0x1F23B, prID, gcSo}, // [44] SQUARED CJK UNIFIED IDEOGRAPH-624B..SQUARED CJK UNIFIED IDEOGRAPH-914D {0x1F23C, 0x1F23F, prID, gcCn}, // [4] .. {0x1F240, 0x1F248, prID, gcSo}, // [9] TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-672C..TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRAPH-6557 {0x1F249, 0x1F24F, prID, gcCn}, // [7] .. {0x1F250, 0x1F251, prID, gcSo}, // [2] CIRCLED IDEOGRAPH ADVANTAGE..CIRCLED IDEOGRAPH ACCEPT {0x1F252, 0x1F25F, prID, gcCn}, // [14] .. {0x1F260, 0x1F265, prID, gcSo}, // [6] ROUNDED SYMBOL FOR FU..ROUNDED SYMBOL FOR CAI {0x1F266, 0x1F2FF, prID, gcCn}, // [154] .. {0x1F300, 0x1F384, prID, gcSo}, // [133] CYCLONE..CHRISTMAS TREE {0x1F385, 0x1F385, prEB, gcSo}, // FATHER CHRISTMAS {0x1F386, 0x1F39B, prID, gcSo}, // [22] FIREWORKS..CONTROL KNOBS {0x1F39C, 0x1F39D, prAL, gcSo}, // [2] BEAMED ASCENDING MUSICAL NOTES..BEAMED DESCENDING MUSICAL NOTES {0x1F39E, 0x1F3B4, prID, gcSo}, // [23] FILM FRAMES..FLOWER PLAYING CARDS {0x1F3B5, 0x1F3B6, prAL, gcSo}, // [2] MUSICAL NOTE..MULTIPLE MUSICAL NOTES {0x1F3B7, 0x1F3BB, prID, gcSo}, // [5] SAXOPHONE..VIOLIN {0x1F3BC, 0x1F3BC, prAL, gcSo}, // MUSICAL SCORE {0x1F3BD, 0x1F3C1, prID, gcSo}, // [5] RUNNING SHIRT WITH SASH..CHEQUERED FLAG {0x1F3C2, 0x1F3C4, prEB, gcSo}, // [3] SNOWBOARDER..SURFER {0x1F3C5, 0x1F3C6, prID, gcSo}, // [2] SPORTS MEDAL..TROPHY {0x1F3C7, 0x1F3C7, prEB, gcSo}, // HORSE RACING {0x1F3C8, 0x1F3C9, prID, gcSo}, // [2] AMERICAN FOOTBALL..RUGBY FOOTBALL {0x1F3CA, 0x1F3CC, prEB, gcSo}, // [3] SWIMMER..GOLFER {0x1F3CD, 0x1F3FA, prID, gcSo}, // [46] RACING MOTORCYCLE..AMPHORA {0x1F3FB, 0x1F3FF, prEM, gcSk}, // [5] EMOJI MODIFIER FITZPATRICK TYPE-1-2..EMOJI MODIFIER FITZPATRICK TYPE-6 {0x1F400, 0x1F441, prID, gcSo}, // [66] RAT..EYE {0x1F442, 0x1F443, prEB, gcSo}, // [2] EAR..NOSE {0x1F444, 0x1F445, prID, gcSo}, // [2] MOUTH..TONGUE {0x1F446, 0x1F450, prEB, gcSo}, // [11] WHITE UP POINTING BACKHAND INDEX..OPEN HANDS SIGN {0x1F451, 0x1F465, prID, gcSo}, // [21] CROWN..BUSTS IN SILHOUETTE {0x1F466, 0x1F478, prEB, gcSo}, // [19] BOY..PRINCESS {0x1F479, 0x1F47B, prID, gcSo}, // [3] JAPANESE OGRE..GHOST {0x1F47C, 0x1F47C, prEB, gcSo}, // BABY ANGEL {0x1F47D, 0x1F480, prID, gcSo}, // [4] EXTRATERRESTRIAL ALIEN..SKULL {0x1F481, 0x1F483, prEB, gcSo}, // [3] INFORMATION DESK PERSON..DANCER {0x1F484, 0x1F484, prID, gcSo}, // LIPSTICK {0x1F485, 0x1F487, prEB, gcSo}, // [3] NAIL POLISH..HAIRCUT {0x1F488, 0x1F48E, prID, gcSo}, // [7] BARBER POLE..GEM STONE {0x1F48F, 0x1F48F, prEB, gcSo}, // KISS {0x1F490, 0x1F490, prID, gcSo}, // BOUQUET {0x1F491, 0x1F491, prEB, gcSo}, // COUPLE WITH HEART {0x1F492, 0x1F49F, prID, gcSo}, // [14] WEDDING..HEART DECORATION {0x1F4A0, 0x1F4A0, prAL, gcSo}, // DIAMOND SHAPE WITH A DOT INSIDE {0x1F4A1, 0x1F4A1, prID, gcSo}, // ELECTRIC LIGHT BULB {0x1F4A2, 0x1F4A2, prAL, gcSo}, // ANGER SYMBOL {0x1F4A3, 0x1F4A3, prID, gcSo}, // BOMB {0x1F4A4, 0x1F4A4, prAL, gcSo}, // SLEEPING SYMBOL {0x1F4A5, 0x1F4A9, prID, gcSo}, // [5] COLLISION SYMBOL..PILE OF POO {0x1F4AA, 0x1F4AA, prEB, gcSo}, // FLEXED BICEPS {0x1F4AB, 0x1F4AE, prID, gcSo}, // [4] DIZZY SYMBOL..WHITE FLOWER {0x1F4AF, 0x1F4AF, prAL, gcSo}, // HUNDRED POINTS SYMBOL {0x1F4B0, 0x1F4B0, prID, gcSo}, // MONEY BAG {0x1F4B1, 0x1F4B2, prAL, gcSo}, // [2] CURRENCY EXCHANGE..HEAVY DOLLAR SIGN {0x1F4B3, 0x1F4FF, prID, gcSo}, // [77] CREDIT CARD..PRAYER BEADS {0x1F500, 0x1F506, prAL, gcSo}, // [7] TWISTED RIGHTWARDS ARROWS..HIGH BRIGHTNESS SYMBOL {0x1F507, 0x1F516, prID, gcSo}, // [16] SPEAKER WITH CANCELLATION STROKE..BOOKMARK {0x1F517, 0x1F524, prAL, gcSo}, // [14] LINK SYMBOL..INPUT SYMBOL FOR LATIN LETTERS {0x1F525, 0x1F531, prID, gcSo}, // [13] FIRE..TRIDENT EMBLEM {0x1F532, 0x1F549, prAL, gcSo}, // [24] BLACK SQUARE BUTTON..OM SYMBOL {0x1F54A, 0x1F573, prID, gcSo}, // [42] DOVE OF PEACE..HOLE {0x1F574, 0x1F575, prEB, gcSo}, // [2] MAN IN BUSINESS SUIT LEVITATING..SLEUTH OR SPY {0x1F576, 0x1F579, prID, gcSo}, // [4] DARK SUNGLASSES..JOYSTICK {0x1F57A, 0x1F57A, prEB, gcSo}, // MAN DANCING {0x1F57B, 0x1F58F, prID, gcSo}, // [21] LEFT HAND TELEPHONE RECEIVER..TURNED OK HAND SIGN {0x1F590, 0x1F590, prEB, gcSo}, // RAISED HAND WITH FINGERS SPLAYED {0x1F591, 0x1F594, prID, gcSo}, // [4] REVERSED RAISED HAND WITH FINGERS SPLAYED..REVERSED VICTORY HAND {0x1F595, 0x1F596, prEB, gcSo}, // [2] REVERSED HAND WITH MIDDLE FINGER EXTENDED..RAISED HAND WITH PART BETWEEN MIDDLE AND RING FINGERS {0x1F597, 0x1F5D3, prID, gcSo}, // [61] WHITE DOWN POINTING LEFT HAND INDEX..SPIRAL CALENDAR PAD {0x1F5D4, 0x1F5DB, prAL, gcSo}, // [8] DESKTOP WINDOW..DECREASE FONT SIZE SYMBOL {0x1F5DC, 0x1F5F3, prID, gcSo}, // [24] COMPRESSION..BALLOT BOX WITH BALLOT {0x1F5F4, 0x1F5F9, prAL, gcSo}, // [6] BALLOT SCRIPT X..BALLOT BOX WITH BOLD CHECK {0x1F5FA, 0x1F5FF, prID, gcSo}, // [6] WORLD MAP..MOYAI {0x1F600, 0x1F644, prID, gcSo}, // [69] GRINNING FACE..FACE WITH ROLLING EYES {0x1F645, 0x1F647, prEB, gcSo}, // [3] FACE WITH NO GOOD GESTURE..PERSON BOWING DEEPLY {0x1F648, 0x1F64A, prID, gcSo}, // [3] SEE-NO-EVIL MONKEY..SPEAK-NO-EVIL MONKEY {0x1F64B, 0x1F64F, prEB, gcSo}, // [5] HAPPY PERSON RAISING ONE HAND..PERSON WITH FOLDED HANDS {0x1F650, 0x1F675, prAL, gcSo}, // [38] NORTH WEST POINTING LEAF..SWASH AMPERSAND ORNAMENT {0x1F676, 0x1F678, prQU, gcSo}, // [3] SANS-SERIF HEAVY DOUBLE TURNED COMMA QUOTATION MARK ORNAMENT..SANS-SERIF HEAVY LOW DOUBLE COMMA QUOTATION MARK ORNAMENT {0x1F679, 0x1F67B, prNS, gcSo}, // [3] HEAVY INTERROBANG ORNAMENT..HEAVY SANS-SERIF INTERROBANG ORNAMENT {0x1F67C, 0x1F67F, prAL, gcSo}, // [4] VERY HEAVY SOLIDUS..REVERSE CHECKER BOARD {0x1F680, 0x1F6A2, prID, gcSo}, // [35] ROCKET..SHIP {0x1F6A3, 0x1F6A3, prEB, gcSo}, // ROWBOAT {0x1F6A4, 0x1F6B3, prID, gcSo}, // [16] SPEEDBOAT..NO BICYCLES {0x1F6B4, 0x1F6B6, prEB, gcSo}, // [3] BICYCLIST..PEDESTRIAN {0x1F6B7, 0x1F6BF, prID, gcSo}, // [9] NO PEDESTRIANS..SHOWER {0x1F6C0, 0x1F6C0, prEB, gcSo}, // BATH {0x1F6C1, 0x1F6CB, prID, gcSo}, // [11] BATHTUB..COUCH AND LAMP {0x1F6CC, 0x1F6CC, prEB, gcSo}, // SLEEPING ACCOMMODATION {0x1F6CD, 0x1F6D7, prID, gcSo}, // [11] SHOPPING BAGS..ELEVATOR {0x1F6D8, 0x1F6DB, prID, gcCn}, // [4] .. {0x1F6DC, 0x1F6EC, prID, gcSo}, // [17] WIRELESS..AIRPLANE ARRIVING {0x1F6ED, 0x1F6EF, prID, gcCn}, // [3] .. {0x1F6F0, 0x1F6FC, prID, gcSo}, // [13] SATELLITE..ROLLER SKATE {0x1F6FD, 0x1F6FF, prID, gcCn}, // [3] .. {0x1F700, 0x1F773, prAL, gcSo}, // [116] ALCHEMICAL SYMBOL FOR QUINTESSENCE..ALCHEMICAL SYMBOL FOR HALF OUNCE {0x1F774, 0x1F776, prID, gcSo}, // [3] LOT OF FORTUNE..LUNAR ECLIPSE {0x1F777, 0x1F77A, prID, gcCn}, // [4] .. {0x1F77B, 0x1F77F, prID, gcSo}, // [5] HAUMEA..ORCUS {0x1F780, 0x1F7D4, prAL, gcSo}, // [85] BLACK LEFT-POINTING ISOSCELES RIGHT TRIANGLE..HEAVY TWELVE POINTED PINWHEEL STAR {0x1F7D5, 0x1F7D9, prID, gcSo}, // [5] CIRCLED TRIANGLE..NINE POINTED WHITE STAR {0x1F7DA, 0x1F7DF, prID, gcCn}, // [6] .. {0x1F7E0, 0x1F7EB, prID, gcSo}, // [12] LARGE ORANGE CIRCLE..LARGE BROWN SQUARE {0x1F7EC, 0x1F7EF, prID, gcCn}, // [4] .. {0x1F7F0, 0x1F7F0, prID, gcSo}, // HEAVY EQUALS SIGN {0x1F7F1, 0x1F7FF, prID, gcCn}, // [15] .. {0x1F800, 0x1F80B, prAL, gcSo}, // [12] LEFTWARDS ARROW WITH SMALL TRIANGLE ARROWHEAD..DOWNWARDS ARROW WITH LARGE TRIANGLE ARROWHEAD {0x1F80C, 0x1F80F, prID, gcCn}, // [4] .. {0x1F810, 0x1F847, prAL, gcSo}, // [56] LEFTWARDS ARROW WITH SMALL EQUILATERAL ARROWHEAD..DOWNWARDS HEAVY ARROW {0x1F848, 0x1F84F, prID, gcCn}, // [8] .. {0x1F850, 0x1F859, prAL, gcSo}, // [10] LEFTWARDS SANS-SERIF ARROW..UP DOWN SANS-SERIF ARROW {0x1F85A, 0x1F85F, prID, gcCn}, // [6] .. {0x1F860, 0x1F887, prAL, gcSo}, // [40] WIDE-HEADED LEFTWARDS LIGHT BARB ARROW..WIDE-HEADED SOUTH WEST VERY HEAVY BARB ARROW {0x1F888, 0x1F88F, prID, gcCn}, // [8] .. {0x1F890, 0x1F8AD, prAL, gcSo}, // [30] LEFTWARDS TRIANGLE ARROWHEAD..WHITE ARROW SHAFT WIDTH TWO THIRDS {0x1F8AE, 0x1F8AF, prID, gcCn}, // [2] .. {0x1F8B0, 0x1F8B1, prID, gcSo}, // [2] ARROW POINTING UPWARDS THEN NORTH WEST..ARROW POINTING RIGHTWARDS THEN CURVING SOUTH WEST {0x1F8B2, 0x1F8FF, prID, gcCn}, // [78] .. {0x1F900, 0x1F90B, prAL, gcSo}, // [12] CIRCLED CROSS FORMEE WITH FOUR DOTS..DOWNWARD FACING NOTCHED HOOK WITH DOT {0x1F90C, 0x1F90C, prEB, gcSo}, // PINCHED FINGERS {0x1F90D, 0x1F90E, prID, gcSo}, // [2] WHITE HEART..BROWN HEART {0x1F90F, 0x1F90F, prEB, gcSo}, // PINCHING HAND {0x1F910, 0x1F917, prID, gcSo}, // [8] ZIPPER-MOUTH FACE..HUGGING FACE {0x1F918, 0x1F91F, prEB, gcSo}, // [8] SIGN OF THE HORNS..I LOVE YOU HAND SIGN {0x1F920, 0x1F925, prID, gcSo}, // [6] FACE WITH COWBOY HAT..LYING FACE {0x1F926, 0x1F926, prEB, gcSo}, // FACE PALM {0x1F927, 0x1F92F, prID, gcSo}, // [9] SNEEZING FACE..SHOCKED FACE WITH EXPLODING HEAD {0x1F930, 0x1F939, prEB, gcSo}, // [10] PREGNANT WOMAN..JUGGLING {0x1F93A, 0x1F93B, prID, gcSo}, // [2] FENCER..MODERN PENTATHLON {0x1F93C, 0x1F93E, prEB, gcSo}, // [3] WRESTLERS..HANDBALL {0x1F93F, 0x1F976, prID, gcSo}, // [56] DIVING MASK..FREEZING FACE {0x1F977, 0x1F977, prEB, gcSo}, // NINJA {0x1F978, 0x1F9B4, prID, gcSo}, // [61] DISGUISED FACE..BONE {0x1F9B5, 0x1F9B6, prEB, gcSo}, // [2] LEG..FOOT {0x1F9B7, 0x1F9B7, prID, gcSo}, // TOOTH {0x1F9B8, 0x1F9B9, prEB, gcSo}, // [2] SUPERHERO..SUPERVILLAIN {0x1F9BA, 0x1F9BA, prID, gcSo}, // SAFETY VEST {0x1F9BB, 0x1F9BB, prEB, gcSo}, // EAR WITH HEARING AID {0x1F9BC, 0x1F9CC, prID, gcSo}, // [17] MOTORIZED WHEELCHAIR..TROLL {0x1F9CD, 0x1F9CF, prEB, gcSo}, // [3] STANDING PERSON..DEAF PERSON {0x1F9D0, 0x1F9D0, prID, gcSo}, // FACE WITH MONOCLE {0x1F9D1, 0x1F9DD, prEB, gcSo}, // [13] ADULT..ELF {0x1F9DE, 0x1F9FF, prID, gcSo}, // [34] GENIE..NAZAR AMULET {0x1FA00, 0x1FA53, prAL, gcSo}, // [84] NEUTRAL CHESS KING..BLACK CHESS KNIGHT-BISHOP {0x1FA54, 0x1FA5F, prID, gcCn}, // [12] .. {0x1FA60, 0x1FA6D, prID, gcSo}, // [14] XIANGQI RED GENERAL..XIANGQI BLACK SOLDIER {0x1FA6E, 0x1FA6F, prID, gcCn}, // [2] .. {0x1FA70, 0x1FA7C, prID, gcSo}, // [13] BALLET SHOES..CRUTCH {0x1FA7D, 0x1FA7F, prID, gcCn}, // [3] .. {0x1FA80, 0x1FA88, prID, gcSo}, // [9] YO-YO..FLUTE {0x1FA89, 0x1FA8F, prID, gcCn}, // [7] .. {0x1FA90, 0x1FABD, prID, gcSo}, // [46] RINGED PLANET..WING {0x1FABE, 0x1FABE, prID, gcCn}, // {0x1FABF, 0x1FAC2, prID, gcSo}, // [4] GOOSE..PEOPLE HUGGING {0x1FAC3, 0x1FAC5, prEB, gcSo}, // [3] PREGNANT MAN..PERSON WITH CROWN {0x1FAC6, 0x1FACD, prID, gcCn}, // [8] .. {0x1FACE, 0x1FADB, prID, gcSo}, // [14] MOOSE..PEA POD {0x1FADC, 0x1FADF, prID, gcCn}, // [4] .. {0x1FAE0, 0x1FAE8, prID, gcSo}, // [9] MELTING FACE..SHAKING FACE {0x1FAE9, 0x1FAEF, prID, gcCn}, // [7] .. {0x1FAF0, 0x1FAF8, prEB, gcSo}, // [9] HAND WITH INDEX FINGER AND THUMB CROSSED..RIGHTWARDS PUSHING HAND {0x1FAF9, 0x1FAFF, prID, gcCn}, // [7] .. {0x1FB00, 0x1FB92, prAL, gcSo}, // [147] BLOCK SEXTANT-1..UPPER HALF INVERSE MEDIUM SHADE AND LOWER HALF BLOCK {0x1FB94, 0x1FBCA, prAL, gcSo}, // [55] LEFT HALF INVERSE MEDIUM SHADE AND RIGHT HALF BLOCK..WHITE UP-POINTING CHEVRON {0x1FBF0, 0x1FBF9, prNU, gcNd}, // [10] SEGMENTED DIGIT ZERO..SEGMENTED DIGIT NINE {0x1FC00, 0x1FFFD, prID, gcCn}, // [1022] .. {0x20000, 0x2A6DF, prID, gcLo}, // [42720] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6DF {0x2A6E0, 0x2A6FF, prID, gcCn}, // [32] .. {0x2A700, 0x2B739, prID, gcLo}, // [4154] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B739 {0x2B73A, 0x2B73F, prID, gcCn}, // [6] .. {0x2B740, 0x2B81D, prID, gcLo}, // [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D {0x2B81E, 0x2B81F, prID, gcCn}, // [2] .. {0x2B820, 0x2CEA1, prID, gcLo}, // [5762] CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1 {0x2CEA2, 0x2CEAF, prID, gcCn}, // [14] .. {0x2CEB0, 0x2EBE0, prID, gcLo}, // [7473] CJK UNIFIED IDEOGRAPH-2CEB0..CJK UNIFIED IDEOGRAPH-2EBE0 {0x2EBE1, 0x2F7FF, prID, gcCn}, // [3103] .. {0x2F800, 0x2FA1D, prID, gcLo}, // [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D {0x2FA1E, 0x2FA1F, prID, gcCn}, // [2] .. {0x2FA20, 0x2FFFD, prID, gcCn}, // [1502] .. {0x30000, 0x3134A, prID, gcLo}, // [4939] CJK UNIFIED IDEOGRAPH-30000..CJK UNIFIED IDEOGRAPH-3134A {0x3134B, 0x3134F, prID, gcCn}, // [5] .. {0x31350, 0x323AF, prID, gcLo}, // [4192] CJK UNIFIED IDEOGRAPH-31350..CJK UNIFIED IDEOGRAPH-323AF {0x323B0, 0x3FFFD, prID, gcCn}, // [56398] .. {0xE0001, 0xE0001, prCM, gcCf}, // LANGUAGE TAG {0xE0020, 0xE007F, prCM, gcCf}, // [96] TAG SPACE..CANCEL TAG {0xE0100, 0xE01EF, prCM, gcMn}, // [240] VARIATION SELECTOR-17..VARIATION SELECTOR-256 {0xF0000, 0xFFFFD, prXX, gcCo}, // [65534] .. {0x100000, 0x10FFFD, prXX, gcCo}, // [65534] .. } ================================================ FILE: vendor/github.com/rivo/uniseg/linerules.go ================================================ package uniseg import "unicode/utf8" // The states of the line break parser. const ( lbAny = iota lbBK lbCR lbLF lbNL lbSP lbZW lbWJ lbGL lbBA lbHY lbCL lbCP lbEX lbIS lbSY lbOP lbQU lbQUSP lbNS lbCLCPSP lbB2 lbB2SP lbCB lbBB lbLB21a lbHL lbAL lbNU lbPR lbEB lbIDEM lbNUNU lbNUSY lbNUIS lbNUCL lbNUCP lbPO lbJL lbJV lbJT lbH2 lbH3 lbOddRI lbEvenRI lbExtPicCn lbZWJBit = 64 lbCPeaFWHBit = 128 ) // These constants define whether a given text may be broken into the next line. // If the break is optional (LineCanBreak), you may choose to break or not based // on your own criteria, for example, if the text has reached the available // width. const ( LineDontBreak = iota // You may not break the line here. LineCanBreak // You may or may not break the line here. LineMustBreak // You must break the line here. ) // lbTransitions implements the line break parser's state transitions. It's // anologous to [grTransitions], see comments there for details. // // Unicode version 15.0.0. func lbTransitions(state, prop int) (newState, lineBreak, rule int) { switch uint64(state) | uint64(prop)<<32 { // LB4. case lbBK | prAny<<32: return lbAny, LineMustBreak, 40 // LB5. case lbCR | prLF<<32: return lbLF, LineDontBreak, 50 case lbCR | prAny<<32: return lbAny, LineMustBreak, 50 case lbLF | prAny<<32: return lbAny, LineMustBreak, 50 case lbNL | prAny<<32: return lbAny, LineMustBreak, 50 // LB6. case lbAny | prBK<<32: return lbBK, LineDontBreak, 60 case lbAny | prCR<<32: return lbCR, LineDontBreak, 60 case lbAny | prLF<<32: return lbLF, LineDontBreak, 60 case lbAny | prNL<<32: return lbNL, LineDontBreak, 60 // LB7. case lbAny | prSP<<32: return lbSP, LineDontBreak, 70 case lbAny | prZW<<32: return lbZW, LineDontBreak, 70 // LB8. case lbZW | prSP<<32: return lbZW, LineDontBreak, 70 case lbZW | prAny<<32: return lbAny, LineCanBreak, 80 // LB11. case lbAny | prWJ<<32: return lbWJ, LineDontBreak, 110 case lbWJ | prAny<<32: return lbAny, LineDontBreak, 110 // LB12. case lbAny | prGL<<32: return lbGL, LineCanBreak, 310 case lbGL | prAny<<32: return lbAny, LineDontBreak, 120 // LB13 (simple transitions). case lbAny | prCL<<32: return lbCL, LineCanBreak, 310 case lbAny | prCP<<32: return lbCP, LineCanBreak, 310 case lbAny | prEX<<32: return lbEX, LineDontBreak, 130 case lbAny | prIS<<32: return lbIS, LineCanBreak, 310 case lbAny | prSY<<32: return lbSY, LineCanBreak, 310 // LB14. case lbAny | prOP<<32: return lbOP, LineCanBreak, 310 case lbOP | prSP<<32: return lbOP, LineDontBreak, 70 case lbOP | prAny<<32: return lbAny, LineDontBreak, 140 // LB15. case lbQU | prSP<<32: return lbQUSP, LineDontBreak, 70 case lbQU | prOP<<32: return lbOP, LineDontBreak, 150 case lbQUSP | prOP<<32: return lbOP, LineDontBreak, 150 // LB16. case lbCL | prSP<<32: return lbCLCPSP, LineDontBreak, 70 case lbNUCL | prSP<<32: return lbCLCPSP, LineDontBreak, 70 case lbCP | prSP<<32: return lbCLCPSP, LineDontBreak, 70 case lbNUCP | prSP<<32: return lbCLCPSP, LineDontBreak, 70 case lbCL | prNS<<32: return lbNS, LineDontBreak, 160 case lbNUCL | prNS<<32: return lbNS, LineDontBreak, 160 case lbCP | prNS<<32: return lbNS, LineDontBreak, 160 case lbNUCP | prNS<<32: return lbNS, LineDontBreak, 160 case lbCLCPSP | prNS<<32: return lbNS, LineDontBreak, 160 // LB17. case lbAny | prB2<<32: return lbB2, LineCanBreak, 310 case lbB2 | prSP<<32: return lbB2SP, LineDontBreak, 70 case lbB2 | prB2<<32: return lbB2, LineDontBreak, 170 case lbB2SP | prB2<<32: return lbB2, LineDontBreak, 170 // LB18. case lbSP | prAny<<32: return lbAny, LineCanBreak, 180 case lbQUSP | prAny<<32: return lbAny, LineCanBreak, 180 case lbCLCPSP | prAny<<32: return lbAny, LineCanBreak, 180 case lbB2SP | prAny<<32: return lbAny, LineCanBreak, 180 // LB19. case lbAny | prQU<<32: return lbQU, LineDontBreak, 190 case lbQU | prAny<<32: return lbAny, LineDontBreak, 190 // LB20. case lbAny | prCB<<32: return lbCB, LineCanBreak, 200 case lbCB | prAny<<32: return lbAny, LineCanBreak, 200 // LB21. case lbAny | prBA<<32: return lbBA, LineDontBreak, 210 case lbAny | prHY<<32: return lbHY, LineDontBreak, 210 case lbAny | prNS<<32: return lbNS, LineDontBreak, 210 case lbAny | prBB<<32: return lbBB, LineCanBreak, 310 case lbBB | prAny<<32: return lbAny, LineDontBreak, 210 // LB21a. case lbAny | prHL<<32: return lbHL, LineCanBreak, 310 case lbHL | prHY<<32: return lbLB21a, LineDontBreak, 210 case lbHL | prBA<<32: return lbLB21a, LineDontBreak, 210 case lbLB21a | prAny<<32: return lbAny, LineDontBreak, 211 // LB21b. case lbSY | prHL<<32: return lbHL, LineDontBreak, 212 case lbNUSY | prHL<<32: return lbHL, LineDontBreak, 212 // LB22. case lbAny | prIN<<32: return lbAny, LineDontBreak, 220 // LB23. case lbAny | prAL<<32: return lbAL, LineCanBreak, 310 case lbAny | prNU<<32: return lbNU, LineCanBreak, 310 case lbAL | prNU<<32: return lbNU, LineDontBreak, 230 case lbHL | prNU<<32: return lbNU, LineDontBreak, 230 case lbNU | prAL<<32: return lbAL, LineDontBreak, 230 case lbNU | prHL<<32: return lbHL, LineDontBreak, 230 case lbNUNU | prAL<<32: return lbAL, LineDontBreak, 230 case lbNUNU | prHL<<32: return lbHL, LineDontBreak, 230 // LB23a. case lbAny | prPR<<32: return lbPR, LineCanBreak, 310 case lbAny | prID<<32: return lbIDEM, LineCanBreak, 310 case lbAny | prEB<<32: return lbEB, LineCanBreak, 310 case lbAny | prEM<<32: return lbIDEM, LineCanBreak, 310 case lbPR | prID<<32: return lbIDEM, LineDontBreak, 231 case lbPR | prEB<<32: return lbEB, LineDontBreak, 231 case lbPR | prEM<<32: return lbIDEM, LineDontBreak, 231 case lbIDEM | prPO<<32: return lbPO, LineDontBreak, 231 case lbEB | prPO<<32: return lbPO, LineDontBreak, 231 // LB24. case lbAny | prPO<<32: return lbPO, LineCanBreak, 310 case lbPR | prAL<<32: return lbAL, LineDontBreak, 240 case lbPR | prHL<<32: return lbHL, LineDontBreak, 240 case lbPO | prAL<<32: return lbAL, LineDontBreak, 240 case lbPO | prHL<<32: return lbHL, LineDontBreak, 240 case lbAL | prPR<<32: return lbPR, LineDontBreak, 240 case lbAL | prPO<<32: return lbPO, LineDontBreak, 240 case lbHL | prPR<<32: return lbPR, LineDontBreak, 240 case lbHL | prPO<<32: return lbPO, LineDontBreak, 240 // LB25 (simple transitions). case lbPR | prNU<<32: return lbNU, LineDontBreak, 250 case lbPO | prNU<<32: return lbNU, LineDontBreak, 250 case lbOP | prNU<<32: return lbNU, LineDontBreak, 250 case lbHY | prNU<<32: return lbNU, LineDontBreak, 250 case lbNU | prNU<<32: return lbNUNU, LineDontBreak, 250 case lbNU | prSY<<32: return lbNUSY, LineDontBreak, 250 case lbNU | prIS<<32: return lbNUIS, LineDontBreak, 250 case lbNUNU | prNU<<32: return lbNUNU, LineDontBreak, 250 case lbNUNU | prSY<<32: return lbNUSY, LineDontBreak, 250 case lbNUNU | prIS<<32: return lbNUIS, LineDontBreak, 250 case lbNUSY | prNU<<32: return lbNUNU, LineDontBreak, 250 case lbNUSY | prSY<<32: return lbNUSY, LineDontBreak, 250 case lbNUSY | prIS<<32: return lbNUIS, LineDontBreak, 250 case lbNUIS | prNU<<32: return lbNUNU, LineDontBreak, 250 case lbNUIS | prSY<<32: return lbNUSY, LineDontBreak, 250 case lbNUIS | prIS<<32: return lbNUIS, LineDontBreak, 250 case lbNU | prCL<<32: return lbNUCL, LineDontBreak, 250 case lbNU | prCP<<32: return lbNUCP, LineDontBreak, 250 case lbNUNU | prCL<<32: return lbNUCL, LineDontBreak, 250 case lbNUNU | prCP<<32: return lbNUCP, LineDontBreak, 250 case lbNUSY | prCL<<32: return lbNUCL, LineDontBreak, 250 case lbNUSY | prCP<<32: return lbNUCP, LineDontBreak, 250 case lbNUIS | prCL<<32: return lbNUCL, LineDontBreak, 250 case lbNUIS | prCP<<32: return lbNUCP, LineDontBreak, 250 case lbNU | prPO<<32: return lbPO, LineDontBreak, 250 case lbNUNU | prPO<<32: return lbPO, LineDontBreak, 250 case lbNUSY | prPO<<32: return lbPO, LineDontBreak, 250 case lbNUIS | prPO<<32: return lbPO, LineDontBreak, 250 case lbNUCL | prPO<<32: return lbPO, LineDontBreak, 250 case lbNUCP | prPO<<32: return lbPO, LineDontBreak, 250 case lbNU | prPR<<32: return lbPR, LineDontBreak, 250 case lbNUNU | prPR<<32: return lbPR, LineDontBreak, 250 case lbNUSY | prPR<<32: return lbPR, LineDontBreak, 250 case lbNUIS | prPR<<32: return lbPR, LineDontBreak, 250 case lbNUCL | prPR<<32: return lbPR, LineDontBreak, 250 case lbNUCP | prPR<<32: return lbPR, LineDontBreak, 250 // LB26. case lbAny | prJL<<32: return lbJL, LineCanBreak, 310 case lbAny | prJV<<32: return lbJV, LineCanBreak, 310 case lbAny | prJT<<32: return lbJT, LineCanBreak, 310 case lbAny | prH2<<32: return lbH2, LineCanBreak, 310 case lbAny | prH3<<32: return lbH3, LineCanBreak, 310 case lbJL | prJL<<32: return lbJL, LineDontBreak, 260 case lbJL | prJV<<32: return lbJV, LineDontBreak, 260 case lbJL | prH2<<32: return lbH2, LineDontBreak, 260 case lbJL | prH3<<32: return lbH3, LineDontBreak, 260 case lbJV | prJV<<32: return lbJV, LineDontBreak, 260 case lbJV | prJT<<32: return lbJT, LineDontBreak, 260 case lbH2 | prJV<<32: return lbJV, LineDontBreak, 260 case lbH2 | prJT<<32: return lbJT, LineDontBreak, 260 case lbJT | prJT<<32: return lbJT, LineDontBreak, 260 case lbH3 | prJT<<32: return lbJT, LineDontBreak, 260 // LB27. case lbJL | prPO<<32: return lbPO, LineDontBreak, 270 case lbJV | prPO<<32: return lbPO, LineDontBreak, 270 case lbJT | prPO<<32: return lbPO, LineDontBreak, 270 case lbH2 | prPO<<32: return lbPO, LineDontBreak, 270 case lbH3 | prPO<<32: return lbPO, LineDontBreak, 270 case lbPR | prJL<<32: return lbJL, LineDontBreak, 270 case lbPR | prJV<<32: return lbJV, LineDontBreak, 270 case lbPR | prJT<<32: return lbJT, LineDontBreak, 270 case lbPR | prH2<<32: return lbH2, LineDontBreak, 270 case lbPR | prH3<<32: return lbH3, LineDontBreak, 270 // LB28. case lbAL | prAL<<32: return lbAL, LineDontBreak, 280 case lbAL | prHL<<32: return lbHL, LineDontBreak, 280 case lbHL | prAL<<32: return lbAL, LineDontBreak, 280 case lbHL | prHL<<32: return lbHL, LineDontBreak, 280 // LB29. case lbIS | prAL<<32: return lbAL, LineDontBreak, 290 case lbIS | prHL<<32: return lbHL, LineDontBreak, 290 case lbNUIS | prAL<<32: return lbAL, LineDontBreak, 290 case lbNUIS | prHL<<32: return lbHL, LineDontBreak, 290 default: return -1, -1, -1 } } // transitionLineBreakState determines the new state of the line break parser // given the current state and the next code point. It also returns the type of // line break: LineDontBreak, LineCanBreak, or LineMustBreak. If more than one // code point is needed to determine the new state, the byte slice or the string // starting after rune "r" can be used (whichever is not nil or empty) for // further lookups. func transitionLineBreakState(state int, r rune, b []byte, str string) (newState int, lineBreak int) { // Determine the property of the next character. nextProperty, generalCategory := propertyLineBreak(r) // Prepare. var forceNoBreak, isCPeaFWH bool if state >= 0 && state&lbCPeaFWHBit != 0 { isCPeaFWH = true // LB30: CP but ea is not F, W, or H. state = state &^ lbCPeaFWHBit } if state >= 0 && state&lbZWJBit != 0 { state = state &^ lbZWJBit // Extract zero-width joiner bit. forceNoBreak = true // LB8a. } defer func() { // Transition into LB30. if newState == lbCP || newState == lbNUCP { ea := propertyEastAsianWidth(r) if ea != prF && ea != prW && ea != prH { newState |= lbCPeaFWHBit } } // Override break. if forceNoBreak { lineBreak = LineDontBreak } }() // LB1. if nextProperty == prAI || nextProperty == prSG || nextProperty == prXX { nextProperty = prAL } else if nextProperty == prSA { if generalCategory == gcMn || generalCategory == gcMc { nextProperty = prCM } else { nextProperty = prAL } } else if nextProperty == prCJ { nextProperty = prNS } // Combining marks. if nextProperty == prZWJ || nextProperty == prCM { var bit int if nextProperty == prZWJ { bit = lbZWJBit } mustBreakState := state < 0 || state == lbBK || state == lbCR || state == lbLF || state == lbNL if !mustBreakState && state != lbSP && state != lbZW && state != lbQUSP && state != lbCLCPSP && state != lbB2SP { // LB9. return state | bit, LineDontBreak } else { // LB10. if mustBreakState { return lbAL | bit, LineMustBreak } return lbAL | bit, LineCanBreak } } // Find the applicable transition in the table. var rule int newState, lineBreak, rule = lbTransitions(state, nextProperty) if newState < 0 { // No specific transition found. Try the less specific ones. anyPropProp, anyPropLineBreak, anyPropRule := lbTransitions(state, prAny) anyStateProp, anyStateLineBreak, anyStateRule := lbTransitions(lbAny, nextProperty) if anyPropProp >= 0 && anyStateProp >= 0 { // Both apply. We'll use a mix (see comments for grTransitions). newState, lineBreak, rule = anyStateProp, anyStateLineBreak, anyStateRule if anyPropRule < anyStateRule { lineBreak, rule = anyPropLineBreak, anyPropRule } } else if anyPropProp >= 0 { // We only have a specific state. newState, lineBreak, rule = anyPropProp, anyPropLineBreak, anyPropRule // This branch will probably never be reached because okAnyState will // always be true given the current transition map. But we keep it here // for future modifications to the transition map where this may not be // true anymore. } else if anyStateProp >= 0 { // We only have a specific property. newState, lineBreak, rule = anyStateProp, anyStateLineBreak, anyStateRule } else { // No known transition. LB31: ALL ÷ ALL. newState, lineBreak, rule = lbAny, LineCanBreak, 310 } } // LB12a. if rule > 121 && nextProperty == prGL && (state != lbSP && state != lbBA && state != lbHY && state != lbLB21a && state != lbQUSP && state != lbCLCPSP && state != lbB2SP) { return lbGL, LineDontBreak } // LB13. if rule > 130 && state != lbNU && state != lbNUNU { switch nextProperty { case prCL: return lbCL, LineDontBreak case prCP: return lbCP, LineDontBreak case prIS: return lbIS, LineDontBreak case prSY: return lbSY, LineDontBreak } } // LB25 (look ahead). if rule > 250 && (state == lbPR || state == lbPO) && nextProperty == prOP || nextProperty == prHY { var r rune if b != nil { // Byte slice version. r, _ = utf8.DecodeRune(b) } else { // String version. r, _ = utf8.DecodeRuneInString(str) } if r != utf8.RuneError { pr, _ := propertyLineBreak(r) if pr == prNU { return lbNU, LineDontBreak } } } // LB30 (part one). if rule > 300 { if (state == lbAL || state == lbHL || state == lbNU || state == lbNUNU) && nextProperty == prOP { ea := propertyEastAsianWidth(r) if ea != prF && ea != prW && ea != prH { return lbOP, LineDontBreak } } else if isCPeaFWH { switch nextProperty { case prAL: return lbAL, LineDontBreak case prHL: return lbHL, LineDontBreak case prNU: return lbNU, LineDontBreak } } } // LB30a. if newState == lbAny && nextProperty == prRI { if state != lbOddRI && state != lbEvenRI { // Includes state == -1. // Transition into the first RI. return lbOddRI, lineBreak } if state == lbOddRI { // Don't break pairs of Regional Indicators. return lbEvenRI, LineDontBreak } return lbOddRI, lineBreak } // LB30b. if rule > 302 { if nextProperty == prEM { if state == lbEB || state == lbExtPicCn { return prAny, LineDontBreak } } graphemeProperty := propertyGraphemes(r) if graphemeProperty == prExtendedPictographic && generalCategory == gcCn { return lbExtPicCn, LineCanBreak } } return } ================================================ FILE: vendor/github.com/rivo/uniseg/properties.go ================================================ package uniseg // The Unicode properties as used in the various parsers. Only the ones needed // in the context of this package are included. const ( prXX = 0 // Same as prAny. prAny = iota // prAny must be 0. prPrepend // Grapheme properties must come first, to reduce the number of bits stored in the state vector. prCR prLF prControl prExtend prRegionalIndicator prSpacingMark prL prV prT prLV prLVT prZWJ prExtendedPictographic prNewline prWSegSpace prDoubleQuote prSingleQuote prMidNumLet prNumeric prMidLetter prMidNum prExtendNumLet prALetter prFormat prHebrewLetter prKatakana prSp prSTerm prClose prSContinue prATerm prUpper prLower prSep prOLetter prCM prBA prBK prSP prEX prQU prAL prPR prPO prOP prCP prIS prHY prSY prNU prCL prNL prGL prAI prBB prHL prSA prJL prJV prJT prNS prZW prB2 prIN prWJ prID prEB prCJ prH2 prH3 prSG prCB prRI prEM prN prNa prA prW prH prF prEmojiPresentation ) // Unicode General Categories. Only the ones needed in the context of this // package are included. const ( gcNone = iota // gcNone must be 0. gcCc gcZs gcPo gcSc gcPs gcPe gcSm gcPd gcNd gcLu gcSk gcPc gcLl gcSo gcLo gcPi gcCf gcNo gcPf gcLC gcLm gcMn gcMe gcMc gcNl gcZl gcZp gcCn gcCs gcCo ) // Special code points. const ( vs15 = 0xfe0e // Variation Selector-15 (text presentation) vs16 = 0xfe0f // Variation Selector-16 (emoji presentation) ) // propertySearch performs a binary search on a property slice and returns the // entry whose range (start = first array element, end = second array element) // includes r, or an array of 0's if no such entry was found. func propertySearch[E interface{ [3]int | [4]int }](dictionary []E, r rune) (result E) { // Run a binary search. from := 0 to := len(dictionary) for to > from { middle := (from + to) / 2 cpRange := dictionary[middle] if int(r) < cpRange[0] { to = middle continue } if int(r) > cpRange[1] { from = middle + 1 continue } return cpRange } return } // property returns the Unicode property value (see constants above) of the // given code point. func property(dictionary [][3]int, r rune) int { return propertySearch(dictionary, r)[2] } // propertyLineBreak returns the Unicode property value and General Category // (see constants above) of the given code point, as listed in the line break // code points table, while fast tracking ASCII digits and letters. func propertyLineBreak(r rune) (property, generalCategory int) { if r >= 'a' && r <= 'z' { return prAL, gcLl } if r >= 'A' && r <= 'Z' { return prAL, gcLu } if r >= '0' && r <= '9' { return prNU, gcNd } entry := propertySearch(lineBreakCodePoints, r) return entry[2], entry[3] } // propertyGraphemes returns the Unicode grapheme cluster property value of the // given code point while fast tracking ASCII characters. func propertyGraphemes(r rune) int { if r >= 0x20 && r <= 0x7e { return prAny } if r == 0x0a { return prLF } if r == 0x0d { return prCR } if r >= 0 && r <= 0x1f || r == 0x7f { return prControl } return property(graphemeCodePoints, r) } // propertyEastAsianWidth returns the Unicode East Asian Width property value of // the given code point while fast tracking ASCII characters. func propertyEastAsianWidth(r rune) int { if r >= 0x20 && r <= 0x7e { return prNa } if r >= 0 && r <= 0x1f || r == 0x7f { return prN } return property(eastAsianWidth, r) } ================================================ FILE: vendor/github.com/rivo/uniseg/sentence.go ================================================ package uniseg import "unicode/utf8" // FirstSentence returns the first sentence found in the given byte slice // according to the rules of [Unicode Standard Annex #29, Sentence Boundaries]. // This function can be called continuously to extract all sentences from a byte // slice, as illustrated in the example below. // // If you don't know the current state, for example when calling the function // for the first time, you must pass -1. For consecutive calls, pass the state // and rest slice returned by the previous call. // // The "rest" slice is the sub-slice of the original byte slice "b" starting // after the last byte of the identified sentence. If the length of the "rest" // slice is 0, the entire byte slice "b" has been processed. The "sentence" byte // slice is the sub-slice of the input slice containing the identified sentence. // // Given an empty byte slice "b", the function returns nil values. // // [Unicode Standard Annex #29, Sentence Boundaries]: http://unicode.org/reports/tr29/#Sentence_Boundaries func FirstSentence(b []byte, state int) (sentence, rest []byte, newState int) { // An empty byte slice returns nothing. if len(b) == 0 { return } // Extract the first rune. r, length := utf8.DecodeRune(b) if len(b) <= length { // If we're already past the end, there is nothing else to parse. return b, nil, sbAny } // If we don't know the state, determine it now. if state < 0 { state, _ = transitionSentenceBreakState(state, r, b[length:], "") } // Transition until we find a boundary. var boundary bool for { r, l := utf8.DecodeRune(b[length:]) state, boundary = transitionSentenceBreakState(state, r, b[length+l:], "") if boundary { return b[:length], b[length:], state } length += l if len(b) <= length { return b, nil, sbAny } } } // FirstSentenceInString is like [FirstSentence] but its input and outputs are // strings. func FirstSentenceInString(str string, state int) (sentence, rest string, newState int) { // An empty byte slice returns nothing. if len(str) == 0 { return } // Extract the first rune. r, length := utf8.DecodeRuneInString(str) if len(str) <= length { // If we're already past the end, there is nothing else to parse. return str, "", sbAny } // If we don't know the state, determine it now. if state < 0 { state, _ = transitionSentenceBreakState(state, r, nil, str[length:]) } // Transition until we find a boundary. var boundary bool for { r, l := utf8.DecodeRuneInString(str[length:]) state, boundary = transitionSentenceBreakState(state, r, nil, str[length+l:]) if boundary { return str[:length], str[length:], state } length += l if len(str) <= length { return str, "", sbAny } } } ================================================ FILE: vendor/github.com/rivo/uniseg/sentenceproperties.go ================================================ // Code generated via go generate from gen_properties.go. DO NOT EDIT. package uniseg // sentenceBreakCodePoints are taken from // https://www.unicode.org/Public/15.0.0/ucd/auxiliary/SentenceBreakProperty.txt // and // https://unicode.org/Public/15.0.0/ucd/emoji/emoji-data.txt // ("Extended_Pictographic" only) // on September 5, 2023. See https://www.unicode.org/license.html for the Unicode // license agreement. var sentenceBreakCodePoints = [][3]int{ {0x0009, 0x0009, prSp}, // Cc {0x000A, 0x000A, prLF}, // Cc {0x000B, 0x000C, prSp}, // Cc [2] .. {0x000D, 0x000D, prCR}, // Cc {0x0020, 0x0020, prSp}, // Zs SPACE {0x0021, 0x0021, prSTerm}, // Po EXCLAMATION MARK {0x0022, 0x0022, prClose}, // Po QUOTATION MARK {0x0027, 0x0027, prClose}, // Po APOSTROPHE {0x0028, 0x0028, prClose}, // Ps LEFT PARENTHESIS {0x0029, 0x0029, prClose}, // Pe RIGHT PARENTHESIS {0x002C, 0x002C, prSContinue}, // Po COMMA {0x002D, 0x002D, prSContinue}, // Pd HYPHEN-MINUS {0x002E, 0x002E, prATerm}, // Po FULL STOP {0x0030, 0x0039, prNumeric}, // Nd [10] DIGIT ZERO..DIGIT NINE {0x003A, 0x003A, prSContinue}, // Po COLON {0x003F, 0x003F, prSTerm}, // Po QUESTION MARK {0x0041, 0x005A, prUpper}, // L& [26] LATIN CAPITAL LETTER A..LATIN CAPITAL LETTER Z {0x005B, 0x005B, prClose}, // Ps LEFT SQUARE BRACKET {0x005D, 0x005D, prClose}, // Pe RIGHT SQUARE BRACKET {0x0061, 0x007A, prLower}, // L& [26] LATIN SMALL LETTER A..LATIN SMALL LETTER Z {0x007B, 0x007B, prClose}, // Ps LEFT CURLY BRACKET {0x007D, 0x007D, prClose}, // Pe RIGHT CURLY BRACKET {0x0085, 0x0085, prSep}, // Cc {0x00A0, 0x00A0, prSp}, // Zs NO-BREAK SPACE {0x00AA, 0x00AA, prLower}, // Lo FEMININE ORDINAL INDICATOR {0x00AB, 0x00AB, prClose}, // Pi LEFT-POINTING DOUBLE ANGLE QUOTATION MARK {0x00AD, 0x00AD, prFormat}, // Cf SOFT HYPHEN {0x00B5, 0x00B5, prLower}, // L& MICRO SIGN {0x00BA, 0x00BA, prLower}, // Lo MASCULINE ORDINAL INDICATOR {0x00BB, 0x00BB, prClose}, // Pf RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK {0x00C0, 0x00D6, prUpper}, // L& [23] LATIN CAPITAL LETTER A WITH GRAVE..LATIN CAPITAL LETTER O WITH DIAERESIS {0x00D8, 0x00DE, prUpper}, // L& [7] LATIN CAPITAL LETTER O WITH STROKE..LATIN CAPITAL LETTER THORN {0x00DF, 0x00F6, prLower}, // L& [24] LATIN SMALL LETTER SHARP S..LATIN SMALL LETTER O WITH DIAERESIS {0x00F8, 0x00FF, prLower}, // L& [8] LATIN SMALL LETTER O WITH STROKE..LATIN SMALL LETTER Y WITH DIAERESIS {0x0100, 0x0100, prUpper}, // L& LATIN CAPITAL LETTER A WITH MACRON {0x0101, 0x0101, prLower}, // L& LATIN SMALL LETTER A WITH MACRON {0x0102, 0x0102, prUpper}, // L& LATIN CAPITAL LETTER A WITH BREVE {0x0103, 0x0103, prLower}, // L& LATIN SMALL LETTER A WITH BREVE {0x0104, 0x0104, prUpper}, // L& LATIN CAPITAL LETTER A WITH OGONEK {0x0105, 0x0105, prLower}, // L& LATIN SMALL LETTER A WITH OGONEK {0x0106, 0x0106, prUpper}, // L& LATIN CAPITAL LETTER C WITH ACUTE {0x0107, 0x0107, prLower}, // L& LATIN SMALL LETTER C WITH ACUTE {0x0108, 0x0108, prUpper}, // L& LATIN CAPITAL LETTER C WITH CIRCUMFLEX {0x0109, 0x0109, prLower}, // L& LATIN SMALL LETTER C WITH CIRCUMFLEX {0x010A, 0x010A, prUpper}, // L& LATIN CAPITAL LETTER C WITH DOT ABOVE {0x010B, 0x010B, prLower}, // L& LATIN SMALL LETTER C WITH DOT ABOVE {0x010C, 0x010C, prUpper}, // L& LATIN CAPITAL LETTER C WITH CARON {0x010D, 0x010D, prLower}, // L& LATIN SMALL LETTER C WITH CARON {0x010E, 0x010E, prUpper}, // L& LATIN CAPITAL LETTER D WITH CARON {0x010F, 0x010F, prLower}, // L& LATIN SMALL LETTER D WITH CARON {0x0110, 0x0110, prUpper}, // L& LATIN CAPITAL LETTER D WITH STROKE {0x0111, 0x0111, prLower}, // L& LATIN SMALL LETTER D WITH STROKE {0x0112, 0x0112, prUpper}, // L& LATIN CAPITAL LETTER E WITH MACRON {0x0113, 0x0113, prLower}, // L& LATIN SMALL LETTER E WITH MACRON {0x0114, 0x0114, prUpper}, // L& LATIN CAPITAL LETTER E WITH BREVE {0x0115, 0x0115, prLower}, // L& LATIN SMALL LETTER E WITH BREVE {0x0116, 0x0116, prUpper}, // L& LATIN CAPITAL LETTER E WITH DOT ABOVE {0x0117, 0x0117, prLower}, // L& LATIN SMALL LETTER E WITH DOT ABOVE {0x0118, 0x0118, prUpper}, // L& LATIN CAPITAL LETTER E WITH OGONEK {0x0119, 0x0119, prLower}, // L& LATIN SMALL LETTER E WITH OGONEK {0x011A, 0x011A, prUpper}, // L& LATIN CAPITAL LETTER E WITH CARON {0x011B, 0x011B, prLower}, // L& LATIN SMALL LETTER E WITH CARON {0x011C, 0x011C, prUpper}, // L& LATIN CAPITAL LETTER G WITH CIRCUMFLEX {0x011D, 0x011D, prLower}, // L& LATIN SMALL LETTER G WITH CIRCUMFLEX {0x011E, 0x011E, prUpper}, // L& LATIN CAPITAL LETTER G WITH BREVE {0x011F, 0x011F, prLower}, // L& LATIN SMALL LETTER G WITH BREVE {0x0120, 0x0120, prUpper}, // L& LATIN CAPITAL LETTER G WITH DOT ABOVE {0x0121, 0x0121, prLower}, // L& LATIN SMALL LETTER G WITH DOT ABOVE {0x0122, 0x0122, prUpper}, // L& LATIN CAPITAL LETTER G WITH CEDILLA {0x0123, 0x0123, prLower}, // L& LATIN SMALL LETTER G WITH CEDILLA {0x0124, 0x0124, prUpper}, // L& LATIN CAPITAL LETTER H WITH CIRCUMFLEX {0x0125, 0x0125, prLower}, // L& LATIN SMALL LETTER H WITH CIRCUMFLEX {0x0126, 0x0126, prUpper}, // L& LATIN CAPITAL LETTER H WITH STROKE {0x0127, 0x0127, prLower}, // L& LATIN SMALL LETTER H WITH STROKE {0x0128, 0x0128, prUpper}, // L& LATIN CAPITAL LETTER I WITH TILDE {0x0129, 0x0129, prLower}, // L& LATIN SMALL LETTER I WITH TILDE {0x012A, 0x012A, prUpper}, // L& LATIN CAPITAL LETTER I WITH MACRON {0x012B, 0x012B, prLower}, // L& LATIN SMALL LETTER I WITH MACRON {0x012C, 0x012C, prUpper}, // L& LATIN CAPITAL LETTER I WITH BREVE {0x012D, 0x012D, prLower}, // L& LATIN SMALL LETTER I WITH BREVE {0x012E, 0x012E, prUpper}, // L& LATIN CAPITAL LETTER I WITH OGONEK {0x012F, 0x012F, prLower}, // L& LATIN SMALL LETTER I WITH OGONEK {0x0130, 0x0130, prUpper}, // L& LATIN CAPITAL LETTER I WITH DOT ABOVE {0x0131, 0x0131, prLower}, // L& LATIN SMALL LETTER DOTLESS I {0x0132, 0x0132, prUpper}, // L& LATIN CAPITAL LIGATURE IJ {0x0133, 0x0133, prLower}, // L& LATIN SMALL LIGATURE IJ {0x0134, 0x0134, prUpper}, // L& LATIN CAPITAL LETTER J WITH CIRCUMFLEX {0x0135, 0x0135, prLower}, // L& LATIN SMALL LETTER J WITH CIRCUMFLEX {0x0136, 0x0136, prUpper}, // L& LATIN CAPITAL LETTER K WITH CEDILLA {0x0137, 0x0138, prLower}, // L& [2] LATIN SMALL LETTER K WITH CEDILLA..LATIN SMALL LETTER KRA {0x0139, 0x0139, prUpper}, // L& LATIN CAPITAL LETTER L WITH ACUTE {0x013A, 0x013A, prLower}, // L& LATIN SMALL LETTER L WITH ACUTE {0x013B, 0x013B, prUpper}, // L& LATIN CAPITAL LETTER L WITH CEDILLA {0x013C, 0x013C, prLower}, // L& LATIN SMALL LETTER L WITH CEDILLA {0x013D, 0x013D, prUpper}, // L& LATIN CAPITAL LETTER L WITH CARON {0x013E, 0x013E, prLower}, // L& LATIN SMALL LETTER L WITH CARON {0x013F, 0x013F, prUpper}, // L& LATIN CAPITAL LETTER L WITH MIDDLE DOT {0x0140, 0x0140, prLower}, // L& LATIN SMALL LETTER L WITH MIDDLE DOT {0x0141, 0x0141, prUpper}, // L& LATIN CAPITAL LETTER L WITH STROKE {0x0142, 0x0142, prLower}, // L& LATIN SMALL LETTER L WITH STROKE {0x0143, 0x0143, prUpper}, // L& LATIN CAPITAL LETTER N WITH ACUTE {0x0144, 0x0144, prLower}, // L& LATIN SMALL LETTER N WITH ACUTE {0x0145, 0x0145, prUpper}, // L& LATIN CAPITAL LETTER N WITH CEDILLA {0x0146, 0x0146, prLower}, // L& LATIN SMALL LETTER N WITH CEDILLA {0x0147, 0x0147, prUpper}, // L& LATIN CAPITAL LETTER N WITH CARON {0x0148, 0x0149, prLower}, // L& [2] LATIN SMALL LETTER N WITH CARON..LATIN SMALL LETTER N PRECEDED BY APOSTROPHE {0x014A, 0x014A, prUpper}, // L& LATIN CAPITAL LETTER ENG {0x014B, 0x014B, prLower}, // L& LATIN SMALL LETTER ENG {0x014C, 0x014C, prUpper}, // L& LATIN CAPITAL LETTER O WITH MACRON {0x014D, 0x014D, prLower}, // L& LATIN SMALL LETTER O WITH MACRON {0x014E, 0x014E, prUpper}, // L& LATIN CAPITAL LETTER O WITH BREVE {0x014F, 0x014F, prLower}, // L& LATIN SMALL LETTER O WITH BREVE {0x0150, 0x0150, prUpper}, // L& LATIN CAPITAL LETTER O WITH DOUBLE ACUTE {0x0151, 0x0151, prLower}, // L& LATIN SMALL LETTER O WITH DOUBLE ACUTE {0x0152, 0x0152, prUpper}, // L& LATIN CAPITAL LIGATURE OE {0x0153, 0x0153, prLower}, // L& LATIN SMALL LIGATURE OE {0x0154, 0x0154, prUpper}, // L& LATIN CAPITAL LETTER R WITH ACUTE {0x0155, 0x0155, prLower}, // L& LATIN SMALL LETTER R WITH ACUTE {0x0156, 0x0156, prUpper}, // L& LATIN CAPITAL LETTER R WITH CEDILLA {0x0157, 0x0157, prLower}, // L& LATIN SMALL LETTER R WITH CEDILLA {0x0158, 0x0158, prUpper}, // L& LATIN CAPITAL LETTER R WITH CARON {0x0159, 0x0159, prLower}, // L& LATIN SMALL LETTER R WITH CARON {0x015A, 0x015A, prUpper}, // L& LATIN CAPITAL LETTER S WITH ACUTE {0x015B, 0x015B, prLower}, // L& LATIN SMALL LETTER S WITH ACUTE {0x015C, 0x015C, prUpper}, // L& LATIN CAPITAL LETTER S WITH CIRCUMFLEX {0x015D, 0x015D, prLower}, // L& LATIN SMALL LETTER S WITH CIRCUMFLEX {0x015E, 0x015E, prUpper}, // L& LATIN CAPITAL LETTER S WITH CEDILLA {0x015F, 0x015F, prLower}, // L& LATIN SMALL LETTER S WITH CEDILLA {0x0160, 0x0160, prUpper}, // L& LATIN CAPITAL LETTER S WITH CARON {0x0161, 0x0161, prLower}, // L& LATIN SMALL LETTER S WITH CARON {0x0162, 0x0162, prUpper}, // L& LATIN CAPITAL LETTER T WITH CEDILLA {0x0163, 0x0163, prLower}, // L& LATIN SMALL LETTER T WITH CEDILLA {0x0164, 0x0164, prUpper}, // L& LATIN CAPITAL LETTER T WITH CARON {0x0165, 0x0165, prLower}, // L& LATIN SMALL LETTER T WITH CARON {0x0166, 0x0166, prUpper}, // L& LATIN CAPITAL LETTER T WITH STROKE {0x0167, 0x0167, prLower}, // L& LATIN SMALL LETTER T WITH STROKE {0x0168, 0x0168, prUpper}, // L& LATIN CAPITAL LETTER U WITH TILDE {0x0169, 0x0169, prLower}, // L& LATIN SMALL LETTER U WITH TILDE {0x016A, 0x016A, prUpper}, // L& LATIN CAPITAL LETTER U WITH MACRON {0x016B, 0x016B, prLower}, // L& LATIN SMALL LETTER U WITH MACRON {0x016C, 0x016C, prUpper}, // L& LATIN CAPITAL LETTER U WITH BREVE {0x016D, 0x016D, prLower}, // L& LATIN SMALL LETTER U WITH BREVE {0x016E, 0x016E, prUpper}, // L& LATIN CAPITAL LETTER U WITH RING ABOVE {0x016F, 0x016F, prLower}, // L& LATIN SMALL LETTER U WITH RING ABOVE {0x0170, 0x0170, prUpper}, // L& LATIN CAPITAL LETTER U WITH DOUBLE ACUTE {0x0171, 0x0171, prLower}, // L& LATIN SMALL LETTER U WITH DOUBLE ACUTE {0x0172, 0x0172, prUpper}, // L& LATIN CAPITAL LETTER U WITH OGONEK {0x0173, 0x0173, prLower}, // L& LATIN SMALL LETTER U WITH OGONEK {0x0174, 0x0174, prUpper}, // L& LATIN CAPITAL LETTER W WITH CIRCUMFLEX {0x0175, 0x0175, prLower}, // L& LATIN SMALL LETTER W WITH CIRCUMFLEX {0x0176, 0x0176, prUpper}, // L& LATIN CAPITAL LETTER Y WITH CIRCUMFLEX {0x0177, 0x0177, prLower}, // L& LATIN SMALL LETTER Y WITH CIRCUMFLEX {0x0178, 0x0179, prUpper}, // L& [2] LATIN CAPITAL LETTER Y WITH DIAERESIS..LATIN CAPITAL LETTER Z WITH ACUTE {0x017A, 0x017A, prLower}, // L& LATIN SMALL LETTER Z WITH ACUTE {0x017B, 0x017B, prUpper}, // L& LATIN CAPITAL LETTER Z WITH DOT ABOVE {0x017C, 0x017C, prLower}, // L& LATIN SMALL LETTER Z WITH DOT ABOVE {0x017D, 0x017D, prUpper}, // L& LATIN CAPITAL LETTER Z WITH CARON {0x017E, 0x0180, prLower}, // L& [3] LATIN SMALL LETTER Z WITH CARON..LATIN SMALL LETTER B WITH STROKE {0x0181, 0x0182, prUpper}, // L& [2] LATIN CAPITAL LETTER B WITH HOOK..LATIN CAPITAL LETTER B WITH TOPBAR {0x0183, 0x0183, prLower}, // L& LATIN SMALL LETTER B WITH TOPBAR {0x0184, 0x0184, prUpper}, // L& LATIN CAPITAL LETTER TONE SIX {0x0185, 0x0185, prLower}, // L& LATIN SMALL LETTER TONE SIX {0x0186, 0x0187, prUpper}, // L& [2] LATIN CAPITAL LETTER OPEN O..LATIN CAPITAL LETTER C WITH HOOK {0x0188, 0x0188, prLower}, // L& LATIN SMALL LETTER C WITH HOOK {0x0189, 0x018B, prUpper}, // L& [3] LATIN CAPITAL LETTER AFRICAN D..LATIN CAPITAL LETTER D WITH TOPBAR {0x018C, 0x018D, prLower}, // L& [2] LATIN SMALL LETTER D WITH TOPBAR..LATIN SMALL LETTER TURNED DELTA {0x018E, 0x0191, prUpper}, // L& [4] LATIN CAPITAL LETTER REVERSED E..LATIN CAPITAL LETTER F WITH HOOK {0x0192, 0x0192, prLower}, // L& LATIN SMALL LETTER F WITH HOOK {0x0193, 0x0194, prUpper}, // L& [2] LATIN CAPITAL LETTER G WITH HOOK..LATIN CAPITAL LETTER GAMMA {0x0195, 0x0195, prLower}, // L& LATIN SMALL LETTER HV {0x0196, 0x0198, prUpper}, // L& [3] LATIN CAPITAL LETTER IOTA..LATIN CAPITAL LETTER K WITH HOOK {0x0199, 0x019B, prLower}, // L& [3] LATIN SMALL LETTER K WITH HOOK..LATIN SMALL LETTER LAMBDA WITH STROKE {0x019C, 0x019D, prUpper}, // L& [2] LATIN CAPITAL LETTER TURNED M..LATIN CAPITAL LETTER N WITH LEFT HOOK {0x019E, 0x019E, prLower}, // L& LATIN SMALL LETTER N WITH LONG RIGHT LEG {0x019F, 0x01A0, prUpper}, // L& [2] LATIN CAPITAL LETTER O WITH MIDDLE TILDE..LATIN CAPITAL LETTER O WITH HORN {0x01A1, 0x01A1, prLower}, // L& LATIN SMALL LETTER O WITH HORN {0x01A2, 0x01A2, prUpper}, // L& LATIN CAPITAL LETTER OI {0x01A3, 0x01A3, prLower}, // L& LATIN SMALL LETTER OI {0x01A4, 0x01A4, prUpper}, // L& LATIN CAPITAL LETTER P WITH HOOK {0x01A5, 0x01A5, prLower}, // L& LATIN SMALL LETTER P WITH HOOK {0x01A6, 0x01A7, prUpper}, // L& [2] LATIN LETTER YR..LATIN CAPITAL LETTER TONE TWO {0x01A8, 0x01A8, prLower}, // L& LATIN SMALL LETTER TONE TWO {0x01A9, 0x01A9, prUpper}, // L& LATIN CAPITAL LETTER ESH {0x01AA, 0x01AB, prLower}, // L& [2] LATIN LETTER REVERSED ESH LOOP..LATIN SMALL LETTER T WITH PALATAL HOOK {0x01AC, 0x01AC, prUpper}, // L& LATIN CAPITAL LETTER T WITH HOOK {0x01AD, 0x01AD, prLower}, // L& LATIN SMALL LETTER T WITH HOOK {0x01AE, 0x01AF, prUpper}, // L& [2] LATIN CAPITAL LETTER T WITH RETROFLEX HOOK..LATIN CAPITAL LETTER U WITH HORN {0x01B0, 0x01B0, prLower}, // L& LATIN SMALL LETTER U WITH HORN {0x01B1, 0x01B3, prUpper}, // L& [3] LATIN CAPITAL LETTER UPSILON..LATIN CAPITAL LETTER Y WITH HOOK {0x01B4, 0x01B4, prLower}, // L& LATIN SMALL LETTER Y WITH HOOK {0x01B5, 0x01B5, prUpper}, // L& LATIN CAPITAL LETTER Z WITH STROKE {0x01B6, 0x01B6, prLower}, // L& LATIN SMALL LETTER Z WITH STROKE {0x01B7, 0x01B8, prUpper}, // L& [2] LATIN CAPITAL LETTER EZH..LATIN CAPITAL LETTER EZH REVERSED {0x01B9, 0x01BA, prLower}, // L& [2] LATIN SMALL LETTER EZH REVERSED..LATIN SMALL LETTER EZH WITH TAIL {0x01BB, 0x01BB, prOLetter}, // Lo LATIN LETTER TWO WITH STROKE {0x01BC, 0x01BC, prUpper}, // L& LATIN CAPITAL LETTER TONE FIVE {0x01BD, 0x01BF, prLower}, // L& [3] LATIN SMALL LETTER TONE FIVE..LATIN LETTER WYNN {0x01C0, 0x01C3, prOLetter}, // Lo [4] LATIN LETTER DENTAL CLICK..LATIN LETTER RETROFLEX CLICK {0x01C4, 0x01C5, prUpper}, // L& [2] LATIN CAPITAL LETTER DZ WITH CARON..LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON {0x01C6, 0x01C6, prLower}, // L& LATIN SMALL LETTER DZ WITH CARON {0x01C7, 0x01C8, prUpper}, // L& [2] LATIN CAPITAL LETTER LJ..LATIN CAPITAL LETTER L WITH SMALL LETTER J {0x01C9, 0x01C9, prLower}, // L& LATIN SMALL LETTER LJ {0x01CA, 0x01CB, prUpper}, // L& [2] LATIN CAPITAL LETTER NJ..LATIN CAPITAL LETTER N WITH SMALL LETTER J {0x01CC, 0x01CC, prLower}, // L& LATIN SMALL LETTER NJ {0x01CD, 0x01CD, prUpper}, // L& LATIN CAPITAL LETTER A WITH CARON {0x01CE, 0x01CE, prLower}, // L& LATIN SMALL LETTER A WITH CARON {0x01CF, 0x01CF, prUpper}, // L& LATIN CAPITAL LETTER I WITH CARON {0x01D0, 0x01D0, prLower}, // L& LATIN SMALL LETTER I WITH CARON {0x01D1, 0x01D1, prUpper}, // L& LATIN CAPITAL LETTER O WITH CARON {0x01D2, 0x01D2, prLower}, // L& LATIN SMALL LETTER O WITH CARON {0x01D3, 0x01D3, prUpper}, // L& LATIN CAPITAL LETTER U WITH CARON {0x01D4, 0x01D4, prLower}, // L& LATIN SMALL LETTER U WITH CARON {0x01D5, 0x01D5, prUpper}, // L& LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON {0x01D6, 0x01D6, prLower}, // L& LATIN SMALL LETTER U WITH DIAERESIS AND MACRON {0x01D7, 0x01D7, prUpper}, // L& LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE {0x01D8, 0x01D8, prLower}, // L& LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE {0x01D9, 0x01D9, prUpper}, // L& LATIN CAPITAL LETTER U WITH DIAERESIS AND CARON {0x01DA, 0x01DA, prLower}, // L& LATIN SMALL LETTER U WITH DIAERESIS AND CARON {0x01DB, 0x01DB, prUpper}, // L& LATIN CAPITAL LETTER U WITH DIAERESIS AND GRAVE {0x01DC, 0x01DD, prLower}, // L& [2] LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE..LATIN SMALL LETTER TURNED E {0x01DE, 0x01DE, prUpper}, // L& LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON {0x01DF, 0x01DF, prLower}, // L& LATIN SMALL LETTER A WITH DIAERESIS AND MACRON {0x01E0, 0x01E0, prUpper}, // L& LATIN CAPITAL LETTER A WITH DOT ABOVE AND MACRON {0x01E1, 0x01E1, prLower}, // L& LATIN SMALL LETTER A WITH DOT ABOVE AND MACRON {0x01E2, 0x01E2, prUpper}, // L& LATIN CAPITAL LETTER AE WITH MACRON {0x01E3, 0x01E3, prLower}, // L& LATIN SMALL LETTER AE WITH MACRON {0x01E4, 0x01E4, prUpper}, // L& LATIN CAPITAL LETTER G WITH STROKE {0x01E5, 0x01E5, prLower}, // L& LATIN SMALL LETTER G WITH STROKE {0x01E6, 0x01E6, prUpper}, // L& LATIN CAPITAL LETTER G WITH CARON {0x01E7, 0x01E7, prLower}, // L& LATIN SMALL LETTER G WITH CARON {0x01E8, 0x01E8, prUpper}, // L& LATIN CAPITAL LETTER K WITH CARON {0x01E9, 0x01E9, prLower}, // L& LATIN SMALL LETTER K WITH CARON {0x01EA, 0x01EA, prUpper}, // L& LATIN CAPITAL LETTER O WITH OGONEK {0x01EB, 0x01EB, prLower}, // L& LATIN SMALL LETTER O WITH OGONEK {0x01EC, 0x01EC, prUpper}, // L& LATIN CAPITAL LETTER O WITH OGONEK AND MACRON {0x01ED, 0x01ED, prLower}, // L& LATIN SMALL LETTER O WITH OGONEK AND MACRON {0x01EE, 0x01EE, prUpper}, // L& LATIN CAPITAL LETTER EZH WITH CARON {0x01EF, 0x01F0, prLower}, // L& [2] LATIN SMALL LETTER EZH WITH CARON..LATIN SMALL LETTER J WITH CARON {0x01F1, 0x01F2, prUpper}, // L& [2] LATIN CAPITAL LETTER DZ..LATIN CAPITAL LETTER D WITH SMALL LETTER Z {0x01F3, 0x01F3, prLower}, // L& LATIN SMALL LETTER DZ {0x01F4, 0x01F4, prUpper}, // L& LATIN CAPITAL LETTER G WITH ACUTE {0x01F5, 0x01F5, prLower}, // L& LATIN SMALL LETTER G WITH ACUTE {0x01F6, 0x01F8, prUpper}, // L& [3] LATIN CAPITAL LETTER HWAIR..LATIN CAPITAL LETTER N WITH GRAVE {0x01F9, 0x01F9, prLower}, // L& LATIN SMALL LETTER N WITH GRAVE {0x01FA, 0x01FA, prUpper}, // L& LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE {0x01FB, 0x01FB, prLower}, // L& LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE {0x01FC, 0x01FC, prUpper}, // L& LATIN CAPITAL LETTER AE WITH ACUTE {0x01FD, 0x01FD, prLower}, // L& LATIN SMALL LETTER AE WITH ACUTE {0x01FE, 0x01FE, prUpper}, // L& LATIN CAPITAL LETTER O WITH STROKE AND ACUTE {0x01FF, 0x01FF, prLower}, // L& LATIN SMALL LETTER O WITH STROKE AND ACUTE {0x0200, 0x0200, prUpper}, // L& LATIN CAPITAL LETTER A WITH DOUBLE GRAVE {0x0201, 0x0201, prLower}, // L& LATIN SMALL LETTER A WITH DOUBLE GRAVE {0x0202, 0x0202, prUpper}, // L& LATIN CAPITAL LETTER A WITH INVERTED BREVE {0x0203, 0x0203, prLower}, // L& LATIN SMALL LETTER A WITH INVERTED BREVE {0x0204, 0x0204, prUpper}, // L& LATIN CAPITAL LETTER E WITH DOUBLE GRAVE {0x0205, 0x0205, prLower}, // L& LATIN SMALL LETTER E WITH DOUBLE GRAVE {0x0206, 0x0206, prUpper}, // L& LATIN CAPITAL LETTER E WITH INVERTED BREVE {0x0207, 0x0207, prLower}, // L& LATIN SMALL LETTER E WITH INVERTED BREVE {0x0208, 0x0208, prUpper}, // L& LATIN CAPITAL LETTER I WITH DOUBLE GRAVE {0x0209, 0x0209, prLower}, // L& LATIN SMALL LETTER I WITH DOUBLE GRAVE {0x020A, 0x020A, prUpper}, // L& LATIN CAPITAL LETTER I WITH INVERTED BREVE {0x020B, 0x020B, prLower}, // L& LATIN SMALL LETTER I WITH INVERTED BREVE {0x020C, 0x020C, prUpper}, // L& LATIN CAPITAL LETTER O WITH DOUBLE GRAVE {0x020D, 0x020D, prLower}, // L& LATIN SMALL LETTER O WITH DOUBLE GRAVE {0x020E, 0x020E, prUpper}, // L& LATIN CAPITAL LETTER O WITH INVERTED BREVE {0x020F, 0x020F, prLower}, // L& LATIN SMALL LETTER O WITH INVERTED BREVE {0x0210, 0x0210, prUpper}, // L& LATIN CAPITAL LETTER R WITH DOUBLE GRAVE {0x0211, 0x0211, prLower}, // L& LATIN SMALL LETTER R WITH DOUBLE GRAVE {0x0212, 0x0212, prUpper}, // L& LATIN CAPITAL LETTER R WITH INVERTED BREVE {0x0213, 0x0213, prLower}, // L& LATIN SMALL LETTER R WITH INVERTED BREVE {0x0214, 0x0214, prUpper}, // L& LATIN CAPITAL LETTER U WITH DOUBLE GRAVE {0x0215, 0x0215, prLower}, // L& LATIN SMALL LETTER U WITH DOUBLE GRAVE {0x0216, 0x0216, prUpper}, // L& LATIN CAPITAL LETTER U WITH INVERTED BREVE {0x0217, 0x0217, prLower}, // L& LATIN SMALL LETTER U WITH INVERTED BREVE {0x0218, 0x0218, prUpper}, // L& LATIN CAPITAL LETTER S WITH COMMA BELOW {0x0219, 0x0219, prLower}, // L& LATIN SMALL LETTER S WITH COMMA BELOW {0x021A, 0x021A, prUpper}, // L& LATIN CAPITAL LETTER T WITH COMMA BELOW {0x021B, 0x021B, prLower}, // L& LATIN SMALL LETTER T WITH COMMA BELOW {0x021C, 0x021C, prUpper}, // L& LATIN CAPITAL LETTER YOGH {0x021D, 0x021D, prLower}, // L& LATIN SMALL LETTER YOGH {0x021E, 0x021E, prUpper}, // L& LATIN CAPITAL LETTER H WITH CARON {0x021F, 0x021F, prLower}, // L& LATIN SMALL LETTER H WITH CARON {0x0220, 0x0220, prUpper}, // L& LATIN CAPITAL LETTER N WITH LONG RIGHT LEG {0x0221, 0x0221, prLower}, // L& LATIN SMALL LETTER D WITH CURL {0x0222, 0x0222, prUpper}, // L& LATIN CAPITAL LETTER OU {0x0223, 0x0223, prLower}, // L& LATIN SMALL LETTER OU {0x0224, 0x0224, prUpper}, // L& LATIN CAPITAL LETTER Z WITH HOOK {0x0225, 0x0225, prLower}, // L& LATIN SMALL LETTER Z WITH HOOK {0x0226, 0x0226, prUpper}, // L& LATIN CAPITAL LETTER A WITH DOT ABOVE {0x0227, 0x0227, prLower}, // L& LATIN SMALL LETTER A WITH DOT ABOVE {0x0228, 0x0228, prUpper}, // L& LATIN CAPITAL LETTER E WITH CEDILLA {0x0229, 0x0229, prLower}, // L& LATIN SMALL LETTER E WITH CEDILLA {0x022A, 0x022A, prUpper}, // L& LATIN CAPITAL LETTER O WITH DIAERESIS AND MACRON {0x022B, 0x022B, prLower}, // L& LATIN SMALL LETTER O WITH DIAERESIS AND MACRON {0x022C, 0x022C, prUpper}, // L& LATIN CAPITAL LETTER O WITH TILDE AND MACRON {0x022D, 0x022D, prLower}, // L& LATIN SMALL LETTER O WITH TILDE AND MACRON {0x022E, 0x022E, prUpper}, // L& LATIN CAPITAL LETTER O WITH DOT ABOVE {0x022F, 0x022F, prLower}, // L& LATIN SMALL LETTER O WITH DOT ABOVE {0x0230, 0x0230, prUpper}, // L& LATIN CAPITAL LETTER O WITH DOT ABOVE AND MACRON {0x0231, 0x0231, prLower}, // L& LATIN SMALL LETTER O WITH DOT ABOVE AND MACRON {0x0232, 0x0232, prUpper}, // L& LATIN CAPITAL LETTER Y WITH MACRON {0x0233, 0x0239, prLower}, // L& [7] LATIN SMALL LETTER Y WITH MACRON..LATIN SMALL LETTER QP DIGRAPH {0x023A, 0x023B, prUpper}, // L& [2] LATIN CAPITAL LETTER A WITH STROKE..LATIN CAPITAL LETTER C WITH STROKE {0x023C, 0x023C, prLower}, // L& LATIN SMALL LETTER C WITH STROKE {0x023D, 0x023E, prUpper}, // L& [2] LATIN CAPITAL LETTER L WITH BAR..LATIN CAPITAL LETTER T WITH DIAGONAL STROKE {0x023F, 0x0240, prLower}, // L& [2] LATIN SMALL LETTER S WITH SWASH TAIL..LATIN SMALL LETTER Z WITH SWASH TAIL {0x0241, 0x0241, prUpper}, // L& LATIN CAPITAL LETTER GLOTTAL STOP {0x0242, 0x0242, prLower}, // L& LATIN SMALL LETTER GLOTTAL STOP {0x0243, 0x0246, prUpper}, // L& [4] LATIN CAPITAL LETTER B WITH STROKE..LATIN CAPITAL LETTER E WITH STROKE {0x0247, 0x0247, prLower}, // L& LATIN SMALL LETTER E WITH STROKE {0x0248, 0x0248, prUpper}, // L& LATIN CAPITAL LETTER J WITH STROKE {0x0249, 0x0249, prLower}, // L& LATIN SMALL LETTER J WITH STROKE {0x024A, 0x024A, prUpper}, // L& LATIN CAPITAL LETTER SMALL Q WITH HOOK TAIL {0x024B, 0x024B, prLower}, // L& LATIN SMALL LETTER Q WITH HOOK TAIL {0x024C, 0x024C, prUpper}, // L& LATIN CAPITAL LETTER R WITH STROKE {0x024D, 0x024D, prLower}, // L& LATIN SMALL LETTER R WITH STROKE {0x024E, 0x024E, prUpper}, // L& LATIN CAPITAL LETTER Y WITH STROKE {0x024F, 0x0293, prLower}, // L& [69] LATIN SMALL LETTER Y WITH STROKE..LATIN SMALL LETTER EZH WITH CURL {0x0294, 0x0294, prOLetter}, // Lo LATIN LETTER GLOTTAL STOP {0x0295, 0x02AF, prLower}, // L& [27] LATIN LETTER PHARYNGEAL VOICED FRICATIVE..LATIN SMALL LETTER TURNED H WITH FISHHOOK AND TAIL {0x02B0, 0x02B8, prLower}, // Lm [9] MODIFIER LETTER SMALL H..MODIFIER LETTER SMALL Y {0x02B9, 0x02BF, prOLetter}, // Lm [7] MODIFIER LETTER PRIME..MODIFIER LETTER LEFT HALF RING {0x02C0, 0x02C1, prLower}, // Lm [2] MODIFIER LETTER GLOTTAL STOP..MODIFIER LETTER REVERSED GLOTTAL STOP {0x02C6, 0x02D1, prOLetter}, // Lm [12] MODIFIER LETTER CIRCUMFLEX ACCENT..MODIFIER LETTER HALF TRIANGULAR COLON {0x02E0, 0x02E4, prLower}, // Lm [5] MODIFIER LETTER SMALL GAMMA..MODIFIER LETTER SMALL REVERSED GLOTTAL STOP {0x02EC, 0x02EC, prOLetter}, // Lm MODIFIER LETTER VOICING {0x02EE, 0x02EE, prOLetter}, // Lm MODIFIER LETTER DOUBLE APOSTROPHE {0x0300, 0x036F, prExtend}, // Mn [112] COMBINING GRAVE ACCENT..COMBINING LATIN SMALL LETTER X {0x0370, 0x0370, prUpper}, // L& GREEK CAPITAL LETTER HETA {0x0371, 0x0371, prLower}, // L& GREEK SMALL LETTER HETA {0x0372, 0x0372, prUpper}, // L& GREEK CAPITAL LETTER ARCHAIC SAMPI {0x0373, 0x0373, prLower}, // L& GREEK SMALL LETTER ARCHAIC SAMPI {0x0374, 0x0374, prOLetter}, // Lm GREEK NUMERAL SIGN {0x0376, 0x0376, prUpper}, // L& GREEK CAPITAL LETTER PAMPHYLIAN DIGAMMA {0x0377, 0x0377, prLower}, // L& GREEK SMALL LETTER PAMPHYLIAN DIGAMMA {0x037A, 0x037A, prLower}, // Lm GREEK YPOGEGRAMMENI {0x037B, 0x037D, prLower}, // L& [3] GREEK SMALL REVERSED LUNATE SIGMA SYMBOL..GREEK SMALL REVERSED DOTTED LUNATE SIGMA SYMBOL {0x037F, 0x037F, prUpper}, // L& GREEK CAPITAL LETTER YOT {0x0386, 0x0386, prUpper}, // L& GREEK CAPITAL LETTER ALPHA WITH TONOS {0x0388, 0x038A, prUpper}, // L& [3] GREEK CAPITAL LETTER EPSILON WITH TONOS..GREEK CAPITAL LETTER IOTA WITH TONOS {0x038C, 0x038C, prUpper}, // L& GREEK CAPITAL LETTER OMICRON WITH TONOS {0x038E, 0x038F, prUpper}, // L& [2] GREEK CAPITAL LETTER UPSILON WITH TONOS..GREEK CAPITAL LETTER OMEGA WITH TONOS {0x0390, 0x0390, prLower}, // L& GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS {0x0391, 0x03A1, prUpper}, // L& [17] GREEK CAPITAL LETTER ALPHA..GREEK CAPITAL LETTER RHO {0x03A3, 0x03AB, prUpper}, // L& [9] GREEK CAPITAL LETTER SIGMA..GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA {0x03AC, 0x03CE, prLower}, // L& [35] GREEK SMALL LETTER ALPHA WITH TONOS..GREEK SMALL LETTER OMEGA WITH TONOS {0x03CF, 0x03CF, prUpper}, // L& GREEK CAPITAL KAI SYMBOL {0x03D0, 0x03D1, prLower}, // L& [2] GREEK BETA SYMBOL..GREEK THETA SYMBOL {0x03D2, 0x03D4, prUpper}, // L& [3] GREEK UPSILON WITH HOOK SYMBOL..GREEK UPSILON WITH DIAERESIS AND HOOK SYMBOL {0x03D5, 0x03D7, prLower}, // L& [3] GREEK PHI SYMBOL..GREEK KAI SYMBOL {0x03D8, 0x03D8, prUpper}, // L& GREEK LETTER ARCHAIC KOPPA {0x03D9, 0x03D9, prLower}, // L& GREEK SMALL LETTER ARCHAIC KOPPA {0x03DA, 0x03DA, prUpper}, // L& GREEK LETTER STIGMA {0x03DB, 0x03DB, prLower}, // L& GREEK SMALL LETTER STIGMA {0x03DC, 0x03DC, prUpper}, // L& GREEK LETTER DIGAMMA {0x03DD, 0x03DD, prLower}, // L& GREEK SMALL LETTER DIGAMMA {0x03DE, 0x03DE, prUpper}, // L& GREEK LETTER KOPPA {0x03DF, 0x03DF, prLower}, // L& GREEK SMALL LETTER KOPPA {0x03E0, 0x03E0, prUpper}, // L& GREEK LETTER SAMPI {0x03E1, 0x03E1, prLower}, // L& GREEK SMALL LETTER SAMPI {0x03E2, 0x03E2, prUpper}, // L& COPTIC CAPITAL LETTER SHEI {0x03E3, 0x03E3, prLower}, // L& COPTIC SMALL LETTER SHEI {0x03E4, 0x03E4, prUpper}, // L& COPTIC CAPITAL LETTER FEI {0x03E5, 0x03E5, prLower}, // L& COPTIC SMALL LETTER FEI {0x03E6, 0x03E6, prUpper}, // L& COPTIC CAPITAL LETTER KHEI {0x03E7, 0x03E7, prLower}, // L& COPTIC SMALL LETTER KHEI {0x03E8, 0x03E8, prUpper}, // L& COPTIC CAPITAL LETTER HORI {0x03E9, 0x03E9, prLower}, // L& COPTIC SMALL LETTER HORI {0x03EA, 0x03EA, prUpper}, // L& COPTIC CAPITAL LETTER GANGIA {0x03EB, 0x03EB, prLower}, // L& COPTIC SMALL LETTER GANGIA {0x03EC, 0x03EC, prUpper}, // L& COPTIC CAPITAL LETTER SHIMA {0x03ED, 0x03ED, prLower}, // L& COPTIC SMALL LETTER SHIMA {0x03EE, 0x03EE, prUpper}, // L& COPTIC CAPITAL LETTER DEI {0x03EF, 0x03F3, prLower}, // L& [5] COPTIC SMALL LETTER DEI..GREEK LETTER YOT {0x03F4, 0x03F4, prUpper}, // L& GREEK CAPITAL THETA SYMBOL {0x03F5, 0x03F5, prLower}, // L& GREEK LUNATE EPSILON SYMBOL {0x03F7, 0x03F7, prUpper}, // L& GREEK CAPITAL LETTER SHO {0x03F8, 0x03F8, prLower}, // L& GREEK SMALL LETTER SHO {0x03F9, 0x03FA, prUpper}, // L& [2] GREEK CAPITAL LUNATE SIGMA SYMBOL..GREEK CAPITAL LETTER SAN {0x03FB, 0x03FC, prLower}, // L& [2] GREEK SMALL LETTER SAN..GREEK RHO WITH STROKE SYMBOL {0x03FD, 0x042F, prUpper}, // L& [51] GREEK CAPITAL REVERSED LUNATE SIGMA SYMBOL..CYRILLIC CAPITAL LETTER YA {0x0430, 0x045F, prLower}, // L& [48] CYRILLIC SMALL LETTER A..CYRILLIC SMALL LETTER DZHE {0x0460, 0x0460, prUpper}, // L& CYRILLIC CAPITAL LETTER OMEGA {0x0461, 0x0461, prLower}, // L& CYRILLIC SMALL LETTER OMEGA {0x0462, 0x0462, prUpper}, // L& CYRILLIC CAPITAL LETTER YAT {0x0463, 0x0463, prLower}, // L& CYRILLIC SMALL LETTER YAT {0x0464, 0x0464, prUpper}, // L& CYRILLIC CAPITAL LETTER IOTIFIED E {0x0465, 0x0465, prLower}, // L& CYRILLIC SMALL LETTER IOTIFIED E {0x0466, 0x0466, prUpper}, // L& CYRILLIC CAPITAL LETTER LITTLE YUS {0x0467, 0x0467, prLower}, // L& CYRILLIC SMALL LETTER LITTLE YUS {0x0468, 0x0468, prUpper}, // L& CYRILLIC CAPITAL LETTER IOTIFIED LITTLE YUS {0x0469, 0x0469, prLower}, // L& CYRILLIC SMALL LETTER IOTIFIED LITTLE YUS {0x046A, 0x046A, prUpper}, // L& CYRILLIC CAPITAL LETTER BIG YUS {0x046B, 0x046B, prLower}, // L& CYRILLIC SMALL LETTER BIG YUS {0x046C, 0x046C, prUpper}, // L& CYRILLIC CAPITAL LETTER IOTIFIED BIG YUS {0x046D, 0x046D, prLower}, // L& CYRILLIC SMALL LETTER IOTIFIED BIG YUS {0x046E, 0x046E, prUpper}, // L& CYRILLIC CAPITAL LETTER KSI {0x046F, 0x046F, prLower}, // L& CYRILLIC SMALL LETTER KSI {0x0470, 0x0470, prUpper}, // L& CYRILLIC CAPITAL LETTER PSI {0x0471, 0x0471, prLower}, // L& CYRILLIC SMALL LETTER PSI {0x0472, 0x0472, prUpper}, // L& CYRILLIC CAPITAL LETTER FITA {0x0473, 0x0473, prLower}, // L& CYRILLIC SMALL LETTER FITA {0x0474, 0x0474, prUpper}, // L& CYRILLIC CAPITAL LETTER IZHITSA {0x0475, 0x0475, prLower}, // L& CYRILLIC SMALL LETTER IZHITSA {0x0476, 0x0476, prUpper}, // L& CYRILLIC CAPITAL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT {0x0477, 0x0477, prLower}, // L& CYRILLIC SMALL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT {0x0478, 0x0478, prUpper}, // L& CYRILLIC CAPITAL LETTER UK {0x0479, 0x0479, prLower}, // L& CYRILLIC SMALL LETTER UK {0x047A, 0x047A, prUpper}, // L& CYRILLIC CAPITAL LETTER ROUND OMEGA {0x047B, 0x047B, prLower}, // L& CYRILLIC SMALL LETTER ROUND OMEGA {0x047C, 0x047C, prUpper}, // L& CYRILLIC CAPITAL LETTER OMEGA WITH TITLO {0x047D, 0x047D, prLower}, // L& CYRILLIC SMALL LETTER OMEGA WITH TITLO {0x047E, 0x047E, prUpper}, // L& CYRILLIC CAPITAL LETTER OT {0x047F, 0x047F, prLower}, // L& CYRILLIC SMALL LETTER OT {0x0480, 0x0480, prUpper}, // L& CYRILLIC CAPITAL LETTER KOPPA {0x0481, 0x0481, prLower}, // L& CYRILLIC SMALL LETTER KOPPA {0x0483, 0x0487, prExtend}, // Mn [5] COMBINING CYRILLIC TITLO..COMBINING CYRILLIC POKRYTIE {0x0488, 0x0489, prExtend}, // Me [2] COMBINING CYRILLIC HUNDRED THOUSANDS SIGN..COMBINING CYRILLIC MILLIONS SIGN {0x048A, 0x048A, prUpper}, // L& CYRILLIC CAPITAL LETTER SHORT I WITH TAIL {0x048B, 0x048B, prLower}, // L& CYRILLIC SMALL LETTER SHORT I WITH TAIL {0x048C, 0x048C, prUpper}, // L& CYRILLIC CAPITAL LETTER SEMISOFT SIGN {0x048D, 0x048D, prLower}, // L& CYRILLIC SMALL LETTER SEMISOFT SIGN {0x048E, 0x048E, prUpper}, // L& CYRILLIC CAPITAL LETTER ER WITH TICK {0x048F, 0x048F, prLower}, // L& CYRILLIC SMALL LETTER ER WITH TICK {0x0490, 0x0490, prUpper}, // L& CYRILLIC CAPITAL LETTER GHE WITH UPTURN {0x0491, 0x0491, prLower}, // L& CYRILLIC SMALL LETTER GHE WITH UPTURN {0x0492, 0x0492, prUpper}, // L& CYRILLIC CAPITAL LETTER GHE WITH STROKE {0x0493, 0x0493, prLower}, // L& CYRILLIC SMALL LETTER GHE WITH STROKE {0x0494, 0x0494, prUpper}, // L& CYRILLIC CAPITAL LETTER GHE WITH MIDDLE HOOK {0x0495, 0x0495, prLower}, // L& CYRILLIC SMALL LETTER GHE WITH MIDDLE HOOK {0x0496, 0x0496, prUpper}, // L& CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER {0x0497, 0x0497, prLower}, // L& CYRILLIC SMALL LETTER ZHE WITH DESCENDER {0x0498, 0x0498, prUpper}, // L& CYRILLIC CAPITAL LETTER ZE WITH DESCENDER {0x0499, 0x0499, prLower}, // L& CYRILLIC SMALL LETTER ZE WITH DESCENDER {0x049A, 0x049A, prUpper}, // L& CYRILLIC CAPITAL LETTER KA WITH DESCENDER {0x049B, 0x049B, prLower}, // L& CYRILLIC SMALL LETTER KA WITH DESCENDER {0x049C, 0x049C, prUpper}, // L& CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE {0x049D, 0x049D, prLower}, // L& CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE {0x049E, 0x049E, prUpper}, // L& CYRILLIC CAPITAL LETTER KA WITH STROKE {0x049F, 0x049F, prLower}, // L& CYRILLIC SMALL LETTER KA WITH STROKE {0x04A0, 0x04A0, prUpper}, // L& CYRILLIC CAPITAL LETTER BASHKIR KA {0x04A1, 0x04A1, prLower}, // L& CYRILLIC SMALL LETTER BASHKIR KA {0x04A2, 0x04A2, prUpper}, // L& CYRILLIC CAPITAL LETTER EN WITH DESCENDER {0x04A3, 0x04A3, prLower}, // L& CYRILLIC SMALL LETTER EN WITH DESCENDER {0x04A4, 0x04A4, prUpper}, // L& CYRILLIC CAPITAL LIGATURE EN GHE {0x04A5, 0x04A5, prLower}, // L& CYRILLIC SMALL LIGATURE EN GHE {0x04A6, 0x04A6, prUpper}, // L& CYRILLIC CAPITAL LETTER PE WITH MIDDLE HOOK {0x04A7, 0x04A7, prLower}, // L& CYRILLIC SMALL LETTER PE WITH MIDDLE HOOK {0x04A8, 0x04A8, prUpper}, // L& CYRILLIC CAPITAL LETTER ABKHASIAN HA {0x04A9, 0x04A9, prLower}, // L& CYRILLIC SMALL LETTER ABKHASIAN HA {0x04AA, 0x04AA, prUpper}, // L& CYRILLIC CAPITAL LETTER ES WITH DESCENDER {0x04AB, 0x04AB, prLower}, // L& CYRILLIC SMALL LETTER ES WITH DESCENDER {0x04AC, 0x04AC, prUpper}, // L& CYRILLIC CAPITAL LETTER TE WITH DESCENDER {0x04AD, 0x04AD, prLower}, // L& CYRILLIC SMALL LETTER TE WITH DESCENDER {0x04AE, 0x04AE, prUpper}, // L& CYRILLIC CAPITAL LETTER STRAIGHT U {0x04AF, 0x04AF, prLower}, // L& CYRILLIC SMALL LETTER STRAIGHT U {0x04B0, 0x04B0, prUpper}, // L& CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE {0x04B1, 0x04B1, prLower}, // L& CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE {0x04B2, 0x04B2, prUpper}, // L& CYRILLIC CAPITAL LETTER HA WITH DESCENDER {0x04B3, 0x04B3, prLower}, // L& CYRILLIC SMALL LETTER HA WITH DESCENDER {0x04B4, 0x04B4, prUpper}, // L& CYRILLIC CAPITAL LIGATURE TE TSE {0x04B5, 0x04B5, prLower}, // L& CYRILLIC SMALL LIGATURE TE TSE {0x04B6, 0x04B6, prUpper}, // L& CYRILLIC CAPITAL LETTER CHE WITH DESCENDER {0x04B7, 0x04B7, prLower}, // L& CYRILLIC SMALL LETTER CHE WITH DESCENDER {0x04B8, 0x04B8, prUpper}, // L& CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE {0x04B9, 0x04B9, prLower}, // L& CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE {0x04BA, 0x04BA, prUpper}, // L& CYRILLIC CAPITAL LETTER SHHA {0x04BB, 0x04BB, prLower}, // L& CYRILLIC SMALL LETTER SHHA {0x04BC, 0x04BC, prUpper}, // L& CYRILLIC CAPITAL LETTER ABKHASIAN CHE {0x04BD, 0x04BD, prLower}, // L& CYRILLIC SMALL LETTER ABKHASIAN CHE {0x04BE, 0x04BE, prUpper}, // L& CYRILLIC CAPITAL LETTER ABKHASIAN CHE WITH DESCENDER {0x04BF, 0x04BF, prLower}, // L& CYRILLIC SMALL LETTER ABKHASIAN CHE WITH DESCENDER {0x04C0, 0x04C1, prUpper}, // L& [2] CYRILLIC LETTER PALOCHKA..CYRILLIC CAPITAL LETTER ZHE WITH BREVE {0x04C2, 0x04C2, prLower}, // L& CYRILLIC SMALL LETTER ZHE WITH BREVE {0x04C3, 0x04C3, prUpper}, // L& CYRILLIC CAPITAL LETTER KA WITH HOOK {0x04C4, 0x04C4, prLower}, // L& CYRILLIC SMALL LETTER KA WITH HOOK {0x04C5, 0x04C5, prUpper}, // L& CYRILLIC CAPITAL LETTER EL WITH TAIL {0x04C6, 0x04C6, prLower}, // L& CYRILLIC SMALL LETTER EL WITH TAIL {0x04C7, 0x04C7, prUpper}, // L& CYRILLIC CAPITAL LETTER EN WITH HOOK {0x04C8, 0x04C8, prLower}, // L& CYRILLIC SMALL LETTER EN WITH HOOK {0x04C9, 0x04C9, prUpper}, // L& CYRILLIC CAPITAL LETTER EN WITH TAIL {0x04CA, 0x04CA, prLower}, // L& CYRILLIC SMALL LETTER EN WITH TAIL {0x04CB, 0x04CB, prUpper}, // L& CYRILLIC CAPITAL LETTER KHAKASSIAN CHE {0x04CC, 0x04CC, prLower}, // L& CYRILLIC SMALL LETTER KHAKASSIAN CHE {0x04CD, 0x04CD, prUpper}, // L& CYRILLIC CAPITAL LETTER EM WITH TAIL {0x04CE, 0x04CF, prLower}, // L& [2] CYRILLIC SMALL LETTER EM WITH TAIL..CYRILLIC SMALL LETTER PALOCHKA {0x04D0, 0x04D0, prUpper}, // L& CYRILLIC CAPITAL LETTER A WITH BREVE {0x04D1, 0x04D1, prLower}, // L& CYRILLIC SMALL LETTER A WITH BREVE {0x04D2, 0x04D2, prUpper}, // L& CYRILLIC CAPITAL LETTER A WITH DIAERESIS {0x04D3, 0x04D3, prLower}, // L& CYRILLIC SMALL LETTER A WITH DIAERESIS {0x04D4, 0x04D4, prUpper}, // L& CYRILLIC CAPITAL LIGATURE A IE {0x04D5, 0x04D5, prLower}, // L& CYRILLIC SMALL LIGATURE A IE {0x04D6, 0x04D6, prUpper}, // L& CYRILLIC CAPITAL LETTER IE WITH BREVE {0x04D7, 0x04D7, prLower}, // L& CYRILLIC SMALL LETTER IE WITH BREVE {0x04D8, 0x04D8, prUpper}, // L& CYRILLIC CAPITAL LETTER SCHWA {0x04D9, 0x04D9, prLower}, // L& CYRILLIC SMALL LETTER SCHWA {0x04DA, 0x04DA, prUpper}, // L& CYRILLIC CAPITAL LETTER SCHWA WITH DIAERESIS {0x04DB, 0x04DB, prLower}, // L& CYRILLIC SMALL LETTER SCHWA WITH DIAERESIS {0x04DC, 0x04DC, prUpper}, // L& CYRILLIC CAPITAL LETTER ZHE WITH DIAERESIS {0x04DD, 0x04DD, prLower}, // L& CYRILLIC SMALL LETTER ZHE WITH DIAERESIS {0x04DE, 0x04DE, prUpper}, // L& CYRILLIC CAPITAL LETTER ZE WITH DIAERESIS {0x04DF, 0x04DF, prLower}, // L& CYRILLIC SMALL LETTER ZE WITH DIAERESIS {0x04E0, 0x04E0, prUpper}, // L& CYRILLIC CAPITAL LETTER ABKHASIAN DZE {0x04E1, 0x04E1, prLower}, // L& CYRILLIC SMALL LETTER ABKHASIAN DZE {0x04E2, 0x04E2, prUpper}, // L& CYRILLIC CAPITAL LETTER I WITH MACRON {0x04E3, 0x04E3, prLower}, // L& CYRILLIC SMALL LETTER I WITH MACRON {0x04E4, 0x04E4, prUpper}, // L& CYRILLIC CAPITAL LETTER I WITH DIAERESIS {0x04E5, 0x04E5, prLower}, // L& CYRILLIC SMALL LETTER I WITH DIAERESIS {0x04E6, 0x04E6, prUpper}, // L& CYRILLIC CAPITAL LETTER O WITH DIAERESIS {0x04E7, 0x04E7, prLower}, // L& CYRILLIC SMALL LETTER O WITH DIAERESIS {0x04E8, 0x04E8, prUpper}, // L& CYRILLIC CAPITAL LETTER BARRED O {0x04E9, 0x04E9, prLower}, // L& CYRILLIC SMALL LETTER BARRED O {0x04EA, 0x04EA, prUpper}, // L& CYRILLIC CAPITAL LETTER BARRED O WITH DIAERESIS {0x04EB, 0x04EB, prLower}, // L& CYRILLIC SMALL LETTER BARRED O WITH DIAERESIS {0x04EC, 0x04EC, prUpper}, // L& CYRILLIC CAPITAL LETTER E WITH DIAERESIS {0x04ED, 0x04ED, prLower}, // L& CYRILLIC SMALL LETTER E WITH DIAERESIS {0x04EE, 0x04EE, prUpper}, // L& CYRILLIC CAPITAL LETTER U WITH MACRON {0x04EF, 0x04EF, prLower}, // L& CYRILLIC SMALL LETTER U WITH MACRON {0x04F0, 0x04F0, prUpper}, // L& CYRILLIC CAPITAL LETTER U WITH DIAERESIS {0x04F1, 0x04F1, prLower}, // L& CYRILLIC SMALL LETTER U WITH DIAERESIS {0x04F2, 0x04F2, prUpper}, // L& CYRILLIC CAPITAL LETTER U WITH DOUBLE ACUTE {0x04F3, 0x04F3, prLower}, // L& CYRILLIC SMALL LETTER U WITH DOUBLE ACUTE {0x04F4, 0x04F4, prUpper}, // L& CYRILLIC CAPITAL LETTER CHE WITH DIAERESIS {0x04F5, 0x04F5, prLower}, // L& CYRILLIC SMALL LETTER CHE WITH DIAERESIS {0x04F6, 0x04F6, prUpper}, // L& CYRILLIC CAPITAL LETTER GHE WITH DESCENDER {0x04F7, 0x04F7, prLower}, // L& CYRILLIC SMALL LETTER GHE WITH DESCENDER {0x04F8, 0x04F8, prUpper}, // L& CYRILLIC CAPITAL LETTER YERU WITH DIAERESIS {0x04F9, 0x04F9, prLower}, // L& CYRILLIC SMALL LETTER YERU WITH DIAERESIS {0x04FA, 0x04FA, prUpper}, // L& CYRILLIC CAPITAL LETTER GHE WITH STROKE AND HOOK {0x04FB, 0x04FB, prLower}, // L& CYRILLIC SMALL LETTER GHE WITH STROKE AND HOOK {0x04FC, 0x04FC, prUpper}, // L& CYRILLIC CAPITAL LETTER HA WITH HOOK {0x04FD, 0x04FD, prLower}, // L& CYRILLIC SMALL LETTER HA WITH HOOK {0x04FE, 0x04FE, prUpper}, // L& CYRILLIC CAPITAL LETTER HA WITH STROKE {0x04FF, 0x04FF, prLower}, // L& CYRILLIC SMALL LETTER HA WITH STROKE {0x0500, 0x0500, prUpper}, // L& CYRILLIC CAPITAL LETTER KOMI DE {0x0501, 0x0501, prLower}, // L& CYRILLIC SMALL LETTER KOMI DE {0x0502, 0x0502, prUpper}, // L& CYRILLIC CAPITAL LETTER KOMI DJE {0x0503, 0x0503, prLower}, // L& CYRILLIC SMALL LETTER KOMI DJE {0x0504, 0x0504, prUpper}, // L& CYRILLIC CAPITAL LETTER KOMI ZJE {0x0505, 0x0505, prLower}, // L& CYRILLIC SMALL LETTER KOMI ZJE {0x0506, 0x0506, prUpper}, // L& CYRILLIC CAPITAL LETTER KOMI DZJE {0x0507, 0x0507, prLower}, // L& CYRILLIC SMALL LETTER KOMI DZJE {0x0508, 0x0508, prUpper}, // L& CYRILLIC CAPITAL LETTER KOMI LJE {0x0509, 0x0509, prLower}, // L& CYRILLIC SMALL LETTER KOMI LJE {0x050A, 0x050A, prUpper}, // L& CYRILLIC CAPITAL LETTER KOMI NJE {0x050B, 0x050B, prLower}, // L& CYRILLIC SMALL LETTER KOMI NJE {0x050C, 0x050C, prUpper}, // L& CYRILLIC CAPITAL LETTER KOMI SJE {0x050D, 0x050D, prLower}, // L& CYRILLIC SMALL LETTER KOMI SJE {0x050E, 0x050E, prUpper}, // L& CYRILLIC CAPITAL LETTER KOMI TJE {0x050F, 0x050F, prLower}, // L& CYRILLIC SMALL LETTER KOMI TJE {0x0510, 0x0510, prUpper}, // L& CYRILLIC CAPITAL LETTER REVERSED ZE {0x0511, 0x0511, prLower}, // L& CYRILLIC SMALL LETTER REVERSED ZE {0x0512, 0x0512, prUpper}, // L& CYRILLIC CAPITAL LETTER EL WITH HOOK {0x0513, 0x0513, prLower}, // L& CYRILLIC SMALL LETTER EL WITH HOOK {0x0514, 0x0514, prUpper}, // L& CYRILLIC CAPITAL LETTER LHA {0x0515, 0x0515, prLower}, // L& CYRILLIC SMALL LETTER LHA {0x0516, 0x0516, prUpper}, // L& CYRILLIC CAPITAL LETTER RHA {0x0517, 0x0517, prLower}, // L& CYRILLIC SMALL LETTER RHA {0x0518, 0x0518, prUpper}, // L& CYRILLIC CAPITAL LETTER YAE {0x0519, 0x0519, prLower}, // L& CYRILLIC SMALL LETTER YAE {0x051A, 0x051A, prUpper}, // L& CYRILLIC CAPITAL LETTER QA {0x051B, 0x051B, prLower}, // L& CYRILLIC SMALL LETTER QA {0x051C, 0x051C, prUpper}, // L& CYRILLIC CAPITAL LETTER WE {0x051D, 0x051D, prLower}, // L& CYRILLIC SMALL LETTER WE {0x051E, 0x051E, prUpper}, // L& CYRILLIC CAPITAL LETTER ALEUT KA {0x051F, 0x051F, prLower}, // L& CYRILLIC SMALL LETTER ALEUT KA {0x0520, 0x0520, prUpper}, // L& CYRILLIC CAPITAL LETTER EL WITH MIDDLE HOOK {0x0521, 0x0521, prLower}, // L& CYRILLIC SMALL LETTER EL WITH MIDDLE HOOK {0x0522, 0x0522, prUpper}, // L& CYRILLIC CAPITAL LETTER EN WITH MIDDLE HOOK {0x0523, 0x0523, prLower}, // L& CYRILLIC SMALL LETTER EN WITH MIDDLE HOOK {0x0524, 0x0524, prUpper}, // L& CYRILLIC CAPITAL LETTER PE WITH DESCENDER {0x0525, 0x0525, prLower}, // L& CYRILLIC SMALL LETTER PE WITH DESCENDER {0x0526, 0x0526, prUpper}, // L& CYRILLIC CAPITAL LETTER SHHA WITH DESCENDER {0x0527, 0x0527, prLower}, // L& CYRILLIC SMALL LETTER SHHA WITH DESCENDER {0x0528, 0x0528, prUpper}, // L& CYRILLIC CAPITAL LETTER EN WITH LEFT HOOK {0x0529, 0x0529, prLower}, // L& CYRILLIC SMALL LETTER EN WITH LEFT HOOK {0x052A, 0x052A, prUpper}, // L& CYRILLIC CAPITAL LETTER DZZHE {0x052B, 0x052B, prLower}, // L& CYRILLIC SMALL LETTER DZZHE {0x052C, 0x052C, prUpper}, // L& CYRILLIC CAPITAL LETTER DCHE {0x052D, 0x052D, prLower}, // L& CYRILLIC SMALL LETTER DCHE {0x052E, 0x052E, prUpper}, // L& CYRILLIC CAPITAL LETTER EL WITH DESCENDER {0x052F, 0x052F, prLower}, // L& CYRILLIC SMALL LETTER EL WITH DESCENDER {0x0531, 0x0556, prUpper}, // L& [38] ARMENIAN CAPITAL LETTER AYB..ARMENIAN CAPITAL LETTER FEH {0x0559, 0x0559, prOLetter}, // Lm ARMENIAN MODIFIER LETTER LEFT HALF RING {0x055D, 0x055D, prSContinue}, // Po ARMENIAN COMMA {0x0560, 0x0588, prLower}, // L& [41] ARMENIAN SMALL LETTER TURNED AYB..ARMENIAN SMALL LETTER YI WITH STROKE {0x0589, 0x0589, prSTerm}, // Po ARMENIAN FULL STOP {0x0591, 0x05BD, prExtend}, // Mn [45] HEBREW ACCENT ETNAHTA..HEBREW POINT METEG {0x05BF, 0x05BF, prExtend}, // Mn HEBREW POINT RAFE {0x05C1, 0x05C2, prExtend}, // Mn [2] HEBREW POINT SHIN DOT..HEBREW POINT SIN DOT {0x05C4, 0x05C5, prExtend}, // Mn [2] HEBREW MARK UPPER DOT..HEBREW MARK LOWER DOT {0x05C7, 0x05C7, prExtend}, // Mn HEBREW POINT QAMATS QATAN {0x05D0, 0x05EA, prOLetter}, // Lo [27] HEBREW LETTER ALEF..HEBREW LETTER TAV {0x05EF, 0x05F2, prOLetter}, // Lo [4] HEBREW YOD TRIANGLE..HEBREW LIGATURE YIDDISH DOUBLE YOD {0x05F3, 0x05F3, prOLetter}, // Po HEBREW PUNCTUATION GERESH {0x0600, 0x0605, prFormat}, // Cf [6] ARABIC NUMBER SIGN..ARABIC NUMBER MARK ABOVE {0x060C, 0x060D, prSContinue}, // Po [2] ARABIC COMMA..ARABIC DATE SEPARATOR {0x0610, 0x061A, prExtend}, // Mn [11] ARABIC SIGN SALLALLAHOU ALAYHE WASSALLAM..ARABIC SMALL KASRA {0x061C, 0x061C, prFormat}, // Cf ARABIC LETTER MARK {0x061D, 0x061F, prSTerm}, // Po [3] ARABIC END OF TEXT MARK..ARABIC QUESTION MARK {0x0620, 0x063F, prOLetter}, // Lo [32] ARABIC LETTER KASHMIRI YEH..ARABIC LETTER FARSI YEH WITH THREE DOTS ABOVE {0x0640, 0x0640, prOLetter}, // Lm ARABIC TATWEEL {0x0641, 0x064A, prOLetter}, // Lo [10] ARABIC LETTER FEH..ARABIC LETTER YEH {0x064B, 0x065F, prExtend}, // Mn [21] ARABIC FATHATAN..ARABIC WAVY HAMZA BELOW {0x0660, 0x0669, prNumeric}, // Nd [10] ARABIC-INDIC DIGIT ZERO..ARABIC-INDIC DIGIT NINE {0x066B, 0x066C, prNumeric}, // Po [2] ARABIC DECIMAL SEPARATOR..ARABIC THOUSANDS SEPARATOR {0x066E, 0x066F, prOLetter}, // Lo [2] ARABIC LETTER DOTLESS BEH..ARABIC LETTER DOTLESS QAF {0x0670, 0x0670, prExtend}, // Mn ARABIC LETTER SUPERSCRIPT ALEF {0x0671, 0x06D3, prOLetter}, // Lo [99] ARABIC LETTER ALEF WASLA..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE {0x06D4, 0x06D4, prSTerm}, // Po ARABIC FULL STOP {0x06D5, 0x06D5, prOLetter}, // Lo ARABIC LETTER AE {0x06D6, 0x06DC, prExtend}, // Mn [7] ARABIC SMALL HIGH LIGATURE SAD WITH LAM WITH ALEF MAKSURA..ARABIC SMALL HIGH SEEN {0x06DD, 0x06DD, prFormat}, // Cf ARABIC END OF AYAH {0x06DF, 0x06E4, prExtend}, // Mn [6] ARABIC SMALL HIGH ROUNDED ZERO..ARABIC SMALL HIGH MADDA {0x06E5, 0x06E6, prOLetter}, // Lm [2] ARABIC SMALL WAW..ARABIC SMALL YEH {0x06E7, 0x06E8, prExtend}, // Mn [2] ARABIC SMALL HIGH YEH..ARABIC SMALL HIGH NOON {0x06EA, 0x06ED, prExtend}, // Mn [4] ARABIC EMPTY CENTRE LOW STOP..ARABIC SMALL LOW MEEM {0x06EE, 0x06EF, prOLetter}, // Lo [2] ARABIC LETTER DAL WITH INVERTED V..ARABIC LETTER REH WITH INVERTED V {0x06F0, 0x06F9, prNumeric}, // Nd [10] EXTENDED ARABIC-INDIC DIGIT ZERO..EXTENDED ARABIC-INDIC DIGIT NINE {0x06FA, 0x06FC, prOLetter}, // Lo [3] ARABIC LETTER SHEEN WITH DOT BELOW..ARABIC LETTER GHAIN WITH DOT BELOW {0x06FF, 0x06FF, prOLetter}, // Lo ARABIC LETTER HEH WITH INVERTED V {0x0700, 0x0702, prSTerm}, // Po [3] SYRIAC END OF PARAGRAPH..SYRIAC SUBLINEAR FULL STOP {0x070F, 0x070F, prFormat}, // Cf SYRIAC ABBREVIATION MARK {0x0710, 0x0710, prOLetter}, // Lo SYRIAC LETTER ALAPH {0x0711, 0x0711, prExtend}, // Mn SYRIAC LETTER SUPERSCRIPT ALAPH {0x0712, 0x072F, prOLetter}, // Lo [30] SYRIAC LETTER BETH..SYRIAC LETTER PERSIAN DHALATH {0x0730, 0x074A, prExtend}, // Mn [27] SYRIAC PTHAHA ABOVE..SYRIAC BARREKH {0x074D, 0x07A5, prOLetter}, // Lo [89] SYRIAC LETTER SOGDIAN ZHAIN..THAANA LETTER WAAVU {0x07A6, 0x07B0, prExtend}, // Mn [11] THAANA ABAFILI..THAANA SUKUN {0x07B1, 0x07B1, prOLetter}, // Lo THAANA LETTER NAA {0x07C0, 0x07C9, prNumeric}, // Nd [10] NKO DIGIT ZERO..NKO DIGIT NINE {0x07CA, 0x07EA, prOLetter}, // Lo [33] NKO LETTER A..NKO LETTER JONA RA {0x07EB, 0x07F3, prExtend}, // Mn [9] NKO COMBINING SHORT HIGH TONE..NKO COMBINING DOUBLE DOT ABOVE {0x07F4, 0x07F5, prOLetter}, // Lm [2] NKO HIGH TONE APOSTROPHE..NKO LOW TONE APOSTROPHE {0x07F8, 0x07F8, prSContinue}, // Po NKO COMMA {0x07F9, 0x07F9, prSTerm}, // Po NKO EXCLAMATION MARK {0x07FA, 0x07FA, prOLetter}, // Lm NKO LAJANYALAN {0x07FD, 0x07FD, prExtend}, // Mn NKO DANTAYALAN {0x0800, 0x0815, prOLetter}, // Lo [22] SAMARITAN LETTER ALAF..SAMARITAN LETTER TAAF {0x0816, 0x0819, prExtend}, // Mn [4] SAMARITAN MARK IN..SAMARITAN MARK DAGESH {0x081A, 0x081A, prOLetter}, // Lm SAMARITAN MODIFIER LETTER EPENTHETIC YUT {0x081B, 0x0823, prExtend}, // Mn [9] SAMARITAN MARK EPENTHETIC YUT..SAMARITAN VOWEL SIGN A {0x0824, 0x0824, prOLetter}, // Lm SAMARITAN MODIFIER LETTER SHORT A {0x0825, 0x0827, prExtend}, // Mn [3] SAMARITAN VOWEL SIGN SHORT A..SAMARITAN VOWEL SIGN U {0x0828, 0x0828, prOLetter}, // Lm SAMARITAN MODIFIER LETTER I {0x0829, 0x082D, prExtend}, // Mn [5] SAMARITAN VOWEL SIGN LONG I..SAMARITAN MARK NEQUDAA {0x0837, 0x0837, prSTerm}, // Po SAMARITAN PUNCTUATION MELODIC QITSA {0x0839, 0x0839, prSTerm}, // Po SAMARITAN PUNCTUATION QITSA {0x083D, 0x083E, prSTerm}, // Po [2] SAMARITAN PUNCTUATION SOF MASHFAAT..SAMARITAN PUNCTUATION ANNAAU {0x0840, 0x0858, prOLetter}, // Lo [25] MANDAIC LETTER HALQA..MANDAIC LETTER AIN {0x0859, 0x085B, prExtend}, // Mn [3] MANDAIC AFFRICATION MARK..MANDAIC GEMINATION MARK {0x0860, 0x086A, prOLetter}, // Lo [11] SYRIAC LETTER MALAYALAM NGA..SYRIAC LETTER MALAYALAM SSA {0x0870, 0x0887, prOLetter}, // Lo [24] ARABIC LETTER ALEF WITH ATTACHED FATHA..ARABIC BASELINE ROUND DOT {0x0889, 0x088E, prOLetter}, // Lo [6] ARABIC LETTER NOON WITH INVERTED SMALL V..ARABIC VERTICAL TAIL {0x0890, 0x0891, prFormat}, // Cf [2] ARABIC POUND MARK ABOVE..ARABIC PIASTRE MARK ABOVE {0x0898, 0x089F, prExtend}, // Mn [8] ARABIC SMALL HIGH WORD AL-JUZ..ARABIC HALF MADDA OVER MADDA {0x08A0, 0x08C8, prOLetter}, // Lo [41] ARABIC LETTER BEH WITH SMALL V BELOW..ARABIC LETTER GRAF {0x08C9, 0x08C9, prOLetter}, // Lm ARABIC SMALL FARSI YEH {0x08CA, 0x08E1, prExtend}, // Mn [24] ARABIC SMALL HIGH FARSI YEH..ARABIC SMALL HIGH SIGN SAFHA {0x08E2, 0x08E2, prFormat}, // Cf ARABIC DISPUTED END OF AYAH {0x08E3, 0x0902, prExtend}, // Mn [32] ARABIC TURNED DAMMA BELOW..DEVANAGARI SIGN ANUSVARA {0x0903, 0x0903, prExtend}, // Mc DEVANAGARI SIGN VISARGA {0x0904, 0x0939, prOLetter}, // Lo [54] DEVANAGARI LETTER SHORT A..DEVANAGARI LETTER HA {0x093A, 0x093A, prExtend}, // Mn DEVANAGARI VOWEL SIGN OE {0x093B, 0x093B, prExtend}, // Mc DEVANAGARI VOWEL SIGN OOE {0x093C, 0x093C, prExtend}, // Mn DEVANAGARI SIGN NUKTA {0x093D, 0x093D, prOLetter}, // Lo DEVANAGARI SIGN AVAGRAHA {0x093E, 0x0940, prExtend}, // Mc [3] DEVANAGARI VOWEL SIGN AA..DEVANAGARI VOWEL SIGN II {0x0941, 0x0948, prExtend}, // Mn [8] DEVANAGARI VOWEL SIGN U..DEVANAGARI VOWEL SIGN AI {0x0949, 0x094C, prExtend}, // Mc [4] DEVANAGARI VOWEL SIGN CANDRA O..DEVANAGARI VOWEL SIGN AU {0x094D, 0x094D, prExtend}, // Mn DEVANAGARI SIGN VIRAMA {0x094E, 0x094F, prExtend}, // Mc [2] DEVANAGARI VOWEL SIGN PRISHTHAMATRA E..DEVANAGARI VOWEL SIGN AW {0x0950, 0x0950, prOLetter}, // Lo DEVANAGARI OM {0x0951, 0x0957, prExtend}, // Mn [7] DEVANAGARI STRESS SIGN UDATTA..DEVANAGARI VOWEL SIGN UUE {0x0958, 0x0961, prOLetter}, // Lo [10] DEVANAGARI LETTER QA..DEVANAGARI LETTER VOCALIC LL {0x0962, 0x0963, prExtend}, // Mn [2] DEVANAGARI VOWEL SIGN VOCALIC L..DEVANAGARI VOWEL SIGN VOCALIC LL {0x0964, 0x0965, prSTerm}, // Po [2] DEVANAGARI DANDA..DEVANAGARI DOUBLE DANDA {0x0966, 0x096F, prNumeric}, // Nd [10] DEVANAGARI DIGIT ZERO..DEVANAGARI DIGIT NINE {0x0971, 0x0971, prOLetter}, // Lm DEVANAGARI SIGN HIGH SPACING DOT {0x0972, 0x0980, prOLetter}, // Lo [15] DEVANAGARI LETTER CANDRA A..BENGALI ANJI {0x0981, 0x0981, prExtend}, // Mn BENGALI SIGN CANDRABINDU {0x0982, 0x0983, prExtend}, // Mc [2] BENGALI SIGN ANUSVARA..BENGALI SIGN VISARGA {0x0985, 0x098C, prOLetter}, // Lo [8] BENGALI LETTER A..BENGALI LETTER VOCALIC L {0x098F, 0x0990, prOLetter}, // Lo [2] BENGALI LETTER E..BENGALI LETTER AI {0x0993, 0x09A8, prOLetter}, // Lo [22] BENGALI LETTER O..BENGALI LETTER NA {0x09AA, 0x09B0, prOLetter}, // Lo [7] BENGALI LETTER PA..BENGALI LETTER RA {0x09B2, 0x09B2, prOLetter}, // Lo BENGALI LETTER LA {0x09B6, 0x09B9, prOLetter}, // Lo [4] BENGALI LETTER SHA..BENGALI LETTER HA {0x09BC, 0x09BC, prExtend}, // Mn BENGALI SIGN NUKTA {0x09BD, 0x09BD, prOLetter}, // Lo BENGALI SIGN AVAGRAHA {0x09BE, 0x09C0, prExtend}, // Mc [3] BENGALI VOWEL SIGN AA..BENGALI VOWEL SIGN II {0x09C1, 0x09C4, prExtend}, // Mn [4] BENGALI VOWEL SIGN U..BENGALI VOWEL SIGN VOCALIC RR {0x09C7, 0x09C8, prExtend}, // Mc [2] BENGALI VOWEL SIGN E..BENGALI VOWEL SIGN AI {0x09CB, 0x09CC, prExtend}, // Mc [2] BENGALI VOWEL SIGN O..BENGALI VOWEL SIGN AU {0x09CD, 0x09CD, prExtend}, // Mn BENGALI SIGN VIRAMA {0x09CE, 0x09CE, prOLetter}, // Lo BENGALI LETTER KHANDA TA {0x09D7, 0x09D7, prExtend}, // Mc BENGALI AU LENGTH MARK {0x09DC, 0x09DD, prOLetter}, // Lo [2] BENGALI LETTER RRA..BENGALI LETTER RHA {0x09DF, 0x09E1, prOLetter}, // Lo [3] BENGALI LETTER YYA..BENGALI LETTER VOCALIC LL {0x09E2, 0x09E3, prExtend}, // Mn [2] BENGALI VOWEL SIGN VOCALIC L..BENGALI VOWEL SIGN VOCALIC LL {0x09E6, 0x09EF, prNumeric}, // Nd [10] BENGALI DIGIT ZERO..BENGALI DIGIT NINE {0x09F0, 0x09F1, prOLetter}, // Lo [2] BENGALI LETTER RA WITH MIDDLE DIAGONAL..BENGALI LETTER RA WITH LOWER DIAGONAL {0x09FC, 0x09FC, prOLetter}, // Lo BENGALI LETTER VEDIC ANUSVARA {0x09FE, 0x09FE, prExtend}, // Mn BENGALI SANDHI MARK {0x0A01, 0x0A02, prExtend}, // Mn [2] GURMUKHI SIGN ADAK BINDI..GURMUKHI SIGN BINDI {0x0A03, 0x0A03, prExtend}, // Mc GURMUKHI SIGN VISARGA {0x0A05, 0x0A0A, prOLetter}, // Lo [6] GURMUKHI LETTER A..GURMUKHI LETTER UU {0x0A0F, 0x0A10, prOLetter}, // Lo [2] GURMUKHI LETTER EE..GURMUKHI LETTER AI {0x0A13, 0x0A28, prOLetter}, // Lo [22] GURMUKHI LETTER OO..GURMUKHI LETTER NA {0x0A2A, 0x0A30, prOLetter}, // Lo [7] GURMUKHI LETTER PA..GURMUKHI LETTER RA {0x0A32, 0x0A33, prOLetter}, // Lo [2] GURMUKHI LETTER LA..GURMUKHI LETTER LLA {0x0A35, 0x0A36, prOLetter}, // Lo [2] GURMUKHI LETTER VA..GURMUKHI LETTER SHA {0x0A38, 0x0A39, prOLetter}, // Lo [2] GURMUKHI LETTER SA..GURMUKHI LETTER HA {0x0A3C, 0x0A3C, prExtend}, // Mn GURMUKHI SIGN NUKTA {0x0A3E, 0x0A40, prExtend}, // Mc [3] GURMUKHI VOWEL SIGN AA..GURMUKHI VOWEL SIGN II {0x0A41, 0x0A42, prExtend}, // Mn [2] GURMUKHI VOWEL SIGN U..GURMUKHI VOWEL SIGN UU {0x0A47, 0x0A48, prExtend}, // Mn [2] GURMUKHI VOWEL SIGN EE..GURMUKHI VOWEL SIGN AI {0x0A4B, 0x0A4D, prExtend}, // Mn [3] GURMUKHI VOWEL SIGN OO..GURMUKHI SIGN VIRAMA {0x0A51, 0x0A51, prExtend}, // Mn GURMUKHI SIGN UDAAT {0x0A59, 0x0A5C, prOLetter}, // Lo [4] GURMUKHI LETTER KHHA..GURMUKHI LETTER RRA {0x0A5E, 0x0A5E, prOLetter}, // Lo GURMUKHI LETTER FA {0x0A66, 0x0A6F, prNumeric}, // Nd [10] GURMUKHI DIGIT ZERO..GURMUKHI DIGIT NINE {0x0A70, 0x0A71, prExtend}, // Mn [2] GURMUKHI TIPPI..GURMUKHI ADDAK {0x0A72, 0x0A74, prOLetter}, // Lo [3] GURMUKHI IRI..GURMUKHI EK ONKAR {0x0A75, 0x0A75, prExtend}, // Mn GURMUKHI SIGN YAKASH {0x0A81, 0x0A82, prExtend}, // Mn [2] GUJARATI SIGN CANDRABINDU..GUJARATI SIGN ANUSVARA {0x0A83, 0x0A83, prExtend}, // Mc GUJARATI SIGN VISARGA {0x0A85, 0x0A8D, prOLetter}, // Lo [9] GUJARATI LETTER A..GUJARATI VOWEL CANDRA E {0x0A8F, 0x0A91, prOLetter}, // Lo [3] GUJARATI LETTER E..GUJARATI VOWEL CANDRA O {0x0A93, 0x0AA8, prOLetter}, // Lo [22] GUJARATI LETTER O..GUJARATI LETTER NA {0x0AAA, 0x0AB0, prOLetter}, // Lo [7] GUJARATI LETTER PA..GUJARATI LETTER RA {0x0AB2, 0x0AB3, prOLetter}, // Lo [2] GUJARATI LETTER LA..GUJARATI LETTER LLA {0x0AB5, 0x0AB9, prOLetter}, // Lo [5] GUJARATI LETTER VA..GUJARATI LETTER HA {0x0ABC, 0x0ABC, prExtend}, // Mn GUJARATI SIGN NUKTA {0x0ABD, 0x0ABD, prOLetter}, // Lo GUJARATI SIGN AVAGRAHA {0x0ABE, 0x0AC0, prExtend}, // Mc [3] GUJARATI VOWEL SIGN AA..GUJARATI VOWEL SIGN II {0x0AC1, 0x0AC5, prExtend}, // Mn [5] GUJARATI VOWEL SIGN U..GUJARATI VOWEL SIGN CANDRA E {0x0AC7, 0x0AC8, prExtend}, // Mn [2] GUJARATI VOWEL SIGN E..GUJARATI VOWEL SIGN AI {0x0AC9, 0x0AC9, prExtend}, // Mc GUJARATI VOWEL SIGN CANDRA O {0x0ACB, 0x0ACC, prExtend}, // Mc [2] GUJARATI VOWEL SIGN O..GUJARATI VOWEL SIGN AU {0x0ACD, 0x0ACD, prExtend}, // Mn GUJARATI SIGN VIRAMA {0x0AD0, 0x0AD0, prOLetter}, // Lo GUJARATI OM {0x0AE0, 0x0AE1, prOLetter}, // Lo [2] GUJARATI LETTER VOCALIC RR..GUJARATI LETTER VOCALIC LL {0x0AE2, 0x0AE3, prExtend}, // Mn [2] GUJARATI VOWEL SIGN VOCALIC L..GUJARATI VOWEL SIGN VOCALIC LL {0x0AE6, 0x0AEF, prNumeric}, // Nd [10] GUJARATI DIGIT ZERO..GUJARATI DIGIT NINE {0x0AF9, 0x0AF9, prOLetter}, // Lo GUJARATI LETTER ZHA {0x0AFA, 0x0AFF, prExtend}, // Mn [6] GUJARATI SIGN SUKUN..GUJARATI SIGN TWO-CIRCLE NUKTA ABOVE {0x0B01, 0x0B01, prExtend}, // Mn ORIYA SIGN CANDRABINDU {0x0B02, 0x0B03, prExtend}, // Mc [2] ORIYA SIGN ANUSVARA..ORIYA SIGN VISARGA {0x0B05, 0x0B0C, prOLetter}, // Lo [8] ORIYA LETTER A..ORIYA LETTER VOCALIC L {0x0B0F, 0x0B10, prOLetter}, // Lo [2] ORIYA LETTER E..ORIYA LETTER AI {0x0B13, 0x0B28, prOLetter}, // Lo [22] ORIYA LETTER O..ORIYA LETTER NA {0x0B2A, 0x0B30, prOLetter}, // Lo [7] ORIYA LETTER PA..ORIYA LETTER RA {0x0B32, 0x0B33, prOLetter}, // Lo [2] ORIYA LETTER LA..ORIYA LETTER LLA {0x0B35, 0x0B39, prOLetter}, // Lo [5] ORIYA LETTER VA..ORIYA LETTER HA {0x0B3C, 0x0B3C, prExtend}, // Mn ORIYA SIGN NUKTA {0x0B3D, 0x0B3D, prOLetter}, // Lo ORIYA SIGN AVAGRAHA {0x0B3E, 0x0B3E, prExtend}, // Mc ORIYA VOWEL SIGN AA {0x0B3F, 0x0B3F, prExtend}, // Mn ORIYA VOWEL SIGN I {0x0B40, 0x0B40, prExtend}, // Mc ORIYA VOWEL SIGN II {0x0B41, 0x0B44, prExtend}, // Mn [4] ORIYA VOWEL SIGN U..ORIYA VOWEL SIGN VOCALIC RR {0x0B47, 0x0B48, prExtend}, // Mc [2] ORIYA VOWEL SIGN E..ORIYA VOWEL SIGN AI {0x0B4B, 0x0B4C, prExtend}, // Mc [2] ORIYA VOWEL SIGN O..ORIYA VOWEL SIGN AU {0x0B4D, 0x0B4D, prExtend}, // Mn ORIYA SIGN VIRAMA {0x0B55, 0x0B56, prExtend}, // Mn [2] ORIYA SIGN OVERLINE..ORIYA AI LENGTH MARK {0x0B57, 0x0B57, prExtend}, // Mc ORIYA AU LENGTH MARK {0x0B5C, 0x0B5D, prOLetter}, // Lo [2] ORIYA LETTER RRA..ORIYA LETTER RHA {0x0B5F, 0x0B61, prOLetter}, // Lo [3] ORIYA LETTER YYA..ORIYA LETTER VOCALIC LL {0x0B62, 0x0B63, prExtend}, // Mn [2] ORIYA VOWEL SIGN VOCALIC L..ORIYA VOWEL SIGN VOCALIC LL {0x0B66, 0x0B6F, prNumeric}, // Nd [10] ORIYA DIGIT ZERO..ORIYA DIGIT NINE {0x0B71, 0x0B71, prOLetter}, // Lo ORIYA LETTER WA {0x0B82, 0x0B82, prExtend}, // Mn TAMIL SIGN ANUSVARA {0x0B83, 0x0B83, prOLetter}, // Lo TAMIL SIGN VISARGA {0x0B85, 0x0B8A, prOLetter}, // Lo [6] TAMIL LETTER A..TAMIL LETTER UU {0x0B8E, 0x0B90, prOLetter}, // Lo [3] TAMIL LETTER E..TAMIL LETTER AI {0x0B92, 0x0B95, prOLetter}, // Lo [4] TAMIL LETTER O..TAMIL LETTER KA {0x0B99, 0x0B9A, prOLetter}, // Lo [2] TAMIL LETTER NGA..TAMIL LETTER CA {0x0B9C, 0x0B9C, prOLetter}, // Lo TAMIL LETTER JA {0x0B9E, 0x0B9F, prOLetter}, // Lo [2] TAMIL LETTER NYA..TAMIL LETTER TTA {0x0BA3, 0x0BA4, prOLetter}, // Lo [2] TAMIL LETTER NNA..TAMIL LETTER TA {0x0BA8, 0x0BAA, prOLetter}, // Lo [3] TAMIL LETTER NA..TAMIL LETTER PA {0x0BAE, 0x0BB9, prOLetter}, // Lo [12] TAMIL LETTER MA..TAMIL LETTER HA {0x0BBE, 0x0BBF, prExtend}, // Mc [2] TAMIL VOWEL SIGN AA..TAMIL VOWEL SIGN I {0x0BC0, 0x0BC0, prExtend}, // Mn TAMIL VOWEL SIGN II {0x0BC1, 0x0BC2, prExtend}, // Mc [2] TAMIL VOWEL SIGN U..TAMIL VOWEL SIGN UU {0x0BC6, 0x0BC8, prExtend}, // Mc [3] TAMIL VOWEL SIGN E..TAMIL VOWEL SIGN AI {0x0BCA, 0x0BCC, prExtend}, // Mc [3] TAMIL VOWEL SIGN O..TAMIL VOWEL SIGN AU {0x0BCD, 0x0BCD, prExtend}, // Mn TAMIL SIGN VIRAMA {0x0BD0, 0x0BD0, prOLetter}, // Lo TAMIL OM {0x0BD7, 0x0BD7, prExtend}, // Mc TAMIL AU LENGTH MARK {0x0BE6, 0x0BEF, prNumeric}, // Nd [10] TAMIL DIGIT ZERO..TAMIL DIGIT NINE {0x0C00, 0x0C00, prExtend}, // Mn TELUGU SIGN COMBINING CANDRABINDU ABOVE {0x0C01, 0x0C03, prExtend}, // Mc [3] TELUGU SIGN CANDRABINDU..TELUGU SIGN VISARGA {0x0C04, 0x0C04, prExtend}, // Mn TELUGU SIGN COMBINING ANUSVARA ABOVE {0x0C05, 0x0C0C, prOLetter}, // Lo [8] TELUGU LETTER A..TELUGU LETTER VOCALIC L {0x0C0E, 0x0C10, prOLetter}, // Lo [3] TELUGU LETTER E..TELUGU LETTER AI {0x0C12, 0x0C28, prOLetter}, // Lo [23] TELUGU LETTER O..TELUGU LETTER NA {0x0C2A, 0x0C39, prOLetter}, // Lo [16] TELUGU LETTER PA..TELUGU LETTER HA {0x0C3C, 0x0C3C, prExtend}, // Mn TELUGU SIGN NUKTA {0x0C3D, 0x0C3D, prOLetter}, // Lo TELUGU SIGN AVAGRAHA {0x0C3E, 0x0C40, prExtend}, // Mn [3] TELUGU VOWEL SIGN AA..TELUGU VOWEL SIGN II {0x0C41, 0x0C44, prExtend}, // Mc [4] TELUGU VOWEL SIGN U..TELUGU VOWEL SIGN VOCALIC RR {0x0C46, 0x0C48, prExtend}, // Mn [3] TELUGU VOWEL SIGN E..TELUGU VOWEL SIGN AI {0x0C4A, 0x0C4D, prExtend}, // Mn [4] TELUGU VOWEL SIGN O..TELUGU SIGN VIRAMA {0x0C55, 0x0C56, prExtend}, // Mn [2] TELUGU LENGTH MARK..TELUGU AI LENGTH MARK {0x0C58, 0x0C5A, prOLetter}, // Lo [3] TELUGU LETTER TSA..TELUGU LETTER RRRA {0x0C5D, 0x0C5D, prOLetter}, // Lo TELUGU LETTER NAKAARA POLLU {0x0C60, 0x0C61, prOLetter}, // Lo [2] TELUGU LETTER VOCALIC RR..TELUGU LETTER VOCALIC LL {0x0C62, 0x0C63, prExtend}, // Mn [2] TELUGU VOWEL SIGN VOCALIC L..TELUGU VOWEL SIGN VOCALIC LL {0x0C66, 0x0C6F, prNumeric}, // Nd [10] TELUGU DIGIT ZERO..TELUGU DIGIT NINE {0x0C80, 0x0C80, prOLetter}, // Lo KANNADA SIGN SPACING CANDRABINDU {0x0C81, 0x0C81, prExtend}, // Mn KANNADA SIGN CANDRABINDU {0x0C82, 0x0C83, prExtend}, // Mc [2] KANNADA SIGN ANUSVARA..KANNADA SIGN VISARGA {0x0C85, 0x0C8C, prOLetter}, // Lo [8] KANNADA LETTER A..KANNADA LETTER VOCALIC L {0x0C8E, 0x0C90, prOLetter}, // Lo [3] KANNADA LETTER E..KANNADA LETTER AI {0x0C92, 0x0CA8, prOLetter}, // Lo [23] KANNADA LETTER O..KANNADA LETTER NA {0x0CAA, 0x0CB3, prOLetter}, // Lo [10] KANNADA LETTER PA..KANNADA LETTER LLA {0x0CB5, 0x0CB9, prOLetter}, // Lo [5] KANNADA LETTER VA..KANNADA LETTER HA {0x0CBC, 0x0CBC, prExtend}, // Mn KANNADA SIGN NUKTA {0x0CBD, 0x0CBD, prOLetter}, // Lo KANNADA SIGN AVAGRAHA {0x0CBE, 0x0CBE, prExtend}, // Mc KANNADA VOWEL SIGN AA {0x0CBF, 0x0CBF, prExtend}, // Mn KANNADA VOWEL SIGN I {0x0CC0, 0x0CC4, prExtend}, // Mc [5] KANNADA VOWEL SIGN II..KANNADA VOWEL SIGN VOCALIC RR {0x0CC6, 0x0CC6, prExtend}, // Mn KANNADA VOWEL SIGN E {0x0CC7, 0x0CC8, prExtend}, // Mc [2] KANNADA VOWEL SIGN EE..KANNADA VOWEL SIGN AI {0x0CCA, 0x0CCB, prExtend}, // Mc [2] KANNADA VOWEL SIGN O..KANNADA VOWEL SIGN OO {0x0CCC, 0x0CCD, prExtend}, // Mn [2] KANNADA VOWEL SIGN AU..KANNADA SIGN VIRAMA {0x0CD5, 0x0CD6, prExtend}, // Mc [2] KANNADA LENGTH MARK..KANNADA AI LENGTH MARK {0x0CDD, 0x0CDE, prOLetter}, // Lo [2] KANNADA LETTER NAKAARA POLLU..KANNADA LETTER FA {0x0CE0, 0x0CE1, prOLetter}, // Lo [2] KANNADA LETTER VOCALIC RR..KANNADA LETTER VOCALIC LL {0x0CE2, 0x0CE3, prExtend}, // Mn [2] KANNADA VOWEL SIGN VOCALIC L..KANNADA VOWEL SIGN VOCALIC LL {0x0CE6, 0x0CEF, prNumeric}, // Nd [10] KANNADA DIGIT ZERO..KANNADA DIGIT NINE {0x0CF1, 0x0CF2, prOLetter}, // Lo [2] KANNADA SIGN JIHVAMULIYA..KANNADA SIGN UPADHMANIYA {0x0CF3, 0x0CF3, prExtend}, // Mc KANNADA SIGN COMBINING ANUSVARA ABOVE RIGHT {0x0D00, 0x0D01, prExtend}, // Mn [2] MALAYALAM SIGN COMBINING ANUSVARA ABOVE..MALAYALAM SIGN CANDRABINDU {0x0D02, 0x0D03, prExtend}, // Mc [2] MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA {0x0D04, 0x0D0C, prOLetter}, // Lo [9] MALAYALAM LETTER VEDIC ANUSVARA..MALAYALAM LETTER VOCALIC L {0x0D0E, 0x0D10, prOLetter}, // Lo [3] MALAYALAM LETTER E..MALAYALAM LETTER AI {0x0D12, 0x0D3A, prOLetter}, // Lo [41] MALAYALAM LETTER O..MALAYALAM LETTER TTTA {0x0D3B, 0x0D3C, prExtend}, // Mn [2] MALAYALAM SIGN VERTICAL BAR VIRAMA..MALAYALAM SIGN CIRCULAR VIRAMA {0x0D3D, 0x0D3D, prOLetter}, // Lo MALAYALAM SIGN AVAGRAHA {0x0D3E, 0x0D40, prExtend}, // Mc [3] MALAYALAM VOWEL SIGN AA..MALAYALAM VOWEL SIGN II {0x0D41, 0x0D44, prExtend}, // Mn [4] MALAYALAM VOWEL SIGN U..MALAYALAM VOWEL SIGN VOCALIC RR {0x0D46, 0x0D48, prExtend}, // Mc [3] MALAYALAM VOWEL SIGN E..MALAYALAM VOWEL SIGN AI {0x0D4A, 0x0D4C, prExtend}, // Mc [3] MALAYALAM VOWEL SIGN O..MALAYALAM VOWEL SIGN AU {0x0D4D, 0x0D4D, prExtend}, // Mn MALAYALAM SIGN VIRAMA {0x0D4E, 0x0D4E, prOLetter}, // Lo MALAYALAM LETTER DOT REPH {0x0D54, 0x0D56, prOLetter}, // Lo [3] MALAYALAM LETTER CHILLU M..MALAYALAM LETTER CHILLU LLL {0x0D57, 0x0D57, prExtend}, // Mc MALAYALAM AU LENGTH MARK {0x0D5F, 0x0D61, prOLetter}, // Lo [3] MALAYALAM LETTER ARCHAIC II..MALAYALAM LETTER VOCALIC LL {0x0D62, 0x0D63, prExtend}, // Mn [2] MALAYALAM VOWEL SIGN VOCALIC L..MALAYALAM VOWEL SIGN VOCALIC LL {0x0D66, 0x0D6F, prNumeric}, // Nd [10] MALAYALAM DIGIT ZERO..MALAYALAM DIGIT NINE {0x0D7A, 0x0D7F, prOLetter}, // Lo [6] MALAYALAM LETTER CHILLU NN..MALAYALAM LETTER CHILLU K {0x0D81, 0x0D81, prExtend}, // Mn SINHALA SIGN CANDRABINDU {0x0D82, 0x0D83, prExtend}, // Mc [2] SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARGAYA {0x0D85, 0x0D96, prOLetter}, // Lo [18] SINHALA LETTER AYANNA..SINHALA LETTER AUYANNA {0x0D9A, 0x0DB1, prOLetter}, // Lo [24] SINHALA LETTER ALPAPRAANA KAYANNA..SINHALA LETTER DANTAJA NAYANNA {0x0DB3, 0x0DBB, prOLetter}, // Lo [9] SINHALA LETTER SANYAKA DAYANNA..SINHALA LETTER RAYANNA {0x0DBD, 0x0DBD, prOLetter}, // Lo SINHALA LETTER DANTAJA LAYANNA {0x0DC0, 0x0DC6, prOLetter}, // Lo [7] SINHALA LETTER VAYANNA..SINHALA LETTER FAYANNA {0x0DCA, 0x0DCA, prExtend}, // Mn SINHALA SIGN AL-LAKUNA {0x0DCF, 0x0DD1, prExtend}, // Mc [3] SINHALA VOWEL SIGN AELA-PILLA..SINHALA VOWEL SIGN DIGA AEDA-PILLA {0x0DD2, 0x0DD4, prExtend}, // Mn [3] SINHALA VOWEL SIGN KETTI IS-PILLA..SINHALA VOWEL SIGN KETTI PAA-PILLA {0x0DD6, 0x0DD6, prExtend}, // Mn SINHALA VOWEL SIGN DIGA PAA-PILLA {0x0DD8, 0x0DDF, prExtend}, // Mc [8] SINHALA VOWEL SIGN GAETTA-PILLA..SINHALA VOWEL SIGN GAYANUKITTA {0x0DE6, 0x0DEF, prNumeric}, // Nd [10] SINHALA LITH DIGIT ZERO..SINHALA LITH DIGIT NINE {0x0DF2, 0x0DF3, prExtend}, // Mc [2] SINHALA VOWEL SIGN DIGA GAETTA-PILLA..SINHALA VOWEL SIGN DIGA GAYANUKITTA {0x0E01, 0x0E30, prOLetter}, // Lo [48] THAI CHARACTER KO KAI..THAI CHARACTER SARA A {0x0E31, 0x0E31, prExtend}, // Mn THAI CHARACTER MAI HAN-AKAT {0x0E32, 0x0E33, prOLetter}, // Lo [2] THAI CHARACTER SARA AA..THAI CHARACTER SARA AM {0x0E34, 0x0E3A, prExtend}, // Mn [7] THAI CHARACTER SARA I..THAI CHARACTER PHINTHU {0x0E40, 0x0E45, prOLetter}, // Lo [6] THAI CHARACTER SARA E..THAI CHARACTER LAKKHANGYAO {0x0E46, 0x0E46, prOLetter}, // Lm THAI CHARACTER MAIYAMOK {0x0E47, 0x0E4E, prExtend}, // Mn [8] THAI CHARACTER MAITAIKHU..THAI CHARACTER YAMAKKAN {0x0E50, 0x0E59, prNumeric}, // Nd [10] THAI DIGIT ZERO..THAI DIGIT NINE {0x0E81, 0x0E82, prOLetter}, // Lo [2] LAO LETTER KO..LAO LETTER KHO SUNG {0x0E84, 0x0E84, prOLetter}, // Lo LAO LETTER KHO TAM {0x0E86, 0x0E8A, prOLetter}, // Lo [5] LAO LETTER PALI GHA..LAO LETTER SO TAM {0x0E8C, 0x0EA3, prOLetter}, // Lo [24] LAO LETTER PALI JHA..LAO LETTER LO LING {0x0EA5, 0x0EA5, prOLetter}, // Lo LAO LETTER LO LOOT {0x0EA7, 0x0EB0, prOLetter}, // Lo [10] LAO LETTER WO..LAO VOWEL SIGN A {0x0EB1, 0x0EB1, prExtend}, // Mn LAO VOWEL SIGN MAI KAN {0x0EB2, 0x0EB3, prOLetter}, // Lo [2] LAO VOWEL SIGN AA..LAO VOWEL SIGN AM {0x0EB4, 0x0EBC, prExtend}, // Mn [9] LAO VOWEL SIGN I..LAO SEMIVOWEL SIGN LO {0x0EBD, 0x0EBD, prOLetter}, // Lo LAO SEMIVOWEL SIGN NYO {0x0EC0, 0x0EC4, prOLetter}, // Lo [5] LAO VOWEL SIGN E..LAO VOWEL SIGN AI {0x0EC6, 0x0EC6, prOLetter}, // Lm LAO KO LA {0x0EC8, 0x0ECE, prExtend}, // Mn [7] LAO TONE MAI EK..LAO YAMAKKAN {0x0ED0, 0x0ED9, prNumeric}, // Nd [10] LAO DIGIT ZERO..LAO DIGIT NINE {0x0EDC, 0x0EDF, prOLetter}, // Lo [4] LAO HO NO..LAO LETTER KHMU NYO {0x0F00, 0x0F00, prOLetter}, // Lo TIBETAN SYLLABLE OM {0x0F18, 0x0F19, prExtend}, // Mn [2] TIBETAN ASTROLOGICAL SIGN -KHYUD PA..TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS {0x0F20, 0x0F29, prNumeric}, // Nd [10] TIBETAN DIGIT ZERO..TIBETAN DIGIT NINE {0x0F35, 0x0F35, prExtend}, // Mn TIBETAN MARK NGAS BZUNG NYI ZLA {0x0F37, 0x0F37, prExtend}, // Mn TIBETAN MARK NGAS BZUNG SGOR RTAGS {0x0F39, 0x0F39, prExtend}, // Mn TIBETAN MARK TSA -PHRU {0x0F3A, 0x0F3A, prClose}, // Ps TIBETAN MARK GUG RTAGS GYON {0x0F3B, 0x0F3B, prClose}, // Pe TIBETAN MARK GUG RTAGS GYAS {0x0F3C, 0x0F3C, prClose}, // Ps TIBETAN MARK ANG KHANG GYON {0x0F3D, 0x0F3D, prClose}, // Pe TIBETAN MARK ANG KHANG GYAS {0x0F3E, 0x0F3F, prExtend}, // Mc [2] TIBETAN SIGN YAR TSHES..TIBETAN SIGN MAR TSHES {0x0F40, 0x0F47, prOLetter}, // Lo [8] TIBETAN LETTER KA..TIBETAN LETTER JA {0x0F49, 0x0F6C, prOLetter}, // Lo [36] TIBETAN LETTER NYA..TIBETAN LETTER RRA {0x0F71, 0x0F7E, prExtend}, // Mn [14] TIBETAN VOWEL SIGN AA..TIBETAN SIGN RJES SU NGA RO {0x0F7F, 0x0F7F, prExtend}, // Mc TIBETAN SIGN RNAM BCAD {0x0F80, 0x0F84, prExtend}, // Mn [5] TIBETAN VOWEL SIGN REVERSED I..TIBETAN MARK HALANTA {0x0F86, 0x0F87, prExtend}, // Mn [2] TIBETAN SIGN LCI RTAGS..TIBETAN SIGN YANG RTAGS {0x0F88, 0x0F8C, prOLetter}, // Lo [5] TIBETAN SIGN LCE TSA CAN..TIBETAN SIGN INVERTED MCHU CAN {0x0F8D, 0x0F97, prExtend}, // Mn [11] TIBETAN SUBJOINED SIGN LCE TSA CAN..TIBETAN SUBJOINED LETTER JA {0x0F99, 0x0FBC, prExtend}, // Mn [36] TIBETAN SUBJOINED LETTER NYA..TIBETAN SUBJOINED LETTER FIXED-FORM RA {0x0FC6, 0x0FC6, prExtend}, // Mn TIBETAN SYMBOL PADMA GDAN {0x1000, 0x102A, prOLetter}, // Lo [43] MYANMAR LETTER KA..MYANMAR LETTER AU {0x102B, 0x102C, prExtend}, // Mc [2] MYANMAR VOWEL SIGN TALL AA..MYANMAR VOWEL SIGN AA {0x102D, 0x1030, prExtend}, // Mn [4] MYANMAR VOWEL SIGN I..MYANMAR VOWEL SIGN UU {0x1031, 0x1031, prExtend}, // Mc MYANMAR VOWEL SIGN E {0x1032, 0x1037, prExtend}, // Mn [6] MYANMAR VOWEL SIGN AI..MYANMAR SIGN DOT BELOW {0x1038, 0x1038, prExtend}, // Mc MYANMAR SIGN VISARGA {0x1039, 0x103A, prExtend}, // Mn [2] MYANMAR SIGN VIRAMA..MYANMAR SIGN ASAT {0x103B, 0x103C, prExtend}, // Mc [2] MYANMAR CONSONANT SIGN MEDIAL YA..MYANMAR CONSONANT SIGN MEDIAL RA {0x103D, 0x103E, prExtend}, // Mn [2] MYANMAR CONSONANT SIGN MEDIAL WA..MYANMAR CONSONANT SIGN MEDIAL HA {0x103F, 0x103F, prOLetter}, // Lo MYANMAR LETTER GREAT SA {0x1040, 0x1049, prNumeric}, // Nd [10] MYANMAR DIGIT ZERO..MYANMAR DIGIT NINE {0x104A, 0x104B, prSTerm}, // Po [2] MYANMAR SIGN LITTLE SECTION..MYANMAR SIGN SECTION {0x1050, 0x1055, prOLetter}, // Lo [6] MYANMAR LETTER SHA..MYANMAR LETTER VOCALIC LL {0x1056, 0x1057, prExtend}, // Mc [2] MYANMAR VOWEL SIGN VOCALIC R..MYANMAR VOWEL SIGN VOCALIC RR {0x1058, 0x1059, prExtend}, // Mn [2] MYANMAR VOWEL SIGN VOCALIC L..MYANMAR VOWEL SIGN VOCALIC LL {0x105A, 0x105D, prOLetter}, // Lo [4] MYANMAR LETTER MON NGA..MYANMAR LETTER MON BBE {0x105E, 0x1060, prExtend}, // Mn [3] MYANMAR CONSONANT SIGN MON MEDIAL NA..MYANMAR CONSONANT SIGN MON MEDIAL LA {0x1061, 0x1061, prOLetter}, // Lo MYANMAR LETTER SGAW KAREN SHA {0x1062, 0x1064, prExtend}, // Mc [3] MYANMAR VOWEL SIGN SGAW KAREN EU..MYANMAR TONE MARK SGAW KAREN KE PHO {0x1065, 0x1066, prOLetter}, // Lo [2] MYANMAR LETTER WESTERN PWO KAREN THA..MYANMAR LETTER WESTERN PWO KAREN PWA {0x1067, 0x106D, prExtend}, // Mc [7] MYANMAR VOWEL SIGN WESTERN PWO KAREN EU..MYANMAR SIGN WESTERN PWO KAREN TONE-5 {0x106E, 0x1070, prOLetter}, // Lo [3] MYANMAR LETTER EASTERN PWO KAREN NNA..MYANMAR LETTER EASTERN PWO KAREN GHWA {0x1071, 0x1074, prExtend}, // Mn [4] MYANMAR VOWEL SIGN GEBA KAREN I..MYANMAR VOWEL SIGN KAYAH EE {0x1075, 0x1081, prOLetter}, // Lo [13] MYANMAR LETTER SHAN KA..MYANMAR LETTER SHAN HA {0x1082, 0x1082, prExtend}, // Mn MYANMAR CONSONANT SIGN SHAN MEDIAL WA {0x1083, 0x1084, prExtend}, // Mc [2] MYANMAR VOWEL SIGN SHAN AA..MYANMAR VOWEL SIGN SHAN E {0x1085, 0x1086, prExtend}, // Mn [2] MYANMAR VOWEL SIGN SHAN E ABOVE..MYANMAR VOWEL SIGN SHAN FINAL Y {0x1087, 0x108C, prExtend}, // Mc [6] MYANMAR SIGN SHAN TONE-2..MYANMAR SIGN SHAN COUNCIL TONE-3 {0x108D, 0x108D, prExtend}, // Mn MYANMAR SIGN SHAN COUNCIL EMPHATIC TONE {0x108E, 0x108E, prOLetter}, // Lo MYANMAR LETTER RUMAI PALAUNG FA {0x108F, 0x108F, prExtend}, // Mc MYANMAR SIGN RUMAI PALAUNG TONE-5 {0x1090, 0x1099, prNumeric}, // Nd [10] MYANMAR SHAN DIGIT ZERO..MYANMAR SHAN DIGIT NINE {0x109A, 0x109C, prExtend}, // Mc [3] MYANMAR SIGN KHAMTI TONE-1..MYANMAR VOWEL SIGN AITON A {0x109D, 0x109D, prExtend}, // Mn MYANMAR VOWEL SIGN AITON AI {0x10A0, 0x10C5, prUpper}, // L& [38] GEORGIAN CAPITAL LETTER AN..GEORGIAN CAPITAL LETTER HOE {0x10C7, 0x10C7, prUpper}, // L& GEORGIAN CAPITAL LETTER YN {0x10CD, 0x10CD, prUpper}, // L& GEORGIAN CAPITAL LETTER AEN {0x10D0, 0x10FA, prOLetter}, // L& [43] GEORGIAN LETTER AN..GEORGIAN LETTER AIN {0x10FC, 0x10FC, prLower}, // Lm MODIFIER LETTER GEORGIAN NAR {0x10FD, 0x10FF, prOLetter}, // L& [3] GEORGIAN LETTER AEN..GEORGIAN LETTER LABIAL SIGN {0x1100, 0x1248, prOLetter}, // Lo [329] HANGUL CHOSEONG KIYEOK..ETHIOPIC SYLLABLE QWA {0x124A, 0x124D, prOLetter}, // Lo [4] ETHIOPIC SYLLABLE QWI..ETHIOPIC SYLLABLE QWE {0x1250, 0x1256, prOLetter}, // Lo [7] ETHIOPIC SYLLABLE QHA..ETHIOPIC SYLLABLE QHO {0x1258, 0x1258, prOLetter}, // Lo ETHIOPIC SYLLABLE QHWA {0x125A, 0x125D, prOLetter}, // Lo [4] ETHIOPIC SYLLABLE QHWI..ETHIOPIC SYLLABLE QHWE {0x1260, 0x1288, prOLetter}, // Lo [41] ETHIOPIC SYLLABLE BA..ETHIOPIC SYLLABLE XWA {0x128A, 0x128D, prOLetter}, // Lo [4] ETHIOPIC SYLLABLE XWI..ETHIOPIC SYLLABLE XWE {0x1290, 0x12B0, prOLetter}, // Lo [33] ETHIOPIC SYLLABLE NA..ETHIOPIC SYLLABLE KWA {0x12B2, 0x12B5, prOLetter}, // Lo [4] ETHIOPIC SYLLABLE KWI..ETHIOPIC SYLLABLE KWE {0x12B8, 0x12BE, prOLetter}, // Lo [7] ETHIOPIC SYLLABLE KXA..ETHIOPIC SYLLABLE KXO {0x12C0, 0x12C0, prOLetter}, // Lo ETHIOPIC SYLLABLE KXWA {0x12C2, 0x12C5, prOLetter}, // Lo [4] ETHIOPIC SYLLABLE KXWI..ETHIOPIC SYLLABLE KXWE {0x12C8, 0x12D6, prOLetter}, // Lo [15] ETHIOPIC SYLLABLE WA..ETHIOPIC SYLLABLE PHARYNGEAL O {0x12D8, 0x1310, prOLetter}, // Lo [57] ETHIOPIC SYLLABLE ZA..ETHIOPIC SYLLABLE GWA {0x1312, 0x1315, prOLetter}, // Lo [4] ETHIOPIC SYLLABLE GWI..ETHIOPIC SYLLABLE GWE {0x1318, 0x135A, prOLetter}, // Lo [67] ETHIOPIC SYLLABLE GGA..ETHIOPIC SYLLABLE FYA {0x135D, 0x135F, prExtend}, // Mn [3] ETHIOPIC COMBINING GEMINATION AND VOWEL LENGTH MARK..ETHIOPIC COMBINING GEMINATION MARK {0x1362, 0x1362, prSTerm}, // Po ETHIOPIC FULL STOP {0x1367, 0x1368, prSTerm}, // Po [2] ETHIOPIC QUESTION MARK..ETHIOPIC PARAGRAPH SEPARATOR {0x1380, 0x138F, prOLetter}, // Lo [16] ETHIOPIC SYLLABLE SEBATBEIT MWA..ETHIOPIC SYLLABLE PWE {0x13A0, 0x13F5, prUpper}, // L& [86] CHEROKEE LETTER A..CHEROKEE LETTER MV {0x13F8, 0x13FD, prLower}, // L& [6] CHEROKEE SMALL LETTER YE..CHEROKEE SMALL LETTER MV {0x1401, 0x166C, prOLetter}, // Lo [620] CANADIAN SYLLABICS E..CANADIAN SYLLABICS CARRIER TTSA {0x166E, 0x166E, prSTerm}, // Po CANADIAN SYLLABICS FULL STOP {0x166F, 0x167F, prOLetter}, // Lo [17] CANADIAN SYLLABICS QAI..CANADIAN SYLLABICS BLACKFOOT W {0x1680, 0x1680, prSp}, // Zs OGHAM SPACE MARK {0x1681, 0x169A, prOLetter}, // Lo [26] OGHAM LETTER BEITH..OGHAM LETTER PEITH {0x169B, 0x169B, prClose}, // Ps OGHAM FEATHER MARK {0x169C, 0x169C, prClose}, // Pe OGHAM REVERSED FEATHER MARK {0x16A0, 0x16EA, prOLetter}, // Lo [75] RUNIC LETTER FEHU FEOH FE F..RUNIC LETTER X {0x16EE, 0x16F0, prOLetter}, // Nl [3] RUNIC ARLAUG SYMBOL..RUNIC BELGTHOR SYMBOL {0x16F1, 0x16F8, prOLetter}, // Lo [8] RUNIC LETTER K..RUNIC LETTER FRANKS CASKET AESC {0x1700, 0x1711, prOLetter}, // Lo [18] TAGALOG LETTER A..TAGALOG LETTER HA {0x1712, 0x1714, prExtend}, // Mn [3] TAGALOG VOWEL SIGN I..TAGALOG SIGN VIRAMA {0x1715, 0x1715, prExtend}, // Mc TAGALOG SIGN PAMUDPOD {0x171F, 0x1731, prOLetter}, // Lo [19] TAGALOG LETTER ARCHAIC RA..HANUNOO LETTER HA {0x1732, 0x1733, prExtend}, // Mn [2] HANUNOO VOWEL SIGN I..HANUNOO VOWEL SIGN U {0x1734, 0x1734, prExtend}, // Mc HANUNOO SIGN PAMUDPOD {0x1735, 0x1736, prSTerm}, // Po [2] PHILIPPINE SINGLE PUNCTUATION..PHILIPPINE DOUBLE PUNCTUATION {0x1740, 0x1751, prOLetter}, // Lo [18] BUHID LETTER A..BUHID LETTER HA {0x1752, 0x1753, prExtend}, // Mn [2] BUHID VOWEL SIGN I..BUHID VOWEL SIGN U {0x1760, 0x176C, prOLetter}, // Lo [13] TAGBANWA LETTER A..TAGBANWA LETTER YA {0x176E, 0x1770, prOLetter}, // Lo [3] TAGBANWA LETTER LA..TAGBANWA LETTER SA {0x1772, 0x1773, prExtend}, // Mn [2] TAGBANWA VOWEL SIGN I..TAGBANWA VOWEL SIGN U {0x1780, 0x17B3, prOLetter}, // Lo [52] KHMER LETTER KA..KHMER INDEPENDENT VOWEL QAU {0x17B4, 0x17B5, prExtend}, // Mn [2] KHMER VOWEL INHERENT AQ..KHMER VOWEL INHERENT AA {0x17B6, 0x17B6, prExtend}, // Mc KHMER VOWEL SIGN AA {0x17B7, 0x17BD, prExtend}, // Mn [7] KHMER VOWEL SIGN I..KHMER VOWEL SIGN UA {0x17BE, 0x17C5, prExtend}, // Mc [8] KHMER VOWEL SIGN OE..KHMER VOWEL SIGN AU {0x17C6, 0x17C6, prExtend}, // Mn KHMER SIGN NIKAHIT {0x17C7, 0x17C8, prExtend}, // Mc [2] KHMER SIGN REAHMUK..KHMER SIGN YUUKALEAPINTU {0x17C9, 0x17D3, prExtend}, // Mn [11] KHMER SIGN MUUSIKATOAN..KHMER SIGN BATHAMASAT {0x17D7, 0x17D7, prOLetter}, // Lm KHMER SIGN LEK TOO {0x17DC, 0x17DC, prOLetter}, // Lo KHMER SIGN AVAKRAHASANYA {0x17DD, 0x17DD, prExtend}, // Mn KHMER SIGN ATTHACAN {0x17E0, 0x17E9, prNumeric}, // Nd [10] KHMER DIGIT ZERO..KHMER DIGIT NINE {0x1802, 0x1802, prSContinue}, // Po MONGOLIAN COMMA {0x1803, 0x1803, prSTerm}, // Po MONGOLIAN FULL STOP {0x1808, 0x1808, prSContinue}, // Po MONGOLIAN MANCHU COMMA {0x1809, 0x1809, prSTerm}, // Po MONGOLIAN MANCHU FULL STOP {0x180B, 0x180D, prExtend}, // Mn [3] MONGOLIAN FREE VARIATION SELECTOR ONE..MONGOLIAN FREE VARIATION SELECTOR THREE {0x180E, 0x180E, prFormat}, // Cf MONGOLIAN VOWEL SEPARATOR {0x180F, 0x180F, prExtend}, // Mn MONGOLIAN FREE VARIATION SELECTOR FOUR {0x1810, 0x1819, prNumeric}, // Nd [10] MONGOLIAN DIGIT ZERO..MONGOLIAN DIGIT NINE {0x1820, 0x1842, prOLetter}, // Lo [35] MONGOLIAN LETTER A..MONGOLIAN LETTER CHI {0x1843, 0x1843, prOLetter}, // Lm MONGOLIAN LETTER TODO LONG VOWEL SIGN {0x1844, 0x1878, prOLetter}, // Lo [53] MONGOLIAN LETTER TODO E..MONGOLIAN LETTER CHA WITH TWO DOTS {0x1880, 0x1884, prOLetter}, // Lo [5] MONGOLIAN LETTER ALI GALI ANUSVARA ONE..MONGOLIAN LETTER ALI GALI INVERTED UBADAMA {0x1885, 0x1886, prExtend}, // Mn [2] MONGOLIAN LETTER ALI GALI BALUDA..MONGOLIAN LETTER ALI GALI THREE BALUDA {0x1887, 0x18A8, prOLetter}, // Lo [34] MONGOLIAN LETTER ALI GALI A..MONGOLIAN LETTER MANCHU ALI GALI BHA {0x18A9, 0x18A9, prExtend}, // Mn MONGOLIAN LETTER ALI GALI DAGALGA {0x18AA, 0x18AA, prOLetter}, // Lo MONGOLIAN LETTER MANCHU ALI GALI LHA {0x18B0, 0x18F5, prOLetter}, // Lo [70] CANADIAN SYLLABICS OY..CANADIAN SYLLABICS CARRIER DENTAL S {0x1900, 0x191E, prOLetter}, // Lo [31] LIMBU VOWEL-CARRIER LETTER..LIMBU LETTER TRA {0x1920, 0x1922, prExtend}, // Mn [3] LIMBU VOWEL SIGN A..LIMBU VOWEL SIGN U {0x1923, 0x1926, prExtend}, // Mc [4] LIMBU VOWEL SIGN EE..LIMBU VOWEL SIGN AU {0x1927, 0x1928, prExtend}, // Mn [2] LIMBU VOWEL SIGN E..LIMBU VOWEL SIGN O {0x1929, 0x192B, prExtend}, // Mc [3] LIMBU SUBJOINED LETTER YA..LIMBU SUBJOINED LETTER WA {0x1930, 0x1931, prExtend}, // Mc [2] LIMBU SMALL LETTER KA..LIMBU SMALL LETTER NGA {0x1932, 0x1932, prExtend}, // Mn LIMBU SMALL LETTER ANUSVARA {0x1933, 0x1938, prExtend}, // Mc [6] LIMBU SMALL LETTER TA..LIMBU SMALL LETTER LA {0x1939, 0x193B, prExtend}, // Mn [3] LIMBU SIGN MUKPHRENG..LIMBU SIGN SA-I {0x1944, 0x1945, prSTerm}, // Po [2] LIMBU EXCLAMATION MARK..LIMBU QUESTION MARK {0x1946, 0x194F, prNumeric}, // Nd [10] LIMBU DIGIT ZERO..LIMBU DIGIT NINE {0x1950, 0x196D, prOLetter}, // Lo [30] TAI LE LETTER KA..TAI LE LETTER AI {0x1970, 0x1974, prOLetter}, // Lo [5] TAI LE LETTER TONE-2..TAI LE LETTER TONE-6 {0x1980, 0x19AB, prOLetter}, // Lo [44] NEW TAI LUE LETTER HIGH QA..NEW TAI LUE LETTER LOW SUA {0x19B0, 0x19C9, prOLetter}, // Lo [26] NEW TAI LUE VOWEL SIGN VOWEL SHORTENER..NEW TAI LUE TONE MARK-2 {0x19D0, 0x19D9, prNumeric}, // Nd [10] NEW TAI LUE DIGIT ZERO..NEW TAI LUE DIGIT NINE {0x1A00, 0x1A16, prOLetter}, // Lo [23] BUGINESE LETTER KA..BUGINESE LETTER HA {0x1A17, 0x1A18, prExtend}, // Mn [2] BUGINESE VOWEL SIGN I..BUGINESE VOWEL SIGN U {0x1A19, 0x1A1A, prExtend}, // Mc [2] BUGINESE VOWEL SIGN E..BUGINESE VOWEL SIGN O {0x1A1B, 0x1A1B, prExtend}, // Mn BUGINESE VOWEL SIGN AE {0x1A20, 0x1A54, prOLetter}, // Lo [53] TAI THAM LETTER HIGH KA..TAI THAM LETTER GREAT SA {0x1A55, 0x1A55, prExtend}, // Mc TAI THAM CONSONANT SIGN MEDIAL RA {0x1A56, 0x1A56, prExtend}, // Mn TAI THAM CONSONANT SIGN MEDIAL LA {0x1A57, 0x1A57, prExtend}, // Mc TAI THAM CONSONANT SIGN LA TANG LAI {0x1A58, 0x1A5E, prExtend}, // Mn [7] TAI THAM SIGN MAI KANG LAI..TAI THAM CONSONANT SIGN SA {0x1A60, 0x1A60, prExtend}, // Mn TAI THAM SIGN SAKOT {0x1A61, 0x1A61, prExtend}, // Mc TAI THAM VOWEL SIGN A {0x1A62, 0x1A62, prExtend}, // Mn TAI THAM VOWEL SIGN MAI SAT {0x1A63, 0x1A64, prExtend}, // Mc [2] TAI THAM VOWEL SIGN AA..TAI THAM VOWEL SIGN TALL AA {0x1A65, 0x1A6C, prExtend}, // Mn [8] TAI THAM VOWEL SIGN I..TAI THAM VOWEL SIGN OA BELOW {0x1A6D, 0x1A72, prExtend}, // Mc [6] TAI THAM VOWEL SIGN OY..TAI THAM VOWEL SIGN THAM AI {0x1A73, 0x1A7C, prExtend}, // Mn [10] TAI THAM VOWEL SIGN OA ABOVE..TAI THAM SIGN KHUEN-LUE KARAN {0x1A7F, 0x1A7F, prExtend}, // Mn TAI THAM COMBINING CRYPTOGRAMMIC DOT {0x1A80, 0x1A89, prNumeric}, // Nd [10] TAI THAM HORA DIGIT ZERO..TAI THAM HORA DIGIT NINE {0x1A90, 0x1A99, prNumeric}, // Nd [10] TAI THAM THAM DIGIT ZERO..TAI THAM THAM DIGIT NINE {0x1AA7, 0x1AA7, prOLetter}, // Lm TAI THAM SIGN MAI YAMOK {0x1AA8, 0x1AAB, prSTerm}, // Po [4] TAI THAM SIGN KAAN..TAI THAM SIGN SATKAANKUU {0x1AB0, 0x1ABD, prExtend}, // Mn [14] COMBINING DOUBLED CIRCUMFLEX ACCENT..COMBINING PARENTHESES BELOW {0x1ABE, 0x1ABE, prExtend}, // Me COMBINING PARENTHESES OVERLAY {0x1ABF, 0x1ACE, prExtend}, // Mn [16] COMBINING LATIN SMALL LETTER W BELOW..COMBINING LATIN SMALL LETTER INSULAR T {0x1B00, 0x1B03, prExtend}, // Mn [4] BALINESE SIGN ULU RICEM..BALINESE SIGN SURANG {0x1B04, 0x1B04, prExtend}, // Mc BALINESE SIGN BISAH {0x1B05, 0x1B33, prOLetter}, // Lo [47] BALINESE LETTER AKARA..BALINESE LETTER HA {0x1B34, 0x1B34, prExtend}, // Mn BALINESE SIGN REREKAN {0x1B35, 0x1B35, prExtend}, // Mc BALINESE VOWEL SIGN TEDUNG {0x1B36, 0x1B3A, prExtend}, // Mn [5] BALINESE VOWEL SIGN ULU..BALINESE VOWEL SIGN RA REPA {0x1B3B, 0x1B3B, prExtend}, // Mc BALINESE VOWEL SIGN RA REPA TEDUNG {0x1B3C, 0x1B3C, prExtend}, // Mn BALINESE VOWEL SIGN LA LENGA {0x1B3D, 0x1B41, prExtend}, // Mc [5] BALINESE VOWEL SIGN LA LENGA TEDUNG..BALINESE VOWEL SIGN TALING REPA TEDUNG {0x1B42, 0x1B42, prExtend}, // Mn BALINESE VOWEL SIGN PEPET {0x1B43, 0x1B44, prExtend}, // Mc [2] BALINESE VOWEL SIGN PEPET TEDUNG..BALINESE ADEG ADEG {0x1B45, 0x1B4C, prOLetter}, // Lo [8] BALINESE LETTER KAF SASAK..BALINESE LETTER ARCHAIC JNYA {0x1B50, 0x1B59, prNumeric}, // Nd [10] BALINESE DIGIT ZERO..BALINESE DIGIT NINE {0x1B5A, 0x1B5B, prSTerm}, // Po [2] BALINESE PANTI..BALINESE PAMADA {0x1B5E, 0x1B5F, prSTerm}, // Po [2] BALINESE CARIK SIKI..BALINESE CARIK PAREREN {0x1B6B, 0x1B73, prExtend}, // Mn [9] BALINESE MUSICAL SYMBOL COMBINING TEGEH..BALINESE MUSICAL SYMBOL COMBINING GONG {0x1B7D, 0x1B7E, prSTerm}, // Po [2] BALINESE PANTI LANTANG..BALINESE PAMADA LANTANG {0x1B80, 0x1B81, prExtend}, // Mn [2] SUNDANESE SIGN PANYECEK..SUNDANESE SIGN PANGLAYAR {0x1B82, 0x1B82, prExtend}, // Mc SUNDANESE SIGN PANGWISAD {0x1B83, 0x1BA0, prOLetter}, // Lo [30] SUNDANESE LETTER A..SUNDANESE LETTER HA {0x1BA1, 0x1BA1, prExtend}, // Mc SUNDANESE CONSONANT SIGN PAMINGKAL {0x1BA2, 0x1BA5, prExtend}, // Mn [4] SUNDANESE CONSONANT SIGN PANYAKRA..SUNDANESE VOWEL SIGN PANYUKU {0x1BA6, 0x1BA7, prExtend}, // Mc [2] SUNDANESE VOWEL SIGN PANAELAENG..SUNDANESE VOWEL SIGN PANOLONG {0x1BA8, 0x1BA9, prExtend}, // Mn [2] SUNDANESE VOWEL SIGN PAMEPET..SUNDANESE VOWEL SIGN PANEULEUNG {0x1BAA, 0x1BAA, prExtend}, // Mc SUNDANESE SIGN PAMAAEH {0x1BAB, 0x1BAD, prExtend}, // Mn [3] SUNDANESE SIGN VIRAMA..SUNDANESE CONSONANT SIGN PASANGAN WA {0x1BAE, 0x1BAF, prOLetter}, // Lo [2] SUNDANESE LETTER KHA..SUNDANESE LETTER SYA {0x1BB0, 0x1BB9, prNumeric}, // Nd [10] SUNDANESE DIGIT ZERO..SUNDANESE DIGIT NINE {0x1BBA, 0x1BE5, prOLetter}, // Lo [44] SUNDANESE AVAGRAHA..BATAK LETTER U {0x1BE6, 0x1BE6, prExtend}, // Mn BATAK SIGN TOMPI {0x1BE7, 0x1BE7, prExtend}, // Mc BATAK VOWEL SIGN E {0x1BE8, 0x1BE9, prExtend}, // Mn [2] BATAK VOWEL SIGN PAKPAK E..BATAK VOWEL SIGN EE {0x1BEA, 0x1BEC, prExtend}, // Mc [3] BATAK VOWEL SIGN I..BATAK VOWEL SIGN O {0x1BED, 0x1BED, prExtend}, // Mn BATAK VOWEL SIGN KARO O {0x1BEE, 0x1BEE, prExtend}, // Mc BATAK VOWEL SIGN U {0x1BEF, 0x1BF1, prExtend}, // Mn [3] BATAK VOWEL SIGN U FOR SIMALUNGUN SA..BATAK CONSONANT SIGN H {0x1BF2, 0x1BF3, prExtend}, // Mc [2] BATAK PANGOLAT..BATAK PANONGONAN {0x1C00, 0x1C23, prOLetter}, // Lo [36] LEPCHA LETTER KA..LEPCHA LETTER A {0x1C24, 0x1C2B, prExtend}, // Mc [8] LEPCHA SUBJOINED LETTER YA..LEPCHA VOWEL SIGN UU {0x1C2C, 0x1C33, prExtend}, // Mn [8] LEPCHA VOWEL SIGN E..LEPCHA CONSONANT SIGN T {0x1C34, 0x1C35, prExtend}, // Mc [2] LEPCHA CONSONANT SIGN NYIN-DO..LEPCHA CONSONANT SIGN KANG {0x1C36, 0x1C37, prExtend}, // Mn [2] LEPCHA SIGN RAN..LEPCHA SIGN NUKTA {0x1C3B, 0x1C3C, prSTerm}, // Po [2] LEPCHA PUNCTUATION TA-ROL..LEPCHA PUNCTUATION NYET THYOOM TA-ROL {0x1C40, 0x1C49, prNumeric}, // Nd [10] LEPCHA DIGIT ZERO..LEPCHA DIGIT NINE {0x1C4D, 0x1C4F, prOLetter}, // Lo [3] LEPCHA LETTER TTA..LEPCHA LETTER DDA {0x1C50, 0x1C59, prNumeric}, // Nd [10] OL CHIKI DIGIT ZERO..OL CHIKI DIGIT NINE {0x1C5A, 0x1C77, prOLetter}, // Lo [30] OL CHIKI LETTER LA..OL CHIKI LETTER OH {0x1C78, 0x1C7D, prOLetter}, // Lm [6] OL CHIKI MU TTUDDAG..OL CHIKI AHAD {0x1C7E, 0x1C7F, prSTerm}, // Po [2] OL CHIKI PUNCTUATION MUCAAD..OL CHIKI PUNCTUATION DOUBLE MUCAAD {0x1C80, 0x1C88, prLower}, // L& [9] CYRILLIC SMALL LETTER ROUNDED VE..CYRILLIC SMALL LETTER UNBLENDED UK {0x1C90, 0x1CBA, prOLetter}, // L& [43] GEORGIAN MTAVRULI CAPITAL LETTER AN..GEORGIAN MTAVRULI CAPITAL LETTER AIN {0x1CBD, 0x1CBF, prOLetter}, // L& [3] GEORGIAN MTAVRULI CAPITAL LETTER AEN..GEORGIAN MTAVRULI CAPITAL LETTER LABIAL SIGN {0x1CD0, 0x1CD2, prExtend}, // Mn [3] VEDIC TONE KARSHANA..VEDIC TONE PRENKHA {0x1CD4, 0x1CE0, prExtend}, // Mn [13] VEDIC SIGN YAJURVEDIC MIDLINE SVARITA..VEDIC TONE RIGVEDIC KASHMIRI INDEPENDENT SVARITA {0x1CE1, 0x1CE1, prExtend}, // Mc VEDIC TONE ATHARVAVEDIC INDEPENDENT SVARITA {0x1CE2, 0x1CE8, prExtend}, // Mn [7] VEDIC SIGN VISARGA SVARITA..VEDIC SIGN VISARGA ANUDATTA WITH TAIL {0x1CE9, 0x1CEC, prOLetter}, // Lo [4] VEDIC SIGN ANUSVARA ANTARGOMUKHA..VEDIC SIGN ANUSVARA VAMAGOMUKHA WITH TAIL {0x1CED, 0x1CED, prExtend}, // Mn VEDIC SIGN TIRYAK {0x1CEE, 0x1CF3, prOLetter}, // Lo [6] VEDIC SIGN HEXIFORM LONG ANUSVARA..VEDIC SIGN ROTATED ARDHAVISARGA {0x1CF4, 0x1CF4, prExtend}, // Mn VEDIC TONE CANDRA ABOVE {0x1CF5, 0x1CF6, prOLetter}, // Lo [2] VEDIC SIGN JIHVAMULIYA..VEDIC SIGN UPADHMANIYA {0x1CF7, 0x1CF7, prExtend}, // Mc VEDIC SIGN ATIKRAMA {0x1CF8, 0x1CF9, prExtend}, // Mn [2] VEDIC TONE RING ABOVE..VEDIC TONE DOUBLE RING ABOVE {0x1CFA, 0x1CFA, prOLetter}, // Lo VEDIC SIGN DOUBLE ANUSVARA ANTARGOMUKHA {0x1D00, 0x1D2B, prLower}, // L& [44] LATIN LETTER SMALL CAPITAL A..CYRILLIC LETTER SMALL CAPITAL EL {0x1D2C, 0x1D6A, prLower}, // Lm [63] MODIFIER LETTER CAPITAL A..GREEK SUBSCRIPT SMALL LETTER CHI {0x1D6B, 0x1D77, prLower}, // L& [13] LATIN SMALL LETTER UE..LATIN SMALL LETTER TURNED G {0x1D78, 0x1D78, prLower}, // Lm MODIFIER LETTER CYRILLIC EN {0x1D79, 0x1D9A, prLower}, // L& [34] LATIN SMALL LETTER INSULAR G..LATIN SMALL LETTER EZH WITH RETROFLEX HOOK {0x1D9B, 0x1DBF, prLower}, // Lm [37] MODIFIER LETTER SMALL TURNED ALPHA..MODIFIER LETTER SMALL THETA {0x1DC0, 0x1DFF, prExtend}, // Mn [64] COMBINING DOTTED GRAVE ACCENT..COMBINING RIGHT ARROWHEAD AND DOWN ARROWHEAD BELOW {0x1E00, 0x1E00, prUpper}, // L& LATIN CAPITAL LETTER A WITH RING BELOW {0x1E01, 0x1E01, prLower}, // L& LATIN SMALL LETTER A WITH RING BELOW {0x1E02, 0x1E02, prUpper}, // L& LATIN CAPITAL LETTER B WITH DOT ABOVE {0x1E03, 0x1E03, prLower}, // L& LATIN SMALL LETTER B WITH DOT ABOVE {0x1E04, 0x1E04, prUpper}, // L& LATIN CAPITAL LETTER B WITH DOT BELOW {0x1E05, 0x1E05, prLower}, // L& LATIN SMALL LETTER B WITH DOT BELOW {0x1E06, 0x1E06, prUpper}, // L& LATIN CAPITAL LETTER B WITH LINE BELOW {0x1E07, 0x1E07, prLower}, // L& LATIN SMALL LETTER B WITH LINE BELOW {0x1E08, 0x1E08, prUpper}, // L& LATIN CAPITAL LETTER C WITH CEDILLA AND ACUTE {0x1E09, 0x1E09, prLower}, // L& LATIN SMALL LETTER C WITH CEDILLA AND ACUTE {0x1E0A, 0x1E0A, prUpper}, // L& LATIN CAPITAL LETTER D WITH DOT ABOVE {0x1E0B, 0x1E0B, prLower}, // L& LATIN SMALL LETTER D WITH DOT ABOVE {0x1E0C, 0x1E0C, prUpper}, // L& LATIN CAPITAL LETTER D WITH DOT BELOW {0x1E0D, 0x1E0D, prLower}, // L& LATIN SMALL LETTER D WITH DOT BELOW {0x1E0E, 0x1E0E, prUpper}, // L& LATIN CAPITAL LETTER D WITH LINE BELOW {0x1E0F, 0x1E0F, prLower}, // L& LATIN SMALL LETTER D WITH LINE BELOW {0x1E10, 0x1E10, prUpper}, // L& LATIN CAPITAL LETTER D WITH CEDILLA {0x1E11, 0x1E11, prLower}, // L& LATIN SMALL LETTER D WITH CEDILLA {0x1E12, 0x1E12, prUpper}, // L& LATIN CAPITAL LETTER D WITH CIRCUMFLEX BELOW {0x1E13, 0x1E13, prLower}, // L& LATIN SMALL LETTER D WITH CIRCUMFLEX BELOW {0x1E14, 0x1E14, prUpper}, // L& LATIN CAPITAL LETTER E WITH MACRON AND GRAVE {0x1E15, 0x1E15, prLower}, // L& LATIN SMALL LETTER E WITH MACRON AND GRAVE {0x1E16, 0x1E16, prUpper}, // L& LATIN CAPITAL LETTER E WITH MACRON AND ACUTE {0x1E17, 0x1E17, prLower}, // L& LATIN SMALL LETTER E WITH MACRON AND ACUTE {0x1E18, 0x1E18, prUpper}, // L& LATIN CAPITAL LETTER E WITH CIRCUMFLEX BELOW {0x1E19, 0x1E19, prLower}, // L& LATIN SMALL LETTER E WITH CIRCUMFLEX BELOW {0x1E1A, 0x1E1A, prUpper}, // L& LATIN CAPITAL LETTER E WITH TILDE BELOW {0x1E1B, 0x1E1B, prLower}, // L& LATIN SMALL LETTER E WITH TILDE BELOW {0x1E1C, 0x1E1C, prUpper}, // L& LATIN CAPITAL LETTER E WITH CEDILLA AND BREVE {0x1E1D, 0x1E1D, prLower}, // L& LATIN SMALL LETTER E WITH CEDILLA AND BREVE {0x1E1E, 0x1E1E, prUpper}, // L& LATIN CAPITAL LETTER F WITH DOT ABOVE {0x1E1F, 0x1E1F, prLower}, // L& LATIN SMALL LETTER F WITH DOT ABOVE {0x1E20, 0x1E20, prUpper}, // L& LATIN CAPITAL LETTER G WITH MACRON {0x1E21, 0x1E21, prLower}, // L& LATIN SMALL LETTER G WITH MACRON {0x1E22, 0x1E22, prUpper}, // L& LATIN CAPITAL LETTER H WITH DOT ABOVE {0x1E23, 0x1E23, prLower}, // L& LATIN SMALL LETTER H WITH DOT ABOVE {0x1E24, 0x1E24, prUpper}, // L& LATIN CAPITAL LETTER H WITH DOT BELOW {0x1E25, 0x1E25, prLower}, // L& LATIN SMALL LETTER H WITH DOT BELOW {0x1E26, 0x1E26, prUpper}, // L& LATIN CAPITAL LETTER H WITH DIAERESIS {0x1E27, 0x1E27, prLower}, // L& LATIN SMALL LETTER H WITH DIAERESIS {0x1E28, 0x1E28, prUpper}, // L& LATIN CAPITAL LETTER H WITH CEDILLA {0x1E29, 0x1E29, prLower}, // L& LATIN SMALL LETTER H WITH CEDILLA {0x1E2A, 0x1E2A, prUpper}, // L& LATIN CAPITAL LETTER H WITH BREVE BELOW {0x1E2B, 0x1E2B, prLower}, // L& LATIN SMALL LETTER H WITH BREVE BELOW {0x1E2C, 0x1E2C, prUpper}, // L& LATIN CAPITAL LETTER I WITH TILDE BELOW {0x1E2D, 0x1E2D, prLower}, // L& LATIN SMALL LETTER I WITH TILDE BELOW {0x1E2E, 0x1E2E, prUpper}, // L& LATIN CAPITAL LETTER I WITH DIAERESIS AND ACUTE {0x1E2F, 0x1E2F, prLower}, // L& LATIN SMALL LETTER I WITH DIAERESIS AND ACUTE {0x1E30, 0x1E30, prUpper}, // L& LATIN CAPITAL LETTER K WITH ACUTE {0x1E31, 0x1E31, prLower}, // L& LATIN SMALL LETTER K WITH ACUTE {0x1E32, 0x1E32, prUpper}, // L& LATIN CAPITAL LETTER K WITH DOT BELOW {0x1E33, 0x1E33, prLower}, // L& LATIN SMALL LETTER K WITH DOT BELOW {0x1E34, 0x1E34, prUpper}, // L& LATIN CAPITAL LETTER K WITH LINE BELOW {0x1E35, 0x1E35, prLower}, // L& LATIN SMALL LETTER K WITH LINE BELOW {0x1E36, 0x1E36, prUpper}, // L& LATIN CAPITAL LETTER L WITH DOT BELOW {0x1E37, 0x1E37, prLower}, // L& LATIN SMALL LETTER L WITH DOT BELOW {0x1E38, 0x1E38, prUpper}, // L& LATIN CAPITAL LETTER L WITH DOT BELOW AND MACRON {0x1E39, 0x1E39, prLower}, // L& LATIN SMALL LETTER L WITH DOT BELOW AND MACRON {0x1E3A, 0x1E3A, prUpper}, // L& LATIN CAPITAL LETTER L WITH LINE BELOW {0x1E3B, 0x1E3B, prLower}, // L& LATIN SMALL LETTER L WITH LINE BELOW {0x1E3C, 0x1E3C, prUpper}, // L& LATIN CAPITAL LETTER L WITH CIRCUMFLEX BELOW {0x1E3D, 0x1E3D, prLower}, // L& LATIN SMALL LETTER L WITH CIRCUMFLEX BELOW {0x1E3E, 0x1E3E, prUpper}, // L& LATIN CAPITAL LETTER M WITH ACUTE {0x1E3F, 0x1E3F, prLower}, // L& LATIN SMALL LETTER M WITH ACUTE {0x1E40, 0x1E40, prUpper}, // L& LATIN CAPITAL LETTER M WITH DOT ABOVE {0x1E41, 0x1E41, prLower}, // L& LATIN SMALL LETTER M WITH DOT ABOVE {0x1E42, 0x1E42, prUpper}, // L& LATIN CAPITAL LETTER M WITH DOT BELOW {0x1E43, 0x1E43, prLower}, // L& LATIN SMALL LETTER M WITH DOT BELOW {0x1E44, 0x1E44, prUpper}, // L& LATIN CAPITAL LETTER N WITH DOT ABOVE {0x1E45, 0x1E45, prLower}, // L& LATIN SMALL LETTER N WITH DOT ABOVE {0x1E46, 0x1E46, prUpper}, // L& LATIN CAPITAL LETTER N WITH DOT BELOW {0x1E47, 0x1E47, prLower}, // L& LATIN SMALL LETTER N WITH DOT BELOW {0x1E48, 0x1E48, prUpper}, // L& LATIN CAPITAL LETTER N WITH LINE BELOW {0x1E49, 0x1E49, prLower}, // L& LATIN SMALL LETTER N WITH LINE BELOW {0x1E4A, 0x1E4A, prUpper}, // L& LATIN CAPITAL LETTER N WITH CIRCUMFLEX BELOW {0x1E4B, 0x1E4B, prLower}, // L& LATIN SMALL LETTER N WITH CIRCUMFLEX BELOW {0x1E4C, 0x1E4C, prUpper}, // L& LATIN CAPITAL LETTER O WITH TILDE AND ACUTE {0x1E4D, 0x1E4D, prLower}, // L& LATIN SMALL LETTER O WITH TILDE AND ACUTE {0x1E4E, 0x1E4E, prUpper}, // L& LATIN CAPITAL LETTER O WITH TILDE AND DIAERESIS {0x1E4F, 0x1E4F, prLower}, // L& LATIN SMALL LETTER O WITH TILDE AND DIAERESIS {0x1E50, 0x1E50, prUpper}, // L& LATIN CAPITAL LETTER O WITH MACRON AND GRAVE {0x1E51, 0x1E51, prLower}, // L& LATIN SMALL LETTER O WITH MACRON AND GRAVE {0x1E52, 0x1E52, prUpper}, // L& LATIN CAPITAL LETTER O WITH MACRON AND ACUTE {0x1E53, 0x1E53, prLower}, // L& LATIN SMALL LETTER O WITH MACRON AND ACUTE {0x1E54, 0x1E54, prUpper}, // L& LATIN CAPITAL LETTER P WITH ACUTE {0x1E55, 0x1E55, prLower}, // L& LATIN SMALL LETTER P WITH ACUTE {0x1E56, 0x1E56, prUpper}, // L& LATIN CAPITAL LETTER P WITH DOT ABOVE {0x1E57, 0x1E57, prLower}, // L& LATIN SMALL LETTER P WITH DOT ABOVE {0x1E58, 0x1E58, prUpper}, // L& LATIN CAPITAL LETTER R WITH DOT ABOVE {0x1E59, 0x1E59, prLower}, // L& LATIN SMALL LETTER R WITH DOT ABOVE {0x1E5A, 0x1E5A, prUpper}, // L& LATIN CAPITAL LETTER R WITH DOT BELOW {0x1E5B, 0x1E5B, prLower}, // L& LATIN SMALL LETTER R WITH DOT BELOW {0x1E5C, 0x1E5C, prUpper}, // L& LATIN CAPITAL LETTER R WITH DOT BELOW AND MACRON {0x1E5D, 0x1E5D, prLower}, // L& LATIN SMALL LETTER R WITH DOT BELOW AND MACRON {0x1E5E, 0x1E5E, prUpper}, // L& LATIN CAPITAL LETTER R WITH LINE BELOW {0x1E5F, 0x1E5F, prLower}, // L& LATIN SMALL LETTER R WITH LINE BELOW {0x1E60, 0x1E60, prUpper}, // L& LATIN CAPITAL LETTER S WITH DOT ABOVE {0x1E61, 0x1E61, prLower}, // L& LATIN SMALL LETTER S WITH DOT ABOVE {0x1E62, 0x1E62, prUpper}, // L& LATIN CAPITAL LETTER S WITH DOT BELOW {0x1E63, 0x1E63, prLower}, // L& LATIN SMALL LETTER S WITH DOT BELOW {0x1E64, 0x1E64, prUpper}, // L& LATIN CAPITAL LETTER S WITH ACUTE AND DOT ABOVE {0x1E65, 0x1E65, prLower}, // L& LATIN SMALL LETTER S WITH ACUTE AND DOT ABOVE {0x1E66, 0x1E66, prUpper}, // L& LATIN CAPITAL LETTER S WITH CARON AND DOT ABOVE {0x1E67, 0x1E67, prLower}, // L& LATIN SMALL LETTER S WITH CARON AND DOT ABOVE {0x1E68, 0x1E68, prUpper}, // L& LATIN CAPITAL LETTER S WITH DOT BELOW AND DOT ABOVE {0x1E69, 0x1E69, prLower}, // L& LATIN SMALL LETTER S WITH DOT BELOW AND DOT ABOVE {0x1E6A, 0x1E6A, prUpper}, // L& LATIN CAPITAL LETTER T WITH DOT ABOVE {0x1E6B, 0x1E6B, prLower}, // L& LATIN SMALL LETTER T WITH DOT ABOVE {0x1E6C, 0x1E6C, prUpper}, // L& LATIN CAPITAL LETTER T WITH DOT BELOW {0x1E6D, 0x1E6D, prLower}, // L& LATIN SMALL LETTER T WITH DOT BELOW {0x1E6E, 0x1E6E, prUpper}, // L& LATIN CAPITAL LETTER T WITH LINE BELOW {0x1E6F, 0x1E6F, prLower}, // L& LATIN SMALL LETTER T WITH LINE BELOW {0x1E70, 0x1E70, prUpper}, // L& LATIN CAPITAL LETTER T WITH CIRCUMFLEX BELOW {0x1E71, 0x1E71, prLower}, // L& LATIN SMALL LETTER T WITH CIRCUMFLEX BELOW {0x1E72, 0x1E72, prUpper}, // L& LATIN CAPITAL LETTER U WITH DIAERESIS BELOW {0x1E73, 0x1E73, prLower}, // L& LATIN SMALL LETTER U WITH DIAERESIS BELOW {0x1E74, 0x1E74, prUpper}, // L& LATIN CAPITAL LETTER U WITH TILDE BELOW {0x1E75, 0x1E75, prLower}, // L& LATIN SMALL LETTER U WITH TILDE BELOW {0x1E76, 0x1E76, prUpper}, // L& LATIN CAPITAL LETTER U WITH CIRCUMFLEX BELOW {0x1E77, 0x1E77, prLower}, // L& LATIN SMALL LETTER U WITH CIRCUMFLEX BELOW {0x1E78, 0x1E78, prUpper}, // L& LATIN CAPITAL LETTER U WITH TILDE AND ACUTE {0x1E79, 0x1E79, prLower}, // L& LATIN SMALL LETTER U WITH TILDE AND ACUTE {0x1E7A, 0x1E7A, prUpper}, // L& LATIN CAPITAL LETTER U WITH MACRON AND DIAERESIS {0x1E7B, 0x1E7B, prLower}, // L& LATIN SMALL LETTER U WITH MACRON AND DIAERESIS {0x1E7C, 0x1E7C, prUpper}, // L& LATIN CAPITAL LETTER V WITH TILDE {0x1E7D, 0x1E7D, prLower}, // L& LATIN SMALL LETTER V WITH TILDE {0x1E7E, 0x1E7E, prUpper}, // L& LATIN CAPITAL LETTER V WITH DOT BELOW {0x1E7F, 0x1E7F, prLower}, // L& LATIN SMALL LETTER V WITH DOT BELOW {0x1E80, 0x1E80, prUpper}, // L& LATIN CAPITAL LETTER W WITH GRAVE {0x1E81, 0x1E81, prLower}, // L& LATIN SMALL LETTER W WITH GRAVE {0x1E82, 0x1E82, prUpper}, // L& LATIN CAPITAL LETTER W WITH ACUTE {0x1E83, 0x1E83, prLower}, // L& LATIN SMALL LETTER W WITH ACUTE {0x1E84, 0x1E84, prUpper}, // L& LATIN CAPITAL LETTER W WITH DIAERESIS {0x1E85, 0x1E85, prLower}, // L& LATIN SMALL LETTER W WITH DIAERESIS {0x1E86, 0x1E86, prUpper}, // L& LATIN CAPITAL LETTER W WITH DOT ABOVE {0x1E87, 0x1E87, prLower}, // L& LATIN SMALL LETTER W WITH DOT ABOVE {0x1E88, 0x1E88, prUpper}, // L& LATIN CAPITAL LETTER W WITH DOT BELOW {0x1E89, 0x1E89, prLower}, // L& LATIN SMALL LETTER W WITH DOT BELOW {0x1E8A, 0x1E8A, prUpper}, // L& LATIN CAPITAL LETTER X WITH DOT ABOVE {0x1E8B, 0x1E8B, prLower}, // L& LATIN SMALL LETTER X WITH DOT ABOVE {0x1E8C, 0x1E8C, prUpper}, // L& LATIN CAPITAL LETTER X WITH DIAERESIS {0x1E8D, 0x1E8D, prLower}, // L& LATIN SMALL LETTER X WITH DIAERESIS {0x1E8E, 0x1E8E, prUpper}, // L& LATIN CAPITAL LETTER Y WITH DOT ABOVE {0x1E8F, 0x1E8F, prLower}, // L& LATIN SMALL LETTER Y WITH DOT ABOVE {0x1E90, 0x1E90, prUpper}, // L& LATIN CAPITAL LETTER Z WITH CIRCUMFLEX {0x1E91, 0x1E91, prLower}, // L& LATIN SMALL LETTER Z WITH CIRCUMFLEX {0x1E92, 0x1E92, prUpper}, // L& LATIN CAPITAL LETTER Z WITH DOT BELOW {0x1E93, 0x1E93, prLower}, // L& LATIN SMALL LETTER Z WITH DOT BELOW {0x1E94, 0x1E94, prUpper}, // L& LATIN CAPITAL LETTER Z WITH LINE BELOW {0x1E95, 0x1E9D, prLower}, // L& [9] LATIN SMALL LETTER Z WITH LINE BELOW..LATIN SMALL LETTER LONG S WITH HIGH STROKE {0x1E9E, 0x1E9E, prUpper}, // L& LATIN CAPITAL LETTER SHARP S {0x1E9F, 0x1E9F, prLower}, // L& LATIN SMALL LETTER DELTA {0x1EA0, 0x1EA0, prUpper}, // L& LATIN CAPITAL LETTER A WITH DOT BELOW {0x1EA1, 0x1EA1, prLower}, // L& LATIN SMALL LETTER A WITH DOT BELOW {0x1EA2, 0x1EA2, prUpper}, // L& LATIN CAPITAL LETTER A WITH HOOK ABOVE {0x1EA3, 0x1EA3, prLower}, // L& LATIN SMALL LETTER A WITH HOOK ABOVE {0x1EA4, 0x1EA4, prUpper}, // L& LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE {0x1EA5, 0x1EA5, prLower}, // L& LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE {0x1EA6, 0x1EA6, prUpper}, // L& LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE {0x1EA7, 0x1EA7, prLower}, // L& LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE {0x1EA8, 0x1EA8, prUpper}, // L& LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE {0x1EA9, 0x1EA9, prLower}, // L& LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE {0x1EAA, 0x1EAA, prUpper}, // L& LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE {0x1EAB, 0x1EAB, prLower}, // L& LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE {0x1EAC, 0x1EAC, prUpper}, // L& LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW {0x1EAD, 0x1EAD, prLower}, // L& LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW {0x1EAE, 0x1EAE, prUpper}, // L& LATIN CAPITAL LETTER A WITH BREVE AND ACUTE {0x1EAF, 0x1EAF, prLower}, // L& LATIN SMALL LETTER A WITH BREVE AND ACUTE {0x1EB0, 0x1EB0, prUpper}, // L& LATIN CAPITAL LETTER A WITH BREVE AND GRAVE {0x1EB1, 0x1EB1, prLower}, // L& LATIN SMALL LETTER A WITH BREVE AND GRAVE {0x1EB2, 0x1EB2, prUpper}, // L& LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE {0x1EB3, 0x1EB3, prLower}, // L& LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE {0x1EB4, 0x1EB4, prUpper}, // L& LATIN CAPITAL LETTER A WITH BREVE AND TILDE {0x1EB5, 0x1EB5, prLower}, // L& LATIN SMALL LETTER A WITH BREVE AND TILDE {0x1EB6, 0x1EB6, prUpper}, // L& LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW {0x1EB7, 0x1EB7, prLower}, // L& LATIN SMALL LETTER A WITH BREVE AND DOT BELOW {0x1EB8, 0x1EB8, prUpper}, // L& LATIN CAPITAL LETTER E WITH DOT BELOW {0x1EB9, 0x1EB9, prLower}, // L& LATIN SMALL LETTER E WITH DOT BELOW {0x1EBA, 0x1EBA, prUpper}, // L& LATIN CAPITAL LETTER E WITH HOOK ABOVE {0x1EBB, 0x1EBB, prLower}, // L& LATIN SMALL LETTER E WITH HOOK ABOVE {0x1EBC, 0x1EBC, prUpper}, // L& LATIN CAPITAL LETTER E WITH TILDE {0x1EBD, 0x1EBD, prLower}, // L& LATIN SMALL LETTER E WITH TILDE {0x1EBE, 0x1EBE, prUpper}, // L& LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE {0x1EBF, 0x1EBF, prLower}, // L& LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE {0x1EC0, 0x1EC0, prUpper}, // L& LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE {0x1EC1, 0x1EC1, prLower}, // L& LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE {0x1EC2, 0x1EC2, prUpper}, // L& LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE {0x1EC3, 0x1EC3, prLower}, // L& LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE {0x1EC4, 0x1EC4, prUpper}, // L& LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE {0x1EC5, 0x1EC5, prLower}, // L& LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE {0x1EC6, 0x1EC6, prUpper}, // L& LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW {0x1EC7, 0x1EC7, prLower}, // L& LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW {0x1EC8, 0x1EC8, prUpper}, // L& LATIN CAPITAL LETTER I WITH HOOK ABOVE {0x1EC9, 0x1EC9, prLower}, // L& LATIN SMALL LETTER I WITH HOOK ABOVE {0x1ECA, 0x1ECA, prUpper}, // L& LATIN CAPITAL LETTER I WITH DOT BELOW {0x1ECB, 0x1ECB, prLower}, // L& LATIN SMALL LETTER I WITH DOT BELOW {0x1ECC, 0x1ECC, prUpper}, // L& LATIN CAPITAL LETTER O WITH DOT BELOW {0x1ECD, 0x1ECD, prLower}, // L& LATIN SMALL LETTER O WITH DOT BELOW {0x1ECE, 0x1ECE, prUpper}, // L& LATIN CAPITAL LETTER O WITH HOOK ABOVE {0x1ECF, 0x1ECF, prLower}, // L& LATIN SMALL LETTER O WITH HOOK ABOVE {0x1ED0, 0x1ED0, prUpper}, // L& LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE {0x1ED1, 0x1ED1, prLower}, // L& LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE {0x1ED2, 0x1ED2, prUpper}, // L& LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE {0x1ED3, 0x1ED3, prLower}, // L& LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE {0x1ED4, 0x1ED4, prUpper}, // L& LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE {0x1ED5, 0x1ED5, prLower}, // L& LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE {0x1ED6, 0x1ED6, prUpper}, // L& LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE {0x1ED7, 0x1ED7, prLower}, // L& LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE {0x1ED8, 0x1ED8, prUpper}, // L& LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW {0x1ED9, 0x1ED9, prLower}, // L& LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW {0x1EDA, 0x1EDA, prUpper}, // L& LATIN CAPITAL LETTER O WITH HORN AND ACUTE {0x1EDB, 0x1EDB, prLower}, // L& LATIN SMALL LETTER O WITH HORN AND ACUTE {0x1EDC, 0x1EDC, prUpper}, // L& LATIN CAPITAL LETTER O WITH HORN AND GRAVE {0x1EDD, 0x1EDD, prLower}, // L& LATIN SMALL LETTER O WITH HORN AND GRAVE {0x1EDE, 0x1EDE, prUpper}, // L& LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE {0x1EDF, 0x1EDF, prLower}, // L& LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE {0x1EE0, 0x1EE0, prUpper}, // L& LATIN CAPITAL LETTER O WITH HORN AND TILDE {0x1EE1, 0x1EE1, prLower}, // L& LATIN SMALL LETTER O WITH HORN AND TILDE {0x1EE2, 0x1EE2, prUpper}, // L& LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW {0x1EE3, 0x1EE3, prLower}, // L& LATIN SMALL LETTER O WITH HORN AND DOT BELOW {0x1EE4, 0x1EE4, prUpper}, // L& LATIN CAPITAL LETTER U WITH DOT BELOW {0x1EE5, 0x1EE5, prLower}, // L& LATIN SMALL LETTER U WITH DOT BELOW {0x1EE6, 0x1EE6, prUpper}, // L& LATIN CAPITAL LETTER U WITH HOOK ABOVE {0x1EE7, 0x1EE7, prLower}, // L& LATIN SMALL LETTER U WITH HOOK ABOVE {0x1EE8, 0x1EE8, prUpper}, // L& LATIN CAPITAL LETTER U WITH HORN AND ACUTE {0x1EE9, 0x1EE9, prLower}, // L& LATIN SMALL LETTER U WITH HORN AND ACUTE {0x1EEA, 0x1EEA, prUpper}, // L& LATIN CAPITAL LETTER U WITH HORN AND GRAVE {0x1EEB, 0x1EEB, prLower}, // L& LATIN SMALL LETTER U WITH HORN AND GRAVE {0x1EEC, 0x1EEC, prUpper}, // L& LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE {0x1EED, 0x1EED, prLower}, // L& LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE {0x1EEE, 0x1EEE, prUpper}, // L& LATIN CAPITAL LETTER U WITH HORN AND TILDE {0x1EEF, 0x1EEF, prLower}, // L& LATIN SMALL LETTER U WITH HORN AND TILDE {0x1EF0, 0x1EF0, prUpper}, // L& LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW {0x1EF1, 0x1EF1, prLower}, // L& LATIN SMALL LETTER U WITH HORN AND DOT BELOW {0x1EF2, 0x1EF2, prUpper}, // L& LATIN CAPITAL LETTER Y WITH GRAVE {0x1EF3, 0x1EF3, prLower}, // L& LATIN SMALL LETTER Y WITH GRAVE {0x1EF4, 0x1EF4, prUpper}, // L& LATIN CAPITAL LETTER Y WITH DOT BELOW {0x1EF5, 0x1EF5, prLower}, // L& LATIN SMALL LETTER Y WITH DOT BELOW {0x1EF6, 0x1EF6, prUpper}, // L& LATIN CAPITAL LETTER Y WITH HOOK ABOVE {0x1EF7, 0x1EF7, prLower}, // L& LATIN SMALL LETTER Y WITH HOOK ABOVE {0x1EF8, 0x1EF8, prUpper}, // L& LATIN CAPITAL LETTER Y WITH TILDE {0x1EF9, 0x1EF9, prLower}, // L& LATIN SMALL LETTER Y WITH TILDE {0x1EFA, 0x1EFA, prUpper}, // L& LATIN CAPITAL LETTER MIDDLE-WELSH LL {0x1EFB, 0x1EFB, prLower}, // L& LATIN SMALL LETTER MIDDLE-WELSH LL {0x1EFC, 0x1EFC, prUpper}, // L& LATIN CAPITAL LETTER MIDDLE-WELSH V {0x1EFD, 0x1EFD, prLower}, // L& LATIN SMALL LETTER MIDDLE-WELSH V {0x1EFE, 0x1EFE, prUpper}, // L& LATIN CAPITAL LETTER Y WITH LOOP {0x1EFF, 0x1F07, prLower}, // L& [9] LATIN SMALL LETTER Y WITH LOOP..GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI {0x1F08, 0x1F0F, prUpper}, // L& [8] GREEK CAPITAL LETTER ALPHA WITH PSILI..GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI {0x1F10, 0x1F15, prLower}, // L& [6] GREEK SMALL LETTER EPSILON WITH PSILI..GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA {0x1F18, 0x1F1D, prUpper}, // L& [6] GREEK CAPITAL LETTER EPSILON WITH PSILI..GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA {0x1F20, 0x1F27, prLower}, // L& [8] GREEK SMALL LETTER ETA WITH PSILI..GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI {0x1F28, 0x1F2F, prUpper}, // L& [8] GREEK CAPITAL LETTER ETA WITH PSILI..GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI {0x1F30, 0x1F37, prLower}, // L& [8] GREEK SMALL LETTER IOTA WITH PSILI..GREEK SMALL LETTER IOTA WITH DASIA AND PERISPOMENI {0x1F38, 0x1F3F, prUpper}, // L& [8] GREEK CAPITAL LETTER IOTA WITH PSILI..GREEK CAPITAL LETTER IOTA WITH DASIA AND PERISPOMENI {0x1F40, 0x1F45, prLower}, // L& [6] GREEK SMALL LETTER OMICRON WITH PSILI..GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA {0x1F48, 0x1F4D, prUpper}, // L& [6] GREEK CAPITAL LETTER OMICRON WITH PSILI..GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA {0x1F50, 0x1F57, prLower}, // L& [8] GREEK SMALL LETTER UPSILON WITH PSILI..GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI {0x1F59, 0x1F59, prUpper}, // L& GREEK CAPITAL LETTER UPSILON WITH DASIA {0x1F5B, 0x1F5B, prUpper}, // L& GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA {0x1F5D, 0x1F5D, prUpper}, // L& GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA {0x1F5F, 0x1F5F, prUpper}, // L& GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI {0x1F60, 0x1F67, prLower}, // L& [8] GREEK SMALL LETTER OMEGA WITH PSILI..GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI {0x1F68, 0x1F6F, prUpper}, // L& [8] GREEK CAPITAL LETTER OMEGA WITH PSILI..GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI {0x1F70, 0x1F7D, prLower}, // L& [14] GREEK SMALL LETTER ALPHA WITH VARIA..GREEK SMALL LETTER OMEGA WITH OXIA {0x1F80, 0x1F87, prLower}, // L& [8] GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI..GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI {0x1F88, 0x1F8F, prUpper}, // L& [8] GREEK CAPITAL LETTER ALPHA WITH PSILI AND PROSGEGRAMMENI..GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI {0x1F90, 0x1F97, prLower}, // L& [8] GREEK SMALL LETTER ETA WITH PSILI AND YPOGEGRAMMENI..GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI {0x1F98, 0x1F9F, prUpper}, // L& [8] GREEK CAPITAL LETTER ETA WITH PSILI AND PROSGEGRAMMENI..GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI {0x1FA0, 0x1FA7, prLower}, // L& [8] GREEK SMALL LETTER OMEGA WITH PSILI AND YPOGEGRAMMENI..GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI {0x1FA8, 0x1FAF, prUpper}, // L& [8] GREEK CAPITAL LETTER OMEGA WITH PSILI AND PROSGEGRAMMENI..GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI {0x1FB0, 0x1FB4, prLower}, // L& [5] GREEK SMALL LETTER ALPHA WITH VRACHY..GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI {0x1FB6, 0x1FB7, prLower}, // L& [2] GREEK SMALL LETTER ALPHA WITH PERISPOMENI..GREEK SMALL LETTER ALPHA WITH PERISPOMENI AND YPOGEGRAMMENI {0x1FB8, 0x1FBC, prUpper}, // L& [5] GREEK CAPITAL LETTER ALPHA WITH VRACHY..GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI {0x1FBE, 0x1FBE, prLower}, // L& GREEK PROSGEGRAMMENI {0x1FC2, 0x1FC4, prLower}, // L& [3] GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI {0x1FC6, 0x1FC7, prLower}, // L& [2] GREEK SMALL LETTER ETA WITH PERISPOMENI..GREEK SMALL LETTER ETA WITH PERISPOMENI AND YPOGEGRAMMENI {0x1FC8, 0x1FCC, prUpper}, // L& [5] GREEK CAPITAL LETTER EPSILON WITH VARIA..GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI {0x1FD0, 0x1FD3, prLower}, // L& [4] GREEK SMALL LETTER IOTA WITH VRACHY..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA {0x1FD6, 0x1FD7, prLower}, // L& [2] GREEK SMALL LETTER IOTA WITH PERISPOMENI..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI {0x1FD8, 0x1FDB, prUpper}, // L& [4] GREEK CAPITAL LETTER IOTA WITH VRACHY..GREEK CAPITAL LETTER IOTA WITH OXIA {0x1FE0, 0x1FE7, prLower}, // L& [8] GREEK SMALL LETTER UPSILON WITH VRACHY..GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI {0x1FE8, 0x1FEC, prUpper}, // L& [5] GREEK CAPITAL LETTER UPSILON WITH VRACHY..GREEK CAPITAL LETTER RHO WITH DASIA {0x1FF2, 0x1FF4, prLower}, // L& [3] GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI {0x1FF6, 0x1FF7, prLower}, // L& [2] GREEK SMALL LETTER OMEGA WITH PERISPOMENI..GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND YPOGEGRAMMENI {0x1FF8, 0x1FFC, prUpper}, // L& [5] GREEK CAPITAL LETTER OMICRON WITH VARIA..GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI {0x2000, 0x200A, prSp}, // Zs [11] EN QUAD..HAIR SPACE {0x200B, 0x200B, prFormat}, // Cf ZERO WIDTH SPACE {0x200C, 0x200D, prExtend}, // Cf [2] ZERO WIDTH NON-JOINER..ZERO WIDTH JOINER {0x200E, 0x200F, prFormat}, // Cf [2] LEFT-TO-RIGHT MARK..RIGHT-TO-LEFT MARK {0x2013, 0x2014, prSContinue}, // Pd [2] EN DASH..EM DASH {0x2018, 0x2018, prClose}, // Pi LEFT SINGLE QUOTATION MARK {0x2019, 0x2019, prClose}, // Pf RIGHT SINGLE QUOTATION MARK {0x201A, 0x201A, prClose}, // Ps SINGLE LOW-9 QUOTATION MARK {0x201B, 0x201C, prClose}, // Pi [2] SINGLE HIGH-REVERSED-9 QUOTATION MARK..LEFT DOUBLE QUOTATION MARK {0x201D, 0x201D, prClose}, // Pf RIGHT DOUBLE QUOTATION MARK {0x201E, 0x201E, prClose}, // Ps DOUBLE LOW-9 QUOTATION MARK {0x201F, 0x201F, prClose}, // Pi DOUBLE HIGH-REVERSED-9 QUOTATION MARK {0x2024, 0x2024, prATerm}, // Po ONE DOT LEADER {0x2028, 0x2028, prSep}, // Zl LINE SEPARATOR {0x2029, 0x2029, prSep}, // Zp PARAGRAPH SEPARATOR {0x202A, 0x202E, prFormat}, // Cf [5] LEFT-TO-RIGHT EMBEDDING..RIGHT-TO-LEFT OVERRIDE {0x202F, 0x202F, prSp}, // Zs NARROW NO-BREAK SPACE {0x2039, 0x2039, prClose}, // Pi SINGLE LEFT-POINTING ANGLE QUOTATION MARK {0x203A, 0x203A, prClose}, // Pf SINGLE RIGHT-POINTING ANGLE QUOTATION MARK {0x203C, 0x203D, prSTerm}, // Po [2] DOUBLE EXCLAMATION MARK..INTERROBANG {0x2045, 0x2045, prClose}, // Ps LEFT SQUARE BRACKET WITH QUILL {0x2046, 0x2046, prClose}, // Pe RIGHT SQUARE BRACKET WITH QUILL {0x2047, 0x2049, prSTerm}, // Po [3] DOUBLE QUESTION MARK..EXCLAMATION QUESTION MARK {0x205F, 0x205F, prSp}, // Zs MEDIUM MATHEMATICAL SPACE {0x2060, 0x2064, prFormat}, // Cf [5] WORD JOINER..INVISIBLE PLUS {0x2066, 0x206F, prFormat}, // Cf [10] LEFT-TO-RIGHT ISOLATE..NOMINAL DIGIT SHAPES {0x2071, 0x2071, prLower}, // Lm SUPERSCRIPT LATIN SMALL LETTER I {0x207D, 0x207D, prClose}, // Ps SUPERSCRIPT LEFT PARENTHESIS {0x207E, 0x207E, prClose}, // Pe SUPERSCRIPT RIGHT PARENTHESIS {0x207F, 0x207F, prLower}, // Lm SUPERSCRIPT LATIN SMALL LETTER N {0x208D, 0x208D, prClose}, // Ps SUBSCRIPT LEFT PARENTHESIS {0x208E, 0x208E, prClose}, // Pe SUBSCRIPT RIGHT PARENTHESIS {0x2090, 0x209C, prLower}, // Lm [13] LATIN SUBSCRIPT SMALL LETTER A..LATIN SUBSCRIPT SMALL LETTER T {0x20D0, 0x20DC, prExtend}, // Mn [13] COMBINING LEFT HARPOON ABOVE..COMBINING FOUR DOTS ABOVE {0x20DD, 0x20E0, prExtend}, // Me [4] COMBINING ENCLOSING CIRCLE..COMBINING ENCLOSING CIRCLE BACKSLASH {0x20E1, 0x20E1, prExtend}, // Mn COMBINING LEFT RIGHT ARROW ABOVE {0x20E2, 0x20E4, prExtend}, // Me [3] COMBINING ENCLOSING SCREEN..COMBINING ENCLOSING UPWARD POINTING TRIANGLE {0x20E5, 0x20F0, prExtend}, // Mn [12] COMBINING REVERSE SOLIDUS OVERLAY..COMBINING ASTERISK ABOVE {0x2102, 0x2102, prUpper}, // L& DOUBLE-STRUCK CAPITAL C {0x2107, 0x2107, prUpper}, // L& EULER CONSTANT {0x210A, 0x210A, prLower}, // L& SCRIPT SMALL G {0x210B, 0x210D, prUpper}, // L& [3] SCRIPT CAPITAL H..DOUBLE-STRUCK CAPITAL H {0x210E, 0x210F, prLower}, // L& [2] PLANCK CONSTANT..PLANCK CONSTANT OVER TWO PI {0x2110, 0x2112, prUpper}, // L& [3] SCRIPT CAPITAL I..SCRIPT CAPITAL L {0x2113, 0x2113, prLower}, // L& SCRIPT SMALL L {0x2115, 0x2115, prUpper}, // L& DOUBLE-STRUCK CAPITAL N {0x2119, 0x211D, prUpper}, // L& [5] DOUBLE-STRUCK CAPITAL P..DOUBLE-STRUCK CAPITAL R {0x2124, 0x2124, prUpper}, // L& DOUBLE-STRUCK CAPITAL Z {0x2126, 0x2126, prUpper}, // L& OHM SIGN {0x2128, 0x2128, prUpper}, // L& BLACK-LETTER CAPITAL Z {0x212A, 0x212D, prUpper}, // L& [4] KELVIN SIGN..BLACK-LETTER CAPITAL C {0x212F, 0x212F, prLower}, // L& SCRIPT SMALL E {0x2130, 0x2133, prUpper}, // L& [4] SCRIPT CAPITAL E..SCRIPT CAPITAL M {0x2134, 0x2134, prLower}, // L& SCRIPT SMALL O {0x2135, 0x2138, prOLetter}, // Lo [4] ALEF SYMBOL..DALET SYMBOL {0x2139, 0x2139, prLower}, // L& INFORMATION SOURCE {0x213C, 0x213D, prLower}, // L& [2] DOUBLE-STRUCK SMALL PI..DOUBLE-STRUCK SMALL GAMMA {0x213E, 0x213F, prUpper}, // L& [2] DOUBLE-STRUCK CAPITAL GAMMA..DOUBLE-STRUCK CAPITAL PI {0x2145, 0x2145, prUpper}, // L& DOUBLE-STRUCK ITALIC CAPITAL D {0x2146, 0x2149, prLower}, // L& [4] DOUBLE-STRUCK ITALIC SMALL D..DOUBLE-STRUCK ITALIC SMALL J {0x214E, 0x214E, prLower}, // L& TURNED SMALL F {0x2160, 0x216F, prUpper}, // Nl [16] ROMAN NUMERAL ONE..ROMAN NUMERAL ONE THOUSAND {0x2170, 0x217F, prLower}, // Nl [16] SMALL ROMAN NUMERAL ONE..SMALL ROMAN NUMERAL ONE THOUSAND {0x2180, 0x2182, prOLetter}, // Nl [3] ROMAN NUMERAL ONE THOUSAND C D..ROMAN NUMERAL TEN THOUSAND {0x2183, 0x2183, prUpper}, // L& ROMAN NUMERAL REVERSED ONE HUNDRED {0x2184, 0x2184, prLower}, // L& LATIN SMALL LETTER REVERSED C {0x2185, 0x2188, prOLetter}, // Nl [4] ROMAN NUMERAL SIX LATE FORM..ROMAN NUMERAL ONE HUNDRED THOUSAND {0x2308, 0x2308, prClose}, // Ps LEFT CEILING {0x2309, 0x2309, prClose}, // Pe RIGHT CEILING {0x230A, 0x230A, prClose}, // Ps LEFT FLOOR {0x230B, 0x230B, prClose}, // Pe RIGHT FLOOR {0x2329, 0x2329, prClose}, // Ps LEFT-POINTING ANGLE BRACKET {0x232A, 0x232A, prClose}, // Pe RIGHT-POINTING ANGLE BRACKET {0x24B6, 0x24CF, prUpper}, // So [26] CIRCLED LATIN CAPITAL LETTER A..CIRCLED LATIN CAPITAL LETTER Z {0x24D0, 0x24E9, prLower}, // So [26] CIRCLED LATIN SMALL LETTER A..CIRCLED LATIN SMALL LETTER Z {0x275B, 0x2760, prClose}, // So [6] HEAVY SINGLE TURNED COMMA QUOTATION MARK ORNAMENT..HEAVY LOW DOUBLE COMMA QUOTATION MARK ORNAMENT {0x2768, 0x2768, prClose}, // Ps MEDIUM LEFT PARENTHESIS ORNAMENT {0x2769, 0x2769, prClose}, // Pe MEDIUM RIGHT PARENTHESIS ORNAMENT {0x276A, 0x276A, prClose}, // Ps MEDIUM FLATTENED LEFT PARENTHESIS ORNAMENT {0x276B, 0x276B, prClose}, // Pe MEDIUM FLATTENED RIGHT PARENTHESIS ORNAMENT {0x276C, 0x276C, prClose}, // Ps MEDIUM LEFT-POINTING ANGLE BRACKET ORNAMENT {0x276D, 0x276D, prClose}, // Pe MEDIUM RIGHT-POINTING ANGLE BRACKET ORNAMENT {0x276E, 0x276E, prClose}, // Ps HEAVY LEFT-POINTING ANGLE QUOTATION MARK ORNAMENT {0x276F, 0x276F, prClose}, // Pe HEAVY RIGHT-POINTING ANGLE QUOTATION MARK ORNAMENT {0x2770, 0x2770, prClose}, // Ps HEAVY LEFT-POINTING ANGLE BRACKET ORNAMENT {0x2771, 0x2771, prClose}, // Pe HEAVY RIGHT-POINTING ANGLE BRACKET ORNAMENT {0x2772, 0x2772, prClose}, // Ps LIGHT LEFT TORTOISE SHELL BRACKET ORNAMENT {0x2773, 0x2773, prClose}, // Pe LIGHT RIGHT TORTOISE SHELL BRACKET ORNAMENT {0x2774, 0x2774, prClose}, // Ps MEDIUM LEFT CURLY BRACKET ORNAMENT {0x2775, 0x2775, prClose}, // Pe MEDIUM RIGHT CURLY BRACKET ORNAMENT {0x27C5, 0x27C5, prClose}, // Ps LEFT S-SHAPED BAG DELIMITER {0x27C6, 0x27C6, prClose}, // Pe RIGHT S-SHAPED BAG DELIMITER {0x27E6, 0x27E6, prClose}, // Ps MATHEMATICAL LEFT WHITE SQUARE BRACKET {0x27E7, 0x27E7, prClose}, // Pe MATHEMATICAL RIGHT WHITE SQUARE BRACKET {0x27E8, 0x27E8, prClose}, // Ps MATHEMATICAL LEFT ANGLE BRACKET {0x27E9, 0x27E9, prClose}, // Pe MATHEMATICAL RIGHT ANGLE BRACKET {0x27EA, 0x27EA, prClose}, // Ps MATHEMATICAL LEFT DOUBLE ANGLE BRACKET {0x27EB, 0x27EB, prClose}, // Pe MATHEMATICAL RIGHT DOUBLE ANGLE BRACKET {0x27EC, 0x27EC, prClose}, // Ps MATHEMATICAL LEFT WHITE TORTOISE SHELL BRACKET {0x27ED, 0x27ED, prClose}, // Pe MATHEMATICAL RIGHT WHITE TORTOISE SHELL BRACKET {0x27EE, 0x27EE, prClose}, // Ps MATHEMATICAL LEFT FLATTENED PARENTHESIS {0x27EF, 0x27EF, prClose}, // Pe MATHEMATICAL RIGHT FLATTENED PARENTHESIS {0x2983, 0x2983, prClose}, // Ps LEFT WHITE CURLY BRACKET {0x2984, 0x2984, prClose}, // Pe RIGHT WHITE CURLY BRACKET {0x2985, 0x2985, prClose}, // Ps LEFT WHITE PARENTHESIS {0x2986, 0x2986, prClose}, // Pe RIGHT WHITE PARENTHESIS {0x2987, 0x2987, prClose}, // Ps Z NOTATION LEFT IMAGE BRACKET {0x2988, 0x2988, prClose}, // Pe Z NOTATION RIGHT IMAGE BRACKET {0x2989, 0x2989, prClose}, // Ps Z NOTATION LEFT BINDING BRACKET {0x298A, 0x298A, prClose}, // Pe Z NOTATION RIGHT BINDING BRACKET {0x298B, 0x298B, prClose}, // Ps LEFT SQUARE BRACKET WITH UNDERBAR {0x298C, 0x298C, prClose}, // Pe RIGHT SQUARE BRACKET WITH UNDERBAR {0x298D, 0x298D, prClose}, // Ps LEFT SQUARE BRACKET WITH TICK IN TOP CORNER {0x298E, 0x298E, prClose}, // Pe RIGHT SQUARE BRACKET WITH TICK IN BOTTOM CORNER {0x298F, 0x298F, prClose}, // Ps LEFT SQUARE BRACKET WITH TICK IN BOTTOM CORNER {0x2990, 0x2990, prClose}, // Pe RIGHT SQUARE BRACKET WITH TICK IN TOP CORNER {0x2991, 0x2991, prClose}, // Ps LEFT ANGLE BRACKET WITH DOT {0x2992, 0x2992, prClose}, // Pe RIGHT ANGLE BRACKET WITH DOT {0x2993, 0x2993, prClose}, // Ps LEFT ARC LESS-THAN BRACKET {0x2994, 0x2994, prClose}, // Pe RIGHT ARC GREATER-THAN BRACKET {0x2995, 0x2995, prClose}, // Ps DOUBLE LEFT ARC GREATER-THAN BRACKET {0x2996, 0x2996, prClose}, // Pe DOUBLE RIGHT ARC LESS-THAN BRACKET {0x2997, 0x2997, prClose}, // Ps LEFT BLACK TORTOISE SHELL BRACKET {0x2998, 0x2998, prClose}, // Pe RIGHT BLACK TORTOISE SHELL BRACKET {0x29D8, 0x29D8, prClose}, // Ps LEFT WIGGLY FENCE {0x29D9, 0x29D9, prClose}, // Pe RIGHT WIGGLY FENCE {0x29DA, 0x29DA, prClose}, // Ps LEFT DOUBLE WIGGLY FENCE {0x29DB, 0x29DB, prClose}, // Pe RIGHT DOUBLE WIGGLY FENCE {0x29FC, 0x29FC, prClose}, // Ps LEFT-POINTING CURVED ANGLE BRACKET {0x29FD, 0x29FD, prClose}, // Pe RIGHT-POINTING CURVED ANGLE BRACKET {0x2C00, 0x2C2F, prUpper}, // L& [48] GLAGOLITIC CAPITAL LETTER AZU..GLAGOLITIC CAPITAL LETTER CAUDATE CHRIVI {0x2C30, 0x2C5F, prLower}, // L& [48] GLAGOLITIC SMALL LETTER AZU..GLAGOLITIC SMALL LETTER CAUDATE CHRIVI {0x2C60, 0x2C60, prUpper}, // L& LATIN CAPITAL LETTER L WITH DOUBLE BAR {0x2C61, 0x2C61, prLower}, // L& LATIN SMALL LETTER L WITH DOUBLE BAR {0x2C62, 0x2C64, prUpper}, // L& [3] LATIN CAPITAL LETTER L WITH MIDDLE TILDE..LATIN CAPITAL LETTER R WITH TAIL {0x2C65, 0x2C66, prLower}, // L& [2] LATIN SMALL LETTER A WITH STROKE..LATIN SMALL LETTER T WITH DIAGONAL STROKE {0x2C67, 0x2C67, prUpper}, // L& LATIN CAPITAL LETTER H WITH DESCENDER {0x2C68, 0x2C68, prLower}, // L& LATIN SMALL LETTER H WITH DESCENDER {0x2C69, 0x2C69, prUpper}, // L& LATIN CAPITAL LETTER K WITH DESCENDER {0x2C6A, 0x2C6A, prLower}, // L& LATIN SMALL LETTER K WITH DESCENDER {0x2C6B, 0x2C6B, prUpper}, // L& LATIN CAPITAL LETTER Z WITH DESCENDER {0x2C6C, 0x2C6C, prLower}, // L& LATIN SMALL LETTER Z WITH DESCENDER {0x2C6D, 0x2C70, prUpper}, // L& [4] LATIN CAPITAL LETTER ALPHA..LATIN CAPITAL LETTER TURNED ALPHA {0x2C71, 0x2C71, prLower}, // L& LATIN SMALL LETTER V WITH RIGHT HOOK {0x2C72, 0x2C72, prUpper}, // L& LATIN CAPITAL LETTER W WITH HOOK {0x2C73, 0x2C74, prLower}, // L& [2] LATIN SMALL LETTER W WITH HOOK..LATIN SMALL LETTER V WITH CURL {0x2C75, 0x2C75, prUpper}, // L& LATIN CAPITAL LETTER HALF H {0x2C76, 0x2C7B, prLower}, // L& [6] LATIN SMALL LETTER HALF H..LATIN LETTER SMALL CAPITAL TURNED E {0x2C7C, 0x2C7D, prLower}, // Lm [2] LATIN SUBSCRIPT SMALL LETTER J..MODIFIER LETTER CAPITAL V {0x2C7E, 0x2C80, prUpper}, // L& [3] LATIN CAPITAL LETTER S WITH SWASH TAIL..COPTIC CAPITAL LETTER ALFA {0x2C81, 0x2C81, prLower}, // L& COPTIC SMALL LETTER ALFA {0x2C82, 0x2C82, prUpper}, // L& COPTIC CAPITAL LETTER VIDA {0x2C83, 0x2C83, prLower}, // L& COPTIC SMALL LETTER VIDA {0x2C84, 0x2C84, prUpper}, // L& COPTIC CAPITAL LETTER GAMMA {0x2C85, 0x2C85, prLower}, // L& COPTIC SMALL LETTER GAMMA {0x2C86, 0x2C86, prUpper}, // L& COPTIC CAPITAL LETTER DALDA {0x2C87, 0x2C87, prLower}, // L& COPTIC SMALL LETTER DALDA {0x2C88, 0x2C88, prUpper}, // L& COPTIC CAPITAL LETTER EIE {0x2C89, 0x2C89, prLower}, // L& COPTIC SMALL LETTER EIE {0x2C8A, 0x2C8A, prUpper}, // L& COPTIC CAPITAL LETTER SOU {0x2C8B, 0x2C8B, prLower}, // L& COPTIC SMALL LETTER SOU {0x2C8C, 0x2C8C, prUpper}, // L& COPTIC CAPITAL LETTER ZATA {0x2C8D, 0x2C8D, prLower}, // L& COPTIC SMALL LETTER ZATA {0x2C8E, 0x2C8E, prUpper}, // L& COPTIC CAPITAL LETTER HATE {0x2C8F, 0x2C8F, prLower}, // L& COPTIC SMALL LETTER HATE {0x2C90, 0x2C90, prUpper}, // L& COPTIC CAPITAL LETTER THETHE {0x2C91, 0x2C91, prLower}, // L& COPTIC SMALL LETTER THETHE {0x2C92, 0x2C92, prUpper}, // L& COPTIC CAPITAL LETTER IAUDA {0x2C93, 0x2C93, prLower}, // L& COPTIC SMALL LETTER IAUDA {0x2C94, 0x2C94, prUpper}, // L& COPTIC CAPITAL LETTER KAPA {0x2C95, 0x2C95, prLower}, // L& COPTIC SMALL LETTER KAPA {0x2C96, 0x2C96, prUpper}, // L& COPTIC CAPITAL LETTER LAULA {0x2C97, 0x2C97, prLower}, // L& COPTIC SMALL LETTER LAULA {0x2C98, 0x2C98, prUpper}, // L& COPTIC CAPITAL LETTER MI {0x2C99, 0x2C99, prLower}, // L& COPTIC SMALL LETTER MI {0x2C9A, 0x2C9A, prUpper}, // L& COPTIC CAPITAL LETTER NI {0x2C9B, 0x2C9B, prLower}, // L& COPTIC SMALL LETTER NI {0x2C9C, 0x2C9C, prUpper}, // L& COPTIC CAPITAL LETTER KSI {0x2C9D, 0x2C9D, prLower}, // L& COPTIC SMALL LETTER KSI {0x2C9E, 0x2C9E, prUpper}, // L& COPTIC CAPITAL LETTER O {0x2C9F, 0x2C9F, prLower}, // L& COPTIC SMALL LETTER O {0x2CA0, 0x2CA0, prUpper}, // L& COPTIC CAPITAL LETTER PI {0x2CA1, 0x2CA1, prLower}, // L& COPTIC SMALL LETTER PI {0x2CA2, 0x2CA2, prUpper}, // L& COPTIC CAPITAL LETTER RO {0x2CA3, 0x2CA3, prLower}, // L& COPTIC SMALL LETTER RO {0x2CA4, 0x2CA4, prUpper}, // L& COPTIC CAPITAL LETTER SIMA {0x2CA5, 0x2CA5, prLower}, // L& COPTIC SMALL LETTER SIMA {0x2CA6, 0x2CA6, prUpper}, // L& COPTIC CAPITAL LETTER TAU {0x2CA7, 0x2CA7, prLower}, // L& COPTIC SMALL LETTER TAU {0x2CA8, 0x2CA8, prUpper}, // L& COPTIC CAPITAL LETTER UA {0x2CA9, 0x2CA9, prLower}, // L& COPTIC SMALL LETTER UA {0x2CAA, 0x2CAA, prUpper}, // L& COPTIC CAPITAL LETTER FI {0x2CAB, 0x2CAB, prLower}, // L& COPTIC SMALL LETTER FI {0x2CAC, 0x2CAC, prUpper}, // L& COPTIC CAPITAL LETTER KHI {0x2CAD, 0x2CAD, prLower}, // L& COPTIC SMALL LETTER KHI {0x2CAE, 0x2CAE, prUpper}, // L& COPTIC CAPITAL LETTER PSI {0x2CAF, 0x2CAF, prLower}, // L& COPTIC SMALL LETTER PSI {0x2CB0, 0x2CB0, prUpper}, // L& COPTIC CAPITAL LETTER OOU {0x2CB1, 0x2CB1, prLower}, // L& COPTIC SMALL LETTER OOU {0x2CB2, 0x2CB2, prUpper}, // L& COPTIC CAPITAL LETTER DIALECT-P ALEF {0x2CB3, 0x2CB3, prLower}, // L& COPTIC SMALL LETTER DIALECT-P ALEF {0x2CB4, 0x2CB4, prUpper}, // L& COPTIC CAPITAL LETTER OLD COPTIC AIN {0x2CB5, 0x2CB5, prLower}, // L& COPTIC SMALL LETTER OLD COPTIC AIN {0x2CB6, 0x2CB6, prUpper}, // L& COPTIC CAPITAL LETTER CRYPTOGRAMMIC EIE {0x2CB7, 0x2CB7, prLower}, // L& COPTIC SMALL LETTER CRYPTOGRAMMIC EIE {0x2CB8, 0x2CB8, prUpper}, // L& COPTIC CAPITAL LETTER DIALECT-P KAPA {0x2CB9, 0x2CB9, prLower}, // L& COPTIC SMALL LETTER DIALECT-P KAPA {0x2CBA, 0x2CBA, prUpper}, // L& COPTIC CAPITAL LETTER DIALECT-P NI {0x2CBB, 0x2CBB, prLower}, // L& COPTIC SMALL LETTER DIALECT-P NI {0x2CBC, 0x2CBC, prUpper}, // L& COPTIC CAPITAL LETTER CRYPTOGRAMMIC NI {0x2CBD, 0x2CBD, prLower}, // L& COPTIC SMALL LETTER CRYPTOGRAMMIC NI {0x2CBE, 0x2CBE, prUpper}, // L& COPTIC CAPITAL LETTER OLD COPTIC OOU {0x2CBF, 0x2CBF, prLower}, // L& COPTIC SMALL LETTER OLD COPTIC OOU {0x2CC0, 0x2CC0, prUpper}, // L& COPTIC CAPITAL LETTER SAMPI {0x2CC1, 0x2CC1, prLower}, // L& COPTIC SMALL LETTER SAMPI {0x2CC2, 0x2CC2, prUpper}, // L& COPTIC CAPITAL LETTER CROSSED SHEI {0x2CC3, 0x2CC3, prLower}, // L& COPTIC SMALL LETTER CROSSED SHEI {0x2CC4, 0x2CC4, prUpper}, // L& COPTIC CAPITAL LETTER OLD COPTIC SHEI {0x2CC5, 0x2CC5, prLower}, // L& COPTIC SMALL LETTER OLD COPTIC SHEI {0x2CC6, 0x2CC6, prUpper}, // L& COPTIC CAPITAL LETTER OLD COPTIC ESH {0x2CC7, 0x2CC7, prLower}, // L& COPTIC SMALL LETTER OLD COPTIC ESH {0x2CC8, 0x2CC8, prUpper}, // L& COPTIC CAPITAL LETTER AKHMIMIC KHEI {0x2CC9, 0x2CC9, prLower}, // L& COPTIC SMALL LETTER AKHMIMIC KHEI {0x2CCA, 0x2CCA, prUpper}, // L& COPTIC CAPITAL LETTER DIALECT-P HORI {0x2CCB, 0x2CCB, prLower}, // L& COPTIC SMALL LETTER DIALECT-P HORI {0x2CCC, 0x2CCC, prUpper}, // L& COPTIC CAPITAL LETTER OLD COPTIC HORI {0x2CCD, 0x2CCD, prLower}, // L& COPTIC SMALL LETTER OLD COPTIC HORI {0x2CCE, 0x2CCE, prUpper}, // L& COPTIC CAPITAL LETTER OLD COPTIC HA {0x2CCF, 0x2CCF, prLower}, // L& COPTIC SMALL LETTER OLD COPTIC HA {0x2CD0, 0x2CD0, prUpper}, // L& COPTIC CAPITAL LETTER L-SHAPED HA {0x2CD1, 0x2CD1, prLower}, // L& COPTIC SMALL LETTER L-SHAPED HA {0x2CD2, 0x2CD2, prUpper}, // L& COPTIC CAPITAL LETTER OLD COPTIC HEI {0x2CD3, 0x2CD3, prLower}, // L& COPTIC SMALL LETTER OLD COPTIC HEI {0x2CD4, 0x2CD4, prUpper}, // L& COPTIC CAPITAL LETTER OLD COPTIC HAT {0x2CD5, 0x2CD5, prLower}, // L& COPTIC SMALL LETTER OLD COPTIC HAT {0x2CD6, 0x2CD6, prUpper}, // L& COPTIC CAPITAL LETTER OLD COPTIC GANGIA {0x2CD7, 0x2CD7, prLower}, // L& COPTIC SMALL LETTER OLD COPTIC GANGIA {0x2CD8, 0x2CD8, prUpper}, // L& COPTIC CAPITAL LETTER OLD COPTIC DJA {0x2CD9, 0x2CD9, prLower}, // L& COPTIC SMALL LETTER OLD COPTIC DJA {0x2CDA, 0x2CDA, prUpper}, // L& COPTIC CAPITAL LETTER OLD COPTIC SHIMA {0x2CDB, 0x2CDB, prLower}, // L& COPTIC SMALL LETTER OLD COPTIC SHIMA {0x2CDC, 0x2CDC, prUpper}, // L& COPTIC CAPITAL LETTER OLD NUBIAN SHIMA {0x2CDD, 0x2CDD, prLower}, // L& COPTIC SMALL LETTER OLD NUBIAN SHIMA {0x2CDE, 0x2CDE, prUpper}, // L& COPTIC CAPITAL LETTER OLD NUBIAN NGI {0x2CDF, 0x2CDF, prLower}, // L& COPTIC SMALL LETTER OLD NUBIAN NGI {0x2CE0, 0x2CE0, prUpper}, // L& COPTIC CAPITAL LETTER OLD NUBIAN NYI {0x2CE1, 0x2CE1, prLower}, // L& COPTIC SMALL LETTER OLD NUBIAN NYI {0x2CE2, 0x2CE2, prUpper}, // L& COPTIC CAPITAL LETTER OLD NUBIAN WAU {0x2CE3, 0x2CE4, prLower}, // L& [2] COPTIC SMALL LETTER OLD NUBIAN WAU..COPTIC SYMBOL KAI {0x2CEB, 0x2CEB, prUpper}, // L& COPTIC CAPITAL LETTER CRYPTOGRAMMIC SHEI {0x2CEC, 0x2CEC, prLower}, // L& COPTIC SMALL LETTER CRYPTOGRAMMIC SHEI {0x2CED, 0x2CED, prUpper}, // L& COPTIC CAPITAL LETTER CRYPTOGRAMMIC GANGIA {0x2CEE, 0x2CEE, prLower}, // L& COPTIC SMALL LETTER CRYPTOGRAMMIC GANGIA {0x2CEF, 0x2CF1, prExtend}, // Mn [3] COPTIC COMBINING NI ABOVE..COPTIC COMBINING SPIRITUS LENIS {0x2CF2, 0x2CF2, prUpper}, // L& COPTIC CAPITAL LETTER BOHAIRIC KHEI {0x2CF3, 0x2CF3, prLower}, // L& COPTIC SMALL LETTER BOHAIRIC KHEI {0x2D00, 0x2D25, prLower}, // L& [38] GEORGIAN SMALL LETTER AN..GEORGIAN SMALL LETTER HOE {0x2D27, 0x2D27, prLower}, // L& GEORGIAN SMALL LETTER YN {0x2D2D, 0x2D2D, prLower}, // L& GEORGIAN SMALL LETTER AEN {0x2D30, 0x2D67, prOLetter}, // Lo [56] TIFINAGH LETTER YA..TIFINAGH LETTER YO {0x2D6F, 0x2D6F, prOLetter}, // Lm TIFINAGH MODIFIER LETTER LABIALIZATION MARK {0x2D7F, 0x2D7F, prExtend}, // Mn TIFINAGH CONSONANT JOINER {0x2D80, 0x2D96, prOLetter}, // Lo [23] ETHIOPIC SYLLABLE LOA..ETHIOPIC SYLLABLE GGWE {0x2DA0, 0x2DA6, prOLetter}, // Lo [7] ETHIOPIC SYLLABLE SSA..ETHIOPIC SYLLABLE SSO {0x2DA8, 0x2DAE, prOLetter}, // Lo [7] ETHIOPIC SYLLABLE CCA..ETHIOPIC SYLLABLE CCO {0x2DB0, 0x2DB6, prOLetter}, // Lo [7] ETHIOPIC SYLLABLE ZZA..ETHIOPIC SYLLABLE ZZO {0x2DB8, 0x2DBE, prOLetter}, // Lo [7] ETHIOPIC SYLLABLE CCHA..ETHIOPIC SYLLABLE CCHO {0x2DC0, 0x2DC6, prOLetter}, // Lo [7] ETHIOPIC SYLLABLE QYA..ETHIOPIC SYLLABLE QYO {0x2DC8, 0x2DCE, prOLetter}, // Lo [7] ETHIOPIC SYLLABLE KYA..ETHIOPIC SYLLABLE KYO {0x2DD0, 0x2DD6, prOLetter}, // Lo [7] ETHIOPIC SYLLABLE XYA..ETHIOPIC SYLLABLE XYO {0x2DD8, 0x2DDE, prOLetter}, // Lo [7] ETHIOPIC SYLLABLE GYA..ETHIOPIC SYLLABLE GYO {0x2DE0, 0x2DFF, prExtend}, // Mn [32] COMBINING CYRILLIC LETTER BE..COMBINING CYRILLIC LETTER IOTIFIED BIG YUS {0x2E00, 0x2E01, prClose}, // Po [2] RIGHT ANGLE SUBSTITUTION MARKER..RIGHT ANGLE DOTTED SUBSTITUTION MARKER {0x2E02, 0x2E02, prClose}, // Pi LEFT SUBSTITUTION BRACKET {0x2E03, 0x2E03, prClose}, // Pf RIGHT SUBSTITUTION BRACKET {0x2E04, 0x2E04, prClose}, // Pi LEFT DOTTED SUBSTITUTION BRACKET {0x2E05, 0x2E05, prClose}, // Pf RIGHT DOTTED SUBSTITUTION BRACKET {0x2E06, 0x2E08, prClose}, // Po [3] RAISED INTERPOLATION MARKER..DOTTED TRANSPOSITION MARKER {0x2E09, 0x2E09, prClose}, // Pi LEFT TRANSPOSITION BRACKET {0x2E0A, 0x2E0A, prClose}, // Pf RIGHT TRANSPOSITION BRACKET {0x2E0B, 0x2E0B, prClose}, // Po RAISED SQUARE {0x2E0C, 0x2E0C, prClose}, // Pi LEFT RAISED OMISSION BRACKET {0x2E0D, 0x2E0D, prClose}, // Pf RIGHT RAISED OMISSION BRACKET {0x2E1C, 0x2E1C, prClose}, // Pi LEFT LOW PARAPHRASE BRACKET {0x2E1D, 0x2E1D, prClose}, // Pf RIGHT LOW PARAPHRASE BRACKET {0x2E20, 0x2E20, prClose}, // Pi LEFT VERTICAL BAR WITH QUILL {0x2E21, 0x2E21, prClose}, // Pf RIGHT VERTICAL BAR WITH QUILL {0x2E22, 0x2E22, prClose}, // Ps TOP LEFT HALF BRACKET {0x2E23, 0x2E23, prClose}, // Pe TOP RIGHT HALF BRACKET {0x2E24, 0x2E24, prClose}, // Ps BOTTOM LEFT HALF BRACKET {0x2E25, 0x2E25, prClose}, // Pe BOTTOM RIGHT HALF BRACKET {0x2E26, 0x2E26, prClose}, // Ps LEFT SIDEWAYS U BRACKET {0x2E27, 0x2E27, prClose}, // Pe RIGHT SIDEWAYS U BRACKET {0x2E28, 0x2E28, prClose}, // Ps LEFT DOUBLE PARENTHESIS {0x2E29, 0x2E29, prClose}, // Pe RIGHT DOUBLE PARENTHESIS {0x2E2E, 0x2E2E, prSTerm}, // Po REVERSED QUESTION MARK {0x2E2F, 0x2E2F, prOLetter}, // Lm VERTICAL TILDE {0x2E3C, 0x2E3C, prSTerm}, // Po STENOGRAPHIC FULL STOP {0x2E42, 0x2E42, prClose}, // Ps DOUBLE LOW-REVERSED-9 QUOTATION MARK {0x2E53, 0x2E54, prSTerm}, // Po [2] MEDIEVAL EXCLAMATION MARK..MEDIEVAL QUESTION MARK {0x2E55, 0x2E55, prClose}, // Ps LEFT SQUARE BRACKET WITH STROKE {0x2E56, 0x2E56, prClose}, // Pe RIGHT SQUARE BRACKET WITH STROKE {0x2E57, 0x2E57, prClose}, // Ps LEFT SQUARE BRACKET WITH DOUBLE STROKE {0x2E58, 0x2E58, prClose}, // Pe RIGHT SQUARE BRACKET WITH DOUBLE STROKE {0x2E59, 0x2E59, prClose}, // Ps TOP HALF LEFT PARENTHESIS {0x2E5A, 0x2E5A, prClose}, // Pe TOP HALF RIGHT PARENTHESIS {0x2E5B, 0x2E5B, prClose}, // Ps BOTTOM HALF LEFT PARENTHESIS {0x2E5C, 0x2E5C, prClose}, // Pe BOTTOM HALF RIGHT PARENTHESIS {0x3000, 0x3000, prSp}, // Zs IDEOGRAPHIC SPACE {0x3001, 0x3001, prSContinue}, // Po IDEOGRAPHIC COMMA {0x3002, 0x3002, prSTerm}, // Po IDEOGRAPHIC FULL STOP {0x3005, 0x3005, prOLetter}, // Lm IDEOGRAPHIC ITERATION MARK {0x3006, 0x3006, prOLetter}, // Lo IDEOGRAPHIC CLOSING MARK {0x3007, 0x3007, prOLetter}, // Nl IDEOGRAPHIC NUMBER ZERO {0x3008, 0x3008, prClose}, // Ps LEFT ANGLE BRACKET {0x3009, 0x3009, prClose}, // Pe RIGHT ANGLE BRACKET {0x300A, 0x300A, prClose}, // Ps LEFT DOUBLE ANGLE BRACKET {0x300B, 0x300B, prClose}, // Pe RIGHT DOUBLE ANGLE BRACKET {0x300C, 0x300C, prClose}, // Ps LEFT CORNER BRACKET {0x300D, 0x300D, prClose}, // Pe RIGHT CORNER BRACKET {0x300E, 0x300E, prClose}, // Ps LEFT WHITE CORNER BRACKET {0x300F, 0x300F, prClose}, // Pe RIGHT WHITE CORNER BRACKET {0x3010, 0x3010, prClose}, // Ps LEFT BLACK LENTICULAR BRACKET {0x3011, 0x3011, prClose}, // Pe RIGHT BLACK LENTICULAR BRACKET {0x3014, 0x3014, prClose}, // Ps LEFT TORTOISE SHELL BRACKET {0x3015, 0x3015, prClose}, // Pe RIGHT TORTOISE SHELL BRACKET {0x3016, 0x3016, prClose}, // Ps LEFT WHITE LENTICULAR BRACKET {0x3017, 0x3017, prClose}, // Pe RIGHT WHITE LENTICULAR BRACKET {0x3018, 0x3018, prClose}, // Ps LEFT WHITE TORTOISE SHELL BRACKET {0x3019, 0x3019, prClose}, // Pe RIGHT WHITE TORTOISE SHELL BRACKET {0x301A, 0x301A, prClose}, // Ps LEFT WHITE SQUARE BRACKET {0x301B, 0x301B, prClose}, // Pe RIGHT WHITE SQUARE BRACKET {0x301D, 0x301D, prClose}, // Ps REVERSED DOUBLE PRIME QUOTATION MARK {0x301E, 0x301F, prClose}, // Pe [2] DOUBLE PRIME QUOTATION MARK..LOW DOUBLE PRIME QUOTATION MARK {0x3021, 0x3029, prOLetter}, // Nl [9] HANGZHOU NUMERAL ONE..HANGZHOU NUMERAL NINE {0x302A, 0x302D, prExtend}, // Mn [4] IDEOGRAPHIC LEVEL TONE MARK..IDEOGRAPHIC ENTERING TONE MARK {0x302E, 0x302F, prExtend}, // Mc [2] HANGUL SINGLE DOT TONE MARK..HANGUL DOUBLE DOT TONE MARK {0x3031, 0x3035, prOLetter}, // Lm [5] VERTICAL KANA REPEAT MARK..VERTICAL KANA REPEAT MARK LOWER HALF {0x3038, 0x303A, prOLetter}, // Nl [3] HANGZHOU NUMERAL TEN..HANGZHOU NUMERAL THIRTY {0x303B, 0x303B, prOLetter}, // Lm VERTICAL IDEOGRAPHIC ITERATION MARK {0x303C, 0x303C, prOLetter}, // Lo MASU MARK {0x3041, 0x3096, prOLetter}, // Lo [86] HIRAGANA LETTER SMALL A..HIRAGANA LETTER SMALL KE {0x3099, 0x309A, prExtend}, // Mn [2] COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK {0x309D, 0x309E, prOLetter}, // Lm [2] HIRAGANA ITERATION MARK..HIRAGANA VOICED ITERATION MARK {0x309F, 0x309F, prOLetter}, // Lo HIRAGANA DIGRAPH YORI {0x30A1, 0x30FA, prOLetter}, // Lo [90] KATAKANA LETTER SMALL A..KATAKANA LETTER VO {0x30FC, 0x30FE, prOLetter}, // Lm [3] KATAKANA-HIRAGANA PROLONGED SOUND MARK..KATAKANA VOICED ITERATION MARK {0x30FF, 0x30FF, prOLetter}, // Lo KATAKANA DIGRAPH KOTO {0x3105, 0x312F, prOLetter}, // Lo [43] BOPOMOFO LETTER B..BOPOMOFO LETTER NN {0x3131, 0x318E, prOLetter}, // Lo [94] HANGUL LETTER KIYEOK..HANGUL LETTER ARAEAE {0x31A0, 0x31BF, prOLetter}, // Lo [32] BOPOMOFO LETTER BU..BOPOMOFO LETTER AH {0x31F0, 0x31FF, prOLetter}, // Lo [16] KATAKANA LETTER SMALL KU..KATAKANA LETTER SMALL RO {0x3400, 0x4DBF, prOLetter}, // Lo [6592] CJK UNIFIED IDEOGRAPH-3400..CJK UNIFIED IDEOGRAPH-4DBF {0x4E00, 0xA014, prOLetter}, // Lo [21013] CJK UNIFIED IDEOGRAPH-4E00..YI SYLLABLE E {0xA015, 0xA015, prOLetter}, // Lm YI SYLLABLE WU {0xA016, 0xA48C, prOLetter}, // Lo [1143] YI SYLLABLE BIT..YI SYLLABLE YYR {0xA4D0, 0xA4F7, prOLetter}, // Lo [40] LISU LETTER BA..LISU LETTER OE {0xA4F8, 0xA4FD, prOLetter}, // Lm [6] LISU LETTER TONE MYA TI..LISU LETTER TONE MYA JEU {0xA4FF, 0xA4FF, prSTerm}, // Po LISU PUNCTUATION FULL STOP {0xA500, 0xA60B, prOLetter}, // Lo [268] VAI SYLLABLE EE..VAI SYLLABLE NG {0xA60C, 0xA60C, prOLetter}, // Lm VAI SYLLABLE LENGTHENER {0xA60E, 0xA60F, prSTerm}, // Po [2] VAI FULL STOP..VAI QUESTION MARK {0xA610, 0xA61F, prOLetter}, // Lo [16] VAI SYLLABLE NDOLE FA..VAI SYMBOL JONG {0xA620, 0xA629, prNumeric}, // Nd [10] VAI DIGIT ZERO..VAI DIGIT NINE {0xA62A, 0xA62B, prOLetter}, // Lo [2] VAI SYLLABLE NDOLE MA..VAI SYLLABLE NDOLE DO {0xA640, 0xA640, prUpper}, // L& CYRILLIC CAPITAL LETTER ZEMLYA {0xA641, 0xA641, prLower}, // L& CYRILLIC SMALL LETTER ZEMLYA {0xA642, 0xA642, prUpper}, // L& CYRILLIC CAPITAL LETTER DZELO {0xA643, 0xA643, prLower}, // L& CYRILLIC SMALL LETTER DZELO {0xA644, 0xA644, prUpper}, // L& CYRILLIC CAPITAL LETTER REVERSED DZE {0xA645, 0xA645, prLower}, // L& CYRILLIC SMALL LETTER REVERSED DZE {0xA646, 0xA646, prUpper}, // L& CYRILLIC CAPITAL LETTER IOTA {0xA647, 0xA647, prLower}, // L& CYRILLIC SMALL LETTER IOTA {0xA648, 0xA648, prUpper}, // L& CYRILLIC CAPITAL LETTER DJERV {0xA649, 0xA649, prLower}, // L& CYRILLIC SMALL LETTER DJERV {0xA64A, 0xA64A, prUpper}, // L& CYRILLIC CAPITAL LETTER MONOGRAPH UK {0xA64B, 0xA64B, prLower}, // L& CYRILLIC SMALL LETTER MONOGRAPH UK {0xA64C, 0xA64C, prUpper}, // L& CYRILLIC CAPITAL LETTER BROAD OMEGA {0xA64D, 0xA64D, prLower}, // L& CYRILLIC SMALL LETTER BROAD OMEGA {0xA64E, 0xA64E, prUpper}, // L& CYRILLIC CAPITAL LETTER NEUTRAL YER {0xA64F, 0xA64F, prLower}, // L& CYRILLIC SMALL LETTER NEUTRAL YER {0xA650, 0xA650, prUpper}, // L& CYRILLIC CAPITAL LETTER YERU WITH BACK YER {0xA651, 0xA651, prLower}, // L& CYRILLIC SMALL LETTER YERU WITH BACK YER {0xA652, 0xA652, prUpper}, // L& CYRILLIC CAPITAL LETTER IOTIFIED YAT {0xA653, 0xA653, prLower}, // L& CYRILLIC SMALL LETTER IOTIFIED YAT {0xA654, 0xA654, prUpper}, // L& CYRILLIC CAPITAL LETTER REVERSED YU {0xA655, 0xA655, prLower}, // L& CYRILLIC SMALL LETTER REVERSED YU {0xA656, 0xA656, prUpper}, // L& CYRILLIC CAPITAL LETTER IOTIFIED A {0xA657, 0xA657, prLower}, // L& CYRILLIC SMALL LETTER IOTIFIED A {0xA658, 0xA658, prUpper}, // L& CYRILLIC CAPITAL LETTER CLOSED LITTLE YUS {0xA659, 0xA659, prLower}, // L& CYRILLIC SMALL LETTER CLOSED LITTLE YUS {0xA65A, 0xA65A, prUpper}, // L& CYRILLIC CAPITAL LETTER BLENDED YUS {0xA65B, 0xA65B, prLower}, // L& CYRILLIC SMALL LETTER BLENDED YUS {0xA65C, 0xA65C, prUpper}, // L& CYRILLIC CAPITAL LETTER IOTIFIED CLOSED LITTLE YUS {0xA65D, 0xA65D, prLower}, // L& CYRILLIC SMALL LETTER IOTIFIED CLOSED LITTLE YUS {0xA65E, 0xA65E, prUpper}, // L& CYRILLIC CAPITAL LETTER YN {0xA65F, 0xA65F, prLower}, // L& CYRILLIC SMALL LETTER YN {0xA660, 0xA660, prUpper}, // L& CYRILLIC CAPITAL LETTER REVERSED TSE {0xA661, 0xA661, prLower}, // L& CYRILLIC SMALL LETTER REVERSED TSE {0xA662, 0xA662, prUpper}, // L& CYRILLIC CAPITAL LETTER SOFT DE {0xA663, 0xA663, prLower}, // L& CYRILLIC SMALL LETTER SOFT DE {0xA664, 0xA664, prUpper}, // L& CYRILLIC CAPITAL LETTER SOFT EL {0xA665, 0xA665, prLower}, // L& CYRILLIC SMALL LETTER SOFT EL {0xA666, 0xA666, prUpper}, // L& CYRILLIC CAPITAL LETTER SOFT EM {0xA667, 0xA667, prLower}, // L& CYRILLIC SMALL LETTER SOFT EM {0xA668, 0xA668, prUpper}, // L& CYRILLIC CAPITAL LETTER MONOCULAR O {0xA669, 0xA669, prLower}, // L& CYRILLIC SMALL LETTER MONOCULAR O {0xA66A, 0xA66A, prUpper}, // L& CYRILLIC CAPITAL LETTER BINOCULAR O {0xA66B, 0xA66B, prLower}, // L& CYRILLIC SMALL LETTER BINOCULAR O {0xA66C, 0xA66C, prUpper}, // L& CYRILLIC CAPITAL LETTER DOUBLE MONOCULAR O {0xA66D, 0xA66D, prLower}, // L& CYRILLIC SMALL LETTER DOUBLE MONOCULAR O {0xA66E, 0xA66E, prOLetter}, // Lo CYRILLIC LETTER MULTIOCULAR O {0xA66F, 0xA66F, prExtend}, // Mn COMBINING CYRILLIC VZMET {0xA670, 0xA672, prExtend}, // Me [3] COMBINING CYRILLIC TEN MILLIONS SIGN..COMBINING CYRILLIC THOUSAND MILLIONS SIGN {0xA674, 0xA67D, prExtend}, // Mn [10] COMBINING CYRILLIC LETTER UKRAINIAN IE..COMBINING CYRILLIC PAYEROK {0xA67F, 0xA67F, prOLetter}, // Lm CYRILLIC PAYEROK {0xA680, 0xA680, prUpper}, // L& CYRILLIC CAPITAL LETTER DWE {0xA681, 0xA681, prLower}, // L& CYRILLIC SMALL LETTER DWE {0xA682, 0xA682, prUpper}, // L& CYRILLIC CAPITAL LETTER DZWE {0xA683, 0xA683, prLower}, // L& CYRILLIC SMALL LETTER DZWE {0xA684, 0xA684, prUpper}, // L& CYRILLIC CAPITAL LETTER ZHWE {0xA685, 0xA685, prLower}, // L& CYRILLIC SMALL LETTER ZHWE {0xA686, 0xA686, prUpper}, // L& CYRILLIC CAPITAL LETTER CCHE {0xA687, 0xA687, prLower}, // L& CYRILLIC SMALL LETTER CCHE {0xA688, 0xA688, prUpper}, // L& CYRILLIC CAPITAL LETTER DZZE {0xA689, 0xA689, prLower}, // L& CYRILLIC SMALL LETTER DZZE {0xA68A, 0xA68A, prUpper}, // L& CYRILLIC CAPITAL LETTER TE WITH MIDDLE HOOK {0xA68B, 0xA68B, prLower}, // L& CYRILLIC SMALL LETTER TE WITH MIDDLE HOOK {0xA68C, 0xA68C, prUpper}, // L& CYRILLIC CAPITAL LETTER TWE {0xA68D, 0xA68D, prLower}, // L& CYRILLIC SMALL LETTER TWE {0xA68E, 0xA68E, prUpper}, // L& CYRILLIC CAPITAL LETTER TSWE {0xA68F, 0xA68F, prLower}, // L& CYRILLIC SMALL LETTER TSWE {0xA690, 0xA690, prUpper}, // L& CYRILLIC CAPITAL LETTER TSSE {0xA691, 0xA691, prLower}, // L& CYRILLIC SMALL LETTER TSSE {0xA692, 0xA692, prUpper}, // L& CYRILLIC CAPITAL LETTER TCHE {0xA693, 0xA693, prLower}, // L& CYRILLIC SMALL LETTER TCHE {0xA694, 0xA694, prUpper}, // L& CYRILLIC CAPITAL LETTER HWE {0xA695, 0xA695, prLower}, // L& CYRILLIC SMALL LETTER HWE {0xA696, 0xA696, prUpper}, // L& CYRILLIC CAPITAL LETTER SHWE {0xA697, 0xA697, prLower}, // L& CYRILLIC SMALL LETTER SHWE {0xA698, 0xA698, prUpper}, // L& CYRILLIC CAPITAL LETTER DOUBLE O {0xA699, 0xA699, prLower}, // L& CYRILLIC SMALL LETTER DOUBLE O {0xA69A, 0xA69A, prUpper}, // L& CYRILLIC CAPITAL LETTER CROSSED O {0xA69B, 0xA69B, prLower}, // L& CYRILLIC SMALL LETTER CROSSED O {0xA69C, 0xA69D, prLower}, // Lm [2] MODIFIER LETTER CYRILLIC HARD SIGN..MODIFIER LETTER CYRILLIC SOFT SIGN {0xA69E, 0xA69F, prExtend}, // Mn [2] COMBINING CYRILLIC LETTER EF..COMBINING CYRILLIC LETTER IOTIFIED E {0xA6A0, 0xA6E5, prOLetter}, // Lo [70] BAMUM LETTER A..BAMUM LETTER KI {0xA6E6, 0xA6EF, prOLetter}, // Nl [10] BAMUM LETTER MO..BAMUM LETTER KOGHOM {0xA6F0, 0xA6F1, prExtend}, // Mn [2] BAMUM COMBINING MARK KOQNDON..BAMUM COMBINING MARK TUKWENTIS {0xA6F3, 0xA6F3, prSTerm}, // Po BAMUM FULL STOP {0xA6F7, 0xA6F7, prSTerm}, // Po BAMUM QUESTION MARK {0xA717, 0xA71F, prOLetter}, // Lm [9] MODIFIER LETTER DOT VERTICAL BAR..MODIFIER LETTER LOW INVERTED EXCLAMATION MARK {0xA722, 0xA722, prUpper}, // L& LATIN CAPITAL LETTER EGYPTOLOGICAL ALEF {0xA723, 0xA723, prLower}, // L& LATIN SMALL LETTER EGYPTOLOGICAL ALEF {0xA724, 0xA724, prUpper}, // L& LATIN CAPITAL LETTER EGYPTOLOGICAL AIN {0xA725, 0xA725, prLower}, // L& LATIN SMALL LETTER EGYPTOLOGICAL AIN {0xA726, 0xA726, prUpper}, // L& LATIN CAPITAL LETTER HENG {0xA727, 0xA727, prLower}, // L& LATIN SMALL LETTER HENG {0xA728, 0xA728, prUpper}, // L& LATIN CAPITAL LETTER TZ {0xA729, 0xA729, prLower}, // L& LATIN SMALL LETTER TZ {0xA72A, 0xA72A, prUpper}, // L& LATIN CAPITAL LETTER TRESILLO {0xA72B, 0xA72B, prLower}, // L& LATIN SMALL LETTER TRESILLO {0xA72C, 0xA72C, prUpper}, // L& LATIN CAPITAL LETTER CUATRILLO {0xA72D, 0xA72D, prLower}, // L& LATIN SMALL LETTER CUATRILLO {0xA72E, 0xA72E, prUpper}, // L& LATIN CAPITAL LETTER CUATRILLO WITH COMMA {0xA72F, 0xA731, prLower}, // L& [3] LATIN SMALL LETTER CUATRILLO WITH COMMA..LATIN LETTER SMALL CAPITAL S {0xA732, 0xA732, prUpper}, // L& LATIN CAPITAL LETTER AA {0xA733, 0xA733, prLower}, // L& LATIN SMALL LETTER AA {0xA734, 0xA734, prUpper}, // L& LATIN CAPITAL LETTER AO {0xA735, 0xA735, prLower}, // L& LATIN SMALL LETTER AO {0xA736, 0xA736, prUpper}, // L& LATIN CAPITAL LETTER AU {0xA737, 0xA737, prLower}, // L& LATIN SMALL LETTER AU {0xA738, 0xA738, prUpper}, // L& LATIN CAPITAL LETTER AV {0xA739, 0xA739, prLower}, // L& LATIN SMALL LETTER AV {0xA73A, 0xA73A, prUpper}, // L& LATIN CAPITAL LETTER AV WITH HORIZONTAL BAR {0xA73B, 0xA73B, prLower}, // L& LATIN SMALL LETTER AV WITH HORIZONTAL BAR {0xA73C, 0xA73C, prUpper}, // L& LATIN CAPITAL LETTER AY {0xA73D, 0xA73D, prLower}, // L& LATIN SMALL LETTER AY {0xA73E, 0xA73E, prUpper}, // L& LATIN CAPITAL LETTER REVERSED C WITH DOT {0xA73F, 0xA73F, prLower}, // L& LATIN SMALL LETTER REVERSED C WITH DOT {0xA740, 0xA740, prUpper}, // L& LATIN CAPITAL LETTER K WITH STROKE {0xA741, 0xA741, prLower}, // L& LATIN SMALL LETTER K WITH STROKE {0xA742, 0xA742, prUpper}, // L& LATIN CAPITAL LETTER K WITH DIAGONAL STROKE {0xA743, 0xA743, prLower}, // L& LATIN SMALL LETTER K WITH DIAGONAL STROKE {0xA744, 0xA744, prUpper}, // L& LATIN CAPITAL LETTER K WITH STROKE AND DIAGONAL STROKE {0xA745, 0xA745, prLower}, // L& LATIN SMALL LETTER K WITH STROKE AND DIAGONAL STROKE {0xA746, 0xA746, prUpper}, // L& LATIN CAPITAL LETTER BROKEN L {0xA747, 0xA747, prLower}, // L& LATIN SMALL LETTER BROKEN L {0xA748, 0xA748, prUpper}, // L& LATIN CAPITAL LETTER L WITH HIGH STROKE {0xA749, 0xA749, prLower}, // L& LATIN SMALL LETTER L WITH HIGH STROKE {0xA74A, 0xA74A, prUpper}, // L& LATIN CAPITAL LETTER O WITH LONG STROKE OVERLAY {0xA74B, 0xA74B, prLower}, // L& LATIN SMALL LETTER O WITH LONG STROKE OVERLAY {0xA74C, 0xA74C, prUpper}, // L& LATIN CAPITAL LETTER O WITH LOOP {0xA74D, 0xA74D, prLower}, // L& LATIN SMALL LETTER O WITH LOOP {0xA74E, 0xA74E, prUpper}, // L& LATIN CAPITAL LETTER OO {0xA74F, 0xA74F, prLower}, // L& LATIN SMALL LETTER OO {0xA750, 0xA750, prUpper}, // L& LATIN CAPITAL LETTER P WITH STROKE THROUGH DESCENDER {0xA751, 0xA751, prLower}, // L& LATIN SMALL LETTER P WITH STROKE THROUGH DESCENDER {0xA752, 0xA752, prUpper}, // L& LATIN CAPITAL LETTER P WITH FLOURISH {0xA753, 0xA753, prLower}, // L& LATIN SMALL LETTER P WITH FLOURISH {0xA754, 0xA754, prUpper}, // L& LATIN CAPITAL LETTER P WITH SQUIRREL TAIL {0xA755, 0xA755, prLower}, // L& LATIN SMALL LETTER P WITH SQUIRREL TAIL {0xA756, 0xA756, prUpper}, // L& LATIN CAPITAL LETTER Q WITH STROKE THROUGH DESCENDER {0xA757, 0xA757, prLower}, // L& LATIN SMALL LETTER Q WITH STROKE THROUGH DESCENDER {0xA758, 0xA758, prUpper}, // L& LATIN CAPITAL LETTER Q WITH DIAGONAL STROKE {0xA759, 0xA759, prLower}, // L& LATIN SMALL LETTER Q WITH DIAGONAL STROKE {0xA75A, 0xA75A, prUpper}, // L& LATIN CAPITAL LETTER R ROTUNDA {0xA75B, 0xA75B, prLower}, // L& LATIN SMALL LETTER R ROTUNDA {0xA75C, 0xA75C, prUpper}, // L& LATIN CAPITAL LETTER RUM ROTUNDA {0xA75D, 0xA75D, prLower}, // L& LATIN SMALL LETTER RUM ROTUNDA {0xA75E, 0xA75E, prUpper}, // L& LATIN CAPITAL LETTER V WITH DIAGONAL STROKE {0xA75F, 0xA75F, prLower}, // L& LATIN SMALL LETTER V WITH DIAGONAL STROKE {0xA760, 0xA760, prUpper}, // L& LATIN CAPITAL LETTER VY {0xA761, 0xA761, prLower}, // L& LATIN SMALL LETTER VY {0xA762, 0xA762, prUpper}, // L& LATIN CAPITAL LETTER VISIGOTHIC Z {0xA763, 0xA763, prLower}, // L& LATIN SMALL LETTER VISIGOTHIC Z {0xA764, 0xA764, prUpper}, // L& LATIN CAPITAL LETTER THORN WITH STROKE {0xA765, 0xA765, prLower}, // L& LATIN SMALL LETTER THORN WITH STROKE {0xA766, 0xA766, prUpper}, // L& LATIN CAPITAL LETTER THORN WITH STROKE THROUGH DESCENDER {0xA767, 0xA767, prLower}, // L& LATIN SMALL LETTER THORN WITH STROKE THROUGH DESCENDER {0xA768, 0xA768, prUpper}, // L& LATIN CAPITAL LETTER VEND {0xA769, 0xA769, prLower}, // L& LATIN SMALL LETTER VEND {0xA76A, 0xA76A, prUpper}, // L& LATIN CAPITAL LETTER ET {0xA76B, 0xA76B, prLower}, // L& LATIN SMALL LETTER ET {0xA76C, 0xA76C, prUpper}, // L& LATIN CAPITAL LETTER IS {0xA76D, 0xA76D, prLower}, // L& LATIN SMALL LETTER IS {0xA76E, 0xA76E, prUpper}, // L& LATIN CAPITAL LETTER CON {0xA76F, 0xA76F, prLower}, // L& LATIN SMALL LETTER CON {0xA770, 0xA770, prLower}, // Lm MODIFIER LETTER US {0xA771, 0xA778, prLower}, // L& [8] LATIN SMALL LETTER DUM..LATIN SMALL LETTER UM {0xA779, 0xA779, prUpper}, // L& LATIN CAPITAL LETTER INSULAR D {0xA77A, 0xA77A, prLower}, // L& LATIN SMALL LETTER INSULAR D {0xA77B, 0xA77B, prUpper}, // L& LATIN CAPITAL LETTER INSULAR F {0xA77C, 0xA77C, prLower}, // L& LATIN SMALL LETTER INSULAR F {0xA77D, 0xA77E, prUpper}, // L& [2] LATIN CAPITAL LETTER INSULAR G..LATIN CAPITAL LETTER TURNED INSULAR G {0xA77F, 0xA77F, prLower}, // L& LATIN SMALL LETTER TURNED INSULAR G {0xA780, 0xA780, prUpper}, // L& LATIN CAPITAL LETTER TURNED L {0xA781, 0xA781, prLower}, // L& LATIN SMALL LETTER TURNED L {0xA782, 0xA782, prUpper}, // L& LATIN CAPITAL LETTER INSULAR R {0xA783, 0xA783, prLower}, // L& LATIN SMALL LETTER INSULAR R {0xA784, 0xA784, prUpper}, // L& LATIN CAPITAL LETTER INSULAR S {0xA785, 0xA785, prLower}, // L& LATIN SMALL LETTER INSULAR S {0xA786, 0xA786, prUpper}, // L& LATIN CAPITAL LETTER INSULAR T {0xA787, 0xA787, prLower}, // L& LATIN SMALL LETTER INSULAR T {0xA788, 0xA788, prOLetter}, // Lm MODIFIER LETTER LOW CIRCUMFLEX ACCENT {0xA78B, 0xA78B, prUpper}, // L& LATIN CAPITAL LETTER SALTILLO {0xA78C, 0xA78C, prLower}, // L& LATIN SMALL LETTER SALTILLO {0xA78D, 0xA78D, prUpper}, // L& LATIN CAPITAL LETTER TURNED H {0xA78E, 0xA78E, prLower}, // L& LATIN SMALL LETTER L WITH RETROFLEX HOOK AND BELT {0xA78F, 0xA78F, prOLetter}, // Lo LATIN LETTER SINOLOGICAL DOT {0xA790, 0xA790, prUpper}, // L& LATIN CAPITAL LETTER N WITH DESCENDER {0xA791, 0xA791, prLower}, // L& LATIN SMALL LETTER N WITH DESCENDER {0xA792, 0xA792, prUpper}, // L& LATIN CAPITAL LETTER C WITH BAR {0xA793, 0xA795, prLower}, // L& [3] LATIN SMALL LETTER C WITH BAR..LATIN SMALL LETTER H WITH PALATAL HOOK {0xA796, 0xA796, prUpper}, // L& LATIN CAPITAL LETTER B WITH FLOURISH {0xA797, 0xA797, prLower}, // L& LATIN SMALL LETTER B WITH FLOURISH {0xA798, 0xA798, prUpper}, // L& LATIN CAPITAL LETTER F WITH STROKE {0xA799, 0xA799, prLower}, // L& LATIN SMALL LETTER F WITH STROKE {0xA79A, 0xA79A, prUpper}, // L& LATIN CAPITAL LETTER VOLAPUK AE {0xA79B, 0xA79B, prLower}, // L& LATIN SMALL LETTER VOLAPUK AE {0xA79C, 0xA79C, prUpper}, // L& LATIN CAPITAL LETTER VOLAPUK OE {0xA79D, 0xA79D, prLower}, // L& LATIN SMALL LETTER VOLAPUK OE {0xA79E, 0xA79E, prUpper}, // L& LATIN CAPITAL LETTER VOLAPUK UE {0xA79F, 0xA79F, prLower}, // L& LATIN SMALL LETTER VOLAPUK UE {0xA7A0, 0xA7A0, prUpper}, // L& LATIN CAPITAL LETTER G WITH OBLIQUE STROKE {0xA7A1, 0xA7A1, prLower}, // L& LATIN SMALL LETTER G WITH OBLIQUE STROKE {0xA7A2, 0xA7A2, prUpper}, // L& LATIN CAPITAL LETTER K WITH OBLIQUE STROKE {0xA7A3, 0xA7A3, prLower}, // L& LATIN SMALL LETTER K WITH OBLIQUE STROKE {0xA7A4, 0xA7A4, prUpper}, // L& LATIN CAPITAL LETTER N WITH OBLIQUE STROKE {0xA7A5, 0xA7A5, prLower}, // L& LATIN SMALL LETTER N WITH OBLIQUE STROKE {0xA7A6, 0xA7A6, prUpper}, // L& LATIN CAPITAL LETTER R WITH OBLIQUE STROKE {0xA7A7, 0xA7A7, prLower}, // L& LATIN SMALL LETTER R WITH OBLIQUE STROKE {0xA7A8, 0xA7A8, prUpper}, // L& LATIN CAPITAL LETTER S WITH OBLIQUE STROKE {0xA7A9, 0xA7A9, prLower}, // L& LATIN SMALL LETTER S WITH OBLIQUE STROKE {0xA7AA, 0xA7AE, prUpper}, // L& [5] LATIN CAPITAL LETTER H WITH HOOK..LATIN CAPITAL LETTER SMALL CAPITAL I {0xA7AF, 0xA7AF, prLower}, // L& LATIN LETTER SMALL CAPITAL Q {0xA7B0, 0xA7B4, prUpper}, // L& [5] LATIN CAPITAL LETTER TURNED K..LATIN CAPITAL LETTER BETA {0xA7B5, 0xA7B5, prLower}, // L& LATIN SMALL LETTER BETA {0xA7B6, 0xA7B6, prUpper}, // L& LATIN CAPITAL LETTER OMEGA {0xA7B7, 0xA7B7, prLower}, // L& LATIN SMALL LETTER OMEGA {0xA7B8, 0xA7B8, prUpper}, // L& LATIN CAPITAL LETTER U WITH STROKE {0xA7B9, 0xA7B9, prLower}, // L& LATIN SMALL LETTER U WITH STROKE {0xA7BA, 0xA7BA, prUpper}, // L& LATIN CAPITAL LETTER GLOTTAL A {0xA7BB, 0xA7BB, prLower}, // L& LATIN SMALL LETTER GLOTTAL A {0xA7BC, 0xA7BC, prUpper}, // L& LATIN CAPITAL LETTER GLOTTAL I {0xA7BD, 0xA7BD, prLower}, // L& LATIN SMALL LETTER GLOTTAL I {0xA7BE, 0xA7BE, prUpper}, // L& LATIN CAPITAL LETTER GLOTTAL U {0xA7BF, 0xA7BF, prLower}, // L& LATIN SMALL LETTER GLOTTAL U {0xA7C0, 0xA7C0, prUpper}, // L& LATIN CAPITAL LETTER OLD POLISH O {0xA7C1, 0xA7C1, prLower}, // L& LATIN SMALL LETTER OLD POLISH O {0xA7C2, 0xA7C2, prUpper}, // L& LATIN CAPITAL LETTER ANGLICANA W {0xA7C3, 0xA7C3, prLower}, // L& LATIN SMALL LETTER ANGLICANA W {0xA7C4, 0xA7C7, prUpper}, // L& [4] LATIN CAPITAL LETTER C WITH PALATAL HOOK..LATIN CAPITAL LETTER D WITH SHORT STROKE OVERLAY {0xA7C8, 0xA7C8, prLower}, // L& LATIN SMALL LETTER D WITH SHORT STROKE OVERLAY {0xA7C9, 0xA7C9, prUpper}, // L& LATIN CAPITAL LETTER S WITH SHORT STROKE OVERLAY {0xA7CA, 0xA7CA, prLower}, // L& LATIN SMALL LETTER S WITH SHORT STROKE OVERLAY {0xA7D0, 0xA7D0, prUpper}, // L& LATIN CAPITAL LETTER CLOSED INSULAR G {0xA7D1, 0xA7D1, prLower}, // L& LATIN SMALL LETTER CLOSED INSULAR G {0xA7D3, 0xA7D3, prLower}, // L& LATIN SMALL LETTER DOUBLE THORN {0xA7D5, 0xA7D5, prLower}, // L& LATIN SMALL LETTER DOUBLE WYNN {0xA7D6, 0xA7D6, prUpper}, // L& LATIN CAPITAL LETTER MIDDLE SCOTS S {0xA7D7, 0xA7D7, prLower}, // L& LATIN SMALL LETTER MIDDLE SCOTS S {0xA7D8, 0xA7D8, prUpper}, // L& LATIN CAPITAL LETTER SIGMOID S {0xA7D9, 0xA7D9, prLower}, // L& LATIN SMALL LETTER SIGMOID S {0xA7F2, 0xA7F4, prLower}, // Lm [3] MODIFIER LETTER CAPITAL C..MODIFIER LETTER CAPITAL Q {0xA7F5, 0xA7F5, prUpper}, // L& LATIN CAPITAL LETTER REVERSED HALF H {0xA7F6, 0xA7F6, prLower}, // L& LATIN SMALL LETTER REVERSED HALF H {0xA7F7, 0xA7F7, prOLetter}, // Lo LATIN EPIGRAPHIC LETTER SIDEWAYS I {0xA7F8, 0xA7F9, prLower}, // Lm [2] MODIFIER LETTER CAPITAL H WITH STROKE..MODIFIER LETTER SMALL LIGATURE OE {0xA7FA, 0xA7FA, prLower}, // L& LATIN LETTER SMALL CAPITAL TURNED M {0xA7FB, 0xA801, prOLetter}, // Lo [7] LATIN EPIGRAPHIC LETTER REVERSED F..SYLOTI NAGRI LETTER I {0xA802, 0xA802, prExtend}, // Mn SYLOTI NAGRI SIGN DVISVARA {0xA803, 0xA805, prOLetter}, // Lo [3] SYLOTI NAGRI LETTER U..SYLOTI NAGRI LETTER O {0xA806, 0xA806, prExtend}, // Mn SYLOTI NAGRI SIGN HASANTA {0xA807, 0xA80A, prOLetter}, // Lo [4] SYLOTI NAGRI LETTER KO..SYLOTI NAGRI LETTER GHO {0xA80B, 0xA80B, prExtend}, // Mn SYLOTI NAGRI SIGN ANUSVARA {0xA80C, 0xA822, prOLetter}, // Lo [23] SYLOTI NAGRI LETTER CO..SYLOTI NAGRI LETTER HO {0xA823, 0xA824, prExtend}, // Mc [2] SYLOTI NAGRI VOWEL SIGN A..SYLOTI NAGRI VOWEL SIGN I {0xA825, 0xA826, prExtend}, // Mn [2] SYLOTI NAGRI VOWEL SIGN U..SYLOTI NAGRI VOWEL SIGN E {0xA827, 0xA827, prExtend}, // Mc SYLOTI NAGRI VOWEL SIGN OO {0xA82C, 0xA82C, prExtend}, // Mn SYLOTI NAGRI SIGN ALTERNATE HASANTA {0xA840, 0xA873, prOLetter}, // Lo [52] PHAGS-PA LETTER KA..PHAGS-PA LETTER CANDRABINDU {0xA876, 0xA877, prSTerm}, // Po [2] PHAGS-PA MARK SHAD..PHAGS-PA MARK DOUBLE SHAD {0xA880, 0xA881, prExtend}, // Mc [2] SAURASHTRA SIGN ANUSVARA..SAURASHTRA SIGN VISARGA {0xA882, 0xA8B3, prOLetter}, // Lo [50] SAURASHTRA LETTER A..SAURASHTRA LETTER LLA {0xA8B4, 0xA8C3, prExtend}, // Mc [16] SAURASHTRA CONSONANT SIGN HAARU..SAURASHTRA VOWEL SIGN AU {0xA8C4, 0xA8C5, prExtend}, // Mn [2] SAURASHTRA SIGN VIRAMA..SAURASHTRA SIGN CANDRABINDU {0xA8CE, 0xA8CF, prSTerm}, // Po [2] SAURASHTRA DANDA..SAURASHTRA DOUBLE DANDA {0xA8D0, 0xA8D9, prNumeric}, // Nd [10] SAURASHTRA DIGIT ZERO..SAURASHTRA DIGIT NINE {0xA8E0, 0xA8F1, prExtend}, // Mn [18] COMBINING DEVANAGARI DIGIT ZERO..COMBINING DEVANAGARI SIGN AVAGRAHA {0xA8F2, 0xA8F7, prOLetter}, // Lo [6] DEVANAGARI SIGN SPACING CANDRABINDU..DEVANAGARI SIGN CANDRABINDU AVAGRAHA {0xA8FB, 0xA8FB, prOLetter}, // Lo DEVANAGARI HEADSTROKE {0xA8FD, 0xA8FE, prOLetter}, // Lo [2] DEVANAGARI JAIN OM..DEVANAGARI LETTER AY {0xA8FF, 0xA8FF, prExtend}, // Mn DEVANAGARI VOWEL SIGN AY {0xA900, 0xA909, prNumeric}, // Nd [10] KAYAH LI DIGIT ZERO..KAYAH LI DIGIT NINE {0xA90A, 0xA925, prOLetter}, // Lo [28] KAYAH LI LETTER KA..KAYAH LI LETTER OO {0xA926, 0xA92D, prExtend}, // Mn [8] KAYAH LI VOWEL UE..KAYAH LI TONE CALYA PLOPHU {0xA92F, 0xA92F, prSTerm}, // Po KAYAH LI SIGN SHYA {0xA930, 0xA946, prOLetter}, // Lo [23] REJANG LETTER KA..REJANG LETTER A {0xA947, 0xA951, prExtend}, // Mn [11] REJANG VOWEL SIGN I..REJANG CONSONANT SIGN R {0xA952, 0xA953, prExtend}, // Mc [2] REJANG CONSONANT SIGN H..REJANG VIRAMA {0xA960, 0xA97C, prOLetter}, // Lo [29] HANGUL CHOSEONG TIKEUT-MIEUM..HANGUL CHOSEONG SSANGYEORINHIEUH {0xA980, 0xA982, prExtend}, // Mn [3] JAVANESE SIGN PANYANGGA..JAVANESE SIGN LAYAR {0xA983, 0xA983, prExtend}, // Mc JAVANESE SIGN WIGNYAN {0xA984, 0xA9B2, prOLetter}, // Lo [47] JAVANESE LETTER A..JAVANESE LETTER HA {0xA9B3, 0xA9B3, prExtend}, // Mn JAVANESE SIGN CECAK TELU {0xA9B4, 0xA9B5, prExtend}, // Mc [2] JAVANESE VOWEL SIGN TARUNG..JAVANESE VOWEL SIGN TOLONG {0xA9B6, 0xA9B9, prExtend}, // Mn [4] JAVANESE VOWEL SIGN WULU..JAVANESE VOWEL SIGN SUKU MENDUT {0xA9BA, 0xA9BB, prExtend}, // Mc [2] JAVANESE VOWEL SIGN TALING..JAVANESE VOWEL SIGN DIRGA MURE {0xA9BC, 0xA9BD, prExtend}, // Mn [2] JAVANESE VOWEL SIGN PEPET..JAVANESE CONSONANT SIGN KERET {0xA9BE, 0xA9C0, prExtend}, // Mc [3] JAVANESE CONSONANT SIGN PENGKAL..JAVANESE PANGKON {0xA9C8, 0xA9C9, prSTerm}, // Po [2] JAVANESE PADA LINGSA..JAVANESE PADA LUNGSI {0xA9CF, 0xA9CF, prOLetter}, // Lm JAVANESE PANGRANGKEP {0xA9D0, 0xA9D9, prNumeric}, // Nd [10] JAVANESE DIGIT ZERO..JAVANESE DIGIT NINE {0xA9E0, 0xA9E4, prOLetter}, // Lo [5] MYANMAR LETTER SHAN GHA..MYANMAR LETTER SHAN BHA {0xA9E5, 0xA9E5, prExtend}, // Mn MYANMAR SIGN SHAN SAW {0xA9E6, 0xA9E6, prOLetter}, // Lm MYANMAR MODIFIER LETTER SHAN REDUPLICATION {0xA9E7, 0xA9EF, prOLetter}, // Lo [9] MYANMAR LETTER TAI LAING NYA..MYANMAR LETTER TAI LAING NNA {0xA9F0, 0xA9F9, prNumeric}, // Nd [10] MYANMAR TAI LAING DIGIT ZERO..MYANMAR TAI LAING DIGIT NINE {0xA9FA, 0xA9FE, prOLetter}, // Lo [5] MYANMAR LETTER TAI LAING LLA..MYANMAR LETTER TAI LAING BHA {0xAA00, 0xAA28, prOLetter}, // Lo [41] CHAM LETTER A..CHAM LETTER HA {0xAA29, 0xAA2E, prExtend}, // Mn [6] CHAM VOWEL SIGN AA..CHAM VOWEL SIGN OE {0xAA2F, 0xAA30, prExtend}, // Mc [2] CHAM VOWEL SIGN O..CHAM VOWEL SIGN AI {0xAA31, 0xAA32, prExtend}, // Mn [2] CHAM VOWEL SIGN AU..CHAM VOWEL SIGN UE {0xAA33, 0xAA34, prExtend}, // Mc [2] CHAM CONSONANT SIGN YA..CHAM CONSONANT SIGN RA {0xAA35, 0xAA36, prExtend}, // Mn [2] CHAM CONSONANT SIGN LA..CHAM CONSONANT SIGN WA {0xAA40, 0xAA42, prOLetter}, // Lo [3] CHAM LETTER FINAL K..CHAM LETTER FINAL NG {0xAA43, 0xAA43, prExtend}, // Mn CHAM CONSONANT SIGN FINAL NG {0xAA44, 0xAA4B, prOLetter}, // Lo [8] CHAM LETTER FINAL CH..CHAM LETTER FINAL SS {0xAA4C, 0xAA4C, prExtend}, // Mn CHAM CONSONANT SIGN FINAL M {0xAA4D, 0xAA4D, prExtend}, // Mc CHAM CONSONANT SIGN FINAL H {0xAA50, 0xAA59, prNumeric}, // Nd [10] CHAM DIGIT ZERO..CHAM DIGIT NINE {0xAA5D, 0xAA5F, prSTerm}, // Po [3] CHAM PUNCTUATION DANDA..CHAM PUNCTUATION TRIPLE DANDA {0xAA60, 0xAA6F, prOLetter}, // Lo [16] MYANMAR LETTER KHAMTI GA..MYANMAR LETTER KHAMTI FA {0xAA70, 0xAA70, prOLetter}, // Lm MYANMAR MODIFIER LETTER KHAMTI REDUPLICATION {0xAA71, 0xAA76, prOLetter}, // Lo [6] MYANMAR LETTER KHAMTI XA..MYANMAR LOGOGRAM KHAMTI HM {0xAA7A, 0xAA7A, prOLetter}, // Lo MYANMAR LETTER AITON RA {0xAA7B, 0xAA7B, prExtend}, // Mc MYANMAR SIGN PAO KAREN TONE {0xAA7C, 0xAA7C, prExtend}, // Mn MYANMAR SIGN TAI LAING TONE-2 {0xAA7D, 0xAA7D, prExtend}, // Mc MYANMAR SIGN TAI LAING TONE-5 {0xAA7E, 0xAAAF, prOLetter}, // Lo [50] MYANMAR LETTER SHWE PALAUNG CHA..TAI VIET LETTER HIGH O {0xAAB0, 0xAAB0, prExtend}, // Mn TAI VIET MAI KANG {0xAAB1, 0xAAB1, prOLetter}, // Lo TAI VIET VOWEL AA {0xAAB2, 0xAAB4, prExtend}, // Mn [3] TAI VIET VOWEL I..TAI VIET VOWEL U {0xAAB5, 0xAAB6, prOLetter}, // Lo [2] TAI VIET VOWEL E..TAI VIET VOWEL O {0xAAB7, 0xAAB8, prExtend}, // Mn [2] TAI VIET MAI KHIT..TAI VIET VOWEL IA {0xAAB9, 0xAABD, prOLetter}, // Lo [5] TAI VIET VOWEL UEA..TAI VIET VOWEL AN {0xAABE, 0xAABF, prExtend}, // Mn [2] TAI VIET VOWEL AM..TAI VIET TONE MAI EK {0xAAC0, 0xAAC0, prOLetter}, // Lo TAI VIET TONE MAI NUENG {0xAAC1, 0xAAC1, prExtend}, // Mn TAI VIET TONE MAI THO {0xAAC2, 0xAAC2, prOLetter}, // Lo TAI VIET TONE MAI SONG {0xAADB, 0xAADC, prOLetter}, // Lo [2] TAI VIET SYMBOL KON..TAI VIET SYMBOL NUENG {0xAADD, 0xAADD, prOLetter}, // Lm TAI VIET SYMBOL SAM {0xAAE0, 0xAAEA, prOLetter}, // Lo [11] MEETEI MAYEK LETTER E..MEETEI MAYEK LETTER SSA {0xAAEB, 0xAAEB, prExtend}, // Mc MEETEI MAYEK VOWEL SIGN II {0xAAEC, 0xAAED, prExtend}, // Mn [2] MEETEI MAYEK VOWEL SIGN UU..MEETEI MAYEK VOWEL SIGN AAI {0xAAEE, 0xAAEF, prExtend}, // Mc [2] MEETEI MAYEK VOWEL SIGN AU..MEETEI MAYEK VOWEL SIGN AAU {0xAAF0, 0xAAF1, prSTerm}, // Po [2] MEETEI MAYEK CHEIKHAN..MEETEI MAYEK AHANG KHUDAM {0xAAF2, 0xAAF2, prOLetter}, // Lo MEETEI MAYEK ANJI {0xAAF3, 0xAAF4, prOLetter}, // Lm [2] MEETEI MAYEK SYLLABLE REPETITION MARK..MEETEI MAYEK WORD REPETITION MARK {0xAAF5, 0xAAF5, prExtend}, // Mc MEETEI MAYEK VOWEL SIGN VISARGA {0xAAF6, 0xAAF6, prExtend}, // Mn MEETEI MAYEK VIRAMA {0xAB01, 0xAB06, prOLetter}, // Lo [6] ETHIOPIC SYLLABLE TTHU..ETHIOPIC SYLLABLE TTHO {0xAB09, 0xAB0E, prOLetter}, // Lo [6] ETHIOPIC SYLLABLE DDHU..ETHIOPIC SYLLABLE DDHO {0xAB11, 0xAB16, prOLetter}, // Lo [6] ETHIOPIC SYLLABLE DZU..ETHIOPIC SYLLABLE DZO {0xAB20, 0xAB26, prOLetter}, // Lo [7] ETHIOPIC SYLLABLE CCHHA..ETHIOPIC SYLLABLE CCHHO {0xAB28, 0xAB2E, prOLetter}, // Lo [7] ETHIOPIC SYLLABLE BBA..ETHIOPIC SYLLABLE BBO {0xAB30, 0xAB5A, prLower}, // L& [43] LATIN SMALL LETTER BARRED ALPHA..LATIN SMALL LETTER Y WITH SHORT RIGHT LEG {0xAB5C, 0xAB5F, prLower}, // Lm [4] MODIFIER LETTER SMALL HENG..MODIFIER LETTER SMALL U WITH LEFT HOOK {0xAB60, 0xAB68, prLower}, // L& [9] LATIN SMALL LETTER SAKHA YAT..LATIN SMALL LETTER TURNED R WITH MIDDLE TILDE {0xAB69, 0xAB69, prLower}, // Lm MODIFIER LETTER SMALL TURNED W {0xAB70, 0xABBF, prLower}, // L& [80] CHEROKEE SMALL LETTER A..CHEROKEE SMALL LETTER YA {0xABC0, 0xABE2, prOLetter}, // Lo [35] MEETEI MAYEK LETTER KOK..MEETEI MAYEK LETTER I LONSUM {0xABE3, 0xABE4, prExtend}, // Mc [2] MEETEI MAYEK VOWEL SIGN ONAP..MEETEI MAYEK VOWEL SIGN INAP {0xABE5, 0xABE5, prExtend}, // Mn MEETEI MAYEK VOWEL SIGN ANAP {0xABE6, 0xABE7, prExtend}, // Mc [2] MEETEI MAYEK VOWEL SIGN YENAP..MEETEI MAYEK VOWEL SIGN SOUNAP {0xABE8, 0xABE8, prExtend}, // Mn MEETEI MAYEK VOWEL SIGN UNAP {0xABE9, 0xABEA, prExtend}, // Mc [2] MEETEI MAYEK VOWEL SIGN CHEINAP..MEETEI MAYEK VOWEL SIGN NUNG {0xABEB, 0xABEB, prSTerm}, // Po MEETEI MAYEK CHEIKHEI {0xABEC, 0xABEC, prExtend}, // Mc MEETEI MAYEK LUM IYEK {0xABED, 0xABED, prExtend}, // Mn MEETEI MAYEK APUN IYEK {0xABF0, 0xABF9, prNumeric}, // Nd [10] MEETEI MAYEK DIGIT ZERO..MEETEI MAYEK DIGIT NINE {0xAC00, 0xD7A3, prOLetter}, // Lo [11172] HANGUL SYLLABLE GA..HANGUL SYLLABLE HIH {0xD7B0, 0xD7C6, prOLetter}, // Lo [23] HANGUL JUNGSEONG O-YEO..HANGUL JUNGSEONG ARAEA-E {0xD7CB, 0xD7FB, prOLetter}, // Lo [49] HANGUL JONGSEONG NIEUN-RIEUL..HANGUL JONGSEONG PHIEUPH-THIEUTH {0xF900, 0xFA6D, prOLetter}, // Lo [366] CJK COMPATIBILITY IDEOGRAPH-F900..CJK COMPATIBILITY IDEOGRAPH-FA6D {0xFA70, 0xFAD9, prOLetter}, // Lo [106] CJK COMPATIBILITY IDEOGRAPH-FA70..CJK COMPATIBILITY IDEOGRAPH-FAD9 {0xFB00, 0xFB06, prLower}, // L& [7] LATIN SMALL LIGATURE FF..LATIN SMALL LIGATURE ST {0xFB13, 0xFB17, prLower}, // L& [5] ARMENIAN SMALL LIGATURE MEN NOW..ARMENIAN SMALL LIGATURE MEN XEH {0xFB1D, 0xFB1D, prOLetter}, // Lo HEBREW LETTER YOD WITH HIRIQ {0xFB1E, 0xFB1E, prExtend}, // Mn HEBREW POINT JUDEO-SPANISH VARIKA {0xFB1F, 0xFB28, prOLetter}, // Lo [10] HEBREW LIGATURE YIDDISH YOD YOD PATAH..HEBREW LETTER WIDE TAV {0xFB2A, 0xFB36, prOLetter}, // Lo [13] HEBREW LETTER SHIN WITH SHIN DOT..HEBREW LETTER ZAYIN WITH DAGESH {0xFB38, 0xFB3C, prOLetter}, // Lo [5] HEBREW LETTER TET WITH DAGESH..HEBREW LETTER LAMED WITH DAGESH {0xFB3E, 0xFB3E, prOLetter}, // Lo HEBREW LETTER MEM WITH DAGESH {0xFB40, 0xFB41, prOLetter}, // Lo [2] HEBREW LETTER NUN WITH DAGESH..HEBREW LETTER SAMEKH WITH DAGESH {0xFB43, 0xFB44, prOLetter}, // Lo [2] HEBREW LETTER FINAL PE WITH DAGESH..HEBREW LETTER PE WITH DAGESH {0xFB46, 0xFBB1, prOLetter}, // Lo [108] HEBREW LETTER TSADI WITH DAGESH..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE FINAL FORM {0xFBD3, 0xFD3D, prOLetter}, // Lo [363] ARABIC LETTER NG ISOLATED FORM..ARABIC LIGATURE ALEF WITH FATHATAN ISOLATED FORM {0xFD3E, 0xFD3E, prClose}, // Pe ORNATE LEFT PARENTHESIS {0xFD3F, 0xFD3F, prClose}, // Ps ORNATE RIGHT PARENTHESIS {0xFD50, 0xFD8F, prOLetter}, // Lo [64] ARABIC LIGATURE TEH WITH JEEM WITH MEEM INITIAL FORM..ARABIC LIGATURE MEEM WITH KHAH WITH MEEM INITIAL FORM {0xFD92, 0xFDC7, prOLetter}, // Lo [54] ARABIC LIGATURE MEEM WITH JEEM WITH KHAH INITIAL FORM..ARABIC LIGATURE NOON WITH JEEM WITH YEH FINAL FORM {0xFDF0, 0xFDFB, prOLetter}, // Lo [12] ARABIC LIGATURE SALLA USED AS KORANIC STOP SIGN ISOLATED FORM..ARABIC LIGATURE JALLAJALALOUHOU {0xFE00, 0xFE0F, prExtend}, // Mn [16] VARIATION SELECTOR-1..VARIATION SELECTOR-16 {0xFE10, 0xFE11, prSContinue}, // Po [2] PRESENTATION FORM FOR VERTICAL COMMA..PRESENTATION FORM FOR VERTICAL IDEOGRAPHIC COMMA {0xFE13, 0xFE13, prSContinue}, // Po PRESENTATION FORM FOR VERTICAL COLON {0xFE17, 0xFE17, prClose}, // Ps PRESENTATION FORM FOR VERTICAL LEFT WHITE LENTICULAR BRACKET {0xFE18, 0xFE18, prClose}, // Pe PRESENTATION FORM FOR VERTICAL RIGHT WHITE LENTICULAR BRAKCET {0xFE20, 0xFE2F, prExtend}, // Mn [16] COMBINING LIGATURE LEFT HALF..COMBINING CYRILLIC TITLO RIGHT HALF {0xFE31, 0xFE32, prSContinue}, // Pd [2] PRESENTATION FORM FOR VERTICAL EM DASH..PRESENTATION FORM FOR VERTICAL EN DASH {0xFE35, 0xFE35, prClose}, // Ps PRESENTATION FORM FOR VERTICAL LEFT PARENTHESIS {0xFE36, 0xFE36, prClose}, // Pe PRESENTATION FORM FOR VERTICAL RIGHT PARENTHESIS {0xFE37, 0xFE37, prClose}, // Ps PRESENTATION FORM FOR VERTICAL LEFT CURLY BRACKET {0xFE38, 0xFE38, prClose}, // Pe PRESENTATION FORM FOR VERTICAL RIGHT CURLY BRACKET {0xFE39, 0xFE39, prClose}, // Ps PRESENTATION FORM FOR VERTICAL LEFT TORTOISE SHELL BRACKET {0xFE3A, 0xFE3A, prClose}, // Pe PRESENTATION FORM FOR VERTICAL RIGHT TORTOISE SHELL BRACKET {0xFE3B, 0xFE3B, prClose}, // Ps PRESENTATION FORM FOR VERTICAL LEFT BLACK LENTICULAR BRACKET {0xFE3C, 0xFE3C, prClose}, // Pe PRESENTATION FORM FOR VERTICAL RIGHT BLACK LENTICULAR BRACKET {0xFE3D, 0xFE3D, prClose}, // Ps PRESENTATION FORM FOR VERTICAL LEFT DOUBLE ANGLE BRACKET {0xFE3E, 0xFE3E, prClose}, // Pe PRESENTATION FORM FOR VERTICAL RIGHT DOUBLE ANGLE BRACKET {0xFE3F, 0xFE3F, prClose}, // Ps PRESENTATION FORM FOR VERTICAL LEFT ANGLE BRACKET {0xFE40, 0xFE40, prClose}, // Pe PRESENTATION FORM FOR VERTICAL RIGHT ANGLE BRACKET {0xFE41, 0xFE41, prClose}, // Ps PRESENTATION FORM FOR VERTICAL LEFT CORNER BRACKET {0xFE42, 0xFE42, prClose}, // Pe PRESENTATION FORM FOR VERTICAL RIGHT CORNER BRACKET {0xFE43, 0xFE43, prClose}, // Ps PRESENTATION FORM FOR VERTICAL LEFT WHITE CORNER BRACKET {0xFE44, 0xFE44, prClose}, // Pe PRESENTATION FORM FOR VERTICAL RIGHT WHITE CORNER BRACKET {0xFE47, 0xFE47, prClose}, // Ps PRESENTATION FORM FOR VERTICAL LEFT SQUARE BRACKET {0xFE48, 0xFE48, prClose}, // Pe PRESENTATION FORM FOR VERTICAL RIGHT SQUARE BRACKET {0xFE50, 0xFE51, prSContinue}, // Po [2] SMALL COMMA..SMALL IDEOGRAPHIC COMMA {0xFE52, 0xFE52, prATerm}, // Po SMALL FULL STOP {0xFE55, 0xFE55, prSContinue}, // Po SMALL COLON {0xFE56, 0xFE57, prSTerm}, // Po [2] SMALL QUESTION MARK..SMALL EXCLAMATION MARK {0xFE58, 0xFE58, prSContinue}, // Pd SMALL EM DASH {0xFE59, 0xFE59, prClose}, // Ps SMALL LEFT PARENTHESIS {0xFE5A, 0xFE5A, prClose}, // Pe SMALL RIGHT PARENTHESIS {0xFE5B, 0xFE5B, prClose}, // Ps SMALL LEFT CURLY BRACKET {0xFE5C, 0xFE5C, prClose}, // Pe SMALL RIGHT CURLY BRACKET {0xFE5D, 0xFE5D, prClose}, // Ps SMALL LEFT TORTOISE SHELL BRACKET {0xFE5E, 0xFE5E, prClose}, // Pe SMALL RIGHT TORTOISE SHELL BRACKET {0xFE63, 0xFE63, prSContinue}, // Pd SMALL HYPHEN-MINUS {0xFE70, 0xFE74, prOLetter}, // Lo [5] ARABIC FATHATAN ISOLATED FORM..ARABIC KASRATAN ISOLATED FORM {0xFE76, 0xFEFC, prOLetter}, // Lo [135] ARABIC FATHA ISOLATED FORM..ARABIC LIGATURE LAM WITH ALEF FINAL FORM {0xFEFF, 0xFEFF, prFormat}, // Cf ZERO WIDTH NO-BREAK SPACE {0xFF01, 0xFF01, prSTerm}, // Po FULLWIDTH EXCLAMATION MARK {0xFF08, 0xFF08, prClose}, // Ps FULLWIDTH LEFT PARENTHESIS {0xFF09, 0xFF09, prClose}, // Pe FULLWIDTH RIGHT PARENTHESIS {0xFF0C, 0xFF0C, prSContinue}, // Po FULLWIDTH COMMA {0xFF0D, 0xFF0D, prSContinue}, // Pd FULLWIDTH HYPHEN-MINUS {0xFF0E, 0xFF0E, prATerm}, // Po FULLWIDTH FULL STOP {0xFF10, 0xFF19, prNumeric}, // Nd [10] FULLWIDTH DIGIT ZERO..FULLWIDTH DIGIT NINE {0xFF1A, 0xFF1A, prSContinue}, // Po FULLWIDTH COLON {0xFF1F, 0xFF1F, prSTerm}, // Po FULLWIDTH QUESTION MARK {0xFF21, 0xFF3A, prUpper}, // L& [26] FULLWIDTH LATIN CAPITAL LETTER A..FULLWIDTH LATIN CAPITAL LETTER Z {0xFF3B, 0xFF3B, prClose}, // Ps FULLWIDTH LEFT SQUARE BRACKET {0xFF3D, 0xFF3D, prClose}, // Pe FULLWIDTH RIGHT SQUARE BRACKET {0xFF41, 0xFF5A, prLower}, // L& [26] FULLWIDTH LATIN SMALL LETTER A..FULLWIDTH LATIN SMALL LETTER Z {0xFF5B, 0xFF5B, prClose}, // Ps FULLWIDTH LEFT CURLY BRACKET {0xFF5D, 0xFF5D, prClose}, // Pe FULLWIDTH RIGHT CURLY BRACKET {0xFF5F, 0xFF5F, prClose}, // Ps FULLWIDTH LEFT WHITE PARENTHESIS {0xFF60, 0xFF60, prClose}, // Pe FULLWIDTH RIGHT WHITE PARENTHESIS {0xFF61, 0xFF61, prSTerm}, // Po HALFWIDTH IDEOGRAPHIC FULL STOP {0xFF62, 0xFF62, prClose}, // Ps HALFWIDTH LEFT CORNER BRACKET {0xFF63, 0xFF63, prClose}, // Pe HALFWIDTH RIGHT CORNER BRACKET {0xFF64, 0xFF64, prSContinue}, // Po HALFWIDTH IDEOGRAPHIC COMMA {0xFF66, 0xFF6F, prOLetter}, // Lo [10] HALFWIDTH KATAKANA LETTER WO..HALFWIDTH KATAKANA LETTER SMALL TU {0xFF70, 0xFF70, prOLetter}, // Lm HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK {0xFF71, 0xFF9D, prOLetter}, // Lo [45] HALFWIDTH KATAKANA LETTER A..HALFWIDTH KATAKANA LETTER N {0xFF9E, 0xFF9F, prExtend}, // Lm [2] HALFWIDTH KATAKANA VOICED SOUND MARK..HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK {0xFFA0, 0xFFBE, prOLetter}, // Lo [31] HALFWIDTH HANGUL FILLER..HALFWIDTH HANGUL LETTER HIEUH {0xFFC2, 0xFFC7, prOLetter}, // Lo [6] HALFWIDTH HANGUL LETTER A..HALFWIDTH HANGUL LETTER E {0xFFCA, 0xFFCF, prOLetter}, // Lo [6] HALFWIDTH HANGUL LETTER YEO..HALFWIDTH HANGUL LETTER OE {0xFFD2, 0xFFD7, prOLetter}, // Lo [6] HALFWIDTH HANGUL LETTER YO..HALFWIDTH HANGUL LETTER YU {0xFFDA, 0xFFDC, prOLetter}, // Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL LETTER I {0xFFF9, 0xFFFB, prFormat}, // Cf [3] INTERLINEAR ANNOTATION ANCHOR..INTERLINEAR ANNOTATION TERMINATOR {0x10000, 0x1000B, prOLetter}, // Lo [12] LINEAR B SYLLABLE B008 A..LINEAR B SYLLABLE B046 JE {0x1000D, 0x10026, prOLetter}, // Lo [26] LINEAR B SYLLABLE B036 JO..LINEAR B SYLLABLE B032 QO {0x10028, 0x1003A, prOLetter}, // Lo [19] LINEAR B SYLLABLE B060 RA..LINEAR B SYLLABLE B042 WO {0x1003C, 0x1003D, prOLetter}, // Lo [2] LINEAR B SYLLABLE B017 ZA..LINEAR B SYLLABLE B074 ZE {0x1003F, 0x1004D, prOLetter}, // Lo [15] LINEAR B SYLLABLE B020 ZO..LINEAR B SYLLABLE B091 TWO {0x10050, 0x1005D, prOLetter}, // Lo [14] LINEAR B SYMBOL B018..LINEAR B SYMBOL B089 {0x10080, 0x100FA, prOLetter}, // Lo [123] LINEAR B IDEOGRAM B100 MAN..LINEAR B IDEOGRAM VESSEL B305 {0x10140, 0x10174, prOLetter}, // Nl [53] GREEK ACROPHONIC ATTIC ONE QUARTER..GREEK ACROPHONIC STRATIAN FIFTY MNAS {0x101FD, 0x101FD, prExtend}, // Mn PHAISTOS DISC SIGN COMBINING OBLIQUE STROKE {0x10280, 0x1029C, prOLetter}, // Lo [29] LYCIAN LETTER A..LYCIAN LETTER X {0x102A0, 0x102D0, prOLetter}, // Lo [49] CARIAN LETTER A..CARIAN LETTER UUU3 {0x102E0, 0x102E0, prExtend}, // Mn COPTIC EPACT THOUSANDS MARK {0x10300, 0x1031F, prOLetter}, // Lo [32] OLD ITALIC LETTER A..OLD ITALIC LETTER ESS {0x1032D, 0x10340, prOLetter}, // Lo [20] OLD ITALIC LETTER YE..GOTHIC LETTER PAIRTHRA {0x10341, 0x10341, prOLetter}, // Nl GOTHIC LETTER NINETY {0x10342, 0x10349, prOLetter}, // Lo [8] GOTHIC LETTER RAIDA..GOTHIC LETTER OTHAL {0x1034A, 0x1034A, prOLetter}, // Nl GOTHIC LETTER NINE HUNDRED {0x10350, 0x10375, prOLetter}, // Lo [38] OLD PERMIC LETTER AN..OLD PERMIC LETTER IA {0x10376, 0x1037A, prExtend}, // Mn [5] COMBINING OLD PERMIC LETTER AN..COMBINING OLD PERMIC LETTER SII {0x10380, 0x1039D, prOLetter}, // Lo [30] UGARITIC LETTER ALPA..UGARITIC LETTER SSU {0x103A0, 0x103C3, prOLetter}, // Lo [36] OLD PERSIAN SIGN A..OLD PERSIAN SIGN HA {0x103C8, 0x103CF, prOLetter}, // Lo [8] OLD PERSIAN SIGN AURAMAZDAA..OLD PERSIAN SIGN BUUMISH {0x103D1, 0x103D5, prOLetter}, // Nl [5] OLD PERSIAN NUMBER ONE..OLD PERSIAN NUMBER HUNDRED {0x10400, 0x10427, prUpper}, // L& [40] DESERET CAPITAL LETTER LONG I..DESERET CAPITAL LETTER EW {0x10428, 0x1044F, prLower}, // L& [40] DESERET SMALL LETTER LONG I..DESERET SMALL LETTER EW {0x10450, 0x1049D, prOLetter}, // Lo [78] SHAVIAN LETTER PEEP..OSMANYA LETTER OO {0x104A0, 0x104A9, prNumeric}, // Nd [10] OSMANYA DIGIT ZERO..OSMANYA DIGIT NINE {0x104B0, 0x104D3, prUpper}, // L& [36] OSAGE CAPITAL LETTER A..OSAGE CAPITAL LETTER ZHA {0x104D8, 0x104FB, prLower}, // L& [36] OSAGE SMALL LETTER A..OSAGE SMALL LETTER ZHA {0x10500, 0x10527, prOLetter}, // Lo [40] ELBASAN LETTER A..ELBASAN LETTER KHE {0x10530, 0x10563, prOLetter}, // Lo [52] CAUCASIAN ALBANIAN LETTER ALT..CAUCASIAN ALBANIAN LETTER KIW {0x10570, 0x1057A, prUpper}, // L& [11] VITHKUQI CAPITAL LETTER A..VITHKUQI CAPITAL LETTER GA {0x1057C, 0x1058A, prUpper}, // L& [15] VITHKUQI CAPITAL LETTER HA..VITHKUQI CAPITAL LETTER RE {0x1058C, 0x10592, prUpper}, // L& [7] VITHKUQI CAPITAL LETTER SE..VITHKUQI CAPITAL LETTER XE {0x10594, 0x10595, prUpper}, // L& [2] VITHKUQI CAPITAL LETTER Y..VITHKUQI CAPITAL LETTER ZE {0x10597, 0x105A1, prLower}, // L& [11] VITHKUQI SMALL LETTER A..VITHKUQI SMALL LETTER GA {0x105A3, 0x105B1, prLower}, // L& [15] VITHKUQI SMALL LETTER HA..VITHKUQI SMALL LETTER RE {0x105B3, 0x105B9, prLower}, // L& [7] VITHKUQI SMALL LETTER SE..VITHKUQI SMALL LETTER XE {0x105BB, 0x105BC, prLower}, // L& [2] VITHKUQI SMALL LETTER Y..VITHKUQI SMALL LETTER ZE {0x10600, 0x10736, prOLetter}, // Lo [311] LINEAR A SIGN AB001..LINEAR A SIGN A664 {0x10740, 0x10755, prOLetter}, // Lo [22] LINEAR A SIGN A701 A..LINEAR A SIGN A732 JE {0x10760, 0x10767, prOLetter}, // Lo [8] LINEAR A SIGN A800..LINEAR A SIGN A807 {0x10780, 0x10780, prLower}, // Lm MODIFIER LETTER SMALL CAPITAL AA {0x10781, 0x10782, prOLetter}, // Lm [2] MODIFIER LETTER SUPERSCRIPT TRIANGULAR COLON..MODIFIER LETTER SUPERSCRIPT HALF TRIANGULAR COLON {0x10783, 0x10785, prLower}, // Lm [3] MODIFIER LETTER SMALL AE..MODIFIER LETTER SMALL B WITH HOOK {0x10787, 0x107B0, prLower}, // Lm [42] MODIFIER LETTER SMALL DZ DIGRAPH..MODIFIER LETTER SMALL V WITH RIGHT HOOK {0x107B2, 0x107BA, prLower}, // Lm [9] MODIFIER LETTER SMALL CAPITAL Y..MODIFIER LETTER SMALL S WITH CURL {0x10800, 0x10805, prOLetter}, // Lo [6] CYPRIOT SYLLABLE A..CYPRIOT SYLLABLE JA {0x10808, 0x10808, prOLetter}, // Lo CYPRIOT SYLLABLE JO {0x1080A, 0x10835, prOLetter}, // Lo [44] CYPRIOT SYLLABLE KA..CYPRIOT SYLLABLE WO {0x10837, 0x10838, prOLetter}, // Lo [2] CYPRIOT SYLLABLE XA..CYPRIOT SYLLABLE XE {0x1083C, 0x1083C, prOLetter}, // Lo CYPRIOT SYLLABLE ZA {0x1083F, 0x10855, prOLetter}, // Lo [23] CYPRIOT SYLLABLE ZO..IMPERIAL ARAMAIC LETTER TAW {0x10860, 0x10876, prOLetter}, // Lo [23] PALMYRENE LETTER ALEPH..PALMYRENE LETTER TAW {0x10880, 0x1089E, prOLetter}, // Lo [31] NABATAEAN LETTER FINAL ALEPH..NABATAEAN LETTER TAW {0x108E0, 0x108F2, prOLetter}, // Lo [19] HATRAN LETTER ALEPH..HATRAN LETTER QOPH {0x108F4, 0x108F5, prOLetter}, // Lo [2] HATRAN LETTER SHIN..HATRAN LETTER TAW {0x10900, 0x10915, prOLetter}, // Lo [22] PHOENICIAN LETTER ALF..PHOENICIAN LETTER TAU {0x10920, 0x10939, prOLetter}, // Lo [26] LYDIAN LETTER A..LYDIAN LETTER C {0x10980, 0x109B7, prOLetter}, // Lo [56] MEROITIC HIEROGLYPHIC LETTER A..MEROITIC CURSIVE LETTER DA {0x109BE, 0x109BF, prOLetter}, // Lo [2] MEROITIC CURSIVE LOGOGRAM RMT..MEROITIC CURSIVE LOGOGRAM IMN {0x10A00, 0x10A00, prOLetter}, // Lo KHAROSHTHI LETTER A {0x10A01, 0x10A03, prExtend}, // Mn [3] KHAROSHTHI VOWEL SIGN I..KHAROSHTHI VOWEL SIGN VOCALIC R {0x10A05, 0x10A06, prExtend}, // Mn [2] KHAROSHTHI VOWEL SIGN E..KHAROSHTHI VOWEL SIGN O {0x10A0C, 0x10A0F, prExtend}, // Mn [4] KHAROSHTHI VOWEL LENGTH MARK..KHAROSHTHI SIGN VISARGA {0x10A10, 0x10A13, prOLetter}, // Lo [4] KHAROSHTHI LETTER KA..KHAROSHTHI LETTER GHA {0x10A15, 0x10A17, prOLetter}, // Lo [3] KHAROSHTHI LETTER CA..KHAROSHTHI LETTER JA {0x10A19, 0x10A35, prOLetter}, // Lo [29] KHAROSHTHI LETTER NYA..KHAROSHTHI LETTER VHA {0x10A38, 0x10A3A, prExtend}, // Mn [3] KHAROSHTHI SIGN BAR ABOVE..KHAROSHTHI SIGN DOT BELOW {0x10A3F, 0x10A3F, prExtend}, // Mn KHAROSHTHI VIRAMA {0x10A56, 0x10A57, prSTerm}, // Po [2] KHAROSHTHI PUNCTUATION DANDA..KHAROSHTHI PUNCTUATION DOUBLE DANDA {0x10A60, 0x10A7C, prOLetter}, // Lo [29] OLD SOUTH ARABIAN LETTER HE..OLD SOUTH ARABIAN LETTER THETH {0x10A80, 0x10A9C, prOLetter}, // Lo [29] OLD NORTH ARABIAN LETTER HEH..OLD NORTH ARABIAN LETTER ZAH {0x10AC0, 0x10AC7, prOLetter}, // Lo [8] MANICHAEAN LETTER ALEPH..MANICHAEAN LETTER WAW {0x10AC9, 0x10AE4, prOLetter}, // Lo [28] MANICHAEAN LETTER ZAYIN..MANICHAEAN LETTER TAW {0x10AE5, 0x10AE6, prExtend}, // Mn [2] MANICHAEAN ABBREVIATION MARK ABOVE..MANICHAEAN ABBREVIATION MARK BELOW {0x10B00, 0x10B35, prOLetter}, // Lo [54] AVESTAN LETTER A..AVESTAN LETTER HE {0x10B40, 0x10B55, prOLetter}, // Lo [22] INSCRIPTIONAL PARTHIAN LETTER ALEPH..INSCRIPTIONAL PARTHIAN LETTER TAW {0x10B60, 0x10B72, prOLetter}, // Lo [19] INSCRIPTIONAL PAHLAVI LETTER ALEPH..INSCRIPTIONAL PAHLAVI LETTER TAW {0x10B80, 0x10B91, prOLetter}, // Lo [18] PSALTER PAHLAVI LETTER ALEPH..PSALTER PAHLAVI LETTER TAW {0x10C00, 0x10C48, prOLetter}, // Lo [73] OLD TURKIC LETTER ORKHON A..OLD TURKIC LETTER ORKHON BASH {0x10C80, 0x10CB2, prUpper}, // L& [51] OLD HUNGARIAN CAPITAL LETTER A..OLD HUNGARIAN CAPITAL LETTER US {0x10CC0, 0x10CF2, prLower}, // L& [51] OLD HUNGARIAN SMALL LETTER A..OLD HUNGARIAN SMALL LETTER US {0x10D00, 0x10D23, prOLetter}, // Lo [36] HANIFI ROHINGYA LETTER A..HANIFI ROHINGYA MARK NA KHONNA {0x10D24, 0x10D27, prExtend}, // Mn [4] HANIFI ROHINGYA SIGN HARBAHAY..HANIFI ROHINGYA SIGN TASSI {0x10D30, 0x10D39, prNumeric}, // Nd [10] HANIFI ROHINGYA DIGIT ZERO..HANIFI ROHINGYA DIGIT NINE {0x10E80, 0x10EA9, prOLetter}, // Lo [42] YEZIDI LETTER ELIF..YEZIDI LETTER ET {0x10EAB, 0x10EAC, prExtend}, // Mn [2] YEZIDI COMBINING HAMZA MARK..YEZIDI COMBINING MADDA MARK {0x10EB0, 0x10EB1, prOLetter}, // Lo [2] YEZIDI LETTER LAM WITH DOT ABOVE..YEZIDI LETTER YOT WITH CIRCUMFLEX ABOVE {0x10EFD, 0x10EFF, prExtend}, // Mn [3] ARABIC SMALL LOW WORD SAKTA..ARABIC SMALL LOW WORD MADDA {0x10F00, 0x10F1C, prOLetter}, // Lo [29] OLD SOGDIAN LETTER ALEPH..OLD SOGDIAN LETTER FINAL TAW WITH VERTICAL TAIL {0x10F27, 0x10F27, prOLetter}, // Lo OLD SOGDIAN LIGATURE AYIN-DALETH {0x10F30, 0x10F45, prOLetter}, // Lo [22] SOGDIAN LETTER ALEPH..SOGDIAN INDEPENDENT SHIN {0x10F46, 0x10F50, prExtend}, // Mn [11] SOGDIAN COMBINING DOT BELOW..SOGDIAN COMBINING STROKE BELOW {0x10F55, 0x10F59, prSTerm}, // Po [5] SOGDIAN PUNCTUATION TWO VERTICAL BARS..SOGDIAN PUNCTUATION HALF CIRCLE WITH DOT {0x10F70, 0x10F81, prOLetter}, // Lo [18] OLD UYGHUR LETTER ALEPH..OLD UYGHUR LETTER LESH {0x10F82, 0x10F85, prExtend}, // Mn [4] OLD UYGHUR COMBINING DOT ABOVE..OLD UYGHUR COMBINING TWO DOTS BELOW {0x10F86, 0x10F89, prSTerm}, // Po [4] OLD UYGHUR PUNCTUATION BAR..OLD UYGHUR PUNCTUATION FOUR DOTS {0x10FB0, 0x10FC4, prOLetter}, // Lo [21] CHORASMIAN LETTER ALEPH..CHORASMIAN LETTER TAW {0x10FE0, 0x10FF6, prOLetter}, // Lo [23] ELYMAIC LETTER ALEPH..ELYMAIC LIGATURE ZAYIN-YODH {0x11000, 0x11000, prExtend}, // Mc BRAHMI SIGN CANDRABINDU {0x11001, 0x11001, prExtend}, // Mn BRAHMI SIGN ANUSVARA {0x11002, 0x11002, prExtend}, // Mc BRAHMI SIGN VISARGA {0x11003, 0x11037, prOLetter}, // Lo [53] BRAHMI SIGN JIHVAMULIYA..BRAHMI LETTER OLD TAMIL NNNA {0x11038, 0x11046, prExtend}, // Mn [15] BRAHMI VOWEL SIGN AA..BRAHMI VIRAMA {0x11047, 0x11048, prSTerm}, // Po [2] BRAHMI DANDA..BRAHMI DOUBLE DANDA {0x11066, 0x1106F, prNumeric}, // Nd [10] BRAHMI DIGIT ZERO..BRAHMI DIGIT NINE {0x11070, 0x11070, prExtend}, // Mn BRAHMI SIGN OLD TAMIL VIRAMA {0x11071, 0x11072, prOLetter}, // Lo [2] BRAHMI LETTER OLD TAMIL SHORT E..BRAHMI LETTER OLD TAMIL SHORT O {0x11073, 0x11074, prExtend}, // Mn [2] BRAHMI VOWEL SIGN OLD TAMIL SHORT E..BRAHMI VOWEL SIGN OLD TAMIL SHORT O {0x11075, 0x11075, prOLetter}, // Lo BRAHMI LETTER OLD TAMIL LLA {0x1107F, 0x11081, prExtend}, // Mn [3] BRAHMI NUMBER JOINER..KAITHI SIGN ANUSVARA {0x11082, 0x11082, prExtend}, // Mc KAITHI SIGN VISARGA {0x11083, 0x110AF, prOLetter}, // Lo [45] KAITHI LETTER A..KAITHI LETTER HA {0x110B0, 0x110B2, prExtend}, // Mc [3] KAITHI VOWEL SIGN AA..KAITHI VOWEL SIGN II {0x110B3, 0x110B6, prExtend}, // Mn [4] KAITHI VOWEL SIGN U..KAITHI VOWEL SIGN AI {0x110B7, 0x110B8, prExtend}, // Mc [2] KAITHI VOWEL SIGN O..KAITHI VOWEL SIGN AU {0x110B9, 0x110BA, prExtend}, // Mn [2] KAITHI SIGN VIRAMA..KAITHI SIGN NUKTA {0x110BD, 0x110BD, prFormat}, // Cf KAITHI NUMBER SIGN {0x110BE, 0x110C1, prSTerm}, // Po [4] KAITHI SECTION MARK..KAITHI DOUBLE DANDA {0x110C2, 0x110C2, prExtend}, // Mn KAITHI VOWEL SIGN VOCALIC R {0x110CD, 0x110CD, prFormat}, // Cf KAITHI NUMBER SIGN ABOVE {0x110D0, 0x110E8, prOLetter}, // Lo [25] SORA SOMPENG LETTER SAH..SORA SOMPENG LETTER MAE {0x110F0, 0x110F9, prNumeric}, // Nd [10] SORA SOMPENG DIGIT ZERO..SORA SOMPENG DIGIT NINE {0x11100, 0x11102, prExtend}, // Mn [3] CHAKMA SIGN CANDRABINDU..CHAKMA SIGN VISARGA {0x11103, 0x11126, prOLetter}, // Lo [36] CHAKMA LETTER AA..CHAKMA LETTER HAA {0x11127, 0x1112B, prExtend}, // Mn [5] CHAKMA VOWEL SIGN A..CHAKMA VOWEL SIGN UU {0x1112C, 0x1112C, prExtend}, // Mc CHAKMA VOWEL SIGN E {0x1112D, 0x11134, prExtend}, // Mn [8] CHAKMA VOWEL SIGN AI..CHAKMA MAAYYAA {0x11136, 0x1113F, prNumeric}, // Nd [10] CHAKMA DIGIT ZERO..CHAKMA DIGIT NINE {0x11141, 0x11143, prSTerm}, // Po [3] CHAKMA DANDA..CHAKMA QUESTION MARK {0x11144, 0x11144, prOLetter}, // Lo CHAKMA LETTER LHAA {0x11145, 0x11146, prExtend}, // Mc [2] CHAKMA VOWEL SIGN AA..CHAKMA VOWEL SIGN EI {0x11147, 0x11147, prOLetter}, // Lo CHAKMA LETTER VAA {0x11150, 0x11172, prOLetter}, // Lo [35] MAHAJANI LETTER A..MAHAJANI LETTER RRA {0x11173, 0x11173, prExtend}, // Mn MAHAJANI SIGN NUKTA {0x11176, 0x11176, prOLetter}, // Lo MAHAJANI LIGATURE SHRI {0x11180, 0x11181, prExtend}, // Mn [2] SHARADA SIGN CANDRABINDU..SHARADA SIGN ANUSVARA {0x11182, 0x11182, prExtend}, // Mc SHARADA SIGN VISARGA {0x11183, 0x111B2, prOLetter}, // Lo [48] SHARADA LETTER A..SHARADA LETTER HA {0x111B3, 0x111B5, prExtend}, // Mc [3] SHARADA VOWEL SIGN AA..SHARADA VOWEL SIGN II {0x111B6, 0x111BE, prExtend}, // Mn [9] SHARADA VOWEL SIGN U..SHARADA VOWEL SIGN O {0x111BF, 0x111C0, prExtend}, // Mc [2] SHARADA VOWEL SIGN AU..SHARADA SIGN VIRAMA {0x111C1, 0x111C4, prOLetter}, // Lo [4] SHARADA SIGN AVAGRAHA..SHARADA OM {0x111C5, 0x111C6, prSTerm}, // Po [2] SHARADA DANDA..SHARADA DOUBLE DANDA {0x111C9, 0x111CC, prExtend}, // Mn [4] SHARADA SANDHI MARK..SHARADA EXTRA SHORT VOWEL MARK {0x111CD, 0x111CD, prSTerm}, // Po SHARADA SUTRA MARK {0x111CE, 0x111CE, prExtend}, // Mc SHARADA VOWEL SIGN PRISHTHAMATRA E {0x111CF, 0x111CF, prExtend}, // Mn SHARADA SIGN INVERTED CANDRABINDU {0x111D0, 0x111D9, prNumeric}, // Nd [10] SHARADA DIGIT ZERO..SHARADA DIGIT NINE {0x111DA, 0x111DA, prOLetter}, // Lo SHARADA EKAM {0x111DC, 0x111DC, prOLetter}, // Lo SHARADA HEADSTROKE {0x111DE, 0x111DF, prSTerm}, // Po [2] SHARADA SECTION MARK-1..SHARADA SECTION MARK-2 {0x11200, 0x11211, prOLetter}, // Lo [18] KHOJKI LETTER A..KHOJKI LETTER JJA {0x11213, 0x1122B, prOLetter}, // Lo [25] KHOJKI LETTER NYA..KHOJKI LETTER LLA {0x1122C, 0x1122E, prExtend}, // Mc [3] KHOJKI VOWEL SIGN AA..KHOJKI VOWEL SIGN II {0x1122F, 0x11231, prExtend}, // Mn [3] KHOJKI VOWEL SIGN U..KHOJKI VOWEL SIGN AI {0x11232, 0x11233, prExtend}, // Mc [2] KHOJKI VOWEL SIGN O..KHOJKI VOWEL SIGN AU {0x11234, 0x11234, prExtend}, // Mn KHOJKI SIGN ANUSVARA {0x11235, 0x11235, prExtend}, // Mc KHOJKI SIGN VIRAMA {0x11236, 0x11237, prExtend}, // Mn [2] KHOJKI SIGN NUKTA..KHOJKI SIGN SHADDA {0x11238, 0x11239, prSTerm}, // Po [2] KHOJKI DANDA..KHOJKI DOUBLE DANDA {0x1123B, 0x1123C, prSTerm}, // Po [2] KHOJKI SECTION MARK..KHOJKI DOUBLE SECTION MARK {0x1123E, 0x1123E, prExtend}, // Mn KHOJKI SIGN SUKUN {0x1123F, 0x11240, prOLetter}, // Lo [2] KHOJKI LETTER QA..KHOJKI LETTER SHORT I {0x11241, 0x11241, prExtend}, // Mn KHOJKI VOWEL SIGN VOCALIC R {0x11280, 0x11286, prOLetter}, // Lo [7] MULTANI LETTER A..MULTANI LETTER GA {0x11288, 0x11288, prOLetter}, // Lo MULTANI LETTER GHA {0x1128A, 0x1128D, prOLetter}, // Lo [4] MULTANI LETTER CA..MULTANI LETTER JJA {0x1128F, 0x1129D, prOLetter}, // Lo [15] MULTANI LETTER NYA..MULTANI LETTER BA {0x1129F, 0x112A8, prOLetter}, // Lo [10] MULTANI LETTER BHA..MULTANI LETTER RHA {0x112A9, 0x112A9, prSTerm}, // Po MULTANI SECTION MARK {0x112B0, 0x112DE, prOLetter}, // Lo [47] KHUDAWADI LETTER A..KHUDAWADI LETTER HA {0x112DF, 0x112DF, prExtend}, // Mn KHUDAWADI SIGN ANUSVARA {0x112E0, 0x112E2, prExtend}, // Mc [3] KHUDAWADI VOWEL SIGN AA..KHUDAWADI VOWEL SIGN II {0x112E3, 0x112EA, prExtend}, // Mn [8] KHUDAWADI VOWEL SIGN U..KHUDAWADI SIGN VIRAMA {0x112F0, 0x112F9, prNumeric}, // Nd [10] KHUDAWADI DIGIT ZERO..KHUDAWADI DIGIT NINE {0x11300, 0x11301, prExtend}, // Mn [2] GRANTHA SIGN COMBINING ANUSVARA ABOVE..GRANTHA SIGN CANDRABINDU {0x11302, 0x11303, prExtend}, // Mc [2] GRANTHA SIGN ANUSVARA..GRANTHA SIGN VISARGA {0x11305, 0x1130C, prOLetter}, // Lo [8] GRANTHA LETTER A..GRANTHA LETTER VOCALIC L {0x1130F, 0x11310, prOLetter}, // Lo [2] GRANTHA LETTER EE..GRANTHA LETTER AI {0x11313, 0x11328, prOLetter}, // Lo [22] GRANTHA LETTER OO..GRANTHA LETTER NA {0x1132A, 0x11330, prOLetter}, // Lo [7] GRANTHA LETTER PA..GRANTHA LETTER RA {0x11332, 0x11333, prOLetter}, // Lo [2] GRANTHA LETTER LA..GRANTHA LETTER LLA {0x11335, 0x11339, prOLetter}, // Lo [5] GRANTHA LETTER VA..GRANTHA LETTER HA {0x1133B, 0x1133C, prExtend}, // Mn [2] COMBINING BINDU BELOW..GRANTHA SIGN NUKTA {0x1133D, 0x1133D, prOLetter}, // Lo GRANTHA SIGN AVAGRAHA {0x1133E, 0x1133F, prExtend}, // Mc [2] GRANTHA VOWEL SIGN AA..GRANTHA VOWEL SIGN I {0x11340, 0x11340, prExtend}, // Mn GRANTHA VOWEL SIGN II {0x11341, 0x11344, prExtend}, // Mc [4] GRANTHA VOWEL SIGN U..GRANTHA VOWEL SIGN VOCALIC RR {0x11347, 0x11348, prExtend}, // Mc [2] GRANTHA VOWEL SIGN EE..GRANTHA VOWEL SIGN AI {0x1134B, 0x1134D, prExtend}, // Mc [3] GRANTHA VOWEL SIGN OO..GRANTHA SIGN VIRAMA {0x11350, 0x11350, prOLetter}, // Lo GRANTHA OM {0x11357, 0x11357, prExtend}, // Mc GRANTHA AU LENGTH MARK {0x1135D, 0x11361, prOLetter}, // Lo [5] GRANTHA SIGN PLUTA..GRANTHA LETTER VOCALIC LL {0x11362, 0x11363, prExtend}, // Mc [2] GRANTHA VOWEL SIGN VOCALIC L..GRANTHA VOWEL SIGN VOCALIC LL {0x11366, 0x1136C, prExtend}, // Mn [7] COMBINING GRANTHA DIGIT ZERO..COMBINING GRANTHA DIGIT SIX {0x11370, 0x11374, prExtend}, // Mn [5] COMBINING GRANTHA LETTER A..COMBINING GRANTHA LETTER PA {0x11400, 0x11434, prOLetter}, // Lo [53] NEWA LETTER A..NEWA LETTER HA {0x11435, 0x11437, prExtend}, // Mc [3] NEWA VOWEL SIGN AA..NEWA VOWEL SIGN II {0x11438, 0x1143F, prExtend}, // Mn [8] NEWA VOWEL SIGN U..NEWA VOWEL SIGN AI {0x11440, 0x11441, prExtend}, // Mc [2] NEWA VOWEL SIGN O..NEWA VOWEL SIGN AU {0x11442, 0x11444, prExtend}, // Mn [3] NEWA SIGN VIRAMA..NEWA SIGN ANUSVARA {0x11445, 0x11445, prExtend}, // Mc NEWA SIGN VISARGA {0x11446, 0x11446, prExtend}, // Mn NEWA SIGN NUKTA {0x11447, 0x1144A, prOLetter}, // Lo [4] NEWA SIGN AVAGRAHA..NEWA SIDDHI {0x1144B, 0x1144C, prSTerm}, // Po [2] NEWA DANDA..NEWA DOUBLE DANDA {0x11450, 0x11459, prNumeric}, // Nd [10] NEWA DIGIT ZERO..NEWA DIGIT NINE {0x1145E, 0x1145E, prExtend}, // Mn NEWA SANDHI MARK {0x1145F, 0x11461, prOLetter}, // Lo [3] NEWA LETTER VEDIC ANUSVARA..NEWA SIGN UPADHMANIYA {0x11480, 0x114AF, prOLetter}, // Lo [48] TIRHUTA ANJI..TIRHUTA LETTER HA {0x114B0, 0x114B2, prExtend}, // Mc [3] TIRHUTA VOWEL SIGN AA..TIRHUTA VOWEL SIGN II {0x114B3, 0x114B8, prExtend}, // Mn [6] TIRHUTA VOWEL SIGN U..TIRHUTA VOWEL SIGN VOCALIC LL {0x114B9, 0x114B9, prExtend}, // Mc TIRHUTA VOWEL SIGN E {0x114BA, 0x114BA, prExtend}, // Mn TIRHUTA VOWEL SIGN SHORT E {0x114BB, 0x114BE, prExtend}, // Mc [4] TIRHUTA VOWEL SIGN AI..TIRHUTA VOWEL SIGN AU {0x114BF, 0x114C0, prExtend}, // Mn [2] TIRHUTA SIGN CANDRABINDU..TIRHUTA SIGN ANUSVARA {0x114C1, 0x114C1, prExtend}, // Mc TIRHUTA SIGN VISARGA {0x114C2, 0x114C3, prExtend}, // Mn [2] TIRHUTA SIGN VIRAMA..TIRHUTA SIGN NUKTA {0x114C4, 0x114C5, prOLetter}, // Lo [2] TIRHUTA SIGN AVAGRAHA..TIRHUTA GVANG {0x114C7, 0x114C7, prOLetter}, // Lo TIRHUTA OM {0x114D0, 0x114D9, prNumeric}, // Nd [10] TIRHUTA DIGIT ZERO..TIRHUTA DIGIT NINE {0x11580, 0x115AE, prOLetter}, // Lo [47] SIDDHAM LETTER A..SIDDHAM LETTER HA {0x115AF, 0x115B1, prExtend}, // Mc [3] SIDDHAM VOWEL SIGN AA..SIDDHAM VOWEL SIGN II {0x115B2, 0x115B5, prExtend}, // Mn [4] SIDDHAM VOWEL SIGN U..SIDDHAM VOWEL SIGN VOCALIC RR {0x115B8, 0x115BB, prExtend}, // Mc [4] SIDDHAM VOWEL SIGN E..SIDDHAM VOWEL SIGN AU {0x115BC, 0x115BD, prExtend}, // Mn [2] SIDDHAM SIGN CANDRABINDU..SIDDHAM SIGN ANUSVARA {0x115BE, 0x115BE, prExtend}, // Mc SIDDHAM SIGN VISARGA {0x115BF, 0x115C0, prExtend}, // Mn [2] SIDDHAM SIGN VIRAMA..SIDDHAM SIGN NUKTA {0x115C2, 0x115C3, prSTerm}, // Po [2] SIDDHAM DANDA..SIDDHAM DOUBLE DANDA {0x115C9, 0x115D7, prSTerm}, // Po [15] SIDDHAM END OF TEXT MARK..SIDDHAM SECTION MARK WITH CIRCLES AND FOUR ENCLOSURES {0x115D8, 0x115DB, prOLetter}, // Lo [4] SIDDHAM LETTER THREE-CIRCLE ALTERNATE I..SIDDHAM LETTER ALTERNATE U {0x115DC, 0x115DD, prExtend}, // Mn [2] SIDDHAM VOWEL SIGN ALTERNATE U..SIDDHAM VOWEL SIGN ALTERNATE UU {0x11600, 0x1162F, prOLetter}, // Lo [48] MODI LETTER A..MODI LETTER LLA {0x11630, 0x11632, prExtend}, // Mc [3] MODI VOWEL SIGN AA..MODI VOWEL SIGN II {0x11633, 0x1163A, prExtend}, // Mn [8] MODI VOWEL SIGN U..MODI VOWEL SIGN AI {0x1163B, 0x1163C, prExtend}, // Mc [2] MODI VOWEL SIGN O..MODI VOWEL SIGN AU {0x1163D, 0x1163D, prExtend}, // Mn MODI SIGN ANUSVARA {0x1163E, 0x1163E, prExtend}, // Mc MODI SIGN VISARGA {0x1163F, 0x11640, prExtend}, // Mn [2] MODI SIGN VIRAMA..MODI SIGN ARDHACANDRA {0x11641, 0x11642, prSTerm}, // Po [2] MODI DANDA..MODI DOUBLE DANDA {0x11644, 0x11644, prOLetter}, // Lo MODI SIGN HUVA {0x11650, 0x11659, prNumeric}, // Nd [10] MODI DIGIT ZERO..MODI DIGIT NINE {0x11680, 0x116AA, prOLetter}, // Lo [43] TAKRI LETTER A..TAKRI LETTER RRA {0x116AB, 0x116AB, prExtend}, // Mn TAKRI SIGN ANUSVARA {0x116AC, 0x116AC, prExtend}, // Mc TAKRI SIGN VISARGA {0x116AD, 0x116AD, prExtend}, // Mn TAKRI VOWEL SIGN AA {0x116AE, 0x116AF, prExtend}, // Mc [2] TAKRI VOWEL SIGN I..TAKRI VOWEL SIGN II {0x116B0, 0x116B5, prExtend}, // Mn [6] TAKRI VOWEL SIGN U..TAKRI VOWEL SIGN AU {0x116B6, 0x116B6, prExtend}, // Mc TAKRI SIGN VIRAMA {0x116B7, 0x116B7, prExtend}, // Mn TAKRI SIGN NUKTA {0x116B8, 0x116B8, prOLetter}, // Lo TAKRI LETTER ARCHAIC KHA {0x116C0, 0x116C9, prNumeric}, // Nd [10] TAKRI DIGIT ZERO..TAKRI DIGIT NINE {0x11700, 0x1171A, prOLetter}, // Lo [27] AHOM LETTER KA..AHOM LETTER ALTERNATE BA {0x1171D, 0x1171F, prExtend}, // Mn [3] AHOM CONSONANT SIGN MEDIAL LA..AHOM CONSONANT SIGN MEDIAL LIGATING RA {0x11720, 0x11721, prExtend}, // Mc [2] AHOM VOWEL SIGN A..AHOM VOWEL SIGN AA {0x11722, 0x11725, prExtend}, // Mn [4] AHOM VOWEL SIGN I..AHOM VOWEL SIGN UU {0x11726, 0x11726, prExtend}, // Mc AHOM VOWEL SIGN E {0x11727, 0x1172B, prExtend}, // Mn [5] AHOM VOWEL SIGN AW..AHOM SIGN KILLER {0x11730, 0x11739, prNumeric}, // Nd [10] AHOM DIGIT ZERO..AHOM DIGIT NINE {0x1173C, 0x1173E, prSTerm}, // Po [3] AHOM SIGN SMALL SECTION..AHOM SIGN RULAI {0x11740, 0x11746, prOLetter}, // Lo [7] AHOM LETTER CA..AHOM LETTER LLA {0x11800, 0x1182B, prOLetter}, // Lo [44] DOGRA LETTER A..DOGRA LETTER RRA {0x1182C, 0x1182E, prExtend}, // Mc [3] DOGRA VOWEL SIGN AA..DOGRA VOWEL SIGN II {0x1182F, 0x11837, prExtend}, // Mn [9] DOGRA VOWEL SIGN U..DOGRA SIGN ANUSVARA {0x11838, 0x11838, prExtend}, // Mc DOGRA SIGN VISARGA {0x11839, 0x1183A, prExtend}, // Mn [2] DOGRA SIGN VIRAMA..DOGRA SIGN NUKTA {0x118A0, 0x118BF, prUpper}, // L& [32] WARANG CITI CAPITAL LETTER NGAA..WARANG CITI CAPITAL LETTER VIYO {0x118C0, 0x118DF, prLower}, // L& [32] WARANG CITI SMALL LETTER NGAA..WARANG CITI SMALL LETTER VIYO {0x118E0, 0x118E9, prNumeric}, // Nd [10] WARANG CITI DIGIT ZERO..WARANG CITI DIGIT NINE {0x118FF, 0x11906, prOLetter}, // Lo [8] WARANG CITI OM..DIVES AKURU LETTER E {0x11909, 0x11909, prOLetter}, // Lo DIVES AKURU LETTER O {0x1190C, 0x11913, prOLetter}, // Lo [8] DIVES AKURU LETTER KA..DIVES AKURU LETTER JA {0x11915, 0x11916, prOLetter}, // Lo [2] DIVES AKURU LETTER NYA..DIVES AKURU LETTER TTA {0x11918, 0x1192F, prOLetter}, // Lo [24] DIVES AKURU LETTER DDA..DIVES AKURU LETTER ZA {0x11930, 0x11935, prExtend}, // Mc [6] DIVES AKURU VOWEL SIGN AA..DIVES AKURU VOWEL SIGN E {0x11937, 0x11938, prExtend}, // Mc [2] DIVES AKURU VOWEL SIGN AI..DIVES AKURU VOWEL SIGN O {0x1193B, 0x1193C, prExtend}, // Mn [2] DIVES AKURU SIGN ANUSVARA..DIVES AKURU SIGN CANDRABINDU {0x1193D, 0x1193D, prExtend}, // Mc DIVES AKURU SIGN HALANTA {0x1193E, 0x1193E, prExtend}, // Mn DIVES AKURU VIRAMA {0x1193F, 0x1193F, prOLetter}, // Lo DIVES AKURU PREFIXED NASAL SIGN {0x11940, 0x11940, prExtend}, // Mc DIVES AKURU MEDIAL YA {0x11941, 0x11941, prOLetter}, // Lo DIVES AKURU INITIAL RA {0x11942, 0x11942, prExtend}, // Mc DIVES AKURU MEDIAL RA {0x11943, 0x11943, prExtend}, // Mn DIVES AKURU SIGN NUKTA {0x11944, 0x11944, prSTerm}, // Po DIVES AKURU DOUBLE DANDA {0x11946, 0x11946, prSTerm}, // Po DIVES AKURU END OF TEXT MARK {0x11950, 0x11959, prNumeric}, // Nd [10] DIVES AKURU DIGIT ZERO..DIVES AKURU DIGIT NINE {0x119A0, 0x119A7, prOLetter}, // Lo [8] NANDINAGARI LETTER A..NANDINAGARI LETTER VOCALIC RR {0x119AA, 0x119D0, prOLetter}, // Lo [39] NANDINAGARI LETTER E..NANDINAGARI LETTER RRA {0x119D1, 0x119D3, prExtend}, // Mc [3] NANDINAGARI VOWEL SIGN AA..NANDINAGARI VOWEL SIGN II {0x119D4, 0x119D7, prExtend}, // Mn [4] NANDINAGARI VOWEL SIGN U..NANDINAGARI VOWEL SIGN VOCALIC RR {0x119DA, 0x119DB, prExtend}, // Mn [2] NANDINAGARI VOWEL SIGN E..NANDINAGARI VOWEL SIGN AI {0x119DC, 0x119DF, prExtend}, // Mc [4] NANDINAGARI VOWEL SIGN O..NANDINAGARI SIGN VISARGA {0x119E0, 0x119E0, prExtend}, // Mn NANDINAGARI SIGN VIRAMA {0x119E1, 0x119E1, prOLetter}, // Lo NANDINAGARI SIGN AVAGRAHA {0x119E3, 0x119E3, prOLetter}, // Lo NANDINAGARI HEADSTROKE {0x119E4, 0x119E4, prExtend}, // Mc NANDINAGARI VOWEL SIGN PRISHTHAMATRA E {0x11A00, 0x11A00, prOLetter}, // Lo ZANABAZAR SQUARE LETTER A {0x11A01, 0x11A0A, prExtend}, // Mn [10] ZANABAZAR SQUARE VOWEL SIGN I..ZANABAZAR SQUARE VOWEL LENGTH MARK {0x11A0B, 0x11A32, prOLetter}, // Lo [40] ZANABAZAR SQUARE LETTER KA..ZANABAZAR SQUARE LETTER KSSA {0x11A33, 0x11A38, prExtend}, // Mn [6] ZANABAZAR SQUARE FINAL CONSONANT MARK..ZANABAZAR SQUARE SIGN ANUSVARA {0x11A39, 0x11A39, prExtend}, // Mc ZANABAZAR SQUARE SIGN VISARGA {0x11A3A, 0x11A3A, prOLetter}, // Lo ZANABAZAR SQUARE CLUSTER-INITIAL LETTER RA {0x11A3B, 0x11A3E, prExtend}, // Mn [4] ZANABAZAR SQUARE CLUSTER-FINAL LETTER YA..ZANABAZAR SQUARE CLUSTER-FINAL LETTER VA {0x11A42, 0x11A43, prSTerm}, // Po [2] ZANABAZAR SQUARE MARK SHAD..ZANABAZAR SQUARE MARK DOUBLE SHAD {0x11A47, 0x11A47, prExtend}, // Mn ZANABAZAR SQUARE SUBJOINER {0x11A50, 0x11A50, prOLetter}, // Lo SOYOMBO LETTER A {0x11A51, 0x11A56, prExtend}, // Mn [6] SOYOMBO VOWEL SIGN I..SOYOMBO VOWEL SIGN OE {0x11A57, 0x11A58, prExtend}, // Mc [2] SOYOMBO VOWEL SIGN AI..SOYOMBO VOWEL SIGN AU {0x11A59, 0x11A5B, prExtend}, // Mn [3] SOYOMBO VOWEL SIGN VOCALIC R..SOYOMBO VOWEL LENGTH MARK {0x11A5C, 0x11A89, prOLetter}, // Lo [46] SOYOMBO LETTER KA..SOYOMBO CLUSTER-INITIAL LETTER SA {0x11A8A, 0x11A96, prExtend}, // Mn [13] SOYOMBO FINAL CONSONANT SIGN G..SOYOMBO SIGN ANUSVARA {0x11A97, 0x11A97, prExtend}, // Mc SOYOMBO SIGN VISARGA {0x11A98, 0x11A99, prExtend}, // Mn [2] SOYOMBO GEMINATION MARK..SOYOMBO SUBJOINER {0x11A9B, 0x11A9C, prSTerm}, // Po [2] SOYOMBO MARK SHAD..SOYOMBO MARK DOUBLE SHAD {0x11A9D, 0x11A9D, prOLetter}, // Lo SOYOMBO MARK PLUTA {0x11AB0, 0x11AF8, prOLetter}, // Lo [73] CANADIAN SYLLABICS NATTILIK HI..PAU CIN HAU GLOTTAL STOP FINAL {0x11C00, 0x11C08, prOLetter}, // Lo [9] BHAIKSUKI LETTER A..BHAIKSUKI LETTER VOCALIC L {0x11C0A, 0x11C2E, prOLetter}, // Lo [37] BHAIKSUKI LETTER E..BHAIKSUKI LETTER HA {0x11C2F, 0x11C2F, prExtend}, // Mc BHAIKSUKI VOWEL SIGN AA {0x11C30, 0x11C36, prExtend}, // Mn [7] BHAIKSUKI VOWEL SIGN I..BHAIKSUKI VOWEL SIGN VOCALIC L {0x11C38, 0x11C3D, prExtend}, // Mn [6] BHAIKSUKI VOWEL SIGN E..BHAIKSUKI SIGN ANUSVARA {0x11C3E, 0x11C3E, prExtend}, // Mc BHAIKSUKI SIGN VISARGA {0x11C3F, 0x11C3F, prExtend}, // Mn BHAIKSUKI SIGN VIRAMA {0x11C40, 0x11C40, prOLetter}, // Lo BHAIKSUKI SIGN AVAGRAHA {0x11C41, 0x11C42, prSTerm}, // Po [2] BHAIKSUKI DANDA..BHAIKSUKI DOUBLE DANDA {0x11C50, 0x11C59, prNumeric}, // Nd [10] BHAIKSUKI DIGIT ZERO..BHAIKSUKI DIGIT NINE {0x11C72, 0x11C8F, prOLetter}, // Lo [30] MARCHEN LETTER KA..MARCHEN LETTER A {0x11C92, 0x11CA7, prExtend}, // Mn [22] MARCHEN SUBJOINED LETTER KA..MARCHEN SUBJOINED LETTER ZA {0x11CA9, 0x11CA9, prExtend}, // Mc MARCHEN SUBJOINED LETTER YA {0x11CAA, 0x11CB0, prExtend}, // Mn [7] MARCHEN SUBJOINED LETTER RA..MARCHEN VOWEL SIGN AA {0x11CB1, 0x11CB1, prExtend}, // Mc MARCHEN VOWEL SIGN I {0x11CB2, 0x11CB3, prExtend}, // Mn [2] MARCHEN VOWEL SIGN U..MARCHEN VOWEL SIGN E {0x11CB4, 0x11CB4, prExtend}, // Mc MARCHEN VOWEL SIGN O {0x11CB5, 0x11CB6, prExtend}, // Mn [2] MARCHEN SIGN ANUSVARA..MARCHEN SIGN CANDRABINDU {0x11D00, 0x11D06, prOLetter}, // Lo [7] MASARAM GONDI LETTER A..MASARAM GONDI LETTER E {0x11D08, 0x11D09, prOLetter}, // Lo [2] MASARAM GONDI LETTER AI..MASARAM GONDI LETTER O {0x11D0B, 0x11D30, prOLetter}, // Lo [38] MASARAM GONDI LETTER AU..MASARAM GONDI LETTER TRA {0x11D31, 0x11D36, prExtend}, // Mn [6] MASARAM GONDI VOWEL SIGN AA..MASARAM GONDI VOWEL SIGN VOCALIC R {0x11D3A, 0x11D3A, prExtend}, // Mn MASARAM GONDI VOWEL SIGN E {0x11D3C, 0x11D3D, prExtend}, // Mn [2] MASARAM GONDI VOWEL SIGN AI..MASARAM GONDI VOWEL SIGN O {0x11D3F, 0x11D45, prExtend}, // Mn [7] MASARAM GONDI VOWEL SIGN AU..MASARAM GONDI VIRAMA {0x11D46, 0x11D46, prOLetter}, // Lo MASARAM GONDI REPHA {0x11D47, 0x11D47, prExtend}, // Mn MASARAM GONDI RA-KARA {0x11D50, 0x11D59, prNumeric}, // Nd [10] MASARAM GONDI DIGIT ZERO..MASARAM GONDI DIGIT NINE {0x11D60, 0x11D65, prOLetter}, // Lo [6] GUNJALA GONDI LETTER A..GUNJALA GONDI LETTER UU {0x11D67, 0x11D68, prOLetter}, // Lo [2] GUNJALA GONDI LETTER EE..GUNJALA GONDI LETTER AI {0x11D6A, 0x11D89, prOLetter}, // Lo [32] GUNJALA GONDI LETTER OO..GUNJALA GONDI LETTER SA {0x11D8A, 0x11D8E, prExtend}, // Mc [5] GUNJALA GONDI VOWEL SIGN AA..GUNJALA GONDI VOWEL SIGN UU {0x11D90, 0x11D91, prExtend}, // Mn [2] GUNJALA GONDI VOWEL SIGN EE..GUNJALA GONDI VOWEL SIGN AI {0x11D93, 0x11D94, prExtend}, // Mc [2] GUNJALA GONDI VOWEL SIGN OO..GUNJALA GONDI VOWEL SIGN AU {0x11D95, 0x11D95, prExtend}, // Mn GUNJALA GONDI SIGN ANUSVARA {0x11D96, 0x11D96, prExtend}, // Mc GUNJALA GONDI SIGN VISARGA {0x11D97, 0x11D97, prExtend}, // Mn GUNJALA GONDI VIRAMA {0x11D98, 0x11D98, prOLetter}, // Lo GUNJALA GONDI OM {0x11DA0, 0x11DA9, prNumeric}, // Nd [10] GUNJALA GONDI DIGIT ZERO..GUNJALA GONDI DIGIT NINE {0x11EE0, 0x11EF2, prOLetter}, // Lo [19] MAKASAR LETTER KA..MAKASAR ANGKA {0x11EF3, 0x11EF4, prExtend}, // Mn [2] MAKASAR VOWEL SIGN I..MAKASAR VOWEL SIGN U {0x11EF5, 0x11EF6, prExtend}, // Mc [2] MAKASAR VOWEL SIGN E..MAKASAR VOWEL SIGN O {0x11EF7, 0x11EF8, prSTerm}, // Po [2] MAKASAR PASSIMBANG..MAKASAR END OF SECTION {0x11F00, 0x11F01, prExtend}, // Mn [2] KAWI SIGN CANDRABINDU..KAWI SIGN ANUSVARA {0x11F02, 0x11F02, prOLetter}, // Lo KAWI SIGN REPHA {0x11F03, 0x11F03, prExtend}, // Mc KAWI SIGN VISARGA {0x11F04, 0x11F10, prOLetter}, // Lo [13] KAWI LETTER A..KAWI LETTER O {0x11F12, 0x11F33, prOLetter}, // Lo [34] KAWI LETTER KA..KAWI LETTER JNYA {0x11F34, 0x11F35, prExtend}, // Mc [2] KAWI VOWEL SIGN AA..KAWI VOWEL SIGN ALTERNATE AA {0x11F36, 0x11F3A, prExtend}, // Mn [5] KAWI VOWEL SIGN I..KAWI VOWEL SIGN VOCALIC R {0x11F3E, 0x11F3F, prExtend}, // Mc [2] KAWI VOWEL SIGN E..KAWI VOWEL SIGN AI {0x11F40, 0x11F40, prExtend}, // Mn KAWI VOWEL SIGN EU {0x11F41, 0x11F41, prExtend}, // Mc KAWI SIGN KILLER {0x11F42, 0x11F42, prExtend}, // Mn KAWI CONJOINER {0x11F43, 0x11F44, prSTerm}, // Po [2] KAWI DANDA..KAWI DOUBLE DANDA {0x11F50, 0x11F59, prNumeric}, // Nd [10] KAWI DIGIT ZERO..KAWI DIGIT NINE {0x11FB0, 0x11FB0, prOLetter}, // Lo LISU LETTER YHA {0x12000, 0x12399, prOLetter}, // Lo [922] CUNEIFORM SIGN A..CUNEIFORM SIGN U U {0x12400, 0x1246E, prOLetter}, // Nl [111] CUNEIFORM NUMERIC SIGN TWO ASH..CUNEIFORM NUMERIC SIGN NINE U VARIANT FORM {0x12480, 0x12543, prOLetter}, // Lo [196] CUNEIFORM SIGN AB TIMES NUN TENU..CUNEIFORM SIGN ZU5 TIMES THREE DISH TENU {0x12F90, 0x12FF0, prOLetter}, // Lo [97] CYPRO-MINOAN SIGN CM001..CYPRO-MINOAN SIGN CM114 {0x13000, 0x1342F, prOLetter}, // Lo [1072] EGYPTIAN HIEROGLYPH A001..EGYPTIAN HIEROGLYPH V011D {0x13430, 0x1343F, prFormat}, // Cf [16] EGYPTIAN HIEROGLYPH VERTICAL JOINER..EGYPTIAN HIEROGLYPH END WALLED ENCLOSURE {0x13440, 0x13440, prExtend}, // Mn EGYPTIAN HIEROGLYPH MIRROR HORIZONTALLY {0x13441, 0x13446, prOLetter}, // Lo [6] EGYPTIAN HIEROGLYPH FULL BLANK..EGYPTIAN HIEROGLYPH WIDE LOST SIGN {0x13447, 0x13455, prExtend}, // Mn [15] EGYPTIAN HIEROGLYPH MODIFIER DAMAGED AT TOP START..EGYPTIAN HIEROGLYPH MODIFIER DAMAGED {0x14400, 0x14646, prOLetter}, // Lo [583] ANATOLIAN HIEROGLYPH A001..ANATOLIAN HIEROGLYPH A530 {0x16800, 0x16A38, prOLetter}, // Lo [569] BAMUM LETTER PHASE-A NGKUE MFON..BAMUM LETTER PHASE-F VUEQ {0x16A40, 0x16A5E, prOLetter}, // Lo [31] MRO LETTER TA..MRO LETTER TEK {0x16A60, 0x16A69, prNumeric}, // Nd [10] MRO DIGIT ZERO..MRO DIGIT NINE {0x16A6E, 0x16A6F, prSTerm}, // Po [2] MRO DANDA..MRO DOUBLE DANDA {0x16A70, 0x16ABE, prOLetter}, // Lo [79] TANGSA LETTER OZ..TANGSA LETTER ZA {0x16AC0, 0x16AC9, prNumeric}, // Nd [10] TANGSA DIGIT ZERO..TANGSA DIGIT NINE {0x16AD0, 0x16AED, prOLetter}, // Lo [30] BASSA VAH LETTER ENNI..BASSA VAH LETTER I {0x16AF0, 0x16AF4, prExtend}, // Mn [5] BASSA VAH COMBINING HIGH TONE..BASSA VAH COMBINING HIGH-LOW TONE {0x16AF5, 0x16AF5, prSTerm}, // Po BASSA VAH FULL STOP {0x16B00, 0x16B2F, prOLetter}, // Lo [48] PAHAWH HMONG VOWEL KEEB..PAHAWH HMONG CONSONANT CAU {0x16B30, 0x16B36, prExtend}, // Mn [7] PAHAWH HMONG MARK CIM TUB..PAHAWH HMONG MARK CIM TAUM {0x16B37, 0x16B38, prSTerm}, // Po [2] PAHAWH HMONG SIGN VOS THOM..PAHAWH HMONG SIGN VOS TSHAB CEEB {0x16B40, 0x16B43, prOLetter}, // Lm [4] PAHAWH HMONG SIGN VOS SEEV..PAHAWH HMONG SIGN IB YAM {0x16B44, 0x16B44, prSTerm}, // Po PAHAWH HMONG SIGN XAUS {0x16B50, 0x16B59, prNumeric}, // Nd [10] PAHAWH HMONG DIGIT ZERO..PAHAWH HMONG DIGIT NINE {0x16B63, 0x16B77, prOLetter}, // Lo [21] PAHAWH HMONG SIGN VOS LUB..PAHAWH HMONG SIGN CIM NRES TOS {0x16B7D, 0x16B8F, prOLetter}, // Lo [19] PAHAWH HMONG CLAN SIGN TSHEEJ..PAHAWH HMONG CLAN SIGN VWJ {0x16E40, 0x16E5F, prUpper}, // L& [32] MEDEFAIDRIN CAPITAL LETTER M..MEDEFAIDRIN CAPITAL LETTER Y {0x16E60, 0x16E7F, prLower}, // L& [32] MEDEFAIDRIN SMALL LETTER M..MEDEFAIDRIN SMALL LETTER Y {0x16E98, 0x16E98, prSTerm}, // Po MEDEFAIDRIN FULL STOP {0x16F00, 0x16F4A, prOLetter}, // Lo [75] MIAO LETTER PA..MIAO LETTER RTE {0x16F4F, 0x16F4F, prExtend}, // Mn MIAO SIGN CONSONANT MODIFIER BAR {0x16F50, 0x16F50, prOLetter}, // Lo MIAO LETTER NASALIZATION {0x16F51, 0x16F87, prExtend}, // Mc [55] MIAO SIGN ASPIRATION..MIAO VOWEL SIGN UI {0x16F8F, 0x16F92, prExtend}, // Mn [4] MIAO TONE RIGHT..MIAO TONE BELOW {0x16F93, 0x16F9F, prOLetter}, // Lm [13] MIAO LETTER TONE-2..MIAO LETTER REFORMED TONE-8 {0x16FE0, 0x16FE1, prOLetter}, // Lm [2] TANGUT ITERATION MARK..NUSHU ITERATION MARK {0x16FE3, 0x16FE3, prOLetter}, // Lm OLD CHINESE ITERATION MARK {0x16FE4, 0x16FE4, prExtend}, // Mn KHITAN SMALL SCRIPT FILLER {0x16FF0, 0x16FF1, prExtend}, // Mc [2] VIETNAMESE ALTERNATE READING MARK CA..VIETNAMESE ALTERNATE READING MARK NHAY {0x17000, 0x187F7, prOLetter}, // Lo [6136] TANGUT IDEOGRAPH-17000..TANGUT IDEOGRAPH-187F7 {0x18800, 0x18CD5, prOLetter}, // Lo [1238] TANGUT COMPONENT-001..KHITAN SMALL SCRIPT CHARACTER-18CD5 {0x18D00, 0x18D08, prOLetter}, // Lo [9] TANGUT IDEOGRAPH-18D00..TANGUT IDEOGRAPH-18D08 {0x1AFF0, 0x1AFF3, prOLetter}, // Lm [4] KATAKANA LETTER MINNAN TONE-2..KATAKANA LETTER MINNAN TONE-5 {0x1AFF5, 0x1AFFB, prOLetter}, // Lm [7] KATAKANA LETTER MINNAN TONE-7..KATAKANA LETTER MINNAN NASALIZED TONE-5 {0x1AFFD, 0x1AFFE, prOLetter}, // Lm [2] KATAKANA LETTER MINNAN NASALIZED TONE-7..KATAKANA LETTER MINNAN NASALIZED TONE-8 {0x1B000, 0x1B122, prOLetter}, // Lo [291] KATAKANA LETTER ARCHAIC E..KATAKANA LETTER ARCHAIC WU {0x1B132, 0x1B132, prOLetter}, // Lo HIRAGANA LETTER SMALL KO {0x1B150, 0x1B152, prOLetter}, // Lo [3] HIRAGANA LETTER SMALL WI..HIRAGANA LETTER SMALL WO {0x1B155, 0x1B155, prOLetter}, // Lo KATAKANA LETTER SMALL KO {0x1B164, 0x1B167, prOLetter}, // Lo [4] KATAKANA LETTER SMALL WI..KATAKANA LETTER SMALL N {0x1B170, 0x1B2FB, prOLetter}, // Lo [396] NUSHU CHARACTER-1B170..NUSHU CHARACTER-1B2FB {0x1BC00, 0x1BC6A, prOLetter}, // Lo [107] DUPLOYAN LETTER H..DUPLOYAN LETTER VOCALIC M {0x1BC70, 0x1BC7C, prOLetter}, // Lo [13] DUPLOYAN AFFIX LEFT HORIZONTAL SECANT..DUPLOYAN AFFIX ATTACHED TANGENT HOOK {0x1BC80, 0x1BC88, prOLetter}, // Lo [9] DUPLOYAN AFFIX HIGH ACUTE..DUPLOYAN AFFIX HIGH VERTICAL {0x1BC90, 0x1BC99, prOLetter}, // Lo [10] DUPLOYAN AFFIX LOW ACUTE..DUPLOYAN AFFIX LOW ARROW {0x1BC9D, 0x1BC9E, prExtend}, // Mn [2] DUPLOYAN THICK LETTER SELECTOR..DUPLOYAN DOUBLE MARK {0x1BC9F, 0x1BC9F, prSTerm}, // Po DUPLOYAN PUNCTUATION CHINOOK FULL STOP {0x1BCA0, 0x1BCA3, prFormat}, // Cf [4] SHORTHAND FORMAT LETTER OVERLAP..SHORTHAND FORMAT UP STEP {0x1CF00, 0x1CF2D, prExtend}, // Mn [46] ZNAMENNY COMBINING MARK GORAZDO NIZKO S KRYZHEM ON LEFT..ZNAMENNY COMBINING MARK KRYZH ON LEFT {0x1CF30, 0x1CF46, prExtend}, // Mn [23] ZNAMENNY COMBINING TONAL RANGE MARK MRACHNO..ZNAMENNY PRIZNAK MODIFIER ROG {0x1D165, 0x1D166, prExtend}, // Mc [2] MUSICAL SYMBOL COMBINING STEM..MUSICAL SYMBOL COMBINING SPRECHGESANG STEM {0x1D167, 0x1D169, prExtend}, // Mn [3] MUSICAL SYMBOL COMBINING TREMOLO-1..MUSICAL SYMBOL COMBINING TREMOLO-3 {0x1D16D, 0x1D172, prExtend}, // Mc [6] MUSICAL SYMBOL COMBINING AUGMENTATION DOT..MUSICAL SYMBOL COMBINING FLAG-5 {0x1D173, 0x1D17A, prFormat}, // Cf [8] MUSICAL SYMBOL BEGIN BEAM..MUSICAL SYMBOL END PHRASE {0x1D17B, 0x1D182, prExtend}, // Mn [8] MUSICAL SYMBOL COMBINING ACCENT..MUSICAL SYMBOL COMBINING LOURE {0x1D185, 0x1D18B, prExtend}, // Mn [7] MUSICAL SYMBOL COMBINING DOIT..MUSICAL SYMBOL COMBINING TRIPLE TONGUE {0x1D1AA, 0x1D1AD, prExtend}, // Mn [4] MUSICAL SYMBOL COMBINING DOWN BOW..MUSICAL SYMBOL COMBINING SNAP PIZZICATO {0x1D242, 0x1D244, prExtend}, // Mn [3] COMBINING GREEK MUSICAL TRISEME..COMBINING GREEK MUSICAL PENTASEME {0x1D400, 0x1D419, prUpper}, // L& [26] MATHEMATICAL BOLD CAPITAL A..MATHEMATICAL BOLD CAPITAL Z {0x1D41A, 0x1D433, prLower}, // L& [26] MATHEMATICAL BOLD SMALL A..MATHEMATICAL BOLD SMALL Z {0x1D434, 0x1D44D, prUpper}, // L& [26] MATHEMATICAL ITALIC CAPITAL A..MATHEMATICAL ITALIC CAPITAL Z {0x1D44E, 0x1D454, prLower}, // L& [7] MATHEMATICAL ITALIC SMALL A..MATHEMATICAL ITALIC SMALL G {0x1D456, 0x1D467, prLower}, // L& [18] MATHEMATICAL ITALIC SMALL I..MATHEMATICAL ITALIC SMALL Z {0x1D468, 0x1D481, prUpper}, // L& [26] MATHEMATICAL BOLD ITALIC CAPITAL A..MATHEMATICAL BOLD ITALIC CAPITAL Z {0x1D482, 0x1D49B, prLower}, // L& [26] MATHEMATICAL BOLD ITALIC SMALL A..MATHEMATICAL BOLD ITALIC SMALL Z {0x1D49C, 0x1D49C, prUpper}, // L& MATHEMATICAL SCRIPT CAPITAL A {0x1D49E, 0x1D49F, prUpper}, // L& [2] MATHEMATICAL SCRIPT CAPITAL C..MATHEMATICAL SCRIPT CAPITAL D {0x1D4A2, 0x1D4A2, prUpper}, // L& MATHEMATICAL SCRIPT CAPITAL G {0x1D4A5, 0x1D4A6, prUpper}, // L& [2] MATHEMATICAL SCRIPT CAPITAL J..MATHEMATICAL SCRIPT CAPITAL K {0x1D4A9, 0x1D4AC, prUpper}, // L& [4] MATHEMATICAL SCRIPT CAPITAL N..MATHEMATICAL SCRIPT CAPITAL Q {0x1D4AE, 0x1D4B5, prUpper}, // L& [8] MATHEMATICAL SCRIPT CAPITAL S..MATHEMATICAL SCRIPT CAPITAL Z {0x1D4B6, 0x1D4B9, prLower}, // L& [4] MATHEMATICAL SCRIPT SMALL A..MATHEMATICAL SCRIPT SMALL D {0x1D4BB, 0x1D4BB, prLower}, // L& MATHEMATICAL SCRIPT SMALL F {0x1D4BD, 0x1D4C3, prLower}, // L& [7] MATHEMATICAL SCRIPT SMALL H..MATHEMATICAL SCRIPT SMALL N {0x1D4C5, 0x1D4CF, prLower}, // L& [11] MATHEMATICAL SCRIPT SMALL P..MATHEMATICAL SCRIPT SMALL Z {0x1D4D0, 0x1D4E9, prUpper}, // L& [26] MATHEMATICAL BOLD SCRIPT CAPITAL A..MATHEMATICAL BOLD SCRIPT CAPITAL Z {0x1D4EA, 0x1D503, prLower}, // L& [26] MATHEMATICAL BOLD SCRIPT SMALL A..MATHEMATICAL BOLD SCRIPT SMALL Z {0x1D504, 0x1D505, prUpper}, // L& [2] MATHEMATICAL FRAKTUR CAPITAL A..MATHEMATICAL FRAKTUR CAPITAL B {0x1D507, 0x1D50A, prUpper}, // L& [4] MATHEMATICAL FRAKTUR CAPITAL D..MATHEMATICAL FRAKTUR CAPITAL G {0x1D50D, 0x1D514, prUpper}, // L& [8] MATHEMATICAL FRAKTUR CAPITAL J..MATHEMATICAL FRAKTUR CAPITAL Q {0x1D516, 0x1D51C, prUpper}, // L& [7] MATHEMATICAL FRAKTUR CAPITAL S..MATHEMATICAL FRAKTUR CAPITAL Y {0x1D51E, 0x1D537, prLower}, // L& [26] MATHEMATICAL FRAKTUR SMALL A..MATHEMATICAL FRAKTUR SMALL Z {0x1D538, 0x1D539, prUpper}, // L& [2] MATHEMATICAL DOUBLE-STRUCK CAPITAL A..MATHEMATICAL DOUBLE-STRUCK CAPITAL B {0x1D53B, 0x1D53E, prUpper}, // L& [4] MATHEMATICAL DOUBLE-STRUCK CAPITAL D..MATHEMATICAL DOUBLE-STRUCK CAPITAL G {0x1D540, 0x1D544, prUpper}, // L& [5] MATHEMATICAL DOUBLE-STRUCK CAPITAL I..MATHEMATICAL DOUBLE-STRUCK CAPITAL M {0x1D546, 0x1D546, prUpper}, // L& MATHEMATICAL DOUBLE-STRUCK CAPITAL O {0x1D54A, 0x1D550, prUpper}, // L& [7] MATHEMATICAL DOUBLE-STRUCK CAPITAL S..MATHEMATICAL DOUBLE-STRUCK CAPITAL Y {0x1D552, 0x1D56B, prLower}, // L& [26] MATHEMATICAL DOUBLE-STRUCK SMALL A..MATHEMATICAL DOUBLE-STRUCK SMALL Z {0x1D56C, 0x1D585, prUpper}, // L& [26] MATHEMATICAL BOLD FRAKTUR CAPITAL A..MATHEMATICAL BOLD FRAKTUR CAPITAL Z {0x1D586, 0x1D59F, prLower}, // L& [26] MATHEMATICAL BOLD FRAKTUR SMALL A..MATHEMATICAL BOLD FRAKTUR SMALL Z {0x1D5A0, 0x1D5B9, prUpper}, // L& [26] MATHEMATICAL SANS-SERIF CAPITAL A..MATHEMATICAL SANS-SERIF CAPITAL Z {0x1D5BA, 0x1D5D3, prLower}, // L& [26] MATHEMATICAL SANS-SERIF SMALL A..MATHEMATICAL SANS-SERIF SMALL Z {0x1D5D4, 0x1D5ED, prUpper}, // L& [26] MATHEMATICAL SANS-SERIF BOLD CAPITAL A..MATHEMATICAL SANS-SERIF BOLD CAPITAL Z {0x1D5EE, 0x1D607, prLower}, // L& [26] MATHEMATICAL SANS-SERIF BOLD SMALL A..MATHEMATICAL SANS-SERIF BOLD SMALL Z {0x1D608, 0x1D621, prUpper}, // L& [26] MATHEMATICAL SANS-SERIF ITALIC CAPITAL A..MATHEMATICAL SANS-SERIF ITALIC CAPITAL Z {0x1D622, 0x1D63B, prLower}, // L& [26] MATHEMATICAL SANS-SERIF ITALIC SMALL A..MATHEMATICAL SANS-SERIF ITALIC SMALL Z {0x1D63C, 0x1D655, prUpper}, // L& [26] MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL A..MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL Z {0x1D656, 0x1D66F, prLower}, // L& [26] MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL A..MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL Z {0x1D670, 0x1D689, prUpper}, // L& [26] MATHEMATICAL MONOSPACE CAPITAL A..MATHEMATICAL MONOSPACE CAPITAL Z {0x1D68A, 0x1D6A5, prLower}, // L& [28] MATHEMATICAL MONOSPACE SMALL A..MATHEMATICAL ITALIC SMALL DOTLESS J {0x1D6A8, 0x1D6C0, prUpper}, // L& [25] MATHEMATICAL BOLD CAPITAL ALPHA..MATHEMATICAL BOLD CAPITAL OMEGA {0x1D6C2, 0x1D6DA, prLower}, // L& [25] MATHEMATICAL BOLD SMALL ALPHA..MATHEMATICAL BOLD SMALL OMEGA {0x1D6DC, 0x1D6E1, prLower}, // L& [6] MATHEMATICAL BOLD EPSILON SYMBOL..MATHEMATICAL BOLD PI SYMBOL {0x1D6E2, 0x1D6FA, prUpper}, // L& [25] MATHEMATICAL ITALIC CAPITAL ALPHA..MATHEMATICAL ITALIC CAPITAL OMEGA {0x1D6FC, 0x1D714, prLower}, // L& [25] MATHEMATICAL ITALIC SMALL ALPHA..MATHEMATICAL ITALIC SMALL OMEGA {0x1D716, 0x1D71B, prLower}, // L& [6] MATHEMATICAL ITALIC EPSILON SYMBOL..MATHEMATICAL ITALIC PI SYMBOL {0x1D71C, 0x1D734, prUpper}, // L& [25] MATHEMATICAL BOLD ITALIC CAPITAL ALPHA..MATHEMATICAL BOLD ITALIC CAPITAL OMEGA {0x1D736, 0x1D74E, prLower}, // L& [25] MATHEMATICAL BOLD ITALIC SMALL ALPHA..MATHEMATICAL BOLD ITALIC SMALL OMEGA {0x1D750, 0x1D755, prLower}, // L& [6] MATHEMATICAL BOLD ITALIC EPSILON SYMBOL..MATHEMATICAL BOLD ITALIC PI SYMBOL {0x1D756, 0x1D76E, prUpper}, // L& [25] MATHEMATICAL SANS-SERIF BOLD CAPITAL ALPHA..MATHEMATICAL SANS-SERIF BOLD CAPITAL OMEGA {0x1D770, 0x1D788, prLower}, // L& [25] MATHEMATICAL SANS-SERIF BOLD SMALL ALPHA..MATHEMATICAL SANS-SERIF BOLD SMALL OMEGA {0x1D78A, 0x1D78F, prLower}, // L& [6] MATHEMATICAL SANS-SERIF BOLD EPSILON SYMBOL..MATHEMATICAL SANS-SERIF BOLD PI SYMBOL {0x1D790, 0x1D7A8, prUpper}, // L& [25] MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL ALPHA..MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL OMEGA {0x1D7AA, 0x1D7C2, prLower}, // L& [25] MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL ALPHA..MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL OMEGA {0x1D7C4, 0x1D7C9, prLower}, // L& [6] MATHEMATICAL SANS-SERIF BOLD ITALIC EPSILON SYMBOL..MATHEMATICAL SANS-SERIF BOLD ITALIC PI SYMBOL {0x1D7CA, 0x1D7CA, prUpper}, // L& MATHEMATICAL BOLD CAPITAL DIGAMMA {0x1D7CB, 0x1D7CB, prLower}, // L& MATHEMATICAL BOLD SMALL DIGAMMA {0x1D7CE, 0x1D7FF, prNumeric}, // Nd [50] MATHEMATICAL BOLD DIGIT ZERO..MATHEMATICAL MONOSPACE DIGIT NINE {0x1DA00, 0x1DA36, prExtend}, // Mn [55] SIGNWRITING HEAD RIM..SIGNWRITING AIR SUCKING IN {0x1DA3B, 0x1DA6C, prExtend}, // Mn [50] SIGNWRITING MOUTH CLOSED NEUTRAL..SIGNWRITING EXCITEMENT {0x1DA75, 0x1DA75, prExtend}, // Mn SIGNWRITING UPPER BODY TILTING FROM HIP JOINTS {0x1DA84, 0x1DA84, prExtend}, // Mn SIGNWRITING LOCATION HEAD NECK {0x1DA88, 0x1DA88, prSTerm}, // Po SIGNWRITING FULL STOP {0x1DA9B, 0x1DA9F, prExtend}, // Mn [5] SIGNWRITING FILL MODIFIER-2..SIGNWRITING FILL MODIFIER-6 {0x1DAA1, 0x1DAAF, prExtend}, // Mn [15] SIGNWRITING ROTATION MODIFIER-2..SIGNWRITING ROTATION MODIFIER-16 {0x1DF00, 0x1DF09, prLower}, // L& [10] LATIN SMALL LETTER FENG DIGRAPH WITH TRILL..LATIN SMALL LETTER T WITH HOOK AND RETROFLEX HOOK {0x1DF0A, 0x1DF0A, prOLetter}, // Lo LATIN LETTER RETROFLEX CLICK WITH RETROFLEX HOOK {0x1DF0B, 0x1DF1E, prLower}, // L& [20] LATIN SMALL LETTER ESH WITH DOUBLE BAR..LATIN SMALL LETTER S WITH CURL {0x1DF25, 0x1DF2A, prLower}, // L& [6] LATIN SMALL LETTER D WITH MID-HEIGHT LEFT HOOK..LATIN SMALL LETTER T WITH MID-HEIGHT LEFT HOOK {0x1E000, 0x1E006, prExtend}, // Mn [7] COMBINING GLAGOLITIC LETTER AZU..COMBINING GLAGOLITIC LETTER ZHIVETE {0x1E008, 0x1E018, prExtend}, // Mn [17] COMBINING GLAGOLITIC LETTER ZEMLJA..COMBINING GLAGOLITIC LETTER HERU {0x1E01B, 0x1E021, prExtend}, // Mn [7] COMBINING GLAGOLITIC LETTER SHTA..COMBINING GLAGOLITIC LETTER YATI {0x1E023, 0x1E024, prExtend}, // Mn [2] COMBINING GLAGOLITIC LETTER YU..COMBINING GLAGOLITIC LETTER SMALL YUS {0x1E026, 0x1E02A, prExtend}, // Mn [5] COMBINING GLAGOLITIC LETTER YO..COMBINING GLAGOLITIC LETTER FITA {0x1E030, 0x1E06D, prLower}, // Lm [62] MODIFIER LETTER CYRILLIC SMALL A..MODIFIER LETTER CYRILLIC SMALL STRAIGHT U WITH STROKE {0x1E08F, 0x1E08F, prExtend}, // Mn COMBINING CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I {0x1E100, 0x1E12C, prOLetter}, // Lo [45] NYIAKENG PUACHUE HMONG LETTER MA..NYIAKENG PUACHUE HMONG LETTER W {0x1E130, 0x1E136, prExtend}, // Mn [7] NYIAKENG PUACHUE HMONG TONE-B..NYIAKENG PUACHUE HMONG TONE-D {0x1E137, 0x1E13D, prOLetter}, // Lm [7] NYIAKENG PUACHUE HMONG SIGN FOR PERSON..NYIAKENG PUACHUE HMONG SYLLABLE LENGTHENER {0x1E140, 0x1E149, prNumeric}, // Nd [10] NYIAKENG PUACHUE HMONG DIGIT ZERO..NYIAKENG PUACHUE HMONG DIGIT NINE {0x1E14E, 0x1E14E, prOLetter}, // Lo NYIAKENG PUACHUE HMONG LOGOGRAM NYAJ {0x1E290, 0x1E2AD, prOLetter}, // Lo [30] TOTO LETTER PA..TOTO LETTER A {0x1E2AE, 0x1E2AE, prExtend}, // Mn TOTO SIGN RISING TONE {0x1E2C0, 0x1E2EB, prOLetter}, // Lo [44] WANCHO LETTER AA..WANCHO LETTER YIH {0x1E2EC, 0x1E2EF, prExtend}, // Mn [4] WANCHO TONE TUP..WANCHO TONE KOINI {0x1E2F0, 0x1E2F9, prNumeric}, // Nd [10] WANCHO DIGIT ZERO..WANCHO DIGIT NINE {0x1E4D0, 0x1E4EA, prOLetter}, // Lo [27] NAG MUNDARI LETTER O..NAG MUNDARI LETTER ELL {0x1E4EB, 0x1E4EB, prOLetter}, // Lm NAG MUNDARI SIGN OJOD {0x1E4EC, 0x1E4EF, prExtend}, // Mn [4] NAG MUNDARI SIGN MUHOR..NAG MUNDARI SIGN SUTUH {0x1E4F0, 0x1E4F9, prNumeric}, // Nd [10] NAG MUNDARI DIGIT ZERO..NAG MUNDARI DIGIT NINE {0x1E7E0, 0x1E7E6, prOLetter}, // Lo [7] ETHIOPIC SYLLABLE HHYA..ETHIOPIC SYLLABLE HHYO {0x1E7E8, 0x1E7EB, prOLetter}, // Lo [4] ETHIOPIC SYLLABLE GURAGE HHWA..ETHIOPIC SYLLABLE HHWE {0x1E7ED, 0x1E7EE, prOLetter}, // Lo [2] ETHIOPIC SYLLABLE GURAGE MWI..ETHIOPIC SYLLABLE GURAGE MWEE {0x1E7F0, 0x1E7FE, prOLetter}, // Lo [15] ETHIOPIC SYLLABLE GURAGE QWI..ETHIOPIC SYLLABLE GURAGE PWEE {0x1E800, 0x1E8C4, prOLetter}, // Lo [197] MENDE KIKAKUI SYLLABLE M001 KI..MENDE KIKAKUI SYLLABLE M060 NYON {0x1E8D0, 0x1E8D6, prExtend}, // Mn [7] MENDE KIKAKUI COMBINING NUMBER TEENS..MENDE KIKAKUI COMBINING NUMBER MILLIONS {0x1E900, 0x1E921, prUpper}, // L& [34] ADLAM CAPITAL LETTER ALIF..ADLAM CAPITAL LETTER SHA {0x1E922, 0x1E943, prLower}, // L& [34] ADLAM SMALL LETTER ALIF..ADLAM SMALL LETTER SHA {0x1E944, 0x1E94A, prExtend}, // Mn [7] ADLAM ALIF LENGTHENER..ADLAM NUKTA {0x1E94B, 0x1E94B, prOLetter}, // Lm ADLAM NASALIZATION MARK {0x1E950, 0x1E959, prNumeric}, // Nd [10] ADLAM DIGIT ZERO..ADLAM DIGIT NINE {0x1EE00, 0x1EE03, prOLetter}, // Lo [4] ARABIC MATHEMATICAL ALEF..ARABIC MATHEMATICAL DAL {0x1EE05, 0x1EE1F, prOLetter}, // Lo [27] ARABIC MATHEMATICAL WAW..ARABIC MATHEMATICAL DOTLESS QAF {0x1EE21, 0x1EE22, prOLetter}, // Lo [2] ARABIC MATHEMATICAL INITIAL BEH..ARABIC MATHEMATICAL INITIAL JEEM {0x1EE24, 0x1EE24, prOLetter}, // Lo ARABIC MATHEMATICAL INITIAL HEH {0x1EE27, 0x1EE27, prOLetter}, // Lo ARABIC MATHEMATICAL INITIAL HAH {0x1EE29, 0x1EE32, prOLetter}, // Lo [10] ARABIC MATHEMATICAL INITIAL YEH..ARABIC MATHEMATICAL INITIAL QAF {0x1EE34, 0x1EE37, prOLetter}, // Lo [4] ARABIC MATHEMATICAL INITIAL SHEEN..ARABIC MATHEMATICAL INITIAL KHAH {0x1EE39, 0x1EE39, prOLetter}, // Lo ARABIC MATHEMATICAL INITIAL DAD {0x1EE3B, 0x1EE3B, prOLetter}, // Lo ARABIC MATHEMATICAL INITIAL GHAIN {0x1EE42, 0x1EE42, prOLetter}, // Lo ARABIC MATHEMATICAL TAILED JEEM {0x1EE47, 0x1EE47, prOLetter}, // Lo ARABIC MATHEMATICAL TAILED HAH {0x1EE49, 0x1EE49, prOLetter}, // Lo ARABIC MATHEMATICAL TAILED YEH {0x1EE4B, 0x1EE4B, prOLetter}, // Lo ARABIC MATHEMATICAL TAILED LAM {0x1EE4D, 0x1EE4F, prOLetter}, // Lo [3] ARABIC MATHEMATICAL TAILED NOON..ARABIC MATHEMATICAL TAILED AIN {0x1EE51, 0x1EE52, prOLetter}, // Lo [2] ARABIC MATHEMATICAL TAILED SAD..ARABIC MATHEMATICAL TAILED QAF {0x1EE54, 0x1EE54, prOLetter}, // Lo ARABIC MATHEMATICAL TAILED SHEEN {0x1EE57, 0x1EE57, prOLetter}, // Lo ARABIC MATHEMATICAL TAILED KHAH {0x1EE59, 0x1EE59, prOLetter}, // Lo ARABIC MATHEMATICAL TAILED DAD {0x1EE5B, 0x1EE5B, prOLetter}, // Lo ARABIC MATHEMATICAL TAILED GHAIN {0x1EE5D, 0x1EE5D, prOLetter}, // Lo ARABIC MATHEMATICAL TAILED DOTLESS NOON {0x1EE5F, 0x1EE5F, prOLetter}, // Lo ARABIC MATHEMATICAL TAILED DOTLESS QAF {0x1EE61, 0x1EE62, prOLetter}, // Lo [2] ARABIC MATHEMATICAL STRETCHED BEH..ARABIC MATHEMATICAL STRETCHED JEEM {0x1EE64, 0x1EE64, prOLetter}, // Lo ARABIC MATHEMATICAL STRETCHED HEH {0x1EE67, 0x1EE6A, prOLetter}, // Lo [4] ARABIC MATHEMATICAL STRETCHED HAH..ARABIC MATHEMATICAL STRETCHED KAF {0x1EE6C, 0x1EE72, prOLetter}, // Lo [7] ARABIC MATHEMATICAL STRETCHED MEEM..ARABIC MATHEMATICAL STRETCHED QAF {0x1EE74, 0x1EE77, prOLetter}, // Lo [4] ARABIC MATHEMATICAL STRETCHED SHEEN..ARABIC MATHEMATICAL STRETCHED KHAH {0x1EE79, 0x1EE7C, prOLetter}, // Lo [4] ARABIC MATHEMATICAL STRETCHED DAD..ARABIC MATHEMATICAL STRETCHED DOTLESS BEH {0x1EE7E, 0x1EE7E, prOLetter}, // Lo ARABIC MATHEMATICAL STRETCHED DOTLESS FEH {0x1EE80, 0x1EE89, prOLetter}, // Lo [10] ARABIC MATHEMATICAL LOOPED ALEF..ARABIC MATHEMATICAL LOOPED YEH {0x1EE8B, 0x1EE9B, prOLetter}, // Lo [17] ARABIC MATHEMATICAL LOOPED LAM..ARABIC MATHEMATICAL LOOPED GHAIN {0x1EEA1, 0x1EEA3, prOLetter}, // Lo [3] ARABIC MATHEMATICAL DOUBLE-STRUCK BEH..ARABIC MATHEMATICAL DOUBLE-STRUCK DAL {0x1EEA5, 0x1EEA9, prOLetter}, // Lo [5] ARABIC MATHEMATICAL DOUBLE-STRUCK WAW..ARABIC MATHEMATICAL DOUBLE-STRUCK YEH {0x1EEAB, 0x1EEBB, prOLetter}, // Lo [17] ARABIC MATHEMATICAL DOUBLE-STRUCK LAM..ARABIC MATHEMATICAL DOUBLE-STRUCK GHAIN {0x1F130, 0x1F149, prUpper}, // So [26] SQUARED LATIN CAPITAL LETTER A..SQUARED LATIN CAPITAL LETTER Z {0x1F150, 0x1F169, prUpper}, // So [26] NEGATIVE CIRCLED LATIN CAPITAL LETTER A..NEGATIVE CIRCLED LATIN CAPITAL LETTER Z {0x1F170, 0x1F189, prUpper}, // So [26] NEGATIVE SQUARED LATIN CAPITAL LETTER A..NEGATIVE SQUARED LATIN CAPITAL LETTER Z {0x1F676, 0x1F678, prClose}, // So [3] SANS-SERIF HEAVY DOUBLE TURNED COMMA QUOTATION MARK ORNAMENT..SANS-SERIF HEAVY LOW DOUBLE COMMA QUOTATION MARK ORNAMENT {0x1FBF0, 0x1FBF9, prNumeric}, // Nd [10] SEGMENTED DIGIT ZERO..SEGMENTED DIGIT NINE {0x20000, 0x2A6DF, prOLetter}, // Lo [42720] CJK UNIFIED IDEOGRAPH-20000..CJK UNIFIED IDEOGRAPH-2A6DF {0x2A700, 0x2B739, prOLetter}, // Lo [4154] CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B739 {0x2B740, 0x2B81D, prOLetter}, // Lo [222] CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D {0x2B820, 0x2CEA1, prOLetter}, // Lo [5762] CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1 {0x2CEB0, 0x2EBE0, prOLetter}, // Lo [7473] CJK UNIFIED IDEOGRAPH-2CEB0..CJK UNIFIED IDEOGRAPH-2EBE0 {0x2F800, 0x2FA1D, prOLetter}, // Lo [542] CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPATIBILITY IDEOGRAPH-2FA1D {0x30000, 0x3134A, prOLetter}, // Lo [4939] CJK UNIFIED IDEOGRAPH-30000..CJK UNIFIED IDEOGRAPH-3134A {0x31350, 0x323AF, prOLetter}, // Lo [4192] CJK UNIFIED IDEOGRAPH-31350..CJK UNIFIED IDEOGRAPH-323AF {0xE0001, 0xE0001, prFormat}, // Cf LANGUAGE TAG {0xE0020, 0xE007F, prExtend}, // Cf [96] TAG SPACE..CANCEL TAG {0xE0100, 0xE01EF, prExtend}, // Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR-256 } ================================================ FILE: vendor/github.com/rivo/uniseg/sentencerules.go ================================================ package uniseg import "unicode/utf8" // The states of the sentence break parser. const ( sbAny = iota sbCR sbParaSep sbATerm sbUpper sbLower sbSB7 sbSB8Close sbSB8Sp sbSTerm sbSB8aClose sbSB8aSp ) // sbTransitions implements the sentence break parser's state transitions. It's // anologous to [grTransitions], see comments there for details. // // Unicode version 15.0.0. func sbTransitions(state, prop int) (newState int, sentenceBreak bool, rule int) { switch uint64(state) | uint64(prop)<<32 { // SB3. case sbAny | prCR<<32: return sbCR, false, 9990 case sbCR | prLF<<32: return sbParaSep, false, 30 // SB4. case sbAny | prSep<<32: return sbParaSep, false, 9990 case sbAny | prLF<<32: return sbParaSep, false, 9990 case sbParaSep | prAny<<32: return sbAny, true, 40 case sbCR | prAny<<32: return sbAny, true, 40 // SB6. case sbAny | prATerm<<32: return sbATerm, false, 9990 case sbATerm | prNumeric<<32: return sbAny, false, 60 case sbSB7 | prNumeric<<32: return sbAny, false, 60 // Because ATerm also appears in SB7. // SB7. case sbAny | prUpper<<32: return sbUpper, false, 9990 case sbAny | prLower<<32: return sbLower, false, 9990 case sbUpper | prATerm<<32: return sbSB7, false, 70 case sbLower | prATerm<<32: return sbSB7, false, 70 case sbSB7 | prUpper<<32: return sbUpper, false, 70 // SB8a. case sbAny | prSTerm<<32: return sbSTerm, false, 9990 case sbATerm | prSContinue<<32: return sbAny, false, 81 case sbATerm | prATerm<<32: return sbATerm, false, 81 case sbATerm | prSTerm<<32: return sbSTerm, false, 81 case sbSB7 | prSContinue<<32: return sbAny, false, 81 case sbSB7 | prATerm<<32: return sbATerm, false, 81 case sbSB7 | prSTerm<<32: return sbSTerm, false, 81 case sbSB8Close | prSContinue<<32: return sbAny, false, 81 case sbSB8Close | prATerm<<32: return sbATerm, false, 81 case sbSB8Close | prSTerm<<32: return sbSTerm, false, 81 case sbSB8Sp | prSContinue<<32: return sbAny, false, 81 case sbSB8Sp | prATerm<<32: return sbATerm, false, 81 case sbSB8Sp | prSTerm<<32: return sbSTerm, false, 81 case sbSTerm | prSContinue<<32: return sbAny, false, 81 case sbSTerm | prATerm<<32: return sbATerm, false, 81 case sbSTerm | prSTerm<<32: return sbSTerm, false, 81 case sbSB8aClose | prSContinue<<32: return sbAny, false, 81 case sbSB8aClose | prATerm<<32: return sbATerm, false, 81 case sbSB8aClose | prSTerm<<32: return sbSTerm, false, 81 case sbSB8aSp | prSContinue<<32: return sbAny, false, 81 case sbSB8aSp | prATerm<<32: return sbATerm, false, 81 case sbSB8aSp | prSTerm<<32: return sbSTerm, false, 81 // SB9. case sbATerm | prClose<<32: return sbSB8Close, false, 90 case sbSB7 | prClose<<32: return sbSB8Close, false, 90 case sbSB8Close | prClose<<32: return sbSB8Close, false, 90 case sbATerm | prSp<<32: return sbSB8Sp, false, 90 case sbSB7 | prSp<<32: return sbSB8Sp, false, 90 case sbSB8Close | prSp<<32: return sbSB8Sp, false, 90 case sbSTerm | prClose<<32: return sbSB8aClose, false, 90 case sbSB8aClose | prClose<<32: return sbSB8aClose, false, 90 case sbSTerm | prSp<<32: return sbSB8aSp, false, 90 case sbSB8aClose | prSp<<32: return sbSB8aSp, false, 90 case sbATerm | prSep<<32: return sbParaSep, false, 90 case sbATerm | prCR<<32: return sbParaSep, false, 90 case sbATerm | prLF<<32: return sbParaSep, false, 90 case sbSB7 | prSep<<32: return sbParaSep, false, 90 case sbSB7 | prCR<<32: return sbParaSep, false, 90 case sbSB7 | prLF<<32: return sbParaSep, false, 90 case sbSB8Close | prSep<<32: return sbParaSep, false, 90 case sbSB8Close | prCR<<32: return sbParaSep, false, 90 case sbSB8Close | prLF<<32: return sbParaSep, false, 90 case sbSTerm | prSep<<32: return sbParaSep, false, 90 case sbSTerm | prCR<<32: return sbParaSep, false, 90 case sbSTerm | prLF<<32: return sbParaSep, false, 90 case sbSB8aClose | prSep<<32: return sbParaSep, false, 90 case sbSB8aClose | prCR<<32: return sbParaSep, false, 90 case sbSB8aClose | prLF<<32: return sbParaSep, false, 90 // SB10. case sbSB8Sp | prSp<<32: return sbSB8Sp, false, 100 case sbSB8aSp | prSp<<32: return sbSB8aSp, false, 100 case sbSB8Sp | prSep<<32: return sbParaSep, false, 100 case sbSB8Sp | prCR<<32: return sbParaSep, false, 100 case sbSB8Sp | prLF<<32: return sbParaSep, false, 100 // SB11. case sbATerm | prAny<<32: return sbAny, true, 110 case sbSB7 | prAny<<32: return sbAny, true, 110 case sbSB8Close | prAny<<32: return sbAny, true, 110 case sbSB8Sp | prAny<<32: return sbAny, true, 110 case sbSTerm | prAny<<32: return sbAny, true, 110 case sbSB8aClose | prAny<<32: return sbAny, true, 110 case sbSB8aSp | prAny<<32: return sbAny, true, 110 // We'll always break after ParaSep due to SB4. default: return -1, false, -1 } } // transitionSentenceBreakState determines the new state of the sentence break // parser given the current state and the next code point. It also returns // whether a sentence boundary was detected. If more than one code point is // needed to determine the new state, the byte slice or the string starting // after rune "r" can be used (whichever is not nil or empty) for further // lookups. func transitionSentenceBreakState(state int, r rune, b []byte, str string) (newState int, sentenceBreak bool) { // Determine the property of the next character. nextProperty := property(sentenceBreakCodePoints, r) // SB5 (Replacing Ignore Rules). if nextProperty == prExtend || nextProperty == prFormat { if state == sbParaSep || state == sbCR { return sbAny, true // Make sure we don't apply SB5 to SB3 or SB4. } if state < 0 { return sbAny, true // SB1. } return state, false } // Find the applicable transition in the table. var rule int newState, sentenceBreak, rule = sbTransitions(state, nextProperty) if newState < 0 { // No specific transition found. Try the less specific ones. anyPropState, anyPropProp, anyPropRule := sbTransitions(state, prAny) anyStateState, anyStateProp, anyStateRule := sbTransitions(sbAny, nextProperty) if anyPropState >= 0 && anyStateState >= 0 { // Both apply. We'll use a mix (see comments for grTransitions). newState, sentenceBreak, rule = anyStateState, anyStateProp, anyStateRule if anyPropRule < anyStateRule { sentenceBreak, rule = anyPropProp, anyPropRule } } else if anyPropState >= 0 { // We only have a specific state. newState, sentenceBreak, rule = anyPropState, anyPropProp, anyPropRule // This branch will probably never be reached because okAnyState will // always be true given the current transition map. But we keep it here // for future modifications to the transition map where this may not be // true anymore. } else if anyStateState >= 0 { // We only have a specific property. newState, sentenceBreak, rule = anyStateState, anyStateProp, anyStateRule } else { // No known transition. SB999: Any × Any. newState, sentenceBreak, rule = sbAny, false, 9990 } } // SB8. if rule > 80 && (state == sbATerm || state == sbSB8Close || state == sbSB8Sp || state == sbSB7) { // Check the right side of the rule. var length int for nextProperty != prOLetter && nextProperty != prUpper && nextProperty != prLower && nextProperty != prSep && nextProperty != prCR && nextProperty != prLF && nextProperty != prATerm && nextProperty != prSTerm { // Move on to the next rune. if b != nil { // Byte slice version. r, length = utf8.DecodeRune(b) b = b[length:] } else { // String version. r, length = utf8.DecodeRuneInString(str) str = str[length:] } if r == utf8.RuneError { break } nextProperty = property(sentenceBreakCodePoints, r) } if nextProperty == prLower { return sbLower, false } } return } ================================================ FILE: vendor/github.com/rivo/uniseg/step.go ================================================ package uniseg import "unicode/utf8" // The bit masks used to extract boundary information returned by [Step]. const ( MaskLine = 3 MaskWord = 4 MaskSentence = 8 ) // The number of bits to shift the boundary information returned by [Step] to // obtain the monospace width of the grapheme cluster. const ShiftWidth = 4 // The bit positions by which boundary flags are shifted by the [Step] function. // These must correspond to the Mask constants. const ( shiftWord = 2 shiftSentence = 3 // shiftwWidth is ShiftWidth above. No mask as these are always the remaining bits. ) // The bit positions by which states are shifted by the [Step] function. These // values must ensure state values defined for each of the boundary algorithms // don't overlap (and that they all still fit in a single int). These must // correspond to the Mask constants. const ( shiftWordState = 4 shiftSentenceState = 9 shiftLineState = 13 shiftPropState = 21 // No mask as these are always the remaining bits. ) // The bit mask used to extract the state returned by the [Step] function, after // shifting. These values must correspond to the shift constants. const ( maskGraphemeState = 0xf maskWordState = 0x1f maskSentenceState = 0xf maskLineState = 0xff ) // Step returns the first grapheme cluster (user-perceived character) found in // the given byte slice. It also returns information about the boundary between // that grapheme cluster and the one following it as well as the monospace width // of the grapheme cluster. There are three types of boundary information: word // boundaries, sentence boundaries, and line breaks. This function is therefore // a combination of [FirstGraphemeCluster], [FirstWord], [FirstSentence], and // [FirstLineSegment]. // // The "boundaries" return value can be evaluated as follows: // // - boundaries&MaskWord != 0: The boundary is a word boundary. // - boundaries&MaskWord == 0: The boundary is not a word boundary. // - boundaries&MaskSentence != 0: The boundary is a sentence boundary. // - boundaries&MaskSentence == 0: The boundary is not a sentence boundary. // - boundaries&MaskLine == LineDontBreak: You must not break the line at the // boundary. // - boundaries&MaskLine == LineMustBreak: You must break the line at the // boundary. // - boundaries&MaskLine == LineCanBreak: You may or may not break the line at // the boundary. // - boundaries >> ShiftWidth: The width of the grapheme cluster for most // monospace fonts where a value of 1 represents one character cell. // // This function can be called continuously to extract all grapheme clusters // from a byte slice, as illustrated in the examples below. // // If you don't know which state to pass, for example when calling the function // for the first time, you must pass -1. For consecutive calls, pass the state // and rest slice returned by the previous call. // // The "rest" slice is the sub-slice of the original byte slice "b" starting // after the last byte of the identified grapheme cluster. If the length of the // "rest" slice is 0, the entire byte slice "b" has been processed. The // "cluster" byte slice is the sub-slice of the input slice containing the // first identified grapheme cluster. // // Given an empty byte slice "b", the function returns nil values. // // While slightly less convenient than using the Graphemes class, this function // has much better performance and makes no allocations. It lends itself well to // large byte slices. // // Note that in accordance with [UAX #14 LB3], the final segment will end with // a mandatory line break (boundaries&MaskLine == LineMustBreak). You can choose // to ignore this by checking if the length of the "rest" slice is 0 and calling // [HasTrailingLineBreak] or [HasTrailingLineBreakInString] on the last rune. // // [UAX #14 LB3]: https://www.unicode.org/reports/tr14/#Algorithm func Step(b []byte, state int) (cluster, rest []byte, boundaries int, newState int) { // An empty byte slice returns nothing. if len(b) == 0 { return } // Extract the first rune. r, length := utf8.DecodeRune(b) if len(b) <= length { // If we're already past the end, there is nothing else to parse. var prop int if state < 0 { prop = propertyGraphemes(r) } else { prop = state >> shiftPropState } return b, nil, LineMustBreak | (1 << shiftWord) | (1 << shiftSentence) | (runeWidth(r, prop) << ShiftWidth), grAny | (wbAny << shiftWordState) | (sbAny << shiftSentenceState) | (lbAny << shiftLineState) | (prop << shiftPropState) } // If we don't know the state, determine it now. var graphemeState, wordState, sentenceState, lineState, firstProp int remainder := b[length:] if state < 0 { graphemeState, firstProp, _ = transitionGraphemeState(state, r) wordState, _ = transitionWordBreakState(state, r, remainder, "") sentenceState, _ = transitionSentenceBreakState(state, r, remainder, "") lineState, _ = transitionLineBreakState(state, r, remainder, "") } else { graphemeState = state & maskGraphemeState wordState = (state >> shiftWordState) & maskWordState sentenceState = (state >> shiftSentenceState) & maskSentenceState lineState = (state >> shiftLineState) & maskLineState firstProp = state >> shiftPropState } // Transition until we find a grapheme cluster boundary. width := runeWidth(r, firstProp) for { var ( graphemeBoundary, wordBoundary, sentenceBoundary bool lineBreak, prop int ) r, l := utf8.DecodeRune(remainder) remainder = b[length+l:] graphemeState, prop, graphemeBoundary = transitionGraphemeState(graphemeState, r) wordState, wordBoundary = transitionWordBreakState(wordState, r, remainder, "") sentenceState, sentenceBoundary = transitionSentenceBreakState(sentenceState, r, remainder, "") lineState, lineBreak = transitionLineBreakState(lineState, r, remainder, "") if graphemeBoundary { boundary := lineBreak | (width << ShiftWidth) if wordBoundary { boundary |= 1 << shiftWord } if sentenceBoundary { boundary |= 1 << shiftSentence } return b[:length], b[length:], boundary, graphemeState | (wordState << shiftWordState) | (sentenceState << shiftSentenceState) | (lineState << shiftLineState) | (prop << shiftPropState) } if firstProp == prExtendedPictographic { if r == vs15 { width = 1 } else if r == vs16 { width = 2 } } else if firstProp != prRegionalIndicator && firstProp != prL { width += runeWidth(r, prop) } length += l if len(b) <= length { return b, nil, LineMustBreak | (1 << shiftWord) | (1 << shiftSentence) | (width << ShiftWidth), grAny | (wbAny << shiftWordState) | (sbAny << shiftSentenceState) | (lbAny << shiftLineState) | (prop << shiftPropState) } } } // StepString is like [Step] but its input and outputs are strings. func StepString(str string, state int) (cluster, rest string, boundaries int, newState int) { // An empty byte slice returns nothing. if len(str) == 0 { return } // Extract the first rune. r, length := utf8.DecodeRuneInString(str) if len(str) <= length { // If we're already past the end, there is nothing else to parse. prop := propertyGraphemes(r) return str, "", LineMustBreak | (1 << shiftWord) | (1 << shiftSentence) | (runeWidth(r, prop) << ShiftWidth), grAny | (wbAny << shiftWordState) | (sbAny << shiftSentenceState) | (lbAny << shiftLineState) } // If we don't know the state, determine it now. var graphemeState, wordState, sentenceState, lineState, firstProp int remainder := str[length:] if state < 0 { graphemeState, firstProp, _ = transitionGraphemeState(state, r) wordState, _ = transitionWordBreakState(state, r, nil, remainder) sentenceState, _ = transitionSentenceBreakState(state, r, nil, remainder) lineState, _ = transitionLineBreakState(state, r, nil, remainder) } else { graphemeState = state & maskGraphemeState wordState = (state >> shiftWordState) & maskWordState sentenceState = (state >> shiftSentenceState) & maskSentenceState lineState = (state >> shiftLineState) & maskLineState firstProp = state >> shiftPropState } // Transition until we find a grapheme cluster boundary. width := runeWidth(r, firstProp) for { var ( graphemeBoundary, wordBoundary, sentenceBoundary bool lineBreak, prop int ) r, l := utf8.DecodeRuneInString(remainder) remainder = str[length+l:] graphemeState, prop, graphemeBoundary = transitionGraphemeState(graphemeState, r) wordState, wordBoundary = transitionWordBreakState(wordState, r, nil, remainder) sentenceState, sentenceBoundary = transitionSentenceBreakState(sentenceState, r, nil, remainder) lineState, lineBreak = transitionLineBreakState(lineState, r, nil, remainder) if graphemeBoundary { boundary := lineBreak | (width << ShiftWidth) if wordBoundary { boundary |= 1 << shiftWord } if sentenceBoundary { boundary |= 1 << shiftSentence } return str[:length], str[length:], boundary, graphemeState | (wordState << shiftWordState) | (sentenceState << shiftSentenceState) | (lineState << shiftLineState) | (prop << shiftPropState) } if firstProp == prExtendedPictographic { if r == vs15 { width = 1 } else if r == vs16 { width = 2 } } else if firstProp != prRegionalIndicator && firstProp != prL { width += runeWidth(r, prop) } length += l if len(str) <= length { return str, "", LineMustBreak | (1 << shiftWord) | (1 << shiftSentence) | (width << ShiftWidth), grAny | (wbAny << shiftWordState) | (sbAny << shiftSentenceState) | (lbAny << shiftLineState) | (prop << shiftPropState) } } } ================================================ FILE: vendor/github.com/rivo/uniseg/width.go ================================================ package uniseg // EastAsianAmbiguousWidth specifies the monospace width for East Asian // characters classified as Ambiguous. The default is 1 but some rare fonts // render them with a width of 2. var EastAsianAmbiguousWidth = 1 // runeWidth returns the monospace width for the given rune. The provided // grapheme property is a value mapped by the [graphemeCodePoints] table. // // Every rune has a width of 1, except for runes with the following properties // (evaluated in this order): // // - Control, CR, LF, Extend, ZWJ: Width of 0 // - \u2e3a, TWO-EM DASH: Width of 3 // - \u2e3b, THREE-EM DASH: Width of 4 // - East-Asian width Fullwidth and Wide: Width of 2 (Ambiguous and Neutral // have a width of 1) // - Regional Indicator: Width of 2 // - Extended Pictographic: Width of 2, unless Emoji Presentation is "No". func runeWidth(r rune, graphemeProperty int) int { switch graphemeProperty { case prControl, prCR, prLF, prExtend, prZWJ: return 0 case prRegionalIndicator: return 2 case prExtendedPictographic: if property(emojiPresentation, r) == prEmojiPresentation { return 2 } return 1 } switch r { case 0x2e3a: return 3 case 0x2e3b: return 4 } switch propertyEastAsianWidth(r) { case prW, prF: return 2 case prA: return EastAsianAmbiguousWidth } return 1 } // StringWidth returns the monospace width for the given string, that is, the // number of same-size cells to be occupied by the string. func StringWidth(s string) (width int) { state := -1 for len(s) > 0 { var w int _, s, w, state = FirstGraphemeClusterInString(s, state) width += w } return } ================================================ FILE: vendor/github.com/rivo/uniseg/word.go ================================================ package uniseg import "unicode/utf8" // FirstWord returns the first word found in the given byte slice according to // the rules of [Unicode Standard Annex #29, Word Boundaries]. This function can // be called continuously to extract all words from a byte slice, as illustrated // in the example below. // // If you don't know the current state, for example when calling the function // for the first time, you must pass -1. For consecutive calls, pass the state // and rest slice returned by the previous call. // // The "rest" slice is the sub-slice of the original byte slice "b" starting // after the last byte of the identified word. If the length of the "rest" slice // is 0, the entire byte slice "b" has been processed. The "word" byte slice is // the sub-slice of the input slice containing the identified word. // // Given an empty byte slice "b", the function returns nil values. // // [Unicode Standard Annex #29, Word Boundaries]: http://unicode.org/reports/tr29/#Word_Boundaries func FirstWord(b []byte, state int) (word, rest []byte, newState int) { // An empty byte slice returns nothing. if len(b) == 0 { return } // Extract the first rune. r, length := utf8.DecodeRune(b) if len(b) <= length { // If we're already past the end, there is nothing else to parse. return b, nil, wbAny } // If we don't know the state, determine it now. if state < 0 { state, _ = transitionWordBreakState(state, r, b[length:], "") } // Transition until we find a boundary. var boundary bool for { r, l := utf8.DecodeRune(b[length:]) state, boundary = transitionWordBreakState(state, r, b[length+l:], "") if boundary { return b[:length], b[length:], state } length += l if len(b) <= length { return b, nil, wbAny } } } // FirstWordInString is like [FirstWord] but its input and outputs are strings. func FirstWordInString(str string, state int) (word, rest string, newState int) { // An empty byte slice returns nothing. if len(str) == 0 { return } // Extract the first rune. r, length := utf8.DecodeRuneInString(str) if len(str) <= length { // If we're already past the end, there is nothing else to parse. return str, "", wbAny } // If we don't know the state, determine it now. if state < 0 { state, _ = transitionWordBreakState(state, r, nil, str[length:]) } // Transition until we find a boundary. var boundary bool for { r, l := utf8.DecodeRuneInString(str[length:]) state, boundary = transitionWordBreakState(state, r, nil, str[length+l:]) if boundary { return str[:length], str[length:], state } length += l if len(str) <= length { return str, "", wbAny } } } ================================================ FILE: vendor/github.com/rivo/uniseg/wordproperties.go ================================================ // Code generated via go generate from gen_properties.go. DO NOT EDIT. package uniseg // workBreakCodePoints are taken from // https://www.unicode.org/Public/15.0.0/ucd/auxiliary/WordBreakProperty.txt // and // https://unicode.org/Public/15.0.0/ucd/emoji/emoji-data.txt // ("Extended_Pictographic" only) // on September 5, 2023. See https://www.unicode.org/license.html for the Unicode // license agreement. var workBreakCodePoints = [][3]int{ {0x000A, 0x000A, prLF}, // Cc {0x000B, 0x000C, prNewline}, // Cc [2] .. {0x000D, 0x000D, prCR}, // Cc {0x0020, 0x0020, prWSegSpace}, // Zs SPACE {0x0022, 0x0022, prDoubleQuote}, // Po QUOTATION MARK {0x0027, 0x0027, prSingleQuote}, // Po APOSTROPHE {0x002C, 0x002C, prMidNum}, // Po COMMA {0x002E, 0x002E, prMidNumLet}, // Po FULL STOP {0x0030, 0x0039, prNumeric}, // Nd [10] DIGIT ZERO..DIGIT NINE {0x003A, 0x003A, prMidLetter}, // Po COLON {0x003B, 0x003B, prMidNum}, // Po SEMICOLON {0x0041, 0x005A, prALetter}, // L& [26] LATIN CAPITAL LETTER A..LATIN CAPITAL LETTER Z {0x005F, 0x005F, prExtendNumLet}, // Pc LOW LINE {0x0061, 0x007A, prALetter}, // L& [26] LATIN SMALL LETTER A..LATIN SMALL LETTER Z {0x0085, 0x0085, prNewline}, // Cc {0x00A9, 0x00A9, prExtendedPictographic}, // E0.6 [1] (©️) copyright {0x00AA, 0x00AA, prALetter}, // Lo FEMININE ORDINAL INDICATOR {0x00AD, 0x00AD, prFormat}, // Cf SOFT HYPHEN {0x00AE, 0x00AE, prExtendedPictographic}, // E0.6 [1] (®️) registered {0x00B5, 0x00B5, prALetter}, // L& MICRO SIGN {0x00B7, 0x00B7, prMidLetter}, // Po MIDDLE DOT {0x00BA, 0x00BA, prALetter}, // Lo MASCULINE ORDINAL INDICATOR {0x00C0, 0x00D6, prALetter}, // L& [23] LATIN CAPITAL LETTER A WITH GRAVE..LATIN CAPITAL LETTER O WITH DIAERESIS {0x00D8, 0x00F6, prALetter}, // L& [31] LATIN CAPITAL LETTER O WITH STROKE..LATIN SMALL LETTER O WITH DIAERESIS {0x00F8, 0x01BA, prALetter}, // L& [195] LATIN SMALL LETTER O WITH STROKE..LATIN SMALL LETTER EZH WITH TAIL {0x01BB, 0x01BB, prALetter}, // Lo LATIN LETTER TWO WITH STROKE {0x01BC, 0x01BF, prALetter}, // L& [4] LATIN CAPITAL LETTER TONE FIVE..LATIN LETTER WYNN {0x01C0, 0x01C3, prALetter}, // Lo [4] LATIN LETTER DENTAL CLICK..LATIN LETTER RETROFLEX CLICK {0x01C4, 0x0293, prALetter}, // L& [208] LATIN CAPITAL LETTER DZ WITH CARON..LATIN SMALL LETTER EZH WITH CURL {0x0294, 0x0294, prALetter}, // Lo LATIN LETTER GLOTTAL STOP {0x0295, 0x02AF, prALetter}, // L& [27] LATIN LETTER PHARYNGEAL VOICED FRICATIVE..LATIN SMALL LETTER TURNED H WITH FISHHOOK AND TAIL {0x02B0, 0x02C1, prALetter}, // Lm [18] MODIFIER LETTER SMALL H..MODIFIER LETTER REVERSED GLOTTAL STOP {0x02C2, 0x02C5, prALetter}, // Sk [4] MODIFIER LETTER LEFT ARROWHEAD..MODIFIER LETTER DOWN ARROWHEAD {0x02C6, 0x02D1, prALetter}, // Lm [12] MODIFIER LETTER CIRCUMFLEX ACCENT..MODIFIER LETTER HALF TRIANGULAR COLON {0x02D2, 0x02D7, prALetter}, // Sk [6] MODIFIER LETTER CENTRED RIGHT HALF RING..MODIFIER LETTER MINUS SIGN {0x02DE, 0x02DF, prALetter}, // Sk [2] MODIFIER LETTER RHOTIC HOOK..MODIFIER LETTER CROSS ACCENT {0x02E0, 0x02E4, prALetter}, // Lm [5] MODIFIER LETTER SMALL GAMMA..MODIFIER LETTER SMALL REVERSED GLOTTAL STOP {0x02E5, 0x02EB, prALetter}, // Sk [7] MODIFIER LETTER EXTRA-HIGH TONE BAR..MODIFIER LETTER YANG DEPARTING TONE MARK {0x02EC, 0x02EC, prALetter}, // Lm MODIFIER LETTER VOICING {0x02ED, 0x02ED, prALetter}, // Sk MODIFIER LETTER UNASPIRATED {0x02EE, 0x02EE, prALetter}, // Lm MODIFIER LETTER DOUBLE APOSTROPHE {0x02EF, 0x02FF, prALetter}, // Sk [17] MODIFIER LETTER LOW DOWN ARROWHEAD..MODIFIER LETTER LOW LEFT ARROW {0x0300, 0x036F, prExtend}, // Mn [112] COMBINING GRAVE ACCENT..COMBINING LATIN SMALL LETTER X {0x0370, 0x0373, prALetter}, // L& [4] GREEK CAPITAL LETTER HETA..GREEK SMALL LETTER ARCHAIC SAMPI {0x0374, 0x0374, prALetter}, // Lm GREEK NUMERAL SIGN {0x0376, 0x0377, prALetter}, // L& [2] GREEK CAPITAL LETTER PAMPHYLIAN DIGAMMA..GREEK SMALL LETTER PAMPHYLIAN DIGAMMA {0x037A, 0x037A, prALetter}, // Lm GREEK YPOGEGRAMMENI {0x037B, 0x037D, prALetter}, // L& [3] GREEK SMALL REVERSED LUNATE SIGMA SYMBOL..GREEK SMALL REVERSED DOTTED LUNATE SIGMA SYMBOL {0x037E, 0x037E, prMidNum}, // Po GREEK QUESTION MARK {0x037F, 0x037F, prALetter}, // L& GREEK CAPITAL LETTER YOT {0x0386, 0x0386, prALetter}, // L& GREEK CAPITAL LETTER ALPHA WITH TONOS {0x0387, 0x0387, prMidLetter}, // Po GREEK ANO TELEIA {0x0388, 0x038A, prALetter}, // L& [3] GREEK CAPITAL LETTER EPSILON WITH TONOS..GREEK CAPITAL LETTER IOTA WITH TONOS {0x038C, 0x038C, prALetter}, // L& GREEK CAPITAL LETTER OMICRON WITH TONOS {0x038E, 0x03A1, prALetter}, // L& [20] GREEK CAPITAL LETTER UPSILON WITH TONOS..GREEK CAPITAL LETTER RHO {0x03A3, 0x03F5, prALetter}, // L& [83] GREEK CAPITAL LETTER SIGMA..GREEK LUNATE EPSILON SYMBOL {0x03F7, 0x0481, prALetter}, // L& [139] GREEK CAPITAL LETTER SHO..CYRILLIC SMALL LETTER KOPPA {0x0483, 0x0487, prExtend}, // Mn [5] COMBINING CYRILLIC TITLO..COMBINING CYRILLIC POKRYTIE {0x0488, 0x0489, prExtend}, // Me [2] COMBINING CYRILLIC HUNDRED THOUSANDS SIGN..COMBINING CYRILLIC MILLIONS SIGN {0x048A, 0x052F, prALetter}, // L& [166] CYRILLIC CAPITAL LETTER SHORT I WITH TAIL..CYRILLIC SMALL LETTER EL WITH DESCENDER {0x0531, 0x0556, prALetter}, // L& [38] ARMENIAN CAPITAL LETTER AYB..ARMENIAN CAPITAL LETTER FEH {0x0559, 0x0559, prALetter}, // Lm ARMENIAN MODIFIER LETTER LEFT HALF RING {0x055A, 0x055C, prALetter}, // Po [3] ARMENIAN APOSTROPHE..ARMENIAN EXCLAMATION MARK {0x055E, 0x055E, prALetter}, // Po ARMENIAN QUESTION MARK {0x055F, 0x055F, prMidLetter}, // Po ARMENIAN ABBREVIATION MARK {0x0560, 0x0588, prALetter}, // L& [41] ARMENIAN SMALL LETTER TURNED AYB..ARMENIAN SMALL LETTER YI WITH STROKE {0x0589, 0x0589, prMidNum}, // Po ARMENIAN FULL STOP {0x058A, 0x058A, prALetter}, // Pd ARMENIAN HYPHEN {0x0591, 0x05BD, prExtend}, // Mn [45] HEBREW ACCENT ETNAHTA..HEBREW POINT METEG {0x05BF, 0x05BF, prExtend}, // Mn HEBREW POINT RAFE {0x05C1, 0x05C2, prExtend}, // Mn [2] HEBREW POINT SHIN DOT..HEBREW POINT SIN DOT {0x05C4, 0x05C5, prExtend}, // Mn [2] HEBREW MARK UPPER DOT..HEBREW MARK LOWER DOT {0x05C7, 0x05C7, prExtend}, // Mn HEBREW POINT QAMATS QATAN {0x05D0, 0x05EA, prHebrewLetter}, // Lo [27] HEBREW LETTER ALEF..HEBREW LETTER TAV {0x05EF, 0x05F2, prHebrewLetter}, // Lo [4] HEBREW YOD TRIANGLE..HEBREW LIGATURE YIDDISH DOUBLE YOD {0x05F3, 0x05F3, prALetter}, // Po HEBREW PUNCTUATION GERESH {0x05F4, 0x05F4, prMidLetter}, // Po HEBREW PUNCTUATION GERSHAYIM {0x0600, 0x0605, prFormat}, // Cf [6] ARABIC NUMBER SIGN..ARABIC NUMBER MARK ABOVE {0x060C, 0x060D, prMidNum}, // Po [2] ARABIC COMMA..ARABIC DATE SEPARATOR {0x0610, 0x061A, prExtend}, // Mn [11] ARABIC SIGN SALLALLAHOU ALAYHE WASSALLAM..ARABIC SMALL KASRA {0x061C, 0x061C, prFormat}, // Cf ARABIC LETTER MARK {0x0620, 0x063F, prALetter}, // Lo [32] ARABIC LETTER KASHMIRI YEH..ARABIC LETTER FARSI YEH WITH THREE DOTS ABOVE {0x0640, 0x0640, prALetter}, // Lm ARABIC TATWEEL {0x0641, 0x064A, prALetter}, // Lo [10] ARABIC LETTER FEH..ARABIC LETTER YEH {0x064B, 0x065F, prExtend}, // Mn [21] ARABIC FATHATAN..ARABIC WAVY HAMZA BELOW {0x0660, 0x0669, prNumeric}, // Nd [10] ARABIC-INDIC DIGIT ZERO..ARABIC-INDIC DIGIT NINE {0x066B, 0x066B, prNumeric}, // Po ARABIC DECIMAL SEPARATOR {0x066C, 0x066C, prMidNum}, // Po ARABIC THOUSANDS SEPARATOR {0x066E, 0x066F, prALetter}, // Lo [2] ARABIC LETTER DOTLESS BEH..ARABIC LETTER DOTLESS QAF {0x0670, 0x0670, prExtend}, // Mn ARABIC LETTER SUPERSCRIPT ALEF {0x0671, 0x06D3, prALetter}, // Lo [99] ARABIC LETTER ALEF WASLA..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE {0x06D5, 0x06D5, prALetter}, // Lo ARABIC LETTER AE {0x06D6, 0x06DC, prExtend}, // Mn [7] ARABIC SMALL HIGH LIGATURE SAD WITH LAM WITH ALEF MAKSURA..ARABIC SMALL HIGH SEEN {0x06DD, 0x06DD, prFormat}, // Cf ARABIC END OF AYAH {0x06DF, 0x06E4, prExtend}, // Mn [6] ARABIC SMALL HIGH ROUNDED ZERO..ARABIC SMALL HIGH MADDA {0x06E5, 0x06E6, prALetter}, // Lm [2] ARABIC SMALL WAW..ARABIC SMALL YEH {0x06E7, 0x06E8, prExtend}, // Mn [2] ARABIC SMALL HIGH YEH..ARABIC SMALL HIGH NOON {0x06EA, 0x06ED, prExtend}, // Mn [4] ARABIC EMPTY CENTRE LOW STOP..ARABIC SMALL LOW MEEM {0x06EE, 0x06EF, prALetter}, // Lo [2] ARABIC LETTER DAL WITH INVERTED V..ARABIC LETTER REH WITH INVERTED V {0x06F0, 0x06F9, prNumeric}, // Nd [10] EXTENDED ARABIC-INDIC DIGIT ZERO..EXTENDED ARABIC-INDIC DIGIT NINE {0x06FA, 0x06FC, prALetter}, // Lo [3] ARABIC LETTER SHEEN WITH DOT BELOW..ARABIC LETTER GHAIN WITH DOT BELOW {0x06FF, 0x06FF, prALetter}, // Lo ARABIC LETTER HEH WITH INVERTED V {0x070F, 0x070F, prFormat}, // Cf SYRIAC ABBREVIATION MARK {0x0710, 0x0710, prALetter}, // Lo SYRIAC LETTER ALAPH {0x0711, 0x0711, prExtend}, // Mn SYRIAC LETTER SUPERSCRIPT ALAPH {0x0712, 0x072F, prALetter}, // Lo [30] SYRIAC LETTER BETH..SYRIAC LETTER PERSIAN DHALATH {0x0730, 0x074A, prExtend}, // Mn [27] SYRIAC PTHAHA ABOVE..SYRIAC BARREKH {0x074D, 0x07A5, prALetter}, // Lo [89] SYRIAC LETTER SOGDIAN ZHAIN..THAANA LETTER WAAVU {0x07A6, 0x07B0, prExtend}, // Mn [11] THAANA ABAFILI..THAANA SUKUN {0x07B1, 0x07B1, prALetter}, // Lo THAANA LETTER NAA {0x07C0, 0x07C9, prNumeric}, // Nd [10] NKO DIGIT ZERO..NKO DIGIT NINE {0x07CA, 0x07EA, prALetter}, // Lo [33] NKO LETTER A..NKO LETTER JONA RA {0x07EB, 0x07F3, prExtend}, // Mn [9] NKO COMBINING SHORT HIGH TONE..NKO COMBINING DOUBLE DOT ABOVE {0x07F4, 0x07F5, prALetter}, // Lm [2] NKO HIGH TONE APOSTROPHE..NKO LOW TONE APOSTROPHE {0x07F8, 0x07F8, prMidNum}, // Po NKO COMMA {0x07FA, 0x07FA, prALetter}, // Lm NKO LAJANYALAN {0x07FD, 0x07FD, prExtend}, // Mn NKO DANTAYALAN {0x0800, 0x0815, prALetter}, // Lo [22] SAMARITAN LETTER ALAF..SAMARITAN LETTER TAAF {0x0816, 0x0819, prExtend}, // Mn [4] SAMARITAN MARK IN..SAMARITAN MARK DAGESH {0x081A, 0x081A, prALetter}, // Lm SAMARITAN MODIFIER LETTER EPENTHETIC YUT {0x081B, 0x0823, prExtend}, // Mn [9] SAMARITAN MARK EPENTHETIC YUT..SAMARITAN VOWEL SIGN A {0x0824, 0x0824, prALetter}, // Lm SAMARITAN MODIFIER LETTER SHORT A {0x0825, 0x0827, prExtend}, // Mn [3] SAMARITAN VOWEL SIGN SHORT A..SAMARITAN VOWEL SIGN U {0x0828, 0x0828, prALetter}, // Lm SAMARITAN MODIFIER LETTER I {0x0829, 0x082D, prExtend}, // Mn [5] SAMARITAN VOWEL SIGN LONG I..SAMARITAN MARK NEQUDAA {0x0840, 0x0858, prALetter}, // Lo [25] MANDAIC LETTER HALQA..MANDAIC LETTER AIN {0x0859, 0x085B, prExtend}, // Mn [3] MANDAIC AFFRICATION MARK..MANDAIC GEMINATION MARK {0x0860, 0x086A, prALetter}, // Lo [11] SYRIAC LETTER MALAYALAM NGA..SYRIAC LETTER MALAYALAM SSA {0x0870, 0x0887, prALetter}, // Lo [24] ARABIC LETTER ALEF WITH ATTACHED FATHA..ARABIC BASELINE ROUND DOT {0x0889, 0x088E, prALetter}, // Lo [6] ARABIC LETTER NOON WITH INVERTED SMALL V..ARABIC VERTICAL TAIL {0x0890, 0x0891, prFormat}, // Cf [2] ARABIC POUND MARK ABOVE..ARABIC PIASTRE MARK ABOVE {0x0898, 0x089F, prExtend}, // Mn [8] ARABIC SMALL HIGH WORD AL-JUZ..ARABIC HALF MADDA OVER MADDA {0x08A0, 0x08C8, prALetter}, // Lo [41] ARABIC LETTER BEH WITH SMALL V BELOW..ARABIC LETTER GRAF {0x08C9, 0x08C9, prALetter}, // Lm ARABIC SMALL FARSI YEH {0x08CA, 0x08E1, prExtend}, // Mn [24] ARABIC SMALL HIGH FARSI YEH..ARABIC SMALL HIGH SIGN SAFHA {0x08E2, 0x08E2, prFormat}, // Cf ARABIC DISPUTED END OF AYAH {0x08E3, 0x0902, prExtend}, // Mn [32] ARABIC TURNED DAMMA BELOW..DEVANAGARI SIGN ANUSVARA {0x0903, 0x0903, prExtend}, // Mc DEVANAGARI SIGN VISARGA {0x0904, 0x0939, prALetter}, // Lo [54] DEVANAGARI LETTER SHORT A..DEVANAGARI LETTER HA {0x093A, 0x093A, prExtend}, // Mn DEVANAGARI VOWEL SIGN OE {0x093B, 0x093B, prExtend}, // Mc DEVANAGARI VOWEL SIGN OOE {0x093C, 0x093C, prExtend}, // Mn DEVANAGARI SIGN NUKTA {0x093D, 0x093D, prALetter}, // Lo DEVANAGARI SIGN AVAGRAHA {0x093E, 0x0940, prExtend}, // Mc [3] DEVANAGARI VOWEL SIGN AA..DEVANAGARI VOWEL SIGN II {0x0941, 0x0948, prExtend}, // Mn [8] DEVANAGARI VOWEL SIGN U..DEVANAGARI VOWEL SIGN AI {0x0949, 0x094C, prExtend}, // Mc [4] DEVANAGARI VOWEL SIGN CANDRA O..DEVANAGARI VOWEL SIGN AU {0x094D, 0x094D, prExtend}, // Mn DEVANAGARI SIGN VIRAMA {0x094E, 0x094F, prExtend}, // Mc [2] DEVANAGARI VOWEL SIGN PRISHTHAMATRA E..DEVANAGARI VOWEL SIGN AW {0x0950, 0x0950, prALetter}, // Lo DEVANAGARI OM {0x0951, 0x0957, prExtend}, // Mn [7] DEVANAGARI STRESS SIGN UDATTA..DEVANAGARI VOWEL SIGN UUE {0x0958, 0x0961, prALetter}, // Lo [10] DEVANAGARI LETTER QA..DEVANAGARI LETTER VOCALIC LL {0x0962, 0x0963, prExtend}, // Mn [2] DEVANAGARI VOWEL SIGN VOCALIC L..DEVANAGARI VOWEL SIGN VOCALIC LL {0x0966, 0x096F, prNumeric}, // Nd [10] DEVANAGARI DIGIT ZERO..DEVANAGARI DIGIT NINE {0x0971, 0x0971, prALetter}, // Lm DEVANAGARI SIGN HIGH SPACING DOT {0x0972, 0x0980, prALetter}, // Lo [15] DEVANAGARI LETTER CANDRA A..BENGALI ANJI {0x0981, 0x0981, prExtend}, // Mn BENGALI SIGN CANDRABINDU {0x0982, 0x0983, prExtend}, // Mc [2] BENGALI SIGN ANUSVARA..BENGALI SIGN VISARGA {0x0985, 0x098C, prALetter}, // Lo [8] BENGALI LETTER A..BENGALI LETTER VOCALIC L {0x098F, 0x0990, prALetter}, // Lo [2] BENGALI LETTER E..BENGALI LETTER AI {0x0993, 0x09A8, prALetter}, // Lo [22] BENGALI LETTER O..BENGALI LETTER NA {0x09AA, 0x09B0, prALetter}, // Lo [7] BENGALI LETTER PA..BENGALI LETTER RA {0x09B2, 0x09B2, prALetter}, // Lo BENGALI LETTER LA {0x09B6, 0x09B9, prALetter}, // Lo [4] BENGALI LETTER SHA..BENGALI LETTER HA {0x09BC, 0x09BC, prExtend}, // Mn BENGALI SIGN NUKTA {0x09BD, 0x09BD, prALetter}, // Lo BENGALI SIGN AVAGRAHA {0x09BE, 0x09C0, prExtend}, // Mc [3] BENGALI VOWEL SIGN AA..BENGALI VOWEL SIGN II {0x09C1, 0x09C4, prExtend}, // Mn [4] BENGALI VOWEL SIGN U..BENGALI VOWEL SIGN VOCALIC RR {0x09C7, 0x09C8, prExtend}, // Mc [2] BENGALI VOWEL SIGN E..BENGALI VOWEL SIGN AI {0x09CB, 0x09CC, prExtend}, // Mc [2] BENGALI VOWEL SIGN O..BENGALI VOWEL SIGN AU {0x09CD, 0x09CD, prExtend}, // Mn BENGALI SIGN VIRAMA {0x09CE, 0x09CE, prALetter}, // Lo BENGALI LETTER KHANDA TA {0x09D7, 0x09D7, prExtend}, // Mc BENGALI AU LENGTH MARK {0x09DC, 0x09DD, prALetter}, // Lo [2] BENGALI LETTER RRA..BENGALI LETTER RHA {0x09DF, 0x09E1, prALetter}, // Lo [3] BENGALI LETTER YYA..BENGALI LETTER VOCALIC LL {0x09E2, 0x09E3, prExtend}, // Mn [2] BENGALI VOWEL SIGN VOCALIC L..BENGALI VOWEL SIGN VOCALIC LL {0x09E6, 0x09EF, prNumeric}, // Nd [10] BENGALI DIGIT ZERO..BENGALI DIGIT NINE {0x09F0, 0x09F1, prALetter}, // Lo [2] BENGALI LETTER RA WITH MIDDLE DIAGONAL..BENGALI LETTER RA WITH LOWER DIAGONAL {0x09FC, 0x09FC, prALetter}, // Lo BENGALI LETTER VEDIC ANUSVARA {0x09FE, 0x09FE, prExtend}, // Mn BENGALI SANDHI MARK {0x0A01, 0x0A02, prExtend}, // Mn [2] GURMUKHI SIGN ADAK BINDI..GURMUKHI SIGN BINDI {0x0A03, 0x0A03, prExtend}, // Mc GURMUKHI SIGN VISARGA {0x0A05, 0x0A0A, prALetter}, // Lo [6] GURMUKHI LETTER A..GURMUKHI LETTER UU {0x0A0F, 0x0A10, prALetter}, // Lo [2] GURMUKHI LETTER EE..GURMUKHI LETTER AI {0x0A13, 0x0A28, prALetter}, // Lo [22] GURMUKHI LETTER OO..GURMUKHI LETTER NA {0x0A2A, 0x0A30, prALetter}, // Lo [7] GURMUKHI LETTER PA..GURMUKHI LETTER RA {0x0A32, 0x0A33, prALetter}, // Lo [2] GURMUKHI LETTER LA..GURMUKHI LETTER LLA {0x0A35, 0x0A36, prALetter}, // Lo [2] GURMUKHI LETTER VA..GURMUKHI LETTER SHA {0x0A38, 0x0A39, prALetter}, // Lo [2] GURMUKHI LETTER SA..GURMUKHI LETTER HA {0x0A3C, 0x0A3C, prExtend}, // Mn GURMUKHI SIGN NUKTA {0x0A3E, 0x0A40, prExtend}, // Mc [3] GURMUKHI VOWEL SIGN AA..GURMUKHI VOWEL SIGN II {0x0A41, 0x0A42, prExtend}, // Mn [2] GURMUKHI VOWEL SIGN U..GURMUKHI VOWEL SIGN UU {0x0A47, 0x0A48, prExtend}, // Mn [2] GURMUKHI VOWEL SIGN EE..GURMUKHI VOWEL SIGN AI {0x0A4B, 0x0A4D, prExtend}, // Mn [3] GURMUKHI VOWEL SIGN OO..GURMUKHI SIGN VIRAMA {0x0A51, 0x0A51, prExtend}, // Mn GURMUKHI SIGN UDAAT {0x0A59, 0x0A5C, prALetter}, // Lo [4] GURMUKHI LETTER KHHA..GURMUKHI LETTER RRA {0x0A5E, 0x0A5E, prALetter}, // Lo GURMUKHI LETTER FA {0x0A66, 0x0A6F, prNumeric}, // Nd [10] GURMUKHI DIGIT ZERO..GURMUKHI DIGIT NINE {0x0A70, 0x0A71, prExtend}, // Mn [2] GURMUKHI TIPPI..GURMUKHI ADDAK {0x0A72, 0x0A74, prALetter}, // Lo [3] GURMUKHI IRI..GURMUKHI EK ONKAR {0x0A75, 0x0A75, prExtend}, // Mn GURMUKHI SIGN YAKASH {0x0A81, 0x0A82, prExtend}, // Mn [2] GUJARATI SIGN CANDRABINDU..GUJARATI SIGN ANUSVARA {0x0A83, 0x0A83, prExtend}, // Mc GUJARATI SIGN VISARGA {0x0A85, 0x0A8D, prALetter}, // Lo [9] GUJARATI LETTER A..GUJARATI VOWEL CANDRA E {0x0A8F, 0x0A91, prALetter}, // Lo [3] GUJARATI LETTER E..GUJARATI VOWEL CANDRA O {0x0A93, 0x0AA8, prALetter}, // Lo [22] GUJARATI LETTER O..GUJARATI LETTER NA {0x0AAA, 0x0AB0, prALetter}, // Lo [7] GUJARATI LETTER PA..GUJARATI LETTER RA {0x0AB2, 0x0AB3, prALetter}, // Lo [2] GUJARATI LETTER LA..GUJARATI LETTER LLA {0x0AB5, 0x0AB9, prALetter}, // Lo [5] GUJARATI LETTER VA..GUJARATI LETTER HA {0x0ABC, 0x0ABC, prExtend}, // Mn GUJARATI SIGN NUKTA {0x0ABD, 0x0ABD, prALetter}, // Lo GUJARATI SIGN AVAGRAHA {0x0ABE, 0x0AC0, prExtend}, // Mc [3] GUJARATI VOWEL SIGN AA..GUJARATI VOWEL SIGN II {0x0AC1, 0x0AC5, prExtend}, // Mn [5] GUJARATI VOWEL SIGN U..GUJARATI VOWEL SIGN CANDRA E {0x0AC7, 0x0AC8, prExtend}, // Mn [2] GUJARATI VOWEL SIGN E..GUJARATI VOWEL SIGN AI {0x0AC9, 0x0AC9, prExtend}, // Mc GUJARATI VOWEL SIGN CANDRA O {0x0ACB, 0x0ACC, prExtend}, // Mc [2] GUJARATI VOWEL SIGN O..GUJARATI VOWEL SIGN AU {0x0ACD, 0x0ACD, prExtend}, // Mn GUJARATI SIGN VIRAMA {0x0AD0, 0x0AD0, prALetter}, // Lo GUJARATI OM {0x0AE0, 0x0AE1, prALetter}, // Lo [2] GUJARATI LETTER VOCALIC RR..GUJARATI LETTER VOCALIC LL {0x0AE2, 0x0AE3, prExtend}, // Mn [2] GUJARATI VOWEL SIGN VOCALIC L..GUJARATI VOWEL SIGN VOCALIC LL {0x0AE6, 0x0AEF, prNumeric}, // Nd [10] GUJARATI DIGIT ZERO..GUJARATI DIGIT NINE {0x0AF9, 0x0AF9, prALetter}, // Lo GUJARATI LETTER ZHA {0x0AFA, 0x0AFF, prExtend}, // Mn [6] GUJARATI SIGN SUKUN..GUJARATI SIGN TWO-CIRCLE NUKTA ABOVE {0x0B01, 0x0B01, prExtend}, // Mn ORIYA SIGN CANDRABINDU {0x0B02, 0x0B03, prExtend}, // Mc [2] ORIYA SIGN ANUSVARA..ORIYA SIGN VISARGA {0x0B05, 0x0B0C, prALetter}, // Lo [8] ORIYA LETTER A..ORIYA LETTER VOCALIC L {0x0B0F, 0x0B10, prALetter}, // Lo [2] ORIYA LETTER E..ORIYA LETTER AI {0x0B13, 0x0B28, prALetter}, // Lo [22] ORIYA LETTER O..ORIYA LETTER NA {0x0B2A, 0x0B30, prALetter}, // Lo [7] ORIYA LETTER PA..ORIYA LETTER RA {0x0B32, 0x0B33, prALetter}, // Lo [2] ORIYA LETTER LA..ORIYA LETTER LLA {0x0B35, 0x0B39, prALetter}, // Lo [5] ORIYA LETTER VA..ORIYA LETTER HA {0x0B3C, 0x0B3C, prExtend}, // Mn ORIYA SIGN NUKTA {0x0B3D, 0x0B3D, prALetter}, // Lo ORIYA SIGN AVAGRAHA {0x0B3E, 0x0B3E, prExtend}, // Mc ORIYA VOWEL SIGN AA {0x0B3F, 0x0B3F, prExtend}, // Mn ORIYA VOWEL SIGN I {0x0B40, 0x0B40, prExtend}, // Mc ORIYA VOWEL SIGN II {0x0B41, 0x0B44, prExtend}, // Mn [4] ORIYA VOWEL SIGN U..ORIYA VOWEL SIGN VOCALIC RR {0x0B47, 0x0B48, prExtend}, // Mc [2] ORIYA VOWEL SIGN E..ORIYA VOWEL SIGN AI {0x0B4B, 0x0B4C, prExtend}, // Mc [2] ORIYA VOWEL SIGN O..ORIYA VOWEL SIGN AU {0x0B4D, 0x0B4D, prExtend}, // Mn ORIYA SIGN VIRAMA {0x0B55, 0x0B56, prExtend}, // Mn [2] ORIYA SIGN OVERLINE..ORIYA AI LENGTH MARK {0x0B57, 0x0B57, prExtend}, // Mc ORIYA AU LENGTH MARK {0x0B5C, 0x0B5D, prALetter}, // Lo [2] ORIYA LETTER RRA..ORIYA LETTER RHA {0x0B5F, 0x0B61, prALetter}, // Lo [3] ORIYA LETTER YYA..ORIYA LETTER VOCALIC LL {0x0B62, 0x0B63, prExtend}, // Mn [2] ORIYA VOWEL SIGN VOCALIC L..ORIYA VOWEL SIGN VOCALIC LL {0x0B66, 0x0B6F, prNumeric}, // Nd [10] ORIYA DIGIT ZERO..ORIYA DIGIT NINE {0x0B71, 0x0B71, prALetter}, // Lo ORIYA LETTER WA {0x0B82, 0x0B82, prExtend}, // Mn TAMIL SIGN ANUSVARA {0x0B83, 0x0B83, prALetter}, // Lo TAMIL SIGN VISARGA {0x0B85, 0x0B8A, prALetter}, // Lo [6] TAMIL LETTER A..TAMIL LETTER UU {0x0B8E, 0x0B90, prALetter}, // Lo [3] TAMIL LETTER E..TAMIL LETTER AI {0x0B92, 0x0B95, prALetter}, // Lo [4] TAMIL LETTER O..TAMIL LETTER KA {0x0B99, 0x0B9A, prALetter}, // Lo [2] TAMIL LETTER NGA..TAMIL LETTER CA {0x0B9C, 0x0B9C, prALetter}, // Lo TAMIL LETTER JA {0x0B9E, 0x0B9F, prALetter}, // Lo [2] TAMIL LETTER NYA..TAMIL LETTER TTA {0x0BA3, 0x0BA4, prALetter}, // Lo [2] TAMIL LETTER NNA..TAMIL LETTER TA {0x0BA8, 0x0BAA, prALetter}, // Lo [3] TAMIL LETTER NA..TAMIL LETTER PA {0x0BAE, 0x0BB9, prALetter}, // Lo [12] TAMIL LETTER MA..TAMIL LETTER HA {0x0BBE, 0x0BBF, prExtend}, // Mc [2] TAMIL VOWEL SIGN AA..TAMIL VOWEL SIGN I {0x0BC0, 0x0BC0, prExtend}, // Mn TAMIL VOWEL SIGN II {0x0BC1, 0x0BC2, prExtend}, // Mc [2] TAMIL VOWEL SIGN U..TAMIL VOWEL SIGN UU {0x0BC6, 0x0BC8, prExtend}, // Mc [3] TAMIL VOWEL SIGN E..TAMIL VOWEL SIGN AI {0x0BCA, 0x0BCC, prExtend}, // Mc [3] TAMIL VOWEL SIGN O..TAMIL VOWEL SIGN AU {0x0BCD, 0x0BCD, prExtend}, // Mn TAMIL SIGN VIRAMA {0x0BD0, 0x0BD0, prALetter}, // Lo TAMIL OM {0x0BD7, 0x0BD7, prExtend}, // Mc TAMIL AU LENGTH MARK {0x0BE6, 0x0BEF, prNumeric}, // Nd [10] TAMIL DIGIT ZERO..TAMIL DIGIT NINE {0x0C00, 0x0C00, prExtend}, // Mn TELUGU SIGN COMBINING CANDRABINDU ABOVE {0x0C01, 0x0C03, prExtend}, // Mc [3] TELUGU SIGN CANDRABINDU..TELUGU SIGN VISARGA {0x0C04, 0x0C04, prExtend}, // Mn TELUGU SIGN COMBINING ANUSVARA ABOVE {0x0C05, 0x0C0C, prALetter}, // Lo [8] TELUGU LETTER A..TELUGU LETTER VOCALIC L {0x0C0E, 0x0C10, prALetter}, // Lo [3] TELUGU LETTER E..TELUGU LETTER AI {0x0C12, 0x0C28, prALetter}, // Lo [23] TELUGU LETTER O..TELUGU LETTER NA {0x0C2A, 0x0C39, prALetter}, // Lo [16] TELUGU LETTER PA..TELUGU LETTER HA {0x0C3C, 0x0C3C, prExtend}, // Mn TELUGU SIGN NUKTA {0x0C3D, 0x0C3D, prALetter}, // Lo TELUGU SIGN AVAGRAHA {0x0C3E, 0x0C40, prExtend}, // Mn [3] TELUGU VOWEL SIGN AA..TELUGU VOWEL SIGN II {0x0C41, 0x0C44, prExtend}, // Mc [4] TELUGU VOWEL SIGN U..TELUGU VOWEL SIGN VOCALIC RR {0x0C46, 0x0C48, prExtend}, // Mn [3] TELUGU VOWEL SIGN E..TELUGU VOWEL SIGN AI {0x0C4A, 0x0C4D, prExtend}, // Mn [4] TELUGU VOWEL SIGN O..TELUGU SIGN VIRAMA {0x0C55, 0x0C56, prExtend}, // Mn [2] TELUGU LENGTH MARK..TELUGU AI LENGTH MARK {0x0C58, 0x0C5A, prALetter}, // Lo [3] TELUGU LETTER TSA..TELUGU LETTER RRRA {0x0C5D, 0x0C5D, prALetter}, // Lo TELUGU LETTER NAKAARA POLLU {0x0C60, 0x0C61, prALetter}, // Lo [2] TELUGU LETTER VOCALIC RR..TELUGU LETTER VOCALIC LL {0x0C62, 0x0C63, prExtend}, // Mn [2] TELUGU VOWEL SIGN VOCALIC L..TELUGU VOWEL SIGN VOCALIC LL {0x0C66, 0x0C6F, prNumeric}, // Nd [10] TELUGU DIGIT ZERO..TELUGU DIGIT NINE {0x0C80, 0x0C80, prALetter}, // Lo KANNADA SIGN SPACING CANDRABINDU {0x0C81, 0x0C81, prExtend}, // Mn KANNADA SIGN CANDRABINDU {0x0C82, 0x0C83, prExtend}, // Mc [2] KANNADA SIGN ANUSVARA..KANNADA SIGN VISARGA {0x0C85, 0x0C8C, prALetter}, // Lo [8] KANNADA LETTER A..KANNADA LETTER VOCALIC L {0x0C8E, 0x0C90, prALetter}, // Lo [3] KANNADA LETTER E..KANNADA LETTER AI {0x0C92, 0x0CA8, prALetter}, // Lo [23] KANNADA LETTER O..KANNADA LETTER NA {0x0CAA, 0x0CB3, prALetter}, // Lo [10] KANNADA LETTER PA..KANNADA LETTER LLA {0x0CB5, 0x0CB9, prALetter}, // Lo [5] KANNADA LETTER VA..KANNADA LETTER HA {0x0CBC, 0x0CBC, prExtend}, // Mn KANNADA SIGN NUKTA {0x0CBD, 0x0CBD, prALetter}, // Lo KANNADA SIGN AVAGRAHA {0x0CBE, 0x0CBE, prExtend}, // Mc KANNADA VOWEL SIGN AA {0x0CBF, 0x0CBF, prExtend}, // Mn KANNADA VOWEL SIGN I {0x0CC0, 0x0CC4, prExtend}, // Mc [5] KANNADA VOWEL SIGN II..KANNADA VOWEL SIGN VOCALIC RR {0x0CC6, 0x0CC6, prExtend}, // Mn KANNADA VOWEL SIGN E {0x0CC7, 0x0CC8, prExtend}, // Mc [2] KANNADA VOWEL SIGN EE..KANNADA VOWEL SIGN AI {0x0CCA, 0x0CCB, prExtend}, // Mc [2] KANNADA VOWEL SIGN O..KANNADA VOWEL SIGN OO {0x0CCC, 0x0CCD, prExtend}, // Mn [2] KANNADA VOWEL SIGN AU..KANNADA SIGN VIRAMA {0x0CD5, 0x0CD6, prExtend}, // Mc [2] KANNADA LENGTH MARK..KANNADA AI LENGTH MARK {0x0CDD, 0x0CDE, prALetter}, // Lo [2] KANNADA LETTER NAKAARA POLLU..KANNADA LETTER FA {0x0CE0, 0x0CE1, prALetter}, // Lo [2] KANNADA LETTER VOCALIC RR..KANNADA LETTER VOCALIC LL {0x0CE2, 0x0CE3, prExtend}, // Mn [2] KANNADA VOWEL SIGN VOCALIC L..KANNADA VOWEL SIGN VOCALIC LL {0x0CE6, 0x0CEF, prNumeric}, // Nd [10] KANNADA DIGIT ZERO..KANNADA DIGIT NINE {0x0CF1, 0x0CF2, prALetter}, // Lo [2] KANNADA SIGN JIHVAMULIYA..KANNADA SIGN UPADHMANIYA {0x0CF3, 0x0CF3, prExtend}, // Mc KANNADA SIGN COMBINING ANUSVARA ABOVE RIGHT {0x0D00, 0x0D01, prExtend}, // Mn [2] MALAYALAM SIGN COMBINING ANUSVARA ABOVE..MALAYALAM SIGN CANDRABINDU {0x0D02, 0x0D03, prExtend}, // Mc [2] MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA {0x0D04, 0x0D0C, prALetter}, // Lo [9] MALAYALAM LETTER VEDIC ANUSVARA..MALAYALAM LETTER VOCALIC L {0x0D0E, 0x0D10, prALetter}, // Lo [3] MALAYALAM LETTER E..MALAYALAM LETTER AI {0x0D12, 0x0D3A, prALetter}, // Lo [41] MALAYALAM LETTER O..MALAYALAM LETTER TTTA {0x0D3B, 0x0D3C, prExtend}, // Mn [2] MALAYALAM SIGN VERTICAL BAR VIRAMA..MALAYALAM SIGN CIRCULAR VIRAMA {0x0D3D, 0x0D3D, prALetter}, // Lo MALAYALAM SIGN AVAGRAHA {0x0D3E, 0x0D40, prExtend}, // Mc [3] MALAYALAM VOWEL SIGN AA..MALAYALAM VOWEL SIGN II {0x0D41, 0x0D44, prExtend}, // Mn [4] MALAYALAM VOWEL SIGN U..MALAYALAM VOWEL SIGN VOCALIC RR {0x0D46, 0x0D48, prExtend}, // Mc [3] MALAYALAM VOWEL SIGN E..MALAYALAM VOWEL SIGN AI {0x0D4A, 0x0D4C, prExtend}, // Mc [3] MALAYALAM VOWEL SIGN O..MALAYALAM VOWEL SIGN AU {0x0D4D, 0x0D4D, prExtend}, // Mn MALAYALAM SIGN VIRAMA {0x0D4E, 0x0D4E, prALetter}, // Lo MALAYALAM LETTER DOT REPH {0x0D54, 0x0D56, prALetter}, // Lo [3] MALAYALAM LETTER CHILLU M..MALAYALAM LETTER CHILLU LLL {0x0D57, 0x0D57, prExtend}, // Mc MALAYALAM AU LENGTH MARK {0x0D5F, 0x0D61, prALetter}, // Lo [3] MALAYALAM LETTER ARCHAIC II..MALAYALAM LETTER VOCALIC LL {0x0D62, 0x0D63, prExtend}, // Mn [2] MALAYALAM VOWEL SIGN VOCALIC L..MALAYALAM VOWEL SIGN VOCALIC LL {0x0D66, 0x0D6F, prNumeric}, // Nd [10] MALAYALAM DIGIT ZERO..MALAYALAM DIGIT NINE {0x0D7A, 0x0D7F, prALetter}, // Lo [6] MALAYALAM LETTER CHILLU NN..MALAYALAM LETTER CHILLU K {0x0D81, 0x0D81, prExtend}, // Mn SINHALA SIGN CANDRABINDU {0x0D82, 0x0D83, prExtend}, // Mc [2] SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARGAYA {0x0D85, 0x0D96, prALetter}, // Lo [18] SINHALA LETTER AYANNA..SINHALA LETTER AUYANNA {0x0D9A, 0x0DB1, prALetter}, // Lo [24] SINHALA LETTER ALPAPRAANA KAYANNA..SINHALA LETTER DANTAJA NAYANNA {0x0DB3, 0x0DBB, prALetter}, // Lo [9] SINHALA LETTER SANYAKA DAYANNA..SINHALA LETTER RAYANNA {0x0DBD, 0x0DBD, prALetter}, // Lo SINHALA LETTER DANTAJA LAYANNA {0x0DC0, 0x0DC6, prALetter}, // Lo [7] SINHALA LETTER VAYANNA..SINHALA LETTER FAYANNA {0x0DCA, 0x0DCA, prExtend}, // Mn SINHALA SIGN AL-LAKUNA {0x0DCF, 0x0DD1, prExtend}, // Mc [3] SINHALA VOWEL SIGN AELA-PILLA..SINHALA VOWEL SIGN DIGA AEDA-PILLA {0x0DD2, 0x0DD4, prExtend}, // Mn [3] SINHALA VOWEL SIGN KETTI IS-PILLA..SINHALA VOWEL SIGN KETTI PAA-PILLA {0x0DD6, 0x0DD6, prExtend}, // Mn SINHALA VOWEL SIGN DIGA PAA-PILLA {0x0DD8, 0x0DDF, prExtend}, // Mc [8] SINHALA VOWEL SIGN GAETTA-PILLA..SINHALA VOWEL SIGN GAYANUKITTA {0x0DE6, 0x0DEF, prNumeric}, // Nd [10] SINHALA LITH DIGIT ZERO..SINHALA LITH DIGIT NINE {0x0DF2, 0x0DF3, prExtend}, // Mc [2] SINHALA VOWEL SIGN DIGA GAETTA-PILLA..SINHALA VOWEL SIGN DIGA GAYANUKITTA {0x0E31, 0x0E31, prExtend}, // Mn THAI CHARACTER MAI HAN-AKAT {0x0E34, 0x0E3A, prExtend}, // Mn [7] THAI CHARACTER SARA I..THAI CHARACTER PHINTHU {0x0E47, 0x0E4E, prExtend}, // Mn [8] THAI CHARACTER MAITAIKHU..THAI CHARACTER YAMAKKAN {0x0E50, 0x0E59, prNumeric}, // Nd [10] THAI DIGIT ZERO..THAI DIGIT NINE {0x0EB1, 0x0EB1, prExtend}, // Mn LAO VOWEL SIGN MAI KAN {0x0EB4, 0x0EBC, prExtend}, // Mn [9] LAO VOWEL SIGN I..LAO SEMIVOWEL SIGN LO {0x0EC8, 0x0ECE, prExtend}, // Mn [7] LAO TONE MAI EK..LAO YAMAKKAN {0x0ED0, 0x0ED9, prNumeric}, // Nd [10] LAO DIGIT ZERO..LAO DIGIT NINE {0x0F00, 0x0F00, prALetter}, // Lo TIBETAN SYLLABLE OM {0x0F18, 0x0F19, prExtend}, // Mn [2] TIBETAN ASTROLOGICAL SIGN -KHYUD PA..TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS {0x0F20, 0x0F29, prNumeric}, // Nd [10] TIBETAN DIGIT ZERO..TIBETAN DIGIT NINE {0x0F35, 0x0F35, prExtend}, // Mn TIBETAN MARK NGAS BZUNG NYI ZLA {0x0F37, 0x0F37, prExtend}, // Mn TIBETAN MARK NGAS BZUNG SGOR RTAGS {0x0F39, 0x0F39, prExtend}, // Mn TIBETAN MARK TSA -PHRU {0x0F3E, 0x0F3F, prExtend}, // Mc [2] TIBETAN SIGN YAR TSHES..TIBETAN SIGN MAR TSHES {0x0F40, 0x0F47, prALetter}, // Lo [8] TIBETAN LETTER KA..TIBETAN LETTER JA {0x0F49, 0x0F6C, prALetter}, // Lo [36] TIBETAN LETTER NYA..TIBETAN LETTER RRA {0x0F71, 0x0F7E, prExtend}, // Mn [14] TIBETAN VOWEL SIGN AA..TIBETAN SIGN RJES SU NGA RO {0x0F7F, 0x0F7F, prExtend}, // Mc TIBETAN SIGN RNAM BCAD {0x0F80, 0x0F84, prExtend}, // Mn [5] TIBETAN VOWEL SIGN REVERSED I..TIBETAN MARK HALANTA {0x0F86, 0x0F87, prExtend}, // Mn [2] TIBETAN SIGN LCI RTAGS..TIBETAN SIGN YANG RTAGS {0x0F88, 0x0F8C, prALetter}, // Lo [5] TIBETAN SIGN LCE TSA CAN..TIBETAN SIGN INVERTED MCHU CAN {0x0F8D, 0x0F97, prExtend}, // Mn [11] TIBETAN SUBJOINED SIGN LCE TSA CAN..TIBETAN SUBJOINED LETTER JA {0x0F99, 0x0FBC, prExtend}, // Mn [36] TIBETAN SUBJOINED LETTER NYA..TIBETAN SUBJOINED LETTER FIXED-FORM RA {0x0FC6, 0x0FC6, prExtend}, // Mn TIBETAN SYMBOL PADMA GDAN {0x102B, 0x102C, prExtend}, // Mc [2] MYANMAR VOWEL SIGN TALL AA..MYANMAR VOWEL SIGN AA {0x102D, 0x1030, prExtend}, // Mn [4] MYANMAR VOWEL SIGN I..MYANMAR VOWEL SIGN UU {0x1031, 0x1031, prExtend}, // Mc MYANMAR VOWEL SIGN E {0x1032, 0x1037, prExtend}, // Mn [6] MYANMAR VOWEL SIGN AI..MYANMAR SIGN DOT BELOW {0x1038, 0x1038, prExtend}, // Mc MYANMAR SIGN VISARGA {0x1039, 0x103A, prExtend}, // Mn [2] MYANMAR SIGN VIRAMA..MYANMAR SIGN ASAT {0x103B, 0x103C, prExtend}, // Mc [2] MYANMAR CONSONANT SIGN MEDIAL YA..MYANMAR CONSONANT SIGN MEDIAL RA {0x103D, 0x103E, prExtend}, // Mn [2] MYANMAR CONSONANT SIGN MEDIAL WA..MYANMAR CONSONANT SIGN MEDIAL HA {0x1040, 0x1049, prNumeric}, // Nd [10] MYANMAR DIGIT ZERO..MYANMAR DIGIT NINE {0x1056, 0x1057, prExtend}, // Mc [2] MYANMAR VOWEL SIGN VOCALIC R..MYANMAR VOWEL SIGN VOCALIC RR {0x1058, 0x1059, prExtend}, // Mn [2] MYANMAR VOWEL SIGN VOCALIC L..MYANMAR VOWEL SIGN VOCALIC LL {0x105E, 0x1060, prExtend}, // Mn [3] MYANMAR CONSONANT SIGN MON MEDIAL NA..MYANMAR CONSONANT SIGN MON MEDIAL LA {0x1062, 0x1064, prExtend}, // Mc [3] MYANMAR VOWEL SIGN SGAW KAREN EU..MYANMAR TONE MARK SGAW KAREN KE PHO {0x1067, 0x106D, prExtend}, // Mc [7] MYANMAR VOWEL SIGN WESTERN PWO KAREN EU..MYANMAR SIGN WESTERN PWO KAREN TONE-5 {0x1071, 0x1074, prExtend}, // Mn [4] MYANMAR VOWEL SIGN GEBA KAREN I..MYANMAR VOWEL SIGN KAYAH EE {0x1082, 0x1082, prExtend}, // Mn MYANMAR CONSONANT SIGN SHAN MEDIAL WA {0x1083, 0x1084, prExtend}, // Mc [2] MYANMAR VOWEL SIGN SHAN AA..MYANMAR VOWEL SIGN SHAN E {0x1085, 0x1086, prExtend}, // Mn [2] MYANMAR VOWEL SIGN SHAN E ABOVE..MYANMAR VOWEL SIGN SHAN FINAL Y {0x1087, 0x108C, prExtend}, // Mc [6] MYANMAR SIGN SHAN TONE-2..MYANMAR SIGN SHAN COUNCIL TONE-3 {0x108D, 0x108D, prExtend}, // Mn MYANMAR SIGN SHAN COUNCIL EMPHATIC TONE {0x108F, 0x108F, prExtend}, // Mc MYANMAR SIGN RUMAI PALAUNG TONE-5 {0x1090, 0x1099, prNumeric}, // Nd [10] MYANMAR SHAN DIGIT ZERO..MYANMAR SHAN DIGIT NINE {0x109A, 0x109C, prExtend}, // Mc [3] MYANMAR SIGN KHAMTI TONE-1..MYANMAR VOWEL SIGN AITON A {0x109D, 0x109D, prExtend}, // Mn MYANMAR VOWEL SIGN AITON AI {0x10A0, 0x10C5, prALetter}, // L& [38] GEORGIAN CAPITAL LETTER AN..GEORGIAN CAPITAL LETTER HOE {0x10C7, 0x10C7, prALetter}, // L& GEORGIAN CAPITAL LETTER YN {0x10CD, 0x10CD, prALetter}, // L& GEORGIAN CAPITAL LETTER AEN {0x10D0, 0x10FA, prALetter}, // L& [43] GEORGIAN LETTER AN..GEORGIAN LETTER AIN {0x10FC, 0x10FC, prALetter}, // Lm MODIFIER LETTER GEORGIAN NAR {0x10FD, 0x10FF, prALetter}, // L& [3] GEORGIAN LETTER AEN..GEORGIAN LETTER LABIAL SIGN {0x1100, 0x1248, prALetter}, // Lo [329] HANGUL CHOSEONG KIYEOK..ETHIOPIC SYLLABLE QWA {0x124A, 0x124D, prALetter}, // Lo [4] ETHIOPIC SYLLABLE QWI..ETHIOPIC SYLLABLE QWE {0x1250, 0x1256, prALetter}, // Lo [7] ETHIOPIC SYLLABLE QHA..ETHIOPIC SYLLABLE QHO {0x1258, 0x1258, prALetter}, // Lo ETHIOPIC SYLLABLE QHWA {0x125A, 0x125D, prALetter}, // Lo [4] ETHIOPIC SYLLABLE QHWI..ETHIOPIC SYLLABLE QHWE {0x1260, 0x1288, prALetter}, // Lo [41] ETHIOPIC SYLLABLE BA..ETHIOPIC SYLLABLE XWA {0x128A, 0x128D, prALetter}, // Lo [4] ETHIOPIC SYLLABLE XWI..ETHIOPIC SYLLABLE XWE {0x1290, 0x12B0, prALetter}, // Lo [33] ETHIOPIC SYLLABLE NA..ETHIOPIC SYLLABLE KWA {0x12B2, 0x12B5, prALetter}, // Lo [4] ETHIOPIC SYLLABLE KWI..ETHIOPIC SYLLABLE KWE {0x12B8, 0x12BE, prALetter}, // Lo [7] ETHIOPIC SYLLABLE KXA..ETHIOPIC SYLLABLE KXO {0x12C0, 0x12C0, prALetter}, // Lo ETHIOPIC SYLLABLE KXWA {0x12C2, 0x12C5, prALetter}, // Lo [4] ETHIOPIC SYLLABLE KXWI..ETHIOPIC SYLLABLE KXWE {0x12C8, 0x12D6, prALetter}, // Lo [15] ETHIOPIC SYLLABLE WA..ETHIOPIC SYLLABLE PHARYNGEAL O {0x12D8, 0x1310, prALetter}, // Lo [57] ETHIOPIC SYLLABLE ZA..ETHIOPIC SYLLABLE GWA {0x1312, 0x1315, prALetter}, // Lo [4] ETHIOPIC SYLLABLE GWI..ETHIOPIC SYLLABLE GWE {0x1318, 0x135A, prALetter}, // Lo [67] ETHIOPIC SYLLABLE GGA..ETHIOPIC SYLLABLE FYA {0x135D, 0x135F, prExtend}, // Mn [3] ETHIOPIC COMBINING GEMINATION AND VOWEL LENGTH MARK..ETHIOPIC COMBINING GEMINATION MARK {0x1380, 0x138F, prALetter}, // Lo [16] ETHIOPIC SYLLABLE SEBATBEIT MWA..ETHIOPIC SYLLABLE PWE {0x13A0, 0x13F5, prALetter}, // L& [86] CHEROKEE LETTER A..CHEROKEE LETTER MV {0x13F8, 0x13FD, prALetter}, // L& [6] CHEROKEE SMALL LETTER YE..CHEROKEE SMALL LETTER MV {0x1401, 0x166C, prALetter}, // Lo [620] CANADIAN SYLLABICS E..CANADIAN SYLLABICS CARRIER TTSA {0x166F, 0x167F, prALetter}, // Lo [17] CANADIAN SYLLABICS QAI..CANADIAN SYLLABICS BLACKFOOT W {0x1680, 0x1680, prWSegSpace}, // Zs OGHAM SPACE MARK {0x1681, 0x169A, prALetter}, // Lo [26] OGHAM LETTER BEITH..OGHAM LETTER PEITH {0x16A0, 0x16EA, prALetter}, // Lo [75] RUNIC LETTER FEHU FEOH FE F..RUNIC LETTER X {0x16EE, 0x16F0, prALetter}, // Nl [3] RUNIC ARLAUG SYMBOL..RUNIC BELGTHOR SYMBOL {0x16F1, 0x16F8, prALetter}, // Lo [8] RUNIC LETTER K..RUNIC LETTER FRANKS CASKET AESC {0x1700, 0x1711, prALetter}, // Lo [18] TAGALOG LETTER A..TAGALOG LETTER HA {0x1712, 0x1714, prExtend}, // Mn [3] TAGALOG VOWEL SIGN I..TAGALOG SIGN VIRAMA {0x1715, 0x1715, prExtend}, // Mc TAGALOG SIGN PAMUDPOD {0x171F, 0x1731, prALetter}, // Lo [19] TAGALOG LETTER ARCHAIC RA..HANUNOO LETTER HA {0x1732, 0x1733, prExtend}, // Mn [2] HANUNOO VOWEL SIGN I..HANUNOO VOWEL SIGN U {0x1734, 0x1734, prExtend}, // Mc HANUNOO SIGN PAMUDPOD {0x1740, 0x1751, prALetter}, // Lo [18] BUHID LETTER A..BUHID LETTER HA {0x1752, 0x1753, prExtend}, // Mn [2] BUHID VOWEL SIGN I..BUHID VOWEL SIGN U {0x1760, 0x176C, prALetter}, // Lo [13] TAGBANWA LETTER A..TAGBANWA LETTER YA {0x176E, 0x1770, prALetter}, // Lo [3] TAGBANWA LETTER LA..TAGBANWA LETTER SA {0x1772, 0x1773, prExtend}, // Mn [2] TAGBANWA VOWEL SIGN I..TAGBANWA VOWEL SIGN U {0x17B4, 0x17B5, prExtend}, // Mn [2] KHMER VOWEL INHERENT AQ..KHMER VOWEL INHERENT AA {0x17B6, 0x17B6, prExtend}, // Mc KHMER VOWEL SIGN AA {0x17B7, 0x17BD, prExtend}, // Mn [7] KHMER VOWEL SIGN I..KHMER VOWEL SIGN UA {0x17BE, 0x17C5, prExtend}, // Mc [8] KHMER VOWEL SIGN OE..KHMER VOWEL SIGN AU {0x17C6, 0x17C6, prExtend}, // Mn KHMER SIGN NIKAHIT {0x17C7, 0x17C8, prExtend}, // Mc [2] KHMER SIGN REAHMUK..KHMER SIGN YUUKALEAPINTU {0x17C9, 0x17D3, prExtend}, // Mn [11] KHMER SIGN MUUSIKATOAN..KHMER SIGN BATHAMASAT {0x17DD, 0x17DD, prExtend}, // Mn KHMER SIGN ATTHACAN {0x17E0, 0x17E9, prNumeric}, // Nd [10] KHMER DIGIT ZERO..KHMER DIGIT NINE {0x180B, 0x180D, prExtend}, // Mn [3] MONGOLIAN FREE VARIATION SELECTOR ONE..MONGOLIAN FREE VARIATION SELECTOR THREE {0x180E, 0x180E, prFormat}, // Cf MONGOLIAN VOWEL SEPARATOR {0x180F, 0x180F, prExtend}, // Mn MONGOLIAN FREE VARIATION SELECTOR FOUR {0x1810, 0x1819, prNumeric}, // Nd [10] MONGOLIAN DIGIT ZERO..MONGOLIAN DIGIT NINE {0x1820, 0x1842, prALetter}, // Lo [35] MONGOLIAN LETTER A..MONGOLIAN LETTER CHI {0x1843, 0x1843, prALetter}, // Lm MONGOLIAN LETTER TODO LONG VOWEL SIGN {0x1844, 0x1878, prALetter}, // Lo [53] MONGOLIAN LETTER TODO E..MONGOLIAN LETTER CHA WITH TWO DOTS {0x1880, 0x1884, prALetter}, // Lo [5] MONGOLIAN LETTER ALI GALI ANUSVARA ONE..MONGOLIAN LETTER ALI GALI INVERTED UBADAMA {0x1885, 0x1886, prExtend}, // Mn [2] MONGOLIAN LETTER ALI GALI BALUDA..MONGOLIAN LETTER ALI GALI THREE BALUDA {0x1887, 0x18A8, prALetter}, // Lo [34] MONGOLIAN LETTER ALI GALI A..MONGOLIAN LETTER MANCHU ALI GALI BHA {0x18A9, 0x18A9, prExtend}, // Mn MONGOLIAN LETTER ALI GALI DAGALGA {0x18AA, 0x18AA, prALetter}, // Lo MONGOLIAN LETTER MANCHU ALI GALI LHA {0x18B0, 0x18F5, prALetter}, // Lo [70] CANADIAN SYLLABICS OY..CANADIAN SYLLABICS CARRIER DENTAL S {0x1900, 0x191E, prALetter}, // Lo [31] LIMBU VOWEL-CARRIER LETTER..LIMBU LETTER TRA {0x1920, 0x1922, prExtend}, // Mn [3] LIMBU VOWEL SIGN A..LIMBU VOWEL SIGN U {0x1923, 0x1926, prExtend}, // Mc [4] LIMBU VOWEL SIGN EE..LIMBU VOWEL SIGN AU {0x1927, 0x1928, prExtend}, // Mn [2] LIMBU VOWEL SIGN E..LIMBU VOWEL SIGN O {0x1929, 0x192B, prExtend}, // Mc [3] LIMBU SUBJOINED LETTER YA..LIMBU SUBJOINED LETTER WA {0x1930, 0x1931, prExtend}, // Mc [2] LIMBU SMALL LETTER KA..LIMBU SMALL LETTER NGA {0x1932, 0x1932, prExtend}, // Mn LIMBU SMALL LETTER ANUSVARA {0x1933, 0x1938, prExtend}, // Mc [6] LIMBU SMALL LETTER TA..LIMBU SMALL LETTER LA {0x1939, 0x193B, prExtend}, // Mn [3] LIMBU SIGN MUKPHRENG..LIMBU SIGN SA-I {0x1946, 0x194F, prNumeric}, // Nd [10] LIMBU DIGIT ZERO..LIMBU DIGIT NINE {0x19D0, 0x19D9, prNumeric}, // Nd [10] NEW TAI LUE DIGIT ZERO..NEW TAI LUE DIGIT NINE {0x1A00, 0x1A16, prALetter}, // Lo [23] BUGINESE LETTER KA..BUGINESE LETTER HA {0x1A17, 0x1A18, prExtend}, // Mn [2] BUGINESE VOWEL SIGN I..BUGINESE VOWEL SIGN U {0x1A19, 0x1A1A, prExtend}, // Mc [2] BUGINESE VOWEL SIGN E..BUGINESE VOWEL SIGN O {0x1A1B, 0x1A1B, prExtend}, // Mn BUGINESE VOWEL SIGN AE {0x1A55, 0x1A55, prExtend}, // Mc TAI THAM CONSONANT SIGN MEDIAL RA {0x1A56, 0x1A56, prExtend}, // Mn TAI THAM CONSONANT SIGN MEDIAL LA {0x1A57, 0x1A57, prExtend}, // Mc TAI THAM CONSONANT SIGN LA TANG LAI {0x1A58, 0x1A5E, prExtend}, // Mn [7] TAI THAM SIGN MAI KANG LAI..TAI THAM CONSONANT SIGN SA {0x1A60, 0x1A60, prExtend}, // Mn TAI THAM SIGN SAKOT {0x1A61, 0x1A61, prExtend}, // Mc TAI THAM VOWEL SIGN A {0x1A62, 0x1A62, prExtend}, // Mn TAI THAM VOWEL SIGN MAI SAT {0x1A63, 0x1A64, prExtend}, // Mc [2] TAI THAM VOWEL SIGN AA..TAI THAM VOWEL SIGN TALL AA {0x1A65, 0x1A6C, prExtend}, // Mn [8] TAI THAM VOWEL SIGN I..TAI THAM VOWEL SIGN OA BELOW {0x1A6D, 0x1A72, prExtend}, // Mc [6] TAI THAM VOWEL SIGN OY..TAI THAM VOWEL SIGN THAM AI {0x1A73, 0x1A7C, prExtend}, // Mn [10] TAI THAM VOWEL SIGN OA ABOVE..TAI THAM SIGN KHUEN-LUE KARAN {0x1A7F, 0x1A7F, prExtend}, // Mn TAI THAM COMBINING CRYPTOGRAMMIC DOT {0x1A80, 0x1A89, prNumeric}, // Nd [10] TAI THAM HORA DIGIT ZERO..TAI THAM HORA DIGIT NINE {0x1A90, 0x1A99, prNumeric}, // Nd [10] TAI THAM THAM DIGIT ZERO..TAI THAM THAM DIGIT NINE {0x1AB0, 0x1ABD, prExtend}, // Mn [14] COMBINING DOUBLED CIRCUMFLEX ACCENT..COMBINING PARENTHESES BELOW {0x1ABE, 0x1ABE, prExtend}, // Me COMBINING PARENTHESES OVERLAY {0x1ABF, 0x1ACE, prExtend}, // Mn [16] COMBINING LATIN SMALL LETTER W BELOW..COMBINING LATIN SMALL LETTER INSULAR T {0x1B00, 0x1B03, prExtend}, // Mn [4] BALINESE SIGN ULU RICEM..BALINESE SIGN SURANG {0x1B04, 0x1B04, prExtend}, // Mc BALINESE SIGN BISAH {0x1B05, 0x1B33, prALetter}, // Lo [47] BALINESE LETTER AKARA..BALINESE LETTER HA {0x1B34, 0x1B34, prExtend}, // Mn BALINESE SIGN REREKAN {0x1B35, 0x1B35, prExtend}, // Mc BALINESE VOWEL SIGN TEDUNG {0x1B36, 0x1B3A, prExtend}, // Mn [5] BALINESE VOWEL SIGN ULU..BALINESE VOWEL SIGN RA REPA {0x1B3B, 0x1B3B, prExtend}, // Mc BALINESE VOWEL SIGN RA REPA TEDUNG {0x1B3C, 0x1B3C, prExtend}, // Mn BALINESE VOWEL SIGN LA LENGA {0x1B3D, 0x1B41, prExtend}, // Mc [5] BALINESE VOWEL SIGN LA LENGA TEDUNG..BALINESE VOWEL SIGN TALING REPA TEDUNG {0x1B42, 0x1B42, prExtend}, // Mn BALINESE VOWEL SIGN PEPET {0x1B43, 0x1B44, prExtend}, // Mc [2] BALINESE VOWEL SIGN PEPET TEDUNG..BALINESE ADEG ADEG {0x1B45, 0x1B4C, prALetter}, // Lo [8] BALINESE LETTER KAF SASAK..BALINESE LETTER ARCHAIC JNYA {0x1B50, 0x1B59, prNumeric}, // Nd [10] BALINESE DIGIT ZERO..BALINESE DIGIT NINE {0x1B6B, 0x1B73, prExtend}, // Mn [9] BALINESE MUSICAL SYMBOL COMBINING TEGEH..BALINESE MUSICAL SYMBOL COMBINING GONG {0x1B80, 0x1B81, prExtend}, // Mn [2] SUNDANESE SIGN PANYECEK..SUNDANESE SIGN PANGLAYAR {0x1B82, 0x1B82, prExtend}, // Mc SUNDANESE SIGN PANGWISAD {0x1B83, 0x1BA0, prALetter}, // Lo [30] SUNDANESE LETTER A..SUNDANESE LETTER HA {0x1BA1, 0x1BA1, prExtend}, // Mc SUNDANESE CONSONANT SIGN PAMINGKAL {0x1BA2, 0x1BA5, prExtend}, // Mn [4] SUNDANESE CONSONANT SIGN PANYAKRA..SUNDANESE VOWEL SIGN PANYUKU {0x1BA6, 0x1BA7, prExtend}, // Mc [2] SUNDANESE VOWEL SIGN PANAELAENG..SUNDANESE VOWEL SIGN PANOLONG {0x1BA8, 0x1BA9, prExtend}, // Mn [2] SUNDANESE VOWEL SIGN PAMEPET..SUNDANESE VOWEL SIGN PANEULEUNG {0x1BAA, 0x1BAA, prExtend}, // Mc SUNDANESE SIGN PAMAAEH {0x1BAB, 0x1BAD, prExtend}, // Mn [3] SUNDANESE SIGN VIRAMA..SUNDANESE CONSONANT SIGN PASANGAN WA {0x1BAE, 0x1BAF, prALetter}, // Lo [2] SUNDANESE LETTER KHA..SUNDANESE LETTER SYA {0x1BB0, 0x1BB9, prNumeric}, // Nd [10] SUNDANESE DIGIT ZERO..SUNDANESE DIGIT NINE {0x1BBA, 0x1BE5, prALetter}, // Lo [44] SUNDANESE AVAGRAHA..BATAK LETTER U {0x1BE6, 0x1BE6, prExtend}, // Mn BATAK SIGN TOMPI {0x1BE7, 0x1BE7, prExtend}, // Mc BATAK VOWEL SIGN E {0x1BE8, 0x1BE9, prExtend}, // Mn [2] BATAK VOWEL SIGN PAKPAK E..BATAK VOWEL SIGN EE {0x1BEA, 0x1BEC, prExtend}, // Mc [3] BATAK VOWEL SIGN I..BATAK VOWEL SIGN O {0x1BED, 0x1BED, prExtend}, // Mn BATAK VOWEL SIGN KARO O {0x1BEE, 0x1BEE, prExtend}, // Mc BATAK VOWEL SIGN U {0x1BEF, 0x1BF1, prExtend}, // Mn [3] BATAK VOWEL SIGN U FOR SIMALUNGUN SA..BATAK CONSONANT SIGN H {0x1BF2, 0x1BF3, prExtend}, // Mc [2] BATAK PANGOLAT..BATAK PANONGONAN {0x1C00, 0x1C23, prALetter}, // Lo [36] LEPCHA LETTER KA..LEPCHA LETTER A {0x1C24, 0x1C2B, prExtend}, // Mc [8] LEPCHA SUBJOINED LETTER YA..LEPCHA VOWEL SIGN UU {0x1C2C, 0x1C33, prExtend}, // Mn [8] LEPCHA VOWEL SIGN E..LEPCHA CONSONANT SIGN T {0x1C34, 0x1C35, prExtend}, // Mc [2] LEPCHA CONSONANT SIGN NYIN-DO..LEPCHA CONSONANT SIGN KANG {0x1C36, 0x1C37, prExtend}, // Mn [2] LEPCHA SIGN RAN..LEPCHA SIGN NUKTA {0x1C40, 0x1C49, prNumeric}, // Nd [10] LEPCHA DIGIT ZERO..LEPCHA DIGIT NINE {0x1C4D, 0x1C4F, prALetter}, // Lo [3] LEPCHA LETTER TTA..LEPCHA LETTER DDA {0x1C50, 0x1C59, prNumeric}, // Nd [10] OL CHIKI DIGIT ZERO..OL CHIKI DIGIT NINE {0x1C5A, 0x1C77, prALetter}, // Lo [30] OL CHIKI LETTER LA..OL CHIKI LETTER OH {0x1C78, 0x1C7D, prALetter}, // Lm [6] OL CHIKI MU TTUDDAG..OL CHIKI AHAD {0x1C80, 0x1C88, prALetter}, // L& [9] CYRILLIC SMALL LETTER ROUNDED VE..CYRILLIC SMALL LETTER UNBLENDED UK {0x1C90, 0x1CBA, prALetter}, // L& [43] GEORGIAN MTAVRULI CAPITAL LETTER AN..GEORGIAN MTAVRULI CAPITAL LETTER AIN {0x1CBD, 0x1CBF, prALetter}, // L& [3] GEORGIAN MTAVRULI CAPITAL LETTER AEN..GEORGIAN MTAVRULI CAPITAL LETTER LABIAL SIGN {0x1CD0, 0x1CD2, prExtend}, // Mn [3] VEDIC TONE KARSHANA..VEDIC TONE PRENKHA {0x1CD4, 0x1CE0, prExtend}, // Mn [13] VEDIC SIGN YAJURVEDIC MIDLINE SVARITA..VEDIC TONE RIGVEDIC KASHMIRI INDEPENDENT SVARITA {0x1CE1, 0x1CE1, prExtend}, // Mc VEDIC TONE ATHARVAVEDIC INDEPENDENT SVARITA {0x1CE2, 0x1CE8, prExtend}, // Mn [7] VEDIC SIGN VISARGA SVARITA..VEDIC SIGN VISARGA ANUDATTA WITH TAIL {0x1CE9, 0x1CEC, prALetter}, // Lo [4] VEDIC SIGN ANUSVARA ANTARGOMUKHA..VEDIC SIGN ANUSVARA VAMAGOMUKHA WITH TAIL {0x1CED, 0x1CED, prExtend}, // Mn VEDIC SIGN TIRYAK {0x1CEE, 0x1CF3, prALetter}, // Lo [6] VEDIC SIGN HEXIFORM LONG ANUSVARA..VEDIC SIGN ROTATED ARDHAVISARGA {0x1CF4, 0x1CF4, prExtend}, // Mn VEDIC TONE CANDRA ABOVE {0x1CF5, 0x1CF6, prALetter}, // Lo [2] VEDIC SIGN JIHVAMULIYA..VEDIC SIGN UPADHMANIYA {0x1CF7, 0x1CF7, prExtend}, // Mc VEDIC SIGN ATIKRAMA {0x1CF8, 0x1CF9, prExtend}, // Mn [2] VEDIC TONE RING ABOVE..VEDIC TONE DOUBLE RING ABOVE {0x1CFA, 0x1CFA, prALetter}, // Lo VEDIC SIGN DOUBLE ANUSVARA ANTARGOMUKHA {0x1D00, 0x1D2B, prALetter}, // L& [44] LATIN LETTER SMALL CAPITAL A..CYRILLIC LETTER SMALL CAPITAL EL {0x1D2C, 0x1D6A, prALetter}, // Lm [63] MODIFIER LETTER CAPITAL A..GREEK SUBSCRIPT SMALL LETTER CHI {0x1D6B, 0x1D77, prALetter}, // L& [13] LATIN SMALL LETTER UE..LATIN SMALL LETTER TURNED G {0x1D78, 0x1D78, prALetter}, // Lm MODIFIER LETTER CYRILLIC EN {0x1D79, 0x1D9A, prALetter}, // L& [34] LATIN SMALL LETTER INSULAR G..LATIN SMALL LETTER EZH WITH RETROFLEX HOOK {0x1D9B, 0x1DBF, prALetter}, // Lm [37] MODIFIER LETTER SMALL TURNED ALPHA..MODIFIER LETTER SMALL THETA {0x1DC0, 0x1DFF, prExtend}, // Mn [64] COMBINING DOTTED GRAVE ACCENT..COMBINING RIGHT ARROWHEAD AND DOWN ARROWHEAD BELOW {0x1E00, 0x1F15, prALetter}, // L& [278] LATIN CAPITAL LETTER A WITH RING BELOW..GREEK SMALL LETTER EPSILON WITH DASIA AND OXIA {0x1F18, 0x1F1D, prALetter}, // L& [6] GREEK CAPITAL LETTER EPSILON WITH PSILI..GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA {0x1F20, 0x1F45, prALetter}, // L& [38] GREEK SMALL LETTER ETA WITH PSILI..GREEK SMALL LETTER OMICRON WITH DASIA AND OXIA {0x1F48, 0x1F4D, prALetter}, // L& [6] GREEK CAPITAL LETTER OMICRON WITH PSILI..GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA {0x1F50, 0x1F57, prALetter}, // L& [8] GREEK SMALL LETTER UPSILON WITH PSILI..GREEK SMALL LETTER UPSILON WITH DASIA AND PERISPOMENI {0x1F59, 0x1F59, prALetter}, // L& GREEK CAPITAL LETTER UPSILON WITH DASIA {0x1F5B, 0x1F5B, prALetter}, // L& GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA {0x1F5D, 0x1F5D, prALetter}, // L& GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA {0x1F5F, 0x1F7D, prALetter}, // L& [31] GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI..GREEK SMALL LETTER OMEGA WITH OXIA {0x1F80, 0x1FB4, prALetter}, // L& [53] GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI..GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI {0x1FB6, 0x1FBC, prALetter}, // L& [7] GREEK SMALL LETTER ALPHA WITH PERISPOMENI..GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI {0x1FBE, 0x1FBE, prALetter}, // L& GREEK PROSGEGRAMMENI {0x1FC2, 0x1FC4, prALetter}, // L& [3] GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI {0x1FC6, 0x1FCC, prALetter}, // L& [7] GREEK SMALL LETTER ETA WITH PERISPOMENI..GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI {0x1FD0, 0x1FD3, prALetter}, // L& [4] GREEK SMALL LETTER IOTA WITH VRACHY..GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA {0x1FD6, 0x1FDB, prALetter}, // L& [6] GREEK SMALL LETTER IOTA WITH PERISPOMENI..GREEK CAPITAL LETTER IOTA WITH OXIA {0x1FE0, 0x1FEC, prALetter}, // L& [13] GREEK SMALL LETTER UPSILON WITH VRACHY..GREEK CAPITAL LETTER RHO WITH DASIA {0x1FF2, 0x1FF4, prALetter}, // L& [3] GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI..GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI {0x1FF6, 0x1FFC, prALetter}, // L& [7] GREEK SMALL LETTER OMEGA WITH PERISPOMENI..GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI {0x2000, 0x2006, prWSegSpace}, // Zs [7] EN QUAD..SIX-PER-EM SPACE {0x2008, 0x200A, prWSegSpace}, // Zs [3] PUNCTUATION SPACE..HAIR SPACE {0x200C, 0x200C, prExtend}, // Cf ZERO WIDTH NON-JOINER {0x200D, 0x200D, prZWJ}, // Cf ZERO WIDTH JOINER {0x200E, 0x200F, prFormat}, // Cf [2] LEFT-TO-RIGHT MARK..RIGHT-TO-LEFT MARK {0x2018, 0x2018, prMidNumLet}, // Pi LEFT SINGLE QUOTATION MARK {0x2019, 0x2019, prMidNumLet}, // Pf RIGHT SINGLE QUOTATION MARK {0x2024, 0x2024, prMidNumLet}, // Po ONE DOT LEADER {0x2027, 0x2027, prMidLetter}, // Po HYPHENATION POINT {0x2028, 0x2028, prNewline}, // Zl LINE SEPARATOR {0x2029, 0x2029, prNewline}, // Zp PARAGRAPH SEPARATOR {0x202A, 0x202E, prFormat}, // Cf [5] LEFT-TO-RIGHT EMBEDDING..RIGHT-TO-LEFT OVERRIDE {0x202F, 0x202F, prExtendNumLet}, // Zs NARROW NO-BREAK SPACE {0x203C, 0x203C, prExtendedPictographic}, // E0.6 [1] (‼️) double exclamation mark {0x203F, 0x2040, prExtendNumLet}, // Pc [2] UNDERTIE..CHARACTER TIE {0x2044, 0x2044, prMidNum}, // Sm FRACTION SLASH {0x2049, 0x2049, prExtendedPictographic}, // E0.6 [1] (⁉️) exclamation question mark {0x2054, 0x2054, prExtendNumLet}, // Pc INVERTED UNDERTIE {0x205F, 0x205F, prWSegSpace}, // Zs MEDIUM MATHEMATICAL SPACE {0x2060, 0x2064, prFormat}, // Cf [5] WORD JOINER..INVISIBLE PLUS {0x2066, 0x206F, prFormat}, // Cf [10] LEFT-TO-RIGHT ISOLATE..NOMINAL DIGIT SHAPES {0x2071, 0x2071, prALetter}, // Lm SUPERSCRIPT LATIN SMALL LETTER I {0x207F, 0x207F, prALetter}, // Lm SUPERSCRIPT LATIN SMALL LETTER N {0x2090, 0x209C, prALetter}, // Lm [13] LATIN SUBSCRIPT SMALL LETTER A..LATIN SUBSCRIPT SMALL LETTER T {0x20D0, 0x20DC, prExtend}, // Mn [13] COMBINING LEFT HARPOON ABOVE..COMBINING FOUR DOTS ABOVE {0x20DD, 0x20E0, prExtend}, // Me [4] COMBINING ENCLOSING CIRCLE..COMBINING ENCLOSING CIRCLE BACKSLASH {0x20E1, 0x20E1, prExtend}, // Mn COMBINING LEFT RIGHT ARROW ABOVE {0x20E2, 0x20E4, prExtend}, // Me [3] COMBINING ENCLOSING SCREEN..COMBINING ENCLOSING UPWARD POINTING TRIANGLE {0x20E5, 0x20F0, prExtend}, // Mn [12] COMBINING REVERSE SOLIDUS OVERLAY..COMBINING ASTERISK ABOVE {0x2102, 0x2102, prALetter}, // L& DOUBLE-STRUCK CAPITAL C {0x2107, 0x2107, prALetter}, // L& EULER CONSTANT {0x210A, 0x2113, prALetter}, // L& [10] SCRIPT SMALL G..SCRIPT SMALL L {0x2115, 0x2115, prALetter}, // L& DOUBLE-STRUCK CAPITAL N {0x2119, 0x211D, prALetter}, // L& [5] DOUBLE-STRUCK CAPITAL P..DOUBLE-STRUCK CAPITAL R {0x2122, 0x2122, prExtendedPictographic}, // E0.6 [1] (™️) trade mark {0x2124, 0x2124, prALetter}, // L& DOUBLE-STRUCK CAPITAL Z {0x2126, 0x2126, prALetter}, // L& OHM SIGN {0x2128, 0x2128, prALetter}, // L& BLACK-LETTER CAPITAL Z {0x212A, 0x212D, prALetter}, // L& [4] KELVIN SIGN..BLACK-LETTER CAPITAL C {0x212F, 0x2134, prALetter}, // L& [6] SCRIPT SMALL E..SCRIPT SMALL O {0x2135, 0x2138, prALetter}, // Lo [4] ALEF SYMBOL..DALET SYMBOL {0x2139, 0x2139, prExtendedPictographic}, // E0.6 [1] (ℹ️) information {0x2139, 0x2139, prALetter}, // L& INFORMATION SOURCE {0x213C, 0x213F, prALetter}, // L& [4] DOUBLE-STRUCK SMALL PI..DOUBLE-STRUCK CAPITAL PI {0x2145, 0x2149, prALetter}, // L& [5] DOUBLE-STRUCK ITALIC CAPITAL D..DOUBLE-STRUCK ITALIC SMALL J {0x214E, 0x214E, prALetter}, // L& TURNED SMALL F {0x2160, 0x2182, prALetter}, // Nl [35] ROMAN NUMERAL ONE..ROMAN NUMERAL TEN THOUSAND {0x2183, 0x2184, prALetter}, // L& [2] ROMAN NUMERAL REVERSED ONE HUNDRED..LATIN SMALL LETTER REVERSED C {0x2185, 0x2188, prALetter}, // Nl [4] ROMAN NUMERAL SIX LATE FORM..ROMAN NUMERAL ONE HUNDRED THOUSAND {0x2194, 0x2199, prExtendedPictographic}, // E0.6 [6] (↔️..↙️) left-right arrow..down-left arrow {0x21A9, 0x21AA, prExtendedPictographic}, // E0.6 [2] (↩️..↪️) right arrow curving left..left arrow curving right {0x231A, 0x231B, prExtendedPictographic}, // E0.6 [2] (⌚..⌛) watch..hourglass done {0x2328, 0x2328, prExtendedPictographic}, // E1.0 [1] (⌨️) keyboard {0x2388, 0x2388, prExtendedPictographic}, // E0.0 [1] (⎈) HELM SYMBOL {0x23CF, 0x23CF, prExtendedPictographic}, // E1.0 [1] (⏏️) eject button {0x23E9, 0x23EC, prExtendedPictographic}, // E0.6 [4] (⏩..⏬) fast-forward button..fast down button {0x23ED, 0x23EE, prExtendedPictographic}, // E0.7 [2] (⏭️..⏮️) next track button..last track button {0x23EF, 0x23EF, prExtendedPictographic}, // E1.0 [1] (⏯️) play or pause button {0x23F0, 0x23F0, prExtendedPictographic}, // E0.6 [1] (⏰) alarm clock {0x23F1, 0x23F2, prExtendedPictographic}, // E1.0 [2] (⏱️..⏲️) stopwatch..timer clock {0x23F3, 0x23F3, prExtendedPictographic}, // E0.6 [1] (⏳) hourglass not done {0x23F8, 0x23FA, prExtendedPictographic}, // E0.7 [3] (⏸️..⏺️) pause button..record button {0x24B6, 0x24E9, prALetter}, // So [52] CIRCLED LATIN CAPITAL LETTER A..CIRCLED LATIN SMALL LETTER Z {0x24C2, 0x24C2, prExtendedPictographic}, // E0.6 [1] (Ⓜ️) circled M {0x25AA, 0x25AB, prExtendedPictographic}, // E0.6 [2] (▪️..▫️) black small square..white small square {0x25B6, 0x25B6, prExtendedPictographic}, // E0.6 [1] (▶️) play button {0x25C0, 0x25C0, prExtendedPictographic}, // E0.6 [1] (◀️) reverse button {0x25FB, 0x25FE, prExtendedPictographic}, // E0.6 [4] (◻️..◾) white medium square..black medium-small square {0x2600, 0x2601, prExtendedPictographic}, // E0.6 [2] (☀️..☁️) sun..cloud {0x2602, 0x2603, prExtendedPictographic}, // E0.7 [2] (☂️..☃️) umbrella..snowman {0x2604, 0x2604, prExtendedPictographic}, // E1.0 [1] (☄️) comet {0x2605, 0x2605, prExtendedPictographic}, // E0.0 [1] (★) BLACK STAR {0x2607, 0x260D, prExtendedPictographic}, // E0.0 [7] (☇..☍) LIGHTNING..OPPOSITION {0x260E, 0x260E, prExtendedPictographic}, // E0.6 [1] (☎️) telephone {0x260F, 0x2610, prExtendedPictographic}, // E0.0 [2] (☏..☐) WHITE TELEPHONE..BALLOT BOX {0x2611, 0x2611, prExtendedPictographic}, // E0.6 [1] (☑️) check box with check {0x2612, 0x2612, prExtendedPictographic}, // E0.0 [1] (☒) BALLOT BOX WITH X {0x2614, 0x2615, prExtendedPictographic}, // E0.6 [2] (☔..☕) umbrella with rain drops..hot beverage {0x2616, 0x2617, prExtendedPictographic}, // E0.0 [2] (☖..☗) WHITE SHOGI PIECE..BLACK SHOGI PIECE {0x2618, 0x2618, prExtendedPictographic}, // E1.0 [1] (☘️) shamrock {0x2619, 0x261C, prExtendedPictographic}, // E0.0 [4] (☙..☜) REVERSED ROTATED FLORAL HEART BULLET..WHITE LEFT POINTING INDEX {0x261D, 0x261D, prExtendedPictographic}, // E0.6 [1] (☝️) index pointing up {0x261E, 0x261F, prExtendedPictographic}, // E0.0 [2] (☞..☟) WHITE RIGHT POINTING INDEX..WHITE DOWN POINTING INDEX {0x2620, 0x2620, prExtendedPictographic}, // E1.0 [1] (☠️) skull and crossbones {0x2621, 0x2621, prExtendedPictographic}, // E0.0 [1] (☡) CAUTION SIGN {0x2622, 0x2623, prExtendedPictographic}, // E1.0 [2] (☢️..☣️) radioactive..biohazard {0x2624, 0x2625, prExtendedPictographic}, // E0.0 [2] (☤..☥) CADUCEUS..ANKH {0x2626, 0x2626, prExtendedPictographic}, // E1.0 [1] (☦️) orthodox cross {0x2627, 0x2629, prExtendedPictographic}, // E0.0 [3] (☧..☩) CHI RHO..CROSS OF JERUSALEM {0x262A, 0x262A, prExtendedPictographic}, // E0.7 [1] (☪️) star and crescent {0x262B, 0x262D, prExtendedPictographic}, // E0.0 [3] (☫..☭) FARSI SYMBOL..HAMMER AND SICKLE {0x262E, 0x262E, prExtendedPictographic}, // E1.0 [1] (☮️) peace symbol {0x262F, 0x262F, prExtendedPictographic}, // E0.7 [1] (☯️) yin yang {0x2630, 0x2637, prExtendedPictographic}, // E0.0 [8] (☰..☷) TRIGRAM FOR HEAVEN..TRIGRAM FOR EARTH {0x2638, 0x2639, prExtendedPictographic}, // E0.7 [2] (☸️..☹️) wheel of dharma..frowning face {0x263A, 0x263A, prExtendedPictographic}, // E0.6 [1] (☺️) smiling face {0x263B, 0x263F, prExtendedPictographic}, // E0.0 [5] (☻..☿) BLACK SMILING FACE..MERCURY {0x2640, 0x2640, prExtendedPictographic}, // E4.0 [1] (♀️) female sign {0x2641, 0x2641, prExtendedPictographic}, // E0.0 [1] (♁) EARTH {0x2642, 0x2642, prExtendedPictographic}, // E4.0 [1] (♂️) male sign {0x2643, 0x2647, prExtendedPictographic}, // E0.0 [5] (♃..♇) JUPITER..PLUTO {0x2648, 0x2653, prExtendedPictographic}, // E0.6 [12] (♈..♓) Aries..Pisces {0x2654, 0x265E, prExtendedPictographic}, // E0.0 [11] (♔..♞) WHITE CHESS KING..BLACK CHESS KNIGHT {0x265F, 0x265F, prExtendedPictographic}, // E11.0 [1] (♟️) chess pawn {0x2660, 0x2660, prExtendedPictographic}, // E0.6 [1] (♠️) spade suit {0x2661, 0x2662, prExtendedPictographic}, // E0.0 [2] (♡..♢) WHITE HEART SUIT..WHITE DIAMOND SUIT {0x2663, 0x2663, prExtendedPictographic}, // E0.6 [1] (♣️) club suit {0x2664, 0x2664, prExtendedPictographic}, // E0.0 [1] (♤) WHITE SPADE SUIT {0x2665, 0x2666, prExtendedPictographic}, // E0.6 [2] (♥️..♦️) heart suit..diamond suit {0x2667, 0x2667, prExtendedPictographic}, // E0.0 [1] (♧) WHITE CLUB SUIT {0x2668, 0x2668, prExtendedPictographic}, // E0.6 [1] (♨️) hot springs {0x2669, 0x267A, prExtendedPictographic}, // E0.0 [18] (♩..♺) QUARTER NOTE..RECYCLING SYMBOL FOR GENERIC MATERIALS {0x267B, 0x267B, prExtendedPictographic}, // E0.6 [1] (♻️) recycling symbol {0x267C, 0x267D, prExtendedPictographic}, // E0.0 [2] (♼..♽) RECYCLED PAPER SYMBOL..PARTIALLY-RECYCLED PAPER SYMBOL {0x267E, 0x267E, prExtendedPictographic}, // E11.0 [1] (♾️) infinity {0x267F, 0x267F, prExtendedPictographic}, // E0.6 [1] (♿) wheelchair symbol {0x2680, 0x2685, prExtendedPictographic}, // E0.0 [6] (⚀..⚅) DIE FACE-1..DIE FACE-6 {0x2690, 0x2691, prExtendedPictographic}, // E0.0 [2] (⚐..⚑) WHITE FLAG..BLACK FLAG {0x2692, 0x2692, prExtendedPictographic}, // E1.0 [1] (⚒️) hammer and pick {0x2693, 0x2693, prExtendedPictographic}, // E0.6 [1] (⚓) anchor {0x2694, 0x2694, prExtendedPictographic}, // E1.0 [1] (⚔️) crossed swords {0x2695, 0x2695, prExtendedPictographic}, // E4.0 [1] (⚕️) medical symbol {0x2696, 0x2697, prExtendedPictographic}, // E1.0 [2] (⚖️..⚗️) balance scale..alembic {0x2698, 0x2698, prExtendedPictographic}, // E0.0 [1] (⚘) FLOWER {0x2699, 0x2699, prExtendedPictographic}, // E1.0 [1] (⚙️) gear {0x269A, 0x269A, prExtendedPictographic}, // E0.0 [1] (⚚) STAFF OF HERMES {0x269B, 0x269C, prExtendedPictographic}, // E1.0 [2] (⚛️..⚜️) atom symbol..fleur-de-lis {0x269D, 0x269F, prExtendedPictographic}, // E0.0 [3] (⚝..⚟) OUTLINED WHITE STAR..THREE LINES CONVERGING LEFT {0x26A0, 0x26A1, prExtendedPictographic}, // E0.6 [2] (⚠️..⚡) warning..high voltage {0x26A2, 0x26A6, prExtendedPictographic}, // E0.0 [5] (⚢..⚦) DOUBLED FEMALE SIGN..MALE WITH STROKE SIGN {0x26A7, 0x26A7, prExtendedPictographic}, // E13.0 [1] (⚧️) transgender symbol {0x26A8, 0x26A9, prExtendedPictographic}, // E0.0 [2] (⚨..⚩) VERTICAL MALE WITH STROKE SIGN..HORIZONTAL MALE WITH STROKE SIGN {0x26AA, 0x26AB, prExtendedPictographic}, // E0.6 [2] (⚪..⚫) white circle..black circle {0x26AC, 0x26AF, prExtendedPictographic}, // E0.0 [4] (⚬..⚯) MEDIUM SMALL WHITE CIRCLE..UNMARRIED PARTNERSHIP SYMBOL {0x26B0, 0x26B1, prExtendedPictographic}, // E1.0 [2] (⚰️..⚱️) coffin..funeral urn {0x26B2, 0x26BC, prExtendedPictographic}, // E0.0 [11] (⚲..⚼) NEUTER..SESQUIQUADRATE {0x26BD, 0x26BE, prExtendedPictographic}, // E0.6 [2] (⚽..⚾) soccer ball..baseball {0x26BF, 0x26C3, prExtendedPictographic}, // E0.0 [5] (⚿..⛃) SQUARED KEY..BLACK DRAUGHTS KING {0x26C4, 0x26C5, prExtendedPictographic}, // E0.6 [2] (⛄..⛅) snowman without snow..sun behind cloud {0x26C6, 0x26C7, prExtendedPictographic}, // E0.0 [2] (⛆..⛇) RAIN..BLACK SNOWMAN {0x26C8, 0x26C8, prExtendedPictographic}, // E0.7 [1] (⛈️) cloud with lightning and rain {0x26C9, 0x26CD, prExtendedPictographic}, // E0.0 [5] (⛉..⛍) TURNED WHITE SHOGI PIECE..DISABLED CAR {0x26CE, 0x26CE, prExtendedPictographic}, // E0.6 [1] (⛎) Ophiuchus {0x26CF, 0x26CF, prExtendedPictographic}, // E0.7 [1] (⛏️) pick {0x26D0, 0x26D0, prExtendedPictographic}, // E0.0 [1] (⛐) CAR SLIDING {0x26D1, 0x26D1, prExtendedPictographic}, // E0.7 [1] (⛑️) rescue worker’s helmet {0x26D2, 0x26D2, prExtendedPictographic}, // E0.0 [1] (⛒) CIRCLED CROSSING LANES {0x26D3, 0x26D3, prExtendedPictographic}, // E0.7 [1] (⛓️) chains {0x26D4, 0x26D4, prExtendedPictographic}, // E0.6 [1] (⛔) no entry {0x26D5, 0x26E8, prExtendedPictographic}, // E0.0 [20] (⛕..⛨) ALTERNATE ONE-WAY LEFT WAY TRAFFIC..BLACK CROSS ON SHIELD {0x26E9, 0x26E9, prExtendedPictographic}, // E0.7 [1] (⛩️) shinto shrine {0x26EA, 0x26EA, prExtendedPictographic}, // E0.6 [1] (⛪) church {0x26EB, 0x26EF, prExtendedPictographic}, // E0.0 [5] (⛫..⛯) CASTLE..MAP SYMBOL FOR LIGHTHOUSE {0x26F0, 0x26F1, prExtendedPictographic}, // E0.7 [2] (⛰️..⛱️) mountain..umbrella on ground {0x26F2, 0x26F3, prExtendedPictographic}, // E0.6 [2] (⛲..⛳) fountain..flag in hole {0x26F4, 0x26F4, prExtendedPictographic}, // E0.7 [1] (⛴️) ferry {0x26F5, 0x26F5, prExtendedPictographic}, // E0.6 [1] (⛵) sailboat {0x26F6, 0x26F6, prExtendedPictographic}, // E0.0 [1] (⛶) SQUARE FOUR CORNERS {0x26F7, 0x26F9, prExtendedPictographic}, // E0.7 [3] (⛷️..⛹️) skier..person bouncing ball {0x26FA, 0x26FA, prExtendedPictographic}, // E0.6 [1] (⛺) tent {0x26FB, 0x26FC, prExtendedPictographic}, // E0.0 [2] (⛻..⛼) JAPANESE BANK SYMBOL..HEADSTONE GRAVEYARD SYMBOL {0x26FD, 0x26FD, prExtendedPictographic}, // E0.6 [1] (⛽) fuel pump {0x26FE, 0x2701, prExtendedPictographic}, // E0.0 [4] (⛾..✁) CUP ON BLACK SQUARE..UPPER BLADE SCISSORS {0x2702, 0x2702, prExtendedPictographic}, // E0.6 [1] (✂️) scissors {0x2703, 0x2704, prExtendedPictographic}, // E0.0 [2] (✃..✄) LOWER BLADE SCISSORS..WHITE SCISSORS {0x2705, 0x2705, prExtendedPictographic}, // E0.6 [1] (✅) check mark button {0x2708, 0x270C, prExtendedPictographic}, // E0.6 [5] (✈️..✌️) airplane..victory hand {0x270D, 0x270D, prExtendedPictographic}, // E0.7 [1] (✍️) writing hand {0x270E, 0x270E, prExtendedPictographic}, // E0.0 [1] (✎) LOWER RIGHT PENCIL {0x270F, 0x270F, prExtendedPictographic}, // E0.6 [1] (✏️) pencil {0x2710, 0x2711, prExtendedPictographic}, // E0.0 [2] (✐..✑) UPPER RIGHT PENCIL..WHITE NIB {0x2712, 0x2712, prExtendedPictographic}, // E0.6 [1] (✒️) black nib {0x2714, 0x2714, prExtendedPictographic}, // E0.6 [1] (✔️) check mark {0x2716, 0x2716, prExtendedPictographic}, // E0.6 [1] (✖️) multiply {0x271D, 0x271D, prExtendedPictographic}, // E0.7 [1] (✝️) latin cross {0x2721, 0x2721, prExtendedPictographic}, // E0.7 [1] (✡️) star of David {0x2728, 0x2728, prExtendedPictographic}, // E0.6 [1] (✨) sparkles {0x2733, 0x2734, prExtendedPictographic}, // E0.6 [2] (✳️..✴️) eight-spoked asterisk..eight-pointed star {0x2744, 0x2744, prExtendedPictographic}, // E0.6 [1] (❄️) snowflake {0x2747, 0x2747, prExtendedPictographic}, // E0.6 [1] (❇️) sparkle {0x274C, 0x274C, prExtendedPictographic}, // E0.6 [1] (❌) cross mark {0x274E, 0x274E, prExtendedPictographic}, // E0.6 [1] (❎) cross mark button {0x2753, 0x2755, prExtendedPictographic}, // E0.6 [3] (❓..❕) red question mark..white exclamation mark {0x2757, 0x2757, prExtendedPictographic}, // E0.6 [1] (❗) red exclamation mark {0x2763, 0x2763, prExtendedPictographic}, // E1.0 [1] (❣️) heart exclamation {0x2764, 0x2764, prExtendedPictographic}, // E0.6 [1] (❤️) red heart {0x2765, 0x2767, prExtendedPictographic}, // E0.0 [3] (❥..❧) ROTATED HEAVY BLACK HEART BULLET..ROTATED FLORAL HEART BULLET {0x2795, 0x2797, prExtendedPictographic}, // E0.6 [3] (➕..➗) plus..divide {0x27A1, 0x27A1, prExtendedPictographic}, // E0.6 [1] (➡️) right arrow {0x27B0, 0x27B0, prExtendedPictographic}, // E0.6 [1] (➰) curly loop {0x27BF, 0x27BF, prExtendedPictographic}, // E1.0 [1] (➿) double curly loop {0x2934, 0x2935, prExtendedPictographic}, // E0.6 [2] (⤴️..⤵️) right arrow curving up..right arrow curving down {0x2B05, 0x2B07, prExtendedPictographic}, // E0.6 [3] (⬅️..⬇️) left arrow..down arrow {0x2B1B, 0x2B1C, prExtendedPictographic}, // E0.6 [2] (⬛..⬜) black large square..white large square {0x2B50, 0x2B50, prExtendedPictographic}, // E0.6 [1] (⭐) star {0x2B55, 0x2B55, prExtendedPictographic}, // E0.6 [1] (⭕) hollow red circle {0x2C00, 0x2C7B, prALetter}, // L& [124] GLAGOLITIC CAPITAL LETTER AZU..LATIN LETTER SMALL CAPITAL TURNED E {0x2C7C, 0x2C7D, prALetter}, // Lm [2] LATIN SUBSCRIPT SMALL LETTER J..MODIFIER LETTER CAPITAL V {0x2C7E, 0x2CE4, prALetter}, // L& [103] LATIN CAPITAL LETTER S WITH SWASH TAIL..COPTIC SYMBOL KAI {0x2CEB, 0x2CEE, prALetter}, // L& [4] COPTIC CAPITAL LETTER CRYPTOGRAMMIC SHEI..COPTIC SMALL LETTER CRYPTOGRAMMIC GANGIA {0x2CEF, 0x2CF1, prExtend}, // Mn [3] COPTIC COMBINING NI ABOVE..COPTIC COMBINING SPIRITUS LENIS {0x2CF2, 0x2CF3, prALetter}, // L& [2] COPTIC CAPITAL LETTER BOHAIRIC KHEI..COPTIC SMALL LETTER BOHAIRIC KHEI {0x2D00, 0x2D25, prALetter}, // L& [38] GEORGIAN SMALL LETTER AN..GEORGIAN SMALL LETTER HOE {0x2D27, 0x2D27, prALetter}, // L& GEORGIAN SMALL LETTER YN {0x2D2D, 0x2D2D, prALetter}, // L& GEORGIAN SMALL LETTER AEN {0x2D30, 0x2D67, prALetter}, // Lo [56] TIFINAGH LETTER YA..TIFINAGH LETTER YO {0x2D6F, 0x2D6F, prALetter}, // Lm TIFINAGH MODIFIER LETTER LABIALIZATION MARK {0x2D7F, 0x2D7F, prExtend}, // Mn TIFINAGH CONSONANT JOINER {0x2D80, 0x2D96, prALetter}, // Lo [23] ETHIOPIC SYLLABLE LOA..ETHIOPIC SYLLABLE GGWE {0x2DA0, 0x2DA6, prALetter}, // Lo [7] ETHIOPIC SYLLABLE SSA..ETHIOPIC SYLLABLE SSO {0x2DA8, 0x2DAE, prALetter}, // Lo [7] ETHIOPIC SYLLABLE CCA..ETHIOPIC SYLLABLE CCO {0x2DB0, 0x2DB6, prALetter}, // Lo [7] ETHIOPIC SYLLABLE ZZA..ETHIOPIC SYLLABLE ZZO {0x2DB8, 0x2DBE, prALetter}, // Lo [7] ETHIOPIC SYLLABLE CCHA..ETHIOPIC SYLLABLE CCHO {0x2DC0, 0x2DC6, prALetter}, // Lo [7] ETHIOPIC SYLLABLE QYA..ETHIOPIC SYLLABLE QYO {0x2DC8, 0x2DCE, prALetter}, // Lo [7] ETHIOPIC SYLLABLE KYA..ETHIOPIC SYLLABLE KYO {0x2DD0, 0x2DD6, prALetter}, // Lo [7] ETHIOPIC SYLLABLE XYA..ETHIOPIC SYLLABLE XYO {0x2DD8, 0x2DDE, prALetter}, // Lo [7] ETHIOPIC SYLLABLE GYA..ETHIOPIC SYLLABLE GYO {0x2DE0, 0x2DFF, prExtend}, // Mn [32] COMBINING CYRILLIC LETTER BE..COMBINING CYRILLIC LETTER IOTIFIED BIG YUS {0x2E2F, 0x2E2F, prALetter}, // Lm VERTICAL TILDE {0x3000, 0x3000, prWSegSpace}, // Zs IDEOGRAPHIC SPACE {0x3005, 0x3005, prALetter}, // Lm IDEOGRAPHIC ITERATION MARK {0x302A, 0x302D, prExtend}, // Mn [4] IDEOGRAPHIC LEVEL TONE MARK..IDEOGRAPHIC ENTERING TONE MARK {0x302E, 0x302F, prExtend}, // Mc [2] HANGUL SINGLE DOT TONE MARK..HANGUL DOUBLE DOT TONE MARK {0x3030, 0x3030, prExtendedPictographic}, // E0.6 [1] (〰️) wavy dash {0x3031, 0x3035, prKatakana}, // Lm [5] VERTICAL KANA REPEAT MARK..VERTICAL KANA REPEAT MARK LOWER HALF {0x303B, 0x303B, prALetter}, // Lm VERTICAL IDEOGRAPHIC ITERATION MARK {0x303C, 0x303C, prALetter}, // Lo MASU MARK {0x303D, 0x303D, prExtendedPictographic}, // E0.6 [1] (〽️) part alternation mark {0x3099, 0x309A, prExtend}, // Mn [2] COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK {0x309B, 0x309C, prKatakana}, // Sk [2] KATAKANA-HIRAGANA VOICED SOUND MARK..KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK {0x30A0, 0x30A0, prKatakana}, // Pd KATAKANA-HIRAGANA DOUBLE HYPHEN {0x30A1, 0x30FA, prKatakana}, // Lo [90] KATAKANA LETTER SMALL A..KATAKANA LETTER VO {0x30FC, 0x30FE, prKatakana}, // Lm [3] KATAKANA-HIRAGANA PROLONGED SOUND MARK..KATAKANA VOICED ITERATION MARK {0x30FF, 0x30FF, prKatakana}, // Lo KATAKANA DIGRAPH KOTO {0x3105, 0x312F, prALetter}, // Lo [43] BOPOMOFO LETTER B..BOPOMOFO LETTER NN {0x3131, 0x318E, prALetter}, // Lo [94] HANGUL LETTER KIYEOK..HANGUL LETTER ARAEAE {0x31A0, 0x31BF, prALetter}, // Lo [32] BOPOMOFO LETTER BU..BOPOMOFO LETTER AH {0x31F0, 0x31FF, prKatakana}, // Lo [16] KATAKANA LETTER SMALL KU..KATAKANA LETTER SMALL RO {0x3297, 0x3297, prExtendedPictographic}, // E0.6 [1] (㊗️) Japanese “congratulations” button {0x3299, 0x3299, prExtendedPictographic}, // E0.6 [1] (㊙️) Japanese “secret” button {0x32D0, 0x32FE, prKatakana}, // So [47] CIRCLED KATAKANA A..CIRCLED KATAKANA WO {0x3300, 0x3357, prKatakana}, // So [88] SQUARE APAATO..SQUARE WATTO {0xA000, 0xA014, prALetter}, // Lo [21] YI SYLLABLE IT..YI SYLLABLE E {0xA015, 0xA015, prALetter}, // Lm YI SYLLABLE WU {0xA016, 0xA48C, prALetter}, // Lo [1143] YI SYLLABLE BIT..YI SYLLABLE YYR {0xA4D0, 0xA4F7, prALetter}, // Lo [40] LISU LETTER BA..LISU LETTER OE {0xA4F8, 0xA4FD, prALetter}, // Lm [6] LISU LETTER TONE MYA TI..LISU LETTER TONE MYA JEU {0xA500, 0xA60B, prALetter}, // Lo [268] VAI SYLLABLE EE..VAI SYLLABLE NG {0xA60C, 0xA60C, prALetter}, // Lm VAI SYLLABLE LENGTHENER {0xA610, 0xA61F, prALetter}, // Lo [16] VAI SYLLABLE NDOLE FA..VAI SYMBOL JONG {0xA620, 0xA629, prNumeric}, // Nd [10] VAI DIGIT ZERO..VAI DIGIT NINE {0xA62A, 0xA62B, prALetter}, // Lo [2] VAI SYLLABLE NDOLE MA..VAI SYLLABLE NDOLE DO {0xA640, 0xA66D, prALetter}, // L& [46] CYRILLIC CAPITAL LETTER ZEMLYA..CYRILLIC SMALL LETTER DOUBLE MONOCULAR O {0xA66E, 0xA66E, prALetter}, // Lo CYRILLIC LETTER MULTIOCULAR O {0xA66F, 0xA66F, prExtend}, // Mn COMBINING CYRILLIC VZMET {0xA670, 0xA672, prExtend}, // Me [3] COMBINING CYRILLIC TEN MILLIONS SIGN..COMBINING CYRILLIC THOUSAND MILLIONS SIGN {0xA674, 0xA67D, prExtend}, // Mn [10] COMBINING CYRILLIC LETTER UKRAINIAN IE..COMBINING CYRILLIC PAYEROK {0xA67F, 0xA67F, prALetter}, // Lm CYRILLIC PAYEROK {0xA680, 0xA69B, prALetter}, // L& [28] CYRILLIC CAPITAL LETTER DWE..CYRILLIC SMALL LETTER CROSSED O {0xA69C, 0xA69D, prALetter}, // Lm [2] MODIFIER LETTER CYRILLIC HARD SIGN..MODIFIER LETTER CYRILLIC SOFT SIGN {0xA69E, 0xA69F, prExtend}, // Mn [2] COMBINING CYRILLIC LETTER EF..COMBINING CYRILLIC LETTER IOTIFIED E {0xA6A0, 0xA6E5, prALetter}, // Lo [70] BAMUM LETTER A..BAMUM LETTER KI {0xA6E6, 0xA6EF, prALetter}, // Nl [10] BAMUM LETTER MO..BAMUM LETTER KOGHOM {0xA6F0, 0xA6F1, prExtend}, // Mn [2] BAMUM COMBINING MARK KOQNDON..BAMUM COMBINING MARK TUKWENTIS {0xA708, 0xA716, prALetter}, // Sk [15] MODIFIER LETTER EXTRA-HIGH DOTTED TONE BAR..MODIFIER LETTER EXTRA-LOW LEFT-STEM TONE BAR {0xA717, 0xA71F, prALetter}, // Lm [9] MODIFIER LETTER DOT VERTICAL BAR..MODIFIER LETTER LOW INVERTED EXCLAMATION MARK {0xA720, 0xA721, prALetter}, // Sk [2] MODIFIER LETTER STRESS AND HIGH TONE..MODIFIER LETTER STRESS AND LOW TONE {0xA722, 0xA76F, prALetter}, // L& [78] LATIN CAPITAL LETTER EGYPTOLOGICAL ALEF..LATIN SMALL LETTER CON {0xA770, 0xA770, prALetter}, // Lm MODIFIER LETTER US {0xA771, 0xA787, prALetter}, // L& [23] LATIN SMALL LETTER DUM..LATIN SMALL LETTER INSULAR T {0xA788, 0xA788, prALetter}, // Lm MODIFIER LETTER LOW CIRCUMFLEX ACCENT {0xA789, 0xA78A, prALetter}, // Sk [2] MODIFIER LETTER COLON..MODIFIER LETTER SHORT EQUALS SIGN {0xA78B, 0xA78E, prALetter}, // L& [4] LATIN CAPITAL LETTER SALTILLO..LATIN SMALL LETTER L WITH RETROFLEX HOOK AND BELT {0xA78F, 0xA78F, prALetter}, // Lo LATIN LETTER SINOLOGICAL DOT {0xA790, 0xA7CA, prALetter}, // L& [59] LATIN CAPITAL LETTER N WITH DESCENDER..LATIN SMALL LETTER S WITH SHORT STROKE OVERLAY {0xA7D0, 0xA7D1, prALetter}, // L& [2] LATIN CAPITAL LETTER CLOSED INSULAR G..LATIN SMALL LETTER CLOSED INSULAR G {0xA7D3, 0xA7D3, prALetter}, // L& LATIN SMALL LETTER DOUBLE THORN {0xA7D5, 0xA7D9, prALetter}, // L& [5] LATIN SMALL LETTER DOUBLE WYNN..LATIN SMALL LETTER SIGMOID S {0xA7F2, 0xA7F4, prALetter}, // Lm [3] MODIFIER LETTER CAPITAL C..MODIFIER LETTER CAPITAL Q {0xA7F5, 0xA7F6, prALetter}, // L& [2] LATIN CAPITAL LETTER REVERSED HALF H..LATIN SMALL LETTER REVERSED HALF H {0xA7F7, 0xA7F7, prALetter}, // Lo LATIN EPIGRAPHIC LETTER SIDEWAYS I {0xA7F8, 0xA7F9, prALetter}, // Lm [2] MODIFIER LETTER CAPITAL H WITH STROKE..MODIFIER LETTER SMALL LIGATURE OE {0xA7FA, 0xA7FA, prALetter}, // L& LATIN LETTER SMALL CAPITAL TURNED M {0xA7FB, 0xA801, prALetter}, // Lo [7] LATIN EPIGRAPHIC LETTER REVERSED F..SYLOTI NAGRI LETTER I {0xA802, 0xA802, prExtend}, // Mn SYLOTI NAGRI SIGN DVISVARA {0xA803, 0xA805, prALetter}, // Lo [3] SYLOTI NAGRI LETTER U..SYLOTI NAGRI LETTER O {0xA806, 0xA806, prExtend}, // Mn SYLOTI NAGRI SIGN HASANTA {0xA807, 0xA80A, prALetter}, // Lo [4] SYLOTI NAGRI LETTER KO..SYLOTI NAGRI LETTER GHO {0xA80B, 0xA80B, prExtend}, // Mn SYLOTI NAGRI SIGN ANUSVARA {0xA80C, 0xA822, prALetter}, // Lo [23] SYLOTI NAGRI LETTER CO..SYLOTI NAGRI LETTER HO {0xA823, 0xA824, prExtend}, // Mc [2] SYLOTI NAGRI VOWEL SIGN A..SYLOTI NAGRI VOWEL SIGN I {0xA825, 0xA826, prExtend}, // Mn [2] SYLOTI NAGRI VOWEL SIGN U..SYLOTI NAGRI VOWEL SIGN E {0xA827, 0xA827, prExtend}, // Mc SYLOTI NAGRI VOWEL SIGN OO {0xA82C, 0xA82C, prExtend}, // Mn SYLOTI NAGRI SIGN ALTERNATE HASANTA {0xA840, 0xA873, prALetter}, // Lo [52] PHAGS-PA LETTER KA..PHAGS-PA LETTER CANDRABINDU {0xA880, 0xA881, prExtend}, // Mc [2] SAURASHTRA SIGN ANUSVARA..SAURASHTRA SIGN VISARGA {0xA882, 0xA8B3, prALetter}, // Lo [50] SAURASHTRA LETTER A..SAURASHTRA LETTER LLA {0xA8B4, 0xA8C3, prExtend}, // Mc [16] SAURASHTRA CONSONANT SIGN HAARU..SAURASHTRA VOWEL SIGN AU {0xA8C4, 0xA8C5, prExtend}, // Mn [2] SAURASHTRA SIGN VIRAMA..SAURASHTRA SIGN CANDRABINDU {0xA8D0, 0xA8D9, prNumeric}, // Nd [10] SAURASHTRA DIGIT ZERO..SAURASHTRA DIGIT NINE {0xA8E0, 0xA8F1, prExtend}, // Mn [18] COMBINING DEVANAGARI DIGIT ZERO..COMBINING DEVANAGARI SIGN AVAGRAHA {0xA8F2, 0xA8F7, prALetter}, // Lo [6] DEVANAGARI SIGN SPACING CANDRABINDU..DEVANAGARI SIGN CANDRABINDU AVAGRAHA {0xA8FB, 0xA8FB, prALetter}, // Lo DEVANAGARI HEADSTROKE {0xA8FD, 0xA8FE, prALetter}, // Lo [2] DEVANAGARI JAIN OM..DEVANAGARI LETTER AY {0xA8FF, 0xA8FF, prExtend}, // Mn DEVANAGARI VOWEL SIGN AY {0xA900, 0xA909, prNumeric}, // Nd [10] KAYAH LI DIGIT ZERO..KAYAH LI DIGIT NINE {0xA90A, 0xA925, prALetter}, // Lo [28] KAYAH LI LETTER KA..KAYAH LI LETTER OO {0xA926, 0xA92D, prExtend}, // Mn [8] KAYAH LI VOWEL UE..KAYAH LI TONE CALYA PLOPHU {0xA930, 0xA946, prALetter}, // Lo [23] REJANG LETTER KA..REJANG LETTER A {0xA947, 0xA951, prExtend}, // Mn [11] REJANG VOWEL SIGN I..REJANG CONSONANT SIGN R {0xA952, 0xA953, prExtend}, // Mc [2] REJANG CONSONANT SIGN H..REJANG VIRAMA {0xA960, 0xA97C, prALetter}, // Lo [29] HANGUL CHOSEONG TIKEUT-MIEUM..HANGUL CHOSEONG SSANGYEORINHIEUH {0xA980, 0xA982, prExtend}, // Mn [3] JAVANESE SIGN PANYANGGA..JAVANESE SIGN LAYAR {0xA983, 0xA983, prExtend}, // Mc JAVANESE SIGN WIGNYAN {0xA984, 0xA9B2, prALetter}, // Lo [47] JAVANESE LETTER A..JAVANESE LETTER HA {0xA9B3, 0xA9B3, prExtend}, // Mn JAVANESE SIGN CECAK TELU {0xA9B4, 0xA9B5, prExtend}, // Mc [2] JAVANESE VOWEL SIGN TARUNG..JAVANESE VOWEL SIGN TOLONG {0xA9B6, 0xA9B9, prExtend}, // Mn [4] JAVANESE VOWEL SIGN WULU..JAVANESE VOWEL SIGN SUKU MENDUT {0xA9BA, 0xA9BB, prExtend}, // Mc [2] JAVANESE VOWEL SIGN TALING..JAVANESE VOWEL SIGN DIRGA MURE {0xA9BC, 0xA9BD, prExtend}, // Mn [2] JAVANESE VOWEL SIGN PEPET..JAVANESE CONSONANT SIGN KERET {0xA9BE, 0xA9C0, prExtend}, // Mc [3] JAVANESE CONSONANT SIGN PENGKAL..JAVANESE PANGKON {0xA9CF, 0xA9CF, prALetter}, // Lm JAVANESE PANGRANGKEP {0xA9D0, 0xA9D9, prNumeric}, // Nd [10] JAVANESE DIGIT ZERO..JAVANESE DIGIT NINE {0xA9E5, 0xA9E5, prExtend}, // Mn MYANMAR SIGN SHAN SAW {0xA9F0, 0xA9F9, prNumeric}, // Nd [10] MYANMAR TAI LAING DIGIT ZERO..MYANMAR TAI LAING DIGIT NINE {0xAA00, 0xAA28, prALetter}, // Lo [41] CHAM LETTER A..CHAM LETTER HA {0xAA29, 0xAA2E, prExtend}, // Mn [6] CHAM VOWEL SIGN AA..CHAM VOWEL SIGN OE {0xAA2F, 0xAA30, prExtend}, // Mc [2] CHAM VOWEL SIGN O..CHAM VOWEL SIGN AI {0xAA31, 0xAA32, prExtend}, // Mn [2] CHAM VOWEL SIGN AU..CHAM VOWEL SIGN UE {0xAA33, 0xAA34, prExtend}, // Mc [2] CHAM CONSONANT SIGN YA..CHAM CONSONANT SIGN RA {0xAA35, 0xAA36, prExtend}, // Mn [2] CHAM CONSONANT SIGN LA..CHAM CONSONANT SIGN WA {0xAA40, 0xAA42, prALetter}, // Lo [3] CHAM LETTER FINAL K..CHAM LETTER FINAL NG {0xAA43, 0xAA43, prExtend}, // Mn CHAM CONSONANT SIGN FINAL NG {0xAA44, 0xAA4B, prALetter}, // Lo [8] CHAM LETTER FINAL CH..CHAM LETTER FINAL SS {0xAA4C, 0xAA4C, prExtend}, // Mn CHAM CONSONANT SIGN FINAL M {0xAA4D, 0xAA4D, prExtend}, // Mc CHAM CONSONANT SIGN FINAL H {0xAA50, 0xAA59, prNumeric}, // Nd [10] CHAM DIGIT ZERO..CHAM DIGIT NINE {0xAA7B, 0xAA7B, prExtend}, // Mc MYANMAR SIGN PAO KAREN TONE {0xAA7C, 0xAA7C, prExtend}, // Mn MYANMAR SIGN TAI LAING TONE-2 {0xAA7D, 0xAA7D, prExtend}, // Mc MYANMAR SIGN TAI LAING TONE-5 {0xAAB0, 0xAAB0, prExtend}, // Mn TAI VIET MAI KANG {0xAAB2, 0xAAB4, prExtend}, // Mn [3] TAI VIET VOWEL I..TAI VIET VOWEL U {0xAAB7, 0xAAB8, prExtend}, // Mn [2] TAI VIET MAI KHIT..TAI VIET VOWEL IA {0xAABE, 0xAABF, prExtend}, // Mn [2] TAI VIET VOWEL AM..TAI VIET TONE MAI EK {0xAAC1, 0xAAC1, prExtend}, // Mn TAI VIET TONE MAI THO {0xAAE0, 0xAAEA, prALetter}, // Lo [11] MEETEI MAYEK LETTER E..MEETEI MAYEK LETTER SSA {0xAAEB, 0xAAEB, prExtend}, // Mc MEETEI MAYEK VOWEL SIGN II {0xAAEC, 0xAAED, prExtend}, // Mn [2] MEETEI MAYEK VOWEL SIGN UU..MEETEI MAYEK VOWEL SIGN AAI {0xAAEE, 0xAAEF, prExtend}, // Mc [2] MEETEI MAYEK VOWEL SIGN AU..MEETEI MAYEK VOWEL SIGN AAU {0xAAF2, 0xAAF2, prALetter}, // Lo MEETEI MAYEK ANJI {0xAAF3, 0xAAF4, prALetter}, // Lm [2] MEETEI MAYEK SYLLABLE REPETITION MARK..MEETEI MAYEK WORD REPETITION MARK {0xAAF5, 0xAAF5, prExtend}, // Mc MEETEI MAYEK VOWEL SIGN VISARGA {0xAAF6, 0xAAF6, prExtend}, // Mn MEETEI MAYEK VIRAMA {0xAB01, 0xAB06, prALetter}, // Lo [6] ETHIOPIC SYLLABLE TTHU..ETHIOPIC SYLLABLE TTHO {0xAB09, 0xAB0E, prALetter}, // Lo [6] ETHIOPIC SYLLABLE DDHU..ETHIOPIC SYLLABLE DDHO {0xAB11, 0xAB16, prALetter}, // Lo [6] ETHIOPIC SYLLABLE DZU..ETHIOPIC SYLLABLE DZO {0xAB20, 0xAB26, prALetter}, // Lo [7] ETHIOPIC SYLLABLE CCHHA..ETHIOPIC SYLLABLE CCHHO {0xAB28, 0xAB2E, prALetter}, // Lo [7] ETHIOPIC SYLLABLE BBA..ETHIOPIC SYLLABLE BBO {0xAB30, 0xAB5A, prALetter}, // L& [43] LATIN SMALL LETTER BARRED ALPHA..LATIN SMALL LETTER Y WITH SHORT RIGHT LEG {0xAB5B, 0xAB5B, prALetter}, // Sk MODIFIER BREVE WITH INVERTED BREVE {0xAB5C, 0xAB5F, prALetter}, // Lm [4] MODIFIER LETTER SMALL HENG..MODIFIER LETTER SMALL U WITH LEFT HOOK {0xAB60, 0xAB68, prALetter}, // L& [9] LATIN SMALL LETTER SAKHA YAT..LATIN SMALL LETTER TURNED R WITH MIDDLE TILDE {0xAB69, 0xAB69, prALetter}, // Lm MODIFIER LETTER SMALL TURNED W {0xAB70, 0xABBF, prALetter}, // L& [80] CHEROKEE SMALL LETTER A..CHEROKEE SMALL LETTER YA {0xABC0, 0xABE2, prALetter}, // Lo [35] MEETEI MAYEK LETTER KOK..MEETEI MAYEK LETTER I LONSUM {0xABE3, 0xABE4, prExtend}, // Mc [2] MEETEI MAYEK VOWEL SIGN ONAP..MEETEI MAYEK VOWEL SIGN INAP {0xABE5, 0xABE5, prExtend}, // Mn MEETEI MAYEK VOWEL SIGN ANAP {0xABE6, 0xABE7, prExtend}, // Mc [2] MEETEI MAYEK VOWEL SIGN YENAP..MEETEI MAYEK VOWEL SIGN SOUNAP {0xABE8, 0xABE8, prExtend}, // Mn MEETEI MAYEK VOWEL SIGN UNAP {0xABE9, 0xABEA, prExtend}, // Mc [2] MEETEI MAYEK VOWEL SIGN CHEINAP..MEETEI MAYEK VOWEL SIGN NUNG {0xABEC, 0xABEC, prExtend}, // Mc MEETEI MAYEK LUM IYEK {0xABED, 0xABED, prExtend}, // Mn MEETEI MAYEK APUN IYEK {0xABF0, 0xABF9, prNumeric}, // Nd [10] MEETEI MAYEK DIGIT ZERO..MEETEI MAYEK DIGIT NINE {0xAC00, 0xD7A3, prALetter}, // Lo [11172] HANGUL SYLLABLE GA..HANGUL SYLLABLE HIH {0xD7B0, 0xD7C6, prALetter}, // Lo [23] HANGUL JUNGSEONG O-YEO..HANGUL JUNGSEONG ARAEA-E {0xD7CB, 0xD7FB, prALetter}, // Lo [49] HANGUL JONGSEONG NIEUN-RIEUL..HANGUL JONGSEONG PHIEUPH-THIEUTH {0xFB00, 0xFB06, prALetter}, // L& [7] LATIN SMALL LIGATURE FF..LATIN SMALL LIGATURE ST {0xFB13, 0xFB17, prALetter}, // L& [5] ARMENIAN SMALL LIGATURE MEN NOW..ARMENIAN SMALL LIGATURE MEN XEH {0xFB1D, 0xFB1D, prHebrewLetter}, // Lo HEBREW LETTER YOD WITH HIRIQ {0xFB1E, 0xFB1E, prExtend}, // Mn HEBREW POINT JUDEO-SPANISH VARIKA {0xFB1F, 0xFB28, prHebrewLetter}, // Lo [10] HEBREW LIGATURE YIDDISH YOD YOD PATAH..HEBREW LETTER WIDE TAV {0xFB2A, 0xFB36, prHebrewLetter}, // Lo [13] HEBREW LETTER SHIN WITH SHIN DOT..HEBREW LETTER ZAYIN WITH DAGESH {0xFB38, 0xFB3C, prHebrewLetter}, // Lo [5] HEBREW LETTER TET WITH DAGESH..HEBREW LETTER LAMED WITH DAGESH {0xFB3E, 0xFB3E, prHebrewLetter}, // Lo HEBREW LETTER MEM WITH DAGESH {0xFB40, 0xFB41, prHebrewLetter}, // Lo [2] HEBREW LETTER NUN WITH DAGESH..HEBREW LETTER SAMEKH WITH DAGESH {0xFB43, 0xFB44, prHebrewLetter}, // Lo [2] HEBREW LETTER FINAL PE WITH DAGESH..HEBREW LETTER PE WITH DAGESH {0xFB46, 0xFB4F, prHebrewLetter}, // Lo [10] HEBREW LETTER TSADI WITH DAGESH..HEBREW LIGATURE ALEF LAMED {0xFB50, 0xFBB1, prALetter}, // Lo [98] ARABIC LETTER ALEF WASLA ISOLATED FORM..ARABIC LETTER YEH BARREE WITH HAMZA ABOVE FINAL FORM {0xFBD3, 0xFD3D, prALetter}, // Lo [363] ARABIC LETTER NG ISOLATED FORM..ARABIC LIGATURE ALEF WITH FATHATAN ISOLATED FORM {0xFD50, 0xFD8F, prALetter}, // Lo [64] ARABIC LIGATURE TEH WITH JEEM WITH MEEM INITIAL FORM..ARABIC LIGATURE MEEM WITH KHAH WITH MEEM INITIAL FORM {0xFD92, 0xFDC7, prALetter}, // Lo [54] ARABIC LIGATURE MEEM WITH JEEM WITH KHAH INITIAL FORM..ARABIC LIGATURE NOON WITH JEEM WITH YEH FINAL FORM {0xFDF0, 0xFDFB, prALetter}, // Lo [12] ARABIC LIGATURE SALLA USED AS KORANIC STOP SIGN ISOLATED FORM..ARABIC LIGATURE JALLAJALALOUHOU {0xFE00, 0xFE0F, prExtend}, // Mn [16] VARIATION SELECTOR-1..VARIATION SELECTOR-16 {0xFE10, 0xFE10, prMidNum}, // Po PRESENTATION FORM FOR VERTICAL COMMA {0xFE13, 0xFE13, prMidLetter}, // Po PRESENTATION FORM FOR VERTICAL COLON {0xFE14, 0xFE14, prMidNum}, // Po PRESENTATION FORM FOR VERTICAL SEMICOLON {0xFE20, 0xFE2F, prExtend}, // Mn [16] COMBINING LIGATURE LEFT HALF..COMBINING CYRILLIC TITLO RIGHT HALF {0xFE33, 0xFE34, prExtendNumLet}, // Pc [2] PRESENTATION FORM FOR VERTICAL LOW LINE..PRESENTATION FORM FOR VERTICAL WAVY LOW LINE {0xFE4D, 0xFE4F, prExtendNumLet}, // Pc [3] DASHED LOW LINE..WAVY LOW LINE {0xFE50, 0xFE50, prMidNum}, // Po SMALL COMMA {0xFE52, 0xFE52, prMidNumLet}, // Po SMALL FULL STOP {0xFE54, 0xFE54, prMidNum}, // Po SMALL SEMICOLON {0xFE55, 0xFE55, prMidLetter}, // Po SMALL COLON {0xFE70, 0xFE74, prALetter}, // Lo [5] ARABIC FATHATAN ISOLATED FORM..ARABIC KASRATAN ISOLATED FORM {0xFE76, 0xFEFC, prALetter}, // Lo [135] ARABIC FATHA ISOLATED FORM..ARABIC LIGATURE LAM WITH ALEF FINAL FORM {0xFEFF, 0xFEFF, prFormat}, // Cf ZERO WIDTH NO-BREAK SPACE {0xFF07, 0xFF07, prMidNumLet}, // Po FULLWIDTH APOSTROPHE {0xFF0C, 0xFF0C, prMidNum}, // Po FULLWIDTH COMMA {0xFF0E, 0xFF0E, prMidNumLet}, // Po FULLWIDTH FULL STOP {0xFF10, 0xFF19, prNumeric}, // Nd [10] FULLWIDTH DIGIT ZERO..FULLWIDTH DIGIT NINE {0xFF1A, 0xFF1A, prMidLetter}, // Po FULLWIDTH COLON {0xFF1B, 0xFF1B, prMidNum}, // Po FULLWIDTH SEMICOLON {0xFF21, 0xFF3A, prALetter}, // L& [26] FULLWIDTH LATIN CAPITAL LETTER A..FULLWIDTH LATIN CAPITAL LETTER Z {0xFF3F, 0xFF3F, prExtendNumLet}, // Pc FULLWIDTH LOW LINE {0xFF41, 0xFF5A, prALetter}, // L& [26] FULLWIDTH LATIN SMALL LETTER A..FULLWIDTH LATIN SMALL LETTER Z {0xFF66, 0xFF6F, prKatakana}, // Lo [10] HALFWIDTH KATAKANA LETTER WO..HALFWIDTH KATAKANA LETTER SMALL TU {0xFF70, 0xFF70, prKatakana}, // Lm HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK {0xFF71, 0xFF9D, prKatakana}, // Lo [45] HALFWIDTH KATAKANA LETTER A..HALFWIDTH KATAKANA LETTER N {0xFF9E, 0xFF9F, prExtend}, // Lm [2] HALFWIDTH KATAKANA VOICED SOUND MARK..HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK {0xFFA0, 0xFFBE, prALetter}, // Lo [31] HALFWIDTH HANGUL FILLER..HALFWIDTH HANGUL LETTER HIEUH {0xFFC2, 0xFFC7, prALetter}, // Lo [6] HALFWIDTH HANGUL LETTER A..HALFWIDTH HANGUL LETTER E {0xFFCA, 0xFFCF, prALetter}, // Lo [6] HALFWIDTH HANGUL LETTER YEO..HALFWIDTH HANGUL LETTER OE {0xFFD2, 0xFFD7, prALetter}, // Lo [6] HALFWIDTH HANGUL LETTER YO..HALFWIDTH HANGUL LETTER YU {0xFFDA, 0xFFDC, prALetter}, // Lo [3] HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL LETTER I {0xFFF9, 0xFFFB, prFormat}, // Cf [3] INTERLINEAR ANNOTATION ANCHOR..INTERLINEAR ANNOTATION TERMINATOR {0x10000, 0x1000B, prALetter}, // Lo [12] LINEAR B SYLLABLE B008 A..LINEAR B SYLLABLE B046 JE {0x1000D, 0x10026, prALetter}, // Lo [26] LINEAR B SYLLABLE B036 JO..LINEAR B SYLLABLE B032 QO {0x10028, 0x1003A, prALetter}, // Lo [19] LINEAR B SYLLABLE B060 RA..LINEAR B SYLLABLE B042 WO {0x1003C, 0x1003D, prALetter}, // Lo [2] LINEAR B SYLLABLE B017 ZA..LINEAR B SYLLABLE B074 ZE {0x1003F, 0x1004D, prALetter}, // Lo [15] LINEAR B SYLLABLE B020 ZO..LINEAR B SYLLABLE B091 TWO {0x10050, 0x1005D, prALetter}, // Lo [14] LINEAR B SYMBOL B018..LINEAR B SYMBOL B089 {0x10080, 0x100FA, prALetter}, // Lo [123] LINEAR B IDEOGRAM B100 MAN..LINEAR B IDEOGRAM VESSEL B305 {0x10140, 0x10174, prALetter}, // Nl [53] GREEK ACROPHONIC ATTIC ONE QUARTER..GREEK ACROPHONIC STRATIAN FIFTY MNAS {0x101FD, 0x101FD, prExtend}, // Mn PHAISTOS DISC SIGN COMBINING OBLIQUE STROKE {0x10280, 0x1029C, prALetter}, // Lo [29] LYCIAN LETTER A..LYCIAN LETTER X {0x102A0, 0x102D0, prALetter}, // Lo [49] CARIAN LETTER A..CARIAN LETTER UUU3 {0x102E0, 0x102E0, prExtend}, // Mn COPTIC EPACT THOUSANDS MARK {0x10300, 0x1031F, prALetter}, // Lo [32] OLD ITALIC LETTER A..OLD ITALIC LETTER ESS {0x1032D, 0x10340, prALetter}, // Lo [20] OLD ITALIC LETTER YE..GOTHIC LETTER PAIRTHRA {0x10341, 0x10341, prALetter}, // Nl GOTHIC LETTER NINETY {0x10342, 0x10349, prALetter}, // Lo [8] GOTHIC LETTER RAIDA..GOTHIC LETTER OTHAL {0x1034A, 0x1034A, prALetter}, // Nl GOTHIC LETTER NINE HUNDRED {0x10350, 0x10375, prALetter}, // Lo [38] OLD PERMIC LETTER AN..OLD PERMIC LETTER IA {0x10376, 0x1037A, prExtend}, // Mn [5] COMBINING OLD PERMIC LETTER AN..COMBINING OLD PERMIC LETTER SII {0x10380, 0x1039D, prALetter}, // Lo [30] UGARITIC LETTER ALPA..UGARITIC LETTER SSU {0x103A0, 0x103C3, prALetter}, // Lo [36] OLD PERSIAN SIGN A..OLD PERSIAN SIGN HA {0x103C8, 0x103CF, prALetter}, // Lo [8] OLD PERSIAN SIGN AURAMAZDAA..OLD PERSIAN SIGN BUUMISH {0x103D1, 0x103D5, prALetter}, // Nl [5] OLD PERSIAN NUMBER ONE..OLD PERSIAN NUMBER HUNDRED {0x10400, 0x1044F, prALetter}, // L& [80] DESERET CAPITAL LETTER LONG I..DESERET SMALL LETTER EW {0x10450, 0x1049D, prALetter}, // Lo [78] SHAVIAN LETTER PEEP..OSMANYA LETTER OO {0x104A0, 0x104A9, prNumeric}, // Nd [10] OSMANYA DIGIT ZERO..OSMANYA DIGIT NINE {0x104B0, 0x104D3, prALetter}, // L& [36] OSAGE CAPITAL LETTER A..OSAGE CAPITAL LETTER ZHA {0x104D8, 0x104FB, prALetter}, // L& [36] OSAGE SMALL LETTER A..OSAGE SMALL LETTER ZHA {0x10500, 0x10527, prALetter}, // Lo [40] ELBASAN LETTER A..ELBASAN LETTER KHE {0x10530, 0x10563, prALetter}, // Lo [52] CAUCASIAN ALBANIAN LETTER ALT..CAUCASIAN ALBANIAN LETTER KIW {0x10570, 0x1057A, prALetter}, // L& [11] VITHKUQI CAPITAL LETTER A..VITHKUQI CAPITAL LETTER GA {0x1057C, 0x1058A, prALetter}, // L& [15] VITHKUQI CAPITAL LETTER HA..VITHKUQI CAPITAL LETTER RE {0x1058C, 0x10592, prALetter}, // L& [7] VITHKUQI CAPITAL LETTER SE..VITHKUQI CAPITAL LETTER XE {0x10594, 0x10595, prALetter}, // L& [2] VITHKUQI CAPITAL LETTER Y..VITHKUQI CAPITAL LETTER ZE {0x10597, 0x105A1, prALetter}, // L& [11] VITHKUQI SMALL LETTER A..VITHKUQI SMALL LETTER GA {0x105A3, 0x105B1, prALetter}, // L& [15] VITHKUQI SMALL LETTER HA..VITHKUQI SMALL LETTER RE {0x105B3, 0x105B9, prALetter}, // L& [7] VITHKUQI SMALL LETTER SE..VITHKUQI SMALL LETTER XE {0x105BB, 0x105BC, prALetter}, // L& [2] VITHKUQI SMALL LETTER Y..VITHKUQI SMALL LETTER ZE {0x10600, 0x10736, prALetter}, // Lo [311] LINEAR A SIGN AB001..LINEAR A SIGN A664 {0x10740, 0x10755, prALetter}, // Lo [22] LINEAR A SIGN A701 A..LINEAR A SIGN A732 JE {0x10760, 0x10767, prALetter}, // Lo [8] LINEAR A SIGN A800..LINEAR A SIGN A807 {0x10780, 0x10785, prALetter}, // Lm [6] MODIFIER LETTER SMALL CAPITAL AA..MODIFIER LETTER SMALL B WITH HOOK {0x10787, 0x107B0, prALetter}, // Lm [42] MODIFIER LETTER SMALL DZ DIGRAPH..MODIFIER LETTER SMALL V WITH RIGHT HOOK {0x107B2, 0x107BA, prALetter}, // Lm [9] MODIFIER LETTER SMALL CAPITAL Y..MODIFIER LETTER SMALL S WITH CURL {0x10800, 0x10805, prALetter}, // Lo [6] CYPRIOT SYLLABLE A..CYPRIOT SYLLABLE JA {0x10808, 0x10808, prALetter}, // Lo CYPRIOT SYLLABLE JO {0x1080A, 0x10835, prALetter}, // Lo [44] CYPRIOT SYLLABLE KA..CYPRIOT SYLLABLE WO {0x10837, 0x10838, prALetter}, // Lo [2] CYPRIOT SYLLABLE XA..CYPRIOT SYLLABLE XE {0x1083C, 0x1083C, prALetter}, // Lo CYPRIOT SYLLABLE ZA {0x1083F, 0x10855, prALetter}, // Lo [23] CYPRIOT SYLLABLE ZO..IMPERIAL ARAMAIC LETTER TAW {0x10860, 0x10876, prALetter}, // Lo [23] PALMYRENE LETTER ALEPH..PALMYRENE LETTER TAW {0x10880, 0x1089E, prALetter}, // Lo [31] NABATAEAN LETTER FINAL ALEPH..NABATAEAN LETTER TAW {0x108E0, 0x108F2, prALetter}, // Lo [19] HATRAN LETTER ALEPH..HATRAN LETTER QOPH {0x108F4, 0x108F5, prALetter}, // Lo [2] HATRAN LETTER SHIN..HATRAN LETTER TAW {0x10900, 0x10915, prALetter}, // Lo [22] PHOENICIAN LETTER ALF..PHOENICIAN LETTER TAU {0x10920, 0x10939, prALetter}, // Lo [26] LYDIAN LETTER A..LYDIAN LETTER C {0x10980, 0x109B7, prALetter}, // Lo [56] MEROITIC HIEROGLYPHIC LETTER A..MEROITIC CURSIVE LETTER DA {0x109BE, 0x109BF, prALetter}, // Lo [2] MEROITIC CURSIVE LOGOGRAM RMT..MEROITIC CURSIVE LOGOGRAM IMN {0x10A00, 0x10A00, prALetter}, // Lo KHAROSHTHI LETTER A {0x10A01, 0x10A03, prExtend}, // Mn [3] KHAROSHTHI VOWEL SIGN I..KHAROSHTHI VOWEL SIGN VOCALIC R {0x10A05, 0x10A06, prExtend}, // Mn [2] KHAROSHTHI VOWEL SIGN E..KHAROSHTHI VOWEL SIGN O {0x10A0C, 0x10A0F, prExtend}, // Mn [4] KHAROSHTHI VOWEL LENGTH MARK..KHAROSHTHI SIGN VISARGA {0x10A10, 0x10A13, prALetter}, // Lo [4] KHAROSHTHI LETTER KA..KHAROSHTHI LETTER GHA {0x10A15, 0x10A17, prALetter}, // Lo [3] KHAROSHTHI LETTER CA..KHAROSHTHI LETTER JA {0x10A19, 0x10A35, prALetter}, // Lo [29] KHAROSHTHI LETTER NYA..KHAROSHTHI LETTER VHA {0x10A38, 0x10A3A, prExtend}, // Mn [3] KHAROSHTHI SIGN BAR ABOVE..KHAROSHTHI SIGN DOT BELOW {0x10A3F, 0x10A3F, prExtend}, // Mn KHAROSHTHI VIRAMA {0x10A60, 0x10A7C, prALetter}, // Lo [29] OLD SOUTH ARABIAN LETTER HE..OLD SOUTH ARABIAN LETTER THETH {0x10A80, 0x10A9C, prALetter}, // Lo [29] OLD NORTH ARABIAN LETTER HEH..OLD NORTH ARABIAN LETTER ZAH {0x10AC0, 0x10AC7, prALetter}, // Lo [8] MANICHAEAN LETTER ALEPH..MANICHAEAN LETTER WAW {0x10AC9, 0x10AE4, prALetter}, // Lo [28] MANICHAEAN LETTER ZAYIN..MANICHAEAN LETTER TAW {0x10AE5, 0x10AE6, prExtend}, // Mn [2] MANICHAEAN ABBREVIATION MARK ABOVE..MANICHAEAN ABBREVIATION MARK BELOW {0x10B00, 0x10B35, prALetter}, // Lo [54] AVESTAN LETTER A..AVESTAN LETTER HE {0x10B40, 0x10B55, prALetter}, // Lo [22] INSCRIPTIONAL PARTHIAN LETTER ALEPH..INSCRIPTIONAL PARTHIAN LETTER TAW {0x10B60, 0x10B72, prALetter}, // Lo [19] INSCRIPTIONAL PAHLAVI LETTER ALEPH..INSCRIPTIONAL PAHLAVI LETTER TAW {0x10B80, 0x10B91, prALetter}, // Lo [18] PSALTER PAHLAVI LETTER ALEPH..PSALTER PAHLAVI LETTER TAW {0x10C00, 0x10C48, prALetter}, // Lo [73] OLD TURKIC LETTER ORKHON A..OLD TURKIC LETTER ORKHON BASH {0x10C80, 0x10CB2, prALetter}, // L& [51] OLD HUNGARIAN CAPITAL LETTER A..OLD HUNGARIAN CAPITAL LETTER US {0x10CC0, 0x10CF2, prALetter}, // L& [51] OLD HUNGARIAN SMALL LETTER A..OLD HUNGARIAN SMALL LETTER US {0x10D00, 0x10D23, prALetter}, // Lo [36] HANIFI ROHINGYA LETTER A..HANIFI ROHINGYA MARK NA KHONNA {0x10D24, 0x10D27, prExtend}, // Mn [4] HANIFI ROHINGYA SIGN HARBAHAY..HANIFI ROHINGYA SIGN TASSI {0x10D30, 0x10D39, prNumeric}, // Nd [10] HANIFI ROHINGYA DIGIT ZERO..HANIFI ROHINGYA DIGIT NINE {0x10E80, 0x10EA9, prALetter}, // Lo [42] YEZIDI LETTER ELIF..YEZIDI LETTER ET {0x10EAB, 0x10EAC, prExtend}, // Mn [2] YEZIDI COMBINING HAMZA MARK..YEZIDI COMBINING MADDA MARK {0x10EB0, 0x10EB1, prALetter}, // Lo [2] YEZIDI LETTER LAM WITH DOT ABOVE..YEZIDI LETTER YOT WITH CIRCUMFLEX ABOVE {0x10EFD, 0x10EFF, prExtend}, // Mn [3] ARABIC SMALL LOW WORD SAKTA..ARABIC SMALL LOW WORD MADDA {0x10F00, 0x10F1C, prALetter}, // Lo [29] OLD SOGDIAN LETTER ALEPH..OLD SOGDIAN LETTER FINAL TAW WITH VERTICAL TAIL {0x10F27, 0x10F27, prALetter}, // Lo OLD SOGDIAN LIGATURE AYIN-DALETH {0x10F30, 0x10F45, prALetter}, // Lo [22] SOGDIAN LETTER ALEPH..SOGDIAN INDEPENDENT SHIN {0x10F46, 0x10F50, prExtend}, // Mn [11] SOGDIAN COMBINING DOT BELOW..SOGDIAN COMBINING STROKE BELOW {0x10F70, 0x10F81, prALetter}, // Lo [18] OLD UYGHUR LETTER ALEPH..OLD UYGHUR LETTER LESH {0x10F82, 0x10F85, prExtend}, // Mn [4] OLD UYGHUR COMBINING DOT ABOVE..OLD UYGHUR COMBINING TWO DOTS BELOW {0x10FB0, 0x10FC4, prALetter}, // Lo [21] CHORASMIAN LETTER ALEPH..CHORASMIAN LETTER TAW {0x10FE0, 0x10FF6, prALetter}, // Lo [23] ELYMAIC LETTER ALEPH..ELYMAIC LIGATURE ZAYIN-YODH {0x11000, 0x11000, prExtend}, // Mc BRAHMI SIGN CANDRABINDU {0x11001, 0x11001, prExtend}, // Mn BRAHMI SIGN ANUSVARA {0x11002, 0x11002, prExtend}, // Mc BRAHMI SIGN VISARGA {0x11003, 0x11037, prALetter}, // Lo [53] BRAHMI SIGN JIHVAMULIYA..BRAHMI LETTER OLD TAMIL NNNA {0x11038, 0x11046, prExtend}, // Mn [15] BRAHMI VOWEL SIGN AA..BRAHMI VIRAMA {0x11066, 0x1106F, prNumeric}, // Nd [10] BRAHMI DIGIT ZERO..BRAHMI DIGIT NINE {0x11070, 0x11070, prExtend}, // Mn BRAHMI SIGN OLD TAMIL VIRAMA {0x11071, 0x11072, prALetter}, // Lo [2] BRAHMI LETTER OLD TAMIL SHORT E..BRAHMI LETTER OLD TAMIL SHORT O {0x11073, 0x11074, prExtend}, // Mn [2] BRAHMI VOWEL SIGN OLD TAMIL SHORT E..BRAHMI VOWEL SIGN OLD TAMIL SHORT O {0x11075, 0x11075, prALetter}, // Lo BRAHMI LETTER OLD TAMIL LLA {0x1107F, 0x11081, prExtend}, // Mn [3] BRAHMI NUMBER JOINER..KAITHI SIGN ANUSVARA {0x11082, 0x11082, prExtend}, // Mc KAITHI SIGN VISARGA {0x11083, 0x110AF, prALetter}, // Lo [45] KAITHI LETTER A..KAITHI LETTER HA {0x110B0, 0x110B2, prExtend}, // Mc [3] KAITHI VOWEL SIGN AA..KAITHI VOWEL SIGN II {0x110B3, 0x110B6, prExtend}, // Mn [4] KAITHI VOWEL SIGN U..KAITHI VOWEL SIGN AI {0x110B7, 0x110B8, prExtend}, // Mc [2] KAITHI VOWEL SIGN O..KAITHI VOWEL SIGN AU {0x110B9, 0x110BA, prExtend}, // Mn [2] KAITHI SIGN VIRAMA..KAITHI SIGN NUKTA {0x110BD, 0x110BD, prFormat}, // Cf KAITHI NUMBER SIGN {0x110C2, 0x110C2, prExtend}, // Mn KAITHI VOWEL SIGN VOCALIC R {0x110CD, 0x110CD, prFormat}, // Cf KAITHI NUMBER SIGN ABOVE {0x110D0, 0x110E8, prALetter}, // Lo [25] SORA SOMPENG LETTER SAH..SORA SOMPENG LETTER MAE {0x110F0, 0x110F9, prNumeric}, // Nd [10] SORA SOMPENG DIGIT ZERO..SORA SOMPENG DIGIT NINE {0x11100, 0x11102, prExtend}, // Mn [3] CHAKMA SIGN CANDRABINDU..CHAKMA SIGN VISARGA {0x11103, 0x11126, prALetter}, // Lo [36] CHAKMA LETTER AA..CHAKMA LETTER HAA {0x11127, 0x1112B, prExtend}, // Mn [5] CHAKMA VOWEL SIGN A..CHAKMA VOWEL SIGN UU {0x1112C, 0x1112C, prExtend}, // Mc CHAKMA VOWEL SIGN E {0x1112D, 0x11134, prExtend}, // Mn [8] CHAKMA VOWEL SIGN AI..CHAKMA MAAYYAA {0x11136, 0x1113F, prNumeric}, // Nd [10] CHAKMA DIGIT ZERO..CHAKMA DIGIT NINE {0x11144, 0x11144, prALetter}, // Lo CHAKMA LETTER LHAA {0x11145, 0x11146, prExtend}, // Mc [2] CHAKMA VOWEL SIGN AA..CHAKMA VOWEL SIGN EI {0x11147, 0x11147, prALetter}, // Lo CHAKMA LETTER VAA {0x11150, 0x11172, prALetter}, // Lo [35] MAHAJANI LETTER A..MAHAJANI LETTER RRA {0x11173, 0x11173, prExtend}, // Mn MAHAJANI SIGN NUKTA {0x11176, 0x11176, prALetter}, // Lo MAHAJANI LIGATURE SHRI {0x11180, 0x11181, prExtend}, // Mn [2] SHARADA SIGN CANDRABINDU..SHARADA SIGN ANUSVARA {0x11182, 0x11182, prExtend}, // Mc SHARADA SIGN VISARGA {0x11183, 0x111B2, prALetter}, // Lo [48] SHARADA LETTER A..SHARADA LETTER HA {0x111B3, 0x111B5, prExtend}, // Mc [3] SHARADA VOWEL SIGN AA..SHARADA VOWEL SIGN II {0x111B6, 0x111BE, prExtend}, // Mn [9] SHARADA VOWEL SIGN U..SHARADA VOWEL SIGN O {0x111BF, 0x111C0, prExtend}, // Mc [2] SHARADA VOWEL SIGN AU..SHARADA SIGN VIRAMA {0x111C1, 0x111C4, prALetter}, // Lo [4] SHARADA SIGN AVAGRAHA..SHARADA OM {0x111C9, 0x111CC, prExtend}, // Mn [4] SHARADA SANDHI MARK..SHARADA EXTRA SHORT VOWEL MARK {0x111CE, 0x111CE, prExtend}, // Mc SHARADA VOWEL SIGN PRISHTHAMATRA E {0x111CF, 0x111CF, prExtend}, // Mn SHARADA SIGN INVERTED CANDRABINDU {0x111D0, 0x111D9, prNumeric}, // Nd [10] SHARADA DIGIT ZERO..SHARADA DIGIT NINE {0x111DA, 0x111DA, prALetter}, // Lo SHARADA EKAM {0x111DC, 0x111DC, prALetter}, // Lo SHARADA HEADSTROKE {0x11200, 0x11211, prALetter}, // Lo [18] KHOJKI LETTER A..KHOJKI LETTER JJA {0x11213, 0x1122B, prALetter}, // Lo [25] KHOJKI LETTER NYA..KHOJKI LETTER LLA {0x1122C, 0x1122E, prExtend}, // Mc [3] KHOJKI VOWEL SIGN AA..KHOJKI VOWEL SIGN II {0x1122F, 0x11231, prExtend}, // Mn [3] KHOJKI VOWEL SIGN U..KHOJKI VOWEL SIGN AI {0x11232, 0x11233, prExtend}, // Mc [2] KHOJKI VOWEL SIGN O..KHOJKI VOWEL SIGN AU {0x11234, 0x11234, prExtend}, // Mn KHOJKI SIGN ANUSVARA {0x11235, 0x11235, prExtend}, // Mc KHOJKI SIGN VIRAMA {0x11236, 0x11237, prExtend}, // Mn [2] KHOJKI SIGN NUKTA..KHOJKI SIGN SHADDA {0x1123E, 0x1123E, prExtend}, // Mn KHOJKI SIGN SUKUN {0x1123F, 0x11240, prALetter}, // Lo [2] KHOJKI LETTER QA..KHOJKI LETTER SHORT I {0x11241, 0x11241, prExtend}, // Mn KHOJKI VOWEL SIGN VOCALIC R {0x11280, 0x11286, prALetter}, // Lo [7] MULTANI LETTER A..MULTANI LETTER GA {0x11288, 0x11288, prALetter}, // Lo MULTANI LETTER GHA {0x1128A, 0x1128D, prALetter}, // Lo [4] MULTANI LETTER CA..MULTANI LETTER JJA {0x1128F, 0x1129D, prALetter}, // Lo [15] MULTANI LETTER NYA..MULTANI LETTER BA {0x1129F, 0x112A8, prALetter}, // Lo [10] MULTANI LETTER BHA..MULTANI LETTER RHA {0x112B0, 0x112DE, prALetter}, // Lo [47] KHUDAWADI LETTER A..KHUDAWADI LETTER HA {0x112DF, 0x112DF, prExtend}, // Mn KHUDAWADI SIGN ANUSVARA {0x112E0, 0x112E2, prExtend}, // Mc [3] KHUDAWADI VOWEL SIGN AA..KHUDAWADI VOWEL SIGN II {0x112E3, 0x112EA, prExtend}, // Mn [8] KHUDAWADI VOWEL SIGN U..KHUDAWADI SIGN VIRAMA {0x112F0, 0x112F9, prNumeric}, // Nd [10] KHUDAWADI DIGIT ZERO..KHUDAWADI DIGIT NINE {0x11300, 0x11301, prExtend}, // Mn [2] GRANTHA SIGN COMBINING ANUSVARA ABOVE..GRANTHA SIGN CANDRABINDU {0x11302, 0x11303, prExtend}, // Mc [2] GRANTHA SIGN ANUSVARA..GRANTHA SIGN VISARGA {0x11305, 0x1130C, prALetter}, // Lo [8] GRANTHA LETTER A..GRANTHA LETTER VOCALIC L {0x1130F, 0x11310, prALetter}, // Lo [2] GRANTHA LETTER EE..GRANTHA LETTER AI {0x11313, 0x11328, prALetter}, // Lo [22] GRANTHA LETTER OO..GRANTHA LETTER NA {0x1132A, 0x11330, prALetter}, // Lo [7] GRANTHA LETTER PA..GRANTHA LETTER RA {0x11332, 0x11333, prALetter}, // Lo [2] GRANTHA LETTER LA..GRANTHA LETTER LLA {0x11335, 0x11339, prALetter}, // Lo [5] GRANTHA LETTER VA..GRANTHA LETTER HA {0x1133B, 0x1133C, prExtend}, // Mn [2] COMBINING BINDU BELOW..GRANTHA SIGN NUKTA {0x1133D, 0x1133D, prALetter}, // Lo GRANTHA SIGN AVAGRAHA {0x1133E, 0x1133F, prExtend}, // Mc [2] GRANTHA VOWEL SIGN AA..GRANTHA VOWEL SIGN I {0x11340, 0x11340, prExtend}, // Mn GRANTHA VOWEL SIGN II {0x11341, 0x11344, prExtend}, // Mc [4] GRANTHA VOWEL SIGN U..GRANTHA VOWEL SIGN VOCALIC RR {0x11347, 0x11348, prExtend}, // Mc [2] GRANTHA VOWEL SIGN EE..GRANTHA VOWEL SIGN AI {0x1134B, 0x1134D, prExtend}, // Mc [3] GRANTHA VOWEL SIGN OO..GRANTHA SIGN VIRAMA {0x11350, 0x11350, prALetter}, // Lo GRANTHA OM {0x11357, 0x11357, prExtend}, // Mc GRANTHA AU LENGTH MARK {0x1135D, 0x11361, prALetter}, // Lo [5] GRANTHA SIGN PLUTA..GRANTHA LETTER VOCALIC LL {0x11362, 0x11363, prExtend}, // Mc [2] GRANTHA VOWEL SIGN VOCALIC L..GRANTHA VOWEL SIGN VOCALIC LL {0x11366, 0x1136C, prExtend}, // Mn [7] COMBINING GRANTHA DIGIT ZERO..COMBINING GRANTHA DIGIT SIX {0x11370, 0x11374, prExtend}, // Mn [5] COMBINING GRANTHA LETTER A..COMBINING GRANTHA LETTER PA {0x11400, 0x11434, prALetter}, // Lo [53] NEWA LETTER A..NEWA LETTER HA {0x11435, 0x11437, prExtend}, // Mc [3] NEWA VOWEL SIGN AA..NEWA VOWEL SIGN II {0x11438, 0x1143F, prExtend}, // Mn [8] NEWA VOWEL SIGN U..NEWA VOWEL SIGN AI {0x11440, 0x11441, prExtend}, // Mc [2] NEWA VOWEL SIGN O..NEWA VOWEL SIGN AU {0x11442, 0x11444, prExtend}, // Mn [3] NEWA SIGN VIRAMA..NEWA SIGN ANUSVARA {0x11445, 0x11445, prExtend}, // Mc NEWA SIGN VISARGA {0x11446, 0x11446, prExtend}, // Mn NEWA SIGN NUKTA {0x11447, 0x1144A, prALetter}, // Lo [4] NEWA SIGN AVAGRAHA..NEWA SIDDHI {0x11450, 0x11459, prNumeric}, // Nd [10] NEWA DIGIT ZERO..NEWA DIGIT NINE {0x1145E, 0x1145E, prExtend}, // Mn NEWA SANDHI MARK {0x1145F, 0x11461, prALetter}, // Lo [3] NEWA LETTER VEDIC ANUSVARA..NEWA SIGN UPADHMANIYA {0x11480, 0x114AF, prALetter}, // Lo [48] TIRHUTA ANJI..TIRHUTA LETTER HA {0x114B0, 0x114B2, prExtend}, // Mc [3] TIRHUTA VOWEL SIGN AA..TIRHUTA VOWEL SIGN II {0x114B3, 0x114B8, prExtend}, // Mn [6] TIRHUTA VOWEL SIGN U..TIRHUTA VOWEL SIGN VOCALIC LL {0x114B9, 0x114B9, prExtend}, // Mc TIRHUTA VOWEL SIGN E {0x114BA, 0x114BA, prExtend}, // Mn TIRHUTA VOWEL SIGN SHORT E {0x114BB, 0x114BE, prExtend}, // Mc [4] TIRHUTA VOWEL SIGN AI..TIRHUTA VOWEL SIGN AU {0x114BF, 0x114C0, prExtend}, // Mn [2] TIRHUTA SIGN CANDRABINDU..TIRHUTA SIGN ANUSVARA {0x114C1, 0x114C1, prExtend}, // Mc TIRHUTA SIGN VISARGA {0x114C2, 0x114C3, prExtend}, // Mn [2] TIRHUTA SIGN VIRAMA..TIRHUTA SIGN NUKTA {0x114C4, 0x114C5, prALetter}, // Lo [2] TIRHUTA SIGN AVAGRAHA..TIRHUTA GVANG {0x114C7, 0x114C7, prALetter}, // Lo TIRHUTA OM {0x114D0, 0x114D9, prNumeric}, // Nd [10] TIRHUTA DIGIT ZERO..TIRHUTA DIGIT NINE {0x11580, 0x115AE, prALetter}, // Lo [47] SIDDHAM LETTER A..SIDDHAM LETTER HA {0x115AF, 0x115B1, prExtend}, // Mc [3] SIDDHAM VOWEL SIGN AA..SIDDHAM VOWEL SIGN II {0x115B2, 0x115B5, prExtend}, // Mn [4] SIDDHAM VOWEL SIGN U..SIDDHAM VOWEL SIGN VOCALIC RR {0x115B8, 0x115BB, prExtend}, // Mc [4] SIDDHAM VOWEL SIGN E..SIDDHAM VOWEL SIGN AU {0x115BC, 0x115BD, prExtend}, // Mn [2] SIDDHAM SIGN CANDRABINDU..SIDDHAM SIGN ANUSVARA {0x115BE, 0x115BE, prExtend}, // Mc SIDDHAM SIGN VISARGA {0x115BF, 0x115C0, prExtend}, // Mn [2] SIDDHAM SIGN VIRAMA..SIDDHAM SIGN NUKTA {0x115D8, 0x115DB, prALetter}, // Lo [4] SIDDHAM LETTER THREE-CIRCLE ALTERNATE I..SIDDHAM LETTER ALTERNATE U {0x115DC, 0x115DD, prExtend}, // Mn [2] SIDDHAM VOWEL SIGN ALTERNATE U..SIDDHAM VOWEL SIGN ALTERNATE UU {0x11600, 0x1162F, prALetter}, // Lo [48] MODI LETTER A..MODI LETTER LLA {0x11630, 0x11632, prExtend}, // Mc [3] MODI VOWEL SIGN AA..MODI VOWEL SIGN II {0x11633, 0x1163A, prExtend}, // Mn [8] MODI VOWEL SIGN U..MODI VOWEL SIGN AI {0x1163B, 0x1163C, prExtend}, // Mc [2] MODI VOWEL SIGN O..MODI VOWEL SIGN AU {0x1163D, 0x1163D, prExtend}, // Mn MODI SIGN ANUSVARA {0x1163E, 0x1163E, prExtend}, // Mc MODI SIGN VISARGA {0x1163F, 0x11640, prExtend}, // Mn [2] MODI SIGN VIRAMA..MODI SIGN ARDHACANDRA {0x11644, 0x11644, prALetter}, // Lo MODI SIGN HUVA {0x11650, 0x11659, prNumeric}, // Nd [10] MODI DIGIT ZERO..MODI DIGIT NINE {0x11680, 0x116AA, prALetter}, // Lo [43] TAKRI LETTER A..TAKRI LETTER RRA {0x116AB, 0x116AB, prExtend}, // Mn TAKRI SIGN ANUSVARA {0x116AC, 0x116AC, prExtend}, // Mc TAKRI SIGN VISARGA {0x116AD, 0x116AD, prExtend}, // Mn TAKRI VOWEL SIGN AA {0x116AE, 0x116AF, prExtend}, // Mc [2] TAKRI VOWEL SIGN I..TAKRI VOWEL SIGN II {0x116B0, 0x116B5, prExtend}, // Mn [6] TAKRI VOWEL SIGN U..TAKRI VOWEL SIGN AU {0x116B6, 0x116B6, prExtend}, // Mc TAKRI SIGN VIRAMA {0x116B7, 0x116B7, prExtend}, // Mn TAKRI SIGN NUKTA {0x116B8, 0x116B8, prALetter}, // Lo TAKRI LETTER ARCHAIC KHA {0x116C0, 0x116C9, prNumeric}, // Nd [10] TAKRI DIGIT ZERO..TAKRI DIGIT NINE {0x1171D, 0x1171F, prExtend}, // Mn [3] AHOM CONSONANT SIGN MEDIAL LA..AHOM CONSONANT SIGN MEDIAL LIGATING RA {0x11720, 0x11721, prExtend}, // Mc [2] AHOM VOWEL SIGN A..AHOM VOWEL SIGN AA {0x11722, 0x11725, prExtend}, // Mn [4] AHOM VOWEL SIGN I..AHOM VOWEL SIGN UU {0x11726, 0x11726, prExtend}, // Mc AHOM VOWEL SIGN E {0x11727, 0x1172B, prExtend}, // Mn [5] AHOM VOWEL SIGN AW..AHOM SIGN KILLER {0x11730, 0x11739, prNumeric}, // Nd [10] AHOM DIGIT ZERO..AHOM DIGIT NINE {0x11800, 0x1182B, prALetter}, // Lo [44] DOGRA LETTER A..DOGRA LETTER RRA {0x1182C, 0x1182E, prExtend}, // Mc [3] DOGRA VOWEL SIGN AA..DOGRA VOWEL SIGN II {0x1182F, 0x11837, prExtend}, // Mn [9] DOGRA VOWEL SIGN U..DOGRA SIGN ANUSVARA {0x11838, 0x11838, prExtend}, // Mc DOGRA SIGN VISARGA {0x11839, 0x1183A, prExtend}, // Mn [2] DOGRA SIGN VIRAMA..DOGRA SIGN NUKTA {0x118A0, 0x118DF, prALetter}, // L& [64] WARANG CITI CAPITAL LETTER NGAA..WARANG CITI SMALL LETTER VIYO {0x118E0, 0x118E9, prNumeric}, // Nd [10] WARANG CITI DIGIT ZERO..WARANG CITI DIGIT NINE {0x118FF, 0x11906, prALetter}, // Lo [8] WARANG CITI OM..DIVES AKURU LETTER E {0x11909, 0x11909, prALetter}, // Lo DIVES AKURU LETTER O {0x1190C, 0x11913, prALetter}, // Lo [8] DIVES AKURU LETTER KA..DIVES AKURU LETTER JA {0x11915, 0x11916, prALetter}, // Lo [2] DIVES AKURU LETTER NYA..DIVES AKURU LETTER TTA {0x11918, 0x1192F, prALetter}, // Lo [24] DIVES AKURU LETTER DDA..DIVES AKURU LETTER ZA {0x11930, 0x11935, prExtend}, // Mc [6] DIVES AKURU VOWEL SIGN AA..DIVES AKURU VOWEL SIGN E {0x11937, 0x11938, prExtend}, // Mc [2] DIVES AKURU VOWEL SIGN AI..DIVES AKURU VOWEL SIGN O {0x1193B, 0x1193C, prExtend}, // Mn [2] DIVES AKURU SIGN ANUSVARA..DIVES AKURU SIGN CANDRABINDU {0x1193D, 0x1193D, prExtend}, // Mc DIVES AKURU SIGN HALANTA {0x1193E, 0x1193E, prExtend}, // Mn DIVES AKURU VIRAMA {0x1193F, 0x1193F, prALetter}, // Lo DIVES AKURU PREFIXED NASAL SIGN {0x11940, 0x11940, prExtend}, // Mc DIVES AKURU MEDIAL YA {0x11941, 0x11941, prALetter}, // Lo DIVES AKURU INITIAL RA {0x11942, 0x11942, prExtend}, // Mc DIVES AKURU MEDIAL RA {0x11943, 0x11943, prExtend}, // Mn DIVES AKURU SIGN NUKTA {0x11950, 0x11959, prNumeric}, // Nd [10] DIVES AKURU DIGIT ZERO..DIVES AKURU DIGIT NINE {0x119A0, 0x119A7, prALetter}, // Lo [8] NANDINAGARI LETTER A..NANDINAGARI LETTER VOCALIC RR {0x119AA, 0x119D0, prALetter}, // Lo [39] NANDINAGARI LETTER E..NANDINAGARI LETTER RRA {0x119D1, 0x119D3, prExtend}, // Mc [3] NANDINAGARI VOWEL SIGN AA..NANDINAGARI VOWEL SIGN II {0x119D4, 0x119D7, prExtend}, // Mn [4] NANDINAGARI VOWEL SIGN U..NANDINAGARI VOWEL SIGN VOCALIC RR {0x119DA, 0x119DB, prExtend}, // Mn [2] NANDINAGARI VOWEL SIGN E..NANDINAGARI VOWEL SIGN AI {0x119DC, 0x119DF, prExtend}, // Mc [4] NANDINAGARI VOWEL SIGN O..NANDINAGARI SIGN VISARGA {0x119E0, 0x119E0, prExtend}, // Mn NANDINAGARI SIGN VIRAMA {0x119E1, 0x119E1, prALetter}, // Lo NANDINAGARI SIGN AVAGRAHA {0x119E3, 0x119E3, prALetter}, // Lo NANDINAGARI HEADSTROKE {0x119E4, 0x119E4, prExtend}, // Mc NANDINAGARI VOWEL SIGN PRISHTHAMATRA E {0x11A00, 0x11A00, prALetter}, // Lo ZANABAZAR SQUARE LETTER A {0x11A01, 0x11A0A, prExtend}, // Mn [10] ZANABAZAR SQUARE VOWEL SIGN I..ZANABAZAR SQUARE VOWEL LENGTH MARK {0x11A0B, 0x11A32, prALetter}, // Lo [40] ZANABAZAR SQUARE LETTER KA..ZANABAZAR SQUARE LETTER KSSA {0x11A33, 0x11A38, prExtend}, // Mn [6] ZANABAZAR SQUARE FINAL CONSONANT MARK..ZANABAZAR SQUARE SIGN ANUSVARA {0x11A39, 0x11A39, prExtend}, // Mc ZANABAZAR SQUARE SIGN VISARGA {0x11A3A, 0x11A3A, prALetter}, // Lo ZANABAZAR SQUARE CLUSTER-INITIAL LETTER RA {0x11A3B, 0x11A3E, prExtend}, // Mn [4] ZANABAZAR SQUARE CLUSTER-FINAL LETTER YA..ZANABAZAR SQUARE CLUSTER-FINAL LETTER VA {0x11A47, 0x11A47, prExtend}, // Mn ZANABAZAR SQUARE SUBJOINER {0x11A50, 0x11A50, prALetter}, // Lo SOYOMBO LETTER A {0x11A51, 0x11A56, prExtend}, // Mn [6] SOYOMBO VOWEL SIGN I..SOYOMBO VOWEL SIGN OE {0x11A57, 0x11A58, prExtend}, // Mc [2] SOYOMBO VOWEL SIGN AI..SOYOMBO VOWEL SIGN AU {0x11A59, 0x11A5B, prExtend}, // Mn [3] SOYOMBO VOWEL SIGN VOCALIC R..SOYOMBO VOWEL LENGTH MARK {0x11A5C, 0x11A89, prALetter}, // Lo [46] SOYOMBO LETTER KA..SOYOMBO CLUSTER-INITIAL LETTER SA {0x11A8A, 0x11A96, prExtend}, // Mn [13] SOYOMBO FINAL CONSONANT SIGN G..SOYOMBO SIGN ANUSVARA {0x11A97, 0x11A97, prExtend}, // Mc SOYOMBO SIGN VISARGA {0x11A98, 0x11A99, prExtend}, // Mn [2] SOYOMBO GEMINATION MARK..SOYOMBO SUBJOINER {0x11A9D, 0x11A9D, prALetter}, // Lo SOYOMBO MARK PLUTA {0x11AB0, 0x11AF8, prALetter}, // Lo [73] CANADIAN SYLLABICS NATTILIK HI..PAU CIN HAU GLOTTAL STOP FINAL {0x11C00, 0x11C08, prALetter}, // Lo [9] BHAIKSUKI LETTER A..BHAIKSUKI LETTER VOCALIC L {0x11C0A, 0x11C2E, prALetter}, // Lo [37] BHAIKSUKI LETTER E..BHAIKSUKI LETTER HA {0x11C2F, 0x11C2F, prExtend}, // Mc BHAIKSUKI VOWEL SIGN AA {0x11C30, 0x11C36, prExtend}, // Mn [7] BHAIKSUKI VOWEL SIGN I..BHAIKSUKI VOWEL SIGN VOCALIC L {0x11C38, 0x11C3D, prExtend}, // Mn [6] BHAIKSUKI VOWEL SIGN E..BHAIKSUKI SIGN ANUSVARA {0x11C3E, 0x11C3E, prExtend}, // Mc BHAIKSUKI SIGN VISARGA {0x11C3F, 0x11C3F, prExtend}, // Mn BHAIKSUKI SIGN VIRAMA {0x11C40, 0x11C40, prALetter}, // Lo BHAIKSUKI SIGN AVAGRAHA {0x11C50, 0x11C59, prNumeric}, // Nd [10] BHAIKSUKI DIGIT ZERO..BHAIKSUKI DIGIT NINE {0x11C72, 0x11C8F, prALetter}, // Lo [30] MARCHEN LETTER KA..MARCHEN LETTER A {0x11C92, 0x11CA7, prExtend}, // Mn [22] MARCHEN SUBJOINED LETTER KA..MARCHEN SUBJOINED LETTER ZA {0x11CA9, 0x11CA9, prExtend}, // Mc MARCHEN SUBJOINED LETTER YA {0x11CAA, 0x11CB0, prExtend}, // Mn [7] MARCHEN SUBJOINED LETTER RA..MARCHEN VOWEL SIGN AA {0x11CB1, 0x11CB1, prExtend}, // Mc MARCHEN VOWEL SIGN I {0x11CB2, 0x11CB3, prExtend}, // Mn [2] MARCHEN VOWEL SIGN U..MARCHEN VOWEL SIGN E {0x11CB4, 0x11CB4, prExtend}, // Mc MARCHEN VOWEL SIGN O {0x11CB5, 0x11CB6, prExtend}, // Mn [2] MARCHEN SIGN ANUSVARA..MARCHEN SIGN CANDRABINDU {0x11D00, 0x11D06, prALetter}, // Lo [7] MASARAM GONDI LETTER A..MASARAM GONDI LETTER E {0x11D08, 0x11D09, prALetter}, // Lo [2] MASARAM GONDI LETTER AI..MASARAM GONDI LETTER O {0x11D0B, 0x11D30, prALetter}, // Lo [38] MASARAM GONDI LETTER AU..MASARAM GONDI LETTER TRA {0x11D31, 0x11D36, prExtend}, // Mn [6] MASARAM GONDI VOWEL SIGN AA..MASARAM GONDI VOWEL SIGN VOCALIC R {0x11D3A, 0x11D3A, prExtend}, // Mn MASARAM GONDI VOWEL SIGN E {0x11D3C, 0x11D3D, prExtend}, // Mn [2] MASARAM GONDI VOWEL SIGN AI..MASARAM GONDI VOWEL SIGN O {0x11D3F, 0x11D45, prExtend}, // Mn [7] MASARAM GONDI VOWEL SIGN AU..MASARAM GONDI VIRAMA {0x11D46, 0x11D46, prALetter}, // Lo MASARAM GONDI REPHA {0x11D47, 0x11D47, prExtend}, // Mn MASARAM GONDI RA-KARA {0x11D50, 0x11D59, prNumeric}, // Nd [10] MASARAM GONDI DIGIT ZERO..MASARAM GONDI DIGIT NINE {0x11D60, 0x11D65, prALetter}, // Lo [6] GUNJALA GONDI LETTER A..GUNJALA GONDI LETTER UU {0x11D67, 0x11D68, prALetter}, // Lo [2] GUNJALA GONDI LETTER EE..GUNJALA GONDI LETTER AI {0x11D6A, 0x11D89, prALetter}, // Lo [32] GUNJALA GONDI LETTER OO..GUNJALA GONDI LETTER SA {0x11D8A, 0x11D8E, prExtend}, // Mc [5] GUNJALA GONDI VOWEL SIGN AA..GUNJALA GONDI VOWEL SIGN UU {0x11D90, 0x11D91, prExtend}, // Mn [2] GUNJALA GONDI VOWEL SIGN EE..GUNJALA GONDI VOWEL SIGN AI {0x11D93, 0x11D94, prExtend}, // Mc [2] GUNJALA GONDI VOWEL SIGN OO..GUNJALA GONDI VOWEL SIGN AU {0x11D95, 0x11D95, prExtend}, // Mn GUNJALA GONDI SIGN ANUSVARA {0x11D96, 0x11D96, prExtend}, // Mc GUNJALA GONDI SIGN VISARGA {0x11D97, 0x11D97, prExtend}, // Mn GUNJALA GONDI VIRAMA {0x11D98, 0x11D98, prALetter}, // Lo GUNJALA GONDI OM {0x11DA0, 0x11DA9, prNumeric}, // Nd [10] GUNJALA GONDI DIGIT ZERO..GUNJALA GONDI DIGIT NINE {0x11EE0, 0x11EF2, prALetter}, // Lo [19] MAKASAR LETTER KA..MAKASAR ANGKA {0x11EF3, 0x11EF4, prExtend}, // Mn [2] MAKASAR VOWEL SIGN I..MAKASAR VOWEL SIGN U {0x11EF5, 0x11EF6, prExtend}, // Mc [2] MAKASAR VOWEL SIGN E..MAKASAR VOWEL SIGN O {0x11F00, 0x11F01, prExtend}, // Mn [2] KAWI SIGN CANDRABINDU..KAWI SIGN ANUSVARA {0x11F02, 0x11F02, prALetter}, // Lo KAWI SIGN REPHA {0x11F03, 0x11F03, prExtend}, // Mc KAWI SIGN VISARGA {0x11F04, 0x11F10, prALetter}, // Lo [13] KAWI LETTER A..KAWI LETTER O {0x11F12, 0x11F33, prALetter}, // Lo [34] KAWI LETTER KA..KAWI LETTER JNYA {0x11F34, 0x11F35, prExtend}, // Mc [2] KAWI VOWEL SIGN AA..KAWI VOWEL SIGN ALTERNATE AA {0x11F36, 0x11F3A, prExtend}, // Mn [5] KAWI VOWEL SIGN I..KAWI VOWEL SIGN VOCALIC R {0x11F3E, 0x11F3F, prExtend}, // Mc [2] KAWI VOWEL SIGN E..KAWI VOWEL SIGN AI {0x11F40, 0x11F40, prExtend}, // Mn KAWI VOWEL SIGN EU {0x11F41, 0x11F41, prExtend}, // Mc KAWI SIGN KILLER {0x11F42, 0x11F42, prExtend}, // Mn KAWI CONJOINER {0x11F50, 0x11F59, prNumeric}, // Nd [10] KAWI DIGIT ZERO..KAWI DIGIT NINE {0x11FB0, 0x11FB0, prALetter}, // Lo LISU LETTER YHA {0x12000, 0x12399, prALetter}, // Lo [922] CUNEIFORM SIGN A..CUNEIFORM SIGN U U {0x12400, 0x1246E, prALetter}, // Nl [111] CUNEIFORM NUMERIC SIGN TWO ASH..CUNEIFORM NUMERIC SIGN NINE U VARIANT FORM {0x12480, 0x12543, prALetter}, // Lo [196] CUNEIFORM SIGN AB TIMES NUN TENU..CUNEIFORM SIGN ZU5 TIMES THREE DISH TENU {0x12F90, 0x12FF0, prALetter}, // Lo [97] CYPRO-MINOAN SIGN CM001..CYPRO-MINOAN SIGN CM114 {0x13000, 0x1342F, prALetter}, // Lo [1072] EGYPTIAN HIEROGLYPH A001..EGYPTIAN HIEROGLYPH V011D {0x13430, 0x1343F, prFormat}, // Cf [16] EGYPTIAN HIEROGLYPH VERTICAL JOINER..EGYPTIAN HIEROGLYPH END WALLED ENCLOSURE {0x13440, 0x13440, prExtend}, // Mn EGYPTIAN HIEROGLYPH MIRROR HORIZONTALLY {0x13441, 0x13446, prALetter}, // Lo [6] EGYPTIAN HIEROGLYPH FULL BLANK..EGYPTIAN HIEROGLYPH WIDE LOST SIGN {0x13447, 0x13455, prExtend}, // Mn [15] EGYPTIAN HIEROGLYPH MODIFIER DAMAGED AT TOP START..EGYPTIAN HIEROGLYPH MODIFIER DAMAGED {0x14400, 0x14646, prALetter}, // Lo [583] ANATOLIAN HIEROGLYPH A001..ANATOLIAN HIEROGLYPH A530 {0x16800, 0x16A38, prALetter}, // Lo [569] BAMUM LETTER PHASE-A NGKUE MFON..BAMUM LETTER PHASE-F VUEQ {0x16A40, 0x16A5E, prALetter}, // Lo [31] MRO LETTER TA..MRO LETTER TEK {0x16A60, 0x16A69, prNumeric}, // Nd [10] MRO DIGIT ZERO..MRO DIGIT NINE {0x16A70, 0x16ABE, prALetter}, // Lo [79] TANGSA LETTER OZ..TANGSA LETTER ZA {0x16AC0, 0x16AC9, prNumeric}, // Nd [10] TANGSA DIGIT ZERO..TANGSA DIGIT NINE {0x16AD0, 0x16AED, prALetter}, // Lo [30] BASSA VAH LETTER ENNI..BASSA VAH LETTER I {0x16AF0, 0x16AF4, prExtend}, // Mn [5] BASSA VAH COMBINING HIGH TONE..BASSA VAH COMBINING HIGH-LOW TONE {0x16B00, 0x16B2F, prALetter}, // Lo [48] PAHAWH HMONG VOWEL KEEB..PAHAWH HMONG CONSONANT CAU {0x16B30, 0x16B36, prExtend}, // Mn [7] PAHAWH HMONG MARK CIM TUB..PAHAWH HMONG MARK CIM TAUM {0x16B40, 0x16B43, prALetter}, // Lm [4] PAHAWH HMONG SIGN VOS SEEV..PAHAWH HMONG SIGN IB YAM {0x16B50, 0x16B59, prNumeric}, // Nd [10] PAHAWH HMONG DIGIT ZERO..PAHAWH HMONG DIGIT NINE {0x16B63, 0x16B77, prALetter}, // Lo [21] PAHAWH HMONG SIGN VOS LUB..PAHAWH HMONG SIGN CIM NRES TOS {0x16B7D, 0x16B8F, prALetter}, // Lo [19] PAHAWH HMONG CLAN SIGN TSHEEJ..PAHAWH HMONG CLAN SIGN VWJ {0x16E40, 0x16E7F, prALetter}, // L& [64] MEDEFAIDRIN CAPITAL LETTER M..MEDEFAIDRIN SMALL LETTER Y {0x16F00, 0x16F4A, prALetter}, // Lo [75] MIAO LETTER PA..MIAO LETTER RTE {0x16F4F, 0x16F4F, prExtend}, // Mn MIAO SIGN CONSONANT MODIFIER BAR {0x16F50, 0x16F50, prALetter}, // Lo MIAO LETTER NASALIZATION {0x16F51, 0x16F87, prExtend}, // Mc [55] MIAO SIGN ASPIRATION..MIAO VOWEL SIGN UI {0x16F8F, 0x16F92, prExtend}, // Mn [4] MIAO TONE RIGHT..MIAO TONE BELOW {0x16F93, 0x16F9F, prALetter}, // Lm [13] MIAO LETTER TONE-2..MIAO LETTER REFORMED TONE-8 {0x16FE0, 0x16FE1, prALetter}, // Lm [2] TANGUT ITERATION MARK..NUSHU ITERATION MARK {0x16FE3, 0x16FE3, prALetter}, // Lm OLD CHINESE ITERATION MARK {0x16FE4, 0x16FE4, prExtend}, // Mn KHITAN SMALL SCRIPT FILLER {0x16FF0, 0x16FF1, prExtend}, // Mc [2] VIETNAMESE ALTERNATE READING MARK CA..VIETNAMESE ALTERNATE READING MARK NHAY {0x1AFF0, 0x1AFF3, prKatakana}, // Lm [4] KATAKANA LETTER MINNAN TONE-2..KATAKANA LETTER MINNAN TONE-5 {0x1AFF5, 0x1AFFB, prKatakana}, // Lm [7] KATAKANA LETTER MINNAN TONE-7..KATAKANA LETTER MINNAN NASALIZED TONE-5 {0x1AFFD, 0x1AFFE, prKatakana}, // Lm [2] KATAKANA LETTER MINNAN NASALIZED TONE-7..KATAKANA LETTER MINNAN NASALIZED TONE-8 {0x1B000, 0x1B000, prKatakana}, // Lo KATAKANA LETTER ARCHAIC E {0x1B120, 0x1B122, prKatakana}, // Lo [3] KATAKANA LETTER ARCHAIC YI..KATAKANA LETTER ARCHAIC WU {0x1B155, 0x1B155, prKatakana}, // Lo KATAKANA LETTER SMALL KO {0x1B164, 0x1B167, prKatakana}, // Lo [4] KATAKANA LETTER SMALL WI..KATAKANA LETTER SMALL N {0x1BC00, 0x1BC6A, prALetter}, // Lo [107] DUPLOYAN LETTER H..DUPLOYAN LETTER VOCALIC M {0x1BC70, 0x1BC7C, prALetter}, // Lo [13] DUPLOYAN AFFIX LEFT HORIZONTAL SECANT..DUPLOYAN AFFIX ATTACHED TANGENT HOOK {0x1BC80, 0x1BC88, prALetter}, // Lo [9] DUPLOYAN AFFIX HIGH ACUTE..DUPLOYAN AFFIX HIGH VERTICAL {0x1BC90, 0x1BC99, prALetter}, // Lo [10] DUPLOYAN AFFIX LOW ACUTE..DUPLOYAN AFFIX LOW ARROW {0x1BC9D, 0x1BC9E, prExtend}, // Mn [2] DUPLOYAN THICK LETTER SELECTOR..DUPLOYAN DOUBLE MARK {0x1BCA0, 0x1BCA3, prFormat}, // Cf [4] SHORTHAND FORMAT LETTER OVERLAP..SHORTHAND FORMAT UP STEP {0x1CF00, 0x1CF2D, prExtend}, // Mn [46] ZNAMENNY COMBINING MARK GORAZDO NIZKO S KRYZHEM ON LEFT..ZNAMENNY COMBINING MARK KRYZH ON LEFT {0x1CF30, 0x1CF46, prExtend}, // Mn [23] ZNAMENNY COMBINING TONAL RANGE MARK MRACHNO..ZNAMENNY PRIZNAK MODIFIER ROG {0x1D165, 0x1D166, prExtend}, // Mc [2] MUSICAL SYMBOL COMBINING STEM..MUSICAL SYMBOL COMBINING SPRECHGESANG STEM {0x1D167, 0x1D169, prExtend}, // Mn [3] MUSICAL SYMBOL COMBINING TREMOLO-1..MUSICAL SYMBOL COMBINING TREMOLO-3 {0x1D16D, 0x1D172, prExtend}, // Mc [6] MUSICAL SYMBOL COMBINING AUGMENTATION DOT..MUSICAL SYMBOL COMBINING FLAG-5 {0x1D173, 0x1D17A, prFormat}, // Cf [8] MUSICAL SYMBOL BEGIN BEAM..MUSICAL SYMBOL END PHRASE {0x1D17B, 0x1D182, prExtend}, // Mn [8] MUSICAL SYMBOL COMBINING ACCENT..MUSICAL SYMBOL COMBINING LOURE {0x1D185, 0x1D18B, prExtend}, // Mn [7] MUSICAL SYMBOL COMBINING DOIT..MUSICAL SYMBOL COMBINING TRIPLE TONGUE {0x1D1AA, 0x1D1AD, prExtend}, // Mn [4] MUSICAL SYMBOL COMBINING DOWN BOW..MUSICAL SYMBOL COMBINING SNAP PIZZICATO {0x1D242, 0x1D244, prExtend}, // Mn [3] COMBINING GREEK MUSICAL TRISEME..COMBINING GREEK MUSICAL PENTASEME {0x1D400, 0x1D454, prALetter}, // L& [85] MATHEMATICAL BOLD CAPITAL A..MATHEMATICAL ITALIC SMALL G {0x1D456, 0x1D49C, prALetter}, // L& [71] MATHEMATICAL ITALIC SMALL I..MATHEMATICAL SCRIPT CAPITAL A {0x1D49E, 0x1D49F, prALetter}, // L& [2] MATHEMATICAL SCRIPT CAPITAL C..MATHEMATICAL SCRIPT CAPITAL D {0x1D4A2, 0x1D4A2, prALetter}, // L& MATHEMATICAL SCRIPT CAPITAL G {0x1D4A5, 0x1D4A6, prALetter}, // L& [2] MATHEMATICAL SCRIPT CAPITAL J..MATHEMATICAL SCRIPT CAPITAL K {0x1D4A9, 0x1D4AC, prALetter}, // L& [4] MATHEMATICAL SCRIPT CAPITAL N..MATHEMATICAL SCRIPT CAPITAL Q {0x1D4AE, 0x1D4B9, prALetter}, // L& [12] MATHEMATICAL SCRIPT CAPITAL S..MATHEMATICAL SCRIPT SMALL D {0x1D4BB, 0x1D4BB, prALetter}, // L& MATHEMATICAL SCRIPT SMALL F {0x1D4BD, 0x1D4C3, prALetter}, // L& [7] MATHEMATICAL SCRIPT SMALL H..MATHEMATICAL SCRIPT SMALL N {0x1D4C5, 0x1D505, prALetter}, // L& [65] MATHEMATICAL SCRIPT SMALL P..MATHEMATICAL FRAKTUR CAPITAL B {0x1D507, 0x1D50A, prALetter}, // L& [4] MATHEMATICAL FRAKTUR CAPITAL D..MATHEMATICAL FRAKTUR CAPITAL G {0x1D50D, 0x1D514, prALetter}, // L& [8] MATHEMATICAL FRAKTUR CAPITAL J..MATHEMATICAL FRAKTUR CAPITAL Q {0x1D516, 0x1D51C, prALetter}, // L& [7] MATHEMATICAL FRAKTUR CAPITAL S..MATHEMATICAL FRAKTUR CAPITAL Y {0x1D51E, 0x1D539, prALetter}, // L& [28] MATHEMATICAL FRAKTUR SMALL A..MATHEMATICAL DOUBLE-STRUCK CAPITAL B {0x1D53B, 0x1D53E, prALetter}, // L& [4] MATHEMATICAL DOUBLE-STRUCK CAPITAL D..MATHEMATICAL DOUBLE-STRUCK CAPITAL G {0x1D540, 0x1D544, prALetter}, // L& [5] MATHEMATICAL DOUBLE-STRUCK CAPITAL I..MATHEMATICAL DOUBLE-STRUCK CAPITAL M {0x1D546, 0x1D546, prALetter}, // L& MATHEMATICAL DOUBLE-STRUCK CAPITAL O {0x1D54A, 0x1D550, prALetter}, // L& [7] MATHEMATICAL DOUBLE-STRUCK CAPITAL S..MATHEMATICAL DOUBLE-STRUCK CAPITAL Y {0x1D552, 0x1D6A5, prALetter}, // L& [340] MATHEMATICAL DOUBLE-STRUCK SMALL A..MATHEMATICAL ITALIC SMALL DOTLESS J {0x1D6A8, 0x1D6C0, prALetter}, // L& [25] MATHEMATICAL BOLD CAPITAL ALPHA..MATHEMATICAL BOLD CAPITAL OMEGA {0x1D6C2, 0x1D6DA, prALetter}, // L& [25] MATHEMATICAL BOLD SMALL ALPHA..MATHEMATICAL BOLD SMALL OMEGA {0x1D6DC, 0x1D6FA, prALetter}, // L& [31] MATHEMATICAL BOLD EPSILON SYMBOL..MATHEMATICAL ITALIC CAPITAL OMEGA {0x1D6FC, 0x1D714, prALetter}, // L& [25] MATHEMATICAL ITALIC SMALL ALPHA..MATHEMATICAL ITALIC SMALL OMEGA {0x1D716, 0x1D734, prALetter}, // L& [31] MATHEMATICAL ITALIC EPSILON SYMBOL..MATHEMATICAL BOLD ITALIC CAPITAL OMEGA {0x1D736, 0x1D74E, prALetter}, // L& [25] MATHEMATICAL BOLD ITALIC SMALL ALPHA..MATHEMATICAL BOLD ITALIC SMALL OMEGA {0x1D750, 0x1D76E, prALetter}, // L& [31] MATHEMATICAL BOLD ITALIC EPSILON SYMBOL..MATHEMATICAL SANS-SERIF BOLD CAPITAL OMEGA {0x1D770, 0x1D788, prALetter}, // L& [25] MATHEMATICAL SANS-SERIF BOLD SMALL ALPHA..MATHEMATICAL SANS-SERIF BOLD SMALL OMEGA {0x1D78A, 0x1D7A8, prALetter}, // L& [31] MATHEMATICAL SANS-SERIF BOLD EPSILON SYMBOL..MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL OMEGA {0x1D7AA, 0x1D7C2, prALetter}, // L& [25] MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL ALPHA..MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL OMEGA {0x1D7C4, 0x1D7CB, prALetter}, // L& [8] MATHEMATICAL SANS-SERIF BOLD ITALIC EPSILON SYMBOL..MATHEMATICAL BOLD SMALL DIGAMMA {0x1D7CE, 0x1D7FF, prNumeric}, // Nd [50] MATHEMATICAL BOLD DIGIT ZERO..MATHEMATICAL MONOSPACE DIGIT NINE {0x1DA00, 0x1DA36, prExtend}, // Mn [55] SIGNWRITING HEAD RIM..SIGNWRITING AIR SUCKING IN {0x1DA3B, 0x1DA6C, prExtend}, // Mn [50] SIGNWRITING MOUTH CLOSED NEUTRAL..SIGNWRITING EXCITEMENT {0x1DA75, 0x1DA75, prExtend}, // Mn SIGNWRITING UPPER BODY TILTING FROM HIP JOINTS {0x1DA84, 0x1DA84, prExtend}, // Mn SIGNWRITING LOCATION HEAD NECK {0x1DA9B, 0x1DA9F, prExtend}, // Mn [5] SIGNWRITING FILL MODIFIER-2..SIGNWRITING FILL MODIFIER-6 {0x1DAA1, 0x1DAAF, prExtend}, // Mn [15] SIGNWRITING ROTATION MODIFIER-2..SIGNWRITING ROTATION MODIFIER-16 {0x1DF00, 0x1DF09, prALetter}, // L& [10] LATIN SMALL LETTER FENG DIGRAPH WITH TRILL..LATIN SMALL LETTER T WITH HOOK AND RETROFLEX HOOK {0x1DF0A, 0x1DF0A, prALetter}, // Lo LATIN LETTER RETROFLEX CLICK WITH RETROFLEX HOOK {0x1DF0B, 0x1DF1E, prALetter}, // L& [20] LATIN SMALL LETTER ESH WITH DOUBLE BAR..LATIN SMALL LETTER S WITH CURL {0x1DF25, 0x1DF2A, prALetter}, // L& [6] LATIN SMALL LETTER D WITH MID-HEIGHT LEFT HOOK..LATIN SMALL LETTER T WITH MID-HEIGHT LEFT HOOK {0x1E000, 0x1E006, prExtend}, // Mn [7] COMBINING GLAGOLITIC LETTER AZU..COMBINING GLAGOLITIC LETTER ZHIVETE {0x1E008, 0x1E018, prExtend}, // Mn [17] COMBINING GLAGOLITIC LETTER ZEMLJA..COMBINING GLAGOLITIC LETTER HERU {0x1E01B, 0x1E021, prExtend}, // Mn [7] COMBINING GLAGOLITIC LETTER SHTA..COMBINING GLAGOLITIC LETTER YATI {0x1E023, 0x1E024, prExtend}, // Mn [2] COMBINING GLAGOLITIC LETTER YU..COMBINING GLAGOLITIC LETTER SMALL YUS {0x1E026, 0x1E02A, prExtend}, // Mn [5] COMBINING GLAGOLITIC LETTER YO..COMBINING GLAGOLITIC LETTER FITA {0x1E030, 0x1E06D, prALetter}, // Lm [62] MODIFIER LETTER CYRILLIC SMALL A..MODIFIER LETTER CYRILLIC SMALL STRAIGHT U WITH STROKE {0x1E08F, 0x1E08F, prExtend}, // Mn COMBINING CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I {0x1E100, 0x1E12C, prALetter}, // Lo [45] NYIAKENG PUACHUE HMONG LETTER MA..NYIAKENG PUACHUE HMONG LETTER W {0x1E130, 0x1E136, prExtend}, // Mn [7] NYIAKENG PUACHUE HMONG TONE-B..NYIAKENG PUACHUE HMONG TONE-D {0x1E137, 0x1E13D, prALetter}, // Lm [7] NYIAKENG PUACHUE HMONG SIGN FOR PERSON..NYIAKENG PUACHUE HMONG SYLLABLE LENGTHENER {0x1E140, 0x1E149, prNumeric}, // Nd [10] NYIAKENG PUACHUE HMONG DIGIT ZERO..NYIAKENG PUACHUE HMONG DIGIT NINE {0x1E14E, 0x1E14E, prALetter}, // Lo NYIAKENG PUACHUE HMONG LOGOGRAM NYAJ {0x1E290, 0x1E2AD, prALetter}, // Lo [30] TOTO LETTER PA..TOTO LETTER A {0x1E2AE, 0x1E2AE, prExtend}, // Mn TOTO SIGN RISING TONE {0x1E2C0, 0x1E2EB, prALetter}, // Lo [44] WANCHO LETTER AA..WANCHO LETTER YIH {0x1E2EC, 0x1E2EF, prExtend}, // Mn [4] WANCHO TONE TUP..WANCHO TONE KOINI {0x1E2F0, 0x1E2F9, prNumeric}, // Nd [10] WANCHO DIGIT ZERO..WANCHO DIGIT NINE {0x1E4D0, 0x1E4EA, prALetter}, // Lo [27] NAG MUNDARI LETTER O..NAG MUNDARI LETTER ELL {0x1E4EB, 0x1E4EB, prALetter}, // Lm NAG MUNDARI SIGN OJOD {0x1E4EC, 0x1E4EF, prExtend}, // Mn [4] NAG MUNDARI SIGN MUHOR..NAG MUNDARI SIGN SUTUH {0x1E4F0, 0x1E4F9, prNumeric}, // Nd [10] NAG MUNDARI DIGIT ZERO..NAG MUNDARI DIGIT NINE {0x1E7E0, 0x1E7E6, prALetter}, // Lo [7] ETHIOPIC SYLLABLE HHYA..ETHIOPIC SYLLABLE HHYO {0x1E7E8, 0x1E7EB, prALetter}, // Lo [4] ETHIOPIC SYLLABLE GURAGE HHWA..ETHIOPIC SYLLABLE HHWE {0x1E7ED, 0x1E7EE, prALetter}, // Lo [2] ETHIOPIC SYLLABLE GURAGE MWI..ETHIOPIC SYLLABLE GURAGE MWEE {0x1E7F0, 0x1E7FE, prALetter}, // Lo [15] ETHIOPIC SYLLABLE GURAGE QWI..ETHIOPIC SYLLABLE GURAGE PWEE {0x1E800, 0x1E8C4, prALetter}, // Lo [197] MENDE KIKAKUI SYLLABLE M001 KI..MENDE KIKAKUI SYLLABLE M060 NYON {0x1E8D0, 0x1E8D6, prExtend}, // Mn [7] MENDE KIKAKUI COMBINING NUMBER TEENS..MENDE KIKAKUI COMBINING NUMBER MILLIONS {0x1E900, 0x1E943, prALetter}, // L& [68] ADLAM CAPITAL LETTER ALIF..ADLAM SMALL LETTER SHA {0x1E944, 0x1E94A, prExtend}, // Mn [7] ADLAM ALIF LENGTHENER..ADLAM NUKTA {0x1E94B, 0x1E94B, prALetter}, // Lm ADLAM NASALIZATION MARK {0x1E950, 0x1E959, prNumeric}, // Nd [10] ADLAM DIGIT ZERO..ADLAM DIGIT NINE {0x1EE00, 0x1EE03, prALetter}, // Lo [4] ARABIC MATHEMATICAL ALEF..ARABIC MATHEMATICAL DAL {0x1EE05, 0x1EE1F, prALetter}, // Lo [27] ARABIC MATHEMATICAL WAW..ARABIC MATHEMATICAL DOTLESS QAF {0x1EE21, 0x1EE22, prALetter}, // Lo [2] ARABIC MATHEMATICAL INITIAL BEH..ARABIC MATHEMATICAL INITIAL JEEM {0x1EE24, 0x1EE24, prALetter}, // Lo ARABIC MATHEMATICAL INITIAL HEH {0x1EE27, 0x1EE27, prALetter}, // Lo ARABIC MATHEMATICAL INITIAL HAH {0x1EE29, 0x1EE32, prALetter}, // Lo [10] ARABIC MATHEMATICAL INITIAL YEH..ARABIC MATHEMATICAL INITIAL QAF {0x1EE34, 0x1EE37, prALetter}, // Lo [4] ARABIC MATHEMATICAL INITIAL SHEEN..ARABIC MATHEMATICAL INITIAL KHAH {0x1EE39, 0x1EE39, prALetter}, // Lo ARABIC MATHEMATICAL INITIAL DAD {0x1EE3B, 0x1EE3B, prALetter}, // Lo ARABIC MATHEMATICAL INITIAL GHAIN {0x1EE42, 0x1EE42, prALetter}, // Lo ARABIC MATHEMATICAL TAILED JEEM {0x1EE47, 0x1EE47, prALetter}, // Lo ARABIC MATHEMATICAL TAILED HAH {0x1EE49, 0x1EE49, prALetter}, // Lo ARABIC MATHEMATICAL TAILED YEH {0x1EE4B, 0x1EE4B, prALetter}, // Lo ARABIC MATHEMATICAL TAILED LAM {0x1EE4D, 0x1EE4F, prALetter}, // Lo [3] ARABIC MATHEMATICAL TAILED NOON..ARABIC MATHEMATICAL TAILED AIN {0x1EE51, 0x1EE52, prALetter}, // Lo [2] ARABIC MATHEMATICAL TAILED SAD..ARABIC MATHEMATICAL TAILED QAF {0x1EE54, 0x1EE54, prALetter}, // Lo ARABIC MATHEMATICAL TAILED SHEEN {0x1EE57, 0x1EE57, prALetter}, // Lo ARABIC MATHEMATICAL TAILED KHAH {0x1EE59, 0x1EE59, prALetter}, // Lo ARABIC MATHEMATICAL TAILED DAD {0x1EE5B, 0x1EE5B, prALetter}, // Lo ARABIC MATHEMATICAL TAILED GHAIN {0x1EE5D, 0x1EE5D, prALetter}, // Lo ARABIC MATHEMATICAL TAILED DOTLESS NOON {0x1EE5F, 0x1EE5F, prALetter}, // Lo ARABIC MATHEMATICAL TAILED DOTLESS QAF {0x1EE61, 0x1EE62, prALetter}, // Lo [2] ARABIC MATHEMATICAL STRETCHED BEH..ARABIC MATHEMATICAL STRETCHED JEEM {0x1EE64, 0x1EE64, prALetter}, // Lo ARABIC MATHEMATICAL STRETCHED HEH {0x1EE67, 0x1EE6A, prALetter}, // Lo [4] ARABIC MATHEMATICAL STRETCHED HAH..ARABIC MATHEMATICAL STRETCHED KAF {0x1EE6C, 0x1EE72, prALetter}, // Lo [7] ARABIC MATHEMATICAL STRETCHED MEEM..ARABIC MATHEMATICAL STRETCHED QAF {0x1EE74, 0x1EE77, prALetter}, // Lo [4] ARABIC MATHEMATICAL STRETCHED SHEEN..ARABIC MATHEMATICAL STRETCHED KHAH {0x1EE79, 0x1EE7C, prALetter}, // Lo [4] ARABIC MATHEMATICAL STRETCHED DAD..ARABIC MATHEMATICAL STRETCHED DOTLESS BEH {0x1EE7E, 0x1EE7E, prALetter}, // Lo ARABIC MATHEMATICAL STRETCHED DOTLESS FEH {0x1EE80, 0x1EE89, prALetter}, // Lo [10] ARABIC MATHEMATICAL LOOPED ALEF..ARABIC MATHEMATICAL LOOPED YEH {0x1EE8B, 0x1EE9B, prALetter}, // Lo [17] ARABIC MATHEMATICAL LOOPED LAM..ARABIC MATHEMATICAL LOOPED GHAIN {0x1EEA1, 0x1EEA3, prALetter}, // Lo [3] ARABIC MATHEMATICAL DOUBLE-STRUCK BEH..ARABIC MATHEMATICAL DOUBLE-STRUCK DAL {0x1EEA5, 0x1EEA9, prALetter}, // Lo [5] ARABIC MATHEMATICAL DOUBLE-STRUCK WAW..ARABIC MATHEMATICAL DOUBLE-STRUCK YEH {0x1EEAB, 0x1EEBB, prALetter}, // Lo [17] ARABIC MATHEMATICAL DOUBLE-STRUCK LAM..ARABIC MATHEMATICAL DOUBLE-STRUCK GHAIN {0x1F000, 0x1F003, prExtendedPictographic}, // E0.0 [4] (🀀..🀃) MAHJONG TILE EAST WIND..MAHJONG TILE NORTH WIND {0x1F004, 0x1F004, prExtendedPictographic}, // E0.6 [1] (🀄) mahjong red dragon {0x1F005, 0x1F0CE, prExtendedPictographic}, // E0.0 [202] (🀅..🃎) MAHJONG TILE GREEN DRAGON..PLAYING CARD KING OF DIAMONDS {0x1F0CF, 0x1F0CF, prExtendedPictographic}, // E0.6 [1] (🃏) joker {0x1F0D0, 0x1F0FF, prExtendedPictographic}, // E0.0 [48] (🃐..🃿) .. {0x1F10D, 0x1F10F, prExtendedPictographic}, // E0.0 [3] (🄍..🄏) CIRCLED ZERO WITH SLASH..CIRCLED DOLLAR SIGN WITH OVERLAID BACKSLASH {0x1F12F, 0x1F12F, prExtendedPictographic}, // E0.0 [1] (🄯) COPYLEFT SYMBOL {0x1F130, 0x1F149, prALetter}, // So [26] SQUARED LATIN CAPITAL LETTER A..SQUARED LATIN CAPITAL LETTER Z {0x1F150, 0x1F169, prALetter}, // So [26] NEGATIVE CIRCLED LATIN CAPITAL LETTER A..NEGATIVE CIRCLED LATIN CAPITAL LETTER Z {0x1F16C, 0x1F16F, prExtendedPictographic}, // E0.0 [4] (🅬..🅯) RAISED MR SIGN..CIRCLED HUMAN FIGURE {0x1F170, 0x1F189, prALetter}, // So [26] NEGATIVE SQUARED LATIN CAPITAL LETTER A..NEGATIVE SQUARED LATIN CAPITAL LETTER Z {0x1F170, 0x1F171, prExtendedPictographic}, // E0.6 [2] (🅰️..🅱️) A button (blood type)..B button (blood type) {0x1F17E, 0x1F17F, prExtendedPictographic}, // E0.6 [2] (🅾️..🅿️) O button (blood type)..P button {0x1F18E, 0x1F18E, prExtendedPictographic}, // E0.6 [1] (🆎) AB button (blood type) {0x1F191, 0x1F19A, prExtendedPictographic}, // E0.6 [10] (🆑..🆚) CL button..VS button {0x1F1AD, 0x1F1E5, prExtendedPictographic}, // E0.0 [57] (🆭..🇥) MASK WORK SYMBOL.. {0x1F1E6, 0x1F1FF, prRegionalIndicator}, // So [26] REGIONAL INDICATOR SYMBOL LETTER A..REGIONAL INDICATOR SYMBOL LETTER Z {0x1F201, 0x1F202, prExtendedPictographic}, // E0.6 [2] (🈁..🈂️) Japanese “here” button..Japanese “service charge” button {0x1F203, 0x1F20F, prExtendedPictographic}, // E0.0 [13] (🈃..🈏) .. {0x1F21A, 0x1F21A, prExtendedPictographic}, // E0.6 [1] (🈚) Japanese “free of charge” button {0x1F22F, 0x1F22F, prExtendedPictographic}, // E0.6 [1] (🈯) Japanese “reserved” button {0x1F232, 0x1F23A, prExtendedPictographic}, // E0.6 [9] (🈲..🈺) Japanese “prohibited” button..Japanese “open for business” button {0x1F23C, 0x1F23F, prExtendedPictographic}, // E0.0 [4] (🈼..🈿) .. {0x1F249, 0x1F24F, prExtendedPictographic}, // E0.0 [7] (🉉..🉏) .. {0x1F250, 0x1F251, prExtendedPictographic}, // E0.6 [2] (🉐..🉑) Japanese “bargain” button..Japanese “acceptable” button {0x1F252, 0x1F2FF, prExtendedPictographic}, // E0.0 [174] (🉒..🋿) .. {0x1F300, 0x1F30C, prExtendedPictographic}, // E0.6 [13] (🌀..🌌) cyclone..milky way {0x1F30D, 0x1F30E, prExtendedPictographic}, // E0.7 [2] (🌍..🌎) globe showing Europe-Africa..globe showing Americas {0x1F30F, 0x1F30F, prExtendedPictographic}, // E0.6 [1] (🌏) globe showing Asia-Australia {0x1F310, 0x1F310, prExtendedPictographic}, // E1.0 [1] (🌐) globe with meridians {0x1F311, 0x1F311, prExtendedPictographic}, // E0.6 [1] (🌑) new moon {0x1F312, 0x1F312, prExtendedPictographic}, // E1.0 [1] (🌒) waxing crescent moon {0x1F313, 0x1F315, prExtendedPictographic}, // E0.6 [3] (🌓..🌕) first quarter moon..full moon {0x1F316, 0x1F318, prExtendedPictographic}, // E1.0 [3] (🌖..🌘) waning gibbous moon..waning crescent moon {0x1F319, 0x1F319, prExtendedPictographic}, // E0.6 [1] (🌙) crescent moon {0x1F31A, 0x1F31A, prExtendedPictographic}, // E1.0 [1] (🌚) new moon face {0x1F31B, 0x1F31B, prExtendedPictographic}, // E0.6 [1] (🌛) first quarter moon face {0x1F31C, 0x1F31C, prExtendedPictographic}, // E0.7 [1] (🌜) last quarter moon face {0x1F31D, 0x1F31E, prExtendedPictographic}, // E1.0 [2] (🌝..🌞) full moon face..sun with face {0x1F31F, 0x1F320, prExtendedPictographic}, // E0.6 [2] (🌟..🌠) glowing star..shooting star {0x1F321, 0x1F321, prExtendedPictographic}, // E0.7 [1] (🌡️) thermometer {0x1F322, 0x1F323, prExtendedPictographic}, // E0.0 [2] (🌢..🌣) BLACK DROPLET..WHITE SUN {0x1F324, 0x1F32C, prExtendedPictographic}, // E0.7 [9] (🌤️..🌬️) sun behind small cloud..wind face {0x1F32D, 0x1F32F, prExtendedPictographic}, // E1.0 [3] (🌭..🌯) hot dog..burrito {0x1F330, 0x1F331, prExtendedPictographic}, // E0.6 [2] (🌰..🌱) chestnut..seedling {0x1F332, 0x1F333, prExtendedPictographic}, // E1.0 [2] (🌲..🌳) evergreen tree..deciduous tree {0x1F334, 0x1F335, prExtendedPictographic}, // E0.6 [2] (🌴..🌵) palm tree..cactus {0x1F336, 0x1F336, prExtendedPictographic}, // E0.7 [1] (🌶️) hot pepper {0x1F337, 0x1F34A, prExtendedPictographic}, // E0.6 [20] (🌷..🍊) tulip..tangerine {0x1F34B, 0x1F34B, prExtendedPictographic}, // E1.0 [1] (🍋) lemon {0x1F34C, 0x1F34F, prExtendedPictographic}, // E0.6 [4] (🍌..🍏) banana..green apple {0x1F350, 0x1F350, prExtendedPictographic}, // E1.0 [1] (🍐) pear {0x1F351, 0x1F37B, prExtendedPictographic}, // E0.6 [43] (🍑..🍻) peach..clinking beer mugs {0x1F37C, 0x1F37C, prExtendedPictographic}, // E1.0 [1] (🍼) baby bottle {0x1F37D, 0x1F37D, prExtendedPictographic}, // E0.7 [1] (🍽️) fork and knife with plate {0x1F37E, 0x1F37F, prExtendedPictographic}, // E1.0 [2] (🍾..🍿) bottle with popping cork..popcorn {0x1F380, 0x1F393, prExtendedPictographic}, // E0.6 [20] (🎀..🎓) ribbon..graduation cap {0x1F394, 0x1F395, prExtendedPictographic}, // E0.0 [2] (🎔..🎕) HEART WITH TIP ON THE LEFT..BOUQUET OF FLOWERS {0x1F396, 0x1F397, prExtendedPictographic}, // E0.7 [2] (🎖️..🎗️) military medal..reminder ribbon {0x1F398, 0x1F398, prExtendedPictographic}, // E0.0 [1] (🎘) MUSICAL KEYBOARD WITH JACKS {0x1F399, 0x1F39B, prExtendedPictographic}, // E0.7 [3] (🎙️..🎛️) studio microphone..control knobs {0x1F39C, 0x1F39D, prExtendedPictographic}, // E0.0 [2] (🎜..🎝) BEAMED ASCENDING MUSICAL NOTES..BEAMED DESCENDING MUSICAL NOTES {0x1F39E, 0x1F39F, prExtendedPictographic}, // E0.7 [2] (🎞️..🎟️) film frames..admission tickets {0x1F3A0, 0x1F3C4, prExtendedPictographic}, // E0.6 [37] (🎠..🏄) carousel horse..person surfing {0x1F3C5, 0x1F3C5, prExtendedPictographic}, // E1.0 [1] (🏅) sports medal {0x1F3C6, 0x1F3C6, prExtendedPictographic}, // E0.6 [1] (🏆) trophy {0x1F3C7, 0x1F3C7, prExtendedPictographic}, // E1.0 [1] (🏇) horse racing {0x1F3C8, 0x1F3C8, prExtendedPictographic}, // E0.6 [1] (🏈) american football {0x1F3C9, 0x1F3C9, prExtendedPictographic}, // E1.0 [1] (🏉) rugby football {0x1F3CA, 0x1F3CA, prExtendedPictographic}, // E0.6 [1] (🏊) person swimming {0x1F3CB, 0x1F3CE, prExtendedPictographic}, // E0.7 [4] (🏋️..🏎️) person lifting weights..racing car {0x1F3CF, 0x1F3D3, prExtendedPictographic}, // E1.0 [5] (🏏..🏓) cricket game..ping pong {0x1F3D4, 0x1F3DF, prExtendedPictographic}, // E0.7 [12] (🏔️..🏟️) snow-capped mountain..stadium {0x1F3E0, 0x1F3E3, prExtendedPictographic}, // E0.6 [4] (🏠..🏣) house..Japanese post office {0x1F3E4, 0x1F3E4, prExtendedPictographic}, // E1.0 [1] (🏤) post office {0x1F3E5, 0x1F3F0, prExtendedPictographic}, // E0.6 [12] (🏥..🏰) hospital..castle {0x1F3F1, 0x1F3F2, prExtendedPictographic}, // E0.0 [2] (🏱..🏲) WHITE PENNANT..BLACK PENNANT {0x1F3F3, 0x1F3F3, prExtendedPictographic}, // E0.7 [1] (🏳️) white flag {0x1F3F4, 0x1F3F4, prExtendedPictographic}, // E1.0 [1] (🏴) black flag {0x1F3F5, 0x1F3F5, prExtendedPictographic}, // E0.7 [1] (🏵️) rosette {0x1F3F6, 0x1F3F6, prExtendedPictographic}, // E0.0 [1] (🏶) BLACK ROSETTE {0x1F3F7, 0x1F3F7, prExtendedPictographic}, // E0.7 [1] (🏷️) label {0x1F3F8, 0x1F3FA, prExtendedPictographic}, // E1.0 [3] (🏸..🏺) badminton..amphora {0x1F3FB, 0x1F3FF, prExtend}, // Sk [5] EMOJI MODIFIER FITZPATRICK TYPE-1-2..EMOJI MODIFIER FITZPATRICK TYPE-6 {0x1F400, 0x1F407, prExtendedPictographic}, // E1.0 [8] (🐀..🐇) rat..rabbit {0x1F408, 0x1F408, prExtendedPictographic}, // E0.7 [1] (🐈) cat {0x1F409, 0x1F40B, prExtendedPictographic}, // E1.0 [3] (🐉..🐋) dragon..whale {0x1F40C, 0x1F40E, prExtendedPictographic}, // E0.6 [3] (🐌..🐎) snail..horse {0x1F40F, 0x1F410, prExtendedPictographic}, // E1.0 [2] (🐏..🐐) ram..goat {0x1F411, 0x1F412, prExtendedPictographic}, // E0.6 [2] (🐑..🐒) ewe..monkey {0x1F413, 0x1F413, prExtendedPictographic}, // E1.0 [1] (🐓) rooster {0x1F414, 0x1F414, prExtendedPictographic}, // E0.6 [1] (🐔) chicken {0x1F415, 0x1F415, prExtendedPictographic}, // E0.7 [1] (🐕) dog {0x1F416, 0x1F416, prExtendedPictographic}, // E1.0 [1] (🐖) pig {0x1F417, 0x1F429, prExtendedPictographic}, // E0.6 [19] (🐗..🐩) boar..poodle {0x1F42A, 0x1F42A, prExtendedPictographic}, // E1.0 [1] (🐪) camel {0x1F42B, 0x1F43E, prExtendedPictographic}, // E0.6 [20] (🐫..🐾) two-hump camel..paw prints {0x1F43F, 0x1F43F, prExtendedPictographic}, // E0.7 [1] (🐿️) chipmunk {0x1F440, 0x1F440, prExtendedPictographic}, // E0.6 [1] (👀) eyes {0x1F441, 0x1F441, prExtendedPictographic}, // E0.7 [1] (👁️) eye {0x1F442, 0x1F464, prExtendedPictographic}, // E0.6 [35] (👂..👤) ear..bust in silhouette {0x1F465, 0x1F465, prExtendedPictographic}, // E1.0 [1] (👥) busts in silhouette {0x1F466, 0x1F46B, prExtendedPictographic}, // E0.6 [6] (👦..👫) boy..woman and man holding hands {0x1F46C, 0x1F46D, prExtendedPictographic}, // E1.0 [2] (👬..👭) men holding hands..women holding hands {0x1F46E, 0x1F4AC, prExtendedPictographic}, // E0.6 [63] (👮..💬) police officer..speech balloon {0x1F4AD, 0x1F4AD, prExtendedPictographic}, // E1.0 [1] (💭) thought balloon {0x1F4AE, 0x1F4B5, prExtendedPictographic}, // E0.6 [8] (💮..💵) white flower..dollar banknote {0x1F4B6, 0x1F4B7, prExtendedPictographic}, // E1.0 [2] (💶..💷) euro banknote..pound banknote {0x1F4B8, 0x1F4EB, prExtendedPictographic}, // E0.6 [52] (💸..📫) money with wings..closed mailbox with raised flag {0x1F4EC, 0x1F4ED, prExtendedPictographic}, // E0.7 [2] (📬..📭) open mailbox with raised flag..open mailbox with lowered flag {0x1F4EE, 0x1F4EE, prExtendedPictographic}, // E0.6 [1] (📮) postbox {0x1F4EF, 0x1F4EF, prExtendedPictographic}, // E1.0 [1] (📯) postal horn {0x1F4F0, 0x1F4F4, prExtendedPictographic}, // E0.6 [5] (📰..📴) newspaper..mobile phone off {0x1F4F5, 0x1F4F5, prExtendedPictographic}, // E1.0 [1] (📵) no mobile phones {0x1F4F6, 0x1F4F7, prExtendedPictographic}, // E0.6 [2] (📶..📷) antenna bars..camera {0x1F4F8, 0x1F4F8, prExtendedPictographic}, // E1.0 [1] (📸) camera with flash {0x1F4F9, 0x1F4FC, prExtendedPictographic}, // E0.6 [4] (📹..📼) video camera..videocassette {0x1F4FD, 0x1F4FD, prExtendedPictographic}, // E0.7 [1] (📽️) film projector {0x1F4FE, 0x1F4FE, prExtendedPictographic}, // E0.0 [1] (📾) PORTABLE STEREO {0x1F4FF, 0x1F502, prExtendedPictographic}, // E1.0 [4] (📿..🔂) prayer beads..repeat single button {0x1F503, 0x1F503, prExtendedPictographic}, // E0.6 [1] (🔃) clockwise vertical arrows {0x1F504, 0x1F507, prExtendedPictographic}, // E1.0 [4] (🔄..🔇) counterclockwise arrows button..muted speaker {0x1F508, 0x1F508, prExtendedPictographic}, // E0.7 [1] (🔈) speaker low volume {0x1F509, 0x1F509, prExtendedPictographic}, // E1.0 [1] (🔉) speaker medium volume {0x1F50A, 0x1F514, prExtendedPictographic}, // E0.6 [11] (🔊..🔔) speaker high volume..bell {0x1F515, 0x1F515, prExtendedPictographic}, // E1.0 [1] (🔕) bell with slash {0x1F516, 0x1F52B, prExtendedPictographic}, // E0.6 [22] (🔖..🔫) bookmark..water pistol {0x1F52C, 0x1F52D, prExtendedPictographic}, // E1.0 [2] (🔬..🔭) microscope..telescope {0x1F52E, 0x1F53D, prExtendedPictographic}, // E0.6 [16] (🔮..🔽) crystal ball..downwards button {0x1F546, 0x1F548, prExtendedPictographic}, // E0.0 [3] (🕆..🕈) WHITE LATIN CROSS..CELTIC CROSS {0x1F549, 0x1F54A, prExtendedPictographic}, // E0.7 [2] (🕉️..🕊️) om..dove {0x1F54B, 0x1F54E, prExtendedPictographic}, // E1.0 [4] (🕋..🕎) kaaba..menorah {0x1F54F, 0x1F54F, prExtendedPictographic}, // E0.0 [1] (🕏) BOWL OF HYGIEIA {0x1F550, 0x1F55B, prExtendedPictographic}, // E0.6 [12] (🕐..🕛) one o’clock..twelve o’clock {0x1F55C, 0x1F567, prExtendedPictographic}, // E0.7 [12] (🕜..🕧) one-thirty..twelve-thirty {0x1F568, 0x1F56E, prExtendedPictographic}, // E0.0 [7] (🕨..🕮) RIGHT SPEAKER..BOOK {0x1F56F, 0x1F570, prExtendedPictographic}, // E0.7 [2] (🕯️..🕰️) candle..mantelpiece clock {0x1F571, 0x1F572, prExtendedPictographic}, // E0.0 [2] (🕱..🕲) BLACK SKULL AND CROSSBONES..NO PIRACY {0x1F573, 0x1F579, prExtendedPictographic}, // E0.7 [7] (🕳️..🕹️) hole..joystick {0x1F57A, 0x1F57A, prExtendedPictographic}, // E3.0 [1] (🕺) man dancing {0x1F57B, 0x1F586, prExtendedPictographic}, // E0.0 [12] (🕻..🖆) LEFT HAND TELEPHONE RECEIVER..PEN OVER STAMPED ENVELOPE {0x1F587, 0x1F587, prExtendedPictographic}, // E0.7 [1] (🖇️) linked paperclips {0x1F588, 0x1F589, prExtendedPictographic}, // E0.0 [2] (🖈..🖉) BLACK PUSHPIN..LOWER LEFT PENCIL {0x1F58A, 0x1F58D, prExtendedPictographic}, // E0.7 [4] (🖊️..🖍️) pen..crayon {0x1F58E, 0x1F58F, prExtendedPictographic}, // E0.0 [2] (🖎..🖏) LEFT WRITING HAND..TURNED OK HAND SIGN {0x1F590, 0x1F590, prExtendedPictographic}, // E0.7 [1] (🖐️) hand with fingers splayed {0x1F591, 0x1F594, prExtendedPictographic}, // E0.0 [4] (🖑..🖔) REVERSED RAISED HAND WITH FINGERS SPLAYED..REVERSED VICTORY HAND {0x1F595, 0x1F596, prExtendedPictographic}, // E1.0 [2] (🖕..🖖) middle finger..vulcan salute {0x1F597, 0x1F5A3, prExtendedPictographic}, // E0.0 [13] (🖗..🖣) WHITE DOWN POINTING LEFT HAND INDEX..BLACK DOWN POINTING BACKHAND INDEX {0x1F5A4, 0x1F5A4, prExtendedPictographic}, // E3.0 [1] (🖤) black heart {0x1F5A5, 0x1F5A5, prExtendedPictographic}, // E0.7 [1] (🖥️) desktop computer {0x1F5A6, 0x1F5A7, prExtendedPictographic}, // E0.0 [2] (🖦..🖧) KEYBOARD AND MOUSE..THREE NETWORKED COMPUTERS {0x1F5A8, 0x1F5A8, prExtendedPictographic}, // E0.7 [1] (🖨️) printer {0x1F5A9, 0x1F5B0, prExtendedPictographic}, // E0.0 [8] (🖩..🖰) POCKET CALCULATOR..TWO BUTTON MOUSE {0x1F5B1, 0x1F5B2, prExtendedPictographic}, // E0.7 [2] (🖱️..🖲️) computer mouse..trackball {0x1F5B3, 0x1F5BB, prExtendedPictographic}, // E0.0 [9] (🖳..🖻) OLD PERSONAL COMPUTER..DOCUMENT WITH PICTURE {0x1F5BC, 0x1F5BC, prExtendedPictographic}, // E0.7 [1] (🖼️) framed picture {0x1F5BD, 0x1F5C1, prExtendedPictographic}, // E0.0 [5] (🖽..🗁) FRAME WITH TILES..OPEN FOLDER {0x1F5C2, 0x1F5C4, prExtendedPictographic}, // E0.7 [3] (🗂️..🗄️) card index dividers..file cabinet {0x1F5C5, 0x1F5D0, prExtendedPictographic}, // E0.0 [12] (🗅..🗐) EMPTY NOTE..PAGES {0x1F5D1, 0x1F5D3, prExtendedPictographic}, // E0.7 [3] (🗑️..🗓️) wastebasket..spiral calendar {0x1F5D4, 0x1F5DB, prExtendedPictographic}, // E0.0 [8] (🗔..🗛) DESKTOP WINDOW..DECREASE FONT SIZE SYMBOL {0x1F5DC, 0x1F5DE, prExtendedPictographic}, // E0.7 [3] (🗜️..🗞️) clamp..rolled-up newspaper {0x1F5DF, 0x1F5E0, prExtendedPictographic}, // E0.0 [2] (🗟..🗠) PAGE WITH CIRCLED TEXT..STOCK CHART {0x1F5E1, 0x1F5E1, prExtendedPictographic}, // E0.7 [1] (🗡️) dagger {0x1F5E2, 0x1F5E2, prExtendedPictographic}, // E0.0 [1] (🗢) LIPS {0x1F5E3, 0x1F5E3, prExtendedPictographic}, // E0.7 [1] (🗣️) speaking head {0x1F5E4, 0x1F5E7, prExtendedPictographic}, // E0.0 [4] (🗤..🗧) THREE RAYS ABOVE..THREE RAYS RIGHT {0x1F5E8, 0x1F5E8, prExtendedPictographic}, // E2.0 [1] (🗨️) left speech bubble {0x1F5E9, 0x1F5EE, prExtendedPictographic}, // E0.0 [6] (🗩..🗮) RIGHT SPEECH BUBBLE..LEFT ANGER BUBBLE {0x1F5EF, 0x1F5EF, prExtendedPictographic}, // E0.7 [1] (🗯️) right anger bubble {0x1F5F0, 0x1F5F2, prExtendedPictographic}, // E0.0 [3] (🗰..🗲) MOOD BUBBLE..LIGHTNING MOOD {0x1F5F3, 0x1F5F3, prExtendedPictographic}, // E0.7 [1] (🗳️) ballot box with ballot {0x1F5F4, 0x1F5F9, prExtendedPictographic}, // E0.0 [6] (🗴..🗹) BALLOT SCRIPT X..BALLOT BOX WITH BOLD CHECK {0x1F5FA, 0x1F5FA, prExtendedPictographic}, // E0.7 [1] (🗺️) world map {0x1F5FB, 0x1F5FF, prExtendedPictographic}, // E0.6 [5] (🗻..🗿) mount fuji..moai {0x1F600, 0x1F600, prExtendedPictographic}, // E1.0 [1] (😀) grinning face {0x1F601, 0x1F606, prExtendedPictographic}, // E0.6 [6] (😁..😆) beaming face with smiling eyes..grinning squinting face {0x1F607, 0x1F608, prExtendedPictographic}, // E1.0 [2] (😇..😈) smiling face with halo..smiling face with horns {0x1F609, 0x1F60D, prExtendedPictographic}, // E0.6 [5] (😉..😍) winking face..smiling face with heart-eyes {0x1F60E, 0x1F60E, prExtendedPictographic}, // E1.0 [1] (😎) smiling face with sunglasses {0x1F60F, 0x1F60F, prExtendedPictographic}, // E0.6 [1] (😏) smirking face {0x1F610, 0x1F610, prExtendedPictographic}, // E0.7 [1] (😐) neutral face {0x1F611, 0x1F611, prExtendedPictographic}, // E1.0 [1] (😑) expressionless face {0x1F612, 0x1F614, prExtendedPictographic}, // E0.6 [3] (😒..😔) unamused face..pensive face {0x1F615, 0x1F615, prExtendedPictographic}, // E1.0 [1] (😕) confused face {0x1F616, 0x1F616, prExtendedPictographic}, // E0.6 [1] (😖) confounded face {0x1F617, 0x1F617, prExtendedPictographic}, // E1.0 [1] (😗) kissing face {0x1F618, 0x1F618, prExtendedPictographic}, // E0.6 [1] (😘) face blowing a kiss {0x1F619, 0x1F619, prExtendedPictographic}, // E1.0 [1] (😙) kissing face with smiling eyes {0x1F61A, 0x1F61A, prExtendedPictographic}, // E0.6 [1] (😚) kissing face with closed eyes {0x1F61B, 0x1F61B, prExtendedPictographic}, // E1.0 [1] (😛) face with tongue {0x1F61C, 0x1F61E, prExtendedPictographic}, // E0.6 [3] (😜..😞) winking face with tongue..disappointed face {0x1F61F, 0x1F61F, prExtendedPictographic}, // E1.0 [1] (😟) worried face {0x1F620, 0x1F625, prExtendedPictographic}, // E0.6 [6] (😠..😥) angry face..sad but relieved face {0x1F626, 0x1F627, prExtendedPictographic}, // E1.0 [2] (😦..😧) frowning face with open mouth..anguished face {0x1F628, 0x1F62B, prExtendedPictographic}, // E0.6 [4] (😨..😫) fearful face..tired face {0x1F62C, 0x1F62C, prExtendedPictographic}, // E1.0 [1] (😬) grimacing face {0x1F62D, 0x1F62D, prExtendedPictographic}, // E0.6 [1] (😭) loudly crying face {0x1F62E, 0x1F62F, prExtendedPictographic}, // E1.0 [2] (😮..😯) face with open mouth..hushed face {0x1F630, 0x1F633, prExtendedPictographic}, // E0.6 [4] (😰..😳) anxious face with sweat..flushed face {0x1F634, 0x1F634, prExtendedPictographic}, // E1.0 [1] (😴) sleeping face {0x1F635, 0x1F635, prExtendedPictographic}, // E0.6 [1] (😵) face with crossed-out eyes {0x1F636, 0x1F636, prExtendedPictographic}, // E1.0 [1] (😶) face without mouth {0x1F637, 0x1F640, prExtendedPictographic}, // E0.6 [10] (😷..🙀) face with medical mask..weary cat {0x1F641, 0x1F644, prExtendedPictographic}, // E1.0 [4] (🙁..🙄) slightly frowning face..face with rolling eyes {0x1F645, 0x1F64F, prExtendedPictographic}, // E0.6 [11] (🙅..🙏) person gesturing NO..folded hands {0x1F680, 0x1F680, prExtendedPictographic}, // E0.6 [1] (🚀) rocket {0x1F681, 0x1F682, prExtendedPictographic}, // E1.0 [2] (🚁..🚂) helicopter..locomotive {0x1F683, 0x1F685, prExtendedPictographic}, // E0.6 [3] (🚃..🚅) railway car..bullet train {0x1F686, 0x1F686, prExtendedPictographic}, // E1.0 [1] (🚆) train {0x1F687, 0x1F687, prExtendedPictographic}, // E0.6 [1] (🚇) metro {0x1F688, 0x1F688, prExtendedPictographic}, // E1.0 [1] (🚈) light rail {0x1F689, 0x1F689, prExtendedPictographic}, // E0.6 [1] (🚉) station {0x1F68A, 0x1F68B, prExtendedPictographic}, // E1.0 [2] (🚊..🚋) tram..tram car {0x1F68C, 0x1F68C, prExtendedPictographic}, // E0.6 [1] (🚌) bus {0x1F68D, 0x1F68D, prExtendedPictographic}, // E0.7 [1] (🚍) oncoming bus {0x1F68E, 0x1F68E, prExtendedPictographic}, // E1.0 [1] (🚎) trolleybus {0x1F68F, 0x1F68F, prExtendedPictographic}, // E0.6 [1] (🚏) bus stop {0x1F690, 0x1F690, prExtendedPictographic}, // E1.0 [1] (🚐) minibus {0x1F691, 0x1F693, prExtendedPictographic}, // E0.6 [3] (🚑..🚓) ambulance..police car {0x1F694, 0x1F694, prExtendedPictographic}, // E0.7 [1] (🚔) oncoming police car {0x1F695, 0x1F695, prExtendedPictographic}, // E0.6 [1] (🚕) taxi {0x1F696, 0x1F696, prExtendedPictographic}, // E1.0 [1] (🚖) oncoming taxi {0x1F697, 0x1F697, prExtendedPictographic}, // E0.6 [1] (🚗) automobile {0x1F698, 0x1F698, prExtendedPictographic}, // E0.7 [1] (🚘) oncoming automobile {0x1F699, 0x1F69A, prExtendedPictographic}, // E0.6 [2] (🚙..🚚) sport utility vehicle..delivery truck {0x1F69B, 0x1F6A1, prExtendedPictographic}, // E1.0 [7] (🚛..🚡) articulated lorry..aerial tramway {0x1F6A2, 0x1F6A2, prExtendedPictographic}, // E0.6 [1] (🚢) ship {0x1F6A3, 0x1F6A3, prExtendedPictographic}, // E1.0 [1] (🚣) person rowing boat {0x1F6A4, 0x1F6A5, prExtendedPictographic}, // E0.6 [2] (🚤..🚥) speedboat..horizontal traffic light {0x1F6A6, 0x1F6A6, prExtendedPictographic}, // E1.0 [1] (🚦) vertical traffic light {0x1F6A7, 0x1F6AD, prExtendedPictographic}, // E0.6 [7] (🚧..🚭) construction..no smoking {0x1F6AE, 0x1F6B1, prExtendedPictographic}, // E1.0 [4] (🚮..🚱) litter in bin sign..non-potable water {0x1F6B2, 0x1F6B2, prExtendedPictographic}, // E0.6 [1] (🚲) bicycle {0x1F6B3, 0x1F6B5, prExtendedPictographic}, // E1.0 [3] (🚳..🚵) no bicycles..person mountain biking {0x1F6B6, 0x1F6B6, prExtendedPictographic}, // E0.6 [1] (🚶) person walking {0x1F6B7, 0x1F6B8, prExtendedPictographic}, // E1.0 [2] (🚷..🚸) no pedestrians..children crossing {0x1F6B9, 0x1F6BE, prExtendedPictographic}, // E0.6 [6] (🚹..🚾) men’s room..water closet {0x1F6BF, 0x1F6BF, prExtendedPictographic}, // E1.0 [1] (🚿) shower {0x1F6C0, 0x1F6C0, prExtendedPictographic}, // E0.6 [1] (🛀) person taking bath {0x1F6C1, 0x1F6C5, prExtendedPictographic}, // E1.0 [5] (🛁..🛅) bathtub..left luggage {0x1F6C6, 0x1F6CA, prExtendedPictographic}, // E0.0 [5] (🛆..🛊) TRIANGLE WITH ROUNDED CORNERS..GIRLS SYMBOL {0x1F6CB, 0x1F6CB, prExtendedPictographic}, // E0.7 [1] (🛋️) couch and lamp {0x1F6CC, 0x1F6CC, prExtendedPictographic}, // E1.0 [1] (🛌) person in bed {0x1F6CD, 0x1F6CF, prExtendedPictographic}, // E0.7 [3] (🛍️..🛏️) shopping bags..bed {0x1F6D0, 0x1F6D0, prExtendedPictographic}, // E1.0 [1] (🛐) place of worship {0x1F6D1, 0x1F6D2, prExtendedPictographic}, // E3.0 [2] (🛑..🛒) stop sign..shopping cart {0x1F6D3, 0x1F6D4, prExtendedPictographic}, // E0.0 [2] (🛓..🛔) STUPA..PAGODA {0x1F6D5, 0x1F6D5, prExtendedPictographic}, // E12.0 [1] (🛕) hindu temple {0x1F6D6, 0x1F6D7, prExtendedPictographic}, // E13.0 [2] (🛖..🛗) hut..elevator {0x1F6D8, 0x1F6DB, prExtendedPictographic}, // E0.0 [4] (🛘..🛛) .. {0x1F6DC, 0x1F6DC, prExtendedPictographic}, // E15.0 [1] (🛜) wireless {0x1F6DD, 0x1F6DF, prExtendedPictographic}, // E14.0 [3] (🛝..🛟) playground slide..ring buoy {0x1F6E0, 0x1F6E5, prExtendedPictographic}, // E0.7 [6] (🛠️..🛥️) hammer and wrench..motor boat {0x1F6E6, 0x1F6E8, prExtendedPictographic}, // E0.0 [3] (🛦..🛨) UP-POINTING MILITARY AIRPLANE..UP-POINTING SMALL AIRPLANE {0x1F6E9, 0x1F6E9, prExtendedPictographic}, // E0.7 [1] (🛩️) small airplane {0x1F6EA, 0x1F6EA, prExtendedPictographic}, // E0.0 [1] (🛪) NORTHEAST-POINTING AIRPLANE {0x1F6EB, 0x1F6EC, prExtendedPictographic}, // E1.0 [2] (🛫..🛬) airplane departure..airplane arrival {0x1F6ED, 0x1F6EF, prExtendedPictographic}, // E0.0 [3] (🛭..🛯) .. {0x1F6F0, 0x1F6F0, prExtendedPictographic}, // E0.7 [1] (🛰️) satellite {0x1F6F1, 0x1F6F2, prExtendedPictographic}, // E0.0 [2] (🛱..🛲) ONCOMING FIRE ENGINE..DIESEL LOCOMOTIVE {0x1F6F3, 0x1F6F3, prExtendedPictographic}, // E0.7 [1] (🛳️) passenger ship {0x1F6F4, 0x1F6F6, prExtendedPictographic}, // E3.0 [3] (🛴..🛶) kick scooter..canoe {0x1F6F7, 0x1F6F8, prExtendedPictographic}, // E5.0 [2] (🛷..🛸) sled..flying saucer {0x1F6F9, 0x1F6F9, prExtendedPictographic}, // E11.0 [1] (🛹) skateboard {0x1F6FA, 0x1F6FA, prExtendedPictographic}, // E12.0 [1] (🛺) auto rickshaw {0x1F6FB, 0x1F6FC, prExtendedPictographic}, // E13.0 [2] (🛻..🛼) pickup truck..roller skate {0x1F6FD, 0x1F6FF, prExtendedPictographic}, // E0.0 [3] (🛽..🛿) .. {0x1F774, 0x1F77F, prExtendedPictographic}, // E0.0 [12] (🝴..🝿) LOT OF FORTUNE..ORCUS {0x1F7D5, 0x1F7DF, prExtendedPictographic}, // E0.0 [11] (🟕..🟟) CIRCLED TRIANGLE.. {0x1F7E0, 0x1F7EB, prExtendedPictographic}, // E12.0 [12] (🟠..🟫) orange circle..brown square {0x1F7EC, 0x1F7EF, prExtendedPictographic}, // E0.0 [4] (🟬..🟯) .. {0x1F7F0, 0x1F7F0, prExtendedPictographic}, // E14.0 [1] (🟰) heavy equals sign {0x1F7F1, 0x1F7FF, prExtendedPictographic}, // E0.0 [15] (🟱..🟿) .. {0x1F80C, 0x1F80F, prExtendedPictographic}, // E0.0 [4] (🠌..🠏) .. {0x1F848, 0x1F84F, prExtendedPictographic}, // E0.0 [8] (🡈..🡏) .. {0x1F85A, 0x1F85F, prExtendedPictographic}, // E0.0 [6] (🡚..🡟) .. {0x1F888, 0x1F88F, prExtendedPictographic}, // E0.0 [8] (🢈..🢏) .. {0x1F8AE, 0x1F8FF, prExtendedPictographic}, // E0.0 [82] (🢮..🣿) .. {0x1F90C, 0x1F90C, prExtendedPictographic}, // E13.0 [1] (🤌) pinched fingers {0x1F90D, 0x1F90F, prExtendedPictographic}, // E12.0 [3] (🤍..🤏) white heart..pinching hand {0x1F910, 0x1F918, prExtendedPictographic}, // E1.0 [9] (🤐..🤘) zipper-mouth face..sign of the horns {0x1F919, 0x1F91E, prExtendedPictographic}, // E3.0 [6] (🤙..🤞) call me hand..crossed fingers {0x1F91F, 0x1F91F, prExtendedPictographic}, // E5.0 [1] (🤟) love-you gesture {0x1F920, 0x1F927, prExtendedPictographic}, // E3.0 [8] (🤠..🤧) cowboy hat face..sneezing face {0x1F928, 0x1F92F, prExtendedPictographic}, // E5.0 [8] (🤨..🤯) face with raised eyebrow..exploding head {0x1F930, 0x1F930, prExtendedPictographic}, // E3.0 [1] (🤰) pregnant woman {0x1F931, 0x1F932, prExtendedPictographic}, // E5.0 [2] (🤱..🤲) breast-feeding..palms up together {0x1F933, 0x1F93A, prExtendedPictographic}, // E3.0 [8] (🤳..🤺) selfie..person fencing {0x1F93C, 0x1F93E, prExtendedPictographic}, // E3.0 [3] (🤼..🤾) people wrestling..person playing handball {0x1F93F, 0x1F93F, prExtendedPictographic}, // E12.0 [1] (🤿) diving mask {0x1F940, 0x1F945, prExtendedPictographic}, // E3.0 [6] (🥀..🥅) wilted flower..goal net {0x1F947, 0x1F94B, prExtendedPictographic}, // E3.0 [5] (🥇..🥋) 1st place medal..martial arts uniform {0x1F94C, 0x1F94C, prExtendedPictographic}, // E5.0 [1] (🥌) curling stone {0x1F94D, 0x1F94F, prExtendedPictographic}, // E11.0 [3] (🥍..🥏) lacrosse..flying disc {0x1F950, 0x1F95E, prExtendedPictographic}, // E3.0 [15] (🥐..🥞) croissant..pancakes {0x1F95F, 0x1F96B, prExtendedPictographic}, // E5.0 [13] (🥟..🥫) dumpling..canned food {0x1F96C, 0x1F970, prExtendedPictographic}, // E11.0 [5] (🥬..🥰) leafy green..smiling face with hearts {0x1F971, 0x1F971, prExtendedPictographic}, // E12.0 [1] (🥱) yawning face {0x1F972, 0x1F972, prExtendedPictographic}, // E13.0 [1] (🥲) smiling face with tear {0x1F973, 0x1F976, prExtendedPictographic}, // E11.0 [4] (🥳..🥶) partying face..cold face {0x1F977, 0x1F978, prExtendedPictographic}, // E13.0 [2] (🥷..🥸) ninja..disguised face {0x1F979, 0x1F979, prExtendedPictographic}, // E14.0 [1] (🥹) face holding back tears {0x1F97A, 0x1F97A, prExtendedPictographic}, // E11.0 [1] (🥺) pleading face {0x1F97B, 0x1F97B, prExtendedPictographic}, // E12.0 [1] (🥻) sari {0x1F97C, 0x1F97F, prExtendedPictographic}, // E11.0 [4] (🥼..🥿) lab coat..flat shoe {0x1F980, 0x1F984, prExtendedPictographic}, // E1.0 [5] (🦀..🦄) crab..unicorn {0x1F985, 0x1F991, prExtendedPictographic}, // E3.0 [13] (🦅..🦑) eagle..squid {0x1F992, 0x1F997, prExtendedPictographic}, // E5.0 [6] (🦒..🦗) giraffe..cricket {0x1F998, 0x1F9A2, prExtendedPictographic}, // E11.0 [11] (🦘..🦢) kangaroo..swan {0x1F9A3, 0x1F9A4, prExtendedPictographic}, // E13.0 [2] (🦣..🦤) mammoth..dodo {0x1F9A5, 0x1F9AA, prExtendedPictographic}, // E12.0 [6] (🦥..🦪) sloth..oyster {0x1F9AB, 0x1F9AD, prExtendedPictographic}, // E13.0 [3] (🦫..🦭) beaver..seal {0x1F9AE, 0x1F9AF, prExtendedPictographic}, // E12.0 [2] (🦮..🦯) guide dog..white cane {0x1F9B0, 0x1F9B9, prExtendedPictographic}, // E11.0 [10] (🦰..🦹) red hair..supervillain {0x1F9BA, 0x1F9BF, prExtendedPictographic}, // E12.0 [6] (🦺..🦿) safety vest..mechanical leg {0x1F9C0, 0x1F9C0, prExtendedPictographic}, // E1.0 [1] (🧀) cheese wedge {0x1F9C1, 0x1F9C2, prExtendedPictographic}, // E11.0 [2] (🧁..🧂) cupcake..salt {0x1F9C3, 0x1F9CA, prExtendedPictographic}, // E12.0 [8] (🧃..🧊) beverage box..ice {0x1F9CB, 0x1F9CB, prExtendedPictographic}, // E13.0 [1] (🧋) bubble tea {0x1F9CC, 0x1F9CC, prExtendedPictographic}, // E14.0 [1] (🧌) troll {0x1F9CD, 0x1F9CF, prExtendedPictographic}, // E12.0 [3] (🧍..🧏) person standing..deaf person {0x1F9D0, 0x1F9E6, prExtendedPictographic}, // E5.0 [23] (🧐..🧦) face with monocle..socks {0x1F9E7, 0x1F9FF, prExtendedPictographic}, // E11.0 [25] (🧧..🧿) red envelope..nazar amulet {0x1FA00, 0x1FA6F, prExtendedPictographic}, // E0.0 [112] (🨀..🩯) NEUTRAL CHESS KING.. {0x1FA70, 0x1FA73, prExtendedPictographic}, // E12.0 [4] (🩰..🩳) ballet shoes..shorts {0x1FA74, 0x1FA74, prExtendedPictographic}, // E13.0 [1] (🩴) thong sandal {0x1FA75, 0x1FA77, prExtendedPictographic}, // E15.0 [3] (🩵..🩷) light blue heart..pink heart {0x1FA78, 0x1FA7A, prExtendedPictographic}, // E12.0 [3] (🩸..🩺) drop of blood..stethoscope {0x1FA7B, 0x1FA7C, prExtendedPictographic}, // E14.0 [2] (🩻..🩼) x-ray..crutch {0x1FA7D, 0x1FA7F, prExtendedPictographic}, // E0.0 [3] (🩽..🩿) .. {0x1FA80, 0x1FA82, prExtendedPictographic}, // E12.0 [3] (🪀..🪂) yo-yo..parachute {0x1FA83, 0x1FA86, prExtendedPictographic}, // E13.0 [4] (🪃..🪆) boomerang..nesting dolls {0x1FA87, 0x1FA88, prExtendedPictographic}, // E15.0 [2] (🪇..🪈) maracas..flute {0x1FA89, 0x1FA8F, prExtendedPictographic}, // E0.0 [7] (🪉..🪏) .. {0x1FA90, 0x1FA95, prExtendedPictographic}, // E12.0 [6] (🪐..🪕) ringed planet..banjo {0x1FA96, 0x1FAA8, prExtendedPictographic}, // E13.0 [19] (🪖..🪨) military helmet..rock {0x1FAA9, 0x1FAAC, prExtendedPictographic}, // E14.0 [4] (🪩..🪬) mirror ball..hamsa {0x1FAAD, 0x1FAAF, prExtendedPictographic}, // E15.0 [3] (🪭..🪯) folding hand fan..khanda {0x1FAB0, 0x1FAB6, prExtendedPictographic}, // E13.0 [7] (🪰..🪶) fly..feather {0x1FAB7, 0x1FABA, prExtendedPictographic}, // E14.0 [4] (🪷..🪺) lotus..nest with eggs {0x1FABB, 0x1FABD, prExtendedPictographic}, // E15.0 [3] (🪻..🪽) hyacinth..wing {0x1FABE, 0x1FABE, prExtendedPictographic}, // E0.0 [1] (🪾) {0x1FABF, 0x1FABF, prExtendedPictographic}, // E15.0 [1] (🪿) goose {0x1FAC0, 0x1FAC2, prExtendedPictographic}, // E13.0 [3] (🫀..🫂) anatomical heart..people hugging {0x1FAC3, 0x1FAC5, prExtendedPictographic}, // E14.0 [3] (🫃..🫅) pregnant man..person with crown {0x1FAC6, 0x1FACD, prExtendedPictographic}, // E0.0 [8] (🫆..🫍) .. {0x1FACE, 0x1FACF, prExtendedPictographic}, // E15.0 [2] (🫎..🫏) moose..donkey {0x1FAD0, 0x1FAD6, prExtendedPictographic}, // E13.0 [7] (🫐..🫖) blueberries..teapot {0x1FAD7, 0x1FAD9, prExtendedPictographic}, // E14.0 [3] (🫗..🫙) pouring liquid..jar {0x1FADA, 0x1FADB, prExtendedPictographic}, // E15.0 [2] (🫚..🫛) ginger root..pea pod {0x1FADC, 0x1FADF, prExtendedPictographic}, // E0.0 [4] (🫜..🫟) .. {0x1FAE0, 0x1FAE7, prExtendedPictographic}, // E14.0 [8] (🫠..🫧) melting face..bubbles {0x1FAE8, 0x1FAE8, prExtendedPictographic}, // E15.0 [1] (🫨) shaking face {0x1FAE9, 0x1FAEF, prExtendedPictographic}, // E0.0 [7] (🫩..🫯) .. {0x1FAF0, 0x1FAF6, prExtendedPictographic}, // E14.0 [7] (🫰..🫶) hand with index finger and thumb crossed..heart hands {0x1FAF7, 0x1FAF8, prExtendedPictographic}, // E15.0 [2] (🫷..🫸) leftwards pushing hand..rightwards pushing hand {0x1FAF9, 0x1FAFF, prExtendedPictographic}, // E0.0 [7] (🫹..🫿) .. {0x1FBF0, 0x1FBF9, prNumeric}, // Nd [10] SEGMENTED DIGIT ZERO..SEGMENTED DIGIT NINE {0x1FC00, 0x1FFFD, prExtendedPictographic}, // E0.0[1022] (🰀..🿽) .. {0xE0001, 0xE0001, prFormat}, // Cf LANGUAGE TAG {0xE0020, 0xE007F, prExtend}, // Cf [96] TAG SPACE..CANCEL TAG {0xE0100, 0xE01EF, prExtend}, // Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR-256 } ================================================ FILE: vendor/github.com/rivo/uniseg/wordrules.go ================================================ package uniseg import "unicode/utf8" // The states of the word break parser. const ( wbAny = iota wbCR wbLF wbNewline wbWSegSpace wbHebrewLetter wbALetter wbWB7 wbWB7c wbNumeric wbWB11 wbKatakana wbExtendNumLet wbOddRI wbEvenRI wbZWJBit = 16 // This bit is set for any states followed by at least one zero-width joiner (see WB4 and WB3c). ) // wbTransitions implements the word break parser's state transitions. It's // anologous to [grTransitions], see comments there for details. // // Unicode version 15.0.0. func wbTransitions(state, prop int) (newState int, wordBreak bool, rule int) { switch uint64(state) | uint64(prop)<<32 { // WB3b. case wbAny | prNewline<<32: return wbNewline, true, 32 case wbAny | prCR<<32: return wbCR, true, 32 case wbAny | prLF<<32: return wbLF, true, 32 // WB3a. case wbNewline | prAny<<32: return wbAny, true, 31 case wbCR | prAny<<32: return wbAny, true, 31 case wbLF | prAny<<32: return wbAny, true, 31 // WB3. case wbCR | prLF<<32: return wbLF, false, 30 // WB3d. case wbAny | prWSegSpace<<32: return wbWSegSpace, true, 9990 case wbWSegSpace | prWSegSpace<<32: return wbWSegSpace, false, 34 // WB5. case wbAny | prALetter<<32: return wbALetter, true, 9990 case wbAny | prHebrewLetter<<32: return wbHebrewLetter, true, 9990 case wbALetter | prALetter<<32: return wbALetter, false, 50 case wbALetter | prHebrewLetter<<32: return wbHebrewLetter, false, 50 case wbHebrewLetter | prALetter<<32: return wbALetter, false, 50 case wbHebrewLetter | prHebrewLetter<<32: return wbHebrewLetter, false, 50 // WB7. Transitions to wbWB7 handled by transitionWordBreakState(). case wbWB7 | prALetter<<32: return wbALetter, false, 70 case wbWB7 | prHebrewLetter<<32: return wbHebrewLetter, false, 70 // WB7a. case wbHebrewLetter | prSingleQuote<<32: return wbAny, false, 71 // WB7c. Transitions to wbWB7c handled by transitionWordBreakState(). case wbWB7c | prHebrewLetter<<32: return wbHebrewLetter, false, 73 // WB8. case wbAny | prNumeric<<32: return wbNumeric, true, 9990 case wbNumeric | prNumeric<<32: return wbNumeric, false, 80 // WB9. case wbALetter | prNumeric<<32: return wbNumeric, false, 90 case wbHebrewLetter | prNumeric<<32: return wbNumeric, false, 90 // WB10. case wbNumeric | prALetter<<32: return wbALetter, false, 100 case wbNumeric | prHebrewLetter<<32: return wbHebrewLetter, false, 100 // WB11. Transitions to wbWB11 handled by transitionWordBreakState(). case wbWB11 | prNumeric<<32: return wbNumeric, false, 110 // WB13. case wbAny | prKatakana<<32: return wbKatakana, true, 9990 case wbKatakana | prKatakana<<32: return wbKatakana, false, 130 // WB13a. case wbAny | prExtendNumLet<<32: return wbExtendNumLet, true, 9990 case wbALetter | prExtendNumLet<<32: return wbExtendNumLet, false, 131 case wbHebrewLetter | prExtendNumLet<<32: return wbExtendNumLet, false, 131 case wbNumeric | prExtendNumLet<<32: return wbExtendNumLet, false, 131 case wbKatakana | prExtendNumLet<<32: return wbExtendNumLet, false, 131 case wbExtendNumLet | prExtendNumLet<<32: return wbExtendNumLet, false, 131 // WB13b. case wbExtendNumLet | prALetter<<32: return wbALetter, false, 132 case wbExtendNumLet | prHebrewLetter<<32: return wbHebrewLetter, false, 132 case wbExtendNumLet | prNumeric<<32: return wbNumeric, false, 132 case wbExtendNumLet | prKatakana<<32: return wbKatakana, false, 132 default: return -1, false, -1 } } // transitionWordBreakState determines the new state of the word break parser // given the current state and the next code point. It also returns whether a // word boundary was detected. If more than one code point is needed to // determine the new state, the byte slice or the string starting after rune "r" // can be used (whichever is not nil or empty) for further lookups. func transitionWordBreakState(state int, r rune, b []byte, str string) (newState int, wordBreak bool) { // Determine the property of the next character. nextProperty := property(workBreakCodePoints, r) // "Replacing Ignore Rules". if nextProperty == prZWJ { // WB4 (for zero-width joiners). if state == wbNewline || state == wbCR || state == wbLF { return wbAny | wbZWJBit, true // Make sure we don't apply WB4 to WB3a. } if state < 0 { return wbAny | wbZWJBit, false } return state | wbZWJBit, false } else if nextProperty == prExtend || nextProperty == prFormat { // WB4 (for Extend and Format). if state == wbNewline || state == wbCR || state == wbLF { return wbAny, true // Make sure we don't apply WB4 to WB3a. } if state == wbWSegSpace || state == wbAny|wbZWJBit { return wbAny, false // We don't break but this is also not WB3d or WB3c. } if state < 0 { return wbAny, false } return state, false } else if nextProperty == prExtendedPictographic && state >= 0 && state&wbZWJBit != 0 { // WB3c. return wbAny, false } if state >= 0 { state = state &^ wbZWJBit } // Find the applicable transition in the table. var rule int newState, wordBreak, rule = wbTransitions(state, nextProperty) if newState < 0 { // No specific transition found. Try the less specific ones. anyPropState, anyPropWordBreak, anyPropRule := wbTransitions(state, prAny) anyStateState, anyStateWordBreak, anyStateRule := wbTransitions(wbAny, nextProperty) if anyPropState >= 0 && anyStateState >= 0 { // Both apply. We'll use a mix (see comments for grTransitions). newState, wordBreak, rule = anyStateState, anyStateWordBreak, anyStateRule if anyPropRule < anyStateRule { wordBreak, rule = anyPropWordBreak, anyPropRule } } else if anyPropState >= 0 { // We only have a specific state. newState, wordBreak, rule = anyPropState, anyPropWordBreak, anyPropRule // This branch will probably never be reached because okAnyState will // always be true given the current transition map. But we keep it here // for future modifications to the transition map where this may not be // true anymore. } else if anyStateState >= 0 { // We only have a specific property. newState, wordBreak, rule = anyStateState, anyStateWordBreak, anyStateRule } else { // No known transition. WB999: Any ÷ Any. newState, wordBreak, rule = wbAny, true, 9990 } } // For those rules that need to look up runes further in the string, we // determine the property after nextProperty, skipping over Format, Extend, // and ZWJ (according to WB4). It's -1 if not needed, if such a rune cannot // be determined (because the text ends or the rune is faulty). farProperty := -1 if rule > 60 && (state == wbALetter || state == wbHebrewLetter || state == wbNumeric) && (nextProperty == prMidLetter || nextProperty == prMidNumLet || nextProperty == prSingleQuote || // WB6. nextProperty == prDoubleQuote || // WB7b. nextProperty == prMidNum) { // WB12. for { var ( r rune length int ) if b != nil { // Byte slice version. r, length = utf8.DecodeRune(b) b = b[length:] } else { // String version. r, length = utf8.DecodeRuneInString(str) str = str[length:] } if r == utf8.RuneError { break } prop := property(workBreakCodePoints, r) if prop == prExtend || prop == prFormat || prop == prZWJ { continue } farProperty = prop break } } // WB6. if rule > 60 && (state == wbALetter || state == wbHebrewLetter) && (nextProperty == prMidLetter || nextProperty == prMidNumLet || nextProperty == prSingleQuote) && (farProperty == prALetter || farProperty == prHebrewLetter) { return wbWB7, false } // WB7b. if rule > 72 && state == wbHebrewLetter && nextProperty == prDoubleQuote && farProperty == prHebrewLetter { return wbWB7c, false } // WB12. if rule > 120 && state == wbNumeric && (nextProperty == prMidNum || nextProperty == prMidNumLet || nextProperty == prSingleQuote) && farProperty == prNumeric { return wbWB11, false } // WB15 and WB16. if newState == wbAny && nextProperty == prRegionalIndicator { if state != wbOddRI && state != wbEvenRI { // Includes state == -1. // Transition into the first RI. return wbOddRI, true } if state == wbOddRI { // Don't break pairs of Regional Indicators. return wbEvenRI, false } return wbOddRI, true // We can break after a pair. } return } ================================================ FILE: vendor/github.com/sasha-s/go-deadlock/.travis.yml ================================================ arch: - amd64 - ppc64le language: go sudo: false go: - 1.5.x - 1.6.x - 1.7.x - 1.8.x - 1.9.x - 1.10.x - 1.11.x - master - tip before_install: - go get golang.org/x/tools/cmd/cover - go get -t -v ./... script: - ./test.sh after_success: - bash <(curl -s https://codecov.io/bash) ================================================ FILE: vendor/github.com/sasha-s/go-deadlock/LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor 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, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/github.com/sasha-s/go-deadlock/Readme.md ================================================ # Online deadlock detection in go (golang). [![Try it online](https://img.shields.io/badge/try%20it-online-blue.svg)](https://wandbox.org/permlink/hJc6QCZowxbNm9WW) [![Docs](https://godoc.org/github.com/sasha-s/go-deadlock?status.svg)](https://godoc.org/github.com/sasha-s/go-deadlock) [![Build Status](https://travis-ci.org/sasha-s/go-deadlock.svg?branch=master)](https://travis-ci.org/sasha-s/go-deadlock) [![codecov](https://codecov.io/gh/sasha-s/go-deadlock/branch/master/graph/badge.svg)](https://codecov.io/gh/sasha-s/go-deadlock) [![version](https://badge.fury.io/gh/sasha-s%2Fgo-deadlock.svg)](https://github.com/sasha-s/go-deadlock/releases) [![Go Report Card](https://goreportcard.com/badge/github.com/sasha-s/go-deadlock)](https://goreportcard.com/report/github.com/sasha-s/go-deadlock) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ## Why Deadlocks happen and are painful to debug. ## What go-deadlock provides (RW)Mutex drop-in replacements for sync.(RW)Mutex. It would not work if you create a spaghetti of channels. Mutexes only. ## Installation ```sh go get github.com/sasha-s/go-deadlock/... ``` ## Usage ```go import "github.com/sasha-s/go-deadlock" var mu deadlock.Mutex // Use normally, it works exactly like sync.Mutex does. mu.Lock() defer mu.Unlock() // Or var rw deadlock.RWMutex rw.RLock() defer rw.RUnlock() ``` ### Deadlocks One of the most common sources of deadlocks is inconsistent lock ordering: say, you have two mutexes A and B, and in some goroutines you have ```go A.Lock() // defer A.Unlock() or similar. ... B.Lock() // defer B.Unlock() or similar. ``` And in another goroutine the order of locks is reversed: ```go B.Lock() // defer B.Unlock() or similar. ... A.Lock() // defer A.Unlock() or similar. ``` Another common sources of deadlocks is duplicate take a lock in a goroutine: ``` A.Rlock() or lock() A.lock() or A.RLock() ``` This does not guarantee a deadlock (maybe the goroutines above can never be running at the same time), but it usually a design flaw at least. go-deadlock can detect such cases (unless you cross goroutine boundary - say lock A, then spawn a goroutine, block until it is singals, and lock B inside of the goroutine), even if the deadlock itself happens very infrequently and is painful to reproduce! Each time go-deadlock sees a lock attempt for lock B, it records the order A before B, for each lock that is currently being held in the same goroutine, and it prints (and exits the program by default) when it sees the locking order being violated. In addition, if it sees that we are waiting on a lock for a long time (opts.DeadlockTimeout, 30 seconds by default), it reports a potential deadlock, also printing the stacktrace for a goroutine that is currently holding the lock we are desperately trying to grab. ## Sample output #### Inconsistent lock ordering: ``` POTENTIAL DEADLOCK: Inconsistent locking. saw this ordering in one goroutine: happened before inmem.go:623 bttest.(*server).ReadModifyWriteRow { r.mu.Lock() } <<<<< inmem_test.go:118 bttest.TestConcurrentMutationsReadModifyAndGC.func4 { _, _ = s.ReadModifyWriteRow(ctx, rmw()) } happened after inmem.go:629 bttest.(*server).ReadModifyWriteRow { tbl.mu.RLock() } <<<<< inmem_test.go:118 bttest.TestConcurrentMutationsReadModifyAndGC.func4 { _, _ = s.ReadModifyWriteRow(ctx, rmw()) } in another goroutine: happened before inmem.go:799 bttest.(*table).gc { t.mu.RLock() } <<<<< inmem_test.go:125 bttest.TestConcurrentMutationsReadModifyAndGC.func5 { tbl.gc() } happend after inmem.go:814 bttest.(*table).gc { r.mu.Lock() } <<<<< inmem_test.go:125 bttest.TestConcurrentMutationsReadModifyAndGC.func5 { tbl.gc() } ``` #### Waiting for a lock for a long time: ``` POTENTIAL DEADLOCK: Previous place where the lock was grabbed goroutine 240 lock 0xc820160440 inmem.go:799 bttest.(*table).gc { t.mu.RLock() } <<<<< inmem_test.go:125 bttest.TestConcurrentMutationsReadModifyAndGC.func5 { tbl.gc() } Have been trying to lock it again for more than 40ms goroutine 68 lock 0xc820160440 inmem.go:785 bttest.(*table).mutableRow { t.mu.Lock() } <<<<< inmem.go:428 bttest.(*server).MutateRow { r := tbl.mutableRow(string(req.RowKey)) } inmem_test.go:111 bttest.TestConcurrentMutationsReadModifyAndGC.func3 { s.MutateRow(ctx, req) } Here is what goroutine 240 doing now goroutine 240 [select]: github.com/sasha-s/go-deadlock.lock(0xc82028ca10, 0x5189e0, 0xc82013a9b0) /Users/sasha/go/src/github.com/sasha-s/go-deadlock/deadlock.go:163 +0x1640 github.com/sasha-s/go-deadlock.(*Mutex).Lock(0xc82013a9b0) /Users/sasha/go/src/github.com/sasha-s/go-deadlock/deadlock.go:54 +0x86 google.golang.org/cloud/bigtable/bttest.(*table).gc(0xc820160440) /Users/sasha/go/src/google.golang.org/cloud/bigtable/bttest/inmem.go:814 +0x28d google.golang.org/cloud/bigtable/bttest.TestConcurrentMutationsReadModifyAndGC.func5(0xc82015c760, 0xc820160440) /Users/sasha/go/src/google.golang.org/cloud/bigtable/bttest/inmem_test.go:125 +0x48 created by google.golang.org/cloud/bigtable/bttest.TestConcurrentMutationsReadModifyAndGC /Users/sasha/go/src/google.golang.org/cloud/bigtable/bttest/inmem_test.go:126 +0xb6f ``` ## Used in [cockroachdb: Potential deadlock between Gossip.SetStorage and Node.gossipStores](https://github.com/cockroachdb/cockroach/issues/7972) [bigtable/bttest: A race between GC and row mutations](https://code-review.googlesource.com#/c/5301/) ## Need a mutex that works with net.context? I have [one](https://github.com/sasha-s/go-csync). ## Grabbing an RLock twice from the same goroutine This is, surprisingly, not a good idea! From [RWMutex](https://golang.org/pkg/sync/#RWMutex) docs: >If a goroutine holds a RWMutex for reading and another goroutine might call Lock, no goroutine should expect to be able to acquire a read lock until the initial read lock is released. In particular, this prohibits recursive read locking. This is to ensure that the lock eventually becomes available; a blocked Lock call excludes new readers from acquiring the lock. The following code will deadlock — [run the example on playground](https://play.golang.org/p/AkL-W63nq5f) or [try it online with go-deadlock on wandbox](https://wandbox.org/permlink/JwnL0GMySBju4SII): ```go package main import ( "fmt" "sync" ) func main() { var mu sync.RWMutex chrlockTwice := make(chan struct{}) // Used to control rlockTwice rlockTwice := func() { mu.RLock() fmt.Println("first Rlock succeeded") <-chrlockTwice <-chrlockTwice fmt.Println("trying to Rlock again") mu.RLock() fmt.Println("second Rlock succeeded") mu.RUnlock() mu.RUnlock() } chLock := make(chan struct{}) // Used to contol lock lock := func() { <-chLock fmt.Println("about to Lock") mu.Lock() fmt.Println("Lock succeeded") mu.Unlock() <-chLock } control := func() { chrlockTwice <- struct{}{} chLock <- struct{}{} close(chrlockTwice) close(chLock) } go control() go lock() rlockTwice() } ``` ## Configuring go-deadlock Have a look at [Opts](https://pkg.go.dev/github.com/sasha-s/go-deadlock#pkg-variables). * `Opts.Disable`: disables deadlock detection altogether * `Opts.DisableLockOrderDetection`: disables lock order based deadlock detection. * `Opts.DeadlockTimeout`: blocking on mutex for longer than DeadlockTimeout is considered a deadlock. ignored if negative * `Opts.OnPotentialDeadlock`: callback for then deadlock is detected * `Opts.MaxMapSize`: size of happens before // happens after table * `Opts.PrintAllCurrentGoroutines`: dump stacktraces of all goroutines when inconsistent locking is detected, verbose * `Opts.LogBuf`: where to write deadlock info/stacktraces ================================================ FILE: vendor/github.com/sasha-s/go-deadlock/deadlock.go ================================================ package deadlock import ( "bufio" "bytes" "fmt" "io" "os" "sync" "time" "github.com/petermattis/goid" ) // Opts control how deadlock detection behaves. // Options are supposed to be set once at a startup (say, when parsing flags). var Opts = struct { // Mutex/RWMutex would work exactly as their sync counterparts // -- almost no runtime penalty, no deadlock detection if Disable == true. Disable bool // Would disable lock order based deadlock detection if DisableLockOrderDetection == true. DisableLockOrderDetection bool // Waiting for a lock for longer than DeadlockTimeout is considered a deadlock. // Ignored is DeadlockTimeout <= 0. DeadlockTimeout time.Duration // OnPotentialDeadlock is called each time a potential deadlock is detected -- either based on // lock order or on lock wait time. OnPotentialDeadlock func() // Will keep MaxMapSize lock pairs (happens before // happens after) in the map. // The map resets once the threshold is reached. MaxMapSize int // Will dump stacktraces of all goroutines when inconsistent locking is detected. PrintAllCurrentGoroutines bool mu *sync.Mutex // Protects the LogBuf. // Will print deadlock info to log buffer. LogBuf io.Writer }{ DeadlockTimeout: time.Second * 30, OnPotentialDeadlock: func() { os.Exit(2) }, MaxMapSize: 1024 * 64, mu: &sync.Mutex{}, LogBuf: os.Stderr, } // Cond is sync.Cond wrapper type Cond struct { sync.Cond } // Locker is sync.Locker wrapper type Locker struct { sync.Locker } // Once is sync.Once wrapper type Once struct { sync.Once } // Pool is sync.Poll wrapper type Pool struct { sync.Pool } // WaitGroup is sync.WaitGroup wrapper type WaitGroup struct { sync.WaitGroup } // A Mutex is a drop-in replacement for sync.Mutex. // Performs deadlock detection unless disabled in Opts. type Mutex struct { mu sync.Mutex } // Lock locks the mutex. // If the lock is already in use, the calling goroutine // blocks until the mutex is available. // // Unless deadlock detection is disabled, logs potential deadlocks to Opts.LogBuf, // calling Opts.OnPotentialDeadlock on each occasion. func (m *Mutex) Lock() { lock(m.mu.Lock, m) } // Unlock unlocks the mutex. // It is a run-time error if m is not locked on entry to Unlock. // // A locked Mutex is not associated with a particular goroutine. // It is allowed for one goroutine to lock a Mutex and then // arrange for another goroutine to unlock it. func (m *Mutex) Unlock() { m.mu.Unlock() if !Opts.Disable { postUnlock(m) } } // An RWMutex is a drop-in replacement for sync.RWMutex. // Performs deadlock detection unless disabled in Opts. type RWMutex struct { mu sync.RWMutex } // Lock locks rw for writing. // If the lock is already locked for reading or writing, // Lock blocks until the lock is available. // To ensure that the lock eventually becomes available, // a blocked Lock call excludes new readers from acquiring // the lock. // // Unless deadlock detection is disabled, logs potential deadlocks to Opts.LogBuf, // calling Opts.OnPotentialDeadlock on each occasion. func (m *RWMutex) Lock() { lock(m.mu.Lock, m) } // Unlock unlocks the mutex for writing. It is a run-time error if rw is // not locked for writing on entry to Unlock. // // As with Mutexes, a locked RWMutex is not associated with a particular // goroutine. One goroutine may RLock (Lock) an RWMutex and then // arrange for another goroutine to RUnlock (Unlock) it. func (m *RWMutex) Unlock() { m.mu.Unlock() if !Opts.Disable { postUnlock(m) } } // RLock locks the mutex for reading. // // Unless deadlock detection is disabled, logs potential deadlocks to Opts.LogBuf, // calling Opts.OnPotentialDeadlock on each occasion. func (m *RWMutex) RLock() { lock(m.mu.RLock, m) } // RUnlock undoes a single RLock call; // it does not affect other simultaneous readers. // It is a run-time error if rw is not locked for reading // on entry to RUnlock. func (m *RWMutex) RUnlock() { m.mu.RUnlock() if !Opts.Disable { postUnlock(m) } } // RLocker returns a Locker interface that implements // the Lock and Unlock methods by calling RLock and RUnlock. func (m *RWMutex) RLocker() sync.Locker { return (*rlocker)(m) } func preLock(stack []uintptr, p interface{}) { lo.preLock(stack, p) } func postLock(stack []uintptr, p interface{}) { lo.postLock(stack, p) } func postUnlock(p interface{}) { lo.postUnlock(p) } func lock(lockFn func(), ptr interface{}) { if Opts.Disable { lockFn() return } stack := callers(1) preLock(stack, ptr) if Opts.DeadlockTimeout <= 0 { lockFn() } else { ch := make(chan struct{}) currentID := goid.Get() go func() { for { t := time.NewTimer(Opts.DeadlockTimeout) defer t.Stop() // This runs after the losure finishes, but it's OK. select { case <-t.C: lo.mu.Lock() prev, ok := lo.cur[ptr] if !ok { lo.mu.Unlock() break // Nobody seems to be holding the lock, try again. } Opts.mu.Lock() fmt.Fprintln(Opts.LogBuf, header) fmt.Fprintln(Opts.LogBuf, "Previous place where the lock was grabbed") fmt.Fprintf(Opts.LogBuf, "goroutine %v lock %p\n", prev.gid, ptr) printStack(Opts.LogBuf, prev.stack) fmt.Fprintln(Opts.LogBuf, "Have been trying to lock it again for more than", Opts.DeadlockTimeout) fmt.Fprintf(Opts.LogBuf, "goroutine %v lock %p\n", currentID, ptr) printStack(Opts.LogBuf, stack) stacks := stacks() grs := bytes.Split(stacks, []byte("\n\n")) for _, g := range grs { if goid.ExtractGID(g) == prev.gid { fmt.Fprintln(Opts.LogBuf, "Here is what goroutine", prev.gid, "doing now") Opts.LogBuf.Write(g) fmt.Fprintln(Opts.LogBuf) } } lo.other(ptr) if Opts.PrintAllCurrentGoroutines { fmt.Fprintln(Opts.LogBuf, "All current goroutines:") Opts.LogBuf.Write(stacks) } fmt.Fprintln(Opts.LogBuf) if buf, ok := Opts.LogBuf.(*bufio.Writer); ok { buf.Flush() } Opts.mu.Unlock() lo.mu.Unlock() Opts.OnPotentialDeadlock() <-ch return case <-ch: return } } }() lockFn() postLock(stack, ptr) close(ch) return } postLock(stack, ptr) } type lockOrder struct { mu sync.Mutex cur map[interface{}]stackGID // stacktraces + gids for the locks currently taken. order map[beforeAfter]ss // expected order of locks. } type stackGID struct { stack []uintptr gid int64 } type beforeAfter struct { before interface{} after interface{} } type ss struct { before []uintptr after []uintptr } var lo = newLockOrder() func newLockOrder() *lockOrder { return &lockOrder{ cur: map[interface{}]stackGID{}, order: map[beforeAfter]ss{}, } } func (l *lockOrder) postLock(stack []uintptr, p interface{}) { gid := goid.Get() l.mu.Lock() l.cur[p] = stackGID{stack, gid} l.mu.Unlock() } func (l *lockOrder) preLock(stack []uintptr, p interface{}) { if Opts.DisableLockOrderDetection { return } gid := goid.Get() l.mu.Lock() for b, bs := range l.cur { if b == p { if bs.gid == gid { Opts.mu.Lock() fmt.Fprintln(Opts.LogBuf, header, "Recursive locking:") fmt.Fprintf(Opts.LogBuf, "current goroutine %d lock %p\n", gid, b) printStack(Opts.LogBuf, stack) fmt.Fprintln(Opts.LogBuf, "Previous place where the lock was grabbed (same goroutine)") printStack(Opts.LogBuf, bs.stack) l.other(p) if buf, ok := Opts.LogBuf.(*bufio.Writer); ok { buf.Flush() } Opts.mu.Unlock() Opts.OnPotentialDeadlock() } continue } if bs.gid != gid { // We want locks taken in the same goroutine only. continue } if s, ok := l.order[beforeAfter{p, b}]; ok { Opts.mu.Lock() fmt.Fprintln(Opts.LogBuf, header, "Inconsistent locking. saw this ordering in one goroutine:") fmt.Fprintln(Opts.LogBuf, "happened before") printStack(Opts.LogBuf, s.before) fmt.Fprintln(Opts.LogBuf, "happened after") printStack(Opts.LogBuf, s.after) fmt.Fprintln(Opts.LogBuf, "in another goroutine: happened before") printStack(Opts.LogBuf, bs.stack) fmt.Fprintln(Opts.LogBuf, "happened after") printStack(Opts.LogBuf, stack) l.other(p) fmt.Fprintln(Opts.LogBuf) if buf, ok := Opts.LogBuf.(*bufio.Writer); ok { buf.Flush() } Opts.mu.Unlock() Opts.OnPotentialDeadlock() } l.order[beforeAfter{b, p}] = ss{bs.stack, stack} if len(l.order) == Opts.MaxMapSize { // Reset the map to keep memory footprint bounded. l.order = map[beforeAfter]ss{} } } l.mu.Unlock() } func (l *lockOrder) postUnlock(p interface{}) { l.mu.Lock() delete(l.cur, p) l.mu.Unlock() } type rlocker RWMutex func (r *rlocker) Lock() { (*RWMutex)(r).RLock() } func (r *rlocker) Unlock() { (*RWMutex)(r).RUnlock() } // Under lo.mu Locked. func (l *lockOrder) other(ptr interface{}) { empty := true for k := range l.cur { if k == ptr { continue } empty = false } if empty { return } fmt.Fprintln(Opts.LogBuf, "Other goroutines holding locks:") for k, pp := range l.cur { if k == ptr { continue } fmt.Fprintf(Opts.LogBuf, "goroutine %v lock %p\n", pp.gid, k) printStack(Opts.LogBuf, pp.stack) } fmt.Fprintln(Opts.LogBuf) } const header = "POTENTIAL DEADLOCK:" ================================================ FILE: vendor/github.com/sasha-s/go-deadlock/deadlock_map.go ================================================ // +build go1.9 package deadlock import "sync" // Map is sync.Map wrapper type Map struct { sync.Map } ================================================ FILE: vendor/github.com/sasha-s/go-deadlock/stacktraces.go ================================================ package deadlock import ( "bytes" "fmt" "io" "io/ioutil" "os" "os/user" "path/filepath" "runtime" "strings" "sync" ) func callers(skip int) []uintptr { s := make([]uintptr, 50) // Most relevant context seem to appear near the top of the stack. return s[:runtime.Callers(2+skip, s)] } func printStack(w io.Writer, stack []uintptr) { home := os.Getenv("HOME") usr, err := user.Current() if err == nil { home = usr.HomeDir } cwd, _ := os.Getwd() for i, pc := range stack { f := runtime.FuncForPC(pc) name := f.Name() pkg := "" if pos := strings.LastIndex(name, "/"); pos >= 0 { name = name[pos+1:] } if pos := strings.Index(name, "."); pos >= 0 { pkg = name[:pos] name = name[pos+1:] } file, line := f.FileLine(pc) if (pkg == "runtime" && name == "goexit") || (pkg == "testing" && name == "tRunner") { fmt.Fprintln(w) return } tail := "" if i == 0 { tail = " <<<<<" // Make the line performing a lock prominent. } // Shorten the file name. clean := file if cwd != "" { cl, err := filepath.Rel(cwd, file) if err == nil { clean = cl } } if home != "" { s2 := strings.Replace(file, home, "~", 1) if len(clean) > len(s2) { clean = s2 } } fmt.Fprintf(w, "%s:%d %s.%s %s%s\n", clean, line-1, pkg, name, code(file, line), tail) } fmt.Fprintln(w) } var fileSources struct { sync.Mutex lines map[string][][]byte } // Reads souce file lines from disk if not cached already. func getSourceLines(file string) [][]byte { fileSources.Lock() defer fileSources.Unlock() if fileSources.lines == nil { fileSources.lines = map[string][][]byte{} } if lines, ok := fileSources.lines[file]; ok { return lines } text, _ := ioutil.ReadFile(file) fileSources.lines[file] = bytes.Split(text, []byte{'\n'}) return fileSources.lines[file] } func code(file string, line int) string { lines := getSourceLines(file) line -= 2 if line >= len(lines) || line < 0 { return "???" } return "{ " + string(bytes.TrimSpace(lines[line])) + " }" } // Stacktraces for all goroutines. func stacks() []byte { buf := make([]byte, 1024*16) for { n := runtime.Stack(buf, true) if n < len(buf) { return buf[:n] } buf = make([]byte, 2*len(buf)) } } ================================================ FILE: vendor/github.com/sasha-s/go-deadlock/test.sh ================================================ #!/usr/bin/env bash set -e echo "" > coverage.txt for d in $(go list ./...); do go test -coverprofile=profile.out -covermode=atomic "$d" if [ -f profile.out ]; then cat profile.out >> coverage.txt rm profile.out fi done ================================================ FILE: vendor/github.com/spkg/bom/.gitignore ================================================ coverage.out ================================================ FILE: vendor/github.com/spkg/bom/.travis.yml ================================================ language: go go: - 1.6 - 1.5 - 1.4 - 1.3 install: - go get github.com/stretchr/testify/assert - go get golang.org/x/tools/cmd/cover - go get github.com/mattn/goveralls script: - go test -v -covermode=count -coverprofile=coverage.out - $(go env GOPATH | awk 'BEGIN{FS=":"} {print $1}')/bin/goveralls -coverprofile=coverage.out -service=travis-ci ================================================ FILE: vendor/github.com/spkg/bom/LICENSE.md ================================================ The MIT License (MIT) Copyright (c) 2015 John Jeffery 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. ================================================ FILE: vendor/github.com/spkg/bom/README.md ================================================ # bom ## strip UTF-8 byte order marks [![GoDoc](https://godoc.org/github.com/spkg/bom?status.svg)](https://godoc.org/github.com/spkg/bom) [![Build Status (Linux)](https://travis-ci.org/spkg/bom.svg?branch=master)](https://travis-ci.org/spkg/bom) [![Build status (Windows)](https://ci.appveyor.com/api/projects/status/065x7yuc77xicv59?svg=true)](https://ci.appveyor.com/project/jjeffery/bom) [![License](http://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://raw.githubusercontent.com/spkg/bom/master/LICENSE.md) [![Coverage Status](https://coveralls.io/repos/github/spkg/bom/badge.svg?branch=master)](https://coveralls.io/github/spkg/bom?branch=master) [![GoReportCard](https://goreportcard.com/badge/github.com/spkg/bom)](http://goreportcard.com/report/spkg/bom) The `bom` package provides a convenient way to strip [UTF-8 byte order marks](https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8) (BOM) from the beginning of a byte slice or an `io.Reader`. The Unicode Standard defines UTF-8 byte order marks as the byte sequence `0xEF,0xBB,0xBF`, but neither requires nor recommends their use. The Go standard library provides no support for UTF-8 byte order marks, and it looks like it never will. To quote Andy Balholm in the discussion on this issue at https://groups.google.com/forum/#!topic/golang-nuts/OToNIPdfkks > The Go team includes the original designers of UTF-8, and they consider BOMs an aBOMination. They are reluctant to do anything to make life easier for people who use BOMs. :-) > (Although they did make the compiler accept source files with BOMs, if I remember right.) In the same discussion thread another participant makes the comment that it should not be difficult to write an `io.Reader` that eats the BOM. It isn't difficult, and here is one simple implementation. ================================================ FILE: vendor/github.com/spkg/bom/bom.go ================================================ // Package bom is used to clean up UTF-8 Byte Order Marks. package bom import ( "bufio" "io" ) const ( bom0 = 0xef bom1 = 0xbb bom2 = 0xbf ) // Clean returns b with the 3 byte BOM stripped off the front if it is present. // If the BOM is not present, then b is returned. func Clean(b []byte) []byte { if len(b) >= 3 && b[0] == bom0 && b[1] == bom1 && b[2] == bom2 { return b[3:] } return b } // NewReader returns an io.Reader that will skip over initial UTF-8 byte order marks. func NewReader(r io.Reader) io.Reader { buf := bufio.NewReader(r) b, err := buf.Peek(3) if err != nil { // not enough bytes return buf } if b[0] == bom0 && b[1] == bom1 && b[2] == bom2 { discardBytes(buf, 3) } return buf } ================================================ FILE: vendor/github.com/spkg/bom/discard_go14.go ================================================ // +build !go1.5 package bom import "bufio" func discardBytes(buf *bufio.Reader, n int) { // cannot use the buf.Discard method as it was introduced in Go 1.5 for i := 0; i < n; i++ { buf.ReadByte() } } ================================================ FILE: vendor/github.com/spkg/bom/discard_go15.go ================================================ // +build go1.5 package bom import "bufio" func discardBytes(buf *bufio.Reader, n int) { // the Discard method was introduced in Go 1.5 buf.Discard(n) } ================================================ FILE: vendor/github.com/stretchr/testify/LICENSE ================================================ MIT License Copyright (c) 2012-2020 Mat Ryer, Tyler Bunnell and contributors. 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. ================================================ FILE: vendor/github.com/stretchr/testify/assert/assertion_compare.go ================================================ package assert import ( "bytes" "fmt" "reflect" "time" ) type CompareType int const ( compareLess CompareType = iota - 1 compareEqual compareGreater ) var ( intType = reflect.TypeOf(int(1)) int8Type = reflect.TypeOf(int8(1)) int16Type = reflect.TypeOf(int16(1)) int32Type = reflect.TypeOf(int32(1)) int64Type = reflect.TypeOf(int64(1)) uintType = reflect.TypeOf(uint(1)) uint8Type = reflect.TypeOf(uint8(1)) uint16Type = reflect.TypeOf(uint16(1)) uint32Type = reflect.TypeOf(uint32(1)) uint64Type = reflect.TypeOf(uint64(1)) uintptrType = reflect.TypeOf(uintptr(1)) float32Type = reflect.TypeOf(float32(1)) float64Type = reflect.TypeOf(float64(1)) stringType = reflect.TypeOf("") timeType = reflect.TypeOf(time.Time{}) bytesType = reflect.TypeOf([]byte{}) ) func compare(obj1, obj2 interface{}, kind reflect.Kind) (CompareType, bool) { obj1Value := reflect.ValueOf(obj1) obj2Value := reflect.ValueOf(obj2) // throughout this switch we try and avoid calling .Convert() if possible, // as this has a pretty big performance impact switch kind { case reflect.Int: { intobj1, ok := obj1.(int) if !ok { intobj1 = obj1Value.Convert(intType).Interface().(int) } intobj2, ok := obj2.(int) if !ok { intobj2 = obj2Value.Convert(intType).Interface().(int) } if intobj1 > intobj2 { return compareGreater, true } if intobj1 == intobj2 { return compareEqual, true } if intobj1 < intobj2 { return compareLess, true } } case reflect.Int8: { int8obj1, ok := obj1.(int8) if !ok { int8obj1 = obj1Value.Convert(int8Type).Interface().(int8) } int8obj2, ok := obj2.(int8) if !ok { int8obj2 = obj2Value.Convert(int8Type).Interface().(int8) } if int8obj1 > int8obj2 { return compareGreater, true } if int8obj1 == int8obj2 { return compareEqual, true } if int8obj1 < int8obj2 { return compareLess, true } } case reflect.Int16: { int16obj1, ok := obj1.(int16) if !ok { int16obj1 = obj1Value.Convert(int16Type).Interface().(int16) } int16obj2, ok := obj2.(int16) if !ok { int16obj2 = obj2Value.Convert(int16Type).Interface().(int16) } if int16obj1 > int16obj2 { return compareGreater, true } if int16obj1 == int16obj2 { return compareEqual, true } if int16obj1 < int16obj2 { return compareLess, true } } case reflect.Int32: { int32obj1, ok := obj1.(int32) if !ok { int32obj1 = obj1Value.Convert(int32Type).Interface().(int32) } int32obj2, ok := obj2.(int32) if !ok { int32obj2 = obj2Value.Convert(int32Type).Interface().(int32) } if int32obj1 > int32obj2 { return compareGreater, true } if int32obj1 == int32obj2 { return compareEqual, true } if int32obj1 < int32obj2 { return compareLess, true } } case reflect.Int64: { int64obj1, ok := obj1.(int64) if !ok { int64obj1 = obj1Value.Convert(int64Type).Interface().(int64) } int64obj2, ok := obj2.(int64) if !ok { int64obj2 = obj2Value.Convert(int64Type).Interface().(int64) } if int64obj1 > int64obj2 { return compareGreater, true } if int64obj1 == int64obj2 { return compareEqual, true } if int64obj1 < int64obj2 { return compareLess, true } } case reflect.Uint: { uintobj1, ok := obj1.(uint) if !ok { uintobj1 = obj1Value.Convert(uintType).Interface().(uint) } uintobj2, ok := obj2.(uint) if !ok { uintobj2 = obj2Value.Convert(uintType).Interface().(uint) } if uintobj1 > uintobj2 { return compareGreater, true } if uintobj1 == uintobj2 { return compareEqual, true } if uintobj1 < uintobj2 { return compareLess, true } } case reflect.Uint8: { uint8obj1, ok := obj1.(uint8) if !ok { uint8obj1 = obj1Value.Convert(uint8Type).Interface().(uint8) } uint8obj2, ok := obj2.(uint8) if !ok { uint8obj2 = obj2Value.Convert(uint8Type).Interface().(uint8) } if uint8obj1 > uint8obj2 { return compareGreater, true } if uint8obj1 == uint8obj2 { return compareEqual, true } if uint8obj1 < uint8obj2 { return compareLess, true } } case reflect.Uint16: { uint16obj1, ok := obj1.(uint16) if !ok { uint16obj1 = obj1Value.Convert(uint16Type).Interface().(uint16) } uint16obj2, ok := obj2.(uint16) if !ok { uint16obj2 = obj2Value.Convert(uint16Type).Interface().(uint16) } if uint16obj1 > uint16obj2 { return compareGreater, true } if uint16obj1 == uint16obj2 { return compareEqual, true } if uint16obj1 < uint16obj2 { return compareLess, true } } case reflect.Uint32: { uint32obj1, ok := obj1.(uint32) if !ok { uint32obj1 = obj1Value.Convert(uint32Type).Interface().(uint32) } uint32obj2, ok := obj2.(uint32) if !ok { uint32obj2 = obj2Value.Convert(uint32Type).Interface().(uint32) } if uint32obj1 > uint32obj2 { return compareGreater, true } if uint32obj1 == uint32obj2 { return compareEqual, true } if uint32obj1 < uint32obj2 { return compareLess, true } } case reflect.Uint64: { uint64obj1, ok := obj1.(uint64) if !ok { uint64obj1 = obj1Value.Convert(uint64Type).Interface().(uint64) } uint64obj2, ok := obj2.(uint64) if !ok { uint64obj2 = obj2Value.Convert(uint64Type).Interface().(uint64) } if uint64obj1 > uint64obj2 { return compareGreater, true } if uint64obj1 == uint64obj2 { return compareEqual, true } if uint64obj1 < uint64obj2 { return compareLess, true } } case reflect.Float32: { float32obj1, ok := obj1.(float32) if !ok { float32obj1 = obj1Value.Convert(float32Type).Interface().(float32) } float32obj2, ok := obj2.(float32) if !ok { float32obj2 = obj2Value.Convert(float32Type).Interface().(float32) } if float32obj1 > float32obj2 { return compareGreater, true } if float32obj1 == float32obj2 { return compareEqual, true } if float32obj1 < float32obj2 { return compareLess, true } } case reflect.Float64: { float64obj1, ok := obj1.(float64) if !ok { float64obj1 = obj1Value.Convert(float64Type).Interface().(float64) } float64obj2, ok := obj2.(float64) if !ok { float64obj2 = obj2Value.Convert(float64Type).Interface().(float64) } if float64obj1 > float64obj2 { return compareGreater, true } if float64obj1 == float64obj2 { return compareEqual, true } if float64obj1 < float64obj2 { return compareLess, true } } case reflect.String: { stringobj1, ok := obj1.(string) if !ok { stringobj1 = obj1Value.Convert(stringType).Interface().(string) } stringobj2, ok := obj2.(string) if !ok { stringobj2 = obj2Value.Convert(stringType).Interface().(string) } if stringobj1 > stringobj2 { return compareGreater, true } if stringobj1 == stringobj2 { return compareEqual, true } if stringobj1 < stringobj2 { return compareLess, true } } // Check for known struct types we can check for compare results. case reflect.Struct: { // All structs enter here. We're not interested in most types. if !obj1Value.CanConvert(timeType) { break } // time.Time can be compared! timeObj1, ok := obj1.(time.Time) if !ok { timeObj1 = obj1Value.Convert(timeType).Interface().(time.Time) } timeObj2, ok := obj2.(time.Time) if !ok { timeObj2 = obj2Value.Convert(timeType).Interface().(time.Time) } return compare(timeObj1.UnixNano(), timeObj2.UnixNano(), reflect.Int64) } case reflect.Slice: { // We only care about the []byte type. if !obj1Value.CanConvert(bytesType) { break } // []byte can be compared! bytesObj1, ok := obj1.([]byte) if !ok { bytesObj1 = obj1Value.Convert(bytesType).Interface().([]byte) } bytesObj2, ok := obj2.([]byte) if !ok { bytesObj2 = obj2Value.Convert(bytesType).Interface().([]byte) } return CompareType(bytes.Compare(bytesObj1, bytesObj2)), true } case reflect.Uintptr: { uintptrObj1, ok := obj1.(uintptr) if !ok { uintptrObj1 = obj1Value.Convert(uintptrType).Interface().(uintptr) } uintptrObj2, ok := obj2.(uintptr) if !ok { uintptrObj2 = obj2Value.Convert(uintptrType).Interface().(uintptr) } if uintptrObj1 > uintptrObj2 { return compareGreater, true } if uintptrObj1 == uintptrObj2 { return compareEqual, true } if uintptrObj1 < uintptrObj2 { return compareLess, true } } } return compareEqual, false } // Greater asserts that the first element is greater than the second // // assert.Greater(t, 2, 1) // assert.Greater(t, float64(2), float64(1)) // assert.Greater(t, "b", "a") func Greater(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return compareTwoValues(t, e1, e2, []CompareType{compareGreater}, "\"%v\" is not greater than \"%v\"", msgAndArgs...) } // GreaterOrEqual asserts that the first element is greater than or equal to the second // // assert.GreaterOrEqual(t, 2, 1) // assert.GreaterOrEqual(t, 2, 2) // assert.GreaterOrEqual(t, "b", "a") // assert.GreaterOrEqual(t, "b", "b") func GreaterOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return compareTwoValues(t, e1, e2, []CompareType{compareGreater, compareEqual}, "\"%v\" is not greater than or equal to \"%v\"", msgAndArgs...) } // Less asserts that the first element is less than the second // // assert.Less(t, 1, 2) // assert.Less(t, float64(1), float64(2)) // assert.Less(t, "a", "b") func Less(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return compareTwoValues(t, e1, e2, []CompareType{compareLess}, "\"%v\" is not less than \"%v\"", msgAndArgs...) } // LessOrEqual asserts that the first element is less than or equal to the second // // assert.LessOrEqual(t, 1, 2) // assert.LessOrEqual(t, 2, 2) // assert.LessOrEqual(t, "a", "b") // assert.LessOrEqual(t, "b", "b") func LessOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return compareTwoValues(t, e1, e2, []CompareType{compareLess, compareEqual}, "\"%v\" is not less than or equal to \"%v\"", msgAndArgs...) } // Positive asserts that the specified element is positive // // assert.Positive(t, 1) // assert.Positive(t, 1.23) func Positive(t TestingT, e interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } zero := reflect.Zero(reflect.TypeOf(e)) return compareTwoValues(t, e, zero.Interface(), []CompareType{compareGreater}, "\"%v\" is not positive", msgAndArgs...) } // Negative asserts that the specified element is negative // // assert.Negative(t, -1) // assert.Negative(t, -1.23) func Negative(t TestingT, e interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } zero := reflect.Zero(reflect.TypeOf(e)) return compareTwoValues(t, e, zero.Interface(), []CompareType{compareLess}, "\"%v\" is not negative", msgAndArgs...) } func compareTwoValues(t TestingT, e1 interface{}, e2 interface{}, allowedComparesResults []CompareType, failMessage string, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } e1Kind := reflect.ValueOf(e1).Kind() e2Kind := reflect.ValueOf(e2).Kind() if e1Kind != e2Kind { return Fail(t, "Elements should be the same type", msgAndArgs...) } compareResult, isComparable := compare(e1, e2, e1Kind) if !isComparable { return Fail(t, fmt.Sprintf("Can not compare type \"%s\"", reflect.TypeOf(e1)), msgAndArgs...) } if !containsValue(allowedComparesResults, compareResult) { return Fail(t, fmt.Sprintf(failMessage, e1, e2), msgAndArgs...) } return true } func containsValue(values []CompareType, value CompareType) bool { for _, v := range values { if v == value { return true } } return false } ================================================ FILE: vendor/github.com/stretchr/testify/assert/assertion_format.go ================================================ // Code generated with github.com/stretchr/testify/_codegen; DO NOT EDIT. package assert import ( http "net/http" url "net/url" time "time" ) // Conditionf uses a Comparison to assert a complex condition. func Conditionf(t TestingT, comp Comparison, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return Condition(t, comp, append([]interface{}{msg}, args...)...) } // Containsf asserts that the specified string, list(array, slice...) or map contains the // specified substring or element. // // assert.Containsf(t, "Hello World", "World", "error message %s", "formatted") // assert.Containsf(t, ["Hello", "World"], "World", "error message %s", "formatted") // assert.Containsf(t, {"Hello": "World"}, "Hello", "error message %s", "formatted") func Containsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return Contains(t, s, contains, append([]interface{}{msg}, args...)...) } // DirExistsf checks whether a directory exists in the given path. It also fails // if the path is a file rather a directory or there is an error checking whether it exists. func DirExistsf(t TestingT, path string, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return DirExists(t, path, append([]interface{}{msg}, args...)...) } // ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified // listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, // the number of appearances of each of them in both lists should match. // // assert.ElementsMatchf(t, [1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted") func ElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return ElementsMatch(t, listA, listB, append([]interface{}{msg}, args...)...) } // Emptyf asserts that the specified object is empty. I.e. nil, "", false, 0 or either // a slice or a channel with len == 0. // // assert.Emptyf(t, obj, "error message %s", "formatted") func Emptyf(t TestingT, object interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return Empty(t, object, append([]interface{}{msg}, args...)...) } // Equalf asserts that two objects are equal. // // assert.Equalf(t, 123, 123, "error message %s", "formatted") // // Pointer variable equality is determined based on the equality of the // referenced values (as opposed to the memory addresses). Function equality // cannot be determined and will always fail. func Equalf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return Equal(t, expected, actual, append([]interface{}{msg}, args...)...) } // EqualErrorf asserts that a function returned an error (i.e. not `nil`) // and that it is equal to the provided error. // // actualObj, err := SomeFunction() // assert.EqualErrorf(t, err, expectedErrorString, "error message %s", "formatted") func EqualErrorf(t TestingT, theError error, errString string, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return EqualError(t, theError, errString, append([]interface{}{msg}, args...)...) } // EqualExportedValuesf asserts that the types of two objects are equal and their public // fields are also equal. This is useful for comparing structs that have private fields // that could potentially differ. // // type S struct { // Exported int // notExported int // } // assert.EqualExportedValuesf(t, S{1, 2}, S{1, 3}, "error message %s", "formatted") => true // assert.EqualExportedValuesf(t, S{1, 2}, S{2, 3}, "error message %s", "formatted") => false func EqualExportedValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return EqualExportedValues(t, expected, actual, append([]interface{}{msg}, args...)...) } // EqualValuesf asserts that two objects are equal or convertible to the same types // and equal. // // assert.EqualValuesf(t, uint32(123), int32(123), "error message %s", "formatted") func EqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return EqualValues(t, expected, actual, append([]interface{}{msg}, args...)...) } // Errorf asserts that a function returned an error (i.e. not `nil`). // // actualObj, err := SomeFunction() // if assert.Errorf(t, err, "error message %s", "formatted") { // assert.Equal(t, expectedErrorf, err) // } func Errorf(t TestingT, err error, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return Error(t, err, append([]interface{}{msg}, args...)...) } // ErrorAsf asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. // This is a wrapper for errors.As. func ErrorAsf(t TestingT, err error, target interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return ErrorAs(t, err, target, append([]interface{}{msg}, args...)...) } // ErrorContainsf asserts that a function returned an error (i.e. not `nil`) // and that the error contains the specified substring. // // actualObj, err := SomeFunction() // assert.ErrorContainsf(t, err, expectedErrorSubString, "error message %s", "formatted") func ErrorContainsf(t TestingT, theError error, contains string, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return ErrorContains(t, theError, contains, append([]interface{}{msg}, args...)...) } // ErrorIsf asserts that at least one of the errors in err's chain matches target. // This is a wrapper for errors.Is. func ErrorIsf(t TestingT, err error, target error, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return ErrorIs(t, err, target, append([]interface{}{msg}, args...)...) } // Eventuallyf asserts that given condition will be met in waitFor time, // periodically checking target function each tick. // // assert.Eventuallyf(t, func() bool { return true; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") func Eventuallyf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return Eventually(t, condition, waitFor, tick, append([]interface{}{msg}, args...)...) } // EventuallyWithTf asserts that given condition will be met in waitFor time, // periodically checking target function each tick. In contrast to Eventually, // it supplies a CollectT to the condition function, so that the condition // function can use the CollectT to call other assertions. // The condition is considered "met" if no errors are raised in a tick. // The supplied CollectT collects all errors from one tick (if there are any). // If the condition is not met before waitFor, the collected errors of // the last tick are copied to t. // // externalValue := false // go func() { // time.Sleep(8*time.Second) // externalValue = true // }() // assert.EventuallyWithTf(t, func(c *assert.CollectT, "error message %s", "formatted") { // // add assertions as needed; any assertion failure will fail the current tick // assert.True(c, externalValue, "expected 'externalValue' to be true") // }, 1*time.Second, 10*time.Second, "external state has not changed to 'true'; still false") func EventuallyWithTf(t TestingT, condition func(collect *CollectT), waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return EventuallyWithT(t, condition, waitFor, tick, append([]interface{}{msg}, args...)...) } // Exactlyf asserts that two objects are equal in value and type. // // assert.Exactlyf(t, int32(123), int64(123), "error message %s", "formatted") func Exactlyf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return Exactly(t, expected, actual, append([]interface{}{msg}, args...)...) } // Failf reports a failure through func Failf(t TestingT, failureMessage string, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return Fail(t, failureMessage, append([]interface{}{msg}, args...)...) } // FailNowf fails test func FailNowf(t TestingT, failureMessage string, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return FailNow(t, failureMessage, append([]interface{}{msg}, args...)...) } // Falsef asserts that the specified value is false. // // assert.Falsef(t, myBool, "error message %s", "formatted") func Falsef(t TestingT, value bool, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return False(t, value, append([]interface{}{msg}, args...)...) } // FileExistsf checks whether a file exists in the given path. It also fails if // the path points to a directory or there is an error when trying to check the file. func FileExistsf(t TestingT, path string, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return FileExists(t, path, append([]interface{}{msg}, args...)...) } // Greaterf asserts that the first element is greater than the second // // assert.Greaterf(t, 2, 1, "error message %s", "formatted") // assert.Greaterf(t, float64(2), float64(1), "error message %s", "formatted") // assert.Greaterf(t, "b", "a", "error message %s", "formatted") func Greaterf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return Greater(t, e1, e2, append([]interface{}{msg}, args...)...) } // GreaterOrEqualf asserts that the first element is greater than or equal to the second // // assert.GreaterOrEqualf(t, 2, 1, "error message %s", "formatted") // assert.GreaterOrEqualf(t, 2, 2, "error message %s", "formatted") // assert.GreaterOrEqualf(t, "b", "a", "error message %s", "formatted") // assert.GreaterOrEqualf(t, "b", "b", "error message %s", "formatted") func GreaterOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return GreaterOrEqual(t, e1, e2, append([]interface{}{msg}, args...)...) } // HTTPBodyContainsf asserts that a specified handler returns a // body that contains a string. // // assert.HTTPBodyContainsf(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). func HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return HTTPBodyContains(t, handler, method, url, values, str, append([]interface{}{msg}, args...)...) } // HTTPBodyNotContainsf asserts that a specified handler returns a // body that does not contain a string. // // assert.HTTPBodyNotContainsf(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). func HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return HTTPBodyNotContains(t, handler, method, url, values, str, append([]interface{}{msg}, args...)...) } // HTTPErrorf asserts that a specified handler returns an error status code. // // assert.HTTPErrorf(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} // // Returns whether the assertion was successful (true) or not (false). func HTTPErrorf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return HTTPError(t, handler, method, url, values, append([]interface{}{msg}, args...)...) } // HTTPRedirectf asserts that a specified handler returns a redirect status code. // // assert.HTTPRedirectf(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} // // Returns whether the assertion was successful (true) or not (false). func HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return HTTPRedirect(t, handler, method, url, values, append([]interface{}{msg}, args...)...) } // HTTPStatusCodef asserts that a specified handler returns a specified status code. // // assert.HTTPStatusCodef(t, myHandler, "GET", "/notImplemented", nil, 501, "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). func HTTPStatusCodef(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return HTTPStatusCode(t, handler, method, url, values, statuscode, append([]interface{}{msg}, args...)...) } // HTTPSuccessf asserts that a specified handler returns a success status code. // // assert.HTTPSuccessf(t, myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). func HTTPSuccessf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return HTTPSuccess(t, handler, method, url, values, append([]interface{}{msg}, args...)...) } // Implementsf asserts that an object is implemented by the specified interface. // // assert.Implementsf(t, (*MyInterface)(nil), new(MyObject), "error message %s", "formatted") func Implementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return Implements(t, interfaceObject, object, append([]interface{}{msg}, args...)...) } // InDeltaf asserts that the two numerals are within delta of each other. // // assert.InDeltaf(t, math.Pi, 22/7.0, 0.01, "error message %s", "formatted") func InDeltaf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return InDelta(t, expected, actual, delta, append([]interface{}{msg}, args...)...) } // InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. func InDeltaMapValuesf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return InDeltaMapValues(t, expected, actual, delta, append([]interface{}{msg}, args...)...) } // InDeltaSlicef is the same as InDelta, except it compares two slices. func InDeltaSlicef(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return InDeltaSlice(t, expected, actual, delta, append([]interface{}{msg}, args...)...) } // InEpsilonf asserts that expected and actual have a relative error less than epsilon func InEpsilonf(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return InEpsilon(t, expected, actual, epsilon, append([]interface{}{msg}, args...)...) } // InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices. func InEpsilonSlicef(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return InEpsilonSlice(t, expected, actual, epsilon, append([]interface{}{msg}, args...)...) } // IsDecreasingf asserts that the collection is decreasing // // assert.IsDecreasingf(t, []int{2, 1, 0}, "error message %s", "formatted") // assert.IsDecreasingf(t, []float{2, 1}, "error message %s", "formatted") // assert.IsDecreasingf(t, []string{"b", "a"}, "error message %s", "formatted") func IsDecreasingf(t TestingT, object interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return IsDecreasing(t, object, append([]interface{}{msg}, args...)...) } // IsIncreasingf asserts that the collection is increasing // // assert.IsIncreasingf(t, []int{1, 2, 3}, "error message %s", "formatted") // assert.IsIncreasingf(t, []float{1, 2}, "error message %s", "formatted") // assert.IsIncreasingf(t, []string{"a", "b"}, "error message %s", "formatted") func IsIncreasingf(t TestingT, object interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return IsIncreasing(t, object, append([]interface{}{msg}, args...)...) } // IsNonDecreasingf asserts that the collection is not decreasing // // assert.IsNonDecreasingf(t, []int{1, 1, 2}, "error message %s", "formatted") // assert.IsNonDecreasingf(t, []float{1, 2}, "error message %s", "formatted") // assert.IsNonDecreasingf(t, []string{"a", "b"}, "error message %s", "formatted") func IsNonDecreasingf(t TestingT, object interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return IsNonDecreasing(t, object, append([]interface{}{msg}, args...)...) } // IsNonIncreasingf asserts that the collection is not increasing // // assert.IsNonIncreasingf(t, []int{2, 1, 1}, "error message %s", "formatted") // assert.IsNonIncreasingf(t, []float{2, 1}, "error message %s", "formatted") // assert.IsNonIncreasingf(t, []string{"b", "a"}, "error message %s", "formatted") func IsNonIncreasingf(t TestingT, object interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return IsNonIncreasing(t, object, append([]interface{}{msg}, args...)...) } // IsTypef asserts that the specified objects are of the same type. func IsTypef(t TestingT, expectedType interface{}, object interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return IsType(t, expectedType, object, append([]interface{}{msg}, args...)...) } // JSONEqf asserts that two JSON strings are equivalent. // // assert.JSONEqf(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted") func JSONEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return JSONEq(t, expected, actual, append([]interface{}{msg}, args...)...) } // Lenf asserts that the specified object has specific length. // Lenf also fails if the object has a type that len() not accept. // // assert.Lenf(t, mySlice, 3, "error message %s", "formatted") func Lenf(t TestingT, object interface{}, length int, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return Len(t, object, length, append([]interface{}{msg}, args...)...) } // Lessf asserts that the first element is less than the second // // assert.Lessf(t, 1, 2, "error message %s", "formatted") // assert.Lessf(t, float64(1), float64(2), "error message %s", "formatted") // assert.Lessf(t, "a", "b", "error message %s", "formatted") func Lessf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return Less(t, e1, e2, append([]interface{}{msg}, args...)...) } // LessOrEqualf asserts that the first element is less than or equal to the second // // assert.LessOrEqualf(t, 1, 2, "error message %s", "formatted") // assert.LessOrEqualf(t, 2, 2, "error message %s", "formatted") // assert.LessOrEqualf(t, "a", "b", "error message %s", "formatted") // assert.LessOrEqualf(t, "b", "b", "error message %s", "formatted") func LessOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return LessOrEqual(t, e1, e2, append([]interface{}{msg}, args...)...) } // Negativef asserts that the specified element is negative // // assert.Negativef(t, -1, "error message %s", "formatted") // assert.Negativef(t, -1.23, "error message %s", "formatted") func Negativef(t TestingT, e interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return Negative(t, e, append([]interface{}{msg}, args...)...) } // Neverf asserts that the given condition doesn't satisfy in waitFor time, // periodically checking the target function each tick. // // assert.Neverf(t, func() bool { return false; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") func Neverf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return Never(t, condition, waitFor, tick, append([]interface{}{msg}, args...)...) } // Nilf asserts that the specified object is nil. // // assert.Nilf(t, err, "error message %s", "formatted") func Nilf(t TestingT, object interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return Nil(t, object, append([]interface{}{msg}, args...)...) } // NoDirExistsf checks whether a directory does not exist in the given path. // It fails if the path points to an existing _directory_ only. func NoDirExistsf(t TestingT, path string, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return NoDirExists(t, path, append([]interface{}{msg}, args...)...) } // NoErrorf asserts that a function returned no error (i.e. `nil`). // // actualObj, err := SomeFunction() // if assert.NoErrorf(t, err, "error message %s", "formatted") { // assert.Equal(t, expectedObj, actualObj) // } func NoErrorf(t TestingT, err error, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return NoError(t, err, append([]interface{}{msg}, args...)...) } // NoFileExistsf checks whether a file does not exist in a given path. It fails // if the path points to an existing _file_ only. func NoFileExistsf(t TestingT, path string, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return NoFileExists(t, path, append([]interface{}{msg}, args...)...) } // NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the // specified substring or element. // // assert.NotContainsf(t, "Hello World", "Earth", "error message %s", "formatted") // assert.NotContainsf(t, ["Hello", "World"], "Earth", "error message %s", "formatted") // assert.NotContainsf(t, {"Hello": "World"}, "Earth", "error message %s", "formatted") func NotContainsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return NotContains(t, s, contains, append([]interface{}{msg}, args...)...) } // NotEmptyf asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either // a slice or a channel with len == 0. // // if assert.NotEmptyf(t, obj, "error message %s", "formatted") { // assert.Equal(t, "two", obj[1]) // } func NotEmptyf(t TestingT, object interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return NotEmpty(t, object, append([]interface{}{msg}, args...)...) } // NotEqualf asserts that the specified values are NOT equal. // // assert.NotEqualf(t, obj1, obj2, "error message %s", "formatted") // // Pointer variable equality is determined based on the equality of the // referenced values (as opposed to the memory addresses). func NotEqualf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return NotEqual(t, expected, actual, append([]interface{}{msg}, args...)...) } // NotEqualValuesf asserts that two objects are not equal even when converted to the same type // // assert.NotEqualValuesf(t, obj1, obj2, "error message %s", "formatted") func NotEqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return NotEqualValues(t, expected, actual, append([]interface{}{msg}, args...)...) } // NotErrorIsf asserts that at none of the errors in err's chain matches target. // This is a wrapper for errors.Is. func NotErrorIsf(t TestingT, err error, target error, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return NotErrorIs(t, err, target, append([]interface{}{msg}, args...)...) } // NotImplementsf asserts that an object does not implement the specified interface. // // assert.NotImplementsf(t, (*MyInterface)(nil), new(MyObject), "error message %s", "formatted") func NotImplementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return NotImplements(t, interfaceObject, object, append([]interface{}{msg}, args...)...) } // NotNilf asserts that the specified object is not nil. // // assert.NotNilf(t, err, "error message %s", "formatted") func NotNilf(t TestingT, object interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return NotNil(t, object, append([]interface{}{msg}, args...)...) } // NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic. // // assert.NotPanicsf(t, func(){ RemainCalm() }, "error message %s", "formatted") func NotPanicsf(t TestingT, f PanicTestFunc, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return NotPanics(t, f, append([]interface{}{msg}, args...)...) } // NotRegexpf asserts that a specified regexp does not match a string. // // assert.NotRegexpf(t, regexp.MustCompile("starts"), "it's starting", "error message %s", "formatted") // assert.NotRegexpf(t, "^start", "it's not starting", "error message %s", "formatted") func NotRegexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return NotRegexp(t, rx, str, append([]interface{}{msg}, args...)...) } // NotSamef asserts that two pointers do not reference the same object. // // assert.NotSamef(t, ptr1, ptr2, "error message %s", "formatted") // // Both arguments must be pointer variables. Pointer variable sameness is // determined based on the equality of both type and value. func NotSamef(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return NotSame(t, expected, actual, append([]interface{}{msg}, args...)...) } // NotSubsetf asserts that the specified list(array, slice...) or map does NOT // contain all elements given in the specified subset list(array, slice...) or // map. // // assert.NotSubsetf(t, [1, 3, 4], [1, 2], "error message %s", "formatted") // assert.NotSubsetf(t, {"x": 1, "y": 2}, {"z": 3}, "error message %s", "formatted") func NotSubsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return NotSubset(t, list, subset, append([]interface{}{msg}, args...)...) } // NotZerof asserts that i is not the zero value for its type. func NotZerof(t TestingT, i interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return NotZero(t, i, append([]interface{}{msg}, args...)...) } // Panicsf asserts that the code inside the specified PanicTestFunc panics. // // assert.Panicsf(t, func(){ GoCrazy() }, "error message %s", "formatted") func Panicsf(t TestingT, f PanicTestFunc, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return Panics(t, f, append([]interface{}{msg}, args...)...) } // PanicsWithErrorf asserts that the code inside the specified PanicTestFunc // panics, and that the recovered panic value is an error that satisfies the // EqualError comparison. // // assert.PanicsWithErrorf(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted") func PanicsWithErrorf(t TestingT, errString string, f PanicTestFunc, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return PanicsWithError(t, errString, f, append([]interface{}{msg}, args...)...) } // PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that // the recovered panic value equals the expected panic value. // // assert.PanicsWithValuef(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted") func PanicsWithValuef(t TestingT, expected interface{}, f PanicTestFunc, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return PanicsWithValue(t, expected, f, append([]interface{}{msg}, args...)...) } // Positivef asserts that the specified element is positive // // assert.Positivef(t, 1, "error message %s", "formatted") // assert.Positivef(t, 1.23, "error message %s", "formatted") func Positivef(t TestingT, e interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return Positive(t, e, append([]interface{}{msg}, args...)...) } // Regexpf asserts that a specified regexp matches a string. // // assert.Regexpf(t, regexp.MustCompile("start"), "it's starting", "error message %s", "formatted") // assert.Regexpf(t, "start...$", "it's not starting", "error message %s", "formatted") func Regexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return Regexp(t, rx, str, append([]interface{}{msg}, args...)...) } // Samef asserts that two pointers reference the same object. // // assert.Samef(t, ptr1, ptr2, "error message %s", "formatted") // // Both arguments must be pointer variables. Pointer variable sameness is // determined based on the equality of both type and value. func Samef(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return Same(t, expected, actual, append([]interface{}{msg}, args...)...) } // Subsetf asserts that the specified list(array, slice...) or map contains all // elements given in the specified subset list(array, slice...) or map. // // assert.Subsetf(t, [1, 2, 3], [1, 2], "error message %s", "formatted") // assert.Subsetf(t, {"x": 1, "y": 2}, {"x": 1}, "error message %s", "formatted") func Subsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return Subset(t, list, subset, append([]interface{}{msg}, args...)...) } // Truef asserts that the specified value is true. // // assert.Truef(t, myBool, "error message %s", "formatted") func Truef(t TestingT, value bool, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return True(t, value, append([]interface{}{msg}, args...)...) } // WithinDurationf asserts that the two times are within duration delta of each other. // // assert.WithinDurationf(t, time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted") func WithinDurationf(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return WithinDuration(t, expected, actual, delta, append([]interface{}{msg}, args...)...) } // WithinRangef asserts that a time is within a time range (inclusive). // // assert.WithinRangef(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), "error message %s", "formatted") func WithinRangef(t TestingT, actual time.Time, start time.Time, end time.Time, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return WithinRange(t, actual, start, end, append([]interface{}{msg}, args...)...) } // YAMLEqf asserts that two YAML strings are equivalent. func YAMLEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return YAMLEq(t, expected, actual, append([]interface{}{msg}, args...)...) } // Zerof asserts that i is the zero value for its type. func Zerof(t TestingT, i interface{}, msg string, args ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return Zero(t, i, append([]interface{}{msg}, args...)...) } ================================================ FILE: vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl ================================================ {{.CommentFormat}} func {{.DocInfo.Name}}f(t TestingT, {{.ParamsFormat}}) bool { if h, ok := t.(tHelper); ok { h.Helper() } return {{.DocInfo.Name}}(t, {{.ForwardedParamsFormat}}) } ================================================ FILE: vendor/github.com/stretchr/testify/assert/assertion_forward.go ================================================ // Code generated with github.com/stretchr/testify/_codegen; DO NOT EDIT. package assert import ( http "net/http" url "net/url" time "time" ) // Condition uses a Comparison to assert a complex condition. func (a *Assertions) Condition(comp Comparison, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Condition(a.t, comp, msgAndArgs...) } // Conditionf uses a Comparison to assert a complex condition. func (a *Assertions) Conditionf(comp Comparison, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Conditionf(a.t, comp, msg, args...) } // Contains asserts that the specified string, list(array, slice...) or map contains the // specified substring or element. // // a.Contains("Hello World", "World") // a.Contains(["Hello", "World"], "World") // a.Contains({"Hello": "World"}, "Hello") func (a *Assertions) Contains(s interface{}, contains interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Contains(a.t, s, contains, msgAndArgs...) } // Containsf asserts that the specified string, list(array, slice...) or map contains the // specified substring or element. // // a.Containsf("Hello World", "World", "error message %s", "formatted") // a.Containsf(["Hello", "World"], "World", "error message %s", "formatted") // a.Containsf({"Hello": "World"}, "Hello", "error message %s", "formatted") func (a *Assertions) Containsf(s interface{}, contains interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Containsf(a.t, s, contains, msg, args...) } // DirExists checks whether a directory exists in the given path. It also fails // if the path is a file rather a directory or there is an error checking whether it exists. func (a *Assertions) DirExists(path string, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return DirExists(a.t, path, msgAndArgs...) } // DirExistsf checks whether a directory exists in the given path. It also fails // if the path is a file rather a directory or there is an error checking whether it exists. func (a *Assertions) DirExistsf(path string, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return DirExistsf(a.t, path, msg, args...) } // ElementsMatch asserts that the specified listA(array, slice...) is equal to specified // listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, // the number of appearances of each of them in both lists should match. // // a.ElementsMatch([1, 3, 2, 3], [1, 3, 3, 2]) func (a *Assertions) ElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return ElementsMatch(a.t, listA, listB, msgAndArgs...) } // ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified // listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, // the number of appearances of each of them in both lists should match. // // a.ElementsMatchf([1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted") func (a *Assertions) ElementsMatchf(listA interface{}, listB interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return ElementsMatchf(a.t, listA, listB, msg, args...) } // Empty asserts that the specified object is empty. I.e. nil, "", false, 0 or either // a slice or a channel with len == 0. // // a.Empty(obj) func (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Empty(a.t, object, msgAndArgs...) } // Emptyf asserts that the specified object is empty. I.e. nil, "", false, 0 or either // a slice or a channel with len == 0. // // a.Emptyf(obj, "error message %s", "formatted") func (a *Assertions) Emptyf(object interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Emptyf(a.t, object, msg, args...) } // Equal asserts that two objects are equal. // // a.Equal(123, 123) // // Pointer variable equality is determined based on the equality of the // referenced values (as opposed to the memory addresses). Function equality // cannot be determined and will always fail. func (a *Assertions) Equal(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Equal(a.t, expected, actual, msgAndArgs...) } // EqualError asserts that a function returned an error (i.e. not `nil`) // and that it is equal to the provided error. // // actualObj, err := SomeFunction() // a.EqualError(err, expectedErrorString) func (a *Assertions) EqualError(theError error, errString string, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return EqualError(a.t, theError, errString, msgAndArgs...) } // EqualErrorf asserts that a function returned an error (i.e. not `nil`) // and that it is equal to the provided error. // // actualObj, err := SomeFunction() // a.EqualErrorf(err, expectedErrorString, "error message %s", "formatted") func (a *Assertions) EqualErrorf(theError error, errString string, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return EqualErrorf(a.t, theError, errString, msg, args...) } // EqualExportedValues asserts that the types of two objects are equal and their public // fields are also equal. This is useful for comparing structs that have private fields // that could potentially differ. // // type S struct { // Exported int // notExported int // } // a.EqualExportedValues(S{1, 2}, S{1, 3}) => true // a.EqualExportedValues(S{1, 2}, S{2, 3}) => false func (a *Assertions) EqualExportedValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return EqualExportedValues(a.t, expected, actual, msgAndArgs...) } // EqualExportedValuesf asserts that the types of two objects are equal and their public // fields are also equal. This is useful for comparing structs that have private fields // that could potentially differ. // // type S struct { // Exported int // notExported int // } // a.EqualExportedValuesf(S{1, 2}, S{1, 3}, "error message %s", "formatted") => true // a.EqualExportedValuesf(S{1, 2}, S{2, 3}, "error message %s", "formatted") => false func (a *Assertions) EqualExportedValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return EqualExportedValuesf(a.t, expected, actual, msg, args...) } // EqualValues asserts that two objects are equal or convertible to the same types // and equal. // // a.EqualValues(uint32(123), int32(123)) func (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return EqualValues(a.t, expected, actual, msgAndArgs...) } // EqualValuesf asserts that two objects are equal or convertible to the same types // and equal. // // a.EqualValuesf(uint32(123), int32(123), "error message %s", "formatted") func (a *Assertions) EqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return EqualValuesf(a.t, expected, actual, msg, args...) } // Equalf asserts that two objects are equal. // // a.Equalf(123, 123, "error message %s", "formatted") // // Pointer variable equality is determined based on the equality of the // referenced values (as opposed to the memory addresses). Function equality // cannot be determined and will always fail. func (a *Assertions) Equalf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Equalf(a.t, expected, actual, msg, args...) } // Error asserts that a function returned an error (i.e. not `nil`). // // actualObj, err := SomeFunction() // if a.Error(err) { // assert.Equal(t, expectedError, err) // } func (a *Assertions) Error(err error, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Error(a.t, err, msgAndArgs...) } // ErrorAs asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. // This is a wrapper for errors.As. func (a *Assertions) ErrorAs(err error, target interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return ErrorAs(a.t, err, target, msgAndArgs...) } // ErrorAsf asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. // This is a wrapper for errors.As. func (a *Assertions) ErrorAsf(err error, target interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return ErrorAsf(a.t, err, target, msg, args...) } // ErrorContains asserts that a function returned an error (i.e. not `nil`) // and that the error contains the specified substring. // // actualObj, err := SomeFunction() // a.ErrorContains(err, expectedErrorSubString) func (a *Assertions) ErrorContains(theError error, contains string, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return ErrorContains(a.t, theError, contains, msgAndArgs...) } // ErrorContainsf asserts that a function returned an error (i.e. not `nil`) // and that the error contains the specified substring. // // actualObj, err := SomeFunction() // a.ErrorContainsf(err, expectedErrorSubString, "error message %s", "formatted") func (a *Assertions) ErrorContainsf(theError error, contains string, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return ErrorContainsf(a.t, theError, contains, msg, args...) } // ErrorIs asserts that at least one of the errors in err's chain matches target. // This is a wrapper for errors.Is. func (a *Assertions) ErrorIs(err error, target error, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return ErrorIs(a.t, err, target, msgAndArgs...) } // ErrorIsf asserts that at least one of the errors in err's chain matches target. // This is a wrapper for errors.Is. func (a *Assertions) ErrorIsf(err error, target error, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return ErrorIsf(a.t, err, target, msg, args...) } // Errorf asserts that a function returned an error (i.e. not `nil`). // // actualObj, err := SomeFunction() // if a.Errorf(err, "error message %s", "formatted") { // assert.Equal(t, expectedErrorf, err) // } func (a *Assertions) Errorf(err error, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Errorf(a.t, err, msg, args...) } // Eventually asserts that given condition will be met in waitFor time, // periodically checking target function each tick. // // a.Eventually(func() bool { return true; }, time.Second, 10*time.Millisecond) func (a *Assertions) Eventually(condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Eventually(a.t, condition, waitFor, tick, msgAndArgs...) } // EventuallyWithT asserts that given condition will be met in waitFor time, // periodically checking target function each tick. In contrast to Eventually, // it supplies a CollectT to the condition function, so that the condition // function can use the CollectT to call other assertions. // The condition is considered "met" if no errors are raised in a tick. // The supplied CollectT collects all errors from one tick (if there are any). // If the condition is not met before waitFor, the collected errors of // the last tick are copied to t. // // externalValue := false // go func() { // time.Sleep(8*time.Second) // externalValue = true // }() // a.EventuallyWithT(func(c *assert.CollectT) { // // add assertions as needed; any assertion failure will fail the current tick // assert.True(c, externalValue, "expected 'externalValue' to be true") // }, 1*time.Second, 10*time.Second, "external state has not changed to 'true'; still false") func (a *Assertions) EventuallyWithT(condition func(collect *CollectT), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return EventuallyWithT(a.t, condition, waitFor, tick, msgAndArgs...) } // EventuallyWithTf asserts that given condition will be met in waitFor time, // periodically checking target function each tick. In contrast to Eventually, // it supplies a CollectT to the condition function, so that the condition // function can use the CollectT to call other assertions. // The condition is considered "met" if no errors are raised in a tick. // The supplied CollectT collects all errors from one tick (if there are any). // If the condition is not met before waitFor, the collected errors of // the last tick are copied to t. // // externalValue := false // go func() { // time.Sleep(8*time.Second) // externalValue = true // }() // a.EventuallyWithTf(func(c *assert.CollectT, "error message %s", "formatted") { // // add assertions as needed; any assertion failure will fail the current tick // assert.True(c, externalValue, "expected 'externalValue' to be true") // }, 1*time.Second, 10*time.Second, "external state has not changed to 'true'; still false") func (a *Assertions) EventuallyWithTf(condition func(collect *CollectT), waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return EventuallyWithTf(a.t, condition, waitFor, tick, msg, args...) } // Eventuallyf asserts that given condition will be met in waitFor time, // periodically checking target function each tick. // // a.Eventuallyf(func() bool { return true; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") func (a *Assertions) Eventuallyf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Eventuallyf(a.t, condition, waitFor, tick, msg, args...) } // Exactly asserts that two objects are equal in value and type. // // a.Exactly(int32(123), int64(123)) func (a *Assertions) Exactly(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Exactly(a.t, expected, actual, msgAndArgs...) } // Exactlyf asserts that two objects are equal in value and type. // // a.Exactlyf(int32(123), int64(123), "error message %s", "formatted") func (a *Assertions) Exactlyf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Exactlyf(a.t, expected, actual, msg, args...) } // Fail reports a failure through func (a *Assertions) Fail(failureMessage string, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Fail(a.t, failureMessage, msgAndArgs...) } // FailNow fails test func (a *Assertions) FailNow(failureMessage string, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return FailNow(a.t, failureMessage, msgAndArgs...) } // FailNowf fails test func (a *Assertions) FailNowf(failureMessage string, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return FailNowf(a.t, failureMessage, msg, args...) } // Failf reports a failure through func (a *Assertions) Failf(failureMessage string, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Failf(a.t, failureMessage, msg, args...) } // False asserts that the specified value is false. // // a.False(myBool) func (a *Assertions) False(value bool, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return False(a.t, value, msgAndArgs...) } // Falsef asserts that the specified value is false. // // a.Falsef(myBool, "error message %s", "formatted") func (a *Assertions) Falsef(value bool, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Falsef(a.t, value, msg, args...) } // FileExists checks whether a file exists in the given path. It also fails if // the path points to a directory or there is an error when trying to check the file. func (a *Assertions) FileExists(path string, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return FileExists(a.t, path, msgAndArgs...) } // FileExistsf checks whether a file exists in the given path. It also fails if // the path points to a directory or there is an error when trying to check the file. func (a *Assertions) FileExistsf(path string, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return FileExistsf(a.t, path, msg, args...) } // Greater asserts that the first element is greater than the second // // a.Greater(2, 1) // a.Greater(float64(2), float64(1)) // a.Greater("b", "a") func (a *Assertions) Greater(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Greater(a.t, e1, e2, msgAndArgs...) } // GreaterOrEqual asserts that the first element is greater than or equal to the second // // a.GreaterOrEqual(2, 1) // a.GreaterOrEqual(2, 2) // a.GreaterOrEqual("b", "a") // a.GreaterOrEqual("b", "b") func (a *Assertions) GreaterOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return GreaterOrEqual(a.t, e1, e2, msgAndArgs...) } // GreaterOrEqualf asserts that the first element is greater than or equal to the second // // a.GreaterOrEqualf(2, 1, "error message %s", "formatted") // a.GreaterOrEqualf(2, 2, "error message %s", "formatted") // a.GreaterOrEqualf("b", "a", "error message %s", "formatted") // a.GreaterOrEqualf("b", "b", "error message %s", "formatted") func (a *Assertions) GreaterOrEqualf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return GreaterOrEqualf(a.t, e1, e2, msg, args...) } // Greaterf asserts that the first element is greater than the second // // a.Greaterf(2, 1, "error message %s", "formatted") // a.Greaterf(float64(2), float64(1), "error message %s", "formatted") // a.Greaterf("b", "a", "error message %s", "formatted") func (a *Assertions) Greaterf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Greaterf(a.t, e1, e2, msg, args...) } // HTTPBodyContains asserts that a specified handler returns a // body that contains a string. // // a.HTTPBodyContains(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return HTTPBodyContains(a.t, handler, method, url, values, str, msgAndArgs...) } // HTTPBodyContainsf asserts that a specified handler returns a // body that contains a string. // // a.HTTPBodyContainsf(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPBodyContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return HTTPBodyContainsf(a.t, handler, method, url, values, str, msg, args...) } // HTTPBodyNotContains asserts that a specified handler returns a // body that does not contain a string. // // a.HTTPBodyNotContains(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPBodyNotContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return HTTPBodyNotContains(a.t, handler, method, url, values, str, msgAndArgs...) } // HTTPBodyNotContainsf asserts that a specified handler returns a // body that does not contain a string. // // a.HTTPBodyNotContainsf(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPBodyNotContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return HTTPBodyNotContainsf(a.t, handler, method, url, values, str, msg, args...) } // HTTPError asserts that a specified handler returns an error status code. // // a.HTTPError(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPError(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return HTTPError(a.t, handler, method, url, values, msgAndArgs...) } // HTTPErrorf asserts that a specified handler returns an error status code. // // a.HTTPErrorf(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPErrorf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return HTTPErrorf(a.t, handler, method, url, values, msg, args...) } // HTTPRedirect asserts that a specified handler returns a redirect status code. // // a.HTTPRedirect(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPRedirect(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return HTTPRedirect(a.t, handler, method, url, values, msgAndArgs...) } // HTTPRedirectf asserts that a specified handler returns a redirect status code. // // a.HTTPRedirectf(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPRedirectf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return HTTPRedirectf(a.t, handler, method, url, values, msg, args...) } // HTTPStatusCode asserts that a specified handler returns a specified status code. // // a.HTTPStatusCode(myHandler, "GET", "/notImplemented", nil, 501) // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPStatusCode(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return HTTPStatusCode(a.t, handler, method, url, values, statuscode, msgAndArgs...) } // HTTPStatusCodef asserts that a specified handler returns a specified status code. // // a.HTTPStatusCodef(myHandler, "GET", "/notImplemented", nil, 501, "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPStatusCodef(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return HTTPStatusCodef(a.t, handler, method, url, values, statuscode, msg, args...) } // HTTPSuccess asserts that a specified handler returns a success status code. // // a.HTTPSuccess(myHandler, "POST", "http://www.google.com", nil) // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPSuccess(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return HTTPSuccess(a.t, handler, method, url, values, msgAndArgs...) } // HTTPSuccessf asserts that a specified handler returns a success status code. // // a.HTTPSuccessf(myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted") // // Returns whether the assertion was successful (true) or not (false). func (a *Assertions) HTTPSuccessf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return HTTPSuccessf(a.t, handler, method, url, values, msg, args...) } // Implements asserts that an object is implemented by the specified interface. // // a.Implements((*MyInterface)(nil), new(MyObject)) func (a *Assertions) Implements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Implements(a.t, interfaceObject, object, msgAndArgs...) } // Implementsf asserts that an object is implemented by the specified interface. // // a.Implementsf((*MyInterface)(nil), new(MyObject), "error message %s", "formatted") func (a *Assertions) Implementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Implementsf(a.t, interfaceObject, object, msg, args...) } // InDelta asserts that the two numerals are within delta of each other. // // a.InDelta(math.Pi, 22/7.0, 0.01) func (a *Assertions) InDelta(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return InDelta(a.t, expected, actual, delta, msgAndArgs...) } // InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. func (a *Assertions) InDeltaMapValues(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return InDeltaMapValues(a.t, expected, actual, delta, msgAndArgs...) } // InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. func (a *Assertions) InDeltaMapValuesf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return InDeltaMapValuesf(a.t, expected, actual, delta, msg, args...) } // InDeltaSlice is the same as InDelta, except it compares two slices. func (a *Assertions) InDeltaSlice(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return InDeltaSlice(a.t, expected, actual, delta, msgAndArgs...) } // InDeltaSlicef is the same as InDelta, except it compares two slices. func (a *Assertions) InDeltaSlicef(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return InDeltaSlicef(a.t, expected, actual, delta, msg, args...) } // InDeltaf asserts that the two numerals are within delta of each other. // // a.InDeltaf(math.Pi, 22/7.0, 0.01, "error message %s", "formatted") func (a *Assertions) InDeltaf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return InDeltaf(a.t, expected, actual, delta, msg, args...) } // InEpsilon asserts that expected and actual have a relative error less than epsilon func (a *Assertions) InEpsilon(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return InEpsilon(a.t, expected, actual, epsilon, msgAndArgs...) } // InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices. func (a *Assertions) InEpsilonSlice(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return InEpsilonSlice(a.t, expected, actual, epsilon, msgAndArgs...) } // InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices. func (a *Assertions) InEpsilonSlicef(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return InEpsilonSlicef(a.t, expected, actual, epsilon, msg, args...) } // InEpsilonf asserts that expected and actual have a relative error less than epsilon func (a *Assertions) InEpsilonf(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return InEpsilonf(a.t, expected, actual, epsilon, msg, args...) } // IsDecreasing asserts that the collection is decreasing // // a.IsDecreasing([]int{2, 1, 0}) // a.IsDecreasing([]float{2, 1}) // a.IsDecreasing([]string{"b", "a"}) func (a *Assertions) IsDecreasing(object interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return IsDecreasing(a.t, object, msgAndArgs...) } // IsDecreasingf asserts that the collection is decreasing // // a.IsDecreasingf([]int{2, 1, 0}, "error message %s", "formatted") // a.IsDecreasingf([]float{2, 1}, "error message %s", "formatted") // a.IsDecreasingf([]string{"b", "a"}, "error message %s", "formatted") func (a *Assertions) IsDecreasingf(object interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return IsDecreasingf(a.t, object, msg, args...) } // IsIncreasing asserts that the collection is increasing // // a.IsIncreasing([]int{1, 2, 3}) // a.IsIncreasing([]float{1, 2}) // a.IsIncreasing([]string{"a", "b"}) func (a *Assertions) IsIncreasing(object interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return IsIncreasing(a.t, object, msgAndArgs...) } // IsIncreasingf asserts that the collection is increasing // // a.IsIncreasingf([]int{1, 2, 3}, "error message %s", "formatted") // a.IsIncreasingf([]float{1, 2}, "error message %s", "formatted") // a.IsIncreasingf([]string{"a", "b"}, "error message %s", "formatted") func (a *Assertions) IsIncreasingf(object interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return IsIncreasingf(a.t, object, msg, args...) } // IsNonDecreasing asserts that the collection is not decreasing // // a.IsNonDecreasing([]int{1, 1, 2}) // a.IsNonDecreasing([]float{1, 2}) // a.IsNonDecreasing([]string{"a", "b"}) func (a *Assertions) IsNonDecreasing(object interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return IsNonDecreasing(a.t, object, msgAndArgs...) } // IsNonDecreasingf asserts that the collection is not decreasing // // a.IsNonDecreasingf([]int{1, 1, 2}, "error message %s", "formatted") // a.IsNonDecreasingf([]float{1, 2}, "error message %s", "formatted") // a.IsNonDecreasingf([]string{"a", "b"}, "error message %s", "formatted") func (a *Assertions) IsNonDecreasingf(object interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return IsNonDecreasingf(a.t, object, msg, args...) } // IsNonIncreasing asserts that the collection is not increasing // // a.IsNonIncreasing([]int{2, 1, 1}) // a.IsNonIncreasing([]float{2, 1}) // a.IsNonIncreasing([]string{"b", "a"}) func (a *Assertions) IsNonIncreasing(object interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return IsNonIncreasing(a.t, object, msgAndArgs...) } // IsNonIncreasingf asserts that the collection is not increasing // // a.IsNonIncreasingf([]int{2, 1, 1}, "error message %s", "formatted") // a.IsNonIncreasingf([]float{2, 1}, "error message %s", "formatted") // a.IsNonIncreasingf([]string{"b", "a"}, "error message %s", "formatted") func (a *Assertions) IsNonIncreasingf(object interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return IsNonIncreasingf(a.t, object, msg, args...) } // IsType asserts that the specified objects are of the same type. func (a *Assertions) IsType(expectedType interface{}, object interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return IsType(a.t, expectedType, object, msgAndArgs...) } // IsTypef asserts that the specified objects are of the same type. func (a *Assertions) IsTypef(expectedType interface{}, object interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return IsTypef(a.t, expectedType, object, msg, args...) } // JSONEq asserts that two JSON strings are equivalent. // // a.JSONEq(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) func (a *Assertions) JSONEq(expected string, actual string, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return JSONEq(a.t, expected, actual, msgAndArgs...) } // JSONEqf asserts that two JSON strings are equivalent. // // a.JSONEqf(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted") func (a *Assertions) JSONEqf(expected string, actual string, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return JSONEqf(a.t, expected, actual, msg, args...) } // Len asserts that the specified object has specific length. // Len also fails if the object has a type that len() not accept. // // a.Len(mySlice, 3) func (a *Assertions) Len(object interface{}, length int, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Len(a.t, object, length, msgAndArgs...) } // Lenf asserts that the specified object has specific length. // Lenf also fails if the object has a type that len() not accept. // // a.Lenf(mySlice, 3, "error message %s", "formatted") func (a *Assertions) Lenf(object interface{}, length int, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Lenf(a.t, object, length, msg, args...) } // Less asserts that the first element is less than the second // // a.Less(1, 2) // a.Less(float64(1), float64(2)) // a.Less("a", "b") func (a *Assertions) Less(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Less(a.t, e1, e2, msgAndArgs...) } // LessOrEqual asserts that the first element is less than or equal to the second // // a.LessOrEqual(1, 2) // a.LessOrEqual(2, 2) // a.LessOrEqual("a", "b") // a.LessOrEqual("b", "b") func (a *Assertions) LessOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return LessOrEqual(a.t, e1, e2, msgAndArgs...) } // LessOrEqualf asserts that the first element is less than or equal to the second // // a.LessOrEqualf(1, 2, "error message %s", "formatted") // a.LessOrEqualf(2, 2, "error message %s", "formatted") // a.LessOrEqualf("a", "b", "error message %s", "formatted") // a.LessOrEqualf("b", "b", "error message %s", "formatted") func (a *Assertions) LessOrEqualf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return LessOrEqualf(a.t, e1, e2, msg, args...) } // Lessf asserts that the first element is less than the second // // a.Lessf(1, 2, "error message %s", "formatted") // a.Lessf(float64(1), float64(2), "error message %s", "formatted") // a.Lessf("a", "b", "error message %s", "formatted") func (a *Assertions) Lessf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Lessf(a.t, e1, e2, msg, args...) } // Negative asserts that the specified element is negative // // a.Negative(-1) // a.Negative(-1.23) func (a *Assertions) Negative(e interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Negative(a.t, e, msgAndArgs...) } // Negativef asserts that the specified element is negative // // a.Negativef(-1, "error message %s", "formatted") // a.Negativef(-1.23, "error message %s", "formatted") func (a *Assertions) Negativef(e interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Negativef(a.t, e, msg, args...) } // Never asserts that the given condition doesn't satisfy in waitFor time, // periodically checking the target function each tick. // // a.Never(func() bool { return false; }, time.Second, 10*time.Millisecond) func (a *Assertions) Never(condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Never(a.t, condition, waitFor, tick, msgAndArgs...) } // Neverf asserts that the given condition doesn't satisfy in waitFor time, // periodically checking the target function each tick. // // a.Neverf(func() bool { return false; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") func (a *Assertions) Neverf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Neverf(a.t, condition, waitFor, tick, msg, args...) } // Nil asserts that the specified object is nil. // // a.Nil(err) func (a *Assertions) Nil(object interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Nil(a.t, object, msgAndArgs...) } // Nilf asserts that the specified object is nil. // // a.Nilf(err, "error message %s", "formatted") func (a *Assertions) Nilf(object interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Nilf(a.t, object, msg, args...) } // NoDirExists checks whether a directory does not exist in the given path. // It fails if the path points to an existing _directory_ only. func (a *Assertions) NoDirExists(path string, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NoDirExists(a.t, path, msgAndArgs...) } // NoDirExistsf checks whether a directory does not exist in the given path. // It fails if the path points to an existing _directory_ only. func (a *Assertions) NoDirExistsf(path string, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NoDirExistsf(a.t, path, msg, args...) } // NoError asserts that a function returned no error (i.e. `nil`). // // actualObj, err := SomeFunction() // if a.NoError(err) { // assert.Equal(t, expectedObj, actualObj) // } func (a *Assertions) NoError(err error, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NoError(a.t, err, msgAndArgs...) } // NoErrorf asserts that a function returned no error (i.e. `nil`). // // actualObj, err := SomeFunction() // if a.NoErrorf(err, "error message %s", "formatted") { // assert.Equal(t, expectedObj, actualObj) // } func (a *Assertions) NoErrorf(err error, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NoErrorf(a.t, err, msg, args...) } // NoFileExists checks whether a file does not exist in a given path. It fails // if the path points to an existing _file_ only. func (a *Assertions) NoFileExists(path string, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NoFileExists(a.t, path, msgAndArgs...) } // NoFileExistsf checks whether a file does not exist in a given path. It fails // if the path points to an existing _file_ only. func (a *Assertions) NoFileExistsf(path string, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NoFileExistsf(a.t, path, msg, args...) } // NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the // specified substring or element. // // a.NotContains("Hello World", "Earth") // a.NotContains(["Hello", "World"], "Earth") // a.NotContains({"Hello": "World"}, "Earth") func (a *Assertions) NotContains(s interface{}, contains interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NotContains(a.t, s, contains, msgAndArgs...) } // NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the // specified substring or element. // // a.NotContainsf("Hello World", "Earth", "error message %s", "formatted") // a.NotContainsf(["Hello", "World"], "Earth", "error message %s", "formatted") // a.NotContainsf({"Hello": "World"}, "Earth", "error message %s", "formatted") func (a *Assertions) NotContainsf(s interface{}, contains interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NotContainsf(a.t, s, contains, msg, args...) } // NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either // a slice or a channel with len == 0. // // if a.NotEmpty(obj) { // assert.Equal(t, "two", obj[1]) // } func (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NotEmpty(a.t, object, msgAndArgs...) } // NotEmptyf asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either // a slice or a channel with len == 0. // // if a.NotEmptyf(obj, "error message %s", "formatted") { // assert.Equal(t, "two", obj[1]) // } func (a *Assertions) NotEmptyf(object interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NotEmptyf(a.t, object, msg, args...) } // NotEqual asserts that the specified values are NOT equal. // // a.NotEqual(obj1, obj2) // // Pointer variable equality is determined based on the equality of the // referenced values (as opposed to the memory addresses). func (a *Assertions) NotEqual(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NotEqual(a.t, expected, actual, msgAndArgs...) } // NotEqualValues asserts that two objects are not equal even when converted to the same type // // a.NotEqualValues(obj1, obj2) func (a *Assertions) NotEqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NotEqualValues(a.t, expected, actual, msgAndArgs...) } // NotEqualValuesf asserts that two objects are not equal even when converted to the same type // // a.NotEqualValuesf(obj1, obj2, "error message %s", "formatted") func (a *Assertions) NotEqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NotEqualValuesf(a.t, expected, actual, msg, args...) } // NotEqualf asserts that the specified values are NOT equal. // // a.NotEqualf(obj1, obj2, "error message %s", "formatted") // // Pointer variable equality is determined based on the equality of the // referenced values (as opposed to the memory addresses). func (a *Assertions) NotEqualf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NotEqualf(a.t, expected, actual, msg, args...) } // NotErrorIs asserts that at none of the errors in err's chain matches target. // This is a wrapper for errors.Is. func (a *Assertions) NotErrorIs(err error, target error, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NotErrorIs(a.t, err, target, msgAndArgs...) } // NotErrorIsf asserts that at none of the errors in err's chain matches target. // This is a wrapper for errors.Is. func (a *Assertions) NotErrorIsf(err error, target error, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NotErrorIsf(a.t, err, target, msg, args...) } // NotImplements asserts that an object does not implement the specified interface. // // a.NotImplements((*MyInterface)(nil), new(MyObject)) func (a *Assertions) NotImplements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NotImplements(a.t, interfaceObject, object, msgAndArgs...) } // NotImplementsf asserts that an object does not implement the specified interface. // // a.NotImplementsf((*MyInterface)(nil), new(MyObject), "error message %s", "formatted") func (a *Assertions) NotImplementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NotImplementsf(a.t, interfaceObject, object, msg, args...) } // NotNil asserts that the specified object is not nil. // // a.NotNil(err) func (a *Assertions) NotNil(object interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NotNil(a.t, object, msgAndArgs...) } // NotNilf asserts that the specified object is not nil. // // a.NotNilf(err, "error message %s", "formatted") func (a *Assertions) NotNilf(object interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NotNilf(a.t, object, msg, args...) } // NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic. // // a.NotPanics(func(){ RemainCalm() }) func (a *Assertions) NotPanics(f PanicTestFunc, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NotPanics(a.t, f, msgAndArgs...) } // NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic. // // a.NotPanicsf(func(){ RemainCalm() }, "error message %s", "formatted") func (a *Assertions) NotPanicsf(f PanicTestFunc, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NotPanicsf(a.t, f, msg, args...) } // NotRegexp asserts that a specified regexp does not match a string. // // a.NotRegexp(regexp.MustCompile("starts"), "it's starting") // a.NotRegexp("^start", "it's not starting") func (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NotRegexp(a.t, rx, str, msgAndArgs...) } // NotRegexpf asserts that a specified regexp does not match a string. // // a.NotRegexpf(regexp.MustCompile("starts"), "it's starting", "error message %s", "formatted") // a.NotRegexpf("^start", "it's not starting", "error message %s", "formatted") func (a *Assertions) NotRegexpf(rx interface{}, str interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NotRegexpf(a.t, rx, str, msg, args...) } // NotSame asserts that two pointers do not reference the same object. // // a.NotSame(ptr1, ptr2) // // Both arguments must be pointer variables. Pointer variable sameness is // determined based on the equality of both type and value. func (a *Assertions) NotSame(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NotSame(a.t, expected, actual, msgAndArgs...) } // NotSamef asserts that two pointers do not reference the same object. // // a.NotSamef(ptr1, ptr2, "error message %s", "formatted") // // Both arguments must be pointer variables. Pointer variable sameness is // determined based on the equality of both type and value. func (a *Assertions) NotSamef(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NotSamef(a.t, expected, actual, msg, args...) } // NotSubset asserts that the specified list(array, slice...) or map does NOT // contain all elements given in the specified subset list(array, slice...) or // map. // // a.NotSubset([1, 3, 4], [1, 2]) // a.NotSubset({"x": 1, "y": 2}, {"z": 3}) func (a *Assertions) NotSubset(list interface{}, subset interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NotSubset(a.t, list, subset, msgAndArgs...) } // NotSubsetf asserts that the specified list(array, slice...) or map does NOT // contain all elements given in the specified subset list(array, slice...) or // map. // // a.NotSubsetf([1, 3, 4], [1, 2], "error message %s", "formatted") // a.NotSubsetf({"x": 1, "y": 2}, {"z": 3}, "error message %s", "formatted") func (a *Assertions) NotSubsetf(list interface{}, subset interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NotSubsetf(a.t, list, subset, msg, args...) } // NotZero asserts that i is not the zero value for its type. func (a *Assertions) NotZero(i interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NotZero(a.t, i, msgAndArgs...) } // NotZerof asserts that i is not the zero value for its type. func (a *Assertions) NotZerof(i interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return NotZerof(a.t, i, msg, args...) } // Panics asserts that the code inside the specified PanicTestFunc panics. // // a.Panics(func(){ GoCrazy() }) func (a *Assertions) Panics(f PanicTestFunc, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Panics(a.t, f, msgAndArgs...) } // PanicsWithError asserts that the code inside the specified PanicTestFunc // panics, and that the recovered panic value is an error that satisfies the // EqualError comparison. // // a.PanicsWithError("crazy error", func(){ GoCrazy() }) func (a *Assertions) PanicsWithError(errString string, f PanicTestFunc, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return PanicsWithError(a.t, errString, f, msgAndArgs...) } // PanicsWithErrorf asserts that the code inside the specified PanicTestFunc // panics, and that the recovered panic value is an error that satisfies the // EqualError comparison. // // a.PanicsWithErrorf("crazy error", func(){ GoCrazy() }, "error message %s", "formatted") func (a *Assertions) PanicsWithErrorf(errString string, f PanicTestFunc, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return PanicsWithErrorf(a.t, errString, f, msg, args...) } // PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that // the recovered panic value equals the expected panic value. // // a.PanicsWithValue("crazy error", func(){ GoCrazy() }) func (a *Assertions) PanicsWithValue(expected interface{}, f PanicTestFunc, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return PanicsWithValue(a.t, expected, f, msgAndArgs...) } // PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that // the recovered panic value equals the expected panic value. // // a.PanicsWithValuef("crazy error", func(){ GoCrazy() }, "error message %s", "formatted") func (a *Assertions) PanicsWithValuef(expected interface{}, f PanicTestFunc, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return PanicsWithValuef(a.t, expected, f, msg, args...) } // Panicsf asserts that the code inside the specified PanicTestFunc panics. // // a.Panicsf(func(){ GoCrazy() }, "error message %s", "formatted") func (a *Assertions) Panicsf(f PanicTestFunc, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Panicsf(a.t, f, msg, args...) } // Positive asserts that the specified element is positive // // a.Positive(1) // a.Positive(1.23) func (a *Assertions) Positive(e interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Positive(a.t, e, msgAndArgs...) } // Positivef asserts that the specified element is positive // // a.Positivef(1, "error message %s", "formatted") // a.Positivef(1.23, "error message %s", "formatted") func (a *Assertions) Positivef(e interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Positivef(a.t, e, msg, args...) } // Regexp asserts that a specified regexp matches a string. // // a.Regexp(regexp.MustCompile("start"), "it's starting") // a.Regexp("start...$", "it's not starting") func (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Regexp(a.t, rx, str, msgAndArgs...) } // Regexpf asserts that a specified regexp matches a string. // // a.Regexpf(regexp.MustCompile("start"), "it's starting", "error message %s", "formatted") // a.Regexpf("start...$", "it's not starting", "error message %s", "formatted") func (a *Assertions) Regexpf(rx interface{}, str interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Regexpf(a.t, rx, str, msg, args...) } // Same asserts that two pointers reference the same object. // // a.Same(ptr1, ptr2) // // Both arguments must be pointer variables. Pointer variable sameness is // determined based on the equality of both type and value. func (a *Assertions) Same(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Same(a.t, expected, actual, msgAndArgs...) } // Samef asserts that two pointers reference the same object. // // a.Samef(ptr1, ptr2, "error message %s", "formatted") // // Both arguments must be pointer variables. Pointer variable sameness is // determined based on the equality of both type and value. func (a *Assertions) Samef(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Samef(a.t, expected, actual, msg, args...) } // Subset asserts that the specified list(array, slice...) or map contains all // elements given in the specified subset list(array, slice...) or map. // // a.Subset([1, 2, 3], [1, 2]) // a.Subset({"x": 1, "y": 2}, {"x": 1}) func (a *Assertions) Subset(list interface{}, subset interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Subset(a.t, list, subset, msgAndArgs...) } // Subsetf asserts that the specified list(array, slice...) or map contains all // elements given in the specified subset list(array, slice...) or map. // // a.Subsetf([1, 2, 3], [1, 2], "error message %s", "formatted") // a.Subsetf({"x": 1, "y": 2}, {"x": 1}, "error message %s", "formatted") func (a *Assertions) Subsetf(list interface{}, subset interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Subsetf(a.t, list, subset, msg, args...) } // True asserts that the specified value is true. // // a.True(myBool) func (a *Assertions) True(value bool, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return True(a.t, value, msgAndArgs...) } // Truef asserts that the specified value is true. // // a.Truef(myBool, "error message %s", "formatted") func (a *Assertions) Truef(value bool, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Truef(a.t, value, msg, args...) } // WithinDuration asserts that the two times are within duration delta of each other. // // a.WithinDuration(time.Now(), time.Now(), 10*time.Second) func (a *Assertions) WithinDuration(expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return WithinDuration(a.t, expected, actual, delta, msgAndArgs...) } // WithinDurationf asserts that the two times are within duration delta of each other. // // a.WithinDurationf(time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted") func (a *Assertions) WithinDurationf(expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return WithinDurationf(a.t, expected, actual, delta, msg, args...) } // WithinRange asserts that a time is within a time range (inclusive). // // a.WithinRange(time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second)) func (a *Assertions) WithinRange(actual time.Time, start time.Time, end time.Time, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return WithinRange(a.t, actual, start, end, msgAndArgs...) } // WithinRangef asserts that a time is within a time range (inclusive). // // a.WithinRangef(time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), "error message %s", "formatted") func (a *Assertions) WithinRangef(actual time.Time, start time.Time, end time.Time, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return WithinRangef(a.t, actual, start, end, msg, args...) } // YAMLEq asserts that two YAML strings are equivalent. func (a *Assertions) YAMLEq(expected string, actual string, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return YAMLEq(a.t, expected, actual, msgAndArgs...) } // YAMLEqf asserts that two YAML strings are equivalent. func (a *Assertions) YAMLEqf(expected string, actual string, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return YAMLEqf(a.t, expected, actual, msg, args...) } // Zero asserts that i is the zero value for its type. func (a *Assertions) Zero(i interface{}, msgAndArgs ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Zero(a.t, i, msgAndArgs...) } // Zerof asserts that i is the zero value for its type. func (a *Assertions) Zerof(i interface{}, msg string, args ...interface{}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return Zerof(a.t, i, msg, args...) } ================================================ FILE: vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl ================================================ {{.CommentWithoutT "a"}} func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) bool { if h, ok := a.t.(tHelper); ok { h.Helper() } return {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) } ================================================ FILE: vendor/github.com/stretchr/testify/assert/assertion_order.go ================================================ package assert import ( "fmt" "reflect" ) // isOrdered checks that collection contains orderable elements. func isOrdered(t TestingT, object interface{}, allowedComparesResults []CompareType, failMessage string, msgAndArgs ...interface{}) bool { objKind := reflect.TypeOf(object).Kind() if objKind != reflect.Slice && objKind != reflect.Array { return false } objValue := reflect.ValueOf(object) objLen := objValue.Len() if objLen <= 1 { return true } value := objValue.Index(0) valueInterface := value.Interface() firstValueKind := value.Kind() for i := 1; i < objLen; i++ { prevValue := value prevValueInterface := valueInterface value = objValue.Index(i) valueInterface = value.Interface() compareResult, isComparable := compare(prevValueInterface, valueInterface, firstValueKind) if !isComparable { return Fail(t, fmt.Sprintf("Can not compare type \"%s\" and \"%s\"", reflect.TypeOf(value), reflect.TypeOf(prevValue)), msgAndArgs...) } if !containsValue(allowedComparesResults, compareResult) { return Fail(t, fmt.Sprintf(failMessage, prevValue, value), msgAndArgs...) } } return true } // IsIncreasing asserts that the collection is increasing // // assert.IsIncreasing(t, []int{1, 2, 3}) // assert.IsIncreasing(t, []float{1, 2}) // assert.IsIncreasing(t, []string{"a", "b"}) func IsIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { return isOrdered(t, object, []CompareType{compareLess}, "\"%v\" is not less than \"%v\"", msgAndArgs...) } // IsNonIncreasing asserts that the collection is not increasing // // assert.IsNonIncreasing(t, []int{2, 1, 1}) // assert.IsNonIncreasing(t, []float{2, 1}) // assert.IsNonIncreasing(t, []string{"b", "a"}) func IsNonIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { return isOrdered(t, object, []CompareType{compareEqual, compareGreater}, "\"%v\" is not greater than or equal to \"%v\"", msgAndArgs...) } // IsDecreasing asserts that the collection is decreasing // // assert.IsDecreasing(t, []int{2, 1, 0}) // assert.IsDecreasing(t, []float{2, 1}) // assert.IsDecreasing(t, []string{"b", "a"}) func IsDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { return isOrdered(t, object, []CompareType{compareGreater}, "\"%v\" is not greater than \"%v\"", msgAndArgs...) } // IsNonDecreasing asserts that the collection is not decreasing // // assert.IsNonDecreasing(t, []int{1, 1, 2}) // assert.IsNonDecreasing(t, []float{1, 2}) // assert.IsNonDecreasing(t, []string{"a", "b"}) func IsNonDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { return isOrdered(t, object, []CompareType{compareLess, compareEqual}, "\"%v\" is not less than or equal to \"%v\"", msgAndArgs...) } ================================================ FILE: vendor/github.com/stretchr/testify/assert/assertions.go ================================================ package assert import ( "bufio" "bytes" "encoding/json" "errors" "fmt" "math" "os" "reflect" "regexp" "runtime" "runtime/debug" "strings" "time" "unicode" "unicode/utf8" "github.com/davecgh/go-spew/spew" "github.com/pmezard/go-difflib/difflib" "gopkg.in/yaml.v3" ) //go:generate sh -c "cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=assert -template=assertion_format.go.tmpl" // TestingT is an interface wrapper around *testing.T type TestingT interface { Errorf(format string, args ...interface{}) } // ComparisonAssertionFunc is a common function prototype when comparing two values. Can be useful // for table driven tests. type ComparisonAssertionFunc func(TestingT, interface{}, interface{}, ...interface{}) bool // ValueAssertionFunc is a common function prototype when validating a single value. Can be useful // for table driven tests. type ValueAssertionFunc func(TestingT, interface{}, ...interface{}) bool // BoolAssertionFunc is a common function prototype when validating a bool value. Can be useful // for table driven tests. type BoolAssertionFunc func(TestingT, bool, ...interface{}) bool // ErrorAssertionFunc is a common function prototype when validating an error value. Can be useful // for table driven tests. type ErrorAssertionFunc func(TestingT, error, ...interface{}) bool // Comparison is a custom function that returns true on success and false on failure type Comparison func() (success bool) /* Helper functions */ // ObjectsAreEqual determines if two objects are considered equal. // // This function does no assertion of any kind. func ObjectsAreEqual(expected, actual interface{}) bool { if expected == nil || actual == nil { return expected == actual } exp, ok := expected.([]byte) if !ok { return reflect.DeepEqual(expected, actual) } act, ok := actual.([]byte) if !ok { return false } if exp == nil || act == nil { return exp == nil && act == nil } return bytes.Equal(exp, act) } // copyExportedFields iterates downward through nested data structures and creates a copy // that only contains the exported struct fields. func copyExportedFields(expected interface{}) interface{} { if isNil(expected) { return expected } expectedType := reflect.TypeOf(expected) expectedKind := expectedType.Kind() expectedValue := reflect.ValueOf(expected) switch expectedKind { case reflect.Struct: result := reflect.New(expectedType).Elem() for i := 0; i < expectedType.NumField(); i++ { field := expectedType.Field(i) isExported := field.IsExported() if isExported { fieldValue := expectedValue.Field(i) if isNil(fieldValue) || isNil(fieldValue.Interface()) { continue } newValue := copyExportedFields(fieldValue.Interface()) result.Field(i).Set(reflect.ValueOf(newValue)) } } return result.Interface() case reflect.Ptr: result := reflect.New(expectedType.Elem()) unexportedRemoved := copyExportedFields(expectedValue.Elem().Interface()) result.Elem().Set(reflect.ValueOf(unexportedRemoved)) return result.Interface() case reflect.Array, reflect.Slice: var result reflect.Value if expectedKind == reflect.Array { result = reflect.New(reflect.ArrayOf(expectedValue.Len(), expectedType.Elem())).Elem() } else { result = reflect.MakeSlice(expectedType, expectedValue.Len(), expectedValue.Len()) } for i := 0; i < expectedValue.Len(); i++ { index := expectedValue.Index(i) if isNil(index) { continue } unexportedRemoved := copyExportedFields(index.Interface()) result.Index(i).Set(reflect.ValueOf(unexportedRemoved)) } return result.Interface() case reflect.Map: result := reflect.MakeMap(expectedType) for _, k := range expectedValue.MapKeys() { index := expectedValue.MapIndex(k) unexportedRemoved := copyExportedFields(index.Interface()) result.SetMapIndex(k, reflect.ValueOf(unexportedRemoved)) } return result.Interface() default: return expected } } // ObjectsExportedFieldsAreEqual determines if the exported (public) fields of two objects are // considered equal. This comparison of only exported fields is applied recursively to nested data // structures. // // This function does no assertion of any kind. // // Deprecated: Use [EqualExportedValues] instead. func ObjectsExportedFieldsAreEqual(expected, actual interface{}) bool { expectedCleaned := copyExportedFields(expected) actualCleaned := copyExportedFields(actual) return ObjectsAreEqualValues(expectedCleaned, actualCleaned) } // ObjectsAreEqualValues gets whether two objects are equal, or if their // values are equal. func ObjectsAreEqualValues(expected, actual interface{}) bool { if ObjectsAreEqual(expected, actual) { return true } expectedValue := reflect.ValueOf(expected) actualValue := reflect.ValueOf(actual) if !expectedValue.IsValid() || !actualValue.IsValid() { return false } expectedType := expectedValue.Type() actualType := actualValue.Type() if !expectedType.ConvertibleTo(actualType) { return false } if !isNumericType(expectedType) || !isNumericType(actualType) { // Attempt comparison after type conversion return reflect.DeepEqual( expectedValue.Convert(actualType).Interface(), actual, ) } // If BOTH values are numeric, there are chances of false positives due // to overflow or underflow. So, we need to make sure to always convert // the smaller type to a larger type before comparing. if expectedType.Size() >= actualType.Size() { return actualValue.Convert(expectedType).Interface() == expected } return expectedValue.Convert(actualType).Interface() == actual } // isNumericType returns true if the type is one of: // int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64, // float32, float64, complex64, complex128 func isNumericType(t reflect.Type) bool { return t.Kind() >= reflect.Int && t.Kind() <= reflect.Complex128 } /* CallerInfo is necessary because the assert functions use the testing object internally, causing it to print the file:line of the assert method, rather than where the problem actually occurred in calling code.*/ // CallerInfo returns an array of strings containing the file and line number // of each stack frame leading from the current test to the assert call that // failed. func CallerInfo() []string { var pc uintptr var ok bool var file string var line int var name string callers := []string{} for i := 0; ; i++ { pc, file, line, ok = runtime.Caller(i) if !ok { // The breaks below failed to terminate the loop, and we ran off the // end of the call stack. break } // This is a huge edge case, but it will panic if this is the case, see #180 if file == "" { break } f := runtime.FuncForPC(pc) if f == nil { break } name = f.Name() // testing.tRunner is the standard library function that calls // tests. Subtests are called directly by tRunner, without going through // the Test/Benchmark/Example function that contains the t.Run calls, so // with subtests we should break when we hit tRunner, without adding it // to the list of callers. if name == "testing.tRunner" { break } parts := strings.Split(file, "/") if len(parts) > 1 { filename := parts[len(parts)-1] dir := parts[len(parts)-2] if (dir != "assert" && dir != "mock" && dir != "require") || filename == "mock_test.go" { callers = append(callers, fmt.Sprintf("%s:%d", file, line)) } } // Drop the package segments := strings.Split(name, ".") name = segments[len(segments)-1] if isTest(name, "Test") || isTest(name, "Benchmark") || isTest(name, "Example") { break } } return callers } // Stolen from the `go test` tool. // isTest tells whether name looks like a test (or benchmark, according to prefix). // It is a Test (say) if there is a character after Test that is not a lower-case letter. // We don't want TesticularCancer. func isTest(name, prefix string) bool { if !strings.HasPrefix(name, prefix) { return false } if len(name) == len(prefix) { // "Test" is ok return true } r, _ := utf8.DecodeRuneInString(name[len(prefix):]) return !unicode.IsLower(r) } func messageFromMsgAndArgs(msgAndArgs ...interface{}) string { if len(msgAndArgs) == 0 || msgAndArgs == nil { return "" } if len(msgAndArgs) == 1 { msg := msgAndArgs[0] if msgAsStr, ok := msg.(string); ok { return msgAsStr } return fmt.Sprintf("%+v", msg) } if len(msgAndArgs) > 1 { return fmt.Sprintf(msgAndArgs[0].(string), msgAndArgs[1:]...) } return "" } // Aligns the provided message so that all lines after the first line start at the same location as the first line. // Assumes that the first line starts at the correct location (after carriage return, tab, label, spacer and tab). // The longestLabelLen parameter specifies the length of the longest label in the output (required because this is the // basis on which the alignment occurs). func indentMessageLines(message string, longestLabelLen int) string { outBuf := new(bytes.Buffer) for i, scanner := 0, bufio.NewScanner(strings.NewReader(message)); scanner.Scan(); i++ { // no need to align first line because it starts at the correct location (after the label) if i != 0 { // append alignLen+1 spaces to align with "{{longestLabel}}:" before adding tab outBuf.WriteString("\n\t" + strings.Repeat(" ", longestLabelLen+1) + "\t") } outBuf.WriteString(scanner.Text()) } return outBuf.String() } type failNower interface { FailNow() } // FailNow fails test func FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } Fail(t, failureMessage, msgAndArgs...) // We cannot extend TestingT with FailNow() and // maintain backwards compatibility, so we fallback // to panicking when FailNow is not available in // TestingT. // See issue #263 if t, ok := t.(failNower); ok { t.FailNow() } else { panic("test failed and t is missing `FailNow()`") } return false } // Fail reports a failure through func Fail(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } content := []labeledContent{ {"Error Trace", strings.Join(CallerInfo(), "\n\t\t\t")}, {"Error", failureMessage}, } // Add test name if the Go version supports it if n, ok := t.(interface { Name() string }); ok { content = append(content, labeledContent{"Test", n.Name()}) } message := messageFromMsgAndArgs(msgAndArgs...) if len(message) > 0 { content = append(content, labeledContent{"Messages", message}) } t.Errorf("\n%s", ""+labeledOutput(content...)) return false } type labeledContent struct { label string content string } // labeledOutput returns a string consisting of the provided labeledContent. Each labeled output is appended in the following manner: // // \t{{label}}:{{align_spaces}}\t{{content}}\n // // The initial carriage return is required to undo/erase any padding added by testing.T.Errorf. The "\t{{label}}:" is for the label. // If a label is shorter than the longest label provided, padding spaces are added to make all the labels match in length. Once this // alignment is achieved, "\t{{content}}\n" is added for the output. // // If the content of the labeledOutput contains line breaks, the subsequent lines are aligned so that they start at the same location as the first line. func labeledOutput(content ...labeledContent) string { longestLabel := 0 for _, v := range content { if len(v.label) > longestLabel { longestLabel = len(v.label) } } var output string for _, v := range content { output += "\t" + v.label + ":" + strings.Repeat(" ", longestLabel-len(v.label)) + "\t" + indentMessageLines(v.content, longestLabel) + "\n" } return output } // Implements asserts that an object is implemented by the specified interface. // // assert.Implements(t, (*MyInterface)(nil), new(MyObject)) func Implements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } interfaceType := reflect.TypeOf(interfaceObject).Elem() if object == nil { return Fail(t, fmt.Sprintf("Cannot check if nil implements %v", interfaceType), msgAndArgs...) } if !reflect.TypeOf(object).Implements(interfaceType) { return Fail(t, fmt.Sprintf("%T must implement %v", object, interfaceType), msgAndArgs...) } return true } // NotImplements asserts that an object does not implement the specified interface. // // assert.NotImplements(t, (*MyInterface)(nil), new(MyObject)) func NotImplements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } interfaceType := reflect.TypeOf(interfaceObject).Elem() if object == nil { return Fail(t, fmt.Sprintf("Cannot check if nil does not implement %v", interfaceType), msgAndArgs...) } if reflect.TypeOf(object).Implements(interfaceType) { return Fail(t, fmt.Sprintf("%T implements %v", object, interfaceType), msgAndArgs...) } return true } // IsType asserts that the specified objects are of the same type. func IsType(t TestingT, expectedType interface{}, object interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } if !ObjectsAreEqual(reflect.TypeOf(object), reflect.TypeOf(expectedType)) { return Fail(t, fmt.Sprintf("Object expected to be of type %v, but was %v", reflect.TypeOf(expectedType), reflect.TypeOf(object)), msgAndArgs...) } return true } // Equal asserts that two objects are equal. // // assert.Equal(t, 123, 123) // // Pointer variable equality is determined based on the equality of the // referenced values (as opposed to the memory addresses). Function equality // cannot be determined and will always fail. func Equal(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } if err := validateEqualArgs(expected, actual); err != nil { return Fail(t, fmt.Sprintf("Invalid operation: %#v == %#v (%s)", expected, actual, err), msgAndArgs...) } if !ObjectsAreEqual(expected, actual) { diff := diff(expected, actual) expected, actual = formatUnequalValues(expected, actual) return Fail(t, fmt.Sprintf("Not equal: \n"+ "expected: %s\n"+ "actual : %s%s", expected, actual, diff), msgAndArgs...) } return true } // validateEqualArgs checks whether provided arguments can be safely used in the // Equal/NotEqual functions. func validateEqualArgs(expected, actual interface{}) error { if expected == nil && actual == nil { return nil } if isFunction(expected) || isFunction(actual) { return errors.New("cannot take func type as argument") } return nil } // Same asserts that two pointers reference the same object. // // assert.Same(t, ptr1, ptr2) // // Both arguments must be pointer variables. Pointer variable sameness is // determined based on the equality of both type and value. func Same(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } if !samePointers(expected, actual) { return Fail(t, fmt.Sprintf("Not same: \n"+ "expected: %p %#v\n"+ "actual : %p %#v", expected, expected, actual, actual), msgAndArgs...) } return true } // NotSame asserts that two pointers do not reference the same object. // // assert.NotSame(t, ptr1, ptr2) // // Both arguments must be pointer variables. Pointer variable sameness is // determined based on the equality of both type and value. func NotSame(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } if samePointers(expected, actual) { return Fail(t, fmt.Sprintf( "Expected and actual point to the same object: %p %#v", expected, expected), msgAndArgs...) } return true } // samePointers compares two generic interface objects and returns whether // they point to the same object func samePointers(first, second interface{}) bool { firstPtr, secondPtr := reflect.ValueOf(first), reflect.ValueOf(second) if firstPtr.Kind() != reflect.Ptr || secondPtr.Kind() != reflect.Ptr { return false } firstType, secondType := reflect.TypeOf(first), reflect.TypeOf(second) if firstType != secondType { return false } // compare pointer addresses return first == second } // formatUnequalValues takes two values of arbitrary types and returns string // representations appropriate to be presented to the user. // // If the values are not of like type, the returned strings will be prefixed // with the type name, and the value will be enclosed in parentheses similar // to a type conversion in the Go grammar. func formatUnequalValues(expected, actual interface{}) (e string, a string) { if reflect.TypeOf(expected) != reflect.TypeOf(actual) { return fmt.Sprintf("%T(%s)", expected, truncatingFormat(expected)), fmt.Sprintf("%T(%s)", actual, truncatingFormat(actual)) } switch expected.(type) { case time.Duration: return fmt.Sprintf("%v", expected), fmt.Sprintf("%v", actual) } return truncatingFormat(expected), truncatingFormat(actual) } // truncatingFormat formats the data and truncates it if it's too long. // // This helps keep formatted error messages lines from exceeding the // bufio.MaxScanTokenSize max line length that the go testing framework imposes. func truncatingFormat(data interface{}) string { value := fmt.Sprintf("%#v", data) max := bufio.MaxScanTokenSize - 100 // Give us some space the type info too if needed. if len(value) > max { value = value[0:max] + "<... truncated>" } return value } // EqualValues asserts that two objects are equal or convertible to the same types // and equal. // // assert.EqualValues(t, uint32(123), int32(123)) func EqualValues(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } if !ObjectsAreEqualValues(expected, actual) { diff := diff(expected, actual) expected, actual = formatUnequalValues(expected, actual) return Fail(t, fmt.Sprintf("Not equal: \n"+ "expected: %s\n"+ "actual : %s%s", expected, actual, diff), msgAndArgs...) } return true } // EqualExportedValues asserts that the types of two objects are equal and their public // fields are also equal. This is useful for comparing structs that have private fields // that could potentially differ. // // type S struct { // Exported int // notExported int // } // assert.EqualExportedValues(t, S{1, 2}, S{1, 3}) => true // assert.EqualExportedValues(t, S{1, 2}, S{2, 3}) => false func EqualExportedValues(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } aType := reflect.TypeOf(expected) bType := reflect.TypeOf(actual) if aType != bType { return Fail(t, fmt.Sprintf("Types expected to match exactly\n\t%v != %v", aType, bType), msgAndArgs...) } if aType.Kind() == reflect.Ptr { aType = aType.Elem() } if bType.Kind() == reflect.Ptr { bType = bType.Elem() } if aType.Kind() != reflect.Struct { return Fail(t, fmt.Sprintf("Types expected to both be struct or pointer to struct \n\t%v != %v", aType.Kind(), reflect.Struct), msgAndArgs...) } if bType.Kind() != reflect.Struct { return Fail(t, fmt.Sprintf("Types expected to both be struct or pointer to struct \n\t%v != %v", bType.Kind(), reflect.Struct), msgAndArgs...) } expected = copyExportedFields(expected) actual = copyExportedFields(actual) if !ObjectsAreEqualValues(expected, actual) { diff := diff(expected, actual) expected, actual = formatUnequalValues(expected, actual) return Fail(t, fmt.Sprintf("Not equal (comparing only exported fields): \n"+ "expected: %s\n"+ "actual : %s%s", expected, actual, diff), msgAndArgs...) } return true } // Exactly asserts that two objects are equal in value and type. // // assert.Exactly(t, int32(123), int64(123)) func Exactly(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } aType := reflect.TypeOf(expected) bType := reflect.TypeOf(actual) if aType != bType { return Fail(t, fmt.Sprintf("Types expected to match exactly\n\t%v != %v", aType, bType), msgAndArgs...) } return Equal(t, expected, actual, msgAndArgs...) } // NotNil asserts that the specified object is not nil. // // assert.NotNil(t, err) func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { if !isNil(object) { return true } if h, ok := t.(tHelper); ok { h.Helper() } return Fail(t, "Expected value not to be nil.", msgAndArgs...) } // isNil checks if a specified object is nil or not, without Failing. func isNil(object interface{}) bool { if object == nil { return true } value := reflect.ValueOf(object) switch value.Kind() { case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice, reflect.UnsafePointer: return value.IsNil() } return false } // Nil asserts that the specified object is nil. // // assert.Nil(t, err) func Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { if isNil(object) { return true } if h, ok := t.(tHelper); ok { h.Helper() } return Fail(t, fmt.Sprintf("Expected nil, but got: %#v", object), msgAndArgs...) } // isEmpty gets whether the specified object is considered empty or not. func isEmpty(object interface{}) bool { // get nil case out of the way if object == nil { return true } objValue := reflect.ValueOf(object) switch objValue.Kind() { // collection types are empty when they have no element case reflect.Chan, reflect.Map, reflect.Slice: return objValue.Len() == 0 // pointers are empty if nil or if the value they point to is empty case reflect.Ptr: if objValue.IsNil() { return true } deref := objValue.Elem().Interface() return isEmpty(deref) // for all other types, compare against the zero value // array types are empty when they match their zero-initialized state default: zero := reflect.Zero(objValue.Type()) return reflect.DeepEqual(object, zero.Interface()) } } // Empty asserts that the specified object is empty. I.e. nil, "", false, 0 or either // a slice or a channel with len == 0. // // assert.Empty(t, obj) func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { pass := isEmpty(object) if !pass { if h, ok := t.(tHelper); ok { h.Helper() } Fail(t, fmt.Sprintf("Should be empty, but was %v", object), msgAndArgs...) } return pass } // NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either // a slice or a channel with len == 0. // // if assert.NotEmpty(t, obj) { // assert.Equal(t, "two", obj[1]) // } func NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { pass := !isEmpty(object) if !pass { if h, ok := t.(tHelper); ok { h.Helper() } Fail(t, fmt.Sprintf("Should NOT be empty, but was %v", object), msgAndArgs...) } return pass } // getLen tries to get the length of an object. // It returns (0, false) if impossible. func getLen(x interface{}) (length int, ok bool) { v := reflect.ValueOf(x) defer func() { ok = recover() == nil }() return v.Len(), true } // Len asserts that the specified object has specific length. // Len also fails if the object has a type that len() not accept. // // assert.Len(t, mySlice, 3) func Len(t TestingT, object interface{}, length int, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } l, ok := getLen(object) if !ok { return Fail(t, fmt.Sprintf("\"%v\" could not be applied builtin len()", object), msgAndArgs...) } if l != length { return Fail(t, fmt.Sprintf("\"%v\" should have %d item(s), but has %d", object, length, l), msgAndArgs...) } return true } // True asserts that the specified value is true. // // assert.True(t, myBool) func True(t TestingT, value bool, msgAndArgs ...interface{}) bool { if !value { if h, ok := t.(tHelper); ok { h.Helper() } return Fail(t, "Should be true", msgAndArgs...) } return true } // False asserts that the specified value is false. // // assert.False(t, myBool) func False(t TestingT, value bool, msgAndArgs ...interface{}) bool { if value { if h, ok := t.(tHelper); ok { h.Helper() } return Fail(t, "Should be false", msgAndArgs...) } return true } // NotEqual asserts that the specified values are NOT equal. // // assert.NotEqual(t, obj1, obj2) // // Pointer variable equality is determined based on the equality of the // referenced values (as opposed to the memory addresses). func NotEqual(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } if err := validateEqualArgs(expected, actual); err != nil { return Fail(t, fmt.Sprintf("Invalid operation: %#v != %#v (%s)", expected, actual, err), msgAndArgs...) } if ObjectsAreEqual(expected, actual) { return Fail(t, fmt.Sprintf("Should not be: %#v\n", actual), msgAndArgs...) } return true } // NotEqualValues asserts that two objects are not equal even when converted to the same type // // assert.NotEqualValues(t, obj1, obj2) func NotEqualValues(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } if ObjectsAreEqualValues(expected, actual) { return Fail(t, fmt.Sprintf("Should not be: %#v\n", actual), msgAndArgs...) } return true } // containsElement try loop over the list check if the list includes the element. // return (false, false) if impossible. // return (true, false) if element was not found. // return (true, true) if element was found. func containsElement(list interface{}, element interface{}) (ok, found bool) { listValue := reflect.ValueOf(list) listType := reflect.TypeOf(list) if listType == nil { return false, false } listKind := listType.Kind() defer func() { if e := recover(); e != nil { ok = false found = false } }() if listKind == reflect.String { elementValue := reflect.ValueOf(element) return true, strings.Contains(listValue.String(), elementValue.String()) } if listKind == reflect.Map { mapKeys := listValue.MapKeys() for i := 0; i < len(mapKeys); i++ { if ObjectsAreEqual(mapKeys[i].Interface(), element) { return true, true } } return true, false } for i := 0; i < listValue.Len(); i++ { if ObjectsAreEqual(listValue.Index(i).Interface(), element) { return true, true } } return true, false } // Contains asserts that the specified string, list(array, slice...) or map contains the // specified substring or element. // // assert.Contains(t, "Hello World", "World") // assert.Contains(t, ["Hello", "World"], "World") // assert.Contains(t, {"Hello": "World"}, "Hello") func Contains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } ok, found := containsElement(s, contains) if !ok { return Fail(t, fmt.Sprintf("%#v could not be applied builtin len()", s), msgAndArgs...) } if !found { return Fail(t, fmt.Sprintf("%#v does not contain %#v", s, contains), msgAndArgs...) } return true } // NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the // specified substring or element. // // assert.NotContains(t, "Hello World", "Earth") // assert.NotContains(t, ["Hello", "World"], "Earth") // assert.NotContains(t, {"Hello": "World"}, "Earth") func NotContains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } ok, found := containsElement(s, contains) if !ok { return Fail(t, fmt.Sprintf("%#v could not be applied builtin len()", s), msgAndArgs...) } if found { return Fail(t, fmt.Sprintf("%#v should not contain %#v", s, contains), msgAndArgs...) } return true } // Subset asserts that the specified list(array, slice...) or map contains all // elements given in the specified subset list(array, slice...) or map. // // assert.Subset(t, [1, 2, 3], [1, 2]) // assert.Subset(t, {"x": 1, "y": 2}, {"x": 1}) func Subset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok bool) { if h, ok := t.(tHelper); ok { h.Helper() } if subset == nil { return true // we consider nil to be equal to the nil set } listKind := reflect.TypeOf(list).Kind() if listKind != reflect.Array && listKind != reflect.Slice && listKind != reflect.Map { return Fail(t, fmt.Sprintf("%q has an unsupported type %s", list, listKind), msgAndArgs...) } subsetKind := reflect.TypeOf(subset).Kind() if subsetKind != reflect.Array && subsetKind != reflect.Slice && listKind != reflect.Map { return Fail(t, fmt.Sprintf("%q has an unsupported type %s", subset, subsetKind), msgAndArgs...) } if subsetKind == reflect.Map && listKind == reflect.Map { subsetMap := reflect.ValueOf(subset) actualMap := reflect.ValueOf(list) for _, k := range subsetMap.MapKeys() { ev := subsetMap.MapIndex(k) av := actualMap.MapIndex(k) if !av.IsValid() { return Fail(t, fmt.Sprintf("%#v does not contain %#v", list, subset), msgAndArgs...) } if !ObjectsAreEqual(ev.Interface(), av.Interface()) { return Fail(t, fmt.Sprintf("%#v does not contain %#v", list, subset), msgAndArgs...) } } return true } subsetList := reflect.ValueOf(subset) for i := 0; i < subsetList.Len(); i++ { element := subsetList.Index(i).Interface() ok, found := containsElement(list, element) if !ok { return Fail(t, fmt.Sprintf("%#v could not be applied builtin len()", list), msgAndArgs...) } if !found { return Fail(t, fmt.Sprintf("%#v does not contain %#v", list, element), msgAndArgs...) } } return true } // NotSubset asserts that the specified list(array, slice...) or map does NOT // contain all elements given in the specified subset list(array, slice...) or // map. // // assert.NotSubset(t, [1, 3, 4], [1, 2]) // assert.NotSubset(t, {"x": 1, "y": 2}, {"z": 3}) func NotSubset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok bool) { if h, ok := t.(tHelper); ok { h.Helper() } if subset == nil { return Fail(t, "nil is the empty set which is a subset of every set", msgAndArgs...) } listKind := reflect.TypeOf(list).Kind() if listKind != reflect.Array && listKind != reflect.Slice && listKind != reflect.Map { return Fail(t, fmt.Sprintf("%q has an unsupported type %s", list, listKind), msgAndArgs...) } subsetKind := reflect.TypeOf(subset).Kind() if subsetKind != reflect.Array && subsetKind != reflect.Slice && listKind != reflect.Map { return Fail(t, fmt.Sprintf("%q has an unsupported type %s", subset, subsetKind), msgAndArgs...) } if subsetKind == reflect.Map && listKind == reflect.Map { subsetMap := reflect.ValueOf(subset) actualMap := reflect.ValueOf(list) for _, k := range subsetMap.MapKeys() { ev := subsetMap.MapIndex(k) av := actualMap.MapIndex(k) if !av.IsValid() { return true } if !ObjectsAreEqual(ev.Interface(), av.Interface()) { return true } } return Fail(t, fmt.Sprintf("%q is a subset of %q", subset, list), msgAndArgs...) } subsetList := reflect.ValueOf(subset) for i := 0; i < subsetList.Len(); i++ { element := subsetList.Index(i).Interface() ok, found := containsElement(list, element) if !ok { return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", list), msgAndArgs...) } if !found { return true } } return Fail(t, fmt.Sprintf("%q is a subset of %q", subset, list), msgAndArgs...) } // ElementsMatch asserts that the specified listA(array, slice...) is equal to specified // listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, // the number of appearances of each of them in both lists should match. // // assert.ElementsMatch(t, [1, 3, 2, 3], [1, 3, 3, 2]) func ElementsMatch(t TestingT, listA, listB interface{}, msgAndArgs ...interface{}) (ok bool) { if h, ok := t.(tHelper); ok { h.Helper() } if isEmpty(listA) && isEmpty(listB) { return true } if !isList(t, listA, msgAndArgs...) || !isList(t, listB, msgAndArgs...) { return false } extraA, extraB := diffLists(listA, listB) if len(extraA) == 0 && len(extraB) == 0 { return true } return Fail(t, formatListDiff(listA, listB, extraA, extraB), msgAndArgs...) } // isList checks that the provided value is array or slice. func isList(t TestingT, list interface{}, msgAndArgs ...interface{}) (ok bool) { kind := reflect.TypeOf(list).Kind() if kind != reflect.Array && kind != reflect.Slice { return Fail(t, fmt.Sprintf("%q has an unsupported type %s, expecting array or slice", list, kind), msgAndArgs...) } return true } // diffLists diffs two arrays/slices and returns slices of elements that are only in A and only in B. // If some element is present multiple times, each instance is counted separately (e.g. if something is 2x in A and // 5x in B, it will be 0x in extraA and 3x in extraB). The order of items in both lists is ignored. func diffLists(listA, listB interface{}) (extraA, extraB []interface{}) { aValue := reflect.ValueOf(listA) bValue := reflect.ValueOf(listB) aLen := aValue.Len() bLen := bValue.Len() // Mark indexes in bValue that we already used visited := make([]bool, bLen) for i := 0; i < aLen; i++ { element := aValue.Index(i).Interface() found := false for j := 0; j < bLen; j++ { if visited[j] { continue } if ObjectsAreEqual(bValue.Index(j).Interface(), element) { visited[j] = true found = true break } } if !found { extraA = append(extraA, element) } } for j := 0; j < bLen; j++ { if visited[j] { continue } extraB = append(extraB, bValue.Index(j).Interface()) } return } func formatListDiff(listA, listB interface{}, extraA, extraB []interface{}) string { var msg bytes.Buffer msg.WriteString("elements differ") if len(extraA) > 0 { msg.WriteString("\n\nextra elements in list A:\n") msg.WriteString(spewConfig.Sdump(extraA)) } if len(extraB) > 0 { msg.WriteString("\n\nextra elements in list B:\n") msg.WriteString(spewConfig.Sdump(extraB)) } msg.WriteString("\n\nlistA:\n") msg.WriteString(spewConfig.Sdump(listA)) msg.WriteString("\n\nlistB:\n") msg.WriteString(spewConfig.Sdump(listB)) return msg.String() } // Condition uses a Comparison to assert a complex condition. func Condition(t TestingT, comp Comparison, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } result := comp() if !result { Fail(t, "Condition failed!", msgAndArgs...) } return result } // PanicTestFunc defines a func that should be passed to the assert.Panics and assert.NotPanics // methods, and represents a simple func that takes no arguments, and returns nothing. type PanicTestFunc func() // didPanic returns true if the function passed to it panics. Otherwise, it returns false. func didPanic(f PanicTestFunc) (didPanic bool, message interface{}, stack string) { didPanic = true defer func() { message = recover() if didPanic { stack = string(debug.Stack()) } }() // call the target function f() didPanic = false return } // Panics asserts that the code inside the specified PanicTestFunc panics. // // assert.Panics(t, func(){ GoCrazy() }) func Panics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } if funcDidPanic, panicValue, _ := didPanic(f); !funcDidPanic { return Fail(t, fmt.Sprintf("func %#v should panic\n\tPanic value:\t%#v", f, panicValue), msgAndArgs...) } return true } // PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that // the recovered panic value equals the expected panic value. // // assert.PanicsWithValue(t, "crazy error", func(){ GoCrazy() }) func PanicsWithValue(t TestingT, expected interface{}, f PanicTestFunc, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } funcDidPanic, panicValue, panickedStack := didPanic(f) if !funcDidPanic { return Fail(t, fmt.Sprintf("func %#v should panic\n\tPanic value:\t%#v", f, panicValue), msgAndArgs...) } if panicValue != expected { return Fail(t, fmt.Sprintf("func %#v should panic with value:\t%#v\n\tPanic value:\t%#v\n\tPanic stack:\t%s", f, expected, panicValue, panickedStack), msgAndArgs...) } return true } // PanicsWithError asserts that the code inside the specified PanicTestFunc // panics, and that the recovered panic value is an error that satisfies the // EqualError comparison. // // assert.PanicsWithError(t, "crazy error", func(){ GoCrazy() }) func PanicsWithError(t TestingT, errString string, f PanicTestFunc, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } funcDidPanic, panicValue, panickedStack := didPanic(f) if !funcDidPanic { return Fail(t, fmt.Sprintf("func %#v should panic\n\tPanic value:\t%#v", f, panicValue), msgAndArgs...) } panicErr, ok := panicValue.(error) if !ok || panicErr.Error() != errString { return Fail(t, fmt.Sprintf("func %#v should panic with error message:\t%#v\n\tPanic value:\t%#v\n\tPanic stack:\t%s", f, errString, panicValue, panickedStack), msgAndArgs...) } return true } // NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic. // // assert.NotPanics(t, func(){ RemainCalm() }) func NotPanics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } if funcDidPanic, panicValue, panickedStack := didPanic(f); funcDidPanic { return Fail(t, fmt.Sprintf("func %#v should not panic\n\tPanic value:\t%v\n\tPanic stack:\t%s", f, panicValue, panickedStack), msgAndArgs...) } return true } // WithinDuration asserts that the two times are within duration delta of each other. // // assert.WithinDuration(t, time.Now(), time.Now(), 10*time.Second) func WithinDuration(t TestingT, expected, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } dt := expected.Sub(actual) if dt < -delta || dt > delta { return Fail(t, fmt.Sprintf("Max difference between %v and %v allowed is %v, but difference was %v", expected, actual, delta, dt), msgAndArgs...) } return true } // WithinRange asserts that a time is within a time range (inclusive). // // assert.WithinRange(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second)) func WithinRange(t TestingT, actual, start, end time.Time, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } if end.Before(start) { return Fail(t, "Start should be before end", msgAndArgs...) } if actual.Before(start) { return Fail(t, fmt.Sprintf("Time %v expected to be in time range %v to %v, but is before the range", actual, start, end), msgAndArgs...) } else if actual.After(end) { return Fail(t, fmt.Sprintf("Time %v expected to be in time range %v to %v, but is after the range", actual, start, end), msgAndArgs...) } return true } func toFloat(x interface{}) (float64, bool) { var xf float64 xok := true switch xn := x.(type) { case uint: xf = float64(xn) case uint8: xf = float64(xn) case uint16: xf = float64(xn) case uint32: xf = float64(xn) case uint64: xf = float64(xn) case int: xf = float64(xn) case int8: xf = float64(xn) case int16: xf = float64(xn) case int32: xf = float64(xn) case int64: xf = float64(xn) case float32: xf = float64(xn) case float64: xf = xn case time.Duration: xf = float64(xn) default: xok = false } return xf, xok } // InDelta asserts that the two numerals are within delta of each other. // // assert.InDelta(t, math.Pi, 22/7.0, 0.01) func InDelta(t TestingT, expected, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } af, aok := toFloat(expected) bf, bok := toFloat(actual) if !aok || !bok { return Fail(t, "Parameters must be numerical", msgAndArgs...) } if math.IsNaN(af) && math.IsNaN(bf) { return true } if math.IsNaN(af) { return Fail(t, "Expected must not be NaN", msgAndArgs...) } if math.IsNaN(bf) { return Fail(t, fmt.Sprintf("Expected %v with delta %v, but was NaN", expected, delta), msgAndArgs...) } dt := af - bf if dt < -delta || dt > delta { return Fail(t, fmt.Sprintf("Max difference between %v and %v allowed is %v, but difference was %v", expected, actual, delta, dt), msgAndArgs...) } return true } // InDeltaSlice is the same as InDelta, except it compares two slices. func InDeltaSlice(t TestingT, expected, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } if expected == nil || actual == nil || reflect.TypeOf(actual).Kind() != reflect.Slice || reflect.TypeOf(expected).Kind() != reflect.Slice { return Fail(t, "Parameters must be slice", msgAndArgs...) } actualSlice := reflect.ValueOf(actual) expectedSlice := reflect.ValueOf(expected) for i := 0; i < actualSlice.Len(); i++ { result := InDelta(t, actualSlice.Index(i).Interface(), expectedSlice.Index(i).Interface(), delta, msgAndArgs...) if !result { return result } } return true } // InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. func InDeltaMapValues(t TestingT, expected, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } if expected == nil || actual == nil || reflect.TypeOf(actual).Kind() != reflect.Map || reflect.TypeOf(expected).Kind() != reflect.Map { return Fail(t, "Arguments must be maps", msgAndArgs...) } expectedMap := reflect.ValueOf(expected) actualMap := reflect.ValueOf(actual) if expectedMap.Len() != actualMap.Len() { return Fail(t, "Arguments must have the same number of keys", msgAndArgs...) } for _, k := range expectedMap.MapKeys() { ev := expectedMap.MapIndex(k) av := actualMap.MapIndex(k) if !ev.IsValid() { return Fail(t, fmt.Sprintf("missing key %q in expected map", k), msgAndArgs...) } if !av.IsValid() { return Fail(t, fmt.Sprintf("missing key %q in actual map", k), msgAndArgs...) } if !InDelta( t, ev.Interface(), av.Interface(), delta, msgAndArgs..., ) { return false } } return true } func calcRelativeError(expected, actual interface{}) (float64, error) { af, aok := toFloat(expected) bf, bok := toFloat(actual) if !aok || !bok { return 0, fmt.Errorf("Parameters must be numerical") } if math.IsNaN(af) && math.IsNaN(bf) { return 0, nil } if math.IsNaN(af) { return 0, errors.New("expected value must not be NaN") } if af == 0 { return 0, fmt.Errorf("expected value must have a value other than zero to calculate the relative error") } if math.IsNaN(bf) { return 0, errors.New("actual value must not be NaN") } return math.Abs(af-bf) / math.Abs(af), nil } // InEpsilon asserts that expected and actual have a relative error less than epsilon func InEpsilon(t TestingT, expected, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } if math.IsNaN(epsilon) { return Fail(t, "epsilon must not be NaN", msgAndArgs...) } actualEpsilon, err := calcRelativeError(expected, actual) if err != nil { return Fail(t, err.Error(), msgAndArgs...) } if actualEpsilon > epsilon { return Fail(t, fmt.Sprintf("Relative error is too high: %#v (expected)\n"+ " < %#v (actual)", epsilon, actualEpsilon), msgAndArgs...) } return true } // InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices. func InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } if expected == nil || actual == nil { return Fail(t, "Parameters must be slice", msgAndArgs...) } expectedSlice := reflect.ValueOf(expected) actualSlice := reflect.ValueOf(actual) if expectedSlice.Type().Kind() != reflect.Slice { return Fail(t, "Expected value must be slice", msgAndArgs...) } expectedLen := expectedSlice.Len() if !IsType(t, expected, actual) || !Len(t, actual, expectedLen) { return false } for i := 0; i < expectedLen; i++ { if !InEpsilon(t, expectedSlice.Index(i).Interface(), actualSlice.Index(i).Interface(), epsilon, "at index %d", i) { return false } } return true } /* Errors */ // NoError asserts that a function returned no error (i.e. `nil`). // // actualObj, err := SomeFunction() // if assert.NoError(t, err) { // assert.Equal(t, expectedObj, actualObj) // } func NoError(t TestingT, err error, msgAndArgs ...interface{}) bool { if err != nil { if h, ok := t.(tHelper); ok { h.Helper() } return Fail(t, fmt.Sprintf("Received unexpected error:\n%+v", err), msgAndArgs...) } return true } // Error asserts that a function returned an error (i.e. not `nil`). // // actualObj, err := SomeFunction() // if assert.Error(t, err) { // assert.Equal(t, expectedError, err) // } func Error(t TestingT, err error, msgAndArgs ...interface{}) bool { if err == nil { if h, ok := t.(tHelper); ok { h.Helper() } return Fail(t, "An error is expected but got nil.", msgAndArgs...) } return true } // EqualError asserts that a function returned an error (i.e. not `nil`) // and that it is equal to the provided error. // // actualObj, err := SomeFunction() // assert.EqualError(t, err, expectedErrorString) func EqualError(t TestingT, theError error, errString string, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } if !Error(t, theError, msgAndArgs...) { return false } expected := errString actual := theError.Error() // don't need to use deep equals here, we know they are both strings if expected != actual { return Fail(t, fmt.Sprintf("Error message not equal:\n"+ "expected: %q\n"+ "actual : %q", expected, actual), msgAndArgs...) } return true } // ErrorContains asserts that a function returned an error (i.e. not `nil`) // and that the error contains the specified substring. // // actualObj, err := SomeFunction() // assert.ErrorContains(t, err, expectedErrorSubString) func ErrorContains(t TestingT, theError error, contains string, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } if !Error(t, theError, msgAndArgs...) { return false } actual := theError.Error() if !strings.Contains(actual, contains) { return Fail(t, fmt.Sprintf("Error %#v does not contain %#v", actual, contains), msgAndArgs...) } return true } // matchRegexp return true if a specified regexp matches a string. func matchRegexp(rx interface{}, str interface{}) bool { var r *regexp.Regexp if rr, ok := rx.(*regexp.Regexp); ok { r = rr } else { r = regexp.MustCompile(fmt.Sprint(rx)) } return (r.FindStringIndex(fmt.Sprint(str)) != nil) } // Regexp asserts that a specified regexp matches a string. // // assert.Regexp(t, regexp.MustCompile("start"), "it's starting") // assert.Regexp(t, "start...$", "it's not starting") func Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } match := matchRegexp(rx, str) if !match { Fail(t, fmt.Sprintf("Expect \"%v\" to match \"%v\"", str, rx), msgAndArgs...) } return match } // NotRegexp asserts that a specified regexp does not match a string. // // assert.NotRegexp(t, regexp.MustCompile("starts"), "it's starting") // assert.NotRegexp(t, "^start", "it's not starting") func NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } match := matchRegexp(rx, str) if match { Fail(t, fmt.Sprintf("Expect \"%v\" to NOT match \"%v\"", str, rx), msgAndArgs...) } return !match } // Zero asserts that i is the zero value for its type. func Zero(t TestingT, i interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } if i != nil && !reflect.DeepEqual(i, reflect.Zero(reflect.TypeOf(i)).Interface()) { return Fail(t, fmt.Sprintf("Should be zero, but was %v", i), msgAndArgs...) } return true } // NotZero asserts that i is not the zero value for its type. func NotZero(t TestingT, i interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } if i == nil || reflect.DeepEqual(i, reflect.Zero(reflect.TypeOf(i)).Interface()) { return Fail(t, fmt.Sprintf("Should not be zero, but was %v", i), msgAndArgs...) } return true } // FileExists checks whether a file exists in the given path. It also fails if // the path points to a directory or there is an error when trying to check the file. func FileExists(t TestingT, path string, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } info, err := os.Lstat(path) if err != nil { if os.IsNotExist(err) { return Fail(t, fmt.Sprintf("unable to find file %q", path), msgAndArgs...) } return Fail(t, fmt.Sprintf("error when running os.Lstat(%q): %s", path, err), msgAndArgs...) } if info.IsDir() { return Fail(t, fmt.Sprintf("%q is a directory", path), msgAndArgs...) } return true } // NoFileExists checks whether a file does not exist in a given path. It fails // if the path points to an existing _file_ only. func NoFileExists(t TestingT, path string, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } info, err := os.Lstat(path) if err != nil { return true } if info.IsDir() { return true } return Fail(t, fmt.Sprintf("file %q exists", path), msgAndArgs...) } // DirExists checks whether a directory exists in the given path. It also fails // if the path is a file rather a directory or there is an error checking whether it exists. func DirExists(t TestingT, path string, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } info, err := os.Lstat(path) if err != nil { if os.IsNotExist(err) { return Fail(t, fmt.Sprintf("unable to find file %q", path), msgAndArgs...) } return Fail(t, fmt.Sprintf("error when running os.Lstat(%q): %s", path, err), msgAndArgs...) } if !info.IsDir() { return Fail(t, fmt.Sprintf("%q is a file", path), msgAndArgs...) } return true } // NoDirExists checks whether a directory does not exist in the given path. // It fails if the path points to an existing _directory_ only. func NoDirExists(t TestingT, path string, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } info, err := os.Lstat(path) if err != nil { if os.IsNotExist(err) { return true } return true } if !info.IsDir() { return true } return Fail(t, fmt.Sprintf("directory %q exists", path), msgAndArgs...) } // JSONEq asserts that two JSON strings are equivalent. // // assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) func JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } var expectedJSONAsInterface, actualJSONAsInterface interface{} if err := json.Unmarshal([]byte(expected), &expectedJSONAsInterface); err != nil { return Fail(t, fmt.Sprintf("Expected value ('%s') is not valid json.\nJSON parsing error: '%s'", expected, err.Error()), msgAndArgs...) } if err := json.Unmarshal([]byte(actual), &actualJSONAsInterface); err != nil { return Fail(t, fmt.Sprintf("Input ('%s') needs to be valid json.\nJSON parsing error: '%s'", actual, err.Error()), msgAndArgs...) } return Equal(t, expectedJSONAsInterface, actualJSONAsInterface, msgAndArgs...) } // YAMLEq asserts that two YAML strings are equivalent. func YAMLEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } var expectedYAMLAsInterface, actualYAMLAsInterface interface{} if err := yaml.Unmarshal([]byte(expected), &expectedYAMLAsInterface); err != nil { return Fail(t, fmt.Sprintf("Expected value ('%s') is not valid yaml.\nYAML parsing error: '%s'", expected, err.Error()), msgAndArgs...) } if err := yaml.Unmarshal([]byte(actual), &actualYAMLAsInterface); err != nil { return Fail(t, fmt.Sprintf("Input ('%s') needs to be valid yaml.\nYAML error: '%s'", actual, err.Error()), msgAndArgs...) } return Equal(t, expectedYAMLAsInterface, actualYAMLAsInterface, msgAndArgs...) } func typeAndKind(v interface{}) (reflect.Type, reflect.Kind) { t := reflect.TypeOf(v) k := t.Kind() if k == reflect.Ptr { t = t.Elem() k = t.Kind() } return t, k } // diff returns a diff of both values as long as both are of the same type and // are a struct, map, slice, array or string. Otherwise it returns an empty string. func diff(expected interface{}, actual interface{}) string { if expected == nil || actual == nil { return "" } et, ek := typeAndKind(expected) at, _ := typeAndKind(actual) if et != at { return "" } if ek != reflect.Struct && ek != reflect.Map && ek != reflect.Slice && ek != reflect.Array && ek != reflect.String { return "" } var e, a string switch et { case reflect.TypeOf(""): e = reflect.ValueOf(expected).String() a = reflect.ValueOf(actual).String() case reflect.TypeOf(time.Time{}): e = spewConfigStringerEnabled.Sdump(expected) a = spewConfigStringerEnabled.Sdump(actual) default: e = spewConfig.Sdump(expected) a = spewConfig.Sdump(actual) } diff, _ := difflib.GetUnifiedDiffString(difflib.UnifiedDiff{ A: difflib.SplitLines(e), B: difflib.SplitLines(a), FromFile: "Expected", FromDate: "", ToFile: "Actual", ToDate: "", Context: 1, }) return "\n\nDiff:\n" + diff } func isFunction(arg interface{}) bool { if arg == nil { return false } return reflect.TypeOf(arg).Kind() == reflect.Func } var spewConfig = spew.ConfigState{ Indent: " ", DisablePointerAddresses: true, DisableCapacities: true, SortKeys: true, DisableMethods: true, MaxDepth: 10, } var spewConfigStringerEnabled = spew.ConfigState{ Indent: " ", DisablePointerAddresses: true, DisableCapacities: true, SortKeys: true, MaxDepth: 10, } type tHelper interface { Helper() } // Eventually asserts that given condition will be met in waitFor time, // periodically checking target function each tick. // // assert.Eventually(t, func() bool { return true; }, time.Second, 10*time.Millisecond) func Eventually(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } ch := make(chan bool, 1) timer := time.NewTimer(waitFor) defer timer.Stop() ticker := time.NewTicker(tick) defer ticker.Stop() for tick := ticker.C; ; { select { case <-timer.C: return Fail(t, "Condition never satisfied", msgAndArgs...) case <-tick: tick = nil go func() { ch <- condition() }() case v := <-ch: if v { return true } tick = ticker.C } } } // CollectT implements the TestingT interface and collects all errors. type CollectT struct { errors []error } // Errorf collects the error. func (c *CollectT) Errorf(format string, args ...interface{}) { c.errors = append(c.errors, fmt.Errorf(format, args...)) } // FailNow panics. func (*CollectT) FailNow() { panic("Assertion failed") } // Deprecated: That was a method for internal usage that should not have been published. Now just panics. func (*CollectT) Reset() { panic("Reset() is deprecated") } // Deprecated: That was a method for internal usage that should not have been published. Now just panics. func (*CollectT) Copy(TestingT) { panic("Copy() is deprecated") } // EventuallyWithT asserts that given condition will be met in waitFor time, // periodically checking target function each tick. In contrast to Eventually, // it supplies a CollectT to the condition function, so that the condition // function can use the CollectT to call other assertions. // The condition is considered "met" if no errors are raised in a tick. // The supplied CollectT collects all errors from one tick (if there are any). // If the condition is not met before waitFor, the collected errors of // the last tick are copied to t. // // externalValue := false // go func() { // time.Sleep(8*time.Second) // externalValue = true // }() // assert.EventuallyWithT(t, func(c *assert.CollectT) { // // add assertions as needed; any assertion failure will fail the current tick // assert.True(c, externalValue, "expected 'externalValue' to be true") // }, 1*time.Second, 10*time.Second, "external state has not changed to 'true'; still false") func EventuallyWithT(t TestingT, condition func(collect *CollectT), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } var lastFinishedTickErrs []error ch := make(chan []error, 1) timer := time.NewTimer(waitFor) defer timer.Stop() ticker := time.NewTicker(tick) defer ticker.Stop() for tick := ticker.C; ; { select { case <-timer.C: for _, err := range lastFinishedTickErrs { t.Errorf("%v", err) } return Fail(t, "Condition never satisfied", msgAndArgs...) case <-tick: tick = nil go func() { collect := new(CollectT) defer func() { ch <- collect.errors }() condition(collect) }() case errs := <-ch: if len(errs) == 0 { return true } // Keep the errors from the last ended condition, so that they can be copied to t if timeout is reached. lastFinishedTickErrs = errs tick = ticker.C } } } // Never asserts that the given condition doesn't satisfy in waitFor time, // periodically checking the target function each tick. // // assert.Never(t, func() bool { return false; }, time.Second, 10*time.Millisecond) func Never(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } ch := make(chan bool, 1) timer := time.NewTimer(waitFor) defer timer.Stop() ticker := time.NewTicker(tick) defer ticker.Stop() for tick := ticker.C; ; { select { case <-timer.C: return true case <-tick: tick = nil go func() { ch <- condition() }() case v := <-ch: if v { return Fail(t, "Condition satisfied", msgAndArgs...) } tick = ticker.C } } } // ErrorIs asserts that at least one of the errors in err's chain matches target. // This is a wrapper for errors.Is. func ErrorIs(t TestingT, err, target error, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } if errors.Is(err, target) { return true } var expectedText string if target != nil { expectedText = target.Error() } chain := buildErrorChainString(err) return Fail(t, fmt.Sprintf("Target error should be in err chain:\n"+ "expected: %q\n"+ "in chain: %s", expectedText, chain, ), msgAndArgs...) } // NotErrorIs asserts that at none of the errors in err's chain matches target. // This is a wrapper for errors.Is. func NotErrorIs(t TestingT, err, target error, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } if !errors.Is(err, target) { return true } var expectedText string if target != nil { expectedText = target.Error() } chain := buildErrorChainString(err) return Fail(t, fmt.Sprintf("Target error should not be in err chain:\n"+ "found: %q\n"+ "in chain: %s", expectedText, chain, ), msgAndArgs...) } // ErrorAs asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. // This is a wrapper for errors.As. func ErrorAs(t TestingT, err error, target interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } if errors.As(err, target) { return true } chain := buildErrorChainString(err) return Fail(t, fmt.Sprintf("Should be in error chain:\n"+ "expected: %q\n"+ "in chain: %s", target, chain, ), msgAndArgs...) } func buildErrorChainString(err error) string { if err == nil { return "" } e := errors.Unwrap(err) chain := fmt.Sprintf("%q", err.Error()) for e != nil { chain += fmt.Sprintf("\n\t%q", e.Error()) e = errors.Unwrap(e) } return chain } ================================================ FILE: vendor/github.com/stretchr/testify/assert/doc.go ================================================ // Package assert provides a set of comprehensive testing tools for use with the normal Go testing system. // // # Example Usage // // The following is a complete example using assert in a standard test function: // // import ( // "testing" // "github.com/stretchr/testify/assert" // ) // // func TestSomething(t *testing.T) { // // var a string = "Hello" // var b string = "Hello" // // assert.Equal(t, a, b, "The two words should be the same.") // // } // // if you assert many times, use the format below: // // import ( // "testing" // "github.com/stretchr/testify/assert" // ) // // func TestSomething(t *testing.T) { // assert := assert.New(t) // // var a string = "Hello" // var b string = "Hello" // // assert.Equal(a, b, "The two words should be the same.") // } // // # Assertions // // Assertions allow you to easily write test code, and are global funcs in the `assert` package. // All assertion functions take, as the first argument, the `*testing.T` object provided by the // testing framework. This allows the assertion funcs to write the failings and other details to // the correct place. // // Every assertion function also takes an optional string message as the final argument, // allowing custom error messages to be appended to the message the assertion method outputs. package assert ================================================ FILE: vendor/github.com/stretchr/testify/assert/errors.go ================================================ package assert import ( "errors" ) // AnError is an error instance useful for testing. If the code does not care // about error specifics, and only needs to return the error for example, this // error should be used to make the test code more readable. var AnError = errors.New("assert.AnError general error for testing") ================================================ FILE: vendor/github.com/stretchr/testify/assert/forward_assertions.go ================================================ package assert // Assertions provides assertion methods around the // TestingT interface. type Assertions struct { t TestingT } // New makes a new Assertions object for the specified TestingT. func New(t TestingT) *Assertions { return &Assertions{ t: t, } } //go:generate sh -c "cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=assert -template=assertion_forward.go.tmpl -include-format-funcs" ================================================ FILE: vendor/github.com/stretchr/testify/assert/http_assertions.go ================================================ package assert import ( "fmt" "net/http" "net/http/httptest" "net/url" "strings" ) // httpCode is a helper that returns HTTP code of the response. It returns -1 and // an error if building a new request fails. func httpCode(handler http.HandlerFunc, method, url string, values url.Values) (int, error) { w := httptest.NewRecorder() req, err := http.NewRequest(method, url, http.NoBody) if err != nil { return -1, err } req.URL.RawQuery = values.Encode() handler(w, req) return w.Code, nil } // HTTPSuccess asserts that a specified handler returns a success status code. // // assert.HTTPSuccess(t, myHandler, "POST", "http://www.google.com", nil) // // Returns whether the assertion was successful (true) or not (false). func HTTPSuccess(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } code, err := httpCode(handler, method, url, values) if err != nil { Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err), msgAndArgs...) } isSuccessCode := code >= http.StatusOK && code <= http.StatusPartialContent if !isSuccessCode { Fail(t, fmt.Sprintf("Expected HTTP success status code for %q but received %d", url+"?"+values.Encode(), code), msgAndArgs...) } return isSuccessCode } // HTTPRedirect asserts that a specified handler returns a redirect status code. // // assert.HTTPRedirect(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} // // Returns whether the assertion was successful (true) or not (false). func HTTPRedirect(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } code, err := httpCode(handler, method, url, values) if err != nil { Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err), msgAndArgs...) } isRedirectCode := code >= http.StatusMultipleChoices && code <= http.StatusTemporaryRedirect if !isRedirectCode { Fail(t, fmt.Sprintf("Expected HTTP redirect status code for %q but received %d", url+"?"+values.Encode(), code), msgAndArgs...) } return isRedirectCode } // HTTPError asserts that a specified handler returns an error status code. // // assert.HTTPError(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} // // Returns whether the assertion was successful (true) or not (false). func HTTPError(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } code, err := httpCode(handler, method, url, values) if err != nil { Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err), msgAndArgs...) } isErrorCode := code >= http.StatusBadRequest if !isErrorCode { Fail(t, fmt.Sprintf("Expected HTTP error status code for %q but received %d", url+"?"+values.Encode(), code), msgAndArgs...) } return isErrorCode } // HTTPStatusCode asserts that a specified handler returns a specified status code. // // assert.HTTPStatusCode(t, myHandler, "GET", "/notImplemented", nil, 501) // // Returns whether the assertion was successful (true) or not (false). func HTTPStatusCode(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, statuscode int, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } code, err := httpCode(handler, method, url, values) if err != nil { Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err), msgAndArgs...) } successful := code == statuscode if !successful { Fail(t, fmt.Sprintf("Expected HTTP status code %d for %q but received %d", statuscode, url+"?"+values.Encode(), code), msgAndArgs...) } return successful } // HTTPBody is a helper that returns HTTP body of the response. It returns // empty string if building a new request fails. func HTTPBody(handler http.HandlerFunc, method, url string, values url.Values) string { w := httptest.NewRecorder() if len(values) > 0 { url += "?" + values.Encode() } req, err := http.NewRequest(method, url, http.NoBody) if err != nil { return "" } handler(w, req) return w.Body.String() } // HTTPBodyContains asserts that a specified handler returns a // body that contains a string. // // assert.HTTPBodyContains(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") // // Returns whether the assertion was successful (true) or not (false). func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } body := HTTPBody(handler, method, url, values) contains := strings.Contains(body, fmt.Sprint(str)) if !contains { Fail(t, fmt.Sprintf("Expected response body for \"%s\" to contain \"%s\" but found \"%s\"", url+"?"+values.Encode(), str, body), msgAndArgs...) } return contains } // HTTPBodyNotContains asserts that a specified handler returns a // body that does not contain a string. // // assert.HTTPBodyNotContains(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") // // Returns whether the assertion was successful (true) or not (false). func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { if h, ok := t.(tHelper); ok { h.Helper() } body := HTTPBody(handler, method, url, values) contains := strings.Contains(body, fmt.Sprint(str)) if contains { Fail(t, fmt.Sprintf("Expected response body for \"%s\" to NOT contain \"%s\" but found \"%s\"", url+"?"+values.Encode(), str, body), msgAndArgs...) } return !contains } ================================================ FILE: vendor/github.com/xo/terminfo/.gitignore ================================================ /.cache/ /cmd/infocmp/infocmp /cmd/infocmp/.out/ /infocmp /.out/ *.txt ================================================ FILE: vendor/github.com/xo/terminfo/LICENSE ================================================ The MIT License (MIT) Copyright (c) 2016 Anmol Sethi 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. ================================================ FILE: vendor/github.com/xo/terminfo/README.md ================================================ # About terminfo [![GoDoc][1]][2] Package `terminfo` provides a pure-Go implementation of reading information from the terminfo database. `terminfo` is meant as a replacement for `ncurses` in simple Go programs. ## Installing Install in the usual Go way: ```sh $ go get -u github.com/xo/terminfo ``` ## Using Please see the [GoDoc API listing][2] for more information on using `terminfo`. ```go // _examples/simple/main.go package main import ( "bytes" "fmt" "log" "os" "os/signal" "strings" "sync" "syscall" "github.com/xo/terminfo" ) func main() { //r := rand.New(nil) // load terminfo ti, err := terminfo.LoadFromEnv() if err != nil { log.Fatal(err) } // cleanup defer func() { err := recover() termreset(ti) if err != nil { log.Fatal(err) } }() terminit(ti) termtitle(ti, "simple example!") termputs(ti, 3, 3, "Ctrl-C to exit") maxColors := termcolors(ti) if maxColors > 256 { maxColors = 256 } for i := 0; i < maxColors; i++ { termputs(ti, 5+i/16, 5+i%16, ti.Colorf(i, 0, "█")) } // wait for signal sigs := make(chan os.Signal, 1) signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM) <-sigs } // terminit initializes the special CA mode on the terminal, and makes the // cursor invisible. func terminit(ti *terminfo.Terminfo) { buf := new(bytes.Buffer) // set the cursor invisible ti.Fprintf(buf, terminfo.CursorInvisible) // enter special mode ti.Fprintf(buf, terminfo.EnterCaMode) // clear the screen ti.Fprintf(buf, terminfo.ClearScreen) os.Stdout.Write(buf.Bytes()) } // termreset is the inverse of terminit. func termreset(ti *terminfo.Terminfo) { buf := new(bytes.Buffer) ti.Fprintf(buf, terminfo.ExitCaMode) ti.Fprintf(buf, terminfo.CursorNormal) os.Stdout.Write(buf.Bytes()) } // termputs puts a string at row, col, interpolating v. func termputs(ti *terminfo.Terminfo, row, col int, s string, v ...interface{}) { buf := new(bytes.Buffer) ti.Fprintf(buf, terminfo.CursorAddress, row, col) fmt.Fprintf(buf, s, v...) os.Stdout.Write(buf.Bytes()) } // sl is the status line terminfo. var sl *terminfo.Terminfo // termtitle sets the window title. func termtitle(ti *terminfo.Terminfo, s string) { var once sync.Once once.Do(func() { if ti.Has(terminfo.HasStatusLine) { return } // load the sl xterm if terminal is an xterm or has COLORTERM if strings.Contains(strings.ToLower(os.Getenv("TERM")), "xterm") || os.Getenv("COLORTERM") == "truecolor" { sl, _ = terminfo.Load("xterm+sl") } }) if sl != nil { ti = sl } if !ti.Has(terminfo.HasStatusLine) { return } buf := new(bytes.Buffer) ti.Fprintf(buf, terminfo.ToStatusLine) fmt.Fprint(buf, s) ti.Fprintf(buf, terminfo.FromStatusLine) os.Stdout.Write(buf.Bytes()) } // termcolors returns the maximum colors available for the terminal. func termcolors(ti *terminfo.Terminfo) int { if colors := ti.Num(terminfo.MaxColors); colors > 0 { return colors } return int(terminfo.ColorLevelBasic) } ``` [1]: https://godoc.org/github.com/xo/terminfo?status.svg [2]: https://godoc.org/github.com/xo/terminfo ================================================ FILE: vendor/github.com/xo/terminfo/caps.go ================================================ package terminfo //go:generate go run gen.go // BoolCapName returns the bool capability name. func BoolCapName(i int) string { return boolCapNames[2*i] } // BoolCapNameShort returns the short bool capability name. func BoolCapNameShort(i int) string { return boolCapNames[2*i+1] } // NumCapName returns the num capability name. func NumCapName(i int) string { return numCapNames[2*i] } // NumCapNameShort returns the short num capability name. func NumCapNameShort(i int) string { return numCapNames[2*i+1] } // StringCapName returns the string capability name. func StringCapName(i int) string { return stringCapNames[2*i] } // StringCapNameShort returns the short string capability name. func StringCapNameShort(i int) string { return stringCapNames[2*i+1] } ================================================ FILE: vendor/github.com/xo/terminfo/capvals.go ================================================ package terminfo // Code generated by gen.go. DO NOT EDIT. // Bool capabilities. const ( // The AutoLeftMargin [auto_left_margin, bw] bool capability indicates cub1 wraps from column 0 to last column. AutoLeftMargin = iota // The AutoRightMargin [auto_right_margin, am] bool capability indicates terminal has automatic margins. AutoRightMargin // The NoEscCtlc [no_esc_ctlc, xsb] bool capability indicates beehive (f1=escape, f2=ctrl C). NoEscCtlc // The CeolStandoutGlitch [ceol_standout_glitch, xhp] bool capability indicates standout not erased by overwriting (hp). CeolStandoutGlitch // The EatNewlineGlitch [eat_newline_glitch, xenl] bool capability indicates newline ignored after 80 cols (concept). EatNewlineGlitch // The EraseOverstrike [erase_overstrike, eo] bool capability indicates can erase overstrikes with a blank. EraseOverstrike // The GenericType [generic_type, gn] bool capability indicates generic line type. GenericType // The HardCopy [hard_copy, hc] bool capability indicates hardcopy terminal. HardCopy // The HasMetaKey [has_meta_key, km] bool capability indicates Has a meta key (i.e., sets 8th-bit). HasMetaKey // The HasStatusLine [has_status_line, hs] bool capability indicates has extra status line. HasStatusLine // The InsertNullGlitch [insert_null_glitch, in] bool capability indicates insert mode distinguishes nulls. InsertNullGlitch // The MemoryAbove [memory_above, da] bool capability indicates display may be retained above the screen. MemoryAbove // The MemoryBelow [memory_below, db] bool capability indicates display may be retained below the screen. MemoryBelow // The MoveInsertMode [move_insert_mode, mir] bool capability indicates safe to move while in insert mode. MoveInsertMode // The MoveStandoutMode [move_standout_mode, msgr] bool capability indicates safe to move while in standout mode. MoveStandoutMode // The OverStrike [over_strike, os] bool capability indicates terminal can overstrike. OverStrike // The StatusLineEscOk [status_line_esc_ok, eslok] bool capability indicates escape can be used on the status line. StatusLineEscOk // The DestTabsMagicSmso [dest_tabs_magic_smso, xt] bool capability indicates tabs destructive, magic so char (t1061). DestTabsMagicSmso // The TildeGlitch [tilde_glitch, hz] bool capability indicates cannot print ~'s (Hazeltine). TildeGlitch // The TransparentUnderline [transparent_underline, ul] bool capability indicates underline character overstrikes. TransparentUnderline // The XonXoff [xon_xoff, xon] bool capability indicates terminal uses xon/xoff handshaking. XonXoff // The NeedsXonXoff [needs_xon_xoff, nxon] bool capability indicates padding will not work, xon/xoff required. NeedsXonXoff // The PrtrSilent [prtr_silent, mc5i] bool capability indicates printer will not echo on screen. PrtrSilent // The HardCursor [hard_cursor, chts] bool capability indicates cursor is hard to see. HardCursor // The NonRevRmcup [non_rev_rmcup, nrrmc] bool capability indicates smcup does not reverse rmcup. NonRevRmcup // The NoPadChar [no_pad_char, npc] bool capability indicates pad character does not exist. NoPadChar // The NonDestScrollRegion [non_dest_scroll_region, ndscr] bool capability indicates scrolling region is non-destructive. NonDestScrollRegion // The CanChange [can_change, ccc] bool capability indicates terminal can re-define existing colors. CanChange // The BackColorErase [back_color_erase, bce] bool capability indicates screen erased with background color. BackColorErase // The HueLightnessSaturation [hue_lightness_saturation, hls] bool capability indicates terminal uses only HLS color notation (Tektronix). HueLightnessSaturation // The ColAddrGlitch [col_addr_glitch, xhpa] bool capability indicates only positive motion for hpa/mhpa caps. ColAddrGlitch // The CrCancelsMicroMode [cr_cancels_micro_mode, crxm] bool capability indicates using cr turns off micro mode. CrCancelsMicroMode // The HasPrintWheel [has_print_wheel, daisy] bool capability indicates printer needs operator to change character set. HasPrintWheel // The RowAddrGlitch [row_addr_glitch, xvpa] bool capability indicates only positive motion for vpa/mvpa caps. RowAddrGlitch // The SemiAutoRightMargin [semi_auto_right_margin, sam] bool capability indicates printing in last column causes cr. SemiAutoRightMargin // The CpiChangesRes [cpi_changes_res, cpix] bool capability indicates changing character pitch changes resolution. CpiChangesRes // The LpiChangesRes [lpi_changes_res, lpix] bool capability indicates changing line pitch changes resolution. LpiChangesRes // The BackspacesWithBs [backspaces_with_bs, OTbs] bool capability indicates uses ^H to move left. BackspacesWithBs // The CrtNoScrolling [crt_no_scrolling, OTns] bool capability indicates crt cannot scroll. CrtNoScrolling // The NoCorrectlyWorkingCr [no_correctly_working_cr, OTnc] bool capability indicates no way to go to start of line. NoCorrectlyWorkingCr // The GnuHasMetaKey [gnu_has_meta_key, OTMT] bool capability indicates has meta key. GnuHasMetaKey // The LinefeedIsNewline [linefeed_is_newline, OTNL] bool capability indicates move down with \n. LinefeedIsNewline // The HasHardwareTabs [has_hardware_tabs, OTpt] bool capability indicates has 8-char tabs invoked with ^I. HasHardwareTabs // The ReturnDoesClrEol [return_does_clr_eol, OTxr] bool capability indicates return clears the line. ReturnDoesClrEol ) // Num capabilities. const ( // The Columns [columns, cols] num capability is number of columns in a line. Columns = iota // The InitTabs [init_tabs, it] num capability is tabs initially every # spaces. InitTabs // The Lines [lines, lines] num capability is number of lines on screen or page. Lines // The LinesOfMemory [lines_of_memory, lm] num capability is lines of memory if > line. 0 means varies. LinesOfMemory // The MagicCookieGlitch [magic_cookie_glitch, xmc] num capability is number of blank characters left by smso or rmso. MagicCookieGlitch // The PaddingBaudRate [padding_baud_rate, pb] num capability is lowest baud rate where padding needed. PaddingBaudRate // The VirtualTerminal [virtual_terminal, vt] num capability is virtual terminal number (CB/unix). VirtualTerminal // The WidthStatusLine [width_status_line, wsl] num capability is number of columns in status line. WidthStatusLine // The NumLabels [num_labels, nlab] num capability is number of labels on screen. NumLabels // The LabelHeight [label_height, lh] num capability is rows in each label. LabelHeight // The LabelWidth [label_width, lw] num capability is columns in each label. LabelWidth // The MaxAttributes [max_attributes, ma] num capability is maximum combined attributes terminal can handle. MaxAttributes // The MaximumWindows [maximum_windows, wnum] num capability is maximum number of definable windows. MaximumWindows // The MaxColors [max_colors, colors] num capability is maximum number of colors on screen. MaxColors // The MaxPairs [max_pairs, pairs] num capability is maximum number of color-pairs on the screen. MaxPairs // The NoColorVideo [no_color_video, ncv] num capability is video attributes that cannot be used with colors. NoColorVideo // The BufferCapacity [buffer_capacity, bufsz] num capability is numbers of bytes buffered before printing. BufferCapacity // The DotVertSpacing [dot_vert_spacing, spinv] num capability is spacing of pins vertically in pins per inch. DotVertSpacing // The DotHorzSpacing [dot_horz_spacing, spinh] num capability is spacing of dots horizontally in dots per inch. DotHorzSpacing // The MaxMicroAddress [max_micro_address, maddr] num capability is maximum value in micro_..._address. MaxMicroAddress // The MaxMicroJump [max_micro_jump, mjump] num capability is maximum value in parm_..._micro. MaxMicroJump // The MicroColSize [micro_col_size, mcs] num capability is character step size when in micro mode. MicroColSize // The MicroLineSize [micro_line_size, mls] num capability is line step size when in micro mode. MicroLineSize // The NumberOfPins [number_of_pins, npins] num capability is numbers of pins in print-head. NumberOfPins // The OutputResChar [output_res_char, orc] num capability is horizontal resolution in units per line. OutputResChar // The OutputResLine [output_res_line, orl] num capability is vertical resolution in units per line. OutputResLine // The OutputResHorzInch [output_res_horz_inch, orhi] num capability is horizontal resolution in units per inch. OutputResHorzInch // The OutputResVertInch [output_res_vert_inch, orvi] num capability is vertical resolution in units per inch. OutputResVertInch // The PrintRate [print_rate, cps] num capability is print rate in characters per second. PrintRate // The WideCharSize [wide_char_size, widcs] num capability is character step size when in double wide mode. WideCharSize // The Buttons [buttons, btns] num capability is number of buttons on mouse. Buttons // The BitImageEntwining [bit_image_entwining, bitwin] num capability is number of passes for each bit-image row. BitImageEntwining // The BitImageType [bit_image_type, bitype] num capability is type of bit-image device. BitImageType // The MagicCookieGlitchUl [magic_cookie_glitch_ul, OTug] num capability is number of blanks left by ul. MagicCookieGlitchUl // The CarriageReturnDelay [carriage_return_delay, OTdC] num capability is pad needed for CR. CarriageReturnDelay // The NewLineDelay [new_line_delay, OTdN] num capability is pad needed for LF. NewLineDelay // The BackspaceDelay [backspace_delay, OTdB] num capability is padding required for ^H. BackspaceDelay // The HorizontalTabDelay [horizontal_tab_delay, OTdT] num capability is padding required for ^I. HorizontalTabDelay // The NumberOfFunctionKeys [number_of_function_keys, OTkn] num capability is count of function keys. NumberOfFunctionKeys ) // String capabilities. const ( // The BackTab [back_tab, cbt] string capability is the back tab (P). BackTab = iota // The Bell [bell, bel] string capability is the audible signal (bell) (P). Bell // The CarriageReturn [carriage_return, cr] string capability is the carriage return (P*) (P*). CarriageReturn // The ChangeScrollRegion [change_scroll_region, csr] string capability is the change region to line #1 to line #2 (P). ChangeScrollRegion // The ClearAllTabs [clear_all_tabs, tbc] string capability is the clear all tab stops (P). ClearAllTabs // The ClearScreen [clear_screen, clear] string capability is the clear screen and home cursor (P*). ClearScreen // The ClrEol [clr_eol, el] string capability is the clear to end of line (P). ClrEol // The ClrEos [clr_eos, ed] string capability is the clear to end of screen (P*). ClrEos // The ColumnAddress [column_address, hpa] string capability is the horizontal position #1, absolute (P). ColumnAddress // The CommandCharacter [command_character, cmdch] string capability is the terminal settable cmd character in prototype !?. CommandCharacter // The CursorAddress [cursor_address, cup] string capability is the move to row #1 columns #2. CursorAddress // The CursorDown [cursor_down, cud1] string capability is the down one line. CursorDown // The CursorHome [cursor_home, home] string capability is the home cursor (if no cup). CursorHome // The CursorInvisible [cursor_invisible, civis] string capability is the make cursor invisible. CursorInvisible // The CursorLeft [cursor_left, cub1] string capability is the move left one space. CursorLeft // The CursorMemAddress [cursor_mem_address, mrcup] string capability is the memory relative cursor addressing, move to row #1 columns #2. CursorMemAddress // The CursorNormal [cursor_normal, cnorm] string capability is the make cursor appear normal (undo civis/cvvis). CursorNormal // The CursorRight [cursor_right, cuf1] string capability is the non-destructive space (move right one space). CursorRight // The CursorToLl [cursor_to_ll, ll] string capability is the last line, first column (if no cup). CursorToLl // The CursorUp [cursor_up, cuu1] string capability is the up one line. CursorUp // The CursorVisible [cursor_visible, cvvis] string capability is the make cursor very visible. CursorVisible // The DeleteCharacter [delete_character, dch1] string capability is the delete character (P*). DeleteCharacter // The DeleteLine [delete_line, dl1] string capability is the delete line (P*). DeleteLine // The DisStatusLine [dis_status_line, dsl] string capability is the disable status line. DisStatusLine // The DownHalfLine [down_half_line, hd] string capability is the half a line down. DownHalfLine // The EnterAltCharsetMode [enter_alt_charset_mode, smacs] string capability is the start alternate character set (P). EnterAltCharsetMode // The EnterBlinkMode [enter_blink_mode, blink] string capability is the turn on blinking. EnterBlinkMode // The EnterBoldMode [enter_bold_mode, bold] string capability is the turn on bold (extra bright) mode. EnterBoldMode // The EnterCaMode [enter_ca_mode, smcup] string capability is the string to start programs using cup. EnterCaMode // The EnterDeleteMode [enter_delete_mode, smdc] string capability is the enter delete mode. EnterDeleteMode // The EnterDimMode [enter_dim_mode, dim] string capability is the turn on half-bright mode. EnterDimMode // The EnterInsertMode [enter_insert_mode, smir] string capability is the enter insert mode. EnterInsertMode // The EnterSecureMode [enter_secure_mode, invis] string capability is the turn on blank mode (characters invisible). EnterSecureMode // The EnterProtectedMode [enter_protected_mode, prot] string capability is the turn on protected mode. EnterProtectedMode // The EnterReverseMode [enter_reverse_mode, rev] string capability is the turn on reverse video mode. EnterReverseMode // The EnterStandoutMode [enter_standout_mode, smso] string capability is the begin standout mode. EnterStandoutMode // The EnterUnderlineMode [enter_underline_mode, smul] string capability is the begin underline mode. EnterUnderlineMode // The EraseChars [erase_chars, ech] string capability is the erase #1 characters (P). EraseChars // The ExitAltCharsetMode [exit_alt_charset_mode, rmacs] string capability is the end alternate character set (P). ExitAltCharsetMode // The ExitAttributeMode [exit_attribute_mode, sgr0] string capability is the turn off all attributes. ExitAttributeMode // The ExitCaMode [exit_ca_mode, rmcup] string capability is the strings to end programs using cup. ExitCaMode // The ExitDeleteMode [exit_delete_mode, rmdc] string capability is the end delete mode. ExitDeleteMode // The ExitInsertMode [exit_insert_mode, rmir] string capability is the exit insert mode. ExitInsertMode // The ExitStandoutMode [exit_standout_mode, rmso] string capability is the exit standout mode. ExitStandoutMode // The ExitUnderlineMode [exit_underline_mode, rmul] string capability is the exit underline mode. ExitUnderlineMode // The FlashScreen [flash_screen, flash] string capability is the visible bell (may not move cursor). FlashScreen // The FormFeed [form_feed, ff] string capability is the hardcopy terminal page eject (P*). FormFeed // The FromStatusLine [from_status_line, fsl] string capability is the return from status line. FromStatusLine // The Init1string [init_1string, is1] string capability is the initialization string. Init1string // The Init2string [init_2string, is2] string capability is the initialization string. Init2string // The Init3string [init_3string, is3] string capability is the initialization string. Init3string // The InitFile [init_file, if] string capability is the name of initialization file. InitFile // The InsertCharacter [insert_character, ich1] string capability is the insert character (P). InsertCharacter // The InsertLine [insert_line, il1] string capability is the insert line (P*). InsertLine // The InsertPadding [insert_padding, ip] string capability is the insert padding after inserted character. InsertPadding // The KeyBackspace [key_backspace, kbs] string capability is the backspace key. KeyBackspace // The KeyCatab [key_catab, ktbc] string capability is the clear-all-tabs key. KeyCatab // The KeyClear [key_clear, kclr] string capability is the clear-screen or erase key. KeyClear // The KeyCtab [key_ctab, kctab] string capability is the clear-tab key. KeyCtab // The KeyDc [key_dc, kdch1] string capability is the delete-character key. KeyDc // The KeyDl [key_dl, kdl1] string capability is the delete-line key. KeyDl // The KeyDown [key_down, kcud1] string capability is the down-arrow key. KeyDown // The KeyEic [key_eic, krmir] string capability is the sent by rmir or smir in insert mode. KeyEic // The KeyEol [key_eol, kel] string capability is the clear-to-end-of-line key. KeyEol // The KeyEos [key_eos, ked] string capability is the clear-to-end-of-screen key. KeyEos // The KeyF0 [key_f0, kf0] string capability is the F0 function key. KeyF0 // The KeyF1 [key_f1, kf1] string capability is the F1 function key. KeyF1 // The KeyF10 [key_f10, kf10] string capability is the F10 function key. KeyF10 // The KeyF2 [key_f2, kf2] string capability is the F2 function key. KeyF2 // The KeyF3 [key_f3, kf3] string capability is the F3 function key. KeyF3 // The KeyF4 [key_f4, kf4] string capability is the F4 function key. KeyF4 // The KeyF5 [key_f5, kf5] string capability is the F5 function key. KeyF5 // The KeyF6 [key_f6, kf6] string capability is the F6 function key. KeyF6 // The KeyF7 [key_f7, kf7] string capability is the F7 function key. KeyF7 // The KeyF8 [key_f8, kf8] string capability is the F8 function key. KeyF8 // The KeyF9 [key_f9, kf9] string capability is the F9 function key. KeyF9 // The KeyHome [key_home, khome] string capability is the home key. KeyHome // The KeyIc [key_ic, kich1] string capability is the insert-character key. KeyIc // The KeyIl [key_il, kil1] string capability is the insert-line key. KeyIl // The KeyLeft [key_left, kcub1] string capability is the left-arrow key. KeyLeft // The KeyLl [key_ll, kll] string capability is the lower-left key (home down). KeyLl // The KeyNpage [key_npage, knp] string capability is the next-page key. KeyNpage // The KeyPpage [key_ppage, kpp] string capability is the previous-page key. KeyPpage // The KeyRight [key_right, kcuf1] string capability is the right-arrow key. KeyRight // The KeySf [key_sf, kind] string capability is the scroll-forward key. KeySf // The KeySr [key_sr, kri] string capability is the scroll-backward key. KeySr // The KeyStab [key_stab, khts] string capability is the set-tab key. KeyStab // The KeyUp [key_up, kcuu1] string capability is the up-arrow key. KeyUp // The KeypadLocal [keypad_local, rmkx] string capability is the leave 'keyboard_transmit' mode. KeypadLocal // The KeypadXmit [keypad_xmit, smkx] string capability is the enter 'keyboard_transmit' mode. KeypadXmit // The LabF0 [lab_f0, lf0] string capability is the label on function key f0 if not f0. LabF0 // The LabF1 [lab_f1, lf1] string capability is the label on function key f1 if not f1. LabF1 // The LabF10 [lab_f10, lf10] string capability is the label on function key f10 if not f10. LabF10 // The LabF2 [lab_f2, lf2] string capability is the label on function key f2 if not f2. LabF2 // The LabF3 [lab_f3, lf3] string capability is the label on function key f3 if not f3. LabF3 // The LabF4 [lab_f4, lf4] string capability is the label on function key f4 if not f4. LabF4 // The LabF5 [lab_f5, lf5] string capability is the label on function key f5 if not f5. LabF5 // The LabF6 [lab_f6, lf6] string capability is the label on function key f6 if not f6. LabF6 // The LabF7 [lab_f7, lf7] string capability is the label on function key f7 if not f7. LabF7 // The LabF8 [lab_f8, lf8] string capability is the label on function key f8 if not f8. LabF8 // The LabF9 [lab_f9, lf9] string capability is the label on function key f9 if not f9. LabF9 // The MetaOff [meta_off, rmm] string capability is the turn off meta mode. MetaOff // The MetaOn [meta_on, smm] string capability is the turn on meta mode (8th-bit on). MetaOn // The Newline [newline, nel] string capability is the newline (behave like cr followed by lf). Newline // The PadChar [pad_char, pad] string capability is the padding char (instead of null). PadChar // The ParmDch [parm_dch, dch] string capability is the delete #1 characters (P*). ParmDch // The ParmDeleteLine [parm_delete_line, dl] string capability is the delete #1 lines (P*). ParmDeleteLine // The ParmDownCursor [parm_down_cursor, cud] string capability is the down #1 lines (P*). ParmDownCursor // The ParmIch [parm_ich, ich] string capability is the insert #1 characters (P*). ParmIch // The ParmIndex [parm_index, indn] string capability is the scroll forward #1 lines (P). ParmIndex // The ParmInsertLine [parm_insert_line, il] string capability is the insert #1 lines (P*). ParmInsertLine // The ParmLeftCursor [parm_left_cursor, cub] string capability is the move #1 characters to the left (P). ParmLeftCursor // The ParmRightCursor [parm_right_cursor, cuf] string capability is the move #1 characters to the right (P*). ParmRightCursor // The ParmRindex [parm_rindex, rin] string capability is the scroll back #1 lines (P). ParmRindex // The ParmUpCursor [parm_up_cursor, cuu] string capability is the up #1 lines (P*). ParmUpCursor // The PkeyKey [pkey_key, pfkey] string capability is the program function key #1 to type string #2. PkeyKey // The PkeyLocal [pkey_local, pfloc] string capability is the program function key #1 to execute string #2. PkeyLocal // The PkeyXmit [pkey_xmit, pfx] string capability is the program function key #1 to transmit string #2. PkeyXmit // The PrintScreen [print_screen, mc0] string capability is the print contents of screen. PrintScreen // The PrtrOff [prtr_off, mc4] string capability is the turn off printer. PrtrOff // The PrtrOn [prtr_on, mc5] string capability is the turn on printer. PrtrOn // The RepeatChar [repeat_char, rep] string capability is the repeat char #1 #2 times (P*). RepeatChar // The Reset1string [reset_1string, rs1] string capability is the reset string. Reset1string // The Reset2string [reset_2string, rs2] string capability is the reset string. Reset2string // The Reset3string [reset_3string, rs3] string capability is the reset string. Reset3string // The ResetFile [reset_file, rf] string capability is the name of reset file. ResetFile // The RestoreCursor [restore_cursor, rc] string capability is the restore cursor to position of last save_cursor. RestoreCursor // The RowAddress [row_address, vpa] string capability is the vertical position #1 absolute (P). RowAddress // The SaveCursor [save_cursor, sc] string capability is the save current cursor position (P). SaveCursor // The ScrollForward [scroll_forward, ind] string capability is the scroll text up (P). ScrollForward // The ScrollReverse [scroll_reverse, ri] string capability is the scroll text down (P). ScrollReverse // The SetAttributes [set_attributes, sgr] string capability is the define video attributes #1-#9 (PG9). SetAttributes // The SetTab [set_tab, hts] string capability is the set a tab in every row, current columns. SetTab // The SetWindow [set_window, wind] string capability is the current window is lines #1-#2 cols #3-#4. SetWindow // The Tab [tab, ht] string capability is the tab to next 8-space hardware tab stop. Tab // The ToStatusLine [to_status_line, tsl] string capability is the move to status line, column #1. ToStatusLine // The UnderlineChar [underline_char, uc] string capability is the underline char and move past it. UnderlineChar // The UpHalfLine [up_half_line, hu] string capability is the half a line up. UpHalfLine // The InitProg [init_prog, iprog] string capability is the path name of program for initialization. InitProg // The KeyA1 [key_a1, ka1] string capability is the upper left of keypad. KeyA1 // The KeyA3 [key_a3, ka3] string capability is the upper right of keypad. KeyA3 // The KeyB2 [key_b2, kb2] string capability is the center of keypad. KeyB2 // The KeyC1 [key_c1, kc1] string capability is the lower left of keypad. KeyC1 // The KeyC3 [key_c3, kc3] string capability is the lower right of keypad. KeyC3 // The PrtrNon [prtr_non, mc5p] string capability is the turn on printer for #1 bytes. PrtrNon // The CharPadding [char_padding, rmp] string capability is the like ip but when in insert mode. CharPadding // The AcsChars [acs_chars, acsc] string capability is the graphics charset pairs, based on vt100. AcsChars // The PlabNorm [plab_norm, pln] string capability is the program label #1 to show string #2. PlabNorm // The KeyBtab [key_btab, kcbt] string capability is the back-tab key. KeyBtab // The EnterXonMode [enter_xon_mode, smxon] string capability is the turn on xon/xoff handshaking. EnterXonMode // The ExitXonMode [exit_xon_mode, rmxon] string capability is the turn off xon/xoff handshaking. ExitXonMode // The EnterAmMode [enter_am_mode, smam] string capability is the turn on automatic margins. EnterAmMode // The ExitAmMode [exit_am_mode, rmam] string capability is the turn off automatic margins. ExitAmMode // The XonCharacter [xon_character, xonc] string capability is the XON character. XonCharacter // The XoffCharacter [xoff_character, xoffc] string capability is the XOFF character. XoffCharacter // The EnaAcs [ena_acs, enacs] string capability is the enable alternate char set. EnaAcs // The LabelOn [label_on, smln] string capability is the turn on soft labels. LabelOn // The LabelOff [label_off, rmln] string capability is the turn off soft labels. LabelOff // The KeyBeg [key_beg, kbeg] string capability is the begin key. KeyBeg // The KeyCancel [key_cancel, kcan] string capability is the cancel key. KeyCancel // The KeyClose [key_close, kclo] string capability is the close key. KeyClose // The KeyCommand [key_command, kcmd] string capability is the command key. KeyCommand // The KeyCopy [key_copy, kcpy] string capability is the copy key. KeyCopy // The KeyCreate [key_create, kcrt] string capability is the create key. KeyCreate // The KeyEnd [key_end, kend] string capability is the end key. KeyEnd // The KeyEnter [key_enter, kent] string capability is the enter/send key. KeyEnter // The KeyExit [key_exit, kext] string capability is the exit key. KeyExit // The KeyFind [key_find, kfnd] string capability is the find key. KeyFind // The KeyHelp [key_help, khlp] string capability is the help key. KeyHelp // The KeyMark [key_mark, kmrk] string capability is the mark key. KeyMark // The KeyMessage [key_message, kmsg] string capability is the message key. KeyMessage // The KeyMove [key_move, kmov] string capability is the move key. KeyMove // The KeyNext [key_next, knxt] string capability is the next key. KeyNext // The KeyOpen [key_open, kopn] string capability is the open key. KeyOpen // The KeyOptions [key_options, kopt] string capability is the options key. KeyOptions // The KeyPrevious [key_previous, kprv] string capability is the previous key. KeyPrevious // The KeyPrint [key_print, kprt] string capability is the print key. KeyPrint // The KeyRedo [key_redo, krdo] string capability is the redo key. KeyRedo // The KeyReference [key_reference, kref] string capability is the reference key. KeyReference // The KeyRefresh [key_refresh, krfr] string capability is the refresh key. KeyRefresh // The KeyReplace [key_replace, krpl] string capability is the replace key. KeyReplace // The KeyRestart [key_restart, krst] string capability is the restart key. KeyRestart // The KeyResume [key_resume, kres] string capability is the resume key. KeyResume // The KeySave [key_save, ksav] string capability is the save key. KeySave // The KeySuspend [key_suspend, kspd] string capability is the suspend key. KeySuspend // The KeyUndo [key_undo, kund] string capability is the undo key. KeyUndo // The KeySbeg [key_sbeg, kBEG] string capability is the shifted begin key. KeySbeg // The KeyScancel [key_scancel, kCAN] string capability is the shifted cancel key. KeyScancel // The KeyScommand [key_scommand, kCMD] string capability is the shifted command key. KeyScommand // The KeyScopy [key_scopy, kCPY] string capability is the shifted copy key. KeyScopy // The KeyScreate [key_screate, kCRT] string capability is the shifted create key. KeyScreate // The KeySdc [key_sdc, kDC] string capability is the shifted delete-character key. KeySdc // The KeySdl [key_sdl, kDL] string capability is the shifted delete-line key. KeySdl // The KeySelect [key_select, kslt] string capability is the select key. KeySelect // The KeySend [key_send, kEND] string capability is the shifted end key. KeySend // The KeySeol [key_seol, kEOL] string capability is the shifted clear-to-end-of-line key. KeySeol // The KeySexit [key_sexit, kEXT] string capability is the shifted exit key. KeySexit // The KeySfind [key_sfind, kFND] string capability is the shifted find key. KeySfind // The KeyShelp [key_shelp, kHLP] string capability is the shifted help key. KeyShelp // The KeyShome [key_shome, kHOM] string capability is the shifted home key. KeyShome // The KeySic [key_sic, kIC] string capability is the shifted insert-character key. KeySic // The KeySleft [key_sleft, kLFT] string capability is the shifted left-arrow key. KeySleft // The KeySmessage [key_smessage, kMSG] string capability is the shifted message key. KeySmessage // The KeySmove [key_smove, kMOV] string capability is the shifted move key. KeySmove // The KeySnext [key_snext, kNXT] string capability is the shifted next key. KeySnext // The KeySoptions [key_soptions, kOPT] string capability is the shifted options key. KeySoptions // The KeySprevious [key_sprevious, kPRV] string capability is the shifted previous key. KeySprevious // The KeySprint [key_sprint, kPRT] string capability is the shifted print key. KeySprint // The KeySredo [key_sredo, kRDO] string capability is the shifted redo key. KeySredo // The KeySreplace [key_sreplace, kRPL] string capability is the shifted replace key. KeySreplace // The KeySright [key_sright, kRIT] string capability is the shifted right-arrow key. KeySright // The KeySrsume [key_srsume, kRES] string capability is the shifted resume key. KeySrsume // The KeySsave [key_ssave, kSAV] string capability is the shifted save key. KeySsave // The KeySsuspend [key_ssuspend, kSPD] string capability is the shifted suspend key. KeySsuspend // The KeySundo [key_sundo, kUND] string capability is the shifted undo key. KeySundo // The ReqForInput [req_for_input, rfi] string capability is the send next input char (for ptys). ReqForInput // The KeyF11 [key_f11, kf11] string capability is the F11 function key. KeyF11 // The KeyF12 [key_f12, kf12] string capability is the F12 function key. KeyF12 // The KeyF13 [key_f13, kf13] string capability is the F13 function key. KeyF13 // The KeyF14 [key_f14, kf14] string capability is the F14 function key. KeyF14 // The KeyF15 [key_f15, kf15] string capability is the F15 function key. KeyF15 // The KeyF16 [key_f16, kf16] string capability is the F16 function key. KeyF16 // The KeyF17 [key_f17, kf17] string capability is the F17 function key. KeyF17 // The KeyF18 [key_f18, kf18] string capability is the F18 function key. KeyF18 // The KeyF19 [key_f19, kf19] string capability is the F19 function key. KeyF19 // The KeyF20 [key_f20, kf20] string capability is the F20 function key. KeyF20 // The KeyF21 [key_f21, kf21] string capability is the F21 function key. KeyF21 // The KeyF22 [key_f22, kf22] string capability is the F22 function key. KeyF22 // The KeyF23 [key_f23, kf23] string capability is the F23 function key. KeyF23 // The KeyF24 [key_f24, kf24] string capability is the F24 function key. KeyF24 // The KeyF25 [key_f25, kf25] string capability is the F25 function key. KeyF25 // The KeyF26 [key_f26, kf26] string capability is the F26 function key. KeyF26 // The KeyF27 [key_f27, kf27] string capability is the F27 function key. KeyF27 // The KeyF28 [key_f28, kf28] string capability is the F28 function key. KeyF28 // The KeyF29 [key_f29, kf29] string capability is the F29 function key. KeyF29 // The KeyF30 [key_f30, kf30] string capability is the F30 function key. KeyF30 // The KeyF31 [key_f31, kf31] string capability is the F31 function key. KeyF31 // The KeyF32 [key_f32, kf32] string capability is the F32 function key. KeyF32 // The KeyF33 [key_f33, kf33] string capability is the F33 function key. KeyF33 // The KeyF34 [key_f34, kf34] string capability is the F34 function key. KeyF34 // The KeyF35 [key_f35, kf35] string capability is the F35 function key. KeyF35 // The KeyF36 [key_f36, kf36] string capability is the F36 function key. KeyF36 // The KeyF37 [key_f37, kf37] string capability is the F37 function key. KeyF37 // The KeyF38 [key_f38, kf38] string capability is the F38 function key. KeyF38 // The KeyF39 [key_f39, kf39] string capability is the F39 function key. KeyF39 // The KeyF40 [key_f40, kf40] string capability is the F40 function key. KeyF40 // The KeyF41 [key_f41, kf41] string capability is the F41 function key. KeyF41 // The KeyF42 [key_f42, kf42] string capability is the F42 function key. KeyF42 // The KeyF43 [key_f43, kf43] string capability is the F43 function key. KeyF43 // The KeyF44 [key_f44, kf44] string capability is the F44 function key. KeyF44 // The KeyF45 [key_f45, kf45] string capability is the F45 function key. KeyF45 // The KeyF46 [key_f46, kf46] string capability is the F46 function key. KeyF46 // The KeyF47 [key_f47, kf47] string capability is the F47 function key. KeyF47 // The KeyF48 [key_f48, kf48] string capability is the F48 function key. KeyF48 // The KeyF49 [key_f49, kf49] string capability is the F49 function key. KeyF49 // The KeyF50 [key_f50, kf50] string capability is the F50 function key. KeyF50 // The KeyF51 [key_f51, kf51] string capability is the F51 function key. KeyF51 // The KeyF52 [key_f52, kf52] string capability is the F52 function key. KeyF52 // The KeyF53 [key_f53, kf53] string capability is the F53 function key. KeyF53 // The KeyF54 [key_f54, kf54] string capability is the F54 function key. KeyF54 // The KeyF55 [key_f55, kf55] string capability is the F55 function key. KeyF55 // The KeyF56 [key_f56, kf56] string capability is the F56 function key. KeyF56 // The KeyF57 [key_f57, kf57] string capability is the F57 function key. KeyF57 // The KeyF58 [key_f58, kf58] string capability is the F58 function key. KeyF58 // The KeyF59 [key_f59, kf59] string capability is the F59 function key. KeyF59 // The KeyF60 [key_f60, kf60] string capability is the F60 function key. KeyF60 // The KeyF61 [key_f61, kf61] string capability is the F61 function key. KeyF61 // The KeyF62 [key_f62, kf62] string capability is the F62 function key. KeyF62 // The KeyF63 [key_f63, kf63] string capability is the F63 function key. KeyF63 // The ClrBol [clr_bol, el1] string capability is the Clear to beginning of line. ClrBol // The ClearMargins [clear_margins, mgc] string capability is the clear right and left soft margins. ClearMargins // The SetLeftMargin [set_left_margin, smgl] string capability is the set left soft margin at current column. See smgl. (ML is not in BSD termcap). SetLeftMargin // The SetRightMargin [set_right_margin, smgr] string capability is the set right soft margin at current column. SetRightMargin // The LabelFormat [label_format, fln] string capability is the label format. LabelFormat // The SetClock [set_clock, sclk] string capability is the set clock, #1 hrs #2 mins #3 secs. SetClock // The DisplayClock [display_clock, dclk] string capability is the display clock. DisplayClock // The RemoveClock [remove_clock, rmclk] string capability is the remove clock. RemoveClock // The CreateWindow [create_window, cwin] string capability is the define a window #1 from #2,#3 to #4,#5. CreateWindow // The GotoWindow [goto_window, wingo] string capability is the go to window #1. GotoWindow // The Hangup [hangup, hup] string capability is the hang-up phone. Hangup // The DialPhone [dial_phone, dial] string capability is the dial number #1. DialPhone // The QuickDial [quick_dial, qdial] string capability is the dial number #1 without checking. QuickDial // The Tone [tone, tone] string capability is the select touch tone dialing. Tone // The Pulse [pulse, pulse] string capability is the select pulse dialing. Pulse // The FlashHook [flash_hook, hook] string capability is the flash switch hook. FlashHook // The FixedPause [fixed_pause, pause] string capability is the pause for 2-3 seconds. FixedPause // The WaitTone [wait_tone, wait] string capability is the wait for dial-tone. WaitTone // The User0 [user0, u0] string capability is the User string #0. User0 // The User1 [user1, u1] string capability is the User string #1. User1 // The User2 [user2, u2] string capability is the User string #2. User2 // The User3 [user3, u3] string capability is the User string #3. User3 // The User4 [user4, u4] string capability is the User string #4. User4 // The User5 [user5, u5] string capability is the User string #5. User5 // The User6 [user6, u6] string capability is the User string #6. User6 // The User7 [user7, u7] string capability is the User string #7. User7 // The User8 [user8, u8] string capability is the User string #8. User8 // The User9 [user9, u9] string capability is the User string #9. User9 // The OrigPair [orig_pair, op] string capability is the Set default pair to its original value. OrigPair // The OrigColors [orig_colors, oc] string capability is the Set all color pairs to the original ones. OrigColors // The InitializeColor [initialize_color, initc] string capability is the initialize color #1 to (#2,#3,#4). InitializeColor // The InitializePair [initialize_pair, initp] string capability is the Initialize color pair #1 to fg=(#2,#3,#4), bg=(#5,#6,#7). InitializePair // The SetColorPair [set_color_pair, scp] string capability is the Set current color pair to #1. SetColorPair // The SetForeground [set_foreground, setf] string capability is the Set foreground color #1. SetForeground // The SetBackground [set_background, setb] string capability is the Set background color #1. SetBackground // The ChangeCharPitch [change_char_pitch, cpi] string capability is the Change number of characters per inch to #1. ChangeCharPitch // The ChangeLinePitch [change_line_pitch, lpi] string capability is the Change number of lines per inch to #1. ChangeLinePitch // The ChangeResHorz [change_res_horz, chr] string capability is the Change horizontal resolution to #1. ChangeResHorz // The ChangeResVert [change_res_vert, cvr] string capability is the Change vertical resolution to #1. ChangeResVert // The DefineChar [define_char, defc] string capability is the Define a character #1, #2 dots wide, descender #3. DefineChar // The EnterDoublewideMode [enter_doublewide_mode, swidm] string capability is the Enter double-wide mode. EnterDoublewideMode // The EnterDraftQuality [enter_draft_quality, sdrfq] string capability is the Enter draft-quality mode. EnterDraftQuality // The EnterItalicsMode [enter_italics_mode, sitm] string capability is the Enter italic mode. EnterItalicsMode // The EnterLeftwardMode [enter_leftward_mode, slm] string capability is the Start leftward carriage motion. EnterLeftwardMode // The EnterMicroMode [enter_micro_mode, smicm] string capability is the Start micro-motion mode. EnterMicroMode // The EnterNearLetterQuality [enter_near_letter_quality, snlq] string capability is the Enter NLQ mode. EnterNearLetterQuality // The EnterNormalQuality [enter_normal_quality, snrmq] string capability is the Enter normal-quality mode. EnterNormalQuality // The EnterShadowMode [enter_shadow_mode, sshm] string capability is the Enter shadow-print mode. EnterShadowMode // The EnterSubscriptMode [enter_subscript_mode, ssubm] string capability is the Enter subscript mode. EnterSubscriptMode // The EnterSuperscriptMode [enter_superscript_mode, ssupm] string capability is the Enter superscript mode. EnterSuperscriptMode // The EnterUpwardMode [enter_upward_mode, sum] string capability is the Start upward carriage motion. EnterUpwardMode // The ExitDoublewideMode [exit_doublewide_mode, rwidm] string capability is the End double-wide mode. ExitDoublewideMode // The ExitItalicsMode [exit_italics_mode, ritm] string capability is the End italic mode. ExitItalicsMode // The ExitLeftwardMode [exit_leftward_mode, rlm] string capability is the End left-motion mode. ExitLeftwardMode // The ExitMicroMode [exit_micro_mode, rmicm] string capability is the End micro-motion mode. ExitMicroMode // The ExitShadowMode [exit_shadow_mode, rshm] string capability is the End shadow-print mode. ExitShadowMode // The ExitSubscriptMode [exit_subscript_mode, rsubm] string capability is the End subscript mode. ExitSubscriptMode // The ExitSuperscriptMode [exit_superscript_mode, rsupm] string capability is the End superscript mode. ExitSuperscriptMode // The ExitUpwardMode [exit_upward_mode, rum] string capability is the End reverse character motion. ExitUpwardMode // The MicroColumnAddress [micro_column_address, mhpa] string capability is the Like column_address in micro mode. MicroColumnAddress // The MicroDown [micro_down, mcud1] string capability is the Like cursor_down in micro mode. MicroDown // The MicroLeft [micro_left, mcub1] string capability is the Like cursor_left in micro mode. MicroLeft // The MicroRight [micro_right, mcuf1] string capability is the Like cursor_right in micro mode. MicroRight // The MicroRowAddress [micro_row_address, mvpa] string capability is the Like row_address #1 in micro mode. MicroRowAddress // The MicroUp [micro_up, mcuu1] string capability is the Like cursor_up in micro mode. MicroUp // The OrderOfPins [order_of_pins, porder] string capability is the Match software bits to print-head pins. OrderOfPins // The ParmDownMicro [parm_down_micro, mcud] string capability is the Like parm_down_cursor in micro mode. ParmDownMicro // The ParmLeftMicro [parm_left_micro, mcub] string capability is the Like parm_left_cursor in micro mode. ParmLeftMicro // The ParmRightMicro [parm_right_micro, mcuf] string capability is the Like parm_right_cursor in micro mode. ParmRightMicro // The ParmUpMicro [parm_up_micro, mcuu] string capability is the Like parm_up_cursor in micro mode. ParmUpMicro // The SelectCharSet [select_char_set, scs] string capability is the Select character set, #1. SelectCharSet // The SetBottomMargin [set_bottom_margin, smgb] string capability is the Set bottom margin at current line. SetBottomMargin // The SetBottomMarginParm [set_bottom_margin_parm, smgbp] string capability is the Set bottom margin at line #1 or (if smgtp is not given) #2 lines from bottom. SetBottomMarginParm // The SetLeftMarginParm [set_left_margin_parm, smglp] string capability is the Set left (right) margin at column #1. SetLeftMarginParm // The SetRightMarginParm [set_right_margin_parm, smgrp] string capability is the Set right margin at column #1. SetRightMarginParm // The SetTopMargin [set_top_margin, smgt] string capability is the Set top margin at current line. SetTopMargin // The SetTopMarginParm [set_top_margin_parm, smgtp] string capability is the Set top (bottom) margin at row #1. SetTopMarginParm // The StartBitImage [start_bit_image, sbim] string capability is the Start printing bit image graphics. StartBitImage // The StartCharSetDef [start_char_set_def, scsd] string capability is the Start character set definition #1, with #2 characters in the set. StartCharSetDef // The StopBitImage [stop_bit_image, rbim] string capability is the Stop printing bit image graphics. StopBitImage // The StopCharSetDef [stop_char_set_def, rcsd] string capability is the End definition of character set #1. StopCharSetDef // The SubscriptCharacters [subscript_characters, subcs] string capability is the List of subscriptable characters. SubscriptCharacters // The SuperscriptCharacters [superscript_characters, supcs] string capability is the List of superscriptable characters. SuperscriptCharacters // The TheseCauseCr [these_cause_cr, docr] string capability is the Printing any of these characters causes CR. TheseCauseCr // The ZeroMotion [zero_motion, zerom] string capability is the No motion for subsequent character. ZeroMotion // The CharSetNames [char_set_names, csnm] string capability is the Produce #1'th item from list of character set names. CharSetNames // The KeyMouse [key_mouse, kmous] string capability is the Mouse event has occurred. KeyMouse // The MouseInfo [mouse_info, minfo] string capability is the Mouse status information. MouseInfo // The ReqMousePos [req_mouse_pos, reqmp] string capability is the Request mouse position. ReqMousePos // The GetMouse [get_mouse, getm] string capability is the Curses should get button events, parameter #1 not documented. GetMouse // The SetAForeground [set_a_foreground, setaf] string capability is the Set foreground color to #1, using ANSI escape. SetAForeground // The SetABackground [set_a_background, setab] string capability is the Set background color to #1, using ANSI escape. SetABackground // The PkeyPlab [pkey_plab, pfxl] string capability is the Program function key #1 to type string #2 and show string #3. PkeyPlab // The DeviceType [device_type, devt] string capability is the Indicate language/codeset support. DeviceType // The CodeSetInit [code_set_init, csin] string capability is the Init sequence for multiple codesets. CodeSetInit // The Set0DesSeq [set0_des_seq, s0ds] string capability is the Shift to codeset 0 (EUC set 0, ASCII). Set0DesSeq // The Set1DesSeq [set1_des_seq, s1ds] string capability is the Shift to codeset 1. Set1DesSeq // The Set2DesSeq [set2_des_seq, s2ds] string capability is the Shift to codeset 2. Set2DesSeq // The Set3DesSeq [set3_des_seq, s3ds] string capability is the Shift to codeset 3. Set3DesSeq // The SetLrMargin [set_lr_margin, smglr] string capability is the Set both left and right margins to #1, #2. (ML is not in BSD termcap). SetLrMargin // The SetTbMargin [set_tb_margin, smgtb] string capability is the Sets both top and bottom margins to #1, #2. SetTbMargin // The BitImageRepeat [bit_image_repeat, birep] string capability is the Repeat bit image cell #1 #2 times. BitImageRepeat // The BitImageNewline [bit_image_newline, binel] string capability is the Move to next row of the bit image. BitImageNewline // The BitImageCarriageReturn [bit_image_carriage_return, bicr] string capability is the Move to beginning of same row. BitImageCarriageReturn // The ColorNames [color_names, colornm] string capability is the Give name for color #1. ColorNames // The DefineBitImageRegion [define_bit_image_region, defbi] string capability is the Define rectangular bit image region. DefineBitImageRegion // The EndBitImageRegion [end_bit_image_region, endbi] string capability is the End a bit-image region. EndBitImageRegion // The SetColorBand [set_color_band, setcolor] string capability is the Change to ribbon color #1. SetColorBand // The SetPageLength [set_page_length, slines] string capability is the Set page length to #1 lines. SetPageLength // The DisplayPcChar [display_pc_char, dispc] string capability is the Display PC character #1. DisplayPcChar // The EnterPcCharsetMode [enter_pc_charset_mode, smpch] string capability is the Enter PC character display mode. EnterPcCharsetMode // The ExitPcCharsetMode [exit_pc_charset_mode, rmpch] string capability is the Exit PC character display mode. ExitPcCharsetMode // The EnterScancodeMode [enter_scancode_mode, smsc] string capability is the Enter PC scancode mode. EnterScancodeMode // The ExitScancodeMode [exit_scancode_mode, rmsc] string capability is the Exit PC scancode mode. ExitScancodeMode // The PcTermOptions [pc_term_options, pctrm] string capability is the PC terminal options. PcTermOptions // The ScancodeEscape [scancode_escape, scesc] string capability is the Escape for scancode emulation. ScancodeEscape // The AltScancodeEsc [alt_scancode_esc, scesa] string capability is the Alternate escape for scancode emulation. AltScancodeEsc // The EnterHorizontalHlMode [enter_horizontal_hl_mode, ehhlm] string capability is the Enter horizontal highlight mode. EnterHorizontalHlMode // The EnterLeftHlMode [enter_left_hl_mode, elhlm] string capability is the Enter left highlight mode. EnterLeftHlMode // The EnterLowHlMode [enter_low_hl_mode, elohlm] string capability is the Enter low highlight mode. EnterLowHlMode // The EnterRightHlMode [enter_right_hl_mode, erhlm] string capability is the Enter right highlight mode. EnterRightHlMode // The EnterTopHlMode [enter_top_hl_mode, ethlm] string capability is the Enter top highlight mode. EnterTopHlMode // The EnterVerticalHlMode [enter_vertical_hl_mode, evhlm] string capability is the Enter vertical highlight mode. EnterVerticalHlMode // The SetAAttributes [set_a_attributes, sgr1] string capability is the Define second set of video attributes #1-#6. SetAAttributes // The SetPglenInch [set_pglen_inch, slength] string capability is the Set page length to #1 hundredth of an inch (some implementations use sL for termcap). SetPglenInch // The TermcapInit2 [termcap_init2, OTi2] string capability is the secondary initialization string. TermcapInit2 // The TermcapReset [termcap_reset, OTrs] string capability is the terminal reset string. TermcapReset // The LinefeedIfNotLf [linefeed_if_not_lf, OTnl] string capability is the use to move down. LinefeedIfNotLf // The BackspaceIfNotBs [backspace_if_not_bs, OTbc] string capability is the move left, if not ^H. BackspaceIfNotBs // The OtherNonFunctionKeys [other_non_function_keys, OTko] string capability is the list of self-mapped keycaps. OtherNonFunctionKeys // The ArrowKeyMap [arrow_key_map, OTma] string capability is the map motion-keys for vi version 2. ArrowKeyMap // The AcsUlcorner [acs_ulcorner, OTG2] string capability is the single upper left. AcsUlcorner // The AcsLlcorner [acs_llcorner, OTG3] string capability is the single lower left. AcsLlcorner // The AcsUrcorner [acs_urcorner, OTG1] string capability is the single upper right. AcsUrcorner // The AcsLrcorner [acs_lrcorner, OTG4] string capability is the single lower right. AcsLrcorner // The AcsLtee [acs_ltee, OTGR] string capability is the tee pointing right. AcsLtee // The AcsRtee [acs_rtee, OTGL] string capability is the tee pointing left. AcsRtee // The AcsBtee [acs_btee, OTGU] string capability is the tee pointing up. AcsBtee // The AcsTtee [acs_ttee, OTGD] string capability is the tee pointing down. AcsTtee // The AcsHline [acs_hline, OTGH] string capability is the single horizontal line. AcsHline // The AcsVline [acs_vline, OTGV] string capability is the single vertical line. AcsVline // The AcsPlus [acs_plus, OTGC] string capability is the single intersection. AcsPlus // The MemoryLock [memory_lock, meml] string capability is the lock memory above cursor. MemoryLock // The MemoryUnlock [memory_unlock, memu] string capability is the unlock memory. MemoryUnlock // The BoxChars1 [box_chars_1, box1] string capability is the box characters primary set. BoxChars1 ) const ( // CapCountBool is the count of bool capabilities. CapCountBool = ReturnDoesClrEol + 1 // CapCountNum is the count of num capabilities. CapCountNum = NumberOfFunctionKeys + 1 // CapCountString is the count of string capabilities. CapCountString = BoxChars1 + 1 ) // boolCapNames are the bool term cap names. var boolCapNames = [...]string{ "auto_left_margin", "bw", "auto_right_margin", "am", "no_esc_ctlc", "xsb", "ceol_standout_glitch", "xhp", "eat_newline_glitch", "xenl", "erase_overstrike", "eo", "generic_type", "gn", "hard_copy", "hc", "has_meta_key", "km", "has_status_line", "hs", "insert_null_glitch", "in", "memory_above", "da", "memory_below", "db", "move_insert_mode", "mir", "move_standout_mode", "msgr", "over_strike", "os", "status_line_esc_ok", "eslok", "dest_tabs_magic_smso", "xt", "tilde_glitch", "hz", "transparent_underline", "ul", "xon_xoff", "xon", "needs_xon_xoff", "nxon", "prtr_silent", "mc5i", "hard_cursor", "chts", "non_rev_rmcup", "nrrmc", "no_pad_char", "npc", "non_dest_scroll_region", "ndscr", "can_change", "ccc", "back_color_erase", "bce", "hue_lightness_saturation", "hls", "col_addr_glitch", "xhpa", "cr_cancels_micro_mode", "crxm", "has_print_wheel", "daisy", "row_addr_glitch", "xvpa", "semi_auto_right_margin", "sam", "cpi_changes_res", "cpix", "lpi_changes_res", "lpix", "backspaces_with_bs", "OTbs", "crt_no_scrolling", "OTns", "no_correctly_working_cr", "OTnc", "gnu_has_meta_key", "OTMT", "linefeed_is_newline", "OTNL", "has_hardware_tabs", "OTpt", "return_does_clr_eol", "OTxr", } // numCapNames are the num term cap names. var numCapNames = [...]string{ "columns", "cols", "init_tabs", "it", "lines", "lines", "lines_of_memory", "lm", "magic_cookie_glitch", "xmc", "padding_baud_rate", "pb", "virtual_terminal", "vt", "width_status_line", "wsl", "num_labels", "nlab", "label_height", "lh", "label_width", "lw", "max_attributes", "ma", "maximum_windows", "wnum", "max_colors", "colors", "max_pairs", "pairs", "no_color_video", "ncv", "buffer_capacity", "bufsz", "dot_vert_spacing", "spinv", "dot_horz_spacing", "spinh", "max_micro_address", "maddr", "max_micro_jump", "mjump", "micro_col_size", "mcs", "micro_line_size", "mls", "number_of_pins", "npins", "output_res_char", "orc", "output_res_line", "orl", "output_res_horz_inch", "orhi", "output_res_vert_inch", "orvi", "print_rate", "cps", "wide_char_size", "widcs", "buttons", "btns", "bit_image_entwining", "bitwin", "bit_image_type", "bitype", "magic_cookie_glitch_ul", "OTug", "carriage_return_delay", "OTdC", "new_line_delay", "OTdN", "backspace_delay", "OTdB", "horizontal_tab_delay", "OTdT", "number_of_function_keys", "OTkn", } // stringCapNames are the string term cap names. var stringCapNames = [...]string{ "back_tab", "cbt", "bell", "bel", "carriage_return", "cr", "change_scroll_region", "csr", "clear_all_tabs", "tbc", "clear_screen", "clear", "clr_eol", "el", "clr_eos", "ed", "column_address", "hpa", "command_character", "cmdch", "cursor_address", "cup", "cursor_down", "cud1", "cursor_home", "home", "cursor_invisible", "civis", "cursor_left", "cub1", "cursor_mem_address", "mrcup", "cursor_normal", "cnorm", "cursor_right", "cuf1", "cursor_to_ll", "ll", "cursor_up", "cuu1", "cursor_visible", "cvvis", "delete_character", "dch1", "delete_line", "dl1", "dis_status_line", "dsl", "down_half_line", "hd", "enter_alt_charset_mode", "smacs", "enter_blink_mode", "blink", "enter_bold_mode", "bold", "enter_ca_mode", "smcup", "enter_delete_mode", "smdc", "enter_dim_mode", "dim", "enter_insert_mode", "smir", "enter_secure_mode", "invis", "enter_protected_mode", "prot", "enter_reverse_mode", "rev", "enter_standout_mode", "smso", "enter_underline_mode", "smul", "erase_chars", "ech", "exit_alt_charset_mode", "rmacs", "exit_attribute_mode", "sgr0", "exit_ca_mode", "rmcup", "exit_delete_mode", "rmdc", "exit_insert_mode", "rmir", "exit_standout_mode", "rmso", "exit_underline_mode", "rmul", "flash_screen", "flash", "form_feed", "ff", "from_status_line", "fsl", "init_1string", "is1", "init_2string", "is2", "init_3string", "is3", "init_file", "if", "insert_character", "ich1", "insert_line", "il1", "insert_padding", "ip", "key_backspace", "kbs", "key_catab", "ktbc", "key_clear", "kclr", "key_ctab", "kctab", "key_dc", "kdch1", "key_dl", "kdl1", "key_down", "kcud1", "key_eic", "krmir", "key_eol", "kel", "key_eos", "ked", "key_f0", "kf0", "key_f1", "kf1", "key_f10", "kf10", "key_f2", "kf2", "key_f3", "kf3", "key_f4", "kf4", "key_f5", "kf5", "key_f6", "kf6", "key_f7", "kf7", "key_f8", "kf8", "key_f9", "kf9", "key_home", "khome", "key_ic", "kich1", "key_il", "kil1", "key_left", "kcub1", "key_ll", "kll", "key_npage", "knp", "key_ppage", "kpp", "key_right", "kcuf1", "key_sf", "kind", "key_sr", "kri", "key_stab", "khts", "key_up", "kcuu1", "keypad_local", "rmkx", "keypad_xmit", "smkx", "lab_f0", "lf0", "lab_f1", "lf1", "lab_f10", "lf10", "lab_f2", "lf2", "lab_f3", "lf3", "lab_f4", "lf4", "lab_f5", "lf5", "lab_f6", "lf6", "lab_f7", "lf7", "lab_f8", "lf8", "lab_f9", "lf9", "meta_off", "rmm", "meta_on", "smm", "newline", "nel", "pad_char", "pad", "parm_dch", "dch", "parm_delete_line", "dl", "parm_down_cursor", "cud", "parm_ich", "ich", "parm_index", "indn", "parm_insert_line", "il", "parm_left_cursor", "cub", "parm_right_cursor", "cuf", "parm_rindex", "rin", "parm_up_cursor", "cuu", "pkey_key", "pfkey", "pkey_local", "pfloc", "pkey_xmit", "pfx", "print_screen", "mc0", "prtr_off", "mc4", "prtr_on", "mc5", "repeat_char", "rep", "reset_1string", "rs1", "reset_2string", "rs2", "reset_3string", "rs3", "reset_file", "rf", "restore_cursor", "rc", "row_address", "vpa", "save_cursor", "sc", "scroll_forward", "ind", "scroll_reverse", "ri", "set_attributes", "sgr", "set_tab", "hts", "set_window", "wind", "tab", "ht", "to_status_line", "tsl", "underline_char", "uc", "up_half_line", "hu", "init_prog", "iprog", "key_a1", "ka1", "key_a3", "ka3", "key_b2", "kb2", "key_c1", "kc1", "key_c3", "kc3", "prtr_non", "mc5p", "char_padding", "rmp", "acs_chars", "acsc", "plab_norm", "pln", "key_btab", "kcbt", "enter_xon_mode", "smxon", "exit_xon_mode", "rmxon", "enter_am_mode", "smam", "exit_am_mode", "rmam", "xon_character", "xonc", "xoff_character", "xoffc", "ena_acs", "enacs", "label_on", "smln", "label_off", "rmln", "key_beg", "kbeg", "key_cancel", "kcan", "key_close", "kclo", "key_command", "kcmd", "key_copy", "kcpy", "key_create", "kcrt", "key_end", "kend", "key_enter", "kent", "key_exit", "kext", "key_find", "kfnd", "key_help", "khlp", "key_mark", "kmrk", "key_message", "kmsg", "key_move", "kmov", "key_next", "knxt", "key_open", "kopn", "key_options", "kopt", "key_previous", "kprv", "key_print", "kprt", "key_redo", "krdo", "key_reference", "kref", "key_refresh", "krfr", "key_replace", "krpl", "key_restart", "krst", "key_resume", "kres", "key_save", "ksav", "key_suspend", "kspd", "key_undo", "kund", "key_sbeg", "kBEG", "key_scancel", "kCAN", "key_scommand", "kCMD", "key_scopy", "kCPY", "key_screate", "kCRT", "key_sdc", "kDC", "key_sdl", "kDL", "key_select", "kslt", "key_send", "kEND", "key_seol", "kEOL", "key_sexit", "kEXT", "key_sfind", "kFND", "key_shelp", "kHLP", "key_shome", "kHOM", "key_sic", "kIC", "key_sleft", "kLFT", "key_smessage", "kMSG", "key_smove", "kMOV", "key_snext", "kNXT", "key_soptions", "kOPT", "key_sprevious", "kPRV", "key_sprint", "kPRT", "key_sredo", "kRDO", "key_sreplace", "kRPL", "key_sright", "kRIT", "key_srsume", "kRES", "key_ssave", "kSAV", "key_ssuspend", "kSPD", "key_sundo", "kUND", "req_for_input", "rfi", "key_f11", "kf11", "key_f12", "kf12", "key_f13", "kf13", "key_f14", "kf14", "key_f15", "kf15", "key_f16", "kf16", "key_f17", "kf17", "key_f18", "kf18", "key_f19", "kf19", "key_f20", "kf20", "key_f21", "kf21", "key_f22", "kf22", "key_f23", "kf23", "key_f24", "kf24", "key_f25", "kf25", "key_f26", "kf26", "key_f27", "kf27", "key_f28", "kf28", "key_f29", "kf29", "key_f30", "kf30", "key_f31", "kf31", "key_f32", "kf32", "key_f33", "kf33", "key_f34", "kf34", "key_f35", "kf35", "key_f36", "kf36", "key_f37", "kf37", "key_f38", "kf38", "key_f39", "kf39", "key_f40", "kf40", "key_f41", "kf41", "key_f42", "kf42", "key_f43", "kf43", "key_f44", "kf44", "key_f45", "kf45", "key_f46", "kf46", "key_f47", "kf47", "key_f48", "kf48", "key_f49", "kf49", "key_f50", "kf50", "key_f51", "kf51", "key_f52", "kf52", "key_f53", "kf53", "key_f54", "kf54", "key_f55", "kf55", "key_f56", "kf56", "key_f57", "kf57", "key_f58", "kf58", "key_f59", "kf59", "key_f60", "kf60", "key_f61", "kf61", "key_f62", "kf62", "key_f63", "kf63", "clr_bol", "el1", "clear_margins", "mgc", "set_left_margin", "smgl", "set_right_margin", "smgr", "label_format", "fln", "set_clock", "sclk", "display_clock", "dclk", "remove_clock", "rmclk", "create_window", "cwin", "goto_window", "wingo", "hangup", "hup", "dial_phone", "dial", "quick_dial", "qdial", "tone", "tone", "pulse", "pulse", "flash_hook", "hook", "fixed_pause", "pause", "wait_tone", "wait", "user0", "u0", "user1", "u1", "user2", "u2", "user3", "u3", "user4", "u4", "user5", "u5", "user6", "u6", "user7", "u7", "user8", "u8", "user9", "u9", "orig_pair", "op", "orig_colors", "oc", "initialize_color", "initc", "initialize_pair", "initp", "set_color_pair", "scp", "set_foreground", "setf", "set_background", "setb", "change_char_pitch", "cpi", "change_line_pitch", "lpi", "change_res_horz", "chr", "change_res_vert", "cvr", "define_char", "defc", "enter_doublewide_mode", "swidm", "enter_draft_quality", "sdrfq", "enter_italics_mode", "sitm", "enter_leftward_mode", "slm", "enter_micro_mode", "smicm", "enter_near_letter_quality", "snlq", "enter_normal_quality", "snrmq", "enter_shadow_mode", "sshm", "enter_subscript_mode", "ssubm", "enter_superscript_mode", "ssupm", "enter_upward_mode", "sum", "exit_doublewide_mode", "rwidm", "exit_italics_mode", "ritm", "exit_leftward_mode", "rlm", "exit_micro_mode", "rmicm", "exit_shadow_mode", "rshm", "exit_subscript_mode", "rsubm", "exit_superscript_mode", "rsupm", "exit_upward_mode", "rum", "micro_column_address", "mhpa", "micro_down", "mcud1", "micro_left", "mcub1", "micro_right", "mcuf1", "micro_row_address", "mvpa", "micro_up", "mcuu1", "order_of_pins", "porder", "parm_down_micro", "mcud", "parm_left_micro", "mcub", "parm_right_micro", "mcuf", "parm_up_micro", "mcuu", "select_char_set", "scs", "set_bottom_margin", "smgb", "set_bottom_margin_parm", "smgbp", "set_left_margin_parm", "smglp", "set_right_margin_parm", "smgrp", "set_top_margin", "smgt", "set_top_margin_parm", "smgtp", "start_bit_image", "sbim", "start_char_set_def", "scsd", "stop_bit_image", "rbim", "stop_char_set_def", "rcsd", "subscript_characters", "subcs", "superscript_characters", "supcs", "these_cause_cr", "docr", "zero_motion", "zerom", "char_set_names", "csnm", "key_mouse", "kmous", "mouse_info", "minfo", "req_mouse_pos", "reqmp", "get_mouse", "getm", "set_a_foreground", "setaf", "set_a_background", "setab", "pkey_plab", "pfxl", "device_type", "devt", "code_set_init", "csin", "set0_des_seq", "s0ds", "set1_des_seq", "s1ds", "set2_des_seq", "s2ds", "set3_des_seq", "s3ds", "set_lr_margin", "smglr", "set_tb_margin", "smgtb", "bit_image_repeat", "birep", "bit_image_newline", "binel", "bit_image_carriage_return", "bicr", "color_names", "colornm", "define_bit_image_region", "defbi", "end_bit_image_region", "endbi", "set_color_band", "setcolor", "set_page_length", "slines", "display_pc_char", "dispc", "enter_pc_charset_mode", "smpch", "exit_pc_charset_mode", "rmpch", "enter_scancode_mode", "smsc", "exit_scancode_mode", "rmsc", "pc_term_options", "pctrm", "scancode_escape", "scesc", "alt_scancode_esc", "scesa", "enter_horizontal_hl_mode", "ehhlm", "enter_left_hl_mode", "elhlm", "enter_low_hl_mode", "elohlm", "enter_right_hl_mode", "erhlm", "enter_top_hl_mode", "ethlm", "enter_vertical_hl_mode", "evhlm", "set_a_attributes", "sgr1", "set_pglen_inch", "slength", "termcap_init2", "OTi2", "termcap_reset", "OTrs", "linefeed_if_not_lf", "OTnl", "backspace_if_not_bs", "OTbc", "other_non_function_keys", "OTko", "arrow_key_map", "OTma", "acs_ulcorner", "OTG2", "acs_llcorner", "OTG3", "acs_urcorner", "OTG1", "acs_lrcorner", "OTG4", "acs_ltee", "OTGR", "acs_rtee", "OTGL", "acs_btee", "OTGU", "acs_ttee", "OTGD", "acs_hline", "OTGH", "acs_vline", "OTGV", "acs_plus", "OTGC", "memory_lock", "meml", "memory_unlock", "memu", "box_chars_1", "box1", } ================================================ FILE: vendor/github.com/xo/terminfo/color.go ================================================ package terminfo import ( "os" "strconv" "strings" ) // ColorLevel is the color level supported by a terminal. type ColorLevel uint // ColorLevel values. const ( ColorLevelNone ColorLevel = iota ColorLevelBasic ColorLevelHundreds ColorLevelMillions ) // String satisfies the Stringer interface. func (c ColorLevel) String() string { switch c { case ColorLevelBasic: return "basic" case ColorLevelHundreds: return "hundreds" case ColorLevelMillions: return "millions" } return "none" } // ChromaFormatterName returns the github.com/alecthomas/chroma compatible // formatter name for the color level. func (c ColorLevel) ChromaFormatterName() string { switch c { case ColorLevelBasic: return "terminal" case ColorLevelHundreds: return "terminal256" case ColorLevelMillions: return "terminal16m" } return "noop" } // ColorLevelFromEnv returns the color level COLORTERM, FORCE_COLOR, // TERM_PROGRAM, or determined from the TERM environment variable. func ColorLevelFromEnv() (ColorLevel, error) { // check for overriding environment variables colorTerm, termProg, forceColor := os.Getenv("COLORTERM"), os.Getenv("TERM_PROGRAM"), os.Getenv("FORCE_COLOR") switch { case strings.Contains(colorTerm, "truecolor") || strings.Contains(colorTerm, "24bit") || termProg == "Hyper": return ColorLevelMillions, nil case colorTerm != "" || forceColor != "": return ColorLevelBasic, nil case termProg == "Apple_Terminal": return ColorLevelHundreds, nil case termProg == "iTerm.app": ver := os.Getenv("TERM_PROGRAM_VERSION") if ver == "" { return ColorLevelHundreds, nil } i, err := strconv.Atoi(strings.Split(ver, ".")[0]) if err != nil { return ColorLevelNone, ErrInvalidTermProgramVersion } if i == 3 { return ColorLevelMillions, nil } return ColorLevelHundreds, nil } // otherwise determine from TERM's max_colors capability if term := os.Getenv("TERM"); term != "" { ti, err := Load(term) if err != nil { return ColorLevelNone, err } v, ok := ti.Nums[MaxColors] switch { case !ok || v <= 16: return ColorLevelNone, nil case ok && v >= 256: return ColorLevelHundreds, nil } } return ColorLevelBasic, nil } ================================================ FILE: vendor/github.com/xo/terminfo/load.go ================================================ package terminfo import ( "os" "os/user" "path" "strings" "sync" ) // termCache is the terminfo cache. var termCache = struct { db map[string]*Terminfo sync.RWMutex }{ db: make(map[string]*Terminfo), } // Load follows the behavior described in terminfo(5) to find correct the // terminfo file using the name, reads the file and then returns a Terminfo // struct that describes the file. func Load(name string) (*Terminfo, error) { if name == "" { return nil, ErrEmptyTermName } termCache.RLock() ti, ok := termCache.db[name] termCache.RUnlock() if ok { return ti, nil } var checkDirs []string // check $TERMINFO if dir := os.Getenv("TERMINFO"); dir != "" { checkDirs = append(checkDirs, dir) } // check $HOME/.terminfo u, err := user.Current() if err != nil { return nil, err } checkDirs = append(checkDirs, path.Join(u.HomeDir, ".terminfo")) // check $TERMINFO_DIRS if dirs := os.Getenv("TERMINFO_DIRS"); dirs != "" { checkDirs = append(checkDirs, strings.Split(dirs, ":")...) } // check fallback directories checkDirs = append(checkDirs, "/etc/terminfo", "/lib/terminfo", "/usr/share/terminfo") for _, dir := range checkDirs { ti, err = Open(dir, name) if err != nil && err != ErrFileNotFound && !os.IsNotExist(err) { return nil, err } else if err == nil { return ti, nil } } return nil, ErrDatabaseDirectoryNotFound } // LoadFromEnv loads the terminal info based on the name contained in // environment variable TERM. func LoadFromEnv() (*Terminfo, error) { return Load(os.Getenv("TERM")) } ================================================ FILE: vendor/github.com/xo/terminfo/param.go ================================================ package terminfo import ( "bytes" "fmt" "io" "strconv" "strings" "sync" ) // parametizer represents the a scan state for a parameterized string. type parametizer struct { // z is the string to parameterize z []byte // pos is the current position in s. pos int // nest is the current nest level. nest int // s is the variable stack. s stack // skipElse keeps the state of skipping else. skipElse bool // buf is the result buffer. buf *bytes.Buffer // params are the parameters to interpolate. params [9]interface{} // vars are dynamic variables. vars [26]interface{} } // staticVars are the static, global variables. var staticVars = struct { vars [26]interface{} sync.Mutex }{} var parametizerPool = sync.Pool{ New: func() interface{} { p := new(parametizer) p.buf = bytes.NewBuffer(make([]byte, 0, 45)) return p }, } // newParametizer returns a new initialized parametizer from the pool. func newParametizer(z []byte) *parametizer { p := parametizerPool.Get().(*parametizer) p.z = z return p } // reset resets the parametizer. func (p *parametizer) reset() { p.pos, p.nest = 0, 0 p.s.reset() p.buf.Reset() p.params, p.vars = [9]interface{}{}, [26]interface{}{} parametizerPool.Put(p) } // stateFn represents the state of the scanner as a function that returns the // next state. type stateFn func() stateFn // exec executes the parameterizer, interpolating the supplied parameters. func (p *parametizer) exec() string { for state := p.scanTextFn; state != nil; { state = state() } return p.buf.String() } // peek returns the next byte. func (p *parametizer) peek() (byte, error) { if p.pos >= len(p.z) { return 0, io.EOF } return p.z[p.pos], nil } // writeFrom writes the characters from ppos to pos to the buffer. func (p *parametizer) writeFrom(ppos int) { if p.pos > ppos { // append remaining characters. p.buf.Write(p.z[ppos:p.pos]) } } func (p *parametizer) scanTextFn() stateFn { ppos := p.pos for { ch, err := p.peek() if err != nil { p.writeFrom(ppos) return nil } if ch == '%' { p.writeFrom(ppos) p.pos++ return p.scanCodeFn } p.pos++ } } func (p *parametizer) scanCodeFn() stateFn { ch, err := p.peek() if err != nil { return nil } switch ch { case '%': p.buf.WriteByte('%') case ':': // this character is used to avoid interpreting "%-" and "%+" as operators. // the next character is where the format really begins. p.pos++ _, err = p.peek() if err != nil { return nil } return p.scanFormatFn case '#', ' ', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.': return p.scanFormatFn case 'o': p.buf.WriteString(strconv.FormatInt(int64(p.s.popInt()), 8)) case 'd': p.buf.WriteString(strconv.Itoa(p.s.popInt())) case 'x': p.buf.WriteString(strconv.FormatInt(int64(p.s.popInt()), 16)) case 'X': p.buf.WriteString(strings.ToUpper(strconv.FormatInt(int64(p.s.popInt()), 16))) case 's': p.buf.WriteString(p.s.popString()) case 'c': p.buf.WriteByte(p.s.popByte()) case 'p': p.pos++ return p.pushParamFn case 'P': p.pos++ return p.setDsVarFn case 'g': p.pos++ return p.getDsVarFn case '\'': p.pos++ ch, err = p.peek() if err != nil { return nil } p.s.push(ch) // skip the '\'' p.pos++ case '{': p.pos++ return p.pushIntfn case 'l': p.s.push(len(p.s.popString())) case '+': bi, ai := p.s.popInt(), p.s.popInt() p.s.push(ai + bi) case '-': bi, ai := p.s.popInt(), p.s.popInt() p.s.push(ai - bi) case '*': bi, ai := p.s.popInt(), p.s.popInt() p.s.push(ai * bi) case '/': bi, ai := p.s.popInt(), p.s.popInt() if bi != 0 { p.s.push(ai / bi) } else { p.s.push(0) } case 'm': bi, ai := p.s.popInt(), p.s.popInt() if bi != 0 { p.s.push(ai % bi) } else { p.s.push(0) } case '&': bi, ai := p.s.popInt(), p.s.popInt() p.s.push(ai & bi) case '|': bi, ai := p.s.popInt(), p.s.popInt() p.s.push(ai | bi) case '^': bi, ai := p.s.popInt(), p.s.popInt() p.s.push(ai ^ bi) case '=': bi, ai := p.s.popInt(), p.s.popInt() p.s.push(ai == bi) case '>': bi, ai := p.s.popInt(), p.s.popInt() p.s.push(ai > bi) case '<': bi, ai := p.s.popInt(), p.s.popInt() p.s.push(ai < bi) case 'A': bi, ai := p.s.popBool(), p.s.popBool() p.s.push(ai && bi) case 'O': bi, ai := p.s.popBool(), p.s.popBool() p.s.push(ai || bi) case '!': p.s.push(!p.s.popBool()) case '~': p.s.push(^p.s.popInt()) case 'i': for i := range p.params[:2] { if n, ok := p.params[i].(int); ok { p.params[i] = n + 1 } } case '?', ';': case 't': return p.scanThenFn case 'e': p.skipElse = true return p.skipTextFn } p.pos++ return p.scanTextFn } func (p *parametizer) scanFormatFn() stateFn { // the character was already read, so no need to check the error. ch, _ := p.peek() // 6 should be the maximum length of a format string, for example "%:-9.9d". f := []byte{'%', ch, 0, 0, 0, 0} var err error for { p.pos++ ch, err = p.peek() if err != nil { return nil } f = append(f, ch) switch ch { case 'o', 'd', 'x', 'X': fmt.Fprintf(p.buf, string(f), p.s.popInt()) break case 's': fmt.Fprintf(p.buf, string(f), p.s.popString()) break case 'c': fmt.Fprintf(p.buf, string(f), p.s.popByte()) break } } p.pos++ return p.scanTextFn } func (p *parametizer) pushParamFn() stateFn { ch, err := p.peek() if err != nil { return nil } if ai := int(ch - '1'); ai >= 0 && ai < len(p.params) { p.s.push(p.params[ai]) } else { p.s.push(0) } // skip the '}' p.pos++ return p.scanTextFn } func (p *parametizer) setDsVarFn() stateFn { ch, err := p.peek() if err != nil { return nil } if ch >= 'A' && ch <= 'Z' { staticVars.Lock() staticVars.vars[int(ch-'A')] = p.s.pop() staticVars.Unlock() } else if ch >= 'a' && ch <= 'z' { p.vars[int(ch-'a')] = p.s.pop() } p.pos++ return p.scanTextFn } func (p *parametizer) getDsVarFn() stateFn { ch, err := p.peek() if err != nil { return nil } var a byte if ch >= 'A' && ch <= 'Z' { a = 'A' } else if ch >= 'a' && ch <= 'z' { a = 'a' } staticVars.Lock() p.s.push(staticVars.vars[int(ch-a)]) staticVars.Unlock() p.pos++ return p.scanTextFn } func (p *parametizer) pushIntfn() stateFn { var ai int for { ch, err := p.peek() if err != nil { return nil } p.pos++ if ch < '0' || ch > '9' { p.s.push(ai) return p.scanTextFn } ai = (ai * 10) + int(ch-'0') } } func (p *parametizer) scanThenFn() stateFn { p.pos++ if p.s.popBool() { return p.scanTextFn } p.skipElse = false return p.skipTextFn } func (p *parametizer) skipTextFn() stateFn { for { ch, err := p.peek() if err != nil { return nil } p.pos++ if ch == '%' { break } } if p.skipElse { return p.skipElseFn } return p.skipThenFn } func (p *parametizer) skipThenFn() stateFn { ch, err := p.peek() if err != nil { return nil } p.pos++ switch ch { case ';': if p.nest == 0 { return p.scanTextFn } p.nest-- case '?': p.nest++ case 'e': if p.nest == 0 { return p.scanTextFn } } return p.skipTextFn } func (p *parametizer) skipElseFn() stateFn { ch, err := p.peek() if err != nil { return nil } p.pos++ switch ch { case ';': if p.nest == 0 { return p.scanTextFn } p.nest-- case '?': p.nest++ } return p.skipTextFn } // Printf evaluates a parameterized terminfo value z, interpolating params. func Printf(z []byte, params ...interface{}) string { p := newParametizer(z) defer p.reset() // make sure we always have 9 parameters -- makes it easier // later to skip checks and its faster for i := 0; i < len(p.params) && i < len(params); i++ { p.params[i] = params[i] } return p.exec() } // Fprintf evaluates a parameterized terminfo value z, interpolating params and // writing to w. func Fprintf(w io.Writer, z []byte, params ...interface{}) { w.Write([]byte(Printf(z, params...))) } ================================================ FILE: vendor/github.com/xo/terminfo/stack.go ================================================ package terminfo type stack []interface{} func (s *stack) push(v interface{}) { *s = append(*s, v) } func (s *stack) pop() interface{} { if len(*s) == 0 { return nil } v := (*s)[len(*s)-1] *s = (*s)[:len(*s)-1] return v } func (s *stack) popInt() int { if i, ok := s.pop().(int); ok { return i } return 0 } func (s *stack) popBool() bool { if b, ok := s.pop().(bool); ok { return b } return false } func (s *stack) popByte() byte { if b, ok := s.pop().(byte); ok { return b } return 0 } func (s *stack) popString() string { if a, ok := s.pop().(string); ok { return a } return "" } func (s *stack) reset() { *s = (*s)[:0] } ================================================ FILE: vendor/github.com/xo/terminfo/terminfo.go ================================================ // Package terminfo implements reading terminfo files in pure go. package terminfo import ( "io" "io/ioutil" "path" "strconv" "strings" ) // Error is a terminfo error. type Error string // Error satisfies the error interface. func (err Error) Error() string { return string(err) } const ( // ErrInvalidFileSize is the invalid file size error. ErrInvalidFileSize Error = "invalid file size" // ErrUnexpectedFileEnd is the unexpected file end error. ErrUnexpectedFileEnd Error = "unexpected file end" // ErrInvalidStringTable is the invalid string table error. ErrInvalidStringTable Error = "invalid string table" // ErrInvalidMagic is the invalid magic error. ErrInvalidMagic Error = "invalid magic" // ErrInvalidHeader is the invalid header error. ErrInvalidHeader Error = "invalid header" // ErrInvalidNames is the invalid names error. ErrInvalidNames Error = "invalid names" // ErrInvalidExtendedHeader is the invalid extended header error. ErrInvalidExtendedHeader Error = "invalid extended header" // ErrEmptyTermName is the empty term name error. ErrEmptyTermName Error = "empty term name" // ErrDatabaseDirectoryNotFound is the database directory not found error. ErrDatabaseDirectoryNotFound Error = "database directory not found" // ErrFileNotFound is the file not found error. ErrFileNotFound Error = "file not found" // ErrInvalidTermProgramVersion is the invalid TERM_PROGRAM_VERSION error. ErrInvalidTermProgramVersion Error = "invalid TERM_PROGRAM_VERSION" ) // Terminfo describes a terminal's capabilities. type Terminfo struct { // File is the original source file. File string // Names are the provided cap names. Names []string // Bools are the bool capabilities. Bools map[int]bool // BoolsM are the missing bool capabilities. BoolsM map[int]bool // Nums are the num capabilities. Nums map[int]int // NumsM are the missing num capabilities. NumsM map[int]bool // Strings are the string capabilities. Strings map[int][]byte // StringsM are the missing string capabilities. StringsM map[int]bool // ExtBools are the extended bool capabilities. ExtBools map[int]bool // ExtBoolsNames is the map of extended bool capabilities to their index. ExtBoolNames map[int][]byte // ExtNums are the extended num capabilities. ExtNums map[int]int // ExtNumsNames is the map of extended num capabilities to their index. ExtNumNames map[int][]byte // ExtStrings are the extended string capabilities. ExtStrings map[int][]byte // ExtStringsNames is the map of extended string capabilities to their index. ExtStringNames map[int][]byte } // Decode decodes the terminfo data contained in buf. func Decode(buf []byte) (*Terminfo, error) { var err error // check max file length if len(buf) >= maxFileLength { return nil, ErrInvalidFileSize } d := &decoder{ buf: buf, len: len(buf), } // read header h, err := d.readInts(6, 16) if err != nil { return nil, err } var numWidth int // check magic if h[fieldMagic] == magic { numWidth = 16 } else if h[fieldMagic] == magicExtended { numWidth = 32 } else { return nil, ErrInvalidMagic } // check header if hasInvalidCaps(h) { return nil, ErrInvalidHeader } // check remaining length if d.len-d.pos < capLength(h) { return nil, ErrUnexpectedFileEnd } // read names names, err := d.readBytes(h[fieldNameSize]) if err != nil { return nil, err } // check name is terminated properly i := findNull(names, 0) if i == -1 { return nil, ErrInvalidNames } names = names[:i] // read bool caps bools, boolsM, err := d.readBools(h[fieldBoolCount]) if err != nil { return nil, err } // read num caps nums, numsM, err := d.readNums(h[fieldNumCount], numWidth) if err != nil { return nil, err } // read string caps strs, strsM, err := d.readStrings(h[fieldStringCount], h[fieldTableSize]) if err != nil { return nil, err } ti := &Terminfo{ Names: strings.Split(string(names), "|"), Bools: bools, BoolsM: boolsM, Nums: nums, NumsM: numsM, Strings: strs, StringsM: strsM, } // at the end of file, so no extended caps if d.pos >= d.len { return ti, nil } // decode extended header eh, err := d.readInts(5, 16) if err != nil { return nil, err } // check extended offset field if hasInvalidExtOffset(eh) { return nil, ErrInvalidExtendedHeader } // check extended cap lengths if d.len-d.pos != extCapLength(eh, numWidth) { return nil, ErrInvalidExtendedHeader } // read extended bool caps ti.ExtBools, _, err = d.readBools(eh[fieldExtBoolCount]) if err != nil { return nil, err } // read extended num caps ti.ExtNums, _, err = d.readNums(eh[fieldExtNumCount], numWidth) if err != nil { return nil, err } // read extended string data table indexes extIndexes, err := d.readInts(eh[fieldExtOffsetCount], 16) if err != nil { return nil, err } // read string data table extData, err := d.readBytes(eh[fieldExtTableSize]) if err != nil { return nil, err } // precautionary check that exactly at end of file if d.pos != d.len { return nil, ErrUnexpectedFileEnd } var last int // read extended string caps ti.ExtStrings, last, err = readStrings(extIndexes, extData, eh[fieldExtStringCount]) if err != nil { return nil, err } extIndexes, extData = extIndexes[eh[fieldExtStringCount]:], extData[last:] // read extended bool names ti.ExtBoolNames, _, err = readStrings(extIndexes, extData, eh[fieldExtBoolCount]) if err != nil { return nil, err } extIndexes = extIndexes[eh[fieldExtBoolCount]:] // read extended num names ti.ExtNumNames, _, err = readStrings(extIndexes, extData, eh[fieldExtNumCount]) if err != nil { return nil, err } extIndexes = extIndexes[eh[fieldExtNumCount]:] // read extended string names ti.ExtStringNames, _, err = readStrings(extIndexes, extData, eh[fieldExtStringCount]) if err != nil { return nil, err } //extIndexes = extIndexes[eh[fieldExtStringCount]:] return ti, nil } // Open reads the terminfo file name from the specified directory dir. func Open(dir, name string) (*Terminfo, error) { var err error var buf []byte var filename string for _, f := range []string{ path.Join(dir, name[0:1], name), path.Join(dir, strconv.FormatUint(uint64(name[0]), 16), name), } { buf, err = ioutil.ReadFile(f) if err == nil { filename = f break } } if buf == nil { return nil, ErrFileNotFound } // decode ti, err := Decode(buf) if err != nil { return nil, err } // save original file name ti.File = filename // add to cache termCache.Lock() for _, n := range ti.Names { termCache.db[n] = ti } termCache.Unlock() return ti, nil } // boolCaps returns all bool and extended capabilities using f to format the // index key. func (ti *Terminfo) boolCaps(f func(int) string, extended bool) map[string]bool { m := make(map[string]bool, len(ti.Bools)+len(ti.ExtBools)) if !extended { for k, v := range ti.Bools { m[f(k)] = v } } else { for k, v := range ti.ExtBools { m[string(ti.ExtBoolNames[k])] = v } } return m } // BoolCaps returns all bool capabilities. func (ti *Terminfo) BoolCaps() map[string]bool { return ti.boolCaps(BoolCapName, false) } // BoolCapsShort returns all bool capabilities, using the short name as the // index. func (ti *Terminfo) BoolCapsShort() map[string]bool { return ti.boolCaps(BoolCapNameShort, false) } // ExtBoolCaps returns all extended bool capabilities. func (ti *Terminfo) ExtBoolCaps() map[string]bool { return ti.boolCaps(BoolCapName, true) } // ExtBoolCapsShort returns all extended bool capabilities, using the short // name as the index. func (ti *Terminfo) ExtBoolCapsShort() map[string]bool { return ti.boolCaps(BoolCapNameShort, true) } // numCaps returns all num and extended capabilities using f to format the // index key. func (ti *Terminfo) numCaps(f func(int) string, extended bool) map[string]int { m := make(map[string]int, len(ti.Nums)+len(ti.ExtNums)) if !extended { for k, v := range ti.Nums { m[f(k)] = v } } else { for k, v := range ti.ExtNums { m[string(ti.ExtNumNames[k])] = v } } return m } // NumCaps returns all num capabilities. func (ti *Terminfo) NumCaps() map[string]int { return ti.numCaps(NumCapName, false) } // NumCapsShort returns all num capabilities, using the short name as the // index. func (ti *Terminfo) NumCapsShort() map[string]int { return ti.numCaps(NumCapNameShort, false) } // ExtNumCaps returns all extended num capabilities. func (ti *Terminfo) ExtNumCaps() map[string]int { return ti.numCaps(NumCapName, true) } // ExtNumCapsShort returns all extended num capabilities, using the short // name as the index. func (ti *Terminfo) ExtNumCapsShort() map[string]int { return ti.numCaps(NumCapNameShort, true) } // stringCaps returns all string and extended capabilities using f to format the // index key. func (ti *Terminfo) stringCaps(f func(int) string, extended bool) map[string][]byte { m := make(map[string][]byte, len(ti.Strings)+len(ti.ExtStrings)) if !extended { for k, v := range ti.Strings { m[f(k)] = v } } else { for k, v := range ti.ExtStrings { m[string(ti.ExtStringNames[k])] = v } } return m } // StringCaps returns all string capabilities. func (ti *Terminfo) StringCaps() map[string][]byte { return ti.stringCaps(StringCapName, false) } // StringCapsShort returns all string capabilities, using the short name as the // index. func (ti *Terminfo) StringCapsShort() map[string][]byte { return ti.stringCaps(StringCapNameShort, false) } // ExtStringCaps returns all extended string capabilities. func (ti *Terminfo) ExtStringCaps() map[string][]byte { return ti.stringCaps(StringCapName, true) } // ExtStringCapsShort returns all extended string capabilities, using the short // name as the index. func (ti *Terminfo) ExtStringCapsShort() map[string][]byte { return ti.stringCaps(StringCapNameShort, true) } // Has determines if the bool cap i is present. func (ti *Terminfo) Has(i int) bool { return ti.Bools[i] } // Num returns the num cap i, or -1 if not present. func (ti *Terminfo) Num(i int) int { n, ok := ti.Nums[i] if !ok { return -1 } return n } // Printf formats the string cap i, interpolating parameters v. func (ti *Terminfo) Printf(i int, v ...interface{}) string { return Printf(ti.Strings[i], v...) } // Fprintf prints the string cap i to writer w, interpolating parameters v. func (ti *Terminfo) Fprintf(w io.Writer, i int, v ...interface{}) { Fprintf(w, ti.Strings[i], v...) } // Color takes a foreground and background color and returns string that sets // them for this terminal. func (ti *Terminfo) Colorf(fg, bg int, str string) string { maxColors := int(ti.Nums[MaxColors]) // map bright colors to lower versions if the color table only holds 8. if maxColors == 8 { if fg > 7 && fg < 16 { fg -= 8 } if bg > 7 && bg < 16 { bg -= 8 } } var s string if maxColors > fg && fg >= 0 { s += ti.Printf(SetAForeground, fg) } if maxColors > bg && bg >= 0 { s += ti.Printf(SetABackground, bg) } return s + str + ti.Printf(ExitAttributeMode) } // Goto returns a string suitable for addressing the cursor at the given // row and column. The origin 0, 0 is in the upper left corner of the screen. func (ti *Terminfo) Goto(row, col int) string { return Printf(ti.Strings[CursorAddress], row, col) } // Puts emits the string to the writer, but expands inline padding indications // (of the form $<[delay]> where [delay] is msec) to a suitable number of // padding characters (usually null bytes) based upon the supplied baud. At // high baud rates, more padding characters will be inserted. /*func (ti *Terminfo) Puts(w io.Writer, s string, lines, baud int) (int, error) { var err error for { start := strings.Index(s, "$<") if start == -1 { // most strings don't need padding, which is good news! return io.WriteString(w, s) } end := strings.Index(s, ">") if end == -1 { // unterminated... just emit bytes unadulterated. return io.WriteString(w, "$<"+s) } var c int c, err = io.WriteString(w, s[:start]) if err != nil { return n + c, err } n += c s = s[start+2:] val := s[:end] s = s[end+1:] var ms int var dot, mandatory, asterisk bool unit := 1000 for _, ch := range val { switch { case ch >= '0' && ch <= '9': ms = (ms * 10) + int(ch-'0') if dot { unit *= 10 } case ch == '.' && !dot: dot = true case ch == '*' && !asterisk: ms *= lines asterisk = true case ch == '/': mandatory = true default: break } } z, pad := ((baud/8)/unit)*ms, ti.Strings[PadChar] b := make([]byte, len(pad)*z) for bp := copy(b, pad); bp < len(b); bp *= 2 { copy(b[bp:], b[:bp]) } if (!ti.Bools[XonXoff] && baud > int(ti.Nums[PaddingBaudRate])) || mandatory { c, err = w.Write(b) if err != nil { return n + c, err } n += c } } return n, nil }*/ ================================================ FILE: vendor/github.com/xo/terminfo/util.go ================================================ package terminfo import ( "sort" ) const ( // maxFileLength is the max file length. maxFileLength = 4096 // magic is the file magic for terminfo files. magic = 0432 // magicExtended is the file magic for terminfo files with the extended number format. magicExtended = 01036 ) // header fields. const ( fieldMagic = iota fieldNameSize fieldBoolCount fieldNumCount fieldStringCount fieldTableSize ) // header extended fields. const ( fieldExtBoolCount = iota fieldExtNumCount fieldExtStringCount fieldExtOffsetCount fieldExtTableSize ) // hasInvalidCaps determines if the capabilities in h are invalid. func hasInvalidCaps(h []int) bool { return h[fieldBoolCount] > CapCountBool || h[fieldNumCount] > CapCountNum || h[fieldStringCount] > CapCountString } // capLength returns the total length of the capabilities in bytes. func capLength(h []int) int { return h[fieldNameSize] + h[fieldBoolCount] + (h[fieldNameSize]+h[fieldBoolCount])%2 + // account for word align h[fieldNumCount]*2 + h[fieldStringCount]*2 + h[fieldTableSize] } // hasInvalidExtOffset determines if the extended offset field is valid. func hasInvalidExtOffset(h []int) bool { return h[fieldExtBoolCount]+ h[fieldExtNumCount]+ h[fieldExtStringCount]*2 != h[fieldExtOffsetCount] } // extCapLength returns the total length of extended capabilities in bytes. func extCapLength(h []int, numWidth int) int { return h[fieldExtBoolCount] + h[fieldExtBoolCount]%2 + // account for word align h[fieldExtNumCount]*(numWidth/8) + h[fieldExtOffsetCount]*2 + h[fieldExtTableSize] } // findNull finds the position of null in buf. func findNull(buf []byte, i int) int { for ; i < len(buf); i++ { if buf[i] == 0 { return i } } return -1 } // readStrings decodes n strings from string data table buf using the indexes in idx. func readStrings(idx []int, buf []byte, n int) (map[int][]byte, int, error) { var last int m := make(map[int][]byte) for i := 0; i < n; i++ { start := idx[i] if start < 0 { continue } if end := findNull(buf, start); end != -1 { m[i], last = buf[start:end], end+1 } else { return nil, 0, ErrInvalidStringTable } } return m, last, nil } // decoder holds state info while decoding a terminfo file. type decoder struct { buf []byte pos int len int } // readBytes reads the next n bytes of buf, incrementing pos by n. func (d *decoder) readBytes(n int) ([]byte, error) { if d.len < d.pos+n { return nil, ErrUnexpectedFileEnd } n, d.pos = d.pos, d.pos+n return d.buf[n:d.pos], nil } // readInts reads n number of ints with width w. func (d *decoder) readInts(n, w int) ([]int, error) { w /= 8 l := n * w buf, err := d.readBytes(l) if err != nil { return nil, err } // align d.pos += d.pos % 2 z := make([]int, n) for i, j := 0, 0; i < l; i, j = i+w, j+1 { switch w { case 1: z[i] = int(buf[i]) case 2: z[j] = int(int16(buf[i+1])<<8 | int16(buf[i])) case 4: z[j] = int(buf[i+3])<<24 | int(buf[i+2])<<16 | int(buf[i+1])<<8 | int(buf[i]) } } return z, nil } // readBools reads the next n bools. func (d *decoder) readBools(n int) (map[int]bool, map[int]bool, error) { buf, err := d.readInts(n, 8) if err != nil { return nil, nil, err } // process bools, boolsM := make(map[int]bool), make(map[int]bool) for i, b := range buf { bools[i] = b == 1 if int8(b) == -2 { boolsM[i] = true } } return bools, boolsM, nil } // readNums reads the next n nums. func (d *decoder) readNums(n, w int) (map[int]int, map[int]bool, error) { buf, err := d.readInts(n, w) if err != nil { return nil, nil, err } // process nums, numsM := make(map[int]int), make(map[int]bool) for i := 0; i < n; i++ { nums[i] = buf[i] if buf[i] == -2 { numsM[i] = true } } return nums, numsM, nil } // readStringTable reads the string data for n strings and the accompanying data // table of length sz. func (d *decoder) readStringTable(n, sz int) ([][]byte, []int, error) { buf, err := d.readInts(n, 16) if err != nil { return nil, nil, err } // read string data table data, err := d.readBytes(sz) if err != nil { return nil, nil, err } // align d.pos += d.pos % 2 // process s := make([][]byte, n) var m []int for i := 0; i < n; i++ { start := buf[i] if start == -2 { m = append(m, i) } else if start >= 0 { if end := findNull(data, start); end != -1 { s[i] = data[start:end] } else { return nil, nil, ErrInvalidStringTable } } } return s, m, nil } // readStrings reads the next n strings and processes the string data table of // length sz. func (d *decoder) readStrings(n, sz int) (map[int][]byte, map[int]bool, error) { s, m, err := d.readStringTable(n, sz) if err != nil { return nil, nil, err } strs := make(map[int][]byte) for k, v := range s { if k == AcsChars { v = canonicalizeAscChars(v) } strs[k] = v } strsM := make(map[int]bool, len(m)) for _, k := range m { strsM[k] = true } return strs, strsM, nil } // canonicalizeAscChars reorders chars to be unique, in order. // // see repair_ascc in ncurses-6.0/progs/dump_entry.c func canonicalizeAscChars(z []byte) []byte { var c chars enc := make(map[byte]byte, len(z)/2) for i := 0; i < len(z); i += 2 { if _, ok := enc[z[i]]; !ok { a, b := z[i], z[i+1] //log.Printf(">>> a: %d %c, b: %d %c", a, a, b, b) c, enc[a] = append(c, b), b } } sort.Sort(c) r := make([]byte, 2*len(c)) for i := 0; i < len(c); i++ { r[i*2], r[i*2+1] = c[i], enc[c[i]] } return r } type chars []byte func (c chars) Len() int { return len(c) } func (c chars) Swap(i, j int) { c[i], c[j] = c[j], c[i] } func (c chars) Less(i, j int) bool { return c[i] < c[j] } ================================================ FILE: vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor 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, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/client.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" import ( "context" "io" "net/http" "net/url" "strings" ) // DefaultClient is the default Client and is used by Get, Head, Post and PostForm. // Please be careful of initialization order - for example, if you change // the global propagator, the DefaultClient might still be using the old one. var DefaultClient = &http.Client{Transport: NewTransport(http.DefaultTransport)} // Get is a convenient replacement for http.Get that adds a span around the request. func Get(ctx context.Context, targetURL string) (resp *http.Response, err error) { req, err := http.NewRequestWithContext(ctx, "GET", targetURL, nil) if err != nil { return nil, err } return DefaultClient.Do(req) } // Head is a convenient replacement for http.Head that adds a span around the request. func Head(ctx context.Context, targetURL string) (resp *http.Response, err error) { req, err := http.NewRequestWithContext(ctx, "HEAD", targetURL, nil) if err != nil { return nil, err } return DefaultClient.Do(req) } // Post is a convenient replacement for http.Post that adds a span around the request. func Post(ctx context.Context, targetURL, contentType string, body io.Reader) (resp *http.Response, err error) { req, err := http.NewRequestWithContext(ctx, "POST", targetURL, body) if err != nil { return nil, err } req.Header.Set("Content-Type", contentType) return DefaultClient.Do(req) } // PostForm is a convenient replacement for http.PostForm that adds a span around the request. func PostForm(ctx context.Context, targetURL string, data url.Values) (resp *http.Response, err error) { return Post(ctx, targetURL, "application/x-www-form-urlencoded", strings.NewReader(data.Encode())) } ================================================ FILE: vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/common.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" import ( "net/http" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/trace" ) // Attribute keys that can be added to a span. const ( ReadBytesKey = attribute.Key("http.read_bytes") // if anything was read from the request body, the total number of bytes read ReadErrorKey = attribute.Key("http.read_error") // If an error occurred while reading a request, the string of the error (io.EOF is not recorded) WroteBytesKey = attribute.Key("http.wrote_bytes") // if anything was written to the response writer, the total number of bytes written WriteErrorKey = attribute.Key("http.write_error") // if an error occurred while writing a reply, the string of the error (io.EOF is not recorded) ) // Server HTTP metrics. const ( serverRequestSize = "http.server.request.size" // Incoming request bytes total serverResponseSize = "http.server.response.size" // Incoming response bytes total serverDuration = "http.server.duration" // Incoming end to end duration, milliseconds ) // Client HTTP metrics. const ( clientRequestSize = "http.client.request.size" // Outgoing request bytes total clientResponseSize = "http.client.response.size" // Outgoing response bytes total clientDuration = "http.client.duration" // Outgoing end to end duration, milliseconds ) // Filter is a predicate used to determine whether a given http.request should // be traced. A Filter must return true if the request should be traced. type Filter func(*http.Request) bool func newTracer(tp trace.TracerProvider) trace.Tracer { return tp.Tracer(ScopeName, trace.WithInstrumentationVersion(Version())) } ================================================ FILE: vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/config.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" import ( "context" "net/http" "net/http/httptrace" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/propagation" "go.opentelemetry.io/otel/trace" ) // ScopeName is the instrumentation scope name. const ScopeName = "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" // config represents the configuration options available for the http.Handler // and http.Transport types. type config struct { ServerName string Tracer trace.Tracer Meter metric.Meter Propagators propagation.TextMapPropagator SpanStartOptions []trace.SpanStartOption PublicEndpoint bool PublicEndpointFn func(*http.Request) bool ReadEvent bool WriteEvent bool Filters []Filter SpanNameFormatter func(string, *http.Request) string ClientTrace func(context.Context) *httptrace.ClientTrace TracerProvider trace.TracerProvider MeterProvider metric.MeterProvider } // Option interface used for setting optional config properties. type Option interface { apply(*config) } type optionFunc func(*config) func (o optionFunc) apply(c *config) { o(c) } // newConfig creates a new config struct and applies opts to it. func newConfig(opts ...Option) *config { c := &config{ Propagators: otel.GetTextMapPropagator(), MeterProvider: otel.GetMeterProvider(), } for _, opt := range opts { opt.apply(c) } // Tracer is only initialized if manually specified. Otherwise, can be passed with the tracing context. if c.TracerProvider != nil { c.Tracer = newTracer(c.TracerProvider) } c.Meter = c.MeterProvider.Meter( ScopeName, metric.WithInstrumentationVersion(Version()), ) return c } // WithTracerProvider specifies a tracer provider to use for creating a tracer. // If none is specified, the global provider is used. func WithTracerProvider(provider trace.TracerProvider) Option { return optionFunc(func(cfg *config) { if provider != nil { cfg.TracerProvider = provider } }) } // WithMeterProvider specifies a meter provider to use for creating a meter. // If none is specified, the global provider is used. func WithMeterProvider(provider metric.MeterProvider) Option { return optionFunc(func(cfg *config) { if provider != nil { cfg.MeterProvider = provider } }) } // WithPublicEndpoint configures the Handler to link the span with an incoming // span context. If this option is not provided, then the association is a child // association instead of a link. func WithPublicEndpoint() Option { return optionFunc(func(c *config) { c.PublicEndpoint = true }) } // WithPublicEndpointFn runs with every request, and allows conditionally // configuring the Handler to link the span with an incoming span context. If // this option is not provided or returns false, then the association is a // child association instead of a link. // Note: WithPublicEndpoint takes precedence over WithPublicEndpointFn. func WithPublicEndpointFn(fn func(*http.Request) bool) Option { return optionFunc(func(c *config) { c.PublicEndpointFn = fn }) } // WithPropagators configures specific propagators. If this // option isn't specified, then the global TextMapPropagator is used. func WithPropagators(ps propagation.TextMapPropagator) Option { return optionFunc(func(c *config) { if ps != nil { c.Propagators = ps } }) } // WithSpanOptions configures an additional set of // trace.SpanOptions, which are applied to each new span. func WithSpanOptions(opts ...trace.SpanStartOption) Option { return optionFunc(func(c *config) { c.SpanStartOptions = append(c.SpanStartOptions, opts...) }) } // WithFilter adds a filter to the list of filters used by the handler. // If any filter indicates to exclude a request then the request will not be // traced. All filters must allow a request to be traced for a Span to be created. // If no filters are provided then all requests are traced. // Filters will be invoked for each processed request, it is advised to make them // simple and fast. func WithFilter(f Filter) Option { return optionFunc(func(c *config) { c.Filters = append(c.Filters, f) }) } type event int // Different types of events that can be recorded, see WithMessageEvents. const ( ReadEvents event = iota WriteEvents ) // WithMessageEvents configures the Handler to record the specified events // (span.AddEvent) on spans. By default only summary attributes are added at the // end of the request. // // Valid events are: // - ReadEvents: Record the number of bytes read after every http.Request.Body.Read // using the ReadBytesKey // - WriteEvents: Record the number of bytes written after every http.ResponeWriter.Write // using the WriteBytesKey func WithMessageEvents(events ...event) Option { return optionFunc(func(c *config) { for _, e := range events { switch e { case ReadEvents: c.ReadEvent = true case WriteEvents: c.WriteEvent = true } } }) } // WithSpanNameFormatter takes a function that will be called on every // request and the returned string will become the Span Name. func WithSpanNameFormatter(f func(operation string, r *http.Request) string) Option { return optionFunc(func(c *config) { c.SpanNameFormatter = f }) } // WithClientTrace takes a function that returns client trace instance that will be // applied to the requests sent through the otelhttp Transport. func WithClientTrace(f func(context.Context) *httptrace.ClientTrace) Option { return optionFunc(func(c *config) { c.ClientTrace = f }) } // WithServerName returns an Option that sets the name of the (virtual) server // handling requests. func WithServerName(server string) Option { return optionFunc(func(c *config) { c.ServerName = server }) } ================================================ FILE: vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/doc.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 // Package otelhttp provides an http.Handler and functions that are intended // to be used to add tracing by wrapping existing handlers (with Handler) and // routes WithRouteTag. package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" ================================================ FILE: vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" import ( "net/http" "time" "github.com/felixge/httpsnoop" "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv" "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/propagation" "go.opentelemetry.io/otel/trace" ) // middleware is an http middleware which wraps the next handler in a span. type middleware struct { operation string server string tracer trace.Tracer meter metric.Meter propagators propagation.TextMapPropagator spanStartOptions []trace.SpanStartOption readEvent bool writeEvent bool filters []Filter spanNameFormatter func(string, *http.Request) string publicEndpoint bool publicEndpointFn func(*http.Request) bool traceSemconv semconv.HTTPServer requestBytesCounter metric.Int64Counter responseBytesCounter metric.Int64Counter serverLatencyMeasure metric.Float64Histogram } func defaultHandlerFormatter(operation string, _ *http.Request) string { return operation } // NewHandler wraps the passed handler in a span named after the operation and // enriches it with metrics. func NewHandler(handler http.Handler, operation string, opts ...Option) http.Handler { return NewMiddleware(operation, opts...)(handler) } // NewMiddleware returns a tracing and metrics instrumentation middleware. // The handler returned by the middleware wraps a handler // in a span named after the operation and enriches it with metrics. func NewMiddleware(operation string, opts ...Option) func(http.Handler) http.Handler { h := middleware{ operation: operation, traceSemconv: semconv.NewHTTPServer(), } defaultOpts := []Option{ WithSpanOptions(trace.WithSpanKind(trace.SpanKindServer)), WithSpanNameFormatter(defaultHandlerFormatter), } c := newConfig(append(defaultOpts, opts...)...) h.configure(c) h.createMeasures() return func(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { h.serveHTTP(w, r, next) }) } } func (h *middleware) configure(c *config) { h.tracer = c.Tracer h.meter = c.Meter h.propagators = c.Propagators h.spanStartOptions = c.SpanStartOptions h.readEvent = c.ReadEvent h.writeEvent = c.WriteEvent h.filters = c.Filters h.spanNameFormatter = c.SpanNameFormatter h.publicEndpoint = c.PublicEndpoint h.publicEndpointFn = c.PublicEndpointFn h.server = c.ServerName } func handleErr(err error) { if err != nil { otel.Handle(err) } } func (h *middleware) createMeasures() { var err error h.requestBytesCounter, err = h.meter.Int64Counter( serverRequestSize, metric.WithUnit("By"), metric.WithDescription("Measures the size of HTTP request messages."), ) handleErr(err) h.responseBytesCounter, err = h.meter.Int64Counter( serverResponseSize, metric.WithUnit("By"), metric.WithDescription("Measures the size of HTTP response messages."), ) handleErr(err) h.serverLatencyMeasure, err = h.meter.Float64Histogram( serverDuration, metric.WithUnit("ms"), metric.WithDescription("Measures the duration of inbound HTTP requests."), ) handleErr(err) } // serveHTTP sets up tracing and calls the given next http.Handler with the span // context injected into the request context. func (h *middleware) serveHTTP(w http.ResponseWriter, r *http.Request, next http.Handler) { requestStartTime := time.Now() for _, f := range h.filters { if !f(r) { // Simply pass through to the handler if a filter rejects the request next.ServeHTTP(w, r) return } } ctx := h.propagators.Extract(r.Context(), propagation.HeaderCarrier(r.Header)) opts := []trace.SpanStartOption{ trace.WithAttributes(h.traceSemconv.RequestTraceAttrs(h.server, r)...), } opts = append(opts, h.spanStartOptions...) if h.publicEndpoint || (h.publicEndpointFn != nil && h.publicEndpointFn(r.WithContext(ctx))) { opts = append(opts, trace.WithNewRoot()) // Linking incoming span context if any for public endpoint. if s := trace.SpanContextFromContext(ctx); s.IsValid() && s.IsRemote() { opts = append(opts, trace.WithLinks(trace.Link{SpanContext: s})) } } tracer := h.tracer if tracer == nil { if span := trace.SpanFromContext(r.Context()); span.SpanContext().IsValid() { tracer = newTracer(span.TracerProvider()) } else { tracer = newTracer(otel.GetTracerProvider()) } } ctx, span := tracer.Start(ctx, h.spanNameFormatter(h.operation, r), opts...) defer span.End() readRecordFunc := func(int64) {} if h.readEvent { readRecordFunc = func(n int64) { span.AddEvent("read", trace.WithAttributes(ReadBytesKey.Int64(n))) } } var bw bodyWrapper // if request body is nil or NoBody, we don't want to mutate the body as it // will affect the identity of it in an unforeseeable way because we assert // ReadCloser fulfills a certain interface and it is indeed nil or NoBody. if r.Body != nil && r.Body != http.NoBody { bw.ReadCloser = r.Body bw.record = readRecordFunc r.Body = &bw } writeRecordFunc := func(int64) {} if h.writeEvent { writeRecordFunc = func(n int64) { span.AddEvent("write", trace.WithAttributes(WroteBytesKey.Int64(n))) } } rww := &respWriterWrapper{ ResponseWriter: w, record: writeRecordFunc, ctx: ctx, props: h.propagators, statusCode: http.StatusOK, // default status code in case the Handler doesn't write anything } // Wrap w to use our ResponseWriter methods while also exposing // other interfaces that w may implement (http.CloseNotifier, // http.Flusher, http.Hijacker, http.Pusher, io.ReaderFrom). w = httpsnoop.Wrap(w, httpsnoop.Hooks{ Header: func(httpsnoop.HeaderFunc) httpsnoop.HeaderFunc { return rww.Header }, Write: func(httpsnoop.WriteFunc) httpsnoop.WriteFunc { return rww.Write }, WriteHeader: func(httpsnoop.WriteHeaderFunc) httpsnoop.WriteHeaderFunc { return rww.WriteHeader }, Flush: func(httpsnoop.FlushFunc) httpsnoop.FlushFunc { return rww.Flush }, }) labeler, found := LabelerFromContext(ctx) if !found { ctx = ContextWithLabeler(ctx, labeler) } next.ServeHTTP(w, r.WithContext(ctx)) span.SetStatus(semconv.ServerStatus(rww.statusCode)) span.SetAttributes(h.traceSemconv.ResponseTraceAttrs(semconv.ResponseTelemetry{ StatusCode: rww.statusCode, ReadBytes: bw.read.Load(), ReadError: bw.err, WriteBytes: rww.written, WriteError: rww.err, })...) // Add metrics attributes := append(labeler.Get(), semconvutil.HTTPServerRequestMetrics(h.server, r)...) if rww.statusCode > 0 { attributes = append(attributes, semconv.HTTPStatusCode(rww.statusCode)) } o := metric.WithAttributeSet(attribute.NewSet(attributes...)) addOpts := []metric.AddOption{o} // Allocate vararg slice once. h.requestBytesCounter.Add(ctx, bw.read.Load(), addOpts...) h.responseBytesCounter.Add(ctx, rww.written, addOpts...) // Use floating point division here for higher precision (instead of Millisecond method). elapsedTime := float64(time.Since(requestStartTime)) / float64(time.Millisecond) h.serverLatencyMeasure.Record(ctx, elapsedTime, o) } // WithRouteTag annotates spans and metrics with the provided route name // with HTTP route attribute. func WithRouteTag(route string, h http.Handler) http.Handler { attr := semconv.NewHTTPServer().Route(route) return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { span := trace.SpanFromContext(r.Context()) span.SetAttributes(attr) labeler, _ := LabelerFromContext(r.Context()) labeler.Add(attr) h.ServeHTTP(w, r) }) } ================================================ FILE: vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/env.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv" import ( "fmt" "net/http" "os" "strings" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" ) type ResponseTelemetry struct { StatusCode int ReadBytes int64 ReadError error WriteBytes int64 WriteError error } type HTTPServer struct { duplicate bool } // RequestTraceAttrs returns trace attributes for an HTTP request received by a // server. // // The server must be the primary server name if it is known. For example this // would be the ServerName directive // (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache // server, and the server_name directive // (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an // nginx server. More generically, the primary server name would be the host // header value that matches the default virtual host of an HTTP server. It // should include the host identifier and if a port is used to route to the // server that port identifier should be included as an appropriate port // suffix. // // If the primary server name is not known, server should be an empty string. // The req Host will be used to determine the server instead. func (s HTTPServer) RequestTraceAttrs(server string, req *http.Request) []attribute.KeyValue { if s.duplicate { return append(oldHTTPServer{}.RequestTraceAttrs(server, req), newHTTPServer{}.RequestTraceAttrs(server, req)...) } return oldHTTPServer{}.RequestTraceAttrs(server, req) } // ResponseTraceAttrs returns trace attributes for telemetry from an HTTP response. // // If any of the fields in the ResponseTelemetry are not set the attribute will be omitted. func (s HTTPServer) ResponseTraceAttrs(resp ResponseTelemetry) []attribute.KeyValue { if s.duplicate { return append(oldHTTPServer{}.ResponseTraceAttrs(resp), newHTTPServer{}.ResponseTraceAttrs(resp)...) } return oldHTTPServer{}.ResponseTraceAttrs(resp) } // Route returns the attribute for the route. func (s HTTPServer) Route(route string) attribute.KeyValue { return oldHTTPServer{}.Route(route) } func NewHTTPServer() HTTPServer { env := strings.ToLower(os.Getenv("OTEL_HTTP_CLIENT_COMPATIBILITY_MODE")) return HTTPServer{duplicate: env == "http/dup"} } // ServerStatus returns a span status code and message for an HTTP status code // value returned by a server. Status codes in the 400-499 range are not // returned as errors. func ServerStatus(code int) (codes.Code, string) { if code < 100 || code >= 600 { return codes.Error, fmt.Sprintf("Invalid HTTP status code %d", code) } if code >= 500 { return codes.Error, "" } return codes.Unset, "" } ================================================ FILE: vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/util.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv" import ( "net" "net/http" "strconv" "strings" "go.opentelemetry.io/otel/attribute" semconvNew "go.opentelemetry.io/otel/semconv/v1.24.0" ) // splitHostPort splits a network address hostport of the form "host", // "host%zone", "[host]", "[host%zone], "host:port", "host%zone:port", // "[host]:port", "[host%zone]:port", or ":port" into host or host%zone and // port. // // An empty host is returned if it is not provided or unparsable. A negative // port is returned if it is not provided or unparsable. func splitHostPort(hostport string) (host string, port int) { port = -1 if strings.HasPrefix(hostport, "[") { addrEnd := strings.LastIndex(hostport, "]") if addrEnd < 0 { // Invalid hostport. return } if i := strings.LastIndex(hostport[addrEnd:], ":"); i < 0 { host = hostport[1:addrEnd] return } } else { if i := strings.LastIndex(hostport, ":"); i < 0 { host = hostport return } } host, pStr, err := net.SplitHostPort(hostport) if err != nil { return } p, err := strconv.ParseUint(pStr, 10, 16) if err != nil { return } return host, int(p) } func requiredHTTPPort(https bool, port int) int { // nolint:revive if https { if port > 0 && port != 443 { return port } } else { if port > 0 && port != 80 { return port } } return -1 } func serverClientIP(xForwardedFor string) string { if idx := strings.Index(xForwardedFor, ","); idx >= 0 { xForwardedFor = xForwardedFor[:idx] } return xForwardedFor } func netProtocol(proto string) (name string, version string) { name, version, _ = strings.Cut(proto, "/") name = strings.ToLower(name) return name, version } var methodLookup = map[string]attribute.KeyValue{ http.MethodConnect: semconvNew.HTTPRequestMethodConnect, http.MethodDelete: semconvNew.HTTPRequestMethodDelete, http.MethodGet: semconvNew.HTTPRequestMethodGet, http.MethodHead: semconvNew.HTTPRequestMethodHead, http.MethodOptions: semconvNew.HTTPRequestMethodOptions, http.MethodPatch: semconvNew.HTTPRequestMethodPatch, http.MethodPost: semconvNew.HTTPRequestMethodPost, http.MethodPut: semconvNew.HTTPRequestMethodPut, http.MethodTrace: semconvNew.HTTPRequestMethodTrace, } ================================================ FILE: vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/v1.20.0.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv" import ( "errors" "io" "net/http" "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil" "go.opentelemetry.io/otel/attribute" semconv "go.opentelemetry.io/otel/semconv/v1.20.0" ) type oldHTTPServer struct{} // RequestTraceAttrs returns trace attributes for an HTTP request received by a // server. // // The server must be the primary server name if it is known. For example this // would be the ServerName directive // (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache // server, and the server_name directive // (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an // nginx server. More generically, the primary server name would be the host // header value that matches the default virtual host of an HTTP server. It // should include the host identifier and if a port is used to route to the // server that port identifier should be included as an appropriate port // suffix. // // If the primary server name is not known, server should be an empty string. // The req Host will be used to determine the server instead. func (o oldHTTPServer) RequestTraceAttrs(server string, req *http.Request) []attribute.KeyValue { return semconvutil.HTTPServerRequest(server, req) } // ResponseTraceAttrs returns trace attributes for telemetry from an HTTP response. // // If any of the fields in the ResponseTelemetry are not set the attribute will be omitted. func (o oldHTTPServer) ResponseTraceAttrs(resp ResponseTelemetry) []attribute.KeyValue { attributes := []attribute.KeyValue{} if resp.ReadBytes > 0 { attributes = append(attributes, semconv.HTTPRequestContentLength(int(resp.ReadBytes))) } if resp.ReadError != nil && !errors.Is(resp.ReadError, io.EOF) { // This is not in the semantic conventions, but is historically provided attributes = append(attributes, attribute.String("http.read_error", resp.ReadError.Error())) } if resp.WriteBytes > 0 { attributes = append(attributes, semconv.HTTPResponseContentLength(int(resp.WriteBytes))) } if resp.StatusCode > 0 { attributes = append(attributes, semconv.HTTPStatusCode(resp.StatusCode)) } if resp.WriteError != nil && !errors.Is(resp.WriteError, io.EOF) { // This is not in the semantic conventions, but is historically provided attributes = append(attributes, attribute.String("http.write_error", resp.WriteError.Error())) } return attributes } // Route returns the attribute for the route. func (o oldHTTPServer) Route(route string) attribute.KeyValue { return semconv.HTTPRoute(route) } // HTTPStatusCode returns the attribute for the HTTP status code. // This is a temporary function needed by metrics. This will be removed when MetricsRequest is added. func HTTPStatusCode(status int) attribute.KeyValue { return semconv.HTTPStatusCode(status) } ================================================ FILE: vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/v1.24.0.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv" import ( "net/http" "strings" "go.opentelemetry.io/otel/attribute" semconvNew "go.opentelemetry.io/otel/semconv/v1.24.0" ) type newHTTPServer struct{} // TraceRequest returns trace attributes for an HTTP request received by a // server. // // The server must be the primary server name if it is known. For example this // would be the ServerName directive // (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache // server, and the server_name directive // (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an // nginx server. More generically, the primary server name would be the host // header value that matches the default virtual host of an HTTP server. It // should include the host identifier and if a port is used to route to the // server that port identifier should be included as an appropriate port // suffix. // // If the primary server name is not known, server should be an empty string. // The req Host will be used to determine the server instead. func (n newHTTPServer) RequestTraceAttrs(server string, req *http.Request) []attribute.KeyValue { count := 3 // ServerAddress, Method, Scheme var host string var p int if server == "" { host, p = splitHostPort(req.Host) } else { // Prioritize the primary server name. host, p = splitHostPort(server) if p < 0 { _, p = splitHostPort(req.Host) } } hostPort := requiredHTTPPort(req.TLS != nil, p) if hostPort > 0 { count++ } method, methodOriginal := n.method(req.Method) if methodOriginal != (attribute.KeyValue{}) { count++ } scheme := n.scheme(req.TLS != nil) if peer, peerPort := splitHostPort(req.RemoteAddr); peer != "" { // The Go HTTP server sets RemoteAddr to "IP:port", this will not be a // file-path that would be interpreted with a sock family. count++ if peerPort > 0 { count++ } } useragent := req.UserAgent() if useragent != "" { count++ } clientIP := serverClientIP(req.Header.Get("X-Forwarded-For")) if clientIP != "" { count++ } if req.URL != nil && req.URL.Path != "" { count++ } protoName, protoVersion := netProtocol(req.Proto) if protoName != "" && protoName != "http" { count++ } if protoVersion != "" { count++ } attrs := make([]attribute.KeyValue, 0, count) attrs = append(attrs, semconvNew.ServerAddress(host), method, scheme, ) if hostPort > 0 { attrs = append(attrs, semconvNew.ServerPort(hostPort)) } if methodOriginal != (attribute.KeyValue{}) { attrs = append(attrs, methodOriginal) } if peer, peerPort := splitHostPort(req.RemoteAddr); peer != "" { // The Go HTTP server sets RemoteAddr to "IP:port", this will not be a // file-path that would be interpreted with a sock family. attrs = append(attrs, semconvNew.NetworkPeerAddress(peer)) if peerPort > 0 { attrs = append(attrs, semconvNew.NetworkPeerPort(peerPort)) } } if useragent := req.UserAgent(); useragent != "" { attrs = append(attrs, semconvNew.UserAgentOriginal(useragent)) } if clientIP != "" { attrs = append(attrs, semconvNew.ClientAddress(clientIP)) } if req.URL != nil && req.URL.Path != "" { attrs = append(attrs, semconvNew.URLPath(req.URL.Path)) } if protoName != "" && protoName != "http" { attrs = append(attrs, semconvNew.NetworkProtocolName(protoName)) } if protoVersion != "" { attrs = append(attrs, semconvNew.NetworkProtocolVersion(protoVersion)) } return attrs } func (n newHTTPServer) method(method string) (attribute.KeyValue, attribute.KeyValue) { if method == "" { return semconvNew.HTTPRequestMethodGet, attribute.KeyValue{} } if attr, ok := methodLookup[method]; ok { return attr, attribute.KeyValue{} } orig := semconvNew.HTTPRequestMethodOriginal(method) if attr, ok := methodLookup[strings.ToUpper(method)]; ok { return attr, orig } return semconvNew.HTTPRequestMethodGet, orig } func (n newHTTPServer) scheme(https bool) attribute.KeyValue { // nolint:revive if https { return semconvNew.URLScheme("https") } return semconvNew.URLScheme("http") } // TraceResponse returns trace attributes for telemetry from an HTTP response. // // If any of the fields in the ResponseTelemetry are not set the attribute will be omitted. func (n newHTTPServer) ResponseTraceAttrs(resp ResponseTelemetry) []attribute.KeyValue { var count int if resp.ReadBytes > 0 { count++ } if resp.WriteBytes > 0 { count++ } if resp.StatusCode > 0 { count++ } attributes := make([]attribute.KeyValue, 0, count) if resp.ReadBytes > 0 { attributes = append(attributes, semconvNew.HTTPRequestBodySize(int(resp.ReadBytes)), ) } if resp.WriteBytes > 0 { attributes = append(attributes, semconvNew.HTTPResponseBodySize(int(resp.WriteBytes)), ) } if resp.StatusCode > 0 { attributes = append(attributes, semconvNew.HTTPResponseStatusCode(resp.StatusCode), ) } return attributes } // Route returns the attribute for the route. func (n newHTTPServer) Route(route string) attribute.KeyValue { return semconvNew.HTTPRoute(route) } ================================================ FILE: vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/gen.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package semconvutil // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil" // Generate semconvutil package: //go:generate gotmpl --body=../../../../../../internal/shared/semconvutil/httpconv_test.go.tmpl "--data={}" --out=httpconv_test.go //go:generate gotmpl --body=../../../../../../internal/shared/semconvutil/httpconv.go.tmpl "--data={}" --out=httpconv.go //go:generate gotmpl --body=../../../../../../internal/shared/semconvutil/netconv_test.go.tmpl "--data={}" --out=netconv_test.go //go:generate gotmpl --body=../../../../../../internal/shared/semconvutil/netconv.go.tmpl "--data={}" --out=netconv.go ================================================ FILE: vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/httpconv.go ================================================ // Code created by gotmpl. DO NOT MODIFY. // source: internal/shared/semconvutil/httpconv.go.tmpl // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package semconvutil // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil" import ( "fmt" "net/http" "strings" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" semconv "go.opentelemetry.io/otel/semconv/v1.20.0" ) // HTTPClientResponse returns trace attributes for an HTTP response received by a // client from a server. It will return the following attributes if the related // values are defined in resp: "http.status.code", // "http.response_content_length". // // This does not add all OpenTelemetry required attributes for an HTTP event, // it assumes ClientRequest was used to create the span with a complete set of // attributes. If a complete set of attributes can be generated using the // request contained in resp. For example: // // append(HTTPClientResponse(resp), ClientRequest(resp.Request)...) func HTTPClientResponse(resp *http.Response) []attribute.KeyValue { return hc.ClientResponse(resp) } // HTTPClientRequest returns trace attributes for an HTTP request made by a client. // The following attributes are always returned: "http.url", "http.method", // "net.peer.name". The following attributes are returned if the related values // are defined in req: "net.peer.port", "user_agent.original", // "http.request_content_length". func HTTPClientRequest(req *http.Request) []attribute.KeyValue { return hc.ClientRequest(req) } // HTTPClientRequestMetrics returns metric attributes for an HTTP request made by a client. // The following attributes are always returned: "http.method", "net.peer.name". // The following attributes are returned if the // related values are defined in req: "net.peer.port". func HTTPClientRequestMetrics(req *http.Request) []attribute.KeyValue { return hc.ClientRequestMetrics(req) } // HTTPClientStatus returns a span status code and message for an HTTP status code // value received by a client. func HTTPClientStatus(code int) (codes.Code, string) { return hc.ClientStatus(code) } // HTTPServerRequest returns trace attributes for an HTTP request received by a // server. // // The server must be the primary server name if it is known. For example this // would be the ServerName directive // (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache // server, and the server_name directive // (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an // nginx server. More generically, the primary server name would be the host // header value that matches the default virtual host of an HTTP server. It // should include the host identifier and if a port is used to route to the // server that port identifier should be included as an appropriate port // suffix. // // If the primary server name is not known, server should be an empty string. // The req Host will be used to determine the server instead. // // The following attributes are always returned: "http.method", "http.scheme", // "http.target", "net.host.name". The following attributes are returned if // they related values are defined in req: "net.host.port", "net.sock.peer.addr", // "net.sock.peer.port", "user_agent.original", "http.client_ip". func HTTPServerRequest(server string, req *http.Request) []attribute.KeyValue { return hc.ServerRequest(server, req) } // HTTPServerRequestMetrics returns metric attributes for an HTTP request received by a // server. // // The server must be the primary server name if it is known. For example this // would be the ServerName directive // (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache // server, and the server_name directive // (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an // nginx server. More generically, the primary server name would be the host // header value that matches the default virtual host of an HTTP server. It // should include the host identifier and if a port is used to route to the // server that port identifier should be included as an appropriate port // suffix. // // If the primary server name is not known, server should be an empty string. // The req Host will be used to determine the server instead. // // The following attributes are always returned: "http.method", "http.scheme", // "net.host.name". The following attributes are returned if they related // values are defined in req: "net.host.port". func HTTPServerRequestMetrics(server string, req *http.Request) []attribute.KeyValue { return hc.ServerRequestMetrics(server, req) } // HTTPServerStatus returns a span status code and message for an HTTP status code // value returned by a server. Status codes in the 400-499 range are not // returned as errors. func HTTPServerStatus(code int) (codes.Code, string) { return hc.ServerStatus(code) } // httpConv are the HTTP semantic convention attributes defined for a version // of the OpenTelemetry specification. type httpConv struct { NetConv *netConv HTTPClientIPKey attribute.Key HTTPMethodKey attribute.Key HTTPRequestContentLengthKey attribute.Key HTTPResponseContentLengthKey attribute.Key HTTPRouteKey attribute.Key HTTPSchemeHTTP attribute.KeyValue HTTPSchemeHTTPS attribute.KeyValue HTTPStatusCodeKey attribute.Key HTTPTargetKey attribute.Key HTTPURLKey attribute.Key UserAgentOriginalKey attribute.Key } var hc = &httpConv{ NetConv: nc, HTTPClientIPKey: semconv.HTTPClientIPKey, HTTPMethodKey: semconv.HTTPMethodKey, HTTPRequestContentLengthKey: semconv.HTTPRequestContentLengthKey, HTTPResponseContentLengthKey: semconv.HTTPResponseContentLengthKey, HTTPRouteKey: semconv.HTTPRouteKey, HTTPSchemeHTTP: semconv.HTTPSchemeHTTP, HTTPSchemeHTTPS: semconv.HTTPSchemeHTTPS, HTTPStatusCodeKey: semconv.HTTPStatusCodeKey, HTTPTargetKey: semconv.HTTPTargetKey, HTTPURLKey: semconv.HTTPURLKey, UserAgentOriginalKey: semconv.UserAgentOriginalKey, } // ClientResponse returns attributes for an HTTP response received by a client // from a server. The following attributes are returned if the related values // are defined in resp: "http.status.code", "http.response_content_length". // // This does not add all OpenTelemetry required attributes for an HTTP event, // it assumes ClientRequest was used to create the span with a complete set of // attributes. If a complete set of attributes can be generated using the // request contained in resp. For example: // // append(ClientResponse(resp), ClientRequest(resp.Request)...) func (c *httpConv) ClientResponse(resp *http.Response) []attribute.KeyValue { /* The following semantic conventions are returned if present: http.status_code int http.response_content_length int */ var n int if resp.StatusCode > 0 { n++ } if resp.ContentLength > 0 { n++ } attrs := make([]attribute.KeyValue, 0, n) if resp.StatusCode > 0 { attrs = append(attrs, c.HTTPStatusCodeKey.Int(resp.StatusCode)) } if resp.ContentLength > 0 { attrs = append(attrs, c.HTTPResponseContentLengthKey.Int(int(resp.ContentLength))) } return attrs } // ClientRequest returns attributes for an HTTP request made by a client. The // following attributes are always returned: "http.url", "http.method", // "net.peer.name". The following attributes are returned if the related values // are defined in req: "net.peer.port", "user_agent.original", // "http.request_content_length", "user_agent.original". func (c *httpConv) ClientRequest(req *http.Request) []attribute.KeyValue { /* The following semantic conventions are returned if present: http.method string user_agent.original string http.url string net.peer.name string net.peer.port int http.request_content_length int */ /* The following semantic conventions are not returned: http.status_code This requires the response. See ClientResponse. http.response_content_length This requires the response. See ClientResponse. net.sock.family This requires the socket used. net.sock.peer.addr This requires the socket used. net.sock.peer.name This requires the socket used. net.sock.peer.port This requires the socket used. http.resend_count This is something outside of a single request. net.protocol.name The value is the Request is ignored, and the go client will always use "http". net.protocol.version The value in the Request is ignored, and the go client will always use 1.1 or 2.0. */ n := 3 // URL, peer name, proto, and method. var h string if req.URL != nil { h = req.URL.Host } peer, p := firstHostPort(h, req.Header.Get("Host")) port := requiredHTTPPort(req.URL != nil && req.URL.Scheme == "https", p) if port > 0 { n++ } useragent := req.UserAgent() if useragent != "" { n++ } if req.ContentLength > 0 { n++ } attrs := make([]attribute.KeyValue, 0, n) attrs = append(attrs, c.method(req.Method)) var u string if req.URL != nil { // Remove any username/password info that may be in the URL. userinfo := req.URL.User req.URL.User = nil u = req.URL.String() // Restore any username/password info that was removed. req.URL.User = userinfo } attrs = append(attrs, c.HTTPURLKey.String(u)) attrs = append(attrs, c.NetConv.PeerName(peer)) if port > 0 { attrs = append(attrs, c.NetConv.PeerPort(port)) } if useragent != "" { attrs = append(attrs, c.UserAgentOriginalKey.String(useragent)) } if l := req.ContentLength; l > 0 { attrs = append(attrs, c.HTTPRequestContentLengthKey.Int64(l)) } return attrs } // ClientRequestMetrics returns metric attributes for an HTTP request made by a client. The // following attributes are always returned: "http.method", "net.peer.name". // The following attributes are returned if the related values // are defined in req: "net.peer.port". func (c *httpConv) ClientRequestMetrics(req *http.Request) []attribute.KeyValue { /* The following semantic conventions are returned if present: http.method string net.peer.name string net.peer.port int */ n := 2 // method, peer name. var h string if req.URL != nil { h = req.URL.Host } peer, p := firstHostPort(h, req.Header.Get("Host")) port := requiredHTTPPort(req.URL != nil && req.URL.Scheme == "https", p) if port > 0 { n++ } attrs := make([]attribute.KeyValue, 0, n) attrs = append(attrs, c.method(req.Method), c.NetConv.PeerName(peer)) if port > 0 { attrs = append(attrs, c.NetConv.PeerPort(port)) } return attrs } // ServerRequest returns attributes for an HTTP request received by a server. // // The server must be the primary server name if it is known. For example this // would be the ServerName directive // (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache // server, and the server_name directive // (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an // nginx server. More generically, the primary server name would be the host // header value that matches the default virtual host of an HTTP server. It // should include the host identifier and if a port is used to route to the // server that port identifier should be included as an appropriate port // suffix. // // If the primary server name is not known, server should be an empty string. // The req Host will be used to determine the server instead. // // The following attributes are always returned: "http.method", "http.scheme", // "http.target", "net.host.name". The following attributes are returned if they // related values are defined in req: "net.host.port", "net.sock.peer.addr", // "net.sock.peer.port", "user_agent.original", "http.client_ip", // "net.protocol.name", "net.protocol.version". func (c *httpConv) ServerRequest(server string, req *http.Request) []attribute.KeyValue { /* The following semantic conventions are returned if present: http.method string http.scheme string net.host.name string net.host.port int net.sock.peer.addr string net.sock.peer.port int user_agent.original string http.client_ip string net.protocol.name string Note: not set if the value is "http". net.protocol.version string http.target string Note: doesn't include the query parameter. */ /* The following semantic conventions are not returned: http.status_code This requires the response. http.request_content_length This requires the len() of body, which can mutate it. http.response_content_length This requires the response. http.route This is not available. net.sock.peer.name This would require a DNS lookup. net.sock.host.addr The request doesn't have access to the underlying socket. net.sock.host.port The request doesn't have access to the underlying socket. */ n := 4 // Method, scheme, proto, and host name. var host string var p int if server == "" { host, p = splitHostPort(req.Host) } else { // Prioritize the primary server name. host, p = splitHostPort(server) if p < 0 { _, p = splitHostPort(req.Host) } } hostPort := requiredHTTPPort(req.TLS != nil, p) if hostPort > 0 { n++ } peer, peerPort := splitHostPort(req.RemoteAddr) if peer != "" { n++ if peerPort > 0 { n++ } } useragent := req.UserAgent() if useragent != "" { n++ } clientIP := serverClientIP(req.Header.Get("X-Forwarded-For")) if clientIP != "" { n++ } var target string if req.URL != nil { target = req.URL.Path if target != "" { n++ } } protoName, protoVersion := netProtocol(req.Proto) if protoName != "" && protoName != "http" { n++ } if protoVersion != "" { n++ } attrs := make([]attribute.KeyValue, 0, n) attrs = append(attrs, c.method(req.Method)) attrs = append(attrs, c.scheme(req.TLS != nil)) attrs = append(attrs, c.NetConv.HostName(host)) if hostPort > 0 { attrs = append(attrs, c.NetConv.HostPort(hostPort)) } if peer != "" { // The Go HTTP server sets RemoteAddr to "IP:port", this will not be a // file-path that would be interpreted with a sock family. attrs = append(attrs, c.NetConv.SockPeerAddr(peer)) if peerPort > 0 { attrs = append(attrs, c.NetConv.SockPeerPort(peerPort)) } } if useragent != "" { attrs = append(attrs, c.UserAgentOriginalKey.String(useragent)) } if clientIP != "" { attrs = append(attrs, c.HTTPClientIPKey.String(clientIP)) } if target != "" { attrs = append(attrs, c.HTTPTargetKey.String(target)) } if protoName != "" && protoName != "http" { attrs = append(attrs, c.NetConv.NetProtocolName.String(protoName)) } if protoVersion != "" { attrs = append(attrs, c.NetConv.NetProtocolVersion.String(protoVersion)) } return attrs } // ServerRequestMetrics returns metric attributes for an HTTP request received // by a server. // // The server must be the primary server name if it is known. For example this // would be the ServerName directive // (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache // server, and the server_name directive // (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an // nginx server. More generically, the primary server name would be the host // header value that matches the default virtual host of an HTTP server. It // should include the host identifier and if a port is used to route to the // server that port identifier should be included as an appropriate port // suffix. // // If the primary server name is not known, server should be an empty string. // The req Host will be used to determine the server instead. // // The following attributes are always returned: "http.method", "http.scheme", // "net.host.name". The following attributes are returned if they related // values are defined in req: "net.host.port". func (c *httpConv) ServerRequestMetrics(server string, req *http.Request) []attribute.KeyValue { /* The following semantic conventions are returned if present: http.scheme string http.route string http.method string http.status_code int net.host.name string net.host.port int net.protocol.name string Note: not set if the value is "http". net.protocol.version string */ n := 3 // Method, scheme, and host name. var host string var p int if server == "" { host, p = splitHostPort(req.Host) } else { // Prioritize the primary server name. host, p = splitHostPort(server) if p < 0 { _, p = splitHostPort(req.Host) } } hostPort := requiredHTTPPort(req.TLS != nil, p) if hostPort > 0 { n++ } protoName, protoVersion := netProtocol(req.Proto) if protoName != "" { n++ } if protoVersion != "" { n++ } attrs := make([]attribute.KeyValue, 0, n) attrs = append(attrs, c.methodMetric(req.Method)) attrs = append(attrs, c.scheme(req.TLS != nil)) attrs = append(attrs, c.NetConv.HostName(host)) if hostPort > 0 { attrs = append(attrs, c.NetConv.HostPort(hostPort)) } if protoName != "" { attrs = append(attrs, c.NetConv.NetProtocolName.String(protoName)) } if protoVersion != "" { attrs = append(attrs, c.NetConv.NetProtocolVersion.String(protoVersion)) } return attrs } func (c *httpConv) method(method string) attribute.KeyValue { if method == "" { return c.HTTPMethodKey.String(http.MethodGet) } return c.HTTPMethodKey.String(method) } func (c *httpConv) methodMetric(method string) attribute.KeyValue { method = strings.ToUpper(method) switch method { case http.MethodConnect, http.MethodDelete, http.MethodGet, http.MethodHead, http.MethodOptions, http.MethodPatch, http.MethodPost, http.MethodPut, http.MethodTrace: default: method = "_OTHER" } return c.HTTPMethodKey.String(method) } func (c *httpConv) scheme(https bool) attribute.KeyValue { // nolint:revive if https { return c.HTTPSchemeHTTPS } return c.HTTPSchemeHTTP } func serverClientIP(xForwardedFor string) string { if idx := strings.Index(xForwardedFor, ","); idx >= 0 { xForwardedFor = xForwardedFor[:idx] } return xForwardedFor } func requiredHTTPPort(https bool, port int) int { // nolint:revive if https { if port > 0 && port != 443 { return port } } else { if port > 0 && port != 80 { return port } } return -1 } // Return the request host and port from the first non-empty source. func firstHostPort(source ...string) (host string, port int) { for _, hostport := range source { host, port = splitHostPort(hostport) if host != "" || port > 0 { break } } return } // ClientStatus returns a span status code and message for an HTTP status code // value received by a client. func (c *httpConv) ClientStatus(code int) (codes.Code, string) { if code < 100 || code >= 600 { return codes.Error, fmt.Sprintf("Invalid HTTP status code %d", code) } if code >= 400 { return codes.Error, "" } return codes.Unset, "" } // ServerStatus returns a span status code and message for an HTTP status code // value returned by a server. Status codes in the 400-499 range are not // returned as errors. func (c *httpConv) ServerStatus(code int) (codes.Code, string) { if code < 100 || code >= 600 { return codes.Error, fmt.Sprintf("Invalid HTTP status code %d", code) } if code >= 500 { return codes.Error, "" } return codes.Unset, "" } ================================================ FILE: vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/netconv.go ================================================ // Code created by gotmpl. DO NOT MODIFY. // source: internal/shared/semconvutil/netconv.go.tmpl // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package semconvutil // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil" import ( "net" "strconv" "strings" "go.opentelemetry.io/otel/attribute" semconv "go.opentelemetry.io/otel/semconv/v1.20.0" ) // NetTransport returns a trace attribute describing the transport protocol of the // passed network. See the net.Dial for information about acceptable network // values. func NetTransport(network string) attribute.KeyValue { return nc.Transport(network) } // netConv are the network semantic convention attributes defined for a version // of the OpenTelemetry specification. type netConv struct { NetHostNameKey attribute.Key NetHostPortKey attribute.Key NetPeerNameKey attribute.Key NetPeerPortKey attribute.Key NetProtocolName attribute.Key NetProtocolVersion attribute.Key NetSockFamilyKey attribute.Key NetSockPeerAddrKey attribute.Key NetSockPeerPortKey attribute.Key NetSockHostAddrKey attribute.Key NetSockHostPortKey attribute.Key NetTransportOther attribute.KeyValue NetTransportTCP attribute.KeyValue NetTransportUDP attribute.KeyValue NetTransportInProc attribute.KeyValue } var nc = &netConv{ NetHostNameKey: semconv.NetHostNameKey, NetHostPortKey: semconv.NetHostPortKey, NetPeerNameKey: semconv.NetPeerNameKey, NetPeerPortKey: semconv.NetPeerPortKey, NetProtocolName: semconv.NetProtocolNameKey, NetProtocolVersion: semconv.NetProtocolVersionKey, NetSockFamilyKey: semconv.NetSockFamilyKey, NetSockPeerAddrKey: semconv.NetSockPeerAddrKey, NetSockPeerPortKey: semconv.NetSockPeerPortKey, NetSockHostAddrKey: semconv.NetSockHostAddrKey, NetSockHostPortKey: semconv.NetSockHostPortKey, NetTransportOther: semconv.NetTransportOther, NetTransportTCP: semconv.NetTransportTCP, NetTransportUDP: semconv.NetTransportUDP, NetTransportInProc: semconv.NetTransportInProc, } func (c *netConv) Transport(network string) attribute.KeyValue { switch network { case "tcp", "tcp4", "tcp6": return c.NetTransportTCP case "udp", "udp4", "udp6": return c.NetTransportUDP case "unix", "unixgram", "unixpacket": return c.NetTransportInProc default: // "ip:*", "ip4:*", and "ip6:*" all are considered other. return c.NetTransportOther } } // Host returns attributes for a network host address. func (c *netConv) Host(address string) []attribute.KeyValue { h, p := splitHostPort(address) var n int if h != "" { n++ if p > 0 { n++ } } if n == 0 { return nil } attrs := make([]attribute.KeyValue, 0, n) attrs = append(attrs, c.HostName(h)) if p > 0 { attrs = append(attrs, c.HostPort(p)) } return attrs } func (c *netConv) HostName(name string) attribute.KeyValue { return c.NetHostNameKey.String(name) } func (c *netConv) HostPort(port int) attribute.KeyValue { return c.NetHostPortKey.Int(port) } func family(network, address string) string { switch network { case "unix", "unixgram", "unixpacket": return "unix" default: if ip := net.ParseIP(address); ip != nil { if ip.To4() == nil { return "inet6" } return "inet" } } return "" } // Peer returns attributes for a network peer address. func (c *netConv) Peer(address string) []attribute.KeyValue { h, p := splitHostPort(address) var n int if h != "" { n++ if p > 0 { n++ } } if n == 0 { return nil } attrs := make([]attribute.KeyValue, 0, n) attrs = append(attrs, c.PeerName(h)) if p > 0 { attrs = append(attrs, c.PeerPort(p)) } return attrs } func (c *netConv) PeerName(name string) attribute.KeyValue { return c.NetPeerNameKey.String(name) } func (c *netConv) PeerPort(port int) attribute.KeyValue { return c.NetPeerPortKey.Int(port) } func (c *netConv) SockPeerAddr(addr string) attribute.KeyValue { return c.NetSockPeerAddrKey.String(addr) } func (c *netConv) SockPeerPort(port int) attribute.KeyValue { return c.NetSockPeerPortKey.Int(port) } // splitHostPort splits a network address hostport of the form "host", // "host%zone", "[host]", "[host%zone], "host:port", "host%zone:port", // "[host]:port", "[host%zone]:port", or ":port" into host or host%zone and // port. // // An empty host is returned if it is not provided or unparsable. A negative // port is returned if it is not provided or unparsable. func splitHostPort(hostport string) (host string, port int) { port = -1 if strings.HasPrefix(hostport, "[") { addrEnd := strings.LastIndex(hostport, "]") if addrEnd < 0 { // Invalid hostport. return } if i := strings.LastIndex(hostport[addrEnd:], ":"); i < 0 { host = hostport[1:addrEnd] return } } else { if i := strings.LastIndex(hostport, ":"); i < 0 { host = hostport return } } host, pStr, err := net.SplitHostPort(hostport) if err != nil { return } p, err := strconv.ParseUint(pStr, 10, 16) if err != nil { return } return host, int(p) } func netProtocol(proto string) (name string, version string) { name, version, _ = strings.Cut(proto, "/") name = strings.ToLower(name) return name, version } ================================================ FILE: vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/labeler.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" import ( "context" "sync" "go.opentelemetry.io/otel/attribute" ) // Labeler is used to allow instrumented HTTP handlers to add custom attributes to // the metrics recorded by the net/http instrumentation. type Labeler struct { mu sync.Mutex attributes []attribute.KeyValue } // Add attributes to a Labeler. func (l *Labeler) Add(ls ...attribute.KeyValue) { l.mu.Lock() defer l.mu.Unlock() l.attributes = append(l.attributes, ls...) } // Get returns a copy of the attributes added to the Labeler. func (l *Labeler) Get() []attribute.KeyValue { l.mu.Lock() defer l.mu.Unlock() ret := make([]attribute.KeyValue, len(l.attributes)) copy(ret, l.attributes) return ret } type labelerContextKeyType int const lablelerContextKey labelerContextKeyType = 0 // ContextWithLabeler returns a new context with the provided Labeler instance. // Attributes added to the specified labeler will be injected into metrics // emitted by the instrumentation. Only one labeller can be injected into the // context. Injecting it multiple times will override the previous calls. func ContextWithLabeler(parent context.Context, l *Labeler) context.Context { return context.WithValue(parent, lablelerContextKey, l) } // LabelerFromContext retrieves a Labeler instance from the provided context if // one is available. If no Labeler was found in the provided context a new, empty // Labeler is returned and the second return value is false. In this case it is // safe to use the Labeler but any attributes added to it will not be used. func LabelerFromContext(ctx context.Context) (*Labeler, bool) { l, ok := ctx.Value(lablelerContextKey).(*Labeler) if !ok { l = &Labeler{} } return l, ok } ================================================ FILE: vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" import ( "context" "io" "net/http" "net/http/httptrace" "sync/atomic" "time" "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/propagation" semconv "go.opentelemetry.io/otel/semconv/v1.20.0" "go.opentelemetry.io/otel/trace" ) // Transport implements the http.RoundTripper interface and wraps // outbound HTTP(S) requests with a span and enriches it with metrics. type Transport struct { rt http.RoundTripper tracer trace.Tracer meter metric.Meter propagators propagation.TextMapPropagator spanStartOptions []trace.SpanStartOption filters []Filter spanNameFormatter func(string, *http.Request) string clientTrace func(context.Context) *httptrace.ClientTrace requestBytesCounter metric.Int64Counter responseBytesCounter metric.Int64Counter latencyMeasure metric.Float64Histogram } var _ http.RoundTripper = &Transport{} // NewTransport wraps the provided http.RoundTripper with one that // starts a span, injects the span context into the outbound request headers, // and enriches it with metrics. // // If the provided http.RoundTripper is nil, http.DefaultTransport will be used // as the base http.RoundTripper. func NewTransport(base http.RoundTripper, opts ...Option) *Transport { if base == nil { base = http.DefaultTransport } t := Transport{ rt: base, } defaultOpts := []Option{ WithSpanOptions(trace.WithSpanKind(trace.SpanKindClient)), WithSpanNameFormatter(defaultTransportFormatter), } c := newConfig(append(defaultOpts, opts...)...) t.applyConfig(c) t.createMeasures() return &t } func (t *Transport) applyConfig(c *config) { t.tracer = c.Tracer t.meter = c.Meter t.propagators = c.Propagators t.spanStartOptions = c.SpanStartOptions t.filters = c.Filters t.spanNameFormatter = c.SpanNameFormatter t.clientTrace = c.ClientTrace } func (t *Transport) createMeasures() { var err error t.requestBytesCounter, err = t.meter.Int64Counter( clientRequestSize, metric.WithUnit("By"), metric.WithDescription("Measures the size of HTTP request messages."), ) handleErr(err) t.responseBytesCounter, err = t.meter.Int64Counter( clientResponseSize, metric.WithUnit("By"), metric.WithDescription("Measures the size of HTTP response messages."), ) handleErr(err) t.latencyMeasure, err = t.meter.Float64Histogram( clientDuration, metric.WithUnit("ms"), metric.WithDescription("Measures the duration of outbound HTTP requests."), ) handleErr(err) } func defaultTransportFormatter(_ string, r *http.Request) string { return "HTTP " + r.Method } // RoundTrip creates a Span and propagates its context via the provided request's headers // before handing the request to the configured base RoundTripper. The created span will // end when the response body is closed or when a read from the body returns io.EOF. func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) { requestStartTime := time.Now() for _, f := range t.filters { if !f(r) { // Simply pass through to the base RoundTripper if a filter rejects the request return t.rt.RoundTrip(r) } } tracer := t.tracer if tracer == nil { if span := trace.SpanFromContext(r.Context()); span.SpanContext().IsValid() { tracer = newTracer(span.TracerProvider()) } else { tracer = newTracer(otel.GetTracerProvider()) } } opts := append([]trace.SpanStartOption{}, t.spanStartOptions...) // start with the configured options ctx, span := tracer.Start(r.Context(), t.spanNameFormatter("", r), opts...) if t.clientTrace != nil { ctx = httptrace.WithClientTrace(ctx, t.clientTrace(ctx)) } labeler, found := LabelerFromContext(ctx) if !found { ctx = ContextWithLabeler(ctx, labeler) } r = r.Clone(ctx) // According to RoundTripper spec, we shouldn't modify the origin request. // use a body wrapper to determine the request size var bw bodyWrapper // if request body is nil or NoBody, we don't want to mutate the body as it // will affect the identity of it in an unforeseeable way because we assert // ReadCloser fulfills a certain interface and it is indeed nil or NoBody. if r.Body != nil && r.Body != http.NoBody { bw.ReadCloser = r.Body // noop to prevent nil panic. not using this record fun yet. bw.record = func(int64) {} r.Body = &bw } span.SetAttributes(semconvutil.HTTPClientRequest(r)...) t.propagators.Inject(ctx, propagation.HeaderCarrier(r.Header)) res, err := t.rt.RoundTrip(r) if err != nil { span.RecordError(err) span.SetStatus(codes.Error, err.Error()) span.End() return res, err } // metrics metricAttrs := append(labeler.Get(), semconvutil.HTTPClientRequestMetrics(r)...) if res.StatusCode > 0 { metricAttrs = append(metricAttrs, semconv.HTTPStatusCode(res.StatusCode)) } o := metric.WithAttributeSet(attribute.NewSet(metricAttrs...)) addOpts := []metric.AddOption{o} // Allocate vararg slice once. t.requestBytesCounter.Add(ctx, bw.read.Load(), addOpts...) // For handling response bytes we leverage a callback when the client reads the http response readRecordFunc := func(n int64) { t.responseBytesCounter.Add(ctx, n, addOpts...) } // traces span.SetAttributes(semconvutil.HTTPClientResponse(res)...) span.SetStatus(semconvutil.HTTPClientStatus(res.StatusCode)) res.Body = newWrappedBody(span, readRecordFunc, res.Body) // Use floating point division here for higher precision (instead of Millisecond method). elapsedTime := float64(time.Since(requestStartTime)) / float64(time.Millisecond) t.latencyMeasure.Record(ctx, elapsedTime, o) return res, err } // newWrappedBody returns a new and appropriately scoped *wrappedBody as an // io.ReadCloser. If the passed body implements io.Writer, the returned value // will implement io.ReadWriteCloser. func newWrappedBody(span trace.Span, record func(n int64), body io.ReadCloser) io.ReadCloser { // The successful protocol switch responses will have a body that // implement an io.ReadWriteCloser. Ensure this interface type continues // to be satisfied if that is the case. if _, ok := body.(io.ReadWriteCloser); ok { return &wrappedBody{span: span, record: record, body: body} } // Remove the implementation of the io.ReadWriteCloser and only implement // the io.ReadCloser. return struct{ io.ReadCloser }{&wrappedBody{span: span, record: record, body: body}} } // wrappedBody is the response body type returned by the transport // instrumentation to complete a span. Errors encountered when using the // response body are recorded in span tracking the response. // // The span tracking the response is ended when this body is closed. // // If the response body implements the io.Writer interface (i.e. for // successful protocol switches), the wrapped body also will. type wrappedBody struct { span trace.Span recorded atomic.Bool record func(n int64) body io.ReadCloser read atomic.Int64 } var _ io.ReadWriteCloser = &wrappedBody{} func (wb *wrappedBody) Write(p []byte) (int, error) { // This will not panic given the guard in newWrappedBody. n, err := wb.body.(io.Writer).Write(p) if err != nil { wb.span.RecordError(err) wb.span.SetStatus(codes.Error, err.Error()) } return n, err } func (wb *wrappedBody) Read(b []byte) (int, error) { n, err := wb.body.Read(b) // Record the number of bytes read wb.read.Add(int64(n)) switch err { case nil: // nothing to do here but fall through to the return case io.EOF: wb.recordBytesRead() wb.span.End() default: wb.span.RecordError(err) wb.span.SetStatus(codes.Error, err.Error()) } return n, err } // recordBytesRead is a function that ensures the number of bytes read is recorded once and only once. func (wb *wrappedBody) recordBytesRead() { // note: it is more performant (and equally correct) to use atomic.Bool over sync.Once here. In the event that // two goroutines are racing to call this method, the number of bytes read will no longer increase. Using // CompareAndSwap allows later goroutines to return quickly and not block waiting for the race winner to finish // calling wb.record(wb.read.Load()). if wb.recorded.CompareAndSwap(false, true) { // Record the total number of bytes read wb.record(wb.read.Load()) } } func (wb *wrappedBody) Close() error { wb.recordBytesRead() wb.span.End() if wb.body != nil { return wb.body.Close() } return nil } ================================================ FILE: vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" // Version is the current release version of the otelhttp instrumentation. func Version() string { return "0.53.0" // This string is updated by the pre_release.sh script during release } // SemVersion is the semantic version to be supplied to tracer/meter creation. // // Deprecated: Use [Version] instead. func SemVersion() string { return Version() } ================================================ FILE: vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/wrap.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" import ( "context" "io" "net/http" "sync/atomic" "go.opentelemetry.io/otel/propagation" ) var _ io.ReadCloser = &bodyWrapper{} // bodyWrapper wraps a http.Request.Body (an io.ReadCloser) to track the number // of bytes read and the last error. type bodyWrapper struct { io.ReadCloser record func(n int64) // must not be nil read atomic.Int64 err error } func (w *bodyWrapper) Read(b []byte) (int, error) { n, err := w.ReadCloser.Read(b) n1 := int64(n) w.read.Add(n1) w.err = err w.record(n1) return n, err } func (w *bodyWrapper) Close() error { return w.ReadCloser.Close() } var _ http.ResponseWriter = &respWriterWrapper{} // respWriterWrapper wraps a http.ResponseWriter in order to track the number of // bytes written, the last error, and to catch the first written statusCode. // TODO: The wrapped http.ResponseWriter doesn't implement any of the optional // types (http.Hijacker, http.Pusher, http.CloseNotifier, http.Flusher, etc) // that may be useful when using it in real life situations. type respWriterWrapper struct { http.ResponseWriter record func(n int64) // must not be nil // used to inject the header ctx context.Context props propagation.TextMapPropagator written int64 statusCode int err error wroteHeader bool } func (w *respWriterWrapper) Header() http.Header { return w.ResponseWriter.Header() } func (w *respWriterWrapper) Write(p []byte) (int, error) { if !w.wroteHeader { w.WriteHeader(http.StatusOK) } n, err := w.ResponseWriter.Write(p) n1 := int64(n) w.record(n1) w.written += n1 w.err = err return n, err } // WriteHeader persists initial statusCode for span attribution. // All calls to WriteHeader will be propagated to the underlying ResponseWriter // and will persist the statusCode from the first call. // Blocking consecutive calls to WriteHeader alters expected behavior and will // remove warning logs from net/http where developers will notice incorrect handler implementations. func (w *respWriterWrapper) WriteHeader(statusCode int) { if !w.wroteHeader { w.wroteHeader = true w.statusCode = statusCode } w.ResponseWriter.WriteHeader(statusCode) } func (w *respWriterWrapper) Flush() { if !w.wroteHeader { w.WriteHeader(http.StatusOK) } if f, ok := w.ResponseWriter.(http.Flusher); ok { f.Flush() } } ================================================ FILE: vendor/go.opentelemetry.io/otel/.codespellignore ================================================ ot fo te collison consequentially ans nam valu thirdparty ================================================ FILE: vendor/go.opentelemetry.io/otel/.codespellrc ================================================ # https://github.com/codespell-project/codespell [codespell] builtin = clear,rare,informal check-filenames = check-hidden = ignore-words = .codespellignore interactive = 1 skip = .git,go.mod,go.sum,go.work,go.work.sum,semconv,venv,.tools uri-ignore-words-list = * write = ================================================ FILE: vendor/go.opentelemetry.io/otel/.gitattributes ================================================ * text=auto eol=lf *.{cmd,[cC][mM][dD]} text eol=crlf *.{bat,[bB][aA][tT]} text eol=crlf ================================================ FILE: vendor/go.opentelemetry.io/otel/.gitignore ================================================ .DS_Store Thumbs.db .tools/ venv/ .idea/ .vscode/ *.iml *.so coverage.* go.work go.work.sum gen/ /example/dice/dice /example/namedtracer/namedtracer /example/otel-collector/otel-collector /example/opencensus/opencensus /example/passthrough/passthrough /example/prometheus/prometheus /example/zipkin/zipkin ================================================ FILE: vendor/go.opentelemetry.io/otel/.golangci.yml ================================================ # See https://github.com/golangci/golangci-lint#config-file run: issues-exit-code: 1 #Default tests: true #Default linters: # Disable everything by default so upgrades to not include new "default # enabled" linters. disable-all: true # Specifically enable linters we want to use. enable: - depguard - errcheck - errorlint - godot - gofumpt - goimports - gosec - gosimple - govet - ineffassign - misspell - revive - staticcheck - tenv - typecheck - unconvert - unused - unparam issues: # Maximum issues count per one linter. # Set to 0 to disable. # Default: 50 # Setting to unlimited so the linter only is run once to debug all issues. max-issues-per-linter: 0 # Maximum count of issues with the same text. # Set to 0 to disable. # Default: 3 # Setting to unlimited so the linter only is run once to debug all issues. max-same-issues: 0 # Excluding configuration per-path, per-linter, per-text and per-source. exclude-rules: # TODO: Having appropriate comments for exported objects helps development, # even for objects in internal packages. Appropriate comments for all # exported objects should be added and this exclusion removed. - path: '.*internal/.*' text: "exported (method|function|type|const) (.+) should have comment or be unexported" linters: - revive # Yes, they are, but it's okay in a test. - path: _test\.go text: "exported func.*returns unexported type.*which can be annoying to use" linters: - revive # Example test functions should be treated like main. - path: example.*_test\.go text: "calls to (.+) only in main[(][)] or init[(][)] functions" linters: - revive # It's okay to not run gosec in a test. - path: _test\.go linters: - gosec # Igonoring gosec G404: Use of weak random number generator (math/rand instead of crypto/rand) # as we commonly use it in tests and examples. - text: "G404:" linters: - gosec # Igonoring gosec G402: TLS MinVersion too low # as the https://pkg.go.dev/crypto/tls#Config handles MinVersion default well. - text: "G402: TLS MinVersion too low." linters: - gosec include: # revive exported should have comment or be unexported. - EXC0012 # revive package comment should be of the form ... - EXC0013 linters-settings: depguard: rules: non-tests: files: - "!$test" - "!**/*test/*.go" - "!**/internal/matchers/*.go" deny: - pkg: "testing" - pkg: "github.com/stretchr/testify" - pkg: "crypto/md5" - pkg: "crypto/sha1" - pkg: "crypto/**/pkix" otlp-internal: files: - "!**/exporters/otlp/internal/**/*.go" deny: - pkg: "go.opentelemetry.io/otel/exporters/otlp/internal" desc: Do not use cross-module internal packages. otlptrace-internal: files: - "!**/exporters/otlp/otlptrace/*.go" - "!**/exporters/otlp/otlptrace/internal/**.go" deny: - pkg: "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal" desc: Do not use cross-module internal packages. otlpmetric-internal: files: - "!**/exporters/otlp/otlpmetric/internal/*.go" - "!**/exporters/otlp/otlpmetric/internal/**/*.go" deny: - pkg: "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal" desc: Do not use cross-module internal packages. otel-internal: files: - "**/sdk/*.go" - "**/sdk/**/*.go" - "**/exporters/*.go" - "**/exporters/**/*.go" - "**/schema/*.go" - "**/schema/**/*.go" - "**/metric/*.go" - "**/metric/**/*.go" - "**/bridge/*.go" - "**/bridge/**/*.go" - "**/example/*.go" - "**/example/**/*.go" - "**/trace/*.go" - "**/trace/**/*.go" - "**/log/*.go" - "**/log/**/*.go" deny: - pkg: "go.opentelemetry.io/otel/internal$" desc: Do not use cross-module internal packages. - pkg: "go.opentelemetry.io/otel/internal/attribute" desc: Do not use cross-module internal packages. - pkg: "go.opentelemetry.io/otel/internal/internaltest" desc: Do not use cross-module internal packages. - pkg: "go.opentelemetry.io/otel/internal/matchers" desc: Do not use cross-module internal packages. godot: exclude: # Exclude links. - '^ *\[[^]]+\]:' # Exclude sentence fragments for lists. - '^[ ]*[-•]' # Exclude sentences prefixing a list. - ':$' goimports: local-prefixes: go.opentelemetry.io misspell: locale: US ignore-words: - cancelled revive: # Sets the default failure confidence. # This means that linting errors with less than 0.8 confidence will be ignored. # Default: 0.8 confidence: 0.01 rules: # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#blank-imports - name: blank-imports disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#bool-literal-in-expr - name: bool-literal-in-expr disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#constant-logical-expr - name: constant-logical-expr disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-as-argument # TODO (#3372) re-enable linter when it is compatible. https://github.com/golangci/golangci-lint/issues/3280 - name: context-as-argument disabled: true arguments: allowTypesBefore: "*testing.T" # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-keys-type - name: context-keys-type disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#deep-exit - name: deep-exit disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#defer - name: defer disabled: false arguments: - ["call-chain", "loop"] # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#dot-imports - name: dot-imports disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#duplicated-imports - name: duplicated-imports disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#early-return - name: early-return disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-block - name: empty-block disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-lines - name: empty-lines disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-naming - name: error-naming disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-return - name: error-return disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-strings - name: error-strings disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#errorf - name: errorf disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#exported - name: exported disabled: false arguments: - "sayRepetitiveInsteadOfStutters" # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#flag-parameter - name: flag-parameter disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#identical-branches - name: identical-branches disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#if-return - name: if-return disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#increment-decrement - name: increment-decrement disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#indent-error-flow - name: indent-error-flow disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#import-shadowing - name: import-shadowing disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#package-comments - name: package-comments disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range - name: range disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range-val-in-closure - name: range-val-in-closure disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#range-val-address - name: range-val-address disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#redefines-builtin-id - name: redefines-builtin-id disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#string-format - name: string-format disabled: false arguments: - - panic - '/^[^\n]*$/' - must not contain line breaks # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#struct-tag - name: struct-tag disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#superfluous-else - name: superfluous-else disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#time-equal - name: time-equal disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-naming - name: var-naming disabled: false arguments: - ["ID"] # AllowList - ["Otel", "Aws", "Gcp"] # DenyList # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-declaration - name: var-declaration disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unconditional-recursion - name: unconditional-recursion disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unexported-return - name: unexported-return disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unhandled-error - name: unhandled-error disabled: false arguments: - "fmt.Fprint" - "fmt.Fprintf" - "fmt.Fprintln" - "fmt.Print" - "fmt.Printf" - "fmt.Println" # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unnecessary-stmt - name: unnecessary-stmt disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#useless-break - name: useless-break disabled: false # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#waitgroup-by-value - name: waitgroup-by-value disabled: false ================================================ FILE: vendor/go.opentelemetry.io/otel/.lycheeignore ================================================ http://localhost http://jaeger-collector https://github.com/open-telemetry/opentelemetry-go/milestone/ https://github.com/open-telemetry/opentelemetry-go/projects file:///home/runner/work/opentelemetry-go/opentelemetry-go/libraries file:///home/runner/work/opentelemetry-go/opentelemetry-go/manual ================================================ FILE: vendor/go.opentelemetry.io/otel/.markdownlint.yaml ================================================ # Default state for all rules default: true # ul-style MD004: false # hard-tabs MD010: false # line-length MD013: false # no-duplicate-header MD024: siblings_only: true #single-title MD025: false # ol-prefix MD029: style: ordered # no-inline-html MD033: false # fenced-code-language MD040: false ================================================ FILE: vendor/go.opentelemetry.io/otel/CHANGELOG.md ================================================ # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ## [1.28.0/0.50.0/0.4.0] 2024-07-02 ### Added - The `IsEmpty` method is added to the `Instrument` type in `go.opentelemetry.io/otel/sdk/metric`. This method is used to check if an `Instrument` instance is a zero-value. (#5431) - Store and provide the emitted `context.Context` in `ScopeRecords` of `go.opentelemetry.io/otel/sdk/log/logtest`. (#5468) - The `go.opentelemetry.io/otel/semconv/v1.26.0` package. The package contains semantic conventions from the `v1.26.0` version of the OpenTelemetry Semantic Conventions. (#5476) - The `AssertRecordEqual` method to `go.opentelemetry.io/otel/log/logtest` to allow comparison of two log records in tests. (#5499) - The `WithHeaders` option to `go.opentelemetry.io/otel/exporters/zipkin` to allow configuring custom http headers while exporting spans. (#5530) ### Changed - `Tracer.Start` in `go.opentelemetry.io/otel/trace/noop` no longer allocates a span for empty span context. (#5457) - Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/example/otel-collector`. (#5490) - Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/example/zipkin`. (#5490) - Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/exporters/zipkin`. (#5490) - The exporter no longer exports the deprecated "otel.library.name" or "otel.library.version" attributes. - Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/sdk/resource`. (#5490) - Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/sdk/trace`. (#5490) - `SimpleProcessor.OnEmit` in `go.opentelemetry.io/otel/sdk/log` no longer allocates a slice which makes it possible to have a zero-allocation log processing using `SimpleProcessor`. (#5493) - Use non-generic functions in the `Start` method of `"go.opentelemetry.io/otel/sdk/trace".Trace` to reduce memory allocation. (#5497) - `service.instance.id` is populated for a `Resource` created with `"go.opentelemetry.io/otel/sdk/resource".Default` with a default value when `OTEL_GO_X_RESOURCE` is set. (#5520) - Improve performance of metric instruments in `go.opentelemetry.io/otel/sdk/metric` by removing unnecessary calls to `time.Now`. (#5545) ### Fixed - Log a warning to the OpenTelemetry internal logger when a `Record` in `go.opentelemetry.io/otel/sdk/log` drops an attribute due to a limit being reached. (#5376) - Identify the `Tracer` returned from the global `TracerProvider` in `go.opentelemetry.io/otel/global` with its schema URL. (#5426) - Identify the `Meter` returned from the global `MeterProvider` in `go.opentelemetry.io/otel/global` with its schema URL. (#5426) - Log a warning to the OpenTelemetry internal logger when a `Span` in `go.opentelemetry.io/otel/sdk/trace` drops an attribute, event, or link due to a limit being reached. (#5434) - Document instrument name requirements in `go.opentelemetry.io/otel/metric`. (#5435) - Prevent random number generation data-race for experimental rand exemplars in `go.opentelemetry.io/otel/sdk/metric`. (#5456) - Fix counting number of dropped attributes of `Record` in `go.opentelemetry.io/otel/sdk/log`. (#5464) - Fix panic in baggage creation when a member contains `0x80` char in key or value. (#5494) - Correct comments for the priority of the `WithEndpoint` and `WithEndpointURL` options and their corresponding environment variables in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#5508) - Retry trace and span ID generation if it generated an invalid one in `go.opentelemetry.io/otel/sdk/trace`. (#5514) - Fix stale timestamps reported by the last-value aggregation. (#5517) - Indicate the `Exporter` in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp` must be created by the `New` method. (#5521) - Improved performance in all `{Bool,Int64,Float64,String}SliceValue` functions of `go.opentelemetry.io/attributes` by reducing the number of allocations. (#5549) ## [1.27.0/0.49.0/0.3.0] 2024-05-21 ### Added - Add example for `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. (#5242) - Add `RecordFactory` in `go.opentelemetry.io/otel/sdk/log/logtest` to facilitate testing exporter and processor implementations. (#5258) - Add `RecordFactory` in `go.opentelemetry.io/otel/log/logtest` to facilitate testing bridge implementations. (#5263) - The count of dropped records from the `BatchProcessor` in `go.opentelemetry.io/otel/sdk/log` is logged. (#5276) - Add metrics in the `otel-collector` example. (#5283) - Add the synchronous gauge instrument to `go.opentelemetry.io/otel/metric`. (#5304) - An `int64` or `float64` synchronous gauge instrument can now be created from a `Meter`. - All implementations of the API (`go.opentelemetry.io/otel/metric/noop`, `go.opentelemetry.io/otel/sdk/metric`) are updated to support this instrument. - Add logs to `go.opentelemetry.io/otel/example/dice`. (#5349) ### Changed - The `Shutdown` method of `Exporter` in `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` ignores the context cancellation and always returns `nil`. (#5189) - The `ForceFlush` and `Shutdown` methods of the exporter returned by `New` in `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` ignore the context cancellation and always return `nil`. (#5189) - Apply the value length limits to `Record` attributes in `go.opentelemetry.io/otel/sdk/log`. (#5230) - De-duplicate map attributes added to a `Record` in `go.opentelemetry.io/otel/sdk/log`. (#5230) - `go.opentelemetry.io/otel/exporters/stdout/stdoutlog` won't print timestamps when `WithoutTimestamps` option is set. (#5241) - The `go.opentelemetry.io/otel/exporters/stdout/stdoutlog` exporter won't print `AttributeValueLengthLimit` and `AttributeCountLimit` fields now, instead it prints the `DroppedAttributes` field. (#5272) - Improved performance in the `Stringer` implementation of `go.opentelemetry.io/otel/baggage.Member` by reducing the number of allocations. (#5286) - Set the start time for last-value aggregates in `go.opentelemetry.io/otel/sdk/metric`. (#5305) - The `Span` in `go.opentelemetry.io/otel/sdk/trace` will record links without span context if either non-empty `TraceState` or attributes are provided. (#5315) - Upgrade all dependencies of `go.opentelemetry.io/otel/semconv/v1.24.0` to `go.opentelemetry.io/otel/semconv/v1.25.0`. (#5374) ### Fixed - Comparison of unordered maps for `go.opentelemetry.io/otel/log.KeyValue` and `go.opentelemetry.io/otel/log.Value`. (#5306) - Fix the empty output of `go.opentelemetry.io/otel/log.Value` in `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. (#5311) - Split the behavior of `Recorder` in `go.opentelemetry.io/otel/log/logtest` so it behaves as a `LoggerProvider` only. (#5365) - Fix wrong package name of the error message when parsing endpoint URL in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#5371) - Identify the `Logger` returned from the global `LoggerProvider` in `go.opentelemetry.io/otel/log/global` with its schema URL. (#5375) ## [1.26.0/0.48.0/0.2.0-alpha] 2024-04-24 ### Added - Add `Recorder` in `go.opentelemetry.io/otel/log/logtest` to facilitate testing the log bridge implementations. (#5134) - Add span flags to OTLP spans and links exported by `go.opentelemetry.io/otel/exporters/otlp/otlptrace`. (#5194) - Make the initial alpha release of `go.opentelemetry.io/otel/sdk/log`. This new module contains the Go implementation of the OpenTelemetry Logs SDK. This module is unstable and breaking changes may be introduced. See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. (#5240) - Make the initial alpha release of `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. This new module contains an OTLP exporter that transmits log telemetry using HTTP. This module is unstable and breaking changes may be introduced. See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. (#5240) - Make the initial alpha release of `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. This new module contains an exporter prints log records to STDOUT. This module is unstable and breaking changes may be introduced. See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. (#5240) - The `go.opentelemetry.io/otel/semconv/v1.25.0` package. The package contains semantic conventions from the `v1.25.0` version of the OpenTelemetry Semantic Conventions. (#5254) ### Changed - Update `go.opentelemetry.io/proto/otlp` from v1.1.0 to v1.2.0. (#5177) - Improve performance of baggage member character validation in `go.opentelemetry.io/otel/baggage`. (#5214) - The `otel-collector` example now uses docker compose to bring up services instead of kubernetes. (#5244) ### Fixed - Slice attribute values in `go.opentelemetry.io/otel/attribute` are now emitted as their JSON representation. (#5159) ## [1.25.0/0.47.0/0.0.8/0.1.0-alpha] 2024-04-05 ### Added - Add `WithProxy` option in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4906) - Add `WithProxy` option in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlptracehttp`. (#4906) - Add `AddLink` method to the `Span` interface in `go.opentelemetry.io/otel/trace`. (#5032) - The `Enabled` method is added to the `Logger` interface in `go.opentelemetry.io/otel/log`. This method is used to notify users if a log record will be emitted or not. (#5071) - Add `SeverityUndefined` `const` to `go.opentelemetry.io/otel/log`. This value represents an unset severity level. (#5072) - Add `Empty` function in `go.opentelemetry.io/otel/log` to return a `KeyValue` for an empty value. (#5076) - Add `go.opentelemetry.io/otel/log/global` to manage the global `LoggerProvider`. This package is provided with the anticipation that all functionality will be migrate to `go.opentelemetry.io/otel` when `go.opentelemetry.io/otel/log` stabilizes. At which point, users will be required to migrage their code, and this package will be deprecated then removed. (#5085) - Add support for `Summary` metrics in the `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` exporters. (#5100) - Add `otel.scope.name` and `otel.scope.version` tags to spans exported by `go.opentelemetry.io/otel/exporters/zipkin`. (#5108) - Add support for `AddLink` to `go.opentelemetry.io/otel/bridge/opencensus`. (#5116) - Add `String` method to `Value` and `KeyValue` in `go.opentelemetry.io/otel/log`. (#5117) - Add Exemplar support to `go.opentelemetry.io/otel/exporters/prometheus`. (#5111) - Add metric semantic conventions to `go.opentelemetry.io/otel/semconv/v1.24.0`. Future `semconv` packages will include metric semantic conventions as well. (#4528) ### Changed - `SpanFromContext` and `SpanContextFromContext` in `go.opentelemetry.io/otel/trace` no longer make a heap allocation when the passed context has no span. (#5049) - `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` now create a gRPC client in idle mode and with "dns" as the default resolver using [`grpc.NewClient`](https://pkg.go.dev/google.golang.org/grpc#NewClient). (#5151) Because of that `WithDialOption` ignores [`grpc.WithBlock`](https://pkg.go.dev/google.golang.org/grpc#WithBlock), [`grpc.WithTimeout`](https://pkg.go.dev/google.golang.org/grpc#WithTimeout), and [`grpc.WithReturnConnectionError`](https://pkg.go.dev/google.golang.org/grpc#WithReturnConnectionError). Notice that [`grpc.DialContext`](https://pkg.go.dev/google.golang.org/grpc#DialContext) which was used before is now deprecated. ### Fixed - Clarify the documentation about equivalence guarantees for the `Set` and `Distinct` types in `go.opentelemetry.io/otel/attribute`. (#5027) - Prevent default `ErrorHandler` self-delegation. (#5137) - Update all dependencies to address [GO-2024-2687]. (#5139) ### Removed - Drop support for [Go 1.20]. (#4967) ### Deprecated - Deprecate `go.opentelemetry.io/otel/attribute.Sortable` type. (#4734) - Deprecate `go.opentelemetry.io/otel/attribute.NewSetWithSortable` function. (#4734) - Deprecate `go.opentelemetry.io/otel/attribute.NewSetWithSortableFiltered` function. (#4734) ## [1.24.0/0.46.0/0.0.1-alpha] 2024-02-23 This release is the last to support [Go 1.20]. The next release will require at least [Go 1.21]. ### Added - Support [Go 1.22]. (#4890) - Add exemplar support to `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4900) - Add exemplar support to `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4900) - The `go.opentelemetry.io/otel/log` module is added. This module includes OpenTelemetry Go's implementation of the Logs Bridge API. This module is in an alpha state, it is subject to breaking changes. See our [versioning policy](./VERSIONING.md) for more info. (#4961) - ARM64 platform to the compatibility testing suite. (#4994) ### Fixed - Fix registration of multiple callbacks when using the global meter provider from `go.opentelemetry.io/otel`. (#4945) - Fix negative buckets in output of exponential histograms. (#4956) ## [1.23.1] 2024-02-07 ### Fixed - Register all callbacks passed during observable instrument creation instead of just the last one multiple times in `go.opentelemetry.io/otel/sdk/metric`. (#4888) ## [1.23.0] 2024-02-06 This release contains the first stable, `v1`, release of the following modules: - `go.opentelemetry.io/otel/bridge/opencensus` - `go.opentelemetry.io/otel/bridge/opencensus/test` - `go.opentelemetry.io/otel/example/opencensus` - `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` - `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` - `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. ### Added - Add `WithEndpointURL` option to the `exporters/otlp/otlpmetric/otlpmetricgrpc`, `exporters/otlp/otlpmetric/otlpmetrichttp`, `exporters/otlp/otlptrace/otlptracegrpc` and `exporters/otlp/otlptrace/otlptracehttp` packages. (#4808) - Experimental exemplar exporting is added to the metric SDK. See [metric documentation](./sdk/metric/internal/x/README.md#exemplars) for more information about this feature and how to enable it. (#4871) - `ErrSchemaURLConflict` is added to `go.opentelemetry.io/otel/sdk/resource`. This error is returned when a merge of two `Resource`s with different (non-empty) schema URL is attempted. (#4876) ### Changed - The `Merge` and `New` functions in `go.opentelemetry.io/otel/sdk/resource` now returns a partial result if there is a schema URL merge conflict. Instead of returning `nil` when two `Resource`s with different (non-empty) schema URLs are merged the merged `Resource`, along with the new `ErrSchemaURLConflict` error, is returned. It is up to the user to decide if they want to use the returned `Resource` or not. It may have desired attributes overwritten or include stale semantic conventions. (#4876) ### Fixed - Fix `ContainerID` resource detection on systemd when cgroup path has a colon. (#4449) - Fix `go.opentelemetry.io/otel/sdk/metric` to cache instruments to avoid leaking memory when the same instrument is created multiple times. (#4820) - Fix missing `Mix` and `Max` values for `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` by introducing `MarshalText` and `MarshalJSON` for the `Extrema` type in `go.opentelemetry.io/sdk/metric/metricdata`. (#4827) ## [1.23.0-rc.1] 2024-01-18 This is a release candidate for the v1.23.0 release. That release is expected to include the `v1` release of the following modules: - `go.opentelemetry.io/otel/bridge/opencensus` - `go.opentelemetry.io/otel/bridge/opencensus/test` - `go.opentelemetry.io/otel/example/opencensus` - `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` - `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` - `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. ## [1.22.0/0.45.0] 2024-01-17 ### Added - The `go.opentelemetry.io/otel/semconv/v1.22.0` package. The package contains semantic conventions from the `v1.22.0` version of the OpenTelemetry Semantic Conventions. (#4735) - The `go.opentelemetry.io/otel/semconv/v1.23.0` package. The package contains semantic conventions from the `v1.23.0` version of the OpenTelemetry Semantic Conventions. (#4746) - The `go.opentelemetry.io/otel/semconv/v1.23.1` package. The package contains semantic conventions from the `v1.23.1` version of the OpenTelemetry Semantic Conventions. (#4749) - The `go.opentelemetry.io/otel/semconv/v1.24.0` package. The package contains semantic conventions from the `v1.24.0` version of the OpenTelemetry Semantic Conventions. (#4770) - Add `WithResourceAsConstantLabels` option to apply resource attributes for every metric emitted by the Prometheus exporter. (#4733) - Experimental cardinality limiting is added to the metric SDK. See [metric documentation](./sdk/metric/internal/x/README.md#cardinality-limit) for more information about this feature and how to enable it. (#4457) - Add `NewMemberRaw` and `NewKeyValuePropertyRaw` in `go.opentelemetry.io/otel/baggage`. (#4804) ### Changed - Upgrade all use of `go.opentelemetry.io/otel/semconv` to use `v1.24.0`. (#4754) - Update transformations in `go.opentelemetry.io/otel/exporters/zipkin` to follow `v1.24.0` version of the OpenTelemetry specification. (#4754) - Record synchronous measurements when the passed context is canceled instead of dropping in `go.opentelemetry.io/otel/sdk/metric`. If you do not want to make a measurement when the context is cancelled, you need to handle it yourself (e.g `if ctx.Err() != nil`). (#4671) - Improve `go.opentelemetry.io/otel/trace.TraceState`'s performance. (#4722) - Improve `go.opentelemetry.io/otel/propagation.TraceContext`'s performance. (#4721) - Improve `go.opentelemetry.io/otel/baggage` performance. (#4743) - Improve performance of the `(*Set).Filter` method in `go.opentelemetry.io/otel/attribute` when the passed filter does not filter out any attributes from the set. (#4774) - `Member.String` in `go.opentelemetry.io/otel/baggage` percent-encodes only when necessary. (#4775) - Improve `go.opentelemetry.io/otel/trace.Span`'s performance when adding multiple attributes. (#4818) - `Property.Value` in `go.opentelemetry.io/otel/baggage` now returns a raw string instead of a percent-encoded value. (#4804) ### Fixed - Fix `Parse` in `go.opentelemetry.io/otel/baggage` to validate member value before percent-decoding. (#4755) - Fix whitespace encoding of `Member.String` in `go.opentelemetry.io/otel/baggage`. (#4756) - Fix observable not registered error when the asynchronous instrument has a drop aggregation in `go.opentelemetry.io/otel/sdk/metric`. (#4772) - Fix baggage item key so that it is not canonicalized in `go.opentelemetry.io/otel/bridge/opentracing`. (#4776) - Fix `go.opentelemetry.io/otel/bridge/opentracing` to properly handle baggage values that requires escaping during propagation. (#4804) - Fix a bug where using multiple readers resulted in incorrect asynchronous counter values in `go.opentelemetry.io/otel/sdk/metric`. (#4742) ## [1.21.0/0.44.0] 2023-11-16 ### Removed - Remove the deprecated `go.opentelemetry.io/otel/bridge/opencensus.NewTracer`. (#4706) - Remove the deprecated `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` module. (#4707) - Remove the deprecated `go.opentelemetry.io/otel/example/view` module. (#4708) - Remove the deprecated `go.opentelemetry.io/otel/example/fib` module. (#4723) ### Fixed - Do not parse non-protobuf responses in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4719) - Do not parse non-protobuf responses in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4719) ## [1.20.0/0.43.0] 2023-11-10 This release brings a breaking change for custom trace API implementations. Some interfaces (`TracerProvider`, `Tracer`, `Span`) now embed the `go.opentelemetry.io/otel/trace/embedded` types. Implementers need to update their implementations based on what they want the default behavior to be. See the "API Implementations" section of the [trace API] package documentation for more information about how to accomplish this. ### Added - Add `go.opentelemetry.io/otel/bridge/opencensus.InstallTraceBridge`, which installs the OpenCensus trace bridge, and replaces `opencensus.NewTracer`. (#4567) - Add scope version to trace and metric bridges in `go.opentelemetry.io/otel/bridge/opencensus`. (#4584) - Add the `go.opentelemetry.io/otel/trace/embedded` package to be embedded in the exported trace API interfaces. (#4620) - Add the `go.opentelemetry.io/otel/trace/noop` package as a default no-op implementation of the trace API. (#4620) - Add context propagation in `go.opentelemetry.io/otel/example/dice`. (#4644) - Add view configuration to `go.opentelemetry.io/otel/example/prometheus`. (#4649) - Add `go.opentelemetry.io/otel/metric.WithExplicitBucketBoundaries`, which allows defining default explicit bucket boundaries when creating histogram instruments. (#4603) - Add `Version` function in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4660) - Add `Version` function in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4660) - Add Summary, SummaryDataPoint, and QuantileValue to `go.opentelemetry.io/sdk/metric/metricdata`. (#4622) - `go.opentelemetry.io/otel/bridge/opencensus.NewMetricProducer` now supports exemplars from OpenCensus. (#4585) - Add support for `WithExplicitBucketBoundaries` in `go.opentelemetry.io/otel/sdk/metric`. (#4605) - Add support for Summary metrics in `go.opentelemetry.io/otel/bridge/opencensus`. (#4668) ### Deprecated - Deprecate `go.opentelemetry.io/otel/bridge/opencensus.NewTracer` in favor of `opencensus.InstallTraceBridge`. (#4567) - Deprecate `go.opentelemetry.io/otel/example/fib` package is in favor of `go.opentelemetry.io/otel/example/dice`. (#4618) - Deprecate `go.opentelemetry.io/otel/trace.NewNoopTracerProvider`. Use the added `NewTracerProvider` function in `go.opentelemetry.io/otel/trace/noop` instead. (#4620) - Deprecate `go.opentelemetry.io/otel/example/view` package in favor of `go.opentelemetry.io/otel/example/prometheus`. (#4649) - Deprecate `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#4693) ### Changed - `go.opentelemetry.io/otel/bridge/opencensus.NewMetricProducer` returns a `*MetricProducer` struct instead of the metric.Producer interface. (#4583) - The `TracerProvider` in `go.opentelemetry.io/otel/trace` now embeds the `go.opentelemetry.io/otel/trace/embedded.TracerProvider` type. This extends the `TracerProvider` interface and is is a breaking change for any existing implementation. Implementers need to update their implementations based on what they want the default behavior of the interface to be. See the "API Implementations" section of the `go.opentelemetry.io/otel/trace` package documentation for more information about how to accomplish this. (#4620) - The `Tracer` in `go.opentelemetry.io/otel/trace` now embeds the `go.opentelemetry.io/otel/trace/embedded.Tracer` type. This extends the `Tracer` interface and is is a breaking change for any existing implementation. Implementers need to update their implementations based on what they want the default behavior of the interface to be. See the "API Implementations" section of the `go.opentelemetry.io/otel/trace` package documentation for more information about how to accomplish this. (#4620) - The `Span` in `go.opentelemetry.io/otel/trace` now embeds the `go.opentelemetry.io/otel/trace/embedded.Span` type. This extends the `Span` interface and is is a breaking change for any existing implementation. Implementers need to update their implementations based on what they want the default behavior of the interface to be. See the "API Implementations" section of the `go.opentelemetry.io/otel/trace` package documentation for more information about how to accomplish this. (#4620) - `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` does no longer depend on `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#4660) - `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` does no longer depend on `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#4660) - Retry for `502 Bad Gateway` and `504 Gateway Timeout` HTTP statuses in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4670) - Retry for `502 Bad Gateway` and `504 Gateway Timeout` HTTP statuses in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4670) - Retry for `RESOURCE_EXHAUSTED` only if RetryInfo is returned in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4669) - Retry for `RESOURCE_EXHAUSTED` only if RetryInfo is returned in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#4669) - Retry temporary HTTP request failures in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4679) - Retry temporary HTTP request failures in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4679) ### Fixed - Fix improper parsing of characters such us `+`, `/` by `Parse` in `go.opentelemetry.io/otel/baggage` as they were rendered as a whitespace. (#4667) - Fix improper parsing of characters such us `+`, `/` passed via `OTEL_RESOURCE_ATTRIBUTES` in `go.opentelemetry.io/otel/sdk/resource` as they were rendered as a whitespace. (#4699) - Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_METRICS_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` as they were rendered as a whitespace. (#4699) - Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_METRICS_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` as they were rendered as a whitespace. (#4699) - Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_TRACES_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlptracegrpc` as they were rendered as a whitespace. (#4699) - Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_TRACES_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlptracehttp` as they were rendered as a whitespace. (#4699) - In `go.opentelemetry.op/otel/exporters/prometheus`, the exporter no longer `Collect`s metrics after `Shutdown` is invoked. (#4648) - Fix documentation for `WithCompressor` in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#4695) - Fix documentation for `WithCompressor` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4695) ## [1.19.0/0.42.0/0.0.7] 2023-09-28 This release contains the first stable release of the OpenTelemetry Go [metric SDK]. Our project stability guarantees now apply to the `go.opentelemetry.io/otel/sdk/metric` package. See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. ### Added - Add the "Roll the dice" getting started application example in `go.opentelemetry.io/otel/example/dice`. (#4539) - The `WithWriter` and `WithPrettyPrint` options to `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` to set a custom `io.Writer`, and allow displaying the output in human-readable JSON. (#4507) ### Changed - Allow '/' characters in metric instrument names. (#4501) - The exporter in `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` does not prettify its output by default anymore. (#4507) - Upgrade `gopkg.io/yaml` from `v2` to `v3` in `go.opentelemetry.io/otel/schema`. (#4535) ### Fixed - In `go.opentelemetry.op/otel/exporters/prometheus`, don't try to create the Prometheus metric on every `Collect` if we know the scope is invalid. (#4499) ### Removed - Remove `"go.opentelemetry.io/otel/bridge/opencensus".NewMetricExporter`, which is replaced by `NewMetricProducer`. (#4566) ## [1.19.0-rc.1/0.42.0-rc.1] 2023-09-14 This is a release candidate for the v1.19.0/v0.42.0 release. That release is expected to include the `v1` release of the OpenTelemetry Go metric SDK and will provide stability guarantees of that SDK. See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. ### Changed - Allow '/' characters in metric instrument names. (#4501) ### Fixed - In `go.opentelemetry.op/otel/exporters/prometheus`, don't try to create the prometheus metric on every `Collect` if we know the scope is invalid. (#4499) ## [1.18.0/0.41.0/0.0.6] 2023-09-12 This release drops the compatibility guarantee of [Go 1.19]. ### Added - Add `WithProducer` option in `go.opentelemetry.op/otel/exporters/prometheus` to restore the ability to register producers on the prometheus exporter's manual reader. (#4473) - Add `IgnoreValue` option in `go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest` to allow ignoring values when comparing metrics. (#4447) ### Changed - Use a `TestingT` interface instead of `*testing.T` struct in `go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest`. (#4483) ### Deprecated - The `NewMetricExporter` in `go.opentelemetry.io/otel/bridge/opencensus` was deprecated in `v0.35.0` (#3541). The deprecation notice format for the function has been corrected to trigger Go documentation and build tooling. (#4470) ### Removed - Removed the deprecated `go.opentelemetry.io/otel/exporters/jaeger` package. (#4467) - Removed the deprecated `go.opentelemetry.io/otel/example/jaeger` package. (#4467) - Removed the deprecated `go.opentelemetry.io/otel/sdk/metric/aggregation` package. (#4468) - Removed the deprecated internal packages in `go.opentelemetry.io/otel/exporters/otlp` and its sub-packages. (#4469) - Dropped guaranteed support for versions of Go less than 1.20. (#4481) ## [1.17.0/0.40.0/0.0.5] 2023-08-28 ### Added - Export the `ManualReader` struct in `go.opentelemetry.io/otel/sdk/metric`. (#4244) - Export the `PeriodicReader` struct in `go.opentelemetry.io/otel/sdk/metric`. (#4244) - Add support for exponential histogram aggregations. A histogram can be configured as an exponential histogram using a view with `"go.opentelemetry.io/otel/sdk/metric".ExponentialHistogram` as the aggregation. (#4245) - Export the `Exporter` struct in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4272) - Export the `Exporter` struct in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4272) - The exporters in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` now support the `OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE` environment variable. (#4287) - Add `WithoutCounterSuffixes` option in `go.opentelemetry.io/otel/exporters/prometheus` to disable addition of `_total` suffixes. (#4306) - Add info and debug logging to the metric SDK in `go.opentelemetry.io/otel/sdk/metric`. (#4315) - The `go.opentelemetry.io/otel/semconv/v1.21.0` package. The package contains semantic conventions from the `v1.21.0` version of the OpenTelemetry Semantic Conventions. (#4362) - Accept 201 to 299 HTTP status as success in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` and `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4365) - Document the `Temporality` and `Aggregation` methods of the `"go.opentelemetry.io/otel/sdk/metric".Exporter"` need to be concurrent safe. (#4381) - Expand the set of units supported by the Prometheus exporter, and don't add unit suffixes if they are already present in `go.opentelemetry.op/otel/exporters/prometheus` (#4374) - Move the `Aggregation` interface and its implementations from `go.opentelemetry.io/otel/sdk/metric/aggregation` to `go.opentelemetry.io/otel/sdk/metric`. (#4435) - The exporters in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` now support the `OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION` environment variable. (#4437) - Add the `NewAllowKeysFilter` and `NewDenyKeysFilter` functions to `go.opentelemetry.io/otel/attribute` to allow convenient creation of allow-keys and deny-keys filters. (#4444) - Support Go 1.21. (#4463) ### Changed - Starting from `v1.21.0` of semantic conventions, `go.opentelemetry.io/otel/semconv/{version}/httpconv` and `go.opentelemetry.io/otel/semconv/{version}/netconv` packages will no longer be published. (#4145) - Log duplicate instrument conflict at a warning level instead of info in `go.opentelemetry.io/otel/sdk/metric`. (#4202) - Return an error on the creation of new instruments in `go.opentelemetry.io/otel/sdk/metric` if their name doesn't pass regexp validation. (#4210) - `NewManualReader` in `go.opentelemetry.io/otel/sdk/metric` returns `*ManualReader` instead of `Reader`. (#4244) - `NewPeriodicReader` in `go.opentelemetry.io/otel/sdk/metric` returns `*PeriodicReader` instead of `Reader`. (#4244) - Count the Collect time in the `PeriodicReader` timeout in `go.opentelemetry.io/otel/sdk/metric`. (#4221) - The function `New` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` returns `*Exporter` instead of `"go.opentelemetry.io/otel/sdk/metric".Exporter`. (#4272) - The function `New` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` returns `*Exporter` instead of `"go.opentelemetry.io/otel/sdk/metric".Exporter`. (#4272) - If an attribute set is omitted from an async callback, the previous value will no longer be exported in `go.opentelemetry.io/otel/sdk/metric`. (#4290) - If an attribute set is observed multiple times in an async callback in `go.opentelemetry.io/otel/sdk/metric`, the values will be summed instead of the last observation winning. (#4289) - Allow the explicit bucket histogram aggregation to be used for the up-down counter, observable counter, observable up-down counter, and observable gauge in the `go.opentelemetry.io/otel/sdk/metric` package. (#4332) - Restrict `Meter`s in `go.opentelemetry.io/otel/sdk/metric` to only register and collect instruments it created. (#4333) - `PeriodicReader.Shutdown` and `PeriodicReader.ForceFlush` in `go.opentelemetry.io/otel/sdk/metric` now apply the periodic reader's timeout to the operation if the user provided context does not contain a deadline. (#4356, #4377) - Upgrade all use of `go.opentelemetry.io/otel/semconv` to use `v1.21.0`. (#4408) - Increase instrument name maximum length from 63 to 255 characters in `go.opentelemetry.io/otel/sdk/metric`. (#4434) - Add `go.opentelemetry.op/otel/sdk/metric.WithProducer` as an `Option` for `"go.opentelemetry.io/otel/sdk/metric".NewManualReader` and `"go.opentelemetry.io/otel/sdk/metric".NewPeriodicReader`. (#4346) ### Removed - Remove `Reader.RegisterProducer` in `go.opentelemetry.io/otel/metric`. Use the added `WithProducer` option instead. (#4346) - Remove `Reader.ForceFlush` in `go.opentelemetry.io/otel/metric`. Notice that `PeriodicReader.ForceFlush` is still available. (#4375) ### Fixed - Correctly format log messages from the `go.opentelemetry.io/otel/exporters/zipkin` exporter. (#4143) - Log an error for calls to `NewView` in `go.opentelemetry.io/otel/sdk/metric` that have empty criteria. (#4307) - Fix `"go.opentelemetry.io/otel/sdk/resource".WithHostID()` to not set an empty `host.id`. (#4317) - Use the instrument identifying fields to cache aggregators and determine duplicate instrument registrations in `go.opentelemetry.io/otel/sdk/metric`. (#4337) - Detect duplicate instruments for case-insensitive names in `go.opentelemetry.io/otel/sdk/metric`. (#4338) - The `ManualReader` will not panic if `AggregationSelector` returns `nil` in `go.opentelemetry.io/otel/sdk/metric`. (#4350) - If a `Reader`'s `AggregationSelector` returns `nil` or `DefaultAggregation` the pipeline will use the default aggregation. (#4350) - Log a suggested view that fixes instrument conflicts in `go.opentelemetry.io/otel/sdk/metric`. (#4349) - Fix possible panic, deadlock and race condition in batch span processor in `go.opentelemetry.io/otel/sdk/trace`. (#4353) - Improve context cancellation handling in batch span processor's `ForceFlush` in `go.opentelemetry.io/otel/sdk/trace`. (#4369) - Decouple `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal` from `go.opentelemetry.io/otel/exporters/otlp/internal` using gotmpl. (#4397, #3846) - Decouple `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal` from `go.opentelemetry.io/otel/exporters/otlp/internal` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal` using gotmpl. (#4404, #3846) - Decouple `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal` from `go.opentelemetry.io/otel/exporters/otlp/internal` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal` using gotmpl. (#4407, #3846) - Decouple `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal` from `go.opentelemetry.io/otel/exporters/otlp/internal` and `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal` using gotmpl. (#4400, #3846) - Decouple `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal` from `go.opentelemetry.io/otel/exporters/otlp/internal` and `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal` using gotmpl. (#4401, #3846) - Do not block the metric SDK when OTLP metric exports are blocked in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#3925, #4395) - Do not append `_total` if the counter already has that suffix for the Prometheus exproter in `go.opentelemetry.io/otel/exporter/prometheus`. (#4373) - Fix resource detection data race in `go.opentelemetry.io/otel/sdk/resource`. (#4409) - Use the first-seen instrument name during instrument name conflicts in `go.opentelemetry.io/otel/sdk/metric`. (#4428) ### Deprecated - The `go.opentelemetry.io/otel/exporters/jaeger` package is deprecated. OpenTelemetry dropped support for Jaeger exporter in July 2023. Use `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` or `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` instead. (#4423) - The `go.opentelemetry.io/otel/example/jaeger` package is deprecated. (#4423) - The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal` package is deprecated. (#4420) - The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/oconf` package is deprecated. (#4420) - The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/otest` package is deprecated. (#4420) - The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/transform` package is deprecated. (#4420) - The `go.opentelemetry.io/otel/exporters/otlp/internal` package is deprecated. (#4421) - The `go.opentelemetry.io/otel/exporters/otlp/internal/envconfig` package is deprecated. (#4421) - The `go.opentelemetry.io/otel/exporters/otlp/internal/retry` package is deprecated. (#4421) - The `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal` package is deprecated. (#4425) - The `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/envconfig` package is deprecated. (#4425) - The `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlpconfig` package is deprecated. (#4425) - The `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlptracetest` package is deprecated. (#4425) - The `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/retry` package is deprecated. (#4425) - The `go.opentelemetry.io/otel/sdk/metric/aggregation` package is deprecated. Use the aggregation types added to `go.opentelemetry.io/otel/sdk/metric` instead. (#4435) ## [1.16.0/0.39.0] 2023-05-18 This release contains the first stable release of the OpenTelemetry Go [metric API]. Our project stability guarantees now apply to the `go.opentelemetry.io/otel/metric` package. See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. ### Added - The `go.opentelemetry.io/otel/semconv/v1.19.0` package. The package contains semantic conventions from the `v1.19.0` version of the OpenTelemetry specification. (#3848) - The `go.opentelemetry.io/otel/semconv/v1.20.0` package. The package contains semantic conventions from the `v1.20.0` version of the OpenTelemetry specification. (#4078) - The Exponential Histogram data types in `go.opentelemetry.io/otel/sdk/metric/metricdata`. (#4165) - OTLP metrics exporter now supports the Exponential Histogram Data Type. (#4222) - Fix serialization of `time.Time` zero values in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` packages. (#4271) ### Changed - Use `strings.Cut()` instead of `string.SplitN()` for better readability and memory use. (#4049) - `MeterProvider` returns noop meters once it has been shutdown. (#4154) ### Removed - The deprecated `go.opentelemetry.io/otel/metric/instrument` package is removed. Use `go.opentelemetry.io/otel/metric` instead. (#4055) ### Fixed - Fix build for BSD based systems in `go.opentelemetry.io/otel/sdk/resource`. (#4077) ## [1.16.0-rc.1/0.39.0-rc.1] 2023-05-03 This is a release candidate for the v1.16.0/v0.39.0 release. That release is expected to include the `v1` release of the OpenTelemetry Go metric API and will provide stability guarantees of that API. See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. ### Added - Support global `MeterProvider` in `go.opentelemetry.io/otel`. (#4039) - Use `Meter` for a `metric.Meter` from the global `metric.MeterProvider`. - Use `GetMeterProivder` for a global `metric.MeterProvider`. - Use `SetMeterProivder` to set the global `metric.MeterProvider`. ### Changed - Move the `go.opentelemetry.io/otel/metric` module to the `stable-v1` module set. This stages the metric API to be released as a stable module. (#4038) ### Removed - The `go.opentelemetry.io/otel/metric/global` package is removed. Use `go.opentelemetry.io/otel` instead. (#4039) ## [1.15.1/0.38.1] 2023-05-02 ### Fixed - Remove unused imports from `sdk/resource/host_id_bsd.go` which caused build failures. (#4040, #4041) ## [1.15.0/0.38.0] 2023-04-27 ### Added - The `go.opentelemetry.io/otel/metric/embedded` package. (#3916) - The `Version` function to `go.opentelemetry.io/otel/sdk` to return the SDK version. (#3949) - Add a `WithNamespace` option to `go.opentelemetry.io/otel/exporters/prometheus` to allow users to prefix metrics with a namespace. (#3970) - The following configuration types were added to `go.opentelemetry.io/otel/metric/instrument` to be used in the configuration of measurement methods. (#3971) - The `AddConfig` used to hold configuration for addition measurements - `NewAddConfig` used to create a new `AddConfig` - `AddOption` used to configure an `AddConfig` - The `RecordConfig` used to hold configuration for recorded measurements - `NewRecordConfig` used to create a new `RecordConfig` - `RecordOption` used to configure a `RecordConfig` - The `ObserveConfig` used to hold configuration for observed measurements - `NewObserveConfig` used to create a new `ObserveConfig` - `ObserveOption` used to configure an `ObserveConfig` - `WithAttributeSet` and `WithAttributes` are added to `go.opentelemetry.io/otel/metric/instrument`. They return an option used during a measurement that defines the attribute Set associated with the measurement. (#3971) - The `Version` function to `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` to return the OTLP metrics client version. (#3956) - The `Version` function to `go.opentelemetry.io/otel/exporters/otlp/otlptrace` to return the OTLP trace client version. (#3956) ### Changed - The `Extrema` in `go.opentelemetry.io/otel/sdk/metric/metricdata` is redefined with a generic argument of `[N int64 | float64]`. (#3870) - Update all exported interfaces from `go.opentelemetry.io/otel/metric` to embed their corresponding interface from `go.opentelemetry.io/otel/metric/embedded`. This adds an implementation requirement to set the interface default behavior for unimplemented methods. (#3916) - Move No-Op implementation from `go.opentelemetry.io/otel/metric` into its own package `go.opentelemetry.io/otel/metric/noop`. (#3941) - `metric.NewNoopMeterProvider` is replaced with `noop.NewMeterProvider` - Add all the methods from `"go.opentelemetry.io/otel/trace".SpanContext` to `bridgeSpanContext` by embedding `otel.SpanContext` in `bridgeSpanContext`. (#3966) - Wrap `UploadMetrics` error in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/` to improve error message when encountering generic grpc errors. (#3974) - The measurement methods for all instruments in `go.opentelemetry.io/otel/metric/instrument` accept an option instead of the variadic `"go.opentelemetry.io/otel/attribute".KeyValue`. (#3971) - The `Int64Counter.Add` method now accepts `...AddOption` - The `Float64Counter.Add` method now accepts `...AddOption` - The `Int64UpDownCounter.Add` method now accepts `...AddOption` - The `Float64UpDownCounter.Add` method now accepts `...AddOption` - The `Int64Histogram.Record` method now accepts `...RecordOption` - The `Float64Histogram.Record` method now accepts `...RecordOption` - The `Int64Observer.Observe` method now accepts `...ObserveOption` - The `Float64Observer.Observe` method now accepts `...ObserveOption` - The `Observer` methods in `go.opentelemetry.io/otel/metric` accept an option instead of the variadic `"go.opentelemetry.io/otel/attribute".KeyValue`. (#3971) - The `Observer.ObserveInt64` method now accepts `...ObserveOption` - The `Observer.ObserveFloat64` method now accepts `...ObserveOption` - Move global metric back to `go.opentelemetry.io/otel/metric/global` from `go.opentelemetry.io/otel`. (#3986) ### Fixed - `TracerProvider` allows calling `Tracer()` while it's shutting down. It used to deadlock. (#3924) - Use the SDK version for the Telemetry SDK resource detector in `go.opentelemetry.io/otel/sdk/resource`. (#3949) - Fix a data race in `SpanProcessor` returned by `NewSimpleSpanProcessor` in `go.opentelemetry.io/otel/sdk/trace`. (#3951) - Automatically figure out the default aggregation with `aggregation.Default`. (#3967) ### Deprecated - The `go.opentelemetry.io/otel/metric/instrument` package is deprecated. Use the equivalent types added to `go.opentelemetry.io/otel/metric` instead. (#4018) ## [1.15.0-rc.2/0.38.0-rc.2] 2023-03-23 This is a release candidate for the v1.15.0/v0.38.0 release. That release will include the `v1` release of the OpenTelemetry Go metric API and will provide stability guarantees of that API. See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. ### Added - The `WithHostID` option to `go.opentelemetry.io/otel/sdk/resource`. (#3812) - The `WithoutTimestamps` option to `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` to sets all timestamps to zero. (#3828) - The new `Exemplar` type is added to `go.opentelemetry.io/otel/sdk/metric/metricdata`. Both the `DataPoint` and `HistogramDataPoint` types from that package have a new field of `Exemplars` containing the sampled exemplars for their timeseries. (#3849) - Configuration for each metric instrument in `go.opentelemetry.io/otel/sdk/metric/instrument`. (#3895) - The internal logging introduces a warning level verbosity equal to `V(1)`. (#3900) - Added a log message warning about usage of `SimpleSpanProcessor` in production environments. (#3854) ### Changed - Optimize memory allocation when creation a new `Set` using `NewSet` or `NewSetWithFiltered` in `go.opentelemetry.io/otel/attribute`. (#3832) - Optimize memory allocation when creation new metric instruments in `go.opentelemetry.io/otel/sdk/metric`. (#3832) - Avoid creating new objects on all calls to `WithDeferredSetup` and `SkipContextSetup` in OpenTracing bridge. (#3833) - The `New` and `Detect` functions from `go.opentelemetry.io/otel/sdk/resource` return errors that wrap underlying errors instead of just containing the underlying error strings. (#3844) - Both the `Histogram` and `HistogramDataPoint` are redefined with a generic argument of `[N int64 | float64]` in `go.opentelemetry.io/otel/sdk/metric/metricdata`. (#3849) - The metric `Export` interface from `go.opentelemetry.io/otel/sdk/metric` accepts a `*ResourceMetrics` instead of `ResourceMetrics`. (#3853) - Rename `Asynchronous` to `Observable` in `go.opentelemetry.io/otel/metric/instrument`. (#3892) - Rename `Int64ObserverOption` to `Int64ObservableOption` in `go.opentelemetry.io/otel/metric/instrument`. (#3895) - Rename `Float64ObserverOption` to `Float64ObservableOption` in `go.opentelemetry.io/otel/metric/instrument`. (#3895) - The internal logging changes the verbosity level of info to `V(4)`, the verbosity level of debug to `V(8)`. (#3900) ### Fixed - `TracerProvider` consistently doesn't allow to register a `SpanProcessor` after shutdown. (#3845) ### Removed - The deprecated `go.opentelemetry.io/otel/metric/global` package is removed. (#3829) - The unneeded `Synchronous` interface in `go.opentelemetry.io/otel/metric/instrument` was removed. (#3892) - The `Float64ObserverConfig` and `NewFloat64ObserverConfig` in `go.opentelemetry.io/otel/sdk/metric/instrument`. Use the added `float64` instrument configuration instead. (#3895) - The `Int64ObserverConfig` and `NewInt64ObserverConfig` in `go.opentelemetry.io/otel/sdk/metric/instrument`. Use the added `int64` instrument configuration instead. (#3895) - The `NewNoopMeter` function in `go.opentelemetry.io/otel/metric`, use `NewMeterProvider().Meter("")` instead. (#3893) ## [1.15.0-rc.1/0.38.0-rc.1] 2023-03-01 This is a release candidate for the v1.15.0/v0.38.0 release. That release will include the `v1` release of the OpenTelemetry Go metric API and will provide stability guarantees of that API. See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. This release drops the compatibility guarantee of [Go 1.18]. ### Added - Support global `MeterProvider` in `go.opentelemetry.io/otel`. (#3818) - Use `Meter` for a `metric.Meter` from the global `metric.MeterProvider`. - Use `GetMeterProivder` for a global `metric.MeterProvider`. - Use `SetMeterProivder` to set the global `metric.MeterProvider`. ### Changed - Dropped compatibility testing for [Go 1.18]. The project no longer guarantees support for this version of Go. (#3813) ### Fixed - Handle empty environment variable as it they were not set. (#3764) - Clarify the `httpconv` and `netconv` packages in `go.opentelemetry.io/otel/semconv/*` provide tracing semantic conventions. (#3823) - Fix race conditions in `go.opentelemetry.io/otel/exporters/metric/prometheus` that could cause a panic. (#3899) - Fix sending nil `scopeInfo` to metrics channel in `go.opentelemetry.io/otel/exporters/metric/prometheus` that could cause a panic in `github.com/prometheus/client_golang/prometheus`. (#3899) ### Deprecated - The `go.opentelemetry.io/otel/metric/global` package is deprecated. Use `go.opentelemetry.io/otel` instead. (#3818) ### Removed - The deprecated `go.opentelemetry.io/otel/metric/unit` package is removed. (#3814) ## [1.14.0/0.37.0/0.0.4] 2023-02-27 This release is the last to support [Go 1.18]. The next release will require at least [Go 1.19]. ### Added - The `event` type semantic conventions are added to `go.opentelemetry.io/otel/semconv/v1.17.0`. (#3697) - Support [Go 1.20]. (#3693) - The `go.opentelemetry.io/otel/semconv/v1.18.0` package. The package contains semantic conventions from the `v1.18.0` version of the OpenTelemetry specification. (#3719) - The following `const` renames from `go.opentelemetry.io/otel/semconv/v1.17.0` are included: - `OtelScopeNameKey` -> `OTelScopeNameKey` - `OtelScopeVersionKey` -> `OTelScopeVersionKey` - `OtelLibraryNameKey` -> `OTelLibraryNameKey` - `OtelLibraryVersionKey` -> `OTelLibraryVersionKey` - `OtelStatusCodeKey` -> `OTelStatusCodeKey` - `OtelStatusDescriptionKey` -> `OTelStatusDescriptionKey` - `OtelStatusCodeOk` -> `OTelStatusCodeOk` - `OtelStatusCodeError` -> `OTelStatusCodeError` - The following `func` renames from `go.opentelemetry.io/otel/semconv/v1.17.0` are included: - `OtelScopeName` -> `OTelScopeName` - `OtelScopeVersion` -> `OTelScopeVersion` - `OtelLibraryName` -> `OTelLibraryName` - `OtelLibraryVersion` -> `OTelLibraryVersion` - `OtelStatusDescription` -> `OTelStatusDescription` - A `IsSampled` method is added to the `SpanContext` implementation in `go.opentelemetry.io/otel/bridge/opentracing` to expose the span sampled state. See the [README](./bridge/opentracing/README.md) for more information. (#3570) - The `WithInstrumentationAttributes` option to `go.opentelemetry.io/otel/metric`. (#3738) - The `WithInstrumentationAttributes` option to `go.opentelemetry.io/otel/trace`. (#3739) - The following environment variables are supported by the periodic `Reader` in `go.opentelemetry.io/otel/sdk/metric`. (#3763) - `OTEL_METRIC_EXPORT_INTERVAL` sets the time between collections and exports. - `OTEL_METRIC_EXPORT_TIMEOUT` sets the timeout an export is attempted. ### Changed - Fall-back to `TextMapCarrier` when it's not `HttpHeader`s in `go.opentelemetry.io/otel/bridge/opentracing`. (#3679) - The `Collect` method of the `"go.opentelemetry.io/otel/sdk/metric".Reader` interface is updated to accept the `metricdata.ResourceMetrics` value the collection will be made into. This change is made to enable memory reuse by SDK users. (#3732) - The `WithUnit` option in `go.opentelemetry.io/otel/sdk/metric/instrument` is updated to accept a `string` for the unit value. (#3776) ### Fixed - Ensure `go.opentelemetry.io/otel` does not use generics. (#3723, #3725) - Multi-reader `MeterProvider`s now export metrics for all readers, instead of just the first reader. (#3720, #3724) - Remove use of deprecated `"math/rand".Seed` in `go.opentelemetry.io/otel/example/prometheus`. (#3733) - Do not silently drop unknown schema data with `Parse` in `go.opentelemetry.io/otel/schema/v1.1`. (#3743) - Data race issue in OTLP exporter retry mechanism. (#3755, #3756) - Wrapping empty errors when exporting in `go.opentelemetry.io/otel/sdk/metric`. (#3698, #3772) - Incorrect "all" and "resource" definition for schema files in `go.opentelemetry.io/otel/schema/v1.1`. (#3777) ### Deprecated - The `go.opentelemetry.io/otel/metric/unit` package is deprecated. Use the equivalent unit string instead. (#3776) - Use `"1"` instead of `unit.Dimensionless` - Use `"By"` instead of `unit.Bytes` - Use `"ms"` instead of `unit.Milliseconds` ## [1.13.0/0.36.0] 2023-02-07 ### Added - Attribute `KeyValue` creations functions to `go.opentelemetry.io/otel/semconv/v1.17.0` for all non-enum semantic conventions. These functions ensure semantic convention type correctness. (#3675) ### Fixed - Removed the `http.target` attribute from being added by `ServerRequest` in the following packages. (#3687) - `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv` - `go.opentelemetry.io/otel/semconv/v1.14.0/httpconv` - `go.opentelemetry.io/otel/semconv/v1.15.0/httpconv` - `go.opentelemetry.io/otel/semconv/v1.16.0/httpconv` - `go.opentelemetry.io/otel/semconv/v1.17.0/httpconv` ### Removed - The deprecated `go.opentelemetry.io/otel/metric/instrument/asyncfloat64` package is removed. (#3631) - The deprecated `go.opentelemetry.io/otel/metric/instrument/asyncint64` package is removed. (#3631) - The deprecated `go.opentelemetry.io/otel/metric/instrument/syncfloat64` package is removed. (#3631) - The deprecated `go.opentelemetry.io/otel/metric/instrument/syncint64` package is removed. (#3631) ## [1.12.0/0.35.0] 2023-01-28 ### Added - The `WithInt64Callback` option to `go.opentelemetry.io/otel/metric/instrument`. This options is used to configure `int64` Observer callbacks during their creation. (#3507) - The `WithFloat64Callback` option to `go.opentelemetry.io/otel/metric/instrument`. This options is used to configure `float64` Observer callbacks during their creation. (#3507) - The `Producer` interface and `Reader.RegisterProducer(Producer)` to `go.opentelemetry.io/otel/sdk/metric`. These additions are used to enable external metric Producers. (#3524) - The `Callback` function type to `go.opentelemetry.io/otel/metric`. This new named function type is registered with a `Meter`. (#3564) - The `go.opentelemetry.io/otel/semconv/v1.13.0` package. The package contains semantic conventions from the `v1.13.0` version of the OpenTelemetry specification. (#3499) - The `EndUserAttributesFromHTTPRequest` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is merged into `ClientRequest` and `ServerRequest` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`. - The `HTTPAttributesFromHTTPStatusCode` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is merged into `ClientResponse` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`. - The `HTTPClientAttributesFromHTTPRequest` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is replaced by `ClientRequest` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`. - The `HTTPServerAttributesFromHTTPRequest` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is replaced by `ServerRequest` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`. - The `HTTPServerMetricAttributesFromHTTPRequest` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is replaced by `ServerRequest` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`. - The `NetAttributesFromHTTPRequest` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is split into `Transport` in `go.opentelemetry.io/otel/semconv/v1.13.0/netconv` and `ClientRequest` or `ServerRequest` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`. - The `SpanStatusFromHTTPStatusCode` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is replaced by `ClientStatus` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`. - The `SpanStatusFromHTTPStatusCodeAndSpanKind` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is split into `ClientStatus` and `ServerStatus` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`. - The `Client` function is included in `go.opentelemetry.io/otel/semconv/v1.13.0/netconv` to generate attributes for a `net.Conn`. - The `Server` function is included in `go.opentelemetry.io/otel/semconv/v1.13.0/netconv` to generate attributes for a `net.Listener`. - The `go.opentelemetry.io/otel/semconv/v1.14.0` package. The package contains semantic conventions from the `v1.14.0` version of the OpenTelemetry specification. (#3566) - The `go.opentelemetry.io/otel/semconv/v1.15.0` package. The package contains semantic conventions from the `v1.15.0` version of the OpenTelemetry specification. (#3578) - The `go.opentelemetry.io/otel/semconv/v1.16.0` package. The package contains semantic conventions from the `v1.16.0` version of the OpenTelemetry specification. (#3579) - Metric instruments to `go.opentelemetry.io/otel/metric/instrument`. These instruments are use as replacements of the deprecated `go.opentelemetry.io/otel/metric/instrument/{asyncfloat64,asyncint64,syncfloat64,syncint64}` packages.(#3575, #3586) - `Float64ObservableCounter` replaces the `asyncfloat64.Counter` - `Float64ObservableUpDownCounter` replaces the `asyncfloat64.UpDownCounter` - `Float64ObservableGauge` replaces the `asyncfloat64.Gauge` - `Int64ObservableCounter` replaces the `asyncint64.Counter` - `Int64ObservableUpDownCounter` replaces the `asyncint64.UpDownCounter` - `Int64ObservableGauge` replaces the `asyncint64.Gauge` - `Float64Counter` replaces the `syncfloat64.Counter` - `Float64UpDownCounter` replaces the `syncfloat64.UpDownCounter` - `Float64Histogram` replaces the `syncfloat64.Histogram` - `Int64Counter` replaces the `syncint64.Counter` - `Int64UpDownCounter` replaces the `syncint64.UpDownCounter` - `Int64Histogram` replaces the `syncint64.Histogram` - `NewTracerProvider` to `go.opentelemetry.io/otel/bridge/opentracing`. This is used to create `WrapperTracer` instances from a `TracerProvider`. (#3116) - The `Extrema` type to `go.opentelemetry.io/otel/sdk/metric/metricdata`. This type is used to represent min/max values and still be able to distinguish unset and zero values. (#3487) - The `go.opentelemetry.io/otel/semconv/v1.17.0` package. The package contains semantic conventions from the `v1.17.0` version of the OpenTelemetry specification. (#3599) ### Changed - Jaeger and Zipkin exporter use `github.com/go-logr/logr` as the logging interface, and add the `WithLogr` option. (#3497, #3500) - Instrument configuration in `go.opentelemetry.io/otel/metric/instrument` is split into specific options and configuration based on the instrument type. (#3507) - Use the added `Int64Option` type to configure instruments from `go.opentelemetry.io/otel/metric/instrument/syncint64`. - Use the added `Float64Option` type to configure instruments from `go.opentelemetry.io/otel/metric/instrument/syncfloat64`. - Use the added `Int64ObserverOption` type to configure instruments from `go.opentelemetry.io/otel/metric/instrument/asyncint64`. - Use the added `Float64ObserverOption` type to configure instruments from `go.opentelemetry.io/otel/metric/instrument/asyncfloat64`. - Return a `Registration` from the `RegisterCallback` method of a `Meter` in the `go.opentelemetry.io/otel/metric` package. This `Registration` can be used to unregister callbacks. (#3522) - Global error handler uses an atomic value instead of a mutex. (#3543) - Add `NewMetricProducer` to `go.opentelemetry.io/otel/bridge/opencensus`, which can be used to pass OpenCensus metrics to an OpenTelemetry Reader. (#3541) - Global logger uses an atomic value instead of a mutex. (#3545) - The `Shutdown` method of the `"go.opentelemetry.io/otel/sdk/trace".TracerProvider` releases all computational resources when called the first time. (#3551) - The `Sampler` returned from `TraceIDRatioBased` `go.opentelemetry.io/otel/sdk/trace` now uses the rightmost bits for sampling decisions. This fixes random sampling when using ID generators like `xray.IDGenerator` and increasing parity with other language implementations. (#3557) - Errors from `go.opentelemetry.io/otel/exporters/otlp/otlptrace` exporters are wrapped in errors identifying their signal name. Existing users of the exporters attempting to identify specific errors will need to use `errors.Unwrap()` to get the underlying error. (#3516) - Exporters from `go.opentelemetry.io/otel/exporters/otlp` will print the final retryable error message when attempts to retry time out. (#3514) - The instrument kind names in `go.opentelemetry.io/otel/sdk/metric` are updated to match the API. (#3562) - `InstrumentKindSyncCounter` is renamed to `InstrumentKindCounter` - `InstrumentKindSyncUpDownCounter` is renamed to `InstrumentKindUpDownCounter` - `InstrumentKindSyncHistogram` is renamed to `InstrumentKindHistogram` - `InstrumentKindAsyncCounter` is renamed to `InstrumentKindObservableCounter` - `InstrumentKindAsyncUpDownCounter` is renamed to `InstrumentKindObservableUpDownCounter` - `InstrumentKindAsyncGauge` is renamed to `InstrumentKindObservableGauge` - The `RegisterCallback` method of the `Meter` in `go.opentelemetry.io/otel/metric` changed. - The named `Callback` replaces the inline function parameter. (#3564) - `Callback` is required to return an error. (#3576) - `Callback` accepts the added `Observer` parameter added. This new parameter is used by `Callback` implementations to observe values for asynchronous instruments instead of calling the `Observe` method of the instrument directly. (#3584) - The slice of `instrument.Asynchronous` is now passed as a variadic argument. (#3587) - The exporter from `go.opentelemetry.io/otel/exporters/zipkin` is updated to use the `v1.16.0` version of semantic conventions. This means it no longer uses the removed `net.peer.ip` or `http.host` attributes to determine the remote endpoint. Instead it uses the `net.sock.peer` attributes. (#3581) - The `Min` and `Max` fields of the `HistogramDataPoint` in `go.opentelemetry.io/otel/sdk/metric/metricdata` are now defined with the added `Extrema` type instead of a `*float64`. (#3487) ### Fixed - Asynchronous instruments that use sum aggregators and attribute filters correctly add values from equivalent attribute sets that have been filtered. (#3439, #3549) - The `RegisterCallback` method of the `Meter` from `go.opentelemetry.io/otel/sdk/metric` only registers a callback for instruments created by that meter. Trying to register a callback with instruments from a different meter will result in an error being returned. (#3584) ### Deprecated - The `NewMetricExporter` in `go.opentelemetry.io/otel/bridge/opencensus` is deprecated. Use `NewMetricProducer` instead. (#3541) - The `go.opentelemetry.io/otel/metric/instrument/asyncfloat64` package is deprecated. Use the instruments from `go.opentelemetry.io/otel/metric/instrument` instead. (#3575) - The `go.opentelemetry.io/otel/metric/instrument/asyncint64` package is deprecated. Use the instruments from `go.opentelemetry.io/otel/metric/instrument` instead. (#3575) - The `go.opentelemetry.io/otel/metric/instrument/syncfloat64` package is deprecated. Use the instruments from `go.opentelemetry.io/otel/metric/instrument` instead. (#3575) - The `go.opentelemetry.io/otel/metric/instrument/syncint64` package is deprecated. Use the instruments from `go.opentelemetry.io/otel/metric/instrument` instead. (#3575) - The `NewWrappedTracerProvider` in `go.opentelemetry.io/otel/bridge/opentracing` is now deprecated. Use `NewTracerProvider` instead. (#3116) ### Removed - The deprecated `go.opentelemetry.io/otel/sdk/metric/view` package is removed. (#3520) - The `InstrumentProvider` from `go.opentelemetry.io/otel/sdk/metric/asyncint64` is removed. Use the new creation methods of the `Meter` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3530) - The `Counter` method is replaced by `Meter.Int64ObservableCounter` - The `UpDownCounter` method is replaced by `Meter.Int64ObservableUpDownCounter` - The `Gauge` method is replaced by `Meter.Int64ObservableGauge` - The `InstrumentProvider` from `go.opentelemetry.io/otel/sdk/metric/asyncfloat64` is removed. Use the new creation methods of the `Meter` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3530) - The `Counter` method is replaced by `Meter.Float64ObservableCounter` - The `UpDownCounter` method is replaced by `Meter.Float64ObservableUpDownCounter` - The `Gauge` method is replaced by `Meter.Float64ObservableGauge` - The `InstrumentProvider` from `go.opentelemetry.io/otel/sdk/metric/syncint64` is removed. Use the new creation methods of the `Meter` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3530) - The `Counter` method is replaced by `Meter.Int64Counter` - The `UpDownCounter` method is replaced by `Meter.Int64UpDownCounter` - The `Histogram` method is replaced by `Meter.Int64Histogram` - The `InstrumentProvider` from `go.opentelemetry.io/otel/sdk/metric/syncfloat64` is removed. Use the new creation methods of the `Meter` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3530) - The `Counter` method is replaced by `Meter.Float64Counter` - The `UpDownCounter` method is replaced by `Meter.Float64UpDownCounter` - The `Histogram` method is replaced by `Meter.Float64Histogram` ## [1.11.2/0.34.0] 2022-12-05 ### Added - The `WithView` `Option` is added to the `go.opentelemetry.io/otel/sdk/metric` package. This option is used to configure the view(s) a `MeterProvider` will use for all `Reader`s that are registered with it. (#3387) - Add Instrumentation Scope and Version as info metric and label in Prometheus exporter. This can be disabled using the `WithoutScopeInfo()` option added to that package.(#3273, #3357) - OTLP exporters now recognize: (#3363) - `OTEL_EXPORTER_OTLP_INSECURE` - `OTEL_EXPORTER_OTLP_TRACES_INSECURE` - `OTEL_EXPORTER_OTLP_METRICS_INSECURE` - `OTEL_EXPORTER_OTLP_CLIENT_KEY` - `OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY` - `OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY` - `OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE` - `OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE` - `OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE` - The `View` type and related `NewView` function to create a view according to the OpenTelemetry specification are added to `go.opentelemetry.io/otel/sdk/metric`. These additions are replacements for the `View` type and `New` function from `go.opentelemetry.io/otel/sdk/metric/view`. (#3459) - The `Instrument` and `InstrumentKind` type are added to `go.opentelemetry.io/otel/sdk/metric`. These additions are replacements for the `Instrument` and `InstrumentKind` types from `go.opentelemetry.io/otel/sdk/metric/view`. (#3459) - The `Stream` type is added to `go.opentelemetry.io/otel/sdk/metric` to define a metric data stream a view will produce. (#3459) - The `AssertHasAttributes` allows instrument authors to test that datapoints returned have appropriate attributes. (#3487) ### Changed - The `"go.opentelemetry.io/otel/sdk/metric".WithReader` option no longer accepts views to associate with the `Reader`. Instead, views are now registered directly with the `MeterProvider` via the new `WithView` option. The views registered with the `MeterProvider` apply to all `Reader`s. (#3387) - The `Temporality(view.InstrumentKind) metricdata.Temporality` and `Aggregation(view.InstrumentKind) aggregation.Aggregation` methods are added to the `"go.opentelemetry.io/otel/sdk/metric".Exporter` interface. (#3260) - The `Temporality(view.InstrumentKind) metricdata.Temporality` and `Aggregation(view.InstrumentKind) aggregation.Aggregation` methods are added to the `"go.opentelemetry.io/otel/exporters/otlp/otlpmetric".Client` interface. (#3260) - The `WithTemporalitySelector` and `WithAggregationSelector` `ReaderOption`s have been changed to `ManualReaderOption`s in the `go.opentelemetry.io/otel/sdk/metric` package. (#3260) - The periodic reader in the `go.opentelemetry.io/otel/sdk/metric` package now uses the temporality and aggregation selectors from its configured exporter instead of accepting them as options. (#3260) ### Fixed - The `go.opentelemetry.io/otel/exporters/prometheus` exporter fixes duplicated `_total` suffixes. (#3369) - Remove comparable requirement for `Reader`s. (#3387) - Cumulative metrics from the OpenCensus bridge (`go.opentelemetry.io/otel/bridge/opencensus`) are defined as monotonic sums, instead of non-monotonic. (#3389) - Asynchronous counters (`Counter` and `UpDownCounter`) from the metric SDK now produce delta sums when configured with delta temporality. (#3398) - Exported `Status` codes in the `go.opentelemetry.io/otel/exporters/zipkin` exporter are now exported as all upper case values. (#3340) - `Aggregation`s from `go.opentelemetry.io/otel/sdk/metric` with no data are not exported. (#3394, #3436) - Re-enabled Attribute Filters in the Metric SDK. (#3396) - Asynchronous callbacks are only called if they are registered with at least one instrument that does not use drop aggregation. (#3408) - Do not report empty partial-success responses in the `go.opentelemetry.io/otel/exporters/otlp` exporters. (#3438, #3432) - Handle partial success responses in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` exporters. (#3162, #3440) - Prevent duplicate Prometheus description, unit, and type. (#3469) - Prevents panic when using incorrect `attribute.Value.As[Type]Slice()`. (#3489) ### Removed - The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric.Client` interface is removed. (#3486) - The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric.New` function is removed. Use the `otlpmetric[http|grpc].New` directly. (#3486) ### Deprecated - The `go.opentelemetry.io/otel/sdk/metric/view` package is deprecated. Use `Instrument`, `InstrumentKind`, `View`, and `NewView` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3476) ## [1.11.1/0.33.0] 2022-10-19 ### Added - The Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus` registers with a Prometheus registerer on creation. By default, it will register with the default Prometheus registerer. A non-default registerer can be used by passing the `WithRegisterer` option. (#3239) - Added the `WithAggregationSelector` option to the `go.opentelemetry.io/otel/exporters/prometheus` package to change the default `AggregationSelector` used. (#3341) - The Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus` converts the `Resource` associated with metric exports into a `target_info` metric. (#3285) ### Changed - The `"go.opentelemetry.io/otel/exporters/prometheus".New` function is updated to return an error. It will return an error if the exporter fails to register with Prometheus. (#3239) ### Fixed - The URL-encoded values from the `OTEL_RESOURCE_ATTRIBUTES` environment variable are decoded. (#2963) - The `baggage.NewMember` function decodes the `value` parameter instead of directly using it. This fixes the implementation to be compliant with the W3C specification. (#3226) - Slice attributes of the `attribute` package are now comparable based on their value, not instance. (#3108 #3252) - The `Shutdown` and `ForceFlush` methods of the `"go.opentelemetry.io/otel/sdk/trace".TraceProvider` no longer return an error when no processor is registered. (#3268) - The Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus` cumulatively sums histogram buckets. (#3281) - The sum of each histogram data point is now uniquely exported by the `go.opentelemetry.io/otel/exporters/otlpmetric` exporters. (#3284, #3293) - Recorded values for asynchronous counters (`Counter` and `UpDownCounter`) are interpreted as exact, not incremental, sum values by the metric SDK. (#3350, #3278) - `UpDownCounters` are now correctly output as Prometheus gauges in the `go.opentelemetry.io/otel/exporters/prometheus` exporter. (#3358) - The Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus` no longer describes the metrics it will send to Prometheus on startup. Instead the exporter is defined as an "unchecked" collector for Prometheus. This fixes the `reader is not registered` warning currently emitted on startup. (#3291 #3342) - The `go.opentelemetry.io/otel/exporters/prometheus` exporter now correctly adds `_total` suffixes to counter metrics. (#3360) - The `go.opentelemetry.io/otel/exporters/prometheus` exporter now adds a unit suffix to metric names. This can be disabled using the `WithoutUnits()` option added to that package. (#3352) ## [1.11.0/0.32.3] 2022-10-12 ### Added - Add default User-Agent header to OTLP exporter requests (`go.opentelemetry.io/otel/exporters/otlptrace/otlptracegrpc` and `go.opentelemetry.io/otel/exporters/otlptrace/otlptracehttp`). (#3261) ### Changed - `span.SetStatus` has been updated such that calls that lower the status are now no-ops. (#3214) - Upgrade `golang.org/x/sys/unix` from `v0.0.0-20210423185535-09eb48e85fd7` to `v0.0.0-20220919091848-fb04ddd9f9c8`. This addresses [GO-2022-0493](https://pkg.go.dev/vuln/GO-2022-0493). (#3235) ## [0.32.2] Metric SDK (Alpha) - 2022-10-11 ### Added - Added an example of using metric views to customize instruments. (#3177) - Add default User-Agent header to OTLP exporter requests (`go.opentelemetry.io/otel/exporters/otlpmetric/otlpmetricgrpc` and `go.opentelemetry.io/otel/exporters/otlpmetric/otlpmetrichttp`). (#3261) ### Changed - Flush pending measurements with the `PeriodicReader` in the `go.opentelemetry.io/otel/sdk/metric` when `ForceFlush` or `Shutdown` are called. (#3220) - Update histogram default bounds to match the requirements of the latest specification. (#3222) - Encode the HTTP status code in the OpenTracing bridge (`go.opentelemetry.io/otel/bridge/opentracing`) as an integer. (#3265) ### Fixed - Use default view if instrument does not match any registered view of a reader. (#3224, #3237) - Return the same instrument every time a user makes the exact same instrument creation call. (#3229, #3251) - Return the existing instrument when a view transforms a creation call to match an existing instrument. (#3240, #3251) - Log a warning when a conflicting instrument (e.g. description, unit, data-type) is created instead of returning an error. (#3251) - The OpenCensus bridge no longer sends empty batches of metrics. (#3263) ## [0.32.1] Metric SDK (Alpha) - 2022-09-22 ### Changed - The Prometheus exporter sanitizes OpenTelemetry instrument names when exporting. Invalid characters are replaced with `_`. (#3212) ### Added - The metric portion of the OpenCensus bridge (`go.opentelemetry.io/otel/bridge/opencensus`) has been reintroduced. (#3192) - The OpenCensus bridge example (`go.opentelemetry.io/otel/example/opencensus`) has been reintroduced. (#3206) ### Fixed - Updated go.mods to point to valid versions of the sdk. (#3216) - Set the `MeterProvider` resource on all exported metric data. (#3218) ## [0.32.0] Revised Metric SDK (Alpha) - 2022-09-18 ### Changed - The metric SDK in `go.opentelemetry.io/otel/sdk/metric` is completely refactored to comply with the OpenTelemetry specification. Please see the package documentation for how the new SDK is initialized and configured. (#3175) - Update the minimum supported go version to go1.18. Removes support for go1.17 (#3179) ### Removed - The metric portion of the OpenCensus bridge (`go.opentelemetry.io/otel/bridge/opencensus`) has been removed. A new bridge compliant with the revised metric SDK will be added back in a future release. (#3175) - The `go.opentelemetry.io/otel/sdk/metric/aggregator/aggregatortest` package is removed, see the new metric SDK. (#3175) - The `go.opentelemetry.io/otel/sdk/metric/aggregator/histogram` package is removed, see the new metric SDK. (#3175) - The `go.opentelemetry.io/otel/sdk/metric/aggregator/lastvalue` package is removed, see the new metric SDK. (#3175) - The `go.opentelemetry.io/otel/sdk/metric/aggregator/sum` package is removed, see the new metric SDK. (#3175) - The `go.opentelemetry.io/otel/sdk/metric/aggregator` package is removed, see the new metric SDK. (#3175) - The `go.opentelemetry.io/otel/sdk/metric/controller/basic` package is removed, see the new metric SDK. (#3175) - The `go.opentelemetry.io/otel/sdk/metric/controller/controllertest` package is removed, see the new metric SDK. (#3175) - The `go.opentelemetry.io/otel/sdk/metric/controller/time` package is removed, see the new metric SDK. (#3175) - The `go.opentelemetry.io/otel/sdk/metric/export/aggregation` package is removed, see the new metric SDK. (#3175) - The `go.opentelemetry.io/otel/sdk/metric/export` package is removed, see the new metric SDK. (#3175) - The `go.opentelemetry.io/otel/sdk/metric/metrictest` package is removed. A replacement package that supports the new metric SDK will be added back in a future release. (#3175) - The `go.opentelemetry.io/otel/sdk/metric/number` package is removed, see the new metric SDK. (#3175) - The `go.opentelemetry.io/otel/sdk/metric/processor/basic` package is removed, see the new metric SDK. (#3175) - The `go.opentelemetry.io/otel/sdk/metric/processor/processortest` package is removed, see the new metric SDK. (#3175) - The `go.opentelemetry.io/otel/sdk/metric/processor/reducer` package is removed, see the new metric SDK. (#3175) - The `go.opentelemetry.io/otel/sdk/metric/registry` package is removed, see the new metric SDK. (#3175) - The `go.opentelemetry.io/otel/sdk/metric/sdkapi` package is removed, see the new metric SDK. (#3175) - The `go.opentelemetry.io/otel/sdk/metric/selector/simple` package is removed, see the new metric SDK. (#3175) - The `"go.opentelemetry.io/otel/sdk/metric".ErrUninitializedInstrument` variable was removed. (#3175) - The `"go.opentelemetry.io/otel/sdk/metric".ErrBadInstrument` variable was removed. (#3175) - The `"go.opentelemetry.io/otel/sdk/metric".Accumulator` type was removed, see the `MeterProvider`in the new metric SDK. (#3175) - The `"go.opentelemetry.io/otel/sdk/metric".NewAccumulator` function was removed, see `NewMeterProvider`in the new metric SDK. (#3175) - The deprecated `"go.opentelemetry.io/otel/sdk/metric".AtomicFieldOffsets` function was removed. (#3175) ## [1.10.0] - 2022-09-09 ### Added - Support Go 1.19. (#3077) Include compatibility testing and document support. (#3077) - Support the OTLP ExportTracePartialSuccess response; these are passed to the registered error handler. (#3106) - Upgrade go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107) ### Changed - Fix misidentification of OpenTelemetry `SpanKind` in OpenTracing bridge (`go.opentelemetry.io/otel/bridge/opentracing`). (#3096) - Attempting to start a span with a nil `context` will no longer cause a panic. (#3110) - All exporters will be shutdown even if one reports an error (#3091) - Ensure valid UTF-8 when truncating over-length attribute values. (#3156) ## [1.9.0/0.0.3] - 2022-08-01 ### Added - Add support for Schema Files format 1.1.x (metric "split" transform) with the new `go.opentelemetry.io/otel/schema/v1.1` package. (#2999) - Add the `go.opentelemetry.io/otel/semconv/v1.11.0` package. The package contains semantic conventions from the `v1.11.0` version of the OpenTelemetry specification. (#3009) - Add the `go.opentelemetry.io/otel/semconv/v1.12.0` package. The package contains semantic conventions from the `v1.12.0` version of the OpenTelemetry specification. (#3010) - Add the `http.method` attribute to HTTP server metric from all `go.opentelemetry.io/otel/semconv/*` packages. (#3018) ### Fixed - Invalid warning for context setup being deferred in `go.opentelemetry.io/otel/bridge/opentracing` package. (#3029) ## [1.8.0/0.31.0] - 2022-07-08 ### Added - Add support for `opentracing.TextMap` format in the `Inject` and `Extract` methods of the `"go.opentelemetry.io/otel/bridge/opentracing".BridgeTracer` type. (#2911) ### Changed - The `crosslink` make target has been updated to use the `go.opentelemetry.io/build-tools/crosslink` package. (#2886) - In the `go.opentelemetry.io/otel/sdk/instrumentation` package rename `Library` to `Scope` and alias `Library` as `Scope` (#2976) - Move metric no-op implementation form `nonrecording` to `metric` package. (#2866) ### Removed - Support for go1.16. Support is now only for go1.17 and go1.18 (#2917) ### Deprecated - The `Library` struct in the `go.opentelemetry.io/otel/sdk/instrumentation` package is deprecated. Use the equivalent `Scope` struct instead. (#2977) - The `ReadOnlySpan.InstrumentationLibrary` method from the `go.opentelemetry.io/otel/sdk/trace` package is deprecated. Use the equivalent `ReadOnlySpan.InstrumentationScope` method instead. (#2977) ## [1.7.0/0.30.0] - 2022-04-28 ### Added - Add the `go.opentelemetry.io/otel/semconv/v1.8.0` package. The package contains semantic conventions from the `v1.8.0` version of the OpenTelemetry specification. (#2763) - Add the `go.opentelemetry.io/otel/semconv/v1.9.0` package. The package contains semantic conventions from the `v1.9.0` version of the OpenTelemetry specification. (#2792) - Add the `go.opentelemetry.io/otel/semconv/v1.10.0` package. The package contains semantic conventions from the `v1.10.0` version of the OpenTelemetry specification. (#2842) - Added an in-memory exporter to metrictest to aid testing with a full SDK. (#2776) ### Fixed - Globally delegated instruments are unwrapped before delegating asynchronous callbacks. (#2784) - Remove import of `testing` package in non-tests builds of the `go.opentelemetry.io/otel` package. (#2786) ### Changed - The `WithLabelEncoder` option from the `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` package is renamed to `WithAttributeEncoder`. (#2790) - The `LabelFilterSelector` interface from `go.opentelemetry.io/otel/sdk/metric/processor/reducer` is renamed to `AttributeFilterSelector`. The method included in the renamed interface also changed from `LabelFilterFor` to `AttributeFilterFor`. (#2790) - The `Metadata.Labels` method from the `go.opentelemetry.io/otel/sdk/metric/export` package is renamed to `Metadata.Attributes`. Consequentially, the `Record` type from the same package also has had the embedded method renamed. (#2790) ### Deprecated - The `Iterator.Label` method in the `go.opentelemetry.io/otel/attribute` package is deprecated. Use the equivalent `Iterator.Attribute` method instead. (#2790) - The `Iterator.IndexedLabel` method in the `go.opentelemetry.io/otel/attribute` package is deprecated. Use the equivalent `Iterator.IndexedAttribute` method instead. (#2790) - The `MergeIterator.Label` method in the `go.opentelemetry.io/otel/attribute` package is deprecated. Use the equivalent `MergeIterator.Attribute` method instead. (#2790) ### Removed - Removed the `Batch` type from the `go.opentelemetry.io/otel/sdk/metric/metrictest` package. (#2864) - Removed the `Measurement` type from the `go.opentelemetry.io/otel/sdk/metric/metrictest` package. (#2864) ## [0.29.0] - 2022-04-11 ### Added - The metrics global package was added back into several test files. (#2764) - The `Meter` function is added back to the `go.opentelemetry.io/otel/metric/global` package. This function is a convenience function equivalent to calling `global.MeterProvider().Meter(...)`. (#2750) ### Removed - Removed module the `go.opentelemetry.io/otel/sdk/export/metric`. Use the `go.opentelemetry.io/otel/sdk/metric` module instead. (#2720) ### Changed - Don't panic anymore when setting a global MeterProvider to itself. (#2749) - Upgrade `go.opentelemetry.io/proto/otlp` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` from `v0.12.1` to `v0.15.0`. This replaces the use of the now deprecated `InstrumentationLibrary` and `InstrumentationLibraryMetrics` types and fields in the proto library with the equivalent `InstrumentationScope` and `ScopeMetrics`. (#2748) ## [1.6.3] - 2022-04-07 ### Fixed - Allow non-comparable global `MeterProvider`, `TracerProvider`, and `TextMapPropagator` types to be set. (#2772, #2773) ## [1.6.2] - 2022-04-06 ### Changed - Don't panic anymore when setting a global TracerProvider or TextMapPropagator to itself. (#2749) - Upgrade `go.opentelemetry.io/proto/otlp` in `go.opentelemetry.io/otel/exporters/otlp/otlptrace` from `v0.12.1` to `v0.15.0`. This replaces the use of the now deprecated `InstrumentationLibrary` and `InstrumentationLibrarySpans` types and fields in the proto library with the equivalent `InstrumentationScope` and `ScopeSpans`. (#2748) ## [1.6.1] - 2022-03-28 ### Fixed - The `go.opentelemetry.io/otel/schema/*` packages now use the correct schema URL for their `SchemaURL` constant. Instead of using `"https://opentelemetry.io/schemas/v"` they now use the correct URL without a `v` prefix, `"https://opentelemetry.io/schemas/"`. (#2743, #2744) ### Security - Upgrade `go.opentelemetry.io/proto/otlp` from `v0.12.0` to `v0.12.1`. This includes an indirect upgrade of `github.com/grpc-ecosystem/grpc-gateway` which resolves [a vulnerability](https://nvd.nist.gov/vuln/detail/CVE-2019-11254) from `gopkg.in/yaml.v2` in version `v2.2.3`. (#2724, #2728) ## [1.6.0/0.28.0] - 2022-03-23 ### ⚠️ Notice ⚠️ This update is a breaking change of the unstable Metrics API. Code instrumented with the `go.opentelemetry.io/otel/metric` will need to be modified. ### Added - Add metrics exponential histogram support. New mapping functions have been made available in `sdk/metric/aggregator/exponential/mapping` for other OpenTelemetry projects to take dependencies on. (#2502) - Add Go 1.18 to our compatibility tests. (#2679) - Allow configuring the Sampler with the `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG` environment variables. (#2305, #2517) - Add the `metric/global` for obtaining and setting the global `MeterProvider`. (#2660) ### Changed - The metrics API has been significantly changed to match the revised OpenTelemetry specification. High-level changes include: - Synchronous and asynchronous instruments are now handled by independent `InstrumentProvider`s. These `InstrumentProvider`s are managed with a `Meter`. - Synchronous and asynchronous instruments are grouped into their own packages based on value types. - Asynchronous callbacks can now be registered with a `Meter`. Be sure to check out the metric module documentation for more information on how to use the revised API. (#2587, #2660) ### Fixed - Fallback to general attribute limits when span specific ones are not set in the environment. (#2675, #2677) ## [1.5.0] - 2022-03-16 ### Added - Log the Exporters configuration in the TracerProviders message. (#2578) - Added support to configure the span limits with environment variables. The following environment variables are supported. (#2606, #2637) - `OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT` - `OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT` - `OTEL_SPAN_EVENT_COUNT_LIMIT` - `OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT` - `OTEL_SPAN_LINK_COUNT_LIMIT` - `OTEL_LINK_ATTRIBUTE_COUNT_LIMIT` If the provided environment variables are invalid (negative), the default values would be used. - Rename the `gc` runtime name to `go` (#2560) - Add resource container ID detection. (#2418) - Add span attribute value length limit. The new `AttributeValueLengthLimit` field is added to the `"go.opentelemetry.io/otel/sdk/trace".SpanLimits` type to configure this limit for a `TracerProvider`. The default limit for this resource is "unlimited". (#2637) - Add the `WithRawSpanLimits` option to `go.opentelemetry.io/otel/sdk/trace`. This option replaces the `WithSpanLimits` option. Zero or negative values will not be changed to the default value like `WithSpanLimits` does. Setting a limit to zero will effectively disable the related resource it limits and setting to a negative value will mean that resource is unlimited. Consequentially, limits should be constructed using `NewSpanLimits` and updated accordingly. (#2637) ### Changed - Drop oldest tracestate `Member` when capacity is reached. (#2592) - Add event and link drop counts to the exported data from the `oltptrace` exporter. (#2601) - Unify path cleaning functionally in the `otlpmetric` and `otlptrace` configuration. (#2639) - Change the debug message from the `sdk/trace.BatchSpanProcessor` to reflect the count is cumulative. (#2640) - Introduce new internal `envconfig` package for OTLP exporters. (#2608) - If `http.Request.Host` is empty, fall back to use `URL.Host` when populating `http.host` in the `semconv` packages. (#2661) ### Fixed - Remove the OTLP trace exporter limit of SpanEvents when exporting. (#2616) - Default to port `4318` instead of `4317` for the `otlpmetrichttp` and `otlptracehttp` client. (#2614, #2625) - Unlimited span limits are now supported (negative values). (#2636, #2637) ### Deprecated - Deprecated `"go.opentelemetry.io/otel/sdk/trace".WithSpanLimits`. Use `WithRawSpanLimits` instead. That option allows setting unlimited and zero limits, this option does not. This option will be kept until the next major version incremented release. (#2637) ## [1.4.1] - 2022-02-16 ### Fixed - Fix race condition in reading the dropped spans number for the `BatchSpanProcessor`. (#2615) ## [1.4.0] - 2022-02-11 ### Added - Use `OTEL_EXPORTER_ZIPKIN_ENDPOINT` environment variable to specify zipkin collector endpoint. (#2490) - Log the configuration of `TracerProvider`s, and `Tracer`s for debugging. To enable use a logger with Verbosity (V level) `>=1`. (#2500) - Added support to configure the batch span-processor with environment variables. The following environment variables are used. (#2515) - `OTEL_BSP_SCHEDULE_DELAY` - `OTEL_BSP_EXPORT_TIMEOUT` - `OTEL_BSP_MAX_QUEUE_SIZE`. - `OTEL_BSP_MAX_EXPORT_BATCH_SIZE` ### Changed - Zipkin exporter exports `Resource` attributes in the `Tags` field. (#2589) ### Deprecated - Deprecate module the `go.opentelemetry.io/otel/sdk/export/metric`. Use the `go.opentelemetry.io/otel/sdk/metric` module instead. (#2382) - Deprecate `"go.opentelemetry.io/otel/sdk/metric".AtomicFieldOffsets`. (#2445) ### Fixed - Fixed the instrument kind for noop async instruments to correctly report an implementation. (#2461) - Fix UDP packets overflowing with Jaeger payloads. (#2489, #2512) - Change the `otlpmetric.Client` interface's `UploadMetrics` method to accept a single `ResourceMetrics` instead of a slice of them. (#2491) - Specify explicit buckets in Prometheus example, fixing issue where example only has `+inf` bucket. (#2419, #2493) - W3C baggage will now decode urlescaped values. (#2529) - Baggage members are now only validated once, when calling `NewMember` and not also when adding it to the baggage itself. (#2522) - The order attributes are dropped from spans in the `go.opentelemetry.io/otel/sdk/trace` package when capacity is reached is fixed to be in compliance with the OpenTelemetry specification. Instead of dropping the least-recently-used attribute, the last added attribute is dropped. This drop order still only applies to attributes with unique keys not already contained in the span. If an attribute is added with a key already contained in the span, that attribute is updated to the new value being added. (#2576) ### Removed - Updated `go.opentelemetry.io/proto/otlp` from `v0.11.0` to `v0.12.0`. This version removes a number of deprecated methods. (#2546) - [`Metric.GetIntGauge()`](https://pkg.go.dev/go.opentelemetry.io/proto/otlp@v0.11.0/metrics/v1#Metric.GetIntGauge) - [`Metric.GetIntHistogram()`](https://pkg.go.dev/go.opentelemetry.io/proto/otlp@v0.11.0/metrics/v1#Metric.GetIntHistogram) - [`Metric.GetIntSum()`](https://pkg.go.dev/go.opentelemetry.io/proto/otlp@v0.11.0/metrics/v1#Metric.GetIntSum) ## [1.3.0] - 2021-12-10 ### ⚠️ Notice ⚠️ We have updated the project minimum supported Go version to 1.16 ### Added - Added an internal Logger. This can be used by the SDK and API to provide users with feedback of the internal state. To enable verbose logs configure the logger which will print V(1) logs. For debugging information configure to print V(5) logs. (#2343) - Add the `WithRetry` `Option` and the `RetryConfig` type to the `go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetrichttp` package to specify retry behavior consistently. (#2425) - Add `SpanStatusFromHTTPStatusCodeAndSpanKind` to all `semconv` packages to return a span status code similar to `SpanStatusFromHTTPStatusCode`, but exclude `4XX` HTTP errors as span errors if the span is of server kind. (#2296) ### Changed - The `"go.opentelemetry.io/otel/exporter/otel/otlptrace/otlptracegrpc".Client` now uses the underlying gRPC `ClientConn` to handle name resolution, TCP connection establishment (with retries and backoff) and TLS handshakes, and handling errors on established connections by re-resolving the name and reconnecting. (#2329) - The `"go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetricgrpc".Client` now uses the underlying gRPC `ClientConn` to handle name resolution, TCP connection establishment (with retries and backoff) and TLS handshakes, and handling errors on established connections by re-resolving the name and reconnecting. (#2425) - The `"go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetricgrpc".RetrySettings` type is renamed to `RetryConfig`. (#2425) - The `go.opentelemetry.io/otel/exporter/otel/*` gRPC exporters now default to using the host's root CA set if none are provided by the user and `WithInsecure` is not specified. (#2432) - Change `resource.Default` to be evaluated the first time it is called, rather than on import. This allows the caller the option to update `OTEL_RESOURCE_ATTRIBUTES` first, such as with `os.Setenv`. (#2371) ### Fixed - The `go.opentelemetry.io/otel/exporter/otel/*` exporters are updated to handle per-signal and universal endpoints according to the OpenTelemetry specification. Any per-signal endpoint set via an `OTEL_EXPORTER_OTLP__ENDPOINT` environment variable is now used without modification of the path. When `OTEL_EXPORTER_OTLP_ENDPOINT` is set, if it contains a path, that path is used as a base path which per-signal paths are appended to. (#2433) - Basic metric controller updated to use sync.Map to avoid blocking calls (#2381) - The `go.opentelemetry.io/otel/exporter/jaeger` correctly sets the `otel.status_code` value to be a string of `ERROR` or `OK` instead of an integer code. (#2439, #2440) ### Deprecated - Deprecated the `"go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetrichttp".WithMaxAttempts` `Option`, use the new `WithRetry` `Option` instead. (#2425) - Deprecated the `"go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetrichttp".WithBackoff` `Option`, use the new `WithRetry` `Option` instead. (#2425) ### Removed - Remove the metric Processor's ability to convert cumulative to delta aggregation temporality. (#2350) - Remove the metric Bound Instruments interface and implementations. (#2399) - Remove the metric MinMaxSumCount kind aggregation and the corresponding OTLP export path. (#2423) - Metric SDK removes the "exact" aggregator for histogram instruments, as it performed a non-standard aggregation for OTLP export (creating repeated Gauge points) and worked its way into a number of confusing examples. (#2348) ## [1.2.0] - 2021-11-12 ### Changed - Metric SDK `export.ExportKind`, `export.ExportKindSelector` types have been renamed to `aggregation.Temporality` and `aggregation.TemporalitySelector` respectively to keep in line with current specification and protocol along with built-in selectors (e.g., `aggregation.CumulativeTemporalitySelector`, ...). (#2274) - The Metric `Exporter` interface now requires a `TemporalitySelector` method instead of an `ExportKindSelector`. (#2274) - Metrics API cleanup. The `metric/sdkapi` package has been created to relocate the API-to-SDK interface: - The following interface types simply moved from `metric` to `metric/sdkapi`: `Descriptor`, `MeterImpl`, `InstrumentImpl`, `SyncImpl`, `BoundSyncImpl`, `AsyncImpl`, `AsyncRunner`, `AsyncSingleRunner`, and `AsyncBatchRunner` - The following struct types moved and are replaced with type aliases, since they are exposed to the user: `Observation`, `Measurement`. - The No-op implementations of sync and async instruments are no longer exported, new functions `sdkapi.NewNoopAsyncInstrument()` and `sdkapi.NewNoopSyncInstrument()` are provided instead. (#2271) - Update the SDK `BatchSpanProcessor` to export all queued spans when `ForceFlush` is called. (#2080, #2335) ### Added - Add the `"go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc".WithGRPCConn` option so the exporter can reuse an existing gRPC connection. (#2002) - Added a new `schema` module to help parse Schema Files in OTEP 0152 format. (#2267) - Added a new `MapCarrier` to the `go.opentelemetry.io/otel/propagation` package to hold propagated cross-cutting concerns as a `map[string]string` held in memory. (#2334) ## [1.1.0] - 2021-10-27 ### Added - Add the `"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc".WithGRPCConn` option so the exporter can reuse an existing gRPC connection. (#2002) - Add the `go.opentelemetry.io/otel/semconv/v1.7.0` package. The package contains semantic conventions from the `v1.7.0` version of the OpenTelemetry specification. (#2320) - Add the `go.opentelemetry.io/otel/semconv/v1.6.1` package. The package contains semantic conventions from the `v1.6.1` version of the OpenTelemetry specification. (#2321) - Add the `go.opentelemetry.io/otel/semconv/v1.5.0` package. The package contains semantic conventions from the `v1.5.0` version of the OpenTelemetry specification. (#2322) - When upgrading from the `semconv/v1.4.0` package note the following name changes: - `K8SReplicasetUIDKey` -> `K8SReplicaSetUIDKey` - `K8SReplicasetNameKey` -> `K8SReplicaSetNameKey` - `K8SStatefulsetUIDKey` -> `K8SStatefulSetUIDKey` - `k8SStatefulsetNameKey` -> `K8SStatefulSetNameKey` - `K8SDaemonsetUIDKey` -> `K8SDaemonSetUIDKey` - `K8SDaemonsetNameKey` -> `K8SDaemonSetNameKey` ### Changed - Links added to a span will be dropped by the SDK if they contain an invalid span context (#2275). ### Fixed - The `"go.opentelemetry.io/otel/semconv/v1.4.0".HTTPServerAttributesFromHTTPRequest` now correctly only sets the HTTP client IP attribute even if the connection was routed with proxies and there are multiple addresses in the `X-Forwarded-For` header. (#2282, #2284) - The `"go.opentelemetry.io/otel/semconv/v1.4.0".NetAttributesFromHTTPRequest` function correctly handles IPv6 addresses as IP addresses and sets the correct net peer IP instead of the net peer hostname attribute. (#2283, #2285) - The simple span processor shutdown method deterministically returns the exporter error status if it simultaneously finishes when the deadline is reached. (#2290, #2289) ## [1.0.1] - 2021-10-01 ### Fixed - json stdout exporter no longer crashes due to concurrency bug. (#2265) ## [Metrics 0.24.0] - 2021-10-01 ### Changed - NoopMeterProvider is now private and NewNoopMeterProvider must be used to obtain a noopMeterProvider. (#2237) - The Metric SDK `Export()` function takes a new two-level reader interface for iterating over results one instrumentation library at a time. (#2197) - The former `"go.opentelemetry.io/otel/sdk/export/metric".CheckpointSet` is renamed `Reader`. - The new interface is named `"go.opentelemetry.io/otel/sdk/export/metric".InstrumentationLibraryReader`. ## [1.0.0] - 2021-09-20 This is the first stable release for the project. This release includes an API and SDK for the tracing signal that will comply with the stability guarantees defined by the projects [versioning policy](./VERSIONING.md). ### Added - OTLP trace exporter now sets the `SchemaURL` field in the exported telemetry if the Tracer has `WithSchemaURL` option. (#2242) ### Fixed - Slice-valued attributes can correctly be used as map keys. (#2223) ### Removed - Removed the `"go.opentelemetry.io/otel/exporters/zipkin".WithSDKOptions` function. (#2248) - Removed the deprecated package `go.opentelemetry.io/otel/oteltest`. (#2234) - Removed the deprecated package `go.opentelemetry.io/otel/bridge/opencensus/utils`. (#2233) - Removed deprecated functions, types, and methods from `go.opentelemetry.io/otel/attribute` package. Use the typed functions and methods added to the package instead. (#2235) - The `Key.Array` method is removed. - The `Array` function is removed. - The `Any` function is removed. - The `ArrayValue` function is removed. - The `AsArray` function is removed. ## [1.0.0-RC3] - 2021-09-02 ### Added - Added `ErrorHandlerFunc` to use a function as an `"go.opentelemetry.io/otel".ErrorHandler`. (#2149) - Added `"go.opentelemetry.io/otel/trace".WithStackTrace` option to add a stack trace when using `span.RecordError` or when panic is handled in `span.End`. (#2163) - Added typed slice attribute types and functionality to the `go.opentelemetry.io/otel/attribute` package to replace the existing array type and functions. (#2162) - `BoolSlice`, `IntSlice`, `Int64Slice`, `Float64Slice`, and `StringSlice` replace the use of the `Array` function in the package. - Added the `go.opentelemetry.io/otel/example/fib` example package. Included is an example application that computes Fibonacci numbers. (#2203) ### Changed - Metric instruments have been renamed to match the (feature-frozen) metric API specification: - ValueRecorder becomes Histogram - ValueObserver becomes Gauge - SumObserver becomes CounterObserver - UpDownSumObserver becomes UpDownCounterObserver The API exported from this project is still considered experimental. (#2202) - Metric SDK/API implementation type `InstrumentKind` moves into `sdkapi` sub-package. (#2091) - The Metrics SDK export record no longer contains a Resource pointer, the SDK `"go.opentelemetry.io/otel/sdk/trace/export/metric".Exporter.Export()` function for push-based exporters now takes a single Resource argument, pull-based exporters use `"go.opentelemetry.io/otel/sdk/metric/controller/basic".Controller.Resource()`. (#2120) - The JSON output of the `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` is harmonized now such that the output is "plain" JSON objects after each other of the form `{ ... } { ... } { ... }`. Earlier the JSON objects describing a span were wrapped in a slice for each `Exporter.ExportSpans` call, like `[ { ... } ][ { ... } { ... } ]`. Outputting JSON object directly after each other is consistent with JSON loggers, and a bit easier to parse and read. (#2196) - Update the `NewTracerConfig`, `NewSpanStartConfig`, `NewSpanEndConfig`, and `NewEventConfig` function in the `go.opentelemetry.io/otel/trace` package to return their respective configurations as structs instead of pointers to the struct. (#2212) ### Deprecated - The `go.opentelemetry.io/otel/bridge/opencensus/utils` package is deprecated. All functionality from this package now exists in the `go.opentelemetry.io/otel/bridge/opencensus` package. The functions from that package should be used instead. (#2166) - The `"go.opentelemetry.io/otel/attribute".Array` function and the related `ARRAY` value type is deprecated. Use the typed `*Slice` functions and types added to the package instead. (#2162) - The `"go.opentelemetry.io/otel/attribute".Any` function is deprecated. Use the typed functions instead. (#2181) - The `go.opentelemetry.io/otel/oteltest` package is deprecated. The `"go.opentelemetry.io/otel/sdk/trace/tracetest".SpanRecorder` can be registered with the default SDK (`go.opentelemetry.io/otel/sdk/trace`) as a `SpanProcessor` and used as a replacement for this deprecated package. (#2188) ### Removed - Removed metrics test package `go.opentelemetry.io/otel/sdk/export/metric/metrictest`. (#2105) ### Fixed - The `fromEnv` detector no longer throws an error when `OTEL_RESOURCE_ATTRIBUTES` environment variable is not set or empty. (#2138) - Setting the global `ErrorHandler` with `"go.opentelemetry.io/otel".SetErrorHandler` multiple times is now supported. (#2160, #2140) - The `"go.opentelemetry.io/otel/attribute".Any` function now supports `int32` values. (#2169) - Multiple calls to `"go.opentelemetry.io/otel/sdk/metric/controller/basic".WithResource()` are handled correctly, and when no resources are provided `"go.opentelemetry.io/otel/sdk/resource".Default()` is used. (#2120) - The `WithoutTimestamps` option for the `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` exporter causes the exporter to correctly omit timestamps. (#2195) - Fixed typos in resources.go. (#2201) ## [1.0.0-RC2] - 2021-07-26 ### Added - Added `WithOSDescription` resource configuration option to set OS (Operating System) description resource attribute (`os.description`). (#1840) - Added `WithOS` resource configuration option to set all OS (Operating System) resource attributes at once. (#1840) - Added the `WithRetry` option to the `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` package. This option is a replacement for the removed `WithMaxAttempts` and `WithBackoff` options. (#2095) - Added API `LinkFromContext` to return Link which encapsulates SpanContext from provided context and also encapsulates attributes. (#2115) - Added a new `Link` type under the SDK `otel/sdk/trace` package that counts the number of attributes that were dropped for surpassing the `AttributePerLinkCountLimit` configured in the Span's `SpanLimits`. This new type replaces the equal-named API `Link` type found in the `otel/trace` package for most usages within the SDK. For example, instances of this type are now returned by the `Links()` function of `ReadOnlySpan`s provided in places like the `OnEnd` function of `SpanProcessor` implementations. (#2118) - Added the `SpanRecorder` type to the `go.opentelemetry.io/otel/skd/trace/tracetest` package. This type can be used with the default SDK as a `SpanProcessor` during testing. (#2132) ### Changed - The `SpanModels` function is now exported from the `go.opentelemetry.io/otel/exporters/zipkin` package to convert OpenTelemetry spans into Zipkin model spans. (#2027) - Rename the `"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc".RetrySettings` to `RetryConfig`. (#2095) ### Deprecated - The `TextMapCarrier` and `TextMapPropagator` from the `go.opentelemetry.io/otel/oteltest` package and their associated creation functions (`TextMapCarrier`, `NewTextMapPropagator`) are deprecated. (#2114) - The `Harness` type from the `go.opentelemetry.io/otel/oteltest` package and its associated creation function, `NewHarness` are deprecated and will be removed in the next release. (#2123) - The `TraceStateFromKeyValues` function from the `go.opentelemetry.io/otel/oteltest` package is deprecated. Use the `trace.ParseTraceState` function instead. (#2122) ### Removed - Removed the deprecated package `go.opentelemetry.io/otel/exporters/trace/jaeger`. (#2020) - Removed the deprecated package `go.opentelemetry.io/otel/exporters/trace/zipkin`. (#2020) - Removed the `"go.opentelemetry.io/otel/sdk/resource".WithBuiltinDetectors` function. The explicit `With*` options for every built-in detector should be used instead. (#2026 #2097) - Removed the `WithMaxAttempts` and `WithBackoff` options from the `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` package. The retry logic of the package has been updated to match the `otlptracegrpc` package and accordingly a `WithRetry` option is added that should be used instead. (#2095) - Removed `DroppedAttributeCount` field from `otel/trace.Link` struct. (#2118) ### Fixed - When using WithNewRoot, don't use the parent context for making sampling decisions. (#2032) - `oteltest.Tracer` now creates a valid `SpanContext` when using `WithNewRoot`. (#2073) - OS type detector now sets the correct `dragonflybsd` value for DragonFly BSD. (#2092) - The OTel span status is correctly transformed into the OTLP status in the `go.opentelemetry.io/otel/exporters/otlp/otlptrace` package. This fix will by default set the status to `Unset` if it is not explicitly set to `Ok` or `Error`. (#2099 #2102) - The `Inject` method for the `"go.opentelemetry.io/otel/propagation".TraceContext` type no longer injects empty `tracestate` values. (#2108) - Use `6831` as default Jaeger agent port instead of `6832`. (#2131) ## [Experimental Metrics v0.22.0] - 2021-07-19 ### Added - Adds HTTP support for OTLP metrics exporter. (#2022) ### Removed - Removed the deprecated package `go.opentelemetry.io/otel/exporters/metric/prometheus`. (#2020) ## [1.0.0-RC1] / 0.21.0 - 2021-06-18 With this release we are introducing a split in module versions. The tracing API and SDK are entering the `v1.0.0` Release Candidate phase with `v1.0.0-RC1` while the experimental metrics API and SDK continue with `v0.x` releases at `v0.21.0`. Modules at major version 1 or greater will not depend on modules with major version 0. ### Added - Adds `otlpgrpc.WithRetry`option for configuring the retry policy for transient errors on the otlp/gRPC exporter. (#1832) - The following status codes are defined as transient errors: | gRPC Status Code | Description | | ---------------- | ----------- | | 1 | Cancelled | | 4 | Deadline Exceeded | | 8 | Resource Exhausted | | 10 | Aborted | | 10 | Out of Range | | 14 | Unavailable | | 15 | Data Loss | - Added `Status` type to the `go.opentelemetry.io/otel/sdk/trace` package to represent the status of a span. (#1874) - Added `SpanStub` type and its associated functions to the `go.opentelemetry.io/otel/sdk/trace/tracetest` package. This type can be used as a testing replacement for the `SpanSnapshot` that was removed from the `go.opentelemetry.io/otel/sdk/trace` package. (#1873) - Adds support for scheme in `OTEL_EXPORTER_OTLP_ENDPOINT` according to the spec. (#1886) - Adds `trace.WithSchemaURL` option for configuring the tracer with a Schema URL. (#1889) - Added an example of using OpenTelemetry Go as a trace context forwarder. (#1912) - `ParseTraceState` is added to the `go.opentelemetry.io/otel/trace` package. It can be used to decode a `TraceState` from a `tracestate` header string value. (#1937) - Added `Len` method to the `TraceState` type in the `go.opentelemetry.io/otel/trace` package. This method returns the number of list-members the `TraceState` holds. (#1937) - Creates package `go.opentelemetry.io/otel/exporters/otlp/otlptrace` that defines a trace exporter that uses a `otlptrace.Client` to send data. Creates package `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` implementing a gRPC `otlptrace.Client` and offers convenience functions, `NewExportPipeline` and `InstallNewPipeline`, to setup and install a `otlptrace.Exporter` in tracing .(#1922) - Added `Baggage`, `Member`, and `Property` types to the `go.opentelemetry.io/otel/baggage` package along with their related functions. (#1967) - Added `ContextWithBaggage`, `ContextWithoutBaggage`, and `FromContext` functions to the `go.opentelemetry.io/otel/baggage` package. These functions replace the `Set`, `Value`, `ContextWithValue`, `ContextWithoutValue`, and `ContextWithEmpty` functions from that package and directly work with the new `Baggage` type. (#1967) - The `OTEL_SERVICE_NAME` environment variable is the preferred source for `service.name`, used by the environment resource detector if a service name is present both there and in `OTEL_RESOURCE_ATTRIBUTES`. (#1969) - Creates package `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` implementing an HTTP `otlptrace.Client` and offers convenience functions, `NewExportPipeline` and `InstallNewPipeline`, to setup and install a `otlptrace.Exporter` in tracing. (#1963) - Changes `go.opentelemetry.io/otel/sdk/resource.NewWithAttributes` to require a schema URL. The old function is still available as `resource.NewSchemaless`. This is a breaking change. (#1938) - Several builtin resource detectors now correctly populate the schema URL. (#1938) - Creates package `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` that defines a metrics exporter that uses a `otlpmetric.Client` to send data. - Creates package `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` implementing a gRPC `otlpmetric.Client` and offers convenience functions, `New` and `NewUnstarted`, to create an `otlpmetric.Exporter`.(#1991) - Added `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` exporter. (#2005) - Added `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` exporter. (#2005) - Added a `TracerProvider()` method to the `"go.opentelemetry.io/otel/trace".Span` interface. This can be used to obtain a `TracerProvider` from a given span that utilizes the same trace processing pipeline. (#2009) ### Changed - Make `NewSplitDriver` from `go.opentelemetry.io/otel/exporters/otlp` take variadic arguments instead of a `SplitConfig` item. `NewSplitDriver` now automatically implements an internal `noopDriver` for `SplitConfig` fields that are not initialized. (#1798) - `resource.New()` now creates a Resource without builtin detectors. Previous behavior is now achieved by using `WithBuiltinDetectors` Option. (#1810) - Move the `Event` type from the `go.opentelemetry.io/otel` package to the `go.opentelemetry.io/otel/sdk/trace` package. (#1846) - CI builds validate against last two versions of Go, dropping 1.14 and adding 1.16. (#1865) - BatchSpanProcessor now report export failures when calling `ForceFlush()` method. (#1860) - `Set.Encoded(Encoder)` no longer caches the result of an encoding. (#1855) - Renamed `CloudZoneKey` to `CloudAvailabilityZoneKey` in Resource semantic conventions according to spec. (#1871) - The `StatusCode` and `StatusMessage` methods of the `ReadOnlySpan` interface and the `Span` produced by the `go.opentelemetry.io/otel/sdk/trace` package have been replaced with a single `Status` method. This method returns the status of a span using the new `Status` type. (#1874) - Updated `ExportSpans` method of the`SpanExporter` interface type to accept `ReadOnlySpan`s instead of the removed `SpanSnapshot`. This brings the export interface into compliance with the specification in that it now accepts an explicitly immutable type instead of just an implied one. (#1873) - Unembed `SpanContext` in `Link`. (#1877) - Generate Semantic conventions from the specification YAML. (#1891) - Spans created by the global `Tracer` obtained from `go.opentelemetry.io/otel`, prior to a functioning `TracerProvider` being set, now propagate the span context from their parent if one exists. (#1901) - The `"go.opentelemetry.io/otel".Tracer` function now accepts tracer options. (#1902) - Move the `go.opentelemetry.io/otel/unit` package to `go.opentelemetry.io/otel/metric/unit`. (#1903) - Changed `go.opentelemetry.io/otel/trace.TracerConfig` to conform to the [Contributing guidelines](CONTRIBUTING.md#config.) (#1921) - Changed `go.opentelemetry.io/otel/trace.SpanConfig` to conform to the [Contributing guidelines](CONTRIBUTING.md#config). (#1921) - Changed `span.End()` now only accepts Options that are allowed at `End()`. (#1921) - Changed `go.opentelemetry.io/otel/metric.InstrumentConfig` to conform to the [Contributing guidelines](CONTRIBUTING.md#config). (#1921) - Changed `go.opentelemetry.io/otel/metric.MeterConfig` to conform to the [Contributing guidelines](CONTRIBUTING.md#config). (#1921) - Refactored option types according to the contribution style guide. (#1882) - Move the `go.opentelemetry.io/otel/trace.TraceStateFromKeyValues` function to the `go.opentelemetry.io/otel/oteltest` package. This function is preserved for testing purposes where it may be useful to create a `TraceState` from `attribute.KeyValue`s, but it is not intended for production use. The new `ParseTraceState` function should be used to create a `TraceState`. (#1931) - Updated `MarshalJSON` method of the `go.opentelemetry.io/otel/trace.TraceState` type to marshal the type into the string representation of the `TraceState`. (#1931) - The `TraceState.Delete` method from the `go.opentelemetry.io/otel/trace` package no longer returns an error in addition to a `TraceState`. (#1931) - Updated `Get` method of the `TraceState` type from the `go.opentelemetry.io/otel/trace` package to accept a `string` instead of an `attribute.Key` type. (#1931) - Updated `Insert` method of the `TraceState` type from the `go.opentelemetry.io/otel/trace` package to accept a pair of `string`s instead of an `attribute.KeyValue` type. (#1931) - Updated `Delete` method of the `TraceState` type from the `go.opentelemetry.io/otel/trace` package to accept a `string` instead of an `attribute.Key` type. (#1931) - Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/stdout` package. (#1985) - Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/metric/prometheus` package. (#1985) - Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/trace/jaeger` package. (#1985) - Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/trace/zipkin` package. (#1985) - Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/otlp` package. (#1985) - Renamed `NewUnstartedExporter` to `NewUnstarted` in the `go.opentelemetry.io/otel/exporters/otlp` package. (#1985) - The `go.opentelemetry.io/otel/semconv` package has been moved to `go.opentelemetry.io/otel/semconv/v1.4.0` to allow for multiple [telemetry schema](https://github.com/open-telemetry/oteps/blob/main/text/0152-telemetry-schemas.md) versions to be used concurrently. (#1987) - Metrics test helpers in `go.opentelemetry.io/otel/oteltest` have been moved to `go.opentelemetry.io/otel/metric/metrictest`. (#1988) ### Deprecated - The `go.opentelemetry.io/otel/exporters/metric/prometheus` is deprecated, use `go.opentelemetry.io/otel/exporters/prometheus` instead. (#1993) - The `go.opentelemetry.io/otel/exporters/trace/jaeger` is deprecated, use `go.opentelemetry.io/otel/exporters/jaeger` instead. (#1993) - The `go.opentelemetry.io/otel/exporters/trace/zipkin` is deprecated, use `go.opentelemetry.io/otel/exporters/zipkin` instead. (#1993) ### Removed - Removed `resource.WithoutBuiltin()`. Use `resource.New()`. (#1810) - Unexported types `resource.FromEnv`, `resource.Host`, and `resource.TelemetrySDK`, Use the corresponding `With*()` to use individually. (#1810) - Removed the `Tracer` and `IsRecording` method from the `ReadOnlySpan` in the `go.opentelemetry.io/otel/sdk/trace`. The `Tracer` method is not a required to be included in this interface and given the mutable nature of the tracer that is associated with a span, this method is not appropriate. The `IsRecording` method returns if the span is recording or not. A read-only span value does not need to know if updates to it will be recorded or not. By definition, it cannot be updated so there is no point in communicating if an update is recorded. (#1873) - Removed the `SpanSnapshot` type from the `go.opentelemetry.io/otel/sdk/trace` package. The use of this type has been replaced with the use of the explicitly immutable `ReadOnlySpan` type. When a concrete representation of a read-only span is needed for testing, the newly added `SpanStub` in the `go.opentelemetry.io/otel/sdk/trace/tracetest` package should be used. (#1873) - Removed the `Tracer` method from the `Span` interface in the `go.opentelemetry.io/otel/trace` package. Using the same tracer that created a span introduces the error where an instrumentation library's `Tracer` is used by other code instead of their own. The `"go.opentelemetry.io/otel".Tracer` function or a `TracerProvider` should be used to acquire a library specific `Tracer` instead. (#1900) - The `TracerProvider()` method on the `Span` interface may also be used to obtain a `TracerProvider` using the same trace processing pipeline. (#2009) - The `http.url` attribute generated by `HTTPClientAttributesFromHTTPRequest` will no longer include username or password information. (#1919) - Removed `IsEmpty` method of the `TraceState` type in the `go.opentelemetry.io/otel/trace` package in favor of using the added `TraceState.Len` method. (#1931) - Removed `Set`, `Value`, `ContextWithValue`, `ContextWithoutValue`, and `ContextWithEmpty` functions in the `go.opentelemetry.io/otel/baggage` package. Handling of baggage is now done using the added `Baggage` type and related context functions (`ContextWithBaggage`, `ContextWithoutBaggage`, and `FromContext`) in that package. (#1967) - The `InstallNewPipeline` and `NewExportPipeline` creation functions in all the exporters (prometheus, otlp, stdout, jaeger, and zipkin) have been removed. These functions were deemed premature attempts to provide convenience that did not achieve this aim. (#1985) - The `go.opentelemetry.io/otel/exporters/otlp` exporter has been removed. Use `go.opentelemetry.io/otel/exporters/otlp/otlptrace` instead. (#1990) - The `go.opentelemetry.io/otel/exporters/stdout` exporter has been removed. Use `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` or `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` instead. (#2005) ### Fixed - Only report errors from the `"go.opentelemetry.io/otel/sdk/resource".Environment` function when they are not `nil`. (#1850, #1851) - The `Shutdown` method of the simple `SpanProcessor` in the `go.opentelemetry.io/otel/sdk/trace` package now honors the context deadline or cancellation. (#1616, #1856) - BatchSpanProcessor now drops span batches that failed to be exported. (#1860) - Use `http://localhost:14268/api/traces` as default Jaeger collector endpoint instead of `http://localhost:14250`. (#1898) - Allow trailing and leading whitespace in the parsing of a `tracestate` header. (#1931) - Add logic to determine if the channel is closed to fix Jaeger exporter test panic with close closed channel. (#1870, #1973) - Avoid transport security when OTLP endpoint is a Unix socket. (#2001) ### Security ## [0.20.0] - 2021-04-23 ### Added - The OTLP exporter now has two new convenience functions, `NewExportPipeline` and `InstallNewPipeline`, setup and install the exporter in tracing and metrics pipelines. (#1373) - Adds semantic conventions for exceptions. (#1492) - Added Jaeger Environment variables: `OTEL_EXPORTER_JAEGER_AGENT_HOST`, `OTEL_EXPORTER_JAEGER_AGENT_PORT` These environment variables can be used to override Jaeger agent hostname and port (#1752) - Option `ExportTimeout` was added to batch span processor. (#1755) - `trace.TraceFlags` is now a defined type over `byte` and `WithSampled(bool) TraceFlags` and `IsSampled() bool` methods have been added to it. (#1770) - The `Event` and `Link` struct types from the `go.opentelemetry.io/otel` package now include a `DroppedAttributeCount` field to record the number of attributes that were not recorded due to configured limits being reached. (#1771) - The Jaeger exporter now reports dropped attributes for a Span event in the exported log. (#1771) - Adds test to check BatchSpanProcessor ignores `OnEnd` and `ForceFlush` post `Shutdown`. (#1772) - Extract resource attributes from the `OTEL_RESOURCE_ATTRIBUTES` environment variable and merge them with the `resource.Default` resource as well as resources provided to the `TracerProvider` and metric `Controller`. (#1785) - Added `WithOSType` resource configuration option to set OS (Operating System) type resource attribute (`os.type`). (#1788) - Added `WithProcess*` resource configuration options to set Process resource attributes. (#1788) - `process.pid` - `process.executable.name` - `process.executable.path` - `process.command_args` - `process.owner` - `process.runtime.name` - `process.runtime.version` - `process.runtime.description` - Adds `k8s.node.name` and `k8s.node.uid` attribute keys to the `semconv` package. (#1789) - Added support for configuring OTLP/HTTP and OTLP/gRPC Endpoints, TLS Certificates, Headers, Compression and Timeout via Environment Variables. (#1758, #1769 and #1811) - `OTEL_EXPORTER_OTLP_ENDPOINT` - `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` - `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT` - `OTEL_EXPORTER_OTLP_HEADERS` - `OTEL_EXPORTER_OTLP_TRACES_HEADERS` - `OTEL_EXPORTER_OTLP_METRICS_HEADERS` - `OTEL_EXPORTER_OTLP_COMPRESSION` - `OTEL_EXPORTER_OTLP_TRACES_COMPRESSION` - `OTEL_EXPORTER_OTLP_METRICS_COMPRESSION` - `OTEL_EXPORTER_OTLP_TIMEOUT` - `OTEL_EXPORTER_OTLP_TRACES_TIMEOUT` - `OTEL_EXPORTER_OTLP_METRICS_TIMEOUT` - `OTEL_EXPORTER_OTLP_CERTIFICATE` - `OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE` - `OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE` - Adds `otlpgrpc.WithTimeout` option for configuring timeout to the otlp/gRPC exporter. (#1821) - Adds `jaeger.WithMaxPacketSize` option for configuring maximum UDP packet size used when connecting to the Jaeger agent. (#1853) ### Fixed - The `Span.IsRecording` implementation from `go.opentelemetry.io/otel/sdk/trace` always returns false when not being sampled. (#1750) - The Jaeger exporter now correctly sets tags for the Span status code and message. This means it uses the correct tag keys (`"otel.status_code"`, `"otel.status_description"`) and does not set the status message as a tag unless it is set on the span. (#1761) - The Jaeger exporter now correctly records Span event's names using the `"event"` key for a tag. Additionally, this tag is overridden, as specified in the OTel specification, if the event contains an attribute with that key. (#1768) - Zipkin Exporter: Ensure mapping between OTel and Zipkin span data complies with the specification. (#1688) - Fixed typo for default service name in Jaeger Exporter. (#1797) - Fix flaky OTLP for the reconnnection of the client connection. (#1527, #1814) - Fix Jaeger exporter dropping of span batches that exceed the UDP packet size limit. Instead, the exporter now splits the batch into smaller sendable batches. (#1828) ### Changed - Span `RecordError` now records an `exception` event to comply with the semantic convention specification. (#1492) - Jaeger exporter was updated to use thrift v0.14.1. (#1712) - Migrate from using internally built and maintained version of the OTLP to the one hosted at `go.opentelemetry.io/proto/otlp`. (#1713) - Migrate from using `github.com/gogo/protobuf` to `google.golang.org/protobuf` to match `go.opentelemetry.io/proto/otlp`. (#1713) - The storage of a local or remote Span in a `context.Context` using its SpanContext is unified to store just the current Span. The Span's SpanContext can now self-identify as being remote or not. This means that `"go.opentelemetry.io/otel/trace".ContextWithRemoteSpanContext` will now overwrite any existing current Span, not just existing remote Spans, and make it the current Span in a `context.Context`. (#1731) - Improve OTLP/gRPC exporter connection errors. (#1737) - Information about a parent span context in a `"go.opentelemetry.io/otel/export/trace".SpanSnapshot` is unified in a new `Parent` field. The existing `ParentSpanID` and `HasRemoteParent` fields are removed in favor of this. (#1748) - The `ParentContext` field of the `"go.opentelemetry.io/otel/sdk/trace".SamplingParameters` is updated to hold a `context.Context` containing the parent span. This changes it to make `SamplingParameters` conform with the OpenTelemetry specification. (#1749) - Updated Jaeger Environment Variables: `JAEGER_ENDPOINT`, `JAEGER_USER`, `JAEGER_PASSWORD` to `OTEL_EXPORTER_JAEGER_ENDPOINT`, `OTEL_EXPORTER_JAEGER_USER`, `OTEL_EXPORTER_JAEGER_PASSWORD` in compliance with OTel specification. (#1752) - Modify `BatchSpanProcessor.ForceFlush` to abort after timeout/cancellation. (#1757) - The `DroppedAttributeCount` field of the `Span` in the `go.opentelemetry.io/otel` package now only represents the number of attributes dropped for the span itself. It no longer is a conglomerate of itself, events, and link attributes that have been dropped. (#1771) - Make `ExportSpans` in Jaeger Exporter honor context deadline. (#1773) - Modify Zipkin Exporter default service name, use default resource's serviceName instead of empty. (#1777) - The `go.opentelemetry.io/otel/sdk/export/trace` package is merged into the `go.opentelemetry.io/otel/sdk/trace` package. (#1778) - The prometheus.InstallNewPipeline example is moved from comment to example test (#1796) - The convenience functions for the stdout exporter have been updated to return the `TracerProvider` implementation and enable the shutdown of the exporter. (#1800) - Replace the flush function returned from the Jaeger exporter's convenience creation functions (`InstallNewPipeline` and `NewExportPipeline`) with the `TracerProvider` implementation they create. This enables the caller to shutdown and flush using the related `TracerProvider` methods. (#1822) - Updated the Jaeger exporter to have a default endpoint, `http://localhost:14250`, for the collector. (#1824) - Changed the function `WithCollectorEndpoint` in the Jaeger exporter to no longer accept an endpoint as an argument. The endpoint can be passed with the `CollectorEndpointOption` using the `WithEndpoint` function or by setting the `OTEL_EXPORTER_JAEGER_ENDPOINT` environment variable value appropriately. (#1824) - The Jaeger exporter no longer batches exported spans itself, instead it relies on the SDK's `BatchSpanProcessor` for this functionality. (#1830) - The Jaeger exporter creation functions (`NewRawExporter`, `NewExportPipeline`, and `InstallNewPipeline`) no longer accept the removed `Option` type as a variadic argument. (#1830) ### Removed - Removed Jaeger Environment variables: `JAEGER_SERVICE_NAME`, `JAEGER_DISABLED`, `JAEGER_TAGS` These environment variables will no longer be used to override values of the Jaeger exporter (#1752) - No longer set the links for a `Span` in `go.opentelemetry.io/otel/sdk/trace` that is configured to be a new root. This is unspecified behavior that the OpenTelemetry community plans to standardize in the future. To prevent backwards incompatible changes when it is specified, these links are removed. (#1726) - Setting error status while recording error with Span from oteltest package. (#1729) - The concept of a remote and local Span stored in a context is unified to just the current Span. Because of this `"go.opentelemetry.io/otel/trace".RemoteSpanContextFromContext` is removed as it is no longer needed. Instead, `"go.opentelemetry.io/otel/trace".SpanContextFromContex` can be used to return the current Span. If needed, that Span's `SpanContext.IsRemote()` can then be used to determine if it is remote or not. (#1731) - The `HasRemoteParent` field of the `"go.opentelemetry.io/otel/sdk/trace".SamplingParameters` is removed. This field is redundant to the information returned from the `Remote` method of the `SpanContext` held in the `ParentContext` field. (#1749) - The `trace.FlagsDebug` and `trace.FlagsDeferred` constants have been removed and will be localized to the B3 propagator. (#1770) - Remove `Process` configuration, `WithProcessFromEnv` and `ProcessFromEnv`, and type from the Jaeger exporter package. The information that could be configured in the `Process` struct should be configured in a `Resource` instead. (#1776, #1804) - Remove the `WithDisabled` option from the Jaeger exporter. To disable the exporter unregister it from the `TracerProvider` or use a no-operation `TracerProvider`. (#1806) - Removed the functions `CollectorEndpointFromEnv` and `WithCollectorEndpointOptionFromEnv` from the Jaeger exporter. These functions for retrieving specific environment variable values are redundant of other internal functions and are not intended for end user use. (#1824) - Removed the Jaeger exporter `WithSDKOptions` `Option`. This option was used to set SDK options for the exporter creation convenience functions. These functions are provided as a way to easily setup or install the exporter with what are deemed reasonable SDK settings for common use cases. If the SDK needs to be configured differently, the `NewRawExporter` function and direct setup of the SDK with the desired settings should be used. (#1825) - The `WithBufferMaxCount` and `WithBatchMaxCount` `Option`s from the Jaeger exporter are removed. The exporter no longer batches exports, instead relying on the SDK's `BatchSpanProcessor` for this functionality. (#1830) - The Jaeger exporter `Option` type is removed. The type is no longer used by the exporter to configure anything. All the previous configurations these options provided were duplicates of SDK configuration. They have been removed in favor of using the SDK configuration and focuses the exporter configuration to be only about the endpoints it will send telemetry to. (#1830) ## [0.19.0] - 2021-03-18 ### Added - Added `Marshaler` config option to `otlphttp` to enable otlp over json or protobufs. (#1586) - A `ForceFlush` method to the `"go.opentelemetry.io/otel/sdk/trace".TracerProvider` to flush all registered `SpanProcessor`s. (#1608) - Added `WithSampler` and `WithSpanLimits` to tracer provider. (#1633, #1702) - `"go.opentelemetry.io/otel/trace".SpanContext` now has a `remote` property, and `IsRemote()` predicate, that is true when the `SpanContext` has been extracted from remote context data. (#1701) - A `Valid` method to the `"go.opentelemetry.io/otel/attribute".KeyValue` type. (#1703) ### Changed - `trace.SpanContext` is now immutable and has no exported fields. (#1573) - `trace.NewSpanContext()` can be used in conjunction with the `trace.SpanContextConfig` struct to initialize a new `SpanContext` where all values are known. - Update the `ForceFlush` method signature to the `"go.opentelemetry.io/otel/sdk/trace".SpanProcessor` to accept a `context.Context` and return an error. (#1608) - Update the `Shutdown` method to the `"go.opentelemetry.io/otel/sdk/trace".TracerProvider` return an error on shutdown failure. (#1608) - The SimpleSpanProcessor will now shut down the enclosed `SpanExporter` and gracefully ignore subsequent calls to `OnEnd` after `Shutdown` is called. (#1612) - `"go.opentelemetry.io/sdk/metric/controller.basic".WithPusher` is replaced with `WithExporter` to provide consistent naming across project. (#1656) - Added non-empty string check for trace `Attribute` keys. (#1659) - Add `description` to SpanStatus only when `StatusCode` is set to error. (#1662) - Jaeger exporter falls back to `resource.Default`'s `service.name` if the exported Span does not have one. (#1673) - Jaeger exporter populates Jaeger's Span Process from Resource. (#1673) - Renamed the `LabelSet` method of `"go.opentelemetry.io/otel/sdk/resource".Resource` to `Set`. (#1692) - Changed `WithSDK` to `WithSDKOptions` to accept variadic arguments of `TracerProviderOption` type in `go.opentelemetry.io/otel/exporters/trace/jaeger` package. (#1693) - Changed `WithSDK` to `WithSDKOptions` to accept variadic arguments of `TracerProviderOption` type in `go.opentelemetry.io/otel/exporters/trace/zipkin` package. (#1693) ### Removed - Removed `serviceName` parameter from Zipkin exporter and uses resource instead. (#1549) - Removed `WithConfig` from tracer provider to avoid overriding configuration. (#1633) - Removed the exported `SimpleSpanProcessor` and `BatchSpanProcessor` structs. These are now returned as a SpanProcessor interface from their respective constructors. (#1638) - Removed `WithRecord()` from `trace.SpanOption` when creating a span. (#1660) - Removed setting status to `Error` while recording an error as a span event in `RecordError`. (#1663) - Removed `jaeger.WithProcess` configuration option. (#1673) - Removed `ApplyConfig` method from `"go.opentelemetry.io/otel/sdk/trace".TracerProvider` and the now unneeded `Config` struct. (#1693) ### Fixed - Jaeger Exporter: Ensure mapping between OTEL and Jaeger span data complies with the specification. (#1626) - `SamplingResult.TraceState` is correctly propagated to a newly created span's `SpanContext`. (#1655) - The `otel-collector` example now correctly flushes metric events prior to shutting down the exporter. (#1678) - Do not set span status message in `SpanStatusFromHTTPStatusCode` if it can be inferred from `http.status_code`. (#1681) - Synchronization issues in global trace delegate implementation. (#1686) - Reduced excess memory usage by global `TracerProvider`. (#1687) ## [0.18.0] - 2021-03-03 ### Added - Added `resource.Default()` for use with meter and tracer providers. (#1507) - `AttributePerEventCountLimit` and `AttributePerLinkCountLimit` for `SpanLimits`. (#1535) - Added `Keys()` method to `propagation.TextMapCarrier` and `propagation.HeaderCarrier` to adapt `http.Header` to this interface. (#1544) - Added `code` attributes to `go.opentelemetry.io/otel/semconv` package. (#1558) - Compatibility testing suite in the CI system for the following systems. (#1567) | OS | Go Version | Architecture | | ------- | ---------- | ------------ | | Ubuntu | 1.15 | amd64 | | Ubuntu | 1.14 | amd64 | | Ubuntu | 1.15 | 386 | | Ubuntu | 1.14 | 386 | | MacOS | 1.15 | amd64 | | MacOS | 1.14 | amd64 | | Windows | 1.15 | amd64 | | Windows | 1.14 | amd64 | | Windows | 1.15 | 386 | | Windows | 1.14 | 386 | ### Changed - Replaced interface `oteltest.SpanRecorder` with its existing implementation `StandardSpanRecorder`. (#1542) - Default span limit values to 128. (#1535) - Rename `MaxEventsPerSpan`, `MaxAttributesPerSpan` and `MaxLinksPerSpan` to `EventCountLimit`, `AttributeCountLimit` and `LinkCountLimit`, and move these fields into `SpanLimits`. (#1535) - Renamed the `otel/label` package to `otel/attribute`. (#1541) - Vendor the Jaeger exporter's dependency on Apache Thrift. (#1551) - Parallelize the CI linting and testing. (#1567) - Stagger timestamps in exact aggregator tests. (#1569) - Changed all examples to use `WithBatchTimeout(5 * time.Second)` rather than `WithBatchTimeout(5)`. (#1621) - Prevent end-users from implementing some interfaces (#1575) ``` "otel/exporters/otlp/otlphttp".Option "otel/exporters/stdout".Option "otel/oteltest".Option "otel/trace".TracerOption "otel/trace".SpanOption "otel/trace".EventOption "otel/trace".LifeCycleOption "otel/trace".InstrumentationOption "otel/sdk/resource".Option "otel/sdk/trace".ParentBasedSamplerOption "otel/sdk/trace".ReadOnlySpan "otel/sdk/trace".ReadWriteSpan ``` ### Removed - Removed attempt to resample spans upon changing the span name with `span.SetName()`. (#1545) - The `test-benchmark` is no longer a dependency of the `precommit` make target. (#1567) - Removed the `test-386` make target. This was replaced with a full compatibility testing suite (i.e. multi OS/arch) in the CI system. (#1567) ### Fixed - The sequential timing check of timestamps in the stdout exporter are now setup explicitly to be sequential (#1571). (#1572) - Windows build of Jaeger tests now compiles with OS specific functions (#1576). (#1577) - The sequential timing check of timestamps of go.opentelemetry.io/otel/sdk/metric/aggregator/lastvalue are now setup explicitly to be sequential (#1578). (#1579) - Validate tracestate header keys with vendors according to the W3C TraceContext specification (#1475). (#1581) - The OTLP exporter includes related labels for translations of a GaugeArray (#1563). (#1570) ## [0.17.0] - 2021-02-12 ### Changed - Rename project default branch from `master` to `main`. (#1505) - Reverse order in which `Resource` attributes are merged, per change in spec. (#1501) - Add tooling to maintain "replace" directives in go.mod files automatically. (#1528) - Create new modules: otel/metric, otel/trace, otel/oteltest, otel/sdk/export/metric, otel/sdk/metric (#1528) - Move metric-related public global APIs from otel to otel/metric/global. (#1528) ## Fixed - Fixed otlpgrpc reconnection issue. - The example code in the README.md of `go.opentelemetry.io/otel/exporters/otlp` is moved to a compiled example test and used the new `WithAddress` instead of `WithEndpoint`. (#1513) - The otel-collector example now uses the default OTLP receiver port of the collector. ## [0.16.0] - 2021-01-13 ### Added - Add the `ReadOnlySpan` and `ReadWriteSpan` interfaces to provide better control for accessing span data. (#1360) - `NewGRPCDriver` function returns a `ProtocolDriver` that maintains a single gRPC connection to the collector. (#1369) - Added documentation about the project's versioning policy. (#1388) - Added `NewSplitDriver` for OTLP exporter that allows sending traces and metrics to different endpoints. (#1418) - Added codeql workflow to GitHub Actions (#1428) - Added Gosec workflow to GitHub Actions (#1429) - Add new HTTP driver for OTLP exporter in `exporters/otlp/otlphttp`. Currently it only supports the binary protobuf payloads. (#1420) - Add an OpenCensus exporter bridge. (#1444) ### Changed - Rename `internal/testing` to `internal/internaltest`. (#1449) - Rename `export.SpanData` to `export.SpanSnapshot` and use it only for exporting spans. (#1360) - Store the parent's full `SpanContext` rather than just its span ID in the `span` struct. (#1360) - Improve span duration accuracy. (#1360) - Migrated CI/CD from CircleCI to GitHub Actions (#1382) - Remove duplicate checkout from GitHub Actions workflow (#1407) - Metric `array` aggregator renamed `exact` to match its `aggregation.Kind` (#1412) - Metric `exact` aggregator includes per-point timestamps (#1412) - Metric stdout exporter uses MinMaxSumCount aggregator for ValueRecorder instruments (#1412) - `NewExporter` from `exporters/otlp` now takes a `ProtocolDriver` as a parameter. (#1369) - Many OTLP Exporter options became gRPC ProtocolDriver options. (#1369) - Unify endpoint API that related to OTel exporter. (#1401) - Optimize metric histogram aggregator to reuse its slice of buckets. (#1435) - Metric aggregator Count() and histogram Bucket.Counts are consistently `uint64`. (1430) - Histogram aggregator accepts functional options, uses default boundaries if none given. (#1434) - `SamplingResult` now passed a `Tracestate` from the parent `SpanContext` (#1432) - Moved gRPC driver for OTLP exporter to `exporters/otlp/otlpgrpc`. (#1420) - The `TraceContext` propagator now correctly propagates `TraceState` through the `SpanContext`. (#1447) - Metric Push and Pull Controller components are combined into a single "basic" Controller: - `WithExporter()` and `Start()` to configure Push behavior - `Start()` is optional; use `Collect()` and `ForEach()` for Pull behavior - `Start()` and `Stop()` accept Context. (#1378) - The `Event` type is moved from the `otel/sdk/export/trace` package to the `otel/trace` API package. (#1452) ### Removed - Remove `errUninitializedSpan` as its only usage is now obsolete. (#1360) - Remove Metric export functionality related to quantiles and summary data points: this is not specified (#1412) - Remove DDSketch metric aggregator; our intention is to re-introduce this as an option of the histogram aggregator after [new OTLP histogram data types](https://github.com/open-telemetry/opentelemetry-proto/pull/226) are released (#1412) ### Fixed - `BatchSpanProcessor.Shutdown()` will now shutdown underlying `export.SpanExporter`. (#1443) ## [0.15.0] - 2020-12-10 ### Added - The `WithIDGenerator` `TracerProviderOption` is added to the `go.opentelemetry.io/otel/trace` package to configure an `IDGenerator` for the `TracerProvider`. (#1363) ### Changed - The Zipkin exporter now uses the Span status code to determine. (#1328) - `NewExporter` and `Start` functions in `go.opentelemetry.io/otel/exporters/otlp` now receive `context.Context` as a first parameter. (#1357) - Move the OpenCensus example into `example` directory. (#1359) - Moved the SDK's `internal.IDGenerator` interface in to the `sdk/trace` package to enable support for externally-defined ID generators. (#1363) - Bump `github.com/google/go-cmp` from 0.5.3 to 0.5.4 (#1374) - Bump `github.com/golangci/golangci-lint` in `/internal/tools` (#1375) ### Fixed - Metric SDK `SumObserver` and `UpDownSumObserver` instruments correctness fixes. (#1381) ## [0.14.0] - 2020-11-19 ### Added - An `EventOption` and the related `NewEventConfig` function are added to the `go.opentelemetry.io/otel` package to configure Span events. (#1254) - A `TextMapPropagator` and associated `TextMapCarrier` are added to the `go.opentelemetry.io/otel/oteltest` package to test `TextMap` type propagators and their use. (#1259) - `SpanContextFromContext` returns `SpanContext` from context. (#1255) - `TraceState` has been added to `SpanContext`. (#1340) - `DeploymentEnvironmentKey` added to `go.opentelemetry.io/otel/semconv` package. (#1323) - Add an OpenCensus to OpenTelemetry tracing bridge. (#1305) - Add a parent context argument to `SpanProcessor.OnStart` to follow the specification. (#1333) - Add missing tests for `sdk/trace/attributes_map.go`. (#1337) ### Changed - Move the `go.opentelemetry.io/otel/api/trace` package into `go.opentelemetry.io/otel/trace` with the following changes. (#1229) (#1307) - `ID` has been renamed to `TraceID`. - `IDFromHex` has been renamed to `TraceIDFromHex`. - `EmptySpanContext` is removed. - Move the `go.opentelemetry.io/otel/api/trace/tracetest` package into `go.opentelemetry.io/otel/oteltest`. (#1229) - OTLP Exporter updates: - supports OTLP v0.6.0 (#1230, #1354) - supports configurable aggregation temporality (default: Cumulative, optional: Stateless). (#1296) - The Sampler is now called on local child spans. (#1233) - The `Kind` type from the `go.opentelemetry.io/otel/api/metric` package was renamed to `InstrumentKind` to more specifically describe what it is and avoid semantic ambiguity. (#1240) - The `MetricKind` method of the `Descriptor` type in the `go.opentelemetry.io/otel/api/metric` package was renamed to `Descriptor.InstrumentKind`. This matches the returned type and fixes misuse of the term metric. (#1240) - Move test harness from the `go.opentelemetry.io/otel/api/apitest` package into `go.opentelemetry.io/otel/oteltest`. (#1241) - Move the `go.opentelemetry.io/otel/api/metric/metrictest` package into `go.opentelemetry.io/oteltest` as part of #964. (#1252) - Move the `go.opentelemetry.io/otel/api/metric` package into `go.opentelemetry.io/otel/metric` as part of #1303. (#1321) - Move the `go.opentelemetry.io/otel/api/metric/registry` package into `go.opentelemetry.io/otel/metric/registry` as a part of #1303. (#1316) - Move the `Number` type (together with related functions) from `go.opentelemetry.io/otel/api/metric` package into `go.opentelemetry.io/otel/metric/number` as a part of #1303. (#1316) - The function signature of the Span `AddEvent` method in `go.opentelemetry.io/otel` is updated to no longer take an unused context and instead take a required name and a variable number of `EventOption`s. (#1254) - The function signature of the Span `RecordError` method in `go.opentelemetry.io/otel` is updated to no longer take an unused context and instead take a required error value and a variable number of `EventOption`s. (#1254) - Move the `go.opentelemetry.io/otel/api/global` package to `go.opentelemetry.io/otel`. (#1262) (#1330) - Move the `Version` function from `go.opentelemetry.io/otel/sdk` to `go.opentelemetry.io/otel`. (#1330) - Rename correlation context header from `"otcorrelations"` to `"baggage"` to match the OpenTelemetry specification. (#1267) - Fix `Code.UnmarshalJSON` to work with valid JSON only. (#1276) - The `resource.New()` method changes signature to support builtin attributes and functional options, including `telemetry.sdk.*` and `host.name` semantic conventions; the former method is renamed `resource.NewWithAttributes`. (#1235) - The Prometheus exporter now exports non-monotonic counters (i.e. `UpDownCounter`s) as gauges. (#1210) - Correct the `Span.End` method documentation in the `otel` API to state updates are not allowed on a span after it has ended. (#1310) - Updated span collection limits for attribute, event and link counts to 1000 (#1318) - Renamed `semconv.HTTPUrlKey` to `semconv.HTTPURLKey`. (#1338) ### Removed - The `ErrInvalidHexID`, `ErrInvalidTraceIDLength`, `ErrInvalidSpanIDLength`, `ErrInvalidSpanIDLength`, or `ErrNilSpanID` from the `go.opentelemetry.io/otel` package are unexported now. (#1243) - The `AddEventWithTimestamp` method on the `Span` interface in `go.opentelemetry.io/otel` is removed due to its redundancy. It is replaced by using the `AddEvent` method with a `WithTimestamp` option. (#1254) - The `MockSpan` and `MockTracer` types are removed from `go.opentelemetry.io/otel/oteltest`. `Tracer` and `Span` from the same module should be used in their place instead. (#1306) - `WorkerCount` option is removed from `go.opentelemetry.io/otel/exporters/otlp`. (#1350) - Remove the following labels types: INT32, UINT32, UINT64 and FLOAT32. (#1314) ### Fixed - Rename `MergeItererator` to `MergeIterator` in the `go.opentelemetry.io/otel/label` package. (#1244) - The `go.opentelemetry.io/otel/api/global` packages global TextMapPropagator now delegates functionality to a globally set delegate for all previously returned propagators. (#1258) - Fix condition in `label.Any`. (#1299) - Fix global `TracerProvider` to pass options to its configured provider. (#1329) - Fix missing handler for `ExactKind` aggregator in OTLP metrics transformer (#1309) ## [0.13.0] - 2020-10-08 ### Added - OTLP Metric exporter supports Histogram aggregation. (#1209) - The `Code` struct from the `go.opentelemetry.io/otel/codes` package now supports JSON marshaling and unmarshaling as well as implements the `Stringer` interface. (#1214) - A Baggage API to implement the OpenTelemetry specification. (#1217) - Add Shutdown method to sdk/trace/provider, shutdown processors in the order they were registered. (#1227) ### Changed - Set default propagator to no-op propagator. (#1184) - The `HTTPSupplier`, `HTTPExtractor`, `HTTPInjector`, and `HTTPPropagator` from the `go.opentelemetry.io/otel/api/propagation` package were replaced with unified `TextMapCarrier` and `TextMapPropagator` in the `go.opentelemetry.io/otel/propagation` package. (#1212) (#1325) - The `New` function from the `go.opentelemetry.io/otel/api/propagation` package was replaced with `NewCompositeTextMapPropagator` in the `go.opentelemetry.io/otel` package. (#1212) - The status codes of the `go.opentelemetry.io/otel/codes` package have been updated to match the latest OpenTelemetry specification. They now are `Unset`, `Error`, and `Ok`. They no longer track the gRPC codes. (#1214) - The `StatusCode` field of the `SpanData` struct in the `go.opentelemetry.io/otel/sdk/export/trace` package now uses the codes package from this package instead of the gRPC project. (#1214) - Move the `go.opentelemetry.io/otel/api/baggage` package into `go.opentelemetry.io/otel/baggage`. (#1217) (#1325) - A `Shutdown` method of `SpanProcessor` and all its implementations receives a context and returns an error. (#1264) ### Fixed - Copies of data from arrays and slices passed to `go.opentelemetry.io/otel/label.ArrayValue()` are now used in the returned `Value` instead of using the mutable data itself. (#1226) ### Removed - The `ExtractHTTP` and `InjectHTTP` functions from the `go.opentelemetry.io/otel/api/propagation` package were removed. (#1212) - The `Propagators` interface from the `go.opentelemetry.io/otel/api/propagation` package was removed to conform to the OpenTelemetry specification. The explicit `TextMapPropagator` type can be used in its place as this is the `Propagator` type the specification defines. (#1212) - The `SetAttribute` method of the `Span` from the `go.opentelemetry.io/otel/api/trace` package was removed given its redundancy with the `SetAttributes` method. (#1216) - The internal implementation of Baggage storage is removed in favor of using the new Baggage API functionality. (#1217) - Remove duplicate hostname key `HostHostNameKey` in Resource semantic conventions. (#1219) - Nested array/slice support has been removed. (#1226) ## [0.12.0] - 2020-09-24 ### Added - A `SpanConfigure` function in `go.opentelemetry.io/otel/api/trace` to create a new `SpanConfig` from `SpanOption`s. (#1108) - In the `go.opentelemetry.io/otel/api/trace` package, `NewTracerConfig` was added to construct new `TracerConfig`s. This addition was made to conform with our project option conventions. (#1155) - Instrumentation library information was added to the Zipkin exporter. (#1119) - The `SpanProcessor` interface now has a `ForceFlush()` method. (#1166) - More semantic conventions for k8s as resource attributes. (#1167) ### Changed - Add reconnecting udp connection type to Jaeger exporter. This change adds a new optional implementation of the udp conn interface used to detect changes to an agent's host dns record. It then adopts the new destination address to ensure the exporter doesn't get stuck. This change was ported from jaegertracing/jaeger-client-go#520. (#1063) - Replace `StartOption` and `EndOption` in `go.opentelemetry.io/otel/api/trace` with `SpanOption`. This change is matched by replacing the `StartConfig` and `EndConfig` with a unified `SpanConfig`. (#1108) - Replace the `LinkedTo` span option in `go.opentelemetry.io/otel/api/trace` with `WithLinks`. This is be more consistent with our other option patterns, i.e. passing the item to be configured directly instead of its component parts, and provides a cleaner function signature. (#1108) - The `go.opentelemetry.io/otel/api/trace` `TracerOption` was changed to an interface to conform to project option conventions. (#1109) - Move the `B3` and `TraceContext` from within the `go.opentelemetry.io/otel/api/trace` package to their own `go.opentelemetry.io/otel/propagators` package. This removal of the propagators is reflective of the OpenTelemetry specification for these propagators as well as cleans up the `go.opentelemetry.io/otel/api/trace` API. (#1118) - Rename Jaeger tags used for instrumentation library information to reflect changes in OpenTelemetry specification. (#1119) - Rename `ProbabilitySampler` to `TraceIDRatioBased` and change semantics to ignore parent span sampling status. (#1115) - Move `tools` package under `internal`. (#1141) - Move `go.opentelemetry.io/otel/api/correlation` package to `go.opentelemetry.io/otel/api/baggage`. (#1142) The `correlation.CorrelationContext` propagator has been renamed `baggage.Baggage`. Other exported functions and types are unchanged. - Rename `ParentOrElse` sampler to `ParentBased` and allow setting samplers depending on parent span. (#1153) - In the `go.opentelemetry.io/otel/api/trace` package, `SpanConfigure` was renamed to `NewSpanConfig`. (#1155) - Change `dependabot.yml` to add a `Skip Changelog` label to dependabot-sourced PRs. (#1161) - The [configuration style guide](https://github.com/open-telemetry/opentelemetry-go/blob/master/CONTRIBUTING.md#config) has been updated to recommend the use of `newConfig()` instead of `configure()`. (#1163) - The `otlp.Config` type has been unexported and changed to `otlp.config`, along with its initializer. (#1163) - Ensure exported interface types include parameter names and update the Style Guide to reflect this styling rule. (#1172) - Don't consider unset environment variable for resource detection to be an error. (#1170) - Rename `go.opentelemetry.io/otel/api/metric.ConfigureInstrument` to `NewInstrumentConfig` and `go.opentelemetry.io/otel/api/metric.ConfigureMeter` to `NewMeterConfig`. - ValueObserver instruments use LastValue aggregator by default. (#1165) - OTLP Metric exporter supports LastValue aggregation. (#1165) - Move the `go.opentelemetry.io/otel/api/unit` package to `go.opentelemetry.io/otel/unit`. (#1185) - Rename `Provider` to `MeterProvider` in the `go.opentelemetry.io/otel/api/metric` package. (#1190) - Rename `NoopProvider` to `NoopMeterProvider` in the `go.opentelemetry.io/otel/api/metric` package. (#1190) - Rename `NewProvider` to `NewMeterProvider` in the `go.opentelemetry.io/otel/api/metric/metrictest` package. (#1190) - Rename `Provider` to `MeterProvider` in the `go.opentelemetry.io/otel/api/metric/registry` package. (#1190) - Rename `NewProvider` to `NewMeterProvider` in the `go.opentelemetry.io/otel/api/metri/registryc` package. (#1190) - Rename `Provider` to `TracerProvider` in the `go.opentelemetry.io/otel/api/trace` package. (#1190) - Rename `NoopProvider` to `NoopTracerProvider` in the `go.opentelemetry.io/otel/api/trace` package. (#1190) - Rename `Provider` to `TracerProvider` in the `go.opentelemetry.io/otel/api/trace/tracetest` package. (#1190) - Rename `NewProvider` to `NewTracerProvider` in the `go.opentelemetry.io/otel/api/trace/tracetest` package. (#1190) - Rename `WrapperProvider` to `WrapperTracerProvider` in the `go.opentelemetry.io/otel/bridge/opentracing` package. (#1190) - Rename `NewWrapperProvider` to `NewWrapperTracerProvider` in the `go.opentelemetry.io/otel/bridge/opentracing` package. (#1190) - Rename `Provider` method of the pull controller to `MeterProvider` in the `go.opentelemetry.io/otel/sdk/metric/controller/pull` package. (#1190) - Rename `Provider` method of the push controller to `MeterProvider` in the `go.opentelemetry.io/otel/sdk/metric/controller/push` package. (#1190) - Rename `ProviderOptions` to `TracerProviderConfig` in the `go.opentelemetry.io/otel/sdk/trace` package. (#1190) - Rename `ProviderOption` to `TracerProviderOption` in the `go.opentelemetry.io/otel/sdk/trace` package. (#1190) - Rename `Provider` to `TracerProvider` in the `go.opentelemetry.io/otel/sdk/trace` package. (#1190) - Rename `NewProvider` to `NewTracerProvider` in the `go.opentelemetry.io/otel/sdk/trace` package. (#1190) - Renamed `SamplingDecision` values to comply with OpenTelemetry specification change. (#1192) - Renamed Zipkin attribute names from `ot.status_code & ot.status_description` to `otel.status_code & otel.status_description`. (#1201) - The default SDK now invokes registered `SpanProcessor`s in the order they were registered with the `TracerProvider`. (#1195) - Add test of spans being processed by the `SpanProcessor`s in the order they were registered. (#1203) ### Removed - Remove the B3 propagator from `go.opentelemetry.io/otel/propagators`. It is now located in the `go.opentelemetry.io/contrib/propagators/` module. (#1191) - Remove the semantic convention for HTTP status text, `HTTPStatusTextKey` from package `go.opentelemetry.io/otel/semconv`. (#1194) ### Fixed - Zipkin example no longer mentions `ParentSampler`, corrected to `ParentBased`. (#1171) - Fix missing shutdown processor in otel-collector example. (#1186) - Fix missing shutdown processor in basic and namedtracer examples. (#1197) ## [0.11.0] - 2020-08-24 ### Added - Support for exporting array-valued attributes via OTLP. (#992) - `Noop` and `InMemory` `SpanBatcher` implementations to help with testing integrations. (#994) - Support for filtering metric label sets. (#1047) - A dimensionality-reducing metric Processor. (#1057) - Integration tests for more OTel Collector Attribute types. (#1062) - A new `WithSpanProcessor` `ProviderOption` is added to the `go.opentelemetry.io/otel/sdk/trace` package to create a `Provider` and automatically register the `SpanProcessor`. (#1078) ### Changed - Rename `sdk/metric/processor/test` to `sdk/metric/processor/processortest`. (#1049) - Rename `sdk/metric/controller/test` to `sdk/metric/controller/controllertest`. (#1049) - Rename `api/testharness` to `api/apitest`. (#1049) - Rename `api/trace/testtrace` to `api/trace/tracetest`. (#1049) - Change Metric Processor to merge multiple observations. (#1024) - The `go.opentelemetry.io/otel/bridge/opentracing` bridge package has been made into its own module. This removes the package dependencies of this bridge from the rest of the OpenTelemetry based project. (#1038) - Renamed `go.opentelemetry.io/otel/api/standard` package to `go.opentelemetry.io/otel/semconv` to avoid the ambiguous and generic name `standard` and better describe the package as containing OpenTelemetry semantic conventions. (#1016) - The environment variable used for resource detection has been changed from `OTEL_RESOURCE_LABELS` to `OTEL_RESOURCE_ATTRIBUTES` (#1042) - Replace `WithSyncer` with `WithBatcher` in examples. (#1044) - Replace the `google.golang.org/grpc/codes` dependency in the API with an equivalent `go.opentelemetry.io/otel/codes` package. (#1046) - Merge the `go.opentelemetry.io/otel/api/label` and `go.opentelemetry.io/otel/api/kv` into the new `go.opentelemetry.io/otel/label` package. (#1060) - Unify Callback Function Naming. Rename `*Callback` with `*Func`. (#1061) - CI builds validate against last two versions of Go, dropping 1.13 and adding 1.15. (#1064) - The `go.opentelemetry.io/otel/sdk/export/trace` interfaces `SpanSyncer` and `SpanBatcher` have been replaced with a specification compliant `Exporter` interface. This interface still supports the export of `SpanData`, but only as a slice. Implementation are also required now to return any error from `ExportSpans` if one occurs as well as implement a `Shutdown` method for exporter clean-up. (#1078) - The `go.opentelemetry.io/otel/sdk/trace` `NewBatchSpanProcessor` function no longer returns an error. If a `nil` exporter is passed as an argument to this function, instead of it returning an error, it now returns a `BatchSpanProcessor` that handles the export of `SpanData` by not taking any action. (#1078) - The `go.opentelemetry.io/otel/sdk/trace` `NewProvider` function to create a `Provider` no longer returns an error, instead only a `*Provider`. This change is related to `NewBatchSpanProcessor` not returning an error which was the only error this function would return. (#1078) ### Removed - Duplicate, unused API sampler interface. (#999) Use the [`Sampler` interface](https://github.com/open-telemetry/opentelemetry-go/blob/v0.11.0/sdk/trace/sampling.go) provided by the SDK instead. - The `grpctrace` instrumentation was moved to the `go.opentelemetry.io/contrib` repository and out of this repository. This move includes moving the `grpc` example to the `go.opentelemetry.io/contrib` as well. (#1027) - The `WithSpan` method of the `Tracer` interface. The functionality this method provided was limited compared to what a user can provide themselves. It was removed with the understanding that if there is sufficient user need it can be added back based on actual user usage. (#1043) - The `RegisterSpanProcessor` and `UnregisterSpanProcessor` functions. These were holdovers from an approach prior to the TracerProvider design. They were not used anymore. (#1077) - The `oterror` package. (#1026) - The `othttp` and `httptrace` instrumentations were moved to `go.opentelemetry.io/contrib`. (#1032) ### Fixed - The `semconv.HTTPServerMetricAttributesFromHTTPRequest()` function no longer generates the high-cardinality `http.request.content.length` label. (#1031) - Correct instrumentation version tag in Jaeger exporter. (#1037) - The SDK span will now set an error event if the `End` method is called during a panic (i.e. it was deferred). (#1043) - Move internally generated protobuf code from the `go.opentelemetry.io/otel` to the OTLP exporter to reduce dependency overhead. (#1050) - The `otel-collector` example referenced outdated collector processors. (#1006) ## [0.10.0] - 2020-07-29 This release migrates the default OpenTelemetry SDK into its own Go module, decoupling the SDK from the API and reducing dependencies for instrumentation packages. ### Added - The Zipkin exporter now has `NewExportPipeline` and `InstallNewPipeline` constructor functions to match the common pattern. These function build a new exporter with default SDK options and register the exporter with the `global` package respectively. (#944) - Add propagator option for gRPC instrumentation. (#986) - The `testtrace` package now tracks the `trace.SpanKind` for each span. (#987) ### Changed - Replace the `RegisterGlobal` `Option` in the Jaeger exporter with an `InstallNewPipeline` constructor function. This matches the other exporter constructor patterns and will register a new exporter after building it with default configuration. (#944) - The trace (`go.opentelemetry.io/otel/exporters/trace/stdout`) and metric (`go.opentelemetry.io/otel/exporters/metric/stdout`) `stdout` exporters are now merged into a single exporter at `go.opentelemetry.io/otel/exporters/stdout`. This new exporter was made into its own Go module to follow the pattern of all exporters and decouple it from the `go.opentelemetry.io/otel` module. (#956, #963) - Move the `go.opentelemetry.io/otel/exporters/test` test package to `go.opentelemetry.io/otel/sdk/export/metric/metrictest`. (#962) - The `go.opentelemetry.io/otel/api/kv/value` package was merged into the parent `go.opentelemetry.io/otel/api/kv` package. (#968) - `value.Bool` was replaced with `kv.BoolValue`. - `value.Int64` was replaced with `kv.Int64Value`. - `value.Uint64` was replaced with `kv.Uint64Value`. - `value.Float64` was replaced with `kv.Float64Value`. - `value.Int32` was replaced with `kv.Int32Value`. - `value.Uint32` was replaced with `kv.Uint32Value`. - `value.Float32` was replaced with `kv.Float32Value`. - `value.String` was replaced with `kv.StringValue`. - `value.Int` was replaced with `kv.IntValue`. - `value.Uint` was replaced with `kv.UintValue`. - `value.Array` was replaced with `kv.ArrayValue`. - Rename `Infer` to `Any` in the `go.opentelemetry.io/otel/api/kv` package. (#972) - Change `othttp` to use the `httpsnoop` package to wrap the `ResponseWriter` so that optional interfaces (`http.Hijacker`, `http.Flusher`, etc.) that are implemented by the original `ResponseWriter`are also implemented by the wrapped `ResponseWriter`. (#979) - Rename `go.opentelemetry.io/otel/sdk/metric/aggregator/test` package to `go.opentelemetry.io/otel/sdk/metric/aggregator/aggregatortest`. (#980) - Make the SDK into its own Go module called `go.opentelemetry.io/otel/sdk`. (#985) - Changed the default trace `Sampler` from `AlwaysOn` to `ParentOrElse(AlwaysOn)`. (#989) ### Removed - The `IndexedAttribute` function from the `go.opentelemetry.io/otel/api/label` package was removed in favor of `IndexedLabel` which it was synonymous with. (#970) ### Fixed - Bump github.com/golangci/golangci-lint from 1.28.3 to 1.29.0 in /tools. (#953) - Bump github.com/google/go-cmp from 0.5.0 to 0.5.1. (#957) - Use `global.Handle` for span export errors in the OTLP exporter. (#946) - Correct Go language formatting in the README documentation. (#961) - Remove default SDK dependencies from the `go.opentelemetry.io/otel/api` package. (#977) - Remove default SDK dependencies from the `go.opentelemetry.io/otel/instrumentation` package. (#983) - Move documented examples for `go.opentelemetry.io/otel/instrumentation/grpctrace` interceptors into Go example tests. (#984) ## [0.9.0] - 2020-07-20 ### Added - A new Resource Detector interface is included to allow resources to be automatically detected and included. (#939) - A Detector to automatically detect resources from an environment variable. (#939) - Github action to generate protobuf Go bindings locally in `internal/opentelemetry-proto-gen`. (#938) - OTLP .proto files from `open-telemetry/opentelemetry-proto` imported as a git submodule under `internal/opentelemetry-proto`. References to `github.com/open-telemetry/opentelemetry-proto` changed to `go.opentelemetry.io/otel/internal/opentelemetry-proto-gen`. (#942) ### Changed - Non-nil value `struct`s for key-value pairs will be marshalled using JSON rather than `Sprintf`. (#948) ### Removed - Removed dependency on `github.com/open-telemetry/opentelemetry-collector`. (#943) ## [0.8.0] - 2020-07-09 ### Added - The `B3Encoding` type to represent the B3 encoding(s) the B3 propagator can inject. A value for HTTP supported encodings (Multiple Header: `MultipleHeader`, Single Header: `SingleHeader`) are included. (#882) - The `FlagsDeferred` trace flag to indicate if the trace sampling decision has been deferred. (#882) - The `FlagsDebug` trace flag to indicate if the trace is a debug trace. (#882) - Add `peer.service` semantic attribute. (#898) - Add database-specific semantic attributes. (#899) - Add semantic convention for `faas.coldstart` and `container.id`. (#909) - Add http content size semantic conventions. (#905) - Include `http.request_content_length` in HTTP request basic attributes. (#905) - Add semantic conventions for operating system process resource attribute keys. (#919) - The Jaeger exporter now has a `WithBatchMaxCount` option to specify the maximum number of spans sent in a batch. (#931) ### Changed - Update `CONTRIBUTING.md` to ask for updates to `CHANGELOG.md` with each pull request. (#879) - Use lowercase header names for B3 Multiple Headers. (#881) - The B3 propagator `SingleHeader` field has been replaced with `InjectEncoding`. This new field can be set to combinations of the `B3Encoding` bitmasks and will inject trace information in these encodings. If no encoding is set, the propagator will default to `MultipleHeader` encoding. (#882) - The B3 propagator now extracts from either HTTP encoding of B3 (Single Header or Multiple Header) based on what is contained in the header. Preference is given to Single Header encoding with Multiple Header being the fallback if Single Header is not found or is invalid. This behavior change is made to dynamically support all correctly encoded traces received instead of having to guess the expected encoding prior to receiving. (#882) - Extend semantic conventions for RPC. (#900) - To match constant naming conventions in the `api/standard` package, the `FaaS*` key names are appended with a suffix of `Key`. (#920) - `"api/standard".FaaSName` -> `FaaSNameKey` - `"api/standard".FaaSID` -> `FaaSIDKey` - `"api/standard".FaaSVersion` -> `FaaSVersionKey` - `"api/standard".FaaSInstance` -> `FaaSInstanceKey` ### Removed - The `FlagsUnused` trace flag is removed. The purpose of this flag was to act as the inverse of `FlagsSampled`, the inverse of `FlagsSampled` is used instead. (#882) - The B3 header constants (`B3SingleHeader`, `B3DebugFlagHeader`, `B3TraceIDHeader`, `B3SpanIDHeader`, `B3SampledHeader`, `B3ParentSpanIDHeader`) are removed. If B3 header keys are needed [the authoritative OpenZipkin package constants](https://pkg.go.dev/github.com/openzipkin/zipkin-go@v0.2.2/propagation/b3?tab=doc#pkg-constants) should be used instead. (#882) ### Fixed - The B3 Single Header name is now correctly `b3` instead of the previous `X-B3`. (#881) - The B3 propagator now correctly supports sampling only values (`b3: 0`, `b3: 1`, or `b3: d`) for a Single B3 Header. (#882) - The B3 propagator now propagates the debug flag. This removes the behavior of changing the debug flag into a set sampling bit. Instead, this now follow the B3 specification and omits the `X-B3-Sampling` header. (#882) - The B3 propagator now tracks "unset" sampling state (meaning "defer the decision") and does not set the `X-B3-Sampling` header when injecting. (#882) - Bump github.com/itchyny/gojq from 0.10.3 to 0.10.4 in /tools. (#883) - Bump github.com/opentracing/opentracing-go from v1.1.1-0.20190913142402-a7454ce5950e to v1.2.0. (#885) - The tracing time conversion for OTLP spans is now correctly set to `UnixNano`. (#896) - Ensure span status is not set to `Unknown` when no HTTP status code is provided as it is assumed to be `200 OK`. (#908) - Ensure `httptrace.clientTracer` closes `http.headers` span. (#912) - Prometheus exporter will not apply stale updates or forget inactive metrics. (#903) - Add test for api.standard `HTTPClientAttributesFromHTTPRequest`. (#905) - Bump github.com/golangci/golangci-lint from 1.27.0 to 1.28.1 in /tools. (#901, #913) - Update otel-colector example to use the v0.5.0 collector. (#915) - The `grpctrace` instrumentation uses a span name conforming to the OpenTelemetry semantic conventions (does not contain a leading slash (`/`)). (#922) - The `grpctrace` instrumentation includes an `rpc.method` attribute now set to the gRPC method name. (#900, #922) - The `grpctrace` instrumentation `rpc.service` attribute now contains the package name if one exists. This is in accordance with OpenTelemetry semantic conventions. (#922) - Correlation Context extractor will no longer insert an empty map into the returned context when no valid values are extracted. (#923) - Bump google.golang.org/api from 0.28.0 to 0.29.0 in /exporters/trace/jaeger. (#925) - Bump github.com/itchyny/gojq from 0.10.4 to 0.11.0 in /tools. (#926) - Bump github.com/golangci/golangci-lint from 1.28.1 to 1.28.2 in /tools. (#930) ## [0.7.0] - 2020-06-26 This release implements the v0.5.0 version of the OpenTelemetry specification. ### Added - The othttp instrumentation now includes default metrics. (#861) - This CHANGELOG file to track all changes in the project going forward. - Support for array type attributes. (#798) - Apply transitive dependabot go.mod dependency updates as part of a new automatic Github workflow. (#844) - Timestamps are now passed to exporters for each export. (#835) - Add new `Accumulation` type to metric SDK to transport telemetry from `Accumulator`s to `Processor`s. This replaces the prior `Record` `struct` use for this purpose. (#835) - New dependabot integration to automate package upgrades. (#814) - `Meter` and `Tracer` implementations accept instrumentation version version as an optional argument. This instrumentation version is passed on to exporters. (#811) (#805) (#802) - The OTLP exporter includes the instrumentation version in telemetry it exports. (#811) - Environment variables for Jaeger exporter are supported. (#796) - New `aggregation.Kind` in the export metric API. (#808) - New example that uses OTLP and the collector. (#790) - Handle errors in the span `SetName` during span initialization. (#791) - Default service config to enable retries for retry-able failed requests in the OTLP exporter and an option to override this default. (#777) - New `go.opentelemetry.io/otel/api/oterror` package to uniformly support error handling and definitions for the project. (#778) - New `global` default implementation of the `go.opentelemetry.io/otel/api/oterror.Handler` interface to be used to handle errors prior to an user defined `Handler`. There is also functionality for the user to register their `Handler` as well as a convenience function `Handle` to handle an error with this global `Handler`(#778) - Options to specify propagators for httptrace and grpctrace instrumentation. (#784) - The required `application/json` header for the Zipkin exporter is included in all exports. (#774) - Integrate HTTP semantics helpers from the contrib repository into the `api/standard` package. #769 ### Changed - Rename `Integrator` to `Processor` in the metric SDK. (#863) - Rename `AggregationSelector` to `AggregatorSelector`. (#859) - Rename `SynchronizedCopy` to `SynchronizedMove`. (#858) - Rename `simple` integrator to `basic` integrator. (#857) - Merge otlp collector examples. (#841) - Change the metric SDK to support cumulative, delta, and pass-through exporters directly. With these changes, cumulative and delta specific exporters are able to request the correct kind of aggregation from the SDK. (#840) - The `Aggregator.Checkpoint` API is renamed to `SynchronizedCopy` and adds an argument, a different `Aggregator` into which the copy is stored. (#812) - The `export.Aggregator` contract is that `Update()` and `SynchronizedCopy()` are synchronized with each other. All the aggregation interfaces (`Sum`, `LastValue`, ...) are not meant to be synchronized, as the caller is expected to synchronize aggregators at a higher level after the `Accumulator`. Some of the `Aggregators` used unnecessary locking and that has been cleaned up. (#812) - Use of `metric.Number` was replaced by `int64` now that we use `sync.Mutex` in the `MinMaxSumCount` and `Histogram` `Aggregators`. (#812) - Replace `AlwaysParentSample` with `ParentSample(fallback)` to match the OpenTelemetry v0.5.0 specification. (#810) - Rename `sdk/export/metric/aggregator` to `sdk/export/metric/aggregation`. #808 - Send configured headers with every request in the OTLP exporter, instead of just on connection creation. (#806) - Update error handling for any one off error handlers, replacing, instead, with the `global.Handle` function. (#791) - Rename `plugin` directory to `instrumentation` to match the OpenTelemetry specification. (#779) - Makes the argument order to Histogram and DDSketch `New()` consistent. (#781) ### Removed - `Uint64NumberKind` and related functions from the API. (#864) - Context arguments from `Aggregator.Checkpoint` and `Integrator.Process` as they were unused. (#803) - `SpanID` is no longer included in parameters for sampling decision to match the OpenTelemetry specification. (#775) ### Fixed - Upgrade OTLP exporter to opentelemetry-proto matching the opentelemetry-collector v0.4.0 release. (#866) - Allow changes to `go.sum` and `go.mod` when running dependabot tidy-up. (#871) - Bump github.com/stretchr/testify from 1.4.0 to 1.6.1. (#824) - Bump github.com/prometheus/client_golang from 1.7.0 to 1.7.1 in /exporters/metric/prometheus. (#867) - Bump google.golang.org/grpc from 1.29.1 to 1.30.0 in /exporters/trace/jaeger. (#853) - Bump google.golang.org/grpc from 1.29.1 to 1.30.0 in /exporters/trace/zipkin. (#854) - Bumps github.com/golang/protobuf from 1.3.2 to 1.4.2 (#848) - Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/otlp (#817) - Bump github.com/golangci/golangci-lint from 1.25.1 to 1.27.0 in /tools (#828) - Bump github.com/prometheus/client_golang from 1.5.0 to 1.7.0 in /exporters/metric/prometheus (#838) - Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/trace/jaeger (#829) - Bump github.com/benbjohnson/clock from 1.0.0 to 1.0.3 (#815) - Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/trace/zipkin (#823) - Bump github.com/itchyny/gojq from 0.10.1 to 0.10.3 in /tools (#830) - Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/metric/prometheus (#822) - Bump google.golang.org/grpc from 1.27.1 to 1.29.1 in /exporters/trace/zipkin (#820) - Bump google.golang.org/grpc from 1.27.1 to 1.29.1 in /exporters/trace/jaeger (#831) - Bump github.com/google/go-cmp from 0.4.0 to 0.5.0 (#836) - Bump github.com/google/go-cmp from 0.4.0 to 0.5.0 in /exporters/trace/jaeger (#837) - Bump github.com/google/go-cmp from 0.4.0 to 0.5.0 in /exporters/otlp (#839) - Bump google.golang.org/api from 0.20.0 to 0.28.0 in /exporters/trace/jaeger (#843) - Set span status from HTTP status code in the othttp instrumentation. (#832) - Fixed typo in push controller comment. (#834) - The `Aggregator` testing has been updated and cleaned. (#812) - `metric.Number(0)` expressions are replaced by `0` where possible. (#812) - Fixed `global` `handler_test.go` test failure. #804 - Fixed `BatchSpanProcessor.Shutdown` to wait until all spans are processed. (#766) - Fixed OTLP example's accidental early close of exporter. (#807) - Ensure zipkin exporter reads and closes response body. (#788) - Update instrumentation to use `api/standard` keys instead of custom keys. (#782) - Clean up tools and RELEASING documentation. (#762) ## [0.6.0] - 2020-05-21 ### Added - Support for `Resource`s in the prometheus exporter. (#757) - New pull controller. (#751) - New `UpDownSumObserver` instrument. (#750) - OpenTelemetry collector demo. (#711) - New `SumObserver` instrument. (#747) - New `UpDownCounter` instrument. (#745) - New timeout `Option` and configuration function `WithTimeout` to the push controller. (#742) - New `api/standards` package to implement semantic conventions and standard key-value generation. (#731) ### Changed - Rename `Register*` functions in the metric API to `New*` for all `Observer` instruments. (#761) - Use `[]float64` for histogram boundaries, not `[]metric.Number`. (#758) - Change OTLP example to use exporter as a trace `Syncer` instead of as an unneeded `Batcher`. (#756) - Replace `WithResourceAttributes()` with `WithResource()` in the trace SDK. (#754) - The prometheus exporter now uses the new pull controller. (#751) - Rename `ScheduleDelayMillis` to `BatchTimeout` in the trace `BatchSpanProcessor`.(#752) - Support use of synchronous instruments in asynchronous callbacks (#725) - Move `Resource` from the `Export` method parameter into the metric export `Record`. (#739) - Rename `Observer` instrument to `ValueObserver`. (#734) - The push controller now has a method (`Provider()`) to return a `metric.Provider` instead of the old `Meter` method that acted as a `metric.Provider`. (#738) - Replace `Measure` instrument by `ValueRecorder` instrument. (#732) - Rename correlation context header from `"Correlation-Context"` to `"otcorrelations"` to match the OpenTelemetry specification. (#727) ### Fixed - Ensure gRPC `ClientStream` override methods do not panic in grpctrace package. (#755) - Disable parts of `BatchSpanProcessor` test until a fix is found. (#743) - Fix `string` case in `kv` `Infer` function. (#746) - Fix panic in grpctrace client interceptors. (#740) - Refactor the `api/metrics` push controller and add `CheckpointSet` synchronization. (#737) - Rewrite span batch process queue batching logic. (#719) - Remove the push controller named Meter map. (#738) - Fix Histogram aggregator initial state (fix #735). (#736) - Ensure golang alpine image is running `golang-1.14` for examples. (#733) - Added test for grpctrace `UnaryInterceptorClient`. (#695) - Rearrange `api/metric` code layout. (#724) ## [0.5.0] - 2020-05-13 ### Added - Batch `Observer` callback support. (#717) - Alias `api` types to root package of project. (#696) - Create basic `othttp.Transport` for simple client instrumentation. (#678) - `SetAttribute(string, interface{})` to the trace API. (#674) - Jaeger exporter option that allows user to specify custom http client. (#671) - `Stringer` and `Infer` methods to `key`s. (#662) ### Changed - Rename `NewKey` in the `kv` package to just `Key`. (#721) - Move `core` and `key` to `kv` package. (#720) - Make the metric API `Meter` a `struct` so the abstract `MeterImpl` can be passed and simplify implementation. (#709) - Rename SDK `Batcher` to `Integrator` to match draft OpenTelemetry SDK specification. (#710) - Rename SDK `Ungrouped` integrator to `simple.Integrator` to match draft OpenTelemetry SDK specification. (#710) - Rename SDK `SDK` `struct` to `Accumulator` to match draft OpenTelemetry SDK specification. (#710) - Move `Number` from `core` to `api/metric` package. (#706) - Move `SpanContext` from `core` to `trace` package. (#692) - Change traceparent header from `Traceparent` to `traceparent` to implement the W3C specification. (#681) ### Fixed - Update tooling to run generators in all submodules. (#705) - gRPC interceptor regexp to match methods without a service name. (#683) - Use a `const` for padding 64-bit B3 trace IDs. (#701) - Update `mockZipkin` listen address from `:0` to `127.0.0.1:0`. (#700) - Left-pad 64-bit B3 trace IDs with zero. (#698) - Propagate at least the first W3C tracestate header. (#694) - Remove internal `StateLocker` implementation. (#688) - Increase instance size CI system uses. (#690) - Add a `key` benchmark and use reflection in `key.Infer()`. (#679) - Fix internal `global` test by using `global.Meter` with `RecordBatch()`. (#680) - Reimplement histogram using mutex instead of `StateLocker`. (#669) - Switch `MinMaxSumCount` to a mutex lock implementation instead of `StateLocker`. (#667) - Update documentation to not include any references to `WithKeys`. (#672) - Correct misspelling. (#668) - Fix clobbering of the span context if extraction fails. (#656) - Bump `golangci-lint` and work around the corrupting bug. (#666) (#670) ## [0.4.3] - 2020-04-24 ### Added - `Dockerfile` and `docker-compose.yml` to run example code. (#635) - New `grpctrace` package that provides gRPC client and server interceptors for both unary and stream connections. (#621) - New `api/label` package, providing common label set implementation. (#651) - Support for JSON marshaling of `Resources`. (#654) - `TraceID` and `SpanID` implementations for `Stringer` interface. (#642) - `RemoteAddrKey` in the othttp plugin to include the HTTP client address in top-level spans. (#627) - `WithSpanFormatter` option to the othttp plugin. (#617) - Updated README to include section for compatible libraries and include reference to the contrib repository. (#612) - The prometheus exporter now supports exporting histograms. (#601) - A `String` method to the `Resource` to return a hashable identifier for a now unique resource. (#613) - An `Iter` method to the `Resource` to return an array `AttributeIterator`. (#613) - An `Equal` method to the `Resource` test the equivalence of resources. (#613) - An iterable structure (`AttributeIterator`) for `Resource` attributes. ### Changed - zipkin export's `NewExporter` now requires a `serviceName` argument to ensure this needed values is provided. (#644) - Pass `Resources` through the metrics export pipeline. (#659) ### Removed - `WithKeys` option from the metric API. (#639) ### Fixed - Use the `label.Set.Equivalent` value instead of an encoding in the batcher. (#658) - Correct typo `trace.Exporter` to `trace.SpanSyncer` in comments. (#653) - Use type names for return values in jaeger exporter. (#648) - Increase the visibility of the `api/key` package by updating comments and fixing usages locally. (#650) - `Checkpoint` only after `Update`; Keep records in the `sync.Map` longer. (#647) - Do not cache `reflect.ValueOf()` in metric Labels. (#649) - Batch metrics exported from the OTLP exporter based on `Resource` and labels. (#626) - Add error wrapping to the prometheus exporter. (#631) - Update the OTLP exporter batching of traces to use a unique `string` representation of an associated `Resource` as the batching key. (#623) - Update OTLP `SpanData` transform to only include the `ParentSpanID` if one exists. (#614) - Update `Resource` internal representation to uniquely and reliably identify resources. (#613) - Check return value from `CheckpointSet.ForEach` in prometheus exporter. (#622) - Ensure spans created by httptrace client tracer reflect operation structure. (#618) - Create a new recorder rather than reuse when multiple observations in same epoch for asynchronous instruments. #610 - The default port the OTLP exporter uses to connect to the OpenTelemetry collector is updated to match the one the collector listens on by default. (#611) ## [0.4.2] - 2020-03-31 ### Fixed - Fix `pre_release.sh` to update version in `sdk/opentelemetry.go`. (#607) - Fix time conversion from internal to OTLP in OTLP exporter. (#606) ## [0.4.1] - 2020-03-31 ### Fixed - Update `tag.sh` to create signed tags. (#604) ## [0.4.0] - 2020-03-30 ### Added - New API package `api/metric/registry` that exposes a `MeterImpl` wrapper for use by SDKs to generate unique instruments. (#580) - Script to verify examples after a new release. (#579) ### Removed - The dogstatsd exporter due to lack of support. This additionally removes support for statsd. (#591) - `LabelSet` from the metric API. This is replaced by a `[]core.KeyValue` slice. (#595) - `Labels` from the metric API's `Meter` interface. (#595) ### Changed - The metric `export.Labels` became an interface which the SDK implements and the `export` package provides a simple, immutable implementation of this interface intended for testing purposes. (#574) - Renamed `internal/metric.Meter` to `MeterImpl`. (#580) - Renamed `api/global/internal.obsImpl` to `asyncImpl`. (#580) ### Fixed - Corrected missing return in mock span. (#582) - Update License header for all source files to match CNCF guidelines and include a test to ensure it is present. (#586) (#596) - Update to v0.3.0 of the OTLP in the OTLP exporter. (#588) - Update pre-release script to be compatible between GNU and BSD based systems. (#592) - Add a `RecordBatch` benchmark. (#594) - Moved span transforms of the OTLP exporter to the internal package. (#593) - Build both go-1.13 and go-1.14 in circleci to test for all supported versions of Go. (#569) - Removed unneeded allocation on empty labels in OLTP exporter. (#597) - Update `BatchedSpanProcessor` to process the queue until no data but respect max batch size. (#599) - Update project documentation godoc.org links to pkg.go.dev. (#602) ## [0.3.0] - 2020-03-21 This is a first official beta release, which provides almost fully complete metrics, tracing, and context propagation functionality. There is still a possibility of breaking changes. ### Added - Add `Observer` metric instrument. (#474) - Add global `Propagators` functionality to enable deferred initialization for propagators registered before the first Meter SDK is installed. (#494) - Simplified export setup pipeline for the jaeger exporter to match other exporters. (#459) - The zipkin trace exporter. (#495) - The OTLP exporter to export metric and trace telemetry to the OpenTelemetry collector. (#497) (#544) (#545) - Add `StatusMessage` field to the trace `Span`. (#524) - Context propagation in OpenTracing bridge in terms of OpenTelemetry context propagation. (#525) - The `Resource` type was added to the SDK. (#528) - The global API now supports a `Tracer` and `Meter` function as shortcuts to getting a global `*Provider` and calling these methods directly. (#538) - The metric API now defines a generic `MeterImpl` interface to support general purpose `Meter` construction. Additionally, `SyncImpl` and `AsyncImpl` are added to support general purpose instrument construction. (#560) - A metric `Kind` is added to represent the `MeasureKind`, `ObserverKind`, and `CounterKind`. (#560) - Scripts to better automate the release process. (#576) ### Changed - Default to to use `AlwaysSampler` instead of `ProbabilitySampler` to match OpenTelemetry specification. (#506) - Renamed `AlwaysSampleSampler` to `AlwaysOnSampler` in the trace API. (#511) - Renamed `NeverSampleSampler` to `AlwaysOffSampler` in the trace API. (#511) - The `Status` field of the `Span` was changed to `StatusCode` to disambiguate with the added `StatusMessage`. (#524) - Updated the trace `Sampler` interface conform to the OpenTelemetry specification. (#531) - Rename metric API `Options` to `Config`. (#541) - Rename metric `Counter` aggregator to be `Sum`. (#541) - Unify metric options into `Option` from instrument specific options. (#541) - The trace API's `TraceProvider` now support `Resource`s. (#545) - Correct error in zipkin module name. (#548) - The jaeger trace exporter now supports `Resource`s. (#551) - Metric SDK now supports `Resource`s. The `WithResource` option was added to configure a `Resource` on creation and the `Resource` method was added to the metric `Descriptor` to return the associated `Resource`. (#552) - Replace `ErrNoLastValue` and `ErrEmptyDataSet` by `ErrNoData` in the metric SDK. (#557) - The stdout trace exporter now supports `Resource`s. (#558) - The metric `Descriptor` is now included at the API instead of the SDK. (#560) - Replace `Ordered` with an iterator in `export.Labels`. (#567) ### Removed - The vendor specific Stackdriver. It is now hosted on 3rd party vendor infrastructure. (#452) - The `Unregister` method for metric observers as it is not in the OpenTelemetry specification. (#560) - `GetDescriptor` from the metric SDK. (#575) - The `Gauge` instrument from the metric API. (#537) ### Fixed - Make histogram aggregator checkpoint consistent. (#438) - Update README with import instructions and how to build and test. (#505) - The default label encoding was updated to be unique. (#508) - Use `NewRoot` in the othttp plugin for public endpoints. (#513) - Fix data race in `BatchedSpanProcessor`. (#518) - Skip test-386 for Mac OS 10.15.x (Catalina and upwards). #521 - Use a variable-size array to represent ordered labels in maps. (#523) - Update the OTLP protobuf and update changed import path. (#532) - Use `StateLocker` implementation in `MinMaxSumCount`. (#546) - Eliminate goroutine leak in histogram stress test. (#547) - Update OTLP exporter with latest protobuf. (#550) - Add filters to the othttp plugin. (#556) - Provide an implementation of the `Header*` filters that do not depend on Go 1.14. (#565) - Encode labels once during checkpoint. The checkpoint function is executed in a single thread so we can do the encoding lazily before passing the encoded version of labels to the exporter. This is a cheap and quick way to avoid encoding the labels on every collection interval. (#572) - Run coverage over all packages in `COVERAGE_MOD_DIR`. (#573) ## [0.2.3] - 2020-03-04 ### Added - `RecordError` method on `Span`s in the trace API to Simplify adding error events to spans. (#473) - Configurable push frequency for exporters setup pipeline. (#504) ### Changed - Rename the `exporter` directory to `exporters`. The `go.opentelemetry.io/otel/exporter/trace/jaeger` package was mistakenly released with a `v1.0.0` tag instead of `v0.1.0`. This resulted in all subsequent releases not becoming the default latest. A consequence of this was that all `go get`s pulled in the incompatible `v0.1.0` release of that package when pulling in more recent packages from other otel packages. Renaming the `exporter` directory to `exporters` fixes this issue by renaming the package and therefore clearing any existing dependency tags. Consequentially, this action also renames *all* exporter packages. (#502) ### Removed - The `CorrelationContextHeader` constant in the `correlation` package is no longer exported. (#503) ## [0.2.2] - 2020-02-27 ### Added - `HTTPSupplier` interface in the propagation API to specify methods to retrieve and store a single value for a key to be associated with a carrier. (#467) - `HTTPExtractor` interface in the propagation API to extract information from an `HTTPSupplier` into a context. (#467) - `HTTPInjector` interface in the propagation API to inject information into an `HTTPSupplier.` (#467) - `Config` and configuring `Option` to the propagator API. (#467) - `Propagators` interface in the propagation API to contain the set of injectors and extractors for all supported carrier formats. (#467) - `HTTPPropagator` interface in the propagation API to inject and extract from an `HTTPSupplier.` (#467) - `WithInjectors` and `WithExtractors` functions to the propagator API to configure injectors and extractors to use. (#467) - `ExtractHTTP` and `InjectHTTP` functions to apply configured HTTP extractors and injectors to a passed context. (#467) - Histogram aggregator. (#433) - `DefaultPropagator` function and have it return `trace.TraceContext` as the default context propagator. (#456) - `AlwaysParentSample` sampler to the trace API. (#455) - `WithNewRoot` option function to the trace API to specify the created span should be considered a root span. (#451) ### Changed - Renamed `WithMap` to `ContextWithMap` in the correlation package. (#481) - Renamed `FromContext` to `MapFromContext` in the correlation package. (#481) - Move correlation context propagation to correlation package. (#479) - Do not default to putting remote span context into links. (#480) - `Tracer.WithSpan` updated to accept `StartOptions`. (#472) - Renamed `MetricKind` to `Kind` to not stutter in the type usage. (#432) - Renamed the `export` package to `metric` to match directory structure. (#432) - Rename the `api/distributedcontext` package to `api/correlation`. (#444) - Rename the `api/propagators` package to `api/propagation`. (#444) - Move the propagators from the `propagators` package into the `trace` API package. (#444) - Update `Float64Gauge`, `Int64Gauge`, `Float64Counter`, `Int64Counter`, `Float64Measure`, and `Int64Measure` metric methods to use value receivers instead of pointers. (#462) - Moved all dependencies of tools package to a tools directory. (#466) ### Removed - Binary propagators. (#467) - NOOP propagator. (#467) ### Fixed - Upgraded `github.com/golangci/golangci-lint` from `v1.21.0` to `v1.23.6` in `tools/`. (#492) - Fix a possible nil-dereference crash (#478) - Correct comments for `InstallNewPipeline` in the stdout exporter. (#483) - Correct comments for `InstallNewPipeline` in the dogstatsd exporter. (#484) - Correct comments for `InstallNewPipeline` in the prometheus exporter. (#482) - Initialize `onError` based on `Config` in prometheus exporter. (#486) - Correct module name in prometheus exporter README. (#475) - Removed tracer name prefix from span names. (#430) - Fix `aggregator_test.go` import package comment. (#431) - Improved detail in stdout exporter. (#436) - Fix a dependency issue (generate target should depend on stringer, not lint target) in Makefile. (#442) - Reorders the Makefile targets within `precommit` target so we generate files and build the code before doing linting, so we can get much nicer errors about syntax errors from the compiler. (#442) - Reword function documentation in gRPC plugin. (#446) - Send the `span.kind` tag to Jaeger from the jaeger exporter. (#441) - Fix `metadataSupplier` in the jaeger exporter to overwrite the header if existing instead of appending to it. (#441) - Upgraded to Go 1.13 in CI. (#465) - Correct opentelemetry.io URL in trace SDK documentation. (#464) - Refactored reference counting logic in SDK determination of stale records. (#468) - Add call to `runtime.Gosched` in instrument `acquireHandle` logic to not block the collector. (#469) ## [0.2.1.1] - 2020-01-13 ### Fixed - Use stateful batcher on Prometheus exporter fixing regression introduced in #395. (#428) ## [0.2.1] - 2020-01-08 ### Added - Global meter forwarding implementation. This enables deferred initialization for metric instruments registered before the first Meter SDK is installed. (#392) - Global trace forwarding implementation. This enables deferred initialization for tracers registered before the first Trace SDK is installed. (#406) - Standardize export pipeline creation in all exporters. (#395) - A testing, organization, and comments for 64-bit field alignment. (#418) - Script to tag all modules in the project. (#414) ### Changed - Renamed `propagation` package to `propagators`. (#362) - Renamed `B3Propagator` propagator to `B3`. (#362) - Renamed `TextFormatPropagator` propagator to `TextFormat`. (#362) - Renamed `BinaryPropagator` propagator to `Binary`. (#362) - Renamed `BinaryFormatPropagator` propagator to `BinaryFormat`. (#362) - Renamed `NoopTextFormatPropagator` propagator to `NoopTextFormat`. (#362) - Renamed `TraceContextPropagator` propagator to `TraceContext`. (#362) - Renamed `SpanOption` to `StartOption` in the trace API. (#369) - Renamed `StartOptions` to `StartConfig` in the trace API. (#369) - Renamed `EndOptions` to `EndConfig` in the trace API. (#369) - `Number` now has a pointer receiver for its methods. (#375) - Renamed `CurrentSpan` to `SpanFromContext` in the trace API. (#379) - Renamed `SetCurrentSpan` to `ContextWithSpan` in the trace API. (#379) - Renamed `Message` in Event to `Name` in the trace API. (#389) - Prometheus exporter no longer aggregates metrics, instead it only exports them. (#385) - Renamed `HandleImpl` to `BoundInstrumentImpl` in the metric API. (#400) - Renamed `Float64CounterHandle` to `Float64CounterBoundInstrument` in the metric API. (#400) - Renamed `Int64CounterHandle` to `Int64CounterBoundInstrument` in the metric API. (#400) - Renamed `Float64GaugeHandle` to `Float64GaugeBoundInstrument` in the metric API. (#400) - Renamed `Int64GaugeHandle` to `Int64GaugeBoundInstrument` in the metric API. (#400) - Renamed `Float64MeasureHandle` to `Float64MeasureBoundInstrument` in the metric API. (#400) - Renamed `Int64MeasureHandle` to `Int64MeasureBoundInstrument` in the metric API. (#400) - Renamed `Release` method for bound instruments in the metric API to `Unbind`. (#400) - Renamed `AcquireHandle` method for bound instruments in the metric API to `Bind`. (#400) - Renamed the `File` option in the stdout exporter to `Writer`. (#404) - Renamed all `Options` to `Config` for all metric exports where this wasn't already the case. ### Fixed - Aggregator import path corrected. (#421) - Correct links in README. (#368) - The README was updated to match latest code changes in its examples. (#374) - Don't capitalize error statements. (#375) - Fix ignored errors. (#375) - Fix ambiguous variable naming. (#375) - Removed unnecessary type casting. (#375) - Use named parameters. (#375) - Updated release schedule. (#378) - Correct http-stackdriver example module name. (#394) - Removed the `http.request` span in `httptrace` package. (#397) - Add comments in the metrics SDK (#399) - Initialize checkpoint when creating ddsketch aggregator to prevent panic when merging into a empty one. (#402) (#403) - Add documentation of compatible exporters in the README. (#405) - Typo fix. (#408) - Simplify span check logic in SDK tracer implementation. (#419) ## [0.2.0] - 2019-12-03 ### Added - Unary gRPC tracing example. (#351) - Prometheus exporter. (#334) - Dogstatsd metrics exporter. (#326) ### Changed - Rename `MaxSumCount` aggregation to `MinMaxSumCount` and add the `Min` interface for this aggregation. (#352) - Rename `GetMeter` to `Meter`. (#357) - Rename `HTTPTraceContextPropagator` to `TraceContextPropagator`. (#355) - Rename `HTTPB3Propagator` to `B3Propagator`. (#355) - Rename `HTTPTraceContextPropagator` to `TraceContextPropagator`. (#355) - Move `/global` package to `/api/global`. (#356) - Rename `GetTracer` to `Tracer`. (#347) ### Removed - `SetAttribute` from the `Span` interface in the trace API. (#361) - `AddLink` from the `Span` interface in the trace API. (#349) - `Link` from the `Span` interface in the trace API. (#349) ### Fixed - Exclude example directories from coverage report. (#365) - Lint make target now implements automatic fixes with `golangci-lint` before a second run to report the remaining issues. (#360) - Drop `GO111MODULE` environment variable in Makefile as Go 1.13 is the project specified minimum version and this is environment variable is not needed for that version of Go. (#359) - Run the race checker for all test. (#354) - Redundant commands in the Makefile are removed. (#354) - Split the `generate` and `lint` targets of the Makefile. (#354) - Renames `circle-ci` target to more generic `ci` in Makefile. (#354) - Add example Prometheus binary to gitignore. (#358) - Support negative numbers with the `MaxSumCount`. (#335) - Resolve race conditions in `push_test.go` identified in #339. (#340) - Use `/usr/bin/env bash` as a shebang in scripts rather than `/bin/bash`. (#336) - Trace benchmark now tests both `AlwaysSample` and `NeverSample`. Previously it was testing `AlwaysSample` twice. (#325) - Trace benchmark now uses a `[]byte` for `TraceID` to fix failing test. (#325) - Added a trace benchmark to test variadic functions in `setAttribute` vs `setAttributes` (#325) - The `defaultkeys` batcher was only using the encoded label set as its map key while building a checkpoint. This allowed distinct label sets through, but any metrics sharing a label set could be overwritten or merged incorrectly. This was corrected. (#333) ## [0.1.2] - 2019-11-18 ### Fixed - Optimized the `simplelru` map for attributes to reduce the number of allocations. (#328) - Removed unnecessary unslicing of parameters that are already a slice. (#324) ## [0.1.1] - 2019-11-18 This release contains a Metrics SDK with stdout exporter and supports basic aggregations such as counter, gauges, array, maxsumcount, and ddsketch. ### Added - Metrics stdout export pipeline. (#265) - Array aggregation for raw measure metrics. (#282) - The core.Value now have a `MarshalJSON` method. (#281) ### Removed - `WithService`, `WithResources`, and `WithComponent` methods of tracers. (#314) - Prefix slash in `Tracer.Start()` for the Jaeger example. (#292) ### Changed - Allocation in LabelSet construction to reduce GC overhead. (#318) - `trace.WithAttributes` to append values instead of replacing (#315) - Use a formula for tolerance in sampling tests. (#298) - Move export types into trace and metric-specific sub-directories. (#289) - `SpanKind` back to being based on an `int` type. (#288) ### Fixed - URL to OpenTelemetry website in README. (#323) - Name of othttp default tracer. (#321) - `ExportSpans` for the stackdriver exporter now handles `nil` context. (#294) - CI modules cache to correctly restore/save from/to the cache. (#316) - Fix metric SDK race condition between `LoadOrStore` and the assignment `rec.recorder = i.meter.exporter.AggregatorFor(rec)`. (#293) - README now reflects the new code structure introduced with these changes. (#291) - Make the basic example work. (#279) ## [0.1.0] - 2019-11-04 This is the first release of open-telemetry go library. It contains api and sdk for trace and meter. ### Added - Initial OpenTelemetry trace and metric API prototypes. - Initial OpenTelemetry trace, metric, and export SDK packages. - A wireframe bridge to support compatibility with OpenTracing. - Example code for a basic, http-stackdriver, http, jaeger, and named tracer setup. - Exporters for Jaeger, Stackdriver, and stdout. - Propagators for binary, B3, and trace-context protocols. - Project information and guidelines in the form of a README and CONTRIBUTING. - Tools to build the project and a Makefile to automate the process. - Apache-2.0 license. - CircleCI build CI manifest files. - CODEOWNERS file to track owners of this project. [Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.28.0...HEAD [1.28.0/0.50.0/0.4.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.28.0 [1.27.0/0.49.0/0.3.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.27.0 [1.26.0/0.48.0/0.2.0-alpha]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.26.0 [1.25.0/0.47.0/0.0.8/0.1.0-alpha]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.25.0 [1.24.0/0.46.0/0.0.1-alpha]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.24.0 [1.23.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.1 [1.23.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.0 [1.23.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.0-rc.1 [1.22.0/0.45.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.22.0 [1.21.0/0.44.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.21.0 [1.20.0/0.43.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.20.0 [1.19.0/0.42.0/0.0.7]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.19.0 [1.19.0-rc.1/0.42.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.19.0-rc.1 [1.18.0/0.41.0/0.0.6]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.18.0 [1.17.0/0.40.0/0.0.5]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.17.0 [1.16.0/0.39.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.16.0 [1.16.0-rc.1/0.39.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.16.0-rc.1 [1.15.1/0.38.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.15.1 [1.15.0/0.38.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.15.0 [1.15.0-rc.2/0.38.0-rc.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.15.0-rc.2 [1.15.0-rc.1/0.38.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.15.0-rc.1 [1.14.0/0.37.0/0.0.4]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.14.0 [1.13.0/0.36.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.13.0 [1.12.0/0.35.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.12.0 [1.11.2/0.34.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.11.2 [1.11.1/0.33.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.11.1 [1.11.0/0.32.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.11.0 [0.32.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/sdk/metric/v0.32.2 [0.32.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/sdk/metric/v0.32.1 [0.32.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/sdk/metric/v0.32.0 [1.10.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.10.0 [1.9.0/0.0.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.9.0 [1.8.0/0.31.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.8.0 [1.7.0/0.30.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.7.0 [0.29.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/metric/v0.29.0 [1.6.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.6.3 [1.6.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.6.2 [1.6.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.6.1 [1.6.0/0.28.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.6.0 [1.5.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.5.0 [1.4.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.4.1 [1.4.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.4.0 [1.3.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.3.0 [1.2.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.2.0 [1.1.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.1.0 [1.0.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.1 [Metrics 0.24.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/metric/v0.24.0 [1.0.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.0 [1.0.0-RC3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.0-RC3 [1.0.0-RC2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.0-RC2 [Experimental Metrics v0.22.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/metric/v0.22.0 [1.0.0-RC1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.0-RC1 [0.20.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.20.0 [0.19.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.19.0 [0.18.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.18.0 [0.17.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.17.0 [0.16.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.16.0 [0.15.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.15.0 [0.14.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.14.0 [0.13.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.13.0 [0.12.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.12.0 [0.11.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.11.0 [0.10.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.10.0 [0.9.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.9.0 [0.8.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.8.0 [0.7.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.7.0 [0.6.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.6.0 [0.5.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.5.0 [0.4.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.4.3 [0.4.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.4.2 [0.4.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.4.1 [0.4.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.4.0 [0.3.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.3.0 [0.2.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.3 [0.2.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.2 [0.2.1.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.1.1 [0.2.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.1 [0.2.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.0 [0.1.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.1.2 [0.1.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.1.1 [0.1.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.1.0 [Go 1.22]: https://go.dev/doc/go1.22 [Go 1.21]: https://go.dev/doc/go1.21 [Go 1.20]: https://go.dev/doc/go1.20 [Go 1.19]: https://go.dev/doc/go1.19 [Go 1.18]: https://go.dev/doc/go1.18 [metric API]:https://pkg.go.dev/go.opentelemetry.io/otel/metric [metric SDK]:https://pkg.go.dev/go.opentelemetry.io/otel/sdk/metric [trace API]:https://pkg.go.dev/go.opentelemetry.io/otel/trace [GO-2024-2687]: https://pkg.go.dev/vuln/GO-2024-2687 ================================================ FILE: vendor/go.opentelemetry.io/otel/CODEOWNERS ================================================ ##################################################### # # List of approvers for this repository # ##################################################### # # Learn about membership in OpenTelemetry community: # https://github.com/open-telemetry/community/blob/main/community-membership.md # # # Learn about CODEOWNERS file format: # https://help.github.com/en/articles/about-code-owners # * @MrAlias @XSAM @dashpole @MadVikingGod @pellared @hanyuancheung @dmathieu CODEOWNERS @MrAlias @MadVikingGod @pellared @dashpole @XSAM @dmathieu ================================================ FILE: vendor/go.opentelemetry.io/otel/CONTRIBUTING.md ================================================ # Contributing to opentelemetry-go The Go special interest group (SIG) meets regularly. See the OpenTelemetry [community](https://github.com/open-telemetry/community#golang-sdk) repo for information on this and other language SIGs. See the [public meeting notes](https://docs.google.com/document/d/1E5e7Ld0NuU1iVvf-42tOBpu2VBBLYnh73GJuITGJTTU/edit) for a summary description of past meetings. To request edit access, join the meeting or get in touch on [Slack](https://cloud-native.slack.com/archives/C01NPAXACKT). ## Development You can view and edit the source code by cloning this repository: ```sh git clone https://github.com/open-telemetry/opentelemetry-go.git ``` Run `make test` to run the tests instead of `go test`. There are some generated files checked into the repo. To make sure that the generated files are up-to-date, run `make` (or `make precommit` - the `precommit` target is the default). The `precommit` target also fixes the formatting of the code and checks the status of the go module files. Additionally, there is a `codespell` target that checks for common typos in the code. It is not run by default, but you can run it manually with `make codespell`. It will set up a virtual environment in `venv` and install `codespell` there. If after running `make precommit` the output of `git status` contains `nothing to commit, working tree clean` then it means that everything is up-to-date and properly formatted. ## Pull Requests ### How to Send Pull Requests Everyone is welcome to contribute code to `opentelemetry-go` via GitHub pull requests (PRs). To create a new PR, fork the project in GitHub and clone the upstream repo: ```sh go get -d go.opentelemetry.io/otel ``` (This may print some warning about "build constraints exclude all Go files", just ignore it.) This will put the project in `${GOPATH}/src/go.opentelemetry.io/otel`. You can alternatively use `git` directly with: ```sh git clone https://github.com/open-telemetry/opentelemetry-go ``` (Note that `git clone` is *not* using the `go.opentelemetry.io/otel` name - that name is a kind of a redirector to GitHub that `go get` can understand, but `git` does not.) This would put the project in the `opentelemetry-go` directory in current working directory. Enter the newly created directory and add your fork as a new remote: ```sh git remote add git@github.com:/opentelemetry-go ``` Check out a new branch, make modifications, run linters and tests, update `CHANGELOG.md`, and push the branch to your fork: ```sh git checkout -b # edit files # update changelog make precommit git add -p git commit git push ``` Open a pull request against the main `opentelemetry-go` repo. Be sure to add the pull request ID to the entry you added to `CHANGELOG.md`. Avoid rebasing and force-pushing to your branch to facilitate reviewing the pull request. Rewriting Git history makes it difficult to keep track of iterations during code review. All pull requests are squashed to a single commit upon merge to `main`. ### How to Receive Comments * If the PR is not ready for review, please put `[WIP]` in the title, tag it as `work-in-progress`, or mark it as [`draft`](https://github.blog/2019-02-14-introducing-draft-pull-requests/). * Make sure CLA is signed and CI is clear. ### How to Get PRs Merged A PR is considered **ready to merge** when: * It has received two qualified approvals[^1]. This is not enforced through automation, but needs to be validated by the maintainer merging. * The qualified approvals need to be from [Approver]s/[Maintainer]s affiliated with different companies. Two qualified approvals from [Approver]s or [Maintainer]s affiliated with the same company counts as a single qualified approval. * PRs introducing changes that have already been discussed and consensus reached only need one qualified approval. The discussion and resolution needs to be linked to the PR. * Trivial changes[^2] only need one qualified approval. * All feedback has been addressed. * All PR comments and suggestions are resolved. * All GitHub Pull Request reviews with a status of "Request changes" have been addressed. Another review by the objecting reviewer with a different status can be submitted to clear the original review, or the review can be dismissed by a [Maintainer] when the issues from the original review have been addressed. * Any comments or reviews that cannot be resolved between the PR author and reviewers can be submitted to the community [Approver]s and [Maintainer]s during the weekly SIG meeting. If consensus is reached among the [Approver]s and [Maintainer]s during the SIG meeting the objections to the PR may be dismissed or resolved or the PR closed by a [Maintainer]. * Any substantive changes to the PR require existing Approval reviews be cleared unless the approver explicitly states that their approval persists across changes. This includes changes resulting from other feedback. [Approver]s and [Maintainer]s can help in clearing reviews and they should be consulted if there are any questions. * The PR branch is up to date with the base branch it is merging into. * To ensure this does not block the PR, it should be configured to allow maintainers to update it. * It has been open for review for at least one working day. This gives people reasonable time to review. * Trivial changes[^2] do not have to wait for one day and may be merged with a single [Maintainer]'s approval. * All required GitHub workflows have succeeded. * Urgent fix can take exception as long as it has been actively communicated among [Maintainer]s. Any [Maintainer] can merge the PR once the above criteria have been met. [^1]: A qualified approval is a GitHub Pull Request review with "Approve" status from an OpenTelemetry Go [Approver] or [Maintainer]. [^2]: Trivial changes include: typo corrections, cosmetic non-substantive changes, documentation corrections or updates, dependency updates, etc. ## Design Choices As with other OpenTelemetry clients, opentelemetry-go follows the [OpenTelemetry Specification](https://opentelemetry.io/docs/specs/otel). It's especially valuable to read through the [library guidelines](https://opentelemetry.io/docs/specs/otel/library-guidelines). ### Focus on Capabilities, Not Structure Compliance OpenTelemetry is an evolving specification, one where the desires and use cases are clear, but the method to satisfy those uses cases are not. As such, Contributions should provide functionality and behavior that conforms to the specification, but the interface and structure is flexible. It is preferable to have contributions follow the idioms of the language rather than conform to specific API names or argument patterns in the spec. For a deeper discussion, see [this](https://github.com/open-telemetry/opentelemetry-specification/issues/165). ## Documentation Each (non-internal, non-test) package must be documented using [Go Doc Comments](https://go.dev/doc/comment), preferably in a `doc.go` file. Prefer using [Examples](https://pkg.go.dev/testing#hdr-Examples) instead of putting code snippets in Go doc comments. In some cases, you can even create [Testable Examples](https://go.dev/blog/examples). You can install and run a "local Go Doc site" in the following way: ```sh go install golang.org/x/pkgsite/cmd/pkgsite@latest pkgsite ``` [`go.opentelemetry.io/otel/metric`](https://pkg.go.dev/go.opentelemetry.io/otel/metric) is an example of a very well-documented package. ### README files Each (non-internal, non-test, non-documentation) package must contain a `README.md` file containing at least a title, and a `pkg.go.dev` badge. The README should not be a repetition of Go doc comments. You can verify the presence of all README files with the `make verify-readmes` command. ## Style Guide One of the primary goals of this project is that it is actually used by developers. With this goal in mind the project strives to build user-friendly and idiomatic Go code adhering to the Go community's best practices. For a non-comprehensive but foundational overview of these best practices the [Effective Go](https://golang.org/doc/effective_go.html) documentation is an excellent starting place. As a convenience for developers building this project the `make precommit` will format, lint, validate, and in some cases fix the changes you plan to submit. This check will need to pass for your changes to be able to be merged. In addition to idiomatic Go, the project has adopted certain standards for implementations of common patterns. These standards should be followed as a default, and if they are not followed documentation needs to be included as to the reasons why. ### Configuration When creating an instantiation function for a complex `type T struct`, it is useful to allow variable number of options to be applied. However, the strong type system of Go restricts the function design options. There are a few ways to solve this problem, but we have landed on the following design. #### `config` Configuration should be held in a `struct` named `config`, or prefixed with specific type name this Configuration applies to if there are multiple `config` in the package. This type must contain configuration options. ```go // config contains configuration options for a thing. type config struct { // options ... } ``` In general the `config` type will not need to be used externally to the package and should be unexported. If, however, it is expected that the user will likely want to build custom options for the configuration, the `config` should be exported. Please, include in the documentation for the `config` how the user can extend the configuration. It is important that internal `config` are not shared across package boundaries. Meaning a `config` from one package should not be directly used by another. The one exception is the API packages. The configs from the base API, eg. `go.opentelemetry.io/otel/trace.TracerConfig` and `go.opentelemetry.io/otel/metric.InstrumentConfig`, are intended to be consumed by the SDK therefore it is expected that these are exported. When a config is exported we want to maintain forward and backward compatibility, to achieve this no fields should be exported but should instead be accessed by methods. Optionally, it is common to include a `newConfig` function (with the same naming scheme). This function wraps any defaults setting and looping over all options to create a configured `config`. ```go // newConfig returns an appropriately configured config. func newConfig(options ...Option) config { // Set default values for config. config := config{/* […] */} for _, option := range options { config = option.apply(config) } // Perform any validation here. return config } ``` If validation of the `config` options is also performed this can return an error as well that is expected to be handled by the instantiation function or propagated to the user. Given the design goal of not having the user need to work with the `config`, the `newConfig` function should also be unexported. #### `Option` To set the value of the options a `config` contains, a corresponding `Option` interface type should be used. ```go type Option interface { apply(config) config } ``` Having `apply` unexported makes sure that it will not be used externally. Moreover, the interface becomes sealed so the user cannot easily implement the interface on its own. The `apply` method should return a modified version of the passed config. This approach, instead of passing a pointer, is used to prevent the config from being allocated to the heap. The name of the interface should be prefixed in the same way the corresponding `config` is (if at all). #### Options All user configurable options for a `config` must have a related unexported implementation of the `Option` interface and an exported configuration function that wraps this implementation. The wrapping function name should be prefixed with `With*` (or in the special case of a boolean options `Without*`) and should have the following function signature. ```go func With*(…) Option { … } ``` ##### `bool` Options ```go type defaultFalseOption bool func (o defaultFalseOption) apply(c config) config { c.Bool = bool(o) return c } // WithOption sets a T to have an option included. func WithOption() Option { return defaultFalseOption(true) } ``` ```go type defaultTrueOption bool func (o defaultTrueOption) apply(c config) config { c.Bool = bool(o) return c } // WithoutOption sets a T to have Bool option excluded. func WithoutOption() Option { return defaultTrueOption(false) } ``` ##### Declared Type Options ```go type myTypeOption struct { MyType MyType } func (o myTypeOption) apply(c config) config { c.MyType = o.MyType return c } // WithMyType sets T to have include MyType. func WithMyType(t MyType) Option { return myTypeOption{t} } ``` ##### Functional Options ```go type optionFunc func(config) config func (fn optionFunc) apply(c config) config { return fn(c) } // WithMyType sets t as MyType. func WithMyType(t MyType) Option { return optionFunc(func(c config) config { c.MyType = t return c }) } ``` #### Instantiation Using this configuration pattern to configure instantiation with a `NewT` function. ```go func NewT(options ...Option) T {…} ``` Any required parameters can be declared before the variadic `options`. #### Dealing with Overlap Sometimes there are multiple complex `struct` that share common configuration and also have distinct configuration. To avoid repeated portions of `config`s, a common `config` can be used with the union of options being handled with the `Option` interface. For example. ```go // config holds options for all animals. type config struct { Weight float64 Color string MaxAltitude float64 } // DogOption apply Dog specific options. type DogOption interface { applyDog(config) config } // BirdOption apply Bird specific options. type BirdOption interface { applyBird(config) config } // Option apply options for all animals. type Option interface { BirdOption DogOption } type weightOption float64 func (o weightOption) applyDog(c config) config { c.Weight = float64(o) return c } func (o weightOption) applyBird(c config) config { c.Weight = float64(o) return c } func WithWeight(w float64) Option { return weightOption(w) } type furColorOption string func (o furColorOption) applyDog(c config) config { c.Color = string(o) return c } func WithFurColor(c string) DogOption { return furColorOption(c) } type maxAltitudeOption float64 func (o maxAltitudeOption) applyBird(c config) config { c.MaxAltitude = float64(o) return c } func WithMaxAltitude(a float64) BirdOption { return maxAltitudeOption(a) } func NewDog(name string, o ...DogOption) Dog {…} func NewBird(name string, o ...BirdOption) Bird {…} ``` ### Interfaces To allow other developers to better comprehend the code, it is important to ensure it is sufficiently documented. One simple measure that contributes to this aim is self-documenting by naming method parameters. Therefore, where appropriate, methods of every exported interface type should have their parameters appropriately named. #### Interface Stability All exported stable interfaces that include the following warning in their documentation are allowed to be extended with additional methods. > Warning: methods may be added to this interface in minor releases. These interfaces are defined by the OpenTelemetry specification and will be updated as the specification evolves. Otherwise, stable interfaces MUST NOT be modified. #### How to Change Specification Interfaces When an API change must be made, we will update the SDK with the new method one release before the API change. This will allow the SDK one version before the API change to work seamlessly with the new API. If an incompatible version of the SDK is used with the new API the application will fail to compile. #### How Not to Change Specification Interfaces We have explored using a v2 of the API to change interfaces and found that there was no way to introduce a v2 and have it work seamlessly with the v1 of the API. Problems happened with libraries that upgraded to v2 when an application did not, and would not produce any telemetry. More detail of the approaches considered and their limitations can be found in the [Use a V2 API to evolve interfaces](https://github.com/open-telemetry/opentelemetry-go/issues/3920) issue. #### How to Change Other Interfaces If new functionality is needed for an interface that cannot be changed it MUST be added by including an additional interface. That added interface can be a simple interface for the specific functionality that you want to add or it can be a super-set of the original interface. For example, if you wanted to a `Close` method to the `Exporter` interface: ```go type Exporter interface { Export() } ``` A new interface, `Closer`, can be added: ```go type Closer interface { Close() } ``` Code that is passed the `Exporter` interface can now check to see if the passed value also satisfies the new interface. E.g. ```go func caller(e Exporter) { /* ... */ if c, ok := e.(Closer); ok { c.Close() } /* ... */ } ``` Alternatively, a new type that is the super-set of an `Exporter` can be created. ```go type ClosingExporter struct { Exporter Close() } ``` This new type can be used similar to the simple interface above in that a passed `Exporter` type can be asserted to satisfy the `ClosingExporter` type and the `Close` method called. This super-set approach can be useful if there is explicit behavior that needs to be coupled with the original type and passed as a unified type to a new function, but, because of this coupling, it also limits the applicability of the added functionality. If there exist other interfaces where this functionality should be added, each one will need their own super-set interfaces and will duplicate the pattern. For this reason, the simple targeted interface that defines the specific functionality should be preferred. See also: [Keeping Your Modules Compatible: Working with interfaces](https://go.dev/blog/module-compatibility#working-with-interfaces). ### Testing The tests should never leak goroutines. Use the term `ConcurrentSafe` in the test name when it aims to verify the absence of race conditions. ### Internal packages The use of internal packages should be scoped to a single module. A sub-module should never import from a parent internal package. This creates a coupling between the two modules where a user can upgrade the parent without the child and if the internal package API has changed it will fail to upgrade[^3]. There are two known exceptions to this rule: - `go.opentelemetry.io/otel/internal/global` - This package manages global state for all of opentelemetry-go. It needs to be a single package in order to ensure the uniqueness of the global state. - `go.opentelemetry.io/otel/internal/baggage` - This package provides values in a `context.Context` that need to be recognized by `go.opentelemetry.io/otel/baggage` and `go.opentelemetry.io/otel/bridge/opentracing` but remain private. If you have duplicate code in multiple modules, make that code into a Go template stored in `go.opentelemetry.io/otel/internal/shared` and use [gotmpl] to render the templates in the desired locations. See [#4404] for an example of this. [^3]: https://github.com/open-telemetry/opentelemetry-go/issues/3548 ### Ignoring context cancellation OpenTelemetry API implementations need to ignore the cancellation of the context that are passed when recording a value (e.g. starting a span, recording a measurement, emitting a log). Recording methods should not return an error describing the cancellation state of the context when they complete, nor should they abort any work. This rule may not apply if the OpenTelemetry specification defines a timeout mechanism for the method. In that case the context cancellation can be used for the timeout with the restriction that this behavior is documented for the method. Otherwise, timeouts are expected to be handled by the user calling the API, not the implementation. Stoppage of the telemetry pipeline is handled by calling the appropriate `Shutdown` method of a provider. It is assumed the context passed from a user is not used for this purpose. Outside of the direct recording of telemetry from the API (e.g. exporting telemetry, force flushing telemetry, shutting down a signal provider) the context cancellation should be honored. This means all work done on behalf of the user provided context should be canceled. ## Approvers and Maintainers ### Approvers - [Chester Cheung](https://github.com/hanyuancheung), Tencent ### Maintainers - [Aaron Clawson](https://github.com/MadVikingGod), LightStep - [Damien Mathieu](https://github.com/dmathieu), Elastic - [David Ashpole](https://github.com/dashpole), Google - [Robert Pająk](https://github.com/pellared), Splunk - [Sam Xie](https://github.com/XSAM), Cisco/AppDynamics - [Tyler Yahn](https://github.com/MrAlias), Splunk ### Emeritus - [Liz Fong-Jones](https://github.com/lizthegrey), Honeycomb - [Gustavo Silva Paiva](https://github.com/paivagustavo), LightStep - [Josh MacDonald](https://github.com/jmacd), LightStep - [Anthony Mirabella](https://github.com/Aneurysm9), AWS - [Evan Torrie](https://github.com/evantorrie), Yahoo ### Become an Approver or a Maintainer See the [community membership document in OpenTelemetry community repo](https://github.com/open-telemetry/community/blob/main/community-membership.md). [Approver]: #approvers [Maintainer]: #maintainers [gotmpl]: https://pkg.go.dev/go.opentelemetry.io/build-tools/gotmpl [#4404]: https://github.com/open-telemetry/opentelemetry-go/pull/4404 ================================================ FILE: vendor/go.opentelemetry.io/otel/LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor 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, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/go.opentelemetry.io/otel/Makefile ================================================ # Copyright The OpenTelemetry Authors # SPDX-License-Identifier: Apache-2.0 TOOLS_MOD_DIR := ./internal/tools ALL_DOCS := $(shell find . -name '*.md' -type f | sort) ALL_GO_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | sort) OTEL_GO_MOD_DIRS := $(filter-out $(TOOLS_MOD_DIR), $(ALL_GO_MOD_DIRS)) ALL_COVERAGE_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | grep -E -v '^./example|^$(TOOLS_MOD_DIR)' | sort) GO = go TIMEOUT = 60 .DEFAULT_GOAL := precommit .PHONY: precommit ci precommit: generate license-check misspell go-mod-tidy golangci-lint-fix verify-readmes verify-mods test-default ci: generate license-check lint vanity-import-check verify-readmes verify-mods build test-default check-clean-work-tree test-coverage # Tools TOOLS = $(CURDIR)/.tools $(TOOLS): @mkdir -p $@ $(TOOLS)/%: $(TOOLS_MOD_DIR)/go.mod | $(TOOLS) cd $(TOOLS_MOD_DIR) && \ $(GO) build -o $@ $(PACKAGE) MULTIMOD = $(TOOLS)/multimod $(TOOLS)/multimod: PACKAGE=go.opentelemetry.io/build-tools/multimod SEMCONVGEN = $(TOOLS)/semconvgen $(TOOLS)/semconvgen: PACKAGE=go.opentelemetry.io/build-tools/semconvgen CROSSLINK = $(TOOLS)/crosslink $(TOOLS)/crosslink: PACKAGE=go.opentelemetry.io/build-tools/crosslink SEMCONVKIT = $(TOOLS)/semconvkit $(TOOLS)/semconvkit: PACKAGE=go.opentelemetry.io/otel/$(TOOLS_MOD_DIR)/semconvkit GOLANGCI_LINT = $(TOOLS)/golangci-lint $(TOOLS)/golangci-lint: PACKAGE=github.com/golangci/golangci-lint/cmd/golangci-lint MISSPELL = $(TOOLS)/misspell $(TOOLS)/misspell: PACKAGE=github.com/client9/misspell/cmd/misspell GOCOVMERGE = $(TOOLS)/gocovmerge $(TOOLS)/gocovmerge: PACKAGE=github.com/wadey/gocovmerge STRINGER = $(TOOLS)/stringer $(TOOLS)/stringer: PACKAGE=golang.org/x/tools/cmd/stringer PORTO = $(TOOLS)/porto $(TOOLS)/porto: PACKAGE=github.com/jcchavezs/porto/cmd/porto GOJQ = $(TOOLS)/gojq $(TOOLS)/gojq: PACKAGE=github.com/itchyny/gojq/cmd/gojq GOTMPL = $(TOOLS)/gotmpl $(GOTMPL): PACKAGE=go.opentelemetry.io/build-tools/gotmpl GORELEASE = $(TOOLS)/gorelease $(GORELEASE): PACKAGE=golang.org/x/exp/cmd/gorelease GOVULNCHECK = $(TOOLS)/govulncheck $(TOOLS)/govulncheck: PACKAGE=golang.org/x/vuln/cmd/govulncheck .PHONY: tools tools: $(CROSSLINK) $(GOLANGCI_LINT) $(MISSPELL) $(GOCOVMERGE) $(STRINGER) $(PORTO) $(GOJQ) $(SEMCONVGEN) $(MULTIMOD) $(SEMCONVKIT) $(GOTMPL) $(GORELEASE) # Virtualized python tools via docker # The directory where the virtual environment is created. VENVDIR := venv # The directory where the python tools are installed. PYTOOLS := $(VENVDIR)/bin # The pip executable in the virtual environment. PIP := $(PYTOOLS)/pip # The directory in the docker image where the current directory is mounted. WORKDIR := /workdir # The python image to use for the virtual environment. PYTHONIMAGE := python:3.11.3-slim-bullseye # Run the python image with the current directory mounted. DOCKERPY := docker run --rm -v "$(CURDIR):$(WORKDIR)" -w $(WORKDIR) $(PYTHONIMAGE) # Create a virtual environment for Python tools. $(PYTOOLS): # The `--upgrade` flag is needed to ensure that the virtual environment is # created with the latest pip version. @$(DOCKERPY) bash -c "python3 -m venv $(VENVDIR) && $(PIP) install --upgrade pip" # Install python packages into the virtual environment. $(PYTOOLS)/%: $(PYTOOLS) @$(DOCKERPY) $(PIP) install -r requirements.txt CODESPELL = $(PYTOOLS)/codespell $(CODESPELL): PACKAGE=codespell # Generate .PHONY: generate generate: go-generate vanity-import-fix .PHONY: go-generate go-generate: $(OTEL_GO_MOD_DIRS:%=go-generate/%) go-generate/%: DIR=$* go-generate/%: $(STRINGER) $(GOTMPL) @echo "$(GO) generate $(DIR)/..." \ && cd $(DIR) \ && PATH="$(TOOLS):$${PATH}" $(GO) generate ./... .PHONY: vanity-import-fix vanity-import-fix: $(PORTO) @$(PORTO) --include-internal -w . # Generate go.work file for local development. .PHONY: go-work go-work: $(CROSSLINK) $(CROSSLINK) work --root=$(shell pwd) # Build .PHONY: build build: $(OTEL_GO_MOD_DIRS:%=build/%) $(OTEL_GO_MOD_DIRS:%=build-tests/%) build/%: DIR=$* build/%: @echo "$(GO) build $(DIR)/..." \ && cd $(DIR) \ && $(GO) build ./... build-tests/%: DIR=$* build-tests/%: @echo "$(GO) build tests $(DIR)/..." \ && cd $(DIR) \ && $(GO) list ./... \ | grep -v third_party \ | xargs $(GO) test -vet=off -run xxxxxMatchNothingxxxxx >/dev/null # Tests TEST_TARGETS := test-default test-bench test-short test-verbose test-race .PHONY: $(TEST_TARGETS) test test-default test-race: ARGS=-race test-bench: ARGS=-run=xxxxxMatchNothingxxxxx -test.benchtime=1ms -bench=. test-short: ARGS=-short test-verbose: ARGS=-v -race $(TEST_TARGETS): test test: $(OTEL_GO_MOD_DIRS:%=test/%) test/%: DIR=$* test/%: @echo "$(GO) test -timeout $(TIMEOUT)s $(ARGS) $(DIR)/..." \ && cd $(DIR) \ && $(GO) list ./... \ | grep -v third_party \ | xargs $(GO) test -timeout $(TIMEOUT)s $(ARGS) COVERAGE_MODE = atomic COVERAGE_PROFILE = coverage.out .PHONY: test-coverage test-coverage: $(GOCOVMERGE) @set -e; \ printf "" > coverage.txt; \ for dir in $(ALL_COVERAGE_MOD_DIRS); do \ echo "$(GO) test -coverpkg=go.opentelemetry.io/otel/... -covermode=$(COVERAGE_MODE) -coverprofile="$(COVERAGE_PROFILE)" $${dir}/..."; \ (cd "$${dir}" && \ $(GO) list ./... \ | grep -v third_party \ | grep -v 'semconv/v.*' \ | xargs $(GO) test -coverpkg=./... -covermode=$(COVERAGE_MODE) -coverprofile="$(COVERAGE_PROFILE)" && \ $(GO) tool cover -html=coverage.out -o coverage.html); \ done; \ $(GOCOVMERGE) $$(find . -name coverage.out) > coverage.txt # Adding a directory will include all benchmarks in that directory if a filter is not specified. BENCHMARK_TARGETS := sdk/trace .PHONY: benchmark benchmark: $(BENCHMARK_TARGETS:%=benchmark/%) BENCHMARK_FILTER = . # You can override the filter for a particular directory by adding a rule here. benchmark/sdk/trace: BENCHMARK_FILTER = SpanWithAttributes_8/AlwaysSample benchmark/%: @echo "$(GO) test -timeout $(TIMEOUT)s -run=xxxxxMatchNothingxxxxx -bench=$(BENCHMARK_FILTER) $*..." \ && cd $* \ $(foreach filter, $(BENCHMARK_FILTER), && $(GO) test -timeout $(TIMEOUT)s -run=xxxxxMatchNothingxxxxx -bench=$(filter)) .PHONY: golangci-lint golangci-lint-fix golangci-lint-fix: ARGS=--fix golangci-lint-fix: golangci-lint golangci-lint: $(OTEL_GO_MOD_DIRS:%=golangci-lint/%) golangci-lint/%: DIR=$* golangci-lint/%: $(GOLANGCI_LINT) @echo 'golangci-lint $(if $(ARGS),$(ARGS) ,)$(DIR)' \ && cd $(DIR) \ && $(GOLANGCI_LINT) run --allow-serial-runners $(ARGS) .PHONY: crosslink crosslink: $(CROSSLINK) @echo "Updating intra-repository dependencies in all go modules" \ && $(CROSSLINK) --root=$(shell pwd) --prune .PHONY: go-mod-tidy go-mod-tidy: $(ALL_GO_MOD_DIRS:%=go-mod-tidy/%) go-mod-tidy/%: DIR=$* go-mod-tidy/%: crosslink @echo "$(GO) mod tidy in $(DIR)" \ && cd $(DIR) \ && $(GO) mod tidy -compat=1.21 .PHONY: lint-modules lint-modules: go-mod-tidy .PHONY: lint lint: misspell lint-modules golangci-lint govulncheck .PHONY: vanity-import-check vanity-import-check: $(PORTO) @$(PORTO) --include-internal -l . || ( echo "(run: make vanity-import-fix)"; exit 1 ) .PHONY: misspell misspell: $(MISSPELL) @$(MISSPELL) -w $(ALL_DOCS) .PHONY: govulncheck govulncheck: $(OTEL_GO_MOD_DIRS:%=govulncheck/%) govulncheck/%: DIR=$* govulncheck/%: $(GOVULNCHECK) @echo "govulncheck ./... in $(DIR)" \ && cd $(DIR) \ && $(GOVULNCHECK) ./... .PHONY: codespell codespell: $(CODESPELL) @$(DOCKERPY) $(CODESPELL) .PHONY: license-check license-check: @licRes=$$(for f in $$(find . -type f \( -iname '*.go' -o -iname '*.sh' \) ! -path '**/third_party/*' ! -path './.git/*' ) ; do \ awk '/Copyright The OpenTelemetry Authors|generated|GENERATED/ && NR<=4 { found=1; next } END { if (!found) print FILENAME }' $$f; \ done); \ if [ -n "$${licRes}" ]; then \ echo "license header checking failed:"; echo "$${licRes}"; \ exit 1; \ fi .PHONY: check-clean-work-tree check-clean-work-tree: @if ! git diff --quiet; then \ echo; \ echo 'Working tree is not clean, did you forget to run "make precommit"?'; \ echo; \ git status; \ exit 1; \ fi SEMCONVPKG ?= "semconv/" .PHONY: semconv-generate semconv-generate: $(SEMCONVGEN) $(SEMCONVKIT) [ "$(TAG)" ] || ( echo "TAG unset: missing opentelemetry semantic-conventions tag"; exit 1 ) [ "$(OTEL_SEMCONV_REPO)" ] || ( echo "OTEL_SEMCONV_REPO unset: missing path to opentelemetry semantic-conventions repo"; exit 1 ) $(SEMCONVGEN) -i "$(OTEL_SEMCONV_REPO)/model/." --only=attribute_group -p conventionType=trace -f attribute_group.go -t "$(SEMCONVPKG)/template.j2" -s "$(TAG)" $(SEMCONVGEN) -i "$(OTEL_SEMCONV_REPO)/model/." --only=metric -f metric.go -t "$(SEMCONVPKG)/metric_template.j2" -s "$(TAG)" $(SEMCONVKIT) -output "$(SEMCONVPKG)/$(TAG)" -tag "$(TAG)" .PHONY: gorelease gorelease: $(OTEL_GO_MOD_DIRS:%=gorelease/%) gorelease/%: DIR=$* gorelease/%:| $(GORELEASE) @echo "gorelease in $(DIR):" \ && cd $(DIR) \ && $(GORELEASE) \ || echo "" .PHONY: verify-mods verify-mods: $(MULTIMOD) $(MULTIMOD) verify .PHONY: prerelease prerelease: verify-mods @[ "${MODSET}" ] || ( echo ">> env var MODSET is not set"; exit 1 ) $(MULTIMOD) prerelease -m ${MODSET} COMMIT ?= "HEAD" .PHONY: add-tags add-tags: verify-mods @[ "${MODSET}" ] || ( echo ">> env var MODSET is not set"; exit 1 ) $(MULTIMOD) tag -m ${MODSET} -c ${COMMIT} .PHONY: lint-markdown lint-markdown: docker run -v "$(CURDIR):$(WORKDIR)" avtodev/markdown-lint:v1 -c $(WORKDIR)/.markdownlint.yaml $(WORKDIR)/**/*.md .PHONY: verify-readmes verify-readmes: ./verify_readmes.sh ================================================ FILE: vendor/go.opentelemetry.io/otel/README.md ================================================ # OpenTelemetry-Go [![CI](https://github.com/open-telemetry/opentelemetry-go/workflows/ci/badge.svg)](https://github.com/open-telemetry/opentelemetry-go/actions?query=workflow%3Aci+branch%3Amain) [![codecov.io](https://codecov.io/gh/open-telemetry/opentelemetry-go/coverage.svg?branch=main)](https://app.codecov.io/gh/open-telemetry/opentelemetry-go?branch=main) [![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel)](https://pkg.go.dev/go.opentelemetry.io/otel) [![Go Report Card](https://goreportcard.com/badge/go.opentelemetry.io/otel)](https://goreportcard.com/report/go.opentelemetry.io/otel) [![Slack](https://img.shields.io/badge/slack-@cncf/otel--go-brightgreen.svg?logo=slack)](https://cloud-native.slack.com/archives/C01NPAXACKT) OpenTelemetry-Go is the [Go](https://golang.org/) implementation of [OpenTelemetry](https://opentelemetry.io/). It provides a set of APIs to directly measure performance and behavior of your software and send this data to observability platforms. ## Project Status | Signal | Status | |---------|--------------------| | Traces | Stable | | Metrics | Stable | | Logs | Beta[^1] | Progress and status specific to this repository is tracked in our [project boards](https://github.com/open-telemetry/opentelemetry-go/projects) and [milestones](https://github.com/open-telemetry/opentelemetry-go/milestones). Project versioning information and stability guarantees can be found in the [versioning documentation](VERSIONING.md). [^1]: https://github.com/orgs/open-telemetry/projects/43 ### Compatibility OpenTelemetry-Go ensures compatibility with the current supported versions of the [Go language](https://golang.org/doc/devel/release#policy): > Each major Go release is supported until there are two newer major releases. > For example, Go 1.5 was supported until the Go 1.7 release, and Go 1.6 was supported until the Go 1.8 release. For versions of Go that are no longer supported upstream, opentelemetry-go will stop ensuring compatibility with these versions in the following manner: - A minor release of opentelemetry-go will be made to add support for the new supported release of Go. - The following minor release of opentelemetry-go will remove compatibility testing for the oldest (now archived upstream) version of Go. This, and future, releases of opentelemetry-go may include features only supported by the currently supported versions of Go. Currently, this project supports the following environments. | OS | Go Version | Architecture | |---------|------------|--------------| | Ubuntu | 1.22 | amd64 | | Ubuntu | 1.21 | amd64 | | Ubuntu | 1.22 | 386 | | Ubuntu | 1.21 | 386 | | Linux | 1.22 | arm64 | | Linux | 1.21 | arm64 | | MacOS | 1.22 | amd64 | | MacOS | 1.21 | amd64 | | Windows | 1.22 | amd64 | | Windows | 1.21 | amd64 | | Windows | 1.22 | 386 | | Windows | 1.21 | 386 | While this project should work for other systems, no compatibility guarantees are made for those systems currently. ## Getting Started You can find a getting started guide on [opentelemetry.io](https://opentelemetry.io/docs/languages/go/getting-started/). OpenTelemetry's goal is to provide a single set of APIs to capture distributed traces and metrics from your application and send them to an observability platform. This project allows you to do just that for applications written in Go. There are two steps to this process: instrument your application, and configure an exporter. ### Instrumentation To start capturing distributed traces and metric events from your application it first needs to be instrumented. The easiest way to do this is by using an instrumentation library for your code. Be sure to check out [the officially supported instrumentation libraries](https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/instrumentation). If you need to extend the telemetry an instrumentation library provides or want to build your own instrumentation for your application directly you will need to use the [Go otel](https://pkg.go.dev/go.opentelemetry.io/otel) package. The included [examples](./example/) are a good way to see some practical uses of this process. ### Export Now that your application is instrumented to collect telemetry, it needs an export pipeline to send that telemetry to an observability platform. All officially supported exporters for the OpenTelemetry project are contained in the [exporters directory](./exporters). | Exporter | Logs | Metrics | Traces | |---------------------------------------|:----:|:-------:|:------:| | [OTLP](./exporters/otlp/) | ✓ | ✓ | ✓ | | [Prometheus](./exporters/prometheus/) | | ✓ | | | [stdout](./exporters/stdout/) | ✓ | ✓ | ✓ | | [Zipkin](./exporters/zipkin/) | | | ✓ | ## Contributing See the [contributing documentation](CONTRIBUTING.md). ================================================ FILE: vendor/go.opentelemetry.io/otel/RELEASING.md ================================================ # Release Process ## Semantic Convention Generation New versions of the [OpenTelemetry Semantic Conventions] mean new versions of the `semconv` package need to be generated. The `semconv-generate` make target is used for this. 1. Checkout a local copy of the [OpenTelemetry Semantic Conventions] to the desired release tag. 2. Pull the latest `otel/semconvgen` image: `docker pull otel/semconvgen:latest` 3. Run the `make semconv-generate ...` target from this repository. For example, ```sh export TAG="v1.21.0" # Change to the release version you are generating. export OTEL_SEMCONV_REPO="/absolute/path/to/opentelemetry/semantic-conventions" docker pull otel/semconvgen:latest make semconv-generate # Uses the exported TAG and OTEL_SEMCONV_REPO. ``` This should create a new sub-package of [`semconv`](./semconv). Ensure things look correct before submitting a pull request to include the addition. ## Breaking changes validation You can run `make gorelease` that runs [gorelease](https://pkg.go.dev/golang.org/x/exp/cmd/gorelease) to ensure that there are no unwanted changes done in the public API. You can check/report problems with `gorelease` [here](https://golang.org/issues/26420). ## Verify changes for contrib repository If the changes in the main repository are going to affect the contrib repository, it is important to verify that the changes are compatible with the contrib repository. Follow [the steps](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/RELEASING.md#verify-otel-changes) in the contrib repository to verify OTel changes. ## Pre-Release First, decide which module sets will be released and update their versions in `versions.yaml`. Commit this change to a new branch. Update go.mod for submodules to depend on the new release which will happen in the next step. 1. Run the `prerelease` make target. It creates a branch `prerelease__` that will contain all release changes. ``` make prerelease MODSET= ``` 2. Verify the changes. ``` git diff ...prerelease__ ``` This should have changed the version for all modules to be ``. If these changes look correct, merge them into your pre-release branch: ```go git merge prerelease__ ``` 3. Update the [Changelog](./CHANGELOG.md). - Make sure all relevant changes for this release are included and are in language that non-contributors to the project can understand. To verify this, you can look directly at the commits since the ``. ``` git --no-pager log --pretty=oneline "..HEAD" ``` - Move all the `Unreleased` changes into a new section following the title scheme (`[] - `). - Update all the appropriate links at the bottom. 4. Push the changes to upstream and create a Pull Request on GitHub. Be sure to include the curated changes from the [Changelog](./CHANGELOG.md) in the description. ## Tag Once the Pull Request with all the version changes has been approved and merged it is time to tag the merged commit. ***IMPORTANT***: It is critical you use the same tag that you used in the Pre-Release step! Failure to do so will leave things in a broken state. As long as you do not change `versions.yaml` between pre-release and this step, things should be fine. ***IMPORTANT***: [There is currently no way to remove an incorrectly tagged version of a Go module](https://github.com/golang/go/issues/34189). It is critical you make sure the version you push upstream is correct. [Failure to do so will lead to minor emergencies and tough to work around](https://github.com/open-telemetry/opentelemetry-go/issues/331). 1. For each module set that will be released, run the `add-tags` make target using the `` of the commit on the main branch for the merged Pull Request. ``` make add-tags MODSET= COMMIT= ``` It should only be necessary to provide an explicit `COMMIT` value if the current `HEAD` of your working directory is not the correct commit. 2. Push tags to the upstream remote (not your fork: `github.com/open-telemetry/opentelemetry-go.git`). Make sure you push all sub-modules as well. ``` git push upstream git push upstream ... ``` ## Release Finally create a Release for the new `` on GitHub. The release body should include all the release notes from the Changelog for this release. ## Verify Examples After releasing verify that examples build outside of the repository. ``` ./verify_examples.sh ``` The script copies examples into a different directory removes any `replace` declarations in `go.mod` and builds them. This ensures they build with the published release, not the local copy. ## Post-Release ### Contrib Repository Once verified be sure to [make a release for the `contrib` repository](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/RELEASING.md) that uses this release. ### Website Documentation Update the [Go instrumentation documentation] in the OpenTelemetry website under [content/en/docs/languages/go]. Importantly, bump any package versions referenced to be the latest one you just released and ensure all code examples still compile and are accurate. [OpenTelemetry Semantic Conventions]: https://github.com/open-telemetry/semantic-conventions [Go instrumentation documentation]: https://opentelemetry.io/docs/languages/go/ [content/en/docs/languages/go]: https://github.com/open-telemetry/opentelemetry.io/tree/main/content/en/docs/languages/go ### Demo Repository Bump the dependencies in the following Go services: - [`accountingservice`](https://github.com/open-telemetry/opentelemetry-demo/tree/main/src/accountingservice) - [`checkoutservice`](https://github.com/open-telemetry/opentelemetry-demo/tree/main/src/checkoutservice) - [`productcatalogservice`](https://github.com/open-telemetry/opentelemetry-demo/tree/main/src/productcatalogservice) ================================================ FILE: vendor/go.opentelemetry.io/otel/VERSIONING.md ================================================ # Versioning This document describes the versioning policy for this repository. This policy is designed so the following goals can be achieved. **Users are provided a codebase of value that is stable and secure.** ## Policy * Versioning of this project will be idiomatic of a Go project using [Go modules](https://github.com/golang/go/wiki/Modules). * [Semantic import versioning](https://github.com/golang/go/wiki/Modules#semantic-import-versioning) will be used. * Versions will comply with [semver 2.0](https://semver.org/spec/v2.0.0.html) with the following exceptions. * New methods may be added to exported API interfaces. All exported interfaces that fall within this exception will include the following paragraph in their public documentation. > Warning: methods may be added to this interface in minor releases. * If a module is version `v2` or higher, the major version of the module must be included as a `/vN` at the end of the module paths used in `go.mod` files (e.g., `module go.opentelemetry.io/otel/v2`, `require go.opentelemetry.io/otel/v2 v2.0.1`) and in the package import path (e.g., `import "go.opentelemetry.io/otel/v2/trace"`). This includes the paths used in `go get` commands (e.g., `go get go.opentelemetry.io/otel/v2@v2.0.1`. Note there is both a `/v2` and a `@v2.0.1` in that example. One way to think about it is that the module name now includes the `/v2`, so include `/v2` whenever you are using the module name). * If a module is version `v0` or `v1`, do not include the major version in either the module path or the import path. * Modules will be used to encapsulate signals and components. * Experimental modules still under active development will be versioned at `v0` to imply the stability guarantee defined by [semver](https://semver.org/spec/v2.0.0.html#spec-item-4). > Major version zero (0.y.z) is for initial development. Anything MAY > change at any time. The public API SHOULD NOT be considered stable. * Mature modules for which we guarantee a stable public API will be versioned with a major version greater than `v0`. * The decision to make a module stable will be made on a case-by-case basis by the maintainers of this project. * Experimental modules will start their versioning at `v0.0.0` and will increment their minor version when backwards incompatible changes are released and increment their patch version when backwards compatible changes are released. * All stable modules that use the same major version number will use the same entire version number. * Stable modules may be released with an incremented minor or patch version even though that module has not been changed, but rather so that it will remain at the same version as other stable modules that did undergo change. * When an experimental module becomes stable a new stable module version will be released and will include this now stable module. The new stable module version will be an increment of the minor version number and will be applied to all existing stable modules as well as the newly stable module being released. * Versioning of the associated [contrib repository](https://github.com/open-telemetry/opentelemetry-go-contrib) of this project will be idiomatic of a Go project using [Go modules](https://github.com/golang/go/wiki/Modules). * [Semantic import versioning](https://github.com/golang/go/wiki/Modules#semantic-import-versioning) will be used. * Versions will comply with [semver 2.0](https://semver.org/spec/v2.0.0.html). * If a module is version `v2` or higher, the major version of the module must be included as a `/vN` at the end of the module paths used in `go.mod` files (e.g., `module go.opentelemetry.io/contrib/instrumentation/host/v2`, `require go.opentelemetry.io/contrib/instrumentation/host/v2 v2.0.1`) and in the package import path (e.g., `import "go.opentelemetry.io/contrib/instrumentation/host/v2"`). This includes the paths used in `go get` commands (e.g., `go get go.opentelemetry.io/contrib/instrumentation/host/v2@v2.0.1`. Note there is both a `/v2` and a `@v2.0.1` in that example. One way to think about it is that the module name now includes the `/v2`, so include `/v2` whenever you are using the module name). * If a module is version `v0` or `v1`, do not include the major version in either the module path or the import path. * In addition to public APIs, telemetry produced by stable instrumentation will remain stable and backwards compatible. This is to avoid breaking alerts and dashboard. * Modules will be used to encapsulate instrumentation, detectors, exporters, propagators, and any other independent sets of related components. * Experimental modules still under active development will be versioned at `v0` to imply the stability guarantee defined by [semver](https://semver.org/spec/v2.0.0.html#spec-item-4). > Major version zero (0.y.z) is for initial development. Anything MAY > change at any time. The public API SHOULD NOT be considered stable. * Mature modules for which we guarantee a stable public API and telemetry will be versioned with a major version greater than `v0`. * Experimental modules will start their versioning at `v0.0.0` and will increment their minor version when backwards incompatible changes are released and increment their patch version when backwards compatible changes are released. * Stable contrib modules cannot depend on experimental modules from this project. * All stable contrib modules of the same major version with this project will use the same entire version as this project. * Stable modules may be released with an incremented minor or patch version even though that module's code has not been changed. Instead the only change that will have been included is to have updated that modules dependency on this project's stable APIs. * When an experimental module in contrib becomes stable a new stable module version will be released and will include this now stable module. The new stable module version will be an increment of the minor version number and will be applied to all existing stable contrib modules, this project's modules, and the newly stable module being released. * Contrib modules will be kept up to date with this project's releases. * Due to the dependency contrib modules will implicitly have on this project's modules the release of stable contrib modules to match the released version number will be staggered after this project's release. There is no explicit time guarantee for how long after this projects release the contrib release will be. Effort should be made to keep them as close in time as possible. * No additional stable release in this project can be made until the contrib repository has a matching stable release. * No release can be made in the contrib repository after this project's stable release except for a stable release of the contrib repository. * GitHub releases will be made for all releases. * Go modules will be made available at Go package mirrors. ## Example Versioning Lifecycle To better understand the implementation of the above policy the following example is provided. This project is simplified to include only the following modules and their versions: * `otel`: `v0.14.0` * `otel/trace`: `v0.14.0` * `otel/metric`: `v0.14.0` * `otel/baggage`: `v0.14.0` * `otel/sdk/trace`: `v0.14.0` * `otel/sdk/metric`: `v0.14.0` These modules have been developed to a point where the `otel/trace`, `otel/baggage`, and `otel/sdk/trace` modules have reached a point that they should be considered for a stable release. The `otel/metric` and `otel/sdk/metric` are still under active development and the `otel` module depends on both `otel/trace` and `otel/metric`. The `otel` package is refactored to remove its dependencies on `otel/metric` so it can be released as stable as well. With that done the following release candidates are made: * `otel`: `v1.0.0-RC1` * `otel/trace`: `v1.0.0-RC1` * `otel/baggage`: `v1.0.0-RC1` * `otel/sdk/trace`: `v1.0.0-RC1` The `otel/metric` and `otel/sdk/metric` modules remain at `v0.14.0`. A few minor issues are discovered in the `otel/trace` package. These issues are resolved with some minor, but backwards incompatible, changes and are released as a second release candidate: * `otel`: `v1.0.0-RC2` * `otel/trace`: `v1.0.0-RC2` * `otel/baggage`: `v1.0.0-RC2` * `otel/sdk/trace`: `v1.0.0-RC2` Notice that all module version numbers are incremented to adhere to our versioning policy. After these release candidates have been evaluated to satisfaction, they are released as version `v1.0.0`. * `otel`: `v1.0.0` * `otel/trace`: `v1.0.0` * `otel/baggage`: `v1.0.0` * `otel/sdk/trace`: `v1.0.0` Since both the `go` utility and the Go module system support [the semantic versioning definition of precedence](https://semver.org/spec/v2.0.0.html#spec-item-11), this release will correctly be interpreted as the successor to the previous release candidates. Active development of this project continues. The `otel/metric` module now has backwards incompatible changes to its API that need to be released and the `otel/baggage` module has a minor bug fix that needs to be released. The following release is made: * `otel`: `v1.0.1` * `otel/trace`: `v1.0.1` * `otel/metric`: `v0.15.0` * `otel/baggage`: `v1.0.1` * `otel/sdk/trace`: `v1.0.1` * `otel/sdk/metric`: `v0.15.0` Notice that, again, all stable module versions are incremented in unison and the `otel/sdk/metric` package, which depends on the `otel/metric` package, also bumped its version. This bump of the `otel/sdk/metric` package makes sense given their coupling, though it is not explicitly required by our versioning policy. As we progress, the `otel/metric` and `otel/sdk/metric` packages have reached a point where they should be evaluated for stability. The `otel` module is reintegrated with the `otel/metric` package and the following release is made: * `otel`: `v1.1.0-RC1` * `otel/trace`: `v1.1.0-RC1` * `otel/metric`: `v1.1.0-RC1` * `otel/baggage`: `v1.1.0-RC1` * `otel/sdk/trace`: `v1.1.0-RC1` * `otel/sdk/metric`: `v1.1.0-RC1` All the modules are evaluated and determined to a viable stable release. They are then released as version `v1.1.0` (the minor version is incremented to indicate the addition of new signal). * `otel`: `v1.1.0` * `otel/trace`: `v1.1.0` * `otel/metric`: `v1.1.0` * `otel/baggage`: `v1.1.0` * `otel/sdk/trace`: `v1.1.0` * `otel/sdk/metric`: `v1.1.0` ================================================ FILE: vendor/go.opentelemetry.io/otel/attribute/README.md ================================================ # Attribute [![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/attribute)](https://pkg.go.dev/go.opentelemetry.io/otel/attribute) ================================================ FILE: vendor/go.opentelemetry.io/otel/attribute/doc.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 // Package attribute provides key and value attributes. package attribute // import "go.opentelemetry.io/otel/attribute" ================================================ FILE: vendor/go.opentelemetry.io/otel/attribute/encoder.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package attribute // import "go.opentelemetry.io/otel/attribute" import ( "bytes" "sync" "sync/atomic" ) type ( // Encoder is a mechanism for serializing an attribute set into a specific // string representation that supports caching, to avoid repeated // serialization. An example could be an exporter encoding the attribute // set into a wire representation. Encoder interface { // Encode returns the serialized encoding of the attribute set using // its Iterator. This result may be cached by a attribute.Set. Encode(iterator Iterator) string // ID returns a value that is unique for each class of attribute // encoder. Attribute encoders allocate these using `NewEncoderID`. ID() EncoderID } // EncoderID is used to identify distinct Encoder // implementations, for caching encoded results. EncoderID struct { value uint64 } // defaultAttrEncoder uses a sync.Pool of buffers to reduce the number of // allocations used in encoding attributes. This implementation encodes a // comma-separated list of key=value, with '/'-escaping of '=', ',', and // '\'. defaultAttrEncoder struct { // pool is a pool of attribute set builders. The buffers in this pool // grow to a size that most attribute encodings will not allocate new // memory. pool sync.Pool // *bytes.Buffer } ) // escapeChar is used to ensure uniqueness of the attribute encoding where // keys or values contain either '=' or ','. Since there is no parser needed // for this encoding and its only requirement is to be unique, this choice is // arbitrary. Users will see these in some exporters (e.g., stdout), so the // backslash ('\') is used as a conventional choice. const escapeChar = '\\' var ( _ Encoder = &defaultAttrEncoder{} // encoderIDCounter is for generating IDs for other attribute encoders. encoderIDCounter uint64 defaultEncoderOnce sync.Once defaultEncoderID = NewEncoderID() defaultEncoderInstance *defaultAttrEncoder ) // NewEncoderID returns a unique attribute encoder ID. It should be called // once per each type of attribute encoder. Preferably in init() or in var // definition. func NewEncoderID() EncoderID { return EncoderID{value: atomic.AddUint64(&encoderIDCounter, 1)} } // DefaultEncoder returns an attribute encoder that encodes attributes in such // a way that each escaped attribute's key is followed by an equal sign and // then by an escaped attribute's value. All key-value pairs are separated by // a comma. // // Escaping is done by prepending a backslash before either a backslash, equal // sign or a comma. func DefaultEncoder() Encoder { defaultEncoderOnce.Do(func() { defaultEncoderInstance = &defaultAttrEncoder{ pool: sync.Pool{ New: func() interface{} { return &bytes.Buffer{} }, }, } }) return defaultEncoderInstance } // Encode is a part of an implementation of the AttributeEncoder interface. func (d *defaultAttrEncoder) Encode(iter Iterator) string { buf := d.pool.Get().(*bytes.Buffer) defer d.pool.Put(buf) buf.Reset() for iter.Next() { i, keyValue := iter.IndexedAttribute() if i > 0 { _, _ = buf.WriteRune(',') } copyAndEscape(buf, string(keyValue.Key)) _, _ = buf.WriteRune('=') if keyValue.Value.Type() == STRING { copyAndEscape(buf, keyValue.Value.AsString()) } else { _, _ = buf.WriteString(keyValue.Value.Emit()) } } return buf.String() } // ID is a part of an implementation of the AttributeEncoder interface. func (*defaultAttrEncoder) ID() EncoderID { return defaultEncoderID } // copyAndEscape escapes `=`, `,` and its own escape character (`\`), // making the default encoding unique. func copyAndEscape(buf *bytes.Buffer, val string) { for _, ch := range val { switch ch { case '=', ',', escapeChar: _, _ = buf.WriteRune(escapeChar) } _, _ = buf.WriteRune(ch) } } // Valid returns true if this encoder ID was allocated by // `NewEncoderID`. Invalid encoder IDs will not be cached. func (id EncoderID) Valid() bool { return id.value != 0 } ================================================ FILE: vendor/go.opentelemetry.io/otel/attribute/filter.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package attribute // import "go.opentelemetry.io/otel/attribute" // Filter supports removing certain attributes from attribute sets. When // the filter returns true, the attribute will be kept in the filtered // attribute set. When the filter returns false, the attribute is excluded // from the filtered attribute set, and the attribute instead appears in // the removed list of excluded attributes. type Filter func(KeyValue) bool // NewAllowKeysFilter returns a Filter that only allows attributes with one of // the provided keys. // // If keys is empty a deny-all filter is returned. func NewAllowKeysFilter(keys ...Key) Filter { if len(keys) <= 0 { return func(kv KeyValue) bool { return false } } allowed := make(map[Key]struct{}) for _, k := range keys { allowed[k] = struct{}{} } return func(kv KeyValue) bool { _, ok := allowed[kv.Key] return ok } } // NewDenyKeysFilter returns a Filter that only allows attributes // that do not have one of the provided keys. // // If keys is empty an allow-all filter is returned. func NewDenyKeysFilter(keys ...Key) Filter { if len(keys) <= 0 { return func(kv KeyValue) bool { return true } } forbid := make(map[Key]struct{}) for _, k := range keys { forbid[k] = struct{}{} } return func(kv KeyValue) bool { _, ok := forbid[kv.Key] return !ok } } ================================================ FILE: vendor/go.opentelemetry.io/otel/attribute/iterator.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package attribute // import "go.opentelemetry.io/otel/attribute" // Iterator allows iterating over the set of attributes in order, sorted by // key. type Iterator struct { storage *Set idx int } // MergeIterator supports iterating over two sets of attributes while // eliminating duplicate values from the combined set. The first iterator // value takes precedence. type MergeIterator struct { one oneIterator two oneIterator current KeyValue } type oneIterator struct { iter Iterator done bool attr KeyValue } // Next moves the iterator to the next position. Returns false if there are no // more attributes. func (i *Iterator) Next() bool { i.idx++ return i.idx < i.Len() } // Label returns current KeyValue. Must be called only after Next returns // true. // // Deprecated: Use Attribute instead. func (i *Iterator) Label() KeyValue { return i.Attribute() } // Attribute returns the current KeyValue of the Iterator. It must be called // only after Next returns true. func (i *Iterator) Attribute() KeyValue { kv, _ := i.storage.Get(i.idx) return kv } // IndexedLabel returns current index and attribute. Must be called only // after Next returns true. // // Deprecated: Use IndexedAttribute instead. func (i *Iterator) IndexedLabel() (int, KeyValue) { return i.idx, i.Attribute() } // IndexedAttribute returns current index and attribute. Must be called only // after Next returns true. func (i *Iterator) IndexedAttribute() (int, KeyValue) { return i.idx, i.Attribute() } // Len returns a number of attributes in the iterated set. func (i *Iterator) Len() int { return i.storage.Len() } // ToSlice is a convenience function that creates a slice of attributes from // the passed iterator. The iterator is set up to start from the beginning // before creating the slice. func (i *Iterator) ToSlice() []KeyValue { l := i.Len() if l == 0 { return nil } i.idx = -1 slice := make([]KeyValue, 0, l) for i.Next() { slice = append(slice, i.Attribute()) } return slice } // NewMergeIterator returns a MergeIterator for merging two attribute sets. // Duplicates are resolved by taking the value from the first set. func NewMergeIterator(s1, s2 *Set) MergeIterator { mi := MergeIterator{ one: makeOne(s1.Iter()), two: makeOne(s2.Iter()), } return mi } func makeOne(iter Iterator) oneIterator { oi := oneIterator{ iter: iter, } oi.advance() return oi } func (oi *oneIterator) advance() { if oi.done = !oi.iter.Next(); !oi.done { oi.attr = oi.iter.Attribute() } } // Next returns true if there is another attribute available. func (m *MergeIterator) Next() bool { if m.one.done && m.two.done { return false } if m.one.done { m.current = m.two.attr m.two.advance() return true } if m.two.done { m.current = m.one.attr m.one.advance() return true } if m.one.attr.Key == m.two.attr.Key { m.current = m.one.attr // first iterator attribute value wins m.one.advance() m.two.advance() return true } if m.one.attr.Key < m.two.attr.Key { m.current = m.one.attr m.one.advance() return true } m.current = m.two.attr m.two.advance() return true } // Label returns the current value after Next() returns true. // // Deprecated: Use Attribute instead. func (m *MergeIterator) Label() KeyValue { return m.current } // Attribute returns the current value after Next() returns true. func (m *MergeIterator) Attribute() KeyValue { return m.current } ================================================ FILE: vendor/go.opentelemetry.io/otel/attribute/key.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package attribute // import "go.opentelemetry.io/otel/attribute" // Key represents the key part in key-value pairs. It's a string. The // allowed character set in the key depends on the use of the key. type Key string // Bool creates a KeyValue instance with a BOOL Value. // // If creating both a key and value at the same time, use the provided // convenience function instead -- Bool(name, value). func (k Key) Bool(v bool) KeyValue { return KeyValue{ Key: k, Value: BoolValue(v), } } // BoolSlice creates a KeyValue instance with a BOOLSLICE Value. // // If creating both a key and value at the same time, use the provided // convenience function instead -- BoolSlice(name, value). func (k Key) BoolSlice(v []bool) KeyValue { return KeyValue{ Key: k, Value: BoolSliceValue(v), } } // Int creates a KeyValue instance with an INT64 Value. // // If creating both a key and value at the same time, use the provided // convenience function instead -- Int(name, value). func (k Key) Int(v int) KeyValue { return KeyValue{ Key: k, Value: IntValue(v), } } // IntSlice creates a KeyValue instance with an INT64SLICE Value. // // If creating both a key and value at the same time, use the provided // convenience function instead -- IntSlice(name, value). func (k Key) IntSlice(v []int) KeyValue { return KeyValue{ Key: k, Value: IntSliceValue(v), } } // Int64 creates a KeyValue instance with an INT64 Value. // // If creating both a key and value at the same time, use the provided // convenience function instead -- Int64(name, value). func (k Key) Int64(v int64) KeyValue { return KeyValue{ Key: k, Value: Int64Value(v), } } // Int64Slice creates a KeyValue instance with an INT64SLICE Value. // // If creating both a key and value at the same time, use the provided // convenience function instead -- Int64Slice(name, value). func (k Key) Int64Slice(v []int64) KeyValue { return KeyValue{ Key: k, Value: Int64SliceValue(v), } } // Float64 creates a KeyValue instance with a FLOAT64 Value. // // If creating both a key and value at the same time, use the provided // convenience function instead -- Float64(name, value). func (k Key) Float64(v float64) KeyValue { return KeyValue{ Key: k, Value: Float64Value(v), } } // Float64Slice creates a KeyValue instance with a FLOAT64SLICE Value. // // If creating both a key and value at the same time, use the provided // convenience function instead -- Float64(name, value). func (k Key) Float64Slice(v []float64) KeyValue { return KeyValue{ Key: k, Value: Float64SliceValue(v), } } // String creates a KeyValue instance with a STRING Value. // // If creating both a key and value at the same time, use the provided // convenience function instead -- String(name, value). func (k Key) String(v string) KeyValue { return KeyValue{ Key: k, Value: StringValue(v), } } // StringSlice creates a KeyValue instance with a STRINGSLICE Value. // // If creating both a key and value at the same time, use the provided // convenience function instead -- StringSlice(name, value). func (k Key) StringSlice(v []string) KeyValue { return KeyValue{ Key: k, Value: StringSliceValue(v), } } // Defined returns true for non-empty keys. func (k Key) Defined() bool { return len(k) != 0 } ================================================ FILE: vendor/go.opentelemetry.io/otel/attribute/kv.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package attribute // import "go.opentelemetry.io/otel/attribute" import ( "fmt" ) // KeyValue holds a key and value pair. type KeyValue struct { Key Key Value Value } // Valid returns if kv is a valid OpenTelemetry attribute. func (kv KeyValue) Valid() bool { return kv.Key.Defined() && kv.Value.Type() != INVALID } // Bool creates a KeyValue with a BOOL Value type. func Bool(k string, v bool) KeyValue { return Key(k).Bool(v) } // BoolSlice creates a KeyValue with a BOOLSLICE Value type. func BoolSlice(k string, v []bool) KeyValue { return Key(k).BoolSlice(v) } // Int creates a KeyValue with an INT64 Value type. func Int(k string, v int) KeyValue { return Key(k).Int(v) } // IntSlice creates a KeyValue with an INT64SLICE Value type. func IntSlice(k string, v []int) KeyValue { return Key(k).IntSlice(v) } // Int64 creates a KeyValue with an INT64 Value type. func Int64(k string, v int64) KeyValue { return Key(k).Int64(v) } // Int64Slice creates a KeyValue with an INT64SLICE Value type. func Int64Slice(k string, v []int64) KeyValue { return Key(k).Int64Slice(v) } // Float64 creates a KeyValue with a FLOAT64 Value type. func Float64(k string, v float64) KeyValue { return Key(k).Float64(v) } // Float64Slice creates a KeyValue with a FLOAT64SLICE Value type. func Float64Slice(k string, v []float64) KeyValue { return Key(k).Float64Slice(v) } // String creates a KeyValue with a STRING Value type. func String(k, v string) KeyValue { return Key(k).String(v) } // StringSlice creates a KeyValue with a STRINGSLICE Value type. func StringSlice(k string, v []string) KeyValue { return Key(k).StringSlice(v) } // Stringer creates a new key-value pair with a passed name and a string // value generated by the passed Stringer interface. func Stringer(k string, v fmt.Stringer) KeyValue { return Key(k).String(v.String()) } ================================================ FILE: vendor/go.opentelemetry.io/otel/attribute/set.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package attribute // import "go.opentelemetry.io/otel/attribute" import ( "cmp" "encoding/json" "reflect" "slices" "sort" ) type ( // Set is the representation for a distinct attribute set. It manages an // immutable set of attributes, with an internal cache for storing // attribute encodings. // // This type will remain comparable for backwards compatibility. The // equivalence of Sets across versions is not guaranteed to be stable. // Prior versions may find two Sets to be equal or not when compared // directly (i.e. ==), but subsequent versions may not. Users should use // the Equals method to ensure stable equivalence checking. // // Users should also use the Distinct returned from Equivalent as a map key // instead of a Set directly. In addition to that type providing guarantees // on stable equivalence, it may also provide performance improvements. Set struct { equivalent Distinct } // Distinct is a unique identifier of a Set. // // Distinct is designed to be ensures equivalence stability: comparisons // will return the save value across versions. For this reason, Distinct // should always be used as a map key instead of a Set. Distinct struct { iface interface{} } // Sortable implements sort.Interface, used for sorting KeyValue. // // Deprecated: This type is no longer used. It was added as a performance // optimization for Go < 1.21 that is no longer needed (Go < 1.21 is no // longer supported by the module). Sortable []KeyValue ) var ( // keyValueType is used in computeDistinctReflect. keyValueType = reflect.TypeOf(KeyValue{}) // emptySet is returned for empty attribute sets. emptySet = &Set{ equivalent: Distinct{ iface: [0]KeyValue{}, }, } ) // EmptySet returns a reference to a Set with no elements. // // This is a convenience provided for optimized calling utility. func EmptySet() *Set { return emptySet } // reflectValue abbreviates reflect.ValueOf(d). func (d Distinct) reflectValue() reflect.Value { return reflect.ValueOf(d.iface) } // Valid returns true if this value refers to a valid Set. func (d Distinct) Valid() bool { return d.iface != nil } // Len returns the number of attributes in this set. func (l *Set) Len() int { if l == nil || !l.equivalent.Valid() { return 0 } return l.equivalent.reflectValue().Len() } // Get returns the KeyValue at ordered position idx in this set. func (l *Set) Get(idx int) (KeyValue, bool) { if l == nil || !l.equivalent.Valid() { return KeyValue{}, false } value := l.equivalent.reflectValue() if idx >= 0 && idx < value.Len() { // Note: The Go compiler successfully avoids an allocation for // the interface{} conversion here: return value.Index(idx).Interface().(KeyValue), true } return KeyValue{}, false } // Value returns the value of a specified key in this set. func (l *Set) Value(k Key) (Value, bool) { if l == nil || !l.equivalent.Valid() { return Value{}, false } rValue := l.equivalent.reflectValue() vlen := rValue.Len() idx := sort.Search(vlen, func(idx int) bool { return rValue.Index(idx).Interface().(KeyValue).Key >= k }) if idx >= vlen { return Value{}, false } keyValue := rValue.Index(idx).Interface().(KeyValue) if k == keyValue.Key { return keyValue.Value, true } return Value{}, false } // HasValue tests whether a key is defined in this set. func (l *Set) HasValue(k Key) bool { if l == nil { return false } _, ok := l.Value(k) return ok } // Iter returns an iterator for visiting the attributes in this set. func (l *Set) Iter() Iterator { return Iterator{ storage: l, idx: -1, } } // ToSlice returns the set of attributes belonging to this set, sorted, where // keys appear no more than once. func (l *Set) ToSlice() []KeyValue { iter := l.Iter() return iter.ToSlice() } // Equivalent returns a value that may be used as a map key. The Distinct type // guarantees that the result will equal the equivalent. Distinct value of any // attribute set with the same elements as this, where sets are made unique by // choosing the last value in the input for any given key. func (l *Set) Equivalent() Distinct { if l == nil || !l.equivalent.Valid() { return emptySet.equivalent } return l.equivalent } // Equals returns true if the argument set is equivalent to this set. func (l *Set) Equals(o *Set) bool { return l.Equivalent() == o.Equivalent() } // Encoded returns the encoded form of this set, according to encoder. func (l *Set) Encoded(encoder Encoder) string { if l == nil || encoder == nil { return "" } return encoder.Encode(l.Iter()) } func empty() Set { return Set{ equivalent: emptySet.equivalent, } } // NewSet returns a new Set. See the documentation for // NewSetWithSortableFiltered for more details. // // Except for empty sets, this method adds an additional allocation compared // with calls that include a Sortable. func NewSet(kvs ...KeyValue) Set { s, _ := NewSetWithFiltered(kvs, nil) return s } // NewSetWithSortable returns a new Set. See the documentation for // NewSetWithSortableFiltered for more details. // // This call includes a Sortable option as a memory optimization. // // Deprecated: Use [NewSet] instead. func NewSetWithSortable(kvs []KeyValue, _ *Sortable) Set { s, _ := NewSetWithFiltered(kvs, nil) return s } // NewSetWithFiltered returns a new Set. See the documentation for // NewSetWithSortableFiltered for more details. // // This call includes a Filter to include/exclude attribute keys from the // return value. Excluded keys are returned as a slice of attribute values. func NewSetWithFiltered(kvs []KeyValue, filter Filter) (Set, []KeyValue) { // Check for empty set. if len(kvs) == 0 { return empty(), nil } // Stable sort so the following de-duplication can implement // last-value-wins semantics. slices.SortStableFunc(kvs, func(a, b KeyValue) int { return cmp.Compare(a.Key, b.Key) }) position := len(kvs) - 1 offset := position - 1 // The requirements stated above require that the stable // result be placed in the end of the input slice, while // overwritten values are swapped to the beginning. // // De-duplicate with last-value-wins semantics. Preserve // duplicate values at the beginning of the input slice. for ; offset >= 0; offset-- { if kvs[offset].Key == kvs[position].Key { continue } position-- kvs[offset], kvs[position] = kvs[position], kvs[offset] } kvs = kvs[position:] if filter != nil { if div := filteredToFront(kvs, filter); div != 0 { return Set{equivalent: computeDistinct(kvs[div:])}, kvs[:div] } } return Set{equivalent: computeDistinct(kvs)}, nil } // NewSetWithSortableFiltered returns a new Set. // // Duplicate keys are eliminated by taking the last value. This // re-orders the input slice so that unique last-values are contiguous // at the end of the slice. // // This ensures the following: // // - Last-value-wins semantics // - Caller sees the reordering, but doesn't lose values // - Repeated call preserve last-value wins. // // Note that methods are defined on Set, although this returns Set. Callers // can avoid memory allocations by: // // - allocating a Sortable for use as a temporary in this method // - allocating a Set for storing the return value of this constructor. // // The result maintains a cache of encoded attributes, by attribute.EncoderID. // This value should not be copied after its first use. // // The second []KeyValue return value is a list of attributes that were // excluded by the Filter (if non-nil). // // Deprecated: Use [NewSetWithFiltered] instead. func NewSetWithSortableFiltered(kvs []KeyValue, _ *Sortable, filter Filter) (Set, []KeyValue) { return NewSetWithFiltered(kvs, filter) } // filteredToFront filters slice in-place using keep function. All KeyValues that need to // be removed are moved to the front. All KeyValues that need to be kept are // moved (in-order) to the back. The index for the first KeyValue to be kept is // returned. func filteredToFront(slice []KeyValue, keep Filter) int { n := len(slice) j := n for i := n - 1; i >= 0; i-- { if keep(slice[i]) { j-- slice[i], slice[j] = slice[j], slice[i] } } return j } // Filter returns a filtered copy of this Set. See the documentation for // NewSetWithSortableFiltered for more details. func (l *Set) Filter(re Filter) (Set, []KeyValue) { if re == nil { return *l, nil } // Iterate in reverse to the first attribute that will be filtered out. n := l.Len() first := n - 1 for ; first >= 0; first-- { kv, _ := l.Get(first) if !re(kv) { break } } // No attributes will be dropped, return the immutable Set l and nil. if first < 0 { return *l, nil } // Copy now that we know we need to return a modified set. // // Do not do this in-place on the underlying storage of *Set l. Sets are // immutable and filtering should not change this. slice := l.ToSlice() // Don't re-iterate the slice if only slice[0] is filtered. if first == 0 { // It is safe to assume len(slice) >= 1 given we found at least one // attribute above that needs to be filtered out. return Set{equivalent: computeDistinct(slice[1:])}, slice[:1] } // Move the filtered slice[first] to the front (preserving order). kv := slice[first] copy(slice[1:first+1], slice[:first]) slice[0] = kv // Do not re-evaluate re(slice[first+1:]). div := filteredToFront(slice[1:first+1], re) + 1 return Set{equivalent: computeDistinct(slice[div:])}, slice[:div] } // computeDistinct returns a Distinct using either the fixed- or // reflect-oriented code path, depending on the size of the input. The input // slice is assumed to already be sorted and de-duplicated. func computeDistinct(kvs []KeyValue) Distinct { iface := computeDistinctFixed(kvs) if iface == nil { iface = computeDistinctReflect(kvs) } return Distinct{ iface: iface, } } // computeDistinctFixed computes a Distinct for small slices. It returns nil // if the input is too large for this code path. func computeDistinctFixed(kvs []KeyValue) interface{} { switch len(kvs) { case 1: ptr := new([1]KeyValue) copy((*ptr)[:], kvs) return *ptr case 2: ptr := new([2]KeyValue) copy((*ptr)[:], kvs) return *ptr case 3: ptr := new([3]KeyValue) copy((*ptr)[:], kvs) return *ptr case 4: ptr := new([4]KeyValue) copy((*ptr)[:], kvs) return *ptr case 5: ptr := new([5]KeyValue) copy((*ptr)[:], kvs) return *ptr case 6: ptr := new([6]KeyValue) copy((*ptr)[:], kvs) return *ptr case 7: ptr := new([7]KeyValue) copy((*ptr)[:], kvs) return *ptr case 8: ptr := new([8]KeyValue) copy((*ptr)[:], kvs) return *ptr case 9: ptr := new([9]KeyValue) copy((*ptr)[:], kvs) return *ptr case 10: ptr := new([10]KeyValue) copy((*ptr)[:], kvs) return *ptr default: return nil } } // computeDistinctReflect computes a Distinct using reflection, works for any // size input. func computeDistinctReflect(kvs []KeyValue) interface{} { at := reflect.New(reflect.ArrayOf(len(kvs), keyValueType)).Elem() for i, keyValue := range kvs { *(at.Index(i).Addr().Interface().(*KeyValue)) = keyValue } return at.Interface() } // MarshalJSON returns the JSON encoding of the Set. func (l *Set) MarshalJSON() ([]byte, error) { return json.Marshal(l.equivalent.iface) } // MarshalLog is the marshaling function used by the logging system to represent this Set. func (l Set) MarshalLog() interface{} { kvs := make(map[string]string) for _, kv := range l.ToSlice() { kvs[string(kv.Key)] = kv.Value.Emit() } return kvs } // Len implements sort.Interface. func (l *Sortable) Len() int { return len(*l) } // Swap implements sort.Interface. func (l *Sortable) Swap(i, j int) { (*l)[i], (*l)[j] = (*l)[j], (*l)[i] } // Less implements sort.Interface. func (l *Sortable) Less(i, j int) bool { return (*l)[i].Key < (*l)[j].Key } ================================================ FILE: vendor/go.opentelemetry.io/otel/attribute/type_string.go ================================================ // Code generated by "stringer -type=Type"; DO NOT EDIT. package attribute import "strconv" func _() { // An "invalid array index" compiler error signifies that the constant values have changed. // Re-run the stringer command to generate them again. var x [1]struct{} _ = x[INVALID-0] _ = x[BOOL-1] _ = x[INT64-2] _ = x[FLOAT64-3] _ = x[STRING-4] _ = x[BOOLSLICE-5] _ = x[INT64SLICE-6] _ = x[FLOAT64SLICE-7] _ = x[STRINGSLICE-8] } const _Type_name = "INVALIDBOOLINT64FLOAT64STRINGBOOLSLICEINT64SLICEFLOAT64SLICESTRINGSLICE" var _Type_index = [...]uint8{0, 7, 11, 16, 23, 29, 38, 48, 60, 71} func (i Type) String() string { if i < 0 || i >= Type(len(_Type_index)-1) { return "Type(" + strconv.FormatInt(int64(i), 10) + ")" } return _Type_name[_Type_index[i]:_Type_index[i+1]] } ================================================ FILE: vendor/go.opentelemetry.io/otel/attribute/value.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package attribute // import "go.opentelemetry.io/otel/attribute" import ( "encoding/json" "fmt" "reflect" "strconv" "go.opentelemetry.io/otel/internal" "go.opentelemetry.io/otel/internal/attribute" ) //go:generate stringer -type=Type // Type describes the type of the data Value holds. type Type int // nolint: revive // redefines builtin Type. // Value represents the value part in key-value pairs. type Value struct { vtype Type numeric uint64 stringly string slice interface{} } const ( // INVALID is used for a Value with no value set. INVALID Type = iota // BOOL is a boolean Type Value. BOOL // INT64 is a 64-bit signed integral Type Value. INT64 // FLOAT64 is a 64-bit floating point Type Value. FLOAT64 // STRING is a string Type Value. STRING // BOOLSLICE is a slice of booleans Type Value. BOOLSLICE // INT64SLICE is a slice of 64-bit signed integral numbers Type Value. INT64SLICE // FLOAT64SLICE is a slice of 64-bit floating point numbers Type Value. FLOAT64SLICE // STRINGSLICE is a slice of strings Type Value. STRINGSLICE ) // BoolValue creates a BOOL Value. func BoolValue(v bool) Value { return Value{ vtype: BOOL, numeric: internal.BoolToRaw(v), } } // BoolSliceValue creates a BOOLSLICE Value. func BoolSliceValue(v []bool) Value { return Value{vtype: BOOLSLICE, slice: attribute.BoolSliceValue(v)} } // IntValue creates an INT64 Value. func IntValue(v int) Value { return Int64Value(int64(v)) } // IntSliceValue creates an INTSLICE Value. func IntSliceValue(v []int) Value { var int64Val int64 cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(int64Val))) for i, val := range v { cp.Elem().Index(i).SetInt(int64(val)) } return Value{ vtype: INT64SLICE, slice: cp.Elem().Interface(), } } // Int64Value creates an INT64 Value. func Int64Value(v int64) Value { return Value{ vtype: INT64, numeric: internal.Int64ToRaw(v), } } // Int64SliceValue creates an INT64SLICE Value. func Int64SliceValue(v []int64) Value { return Value{vtype: INT64SLICE, slice: attribute.Int64SliceValue(v)} } // Float64Value creates a FLOAT64 Value. func Float64Value(v float64) Value { return Value{ vtype: FLOAT64, numeric: internal.Float64ToRaw(v), } } // Float64SliceValue creates a FLOAT64SLICE Value. func Float64SliceValue(v []float64) Value { return Value{vtype: FLOAT64SLICE, slice: attribute.Float64SliceValue(v)} } // StringValue creates a STRING Value. func StringValue(v string) Value { return Value{ vtype: STRING, stringly: v, } } // StringSliceValue creates a STRINGSLICE Value. func StringSliceValue(v []string) Value { return Value{vtype: STRINGSLICE, slice: attribute.StringSliceValue(v)} } // Type returns a type of the Value. func (v Value) Type() Type { return v.vtype } // AsBool returns the bool value. Make sure that the Value's type is // BOOL. func (v Value) AsBool() bool { return internal.RawToBool(v.numeric) } // AsBoolSlice returns the []bool value. Make sure that the Value's type is // BOOLSLICE. func (v Value) AsBoolSlice() []bool { if v.vtype != BOOLSLICE { return nil } return v.asBoolSlice() } func (v Value) asBoolSlice() []bool { return attribute.AsBoolSlice(v.slice) } // AsInt64 returns the int64 value. Make sure that the Value's type is // INT64. func (v Value) AsInt64() int64 { return internal.RawToInt64(v.numeric) } // AsInt64Slice returns the []int64 value. Make sure that the Value's type is // INT64SLICE. func (v Value) AsInt64Slice() []int64 { if v.vtype != INT64SLICE { return nil } return v.asInt64Slice() } func (v Value) asInt64Slice() []int64 { return attribute.AsInt64Slice(v.slice) } // AsFloat64 returns the float64 value. Make sure that the Value's // type is FLOAT64. func (v Value) AsFloat64() float64 { return internal.RawToFloat64(v.numeric) } // AsFloat64Slice returns the []float64 value. Make sure that the Value's type is // FLOAT64SLICE. func (v Value) AsFloat64Slice() []float64 { if v.vtype != FLOAT64SLICE { return nil } return v.asFloat64Slice() } func (v Value) asFloat64Slice() []float64 { return attribute.AsFloat64Slice(v.slice) } // AsString returns the string value. Make sure that the Value's type // is STRING. func (v Value) AsString() string { return v.stringly } // AsStringSlice returns the []string value. Make sure that the Value's type is // STRINGSLICE. func (v Value) AsStringSlice() []string { if v.vtype != STRINGSLICE { return nil } return v.asStringSlice() } func (v Value) asStringSlice() []string { return attribute.AsStringSlice(v.slice) } type unknownValueType struct{} // AsInterface returns Value's data as interface{}. func (v Value) AsInterface() interface{} { switch v.Type() { case BOOL: return v.AsBool() case BOOLSLICE: return v.asBoolSlice() case INT64: return v.AsInt64() case INT64SLICE: return v.asInt64Slice() case FLOAT64: return v.AsFloat64() case FLOAT64SLICE: return v.asFloat64Slice() case STRING: return v.stringly case STRINGSLICE: return v.asStringSlice() } return unknownValueType{} } // Emit returns a string representation of Value's data. func (v Value) Emit() string { switch v.Type() { case BOOLSLICE: return fmt.Sprint(v.asBoolSlice()) case BOOL: return strconv.FormatBool(v.AsBool()) case INT64SLICE: j, err := json.Marshal(v.asInt64Slice()) if err != nil { return fmt.Sprintf("invalid: %v", v.asInt64Slice()) } return string(j) case INT64: return strconv.FormatInt(v.AsInt64(), 10) case FLOAT64SLICE: j, err := json.Marshal(v.asFloat64Slice()) if err != nil { return fmt.Sprintf("invalid: %v", v.asFloat64Slice()) } return string(j) case FLOAT64: return fmt.Sprint(v.AsFloat64()) case STRINGSLICE: j, err := json.Marshal(v.asStringSlice()) if err != nil { return fmt.Sprintf("invalid: %v", v.asStringSlice()) } return string(j) case STRING: return v.stringly default: return "unknown" } } // MarshalJSON returns the JSON encoding of the Value. func (v Value) MarshalJSON() ([]byte, error) { var jsonVal struct { Type string Value interface{} } jsonVal.Type = v.Type().String() jsonVal.Value = v.AsInterface() return json.Marshal(jsonVal) } ================================================ FILE: vendor/go.opentelemetry.io/otel/baggage/README.md ================================================ # Baggage [![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/baggage)](https://pkg.go.dev/go.opentelemetry.io/otel/baggage) ================================================ FILE: vendor/go.opentelemetry.io/otel/baggage/baggage.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package baggage // import "go.opentelemetry.io/otel/baggage" import ( "errors" "fmt" "net/url" "strings" "unicode/utf8" "go.opentelemetry.io/otel/internal/baggage" ) const ( maxMembers = 180 maxBytesPerMembers = 4096 maxBytesPerBaggageString = 8192 listDelimiter = "," keyValueDelimiter = "=" propertyDelimiter = ";" ) var ( errInvalidKey = errors.New("invalid key") errInvalidValue = errors.New("invalid value") errInvalidProperty = errors.New("invalid baggage list-member property") errInvalidMember = errors.New("invalid baggage list-member") errMemberNumber = errors.New("too many list-members in baggage-string") errMemberBytes = errors.New("list-member too large") errBaggageBytes = errors.New("baggage-string too large") ) // Property is an additional metadata entry for a baggage list-member. type Property struct { key, value string // hasValue indicates if a zero-value value means the property does not // have a value or if it was the zero-value. hasValue bool } // NewKeyProperty returns a new Property for key. // // If key is invalid, an error will be returned. func NewKeyProperty(key string) (Property, error) { if !validateKey(key) { return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidKey, key) } p := Property{key: key} return p, nil } // NewKeyValueProperty returns a new Property for key with value. // // The passed key must be compliant with W3C Baggage specification. // The passed value must be percent-encoded as defined in W3C Baggage specification. // // Notice: Consider using [NewKeyValuePropertyRaw] instead // that does not require percent-encoding of the value. func NewKeyValueProperty(key, value string) (Property, error) { if !validateValue(value) { return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidValue, value) } decodedValue, err := url.PathUnescape(value) if err != nil { return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidValue, value) } return NewKeyValuePropertyRaw(key, decodedValue) } // NewKeyValuePropertyRaw returns a new Property for key with value. // // The passed key must be compliant with W3C Baggage specification. func NewKeyValuePropertyRaw(key, value string) (Property, error) { if !validateKey(key) { return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidKey, key) } p := Property{ key: key, value: value, hasValue: true, } return p, nil } func newInvalidProperty() Property { return Property{} } // parseProperty attempts to decode a Property from the passed string. It // returns an error if the input is invalid according to the W3C Baggage // specification. func parseProperty(property string) (Property, error) { if property == "" { return newInvalidProperty(), nil } p, ok := parsePropertyInternal(property) if !ok { return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidProperty, property) } return p, nil } // validate ensures p conforms to the W3C Baggage specification, returning an // error otherwise. func (p Property) validate() error { errFunc := func(err error) error { return fmt.Errorf("invalid property: %w", err) } if !validateKey(p.key) { return errFunc(fmt.Errorf("%w: %q", errInvalidKey, p.key)) } if !p.hasValue && p.value != "" { return errFunc(errors.New("inconsistent value")) } return nil } // Key returns the Property key. func (p Property) Key() string { return p.key } // Value returns the Property value. Additionally, a boolean value is returned // indicating if the returned value is the empty if the Property has a value // that is empty or if the value is not set. func (p Property) Value() (string, bool) { return p.value, p.hasValue } // String encodes Property into a header string compliant with the W3C Baggage // specification. func (p Property) String() string { if p.hasValue { return fmt.Sprintf("%s%s%v", p.key, keyValueDelimiter, valueEscape(p.value)) } return p.key } type properties []Property func fromInternalProperties(iProps []baggage.Property) properties { if len(iProps) == 0 { return nil } props := make(properties, len(iProps)) for i, p := range iProps { props[i] = Property{ key: p.Key, value: p.Value, hasValue: p.HasValue, } } return props } func (p properties) asInternal() []baggage.Property { if len(p) == 0 { return nil } iProps := make([]baggage.Property, len(p)) for i, prop := range p { iProps[i] = baggage.Property{ Key: prop.key, Value: prop.value, HasValue: prop.hasValue, } } return iProps } func (p properties) Copy() properties { if len(p) == 0 { return nil } props := make(properties, len(p)) copy(props, p) return props } // validate ensures each Property in p conforms to the W3C Baggage // specification, returning an error otherwise. func (p properties) validate() error { for _, prop := range p { if err := prop.validate(); err != nil { return err } } return nil } // String encodes properties into a header string compliant with the W3C Baggage // specification. func (p properties) String() string { props := make([]string, len(p)) for i, prop := range p { props[i] = prop.String() } return strings.Join(props, propertyDelimiter) } // Member is a list-member of a baggage-string as defined by the W3C Baggage // specification. type Member struct { key, value string properties properties // hasData indicates whether the created property contains data or not. // Properties that do not contain data are invalid with no other check // required. hasData bool } // NewMember returns a new Member from the passed arguments. // // The passed key must be compliant with W3C Baggage specification. // The passed value must be percent-encoded as defined in W3C Baggage specification. // // Notice: Consider using [NewMemberRaw] instead // that does not require percent-encoding of the value. func NewMember(key, value string, props ...Property) (Member, error) { if !validateValue(value) { return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidValue, value) } decodedValue, err := url.PathUnescape(value) if err != nil { return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidValue, value) } return NewMemberRaw(key, decodedValue, props...) } // NewMemberRaw returns a new Member from the passed arguments. // // The passed key must be compliant with W3C Baggage specification. func NewMemberRaw(key, value string, props ...Property) (Member, error) { m := Member{ key: key, value: value, properties: properties(props).Copy(), hasData: true, } if err := m.validate(); err != nil { return newInvalidMember(), err } return m, nil } func newInvalidMember() Member { return Member{} } // parseMember attempts to decode a Member from the passed string. It returns // an error if the input is invalid according to the W3C Baggage // specification. func parseMember(member string) (Member, error) { if n := len(member); n > maxBytesPerMembers { return newInvalidMember(), fmt.Errorf("%w: %d", errMemberBytes, n) } var props properties keyValue, properties, found := strings.Cut(member, propertyDelimiter) if found { // Parse the member properties. for _, pStr := range strings.Split(properties, propertyDelimiter) { p, err := parseProperty(pStr) if err != nil { return newInvalidMember(), err } props = append(props, p) } } // Parse the member key/value pair. // Take into account a value can contain equal signs (=). k, v, found := strings.Cut(keyValue, keyValueDelimiter) if !found { return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidMember, member) } // "Leading and trailing whitespaces are allowed but MUST be trimmed // when converting the header into a data structure." key := strings.TrimSpace(k) if !validateKey(key) { return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidKey, key) } val := strings.TrimSpace(v) if !validateValue(val) { return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidValue, v) } // Decode a percent-encoded value. value, err := url.PathUnescape(val) if err != nil { return newInvalidMember(), fmt.Errorf("%w: %w", errInvalidValue, err) } return Member{key: key, value: value, properties: props, hasData: true}, nil } // validate ensures m conforms to the W3C Baggage specification. // A key must be an ASCII string, returning an error otherwise. func (m Member) validate() error { if !m.hasData { return fmt.Errorf("%w: %q", errInvalidMember, m) } if !validateKey(m.key) { return fmt.Errorf("%w: %q", errInvalidKey, m.key) } return m.properties.validate() } // Key returns the Member key. func (m Member) Key() string { return m.key } // Value returns the Member value. func (m Member) Value() string { return m.value } // Properties returns a copy of the Member properties. func (m Member) Properties() []Property { return m.properties.Copy() } // String encodes Member into a header string compliant with the W3C Baggage // specification. func (m Member) String() string { // A key is just an ASCII string. A value is restricted to be // US-ASCII characters excluding CTLs, whitespace, // DQUOTE, comma, semicolon, and backslash. s := m.key + keyValueDelimiter + valueEscape(m.value) if len(m.properties) > 0 { s += propertyDelimiter + m.properties.String() } return s } // Baggage is a list of baggage members representing the baggage-string as // defined by the W3C Baggage specification. type Baggage struct { //nolint:golint list baggage.List } // New returns a new valid Baggage. It returns an error if it results in a // Baggage exceeding limits set in that specification. // // It expects all the provided members to have already been validated. func New(members ...Member) (Baggage, error) { if len(members) == 0 { return Baggage{}, nil } b := make(baggage.List) for _, m := range members { if !m.hasData { return Baggage{}, errInvalidMember } // OpenTelemetry resolves duplicates by last-one-wins. b[m.key] = baggage.Item{ Value: m.value, Properties: m.properties.asInternal(), } } // Check member numbers after deduplication. if len(b) > maxMembers { return Baggage{}, errMemberNumber } bag := Baggage{b} if n := len(bag.String()); n > maxBytesPerBaggageString { return Baggage{}, fmt.Errorf("%w: %d", errBaggageBytes, n) } return bag, nil } // Parse attempts to decode a baggage-string from the passed string. It // returns an error if the input is invalid according to the W3C Baggage // specification. // // If there are duplicate list-members contained in baggage, the last one // defined (reading left-to-right) will be the only one kept. This diverges // from the W3C Baggage specification which allows duplicate list-members, but // conforms to the OpenTelemetry Baggage specification. func Parse(bStr string) (Baggage, error) { if bStr == "" { return Baggage{}, nil } if n := len(bStr); n > maxBytesPerBaggageString { return Baggage{}, fmt.Errorf("%w: %d", errBaggageBytes, n) } b := make(baggage.List) for _, memberStr := range strings.Split(bStr, listDelimiter) { m, err := parseMember(memberStr) if err != nil { return Baggage{}, err } // OpenTelemetry resolves duplicates by last-one-wins. b[m.key] = baggage.Item{ Value: m.value, Properties: m.properties.asInternal(), } } // OpenTelemetry does not allow for duplicate list-members, but the W3C // specification does. Now that we have deduplicated, ensure the baggage // does not exceed list-member limits. if len(b) > maxMembers { return Baggage{}, errMemberNumber } return Baggage{b}, nil } // Member returns the baggage list-member identified by key. // // If there is no list-member matching the passed key the returned Member will // be a zero-value Member. // The returned member is not validated, as we assume the validation happened // when it was added to the Baggage. func (b Baggage) Member(key string) Member { v, ok := b.list[key] if !ok { // We do not need to worry about distinguishing between the situation // where a zero-valued Member is included in the Baggage because a // zero-valued Member is invalid according to the W3C Baggage // specification (it has an empty key). return newInvalidMember() } return Member{ key: key, value: v.Value, properties: fromInternalProperties(v.Properties), hasData: true, } } // Members returns all the baggage list-members. // The order of the returned list-members does not have significance. // // The returned members are not validated, as we assume the validation happened // when they were added to the Baggage. func (b Baggage) Members() []Member { if len(b.list) == 0 { return nil } members := make([]Member, 0, len(b.list)) for k, v := range b.list { members = append(members, Member{ key: k, value: v.Value, properties: fromInternalProperties(v.Properties), hasData: true, }) } return members } // SetMember returns a copy the Baggage with the member included. If the // baggage contains a Member with the same key the existing Member is // replaced. // // If member is invalid according to the W3C Baggage specification, an error // is returned with the original Baggage. func (b Baggage) SetMember(member Member) (Baggage, error) { if !member.hasData { return b, errInvalidMember } n := len(b.list) if _, ok := b.list[member.key]; !ok { n++ } list := make(baggage.List, n) for k, v := range b.list { // Do not copy if we are just going to overwrite. if k == member.key { continue } list[k] = v } list[member.key] = baggage.Item{ Value: member.value, Properties: member.properties.asInternal(), } return Baggage{list: list}, nil } // DeleteMember returns a copy of the Baggage with the list-member identified // by key removed. func (b Baggage) DeleteMember(key string) Baggage { n := len(b.list) if _, ok := b.list[key]; ok { n-- } list := make(baggage.List, n) for k, v := range b.list { if k == key { continue } list[k] = v } return Baggage{list: list} } // Len returns the number of list-members in the Baggage. func (b Baggage) Len() int { return len(b.list) } // String encodes Baggage into a header string compliant with the W3C Baggage // specification. func (b Baggage) String() string { members := make([]string, 0, len(b.list)) for k, v := range b.list { members = append(members, Member{ key: k, value: v.Value, properties: fromInternalProperties(v.Properties), }.String()) } return strings.Join(members, listDelimiter) } // parsePropertyInternal attempts to decode a Property from the passed string. // It follows the spec at https://www.w3.org/TR/baggage/#definition. func parsePropertyInternal(s string) (p Property, ok bool) { // For the entire function we will use " key = value " as an example. // Attempting to parse the key. // First skip spaces at the beginning "< >key = value " (they could be empty). index := skipSpace(s, 0) // Parse the key: " = value ". keyStart := index keyEnd := index for _, c := range s[keyStart:] { if !validateKeyChar(c) { break } keyEnd++ } // If we couldn't find any valid key character, // it means the key is either empty or invalid. if keyStart == keyEnd { return } // Skip spaces after the key: " key< >= value ". index = skipSpace(s, keyEnd) if index == len(s) { // A key can have no value, like: " key ". ok = true p.key = s[keyStart:keyEnd] return } // If we have not reached the end and we can't find the '=' delimiter, // it means the property is invalid. if s[index] != keyValueDelimiter[0] { return } // Attempting to parse the value. // Match: " key =< >value ". index = skipSpace(s, index+1) // Match the value string: " key = ". // A valid property can be: " key =". // Therefore, we don't have to check if the value is empty. valueStart := index valueEnd := index for _, c := range s[valueStart:] { if !validateValueChar(c) { break } valueEnd++ } // Skip all trailing whitespaces: " key = value< >". index = skipSpace(s, valueEnd) // If after looking for the value and skipping whitespaces // we have not reached the end, it means the property is // invalid, something like: " key = value value1". if index != len(s) { return } // Decode a percent-encoded value. value, err := url.PathUnescape(s[valueStart:valueEnd]) if err != nil { return } ok = true p.key = s[keyStart:keyEnd] p.hasValue = true p.value = value return } func skipSpace(s string, offset int) int { i := offset for ; i < len(s); i++ { c := s[i] if c != ' ' && c != '\t' { break } } return i } var safeKeyCharset = [utf8.RuneSelf]bool{ // 0x23 to 0x27 '#': true, '$': true, '%': true, '&': true, '\'': true, // 0x30 to 0x39 '0': true, '1': true, '2': true, '3': true, '4': true, '5': true, '6': true, '7': true, '8': true, '9': true, // 0x41 to 0x5a 'A': true, 'B': true, 'C': true, 'D': true, 'E': true, 'F': true, 'G': true, 'H': true, 'I': true, 'J': true, 'K': true, 'L': true, 'M': true, 'N': true, 'O': true, 'P': true, 'Q': true, 'R': true, 'S': true, 'T': true, 'U': true, 'V': true, 'W': true, 'X': true, 'Y': true, 'Z': true, // 0x5e to 0x7a '^': true, '_': true, '`': true, 'a': true, 'b': true, 'c': true, 'd': true, 'e': true, 'f': true, 'g': true, 'h': true, 'i': true, 'j': true, 'k': true, 'l': true, 'm': true, 'n': true, 'o': true, 'p': true, 'q': true, 'r': true, 's': true, 't': true, 'u': true, 'v': true, 'w': true, 'x': true, 'y': true, 'z': true, // remainder '!': true, '*': true, '+': true, '-': true, '.': true, '|': true, '~': true, } func validateKey(s string) bool { if len(s) == 0 { return false } for _, c := range s { if !validateKeyChar(c) { return false } } return true } func validateKeyChar(c int32) bool { return c >= 0 && c < int32(utf8.RuneSelf) && safeKeyCharset[c] } func validateValue(s string) bool { for _, c := range s { if !validateValueChar(c) { return false } } return true } var safeValueCharset = [utf8.RuneSelf]bool{ '!': true, // 0x21 // 0x23 to 0x2b '#': true, '$': true, '%': true, '&': true, '\'': true, '(': true, ')': true, '*': true, '+': true, // 0x2d to 0x3a '-': true, '.': true, '/': true, '0': true, '1': true, '2': true, '3': true, '4': true, '5': true, '6': true, '7': true, '8': true, '9': true, ':': true, // 0x3c to 0x5b '<': true, // 0x3C '=': true, // 0x3D '>': true, // 0x3E '?': true, // 0x3F '@': true, // 0x40 'A': true, // 0x41 'B': true, // 0x42 'C': true, // 0x43 'D': true, // 0x44 'E': true, // 0x45 'F': true, // 0x46 'G': true, // 0x47 'H': true, // 0x48 'I': true, // 0x49 'J': true, // 0x4A 'K': true, // 0x4B 'L': true, // 0x4C 'M': true, // 0x4D 'N': true, // 0x4E 'O': true, // 0x4F 'P': true, // 0x50 'Q': true, // 0x51 'R': true, // 0x52 'S': true, // 0x53 'T': true, // 0x54 'U': true, // 0x55 'V': true, // 0x56 'W': true, // 0x57 'X': true, // 0x58 'Y': true, // 0x59 'Z': true, // 0x5A '[': true, // 0x5B // 0x5d to 0x7e ']': true, // 0x5D '^': true, // 0x5E '_': true, // 0x5F '`': true, // 0x60 'a': true, // 0x61 'b': true, // 0x62 'c': true, // 0x63 'd': true, // 0x64 'e': true, // 0x65 'f': true, // 0x66 'g': true, // 0x67 'h': true, // 0x68 'i': true, // 0x69 'j': true, // 0x6A 'k': true, // 0x6B 'l': true, // 0x6C 'm': true, // 0x6D 'n': true, // 0x6E 'o': true, // 0x6F 'p': true, // 0x70 'q': true, // 0x71 'r': true, // 0x72 's': true, // 0x73 't': true, // 0x74 'u': true, // 0x75 'v': true, // 0x76 'w': true, // 0x77 'x': true, // 0x78 'y': true, // 0x79 'z': true, // 0x7A '{': true, // 0x7B '|': true, // 0x7C '}': true, // 0x7D '~': true, // 0x7E } func validateValueChar(c int32) bool { return c >= 0 && c < int32(utf8.RuneSelf) && safeValueCharset[c] } // valueEscape escapes the string so it can be safely placed inside a baggage value, // replacing special characters with %XX sequences as needed. // // The implementation is based on: // https://github.com/golang/go/blob/f6509cf5cdbb5787061b784973782933c47f1782/src/net/url/url.go#L285. func valueEscape(s string) string { hexCount := 0 for i := 0; i < len(s); i++ { c := s[i] if shouldEscape(c) { hexCount++ } } if hexCount == 0 { return s } var buf [64]byte var t []byte required := len(s) + 2*hexCount if required <= len(buf) { t = buf[:required] } else { t = make([]byte, required) } j := 0 for i := 0; i < len(s); i++ { c := s[i] if shouldEscape(s[i]) { const upperhex = "0123456789ABCDEF" t[j] = '%' t[j+1] = upperhex[c>>4] t[j+2] = upperhex[c&15] j += 3 } else { t[j] = c j++ } } return string(t) } // shouldEscape returns true if the specified byte should be escaped when // appearing in a baggage value string. func shouldEscape(c byte) bool { if c == '%' { // The percent character must be encoded so that percent-encoding can work. return true } return !validateValueChar(int32(c)) } ================================================ FILE: vendor/go.opentelemetry.io/otel/baggage/context.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package baggage // import "go.opentelemetry.io/otel/baggage" import ( "context" "go.opentelemetry.io/otel/internal/baggage" ) // ContextWithBaggage returns a copy of parent with baggage. func ContextWithBaggage(parent context.Context, b Baggage) context.Context { // Delegate so any hooks for the OpenTracing bridge are handled. return baggage.ContextWithList(parent, b.list) } // ContextWithoutBaggage returns a copy of parent with no baggage. func ContextWithoutBaggage(parent context.Context) context.Context { // Delegate so any hooks for the OpenTracing bridge are handled. return baggage.ContextWithList(parent, nil) } // FromContext returns the baggage contained in ctx. func FromContext(ctx context.Context) Baggage { // Delegate so any hooks for the OpenTracing bridge are handled. return Baggage{list: baggage.ListFromContext(ctx)} } ================================================ FILE: vendor/go.opentelemetry.io/otel/baggage/doc.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 /* Package baggage provides functionality for storing and retrieving baggage items in Go context. For propagating the baggage, see the go.opentelemetry.io/otel/propagation package. */ package baggage // import "go.opentelemetry.io/otel/baggage" ================================================ FILE: vendor/go.opentelemetry.io/otel/codes/README.md ================================================ # Codes [![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/codes)](https://pkg.go.dev/go.opentelemetry.io/otel/codes) ================================================ FILE: vendor/go.opentelemetry.io/otel/codes/codes.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package codes // import "go.opentelemetry.io/otel/codes" import ( "encoding/json" "fmt" "strconv" ) const ( // Unset is the default status code. Unset Code = 0 // Error indicates the operation contains an error. // // NOTE: The error code in OTLP is 2. // The value of this enum is only relevant to the internals // of the Go SDK. Error Code = 1 // Ok indicates operation has been validated by an Application developers // or Operator to have completed successfully, or contain no error. // // NOTE: The Ok code in OTLP is 1. // The value of this enum is only relevant to the internals // of the Go SDK. Ok Code = 2 maxCode = 3 ) // Code is an 32-bit representation of a status state. type Code uint32 var codeToStr = map[Code]string{ Unset: "Unset", Error: "Error", Ok: "Ok", } var strToCode = map[string]Code{ `"Unset"`: Unset, `"Error"`: Error, `"Ok"`: Ok, } // String returns the Code as a string. func (c Code) String() string { return codeToStr[c] } // UnmarshalJSON unmarshals b into the Code. // // This is based on the functionality in the gRPC codes package: // https://github.com/grpc/grpc-go/blob/bb64fee312b46ebee26be43364a7a966033521b1/codes/codes.go#L218-L244 func (c *Code) UnmarshalJSON(b []byte) error { // From json.Unmarshaler: By convention, to approximate the behavior of // Unmarshal itself, Unmarshalers implement UnmarshalJSON([]byte("null")) as // a no-op. if string(b) == "null" { return nil } if c == nil { return fmt.Errorf("nil receiver passed to UnmarshalJSON") } var x interface{} if err := json.Unmarshal(b, &x); err != nil { return err } switch x.(type) { case string: if jc, ok := strToCode[string(b)]; ok { *c = jc return nil } return fmt.Errorf("invalid code: %q", string(b)) case float64: if ci, err := strconv.ParseUint(string(b), 10, 32); err == nil { if ci >= maxCode { return fmt.Errorf("invalid code: %q", ci) } *c = Code(ci) return nil } return fmt.Errorf("invalid code: %q", string(b)) default: return fmt.Errorf("invalid code: %q", string(b)) } } // MarshalJSON returns c as the JSON encoding of c. func (c *Code) MarshalJSON() ([]byte, error) { if c == nil { return []byte("null"), nil } str, ok := codeToStr[*c] if !ok { return nil, fmt.Errorf("invalid code: %d", *c) } return []byte(fmt.Sprintf("%q", str)), nil } ================================================ FILE: vendor/go.opentelemetry.io/otel/codes/doc.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 /* Package codes defines the canonical error codes used by OpenTelemetry. It conforms to [the OpenTelemetry specification](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/trace/api.md#set-status). */ package codes // import "go.opentelemetry.io/otel/codes" ================================================ FILE: vendor/go.opentelemetry.io/otel/doc.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 /* Package otel provides global access to the OpenTelemetry API. The subpackages of the otel package provide an implementation of the OpenTelemetry API. The provided API is used to instrument code and measure data about that code's performance and operation. The measured data, by default, is not processed or transmitted anywhere. An implementation of the OpenTelemetry SDK, like the default SDK implementation (go.opentelemetry.io/otel/sdk), and associated exporters are used to process and transport this data. To read the getting started guide, see https://opentelemetry.io/docs/languages/go/getting-started/. To read more about tracing, see go.opentelemetry.io/otel/trace. To read more about metrics, see go.opentelemetry.io/otel/metric. To read more about propagation, see go.opentelemetry.io/otel/propagation and go.opentelemetry.io/otel/baggage. */ package otel // import "go.opentelemetry.io/otel" ================================================ FILE: vendor/go.opentelemetry.io/otel/error_handler.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package otel // import "go.opentelemetry.io/otel" // ErrorHandler handles irremediable events. type ErrorHandler interface { // DO NOT CHANGE: any modification will not be backwards compatible and // must never be done outside of a new major release. // Handle handles any error deemed irremediable by an OpenTelemetry // component. Handle(error) // DO NOT CHANGE: any modification will not be backwards compatible and // must never be done outside of a new major release. } // ErrorHandlerFunc is a convenience adapter to allow the use of a function // as an ErrorHandler. type ErrorHandlerFunc func(error) var _ ErrorHandler = ErrorHandlerFunc(nil) // Handle handles the irremediable error by calling the ErrorHandlerFunc itself. func (f ErrorHandlerFunc) Handle(err error) { f(err) } ================================================ FILE: vendor/go.opentelemetry.io/otel/get_main_pkgs.sh ================================================ #!/usr/bin/env bash # Copyright The OpenTelemetry Authors # SPDX-License-Identifier: Apache-2.0 set -euo pipefail top_dir='.' if [[ $# -gt 0 ]]; then top_dir="${1}" fi p=$(pwd) mod_dirs=() # Note `mapfile` does not exist in older bash versions: # https://stackoverflow.com/questions/41475261/need-alternative-to-readarray-mapfile-for-script-on-older-version-of-bash while IFS= read -r line; do mod_dirs+=("$line") done < <(find "${top_dir}" -type f -name 'go.mod' -exec dirname {} \; | sort) for mod_dir in "${mod_dirs[@]}"; do cd "${mod_dir}" while IFS= read -r line; do echo ".${line#${p}}" done < <(go list --find -f '{{.Name}}|{{.Dir}}' ./... | grep '^main|' | cut -f 2- -d '|') cd "${p}" done ================================================ FILE: vendor/go.opentelemetry.io/otel/handler.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package otel // import "go.opentelemetry.io/otel" import ( "go.opentelemetry.io/otel/internal/global" ) // Compile-time check global.ErrDelegator implements ErrorHandler. var _ ErrorHandler = (*global.ErrDelegator)(nil) // GetErrorHandler returns the global ErrorHandler instance. // // The default ErrorHandler instance returned will log all errors to STDERR // until an override ErrorHandler is set with SetErrorHandler. All // ErrorHandler returned prior to this will automatically forward errors to // the set instance instead of logging. // // Subsequent calls to SetErrorHandler after the first will not forward errors // to the new ErrorHandler for prior returned instances. func GetErrorHandler() ErrorHandler { return global.GetErrorHandler() } // SetErrorHandler sets the global ErrorHandler to h. // // The first time this is called all ErrorHandler previously returned from // GetErrorHandler will send errors to h instead of the default logging // ErrorHandler. Subsequent calls will set the global ErrorHandler, but not // delegate errors to h. func SetErrorHandler(h ErrorHandler) { global.SetErrorHandler(h) } // Handle is a convenience function for GetErrorHandler().Handle(err). func Handle(err error) { global.GetErrorHandler().Handle(err) } ================================================ FILE: vendor/go.opentelemetry.io/otel/internal/attribute/attribute.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 /* Package attribute provide several helper functions for some commonly used logic of processing attributes. */ package attribute // import "go.opentelemetry.io/otel/internal/attribute" import ( "reflect" ) // BoolSliceValue converts a bool slice into an array with same elements as slice. func BoolSliceValue(v []bool) interface{} { var zero bool cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))).Elem() reflect.Copy(cp, reflect.ValueOf(v)) return cp.Interface() } // Int64SliceValue converts an int64 slice into an array with same elements as slice. func Int64SliceValue(v []int64) interface{} { var zero int64 cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))).Elem() reflect.Copy(cp, reflect.ValueOf(v)) return cp.Interface() } // Float64SliceValue converts a float64 slice into an array with same elements as slice. func Float64SliceValue(v []float64) interface{} { var zero float64 cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))).Elem() reflect.Copy(cp, reflect.ValueOf(v)) return cp.Interface() } // StringSliceValue converts a string slice into an array with same elements as slice. func StringSliceValue(v []string) interface{} { var zero string cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))).Elem() reflect.Copy(cp, reflect.ValueOf(v)) return cp.Interface() } // AsBoolSlice converts a bool array into a slice into with same elements as array. func AsBoolSlice(v interface{}) []bool { rv := reflect.ValueOf(v) if rv.Type().Kind() != reflect.Array { return nil } var zero bool correctLen := rv.Len() correctType := reflect.ArrayOf(correctLen, reflect.TypeOf(zero)) cpy := reflect.New(correctType) _ = reflect.Copy(cpy.Elem(), rv) return cpy.Elem().Slice(0, correctLen).Interface().([]bool) } // AsInt64Slice converts an int64 array into a slice into with same elements as array. func AsInt64Slice(v interface{}) []int64 { rv := reflect.ValueOf(v) if rv.Type().Kind() != reflect.Array { return nil } var zero int64 correctLen := rv.Len() correctType := reflect.ArrayOf(correctLen, reflect.TypeOf(zero)) cpy := reflect.New(correctType) _ = reflect.Copy(cpy.Elem(), rv) return cpy.Elem().Slice(0, correctLen).Interface().([]int64) } // AsFloat64Slice converts a float64 array into a slice into with same elements as array. func AsFloat64Slice(v interface{}) []float64 { rv := reflect.ValueOf(v) if rv.Type().Kind() != reflect.Array { return nil } var zero float64 correctLen := rv.Len() correctType := reflect.ArrayOf(correctLen, reflect.TypeOf(zero)) cpy := reflect.New(correctType) _ = reflect.Copy(cpy.Elem(), rv) return cpy.Elem().Slice(0, correctLen).Interface().([]float64) } // AsStringSlice converts a string array into a slice into with same elements as array. func AsStringSlice(v interface{}) []string { rv := reflect.ValueOf(v) if rv.Type().Kind() != reflect.Array { return nil } var zero string correctLen := rv.Len() correctType := reflect.ArrayOf(correctLen, reflect.TypeOf(zero)) cpy := reflect.New(correctType) _ = reflect.Copy(cpy.Elem(), rv) return cpy.Elem().Slice(0, correctLen).Interface().([]string) } ================================================ FILE: vendor/go.opentelemetry.io/otel/internal/baggage/baggage.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 /* Package baggage provides base types and functionality to store and retrieve baggage in Go context. This package exists because the OpenTracing bridge to OpenTelemetry needs to synchronize state whenever baggage for a context is modified and that context contains an OpenTracing span. If it were not for this need this package would not need to exist and the `go.opentelemetry.io/otel/baggage` package would be the singular place where W3C baggage is handled. */ package baggage // import "go.opentelemetry.io/otel/internal/baggage" // List is the collection of baggage members. The W3C allows for duplicates, // but OpenTelemetry does not, therefore, this is represented as a map. type List map[string]Item // Item is the value and metadata properties part of a list-member. type Item struct { Value string Properties []Property } // Property is a metadata entry for a list-member. type Property struct { Key, Value string // HasValue indicates if a zero-value value means the property does not // have a value or if it was the zero-value. HasValue bool } ================================================ FILE: vendor/go.opentelemetry.io/otel/internal/baggage/context.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package baggage // import "go.opentelemetry.io/otel/internal/baggage" import "context" type baggageContextKeyType int const baggageKey baggageContextKeyType = iota // SetHookFunc is a callback called when storing baggage in the context. type SetHookFunc func(context.Context, List) context.Context // GetHookFunc is a callback called when getting baggage from the context. type GetHookFunc func(context.Context, List) List type baggageState struct { list List setHook SetHookFunc getHook GetHookFunc } // ContextWithSetHook returns a copy of parent with hook configured to be // invoked every time ContextWithBaggage is called. // // Passing nil SetHookFunc creates a context with no set hook to call. func ContextWithSetHook(parent context.Context, hook SetHookFunc) context.Context { var s baggageState if v, ok := parent.Value(baggageKey).(baggageState); ok { s = v } s.setHook = hook return context.WithValue(parent, baggageKey, s) } // ContextWithGetHook returns a copy of parent with hook configured to be // invoked every time FromContext is called. // // Passing nil GetHookFunc creates a context with no get hook to call. func ContextWithGetHook(parent context.Context, hook GetHookFunc) context.Context { var s baggageState if v, ok := parent.Value(baggageKey).(baggageState); ok { s = v } s.getHook = hook return context.WithValue(parent, baggageKey, s) } // ContextWithList returns a copy of parent with baggage. Passing nil list // returns a context without any baggage. func ContextWithList(parent context.Context, list List) context.Context { var s baggageState if v, ok := parent.Value(baggageKey).(baggageState); ok { s = v } s.list = list ctx := context.WithValue(parent, baggageKey, s) if s.setHook != nil { ctx = s.setHook(ctx, list) } return ctx } // ListFromContext returns the baggage contained in ctx. func ListFromContext(ctx context.Context) List { switch v := ctx.Value(baggageKey).(type) { case baggageState: if v.getHook != nil { return v.getHook(ctx, v.list) } return v.list default: return nil } } ================================================ FILE: vendor/go.opentelemetry.io/otel/internal/gen.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package internal // import "go.opentelemetry.io/otel/internal" //go:generate gotmpl --body=./shared/matchers/expectation.go.tmpl "--data={}" --out=matchers/expectation.go //go:generate gotmpl --body=./shared/matchers/expecter.go.tmpl "--data={}" --out=matchers/expecter.go //go:generate gotmpl --body=./shared/matchers/temporal_matcher.go.tmpl "--data={}" --out=matchers/temporal_matcher.go //go:generate gotmpl --body=./shared/internaltest/alignment.go.tmpl "--data={}" --out=internaltest/alignment.go //go:generate gotmpl --body=./shared/internaltest/env.go.tmpl "--data={}" --out=internaltest/env.go //go:generate gotmpl --body=./shared/internaltest/env_test.go.tmpl "--data={}" --out=internaltest/env_test.go //go:generate gotmpl --body=./shared/internaltest/errors.go.tmpl "--data={}" --out=internaltest/errors.go //go:generate gotmpl --body=./shared/internaltest/harness.go.tmpl "--data={\"matchersImportPath\": \"go.opentelemetry.io/otel/internal/matchers\"}" --out=internaltest/harness.go //go:generate gotmpl --body=./shared/internaltest/text_map_carrier.go.tmpl "--data={}" --out=internaltest/text_map_carrier.go //go:generate gotmpl --body=./shared/internaltest/text_map_carrier_test.go.tmpl "--data={}" --out=internaltest/text_map_carrier_test.go //go:generate gotmpl --body=./shared/internaltest/text_map_propagator.go.tmpl "--data={}" --out=internaltest/text_map_propagator.go //go:generate gotmpl --body=./shared/internaltest/text_map_propagator_test.go.tmpl "--data={}" --out=internaltest/text_map_propagator_test.go ================================================ FILE: vendor/go.opentelemetry.io/otel/internal/global/handler.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package global // import "go.opentelemetry.io/otel/internal/global" import ( "log" "sync/atomic" ) // ErrorHandler handles irremediable events. type ErrorHandler interface { // Handle handles any error deemed irremediable by an OpenTelemetry // component. Handle(error) } type ErrDelegator struct { delegate atomic.Pointer[ErrorHandler] } // Compile-time check that delegator implements ErrorHandler. var _ ErrorHandler = (*ErrDelegator)(nil) func (d *ErrDelegator) Handle(err error) { if eh := d.delegate.Load(); eh != nil { (*eh).Handle(err) return } log.Print(err) } // setDelegate sets the ErrorHandler delegate. func (d *ErrDelegator) setDelegate(eh ErrorHandler) { d.delegate.Store(&eh) } ================================================ FILE: vendor/go.opentelemetry.io/otel/internal/global/instruments.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package global // import "go.opentelemetry.io/otel/internal/global" import ( "context" "sync/atomic" "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/metric/embedded" ) // unwrapper unwraps to return the underlying instrument implementation. type unwrapper interface { Unwrap() metric.Observable } type afCounter struct { embedded.Float64ObservableCounter metric.Float64Observable name string opts []metric.Float64ObservableCounterOption delegate atomic.Value // metric.Float64ObservableCounter } var ( _ unwrapper = (*afCounter)(nil) _ metric.Float64ObservableCounter = (*afCounter)(nil) ) func (i *afCounter) setDelegate(m metric.Meter) { ctr, err := m.Float64ObservableCounter(i.name, i.opts...) if err != nil { GetErrorHandler().Handle(err) return } i.delegate.Store(ctr) } func (i *afCounter) Unwrap() metric.Observable { if ctr := i.delegate.Load(); ctr != nil { return ctr.(metric.Float64ObservableCounter) } return nil } type afUpDownCounter struct { embedded.Float64ObservableUpDownCounter metric.Float64Observable name string opts []metric.Float64ObservableUpDownCounterOption delegate atomic.Value // metric.Float64ObservableUpDownCounter } var ( _ unwrapper = (*afUpDownCounter)(nil) _ metric.Float64ObservableUpDownCounter = (*afUpDownCounter)(nil) ) func (i *afUpDownCounter) setDelegate(m metric.Meter) { ctr, err := m.Float64ObservableUpDownCounter(i.name, i.opts...) if err != nil { GetErrorHandler().Handle(err) return } i.delegate.Store(ctr) } func (i *afUpDownCounter) Unwrap() metric.Observable { if ctr := i.delegate.Load(); ctr != nil { return ctr.(metric.Float64ObservableUpDownCounter) } return nil } type afGauge struct { embedded.Float64ObservableGauge metric.Float64Observable name string opts []metric.Float64ObservableGaugeOption delegate atomic.Value // metric.Float64ObservableGauge } var ( _ unwrapper = (*afGauge)(nil) _ metric.Float64ObservableGauge = (*afGauge)(nil) ) func (i *afGauge) setDelegate(m metric.Meter) { ctr, err := m.Float64ObservableGauge(i.name, i.opts...) if err != nil { GetErrorHandler().Handle(err) return } i.delegate.Store(ctr) } func (i *afGauge) Unwrap() metric.Observable { if ctr := i.delegate.Load(); ctr != nil { return ctr.(metric.Float64ObservableGauge) } return nil } type aiCounter struct { embedded.Int64ObservableCounter metric.Int64Observable name string opts []metric.Int64ObservableCounterOption delegate atomic.Value // metric.Int64ObservableCounter } var ( _ unwrapper = (*aiCounter)(nil) _ metric.Int64ObservableCounter = (*aiCounter)(nil) ) func (i *aiCounter) setDelegate(m metric.Meter) { ctr, err := m.Int64ObservableCounter(i.name, i.opts...) if err != nil { GetErrorHandler().Handle(err) return } i.delegate.Store(ctr) } func (i *aiCounter) Unwrap() metric.Observable { if ctr := i.delegate.Load(); ctr != nil { return ctr.(metric.Int64ObservableCounter) } return nil } type aiUpDownCounter struct { embedded.Int64ObservableUpDownCounter metric.Int64Observable name string opts []metric.Int64ObservableUpDownCounterOption delegate atomic.Value // metric.Int64ObservableUpDownCounter } var ( _ unwrapper = (*aiUpDownCounter)(nil) _ metric.Int64ObservableUpDownCounter = (*aiUpDownCounter)(nil) ) func (i *aiUpDownCounter) setDelegate(m metric.Meter) { ctr, err := m.Int64ObservableUpDownCounter(i.name, i.opts...) if err != nil { GetErrorHandler().Handle(err) return } i.delegate.Store(ctr) } func (i *aiUpDownCounter) Unwrap() metric.Observable { if ctr := i.delegate.Load(); ctr != nil { return ctr.(metric.Int64ObservableUpDownCounter) } return nil } type aiGauge struct { embedded.Int64ObservableGauge metric.Int64Observable name string opts []metric.Int64ObservableGaugeOption delegate atomic.Value // metric.Int64ObservableGauge } var ( _ unwrapper = (*aiGauge)(nil) _ metric.Int64ObservableGauge = (*aiGauge)(nil) ) func (i *aiGauge) setDelegate(m metric.Meter) { ctr, err := m.Int64ObservableGauge(i.name, i.opts...) if err != nil { GetErrorHandler().Handle(err) return } i.delegate.Store(ctr) } func (i *aiGauge) Unwrap() metric.Observable { if ctr := i.delegate.Load(); ctr != nil { return ctr.(metric.Int64ObservableGauge) } return nil } // Sync Instruments. type sfCounter struct { embedded.Float64Counter name string opts []metric.Float64CounterOption delegate atomic.Value // metric.Float64Counter } var _ metric.Float64Counter = (*sfCounter)(nil) func (i *sfCounter) setDelegate(m metric.Meter) { ctr, err := m.Float64Counter(i.name, i.opts...) if err != nil { GetErrorHandler().Handle(err) return } i.delegate.Store(ctr) } func (i *sfCounter) Add(ctx context.Context, incr float64, opts ...metric.AddOption) { if ctr := i.delegate.Load(); ctr != nil { ctr.(metric.Float64Counter).Add(ctx, incr, opts...) } } type sfUpDownCounter struct { embedded.Float64UpDownCounter name string opts []metric.Float64UpDownCounterOption delegate atomic.Value // metric.Float64UpDownCounter } var _ metric.Float64UpDownCounter = (*sfUpDownCounter)(nil) func (i *sfUpDownCounter) setDelegate(m metric.Meter) { ctr, err := m.Float64UpDownCounter(i.name, i.opts...) if err != nil { GetErrorHandler().Handle(err) return } i.delegate.Store(ctr) } func (i *sfUpDownCounter) Add(ctx context.Context, incr float64, opts ...metric.AddOption) { if ctr := i.delegate.Load(); ctr != nil { ctr.(metric.Float64UpDownCounter).Add(ctx, incr, opts...) } } type sfHistogram struct { embedded.Float64Histogram name string opts []metric.Float64HistogramOption delegate atomic.Value // metric.Float64Histogram } var _ metric.Float64Histogram = (*sfHistogram)(nil) func (i *sfHistogram) setDelegate(m metric.Meter) { ctr, err := m.Float64Histogram(i.name, i.opts...) if err != nil { GetErrorHandler().Handle(err) return } i.delegate.Store(ctr) } func (i *sfHistogram) Record(ctx context.Context, x float64, opts ...metric.RecordOption) { if ctr := i.delegate.Load(); ctr != nil { ctr.(metric.Float64Histogram).Record(ctx, x, opts...) } } type sfGauge struct { embedded.Float64Gauge name string opts []metric.Float64GaugeOption delegate atomic.Value // metric.Float64Gauge } var _ metric.Float64Gauge = (*sfGauge)(nil) func (i *sfGauge) setDelegate(m metric.Meter) { ctr, err := m.Float64Gauge(i.name, i.opts...) if err != nil { GetErrorHandler().Handle(err) return } i.delegate.Store(ctr) } func (i *sfGauge) Record(ctx context.Context, x float64, opts ...metric.RecordOption) { if ctr := i.delegate.Load(); ctr != nil { ctr.(metric.Float64Gauge).Record(ctx, x, opts...) } } type siCounter struct { embedded.Int64Counter name string opts []metric.Int64CounterOption delegate atomic.Value // metric.Int64Counter } var _ metric.Int64Counter = (*siCounter)(nil) func (i *siCounter) setDelegate(m metric.Meter) { ctr, err := m.Int64Counter(i.name, i.opts...) if err != nil { GetErrorHandler().Handle(err) return } i.delegate.Store(ctr) } func (i *siCounter) Add(ctx context.Context, x int64, opts ...metric.AddOption) { if ctr := i.delegate.Load(); ctr != nil { ctr.(metric.Int64Counter).Add(ctx, x, opts...) } } type siUpDownCounter struct { embedded.Int64UpDownCounter name string opts []metric.Int64UpDownCounterOption delegate atomic.Value // metric.Int64UpDownCounter } var _ metric.Int64UpDownCounter = (*siUpDownCounter)(nil) func (i *siUpDownCounter) setDelegate(m metric.Meter) { ctr, err := m.Int64UpDownCounter(i.name, i.opts...) if err != nil { GetErrorHandler().Handle(err) return } i.delegate.Store(ctr) } func (i *siUpDownCounter) Add(ctx context.Context, x int64, opts ...metric.AddOption) { if ctr := i.delegate.Load(); ctr != nil { ctr.(metric.Int64UpDownCounter).Add(ctx, x, opts...) } } type siHistogram struct { embedded.Int64Histogram name string opts []metric.Int64HistogramOption delegate atomic.Value // metric.Int64Histogram } var _ metric.Int64Histogram = (*siHistogram)(nil) func (i *siHistogram) setDelegate(m metric.Meter) { ctr, err := m.Int64Histogram(i.name, i.opts...) if err != nil { GetErrorHandler().Handle(err) return } i.delegate.Store(ctr) } func (i *siHistogram) Record(ctx context.Context, x int64, opts ...metric.RecordOption) { if ctr := i.delegate.Load(); ctr != nil { ctr.(metric.Int64Histogram).Record(ctx, x, opts...) } } type siGauge struct { embedded.Int64Gauge name string opts []metric.Int64GaugeOption delegate atomic.Value // metric.Int64Gauge } var _ metric.Int64Gauge = (*siGauge)(nil) func (i *siGauge) setDelegate(m metric.Meter) { ctr, err := m.Int64Gauge(i.name, i.opts...) if err != nil { GetErrorHandler().Handle(err) return } i.delegate.Store(ctr) } func (i *siGauge) Record(ctx context.Context, x int64, opts ...metric.RecordOption) { if ctr := i.delegate.Load(); ctr != nil { ctr.(metric.Int64Gauge).Record(ctx, x, opts...) } } ================================================ FILE: vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package global // import "go.opentelemetry.io/otel/internal/global" import ( "log" "os" "sync/atomic" "github.com/go-logr/logr" "github.com/go-logr/stdr" ) // globalLogger holds a reference to the [logr.Logger] used within // go.opentelemetry.io/otel. // // The default logger uses stdr which is backed by the standard `log.Logger` // interface. This logger will only show messages at the Error Level. var globalLogger = func() *atomic.Pointer[logr.Logger] { l := stdr.New(log.New(os.Stderr, "", log.LstdFlags|log.Lshortfile)) p := new(atomic.Pointer[logr.Logger]) p.Store(&l) return p }() // SetLogger sets the global Logger to l. // // To see Warn messages use a logger with `l.V(1).Enabled() == true` // To see Info messages use a logger with `l.V(4).Enabled() == true` // To see Debug messages use a logger with `l.V(8).Enabled() == true`. func SetLogger(l logr.Logger) { globalLogger.Store(&l) } // GetLogger returns the global logger. func GetLogger() logr.Logger { return *globalLogger.Load() } // Info prints messages about the general state of the API or SDK. // This should usually be less than 5 messages a minute. func Info(msg string, keysAndValues ...interface{}) { GetLogger().V(4).Info(msg, keysAndValues...) } // Error prints messages about exceptional states of the API or SDK. func Error(err error, msg string, keysAndValues ...interface{}) { GetLogger().Error(err, msg, keysAndValues...) } // Debug prints messages about all internal changes in the API or SDK. func Debug(msg string, keysAndValues ...interface{}) { GetLogger().V(8).Info(msg, keysAndValues...) } // Warn prints messages about warnings in the API or SDK. // Not an error but is likely more important than an informational event. func Warn(msg string, keysAndValues ...interface{}) { GetLogger().V(1).Info(msg, keysAndValues...) } ================================================ FILE: vendor/go.opentelemetry.io/otel/internal/global/meter.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package global // import "go.opentelemetry.io/otel/internal/global" import ( "container/list" "sync" "sync/atomic" "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/metric/embedded" ) // meterProvider is a placeholder for a configured SDK MeterProvider. // // All MeterProvider functionality is forwarded to a delegate once // configured. type meterProvider struct { embedded.MeterProvider mtx sync.Mutex meters map[il]*meter delegate metric.MeterProvider } // setDelegate configures p to delegate all MeterProvider functionality to // provider. // // All Meters provided prior to this function call are switched out to be // Meters provided by provider. All instruments and callbacks are recreated and // delegated. // // It is guaranteed by the caller that this happens only once. func (p *meterProvider) setDelegate(provider metric.MeterProvider) { p.mtx.Lock() defer p.mtx.Unlock() p.delegate = provider if len(p.meters) == 0 { return } for _, meter := range p.meters { meter.setDelegate(provider) } p.meters = nil } // Meter implements MeterProvider. func (p *meterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter { p.mtx.Lock() defer p.mtx.Unlock() if p.delegate != nil { return p.delegate.Meter(name, opts...) } // At this moment it is guaranteed that no sdk is installed, save the meter in the meters map. c := metric.NewMeterConfig(opts...) key := il{ name: name, version: c.InstrumentationVersion(), schema: c.SchemaURL(), } if p.meters == nil { p.meters = make(map[il]*meter) } if val, ok := p.meters[key]; ok { return val } t := &meter{name: name, opts: opts} p.meters[key] = t return t } // meter is a placeholder for a metric.Meter. // // All Meter functionality is forwarded to a delegate once configured. // Otherwise, all functionality is forwarded to a NoopMeter. type meter struct { embedded.Meter name string opts []metric.MeterOption mtx sync.Mutex instruments []delegatedInstrument registry list.List delegate atomic.Value // metric.Meter } type delegatedInstrument interface { setDelegate(metric.Meter) } // setDelegate configures m to delegate all Meter functionality to Meters // created by provider. // // All subsequent calls to the Meter methods will be passed to the delegate. // // It is guaranteed by the caller that this happens only once. func (m *meter) setDelegate(provider metric.MeterProvider) { meter := provider.Meter(m.name, m.opts...) m.delegate.Store(meter) m.mtx.Lock() defer m.mtx.Unlock() for _, inst := range m.instruments { inst.setDelegate(meter) } var n *list.Element for e := m.registry.Front(); e != nil; e = n { r := e.Value.(*registration) r.setDelegate(meter) n = e.Next() m.registry.Remove(e) } m.instruments = nil m.registry.Init() } func (m *meter) Int64Counter(name string, options ...metric.Int64CounterOption) (metric.Int64Counter, error) { if del, ok := m.delegate.Load().(metric.Meter); ok { return del.Int64Counter(name, options...) } m.mtx.Lock() defer m.mtx.Unlock() i := &siCounter{name: name, opts: options} m.instruments = append(m.instruments, i) return i, nil } func (m *meter) Int64UpDownCounter(name string, options ...metric.Int64UpDownCounterOption) (metric.Int64UpDownCounter, error) { if del, ok := m.delegate.Load().(metric.Meter); ok { return del.Int64UpDownCounter(name, options...) } m.mtx.Lock() defer m.mtx.Unlock() i := &siUpDownCounter{name: name, opts: options} m.instruments = append(m.instruments, i) return i, nil } func (m *meter) Int64Histogram(name string, options ...metric.Int64HistogramOption) (metric.Int64Histogram, error) { if del, ok := m.delegate.Load().(metric.Meter); ok { return del.Int64Histogram(name, options...) } m.mtx.Lock() defer m.mtx.Unlock() i := &siHistogram{name: name, opts: options} m.instruments = append(m.instruments, i) return i, nil } func (m *meter) Int64Gauge(name string, options ...metric.Int64GaugeOption) (metric.Int64Gauge, error) { if del, ok := m.delegate.Load().(metric.Meter); ok { return del.Int64Gauge(name, options...) } m.mtx.Lock() defer m.mtx.Unlock() i := &siGauge{name: name, opts: options} m.instruments = append(m.instruments, i) return i, nil } func (m *meter) Int64ObservableCounter(name string, options ...metric.Int64ObservableCounterOption) (metric.Int64ObservableCounter, error) { if del, ok := m.delegate.Load().(metric.Meter); ok { return del.Int64ObservableCounter(name, options...) } m.mtx.Lock() defer m.mtx.Unlock() i := &aiCounter{name: name, opts: options} m.instruments = append(m.instruments, i) return i, nil } func (m *meter) Int64ObservableUpDownCounter(name string, options ...metric.Int64ObservableUpDownCounterOption) (metric.Int64ObservableUpDownCounter, error) { if del, ok := m.delegate.Load().(metric.Meter); ok { return del.Int64ObservableUpDownCounter(name, options...) } m.mtx.Lock() defer m.mtx.Unlock() i := &aiUpDownCounter{name: name, opts: options} m.instruments = append(m.instruments, i) return i, nil } func (m *meter) Int64ObservableGauge(name string, options ...metric.Int64ObservableGaugeOption) (metric.Int64ObservableGauge, error) { if del, ok := m.delegate.Load().(metric.Meter); ok { return del.Int64ObservableGauge(name, options...) } m.mtx.Lock() defer m.mtx.Unlock() i := &aiGauge{name: name, opts: options} m.instruments = append(m.instruments, i) return i, nil } func (m *meter) Float64Counter(name string, options ...metric.Float64CounterOption) (metric.Float64Counter, error) { if del, ok := m.delegate.Load().(metric.Meter); ok { return del.Float64Counter(name, options...) } m.mtx.Lock() defer m.mtx.Unlock() i := &sfCounter{name: name, opts: options} m.instruments = append(m.instruments, i) return i, nil } func (m *meter) Float64UpDownCounter(name string, options ...metric.Float64UpDownCounterOption) (metric.Float64UpDownCounter, error) { if del, ok := m.delegate.Load().(metric.Meter); ok { return del.Float64UpDownCounter(name, options...) } m.mtx.Lock() defer m.mtx.Unlock() i := &sfUpDownCounter{name: name, opts: options} m.instruments = append(m.instruments, i) return i, nil } func (m *meter) Float64Histogram(name string, options ...metric.Float64HistogramOption) (metric.Float64Histogram, error) { if del, ok := m.delegate.Load().(metric.Meter); ok { return del.Float64Histogram(name, options...) } m.mtx.Lock() defer m.mtx.Unlock() i := &sfHistogram{name: name, opts: options} m.instruments = append(m.instruments, i) return i, nil } func (m *meter) Float64Gauge(name string, options ...metric.Float64GaugeOption) (metric.Float64Gauge, error) { if del, ok := m.delegate.Load().(metric.Meter); ok { return del.Float64Gauge(name, options...) } m.mtx.Lock() defer m.mtx.Unlock() i := &sfGauge{name: name, opts: options} m.instruments = append(m.instruments, i) return i, nil } func (m *meter) Float64ObservableCounter(name string, options ...metric.Float64ObservableCounterOption) (metric.Float64ObservableCounter, error) { if del, ok := m.delegate.Load().(metric.Meter); ok { return del.Float64ObservableCounter(name, options...) } m.mtx.Lock() defer m.mtx.Unlock() i := &afCounter{name: name, opts: options} m.instruments = append(m.instruments, i) return i, nil } func (m *meter) Float64ObservableUpDownCounter(name string, options ...metric.Float64ObservableUpDownCounterOption) (metric.Float64ObservableUpDownCounter, error) { if del, ok := m.delegate.Load().(metric.Meter); ok { return del.Float64ObservableUpDownCounter(name, options...) } m.mtx.Lock() defer m.mtx.Unlock() i := &afUpDownCounter{name: name, opts: options} m.instruments = append(m.instruments, i) return i, nil } func (m *meter) Float64ObservableGauge(name string, options ...metric.Float64ObservableGaugeOption) (metric.Float64ObservableGauge, error) { if del, ok := m.delegate.Load().(metric.Meter); ok { return del.Float64ObservableGauge(name, options...) } m.mtx.Lock() defer m.mtx.Unlock() i := &afGauge{name: name, opts: options} m.instruments = append(m.instruments, i) return i, nil } // RegisterCallback captures the function that will be called during Collect. func (m *meter) RegisterCallback(f metric.Callback, insts ...metric.Observable) (metric.Registration, error) { if del, ok := m.delegate.Load().(metric.Meter); ok { insts = unwrapInstruments(insts) return del.RegisterCallback(f, insts...) } m.mtx.Lock() defer m.mtx.Unlock() reg := ®istration{instruments: insts, function: f} e := m.registry.PushBack(reg) reg.unreg = func() error { m.mtx.Lock() _ = m.registry.Remove(e) m.mtx.Unlock() return nil } return reg, nil } type wrapped interface { unwrap() metric.Observable } func unwrapInstruments(instruments []metric.Observable) []metric.Observable { out := make([]metric.Observable, 0, len(instruments)) for _, inst := range instruments { if in, ok := inst.(wrapped); ok { out = append(out, in.unwrap()) } else { out = append(out, inst) } } return out } type registration struct { embedded.Registration instruments []metric.Observable function metric.Callback unreg func() error unregMu sync.Mutex } func (c *registration) setDelegate(m metric.Meter) { insts := unwrapInstruments(c.instruments) c.unregMu.Lock() defer c.unregMu.Unlock() if c.unreg == nil { // Unregister already called. return } reg, err := m.RegisterCallback(c.function, insts...) if err != nil { GetErrorHandler().Handle(err) } c.unreg = reg.Unregister } func (c *registration) Unregister() error { c.unregMu.Lock() defer c.unregMu.Unlock() if c.unreg == nil { // Unregister already called. return nil } var err error err, c.unreg = c.unreg(), nil return err } ================================================ FILE: vendor/go.opentelemetry.io/otel/internal/global/propagator.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package global // import "go.opentelemetry.io/otel/internal/global" import ( "context" "sync" "go.opentelemetry.io/otel/propagation" ) // textMapPropagator is a default TextMapPropagator that delegates calls to a // registered delegate if one is set, otherwise it defaults to delegating the // calls to a the default no-op propagation.TextMapPropagator. type textMapPropagator struct { mtx sync.Mutex once sync.Once delegate propagation.TextMapPropagator noop propagation.TextMapPropagator } // Compile-time guarantee that textMapPropagator implements the // propagation.TextMapPropagator interface. var _ propagation.TextMapPropagator = (*textMapPropagator)(nil) func newTextMapPropagator() *textMapPropagator { return &textMapPropagator{ noop: propagation.NewCompositeTextMapPropagator(), } } // SetDelegate sets a delegate propagation.TextMapPropagator that all calls are // forwarded to. Delegation can only be performed once, all subsequent calls // perform no delegation. func (p *textMapPropagator) SetDelegate(delegate propagation.TextMapPropagator) { if delegate == nil { return } p.mtx.Lock() p.once.Do(func() { p.delegate = delegate }) p.mtx.Unlock() } // effectiveDelegate returns the current delegate of p if one is set, // otherwise the default noop TextMapPropagator is returned. This method // can be called concurrently. func (p *textMapPropagator) effectiveDelegate() propagation.TextMapPropagator { p.mtx.Lock() defer p.mtx.Unlock() if p.delegate != nil { return p.delegate } return p.noop } // Inject set cross-cutting concerns from the Context into the carrier. func (p *textMapPropagator) Inject(ctx context.Context, carrier propagation.TextMapCarrier) { p.effectiveDelegate().Inject(ctx, carrier) } // Extract reads cross-cutting concerns from the carrier into a Context. func (p *textMapPropagator) Extract(ctx context.Context, carrier propagation.TextMapCarrier) context.Context { return p.effectiveDelegate().Extract(ctx, carrier) } // Fields returns the keys whose values are set with Inject. func (p *textMapPropagator) Fields() []string { return p.effectiveDelegate().Fields() } ================================================ FILE: vendor/go.opentelemetry.io/otel/internal/global/state.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package global // import "go.opentelemetry.io/otel/internal/global" import ( "errors" "sync" "sync/atomic" "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/propagation" "go.opentelemetry.io/otel/trace" ) type ( errorHandlerHolder struct { eh ErrorHandler } tracerProviderHolder struct { tp trace.TracerProvider } propagatorsHolder struct { tm propagation.TextMapPropagator } meterProviderHolder struct { mp metric.MeterProvider } ) var ( globalErrorHandler = defaultErrorHandler() globalTracer = defaultTracerValue() globalPropagators = defaultPropagatorsValue() globalMeterProvider = defaultMeterProvider() delegateErrorHandlerOnce sync.Once delegateTraceOnce sync.Once delegateTextMapPropagatorOnce sync.Once delegateMeterOnce sync.Once ) // GetErrorHandler returns the global ErrorHandler instance. // // The default ErrorHandler instance returned will log all errors to STDERR // until an override ErrorHandler is set with SetErrorHandler. All // ErrorHandler returned prior to this will automatically forward errors to // the set instance instead of logging. // // Subsequent calls to SetErrorHandler after the first will not forward errors // to the new ErrorHandler for prior returned instances. func GetErrorHandler() ErrorHandler { return globalErrorHandler.Load().(errorHandlerHolder).eh } // SetErrorHandler sets the global ErrorHandler to h. // // The first time this is called all ErrorHandler previously returned from // GetErrorHandler will send errors to h instead of the default logging // ErrorHandler. Subsequent calls will set the global ErrorHandler, but not // delegate errors to h. func SetErrorHandler(h ErrorHandler) { current := GetErrorHandler() if _, cOk := current.(*ErrDelegator); cOk { if _, ehOk := h.(*ErrDelegator); ehOk && current == h { // Do not assign to the delegate of the default ErrDelegator to be // itself. Error( errors.New("no ErrorHandler delegate configured"), "ErrorHandler remains its current value.", ) return } } delegateErrorHandlerOnce.Do(func() { if def, ok := current.(*ErrDelegator); ok { def.setDelegate(h) } }) globalErrorHandler.Store(errorHandlerHolder{eh: h}) } // TracerProvider is the internal implementation for global.TracerProvider. func TracerProvider() trace.TracerProvider { return globalTracer.Load().(tracerProviderHolder).tp } // SetTracerProvider is the internal implementation for global.SetTracerProvider. func SetTracerProvider(tp trace.TracerProvider) { current := TracerProvider() if _, cOk := current.(*tracerProvider); cOk { if _, tpOk := tp.(*tracerProvider); tpOk && current == tp { // Do not assign the default delegating TracerProvider to delegate // to itself. Error( errors.New("no delegate configured in tracer provider"), "Setting tracer provider to its current value. No delegate will be configured", ) return } } delegateTraceOnce.Do(func() { if def, ok := current.(*tracerProvider); ok { def.setDelegate(tp) } }) globalTracer.Store(tracerProviderHolder{tp: tp}) } // TextMapPropagator is the internal implementation for global.TextMapPropagator. func TextMapPropagator() propagation.TextMapPropagator { return globalPropagators.Load().(propagatorsHolder).tm } // SetTextMapPropagator is the internal implementation for global.SetTextMapPropagator. func SetTextMapPropagator(p propagation.TextMapPropagator) { current := TextMapPropagator() if _, cOk := current.(*textMapPropagator); cOk { if _, pOk := p.(*textMapPropagator); pOk && current == p { // Do not assign the default delegating TextMapPropagator to // delegate to itself. Error( errors.New("no delegate configured in text map propagator"), "Setting text map propagator to its current value. No delegate will be configured", ) return } } // For the textMapPropagator already returned by TextMapPropagator // delegate to p. delegateTextMapPropagatorOnce.Do(func() { if def, ok := current.(*textMapPropagator); ok { def.SetDelegate(p) } }) // Return p when subsequent calls to TextMapPropagator are made. globalPropagators.Store(propagatorsHolder{tm: p}) } // MeterProvider is the internal implementation for global.MeterProvider. func MeterProvider() metric.MeterProvider { return globalMeterProvider.Load().(meterProviderHolder).mp } // SetMeterProvider is the internal implementation for global.SetMeterProvider. func SetMeterProvider(mp metric.MeterProvider) { current := MeterProvider() if _, cOk := current.(*meterProvider); cOk { if _, mpOk := mp.(*meterProvider); mpOk && current == mp { // Do not assign the default delegating MeterProvider to delegate // to itself. Error( errors.New("no delegate configured in meter provider"), "Setting meter provider to its current value. No delegate will be configured", ) return } } delegateMeterOnce.Do(func() { if def, ok := current.(*meterProvider); ok { def.setDelegate(mp) } }) globalMeterProvider.Store(meterProviderHolder{mp: mp}) } func defaultErrorHandler() *atomic.Value { v := &atomic.Value{} v.Store(errorHandlerHolder{eh: &ErrDelegator{}}) return v } func defaultTracerValue() *atomic.Value { v := &atomic.Value{} v.Store(tracerProviderHolder{tp: &tracerProvider{}}) return v } func defaultPropagatorsValue() *atomic.Value { v := &atomic.Value{} v.Store(propagatorsHolder{tm: newTextMapPropagator()}) return v } func defaultMeterProvider() *atomic.Value { v := &atomic.Value{} v.Store(meterProviderHolder{mp: &meterProvider{}}) return v } ================================================ FILE: vendor/go.opentelemetry.io/otel/internal/global/trace.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package global // import "go.opentelemetry.io/otel/internal/global" /* This file contains the forwarding implementation of the TracerProvider used as the default global instance. Prior to initialization of an SDK, Tracers returned by the global TracerProvider will provide no-op functionality. This means that all Span created prior to initialization are no-op Spans. Once an SDK has been initialized, all provided no-op Tracers are swapped for Tracers provided by the SDK defined TracerProvider. However, any Span started prior to this initialization does not change its behavior. Meaning, the Span remains a no-op Span. The implementation to track and swap Tracers locks all new Tracer creation until the swap is complete. This assumes that this operation is not performance-critical. If that assumption is incorrect, be sure to configure an SDK prior to any Tracer creation. */ import ( "context" "sync" "sync/atomic" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/trace" "go.opentelemetry.io/otel/trace/embedded" ) // tracerProvider is a placeholder for a configured SDK TracerProvider. // // All TracerProvider functionality is forwarded to a delegate once // configured. type tracerProvider struct { embedded.TracerProvider mtx sync.Mutex tracers map[il]*tracer delegate trace.TracerProvider } // Compile-time guarantee that tracerProvider implements the TracerProvider // interface. var _ trace.TracerProvider = &tracerProvider{} // setDelegate configures p to delegate all TracerProvider functionality to // provider. // // All Tracers provided prior to this function call are switched out to be // Tracers provided by provider. // // It is guaranteed by the caller that this happens only once. func (p *tracerProvider) setDelegate(provider trace.TracerProvider) { p.mtx.Lock() defer p.mtx.Unlock() p.delegate = provider if len(p.tracers) == 0 { return } for _, t := range p.tracers { t.setDelegate(provider) } p.tracers = nil } // Tracer implements TracerProvider. func (p *tracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { p.mtx.Lock() defer p.mtx.Unlock() if p.delegate != nil { return p.delegate.Tracer(name, opts...) } // At this moment it is guaranteed that no sdk is installed, save the tracer in the tracers map. c := trace.NewTracerConfig(opts...) key := il{ name: name, version: c.InstrumentationVersion(), schema: c.SchemaURL(), } if p.tracers == nil { p.tracers = make(map[il]*tracer) } if val, ok := p.tracers[key]; ok { return val } t := &tracer{name: name, opts: opts, provider: p} p.tracers[key] = t return t } type il struct{ name, version, schema string } // tracer is a placeholder for a trace.Tracer. // // All Tracer functionality is forwarded to a delegate once configured. // Otherwise, all functionality is forwarded to a NoopTracer. type tracer struct { embedded.Tracer name string opts []trace.TracerOption provider *tracerProvider delegate atomic.Value } // Compile-time guarantee that tracer implements the trace.Tracer interface. var _ trace.Tracer = &tracer{} // setDelegate configures t to delegate all Tracer functionality to Tracers // created by provider. // // All subsequent calls to the Tracer methods will be passed to the delegate. // // It is guaranteed by the caller that this happens only once. func (t *tracer) setDelegate(provider trace.TracerProvider) { t.delegate.Store(provider.Tracer(t.name, t.opts...)) } // Start implements trace.Tracer by forwarding the call to t.delegate if // set, otherwise it forwards the call to a NoopTracer. func (t *tracer) Start(ctx context.Context, name string, opts ...trace.SpanStartOption) (context.Context, trace.Span) { delegate := t.delegate.Load() if delegate != nil { return delegate.(trace.Tracer).Start(ctx, name, opts...) } s := nonRecordingSpan{sc: trace.SpanContextFromContext(ctx), tracer: t} ctx = trace.ContextWithSpan(ctx, s) return ctx, s } // nonRecordingSpan is a minimal implementation of a Span that wraps a // SpanContext. It performs no operations other than to return the wrapped // SpanContext. type nonRecordingSpan struct { embedded.Span sc trace.SpanContext tracer *tracer } var _ trace.Span = nonRecordingSpan{} // SpanContext returns the wrapped SpanContext. func (s nonRecordingSpan) SpanContext() trace.SpanContext { return s.sc } // IsRecording always returns false. func (nonRecordingSpan) IsRecording() bool { return false } // SetStatus does nothing. func (nonRecordingSpan) SetStatus(codes.Code, string) {} // SetError does nothing. func (nonRecordingSpan) SetError(bool) {} // SetAttributes does nothing. func (nonRecordingSpan) SetAttributes(...attribute.KeyValue) {} // End does nothing. func (nonRecordingSpan) End(...trace.SpanEndOption) {} // RecordError does nothing. func (nonRecordingSpan) RecordError(error, ...trace.EventOption) {} // AddEvent does nothing. func (nonRecordingSpan) AddEvent(string, ...trace.EventOption) {} // AddLink does nothing. func (nonRecordingSpan) AddLink(trace.Link) {} // SetName does nothing. func (nonRecordingSpan) SetName(string) {} func (s nonRecordingSpan) TracerProvider() trace.TracerProvider { return s.tracer.provider } ================================================ FILE: vendor/go.opentelemetry.io/otel/internal/rawhelpers.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package internal // import "go.opentelemetry.io/otel/internal" import ( "math" "unsafe" ) func BoolToRaw(b bool) uint64 { // nolint:revive // b is not a control flag. if b { return 1 } return 0 } func RawToBool(r uint64) bool { return r != 0 } func Int64ToRaw(i int64) uint64 { return uint64(i) } func RawToInt64(r uint64) int64 { return int64(r) } func Float64ToRaw(f float64) uint64 { return math.Float64bits(f) } func RawToFloat64(r uint64) float64 { return math.Float64frombits(r) } func RawPtrToFloat64Ptr(r *uint64) *float64 { return (*float64)(unsafe.Pointer(r)) } func RawPtrToInt64Ptr(r *uint64) *int64 { return (*int64)(unsafe.Pointer(r)) } ================================================ FILE: vendor/go.opentelemetry.io/otel/internal_logging.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package otel // import "go.opentelemetry.io/otel" import ( "github.com/go-logr/logr" "go.opentelemetry.io/otel/internal/global" ) // SetLogger configures the logger used internally to opentelemetry. func SetLogger(logger logr.Logger) { global.SetLogger(logger) } ================================================ FILE: vendor/go.opentelemetry.io/otel/metric/LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor 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, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/go.opentelemetry.io/otel/metric/README.md ================================================ # Metric API [![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/metric)](https://pkg.go.dev/go.opentelemetry.io/otel/metric) ================================================ FILE: vendor/go.opentelemetry.io/otel/metric/asyncfloat64.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package metric // import "go.opentelemetry.io/otel/metric" import ( "context" "go.opentelemetry.io/otel/metric/embedded" ) // Float64Observable describes a set of instruments used asynchronously to // record float64 measurements once per collection cycle. Observations of // these instruments are only made within a callback. // // Warning: Methods may be added to this interface in minor releases. type Float64Observable interface { Observable float64Observable() } // Float64ObservableCounter is an instrument used to asynchronously record // increasing float64 measurements once per collection cycle. Observations are // only made within a callback for this instrument. The value observed is // assumed the to be the cumulative sum of the count. // // Warning: Methods may be added to this interface in minor releases. See // package documentation on API implementation for information on how to set // default behavior for // unimplemented methods. type Float64ObservableCounter interface { // Users of the interface can ignore this. This embedded type is only used // by implementations of this interface. See the "API Implementations" // section of the package documentation for more information. embedded.Float64ObservableCounter Float64Observable } // Float64ObservableCounterConfig contains options for asynchronous counter // instruments that record float64 values. type Float64ObservableCounterConfig struct { description string unit string callbacks []Float64Callback } // NewFloat64ObservableCounterConfig returns a new // [Float64ObservableCounterConfig] with all opts applied. func NewFloat64ObservableCounterConfig(opts ...Float64ObservableCounterOption) Float64ObservableCounterConfig { var config Float64ObservableCounterConfig for _, o := range opts { config = o.applyFloat64ObservableCounter(config) } return config } // Description returns the configured description. func (c Float64ObservableCounterConfig) Description() string { return c.description } // Unit returns the configured unit. func (c Float64ObservableCounterConfig) Unit() string { return c.unit } // Callbacks returns the configured callbacks. func (c Float64ObservableCounterConfig) Callbacks() []Float64Callback { return c.callbacks } // Float64ObservableCounterOption applies options to a // [Float64ObservableCounterConfig]. See [Float64ObservableOption] and // [InstrumentOption] for other options that can be used as a // Float64ObservableCounterOption. type Float64ObservableCounterOption interface { applyFloat64ObservableCounter(Float64ObservableCounterConfig) Float64ObservableCounterConfig } // Float64ObservableUpDownCounter is an instrument used to asynchronously // record float64 measurements once per collection cycle. Observations are only // made within a callback for this instrument. The value observed is assumed // the to be the cumulative sum of the count. // // Warning: Methods may be added to this interface in minor releases. See // package documentation on API implementation for information on how to set // default behavior for unimplemented methods. type Float64ObservableUpDownCounter interface { // Users of the interface can ignore this. This embedded type is only used // by implementations of this interface. See the "API Implementations" // section of the package documentation for more information. embedded.Float64ObservableUpDownCounter Float64Observable } // Float64ObservableUpDownCounterConfig contains options for asynchronous // counter instruments that record float64 values. type Float64ObservableUpDownCounterConfig struct { description string unit string callbacks []Float64Callback } // NewFloat64ObservableUpDownCounterConfig returns a new // [Float64ObservableUpDownCounterConfig] with all opts applied. func NewFloat64ObservableUpDownCounterConfig(opts ...Float64ObservableUpDownCounterOption) Float64ObservableUpDownCounterConfig { var config Float64ObservableUpDownCounterConfig for _, o := range opts { config = o.applyFloat64ObservableUpDownCounter(config) } return config } // Description returns the configured description. func (c Float64ObservableUpDownCounterConfig) Description() string { return c.description } // Unit returns the configured unit. func (c Float64ObservableUpDownCounterConfig) Unit() string { return c.unit } // Callbacks returns the configured callbacks. func (c Float64ObservableUpDownCounterConfig) Callbacks() []Float64Callback { return c.callbacks } // Float64ObservableUpDownCounterOption applies options to a // [Float64ObservableUpDownCounterConfig]. See [Float64ObservableOption] and // [InstrumentOption] for other options that can be used as a // Float64ObservableUpDownCounterOption. type Float64ObservableUpDownCounterOption interface { applyFloat64ObservableUpDownCounter(Float64ObservableUpDownCounterConfig) Float64ObservableUpDownCounterConfig } // Float64ObservableGauge is an instrument used to asynchronously record // instantaneous float64 measurements once per collection cycle. Observations // are only made within a callback for this instrument. // // Warning: Methods may be added to this interface in minor releases. See // package documentation on API implementation for information on how to set // default behavior for unimplemented methods. type Float64ObservableGauge interface { // Users of the interface can ignore this. This embedded type is only used // by implementations of this interface. See the "API Implementations" // section of the package documentation for more information. embedded.Float64ObservableGauge Float64Observable } // Float64ObservableGaugeConfig contains options for asynchronous counter // instruments that record float64 values. type Float64ObservableGaugeConfig struct { description string unit string callbacks []Float64Callback } // NewFloat64ObservableGaugeConfig returns a new [Float64ObservableGaugeConfig] // with all opts applied. func NewFloat64ObservableGaugeConfig(opts ...Float64ObservableGaugeOption) Float64ObservableGaugeConfig { var config Float64ObservableGaugeConfig for _, o := range opts { config = o.applyFloat64ObservableGauge(config) } return config } // Description returns the configured description. func (c Float64ObservableGaugeConfig) Description() string { return c.description } // Unit returns the configured unit. func (c Float64ObservableGaugeConfig) Unit() string { return c.unit } // Callbacks returns the configured callbacks. func (c Float64ObservableGaugeConfig) Callbacks() []Float64Callback { return c.callbacks } // Float64ObservableGaugeOption applies options to a // [Float64ObservableGaugeConfig]. See [Float64ObservableOption] and // [InstrumentOption] for other options that can be used as a // Float64ObservableGaugeOption. type Float64ObservableGaugeOption interface { applyFloat64ObservableGauge(Float64ObservableGaugeConfig) Float64ObservableGaugeConfig } // Float64Observer is a recorder of float64 measurements. // // Warning: Methods may be added to this interface in minor releases. See // package documentation on API implementation for information on how to set // default behavior for unimplemented methods. type Float64Observer interface { // Users of the interface can ignore this. This embedded type is only used // by implementations of this interface. See the "API Implementations" // section of the package documentation for more information. embedded.Float64Observer // Observe records the float64 value. // // Use the WithAttributeSet (or, if performance is not a concern, // the WithAttributes) option to include measurement attributes. Observe(value float64, options ...ObserveOption) } // Float64Callback is a function registered with a Meter that makes // observations for a Float64Observerable instrument it is registered with. // Calls to the Float64Observer record measurement values for the // Float64Observable. // // The function needs to complete in a finite amount of time and the deadline // of the passed context is expected to be honored. // // The function needs to make unique observations across all registered // Float64Callbacks. Meaning, it should not report measurements with the same // attributes as another Float64Callbacks also registered for the same // instrument. // // The function needs to be concurrent safe. type Float64Callback func(context.Context, Float64Observer) error // Float64ObservableOption applies options to float64 Observer instruments. type Float64ObservableOption interface { Float64ObservableCounterOption Float64ObservableUpDownCounterOption Float64ObservableGaugeOption } type float64CallbackOpt struct { cback Float64Callback } func (o float64CallbackOpt) applyFloat64ObservableCounter(cfg Float64ObservableCounterConfig) Float64ObservableCounterConfig { cfg.callbacks = append(cfg.callbacks, o.cback) return cfg } func (o float64CallbackOpt) applyFloat64ObservableUpDownCounter(cfg Float64ObservableUpDownCounterConfig) Float64ObservableUpDownCounterConfig { cfg.callbacks = append(cfg.callbacks, o.cback) return cfg } func (o float64CallbackOpt) applyFloat64ObservableGauge(cfg Float64ObservableGaugeConfig) Float64ObservableGaugeConfig { cfg.callbacks = append(cfg.callbacks, o.cback) return cfg } // WithFloat64Callback adds callback to be called for an instrument. func WithFloat64Callback(callback Float64Callback) Float64ObservableOption { return float64CallbackOpt{callback} } ================================================ FILE: vendor/go.opentelemetry.io/otel/metric/asyncint64.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package metric // import "go.opentelemetry.io/otel/metric" import ( "context" "go.opentelemetry.io/otel/metric/embedded" ) // Int64Observable describes a set of instruments used asynchronously to record // int64 measurements once per collection cycle. Observations of these // instruments are only made within a callback. // // Warning: Methods may be added to this interface in minor releases. type Int64Observable interface { Observable int64Observable() } // Int64ObservableCounter is an instrument used to asynchronously record // increasing int64 measurements once per collection cycle. Observations are // only made within a callback for this instrument. The value observed is // assumed the to be the cumulative sum of the count. // // Warning: Methods may be added to this interface in minor releases. See // package documentation on API implementation for information on how to set // default behavior for unimplemented methods. type Int64ObservableCounter interface { // Users of the interface can ignore this. This embedded type is only used // by implementations of this interface. See the "API Implementations" // section of the package documentation for more information. embedded.Int64ObservableCounter Int64Observable } // Int64ObservableCounterConfig contains options for asynchronous counter // instruments that record int64 values. type Int64ObservableCounterConfig struct { description string unit string callbacks []Int64Callback } // NewInt64ObservableCounterConfig returns a new [Int64ObservableCounterConfig] // with all opts applied. func NewInt64ObservableCounterConfig(opts ...Int64ObservableCounterOption) Int64ObservableCounterConfig { var config Int64ObservableCounterConfig for _, o := range opts { config = o.applyInt64ObservableCounter(config) } return config } // Description returns the configured description. func (c Int64ObservableCounterConfig) Description() string { return c.description } // Unit returns the configured unit. func (c Int64ObservableCounterConfig) Unit() string { return c.unit } // Callbacks returns the configured callbacks. func (c Int64ObservableCounterConfig) Callbacks() []Int64Callback { return c.callbacks } // Int64ObservableCounterOption applies options to a // [Int64ObservableCounterConfig]. See [Int64ObservableOption] and // [InstrumentOption] for other options that can be used as an // Int64ObservableCounterOption. type Int64ObservableCounterOption interface { applyInt64ObservableCounter(Int64ObservableCounterConfig) Int64ObservableCounterConfig } // Int64ObservableUpDownCounter is an instrument used to asynchronously record // int64 measurements once per collection cycle. Observations are only made // within a callback for this instrument. The value observed is assumed the to // be the cumulative sum of the count. // // Warning: Methods may be added to this interface in minor releases. See // package documentation on API implementation for information on how to set // default behavior for unimplemented methods. type Int64ObservableUpDownCounter interface { // Users of the interface can ignore this. This embedded type is only used // by implementations of this interface. See the "API Implementations" // section of the package documentation for more information. embedded.Int64ObservableUpDownCounter Int64Observable } // Int64ObservableUpDownCounterConfig contains options for asynchronous counter // instruments that record int64 values. type Int64ObservableUpDownCounterConfig struct { description string unit string callbacks []Int64Callback } // NewInt64ObservableUpDownCounterConfig returns a new // [Int64ObservableUpDownCounterConfig] with all opts applied. func NewInt64ObservableUpDownCounterConfig(opts ...Int64ObservableUpDownCounterOption) Int64ObservableUpDownCounterConfig { var config Int64ObservableUpDownCounterConfig for _, o := range opts { config = o.applyInt64ObservableUpDownCounter(config) } return config } // Description returns the configured description. func (c Int64ObservableUpDownCounterConfig) Description() string { return c.description } // Unit returns the configured unit. func (c Int64ObservableUpDownCounterConfig) Unit() string { return c.unit } // Callbacks returns the configured callbacks. func (c Int64ObservableUpDownCounterConfig) Callbacks() []Int64Callback { return c.callbacks } // Int64ObservableUpDownCounterOption applies options to a // [Int64ObservableUpDownCounterConfig]. See [Int64ObservableOption] and // [InstrumentOption] for other options that can be used as an // Int64ObservableUpDownCounterOption. type Int64ObservableUpDownCounterOption interface { applyInt64ObservableUpDownCounter(Int64ObservableUpDownCounterConfig) Int64ObservableUpDownCounterConfig } // Int64ObservableGauge is an instrument used to asynchronously record // instantaneous int64 measurements once per collection cycle. Observations are // only made within a callback for this instrument. // // Warning: Methods may be added to this interface in minor releases. See // package documentation on API implementation for information on how to set // default behavior for unimplemented methods. type Int64ObservableGauge interface { // Users of the interface can ignore this. This embedded type is only used // by implementations of this interface. See the "API Implementations" // section of the package documentation for more information. embedded.Int64ObservableGauge Int64Observable } // Int64ObservableGaugeConfig contains options for asynchronous counter // instruments that record int64 values. type Int64ObservableGaugeConfig struct { description string unit string callbacks []Int64Callback } // NewInt64ObservableGaugeConfig returns a new [Int64ObservableGaugeConfig] // with all opts applied. func NewInt64ObservableGaugeConfig(opts ...Int64ObservableGaugeOption) Int64ObservableGaugeConfig { var config Int64ObservableGaugeConfig for _, o := range opts { config = o.applyInt64ObservableGauge(config) } return config } // Description returns the configured description. func (c Int64ObservableGaugeConfig) Description() string { return c.description } // Unit returns the configured unit. func (c Int64ObservableGaugeConfig) Unit() string { return c.unit } // Callbacks returns the configured callbacks. func (c Int64ObservableGaugeConfig) Callbacks() []Int64Callback { return c.callbacks } // Int64ObservableGaugeOption applies options to a // [Int64ObservableGaugeConfig]. See [Int64ObservableOption] and // [InstrumentOption] for other options that can be used as an // Int64ObservableGaugeOption. type Int64ObservableGaugeOption interface { applyInt64ObservableGauge(Int64ObservableGaugeConfig) Int64ObservableGaugeConfig } // Int64Observer is a recorder of int64 measurements. // // Warning: Methods may be added to this interface in minor releases. See // package documentation on API implementation for information on how to set // default behavior for unimplemented methods. type Int64Observer interface { // Users of the interface can ignore this. This embedded type is only used // by implementations of this interface. See the "API Implementations" // section of the package documentation for more information. embedded.Int64Observer // Observe records the int64 value. // // Use the WithAttributeSet (or, if performance is not a concern, // the WithAttributes) option to include measurement attributes. Observe(value int64, options ...ObserveOption) } // Int64Callback is a function registered with a Meter that makes observations // for an Int64Observerable instrument it is registered with. Calls to the // Int64Observer record measurement values for the Int64Observable. // // The function needs to complete in a finite amount of time and the deadline // of the passed context is expected to be honored. // // The function needs to make unique observations across all registered // Int64Callbacks. Meaning, it should not report measurements with the same // attributes as another Int64Callbacks also registered for the same // instrument. // // The function needs to be concurrent safe. type Int64Callback func(context.Context, Int64Observer) error // Int64ObservableOption applies options to int64 Observer instruments. type Int64ObservableOption interface { Int64ObservableCounterOption Int64ObservableUpDownCounterOption Int64ObservableGaugeOption } type int64CallbackOpt struct { cback Int64Callback } func (o int64CallbackOpt) applyInt64ObservableCounter(cfg Int64ObservableCounterConfig) Int64ObservableCounterConfig { cfg.callbacks = append(cfg.callbacks, o.cback) return cfg } func (o int64CallbackOpt) applyInt64ObservableUpDownCounter(cfg Int64ObservableUpDownCounterConfig) Int64ObservableUpDownCounterConfig { cfg.callbacks = append(cfg.callbacks, o.cback) return cfg } func (o int64CallbackOpt) applyInt64ObservableGauge(cfg Int64ObservableGaugeConfig) Int64ObservableGaugeConfig { cfg.callbacks = append(cfg.callbacks, o.cback) return cfg } // WithInt64Callback adds callback to be called for an instrument. func WithInt64Callback(callback Int64Callback) Int64ObservableOption { return int64CallbackOpt{callback} } ================================================ FILE: vendor/go.opentelemetry.io/otel/metric/config.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package metric // import "go.opentelemetry.io/otel/metric" import "go.opentelemetry.io/otel/attribute" // MeterConfig contains options for Meters. type MeterConfig struct { instrumentationVersion string schemaURL string attrs attribute.Set // Ensure forward compatibility by explicitly making this not comparable. noCmp [0]func() //nolint: unused // This is indeed used. } // InstrumentationVersion returns the version of the library providing // instrumentation. func (cfg MeterConfig) InstrumentationVersion() string { return cfg.instrumentationVersion } // InstrumentationAttributes returns the attributes associated with the library // providing instrumentation. func (cfg MeterConfig) InstrumentationAttributes() attribute.Set { return cfg.attrs } // SchemaURL is the schema_url of the library providing instrumentation. func (cfg MeterConfig) SchemaURL() string { return cfg.schemaURL } // MeterOption is an interface for applying Meter options. type MeterOption interface { // applyMeter is used to set a MeterOption value of a MeterConfig. applyMeter(MeterConfig) MeterConfig } // NewMeterConfig creates a new MeterConfig and applies // all the given options. func NewMeterConfig(opts ...MeterOption) MeterConfig { var config MeterConfig for _, o := range opts { config = o.applyMeter(config) } return config } type meterOptionFunc func(MeterConfig) MeterConfig func (fn meterOptionFunc) applyMeter(cfg MeterConfig) MeterConfig { return fn(cfg) } // WithInstrumentationVersion sets the instrumentation version. func WithInstrumentationVersion(version string) MeterOption { return meterOptionFunc(func(config MeterConfig) MeterConfig { config.instrumentationVersion = version return config }) } // WithInstrumentationAttributes sets the instrumentation attributes. // // The passed attributes will be de-duplicated. func WithInstrumentationAttributes(attr ...attribute.KeyValue) MeterOption { return meterOptionFunc(func(config MeterConfig) MeterConfig { config.attrs = attribute.NewSet(attr...) return config }) } // WithSchemaURL sets the schema URL. func WithSchemaURL(schemaURL string) MeterOption { return meterOptionFunc(func(config MeterConfig) MeterConfig { config.schemaURL = schemaURL return config }) } ================================================ FILE: vendor/go.opentelemetry.io/otel/metric/doc.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 /* Package metric provides the OpenTelemetry API used to measure metrics about source code operation. This API is separate from its implementation so the instrumentation built from it is reusable. See [go.opentelemetry.io/otel/sdk/metric] for the official OpenTelemetry implementation of this API. All measurements made with this package are made via instruments. These instruments are created by a [Meter] which itself is created by a [MeterProvider]. Applications need to accept a [MeterProvider] implementation as a starting point when instrumenting. This can be done directly, or by using the OpenTelemetry global MeterProvider via [GetMeterProvider]. Using an appropriately named [Meter] from the accepted [MeterProvider], instrumentation can then be built from the [Meter]'s instruments. # Instruments Each instrument is designed to make measurements of a particular type. Broadly, all instruments fall into two overlapping logical categories: asynchronous or synchronous, and int64 or float64. All synchronous instruments ([Int64Counter], [Int64UpDownCounter], [Int64Histogram], [Float64Counter], [Float64UpDownCounter], and [Float64Histogram]) are used to measure the operation and performance of source code during the source code execution. These instruments only make measurements when the source code they instrument is run. All asynchronous instruments ([Int64ObservableCounter], [Int64ObservableUpDownCounter], [Int64ObservableGauge], [Float64ObservableCounter], [Float64ObservableUpDownCounter], and [Float64ObservableGauge]) are used to measure metrics outside of the execution of source code. They are said to make "observations" via a callback function called once every measurement collection cycle. Each instrument is also grouped by the value type it measures. Either int64 or float64. The value being measured will dictate which instrument in these categories to use. Outside of these two broad categories, instruments are described by the function they are designed to serve. All Counters ([Int64Counter], [Float64Counter], [Int64ObservableCounter], and [Float64ObservableCounter]) are designed to measure values that never decrease in value, but instead only incrementally increase in value. UpDownCounters ([Int64UpDownCounter], [Float64UpDownCounter], [Int64ObservableUpDownCounter], and [Float64ObservableUpDownCounter]) on the other hand, are designed to measure values that can increase and decrease. When more information needs to be conveyed about all the synchronous measurements made during a collection cycle, a Histogram ([Int64Histogram] and [Float64Histogram]) should be used. Finally, when just the most recent measurement needs to be conveyed about an asynchronous measurement, a Gauge ([Int64ObservableGauge] and [Float64ObservableGauge]) should be used. See the [OpenTelemetry documentation] for more information about instruments and their intended use. # Instrument Name OpenTelemetry defines an [instrument name syntax] that restricts what instrument names are allowed. Instrument names should ... - Not be empty. - Have an alphabetic character as their first letter. - Have any letter after the first be an alphanumeric character, ‘_’, ‘.’, ‘-’, or ‘/’. - Have a maximum length of 255 letters. To ensure compatibility with observability platforms, all instruments created need to conform to this syntax. Not all implementations of the API will validate these names, it is the callers responsibility to ensure compliance. # Measurements Measurements are made by recording values and information about the values with an instrument. How these measurements are recorded depends on the instrument. Measurements for synchronous instruments ([Int64Counter], [Int64UpDownCounter], [Int64Histogram], [Float64Counter], [Float64UpDownCounter], and [Float64Histogram]) are recorded using the instrument methods directly. All counter instruments have an Add method that is used to measure an increment value, and all histogram instruments have a Record method to measure a data point. Asynchronous instruments ([Int64ObservableCounter], [Int64ObservableUpDownCounter], [Int64ObservableGauge], [Float64ObservableCounter], [Float64ObservableUpDownCounter], and [Float64ObservableGauge]) record measurements within a callback function. The callback is registered with the Meter which ensures the callback is called once per collection cycle. A callback can be registered two ways: during the instrument's creation using an option, or later using the RegisterCallback method of the [Meter] that created the instrument. If the following criteria are met, an option ([WithInt64Callback] or [WithFloat64Callback]) can be used during the asynchronous instrument's creation to register a callback ([Int64Callback] or [Float64Callback], respectively): - The measurement process is known when the instrument is created - Only that instrument will make a measurement within the callback - The callback never needs to be unregistered If the criteria are not met, use the RegisterCallback method of the [Meter] that created the instrument to register a [Callback]. # API Implementations This package does not conform to the standard Go versioning policy, all of its interfaces may have methods added to them without a package major version bump. This non-standard API evolution could surprise an uninformed implementation author. They could unknowingly build their implementation in a way that would result in a runtime panic for their users that update to the new API. The API is designed to help inform an instrumentation author about this non-standard API evolution. It requires them to choose a default behavior for unimplemented interface methods. There are three behavior choices they can make: - Compilation failure - Panic - Default to another implementation All interfaces in this API embed a corresponding interface from [go.opentelemetry.io/otel/metric/embedded]. If an author wants the default behavior of their implementations to be a compilation failure, signaling to their users they need to update to the latest version of that implementation, they need to embed the corresponding interface from [go.opentelemetry.io/otel/metric/embedded] in their implementation. For example, import "go.opentelemetry.io/otel/metric/embedded" type MeterProvider struct { embedded.MeterProvider // ... } If an author wants the default behavior of their implementations to a panic, they need to embed the API interface directly. import "go.opentelemetry.io/otel/metric" type MeterProvider struct { metric.MeterProvider // ... } This is not a recommended behavior as it could lead to publishing packages that contain runtime panics when users update other package that use newer versions of [go.opentelemetry.io/otel/metric]. Finally, an author can embed another implementation in theirs. The embedded implementation will be used for methods not defined by the author. For example, an author who wants to default to silently dropping the call can use [go.opentelemetry.io/otel/metric/noop]: import "go.opentelemetry.io/otel/metric/noop" type MeterProvider struct { noop.MeterProvider // ... } It is strongly recommended that authors only embed [go.opentelemetry.io/otel/metric/noop] if they choose this default behavior. That implementation is the only one OpenTelemetry authors can guarantee will fully implement all the API interfaces when a user updates their API. [instrument name syntax]: https://opentelemetry.io/docs/specs/otel/metrics/api/#instrument-name-syntax [OpenTelemetry documentation]: https://opentelemetry.io/docs/concepts/signals/metrics/ [GetMeterProvider]: https://pkg.go.dev/go.opentelemetry.io/otel#GetMeterProvider */ package metric // import "go.opentelemetry.io/otel/metric" ================================================ FILE: vendor/go.opentelemetry.io/otel/metric/embedded/README.md ================================================ # Metric Embedded [![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/metric/embedded)](https://pkg.go.dev/go.opentelemetry.io/otel/metric/embedded) ================================================ FILE: vendor/go.opentelemetry.io/otel/metric/embedded/embedded.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 // Package embedded provides interfaces embedded within the [OpenTelemetry // metric API]. // // Implementers of the [OpenTelemetry metric API] can embed the relevant type // from this package into their implementation directly. Doing so will result // in a compilation error for users when the [OpenTelemetry metric API] is // extended (which is something that can happen without a major version bump of // the API package). // // [OpenTelemetry metric API]: https://pkg.go.dev/go.opentelemetry.io/otel/metric package embedded // import "go.opentelemetry.io/otel/metric/embedded" // MeterProvider is embedded in // [go.opentelemetry.io/otel/metric.MeterProvider]. // // Embed this interface in your implementation of the // [go.opentelemetry.io/otel/metric.MeterProvider] if you want users to // experience a compilation error, signaling they need to update to your latest // implementation, when the [go.opentelemetry.io/otel/metric.MeterProvider] // interface is extended (which is something that can happen without a major // version bump of the API package). type MeterProvider interface{ meterProvider() } // Meter is embedded in [go.opentelemetry.io/otel/metric.Meter]. // // Embed this interface in your implementation of the // [go.opentelemetry.io/otel/metric.Meter] if you want users to experience a // compilation error, signaling they need to update to your latest // implementation, when the [go.opentelemetry.io/otel/metric.Meter] interface // is extended (which is something that can happen without a major version bump // of the API package). type Meter interface{ meter() } // Float64Observer is embedded in // [go.opentelemetry.io/otel/metric.Float64Observer]. // // Embed this interface in your implementation of the // [go.opentelemetry.io/otel/metric.Float64Observer] if you want // users to experience a compilation error, signaling they need to update to // your latest implementation, when the // [go.opentelemetry.io/otel/metric.Float64Observer] interface is // extended (which is something that can happen without a major version bump of // the API package). type Float64Observer interface{ float64Observer() } // Int64Observer is embedded in // [go.opentelemetry.io/otel/metric.Int64Observer]. // // Embed this interface in your implementation of the // [go.opentelemetry.io/otel/metric.Int64Observer] if you want users // to experience a compilation error, signaling they need to update to your // latest implementation, when the // [go.opentelemetry.io/otel/metric.Int64Observer] interface is // extended (which is something that can happen without a major version bump of // the API package). type Int64Observer interface{ int64Observer() } // Observer is embedded in [go.opentelemetry.io/otel/metric.Observer]. // // Embed this interface in your implementation of the // [go.opentelemetry.io/otel/metric.Observer] if you want users to experience a // compilation error, signaling they need to update to your latest // implementation, when the [go.opentelemetry.io/otel/metric.Observer] // interface is extended (which is something that can happen without a major // version bump of the API package). type Observer interface{ observer() } // Registration is embedded in [go.opentelemetry.io/otel/metric.Registration]. // // Embed this interface in your implementation of the // [go.opentelemetry.io/otel/metric.Registration] if you want users to // experience a compilation error, signaling they need to update to your latest // implementation, when the [go.opentelemetry.io/otel/metric.Registration] // interface is extended (which is something that can happen without a major // version bump of the API package). type Registration interface{ registration() } // Float64Counter is embedded in // [go.opentelemetry.io/otel/metric.Float64Counter]. // // Embed this interface in your implementation of the // [go.opentelemetry.io/otel/metric.Float64Counter] if you want // users to experience a compilation error, signaling they need to update to // your latest implementation, when the // [go.opentelemetry.io/otel/metric.Float64Counter] interface is // extended (which is something that can happen without a major version bump of // the API package). type Float64Counter interface{ float64Counter() } // Float64Histogram is embedded in // [go.opentelemetry.io/otel/metric.Float64Histogram]. // // Embed this interface in your implementation of the // [go.opentelemetry.io/otel/metric.Float64Histogram] if you want // users to experience a compilation error, signaling they need to update to // your latest implementation, when the // [go.opentelemetry.io/otel/metric.Float64Histogram] interface is // extended (which is something that can happen without a major version bump of // the API package). type Float64Histogram interface{ float64Histogram() } // Float64Gauge is embedded in [go.opentelemetry.io/otel/metric.Float64Gauge]. // // Embed this interface in your implementation of the // [go.opentelemetry.io/otel/metric.Float64Gauge] if you want users to // experience a compilation error, signaling they need to update to your latest // implementation, when the [go.opentelemetry.io/otel/metric.Float64Gauge] // interface is extended (which is something that can happen without a major // version bump of the API package). type Float64Gauge interface{ float64Gauge() } // Float64ObservableCounter is embedded in // [go.opentelemetry.io/otel/metric.Float64ObservableCounter]. // // Embed this interface in your implementation of the // [go.opentelemetry.io/otel/metric.Float64ObservableCounter] if you // want users to experience a compilation error, signaling they need to update // to your latest implementation, when the // [go.opentelemetry.io/otel/metric.Float64ObservableCounter] // interface is extended (which is something that can happen without a major // version bump of the API package). type Float64ObservableCounter interface{ float64ObservableCounter() } // Float64ObservableGauge is embedded in // [go.opentelemetry.io/otel/metric.Float64ObservableGauge]. // // Embed this interface in your implementation of the // [go.opentelemetry.io/otel/metric.Float64ObservableGauge] if you // want users to experience a compilation error, signaling they need to update // to your latest implementation, when the // [go.opentelemetry.io/otel/metric.Float64ObservableGauge] // interface is extended (which is something that can happen without a major // version bump of the API package). type Float64ObservableGauge interface{ float64ObservableGauge() } // Float64ObservableUpDownCounter is embedded in // [go.opentelemetry.io/otel/metric.Float64ObservableUpDownCounter]. // // Embed this interface in your implementation of the // [go.opentelemetry.io/otel/metric.Float64ObservableUpDownCounter] // if you want users to experience a compilation error, signaling they need to // update to your latest implementation, when the // [go.opentelemetry.io/otel/metric.Float64ObservableUpDownCounter] // interface is extended (which is something that can happen without a major // version bump of the API package). type Float64ObservableUpDownCounter interface{ float64ObservableUpDownCounter() } // Float64UpDownCounter is embedded in // [go.opentelemetry.io/otel/metric.Float64UpDownCounter]. // // Embed this interface in your implementation of the // [go.opentelemetry.io/otel/metric.Float64UpDownCounter] if you // want users to experience a compilation error, signaling they need to update // to your latest implementation, when the // [go.opentelemetry.io/otel/metric.Float64UpDownCounter] interface // is extended (which is something that can happen without a major version bump // of the API package). type Float64UpDownCounter interface{ float64UpDownCounter() } // Int64Counter is embedded in // [go.opentelemetry.io/otel/metric.Int64Counter]. // // Embed this interface in your implementation of the // [go.opentelemetry.io/otel/metric.Int64Counter] if you want users // to experience a compilation error, signaling they need to update to your // latest implementation, when the // [go.opentelemetry.io/otel/metric.Int64Counter] interface is // extended (which is something that can happen without a major version bump of // the API package). type Int64Counter interface{ int64Counter() } // Int64Histogram is embedded in // [go.opentelemetry.io/otel/metric.Int64Histogram]. // // Embed this interface in your implementation of the // [go.opentelemetry.io/otel/metric.Int64Histogram] if you want // users to experience a compilation error, signaling they need to update to // your latest implementation, when the // [go.opentelemetry.io/otel/metric.Int64Histogram] interface is // extended (which is something that can happen without a major version bump of // the API package). type Int64Histogram interface{ int64Histogram() } // Int64Gauge is embedded in [go.opentelemetry.io/otel/metric.Int64Gauge]. // // Embed this interface in your implementation of the // [go.opentelemetry.io/otel/metric.Int64Gauge] if you want users to experience // a compilation error, signaling they need to update to your latest // implementation, when the [go.opentelemetry.io/otel/metric.Int64Gauge] // interface is extended (which is something that can happen without a major // version bump of the API package). type Int64Gauge interface{ int64Gauge() } // Int64ObservableCounter is embedded in // [go.opentelemetry.io/otel/metric.Int64ObservableCounter]. // // Embed this interface in your implementation of the // [go.opentelemetry.io/otel/metric.Int64ObservableCounter] if you // want users to experience a compilation error, signaling they need to update // to your latest implementation, when the // [go.opentelemetry.io/otel/metric.Int64ObservableCounter] // interface is extended (which is something that can happen without a major // version bump of the API package). type Int64ObservableCounter interface{ int64ObservableCounter() } // Int64ObservableGauge is embedded in // [go.opentelemetry.io/otel/metric.Int64ObservableGauge]. // // Embed this interface in your implementation of the // [go.opentelemetry.io/otel/metric.Int64ObservableGauge] if you // want users to experience a compilation error, signaling they need to update // to your latest implementation, when the // [go.opentelemetry.io/otel/metric.Int64ObservableGauge] interface // is extended (which is something that can happen without a major version bump // of the API package). type Int64ObservableGauge interface{ int64ObservableGauge() } // Int64ObservableUpDownCounter is embedded in // [go.opentelemetry.io/otel/metric.Int64ObservableUpDownCounter]. // // Embed this interface in your implementation of the // [go.opentelemetry.io/otel/metric.Int64ObservableUpDownCounter] if // you want users to experience a compilation error, signaling they need to // update to your latest implementation, when the // [go.opentelemetry.io/otel/metric.Int64ObservableUpDownCounter] // interface is extended (which is something that can happen without a major // version bump of the API package). type Int64ObservableUpDownCounter interface{ int64ObservableUpDownCounter() } // Int64UpDownCounter is embedded in // [go.opentelemetry.io/otel/metric.Int64UpDownCounter]. // // Embed this interface in your implementation of the // [go.opentelemetry.io/otel/metric.Int64UpDownCounter] if you want // users to experience a compilation error, signaling they need to update to // your latest implementation, when the // [go.opentelemetry.io/otel/metric.Int64UpDownCounter] interface is // extended (which is something that can happen without a major version bump of // the API package). type Int64UpDownCounter interface{ int64UpDownCounter() } ================================================ FILE: vendor/go.opentelemetry.io/otel/metric/instrument.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package metric // import "go.opentelemetry.io/otel/metric" import "go.opentelemetry.io/otel/attribute" // Observable is used as a grouping mechanism for all instruments that are // updated within a Callback. type Observable interface { observable() } // InstrumentOption applies options to all instruments. type InstrumentOption interface { Int64CounterOption Int64UpDownCounterOption Int64HistogramOption Int64GaugeOption Int64ObservableCounterOption Int64ObservableUpDownCounterOption Int64ObservableGaugeOption Float64CounterOption Float64UpDownCounterOption Float64HistogramOption Float64GaugeOption Float64ObservableCounterOption Float64ObservableUpDownCounterOption Float64ObservableGaugeOption } // HistogramOption applies options to histogram instruments. type HistogramOption interface { Int64HistogramOption Float64HistogramOption } type descOpt string func (o descOpt) applyFloat64Counter(c Float64CounterConfig) Float64CounterConfig { c.description = string(o) return c } func (o descOpt) applyFloat64UpDownCounter(c Float64UpDownCounterConfig) Float64UpDownCounterConfig { c.description = string(o) return c } func (o descOpt) applyFloat64Histogram(c Float64HistogramConfig) Float64HistogramConfig { c.description = string(o) return c } func (o descOpt) applyFloat64Gauge(c Float64GaugeConfig) Float64GaugeConfig { c.description = string(o) return c } func (o descOpt) applyFloat64ObservableCounter(c Float64ObservableCounterConfig) Float64ObservableCounterConfig { c.description = string(o) return c } func (o descOpt) applyFloat64ObservableUpDownCounter(c Float64ObservableUpDownCounterConfig) Float64ObservableUpDownCounterConfig { c.description = string(o) return c } func (o descOpt) applyFloat64ObservableGauge(c Float64ObservableGaugeConfig) Float64ObservableGaugeConfig { c.description = string(o) return c } func (o descOpt) applyInt64Counter(c Int64CounterConfig) Int64CounterConfig { c.description = string(o) return c } func (o descOpt) applyInt64UpDownCounter(c Int64UpDownCounterConfig) Int64UpDownCounterConfig { c.description = string(o) return c } func (o descOpt) applyInt64Histogram(c Int64HistogramConfig) Int64HistogramConfig { c.description = string(o) return c } func (o descOpt) applyInt64Gauge(c Int64GaugeConfig) Int64GaugeConfig { c.description = string(o) return c } func (o descOpt) applyInt64ObservableCounter(c Int64ObservableCounterConfig) Int64ObservableCounterConfig { c.description = string(o) return c } func (o descOpt) applyInt64ObservableUpDownCounter(c Int64ObservableUpDownCounterConfig) Int64ObservableUpDownCounterConfig { c.description = string(o) return c } func (o descOpt) applyInt64ObservableGauge(c Int64ObservableGaugeConfig) Int64ObservableGaugeConfig { c.description = string(o) return c } // WithDescription sets the instrument description. func WithDescription(desc string) InstrumentOption { return descOpt(desc) } type unitOpt string func (o unitOpt) applyFloat64Counter(c Float64CounterConfig) Float64CounterConfig { c.unit = string(o) return c } func (o unitOpt) applyFloat64UpDownCounter(c Float64UpDownCounterConfig) Float64UpDownCounterConfig { c.unit = string(o) return c } func (o unitOpt) applyFloat64Histogram(c Float64HistogramConfig) Float64HistogramConfig { c.unit = string(o) return c } func (o unitOpt) applyFloat64Gauge(c Float64GaugeConfig) Float64GaugeConfig { c.unit = string(o) return c } func (o unitOpt) applyFloat64ObservableCounter(c Float64ObservableCounterConfig) Float64ObservableCounterConfig { c.unit = string(o) return c } func (o unitOpt) applyFloat64ObservableUpDownCounter(c Float64ObservableUpDownCounterConfig) Float64ObservableUpDownCounterConfig { c.unit = string(o) return c } func (o unitOpt) applyFloat64ObservableGauge(c Float64ObservableGaugeConfig) Float64ObservableGaugeConfig { c.unit = string(o) return c } func (o unitOpt) applyInt64Counter(c Int64CounterConfig) Int64CounterConfig { c.unit = string(o) return c } func (o unitOpt) applyInt64UpDownCounter(c Int64UpDownCounterConfig) Int64UpDownCounterConfig { c.unit = string(o) return c } func (o unitOpt) applyInt64Histogram(c Int64HistogramConfig) Int64HistogramConfig { c.unit = string(o) return c } func (o unitOpt) applyInt64Gauge(c Int64GaugeConfig) Int64GaugeConfig { c.unit = string(o) return c } func (o unitOpt) applyInt64ObservableCounter(c Int64ObservableCounterConfig) Int64ObservableCounterConfig { c.unit = string(o) return c } func (o unitOpt) applyInt64ObservableUpDownCounter(c Int64ObservableUpDownCounterConfig) Int64ObservableUpDownCounterConfig { c.unit = string(o) return c } func (o unitOpt) applyInt64ObservableGauge(c Int64ObservableGaugeConfig) Int64ObservableGaugeConfig { c.unit = string(o) return c } // WithUnit sets the instrument unit. // // The unit u should be defined using the appropriate [UCUM](https://ucum.org) case-sensitive code. func WithUnit(u string) InstrumentOption { return unitOpt(u) } // WithExplicitBucketBoundaries sets the instrument explicit bucket boundaries. // // This option is considered "advisory", and may be ignored by API implementations. func WithExplicitBucketBoundaries(bounds ...float64) HistogramOption { return bucketOpt(bounds) } type bucketOpt []float64 func (o bucketOpt) applyFloat64Histogram(c Float64HistogramConfig) Float64HistogramConfig { c.explicitBucketBoundaries = o return c } func (o bucketOpt) applyInt64Histogram(c Int64HistogramConfig) Int64HistogramConfig { c.explicitBucketBoundaries = o return c } // AddOption applies options to an addition measurement. See // [MeasurementOption] for other options that can be used as an AddOption. type AddOption interface { applyAdd(AddConfig) AddConfig } // AddConfig contains options for an addition measurement. type AddConfig struct { attrs attribute.Set } // NewAddConfig returns a new [AddConfig] with all opts applied. func NewAddConfig(opts []AddOption) AddConfig { config := AddConfig{attrs: *attribute.EmptySet()} for _, o := range opts { config = o.applyAdd(config) } return config } // Attributes returns the configured attribute set. func (c AddConfig) Attributes() attribute.Set { return c.attrs } // RecordOption applies options to an addition measurement. See // [MeasurementOption] for other options that can be used as a RecordOption. type RecordOption interface { applyRecord(RecordConfig) RecordConfig } // RecordConfig contains options for a recorded measurement. type RecordConfig struct { attrs attribute.Set } // NewRecordConfig returns a new [RecordConfig] with all opts applied. func NewRecordConfig(opts []RecordOption) RecordConfig { config := RecordConfig{attrs: *attribute.EmptySet()} for _, o := range opts { config = o.applyRecord(config) } return config } // Attributes returns the configured attribute set. func (c RecordConfig) Attributes() attribute.Set { return c.attrs } // ObserveOption applies options to an addition measurement. See // [MeasurementOption] for other options that can be used as a ObserveOption. type ObserveOption interface { applyObserve(ObserveConfig) ObserveConfig } // ObserveConfig contains options for an observed measurement. type ObserveConfig struct { attrs attribute.Set } // NewObserveConfig returns a new [ObserveConfig] with all opts applied. func NewObserveConfig(opts []ObserveOption) ObserveConfig { config := ObserveConfig{attrs: *attribute.EmptySet()} for _, o := range opts { config = o.applyObserve(config) } return config } // Attributes returns the configured attribute set. func (c ObserveConfig) Attributes() attribute.Set { return c.attrs } // MeasurementOption applies options to all instrument measurement. type MeasurementOption interface { AddOption RecordOption ObserveOption } type attrOpt struct { set attribute.Set } // mergeSets returns the union of keys between a and b. Any duplicate keys will // use the value associated with b. func mergeSets(a, b attribute.Set) attribute.Set { // NewMergeIterator uses the first value for any duplicates. iter := attribute.NewMergeIterator(&b, &a) merged := make([]attribute.KeyValue, 0, a.Len()+b.Len()) for iter.Next() { merged = append(merged, iter.Attribute()) } return attribute.NewSet(merged...) } func (o attrOpt) applyAdd(c AddConfig) AddConfig { switch { case o.set.Len() == 0: case c.attrs.Len() == 0: c.attrs = o.set default: c.attrs = mergeSets(c.attrs, o.set) } return c } func (o attrOpt) applyRecord(c RecordConfig) RecordConfig { switch { case o.set.Len() == 0: case c.attrs.Len() == 0: c.attrs = o.set default: c.attrs = mergeSets(c.attrs, o.set) } return c } func (o attrOpt) applyObserve(c ObserveConfig) ObserveConfig { switch { case o.set.Len() == 0: case c.attrs.Len() == 0: c.attrs = o.set default: c.attrs = mergeSets(c.attrs, o.set) } return c } // WithAttributeSet sets the attribute Set associated with a measurement is // made with. // // If multiple WithAttributeSet or WithAttributes options are passed the // attributes will be merged together in the order they are passed. Attributes // with duplicate keys will use the last value passed. func WithAttributeSet(attributes attribute.Set) MeasurementOption { return attrOpt{set: attributes} } // WithAttributes converts attributes into an attribute Set and sets the Set to // be associated with a measurement. This is shorthand for: // // cp := make([]attribute.KeyValue, len(attributes)) // copy(cp, attributes) // WithAttributes(attribute.NewSet(cp...)) // // [attribute.NewSet] may modify the passed attributes so this will make a copy // of attributes before creating a set in order to ensure this function is // concurrent safe. This makes this option function less optimized in // comparison to [WithAttributeSet]. Therefore, [WithAttributeSet] should be // preferred for performance sensitive code. // // See [WithAttributeSet] for information about how multiple WithAttributes are // merged. func WithAttributes(attributes ...attribute.KeyValue) MeasurementOption { cp := make([]attribute.KeyValue, len(attributes)) copy(cp, attributes) return attrOpt{set: attribute.NewSet(cp...)} } ================================================ FILE: vendor/go.opentelemetry.io/otel/metric/meter.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package metric // import "go.opentelemetry.io/otel/metric" import ( "context" "go.opentelemetry.io/otel/metric/embedded" ) // MeterProvider provides access to named Meter instances, for instrumenting // an application or package. // // Warning: Methods may be added to this interface in minor releases. See // package documentation on API implementation for information on how to set // default behavior for unimplemented methods. type MeterProvider interface { // Users of the interface can ignore this. This embedded type is only used // by implementations of this interface. See the "API Implementations" // section of the package documentation for more information. embedded.MeterProvider // Meter returns a new Meter with the provided name and configuration. // // A Meter should be scoped at most to a single package. The name needs to // be unique so it does not collide with other names used by // an application, nor other applications. To achieve this, the import path // of the instrumentation package is recommended to be used as name. // // If the name is empty, then an implementation defined default name will // be used instead. Meter(name string, opts ...MeterOption) Meter } // Meter provides access to instrument instances for recording metrics. // // Warning: Methods may be added to this interface in minor releases. See // package documentation on API implementation for information on how to set // default behavior for unimplemented methods. type Meter interface { // Users of the interface can ignore this. This embedded type is only used // by implementations of this interface. See the "API Implementations" // section of the package documentation for more information. embedded.Meter // Int64Counter returns a new Int64Counter instrument identified by name // and configured with options. The instrument is used to synchronously // record increasing int64 measurements during a computational operation. // // The name needs to conform to the OpenTelemetry instrument name syntax. // See the Instrument Name section of the package documentation for more // information. Int64Counter(name string, options ...Int64CounterOption) (Int64Counter, error) // Int64UpDownCounter returns a new Int64UpDownCounter instrument // identified by name and configured with options. The instrument is used // to synchronously record int64 measurements during a computational // operation. // // The name needs to conform to the OpenTelemetry instrument name syntax. // See the Instrument Name section of the package documentation for more // information. Int64UpDownCounter(name string, options ...Int64UpDownCounterOption) (Int64UpDownCounter, error) // Int64Histogram returns a new Int64Histogram instrument identified by // name and configured with options. The instrument is used to // synchronously record the distribution of int64 measurements during a // computational operation. // // The name needs to conform to the OpenTelemetry instrument name syntax. // See the Instrument Name section of the package documentation for more // information. Int64Histogram(name string, options ...Int64HistogramOption) (Int64Histogram, error) // Int64Gauge returns a new Int64Gauge instrument identified by name and // configured with options. The instrument is used to synchronously record // instantaneous int64 measurements during a computational operation. // // The name needs to conform to the OpenTelemetry instrument name syntax. // See the Instrument Name section of the package documentation for more // information. Int64Gauge(name string, options ...Int64GaugeOption) (Int64Gauge, error) // Int64ObservableCounter returns a new Int64ObservableCounter identified // by name and configured with options. The instrument is used to // asynchronously record increasing int64 measurements once per a // measurement collection cycle. // // Measurements for the returned instrument are made via a callback. Use // the WithInt64Callback option to register the callback here, or use the // RegisterCallback method of this Meter to register one later. See the // Measurements section of the package documentation for more information. // // The name needs to conform to the OpenTelemetry instrument name syntax. // See the Instrument Name section of the package documentation for more // information. Int64ObservableCounter(name string, options ...Int64ObservableCounterOption) (Int64ObservableCounter, error) // Int64ObservableUpDownCounter returns a new Int64ObservableUpDownCounter // instrument identified by name and configured with options. The // instrument is used to asynchronously record int64 measurements once per // a measurement collection cycle. // // Measurements for the returned instrument are made via a callback. Use // the WithInt64Callback option to register the callback here, or use the // RegisterCallback method of this Meter to register one later. See the // Measurements section of the package documentation for more information. // // The name needs to conform to the OpenTelemetry instrument name syntax. // See the Instrument Name section of the package documentation for more // information. Int64ObservableUpDownCounter(name string, options ...Int64ObservableUpDownCounterOption) (Int64ObservableUpDownCounter, error) // Int64ObservableGauge returns a new Int64ObservableGauge instrument // identified by name and configured with options. The instrument is used // to asynchronously record instantaneous int64 measurements once per a // measurement collection cycle. // // Measurements for the returned instrument are made via a callback. Use // the WithInt64Callback option to register the callback here, or use the // RegisterCallback method of this Meter to register one later. See the // Measurements section of the package documentation for more information. // // The name needs to conform to the OpenTelemetry instrument name syntax. // See the Instrument Name section of the package documentation for more // information. Int64ObservableGauge(name string, options ...Int64ObservableGaugeOption) (Int64ObservableGauge, error) // Float64Counter returns a new Float64Counter instrument identified by // name and configured with options. The instrument is used to // synchronously record increasing float64 measurements during a // computational operation. // // The name needs to conform to the OpenTelemetry instrument name syntax. // See the Instrument Name section of the package documentation for more // information. Float64Counter(name string, options ...Float64CounterOption) (Float64Counter, error) // Float64UpDownCounter returns a new Float64UpDownCounter instrument // identified by name and configured with options. The instrument is used // to synchronously record float64 measurements during a computational // operation. // // The name needs to conform to the OpenTelemetry instrument name syntax. // See the Instrument Name section of the package documentation for more // information. Float64UpDownCounter(name string, options ...Float64UpDownCounterOption) (Float64UpDownCounter, error) // Float64Histogram returns a new Float64Histogram instrument identified by // name and configured with options. The instrument is used to // synchronously record the distribution of float64 measurements during a // computational operation. // // The name needs to conform to the OpenTelemetry instrument name syntax. // See the Instrument Name section of the package documentation for more // information. Float64Histogram(name string, options ...Float64HistogramOption) (Float64Histogram, error) // Float64Gauge returns a new Float64Gauge instrument identified by name and // configured with options. The instrument is used to synchronously record // instantaneous float64 measurements during a computational operation. // // The name needs to conform to the OpenTelemetry instrument name syntax. // See the Instrument Name section of the package documentation for more // information. Float64Gauge(name string, options ...Float64GaugeOption) (Float64Gauge, error) // Float64ObservableCounter returns a new Float64ObservableCounter // instrument identified by name and configured with options. The // instrument is used to asynchronously record increasing float64 // measurements once per a measurement collection cycle. // // Measurements for the returned instrument are made via a callback. Use // the WithFloat64Callback option to register the callback here, or use the // RegisterCallback method of this Meter to register one later. See the // Measurements section of the package documentation for more information. // // The name needs to conform to the OpenTelemetry instrument name syntax. // See the Instrument Name section of the package documentation for more // information. Float64ObservableCounter(name string, options ...Float64ObservableCounterOption) (Float64ObservableCounter, error) // Float64ObservableUpDownCounter returns a new // Float64ObservableUpDownCounter instrument identified by name and // configured with options. The instrument is used to asynchronously record // float64 measurements once per a measurement collection cycle. // // Measurements for the returned instrument are made via a callback. Use // the WithFloat64Callback option to register the callback here, or use the // RegisterCallback method of this Meter to register one later. See the // Measurements section of the package documentation for more information. // // The name needs to conform to the OpenTelemetry instrument name syntax. // See the Instrument Name section of the package documentation for more // information. Float64ObservableUpDownCounter(name string, options ...Float64ObservableUpDownCounterOption) (Float64ObservableUpDownCounter, error) // Float64ObservableGauge returns a new Float64ObservableGauge instrument // identified by name and configured with options. The instrument is used // to asynchronously record instantaneous float64 measurements once per a // measurement collection cycle. // // Measurements for the returned instrument are made via a callback. Use // the WithFloat64Callback option to register the callback here, or use the // RegisterCallback method of this Meter to register one later. See the // Measurements section of the package documentation for more information. // // The name needs to conform to the OpenTelemetry instrument name syntax. // See the Instrument Name section of the package documentation for more // information. Float64ObservableGauge(name string, options ...Float64ObservableGaugeOption) (Float64ObservableGauge, error) // RegisterCallback registers f to be called during the collection of a // measurement cycle. // // If Unregister of the returned Registration is called, f needs to be // unregistered and not called during collection. // // The instruments f is registered with are the only instruments that f may // observe values for. // // If no instruments are passed, f should not be registered nor called // during collection. // // The function f needs to be concurrent safe. RegisterCallback(f Callback, instruments ...Observable) (Registration, error) } // Callback is a function registered with a Meter that makes observations for // the set of instruments it is registered with. The Observer parameter is used // to record measurement observations for these instruments. // // The function needs to complete in a finite amount of time and the deadline // of the passed context is expected to be honored. // // The function needs to make unique observations across all registered // Callbacks. Meaning, it should not report measurements for an instrument with // the same attributes as another Callback will report. // // The function needs to be concurrent safe. type Callback func(context.Context, Observer) error // Observer records measurements for multiple instruments in a Callback. // // Warning: Methods may be added to this interface in minor releases. See // package documentation on API implementation for information on how to set // default behavior for unimplemented methods. type Observer interface { // Users of the interface can ignore this. This embedded type is only used // by implementations of this interface. See the "API Implementations" // section of the package documentation for more information. embedded.Observer // ObserveFloat64 records the float64 value for obsrv. ObserveFloat64(obsrv Float64Observable, value float64, opts ...ObserveOption) // ObserveInt64 records the int64 value for obsrv. ObserveInt64(obsrv Int64Observable, value int64, opts ...ObserveOption) } // Registration is an token representing the unique registration of a callback // for a set of instruments with a Meter. // // Warning: Methods may be added to this interface in minor releases. See // package documentation on API implementation for information on how to set // default behavior for unimplemented methods. type Registration interface { // Users of the interface can ignore this. This embedded type is only used // by implementations of this interface. See the "API Implementations" // section of the package documentation for more information. embedded.Registration // Unregister removes the callback registration from a Meter. // // This method needs to be idempotent and concurrent safe. Unregister() error } ================================================ FILE: vendor/go.opentelemetry.io/otel/metric/syncfloat64.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package metric // import "go.opentelemetry.io/otel/metric" import ( "context" "go.opentelemetry.io/otel/metric/embedded" ) // Float64Counter is an instrument that records increasing float64 values. // // Warning: Methods may be added to this interface in minor releases. See // package documentation on API implementation for information on how to set // default behavior for unimplemented methods. type Float64Counter interface { // Users of the interface can ignore this. This embedded type is only used // by implementations of this interface. See the "API Implementations" // section of the package documentation for more information. embedded.Float64Counter // Add records a change to the counter. // // Use the WithAttributeSet (or, if performance is not a concern, // the WithAttributes) option to include measurement attributes. Add(ctx context.Context, incr float64, options ...AddOption) } // Float64CounterConfig contains options for synchronous counter instruments that // record float64 values. type Float64CounterConfig struct { description string unit string } // NewFloat64CounterConfig returns a new [Float64CounterConfig] with all opts // applied. func NewFloat64CounterConfig(opts ...Float64CounterOption) Float64CounterConfig { var config Float64CounterConfig for _, o := range opts { config = o.applyFloat64Counter(config) } return config } // Description returns the configured description. func (c Float64CounterConfig) Description() string { return c.description } // Unit returns the configured unit. func (c Float64CounterConfig) Unit() string { return c.unit } // Float64CounterOption applies options to a [Float64CounterConfig]. See // [InstrumentOption] for other options that can be used as a // Float64CounterOption. type Float64CounterOption interface { applyFloat64Counter(Float64CounterConfig) Float64CounterConfig } // Float64UpDownCounter is an instrument that records increasing or decreasing // float64 values. // // Warning: Methods may be added to this interface in minor releases. See // package documentation on API implementation for information on how to set // default behavior for unimplemented methods. type Float64UpDownCounter interface { // Users of the interface can ignore this. This embedded type is only used // by implementations of this interface. See the "API Implementations" // section of the package documentation for more information. embedded.Float64UpDownCounter // Add records a change to the counter. // // Use the WithAttributeSet (or, if performance is not a concern, // the WithAttributes) option to include measurement attributes. Add(ctx context.Context, incr float64, options ...AddOption) } // Float64UpDownCounterConfig contains options for synchronous counter // instruments that record float64 values. type Float64UpDownCounterConfig struct { description string unit string } // NewFloat64UpDownCounterConfig returns a new [Float64UpDownCounterConfig] // with all opts applied. func NewFloat64UpDownCounterConfig(opts ...Float64UpDownCounterOption) Float64UpDownCounterConfig { var config Float64UpDownCounterConfig for _, o := range opts { config = o.applyFloat64UpDownCounter(config) } return config } // Description returns the configured description. func (c Float64UpDownCounterConfig) Description() string { return c.description } // Unit returns the configured unit. func (c Float64UpDownCounterConfig) Unit() string { return c.unit } // Float64UpDownCounterOption applies options to a // [Float64UpDownCounterConfig]. See [InstrumentOption] for other options that // can be used as a Float64UpDownCounterOption. type Float64UpDownCounterOption interface { applyFloat64UpDownCounter(Float64UpDownCounterConfig) Float64UpDownCounterConfig } // Float64Histogram is an instrument that records a distribution of float64 // values. // // Warning: Methods may be added to this interface in minor releases. See // package documentation on API implementation for information on how to set // default behavior for unimplemented methods. type Float64Histogram interface { // Users of the interface can ignore this. This embedded type is only used // by implementations of this interface. See the "API Implementations" // section of the package documentation for more information. embedded.Float64Histogram // Record adds an additional value to the distribution. // // Use the WithAttributeSet (or, if performance is not a concern, // the WithAttributes) option to include measurement attributes. Record(ctx context.Context, incr float64, options ...RecordOption) } // Float64HistogramConfig contains options for synchronous histogram // instruments that record float64 values. type Float64HistogramConfig struct { description string unit string explicitBucketBoundaries []float64 } // NewFloat64HistogramConfig returns a new [Float64HistogramConfig] with all // opts applied. func NewFloat64HistogramConfig(opts ...Float64HistogramOption) Float64HistogramConfig { var config Float64HistogramConfig for _, o := range opts { config = o.applyFloat64Histogram(config) } return config } // Description returns the configured description. func (c Float64HistogramConfig) Description() string { return c.description } // Unit returns the configured unit. func (c Float64HistogramConfig) Unit() string { return c.unit } // ExplicitBucketBoundaries returns the configured explicit bucket boundaries. func (c Float64HistogramConfig) ExplicitBucketBoundaries() []float64 { return c.explicitBucketBoundaries } // Float64HistogramOption applies options to a [Float64HistogramConfig]. See // [InstrumentOption] for other options that can be used as a // Float64HistogramOption. type Float64HistogramOption interface { applyFloat64Histogram(Float64HistogramConfig) Float64HistogramConfig } // Float64Gauge is an instrument that records instantaneous float64 values. // // Warning: Methods may be added to this interface in minor releases. See // package documentation on API implementation for information on how to set // default behavior for unimplemented methods. type Float64Gauge interface { // Users of the interface can ignore this. This embedded type is only used // by implementations of this interface. See the "API Implementations" // section of the package documentation for more information. embedded.Float64Gauge // Record records the instantaneous value. // // Use the WithAttributeSet (or, if performance is not a concern, // the WithAttributes) option to include measurement attributes. Record(ctx context.Context, value float64, options ...RecordOption) } // Float64GaugeConfig contains options for synchronous gauge instruments that // record float64 values. type Float64GaugeConfig struct { description string unit string } // NewFloat64GaugeConfig returns a new [Float64GaugeConfig] with all opts // applied. func NewFloat64GaugeConfig(opts ...Float64GaugeOption) Float64GaugeConfig { var config Float64GaugeConfig for _, o := range opts { config = o.applyFloat64Gauge(config) } return config } // Description returns the configured description. func (c Float64GaugeConfig) Description() string { return c.description } // Unit returns the configured unit. func (c Float64GaugeConfig) Unit() string { return c.unit } // Float64GaugeOption applies options to a [Float64GaugeConfig]. See // [InstrumentOption] for other options that can be used as a // Float64GaugeOption. type Float64GaugeOption interface { applyFloat64Gauge(Float64GaugeConfig) Float64GaugeConfig } ================================================ FILE: vendor/go.opentelemetry.io/otel/metric/syncint64.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package metric // import "go.opentelemetry.io/otel/metric" import ( "context" "go.opentelemetry.io/otel/metric/embedded" ) // Int64Counter is an instrument that records increasing int64 values. // // Warning: Methods may be added to this interface in minor releases. See // package documentation on API implementation for information on how to set // default behavior for unimplemented methods. type Int64Counter interface { // Users of the interface can ignore this. This embedded type is only used // by implementations of this interface. See the "API Implementations" // section of the package documentation for more information. embedded.Int64Counter // Add records a change to the counter. // // Use the WithAttributeSet (or, if performance is not a concern, // the WithAttributes) option to include measurement attributes. Add(ctx context.Context, incr int64, options ...AddOption) } // Int64CounterConfig contains options for synchronous counter instruments that // record int64 values. type Int64CounterConfig struct { description string unit string } // NewInt64CounterConfig returns a new [Int64CounterConfig] with all opts // applied. func NewInt64CounterConfig(opts ...Int64CounterOption) Int64CounterConfig { var config Int64CounterConfig for _, o := range opts { config = o.applyInt64Counter(config) } return config } // Description returns the configured description. func (c Int64CounterConfig) Description() string { return c.description } // Unit returns the configured unit. func (c Int64CounterConfig) Unit() string { return c.unit } // Int64CounterOption applies options to a [Int64CounterConfig]. See // [InstrumentOption] for other options that can be used as an // Int64CounterOption. type Int64CounterOption interface { applyInt64Counter(Int64CounterConfig) Int64CounterConfig } // Int64UpDownCounter is an instrument that records increasing or decreasing // int64 values. // // Warning: Methods may be added to this interface in minor releases. See // package documentation on API implementation for information on how to set // default behavior for unimplemented methods. type Int64UpDownCounter interface { // Users of the interface can ignore this. This embedded type is only used // by implementations of this interface. See the "API Implementations" // section of the package documentation for more information. embedded.Int64UpDownCounter // Add records a change to the counter. // // Use the WithAttributeSet (or, if performance is not a concern, // the WithAttributes) option to include measurement attributes. Add(ctx context.Context, incr int64, options ...AddOption) } // Int64UpDownCounterConfig contains options for synchronous counter // instruments that record int64 values. type Int64UpDownCounterConfig struct { description string unit string } // NewInt64UpDownCounterConfig returns a new [Int64UpDownCounterConfig] with // all opts applied. func NewInt64UpDownCounterConfig(opts ...Int64UpDownCounterOption) Int64UpDownCounterConfig { var config Int64UpDownCounterConfig for _, o := range opts { config = o.applyInt64UpDownCounter(config) } return config } // Description returns the configured description. func (c Int64UpDownCounterConfig) Description() string { return c.description } // Unit returns the configured unit. func (c Int64UpDownCounterConfig) Unit() string { return c.unit } // Int64UpDownCounterOption applies options to a [Int64UpDownCounterConfig]. // See [InstrumentOption] for other options that can be used as an // Int64UpDownCounterOption. type Int64UpDownCounterOption interface { applyInt64UpDownCounter(Int64UpDownCounterConfig) Int64UpDownCounterConfig } // Int64Histogram is an instrument that records a distribution of int64 // values. // // Warning: Methods may be added to this interface in minor releases. See // package documentation on API implementation for information on how to set // default behavior for unimplemented methods. type Int64Histogram interface { // Users of the interface can ignore this. This embedded type is only used // by implementations of this interface. See the "API Implementations" // section of the package documentation for more information. embedded.Int64Histogram // Record adds an additional value to the distribution. // // Use the WithAttributeSet (or, if performance is not a concern, // the WithAttributes) option to include measurement attributes. Record(ctx context.Context, incr int64, options ...RecordOption) } // Int64HistogramConfig contains options for synchronous histogram instruments // that record int64 values. type Int64HistogramConfig struct { description string unit string explicitBucketBoundaries []float64 } // NewInt64HistogramConfig returns a new [Int64HistogramConfig] with all opts // applied. func NewInt64HistogramConfig(opts ...Int64HistogramOption) Int64HistogramConfig { var config Int64HistogramConfig for _, o := range opts { config = o.applyInt64Histogram(config) } return config } // Description returns the configured description. func (c Int64HistogramConfig) Description() string { return c.description } // Unit returns the configured unit. func (c Int64HistogramConfig) Unit() string { return c.unit } // ExplicitBucketBoundaries returns the configured explicit bucket boundaries. func (c Int64HistogramConfig) ExplicitBucketBoundaries() []float64 { return c.explicitBucketBoundaries } // Int64HistogramOption applies options to a [Int64HistogramConfig]. See // [InstrumentOption] for other options that can be used as an // Int64HistogramOption. type Int64HistogramOption interface { applyInt64Histogram(Int64HistogramConfig) Int64HistogramConfig } // Int64Gauge is an instrument that records instantaneous int64 values. // // Warning: Methods may be added to this interface in minor releases. See // package documentation on API implementation for information on how to set // default behavior for unimplemented methods. type Int64Gauge interface { // Users of the interface can ignore this. This embedded type is only used // by implementations of this interface. See the "API Implementations" // section of the package documentation for more information. embedded.Int64Gauge // Record records the instantaneous value. // // Use the WithAttributeSet (or, if performance is not a concern, // the WithAttributes) option to include measurement attributes. Record(ctx context.Context, value int64, options ...RecordOption) } // Int64GaugeConfig contains options for synchronous gauge instruments that // record int64 values. type Int64GaugeConfig struct { description string unit string } // NewInt64GaugeConfig returns a new [Int64GaugeConfig] with all opts // applied. func NewInt64GaugeConfig(opts ...Int64GaugeOption) Int64GaugeConfig { var config Int64GaugeConfig for _, o := range opts { config = o.applyInt64Gauge(config) } return config } // Description returns the configured description. func (c Int64GaugeConfig) Description() string { return c.description } // Unit returns the configured unit. func (c Int64GaugeConfig) Unit() string { return c.unit } // Int64GaugeOption applies options to a [Int64GaugeConfig]. See // [InstrumentOption] for other options that can be used as a // Int64GaugeOption. type Int64GaugeOption interface { applyInt64Gauge(Int64GaugeConfig) Int64GaugeConfig } ================================================ FILE: vendor/go.opentelemetry.io/otel/metric.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package otel // import "go.opentelemetry.io/otel" import ( "go.opentelemetry.io/otel/internal/global" "go.opentelemetry.io/otel/metric" ) // Meter returns a Meter from the global MeterProvider. The name must be the // name of the library providing instrumentation. This name may be the same as // the instrumented code only if that code provides built-in instrumentation. // If the name is empty, then a implementation defined default name will be // used instead. // // If this is called before a global MeterProvider is registered the returned // Meter will be a No-op implementation of a Meter. When a global MeterProvider // is registered for the first time, the returned Meter, and all the // instruments it has created or will create, are recreated automatically from // the new MeterProvider. // // This is short for GetMeterProvider().Meter(name). func Meter(name string, opts ...metric.MeterOption) metric.Meter { return GetMeterProvider().Meter(name, opts...) } // GetMeterProvider returns the registered global meter provider. // // If no global GetMeterProvider has been registered, a No-op GetMeterProvider // implementation is returned. When a global GetMeterProvider is registered for // the first time, the returned GetMeterProvider, and all the Meters it has // created or will create, are recreated automatically from the new // GetMeterProvider. func GetMeterProvider() metric.MeterProvider { return global.MeterProvider() } // SetMeterProvider registers mp as the global MeterProvider. func SetMeterProvider(mp metric.MeterProvider) { global.SetMeterProvider(mp) } ================================================ FILE: vendor/go.opentelemetry.io/otel/propagation/README.md ================================================ # Propagation [![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/propagation)](https://pkg.go.dev/go.opentelemetry.io/otel/propagation) ================================================ FILE: vendor/go.opentelemetry.io/otel/propagation/baggage.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package propagation // import "go.opentelemetry.io/otel/propagation" import ( "context" "go.opentelemetry.io/otel/baggage" ) const baggageHeader = "baggage" // Baggage is a propagator that supports the W3C Baggage format. // // This propagates user-defined baggage associated with a trace. The complete // specification is defined at https://www.w3.org/TR/baggage/. type Baggage struct{} var _ TextMapPropagator = Baggage{} // Inject sets baggage key-values from ctx into the carrier. func (b Baggage) Inject(ctx context.Context, carrier TextMapCarrier) { bStr := baggage.FromContext(ctx).String() if bStr != "" { carrier.Set(baggageHeader, bStr) } } // Extract returns a copy of parent with the baggage from the carrier added. func (b Baggage) Extract(parent context.Context, carrier TextMapCarrier) context.Context { bStr := carrier.Get(baggageHeader) if bStr == "" { return parent } bag, err := baggage.Parse(bStr) if err != nil { return parent } return baggage.ContextWithBaggage(parent, bag) } // Fields returns the keys who's values are set with Inject. func (b Baggage) Fields() []string { return []string{baggageHeader} } ================================================ FILE: vendor/go.opentelemetry.io/otel/propagation/doc.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 /* Package propagation contains OpenTelemetry context propagators. OpenTelemetry propagators are used to extract and inject context data from and into messages exchanged by applications. The propagator supported by this package is the W3C Trace Context encoding (https://www.w3.org/TR/trace-context/), and W3C Baggage (https://www.w3.org/TR/baggage/). */ package propagation // import "go.opentelemetry.io/otel/propagation" ================================================ FILE: vendor/go.opentelemetry.io/otel/propagation/propagation.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package propagation // import "go.opentelemetry.io/otel/propagation" import ( "context" "net/http" ) // TextMapCarrier is the storage medium used by a TextMapPropagator. type TextMapCarrier interface { // DO NOT CHANGE: any modification will not be backwards compatible and // must never be done outside of a new major release. // Get returns the value associated with the passed key. Get(key string) string // DO NOT CHANGE: any modification will not be backwards compatible and // must never be done outside of a new major release. // Set stores the key-value pair. Set(key string, value string) // DO NOT CHANGE: any modification will not be backwards compatible and // must never be done outside of a new major release. // Keys lists the keys stored in this carrier. Keys() []string // DO NOT CHANGE: any modification will not be backwards compatible and // must never be done outside of a new major release. } // MapCarrier is a TextMapCarrier that uses a map held in memory as a storage // medium for propagated key-value pairs. type MapCarrier map[string]string // Compile time check that MapCarrier implements the TextMapCarrier. var _ TextMapCarrier = MapCarrier{} // Get returns the value associated with the passed key. func (c MapCarrier) Get(key string) string { return c[key] } // Set stores the key-value pair. func (c MapCarrier) Set(key, value string) { c[key] = value } // Keys lists the keys stored in this carrier. func (c MapCarrier) Keys() []string { keys := make([]string, 0, len(c)) for k := range c { keys = append(keys, k) } return keys } // HeaderCarrier adapts http.Header to satisfy the TextMapCarrier interface. type HeaderCarrier http.Header // Get returns the value associated with the passed key. func (hc HeaderCarrier) Get(key string) string { return http.Header(hc).Get(key) } // Set stores the key-value pair. func (hc HeaderCarrier) Set(key string, value string) { http.Header(hc).Set(key, value) } // Keys lists the keys stored in this carrier. func (hc HeaderCarrier) Keys() []string { keys := make([]string, 0, len(hc)) for k := range hc { keys = append(keys, k) } return keys } // TextMapPropagator propagates cross-cutting concerns as key-value text // pairs within a carrier that travels in-band across process boundaries. type TextMapPropagator interface { // DO NOT CHANGE: any modification will not be backwards compatible and // must never be done outside of a new major release. // Inject set cross-cutting concerns from the Context into the carrier. Inject(ctx context.Context, carrier TextMapCarrier) // DO NOT CHANGE: any modification will not be backwards compatible and // must never be done outside of a new major release. // Extract reads cross-cutting concerns from the carrier into a Context. Extract(ctx context.Context, carrier TextMapCarrier) context.Context // DO NOT CHANGE: any modification will not be backwards compatible and // must never be done outside of a new major release. // Fields returns the keys whose values are set with Inject. Fields() []string // DO NOT CHANGE: any modification will not be backwards compatible and // must never be done outside of a new major release. } type compositeTextMapPropagator []TextMapPropagator func (p compositeTextMapPropagator) Inject(ctx context.Context, carrier TextMapCarrier) { for _, i := range p { i.Inject(ctx, carrier) } } func (p compositeTextMapPropagator) Extract(ctx context.Context, carrier TextMapCarrier) context.Context { for _, i := range p { ctx = i.Extract(ctx, carrier) } return ctx } func (p compositeTextMapPropagator) Fields() []string { unique := make(map[string]struct{}) for _, i := range p { for _, k := range i.Fields() { unique[k] = struct{}{} } } fields := make([]string, 0, len(unique)) for k := range unique { fields = append(fields, k) } return fields } // NewCompositeTextMapPropagator returns a unified TextMapPropagator from the // group of passed TextMapPropagator. This allows different cross-cutting // concerns to be propagates in a unified manner. // // The returned TextMapPropagator will inject and extract cross-cutting // concerns in the order the TextMapPropagators were provided. Additionally, // the Fields method will return a de-duplicated slice of the keys that are // set with the Inject method. func NewCompositeTextMapPropagator(p ...TextMapPropagator) TextMapPropagator { return compositeTextMapPropagator(p) } ================================================ FILE: vendor/go.opentelemetry.io/otel/propagation/trace_context.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package propagation // import "go.opentelemetry.io/otel/propagation" import ( "context" "encoding/hex" "fmt" "strings" "go.opentelemetry.io/otel/trace" ) const ( supportedVersion = 0 maxVersion = 254 traceparentHeader = "traceparent" tracestateHeader = "tracestate" delimiter = "-" ) // TraceContext is a propagator that supports the W3C Trace Context format // (https://www.w3.org/TR/trace-context/) // // This propagator will propagate the traceparent and tracestate headers to // guarantee traces are not broken. It is up to the users of this propagator // to choose if they want to participate in a trace by modifying the // traceparent header and relevant parts of the tracestate header containing // their proprietary information. type TraceContext struct{} var ( _ TextMapPropagator = TraceContext{} versionPart = fmt.Sprintf("%.2X", supportedVersion) ) // Inject injects the trace context from ctx into carrier. func (tc TraceContext) Inject(ctx context.Context, carrier TextMapCarrier) { sc := trace.SpanContextFromContext(ctx) if !sc.IsValid() { return } if ts := sc.TraceState().String(); ts != "" { carrier.Set(tracestateHeader, ts) } // Clear all flags other than the trace-context supported sampling bit. flags := sc.TraceFlags() & trace.FlagsSampled var sb strings.Builder sb.Grow(2 + 32 + 16 + 2 + 3) _, _ = sb.WriteString(versionPart) traceID := sc.TraceID() spanID := sc.SpanID() flagByte := [1]byte{byte(flags)} var buf [32]byte for _, src := range [][]byte{traceID[:], spanID[:], flagByte[:]} { _ = sb.WriteByte(delimiter[0]) n := hex.Encode(buf[:], src) _, _ = sb.Write(buf[:n]) } carrier.Set(traceparentHeader, sb.String()) } // Extract reads tracecontext from the carrier into a returned Context. // // The returned Context will be a copy of ctx and contain the extracted // tracecontext as the remote SpanContext. If the extracted tracecontext is // invalid, the passed ctx will be returned directly instead. func (tc TraceContext) Extract(ctx context.Context, carrier TextMapCarrier) context.Context { sc := tc.extract(carrier) if !sc.IsValid() { return ctx } return trace.ContextWithRemoteSpanContext(ctx, sc) } func (tc TraceContext) extract(carrier TextMapCarrier) trace.SpanContext { h := carrier.Get(traceparentHeader) if h == "" { return trace.SpanContext{} } var ver [1]byte if !extractPart(ver[:], &h, 2) { return trace.SpanContext{} } version := int(ver[0]) if version > maxVersion { return trace.SpanContext{} } var scc trace.SpanContextConfig if !extractPart(scc.TraceID[:], &h, 32) { return trace.SpanContext{} } if !extractPart(scc.SpanID[:], &h, 16) { return trace.SpanContext{} } var opts [1]byte if !extractPart(opts[:], &h, 2) { return trace.SpanContext{} } if version == 0 && (h != "" || opts[0] > 2) { // version 0 not allow extra // version 0 not allow other flag return trace.SpanContext{} } // Clear all flags other than the trace-context supported sampling bit. scc.TraceFlags = trace.TraceFlags(opts[0]) & trace.FlagsSampled // Ignore the error returned here. Failure to parse tracestate MUST NOT // affect the parsing of traceparent according to the W3C tracecontext // specification. scc.TraceState, _ = trace.ParseTraceState(carrier.Get(tracestateHeader)) scc.Remote = true sc := trace.NewSpanContext(scc) if !sc.IsValid() { return trace.SpanContext{} } return sc } // upperHex detect hex is upper case Unicode characters. func upperHex(v string) bool { for _, c := range v { if c >= 'A' && c <= 'F' { return true } } return false } func extractPart(dst []byte, h *string, n int) bool { part, left, _ := strings.Cut(*h, delimiter) *h = left // hex.Decode decodes unsupported upper-case characters, so exclude explicitly. if len(part) != n || upperHex(part) { return false } if p, err := hex.Decode(dst, []byte(part)); err != nil || p != n/2 { return false } return true } // Fields returns the keys who's values are set with Inject. func (tc TraceContext) Fields() []string { return []string{traceparentHeader, tracestateHeader} } ================================================ FILE: vendor/go.opentelemetry.io/otel/propagation.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package otel // import "go.opentelemetry.io/otel" import ( "go.opentelemetry.io/otel/internal/global" "go.opentelemetry.io/otel/propagation" ) // GetTextMapPropagator returns the global TextMapPropagator. If none has been // set, a No-Op TextMapPropagator is returned. func GetTextMapPropagator() propagation.TextMapPropagator { return global.TextMapPropagator() } // SetTextMapPropagator sets propagator as the global TextMapPropagator. func SetTextMapPropagator(propagator propagation.TextMapPropagator) { global.SetTextMapPropagator(propagator) } ================================================ FILE: vendor/go.opentelemetry.io/otel/renovate.json ================================================ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ "config:recommended" ], "ignorePaths": [], "labels": ["Skip Changelog", "dependencies"], "postUpdateOptions" : [ "gomodTidy" ], "packageRules": [ { "matchManagers": ["gomod"], "matchDepTypes": ["indirect"], "enabled": true }, { "matchFileNames": ["internal/tools/**"], "matchManagers": ["gomod"], "matchDepTypes": ["indirect"], "enabled": false } ] } ================================================ FILE: vendor/go.opentelemetry.io/otel/requirements.txt ================================================ codespell==2.3.0 ================================================ FILE: vendor/go.opentelemetry.io/otel/semconv/v1.20.0/README.md ================================================ # Semconv v1.20.0 [![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/semconv/v1.20.0)](https://pkg.go.dev/go.opentelemetry.io/otel/semconv/v1.20.0) ================================================ FILE: vendor/go.opentelemetry.io/otel/semconv/v1.20.0/attribute_group.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 // Code generated from semantic convention specification. DO NOT EDIT. package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" import "go.opentelemetry.io/otel/attribute" // Describes HTTP attributes. const ( // HTTPMethodKey is the attribute Key conforming to the "http.method" // semantic conventions. It represents the hTTP request method. // // Type: string // RequirementLevel: Required // Stability: stable // Examples: 'GET', 'POST', 'HEAD' HTTPMethodKey = attribute.Key("http.method") // HTTPStatusCodeKey is the attribute Key conforming to the // "http.status_code" semantic conventions. It represents the [HTTP // response status code](https://tools.ietf.org/html/rfc7231#section-6). // // Type: int // RequirementLevel: ConditionallyRequired (If and only if one was // received/sent.) // Stability: stable // Examples: 200 HTTPStatusCodeKey = attribute.Key("http.status_code") ) // HTTPMethod returns an attribute KeyValue conforming to the "http.method" // semantic conventions. It represents the hTTP request method. func HTTPMethod(val string) attribute.KeyValue { return HTTPMethodKey.String(val) } // HTTPStatusCode returns an attribute KeyValue conforming to the // "http.status_code" semantic conventions. It represents the [HTTP response // status code](https://tools.ietf.org/html/rfc7231#section-6). func HTTPStatusCode(val int) attribute.KeyValue { return HTTPStatusCodeKey.Int(val) } // HTTP Server spans attributes const ( // HTTPSchemeKey is the attribute Key conforming to the "http.scheme" // semantic conventions. It represents the URI scheme identifying the used // protocol. // // Type: string // RequirementLevel: Required // Stability: stable // Examples: 'http', 'https' HTTPSchemeKey = attribute.Key("http.scheme") // HTTPRouteKey is the attribute Key conforming to the "http.route" // semantic conventions. It represents the matched route (path template in // the format used by the respective server framework). See note below // // Type: string // RequirementLevel: ConditionallyRequired (If and only if it's available) // Stability: stable // Examples: '/users/:userID?', '{controller}/{action}/{id?}' // Note: MUST NOT be populated when this is not supported by the HTTP // server framework as the route attribute should have low-cardinality and // the URI path can NOT substitute it. // SHOULD include the [application // root](/specification/trace/semantic_conventions/http.md#http-server-definitions) // if there is one. HTTPRouteKey = attribute.Key("http.route") ) // HTTPScheme returns an attribute KeyValue conforming to the "http.scheme" // semantic conventions. It represents the URI scheme identifying the used // protocol. func HTTPScheme(val string) attribute.KeyValue { return HTTPSchemeKey.String(val) } // HTTPRoute returns an attribute KeyValue conforming to the "http.route" // semantic conventions. It represents the matched route (path template in the // format used by the respective server framework). See note below func HTTPRoute(val string) attribute.KeyValue { return HTTPRouteKey.String(val) } // Attributes for Events represented using Log Records. const ( // EventNameKey is the attribute Key conforming to the "event.name" // semantic conventions. It represents the name identifies the event. // // Type: string // RequirementLevel: Required // Stability: stable // Examples: 'click', 'exception' EventNameKey = attribute.Key("event.name") // EventDomainKey is the attribute Key conforming to the "event.domain" // semantic conventions. It represents the domain identifies the business // context for the events. // // Type: Enum // RequirementLevel: Required // Stability: stable // Note: Events across different domains may have same `event.name`, yet be // unrelated events. EventDomainKey = attribute.Key("event.domain") ) var ( // Events from browser apps EventDomainBrowser = EventDomainKey.String("browser") // Events from mobile apps EventDomainDevice = EventDomainKey.String("device") // Events from Kubernetes EventDomainK8S = EventDomainKey.String("k8s") ) // EventName returns an attribute KeyValue conforming to the "event.name" // semantic conventions. It represents the name identifies the event. func EventName(val string) attribute.KeyValue { return EventNameKey.String(val) } // These attributes may be used for any network related operation. const ( // NetTransportKey is the attribute Key conforming to the "net.transport" // semantic conventions. It represents the transport protocol used. See // note below. // // Type: Enum // RequirementLevel: Optional // Stability: stable NetTransportKey = attribute.Key("net.transport") // NetProtocolNameKey is the attribute Key conforming to the // "net.protocol.name" semantic conventions. It represents the application // layer protocol used. The value SHOULD be normalized to lowercase. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'amqp', 'http', 'mqtt' NetProtocolNameKey = attribute.Key("net.protocol.name") // NetProtocolVersionKey is the attribute Key conforming to the // "net.protocol.version" semantic conventions. It represents the version // of the application layer protocol used. See note below. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '3.1.1' // Note: `net.protocol.version` refers to the version of the protocol used // and might be different from the protocol client's version. If the HTTP // client used has a version of `0.27.2`, but sends HTTP version `1.1`, // this attribute should be set to `1.1`. NetProtocolVersionKey = attribute.Key("net.protocol.version") // NetSockPeerNameKey is the attribute Key conforming to the // "net.sock.peer.name" semantic conventions. It represents the remote // socket peer name. // // Type: string // RequirementLevel: Recommended (If available and different from // `net.peer.name` and if `net.sock.peer.addr` is set.) // Stability: stable // Examples: 'proxy.example.com' NetSockPeerNameKey = attribute.Key("net.sock.peer.name") // NetSockPeerAddrKey is the attribute Key conforming to the // "net.sock.peer.addr" semantic conventions. It represents the remote // socket peer address: IPv4 or IPv6 for internet protocols, path for local // communication, // [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '127.0.0.1', '/tmp/mysql.sock' NetSockPeerAddrKey = attribute.Key("net.sock.peer.addr") // NetSockPeerPortKey is the attribute Key conforming to the // "net.sock.peer.port" semantic conventions. It represents the remote // socket peer port. // // Type: int // RequirementLevel: Recommended (If defined for the address family and if // different than `net.peer.port` and if `net.sock.peer.addr` is set.) // Stability: stable // Examples: 16456 NetSockPeerPortKey = attribute.Key("net.sock.peer.port") // NetSockFamilyKey is the attribute Key conforming to the // "net.sock.family" semantic conventions. It represents the protocol // [address // family](https://man7.org/linux/man-pages/man7/address_families.7.html) // which is used for communication. // // Type: Enum // RequirementLevel: ConditionallyRequired (If different than `inet` and if // any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers // of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in // `net.sock.peer.addr` if `net.sock.family` is not set. This is to support // instrumentations that follow previous versions of this document.) // Stability: stable // Examples: 'inet6', 'bluetooth' NetSockFamilyKey = attribute.Key("net.sock.family") // NetPeerNameKey is the attribute Key conforming to the "net.peer.name" // semantic conventions. It represents the logical remote hostname, see // note below. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'example.com' // Note: `net.peer.name` SHOULD NOT be set if capturing it would require an // extra DNS lookup. NetPeerNameKey = attribute.Key("net.peer.name") // NetPeerPortKey is the attribute Key conforming to the "net.peer.port" // semantic conventions. It represents the logical remote port number // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 80, 8080, 443 NetPeerPortKey = attribute.Key("net.peer.port") // NetHostNameKey is the attribute Key conforming to the "net.host.name" // semantic conventions. It represents the logical local hostname or // similar, see note below. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'localhost' NetHostNameKey = attribute.Key("net.host.name") // NetHostPortKey is the attribute Key conforming to the "net.host.port" // semantic conventions. It represents the logical local port number, // preferably the one that the peer used to connect // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 8080 NetHostPortKey = attribute.Key("net.host.port") // NetSockHostAddrKey is the attribute Key conforming to the // "net.sock.host.addr" semantic conventions. It represents the local // socket address. Useful in case of a multi-IP host. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '192.168.0.1' NetSockHostAddrKey = attribute.Key("net.sock.host.addr") // NetSockHostPortKey is the attribute Key conforming to the // "net.sock.host.port" semantic conventions. It represents the local // socket port number. // // Type: int // RequirementLevel: ConditionallyRequired (If defined for the address // family and if different than `net.host.port` and if `net.sock.host.addr` // is set. In other cases, it is still recommended to set this.) // Stability: stable // Examples: 35555 NetSockHostPortKey = attribute.Key("net.sock.host.port") ) var ( // ip_tcp NetTransportTCP = NetTransportKey.String("ip_tcp") // ip_udp NetTransportUDP = NetTransportKey.String("ip_udp") // Named or anonymous pipe. See note below NetTransportPipe = NetTransportKey.String("pipe") // In-process communication NetTransportInProc = NetTransportKey.String("inproc") // Something else (non IP-based) NetTransportOther = NetTransportKey.String("other") ) var ( // IPv4 address NetSockFamilyInet = NetSockFamilyKey.String("inet") // IPv6 address NetSockFamilyInet6 = NetSockFamilyKey.String("inet6") // Unix domain socket path NetSockFamilyUnix = NetSockFamilyKey.String("unix") ) // NetProtocolName returns an attribute KeyValue conforming to the // "net.protocol.name" semantic conventions. It represents the application // layer protocol used. The value SHOULD be normalized to lowercase. func NetProtocolName(val string) attribute.KeyValue { return NetProtocolNameKey.String(val) } // NetProtocolVersion returns an attribute KeyValue conforming to the // "net.protocol.version" semantic conventions. It represents the version of // the application layer protocol used. See note below. func NetProtocolVersion(val string) attribute.KeyValue { return NetProtocolVersionKey.String(val) } // NetSockPeerName returns an attribute KeyValue conforming to the // "net.sock.peer.name" semantic conventions. It represents the remote socket // peer name. func NetSockPeerName(val string) attribute.KeyValue { return NetSockPeerNameKey.String(val) } // NetSockPeerAddr returns an attribute KeyValue conforming to the // "net.sock.peer.addr" semantic conventions. It represents the remote socket // peer address: IPv4 or IPv6 for internet protocols, path for local // communication, // [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). func NetSockPeerAddr(val string) attribute.KeyValue { return NetSockPeerAddrKey.String(val) } // NetSockPeerPort returns an attribute KeyValue conforming to the // "net.sock.peer.port" semantic conventions. It represents the remote socket // peer port. func NetSockPeerPort(val int) attribute.KeyValue { return NetSockPeerPortKey.Int(val) } // NetPeerName returns an attribute KeyValue conforming to the // "net.peer.name" semantic conventions. It represents the logical remote // hostname, see note below. func NetPeerName(val string) attribute.KeyValue { return NetPeerNameKey.String(val) } // NetPeerPort returns an attribute KeyValue conforming to the // "net.peer.port" semantic conventions. It represents the logical remote port // number func NetPeerPort(val int) attribute.KeyValue { return NetPeerPortKey.Int(val) } // NetHostName returns an attribute KeyValue conforming to the // "net.host.name" semantic conventions. It represents the logical local // hostname or similar, see note below. func NetHostName(val string) attribute.KeyValue { return NetHostNameKey.String(val) } // NetHostPort returns an attribute KeyValue conforming to the // "net.host.port" semantic conventions. It represents the logical local port // number, preferably the one that the peer used to connect func NetHostPort(val int) attribute.KeyValue { return NetHostPortKey.Int(val) } // NetSockHostAddr returns an attribute KeyValue conforming to the // "net.sock.host.addr" semantic conventions. It represents the local socket // address. Useful in case of a multi-IP host. func NetSockHostAddr(val string) attribute.KeyValue { return NetSockHostAddrKey.String(val) } // NetSockHostPort returns an attribute KeyValue conforming to the // "net.sock.host.port" semantic conventions. It represents the local socket // port number. func NetSockHostPort(val int) attribute.KeyValue { return NetSockHostPortKey.Int(val) } // These attributes may be used for any network related operation. const ( // NetHostConnectionTypeKey is the attribute Key conforming to the // "net.host.connection.type" semantic conventions. It represents the // internet connection type currently being used by the host. // // Type: Enum // RequirementLevel: Optional // Stability: stable // Examples: 'wifi' NetHostConnectionTypeKey = attribute.Key("net.host.connection.type") // NetHostConnectionSubtypeKey is the attribute Key conforming to the // "net.host.connection.subtype" semantic conventions. It represents the // this describes more details regarding the connection.type. It may be the // type of cell technology connection, but it could be used for describing // details about a wifi connection. // // Type: Enum // RequirementLevel: Optional // Stability: stable // Examples: 'LTE' NetHostConnectionSubtypeKey = attribute.Key("net.host.connection.subtype") // NetHostCarrierNameKey is the attribute Key conforming to the // "net.host.carrier.name" semantic conventions. It represents the name of // the mobile carrier. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'sprint' NetHostCarrierNameKey = attribute.Key("net.host.carrier.name") // NetHostCarrierMccKey is the attribute Key conforming to the // "net.host.carrier.mcc" semantic conventions. It represents the mobile // carrier country code. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '310' NetHostCarrierMccKey = attribute.Key("net.host.carrier.mcc") // NetHostCarrierMncKey is the attribute Key conforming to the // "net.host.carrier.mnc" semantic conventions. It represents the mobile // carrier network code. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '001' NetHostCarrierMncKey = attribute.Key("net.host.carrier.mnc") // NetHostCarrierIccKey is the attribute Key conforming to the // "net.host.carrier.icc" semantic conventions. It represents the ISO // 3166-1 alpha-2 2-character country code associated with the mobile // carrier network. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'DE' NetHostCarrierIccKey = attribute.Key("net.host.carrier.icc") ) var ( // wifi NetHostConnectionTypeWifi = NetHostConnectionTypeKey.String("wifi") // wired NetHostConnectionTypeWired = NetHostConnectionTypeKey.String("wired") // cell NetHostConnectionTypeCell = NetHostConnectionTypeKey.String("cell") // unavailable NetHostConnectionTypeUnavailable = NetHostConnectionTypeKey.String("unavailable") // unknown NetHostConnectionTypeUnknown = NetHostConnectionTypeKey.String("unknown") ) var ( // GPRS NetHostConnectionSubtypeGprs = NetHostConnectionSubtypeKey.String("gprs") // EDGE NetHostConnectionSubtypeEdge = NetHostConnectionSubtypeKey.String("edge") // UMTS NetHostConnectionSubtypeUmts = NetHostConnectionSubtypeKey.String("umts") // CDMA NetHostConnectionSubtypeCdma = NetHostConnectionSubtypeKey.String("cdma") // EVDO Rel. 0 NetHostConnectionSubtypeEvdo0 = NetHostConnectionSubtypeKey.String("evdo_0") // EVDO Rev. A NetHostConnectionSubtypeEvdoA = NetHostConnectionSubtypeKey.String("evdo_a") // CDMA2000 1XRTT NetHostConnectionSubtypeCdma20001xrtt = NetHostConnectionSubtypeKey.String("cdma2000_1xrtt") // HSDPA NetHostConnectionSubtypeHsdpa = NetHostConnectionSubtypeKey.String("hsdpa") // HSUPA NetHostConnectionSubtypeHsupa = NetHostConnectionSubtypeKey.String("hsupa") // HSPA NetHostConnectionSubtypeHspa = NetHostConnectionSubtypeKey.String("hspa") // IDEN NetHostConnectionSubtypeIden = NetHostConnectionSubtypeKey.String("iden") // EVDO Rev. B NetHostConnectionSubtypeEvdoB = NetHostConnectionSubtypeKey.String("evdo_b") // LTE NetHostConnectionSubtypeLte = NetHostConnectionSubtypeKey.String("lte") // EHRPD NetHostConnectionSubtypeEhrpd = NetHostConnectionSubtypeKey.String("ehrpd") // HSPAP NetHostConnectionSubtypeHspap = NetHostConnectionSubtypeKey.String("hspap") // GSM NetHostConnectionSubtypeGsm = NetHostConnectionSubtypeKey.String("gsm") // TD-SCDMA NetHostConnectionSubtypeTdScdma = NetHostConnectionSubtypeKey.String("td_scdma") // IWLAN NetHostConnectionSubtypeIwlan = NetHostConnectionSubtypeKey.String("iwlan") // 5G NR (New Radio) NetHostConnectionSubtypeNr = NetHostConnectionSubtypeKey.String("nr") // 5G NRNSA (New Radio Non-Standalone) NetHostConnectionSubtypeNrnsa = NetHostConnectionSubtypeKey.String("nrnsa") // LTE CA NetHostConnectionSubtypeLteCa = NetHostConnectionSubtypeKey.String("lte_ca") ) // NetHostCarrierName returns an attribute KeyValue conforming to the // "net.host.carrier.name" semantic conventions. It represents the name of the // mobile carrier. func NetHostCarrierName(val string) attribute.KeyValue { return NetHostCarrierNameKey.String(val) } // NetHostCarrierMcc returns an attribute KeyValue conforming to the // "net.host.carrier.mcc" semantic conventions. It represents the mobile // carrier country code. func NetHostCarrierMcc(val string) attribute.KeyValue { return NetHostCarrierMccKey.String(val) } // NetHostCarrierMnc returns an attribute KeyValue conforming to the // "net.host.carrier.mnc" semantic conventions. It represents the mobile // carrier network code. func NetHostCarrierMnc(val string) attribute.KeyValue { return NetHostCarrierMncKey.String(val) } // NetHostCarrierIcc returns an attribute KeyValue conforming to the // "net.host.carrier.icc" semantic conventions. It represents the ISO 3166-1 // alpha-2 2-character country code associated with the mobile carrier network. func NetHostCarrierIcc(val string) attribute.KeyValue { return NetHostCarrierIccKey.String(val) } // Semantic conventions for HTTP client and server Spans. const ( // HTTPRequestContentLengthKey is the attribute Key conforming to the // "http.request_content_length" semantic conventions. It represents the // size of the request payload body in bytes. This is the number of bytes // transferred excluding headers and is often, but not always, present as // the // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) // header. For requests using transport encoding, this should be the // compressed size. // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 3495 HTTPRequestContentLengthKey = attribute.Key("http.request_content_length") // HTTPResponseContentLengthKey is the attribute Key conforming to the // "http.response_content_length" semantic conventions. It represents the // size of the response payload body in bytes. This is the number of bytes // transferred excluding headers and is often, but not always, present as // the // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) // header. For requests using transport encoding, this should be the // compressed size. // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 3495 HTTPResponseContentLengthKey = attribute.Key("http.response_content_length") ) // HTTPRequestContentLength returns an attribute KeyValue conforming to the // "http.request_content_length" semantic conventions. It represents the size // of the request payload body in bytes. This is the number of bytes // transferred excluding headers and is often, but not always, present as the // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) // header. For requests using transport encoding, this should be the compressed // size. func HTTPRequestContentLength(val int) attribute.KeyValue { return HTTPRequestContentLengthKey.Int(val) } // HTTPResponseContentLength returns an attribute KeyValue conforming to the // "http.response_content_length" semantic conventions. It represents the size // of the response payload body in bytes. This is the number of bytes // transferred excluding headers and is often, but not always, present as the // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) // header. For requests using transport encoding, this should be the compressed // size. func HTTPResponseContentLength(val int) attribute.KeyValue { return HTTPResponseContentLengthKey.Int(val) } // Semantic convention describing per-message attributes populated on messaging // spans or links. const ( // MessagingMessageIDKey is the attribute Key conforming to the // "messaging.message.id" semantic conventions. It represents a value used // by the messaging system as an identifier for the message, represented as // a string. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '452a7c7c7c7048c2f887f61572b18fc2' MessagingMessageIDKey = attribute.Key("messaging.message.id") // MessagingMessageConversationIDKey is the attribute Key conforming to the // "messaging.message.conversation_id" semantic conventions. It represents // the [conversation ID](#conversations) identifying the conversation to // which the message belongs, represented as a string. Sometimes called // "Correlation ID". // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'MyConversationID' MessagingMessageConversationIDKey = attribute.Key("messaging.message.conversation_id") // MessagingMessagePayloadSizeBytesKey is the attribute Key conforming to // the "messaging.message.payload_size_bytes" semantic conventions. It // represents the (uncompressed) size of the message payload in bytes. Also // use this attribute if it is unknown whether the compressed or // uncompressed payload size is reported. // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 2738 MessagingMessagePayloadSizeBytesKey = attribute.Key("messaging.message.payload_size_bytes") // MessagingMessagePayloadCompressedSizeBytesKey is the attribute Key // conforming to the "messaging.message.payload_compressed_size_bytes" // semantic conventions. It represents the compressed size of the message // payload in bytes. // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 2048 MessagingMessagePayloadCompressedSizeBytesKey = attribute.Key("messaging.message.payload_compressed_size_bytes") ) // MessagingMessageID returns an attribute KeyValue conforming to the // "messaging.message.id" semantic conventions. It represents a value used by // the messaging system as an identifier for the message, represented as a // string. func MessagingMessageID(val string) attribute.KeyValue { return MessagingMessageIDKey.String(val) } // MessagingMessageConversationID returns an attribute KeyValue conforming // to the "messaging.message.conversation_id" semantic conventions. It // represents the [conversation ID](#conversations) identifying the // conversation to which the message belongs, represented as a string. // Sometimes called "Correlation ID". func MessagingMessageConversationID(val string) attribute.KeyValue { return MessagingMessageConversationIDKey.String(val) } // MessagingMessagePayloadSizeBytes returns an attribute KeyValue conforming // to the "messaging.message.payload_size_bytes" semantic conventions. It // represents the (uncompressed) size of the message payload in bytes. Also use // this attribute if it is unknown whether the compressed or uncompressed // payload size is reported. func MessagingMessagePayloadSizeBytes(val int) attribute.KeyValue { return MessagingMessagePayloadSizeBytesKey.Int(val) } // MessagingMessagePayloadCompressedSizeBytes returns an attribute KeyValue // conforming to the "messaging.message.payload_compressed_size_bytes" semantic // conventions. It represents the compressed size of the message payload in // bytes. func MessagingMessagePayloadCompressedSizeBytes(val int) attribute.KeyValue { return MessagingMessagePayloadCompressedSizeBytesKey.Int(val) } // Semantic convention for attributes that describe messaging destination on // broker const ( // MessagingDestinationNameKey is the attribute Key conforming to the // "messaging.destination.name" semantic conventions. It represents the // message destination name // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'MyQueue', 'MyTopic' // Note: Destination name SHOULD uniquely identify a specific queue, topic // or other entity within the broker. If // the broker does not have such notion, the destination name SHOULD // uniquely identify the broker. MessagingDestinationNameKey = attribute.Key("messaging.destination.name") // MessagingDestinationTemplateKey is the attribute Key conforming to the // "messaging.destination.template" semantic conventions. It represents the // low cardinality representation of the messaging destination name // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '/customers/{customerID}' // Note: Destination names could be constructed from templates. An example // would be a destination name involving a user name or product id. // Although the destination name in this case is of high cardinality, the // underlying template is of low cardinality and can be effectively used // for grouping and aggregation. MessagingDestinationTemplateKey = attribute.Key("messaging.destination.template") // MessagingDestinationTemporaryKey is the attribute Key conforming to the // "messaging.destination.temporary" semantic conventions. It represents a // boolean that is true if the message destination is temporary and might // not exist anymore after messages are processed. // // Type: boolean // RequirementLevel: Optional // Stability: stable MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary") // MessagingDestinationAnonymousKey is the attribute Key conforming to the // "messaging.destination.anonymous" semantic conventions. It represents a // boolean that is true if the message destination is anonymous (could be // unnamed or have auto-generated name). // // Type: boolean // RequirementLevel: Optional // Stability: stable MessagingDestinationAnonymousKey = attribute.Key("messaging.destination.anonymous") ) // MessagingDestinationName returns an attribute KeyValue conforming to the // "messaging.destination.name" semantic conventions. It represents the message // destination name func MessagingDestinationName(val string) attribute.KeyValue { return MessagingDestinationNameKey.String(val) } // MessagingDestinationTemplate returns an attribute KeyValue conforming to // the "messaging.destination.template" semantic conventions. It represents the // low cardinality representation of the messaging destination name func MessagingDestinationTemplate(val string) attribute.KeyValue { return MessagingDestinationTemplateKey.String(val) } // MessagingDestinationTemporary returns an attribute KeyValue conforming to // the "messaging.destination.temporary" semantic conventions. It represents a // boolean that is true if the message destination is temporary and might not // exist anymore after messages are processed. func MessagingDestinationTemporary(val bool) attribute.KeyValue { return MessagingDestinationTemporaryKey.Bool(val) } // MessagingDestinationAnonymous returns an attribute KeyValue conforming to // the "messaging.destination.anonymous" semantic conventions. It represents a // boolean that is true if the message destination is anonymous (could be // unnamed or have auto-generated name). func MessagingDestinationAnonymous(val bool) attribute.KeyValue { return MessagingDestinationAnonymousKey.Bool(val) } // Semantic convention for attributes that describe messaging source on broker const ( // MessagingSourceNameKey is the attribute Key conforming to the // "messaging.source.name" semantic conventions. It represents the message // source name // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'MyQueue', 'MyTopic' // Note: Source name SHOULD uniquely identify a specific queue, topic, or // other entity within the broker. If // the broker does not have such notion, the source name SHOULD uniquely // identify the broker. MessagingSourceNameKey = attribute.Key("messaging.source.name") // MessagingSourceTemplateKey is the attribute Key conforming to the // "messaging.source.template" semantic conventions. It represents the low // cardinality representation of the messaging source name // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '/customers/{customerID}' // Note: Source names could be constructed from templates. An example would // be a source name involving a user name or product id. Although the // source name in this case is of high cardinality, the underlying template // is of low cardinality and can be effectively used for grouping and // aggregation. MessagingSourceTemplateKey = attribute.Key("messaging.source.template") // MessagingSourceTemporaryKey is the attribute Key conforming to the // "messaging.source.temporary" semantic conventions. It represents a // boolean that is true if the message source is temporary and might not // exist anymore after messages are processed. // // Type: boolean // RequirementLevel: Optional // Stability: stable MessagingSourceTemporaryKey = attribute.Key("messaging.source.temporary") // MessagingSourceAnonymousKey is the attribute Key conforming to the // "messaging.source.anonymous" semantic conventions. It represents a // boolean that is true if the message source is anonymous (could be // unnamed or have auto-generated name). // // Type: boolean // RequirementLevel: Optional // Stability: stable MessagingSourceAnonymousKey = attribute.Key("messaging.source.anonymous") ) // MessagingSourceName returns an attribute KeyValue conforming to the // "messaging.source.name" semantic conventions. It represents the message // source name func MessagingSourceName(val string) attribute.KeyValue { return MessagingSourceNameKey.String(val) } // MessagingSourceTemplate returns an attribute KeyValue conforming to the // "messaging.source.template" semantic conventions. It represents the low // cardinality representation of the messaging source name func MessagingSourceTemplate(val string) attribute.KeyValue { return MessagingSourceTemplateKey.String(val) } // MessagingSourceTemporary returns an attribute KeyValue conforming to the // "messaging.source.temporary" semantic conventions. It represents a boolean // that is true if the message source is temporary and might not exist anymore // after messages are processed. func MessagingSourceTemporary(val bool) attribute.KeyValue { return MessagingSourceTemporaryKey.Bool(val) } // MessagingSourceAnonymous returns an attribute KeyValue conforming to the // "messaging.source.anonymous" semantic conventions. It represents a boolean // that is true if the message source is anonymous (could be unnamed or have // auto-generated name). func MessagingSourceAnonymous(val bool) attribute.KeyValue { return MessagingSourceAnonymousKey.Bool(val) } // Attributes for RabbitMQ const ( // MessagingRabbitmqDestinationRoutingKeyKey is the attribute Key // conforming to the "messaging.rabbitmq.destination.routing_key" semantic // conventions. It represents the rabbitMQ message routing key. // // Type: string // RequirementLevel: ConditionallyRequired (If not empty.) // Stability: stable // Examples: 'myKey' MessagingRabbitmqDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key") ) // MessagingRabbitmqDestinationRoutingKey returns an attribute KeyValue // conforming to the "messaging.rabbitmq.destination.routing_key" semantic // conventions. It represents the rabbitMQ message routing key. func MessagingRabbitmqDestinationRoutingKey(val string) attribute.KeyValue { return MessagingRabbitmqDestinationRoutingKeyKey.String(val) } // Attributes for Apache Kafka const ( // MessagingKafkaMessageKeyKey is the attribute Key conforming to the // "messaging.kafka.message.key" semantic conventions. It represents the // message keys in Kafka are used for grouping alike messages to ensure // they're processed on the same partition. They differ from // `messaging.message.id` in that they're not unique. If the key is `null`, // the attribute MUST NOT be set. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'myKey' // Note: If the key type is not string, it's string representation has to // be supplied for the attribute. If the key has no unambiguous, canonical // string form, don't include its value. MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message.key") // MessagingKafkaConsumerGroupKey is the attribute Key conforming to the // "messaging.kafka.consumer.group" semantic conventions. It represents the // name of the Kafka Consumer Group that is handling the message. Only // applies to consumers, not producers. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'my-group' MessagingKafkaConsumerGroupKey = attribute.Key("messaging.kafka.consumer.group") // MessagingKafkaClientIDKey is the attribute Key conforming to the // "messaging.kafka.client_id" semantic conventions. It represents the // client ID for the Consumer or Producer that is handling the message. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'client-5' MessagingKafkaClientIDKey = attribute.Key("messaging.kafka.client_id") // MessagingKafkaDestinationPartitionKey is the attribute Key conforming to // the "messaging.kafka.destination.partition" semantic conventions. It // represents the partition the message is sent to. // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 2 MessagingKafkaDestinationPartitionKey = attribute.Key("messaging.kafka.destination.partition") // MessagingKafkaSourcePartitionKey is the attribute Key conforming to the // "messaging.kafka.source.partition" semantic conventions. It represents // the partition the message is received from. // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 2 MessagingKafkaSourcePartitionKey = attribute.Key("messaging.kafka.source.partition") // MessagingKafkaMessageOffsetKey is the attribute Key conforming to the // "messaging.kafka.message.offset" semantic conventions. It represents the // offset of a record in the corresponding Kafka partition. // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 42 MessagingKafkaMessageOffsetKey = attribute.Key("messaging.kafka.message.offset") // MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the // "messaging.kafka.message.tombstone" semantic conventions. It represents // a boolean that is true if the message is a tombstone. // // Type: boolean // RequirementLevel: ConditionallyRequired (If value is `true`. When // missing, the value is assumed to be `false`.) // Stability: stable MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone") ) // MessagingKafkaMessageKey returns an attribute KeyValue conforming to the // "messaging.kafka.message.key" semantic conventions. It represents the // message keys in Kafka are used for grouping alike messages to ensure they're // processed on the same partition. They differ from `messaging.message.id` in // that they're not unique. If the key is `null`, the attribute MUST NOT be // set. func MessagingKafkaMessageKey(val string) attribute.KeyValue { return MessagingKafkaMessageKeyKey.String(val) } // MessagingKafkaConsumerGroup returns an attribute KeyValue conforming to // the "messaging.kafka.consumer.group" semantic conventions. It represents the // name of the Kafka Consumer Group that is handling the message. Only applies // to consumers, not producers. func MessagingKafkaConsumerGroup(val string) attribute.KeyValue { return MessagingKafkaConsumerGroupKey.String(val) } // MessagingKafkaClientID returns an attribute KeyValue conforming to the // "messaging.kafka.client_id" semantic conventions. It represents the client // ID for the Consumer or Producer that is handling the message. func MessagingKafkaClientID(val string) attribute.KeyValue { return MessagingKafkaClientIDKey.String(val) } // MessagingKafkaDestinationPartition returns an attribute KeyValue // conforming to the "messaging.kafka.destination.partition" semantic // conventions. It represents the partition the message is sent to. func MessagingKafkaDestinationPartition(val int) attribute.KeyValue { return MessagingKafkaDestinationPartitionKey.Int(val) } // MessagingKafkaSourcePartition returns an attribute KeyValue conforming to // the "messaging.kafka.source.partition" semantic conventions. It represents // the partition the message is received from. func MessagingKafkaSourcePartition(val int) attribute.KeyValue { return MessagingKafkaSourcePartitionKey.Int(val) } // MessagingKafkaMessageOffset returns an attribute KeyValue conforming to // the "messaging.kafka.message.offset" semantic conventions. It represents the // offset of a record in the corresponding Kafka partition. func MessagingKafkaMessageOffset(val int) attribute.KeyValue { return MessagingKafkaMessageOffsetKey.Int(val) } // MessagingKafkaMessageTombstone returns an attribute KeyValue conforming // to the "messaging.kafka.message.tombstone" semantic conventions. It // represents a boolean that is true if the message is a tombstone. func MessagingKafkaMessageTombstone(val bool) attribute.KeyValue { return MessagingKafkaMessageTombstoneKey.Bool(val) } // Attributes for Apache RocketMQ const ( // MessagingRocketmqNamespaceKey is the attribute Key conforming to the // "messaging.rocketmq.namespace" semantic conventions. It represents the // namespace of RocketMQ resources, resources in different namespaces are // individual. // // Type: string // RequirementLevel: Required // Stability: stable // Examples: 'myNamespace' MessagingRocketmqNamespaceKey = attribute.Key("messaging.rocketmq.namespace") // MessagingRocketmqClientGroupKey is the attribute Key conforming to the // "messaging.rocketmq.client_group" semantic conventions. It represents // the name of the RocketMQ producer/consumer group that is handling the // message. The client type is identified by the SpanKind. // // Type: string // RequirementLevel: Required // Stability: stable // Examples: 'myConsumerGroup' MessagingRocketmqClientGroupKey = attribute.Key("messaging.rocketmq.client_group") // MessagingRocketmqClientIDKey is the attribute Key conforming to the // "messaging.rocketmq.client_id" semantic conventions. It represents the // unique identifier for each client. // // Type: string // RequirementLevel: Required // Stability: stable // Examples: 'myhost@8742@s8083jm' MessagingRocketmqClientIDKey = attribute.Key("messaging.rocketmq.client_id") // MessagingRocketmqMessageDeliveryTimestampKey is the attribute Key // conforming to the "messaging.rocketmq.message.delivery_timestamp" // semantic conventions. It represents the timestamp in milliseconds that // the delay message is expected to be delivered to consumer. // // Type: int // RequirementLevel: ConditionallyRequired (If the message type is delay // and delay time level is not specified.) // Stability: stable // Examples: 1665987217045 MessagingRocketmqMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp") // MessagingRocketmqMessageDelayTimeLevelKey is the attribute Key // conforming to the "messaging.rocketmq.message.delay_time_level" semantic // conventions. It represents the delay time level for delay message, which // determines the message delay time. // // Type: int // RequirementLevel: ConditionallyRequired (If the message type is delay // and delivery timestamp is not specified.) // Stability: stable // Examples: 3 MessagingRocketmqMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level") // MessagingRocketmqMessageGroupKey is the attribute Key conforming to the // "messaging.rocketmq.message.group" semantic conventions. It represents // the it is essential for FIFO message. Messages that belong to the same // message group are always processed one by one within the same consumer // group. // // Type: string // RequirementLevel: ConditionallyRequired (If the message type is FIFO.) // Stability: stable // Examples: 'myMessageGroup' MessagingRocketmqMessageGroupKey = attribute.Key("messaging.rocketmq.message.group") // MessagingRocketmqMessageTypeKey is the attribute Key conforming to the // "messaging.rocketmq.message.type" semantic conventions. It represents // the type of message. // // Type: Enum // RequirementLevel: Optional // Stability: stable MessagingRocketmqMessageTypeKey = attribute.Key("messaging.rocketmq.message.type") // MessagingRocketmqMessageTagKey is the attribute Key conforming to the // "messaging.rocketmq.message.tag" semantic conventions. It represents the // secondary classifier of message besides topic. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'tagA' MessagingRocketmqMessageTagKey = attribute.Key("messaging.rocketmq.message.tag") // MessagingRocketmqMessageKeysKey is the attribute Key conforming to the // "messaging.rocketmq.message.keys" semantic conventions. It represents // the key(s) of message, another way to mark message besides message id. // // Type: string[] // RequirementLevel: Optional // Stability: stable // Examples: 'keyA', 'keyB' MessagingRocketmqMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys") // MessagingRocketmqConsumptionModelKey is the attribute Key conforming to // the "messaging.rocketmq.consumption_model" semantic conventions. It // represents the model of message consumption. This only applies to // consumer spans. // // Type: Enum // RequirementLevel: Optional // Stability: stable MessagingRocketmqConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model") ) var ( // Normal message MessagingRocketmqMessageTypeNormal = MessagingRocketmqMessageTypeKey.String("normal") // FIFO message MessagingRocketmqMessageTypeFifo = MessagingRocketmqMessageTypeKey.String("fifo") // Delay message MessagingRocketmqMessageTypeDelay = MessagingRocketmqMessageTypeKey.String("delay") // Transaction message MessagingRocketmqMessageTypeTransaction = MessagingRocketmqMessageTypeKey.String("transaction") ) var ( // Clustering consumption model MessagingRocketmqConsumptionModelClustering = MessagingRocketmqConsumptionModelKey.String("clustering") // Broadcasting consumption model MessagingRocketmqConsumptionModelBroadcasting = MessagingRocketmqConsumptionModelKey.String("broadcasting") ) // MessagingRocketmqNamespace returns an attribute KeyValue conforming to // the "messaging.rocketmq.namespace" semantic conventions. It represents the // namespace of RocketMQ resources, resources in different namespaces are // individual. func MessagingRocketmqNamespace(val string) attribute.KeyValue { return MessagingRocketmqNamespaceKey.String(val) } // MessagingRocketmqClientGroup returns an attribute KeyValue conforming to // the "messaging.rocketmq.client_group" semantic conventions. It represents // the name of the RocketMQ producer/consumer group that is handling the // message. The client type is identified by the SpanKind. func MessagingRocketmqClientGroup(val string) attribute.KeyValue { return MessagingRocketmqClientGroupKey.String(val) } // MessagingRocketmqClientID returns an attribute KeyValue conforming to the // "messaging.rocketmq.client_id" semantic conventions. It represents the // unique identifier for each client. func MessagingRocketmqClientID(val string) attribute.KeyValue { return MessagingRocketmqClientIDKey.String(val) } // MessagingRocketmqMessageDeliveryTimestamp returns an attribute KeyValue // conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic // conventions. It represents the timestamp in milliseconds that the delay // message is expected to be delivered to consumer. func MessagingRocketmqMessageDeliveryTimestamp(val int) attribute.KeyValue { return MessagingRocketmqMessageDeliveryTimestampKey.Int(val) } // MessagingRocketmqMessageDelayTimeLevel returns an attribute KeyValue // conforming to the "messaging.rocketmq.message.delay_time_level" semantic // conventions. It represents the delay time level for delay message, which // determines the message delay time. func MessagingRocketmqMessageDelayTimeLevel(val int) attribute.KeyValue { return MessagingRocketmqMessageDelayTimeLevelKey.Int(val) } // MessagingRocketmqMessageGroup returns an attribute KeyValue conforming to // the "messaging.rocketmq.message.group" semantic conventions. It represents // the it is essential for FIFO message. Messages that belong to the same // message group are always processed one by one within the same consumer // group. func MessagingRocketmqMessageGroup(val string) attribute.KeyValue { return MessagingRocketmqMessageGroupKey.String(val) } // MessagingRocketmqMessageTag returns an attribute KeyValue conforming to // the "messaging.rocketmq.message.tag" semantic conventions. It represents the // secondary classifier of message besides topic. func MessagingRocketmqMessageTag(val string) attribute.KeyValue { return MessagingRocketmqMessageTagKey.String(val) } // MessagingRocketmqMessageKeys returns an attribute KeyValue conforming to // the "messaging.rocketmq.message.keys" semantic conventions. It represents // the key(s) of message, another way to mark message besides message id. func MessagingRocketmqMessageKeys(val ...string) attribute.KeyValue { return MessagingRocketmqMessageKeysKey.StringSlice(val) } // Describes user-agent attributes. const ( // UserAgentOriginalKey is the attribute Key conforming to the // "user_agent.original" semantic conventions. It represents the value of // the [HTTP // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) // header sent by the client. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'CERN-LineMode/2.15 libwww/2.17b3' UserAgentOriginalKey = attribute.Key("user_agent.original") ) // UserAgentOriginal returns an attribute KeyValue conforming to the // "user_agent.original" semantic conventions. It represents the value of the // [HTTP // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) // header sent by the client. func UserAgentOriginal(val string) attribute.KeyValue { return UserAgentOriginalKey.String(val) } ================================================ FILE: vendor/go.opentelemetry.io/otel/semconv/v1.20.0/doc.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 // Package semconv implements OpenTelemetry semantic conventions. // // OpenTelemetry semantic conventions are agreed standardized naming // patterns for OpenTelemetry things. This package represents the conventions // as of the v1.20.0 version of the OpenTelemetry specification. package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" ================================================ FILE: vendor/go.opentelemetry.io/otel/semconv/v1.20.0/event.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 // Code generated from semantic convention specification. DO NOT EDIT. package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" import "go.opentelemetry.io/otel/attribute" // This semantic convention defines the attributes used to represent a feature // flag evaluation as an event. const ( // FeatureFlagKeyKey is the attribute Key conforming to the // "feature_flag.key" semantic conventions. It represents the unique // identifier of the feature flag. // // Type: string // RequirementLevel: Required // Stability: stable // Examples: 'logo-color' FeatureFlagKeyKey = attribute.Key("feature_flag.key") // FeatureFlagProviderNameKey is the attribute Key conforming to the // "feature_flag.provider_name" semantic conventions. It represents the // name of the service provider that performs the flag evaluation. // // Type: string // RequirementLevel: Recommended // Stability: stable // Examples: 'Flag Manager' FeatureFlagProviderNameKey = attribute.Key("feature_flag.provider_name") // FeatureFlagVariantKey is the attribute Key conforming to the // "feature_flag.variant" semantic conventions. It represents the sHOULD be // a semantic identifier for a value. If one is unavailable, a stringified // version of the value can be used. // // Type: string // RequirementLevel: Recommended // Stability: stable // Examples: 'red', 'true', 'on' // Note: A semantic identifier, commonly referred to as a variant, provides // a means // for referring to a value without including the value itself. This can // provide additional context for understanding the meaning behind a value. // For example, the variant `red` maybe be used for the value `#c05543`. // // A stringified version of the value can be used in situations where a // semantic identifier is unavailable. String representation of the value // should be determined by the implementer. FeatureFlagVariantKey = attribute.Key("feature_flag.variant") ) // FeatureFlagKey returns an attribute KeyValue conforming to the // "feature_flag.key" semantic conventions. It represents the unique identifier // of the feature flag. func FeatureFlagKey(val string) attribute.KeyValue { return FeatureFlagKeyKey.String(val) } // FeatureFlagProviderName returns an attribute KeyValue conforming to the // "feature_flag.provider_name" semantic conventions. It represents the name of // the service provider that performs the flag evaluation. func FeatureFlagProviderName(val string) attribute.KeyValue { return FeatureFlagProviderNameKey.String(val) } // FeatureFlagVariant returns an attribute KeyValue conforming to the // "feature_flag.variant" semantic conventions. It represents the sHOULD be a // semantic identifier for a value. If one is unavailable, a stringified // version of the value can be used. func FeatureFlagVariant(val string) attribute.KeyValue { return FeatureFlagVariantKey.String(val) } // RPC received/sent message. const ( // MessageTypeKey is the attribute Key conforming to the "message.type" // semantic conventions. It represents the whether this is a received or // sent message. // // Type: Enum // RequirementLevel: Optional // Stability: stable MessageTypeKey = attribute.Key("message.type") // MessageIDKey is the attribute Key conforming to the "message.id" // semantic conventions. It represents the mUST be calculated as two // different counters starting from `1` one for sent messages and one for // received message. // // Type: int // RequirementLevel: Optional // Stability: stable // Note: This way we guarantee that the values will be consistent between // different implementations. MessageIDKey = attribute.Key("message.id") // MessageCompressedSizeKey is the attribute Key conforming to the // "message.compressed_size" semantic conventions. It represents the // compressed size of the message in bytes. // // Type: int // RequirementLevel: Optional // Stability: stable MessageCompressedSizeKey = attribute.Key("message.compressed_size") // MessageUncompressedSizeKey is the attribute Key conforming to the // "message.uncompressed_size" semantic conventions. It represents the // uncompressed size of the message in bytes. // // Type: int // RequirementLevel: Optional // Stability: stable MessageUncompressedSizeKey = attribute.Key("message.uncompressed_size") ) var ( // sent MessageTypeSent = MessageTypeKey.String("SENT") // received MessageTypeReceived = MessageTypeKey.String("RECEIVED") ) // MessageID returns an attribute KeyValue conforming to the "message.id" // semantic conventions. It represents the mUST be calculated as two different // counters starting from `1` one for sent messages and one for received // message. func MessageID(val int) attribute.KeyValue { return MessageIDKey.Int(val) } // MessageCompressedSize returns an attribute KeyValue conforming to the // "message.compressed_size" semantic conventions. It represents the compressed // size of the message in bytes. func MessageCompressedSize(val int) attribute.KeyValue { return MessageCompressedSizeKey.Int(val) } // MessageUncompressedSize returns an attribute KeyValue conforming to the // "message.uncompressed_size" semantic conventions. It represents the // uncompressed size of the message in bytes. func MessageUncompressedSize(val int) attribute.KeyValue { return MessageUncompressedSizeKey.Int(val) } // The attributes used to report a single exception associated with a span. const ( // ExceptionEscapedKey is the attribute Key conforming to the // "exception.escaped" semantic conventions. It represents the sHOULD be // set to true if the exception event is recorded at a point where it is // known that the exception is escaping the scope of the span. // // Type: boolean // RequirementLevel: Optional // Stability: stable // Note: An exception is considered to have escaped (or left) the scope of // a span, // if that span is ended while the exception is still logically "in // flight". // This may be actually "in flight" in some languages (e.g. if the // exception // is passed to a Context manager's `__exit__` method in Python) but will // usually be caught at the point of recording the exception in most // languages. // // It is usually not possible to determine at the point where an exception // is thrown // whether it will escape the scope of a span. // However, it is trivial to know that an exception // will escape, if one checks for an active exception just before ending // the span, // as done in the [example above](#recording-an-exception). // // It follows that an exception may still escape the scope of the span // even if the `exception.escaped` attribute was not set or set to false, // since the event might have been recorded at a time where it was not // clear whether the exception will escape. ExceptionEscapedKey = attribute.Key("exception.escaped") ) // ExceptionEscaped returns an attribute KeyValue conforming to the // "exception.escaped" semantic conventions. It represents the sHOULD be set to // true if the exception event is recorded at a point where it is known that // the exception is escaping the scope of the span. func ExceptionEscaped(val bool) attribute.KeyValue { return ExceptionEscapedKey.Bool(val) } ================================================ FILE: vendor/go.opentelemetry.io/otel/semconv/v1.20.0/exception.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" const ( // ExceptionEventName is the name of the Span event representing an exception. ExceptionEventName = "exception" ) ================================================ FILE: vendor/go.opentelemetry.io/otel/semconv/v1.20.0/http.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" // HTTP scheme attributes. var ( HTTPSchemeHTTP = HTTPSchemeKey.String("http") HTTPSchemeHTTPS = HTTPSchemeKey.String("https") ) ================================================ FILE: vendor/go.opentelemetry.io/otel/semconv/v1.20.0/resource.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 // Code generated from semantic convention specification. DO NOT EDIT. package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" import "go.opentelemetry.io/otel/attribute" // The web browser in which the application represented by the resource is // running. The `browser.*` attributes MUST be used only for resources that // represent applications running in a web browser (regardless of whether // running on a mobile or desktop device). const ( // BrowserBrandsKey is the attribute Key conforming to the "browser.brands" // semantic conventions. It represents the array of brand name and version // separated by a space // // Type: string[] // RequirementLevel: Optional // Stability: stable // Examples: ' Not A;Brand 99', 'Chromium 99', 'Chrome 99' // Note: This value is intended to be taken from the [UA client hints // API](https://wicg.github.io/ua-client-hints/#interface) // (`navigator.userAgentData.brands`). BrowserBrandsKey = attribute.Key("browser.brands") // BrowserPlatformKey is the attribute Key conforming to the // "browser.platform" semantic conventions. It represents the platform on // which the browser is running // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'Windows', 'macOS', 'Android' // Note: This value is intended to be taken from the [UA client hints // API](https://wicg.github.io/ua-client-hints/#interface) // (`navigator.userAgentData.platform`). If unavailable, the legacy // `navigator.platform` API SHOULD NOT be used instead and this attribute // SHOULD be left unset in order for the values to be consistent. // The list of possible values is defined in the [W3C User-Agent Client // Hints // specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform). // Note that some (but not all) of these values can overlap with values in // the [`os.type` and `os.name` attributes](./os.md). However, for // consistency, the values in the `browser.platform` attribute should // capture the exact value that the user agent provides. BrowserPlatformKey = attribute.Key("browser.platform") // BrowserMobileKey is the attribute Key conforming to the "browser.mobile" // semantic conventions. It represents a boolean that is true if the // browser is running on a mobile device // // Type: boolean // RequirementLevel: Optional // Stability: stable // Note: This value is intended to be taken from the [UA client hints // API](https://wicg.github.io/ua-client-hints/#interface) // (`navigator.userAgentData.mobile`). If unavailable, this attribute // SHOULD be left unset. BrowserMobileKey = attribute.Key("browser.mobile") // BrowserLanguageKey is the attribute Key conforming to the // "browser.language" semantic conventions. It represents the preferred // language of the user using the browser // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'en', 'en-US', 'fr', 'fr-FR' // Note: This value is intended to be taken from the Navigator API // `navigator.language`. BrowserLanguageKey = attribute.Key("browser.language") ) // BrowserBrands returns an attribute KeyValue conforming to the // "browser.brands" semantic conventions. It represents the array of brand name // and version separated by a space func BrowserBrands(val ...string) attribute.KeyValue { return BrowserBrandsKey.StringSlice(val) } // BrowserPlatform returns an attribute KeyValue conforming to the // "browser.platform" semantic conventions. It represents the platform on which // the browser is running func BrowserPlatform(val string) attribute.KeyValue { return BrowserPlatformKey.String(val) } // BrowserMobile returns an attribute KeyValue conforming to the // "browser.mobile" semantic conventions. It represents a boolean that is true // if the browser is running on a mobile device func BrowserMobile(val bool) attribute.KeyValue { return BrowserMobileKey.Bool(val) } // BrowserLanguage returns an attribute KeyValue conforming to the // "browser.language" semantic conventions. It represents the preferred // language of the user using the browser func BrowserLanguage(val string) attribute.KeyValue { return BrowserLanguageKey.String(val) } // A cloud environment (e.g. GCP, Azure, AWS) const ( // CloudProviderKey is the attribute Key conforming to the "cloud.provider" // semantic conventions. It represents the name of the cloud provider. // // Type: Enum // RequirementLevel: Optional // Stability: stable CloudProviderKey = attribute.Key("cloud.provider") // CloudAccountIDKey is the attribute Key conforming to the // "cloud.account.id" semantic conventions. It represents the cloud account // ID the resource is assigned to. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '111111111111', 'opentelemetry' CloudAccountIDKey = attribute.Key("cloud.account.id") // CloudRegionKey is the attribute Key conforming to the "cloud.region" // semantic conventions. It represents the geographical region the resource // is running. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'us-central1', 'us-east-1' // Note: Refer to your provider's docs to see the available regions, for // example [Alibaba Cloud // regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS // regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), // [Azure // regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), // [Google Cloud regions](https://cloud.google.com/about/locations), or // [Tencent Cloud // regions](https://www.tencentcloud.com/document/product/213/6091). CloudRegionKey = attribute.Key("cloud.region") // CloudResourceIDKey is the attribute Key conforming to the // "cloud.resource_id" semantic conventions. It represents the cloud // provider-specific native identifier of the monitored cloud resource // (e.g. an // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // on AWS, a [fully qualified resource // ID](https://learn.microsoft.com/en-us/rest/api/resources/resources/get-by-id) // on Azure, a [full resource // name](https://cloud.google.com/apis/design/resource_names#full_resource_name) // on GCP) // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function', // '//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID', // '/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/' // Note: On some cloud providers, it may not be possible to determine the // full ID at startup, // so it may be necessary to set `cloud.resource_id` as a span attribute // instead. // // The exact value to use for `cloud.resource_id` depends on the cloud // provider. // The following well-known definitions MUST be used if you set this // attribute and they apply: // // * **AWS Lambda:** The function // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // Take care not to use the "invoked ARN" directly but replace any // [alias // suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) // with the resolved function version, as the same runtime instance may // be invokable with // multiple different aliases. // * **GCP:** The [URI of the // resource](https://cloud.google.com/iam/docs/full-resource-names) // * **Azure:** The [Fully Qualified Resource // ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id) // of the invoked function, // *not* the function app, having the form // `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/`. // This means that a span attribute MUST be used, as an Azure function // app can host multiple functions that would usually share // a TracerProvider. CloudResourceIDKey = attribute.Key("cloud.resource_id") // CloudAvailabilityZoneKey is the attribute Key conforming to the // "cloud.availability_zone" semantic conventions. It represents the cloud // regions often have multiple, isolated locations known as zones to // increase availability. Availability zone represents the zone where the // resource is running. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'us-east-1c' // Note: Availability zones are called "zones" on Alibaba Cloud and Google // Cloud. CloudAvailabilityZoneKey = attribute.Key("cloud.availability_zone") // CloudPlatformKey is the attribute Key conforming to the "cloud.platform" // semantic conventions. It represents the cloud platform in use. // // Type: Enum // RequirementLevel: Optional // Stability: stable // Note: The prefix of the service SHOULD match the one specified in // `cloud.provider`. CloudPlatformKey = attribute.Key("cloud.platform") ) var ( // Alibaba Cloud CloudProviderAlibabaCloud = CloudProviderKey.String("alibaba_cloud") // Amazon Web Services CloudProviderAWS = CloudProviderKey.String("aws") // Microsoft Azure CloudProviderAzure = CloudProviderKey.String("azure") // Google Cloud Platform CloudProviderGCP = CloudProviderKey.String("gcp") // Heroku Platform as a Service CloudProviderHeroku = CloudProviderKey.String("heroku") // IBM Cloud CloudProviderIbmCloud = CloudProviderKey.String("ibm_cloud") // Tencent Cloud CloudProviderTencentCloud = CloudProviderKey.String("tencent_cloud") ) var ( // Alibaba Cloud Elastic Compute Service CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs") // Alibaba Cloud Function Compute CloudPlatformAlibabaCloudFc = CloudPlatformKey.String("alibaba_cloud_fc") // Red Hat OpenShift on Alibaba Cloud CloudPlatformAlibabaCloudOpenshift = CloudPlatformKey.String("alibaba_cloud_openshift") // AWS Elastic Compute Cloud CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2") // AWS Elastic Container Service CloudPlatformAWSECS = CloudPlatformKey.String("aws_ecs") // AWS Elastic Kubernetes Service CloudPlatformAWSEKS = CloudPlatformKey.String("aws_eks") // AWS Lambda CloudPlatformAWSLambda = CloudPlatformKey.String("aws_lambda") // AWS Elastic Beanstalk CloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String("aws_elastic_beanstalk") // AWS App Runner CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner") // Red Hat OpenShift on AWS (ROSA) CloudPlatformAWSOpenshift = CloudPlatformKey.String("aws_openshift") // Azure Virtual Machines CloudPlatformAzureVM = CloudPlatformKey.String("azure_vm") // Azure Container Instances CloudPlatformAzureContainerInstances = CloudPlatformKey.String("azure_container_instances") // Azure Kubernetes Service CloudPlatformAzureAKS = CloudPlatformKey.String("azure_aks") // Azure Functions CloudPlatformAzureFunctions = CloudPlatformKey.String("azure_functions") // Azure App Service CloudPlatformAzureAppService = CloudPlatformKey.String("azure_app_service") // Azure Red Hat OpenShift CloudPlatformAzureOpenshift = CloudPlatformKey.String("azure_openshift") // Google Cloud Compute Engine (GCE) CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine") // Google Cloud Run CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run") // Google Cloud Kubernetes Engine (GKE) CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine") // Google Cloud Functions (GCF) CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions") // Google Cloud App Engine (GAE) CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine") // Red Hat OpenShift on Google Cloud CloudPlatformGCPOpenshift = CloudPlatformKey.String("gcp_openshift") // Red Hat OpenShift on IBM Cloud CloudPlatformIbmCloudOpenshift = CloudPlatformKey.String("ibm_cloud_openshift") // Tencent Cloud Cloud Virtual Machine (CVM) CloudPlatformTencentCloudCvm = CloudPlatformKey.String("tencent_cloud_cvm") // Tencent Cloud Elastic Kubernetes Service (EKS) CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks") // Tencent Cloud Serverless Cloud Function (SCF) CloudPlatformTencentCloudScf = CloudPlatformKey.String("tencent_cloud_scf") ) // CloudAccountID returns an attribute KeyValue conforming to the // "cloud.account.id" semantic conventions. It represents the cloud account ID // the resource is assigned to. func CloudAccountID(val string) attribute.KeyValue { return CloudAccountIDKey.String(val) } // CloudRegion returns an attribute KeyValue conforming to the // "cloud.region" semantic conventions. It represents the geographical region // the resource is running. func CloudRegion(val string) attribute.KeyValue { return CloudRegionKey.String(val) } // CloudResourceID returns an attribute KeyValue conforming to the // "cloud.resource_id" semantic conventions. It represents the cloud // provider-specific native identifier of the monitored cloud resource (e.g. an // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // on AWS, a [fully qualified resource // ID](https://learn.microsoft.com/en-us/rest/api/resources/resources/get-by-id) // on Azure, a [full resource // name](https://cloud.google.com/apis/design/resource_names#full_resource_name) // on GCP) func CloudResourceID(val string) attribute.KeyValue { return CloudResourceIDKey.String(val) } // CloudAvailabilityZone returns an attribute KeyValue conforming to the // "cloud.availability_zone" semantic conventions. It represents the cloud // regions often have multiple, isolated locations known as zones to increase // availability. Availability zone represents the zone where the resource is // running. func CloudAvailabilityZone(val string) attribute.KeyValue { return CloudAvailabilityZoneKey.String(val) } // Resources used by AWS Elastic Container Service (ECS). const ( // AWSECSContainerARNKey is the attribute Key conforming to the // "aws.ecs.container.arn" semantic conventions. It represents the Amazon // Resource Name (ARN) of an [ECS container // instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: // 'arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9' AWSECSContainerARNKey = attribute.Key("aws.ecs.container.arn") // AWSECSClusterARNKey is the attribute Key conforming to the // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an // [ECS // cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' AWSECSClusterARNKey = attribute.Key("aws.ecs.cluster.arn") // AWSECSLaunchtypeKey is the attribute Key conforming to the // "aws.ecs.launchtype" semantic conventions. It represents the [launch // type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) // for an ECS task. // // Type: Enum // RequirementLevel: Optional // Stability: stable AWSECSLaunchtypeKey = attribute.Key("aws.ecs.launchtype") // AWSECSTaskARNKey is the attribute Key conforming to the // "aws.ecs.task.arn" semantic conventions. It represents the ARN of an // [ECS task // definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: // 'arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b' AWSECSTaskARNKey = attribute.Key("aws.ecs.task.arn") // AWSECSTaskFamilyKey is the attribute Key conforming to the // "aws.ecs.task.family" semantic conventions. It represents the task // definition family this task definition is a member of. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'opentelemetry-family' AWSECSTaskFamilyKey = attribute.Key("aws.ecs.task.family") // AWSECSTaskRevisionKey is the attribute Key conforming to the // "aws.ecs.task.revision" semantic conventions. It represents the revision // for this task definition. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '8', '26' AWSECSTaskRevisionKey = attribute.Key("aws.ecs.task.revision") ) var ( // ec2 AWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String("ec2") // fargate AWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String("fargate") ) // AWSECSContainerARN returns an attribute KeyValue conforming to the // "aws.ecs.container.arn" semantic conventions. It represents the Amazon // Resource Name (ARN) of an [ECS container // instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). func AWSECSContainerARN(val string) attribute.KeyValue { return AWSECSContainerARNKey.String(val) } // AWSECSClusterARN returns an attribute KeyValue conforming to the // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an [ECS // cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). func AWSECSClusterARN(val string) attribute.KeyValue { return AWSECSClusterARNKey.String(val) } // AWSECSTaskARN returns an attribute KeyValue conforming to the // "aws.ecs.task.arn" semantic conventions. It represents the ARN of an [ECS // task // definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). func AWSECSTaskARN(val string) attribute.KeyValue { return AWSECSTaskARNKey.String(val) } // AWSECSTaskFamily returns an attribute KeyValue conforming to the // "aws.ecs.task.family" semantic conventions. It represents the task // definition family this task definition is a member of. func AWSECSTaskFamily(val string) attribute.KeyValue { return AWSECSTaskFamilyKey.String(val) } // AWSECSTaskRevision returns an attribute KeyValue conforming to the // "aws.ecs.task.revision" semantic conventions. It represents the revision for // this task definition. func AWSECSTaskRevision(val string) attribute.KeyValue { return AWSECSTaskRevisionKey.String(val) } // Resources used by AWS Elastic Kubernetes Service (EKS). const ( // AWSEKSClusterARNKey is the attribute Key conforming to the // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an // EKS cluster. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' AWSEKSClusterARNKey = attribute.Key("aws.eks.cluster.arn") ) // AWSEKSClusterARN returns an attribute KeyValue conforming to the // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an EKS // cluster. func AWSEKSClusterARN(val string) attribute.KeyValue { return AWSEKSClusterARNKey.String(val) } // Resources specific to Amazon Web Services. const ( // AWSLogGroupNamesKey is the attribute Key conforming to the // "aws.log.group.names" semantic conventions. It represents the name(s) of // the AWS log group(s) an application is writing to. // // Type: string[] // RequirementLevel: Optional // Stability: stable // Examples: '/aws/lambda/my-function', 'opentelemetry-service' // Note: Multiple log groups must be supported for cases like // multi-container applications, where a single application has sidecar // containers, and each write to their own log group. AWSLogGroupNamesKey = attribute.Key("aws.log.group.names") // AWSLogGroupARNsKey is the attribute Key conforming to the // "aws.log.group.arns" semantic conventions. It represents the Amazon // Resource Name(s) (ARN) of the AWS log group(s). // // Type: string[] // RequirementLevel: Optional // Stability: stable // Examples: // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*' // Note: See the [log group ARN format // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). AWSLogGroupARNsKey = attribute.Key("aws.log.group.arns") // AWSLogStreamNamesKey is the attribute Key conforming to the // "aws.log.stream.names" semantic conventions. It represents the name(s) // of the AWS log stream(s) an application is writing to. // // Type: string[] // RequirementLevel: Optional // Stability: stable // Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' AWSLogStreamNamesKey = attribute.Key("aws.log.stream.names") // AWSLogStreamARNsKey is the attribute Key conforming to the // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of // the AWS log stream(s). // // Type: string[] // RequirementLevel: Optional // Stability: stable // Examples: // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' // Note: See the [log stream ARN format // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). // One log group can contain several log streams, so these ARNs necessarily // identify both a log group and a log stream. AWSLogStreamARNsKey = attribute.Key("aws.log.stream.arns") ) // AWSLogGroupNames returns an attribute KeyValue conforming to the // "aws.log.group.names" semantic conventions. It represents the name(s) of the // AWS log group(s) an application is writing to. func AWSLogGroupNames(val ...string) attribute.KeyValue { return AWSLogGroupNamesKey.StringSlice(val) } // AWSLogGroupARNs returns an attribute KeyValue conforming to the // "aws.log.group.arns" semantic conventions. It represents the Amazon Resource // Name(s) (ARN) of the AWS log group(s). func AWSLogGroupARNs(val ...string) attribute.KeyValue { return AWSLogGroupARNsKey.StringSlice(val) } // AWSLogStreamNames returns an attribute KeyValue conforming to the // "aws.log.stream.names" semantic conventions. It represents the name(s) of // the AWS log stream(s) an application is writing to. func AWSLogStreamNames(val ...string) attribute.KeyValue { return AWSLogStreamNamesKey.StringSlice(val) } // AWSLogStreamARNs returns an attribute KeyValue conforming to the // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of the // AWS log stream(s). func AWSLogStreamARNs(val ...string) attribute.KeyValue { return AWSLogStreamARNsKey.StringSlice(val) } // Heroku dyno metadata const ( // HerokuReleaseCreationTimestampKey is the attribute Key conforming to the // "heroku.release.creation_timestamp" semantic conventions. It represents // the time and date the release was created // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '2022-10-23T18:00:42Z' HerokuReleaseCreationTimestampKey = attribute.Key("heroku.release.creation_timestamp") // HerokuReleaseCommitKey is the attribute Key conforming to the // "heroku.release.commit" semantic conventions. It represents the commit // hash for the current release // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'e6134959463efd8966b20e75b913cafe3f5ec' HerokuReleaseCommitKey = attribute.Key("heroku.release.commit") // HerokuAppIDKey is the attribute Key conforming to the "heroku.app.id" // semantic conventions. It represents the unique identifier for the // application // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '2daa2797-e42b-4624-9322-ec3f968df4da' HerokuAppIDKey = attribute.Key("heroku.app.id") ) // HerokuReleaseCreationTimestamp returns an attribute KeyValue conforming // to the "heroku.release.creation_timestamp" semantic conventions. It // represents the time and date the release was created func HerokuReleaseCreationTimestamp(val string) attribute.KeyValue { return HerokuReleaseCreationTimestampKey.String(val) } // HerokuReleaseCommit returns an attribute KeyValue conforming to the // "heroku.release.commit" semantic conventions. It represents the commit hash // for the current release func HerokuReleaseCommit(val string) attribute.KeyValue { return HerokuReleaseCommitKey.String(val) } // HerokuAppID returns an attribute KeyValue conforming to the // "heroku.app.id" semantic conventions. It represents the unique identifier // for the application func HerokuAppID(val string) attribute.KeyValue { return HerokuAppIDKey.String(val) } // A container instance. const ( // ContainerNameKey is the attribute Key conforming to the "container.name" // semantic conventions. It represents the container name used by container // runtime. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'opentelemetry-autoconf' ContainerNameKey = attribute.Key("container.name") // ContainerIDKey is the attribute Key conforming to the "container.id" // semantic conventions. It represents the container ID. Usually a UUID, as // for example used to [identify Docker // containers](https://docs.docker.com/engine/reference/run/#container-identification). // The UUID might be abbreviated. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'a3bf90e006b2' ContainerIDKey = attribute.Key("container.id") // ContainerRuntimeKey is the attribute Key conforming to the // "container.runtime" semantic conventions. It represents the container // runtime managing this container. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'docker', 'containerd', 'rkt' ContainerRuntimeKey = attribute.Key("container.runtime") // ContainerImageNameKey is the attribute Key conforming to the // "container.image.name" semantic conventions. It represents the name of // the image the container was built on. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'gcr.io/opentelemetry/operator' ContainerImageNameKey = attribute.Key("container.image.name") // ContainerImageTagKey is the attribute Key conforming to the // "container.image.tag" semantic conventions. It represents the container // image tag. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '0.1' ContainerImageTagKey = attribute.Key("container.image.tag") ) // ContainerName returns an attribute KeyValue conforming to the // "container.name" semantic conventions. It represents the container name used // by container runtime. func ContainerName(val string) attribute.KeyValue { return ContainerNameKey.String(val) } // ContainerID returns an attribute KeyValue conforming to the // "container.id" semantic conventions. It represents the container ID. Usually // a UUID, as for example used to [identify Docker // containers](https://docs.docker.com/engine/reference/run/#container-identification). // The UUID might be abbreviated. func ContainerID(val string) attribute.KeyValue { return ContainerIDKey.String(val) } // ContainerRuntime returns an attribute KeyValue conforming to the // "container.runtime" semantic conventions. It represents the container // runtime managing this container. func ContainerRuntime(val string) attribute.KeyValue { return ContainerRuntimeKey.String(val) } // ContainerImageName returns an attribute KeyValue conforming to the // "container.image.name" semantic conventions. It represents the name of the // image the container was built on. func ContainerImageName(val string) attribute.KeyValue { return ContainerImageNameKey.String(val) } // ContainerImageTag returns an attribute KeyValue conforming to the // "container.image.tag" semantic conventions. It represents the container // image tag. func ContainerImageTag(val string) attribute.KeyValue { return ContainerImageTagKey.String(val) } // The software deployment. const ( // DeploymentEnvironmentKey is the attribute Key conforming to the // "deployment.environment" semantic conventions. It represents the name of // the [deployment // environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka // deployment tier). // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'staging', 'production' DeploymentEnvironmentKey = attribute.Key("deployment.environment") ) // DeploymentEnvironment returns an attribute KeyValue conforming to the // "deployment.environment" semantic conventions. It represents the name of the // [deployment // environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka // deployment tier). func DeploymentEnvironment(val string) attribute.KeyValue { return DeploymentEnvironmentKey.String(val) } // The device on which the process represented by this resource is running. const ( // DeviceIDKey is the attribute Key conforming to the "device.id" semantic // conventions. It represents a unique identifier representing the device // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092' // Note: The device identifier MUST only be defined using the values // outlined below. This value is not an advertising identifier and MUST NOT // be used as such. On iOS (Swift or Objective-C), this value MUST be equal // to the [vendor // identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). // On Android (Java or Kotlin), this value MUST be equal to the Firebase // Installation ID or a globally unique UUID which is persisted across // sessions in your application. More information can be found // [here](https://developer.android.com/training/articles/user-data-ids) on // best practices and exact implementation details. Caution should be taken // when storing personal data or anything which can identify a user. GDPR // and data protection laws may apply, ensure you do your own due // diligence. DeviceIDKey = attribute.Key("device.id") // DeviceModelIdentifierKey is the attribute Key conforming to the // "device.model.identifier" semantic conventions. It represents the model // identifier for the device // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'iPhone3,4', 'SM-G920F' // Note: It's recommended this value represents a machine readable version // of the model identifier rather than the market or consumer-friendly name // of the device. DeviceModelIdentifierKey = attribute.Key("device.model.identifier") // DeviceModelNameKey is the attribute Key conforming to the // "device.model.name" semantic conventions. It represents the marketing // name for the device model // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6' // Note: It's recommended this value represents a human readable version of // the device model rather than a machine readable alternative. DeviceModelNameKey = attribute.Key("device.model.name") // DeviceManufacturerKey is the attribute Key conforming to the // "device.manufacturer" semantic conventions. It represents the name of // the device manufacturer // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'Apple', 'Samsung' // Note: The Android OS provides this field via // [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER). // iOS apps SHOULD hardcode the value `Apple`. DeviceManufacturerKey = attribute.Key("device.manufacturer") ) // DeviceID returns an attribute KeyValue conforming to the "device.id" // semantic conventions. It represents a unique identifier representing the // device func DeviceID(val string) attribute.KeyValue { return DeviceIDKey.String(val) } // DeviceModelIdentifier returns an attribute KeyValue conforming to the // "device.model.identifier" semantic conventions. It represents the model // identifier for the device func DeviceModelIdentifier(val string) attribute.KeyValue { return DeviceModelIdentifierKey.String(val) } // DeviceModelName returns an attribute KeyValue conforming to the // "device.model.name" semantic conventions. It represents the marketing name // for the device model func DeviceModelName(val string) attribute.KeyValue { return DeviceModelNameKey.String(val) } // DeviceManufacturer returns an attribute KeyValue conforming to the // "device.manufacturer" semantic conventions. It represents the name of the // device manufacturer func DeviceManufacturer(val string) attribute.KeyValue { return DeviceManufacturerKey.String(val) } // A serverless instance. const ( // FaaSNameKey is the attribute Key conforming to the "faas.name" semantic // conventions. It represents the name of the single function that this // runtime instance executes. // // Type: string // RequirementLevel: Required // Stability: stable // Examples: 'my-function', 'myazurefunctionapp/some-function-name' // Note: This is the name of the function as configured/deployed on the // FaaS // platform and is usually different from the name of the callback // function (which may be stored in the // [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes) // span attributes). // // For some cloud providers, the above definition is ambiguous. The // following // definition of function name MUST be used for this attribute // (and consequently the span name) for the listed cloud // providers/products: // // * **Azure:** The full name `/`, i.e., function app name // followed by a forward slash followed by the function name (this form // can also be seen in the resource JSON for the function). // This means that a span attribute MUST be used, as an Azure function // app can host multiple functions that would usually share // a TracerProvider (see also the `cloud.resource_id` attribute). FaaSNameKey = attribute.Key("faas.name") // FaaSVersionKey is the attribute Key conforming to the "faas.version" // semantic conventions. It represents the immutable version of the // function being executed. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '26', 'pinkfroid-00002' // Note: Depending on the cloud provider and platform, use: // // * **AWS Lambda:** The [function // version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) // (an integer represented as a decimal string). // * **Google Cloud Run:** The // [revision](https://cloud.google.com/run/docs/managing/revisions) // (i.e., the function name plus the revision suffix). // * **Google Cloud Functions:** The value of the // [`K_REVISION` environment // variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). // * **Azure Functions:** Not applicable. Do not set this attribute. FaaSVersionKey = attribute.Key("faas.version") // FaaSInstanceKey is the attribute Key conforming to the "faas.instance" // semantic conventions. It represents the execution environment ID as a // string, that will be potentially reused for other invocations to the // same function/function version. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de' // Note: * **AWS Lambda:** Use the (full) log stream name. FaaSInstanceKey = attribute.Key("faas.instance") // FaaSMaxMemoryKey is the attribute Key conforming to the // "faas.max_memory" semantic conventions. It represents the amount of // memory available to the serverless function converted to Bytes. // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 134217728 // Note: It's recommended to set this attribute since e.g. too little // memory can easily stop a Java AWS Lambda function from working // correctly. On AWS Lambda, the environment variable // `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information (which must // be multiplied by 1,048,576). FaaSMaxMemoryKey = attribute.Key("faas.max_memory") ) // FaaSName returns an attribute KeyValue conforming to the "faas.name" // semantic conventions. It represents the name of the single function that // this runtime instance executes. func FaaSName(val string) attribute.KeyValue { return FaaSNameKey.String(val) } // FaaSVersion returns an attribute KeyValue conforming to the // "faas.version" semantic conventions. It represents the immutable version of // the function being executed. func FaaSVersion(val string) attribute.KeyValue { return FaaSVersionKey.String(val) } // FaaSInstance returns an attribute KeyValue conforming to the // "faas.instance" semantic conventions. It represents the execution // environment ID as a string, that will be potentially reused for other // invocations to the same function/function version. func FaaSInstance(val string) attribute.KeyValue { return FaaSInstanceKey.String(val) } // FaaSMaxMemory returns an attribute KeyValue conforming to the // "faas.max_memory" semantic conventions. It represents the amount of memory // available to the serverless function converted to Bytes. func FaaSMaxMemory(val int) attribute.KeyValue { return FaaSMaxMemoryKey.Int(val) } // A host is defined as a general computing instance. const ( // HostIDKey is the attribute Key conforming to the "host.id" semantic // conventions. It represents the unique host ID. For Cloud, this must be // the instance_id assigned by the cloud provider. For non-containerized // systems, this should be the `machine-id`. See the table below for the // sources to use to determine the `machine-id` based on operating system. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'fdbf79e8af94cb7f9e8df36789187052' HostIDKey = attribute.Key("host.id") // HostNameKey is the attribute Key conforming to the "host.name" semantic // conventions. It represents the name of the host. On Unix systems, it may // contain what the hostname command returns, or the fully qualified // hostname, or another name specified by the user. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'opentelemetry-test' HostNameKey = attribute.Key("host.name") // HostTypeKey is the attribute Key conforming to the "host.type" semantic // conventions. It represents the type of host. For Cloud, this must be the // machine type. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'n1-standard-1' HostTypeKey = attribute.Key("host.type") // HostArchKey is the attribute Key conforming to the "host.arch" semantic // conventions. It represents the CPU architecture the host system is // running on. // // Type: Enum // RequirementLevel: Optional // Stability: stable HostArchKey = attribute.Key("host.arch") // HostImageNameKey is the attribute Key conforming to the // "host.image.name" semantic conventions. It represents the name of the VM // image or OS install the host was instantiated from. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905' HostImageNameKey = attribute.Key("host.image.name") // HostImageIDKey is the attribute Key conforming to the "host.image.id" // semantic conventions. It represents the vM image ID. For Cloud, this // value is from the provider. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'ami-07b06b442921831e5' HostImageIDKey = attribute.Key("host.image.id") // HostImageVersionKey is the attribute Key conforming to the // "host.image.version" semantic conventions. It represents the version // string of the VM image as defined in [Version // Attributes](README.md#version-attributes). // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '0.1' HostImageVersionKey = attribute.Key("host.image.version") ) var ( // AMD64 HostArchAMD64 = HostArchKey.String("amd64") // ARM32 HostArchARM32 = HostArchKey.String("arm32") // ARM64 HostArchARM64 = HostArchKey.String("arm64") // Itanium HostArchIA64 = HostArchKey.String("ia64") // 32-bit PowerPC HostArchPPC32 = HostArchKey.String("ppc32") // 64-bit PowerPC HostArchPPC64 = HostArchKey.String("ppc64") // IBM z/Architecture HostArchS390x = HostArchKey.String("s390x") // 32-bit x86 HostArchX86 = HostArchKey.String("x86") ) // HostID returns an attribute KeyValue conforming to the "host.id" semantic // conventions. It represents the unique host ID. For Cloud, this must be the // instance_id assigned by the cloud provider. For non-containerized systems, // this should be the `machine-id`. See the table below for the sources to use // to determine the `machine-id` based on operating system. func HostID(val string) attribute.KeyValue { return HostIDKey.String(val) } // HostName returns an attribute KeyValue conforming to the "host.name" // semantic conventions. It represents the name of the host. On Unix systems, // it may contain what the hostname command returns, or the fully qualified // hostname, or another name specified by the user. func HostName(val string) attribute.KeyValue { return HostNameKey.String(val) } // HostType returns an attribute KeyValue conforming to the "host.type" // semantic conventions. It represents the type of host. For Cloud, this must // be the machine type. func HostType(val string) attribute.KeyValue { return HostTypeKey.String(val) } // HostImageName returns an attribute KeyValue conforming to the // "host.image.name" semantic conventions. It represents the name of the VM // image or OS install the host was instantiated from. func HostImageName(val string) attribute.KeyValue { return HostImageNameKey.String(val) } // HostImageID returns an attribute KeyValue conforming to the // "host.image.id" semantic conventions. It represents the vM image ID. For // Cloud, this value is from the provider. func HostImageID(val string) attribute.KeyValue { return HostImageIDKey.String(val) } // HostImageVersion returns an attribute KeyValue conforming to the // "host.image.version" semantic conventions. It represents the version string // of the VM image as defined in [Version // Attributes](README.md#version-attributes). func HostImageVersion(val string) attribute.KeyValue { return HostImageVersionKey.String(val) } // A Kubernetes Cluster. const ( // K8SClusterNameKey is the attribute Key conforming to the // "k8s.cluster.name" semantic conventions. It represents the name of the // cluster. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'opentelemetry-cluster' K8SClusterNameKey = attribute.Key("k8s.cluster.name") ) // K8SClusterName returns an attribute KeyValue conforming to the // "k8s.cluster.name" semantic conventions. It represents the name of the // cluster. func K8SClusterName(val string) attribute.KeyValue { return K8SClusterNameKey.String(val) } // A Kubernetes Node object. const ( // K8SNodeNameKey is the attribute Key conforming to the "k8s.node.name" // semantic conventions. It represents the name of the Node. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'node-1' K8SNodeNameKey = attribute.Key("k8s.node.name") // K8SNodeUIDKey is the attribute Key conforming to the "k8s.node.uid" // semantic conventions. It represents the UID of the Node. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2' K8SNodeUIDKey = attribute.Key("k8s.node.uid") ) // K8SNodeName returns an attribute KeyValue conforming to the // "k8s.node.name" semantic conventions. It represents the name of the Node. func K8SNodeName(val string) attribute.KeyValue { return K8SNodeNameKey.String(val) } // K8SNodeUID returns an attribute KeyValue conforming to the "k8s.node.uid" // semantic conventions. It represents the UID of the Node. func K8SNodeUID(val string) attribute.KeyValue { return K8SNodeUIDKey.String(val) } // A Kubernetes Namespace. const ( // K8SNamespaceNameKey is the attribute Key conforming to the // "k8s.namespace.name" semantic conventions. It represents the name of the // namespace that the pod is running in. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'default' K8SNamespaceNameKey = attribute.Key("k8s.namespace.name") ) // K8SNamespaceName returns an attribute KeyValue conforming to the // "k8s.namespace.name" semantic conventions. It represents the name of the // namespace that the pod is running in. func K8SNamespaceName(val string) attribute.KeyValue { return K8SNamespaceNameKey.String(val) } // A Kubernetes Pod object. const ( // K8SPodUIDKey is the attribute Key conforming to the "k8s.pod.uid" // semantic conventions. It represents the UID of the Pod. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' K8SPodUIDKey = attribute.Key("k8s.pod.uid") // K8SPodNameKey is the attribute Key conforming to the "k8s.pod.name" // semantic conventions. It represents the name of the Pod. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'opentelemetry-pod-autoconf' K8SPodNameKey = attribute.Key("k8s.pod.name") ) // K8SPodUID returns an attribute KeyValue conforming to the "k8s.pod.uid" // semantic conventions. It represents the UID of the Pod. func K8SPodUID(val string) attribute.KeyValue { return K8SPodUIDKey.String(val) } // K8SPodName returns an attribute KeyValue conforming to the "k8s.pod.name" // semantic conventions. It represents the name of the Pod. func K8SPodName(val string) attribute.KeyValue { return K8SPodNameKey.String(val) } // A container in a // [PodTemplate](https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates). const ( // K8SContainerNameKey is the attribute Key conforming to the // "k8s.container.name" semantic conventions. It represents the name of the // Container from Pod specification, must be unique within a Pod. Container // runtime usually uses different globally unique name (`container.name`). // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'redis' K8SContainerNameKey = attribute.Key("k8s.container.name") // K8SContainerRestartCountKey is the attribute Key conforming to the // "k8s.container.restart_count" semantic conventions. It represents the // number of times the container was restarted. This attribute can be used // to identify a particular container (running or stopped) within a // container spec. // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 0, 2 K8SContainerRestartCountKey = attribute.Key("k8s.container.restart_count") ) // K8SContainerName returns an attribute KeyValue conforming to the // "k8s.container.name" semantic conventions. It represents the name of the // Container from Pod specification, must be unique within a Pod. Container // runtime usually uses different globally unique name (`container.name`). func K8SContainerName(val string) attribute.KeyValue { return K8SContainerNameKey.String(val) } // K8SContainerRestartCount returns an attribute KeyValue conforming to the // "k8s.container.restart_count" semantic conventions. It represents the number // of times the container was restarted. This attribute can be used to identify // a particular container (running or stopped) within a container spec. func K8SContainerRestartCount(val int) attribute.KeyValue { return K8SContainerRestartCountKey.Int(val) } // A Kubernetes ReplicaSet object. const ( // K8SReplicaSetUIDKey is the attribute Key conforming to the // "k8s.replicaset.uid" semantic conventions. It represents the UID of the // ReplicaSet. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid") // K8SReplicaSetNameKey is the attribute Key conforming to the // "k8s.replicaset.name" semantic conventions. It represents the name of // the ReplicaSet. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'opentelemetry' K8SReplicaSetNameKey = attribute.Key("k8s.replicaset.name") ) // K8SReplicaSetUID returns an attribute KeyValue conforming to the // "k8s.replicaset.uid" semantic conventions. It represents the UID of the // ReplicaSet. func K8SReplicaSetUID(val string) attribute.KeyValue { return K8SReplicaSetUIDKey.String(val) } // K8SReplicaSetName returns an attribute KeyValue conforming to the // "k8s.replicaset.name" semantic conventions. It represents the name of the // ReplicaSet. func K8SReplicaSetName(val string) attribute.KeyValue { return K8SReplicaSetNameKey.String(val) } // A Kubernetes Deployment object. const ( // K8SDeploymentUIDKey is the attribute Key conforming to the // "k8s.deployment.uid" semantic conventions. It represents the UID of the // Deployment. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid") // K8SDeploymentNameKey is the attribute Key conforming to the // "k8s.deployment.name" semantic conventions. It represents the name of // the Deployment. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'opentelemetry' K8SDeploymentNameKey = attribute.Key("k8s.deployment.name") ) // K8SDeploymentUID returns an attribute KeyValue conforming to the // "k8s.deployment.uid" semantic conventions. It represents the UID of the // Deployment. func K8SDeploymentUID(val string) attribute.KeyValue { return K8SDeploymentUIDKey.String(val) } // K8SDeploymentName returns an attribute KeyValue conforming to the // "k8s.deployment.name" semantic conventions. It represents the name of the // Deployment. func K8SDeploymentName(val string) attribute.KeyValue { return K8SDeploymentNameKey.String(val) } // A Kubernetes StatefulSet object. const ( // K8SStatefulSetUIDKey is the attribute Key conforming to the // "k8s.statefulset.uid" semantic conventions. It represents the UID of the // StatefulSet. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid") // K8SStatefulSetNameKey is the attribute Key conforming to the // "k8s.statefulset.name" semantic conventions. It represents the name of // the StatefulSet. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'opentelemetry' K8SStatefulSetNameKey = attribute.Key("k8s.statefulset.name") ) // K8SStatefulSetUID returns an attribute KeyValue conforming to the // "k8s.statefulset.uid" semantic conventions. It represents the UID of the // StatefulSet. func K8SStatefulSetUID(val string) attribute.KeyValue { return K8SStatefulSetUIDKey.String(val) } // K8SStatefulSetName returns an attribute KeyValue conforming to the // "k8s.statefulset.name" semantic conventions. It represents the name of the // StatefulSet. func K8SStatefulSetName(val string) attribute.KeyValue { return K8SStatefulSetNameKey.String(val) } // A Kubernetes DaemonSet object. const ( // K8SDaemonSetUIDKey is the attribute Key conforming to the // "k8s.daemonset.uid" semantic conventions. It represents the UID of the // DaemonSet. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' K8SDaemonSetUIDKey = attribute.Key("k8s.daemonset.uid") // K8SDaemonSetNameKey is the attribute Key conforming to the // "k8s.daemonset.name" semantic conventions. It represents the name of the // DaemonSet. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'opentelemetry' K8SDaemonSetNameKey = attribute.Key("k8s.daemonset.name") ) // K8SDaemonSetUID returns an attribute KeyValue conforming to the // "k8s.daemonset.uid" semantic conventions. It represents the UID of the // DaemonSet. func K8SDaemonSetUID(val string) attribute.KeyValue { return K8SDaemonSetUIDKey.String(val) } // K8SDaemonSetName returns an attribute KeyValue conforming to the // "k8s.daemonset.name" semantic conventions. It represents the name of the // DaemonSet. func K8SDaemonSetName(val string) attribute.KeyValue { return K8SDaemonSetNameKey.String(val) } // A Kubernetes Job object. const ( // K8SJobUIDKey is the attribute Key conforming to the "k8s.job.uid" // semantic conventions. It represents the UID of the Job. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' K8SJobUIDKey = attribute.Key("k8s.job.uid") // K8SJobNameKey is the attribute Key conforming to the "k8s.job.name" // semantic conventions. It represents the name of the Job. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'opentelemetry' K8SJobNameKey = attribute.Key("k8s.job.name") ) // K8SJobUID returns an attribute KeyValue conforming to the "k8s.job.uid" // semantic conventions. It represents the UID of the Job. func K8SJobUID(val string) attribute.KeyValue { return K8SJobUIDKey.String(val) } // K8SJobName returns an attribute KeyValue conforming to the "k8s.job.name" // semantic conventions. It represents the name of the Job. func K8SJobName(val string) attribute.KeyValue { return K8SJobNameKey.String(val) } // A Kubernetes CronJob object. const ( // K8SCronJobUIDKey is the attribute Key conforming to the // "k8s.cronjob.uid" semantic conventions. It represents the UID of the // CronJob. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' K8SCronJobUIDKey = attribute.Key("k8s.cronjob.uid") // K8SCronJobNameKey is the attribute Key conforming to the // "k8s.cronjob.name" semantic conventions. It represents the name of the // CronJob. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'opentelemetry' K8SCronJobNameKey = attribute.Key("k8s.cronjob.name") ) // K8SCronJobUID returns an attribute KeyValue conforming to the // "k8s.cronjob.uid" semantic conventions. It represents the UID of the // CronJob. func K8SCronJobUID(val string) attribute.KeyValue { return K8SCronJobUIDKey.String(val) } // K8SCronJobName returns an attribute KeyValue conforming to the // "k8s.cronjob.name" semantic conventions. It represents the name of the // CronJob. func K8SCronJobName(val string) attribute.KeyValue { return K8SCronJobNameKey.String(val) } // The operating system (OS) on which the process represented by this resource // is running. const ( // OSTypeKey is the attribute Key conforming to the "os.type" semantic // conventions. It represents the operating system type. // // Type: Enum // RequirementLevel: Required // Stability: stable OSTypeKey = attribute.Key("os.type") // OSDescriptionKey is the attribute Key conforming to the "os.description" // semantic conventions. It represents the human readable (not intended to // be parsed) OS version information, like e.g. reported by `ver` or // `lsb_release -a` commands. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1 // LTS' OSDescriptionKey = attribute.Key("os.description") // OSNameKey is the attribute Key conforming to the "os.name" semantic // conventions. It represents the human readable operating system name. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'iOS', 'Android', 'Ubuntu' OSNameKey = attribute.Key("os.name") // OSVersionKey is the attribute Key conforming to the "os.version" // semantic conventions. It represents the version string of the operating // system as defined in [Version // Attributes](../../resource/semantic_conventions/README.md#version-attributes). // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '14.2.1', '18.04.1' OSVersionKey = attribute.Key("os.version") ) var ( // Microsoft Windows OSTypeWindows = OSTypeKey.String("windows") // Linux OSTypeLinux = OSTypeKey.String("linux") // Apple Darwin OSTypeDarwin = OSTypeKey.String("darwin") // FreeBSD OSTypeFreeBSD = OSTypeKey.String("freebsd") // NetBSD OSTypeNetBSD = OSTypeKey.String("netbsd") // OpenBSD OSTypeOpenBSD = OSTypeKey.String("openbsd") // DragonFly BSD OSTypeDragonflyBSD = OSTypeKey.String("dragonflybsd") // HP-UX (Hewlett Packard Unix) OSTypeHPUX = OSTypeKey.String("hpux") // AIX (Advanced Interactive eXecutive) OSTypeAIX = OSTypeKey.String("aix") // SunOS, Oracle Solaris OSTypeSolaris = OSTypeKey.String("solaris") // IBM z/OS OSTypeZOS = OSTypeKey.String("z_os") ) // OSDescription returns an attribute KeyValue conforming to the // "os.description" semantic conventions. It represents the human readable (not // intended to be parsed) OS version information, like e.g. reported by `ver` // or `lsb_release -a` commands. func OSDescription(val string) attribute.KeyValue { return OSDescriptionKey.String(val) } // OSName returns an attribute KeyValue conforming to the "os.name" semantic // conventions. It represents the human readable operating system name. func OSName(val string) attribute.KeyValue { return OSNameKey.String(val) } // OSVersion returns an attribute KeyValue conforming to the "os.version" // semantic conventions. It represents the version string of the operating // system as defined in [Version // Attributes](../../resource/semantic_conventions/README.md#version-attributes). func OSVersion(val string) attribute.KeyValue { return OSVersionKey.String(val) } // An operating system process. const ( // ProcessPIDKey is the attribute Key conforming to the "process.pid" // semantic conventions. It represents the process identifier (PID). // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 1234 ProcessPIDKey = attribute.Key("process.pid") // ProcessParentPIDKey is the attribute Key conforming to the // "process.parent_pid" semantic conventions. It represents the parent // Process identifier (PID). // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 111 ProcessParentPIDKey = attribute.Key("process.parent_pid") // ProcessExecutableNameKey is the attribute Key conforming to the // "process.executable.name" semantic conventions. It represents the name // of the process executable. On Linux based systems, can be set to the // `Name` in `proc/[pid]/status`. On Windows, can be set to the base name // of `GetProcessImageFileNameW`. // // Type: string // RequirementLevel: ConditionallyRequired (See alternative attributes // below.) // Stability: stable // Examples: 'otelcol' ProcessExecutableNameKey = attribute.Key("process.executable.name") // ProcessExecutablePathKey is the attribute Key conforming to the // "process.executable.path" semantic conventions. It represents the full // path to the process executable. On Linux based systems, can be set to // the target of `proc/[pid]/exe`. On Windows, can be set to the result of // `GetProcessImageFileNameW`. // // Type: string // RequirementLevel: ConditionallyRequired (See alternative attributes // below.) // Stability: stable // Examples: '/usr/bin/cmd/otelcol' ProcessExecutablePathKey = attribute.Key("process.executable.path") // ProcessCommandKey is the attribute Key conforming to the // "process.command" semantic conventions. It represents the command used // to launch the process (i.e. the command name). On Linux based systems, // can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can // be set to the first parameter extracted from `GetCommandLineW`. // // Type: string // RequirementLevel: ConditionallyRequired (See alternative attributes // below.) // Stability: stable // Examples: 'cmd/otelcol' ProcessCommandKey = attribute.Key("process.command") // ProcessCommandLineKey is the attribute Key conforming to the // "process.command_line" semantic conventions. It represents the full // command used to launch the process as a single string representing the // full command. On Windows, can be set to the result of `GetCommandLineW`. // Do not set this if you have to assemble it just for monitoring; use // `process.command_args` instead. // // Type: string // RequirementLevel: ConditionallyRequired (See alternative attributes // below.) // Stability: stable // Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"' ProcessCommandLineKey = attribute.Key("process.command_line") // ProcessCommandArgsKey is the attribute Key conforming to the // "process.command_args" semantic conventions. It represents the all the // command arguments (including the command/executable itself) as received // by the process. On Linux-based systems (and some other Unixoid systems // supporting procfs), can be set according to the list of null-delimited // strings extracted from `proc/[pid]/cmdline`. For libc-based executables, // this would be the full argv vector passed to `main`. // // Type: string[] // RequirementLevel: ConditionallyRequired (See alternative attributes // below.) // Stability: stable // Examples: 'cmd/otecol', '--config=config.yaml' ProcessCommandArgsKey = attribute.Key("process.command_args") // ProcessOwnerKey is the attribute Key conforming to the "process.owner" // semantic conventions. It represents the username of the user that owns // the process. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'root' ProcessOwnerKey = attribute.Key("process.owner") ) // ProcessPID returns an attribute KeyValue conforming to the "process.pid" // semantic conventions. It represents the process identifier (PID). func ProcessPID(val int) attribute.KeyValue { return ProcessPIDKey.Int(val) } // ProcessParentPID returns an attribute KeyValue conforming to the // "process.parent_pid" semantic conventions. It represents the parent Process // identifier (PID). func ProcessParentPID(val int) attribute.KeyValue { return ProcessParentPIDKey.Int(val) } // ProcessExecutableName returns an attribute KeyValue conforming to the // "process.executable.name" semantic conventions. It represents the name of // the process executable. On Linux based systems, can be set to the `Name` in // `proc/[pid]/status`. On Windows, can be set to the base name of // `GetProcessImageFileNameW`. func ProcessExecutableName(val string) attribute.KeyValue { return ProcessExecutableNameKey.String(val) } // ProcessExecutablePath returns an attribute KeyValue conforming to the // "process.executable.path" semantic conventions. It represents the full path // to the process executable. On Linux based systems, can be set to the target // of `proc/[pid]/exe`. On Windows, can be set to the result of // `GetProcessImageFileNameW`. func ProcessExecutablePath(val string) attribute.KeyValue { return ProcessExecutablePathKey.String(val) } // ProcessCommand returns an attribute KeyValue conforming to the // "process.command" semantic conventions. It represents the command used to // launch the process (i.e. the command name). On Linux based systems, can be // set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to // the first parameter extracted from `GetCommandLineW`. func ProcessCommand(val string) attribute.KeyValue { return ProcessCommandKey.String(val) } // ProcessCommandLine returns an attribute KeyValue conforming to the // "process.command_line" semantic conventions. It represents the full command // used to launch the process as a single string representing the full command. // On Windows, can be set to the result of `GetCommandLineW`. Do not set this // if you have to assemble it just for monitoring; use `process.command_args` // instead. func ProcessCommandLine(val string) attribute.KeyValue { return ProcessCommandLineKey.String(val) } // ProcessCommandArgs returns an attribute KeyValue conforming to the // "process.command_args" semantic conventions. It represents the all the // command arguments (including the command/executable itself) as received by // the process. On Linux-based systems (and some other Unixoid systems // supporting procfs), can be set according to the list of null-delimited // strings extracted from `proc/[pid]/cmdline`. For libc-based executables, // this would be the full argv vector passed to `main`. func ProcessCommandArgs(val ...string) attribute.KeyValue { return ProcessCommandArgsKey.StringSlice(val) } // ProcessOwner returns an attribute KeyValue conforming to the // "process.owner" semantic conventions. It represents the username of the user // that owns the process. func ProcessOwner(val string) attribute.KeyValue { return ProcessOwnerKey.String(val) } // The single (language) runtime instance which is monitored. const ( // ProcessRuntimeNameKey is the attribute Key conforming to the // "process.runtime.name" semantic conventions. It represents the name of // the runtime of this process. For compiled native binaries, this SHOULD // be the name of the compiler. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'OpenJDK Runtime Environment' ProcessRuntimeNameKey = attribute.Key("process.runtime.name") // ProcessRuntimeVersionKey is the attribute Key conforming to the // "process.runtime.version" semantic conventions. It represents the // version of the runtime of this process, as returned by the runtime // without modification. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '14.0.2' ProcessRuntimeVersionKey = attribute.Key("process.runtime.version") // ProcessRuntimeDescriptionKey is the attribute Key conforming to the // "process.runtime.description" semantic conventions. It represents an // additional description about the runtime of the process, for example a // specific vendor customization of the runtime environment. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0' ProcessRuntimeDescriptionKey = attribute.Key("process.runtime.description") ) // ProcessRuntimeName returns an attribute KeyValue conforming to the // "process.runtime.name" semantic conventions. It represents the name of the // runtime of this process. For compiled native binaries, this SHOULD be the // name of the compiler. func ProcessRuntimeName(val string) attribute.KeyValue { return ProcessRuntimeNameKey.String(val) } // ProcessRuntimeVersion returns an attribute KeyValue conforming to the // "process.runtime.version" semantic conventions. It represents the version of // the runtime of this process, as returned by the runtime without // modification. func ProcessRuntimeVersion(val string) attribute.KeyValue { return ProcessRuntimeVersionKey.String(val) } // ProcessRuntimeDescription returns an attribute KeyValue conforming to the // "process.runtime.description" semantic conventions. It represents an // additional description about the runtime of the process, for example a // specific vendor customization of the runtime environment. func ProcessRuntimeDescription(val string) attribute.KeyValue { return ProcessRuntimeDescriptionKey.String(val) } // A service instance. const ( // ServiceNameKey is the attribute Key conforming to the "service.name" // semantic conventions. It represents the logical name of the service. // // Type: string // RequirementLevel: Required // Stability: stable // Examples: 'shoppingcart' // Note: MUST be the same for all instances of horizontally scaled // services. If the value was not specified, SDKs MUST fallback to // `unknown_service:` concatenated with // [`process.executable.name`](process.md#process), e.g. // `unknown_service:bash`. If `process.executable.name` is not available, // the value MUST be set to `unknown_service`. ServiceNameKey = attribute.Key("service.name") ) // ServiceName returns an attribute KeyValue conforming to the // "service.name" semantic conventions. It represents the logical name of the // service. func ServiceName(val string) attribute.KeyValue { return ServiceNameKey.String(val) } // A service instance. const ( // ServiceNamespaceKey is the attribute Key conforming to the // "service.namespace" semantic conventions. It represents a namespace for // `service.name`. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'Shop' // Note: A string value having a meaning that helps to distinguish a group // of services, for example the team name that owns a group of services. // `service.name` is expected to be unique within the same namespace. If // `service.namespace` is not specified in the Resource then `service.name` // is expected to be unique for all services that have no explicit // namespace defined (so the empty/unspecified namespace is simply one more // valid namespace). Zero-length namespace string is assumed equal to // unspecified namespace. ServiceNamespaceKey = attribute.Key("service.namespace") // ServiceInstanceIDKey is the attribute Key conforming to the // "service.instance.id" semantic conventions. It represents the string ID // of the service instance. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'my-k8s-pod-deployment-1', // '627cc493-f310-47de-96bd-71410b7dec09' // Note: MUST be unique for each instance of the same // `service.namespace,service.name` pair (in other words // `service.namespace,service.name,service.instance.id` triplet MUST be // globally unique). The ID helps to distinguish instances of the same // service that exist at the same time (e.g. instances of a horizontally // scaled service). It is preferable for the ID to be persistent and stay // the same for the lifetime of the service instance, however it is // acceptable that the ID is ephemeral and changes during important // lifetime events for the service (e.g. service restarts). If the service // has no inherent unique ID that can be used as the value of this // attribute it is recommended to generate a random Version 1 or Version 4 // RFC 4122 UUID (services aiming for reproducible UUIDs may also use // Version 5, see RFC 4122 for more recommendations). ServiceInstanceIDKey = attribute.Key("service.instance.id") // ServiceVersionKey is the attribute Key conforming to the // "service.version" semantic conventions. It represents the version string // of the service API or implementation. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '2.0.0' ServiceVersionKey = attribute.Key("service.version") ) // ServiceNamespace returns an attribute KeyValue conforming to the // "service.namespace" semantic conventions. It represents a namespace for // `service.name`. func ServiceNamespace(val string) attribute.KeyValue { return ServiceNamespaceKey.String(val) } // ServiceInstanceID returns an attribute KeyValue conforming to the // "service.instance.id" semantic conventions. It represents the string ID of // the service instance. func ServiceInstanceID(val string) attribute.KeyValue { return ServiceInstanceIDKey.String(val) } // ServiceVersion returns an attribute KeyValue conforming to the // "service.version" semantic conventions. It represents the version string of // the service API or implementation. func ServiceVersion(val string) attribute.KeyValue { return ServiceVersionKey.String(val) } // The telemetry SDK used to capture data recorded by the instrumentation // libraries. const ( // TelemetrySDKNameKey is the attribute Key conforming to the // "telemetry.sdk.name" semantic conventions. It represents the name of the // telemetry SDK as defined above. // // Type: string // RequirementLevel: Required // Stability: stable // Examples: 'opentelemetry' TelemetrySDKNameKey = attribute.Key("telemetry.sdk.name") // TelemetrySDKLanguageKey is the attribute Key conforming to the // "telemetry.sdk.language" semantic conventions. It represents the // language of the telemetry SDK. // // Type: Enum // RequirementLevel: Required // Stability: stable TelemetrySDKLanguageKey = attribute.Key("telemetry.sdk.language") // TelemetrySDKVersionKey is the attribute Key conforming to the // "telemetry.sdk.version" semantic conventions. It represents the version // string of the telemetry SDK. // // Type: string // RequirementLevel: Required // Stability: stable // Examples: '1.2.3' TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.version") ) var ( // cpp TelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String("cpp") // dotnet TelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String("dotnet") // erlang TelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String("erlang") // go TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go") // java TelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String("java") // nodejs TelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String("nodejs") // php TelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String("php") // python TelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String("python") // ruby TelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String("ruby") // webjs TelemetrySDKLanguageWebjs = TelemetrySDKLanguageKey.String("webjs") // swift TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift") ) // TelemetrySDKName returns an attribute KeyValue conforming to the // "telemetry.sdk.name" semantic conventions. It represents the name of the // telemetry SDK as defined above. func TelemetrySDKName(val string) attribute.KeyValue { return TelemetrySDKNameKey.String(val) } // TelemetrySDKVersion returns an attribute KeyValue conforming to the // "telemetry.sdk.version" semantic conventions. It represents the version // string of the telemetry SDK. func TelemetrySDKVersion(val string) attribute.KeyValue { return TelemetrySDKVersionKey.String(val) } // The telemetry SDK used to capture data recorded by the instrumentation // libraries. const ( // TelemetryAutoVersionKey is the attribute Key conforming to the // "telemetry.auto.version" semantic conventions. It represents the version // string of the auto instrumentation agent, if used. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '1.2.3' TelemetryAutoVersionKey = attribute.Key("telemetry.auto.version") ) // TelemetryAutoVersion returns an attribute KeyValue conforming to the // "telemetry.auto.version" semantic conventions. It represents the version // string of the auto instrumentation agent, if used. func TelemetryAutoVersion(val string) attribute.KeyValue { return TelemetryAutoVersionKey.String(val) } // Resource describing the packaged software running the application code. Web // engines are typically executed using process.runtime. const ( // WebEngineNameKey is the attribute Key conforming to the "webengine.name" // semantic conventions. It represents the name of the web engine. // // Type: string // RequirementLevel: Required // Stability: stable // Examples: 'WildFly' WebEngineNameKey = attribute.Key("webengine.name") // WebEngineVersionKey is the attribute Key conforming to the // "webengine.version" semantic conventions. It represents the version of // the web engine. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '21.0.0' WebEngineVersionKey = attribute.Key("webengine.version") // WebEngineDescriptionKey is the attribute Key conforming to the // "webengine.description" semantic conventions. It represents the // additional description of the web engine (e.g. detailed version and // edition information). // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - // 2.2.2.Final' WebEngineDescriptionKey = attribute.Key("webengine.description") ) // WebEngineName returns an attribute KeyValue conforming to the // "webengine.name" semantic conventions. It represents the name of the web // engine. func WebEngineName(val string) attribute.KeyValue { return WebEngineNameKey.String(val) } // WebEngineVersion returns an attribute KeyValue conforming to the // "webengine.version" semantic conventions. It represents the version of the // web engine. func WebEngineVersion(val string) attribute.KeyValue { return WebEngineVersionKey.String(val) } // WebEngineDescription returns an attribute KeyValue conforming to the // "webengine.description" semantic conventions. It represents the additional // description of the web engine (e.g. detailed version and edition // information). func WebEngineDescription(val string) attribute.KeyValue { return WebEngineDescriptionKey.String(val) } // Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's // concepts. const ( // OTelScopeNameKey is the attribute Key conforming to the // "otel.scope.name" semantic conventions. It represents the name of the // instrumentation scope - (`InstrumentationScope.Name` in OTLP). // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'io.opentelemetry.contrib.mongodb' OTelScopeNameKey = attribute.Key("otel.scope.name") // OTelScopeVersionKey is the attribute Key conforming to the // "otel.scope.version" semantic conventions. It represents the version of // the instrumentation scope - (`InstrumentationScope.Version` in OTLP). // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '1.0.0' OTelScopeVersionKey = attribute.Key("otel.scope.version") ) // OTelScopeName returns an attribute KeyValue conforming to the // "otel.scope.name" semantic conventions. It represents the name of the // instrumentation scope - (`InstrumentationScope.Name` in OTLP). func OTelScopeName(val string) attribute.KeyValue { return OTelScopeNameKey.String(val) } // OTelScopeVersion returns an attribute KeyValue conforming to the // "otel.scope.version" semantic conventions. It represents the version of the // instrumentation scope - (`InstrumentationScope.Version` in OTLP). func OTelScopeVersion(val string) attribute.KeyValue { return OTelScopeVersionKey.String(val) } // Span attributes used by non-OTLP exporters to represent OpenTelemetry // Scope's concepts. const ( // OTelLibraryNameKey is the attribute Key conforming to the // "otel.library.name" semantic conventions. It represents the deprecated, // use the `otel.scope.name` attribute. // // Type: string // RequirementLevel: Optional // Stability: deprecated // Examples: 'io.opentelemetry.contrib.mongodb' OTelLibraryNameKey = attribute.Key("otel.library.name") // OTelLibraryVersionKey is the attribute Key conforming to the // "otel.library.version" semantic conventions. It represents the // deprecated, use the `otel.scope.version` attribute. // // Type: string // RequirementLevel: Optional // Stability: deprecated // Examples: '1.0.0' OTelLibraryVersionKey = attribute.Key("otel.library.version") ) // OTelLibraryName returns an attribute KeyValue conforming to the // "otel.library.name" semantic conventions. It represents the deprecated, use // the `otel.scope.name` attribute. func OTelLibraryName(val string) attribute.KeyValue { return OTelLibraryNameKey.String(val) } // OTelLibraryVersion returns an attribute KeyValue conforming to the // "otel.library.version" semantic conventions. It represents the deprecated, // use the `otel.scope.version` attribute. func OTelLibraryVersion(val string) attribute.KeyValue { return OTelLibraryVersionKey.String(val) } ================================================ FILE: vendor/go.opentelemetry.io/otel/semconv/v1.20.0/schema.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" // SchemaURL is the schema URL that matches the version of the semantic conventions // that this package defines. Semconv packages starting from v1.4.0 must declare // non-empty schema URL in the form https://opentelemetry.io/schemas/ const SchemaURL = "https://opentelemetry.io/schemas/1.20.0" ================================================ FILE: vendor/go.opentelemetry.io/otel/semconv/v1.20.0/trace.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 // Code generated from semantic convention specification. DO NOT EDIT. package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" import "go.opentelemetry.io/otel/attribute" // The shared attributes used to report a single exception associated with a // span or log. const ( // ExceptionTypeKey is the attribute Key conforming to the "exception.type" // semantic conventions. It represents the type of the exception (its // fully-qualified class name, if applicable). The dynamic type of the // exception should be preferred over the static type in languages that // support it. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'java.net.ConnectException', 'OSError' ExceptionTypeKey = attribute.Key("exception.type") // ExceptionMessageKey is the attribute Key conforming to the // "exception.message" semantic conventions. It represents the exception // message. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'Division by zero', "Can't convert 'int' object to str // implicitly" ExceptionMessageKey = attribute.Key("exception.message") // ExceptionStacktraceKey is the attribute Key conforming to the // "exception.stacktrace" semantic conventions. It represents a stacktrace // as a string in the natural representation for the language runtime. The // representation is to be determined and documented by each language SIG. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test // exception\\n at ' // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' // 'com.example.GenerateTrace.main(GenerateTrace.java:5)' ExceptionStacktraceKey = attribute.Key("exception.stacktrace") ) // ExceptionType returns an attribute KeyValue conforming to the // "exception.type" semantic conventions. It represents the type of the // exception (its fully-qualified class name, if applicable). The dynamic type // of the exception should be preferred over the static type in languages that // support it. func ExceptionType(val string) attribute.KeyValue { return ExceptionTypeKey.String(val) } // ExceptionMessage returns an attribute KeyValue conforming to the // "exception.message" semantic conventions. It represents the exception // message. func ExceptionMessage(val string) attribute.KeyValue { return ExceptionMessageKey.String(val) } // ExceptionStacktrace returns an attribute KeyValue conforming to the // "exception.stacktrace" semantic conventions. It represents a stacktrace as a // string in the natural representation for the language runtime. The // representation is to be determined and documented by each language SIG. func ExceptionStacktrace(val string) attribute.KeyValue { return ExceptionStacktraceKey.String(val) } // The attributes described in this section are rather generic. They may be // used in any Log Record they apply to. const ( // LogRecordUIDKey is the attribute Key conforming to the "log.record.uid" // semantic conventions. It represents a unique identifier for the Log // Record. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '01ARZ3NDEKTSV4RRFFQ69G5FAV' // Note: If an id is provided, other log records with the same id will be // considered duplicates and can be removed safely. This means, that two // distinguishable log records MUST have different values. // The id MAY be an [Universally Unique Lexicographically Sortable // Identifier (ULID)](https://github.com/ulid/spec), but other identifiers // (e.g. UUID) may be used as needed. LogRecordUIDKey = attribute.Key("log.record.uid") ) // LogRecordUID returns an attribute KeyValue conforming to the // "log.record.uid" semantic conventions. It represents a unique identifier for // the Log Record. func LogRecordUID(val string) attribute.KeyValue { return LogRecordUIDKey.String(val) } // Span attributes used by AWS Lambda (in addition to general `faas` // attributes). const ( // AWSLambdaInvokedARNKey is the attribute Key conforming to the // "aws.lambda.invoked_arn" semantic conventions. It represents the full // invoked ARN as provided on the `Context` passed to the function // (`Lambda-Runtime-Invoked-Function-ARN` header on the // `/runtime/invocation/next` applicable). // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias' // Note: This may be different from `cloud.resource_id` if an alias is // involved. AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn") ) // AWSLambdaInvokedARN returns an attribute KeyValue conforming to the // "aws.lambda.invoked_arn" semantic conventions. It represents the full // invoked ARN as provided on the `Context` passed to the function // (`Lambda-Runtime-Invoked-Function-ARN` header on the // `/runtime/invocation/next` applicable). func AWSLambdaInvokedARN(val string) attribute.KeyValue { return AWSLambdaInvokedARNKey.String(val) } // Attributes for CloudEvents. CloudEvents is a specification on how to define // event data in a standard way. These attributes can be attached to spans when // performing operations with CloudEvents, regardless of the protocol being // used. const ( // CloudeventsEventIDKey is the attribute Key conforming to the // "cloudevents.event_id" semantic conventions. It represents the // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) // uniquely identifies the event. // // Type: string // RequirementLevel: Required // Stability: stable // Examples: '123e4567-e89b-12d3-a456-426614174000', '0001' CloudeventsEventIDKey = attribute.Key("cloudevents.event_id") // CloudeventsEventSourceKey is the attribute Key conforming to the // "cloudevents.event_source" semantic conventions. It represents the // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) // identifies the context in which an event happened. // // Type: string // RequirementLevel: Required // Stability: stable // Examples: 'https://github.com/cloudevents', // '/cloudevents/spec/pull/123', 'my-service' CloudeventsEventSourceKey = attribute.Key("cloudevents.event_source") // CloudeventsEventSpecVersionKey is the attribute Key conforming to the // "cloudevents.event_spec_version" semantic conventions. It represents the // [version of the CloudEvents // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) // which the event uses. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '1.0' CloudeventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version") // CloudeventsEventTypeKey is the attribute Key conforming to the // "cloudevents.event_type" semantic conventions. It represents the // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) // contains a value describing the type of event related to the originating // occurrence. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'com.github.pull_request.opened', // 'com.example.object.deleted.v2' CloudeventsEventTypeKey = attribute.Key("cloudevents.event_type") // CloudeventsEventSubjectKey is the attribute Key conforming to the // "cloudevents.event_subject" semantic conventions. It represents the // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) // of the event in the context of the event producer (identified by // source). // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'mynewfile.jpg' CloudeventsEventSubjectKey = attribute.Key("cloudevents.event_subject") ) // CloudeventsEventID returns an attribute KeyValue conforming to the // "cloudevents.event_id" semantic conventions. It represents the // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) // uniquely identifies the event. func CloudeventsEventID(val string) attribute.KeyValue { return CloudeventsEventIDKey.String(val) } // CloudeventsEventSource returns an attribute KeyValue conforming to the // "cloudevents.event_source" semantic conventions. It represents the // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) // identifies the context in which an event happened. func CloudeventsEventSource(val string) attribute.KeyValue { return CloudeventsEventSourceKey.String(val) } // CloudeventsEventSpecVersion returns an attribute KeyValue conforming to // the "cloudevents.event_spec_version" semantic conventions. It represents the // [version of the CloudEvents // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) // which the event uses. func CloudeventsEventSpecVersion(val string) attribute.KeyValue { return CloudeventsEventSpecVersionKey.String(val) } // CloudeventsEventType returns an attribute KeyValue conforming to the // "cloudevents.event_type" semantic conventions. It represents the // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) // contains a value describing the type of event related to the originating // occurrence. func CloudeventsEventType(val string) attribute.KeyValue { return CloudeventsEventTypeKey.String(val) } // CloudeventsEventSubject returns an attribute KeyValue conforming to the // "cloudevents.event_subject" semantic conventions. It represents the // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) // of the event in the context of the event producer (identified by source). func CloudeventsEventSubject(val string) attribute.KeyValue { return CloudeventsEventSubjectKey.String(val) } // Semantic conventions for the OpenTracing Shim const ( // OpentracingRefTypeKey is the attribute Key conforming to the // "opentracing.ref_type" semantic conventions. It represents the // parent-child Reference type // // Type: Enum // RequirementLevel: Optional // Stability: stable // Note: The causal relationship between a child Span and a parent Span. OpentracingRefTypeKey = attribute.Key("opentracing.ref_type") ) var ( // The parent Span depends on the child Span in some capacity OpentracingRefTypeChildOf = OpentracingRefTypeKey.String("child_of") // The parent Span does not depend in any way on the result of the child Span OpentracingRefTypeFollowsFrom = OpentracingRefTypeKey.String("follows_from") ) // The attributes used to perform database client calls. const ( // DBSystemKey is the attribute Key conforming to the "db.system" semantic // conventions. It represents an identifier for the database management // system (DBMS) product being used. See below for a list of well-known // identifiers. // // Type: Enum // RequirementLevel: Required // Stability: stable DBSystemKey = attribute.Key("db.system") // DBConnectionStringKey is the attribute Key conforming to the // "db.connection_string" semantic conventions. It represents the // connection string used to connect to the database. It is recommended to // remove embedded credentials. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'Server=(localdb)\\v11.0;Integrated Security=true;' DBConnectionStringKey = attribute.Key("db.connection_string") // DBUserKey is the attribute Key conforming to the "db.user" semantic // conventions. It represents the username for accessing the database. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'readonly_user', 'reporting_user' DBUserKey = attribute.Key("db.user") // DBJDBCDriverClassnameKey is the attribute Key conforming to the // "db.jdbc.driver_classname" semantic conventions. It represents the // fully-qualified class name of the [Java Database Connectivity // (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) // driver used to connect. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'org.postgresql.Driver', // 'com.microsoft.sqlserver.jdbc.SQLServerDriver' DBJDBCDriverClassnameKey = attribute.Key("db.jdbc.driver_classname") // DBNameKey is the attribute Key conforming to the "db.name" semantic // conventions. It represents the this attribute is used to report the name // of the database being accessed. For commands that switch the database, // this should be set to the target database (even if the command fails). // // Type: string // RequirementLevel: ConditionallyRequired (If applicable.) // Stability: stable // Examples: 'customers', 'main' // Note: In some SQL databases, the database name to be used is called // "schema name". In case there are multiple layers that could be // considered for database name (e.g. Oracle instance name and schema // name), the database name to be used is the more specific layer (e.g. // Oracle schema name). DBNameKey = attribute.Key("db.name") // DBStatementKey is the attribute Key conforming to the "db.statement" // semantic conventions. It represents the database statement being // executed. // // Type: string // RequirementLevel: Recommended (Should be collected by default only if // there is sanitization that excludes sensitive information.) // Stability: stable // Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"' DBStatementKey = attribute.Key("db.statement") // DBOperationKey is the attribute Key conforming to the "db.operation" // semantic conventions. It represents the name of the operation being // executed, e.g. the [MongoDB command // name](https://docs.mongodb.com/manual/reference/command/#database-operations) // such as `findAndModify`, or the SQL keyword. // // Type: string // RequirementLevel: ConditionallyRequired (If `db.statement` is not // applicable.) // Stability: stable // Examples: 'findAndModify', 'HMSET', 'SELECT' // Note: When setting this to an SQL keyword, it is not recommended to // attempt any client-side parsing of `db.statement` just to get this // property, but it should be set if the operation name is provided by the // library being instrumented. If the SQL statement has an ambiguous // operation, or performs more than one operation, this value may be // omitted. DBOperationKey = attribute.Key("db.operation") ) var ( // Some other SQL database. Fallback only. See notes DBSystemOtherSQL = DBSystemKey.String("other_sql") // Microsoft SQL Server DBSystemMSSQL = DBSystemKey.String("mssql") // Microsoft SQL Server Compact DBSystemMssqlcompact = DBSystemKey.String("mssqlcompact") // MySQL DBSystemMySQL = DBSystemKey.String("mysql") // Oracle Database DBSystemOracle = DBSystemKey.String("oracle") // IBM DB2 DBSystemDB2 = DBSystemKey.String("db2") // PostgreSQL DBSystemPostgreSQL = DBSystemKey.String("postgresql") // Amazon Redshift DBSystemRedshift = DBSystemKey.String("redshift") // Apache Hive DBSystemHive = DBSystemKey.String("hive") // Cloudscape DBSystemCloudscape = DBSystemKey.String("cloudscape") // HyperSQL DataBase DBSystemHSQLDB = DBSystemKey.String("hsqldb") // Progress Database DBSystemProgress = DBSystemKey.String("progress") // SAP MaxDB DBSystemMaxDB = DBSystemKey.String("maxdb") // SAP HANA DBSystemHanaDB = DBSystemKey.String("hanadb") // Ingres DBSystemIngres = DBSystemKey.String("ingres") // FirstSQL DBSystemFirstSQL = DBSystemKey.String("firstsql") // EnterpriseDB DBSystemEDB = DBSystemKey.String("edb") // InterSystems Caché DBSystemCache = DBSystemKey.String("cache") // Adabas (Adaptable Database System) DBSystemAdabas = DBSystemKey.String("adabas") // Firebird DBSystemFirebird = DBSystemKey.String("firebird") // Apache Derby DBSystemDerby = DBSystemKey.String("derby") // FileMaker DBSystemFilemaker = DBSystemKey.String("filemaker") // Informix DBSystemInformix = DBSystemKey.String("informix") // InstantDB DBSystemInstantDB = DBSystemKey.String("instantdb") // InterBase DBSystemInterbase = DBSystemKey.String("interbase") // MariaDB DBSystemMariaDB = DBSystemKey.String("mariadb") // Netezza DBSystemNetezza = DBSystemKey.String("netezza") // Pervasive PSQL DBSystemPervasive = DBSystemKey.String("pervasive") // PointBase DBSystemPointbase = DBSystemKey.String("pointbase") // SQLite DBSystemSqlite = DBSystemKey.String("sqlite") // Sybase DBSystemSybase = DBSystemKey.String("sybase") // Teradata DBSystemTeradata = DBSystemKey.String("teradata") // Vertica DBSystemVertica = DBSystemKey.String("vertica") // H2 DBSystemH2 = DBSystemKey.String("h2") // ColdFusion IMQ DBSystemColdfusion = DBSystemKey.String("coldfusion") // Apache Cassandra DBSystemCassandra = DBSystemKey.String("cassandra") // Apache HBase DBSystemHBase = DBSystemKey.String("hbase") // MongoDB DBSystemMongoDB = DBSystemKey.String("mongodb") // Redis DBSystemRedis = DBSystemKey.String("redis") // Couchbase DBSystemCouchbase = DBSystemKey.String("couchbase") // CouchDB DBSystemCouchDB = DBSystemKey.String("couchdb") // Microsoft Azure Cosmos DB DBSystemCosmosDB = DBSystemKey.String("cosmosdb") // Amazon DynamoDB DBSystemDynamoDB = DBSystemKey.String("dynamodb") // Neo4j DBSystemNeo4j = DBSystemKey.String("neo4j") // Apache Geode DBSystemGeode = DBSystemKey.String("geode") // Elasticsearch DBSystemElasticsearch = DBSystemKey.String("elasticsearch") // Memcached DBSystemMemcached = DBSystemKey.String("memcached") // CockroachDB DBSystemCockroachdb = DBSystemKey.String("cockroachdb") // OpenSearch DBSystemOpensearch = DBSystemKey.String("opensearch") // ClickHouse DBSystemClickhouse = DBSystemKey.String("clickhouse") // Cloud Spanner DBSystemSpanner = DBSystemKey.String("spanner") // Trino DBSystemTrino = DBSystemKey.String("trino") ) // DBConnectionString returns an attribute KeyValue conforming to the // "db.connection_string" semantic conventions. It represents the connection // string used to connect to the database. It is recommended to remove embedded // credentials. func DBConnectionString(val string) attribute.KeyValue { return DBConnectionStringKey.String(val) } // DBUser returns an attribute KeyValue conforming to the "db.user" semantic // conventions. It represents the username for accessing the database. func DBUser(val string) attribute.KeyValue { return DBUserKey.String(val) } // DBJDBCDriverClassname returns an attribute KeyValue conforming to the // "db.jdbc.driver_classname" semantic conventions. It represents the // fully-qualified class name of the [Java Database Connectivity // (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver // used to connect. func DBJDBCDriverClassname(val string) attribute.KeyValue { return DBJDBCDriverClassnameKey.String(val) } // DBName returns an attribute KeyValue conforming to the "db.name" semantic // conventions. It represents the this attribute is used to report the name of // the database being accessed. For commands that switch the database, this // should be set to the target database (even if the command fails). func DBName(val string) attribute.KeyValue { return DBNameKey.String(val) } // DBStatement returns an attribute KeyValue conforming to the // "db.statement" semantic conventions. It represents the database statement // being executed. func DBStatement(val string) attribute.KeyValue { return DBStatementKey.String(val) } // DBOperation returns an attribute KeyValue conforming to the // "db.operation" semantic conventions. It represents the name of the operation // being executed, e.g. the [MongoDB command // name](https://docs.mongodb.com/manual/reference/command/#database-operations) // such as `findAndModify`, or the SQL keyword. func DBOperation(val string) attribute.KeyValue { return DBOperationKey.String(val) } // Connection-level attributes for Microsoft SQL Server const ( // DBMSSQLInstanceNameKey is the attribute Key conforming to the // "db.mssql.instance_name" semantic conventions. It represents the // Microsoft SQL Server [instance // name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) // connecting to. This name is used to determine the port of a named // instance. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'MSSQLSERVER' // Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no // longer required (but still recommended if non-standard). DBMSSQLInstanceNameKey = attribute.Key("db.mssql.instance_name") ) // DBMSSQLInstanceName returns an attribute KeyValue conforming to the // "db.mssql.instance_name" semantic conventions. It represents the Microsoft // SQL Server [instance // name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) // connecting to. This name is used to determine the port of a named instance. func DBMSSQLInstanceName(val string) attribute.KeyValue { return DBMSSQLInstanceNameKey.String(val) } // Call-level attributes for Cassandra const ( // DBCassandraPageSizeKey is the attribute Key conforming to the // "db.cassandra.page_size" semantic conventions. It represents the fetch // size used for paging, i.e. how many rows will be returned at once. // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 5000 DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size") // DBCassandraConsistencyLevelKey is the attribute Key conforming to the // "db.cassandra.consistency_level" semantic conventions. It represents the // consistency level of the query. Based on consistency values from // [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). // // Type: Enum // RequirementLevel: Optional // Stability: stable DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level") // DBCassandraTableKey is the attribute Key conforming to the // "db.cassandra.table" semantic conventions. It represents the name of the // primary table that the operation is acting upon, including the keyspace // name (if applicable). // // Type: string // RequirementLevel: Recommended // Stability: stable // Examples: 'mytable' // Note: This mirrors the db.sql.table attribute but references cassandra // rather than sql. It is not recommended to attempt any client-side // parsing of `db.statement` just to get this property, but it should be // set if it is provided by the library being instrumented. If the // operation is acting upon an anonymous table, or more than one table, // this value MUST NOT be set. DBCassandraTableKey = attribute.Key("db.cassandra.table") // DBCassandraIdempotenceKey is the attribute Key conforming to the // "db.cassandra.idempotence" semantic conventions. It represents the // whether or not the query is idempotent. // // Type: boolean // RequirementLevel: Optional // Stability: stable DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence") // DBCassandraSpeculativeExecutionCountKey is the attribute Key conforming // to the "db.cassandra.speculative_execution_count" semantic conventions. // It represents the number of times a query was speculatively executed. // Not set or `0` if the query was not executed speculatively. // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 0, 2 DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count") // DBCassandraCoordinatorIDKey is the attribute Key conforming to the // "db.cassandra.coordinator.id" semantic conventions. It represents the ID // of the coordinating node for a query. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af' DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id") // DBCassandraCoordinatorDCKey is the attribute Key conforming to the // "db.cassandra.coordinator.dc" semantic conventions. It represents the // data center of the coordinating node for a query. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'us-west-2' DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc") ) var ( // all DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all") // each_quorum DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum") // quorum DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum") // local_quorum DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum") // one DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one") // two DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two") // three DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three") // local_one DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one") // any DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any") // serial DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial") // local_serial DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial") ) // DBCassandraPageSize returns an attribute KeyValue conforming to the // "db.cassandra.page_size" semantic conventions. It represents the fetch size // used for paging, i.e. how many rows will be returned at once. func DBCassandraPageSize(val int) attribute.KeyValue { return DBCassandraPageSizeKey.Int(val) } // DBCassandraTable returns an attribute KeyValue conforming to the // "db.cassandra.table" semantic conventions. It represents the name of the // primary table that the operation is acting upon, including the keyspace name // (if applicable). func DBCassandraTable(val string) attribute.KeyValue { return DBCassandraTableKey.String(val) } // DBCassandraIdempotence returns an attribute KeyValue conforming to the // "db.cassandra.idempotence" semantic conventions. It represents the whether // or not the query is idempotent. func DBCassandraIdempotence(val bool) attribute.KeyValue { return DBCassandraIdempotenceKey.Bool(val) } // DBCassandraSpeculativeExecutionCount returns an attribute KeyValue // conforming to the "db.cassandra.speculative_execution_count" semantic // conventions. It represents the number of times a query was speculatively // executed. Not set or `0` if the query was not executed speculatively. func DBCassandraSpeculativeExecutionCount(val int) attribute.KeyValue { return DBCassandraSpeculativeExecutionCountKey.Int(val) } // DBCassandraCoordinatorID returns an attribute KeyValue conforming to the // "db.cassandra.coordinator.id" semantic conventions. It represents the ID of // the coordinating node for a query. func DBCassandraCoordinatorID(val string) attribute.KeyValue { return DBCassandraCoordinatorIDKey.String(val) } // DBCassandraCoordinatorDC returns an attribute KeyValue conforming to the // "db.cassandra.coordinator.dc" semantic conventions. It represents the data // center of the coordinating node for a query. func DBCassandraCoordinatorDC(val string) attribute.KeyValue { return DBCassandraCoordinatorDCKey.String(val) } // Call-level attributes for Redis const ( // DBRedisDBIndexKey is the attribute Key conforming to the // "db.redis.database_index" semantic conventions. It represents the index // of the database being accessed as used in the [`SELECT` // command](https://redis.io/commands/select), provided as an integer. To // be used instead of the generic `db.name` attribute. // // Type: int // RequirementLevel: ConditionallyRequired (If other than the default // database (`0`).) // Stability: stable // Examples: 0, 1, 15 DBRedisDBIndexKey = attribute.Key("db.redis.database_index") ) // DBRedisDBIndex returns an attribute KeyValue conforming to the // "db.redis.database_index" semantic conventions. It represents the index of // the database being accessed as used in the [`SELECT` // command](https://redis.io/commands/select), provided as an integer. To be // used instead of the generic `db.name` attribute. func DBRedisDBIndex(val int) attribute.KeyValue { return DBRedisDBIndexKey.Int(val) } // Call-level attributes for MongoDB const ( // DBMongoDBCollectionKey is the attribute Key conforming to the // "db.mongodb.collection" semantic conventions. It represents the // collection being accessed within the database stated in `db.name`. // // Type: string // RequirementLevel: Required // Stability: stable // Examples: 'customers', 'products' DBMongoDBCollectionKey = attribute.Key("db.mongodb.collection") ) // DBMongoDBCollection returns an attribute KeyValue conforming to the // "db.mongodb.collection" semantic conventions. It represents the collection // being accessed within the database stated in `db.name`. func DBMongoDBCollection(val string) attribute.KeyValue { return DBMongoDBCollectionKey.String(val) } // Call-level attributes for SQL databases const ( // DBSQLTableKey is the attribute Key conforming to the "db.sql.table" // semantic conventions. It represents the name of the primary table that // the operation is acting upon, including the database name (if // applicable). // // Type: string // RequirementLevel: Recommended // Stability: stable // Examples: 'public.users', 'customers' // Note: It is not recommended to attempt any client-side parsing of // `db.statement` just to get this property, but it should be set if it is // provided by the library being instrumented. If the operation is acting // upon an anonymous table, or more than one table, this value MUST NOT be // set. DBSQLTableKey = attribute.Key("db.sql.table") ) // DBSQLTable returns an attribute KeyValue conforming to the "db.sql.table" // semantic conventions. It represents the name of the primary table that the // operation is acting upon, including the database name (if applicable). func DBSQLTable(val string) attribute.KeyValue { return DBSQLTableKey.String(val) } // Call-level attributes for Cosmos DB. const ( // DBCosmosDBClientIDKey is the attribute Key conforming to the // "db.cosmosdb.client_id" semantic conventions. It represents the unique // Cosmos client instance id. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '3ba4827d-4422-483f-b59f-85b74211c11d' DBCosmosDBClientIDKey = attribute.Key("db.cosmosdb.client_id") // DBCosmosDBOperationTypeKey is the attribute Key conforming to the // "db.cosmosdb.operation_type" semantic conventions. It represents the // cosmosDB Operation Type. // // Type: Enum // RequirementLevel: ConditionallyRequired (when performing one of the // operations in this list) // Stability: stable DBCosmosDBOperationTypeKey = attribute.Key("db.cosmosdb.operation_type") // DBCosmosDBConnectionModeKey is the attribute Key conforming to the // "db.cosmosdb.connection_mode" semantic conventions. It represents the // cosmos client connection mode. // // Type: Enum // RequirementLevel: ConditionallyRequired (if not `direct` (or pick gw as // default)) // Stability: stable DBCosmosDBConnectionModeKey = attribute.Key("db.cosmosdb.connection_mode") // DBCosmosDBContainerKey is the attribute Key conforming to the // "db.cosmosdb.container" semantic conventions. It represents the cosmos // DB container name. // // Type: string // RequirementLevel: ConditionallyRequired (if available) // Stability: stable // Examples: 'anystring' DBCosmosDBContainerKey = attribute.Key("db.cosmosdb.container") // DBCosmosDBRequestContentLengthKey is the attribute Key conforming to the // "db.cosmosdb.request_content_length" semantic conventions. It represents // the request payload size in bytes // // Type: int // RequirementLevel: Optional // Stability: stable DBCosmosDBRequestContentLengthKey = attribute.Key("db.cosmosdb.request_content_length") // DBCosmosDBStatusCodeKey is the attribute Key conforming to the // "db.cosmosdb.status_code" semantic conventions. It represents the cosmos // DB status code. // // Type: int // RequirementLevel: ConditionallyRequired (if response was received) // Stability: stable // Examples: 200, 201 DBCosmosDBStatusCodeKey = attribute.Key("db.cosmosdb.status_code") // DBCosmosDBSubStatusCodeKey is the attribute Key conforming to the // "db.cosmosdb.sub_status_code" semantic conventions. It represents the // cosmos DB sub status code. // // Type: int // RequirementLevel: ConditionallyRequired (when response was received and // contained sub-code.) // Stability: stable // Examples: 1000, 1002 DBCosmosDBSubStatusCodeKey = attribute.Key("db.cosmosdb.sub_status_code") // DBCosmosDBRequestChargeKey is the attribute Key conforming to the // "db.cosmosdb.request_charge" semantic conventions. It represents the rU // consumed for that operation // // Type: double // RequirementLevel: ConditionallyRequired (when available) // Stability: stable // Examples: 46.18, 1.0 DBCosmosDBRequestChargeKey = attribute.Key("db.cosmosdb.request_charge") ) var ( // invalid DBCosmosDBOperationTypeInvalid = DBCosmosDBOperationTypeKey.String("Invalid") // create DBCosmosDBOperationTypeCreate = DBCosmosDBOperationTypeKey.String("Create") // patch DBCosmosDBOperationTypePatch = DBCosmosDBOperationTypeKey.String("Patch") // read DBCosmosDBOperationTypeRead = DBCosmosDBOperationTypeKey.String("Read") // read_feed DBCosmosDBOperationTypeReadFeed = DBCosmosDBOperationTypeKey.String("ReadFeed") // delete DBCosmosDBOperationTypeDelete = DBCosmosDBOperationTypeKey.String("Delete") // replace DBCosmosDBOperationTypeReplace = DBCosmosDBOperationTypeKey.String("Replace") // execute DBCosmosDBOperationTypeExecute = DBCosmosDBOperationTypeKey.String("Execute") // query DBCosmosDBOperationTypeQuery = DBCosmosDBOperationTypeKey.String("Query") // head DBCosmosDBOperationTypeHead = DBCosmosDBOperationTypeKey.String("Head") // head_feed DBCosmosDBOperationTypeHeadFeed = DBCosmosDBOperationTypeKey.String("HeadFeed") // upsert DBCosmosDBOperationTypeUpsert = DBCosmosDBOperationTypeKey.String("Upsert") // batch DBCosmosDBOperationTypeBatch = DBCosmosDBOperationTypeKey.String("Batch") // query_plan DBCosmosDBOperationTypeQueryPlan = DBCosmosDBOperationTypeKey.String("QueryPlan") // execute_javascript DBCosmosDBOperationTypeExecuteJavascript = DBCosmosDBOperationTypeKey.String("ExecuteJavaScript") ) var ( // Gateway (HTTP) connections mode DBCosmosDBConnectionModeGateway = DBCosmosDBConnectionModeKey.String("gateway") // Direct connection DBCosmosDBConnectionModeDirect = DBCosmosDBConnectionModeKey.String("direct") ) // DBCosmosDBClientID returns an attribute KeyValue conforming to the // "db.cosmosdb.client_id" semantic conventions. It represents the unique // Cosmos client instance id. func DBCosmosDBClientID(val string) attribute.KeyValue { return DBCosmosDBClientIDKey.String(val) } // DBCosmosDBContainer returns an attribute KeyValue conforming to the // "db.cosmosdb.container" semantic conventions. It represents the cosmos DB // container name. func DBCosmosDBContainer(val string) attribute.KeyValue { return DBCosmosDBContainerKey.String(val) } // DBCosmosDBRequestContentLength returns an attribute KeyValue conforming // to the "db.cosmosdb.request_content_length" semantic conventions. It // represents the request payload size in bytes func DBCosmosDBRequestContentLength(val int) attribute.KeyValue { return DBCosmosDBRequestContentLengthKey.Int(val) } // DBCosmosDBStatusCode returns an attribute KeyValue conforming to the // "db.cosmosdb.status_code" semantic conventions. It represents the cosmos DB // status code. func DBCosmosDBStatusCode(val int) attribute.KeyValue { return DBCosmosDBStatusCodeKey.Int(val) } // DBCosmosDBSubStatusCode returns an attribute KeyValue conforming to the // "db.cosmosdb.sub_status_code" semantic conventions. It represents the cosmos // DB sub status code. func DBCosmosDBSubStatusCode(val int) attribute.KeyValue { return DBCosmosDBSubStatusCodeKey.Int(val) } // DBCosmosDBRequestCharge returns an attribute KeyValue conforming to the // "db.cosmosdb.request_charge" semantic conventions. It represents the rU // consumed for that operation func DBCosmosDBRequestCharge(val float64) attribute.KeyValue { return DBCosmosDBRequestChargeKey.Float64(val) } // Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's // concepts. const ( // OTelStatusCodeKey is the attribute Key conforming to the // "otel.status_code" semantic conventions. It represents the name of the // code, either "OK" or "ERROR". MUST NOT be set if the status code is // UNSET. // // Type: Enum // RequirementLevel: Optional // Stability: stable OTelStatusCodeKey = attribute.Key("otel.status_code") // OTelStatusDescriptionKey is the attribute Key conforming to the // "otel.status_description" semantic conventions. It represents the // description of the Status if it has a value, otherwise not set. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'resource not found' OTelStatusDescriptionKey = attribute.Key("otel.status_description") ) var ( // The operation has been validated by an Application developer or Operator to have completed successfully OTelStatusCodeOk = OTelStatusCodeKey.String("OK") // The operation contains an error OTelStatusCodeError = OTelStatusCodeKey.String("ERROR") ) // OTelStatusDescription returns an attribute KeyValue conforming to the // "otel.status_description" semantic conventions. It represents the // description of the Status if it has a value, otherwise not set. func OTelStatusDescription(val string) attribute.KeyValue { return OTelStatusDescriptionKey.String(val) } // This semantic convention describes an instance of a function that runs // without provisioning or managing of servers (also known as serverless // functions or Function as a Service (FaaS)) with spans. const ( // FaaSTriggerKey is the attribute Key conforming to the "faas.trigger" // semantic conventions. It represents the type of the trigger which caused // this function invocation. // // Type: Enum // RequirementLevel: Optional // Stability: stable // Note: For the server/consumer span on the incoming side, // `faas.trigger` MUST be set. // // Clients invoking FaaS instances usually cannot set `faas.trigger`, // since they would typically need to look in the payload to determine // the event type. If clients set it, it should be the same as the // trigger that corresponding incoming would have (i.e., this has // nothing to do with the underlying transport used to make the API // call to invoke the lambda, which is often HTTP). FaaSTriggerKey = attribute.Key("faas.trigger") // FaaSInvocationIDKey is the attribute Key conforming to the // "faas.invocation_id" semantic conventions. It represents the invocation // ID of the current function invocation. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28' FaaSInvocationIDKey = attribute.Key("faas.invocation_id") ) var ( // A response to some data source operation such as a database or filesystem read/write FaaSTriggerDatasource = FaaSTriggerKey.String("datasource") // To provide an answer to an inbound HTTP request FaaSTriggerHTTP = FaaSTriggerKey.String("http") // A function is set to be executed when messages are sent to a messaging system FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub") // A function is scheduled to be executed regularly FaaSTriggerTimer = FaaSTriggerKey.String("timer") // If none of the others apply FaaSTriggerOther = FaaSTriggerKey.String("other") ) // FaaSInvocationID returns an attribute KeyValue conforming to the // "faas.invocation_id" semantic conventions. It represents the invocation ID // of the current function invocation. func FaaSInvocationID(val string) attribute.KeyValue { return FaaSInvocationIDKey.String(val) } // Semantic Convention for FaaS triggered as a response to some data source // operation such as a database or filesystem read/write. const ( // FaaSDocumentCollectionKey is the attribute Key conforming to the // "faas.document.collection" semantic conventions. It represents the name // of the source on which the triggering operation was performed. For // example, in Cloud Storage or S3 corresponds to the bucket name, and in // Cosmos DB to the database name. // // Type: string // RequirementLevel: Required // Stability: stable // Examples: 'myBucketName', 'myDBName' FaaSDocumentCollectionKey = attribute.Key("faas.document.collection") // FaaSDocumentOperationKey is the attribute Key conforming to the // "faas.document.operation" semantic conventions. It represents the // describes the type of the operation that was performed on the data. // // Type: Enum // RequirementLevel: Required // Stability: stable FaaSDocumentOperationKey = attribute.Key("faas.document.operation") // FaaSDocumentTimeKey is the attribute Key conforming to the // "faas.document.time" semantic conventions. It represents a string // containing the time when the data was accessed in the [ISO // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '2020-01-23T13:47:06Z' FaaSDocumentTimeKey = attribute.Key("faas.document.time") // FaaSDocumentNameKey is the attribute Key conforming to the // "faas.document.name" semantic conventions. It represents the document // name/table subjected to the operation. For example, in Cloud Storage or // S3 is the name of the file, and in Cosmos DB the table name. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'myFile.txt', 'myTableName' FaaSDocumentNameKey = attribute.Key("faas.document.name") ) var ( // When a new object is created FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert") // When an object is modified FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit") // When an object is deleted FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete") ) // FaaSDocumentCollection returns an attribute KeyValue conforming to the // "faas.document.collection" semantic conventions. It represents the name of // the source on which the triggering operation was performed. For example, in // Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the // database name. func FaaSDocumentCollection(val string) attribute.KeyValue { return FaaSDocumentCollectionKey.String(val) } // FaaSDocumentTime returns an attribute KeyValue conforming to the // "faas.document.time" semantic conventions. It represents a string containing // the time when the data was accessed in the [ISO // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). func FaaSDocumentTime(val string) attribute.KeyValue { return FaaSDocumentTimeKey.String(val) } // FaaSDocumentName returns an attribute KeyValue conforming to the // "faas.document.name" semantic conventions. It represents the document // name/table subjected to the operation. For example, in Cloud Storage or S3 // is the name of the file, and in Cosmos DB the table name. func FaaSDocumentName(val string) attribute.KeyValue { return FaaSDocumentNameKey.String(val) } // Semantic Convention for FaaS scheduled to be executed regularly. const ( // FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic // conventions. It represents a string containing the function invocation // time in the [ISO // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '2020-01-23T13:47:06Z' FaaSTimeKey = attribute.Key("faas.time") // FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic // conventions. It represents a string containing the schedule period as // [Cron // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '0/5 * * * ? *' FaaSCronKey = attribute.Key("faas.cron") ) // FaaSTime returns an attribute KeyValue conforming to the "faas.time" // semantic conventions. It represents a string containing the function // invocation time in the [ISO // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). func FaaSTime(val string) attribute.KeyValue { return FaaSTimeKey.String(val) } // FaaSCron returns an attribute KeyValue conforming to the "faas.cron" // semantic conventions. It represents a string containing the schedule period // as [Cron // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). func FaaSCron(val string) attribute.KeyValue { return FaaSCronKey.String(val) } // Contains additional attributes for incoming FaaS spans. const ( // FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart" // semantic conventions. It represents a boolean that is true if the // serverless function is executed for the first time (aka cold-start). // // Type: boolean // RequirementLevel: Optional // Stability: stable FaaSColdstartKey = attribute.Key("faas.coldstart") ) // FaaSColdstart returns an attribute KeyValue conforming to the // "faas.coldstart" semantic conventions. It represents a boolean that is true // if the serverless function is executed for the first time (aka cold-start). func FaaSColdstart(val bool) attribute.KeyValue { return FaaSColdstartKey.Bool(val) } // Contains additional attributes for outgoing FaaS spans. const ( // FaaSInvokedNameKey is the attribute Key conforming to the // "faas.invoked_name" semantic conventions. It represents the name of the // invoked function. // // Type: string // RequirementLevel: Required // Stability: stable // Examples: 'my-function' // Note: SHOULD be equal to the `faas.name` resource attribute of the // invoked function. FaaSInvokedNameKey = attribute.Key("faas.invoked_name") // FaaSInvokedProviderKey is the attribute Key conforming to the // "faas.invoked_provider" semantic conventions. It represents the cloud // provider of the invoked function. // // Type: Enum // RequirementLevel: Required // Stability: stable // Note: SHOULD be equal to the `cloud.provider` resource attribute of the // invoked function. FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider") // FaaSInvokedRegionKey is the attribute Key conforming to the // "faas.invoked_region" semantic conventions. It represents the cloud // region of the invoked function. // // Type: string // RequirementLevel: ConditionallyRequired (For some cloud providers, like // AWS or GCP, the region in which a function is hosted is essential to // uniquely identify the function and also part of its endpoint. Since it's // part of the endpoint being called, the region is always known to // clients. In these cases, `faas.invoked_region` MUST be set accordingly. // If the region is unknown to the client or not required for identifying // the invoked function, setting `faas.invoked_region` is optional.) // Stability: stable // Examples: 'eu-central-1' // Note: SHOULD be equal to the `cloud.region` resource attribute of the // invoked function. FaaSInvokedRegionKey = attribute.Key("faas.invoked_region") ) var ( // Alibaba Cloud FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud") // Amazon Web Services FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws") // Microsoft Azure FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure") // Google Cloud Platform FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp") // Tencent Cloud FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud") ) // FaaSInvokedName returns an attribute KeyValue conforming to the // "faas.invoked_name" semantic conventions. It represents the name of the // invoked function. func FaaSInvokedName(val string) attribute.KeyValue { return FaaSInvokedNameKey.String(val) } // FaaSInvokedRegion returns an attribute KeyValue conforming to the // "faas.invoked_region" semantic conventions. It represents the cloud region // of the invoked function. func FaaSInvokedRegion(val string) attribute.KeyValue { return FaaSInvokedRegionKey.String(val) } // Operations that access some remote service. const ( // PeerServiceKey is the attribute Key conforming to the "peer.service" // semantic conventions. It represents the // [`service.name`](../../resource/semantic_conventions/README.md#service) // of the remote service. SHOULD be equal to the actual `service.name` // resource attribute of the remote service if any. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'AuthTokenCache' PeerServiceKey = attribute.Key("peer.service") ) // PeerService returns an attribute KeyValue conforming to the // "peer.service" semantic conventions. It represents the // [`service.name`](../../resource/semantic_conventions/README.md#service) of // the remote service. SHOULD be equal to the actual `service.name` resource // attribute of the remote service if any. func PeerService(val string) attribute.KeyValue { return PeerServiceKey.String(val) } // These attributes may be used for any operation with an authenticated and/or // authorized enduser. const ( // EnduserIDKey is the attribute Key conforming to the "enduser.id" // semantic conventions. It represents the username or client_id extracted // from the access token or // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header // in the inbound request from outside the system. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'username' EnduserIDKey = attribute.Key("enduser.id") // EnduserRoleKey is the attribute Key conforming to the "enduser.role" // semantic conventions. It represents the actual/assumed role the client // is making the request under extracted from token or application security // context. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'admin' EnduserRoleKey = attribute.Key("enduser.role") // EnduserScopeKey is the attribute Key conforming to the "enduser.scope" // semantic conventions. It represents the scopes or granted authorities // the client currently possesses extracted from token or application // security context. The value would come from the scope associated with an // [OAuth 2.0 Access // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute // value in a [SAML 2.0 // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'read:message, write:files' EnduserScopeKey = attribute.Key("enduser.scope") ) // EnduserID returns an attribute KeyValue conforming to the "enduser.id" // semantic conventions. It represents the username or client_id extracted from // the access token or // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in // the inbound request from outside the system. func EnduserID(val string) attribute.KeyValue { return EnduserIDKey.String(val) } // EnduserRole returns an attribute KeyValue conforming to the // "enduser.role" semantic conventions. It represents the actual/assumed role // the client is making the request under extracted from token or application // security context. func EnduserRole(val string) attribute.KeyValue { return EnduserRoleKey.String(val) } // EnduserScope returns an attribute KeyValue conforming to the // "enduser.scope" semantic conventions. It represents the scopes or granted // authorities the client currently possesses extracted from token or // application security context. The value would come from the scope associated // with an [OAuth 2.0 Access // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute // value in a [SAML 2.0 // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). func EnduserScope(val string) attribute.KeyValue { return EnduserScopeKey.String(val) } // These attributes may be used for any operation to store information about a // thread that started a span. const ( // ThreadIDKey is the attribute Key conforming to the "thread.id" semantic // conventions. It represents the current "managed" thread ID (as opposed // to OS thread ID). // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 42 ThreadIDKey = attribute.Key("thread.id") // ThreadNameKey is the attribute Key conforming to the "thread.name" // semantic conventions. It represents the current thread name. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'main' ThreadNameKey = attribute.Key("thread.name") ) // ThreadID returns an attribute KeyValue conforming to the "thread.id" // semantic conventions. It represents the current "managed" thread ID (as // opposed to OS thread ID). func ThreadID(val int) attribute.KeyValue { return ThreadIDKey.Int(val) } // ThreadName returns an attribute KeyValue conforming to the "thread.name" // semantic conventions. It represents the current thread name. func ThreadName(val string) attribute.KeyValue { return ThreadNameKey.String(val) } // These attributes allow to report this unit of code and therefore to provide // more context about the span. const ( // CodeFunctionKey is the attribute Key conforming to the "code.function" // semantic conventions. It represents the method or function name, or // equivalent (usually rightmost part of the code unit's name). // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'serveRequest' CodeFunctionKey = attribute.Key("code.function") // CodeNamespaceKey is the attribute Key conforming to the "code.namespace" // semantic conventions. It represents the "namespace" within which // `code.function` is defined. Usually the qualified class or module name, // such that `code.namespace` + some separator + `code.function` form a // unique identifier for the code unit. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'com.example.MyHTTPService' CodeNamespaceKey = attribute.Key("code.namespace") // CodeFilepathKey is the attribute Key conforming to the "code.filepath" // semantic conventions. It represents the source code file name that // identifies the code unit as uniquely as possible (preferably an absolute // file path). // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '/usr/local/MyApplication/content_root/app/index.php' CodeFilepathKey = attribute.Key("code.filepath") // CodeLineNumberKey is the attribute Key conforming to the "code.lineno" // semantic conventions. It represents the line number in `code.filepath` // best representing the operation. It SHOULD point within the code unit // named in `code.function`. // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 42 CodeLineNumberKey = attribute.Key("code.lineno") // CodeColumnKey is the attribute Key conforming to the "code.column" // semantic conventions. It represents the column number in `code.filepath` // best representing the operation. It SHOULD point within the code unit // named in `code.function`. // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 16 CodeColumnKey = attribute.Key("code.column") ) // CodeFunction returns an attribute KeyValue conforming to the // "code.function" semantic conventions. It represents the method or function // name, or equivalent (usually rightmost part of the code unit's name). func CodeFunction(val string) attribute.KeyValue { return CodeFunctionKey.String(val) } // CodeNamespace returns an attribute KeyValue conforming to the // "code.namespace" semantic conventions. It represents the "namespace" within // which `code.function` is defined. Usually the qualified class or module // name, such that `code.namespace` + some separator + `code.function` form a // unique identifier for the code unit. func CodeNamespace(val string) attribute.KeyValue { return CodeNamespaceKey.String(val) } // CodeFilepath returns an attribute KeyValue conforming to the // "code.filepath" semantic conventions. It represents the source code file // name that identifies the code unit as uniquely as possible (preferably an // absolute file path). func CodeFilepath(val string) attribute.KeyValue { return CodeFilepathKey.String(val) } // CodeLineNumber returns an attribute KeyValue conforming to the "code.lineno" // semantic conventions. It represents the line number in `code.filepath` best // representing the operation. It SHOULD point within the code unit named in // `code.function`. func CodeLineNumber(val int) attribute.KeyValue { return CodeLineNumberKey.Int(val) } // CodeColumn returns an attribute KeyValue conforming to the "code.column" // semantic conventions. It represents the column number in `code.filepath` // best representing the operation. It SHOULD point within the code unit named // in `code.function`. func CodeColumn(val int) attribute.KeyValue { return CodeColumnKey.Int(val) } // Semantic Convention for HTTP Client const ( // HTTPURLKey is the attribute Key conforming to the "http.url" semantic // conventions. It represents the full HTTP request URL in the form // `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is // not transmitted over HTTP, but if it is known, it should be included // nevertheless. // // Type: string // RequirementLevel: Required // Stability: stable // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv' // Note: `http.url` MUST NOT contain credentials passed via URL in form of // `https://username:password@www.example.com/`. In such case the // attribute's value should be `https://www.example.com/`. HTTPURLKey = attribute.Key("http.url") // HTTPResendCountKey is the attribute Key conforming to the // "http.resend_count" semantic conventions. It represents the ordinal // number of request resending attempt (for any reason, including // redirects). // // Type: int // RequirementLevel: Recommended (if and only if request was retried.) // Stability: stable // Examples: 3 // Note: The resend count SHOULD be updated each time an HTTP request gets // resent by the client, regardless of what was the cause of the resending // (e.g. redirection, authorization failure, 503 Server Unavailable, // network issues, or any other). HTTPResendCountKey = attribute.Key("http.resend_count") ) // HTTPURL returns an attribute KeyValue conforming to the "http.url" // semantic conventions. It represents the full HTTP request URL in the form // `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not // transmitted over HTTP, but if it is known, it should be included // nevertheless. func HTTPURL(val string) attribute.KeyValue { return HTTPURLKey.String(val) } // HTTPResendCount returns an attribute KeyValue conforming to the // "http.resend_count" semantic conventions. It represents the ordinal number // of request resending attempt (for any reason, including redirects). func HTTPResendCount(val int) attribute.KeyValue { return HTTPResendCountKey.Int(val) } // Semantic Convention for HTTP Server const ( // HTTPTargetKey is the attribute Key conforming to the "http.target" // semantic conventions. It represents the full request target as passed in // a HTTP request line or equivalent. // // Type: string // RequirementLevel: Required // Stability: stable // Examples: '/users/12314/?q=ddds' HTTPTargetKey = attribute.Key("http.target") // HTTPClientIPKey is the attribute Key conforming to the "http.client_ip" // semantic conventions. It represents the IP address of the original // client behind all proxies, if known (e.g. from // [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)). // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '83.164.160.102' // Note: This is not necessarily the same as `net.sock.peer.addr`, which // would // identify the network-level peer, which may be a proxy. // // This attribute should be set when a source of information different // from the one used for `net.sock.peer.addr`, is available even if that // other // source just confirms the same value as `net.sock.peer.addr`. // Rationale: For `net.sock.peer.addr`, one typically does not know if it // comes from a proxy, reverse proxy, or the actual client. Setting // `http.client_ip` when it's the same as `net.sock.peer.addr` means that // one is at least somewhat confident that the address is not that of // the closest proxy. HTTPClientIPKey = attribute.Key("http.client_ip") ) // HTTPTarget returns an attribute KeyValue conforming to the "http.target" // semantic conventions. It represents the full request target as passed in a // HTTP request line or equivalent. func HTTPTarget(val string) attribute.KeyValue { return HTTPTargetKey.String(val) } // HTTPClientIP returns an attribute KeyValue conforming to the // "http.client_ip" semantic conventions. It represents the IP address of the // original client behind all proxies, if known (e.g. from // [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)). func HTTPClientIP(val string) attribute.KeyValue { return HTTPClientIPKey.String(val) } // The `aws` conventions apply to operations using the AWS SDK. They map // request or response parameters in AWS SDK API calls to attributes on a Span. // The conventions have been collected over time based on feedback from AWS // users of tracing and will continue to evolve as new interesting conventions // are found. // Some descriptions are also provided for populating general OpenTelemetry // semantic conventions based on these APIs. const ( // AWSRequestIDKey is the attribute Key conforming to the "aws.request_id" // semantic conventions. It represents the AWS request ID as returned in // the response headers `x-amz-request-id` or `x-amz-requestid`. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '79b9da39-b7ae-508a-a6bc-864b2829c622', 'C9ER4AJX75574TDJ' AWSRequestIDKey = attribute.Key("aws.request_id") ) // AWSRequestID returns an attribute KeyValue conforming to the // "aws.request_id" semantic conventions. It represents the AWS request ID as // returned in the response headers `x-amz-request-id` or `x-amz-requestid`. func AWSRequestID(val string) attribute.KeyValue { return AWSRequestIDKey.String(val) } // Attributes that exist for multiple DynamoDB request types. const ( // AWSDynamoDBTableNamesKey is the attribute Key conforming to the // "aws.dynamodb.table_names" semantic conventions. It represents the keys // in the `RequestItems` object field. // // Type: string[] // RequirementLevel: Optional // Stability: stable // Examples: 'Users', 'Cats' AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names") // AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the // "aws.dynamodb.consumed_capacity" semantic conventions. It represents the // JSON-serialized value of each item in the `ConsumedCapacity` response // field. // // Type: string[] // RequirementLevel: Optional // Stability: stable // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": { // "string" : { "CapacityUnits": number, "ReadCapacityUnits": number, // "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" : // { "CapacityUnits": number, "ReadCapacityUnits": number, // "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table": // { "CapacityUnits": number, "ReadCapacityUnits": number, // "WriteCapacityUnits": number }, "TableName": "string", // "WriteCapacityUnits": number }' AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity") // AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to // the "aws.dynamodb.item_collection_metrics" semantic conventions. It // represents the JSON-serialized value of the `ItemCollectionMetrics` // response field. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B": // blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { // "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ], // "NULL": boolean, "S": "string", "SS": [ "string" ] } }, // "SizeEstimateRangeGB": [ number ] } ] }' AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics") // AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to // the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It // represents the value of the `ProvisionedThroughput.ReadCapacityUnits` // request parameter. // // Type: double // RequirementLevel: Optional // Stability: stable // Examples: 1.0, 2.0 AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity") // AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming // to the "aws.dynamodb.provisioned_write_capacity" semantic conventions. // It represents the value of the // `ProvisionedThroughput.WriteCapacityUnits` request parameter. // // Type: double // RequirementLevel: Optional // Stability: stable // Examples: 1.0, 2.0 AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity") // AWSDynamoDBConsistentReadKey is the attribute Key conforming to the // "aws.dynamodb.consistent_read" semantic conventions. It represents the // value of the `ConsistentRead` request parameter. // // Type: boolean // RequirementLevel: Optional // Stability: stable AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read") // AWSDynamoDBProjectionKey is the attribute Key conforming to the // "aws.dynamodb.projection" semantic conventions. It represents the value // of the `ProjectionExpression` request parameter. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'Title', 'Title, Price, Color', 'Title, Description, // RelatedItems, ProductReviews' AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection") // AWSDynamoDBLimitKey is the attribute Key conforming to the // "aws.dynamodb.limit" semantic conventions. It represents the value of // the `Limit` request parameter. // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 10 AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit") // AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the // "aws.dynamodb.attributes_to_get" semantic conventions. It represents the // value of the `AttributesToGet` request parameter. // // Type: string[] // RequirementLevel: Optional // Stability: stable // Examples: 'lives', 'id' AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get") // AWSDynamoDBIndexNameKey is the attribute Key conforming to the // "aws.dynamodb.index_name" semantic conventions. It represents the value // of the `IndexName` request parameter. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'name_to_group' AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name") // AWSDynamoDBSelectKey is the attribute Key conforming to the // "aws.dynamodb.select" semantic conventions. It represents the value of // the `Select` request parameter. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'ALL_ATTRIBUTES', 'COUNT' AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select") ) // AWSDynamoDBTableNames returns an attribute KeyValue conforming to the // "aws.dynamodb.table_names" semantic conventions. It represents the keys in // the `RequestItems` object field. func AWSDynamoDBTableNames(val ...string) attribute.KeyValue { return AWSDynamoDBTableNamesKey.StringSlice(val) } // AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to // the "aws.dynamodb.consumed_capacity" semantic conventions. It represents the // JSON-serialized value of each item in the `ConsumedCapacity` response field. func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue { return AWSDynamoDBConsumedCapacityKey.StringSlice(val) } // AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming // to the "aws.dynamodb.item_collection_metrics" semantic conventions. It // represents the JSON-serialized value of the `ItemCollectionMetrics` response // field. func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue { return AWSDynamoDBItemCollectionMetricsKey.String(val) } // AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue // conforming to the "aws.dynamodb.provisioned_read_capacity" semantic // conventions. It represents the value of the // `ProvisionedThroughput.ReadCapacityUnits` request parameter. func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue { return AWSDynamoDBProvisionedReadCapacityKey.Float64(val) } // AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue // conforming to the "aws.dynamodb.provisioned_write_capacity" semantic // conventions. It represents the value of the // `ProvisionedThroughput.WriteCapacityUnits` request parameter. func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue { return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val) } // AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the // "aws.dynamodb.consistent_read" semantic conventions. It represents the value // of the `ConsistentRead` request parameter. func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue { return AWSDynamoDBConsistentReadKey.Bool(val) } // AWSDynamoDBProjection returns an attribute KeyValue conforming to the // "aws.dynamodb.projection" semantic conventions. It represents the value of // the `ProjectionExpression` request parameter. func AWSDynamoDBProjection(val string) attribute.KeyValue { return AWSDynamoDBProjectionKey.String(val) } // AWSDynamoDBLimit returns an attribute KeyValue conforming to the // "aws.dynamodb.limit" semantic conventions. It represents the value of the // `Limit` request parameter. func AWSDynamoDBLimit(val int) attribute.KeyValue { return AWSDynamoDBLimitKey.Int(val) } // AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to // the "aws.dynamodb.attributes_to_get" semantic conventions. It represents the // value of the `AttributesToGet` request parameter. func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue { return AWSDynamoDBAttributesToGetKey.StringSlice(val) } // AWSDynamoDBIndexName returns an attribute KeyValue conforming to the // "aws.dynamodb.index_name" semantic conventions. It represents the value of // the `IndexName` request parameter. func AWSDynamoDBIndexName(val string) attribute.KeyValue { return AWSDynamoDBIndexNameKey.String(val) } // AWSDynamoDBSelect returns an attribute KeyValue conforming to the // "aws.dynamodb.select" semantic conventions. It represents the value of the // `Select` request parameter. func AWSDynamoDBSelect(val string) attribute.KeyValue { return AWSDynamoDBSelectKey.String(val) } // DynamoDB.CreateTable const ( // AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to // the "aws.dynamodb.global_secondary_indexes" semantic conventions. It // represents the JSON-serialized value of each item of the // `GlobalSecondaryIndexes` request field // // Type: string[] // RequirementLevel: Optional // Stability: stable // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName": // "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ // "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": { // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }' AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes") // AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to // the "aws.dynamodb.local_secondary_indexes" semantic conventions. It // represents the JSON-serialized value of each item of the // `LocalSecondaryIndexes` request field. // // Type: string[] // RequirementLevel: Optional // Stability: stable // Examples: '{ "IndexARN": "string", "IndexName": "string", // "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ { // "AttributeName": "string", "KeyType": "string" } ], "Projection": { // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }' AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes") ) // AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue // conforming to the "aws.dynamodb.global_secondary_indexes" semantic // conventions. It represents the JSON-serialized value of each item of the // `GlobalSecondaryIndexes` request field func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue { return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val) } // AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming // to the "aws.dynamodb.local_secondary_indexes" semantic conventions. It // represents the JSON-serialized value of each item of the // `LocalSecondaryIndexes` request field. func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue { return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val) } // DynamoDB.ListTables const ( // AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the // "aws.dynamodb.exclusive_start_table" semantic conventions. It represents // the value of the `ExclusiveStartTableName` request parameter. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'Users', 'CatsTable' AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table") // AWSDynamoDBTableCountKey is the attribute Key conforming to the // "aws.dynamodb.table_count" semantic conventions. It represents the the // number of items in the `TableNames` response parameter. // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 20 AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count") ) // AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming // to the "aws.dynamodb.exclusive_start_table" semantic conventions. It // represents the value of the `ExclusiveStartTableName` request parameter. func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue { return AWSDynamoDBExclusiveStartTableKey.String(val) } // AWSDynamoDBTableCount returns an attribute KeyValue conforming to the // "aws.dynamodb.table_count" semantic conventions. It represents the the // number of items in the `TableNames` response parameter. func AWSDynamoDBTableCount(val int) attribute.KeyValue { return AWSDynamoDBTableCountKey.Int(val) } // DynamoDB.Query const ( // AWSDynamoDBScanForwardKey is the attribute Key conforming to the // "aws.dynamodb.scan_forward" semantic conventions. It represents the // value of the `ScanIndexForward` request parameter. // // Type: boolean // RequirementLevel: Optional // Stability: stable AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward") ) // AWSDynamoDBScanForward returns an attribute KeyValue conforming to the // "aws.dynamodb.scan_forward" semantic conventions. It represents the value of // the `ScanIndexForward` request parameter. func AWSDynamoDBScanForward(val bool) attribute.KeyValue { return AWSDynamoDBScanForwardKey.Bool(val) } // DynamoDB.Scan const ( // AWSDynamoDBSegmentKey is the attribute Key conforming to the // "aws.dynamodb.segment" semantic conventions. It represents the value of // the `Segment` request parameter. // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 10 AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment") // AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the // "aws.dynamodb.total_segments" semantic conventions. It represents the // value of the `TotalSegments` request parameter. // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 100 AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments") // AWSDynamoDBCountKey is the attribute Key conforming to the // "aws.dynamodb.count" semantic conventions. It represents the value of // the `Count` response parameter. // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 10 AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count") // AWSDynamoDBScannedCountKey is the attribute Key conforming to the // "aws.dynamodb.scanned_count" semantic conventions. It represents the // value of the `ScannedCount` response parameter. // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 50 AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count") ) // AWSDynamoDBSegment returns an attribute KeyValue conforming to the // "aws.dynamodb.segment" semantic conventions. It represents the value of the // `Segment` request parameter. func AWSDynamoDBSegment(val int) attribute.KeyValue { return AWSDynamoDBSegmentKey.Int(val) } // AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the // "aws.dynamodb.total_segments" semantic conventions. It represents the value // of the `TotalSegments` request parameter. func AWSDynamoDBTotalSegments(val int) attribute.KeyValue { return AWSDynamoDBTotalSegmentsKey.Int(val) } // AWSDynamoDBCount returns an attribute KeyValue conforming to the // "aws.dynamodb.count" semantic conventions. It represents the value of the // `Count` response parameter. func AWSDynamoDBCount(val int) attribute.KeyValue { return AWSDynamoDBCountKey.Int(val) } // AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the // "aws.dynamodb.scanned_count" semantic conventions. It represents the value // of the `ScannedCount` response parameter. func AWSDynamoDBScannedCount(val int) attribute.KeyValue { return AWSDynamoDBScannedCountKey.Int(val) } // DynamoDB.UpdateTable const ( // AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to // the "aws.dynamodb.attribute_definitions" semantic conventions. It // represents the JSON-serialized value of each item in the // `AttributeDefinitions` request field. // // Type: string[] // RequirementLevel: Optional // Stability: stable // Examples: '{ "AttributeName": "string", "AttributeType": "string" }' AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions") // AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic // conventions. It represents the JSON-serialized value of each item in the // the `GlobalSecondaryIndexUpdates` request field. // // Type: string[] // RequirementLevel: Optional // Stability: stable // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ { // "AttributeName": "string", "KeyType": "string" } ], "Projection": { // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, // "ProvisionedThroughput": { "ReadCapacityUnits": number, // "WriteCapacityUnits": number } }' AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates") ) // AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming // to the "aws.dynamodb.attribute_definitions" semantic conventions. It // represents the JSON-serialized value of each item in the // `AttributeDefinitions` request field. func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue { return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val) } // AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic // conventions. It represents the JSON-serialized value of each item in the the // `GlobalSecondaryIndexUpdates` request field. func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue { return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val) } // Attributes that exist for S3 request types. const ( // AWSS3BucketKey is the attribute Key conforming to the "aws.s3.bucket" // semantic conventions. It represents the S3 bucket name the request // refers to. Corresponds to the `--bucket` parameter of the [S3 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) // operations. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'some-bucket-name' // Note: The `bucket` attribute is applicable to all S3 operations that // reference a bucket, i.e. that require the bucket name as a mandatory // parameter. // This applies to almost all S3 operations except `list-buckets`. AWSS3BucketKey = attribute.Key("aws.s3.bucket") // AWSS3KeyKey is the attribute Key conforming to the "aws.s3.key" semantic // conventions. It represents the S3 object key the request refers to. // Corresponds to the `--key` parameter of the [S3 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) // operations. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'someFile.yml' // Note: The `key` attribute is applicable to all object-related S3 // operations, i.e. that require the object key as a mandatory parameter. // This applies in particular to the following operations: // // - // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) // - // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) // - // [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html) // - // [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html) // - // [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html) // - // [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html) // - // [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html) // - // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) // - // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) // - // [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html) // - // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) // - // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) // - // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) AWSS3KeyKey = attribute.Key("aws.s3.key") // AWSS3CopySourceKey is the attribute Key conforming to the // "aws.s3.copy_source" semantic conventions. It represents the source // object (in the form `bucket`/`key`) for the copy operation. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'someFile.yml' // Note: The `copy_source` attribute applies to S3 copy operations and // corresponds to the `--copy-source` parameter // of the [copy-object operation within the S3 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html). // This applies in particular to the following operations: // // - // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) // - // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) AWSS3CopySourceKey = attribute.Key("aws.s3.copy_source") // AWSS3UploadIDKey is the attribute Key conforming to the // "aws.s3.upload_id" semantic conventions. It represents the upload ID // that identifies the multipart upload. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ' // Note: The `upload_id` attribute applies to S3 multipart-upload // operations and corresponds to the `--upload-id` parameter // of the [S3 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) // multipart operations. // This applies in particular to the following operations: // // - // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) // - // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) // - // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) // - // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) // - // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) AWSS3UploadIDKey = attribute.Key("aws.s3.upload_id") // AWSS3DeleteKey is the attribute Key conforming to the "aws.s3.delete" // semantic conventions. It represents the delete request container that // specifies the objects to be deleted. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: // 'Objects=[{Key=string,VersionID=string},{Key=string,VersionID=string}],Quiet=boolean' // Note: The `delete` attribute is only applicable to the // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) // operation. // The `delete` attribute corresponds to the `--delete` parameter of the // [delete-objects operation within the S3 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html). AWSS3DeleteKey = attribute.Key("aws.s3.delete") // AWSS3PartNumberKey is the attribute Key conforming to the // "aws.s3.part_number" semantic conventions. It represents the part number // of the part being uploaded in a multipart-upload operation. This is a // positive integer between 1 and 10,000. // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 3456 // Note: The `part_number` attribute is only applicable to the // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) // and // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) // operations. // The `part_number` attribute corresponds to the `--part-number` parameter // of the // [upload-part operation within the S3 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html). AWSS3PartNumberKey = attribute.Key("aws.s3.part_number") ) // AWSS3Bucket returns an attribute KeyValue conforming to the // "aws.s3.bucket" semantic conventions. It represents the S3 bucket name the // request refers to. Corresponds to the `--bucket` parameter of the [S3 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) // operations. func AWSS3Bucket(val string) attribute.KeyValue { return AWSS3BucketKey.String(val) } // AWSS3Key returns an attribute KeyValue conforming to the "aws.s3.key" // semantic conventions. It represents the S3 object key the request refers to. // Corresponds to the `--key` parameter of the [S3 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) // operations. func AWSS3Key(val string) attribute.KeyValue { return AWSS3KeyKey.String(val) } // AWSS3CopySource returns an attribute KeyValue conforming to the // "aws.s3.copy_source" semantic conventions. It represents the source object // (in the form `bucket`/`key`) for the copy operation. func AWSS3CopySource(val string) attribute.KeyValue { return AWSS3CopySourceKey.String(val) } // AWSS3UploadID returns an attribute KeyValue conforming to the // "aws.s3.upload_id" semantic conventions. It represents the upload ID that // identifies the multipart upload. func AWSS3UploadID(val string) attribute.KeyValue { return AWSS3UploadIDKey.String(val) } // AWSS3Delete returns an attribute KeyValue conforming to the // "aws.s3.delete" semantic conventions. It represents the delete request // container that specifies the objects to be deleted. func AWSS3Delete(val string) attribute.KeyValue { return AWSS3DeleteKey.String(val) } // AWSS3PartNumber returns an attribute KeyValue conforming to the // "aws.s3.part_number" semantic conventions. It represents the part number of // the part being uploaded in a multipart-upload operation. This is a positive // integer between 1 and 10,000. func AWSS3PartNumber(val int) attribute.KeyValue { return AWSS3PartNumberKey.Int(val) } // Semantic conventions to apply when instrumenting the GraphQL implementation. // They map GraphQL operations to attributes on a Span. const ( // GraphqlOperationNameKey is the attribute Key conforming to the // "graphql.operation.name" semantic conventions. It represents the name of // the operation being executed. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'findBookByID' GraphqlOperationNameKey = attribute.Key("graphql.operation.name") // GraphqlOperationTypeKey is the attribute Key conforming to the // "graphql.operation.type" semantic conventions. It represents the type of // the operation being executed. // // Type: Enum // RequirementLevel: Optional // Stability: stable // Examples: 'query', 'mutation', 'subscription' GraphqlOperationTypeKey = attribute.Key("graphql.operation.type") // GraphqlDocumentKey is the attribute Key conforming to the // "graphql.document" semantic conventions. It represents the GraphQL // document being executed. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'query findBookByID { bookByID(id: ?) { name } }' // Note: The value may be sanitized to exclude sensitive information. GraphqlDocumentKey = attribute.Key("graphql.document") ) var ( // GraphQL query GraphqlOperationTypeQuery = GraphqlOperationTypeKey.String("query") // GraphQL mutation GraphqlOperationTypeMutation = GraphqlOperationTypeKey.String("mutation") // GraphQL subscription GraphqlOperationTypeSubscription = GraphqlOperationTypeKey.String("subscription") ) // GraphqlOperationName returns an attribute KeyValue conforming to the // "graphql.operation.name" semantic conventions. It represents the name of the // operation being executed. func GraphqlOperationName(val string) attribute.KeyValue { return GraphqlOperationNameKey.String(val) } // GraphqlDocument returns an attribute KeyValue conforming to the // "graphql.document" semantic conventions. It represents the GraphQL document // being executed. func GraphqlDocument(val string) attribute.KeyValue { return GraphqlDocumentKey.String(val) } // General attributes used in messaging systems. const ( // MessagingSystemKey is the attribute Key conforming to the // "messaging.system" semantic conventions. It represents a string // identifying the messaging system. // // Type: string // RequirementLevel: Required // Stability: stable // Examples: 'kafka', 'rabbitmq', 'rocketmq', 'activemq', 'AmazonSQS' MessagingSystemKey = attribute.Key("messaging.system") // MessagingOperationKey is the attribute Key conforming to the // "messaging.operation" semantic conventions. It represents a string // identifying the kind of messaging operation as defined in the [Operation // names](#operation-names) section above. // // Type: Enum // RequirementLevel: Required // Stability: stable // Note: If a custom value is used, it MUST be of low cardinality. MessagingOperationKey = attribute.Key("messaging.operation") // MessagingBatchMessageCountKey is the attribute Key conforming to the // "messaging.batch.message_count" semantic conventions. It represents the // number of messages sent, received, or processed in the scope of the // batching operation. // // Type: int // RequirementLevel: ConditionallyRequired (If the span describes an // operation on a batch of messages.) // Stability: stable // Examples: 0, 1, 2 // Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on // spans that operate with a single message. When a messaging client // library supports both batch and single-message API for the same // operation, instrumentations SHOULD use `messaging.batch.message_count` // for batching APIs and SHOULD NOT use it for single-message APIs. MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count") ) var ( // publish MessagingOperationPublish = MessagingOperationKey.String("publish") // receive MessagingOperationReceive = MessagingOperationKey.String("receive") // process MessagingOperationProcess = MessagingOperationKey.String("process") ) // MessagingSystem returns an attribute KeyValue conforming to the // "messaging.system" semantic conventions. It represents a string identifying // the messaging system. func MessagingSystem(val string) attribute.KeyValue { return MessagingSystemKey.String(val) } // MessagingBatchMessageCount returns an attribute KeyValue conforming to // the "messaging.batch.message_count" semantic conventions. It represents the // number of messages sent, received, or processed in the scope of the batching // operation. func MessagingBatchMessageCount(val int) attribute.KeyValue { return MessagingBatchMessageCountKey.Int(val) } // Semantic convention for a consumer of messages received from a messaging // system const ( // MessagingConsumerIDKey is the attribute Key conforming to the // "messaging.consumer.id" semantic conventions. It represents the // identifier for the consumer receiving a message. For Kafka, set it to // `{messaging.kafka.consumer.group} - {messaging.kafka.client_id}`, if // both are present, or only `messaging.kafka.consumer.group`. For brokers, // such as RabbitMQ and Artemis, set it to the `client_id` of the client // consuming the message. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'mygroup - client-6' MessagingConsumerIDKey = attribute.Key("messaging.consumer.id") ) // MessagingConsumerID returns an attribute KeyValue conforming to the // "messaging.consumer.id" semantic conventions. It represents the identifier // for the consumer receiving a message. For Kafka, set it to // `{messaging.kafka.consumer.group} - {messaging.kafka.client_id}`, if both // are present, or only `messaging.kafka.consumer.group`. For brokers, such as // RabbitMQ and Artemis, set it to the `client_id` of the client consuming the // message. func MessagingConsumerID(val string) attribute.KeyValue { return MessagingConsumerIDKey.String(val) } // Semantic conventions for remote procedure calls. const ( // RPCSystemKey is the attribute Key conforming to the "rpc.system" // semantic conventions. It represents a string identifying the remoting // system. See below for a list of well-known identifiers. // // Type: Enum // RequirementLevel: Required // Stability: stable RPCSystemKey = attribute.Key("rpc.system") // RPCServiceKey is the attribute Key conforming to the "rpc.service" // semantic conventions. It represents the full (logical) name of the // service being called, including its package name, if applicable. // // Type: string // RequirementLevel: Recommended // Stability: stable // Examples: 'myservice.EchoService' // Note: This is the logical name of the service from the RPC interface // perspective, which can be different from the name of any implementing // class. The `code.namespace` attribute may be used to store the latter // (despite the attribute name, it may include a class name; e.g., class // with method actually executing the call on the server side, RPC client // stub class on the client side). RPCServiceKey = attribute.Key("rpc.service") // RPCMethodKey is the attribute Key conforming to the "rpc.method" // semantic conventions. It represents the name of the (logical) method // being called, must be equal to the $method part in the span name. // // Type: string // RequirementLevel: Recommended // Stability: stable // Examples: 'exampleMethod' // Note: This is the logical name of the method from the RPC interface // perspective, which can be different from the name of any implementing // method/function. The `code.function` attribute may be used to store the // latter (e.g., method actually executing the call on the server side, RPC // client stub method on the client side). RPCMethodKey = attribute.Key("rpc.method") ) var ( // gRPC RPCSystemGRPC = RPCSystemKey.String("grpc") // Java RMI RPCSystemJavaRmi = RPCSystemKey.String("java_rmi") // .NET WCF RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf") // Apache Dubbo RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo") // Connect RPC RPCSystemConnectRPC = RPCSystemKey.String("connect_rpc") ) // RPCService returns an attribute KeyValue conforming to the "rpc.service" // semantic conventions. It represents the full (logical) name of the service // being called, including its package name, if applicable. func RPCService(val string) attribute.KeyValue { return RPCServiceKey.String(val) } // RPCMethod returns an attribute KeyValue conforming to the "rpc.method" // semantic conventions. It represents the name of the (logical) method being // called, must be equal to the $method part in the span name. func RPCMethod(val string) attribute.KeyValue { return RPCMethodKey.String(val) } // Tech-specific attributes for gRPC. const ( // RPCGRPCStatusCodeKey is the attribute Key conforming to the // "rpc.grpc.status_code" semantic conventions. It represents the [numeric // status // code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of // the gRPC request. // // Type: Enum // RequirementLevel: Required // Stability: stable RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code") ) var ( // OK RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0) // CANCELLED RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1) // UNKNOWN RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2) // INVALID_ARGUMENT RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3) // DEADLINE_EXCEEDED RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4) // NOT_FOUND RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5) // ALREADY_EXISTS RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6) // PERMISSION_DENIED RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7) // RESOURCE_EXHAUSTED RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8) // FAILED_PRECONDITION RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9) // ABORTED RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10) // OUT_OF_RANGE RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11) // UNIMPLEMENTED RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12) // INTERNAL RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13) // UNAVAILABLE RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14) // DATA_LOSS RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15) // UNAUTHENTICATED RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16) ) // Tech-specific attributes for [JSON RPC](https://www.jsonrpc.org/). const ( // RPCJsonrpcVersionKey is the attribute Key conforming to the // "rpc.jsonrpc.version" semantic conventions. It represents the protocol // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 // does not specify this, the value can be omitted. // // Type: string // RequirementLevel: ConditionallyRequired (If other than the default // version (`1.0`)) // Stability: stable // Examples: '2.0', '1.0' RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version") // RPCJsonrpcRequestIDKey is the attribute Key conforming to the // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` // property of request or response. Since protocol allows id to be int, // string, `null` or missing (for notifications), value is expected to be // cast to string for simplicity. Use empty string in case of `null` value. // Omit entirely if this is a notification. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '10', 'request-7', '' RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id") // RPCJsonrpcErrorCodeKey is the attribute Key conforming to the // "rpc.jsonrpc.error_code" semantic conventions. It represents the // `error.code` property of response if it is an error response. // // Type: int // RequirementLevel: ConditionallyRequired (If response is not successful.) // Stability: stable // Examples: -32700, 100 RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code") // RPCJsonrpcErrorMessageKey is the attribute Key conforming to the // "rpc.jsonrpc.error_message" semantic conventions. It represents the // `error.message` property of response if it is an error response. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'Parse error', 'User already exists' RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message") ) // RPCJsonrpcVersion returns an attribute KeyValue conforming to the // "rpc.jsonrpc.version" semantic conventions. It represents the protocol // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 // does not specify this, the value can be omitted. func RPCJsonrpcVersion(val string) attribute.KeyValue { return RPCJsonrpcVersionKey.String(val) } // RPCJsonrpcRequestID returns an attribute KeyValue conforming to the // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` // property of request or response. Since protocol allows id to be int, string, // `null` or missing (for notifications), value is expected to be cast to // string for simplicity. Use empty string in case of `null` value. Omit // entirely if this is a notification. func RPCJsonrpcRequestID(val string) attribute.KeyValue { return RPCJsonrpcRequestIDKey.String(val) } // RPCJsonrpcErrorCode returns an attribute KeyValue conforming to the // "rpc.jsonrpc.error_code" semantic conventions. It represents the // `error.code` property of response if it is an error response. func RPCJsonrpcErrorCode(val int) attribute.KeyValue { return RPCJsonrpcErrorCodeKey.Int(val) } // RPCJsonrpcErrorMessage returns an attribute KeyValue conforming to the // "rpc.jsonrpc.error_message" semantic conventions. It represents the // `error.message` property of response if it is an error response. func RPCJsonrpcErrorMessage(val string) attribute.KeyValue { return RPCJsonrpcErrorMessageKey.String(val) } // Tech-specific attributes for Connect RPC. const ( // RPCConnectRPCErrorCodeKey is the attribute Key conforming to the // "rpc.connect_rpc.error_code" semantic conventions. It represents the // [error codes](https://connect.build/docs/protocol/#error-codes) of the // Connect request. Error codes are always string values. // // Type: Enum // RequirementLevel: ConditionallyRequired (If response is not successful // and if error code available.) // Stability: stable RPCConnectRPCErrorCodeKey = attribute.Key("rpc.connect_rpc.error_code") ) var ( // cancelled RPCConnectRPCErrorCodeCancelled = RPCConnectRPCErrorCodeKey.String("cancelled") // unknown RPCConnectRPCErrorCodeUnknown = RPCConnectRPCErrorCodeKey.String("unknown") // invalid_argument RPCConnectRPCErrorCodeInvalidArgument = RPCConnectRPCErrorCodeKey.String("invalid_argument") // deadline_exceeded RPCConnectRPCErrorCodeDeadlineExceeded = RPCConnectRPCErrorCodeKey.String("deadline_exceeded") // not_found RPCConnectRPCErrorCodeNotFound = RPCConnectRPCErrorCodeKey.String("not_found") // already_exists RPCConnectRPCErrorCodeAlreadyExists = RPCConnectRPCErrorCodeKey.String("already_exists") // permission_denied RPCConnectRPCErrorCodePermissionDenied = RPCConnectRPCErrorCodeKey.String("permission_denied") // resource_exhausted RPCConnectRPCErrorCodeResourceExhausted = RPCConnectRPCErrorCodeKey.String("resource_exhausted") // failed_precondition RPCConnectRPCErrorCodeFailedPrecondition = RPCConnectRPCErrorCodeKey.String("failed_precondition") // aborted RPCConnectRPCErrorCodeAborted = RPCConnectRPCErrorCodeKey.String("aborted") // out_of_range RPCConnectRPCErrorCodeOutOfRange = RPCConnectRPCErrorCodeKey.String("out_of_range") // unimplemented RPCConnectRPCErrorCodeUnimplemented = RPCConnectRPCErrorCodeKey.String("unimplemented") // internal RPCConnectRPCErrorCodeInternal = RPCConnectRPCErrorCodeKey.String("internal") // unavailable RPCConnectRPCErrorCodeUnavailable = RPCConnectRPCErrorCodeKey.String("unavailable") // data_loss RPCConnectRPCErrorCodeDataLoss = RPCConnectRPCErrorCodeKey.String("data_loss") // unauthenticated RPCConnectRPCErrorCodeUnauthenticated = RPCConnectRPCErrorCodeKey.String("unauthenticated") ) ================================================ FILE: vendor/go.opentelemetry.io/otel/semconv/v1.24.0/README.md ================================================ # Semconv v1.24.0 [![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/semconv/v1.24.0)](https://pkg.go.dev/go.opentelemetry.io/otel/semconv/v1.24.0) ================================================ FILE: vendor/go.opentelemetry.io/otel/semconv/v1.24.0/attribute_group.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 // Code generated from semantic convention specification. DO NOT EDIT. package semconv // import "go.opentelemetry.io/otel/semconv/v1.24.0" import "go.opentelemetry.io/otel/attribute" // Describes FaaS attributes. const ( // FaaSInvokedNameKey is the attribute Key conforming to the // "faas.invoked_name" semantic conventions. It represents the name of the // invoked function. // // Type: string // RequirementLevel: Required // Stability: experimental // Examples: 'my-function' // Note: SHOULD be equal to the `faas.name` resource attribute of the // invoked function. FaaSInvokedNameKey = attribute.Key("faas.invoked_name") // FaaSInvokedProviderKey is the attribute Key conforming to the // "faas.invoked_provider" semantic conventions. It represents the cloud // provider of the invoked function. // // Type: Enum // RequirementLevel: Required // Stability: experimental // Note: SHOULD be equal to the `cloud.provider` resource attribute of the // invoked function. FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider") // FaaSInvokedRegionKey is the attribute Key conforming to the // "faas.invoked_region" semantic conventions. It represents the cloud // region of the invoked function. // // Type: string // RequirementLevel: ConditionallyRequired (For some cloud providers, like // AWS or GCP, the region in which a function is hosted is essential to // uniquely identify the function and also part of its endpoint. Since it's // part of the endpoint being called, the region is always known to // clients. In these cases, `faas.invoked_region` MUST be set accordingly. // If the region is unknown to the client or not required for identifying // the invoked function, setting `faas.invoked_region` is optional.) // Stability: experimental // Examples: 'eu-central-1' // Note: SHOULD be equal to the `cloud.region` resource attribute of the // invoked function. FaaSInvokedRegionKey = attribute.Key("faas.invoked_region") // FaaSTriggerKey is the attribute Key conforming to the "faas.trigger" // semantic conventions. It represents the type of the trigger which caused // this function invocation. // // Type: Enum // RequirementLevel: Optional // Stability: experimental FaaSTriggerKey = attribute.Key("faas.trigger") ) var ( // Alibaba Cloud FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud") // Amazon Web Services FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws") // Microsoft Azure FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure") // Google Cloud Platform FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp") // Tencent Cloud FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud") ) var ( // A response to some data source operation such as a database or filesystem read/write FaaSTriggerDatasource = FaaSTriggerKey.String("datasource") // To provide an answer to an inbound HTTP request FaaSTriggerHTTP = FaaSTriggerKey.String("http") // A function is set to be executed when messages are sent to a messaging system FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub") // A function is scheduled to be executed regularly FaaSTriggerTimer = FaaSTriggerKey.String("timer") // If none of the others apply FaaSTriggerOther = FaaSTriggerKey.String("other") ) // FaaSInvokedName returns an attribute KeyValue conforming to the // "faas.invoked_name" semantic conventions. It represents the name of the // invoked function. func FaaSInvokedName(val string) attribute.KeyValue { return FaaSInvokedNameKey.String(val) } // FaaSInvokedRegion returns an attribute KeyValue conforming to the // "faas.invoked_region" semantic conventions. It represents the cloud region // of the invoked function. func FaaSInvokedRegion(val string) attribute.KeyValue { return FaaSInvokedRegionKey.String(val) } // Attributes for Events represented using Log Records. const ( // EventNameKey is the attribute Key conforming to the "event.name" // semantic conventions. It represents the identifies the class / type of // event. // // Type: string // RequirementLevel: Required // Stability: experimental // Examples: 'browser.mouse.click', 'device.app.lifecycle' // Note: Event names are subject to the same rules as [attribute // names](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/common/attribute-naming.md). // Notably, event names are namespaced to avoid collisions and provide a // clean separation of semantics for events in separate domains like // browser, mobile, and kubernetes. EventNameKey = attribute.Key("event.name") ) // EventName returns an attribute KeyValue conforming to the "event.name" // semantic conventions. It represents the identifies the class / type of // event. func EventName(val string) attribute.KeyValue { return EventNameKey.String(val) } // The attributes described in this section are rather generic. They may be // used in any Log Record they apply to. const ( // LogRecordUIDKey is the attribute Key conforming to the "log.record.uid" // semantic conventions. It represents a unique identifier for the Log // Record. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '01ARZ3NDEKTSV4RRFFQ69G5FAV' // Note: If an id is provided, other log records with the same id will be // considered duplicates and can be removed safely. This means, that two // distinguishable log records MUST have different values. // The id MAY be an [Universally Unique Lexicographically Sortable // Identifier (ULID)](https://github.com/ulid/spec), but other identifiers // (e.g. UUID) may be used as needed. LogRecordUIDKey = attribute.Key("log.record.uid") ) // LogRecordUID returns an attribute KeyValue conforming to the // "log.record.uid" semantic conventions. It represents a unique identifier for // the Log Record. func LogRecordUID(val string) attribute.KeyValue { return LogRecordUIDKey.String(val) } // Describes Log attributes const ( // LogIostreamKey is the attribute Key conforming to the "log.iostream" // semantic conventions. It represents the stream associated with the log. // See below for a list of well-known values. // // Type: Enum // RequirementLevel: Optional // Stability: experimental LogIostreamKey = attribute.Key("log.iostream") ) var ( // Logs from stdout stream LogIostreamStdout = LogIostreamKey.String("stdout") // Events from stderr stream LogIostreamStderr = LogIostreamKey.String("stderr") ) // A file to which log was emitted. const ( // LogFileNameKey is the attribute Key conforming to the "log.file.name" // semantic conventions. It represents the basename of the file. // // Type: string // RequirementLevel: Recommended // Stability: experimental // Examples: 'audit.log' LogFileNameKey = attribute.Key("log.file.name") // LogFileNameResolvedKey is the attribute Key conforming to the // "log.file.name_resolved" semantic conventions. It represents the // basename of the file, with symlinks resolved. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'uuid.log' LogFileNameResolvedKey = attribute.Key("log.file.name_resolved") // LogFilePathKey is the attribute Key conforming to the "log.file.path" // semantic conventions. It represents the full path to the file. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '/var/log/mysql/audit.log' LogFilePathKey = attribute.Key("log.file.path") // LogFilePathResolvedKey is the attribute Key conforming to the // "log.file.path_resolved" semantic conventions. It represents the full // path to the file, with symlinks resolved. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '/var/lib/docker/uuid.log' LogFilePathResolvedKey = attribute.Key("log.file.path_resolved") ) // LogFileName returns an attribute KeyValue conforming to the // "log.file.name" semantic conventions. It represents the basename of the // file. func LogFileName(val string) attribute.KeyValue { return LogFileNameKey.String(val) } // LogFileNameResolved returns an attribute KeyValue conforming to the // "log.file.name_resolved" semantic conventions. It represents the basename of // the file, with symlinks resolved. func LogFileNameResolved(val string) attribute.KeyValue { return LogFileNameResolvedKey.String(val) } // LogFilePath returns an attribute KeyValue conforming to the // "log.file.path" semantic conventions. It represents the full path to the // file. func LogFilePath(val string) attribute.KeyValue { return LogFilePathKey.String(val) } // LogFilePathResolved returns an attribute KeyValue conforming to the // "log.file.path_resolved" semantic conventions. It represents the full path // to the file, with symlinks resolved. func LogFilePathResolved(val string) attribute.KeyValue { return LogFilePathResolvedKey.String(val) } // Describes Database attributes const ( // PoolNameKey is the attribute Key conforming to the "pool.name" semantic // conventions. It represents the name of the connection pool; unique // within the instrumented application. In case the connection pool // implementation doesn't provide a name, then the // [db.connection_string](/docs/database/database-spans.md#connection-level-attributes) // should be used // // Type: string // RequirementLevel: Required // Stability: experimental // Examples: 'myDataSource' PoolNameKey = attribute.Key("pool.name") // StateKey is the attribute Key conforming to the "state" semantic // conventions. It represents the state of a connection in the pool // // Type: Enum // RequirementLevel: Required // Stability: experimental // Examples: 'idle' StateKey = attribute.Key("state") ) var ( // idle StateIdle = StateKey.String("idle") // used StateUsed = StateKey.String("used") ) // PoolName returns an attribute KeyValue conforming to the "pool.name" // semantic conventions. It represents the name of the connection pool; unique // within the instrumented application. In case the connection pool // implementation doesn't provide a name, then the // [db.connection_string](/docs/database/database-spans.md#connection-level-attributes) // should be used func PoolName(val string) attribute.KeyValue { return PoolNameKey.String(val) } // ASP.NET Core attributes const ( // AspnetcoreDiagnosticsHandlerTypeKey is the attribute Key conforming to // the "aspnetcore.diagnostics.handler.type" semantic conventions. It // represents the full type name of the // [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler) // implementation that handled the exception. // // Type: string // RequirementLevel: ConditionallyRequired (if and only if the exception // was handled by this handler.) // Stability: experimental // Examples: 'Contoso.MyHandler' AspnetcoreDiagnosticsHandlerTypeKey = attribute.Key("aspnetcore.diagnostics.handler.type") // AspnetcoreRateLimitingPolicyKey is the attribute Key conforming to the // "aspnetcore.rate_limiting.policy" semantic conventions. It represents // the rate limiting policy name. // // Type: string // RequirementLevel: ConditionallyRequired (if the matched endpoint for the // request had a rate-limiting policy.) // Stability: experimental // Examples: 'fixed', 'sliding', 'token' AspnetcoreRateLimitingPolicyKey = attribute.Key("aspnetcore.rate_limiting.policy") // AspnetcoreRateLimitingResultKey is the attribute Key conforming to the // "aspnetcore.rate_limiting.result" semantic conventions. It represents // the rate-limiting result, shows whether the lease was acquired or // contains a rejection reason // // Type: Enum // RequirementLevel: Required // Stability: experimental // Examples: 'acquired', 'request_canceled' AspnetcoreRateLimitingResultKey = attribute.Key("aspnetcore.rate_limiting.result") // AspnetcoreRequestIsUnhandledKey is the attribute Key conforming to the // "aspnetcore.request.is_unhandled" semantic conventions. It represents // the flag indicating if request was handled by the application pipeline. // // Type: boolean // RequirementLevel: ConditionallyRequired (if and only if the request was // not handled.) // Stability: experimental // Examples: True AspnetcoreRequestIsUnhandledKey = attribute.Key("aspnetcore.request.is_unhandled") // AspnetcoreRoutingIsFallbackKey is the attribute Key conforming to the // "aspnetcore.routing.is_fallback" semantic conventions. It represents a // value that indicates whether the matched route is a fallback route. // // Type: boolean // RequirementLevel: ConditionallyRequired (If and only if a route was // successfully matched.) // Stability: experimental // Examples: True AspnetcoreRoutingIsFallbackKey = attribute.Key("aspnetcore.routing.is_fallback") ) var ( // Lease was acquired AspnetcoreRateLimitingResultAcquired = AspnetcoreRateLimitingResultKey.String("acquired") // Lease request was rejected by the endpoint limiter AspnetcoreRateLimitingResultEndpointLimiter = AspnetcoreRateLimitingResultKey.String("endpoint_limiter") // Lease request was rejected by the global limiter AspnetcoreRateLimitingResultGlobalLimiter = AspnetcoreRateLimitingResultKey.String("global_limiter") // Lease request was canceled AspnetcoreRateLimitingResultRequestCanceled = AspnetcoreRateLimitingResultKey.String("request_canceled") ) // AspnetcoreDiagnosticsHandlerType returns an attribute KeyValue conforming // to the "aspnetcore.diagnostics.handler.type" semantic conventions. It // represents the full type name of the // [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler) // implementation that handled the exception. func AspnetcoreDiagnosticsHandlerType(val string) attribute.KeyValue { return AspnetcoreDiagnosticsHandlerTypeKey.String(val) } // AspnetcoreRateLimitingPolicy returns an attribute KeyValue conforming to // the "aspnetcore.rate_limiting.policy" semantic conventions. It represents // the rate limiting policy name. func AspnetcoreRateLimitingPolicy(val string) attribute.KeyValue { return AspnetcoreRateLimitingPolicyKey.String(val) } // AspnetcoreRequestIsUnhandled returns an attribute KeyValue conforming to // the "aspnetcore.request.is_unhandled" semantic conventions. It represents // the flag indicating if request was handled by the application pipeline. func AspnetcoreRequestIsUnhandled(val bool) attribute.KeyValue { return AspnetcoreRequestIsUnhandledKey.Bool(val) } // AspnetcoreRoutingIsFallback returns an attribute KeyValue conforming to // the "aspnetcore.routing.is_fallback" semantic conventions. It represents a // value that indicates whether the matched route is a fallback route. func AspnetcoreRoutingIsFallback(val bool) attribute.KeyValue { return AspnetcoreRoutingIsFallbackKey.Bool(val) } // SignalR attributes const ( // SignalrConnectionStatusKey is the attribute Key conforming to the // "signalr.connection.status" semantic conventions. It represents the // signalR HTTP connection closure status. // // Type: Enum // RequirementLevel: Optional // Stability: experimental // Examples: 'app_shutdown', 'timeout' SignalrConnectionStatusKey = attribute.Key("signalr.connection.status") // SignalrTransportKey is the attribute Key conforming to the // "signalr.transport" semantic conventions. It represents the [SignalR // transport // type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md) // // Type: Enum // RequirementLevel: Optional // Stability: experimental // Examples: 'web_sockets', 'long_polling' SignalrTransportKey = attribute.Key("signalr.transport") ) var ( // The connection was closed normally SignalrConnectionStatusNormalClosure = SignalrConnectionStatusKey.String("normal_closure") // The connection was closed due to a timeout SignalrConnectionStatusTimeout = SignalrConnectionStatusKey.String("timeout") // The connection was closed because the app is shutting down SignalrConnectionStatusAppShutdown = SignalrConnectionStatusKey.String("app_shutdown") ) var ( // ServerSentEvents protocol SignalrTransportServerSentEvents = SignalrTransportKey.String("server_sent_events") // LongPolling protocol SignalrTransportLongPolling = SignalrTransportKey.String("long_polling") // WebSockets protocol SignalrTransportWebSockets = SignalrTransportKey.String("web_sockets") ) // Describes JVM buffer metric attributes. const ( // JvmBufferPoolNameKey is the attribute Key conforming to the // "jvm.buffer.pool.name" semantic conventions. It represents the name of // the buffer pool. // // Type: string // RequirementLevel: Recommended // Stability: experimental // Examples: 'mapped', 'direct' // Note: Pool names are generally obtained via // [BufferPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/BufferPoolMXBean.html#getName()). JvmBufferPoolNameKey = attribute.Key("jvm.buffer.pool.name") ) // JvmBufferPoolName returns an attribute KeyValue conforming to the // "jvm.buffer.pool.name" semantic conventions. It represents the name of the // buffer pool. func JvmBufferPoolName(val string) attribute.KeyValue { return JvmBufferPoolNameKey.String(val) } // Describes JVM memory metric attributes. const ( // JvmMemoryPoolNameKey is the attribute Key conforming to the // "jvm.memory.pool.name" semantic conventions. It represents the name of // the memory pool. // // Type: string // RequirementLevel: Recommended // Stability: stable // Examples: 'G1 Old Gen', 'G1 Eden space', 'G1 Survivor Space' // Note: Pool names are generally obtained via // [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()). JvmMemoryPoolNameKey = attribute.Key("jvm.memory.pool.name") // JvmMemoryTypeKey is the attribute Key conforming to the // "jvm.memory.type" semantic conventions. It represents the type of // memory. // // Type: Enum // RequirementLevel: Recommended // Stability: stable // Examples: 'heap', 'non_heap' JvmMemoryTypeKey = attribute.Key("jvm.memory.type") ) var ( // Heap memory JvmMemoryTypeHeap = JvmMemoryTypeKey.String("heap") // Non-heap memory JvmMemoryTypeNonHeap = JvmMemoryTypeKey.String("non_heap") ) // JvmMemoryPoolName returns an attribute KeyValue conforming to the // "jvm.memory.pool.name" semantic conventions. It represents the name of the // memory pool. func JvmMemoryPoolName(val string) attribute.KeyValue { return JvmMemoryPoolNameKey.String(val) } // Describes System metric attributes const ( // SystemDeviceKey is the attribute Key conforming to the "system.device" // semantic conventions. It represents the device identifier // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '(identifier)' SystemDeviceKey = attribute.Key("system.device") ) // SystemDevice returns an attribute KeyValue conforming to the // "system.device" semantic conventions. It represents the device identifier func SystemDevice(val string) attribute.KeyValue { return SystemDeviceKey.String(val) } // Describes System CPU metric attributes const ( // SystemCPULogicalNumberKey is the attribute Key conforming to the // "system.cpu.logical_number" semantic conventions. It represents the // logical CPU number [0..n-1] // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 1 SystemCPULogicalNumberKey = attribute.Key("system.cpu.logical_number") // SystemCPUStateKey is the attribute Key conforming to the // "system.cpu.state" semantic conventions. It represents the state of the // CPU // // Type: Enum // RequirementLevel: Optional // Stability: experimental // Examples: 'idle', 'interrupt' SystemCPUStateKey = attribute.Key("system.cpu.state") ) var ( // user SystemCPUStateUser = SystemCPUStateKey.String("user") // system SystemCPUStateSystem = SystemCPUStateKey.String("system") // nice SystemCPUStateNice = SystemCPUStateKey.String("nice") // idle SystemCPUStateIdle = SystemCPUStateKey.String("idle") // iowait SystemCPUStateIowait = SystemCPUStateKey.String("iowait") // interrupt SystemCPUStateInterrupt = SystemCPUStateKey.String("interrupt") // steal SystemCPUStateSteal = SystemCPUStateKey.String("steal") ) // SystemCPULogicalNumber returns an attribute KeyValue conforming to the // "system.cpu.logical_number" semantic conventions. It represents the logical // CPU number [0..n-1] func SystemCPULogicalNumber(val int) attribute.KeyValue { return SystemCPULogicalNumberKey.Int(val) } // Describes System Memory metric attributes const ( // SystemMemoryStateKey is the attribute Key conforming to the // "system.memory.state" semantic conventions. It represents the memory // state // // Type: Enum // RequirementLevel: Optional // Stability: experimental // Examples: 'free', 'cached' SystemMemoryStateKey = attribute.Key("system.memory.state") ) var ( // used SystemMemoryStateUsed = SystemMemoryStateKey.String("used") // free SystemMemoryStateFree = SystemMemoryStateKey.String("free") // shared SystemMemoryStateShared = SystemMemoryStateKey.String("shared") // buffers SystemMemoryStateBuffers = SystemMemoryStateKey.String("buffers") // cached SystemMemoryStateCached = SystemMemoryStateKey.String("cached") ) // Describes System Memory Paging metric attributes const ( // SystemPagingDirectionKey is the attribute Key conforming to the // "system.paging.direction" semantic conventions. It represents the paging // access direction // // Type: Enum // RequirementLevel: Optional // Stability: experimental // Examples: 'in' SystemPagingDirectionKey = attribute.Key("system.paging.direction") // SystemPagingStateKey is the attribute Key conforming to the // "system.paging.state" semantic conventions. It represents the memory // paging state // // Type: Enum // RequirementLevel: Optional // Stability: experimental // Examples: 'free' SystemPagingStateKey = attribute.Key("system.paging.state") // SystemPagingTypeKey is the attribute Key conforming to the // "system.paging.type" semantic conventions. It represents the memory // paging type // // Type: Enum // RequirementLevel: Optional // Stability: experimental // Examples: 'minor' SystemPagingTypeKey = attribute.Key("system.paging.type") ) var ( // in SystemPagingDirectionIn = SystemPagingDirectionKey.String("in") // out SystemPagingDirectionOut = SystemPagingDirectionKey.String("out") ) var ( // used SystemPagingStateUsed = SystemPagingStateKey.String("used") // free SystemPagingStateFree = SystemPagingStateKey.String("free") ) var ( // major SystemPagingTypeMajor = SystemPagingTypeKey.String("major") // minor SystemPagingTypeMinor = SystemPagingTypeKey.String("minor") ) // Describes Filesystem metric attributes const ( // SystemFilesystemModeKey is the attribute Key conforming to the // "system.filesystem.mode" semantic conventions. It represents the // filesystem mode // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'rw, ro' SystemFilesystemModeKey = attribute.Key("system.filesystem.mode") // SystemFilesystemMountpointKey is the attribute Key conforming to the // "system.filesystem.mountpoint" semantic conventions. It represents the // filesystem mount path // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '/mnt/data' SystemFilesystemMountpointKey = attribute.Key("system.filesystem.mountpoint") // SystemFilesystemStateKey is the attribute Key conforming to the // "system.filesystem.state" semantic conventions. It represents the // filesystem state // // Type: Enum // RequirementLevel: Optional // Stability: experimental // Examples: 'used' SystemFilesystemStateKey = attribute.Key("system.filesystem.state") // SystemFilesystemTypeKey is the attribute Key conforming to the // "system.filesystem.type" semantic conventions. It represents the // filesystem type // // Type: Enum // RequirementLevel: Optional // Stability: experimental // Examples: 'ext4' SystemFilesystemTypeKey = attribute.Key("system.filesystem.type") ) var ( // used SystemFilesystemStateUsed = SystemFilesystemStateKey.String("used") // free SystemFilesystemStateFree = SystemFilesystemStateKey.String("free") // reserved SystemFilesystemStateReserved = SystemFilesystemStateKey.String("reserved") ) var ( // fat32 SystemFilesystemTypeFat32 = SystemFilesystemTypeKey.String("fat32") // exfat SystemFilesystemTypeExfat = SystemFilesystemTypeKey.String("exfat") // ntfs SystemFilesystemTypeNtfs = SystemFilesystemTypeKey.String("ntfs") // refs SystemFilesystemTypeRefs = SystemFilesystemTypeKey.String("refs") // hfsplus SystemFilesystemTypeHfsplus = SystemFilesystemTypeKey.String("hfsplus") // ext4 SystemFilesystemTypeExt4 = SystemFilesystemTypeKey.String("ext4") ) // SystemFilesystemMode returns an attribute KeyValue conforming to the // "system.filesystem.mode" semantic conventions. It represents the filesystem // mode func SystemFilesystemMode(val string) attribute.KeyValue { return SystemFilesystemModeKey.String(val) } // SystemFilesystemMountpoint returns an attribute KeyValue conforming to // the "system.filesystem.mountpoint" semantic conventions. It represents the // filesystem mount path func SystemFilesystemMountpoint(val string) attribute.KeyValue { return SystemFilesystemMountpointKey.String(val) } // Describes Network metric attributes const ( // SystemNetworkStateKey is the attribute Key conforming to the // "system.network.state" semantic conventions. It represents a stateless // protocol MUST NOT set this attribute // // Type: Enum // RequirementLevel: Optional // Stability: experimental // Examples: 'close_wait' SystemNetworkStateKey = attribute.Key("system.network.state") ) var ( // close SystemNetworkStateClose = SystemNetworkStateKey.String("close") // close_wait SystemNetworkStateCloseWait = SystemNetworkStateKey.String("close_wait") // closing SystemNetworkStateClosing = SystemNetworkStateKey.String("closing") // delete SystemNetworkStateDelete = SystemNetworkStateKey.String("delete") // established SystemNetworkStateEstablished = SystemNetworkStateKey.String("established") // fin_wait_1 SystemNetworkStateFinWait1 = SystemNetworkStateKey.String("fin_wait_1") // fin_wait_2 SystemNetworkStateFinWait2 = SystemNetworkStateKey.String("fin_wait_2") // last_ack SystemNetworkStateLastAck = SystemNetworkStateKey.String("last_ack") // listen SystemNetworkStateListen = SystemNetworkStateKey.String("listen") // syn_recv SystemNetworkStateSynRecv = SystemNetworkStateKey.String("syn_recv") // syn_sent SystemNetworkStateSynSent = SystemNetworkStateKey.String("syn_sent") // time_wait SystemNetworkStateTimeWait = SystemNetworkStateKey.String("time_wait") ) // Describes System Process metric attributes const ( // SystemProcessesStatusKey is the attribute Key conforming to the // "system.processes.status" semantic conventions. It represents the // process state, e.g., [Linux Process State // Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) // // Type: Enum // RequirementLevel: Optional // Stability: experimental // Examples: 'running' SystemProcessesStatusKey = attribute.Key("system.processes.status") ) var ( // running SystemProcessesStatusRunning = SystemProcessesStatusKey.String("running") // sleeping SystemProcessesStatusSleeping = SystemProcessesStatusKey.String("sleeping") // stopped SystemProcessesStatusStopped = SystemProcessesStatusKey.String("stopped") // defunct SystemProcessesStatusDefunct = SystemProcessesStatusKey.String("defunct") ) // These attributes may be used to describe the client in a connection-based // network interaction where there is one side that initiates the connection // (the client is the side that initiates the connection). This covers all TCP // network interactions since TCP is connection-based and one side initiates // the connection (an exception is made for peer-to-peer communication over TCP // where the "user-facing" surface of the protocol / API doesn't expose a clear // notion of client and server). This also covers UDP network interactions // where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS. const ( // ClientAddressKey is the attribute Key conforming to the "client.address" // semantic conventions. It represents the client address - domain name if // available without reverse DNS lookup; otherwise, IP address or Unix // domain socket name. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'client.example.com', '10.1.2.80', '/tmp/my.sock' // Note: When observed from the server side, and when communicating through // an intermediary, `client.address` SHOULD represent the client address // behind any intermediaries, for example proxies, if it's available. ClientAddressKey = attribute.Key("client.address") // ClientPortKey is the attribute Key conforming to the "client.port" // semantic conventions. It represents the client port number. // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 65123 // Note: When observed from the server side, and when communicating through // an intermediary, `client.port` SHOULD represent the client port behind // any intermediaries, for example proxies, if it's available. ClientPortKey = attribute.Key("client.port") ) // ClientAddress returns an attribute KeyValue conforming to the // "client.address" semantic conventions. It represents the client address - // domain name if available without reverse DNS lookup; otherwise, IP address // or Unix domain socket name. func ClientAddress(val string) attribute.KeyValue { return ClientAddressKey.String(val) } // ClientPort returns an attribute KeyValue conforming to the "client.port" // semantic conventions. It represents the client port number. func ClientPort(val int) attribute.KeyValue { return ClientPortKey.Int(val) } // The attributes used to describe telemetry in the context of databases. const ( // DBCassandraConsistencyLevelKey is the attribute Key conforming to the // "db.cassandra.consistency_level" semantic conventions. It represents the // consistency level of the query. Based on consistency values from // [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). // // Type: Enum // RequirementLevel: Optional // Stability: experimental DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level") // DBCassandraCoordinatorDCKey is the attribute Key conforming to the // "db.cassandra.coordinator.dc" semantic conventions. It represents the // data center of the coordinating node for a query. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'us-west-2' DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc") // DBCassandraCoordinatorIDKey is the attribute Key conforming to the // "db.cassandra.coordinator.id" semantic conventions. It represents the ID // of the coordinating node for a query. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af' DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id") // DBCassandraIdempotenceKey is the attribute Key conforming to the // "db.cassandra.idempotence" semantic conventions. It represents the // whether or not the query is idempotent. // // Type: boolean // RequirementLevel: Optional // Stability: experimental DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence") // DBCassandraPageSizeKey is the attribute Key conforming to the // "db.cassandra.page_size" semantic conventions. It represents the fetch // size used for paging, i.e. how many rows will be returned at once. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 5000 DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size") // DBCassandraSpeculativeExecutionCountKey is the attribute Key conforming // to the "db.cassandra.speculative_execution_count" semantic conventions. // It represents the number of times a query was speculatively executed. // Not set or `0` if the query was not executed speculatively. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 0, 2 DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count") // DBCassandraTableKey is the attribute Key conforming to the // "db.cassandra.table" semantic conventions. It represents the name of the // primary Cassandra table that the operation is acting upon, including the // keyspace name (if applicable). // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'mytable' // Note: This mirrors the db.sql.table attribute but references cassandra // rather than sql. It is not recommended to attempt any client-side // parsing of `db.statement` just to get this property, but it should be // set if it is provided by the library being instrumented. If the // operation is acting upon an anonymous table, or more than one table, // this value MUST NOT be set. DBCassandraTableKey = attribute.Key("db.cassandra.table") // DBConnectionStringKey is the attribute Key conforming to the // "db.connection_string" semantic conventions. It represents the // connection string used to connect to the database. It is recommended to // remove embedded credentials. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'Server=(localdb)\\v11.0;Integrated Security=true;' DBConnectionStringKey = attribute.Key("db.connection_string") // DBCosmosDBClientIDKey is the attribute Key conforming to the // "db.cosmosdb.client_id" semantic conventions. It represents the unique // Cosmos client instance id. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '3ba4827d-4422-483f-b59f-85b74211c11d' DBCosmosDBClientIDKey = attribute.Key("db.cosmosdb.client_id") // DBCosmosDBConnectionModeKey is the attribute Key conforming to the // "db.cosmosdb.connection_mode" semantic conventions. It represents the // cosmos client connection mode. // // Type: Enum // RequirementLevel: Optional // Stability: experimental DBCosmosDBConnectionModeKey = attribute.Key("db.cosmosdb.connection_mode") // DBCosmosDBContainerKey is the attribute Key conforming to the // "db.cosmosdb.container" semantic conventions. It represents the cosmos // DB container name. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'anystring' DBCosmosDBContainerKey = attribute.Key("db.cosmosdb.container") // DBCosmosDBOperationTypeKey is the attribute Key conforming to the // "db.cosmosdb.operation_type" semantic conventions. It represents the // cosmosDB Operation Type. // // Type: Enum // RequirementLevel: Optional // Stability: experimental DBCosmosDBOperationTypeKey = attribute.Key("db.cosmosdb.operation_type") // DBCosmosDBRequestChargeKey is the attribute Key conforming to the // "db.cosmosdb.request_charge" semantic conventions. It represents the rU // consumed for that operation // // Type: double // RequirementLevel: Optional // Stability: experimental // Examples: 46.18, 1.0 DBCosmosDBRequestChargeKey = attribute.Key("db.cosmosdb.request_charge") // DBCosmosDBRequestContentLengthKey is the attribute Key conforming to the // "db.cosmosdb.request_content_length" semantic conventions. It represents // the request payload size in bytes // // Type: int // RequirementLevel: Optional // Stability: experimental DBCosmosDBRequestContentLengthKey = attribute.Key("db.cosmosdb.request_content_length") // DBCosmosDBStatusCodeKey is the attribute Key conforming to the // "db.cosmosdb.status_code" semantic conventions. It represents the cosmos // DB status code. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 200, 201 DBCosmosDBStatusCodeKey = attribute.Key("db.cosmosdb.status_code") // DBCosmosDBSubStatusCodeKey is the attribute Key conforming to the // "db.cosmosdb.sub_status_code" semantic conventions. It represents the // cosmos DB sub status code. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 1000, 1002 DBCosmosDBSubStatusCodeKey = attribute.Key("db.cosmosdb.sub_status_code") // DBElasticsearchClusterNameKey is the attribute Key conforming to the // "db.elasticsearch.cluster.name" semantic conventions. It represents the // represents the identifier of an Elasticsearch cluster. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'e9106fc68e3044f0b1475b04bf4ffd5f' DBElasticsearchClusterNameKey = attribute.Key("db.elasticsearch.cluster.name") // DBElasticsearchNodeNameKey is the attribute Key conforming to the // "db.elasticsearch.node.name" semantic conventions. It represents the // represents the human-readable identifier of the node/instance to which a // request was routed. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'instance-0000000001' DBElasticsearchNodeNameKey = attribute.Key("db.elasticsearch.node.name") // DBInstanceIDKey is the attribute Key conforming to the "db.instance.id" // semantic conventions. It represents an identifier (address, unique name, // or any other identifier) of the database instance that is executing // queries or mutations on the current connection. This is useful in cases // where the database is running in a clustered environment and the // instrumentation is able to record the node executing the query. The // client may obtain this value in databases like MySQL using queries like // `select @@hostname`. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'mysql-e26b99z.example.com' DBInstanceIDKey = attribute.Key("db.instance.id") // DBJDBCDriverClassnameKey is the attribute Key conforming to the // "db.jdbc.driver_classname" semantic conventions. It represents the // fully-qualified class name of the [Java Database Connectivity // (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) // driver used to connect. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'org.postgresql.Driver', // 'com.microsoft.sqlserver.jdbc.SQLServerDriver' DBJDBCDriverClassnameKey = attribute.Key("db.jdbc.driver_classname") // DBMongoDBCollectionKey is the attribute Key conforming to the // "db.mongodb.collection" semantic conventions. It represents the MongoDB // collection being accessed within the database stated in `db.name`. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'customers', 'products' DBMongoDBCollectionKey = attribute.Key("db.mongodb.collection") // DBMSSQLInstanceNameKey is the attribute Key conforming to the // "db.mssql.instance_name" semantic conventions. It represents the // Microsoft SQL Server [instance // name](https://docs.microsoft.com/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) // connecting to. This name is used to determine the port of a named // instance. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'MSSQLSERVER' // Note: If setting a `db.mssql.instance_name`, `server.port` is no longer // required (but still recommended if non-standard). DBMSSQLInstanceNameKey = attribute.Key("db.mssql.instance_name") // DBNameKey is the attribute Key conforming to the "db.name" semantic // conventions. It represents the this attribute is used to report the name // of the database being accessed. For commands that switch the database, // this should be set to the target database (even if the command fails). // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'customers', 'main' // Note: In some SQL databases, the database name to be used is called // "schema name". In case there are multiple layers that could be // considered for database name (e.g. Oracle instance name and schema // name), the database name to be used is the more specific layer (e.g. // Oracle schema name). DBNameKey = attribute.Key("db.name") // DBOperationKey is the attribute Key conforming to the "db.operation" // semantic conventions. It represents the name of the operation being // executed, e.g. the [MongoDB command // name](https://docs.mongodb.com/manual/reference/command/#database-operations) // such as `findAndModify`, or the SQL keyword. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'findAndModify', 'HMSET', 'SELECT' // Note: When setting this to an SQL keyword, it is not recommended to // attempt any client-side parsing of `db.statement` just to get this // property, but it should be set if the operation name is provided by the // library being instrumented. If the SQL statement has an ambiguous // operation, or performs more than one operation, this value may be // omitted. DBOperationKey = attribute.Key("db.operation") // DBRedisDBIndexKey is the attribute Key conforming to the // "db.redis.database_index" semantic conventions. It represents the index // of the database being accessed as used in the [`SELECT` // command](https://redis.io/commands/select), provided as an integer. To // be used instead of the generic `db.name` attribute. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 0, 1, 15 DBRedisDBIndexKey = attribute.Key("db.redis.database_index") // DBSQLTableKey is the attribute Key conforming to the "db.sql.table" // semantic conventions. It represents the name of the primary table that // the operation is acting upon, including the database name (if // applicable). // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'public.users', 'customers' // Note: It is not recommended to attempt any client-side parsing of // `db.statement` just to get this property, but it should be set if it is // provided by the library being instrumented. If the operation is acting // upon an anonymous table, or more than one table, this value MUST NOT be // set. DBSQLTableKey = attribute.Key("db.sql.table") // DBStatementKey is the attribute Key conforming to the "db.statement" // semantic conventions. It represents the database statement being // executed. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"' DBStatementKey = attribute.Key("db.statement") // DBSystemKey is the attribute Key conforming to the "db.system" semantic // conventions. It represents an identifier for the database management // system (DBMS) product being used. See below for a list of well-known // identifiers. // // Type: Enum // RequirementLevel: Optional // Stability: experimental DBSystemKey = attribute.Key("db.system") // DBUserKey is the attribute Key conforming to the "db.user" semantic // conventions. It represents the username for accessing the database. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'readonly_user', 'reporting_user' DBUserKey = attribute.Key("db.user") ) var ( // all DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all") // each_quorum DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum") // quorum DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum") // local_quorum DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum") // one DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one") // two DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two") // three DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three") // local_one DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one") // any DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any") // serial DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial") // local_serial DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial") ) var ( // Gateway (HTTP) connections mode DBCosmosDBConnectionModeGateway = DBCosmosDBConnectionModeKey.String("gateway") // Direct connection DBCosmosDBConnectionModeDirect = DBCosmosDBConnectionModeKey.String("direct") ) var ( // invalid DBCosmosDBOperationTypeInvalid = DBCosmosDBOperationTypeKey.String("Invalid") // create DBCosmosDBOperationTypeCreate = DBCosmosDBOperationTypeKey.String("Create") // patch DBCosmosDBOperationTypePatch = DBCosmosDBOperationTypeKey.String("Patch") // read DBCosmosDBOperationTypeRead = DBCosmosDBOperationTypeKey.String("Read") // read_feed DBCosmosDBOperationTypeReadFeed = DBCosmosDBOperationTypeKey.String("ReadFeed") // delete DBCosmosDBOperationTypeDelete = DBCosmosDBOperationTypeKey.String("Delete") // replace DBCosmosDBOperationTypeReplace = DBCosmosDBOperationTypeKey.String("Replace") // execute DBCosmosDBOperationTypeExecute = DBCosmosDBOperationTypeKey.String("Execute") // query DBCosmosDBOperationTypeQuery = DBCosmosDBOperationTypeKey.String("Query") // head DBCosmosDBOperationTypeHead = DBCosmosDBOperationTypeKey.String("Head") // head_feed DBCosmosDBOperationTypeHeadFeed = DBCosmosDBOperationTypeKey.String("HeadFeed") // upsert DBCosmosDBOperationTypeUpsert = DBCosmosDBOperationTypeKey.String("Upsert") // batch DBCosmosDBOperationTypeBatch = DBCosmosDBOperationTypeKey.String("Batch") // query_plan DBCosmosDBOperationTypeQueryPlan = DBCosmosDBOperationTypeKey.String("QueryPlan") // execute_javascript DBCosmosDBOperationTypeExecuteJavascript = DBCosmosDBOperationTypeKey.String("ExecuteJavaScript") ) var ( // Some other SQL database. Fallback only. See notes DBSystemOtherSQL = DBSystemKey.String("other_sql") // Microsoft SQL Server DBSystemMSSQL = DBSystemKey.String("mssql") // Microsoft SQL Server Compact DBSystemMssqlcompact = DBSystemKey.String("mssqlcompact") // MySQL DBSystemMySQL = DBSystemKey.String("mysql") // Oracle Database DBSystemOracle = DBSystemKey.String("oracle") // IBM DB2 DBSystemDB2 = DBSystemKey.String("db2") // PostgreSQL DBSystemPostgreSQL = DBSystemKey.String("postgresql") // Amazon Redshift DBSystemRedshift = DBSystemKey.String("redshift") // Apache Hive DBSystemHive = DBSystemKey.String("hive") // Cloudscape DBSystemCloudscape = DBSystemKey.String("cloudscape") // HyperSQL DataBase DBSystemHSQLDB = DBSystemKey.String("hsqldb") // Progress Database DBSystemProgress = DBSystemKey.String("progress") // SAP MaxDB DBSystemMaxDB = DBSystemKey.String("maxdb") // SAP HANA DBSystemHanaDB = DBSystemKey.String("hanadb") // Ingres DBSystemIngres = DBSystemKey.String("ingres") // FirstSQL DBSystemFirstSQL = DBSystemKey.String("firstsql") // EnterpriseDB DBSystemEDB = DBSystemKey.String("edb") // InterSystems Caché DBSystemCache = DBSystemKey.String("cache") // Adabas (Adaptable Database System) DBSystemAdabas = DBSystemKey.String("adabas") // Firebird DBSystemFirebird = DBSystemKey.String("firebird") // Apache Derby DBSystemDerby = DBSystemKey.String("derby") // FileMaker DBSystemFilemaker = DBSystemKey.String("filemaker") // Informix DBSystemInformix = DBSystemKey.String("informix") // InstantDB DBSystemInstantDB = DBSystemKey.String("instantdb") // InterBase DBSystemInterbase = DBSystemKey.String("interbase") // MariaDB DBSystemMariaDB = DBSystemKey.String("mariadb") // Netezza DBSystemNetezza = DBSystemKey.String("netezza") // Pervasive PSQL DBSystemPervasive = DBSystemKey.String("pervasive") // PointBase DBSystemPointbase = DBSystemKey.String("pointbase") // SQLite DBSystemSqlite = DBSystemKey.String("sqlite") // Sybase DBSystemSybase = DBSystemKey.String("sybase") // Teradata DBSystemTeradata = DBSystemKey.String("teradata") // Vertica DBSystemVertica = DBSystemKey.String("vertica") // H2 DBSystemH2 = DBSystemKey.String("h2") // ColdFusion IMQ DBSystemColdfusion = DBSystemKey.String("coldfusion") // Apache Cassandra DBSystemCassandra = DBSystemKey.String("cassandra") // Apache HBase DBSystemHBase = DBSystemKey.String("hbase") // MongoDB DBSystemMongoDB = DBSystemKey.String("mongodb") // Redis DBSystemRedis = DBSystemKey.String("redis") // Couchbase DBSystemCouchbase = DBSystemKey.String("couchbase") // CouchDB DBSystemCouchDB = DBSystemKey.String("couchdb") // Microsoft Azure Cosmos DB DBSystemCosmosDB = DBSystemKey.String("cosmosdb") // Amazon DynamoDB DBSystemDynamoDB = DBSystemKey.String("dynamodb") // Neo4j DBSystemNeo4j = DBSystemKey.String("neo4j") // Apache Geode DBSystemGeode = DBSystemKey.String("geode") // Elasticsearch DBSystemElasticsearch = DBSystemKey.String("elasticsearch") // Memcached DBSystemMemcached = DBSystemKey.String("memcached") // CockroachDB DBSystemCockroachdb = DBSystemKey.String("cockroachdb") // OpenSearch DBSystemOpensearch = DBSystemKey.String("opensearch") // ClickHouse DBSystemClickhouse = DBSystemKey.String("clickhouse") // Cloud Spanner DBSystemSpanner = DBSystemKey.String("spanner") // Trino DBSystemTrino = DBSystemKey.String("trino") ) // DBCassandraCoordinatorDC returns an attribute KeyValue conforming to the // "db.cassandra.coordinator.dc" semantic conventions. It represents the data // center of the coordinating node for a query. func DBCassandraCoordinatorDC(val string) attribute.KeyValue { return DBCassandraCoordinatorDCKey.String(val) } // DBCassandraCoordinatorID returns an attribute KeyValue conforming to the // "db.cassandra.coordinator.id" semantic conventions. It represents the ID of // the coordinating node for a query. func DBCassandraCoordinatorID(val string) attribute.KeyValue { return DBCassandraCoordinatorIDKey.String(val) } // DBCassandraIdempotence returns an attribute KeyValue conforming to the // "db.cassandra.idempotence" semantic conventions. It represents the whether // or not the query is idempotent. func DBCassandraIdempotence(val bool) attribute.KeyValue { return DBCassandraIdempotenceKey.Bool(val) } // DBCassandraPageSize returns an attribute KeyValue conforming to the // "db.cassandra.page_size" semantic conventions. It represents the fetch size // used for paging, i.e. how many rows will be returned at once. func DBCassandraPageSize(val int) attribute.KeyValue { return DBCassandraPageSizeKey.Int(val) } // DBCassandraSpeculativeExecutionCount returns an attribute KeyValue // conforming to the "db.cassandra.speculative_execution_count" semantic // conventions. It represents the number of times a query was speculatively // executed. Not set or `0` if the query was not executed speculatively. func DBCassandraSpeculativeExecutionCount(val int) attribute.KeyValue { return DBCassandraSpeculativeExecutionCountKey.Int(val) } // DBCassandraTable returns an attribute KeyValue conforming to the // "db.cassandra.table" semantic conventions. It represents the name of the // primary Cassandra table that the operation is acting upon, including the // keyspace name (if applicable). func DBCassandraTable(val string) attribute.KeyValue { return DBCassandraTableKey.String(val) } // DBConnectionString returns an attribute KeyValue conforming to the // "db.connection_string" semantic conventions. It represents the connection // string used to connect to the database. It is recommended to remove embedded // credentials. func DBConnectionString(val string) attribute.KeyValue { return DBConnectionStringKey.String(val) } // DBCosmosDBClientID returns an attribute KeyValue conforming to the // "db.cosmosdb.client_id" semantic conventions. It represents the unique // Cosmos client instance id. func DBCosmosDBClientID(val string) attribute.KeyValue { return DBCosmosDBClientIDKey.String(val) } // DBCosmosDBContainer returns an attribute KeyValue conforming to the // "db.cosmosdb.container" semantic conventions. It represents the cosmos DB // container name. func DBCosmosDBContainer(val string) attribute.KeyValue { return DBCosmosDBContainerKey.String(val) } // DBCosmosDBRequestCharge returns an attribute KeyValue conforming to the // "db.cosmosdb.request_charge" semantic conventions. It represents the rU // consumed for that operation func DBCosmosDBRequestCharge(val float64) attribute.KeyValue { return DBCosmosDBRequestChargeKey.Float64(val) } // DBCosmosDBRequestContentLength returns an attribute KeyValue conforming // to the "db.cosmosdb.request_content_length" semantic conventions. It // represents the request payload size in bytes func DBCosmosDBRequestContentLength(val int) attribute.KeyValue { return DBCosmosDBRequestContentLengthKey.Int(val) } // DBCosmosDBStatusCode returns an attribute KeyValue conforming to the // "db.cosmosdb.status_code" semantic conventions. It represents the cosmos DB // status code. func DBCosmosDBStatusCode(val int) attribute.KeyValue { return DBCosmosDBStatusCodeKey.Int(val) } // DBCosmosDBSubStatusCode returns an attribute KeyValue conforming to the // "db.cosmosdb.sub_status_code" semantic conventions. It represents the cosmos // DB sub status code. func DBCosmosDBSubStatusCode(val int) attribute.KeyValue { return DBCosmosDBSubStatusCodeKey.Int(val) } // DBElasticsearchClusterName returns an attribute KeyValue conforming to // the "db.elasticsearch.cluster.name" semantic conventions. It represents the // represents the identifier of an Elasticsearch cluster. func DBElasticsearchClusterName(val string) attribute.KeyValue { return DBElasticsearchClusterNameKey.String(val) } // DBElasticsearchNodeName returns an attribute KeyValue conforming to the // "db.elasticsearch.node.name" semantic conventions. It represents the // represents the human-readable identifier of the node/instance to which a // request was routed. func DBElasticsearchNodeName(val string) attribute.KeyValue { return DBElasticsearchNodeNameKey.String(val) } // DBInstanceID returns an attribute KeyValue conforming to the // "db.instance.id" semantic conventions. It represents an identifier (address, // unique name, or any other identifier) of the database instance that is // executing queries or mutations on the current connection. This is useful in // cases where the database is running in a clustered environment and the // instrumentation is able to record the node executing the query. The client // may obtain this value in databases like MySQL using queries like `select // @@hostname`. func DBInstanceID(val string) attribute.KeyValue { return DBInstanceIDKey.String(val) } // DBJDBCDriverClassname returns an attribute KeyValue conforming to the // "db.jdbc.driver_classname" semantic conventions. It represents the // fully-qualified class name of the [Java Database Connectivity // (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver // used to connect. func DBJDBCDriverClassname(val string) attribute.KeyValue { return DBJDBCDriverClassnameKey.String(val) } // DBMongoDBCollection returns an attribute KeyValue conforming to the // "db.mongodb.collection" semantic conventions. It represents the MongoDB // collection being accessed within the database stated in `db.name`. func DBMongoDBCollection(val string) attribute.KeyValue { return DBMongoDBCollectionKey.String(val) } // DBMSSQLInstanceName returns an attribute KeyValue conforming to the // "db.mssql.instance_name" semantic conventions. It represents the Microsoft // SQL Server [instance // name](https://docs.microsoft.com/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) // connecting to. This name is used to determine the port of a named instance. func DBMSSQLInstanceName(val string) attribute.KeyValue { return DBMSSQLInstanceNameKey.String(val) } // DBName returns an attribute KeyValue conforming to the "db.name" semantic // conventions. It represents the this attribute is used to report the name of // the database being accessed. For commands that switch the database, this // should be set to the target database (even if the command fails). func DBName(val string) attribute.KeyValue { return DBNameKey.String(val) } // DBOperation returns an attribute KeyValue conforming to the // "db.operation" semantic conventions. It represents the name of the operation // being executed, e.g. the [MongoDB command // name](https://docs.mongodb.com/manual/reference/command/#database-operations) // such as `findAndModify`, or the SQL keyword. func DBOperation(val string) attribute.KeyValue { return DBOperationKey.String(val) } // DBRedisDBIndex returns an attribute KeyValue conforming to the // "db.redis.database_index" semantic conventions. It represents the index of // the database being accessed as used in the [`SELECT` // command](https://redis.io/commands/select), provided as an integer. To be // used instead of the generic `db.name` attribute. func DBRedisDBIndex(val int) attribute.KeyValue { return DBRedisDBIndexKey.Int(val) } // DBSQLTable returns an attribute KeyValue conforming to the "db.sql.table" // semantic conventions. It represents the name of the primary table that the // operation is acting upon, including the database name (if applicable). func DBSQLTable(val string) attribute.KeyValue { return DBSQLTableKey.String(val) } // DBStatement returns an attribute KeyValue conforming to the // "db.statement" semantic conventions. It represents the database statement // being executed. func DBStatement(val string) attribute.KeyValue { return DBStatementKey.String(val) } // DBUser returns an attribute KeyValue conforming to the "db.user" semantic // conventions. It represents the username for accessing the database. func DBUser(val string) attribute.KeyValue { return DBUserKey.String(val) } // Describes deprecated HTTP attributes. const ( // HTTPFlavorKey is the attribute Key conforming to the "http.flavor" // semantic conventions. // // Type: Enum // RequirementLevel: Optional // Stability: deprecated // Deprecated: use `network.protocol.name` instead. HTTPFlavorKey = attribute.Key("http.flavor") // HTTPMethodKey is the attribute Key conforming to the "http.method" // semantic conventions. // // Type: string // RequirementLevel: Optional // Stability: deprecated // Examples: 'GET', 'POST', 'HEAD' // Deprecated: use `http.request.method` instead. HTTPMethodKey = attribute.Key("http.method") // HTTPRequestContentLengthKey is the attribute Key conforming to the // "http.request_content_length" semantic conventions. // // Type: int // RequirementLevel: Optional // Stability: deprecated // Examples: 3495 // Deprecated: use `http.request.header.content-length` instead. HTTPRequestContentLengthKey = attribute.Key("http.request_content_length") // HTTPResponseContentLengthKey is the attribute Key conforming to the // "http.response_content_length" semantic conventions. // // Type: int // RequirementLevel: Optional // Stability: deprecated // Examples: 3495 // Deprecated: use `http.response.header.content-length` instead. HTTPResponseContentLengthKey = attribute.Key("http.response_content_length") // HTTPSchemeKey is the attribute Key conforming to the "http.scheme" // semantic conventions. // // Type: string // RequirementLevel: Optional // Stability: deprecated // Examples: 'http', 'https' // Deprecated: use `url.scheme` instead. HTTPSchemeKey = attribute.Key("http.scheme") // HTTPStatusCodeKey is the attribute Key conforming to the // "http.status_code" semantic conventions. // // Type: int // RequirementLevel: Optional // Stability: deprecated // Examples: 200 // Deprecated: use `http.response.status_code` instead. HTTPStatusCodeKey = attribute.Key("http.status_code") // HTTPTargetKey is the attribute Key conforming to the "http.target" // semantic conventions. // // Type: string // RequirementLevel: Optional // Stability: deprecated // Examples: '/search?q=OpenTelemetry#SemConv' // Deprecated: use `url.path` and `url.query` instead. HTTPTargetKey = attribute.Key("http.target") // HTTPURLKey is the attribute Key conforming to the "http.url" semantic // conventions. // // Type: string // RequirementLevel: Optional // Stability: deprecated // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv' // Deprecated: use `url.full` instead. HTTPURLKey = attribute.Key("http.url") // HTTPUserAgentKey is the attribute Key conforming to the // "http.user_agent" semantic conventions. // // Type: string // RequirementLevel: Optional // Stability: deprecated // Examples: 'CERN-LineMode/2.15 libwww/2.17b3', 'Mozilla/5.0 (iPhone; CPU // iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) // Version/14.1.2 Mobile/15E148 Safari/604.1' // Deprecated: use `user_agent.original` instead. HTTPUserAgentKey = attribute.Key("http.user_agent") ) var ( // HTTP/1.0 // // Deprecated: use `network.protocol.name` instead. HTTPFlavorHTTP10 = HTTPFlavorKey.String("1.0") // HTTP/1.1 // // Deprecated: use `network.protocol.name` instead. HTTPFlavorHTTP11 = HTTPFlavorKey.String("1.1") // HTTP/2 // // Deprecated: use `network.protocol.name` instead. HTTPFlavorHTTP20 = HTTPFlavorKey.String("2.0") // HTTP/3 // // Deprecated: use `network.protocol.name` instead. HTTPFlavorHTTP30 = HTTPFlavorKey.String("3.0") // SPDY protocol // // Deprecated: use `network.protocol.name` instead. HTTPFlavorSPDY = HTTPFlavorKey.String("SPDY") // QUIC protocol // // Deprecated: use `network.protocol.name` instead. HTTPFlavorQUIC = HTTPFlavorKey.String("QUIC") ) // HTTPMethod returns an attribute KeyValue conforming to the "http.method" // semantic conventions. // // Deprecated: use `http.request.method` instead. func HTTPMethod(val string) attribute.KeyValue { return HTTPMethodKey.String(val) } // HTTPRequestContentLength returns an attribute KeyValue conforming to the // "http.request_content_length" semantic conventions. // // Deprecated: use `http.request.header.content-length` instead. func HTTPRequestContentLength(val int) attribute.KeyValue { return HTTPRequestContentLengthKey.Int(val) } // HTTPResponseContentLength returns an attribute KeyValue conforming to the // "http.response_content_length" semantic conventions. // // Deprecated: use `http.response.header.content-length` instead. func HTTPResponseContentLength(val int) attribute.KeyValue { return HTTPResponseContentLengthKey.Int(val) } // HTTPScheme returns an attribute KeyValue conforming to the "http.scheme" // semantic conventions. // // Deprecated: use `url.scheme` instead. func HTTPScheme(val string) attribute.KeyValue { return HTTPSchemeKey.String(val) } // HTTPStatusCode returns an attribute KeyValue conforming to the // "http.status_code" semantic conventions. // // Deprecated: use `http.response.status_code` instead. func HTTPStatusCode(val int) attribute.KeyValue { return HTTPStatusCodeKey.Int(val) } // HTTPTarget returns an attribute KeyValue conforming to the "http.target" // semantic conventions. // // Deprecated: use `url.path` and `url.query` instead. func HTTPTarget(val string) attribute.KeyValue { return HTTPTargetKey.String(val) } // HTTPURL returns an attribute KeyValue conforming to the "http.url" // semantic conventions. // // Deprecated: use `url.full` instead. func HTTPURL(val string) attribute.KeyValue { return HTTPURLKey.String(val) } // HTTPUserAgent returns an attribute KeyValue conforming to the // "http.user_agent" semantic conventions. // // Deprecated: use `user_agent.original` instead. func HTTPUserAgent(val string) attribute.KeyValue { return HTTPUserAgentKey.String(val) } // These attributes may be used for any network related operation. const ( // NetHostNameKey is the attribute Key conforming to the "net.host.name" // semantic conventions. // // Type: string // RequirementLevel: Optional // Stability: deprecated // Examples: 'example.com' // Deprecated: use `server.address`. NetHostNameKey = attribute.Key("net.host.name") // NetHostPortKey is the attribute Key conforming to the "net.host.port" // semantic conventions. // // Type: int // RequirementLevel: Optional // Stability: deprecated // Examples: 8080 // Deprecated: use `server.port`. NetHostPortKey = attribute.Key("net.host.port") // NetPeerNameKey is the attribute Key conforming to the "net.peer.name" // semantic conventions. // // Type: string // RequirementLevel: Optional // Stability: deprecated // Examples: 'example.com' // Deprecated: use `server.address` on client spans and `client.address` on // server spans. NetPeerNameKey = attribute.Key("net.peer.name") // NetPeerPortKey is the attribute Key conforming to the "net.peer.port" // semantic conventions. // // Type: int // RequirementLevel: Optional // Stability: deprecated // Examples: 8080 // Deprecated: use `server.port` on client spans and `client.port` on // server spans. NetPeerPortKey = attribute.Key("net.peer.port") // NetProtocolNameKey is the attribute Key conforming to the // "net.protocol.name" semantic conventions. // // Type: string // RequirementLevel: Optional // Stability: deprecated // Examples: 'amqp', 'http', 'mqtt' // Deprecated: use `network.protocol.name`. NetProtocolNameKey = attribute.Key("net.protocol.name") // NetProtocolVersionKey is the attribute Key conforming to the // "net.protocol.version" semantic conventions. // // Type: string // RequirementLevel: Optional // Stability: deprecated // Examples: '3.1.1' // Deprecated: use `network.protocol.version`. NetProtocolVersionKey = attribute.Key("net.protocol.version") // NetSockFamilyKey is the attribute Key conforming to the // "net.sock.family" semantic conventions. // // Type: Enum // RequirementLevel: Optional // Stability: deprecated // Deprecated: use `network.transport` and `network.type`. NetSockFamilyKey = attribute.Key("net.sock.family") // NetSockHostAddrKey is the attribute Key conforming to the // "net.sock.host.addr" semantic conventions. // // Type: string // RequirementLevel: Optional // Stability: deprecated // Examples: '/var/my.sock' // Deprecated: use `network.local.address`. NetSockHostAddrKey = attribute.Key("net.sock.host.addr") // NetSockHostPortKey is the attribute Key conforming to the // "net.sock.host.port" semantic conventions. // // Type: int // RequirementLevel: Optional // Stability: deprecated // Examples: 8080 // Deprecated: use `network.local.port`. NetSockHostPortKey = attribute.Key("net.sock.host.port") // NetSockPeerAddrKey is the attribute Key conforming to the // "net.sock.peer.addr" semantic conventions. // // Type: string // RequirementLevel: Optional // Stability: deprecated // Examples: '192.168.0.1' // Deprecated: use `network.peer.address`. NetSockPeerAddrKey = attribute.Key("net.sock.peer.addr") // NetSockPeerNameKey is the attribute Key conforming to the // "net.sock.peer.name" semantic conventions. // // Type: string // RequirementLevel: Optional // Stability: deprecated // Examples: '/var/my.sock' // Deprecated: no replacement at this time. NetSockPeerNameKey = attribute.Key("net.sock.peer.name") // NetSockPeerPortKey is the attribute Key conforming to the // "net.sock.peer.port" semantic conventions. // // Type: int // RequirementLevel: Optional // Stability: deprecated // Examples: 65531 // Deprecated: use `network.peer.port`. NetSockPeerPortKey = attribute.Key("net.sock.peer.port") // NetTransportKey is the attribute Key conforming to the "net.transport" // semantic conventions. // // Type: Enum // RequirementLevel: Optional // Stability: deprecated // Deprecated: use `network.transport`. NetTransportKey = attribute.Key("net.transport") ) var ( // IPv4 address // // Deprecated: use `network.transport` and `network.type`. NetSockFamilyInet = NetSockFamilyKey.String("inet") // IPv6 address // // Deprecated: use `network.transport` and `network.type`. NetSockFamilyInet6 = NetSockFamilyKey.String("inet6") // Unix domain socket path // // Deprecated: use `network.transport` and `network.type`. NetSockFamilyUnix = NetSockFamilyKey.String("unix") ) var ( // ip_tcp // // Deprecated: use `network.transport`. NetTransportTCP = NetTransportKey.String("ip_tcp") // ip_udp // // Deprecated: use `network.transport`. NetTransportUDP = NetTransportKey.String("ip_udp") // Named or anonymous pipe // // Deprecated: use `network.transport`. NetTransportPipe = NetTransportKey.String("pipe") // In-process communication // // Deprecated: use `network.transport`. NetTransportInProc = NetTransportKey.String("inproc") // Something else (non IP-based) // // Deprecated: use `network.transport`. NetTransportOther = NetTransportKey.String("other") ) // NetHostName returns an attribute KeyValue conforming to the // "net.host.name" semantic conventions. // // Deprecated: use `server.address`. func NetHostName(val string) attribute.KeyValue { return NetHostNameKey.String(val) } // NetHostPort returns an attribute KeyValue conforming to the // "net.host.port" semantic conventions. // // Deprecated: use `server.port`. func NetHostPort(val int) attribute.KeyValue { return NetHostPortKey.Int(val) } // NetPeerName returns an attribute KeyValue conforming to the // "net.peer.name" semantic conventions. // // Deprecated: use `server.address` on client spans and `client.address` on // server spans. func NetPeerName(val string) attribute.KeyValue { return NetPeerNameKey.String(val) } // NetPeerPort returns an attribute KeyValue conforming to the // "net.peer.port" semantic conventions. // // Deprecated: use `server.port` on client spans and `client.port` on server // spans. func NetPeerPort(val int) attribute.KeyValue { return NetPeerPortKey.Int(val) } // NetProtocolName returns an attribute KeyValue conforming to the // "net.protocol.name" semantic conventions. // // Deprecated: use `network.protocol.name`. func NetProtocolName(val string) attribute.KeyValue { return NetProtocolNameKey.String(val) } // NetProtocolVersion returns an attribute KeyValue conforming to the // "net.protocol.version" semantic conventions. // // Deprecated: use `network.protocol.version`. func NetProtocolVersion(val string) attribute.KeyValue { return NetProtocolVersionKey.String(val) } // NetSockHostAddr returns an attribute KeyValue conforming to the // "net.sock.host.addr" semantic conventions. // // Deprecated: use `network.local.address`. func NetSockHostAddr(val string) attribute.KeyValue { return NetSockHostAddrKey.String(val) } // NetSockHostPort returns an attribute KeyValue conforming to the // "net.sock.host.port" semantic conventions. // // Deprecated: use `network.local.port`. func NetSockHostPort(val int) attribute.KeyValue { return NetSockHostPortKey.Int(val) } // NetSockPeerAddr returns an attribute KeyValue conforming to the // "net.sock.peer.addr" semantic conventions. // // Deprecated: use `network.peer.address`. func NetSockPeerAddr(val string) attribute.KeyValue { return NetSockPeerAddrKey.String(val) } // NetSockPeerName returns an attribute KeyValue conforming to the // "net.sock.peer.name" semantic conventions. // // Deprecated: no replacement at this time. func NetSockPeerName(val string) attribute.KeyValue { return NetSockPeerNameKey.String(val) } // NetSockPeerPort returns an attribute KeyValue conforming to the // "net.sock.peer.port" semantic conventions. // // Deprecated: use `network.peer.port`. func NetSockPeerPort(val int) attribute.KeyValue { return NetSockPeerPortKey.Int(val) } // These attributes may be used to describe the receiver of a network // exchange/packet. These should be used when there is no client/server // relationship between the two sides, or when that relationship is unknown. // This covers low-level network interactions (e.g. packet tracing) where you // don't know if there was a connection or which side initiated it. This also // covers unidirectional UDP flows and peer-to-peer communication where the // "user-facing" surface of the protocol / API doesn't expose a clear notion of // client and server. const ( // DestinationAddressKey is the attribute Key conforming to the // "destination.address" semantic conventions. It represents the // destination address - domain name if available without reverse DNS // lookup; otherwise, IP address or Unix domain socket name. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'destination.example.com', '10.1.2.80', '/tmp/my.sock' // Note: When observed from the source side, and when communicating through // an intermediary, `destination.address` SHOULD represent the destination // address behind any intermediaries, for example proxies, if it's // available. DestinationAddressKey = attribute.Key("destination.address") // DestinationPortKey is the attribute Key conforming to the // "destination.port" semantic conventions. It represents the destination // port number // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 3389, 2888 DestinationPortKey = attribute.Key("destination.port") ) // DestinationAddress returns an attribute KeyValue conforming to the // "destination.address" semantic conventions. It represents the destination // address - domain name if available without reverse DNS lookup; otherwise, IP // address or Unix domain socket name. func DestinationAddress(val string) attribute.KeyValue { return DestinationAddressKey.String(val) } // DestinationPort returns an attribute KeyValue conforming to the // "destination.port" semantic conventions. It represents the destination port // number func DestinationPort(val int) attribute.KeyValue { return DestinationPortKey.Int(val) } // These attributes may be used for any disk related operation. const ( // DiskIoDirectionKey is the attribute Key conforming to the // "disk.io.direction" semantic conventions. It represents the disk IO // operation direction. // // Type: Enum // RequirementLevel: Optional // Stability: experimental // Examples: 'read' DiskIoDirectionKey = attribute.Key("disk.io.direction") ) var ( // read DiskIoDirectionRead = DiskIoDirectionKey.String("read") // write DiskIoDirectionWrite = DiskIoDirectionKey.String("write") ) // The shared attributes used to report an error. const ( // ErrorTypeKey is the attribute Key conforming to the "error.type" // semantic conventions. It represents the describes a class of error the // operation ended with. // // Type: Enum // RequirementLevel: Optional // Stability: stable // Examples: 'timeout', 'java.net.UnknownHostException', // 'server_certificate_invalid', '500' // Note: The `error.type` SHOULD be predictable and SHOULD have low // cardinality. // Instrumentations SHOULD document the list of errors they report. // // The cardinality of `error.type` within one instrumentation library // SHOULD be low. // Telemetry consumers that aggregate data from multiple instrumentation // libraries and applications // should be prepared for `error.type` to have high cardinality at query // time when no // additional filters are applied. // // If the operation has completed successfully, instrumentations SHOULD NOT // set `error.type`. // // If a specific domain defines its own set of error identifiers (such as // HTTP or gRPC status codes), // it's RECOMMENDED to: // // * Use a domain-specific attribute // * Set `error.type` to capture all errors, regardless of whether they are // defined within the domain-specific set or not. ErrorTypeKey = attribute.Key("error.type") ) var ( // A fallback error value to be used when the instrumentation doesn't define a custom value ErrorTypeOther = ErrorTypeKey.String("_OTHER") ) // The shared attributes used to report a single exception associated with a // span or log. const ( // ExceptionEscapedKey is the attribute Key conforming to the // "exception.escaped" semantic conventions. It represents the sHOULD be // set to true if the exception event is recorded at a point where it is // known that the exception is escaping the scope of the span. // // Type: boolean // RequirementLevel: Optional // Stability: experimental // Note: An exception is considered to have escaped (or left) the scope of // a span, // if that span is ended while the exception is still logically "in // flight". // This may be actually "in flight" in some languages (e.g. if the // exception // is passed to a Context manager's `__exit__` method in Python) but will // usually be caught at the point of recording the exception in most // languages. // // It is usually not possible to determine at the point where an exception // is thrown // whether it will escape the scope of a span. // However, it is trivial to know that an exception // will escape, if one checks for an active exception just before ending // the span, // as done in the [example for recording span // exceptions](#recording-an-exception). // // It follows that an exception may still escape the scope of the span // even if the `exception.escaped` attribute was not set or set to false, // since the event might have been recorded at a time where it was not // clear whether the exception will escape. ExceptionEscapedKey = attribute.Key("exception.escaped") // ExceptionMessageKey is the attribute Key conforming to the // "exception.message" semantic conventions. It represents the exception // message. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'Division by zero', "Can't convert 'int' object to str // implicitly" ExceptionMessageKey = attribute.Key("exception.message") // ExceptionStacktraceKey is the attribute Key conforming to the // "exception.stacktrace" semantic conventions. It represents a stacktrace // as a string in the natural representation for the language runtime. The // representation is to be determined and documented by each language SIG. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test // exception\\n at ' // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' // 'com.example.GenerateTrace.main(GenerateTrace.java:5)' ExceptionStacktraceKey = attribute.Key("exception.stacktrace") // ExceptionTypeKey is the attribute Key conforming to the "exception.type" // semantic conventions. It represents the type of the exception (its // fully-qualified class name, if applicable). The dynamic type of the // exception should be preferred over the static type in languages that // support it. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'java.net.ConnectException', 'OSError' ExceptionTypeKey = attribute.Key("exception.type") ) // ExceptionEscaped returns an attribute KeyValue conforming to the // "exception.escaped" semantic conventions. It represents the sHOULD be set to // true if the exception event is recorded at a point where it is known that // the exception is escaping the scope of the span. func ExceptionEscaped(val bool) attribute.KeyValue { return ExceptionEscapedKey.Bool(val) } // ExceptionMessage returns an attribute KeyValue conforming to the // "exception.message" semantic conventions. It represents the exception // message. func ExceptionMessage(val string) attribute.KeyValue { return ExceptionMessageKey.String(val) } // ExceptionStacktrace returns an attribute KeyValue conforming to the // "exception.stacktrace" semantic conventions. It represents a stacktrace as a // string in the natural representation for the language runtime. The // representation is to be determined and documented by each language SIG. func ExceptionStacktrace(val string) attribute.KeyValue { return ExceptionStacktraceKey.String(val) } // ExceptionType returns an attribute KeyValue conforming to the // "exception.type" semantic conventions. It represents the type of the // exception (its fully-qualified class name, if applicable). The dynamic type // of the exception should be preferred over the static type in languages that // support it. func ExceptionType(val string) attribute.KeyValue { return ExceptionTypeKey.String(val) } // Semantic convention attributes in the HTTP namespace. const ( // HTTPRequestBodySizeKey is the attribute Key conforming to the // "http.request.body.size" semantic conventions. It represents the size of // the request payload body in bytes. This is the number of bytes // transferred excluding headers and is often, but not always, present as // the // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) // header. For requests using transport encoding, this should be the // compressed size. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 3495 HTTPRequestBodySizeKey = attribute.Key("http.request.body.size") // HTTPRequestMethodKey is the attribute Key conforming to the // "http.request.method" semantic conventions. It represents the hTTP // request method. // // Type: Enum // RequirementLevel: Optional // Stability: stable // Examples: 'GET', 'POST', 'HEAD' // Note: HTTP request method value SHOULD be "known" to the // instrumentation. // By default, this convention defines "known" methods as the ones listed // in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods) // and the PATCH method defined in // [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html). // // If the HTTP request method is not known to instrumentation, it MUST set // the `http.request.method` attribute to `_OTHER`. // // If the HTTP instrumentation could end up converting valid HTTP request // methods to `_OTHER`, then it MUST provide a way to override // the list of known HTTP methods. If this override is done via environment // variable, then the environment variable MUST be named // OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated // list of case-sensitive known HTTP methods // (this list MUST be a full override of the default known method, it is // not a list of known methods in addition to the defaults). // // HTTP method names are case-sensitive and `http.request.method` attribute // value MUST match a known HTTP method name exactly. // Instrumentations for specific web frameworks that consider HTTP methods // to be case insensitive, SHOULD populate a canonical equivalent. // Tracing instrumentations that do so, MUST also set // `http.request.method_original` to the original value. HTTPRequestMethodKey = attribute.Key("http.request.method") // HTTPRequestMethodOriginalKey is the attribute Key conforming to the // "http.request.method_original" semantic conventions. It represents the // original HTTP method sent by the client in the request line. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'GeT', 'ACL', 'foo' HTTPRequestMethodOriginalKey = attribute.Key("http.request.method_original") // HTTPRequestResendCountKey is the attribute Key conforming to the // "http.request.resend_count" semantic conventions. It represents the // ordinal number of request resending attempt (for any reason, including // redirects). // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 3 // Note: The resend count SHOULD be updated each time an HTTP request gets // resent by the client, regardless of what was the cause of the resending // (e.g. redirection, authorization failure, 503 Server Unavailable, // network issues, or any other). HTTPRequestResendCountKey = attribute.Key("http.request.resend_count") // HTTPResponseBodySizeKey is the attribute Key conforming to the // "http.response.body.size" semantic conventions. It represents the size // of the response payload body in bytes. This is the number of bytes // transferred excluding headers and is often, but not always, present as // the // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) // header. For requests using transport encoding, this should be the // compressed size. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 3495 HTTPResponseBodySizeKey = attribute.Key("http.response.body.size") // HTTPResponseStatusCodeKey is the attribute Key conforming to the // "http.response.status_code" semantic conventions. It represents the // [HTTP response status // code](https://tools.ietf.org/html/rfc7231#section-6). // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 200 HTTPResponseStatusCodeKey = attribute.Key("http.response.status_code") // HTTPRouteKey is the attribute Key conforming to the "http.route" // semantic conventions. It represents the matched route, that is, the path // template in the format used by the respective server framework. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '/users/:userID?', '{controller}/{action}/{id?}' // Note: MUST NOT be populated when this is not supported by the HTTP // server framework as the route attribute should have low-cardinality and // the URI path can NOT substitute it. // SHOULD include the [application // root](/docs/http/http-spans.md#http-server-definitions) if there is one. HTTPRouteKey = attribute.Key("http.route") ) var ( // CONNECT method HTTPRequestMethodConnect = HTTPRequestMethodKey.String("CONNECT") // DELETE method HTTPRequestMethodDelete = HTTPRequestMethodKey.String("DELETE") // GET method HTTPRequestMethodGet = HTTPRequestMethodKey.String("GET") // HEAD method HTTPRequestMethodHead = HTTPRequestMethodKey.String("HEAD") // OPTIONS method HTTPRequestMethodOptions = HTTPRequestMethodKey.String("OPTIONS") // PATCH method HTTPRequestMethodPatch = HTTPRequestMethodKey.String("PATCH") // POST method HTTPRequestMethodPost = HTTPRequestMethodKey.String("POST") // PUT method HTTPRequestMethodPut = HTTPRequestMethodKey.String("PUT") // TRACE method HTTPRequestMethodTrace = HTTPRequestMethodKey.String("TRACE") // Any HTTP method that the instrumentation has no prior knowledge of HTTPRequestMethodOther = HTTPRequestMethodKey.String("_OTHER") ) // HTTPRequestBodySize returns an attribute KeyValue conforming to the // "http.request.body.size" semantic conventions. It represents the size of the // request payload body in bytes. This is the number of bytes transferred // excluding headers and is often, but not always, present as the // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) // header. For requests using transport encoding, this should be the compressed // size. func HTTPRequestBodySize(val int) attribute.KeyValue { return HTTPRequestBodySizeKey.Int(val) } // HTTPRequestMethodOriginal returns an attribute KeyValue conforming to the // "http.request.method_original" semantic conventions. It represents the // original HTTP method sent by the client in the request line. func HTTPRequestMethodOriginal(val string) attribute.KeyValue { return HTTPRequestMethodOriginalKey.String(val) } // HTTPRequestResendCount returns an attribute KeyValue conforming to the // "http.request.resend_count" semantic conventions. It represents the ordinal // number of request resending attempt (for any reason, including redirects). func HTTPRequestResendCount(val int) attribute.KeyValue { return HTTPRequestResendCountKey.Int(val) } // HTTPResponseBodySize returns an attribute KeyValue conforming to the // "http.response.body.size" semantic conventions. It represents the size of // the response payload body in bytes. This is the number of bytes transferred // excluding headers and is often, but not always, present as the // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) // header. For requests using transport encoding, this should be the compressed // size. func HTTPResponseBodySize(val int) attribute.KeyValue { return HTTPResponseBodySizeKey.Int(val) } // HTTPResponseStatusCode returns an attribute KeyValue conforming to the // "http.response.status_code" semantic conventions. It represents the [HTTP // response status code](https://tools.ietf.org/html/rfc7231#section-6). func HTTPResponseStatusCode(val int) attribute.KeyValue { return HTTPResponseStatusCodeKey.Int(val) } // HTTPRoute returns an attribute KeyValue conforming to the "http.route" // semantic conventions. It represents the matched route, that is, the path // template in the format used by the respective server framework. func HTTPRoute(val string) attribute.KeyValue { return HTTPRouteKey.String(val) } // Attributes describing telemetry around messaging systems and messaging // activities. const ( // MessagingBatchMessageCountKey is the attribute Key conforming to the // "messaging.batch.message_count" semantic conventions. It represents the // number of messages sent, received, or processed in the scope of the // batching operation. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 0, 1, 2 // Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on // spans that operate with a single message. When a messaging client // library supports both batch and single-message API for the same // operation, instrumentations SHOULD use `messaging.batch.message_count` // for batching APIs and SHOULD NOT use it for single-message APIs. MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count") // MessagingClientIDKey is the attribute Key conforming to the // "messaging.client_id" semantic conventions. It represents a unique // identifier for the client that consumes or produces a message. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'client-5', 'myhost@8742@s8083jm' MessagingClientIDKey = attribute.Key("messaging.client_id") // MessagingDestinationAnonymousKey is the attribute Key conforming to the // "messaging.destination.anonymous" semantic conventions. It represents a // boolean that is true if the message destination is anonymous (could be // unnamed or have auto-generated name). // // Type: boolean // RequirementLevel: Optional // Stability: experimental MessagingDestinationAnonymousKey = attribute.Key("messaging.destination.anonymous") // MessagingDestinationNameKey is the attribute Key conforming to the // "messaging.destination.name" semantic conventions. It represents the // message destination name // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'MyQueue', 'MyTopic' // Note: Destination name SHOULD uniquely identify a specific queue, topic // or other entity within the broker. If // the broker doesn't have such notion, the destination name SHOULD // uniquely identify the broker. MessagingDestinationNameKey = attribute.Key("messaging.destination.name") // MessagingDestinationTemplateKey is the attribute Key conforming to the // "messaging.destination.template" semantic conventions. It represents the // low cardinality representation of the messaging destination name // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '/customers/{customerID}' // Note: Destination names could be constructed from templates. An example // would be a destination name involving a user name or product id. // Although the destination name in this case is of high cardinality, the // underlying template is of low cardinality and can be effectively used // for grouping and aggregation. MessagingDestinationTemplateKey = attribute.Key("messaging.destination.template") // MessagingDestinationTemporaryKey is the attribute Key conforming to the // "messaging.destination.temporary" semantic conventions. It represents a // boolean that is true if the message destination is temporary and might // not exist anymore after messages are processed. // // Type: boolean // RequirementLevel: Optional // Stability: experimental MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary") // MessagingDestinationPublishAnonymousKey is the attribute Key conforming // to the "messaging.destination_publish.anonymous" semantic conventions. // It represents a boolean that is true if the publish message destination // is anonymous (could be unnamed or have auto-generated name). // // Type: boolean // RequirementLevel: Optional // Stability: experimental MessagingDestinationPublishAnonymousKey = attribute.Key("messaging.destination_publish.anonymous") // MessagingDestinationPublishNameKey is the attribute Key conforming to // the "messaging.destination_publish.name" semantic conventions. It // represents the name of the original destination the message was // published to // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'MyQueue', 'MyTopic' // Note: The name SHOULD uniquely identify a specific queue, topic, or // other entity within the broker. If // the broker doesn't have such notion, the original destination name // SHOULD uniquely identify the broker. MessagingDestinationPublishNameKey = attribute.Key("messaging.destination_publish.name") // MessagingGCPPubsubMessageOrderingKeyKey is the attribute Key conforming // to the "messaging.gcp_pubsub.message.ordering_key" semantic conventions. // It represents the ordering key for a given message. If the attribute is // not present, the message does not have an ordering key. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'ordering_key' MessagingGCPPubsubMessageOrderingKeyKey = attribute.Key("messaging.gcp_pubsub.message.ordering_key") // MessagingKafkaConsumerGroupKey is the attribute Key conforming to the // "messaging.kafka.consumer.group" semantic conventions. It represents the // name of the Kafka Consumer Group that is handling the message. Only // applies to consumers, not producers. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'my-group' MessagingKafkaConsumerGroupKey = attribute.Key("messaging.kafka.consumer.group") // MessagingKafkaDestinationPartitionKey is the attribute Key conforming to // the "messaging.kafka.destination.partition" semantic conventions. It // represents the partition the message is sent to. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 2 MessagingKafkaDestinationPartitionKey = attribute.Key("messaging.kafka.destination.partition") // MessagingKafkaMessageKeyKey is the attribute Key conforming to the // "messaging.kafka.message.key" semantic conventions. It represents the // message keys in Kafka are used for grouping alike messages to ensure // they're processed on the same partition. They differ from // `messaging.message.id` in that they're not unique. If the key is `null`, // the attribute MUST NOT be set. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'myKey' // Note: If the key type is not string, it's string representation has to // be supplied for the attribute. If the key has no unambiguous, canonical // string form, don't include its value. MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message.key") // MessagingKafkaMessageOffsetKey is the attribute Key conforming to the // "messaging.kafka.message.offset" semantic conventions. It represents the // offset of a record in the corresponding Kafka partition. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 42 MessagingKafkaMessageOffsetKey = attribute.Key("messaging.kafka.message.offset") // MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the // "messaging.kafka.message.tombstone" semantic conventions. It represents // a boolean that is true if the message is a tombstone. // // Type: boolean // RequirementLevel: Optional // Stability: experimental MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone") // MessagingMessageBodySizeKey is the attribute Key conforming to the // "messaging.message.body.size" semantic conventions. It represents the // size of the message body in bytes. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 1439 // Note: This can refer to both the compressed or uncompressed body size. // If both sizes are known, the uncompressed // body size should be used. MessagingMessageBodySizeKey = attribute.Key("messaging.message.body.size") // MessagingMessageConversationIDKey is the attribute Key conforming to the // "messaging.message.conversation_id" semantic conventions. It represents // the conversation ID identifying the conversation to which the message // belongs, represented as a string. Sometimes called "Correlation ID". // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'MyConversationID' MessagingMessageConversationIDKey = attribute.Key("messaging.message.conversation_id") // MessagingMessageEnvelopeSizeKey is the attribute Key conforming to the // "messaging.message.envelope.size" semantic conventions. It represents // the size of the message body and metadata in bytes. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 2738 // Note: This can refer to both the compressed or uncompressed size. If // both sizes are known, the uncompressed // size should be used. MessagingMessageEnvelopeSizeKey = attribute.Key("messaging.message.envelope.size") // MessagingMessageIDKey is the attribute Key conforming to the // "messaging.message.id" semantic conventions. It represents a value used // by the messaging system as an identifier for the message, represented as // a string. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '452a7c7c7c7048c2f887f61572b18fc2' MessagingMessageIDKey = attribute.Key("messaging.message.id") // MessagingOperationKey is the attribute Key conforming to the // "messaging.operation" semantic conventions. It represents a string // identifying the kind of messaging operation. // // Type: Enum // RequirementLevel: Optional // Stability: experimental // Note: If a custom value is used, it MUST be of low cardinality. MessagingOperationKey = attribute.Key("messaging.operation") // MessagingRabbitmqDestinationRoutingKeyKey is the attribute Key // conforming to the "messaging.rabbitmq.destination.routing_key" semantic // conventions. It represents the rabbitMQ message routing key. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'myKey' MessagingRabbitmqDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key") // MessagingRocketmqClientGroupKey is the attribute Key conforming to the // "messaging.rocketmq.client_group" semantic conventions. It represents // the name of the RocketMQ producer/consumer group that is handling the // message. The client type is identified by the SpanKind. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'myConsumerGroup' MessagingRocketmqClientGroupKey = attribute.Key("messaging.rocketmq.client_group") // MessagingRocketmqConsumptionModelKey is the attribute Key conforming to // the "messaging.rocketmq.consumption_model" semantic conventions. It // represents the model of message consumption. This only applies to // consumer spans. // // Type: Enum // RequirementLevel: Optional // Stability: experimental MessagingRocketmqConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model") // MessagingRocketmqMessageDelayTimeLevelKey is the attribute Key // conforming to the "messaging.rocketmq.message.delay_time_level" semantic // conventions. It represents the delay time level for delay message, which // determines the message delay time. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 3 MessagingRocketmqMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level") // MessagingRocketmqMessageDeliveryTimestampKey is the attribute Key // conforming to the "messaging.rocketmq.message.delivery_timestamp" // semantic conventions. It represents the timestamp in milliseconds that // the delay message is expected to be delivered to consumer. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 1665987217045 MessagingRocketmqMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp") // MessagingRocketmqMessageGroupKey is the attribute Key conforming to the // "messaging.rocketmq.message.group" semantic conventions. It represents // the it is essential for FIFO message. Messages that belong to the same // message group are always processed one by one within the same consumer // group. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'myMessageGroup' MessagingRocketmqMessageGroupKey = attribute.Key("messaging.rocketmq.message.group") // MessagingRocketmqMessageKeysKey is the attribute Key conforming to the // "messaging.rocketmq.message.keys" semantic conventions. It represents // the key(s) of message, another way to mark message besides message id. // // Type: string[] // RequirementLevel: Optional // Stability: experimental // Examples: 'keyA', 'keyB' MessagingRocketmqMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys") // MessagingRocketmqMessageTagKey is the attribute Key conforming to the // "messaging.rocketmq.message.tag" semantic conventions. It represents the // secondary classifier of message besides topic. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'tagA' MessagingRocketmqMessageTagKey = attribute.Key("messaging.rocketmq.message.tag") // MessagingRocketmqMessageTypeKey is the attribute Key conforming to the // "messaging.rocketmq.message.type" semantic conventions. It represents // the type of message. // // Type: Enum // RequirementLevel: Optional // Stability: experimental MessagingRocketmqMessageTypeKey = attribute.Key("messaging.rocketmq.message.type") // MessagingRocketmqNamespaceKey is the attribute Key conforming to the // "messaging.rocketmq.namespace" semantic conventions. It represents the // namespace of RocketMQ resources, resources in different namespaces are // individual. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'myNamespace' MessagingRocketmqNamespaceKey = attribute.Key("messaging.rocketmq.namespace") // MessagingSystemKey is the attribute Key conforming to the // "messaging.system" semantic conventions. It represents an identifier for // the messaging system being used. See below for a list of well-known // identifiers. // // Type: Enum // RequirementLevel: Optional // Stability: experimental MessagingSystemKey = attribute.Key("messaging.system") ) var ( // One or more messages are provided for publishing to an intermediary. If a single message is published, the context of the "Publish" span can be used as the creation context and no "Create" span needs to be created MessagingOperationPublish = MessagingOperationKey.String("publish") // A message is created. "Create" spans always refer to a single message and are used to provide a unique creation context for messages in batch publishing scenarios MessagingOperationCreate = MessagingOperationKey.String("create") // One or more messages are requested by a consumer. This operation refers to pull-based scenarios, where consumers explicitly call methods of messaging SDKs to receive messages MessagingOperationReceive = MessagingOperationKey.String("receive") // One or more messages are passed to a consumer. This operation refers to push-based scenarios, where consumer register callbacks which get called by messaging SDKs MessagingOperationDeliver = MessagingOperationKey.String("deliver") ) var ( // Clustering consumption model MessagingRocketmqConsumptionModelClustering = MessagingRocketmqConsumptionModelKey.String("clustering") // Broadcasting consumption model MessagingRocketmqConsumptionModelBroadcasting = MessagingRocketmqConsumptionModelKey.String("broadcasting") ) var ( // Normal message MessagingRocketmqMessageTypeNormal = MessagingRocketmqMessageTypeKey.String("normal") // FIFO message MessagingRocketmqMessageTypeFifo = MessagingRocketmqMessageTypeKey.String("fifo") // Delay message MessagingRocketmqMessageTypeDelay = MessagingRocketmqMessageTypeKey.String("delay") // Transaction message MessagingRocketmqMessageTypeTransaction = MessagingRocketmqMessageTypeKey.String("transaction") ) var ( // Apache ActiveMQ MessagingSystemActivemq = MessagingSystemKey.String("activemq") // Amazon Simple Queue Service (SQS) MessagingSystemAWSSqs = MessagingSystemKey.String("aws_sqs") // Azure Event Grid MessagingSystemAzureEventgrid = MessagingSystemKey.String("azure_eventgrid") // Azure Event Hubs MessagingSystemAzureEventhubs = MessagingSystemKey.String("azure_eventhubs") // Azure Service Bus MessagingSystemAzureServicebus = MessagingSystemKey.String("azure_servicebus") // Google Cloud Pub/Sub MessagingSystemGCPPubsub = MessagingSystemKey.String("gcp_pubsub") // Java Message Service MessagingSystemJms = MessagingSystemKey.String("jms") // Apache Kafka MessagingSystemKafka = MessagingSystemKey.String("kafka") // RabbitMQ MessagingSystemRabbitmq = MessagingSystemKey.String("rabbitmq") // Apache RocketMQ MessagingSystemRocketmq = MessagingSystemKey.String("rocketmq") ) // MessagingBatchMessageCount returns an attribute KeyValue conforming to // the "messaging.batch.message_count" semantic conventions. It represents the // number of messages sent, received, or processed in the scope of the batching // operation. func MessagingBatchMessageCount(val int) attribute.KeyValue { return MessagingBatchMessageCountKey.Int(val) } // MessagingClientID returns an attribute KeyValue conforming to the // "messaging.client_id" semantic conventions. It represents a unique // identifier for the client that consumes or produces a message. func MessagingClientID(val string) attribute.KeyValue { return MessagingClientIDKey.String(val) } // MessagingDestinationAnonymous returns an attribute KeyValue conforming to // the "messaging.destination.anonymous" semantic conventions. It represents a // boolean that is true if the message destination is anonymous (could be // unnamed or have auto-generated name). func MessagingDestinationAnonymous(val bool) attribute.KeyValue { return MessagingDestinationAnonymousKey.Bool(val) } // MessagingDestinationName returns an attribute KeyValue conforming to the // "messaging.destination.name" semantic conventions. It represents the message // destination name func MessagingDestinationName(val string) attribute.KeyValue { return MessagingDestinationNameKey.String(val) } // MessagingDestinationTemplate returns an attribute KeyValue conforming to // the "messaging.destination.template" semantic conventions. It represents the // low cardinality representation of the messaging destination name func MessagingDestinationTemplate(val string) attribute.KeyValue { return MessagingDestinationTemplateKey.String(val) } // MessagingDestinationTemporary returns an attribute KeyValue conforming to // the "messaging.destination.temporary" semantic conventions. It represents a // boolean that is true if the message destination is temporary and might not // exist anymore after messages are processed. func MessagingDestinationTemporary(val bool) attribute.KeyValue { return MessagingDestinationTemporaryKey.Bool(val) } // MessagingDestinationPublishAnonymous returns an attribute KeyValue // conforming to the "messaging.destination_publish.anonymous" semantic // conventions. It represents a boolean that is true if the publish message // destination is anonymous (could be unnamed or have auto-generated name). func MessagingDestinationPublishAnonymous(val bool) attribute.KeyValue { return MessagingDestinationPublishAnonymousKey.Bool(val) } // MessagingDestinationPublishName returns an attribute KeyValue conforming // to the "messaging.destination_publish.name" semantic conventions. It // represents the name of the original destination the message was published to func MessagingDestinationPublishName(val string) attribute.KeyValue { return MessagingDestinationPublishNameKey.String(val) } // MessagingGCPPubsubMessageOrderingKey returns an attribute KeyValue // conforming to the "messaging.gcp_pubsub.message.ordering_key" semantic // conventions. It represents the ordering key for a given message. If the // attribute is not present, the message does not have an ordering key. func MessagingGCPPubsubMessageOrderingKey(val string) attribute.KeyValue { return MessagingGCPPubsubMessageOrderingKeyKey.String(val) } // MessagingKafkaConsumerGroup returns an attribute KeyValue conforming to // the "messaging.kafka.consumer.group" semantic conventions. It represents the // name of the Kafka Consumer Group that is handling the message. Only applies // to consumers, not producers. func MessagingKafkaConsumerGroup(val string) attribute.KeyValue { return MessagingKafkaConsumerGroupKey.String(val) } // MessagingKafkaDestinationPartition returns an attribute KeyValue // conforming to the "messaging.kafka.destination.partition" semantic // conventions. It represents the partition the message is sent to. func MessagingKafkaDestinationPartition(val int) attribute.KeyValue { return MessagingKafkaDestinationPartitionKey.Int(val) } // MessagingKafkaMessageKey returns an attribute KeyValue conforming to the // "messaging.kafka.message.key" semantic conventions. It represents the // message keys in Kafka are used for grouping alike messages to ensure they're // processed on the same partition. They differ from `messaging.message.id` in // that they're not unique. If the key is `null`, the attribute MUST NOT be // set. func MessagingKafkaMessageKey(val string) attribute.KeyValue { return MessagingKafkaMessageKeyKey.String(val) } // MessagingKafkaMessageOffset returns an attribute KeyValue conforming to // the "messaging.kafka.message.offset" semantic conventions. It represents the // offset of a record in the corresponding Kafka partition. func MessagingKafkaMessageOffset(val int) attribute.KeyValue { return MessagingKafkaMessageOffsetKey.Int(val) } // MessagingKafkaMessageTombstone returns an attribute KeyValue conforming // to the "messaging.kafka.message.tombstone" semantic conventions. It // represents a boolean that is true if the message is a tombstone. func MessagingKafkaMessageTombstone(val bool) attribute.KeyValue { return MessagingKafkaMessageTombstoneKey.Bool(val) } // MessagingMessageBodySize returns an attribute KeyValue conforming to the // "messaging.message.body.size" semantic conventions. It represents the size // of the message body in bytes. func MessagingMessageBodySize(val int) attribute.KeyValue { return MessagingMessageBodySizeKey.Int(val) } // MessagingMessageConversationID returns an attribute KeyValue conforming // to the "messaging.message.conversation_id" semantic conventions. It // represents the conversation ID identifying the conversation to which the // message belongs, represented as a string. Sometimes called "Correlation ID". func MessagingMessageConversationID(val string) attribute.KeyValue { return MessagingMessageConversationIDKey.String(val) } // MessagingMessageEnvelopeSize returns an attribute KeyValue conforming to // the "messaging.message.envelope.size" semantic conventions. It represents // the size of the message body and metadata in bytes. func MessagingMessageEnvelopeSize(val int) attribute.KeyValue { return MessagingMessageEnvelopeSizeKey.Int(val) } // MessagingMessageID returns an attribute KeyValue conforming to the // "messaging.message.id" semantic conventions. It represents a value used by // the messaging system as an identifier for the message, represented as a // string. func MessagingMessageID(val string) attribute.KeyValue { return MessagingMessageIDKey.String(val) } // MessagingRabbitmqDestinationRoutingKey returns an attribute KeyValue // conforming to the "messaging.rabbitmq.destination.routing_key" semantic // conventions. It represents the rabbitMQ message routing key. func MessagingRabbitmqDestinationRoutingKey(val string) attribute.KeyValue { return MessagingRabbitmqDestinationRoutingKeyKey.String(val) } // MessagingRocketmqClientGroup returns an attribute KeyValue conforming to // the "messaging.rocketmq.client_group" semantic conventions. It represents // the name of the RocketMQ producer/consumer group that is handling the // message. The client type is identified by the SpanKind. func MessagingRocketmqClientGroup(val string) attribute.KeyValue { return MessagingRocketmqClientGroupKey.String(val) } // MessagingRocketmqMessageDelayTimeLevel returns an attribute KeyValue // conforming to the "messaging.rocketmq.message.delay_time_level" semantic // conventions. It represents the delay time level for delay message, which // determines the message delay time. func MessagingRocketmqMessageDelayTimeLevel(val int) attribute.KeyValue { return MessagingRocketmqMessageDelayTimeLevelKey.Int(val) } // MessagingRocketmqMessageDeliveryTimestamp returns an attribute KeyValue // conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic // conventions. It represents the timestamp in milliseconds that the delay // message is expected to be delivered to consumer. func MessagingRocketmqMessageDeliveryTimestamp(val int) attribute.KeyValue { return MessagingRocketmqMessageDeliveryTimestampKey.Int(val) } // MessagingRocketmqMessageGroup returns an attribute KeyValue conforming to // the "messaging.rocketmq.message.group" semantic conventions. It represents // the it is essential for FIFO message. Messages that belong to the same // message group are always processed one by one within the same consumer // group. func MessagingRocketmqMessageGroup(val string) attribute.KeyValue { return MessagingRocketmqMessageGroupKey.String(val) } // MessagingRocketmqMessageKeys returns an attribute KeyValue conforming to // the "messaging.rocketmq.message.keys" semantic conventions. It represents // the key(s) of message, another way to mark message besides message id. func MessagingRocketmqMessageKeys(val ...string) attribute.KeyValue { return MessagingRocketmqMessageKeysKey.StringSlice(val) } // MessagingRocketmqMessageTag returns an attribute KeyValue conforming to // the "messaging.rocketmq.message.tag" semantic conventions. It represents the // secondary classifier of message besides topic. func MessagingRocketmqMessageTag(val string) attribute.KeyValue { return MessagingRocketmqMessageTagKey.String(val) } // MessagingRocketmqNamespace returns an attribute KeyValue conforming to // the "messaging.rocketmq.namespace" semantic conventions. It represents the // namespace of RocketMQ resources, resources in different namespaces are // individual. func MessagingRocketmqNamespace(val string) attribute.KeyValue { return MessagingRocketmqNamespaceKey.String(val) } // These attributes may be used for any network related operation. const ( // NetworkCarrierIccKey is the attribute Key conforming to the // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1 // alpha-2 2-character country code associated with the mobile carrier // network. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'DE' NetworkCarrierIccKey = attribute.Key("network.carrier.icc") // NetworkCarrierMccKey is the attribute Key conforming to the // "network.carrier.mcc" semantic conventions. It represents the mobile // carrier country code. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '310' NetworkCarrierMccKey = attribute.Key("network.carrier.mcc") // NetworkCarrierMncKey is the attribute Key conforming to the // "network.carrier.mnc" semantic conventions. It represents the mobile // carrier network code. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '001' NetworkCarrierMncKey = attribute.Key("network.carrier.mnc") // NetworkCarrierNameKey is the attribute Key conforming to the // "network.carrier.name" semantic conventions. It represents the name of // the mobile carrier. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'sprint' NetworkCarrierNameKey = attribute.Key("network.carrier.name") // NetworkConnectionSubtypeKey is the attribute Key conforming to the // "network.connection.subtype" semantic conventions. It represents the // this describes more details regarding the connection.type. It may be the // type of cell technology connection, but it could be used for describing // details about a wifi connection. // // Type: Enum // RequirementLevel: Optional // Stability: experimental // Examples: 'LTE' NetworkConnectionSubtypeKey = attribute.Key("network.connection.subtype") // NetworkConnectionTypeKey is the attribute Key conforming to the // "network.connection.type" semantic conventions. It represents the // internet connection type. // // Type: Enum // RequirementLevel: Optional // Stability: experimental // Examples: 'wifi' NetworkConnectionTypeKey = attribute.Key("network.connection.type") // NetworkIoDirectionKey is the attribute Key conforming to the // "network.io.direction" semantic conventions. It represents the network // IO operation direction. // // Type: Enum // RequirementLevel: Optional // Stability: experimental // Examples: 'transmit' NetworkIoDirectionKey = attribute.Key("network.io.direction") // NetworkLocalAddressKey is the attribute Key conforming to the // "network.local.address" semantic conventions. It represents the local // address of the network connection - IP address or Unix domain socket // name. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '10.1.2.80', '/tmp/my.sock' NetworkLocalAddressKey = attribute.Key("network.local.address") // NetworkLocalPortKey is the attribute Key conforming to the // "network.local.port" semantic conventions. It represents the local port // number of the network connection. // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 65123 NetworkLocalPortKey = attribute.Key("network.local.port") // NetworkPeerAddressKey is the attribute Key conforming to the // "network.peer.address" semantic conventions. It represents the peer // address of the network connection - IP address or Unix domain socket // name. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '10.1.2.80', '/tmp/my.sock' NetworkPeerAddressKey = attribute.Key("network.peer.address") // NetworkPeerPortKey is the attribute Key conforming to the // "network.peer.port" semantic conventions. It represents the peer port // number of the network connection. // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 65123 NetworkPeerPortKey = attribute.Key("network.peer.port") // NetworkProtocolNameKey is the attribute Key conforming to the // "network.protocol.name" semantic conventions. It represents the [OSI // application layer](https://osi-model.com/application-layer/) or non-OSI // equivalent. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'amqp', 'http', 'mqtt' // Note: The value SHOULD be normalized to lowercase. NetworkProtocolNameKey = attribute.Key("network.protocol.name") // NetworkProtocolVersionKey is the attribute Key conforming to the // "network.protocol.version" semantic conventions. It represents the // version of the protocol specified in `network.protocol.name`. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '3.1.1' // Note: `network.protocol.version` refers to the version of the protocol // used and might be different from the protocol client's version. If the // HTTP client has a version of `0.27.2`, but sends HTTP version `1.1`, // this attribute should be set to `1.1`. NetworkProtocolVersionKey = attribute.Key("network.protocol.version") // NetworkTransportKey is the attribute Key conforming to the // "network.transport" semantic conventions. It represents the [OSI // transport layer](https://osi-model.com/transport-layer/) or // [inter-process communication // method](https://wikipedia.org/wiki/Inter-process_communication). // // Type: Enum // RequirementLevel: Optional // Stability: stable // Examples: 'tcp', 'udp' // Note: The value SHOULD be normalized to lowercase. // // Consider always setting the transport when setting a port number, since // a port number is ambiguous without knowing the transport. For example // different processes could be listening on TCP port 12345 and UDP port // 12345. NetworkTransportKey = attribute.Key("network.transport") // NetworkTypeKey is the attribute Key conforming to the "network.type" // semantic conventions. It represents the [OSI network // layer](https://osi-model.com/network-layer/) or non-OSI equivalent. // // Type: Enum // RequirementLevel: Optional // Stability: stable // Examples: 'ipv4', 'ipv6' // Note: The value SHOULD be normalized to lowercase. NetworkTypeKey = attribute.Key("network.type") ) var ( // GPRS NetworkConnectionSubtypeGprs = NetworkConnectionSubtypeKey.String("gprs") // EDGE NetworkConnectionSubtypeEdge = NetworkConnectionSubtypeKey.String("edge") // UMTS NetworkConnectionSubtypeUmts = NetworkConnectionSubtypeKey.String("umts") // CDMA NetworkConnectionSubtypeCdma = NetworkConnectionSubtypeKey.String("cdma") // EVDO Rel. 0 NetworkConnectionSubtypeEvdo0 = NetworkConnectionSubtypeKey.String("evdo_0") // EVDO Rev. A NetworkConnectionSubtypeEvdoA = NetworkConnectionSubtypeKey.String("evdo_a") // CDMA2000 1XRTT NetworkConnectionSubtypeCdma20001xrtt = NetworkConnectionSubtypeKey.String("cdma2000_1xrtt") // HSDPA NetworkConnectionSubtypeHsdpa = NetworkConnectionSubtypeKey.String("hsdpa") // HSUPA NetworkConnectionSubtypeHsupa = NetworkConnectionSubtypeKey.String("hsupa") // HSPA NetworkConnectionSubtypeHspa = NetworkConnectionSubtypeKey.String("hspa") // IDEN NetworkConnectionSubtypeIden = NetworkConnectionSubtypeKey.String("iden") // EVDO Rev. B NetworkConnectionSubtypeEvdoB = NetworkConnectionSubtypeKey.String("evdo_b") // LTE NetworkConnectionSubtypeLte = NetworkConnectionSubtypeKey.String("lte") // EHRPD NetworkConnectionSubtypeEhrpd = NetworkConnectionSubtypeKey.String("ehrpd") // HSPAP NetworkConnectionSubtypeHspap = NetworkConnectionSubtypeKey.String("hspap") // GSM NetworkConnectionSubtypeGsm = NetworkConnectionSubtypeKey.String("gsm") // TD-SCDMA NetworkConnectionSubtypeTdScdma = NetworkConnectionSubtypeKey.String("td_scdma") // IWLAN NetworkConnectionSubtypeIwlan = NetworkConnectionSubtypeKey.String("iwlan") // 5G NR (New Radio) NetworkConnectionSubtypeNr = NetworkConnectionSubtypeKey.String("nr") // 5G NRNSA (New Radio Non-Standalone) NetworkConnectionSubtypeNrnsa = NetworkConnectionSubtypeKey.String("nrnsa") // LTE CA NetworkConnectionSubtypeLteCa = NetworkConnectionSubtypeKey.String("lte_ca") ) var ( // wifi NetworkConnectionTypeWifi = NetworkConnectionTypeKey.String("wifi") // wired NetworkConnectionTypeWired = NetworkConnectionTypeKey.String("wired") // cell NetworkConnectionTypeCell = NetworkConnectionTypeKey.String("cell") // unavailable NetworkConnectionTypeUnavailable = NetworkConnectionTypeKey.String("unavailable") // unknown NetworkConnectionTypeUnknown = NetworkConnectionTypeKey.String("unknown") ) var ( // transmit NetworkIoDirectionTransmit = NetworkIoDirectionKey.String("transmit") // receive NetworkIoDirectionReceive = NetworkIoDirectionKey.String("receive") ) var ( // TCP NetworkTransportTCP = NetworkTransportKey.String("tcp") // UDP NetworkTransportUDP = NetworkTransportKey.String("udp") // Named or anonymous pipe NetworkTransportPipe = NetworkTransportKey.String("pipe") // Unix domain socket NetworkTransportUnix = NetworkTransportKey.String("unix") ) var ( // IPv4 NetworkTypeIpv4 = NetworkTypeKey.String("ipv4") // IPv6 NetworkTypeIpv6 = NetworkTypeKey.String("ipv6") ) // NetworkCarrierIcc returns an attribute KeyValue conforming to the // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1 // alpha-2 2-character country code associated with the mobile carrier network. func NetworkCarrierIcc(val string) attribute.KeyValue { return NetworkCarrierIccKey.String(val) } // NetworkCarrierMcc returns an attribute KeyValue conforming to the // "network.carrier.mcc" semantic conventions. It represents the mobile carrier // country code. func NetworkCarrierMcc(val string) attribute.KeyValue { return NetworkCarrierMccKey.String(val) } // NetworkCarrierMnc returns an attribute KeyValue conforming to the // "network.carrier.mnc" semantic conventions. It represents the mobile carrier // network code. func NetworkCarrierMnc(val string) attribute.KeyValue { return NetworkCarrierMncKey.String(val) } // NetworkCarrierName returns an attribute KeyValue conforming to the // "network.carrier.name" semantic conventions. It represents the name of the // mobile carrier. func NetworkCarrierName(val string) attribute.KeyValue { return NetworkCarrierNameKey.String(val) } // NetworkLocalAddress returns an attribute KeyValue conforming to the // "network.local.address" semantic conventions. It represents the local // address of the network connection - IP address or Unix domain socket name. func NetworkLocalAddress(val string) attribute.KeyValue { return NetworkLocalAddressKey.String(val) } // NetworkLocalPort returns an attribute KeyValue conforming to the // "network.local.port" semantic conventions. It represents the local port // number of the network connection. func NetworkLocalPort(val int) attribute.KeyValue { return NetworkLocalPortKey.Int(val) } // NetworkPeerAddress returns an attribute KeyValue conforming to the // "network.peer.address" semantic conventions. It represents the peer address // of the network connection - IP address or Unix domain socket name. func NetworkPeerAddress(val string) attribute.KeyValue { return NetworkPeerAddressKey.String(val) } // NetworkPeerPort returns an attribute KeyValue conforming to the // "network.peer.port" semantic conventions. It represents the peer port number // of the network connection. func NetworkPeerPort(val int) attribute.KeyValue { return NetworkPeerPortKey.Int(val) } // NetworkProtocolName returns an attribute KeyValue conforming to the // "network.protocol.name" semantic conventions. It represents the [OSI // application layer](https://osi-model.com/application-layer/) or non-OSI // equivalent. func NetworkProtocolName(val string) attribute.KeyValue { return NetworkProtocolNameKey.String(val) } // NetworkProtocolVersion returns an attribute KeyValue conforming to the // "network.protocol.version" semantic conventions. It represents the version // of the protocol specified in `network.protocol.name`. func NetworkProtocolVersion(val string) attribute.KeyValue { return NetworkProtocolVersionKey.String(val) } // Attributes for remote procedure calls. const ( // RPCConnectRPCErrorCodeKey is the attribute Key conforming to the // "rpc.connect_rpc.error_code" semantic conventions. It represents the // [error codes](https://connect.build/docs/protocol/#error-codes) of the // Connect request. Error codes are always string values. // // Type: Enum // RequirementLevel: Optional // Stability: experimental RPCConnectRPCErrorCodeKey = attribute.Key("rpc.connect_rpc.error_code") // RPCGRPCStatusCodeKey is the attribute Key conforming to the // "rpc.grpc.status_code" semantic conventions. It represents the [numeric // status // code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of // the gRPC request. // // Type: Enum // RequirementLevel: Optional // Stability: experimental RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code") // RPCJsonrpcErrorCodeKey is the attribute Key conforming to the // "rpc.jsonrpc.error_code" semantic conventions. It represents the // `error.code` property of response if it is an error response. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: -32700, 100 RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code") // RPCJsonrpcErrorMessageKey is the attribute Key conforming to the // "rpc.jsonrpc.error_message" semantic conventions. It represents the // `error.message` property of response if it is an error response. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'Parse error', 'User already exists' RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message") // RPCJsonrpcRequestIDKey is the attribute Key conforming to the // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` // property of request or response. Since protocol allows id to be int, // string, `null` or missing (for notifications), value is expected to be // cast to string for simplicity. Use empty string in case of `null` value. // Omit entirely if this is a notification. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '10', 'request-7', '' RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id") // RPCJsonrpcVersionKey is the attribute Key conforming to the // "rpc.jsonrpc.version" semantic conventions. It represents the protocol // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 // doesn't specify this, the value can be omitted. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '2.0', '1.0' RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version") // RPCMethodKey is the attribute Key conforming to the "rpc.method" // semantic conventions. It represents the name of the (logical) method // being called, must be equal to the $method part in the span name. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'exampleMethod' // Note: This is the logical name of the method from the RPC interface // perspective, which can be different from the name of any implementing // method/function. The `code.function` attribute may be used to store the // latter (e.g., method actually executing the call on the server side, RPC // client stub method on the client side). RPCMethodKey = attribute.Key("rpc.method") // RPCServiceKey is the attribute Key conforming to the "rpc.service" // semantic conventions. It represents the full (logical) name of the // service being called, including its package name, if applicable. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'myservice.EchoService' // Note: This is the logical name of the service from the RPC interface // perspective, which can be different from the name of any implementing // class. The `code.namespace` attribute may be used to store the latter // (despite the attribute name, it may include a class name; e.g., class // with method actually executing the call on the server side, RPC client // stub class on the client side). RPCServiceKey = attribute.Key("rpc.service") // RPCSystemKey is the attribute Key conforming to the "rpc.system" // semantic conventions. It represents a string identifying the remoting // system. See below for a list of well-known identifiers. // // Type: Enum // RequirementLevel: Optional // Stability: experimental RPCSystemKey = attribute.Key("rpc.system") ) var ( // cancelled RPCConnectRPCErrorCodeCancelled = RPCConnectRPCErrorCodeKey.String("cancelled") // unknown RPCConnectRPCErrorCodeUnknown = RPCConnectRPCErrorCodeKey.String("unknown") // invalid_argument RPCConnectRPCErrorCodeInvalidArgument = RPCConnectRPCErrorCodeKey.String("invalid_argument") // deadline_exceeded RPCConnectRPCErrorCodeDeadlineExceeded = RPCConnectRPCErrorCodeKey.String("deadline_exceeded") // not_found RPCConnectRPCErrorCodeNotFound = RPCConnectRPCErrorCodeKey.String("not_found") // already_exists RPCConnectRPCErrorCodeAlreadyExists = RPCConnectRPCErrorCodeKey.String("already_exists") // permission_denied RPCConnectRPCErrorCodePermissionDenied = RPCConnectRPCErrorCodeKey.String("permission_denied") // resource_exhausted RPCConnectRPCErrorCodeResourceExhausted = RPCConnectRPCErrorCodeKey.String("resource_exhausted") // failed_precondition RPCConnectRPCErrorCodeFailedPrecondition = RPCConnectRPCErrorCodeKey.String("failed_precondition") // aborted RPCConnectRPCErrorCodeAborted = RPCConnectRPCErrorCodeKey.String("aborted") // out_of_range RPCConnectRPCErrorCodeOutOfRange = RPCConnectRPCErrorCodeKey.String("out_of_range") // unimplemented RPCConnectRPCErrorCodeUnimplemented = RPCConnectRPCErrorCodeKey.String("unimplemented") // internal RPCConnectRPCErrorCodeInternal = RPCConnectRPCErrorCodeKey.String("internal") // unavailable RPCConnectRPCErrorCodeUnavailable = RPCConnectRPCErrorCodeKey.String("unavailable") // data_loss RPCConnectRPCErrorCodeDataLoss = RPCConnectRPCErrorCodeKey.String("data_loss") // unauthenticated RPCConnectRPCErrorCodeUnauthenticated = RPCConnectRPCErrorCodeKey.String("unauthenticated") ) var ( // OK RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0) // CANCELLED RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1) // UNKNOWN RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2) // INVALID_ARGUMENT RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3) // DEADLINE_EXCEEDED RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4) // NOT_FOUND RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5) // ALREADY_EXISTS RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6) // PERMISSION_DENIED RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7) // RESOURCE_EXHAUSTED RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8) // FAILED_PRECONDITION RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9) // ABORTED RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10) // OUT_OF_RANGE RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11) // UNIMPLEMENTED RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12) // INTERNAL RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13) // UNAVAILABLE RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14) // DATA_LOSS RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15) // UNAUTHENTICATED RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16) ) var ( // gRPC RPCSystemGRPC = RPCSystemKey.String("grpc") // Java RMI RPCSystemJavaRmi = RPCSystemKey.String("java_rmi") // .NET WCF RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf") // Apache Dubbo RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo") // Connect RPC RPCSystemConnectRPC = RPCSystemKey.String("connect_rpc") ) // RPCJsonrpcErrorCode returns an attribute KeyValue conforming to the // "rpc.jsonrpc.error_code" semantic conventions. It represents the // `error.code` property of response if it is an error response. func RPCJsonrpcErrorCode(val int) attribute.KeyValue { return RPCJsonrpcErrorCodeKey.Int(val) } // RPCJsonrpcErrorMessage returns an attribute KeyValue conforming to the // "rpc.jsonrpc.error_message" semantic conventions. It represents the // `error.message` property of response if it is an error response. func RPCJsonrpcErrorMessage(val string) attribute.KeyValue { return RPCJsonrpcErrorMessageKey.String(val) } // RPCJsonrpcRequestID returns an attribute KeyValue conforming to the // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` // property of request or response. Since protocol allows id to be int, string, // `null` or missing (for notifications), value is expected to be cast to // string for simplicity. Use empty string in case of `null` value. Omit // entirely if this is a notification. func RPCJsonrpcRequestID(val string) attribute.KeyValue { return RPCJsonrpcRequestIDKey.String(val) } // RPCJsonrpcVersion returns an attribute KeyValue conforming to the // "rpc.jsonrpc.version" semantic conventions. It represents the protocol // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 // doesn't specify this, the value can be omitted. func RPCJsonrpcVersion(val string) attribute.KeyValue { return RPCJsonrpcVersionKey.String(val) } // RPCMethod returns an attribute KeyValue conforming to the "rpc.method" // semantic conventions. It represents the name of the (logical) method being // called, must be equal to the $method part in the span name. func RPCMethod(val string) attribute.KeyValue { return RPCMethodKey.String(val) } // RPCService returns an attribute KeyValue conforming to the "rpc.service" // semantic conventions. It represents the full (logical) name of the service // being called, including its package name, if applicable. func RPCService(val string) attribute.KeyValue { return RPCServiceKey.String(val) } // These attributes may be used to describe the server in a connection-based // network interaction where there is one side that initiates the connection // (the client is the side that initiates the connection). This covers all TCP // network interactions since TCP is connection-based and one side initiates // the connection (an exception is made for peer-to-peer communication over TCP // where the "user-facing" surface of the protocol / API doesn't expose a clear // notion of client and server). This also covers UDP network interactions // where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS. const ( // ServerAddressKey is the attribute Key conforming to the "server.address" // semantic conventions. It represents the server domain name if available // without reverse DNS lookup; otherwise, IP address or Unix domain socket // name. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'example.com', '10.1.2.80', '/tmp/my.sock' // Note: When observed from the client side, and when communicating through // an intermediary, `server.address` SHOULD represent the server address // behind any intermediaries, for example proxies, if it's available. ServerAddressKey = attribute.Key("server.address") // ServerPortKey is the attribute Key conforming to the "server.port" // semantic conventions. It represents the server port number. // // Type: int // RequirementLevel: Optional // Stability: stable // Examples: 80, 8080, 443 // Note: When observed from the client side, and when communicating through // an intermediary, `server.port` SHOULD represent the server port behind // any intermediaries, for example proxies, if it's available. ServerPortKey = attribute.Key("server.port") ) // ServerAddress returns an attribute KeyValue conforming to the // "server.address" semantic conventions. It represents the server domain name // if available without reverse DNS lookup; otherwise, IP address or Unix // domain socket name. func ServerAddress(val string) attribute.KeyValue { return ServerAddressKey.String(val) } // ServerPort returns an attribute KeyValue conforming to the "server.port" // semantic conventions. It represents the server port number. func ServerPort(val int) attribute.KeyValue { return ServerPortKey.Int(val) } // These attributes may be used to describe the sender of a network // exchange/packet. These should be used when there is no client/server // relationship between the two sides, or when that relationship is unknown. // This covers low-level network interactions (e.g. packet tracing) where you // don't know if there was a connection or which side initiated it. This also // covers unidirectional UDP flows and peer-to-peer communication where the // "user-facing" surface of the protocol / API doesn't expose a clear notion of // client and server. const ( // SourceAddressKey is the attribute Key conforming to the "source.address" // semantic conventions. It represents the source address - domain name if // available without reverse DNS lookup; otherwise, IP address or Unix // domain socket name. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'source.example.com', '10.1.2.80', '/tmp/my.sock' // Note: When observed from the destination side, and when communicating // through an intermediary, `source.address` SHOULD represent the source // address behind any intermediaries, for example proxies, if it's // available. SourceAddressKey = attribute.Key("source.address") // SourcePortKey is the attribute Key conforming to the "source.port" // semantic conventions. It represents the source port number // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 3389, 2888 SourcePortKey = attribute.Key("source.port") ) // SourceAddress returns an attribute KeyValue conforming to the // "source.address" semantic conventions. It represents the source address - // domain name if available without reverse DNS lookup; otherwise, IP address // or Unix domain socket name. func SourceAddress(val string) attribute.KeyValue { return SourceAddressKey.String(val) } // SourcePort returns an attribute KeyValue conforming to the "source.port" // semantic conventions. It represents the source port number func SourcePort(val int) attribute.KeyValue { return SourcePortKey.Int(val) } // Semantic convention attributes in the TLS namespace. const ( // TLSCipherKey is the attribute Key conforming to the "tls.cipher" // semantic conventions. It represents the string indicating the // [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5) // used during the current connection. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'TLS_RSA_WITH_3DES_EDE_CBC_SHA', // 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256' // Note: The values allowed for `tls.cipher` MUST be one of the // `Descriptions` of the [registered TLS Cipher // Suits](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#table-tls-parameters-4). TLSCipherKey = attribute.Key("tls.cipher") // TLSClientCertificateKey is the attribute Key conforming to the // "tls.client.certificate" semantic conventions. It represents the // pEM-encoded stand-alone certificate offered by the client. This is // usually mutually-exclusive of `client.certificate_chain` since this // value also exists in that list. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'MII...' TLSClientCertificateKey = attribute.Key("tls.client.certificate") // TLSClientCertificateChainKey is the attribute Key conforming to the // "tls.client.certificate_chain" semantic conventions. It represents the // array of PEM-encoded certificates that make up the certificate chain // offered by the client. This is usually mutually-exclusive of // `client.certificate` since that value should be the first certificate in // the chain. // // Type: string[] // RequirementLevel: Optional // Stability: experimental // Examples: 'MII...', 'MI...' TLSClientCertificateChainKey = attribute.Key("tls.client.certificate_chain") // TLSClientHashMd5Key is the attribute Key conforming to the // "tls.client.hash.md5" semantic conventions. It represents the // certificate fingerprint using the MD5 digest of DER-encoded version of // certificate offered by the client. For consistency with other hash // values, this value should be formatted as an uppercase hash. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC' TLSClientHashMd5Key = attribute.Key("tls.client.hash.md5") // TLSClientHashSha1Key is the attribute Key conforming to the // "tls.client.hash.sha1" semantic conventions. It represents the // certificate fingerprint using the SHA1 digest of DER-encoded version of // certificate offered by the client. For consistency with other hash // values, this value should be formatted as an uppercase hash. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '9E393D93138888D288266C2D915214D1D1CCEB2A' TLSClientHashSha1Key = attribute.Key("tls.client.hash.sha1") // TLSClientHashSha256Key is the attribute Key conforming to the // "tls.client.hash.sha256" semantic conventions. It represents the // certificate fingerprint using the SHA256 digest of DER-encoded version // of certificate offered by the client. For consistency with other hash // values, this value should be formatted as an uppercase hash. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: // '0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0' TLSClientHashSha256Key = attribute.Key("tls.client.hash.sha256") // TLSClientIssuerKey is the attribute Key conforming to the // "tls.client.issuer" semantic conventions. It represents the // distinguished name of // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) // of the issuer of the x.509 certificate presented by the client. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'CN=Example Root CA, OU=Infrastructure Team, DC=example, // DC=com' TLSClientIssuerKey = attribute.Key("tls.client.issuer") // TLSClientJa3Key is the attribute Key conforming to the "tls.client.ja3" // semantic conventions. It represents a hash that identifies clients based // on how they perform an SSL/TLS handshake. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'd4e5b18d6b55c71272893221c96ba240' TLSClientJa3Key = attribute.Key("tls.client.ja3") // TLSClientNotAfterKey is the attribute Key conforming to the // "tls.client.not_after" semantic conventions. It represents the date/Time // indicating when client certificate is no longer considered valid. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '2021-01-01T00:00:00.000Z' TLSClientNotAfterKey = attribute.Key("tls.client.not_after") // TLSClientNotBeforeKey is the attribute Key conforming to the // "tls.client.not_before" semantic conventions. It represents the // date/Time indicating when client certificate is first considered valid. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '1970-01-01T00:00:00.000Z' TLSClientNotBeforeKey = attribute.Key("tls.client.not_before") // TLSClientServerNameKey is the attribute Key conforming to the // "tls.client.server_name" semantic conventions. It represents the also // called an SNI, this tells the server which hostname to which the client // is attempting to connect to. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'opentelemetry.io' TLSClientServerNameKey = attribute.Key("tls.client.server_name") // TLSClientSubjectKey is the attribute Key conforming to the // "tls.client.subject" semantic conventions. It represents the // distinguished name of subject of the x.509 certificate presented by the // client. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'CN=myclient, OU=Documentation Team, DC=example, DC=com' TLSClientSubjectKey = attribute.Key("tls.client.subject") // TLSClientSupportedCiphersKey is the attribute Key conforming to the // "tls.client.supported_ciphers" semantic conventions. It represents the // array of ciphers offered by the client during the client hello. // // Type: string[] // RequirementLevel: Optional // Stability: experimental // Examples: '"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", // "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "..."' TLSClientSupportedCiphersKey = attribute.Key("tls.client.supported_ciphers") // TLSCurveKey is the attribute Key conforming to the "tls.curve" semantic // conventions. It represents the string indicating the curve used for the // given cipher, when applicable // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'secp256r1' TLSCurveKey = attribute.Key("tls.curve") // TLSEstablishedKey is the attribute Key conforming to the // "tls.established" semantic conventions. It represents the boolean flag // indicating if the TLS negotiation was successful and transitioned to an // encrypted tunnel. // // Type: boolean // RequirementLevel: Optional // Stability: experimental // Examples: True TLSEstablishedKey = attribute.Key("tls.established") // TLSNextProtocolKey is the attribute Key conforming to the // "tls.next_protocol" semantic conventions. It represents the string // indicating the protocol being tunneled. Per the values in the [IANA // registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids), // this string should be lower case. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'http/1.1' TLSNextProtocolKey = attribute.Key("tls.next_protocol") // TLSProtocolNameKey is the attribute Key conforming to the // "tls.protocol.name" semantic conventions. It represents the normalized // lowercase protocol name parsed from original string of the negotiated // [SSL/TLS protocol // version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) // // Type: Enum // RequirementLevel: Optional // Stability: experimental TLSProtocolNameKey = attribute.Key("tls.protocol.name") // TLSProtocolVersionKey is the attribute Key conforming to the // "tls.protocol.version" semantic conventions. It represents the numeric // part of the version parsed from the original string of the negotiated // [SSL/TLS protocol // version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '1.2', '3' TLSProtocolVersionKey = attribute.Key("tls.protocol.version") // TLSResumedKey is the attribute Key conforming to the "tls.resumed" // semantic conventions. It represents the boolean flag indicating if this // TLS connection was resumed from an existing TLS negotiation. // // Type: boolean // RequirementLevel: Optional // Stability: experimental // Examples: True TLSResumedKey = attribute.Key("tls.resumed") // TLSServerCertificateKey is the attribute Key conforming to the // "tls.server.certificate" semantic conventions. It represents the // pEM-encoded stand-alone certificate offered by the server. This is // usually mutually-exclusive of `server.certificate_chain` since this // value also exists in that list. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'MII...' TLSServerCertificateKey = attribute.Key("tls.server.certificate") // TLSServerCertificateChainKey is the attribute Key conforming to the // "tls.server.certificate_chain" semantic conventions. It represents the // array of PEM-encoded certificates that make up the certificate chain // offered by the server. This is usually mutually-exclusive of // `server.certificate` since that value should be the first certificate in // the chain. // // Type: string[] // RequirementLevel: Optional // Stability: experimental // Examples: 'MII...', 'MI...' TLSServerCertificateChainKey = attribute.Key("tls.server.certificate_chain") // TLSServerHashMd5Key is the attribute Key conforming to the // "tls.server.hash.md5" semantic conventions. It represents the // certificate fingerprint using the MD5 digest of DER-encoded version of // certificate offered by the server. For consistency with other hash // values, this value should be formatted as an uppercase hash. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC' TLSServerHashMd5Key = attribute.Key("tls.server.hash.md5") // TLSServerHashSha1Key is the attribute Key conforming to the // "tls.server.hash.sha1" semantic conventions. It represents the // certificate fingerprint using the SHA1 digest of DER-encoded version of // certificate offered by the server. For consistency with other hash // values, this value should be formatted as an uppercase hash. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '9E393D93138888D288266C2D915214D1D1CCEB2A' TLSServerHashSha1Key = attribute.Key("tls.server.hash.sha1") // TLSServerHashSha256Key is the attribute Key conforming to the // "tls.server.hash.sha256" semantic conventions. It represents the // certificate fingerprint using the SHA256 digest of DER-encoded version // of certificate offered by the server. For consistency with other hash // values, this value should be formatted as an uppercase hash. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: // '0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0' TLSServerHashSha256Key = attribute.Key("tls.server.hash.sha256") // TLSServerIssuerKey is the attribute Key conforming to the // "tls.server.issuer" semantic conventions. It represents the // distinguished name of // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) // of the issuer of the x.509 certificate presented by the client. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'CN=Example Root CA, OU=Infrastructure Team, DC=example, // DC=com' TLSServerIssuerKey = attribute.Key("tls.server.issuer") // TLSServerJa3sKey is the attribute Key conforming to the // "tls.server.ja3s" semantic conventions. It represents a hash that // identifies servers based on how they perform an SSL/TLS handshake. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'd4e5b18d6b55c71272893221c96ba240' TLSServerJa3sKey = attribute.Key("tls.server.ja3s") // TLSServerNotAfterKey is the attribute Key conforming to the // "tls.server.not_after" semantic conventions. It represents the date/Time // indicating when server certificate is no longer considered valid. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '2021-01-01T00:00:00.000Z' TLSServerNotAfterKey = attribute.Key("tls.server.not_after") // TLSServerNotBeforeKey is the attribute Key conforming to the // "tls.server.not_before" semantic conventions. It represents the // date/Time indicating when server certificate is first considered valid. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '1970-01-01T00:00:00.000Z' TLSServerNotBeforeKey = attribute.Key("tls.server.not_before") // TLSServerSubjectKey is the attribute Key conforming to the // "tls.server.subject" semantic conventions. It represents the // distinguished name of subject of the x.509 certificate presented by the // server. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'CN=myserver, OU=Documentation Team, DC=example, DC=com' TLSServerSubjectKey = attribute.Key("tls.server.subject") ) var ( // ssl TLSProtocolNameSsl = TLSProtocolNameKey.String("ssl") // tls TLSProtocolNameTLS = TLSProtocolNameKey.String("tls") ) // TLSCipher returns an attribute KeyValue conforming to the "tls.cipher" // semantic conventions. It represents the string indicating the // [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5) used // during the current connection. func TLSCipher(val string) attribute.KeyValue { return TLSCipherKey.String(val) } // TLSClientCertificate returns an attribute KeyValue conforming to the // "tls.client.certificate" semantic conventions. It represents the pEM-encoded // stand-alone certificate offered by the client. This is usually // mutually-exclusive of `client.certificate_chain` since this value also // exists in that list. func TLSClientCertificate(val string) attribute.KeyValue { return TLSClientCertificateKey.String(val) } // TLSClientCertificateChain returns an attribute KeyValue conforming to the // "tls.client.certificate_chain" semantic conventions. It represents the array // of PEM-encoded certificates that make up the certificate chain offered by // the client. This is usually mutually-exclusive of `client.certificate` since // that value should be the first certificate in the chain. func TLSClientCertificateChain(val ...string) attribute.KeyValue { return TLSClientCertificateChainKey.StringSlice(val) } // TLSClientHashMd5 returns an attribute KeyValue conforming to the // "tls.client.hash.md5" semantic conventions. It represents the certificate // fingerprint using the MD5 digest of DER-encoded version of certificate // offered by the client. For consistency with other hash values, this value // should be formatted as an uppercase hash. func TLSClientHashMd5(val string) attribute.KeyValue { return TLSClientHashMd5Key.String(val) } // TLSClientHashSha1 returns an attribute KeyValue conforming to the // "tls.client.hash.sha1" semantic conventions. It represents the certificate // fingerprint using the SHA1 digest of DER-encoded version of certificate // offered by the client. For consistency with other hash values, this value // should be formatted as an uppercase hash. func TLSClientHashSha1(val string) attribute.KeyValue { return TLSClientHashSha1Key.String(val) } // TLSClientHashSha256 returns an attribute KeyValue conforming to the // "tls.client.hash.sha256" semantic conventions. It represents the certificate // fingerprint using the SHA256 digest of DER-encoded version of certificate // offered by the client. For consistency with other hash values, this value // should be formatted as an uppercase hash. func TLSClientHashSha256(val string) attribute.KeyValue { return TLSClientHashSha256Key.String(val) } // TLSClientIssuer returns an attribute KeyValue conforming to the // "tls.client.issuer" semantic conventions. It represents the distinguished // name of // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of // the issuer of the x.509 certificate presented by the client. func TLSClientIssuer(val string) attribute.KeyValue { return TLSClientIssuerKey.String(val) } // TLSClientJa3 returns an attribute KeyValue conforming to the // "tls.client.ja3" semantic conventions. It represents a hash that identifies // clients based on how they perform an SSL/TLS handshake. func TLSClientJa3(val string) attribute.KeyValue { return TLSClientJa3Key.String(val) } // TLSClientNotAfter returns an attribute KeyValue conforming to the // "tls.client.not_after" semantic conventions. It represents the date/Time // indicating when client certificate is no longer considered valid. func TLSClientNotAfter(val string) attribute.KeyValue { return TLSClientNotAfterKey.String(val) } // TLSClientNotBefore returns an attribute KeyValue conforming to the // "tls.client.not_before" semantic conventions. It represents the date/Time // indicating when client certificate is first considered valid. func TLSClientNotBefore(val string) attribute.KeyValue { return TLSClientNotBeforeKey.String(val) } // TLSClientServerName returns an attribute KeyValue conforming to the // "tls.client.server_name" semantic conventions. It represents the also called // an SNI, this tells the server which hostname to which the client is // attempting to connect to. func TLSClientServerName(val string) attribute.KeyValue { return TLSClientServerNameKey.String(val) } // TLSClientSubject returns an attribute KeyValue conforming to the // "tls.client.subject" semantic conventions. It represents the distinguished // name of subject of the x.509 certificate presented by the client. func TLSClientSubject(val string) attribute.KeyValue { return TLSClientSubjectKey.String(val) } // TLSClientSupportedCiphers returns an attribute KeyValue conforming to the // "tls.client.supported_ciphers" semantic conventions. It represents the array // of ciphers offered by the client during the client hello. func TLSClientSupportedCiphers(val ...string) attribute.KeyValue { return TLSClientSupportedCiphersKey.StringSlice(val) } // TLSCurve returns an attribute KeyValue conforming to the "tls.curve" // semantic conventions. It represents the string indicating the curve used for // the given cipher, when applicable func TLSCurve(val string) attribute.KeyValue { return TLSCurveKey.String(val) } // TLSEstablished returns an attribute KeyValue conforming to the // "tls.established" semantic conventions. It represents the boolean flag // indicating if the TLS negotiation was successful and transitioned to an // encrypted tunnel. func TLSEstablished(val bool) attribute.KeyValue { return TLSEstablishedKey.Bool(val) } // TLSNextProtocol returns an attribute KeyValue conforming to the // "tls.next_protocol" semantic conventions. It represents the string // indicating the protocol being tunneled. Per the values in the [IANA // registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids), // this string should be lower case. func TLSNextProtocol(val string) attribute.KeyValue { return TLSNextProtocolKey.String(val) } // TLSProtocolVersion returns an attribute KeyValue conforming to the // "tls.protocol.version" semantic conventions. It represents the numeric part // of the version parsed from the original string of the negotiated [SSL/TLS // protocol // version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) func TLSProtocolVersion(val string) attribute.KeyValue { return TLSProtocolVersionKey.String(val) } // TLSResumed returns an attribute KeyValue conforming to the "tls.resumed" // semantic conventions. It represents the boolean flag indicating if this TLS // connection was resumed from an existing TLS negotiation. func TLSResumed(val bool) attribute.KeyValue { return TLSResumedKey.Bool(val) } // TLSServerCertificate returns an attribute KeyValue conforming to the // "tls.server.certificate" semantic conventions. It represents the pEM-encoded // stand-alone certificate offered by the server. This is usually // mutually-exclusive of `server.certificate_chain` since this value also // exists in that list. func TLSServerCertificate(val string) attribute.KeyValue { return TLSServerCertificateKey.String(val) } // TLSServerCertificateChain returns an attribute KeyValue conforming to the // "tls.server.certificate_chain" semantic conventions. It represents the array // of PEM-encoded certificates that make up the certificate chain offered by // the server. This is usually mutually-exclusive of `server.certificate` since // that value should be the first certificate in the chain. func TLSServerCertificateChain(val ...string) attribute.KeyValue { return TLSServerCertificateChainKey.StringSlice(val) } // TLSServerHashMd5 returns an attribute KeyValue conforming to the // "tls.server.hash.md5" semantic conventions. It represents the certificate // fingerprint using the MD5 digest of DER-encoded version of certificate // offered by the server. For consistency with other hash values, this value // should be formatted as an uppercase hash. func TLSServerHashMd5(val string) attribute.KeyValue { return TLSServerHashMd5Key.String(val) } // TLSServerHashSha1 returns an attribute KeyValue conforming to the // "tls.server.hash.sha1" semantic conventions. It represents the certificate // fingerprint using the SHA1 digest of DER-encoded version of certificate // offered by the server. For consistency with other hash values, this value // should be formatted as an uppercase hash. func TLSServerHashSha1(val string) attribute.KeyValue { return TLSServerHashSha1Key.String(val) } // TLSServerHashSha256 returns an attribute KeyValue conforming to the // "tls.server.hash.sha256" semantic conventions. It represents the certificate // fingerprint using the SHA256 digest of DER-encoded version of certificate // offered by the server. For consistency with other hash values, this value // should be formatted as an uppercase hash. func TLSServerHashSha256(val string) attribute.KeyValue { return TLSServerHashSha256Key.String(val) } // TLSServerIssuer returns an attribute KeyValue conforming to the // "tls.server.issuer" semantic conventions. It represents the distinguished // name of // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of // the issuer of the x.509 certificate presented by the client. func TLSServerIssuer(val string) attribute.KeyValue { return TLSServerIssuerKey.String(val) } // TLSServerJa3s returns an attribute KeyValue conforming to the // "tls.server.ja3s" semantic conventions. It represents a hash that identifies // servers based on how they perform an SSL/TLS handshake. func TLSServerJa3s(val string) attribute.KeyValue { return TLSServerJa3sKey.String(val) } // TLSServerNotAfter returns an attribute KeyValue conforming to the // "tls.server.not_after" semantic conventions. It represents the date/Time // indicating when server certificate is no longer considered valid. func TLSServerNotAfter(val string) attribute.KeyValue { return TLSServerNotAfterKey.String(val) } // TLSServerNotBefore returns an attribute KeyValue conforming to the // "tls.server.not_before" semantic conventions. It represents the date/Time // indicating when server certificate is first considered valid. func TLSServerNotBefore(val string) attribute.KeyValue { return TLSServerNotBeforeKey.String(val) } // TLSServerSubject returns an attribute KeyValue conforming to the // "tls.server.subject" semantic conventions. It represents the distinguished // name of subject of the x.509 certificate presented by the server. func TLSServerSubject(val string) attribute.KeyValue { return TLSServerSubjectKey.String(val) } // Attributes describing URL. const ( // URLFragmentKey is the attribute Key conforming to the "url.fragment" // semantic conventions. It represents the [URI // fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'SemConv' URLFragmentKey = attribute.Key("url.fragment") // URLFullKey is the attribute Key conforming to the "url.full" semantic // conventions. It represents the absolute URL describing a network // resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv', // '//localhost' // Note: For network calls, URL usually has // `scheme://host[:port][path][?query][#fragment]` format, where the // fragment is not transmitted over HTTP, but if it is known, it SHOULD be // included nevertheless. // `url.full` MUST NOT contain credentials passed via URL in form of // `https://username:password@www.example.com/`. In such case username and // password SHOULD be redacted and attribute's value SHOULD be // `https://REDACTED:REDACTED@www.example.com/`. // `url.full` SHOULD capture the absolute URL when it is available (or can // be reconstructed) and SHOULD NOT be validated or modified except for // sanitizing purposes. URLFullKey = attribute.Key("url.full") // URLPathKey is the attribute Key conforming to the "url.path" semantic // conventions. It represents the [URI // path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: '/search' URLPathKey = attribute.Key("url.path") // URLQueryKey is the attribute Key conforming to the "url.query" semantic // conventions. It represents the [URI // query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'q=OpenTelemetry' // Note: Sensitive content provided in query string SHOULD be scrubbed when // instrumentations can identify it. URLQueryKey = attribute.Key("url.query") // URLSchemeKey is the attribute Key conforming to the "url.scheme" // semantic conventions. It represents the [URI // scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component // identifying the used protocol. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'https', 'ftp', 'telnet' URLSchemeKey = attribute.Key("url.scheme") ) // URLFragment returns an attribute KeyValue conforming to the // "url.fragment" semantic conventions. It represents the [URI // fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component func URLFragment(val string) attribute.KeyValue { return URLFragmentKey.String(val) } // URLFull returns an attribute KeyValue conforming to the "url.full" // semantic conventions. It represents the absolute URL describing a network // resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) func URLFull(val string) attribute.KeyValue { return URLFullKey.String(val) } // URLPath returns an attribute KeyValue conforming to the "url.path" // semantic conventions. It represents the [URI // path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component func URLPath(val string) attribute.KeyValue { return URLPathKey.String(val) } // URLQuery returns an attribute KeyValue conforming to the "url.query" // semantic conventions. It represents the [URI // query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component func URLQuery(val string) attribute.KeyValue { return URLQueryKey.String(val) } // URLScheme returns an attribute KeyValue conforming to the "url.scheme" // semantic conventions. It represents the [URI // scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component // identifying the used protocol. func URLScheme(val string) attribute.KeyValue { return URLSchemeKey.String(val) } // Describes user-agent attributes. const ( // UserAgentOriginalKey is the attribute Key conforming to the // "user_agent.original" semantic conventions. It represents the value of // the [HTTP // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) // header sent by the client. // // Type: string // RequirementLevel: Optional // Stability: stable // Examples: 'CERN-LineMode/2.15 libwww/2.17b3', 'Mozilla/5.0 (iPhone; CPU // iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) // Version/14.1.2 Mobile/15E148 Safari/604.1' UserAgentOriginalKey = attribute.Key("user_agent.original") ) // UserAgentOriginal returns an attribute KeyValue conforming to the // "user_agent.original" semantic conventions. It represents the value of the // [HTTP // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) // header sent by the client. func UserAgentOriginal(val string) attribute.KeyValue { return UserAgentOriginalKey.String(val) } // Session is defined as the period of time encompassing all activities // performed by the application and the actions executed by the end user. // Consequently, a Session is represented as a collection of Logs, Events, and // Spans emitted by the Client Application throughout the Session's duration. // Each Session is assigned a unique identifier, which is included as an // attribute in the Logs, Events, and Spans generated during the Session's // lifecycle. // When a session reaches end of life, typically due to user inactivity or // session timeout, a new session identifier will be assigned. The previous // session identifier may be provided by the instrumentation so that telemetry // backends can link the two sessions. const ( // SessionIDKey is the attribute Key conforming to the "session.id" // semantic conventions. It represents a unique id to identify a session. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '00112233-4455-6677-8899-aabbccddeeff' SessionIDKey = attribute.Key("session.id") // SessionPreviousIDKey is the attribute Key conforming to the // "session.previous_id" semantic conventions. It represents the previous // `session.id` for this user, when known. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '00112233-4455-6677-8899-aabbccddeeff' SessionPreviousIDKey = attribute.Key("session.previous_id") ) // SessionID returns an attribute KeyValue conforming to the "session.id" // semantic conventions. It represents a unique id to identify a session. func SessionID(val string) attribute.KeyValue { return SessionIDKey.String(val) } // SessionPreviousID returns an attribute KeyValue conforming to the // "session.previous_id" semantic conventions. It represents the previous // `session.id` for this user, when known. func SessionPreviousID(val string) attribute.KeyValue { return SessionPreviousIDKey.String(val) } ================================================ FILE: vendor/go.opentelemetry.io/otel/semconv/v1.24.0/doc.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 // Package semconv implements OpenTelemetry semantic conventions. // // OpenTelemetry semantic conventions are agreed standardized naming // patterns for OpenTelemetry things. This package represents the v1.24.0 // version of the OpenTelemetry semantic conventions. package semconv // import "go.opentelemetry.io/otel/semconv/v1.24.0" ================================================ FILE: vendor/go.opentelemetry.io/otel/semconv/v1.24.0/event.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 // Code generated from semantic convention specification. DO NOT EDIT. package semconv // import "go.opentelemetry.io/otel/semconv/v1.24.0" import "go.opentelemetry.io/otel/attribute" // This event represents an occurrence of a lifecycle transition on the iOS // platform. const ( // IosStateKey is the attribute Key conforming to the "ios.state" semantic // conventions. It represents the this attribute represents the state the // application has transitioned into at the occurrence of the event. // // Type: Enum // RequirementLevel: Required // Stability: experimental // Note: The iOS lifecycle states are defined in the [UIApplicationDelegate // documentation](https://developer.apple.com/documentation/uikit/uiapplicationdelegate#1656902), // and from which the `OS terminology` column values are derived. IosStateKey = attribute.Key("ios.state") ) var ( // The app has become `active`. Associated with UIKit notification `applicationDidBecomeActive` IosStateActive = IosStateKey.String("active") // The app is now `inactive`. Associated with UIKit notification `applicationWillResignActive` IosStateInactive = IosStateKey.String("inactive") // The app is now in the background. This value is associated with UIKit notification `applicationDidEnterBackground` IosStateBackground = IosStateKey.String("background") // The app is now in the foreground. This value is associated with UIKit notification `applicationWillEnterForeground` IosStateForeground = IosStateKey.String("foreground") // The app is about to terminate. Associated with UIKit notification `applicationWillTerminate` IosStateTerminate = IosStateKey.String("terminate") ) // This event represents an occurrence of a lifecycle transition on the Android // platform. const ( // AndroidStateKey is the attribute Key conforming to the "android.state" // semantic conventions. It represents the this attribute represents the // state the application has transitioned into at the occurrence of the // event. // // Type: Enum // RequirementLevel: Required // Stability: experimental // Note: The Android lifecycle states are defined in [Activity lifecycle // callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc), // and from which the `OS identifiers` are derived. AndroidStateKey = attribute.Key("android.state") ) var ( // Any time before Activity.onResume() or, if the app has no Activity, Context.startService() has been called in the app for the first time AndroidStateCreated = AndroidStateKey.String("created") // Any time after Activity.onPause() or, if the app has no Activity, Context.stopService() has been called when the app was in the foreground state AndroidStateBackground = AndroidStateKey.String("background") // Any time after Activity.onResume() or, if the app has no Activity, Context.startService() has been called when the app was in either the created or background states AndroidStateForeground = AndroidStateKey.String("foreground") ) // This semantic convention defines the attributes used to represent a feature // flag evaluation as an event. const ( // FeatureFlagKeyKey is the attribute Key conforming to the // "feature_flag.key" semantic conventions. It represents the unique // identifier of the feature flag. // // Type: string // RequirementLevel: Required // Stability: experimental // Examples: 'logo-color' FeatureFlagKeyKey = attribute.Key("feature_flag.key") // FeatureFlagProviderNameKey is the attribute Key conforming to the // "feature_flag.provider_name" semantic conventions. It represents the // name of the service provider that performs the flag evaluation. // // Type: string // RequirementLevel: Recommended // Stability: experimental // Examples: 'Flag Manager' FeatureFlagProviderNameKey = attribute.Key("feature_flag.provider_name") // FeatureFlagVariantKey is the attribute Key conforming to the // "feature_flag.variant" semantic conventions. It represents the sHOULD be // a semantic identifier for a value. If one is unavailable, a stringified // version of the value can be used. // // Type: string // RequirementLevel: Recommended // Stability: experimental // Examples: 'red', 'true', 'on' // Note: A semantic identifier, commonly referred to as a variant, provides // a means // for referring to a value without including the value itself. This can // provide additional context for understanding the meaning behind a value. // For example, the variant `red` maybe be used for the value `#c05543`. // // A stringified version of the value can be used in situations where a // semantic identifier is unavailable. String representation of the value // should be determined by the implementer. FeatureFlagVariantKey = attribute.Key("feature_flag.variant") ) // FeatureFlagKey returns an attribute KeyValue conforming to the // "feature_flag.key" semantic conventions. It represents the unique identifier // of the feature flag. func FeatureFlagKey(val string) attribute.KeyValue { return FeatureFlagKeyKey.String(val) } // FeatureFlagProviderName returns an attribute KeyValue conforming to the // "feature_flag.provider_name" semantic conventions. It represents the name of // the service provider that performs the flag evaluation. func FeatureFlagProviderName(val string) attribute.KeyValue { return FeatureFlagProviderNameKey.String(val) } // FeatureFlagVariant returns an attribute KeyValue conforming to the // "feature_flag.variant" semantic conventions. It represents the sHOULD be a // semantic identifier for a value. If one is unavailable, a stringified // version of the value can be used. func FeatureFlagVariant(val string) attribute.KeyValue { return FeatureFlagVariantKey.String(val) } // RPC received/sent message. const ( // MessageCompressedSizeKey is the attribute Key conforming to the // "message.compressed_size" semantic conventions. It represents the // compressed size of the message in bytes. // // Type: int // RequirementLevel: Optional // Stability: experimental MessageCompressedSizeKey = attribute.Key("message.compressed_size") // MessageIDKey is the attribute Key conforming to the "message.id" // semantic conventions. It represents the mUST be calculated as two // different counters starting from `1` one for sent messages and one for // received message. // // Type: int // RequirementLevel: Optional // Stability: experimental // Note: This way we guarantee that the values will be consistent between // different implementations. MessageIDKey = attribute.Key("message.id") // MessageTypeKey is the attribute Key conforming to the "message.type" // semantic conventions. It represents the whether this is a received or // sent message. // // Type: Enum // RequirementLevel: Optional // Stability: experimental MessageTypeKey = attribute.Key("message.type") // MessageUncompressedSizeKey is the attribute Key conforming to the // "message.uncompressed_size" semantic conventions. It represents the // uncompressed size of the message in bytes. // // Type: int // RequirementLevel: Optional // Stability: experimental MessageUncompressedSizeKey = attribute.Key("message.uncompressed_size") ) var ( // sent MessageTypeSent = MessageTypeKey.String("SENT") // received MessageTypeReceived = MessageTypeKey.String("RECEIVED") ) // MessageCompressedSize returns an attribute KeyValue conforming to the // "message.compressed_size" semantic conventions. It represents the compressed // size of the message in bytes. func MessageCompressedSize(val int) attribute.KeyValue { return MessageCompressedSizeKey.Int(val) } // MessageID returns an attribute KeyValue conforming to the "message.id" // semantic conventions. It represents the mUST be calculated as two different // counters starting from `1` one for sent messages and one for received // message. func MessageID(val int) attribute.KeyValue { return MessageIDKey.Int(val) } // MessageUncompressedSize returns an attribute KeyValue conforming to the // "message.uncompressed_size" semantic conventions. It represents the // uncompressed size of the message in bytes. func MessageUncompressedSize(val int) attribute.KeyValue { return MessageUncompressedSizeKey.Int(val) } ================================================ FILE: vendor/go.opentelemetry.io/otel/semconv/v1.24.0/exception.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package semconv // import "go.opentelemetry.io/otel/semconv/v1.24.0" const ( // ExceptionEventName is the name of the Span event representing an exception. ExceptionEventName = "exception" ) ================================================ FILE: vendor/go.opentelemetry.io/otel/semconv/v1.24.0/metric.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 // Code generated from semantic convention specification. DO NOT EDIT. package semconv // import "go.opentelemetry.io/otel/semconv/v1.24.0" const ( // DBClientConnectionsUsage is the metric conforming to the // "db.client.connections.usage" semantic conventions. It represents the number // of connections that are currently in state described by the `state` // attribute. // Instrument: updowncounter // Unit: {connection} // Stability: Experimental DBClientConnectionsUsageName = "db.client.connections.usage" DBClientConnectionsUsageUnit = "{connection}" DBClientConnectionsUsageDescription = "The number of connections that are currently in state described by the `state` attribute" // DBClientConnectionsIdleMax is the metric conforming to the // "db.client.connections.idle.max" semantic conventions. It represents the // maximum number of idle open connections allowed. // Instrument: updowncounter // Unit: {connection} // Stability: Experimental DBClientConnectionsIdleMaxName = "db.client.connections.idle.max" DBClientConnectionsIdleMaxUnit = "{connection}" DBClientConnectionsIdleMaxDescription = "The maximum number of idle open connections allowed" // DBClientConnectionsIdleMin is the metric conforming to the // "db.client.connections.idle.min" semantic conventions. It represents the // minimum number of idle open connections allowed. // Instrument: updowncounter // Unit: {connection} // Stability: Experimental DBClientConnectionsIdleMinName = "db.client.connections.idle.min" DBClientConnectionsIdleMinUnit = "{connection}" DBClientConnectionsIdleMinDescription = "The minimum number of idle open connections allowed" // DBClientConnectionsMax is the metric conforming to the // "db.client.connections.max" semantic conventions. It represents the maximum // number of open connections allowed. // Instrument: updowncounter // Unit: {connection} // Stability: Experimental DBClientConnectionsMaxName = "db.client.connections.max" DBClientConnectionsMaxUnit = "{connection}" DBClientConnectionsMaxDescription = "The maximum number of open connections allowed" // DBClientConnectionsPendingRequests is the metric conforming to the // "db.client.connections.pending_requests" semantic conventions. It represents // the number of pending requests for an open connection, cumulative for the // entire pool. // Instrument: updowncounter // Unit: {request} // Stability: Experimental DBClientConnectionsPendingRequestsName = "db.client.connections.pending_requests" DBClientConnectionsPendingRequestsUnit = "{request}" DBClientConnectionsPendingRequestsDescription = "The number of pending requests for an open connection, cumulative for the entire pool" // DBClientConnectionsTimeouts is the metric conforming to the // "db.client.connections.timeouts" semantic conventions. It represents the // number of connection timeouts that have occurred trying to obtain a // connection from the pool. // Instrument: counter // Unit: {timeout} // Stability: Experimental DBClientConnectionsTimeoutsName = "db.client.connections.timeouts" DBClientConnectionsTimeoutsUnit = "{timeout}" DBClientConnectionsTimeoutsDescription = "The number of connection timeouts that have occurred trying to obtain a connection from the pool" // DBClientConnectionsCreateTime is the metric conforming to the // "db.client.connections.create_time" semantic conventions. It represents the // time it took to create a new connection. // Instrument: histogram // Unit: ms // Stability: Experimental DBClientConnectionsCreateTimeName = "db.client.connections.create_time" DBClientConnectionsCreateTimeUnit = "ms" DBClientConnectionsCreateTimeDescription = "The time it took to create a new connection" // DBClientConnectionsWaitTime is the metric conforming to the // "db.client.connections.wait_time" semantic conventions. It represents the // time it took to obtain an open connection from the pool. // Instrument: histogram // Unit: ms // Stability: Experimental DBClientConnectionsWaitTimeName = "db.client.connections.wait_time" DBClientConnectionsWaitTimeUnit = "ms" DBClientConnectionsWaitTimeDescription = "The time it took to obtain an open connection from the pool" // DBClientConnectionsUseTime is the metric conforming to the // "db.client.connections.use_time" semantic conventions. It represents the // time between borrowing a connection and returning it to the pool. // Instrument: histogram // Unit: ms // Stability: Experimental DBClientConnectionsUseTimeName = "db.client.connections.use_time" DBClientConnectionsUseTimeUnit = "ms" DBClientConnectionsUseTimeDescription = "The time between borrowing a connection and returning it to the pool" // AspnetcoreRoutingMatchAttempts is the metric conforming to the // "aspnetcore.routing.match_attempts" semantic conventions. It represents the // number of requests that were attempted to be matched to an endpoint. // Instrument: counter // Unit: {match_attempt} // Stability: Experimental AspnetcoreRoutingMatchAttemptsName = "aspnetcore.routing.match_attempts" AspnetcoreRoutingMatchAttemptsUnit = "{match_attempt}" AspnetcoreRoutingMatchAttemptsDescription = "Number of requests that were attempted to be matched to an endpoint." // AspnetcoreDiagnosticsExceptions is the metric conforming to the // "aspnetcore.diagnostics.exceptions" semantic conventions. It represents the // number of exceptions caught by exception handling middleware. // Instrument: counter // Unit: {exception} // Stability: Experimental AspnetcoreDiagnosticsExceptionsName = "aspnetcore.diagnostics.exceptions" AspnetcoreDiagnosticsExceptionsUnit = "{exception}" AspnetcoreDiagnosticsExceptionsDescription = "Number of exceptions caught by exception handling middleware." // AspnetcoreRateLimitingActiveRequestLeases is the metric conforming to the // "aspnetcore.rate_limiting.active_request_leases" semantic conventions. It // represents the number of requests that are currently active on the server // that hold a rate limiting lease. // Instrument: updowncounter // Unit: {request} // Stability: Experimental AspnetcoreRateLimitingActiveRequestLeasesName = "aspnetcore.rate_limiting.active_request_leases" AspnetcoreRateLimitingActiveRequestLeasesUnit = "{request}" AspnetcoreRateLimitingActiveRequestLeasesDescription = "Number of requests that are currently active on the server that hold a rate limiting lease." // AspnetcoreRateLimitingRequestLeaseDuration is the metric conforming to the // "aspnetcore.rate_limiting.request_lease.duration" semantic conventions. It // represents the duration of rate limiting lease held by requests on the // server. // Instrument: histogram // Unit: s // Stability: Experimental AspnetcoreRateLimitingRequestLeaseDurationName = "aspnetcore.rate_limiting.request_lease.duration" AspnetcoreRateLimitingRequestLeaseDurationUnit = "s" AspnetcoreRateLimitingRequestLeaseDurationDescription = "The duration of rate limiting lease held by requests on the server." // AspnetcoreRateLimitingRequestTimeInQueue is the metric conforming to the // "aspnetcore.rate_limiting.request.time_in_queue" semantic conventions. It // represents the time the request spent in a queue waiting to acquire a rate // limiting lease. // Instrument: histogram // Unit: s // Stability: Experimental AspnetcoreRateLimitingRequestTimeInQueueName = "aspnetcore.rate_limiting.request.time_in_queue" AspnetcoreRateLimitingRequestTimeInQueueUnit = "s" AspnetcoreRateLimitingRequestTimeInQueueDescription = "The time the request spent in a queue waiting to acquire a rate limiting lease." // AspnetcoreRateLimitingQueuedRequests is the metric conforming to the // "aspnetcore.rate_limiting.queued_requests" semantic conventions. It // represents the number of requests that are currently queued, waiting to // acquire a rate limiting lease. // Instrument: updowncounter // Unit: {request} // Stability: Experimental AspnetcoreRateLimitingQueuedRequestsName = "aspnetcore.rate_limiting.queued_requests" AspnetcoreRateLimitingQueuedRequestsUnit = "{request}" AspnetcoreRateLimitingQueuedRequestsDescription = "Number of requests that are currently queued, waiting to acquire a rate limiting lease." // AspnetcoreRateLimitingRequests is the metric conforming to the // "aspnetcore.rate_limiting.requests" semantic conventions. It represents the // number of requests that tried to acquire a rate limiting lease. // Instrument: counter // Unit: {request} // Stability: Experimental AspnetcoreRateLimitingRequestsName = "aspnetcore.rate_limiting.requests" AspnetcoreRateLimitingRequestsUnit = "{request}" AspnetcoreRateLimitingRequestsDescription = "Number of requests that tried to acquire a rate limiting lease." // DNSLookupDuration is the metric conforming to the "dns.lookup.duration" // semantic conventions. It represents the measures the time taken to perform a // DNS lookup. // Instrument: histogram // Unit: s // Stability: Experimental DNSLookupDurationName = "dns.lookup.duration" DNSLookupDurationUnit = "s" DNSLookupDurationDescription = "Measures the time taken to perform a DNS lookup." // HTTPClientOpenConnections is the metric conforming to the // "http.client.open_connections" semantic conventions. It represents the // number of outbound HTTP connections that are currently active or idle on the // client. // Instrument: updowncounter // Unit: {connection} // Stability: Experimental HTTPClientOpenConnectionsName = "http.client.open_connections" HTTPClientOpenConnectionsUnit = "{connection}" HTTPClientOpenConnectionsDescription = "Number of outbound HTTP connections that are currently active or idle on the client." // HTTPClientConnectionDuration is the metric conforming to the // "http.client.connection.duration" semantic conventions. It represents the // duration of the successfully established outbound HTTP connections. // Instrument: histogram // Unit: s // Stability: Experimental HTTPClientConnectionDurationName = "http.client.connection.duration" HTTPClientConnectionDurationUnit = "s" HTTPClientConnectionDurationDescription = "The duration of the successfully established outbound HTTP connections." // HTTPClientActiveRequests is the metric conforming to the // "http.client.active_requests" semantic conventions. It represents the number // of active HTTP requests. // Instrument: updowncounter // Unit: {request} // Stability: Experimental HTTPClientActiveRequestsName = "http.client.active_requests" HTTPClientActiveRequestsUnit = "{request}" HTTPClientActiveRequestsDescription = "Number of active HTTP requests." // HTTPClientRequestTimeInQueue is the metric conforming to the // "http.client.request.time_in_queue" semantic conventions. It represents the // amount of time requests spent on a queue waiting for an available // connection. // Instrument: histogram // Unit: s // Stability: Experimental HTTPClientRequestTimeInQueueName = "http.client.request.time_in_queue" HTTPClientRequestTimeInQueueUnit = "s" HTTPClientRequestTimeInQueueDescription = "The amount of time requests spent on a queue waiting for an available connection." // KestrelActiveConnections is the metric conforming to the // "kestrel.active_connections" semantic conventions. It represents the number // of connections that are currently active on the server. // Instrument: updowncounter // Unit: {connection} // Stability: Experimental KestrelActiveConnectionsName = "kestrel.active_connections" KestrelActiveConnectionsUnit = "{connection}" KestrelActiveConnectionsDescription = "Number of connections that are currently active on the server." // KestrelConnectionDuration is the metric conforming to the // "kestrel.connection.duration" semantic conventions. It represents the // duration of connections on the server. // Instrument: histogram // Unit: s // Stability: Experimental KestrelConnectionDurationName = "kestrel.connection.duration" KestrelConnectionDurationUnit = "s" KestrelConnectionDurationDescription = "The duration of connections on the server." // KestrelRejectedConnections is the metric conforming to the // "kestrel.rejected_connections" semantic conventions. It represents the // number of connections rejected by the server. // Instrument: counter // Unit: {connection} // Stability: Experimental KestrelRejectedConnectionsName = "kestrel.rejected_connections" KestrelRejectedConnectionsUnit = "{connection}" KestrelRejectedConnectionsDescription = "Number of connections rejected by the server." // KestrelQueuedConnections is the metric conforming to the // "kestrel.queued_connections" semantic conventions. It represents the number // of connections that are currently queued and are waiting to start. // Instrument: updowncounter // Unit: {connection} // Stability: Experimental KestrelQueuedConnectionsName = "kestrel.queued_connections" KestrelQueuedConnectionsUnit = "{connection}" KestrelQueuedConnectionsDescription = "Number of connections that are currently queued and are waiting to start." // KestrelQueuedRequests is the metric conforming to the // "kestrel.queued_requests" semantic conventions. It represents the number of // HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are // currently queued and are waiting to start. // Instrument: updowncounter // Unit: {request} // Stability: Experimental KestrelQueuedRequestsName = "kestrel.queued_requests" KestrelQueuedRequestsUnit = "{request}" KestrelQueuedRequestsDescription = "Number of HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are currently queued and are waiting to start." // KestrelUpgradedConnections is the metric conforming to the // "kestrel.upgraded_connections" semantic conventions. It represents the // number of connections that are currently upgraded (WebSockets). . // Instrument: updowncounter // Unit: {connection} // Stability: Experimental KestrelUpgradedConnectionsName = "kestrel.upgraded_connections" KestrelUpgradedConnectionsUnit = "{connection}" KestrelUpgradedConnectionsDescription = "Number of connections that are currently upgraded (WebSockets). ." // KestrelTLSHandshakeDuration is the metric conforming to the // "kestrel.tls_handshake.duration" semantic conventions. It represents the // duration of TLS handshakes on the server. // Instrument: histogram // Unit: s // Stability: Experimental KestrelTLSHandshakeDurationName = "kestrel.tls_handshake.duration" KestrelTLSHandshakeDurationUnit = "s" KestrelTLSHandshakeDurationDescription = "The duration of TLS handshakes on the server." // KestrelActiveTLSHandshakes is the metric conforming to the // "kestrel.active_tls_handshakes" semantic conventions. It represents the // number of TLS handshakes that are currently in progress on the server. // Instrument: updowncounter // Unit: {handshake} // Stability: Experimental KestrelActiveTLSHandshakesName = "kestrel.active_tls_handshakes" KestrelActiveTLSHandshakesUnit = "{handshake}" KestrelActiveTLSHandshakesDescription = "Number of TLS handshakes that are currently in progress on the server." // SignalrServerConnectionDuration is the metric conforming to the // "signalr.server.connection.duration" semantic conventions. It represents the // duration of connections on the server. // Instrument: histogram // Unit: s // Stability: Experimental SignalrServerConnectionDurationName = "signalr.server.connection.duration" SignalrServerConnectionDurationUnit = "s" SignalrServerConnectionDurationDescription = "The duration of connections on the server." // SignalrServerActiveConnections is the metric conforming to the // "signalr.server.active_connections" semantic conventions. It represents the // number of connections that are currently active on the server. // Instrument: updowncounter // Unit: {connection} // Stability: Experimental SignalrServerActiveConnectionsName = "signalr.server.active_connections" SignalrServerActiveConnectionsUnit = "{connection}" SignalrServerActiveConnectionsDescription = "Number of connections that are currently active on the server." // FaaSInvokeDuration is the metric conforming to the "faas.invoke_duration" // semantic conventions. It represents the measures the duration of the // function's logic execution. // Instrument: histogram // Unit: s // Stability: Experimental FaaSInvokeDurationName = "faas.invoke_duration" FaaSInvokeDurationUnit = "s" FaaSInvokeDurationDescription = "Measures the duration of the function's logic execution" // FaaSInitDuration is the metric conforming to the "faas.init_duration" // semantic conventions. It represents the measures the duration of the // function's initialization, such as a cold start. // Instrument: histogram // Unit: s // Stability: Experimental FaaSInitDurationName = "faas.init_duration" FaaSInitDurationUnit = "s" FaaSInitDurationDescription = "Measures the duration of the function's initialization, such as a cold start" // FaaSColdstarts is the metric conforming to the "faas.coldstarts" semantic // conventions. It represents the number of invocation cold starts. // Instrument: counter // Unit: {coldstart} // Stability: Experimental FaaSColdstartsName = "faas.coldstarts" FaaSColdstartsUnit = "{coldstart}" FaaSColdstartsDescription = "Number of invocation cold starts" // FaaSErrors is the metric conforming to the "faas.errors" semantic // conventions. It represents the number of invocation errors. // Instrument: counter // Unit: {error} // Stability: Experimental FaaSErrorsName = "faas.errors" FaaSErrorsUnit = "{error}" FaaSErrorsDescription = "Number of invocation errors" // FaaSInvocations is the metric conforming to the "faas.invocations" semantic // conventions. It represents the number of successful invocations. // Instrument: counter // Unit: {invocation} // Stability: Experimental FaaSInvocationsName = "faas.invocations" FaaSInvocationsUnit = "{invocation}" FaaSInvocationsDescription = "Number of successful invocations" // FaaSTimeouts is the metric conforming to the "faas.timeouts" semantic // conventions. It represents the number of invocation timeouts. // Instrument: counter // Unit: {timeout} // Stability: Experimental FaaSTimeoutsName = "faas.timeouts" FaaSTimeoutsUnit = "{timeout}" FaaSTimeoutsDescription = "Number of invocation timeouts" // FaaSMemUsage is the metric conforming to the "faas.mem_usage" semantic // conventions. It represents the distribution of max memory usage per // invocation. // Instrument: histogram // Unit: By // Stability: Experimental FaaSMemUsageName = "faas.mem_usage" FaaSMemUsageUnit = "By" FaaSMemUsageDescription = "Distribution of max memory usage per invocation" // FaaSCPUUsage is the metric conforming to the "faas.cpu_usage" semantic // conventions. It represents the distribution of CPU usage per invocation. // Instrument: histogram // Unit: s // Stability: Experimental FaaSCPUUsageName = "faas.cpu_usage" FaaSCPUUsageUnit = "s" FaaSCPUUsageDescription = "Distribution of CPU usage per invocation" // FaaSNetIo is the metric conforming to the "faas.net_io" semantic // conventions. It represents the distribution of net I/O usage per invocation. // Instrument: histogram // Unit: By // Stability: Experimental FaaSNetIoName = "faas.net_io" FaaSNetIoUnit = "By" FaaSNetIoDescription = "Distribution of net I/O usage per invocation" // HTTPServerRequestDuration is the metric conforming to the // "http.server.request.duration" semantic conventions. It represents the // duration of HTTP server requests. // Instrument: histogram // Unit: s // Stability: Stable HTTPServerRequestDurationName = "http.server.request.duration" HTTPServerRequestDurationUnit = "s" HTTPServerRequestDurationDescription = "Duration of HTTP server requests." // HTTPServerActiveRequests is the metric conforming to the // "http.server.active_requests" semantic conventions. It represents the number // of active HTTP server requests. // Instrument: updowncounter // Unit: {request} // Stability: Experimental HTTPServerActiveRequestsName = "http.server.active_requests" HTTPServerActiveRequestsUnit = "{request}" HTTPServerActiveRequestsDescription = "Number of active HTTP server requests." // HTTPServerRequestBodySize is the metric conforming to the // "http.server.request.body.size" semantic conventions. It represents the size // of HTTP server request bodies. // Instrument: histogram // Unit: By // Stability: Experimental HTTPServerRequestBodySizeName = "http.server.request.body.size" HTTPServerRequestBodySizeUnit = "By" HTTPServerRequestBodySizeDescription = "Size of HTTP server request bodies." // HTTPServerResponseBodySize is the metric conforming to the // "http.server.response.body.size" semantic conventions. It represents the // size of HTTP server response bodies. // Instrument: histogram // Unit: By // Stability: Experimental HTTPServerResponseBodySizeName = "http.server.response.body.size" HTTPServerResponseBodySizeUnit = "By" HTTPServerResponseBodySizeDescription = "Size of HTTP server response bodies." // HTTPClientRequestDuration is the metric conforming to the // "http.client.request.duration" semantic conventions. It represents the // duration of HTTP client requests. // Instrument: histogram // Unit: s // Stability: Stable HTTPClientRequestDurationName = "http.client.request.duration" HTTPClientRequestDurationUnit = "s" HTTPClientRequestDurationDescription = "Duration of HTTP client requests." // HTTPClientRequestBodySize is the metric conforming to the // "http.client.request.body.size" semantic conventions. It represents the size // of HTTP client request bodies. // Instrument: histogram // Unit: By // Stability: Experimental HTTPClientRequestBodySizeName = "http.client.request.body.size" HTTPClientRequestBodySizeUnit = "By" HTTPClientRequestBodySizeDescription = "Size of HTTP client request bodies." // HTTPClientResponseBodySize is the metric conforming to the // "http.client.response.body.size" semantic conventions. It represents the // size of HTTP client response bodies. // Instrument: histogram // Unit: By // Stability: Experimental HTTPClientResponseBodySizeName = "http.client.response.body.size" HTTPClientResponseBodySizeUnit = "By" HTTPClientResponseBodySizeDescription = "Size of HTTP client response bodies." // JvmMemoryInit is the metric conforming to the "jvm.memory.init" semantic // conventions. It represents the measure of initial memory requested. // Instrument: updowncounter // Unit: By // Stability: Experimental JvmMemoryInitName = "jvm.memory.init" JvmMemoryInitUnit = "By" JvmMemoryInitDescription = "Measure of initial memory requested." // JvmSystemCPUUtilization is the metric conforming to the // "jvm.system.cpu.utilization" semantic conventions. It represents the recent // CPU utilization for the whole system as reported by the JVM. // Instrument: gauge // Unit: 1 // Stability: Experimental JvmSystemCPUUtilizationName = "jvm.system.cpu.utilization" JvmSystemCPUUtilizationUnit = "1" JvmSystemCPUUtilizationDescription = "Recent CPU utilization for the whole system as reported by the JVM." // JvmSystemCPULoad1m is the metric conforming to the "jvm.system.cpu.load_1m" // semantic conventions. It represents the average CPU load of the whole system // for the last minute as reported by the JVM. // Instrument: gauge // Unit: {run_queue_item} // Stability: Experimental JvmSystemCPULoad1mName = "jvm.system.cpu.load_1m" JvmSystemCPULoad1mUnit = "{run_queue_item}" JvmSystemCPULoad1mDescription = "Average CPU load of the whole system for the last minute as reported by the JVM." // JvmBufferMemoryUsage is the metric conforming to the // "jvm.buffer.memory.usage" semantic conventions. It represents the measure of // memory used by buffers. // Instrument: updowncounter // Unit: By // Stability: Experimental JvmBufferMemoryUsageName = "jvm.buffer.memory.usage" JvmBufferMemoryUsageUnit = "By" JvmBufferMemoryUsageDescription = "Measure of memory used by buffers." // JvmBufferMemoryLimit is the metric conforming to the // "jvm.buffer.memory.limit" semantic conventions. It represents the measure of // total memory capacity of buffers. // Instrument: updowncounter // Unit: By // Stability: Experimental JvmBufferMemoryLimitName = "jvm.buffer.memory.limit" JvmBufferMemoryLimitUnit = "By" JvmBufferMemoryLimitDescription = "Measure of total memory capacity of buffers." // JvmBufferCount is the metric conforming to the "jvm.buffer.count" semantic // conventions. It represents the number of buffers in the pool. // Instrument: updowncounter // Unit: {buffer} // Stability: Experimental JvmBufferCountName = "jvm.buffer.count" JvmBufferCountUnit = "{buffer}" JvmBufferCountDescription = "Number of buffers in the pool." // JvmMemoryUsed is the metric conforming to the "jvm.memory.used" semantic // conventions. It represents the measure of memory used. // Instrument: updowncounter // Unit: By // Stability: Stable JvmMemoryUsedName = "jvm.memory.used" JvmMemoryUsedUnit = "By" JvmMemoryUsedDescription = "Measure of memory used." // JvmMemoryCommitted is the metric conforming to the "jvm.memory.committed" // semantic conventions. It represents the measure of memory committed. // Instrument: updowncounter // Unit: By // Stability: Stable JvmMemoryCommittedName = "jvm.memory.committed" JvmMemoryCommittedUnit = "By" JvmMemoryCommittedDescription = "Measure of memory committed." // JvmMemoryLimit is the metric conforming to the "jvm.memory.limit" semantic // conventions. It represents the measure of max obtainable memory. // Instrument: updowncounter // Unit: By // Stability: Stable JvmMemoryLimitName = "jvm.memory.limit" JvmMemoryLimitUnit = "By" JvmMemoryLimitDescription = "Measure of max obtainable memory." // JvmMemoryUsedAfterLastGc is the metric conforming to the // "jvm.memory.used_after_last_gc" semantic conventions. It represents the // measure of memory used, as measured after the most recent garbage collection // event on this pool. // Instrument: updowncounter // Unit: By // Stability: Stable JvmMemoryUsedAfterLastGcName = "jvm.memory.used_after_last_gc" JvmMemoryUsedAfterLastGcUnit = "By" JvmMemoryUsedAfterLastGcDescription = "Measure of memory used, as measured after the most recent garbage collection event on this pool." // JvmGcDuration is the metric conforming to the "jvm.gc.duration" semantic // conventions. It represents the duration of JVM garbage collection actions. // Instrument: histogram // Unit: s // Stability: Stable JvmGcDurationName = "jvm.gc.duration" JvmGcDurationUnit = "s" JvmGcDurationDescription = "Duration of JVM garbage collection actions." // JvmThreadCount is the metric conforming to the "jvm.thread.count" semantic // conventions. It represents the number of executing platform threads. // Instrument: updowncounter // Unit: {thread} // Stability: Stable JvmThreadCountName = "jvm.thread.count" JvmThreadCountUnit = "{thread}" JvmThreadCountDescription = "Number of executing platform threads." // JvmClassLoaded is the metric conforming to the "jvm.class.loaded" semantic // conventions. It represents the number of classes loaded since JVM start. // Instrument: counter // Unit: {class} // Stability: Stable JvmClassLoadedName = "jvm.class.loaded" JvmClassLoadedUnit = "{class}" JvmClassLoadedDescription = "Number of classes loaded since JVM start." // JvmClassUnloaded is the metric conforming to the "jvm.class.unloaded" // semantic conventions. It represents the number of classes unloaded since JVM // start. // Instrument: counter // Unit: {class} // Stability: Stable JvmClassUnloadedName = "jvm.class.unloaded" JvmClassUnloadedUnit = "{class}" JvmClassUnloadedDescription = "Number of classes unloaded since JVM start." // JvmClassCount is the metric conforming to the "jvm.class.count" semantic // conventions. It represents the number of classes currently loaded. // Instrument: updowncounter // Unit: {class} // Stability: Stable JvmClassCountName = "jvm.class.count" JvmClassCountUnit = "{class}" JvmClassCountDescription = "Number of classes currently loaded." // JvmCPUCount is the metric conforming to the "jvm.cpu.count" semantic // conventions. It represents the number of processors available to the Java // virtual machine. // Instrument: updowncounter // Unit: {cpu} // Stability: Stable JvmCPUCountName = "jvm.cpu.count" JvmCPUCountUnit = "{cpu}" JvmCPUCountDescription = "Number of processors available to the Java virtual machine." // JvmCPUTime is the metric conforming to the "jvm.cpu.time" semantic // conventions. It represents the cPU time used by the process as reported by // the JVM. // Instrument: counter // Unit: s // Stability: Stable JvmCPUTimeName = "jvm.cpu.time" JvmCPUTimeUnit = "s" JvmCPUTimeDescription = "CPU time used by the process as reported by the JVM." // JvmCPURecentUtilization is the metric conforming to the // "jvm.cpu.recent_utilization" semantic conventions. It represents the recent // CPU utilization for the process as reported by the JVM. // Instrument: gauge // Unit: 1 // Stability: Stable JvmCPURecentUtilizationName = "jvm.cpu.recent_utilization" JvmCPURecentUtilizationUnit = "1" JvmCPURecentUtilizationDescription = "Recent CPU utilization for the process as reported by the JVM." // MessagingPublishDuration is the metric conforming to the // "messaging.publish.duration" semantic conventions. It represents the // measures the duration of publish operation. // Instrument: histogram // Unit: s // Stability: Experimental MessagingPublishDurationName = "messaging.publish.duration" MessagingPublishDurationUnit = "s" MessagingPublishDurationDescription = "Measures the duration of publish operation." // MessagingReceiveDuration is the metric conforming to the // "messaging.receive.duration" semantic conventions. It represents the // measures the duration of receive operation. // Instrument: histogram // Unit: s // Stability: Experimental MessagingReceiveDurationName = "messaging.receive.duration" MessagingReceiveDurationUnit = "s" MessagingReceiveDurationDescription = "Measures the duration of receive operation." // MessagingDeliverDuration is the metric conforming to the // "messaging.deliver.duration" semantic conventions. It represents the // measures the duration of deliver operation. // Instrument: histogram // Unit: s // Stability: Experimental MessagingDeliverDurationName = "messaging.deliver.duration" MessagingDeliverDurationUnit = "s" MessagingDeliverDurationDescription = "Measures the duration of deliver operation." // MessagingPublishMessages is the metric conforming to the // "messaging.publish.messages" semantic conventions. It represents the // measures the number of published messages. // Instrument: counter // Unit: {message} // Stability: Experimental MessagingPublishMessagesName = "messaging.publish.messages" MessagingPublishMessagesUnit = "{message}" MessagingPublishMessagesDescription = "Measures the number of published messages." // MessagingReceiveMessages is the metric conforming to the // "messaging.receive.messages" semantic conventions. It represents the // measures the number of received messages. // Instrument: counter // Unit: {message} // Stability: Experimental MessagingReceiveMessagesName = "messaging.receive.messages" MessagingReceiveMessagesUnit = "{message}" MessagingReceiveMessagesDescription = "Measures the number of received messages." // MessagingDeliverMessages is the metric conforming to the // "messaging.deliver.messages" semantic conventions. It represents the // measures the number of delivered messages. // Instrument: counter // Unit: {message} // Stability: Experimental MessagingDeliverMessagesName = "messaging.deliver.messages" MessagingDeliverMessagesUnit = "{message}" MessagingDeliverMessagesDescription = "Measures the number of delivered messages." // RPCServerDuration is the metric conforming to the "rpc.server.duration" // semantic conventions. It represents the measures the duration of inbound // RPC. // Instrument: histogram // Unit: ms // Stability: Experimental RPCServerDurationName = "rpc.server.duration" RPCServerDurationUnit = "ms" RPCServerDurationDescription = "Measures the duration of inbound RPC." // RPCServerRequestSize is the metric conforming to the // "rpc.server.request.size" semantic conventions. It represents the measures // the size of RPC request messages (uncompressed). // Instrument: histogram // Unit: By // Stability: Experimental RPCServerRequestSizeName = "rpc.server.request.size" RPCServerRequestSizeUnit = "By" RPCServerRequestSizeDescription = "Measures the size of RPC request messages (uncompressed)." // RPCServerResponseSize is the metric conforming to the // "rpc.server.response.size" semantic conventions. It represents the measures // the size of RPC response messages (uncompressed). // Instrument: histogram // Unit: By // Stability: Experimental RPCServerResponseSizeName = "rpc.server.response.size" RPCServerResponseSizeUnit = "By" RPCServerResponseSizeDescription = "Measures the size of RPC response messages (uncompressed)." // RPCServerRequestsPerRPC is the metric conforming to the // "rpc.server.requests_per_rpc" semantic conventions. It represents the // measures the number of messages received per RPC. // Instrument: histogram // Unit: {count} // Stability: Experimental RPCServerRequestsPerRPCName = "rpc.server.requests_per_rpc" RPCServerRequestsPerRPCUnit = "{count}" RPCServerRequestsPerRPCDescription = "Measures the number of messages received per RPC." // RPCServerResponsesPerRPC is the metric conforming to the // "rpc.server.responses_per_rpc" semantic conventions. It represents the // measures the number of messages sent per RPC. // Instrument: histogram // Unit: {count} // Stability: Experimental RPCServerResponsesPerRPCName = "rpc.server.responses_per_rpc" RPCServerResponsesPerRPCUnit = "{count}" RPCServerResponsesPerRPCDescription = "Measures the number of messages sent per RPC." // RPCClientDuration is the metric conforming to the "rpc.client.duration" // semantic conventions. It represents the measures the duration of outbound // RPC. // Instrument: histogram // Unit: ms // Stability: Experimental RPCClientDurationName = "rpc.client.duration" RPCClientDurationUnit = "ms" RPCClientDurationDescription = "Measures the duration of outbound RPC." // RPCClientRequestSize is the metric conforming to the // "rpc.client.request.size" semantic conventions. It represents the measures // the size of RPC request messages (uncompressed). // Instrument: histogram // Unit: By // Stability: Experimental RPCClientRequestSizeName = "rpc.client.request.size" RPCClientRequestSizeUnit = "By" RPCClientRequestSizeDescription = "Measures the size of RPC request messages (uncompressed)." // RPCClientResponseSize is the metric conforming to the // "rpc.client.response.size" semantic conventions. It represents the measures // the size of RPC response messages (uncompressed). // Instrument: histogram // Unit: By // Stability: Experimental RPCClientResponseSizeName = "rpc.client.response.size" RPCClientResponseSizeUnit = "By" RPCClientResponseSizeDescription = "Measures the size of RPC response messages (uncompressed)." // RPCClientRequestsPerRPC is the metric conforming to the // "rpc.client.requests_per_rpc" semantic conventions. It represents the // measures the number of messages received per RPC. // Instrument: histogram // Unit: {count} // Stability: Experimental RPCClientRequestsPerRPCName = "rpc.client.requests_per_rpc" RPCClientRequestsPerRPCUnit = "{count}" RPCClientRequestsPerRPCDescription = "Measures the number of messages received per RPC." // RPCClientResponsesPerRPC is the metric conforming to the // "rpc.client.responses_per_rpc" semantic conventions. It represents the // measures the number of messages sent per RPC. // Instrument: histogram // Unit: {count} // Stability: Experimental RPCClientResponsesPerRPCName = "rpc.client.responses_per_rpc" RPCClientResponsesPerRPCUnit = "{count}" RPCClientResponsesPerRPCDescription = "Measures the number of messages sent per RPC." // SystemCPUTime is the metric conforming to the "system.cpu.time" semantic // conventions. It represents the seconds each logical CPU spent on each mode. // Instrument: counter // Unit: s // Stability: Experimental SystemCPUTimeName = "system.cpu.time" SystemCPUTimeUnit = "s" SystemCPUTimeDescription = "Seconds each logical CPU spent on each mode" // SystemCPUUtilization is the metric conforming to the // "system.cpu.utilization" semantic conventions. It represents the difference // in system.cpu.time since the last measurement, divided by the elapsed time // and number of logical CPUs. // Instrument: gauge // Unit: 1 // Stability: Experimental SystemCPUUtilizationName = "system.cpu.utilization" SystemCPUUtilizationUnit = "1" SystemCPUUtilizationDescription = "Difference in system.cpu.time since the last measurement, divided by the elapsed time and number of logical CPUs" // SystemCPUFrequency is the metric conforming to the "system.cpu.frequency" // semantic conventions. It represents the reports the current frequency of the // CPU in Hz. // Instrument: gauge // Unit: {Hz} // Stability: Experimental SystemCPUFrequencyName = "system.cpu.frequency" SystemCPUFrequencyUnit = "{Hz}" SystemCPUFrequencyDescription = "Reports the current frequency of the CPU in Hz" // SystemCPUPhysicalCount is the metric conforming to the // "system.cpu.physical.count" semantic conventions. It represents the reports // the number of actual physical processor cores on the hardware. // Instrument: updowncounter // Unit: {cpu} // Stability: Experimental SystemCPUPhysicalCountName = "system.cpu.physical.count" SystemCPUPhysicalCountUnit = "{cpu}" SystemCPUPhysicalCountDescription = "Reports the number of actual physical processor cores on the hardware" // SystemCPULogicalCount is the metric conforming to the // "system.cpu.logical.count" semantic conventions. It represents the reports // the number of logical (virtual) processor cores created by the operating // system to manage multitasking. // Instrument: updowncounter // Unit: {cpu} // Stability: Experimental SystemCPULogicalCountName = "system.cpu.logical.count" SystemCPULogicalCountUnit = "{cpu}" SystemCPULogicalCountDescription = "Reports the number of logical (virtual) processor cores created by the operating system to manage multitasking" // SystemMemoryUsage is the metric conforming to the "system.memory.usage" // semantic conventions. It represents the reports memory in use by state. // Instrument: updowncounter // Unit: By // Stability: Experimental SystemMemoryUsageName = "system.memory.usage" SystemMemoryUsageUnit = "By" SystemMemoryUsageDescription = "Reports memory in use by state." // SystemMemoryLimit is the metric conforming to the "system.memory.limit" // semantic conventions. It represents the total memory available in the // system. // Instrument: updowncounter // Unit: By // Stability: Experimental SystemMemoryLimitName = "system.memory.limit" SystemMemoryLimitUnit = "By" SystemMemoryLimitDescription = "Total memory available in the system." // SystemMemoryUtilization is the metric conforming to the // "system.memory.utilization" semantic conventions. // Instrument: gauge // Unit: 1 // Stability: Experimental // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. SystemMemoryUtilizationName = "system.memory.utilization" SystemMemoryUtilizationUnit = "1" // SystemPagingUsage is the metric conforming to the "system.paging.usage" // semantic conventions. It represents the unix swap or windows pagefile usage. // Instrument: updowncounter // Unit: By // Stability: Experimental SystemPagingUsageName = "system.paging.usage" SystemPagingUsageUnit = "By" SystemPagingUsageDescription = "Unix swap or windows pagefile usage" // SystemPagingUtilization is the metric conforming to the // "system.paging.utilization" semantic conventions. // Instrument: gauge // Unit: 1 // Stability: Experimental // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. SystemPagingUtilizationName = "system.paging.utilization" SystemPagingUtilizationUnit = "1" // SystemPagingFaults is the metric conforming to the "system.paging.faults" // semantic conventions. // Instrument: counter // Unit: {fault} // Stability: Experimental // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. SystemPagingFaultsName = "system.paging.faults" SystemPagingFaultsUnit = "{fault}" // SystemPagingOperations is the metric conforming to the // "system.paging.operations" semantic conventions. // Instrument: counter // Unit: {operation} // Stability: Experimental // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. SystemPagingOperationsName = "system.paging.operations" SystemPagingOperationsUnit = "{operation}" // SystemDiskIo is the metric conforming to the "system.disk.io" semantic // conventions. // Instrument: counter // Unit: By // Stability: Experimental // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. SystemDiskIoName = "system.disk.io" SystemDiskIoUnit = "By" // SystemDiskOperations is the metric conforming to the // "system.disk.operations" semantic conventions. // Instrument: counter // Unit: {operation} // Stability: Experimental // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. SystemDiskOperationsName = "system.disk.operations" SystemDiskOperationsUnit = "{operation}" // SystemDiskIoTime is the metric conforming to the "system.disk.io_time" // semantic conventions. It represents the time disk spent activated. // Instrument: counter // Unit: s // Stability: Experimental SystemDiskIoTimeName = "system.disk.io_time" SystemDiskIoTimeUnit = "s" SystemDiskIoTimeDescription = "Time disk spent activated" // SystemDiskOperationTime is the metric conforming to the // "system.disk.operation_time" semantic conventions. It represents the sum of // the time each operation took to complete. // Instrument: counter // Unit: s // Stability: Experimental SystemDiskOperationTimeName = "system.disk.operation_time" SystemDiskOperationTimeUnit = "s" SystemDiskOperationTimeDescription = "Sum of the time each operation took to complete" // SystemDiskMerged is the metric conforming to the "system.disk.merged" // semantic conventions. // Instrument: counter // Unit: {operation} // Stability: Experimental // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. SystemDiskMergedName = "system.disk.merged" SystemDiskMergedUnit = "{operation}" // SystemFilesystemUsage is the metric conforming to the // "system.filesystem.usage" semantic conventions. // Instrument: updowncounter // Unit: By // Stability: Experimental // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. SystemFilesystemUsageName = "system.filesystem.usage" SystemFilesystemUsageUnit = "By" // SystemFilesystemUtilization is the metric conforming to the // "system.filesystem.utilization" semantic conventions. // Instrument: gauge // Unit: 1 // Stability: Experimental // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. SystemFilesystemUtilizationName = "system.filesystem.utilization" SystemFilesystemUtilizationUnit = "1" // SystemNetworkDropped is the metric conforming to the // "system.network.dropped" semantic conventions. It represents the count of // packets that are dropped or discarded even though there was no error. // Instrument: counter // Unit: {packet} // Stability: Experimental SystemNetworkDroppedName = "system.network.dropped" SystemNetworkDroppedUnit = "{packet}" SystemNetworkDroppedDescription = "Count of packets that are dropped or discarded even though there was no error" // SystemNetworkPackets is the metric conforming to the // "system.network.packets" semantic conventions. // Instrument: counter // Unit: {packet} // Stability: Experimental // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. SystemNetworkPacketsName = "system.network.packets" SystemNetworkPacketsUnit = "{packet}" // SystemNetworkErrors is the metric conforming to the "system.network.errors" // semantic conventions. It represents the count of network errors detected. // Instrument: counter // Unit: {error} // Stability: Experimental SystemNetworkErrorsName = "system.network.errors" SystemNetworkErrorsUnit = "{error}" SystemNetworkErrorsDescription = "Count of network errors detected" // SystemNetworkIo is the metric conforming to the "system.network.io" semantic // conventions. // Instrument: counter // Unit: By // Stability: Experimental // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. SystemNetworkIoName = "system.network.io" SystemNetworkIoUnit = "By" // SystemNetworkConnections is the metric conforming to the // "system.network.connections" semantic conventions. // Instrument: updowncounter // Unit: {connection} // Stability: Experimental // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. SystemNetworkConnectionsName = "system.network.connections" SystemNetworkConnectionsUnit = "{connection}" // SystemProcessesCount is the metric conforming to the // "system.processes.count" semantic conventions. It represents the total // number of processes in each state. // Instrument: updowncounter // Unit: {process} // Stability: Experimental SystemProcessesCountName = "system.processes.count" SystemProcessesCountUnit = "{process}" SystemProcessesCountDescription = "Total number of processes in each state" // SystemProcessesCreated is the metric conforming to the // "system.processes.created" semantic conventions. It represents the total // number of processes created over uptime of the host. // Instrument: counter // Unit: {process} // Stability: Experimental SystemProcessesCreatedName = "system.processes.created" SystemProcessesCreatedUnit = "{process}" SystemProcessesCreatedDescription = "Total number of processes created over uptime of the host" // SystemLinuxMemoryAvailable is the metric conforming to the // "system.linux.memory.available" semantic conventions. It represents an // estimate of how much memory is available for starting new applications, // without causing swapping. // Instrument: updowncounter // Unit: By // Stability: Experimental SystemLinuxMemoryAvailableName = "system.linux.memory.available" SystemLinuxMemoryAvailableUnit = "By" SystemLinuxMemoryAvailableDescription = "An estimate of how much memory is available for starting new applications, without causing swapping" ) ================================================ FILE: vendor/go.opentelemetry.io/otel/semconv/v1.24.0/resource.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 // Code generated from semantic convention specification. DO NOT EDIT. package semconv // import "go.opentelemetry.io/otel/semconv/v1.24.0" import "go.opentelemetry.io/otel/attribute" // A cloud environment (e.g. GCP, Azure, AWS). const ( // CloudAccountIDKey is the attribute Key conforming to the // "cloud.account.id" semantic conventions. It represents the cloud account // ID the resource is assigned to. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '111111111111', 'opentelemetry' CloudAccountIDKey = attribute.Key("cloud.account.id") // CloudAvailabilityZoneKey is the attribute Key conforming to the // "cloud.availability_zone" semantic conventions. It represents the cloud // regions often have multiple, isolated locations known as zones to // increase availability. Availability zone represents the zone where the // resource is running. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'us-east-1c' // Note: Availability zones are called "zones" on Alibaba Cloud and Google // Cloud. CloudAvailabilityZoneKey = attribute.Key("cloud.availability_zone") // CloudPlatformKey is the attribute Key conforming to the "cloud.platform" // semantic conventions. It represents the cloud platform in use. // // Type: Enum // RequirementLevel: Optional // Stability: experimental // Note: The prefix of the service SHOULD match the one specified in // `cloud.provider`. CloudPlatformKey = attribute.Key("cloud.platform") // CloudProviderKey is the attribute Key conforming to the "cloud.provider" // semantic conventions. It represents the name of the cloud provider. // // Type: Enum // RequirementLevel: Optional // Stability: experimental CloudProviderKey = attribute.Key("cloud.provider") // CloudRegionKey is the attribute Key conforming to the "cloud.region" // semantic conventions. It represents the geographical region the resource // is running. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'us-central1', 'us-east-1' // Note: Refer to your provider's docs to see the available regions, for // example [Alibaba Cloud // regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS // regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), // [Azure // regions](https://azure.microsoft.com/global-infrastructure/geographies/), // [Google Cloud regions](https://cloud.google.com/about/locations), or // [Tencent Cloud // regions](https://www.tencentcloud.com/document/product/213/6091). CloudRegionKey = attribute.Key("cloud.region") // CloudResourceIDKey is the attribute Key conforming to the // "cloud.resource_id" semantic conventions. It represents the cloud // provider-specific native identifier of the monitored cloud resource // (e.g. an // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // on AWS, a [fully qualified resource // ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) // on Azure, a [full resource // name](https://cloud.google.com/apis/design/resource_names#full_resource_name) // on GCP) // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function', // '//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID', // '/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/' // Note: On some cloud providers, it may not be possible to determine the // full ID at startup, // so it may be necessary to set `cloud.resource_id` as a span attribute // instead. // // The exact value to use for `cloud.resource_id` depends on the cloud // provider. // The following well-known definitions MUST be used if you set this // attribute and they apply: // // * **AWS Lambda:** The function // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). // Take care not to use the "invoked ARN" directly but replace any // [alias // suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) // with the resolved function version, as the same runtime instance may // be invokable with // multiple different aliases. // * **GCP:** The [URI of the // resource](https://cloud.google.com/iam/docs/full-resource-names) // * **Azure:** The [Fully Qualified Resource // ID](https://docs.microsoft.com/rest/api/resources/resources/get-by-id) // of the invoked function, // *not* the function app, having the form // `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/`. // This means that a span attribute MUST be used, as an Azure function // app can host multiple functions that would usually share // a TracerProvider. CloudResourceIDKey = attribute.Key("cloud.resource_id") ) var ( // Alibaba Cloud Elastic Compute Service CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs") // Alibaba Cloud Function Compute CloudPlatformAlibabaCloudFc = CloudPlatformKey.String("alibaba_cloud_fc") // Red Hat OpenShift on Alibaba Cloud CloudPlatformAlibabaCloudOpenshift = CloudPlatformKey.String("alibaba_cloud_openshift") // AWS Elastic Compute Cloud CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2") // AWS Elastic Container Service CloudPlatformAWSECS = CloudPlatformKey.String("aws_ecs") // AWS Elastic Kubernetes Service CloudPlatformAWSEKS = CloudPlatformKey.String("aws_eks") // AWS Lambda CloudPlatformAWSLambda = CloudPlatformKey.String("aws_lambda") // AWS Elastic Beanstalk CloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String("aws_elastic_beanstalk") // AWS App Runner CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner") // Red Hat OpenShift on AWS (ROSA) CloudPlatformAWSOpenshift = CloudPlatformKey.String("aws_openshift") // Azure Virtual Machines CloudPlatformAzureVM = CloudPlatformKey.String("azure_vm") // Azure Container Instances CloudPlatformAzureContainerInstances = CloudPlatformKey.String("azure_container_instances") // Azure Kubernetes Service CloudPlatformAzureAKS = CloudPlatformKey.String("azure_aks") // Azure Functions CloudPlatformAzureFunctions = CloudPlatformKey.String("azure_functions") // Azure App Service CloudPlatformAzureAppService = CloudPlatformKey.String("azure_app_service") // Azure Red Hat OpenShift CloudPlatformAzureOpenshift = CloudPlatformKey.String("azure_openshift") // Google Bare Metal Solution (BMS) CloudPlatformGCPBareMetalSolution = CloudPlatformKey.String("gcp_bare_metal_solution") // Google Cloud Compute Engine (GCE) CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine") // Google Cloud Run CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run") // Google Cloud Kubernetes Engine (GKE) CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine") // Google Cloud Functions (GCF) CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions") // Google Cloud App Engine (GAE) CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine") // Red Hat OpenShift on Google Cloud CloudPlatformGCPOpenshift = CloudPlatformKey.String("gcp_openshift") // Red Hat OpenShift on IBM Cloud CloudPlatformIbmCloudOpenshift = CloudPlatformKey.String("ibm_cloud_openshift") // Tencent Cloud Cloud Virtual Machine (CVM) CloudPlatformTencentCloudCvm = CloudPlatformKey.String("tencent_cloud_cvm") // Tencent Cloud Elastic Kubernetes Service (EKS) CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks") // Tencent Cloud Serverless Cloud Function (SCF) CloudPlatformTencentCloudScf = CloudPlatformKey.String("tencent_cloud_scf") ) var ( // Alibaba Cloud CloudProviderAlibabaCloud = CloudProviderKey.String("alibaba_cloud") // Amazon Web Services CloudProviderAWS = CloudProviderKey.String("aws") // Microsoft Azure CloudProviderAzure = CloudProviderKey.String("azure") // Google Cloud Platform CloudProviderGCP = CloudProviderKey.String("gcp") // Heroku Platform as a Service CloudProviderHeroku = CloudProviderKey.String("heroku") // IBM Cloud CloudProviderIbmCloud = CloudProviderKey.String("ibm_cloud") // Tencent Cloud CloudProviderTencentCloud = CloudProviderKey.String("tencent_cloud") ) // CloudAccountID returns an attribute KeyValue conforming to the // "cloud.account.id" semantic conventions. It represents the cloud account ID // the resource is assigned to. func CloudAccountID(val string) attribute.KeyValue { return CloudAccountIDKey.String(val) } // CloudAvailabilityZone returns an attribute KeyValue conforming to the // "cloud.availability_zone" semantic conventions. It represents the cloud // regions often have multiple, isolated locations known as zones to increase // availability. Availability zone represents the zone where the resource is // running. func CloudAvailabilityZone(val string) attribute.KeyValue { return CloudAvailabilityZoneKey.String(val) } // CloudRegion returns an attribute KeyValue conforming to the // "cloud.region" semantic conventions. It represents the geographical region // the resource is running. func CloudRegion(val string) attribute.KeyValue { return CloudRegionKey.String(val) } // CloudResourceID returns an attribute KeyValue conforming to the // "cloud.resource_id" semantic conventions. It represents the cloud // provider-specific native identifier of the monitored cloud resource (e.g. an // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // on AWS, a [fully qualified resource // ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on // Azure, a [full resource // name](https://cloud.google.com/apis/design/resource_names#full_resource_name) // on GCP) func CloudResourceID(val string) attribute.KeyValue { return CloudResourceIDKey.String(val) } // A container instance. const ( // ContainerCommandKey is the attribute Key conforming to the // "container.command" semantic conventions. It represents the command used // to run the container (i.e. the command name). // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'otelcontribcol' // Note: If using embedded credentials or sensitive data, it is recommended // to remove them to prevent potential leakage. ContainerCommandKey = attribute.Key("container.command") // ContainerCommandArgsKey is the attribute Key conforming to the // "container.command_args" semantic conventions. It represents the all the // command arguments (including the command/executable itself) run by the // container. [2] // // Type: string[] // RequirementLevel: Optional // Stability: experimental // Examples: 'otelcontribcol, --config, config.yaml' ContainerCommandArgsKey = attribute.Key("container.command_args") // ContainerCommandLineKey is the attribute Key conforming to the // "container.command_line" semantic conventions. It represents the full // command run by the container as a single string representing the full // command. [2] // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'otelcontribcol --config config.yaml' ContainerCommandLineKey = attribute.Key("container.command_line") // ContainerIDKey is the attribute Key conforming to the "container.id" // semantic conventions. It represents the container ID. Usually a UUID, as // for example used to [identify Docker // containers](https://docs.docker.com/engine/reference/run/#container-identification). // The UUID might be abbreviated. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'a3bf90e006b2' ContainerIDKey = attribute.Key("container.id") // ContainerImageIDKey is the attribute Key conforming to the // "container.image.id" semantic conventions. It represents the runtime // specific image identifier. Usually a hash algorithm followed by a UUID. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: // 'sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f' // Note: Docker defines a sha256 of the image id; `container.image.id` // corresponds to the `Image` field from the Docker container inspect // [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect) // endpoint. // K8S defines a link to the container registry repository with digest // `"imageID": "registry.azurecr.io // /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`. // The ID is assinged by the container runtime and can vary in different // environments. Consider using `oci.manifest.digest` if it is important to // identify the same image in different environments/runtimes. ContainerImageIDKey = attribute.Key("container.image.id") // ContainerImageNameKey is the attribute Key conforming to the // "container.image.name" semantic conventions. It represents the name of // the image the container was built on. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'gcr.io/opentelemetry/operator' ContainerImageNameKey = attribute.Key("container.image.name") // ContainerImageRepoDigestsKey is the attribute Key conforming to the // "container.image.repo_digests" semantic conventions. It represents the // repo digests of the container image as provided by the container // runtime. // // Type: string[] // RequirementLevel: Optional // Stability: experimental // Examples: // 'example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb', // 'internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578' // Note: // [Docker](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect) // and // [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238) // report those under the `RepoDigests` field. ContainerImageRepoDigestsKey = attribute.Key("container.image.repo_digests") // ContainerImageTagsKey is the attribute Key conforming to the // "container.image.tags" semantic conventions. It represents the container // image tags. An example can be found in [Docker Image // Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect). // Should be only the `` section of the full name for example from // `registry.example.com/my-org/my-image:`. // // Type: string[] // RequirementLevel: Optional // Stability: experimental // Examples: 'v1.27.1', '3.5.7-0' ContainerImageTagsKey = attribute.Key("container.image.tags") // ContainerNameKey is the attribute Key conforming to the "container.name" // semantic conventions. It represents the container name used by container // runtime. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'opentelemetry-autoconf' ContainerNameKey = attribute.Key("container.name") // ContainerRuntimeKey is the attribute Key conforming to the // "container.runtime" semantic conventions. It represents the container // runtime managing this container. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'docker', 'containerd', 'rkt' ContainerRuntimeKey = attribute.Key("container.runtime") ) // ContainerCommand returns an attribute KeyValue conforming to the // "container.command" semantic conventions. It represents the command used to // run the container (i.e. the command name). func ContainerCommand(val string) attribute.KeyValue { return ContainerCommandKey.String(val) } // ContainerCommandArgs returns an attribute KeyValue conforming to the // "container.command_args" semantic conventions. It represents the all the // command arguments (including the command/executable itself) run by the // container. [2] func ContainerCommandArgs(val ...string) attribute.KeyValue { return ContainerCommandArgsKey.StringSlice(val) } // ContainerCommandLine returns an attribute KeyValue conforming to the // "container.command_line" semantic conventions. It represents the full // command run by the container as a single string representing the full // command. [2] func ContainerCommandLine(val string) attribute.KeyValue { return ContainerCommandLineKey.String(val) } // ContainerID returns an attribute KeyValue conforming to the // "container.id" semantic conventions. It represents the container ID. Usually // a UUID, as for example used to [identify Docker // containers](https://docs.docker.com/engine/reference/run/#container-identification). // The UUID might be abbreviated. func ContainerID(val string) attribute.KeyValue { return ContainerIDKey.String(val) } // ContainerImageID returns an attribute KeyValue conforming to the // "container.image.id" semantic conventions. It represents the runtime // specific image identifier. Usually a hash algorithm followed by a UUID. func ContainerImageID(val string) attribute.KeyValue { return ContainerImageIDKey.String(val) } // ContainerImageName returns an attribute KeyValue conforming to the // "container.image.name" semantic conventions. It represents the name of the // image the container was built on. func ContainerImageName(val string) attribute.KeyValue { return ContainerImageNameKey.String(val) } // ContainerImageRepoDigests returns an attribute KeyValue conforming to the // "container.image.repo_digests" semantic conventions. It represents the repo // digests of the container image as provided by the container runtime. func ContainerImageRepoDigests(val ...string) attribute.KeyValue { return ContainerImageRepoDigestsKey.StringSlice(val) } // ContainerImageTags returns an attribute KeyValue conforming to the // "container.image.tags" semantic conventions. It represents the container // image tags. An example can be found in [Docker Image // Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect). // Should be only the `` section of the full name for example from // `registry.example.com/my-org/my-image:`. func ContainerImageTags(val ...string) attribute.KeyValue { return ContainerImageTagsKey.StringSlice(val) } // ContainerName returns an attribute KeyValue conforming to the // "container.name" semantic conventions. It represents the container name used // by container runtime. func ContainerName(val string) attribute.KeyValue { return ContainerNameKey.String(val) } // ContainerRuntime returns an attribute KeyValue conforming to the // "container.runtime" semantic conventions. It represents the container // runtime managing this container. func ContainerRuntime(val string) attribute.KeyValue { return ContainerRuntimeKey.String(val) } // Describes device attributes. const ( // DeviceIDKey is the attribute Key conforming to the "device.id" semantic // conventions. It represents a unique identifier representing the device // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092' // Note: The device identifier MUST only be defined using the values // outlined below. This value is not an advertising identifier and MUST NOT // be used as such. On iOS (Swift or Objective-C), this value MUST be equal // to the [vendor // identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). // On Android (Java or Kotlin), this value MUST be equal to the Firebase // Installation ID or a globally unique UUID which is persisted across // sessions in your application. More information can be found // [here](https://developer.android.com/training/articles/user-data-ids) on // best practices and exact implementation details. Caution should be taken // when storing personal data or anything which can identify a user. GDPR // and data protection laws may apply, ensure you do your own due // diligence. DeviceIDKey = attribute.Key("device.id") // DeviceManufacturerKey is the attribute Key conforming to the // "device.manufacturer" semantic conventions. It represents the name of // the device manufacturer // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'Apple', 'Samsung' // Note: The Android OS provides this field via // [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER). // iOS apps SHOULD hardcode the value `Apple`. DeviceManufacturerKey = attribute.Key("device.manufacturer") // DeviceModelIdentifierKey is the attribute Key conforming to the // "device.model.identifier" semantic conventions. It represents the model // identifier for the device // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'iPhone3,4', 'SM-G920F' // Note: It's recommended this value represents a machine-readable version // of the model identifier rather than the market or consumer-friendly name // of the device. DeviceModelIdentifierKey = attribute.Key("device.model.identifier") // DeviceModelNameKey is the attribute Key conforming to the // "device.model.name" semantic conventions. It represents the marketing // name for the device model // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6' // Note: It's recommended this value represents a human-readable version of // the device model rather than a machine-readable alternative. DeviceModelNameKey = attribute.Key("device.model.name") ) // DeviceID returns an attribute KeyValue conforming to the "device.id" // semantic conventions. It represents a unique identifier representing the // device func DeviceID(val string) attribute.KeyValue { return DeviceIDKey.String(val) } // DeviceManufacturer returns an attribute KeyValue conforming to the // "device.manufacturer" semantic conventions. It represents the name of the // device manufacturer func DeviceManufacturer(val string) attribute.KeyValue { return DeviceManufacturerKey.String(val) } // DeviceModelIdentifier returns an attribute KeyValue conforming to the // "device.model.identifier" semantic conventions. It represents the model // identifier for the device func DeviceModelIdentifier(val string) attribute.KeyValue { return DeviceModelIdentifierKey.String(val) } // DeviceModelName returns an attribute KeyValue conforming to the // "device.model.name" semantic conventions. It represents the marketing name // for the device model func DeviceModelName(val string) attribute.KeyValue { return DeviceModelNameKey.String(val) } // A host is defined as a computing instance. For example, physical servers, // virtual machines, switches or disk array. const ( // HostArchKey is the attribute Key conforming to the "host.arch" semantic // conventions. It represents the CPU architecture the host system is // running on. // // Type: Enum // RequirementLevel: Optional // Stability: experimental HostArchKey = attribute.Key("host.arch") // HostCPUCacheL2SizeKey is the attribute Key conforming to the // "host.cpu.cache.l2.size" semantic conventions. It represents the amount // of level 2 memory cache available to the processor (in Bytes). // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 12288000 HostCPUCacheL2SizeKey = attribute.Key("host.cpu.cache.l2.size") // HostCPUFamilyKey is the attribute Key conforming to the // "host.cpu.family" semantic conventions. It represents the family or // generation of the CPU. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '6', 'PA-RISC 1.1e' HostCPUFamilyKey = attribute.Key("host.cpu.family") // HostCPUModelIDKey is the attribute Key conforming to the // "host.cpu.model.id" semantic conventions. It represents the model // identifier. It provides more granular information about the CPU, // distinguishing it from other CPUs within the same family. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '6', '9000/778/B180L' HostCPUModelIDKey = attribute.Key("host.cpu.model.id") // HostCPUModelNameKey is the attribute Key conforming to the // "host.cpu.model.name" semantic conventions. It represents the model // designation of the processor. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz' HostCPUModelNameKey = attribute.Key("host.cpu.model.name") // HostCPUSteppingKey is the attribute Key conforming to the // "host.cpu.stepping" semantic conventions. It represents the stepping or // core revisions. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 1 HostCPUSteppingKey = attribute.Key("host.cpu.stepping") // HostCPUVendorIDKey is the attribute Key conforming to the // "host.cpu.vendor.id" semantic conventions. It represents the processor // manufacturer identifier. A maximum 12-character string. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'GenuineIntel' // Note: [CPUID](https://wiki.osdev.org/CPUID) command returns the vendor // ID string in EBX, EDX and ECX registers. Writing these to memory in this // order results in a 12-character string. HostCPUVendorIDKey = attribute.Key("host.cpu.vendor.id") // HostIDKey is the attribute Key conforming to the "host.id" semantic // conventions. It represents the unique host ID. For Cloud, this must be // the instance_id assigned by the cloud provider. For non-containerized // systems, this should be the `machine-id`. See the table below for the // sources to use to determine the `machine-id` based on operating system. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'fdbf79e8af94cb7f9e8df36789187052' HostIDKey = attribute.Key("host.id") // HostImageIDKey is the attribute Key conforming to the "host.image.id" // semantic conventions. It represents the vM image ID or host OS image ID. // For Cloud, this value is from the provider. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'ami-07b06b442921831e5' HostImageIDKey = attribute.Key("host.image.id") // HostImageNameKey is the attribute Key conforming to the // "host.image.name" semantic conventions. It represents the name of the VM // image or OS install the host was instantiated from. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905' HostImageNameKey = attribute.Key("host.image.name") // HostImageVersionKey is the attribute Key conforming to the // "host.image.version" semantic conventions. It represents the version // string of the VM image or host OS as defined in [Version // Attributes](/docs/resource/README.md#version-attributes). // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '0.1' HostImageVersionKey = attribute.Key("host.image.version") // HostIPKey is the attribute Key conforming to the "host.ip" semantic // conventions. It represents the available IP addresses of the host, // excluding loopback interfaces. // // Type: string[] // RequirementLevel: Optional // Stability: experimental // Examples: '192.168.1.140', 'fe80::abc2:4a28:737a:609e' // Note: IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 // addresses MUST be specified in the [RFC // 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format. HostIPKey = attribute.Key("host.ip") // HostMacKey is the attribute Key conforming to the "host.mac" semantic // conventions. It represents the available MAC addresses of the host, // excluding loopback interfaces. // // Type: string[] // RequirementLevel: Optional // Stability: experimental // Examples: 'AC-DE-48-23-45-67', 'AC-DE-48-23-45-67-01-9F' // Note: MAC Addresses MUST be represented in [IEEE RA hexadecimal // form](https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf): // as hyphen-separated octets in uppercase hexadecimal form from most to // least significant. HostMacKey = attribute.Key("host.mac") // HostNameKey is the attribute Key conforming to the "host.name" semantic // conventions. It represents the name of the host. On Unix systems, it may // contain what the hostname command returns, or the fully qualified // hostname, or another name specified by the user. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'opentelemetry-test' HostNameKey = attribute.Key("host.name") // HostTypeKey is the attribute Key conforming to the "host.type" semantic // conventions. It represents the type of host. For Cloud, this must be the // machine type. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'n1-standard-1' HostTypeKey = attribute.Key("host.type") ) var ( // AMD64 HostArchAMD64 = HostArchKey.String("amd64") // ARM32 HostArchARM32 = HostArchKey.String("arm32") // ARM64 HostArchARM64 = HostArchKey.String("arm64") // Itanium HostArchIA64 = HostArchKey.String("ia64") // 32-bit PowerPC HostArchPPC32 = HostArchKey.String("ppc32") // 64-bit PowerPC HostArchPPC64 = HostArchKey.String("ppc64") // IBM z/Architecture HostArchS390x = HostArchKey.String("s390x") // 32-bit x86 HostArchX86 = HostArchKey.String("x86") ) // HostCPUCacheL2Size returns an attribute KeyValue conforming to the // "host.cpu.cache.l2.size" semantic conventions. It represents the amount of // level 2 memory cache available to the processor (in Bytes). func HostCPUCacheL2Size(val int) attribute.KeyValue { return HostCPUCacheL2SizeKey.Int(val) } // HostCPUFamily returns an attribute KeyValue conforming to the // "host.cpu.family" semantic conventions. It represents the family or // generation of the CPU. func HostCPUFamily(val string) attribute.KeyValue { return HostCPUFamilyKey.String(val) } // HostCPUModelID returns an attribute KeyValue conforming to the // "host.cpu.model.id" semantic conventions. It represents the model // identifier. It provides more granular information about the CPU, // distinguishing it from other CPUs within the same family. func HostCPUModelID(val string) attribute.KeyValue { return HostCPUModelIDKey.String(val) } // HostCPUModelName returns an attribute KeyValue conforming to the // "host.cpu.model.name" semantic conventions. It represents the model // designation of the processor. func HostCPUModelName(val string) attribute.KeyValue { return HostCPUModelNameKey.String(val) } // HostCPUStepping returns an attribute KeyValue conforming to the // "host.cpu.stepping" semantic conventions. It represents the stepping or core // revisions. func HostCPUStepping(val int) attribute.KeyValue { return HostCPUSteppingKey.Int(val) } // HostCPUVendorID returns an attribute KeyValue conforming to the // "host.cpu.vendor.id" semantic conventions. It represents the processor // manufacturer identifier. A maximum 12-character string. func HostCPUVendorID(val string) attribute.KeyValue { return HostCPUVendorIDKey.String(val) } // HostID returns an attribute KeyValue conforming to the "host.id" semantic // conventions. It represents the unique host ID. For Cloud, this must be the // instance_id assigned by the cloud provider. For non-containerized systems, // this should be the `machine-id`. See the table below for the sources to use // to determine the `machine-id` based on operating system. func HostID(val string) attribute.KeyValue { return HostIDKey.String(val) } // HostImageID returns an attribute KeyValue conforming to the // "host.image.id" semantic conventions. It represents the vM image ID or host // OS image ID. For Cloud, this value is from the provider. func HostImageID(val string) attribute.KeyValue { return HostImageIDKey.String(val) } // HostImageName returns an attribute KeyValue conforming to the // "host.image.name" semantic conventions. It represents the name of the VM // image or OS install the host was instantiated from. func HostImageName(val string) attribute.KeyValue { return HostImageNameKey.String(val) } // HostImageVersion returns an attribute KeyValue conforming to the // "host.image.version" semantic conventions. It represents the version string // of the VM image or host OS as defined in [Version // Attributes](/docs/resource/README.md#version-attributes). func HostImageVersion(val string) attribute.KeyValue { return HostImageVersionKey.String(val) } // HostIP returns an attribute KeyValue conforming to the "host.ip" semantic // conventions. It represents the available IP addresses of the host, excluding // loopback interfaces. func HostIP(val ...string) attribute.KeyValue { return HostIPKey.StringSlice(val) } // HostMac returns an attribute KeyValue conforming to the "host.mac" // semantic conventions. It represents the available MAC addresses of the host, // excluding loopback interfaces. func HostMac(val ...string) attribute.KeyValue { return HostMacKey.StringSlice(val) } // HostName returns an attribute KeyValue conforming to the "host.name" // semantic conventions. It represents the name of the host. On Unix systems, // it may contain what the hostname command returns, or the fully qualified // hostname, or another name specified by the user. func HostName(val string) attribute.KeyValue { return HostNameKey.String(val) } // HostType returns an attribute KeyValue conforming to the "host.type" // semantic conventions. It represents the type of host. For Cloud, this must // be the machine type. func HostType(val string) attribute.KeyValue { return HostTypeKey.String(val) } // Kubernetes resource attributes. const ( // K8SClusterNameKey is the attribute Key conforming to the // "k8s.cluster.name" semantic conventions. It represents the name of the // cluster. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'opentelemetry-cluster' K8SClusterNameKey = attribute.Key("k8s.cluster.name") // K8SClusterUIDKey is the attribute Key conforming to the // "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for // the cluster, set to the UID of the `kube-system` namespace. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '218fc5a9-a5f1-4b54-aa05-46717d0ab26d' // Note: K8S doesn't have support for obtaining a cluster ID. If this is // ever // added, we will recommend collecting the `k8s.cluster.uid` through the // official APIs. In the meantime, we are able to use the `uid` of the // `kube-system` namespace as a proxy for cluster ID. Read on for the // rationale. // // Every object created in a K8S cluster is assigned a distinct UID. The // `kube-system` namespace is used by Kubernetes itself and will exist // for the lifetime of the cluster. Using the `uid` of the `kube-system` // namespace is a reasonable proxy for the K8S ClusterID as it will only // change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are // UUIDs as standardized by // [ISO/IEC 9834-8 and ITU-T // X.667](https://www.itu.int/ITU-T/studygroups/com17/oid.html). // Which states: // // > If generated according to one of the mechanisms defined in Rec. // ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be // different from all other UUIDs generated before 3603 A.D., or is // extremely likely to be different (depending on the mechanism chosen). // // Therefore, UIDs between clusters should be extremely unlikely to // conflict. K8SClusterUIDKey = attribute.Key("k8s.cluster.uid") // K8SContainerNameKey is the attribute Key conforming to the // "k8s.container.name" semantic conventions. It represents the name of the // Container from Pod specification, must be unique within a Pod. Container // runtime usually uses different globally unique name (`container.name`). // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'redis' K8SContainerNameKey = attribute.Key("k8s.container.name") // K8SContainerRestartCountKey is the attribute Key conforming to the // "k8s.container.restart_count" semantic conventions. It represents the // number of times the container was restarted. This attribute can be used // to identify a particular container (running or stopped) within a // container spec. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 0, 2 K8SContainerRestartCountKey = attribute.Key("k8s.container.restart_count") // K8SCronJobNameKey is the attribute Key conforming to the // "k8s.cronjob.name" semantic conventions. It represents the name of the // CronJob. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'opentelemetry' K8SCronJobNameKey = attribute.Key("k8s.cronjob.name") // K8SCronJobUIDKey is the attribute Key conforming to the // "k8s.cronjob.uid" semantic conventions. It represents the UID of the // CronJob. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' K8SCronJobUIDKey = attribute.Key("k8s.cronjob.uid") // K8SDaemonSetNameKey is the attribute Key conforming to the // "k8s.daemonset.name" semantic conventions. It represents the name of the // DaemonSet. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'opentelemetry' K8SDaemonSetNameKey = attribute.Key("k8s.daemonset.name") // K8SDaemonSetUIDKey is the attribute Key conforming to the // "k8s.daemonset.uid" semantic conventions. It represents the UID of the // DaemonSet. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' K8SDaemonSetUIDKey = attribute.Key("k8s.daemonset.uid") // K8SDeploymentNameKey is the attribute Key conforming to the // "k8s.deployment.name" semantic conventions. It represents the name of // the Deployment. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'opentelemetry' K8SDeploymentNameKey = attribute.Key("k8s.deployment.name") // K8SDeploymentUIDKey is the attribute Key conforming to the // "k8s.deployment.uid" semantic conventions. It represents the UID of the // Deployment. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid") // K8SJobNameKey is the attribute Key conforming to the "k8s.job.name" // semantic conventions. It represents the name of the Job. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'opentelemetry' K8SJobNameKey = attribute.Key("k8s.job.name") // K8SJobUIDKey is the attribute Key conforming to the "k8s.job.uid" // semantic conventions. It represents the UID of the Job. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' K8SJobUIDKey = attribute.Key("k8s.job.uid") // K8SNamespaceNameKey is the attribute Key conforming to the // "k8s.namespace.name" semantic conventions. It represents the name of the // namespace that the pod is running in. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'default' K8SNamespaceNameKey = attribute.Key("k8s.namespace.name") // K8SNodeNameKey is the attribute Key conforming to the "k8s.node.name" // semantic conventions. It represents the name of the Node. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'node-1' K8SNodeNameKey = attribute.Key("k8s.node.name") // K8SNodeUIDKey is the attribute Key conforming to the "k8s.node.uid" // semantic conventions. It represents the UID of the Node. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2' K8SNodeUIDKey = attribute.Key("k8s.node.uid") // K8SPodNameKey is the attribute Key conforming to the "k8s.pod.name" // semantic conventions. It represents the name of the Pod. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'opentelemetry-pod-autoconf' K8SPodNameKey = attribute.Key("k8s.pod.name") // K8SPodUIDKey is the attribute Key conforming to the "k8s.pod.uid" // semantic conventions. It represents the UID of the Pod. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' K8SPodUIDKey = attribute.Key("k8s.pod.uid") // K8SReplicaSetNameKey is the attribute Key conforming to the // "k8s.replicaset.name" semantic conventions. It represents the name of // the ReplicaSet. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'opentelemetry' K8SReplicaSetNameKey = attribute.Key("k8s.replicaset.name") // K8SReplicaSetUIDKey is the attribute Key conforming to the // "k8s.replicaset.uid" semantic conventions. It represents the UID of the // ReplicaSet. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid") // K8SStatefulSetNameKey is the attribute Key conforming to the // "k8s.statefulset.name" semantic conventions. It represents the name of // the StatefulSet. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'opentelemetry' K8SStatefulSetNameKey = attribute.Key("k8s.statefulset.name") // K8SStatefulSetUIDKey is the attribute Key conforming to the // "k8s.statefulset.uid" semantic conventions. It represents the UID of the // StatefulSet. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid") ) // K8SClusterName returns an attribute KeyValue conforming to the // "k8s.cluster.name" semantic conventions. It represents the name of the // cluster. func K8SClusterName(val string) attribute.KeyValue { return K8SClusterNameKey.String(val) } // K8SClusterUID returns an attribute KeyValue conforming to the // "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for the // cluster, set to the UID of the `kube-system` namespace. func K8SClusterUID(val string) attribute.KeyValue { return K8SClusterUIDKey.String(val) } // K8SContainerName returns an attribute KeyValue conforming to the // "k8s.container.name" semantic conventions. It represents the name of the // Container from Pod specification, must be unique within a Pod. Container // runtime usually uses different globally unique name (`container.name`). func K8SContainerName(val string) attribute.KeyValue { return K8SContainerNameKey.String(val) } // K8SContainerRestartCount returns an attribute KeyValue conforming to the // "k8s.container.restart_count" semantic conventions. It represents the number // of times the container was restarted. This attribute can be used to identify // a particular container (running or stopped) within a container spec. func K8SContainerRestartCount(val int) attribute.KeyValue { return K8SContainerRestartCountKey.Int(val) } // K8SCronJobName returns an attribute KeyValue conforming to the // "k8s.cronjob.name" semantic conventions. It represents the name of the // CronJob. func K8SCronJobName(val string) attribute.KeyValue { return K8SCronJobNameKey.String(val) } // K8SCronJobUID returns an attribute KeyValue conforming to the // "k8s.cronjob.uid" semantic conventions. It represents the UID of the // CronJob. func K8SCronJobUID(val string) attribute.KeyValue { return K8SCronJobUIDKey.String(val) } // K8SDaemonSetName returns an attribute KeyValue conforming to the // "k8s.daemonset.name" semantic conventions. It represents the name of the // DaemonSet. func K8SDaemonSetName(val string) attribute.KeyValue { return K8SDaemonSetNameKey.String(val) } // K8SDaemonSetUID returns an attribute KeyValue conforming to the // "k8s.daemonset.uid" semantic conventions. It represents the UID of the // DaemonSet. func K8SDaemonSetUID(val string) attribute.KeyValue { return K8SDaemonSetUIDKey.String(val) } // K8SDeploymentName returns an attribute KeyValue conforming to the // "k8s.deployment.name" semantic conventions. It represents the name of the // Deployment. func K8SDeploymentName(val string) attribute.KeyValue { return K8SDeploymentNameKey.String(val) } // K8SDeploymentUID returns an attribute KeyValue conforming to the // "k8s.deployment.uid" semantic conventions. It represents the UID of the // Deployment. func K8SDeploymentUID(val string) attribute.KeyValue { return K8SDeploymentUIDKey.String(val) } // K8SJobName returns an attribute KeyValue conforming to the "k8s.job.name" // semantic conventions. It represents the name of the Job. func K8SJobName(val string) attribute.KeyValue { return K8SJobNameKey.String(val) } // K8SJobUID returns an attribute KeyValue conforming to the "k8s.job.uid" // semantic conventions. It represents the UID of the Job. func K8SJobUID(val string) attribute.KeyValue { return K8SJobUIDKey.String(val) } // K8SNamespaceName returns an attribute KeyValue conforming to the // "k8s.namespace.name" semantic conventions. It represents the name of the // namespace that the pod is running in. func K8SNamespaceName(val string) attribute.KeyValue { return K8SNamespaceNameKey.String(val) } // K8SNodeName returns an attribute KeyValue conforming to the // "k8s.node.name" semantic conventions. It represents the name of the Node. func K8SNodeName(val string) attribute.KeyValue { return K8SNodeNameKey.String(val) } // K8SNodeUID returns an attribute KeyValue conforming to the "k8s.node.uid" // semantic conventions. It represents the UID of the Node. func K8SNodeUID(val string) attribute.KeyValue { return K8SNodeUIDKey.String(val) } // K8SPodName returns an attribute KeyValue conforming to the "k8s.pod.name" // semantic conventions. It represents the name of the Pod. func K8SPodName(val string) attribute.KeyValue { return K8SPodNameKey.String(val) } // K8SPodUID returns an attribute KeyValue conforming to the "k8s.pod.uid" // semantic conventions. It represents the UID of the Pod. func K8SPodUID(val string) attribute.KeyValue { return K8SPodUIDKey.String(val) } // K8SReplicaSetName returns an attribute KeyValue conforming to the // "k8s.replicaset.name" semantic conventions. It represents the name of the // ReplicaSet. func K8SReplicaSetName(val string) attribute.KeyValue { return K8SReplicaSetNameKey.String(val) } // K8SReplicaSetUID returns an attribute KeyValue conforming to the // "k8s.replicaset.uid" semantic conventions. It represents the UID of the // ReplicaSet. func K8SReplicaSetUID(val string) attribute.KeyValue { return K8SReplicaSetUIDKey.String(val) } // K8SStatefulSetName returns an attribute KeyValue conforming to the // "k8s.statefulset.name" semantic conventions. It represents the name of the // StatefulSet. func K8SStatefulSetName(val string) attribute.KeyValue { return K8SStatefulSetNameKey.String(val) } // K8SStatefulSetUID returns an attribute KeyValue conforming to the // "k8s.statefulset.uid" semantic conventions. It represents the UID of the // StatefulSet. func K8SStatefulSetUID(val string) attribute.KeyValue { return K8SStatefulSetUIDKey.String(val) } // An OCI image manifest. const ( // OciManifestDigestKey is the attribute Key conforming to the // "oci.manifest.digest" semantic conventions. It represents the digest of // the OCI image manifest. For container images specifically is the digest // by which the container image is known. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: // 'sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4' // Note: Follows [OCI Image Manifest // Specification](https://github.com/opencontainers/image-spec/blob/main/manifest.md), // and specifically the [Digest // property](https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests). // An example can be found in [Example Image // Manifest](https://docs.docker.com/registry/spec/manifest-v2-2/#example-image-manifest). OciManifestDigestKey = attribute.Key("oci.manifest.digest") ) // OciManifestDigest returns an attribute KeyValue conforming to the // "oci.manifest.digest" semantic conventions. It represents the digest of the // OCI image manifest. For container images specifically is the digest by which // the container image is known. func OciManifestDigest(val string) attribute.KeyValue { return OciManifestDigestKey.String(val) } // The operating system (OS) on which the process represented by this resource // is running. const ( // OSBuildIDKey is the attribute Key conforming to the "os.build_id" // semantic conventions. It represents the unique identifier for a // particular build or compilation of the operating system. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'TQ3C.230805.001.B2', '20E247', '22621' OSBuildIDKey = attribute.Key("os.build_id") // OSDescriptionKey is the attribute Key conforming to the "os.description" // semantic conventions. It represents the human readable (not intended to // be parsed) OS version information, like e.g. reported by `ver` or // `lsb_release -a` commands. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1 // LTS' OSDescriptionKey = attribute.Key("os.description") // OSNameKey is the attribute Key conforming to the "os.name" semantic // conventions. It represents the human readable operating system name. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'iOS', 'Android', 'Ubuntu' OSNameKey = attribute.Key("os.name") // OSTypeKey is the attribute Key conforming to the "os.type" semantic // conventions. It represents the operating system type. // // Type: Enum // RequirementLevel: Optional // Stability: experimental OSTypeKey = attribute.Key("os.type") // OSVersionKey is the attribute Key conforming to the "os.version" // semantic conventions. It represents the version string of the operating // system as defined in [Version // Attributes](/docs/resource/README.md#version-attributes). // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '14.2.1', '18.04.1' OSVersionKey = attribute.Key("os.version") ) var ( // Microsoft Windows OSTypeWindows = OSTypeKey.String("windows") // Linux OSTypeLinux = OSTypeKey.String("linux") // Apple Darwin OSTypeDarwin = OSTypeKey.String("darwin") // FreeBSD OSTypeFreeBSD = OSTypeKey.String("freebsd") // NetBSD OSTypeNetBSD = OSTypeKey.String("netbsd") // OpenBSD OSTypeOpenBSD = OSTypeKey.String("openbsd") // DragonFly BSD OSTypeDragonflyBSD = OSTypeKey.String("dragonflybsd") // HP-UX (Hewlett Packard Unix) OSTypeHPUX = OSTypeKey.String("hpux") // AIX (Advanced Interactive eXecutive) OSTypeAIX = OSTypeKey.String("aix") // SunOS, Oracle Solaris OSTypeSolaris = OSTypeKey.String("solaris") // IBM z/OS OSTypeZOS = OSTypeKey.String("z_os") ) // OSBuildID returns an attribute KeyValue conforming to the "os.build_id" // semantic conventions. It represents the unique identifier for a particular // build or compilation of the operating system. func OSBuildID(val string) attribute.KeyValue { return OSBuildIDKey.String(val) } // OSDescription returns an attribute KeyValue conforming to the // "os.description" semantic conventions. It represents the human readable (not // intended to be parsed) OS version information, like e.g. reported by `ver` // or `lsb_release -a` commands. func OSDescription(val string) attribute.KeyValue { return OSDescriptionKey.String(val) } // OSName returns an attribute KeyValue conforming to the "os.name" semantic // conventions. It represents the human readable operating system name. func OSName(val string) attribute.KeyValue { return OSNameKey.String(val) } // OSVersion returns an attribute KeyValue conforming to the "os.version" // semantic conventions. It represents the version string of the operating // system as defined in [Version // Attributes](/docs/resource/README.md#version-attributes). func OSVersion(val string) attribute.KeyValue { return OSVersionKey.String(val) } // An operating system process. const ( // ProcessCommandKey is the attribute Key conforming to the // "process.command" semantic conventions. It represents the command used // to launch the process (i.e. the command name). On Linux based systems, // can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can // be set to the first parameter extracted from `GetCommandLineW`. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'cmd/otelcol' ProcessCommandKey = attribute.Key("process.command") // ProcessCommandArgsKey is the attribute Key conforming to the // "process.command_args" semantic conventions. It represents the all the // command arguments (including the command/executable itself) as received // by the process. On Linux-based systems (and some other Unixoid systems // supporting procfs), can be set according to the list of null-delimited // strings extracted from `proc/[pid]/cmdline`. For libc-based executables, // this would be the full argv vector passed to `main`. // // Type: string[] // RequirementLevel: Optional // Stability: experimental // Examples: 'cmd/otecol', '--config=config.yaml' ProcessCommandArgsKey = attribute.Key("process.command_args") // ProcessCommandLineKey is the attribute Key conforming to the // "process.command_line" semantic conventions. It represents the full // command used to launch the process as a single string representing the // full command. On Windows, can be set to the result of `GetCommandLineW`. // Do not set this if you have to assemble it just for monitoring; use // `process.command_args` instead. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"' ProcessCommandLineKey = attribute.Key("process.command_line") // ProcessExecutableNameKey is the attribute Key conforming to the // "process.executable.name" semantic conventions. It represents the name // of the process executable. On Linux based systems, can be set to the // `Name` in `proc/[pid]/status`. On Windows, can be set to the base name // of `GetProcessImageFileNameW`. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'otelcol' ProcessExecutableNameKey = attribute.Key("process.executable.name") // ProcessExecutablePathKey is the attribute Key conforming to the // "process.executable.path" semantic conventions. It represents the full // path to the process executable. On Linux based systems, can be set to // the target of `proc/[pid]/exe`. On Windows, can be set to the result of // `GetProcessImageFileNameW`. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '/usr/bin/cmd/otelcol' ProcessExecutablePathKey = attribute.Key("process.executable.path") // ProcessOwnerKey is the attribute Key conforming to the "process.owner" // semantic conventions. It represents the username of the user that owns // the process. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'root' ProcessOwnerKey = attribute.Key("process.owner") // ProcessParentPIDKey is the attribute Key conforming to the // "process.parent_pid" semantic conventions. It represents the parent // Process identifier (PPID). // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 111 ProcessParentPIDKey = attribute.Key("process.parent_pid") // ProcessPIDKey is the attribute Key conforming to the "process.pid" // semantic conventions. It represents the process identifier (PID). // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 1234 ProcessPIDKey = attribute.Key("process.pid") // ProcessRuntimeDescriptionKey is the attribute Key conforming to the // "process.runtime.description" semantic conventions. It represents an // additional description about the runtime of the process, for example a // specific vendor customization of the runtime environment. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0' ProcessRuntimeDescriptionKey = attribute.Key("process.runtime.description") // ProcessRuntimeNameKey is the attribute Key conforming to the // "process.runtime.name" semantic conventions. It represents the name of // the runtime of this process. For compiled native binaries, this SHOULD // be the name of the compiler. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'OpenJDK Runtime Environment' ProcessRuntimeNameKey = attribute.Key("process.runtime.name") // ProcessRuntimeVersionKey is the attribute Key conforming to the // "process.runtime.version" semantic conventions. It represents the // version of the runtime of this process, as returned by the runtime // without modification. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '14.0.2' ProcessRuntimeVersionKey = attribute.Key("process.runtime.version") ) // ProcessCommand returns an attribute KeyValue conforming to the // "process.command" semantic conventions. It represents the command used to // launch the process (i.e. the command name). On Linux based systems, can be // set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to // the first parameter extracted from `GetCommandLineW`. func ProcessCommand(val string) attribute.KeyValue { return ProcessCommandKey.String(val) } // ProcessCommandArgs returns an attribute KeyValue conforming to the // "process.command_args" semantic conventions. It represents the all the // command arguments (including the command/executable itself) as received by // the process. On Linux-based systems (and some other Unixoid systems // supporting procfs), can be set according to the list of null-delimited // strings extracted from `proc/[pid]/cmdline`. For libc-based executables, // this would be the full argv vector passed to `main`. func ProcessCommandArgs(val ...string) attribute.KeyValue { return ProcessCommandArgsKey.StringSlice(val) } // ProcessCommandLine returns an attribute KeyValue conforming to the // "process.command_line" semantic conventions. It represents the full command // used to launch the process as a single string representing the full command. // On Windows, can be set to the result of `GetCommandLineW`. Do not set this // if you have to assemble it just for monitoring; use `process.command_args` // instead. func ProcessCommandLine(val string) attribute.KeyValue { return ProcessCommandLineKey.String(val) } // ProcessExecutableName returns an attribute KeyValue conforming to the // "process.executable.name" semantic conventions. It represents the name of // the process executable. On Linux based systems, can be set to the `Name` in // `proc/[pid]/status`. On Windows, can be set to the base name of // `GetProcessImageFileNameW`. func ProcessExecutableName(val string) attribute.KeyValue { return ProcessExecutableNameKey.String(val) } // ProcessExecutablePath returns an attribute KeyValue conforming to the // "process.executable.path" semantic conventions. It represents the full path // to the process executable. On Linux based systems, can be set to the target // of `proc/[pid]/exe`. On Windows, can be set to the result of // `GetProcessImageFileNameW`. func ProcessExecutablePath(val string) attribute.KeyValue { return ProcessExecutablePathKey.String(val) } // ProcessOwner returns an attribute KeyValue conforming to the // "process.owner" semantic conventions. It represents the username of the user // that owns the process. func ProcessOwner(val string) attribute.KeyValue { return ProcessOwnerKey.String(val) } // ProcessParentPID returns an attribute KeyValue conforming to the // "process.parent_pid" semantic conventions. It represents the parent Process // identifier (PPID). func ProcessParentPID(val int) attribute.KeyValue { return ProcessParentPIDKey.Int(val) } // ProcessPID returns an attribute KeyValue conforming to the "process.pid" // semantic conventions. It represents the process identifier (PID). func ProcessPID(val int) attribute.KeyValue { return ProcessPIDKey.Int(val) } // ProcessRuntimeDescription returns an attribute KeyValue conforming to the // "process.runtime.description" semantic conventions. It represents an // additional description about the runtime of the process, for example a // specific vendor customization of the runtime environment. func ProcessRuntimeDescription(val string) attribute.KeyValue { return ProcessRuntimeDescriptionKey.String(val) } // ProcessRuntimeName returns an attribute KeyValue conforming to the // "process.runtime.name" semantic conventions. It represents the name of the // runtime of this process. For compiled native binaries, this SHOULD be the // name of the compiler. func ProcessRuntimeName(val string) attribute.KeyValue { return ProcessRuntimeNameKey.String(val) } // ProcessRuntimeVersion returns an attribute KeyValue conforming to the // "process.runtime.version" semantic conventions. It represents the version of // the runtime of this process, as returned by the runtime without // modification. func ProcessRuntimeVersion(val string) attribute.KeyValue { return ProcessRuntimeVersionKey.String(val) } // The Android platform on which the Android application is running. const ( // AndroidOSAPILevelKey is the attribute Key conforming to the // "android.os.api_level" semantic conventions. It represents the uniquely // identifies the framework API revision offered by a version // (`os.version`) of the android operating system. More information can be // found // [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#APILevels). // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '33', '32' AndroidOSAPILevelKey = attribute.Key("android.os.api_level") ) // AndroidOSAPILevel returns an attribute KeyValue conforming to the // "android.os.api_level" semantic conventions. It represents the uniquely // identifies the framework API revision offered by a version (`os.version`) of // the android operating system. More information can be found // [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#APILevels). func AndroidOSAPILevel(val string) attribute.KeyValue { return AndroidOSAPILevelKey.String(val) } // The web browser in which the application represented by the resource is // running. The `browser.*` attributes MUST be used only for resources that // represent applications running in a web browser (regardless of whether // running on a mobile or desktop device). const ( // BrowserBrandsKey is the attribute Key conforming to the "browser.brands" // semantic conventions. It represents the array of brand name and version // separated by a space // // Type: string[] // RequirementLevel: Optional // Stability: experimental // Examples: ' Not A;Brand 99', 'Chromium 99', 'Chrome 99' // Note: This value is intended to be taken from the [UA client hints // API](https://wicg.github.io/ua-client-hints/#interface) // (`navigator.userAgentData.brands`). BrowserBrandsKey = attribute.Key("browser.brands") // BrowserLanguageKey is the attribute Key conforming to the // "browser.language" semantic conventions. It represents the preferred // language of the user using the browser // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'en', 'en-US', 'fr', 'fr-FR' // Note: This value is intended to be taken from the Navigator API // `navigator.language`. BrowserLanguageKey = attribute.Key("browser.language") // BrowserMobileKey is the attribute Key conforming to the "browser.mobile" // semantic conventions. It represents a boolean that is true if the // browser is running on a mobile device // // Type: boolean // RequirementLevel: Optional // Stability: experimental // Note: This value is intended to be taken from the [UA client hints // API](https://wicg.github.io/ua-client-hints/#interface) // (`navigator.userAgentData.mobile`). If unavailable, this attribute // SHOULD be left unset. BrowserMobileKey = attribute.Key("browser.mobile") // BrowserPlatformKey is the attribute Key conforming to the // "browser.platform" semantic conventions. It represents the platform on // which the browser is running // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'Windows', 'macOS', 'Android' // Note: This value is intended to be taken from the [UA client hints // API](https://wicg.github.io/ua-client-hints/#interface) // (`navigator.userAgentData.platform`). If unavailable, the legacy // `navigator.platform` API SHOULD NOT be used instead and this attribute // SHOULD be left unset in order for the values to be consistent. // The list of possible values is defined in the [W3C User-Agent Client // Hints // specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform). // Note that some (but not all) of these values can overlap with values in // the [`os.type` and `os.name` attributes](./os.md). However, for // consistency, the values in the `browser.platform` attribute should // capture the exact value that the user agent provides. BrowserPlatformKey = attribute.Key("browser.platform") ) // BrowserBrands returns an attribute KeyValue conforming to the // "browser.brands" semantic conventions. It represents the array of brand name // and version separated by a space func BrowserBrands(val ...string) attribute.KeyValue { return BrowserBrandsKey.StringSlice(val) } // BrowserLanguage returns an attribute KeyValue conforming to the // "browser.language" semantic conventions. It represents the preferred // language of the user using the browser func BrowserLanguage(val string) attribute.KeyValue { return BrowserLanguageKey.String(val) } // BrowserMobile returns an attribute KeyValue conforming to the // "browser.mobile" semantic conventions. It represents a boolean that is true // if the browser is running on a mobile device func BrowserMobile(val bool) attribute.KeyValue { return BrowserMobileKey.Bool(val) } // BrowserPlatform returns an attribute KeyValue conforming to the // "browser.platform" semantic conventions. It represents the platform on which // the browser is running func BrowserPlatform(val string) attribute.KeyValue { return BrowserPlatformKey.String(val) } // Resources used by AWS Elastic Container Service (ECS). const ( // AWSECSClusterARNKey is the attribute Key conforming to the // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an // [ECS // cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' AWSECSClusterARNKey = attribute.Key("aws.ecs.cluster.arn") // AWSECSContainerARNKey is the attribute Key conforming to the // "aws.ecs.container.arn" semantic conventions. It represents the Amazon // Resource Name (ARN) of an [ECS container // instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: // 'arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9' AWSECSContainerARNKey = attribute.Key("aws.ecs.container.arn") // AWSECSLaunchtypeKey is the attribute Key conforming to the // "aws.ecs.launchtype" semantic conventions. It represents the [launch // type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) // for an ECS task. // // Type: Enum // RequirementLevel: Optional // Stability: experimental AWSECSLaunchtypeKey = attribute.Key("aws.ecs.launchtype") // AWSECSTaskARNKey is the attribute Key conforming to the // "aws.ecs.task.arn" semantic conventions. It represents the ARN of an // [ECS task // definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: // 'arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b' AWSECSTaskARNKey = attribute.Key("aws.ecs.task.arn") // AWSECSTaskFamilyKey is the attribute Key conforming to the // "aws.ecs.task.family" semantic conventions. It represents the task // definition family this task definition is a member of. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'opentelemetry-family' AWSECSTaskFamilyKey = attribute.Key("aws.ecs.task.family") // AWSECSTaskRevisionKey is the attribute Key conforming to the // "aws.ecs.task.revision" semantic conventions. It represents the revision // for this task definition. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '8', '26' AWSECSTaskRevisionKey = attribute.Key("aws.ecs.task.revision") ) var ( // ec2 AWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String("ec2") // fargate AWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String("fargate") ) // AWSECSClusterARN returns an attribute KeyValue conforming to the // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an [ECS // cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). func AWSECSClusterARN(val string) attribute.KeyValue { return AWSECSClusterARNKey.String(val) } // AWSECSContainerARN returns an attribute KeyValue conforming to the // "aws.ecs.container.arn" semantic conventions. It represents the Amazon // Resource Name (ARN) of an [ECS container // instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). func AWSECSContainerARN(val string) attribute.KeyValue { return AWSECSContainerARNKey.String(val) } // AWSECSTaskARN returns an attribute KeyValue conforming to the // "aws.ecs.task.arn" semantic conventions. It represents the ARN of an [ECS // task // definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). func AWSECSTaskARN(val string) attribute.KeyValue { return AWSECSTaskARNKey.String(val) } // AWSECSTaskFamily returns an attribute KeyValue conforming to the // "aws.ecs.task.family" semantic conventions. It represents the task // definition family this task definition is a member of. func AWSECSTaskFamily(val string) attribute.KeyValue { return AWSECSTaskFamilyKey.String(val) } // AWSECSTaskRevision returns an attribute KeyValue conforming to the // "aws.ecs.task.revision" semantic conventions. It represents the revision for // this task definition. func AWSECSTaskRevision(val string) attribute.KeyValue { return AWSECSTaskRevisionKey.String(val) } // Resources used by AWS Elastic Kubernetes Service (EKS). const ( // AWSEKSClusterARNKey is the attribute Key conforming to the // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an // EKS cluster. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' AWSEKSClusterARNKey = attribute.Key("aws.eks.cluster.arn") ) // AWSEKSClusterARN returns an attribute KeyValue conforming to the // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an EKS // cluster. func AWSEKSClusterARN(val string) attribute.KeyValue { return AWSEKSClusterARNKey.String(val) } // Resources specific to Amazon Web Services. const ( // AWSLogGroupARNsKey is the attribute Key conforming to the // "aws.log.group.arns" semantic conventions. It represents the Amazon // Resource Name(s) (ARN) of the AWS log group(s). // // Type: string[] // RequirementLevel: Optional // Stability: experimental // Examples: // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*' // Note: See the [log group ARN format // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). AWSLogGroupARNsKey = attribute.Key("aws.log.group.arns") // AWSLogGroupNamesKey is the attribute Key conforming to the // "aws.log.group.names" semantic conventions. It represents the name(s) of // the AWS log group(s) an application is writing to. // // Type: string[] // RequirementLevel: Optional // Stability: experimental // Examples: '/aws/lambda/my-function', 'opentelemetry-service' // Note: Multiple log groups must be supported for cases like // multi-container applications, where a single application has sidecar // containers, and each write to their own log group. AWSLogGroupNamesKey = attribute.Key("aws.log.group.names") // AWSLogStreamARNsKey is the attribute Key conforming to the // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of // the AWS log stream(s). // // Type: string[] // RequirementLevel: Optional // Stability: experimental // Examples: // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' // Note: See the [log stream ARN format // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). // One log group can contain several log streams, so these ARNs necessarily // identify both a log group and a log stream. AWSLogStreamARNsKey = attribute.Key("aws.log.stream.arns") // AWSLogStreamNamesKey is the attribute Key conforming to the // "aws.log.stream.names" semantic conventions. It represents the name(s) // of the AWS log stream(s) an application is writing to. // // Type: string[] // RequirementLevel: Optional // Stability: experimental // Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' AWSLogStreamNamesKey = attribute.Key("aws.log.stream.names") ) // AWSLogGroupARNs returns an attribute KeyValue conforming to the // "aws.log.group.arns" semantic conventions. It represents the Amazon Resource // Name(s) (ARN) of the AWS log group(s). func AWSLogGroupARNs(val ...string) attribute.KeyValue { return AWSLogGroupARNsKey.StringSlice(val) } // AWSLogGroupNames returns an attribute KeyValue conforming to the // "aws.log.group.names" semantic conventions. It represents the name(s) of the // AWS log group(s) an application is writing to. func AWSLogGroupNames(val ...string) attribute.KeyValue { return AWSLogGroupNamesKey.StringSlice(val) } // AWSLogStreamARNs returns an attribute KeyValue conforming to the // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of the // AWS log stream(s). func AWSLogStreamARNs(val ...string) attribute.KeyValue { return AWSLogStreamARNsKey.StringSlice(val) } // AWSLogStreamNames returns an attribute KeyValue conforming to the // "aws.log.stream.names" semantic conventions. It represents the name(s) of // the AWS log stream(s) an application is writing to. func AWSLogStreamNames(val ...string) attribute.KeyValue { return AWSLogStreamNamesKey.StringSlice(val) } // Resource used by Google Cloud Run. const ( // GCPCloudRunJobExecutionKey is the attribute Key conforming to the // "gcp.cloud_run.job.execution" semantic conventions. It represents the // name of the Cloud Run // [execution](https://cloud.google.com/run/docs/managing/job-executions) // being run for the Job, as set by the // [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) // environment variable. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'job-name-xxxx', 'sample-job-mdw84' GCPCloudRunJobExecutionKey = attribute.Key("gcp.cloud_run.job.execution") // GCPCloudRunJobTaskIndexKey is the attribute Key conforming to the // "gcp.cloud_run.job.task_index" semantic conventions. It represents the // index for a task within an execution as provided by the // [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) // environment variable. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 0, 1 GCPCloudRunJobTaskIndexKey = attribute.Key("gcp.cloud_run.job.task_index") ) // GCPCloudRunJobExecution returns an attribute KeyValue conforming to the // "gcp.cloud_run.job.execution" semantic conventions. It represents the name // of the Cloud Run // [execution](https://cloud.google.com/run/docs/managing/job-executions) being // run for the Job, as set by the // [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) // environment variable. func GCPCloudRunJobExecution(val string) attribute.KeyValue { return GCPCloudRunJobExecutionKey.String(val) } // GCPCloudRunJobTaskIndex returns an attribute KeyValue conforming to the // "gcp.cloud_run.job.task_index" semantic conventions. It represents the index // for a task within an execution as provided by the // [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) // environment variable. func GCPCloudRunJobTaskIndex(val int) attribute.KeyValue { return GCPCloudRunJobTaskIndexKey.Int(val) } // Resources used by Google Compute Engine (GCE). const ( // GCPGceInstanceHostnameKey is the attribute Key conforming to the // "gcp.gce.instance.hostname" semantic conventions. It represents the // hostname of a GCE instance. This is the full value of the default or // [custom // hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm). // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'my-host1234.example.com', // 'sample-vm.us-west1-b.c.my-project.internal' GCPGceInstanceHostnameKey = attribute.Key("gcp.gce.instance.hostname") // GCPGceInstanceNameKey is the attribute Key conforming to the // "gcp.gce.instance.name" semantic conventions. It represents the instance // name of a GCE instance. This is the value provided by `host.name`, the // visible name of the instance in the Cloud Console UI, and the prefix for // the default hostname of the instance as defined by the [default internal // DNS // name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'instance-1', 'my-vm-name' GCPGceInstanceNameKey = attribute.Key("gcp.gce.instance.name") ) // GCPGceInstanceHostname returns an attribute KeyValue conforming to the // "gcp.gce.instance.hostname" semantic conventions. It represents the hostname // of a GCE instance. This is the full value of the default or [custom // hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm). func GCPGceInstanceHostname(val string) attribute.KeyValue { return GCPGceInstanceHostnameKey.String(val) } // GCPGceInstanceName returns an attribute KeyValue conforming to the // "gcp.gce.instance.name" semantic conventions. It represents the instance // name of a GCE instance. This is the value provided by `host.name`, the // visible name of the instance in the Cloud Console UI, and the prefix for the // default hostname of the instance as defined by the [default internal DNS // name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). func GCPGceInstanceName(val string) attribute.KeyValue { return GCPGceInstanceNameKey.String(val) } // Heroku dyno metadata const ( // HerokuAppIDKey is the attribute Key conforming to the "heroku.app.id" // semantic conventions. It represents the unique identifier for the // application // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '2daa2797-e42b-4624-9322-ec3f968df4da' HerokuAppIDKey = attribute.Key("heroku.app.id") // HerokuReleaseCommitKey is the attribute Key conforming to the // "heroku.release.commit" semantic conventions. It represents the commit // hash for the current release // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'e6134959463efd8966b20e75b913cafe3f5ec' HerokuReleaseCommitKey = attribute.Key("heroku.release.commit") // HerokuReleaseCreationTimestampKey is the attribute Key conforming to the // "heroku.release.creation_timestamp" semantic conventions. It represents // the time and date the release was created // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '2022-10-23T18:00:42Z' HerokuReleaseCreationTimestampKey = attribute.Key("heroku.release.creation_timestamp") ) // HerokuAppID returns an attribute KeyValue conforming to the // "heroku.app.id" semantic conventions. It represents the unique identifier // for the application func HerokuAppID(val string) attribute.KeyValue { return HerokuAppIDKey.String(val) } // HerokuReleaseCommit returns an attribute KeyValue conforming to the // "heroku.release.commit" semantic conventions. It represents the commit hash // for the current release func HerokuReleaseCommit(val string) attribute.KeyValue { return HerokuReleaseCommitKey.String(val) } // HerokuReleaseCreationTimestamp returns an attribute KeyValue conforming // to the "heroku.release.creation_timestamp" semantic conventions. It // represents the time and date the release was created func HerokuReleaseCreationTimestamp(val string) attribute.KeyValue { return HerokuReleaseCreationTimestampKey.String(val) } // The software deployment. const ( // DeploymentEnvironmentKey is the attribute Key conforming to the // "deployment.environment" semantic conventions. It represents the name of // the [deployment // environment](https://wikipedia.org/wiki/Deployment_environment) (aka // deployment tier). // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'staging', 'production' // Note: `deployment.environment` does not affect the uniqueness // constraints defined through // the `service.namespace`, `service.name` and `service.instance.id` // resource attributes. // This implies that resources carrying the following attribute // combinations MUST be // considered to be identifying the same service: // // * `service.name=frontend`, `deployment.environment=production` // * `service.name=frontend`, `deployment.environment=staging`. DeploymentEnvironmentKey = attribute.Key("deployment.environment") ) // DeploymentEnvironment returns an attribute KeyValue conforming to the // "deployment.environment" semantic conventions. It represents the name of the // [deployment environment](https://wikipedia.org/wiki/Deployment_environment) // (aka deployment tier). func DeploymentEnvironment(val string) attribute.KeyValue { return DeploymentEnvironmentKey.String(val) } // A serverless instance. const ( // FaaSInstanceKey is the attribute Key conforming to the "faas.instance" // semantic conventions. It represents the execution environment ID as a // string, that will be potentially reused for other invocations to the // same function/function version. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de' // Note: * **AWS Lambda:** Use the (full) log stream name. FaaSInstanceKey = attribute.Key("faas.instance") // FaaSMaxMemoryKey is the attribute Key conforming to the // "faas.max_memory" semantic conventions. It represents the amount of // memory available to the serverless function converted to Bytes. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 134217728 // Note: It's recommended to set this attribute since e.g. too little // memory can easily stop a Java AWS Lambda function from working // correctly. On AWS Lambda, the environment variable // `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information (which must // be multiplied by 1,048,576). FaaSMaxMemoryKey = attribute.Key("faas.max_memory") // FaaSNameKey is the attribute Key conforming to the "faas.name" semantic // conventions. It represents the name of the single function that this // runtime instance executes. // // Type: string // RequirementLevel: Required // Stability: experimental // Examples: 'my-function', 'myazurefunctionapp/some-function-name' // Note: This is the name of the function as configured/deployed on the // FaaS // platform and is usually different from the name of the callback // function (which may be stored in the // [`code.namespace`/`code.function`](/docs/general/attributes.md#source-code-attributes) // span attributes). // // For some cloud providers, the above definition is ambiguous. The // following // definition of function name MUST be used for this attribute // (and consequently the span name) for the listed cloud // providers/products: // // * **Azure:** The full name `/`, i.e., function app name // followed by a forward slash followed by the function name (this form // can also be seen in the resource JSON for the function). // This means that a span attribute MUST be used, as an Azure function // app can host multiple functions that would usually share // a TracerProvider (see also the `cloud.resource_id` attribute). FaaSNameKey = attribute.Key("faas.name") // FaaSVersionKey is the attribute Key conforming to the "faas.version" // semantic conventions. It represents the immutable version of the // function being executed. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '26', 'pinkfroid-00002' // Note: Depending on the cloud provider and platform, use: // // * **AWS Lambda:** The [function // version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) // (an integer represented as a decimal string). // * **Google Cloud Run (Services):** The // [revision](https://cloud.google.com/run/docs/managing/revisions) // (i.e., the function name plus the revision suffix). // * **Google Cloud Functions:** The value of the // [`K_REVISION` environment // variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). // * **Azure Functions:** Not applicable. Do not set this attribute. FaaSVersionKey = attribute.Key("faas.version") ) // FaaSInstance returns an attribute KeyValue conforming to the // "faas.instance" semantic conventions. It represents the execution // environment ID as a string, that will be potentially reused for other // invocations to the same function/function version. func FaaSInstance(val string) attribute.KeyValue { return FaaSInstanceKey.String(val) } // FaaSMaxMemory returns an attribute KeyValue conforming to the // "faas.max_memory" semantic conventions. It represents the amount of memory // available to the serverless function converted to Bytes. func FaaSMaxMemory(val int) attribute.KeyValue { return FaaSMaxMemoryKey.Int(val) } // FaaSName returns an attribute KeyValue conforming to the "faas.name" // semantic conventions. It represents the name of the single function that // this runtime instance executes. func FaaSName(val string) attribute.KeyValue { return FaaSNameKey.String(val) } // FaaSVersion returns an attribute KeyValue conforming to the // "faas.version" semantic conventions. It represents the immutable version of // the function being executed. func FaaSVersion(val string) attribute.KeyValue { return FaaSVersionKey.String(val) } // A service instance. const ( // ServiceNameKey is the attribute Key conforming to the "service.name" // semantic conventions. It represents the logical name of the service. // // Type: string // RequirementLevel: Required // Stability: experimental // Examples: 'shoppingcart' // Note: MUST be the same for all instances of horizontally scaled // services. If the value was not specified, SDKs MUST fallback to // `unknown_service:` concatenated with // [`process.executable.name`](process.md#process), e.g. // `unknown_service:bash`. If `process.executable.name` is not available, // the value MUST be set to `unknown_service`. ServiceNameKey = attribute.Key("service.name") // ServiceVersionKey is the attribute Key conforming to the // "service.version" semantic conventions. It represents the version string // of the service API or implementation. The format is not defined by these // conventions. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '2.0.0', 'a01dbef8a' ServiceVersionKey = attribute.Key("service.version") ) // ServiceName returns an attribute KeyValue conforming to the // "service.name" semantic conventions. It represents the logical name of the // service. func ServiceName(val string) attribute.KeyValue { return ServiceNameKey.String(val) } // ServiceVersion returns an attribute KeyValue conforming to the // "service.version" semantic conventions. It represents the version string of // the service API or implementation. The format is not defined by these // conventions. func ServiceVersion(val string) attribute.KeyValue { return ServiceVersionKey.String(val) } // A service instance. const ( // ServiceInstanceIDKey is the attribute Key conforming to the // "service.instance.id" semantic conventions. It represents the string ID // of the service instance. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'my-k8s-pod-deployment-1', // '627cc493-f310-47de-96bd-71410b7dec09' // Note: MUST be unique for each instance of the same // `service.namespace,service.name` pair (in other words // `service.namespace,service.name,service.instance.id` triplet MUST be // globally unique). The ID helps to distinguish instances of the same // service that exist at the same time (e.g. instances of a horizontally // scaled service). It is preferable for the ID to be persistent and stay // the same for the lifetime of the service instance, however it is // acceptable that the ID is ephemeral and changes during important // lifetime events for the service (e.g. service restarts). If the service // has no inherent unique ID that can be used as the value of this // attribute it is recommended to generate a random Version 1 or Version 4 // RFC 4122 UUID (services aiming for reproducible UUIDs may also use // Version 5, see RFC 4122 for more recommendations). ServiceInstanceIDKey = attribute.Key("service.instance.id") // ServiceNamespaceKey is the attribute Key conforming to the // "service.namespace" semantic conventions. It represents a namespace for // `service.name`. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'Shop' // Note: A string value having a meaning that helps to distinguish a group // of services, for example the team name that owns a group of services. // `service.name` is expected to be unique within the same namespace. If // `service.namespace` is not specified in the Resource then `service.name` // is expected to be unique for all services that have no explicit // namespace defined (so the empty/unspecified namespace is simply one more // valid namespace). Zero-length namespace string is assumed equal to // unspecified namespace. ServiceNamespaceKey = attribute.Key("service.namespace") ) // ServiceInstanceID returns an attribute KeyValue conforming to the // "service.instance.id" semantic conventions. It represents the string ID of // the service instance. func ServiceInstanceID(val string) attribute.KeyValue { return ServiceInstanceIDKey.String(val) } // ServiceNamespace returns an attribute KeyValue conforming to the // "service.namespace" semantic conventions. It represents a namespace for // `service.name`. func ServiceNamespace(val string) attribute.KeyValue { return ServiceNamespaceKey.String(val) } // The telemetry SDK used to capture data recorded by the instrumentation // libraries. const ( // TelemetrySDKLanguageKey is the attribute Key conforming to the // "telemetry.sdk.language" semantic conventions. It represents the // language of the telemetry SDK. // // Type: Enum // RequirementLevel: Required // Stability: experimental TelemetrySDKLanguageKey = attribute.Key("telemetry.sdk.language") // TelemetrySDKNameKey is the attribute Key conforming to the // "telemetry.sdk.name" semantic conventions. It represents the name of the // telemetry SDK as defined above. // // Type: string // RequirementLevel: Required // Stability: experimental // Examples: 'opentelemetry' // Note: The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute // to `opentelemetry`. // If another SDK, like a fork or a vendor-provided implementation, is // used, this SDK MUST set the // `telemetry.sdk.name` attribute to the fully-qualified class or module // name of this SDK's main entry point // or another suitable identifier depending on the language. // The identifier `opentelemetry` is reserved and MUST NOT be used in this // case. // All custom identifiers SHOULD be stable across different versions of an // implementation. TelemetrySDKNameKey = attribute.Key("telemetry.sdk.name") // TelemetrySDKVersionKey is the attribute Key conforming to the // "telemetry.sdk.version" semantic conventions. It represents the version // string of the telemetry SDK. // // Type: string // RequirementLevel: Required // Stability: experimental // Examples: '1.2.3' TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.version") ) var ( // cpp TelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String("cpp") // dotnet TelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String("dotnet") // erlang TelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String("erlang") // go TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go") // java TelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String("java") // nodejs TelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String("nodejs") // php TelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String("php") // python TelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String("python") // ruby TelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String("ruby") // rust TelemetrySDKLanguageRust = TelemetrySDKLanguageKey.String("rust") // swift TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift") // webjs TelemetrySDKLanguageWebjs = TelemetrySDKLanguageKey.String("webjs") ) // TelemetrySDKName returns an attribute KeyValue conforming to the // "telemetry.sdk.name" semantic conventions. It represents the name of the // telemetry SDK as defined above. func TelemetrySDKName(val string) attribute.KeyValue { return TelemetrySDKNameKey.String(val) } // TelemetrySDKVersion returns an attribute KeyValue conforming to the // "telemetry.sdk.version" semantic conventions. It represents the version // string of the telemetry SDK. func TelemetrySDKVersion(val string) attribute.KeyValue { return TelemetrySDKVersionKey.String(val) } // The telemetry SDK used to capture data recorded by the instrumentation // libraries. const ( // TelemetryDistroNameKey is the attribute Key conforming to the // "telemetry.distro.name" semantic conventions. It represents the name of // the auto instrumentation agent or distribution, if used. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'parts-unlimited-java' // Note: Official auto instrumentation agents and distributions SHOULD set // the `telemetry.distro.name` attribute to // a string starting with `opentelemetry-`, e.g. // `opentelemetry-java-instrumentation`. TelemetryDistroNameKey = attribute.Key("telemetry.distro.name") // TelemetryDistroVersionKey is the attribute Key conforming to the // "telemetry.distro.version" semantic conventions. It represents the // version string of the auto instrumentation agent or distribution, if // used. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '1.2.3' TelemetryDistroVersionKey = attribute.Key("telemetry.distro.version") ) // TelemetryDistroName returns an attribute KeyValue conforming to the // "telemetry.distro.name" semantic conventions. It represents the name of the // auto instrumentation agent or distribution, if used. func TelemetryDistroName(val string) attribute.KeyValue { return TelemetryDistroNameKey.String(val) } // TelemetryDistroVersion returns an attribute KeyValue conforming to the // "telemetry.distro.version" semantic conventions. It represents the version // string of the auto instrumentation agent or distribution, if used. func TelemetryDistroVersion(val string) attribute.KeyValue { return TelemetryDistroVersionKey.String(val) } // Resource describing the packaged software running the application code. Web // engines are typically executed using process.runtime. const ( // WebEngineDescriptionKey is the attribute Key conforming to the // "webengine.description" semantic conventions. It represents the // additional description of the web engine (e.g. detailed version and // edition information). // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - // 2.2.2.Final' WebEngineDescriptionKey = attribute.Key("webengine.description") // WebEngineNameKey is the attribute Key conforming to the "webengine.name" // semantic conventions. It represents the name of the web engine. // // Type: string // RequirementLevel: Required // Stability: experimental // Examples: 'WildFly' WebEngineNameKey = attribute.Key("webengine.name") // WebEngineVersionKey is the attribute Key conforming to the // "webengine.version" semantic conventions. It represents the version of // the web engine. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '21.0.0' WebEngineVersionKey = attribute.Key("webengine.version") ) // WebEngineDescription returns an attribute KeyValue conforming to the // "webengine.description" semantic conventions. It represents the additional // description of the web engine (e.g. detailed version and edition // information). func WebEngineDescription(val string) attribute.KeyValue { return WebEngineDescriptionKey.String(val) } // WebEngineName returns an attribute KeyValue conforming to the // "webengine.name" semantic conventions. It represents the name of the web // engine. func WebEngineName(val string) attribute.KeyValue { return WebEngineNameKey.String(val) } // WebEngineVersion returns an attribute KeyValue conforming to the // "webengine.version" semantic conventions. It represents the version of the // web engine. func WebEngineVersion(val string) attribute.KeyValue { return WebEngineVersionKey.String(val) } // Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's // concepts. const ( // OTelScopeNameKey is the attribute Key conforming to the // "otel.scope.name" semantic conventions. It represents the name of the // instrumentation scope - (`InstrumentationScope.Name` in OTLP). // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'io.opentelemetry.contrib.mongodb' OTelScopeNameKey = attribute.Key("otel.scope.name") // OTelScopeVersionKey is the attribute Key conforming to the // "otel.scope.version" semantic conventions. It represents the version of // the instrumentation scope - (`InstrumentationScope.Version` in OTLP). // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '1.0.0' OTelScopeVersionKey = attribute.Key("otel.scope.version") ) // OTelScopeName returns an attribute KeyValue conforming to the // "otel.scope.name" semantic conventions. It represents the name of the // instrumentation scope - (`InstrumentationScope.Name` in OTLP). func OTelScopeName(val string) attribute.KeyValue { return OTelScopeNameKey.String(val) } // OTelScopeVersion returns an attribute KeyValue conforming to the // "otel.scope.version" semantic conventions. It represents the version of the // instrumentation scope - (`InstrumentationScope.Version` in OTLP). func OTelScopeVersion(val string) attribute.KeyValue { return OTelScopeVersionKey.String(val) } // Span attributes used by non-OTLP exporters to represent OpenTelemetry // Scope's concepts. const ( // OTelLibraryNameKey is the attribute Key conforming to the // "otel.library.name" semantic conventions. // // Type: string // RequirementLevel: Optional // Stability: deprecated // Examples: 'io.opentelemetry.contrib.mongodb' // Deprecated: use the `otel.scope.name` attribute. OTelLibraryNameKey = attribute.Key("otel.library.name") // OTelLibraryVersionKey is the attribute Key conforming to the // "otel.library.version" semantic conventions. // // Type: string // RequirementLevel: Optional // Stability: deprecated // Examples: '1.0.0' // Deprecated: use the `otel.scope.version` attribute. OTelLibraryVersionKey = attribute.Key("otel.library.version") ) // OTelLibraryName returns an attribute KeyValue conforming to the // "otel.library.name" semantic conventions. // // Deprecated: use the `otel.scope.name` attribute. func OTelLibraryName(val string) attribute.KeyValue { return OTelLibraryNameKey.String(val) } // OTelLibraryVersion returns an attribute KeyValue conforming to the // "otel.library.version" semantic conventions. // // Deprecated: use the `otel.scope.version` attribute. func OTelLibraryVersion(val string) attribute.KeyValue { return OTelLibraryVersionKey.String(val) } ================================================ FILE: vendor/go.opentelemetry.io/otel/semconv/v1.24.0/schema.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package semconv // import "go.opentelemetry.io/otel/semconv/v1.24.0" // SchemaURL is the schema URL that matches the version of the semantic conventions // that this package defines. Semconv packages starting from v1.4.0 must declare // non-empty schema URL in the form https://opentelemetry.io/schemas/ const SchemaURL = "https://opentelemetry.io/schemas/1.24.0" ================================================ FILE: vendor/go.opentelemetry.io/otel/semconv/v1.24.0/trace.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 // Code generated from semantic convention specification. DO NOT EDIT. package semconv // import "go.opentelemetry.io/otel/semconv/v1.24.0" import "go.opentelemetry.io/otel/attribute" // Operations that access some remote service. const ( // PeerServiceKey is the attribute Key conforming to the "peer.service" // semantic conventions. It represents the // [`service.name`](/docs/resource/README.md#service) of the remote // service. SHOULD be equal to the actual `service.name` resource attribute // of the remote service if any. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'AuthTokenCache' PeerServiceKey = attribute.Key("peer.service") ) // PeerService returns an attribute KeyValue conforming to the // "peer.service" semantic conventions. It represents the // [`service.name`](/docs/resource/README.md#service) of the remote service. // SHOULD be equal to the actual `service.name` resource attribute of the // remote service if any. func PeerService(val string) attribute.KeyValue { return PeerServiceKey.String(val) } // These attributes may be used for any operation with an authenticated and/or // authorized enduser. const ( // EnduserIDKey is the attribute Key conforming to the "enduser.id" // semantic conventions. It represents the username or client_id extracted // from the access token or // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header // in the inbound request from outside the system. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'username' EnduserIDKey = attribute.Key("enduser.id") // EnduserRoleKey is the attribute Key conforming to the "enduser.role" // semantic conventions. It represents the actual/assumed role the client // is making the request under extracted from token or application security // context. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'admin' EnduserRoleKey = attribute.Key("enduser.role") // EnduserScopeKey is the attribute Key conforming to the "enduser.scope" // semantic conventions. It represents the scopes or granted authorities // the client currently possesses extracted from token or application // security context. The value would come from the scope associated with an // [OAuth 2.0 Access // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute // value in a [SAML 2.0 // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'read:message, write:files' EnduserScopeKey = attribute.Key("enduser.scope") ) // EnduserID returns an attribute KeyValue conforming to the "enduser.id" // semantic conventions. It represents the username or client_id extracted from // the access token or // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in // the inbound request from outside the system. func EnduserID(val string) attribute.KeyValue { return EnduserIDKey.String(val) } // EnduserRole returns an attribute KeyValue conforming to the // "enduser.role" semantic conventions. It represents the actual/assumed role // the client is making the request under extracted from token or application // security context. func EnduserRole(val string) attribute.KeyValue { return EnduserRoleKey.String(val) } // EnduserScope returns an attribute KeyValue conforming to the // "enduser.scope" semantic conventions. It represents the scopes or granted // authorities the client currently possesses extracted from token or // application security context. The value would come from the scope associated // with an [OAuth 2.0 Access // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute // value in a [SAML 2.0 // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). func EnduserScope(val string) attribute.KeyValue { return EnduserScopeKey.String(val) } // These attributes allow to report this unit of code and therefore to provide // more context about the span. const ( // CodeColumnKey is the attribute Key conforming to the "code.column" // semantic conventions. It represents the column number in `code.filepath` // best representing the operation. It SHOULD point within the code unit // named in `code.function`. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 16 CodeColumnKey = attribute.Key("code.column") // CodeFilepathKey is the attribute Key conforming to the "code.filepath" // semantic conventions. It represents the source code file name that // identifies the code unit as uniquely as possible (preferably an absolute // file path). // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '/usr/local/MyApplication/content_root/app/index.php' CodeFilepathKey = attribute.Key("code.filepath") // CodeFunctionKey is the attribute Key conforming to the "code.function" // semantic conventions. It represents the method or function name, or // equivalent (usually rightmost part of the code unit's name). // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'serveRequest' CodeFunctionKey = attribute.Key("code.function") // CodeLineNumberKey is the attribute Key conforming to the "code.lineno" // semantic conventions. It represents the line number in `code.filepath` // best representing the operation. It SHOULD point within the code unit // named in `code.function`. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 42 CodeLineNumberKey = attribute.Key("code.lineno") // CodeNamespaceKey is the attribute Key conforming to the "code.namespace" // semantic conventions. It represents the "namespace" within which // `code.function` is defined. Usually the qualified class or module name, // such that `code.namespace` + some separator + `code.function` form a // unique identifier for the code unit. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'com.example.MyHTTPService' CodeNamespaceKey = attribute.Key("code.namespace") // CodeStacktraceKey is the attribute Key conforming to the // "code.stacktrace" semantic conventions. It represents a stacktrace as a // string in the natural representation for the language runtime. The // representation is to be determined and documented by each language SIG. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'at // com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' // 'com.example.GenerateTrace.main(GenerateTrace.java:5)' CodeStacktraceKey = attribute.Key("code.stacktrace") ) // CodeColumn returns an attribute KeyValue conforming to the "code.column" // semantic conventions. It represents the column number in `code.filepath` // best representing the operation. It SHOULD point within the code unit named // in `code.function`. func CodeColumn(val int) attribute.KeyValue { return CodeColumnKey.Int(val) } // CodeFilepath returns an attribute KeyValue conforming to the // "code.filepath" semantic conventions. It represents the source code file // name that identifies the code unit as uniquely as possible (preferably an // absolute file path). func CodeFilepath(val string) attribute.KeyValue { return CodeFilepathKey.String(val) } // CodeFunction returns an attribute KeyValue conforming to the // "code.function" semantic conventions. It represents the method or function // name, or equivalent (usually rightmost part of the code unit's name). func CodeFunction(val string) attribute.KeyValue { return CodeFunctionKey.String(val) } // CodeLineNumber returns an attribute KeyValue conforming to the "code.lineno" // semantic conventions. It represents the line number in `code.filepath` best // representing the operation. It SHOULD point within the code unit named in // `code.function`. func CodeLineNumber(val int) attribute.KeyValue { return CodeLineNumberKey.Int(val) } // CodeNamespace returns an attribute KeyValue conforming to the // "code.namespace" semantic conventions. It represents the "namespace" within // which `code.function` is defined. Usually the qualified class or module // name, such that `code.namespace` + some separator + `code.function` form a // unique identifier for the code unit. func CodeNamespace(val string) attribute.KeyValue { return CodeNamespaceKey.String(val) } // CodeStacktrace returns an attribute KeyValue conforming to the // "code.stacktrace" semantic conventions. It represents a stacktrace as a // string in the natural representation for the language runtime. The // representation is to be determined and documented by each language SIG. func CodeStacktrace(val string) attribute.KeyValue { return CodeStacktraceKey.String(val) } // These attributes may be used for any operation to store information about a // thread that started a span. const ( // ThreadIDKey is the attribute Key conforming to the "thread.id" semantic // conventions. It represents the current "managed" thread ID (as opposed // to OS thread ID). // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 42 ThreadIDKey = attribute.Key("thread.id") // ThreadNameKey is the attribute Key conforming to the "thread.name" // semantic conventions. It represents the current thread name. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'main' ThreadNameKey = attribute.Key("thread.name") ) // ThreadID returns an attribute KeyValue conforming to the "thread.id" // semantic conventions. It represents the current "managed" thread ID (as // opposed to OS thread ID). func ThreadID(val int) attribute.KeyValue { return ThreadIDKey.Int(val) } // ThreadName returns an attribute KeyValue conforming to the "thread.name" // semantic conventions. It represents the current thread name. func ThreadName(val string) attribute.KeyValue { return ThreadNameKey.String(val) } // Span attributes used by AWS Lambda (in addition to general `faas` // attributes). const ( // AWSLambdaInvokedARNKey is the attribute Key conforming to the // "aws.lambda.invoked_arn" semantic conventions. It represents the full // invoked ARN as provided on the `Context` passed to the function // (`Lambda-Runtime-Invoked-Function-ARN` header on the // `/runtime/invocation/next` applicable). // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias' // Note: This may be different from `cloud.resource_id` if an alias is // involved. AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn") ) // AWSLambdaInvokedARN returns an attribute KeyValue conforming to the // "aws.lambda.invoked_arn" semantic conventions. It represents the full // invoked ARN as provided on the `Context` passed to the function // (`Lambda-Runtime-Invoked-Function-ARN` header on the // `/runtime/invocation/next` applicable). func AWSLambdaInvokedARN(val string) attribute.KeyValue { return AWSLambdaInvokedARNKey.String(val) } // Attributes for CloudEvents. CloudEvents is a specification on how to define // event data in a standard way. These attributes can be attached to spans when // performing operations with CloudEvents, regardless of the protocol being // used. const ( // CloudeventsEventIDKey is the attribute Key conforming to the // "cloudevents.event_id" semantic conventions. It represents the // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) // uniquely identifies the event. // // Type: string // RequirementLevel: Required // Stability: experimental // Examples: '123e4567-e89b-12d3-a456-426614174000', '0001' CloudeventsEventIDKey = attribute.Key("cloudevents.event_id") // CloudeventsEventSourceKey is the attribute Key conforming to the // "cloudevents.event_source" semantic conventions. It represents the // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) // identifies the context in which an event happened. // // Type: string // RequirementLevel: Required // Stability: experimental // Examples: 'https://github.com/cloudevents', // '/cloudevents/spec/pull/123', 'my-service' CloudeventsEventSourceKey = attribute.Key("cloudevents.event_source") // CloudeventsEventSpecVersionKey is the attribute Key conforming to the // "cloudevents.event_spec_version" semantic conventions. It represents the // [version of the CloudEvents // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) // which the event uses. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '1.0' CloudeventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version") // CloudeventsEventSubjectKey is the attribute Key conforming to the // "cloudevents.event_subject" semantic conventions. It represents the // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) // of the event in the context of the event producer (identified by // source). // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'mynewfile.jpg' CloudeventsEventSubjectKey = attribute.Key("cloudevents.event_subject") // CloudeventsEventTypeKey is the attribute Key conforming to the // "cloudevents.event_type" semantic conventions. It represents the // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) // contains a value describing the type of event related to the originating // occurrence. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'com.github.pull_request.opened', // 'com.example.object.deleted.v2' CloudeventsEventTypeKey = attribute.Key("cloudevents.event_type") ) // CloudeventsEventID returns an attribute KeyValue conforming to the // "cloudevents.event_id" semantic conventions. It represents the // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) // uniquely identifies the event. func CloudeventsEventID(val string) attribute.KeyValue { return CloudeventsEventIDKey.String(val) } // CloudeventsEventSource returns an attribute KeyValue conforming to the // "cloudevents.event_source" semantic conventions. It represents the // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) // identifies the context in which an event happened. func CloudeventsEventSource(val string) attribute.KeyValue { return CloudeventsEventSourceKey.String(val) } // CloudeventsEventSpecVersion returns an attribute KeyValue conforming to // the "cloudevents.event_spec_version" semantic conventions. It represents the // [version of the CloudEvents // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) // which the event uses. func CloudeventsEventSpecVersion(val string) attribute.KeyValue { return CloudeventsEventSpecVersionKey.String(val) } // CloudeventsEventSubject returns an attribute KeyValue conforming to the // "cloudevents.event_subject" semantic conventions. It represents the // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) // of the event in the context of the event producer (identified by source). func CloudeventsEventSubject(val string) attribute.KeyValue { return CloudeventsEventSubjectKey.String(val) } // CloudeventsEventType returns an attribute KeyValue conforming to the // "cloudevents.event_type" semantic conventions. It represents the // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) // contains a value describing the type of event related to the originating // occurrence. func CloudeventsEventType(val string) attribute.KeyValue { return CloudeventsEventTypeKey.String(val) } // Semantic conventions for the OpenTracing Shim const ( // OpentracingRefTypeKey is the attribute Key conforming to the // "opentracing.ref_type" semantic conventions. It represents the // parent-child Reference type // // Type: Enum // RequirementLevel: Optional // Stability: experimental // Note: The causal relationship between a child Span and a parent Span. OpentracingRefTypeKey = attribute.Key("opentracing.ref_type") ) var ( // The parent Span depends on the child Span in some capacity OpentracingRefTypeChildOf = OpentracingRefTypeKey.String("child_of") // The parent Span doesn't depend in any way on the result of the child Span OpentracingRefTypeFollowsFrom = OpentracingRefTypeKey.String("follows_from") ) // Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's // concepts. const ( // OTelStatusCodeKey is the attribute Key conforming to the // "otel.status_code" semantic conventions. It represents the name of the // code, either "OK" or "ERROR". MUST NOT be set if the status code is // UNSET. // // Type: Enum // RequirementLevel: Optional // Stability: experimental OTelStatusCodeKey = attribute.Key("otel.status_code") // OTelStatusDescriptionKey is the attribute Key conforming to the // "otel.status_description" semantic conventions. It represents the // description of the Status if it has a value, otherwise not set. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'resource not found' OTelStatusDescriptionKey = attribute.Key("otel.status_description") ) var ( // The operation has been validated by an Application developer or Operator to have completed successfully OTelStatusCodeOk = OTelStatusCodeKey.String("OK") // The operation contains an error OTelStatusCodeError = OTelStatusCodeKey.String("ERROR") ) // OTelStatusDescription returns an attribute KeyValue conforming to the // "otel.status_description" semantic conventions. It represents the // description of the Status if it has a value, otherwise not set. func OTelStatusDescription(val string) attribute.KeyValue { return OTelStatusDescriptionKey.String(val) } // This semantic convention describes an instance of a function that runs // without provisioning or managing of servers (also known as serverless // functions or Function as a Service (FaaS)) with spans. const ( // FaaSInvocationIDKey is the attribute Key conforming to the // "faas.invocation_id" semantic conventions. It represents the invocation // ID of the current function invocation. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28' FaaSInvocationIDKey = attribute.Key("faas.invocation_id") ) // FaaSInvocationID returns an attribute KeyValue conforming to the // "faas.invocation_id" semantic conventions. It represents the invocation ID // of the current function invocation. func FaaSInvocationID(val string) attribute.KeyValue { return FaaSInvocationIDKey.String(val) } // Semantic Convention for FaaS triggered as a response to some data source // operation such as a database or filesystem read/write. const ( // FaaSDocumentCollectionKey is the attribute Key conforming to the // "faas.document.collection" semantic conventions. It represents the name // of the source on which the triggering operation was performed. For // example, in Cloud Storage or S3 corresponds to the bucket name, and in // Cosmos DB to the database name. // // Type: string // RequirementLevel: Required // Stability: experimental // Examples: 'myBucketName', 'myDBName' FaaSDocumentCollectionKey = attribute.Key("faas.document.collection") // FaaSDocumentNameKey is the attribute Key conforming to the // "faas.document.name" semantic conventions. It represents the document // name/table subjected to the operation. For example, in Cloud Storage or // S3 is the name of the file, and in Cosmos DB the table name. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'myFile.txt', 'myTableName' FaaSDocumentNameKey = attribute.Key("faas.document.name") // FaaSDocumentOperationKey is the attribute Key conforming to the // "faas.document.operation" semantic conventions. It represents the // describes the type of the operation that was performed on the data. // // Type: Enum // RequirementLevel: Required // Stability: experimental FaaSDocumentOperationKey = attribute.Key("faas.document.operation") // FaaSDocumentTimeKey is the attribute Key conforming to the // "faas.document.time" semantic conventions. It represents a string // containing the time when the data was accessed in the [ISO // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '2020-01-23T13:47:06Z' FaaSDocumentTimeKey = attribute.Key("faas.document.time") ) var ( // When a new object is created FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert") // When an object is modified FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit") // When an object is deleted FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete") ) // FaaSDocumentCollection returns an attribute KeyValue conforming to the // "faas.document.collection" semantic conventions. It represents the name of // the source on which the triggering operation was performed. For example, in // Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the // database name. func FaaSDocumentCollection(val string) attribute.KeyValue { return FaaSDocumentCollectionKey.String(val) } // FaaSDocumentName returns an attribute KeyValue conforming to the // "faas.document.name" semantic conventions. It represents the document // name/table subjected to the operation. For example, in Cloud Storage or S3 // is the name of the file, and in Cosmos DB the table name. func FaaSDocumentName(val string) attribute.KeyValue { return FaaSDocumentNameKey.String(val) } // FaaSDocumentTime returns an attribute KeyValue conforming to the // "faas.document.time" semantic conventions. It represents a string containing // the time when the data was accessed in the [ISO // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). func FaaSDocumentTime(val string) attribute.KeyValue { return FaaSDocumentTimeKey.String(val) } // Semantic Convention for FaaS scheduled to be executed regularly. const ( // FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic // conventions. It represents a string containing the schedule period as // [Cron // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '0/5 * * * ? *' FaaSCronKey = attribute.Key("faas.cron") // FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic // conventions. It represents a string containing the function invocation // time in the [ISO // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '2020-01-23T13:47:06Z' FaaSTimeKey = attribute.Key("faas.time") ) // FaaSCron returns an attribute KeyValue conforming to the "faas.cron" // semantic conventions. It represents a string containing the schedule period // as [Cron // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). func FaaSCron(val string) attribute.KeyValue { return FaaSCronKey.String(val) } // FaaSTime returns an attribute KeyValue conforming to the "faas.time" // semantic conventions. It represents a string containing the function // invocation time in the [ISO // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). func FaaSTime(val string) attribute.KeyValue { return FaaSTimeKey.String(val) } // Contains additional attributes for incoming FaaS spans. const ( // FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart" // semantic conventions. It represents a boolean that is true if the // serverless function is executed for the first time (aka cold-start). // // Type: boolean // RequirementLevel: Optional // Stability: experimental FaaSColdstartKey = attribute.Key("faas.coldstart") ) // FaaSColdstart returns an attribute KeyValue conforming to the // "faas.coldstart" semantic conventions. It represents a boolean that is true // if the serverless function is executed for the first time (aka cold-start). func FaaSColdstart(val bool) attribute.KeyValue { return FaaSColdstartKey.Bool(val) } // The `aws` conventions apply to operations using the AWS SDK. They map // request or response parameters in AWS SDK API calls to attributes on a Span. // The conventions have been collected over time based on feedback from AWS // users of tracing and will continue to evolve as new interesting conventions // are found. // Some descriptions are also provided for populating general OpenTelemetry // semantic conventions based on these APIs. const ( // AWSRequestIDKey is the attribute Key conforming to the "aws.request_id" // semantic conventions. It represents the AWS request ID as returned in // the response headers `x-amz-request-id` or `x-amz-requestid`. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '79b9da39-b7ae-508a-a6bc-864b2829c622', 'C9ER4AJX75574TDJ' AWSRequestIDKey = attribute.Key("aws.request_id") ) // AWSRequestID returns an attribute KeyValue conforming to the // "aws.request_id" semantic conventions. It represents the AWS request ID as // returned in the response headers `x-amz-request-id` or `x-amz-requestid`. func AWSRequestID(val string) attribute.KeyValue { return AWSRequestIDKey.String(val) } // Attributes that exist for multiple DynamoDB request types. const ( // AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the // "aws.dynamodb.attributes_to_get" semantic conventions. It represents the // value of the `AttributesToGet` request parameter. // // Type: string[] // RequirementLevel: Optional // Stability: experimental // Examples: 'lives', 'id' AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get") // AWSDynamoDBConsistentReadKey is the attribute Key conforming to the // "aws.dynamodb.consistent_read" semantic conventions. It represents the // value of the `ConsistentRead` request parameter. // // Type: boolean // RequirementLevel: Optional // Stability: experimental AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read") // AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the // "aws.dynamodb.consumed_capacity" semantic conventions. It represents the // JSON-serialized value of each item in the `ConsumedCapacity` response // field. // // Type: string[] // RequirementLevel: Optional // Stability: experimental // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": { // "string" : { "CapacityUnits": number, "ReadCapacityUnits": number, // "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" : // { "CapacityUnits": number, "ReadCapacityUnits": number, // "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table": // { "CapacityUnits": number, "ReadCapacityUnits": number, // "WriteCapacityUnits": number }, "TableName": "string", // "WriteCapacityUnits": number }' AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity") // AWSDynamoDBIndexNameKey is the attribute Key conforming to the // "aws.dynamodb.index_name" semantic conventions. It represents the value // of the `IndexName` request parameter. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'name_to_group' AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name") // AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to // the "aws.dynamodb.item_collection_metrics" semantic conventions. It // represents the JSON-serialized value of the `ItemCollectionMetrics` // response field. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B": // blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { // "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ], // "NULL": boolean, "S": "string", "SS": [ "string" ] } }, // "SizeEstimateRangeGB": [ number ] } ] }' AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics") // AWSDynamoDBLimitKey is the attribute Key conforming to the // "aws.dynamodb.limit" semantic conventions. It represents the value of // the `Limit` request parameter. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 10 AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit") // AWSDynamoDBProjectionKey is the attribute Key conforming to the // "aws.dynamodb.projection" semantic conventions. It represents the value // of the `ProjectionExpression` request parameter. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'Title', 'Title, Price, Color', 'Title, Description, // RelatedItems, ProductReviews' AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection") // AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to // the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It // represents the value of the `ProvisionedThroughput.ReadCapacityUnits` // request parameter. // // Type: double // RequirementLevel: Optional // Stability: experimental // Examples: 1.0, 2.0 AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity") // AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming // to the "aws.dynamodb.provisioned_write_capacity" semantic conventions. // It represents the value of the // `ProvisionedThroughput.WriteCapacityUnits` request parameter. // // Type: double // RequirementLevel: Optional // Stability: experimental // Examples: 1.0, 2.0 AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity") // AWSDynamoDBSelectKey is the attribute Key conforming to the // "aws.dynamodb.select" semantic conventions. It represents the value of // the `Select` request parameter. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'ALL_ATTRIBUTES', 'COUNT' AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select") // AWSDynamoDBTableNamesKey is the attribute Key conforming to the // "aws.dynamodb.table_names" semantic conventions. It represents the keys // in the `RequestItems` object field. // // Type: string[] // RequirementLevel: Optional // Stability: experimental // Examples: 'Users', 'Cats' AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names") ) // AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to // the "aws.dynamodb.attributes_to_get" semantic conventions. It represents the // value of the `AttributesToGet` request parameter. func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue { return AWSDynamoDBAttributesToGetKey.StringSlice(val) } // AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the // "aws.dynamodb.consistent_read" semantic conventions. It represents the value // of the `ConsistentRead` request parameter. func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue { return AWSDynamoDBConsistentReadKey.Bool(val) } // AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to // the "aws.dynamodb.consumed_capacity" semantic conventions. It represents the // JSON-serialized value of each item in the `ConsumedCapacity` response field. func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue { return AWSDynamoDBConsumedCapacityKey.StringSlice(val) } // AWSDynamoDBIndexName returns an attribute KeyValue conforming to the // "aws.dynamodb.index_name" semantic conventions. It represents the value of // the `IndexName` request parameter. func AWSDynamoDBIndexName(val string) attribute.KeyValue { return AWSDynamoDBIndexNameKey.String(val) } // AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming // to the "aws.dynamodb.item_collection_metrics" semantic conventions. It // represents the JSON-serialized value of the `ItemCollectionMetrics` response // field. func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue { return AWSDynamoDBItemCollectionMetricsKey.String(val) } // AWSDynamoDBLimit returns an attribute KeyValue conforming to the // "aws.dynamodb.limit" semantic conventions. It represents the value of the // `Limit` request parameter. func AWSDynamoDBLimit(val int) attribute.KeyValue { return AWSDynamoDBLimitKey.Int(val) } // AWSDynamoDBProjection returns an attribute KeyValue conforming to the // "aws.dynamodb.projection" semantic conventions. It represents the value of // the `ProjectionExpression` request parameter. func AWSDynamoDBProjection(val string) attribute.KeyValue { return AWSDynamoDBProjectionKey.String(val) } // AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue // conforming to the "aws.dynamodb.provisioned_read_capacity" semantic // conventions. It represents the value of the // `ProvisionedThroughput.ReadCapacityUnits` request parameter. func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue { return AWSDynamoDBProvisionedReadCapacityKey.Float64(val) } // AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue // conforming to the "aws.dynamodb.provisioned_write_capacity" semantic // conventions. It represents the value of the // `ProvisionedThroughput.WriteCapacityUnits` request parameter. func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue { return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val) } // AWSDynamoDBSelect returns an attribute KeyValue conforming to the // "aws.dynamodb.select" semantic conventions. It represents the value of the // `Select` request parameter. func AWSDynamoDBSelect(val string) attribute.KeyValue { return AWSDynamoDBSelectKey.String(val) } // AWSDynamoDBTableNames returns an attribute KeyValue conforming to the // "aws.dynamodb.table_names" semantic conventions. It represents the keys in // the `RequestItems` object field. func AWSDynamoDBTableNames(val ...string) attribute.KeyValue { return AWSDynamoDBTableNamesKey.StringSlice(val) } // DynamoDB.CreateTable const ( // AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to // the "aws.dynamodb.global_secondary_indexes" semantic conventions. It // represents the JSON-serialized value of each item of the // `GlobalSecondaryIndexes` request field // // Type: string[] // RequirementLevel: Optional // Stability: experimental // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName": // "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ // "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": { // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }' AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes") // AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to // the "aws.dynamodb.local_secondary_indexes" semantic conventions. It // represents the JSON-serialized value of each item of the // `LocalSecondaryIndexes` request field. // // Type: string[] // RequirementLevel: Optional // Stability: experimental // Examples: '{ "IndexARN": "string", "IndexName": "string", // "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ { // "AttributeName": "string", "KeyType": "string" } ], "Projection": { // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }' AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes") ) // AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue // conforming to the "aws.dynamodb.global_secondary_indexes" semantic // conventions. It represents the JSON-serialized value of each item of the // `GlobalSecondaryIndexes` request field func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue { return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val) } // AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming // to the "aws.dynamodb.local_secondary_indexes" semantic conventions. It // represents the JSON-serialized value of each item of the // `LocalSecondaryIndexes` request field. func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue { return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val) } // DynamoDB.ListTables const ( // AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the // "aws.dynamodb.exclusive_start_table" semantic conventions. It represents // the value of the `ExclusiveStartTableName` request parameter. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'Users', 'CatsTable' AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table") // AWSDynamoDBTableCountKey is the attribute Key conforming to the // "aws.dynamodb.table_count" semantic conventions. It represents the the // number of items in the `TableNames` response parameter. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 20 AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count") ) // AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming // to the "aws.dynamodb.exclusive_start_table" semantic conventions. It // represents the value of the `ExclusiveStartTableName` request parameter. func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue { return AWSDynamoDBExclusiveStartTableKey.String(val) } // AWSDynamoDBTableCount returns an attribute KeyValue conforming to the // "aws.dynamodb.table_count" semantic conventions. It represents the the // number of items in the `TableNames` response parameter. func AWSDynamoDBTableCount(val int) attribute.KeyValue { return AWSDynamoDBTableCountKey.Int(val) } // DynamoDB.Query const ( // AWSDynamoDBScanForwardKey is the attribute Key conforming to the // "aws.dynamodb.scan_forward" semantic conventions. It represents the // value of the `ScanIndexForward` request parameter. // // Type: boolean // RequirementLevel: Optional // Stability: experimental AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward") ) // AWSDynamoDBScanForward returns an attribute KeyValue conforming to the // "aws.dynamodb.scan_forward" semantic conventions. It represents the value of // the `ScanIndexForward` request parameter. func AWSDynamoDBScanForward(val bool) attribute.KeyValue { return AWSDynamoDBScanForwardKey.Bool(val) } // DynamoDB.Scan const ( // AWSDynamoDBCountKey is the attribute Key conforming to the // "aws.dynamodb.count" semantic conventions. It represents the value of // the `Count` response parameter. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 10 AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count") // AWSDynamoDBScannedCountKey is the attribute Key conforming to the // "aws.dynamodb.scanned_count" semantic conventions. It represents the // value of the `ScannedCount` response parameter. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 50 AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count") // AWSDynamoDBSegmentKey is the attribute Key conforming to the // "aws.dynamodb.segment" semantic conventions. It represents the value of // the `Segment` request parameter. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 10 AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment") // AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the // "aws.dynamodb.total_segments" semantic conventions. It represents the // value of the `TotalSegments` request parameter. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 100 AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments") ) // AWSDynamoDBCount returns an attribute KeyValue conforming to the // "aws.dynamodb.count" semantic conventions. It represents the value of the // `Count` response parameter. func AWSDynamoDBCount(val int) attribute.KeyValue { return AWSDynamoDBCountKey.Int(val) } // AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the // "aws.dynamodb.scanned_count" semantic conventions. It represents the value // of the `ScannedCount` response parameter. func AWSDynamoDBScannedCount(val int) attribute.KeyValue { return AWSDynamoDBScannedCountKey.Int(val) } // AWSDynamoDBSegment returns an attribute KeyValue conforming to the // "aws.dynamodb.segment" semantic conventions. It represents the value of the // `Segment` request parameter. func AWSDynamoDBSegment(val int) attribute.KeyValue { return AWSDynamoDBSegmentKey.Int(val) } // AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the // "aws.dynamodb.total_segments" semantic conventions. It represents the value // of the `TotalSegments` request parameter. func AWSDynamoDBTotalSegments(val int) attribute.KeyValue { return AWSDynamoDBTotalSegmentsKey.Int(val) } // DynamoDB.UpdateTable const ( // AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to // the "aws.dynamodb.attribute_definitions" semantic conventions. It // represents the JSON-serialized value of each item in the // `AttributeDefinitions` request field. // // Type: string[] // RequirementLevel: Optional // Stability: experimental // Examples: '{ "AttributeName": "string", "AttributeType": "string" }' AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions") // AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic // conventions. It represents the JSON-serialized value of each item in the // the `GlobalSecondaryIndexUpdates` request field. // // Type: string[] // RequirementLevel: Optional // Stability: experimental // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ { // "AttributeName": "string", "KeyType": "string" } ], "Projection": { // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, // "ProvisionedThroughput": { "ReadCapacityUnits": number, // "WriteCapacityUnits": number } }' AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates") ) // AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming // to the "aws.dynamodb.attribute_definitions" semantic conventions. It // represents the JSON-serialized value of each item in the // `AttributeDefinitions` request field. func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue { return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val) } // AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic // conventions. It represents the JSON-serialized value of each item in the the // `GlobalSecondaryIndexUpdates` request field. func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue { return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val) } // Attributes that exist for S3 request types. const ( // AWSS3BucketKey is the attribute Key conforming to the "aws.s3.bucket" // semantic conventions. It represents the S3 bucket name the request // refers to. Corresponds to the `--bucket` parameter of the [S3 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) // operations. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'some-bucket-name' // Note: The `bucket` attribute is applicable to all S3 operations that // reference a bucket, i.e. that require the bucket name as a mandatory // parameter. // This applies to almost all S3 operations except `list-buckets`. AWSS3BucketKey = attribute.Key("aws.s3.bucket") // AWSS3CopySourceKey is the attribute Key conforming to the // "aws.s3.copy_source" semantic conventions. It represents the source // object (in the form `bucket`/`key`) for the copy operation. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'someFile.yml' // Note: The `copy_source` attribute applies to S3 copy operations and // corresponds to the `--copy-source` parameter // of the [copy-object operation within the S3 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html). // This applies in particular to the following operations: // // - // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) // - // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) AWSS3CopySourceKey = attribute.Key("aws.s3.copy_source") // AWSS3DeleteKey is the attribute Key conforming to the "aws.s3.delete" // semantic conventions. It represents the delete request container that // specifies the objects to be deleted. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: // 'Objects=[{Key=string,VersionID=string},{Key=string,VersionID=string}],Quiet=boolean' // Note: The `delete` attribute is only applicable to the // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) // operation. // The `delete` attribute corresponds to the `--delete` parameter of the // [delete-objects operation within the S3 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html). AWSS3DeleteKey = attribute.Key("aws.s3.delete") // AWSS3KeyKey is the attribute Key conforming to the "aws.s3.key" semantic // conventions. It represents the S3 object key the request refers to. // Corresponds to the `--key` parameter of the [S3 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) // operations. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'someFile.yml' // Note: The `key` attribute is applicable to all object-related S3 // operations, i.e. that require the object key as a mandatory parameter. // This applies in particular to the following operations: // // - // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) // - // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) // - // [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html) // - // [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html) // - // [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html) // - // [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html) // - // [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html) // - // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) // - // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) // - // [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html) // - // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) // - // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) // - // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) AWSS3KeyKey = attribute.Key("aws.s3.key") // AWSS3PartNumberKey is the attribute Key conforming to the // "aws.s3.part_number" semantic conventions. It represents the part number // of the part being uploaded in a multipart-upload operation. This is a // positive integer between 1 and 10,000. // // Type: int // RequirementLevel: Optional // Stability: experimental // Examples: 3456 // Note: The `part_number` attribute is only applicable to the // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) // and // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) // operations. // The `part_number` attribute corresponds to the `--part-number` parameter // of the // [upload-part operation within the S3 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html). AWSS3PartNumberKey = attribute.Key("aws.s3.part_number") // AWSS3UploadIDKey is the attribute Key conforming to the // "aws.s3.upload_id" semantic conventions. It represents the upload ID // that identifies the multipart upload. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ' // Note: The `upload_id` attribute applies to S3 multipart-upload // operations and corresponds to the `--upload-id` parameter // of the [S3 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) // multipart operations. // This applies in particular to the following operations: // // - // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) // - // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) // - // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) // - // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) // - // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) AWSS3UploadIDKey = attribute.Key("aws.s3.upload_id") ) // AWSS3Bucket returns an attribute KeyValue conforming to the // "aws.s3.bucket" semantic conventions. It represents the S3 bucket name the // request refers to. Corresponds to the `--bucket` parameter of the [S3 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) // operations. func AWSS3Bucket(val string) attribute.KeyValue { return AWSS3BucketKey.String(val) } // AWSS3CopySource returns an attribute KeyValue conforming to the // "aws.s3.copy_source" semantic conventions. It represents the source object // (in the form `bucket`/`key`) for the copy operation. func AWSS3CopySource(val string) attribute.KeyValue { return AWSS3CopySourceKey.String(val) } // AWSS3Delete returns an attribute KeyValue conforming to the // "aws.s3.delete" semantic conventions. It represents the delete request // container that specifies the objects to be deleted. func AWSS3Delete(val string) attribute.KeyValue { return AWSS3DeleteKey.String(val) } // AWSS3Key returns an attribute KeyValue conforming to the "aws.s3.key" // semantic conventions. It represents the S3 object key the request refers to. // Corresponds to the `--key` parameter of the [S3 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) // operations. func AWSS3Key(val string) attribute.KeyValue { return AWSS3KeyKey.String(val) } // AWSS3PartNumber returns an attribute KeyValue conforming to the // "aws.s3.part_number" semantic conventions. It represents the part number of // the part being uploaded in a multipart-upload operation. This is a positive // integer between 1 and 10,000. func AWSS3PartNumber(val int) attribute.KeyValue { return AWSS3PartNumberKey.Int(val) } // AWSS3UploadID returns an attribute KeyValue conforming to the // "aws.s3.upload_id" semantic conventions. It represents the upload ID that // identifies the multipart upload. func AWSS3UploadID(val string) attribute.KeyValue { return AWSS3UploadIDKey.String(val) } // Semantic conventions to apply when instrumenting the GraphQL implementation. // They map GraphQL operations to attributes on a Span. const ( // GraphqlDocumentKey is the attribute Key conforming to the // "graphql.document" semantic conventions. It represents the GraphQL // document being executed. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'query findBookByID { bookByID(id: ?) { name } }' // Note: The value may be sanitized to exclude sensitive information. GraphqlDocumentKey = attribute.Key("graphql.document") // GraphqlOperationNameKey is the attribute Key conforming to the // "graphql.operation.name" semantic conventions. It represents the name of // the operation being executed. // // Type: string // RequirementLevel: Optional // Stability: experimental // Examples: 'findBookByID' GraphqlOperationNameKey = attribute.Key("graphql.operation.name") // GraphqlOperationTypeKey is the attribute Key conforming to the // "graphql.operation.type" semantic conventions. It represents the type of // the operation being executed. // // Type: Enum // RequirementLevel: Optional // Stability: experimental // Examples: 'query', 'mutation', 'subscription' GraphqlOperationTypeKey = attribute.Key("graphql.operation.type") ) var ( // GraphQL query GraphqlOperationTypeQuery = GraphqlOperationTypeKey.String("query") // GraphQL mutation GraphqlOperationTypeMutation = GraphqlOperationTypeKey.String("mutation") // GraphQL subscription GraphqlOperationTypeSubscription = GraphqlOperationTypeKey.String("subscription") ) // GraphqlDocument returns an attribute KeyValue conforming to the // "graphql.document" semantic conventions. It represents the GraphQL document // being executed. func GraphqlDocument(val string) attribute.KeyValue { return GraphqlDocumentKey.String(val) } // GraphqlOperationName returns an attribute KeyValue conforming to the // "graphql.operation.name" semantic conventions. It represents the name of the // operation being executed. func GraphqlOperationName(val string) attribute.KeyValue { return GraphqlOperationNameKey.String(val) } ================================================ FILE: vendor/go.opentelemetry.io/otel/trace/LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor 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, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/go.opentelemetry.io/otel/trace/README.md ================================================ # Trace API [![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/trace)](https://pkg.go.dev/go.opentelemetry.io/otel/trace) ================================================ FILE: vendor/go.opentelemetry.io/otel/trace/config.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package trace // import "go.opentelemetry.io/otel/trace" import ( "time" "go.opentelemetry.io/otel/attribute" ) // TracerConfig is a group of options for a Tracer. type TracerConfig struct { instrumentationVersion string // Schema URL of the telemetry emitted by the Tracer. schemaURL string attrs attribute.Set } // InstrumentationVersion returns the version of the library providing instrumentation. func (t *TracerConfig) InstrumentationVersion() string { return t.instrumentationVersion } // InstrumentationAttributes returns the attributes associated with the library // providing instrumentation. func (t *TracerConfig) InstrumentationAttributes() attribute.Set { return t.attrs } // SchemaURL returns the Schema URL of the telemetry emitted by the Tracer. func (t *TracerConfig) SchemaURL() string { return t.schemaURL } // NewTracerConfig applies all the options to a returned TracerConfig. func NewTracerConfig(options ...TracerOption) TracerConfig { var config TracerConfig for _, option := range options { config = option.apply(config) } return config } // TracerOption applies an option to a TracerConfig. type TracerOption interface { apply(TracerConfig) TracerConfig } type tracerOptionFunc func(TracerConfig) TracerConfig func (fn tracerOptionFunc) apply(cfg TracerConfig) TracerConfig { return fn(cfg) } // SpanConfig is a group of options for a Span. type SpanConfig struct { attributes []attribute.KeyValue timestamp time.Time links []Link newRoot bool spanKind SpanKind stackTrace bool } // Attributes describe the associated qualities of a Span. func (cfg *SpanConfig) Attributes() []attribute.KeyValue { return cfg.attributes } // Timestamp is a time in a Span life-cycle. func (cfg *SpanConfig) Timestamp() time.Time { return cfg.timestamp } // StackTrace checks whether stack trace capturing is enabled. func (cfg *SpanConfig) StackTrace() bool { return cfg.stackTrace } // Links are the associations a Span has with other Spans. func (cfg *SpanConfig) Links() []Link { return cfg.links } // NewRoot identifies a Span as the root Span for a new trace. This is // commonly used when an existing trace crosses trust boundaries and the // remote parent span context should be ignored for security. func (cfg *SpanConfig) NewRoot() bool { return cfg.newRoot } // SpanKind is the role a Span has in a trace. func (cfg *SpanConfig) SpanKind() SpanKind { return cfg.spanKind } // NewSpanStartConfig applies all the options to a returned SpanConfig. // No validation is performed on the returned SpanConfig (e.g. no uniqueness // checking or bounding of data), it is left to the SDK to perform this // action. func NewSpanStartConfig(options ...SpanStartOption) SpanConfig { var c SpanConfig for _, option := range options { c = option.applySpanStart(c) } return c } // NewSpanEndConfig applies all the options to a returned SpanConfig. // No validation is performed on the returned SpanConfig (e.g. no uniqueness // checking or bounding of data), it is left to the SDK to perform this // action. func NewSpanEndConfig(options ...SpanEndOption) SpanConfig { var c SpanConfig for _, option := range options { c = option.applySpanEnd(c) } return c } // SpanStartOption applies an option to a SpanConfig. These options are applicable // only when the span is created. type SpanStartOption interface { applySpanStart(SpanConfig) SpanConfig } type spanOptionFunc func(SpanConfig) SpanConfig func (fn spanOptionFunc) applySpanStart(cfg SpanConfig) SpanConfig { return fn(cfg) } // SpanEndOption applies an option to a SpanConfig. These options are // applicable only when the span is ended. type SpanEndOption interface { applySpanEnd(SpanConfig) SpanConfig } // EventConfig is a group of options for an Event. type EventConfig struct { attributes []attribute.KeyValue timestamp time.Time stackTrace bool } // Attributes describe the associated qualities of an Event. func (cfg *EventConfig) Attributes() []attribute.KeyValue { return cfg.attributes } // Timestamp is a time in an Event life-cycle. func (cfg *EventConfig) Timestamp() time.Time { return cfg.timestamp } // StackTrace checks whether stack trace capturing is enabled. func (cfg *EventConfig) StackTrace() bool { return cfg.stackTrace } // NewEventConfig applies all the EventOptions to a returned EventConfig. If no // timestamp option is passed, the returned EventConfig will have a Timestamp // set to the call time, otherwise no validation is performed on the returned // EventConfig. func NewEventConfig(options ...EventOption) EventConfig { var c EventConfig for _, option := range options { c = option.applyEvent(c) } if c.timestamp.IsZero() { c.timestamp = time.Now() } return c } // EventOption applies span event options to an EventConfig. type EventOption interface { applyEvent(EventConfig) EventConfig } // SpanOption are options that can be used at both the beginning and end of a span. type SpanOption interface { SpanStartOption SpanEndOption } // SpanStartEventOption are options that can be used at the start of a span, or with an event. type SpanStartEventOption interface { SpanStartOption EventOption } // SpanEndEventOption are options that can be used at the end of a span, or with an event. type SpanEndEventOption interface { SpanEndOption EventOption } type attributeOption []attribute.KeyValue func (o attributeOption) applySpan(c SpanConfig) SpanConfig { c.attributes = append(c.attributes, []attribute.KeyValue(o)...) return c } func (o attributeOption) applySpanStart(c SpanConfig) SpanConfig { return o.applySpan(c) } func (o attributeOption) applyEvent(c EventConfig) EventConfig { c.attributes = append(c.attributes, []attribute.KeyValue(o)...) return c } var _ SpanStartEventOption = attributeOption{} // WithAttributes adds the attributes related to a span life-cycle event. // These attributes are used to describe the work a Span represents when this // option is provided to a Span's start or end events. Otherwise, these // attributes provide additional information about the event being recorded // (e.g. error, state change, processing progress, system event). // // If multiple of these options are passed the attributes of each successive // option will extend the attributes instead of overwriting. There is no // guarantee of uniqueness in the resulting attributes. func WithAttributes(attributes ...attribute.KeyValue) SpanStartEventOption { return attributeOption(attributes) } // SpanEventOption are options that can be used with an event or a span. type SpanEventOption interface { SpanOption EventOption } type timestampOption time.Time func (o timestampOption) applySpan(c SpanConfig) SpanConfig { c.timestamp = time.Time(o) return c } func (o timestampOption) applySpanStart(c SpanConfig) SpanConfig { return o.applySpan(c) } func (o timestampOption) applySpanEnd(c SpanConfig) SpanConfig { return o.applySpan(c) } func (o timestampOption) applyEvent(c EventConfig) EventConfig { c.timestamp = time.Time(o) return c } var _ SpanEventOption = timestampOption{} // WithTimestamp sets the time of a Span or Event life-cycle moment (e.g. // started, stopped, errored). func WithTimestamp(t time.Time) SpanEventOption { return timestampOption(t) } type stackTraceOption bool func (o stackTraceOption) applyEvent(c EventConfig) EventConfig { c.stackTrace = bool(o) return c } func (o stackTraceOption) applySpan(c SpanConfig) SpanConfig { c.stackTrace = bool(o) return c } func (o stackTraceOption) applySpanEnd(c SpanConfig) SpanConfig { return o.applySpan(c) } // WithStackTrace sets the flag to capture the error with stack trace (e.g. true, false). func WithStackTrace(b bool) SpanEndEventOption { return stackTraceOption(b) } // WithLinks adds links to a Span. The links are added to the existing Span // links, i.e. this does not overwrite. Links with invalid span context are ignored. func WithLinks(links ...Link) SpanStartOption { return spanOptionFunc(func(cfg SpanConfig) SpanConfig { cfg.links = append(cfg.links, links...) return cfg }) } // WithNewRoot specifies that the Span should be treated as a root Span. Any // existing parent span context will be ignored when defining the Span's trace // identifiers. func WithNewRoot() SpanStartOption { return spanOptionFunc(func(cfg SpanConfig) SpanConfig { cfg.newRoot = true return cfg }) } // WithSpanKind sets the SpanKind of a Span. func WithSpanKind(kind SpanKind) SpanStartOption { return spanOptionFunc(func(cfg SpanConfig) SpanConfig { cfg.spanKind = kind return cfg }) } // WithInstrumentationVersion sets the instrumentation version. func WithInstrumentationVersion(version string) TracerOption { return tracerOptionFunc(func(cfg TracerConfig) TracerConfig { cfg.instrumentationVersion = version return cfg }) } // WithInstrumentationAttributes sets the instrumentation attributes. // // The passed attributes will be de-duplicated. func WithInstrumentationAttributes(attr ...attribute.KeyValue) TracerOption { return tracerOptionFunc(func(config TracerConfig) TracerConfig { config.attrs = attribute.NewSet(attr...) return config }) } // WithSchemaURL sets the schema URL for the Tracer. func WithSchemaURL(schemaURL string) TracerOption { return tracerOptionFunc(func(cfg TracerConfig) TracerConfig { cfg.schemaURL = schemaURL return cfg }) } ================================================ FILE: vendor/go.opentelemetry.io/otel/trace/context.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package trace // import "go.opentelemetry.io/otel/trace" import "context" type traceContextKeyType int const currentSpanKey traceContextKeyType = iota // ContextWithSpan returns a copy of parent with span set as the current Span. func ContextWithSpan(parent context.Context, span Span) context.Context { return context.WithValue(parent, currentSpanKey, span) } // ContextWithSpanContext returns a copy of parent with sc as the current // Span. The Span implementation that wraps sc is non-recording and performs // no operations other than to return sc as the SpanContext from the // SpanContext method. func ContextWithSpanContext(parent context.Context, sc SpanContext) context.Context { return ContextWithSpan(parent, nonRecordingSpan{sc: sc}) } // ContextWithRemoteSpanContext returns a copy of parent with rsc set explicly // as a remote SpanContext and as the current Span. The Span implementation // that wraps rsc is non-recording and performs no operations other than to // return rsc as the SpanContext from the SpanContext method. func ContextWithRemoteSpanContext(parent context.Context, rsc SpanContext) context.Context { return ContextWithSpanContext(parent, rsc.WithRemote(true)) } // SpanFromContext returns the current Span from ctx. // // If no Span is currently set in ctx an implementation of a Span that // performs no operations is returned. func SpanFromContext(ctx context.Context) Span { if ctx == nil { return noopSpanInstance } if span, ok := ctx.Value(currentSpanKey).(Span); ok { return span } return noopSpanInstance } // SpanContextFromContext returns the current Span's SpanContext. func SpanContextFromContext(ctx context.Context) SpanContext { return SpanFromContext(ctx).SpanContext() } ================================================ FILE: vendor/go.opentelemetry.io/otel/trace/doc.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 /* Package trace provides an implementation of the tracing part of the OpenTelemetry API. To participate in distributed traces a Span needs to be created for the operation being performed as part of a traced workflow. In its simplest form: var tracer trace.Tracer func init() { tracer = otel.Tracer("instrumentation/package/name") } func operation(ctx context.Context) { var span trace.Span ctx, span = tracer.Start(ctx, "operation") defer span.End() // ... } A Tracer is unique to the instrumentation and is used to create Spans. Instrumentation should be designed to accept a TracerProvider from which it can create its own unique Tracer. Alternatively, the registered global TracerProvider from the go.opentelemetry.io/otel package can be used as a default. const ( name = "instrumentation/package/name" version = "0.1.0" ) type Instrumentation struct { tracer trace.Tracer } func NewInstrumentation(tp trace.TracerProvider) *Instrumentation { if tp == nil { tp = otel.TracerProvider() } return &Instrumentation{ tracer: tp.Tracer(name, trace.WithInstrumentationVersion(version)), } } func operation(ctx context.Context, inst *Instrumentation) { var span trace.Span ctx, span = inst.tracer.Start(ctx, "operation") defer span.End() // ... } # API Implementations This package does not conform to the standard Go versioning policy; all of its interfaces may have methods added to them without a package major version bump. This non-standard API evolution could surprise an uninformed implementation author. They could unknowingly build their implementation in a way that would result in a runtime panic for their users that update to the new API. The API is designed to help inform an instrumentation author about this non-standard API evolution. It requires them to choose a default behavior for unimplemented interface methods. There are three behavior choices they can make: - Compilation failure - Panic - Default to another implementation All interfaces in this API embed a corresponding interface from [go.opentelemetry.io/otel/trace/embedded]. If an author wants the default behavior of their implementations to be a compilation failure, signaling to their users they need to update to the latest version of that implementation, they need to embed the corresponding interface from [go.opentelemetry.io/otel/trace/embedded] in their implementation. For example, import "go.opentelemetry.io/otel/trace/embedded" type TracerProvider struct { embedded.TracerProvider // ... } If an author wants the default behavior of their implementations to panic, they can embed the API interface directly. import "go.opentelemetry.io/otel/trace" type TracerProvider struct { trace.TracerProvider // ... } This option is not recommended. It will lead to publishing packages that contain runtime panics when users update to newer versions of [go.opentelemetry.io/otel/trace], which may be done with a trasitive dependency. Finally, an author can embed another implementation in theirs. The embedded implementation will be used for methods not defined by the author. For example, an author who wants to default to silently dropping the call can use [go.opentelemetry.io/otel/trace/noop]: import "go.opentelemetry.io/otel/trace/noop" type TracerProvider struct { noop.TracerProvider // ... } It is strongly recommended that authors only embed [go.opentelemetry.io/otel/trace/noop] if they choose this default behavior. That implementation is the only one OpenTelemetry authors can guarantee will fully implement all the API interfaces when a user updates their API. */ package trace // import "go.opentelemetry.io/otel/trace" ================================================ FILE: vendor/go.opentelemetry.io/otel/trace/embedded/README.md ================================================ # Trace Embedded [![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/trace/embedded)](https://pkg.go.dev/go.opentelemetry.io/otel/trace/embedded) ================================================ FILE: vendor/go.opentelemetry.io/otel/trace/embedded/embedded.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 // Package embedded provides interfaces embedded within the [OpenTelemetry // trace API]. // // Implementers of the [OpenTelemetry trace API] can embed the relevant type // from this package into their implementation directly. Doing so will result // in a compilation error for users when the [OpenTelemetry trace API] is // extended (which is something that can happen without a major version bump of // the API package). // // [OpenTelemetry trace API]: https://pkg.go.dev/go.opentelemetry.io/otel/trace package embedded // import "go.opentelemetry.io/otel/trace/embedded" // TracerProvider is embedded in // [go.opentelemetry.io/otel/trace.TracerProvider]. // // Embed this interface in your implementation of the // [go.opentelemetry.io/otel/trace.TracerProvider] if you want users to // experience a compilation error, signaling they need to update to your latest // implementation, when the [go.opentelemetry.io/otel/trace.TracerProvider] // interface is extended (which is something that can happen without a major // version bump of the API package). type TracerProvider interface{ tracerProvider() } // Tracer is embedded in [go.opentelemetry.io/otel/trace.Tracer]. // // Embed this interface in your implementation of the // [go.opentelemetry.io/otel/trace.Tracer] if you want users to experience a // compilation error, signaling they need to update to your latest // implementation, when the [go.opentelemetry.io/otel/trace.Tracer] interface // is extended (which is something that can happen without a major version bump // of the API package). type Tracer interface{ tracer() } // Span is embedded in [go.opentelemetry.io/otel/trace.Span]. // // Embed this interface in your implementation of the // [go.opentelemetry.io/otel/trace.Span] if you want users to experience a // compilation error, signaling they need to update to your latest // implementation, when the [go.opentelemetry.io/otel/trace.Span] interface is // extended (which is something that can happen without a major version bump of // the API package). type Span interface{ span() } ================================================ FILE: vendor/go.opentelemetry.io/otel/trace/nonrecording.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package trace // import "go.opentelemetry.io/otel/trace" // nonRecordingSpan is a minimal implementation of a Span that wraps a // SpanContext. It performs no operations other than to return the wrapped // SpanContext. type nonRecordingSpan struct { noopSpan sc SpanContext } // SpanContext returns the wrapped SpanContext. func (s nonRecordingSpan) SpanContext() SpanContext { return s.sc } ================================================ FILE: vendor/go.opentelemetry.io/otel/trace/noop.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package trace // import "go.opentelemetry.io/otel/trace" import ( "context" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/trace/embedded" ) // NewNoopTracerProvider returns an implementation of TracerProvider that // performs no operations. The Tracer and Spans created from the returned // TracerProvider also perform no operations. // // Deprecated: Use [go.opentelemetry.io/otel/trace/noop.NewTracerProvider] // instead. func NewNoopTracerProvider() TracerProvider { return noopTracerProvider{} } type noopTracerProvider struct{ embedded.TracerProvider } var _ TracerProvider = noopTracerProvider{} // Tracer returns noop implementation of Tracer. func (p noopTracerProvider) Tracer(string, ...TracerOption) Tracer { return noopTracer{} } // noopTracer is an implementation of Tracer that performs no operations. type noopTracer struct{ embedded.Tracer } var _ Tracer = noopTracer{} // Start carries forward a non-recording Span, if one is present in the context, otherwise it // creates a no-op Span. func (t noopTracer) Start(ctx context.Context, name string, _ ...SpanStartOption) (context.Context, Span) { span := SpanFromContext(ctx) if _, ok := span.(nonRecordingSpan); !ok { // span is likely already a noopSpan, but let's be sure span = noopSpanInstance } return ContextWithSpan(ctx, span), span } // noopSpan is an implementation of Span that performs no operations. type noopSpan struct{ embedded.Span } var noopSpanInstance Span = noopSpan{} // SpanContext returns an empty span context. func (noopSpan) SpanContext() SpanContext { return SpanContext{} } // IsRecording always returns false. func (noopSpan) IsRecording() bool { return false } // SetStatus does nothing. func (noopSpan) SetStatus(codes.Code, string) {} // SetError does nothing. func (noopSpan) SetError(bool) {} // SetAttributes does nothing. func (noopSpan) SetAttributes(...attribute.KeyValue) {} // End does nothing. func (noopSpan) End(...SpanEndOption) {} // RecordError does nothing. func (noopSpan) RecordError(error, ...EventOption) {} // AddEvent does nothing. func (noopSpan) AddEvent(string, ...EventOption) {} // AddLink does nothing. func (noopSpan) AddLink(Link) {} // SetName does nothing. func (noopSpan) SetName(string) {} // TracerProvider returns a no-op TracerProvider. func (noopSpan) TracerProvider() TracerProvider { return noopTracerProvider{} } ================================================ FILE: vendor/go.opentelemetry.io/otel/trace/trace.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package trace // import "go.opentelemetry.io/otel/trace" import ( "bytes" "context" "encoding/hex" "encoding/json" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/trace/embedded" ) const ( // FlagsSampled is a bitmask with the sampled bit set. A SpanContext // with the sampling bit set means the span is sampled. FlagsSampled = TraceFlags(0x01) errInvalidHexID errorConst = "trace-id and span-id can only contain [0-9a-f] characters, all lowercase" errInvalidTraceIDLength errorConst = "hex encoded trace-id must have length equals to 32" errNilTraceID errorConst = "trace-id can't be all zero" errInvalidSpanIDLength errorConst = "hex encoded span-id must have length equals to 16" errNilSpanID errorConst = "span-id can't be all zero" ) type errorConst string func (e errorConst) Error() string { return string(e) } // TraceID is a unique identity of a trace. // nolint:revive // revive complains about stutter of `trace.TraceID`. type TraceID [16]byte var ( nilTraceID TraceID _ json.Marshaler = nilTraceID ) // IsValid checks whether the trace TraceID is valid. A valid trace ID does // not consist of zeros only. func (t TraceID) IsValid() bool { return !bytes.Equal(t[:], nilTraceID[:]) } // MarshalJSON implements a custom marshal function to encode TraceID // as a hex string. func (t TraceID) MarshalJSON() ([]byte, error) { return json.Marshal(t.String()) } // String returns the hex string representation form of a TraceID. func (t TraceID) String() string { return hex.EncodeToString(t[:]) } // SpanID is a unique identity of a span in a trace. type SpanID [8]byte var ( nilSpanID SpanID _ json.Marshaler = nilSpanID ) // IsValid checks whether the SpanID is valid. A valid SpanID does not consist // of zeros only. func (s SpanID) IsValid() bool { return !bytes.Equal(s[:], nilSpanID[:]) } // MarshalJSON implements a custom marshal function to encode SpanID // as a hex string. func (s SpanID) MarshalJSON() ([]byte, error) { return json.Marshal(s.String()) } // String returns the hex string representation form of a SpanID. func (s SpanID) String() string { return hex.EncodeToString(s[:]) } // TraceIDFromHex returns a TraceID from a hex string if it is compliant with // the W3C trace-context specification. See more at // https://www.w3.org/TR/trace-context/#trace-id // nolint:revive // revive complains about stutter of `trace.TraceIDFromHex`. func TraceIDFromHex(h string) (TraceID, error) { t := TraceID{} if len(h) != 32 { return t, errInvalidTraceIDLength } if err := decodeHex(h, t[:]); err != nil { return t, err } if !t.IsValid() { return t, errNilTraceID } return t, nil } // SpanIDFromHex returns a SpanID from a hex string if it is compliant // with the w3c trace-context specification. // See more at https://www.w3.org/TR/trace-context/#parent-id func SpanIDFromHex(h string) (SpanID, error) { s := SpanID{} if len(h) != 16 { return s, errInvalidSpanIDLength } if err := decodeHex(h, s[:]); err != nil { return s, err } if !s.IsValid() { return s, errNilSpanID } return s, nil } func decodeHex(h string, b []byte) error { for _, r := range h { switch { case 'a' <= r && r <= 'f': continue case '0' <= r && r <= '9': continue default: return errInvalidHexID } } decoded, err := hex.DecodeString(h) if err != nil { return err } copy(b, decoded) return nil } // TraceFlags contains flags that can be set on a SpanContext. type TraceFlags byte //nolint:revive // revive complains about stutter of `trace.TraceFlags`. // IsSampled returns if the sampling bit is set in the TraceFlags. func (tf TraceFlags) IsSampled() bool { return tf&FlagsSampled == FlagsSampled } // WithSampled sets the sampling bit in a new copy of the TraceFlags. func (tf TraceFlags) WithSampled(sampled bool) TraceFlags { // nolint:revive // sampled is not a control flag. if sampled { return tf | FlagsSampled } return tf &^ FlagsSampled } // MarshalJSON implements a custom marshal function to encode TraceFlags // as a hex string. func (tf TraceFlags) MarshalJSON() ([]byte, error) { return json.Marshal(tf.String()) } // String returns the hex string representation form of TraceFlags. func (tf TraceFlags) String() string { return hex.EncodeToString([]byte{byte(tf)}[:]) } // SpanContextConfig contains mutable fields usable for constructing // an immutable SpanContext. type SpanContextConfig struct { TraceID TraceID SpanID SpanID TraceFlags TraceFlags TraceState TraceState Remote bool } // NewSpanContext constructs a SpanContext using values from the provided // SpanContextConfig. func NewSpanContext(config SpanContextConfig) SpanContext { return SpanContext{ traceID: config.TraceID, spanID: config.SpanID, traceFlags: config.TraceFlags, traceState: config.TraceState, remote: config.Remote, } } // SpanContext contains identifying trace information about a Span. type SpanContext struct { traceID TraceID spanID SpanID traceFlags TraceFlags traceState TraceState remote bool } var _ json.Marshaler = SpanContext{} // IsValid returns if the SpanContext is valid. A valid span context has a // valid TraceID and SpanID. func (sc SpanContext) IsValid() bool { return sc.HasTraceID() && sc.HasSpanID() } // IsRemote indicates whether the SpanContext represents a remotely-created Span. func (sc SpanContext) IsRemote() bool { return sc.remote } // WithRemote returns a copy of sc with the Remote property set to remote. func (sc SpanContext) WithRemote(remote bool) SpanContext { return SpanContext{ traceID: sc.traceID, spanID: sc.spanID, traceFlags: sc.traceFlags, traceState: sc.traceState, remote: remote, } } // TraceID returns the TraceID from the SpanContext. func (sc SpanContext) TraceID() TraceID { return sc.traceID } // HasTraceID checks if the SpanContext has a valid TraceID. func (sc SpanContext) HasTraceID() bool { return sc.traceID.IsValid() } // WithTraceID returns a new SpanContext with the TraceID replaced. func (sc SpanContext) WithTraceID(traceID TraceID) SpanContext { return SpanContext{ traceID: traceID, spanID: sc.spanID, traceFlags: sc.traceFlags, traceState: sc.traceState, remote: sc.remote, } } // SpanID returns the SpanID from the SpanContext. func (sc SpanContext) SpanID() SpanID { return sc.spanID } // HasSpanID checks if the SpanContext has a valid SpanID. func (sc SpanContext) HasSpanID() bool { return sc.spanID.IsValid() } // WithSpanID returns a new SpanContext with the SpanID replaced. func (sc SpanContext) WithSpanID(spanID SpanID) SpanContext { return SpanContext{ traceID: sc.traceID, spanID: spanID, traceFlags: sc.traceFlags, traceState: sc.traceState, remote: sc.remote, } } // TraceFlags returns the flags from the SpanContext. func (sc SpanContext) TraceFlags() TraceFlags { return sc.traceFlags } // IsSampled returns if the sampling bit is set in the SpanContext's TraceFlags. func (sc SpanContext) IsSampled() bool { return sc.traceFlags.IsSampled() } // WithTraceFlags returns a new SpanContext with the TraceFlags replaced. func (sc SpanContext) WithTraceFlags(flags TraceFlags) SpanContext { return SpanContext{ traceID: sc.traceID, spanID: sc.spanID, traceFlags: flags, traceState: sc.traceState, remote: sc.remote, } } // TraceState returns the TraceState from the SpanContext. func (sc SpanContext) TraceState() TraceState { return sc.traceState } // WithTraceState returns a new SpanContext with the TraceState replaced. func (sc SpanContext) WithTraceState(state TraceState) SpanContext { return SpanContext{ traceID: sc.traceID, spanID: sc.spanID, traceFlags: sc.traceFlags, traceState: state, remote: sc.remote, } } // Equal is a predicate that determines whether two SpanContext values are equal. func (sc SpanContext) Equal(other SpanContext) bool { return sc.traceID == other.traceID && sc.spanID == other.spanID && sc.traceFlags == other.traceFlags && sc.traceState.String() == other.traceState.String() && sc.remote == other.remote } // MarshalJSON implements a custom marshal function to encode a SpanContext. func (sc SpanContext) MarshalJSON() ([]byte, error) { return json.Marshal(SpanContextConfig{ TraceID: sc.traceID, SpanID: sc.spanID, TraceFlags: sc.traceFlags, TraceState: sc.traceState, Remote: sc.remote, }) } // Span is the individual component of a trace. It represents a single named // and timed operation of a workflow that is traced. A Tracer is used to // create a Span and it is then up to the operation the Span represents to // properly end the Span when the operation itself ends. // // Warning: Methods may be added to this interface in minor releases. See // package documentation on API implementation for information on how to set // default behavior for unimplemented methods. type Span interface { // Users of the interface can ignore this. This embedded type is only used // by implementations of this interface. See the "API Implementations" // section of the package documentation for more information. embedded.Span // End completes the Span. The Span is considered complete and ready to be // delivered through the rest of the telemetry pipeline after this method // is called. Therefore, updates to the Span are not allowed after this // method has been called. End(options ...SpanEndOption) // AddEvent adds an event with the provided name and options. AddEvent(name string, options ...EventOption) // AddLink adds a link. // Adding links at span creation using WithLinks is preferred to calling AddLink // later, for contexts that are available during span creation, because head // sampling decisions can only consider information present during span creation. AddLink(link Link) // IsRecording returns the recording state of the Span. It will return // true if the Span is active and events can be recorded. IsRecording() bool // RecordError will record err as an exception span event for this span. An // additional call to SetStatus is required if the Status of the Span should // be set to Error, as this method does not change the Span status. If this // span is not being recorded or err is nil then this method does nothing. RecordError(err error, options ...EventOption) // SpanContext returns the SpanContext of the Span. The returned SpanContext // is usable even after the End method has been called for the Span. SpanContext() SpanContext // SetStatus sets the status of the Span in the form of a code and a // description, provided the status hasn't already been set to a higher // value before (OK > Error > Unset). The description is only included in a // status when the code is for an error. SetStatus(code codes.Code, description string) // SetName sets the Span name. SetName(name string) // SetAttributes sets kv as attributes of the Span. If a key from kv // already exists for an attribute of the Span it will be overwritten with // the value contained in kv. SetAttributes(kv ...attribute.KeyValue) // TracerProvider returns a TracerProvider that can be used to generate // additional Spans on the same telemetry pipeline as the current Span. TracerProvider() TracerProvider } // Link is the relationship between two Spans. The relationship can be within // the same Trace or across different Traces. // // For example, a Link is used in the following situations: // // 1. Batch Processing: A batch of operations may contain operations // associated with one or more traces/spans. Since there can only be one // parent SpanContext, a Link is used to keep reference to the // SpanContext of all operations in the batch. // 2. Public Endpoint: A SpanContext for an in incoming client request on a // public endpoint should be considered untrusted. In such a case, a new // trace with its own identity and sampling decision needs to be created, // but this new trace needs to be related to the original trace in some // form. A Link is used to keep reference to the original SpanContext and // track the relationship. type Link struct { // SpanContext of the linked Span. SpanContext SpanContext // Attributes describe the aspects of the link. Attributes []attribute.KeyValue } // LinkFromContext returns a link encapsulating the SpanContext in the provided ctx. func LinkFromContext(ctx context.Context, attrs ...attribute.KeyValue) Link { return Link{ SpanContext: SpanContextFromContext(ctx), Attributes: attrs, } } // SpanKind is the role a Span plays in a Trace. type SpanKind int // As a convenience, these match the proto definition, see // https://github.com/open-telemetry/opentelemetry-proto/blob/30d237e1ff3ab7aa50e0922b5bebdd93505090af/opentelemetry/proto/trace/v1/trace.proto#L101-L129 // // The unspecified value is not a valid `SpanKind`. Use `ValidateSpanKind()` // to coerce a span kind to a valid value. const ( // SpanKindUnspecified is an unspecified SpanKind and is not a valid // SpanKind. SpanKindUnspecified should be replaced with SpanKindInternal // if it is received. SpanKindUnspecified SpanKind = 0 // SpanKindInternal is a SpanKind for a Span that represents an internal // operation within an application. SpanKindInternal SpanKind = 1 // SpanKindServer is a SpanKind for a Span that represents the operation // of handling a request from a client. SpanKindServer SpanKind = 2 // SpanKindClient is a SpanKind for a Span that represents the operation // of client making a request to a server. SpanKindClient SpanKind = 3 // SpanKindProducer is a SpanKind for a Span that represents the operation // of a producer sending a message to a message broker. Unlike // SpanKindClient and SpanKindServer, there is often no direct // relationship between this kind of Span and a SpanKindConsumer kind. A // SpanKindProducer Span will end once the message is accepted by the // message broker which might not overlap with the processing of that // message. SpanKindProducer SpanKind = 4 // SpanKindConsumer is a SpanKind for a Span that represents the operation // of a consumer receiving a message from a message broker. Like // SpanKindProducer Spans, there is often no direct relationship between // this Span and the Span that produced the message. SpanKindConsumer SpanKind = 5 ) // ValidateSpanKind returns a valid span kind value. This will coerce // invalid values into the default value, SpanKindInternal. func ValidateSpanKind(spanKind SpanKind) SpanKind { switch spanKind { case SpanKindInternal, SpanKindServer, SpanKindClient, SpanKindProducer, SpanKindConsumer: // valid return spanKind default: return SpanKindInternal } } // String returns the specified name of the SpanKind in lower-case. func (sk SpanKind) String() string { switch sk { case SpanKindInternal: return "internal" case SpanKindServer: return "server" case SpanKindClient: return "client" case SpanKindProducer: return "producer" case SpanKindConsumer: return "consumer" default: return "unspecified" } } // Tracer is the creator of Spans. // // Warning: Methods may be added to this interface in minor releases. See // package documentation on API implementation for information on how to set // default behavior for unimplemented methods. type Tracer interface { // Users of the interface can ignore this. This embedded type is only used // by implementations of this interface. See the "API Implementations" // section of the package documentation for more information. embedded.Tracer // Start creates a span and a context.Context containing the newly-created span. // // If the context.Context provided in `ctx` contains a Span then the newly-created // Span will be a child of that span, otherwise it will be a root span. This behavior // can be overridden by providing `WithNewRoot()` as a SpanOption, causing the // newly-created Span to be a root span even if `ctx` contains a Span. // // When creating a Span it is recommended to provide all known span attributes using // the `WithAttributes()` SpanOption as samplers will only have access to the // attributes provided when a Span is created. // // Any Span that is created MUST also be ended. This is the responsibility of the user. // Implementations of this API may leak memory or other resources if Spans are not ended. Start(ctx context.Context, spanName string, opts ...SpanStartOption) (context.Context, Span) } // TracerProvider provides Tracers that are used by instrumentation code to // trace computational workflows. // // A TracerProvider is the collection destination of all Spans from Tracers it // provides, it represents a unique telemetry collection pipeline. How that // pipeline is defined, meaning how those Spans are collected, processed, and // where they are exported, depends on its implementation. Instrumentation // authors do not need to define this implementation, rather just use the // provided Tracers to instrument code. // // Commonly, instrumentation code will accept a TracerProvider implementation // at runtime from its users or it can simply use the globally registered one // (see https://pkg.go.dev/go.opentelemetry.io/otel#GetTracerProvider). // // Warning: Methods may be added to this interface in minor releases. See // package documentation on API implementation for information on how to set // default behavior for unimplemented methods. type TracerProvider interface { // Users of the interface can ignore this. This embedded type is only used // by implementations of this interface. See the "API Implementations" // section of the package documentation for more information. embedded.TracerProvider // Tracer returns a unique Tracer scoped to be used by instrumentation code // to trace computational workflows. The scope and identity of that // instrumentation code is uniquely defined by the name and options passed. // // The passed name needs to uniquely identify instrumentation code. // Therefore, it is recommended that name is the Go package name of the // library providing instrumentation (note: not the code being // instrumented). Instrumentation libraries can have multiple versions, // therefore, the WithInstrumentationVersion option should be used to // distinguish these different codebases. Additionally, instrumentation // libraries may sometimes use traces to communicate different domains of // workflow data (i.e. using spans to communicate workflow events only). If // this is the case, the WithScopeAttributes option should be used to // uniquely identify Tracers that handle the different domains of workflow // data. // // If the same name and options are passed multiple times, the same Tracer // will be returned (it is up to the implementation if this will be the // same underlying instance of that Tracer or not). It is not necessary to // call this multiple times with the same name and options to get an // up-to-date Tracer. All implementations will ensure any TracerProvider // configuration changes are propagated to all provided Tracers. // // If name is empty, then an implementation defined default name will be // used instead. // // This method is safe to call concurrently. Tracer(name string, options ...TracerOption) Tracer } ================================================ FILE: vendor/go.opentelemetry.io/otel/trace/tracestate.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package trace // import "go.opentelemetry.io/otel/trace" import ( "encoding/json" "fmt" "strings" ) const ( maxListMembers = 32 listDelimiters = "," memberDelimiter = "=" errInvalidKey errorConst = "invalid tracestate key" errInvalidValue errorConst = "invalid tracestate value" errInvalidMember errorConst = "invalid tracestate list-member" errMemberNumber errorConst = "too many list-members in tracestate" errDuplicate errorConst = "duplicate list-member in tracestate" ) type member struct { Key string Value string } // according to (chr = %x20 / (nblk-char = %x21-2B / %x2D-3C / %x3E-7E) ) // means (chr = %x20-2B / %x2D-3C / %x3E-7E) . func checkValueChar(v byte) bool { return v >= '\x20' && v <= '\x7e' && v != '\x2c' && v != '\x3d' } // according to (nblk-chr = %x21-2B / %x2D-3C / %x3E-7E) . func checkValueLast(v byte) bool { return v >= '\x21' && v <= '\x7e' && v != '\x2c' && v != '\x3d' } // based on the W3C Trace Context specification // // value = (0*255(chr)) nblk-chr // nblk-chr = %x21-2B / %x2D-3C / %x3E-7E // chr = %x20 / nblk-chr // // see https://www.w3.org/TR/trace-context-1/#value func checkValue(val string) bool { n := len(val) if n == 0 || n > 256 { return false } for i := 0; i < n-1; i++ { if !checkValueChar(val[i]) { return false } } return checkValueLast(val[n-1]) } func checkKeyRemain(key string) bool { // ( lcalpha / DIGIT / "_" / "-"/ "*" / "/" ) for _, v := range key { if isAlphaNum(byte(v)) { continue } switch v { case '_', '-', '*', '/': continue } return false } return true } // according to // // simple-key = lcalpha (0*255( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )) // system-id = lcalpha (0*13( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )) // // param n is remain part length, should be 255 in simple-key or 13 in system-id. func checkKeyPart(key string, n int) bool { if len(key) == 0 { return false } first := key[0] // key's first char ret := len(key[1:]) <= n ret = ret && first >= 'a' && first <= 'z' return ret && checkKeyRemain(key[1:]) } func isAlphaNum(c byte) bool { if c >= 'a' && c <= 'z' { return true } return c >= '0' && c <= '9' } // according to // // tenant-id = ( lcalpha / DIGIT ) 0*240( lcalpha / DIGIT / "_" / "-"/ "*" / "/" ) // // param n is remain part length, should be 240 exactly. func checkKeyTenant(key string, n int) bool { if len(key) == 0 { return false } return isAlphaNum(key[0]) && len(key[1:]) <= n && checkKeyRemain(key[1:]) } // based on the W3C Trace Context specification // // key = simple-key / multi-tenant-key // simple-key = lcalpha (0*255( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )) // multi-tenant-key = tenant-id "@" system-id // tenant-id = ( lcalpha / DIGIT ) (0*240( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )) // system-id = lcalpha (0*13( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )) // lcalpha = %x61-7A ; a-z // // see https://www.w3.org/TR/trace-context-1/#tracestate-header. func checkKey(key string) bool { tenant, system, ok := strings.Cut(key, "@") if !ok { return checkKeyPart(key, 255) } return checkKeyTenant(tenant, 240) && checkKeyPart(system, 13) } func newMember(key, value string) (member, error) { if !checkKey(key) { return member{}, errInvalidKey } if !checkValue(value) { return member{}, errInvalidValue } return member{Key: key, Value: value}, nil } func parseMember(m string) (member, error) { key, val, ok := strings.Cut(m, memberDelimiter) if !ok { return member{}, fmt.Errorf("%w: %s", errInvalidMember, m) } key = strings.TrimLeft(key, " \t") val = strings.TrimRight(val, " \t") result, e := newMember(key, val) if e != nil { return member{}, fmt.Errorf("%w: %s", errInvalidMember, m) } return result, nil } // String encodes member into a string compliant with the W3C Trace Context // specification. func (m member) String() string { return m.Key + "=" + m.Value } // TraceState provides additional vendor-specific trace identification // information across different distributed tracing systems. It represents an // immutable list consisting of key/value pairs, each pair is referred to as a // list-member. // // TraceState conforms to the W3C Trace Context specification // (https://www.w3.org/TR/trace-context-1). All operations that create or copy // a TraceState do so by validating all input and will only produce TraceState // that conform to the specification. Specifically, this means that all // list-member's key/value pairs are valid, no duplicate list-members exist, // and the maximum number of list-members (32) is not exceeded. type TraceState struct { //nolint:revive // revive complains about stutter of `trace.TraceState` // list is the members in order. list []member } var _ json.Marshaler = TraceState{} // ParseTraceState attempts to decode a TraceState from the passed // string. It returns an error if the input is invalid according to the W3C // Trace Context specification. func ParseTraceState(ts string) (TraceState, error) { if ts == "" { return TraceState{}, nil } wrapErr := func(err error) error { return fmt.Errorf("failed to parse tracestate: %w", err) } var members []member found := make(map[string]struct{}) for ts != "" { var memberStr string memberStr, ts, _ = strings.Cut(ts, listDelimiters) if len(memberStr) == 0 { continue } m, err := parseMember(memberStr) if err != nil { return TraceState{}, wrapErr(err) } if _, ok := found[m.Key]; ok { return TraceState{}, wrapErr(errDuplicate) } found[m.Key] = struct{}{} members = append(members, m) if n := len(members); n > maxListMembers { return TraceState{}, wrapErr(errMemberNumber) } } return TraceState{list: members}, nil } // MarshalJSON marshals the TraceState into JSON. func (ts TraceState) MarshalJSON() ([]byte, error) { return json.Marshal(ts.String()) } // String encodes the TraceState into a string compliant with the W3C // Trace Context specification. The returned string will be invalid if the // TraceState contains any invalid members. func (ts TraceState) String() string { if len(ts.list) == 0 { return "" } var n int n += len(ts.list) // member delimiters: '=' n += len(ts.list) - 1 // list delimiters: ',' for _, mem := range ts.list { n += len(mem.Key) n += len(mem.Value) } var sb strings.Builder sb.Grow(n) _, _ = sb.WriteString(ts.list[0].Key) _ = sb.WriteByte('=') _, _ = sb.WriteString(ts.list[0].Value) for i := 1; i < len(ts.list); i++ { _ = sb.WriteByte(listDelimiters[0]) _, _ = sb.WriteString(ts.list[i].Key) _ = sb.WriteByte('=') _, _ = sb.WriteString(ts.list[i].Value) } return sb.String() } // Get returns the value paired with key from the corresponding TraceState // list-member if it exists, otherwise an empty string is returned. func (ts TraceState) Get(key string) string { for _, member := range ts.list { if member.Key == key { return member.Value } } return "" } // Insert adds a new list-member defined by the key/value pair to the // TraceState. If a list-member already exists for the given key, that // list-member's value is updated. The new or updated list-member is always // moved to the beginning of the TraceState as specified by the W3C Trace // Context specification. // // If key or value are invalid according to the W3C Trace Context // specification an error is returned with the original TraceState. // // If adding a new list-member means the TraceState would have more members // then is allowed, the new list-member will be inserted and the right-most // list-member will be dropped in the returned TraceState. func (ts TraceState) Insert(key, value string) (TraceState, error) { m, err := newMember(key, value) if err != nil { return ts, err } n := len(ts.list) found := n for i := range ts.list { if ts.list[i].Key == key { found = i } } cTS := TraceState{} if found == n && n < maxListMembers { cTS.list = make([]member, n+1) } else { cTS.list = make([]member, n) } cTS.list[0] = m // When the number of members exceeds capacity, drop the "right-most". copy(cTS.list[1:], ts.list[0:found]) if found < n { copy(cTS.list[1+found:], ts.list[found+1:]) } return cTS, nil } // Delete returns a copy of the TraceState with the list-member identified by // key removed. func (ts TraceState) Delete(key string) TraceState { members := make([]member, ts.Len()) copy(members, ts.list) for i, member := range ts.list { if member.Key == key { members = append(members[:i], members[i+1:]...) // TraceState should contain no duplicate members. break } } return TraceState{list: members} } // Len returns the number of list-members in the TraceState. func (ts TraceState) Len() int { return len(ts.list) } ================================================ FILE: vendor/go.opentelemetry.io/otel/trace.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package otel // import "go.opentelemetry.io/otel" import ( "go.opentelemetry.io/otel/internal/global" "go.opentelemetry.io/otel/trace" ) // Tracer creates a named tracer that implements Tracer interface. // If the name is an empty string then provider uses default name. // // This is short for GetTracerProvider().Tracer(name, opts...) func Tracer(name string, opts ...trace.TracerOption) trace.Tracer { return GetTracerProvider().Tracer(name, opts...) } // GetTracerProvider returns the registered global trace provider. // If none is registered then an instance of NoopTracerProvider is returned. // // Use the trace provider to create a named tracer. E.g. // // tracer := otel.GetTracerProvider().Tracer("example.com/foo") // // or // // tracer := otel.Tracer("example.com/foo") func GetTracerProvider() trace.TracerProvider { return global.TracerProvider() } // SetTracerProvider registers `tp` as the global trace provider. func SetTracerProvider(tp trace.TracerProvider) { global.SetTracerProvider(tp) } ================================================ FILE: vendor/go.opentelemetry.io/otel/verify_examples.sh ================================================ #!/bin/bash # Copyright The OpenTelemetry Authors # SPDX-License-Identifier: Apache-2.0 set -euo pipefail cd $(dirname $0) TOOLS_DIR=$(pwd)/.tools if [ -z "${GOPATH}" ] ; then printf "GOPATH is not defined.\n" exit -1 fi if [ ! -d "${GOPATH}" ] ; then printf "GOPATH ${GOPATH} is invalid \n" exit -1 fi # Pre-requisites if ! git diff --quiet; then \ git status printf "\n\nError: working tree is not clean\n" exit -1 fi if [ "$(git tag --contains $(git log -1 --pretty=format:"%H"))" = "" ] ; then printf "$(git log -1)" printf "\n\nError: HEAD is not pointing to a tagged version" fi make ${TOOLS_DIR}/gojq DIR_TMP="${GOPATH}/src/oteltmp/" rm -rf $DIR_TMP mkdir -p $DIR_TMP printf "Copy examples to ${DIR_TMP}\n" cp -a ./example ${DIR_TMP} # Update go.mod files printf "Update go.mod: rename module and remove replace\n" PACKAGE_DIRS=$(find . -mindepth 2 -type f -name 'go.mod' -exec dirname {} \; | egrep 'example' | sed 's/^\.\///' | sort) for dir in $PACKAGE_DIRS; do printf " Update go.mod for $dir\n" (cd "${DIR_TMP}/${dir}" && \ # replaces is ("mod1" "mod2" …) replaces=($(go mod edit -json | ${TOOLS_DIR}/gojq '.Replace[].Old.Path')) && \ # strip double quotes replaces=("${replaces[@]%\"}") && \ replaces=("${replaces[@]#\"}") && \ # make an array (-dropreplace=mod1 -dropreplace=mod2 …) dropreplaces=("${replaces[@]/#/-dropreplace=}") && \ go mod edit -module "oteltmp/${dir}" "${dropreplaces[@]}" && \ go mod tidy) done printf "Update done:\n\n" # Build directories that contain main package. These directories are different than # directories that contain go.mod files. printf "Build examples:\n" EXAMPLES=$(./get_main_pkgs.sh ./example) for ex in $EXAMPLES; do printf " Build $ex in ${DIR_TMP}/${ex}\n" (cd "${DIR_TMP}/${ex}" && \ go build .) done # Cleanup printf "Remove copied files.\n" rm -rf $DIR_TMP ================================================ FILE: vendor/go.opentelemetry.io/otel/verify_readmes.sh ================================================ #!/bin/bash # Copyright The OpenTelemetry Authors # SPDX-License-Identifier: Apache-2.0 set -euo pipefail dirs=$(find . -type d -not -path "*/internal*" -not -path "*/test*" -not -path "*/example*" -not -path "*/.*" | sort) missingReadme=false for dir in $dirs; do if [ ! -f "$dir/README.md" ]; then echo "couldn't find README.md for $dir" missingReadme=true fi done if [ "$missingReadme" = true ] ; then echo "Error: some READMEs couldn't be found." exit 1 fi ================================================ FILE: vendor/go.opentelemetry.io/otel/version.go ================================================ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 package otel // import "go.opentelemetry.io/otel" // Version is the current release version of OpenTelemetry in use. func Version() string { return "1.28.0" } ================================================ FILE: vendor/go.opentelemetry.io/otel/versions.yaml ================================================ # Copyright The OpenTelemetry Authors # SPDX-License-Identifier: Apache-2.0 module-sets: stable-v1: version: v1.28.0 modules: - go.opentelemetry.io/otel - go.opentelemetry.io/otel/bridge/opencensus - go.opentelemetry.io/otel/bridge/opencensus/test - go.opentelemetry.io/otel/bridge/opentracing - go.opentelemetry.io/otel/bridge/opentracing/test - go.opentelemetry.io/otel/example/dice - go.opentelemetry.io/otel/example/namedtracer - go.opentelemetry.io/otel/example/opencensus - go.opentelemetry.io/otel/example/otel-collector - go.opentelemetry.io/otel/example/passthrough - go.opentelemetry.io/otel/example/zipkin - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp - go.opentelemetry.io/otel/exporters/otlp/otlptrace - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric - go.opentelemetry.io/otel/exporters/stdout/stdouttrace - go.opentelemetry.io/otel/exporters/zipkin - go.opentelemetry.io/otel/metric - go.opentelemetry.io/otel/sdk - go.opentelemetry.io/otel/sdk/metric - go.opentelemetry.io/otel/trace experimental-metrics: version: v0.50.0 modules: - go.opentelemetry.io/otel/example/prometheus - go.opentelemetry.io/otel/exporters/prometheus experimental-logs: version: v0.4.0 modules: - go.opentelemetry.io/otel/log - go.opentelemetry.io/otel/sdk/log - go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp - go.opentelemetry.io/otel/exporters/stdout/stdoutlog experimental-schema: version: v0.0.8 modules: - go.opentelemetry.io/otel/schema excluded-modules: - go.opentelemetry.io/otel/internal/tools - go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc ================================================ FILE: vendor/golang.org/x/exp/LICENSE ================================================ 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. ================================================ FILE: vendor/golang.org/x/exp/PATENTS ================================================ 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. ================================================ FILE: vendor/golang.org/x/exp/constraints/constraints.go ================================================ // Copyright 2021 The Go 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 constraints defines a set of useful constraints to be used // with type parameters. package constraints // Signed is a constraint that permits any signed integer type. // If future releases of Go add new predeclared signed integer types, // this constraint will be modified to include them. type Signed interface { ~int | ~int8 | ~int16 | ~int32 | ~int64 } // Unsigned is a constraint that permits any unsigned integer type. // If future releases of Go add new predeclared unsigned integer types, // this constraint will be modified to include them. type Unsigned interface { ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr } // Integer is a constraint that permits any integer type. // If future releases of Go add new predeclared integer types, // this constraint will be modified to include them. type Integer interface { Signed | Unsigned } // Float is a constraint that permits any floating-point type. // If future releases of Go add new predeclared floating-point types, // this constraint will be modified to include them. type Float interface { ~float32 | ~float64 } // Complex is a constraint that permits any complex numeric type. // If future releases of Go add new predeclared complex numeric types, // this constraint will be modified to include them. type Complex interface { ~complex64 | ~complex128 } // Ordered is a constraint that permits any ordered type: any type // that supports the operators < <= >= >. // If future releases of Go add new ordered types, // this constraint will be modified to include them. type Ordered interface { Integer | Float | ~string } ================================================ FILE: vendor/golang.org/x/sys/LICENSE ================================================ Copyright 2009 The Go Authors. 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 LLC 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. ================================================ FILE: vendor/golang.org/x/sys/PATENTS ================================================ 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. ================================================ FILE: vendor/golang.org/x/sys/plan9/asm.s ================================================ // 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 ================================================ FILE: vendor/golang.org/x/sys/plan9/asm_plan9_386.s ================================================ // 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) ================================================ FILE: vendor/golang.org/x/sys/plan9/asm_plan9_amd64.s ================================================ // 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) ================================================ FILE: vendor/golang.org/x/sys/plan9/asm_plan9_arm.s ================================================ // 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 plan9 on arm // 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·exit(SB) ================================================ FILE: vendor/golang.org/x/sys/plan9/const_plan9.go ================================================ 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 ) // Mount and bind flags const ( MREPL = 0x0000 MBEFORE = 0x0001 MAFTER = 0x0002 MORDER = 0x0003 MCREATE = 0x0004 MCACHE = 0x0010 MMASK = 0x0017 ) ================================================ FILE: vendor/golang.org/x/sys/plan9/dir_plan9.go ================================================ // 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 } ================================================ FILE: vendor/golang.org/x/sys/plan9/env_plan9.go ================================================ // 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() } func Unsetenv(key string) error { return syscall.Unsetenv(key) } ================================================ FILE: vendor/golang.org/x/sys/plan9/errors_plan9.go ================================================ // 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") ) ================================================ FILE: vendor/golang.org/x/sys/plan9/mkall.sh ================================================ #!/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="go run mksyscall.go" 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="go run mksyscall.go -l32 -plan9 -tags plan9,386" mksysnum="./mksysnum_plan9.sh /n/sources/plan9/sys/src/libc/9syscall/sys.h" mktypes="XXX" ;; plan9_amd64) mkerrors= mksyscall="go run mksyscall.go -l32 -plan9 -tags plan9,amd64" mksysnum="./mksysnum_plan9.sh /n/sources/plan9/sys/src/libc/9syscall/sys.h" mktypes="XXX" ;; plan9_arm) mkerrors= mksyscall="go run mksyscall.go -l32 -plan9 -tags plan9,arm" 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 |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 ================================================ FILE: vendor/golang.org/x/sys/plan9/mkerrors.sh ================================================ #!/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 }' | grep -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]*=" }' | grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT' | sort >_signal.grep echo '// mkerrors.sh' "$@" echo '// Code 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 ================================================ FILE: vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh ================================================ #!/bin/sh # 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. COMMAND="mksysnum_plan9.sh $@" cat <= 10 { buf[i] = byte(val%10 + '0') i-- val /= 10 } buf[i] = byte(val + '0') return string(buf[i:]) } ================================================ FILE: vendor/golang.org/x/sys/plan9/syscall.go ================================================ // 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. //go: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 ( "bytes" "strings" "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) { if strings.IndexByte(s, 0) != -1 { 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 } // ByteSliceToString returns a string form of the text represented by the slice s, with a terminating NUL and any // bytes after the NUL removed. func ByteSliceToString(s []byte) string { if i := bytes.IndexByte(s, 0); i != -1 { s = s[:i] } return string(s) } // BytePtrToString takes a pointer to a sequence of text and returns the corresponding string. // If the pointer is nil, it returns the empty string. It assumes that the text sequence is terminated // at a zero byte; if the zero byte is not present, the program may crash. func BytePtrToString(p *byte) string { if p == nil { return "" } if *p == 0 { return "" } // Find NUL terminator. n := 0 for ptr := unsafe.Pointer(p); *(*byte)(ptr) != 0; n++ { ptr = unsafe.Pointer(uintptr(ptr) + 1) } return string(unsafe.Slice(p, n)) } // 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) ================================================ FILE: vendor/golang.org/x/sys/plan9/syscall_plan9.go ================================================ // 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 ( "bytes" "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 { i := bytes.IndexByte(s, 0) if i == -1 { i = len(s) } return string(s[:i]) } 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) if err == nil { 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) ================================================ FILE: vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go ================================================ // go run mksyscall.go -l32 -plan9 -tags plan9,386 syscall_plan9.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build plan9 && 386 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) 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)) 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) 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))) 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)) 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) 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))) 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) 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 } ================================================ FILE: vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go ================================================ // go run mksyscall.go -l32 -plan9 -tags plan9,amd64 syscall_plan9.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build plan9 && amd64 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) 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)) 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) 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))) 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)) 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) 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))) 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) 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 } ================================================ FILE: vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go ================================================ // go run mksyscall.go -l32 -plan9 -tags plan9,arm syscall_plan9.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build plan9 && arm 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) 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)) 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) 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))) 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)) 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) 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))) 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) 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 } ================================================ FILE: vendor/golang.org/x/sys/plan9/zsysnum_plan9.go ================================================ // 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 ) ================================================ FILE: vendor/golang.org/x/sys/unix/.gitignore ================================================ _obj/ unix.test ================================================ FILE: vendor/golang.org/x/sys/unix/README.md ================================================ # Building `sys/unix` The sys/unix package provides access to the raw system call interface of the underlying operating system. See: https://godoc.org/golang.org/x/sys/unix Porting Go to a new architecture/OS combination or adding syscalls, types, or constants to an existing architecture/OS pair requires some manual effort; however, there are tools that automate much of the process. ## Build Systems There are currently two ways we generate the necessary files. We are currently migrating the build system to use containers so the builds are reproducible. This is being done on an OS-by-OS basis. Please update this documentation as components of the build system change. ### Old Build System (currently for `GOOS != "linux"`) The old build system generates the Go files based on the C header files present on your system. This means that files for a given GOOS/GOARCH pair must be generated on a system with that OS and architecture. This also means that the generated code can differ from system to system, based on differences in the header files. To avoid this, if you are using the old build system, only generate the Go files on an installation with unmodified header files. It is also important to keep track of which version of the OS the files were generated from (ex. Darwin 14 vs Darwin 15). This makes it easier to track the progress of changes and have each OS upgrade correspond to a single change. To build the files for your current OS and architecture, make sure GOOS and GOARCH are set correctly and run `mkall.sh`. This will generate the files for your specific system. Running `mkall.sh -n` shows the commands that will be run. Requirements: bash, go ### New Build System (currently for `GOOS == "linux"`) The new build system uses a Docker container to generate the go files directly from source checkouts of the kernel and various system libraries. This means that on any platform that supports Docker, all the files using the new build system can be generated at once, and generated files will not change based on what the person running the scripts has installed on their computer. The OS specific files for the new build system are located in the `${GOOS}` directory, and the build is coordinated by the `${GOOS}/mkall.go` program. When the kernel or system library updates, modify the Dockerfile at `${GOOS}/Dockerfile` to checkout the new release of the source. To build all the files under the new build system, you must be on an amd64/Linux system and have your GOOS and GOARCH set accordingly. Running `mkall.sh` will then generate all of the files for all of the GOOS/GOARCH pairs in the new build system. Running `mkall.sh -n` shows the commands that will be run. Requirements: bash, go, docker ## Component files This section describes the various files used in the code generation process. It also contains instructions on how to modify these files to add a new architecture/OS or to add additional syscalls, types, or constants. Note that if you are using the new build system, the scripts/programs cannot be called normally. They must be called from within the docker container. ### asm files The hand-written assembly file at `asm_${GOOS}_${GOARCH}.s` 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. When porting Go to a new architecture/OS, this file must be implemented for each GOOS/GOARCH pair. ### mksysnum Mksysnum is a Go program located at `${GOOS}/mksysnum.go` (or `mksysnum_${GOOS}.go` for the old system). This program takes in a list of header files containing the syscall number declarations and parses them to produce the corresponding list of Go numeric constants. See `zsysnum_${GOOS}_${GOARCH}.go` for the generated constants. Adding new syscall numbers is mostly done by running the build on a sufficiently new installation of the target OS (or updating the source checkouts for the new build system). However, depending on the OS, you may need to update the parsing in mksysnum. ### mksyscall.go The `syscall.go`, `syscall_${GOOS}.go`, `syscall_${GOOS}_${GOARCH}.go` are hand-written Go files which implement system calls (for unix, the specific OS, or the specific OS/Architecture pair respectively) that need special handling and list `//sys` comments giving prototypes for ones that can be generated. The mksyscall.go program takes the `//sys` and `//sysnb` comments and converts them into syscalls. This requires the name of the prototype in the comment to match a syscall number in the `zsysnum_${GOOS}_${GOARCH}.go` file. The function prototype can be exported (capitalized) or not. Adding a new syscall often just requires adding a new `//sys` function prototype with the desired arguments and a capitalized name so it is exported. However, if you want the interface to the syscall to be different, often one will make an unexported `//sys` prototype, and then write a custom wrapper in `syscall_${GOOS}.go`. ### types files For each OS, there is a hand-written Go file at `${GOOS}/types.go` (or `types_${GOOS}.go` on the old system). This file includes standard C headers and creates Go type aliases to the corresponding C types. The file is then fed through godef to get the Go compatible definitions. Finally, the generated code is fed though mkpost.go to format the code correctly and remove any hidden or private identifiers. This cleaned-up code is written to `ztypes_${GOOS}_${GOARCH}.go`. The hardest part about preparing this file is figuring out which headers to include and which symbols need to be `#define`d to get the actual data structures that pass through to the kernel system calls. Some C libraries preset 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.go` and `linux/types.go` for examples. To add a new type, add in the necessary include statement at the top of the file (if it is not already there) and add in a type alias line. Note that if your type is significantly different on different architectures, you may need some `#if/#elif` macros in your include statements. ### mkerrors.sh This script is used to generate the system's various constants. This doesn't just include the error numbers and error strings, but also the signal numbers and a wide variety of miscellaneous constants. The constants come from the list of include files in the `includes_${uname}` variable. A regex then picks out the desired `#define` statements, and generates the corresponding Go constants. The error numbers and strings are generated from `#include `, and the signal numbers and strings are generated from `#include `. All of these constants are written to `zerrors_${GOOS}_${GOARCH}.go` via a C program, `_errors.c`, which prints out all the constants. To add a constant, add the header that includes it to the appropriate variable. Then, edit the regex (if necessary) to match the desired constant. Avoid making the regex too broad to avoid matching unintended constants. ### internal/mkmerge This program is used to extract duplicate const, func, and type declarations from the generated architecture-specific files listed below, and merge these into a common file for each OS. The merge is performed in the following steps: 1. Construct the set of common code that is idential in all architecture-specific files. 2. Write this common code to the merged file. 3. Remove the common code from all architecture-specific files. ## Generated files ### `zerrors_${GOOS}_${GOARCH}.go` A file containing all of the system's generated error numbers, error strings, signal numbers, and constants. Generated by `mkerrors.sh` (see above). ### `zsyscall_${GOOS}_${GOARCH}.go` A file containing all the generated syscalls for a specific GOOS and GOARCH. Generated by `mksyscall.go` (see above). ### `zsysnum_${GOOS}_${GOARCH}.go` A list of numeric constants for all the syscall number of the specific GOOS and GOARCH. Generated by mksysnum (see above). ### `ztypes_${GOOS}_${GOARCH}.go` A file containing Go types for passing into (or returning from) syscalls. Generated by godefs and the types file (see above). ================================================ FILE: vendor/golang.org/x/sys/unix/affinity_linux.go ================================================ // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // CPU affinity functions package unix import ( "math/bits" "unsafe" ) const cpuSetSize = _CPU_SETSIZE / _NCPUBITS // CPUSet represents a CPU affinity mask. type CPUSet [cpuSetSize]cpuMask func schedAffinity(trap uintptr, pid int, set *CPUSet) error { _, _, e := RawSyscall(trap, uintptr(pid), uintptr(unsafe.Sizeof(*set)), uintptr(unsafe.Pointer(set))) if e != 0 { return errnoErr(e) } return nil } // SchedGetaffinity gets the CPU affinity mask of the thread specified by pid. // If pid is 0 the calling thread is used. func SchedGetaffinity(pid int, set *CPUSet) error { return schedAffinity(SYS_SCHED_GETAFFINITY, pid, set) } // SchedSetaffinity sets the CPU affinity mask of the thread specified by pid. // If pid is 0 the calling thread is used. func SchedSetaffinity(pid int, set *CPUSet) error { return schedAffinity(SYS_SCHED_SETAFFINITY, pid, set) } // Zero clears the set s, so that it contains no CPUs. func (s *CPUSet) Zero() { for i := range s { s[i] = 0 } } func cpuBitsIndex(cpu int) int { return cpu / _NCPUBITS } func cpuBitsMask(cpu int) cpuMask { return cpuMask(1 << (uint(cpu) % _NCPUBITS)) } // Set adds cpu to the set s. func (s *CPUSet) Set(cpu int) { i := cpuBitsIndex(cpu) if i < len(s) { s[i] |= cpuBitsMask(cpu) } } // Clear removes cpu from the set s. func (s *CPUSet) Clear(cpu int) { i := cpuBitsIndex(cpu) if i < len(s) { s[i] &^= cpuBitsMask(cpu) } } // IsSet reports whether cpu is in the set s. func (s *CPUSet) IsSet(cpu int) bool { i := cpuBitsIndex(cpu) if i < len(s) { return s[i]&cpuBitsMask(cpu) != 0 } return false } // Count returns the number of CPUs in the set s. func (s *CPUSet) Count() int { c := 0 for _, b := range s { c += bits.OnesCount64(uint64(b)) } return c } ================================================ FILE: vendor/golang.org/x/sys/unix/aliases.go ================================================ // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos package unix import "syscall" type Signal = syscall.Signal type Errno = syscall.Errno type SysProcAttr = syscall.SysProcAttr ================================================ FILE: vendor/golang.org/x/sys/unix/asm_aix_ppc64.s ================================================ // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build gc #include "textflag.h" // // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go // TEXT ·syscall6(SB),NOSPLIT,$0-88 JMP syscall·syscall6(SB) TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 JMP syscall·rawSyscall6(SB) ================================================ FILE: vendor/golang.org/x/sys/unix/asm_bsd_386.s ================================================ // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build (freebsd || netbsd || openbsd) && gc #include "textflag.h" // System call support for 386 BSD // 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) ================================================ FILE: vendor/golang.org/x/sys/unix/asm_bsd_amd64.s ================================================ // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc #include "textflag.h" // System call support for AMD64 BSD // 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) ================================================ FILE: vendor/golang.org/x/sys/unix/asm_bsd_arm.s ================================================ // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build (freebsd || netbsd || openbsd) && gc #include "textflag.h" // System call support for ARM BSD // 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) ================================================ FILE: vendor/golang.org/x/sys/unix/asm_bsd_arm64.s ================================================ // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build (darwin || freebsd || netbsd || openbsd) && gc #include "textflag.h" // System call support for ARM64 BSD // 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) ================================================ FILE: vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s ================================================ // Copyright 2022 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build (darwin || freebsd || netbsd || openbsd) && gc #include "textflag.h" // // System call support for ppc64, BSD // // 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) ================================================ FILE: vendor/golang.org/x/sys/unix/asm_bsd_riscv64.s ================================================ // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build (darwin || freebsd || netbsd || openbsd) && gc #include "textflag.h" // System call support for RISCV64 BSD // 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) ================================================ FILE: vendor/golang.org/x/sys/unix/asm_linux_386.s ================================================ // 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. //go:build gc #include "textflag.h" // // System calls for 386, Linux // // See ../runtime/sys_linux_386.s for the reason why we always use int 0x80 // instead of the glibc-specific "CALL 0x10(GS)". #define INVOKE_SYSCALL INT $0x80 // 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 ·SyscallNoError(SB),NOSPLIT,$0-24 CALL runtime·entersyscall(SB) MOVL trap+0(FP), AX // syscall entry MOVL a1+4(FP), BX MOVL a2+8(FP), CX MOVL a3+12(FP), DX MOVL $0, SI MOVL $0, DI INVOKE_SYSCALL MOVL AX, r1+16(FP) MOVL DX, r2+20(FP) CALL runtime·exitsyscall(SB) RET TEXT ·RawSyscall(SB),NOSPLIT,$0-28 JMP syscall·RawSyscall(SB) TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 JMP syscall·RawSyscall6(SB) TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24 MOVL trap+0(FP), AX // syscall entry MOVL a1+4(FP), BX MOVL a2+8(FP), CX MOVL a3+12(FP), DX MOVL $0, SI MOVL $0, DI INVOKE_SYSCALL MOVL AX, r1+16(FP) MOVL DX, r2+20(FP) RET 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) ================================================ FILE: vendor/golang.org/x/sys/unix/asm_linux_amd64.s ================================================ // 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. //go:build gc #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 ·SyscallNoError(SB),NOSPLIT,$0-48 CALL runtime·entersyscall(SB) MOVQ a1+8(FP), DI MOVQ a2+16(FP), SI MOVQ a3+24(FP), DX MOVQ $0, R10 MOVQ $0, R8 MOVQ $0, R9 MOVQ trap+0(FP), AX // syscall entry SYSCALL MOVQ AX, r1+32(FP) MOVQ DX, r2+40(FP) CALL runtime·exitsyscall(SB) RET TEXT ·RawSyscall(SB),NOSPLIT,$0-56 JMP syscall·RawSyscall(SB) TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 JMP syscall·RawSyscall6(SB) TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 MOVQ a1+8(FP), DI MOVQ a2+16(FP), SI MOVQ a3+24(FP), DX MOVQ $0, R10 MOVQ $0, R8 MOVQ $0, R9 MOVQ trap+0(FP), AX // syscall entry SYSCALL MOVQ AX, r1+32(FP) MOVQ DX, r2+40(FP) RET TEXT ·gettimeofday(SB),NOSPLIT,$0-16 JMP syscall·gettimeofday(SB) ================================================ FILE: vendor/golang.org/x/sys/unix/asm_linux_arm.s ================================================ // 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. //go:build gc #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 ·SyscallNoError(SB),NOSPLIT,$0-24 BL runtime·entersyscall(SB) MOVW trap+0(FP), R7 MOVW a1+4(FP), R0 MOVW a2+8(FP), R1 MOVW a3+12(FP), R2 MOVW $0, R3 MOVW $0, R4 MOVW $0, R5 SWI $0 MOVW R0, r1+16(FP) MOVW $0, R0 MOVW R0, r2+20(FP) BL runtime·exitsyscall(SB) RET TEXT ·RawSyscall(SB),NOSPLIT,$0-28 B syscall·RawSyscall(SB) TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 B syscall·RawSyscall6(SB) TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24 MOVW trap+0(FP), R7 // syscall entry MOVW a1+4(FP), R0 MOVW a2+8(FP), R1 MOVW a3+12(FP), R2 SWI $0 MOVW R0, r1+16(FP) MOVW $0, R0 MOVW R0, r2+20(FP) RET TEXT ·seek(SB),NOSPLIT,$0-28 B syscall·seek(SB) ================================================ FILE: vendor/golang.org/x/sys/unix/asm_linux_arm64.s ================================================ // 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. //go:build linux && arm64 && gc #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 ·SyscallNoError(SB),NOSPLIT,$0-48 BL runtime·entersyscall(SB) MOVD a1+8(FP), R0 MOVD a2+16(FP), R1 MOVD a3+24(FP), R2 MOVD $0, R3 MOVD $0, R4 MOVD $0, R5 MOVD trap+0(FP), R8 // syscall entry SVC MOVD R0, r1+32(FP) // r1 MOVD R1, r2+40(FP) // r2 BL runtime·exitsyscall(SB) RET TEXT ·RawSyscall(SB),NOSPLIT,$0-56 B syscall·RawSyscall(SB) TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 B syscall·RawSyscall6(SB) TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 MOVD a1+8(FP), R0 MOVD a2+16(FP), R1 MOVD a3+24(FP), R2 MOVD $0, R3 MOVD $0, R4 MOVD $0, R5 MOVD trap+0(FP), R8 // syscall entry SVC MOVD R0, r1+32(FP) MOVD R1, r2+40(FP) RET ================================================ FILE: vendor/golang.org/x/sys/unix/asm_linux_loong64.s ================================================ // Copyright 2022 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build linux && loong64 && gc #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 JMP syscall·Syscall(SB) TEXT ·Syscall6(SB),NOSPLIT,$0-80 JMP syscall·Syscall6(SB) TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 JAL runtime·entersyscall(SB) MOVV a1+8(FP), R4 MOVV a2+16(FP), R5 MOVV a3+24(FP), R6 MOVV R0, R7 MOVV R0, R8 MOVV R0, R9 MOVV trap+0(FP), R11 // syscall entry SYSCALL MOVV R4, r1+32(FP) MOVV R0, r2+40(FP) // r2 is not used. Always set to 0 JAL runtime·exitsyscall(SB) RET TEXT ·RawSyscall(SB),NOSPLIT,$0-56 JMP syscall·RawSyscall(SB) TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 JMP syscall·RawSyscall6(SB) TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 MOVV a1+8(FP), R4 MOVV a2+16(FP), R5 MOVV a3+24(FP), R6 MOVV R0, R7 MOVV R0, R8 MOVV R0, R9 MOVV trap+0(FP), R11 // syscall entry SYSCALL MOVV R4, r1+32(FP) MOVV R0, r2+40(FP) // r2 is not used. Always set to 0 RET ================================================ FILE: vendor/golang.org/x/sys/unix/asm_linux_mips64x.s ================================================ // 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. //go:build linux && (mips64 || mips64le) && gc #include "textflag.h" // // System calls for mips64, 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 ·SyscallNoError(SB),NOSPLIT,$0-48 JAL runtime·entersyscall(SB) MOVV a1+8(FP), R4 MOVV a2+16(FP), R5 MOVV a3+24(FP), R6 MOVV R0, R7 MOVV R0, R8 MOVV R0, R9 MOVV trap+0(FP), R2 // syscall entry SYSCALL MOVV R2, r1+32(FP) MOVV R3, r2+40(FP) JAL runtime·exitsyscall(SB) RET TEXT ·RawSyscall(SB),NOSPLIT,$0-56 JMP syscall·RawSyscall(SB) TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 JMP syscall·RawSyscall6(SB) TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 MOVV a1+8(FP), R4 MOVV a2+16(FP), R5 MOVV a3+24(FP), R6 MOVV R0, R7 MOVV R0, R8 MOVV R0, R9 MOVV trap+0(FP), R2 // syscall entry SYSCALL MOVV R2, r1+32(FP) MOVV R3, r2+40(FP) RET ================================================ FILE: vendor/golang.org/x/sys/unix/asm_linux_mipsx.s ================================================ // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build linux && (mips || mipsle) && gc #include "textflag.h" // // System calls for mips, 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 ·Syscall9(SB),NOSPLIT,$0-52 JMP syscall·Syscall9(SB) TEXT ·SyscallNoError(SB),NOSPLIT,$0-24 JAL runtime·entersyscall(SB) MOVW a1+4(FP), R4 MOVW a2+8(FP), R5 MOVW a3+12(FP), R6 MOVW R0, R7 MOVW trap+0(FP), R2 // syscall entry SYSCALL MOVW R2, r1+16(FP) // r1 MOVW R3, r2+20(FP) // r2 JAL runtime·exitsyscall(SB) RET TEXT ·RawSyscall(SB),NOSPLIT,$0-28 JMP syscall·RawSyscall(SB) TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 JMP syscall·RawSyscall6(SB) TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24 MOVW a1+4(FP), R4 MOVW a2+8(FP), R5 MOVW a3+12(FP), R6 MOVW trap+0(FP), R2 // syscall entry SYSCALL MOVW R2, r1+16(FP) MOVW R3, r2+20(FP) RET ================================================ FILE: vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s ================================================ // 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. //go:build linux && (ppc64 || ppc64le) && gc #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 ·SyscallNoError(SB),NOSPLIT,$0-48 BL runtime·entersyscall(SB) MOVD a1+8(FP), R3 MOVD a2+16(FP), R4 MOVD a3+24(FP), R5 MOVD R0, R6 MOVD R0, R7 MOVD R0, R8 MOVD trap+0(FP), R9 // syscall entry SYSCALL R9 MOVD R3, r1+32(FP) MOVD R4, r2+40(FP) BL runtime·exitsyscall(SB) RET TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 MOVD a1+8(FP), R3 MOVD a2+16(FP), R4 MOVD a3+24(FP), R5 MOVD R0, R6 MOVD R0, R7 MOVD R0, R8 MOVD trap+0(FP), R9 // syscall entry SYSCALL R9 MOVD R3, r1+32(FP) MOVD R4, r2+40(FP) RET ================================================ FILE: vendor/golang.org/x/sys/unix/asm_linux_riscv64.s ================================================ // Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build riscv64 && gc #include "textflag.h" // // System calls for linux/riscv64. // // Where available, just jump to package syscall's implementation of // these functions. TEXT ·Syscall(SB),NOSPLIT,$0-56 JMP syscall·Syscall(SB) TEXT ·Syscall6(SB),NOSPLIT,$0-80 JMP syscall·Syscall6(SB) TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 CALL runtime·entersyscall(SB) MOV a1+8(FP), A0 MOV a2+16(FP), A1 MOV a3+24(FP), A2 MOV trap+0(FP), A7 // syscall entry ECALL MOV A0, r1+32(FP) // r1 MOV A1, r2+40(FP) // r2 CALL runtime·exitsyscall(SB) RET TEXT ·RawSyscall(SB),NOSPLIT,$0-56 JMP syscall·RawSyscall(SB) TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 JMP syscall·RawSyscall6(SB) TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 MOV a1+8(FP), A0 MOV a2+16(FP), A1 MOV a3+24(FP), A2 MOV trap+0(FP), A7 // syscall entry ECALL MOV A0, r1+32(FP) MOV A1, r2+40(FP) RET ================================================ FILE: vendor/golang.org/x/sys/unix/asm_linux_s390x.s ================================================ // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build linux && s390x && gc #include "textflag.h" // // System calls for s390x, 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 ·SyscallNoError(SB),NOSPLIT,$0-48 BL runtime·entersyscall(SB) MOVD a1+8(FP), R2 MOVD a2+16(FP), R3 MOVD a3+24(FP), R4 MOVD $0, R5 MOVD $0, R6 MOVD $0, R7 MOVD trap+0(FP), R1 // syscall entry SYSCALL MOVD R2, r1+32(FP) MOVD R3, r2+40(FP) BL runtime·exitsyscall(SB) RET TEXT ·RawSyscall(SB),NOSPLIT,$0-56 BR syscall·RawSyscall(SB) TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 BR syscall·RawSyscall6(SB) TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 MOVD a1+8(FP), R2 MOVD a2+16(FP), R3 MOVD a3+24(FP), R4 MOVD $0, R5 MOVD $0, R6 MOVD $0, R7 MOVD trap+0(FP), R1 // syscall entry SYSCALL MOVD R2, r1+32(FP) MOVD R3, r2+40(FP) RET ================================================ FILE: vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s ================================================ // Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build gc #include "textflag.h" // // System call support for mips64, 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) ================================================ FILE: vendor/golang.org/x/sys/unix/asm_solaris_amd64.s ================================================ // 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. //go:build gc #include "textflag.h" // // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go // TEXT ·sysvicall6(SB),NOSPLIT,$0-88 JMP syscall·sysvicall6(SB) TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 JMP syscall·rawSysvicall6(SB) ================================================ FILE: vendor/golang.org/x/sys/unix/asm_zos_s390x.s ================================================ // Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build zos && s390x && gc #include "textflag.h" #define PSALAA 1208(R0) #define GTAB64(x) 80(x) #define LCA64(x) 88(x) #define SAVSTACK_ASYNC(x) 336(x) // in the LCA #define CAA(x) 8(x) #define CEECAATHDID(x) 976(x) // in the CAA #define EDCHPXV(x) 1016(x) // in the CAA #define GOCB(x) 1104(x) // in the CAA // SS_*, where x=SAVSTACK_ASYNC #define SS_LE(x) 0(x) #define SS_GO(x) 8(x) #define SS_ERRNO(x) 16(x) #define SS_ERRNOJR(x) 20(x) // Function Descriptor Offsets #define __errno 0x156*16 #define __err2ad 0x16C*16 // Call Instructions #define LE_CALL BYTE $0x0D; BYTE $0x76 // BL R7, R6 #define SVC_LOAD BYTE $0x0A; BYTE $0x08 // SVC 08 LOAD #define SVC_DELETE BYTE $0x0A; BYTE $0x09 // SVC 09 DELETE DATA zosLibVec<>(SB)/8, $0 GLOBL zosLibVec<>(SB), NOPTR, $8 TEXT ·initZosLibVec(SB), NOSPLIT|NOFRAME, $0-0 MOVW PSALAA, R8 MOVD LCA64(R8), R8 MOVD CAA(R8), R8 MOVD EDCHPXV(R8), R8 MOVD R8, zosLibVec<>(SB) RET TEXT ·GetZosLibVec(SB), NOSPLIT|NOFRAME, $0-0 MOVD zosLibVec<>(SB), R8 MOVD R8, ret+0(FP) RET TEXT ·clearErrno(SB), NOSPLIT, $0-0 BL addrerrno<>(SB) MOVD $0, 0(R3) RET // Returns the address of errno in R3. TEXT addrerrno<>(SB), NOSPLIT|NOFRAME, $0-0 // Get library control area (LCA). MOVW PSALAA, R8 MOVD LCA64(R8), R8 // Get __errno FuncDesc. MOVD CAA(R8), R9 MOVD EDCHPXV(R9), R9 ADD $(__errno), R9 LMG 0(R9), R5, R6 // Switch to saved LE stack. MOVD SAVSTACK_ASYNC(R8), R9 MOVD 0(R9), R4 MOVD $0, 0(R9) // Call __errno function. LE_CALL NOPH // Switch back to Go stack. XOR R0, R0 // Restore R0 to $0. MOVD R4, 0(R9) // Save stack pointer. RET // func svcCall(fnptr unsafe.Pointer, argv *unsafe.Pointer, dsa *uint64) TEXT ·svcCall(SB), NOSPLIT, $0 BL runtime·save_g(SB) // Save g and stack pointer MOVW PSALAA, R8 MOVD LCA64(R8), R8 MOVD SAVSTACK_ASYNC(R8), R9 MOVD R15, 0(R9) MOVD argv+8(FP), R1 // Move function arguments into registers MOVD dsa+16(FP), g MOVD fnptr+0(FP), R15 BYTE $0x0D // Branch to function BYTE $0xEF BL runtime·load_g(SB) // Restore g and stack pointer MOVW PSALAA, R8 MOVD LCA64(R8), R8 MOVD SAVSTACK_ASYNC(R8), R9 MOVD 0(R9), R15 RET // func svcLoad(name *byte) unsafe.Pointer TEXT ·svcLoad(SB), NOSPLIT, $0 MOVD R15, R2 // Save go stack pointer MOVD name+0(FP), R0 // Move SVC args into registers MOVD $0x80000000, R1 MOVD $0, R15 SVC_LOAD MOVW R15, R3 // Save return code from SVC MOVD R2, R15 // Restore go stack pointer CMP R3, $0 // Check SVC return code BNE error MOVD $-2, R3 // Reset last bit of entry point to zero AND R0, R3 MOVD R3, ret+8(FP) // Return entry point returned by SVC CMP R0, R3 // Check if last bit of entry point was set BNE done MOVD R15, R2 // Save go stack pointer MOVD $0, R15 // Move SVC args into registers (entry point still in r0 from SVC 08) SVC_DELETE MOVD R2, R15 // Restore go stack pointer error: MOVD $0, ret+8(FP) // Return 0 on failure done: XOR R0, R0 // Reset r0 to 0 RET // func svcUnload(name *byte, fnptr unsafe.Pointer) int64 TEXT ·svcUnload(SB), NOSPLIT, $0 MOVD R15, R2 // Save go stack pointer MOVD name+0(FP), R0 // Move SVC args into registers MOVD fnptr+8(FP), R15 SVC_DELETE XOR R0, R0 // Reset r0 to 0 MOVD R15, R1 // Save SVC return code MOVD R2, R15 // Restore go stack pointer MOVD R1, ret+16(FP) // Return SVC return code RET // func gettid() uint64 TEXT ·gettid(SB), NOSPLIT, $0 // Get library control area (LCA). MOVW PSALAA, R8 MOVD LCA64(R8), R8 // Get CEECAATHDID MOVD CAA(R8), R9 MOVD CEECAATHDID(R9), R9 MOVD R9, ret+0(FP) RET // // Call LE function, if the return is -1 // errno and errno2 is retrieved // TEXT ·CallLeFuncWithErr(SB), NOSPLIT, $0 MOVW PSALAA, R8 MOVD LCA64(R8), R8 MOVD CAA(R8), R9 MOVD g, GOCB(R9) // Restore LE stack. MOVD SAVSTACK_ASYNC(R8), R9 // R9-> LE stack frame saving address MOVD 0(R9), R4 // R4-> restore previously saved stack frame pointer MOVD parms_base+8(FP), R7 // R7 -> argument array MOVD parms_len+16(FP), R8 // R8 number of arguments // arg 1 ---> R1 CMP R8, $0 BEQ docall SUB $1, R8 MOVD 0(R7), R1 // arg 2 ---> R2 CMP R8, $0 BEQ docall SUB $1, R8 ADD $8, R7 MOVD 0(R7), R2 // arg 3 --> R3 CMP R8, $0 BEQ docall SUB $1, R8 ADD $8, R7 MOVD 0(R7), R3 CMP R8, $0 BEQ docall MOVD $2176+16, R6 // starting LE stack address-8 to store 4th argument repeat: ADD $8, R7 MOVD 0(R7), R0 // advance arg pointer by 8 byte ADD $8, R6 // advance LE argument address by 8 byte MOVD R0, (R4)(R6*1) // copy argument from go-slice to le-frame SUB $1, R8 CMP R8, $0 BNE repeat docall: MOVD funcdesc+0(FP), R8 // R8-> function descriptor LMG 0(R8), R5, R6 MOVD $0, 0(R9) // R9 address of SAVSTACK_ASYNC LE_CALL // balr R7, R6 (return #1) NOPH MOVD R3, ret+32(FP) CMP R3, $-1 // compare result to -1 BNE done // retrieve errno and errno2 MOVD zosLibVec<>(SB), R8 ADD $(__errno), R8 LMG 0(R8), R5, R6 LE_CALL // balr R7, R6 __errno (return #3) NOPH MOVWZ 0(R3), R3 MOVD R3, err+48(FP) MOVD zosLibVec<>(SB), R8 ADD $(__err2ad), R8 LMG 0(R8), R5, R6 LE_CALL // balr R7, R6 __err2ad (return #2) NOPH MOVW (R3), R2 // retrieve errno2 MOVD R2, errno2+40(FP) // store in return area done: MOVD R4, 0(R9) // Save stack pointer. RET // // Call LE function, if the return is 0 // errno and errno2 is retrieved // TEXT ·CallLeFuncWithPtrReturn(SB), NOSPLIT, $0 MOVW PSALAA, R8 MOVD LCA64(R8), R8 MOVD CAA(R8), R9 MOVD g, GOCB(R9) // Restore LE stack. MOVD SAVSTACK_ASYNC(R8), R9 // R9-> LE stack frame saving address MOVD 0(R9), R4 // R4-> restore previously saved stack frame pointer MOVD parms_base+8(FP), R7 // R7 -> argument array MOVD parms_len+16(FP), R8 // R8 number of arguments // arg 1 ---> R1 CMP R8, $0 BEQ docall SUB $1, R8 MOVD 0(R7), R1 // arg 2 ---> R2 CMP R8, $0 BEQ docall SUB $1, R8 ADD $8, R7 MOVD 0(R7), R2 // arg 3 --> R3 CMP R8, $0 BEQ docall SUB $1, R8 ADD $8, R7 MOVD 0(R7), R3 CMP R8, $0 BEQ docall MOVD $2176+16, R6 // starting LE stack address-8 to store 4th argument repeat: ADD $8, R7 MOVD 0(R7), R0 // advance arg pointer by 8 byte ADD $8, R6 // advance LE argument address by 8 byte MOVD R0, (R4)(R6*1) // copy argument from go-slice to le-frame SUB $1, R8 CMP R8, $0 BNE repeat docall: MOVD funcdesc+0(FP), R8 // R8-> function descriptor LMG 0(R8), R5, R6 MOVD $0, 0(R9) // R9 address of SAVSTACK_ASYNC LE_CALL // balr R7, R6 (return #1) NOPH MOVD R3, ret+32(FP) CMP R3, $0 // compare result to 0 BNE done // retrieve errno and errno2 MOVD zosLibVec<>(SB), R8 ADD $(__errno), R8 LMG 0(R8), R5, R6 LE_CALL // balr R7, R6 __errno (return #3) NOPH MOVWZ 0(R3), R3 MOVD R3, err+48(FP) MOVD zosLibVec<>(SB), R8 ADD $(__err2ad), R8 LMG 0(R8), R5, R6 LE_CALL // balr R7, R6 __err2ad (return #2) NOPH MOVW (R3), R2 // retrieve errno2 MOVD R2, errno2+40(FP) // store in return area XOR R2, R2 MOVWZ R2, (R3) // clear errno2 done: MOVD R4, 0(R9) // Save stack pointer. RET // // function to test if a pointer can be safely dereferenced (content read) // return 0 for succces // TEXT ·ptrtest(SB), NOSPLIT, $0-16 MOVD arg+0(FP), R10 // test pointer in R10 // set up R2 to point to CEECAADMC BYTE $0xE3; BYTE $0x20; BYTE $0x04; BYTE $0xB8; BYTE $0x00; BYTE $0x17 // llgt 2,1208 BYTE $0xB9; BYTE $0x17; BYTE $0x00; BYTE $0x22 // llgtr 2,2 BYTE $0xA5; BYTE $0x26; BYTE $0x7F; BYTE $0xFF // nilh 2,32767 BYTE $0xE3; BYTE $0x22; BYTE $0x00; BYTE $0x58; BYTE $0x00; BYTE $0x04 // lg 2,88(2) BYTE $0xE3; BYTE $0x22; BYTE $0x00; BYTE $0x08; BYTE $0x00; BYTE $0x04 // lg 2,8(2) BYTE $0x41; BYTE $0x22; BYTE $0x03; BYTE $0x68 // la 2,872(2) // set up R5 to point to the "shunt" path which set 1 to R3 (failure) BYTE $0xB9; BYTE $0x82; BYTE $0x00; BYTE $0x33 // xgr 3,3 BYTE $0xA7; BYTE $0x55; BYTE $0x00; BYTE $0x04 // bras 5,lbl1 BYTE $0xA7; BYTE $0x39; BYTE $0x00; BYTE $0x01 // lghi 3,1 // if r3 is not zero (failed) then branch to finish BYTE $0xB9; BYTE $0x02; BYTE $0x00; BYTE $0x33 // lbl1 ltgr 3,3 BYTE $0xA7; BYTE $0x74; BYTE $0x00; BYTE $0x08 // brc b'0111',lbl2 // stomic store shunt address in R5 into CEECAADMC BYTE $0xE3; BYTE $0x52; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x24 // stg 5,0(2) // now try reading from the test pointer in R10, if it fails it branches to the "lghi" instruction above BYTE $0xE3; BYTE $0x9A; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x04 // lg 9,0(10) // finish here, restore 0 into CEECAADMC BYTE $0xB9; BYTE $0x82; BYTE $0x00; BYTE $0x99 // lbl2 xgr 9,9 BYTE $0xE3; BYTE $0x92; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x24 // stg 9,0(2) MOVD R3, ret+8(FP) // result in R3 RET // // function to test if a untptr can be loaded from a pointer // return 1: the 8-byte content // 2: 0 for success, 1 for failure // // func safeload(ptr uintptr) ( value uintptr, error uintptr) TEXT ·safeload(SB), NOSPLIT, $0-24 MOVD ptr+0(FP), R10 // test pointer in R10 MOVD $0x0, R6 BYTE $0xE3; BYTE $0x20; BYTE $0x04; BYTE $0xB8; BYTE $0x00; BYTE $0x17 // llgt 2,1208 BYTE $0xB9; BYTE $0x17; BYTE $0x00; BYTE $0x22 // llgtr 2,2 BYTE $0xA5; BYTE $0x26; BYTE $0x7F; BYTE $0xFF // nilh 2,32767 BYTE $0xE3; BYTE $0x22; BYTE $0x00; BYTE $0x58; BYTE $0x00; BYTE $0x04 // lg 2,88(2) BYTE $0xE3; BYTE $0x22; BYTE $0x00; BYTE $0x08; BYTE $0x00; BYTE $0x04 // lg 2,8(2) BYTE $0x41; BYTE $0x22; BYTE $0x03; BYTE $0x68 // la 2,872(2) BYTE $0xB9; BYTE $0x82; BYTE $0x00; BYTE $0x33 // xgr 3,3 BYTE $0xA7; BYTE $0x55; BYTE $0x00; BYTE $0x04 // bras 5,lbl1 BYTE $0xA7; BYTE $0x39; BYTE $0x00; BYTE $0x01 // lghi 3,1 BYTE $0xB9; BYTE $0x02; BYTE $0x00; BYTE $0x33 // lbl1 ltgr 3,3 BYTE $0xA7; BYTE $0x74; BYTE $0x00; BYTE $0x08 // brc b'0111',lbl2 BYTE $0xE3; BYTE $0x52; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x24 // stg 5,0(2) BYTE $0xE3; BYTE $0x6A; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x04 // lg 6,0(10) BYTE $0xB9; BYTE $0x82; BYTE $0x00; BYTE $0x99 // lbl2 xgr 9,9 BYTE $0xE3; BYTE $0x92; BYTE $0x00; BYTE $0x00; BYTE $0x00; BYTE $0x24 // stg 9,0(2) MOVD R6, value+8(FP) // result in R6 MOVD R3, error+16(FP) // error in R3 RET ================================================ FILE: vendor/golang.org/x/sys/unix/bluetooth_linux.go ================================================ // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Bluetooth sockets and messages package unix // Bluetooth Protocols const ( BTPROTO_L2CAP = 0 BTPROTO_HCI = 1 BTPROTO_SCO = 2 BTPROTO_RFCOMM = 3 BTPROTO_BNEP = 4 BTPROTO_CMTP = 5 BTPROTO_HIDP = 6 BTPROTO_AVDTP = 7 ) const ( HCI_CHANNEL_RAW = 0 HCI_CHANNEL_USER = 1 HCI_CHANNEL_MONITOR = 2 HCI_CHANNEL_CONTROL = 3 HCI_CHANNEL_LOGGING = 4 ) // Socketoption Level const ( SOL_BLUETOOTH = 0x112 SOL_HCI = 0x0 SOL_L2CAP = 0x6 SOL_RFCOMM = 0x12 SOL_SCO = 0x11 ) ================================================ FILE: vendor/golang.org/x/sys/unix/bpxsvc_zos.go ================================================ // Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build zos package unix import ( "bytes" "fmt" "unsafe" ) //go:noescape func bpxcall(plist []unsafe.Pointer, bpx_offset int64) //go:noescape func A2e([]byte) //go:noescape func E2a([]byte) const ( BPX4STA = 192 // stat BPX4FST = 104 // fstat BPX4LST = 132 // lstat BPX4OPN = 156 // open BPX4CLO = 72 // close BPX4CHR = 500 // chattr BPX4FCR = 504 // fchattr BPX4LCR = 1180 // lchattr BPX4CTW = 492 // cond_timed_wait BPX4GTH = 1056 // __getthent BPX4PTQ = 412 // pthread_quiesc BPX4PTR = 320 // ptrace ) const ( //options //byte1 BPX_OPNFHIGH = 0x80 //byte2 BPX_OPNFEXEC = 0x80 //byte3 BPX_O_NOLARGEFILE = 0x08 BPX_O_LARGEFILE = 0x04 BPX_O_ASYNCSIG = 0x02 BPX_O_SYNC = 0x01 //byte4 BPX_O_CREXCL = 0xc0 BPX_O_CREAT = 0x80 BPX_O_EXCL = 0x40 BPX_O_NOCTTY = 0x20 BPX_O_TRUNC = 0x10 BPX_O_APPEND = 0x08 BPX_O_NONBLOCK = 0x04 BPX_FNDELAY = 0x04 BPX_O_RDWR = 0x03 BPX_O_RDONLY = 0x02 BPX_O_WRONLY = 0x01 BPX_O_ACCMODE = 0x03 BPX_O_GETFL = 0x0f //mode // byte1 (file type) BPX_FT_DIR = 1 BPX_FT_CHARSPEC = 2 BPX_FT_REGFILE = 3 BPX_FT_FIFO = 4 BPX_FT_SYMLINK = 5 BPX_FT_SOCKET = 6 //byte3 BPX_S_ISUID = 0x08 BPX_S_ISGID = 0x04 BPX_S_ISVTX = 0x02 BPX_S_IRWXU1 = 0x01 BPX_S_IRUSR = 0x01 //byte4 BPX_S_IRWXU2 = 0xc0 BPX_S_IWUSR = 0x80 BPX_S_IXUSR = 0x40 BPX_S_IRWXG = 0x38 BPX_S_IRGRP = 0x20 BPX_S_IWGRP = 0x10 BPX_S_IXGRP = 0x08 BPX_S_IRWXOX = 0x07 BPX_S_IROTH = 0x04 BPX_S_IWOTH = 0x02 BPX_S_IXOTH = 0x01 CW_INTRPT = 1 CW_CONDVAR = 32 CW_TIMEOUT = 64 PGTHA_NEXT = 2 PGTHA_CURRENT = 1 PGTHA_FIRST = 0 PGTHA_LAST = 3 PGTHA_PROCESS = 0x80 PGTHA_CONTTY = 0x40 PGTHA_PATH = 0x20 PGTHA_COMMAND = 0x10 PGTHA_FILEDATA = 0x08 PGTHA_THREAD = 0x04 PGTHA_PTAG = 0x02 PGTHA_COMMANDLONG = 0x01 PGTHA_THREADFAST = 0x80 PGTHA_FILEPATH = 0x40 PGTHA_THDSIGMASK = 0x20 // thread quiece mode QUIESCE_TERM int32 = 1 QUIESCE_FORCE int32 = 2 QUIESCE_QUERY int32 = 3 QUIESCE_FREEZE int32 = 4 QUIESCE_UNFREEZE int32 = 5 FREEZE_THIS_THREAD int32 = 6 FREEZE_EXIT int32 = 8 QUIESCE_SRB int32 = 9 ) type Pgtha struct { Pid uint32 // 0 Tid0 uint32 // 4 Tid1 uint32 Accesspid byte // C Accesstid byte // D Accessasid uint16 // E Loginname [8]byte // 10 Flag1 byte // 18 Flag1b2 byte // 19 } type Bpxystat_t struct { // DSECT BPXYSTAT St_id [4]uint8 // 0 St_length uint16 // 0x4 St_version uint16 // 0x6 St_mode uint32 // 0x8 St_ino uint32 // 0xc St_dev uint32 // 0x10 St_nlink uint32 // 0x14 St_uid uint32 // 0x18 St_gid uint32 // 0x1c St_size uint64 // 0x20 St_atime uint32 // 0x28 St_mtime uint32 // 0x2c St_ctime uint32 // 0x30 St_rdev uint32 // 0x34 St_auditoraudit uint32 // 0x38 St_useraudit uint32 // 0x3c St_blksize uint32 // 0x40 St_createtime uint32 // 0x44 St_auditid [4]uint32 // 0x48 St_res01 uint32 // 0x58 Ft_ccsid uint16 // 0x5c Ft_flags uint16 // 0x5e St_res01a [2]uint32 // 0x60 St_res02 uint32 // 0x68 St_blocks uint32 // 0x6c St_opaque [3]uint8 // 0x70 St_visible uint8 // 0x73 St_reftime uint32 // 0x74 St_fid uint64 // 0x78 St_filefmt uint8 // 0x80 St_fspflag2 uint8 // 0x81 St_res03 [2]uint8 // 0x82 St_ctimemsec uint32 // 0x84 St_seclabel [8]uint8 // 0x88 St_res04 [4]uint8 // 0x90 // end of version 1 _ uint32 // 0x94 St_atime64 uint64 // 0x98 St_mtime64 uint64 // 0xa0 St_ctime64 uint64 // 0xa8 St_createtime64 uint64 // 0xb0 St_reftime64 uint64 // 0xb8 _ uint64 // 0xc0 St_res05 [16]uint8 // 0xc8 // end of version 2 } type BpxFilestatus struct { Oflag1 byte Oflag2 byte Oflag3 byte Oflag4 byte } type BpxMode struct { Ftype byte Mode1 byte Mode2 byte Mode3 byte } // Thr attribute structure for extended attributes type Bpxyatt_t struct { // DSECT BPXYATT Att_id [4]uint8 Att_version uint16 Att_res01 [2]uint8 Att_setflags1 uint8 Att_setflags2 uint8 Att_setflags3 uint8 Att_setflags4 uint8 Att_mode uint32 Att_uid uint32 Att_gid uint32 Att_opaquemask [3]uint8 Att_visblmaskres uint8 Att_opaque [3]uint8 Att_visibleres uint8 Att_size_h uint32 Att_size_l uint32 Att_atime uint32 Att_mtime uint32 Att_auditoraudit uint32 Att_useraudit uint32 Att_ctime uint32 Att_reftime uint32 // end of version 1 Att_filefmt uint8 Att_res02 [3]uint8 Att_filetag uint32 Att_res03 [8]uint8 // end of version 2 Att_atime64 uint64 Att_mtime64 uint64 Att_ctime64 uint64 Att_reftime64 uint64 Att_seclabel [8]uint8 Att_ver3res02 [8]uint8 // end of version 3 } func BpxOpen(name string, options *BpxFilestatus, mode *BpxMode) (rv int32, rc int32, rn int32) { if len(name) < 1024 { var namebuf [1024]byte sz := int32(copy(namebuf[:], name)) A2e(namebuf[:sz]) var parms [7]unsafe.Pointer parms[0] = unsafe.Pointer(&sz) parms[1] = unsafe.Pointer(&namebuf[0]) parms[2] = unsafe.Pointer(options) parms[3] = unsafe.Pointer(mode) parms[4] = unsafe.Pointer(&rv) parms[5] = unsafe.Pointer(&rc) parms[6] = unsafe.Pointer(&rn) bpxcall(parms[:], BPX4OPN) return rv, rc, rn } return -1, -1, -1 } func BpxClose(fd int32) (rv int32, rc int32, rn int32) { var parms [4]unsafe.Pointer parms[0] = unsafe.Pointer(&fd) parms[1] = unsafe.Pointer(&rv) parms[2] = unsafe.Pointer(&rc) parms[3] = unsafe.Pointer(&rn) bpxcall(parms[:], BPX4CLO) return rv, rc, rn } func BpxFileFStat(fd int32, st *Bpxystat_t) (rv int32, rc int32, rn int32) { st.St_id = [4]uint8{0xe2, 0xe3, 0xc1, 0xe3} st.St_version = 2 stat_sz := uint32(unsafe.Sizeof(*st)) var parms [6]unsafe.Pointer parms[0] = unsafe.Pointer(&fd) parms[1] = unsafe.Pointer(&stat_sz) parms[2] = unsafe.Pointer(st) parms[3] = unsafe.Pointer(&rv) parms[4] = unsafe.Pointer(&rc) parms[5] = unsafe.Pointer(&rn) bpxcall(parms[:], BPX4FST) return rv, rc, rn } func BpxFileStat(name string, st *Bpxystat_t) (rv int32, rc int32, rn int32) { if len(name) < 1024 { var namebuf [1024]byte sz := int32(copy(namebuf[:], name)) A2e(namebuf[:sz]) st.St_id = [4]uint8{0xe2, 0xe3, 0xc1, 0xe3} st.St_version = 2 stat_sz := uint32(unsafe.Sizeof(*st)) var parms [7]unsafe.Pointer parms[0] = unsafe.Pointer(&sz) parms[1] = unsafe.Pointer(&namebuf[0]) parms[2] = unsafe.Pointer(&stat_sz) parms[3] = unsafe.Pointer(st) parms[4] = unsafe.Pointer(&rv) parms[5] = unsafe.Pointer(&rc) parms[6] = unsafe.Pointer(&rn) bpxcall(parms[:], BPX4STA) return rv, rc, rn } return -1, -1, -1 } func BpxFileLStat(name string, st *Bpxystat_t) (rv int32, rc int32, rn int32) { if len(name) < 1024 { var namebuf [1024]byte sz := int32(copy(namebuf[:], name)) A2e(namebuf[:sz]) st.St_id = [4]uint8{0xe2, 0xe3, 0xc1, 0xe3} st.St_version = 2 stat_sz := uint32(unsafe.Sizeof(*st)) var parms [7]unsafe.Pointer parms[0] = unsafe.Pointer(&sz) parms[1] = unsafe.Pointer(&namebuf[0]) parms[2] = unsafe.Pointer(&stat_sz) parms[3] = unsafe.Pointer(st) parms[4] = unsafe.Pointer(&rv) parms[5] = unsafe.Pointer(&rc) parms[6] = unsafe.Pointer(&rn) bpxcall(parms[:], BPX4LST) return rv, rc, rn } return -1, -1, -1 } func BpxChattr(path string, attr *Bpxyatt_t) (rv int32, rc int32, rn int32) { if len(path) >= 1024 { return -1, -1, -1 } var namebuf [1024]byte sz := int32(copy(namebuf[:], path)) A2e(namebuf[:sz]) attr_sz := uint32(unsafe.Sizeof(*attr)) var parms [7]unsafe.Pointer parms[0] = unsafe.Pointer(&sz) parms[1] = unsafe.Pointer(&namebuf[0]) parms[2] = unsafe.Pointer(&attr_sz) parms[3] = unsafe.Pointer(attr) parms[4] = unsafe.Pointer(&rv) parms[5] = unsafe.Pointer(&rc) parms[6] = unsafe.Pointer(&rn) bpxcall(parms[:], BPX4CHR) return rv, rc, rn } func BpxLchattr(path string, attr *Bpxyatt_t) (rv int32, rc int32, rn int32) { if len(path) >= 1024 { return -1, -1, -1 } var namebuf [1024]byte sz := int32(copy(namebuf[:], path)) A2e(namebuf[:sz]) attr_sz := uint32(unsafe.Sizeof(*attr)) var parms [7]unsafe.Pointer parms[0] = unsafe.Pointer(&sz) parms[1] = unsafe.Pointer(&namebuf[0]) parms[2] = unsafe.Pointer(&attr_sz) parms[3] = unsafe.Pointer(attr) parms[4] = unsafe.Pointer(&rv) parms[5] = unsafe.Pointer(&rc) parms[6] = unsafe.Pointer(&rn) bpxcall(parms[:], BPX4LCR) return rv, rc, rn } func BpxFchattr(fd int32, attr *Bpxyatt_t) (rv int32, rc int32, rn int32) { attr_sz := uint32(unsafe.Sizeof(*attr)) var parms [6]unsafe.Pointer parms[0] = unsafe.Pointer(&fd) parms[1] = unsafe.Pointer(&attr_sz) parms[2] = unsafe.Pointer(attr) parms[3] = unsafe.Pointer(&rv) parms[4] = unsafe.Pointer(&rc) parms[5] = unsafe.Pointer(&rn) bpxcall(parms[:], BPX4FCR) return rv, rc, rn } func BpxCondTimedWait(sec uint32, nsec uint32, events uint32, secrem *uint32, nsecrem *uint32) (rv int32, rc int32, rn int32) { var parms [8]unsafe.Pointer parms[0] = unsafe.Pointer(&sec) parms[1] = unsafe.Pointer(&nsec) parms[2] = unsafe.Pointer(&events) parms[3] = unsafe.Pointer(secrem) parms[4] = unsafe.Pointer(nsecrem) parms[5] = unsafe.Pointer(&rv) parms[6] = unsafe.Pointer(&rc) parms[7] = unsafe.Pointer(&rn) bpxcall(parms[:], BPX4CTW) return rv, rc, rn } func BpxGetthent(in *Pgtha, outlen *uint32, out unsafe.Pointer) (rv int32, rc int32, rn int32) { var parms [7]unsafe.Pointer inlen := uint32(26) // nothing else will work. Go says Pgtha is 28-byte because of alignment, but Pgtha is "packed" and must be 26-byte parms[0] = unsafe.Pointer(&inlen) parms[1] = unsafe.Pointer(&in) parms[2] = unsafe.Pointer(outlen) parms[3] = unsafe.Pointer(&out) parms[4] = unsafe.Pointer(&rv) parms[5] = unsafe.Pointer(&rc) parms[6] = unsafe.Pointer(&rn) bpxcall(parms[:], BPX4GTH) return rv, rc, rn } func ZosJobname() (jobname string, err error) { var pgtha Pgtha pgtha.Pid = uint32(Getpid()) pgtha.Accesspid = PGTHA_CURRENT pgtha.Flag1 = PGTHA_PROCESS var out [256]byte var outlen uint32 outlen = 256 rv, rc, rn := BpxGetthent(&pgtha, &outlen, unsafe.Pointer(&out[0])) if rv == 0 { gthc := []byte{0x87, 0xa3, 0x88, 0x83} // 'gthc' in ebcdic ix := bytes.Index(out[:], gthc) if ix == -1 { err = fmt.Errorf("BPX4GTH: gthc return data not found") return } jn := out[ix+80 : ix+88] // we didn't declare Pgthc, but jobname is 8-byte at offset 80 E2a(jn) jobname = string(bytes.TrimRight(jn, " ")) } else { err = fmt.Errorf("BPX4GTH: rc=%d errno=%d reason=code=0x%x", rv, rc, rn) } return } func Bpx4ptq(code int32, data string) (rv int32, rc int32, rn int32) { var userdata [8]byte var parms [5]unsafe.Pointer copy(userdata[:], data+" ") A2e(userdata[:]) parms[0] = unsafe.Pointer(&code) parms[1] = unsafe.Pointer(&userdata[0]) parms[2] = unsafe.Pointer(&rv) parms[3] = unsafe.Pointer(&rc) parms[4] = unsafe.Pointer(&rn) bpxcall(parms[:], BPX4PTQ) return rv, rc, rn } const ( PT_TRACE_ME = 0 // Debug this process PT_READ_I = 1 // Read a full word PT_READ_D = 2 // Read a full word PT_READ_U = 3 // Read control info PT_WRITE_I = 4 //Write a full word PT_WRITE_D = 5 //Write a full word PT_CONTINUE = 7 //Continue the process PT_KILL = 8 //Terminate the process PT_READ_GPR = 11 // Read GPR, CR, PSW PT_READ_FPR = 12 // Read FPR PT_READ_VR = 13 // Read VR PT_WRITE_GPR = 14 // Write GPR, CR, PSW PT_WRITE_FPR = 15 // Write FPR PT_WRITE_VR = 16 // Write VR PT_READ_BLOCK = 17 // Read storage PT_WRITE_BLOCK = 19 // Write storage PT_READ_GPRH = 20 // Read GPRH PT_WRITE_GPRH = 21 // Write GPRH PT_REGHSET = 22 // Read all GPRHs PT_ATTACH = 30 // Attach to a process PT_DETACH = 31 // Detach from a process PT_REGSET = 32 // Read all GPRs PT_REATTACH = 33 // Reattach to a process PT_LDINFO = 34 // Read loader info PT_MULTI = 35 // Multi process mode PT_LD64INFO = 36 // RMODE64 Info Area PT_BLOCKREQ = 40 // Block request PT_THREAD_INFO = 60 // Read thread info PT_THREAD_MODIFY = 61 PT_THREAD_READ_FOCUS = 62 PT_THREAD_WRITE_FOCUS = 63 PT_THREAD_HOLD = 64 PT_THREAD_SIGNAL = 65 PT_EXPLAIN = 66 PT_EVENTS = 67 PT_THREAD_INFO_EXTENDED = 68 PT_REATTACH2 = 71 PT_CAPTURE = 72 PT_UNCAPTURE = 73 PT_GET_THREAD_TCB = 74 PT_GET_ALET = 75 PT_SWAPIN = 76 PT_EXTENDED_EVENT = 98 PT_RECOVER = 99 // Debug a program check PT_GPR0 = 0 // General purpose register 0 PT_GPR1 = 1 // General purpose register 1 PT_GPR2 = 2 // General purpose register 2 PT_GPR3 = 3 // General purpose register 3 PT_GPR4 = 4 // General purpose register 4 PT_GPR5 = 5 // General purpose register 5 PT_GPR6 = 6 // General purpose register 6 PT_GPR7 = 7 // General purpose register 7 PT_GPR8 = 8 // General purpose register 8 PT_GPR9 = 9 // General purpose register 9 PT_GPR10 = 10 // General purpose register 10 PT_GPR11 = 11 // General purpose register 11 PT_GPR12 = 12 // General purpose register 12 PT_GPR13 = 13 // General purpose register 13 PT_GPR14 = 14 // General purpose register 14 PT_GPR15 = 15 // General purpose register 15 PT_FPR0 = 16 // Floating point register 0 PT_FPR1 = 17 // Floating point register 1 PT_FPR2 = 18 // Floating point register 2 PT_FPR3 = 19 // Floating point register 3 PT_FPR4 = 20 // Floating point register 4 PT_FPR5 = 21 // Floating point register 5 PT_FPR6 = 22 // Floating point register 6 PT_FPR7 = 23 // Floating point register 7 PT_FPR8 = 24 // Floating point register 8 PT_FPR9 = 25 // Floating point register 9 PT_FPR10 = 26 // Floating point register 10 PT_FPR11 = 27 // Floating point register 11 PT_FPR12 = 28 // Floating point register 12 PT_FPR13 = 29 // Floating point register 13 PT_FPR14 = 30 // Floating point register 14 PT_FPR15 = 31 // Floating point register 15 PT_FPC = 32 // Floating point control register PT_PSW = 40 // PSW PT_PSW0 = 40 // Left half of the PSW PT_PSW1 = 41 // Right half of the PSW PT_CR0 = 42 // Control register 0 PT_CR1 = 43 // Control register 1 PT_CR2 = 44 // Control register 2 PT_CR3 = 45 // Control register 3 PT_CR4 = 46 // Control register 4 PT_CR5 = 47 // Control register 5 PT_CR6 = 48 // Control register 6 PT_CR7 = 49 // Control register 7 PT_CR8 = 50 // Control register 8 PT_CR9 = 51 // Control register 9 PT_CR10 = 52 // Control register 10 PT_CR11 = 53 // Control register 11 PT_CR12 = 54 // Control register 12 PT_CR13 = 55 // Control register 13 PT_CR14 = 56 // Control register 14 PT_CR15 = 57 // Control register 15 PT_GPRH0 = 58 // GP High register 0 PT_GPRH1 = 59 // GP High register 1 PT_GPRH2 = 60 // GP High register 2 PT_GPRH3 = 61 // GP High register 3 PT_GPRH4 = 62 // GP High register 4 PT_GPRH5 = 63 // GP High register 5 PT_GPRH6 = 64 // GP High register 6 PT_GPRH7 = 65 // GP High register 7 PT_GPRH8 = 66 // GP High register 8 PT_GPRH9 = 67 // GP High register 9 PT_GPRH10 = 68 // GP High register 10 PT_GPRH11 = 69 // GP High register 11 PT_GPRH12 = 70 // GP High register 12 PT_GPRH13 = 71 // GP High register 13 PT_GPRH14 = 72 // GP High register 14 PT_GPRH15 = 73 // GP High register 15 PT_VR0 = 74 // Vector register 0 PT_VR1 = 75 // Vector register 1 PT_VR2 = 76 // Vector register 2 PT_VR3 = 77 // Vector register 3 PT_VR4 = 78 // Vector register 4 PT_VR5 = 79 // Vector register 5 PT_VR6 = 80 // Vector register 6 PT_VR7 = 81 // Vector register 7 PT_VR8 = 82 // Vector register 8 PT_VR9 = 83 // Vector register 9 PT_VR10 = 84 // Vector register 10 PT_VR11 = 85 // Vector register 11 PT_VR12 = 86 // Vector register 12 PT_VR13 = 87 // Vector register 13 PT_VR14 = 88 // Vector register 14 PT_VR15 = 89 // Vector register 15 PT_VR16 = 90 // Vector register 16 PT_VR17 = 91 // Vector register 17 PT_VR18 = 92 // Vector register 18 PT_VR19 = 93 // Vector register 19 PT_VR20 = 94 // Vector register 20 PT_VR21 = 95 // Vector register 21 PT_VR22 = 96 // Vector register 22 PT_VR23 = 97 // Vector register 23 PT_VR24 = 98 // Vector register 24 PT_VR25 = 99 // Vector register 25 PT_VR26 = 100 // Vector register 26 PT_VR27 = 101 // Vector register 27 PT_VR28 = 102 // Vector register 28 PT_VR29 = 103 // Vector register 29 PT_VR30 = 104 // Vector register 30 PT_VR31 = 105 // Vector register 31 PT_PSWG = 106 // PSWG PT_PSWG0 = 106 // Bytes 0-3 PT_PSWG1 = 107 // Bytes 4-7 PT_PSWG2 = 108 // Bytes 8-11 (IA high word) PT_PSWG3 = 109 // Bytes 12-15 (IA low word) ) func Bpx4ptr(request int32, pid int32, addr unsafe.Pointer, data unsafe.Pointer, buffer unsafe.Pointer) (rv int32, rc int32, rn int32) { var parms [8]unsafe.Pointer parms[0] = unsafe.Pointer(&request) parms[1] = unsafe.Pointer(&pid) parms[2] = unsafe.Pointer(&addr) parms[3] = unsafe.Pointer(&data) parms[4] = unsafe.Pointer(&buffer) parms[5] = unsafe.Pointer(&rv) parms[6] = unsafe.Pointer(&rc) parms[7] = unsafe.Pointer(&rn) bpxcall(parms[:], BPX4PTR) return rv, rc, rn } func copyU8(val uint8, dest []uint8) int { if len(dest) < 1 { return 0 } dest[0] = val return 1 } func copyU8Arr(src, dest []uint8) int { if len(dest) < len(src) { return 0 } for i, v := range src { dest[i] = v } return len(src) } func copyU16(val uint16, dest []uint16) int { if len(dest) < 1 { return 0 } dest[0] = val return 1 } func copyU32(val uint32, dest []uint32) int { if len(dest) < 1 { return 0 } dest[0] = val return 1 } func copyU32Arr(src, dest []uint32) int { if len(dest) < len(src) { return 0 } for i, v := range src { dest[i] = v } return len(src) } func copyU64(val uint64, dest []uint64) int { if len(dest) < 1 { return 0 } dest[0] = val return 1 } ================================================ FILE: vendor/golang.org/x/sys/unix/bpxsvc_zos.s ================================================ // Copyright 2024 The Go 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 "go_asm.h" #include "textflag.h" // function to call USS assembly language services // // doc: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_3.1.0/com.ibm.zos.v3r1.bpxb100/bit64env.htm // // arg1 unsafe.Pointer array that ressembles an OS PLIST // // arg2 function offset as in // doc: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_3.1.0/com.ibm.zos.v3r1.bpxb100/bpx2cr_List_of_offsets.htm // // func bpxcall(plist []unsafe.Pointer, bpx_offset int64) TEXT ·bpxcall(SB), NOSPLIT|NOFRAME, $0 MOVD plist_base+0(FP), R1 // r1 points to plist MOVD bpx_offset+24(FP), R2 // r2 offset to BPX vector table MOVD R14, R7 // save r14 MOVD R15, R8 // save r15 MOVWZ 16(R0), R9 MOVWZ 544(R9), R9 MOVWZ 24(R9), R9 // call vector in r9 ADD R2, R9 // add offset to vector table MOVWZ (R9), R9 // r9 points to entry point BYTE $0x0D // BL R14,R9 --> basr r14,r9 BYTE $0xE9 // clobbers 0,1,14,15 MOVD R8, R15 // restore 15 JMP R7 // return via saved return address // func A2e(arr [] byte) // code page conversion from 819 to 1047 TEXT ·A2e(SB), NOSPLIT|NOFRAME, $0 MOVD arg_base+0(FP), R2 // pointer to arry of characters MOVD arg_len+8(FP), R3 // count XOR R0, R0 XOR R1, R1 BYTE $0xA7; BYTE $0x15; BYTE $0x00; BYTE $0x82 // BRAS 1,(2+(256/2)) // ASCII -> EBCDIC conversion table: BYTE $0x00; BYTE $0x01; BYTE $0x02; BYTE $0x03 BYTE $0x37; BYTE $0x2d; BYTE $0x2e; BYTE $0x2f BYTE $0x16; BYTE $0x05; BYTE $0x15; BYTE $0x0b BYTE $0x0c; BYTE $0x0d; BYTE $0x0e; BYTE $0x0f BYTE $0x10; BYTE $0x11; BYTE $0x12; BYTE $0x13 BYTE $0x3c; BYTE $0x3d; BYTE $0x32; BYTE $0x26 BYTE $0x18; BYTE $0x19; BYTE $0x3f; BYTE $0x27 BYTE $0x1c; BYTE $0x1d; BYTE $0x1e; BYTE $0x1f BYTE $0x40; BYTE $0x5a; BYTE $0x7f; BYTE $0x7b BYTE $0x5b; BYTE $0x6c; BYTE $0x50; BYTE $0x7d BYTE $0x4d; BYTE $0x5d; BYTE $0x5c; BYTE $0x4e BYTE $0x6b; BYTE $0x60; BYTE $0x4b; BYTE $0x61 BYTE $0xf0; BYTE $0xf1; BYTE $0xf2; BYTE $0xf3 BYTE $0xf4; BYTE $0xf5; BYTE $0xf6; BYTE $0xf7 BYTE $0xf8; BYTE $0xf9; BYTE $0x7a; BYTE $0x5e BYTE $0x4c; BYTE $0x7e; BYTE $0x6e; BYTE $0x6f BYTE $0x7c; BYTE $0xc1; BYTE $0xc2; BYTE $0xc3 BYTE $0xc4; BYTE $0xc5; BYTE $0xc6; BYTE $0xc7 BYTE $0xc8; BYTE $0xc9; BYTE $0xd1; BYTE $0xd2 BYTE $0xd3; BYTE $0xd4; BYTE $0xd5; BYTE $0xd6 BYTE $0xd7; BYTE $0xd8; BYTE $0xd9; BYTE $0xe2 BYTE $0xe3; BYTE $0xe4; BYTE $0xe5; BYTE $0xe6 BYTE $0xe7; BYTE $0xe8; BYTE $0xe9; BYTE $0xad BYTE $0xe0; BYTE $0xbd; BYTE $0x5f; BYTE $0x6d BYTE $0x79; BYTE $0x81; BYTE $0x82; BYTE $0x83 BYTE $0x84; BYTE $0x85; BYTE $0x86; BYTE $0x87 BYTE $0x88; BYTE $0x89; BYTE $0x91; BYTE $0x92 BYTE $0x93; BYTE $0x94; BYTE $0x95; BYTE $0x96 BYTE $0x97; BYTE $0x98; BYTE $0x99; BYTE $0xa2 BYTE $0xa3; BYTE $0xa4; BYTE $0xa5; BYTE $0xa6 BYTE $0xa7; BYTE $0xa8; BYTE $0xa9; BYTE $0xc0 BYTE $0x4f; BYTE $0xd0; BYTE $0xa1; BYTE $0x07 BYTE $0x20; BYTE $0x21; BYTE $0x22; BYTE $0x23 BYTE $0x24; BYTE $0x25; BYTE $0x06; BYTE $0x17 BYTE $0x28; BYTE $0x29; BYTE $0x2a; BYTE $0x2b BYTE $0x2c; BYTE $0x09; BYTE $0x0a; BYTE $0x1b BYTE $0x30; BYTE $0x31; BYTE $0x1a; BYTE $0x33 BYTE $0x34; BYTE $0x35; BYTE $0x36; BYTE $0x08 BYTE $0x38; BYTE $0x39; BYTE $0x3a; BYTE $0x3b BYTE $0x04; BYTE $0x14; BYTE $0x3e; BYTE $0xff BYTE $0x41; BYTE $0xaa; BYTE $0x4a; BYTE $0xb1 BYTE $0x9f; BYTE $0xb2; BYTE $0x6a; BYTE $0xb5 BYTE $0xbb; BYTE $0xb4; BYTE $0x9a; BYTE $0x8a BYTE $0xb0; BYTE $0xca; BYTE $0xaf; BYTE $0xbc BYTE $0x90; BYTE $0x8f; BYTE $0xea; BYTE $0xfa BYTE $0xbe; BYTE $0xa0; BYTE $0xb6; BYTE $0xb3 BYTE $0x9d; BYTE $0xda; BYTE $0x9b; BYTE $0x8b BYTE $0xb7; BYTE $0xb8; BYTE $0xb9; BYTE $0xab BYTE $0x64; BYTE $0x65; BYTE $0x62; BYTE $0x66 BYTE $0x63; BYTE $0x67; BYTE $0x9e; BYTE $0x68 BYTE $0x74; BYTE $0x71; BYTE $0x72; BYTE $0x73 BYTE $0x78; BYTE $0x75; BYTE $0x76; BYTE $0x77 BYTE $0xac; BYTE $0x69; BYTE $0xed; BYTE $0xee BYTE $0xeb; BYTE $0xef; BYTE $0xec; BYTE $0xbf BYTE $0x80; BYTE $0xfd; BYTE $0xfe; BYTE $0xfb BYTE $0xfc; BYTE $0xba; BYTE $0xae; BYTE $0x59 BYTE $0x44; BYTE $0x45; BYTE $0x42; BYTE $0x46 BYTE $0x43; BYTE $0x47; BYTE $0x9c; BYTE $0x48 BYTE $0x54; BYTE $0x51; BYTE $0x52; BYTE $0x53 BYTE $0x58; BYTE $0x55; BYTE $0x56; BYTE $0x57 BYTE $0x8c; BYTE $0x49; BYTE $0xcd; BYTE $0xce BYTE $0xcb; BYTE $0xcf; BYTE $0xcc; BYTE $0xe1 BYTE $0x70; BYTE $0xdd; BYTE $0xde; BYTE $0xdb BYTE $0xdc; BYTE $0x8d; BYTE $0x8e; BYTE $0xdf retry: WORD $0xB9931022 // TROO 2,2,b'0001' BVS retry RET // func e2a(arr [] byte) // code page conversion from 1047 to 819 TEXT ·E2a(SB), NOSPLIT|NOFRAME, $0 MOVD arg_base+0(FP), R2 // pointer to arry of characters MOVD arg_len+8(FP), R3 // count XOR R0, R0 XOR R1, R1 BYTE $0xA7; BYTE $0x15; BYTE $0x00; BYTE $0x82 // BRAS 1,(2+(256/2)) // EBCDIC -> ASCII conversion table: BYTE $0x00; BYTE $0x01; BYTE $0x02; BYTE $0x03 BYTE $0x9c; BYTE $0x09; BYTE $0x86; BYTE $0x7f BYTE $0x97; BYTE $0x8d; BYTE $0x8e; BYTE $0x0b BYTE $0x0c; BYTE $0x0d; BYTE $0x0e; BYTE $0x0f BYTE $0x10; BYTE $0x11; BYTE $0x12; BYTE $0x13 BYTE $0x9d; BYTE $0x0a; BYTE $0x08; BYTE $0x87 BYTE $0x18; BYTE $0x19; BYTE $0x92; BYTE $0x8f BYTE $0x1c; BYTE $0x1d; BYTE $0x1e; BYTE $0x1f BYTE $0x80; BYTE $0x81; BYTE $0x82; BYTE $0x83 BYTE $0x84; BYTE $0x85; BYTE $0x17; BYTE $0x1b BYTE $0x88; BYTE $0x89; BYTE $0x8a; BYTE $0x8b BYTE $0x8c; BYTE $0x05; BYTE $0x06; BYTE $0x07 BYTE $0x90; BYTE $0x91; BYTE $0x16; BYTE $0x93 BYTE $0x94; BYTE $0x95; BYTE $0x96; BYTE $0x04 BYTE $0x98; BYTE $0x99; BYTE $0x9a; BYTE $0x9b BYTE $0x14; BYTE $0x15; BYTE $0x9e; BYTE $0x1a BYTE $0x20; BYTE $0xa0; BYTE $0xe2; BYTE $0xe4 BYTE $0xe0; BYTE $0xe1; BYTE $0xe3; BYTE $0xe5 BYTE $0xe7; BYTE $0xf1; BYTE $0xa2; BYTE $0x2e BYTE $0x3c; BYTE $0x28; BYTE $0x2b; BYTE $0x7c BYTE $0x26; BYTE $0xe9; BYTE $0xea; BYTE $0xeb BYTE $0xe8; BYTE $0xed; BYTE $0xee; BYTE $0xef BYTE $0xec; BYTE $0xdf; BYTE $0x21; BYTE $0x24 BYTE $0x2a; BYTE $0x29; BYTE $0x3b; BYTE $0x5e BYTE $0x2d; BYTE $0x2f; BYTE $0xc2; BYTE $0xc4 BYTE $0xc0; BYTE $0xc1; BYTE $0xc3; BYTE $0xc5 BYTE $0xc7; BYTE $0xd1; BYTE $0xa6; BYTE $0x2c BYTE $0x25; BYTE $0x5f; BYTE $0x3e; BYTE $0x3f BYTE $0xf8; BYTE $0xc9; BYTE $0xca; BYTE $0xcb BYTE $0xc8; BYTE $0xcd; BYTE $0xce; BYTE $0xcf BYTE $0xcc; BYTE $0x60; BYTE $0x3a; BYTE $0x23 BYTE $0x40; BYTE $0x27; BYTE $0x3d; BYTE $0x22 BYTE $0xd8; BYTE $0x61; BYTE $0x62; BYTE $0x63 BYTE $0x64; BYTE $0x65; BYTE $0x66; BYTE $0x67 BYTE $0x68; BYTE $0x69; BYTE $0xab; BYTE $0xbb BYTE $0xf0; BYTE $0xfd; BYTE $0xfe; BYTE $0xb1 BYTE $0xb0; BYTE $0x6a; BYTE $0x6b; BYTE $0x6c BYTE $0x6d; BYTE $0x6e; BYTE $0x6f; BYTE $0x70 BYTE $0x71; BYTE $0x72; BYTE $0xaa; BYTE $0xba BYTE $0xe6; BYTE $0xb8; BYTE $0xc6; BYTE $0xa4 BYTE $0xb5; BYTE $0x7e; BYTE $0x73; BYTE $0x74 BYTE $0x75; BYTE $0x76; BYTE $0x77; BYTE $0x78 BYTE $0x79; BYTE $0x7a; BYTE $0xa1; BYTE $0xbf BYTE $0xd0; BYTE $0x5b; BYTE $0xde; BYTE $0xae BYTE $0xac; BYTE $0xa3; BYTE $0xa5; BYTE $0xb7 BYTE $0xa9; BYTE $0xa7; BYTE $0xb6; BYTE $0xbc BYTE $0xbd; BYTE $0xbe; BYTE $0xdd; BYTE $0xa8 BYTE $0xaf; BYTE $0x5d; BYTE $0xb4; BYTE $0xd7 BYTE $0x7b; BYTE $0x41; BYTE $0x42; BYTE $0x43 BYTE $0x44; BYTE $0x45; BYTE $0x46; BYTE $0x47 BYTE $0x48; BYTE $0x49; BYTE $0xad; BYTE $0xf4 BYTE $0xf6; BYTE $0xf2; BYTE $0xf3; BYTE $0xf5 BYTE $0x7d; BYTE $0x4a; BYTE $0x4b; BYTE $0x4c BYTE $0x4d; BYTE $0x4e; BYTE $0x4f; BYTE $0x50 BYTE $0x51; BYTE $0x52; BYTE $0xb9; BYTE $0xfb BYTE $0xfc; BYTE $0xf9; BYTE $0xfa; BYTE $0xff BYTE $0x5c; BYTE $0xf7; BYTE $0x53; BYTE $0x54 BYTE $0x55; BYTE $0x56; BYTE $0x57; BYTE $0x58 BYTE $0x59; BYTE $0x5a; BYTE $0xb2; BYTE $0xd4 BYTE $0xd6; BYTE $0xd2; BYTE $0xd3; BYTE $0xd5 BYTE $0x30; BYTE $0x31; BYTE $0x32; BYTE $0x33 BYTE $0x34; BYTE $0x35; BYTE $0x36; BYTE $0x37 BYTE $0x38; BYTE $0x39; BYTE $0xb3; BYTE $0xdb BYTE $0xdc; BYTE $0xd9; BYTE $0xda; BYTE $0x9f retry: WORD $0xB9931022 // TROO 2,2,b'0001' BVS retry RET ================================================ FILE: vendor/golang.org/x/sys/unix/cap_freebsd.go ================================================ // Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build freebsd package unix import ( "errors" "fmt" ) // Go implementation of C mostly found in /usr/src/sys/kern/subr_capability.c const ( // This is the version of CapRights this package understands. See C implementation for parallels. capRightsGoVersion = CAP_RIGHTS_VERSION_00 capArSizeMin = CAP_RIGHTS_VERSION_00 + 2 capArSizeMax = capRightsGoVersion + 2 ) var ( bit2idx = []int{ -1, 0, 1, -1, 2, -1, -1, -1, 3, -1, -1, -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, } ) func capidxbit(right uint64) int { return int((right >> 57) & 0x1f) } func rightToIndex(right uint64) (int, error) { idx := capidxbit(right) if idx < 0 || idx >= len(bit2idx) { return -2, fmt.Errorf("index for right 0x%x out of range", right) } return bit2idx[idx], nil } func caprver(right uint64) int { return int(right >> 62) } func capver(rights *CapRights) int { return caprver(rights.Rights[0]) } func caparsize(rights *CapRights) int { return capver(rights) + 2 } // CapRightsSet sets the permissions in setrights in rights. func CapRightsSet(rights *CapRights, setrights []uint64) error { // This is essentially a copy of cap_rights_vset() if capver(rights) != CAP_RIGHTS_VERSION_00 { return fmt.Errorf("bad rights version %d", capver(rights)) } n := caparsize(rights) if n < capArSizeMin || n > capArSizeMax { return errors.New("bad rights size") } for _, right := range setrights { if caprver(right) != CAP_RIGHTS_VERSION_00 { return errors.New("bad right version") } i, err := rightToIndex(right) if err != nil { return err } if i >= n { return errors.New("index overflow") } if capidxbit(rights.Rights[i]) != capidxbit(right) { return errors.New("index mismatch") } rights.Rights[i] |= right if capidxbit(rights.Rights[i]) != capidxbit(right) { return errors.New("index mismatch (after assign)") } } return nil } // CapRightsClear clears the permissions in clearrights from rights. func CapRightsClear(rights *CapRights, clearrights []uint64) error { // This is essentially a copy of cap_rights_vclear() if capver(rights) != CAP_RIGHTS_VERSION_00 { return fmt.Errorf("bad rights version %d", capver(rights)) } n := caparsize(rights) if n < capArSizeMin || n > capArSizeMax { return errors.New("bad rights size") } for _, right := range clearrights { if caprver(right) != CAP_RIGHTS_VERSION_00 { return errors.New("bad right version") } i, err := rightToIndex(right) if err != nil { return err } if i >= n { return errors.New("index overflow") } if capidxbit(rights.Rights[i]) != capidxbit(right) { return errors.New("index mismatch") } rights.Rights[i] &= ^(right & 0x01FFFFFFFFFFFFFF) if capidxbit(rights.Rights[i]) != capidxbit(right) { return errors.New("index mismatch (after assign)") } } return nil } // CapRightsIsSet checks whether all the permissions in setrights are present in rights. func CapRightsIsSet(rights *CapRights, setrights []uint64) (bool, error) { // This is essentially a copy of cap_rights_is_vset() if capver(rights) != CAP_RIGHTS_VERSION_00 { return false, fmt.Errorf("bad rights version %d", capver(rights)) } n := caparsize(rights) if n < capArSizeMin || n > capArSizeMax { return false, errors.New("bad rights size") } for _, right := range setrights { if caprver(right) != CAP_RIGHTS_VERSION_00 { return false, errors.New("bad right version") } i, err := rightToIndex(right) if err != nil { return false, err } if i >= n { return false, errors.New("index overflow") } if capidxbit(rights.Rights[i]) != capidxbit(right) { return false, errors.New("index mismatch") } if (rights.Rights[i] & right) != right { return false, nil } } return true, nil } func capright(idx uint64, bit uint64) uint64 { return ((1 << (57 + idx)) | bit) } // CapRightsInit returns a pointer to an initialised CapRights structure filled with rights. // See man cap_rights_init(3) and rights(4). func CapRightsInit(rights []uint64) (*CapRights, error) { var r CapRights r.Rights[0] = (capRightsGoVersion << 62) | capright(0, 0) r.Rights[1] = capright(1, 0) err := CapRightsSet(&r, rights) if err != nil { return nil, err } return &r, nil } // CapRightsLimit reduces the operations permitted on fd to at most those contained in rights. // The capability rights on fd can never be increased by CapRightsLimit. // See man cap_rights_limit(2) and rights(4). func CapRightsLimit(fd uintptr, rights *CapRights) error { return capRightsLimit(int(fd), rights) } // CapRightsGet returns a CapRights structure containing the operations permitted on fd. // See man cap_rights_get(3) and rights(4). func CapRightsGet(fd uintptr) (*CapRights, error) { r, err := CapRightsInit(nil) if err != nil { return nil, err } err = capRightsGet(capRightsGoVersion, int(fd), r) if err != nil { return nil, err } return r, nil } ================================================ FILE: vendor/golang.org/x/sys/unix/constants.go ================================================ // 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. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos package unix const ( R_OK = 0x4 W_OK = 0x2 X_OK = 0x1 ) ================================================ FILE: vendor/golang.org/x/sys/unix/dev_aix_ppc.go ================================================ // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build aix && ppc // Functions to access/create device major and minor numbers matching the // encoding used by AIX. package unix // Major returns the major component of a Linux device number. func Major(dev uint64) uint32 { return uint32((dev >> 16) & 0xffff) } // Minor returns the minor component of a Linux device number. func Minor(dev uint64) uint32 { return uint32(dev & 0xffff) } // Mkdev returns a Linux device number generated from the given major and minor // components. func Mkdev(major, minor uint32) uint64 { return uint64(((major) << 16) | (minor)) } ================================================ FILE: vendor/golang.org/x/sys/unix/dev_aix_ppc64.go ================================================ // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build aix && ppc64 // Functions to access/create device major and minor numbers matching the // encoding used AIX. package unix // Major returns the major component of a Linux device number. func Major(dev uint64) uint32 { return uint32((dev & 0x3fffffff00000000) >> 32) } // Minor returns the minor component of a Linux device number. func Minor(dev uint64) uint32 { return uint32((dev & 0x00000000ffffffff) >> 0) } // Mkdev returns a Linux device number generated from the given major and minor // components. func Mkdev(major, minor uint32) uint64 { var DEVNO64 uint64 DEVNO64 = 0x8000000000000000 return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64) } ================================================ FILE: vendor/golang.org/x/sys/unix/dev_darwin.go ================================================ // Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Functions to access/create device major and minor numbers matching the // encoding used in Darwin's sys/types.h header. package unix // Major returns the major component of a Darwin device number. func Major(dev uint64) uint32 { return uint32((dev >> 24) & 0xff) } // Minor returns the minor component of a Darwin device number. func Minor(dev uint64) uint32 { return uint32(dev & 0xffffff) } // Mkdev returns a Darwin device number generated from the given major and minor // components. func Mkdev(major, minor uint32) uint64 { return (uint64(major) << 24) | uint64(minor) } ================================================ FILE: vendor/golang.org/x/sys/unix/dev_dragonfly.go ================================================ // Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Functions to access/create device major and minor numbers matching the // encoding used in Dragonfly's sys/types.h header. // // The information below is extracted and adapted from sys/types.h: // // Minor gives a cookie instead of an index since in order to avoid changing the // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for // devices that don't use them. package unix // Major returns the major component of a DragonFlyBSD device number. func Major(dev uint64) uint32 { return uint32((dev >> 8) & 0xff) } // Minor returns the minor component of a DragonFlyBSD device number. func Minor(dev uint64) uint32 { return uint32(dev & 0xffff00ff) } // Mkdev returns a DragonFlyBSD device number generated from the given major and // minor components. func Mkdev(major, minor uint32) uint64 { return (uint64(major) << 8) | uint64(minor) } ================================================ FILE: vendor/golang.org/x/sys/unix/dev_freebsd.go ================================================ // Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Functions to access/create device major and minor numbers matching the // encoding used in FreeBSD's sys/types.h header. // // The information below is extracted and adapted from sys/types.h: // // Minor gives a cookie instead of an index since in order to avoid changing the // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for // devices that don't use them. package unix // Major returns the major component of a FreeBSD device number. func Major(dev uint64) uint32 { return uint32((dev >> 8) & 0xff) } // Minor returns the minor component of a FreeBSD device number. func Minor(dev uint64) uint32 { return uint32(dev & 0xffff00ff) } // Mkdev returns a FreeBSD device number generated from the given major and // minor components. func Mkdev(major, minor uint32) uint64 { return (uint64(major) << 8) | uint64(minor) } ================================================ FILE: vendor/golang.org/x/sys/unix/dev_linux.go ================================================ // Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Functions to access/create device major and minor numbers matching the // encoding used by the Linux kernel and glibc. // // The information below is extracted and adapted from bits/sysmacros.h in the // glibc sources: // // dev_t in glibc is 64-bit, with 32-bit major and minor numbers. glibc's // default encoding is MMMM Mmmm mmmM MMmm, where M is a hex digit of the major // number and m is a hex digit of the minor number. This is backward compatible // with legacy systems where dev_t is 16 bits wide, encoded as MMmm. It is also // backward compatible with the Linux kernel, which for some architectures uses // 32-bit dev_t, encoded as mmmM MMmm. package unix // Major returns the major component of a Linux device number. func Major(dev uint64) uint32 { major := uint32((dev & 0x00000000000fff00) >> 8) major |= uint32((dev & 0xfffff00000000000) >> 32) return major } // Minor returns the minor component of a Linux device number. func Minor(dev uint64) uint32 { minor := uint32((dev & 0x00000000000000ff) >> 0) minor |= uint32((dev & 0x00000ffffff00000) >> 12) return minor } // Mkdev returns a Linux device number generated from the given major and minor // components. func Mkdev(major, minor uint32) uint64 { dev := (uint64(major) & 0x00000fff) << 8 dev |= (uint64(major) & 0xfffff000) << 32 dev |= (uint64(minor) & 0x000000ff) << 0 dev |= (uint64(minor) & 0xffffff00) << 12 return dev } ================================================ FILE: vendor/golang.org/x/sys/unix/dev_netbsd.go ================================================ // Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Functions to access/create device major and minor numbers matching the // encoding used in NetBSD's sys/types.h header. package unix // Major returns the major component of a NetBSD device number. func Major(dev uint64) uint32 { return uint32((dev & 0x000fff00) >> 8) } // Minor returns the minor component of a NetBSD device number. func Minor(dev uint64) uint32 { minor := uint32((dev & 0x000000ff) >> 0) minor |= uint32((dev & 0xfff00000) >> 12) return minor } // Mkdev returns a NetBSD device number generated from the given major and minor // components. func Mkdev(major, minor uint32) uint64 { dev := (uint64(major) << 8) & 0x000fff00 dev |= (uint64(minor) << 12) & 0xfff00000 dev |= (uint64(minor) << 0) & 0x000000ff return dev } ================================================ FILE: vendor/golang.org/x/sys/unix/dev_openbsd.go ================================================ // Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Functions to access/create device major and minor numbers matching the // encoding used in OpenBSD's sys/types.h header. package unix // Major returns the major component of an OpenBSD device number. func Major(dev uint64) uint32 { return uint32((dev & 0x0000ff00) >> 8) } // Minor returns the minor component of an OpenBSD device number. func Minor(dev uint64) uint32 { minor := uint32((dev & 0x000000ff) >> 0) minor |= uint32((dev & 0xffff0000) >> 8) return minor } // Mkdev returns an OpenBSD device number generated from the given major and minor // components. func Mkdev(major, minor uint32) uint64 { dev := (uint64(major) << 8) & 0x0000ff00 dev |= (uint64(minor) << 8) & 0xffff0000 dev |= (uint64(minor) << 0) & 0x000000ff return dev } ================================================ FILE: vendor/golang.org/x/sys/unix/dev_zos.go ================================================ // Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build zos && s390x // Functions to access/create device major and minor numbers matching the // encoding used by z/OS. // // The information below is extracted and adapted from macros. package unix // Major returns the major component of a z/OS device number. func Major(dev uint64) uint32 { return uint32((dev >> 16) & 0x0000FFFF) } // Minor returns the minor component of a z/OS device number. func Minor(dev uint64) uint32 { return uint32(dev & 0x0000FFFF) } // Mkdev returns a z/OS device number generated from the given major and minor // components. func Mkdev(major, minor uint32) uint64 { return (uint64(major) << 16) | uint64(minor) } ================================================ FILE: vendor/golang.org/x/sys/unix/dirent.go ================================================ // 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. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos package unix import "unsafe" // readInt returns the size-bytes unsigned integer in native byte order at offset off. func readInt(b []byte, off, size uintptr) (u uint64, ok bool) { if len(b) < int(off+size) { return 0, false } if isBigEndian { return readIntBE(b[off:], size), true } return readIntLE(b[off:], size), true } func readIntBE(b []byte, size uintptr) uint64 { switch size { case 1: return uint64(b[0]) case 2: _ = b[1] // bounds check hint to compiler; see golang.org/issue/14808 return uint64(b[1]) | uint64(b[0])<<8 case 4: _ = b[3] // bounds check hint to compiler; see golang.org/issue/14808 return uint64(b[3]) | uint64(b[2])<<8 | uint64(b[1])<<16 | uint64(b[0])<<24 case 8: _ = b[7] // bounds check hint to compiler; see golang.org/issue/14808 return uint64(b[7]) | uint64(b[6])<<8 | uint64(b[5])<<16 | uint64(b[4])<<24 | uint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56 default: panic("syscall: readInt with unsupported size") } } func readIntLE(b []byte, size uintptr) uint64 { switch size { case 1: return uint64(b[0]) case 2: _ = b[1] // bounds check hint to compiler; see golang.org/issue/14808 return uint64(b[0]) | uint64(b[1])<<8 case 4: _ = b[3] // bounds check hint to compiler; see golang.org/issue/14808 return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 case 8: _ = b[7] // bounds check hint to compiler; see golang.org/issue/14808 return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 default: panic("syscall: readInt with unsupported size") } } // ParseDirent parses up to max directory entries in buf, // appending the names to names. It returns the number of // 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) count = 0 for max != 0 && len(buf) > 0 { reclen, ok := direntReclen(buf) if !ok || reclen > uint64(len(buf)) { return origlen, count, names } rec := buf[:reclen] buf = buf[reclen:] ino, ok := direntIno(rec) if !ok { break } if ino == 0 { // File absent in directory. continue } const namoff = uint64(unsafe.Offsetof(Dirent{}.Name)) namlen, ok := direntNamlen(rec) if !ok || namoff+namlen > uint64(len(rec)) { break } name := rec[namoff : namoff+namlen] for i, c := range name { if c == 0 { name = name[:i] break } } // Check for useless names before allocating a string. if string(name) == "." || string(name) == ".." { continue } max-- count++ names = append(names, string(name)) } return origlen - len(buf), count, names } ================================================ FILE: vendor/golang.org/x/sys/unix/endian_big.go ================================================ // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64 package unix const isBigEndian = true ================================================ FILE: vendor/golang.org/x/sys/unix/endian_little.go ================================================ // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh package unix const isBigEndian = false ================================================ FILE: vendor/golang.org/x/sys/unix/env_unix.go ================================================ // 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. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos // 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() } func Unsetenv(key string) error { return syscall.Unsetenv(key) } ================================================ FILE: vendor/golang.org/x/sys/unix/fcntl.go ================================================ // 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. //go:build dragonfly || freebsd || linux || netbsd package unix import "unsafe" // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux // systems by fcntl_linux_32bit.go to be SYS_FCNTL64. var fcntl64Syscall uintptr = SYS_FCNTL func fcntl(fd int, cmd, arg int) (int, error) { valptr, _, errno := Syscall(fcntl64Syscall, uintptr(fd), uintptr(cmd), uintptr(arg)) var err error if errno != 0 { err = errno } return int(valptr), err } // FcntlInt performs a fcntl syscall on fd with the provided command and argument. func FcntlInt(fd uintptr, cmd, arg int) (int, error) { return fcntl(int(fd), cmd, arg) } // 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 } ================================================ FILE: vendor/golang.org/x/sys/unix/fcntl_darwin.go ================================================ // Copyright 2019 The Go 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 "unsafe" // FcntlInt performs a fcntl syscall on fd with the provided command and argument. func FcntlInt(fd uintptr, cmd, arg int) (int, error) { return fcntl(int(fd), cmd, arg) } // 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 { _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk)))) return err } // FcntlFstore performs a fcntl syscall for the F_PREALLOCATE command. func FcntlFstore(fd uintptr, cmd int, fstore *Fstore_t) error { _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(fstore)))) return err } ================================================ FILE: vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go ================================================ // 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. //go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc) 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 } ================================================ FILE: vendor/golang.org/x/sys/unix/fdset.go ================================================ // Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos package unix // Set adds fd to the set fds. func (fds *FdSet) Set(fd int) { fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS)) } // Clear removes fd from the set fds. func (fds *FdSet) Clear(fd int) { fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS)) } // IsSet returns whether fd is in the set fds. func (fds *FdSet) IsSet(fd int) bool { return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0 } // Zero clears the set fds. func (fds *FdSet) Zero() { for i := range fds.Bits { fds.Bits[i] = 0 } } ================================================ FILE: vendor/golang.org/x/sys/unix/gccgo.go ================================================ // 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. //go:build gccgo && !aix && !hurd 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. func realSyscallNoError(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r uintptr) func realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r, errno uintptr) func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) { syscall.Entersyscall() r := realSyscallNoError(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0) syscall.Exitsyscall() return r, 0 } 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 RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) { r := realSyscallNoError(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0) return r, 0 } 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) } ================================================ FILE: vendor/golang.org/x/sys/unix/gccgo_c.c ================================================ // 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. //go:build gccgo && !aix && !hurd #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) __asm__(GOSYM_PREFIX GOPKGPATH ".realSyscall"); 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; } uintptr_t gccgoRealSyscallNoError(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9) __asm__(GOSYM_PREFIX GOPKGPATH ".realSyscallNoError"); uintptr_t gccgoRealSyscallNoError(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9) { return syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9); } ================================================ FILE: vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go ================================================ // 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. //go: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 } ================================================ FILE: vendor/golang.org/x/sys/unix/ifreq_linux.go ================================================ // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build linux package unix import ( "unsafe" ) // Helpers for dealing with ifreq since it contains a union and thus requires a // lot of unsafe.Pointer casts to use properly. // An Ifreq is a type-safe wrapper around the raw ifreq struct. An Ifreq // contains an interface name and a union of arbitrary data which can be // accessed using the Ifreq's methods. To create an Ifreq, use the NewIfreq // function. // // Use the Name method to access the stored interface name. The union data // fields can be get and set using the following methods: // - Uint16/SetUint16: flags // - Uint32/SetUint32: ifindex, metric, mtu type Ifreq struct{ raw ifreq } // NewIfreq creates an Ifreq with the input network interface name after // validating the name does not exceed IFNAMSIZ-1 (trailing NULL required) // bytes. func NewIfreq(name string) (*Ifreq, error) { // Leave room for terminating NULL byte. if len(name) >= IFNAMSIZ { return nil, EINVAL } var ifr ifreq copy(ifr.Ifrn[:], name) return &Ifreq{raw: ifr}, nil } // TODO(mdlayher): get/set methods for hardware address sockaddr, char array, etc. // Name returns the interface name associated with the Ifreq. func (ifr *Ifreq) Name() string { return ByteSliceToString(ifr.raw.Ifrn[:]) } // According to netdevice(7), only AF_INET addresses are returned for numerous // sockaddr ioctls. For convenience, we expose these as Inet4Addr since the Port // field and other data is always empty. // Inet4Addr returns the Ifreq union data from an embedded sockaddr as a C // in_addr/Go []byte (4-byte IPv4 address) value. If the sockaddr family is not // AF_INET, an error is returned. func (ifr *Ifreq) Inet4Addr() ([]byte, error) { raw := *(*RawSockaddrInet4)(unsafe.Pointer(&ifr.raw.Ifru[:SizeofSockaddrInet4][0])) if raw.Family != AF_INET { // Cannot safely interpret raw.Addr bytes as an IPv4 address. return nil, EINVAL } return raw.Addr[:], nil } // SetInet4Addr sets a C in_addr/Go []byte (4-byte IPv4 address) value in an // embedded sockaddr within the Ifreq's union data. v must be 4 bytes in length // or an error will be returned. func (ifr *Ifreq) SetInet4Addr(v []byte) error { if len(v) != 4 { return EINVAL } var addr [4]byte copy(addr[:], v) ifr.clear() *(*RawSockaddrInet4)( unsafe.Pointer(&ifr.raw.Ifru[:SizeofSockaddrInet4][0]), ) = RawSockaddrInet4{ // Always set IP family as ioctls would require it anyway. Family: AF_INET, Addr: addr, } return nil } // Uint16 returns the Ifreq union data as a C short/Go uint16 value. func (ifr *Ifreq) Uint16() uint16 { return *(*uint16)(unsafe.Pointer(&ifr.raw.Ifru[:2][0])) } // SetUint16 sets a C short/Go uint16 value as the Ifreq's union data. func (ifr *Ifreq) SetUint16(v uint16) { ifr.clear() *(*uint16)(unsafe.Pointer(&ifr.raw.Ifru[:2][0])) = v } // Uint32 returns the Ifreq union data as a C int/Go uint32 value. func (ifr *Ifreq) Uint32() uint32 { return *(*uint32)(unsafe.Pointer(&ifr.raw.Ifru[:4][0])) } // SetUint32 sets a C int/Go uint32 value as the Ifreq's union data. func (ifr *Ifreq) SetUint32(v uint32) { ifr.clear() *(*uint32)(unsafe.Pointer(&ifr.raw.Ifru[:4][0])) = v } // clear zeroes the ifreq's union field to prevent trailing garbage data from // being sent to the kernel if an ifreq is reused. func (ifr *Ifreq) clear() { for i := range ifr.raw.Ifru { ifr.raw.Ifru[i] = 0 } } // TODO(mdlayher): export as IfreqData? For now we can provide helpers such as // IoctlGetEthtoolDrvinfo which use these APIs under the hood. // An ifreqData is an Ifreq which carries pointer data. To produce an ifreqData, // use the Ifreq.withData method. type ifreqData struct { name [IFNAMSIZ]byte // A type separate from ifreq is required in order to comply with the // unsafe.Pointer rules since the "pointer-ness" of data would not be // preserved if it were cast into the byte array of a raw ifreq. data unsafe.Pointer // Pad to the same size as ifreq. _ [len(ifreq{}.Ifru) - SizeofPtr]byte } // withData produces an ifreqData with the pointer p set for ioctls which require // arbitrary pointer data. func (ifr Ifreq) withData(p unsafe.Pointer) ifreqData { return ifreqData{ name: ifr.raw.Ifrn, data: p, } } ================================================ FILE: vendor/golang.org/x/sys/unix/ioctl_linux.go ================================================ // Copyright 2021 The Go 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 "unsafe" // IoctlRetInt performs an ioctl operation specified by req on a device // associated with opened file descriptor fd, and returns a non-negative // integer that is returned by the ioctl syscall. func IoctlRetInt(fd int, req uint) (int, error) { ret, _, err := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), 0) if err != 0 { return 0, err } return int(ret), nil } func IoctlGetUint32(fd int, req uint) (uint32, error) { var value uint32 err := ioctlPtr(fd, req, unsafe.Pointer(&value)) return value, err } func IoctlGetRTCTime(fd int) (*RTCTime, error) { var value RTCTime err := ioctlPtr(fd, RTC_RD_TIME, unsafe.Pointer(&value)) return &value, err } func IoctlSetRTCTime(fd int, value *RTCTime) error { return ioctlPtr(fd, RTC_SET_TIME, unsafe.Pointer(value)) } func IoctlGetRTCWkAlrm(fd int) (*RTCWkAlrm, error) { var value RTCWkAlrm err := ioctlPtr(fd, RTC_WKALM_RD, unsafe.Pointer(&value)) return &value, err } func IoctlSetRTCWkAlrm(fd int, value *RTCWkAlrm) error { return ioctlPtr(fd, RTC_WKALM_SET, unsafe.Pointer(value)) } // IoctlGetEthtoolDrvinfo fetches ethtool driver information for the network // device specified by ifname. func IoctlGetEthtoolDrvinfo(fd int, ifname string) (*EthtoolDrvinfo, error) { ifr, err := NewIfreq(ifname) if err != nil { return nil, err } value := EthtoolDrvinfo{Cmd: ETHTOOL_GDRVINFO} ifrd := ifr.withData(unsafe.Pointer(&value)) err = ioctlIfreqData(fd, SIOCETHTOOL, &ifrd) return &value, err } // IoctlGetWatchdogInfo fetches information about a watchdog device from the // Linux watchdog API. For more information, see: // https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html. func IoctlGetWatchdogInfo(fd int) (*WatchdogInfo, error) { var value WatchdogInfo err := ioctlPtr(fd, WDIOC_GETSUPPORT, unsafe.Pointer(&value)) return &value, err } // IoctlWatchdogKeepalive issues a keepalive ioctl to a watchdog device. For // more information, see: // https://www.kernel.org/doc/html/latest/watchdog/watchdog-api.html. func IoctlWatchdogKeepalive(fd int) error { // arg is ignored and not a pointer, so ioctl is fine instead of ioctlPtr. return ioctl(fd, WDIOC_KEEPALIVE, 0) } // IoctlFileCloneRange performs an FICLONERANGE ioctl operation to clone the // range of data conveyed in value to the file associated with the file // descriptor destFd. See the ioctl_ficlonerange(2) man page for details. func IoctlFileCloneRange(destFd int, value *FileCloneRange) error { return ioctlPtr(destFd, FICLONERANGE, unsafe.Pointer(value)) } // IoctlFileClone performs an FICLONE ioctl operation to clone the entire file // associated with the file description srcFd to the file associated with the // file descriptor destFd. See the ioctl_ficlone(2) man page for details. func IoctlFileClone(destFd, srcFd int) error { return ioctl(destFd, FICLONE, uintptr(srcFd)) } type FileDedupeRange struct { Src_offset uint64 Src_length uint64 Reserved1 uint16 Reserved2 uint32 Info []FileDedupeRangeInfo } type FileDedupeRangeInfo struct { Dest_fd int64 Dest_offset uint64 Bytes_deduped uint64 Status int32 Reserved uint32 } // IoctlFileDedupeRange performs an FIDEDUPERANGE ioctl operation to share the // range of data conveyed in value from the file associated with the file // descriptor srcFd to the value.Info destinations. See the // ioctl_fideduperange(2) man page for details. func IoctlFileDedupeRange(srcFd int, value *FileDedupeRange) error { buf := make([]byte, SizeofRawFileDedupeRange+ len(value.Info)*SizeofRawFileDedupeRangeInfo) rawrange := (*RawFileDedupeRange)(unsafe.Pointer(&buf[0])) rawrange.Src_offset = value.Src_offset rawrange.Src_length = value.Src_length rawrange.Dest_count = uint16(len(value.Info)) rawrange.Reserved1 = value.Reserved1 rawrange.Reserved2 = value.Reserved2 for i := range value.Info { rawinfo := (*RawFileDedupeRangeInfo)(unsafe.Pointer( uintptr(unsafe.Pointer(&buf[0])) + uintptr(SizeofRawFileDedupeRange) + uintptr(i*SizeofRawFileDedupeRangeInfo))) rawinfo.Dest_fd = value.Info[i].Dest_fd rawinfo.Dest_offset = value.Info[i].Dest_offset rawinfo.Bytes_deduped = value.Info[i].Bytes_deduped rawinfo.Status = value.Info[i].Status rawinfo.Reserved = value.Info[i].Reserved } err := ioctlPtr(srcFd, FIDEDUPERANGE, unsafe.Pointer(&buf[0])) // Output for i := range value.Info { rawinfo := (*RawFileDedupeRangeInfo)(unsafe.Pointer( uintptr(unsafe.Pointer(&buf[0])) + uintptr(SizeofRawFileDedupeRange) + uintptr(i*SizeofRawFileDedupeRangeInfo))) value.Info[i].Dest_fd = rawinfo.Dest_fd value.Info[i].Dest_offset = rawinfo.Dest_offset value.Info[i].Bytes_deduped = rawinfo.Bytes_deduped value.Info[i].Status = rawinfo.Status value.Info[i].Reserved = rawinfo.Reserved } return err } func IoctlHIDGetDesc(fd int, value *HIDRawReportDescriptor) error { return ioctlPtr(fd, HIDIOCGRDESC, unsafe.Pointer(value)) } func IoctlHIDGetRawInfo(fd int) (*HIDRawDevInfo, error) { var value HIDRawDevInfo err := ioctlPtr(fd, HIDIOCGRAWINFO, unsafe.Pointer(&value)) return &value, err } func IoctlHIDGetRawName(fd int) (string, error) { var value [_HIDIOCGRAWNAME_LEN]byte err := ioctlPtr(fd, _HIDIOCGRAWNAME, unsafe.Pointer(&value[0])) return ByteSliceToString(value[:]), err } func IoctlHIDGetRawPhys(fd int) (string, error) { var value [_HIDIOCGRAWPHYS_LEN]byte err := ioctlPtr(fd, _HIDIOCGRAWPHYS, unsafe.Pointer(&value[0])) return ByteSliceToString(value[:]), err } func IoctlHIDGetRawUniq(fd int) (string, error) { var value [_HIDIOCGRAWUNIQ_LEN]byte err := ioctlPtr(fd, _HIDIOCGRAWUNIQ, unsafe.Pointer(&value[0])) return ByteSliceToString(value[:]), err } // IoctlIfreq performs an ioctl using an Ifreq structure for input and/or // output. See the netdevice(7) man page for details. func IoctlIfreq(fd int, req uint, value *Ifreq) error { // It is possible we will add more fields to *Ifreq itself later to prevent // misuse, so pass the raw *ifreq directly. return ioctlPtr(fd, req, unsafe.Pointer(&value.raw)) } // TODO(mdlayher): export if and when IfreqData is exported. // ioctlIfreqData performs an ioctl using an ifreqData structure for input // and/or output. See the netdevice(7) man page for details. func ioctlIfreqData(fd int, req uint, value *ifreqData) error { // The memory layout of IfreqData (type-safe) and ifreq (not type-safe) are // identical so pass *IfreqData directly. return ioctlPtr(fd, req, unsafe.Pointer(value)) } // IoctlKCMClone attaches a new file descriptor to a multiplexor by cloning an // existing KCM socket, returning a structure containing the file descriptor of // the new socket. func IoctlKCMClone(fd int) (*KCMClone, error) { var info KCMClone if err := ioctlPtr(fd, SIOCKCMCLONE, unsafe.Pointer(&info)); err != nil { return nil, err } return &info, nil } // IoctlKCMAttach attaches a TCP socket and associated BPF program file // descriptor to a multiplexor. func IoctlKCMAttach(fd int, info KCMAttach) error { return ioctlPtr(fd, SIOCKCMATTACH, unsafe.Pointer(&info)) } // IoctlKCMUnattach unattaches a TCP socket file descriptor from a multiplexor. func IoctlKCMUnattach(fd int, info KCMUnattach) error { return ioctlPtr(fd, SIOCKCMUNATTACH, unsafe.Pointer(&info)) } // IoctlLoopGetStatus64 gets the status of the loop device associated with the // file descriptor fd using the LOOP_GET_STATUS64 operation. func IoctlLoopGetStatus64(fd int) (*LoopInfo64, error) { var value LoopInfo64 if err := ioctlPtr(fd, LOOP_GET_STATUS64, unsafe.Pointer(&value)); err != nil { return nil, err } return &value, nil } // IoctlLoopSetStatus64 sets the status of the loop device associated with the // file descriptor fd using the LOOP_SET_STATUS64 operation. func IoctlLoopSetStatus64(fd int, value *LoopInfo64) error { return ioctlPtr(fd, LOOP_SET_STATUS64, unsafe.Pointer(value)) } // IoctlLoopConfigure configures all loop device parameters in a single step func IoctlLoopConfigure(fd int, value *LoopConfig) error { return ioctlPtr(fd, LOOP_CONFIGURE, unsafe.Pointer(value)) } ================================================ FILE: vendor/golang.org/x/sys/unix/ioctl_signed.go ================================================ // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build aix || solaris package unix import ( "unsafe" ) // ioctl itself should not be exposed directly, but additional get/set // functions for specific types are permissible. // IoctlSetInt performs an ioctl operation which sets an integer value // on fd, using the specified request number. func IoctlSetInt(fd int, req int, value int) error { return ioctl(fd, req, uintptr(value)) } // IoctlSetPointerInt performs an ioctl operation which sets an // integer value on fd, using the specified request number. The ioctl // argument is called with a pointer to the integer value, rather than // passing the integer value directly. func IoctlSetPointerInt(fd int, req int, value int) error { v := int32(value) return ioctlPtr(fd, req, unsafe.Pointer(&v)) } // IoctlSetWinsize performs an ioctl on fd with a *Winsize argument. // // To change fd's window size, the req argument should be TIOCSWINSZ. func IoctlSetWinsize(fd int, req int, value *Winsize) error { // TODO: if we get the chance, remove the req parameter and // hardcode TIOCSWINSZ. return ioctlPtr(fd, req, unsafe.Pointer(value)) } // IoctlSetTermios performs an ioctl on fd with a *Termios. // // The req value will usually be TCSETA or TIOCSETA. func IoctlSetTermios(fd int, req int, value *Termios) error { // TODO: if we get the chance, remove the req parameter. return ioctlPtr(fd, req, unsafe.Pointer(value)) } // IoctlGetInt performs an ioctl operation which gets an integer value // from fd, using the specified request number. // // A few ioctl requests use the return value as an output parameter; // for those, IoctlRetInt should be used instead of this function. func IoctlGetInt(fd int, req int) (int, error) { var value int err := ioctlPtr(fd, req, unsafe.Pointer(&value)) return value, err } func IoctlGetWinsize(fd int, req int) (*Winsize, error) { var value Winsize err := ioctlPtr(fd, req, unsafe.Pointer(&value)) return &value, err } func IoctlGetTermios(fd int, req int) (*Termios, error) { var value Termios err := ioctlPtr(fd, req, unsafe.Pointer(&value)) return &value, err } ================================================ FILE: vendor/golang.org/x/sys/unix/ioctl_unsigned.go ================================================ // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build darwin || dragonfly || freebsd || hurd || linux || netbsd || openbsd package unix import ( "unsafe" ) // ioctl itself should not be exposed directly, but additional get/set // functions for specific types are permissible. // IoctlSetInt performs an ioctl operation which sets an integer value // on fd, using the specified request number. func IoctlSetInt(fd int, req uint, value int) error { return ioctl(fd, req, uintptr(value)) } // IoctlSetPointerInt performs an ioctl operation which sets an // integer value on fd, using the specified request number. The ioctl // argument is called with a pointer to the integer value, rather than // passing the integer value directly. func IoctlSetPointerInt(fd int, req uint, value int) error { v := int32(value) return ioctlPtr(fd, req, unsafe.Pointer(&v)) } // IoctlSetWinsize performs an ioctl on fd with a *Winsize argument. // // To change fd's window size, the req argument should be TIOCSWINSZ. func IoctlSetWinsize(fd int, req uint, value *Winsize) error { // TODO: if we get the chance, remove the req parameter and // hardcode TIOCSWINSZ. return ioctlPtr(fd, req, unsafe.Pointer(value)) } // IoctlSetTermios performs an ioctl on fd with a *Termios. // // The req value will usually be TCSETA or TIOCSETA. func IoctlSetTermios(fd int, req uint, value *Termios) error { // TODO: if we get the chance, remove the req parameter. return ioctlPtr(fd, req, unsafe.Pointer(value)) } // IoctlGetInt performs an ioctl operation which gets an integer value // from fd, using the specified request number. // // A few ioctl requests use the return value as an output parameter; // for those, IoctlRetInt should be used instead of this function. func IoctlGetInt(fd int, req uint) (int, error) { var value int err := ioctlPtr(fd, req, unsafe.Pointer(&value)) return value, err } func IoctlGetWinsize(fd int, req uint) (*Winsize, error) { var value Winsize err := ioctlPtr(fd, req, unsafe.Pointer(&value)) return &value, err } func IoctlGetTermios(fd int, req uint) (*Termios, error) { var value Termios err := ioctlPtr(fd, req, unsafe.Pointer(&value)) return &value, err } ================================================ FILE: vendor/golang.org/x/sys/unix/ioctl_zos.go ================================================ // Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build zos && s390x package unix import ( "runtime" "unsafe" ) // ioctl itself should not be exposed directly, but additional get/set // functions for specific types are permissible. // IoctlSetInt performs an ioctl operation which sets an integer value // on fd, using the specified request number. func IoctlSetInt(fd int, req int, value int) error { return ioctl(fd, req, uintptr(value)) } // IoctlSetWinsize performs an ioctl on fd with a *Winsize argument. // // To change fd's window size, the req argument should be TIOCSWINSZ. func IoctlSetWinsize(fd int, req int, value *Winsize) error { // TODO: if we get the chance, remove the req parameter and // hardcode TIOCSWINSZ. return ioctlPtr(fd, req, unsafe.Pointer(value)) } // IoctlSetTermios performs an ioctl on fd with a *Termios. // // The req value is expected to be TCSETS, TCSETSW, or TCSETSF func IoctlSetTermios(fd int, req int, value *Termios) error { if (req != TCSETS) && (req != TCSETSW) && (req != TCSETSF) { return ENOSYS } err := Tcsetattr(fd, int(req), value) runtime.KeepAlive(value) return err } // IoctlGetInt performs an ioctl operation which gets an integer value // from fd, using the specified request number. // // A few ioctl requests use the return value as an output parameter; // for those, IoctlRetInt should be used instead of this function. func IoctlGetInt(fd int, req int) (int, error) { var value int err := ioctlPtr(fd, req, unsafe.Pointer(&value)) return value, err } func IoctlGetWinsize(fd int, req int) (*Winsize, error) { var value Winsize err := ioctlPtr(fd, req, unsafe.Pointer(&value)) return &value, err } // IoctlGetTermios performs an ioctl on fd with a *Termios. // // The req value is expected to be TCGETS func IoctlGetTermios(fd int, req int) (*Termios, error) { var value Termios if req != TCGETS { return &value, ENOSYS } err := Tcgetattr(fd, &value) return &value, err } ================================================ FILE: vendor/golang.org/x/sys/unix/mkall.sh ================================================ #!/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. # This script runs or (given -n) prints suggested commands to generate files for # the Architecture/OS specified by the GOARCH and GOOS environment variables. # See README.md for more information about how the build system works. GOOSARCH="${GOOS}_${GOARCH}" # defaults mksyscall="go run mksyscall.go" mkerrors="./mkerrors.sh" zerrors="zerrors_$GOOSARCH.go" mksysctl="" zsysctl="zsysctl_$GOOSARCH.go" mksysnum= mktypes= mkasm= run="sh" cmd="" case "$1" in -syscalls) for i in zsyscall*go do # Run the command line that appears in the first line # of the generated file to regenerate it. sed 1q $i | sed 's;^// ;;' | sh > _$i && gofmt < _$i > $i rm _$i done exit 0 ;; -n) run="cat" cmd="echo" shift esac case "$#" in 0) ;; *) echo 'usage: mkall.sh [-n]' 1>&2 exit 2 esac if [[ "$GOOS" = "linux" ]]; then # Use the Docker-based build system # Files generated through docker (use $cmd so you can Ctl-C the build or run) $cmd docker build --tag generate:$GOOS $GOOS $cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")/.." && pwd):/build generate:$GOOS exit fi GOOSARCH_in=syscall_$GOOSARCH.go case "$GOOSARCH" in _* | *_ | _) echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2 exit 1 ;; aix_ppc) mkerrors="$mkerrors -maix32" mksyscall="go run mksyscall_aix_ppc.go -aix" mktypes="GOARCH=$GOARCH go tool cgo -godefs" ;; aix_ppc64) mkerrors="$mkerrors -maix64" mksyscall="go run mksyscall_aix_ppc64.go -aix" mktypes="GOARCH=$GOARCH go tool cgo -godefs" ;; darwin_amd64) mkerrors="$mkerrors -m64" mktypes="GOARCH=$GOARCH go tool cgo -godefs" mkasm="go run mkasm.go" ;; darwin_arm64) mkerrors="$mkerrors -m64" mktypes="GOARCH=$GOARCH go tool cgo -godefs" mkasm="go run mkasm.go" ;; dragonfly_amd64) mkerrors="$mkerrors -m64" mksyscall="go run mksyscall.go -dragonfly" mksysnum="go run mksysnum.go 'https://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master'" mktypes="GOARCH=$GOARCH go tool cgo -godefs" ;; freebsd_386) mkerrors="$mkerrors -m32" mksyscall="go run mksyscall.go -l32" mksysnum="go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'" mktypes="GOARCH=$GOARCH go tool cgo -godefs" ;; freebsd_amd64) mkerrors="$mkerrors -m64" mksysnum="go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'" mktypes="GOARCH=$GOARCH go tool cgo -godefs" ;; freebsd_arm) mkerrors="$mkerrors" mksyscall="go run mksyscall.go -l32 -arm" mksysnum="go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'" # Let the type of C char be signed for making the bare syscall # API consistent across platforms. mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" ;; freebsd_arm64) mkerrors="$mkerrors -m64" mksysnum="go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'" mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" ;; freebsd_riscv64) mkerrors="$mkerrors -m64" mksysnum="go run mksysnum.go 'https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12'" mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" ;; netbsd_386) mkerrors="$mkerrors -m32" mksyscall="go run mksyscall.go -l32 -netbsd" mksysnum="go run mksysnum.go 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master'" mktypes="GOARCH=$GOARCH go tool cgo -godefs" ;; netbsd_amd64) mkerrors="$mkerrors -m64" mksyscall="go run mksyscall.go -netbsd" mksysnum="go run mksysnum.go 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master'" mktypes="GOARCH=$GOARCH go tool cgo -godefs" ;; netbsd_arm) mkerrors="$mkerrors" mksyscall="go run mksyscall.go -l32 -netbsd -arm" mksysnum="go run mksysnum.go 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master'" # Let the type of C char be signed for making the bare syscall # API consistent across platforms. mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" ;; netbsd_arm64) mkerrors="$mkerrors -m64" mksyscall="go run mksyscall.go -netbsd" mksysnum="go run mksysnum.go 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master'" mktypes="GOARCH=$GOARCH go tool cgo -godefs" ;; openbsd_386) mkasm="go run mkasm.go" mkerrors="$mkerrors -m32" mksyscall="go run mksyscall.go -l32 -openbsd -libc" mksysctl="go run mksysctl_openbsd.go" mktypes="GOARCH=$GOARCH go tool cgo -godefs" ;; openbsd_amd64) mkasm="go run mkasm.go" mkerrors="$mkerrors -m64" mksyscall="go run mksyscall.go -openbsd -libc" mksysctl="go run mksysctl_openbsd.go" mktypes="GOARCH=$GOARCH go tool cgo -godefs" ;; openbsd_arm) mkasm="go run mkasm.go" mkerrors="$mkerrors" mksyscall="go run mksyscall.go -l32 -openbsd -arm -libc" mksysctl="go run mksysctl_openbsd.go" # Let the type of C char be signed for making the bare syscall # API consistent across platforms. mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" ;; openbsd_arm64) mkasm="go run mkasm.go" mkerrors="$mkerrors -m64" mksyscall="go run mksyscall.go -openbsd -libc" mksysctl="go run mksysctl_openbsd.go" # Let the type of C char be signed for making the bare syscall # API consistent across platforms. mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" ;; openbsd_mips64) mkasm="go run mkasm.go" mkerrors="$mkerrors -m64" mksyscall="go run mksyscall.go -openbsd -libc" mksysctl="go run mksysctl_openbsd.go" # Let the type of C char be signed for making the bare syscall # API consistent across platforms. mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" ;; openbsd_ppc64) mkasm="go run mkasm.go" mkerrors="$mkerrors -m64" mksyscall="go run mksyscall.go -openbsd -libc" mksysctl="go run mksysctl_openbsd.go" # Let the type of C char be signed for making the bare syscall # API consistent across platforms. mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" ;; openbsd_riscv64) mkasm="go run mkasm.go" mkerrors="$mkerrors -m64" mksyscall="go run mksyscall.go -openbsd -libc" mksysctl="go run mksysctl_openbsd.go" # Let the type of C char be signed for making the bare syscall # API consistent across platforms. mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" ;; solaris_amd64) mksyscall="go run mksyscall_solaris.go" mkerrors="$mkerrors -m64" mksysnum= mktypes="GOARCH=$GOARCH go tool cgo -godefs" ;; illumos_amd64) mksyscall="go run mksyscall_solaris.go" mkerrors= 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 if [ "$GOOSARCH" == "aix_ppc64" ]; then # aix/ppc64 script generates files instead of writing to stdin. echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in && gofmt -w zsyscall_$GOOSARCH.go && gofmt -w zsyscall_"$GOOSARCH"_gccgo.go && gofmt -w zsyscall_"$GOOSARCH"_gc.go " ; elif [ "$GOOS" == "illumos" ]; then # illumos code generation requires a --illumos switch echo "$mksyscall -illumos -tags illumos,$GOARCH syscall_illumos.go |gofmt > zsyscall_illumos_$GOARCH.go"; # illumos implies solaris, so solaris code generation is also required echo "$mksyscall -tags solaris,$GOARCH syscall_solaris.go syscall_solaris_$GOARCH.go |gofmt >zsyscall_solaris_$GOARCH.go"; else echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go"; fi 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 | go run mkpost.go > ztypes_$GOOSARCH.go"; fi if [ -n "$mkasm" ]; then echo "$mkasm $GOOS $GOARCH"; fi ) | $run ================================================ FILE: vendor/golang.org/x/sys/unix/mkerrors.sh ================================================ #!/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 # Check that we are using the new build system if we should if [[ "$GOOS" = "linux" ]] && [[ "$GOLANG_SYS_BUILD" != "docker" ]]; then echo 1>&2 "In the Docker based build system, mkerrors should not be called directly." echo 1>&2 "See README.md" exit 1 fi if [[ "$GOOS" = "aix" ]]; then CC=${CC:-gcc} else CC=${CC:-cc} fi if [[ "$GOOS" = "solaris" ]]; then # Assumes GNU versions of utilities in PATH. export PATH=/usr/gnu/bin:$PATH fi uname=$(uname) includes_AIX=' #include #include #include #include #include #include #include #include #include #include #include #define AF_LOCAL AF_UNIX ' includes_Darwin=' #define _DARWIN_C_SOURCE #define KERNEL 1 #define _DARWIN_USE_64_BIT_INODE #define __APPLE_USE_RFC_3542 #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 // for backwards compatibility because moved TIOCREMOTE to Kernel.framework after MacOSX12.0.sdk. #define TIOCREMOTE 0x80047469 ' includes_DragonFly=' #include #include #include #include #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 #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 // is broken on powerpc64, as it fails to include definitions of // these structures. We just include them copied from . #if defined(__powerpc__) struct sgttyb { char sg_ispeed; char sg_ospeed; char sg_erase; char sg_kill; short sg_flags; }; struct tchars { char t_intrc; char t_quitc; char t_startc; char t_stopc; char t_eofc; char t_brkc; }; struct ltchars { char t_suspc; char t_dsuspc; char t_rprntc; char t_flushc; char t_werasc; char t_lnextc; }; #endif #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 #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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if defined(__sparc__) // On sparc{,64}, the kernel defines struct termios2 itself which clashes with the // definition in glibc. As only the error constants are needed here, include the // generic termibits.h (which is included by termbits.h on sparc). #include #else #include #endif #ifndef PTRACE_GETREGS #define PTRACE_GETREGS 0xc #endif #ifndef PTRACE_SETREGS #define PTRACE_SETREGS 0xd #endif #ifdef SOL_BLUETOOTH // SPARC includes this in /usr/include/sparc64-linux-gnu/bits/socket.h // but it is already in bluetooth_linux.go #undef SOL_BLUETOOTH #endif // Certain constants are missing from the fs/crypto UAPI #define FS_KEY_DESC_PREFIX "fscrypt:" #define FS_KEY_DESC_PREFIX_SIZE 8 #define FS_MAX_KEY_SIZE 64 // The code generator produces -0x1 for (~0), but an unsigned value is necessary // for the tipc_subscr timeout __u32 field. #undef TIPC_WAIT_FOREVER #define TIPC_WAIT_FOREVER 0xffffffff // Copied from linux/netfilter/nf_nat.h // Including linux/netfilter/nf_nat.h here causes conflicts between linux/in.h // and netinet/in.h. #define NF_NAT_RANGE_MAP_IPS (1 << 0) #define NF_NAT_RANGE_PROTO_SPECIFIED (1 << 1) #define NF_NAT_RANGE_PROTO_RANDOM (1 << 2) #define NF_NAT_RANGE_PERSISTENT (1 << 3) #define NF_NAT_RANGE_PROTO_RANDOM_FULLY (1 << 4) #define NF_NAT_RANGE_PROTO_OFFSET (1 << 5) #define NF_NAT_RANGE_NETMAP (1 << 6) #define NF_NAT_RANGE_PROTO_RANDOM_ALL \ (NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PROTO_RANDOM_FULLY) #define NF_NAT_RANGE_MASK \ (NF_NAT_RANGE_MAP_IPS | NF_NAT_RANGE_PROTO_SPECIFIED | \ NF_NAT_RANGE_PROTO_RANDOM | NF_NAT_RANGE_PERSISTENT | \ NF_NAT_RANGE_PROTO_RANDOM_FULLY | NF_NAT_RANGE_PROTO_OFFSET | \ NF_NAT_RANGE_NETMAP) // Copied from linux/hid.h. // Keep in sync with the size of the referenced fields. #define _HIDIOCGRAWNAME_LEN 128 // sizeof_field(struct hid_device, name) #define _HIDIOCGRAWPHYS_LEN 64 // sizeof_field(struct hid_device, phys) #define _HIDIOCGRAWUNIQ_LEN 64 // sizeof_field(struct hid_device, uniq) #define _HIDIOCGRAWNAME HIDIOCGRAWNAME(_HIDIOCGRAWNAME_LEN) #define _HIDIOCGRAWPHYS HIDIOCGRAWPHYS(_HIDIOCGRAWPHYS_LEN) #define _HIDIOCGRAWUNIQ HIDIOCGRAWUNIQ(_HIDIOCGRAWUNIQ_LEN) ' includes_NetBSD=' #include #include #include #include #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 #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 #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 !~ /^ECCAPBITS/ && $2 !~ /^ETH_/ && $2 !~ /^EPROC_/ && $2 !~ /^EQUIV_/ && $2 !~ /^EXPR_/ && $2 !~ /^EVIOC/ && $2 ~ /^E[A-Z0-9_]+$/ || $2 ~ /^B[0-9_]+$/ || $2 ~ /^(OLD|NEW)DEV$/ || $2 == "BOTHER" || $2 ~ /^CI?BAUD(EX)?$/ || $2 == "IBSHIFT" || $2 ~ /^V[A-Z0-9]+$/ || $2 ~ /^CS[A-Z0-9]/ || $2 ~ /^I(SIG|CANON|CRNL|UCLC|EXTEN|MAXBEL|STRIP|UTF8)$/ || $2 ~ /^IGN/ || $2 ~ /^IX(ON|ANY|OFF)$/ || $2 ~ /^IN(LCR|PCK)$/ || $2 !~ "X86_CR3_PCID_NOFLUSH" && $2 ~ /(^FLU?SH)|(FLU?SH$)/ || $2 ~ /^C(LOCAL|READ|MSPAR|RTSCTS)$/ || $2 == "BRKINT" || $2 == "HUPCL" || $2 == "PENDIN" || $2 == "TOSTOP" || $2 == "XCASE" || $2 == "ALTWERASE" || $2 == "NOKERNINFO" || $2 == "NFDBITS" || $2 ~ /^PAR/ || $2 ~ /^SIG[^_]/ || $2 ~ /^O[CNPFPL][A-Z]+[^_][A-Z]+$/ || $2 ~ /^(NL|CR|TAB|BS|VT|FF)DLY$/ || $2 ~ /^(NL|CR|TAB|BS|VT|FF)[0-9]$/ || $2 ~ /^O?XTABS$/ || $2 ~ /^TC[IO](ON|OFF)$/ || $2 ~ /^IN_/ || $2 ~ /^KCM/ || $2 ~ /^LANDLOCK_/ || $2 ~ /^LOCK_(SH|EX|NB|UN)$/ || $2 ~ /^LO_(KEY|NAME)_SIZE$/ || $2 ~ /^LOOP_(CLR|CTL|GET|SET)_/ || $2 == "LOOP_CONFIGURE" || $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MREMAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL|TCPOPT|UDP)_/ || $2 ~ /^NFC_(GENL|PROTO|COMM|RF|SE|DIRECTION|LLCP|SOCKPROTO)_/ || $2 ~ /^NFC_.*_(MAX)?SIZE$/ || $2 ~ /^RAW_PAYLOAD_/ || $2 ~ /^[US]F_/ || $2 ~ /^TP_STATUS_/ || $2 ~ /^FALLOC_/ || $2 ~ /^ICMPV?6?_(FILTER|SEC)/ || $2 == "SOMAXCONN" || $2 == "NAME_MAX" || $2 == "IFNAMSIZ" || $2 ~ /^CTL_(HW|KERN|MAXNAME|NET|QUERY)$/ || $2 ~ /^KERN_(HOSTNAME|OS(RELEASE|TYPE)|VERSION)$/ || $2 ~ /^HW_MACHINE$/ || $2 ~ /^SYSCTL_VERS/ || $2 !~ "MNT_BITS" && $2 ~ /^(MS|MNT|MOUNT|UMOUNT)_/ || $2 ~ /^NS_GET_/ || $2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ || $2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT|PIOD|TFD)_/ || $2 ~ /^KEXEC_/ || $2 ~ /^LINUX_REBOOT_CMD_/ || $2 ~ /^LINUX_REBOOT_MAGIC[12]$/ || $2 ~ /^MODULE_INIT_/ || $2 !~ "NLA_TYPE_MASK" && $2 !~ /^RTC_VL_(ACCURACY|BACKUP|DATA)/ && $2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTC|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P|NETNSA)_/ || $2 ~ /^SOCK_|SK_DIAG_|SKNLGRP_$/ || $2 ~ /^FIORDCHK$/ || $2 ~ /^SIOC/ || $2 ~ /^TIOC/ || $2 ~ /^TCGET/ || $2 ~ /^TCSET/ || $2 ~ /^TC(FLSH|SBRKP?|XONC)$/ || $2 !~ "RTF_BITS" && $2 ~ /^(IFF|IFT|NET_RT|RTM(GRP)?|RTF|RTV|RTA|RTAX)_/ || $2 ~ /^BIOC/ || $2 ~ /^DIOC/ || $2 ~ /^RUSAGE_(SELF|CHILDREN|THREAD)/ || $2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|LOCKS|MEMLOCK|MSGQUEUE|NICE|NOFILE|NPROC|RSS|RTPRIO|RTTIME|SIGPENDING|STACK)|RLIM_INFINITY/ || $2 ~ /^PRIO_(PROCESS|PGRP|USER)/ || $2 ~ /^CLONE_[A-Z_]+/ || $2 !~ /^(BPF_TIMEVAL|BPF_FIB_LOOKUP_[A-Z]+|BPF_F_LINK)$/ && $2 ~ /^(BPF|DLT)_/ || $2 ~ /^AUDIT_/ || $2 ~ /^(CLOCK|TIMER)_/ || $2 ~ /^CAN_/ || $2 ~ /^CAP_/ || $2 ~ /^CP_/ || $2 ~ /^CPUSTATES$/ || $2 ~ /^CTLIOCGINFO$/ || $2 ~ /^ALG_/ || $2 ~ /^FI(CLONE|DEDUPERANGE)/ || $2 ~ /^FS_(POLICY_FLAGS|KEY_DESC|ENCRYPTION_MODE|[A-Z0-9_]+_KEY_SIZE)/ || $2 ~ /^FS_IOC_.*(ENCRYPTION|VERITY|[GS]ETFLAGS)/ || $2 ~ /^FS_VERITY_/ || $2 ~ /^FSCRYPT_/ || $2 ~ /^DM_/ || $2 ~ /^GRND_/ || $2 ~ /^RND/ || $2 ~ /^KEY_(SPEC|REQKEY_DEFL)_/ || $2 ~ /^KEYCTL_/ || $2 ~ /^PERF_/ || $2 ~ /^SECCOMP_/ || $2 ~ /^SEEK_/ || $2 ~ /^SCHED_/ || $2 ~ /^SPLICE_/ || $2 ~ /^SYNC_FILE_RANGE_/ || $2 !~ /IOC_MAGIC/ && $2 ~ /^[A-Z][A-Z0-9_]+_MAGIC2?$/ || $2 ~ /^(VM|VMADDR)_/ || $2 ~ /^IOCTL_VM_SOCKETS_/ || $2 ~ /^(TASKSTATS|TS)_/ || $2 ~ /^CGROUPSTATS_/ || $2 ~ /^GENL_/ || $2 ~ /^STATX_/ || $2 ~ /^RENAME/ || $2 ~ /^UBI_IOC[A-Z]/ || $2 ~ /^UTIME_/ || $2 ~ /^XATTR_(CREATE|REPLACE|NO(DEFAULT|FOLLOW|SECURITY)|SHOWCOMPRESSION)/ || $2 ~ /^ATTR_(BIT_MAP_COUNT|(CMN|VOL|FILE)_)/ || $2 ~ /^FSOPT_/ || $2 ~ /^WDIO[CFS]_/ || $2 ~ /^NFN/ || $2 !~ /^NFT_META_IIFTYPE/ && $2 ~ /^NFT_/ || $2 ~ /^NF_NAT_/ || $2 ~ /^XDP_/ || $2 ~ /^RWF_/ || $2 ~ /^(HDIO|WIN|SMART)_/ || $2 ~ /^CRYPTO_/ || $2 ~ /^TIPC_/ || $2 !~ "DEVLINK_RELOAD_LIMITS_VALID_MASK" && $2 ~ /^DEVLINK_/ || $2 ~ /^ETHTOOL_/ || $2 ~ /^LWTUNNEL_IP/ || $2 ~ /^ITIMER_/ || $2 !~ "WMESGLEN" && $2 ~ /^W[A-Z0-9]+$/ || $2 ~ /^P_/ || $2 ~/^PPPIOC/ || $2 ~ /^FAN_|FANOTIFY_/ || $2 == "HID_MAX_DESCRIPTOR_SIZE" || $2 ~ /^_?HIDIOC/ || $2 ~ /^BUS_(USB|HIL|BLUETOOTH|VIRTUAL)$/ || $2 ~ /^MTD/ || $2 ~ /^OTP/ || $2 ~ /^MEM/ || $2 ~ /^WG/ || $2 ~ /^FIB_RULE_/ || $2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE|IOMIN$|IOOPT$|ALIGNOFF$|DISCARD|ROTATIONAL$|ZEROOUT$|GETDISKSEQ$)/ {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 }' | grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' | 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]*=" }' | grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' | sort >_signal.grep echo '// mkerrors.sh' "$@" echo '// Code generated by the command above; see README.md. DO NOT EDIT.' echo echo "//go: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 struct tuple { int num; const char *name; }; struct tuple errors[] = { " for i in $errors do echo -E ' {'$i', "'$i'" },' done echo -E " }; struct tuple signals[] = { " for i in $signals do echo -E ' {'$i', "'$i'" },' done # Use -E because on some systems bash builtin interprets \n itself. echo -E ' }; static int tuplecmp(const void *a, const void *b) { return ((struct tuple *)a)->num - ((struct tuple *)b)->num; } int main(void) { int i, e; char buf[1024], *p; printf("\n\n// Error table\n"); printf("var errorList = [...]struct {\n"); printf("\tnum syscall.Errno\n"); printf("\tname string\n"); printf("\tdesc string\n"); printf("} {\n"); qsort(errors, nelem(errors), sizeof errors[0], tuplecmp); for(i=0; i 0 && errors[i-1].num == e) continue; strncpy(buf, strerror(e), sizeof(buf) - 1); buf[sizeof(buf) - 1] = '\0'; // 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\", \"%s\" },\n", e, errors[i].name, buf); } printf("}\n\n"); printf("\n\n// Signal table\n"); printf("var signalList = [...]struct {\n"); printf("\tnum syscall.Signal\n"); printf("\tname string\n"); printf("\tdesc string\n"); printf("} {\n"); qsort(signals, nelem(signals), sizeof signals[0], tuplecmp); for(i=0; i 0 && signals[i-1].num == e) continue; strncpy(buf, strsignal(e), sizeof(buf) - 1); buf[sizeof(buf) - 1] = '\0'; // 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\", \"%s\" },\n", e, signals[i].name, 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 ================================================ FILE: vendor/golang.org/x/sys/unix/mmap_nomremap.go ================================================ // Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || openbsd || solaris || zos package unix var mapper = &mmapper{ active: make(map[*byte][]byte), mmap: mmap, munmap: munmap, } ================================================ FILE: vendor/golang.org/x/sys/unix/mremap.go ================================================ // Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build linux || netbsd package unix import "unsafe" type mremapMmapper struct { mmapper mremap func(oldaddr uintptr, oldlength uintptr, newlength uintptr, flags int, newaddr uintptr) (xaddr uintptr, err error) } var mapper = &mremapMmapper{ mmapper: mmapper{ active: make(map[*byte][]byte), mmap: mmap, munmap: munmap, }, mremap: mremap, } func (m *mremapMmapper) Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) { if newLength <= 0 || len(oldData) == 0 || len(oldData) != cap(oldData) || flags&mremapFixed != 0 { return nil, EINVAL } pOld := &oldData[cap(oldData)-1] m.Lock() defer m.Unlock() bOld := m.active[pOld] if bOld == nil || &bOld[0] != &oldData[0] { return nil, EINVAL } newAddr, errno := m.mremap(uintptr(unsafe.Pointer(&bOld[0])), uintptr(len(bOld)), uintptr(newLength), flags, 0) if errno != nil { return nil, errno } bNew := unsafe.Slice((*byte)(unsafe.Pointer(newAddr)), newLength) pNew := &bNew[cap(bNew)-1] if flags&mremapDontunmap == 0 { delete(m.active, pOld) } m.active[pNew] = bNew return bNew, nil } func Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) { return mapper.Mremap(oldData, newLength, flags) } func MremapPtr(oldAddr unsafe.Pointer, oldSize uintptr, newAddr unsafe.Pointer, newSize uintptr, flags int) (ret unsafe.Pointer, err error) { xaddr, err := mapper.mremap(uintptr(oldAddr), oldSize, newSize, flags, uintptr(newAddr)) return unsafe.Pointer(xaddr), err } ================================================ FILE: vendor/golang.org/x/sys/unix/pagesize_unix.go ================================================ // Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos // For Unix, get the pagesize from the runtime. package unix import "syscall" func Getpagesize() int { return syscall.Getpagesize() } ================================================ FILE: vendor/golang.org/x/sys/unix/pledge_openbsd.go ================================================ // Copyright 2016 The Go 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 ( "errors" "fmt" "strconv" ) // Pledge implements the pledge syscall. // // This changes both the promises and execpromises; use PledgePromises or // PledgeExecpromises to only change the promises or execpromises // respectively. // // For more information see pledge(2). func Pledge(promises, execpromises string) error { if err := pledgeAvailable(); err != nil { return err } pptr, err := BytePtrFromString(promises) if err != nil { return err } exptr, err := BytePtrFromString(execpromises) if err != nil { return err } return pledge(pptr, exptr) } // PledgePromises implements the pledge syscall. // // This changes the promises and leaves the execpromises untouched. // // For more information see pledge(2). func PledgePromises(promises string) error { if err := pledgeAvailable(); err != nil { return err } pptr, err := BytePtrFromString(promises) if err != nil { return err } return pledge(pptr, nil) } // PledgeExecpromises implements the pledge syscall. // // This changes the execpromises and leaves the promises untouched. // // For more information see pledge(2). func PledgeExecpromises(execpromises string) error { if err := pledgeAvailable(); err != nil { return err } exptr, err := BytePtrFromString(execpromises) if err != nil { return err } return pledge(nil, exptr) } // majmin returns major and minor version number for an OpenBSD system. func majmin() (major int, minor int, err error) { var v Utsname err = Uname(&v) if err != nil { return } major, err = strconv.Atoi(string(v.Release[0])) if err != nil { err = errors.New("cannot parse major version number returned by uname") return } minor, err = strconv.Atoi(string(v.Release[2])) if err != nil { err = errors.New("cannot parse minor version number returned by uname") return } return } // pledgeAvailable checks for availability of the pledge(2) syscall // based on the running OpenBSD version. func pledgeAvailable() error { maj, min, err := majmin() if err != nil { return err } // Require OpenBSD 6.4 as a minimum. if maj < 6 || (maj == 6 && min <= 3) { return fmt.Errorf("cannot call Pledge on OpenBSD %d.%d", maj, min) } return nil } ================================================ FILE: vendor/golang.org/x/sys/unix/ptrace_darwin.go ================================================ // Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build darwin && !ios package unix func ptrace(request int, pid int, addr uintptr, data uintptr) error { return ptrace1(request, pid, addr, data) } ================================================ FILE: vendor/golang.org/x/sys/unix/ptrace_ios.go ================================================ // Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build ios package unix func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { return ENOTSUP } ================================================ FILE: vendor/golang.org/x/sys/unix/race.go ================================================ // 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. //go:build (darwin && race) || (linux && race) || (freebsd && race) package unix 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) } ================================================ FILE: vendor/golang.org/x/sys/unix/race0.go ================================================ // 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. //go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos package unix 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) { } ================================================ FILE: vendor/golang.org/x/sys/unix/readdirent_getdents.go ================================================ // Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build aix || dragonfly || freebsd || linux || netbsd || openbsd package unix // ReadDirent reads directory entries from fd and writes them into buf. func ReadDirent(fd int, buf []byte) (n int, err error) { return Getdents(fd, buf) } ================================================ FILE: vendor/golang.org/x/sys/unix/readdirent_getdirentries.go ================================================ // Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build darwin || zos package unix import "unsafe" // ReadDirent reads directory entries from fd and writes them into buf. 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) } ================================================ FILE: vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go ================================================ // Copyright 2019 The Go 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 // Round the length of a raw sockaddr up to align it properly. func cmsgAlignOf(salen int) int { salign := SizeofPtr if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) { // 64-bit Dragonfly before the September 2019 ABI changes still requires // 32-bit aligned access to network subsystem. salign = 4 } return (salen + salign - 1) & ^(salign - 1) } ================================================ FILE: vendor/golang.org/x/sys/unix/sockcmsg_linux.go ================================================ // 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. // Socket control messages package unix import "unsafe" // UnixCredentials encodes credentials into a socket control message // for sending to another process. This can be used for // authentication. func UnixCredentials(ucred *Ucred) []byte { b := make([]byte, CmsgSpace(SizeofUcred)) h := (*Cmsghdr)(unsafe.Pointer(&b[0])) h.Level = SOL_SOCKET h.Type = SCM_CREDENTIALS h.SetLen(CmsgLen(SizeofUcred)) *(*Ucred)(h.data(0)) = *ucred return b } // ParseUnixCredentials decodes a socket control message that contains // credentials in a Ucred structure. To receive such a message, the // SO_PASSCRED option must be enabled on the socket. func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) { if m.Header.Level != SOL_SOCKET { return nil, EINVAL } if m.Header.Type != SCM_CREDENTIALS { return nil, EINVAL } ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0])) return &ucred, nil } // PktInfo4 encodes Inet4Pktinfo into a socket control message of type IP_PKTINFO. func PktInfo4(info *Inet4Pktinfo) []byte { b := make([]byte, CmsgSpace(SizeofInet4Pktinfo)) h := (*Cmsghdr)(unsafe.Pointer(&b[0])) h.Level = SOL_IP h.Type = IP_PKTINFO h.SetLen(CmsgLen(SizeofInet4Pktinfo)) *(*Inet4Pktinfo)(h.data(0)) = *info return b } // PktInfo6 encodes Inet6Pktinfo into a socket control message of type IPV6_PKTINFO. func PktInfo6(info *Inet6Pktinfo) []byte { b := make([]byte, CmsgSpace(SizeofInet6Pktinfo)) h := (*Cmsghdr)(unsafe.Pointer(&b[0])) h.Level = SOL_IPV6 h.Type = IPV6_PKTINFO h.SetLen(CmsgLen(SizeofInet6Pktinfo)) *(*Inet6Pktinfo)(h.data(0)) = *info return b } // ParseOrigDstAddr decodes a socket control message containing the original // destination address. To receive such a message the IP_RECVORIGDSTADDR or // IPV6_RECVORIGDSTADDR option must be enabled on the socket. func ParseOrigDstAddr(m *SocketControlMessage) (Sockaddr, error) { switch { case m.Header.Level == SOL_IP && m.Header.Type == IP_ORIGDSTADDR: pp := (*RawSockaddrInet4)(unsafe.Pointer(&m.Data[0])) sa := new(SockaddrInet4) p := (*[2]byte)(unsafe.Pointer(&pp.Port)) sa.Port = int(p[0])<<8 + int(p[1]) sa.Addr = pp.Addr return sa, nil case m.Header.Level == SOL_IPV6 && m.Header.Type == IPV6_ORIGDSTADDR: pp := (*RawSockaddrInet6)(unsafe.Pointer(&m.Data[0])) sa := new(SockaddrInet6) p := (*[2]byte)(unsafe.Pointer(&pp.Port)) sa.Port = int(p[0])<<8 + int(p[1]) sa.ZoneId = pp.Scope_id sa.Addr = pp.Addr return sa, nil default: return nil, EINVAL } } ================================================ FILE: vendor/golang.org/x/sys/unix/sockcmsg_unix.go ================================================ // 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. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos // Socket control messages package unix import ( "unsafe" ) // CmsgLen returns the value to store in the Len field of the Cmsghdr // structure, taking into account any necessary alignment. func CmsgLen(datalen int) int { return cmsgAlignOf(SizeofCmsghdr) + datalen } // CmsgSpace returns the number of bytes an ancillary element with // payload of the passed data length occupies. func CmsgSpace(datalen int) int { return cmsgAlignOf(SizeofCmsghdr) + cmsgAlignOf(datalen) } func (h *Cmsghdr) data(offset uintptr) unsafe.Pointer { return unsafe.Pointer(uintptr(unsafe.Pointer(h)) + uintptr(cmsgAlignOf(SizeofCmsghdr)) + offset) } // SocketControlMessage represents a socket control message. type SocketControlMessage struct { Header Cmsghdr Data []byte } // ParseSocketControlMessage parses b as an array of socket control // messages. func ParseSocketControlMessage(b []byte) ([]SocketControlMessage, error) { var msgs []SocketControlMessage i := 0 for i+CmsgLen(0) <= len(b) { h, dbuf, err := socketControlMessageHeaderAndData(b[i:]) if err != nil { return nil, err } m := SocketControlMessage{Header: *h, Data: dbuf} msgs = append(msgs, m) i += cmsgAlignOf(int(h.Len)) } return msgs, nil } // ParseOneSocketControlMessage parses a single socket control message from b, returning the message header, // message data (a slice of b), and the remainder of b after that single message. // When there are no remaining messages, len(remainder) == 0. func ParseOneSocketControlMessage(b []byte) (hdr Cmsghdr, data []byte, remainder []byte, err error) { h, dbuf, err := socketControlMessageHeaderAndData(b) if err != nil { return Cmsghdr{}, nil, nil, err } if i := cmsgAlignOf(int(h.Len)); i < len(b) { remainder = b[i:] } return *h, dbuf, remainder, nil } func socketControlMessageHeaderAndData(b []byte) (*Cmsghdr, []byte, error) { h := (*Cmsghdr)(unsafe.Pointer(&b[0])) if h.Len < SizeofCmsghdr || uint64(h.Len) > uint64(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)) for i, fd := range fds { *(*int32)(h.data(4 * uintptr(i))) = int32(fd) } 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 } ================================================ FILE: vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go ================================================ // Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build aix || darwin || freebsd || linux || netbsd || openbsd || solaris || zos package unix import ( "runtime" ) // Round the length of a raw sockaddr up to align it properly. func cmsgAlignOf(salen int) int { salign := SizeofPtr // dragonfly needs to check ABI version at runtime, see cmsgAlignOf in // sockcmsg_dragonfly.go switch runtime.GOOS { case "aix": // There is no alignment on AIX. salign = 1 case "darwin", "ios", "illumos", "solaris": // NOTE: It seems like 64-bit Darwin, Illumos and Solaris // kernels still require 32-bit aligned access to network // subsystem. if SizeofPtr == 8 { salign = 4 } case "netbsd", "openbsd": // NetBSD and OpenBSD armv7 require 64-bit alignment. if runtime.GOARCH == "arm" { salign = 8 } // NetBSD aarch64 requires 128-bit alignment. if runtime.GOOS == "netbsd" && runtime.GOARCH == "arm64" { salign = 16 } case "zos": // z/OS socket macros use [32-bit] sizeof(int) alignment, // not pointer width. salign = SizeofInt } return (salen + salign - 1) & ^(salign - 1) } ================================================ FILE: vendor/golang.org/x/sys/unix/sockcmsg_zos.go ================================================ // Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Socket control messages package unix import "unsafe" // UnixCredentials encodes credentials into a socket control message // for sending to another process. This can be used for // authentication. func UnixCredentials(ucred *Ucred) []byte { b := make([]byte, CmsgSpace(SizeofUcred)) h := (*Cmsghdr)(unsafe.Pointer(&b[0])) h.Level = SOL_SOCKET h.Type = SCM_CREDENTIALS h.SetLen(CmsgLen(SizeofUcred)) *(*Ucred)(h.data(0)) = *ucred return b } // ParseUnixCredentials decodes a socket control message that contains // credentials in a Ucred structure. To receive such a message, the // SO_PASSCRED option must be enabled on the socket. func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) { if m.Header.Level != SOL_SOCKET { return nil, EINVAL } if m.Header.Type != SCM_CREDENTIALS { return nil, EINVAL } ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0])) return &ucred, nil } // PktInfo4 encodes Inet4Pktinfo into a socket control message of type IP_PKTINFO. func PktInfo4(info *Inet4Pktinfo) []byte { b := make([]byte, CmsgSpace(SizeofInet4Pktinfo)) h := (*Cmsghdr)(unsafe.Pointer(&b[0])) h.Level = SOL_IP h.Type = IP_PKTINFO h.SetLen(CmsgLen(SizeofInet4Pktinfo)) *(*Inet4Pktinfo)(h.data(0)) = *info return b } // PktInfo6 encodes Inet6Pktinfo into a socket control message of type IPV6_PKTINFO. func PktInfo6(info *Inet6Pktinfo) []byte { b := make([]byte, CmsgSpace(SizeofInet6Pktinfo)) h := (*Cmsghdr)(unsafe.Pointer(&b[0])) h.Level = SOL_IPV6 h.Type = IPV6_PKTINFO h.SetLen(CmsgLen(SizeofInet6Pktinfo)) *(*Inet6Pktinfo)(h.data(0)) = *info return b } ================================================ FILE: vendor/golang.org/x/sys/unix/symaddr_zos_s390x.s ================================================ // Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build zos && s390x && gc #include "textflag.h" // provide the address of function variable to be fixed up. TEXT ·getPipe2Addr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Pipe2(SB), R8 MOVD R8, ret+0(FP) RET TEXT ·get_FlockAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Flock(SB), R8 MOVD R8, ret+0(FP) RET TEXT ·get_GetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Getxattr(SB), R8 MOVD R8, ret+0(FP) RET TEXT ·get_NanosleepAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Nanosleep(SB), R8 MOVD R8, ret+0(FP) RET TEXT ·get_SetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Setxattr(SB), R8 MOVD R8, ret+0(FP) RET TEXT ·get_Wait4Addr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Wait4(SB), R8 MOVD R8, ret+0(FP) RET TEXT ·get_MountAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Mount(SB), R8 MOVD R8, ret+0(FP) RET TEXT ·get_UnmountAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Unmount(SB), R8 MOVD R8, ret+0(FP) RET TEXT ·get_UtimesNanoAtAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·UtimesNanoAt(SB), R8 MOVD R8, ret+0(FP) RET TEXT ·get_UtimesNanoAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·UtimesNano(SB), R8 MOVD R8, ret+0(FP) RET TEXT ·get_MkfifoatAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Mkfifoat(SB), R8 MOVD R8, ret+0(FP) RET TEXT ·get_ChtagAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Chtag(SB), R8 MOVD R8, ret+0(FP) RET TEXT ·get_ReadlinkatAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Readlinkat(SB), R8 MOVD R8, ret+0(FP) RET ================================================ FILE: vendor/golang.org/x/sys/unix/syscall.go ================================================ // 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. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos // 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 ( "bytes" "strings" "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) { if strings.IndexByte(s, 0) != -1 { 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 } // ByteSliceToString returns a string form of the text represented by the slice s, with a terminating NUL and any // bytes after the NUL removed. func ByteSliceToString(s []byte) string { if i := bytes.IndexByte(s, 0); i != -1 { s = s[:i] } return string(s) } // BytePtrToString takes a pointer to a sequence of text and returns the corresponding string. // If the pointer is nil, it returns the empty string. It assumes that the text sequence is terminated // at a zero byte; if the zero byte is not present, the program may crash. func BytePtrToString(p *byte) string { if p == nil { return "" } if *p == 0 { return "" } // Find NUL terminator. n := 0 for ptr := unsafe.Pointer(p); *(*byte)(ptr) != 0; n++ { ptr = unsafe.Pointer(uintptr(ptr) + 1) } return string(unsafe.Slice(p, n)) } // Single-word zero for use when we need a valid pointer to 0 bytes. var _zero uintptr ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_aix.go ================================================ // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build aix // Aix 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 "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 utimes(path string, times *[2]Timeval) (err error) func Utimes(path string, tv []Timeval) error { if len(tv) != 2 { return EINVAL } return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) } //sys utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error) func UtimesNano(path string, ts []Timespec) error { 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) } 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) sa.raw.Addr = sa.Addr 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 sa.raw.Addr = sa.Addr 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 } if n == len(sa.raw.Path) && name[0] != '@' { return nil, 0, EINVAL } sa.raw.Family = AF_UNIX for i := 0; i < n; i++ { sa.raw.Path[i] = uint8(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 && sl > 3) { // Check sl > 3 so we don't change unnamed socket behavior. sa.raw.Path[0] = 0 // Don't count trailing NUL for abstract address. sl-- } return unsafe.Pointer(&sa.raw), sl, nil } 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(fd, &rsa) } //sys getcwd(buf []byte) (err error) const ImplementsGetwd = true func Getwd() (ret string, err error) { for len := uint64(4096); ; len *= 2 { b := make([]byte, len) err := getcwd(b) if err == nil { i := 0 for b[i] != 0 { i++ } return string(b[0:i]), nil } if err != ERANGE { return "", err } } } func Getcwd(buf []byte) (n int, err error) { err = getcwd(buf) if err == nil { i := 0 for buf[i] != 0 { i++ } n = i + 1 } return } 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]) } /* * Socket */ //sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) 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(fd, &rsa) if err != nil { Close(nfd) nfd = 0 } return } func recvmsgRaw(fd int, iov []Iovec, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) { var msg Msghdr msg.Name = (*byte)(unsafe.Pointer(rsa)) msg.Namelen = uint32(SizeofSockaddrAny) var dummy byte if len(oob) > 0 { // receive at least one normal byte if emptyIovecs(iov) { var iova [1]Iovec iova[0].Base = &dummy iova[0].SetLen(1) iov = iova[:] } msg.Control = (*byte)(unsafe.Pointer(&oob[0])) msg.SetControllen(len(oob)) } if len(iov) > 0 { msg.Iov = &iov[0] msg.SetIovlen(len(iov)) } if n, err = recvmsg(fd, &msg, flags); n == -1 { return } oobn = int(msg.Controllen) recvflags = int(msg.Flags) return } func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) { var msg Msghdr msg.Name = (*byte)(unsafe.Pointer(ptr)) msg.Namelen = uint32(salen) var dummy byte var empty bool if len(oob) > 0 { // send at least one normal byte empty = emptyIovecs(iov) if empty { var iova [1]Iovec iova[0].Base = &dummy iova[0].SetLen(1) iov = iova[:] } msg.Control = (*byte)(unsafe.Pointer(&oob[0])) msg.SetControllen(len(oob)) } if len(iov) > 0 { msg.Iov = &iov[0] msg.SetIovlen(len(iov)) } if n, err = sendmsg(fd, &msg, flags); err != nil { return 0, err } if len(oob) > 0 && empty { n = 0 } return n, nil } func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) { switch rsa.Addr.Family { case AF_UNIX: pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa)) sa := new(SockaddrUnix) // Some versions of AIX have a bug in getsockname (see IV78655). // We can't rely on sa.Len being set correctly. n := SizeofSockaddrUnix - 3 // subtract leading Family, Len, terminating NUL. for i := 0; i < n; i++ { if pp.Path[i] == 0 { n = i break } } sa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n)) 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]) sa.Addr = pp.Addr 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 sa.Addr = pp.Addr return sa, nil } return nil, EAFNOSUPPORT } func Gettimeofday(tv *Timeval) (err error) { err = gettimeofday(tv, nil) 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) } // TODO func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { return -1, ENOSYS } func direntIno(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino)) } func direntReclen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) } func direntNamlen(buf []byte) (uint64, bool) { reclen, ok := direntReclen(buf) if !ok { return 0, false } return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true } //sys getdirent(fd int, buf []byte) (n int, err error) func Getdents(fd int, buf []byte) (n int, err error) { return getdirent(fd, buf) } //sys wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t, err error) func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) { var status _C_int var r Pid_t err = ERESTART // AIX wait4 may return with ERESTART errno, while the processus is still // active. for err == ERESTART { r, err = wait4(Pid_t(pid), &status, options, rusage) } wpid = int(r) if wstatus != nil { *wstatus = WaitStatus(status) } return } /* * Wait */ type WaitStatus uint32 func (w WaitStatus) Stopped() bool { return w&0x40 != 0 } func (w WaitStatus) StopSignal() Signal { if !w.Stopped() { return -1 } return Signal(w>>8) & 0xFF } func (w WaitStatus) Exited() bool { return w&0xFF == 0 } func (w WaitStatus) ExitStatus() int { if !w.Exited() { return -1 } return int((w >> 8) & 0xFF) } func (w WaitStatus) Signaled() bool { return w&0x40 == 0 && w&0xFF != 0 } func (w WaitStatus) Signal() Signal { if !w.Signaled() { return -1 } return Signal(w>>16) & 0xFF } func (w WaitStatus) Continued() bool { return w&0x01000000 != 0 } func (w WaitStatus) CoreDump() bool { return w&0x80 == 0x80 } func (w WaitStatus) TrapCause() int { return -1 } //sys ioctl(fd int, req int, arg uintptr) (err error) //sys ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) = ioctl // fcntl must never be called with cmd=F_DUP2FD because it doesn't work on AIX // There is no way to create a custom fcntl and to keep //sys fcntl easily, // Therefore, the programmer must call dup2 instead of fcntl in this case. // FcntlInt performs a fcntl syscall on fd with the provided command and argument. //sys FcntlInt(fd uintptr, cmd int, arg int) (r int,err error) = fcntl // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. //sys FcntlFlock(fd uintptr, cmd int, lk *Flock_t) (err error) = fcntl //sys fcntl(fd int, cmd int, arg int) (val int, err error) //sys fsyncRange(fd int, how int, start int64, length int64) (err error) = fsync_range func Fsync(fd int) error { return fsyncRange(fd, O_SYNC, 0, 0) } /* * Direct access */ //sys Acct(path string) (err error) //sys Chdir(path string) (err error) //sys Chroot(path string) (err error) //sys Close(fd int) (err error) //sys Dup(oldfd int) (fd int, err error) //sys Exit(code int) //sys Faccessat(dirfd int, path string, mode uint32, flags int) (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 Fdatasync(fd int) (err error) // readdir_r //sysnb Getpgid(pid int) (pgid int, err error) //sys Getpgrp() (pid int) //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 Getsid(pid int) (sid int, err error) //sysnb Kill(pid int, sig Signal) (err error) //sys Klogctl(typ int, buf []byte) (n int, err error) = syslog //sys Mkdir(dirfd int, 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 Mknod(path string, mode uint32, dev int) (err error) //sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error) //sys Nanosleep(time *Timespec, leftover *Timespec) (err error) //sys Open(path string, mode int, perm uint32) (fd int, err error) = open64 //sys Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) //sys read(fd int, p []byte) (n int, err error) //sys Readlink(path string, buf []byte) (n int, 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) //sys Setuid(uid int) (err error) //sys Setgid(uid int) (err error) //sys Setpriority(which int, who int, prio int) (err error) //sys Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) //sys Sync() //sysnb Times(tms *Tms) (ticks uintptr, err error) //sysnb Umask(mask int) (oldmask int) //sysnb Uname(buf *Utsname) (err error) //sys Unlink(path string) (err error) //sys Unlinkat(dirfd int, path string, flags int) (err error) //sys Ustat(dev int, ubuf *Ustat_t) (err error) //sys write(fd int, p []byte) (n int, err error) //sys Dup2(oldfd int, newfd int) (err error) //sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = posix_fadvise64 //sys Fchown(fd int, uid int, gid int) (err error) //sys fstat(fd int, stat *Stat_t) (err error) //sys fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = fstatat //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 Getuid() (uid int) //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 Pause() (err error) //sys pread(fd int, p []byte, offset int64) (n int, err error) = pread64 //sys pwrite(fd int, p []byte, offset int64) (n int, err error) = pwrite64 //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) //sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) //sysnb Setregid(rgid int, egid int) (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, statptr *Stat_t) (err error) //sys Statfs(path string, buf *Statfs_t) (err error) //sys Truncate(path string, length int64) (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) // In order to use msghdr structure with Control, Controllen, nrecvmsg and nsendmsg must be used. //sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = nrecvmsg //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = nsendmsg //sys munmap(addr uintptr, length uintptr) (err error) //sys Madvise(b []byte, advice int) (err error) //sys Mprotect(b []byte, prot int) (err error) //sys Mlock(b []byte) (err error) //sys Mlockall(flags int) (err error) //sys Msync(b []byte, flags int) (err error) //sys Munlock(b []byte) (err error) //sys Munlockall() (err error) //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) if err == nil { p[0] = int(pp[0]) p[1] = int(pp[1]) } return } //sys poll(fds *PollFd, nfds int, timeout int) (n int, err error) func Poll(fds []PollFd, timeout int) (n int, err error) { if len(fds) == 0 { return poll(nil, 0, timeout) } return poll(&fds[0], len(fds), timeout) } //sys gettimeofday(tv *Timeval, tzp *Timezone) (err error) //sysnb Time(t *Time_t) (tt Time_t, err error) //sys Utime(path string, buf *Utimbuf) (err error) //sys Getsystemcfg(label int) (n uint64) //sys umount(target string) (err error) func Unmount(target string, flags int) (err error) { if flags != 0 { // AIX doesn't have any flags for umount. return ENOSYS } return umount(target) } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_aix_ppc.go ================================================ // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build aix && ppc package unix //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64 //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64 //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: int32(sec), Nsec: int32(nsec)} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: int32(sec), Usec: int32(usec)} } func (iov *Iovec) SetLen(length int) { iov.Len = uint32(length) } func (msghdr *Msghdr) SetControllen(length int) { msghdr.Controllen = uint32(length) } func (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = int32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } func Fstat(fd int, stat *Stat_t) error { return fstat(fd, stat) } func Fstatat(dirfd int, path string, stat *Stat_t, flags int) error { return fstatat(dirfd, path, stat, flags) } func Lstat(path string, stat *Stat_t) error { return lstat(path, stat) } func Stat(path string, statptr *Stat_t) error { return stat(path, statptr) } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go ================================================ // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build aix && ppc64 package unix //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) = mmap64 func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: int64(sec), Usec: int32(usec)} } func (iov *Iovec) SetLen(length int) { iov.Len = uint64(length) } func (msghdr *Msghdr) SetControllen(length int) { msghdr.Controllen = uint32(length) } func (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = int32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } // In order to only have Timespec structure, type of Stat_t's fields // Atim, Mtim and Ctim is changed from StTimespec to Timespec during // ztypes generation. // On ppc64, Timespec.Nsec is an int64 while StTimespec.Nsec is an // int32, so the fields' value must be modified. func fixStatTimFields(stat *Stat_t) { stat.Atim.Nsec >>= 32 stat.Mtim.Nsec >>= 32 stat.Ctim.Nsec >>= 32 } func Fstat(fd int, stat *Stat_t) error { err := fstat(fd, stat) if err != nil { return err } fixStatTimFields(stat) return nil } func Fstatat(dirfd int, path string, stat *Stat_t, flags int) error { err := fstatat(dirfd, path, stat, flags) if err != nil { return err } fixStatTimFields(stat) return nil } func Lstat(path string, stat *Stat_t) error { err := lstat(path, stat) if err != nil { return err } fixStatTimFields(stat) return nil } func Stat(path string, statptr *Stat_t) error { err := stat(path, statptr) if err != nil { return err } fixStatTimFields(statptr) return nil } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_bsd.go ================================================ // 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. //go: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" ) const ImplementsGetwd = true func Getwd() (string, error) { var buf [PathMax]byte _, 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) 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]) } // 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 killed = 9 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) Killed() bool { return w&mask == killed && syscall.Signal(w>>shift) != SIGKILL } 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) sa.raw.Addr = sa.Addr 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 sa.raw.Addr = sa.Addr 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 sa.raw.Data = sa.Data return unsafe.Pointer(&sa.raw), SizeofSockaddrDatalink, nil } func anyToSockaddr(fd int, 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 sa.Data = pp.Data 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 } } sa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n)) 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]) sa.Addr = pp.Addr 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 sa.Addr = pp.Addr return sa, nil } return anyToSockaddrGOOS(fd, rsa) } 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" || runtime.GOOS == "ios") && 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(fd, &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(fd, &rsa) } //sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) // GetsockoptString returns the string value of the socket option opt for the // socket associated with fd at the given socket level. func GetsockoptString(fd, level, opt int) (string, error) { buf := make([]byte, 256) vallen := _Socklen(len(buf)) err := getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen) if err != nil { return "", err } return ByteSliceToString(buf[:vallen]), nil } //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 recvmsgRaw(fd int, iov []Iovec, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) { var msg Msghdr msg.Name = (*byte)(unsafe.Pointer(rsa)) msg.Namelen = uint32(SizeofSockaddrAny) var dummy byte if len(oob) > 0 { // receive at least one normal byte if emptyIovecs(iov) { var iova [1]Iovec iova[0].Base = &dummy iova[0].SetLen(1) iov = iova[:] } msg.Control = (*byte)(unsafe.Pointer(&oob[0])) msg.SetControllen(len(oob)) } if len(iov) > 0 { msg.Iov = &iov[0] msg.SetIovlen(len(iov)) } if n, err = recvmsg(fd, &msg, flags); err != nil { return } oobn = int(msg.Controllen) recvflags = int(msg.Flags) return } //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) { var msg Msghdr msg.Name = (*byte)(unsafe.Pointer(ptr)) msg.Namelen = uint32(salen) var dummy byte var empty bool if len(oob) > 0 { // send at least one normal byte empty = emptyIovecs(iov) if empty { var iova [1]Iovec iova[0].Base = &dummy iova[0].SetLen(1) iov = iova[:] } msg.Control = (*byte)(unsafe.Pointer(&oob[0])) msg.SetControllen(len(oob)) } if len(iov) > 0 { msg.Iov = &iov[0] msg.SetIovlen(len(iov)) } if n, err = sendmsg(fd, &msg, flags); err != nil { return 0, err } if len(oob) > 0 && empty { 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) } // 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) { buf, err := SysctlRaw(name, args...) if err != nil { return "", err } n := len(buf) // 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 } func SysctlClockinfo(name string) (*Clockinfo, error) { mib, err := sysctlmib(name) if err != nil { return nil, err } n := uintptr(SizeofClockinfo) var ci Clockinfo if err := sysctl(mib, (*byte)(unsafe.Pointer(&ci)), &n, nil, 0); err != nil { return nil, err } if n != SizeofClockinfo { return nil, EIO } return &ci, nil } func SysctlTimeval(name string) (*Timeval, error) { mib, err := sysctlmib(name) if err != nil { return nil, err } var tv Timeval n := uintptr(unsafe.Sizeof(tv)) if err := sysctl(mib, (*byte)(unsafe.Pointer(&tv)), &n, nil, 0); err != nil { return nil, err } if n != unsafe.Sizeof(tv) { return nil, EIO } return &tv, 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 { 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 } // 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]))) } 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 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 poll(fds *PollFd, nfds int, timeout int) (n int, err error) func Poll(fds []PollFd, timeout int) (n int, err error) { if len(fds) == 0 { return poll(nil, 0, timeout) } return poll(&fds[0], len(fds), timeout) } // TODO: wrap // Acct(name nil-string) (err error) // Gethostuuid(uuid *byte, timeout *Timespec) (err error) // Ptrace(req int, pid int, addr uintptr, data int) (ret uintptr, err error) //sys Madvise(b []byte, behav int) (err error) //sys Mlock(b []byte) (err error) //sys Mlockall(flags int) (err error) //sys Mprotect(b []byte, prot int) (err error) //sys Msync(b []byte, flags int) (err error) //sys Munlock(b []byte) (err error) //sys Munlockall() (err error) ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_darwin.go ================================================ // 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 ( "fmt" "syscall" "unsafe" ) //sys closedir(dir uintptr) (err error) //sys readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) func fdopendir(fd int) (dir uintptr, err error) { r0, _, e1 := syscall_syscallPtr(libc_fdopendir_trampoline_addr, uintptr(fd), 0, 0) dir = uintptr(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fdopendir_trampoline_addr uintptr //go:cgo_import_dynamic libc_fdopendir fdopendir "/usr/lib/libSystem.B.dylib" func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { // Simulate Getdirentries using fdopendir/readdir_r/closedir. // We store the number of entries to skip in the seek // offset of fd. See issue #31368. // It's not the full required semantics, but should handle the case // of calling Getdirentries or ReadDirent repeatedly. // It won't handle assigning the results of lseek to *basep, or handle // the directory being edited underfoot. skip, err := Seek(fd, 0, 1 /* SEEK_CUR */) if err != nil { return 0, err } // We need to duplicate the incoming file descriptor // because the caller expects to retain control of it, but // fdopendir expects to take control of its argument. // Just Dup'ing the file descriptor is not enough, as the // result shares underlying state. Use Openat to make a really // new file descriptor referring to the same directory. fd2, err := Openat(fd, ".", O_RDONLY, 0) if err != nil { return 0, err } d, err := fdopendir(fd2) if err != nil { Close(fd2) return 0, err } defer closedir(d) var cnt int64 for { var entry Dirent var entryp *Dirent e := readdir_r(d, &entry, &entryp) if e != 0 { return n, errnoErr(e) } if entryp == nil { break } if skip > 0 { skip-- cnt++ continue } reclen := int(entry.Reclen) if reclen > len(buf) { // Not enough room. Return for now. // The counter will let us know where we should start up again. // Note: this strategy for suspending in the middle and // restarting is O(n^2) in the length of the directory. Oh well. break } // Copy entry into return buffer. s := unsafe.Slice((*byte)(unsafe.Pointer(&entry)), reclen) copy(buf, s) buf = buf[reclen:] n += reclen cnt++ } // Set the seek offset of the input fd to record // how many files we've already returned. _, err = Seek(fd, cnt, 0 /* SEEK_SET */) if err != nil { return n, err } return n, nil } // SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets. type SockaddrDatalink struct { Len uint8 Family uint8 Index uint16 Type uint8 Nlen uint8 Alen uint8 Slen uint8 Data [12]int8 raw RawSockaddrDatalink } // SockaddrCtl implements the Sockaddr interface for AF_SYSTEM type sockets. type SockaddrCtl struct { ID uint32 Unit uint32 raw RawSockaddrCtl } func (sa *SockaddrCtl) sockaddr() (unsafe.Pointer, _Socklen, error) { sa.raw.Sc_len = SizeofSockaddrCtl sa.raw.Sc_family = AF_SYSTEM sa.raw.Ss_sysaddr = AF_SYS_CONTROL sa.raw.Sc_id = sa.ID sa.raw.Sc_unit = sa.Unit return unsafe.Pointer(&sa.raw), SizeofSockaddrCtl, nil } // SockaddrVM implements the Sockaddr interface for AF_VSOCK type sockets. // SockaddrVM provides access to Darwin VM sockets: a mechanism that enables // bidirectional communication between a hypervisor and its guest virtual // machines. type SockaddrVM struct { // CID and Port specify a context ID and port address for a VM socket. // Guests have a unique CID, and hosts may have a well-known CID of: // - VMADDR_CID_HYPERVISOR: refers to the hypervisor process. // - VMADDR_CID_LOCAL: refers to local communication (loopback). // - VMADDR_CID_HOST: refers to other processes on the host. CID uint32 Port uint32 raw RawSockaddrVM } func (sa *SockaddrVM) sockaddr() (unsafe.Pointer, _Socklen, error) { sa.raw.Len = SizeofSockaddrVM sa.raw.Family = AF_VSOCK sa.raw.Port = sa.Port sa.raw.Cid = sa.CID return unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil } func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) { switch rsa.Addr.Family { case AF_SYSTEM: pp := (*RawSockaddrCtl)(unsafe.Pointer(rsa)) if pp.Ss_sysaddr == AF_SYS_CONTROL { sa := new(SockaddrCtl) sa.ID = pp.Sc_id sa.Unit = pp.Sc_unit return sa, nil } case AF_VSOCK: pp := (*RawSockaddrVM)(unsafe.Pointer(rsa)) sa := &SockaddrVM{ CID: pp.Cid, Port: pp.Port, } return sa, nil } return nil, EAFNOSUPPORT } // Some external packages rely on SYS___SYSCTL being defined to implement their // own sysctl wrappers. Provide it here, even though direct syscalls are no // longer supported on darwin. const SYS___SYSCTL = SYS_SYSCTL // 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 } func direntIno(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino)) } func direntReclen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) } func direntNamlen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) } 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) } func PtraceDenyAttach() (err error) { return ptrace(PT_DENY_ATTACH, 0, 0, 0) } //sysnb pipe(p *[2]int32) (err error) func Pipe(p []int) (err error) { if len(p) != 2 { return EINVAL } var x [2]int32 err = pipe(&x) if err == nil { p[0] = int(x[0]) p[1] = int(x[1]) } 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)) } return getfsstat(_p0, bufsize, flags) } func xattrPointer(dest []byte) *byte { // It's only when dest is set to NULL that the OS X implementations of // getxattr() and listxattr() return the current sizes of the named attributes. // An empty byte array is not sufficient. To maintain the same behaviour as the // linux implementation, we wrap around the system calls and pass in NULL when // dest is empty. var destp *byte if len(dest) > 0 { destp = &dest[0] } return destp } //sys getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) func Getxattr(path string, attr string, dest []byte) (sz int, err error) { return getxattr(path, attr, xattrPointer(dest), len(dest), 0, 0) } func Lgetxattr(link string, attr string, dest []byte) (sz int, err error) { return getxattr(link, attr, xattrPointer(dest), len(dest), 0, XATTR_NOFOLLOW) } //sys fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { return fgetxattr(fd, attr, xattrPointer(dest), len(dest), 0, 0) } //sys setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) func Setxattr(path string, attr string, data []byte, flags int) (err error) { // The parameters for the OS X implementation vary slightly compared to the // linux system call, specifically the position parameter: // // linux: // int setxattr( // const char *path, // const char *name, // const void *value, // size_t size, // int flags // ); // // darwin: // int setxattr( // const char *path, // const char *name, // void *value, // size_t size, // u_int32_t position, // int options // ); // // position specifies the offset within the extended attribute. In the // current implementation, only the resource fork extended attribute makes // use of this argument. For all others, position is reserved. We simply // default to setting it to zero. return setxattr(path, attr, xattrPointer(data), len(data), 0, flags) } func Lsetxattr(link string, attr string, data []byte, flags int) (err error) { return setxattr(link, attr, xattrPointer(data), len(data), 0, flags|XATTR_NOFOLLOW) } //sys fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) func Fsetxattr(fd int, attr string, data []byte, flags int) (err error) { return fsetxattr(fd, attr, xattrPointer(data), len(data), 0, 0) } //sys removexattr(path string, attr string, options int) (err error) func Removexattr(path string, attr string) (err error) { // We wrap around and explicitly zero out the options provided to the OS X // implementation of removexattr, we do so for interoperability with the // linux variant. return removexattr(path, attr, 0) } func Lremovexattr(link string, attr string) (err error) { return removexattr(link, attr, XATTR_NOFOLLOW) } //sys fremovexattr(fd int, attr string, options int) (err error) func Fremovexattr(fd int, attr string) (err error) { return fremovexattr(fd, attr, 0) } //sys listxattr(path string, dest *byte, size int, options int) (sz int, err error) func Listxattr(path string, dest []byte) (sz int, err error) { return listxattr(path, xattrPointer(dest), len(dest), 0) } func Llistxattr(link string, dest []byte) (sz int, err error) { return listxattr(link, xattrPointer(dest), len(dest), XATTR_NOFOLLOW) } //sys flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) func Flistxattr(fd int, dest []byte) (sz int, err error) { return flistxattr(fd, xattrPointer(dest), len(dest), 0) } //sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) /* * Wrapped */ //sys fcntl(fd int, cmd int, arg int) (val int, err error) //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) } //sys ioctl(fd int, req uint, arg uintptr) (err error) //sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL func IoctlCtlInfo(fd int, ctlInfo *CtlInfo) error { return ioctlPtr(fd, CTLIOCGINFO, unsafe.Pointer(ctlInfo)) } // IfreqMTU is struct ifreq used to get or set a network device's MTU. type IfreqMTU struct { Name [IFNAMSIZ]byte MTU int32 } // IoctlGetIfreqMTU performs the SIOCGIFMTU ioctl operation on fd to get the MTU // of the network device specified by ifname. func IoctlGetIfreqMTU(fd int, ifname string) (*IfreqMTU, error) { var ifreq IfreqMTU copy(ifreq.Name[:], ifname) err := ioctlPtr(fd, SIOCGIFMTU, unsafe.Pointer(&ifreq)) return &ifreq, err } // IoctlSetIfreqMTU performs the SIOCSIFMTU ioctl operation on fd to set the MTU // of the network device specified by ifreq.Name. func IoctlSetIfreqMTU(fd int, ifreq *IfreqMTU) error { return ioctlPtr(fd, SIOCSIFMTU, unsafe.Pointer(ifreq)) } //sys renamexNp(from string, to string, flag uint32) (err error) func RenamexNp(from string, to string, flag uint32) (err error) { return renamexNp(from, to, flag) } //sys renameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) func RenameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) { return renameatxNp(fromfd, from, tofd, to, flag) } //sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS_SYSCTL func Uname(uname *Utsname) error { mib := []_C_int{CTL_KERN, KERN_OSTYPE} n := unsafe.Sizeof(uname.Sysname) if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil { return err } mib = []_C_int{CTL_KERN, KERN_HOSTNAME} n = unsafe.Sizeof(uname.Nodename) if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil { return err } mib = []_C_int{CTL_KERN, KERN_OSRELEASE} n = unsafe.Sizeof(uname.Release) if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil { return err } mib = []_C_int{CTL_KERN, KERN_VERSION} n = unsafe.Sizeof(uname.Version) if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil { return err } // The version might have newlines or tabs in it, convert them to // spaces. for i, b := range uname.Version { if b == '\n' || b == '\t' { if i == len(uname.Version)-1 { uname.Version[i] = 0 } else { uname.Version[i] = ' ' } } } mib = []_C_int{CTL_HW, HW_MACHINE} n = unsafe.Sizeof(uname.Machine) if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil { return err } return nil } func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { if raceenabled { raceReleaseMerge(unsafe.Pointer(&ioSync)) } var length = int64(count) err = sendfile(infd, outfd, *offset, &length, nil, 0) written = int(length) 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)) } // GetsockoptXucred is a getsockopt wrapper that returns an Xucred struct. // The usual level and opt are SOL_LOCAL and LOCAL_PEERCRED, respectively. func GetsockoptXucred(fd, level, opt int) (*Xucred, error) { x := new(Xucred) vallen := _Socklen(SizeofXucred) err := getsockopt(fd, level, opt, unsafe.Pointer(x), &vallen) return x, err } func GetsockoptTCPConnectionInfo(fd, level, opt int) (*TCPConnectionInfo, error) { var value TCPConnectionInfo vallen := _Socklen(SizeofTCPConnectionInfo) err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) return &value, err } func SysctlKinfoProc(name string, args ...int) (*KinfoProc, error) { mib, err := sysctlmib(name, args...) if err != nil { return nil, err } var kinfo KinfoProc n := uintptr(SizeofKinfoProc) if err := sysctl(mib, (*byte)(unsafe.Pointer(&kinfo)), &n, nil, 0); err != nil { return nil, err } if n != SizeofKinfoProc { return nil, EIO } return &kinfo, nil } func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) { mib, err := sysctlmib(name, args...) if err != nil { return nil, err } for { // Find size. n := uintptr(0) if err := sysctl(mib, nil, &n, nil, 0); err != nil { return nil, err } if n == 0 { return nil, nil } if n%SizeofKinfoProc != 0 { return nil, fmt.Errorf("sysctl() returned a size of %d, which is not a multiple of %d", n, SizeofKinfoProc) } // Read into buffer of that size. buf := make([]KinfoProc, n/SizeofKinfoProc) if err := sysctl(mib, (*byte)(unsafe.Pointer(&buf[0])), &n, nil, 0); err != nil { if err == ENOMEM { // Process table grew. Try again. continue } return nil, err } if n%SizeofKinfoProc != 0 { return nil, fmt.Errorf("sysctl() returned a size of %d, which is not a multiple of %d", n, SizeofKinfoProc) } // The actual call may return less than the original reported required // size so ensure we deal with that. return buf[:n/SizeofKinfoProc], nil } } //sys pthread_chdir_np(path string) (err error) func PthreadChdir(path string) (err error) { return pthread_chdir_np(path) } //sys pthread_fchdir_np(fd int) (err error) func PthreadFchdir(fd int) (err error) { return pthread_fchdir_np(fd) } //sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) //sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error) //sys shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) //sys shmdt(addr uintptr) (err error) //sys shmget(key int, size int, flag int) (id int, err error) /* * 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 ClockGettime(clockid int32, time *Timespec) (err error) //sys Close(fd int) (err error) //sys Clonefile(src string, dst string, flags int) (err error) //sys Clonefileat(srcDirfd int, src string, dstDirfd int, dst string, flags 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 Faccessat(dirfd int, path string, mode uint32, flags int) (err error) //sys Fchdir(fd int) (err error) //sys Fchflags(fd int, flags 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 Fclonefileat(srcDirfd int, dstDirfd int, dst string, flags int) (err error) //sys Flock(fd int, how int) (err error) //sys Fpathconf(fd int, name int) (val int, err error) //sys Fsync(fd int) (err error) //sys Ftruncate(fd int, length int64) (err error) //sys Getcwd(buf []byte) (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(tp *Timeval) (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 Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) //sys Listen(s int, backlog 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 Mknod(path string, mode uint32, dev int) (err error) //sys Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) //sys Open(path string, mode int, perm uint32) (fd int, err error) //sys Openat(dirfd int, 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 Readlinkat(dirfd int, path string, buf []byte) (n int, err error) //sys Rename(from string, to string) (err error) //sys Renameat(fromfd int, from string, tofd int, 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(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) //sys Setattrlist(path string, attrlist *Attrlist, attrBuf []byte, options int) (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 Setsid() (pid int, err error) //sysnb Settimeofday(tp *Timeval) (err error) //sysnb Setuid(uid int) (err error) //sys Symlink(path string, link string) (err error) //sys Symlinkat(oldpath string, newdirfd int, newpath 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 Unlinkat(dirfd int, path string, flags int) (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) ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go ================================================ // 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. //go:build amd64 && darwin package unix import "syscall" func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: int32(usec)} } 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 (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = int32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) //sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64 //sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64 //sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64 //sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT64 //sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64 //sys ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace //sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64 //sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64 ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go ================================================ // 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. //go:build arm64 && darwin package unix import "syscall" func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: int32(usec)} } 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 (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = int32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic //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, stat *Statfs_t) (err error) //sys getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) = SYS_GETFSSTAT //sys Lstat(path string, stat *Stat_t) (err error) //sys ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) = SYS_ptrace //sys Stat(path string, stat *Stat_t) (err error) //sys Statfs(path string, stat *Statfs_t) (err error) ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go ================================================ // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build darwin package unix import _ "unsafe" // Implemented in the runtime package (runtime/sys_darwin.go) func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) func syscall_syscall6X(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) // 32-bit only func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) func syscall_syscallPtr(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) //go:linkname syscall_syscall syscall.syscall //go:linkname syscall_syscall6 syscall.syscall6 //go:linkname syscall_syscall6X syscall.syscall6X //go:linkname syscall_syscall9 syscall.syscall9 //go:linkname syscall_rawSyscall syscall.rawSyscall //go:linkname syscall_rawSyscall6 syscall.rawSyscall6 //go:linkname syscall_syscallPtr syscall.syscallPtr ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_dragonfly.go ================================================ // 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. // DragonFly BSD 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 ( "sync" "unsafe" ) // See version list in https://github.com/DragonFlyBSD/DragonFlyBSD/blob/master/sys/sys/param.h var ( osreldateOnce sync.Once osreldate uint32 ) // First __DragonFly_version after September 2019 ABI changes // http://lists.dragonflybsd.org/pipermail/users/2019-September/358280.html const _dragonflyABIChangeVersion = 500705 func supportsABI(ver uint32) bool { osreldateOnce.Do(func() { osreldate, _ = SysctlUint32("kern.osreldate") }) return osreldate >= ver } // SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets. 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 } func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) { return nil, EAFNOSUPPORT } // 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 } func direntIno(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno)) } func direntReclen(buf []byte) (uint64, bool) { namlen, ok := direntNamlen(buf) if !ok { return 0, false } return (16 + namlen + 1 + 7) &^ 7, true } func direntNamlen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) } //sysnb pipe() (r int, w int, err error) func Pipe(p []int) (err error) { if len(p) != 2 { return EINVAL } r, w, err := pipe() if err == nil { p[0], p[1] = r, w } return } //sysnb pipe2(p *[2]_C_int, flags int) (r int, w int, err error) func Pipe2(p []int, flags int) (err error) { if len(p) != 2 { return EINVAL } var pp [2]_C_int // pipe2 on dragonfly takes an fds array as an argument, but still // returns the file descriptors. r, w, err := pipe2(&pp, flags) if err == nil { p[0], p[1] = r, w } return err } //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 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(fd, &rsa) if err != nil { Close(nfd) nfd = 0 } return } //sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD 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 } //sys ioctl(fd int, req uint, arg uintptr) (err error) //sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL //sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL func sysctlUname(mib []_C_int, old *byte, oldlen *uintptr) error { err := sysctl(mib, old, oldlen, nil, 0) if err != nil { // Utsname members on Dragonfly are only 32 bytes and // the syscall returns ENOMEM in case the actual value // is longer. if err == ENOMEM { err = nil } } return err } func Uname(uname *Utsname) error { mib := []_C_int{CTL_KERN, KERN_OSTYPE} n := unsafe.Sizeof(uname.Sysname) if err := sysctlUname(mib, &uname.Sysname[0], &n); err != nil { return err } uname.Sysname[unsafe.Sizeof(uname.Sysname)-1] = 0 mib = []_C_int{CTL_KERN, KERN_HOSTNAME} n = unsafe.Sizeof(uname.Nodename) if err := sysctlUname(mib, &uname.Nodename[0], &n); err != nil { return err } uname.Nodename[unsafe.Sizeof(uname.Nodename)-1] = 0 mib = []_C_int{CTL_KERN, KERN_OSRELEASE} n = unsafe.Sizeof(uname.Release) if err := sysctlUname(mib, &uname.Release[0], &n); err != nil { return err } uname.Release[unsafe.Sizeof(uname.Release)-1] = 0 mib = []_C_int{CTL_KERN, KERN_VERSION} n = unsafe.Sizeof(uname.Version) if err := sysctlUname(mib, &uname.Version[0], &n); err != nil { return err } // The version might have newlines or tabs in it, convert them to // spaces. for i, b := range uname.Version { if b == '\n' || b == '\t' { if i == len(uname.Version)-1 { uname.Version[i] = 0 } else { uname.Version[i] = ' ' } } } mib = []_C_int{CTL_HW, HW_MACHINE} n = unsafe.Sizeof(uname.Machine) if err := sysctlUname(mib, &uname.Machine[0], &n); err != nil { return err } uname.Machine[unsafe.Sizeof(uname.Machine)-1] = 0 return nil } 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) } /* * 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 ClockGettime(clockid int32, time *Timespec) (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 Faccessat(dirfd int, path string, mode uint32, flags int) (err error) //sys Fchdir(fd int) (err error) //sys Fchflags(fd int, flags 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 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 Fstatat(fd int, path string, stat *Stat_t, flags int) (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 Getdents(fd int, buf []byte) (n int, 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 Linkat(pathfd int, path string, linkfd int, link string, flags int) (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 Mkdirat(dirfd int, 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 Mknodat(fd int, path string, mode uint32, dev int) (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, 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 Renameat(fromfd int, from string, tofd int, 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(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, 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 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 Symlinkat(oldpath string, newdirfd int, newpath 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 Unlinkat(dirfd int, path string, flags int) (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 accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) //sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go ================================================ // 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. //go:build amd64 && dragonfly package unix import ( "syscall" "unsafe" ) func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: usec} } 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 (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = int32(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) ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_freebsd.go ================================================ // 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 ( "errors" "sync" "unsafe" ) // See https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/versions.html. var ( osreldateOnce sync.Once osreldate uint32 ) func supportsABI(ver uint32) bool { osreldateOnce.Do(func() { osreldate, _ = SysctlUint32("kern.osreldate") }) return osreldate >= ver } // SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets. type SockaddrDatalink struct { Len uint8 Family uint8 Index uint16 Type uint8 Nlen uint8 Alen uint8 Slen uint8 Data [46]int8 raw RawSockaddrDatalink } func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) { return nil, EAFNOSUPPORT } // 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 } func direntIno(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno)) } func direntReclen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) } func direntNamlen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) } func Pipe(p []int) (err error) { return Pipe2(p, 0) } //sysnb pipe2(p *[2]_C_int, flags int) (err error) func Pipe2(p []int, flags int) error { if len(p) != 2 { return EINVAL } var pp [2]_C_int err := pipe2(&pp, flags) if err == nil { p[0] = int(pp[0]) p[1] = int(pp[1]) } return err } 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)) } // GetsockoptXucred is a getsockopt wrapper that returns an Xucred struct. // The usual level and opt are SOL_LOCAL and LOCAL_PEERCRED, respectively. func GetsockoptXucred(fd, level, opt int) (*Xucred, error) { x := new(Xucred) vallen := _Socklen(SizeofXucred) err := getsockopt(fd, level, opt, unsafe.Pointer(x), &vallen) return x, err } 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(fd, &rsa) if err != nil { Close(nfd) nfd = 0 } return } //sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { var ( _p0 unsafe.Pointer 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 } //sys ioctl(fd int, req uint, arg uintptr) (err error) = SYS_IOCTL //sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL //sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL func Uname(uname *Utsname) error { mib := []_C_int{CTL_KERN, KERN_OSTYPE} n := unsafe.Sizeof(uname.Sysname) // Suppress ENOMEM errors to be compatible with the C library __xuname() implementation. if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) { return err } mib = []_C_int{CTL_KERN, KERN_HOSTNAME} n = unsafe.Sizeof(uname.Nodename) if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) { return err } mib = []_C_int{CTL_KERN, KERN_OSRELEASE} n = unsafe.Sizeof(uname.Release) if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) { return err } mib = []_C_int{CTL_KERN, KERN_VERSION} n = unsafe.Sizeof(uname.Version) if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) { return err } // The version might have newlines or tabs in it, convert them to // spaces. for i, b := range uname.Version { if b == '\n' || b == '\t' { if i == len(uname.Version)-1 { uname.Version[i] = 0 } else { uname.Version[i] = ' ' } } } mib = []_C_int{CTL_HW, HW_MACHINE} n = unsafe.Sizeof(uname.Machine) if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) { return err } return nil } func Stat(path string, st *Stat_t) (err error) { return Fstatat(AT_FDCWD, path, st, 0) } func Lstat(path string, st *Stat_t) (err error) { return Fstatat(AT_FDCWD, path, st, AT_SYMLINK_NOFOLLOW) } func Getdents(fd int, buf []byte) (n int, err error) { return Getdirentries(fd, buf, nil) } func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { if basep == nil || unsafe.Sizeof(*basep) == 8 { return getdirentries(fd, buf, (*uint64)(unsafe.Pointer(basep))) } // The syscall needs a 64-bit base. On 32-bit machines // we can't just use the basep passed in. See #32498. var base uint64 = uint64(*basep) n, err = getdirentries(fd, buf, &base) *basep = uintptr(base) if base>>32 != 0 { // We can't stuff the base back into a uintptr, so any // future calls would be suspect. Generate an error. // EIO is allowed by getdirentries. err = EIO } return } func Mknod(path string, mode uint32, dev uint64) (err error) { return Mknodat(AT_FDCWD, path, mode, dev) } 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) } //sys ptrace(request int, pid int, addr uintptr, data int) (err error) //sys ptracePtr(request int, pid int, addr unsafe.Pointer, data int) (err error) = SYS_PTRACE func PtraceAttach(pid int) (err error) { return ptrace(PT_ATTACH, pid, 0, 0) } func PtraceCont(pid int, signal int) (err error) { return ptrace(PT_CONTINUE, pid, 1, signal) } func PtraceDetach(pid int) (err error) { return ptrace(PT_DETACH, pid, 1, 0) } func PtraceGetFpRegs(pid int, fpregsout *FpReg) (err error) { return ptracePtr(PT_GETFPREGS, pid, unsafe.Pointer(fpregsout), 0) } func PtraceGetRegs(pid int, regsout *Reg) (err error) { return ptracePtr(PT_GETREGS, pid, unsafe.Pointer(regsout), 0) } func PtraceIO(req int, pid int, offs uintptr, out []byte, countin int) (count int, err error) { ioDesc := PtraceIoDesc{ Op: int32(req), Offs: offs, } if countin > 0 { _ = out[:countin] // check bounds ioDesc.Addr = &out[0] } else if out != nil { ioDesc.Addr = (*byte)(unsafe.Pointer(&_zero)) } ioDesc.SetLen(countin) err = ptracePtr(PT_IO, pid, unsafe.Pointer(&ioDesc), 0) return int(ioDesc.Len), err } func PtraceLwpEvents(pid int, enable int) (err error) { return ptrace(PT_LWP_EVENTS, pid, 0, enable) } func PtraceLwpInfo(pid int, info *PtraceLwpInfoStruct) (err error) { return ptracePtr(PT_LWPINFO, pid, unsafe.Pointer(info), int(unsafe.Sizeof(*info))) } func PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error) { return PtraceIO(PIOD_READ_D, pid, addr, out, SizeofLong) } func PtracePeekText(pid int, addr uintptr, out []byte) (count int, err error) { return PtraceIO(PIOD_READ_I, pid, addr, out, SizeofLong) } func PtracePokeData(pid int, addr uintptr, data []byte) (count int, err error) { return PtraceIO(PIOD_WRITE_D, pid, addr, data, SizeofLong) } func PtracePokeText(pid int, addr uintptr, data []byte) (count int, err error) { return PtraceIO(PIOD_WRITE_I, pid, addr, data, SizeofLong) } func PtraceSetRegs(pid int, regs *Reg) (err error) { return ptracePtr(PT_SETREGS, pid, unsafe.Pointer(regs), 0) } func PtraceSingleStep(pid int) (err error) { return ptrace(PT_STEP, pid, 1, 0) } func Dup3(oldfd, newfd, flags int) error { if oldfd == newfd || flags&^O_CLOEXEC != 0 { return EINVAL } how := F_DUP2FD if flags&O_CLOEXEC != 0 { how = F_DUP2FD_CLOEXEC } _, err := fcntl(oldfd, how, newfd) return err } /* * Exposed directly */ //sys Access(path string, mode uint32) (err error) //sys Adjtime(delta *Timeval, olddelta *Timeval) (err error) //sys CapEnter() (err error) //sys capRightsGet(version int, fd int, rightsp *CapRights) (err error) = SYS___CAP_RIGHTS_GET //sys capRightsLimit(fd int, rightsp *CapRights) (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 ClockGettime(clockid int32, time *Timespec) (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 Faccessat(dirfd int, path string, mode uint32, flags int) (err error) //sys Fchdir(fd int) (err error) //sys Fchflags(fd int, flags 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 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 Fstatat(fd int, path string, stat *Stat_t, flags int) (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 *uint64) (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 Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) //sys Listen(s int, backlog 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 Mknodat(fd int, path string, mode uint32, dev uint64) (err error) //sys Nanosleep(time *Timespec, leftover *Timespec) (err error) //sys Open(path string, mode int, perm uint32) (fd int, err error) //sys Openat(fdat int, 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 Readlinkat(dirfd int, path string, buf []byte) (n int, err error) //sys Rename(from string, to string) (err error) //sys Renameat(fromfd int, from string, tofd int, 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(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, 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 Setsid() (pid int, err error) //sysnb Settimeofday(tp *Timeval) (err error) //sysnb Setuid(uid int) (err error) //sys Statfs(path string, stat *Statfs_t) (err error) //sys Symlink(path string, link string) (err error) //sys Symlinkat(oldpath string, newdirfd int, newpath 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 Unlinkat(dirfd int, path string, flags int) (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 accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) //sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_freebsd_386.go ================================================ // 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. //go:build 386 && freebsd package unix import ( "syscall" "unsafe" ) func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: int32(sec), Nsec: int32(nsec)} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: int32(sec), Usec: int32(usec)} } 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 (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = int32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } func (d *PtraceIoDesc) SetLen(length int) { d.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) func PtraceGetFsBase(pid int, fsbase *int64) (err error) { return ptracePtr(PT_GETFSBASE, pid, unsafe.Pointer(fsbase), 0) } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go ================================================ // 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. //go:build amd64 && freebsd package unix import ( "syscall" "unsafe" ) func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: usec} } 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 (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = int32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } func (d *PtraceIoDesc) SetLen(length int) { d.Len = uint64(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) func PtraceGetFsBase(pid int, fsbase *int64) (err error) { return ptracePtr(PT_GETFSBASE, pid, unsafe.Pointer(fsbase), 0) } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go ================================================ // 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. //go:build arm && freebsd package unix import ( "syscall" "unsafe" ) func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: int32(nsec)} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: int32(usec)} } 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 (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = int32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } func (d *PtraceIoDesc) SetLen(length int) { d.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) ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go ================================================ // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build arm64 && freebsd package unix import ( "syscall" "unsafe" ) func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: usec} } 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 (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = int32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } func (d *PtraceIoDesc) SetLen(length int) { d.Len = uint64(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) ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go ================================================ // Copyright 2022 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build riscv64 && freebsd package unix import ( "syscall" "unsafe" ) func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: usec} } 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 (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = int32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } func (d *PtraceIoDesc) SetLen(length int) { d.Len = uint64(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) ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_hurd.go ================================================ // Copyright 2022 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build hurd package unix /* #include int ioctl(int, unsigned long int, uintptr_t); */ import "C" func ioctl(fd int, req uint, arg uintptr) (err error) { r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg)) if r0 == -1 && er != nil { err = er } return } func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(uintptr(arg))) if r0 == -1 && er != nil { err = er } return } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_hurd_386.go ================================================ // Copyright 2022 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build 386 && hurd package unix const ( TIOCGETA = 0x62251713 ) type Winsize struct { Row uint16 Col uint16 Xpixel uint16 Ypixel uint16 } type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Cc [20]uint8 Ispeed int32 Ospeed int32 } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_illumos.go ================================================ // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // illumos system calls not present on Solaris. //go:build amd64 && illumos package unix import ( "unsafe" ) func bytes2iovec(bs [][]byte) []Iovec { iovecs := make([]Iovec, len(bs)) for i, b := range bs { iovecs[i].SetLen(len(b)) if len(b) > 0 { iovecs[i].Base = &b[0] } else { iovecs[i].Base = (*byte)(unsafe.Pointer(&_zero)) } } return iovecs } //sys readv(fd int, iovs []Iovec) (n int, err error) func Readv(fd int, iovs [][]byte) (n int, err error) { iovecs := bytes2iovec(iovs) n, err = readv(fd, iovecs) return n, err } //sys preadv(fd int, iovs []Iovec, off int64) (n int, err error) func Preadv(fd int, iovs [][]byte, off int64) (n int, err error) { iovecs := bytes2iovec(iovs) n, err = preadv(fd, iovecs, off) return n, err } //sys writev(fd int, iovs []Iovec) (n int, err error) func Writev(fd int, iovs [][]byte) (n int, err error) { iovecs := bytes2iovec(iovs) n, err = writev(fd, iovecs) return n, err } //sys pwritev(fd int, iovs []Iovec, off int64) (n int, err error) func Pwritev(fd int, iovs [][]byte, off int64) (n int, err error) { iovecs := bytes2iovec(iovs) n, err = pwritev(fd, iovecs, off) return n, err } //sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) = libsocket.accept4 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(fd, &rsa) if err != nil { Close(nfd) nfd = 0 } return } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_linux.go ================================================ // 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 ( "encoding/binary" "strconv" "syscall" "time" "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) } func EpollCreate(size int) (fd int, err error) { if size <= 0 { return -1, EINVAL } return EpollCreate1(0) } //sys FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) //sys fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) func FanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname string) (err error) { if pathname == "" { return fanotifyMark(fd, flags, mask, dirFd, nil) } p, err := BytePtrFromString(pathname) if err != nil { return err } return fanotifyMark(fd, flags, mask, dirFd, p) } //sys fchmodat(dirfd int, path string, mode uint32) (err error) //sys fchmodat2(dirfd int, path string, mode uint32, flags int) (err error) func Fchmodat(dirfd int, path string, mode uint32, flags int) error { // Linux fchmodat doesn't support the flags parameter, but fchmodat2 does. // Try fchmodat2 if flags are specified. if flags != 0 { err := fchmodat2(dirfd, path, mode, flags) if err == ENOSYS { // fchmodat2 isn't available. If the flags are known to be valid, // return EOPNOTSUPP to indicate that fchmodat doesn't support them. if flags&^(AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) != 0 { return EINVAL } else if flags&(AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) != 0 { return EOPNOTSUPP } } return err } return fchmodat(dirfd, path, mode) } func InotifyInit() (fd int, err error) { return InotifyInit1(0) } //sys ioctl(fd int, req uint, arg uintptr) (err error) = SYS_IOCTL //sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL // ioctl itself should not be exposed directly, but additional get/set functions // for specific types are permissible. These are defined in ioctl.go and // ioctl_linux.go. // // The third argument to ioctl is often a pointer but sometimes an integer. // Callers should use ioctlPtr when the third argument is a pointer and ioctl // when the third argument is an integer. // // TODO: some existing code incorrectly uses ioctl when it should use ioctlPtr. //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 openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error) func Openat2(dirfd int, path string, how *OpenHow) (fd int, err error) { return openat2(dirfd, path, how, SizeofOpenHow) } func Pipe(p []int) error { return Pipe2(p, 0) } //sysnb pipe2(p *[2]_C_int, flags int) (err error) func Pipe2(p []int, flags int) error { if len(p) != 2 { return EINVAL } var pp [2]_C_int err := pipe2(&pp, flags) if err == nil { p[0] = int(pp[0]) p[1] = int(pp[1]) } return err } //sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { if len(fds) == 0 { return ppoll(nil, 0, timeout, sigmask) } return ppoll(&fds[0], len(fds), timeout, sigmask) } func Poll(fds []PollFd, timeout int) (n int, err error) { var ts *Timespec if timeout >= 0 { ts = new(Timespec) *ts = NsecToTimespec(int64(timeout) * 1e6) } return Ppoll(fds, ts, nil) } //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 Utimes(path string, tv []Timeval) error { if tv == nil { err := utimensat(AT_FDCWD, path, nil, 0) if err != ENOSYS { return err } return utimes(path, nil) } if len(tv) != 2 { return EINVAL } var ts [2]Timespec ts[0] = NsecToTimespec(TimevalToNsec(tv[0])) ts[1] = NsecToTimespec(TimevalToNsec(tv[1])) err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0) if err != ENOSYS { return err } 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 { return UtimesNanoAt(AT_FDCWD, path, ts, 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) } func Futimesat(dirfd int, path string, tv []Timeval) error { if tv == nil { return futimesat(dirfd, path, nil) } if len(tv) != 2 { return EINVAL } return futimesat(dirfd, path, (*[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/"+strconv.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 } // In some cases, Linux can return a path that starts with the // "(unreachable)" prefix, which can potentially be a valid relative // path. To work around that, return ENOENT if path is not absolute. if buf[0] != '/' { return "", ENOENT } 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 } //sys Waitid(idType int, id int, info *Siginfo, options int, rusage *Rusage) (err error) func Mkfifo(path string, mode uint32) error { return Mknod(path, mode|S_IFIFO, 0) } func Mkfifoat(dirfd int, path string, mode uint32) error { return Mknodat(dirfd, 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) sa.raw.Addr = sa.Addr 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 sa.raw.Addr = sa.Addr 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 && sl > 3) { // Check sl > 3 so we don't change unnamed socket behavior. sa.raw.Path[0] = 0 // Don't count trailing NUL for abstract address. sl-- } return unsafe.Pointer(&sa.raw), sl, nil } // SockaddrLinklayer implements the Sockaddr interface for AF_PACKET type sockets. 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 sa.raw.Addr = sa.Addr return unsafe.Pointer(&sa.raw), SizeofSockaddrLinklayer, nil } // SockaddrNetlink implements the Sockaddr interface for AF_NETLINK type sockets. 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 } // SockaddrHCI implements the Sockaddr interface for AF_BLUETOOTH type sockets // using the HCI protocol. type SockaddrHCI struct { Dev uint16 Channel uint16 raw RawSockaddrHCI } func (sa *SockaddrHCI) sockaddr() (unsafe.Pointer, _Socklen, error) { sa.raw.Family = AF_BLUETOOTH sa.raw.Dev = sa.Dev sa.raw.Channel = sa.Channel return unsafe.Pointer(&sa.raw), SizeofSockaddrHCI, nil } // SockaddrL2 implements the Sockaddr interface for AF_BLUETOOTH type sockets // using the L2CAP protocol. type SockaddrL2 struct { PSM uint16 CID uint16 Addr [6]uint8 AddrType uint8 raw RawSockaddrL2 } func (sa *SockaddrL2) sockaddr() (unsafe.Pointer, _Socklen, error) { sa.raw.Family = AF_BLUETOOTH psm := (*[2]byte)(unsafe.Pointer(&sa.raw.Psm)) psm[0] = byte(sa.PSM) psm[1] = byte(sa.PSM >> 8) for i := 0; i < len(sa.Addr); i++ { sa.raw.Bdaddr[i] = sa.Addr[len(sa.Addr)-1-i] } cid := (*[2]byte)(unsafe.Pointer(&sa.raw.Cid)) cid[0] = byte(sa.CID) cid[1] = byte(sa.CID >> 8) sa.raw.Bdaddr_type = sa.AddrType return unsafe.Pointer(&sa.raw), SizeofSockaddrL2, nil } // SockaddrRFCOMM implements the Sockaddr interface for AF_BLUETOOTH type sockets // using the RFCOMM protocol. // // Server example: // // fd, _ := Socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM) // _ = unix.Bind(fd, &unix.SockaddrRFCOMM{ // Channel: 1, // Addr: [6]uint8{0, 0, 0, 0, 0, 0}, // BDADDR_ANY or 00:00:00:00:00:00 // }) // _ = Listen(fd, 1) // nfd, sa, _ := Accept(fd) // fmt.Printf("conn addr=%v fd=%d", sa.(*unix.SockaddrRFCOMM).Addr, nfd) // Read(nfd, buf) // // Client example: // // fd, _ := Socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM) // _ = Connect(fd, &SockaddrRFCOMM{ // Channel: 1, // Addr: [6]byte{0x11, 0x22, 0x33, 0xaa, 0xbb, 0xcc}, // CC:BB:AA:33:22:11 // }) // Write(fd, []byte(`hello`)) type SockaddrRFCOMM struct { // Addr represents a bluetooth address, byte ordering is little-endian. Addr [6]uint8 // Channel is a designated bluetooth channel, only 1-30 are available for use. // Since Linux 2.6.7 and further zero value is the first available channel. Channel uint8 raw RawSockaddrRFCOMM } func (sa *SockaddrRFCOMM) sockaddr() (unsafe.Pointer, _Socklen, error) { sa.raw.Family = AF_BLUETOOTH sa.raw.Channel = sa.Channel sa.raw.Bdaddr = sa.Addr return unsafe.Pointer(&sa.raw), SizeofSockaddrRFCOMM, nil } // SockaddrCAN implements the Sockaddr interface for AF_CAN type sockets. // The RxID and TxID fields are used for transport protocol addressing in // (CAN_TP16, CAN_TP20, CAN_MCNET, and CAN_ISOTP), they can be left with // zero values for CAN_RAW and CAN_BCM sockets as they have no meaning. // // The SockaddrCAN struct must be bound to the socket file descriptor // using Bind before the CAN socket can be used. // // // Read one raw CAN frame // fd, _ := Socket(AF_CAN, SOCK_RAW, CAN_RAW) // addr := &SockaddrCAN{Ifindex: index} // Bind(fd, addr) // frame := make([]byte, 16) // Read(fd, frame) // // The full SocketCAN documentation can be found in the linux kernel // archives at: https://www.kernel.org/doc/Documentation/networking/can.txt type SockaddrCAN struct { Ifindex int RxID uint32 TxID uint32 raw RawSockaddrCAN } func (sa *SockaddrCAN) sockaddr() (unsafe.Pointer, _Socklen, error) { if sa.Ifindex < 0 || sa.Ifindex > 0x7fffffff { return nil, 0, EINVAL } sa.raw.Family = AF_CAN sa.raw.Ifindex = int32(sa.Ifindex) rx := (*[4]byte)(unsafe.Pointer(&sa.RxID)) for i := 0; i < 4; i++ { sa.raw.Addr[i] = rx[i] } tx := (*[4]byte)(unsafe.Pointer(&sa.TxID)) for i := 0; i < 4; i++ { sa.raw.Addr[i+4] = tx[i] } return unsafe.Pointer(&sa.raw), SizeofSockaddrCAN, nil } // SockaddrCANJ1939 implements the Sockaddr interface for AF_CAN using J1939 // protocol (https://en.wikipedia.org/wiki/SAE_J1939). For more information // on the purposes of the fields, check the official linux kernel documentation // available here: https://www.kernel.org/doc/Documentation/networking/j1939.rst type SockaddrCANJ1939 struct { Ifindex int Name uint64 PGN uint32 Addr uint8 raw RawSockaddrCAN } func (sa *SockaddrCANJ1939) sockaddr() (unsafe.Pointer, _Socklen, error) { if sa.Ifindex < 0 || sa.Ifindex > 0x7fffffff { return nil, 0, EINVAL } sa.raw.Family = AF_CAN sa.raw.Ifindex = int32(sa.Ifindex) n := (*[8]byte)(unsafe.Pointer(&sa.Name)) for i := 0; i < 8; i++ { sa.raw.Addr[i] = n[i] } p := (*[4]byte)(unsafe.Pointer(&sa.PGN)) for i := 0; i < 4; i++ { sa.raw.Addr[i+8] = p[i] } sa.raw.Addr[12] = sa.Addr return unsafe.Pointer(&sa.raw), SizeofSockaddrCAN, nil } // SockaddrALG implements the Sockaddr interface for AF_ALG type sockets. // SockaddrALG enables userspace access to the Linux kernel's cryptography // subsystem. The Type and Name fields specify which type of hash or cipher // should be used with a given socket. // // To create a file descriptor that provides access to a hash or cipher, both // Bind and Accept must be used. Once the setup process is complete, input // data can be written to the socket, processed by the kernel, and then read // back as hash output or ciphertext. // // Here is an example of using an AF_ALG socket with SHA1 hashing. // The initial socket setup process is as follows: // // // Open a socket to perform SHA1 hashing. // fd, _ := unix.Socket(unix.AF_ALG, unix.SOCK_SEQPACKET, 0) // addr := &unix.SockaddrALG{Type: "hash", Name: "sha1"} // unix.Bind(fd, addr) // // Note: unix.Accept does not work at this time; must invoke accept() // // manually using unix.Syscall. // hashfd, _, _ := unix.Syscall(unix.SYS_ACCEPT, uintptr(fd), 0, 0) // // Once a file descriptor has been returned from Accept, it may be used to // perform SHA1 hashing. The descriptor is not safe for concurrent use, but // may be re-used repeatedly with subsequent Write and Read operations. // // When hashing a small byte slice or string, a single Write and Read may // be used: // // // Assume hashfd is already configured using the setup process. // hash := os.NewFile(hashfd, "sha1") // // Hash an input string and read the results. Each Write discards // // previous hash state. Read always reads the current state. // b := make([]byte, 20) // for i := 0; i < 2; i++ { // io.WriteString(hash, "Hello, world.") // hash.Read(b) // fmt.Println(hex.EncodeToString(b)) // } // // Output: // // 2ae01472317d1935a84797ec1983ae243fc6aa28 // // 2ae01472317d1935a84797ec1983ae243fc6aa28 // // For hashing larger byte slices, or byte streams such as those read from // a file or socket, use Sendto with MSG_MORE to instruct the kernel to update // the hash digest instead of creating a new one for a given chunk and finalizing it. // // // Assume hashfd and addr are already configured using the setup process. // hash := os.NewFile(hashfd, "sha1") // // Hash the contents of a file. // f, _ := os.Open("/tmp/linux-4.10-rc7.tar.xz") // b := make([]byte, 4096) // for { // n, err := f.Read(b) // if err == io.EOF { // break // } // unix.Sendto(hashfd, b[:n], unix.MSG_MORE, addr) // } // hash.Read(b) // fmt.Println(hex.EncodeToString(b)) // // Output: 85cdcad0c06eef66f805ecce353bec9accbeecc5 // // For more information, see: http://www.chronox.de/crypto-API/crypto/userspace-if.html. type SockaddrALG struct { Type string Name string Feature uint32 Mask uint32 raw RawSockaddrALG } func (sa *SockaddrALG) sockaddr() (unsafe.Pointer, _Socklen, error) { // Leave room for NUL byte terminator. if len(sa.Type) > len(sa.raw.Type)-1 { return nil, 0, EINVAL } if len(sa.Name) > len(sa.raw.Name)-1 { return nil, 0, EINVAL } sa.raw.Family = AF_ALG sa.raw.Feat = sa.Feature sa.raw.Mask = sa.Mask copy(sa.raw.Type[:], sa.Type) copy(sa.raw.Name[:], sa.Name) return unsafe.Pointer(&sa.raw), SizeofSockaddrALG, nil } // SockaddrVM implements the Sockaddr interface for AF_VSOCK type sockets. // SockaddrVM provides access to Linux VM sockets: a mechanism that enables // bidirectional communication between a hypervisor and its guest virtual // machines. type SockaddrVM struct { // CID and Port specify a context ID and port address for a VM socket. // Guests have a unique CID, and hosts may have a well-known CID of: // - VMADDR_CID_HYPERVISOR: refers to the hypervisor process. // - VMADDR_CID_LOCAL: refers to local communication (loopback). // - VMADDR_CID_HOST: refers to other processes on the host. CID uint32 Port uint32 Flags uint8 raw RawSockaddrVM } func (sa *SockaddrVM) sockaddr() (unsafe.Pointer, _Socklen, error) { sa.raw.Family = AF_VSOCK sa.raw.Port = sa.Port sa.raw.Cid = sa.CID sa.raw.Flags = sa.Flags return unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil } type SockaddrXDP struct { Flags uint16 Ifindex uint32 QueueID uint32 SharedUmemFD uint32 raw RawSockaddrXDP } func (sa *SockaddrXDP) sockaddr() (unsafe.Pointer, _Socklen, error) { sa.raw.Family = AF_XDP sa.raw.Flags = sa.Flags sa.raw.Ifindex = sa.Ifindex sa.raw.Queue_id = sa.QueueID sa.raw.Shared_umem_fd = sa.SharedUmemFD return unsafe.Pointer(&sa.raw), SizeofSockaddrXDP, nil } // This constant mirrors the #define of PX_PROTO_OE in // linux/if_pppox.h. We're defining this by hand here instead of // autogenerating through mkerrors.sh because including // linux/if_pppox.h causes some declaration conflicts with other // includes (linux/if_pppox.h includes linux/in.h, which conflicts // with netinet/in.h). Given that we only need a single zero constant // out of that file, it's cleaner to just define it by hand here. const px_proto_oe = 0 type SockaddrPPPoE struct { SID uint16 Remote []byte Dev string raw RawSockaddrPPPoX } func (sa *SockaddrPPPoE) sockaddr() (unsafe.Pointer, _Socklen, error) { if len(sa.Remote) != 6 { return nil, 0, EINVAL } if len(sa.Dev) > IFNAMSIZ-1 { return nil, 0, EINVAL } *(*uint16)(unsafe.Pointer(&sa.raw[0])) = AF_PPPOX // This next field is in host-endian byte order. We can't use the // same unsafe pointer cast as above, because this value is not // 32-bit aligned and some architectures don't allow unaligned // access. // // However, the value of px_proto_oe is 0, so we can use // encoding/binary helpers to write the bytes without worrying // about the ordering. binary.BigEndian.PutUint32(sa.raw[2:6], px_proto_oe) // This field is deliberately big-endian, unlike the previous // one. The kernel expects SID to be in network byte order. binary.BigEndian.PutUint16(sa.raw[6:8], sa.SID) copy(sa.raw[8:14], sa.Remote) for i := 14; i < 14+IFNAMSIZ; i++ { sa.raw[i] = 0 } copy(sa.raw[14:], sa.Dev) return unsafe.Pointer(&sa.raw), SizeofSockaddrPPPoX, nil } // SockaddrTIPC implements the Sockaddr interface for AF_TIPC type sockets. // For more information on TIPC, see: http://tipc.sourceforge.net/. type SockaddrTIPC struct { // Scope is the publication scopes when binding service/service range. // Should be set to TIPC_CLUSTER_SCOPE or TIPC_NODE_SCOPE. Scope int // Addr is the type of address used to manipulate a socket. Addr must be // one of: // - *TIPCSocketAddr: "id" variant in the C addr union // - *TIPCServiceRange: "nameseq" variant in the C addr union // - *TIPCServiceName: "name" variant in the C addr union // // If nil, EINVAL will be returned when the structure is used. Addr TIPCAddr raw RawSockaddrTIPC } // TIPCAddr is implemented by types that can be used as an address for // SockaddrTIPC. It is only implemented by *TIPCSocketAddr, *TIPCServiceRange, // and *TIPCServiceName. type TIPCAddr interface { tipcAddrtype() uint8 tipcAddr() [12]byte } func (sa *TIPCSocketAddr) tipcAddr() [12]byte { var out [12]byte copy(out[:], (*(*[unsafe.Sizeof(TIPCSocketAddr{})]byte)(unsafe.Pointer(sa)))[:]) return out } func (sa *TIPCSocketAddr) tipcAddrtype() uint8 { return TIPC_SOCKET_ADDR } func (sa *TIPCServiceRange) tipcAddr() [12]byte { var out [12]byte copy(out[:], (*(*[unsafe.Sizeof(TIPCServiceRange{})]byte)(unsafe.Pointer(sa)))[:]) return out } func (sa *TIPCServiceRange) tipcAddrtype() uint8 { return TIPC_SERVICE_RANGE } func (sa *TIPCServiceName) tipcAddr() [12]byte { var out [12]byte copy(out[:], (*(*[unsafe.Sizeof(TIPCServiceName{})]byte)(unsafe.Pointer(sa)))[:]) return out } func (sa *TIPCServiceName) tipcAddrtype() uint8 { return TIPC_SERVICE_ADDR } func (sa *SockaddrTIPC) sockaddr() (unsafe.Pointer, _Socklen, error) { if sa.Addr == nil { return nil, 0, EINVAL } sa.raw.Family = AF_TIPC sa.raw.Scope = int8(sa.Scope) sa.raw.Addrtype = sa.Addr.tipcAddrtype() sa.raw.Addr = sa.Addr.tipcAddr() return unsafe.Pointer(&sa.raw), SizeofSockaddrTIPC, nil } // SockaddrL2TPIP implements the Sockaddr interface for IPPROTO_L2TP/AF_INET sockets. type SockaddrL2TPIP struct { Addr [4]byte ConnId uint32 raw RawSockaddrL2TPIP } func (sa *SockaddrL2TPIP) sockaddr() (unsafe.Pointer, _Socklen, error) { sa.raw.Family = AF_INET sa.raw.Conn_id = sa.ConnId sa.raw.Addr = sa.Addr return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP, nil } // SockaddrL2TPIP6 implements the Sockaddr interface for IPPROTO_L2TP/AF_INET6 sockets. type SockaddrL2TPIP6 struct { Addr [16]byte ZoneId uint32 ConnId uint32 raw RawSockaddrL2TPIP6 } func (sa *SockaddrL2TPIP6) sockaddr() (unsafe.Pointer, _Socklen, error) { sa.raw.Family = AF_INET6 sa.raw.Conn_id = sa.ConnId sa.raw.Scope_id = sa.ZoneId sa.raw.Addr = sa.Addr return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP6, nil } // SockaddrIUCV implements the Sockaddr interface for AF_IUCV sockets. type SockaddrIUCV struct { UserID string Name string raw RawSockaddrIUCV } func (sa *SockaddrIUCV) sockaddr() (unsafe.Pointer, _Socklen, error) { sa.raw.Family = AF_IUCV // These are EBCDIC encoded by the kernel, but we still need to pad them // with blanks. Initializing with blanks allows the caller to feed in either // a padded or an unpadded string. for i := 0; i < 8; i++ { sa.raw.Nodeid[i] = ' ' sa.raw.User_id[i] = ' ' sa.raw.Name[i] = ' ' } if len(sa.UserID) > 8 || len(sa.Name) > 8 { return nil, 0, EINVAL } for i, b := range []byte(sa.UserID[:]) { sa.raw.User_id[i] = int8(b) } for i, b := range []byte(sa.Name[:]) { sa.raw.Name[i] = int8(b) } return unsafe.Pointer(&sa.raw), SizeofSockaddrIUCV, nil } type SockaddrNFC struct { DeviceIdx uint32 TargetIdx uint32 NFCProtocol uint32 raw RawSockaddrNFC } func (sa *SockaddrNFC) sockaddr() (unsafe.Pointer, _Socklen, error) { sa.raw.Sa_family = AF_NFC sa.raw.Dev_idx = sa.DeviceIdx sa.raw.Target_idx = sa.TargetIdx sa.raw.Nfc_protocol = sa.NFCProtocol return unsafe.Pointer(&sa.raw), SizeofSockaddrNFC, nil } type SockaddrNFCLLCP struct { DeviceIdx uint32 TargetIdx uint32 NFCProtocol uint32 DestinationSAP uint8 SourceSAP uint8 ServiceName string raw RawSockaddrNFCLLCP } func (sa *SockaddrNFCLLCP) sockaddr() (unsafe.Pointer, _Socklen, error) { sa.raw.Sa_family = AF_NFC sa.raw.Dev_idx = sa.DeviceIdx sa.raw.Target_idx = sa.TargetIdx sa.raw.Nfc_protocol = sa.NFCProtocol sa.raw.Dsap = sa.DestinationSAP sa.raw.Ssap = sa.SourceSAP if len(sa.ServiceName) > len(sa.raw.Service_name) { return nil, 0, EINVAL } copy(sa.raw.Service_name[:], sa.ServiceName) sa.raw.SetServiceNameLen(len(sa.ServiceName)) return unsafe.Pointer(&sa.raw), SizeofSockaddrNFCLLCP, nil } var socketProtocol = func(fd int) (int, error) { return GetsockoptInt(fd, SOL_SOCKET, SO_PROTOCOL) } func anyToSockaddr(fd int, 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 sa.Addr = pp.Addr 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++ } sa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n)) return sa, nil case AF_INET: proto, err := socketProtocol(fd) if err != nil { return nil, err } switch proto { case IPPROTO_L2TP: pp := (*RawSockaddrL2TPIP)(unsafe.Pointer(rsa)) sa := new(SockaddrL2TPIP) sa.ConnId = pp.Conn_id sa.Addr = pp.Addr return sa, nil default: pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa)) sa := new(SockaddrInet4) p := (*[2]byte)(unsafe.Pointer(&pp.Port)) sa.Port = int(p[0])<<8 + int(p[1]) sa.Addr = pp.Addr return sa, nil } case AF_INET6: proto, err := socketProtocol(fd) if err != nil { return nil, err } switch proto { case IPPROTO_L2TP: pp := (*RawSockaddrL2TPIP6)(unsafe.Pointer(rsa)) sa := new(SockaddrL2TPIP6) sa.ConnId = pp.Conn_id sa.ZoneId = pp.Scope_id sa.Addr = pp.Addr return sa, nil default: 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 sa.Addr = pp.Addr return sa, nil } case AF_VSOCK: pp := (*RawSockaddrVM)(unsafe.Pointer(rsa)) sa := &SockaddrVM{ CID: pp.Cid, Port: pp.Port, Flags: pp.Flags, } return sa, nil case AF_BLUETOOTH: proto, err := socketProtocol(fd) if err != nil { return nil, err } // only BTPROTO_L2CAP and BTPROTO_RFCOMM can accept connections switch proto { case BTPROTO_L2CAP: pp := (*RawSockaddrL2)(unsafe.Pointer(rsa)) sa := &SockaddrL2{ PSM: pp.Psm, CID: pp.Cid, Addr: pp.Bdaddr, AddrType: pp.Bdaddr_type, } return sa, nil case BTPROTO_RFCOMM: pp := (*RawSockaddrRFCOMM)(unsafe.Pointer(rsa)) sa := &SockaddrRFCOMM{ Channel: pp.Channel, Addr: pp.Bdaddr, } return sa, nil } case AF_XDP: pp := (*RawSockaddrXDP)(unsafe.Pointer(rsa)) sa := &SockaddrXDP{ Flags: pp.Flags, Ifindex: pp.Ifindex, QueueID: pp.Queue_id, SharedUmemFD: pp.Shared_umem_fd, } return sa, nil case AF_PPPOX: pp := (*RawSockaddrPPPoX)(unsafe.Pointer(rsa)) if binary.BigEndian.Uint32(pp[2:6]) != px_proto_oe { return nil, EINVAL } sa := &SockaddrPPPoE{ SID: binary.BigEndian.Uint16(pp[6:8]), Remote: pp[8:14], } for i := 14; i < 14+IFNAMSIZ; i++ { if pp[i] == 0 { sa.Dev = string(pp[14:i]) break } } return sa, nil case AF_TIPC: pp := (*RawSockaddrTIPC)(unsafe.Pointer(rsa)) sa := &SockaddrTIPC{ Scope: int(pp.Scope), } // Determine which union variant is present in pp.Addr by checking // pp.Addrtype. switch pp.Addrtype { case TIPC_SERVICE_RANGE: sa.Addr = (*TIPCServiceRange)(unsafe.Pointer(&pp.Addr)) case TIPC_SERVICE_ADDR: sa.Addr = (*TIPCServiceName)(unsafe.Pointer(&pp.Addr)) case TIPC_SOCKET_ADDR: sa.Addr = (*TIPCSocketAddr)(unsafe.Pointer(&pp.Addr)) default: return nil, EINVAL } return sa, nil case AF_IUCV: pp := (*RawSockaddrIUCV)(unsafe.Pointer(rsa)) var user [8]byte var name [8]byte for i := 0; i < 8; i++ { user[i] = byte(pp.User_id[i]) name[i] = byte(pp.Name[i]) } sa := &SockaddrIUCV{ UserID: string(user[:]), Name: string(name[:]), } return sa, nil case AF_CAN: proto, err := socketProtocol(fd) if err != nil { return nil, err } pp := (*RawSockaddrCAN)(unsafe.Pointer(rsa)) switch proto { case CAN_J1939: sa := &SockaddrCANJ1939{ Ifindex: int(pp.Ifindex), } name := (*[8]byte)(unsafe.Pointer(&sa.Name)) for i := 0; i < 8; i++ { name[i] = pp.Addr[i] } pgn := (*[4]byte)(unsafe.Pointer(&sa.PGN)) for i := 0; i < 4; i++ { pgn[i] = pp.Addr[i+8] } addr := (*[1]byte)(unsafe.Pointer(&sa.Addr)) addr[0] = pp.Addr[12] return sa, nil default: sa := &SockaddrCAN{ Ifindex: int(pp.Ifindex), } rx := (*[4]byte)(unsafe.Pointer(&sa.RxID)) for i := 0; i < 4; i++ { rx[i] = pp.Addr[i] } tx := (*[4]byte)(unsafe.Pointer(&sa.TxID)) for i := 0; i < 4; i++ { tx[i] = pp.Addr[i+4] } return sa, nil } case AF_NFC: proto, err := socketProtocol(fd) if err != nil { return nil, err } switch proto { case NFC_SOCKPROTO_RAW: pp := (*RawSockaddrNFC)(unsafe.Pointer(rsa)) sa := &SockaddrNFC{ DeviceIdx: pp.Dev_idx, TargetIdx: pp.Target_idx, NFCProtocol: pp.Nfc_protocol, } return sa, nil case NFC_SOCKPROTO_LLCP: pp := (*RawSockaddrNFCLLCP)(unsafe.Pointer(rsa)) if uint64(pp.Service_name_len) > uint64(len(pp.Service_name)) { return nil, EINVAL } sa := &SockaddrNFCLLCP{ DeviceIdx: pp.Dev_idx, TargetIdx: pp.Target_idx, NFCProtocol: pp.Nfc_protocol, DestinationSAP: pp.Dsap, SourceSAP: pp.Ssap, ServiceName: string(pp.Service_name[:pp.Service_name_len]), } return sa, nil default: return nil, EINVAL } } return nil, EAFNOSUPPORT } func Accept(fd int) (nfd int, sa Sockaddr, err error) { var rsa RawSockaddrAny var len _Socklen = SizeofSockaddrAny nfd, err = accept4(fd, &rsa, &len, 0) if err != nil { return } sa, err = anyToSockaddr(fd, &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(fd, &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(fd, &rsa) } 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 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 GetsockoptTCPInfo(fd, level, opt int) (*TCPInfo, error) { var value TCPInfo vallen := _Socklen(SizeofTCPInfo) err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) return &value, err } // GetsockoptString returns the string value of the socket option opt for the // socket associated with fd at the given socket level. func GetsockoptString(fd, level, opt int) (string, error) { buf := make([]byte, 256) vallen := _Socklen(len(buf)) err := getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen) if err != nil { if err == ERANGE { buf = make([]byte, vallen) err = getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen) } if err != nil { return "", err } } return ByteSliceToString(buf[:vallen]), nil } func GetsockoptTpacketStats(fd, level, opt int) (*TpacketStats, error) { var value TpacketStats vallen := _Socklen(SizeofTpacketStats) err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) return &value, err } func GetsockoptTpacketStatsV3(fd, level, opt int) (*TpacketStatsV3, error) { var value TpacketStatsV3 vallen := _Socklen(SizeofTpacketStatsV3) 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 SetsockoptPacketMreq(fd, level, opt int, mreq *PacketMreq) error { return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq)) } // SetsockoptSockFprog attaches a classic BPF or an extended BPF program to a // socket to filter incoming packets. See 'man 7 socket' for usage information. func SetsockoptSockFprog(fd, level, opt int, fprog *SockFprog) error { return setsockopt(fd, level, opt, unsafe.Pointer(fprog), unsafe.Sizeof(*fprog)) } func SetsockoptCanRawFilter(fd, level, opt int, filter []CanFilter) error { var p unsafe.Pointer if len(filter) > 0 { p = unsafe.Pointer(&filter[0]) } return setsockopt(fd, level, opt, p, uintptr(len(filter)*SizeofCanFilter)) } func SetsockoptTpacketReq(fd, level, opt int, tp *TpacketReq) error { return setsockopt(fd, level, opt, unsafe.Pointer(tp), unsafe.Sizeof(*tp)) } func SetsockoptTpacketReq3(fd, level, opt int, tp *TpacketReq3) error { return setsockopt(fd, level, opt, unsafe.Pointer(tp), unsafe.Sizeof(*tp)) } func SetsockoptTCPRepairOpt(fd, level, opt int, o []TCPRepairOpt) (err error) { if len(o) == 0 { return EINVAL } return setsockopt(fd, level, opt, unsafe.Pointer(&o[0]), uintptr(SizeofTCPRepairOpt*len(o))) } func SetsockoptTCPMD5Sig(fd, level, opt int, s *TCPMD5Sig) error { return setsockopt(fd, level, opt, unsafe.Pointer(s), unsafe.Sizeof(*s)) } // Keyctl Commands (http://man7.org/linux/man-pages/man2/keyctl.2.html) // KeyctlInt calls keyctl commands in which each argument is an int. // These commands are KEYCTL_REVOKE, KEYCTL_CHOWN, KEYCTL_CLEAR, KEYCTL_LINK, // KEYCTL_UNLINK, KEYCTL_NEGATE, KEYCTL_SET_REQKEY_KEYRING, KEYCTL_SET_TIMEOUT, // KEYCTL_ASSUME_AUTHORITY, KEYCTL_SESSION_TO_PARENT, KEYCTL_REJECT, // KEYCTL_INVALIDATE, and KEYCTL_GET_PERSISTENT. //sys KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) = SYS_KEYCTL // KeyctlBuffer calls keyctl commands in which the third and fourth // arguments are a buffer and its length, respectively. // These commands are KEYCTL_UPDATE, KEYCTL_READ, and KEYCTL_INSTANTIATE. //sys KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) = SYS_KEYCTL // KeyctlString calls keyctl commands which return a string. // These commands are KEYCTL_DESCRIBE and KEYCTL_GET_SECURITY. func KeyctlString(cmd int, id int) (string, error) { // We must loop as the string data may change in between the syscalls. // We could allocate a large buffer here to reduce the chance that the // syscall needs to be called twice; however, this is unnecessary as // the performance loss is negligible. var buffer []byte for { // Try to fill the buffer with data length, err := KeyctlBuffer(cmd, id, buffer, 0) if err != nil { return "", err } // Check if the data was written if length <= len(buffer) { // Exclude the null terminator return string(buffer[:length-1]), nil } // Make a bigger buffer if needed buffer = make([]byte, length) } } // Keyctl commands with special signatures. // KeyctlGetKeyringID implements the KEYCTL_GET_KEYRING_ID command. // See the full documentation at: // http://man7.org/linux/man-pages/man3/keyctl_get_keyring_ID.3.html func KeyctlGetKeyringID(id int, create bool) (ringid int, err error) { createInt := 0 if create { createInt = 1 } return KeyctlInt(KEYCTL_GET_KEYRING_ID, id, createInt, 0, 0) } // KeyctlSetperm implements the KEYCTL_SETPERM command. The perm value is the // key handle permission mask as described in the "keyctl setperm" section of // http://man7.org/linux/man-pages/man1/keyctl.1.html. // See the full documentation at: // http://man7.org/linux/man-pages/man3/keyctl_setperm.3.html func KeyctlSetperm(id int, perm uint32) error { _, err := KeyctlInt(KEYCTL_SETPERM, id, int(perm), 0, 0) return err } //sys keyctlJoin(cmd int, arg2 string) (ret int, err error) = SYS_KEYCTL // KeyctlJoinSessionKeyring implements the KEYCTL_JOIN_SESSION_KEYRING command. // See the full documentation at: // http://man7.org/linux/man-pages/man3/keyctl_join_session_keyring.3.html func KeyctlJoinSessionKeyring(name string) (ringid int, err error) { return keyctlJoin(KEYCTL_JOIN_SESSION_KEYRING, name) } //sys keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) = SYS_KEYCTL // KeyctlSearch implements the KEYCTL_SEARCH command. // See the full documentation at: // http://man7.org/linux/man-pages/man3/keyctl_search.3.html func KeyctlSearch(ringid int, keyType, description string, destRingid int) (id int, err error) { return keyctlSearch(KEYCTL_SEARCH, ringid, keyType, description, destRingid) } //sys keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) = SYS_KEYCTL // KeyctlInstantiateIOV implements the KEYCTL_INSTANTIATE_IOV command. This // command is similar to KEYCTL_INSTANTIATE, except that the payload is a slice // of Iovec (each of which represents a buffer) instead of a single buffer. // See the full documentation at: // http://man7.org/linux/man-pages/man3/keyctl_instantiate_iov.3.html func KeyctlInstantiateIOV(id int, payload []Iovec, ringid int) error { return keyctlIOV(KEYCTL_INSTANTIATE_IOV, id, payload, ringid) } //sys keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) = SYS_KEYCTL // KeyctlDHCompute implements the KEYCTL_DH_COMPUTE command. This command // computes a Diffie-Hellman shared secret based on the provide params. The // secret is written to the provided buffer and the returned size is the number // of bytes written (returning an error if there is insufficient space in the // buffer). If a nil buffer is passed in, this function returns the minimum // buffer length needed to store the appropriate data. Note that this differs // from KEYCTL_READ's behavior which always returns the requested payload size. // See the full documentation at: // http://man7.org/linux/man-pages/man3/keyctl_dh_compute.3.html func KeyctlDHCompute(params *KeyctlDHParams, buffer []byte) (size int, err error) { return keyctlDH(KEYCTL_DH_COMPUTE, params, buffer) } // KeyctlRestrictKeyring implements the KEYCTL_RESTRICT_KEYRING command. This // command limits the set of keys that can be linked to the keyring, regardless // of keyring permissions. The command requires the "setattr" permission. // // When called with an empty keyType the command locks the keyring, preventing // any further keys from being linked to the keyring. // // The "asymmetric" keyType defines restrictions requiring key payloads to be // DER encoded X.509 certificates signed by keys in another keyring. Restrictions // for "asymmetric" include "builtin_trusted", "builtin_and_secondary_trusted", // "key_or_keyring:", and "key_or_keyring::chain". // // As of Linux 4.12, only the "asymmetric" keyType defines type-specific // restrictions. // // See the full documentation at: // http://man7.org/linux/man-pages/man3/keyctl_restrict_keyring.3.html // http://man7.org/linux/man-pages/man2/keyctl.2.html func KeyctlRestrictKeyring(ringid int, keyType string, restriction string) error { if keyType == "" { return keyctlRestrictKeyring(KEYCTL_RESTRICT_KEYRING, ringid) } return keyctlRestrictKeyringByType(KEYCTL_RESTRICT_KEYRING, ringid, keyType, restriction) } //sys keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) = SYS_KEYCTL //sys keyctlRestrictKeyring(cmd int, arg2 int) (err error) = SYS_KEYCTL func recvmsgRaw(fd int, iov []Iovec, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) { var msg Msghdr msg.Name = (*byte)(unsafe.Pointer(rsa)) msg.Namelen = uint32(SizeofSockaddrAny) var dummy byte if len(oob) > 0 { if emptyIovecs(iov) { var sockType int sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE) if err != nil { return } // receive at least one normal byte if sockType != SOCK_DGRAM { var iova [1]Iovec iova[0].Base = &dummy iova[0].SetLen(1) iov = iova[:] } } msg.Control = &oob[0] msg.SetControllen(len(oob)) } if len(iov) > 0 { msg.Iov = &iov[0] msg.SetIovlen(len(iov)) } if n, err = recvmsg(fd, &msg, flags); err != nil { return } oobn = int(msg.Controllen) recvflags = int(msg.Flags) return } func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) { var msg Msghdr msg.Name = (*byte)(ptr) msg.Namelen = uint32(salen) var dummy byte var empty bool if len(oob) > 0 { empty = emptyIovecs(iov) if empty { var sockType int sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE) if err != nil { return 0, err } // send at least one normal byte if sockType != SOCK_DGRAM { var iova [1]Iovec iova[0].Base = &dummy iova[0].SetLen(1) iov = iova[:] } } msg.Control = &oob[0] msg.SetControllen(len(oob)) } if len(iov) > 0 { msg.Iov = &iov[0] msg.SetIovlen(len(iov)) } if n, err = sendmsg(fd, &msg, flags); err != nil { return 0, err } if len(oob) > 0 && empty { 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) //sys ptracePtr(request int, pid int, addr uintptr, data unsafe.Pointer) (err error) = SYS_PTRACE 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 = ptracePtr(req, pid, addr-addr%SizeofPtr, 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 = ptracePtr(req, pid, addr+uintptr(n), 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 PtracePeekUser(pid int, addr uintptr, out []byte) (count int, err error) { return ptracePeek(PTRACE_PEEKUSR, 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 = ptracePtr(peekReq, pid, addr-addr%SizeofPtr, 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 = ptracePtr(peekReq, pid, addr+uintptr(n), 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 PtracePokeUser(pid int, addr uintptr, data []byte) (count int, err error) { return ptracePoke(PTRACE_POKEUSR, PTRACE_PEEKUSR, pid, addr, data) } // elfNT_PRSTATUS is a copy of the debug/elf.NT_PRSTATUS constant so // x/sys/unix doesn't need to depend on debug/elf and thus // compress/zlib, debug/dwarf, and other packages. const elfNT_PRSTATUS = 1 func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) { var iov Iovec iov.Base = (*byte)(unsafe.Pointer(regsout)) iov.SetLen(int(unsafe.Sizeof(*regsout))) return ptracePtr(PTRACE_GETREGSET, pid, uintptr(elfNT_PRSTATUS), unsafe.Pointer(&iov)) } func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) { var iov Iovec iov.Base = (*byte)(unsafe.Pointer(regs)) iov.SetLen(int(unsafe.Sizeof(*regs))) return ptracePtr(PTRACE_SETREGSET, pid, uintptr(elfNT_PRSTATUS), unsafe.Pointer(&iov)) } 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 = ptracePtr(PTRACE_GETEVENTMSG, pid, 0, 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 PtraceInterrupt(pid int) (err error) { return ptrace(PTRACE_INTERRUPT, pid, 0, 0) } func PtraceAttach(pid int) (err error) { return ptrace(PTRACE_ATTACH, pid, 0, 0) } func PtraceSeize(pid int) (err error) { return ptrace(PTRACE_SEIZE, 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 direntIno(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino)) } func direntReclen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) } func direntNamlen(buf []byte) (uint64, bool) { reclen, ok := direntReclen(buf) if !ok { return 0, false } return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true } //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) } //sys mountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr, size uintptr) (err error) = SYS_MOUNT_SETATTR // MountSetattr is a wrapper for mount_setattr(2). // https://man7.org/linux/man-pages/man2/mount_setattr.2.html // // Requires kernel >= 5.12. func MountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr) error { return mountSetattr(dirfd, pathname, flags, attr, unsafe.Sizeof(*attr)) } 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) } // Sendto // Recvfrom // Socketpair /* * Direct access */ //sys Acct(path string) (err error) //sys AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) //sys Adjtimex(buf *Timex) (state int, err error) //sysnb Capget(hdr *CapUserHeader, data *CapUserData) (err error) //sysnb Capset(hdr *CapUserHeader, data *CapUserData) (err error) //sys Chdir(path string) (err error) //sys Chroot(path string) (err error) //sys ClockAdjtime(clockid int32, buf *Timex) (state int, err error) //sys ClockGetres(clockid int32, res *Timespec) (err error) //sys ClockGettime(clockid int32, time *Timespec) (err error) //sys ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) //sys Close(fd int) (err error) //sys CloseRange(first uint, last uint, flags uint) (err error) //sys CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) //sys DeleteModule(name string, flags int) (err error) //sys Dup(oldfd int) (fd int, err error) func Dup2(oldfd, newfd int) error { return Dup3(oldfd, newfd, 0) } //sys Dup3(oldfd int, newfd int, flags int) (err error) //sysnb EpollCreate1(flag int) (fd int, err error) //sysnb EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) //sys Eventfd(initval uint, flags int) (fd int, err error) = SYS_EVENTFD2 //sys Exit(code int) = SYS_EXIT_GROUP //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 Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) //sys Fdatasync(fd int) (err error) //sys Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) //sys FinitModule(fd int, params string, flags int) (err error) //sys Flistxattr(fd int, dest []byte) (sz int, err error) //sys Flock(fd int, how int) (err error) //sys Fremovexattr(fd int, attr string) (err error) //sys Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) //sys Fsync(fd int) (err error) //sys Fsmount(fd int, flags int, mountAttrs int) (fsfd int, err error) //sys Fsopen(fsName string, flags int) (fd int, err error) //sys Fspick(dirfd int, pathName string, flags int) (fd int, err error) //sys fsconfig(fd int, cmd uint, key *byte, value *byte, aux int) (err error) func fsconfigCommon(fd int, cmd uint, key string, value *byte, aux int) (err error) { var keyp *byte if keyp, err = BytePtrFromString(key); err != nil { return } return fsconfig(fd, cmd, keyp, value, aux) } // FsconfigSetFlag is equivalent to fsconfig(2) called // with cmd == FSCONFIG_SET_FLAG. // // fd is the filesystem context to act upon. // key the parameter key to set. func FsconfigSetFlag(fd int, key string) (err error) { return fsconfigCommon(fd, FSCONFIG_SET_FLAG, key, nil, 0) } // FsconfigSetString is equivalent to fsconfig(2) called // with cmd == FSCONFIG_SET_STRING. // // fd is the filesystem context to act upon. // key the parameter key to set. // value is the parameter value to set. func FsconfigSetString(fd int, key string, value string) (err error) { var valuep *byte if valuep, err = BytePtrFromString(value); err != nil { return } return fsconfigCommon(fd, FSCONFIG_SET_STRING, key, valuep, 0) } // FsconfigSetBinary is equivalent to fsconfig(2) called // with cmd == FSCONFIG_SET_BINARY. // // fd is the filesystem context to act upon. // key the parameter key to set. // value is the parameter value to set. func FsconfigSetBinary(fd int, key string, value []byte) (err error) { if len(value) == 0 { return EINVAL } return fsconfigCommon(fd, FSCONFIG_SET_BINARY, key, &value[0], len(value)) } // FsconfigSetPath is equivalent to fsconfig(2) called // with cmd == FSCONFIG_SET_PATH. // // fd is the filesystem context to act upon. // key the parameter key to set. // path is a non-empty path for specified key. // atfd is a file descriptor at which to start lookup from or AT_FDCWD. func FsconfigSetPath(fd int, key string, path string, atfd int) (err error) { var valuep *byte if valuep, err = BytePtrFromString(path); err != nil { return } return fsconfigCommon(fd, FSCONFIG_SET_PATH, key, valuep, atfd) } // FsconfigSetPathEmpty is equivalent to fsconfig(2) called // with cmd == FSCONFIG_SET_PATH_EMPTY. The same as // FconfigSetPath but with AT_PATH_EMPTY implied. func FsconfigSetPathEmpty(fd int, key string, path string, atfd int) (err error) { var valuep *byte if valuep, err = BytePtrFromString(path); err != nil { return } return fsconfigCommon(fd, FSCONFIG_SET_PATH_EMPTY, key, valuep, atfd) } // FsconfigSetFd is equivalent to fsconfig(2) called // with cmd == FSCONFIG_SET_FD. // // fd is the filesystem context to act upon. // key the parameter key to set. // value is a file descriptor to be assigned to specified key. func FsconfigSetFd(fd int, key string, value int) (err error) { return fsconfigCommon(fd, FSCONFIG_SET_FD, key, nil, value) } // FsconfigCreate is equivalent to fsconfig(2) called // with cmd == FSCONFIG_CMD_CREATE. // // fd is the filesystem context to act upon. func FsconfigCreate(fd int) (err error) { return fsconfig(fd, FSCONFIG_CMD_CREATE, nil, nil, 0) } // FsconfigReconfigure is equivalent to fsconfig(2) called // with cmd == FSCONFIG_CMD_RECONFIGURE. // // fd is the filesystem context to act upon. func FsconfigReconfigure(fd int) (err error) { return fsconfig(fd, FSCONFIG_CMD_RECONFIGURE, nil, nil, 0) } //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) //sys Getrandom(buf []byte, flags int) (n int, err error) //sysnb Getrusage(who int, rusage *Rusage) (err error) //sysnb Getsid(pid int) (sid int, err error) //sysnb Gettid() (tid int) //sys Getxattr(path string, attr string, dest []byte) (sz int, err error) //sys InitModule(moduleImage []byte, params string) (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 Lgetxattr(path string, attr string, dest []byte) (sz int, err error) //sys Listxattr(path string, dest []byte) (sz int, err error) //sys Llistxattr(path string, dest []byte) (sz int, err error) //sys Lremovexattr(path string, attr string) (err error) //sys Lsetxattr(path string, attr string, data []byte, flags int) (err error) //sys MemfdCreate(name string, flags int) (fd 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 MoveMount(fromDirfd int, fromPathName string, toDirfd int, toPathName string, flags int) (err error) //sys Nanosleep(time *Timespec, leftover *Timespec) (err error) //sys OpenTree(dfd int, fileName string, flags uint) (r int, err error) //sys PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) //sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT //sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) //sys pselect6(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *sigset_argpack) (n int, err error) //sys read(fd int, p []byte) (n int, err error) //sys Removexattr(path string, attr string) (err error) //sys Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) //sys RequestKey(keyType string, description string, callback string, destRingid int) (id int, 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) //sys Setns(fd int, nstype int) (err error) //go:linkname syscall_prlimit syscall.prlimit func syscall_prlimit(pid, resource int, newlimit, old *syscall.Rlimit) error func Prlimit(pid, resource int, newlimit, old *Rlimit) error { // Just call the syscall version, because as of Go 1.21 // it will affect starting a new process. return syscall_prlimit(pid, resource, (*syscall.Rlimit)(newlimit), (*syscall.Rlimit)(old)) } // PrctlRetInt performs a prctl operation specified by option and further // optional arguments arg2 through arg5 depending on option. It returns a // non-negative integer that is returned by the prctl syscall. func PrctlRetInt(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (int, error) { ret, _, err := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) if err != 0 { return 0, err } return int(ret), nil } func Setuid(uid int) (err error) { return syscall.Setuid(uid) } func Setgid(gid int) (err error) { return syscall.Setgid(gid) } func Setreuid(ruid, euid int) (err error) { return syscall.Setreuid(ruid, euid) } func Setregid(rgid, egid int) (err error) { return syscall.Setregid(rgid, egid) } func Setresuid(ruid, euid, suid int) (err error) { return syscall.Setresuid(ruid, euid, suid) } func Setresgid(rgid, egid, sgid int) (err error) { return syscall.Setresgid(rgid, egid, sgid) } // SetfsgidRetGid sets fsgid for current thread and returns previous fsgid set. // setfsgid(2) will return a non-nil error only if its caller lacks CAP_SETUID capability. // If the call fails due to other reasons, current fsgid will be returned. func SetfsgidRetGid(gid int) (int, error) { return setfsgid(gid) } // SetfsuidRetUid sets fsuid for current thread and returns previous fsuid set. // setfsgid(2) will return a non-nil error only if its caller lacks CAP_SETUID capability // If the call fails due to other reasons, current fsuid will be returned. func SetfsuidRetUid(uid int) (int, error) { return setfsuid(uid) } func Setfsgid(gid int) error { _, err := setfsgid(gid) return err } func Setfsuid(uid int) error { _, err := setfsuid(uid) return err } func Signalfd(fd int, sigmask *Sigset_t, flags int) (newfd int, err error) { return signalfd(fd, sigmask, _C__NSIG/8, flags) } //sys Setpriority(which int, who int, prio int) (err error) //sys Setxattr(path string, attr string, data []byte, flags int) (err error) //sys signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) = SYS_SIGNALFD4 //sys Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) //sys Sync() //sys Syncfs(fd int) (err error) //sysnb Sysinfo(info *Sysinfo_t) (err error) //sys Tee(rfd int, wfd int, len int, flags int) (n int64, err error) //sysnb TimerfdCreate(clockid int, flags int) (fd int, err error) //sysnb TimerfdGettime(fd int, currValue *ItimerSpec) (err error) //sysnb TimerfdSettime(fd int, flags int, newValue *ItimerSpec, oldValue *ItimerSpec) (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 write(fd int, p []byte) (n int, err error) //sys exitThread(code int) (err error) = SYS_EXIT //sys readv(fd int, iovs []Iovec) (n int, err error) = SYS_READV //sys writev(fd int, iovs []Iovec) (n int, err error) = SYS_WRITEV //sys preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) = SYS_PREADV //sys pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) = SYS_PWRITEV //sys preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) = SYS_PREADV2 //sys pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) = SYS_PWRITEV2 // minIovec is the size of the small initial allocation used by // Readv, Writev, etc. // // This small allocation gets stack allocated, which lets the // common use case of len(iovs) <= minIovs avoid more expensive // heap allocations. const minIovec = 8 // appendBytes converts bs to Iovecs and appends them to vecs. func appendBytes(vecs []Iovec, bs [][]byte) []Iovec { for _, b := range bs { var v Iovec v.SetLen(len(b)) if len(b) > 0 { v.Base = &b[0] } else { v.Base = (*byte)(unsafe.Pointer(&_zero)) } vecs = append(vecs, v) } return vecs } // offs2lohi splits offs into its low and high order bits. func offs2lohi(offs int64) (lo, hi uintptr) { const longBits = SizeofLong * 8 return uintptr(offs), uintptr(uint64(offs) >> (longBits - 1) >> 1) // two shifts to avoid false positive in vet } func Readv(fd int, iovs [][]byte) (n int, err error) { iovecs := make([]Iovec, 0, minIovec) iovecs = appendBytes(iovecs, iovs) n, err = readv(fd, iovecs) readvRacedetect(iovecs, n, err) return n, err } func Preadv(fd int, iovs [][]byte, offset int64) (n int, err error) { iovecs := make([]Iovec, 0, minIovec) iovecs = appendBytes(iovecs, iovs) lo, hi := offs2lohi(offset) n, err = preadv(fd, iovecs, lo, hi) readvRacedetect(iovecs, n, err) return n, err } func Preadv2(fd int, iovs [][]byte, offset int64, flags int) (n int, err error) { iovecs := make([]Iovec, 0, minIovec) iovecs = appendBytes(iovecs, iovs) lo, hi := offs2lohi(offset) n, err = preadv2(fd, iovecs, lo, hi, flags) readvRacedetect(iovecs, n, err) return n, err } func readvRacedetect(iovecs []Iovec, n int, err error) { if !raceenabled { return } for i := 0; n > 0 && i < len(iovecs); i++ { m := int(iovecs[i].Len) if m > n { m = n } n -= m if m > 0 { raceWriteRange(unsafe.Pointer(iovecs[i].Base), m) } } if err == nil { raceAcquire(unsafe.Pointer(&ioSync)) } } func Writev(fd int, iovs [][]byte) (n int, err error) { iovecs := make([]Iovec, 0, minIovec) iovecs = appendBytes(iovecs, iovs) if raceenabled { raceReleaseMerge(unsafe.Pointer(&ioSync)) } n, err = writev(fd, iovecs) writevRacedetect(iovecs, n) return n, err } func Pwritev(fd int, iovs [][]byte, offset int64) (n int, err error) { iovecs := make([]Iovec, 0, minIovec) iovecs = appendBytes(iovecs, iovs) if raceenabled { raceReleaseMerge(unsafe.Pointer(&ioSync)) } lo, hi := offs2lohi(offset) n, err = pwritev(fd, iovecs, lo, hi) writevRacedetect(iovecs, n) return n, err } func Pwritev2(fd int, iovs [][]byte, offset int64, flags int) (n int, err error) { iovecs := make([]Iovec, 0, minIovec) iovecs = appendBytes(iovecs, iovs) if raceenabled { raceReleaseMerge(unsafe.Pointer(&ioSync)) } lo, hi := offs2lohi(offset) n, err = pwritev2(fd, iovecs, lo, hi, flags) writevRacedetect(iovecs, n) return n, err } func writevRacedetect(iovecs []Iovec, n int) { if !raceenabled { return } for i := 0; n > 0 && i < len(iovecs); i++ { m := int(iovecs[i].Len) if m > n { m = n } n -= m if m > 0 { raceReadRange(unsafe.Pointer(iovecs[i].Base), m) } } } // mmap varies by architecture; see syscall_linux_*.go. //sys munmap(addr uintptr, length uintptr) (err error) //sys mremap(oldaddr uintptr, oldlength uintptr, newlength uintptr, flags int, newaddr uintptr) (xaddr uintptr, err error) //sys Madvise(b []byte, advice int) (err error) //sys Mprotect(b []byte, prot int) (err error) //sys Mlock(b []byte) (err error) //sys Mlockall(flags int) (err error) //sys Msync(b []byte, flags int) (err error) //sys Munlock(b []byte) (err error) //sys Munlockall() (err error) const ( mremapFixed = MREMAP_FIXED mremapDontunmap = MREMAP_DONTUNMAP mremapMaymove = MREMAP_MAYMOVE ) // Vmsplice splices user pages from a slice of Iovecs into a pipe specified by fd, // using the specified flags. func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) { var p unsafe.Pointer if len(iovs) > 0 { p = unsafe.Pointer(&iovs[0]) } n, _, errno := Syscall6(SYS_VMSPLICE, uintptr(fd), uintptr(p), uintptr(len(iovs)), uintptr(flags), 0, 0) if errno != 0 { return 0, syscall.Errno(errno) } return int(n), nil } func isGroupMember(gid int) bool { groups, err := Getgroups() if err != nil { return false } for _, g := range groups { if g == gid { return true } } return false } func isCapDacOverrideSet() bool { hdr := CapUserHeader{Version: LINUX_CAPABILITY_VERSION_3} data := [2]CapUserData{} err := Capget(&hdr, &data[0]) return err == nil && data[0].Effective&(1<> 6) & 7 } else { var gid int if flags&AT_EACCESS != 0 { gid = Getegid() } else { gid = Getgid() } if uint32(gid) == st.Gid || isGroupMember(int(st.Gid)) { fmode = (st.Mode >> 3) & 7 } else { fmode = st.Mode & 7 } } if fmode&mode == mode { return nil } return EACCES } //sys nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) = SYS_NAME_TO_HANDLE_AT //sys openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) = SYS_OPEN_BY_HANDLE_AT // fileHandle is the argument to nameToHandleAt and openByHandleAt. We // originally tried to generate it via unix/linux/types.go with "type // fileHandle C.struct_file_handle" but that generated empty structs // for mips64 and mips64le. Instead, hard code it for now (it's the // same everywhere else) until the mips64 generator issue is fixed. type fileHandle struct { Bytes uint32 Type int32 } // FileHandle represents the C struct file_handle used by // name_to_handle_at (see NameToHandleAt) and open_by_handle_at (see // OpenByHandleAt). type FileHandle struct { *fileHandle } // NewFileHandle constructs a FileHandle. func NewFileHandle(handleType int32, handle []byte) FileHandle { const hdrSize = unsafe.Sizeof(fileHandle{}) buf := make([]byte, hdrSize+uintptr(len(handle))) copy(buf[hdrSize:], handle) fh := (*fileHandle)(unsafe.Pointer(&buf[0])) fh.Type = handleType fh.Bytes = uint32(len(handle)) return FileHandle{fh} } func (fh *FileHandle) Size() int { return int(fh.fileHandle.Bytes) } func (fh *FileHandle) Type() int32 { return fh.fileHandle.Type } func (fh *FileHandle) Bytes() []byte { n := fh.Size() if n == 0 { return nil } return unsafe.Slice((*byte)(unsafe.Pointer(uintptr(unsafe.Pointer(&fh.fileHandle.Type))+4)), n) } // NameToHandleAt wraps the name_to_handle_at system call; it obtains // a handle for a path name. func NameToHandleAt(dirfd int, path string, flags int) (handle FileHandle, mountID int, err error) { var mid _C_int // Try first with a small buffer, assuming the handle will // only be 32 bytes. size := uint32(32 + unsafe.Sizeof(fileHandle{})) didResize := false for { buf := make([]byte, size) fh := (*fileHandle)(unsafe.Pointer(&buf[0])) fh.Bytes = size - uint32(unsafe.Sizeof(fileHandle{})) err = nameToHandleAt(dirfd, path, fh, &mid, flags) if err == EOVERFLOW { if didResize { // We shouldn't need to resize more than once return } didResize = true size = fh.Bytes + uint32(unsafe.Sizeof(fileHandle{})) continue } if err != nil { return } return FileHandle{fh}, int(mid), nil } } // OpenByHandleAt wraps the open_by_handle_at system call; it opens a // file via a handle as previously returned by NameToHandleAt. func OpenByHandleAt(mountFD int, handle FileHandle, flags int) (fd int, err error) { return openByHandleAt(mountFD, handle.fileHandle, flags) } // Klogset wraps the sys_syslog system call; it sets console_loglevel to // the value specified by arg and passes a dummy pointer to bufp. func Klogset(typ int, arg int) (err error) { var p unsafe.Pointer _, _, errno := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(p), uintptr(arg)) if errno != 0 { return errnoErr(errno) } return nil } // RemoteIovec is Iovec with the pointer replaced with an integer. // It is used for ProcessVMReadv and ProcessVMWritev, where the pointer // refers to a location in a different process' address space, which // would confuse the Go garbage collector. type RemoteIovec struct { Base uintptr Len int } //sys ProcessVMReadv(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_READV //sys ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_WRITEV //sys PidfdOpen(pid int, flags int) (fd int, err error) = SYS_PIDFD_OPEN //sys PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) = SYS_PIDFD_GETFD //sys PidfdSendSignal(pidfd int, sig Signal, info *Siginfo, flags int) (err error) = SYS_PIDFD_SEND_SIGNAL //sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error) //sys shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) //sys shmdt(addr uintptr) (err error) //sys shmget(key int, size int, flag int) (id int, err error) //sys getitimer(which int, currValue *Itimerval) (err error) //sys setitimer(which int, newValue *Itimerval, oldValue *Itimerval) (err error) // MakeItimerval creates an Itimerval from interval and value durations. func MakeItimerval(interval, value time.Duration) Itimerval { return Itimerval{ Interval: NsecToTimeval(interval.Nanoseconds()), Value: NsecToTimeval(value.Nanoseconds()), } } // A value which may be passed to the which parameter for Getitimer and // Setitimer. type ItimerWhich int // Possible which values for Getitimer and Setitimer. const ( ItimerReal ItimerWhich = ITIMER_REAL ItimerVirtual ItimerWhich = ITIMER_VIRTUAL ItimerProf ItimerWhich = ITIMER_PROF ) // Getitimer wraps getitimer(2) to return the current value of the timer // specified by which. func Getitimer(which ItimerWhich) (Itimerval, error) { var it Itimerval if err := getitimer(int(which), &it); err != nil { return Itimerval{}, err } return it, nil } // Setitimer wraps setitimer(2) to arm or disarm the timer specified by which. // It returns the previous value of the timer. // // If the Itimerval argument is the zero value, the timer will be disarmed. func Setitimer(which ItimerWhich, it Itimerval) (Itimerval, error) { var prev Itimerval if err := setitimer(int(which), &it, &prev); err != nil { return Itimerval{}, err } return prev, nil } //sysnb rtSigprocmask(how int, set *Sigset_t, oldset *Sigset_t, sigsetsize uintptr) (err error) = SYS_RT_SIGPROCMASK func PthreadSigmask(how int, set, oldset *Sigset_t) error { if oldset != nil { // Explicitly clear in case Sigset_t is larger than _C__NSIG. *oldset = Sigset_t{} } return rtSigprocmask(how, set, oldset, _C__NSIG/8) } //sysnb getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) //sysnb getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) func Getresuid() (ruid, euid, suid int) { var r, e, s _C_int getresuid(&r, &e, &s) return int(r), int(e), int(s) } func Getresgid() (rgid, egid, sgid int) { var r, e, s _C_int getresgid(&r, &e, &s) return int(r), int(e), int(s) } // Pselect is a wrapper around the Linux pselect6 system call. // This version does not modify the timeout argument. func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { // Per https://man7.org/linux/man-pages/man2/select.2.html#NOTES, // The Linux pselect6() system call modifies its timeout argument. // [Not modifying the argument] is the behavior required by POSIX.1-2001. var mutableTimeout *Timespec if timeout != nil { mutableTimeout = new(Timespec) *mutableTimeout = *timeout } // The final argument of the pselect6() system call is not a // sigset_t * pointer, but is instead a structure var kernelMask *sigset_argpack if sigmask != nil { wordBits := 32 << (^uintptr(0) >> 63) // see math.intSize // A sigset stores one bit per signal, // offset by 1 (because signal 0 does not exist). // So the number of words needed is ⌈__C_NSIG - 1 / wordBits⌉. sigsetWords := (_C__NSIG - 1 + wordBits - 1) / (wordBits) sigsetBytes := uintptr(sigsetWords * (wordBits / 8)) kernelMask = &sigset_argpack{ ss: sigmask, ssLen: sigsetBytes, } } return pselect6(nfd, r, w, e, mutableTimeout, kernelMask) } //sys schedSetattr(pid int, attr *SchedAttr, flags uint) (err error) //sys schedGetattr(pid int, attr *SchedAttr, size uint, flags uint) (err error) // SchedSetAttr is a wrapper for sched_setattr(2) syscall. // https://man7.org/linux/man-pages/man2/sched_setattr.2.html func SchedSetAttr(pid int, attr *SchedAttr, flags uint) error { if attr == nil { return EINVAL } attr.Size = SizeofSchedAttr return schedSetattr(pid, attr, flags) } // SchedGetAttr is a wrapper for sched_getattr(2) syscall. // https://man7.org/linux/man-pages/man2/sched_getattr.2.html func SchedGetAttr(pid int, flags uint) (*SchedAttr, error) { attr := &SchedAttr{} if err := schedGetattr(pid, attr, SizeofSchedAttr, flags); err != nil { return nil, err } return attr, nil } //sys Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error) //sys Mseal(b []byte, flags uint) (err error) ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_linux_386.go ================================================ // 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. //go:build 386 && linux package unix import ( "unsafe" ) func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: int32(sec), Nsec: int32(nsec)} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: int32(sec), Usec: int32(usec)} } // 64-bit file system and 32-bit uid calls // (386 default is 32-bit file system and 16-bit uid). //sys EpollWait(epfd int, events []EpollEvent, msec int) (n 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 Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64 //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 //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 Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64 //sys setfsgid(gid int) (prev int, err error) = SYS_SETFSGID32 //sys setfsuid(uid int) (prev int, err error) = SYS_SETFSUID32 //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 //sys Ustat(dev int, ubuf *Ustat_t) (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 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) //sys Pause() (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 } 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 futimesat(dirfd int, path string, times *[2]Timeval) (err error) //sysnb Gettimeofday(tv *Timeval) (err error) //sysnb Time(t *Time_t) (tt Time_t, err error) //sys Utime(path string, buf *Utimbuf) (err error) //sys utimes(path string, times *[2]Timeval) (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 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 (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = uint32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) { rsa.Service_name_len = uint32(length) } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_linux_alarm.go ================================================ // Copyright 2022 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64) package unix // SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH // values. //sys Alarm(seconds uint) (remaining uint, err error) ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_linux_amd64.go ================================================ // 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. //go:build amd64 && linux package unix //sys EpollWait(epfd int, events []EpollEvent, msec int) (n 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 Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_NEWFSTATAT //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 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) func Lstat(path string, stat *Stat_t) (err error) { return Fstatat(AT_FDCWD, path, stat, AT_SYMLINK_NOFOLLOW) } //sys MemfdSecret(flags int) (fd int, err error) //sys Pause() (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 Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { var ts *Timespec if timeout != nil { ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000} } return pselect6(nfd, r, w, e, ts, nil) } //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys setfsgid(gid int) (prev int, err error) //sys setfsuid(uid int) (prev 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) { // Use fstatat, because Android's seccomp policy blocks stat. return Fstatat(AT_FDCWD, path, stat, 0) } //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 Ustat(dev int, ubuf *Ustat_t) (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) //sys futimesat(dirfd int, path string, times *[2]Timeval) (err error) func Gettimeofday(tv *Timeval) (err error) { errno := gettimeofday(tv) if errno != 0 { return errno } return nil } 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 } //sys Utime(path string, buf *Utimbuf) (err error) //sys utimes(path string, times *[2]Timeval) (err error) func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: usec} } 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 (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = uint64(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint64(length) } func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) { rsa.Service_name_len = uint64(length) } //sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error { cmdlineLen := len(cmdline) if cmdlineLen > 0 { // Account for the additional NULL byte added by // BytePtrFromString in kexecFileLoad. The kexec_file_load // syscall expects a NULL-terminated string. cmdlineLen++ } return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags) } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go ================================================ // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build amd64 && linux && gc package unix import "syscall" //go:noescape func gettimeofday(tv *Timeval) (err syscall.Errno) ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_linux_arm.go ================================================ // 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. //go:build arm && linux package unix import ( "unsafe" ) func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: int32(sec), Nsec: int32(nsec)} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: int32(sec), Usec: int32(usec)} } 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 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 EpollWait(epfd int, events []EpollEvent, msec int) (n 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 //sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64 //sysnb Getegid() (egid int) = SYS_GETEGID32 //sysnb Geteuid() (euid int) = SYS_GETEUID32 //sysnb Getgid() (gid int) = SYS_GETGID32 //sysnb Getuid() (uid int) = SYS_GETUID32 //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 Pause() (err error) //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //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) (prev int, err error) = SYS_SETFSGID32 //sys setfsuid(uid int) (prev int, err error) = SYS_SETFSUID32 //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 //sys Ustat(dev int, ubuf *Ustat_t) (err error) //sys futimesat(dirfd int, path string, times *[2]Timeval) (err error) //sysnb Gettimeofday(tv *Timeval) (err error) func Time(t *Time_t) (Time_t, error) { var tv Timeval err := Gettimeofday(&tv) if err != nil { return 0, err } if t != nil { *t = Time_t(tv.Sec) } return Time_t(tv.Sec), nil } func Utime(path string, buf *Utimbuf) error { tv := []Timeval{ {Sec: buf.Actime}, {Sec: buf.Modtime}, } return Utimes(path, tv) } //sys utimes(path string, times *[2]Timeval) (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_UGETRLIMIT 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 } 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 (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = uint32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) { rsa.Service_name_len = uint32(length) } //sys armSyncFileRange(fd int, flags int, off int64, n int64) (err error) = SYS_ARM_SYNC_FILE_RANGE func SyncFileRange(fd int, off int64, n int64, flags int) error { // The sync_file_range and arm_sync_file_range syscalls differ only in the // order of their arguments. return armSyncFileRange(fd, flags, off, n) } //sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error { cmdlineLen := len(cmdline) if cmdlineLen > 0 { // Account for the additional NULL byte added by // BytePtrFromString in kexecFileLoad. The kexec_file_load // syscall expects a NULL-terminated string. cmdlineLen++ } return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags) } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_linux_arm64.go ================================================ // 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. //go:build arm64 && linux package unix import "unsafe" //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT //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 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 MemfdSecret(flags int) (fd 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 Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { var ts *Timespec if timeout != nil { ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000} } return pselect6(nfd, r, w, e, ts, nil) } //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys setfsgid(gid int) (prev int, err error) //sys setfsuid(uid int) (prev 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) func Ustat(dev int, ubuf *Ustat_t) (err error) { return ENOSYS } //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) //sysnb Gettimeofday(tv *Timeval) (err error) func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: usec} } func futimesat(dirfd int, path string, tv *[2]Timeval) (err error) { if tv == nil { return utimensat(dirfd, path, nil, 0) } ts := []Timespec{ NsecToTimespec(TimevalToNsec(tv[0])), NsecToTimespec(TimevalToNsec(tv[1])), } return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0) } func Time(t *Time_t) (Time_t, error) { var tv Timeval err := Gettimeofday(&tv) if err != nil { return 0, err } if t != nil { *t = Time_t(tv.Sec) } return Time_t(tv.Sec), nil } func Utime(path string, buf *Utimbuf) error { tv := []Timeval{ {Sec: buf.Actime}, {Sec: buf.Modtime}, } return Utimes(path, tv) } func utimes(path string, tv *[2]Timeval) (err error) { if tv == nil { return utimensat(AT_FDCWD, path, nil, 0) } ts := []Timespec{ NsecToTimespec(TimevalToNsec(tv[0])), NsecToTimespec(TimevalToNsec(tv[1])), } return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0) } // Getrlimit prefers the prlimit64 system call. See issue 38604. func Getrlimit(resource int, rlim *Rlimit) error { err := Prlimit(0, resource, nil, rlim) if err != ENOSYS { return err } return getrlimit(resource, rlim) } 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 (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = uint64(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint64(length) } func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) { rsa.Service_name_len = uint64(length) } func Pause() error { _, err := ppoll(nil, 0, nil, nil) return err } //sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error { cmdlineLen := len(cmdline) if cmdlineLen > 0 { // Account for the additional NULL byte added by // BytePtrFromString in kexecFileLoad. The kexec_file_load // syscall expects a NULL-terminated string. cmdlineLen++ } return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags) } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_linux_gc.go ================================================ // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build linux && gc package unix // SyscallNoError may be used instead of Syscall for syscalls that don't fail. func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't // fail. func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go ================================================ // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build linux && gc && 386 package unix import "syscall" // 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 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) ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go ================================================ // 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. //go:build arm && gc && linux package unix import "syscall" // 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) ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go ================================================ // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build linux && gccgo && 386 package unix import ( "syscall" "unsafe" ) func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { var newoffset int64 offsetLow := uint32(offset & 0xffffffff) offsetHigh := uint32((offset >> 32) & 0xffffffff) _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) return newoffset, err } func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) return int(fd), err } func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) return int(fd), err } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go ================================================ // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build linux && gccgo && arm package unix import ( "syscall" "unsafe" ) func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { var newoffset int64 offsetLow := uint32(offset & 0xffffffff) offsetHigh := uint32((offset >> 32) & 0xffffffff) _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) return newoffset, err } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_linux_loong64.go ================================================ // Copyright 2022 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build loong64 && linux package unix import "unsafe" //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT //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 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 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 func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { var ts *Timespec if timeout != nil { ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000} } return pselect6(nfd, r, w, e, ts, nil) } //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys setfsgid(gid int) (prev int, err error) //sys setfsuid(uid int) (prev 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 timespecFromStatxTimestamp(x StatxTimestamp) Timespec { return Timespec{ Sec: x.Sec, Nsec: int64(x.Nsec), } } func Fstatat(fd int, path string, stat *Stat_t, flags int) error { var r Statx_t // Do it the glibc way, add AT_NO_AUTOMOUNT. if err := Statx(fd, path, AT_NO_AUTOMOUNT|flags, STATX_BASIC_STATS, &r); err != nil { return err } stat.Dev = Mkdev(r.Dev_major, r.Dev_minor) stat.Ino = r.Ino stat.Mode = uint32(r.Mode) stat.Nlink = r.Nlink stat.Uid = r.Uid stat.Gid = r.Gid stat.Rdev = Mkdev(r.Rdev_major, r.Rdev_minor) // hope we don't get to process files so large to overflow these size // fields... stat.Size = int64(r.Size) stat.Blksize = int32(r.Blksize) stat.Blocks = int64(r.Blocks) stat.Atim = timespecFromStatxTimestamp(r.Atime) stat.Mtim = timespecFromStatxTimestamp(r.Mtime) stat.Ctim = timespecFromStatxTimestamp(r.Ctime) return nil } func Fstat(fd int, stat *Stat_t) (err error) { return Fstatat(fd, "", stat, AT_EMPTY_PATH) } 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) func Ustat(dev int, ubuf *Ustat_t) (err error) { return ENOSYS } //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) //sysnb Gettimeofday(tv *Timeval) (err error) func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: usec} } func Getrlimit(resource int, rlim *Rlimit) (err error) { err = Prlimit(0, resource, nil, rlim) return } func futimesat(dirfd int, path string, tv *[2]Timeval) (err error) { if tv == nil { return utimensat(dirfd, path, nil, 0) } ts := []Timespec{ NsecToTimespec(TimevalToNsec(tv[0])), NsecToTimespec(TimevalToNsec(tv[1])), } return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0) } func Time(t *Time_t) (Time_t, error) { var tv Timeval err := Gettimeofday(&tv) if err != nil { return 0, err } if t != nil { *t = Time_t(tv.Sec) } return Time_t(tv.Sec), nil } func Utime(path string, buf *Utimbuf) error { tv := []Timeval{ {Sec: buf.Actime}, {Sec: buf.Modtime}, } return Utimes(path, tv) } func utimes(path string, tv *[2]Timeval) (err error) { if tv == nil { return utimensat(AT_FDCWD, path, nil, 0) } ts := []Timespec{ NsecToTimespec(TimevalToNsec(tv[0])), NsecToTimespec(TimevalToNsec(tv[1])), } return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0) } func (r *PtraceRegs) PC() uint64 { return r.Era } func (r *PtraceRegs) SetPC(era uint64) { r.Era = era } func (iov *Iovec) SetLen(length int) { iov.Len = uint64(length) } func (msghdr *Msghdr) SetControllen(length int) { msghdr.Controllen = uint64(length) } func (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = uint64(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint64(length) } func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) { rsa.Service_name_len = uint64(length) } func Pause() error { _, err := ppoll(nil, 0, nil, nil) return err } func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { return Renameat2(olddirfd, oldpath, newdirfd, newpath, 0) } //sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error { cmdlineLen := len(cmdline) if cmdlineLen > 0 { // Account for the additional NULL byte added by // BytePtrFromString in kexecFileLoad. The kexec_file_load // syscall expects a NULL-terminated string. cmdlineLen++ } return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags) } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go ================================================ // 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. //go:build linux && (mips64 || mips64le) package unix //sys EpollWait(epfd int, events []EpollEvent, msec int) (n 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 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 Lchown(path string, uid int, gid int) (err error) //sys Listen(s int, n int) (err error) //sys Pause() (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 Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { var ts *Timespec if timeout != nil { ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000} } return pselect6(nfd, r, w, e, ts, nil) } //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys setfsgid(gid int) (prev int, err error) //sys setfsuid(uid int) (prev 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 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 Ustat(dev int, ubuf *Ustat_t) (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) //sys futimesat(dirfd int, path string, times *[2]Timeval) (err error) //sysnb Gettimeofday(tv *Timeval) (err error) func Time(t *Time_t) (tt Time_t, err error) { var tv Timeval err = Gettimeofday(&tv) if err != nil { return 0, err } if t != nil { *t = Time_t(tv.Sec) } return Time_t(tv.Sec), nil } //sys Utime(path string, buf *Utimbuf) (err error) //sys utimes(path string, times *[2]Timeval) (err error) func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: usec} } func Ioperm(from int, num int, on int) (err error) { return ENOSYS } func Iopl(level int) (err error) { return ENOSYS } type stat_t struct { Dev uint32 Pad0 [3]int32 Ino uint64 Mode uint32 Nlink uint32 Uid uint32 Gid uint32 Rdev uint32 Pad1 [3]uint32 Size int64 Atime uint32 Atime_nsec uint32 Mtime uint32 Mtime_nsec uint32 Ctime uint32 Ctime_nsec uint32 Blksize uint32 Pad2 uint32 Blocks int64 } //sys fstat(fd int, st *stat_t) (err error) //sys fstatat(dirfd int, path string, st *stat_t, flags int) (err error) = SYS_NEWFSTATAT //sys lstat(path string, st *stat_t) (err error) //sys stat(path string, st *stat_t) (err error) func Fstat(fd int, s *Stat_t) (err error) { st := &stat_t{} err = fstat(fd, st) fillStat_t(s, st) return } func Fstatat(dirfd int, path string, s *Stat_t, flags int) (err error) { st := &stat_t{} err = fstatat(dirfd, path, st, flags) fillStat_t(s, st) return } func Lstat(path string, s *Stat_t) (err error) { st := &stat_t{} err = lstat(path, st) fillStat_t(s, st) return } func Stat(path string, s *Stat_t) (err error) { st := &stat_t{} err = stat(path, st) fillStat_t(s, st) return } func fillStat_t(s *Stat_t, st *stat_t) { s.Dev = st.Dev s.Ino = st.Ino s.Mode = st.Mode s.Nlink = st.Nlink s.Uid = st.Uid s.Gid = st.Gid s.Rdev = st.Rdev s.Size = st.Size s.Atim = Timespec{int64(st.Atime), int64(st.Atime_nsec)} s.Mtim = Timespec{int64(st.Mtime), int64(st.Mtime_nsec)} s.Ctim = Timespec{int64(st.Ctime), int64(st.Ctime_nsec)} s.Blksize = st.Blksize s.Blocks = st.Blocks } func (r *PtraceRegs) PC() uint64 { return r.Epc } func (r *PtraceRegs) SetPC(pc uint64) { r.Epc = pc } func (iov *Iovec) SetLen(length int) { iov.Len = uint64(length) } func (msghdr *Msghdr) SetControllen(length int) { msghdr.Controllen = uint64(length) } func (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = uint64(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint64(length) } func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) { rsa.Service_name_len = uint64(length) } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go ================================================ // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build linux && (mips || mipsle) package unix import ( "syscall" "unsafe" ) func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) //sys EpollWait(epfd int, events []EpollEvent, msec int) (n 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 Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64 //sysnb Getegid() (egid int) //sysnb Geteuid() (euid int) //sysnb Getgid() (gid int) //sysnb Getuid() (uid int) //sys Lchown(path string, uid int, gid int) (err error) //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 Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64 //sys setfsgid(gid int) (prev int, err error) //sys setfsuid(uid int) (prev 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 int, err error) //sys SyncFileRange(fd int, off int64, n int64, flags int) (err error) //sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64 //sys Ustat(dev int, ubuf *Ustat_t) (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 Ioperm(from int, num int, on int) (err error) //sys Iopl(level int) (err error) //sys futimesat(dirfd int, path string, times *[2]Timeval) (err error) //sysnb Gettimeofday(tv *Timeval) (err error) //sysnb Time(t *Time_t) (tt Time_t, err error) //sys Utime(path string, buf *Utimbuf) (err error) //sys utimes(path string, times *[2]Timeval) (err error) //sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64 //sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64 //sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64 //sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64 //sys Pause() (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 = errnoErr(e) } return } func Statfs(path string, buf *Statfs_t) (err error) { p, err := BytePtrFromString(path) if err != nil { return err } _, _, e := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(p)), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf))) if e != 0 { err = errnoErr(e) } return } func Seek(fd int, offset int64, whence int) (off int64, err error) { _, _, e := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offset>>32), uintptr(offset), uintptr(unsafe.Pointer(&off)), uintptr(whence), 0) if e != 0 { err = errnoErr(e) } return } func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: int32(sec), Nsec: int32(nsec)} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: int32(sec), Usec: int32(usec)} } //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) } const rlimInf32 = ^uint32(0) const rlimInf64 = ^uint64(0) type rlimit32 struct { Cur uint32 Max uint32 } //sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT 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 } func (r *PtraceRegs) PC() uint64 { return r.Epc } func (r *PtraceRegs) SetPC(pc uint64) { r.Epc = pc } func (iov *Iovec) SetLen(length int) { iov.Len = uint32(length) } func (msghdr *Msghdr) SetControllen(length int) { msghdr.Controllen = uint32(length) } func (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = uint32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) { rsa.Service_name_len = uint32(length) } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_linux_ppc.go ================================================ // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build linux && ppc package unix import ( "syscall" "unsafe" ) //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) //sys Fchown(fd int, uid int, gid int) (err error) //sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64 //sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64 //sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64 //sysnb Getegid() (egid int) //sysnb Geteuid() (euid int) //sysnb Getgid() (gid int) //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_LSTAT64 //sys Pause() (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 Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64 //sys setfsgid(gid int) (prev int, err error) //sys setfsuid(uid int) (prev 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 int, err error) //sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64 //sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64 //sys Ustat(dev int, ubuf *Ustat_t) (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 futimesat(dirfd int, path string, times *[2]Timeval) (err error) //sysnb Gettimeofday(tv *Timeval) (err error) //sysnb Time(t *Time_t) (tt Time_t, err error) //sys Utime(path string, buf *Utimbuf) (err error) //sys utimes(path string, times *[2]Timeval) (err error) func Fadvise(fd int, offset int64, length int64, advice int) (err error) { _, _, e1 := Syscall6(SYS_FADVISE64_64, uintptr(fd), uintptr(advice), uintptr(offset>>32), uintptr(offset), uintptr(length>>32), uintptr(length)) if e1 != 0 { err = errnoErr(e1) } return } func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { var newoffset int64 offsetLow := uint32(offset & 0xffffffff) offsetHigh := uint32((offset >> 32) & 0xffffffff) _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) return newoffset, err } 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 } 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 } //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) } func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: int32(sec), Nsec: int32(nsec)} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: int32(sec), Usec: int32(usec)} } type rlimit32 struct { Cur uint32 Max uint32 } //sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_UGETRLIMIT 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 } func (r *PtraceRegs) PC() uint32 { return r.Nip } func (r *PtraceRegs) SetPC(pc uint32) { r.Nip = pc } func (iov *Iovec) SetLen(length int) { iov.Len = uint32(length) } func (msghdr *Msghdr) SetControllen(length int) { msghdr.Controllen = uint32(length) } func (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = uint32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) { rsa.Service_name_len = uint32(length) } //sys syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2 func SyncFileRange(fd int, off int64, n int64, flags int) error { // The sync_file_range and sync_file_range2 syscalls differ only in the // order of their arguments. return syncFileRange2(fd, flags, off, n) } //sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error { cmdlineLen := len(cmdline) if cmdlineLen > 0 { // Account for the additional NULL byte added by // BytePtrFromString in kexecFileLoad. The kexec_file_load // syscall expects a NULL-terminated string. cmdlineLen++ } return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags) } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go ================================================ // 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. //go:build linux && (ppc64 || ppc64le) package unix //sys EpollWait(epfd int, events []EpollEvent, msec int) (n 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 Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_NEWFSTATAT //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 Pause() (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 Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //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__NEWSELECT //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys setfsgid(gid int) (prev int, err error) //sys setfsuid(uid int) (prev 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 Truncate(path string, length int64) (err error) //sys Ustat(dev int, ubuf *Ustat_t) (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) //sys futimesat(dirfd int, path string, times *[2]Timeval) (err error) //sysnb Gettimeofday(tv *Timeval) (err error) //sysnb Time(t *Time_t) (tt Time_t, err error) //sys Utime(path string, buf *Utimbuf) (err error) //sys utimes(path string, times *[2]Timeval) (err error) func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: usec} } 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 (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = uint64(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint64(length) } func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) { rsa.Service_name_len = uint64(length) } //sys syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2 func SyncFileRange(fd int, off int64, n int64, flags int) error { // The sync_file_range and sync_file_range2 syscalls differ only in the // order of their arguments. return syncFileRange2(fd, flags, off, n) } //sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error { cmdlineLen := len(cmdline) if cmdlineLen > 0 { // Account for the additional NULL byte added by // BytePtrFromString in kexecFileLoad. The kexec_file_load // syscall expects a NULL-terminated string. cmdlineLen++ } return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags) } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go ================================================ // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build riscv64 && linux package unix import "unsafe" //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT //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 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 MemfdSecret(flags int) (fd 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 func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { var ts *Timespec if timeout != nil { ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000} } return pselect6(nfd, r, w, e, ts, nil) } //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys setfsgid(gid int) (prev int, err error) //sys setfsuid(uid int) (prev 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) func Ustat(dev int, ubuf *Ustat_t) (err error) { return ENOSYS } //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) //sysnb Gettimeofday(tv *Timeval) (err error) func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: usec} } func futimesat(dirfd int, path string, tv *[2]Timeval) (err error) { if tv == nil { return utimensat(dirfd, path, nil, 0) } ts := []Timespec{ NsecToTimespec(TimevalToNsec(tv[0])), NsecToTimespec(TimevalToNsec(tv[1])), } return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0) } func Time(t *Time_t) (Time_t, error) { var tv Timeval err := Gettimeofday(&tv) if err != nil { return 0, err } if t != nil { *t = Time_t(tv.Sec) } return Time_t(tv.Sec), nil } func Utime(path string, buf *Utimbuf) error { tv := []Timeval{ {Sec: buf.Actime}, {Sec: buf.Modtime}, } return Utimes(path, tv) } func utimes(path string, tv *[2]Timeval) (err error) { if tv == nil { return utimensat(AT_FDCWD, path, nil, 0) } ts := []Timespec{ NsecToTimespec(TimevalToNsec(tv[0])), NsecToTimespec(TimevalToNsec(tv[1])), } return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0) } 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 (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = uint64(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint64(length) } func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) { rsa.Service_name_len = uint64(length) } func Pause() error { _, err := ppoll(nil, 0, nil, nil) return err } func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { return Renameat2(olddirfd, oldpath, newdirfd, newpath, 0) } //sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error { cmdlineLen := len(cmdline) if cmdlineLen > 0 { // Account for the additional NULL byte added by // BytePtrFromString in kexecFileLoad. The kexec_file_load // syscall expects a NULL-terminated string. cmdlineLen++ } return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags) } //sys riscvHWProbe(pairs []RISCVHWProbePairs, cpuCount uintptr, cpus *CPUSet, flags uint) (err error) func RISCVHWProbe(pairs []RISCVHWProbePairs, set *CPUSet, flags uint) (err error) { var setSize uintptr if set != nil { setSize = uintptr(unsafe.Sizeof(*set)) } return riscvHWProbe(pairs, setSize, set, flags) } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_linux_s390x.go ================================================ // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build s390x && linux package unix import ( "unsafe" ) //sys EpollWait(epfd int, events []EpollEvent, msec int) (n 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 Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_NEWFSTATAT //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 Lchown(path string, uid int, gid int) (err error) //sys Lstat(path string, stat *Stat_t) (err error) //sys Pause() (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 Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //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) (prev int, err error) //sys setfsuid(uid int) (prev 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 Ustat(dev int, ubuf *Ustat_t) (err error) //sysnb getgroups(n int, list *_Gid_t) (nn int, err error) //sysnb setgroups(n int, list *_Gid_t) (err error) //sys futimesat(dirfd int, path string, times *[2]Timeval) (err error) //sysnb Gettimeofday(tv *Timeval) (err error) func Time(t *Time_t) (tt Time_t, err error) { var tv Timeval err = Gettimeofday(&tv) if err != nil { return 0, err } if t != nil { *t = Time_t(tv.Sec) } return Time_t(tv.Sec), nil } //sys Utime(path string, buf *Utimbuf) (err error) //sys utimes(path string, times *[2]Timeval) (err error) func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: usec} } func Ioperm(from int, num int, on int) (err error) { return ENOSYS } func Iopl(level int) (err error) { return ENOSYS } func (r *PtraceRegs) PC() uint64 { return r.Psw.Addr } func (r *PtraceRegs) SetPC(pc uint64) { r.Psw.Addr = pc } func (iov *Iovec) SetLen(length int) { iov.Len = uint64(length) } func (msghdr *Msghdr) SetControllen(length int) { msghdr.Controllen = uint64(length) } func (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = uint64(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint64(length) } func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) { rsa.Service_name_len = uint64(length) } // Linux on s390x uses the old mmap interface, which requires arguments to be passed in a struct. // mmap2 also requires arguments to be passed in a struct; it is currently not exposed in . func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { mmap_args := [6]uintptr{addr, length, uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)} r0, _, e1 := Syscall(SYS_MMAP, uintptr(unsafe.Pointer(&mmap_args[0])), 0, 0) xaddr = uintptr(r0) if e1 != 0 { err = errnoErr(e1) } return } // On s390x Linux, all the socket calls go through an extra indirection. // The arguments to the underlying system call (SYS_SOCKETCALL) are the // number below and a pointer to an array of uintptr. const ( // see linux/net.h netSocket = 1 netBind = 2 netConnect = 3 netListen = 4 netAccept = 5 netGetSockName = 6 netGetPeerName = 7 netSocketPair = 8 netSend = 9 netRecv = 10 netSendTo = 11 netRecvFrom = 12 netShutdown = 13 netSetSockOpt = 14 netGetSockOpt = 15 netSendMsg = 16 netRecvMsg = 17 netAccept4 = 18 netRecvMMsg = 19 netSendMMsg = 20 ) func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (int, error) { args := [4]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags)} fd, _, err := Syscall(SYS_SOCKETCALL, netAccept4, uintptr(unsafe.Pointer(&args)), 0) if err != 0 { return 0, err } return int(fd), nil } func getsockname(s int, rsa *RawSockaddrAny, addrlen *_Socklen) error { args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))} _, _, err := RawSyscall(SYS_SOCKETCALL, netGetSockName, uintptr(unsafe.Pointer(&args)), 0) if err != 0 { return err } return nil } func getpeername(s int, rsa *RawSockaddrAny, addrlen *_Socklen) error { args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))} _, _, err := RawSyscall(SYS_SOCKETCALL, netGetPeerName, uintptr(unsafe.Pointer(&args)), 0) if err != 0 { return err } return nil } func socketpair(domain int, typ int, flags int, fd *[2]int32) error { args := [4]uintptr{uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd))} _, _, err := RawSyscall(SYS_SOCKETCALL, netSocketPair, uintptr(unsafe.Pointer(&args)), 0) if err != 0 { return err } return nil } func bind(s int, addr unsafe.Pointer, addrlen _Socklen) error { args := [3]uintptr{uintptr(s), uintptr(addr), uintptr(addrlen)} _, _, err := Syscall(SYS_SOCKETCALL, netBind, uintptr(unsafe.Pointer(&args)), 0) if err != 0 { return err } return nil } func connect(s int, addr unsafe.Pointer, addrlen _Socklen) error { args := [3]uintptr{uintptr(s), uintptr(addr), uintptr(addrlen)} _, _, err := Syscall(SYS_SOCKETCALL, netConnect, uintptr(unsafe.Pointer(&args)), 0) if err != 0 { return err } return nil } func socket(domain int, typ int, proto int) (int, error) { args := [3]uintptr{uintptr(domain), uintptr(typ), uintptr(proto)} fd, _, err := RawSyscall(SYS_SOCKETCALL, netSocket, uintptr(unsafe.Pointer(&args)), 0) if err != 0 { return 0, err } return int(fd), nil } func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) error { args := [5]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen))} _, _, err := Syscall(SYS_SOCKETCALL, netGetSockOpt, uintptr(unsafe.Pointer(&args)), 0) if err != 0 { return err } return nil } func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) error { args := [5]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val), vallen} _, _, err := Syscall(SYS_SOCKETCALL, netSetSockOpt, uintptr(unsafe.Pointer(&args)), 0) if err != 0 { return err } return nil } func recvfrom(s int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (int, error) { var base uintptr if len(p) > 0 { base = uintptr(unsafe.Pointer(&p[0])) } args := [6]uintptr{uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))} n, _, err := Syscall(SYS_SOCKETCALL, netRecvFrom, uintptr(unsafe.Pointer(&args)), 0) if err != 0 { return 0, err } return int(n), nil } func sendto(s int, p []byte, flags int, to unsafe.Pointer, addrlen _Socklen) error { var base uintptr if len(p) > 0 { base = uintptr(unsafe.Pointer(&p[0])) } args := [6]uintptr{uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(to), uintptr(addrlen)} _, _, err := Syscall(SYS_SOCKETCALL, netSendTo, uintptr(unsafe.Pointer(&args)), 0) if err != 0 { return err } return nil } func recvmsg(s int, msg *Msghdr, flags int) (int, error) { args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)} n, _, err := Syscall(SYS_SOCKETCALL, netRecvMsg, uintptr(unsafe.Pointer(&args)), 0) if err != 0 { return 0, err } return int(n), nil } func sendmsg(s int, msg *Msghdr, flags int) (int, error) { args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)} n, _, err := Syscall(SYS_SOCKETCALL, netSendMsg, uintptr(unsafe.Pointer(&args)), 0) if err != 0 { return 0, err } return int(n), nil } func Listen(s int, n int) error { args := [2]uintptr{uintptr(s), uintptr(n)} _, _, err := Syscall(SYS_SOCKETCALL, netListen, uintptr(unsafe.Pointer(&args)), 0) if err != 0 { return err } return nil } func Shutdown(s, how int) error { args := [2]uintptr{uintptr(s), uintptr(how)} _, _, err := Syscall(SYS_SOCKETCALL, netShutdown, uintptr(unsafe.Pointer(&args)), 0) if err != 0 { return err } return nil } //sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error { cmdlineLen := len(cmdline) if cmdlineLen > 0 { // Account for the additional NULL byte added by // BytePtrFromString in kexecFileLoad. The kexec_file_load // syscall expects a NULL-terminated string. cmdlineLen++ } return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags) } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go ================================================ // 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. //go:build sparc64 && linux package unix //sys EpollWait(epfd int, events []EpollEvent, msec int) (n 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 Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64 //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 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 Pause() (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 Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) //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) (prev int, err error) //sys setfsuid(uid int) (prev 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 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 Ioperm(from int, num int, on int) (err error) { return ENOSYS } func Iopl(level int) (err error) { return ENOSYS } //sys futimesat(dirfd int, path string, times *[2]Timeval) (err error) //sysnb Gettimeofday(tv *Timeval) (err error) func Time(t *Time_t) (tt Time_t, err error) { var tv Timeval err = Gettimeofday(&tv) if err != nil { return 0, err } if t != nil { *t = Time_t(tv.Sec) } return Time_t(tv.Sec), nil } //sys Utime(path string, buf *Utimbuf) (err error) //sys utimes(path string, times *[2]Timeval) (err error) func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: int32(usec)} } func (r *PtraceRegs) PC() uint64 { return r.Tpc } func (r *PtraceRegs) SetPC(pc uint64) { r.Tpc = pc } func (iov *Iovec) SetLen(length int) { iov.Len = uint64(length) } func (msghdr *Msghdr) SetControllen(length int) { msghdr.Controllen = uint64(length) } func (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = uint64(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint64(length) } func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) { rsa.Service_name_len = uint64(length) } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_netbsd.go ================================================ // 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" ) // SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets. type SockaddrDatalink struct { Len uint8 Family uint8 Index uint16 Type uint8 Nlen uint8 Alen uint8 Slen uint8 Data [12]int8 raw RawSockaddrDatalink } func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) { return nil, EAFNOSUPPORT } 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 } func direntIno(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno)) } func direntReclen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) } func direntNamlen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) } func SysctlUvmexp(name string) (*Uvmexp, error) { mib, err := sysctlmib(name) if err != nil { return nil, err } n := uintptr(SizeofUvmexp) var u Uvmexp if err := sysctl(mib, (*byte)(unsafe.Pointer(&u)), &n, nil, 0); err != nil { return nil, err } return &u, nil } func Pipe(p []int) (err error) { return Pipe2(p, 0) } //sysnb pipe2(p *[2]_C_int, flags int) (err error) func Pipe2(p []int, flags int) error { if len(p) != 2 { return EINVAL } var pp [2]_C_int err := pipe2(&pp, flags) if err == nil { p[0] = int(pp[0]) p[1] = int(pp[1]) } return err } //sys Getdents(fd int, buf []byte) (n int, err error) func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { n, err = Getdents(fd, buf) if err != nil || basep == nil { return } var off int64 off, err = Seek(fd, 0, 1 /* SEEK_CUR */) if err != nil { *basep = ^uintptr(0) return } *basep = uintptr(off) if unsafe.Sizeof(*basep) == 8 { return } if off>>32 != 0 { // We can't stuff the offset back into a uintptr, so any // future calls would be suspect. Generate an error. // EIO is allowed by getdirentries. err = EIO } return } //sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD // TODO func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { return -1, ENOSYS } //sys ioctl(fd int, req uint, arg uintptr) (err error) //sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL //sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL func IoctlGetPtmget(fd int, req uint) (*Ptmget, error) { var value Ptmget err := ioctlPtr(fd, req, unsafe.Pointer(&value)) return &value, err } func Uname(uname *Utsname) error { mib := []_C_int{CTL_KERN, KERN_OSTYPE} n := unsafe.Sizeof(uname.Sysname) if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil { return err } mib = []_C_int{CTL_KERN, KERN_HOSTNAME} n = unsafe.Sizeof(uname.Nodename) if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil { return err } mib = []_C_int{CTL_KERN, KERN_OSRELEASE} n = unsafe.Sizeof(uname.Release) if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil { return err } mib = []_C_int{CTL_KERN, KERN_VERSION} n = unsafe.Sizeof(uname.Version) if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil { return err } // The version might have newlines or tabs in it, convert them to // spaces. for i, b := range uname.Version { if b == '\n' || b == '\t' { if i == len(uname.Version)-1 { uname.Version[i] = 0 } else { uname.Version[i] = ' ' } } } mib = []_C_int{CTL_HW, HW_MACHINE} n = unsafe.Sizeof(uname.Machine) if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil { return err } return nil } 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) } func Fstatvfs(fd int, buf *Statvfs_t) (err error) { return Fstatvfs1(fd, buf, ST_WAIT) } func Statvfs(path string, buf *Statvfs_t) (err error) { return Statvfs1(path, buf, ST_WAIT) } /* * 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 ClockGettime(clockid int32, time *Timespec) (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 Dup3(from int, to int, flags 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 Faccessat(dirfd int, path string, mode uint32, flags 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 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 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 Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) //sys Fstatvfs1(fd int, buf *Statvfs_t, flags int) (err error) = SYS_FSTATVFS1 //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 Linkat(pathfd int, path string, linkfd int, link string, flags int) (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 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 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, 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 Readlinkat(dirfd int, path string, buf []byte) (n int, err error) //sys Rename(from string, to string) (err error) //sys Renameat(fromfd int, from string, tofd int, 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(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, 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 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 Statvfs1(path string, buf *Statvfs_t, flags int) (err error) = SYS_STATVFS1 //sys Symlink(path string, link string) (err error) //sys Symlinkat(oldpath string, newdirfd int, newpath 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 Unlinkat(dirfd int, path string, flags int) (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 utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) const ( mremapFixed = MAP_FIXED mremapDontunmap = 0 mremapMaymove = 0 ) //sys mremapNetBSD(oldp uintptr, oldsize uintptr, newp uintptr, newsize uintptr, flags int) (xaddr uintptr, err error) = SYS_MREMAP func mremap(oldaddr uintptr, oldlength uintptr, newlength uintptr, flags int, newaddr uintptr) (uintptr, error) { return mremapNetBSD(oldaddr, oldlength, newaddr, newlength, flags) } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_netbsd_386.go ================================================ // 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. //go:build 386 && netbsd package unix func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: int32(nsec)} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: int32(usec)} } 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 (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = int32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go ================================================ // 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. //go:build amd64 && netbsd package unix func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: int32(usec)} } 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 (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = int32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go ================================================ // 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. //go:build arm && netbsd package unix func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: int32(nsec)} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: int32(usec)} } 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 (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = int32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go ================================================ // Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build arm64 && netbsd package unix func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: int32(usec)} } 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 (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = int32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_openbsd.go ================================================ // 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 ( "sort" "syscall" "unsafe" ) // SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets. type SockaddrDatalink struct { Len uint8 Family uint8 Index uint16 Type uint8 Nlen uint8 Alen uint8 Slen uint8 Data [24]int8 raw RawSockaddrDatalink } func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) { return nil, EAFNOSUPPORT } 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) { i := sort.Search(len(sysctlMib), func(i int) bool { return sysctlMib[i].ctlname >= name }) if i < len(sysctlMib) && sysctlMib[i].ctlname == name { return sysctlMib[i].ctloid, nil } return nil, EINVAL } func direntIno(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno)) } func direntReclen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) } func direntNamlen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen)) } func SysctlUvmexp(name string) (*Uvmexp, error) { mib, err := sysctlmib(name) if err != nil { return nil, err } n := uintptr(SizeofUvmexp) var u Uvmexp if err := sysctl(mib, (*byte)(unsafe.Pointer(&u)), &n, nil, 0); err != nil { return nil, err } if n != SizeofUvmexp { return nil, EIO } return &u, nil } func Pipe(p []int) (err error) { return Pipe2(p, 0) } //sysnb pipe2(p *[2]_C_int, flags int) (err error) func Pipe2(p []int, flags int) error { if len(p) != 2 { return EINVAL } var pp [2]_C_int err := pipe2(&pp, flags) if err == nil { p[0] = int(pp[0]) p[1] = int(pp[1]) } return err } //sys Getdents(fd int, buf []byte) (n int, err error) func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { n, err = Getdents(fd, buf) if err != nil || basep == nil { return } var off int64 off, err = Seek(fd, 0, 1 /* SEEK_CUR */) if err != nil { *basep = ^uintptr(0) return } *basep = uintptr(off) if unsafe.Sizeof(*basep) == 8 { return } if off>>32 != 0 { // We can't stuff the offset back into a uintptr, so any // future calls would be suspect. Generate an error. // EIO was allowed by getdirentries. err = EIO } return } //sys Getcwd(buf []byte) (n int, err error) = SYS___GETCWD 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) } // 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 bufptr *Statfs_t var bufsize uintptr if len(buf) > 0 { bufptr = &buf[0] bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf)) } return getfsstat(bufptr, bufsize, flags) } //sysnb getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) //sysnb getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) func Getresuid() (ruid, euid, suid int) { var r, e, s _C_int getresuid(&r, &e, &s) return int(r), int(e), int(s) } func Getresgid() (rgid, egid, sgid int) { var r, e, s _C_int getresgid(&r, &e, &s) return int(r), int(e), int(s) } //sys ioctl(fd int, req uint, arg uintptr) (err error) //sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL //sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL //sys fcntl(fd int, cmd int, arg int) (n int, err error) //sys fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) = SYS_FCNTL // FcntlInt performs a fcntl syscall on fd with the provided command and argument. func FcntlInt(fd uintptr, cmd, arg int) (int, error) { return fcntl(int(fd), cmd, arg) } // 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 { _, err := fcntlPtr(int(fd), cmd, unsafe.Pointer(lk)) return err } //sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { if len(fds) == 0 { return ppoll(nil, 0, timeout, sigmask) } return ppoll(&fds[0], len(fds), timeout, sigmask) } func Uname(uname *Utsname) error { mib := []_C_int{CTL_KERN, KERN_OSTYPE} n := unsafe.Sizeof(uname.Sysname) if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil { return err } mib = []_C_int{CTL_KERN, KERN_HOSTNAME} n = unsafe.Sizeof(uname.Nodename) if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil { return err } mib = []_C_int{CTL_KERN, KERN_OSRELEASE} n = unsafe.Sizeof(uname.Release) if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil { return err } mib = []_C_int{CTL_KERN, KERN_VERSION} n = unsafe.Sizeof(uname.Version) if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil { return err } // The version might have newlines or tabs in it, convert them to // spaces. for i, b := range uname.Version { if b == '\n' || b == '\t' { if i == len(uname.Version)-1 { uname.Version[i] = 0 } else { uname.Version[i] = ' ' } } } mib = []_C_int{CTL_HW, HW_MACHINE} n = unsafe.Sizeof(uname.Machine) if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil { return err } return nil } /* * 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 ClockGettime(clockid int32, time *Timespec) (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 Dup3(from int, to int, flags int) (err error) //sys Exit(code int) //sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error) //sys Fchdir(fd int) (err error) //sys Fchflags(fd int, flags 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 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 Fstatat(fd int, path string, stat *Stat_t, flags int) (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 Getrtable() (rtable int, 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 Linkat(pathfd int, path string, linkfd int, link string, flags int) (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 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 Mount(fsType string, dir string, flags int, data unsafe.Pointer) (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, 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 Readlinkat(dirfd int, path string, buf []byte) (n int, err error) //sys Rename(from string, to string) (err error) //sys Renameat(fromfd int, from string, tofd int, 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(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, 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 Setrtable(rtable int) (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 Symlinkat(oldpath string, newdirfd int, newpath 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 Unlinkat(dirfd int, path string, flags int) (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 getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) //sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) //sys pledge(promises *byte, execpromises *byte) (err error) //sys unveil(path *byte, flags *byte) (err error) ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_openbsd_386.go ================================================ // 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. //go:build 386 && openbsd package unix func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: int32(nsec)} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: int32(usec)} } 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 (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = uint32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions // of openbsd/386 the syscall is called sysctl instead of __sysctl. const SYS___SYSCTL = SYS_SYSCTL ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go ================================================ // 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. //go:build amd64 && openbsd package unix func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: usec} } 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 (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = uint32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. const SYS___SYSCTL = SYS_SYSCTL ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go ================================================ // Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build arm && openbsd package unix func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: int32(nsec)} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: int32(usec)} } 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 (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = uint32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions // of openbsd/arm the syscall is called sysctl instead of __sysctl. const SYS___SYSCTL = SYS_SYSCTL ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go ================================================ // Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build arm64 && openbsd package unix func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: usec} } 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 (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = uint32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. const SYS___SYSCTL = SYS_SYSCTL ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go ================================================ // Copyright 2022 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build openbsd package unix import _ "unsafe" // Implemented in the runtime package (runtime/sys_openbsd3.go) func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) func syscall_syscall10(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 uintptr) (r1, r2 uintptr, err Errno) func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno) func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) //go:linkname syscall_syscall syscall.syscall //go:linkname syscall_syscall6 syscall.syscall6 //go:linkname syscall_syscall10 syscall.syscall10 //go:linkname syscall_rawSyscall syscall.rawSyscall //go:linkname syscall_rawSyscall6 syscall.rawSyscall6 func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) { return syscall_syscall10(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, 0) } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go ================================================ // Copyright 2019 The Go 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 setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: usec} } 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 (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = uint32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions // of OpenBSD the syscall is called sysctl instead of __sysctl. const SYS___SYSCTL = SYS_SYSCTL ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go ================================================ // Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build ppc64 && openbsd package unix func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: usec} } 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 (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = uint32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions // of openbsd/ppc64 the syscall is called sysctl instead of __sysctl. const SYS___SYSCTL = SYS_SYSCTL ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go ================================================ // Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build riscv64 && openbsd package unix func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: usec} } 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 (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = uint32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions // of openbsd/riscv64 the syscall is called sysctl instead of __sysctl. const SYS___SYSCTL = SYS_SYSCTL ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_solaris.go ================================================ // 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 ( "fmt" "os" "runtime" "sync" "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) // SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets. type SockaddrDatalink struct { Family uint16 Index uint16 Type uint8 Nlen uint8 Alen uint8 Slen uint8 Data [244]int8 raw RawSockaddrDatalink } func direntIno(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino)) } func direntReclen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) } func direntNamlen(buf []byte) (uint64, bool) { reclen, ok := direntReclen(buf) if !ok { return 0, false } return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true } //sysnb pipe(p *[2]_C_int) (n int, err error) func Pipe(p []int) (err error) { if len(p) != 2 { return EINVAL } var pp [2]_C_int n, err := pipe(&pp) if n != 0 { return err } if err == nil { p[0] = int(pp[0]) p[1] = int(pp[1]) } return nil } //sysnb pipe2(p *[2]_C_int, flags int) (err error) func Pipe2(p []int, flags int) error { if len(p) != 2 { return EINVAL } var pp [2]_C_int err := pipe2(&pp, flags) if err == nil { p[0] = int(pp[0]) p[1] = int(pp[1]) } return err } 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) sa.raw.Addr = sa.Addr 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 sa.raw.Addr = sa.Addr 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 && sl > 3) { // Check sl > 3 so we don't change unnamed socket behavior. 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(fd, &rsa) } // GetsockoptString returns the string value of the socket option opt for the // socket associated with fd at the given socket level. func GetsockoptString(fd, level, opt int) (string, error) { buf := make([]byte, 256) vallen := _Socklen(len(buf)) err := getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen) if err != nil { return "", err } return ByteSliceToString(buf[:vallen]), nil } 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]) } // ReadDirent reads directory entries from fd and writes them into buf. 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 } //sys wait4(pid int32, statusp *_C_int, options int, rusage *Rusage) (wpid int32, err error) func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (int, error) { var status _C_int rpid, err := wait4(int32(pid), &status, options, rusage) wpid := int(rpid) if wpid == -1 { return wpid, err } if wstatus != nil { *wstatus = WaitStatus(status) } return wpid, nil } //sys gethostname(buf []byte) (n int, err error) func Gethostname() (name string, err error) { var buf [MaxHostNameLen]byte n, err := gethostname(buf[:]) if n != 0 { return "", err } n = clen(buf[:]) if n < 1 { return "", EFAULT } return string(buf[:n]), nil } //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) // FcntlInt performs a fcntl syscall on fd with the provided command and argument. func FcntlInt(fd uintptr, cmd, arg int) (int, error) { valptr, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(arg), 0, 0, 0) var err error if errno != 0 { err = errno } return int(valptr), err } // 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(fd int, 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++ } sa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n)) 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]) sa.Addr = pp.Addr 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 sa.Addr = pp.Addr 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(fd, &rsa) if err != nil { Close(nfd) nfd = 0 } return } //sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_recvmsg func recvmsgRaw(fd int, iov []Iovec, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) { var msg Msghdr msg.Name = (*byte)(unsafe.Pointer(rsa)) msg.Namelen = uint32(SizeofSockaddrAny) var dummy byte if len(oob) > 0 { // receive at least one normal byte if emptyIovecs(iov) { var iova [1]Iovec iova[0].Base = &dummy iova[0].SetLen(1) iov = iova[:] } msg.Accrightslen = int32(len(oob)) } if len(iov) > 0 { msg.Iov = &iov[0] msg.SetIovlen(len(iov)) } if n, err = recvmsg(fd, &msg, flags); n == -1 { return } oobn = int(msg.Accrightslen) return } //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_sendmsg func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) { var msg Msghdr msg.Name = (*byte)(unsafe.Pointer(ptr)) msg.Namelen = uint32(salen) var dummy byte var empty bool if len(oob) > 0 { // send at least one normal byte empty = emptyIovecs(iov) if empty { var iova [1]Iovec iova[0].Base = &dummy iova[0].SetLen(1) iov = iova[:] } msg.Accrightslen = int32(len(oob)) } if len(iov) > 0 { msg.Iov = &iov[0] msg.SetIovlen(len(iov)) } if n, err = sendmsg(fd, &msg, flags); err != nil { return 0, err } if len(oob) > 0 && empty { 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) } //sys __makedev(version int, major uint, minor uint) (val uint64) func Mkdev(major, minor uint32) uint64 { return __makedev(NEWDEV, uint(major), uint(minor)) } //sys __major(version int, dev uint64) (val uint) func Major(dev uint64) uint32 { return uint32(__major(NEWDEV, dev)) } //sys __minor(version int, dev uint64) (val uint) func Minor(dev uint64) uint32 { return uint32(__minor(NEWDEV, dev)) } /* * Expose the ioctl function */ //sys ioctlRet(fd int, req int, arg uintptr) (ret int, err error) = libc.ioctl //sys ioctlPtrRet(fd int, req int, arg unsafe.Pointer) (ret int, err error) = libc.ioctl func ioctl(fd int, req int, arg uintptr) (err error) { _, err = ioctlRet(fd, req, arg) return err } func ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) { _, err = ioctlPtrRet(fd, req, arg) return err } func IoctlSetTermio(fd int, req int, value *Termio) error { return ioctlPtr(fd, req, unsafe.Pointer(value)) } func IoctlGetTermio(fd int, req int) (*Termio, error) { var value Termio err := ioctlPtr(fd, req, unsafe.Pointer(&value)) return &value, err } //sys poll(fds *PollFd, nfds int, timeout int) (n int, err error) func Poll(fds []PollFd, timeout int) (n int, err error) { if len(fds) == 0 { return poll(nil, 0, timeout) } return poll(&fds[0], len(fds), timeout) } 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) } /* * 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 ClockGettime(clockid int32, time *Timespec) (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 Faccessat(dirfd int, path string, mode uint32, flags int) (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 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 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 Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) //sys Fstatvfs(fd int, vfsstat *Statvfs_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 Getsid(pid int) (sid int, 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.__xnet_llisten //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 Msync(b []byte, flags 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 //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) //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 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 Statvfs(path string, vfsstat *Statvfs_t) (err error) //sys Symlink(path string, link string) (err error) //sys Sync() (err error) //sys Sysconf(which int) (n int64, 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, flags int) (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.__xnet_bind //sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.__xnet_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 sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = libsendfile.sendfile //sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.__xnet_sendto //sys socket(domain int, typ int, proto int) (fd int, err error) = libsocket.__xnet_socket //sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) = libsocket.__xnet_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.__xnet_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 // Event Ports type fileObjCookie struct { fobj *fileObj cookie interface{} } // EventPort provides a safe abstraction on top of Solaris/illumos Event Ports. type EventPort struct { port int mu sync.Mutex fds map[uintptr]*fileObjCookie paths map[string]*fileObjCookie // The user cookie presents an interesting challenge from a memory management perspective. // There are two paths by which we can discover that it is no longer in use: // 1. The user calls port_dissociate before any events fire // 2. An event fires and we return it to the user // The tricky situation is if the event has fired in the kernel but // the user hasn't requested/received it yet. // If the user wants to port_dissociate before the event has been processed, // we should handle things gracefully. To do so, we need to keep an extra // reference to the cookie around until the event is processed // thus the otherwise seemingly extraneous "cookies" map // The key of this map is a pointer to the corresponding fCookie cookies map[*fileObjCookie]struct{} } // PortEvent is an abstraction of the port_event C struct. // Compare Source against PORT_SOURCE_FILE or PORT_SOURCE_FD // to see if Path or Fd was the event source. The other will be // uninitialized. type PortEvent struct { Cookie interface{} Events int32 Fd uintptr Path string Source uint16 fobj *fileObj } // NewEventPort creates a new EventPort including the // underlying call to port_create(3c). func NewEventPort() (*EventPort, error) { port, err := port_create() if err != nil { return nil, err } e := &EventPort{ port: port, fds: make(map[uintptr]*fileObjCookie), paths: make(map[string]*fileObjCookie), cookies: make(map[*fileObjCookie]struct{}), } return e, nil } //sys port_create() (n int, err error) //sys port_associate(port int, source int, object uintptr, events int, user *byte) (n int, err error) //sys port_dissociate(port int, source int, object uintptr) (n int, err error) //sys port_get(port int, pe *portEvent, timeout *Timespec) (n int, err error) //sys port_getn(port int, pe *portEvent, max uint32, nget *uint32, timeout *Timespec) (n int, err error) // Close closes the event port. func (e *EventPort) Close() error { e.mu.Lock() defer e.mu.Unlock() err := Close(e.port) if err != nil { return err } e.fds = nil e.paths = nil e.cookies = nil return nil } // PathIsWatched checks to see if path is associated with this EventPort. func (e *EventPort) PathIsWatched(path string) bool { e.mu.Lock() defer e.mu.Unlock() _, found := e.paths[path] return found } // FdIsWatched checks to see if fd is associated with this EventPort. func (e *EventPort) FdIsWatched(fd uintptr) bool { e.mu.Lock() defer e.mu.Unlock() _, found := e.fds[fd] return found } // AssociatePath wraps port_associate(3c) for a filesystem path including // creating the necessary file_obj from the provided stat information. func (e *EventPort) AssociatePath(path string, stat os.FileInfo, events int, cookie interface{}) error { e.mu.Lock() defer e.mu.Unlock() if _, found := e.paths[path]; found { return fmt.Errorf("%v is already associated with this Event Port", path) } fCookie, err := createFileObjCookie(path, stat, cookie) if err != nil { return err } _, err = port_associate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(fCookie.fobj)), events, (*byte)(unsafe.Pointer(fCookie))) if err != nil { return err } e.paths[path] = fCookie e.cookies[fCookie] = struct{}{} return nil } // DissociatePath wraps port_dissociate(3c) for a filesystem path. func (e *EventPort) DissociatePath(path string) error { e.mu.Lock() defer e.mu.Unlock() f, ok := e.paths[path] if !ok { return fmt.Errorf("%v is not associated with this Event Port", path) } _, err := port_dissociate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(f.fobj))) // If the path is no longer associated with this event port (ENOENT) // we should delete it from our map. We can still return ENOENT to the caller. // But we need to save the cookie if err != nil && err != ENOENT { return err } if err == nil { // dissociate was successful, safe to delete the cookie fCookie := e.paths[path] delete(e.cookies, fCookie) } delete(e.paths, path) return err } // AssociateFd wraps calls to port_associate(3c) on file descriptors. func (e *EventPort) AssociateFd(fd uintptr, events int, cookie interface{}) error { e.mu.Lock() defer e.mu.Unlock() if _, found := e.fds[fd]; found { return fmt.Errorf("%v is already associated with this Event Port", fd) } fCookie, err := createFileObjCookie("", nil, cookie) if err != nil { return err } _, err = port_associate(e.port, PORT_SOURCE_FD, fd, events, (*byte)(unsafe.Pointer(fCookie))) if err != nil { return err } e.fds[fd] = fCookie e.cookies[fCookie] = struct{}{} return nil } // DissociateFd wraps calls to port_dissociate(3c) on file descriptors. func (e *EventPort) DissociateFd(fd uintptr) error { e.mu.Lock() defer e.mu.Unlock() _, ok := e.fds[fd] if !ok { return fmt.Errorf("%v is not associated with this Event Port", fd) } _, err := port_dissociate(e.port, PORT_SOURCE_FD, fd) if err != nil && err != ENOENT { return err } if err == nil { // dissociate was successful, safe to delete the cookie fCookie := e.fds[fd] delete(e.cookies, fCookie) } delete(e.fds, fd) return err } func createFileObjCookie(name string, stat os.FileInfo, cookie interface{}) (*fileObjCookie, error) { fCookie := new(fileObjCookie) fCookie.cookie = cookie if name != "" && stat != nil { fCookie.fobj = new(fileObj) bs, err := ByteSliceFromString(name) if err != nil { return nil, err } fCookie.fobj.Name = (*int8)(unsafe.Pointer(&bs[0])) s := stat.Sys().(*syscall.Stat_t) fCookie.fobj.Atim.Sec = s.Atim.Sec fCookie.fobj.Atim.Nsec = s.Atim.Nsec fCookie.fobj.Mtim.Sec = s.Mtim.Sec fCookie.fobj.Mtim.Nsec = s.Mtim.Nsec fCookie.fobj.Ctim.Sec = s.Ctim.Sec fCookie.fobj.Ctim.Nsec = s.Ctim.Nsec } return fCookie, nil } // GetOne wraps port_get(3c) and returns a single PortEvent. func (e *EventPort) GetOne(t *Timespec) (*PortEvent, error) { pe := new(portEvent) _, err := port_get(e.port, pe, t) if err != nil { return nil, err } p := new(PortEvent) e.mu.Lock() defer e.mu.Unlock() err = e.peIntToExt(pe, p) if err != nil { return nil, err } return p, nil } // peIntToExt converts a cgo portEvent struct into the friendlier PortEvent // NOTE: Always call this function while holding the e.mu mutex func (e *EventPort) peIntToExt(peInt *portEvent, peExt *PortEvent) error { if e.cookies == nil { return fmt.Errorf("this EventPort is already closed") } peExt.Events = peInt.Events peExt.Source = peInt.Source fCookie := (*fileObjCookie)(unsafe.Pointer(peInt.User)) _, found := e.cookies[fCookie] if !found { panic("unexpected event port address; may be due to kernel bug; see https://go.dev/issue/54254") } peExt.Cookie = fCookie.cookie delete(e.cookies, fCookie) switch peInt.Source { case PORT_SOURCE_FD: peExt.Fd = uintptr(peInt.Object) // Only remove the fds entry if it exists and this cookie matches if fobj, ok := e.fds[peExt.Fd]; ok { if fobj == fCookie { delete(e.fds, peExt.Fd) } } case PORT_SOURCE_FILE: peExt.fobj = fCookie.fobj peExt.Path = BytePtrToString((*byte)(unsafe.Pointer(peExt.fobj.Name))) // Only remove the paths entry if it exists and this cookie matches if fobj, ok := e.paths[peExt.Path]; ok { if fobj == fCookie { delete(e.paths, peExt.Path) } } } return nil } // Pending wraps port_getn(3c) and returns how many events are pending. func (e *EventPort) Pending() (int, error) { var n uint32 = 0 _, err := port_getn(e.port, nil, 0, &n, nil) return int(n), err } // Get wraps port_getn(3c) and fills a slice of PortEvent. // It will block until either min events have been received // or the timeout has been exceeded. It will return how many // events were actually received along with any error information. func (e *EventPort) Get(s []PortEvent, min int, timeout *Timespec) (int, error) { if min == 0 { return 0, fmt.Errorf("need to request at least one event or use Pending() instead") } if len(s) < min { return 0, fmt.Errorf("len(s) (%d) is less than min events requested (%d)", len(s), min) } got := uint32(min) max := uint32(len(s)) var err error ps := make([]portEvent, max) _, err = port_getn(e.port, &ps[0], max, &got, timeout) // got will be trustworthy with ETIME, but not any other error. if err != nil && err != ETIME { return 0, err } e.mu.Lock() defer e.mu.Unlock() valid := 0 for i := 0; i < int(got); i++ { err2 := e.peIntToExt(&ps[i], &s[i]) if err2 != nil { if valid == 0 && err == nil { // If err2 is the only error and there are no valid events // to return, return it to the caller. err = err2 } break } valid = i + 1 } return valid, err } //sys putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error) func Putmsg(fd int, cl []byte, data []byte, flags int) (err error) { var clp, datap *strbuf if len(cl) > 0 { clp = &strbuf{ Len: int32(len(cl)), Buf: (*int8)(unsafe.Pointer(&cl[0])), } } if len(data) > 0 { datap = &strbuf{ Len: int32(len(data)), Buf: (*int8)(unsafe.Pointer(&data[0])), } } return putmsg(fd, clp, datap, flags) } //sys getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error) func Getmsg(fd int, cl []byte, data []byte) (retCl []byte, retData []byte, flags int, err error) { var clp, datap *strbuf if len(cl) > 0 { clp = &strbuf{ Maxlen: int32(len(cl)), Buf: (*int8)(unsafe.Pointer(&cl[0])), } } if len(data) > 0 { datap = &strbuf{ Maxlen: int32(len(data)), Buf: (*int8)(unsafe.Pointer(&data[0])), } } if err = getmsg(fd, clp, datap, &flags); err != nil { return nil, nil, 0, err } if len(cl) > 0 { retCl = cl[:clp.Len] } if len(data) > 0 { retData = data[:datap.Len] } return retCl, retData, flags, nil } func IoctlSetIntRetInt(fd int, req int, arg int) (int, error) { return ioctlRet(fd, req, uintptr(arg)) } func IoctlSetString(fd int, req int, val string) error { bs := make([]byte, len(val)+1) copy(bs[:len(bs)-1], val) err := ioctlPtr(fd, req, unsafe.Pointer(&bs[0])) runtime.KeepAlive(&bs[0]) return err } // Lifreq Helpers func (l *Lifreq) SetName(name string) error { if len(name) >= len(l.Name) { return fmt.Errorf("name cannot be more than %d characters", len(l.Name)-1) } for i := range name { l.Name[i] = int8(name[i]) } return nil } func (l *Lifreq) SetLifruInt(d int) { *(*int)(unsafe.Pointer(&l.Lifru[0])) = d } func (l *Lifreq) GetLifruInt() int { return *(*int)(unsafe.Pointer(&l.Lifru[0])) } func (l *Lifreq) SetLifruUint(d uint) { *(*uint)(unsafe.Pointer(&l.Lifru[0])) = d } func (l *Lifreq) GetLifruUint() uint { return *(*uint)(unsafe.Pointer(&l.Lifru[0])) } func IoctlLifreq(fd int, req int, l *Lifreq) error { return ioctlPtr(fd, req, unsafe.Pointer(l)) } // Strioctl Helpers func (s *Strioctl) SetInt(i int) { s.Len = int32(unsafe.Sizeof(i)) s.Dp = (*int8)(unsafe.Pointer(&i)) } func IoctlSetStrioctlRetInt(fd int, req int, s *Strioctl) (int, error) { return ioctlPtrRet(fd, req, unsafe.Pointer(s)) } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go ================================================ // 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. //go:build amd64 && solaris package unix func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } func setTimeval(sec, usec int64) Timeval { return Timeval{Sec: sec, Usec: usec} } func (iov *Iovec) SetLen(length int) { iov.Len = uint64(length) } func (msghdr *Msghdr) SetIovlen(length int) { msghdr.Iovlen = int32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = uint32(length) } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_unix.go ================================================ // 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. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris package unix import ( "bytes" "sort" "sync" "syscall" "unsafe" ) var ( Stdin = 0 Stdout = 1 Stderr = 2 ) // Do the interface allocations only once for common // Errno values. var ( errEAGAIN error = syscall.EAGAIN errEINVAL error = syscall.EINVAL errENOENT error = syscall.ENOENT ) var ( signalNameMapOnce sync.Once signalNameMap map[string]syscall.Signal ) // 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 } // ErrnoName returns the error name for error number e. func ErrnoName(e syscall.Errno) string { i := sort.Search(len(errorList), func(i int) bool { return errorList[i].num >= e }) if i < len(errorList) && errorList[i].num == e { return errorList[i].name } return "" } // SignalName returns the signal name for signal number s. func SignalName(s syscall.Signal) string { i := sort.Search(len(signalList), func(i int) bool { return signalList[i].num >= s }) if i < len(signalList) && signalList[i].num == s { return signalList[i].name } return "" } // SignalNum returns the syscall.Signal for signal named s, // or 0 if a signal with such name is not found. // The signal name should start with "SIG". func SignalNum(s string) syscall.Signal { signalNameMapOnce.Do(func() { signalNameMap = make(map[string]syscall.Signal, len(signalList)) for _, signal := range signalList { signalNameMap[signal.name] = signal.num } }) return signalNameMap[s] } // clen returns the index of the first NULL byte in n or len(n) if n contains no NULL byte. func clen(n []byte) int { i := bytes.IndexByte(n, 0) if i == -1 { i = len(n) } return i } // 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 } // Use unsafe to convert addr into a []byte. b := unsafe.Slice((*byte)(unsafe.Pointer(addr)), length) // 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 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) } func MmapPtr(fd int, offset int64, addr unsafe.Pointer, length uintptr, prot int, flags int) (ret unsafe.Pointer, err error) { xaddr, err := mapper.mmap(uintptr(addr), length, prot, flags, fd, offset) return unsafe.Pointer(xaddr), err } func MunmapPtr(addr unsafe.Pointer, length uintptr) (err error) { return mapper.munmap(uintptr(addr), length) } 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 } func Pread(fd int, p []byte, offset int64) (n int, err error) { n, err = pread(fd, p, offset) if raceenabled { if n > 0 { raceWriteRange(unsafe.Pointer(&p[0]), n) } if err == nil { raceAcquire(unsafe.Pointer(&ioSync)) } } return } func Pwrite(fd int, p []byte, offset int64) (n int, err error) { if raceenabled { raceReleaseMerge(unsafe.Pointer(&ioSync)) } n, err = pwrite(fd, p, offset) 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 // Sockaddr represents a socket address. type Sockaddr interface { sockaddr() (ptr unsafe.Pointer, len _Socklen, err error) // lowercase; only we can define Sockaddrs } // SockaddrInet4 implements the Sockaddr interface for AF_INET type sockets. type SockaddrInet4 struct { Port int Addr [4]byte raw RawSockaddrInet4 } // SockaddrInet6 implements the Sockaddr interface for AF_INET6 type sockets. type SockaddrInet6 struct { Port int ZoneId uint32 Addr [16]byte raw RawSockaddrInet6 } // SockaddrUnix implements the Sockaddr interface for AF_UNIX type sockets. 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(fd, &rsa) } 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 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 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 } func GetsockoptLinger(fd, level, opt int) (*Linger, error) { var linger Linger vallen := _Socklen(SizeofLinger) err := getsockopt(fd, level, opt, unsafe.Pointer(&linger), &vallen) return &linger, err } func GetsockoptTimeval(fd, level, opt int) (*Timeval, error) { var tv Timeval vallen := _Socklen(unsafe.Sizeof(tv)) err := getsockopt(fd, level, opt, unsafe.Pointer(&tv), &vallen) return &tv, err } func GetsockoptUint64(fd, level, opt int) (value uint64, err error) { var n uint64 vallen := _Socklen(8) err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen) return 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(fd, &rsa) } return } // Recvmsg receives a message from a socket using the recvmsg system call. The // received non-control data will be written to p, and any "out of band" // control data will be written to oob. The flags are passed to recvmsg. // // The results are: // - n is the number of non-control data bytes read into p // - oobn is the number of control data bytes read into oob; this may be interpreted using [ParseSocketControlMessage] // - recvflags is flags returned by recvmsg // - from is the address of the sender // // If the underlying socket type is not SOCK_DGRAM, a received message // containing oob data and a single '\0' of non-control data is treated as if // the message contained only control data, i.e. n will be zero on return. func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) { var iov [1]Iovec if len(p) > 0 { iov[0].Base = &p[0] iov[0].SetLen(len(p)) } var rsa RawSockaddrAny n, oobn, recvflags, err = recvmsgRaw(fd, iov[:], oob, flags, &rsa) // source address is only specified if the socket is unconnected if rsa.Addr.Family != AF_UNSPEC { from, err = anyToSockaddr(fd, &rsa) } return } // RecvmsgBuffers receives a message from a socket using the recvmsg system // call. This function is equivalent to Recvmsg, but non-control data read is // scattered into the buffers slices. func RecvmsgBuffers(fd int, buffers [][]byte, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) { iov := make([]Iovec, len(buffers)) for i := range buffers { if len(buffers[i]) > 0 { iov[i].Base = &buffers[i][0] iov[i].SetLen(len(buffers[i])) } else { iov[i].Base = (*byte)(unsafe.Pointer(&_zero)) } } var rsa RawSockaddrAny n, oobn, recvflags, err = recvmsgRaw(fd, iov, oob, flags, &rsa) if err == nil && rsa.Addr.Family != AF_UNSPEC { from, err = anyToSockaddr(fd, &rsa) } return } // Sendmsg sends a message on a socket to an address using the sendmsg system // call. This function is equivalent to SendmsgN, but does not return the // number of bytes actually sent. func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) { _, err = SendmsgN(fd, p, oob, to, flags) return } // SendmsgN sends a message on a socket to an address using the sendmsg system // call. p contains the non-control data to send, and oob contains the "out of // band" control data. The flags are passed to sendmsg. The number of // non-control bytes actually written to the socket is returned. // // Some socket types do not support sending control data without accompanying // non-control data. If p is empty, and oob contains control data, and the // underlying socket type is not SOCK_DGRAM, p will be treated as containing a // single '\0' and the return value will indicate zero bytes sent. // // The Go function Recvmsg, if called with an empty p and a non-empty oob, // will read and ignore this additional '\0'. If the message is received by // code that does not use Recvmsg, or that does not use Go at all, that code // will need to be written to expect and ignore the additional '\0'. // // If you need to send non-empty oob with p actually empty, and if the // underlying socket type supports it, you can do so via a raw system call as // follows: // // msg := &unix.Msghdr{ // Control: &oob[0], // } // msg.SetControllen(len(oob)) // n, _, errno := unix.Syscall(unix.SYS_SENDMSG, uintptr(fd), uintptr(unsafe.Pointer(msg)), flags) func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) { var iov [1]Iovec if len(p) > 0 { iov[0].Base = &p[0] iov[0].SetLen(len(p)) } var ptr unsafe.Pointer var salen _Socklen if to != nil { ptr, salen, err = to.sockaddr() if err != nil { return 0, err } } return sendmsgN(fd, iov[:], oob, ptr, salen, flags) } // SendmsgBuffers sends a message on a socket to an address using the sendmsg // system call. This function is equivalent to SendmsgN, but the non-control // data is gathered from buffers. func SendmsgBuffers(fd int, buffers [][]byte, oob []byte, to Sockaddr, flags int) (n int, err error) { iov := make([]Iovec, len(buffers)) for i := range buffers { if len(buffers[i]) > 0 { iov[i].Base = &buffers[i][0] iov[i].SetLen(len(buffers[i])) } else { iov[i].Base = (*byte)(unsafe.Pointer(&_zero)) } } var ptr unsafe.Pointer var salen _Socklen if to != nil { ptr, salen, err = to.sockaddr() if err != nil { return 0, err } } return sendmsgN(fd, iov, oob, ptr, salen, flags) } func Send(s int, buf []byte, flags int) (err error) { return sendto(s, buf, flags, nil, 0) } func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) { var ptr unsafe.Pointer var salen _Socklen if to != nil { ptr, salen, err = to.sockaddr() if err != nil { return err } } return sendto(fd, p, flags, ptr, salen) } 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) { var p unsafe.Pointer if len(s) > 0 { p = unsafe.Pointer(&[]byte(s)[0]) } return setsockopt(fd, level, opt, p, 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 SetsockoptUint64(fd, level, opt int, value uint64) (err error) { return setsockopt(fd, level, opt, unsafe.Pointer(&value), 8) } 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 } 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 (flag&O_NONBLOCK != 0) == nonblocking { return nil } if nonblocking { flag |= O_NONBLOCK } else { flag &= ^O_NONBLOCK } _, err = fcntl(fd, F_SETFL, flag) return err } // Exec calls execve(2), which replaces the calling executable in the process // tree. argv0 should be the full path to an executable ("/bin/ls") and the // executable name should also be the first argument in argv (["ls", "-l"]). // envv are the environment variables that should be passed to the new // process (["USER=go", "PWD=/tmp"]). func Exec(argv0 string, argv []string, envv []string) error { return syscall.Exec(argv0, argv, envv) } // Lutimes sets the access and modification times tv on path. If path refers to // a symlink, it is not dereferenced and the timestamps are set on the symlink. // If tv is nil, the access and modification times are set to the current time. // Otherwise tv must contain exactly 2 elements, with access time as the first // element and modification time as the second element. func Lutimes(path string, tv []Timeval) error { if tv == nil { return UtimesNanoAt(AT_FDCWD, path, nil, AT_SYMLINK_NOFOLLOW) } if len(tv) != 2 { return EINVAL } ts := []Timespec{ NsecToTimespec(TimevalToNsec(tv[0])), NsecToTimespec(TimevalToNsec(tv[1])), } return UtimesNanoAt(AT_FDCWD, path, ts, AT_SYMLINK_NOFOLLOW) } // emptyIovecs reports whether there are no bytes in the slice of Iovec. func emptyIovecs(iov []Iovec) bool { for i := range iov { if iov[i].Len > 0 { return false } } return true } // Setrlimit sets a resource limit. func Setrlimit(resource int, rlim *Rlimit) error { // Just call the syscall version, because as of Go 1.21 // it will affect starting a new process. return syscall.Setrlimit(resource, (*syscall.Rlimit)(rlim)) } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_unix_gc.go ================================================ // Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build (darwin || dragonfly || freebsd || (linux && !ppc64 && !ppc64le) || netbsd || openbsd || solaris) && gc package unix import "syscall" 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) ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go ================================================ // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build linux && (ppc64le || ppc64) && gc package unix import "syscall" func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { return syscall.Syscall(trap, a1, a2, a3) } func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6) } func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { return syscall.RawSyscall(trap, a1, a2, a3) } func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6) } ================================================ FILE: vendor/golang.org/x/sys/unix/syscall_zos_s390x.go ================================================ // Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build zos && s390x // Many of the following syscalls are not available on all versions of z/OS. // Some missing calls have legacy implementations/simulations but others // will be missing completely. To achieve consistent failing behaviour on // legacy systems, we first test the function pointer via a safeloading // mechanism to see if the function exists on a given system. Then execution // is branched to either continue the function call, or return an error. package unix import ( "bytes" "fmt" "os" "reflect" "regexp" "runtime" "sort" "strings" "sync" "syscall" "unsafe" ) //go:noescape func initZosLibVec() //go:noescape func GetZosLibVec() uintptr func init() { initZosLibVec() r0, _, _ := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS_____GETENV_A<<4, uintptr(unsafe.Pointer(&([]byte("__ZOS_XSYSTRACE\x00"))[0]))) if r0 != 0 { n, _, _ := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS___ATOI_A<<4, r0) ZosTraceLevel = int(n) r0, _, _ := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS_____GETENV_A<<4, uintptr(unsafe.Pointer(&([]byte("__ZOS_XSYSTRACEFD\x00"))[0]))) if r0 != 0 { fd, _, _ := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS___ATOI_A<<4, r0) f := os.NewFile(fd, "zostracefile") if f != nil { ZosTracefile = f } } } } //go:noescape func CallLeFuncWithErr(funcdesc uintptr, parms ...uintptr) (ret, errno2 uintptr, err Errno) //go:noescape func CallLeFuncWithPtrReturn(funcdesc uintptr, parms ...uintptr) (ret, errno2 uintptr, err Errno) // ------------------------------- // pointer validity test // good pointer returns 0 // bad pointer returns 1 // //go:nosplit func ptrtest(uintptr) uint64 // Load memory at ptr location with error handling if the location is invalid // //go:noescape func safeload(ptr uintptr) (value uintptr, error uintptr) const ( entrypointLocationOffset = 8 // From function descriptor xplinkEyecatcher = 0x00c300c500c500f1 // ".C.E.E.1" eyecatcherOffset = 16 // From function entrypoint (negative) ppa1LocationOffset = 8 // From function entrypoint (negative) nameLenOffset = 0x14 // From PPA1 start nameOffset = 0x16 // From PPA1 start ) func getPpaOffset(funcptr uintptr) int64 { entrypoint, err := safeload(funcptr + entrypointLocationOffset) if err != 0 { return -1 } // XPLink functions have ".C.E.E.1" as the first 8 bytes (EBCDIC) val, err := safeload(entrypoint - eyecatcherOffset) if err != 0 { return -1 } if val != xplinkEyecatcher { return -1 } ppaoff, err := safeload(entrypoint - ppa1LocationOffset) if err != 0 { return -1 } ppaoff >>= 32 return int64(ppaoff) } //------------------------------- // function descriptor pointer validity test // good pointer returns 0 // bad pointer returns 1 // TODO: currently mksyscall_zos_s390x.go generate empty string for funcName // have correct funcName pass to the funcptrtest function func funcptrtest(funcptr uintptr, funcName string) uint64 { entrypoint, err := safeload(funcptr + entrypointLocationOffset) if err != 0 { return 1 } ppaoff := getPpaOffset(funcptr) if ppaoff == -1 { return 1 } // PPA1 offset value is from the start of the entire function block, not the entrypoint ppa1 := (entrypoint - eyecatcherOffset) + uintptr(ppaoff) nameLen, err := safeload(ppa1 + nameLenOffset) if err != 0 { return 1 } nameLen >>= 48 if nameLen > 128 { return 1 } // no function name input to argument end here if funcName == "" { return 0 } var funcname [128]byte for i := 0; i < int(nameLen); i += 8 { v, err := safeload(ppa1 + nameOffset + uintptr(i)) if err != 0 { return 1 } funcname[i] = byte(v >> 56) funcname[i+1] = byte(v >> 48) funcname[i+2] = byte(v >> 40) funcname[i+3] = byte(v >> 32) funcname[i+4] = byte(v >> 24) funcname[i+5] = byte(v >> 16) funcname[i+6] = byte(v >> 8) funcname[i+7] = byte(v) } runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___E2A_L<<4, // __e2a_l []uintptr{uintptr(unsafe.Pointer(&funcname[0])), nameLen}) name := string(funcname[:nameLen]) if name != funcName { return 1 } return 0 } // For detection of capabilities on a system. // Is function descriptor f a valid function? func isValidLeFunc(f uintptr) error { ret := funcptrtest(f, "") if ret != 0 { return fmt.Errorf("Bad pointer, not an LE function ") } return nil } // Retrieve function name from descriptor func getLeFuncName(f uintptr) (string, error) { // assume it has been checked, only check ppa1 validity here entry := ((*[2]uintptr)(unsafe.Pointer(f)))[1] preamp := ((*[4]uint32)(unsafe.Pointer(entry - eyecatcherOffset))) offsetPpa1 := preamp[2] if offsetPpa1 > 0x0ffff { return "", fmt.Errorf("PPA1 offset seems too big 0x%x\n", offsetPpa1) } ppa1 := uintptr(unsafe.Pointer(preamp)) + uintptr(offsetPpa1) res := ptrtest(ppa1) if res != 0 { return "", fmt.Errorf("PPA1 address not valid") } size := *(*uint16)(unsafe.Pointer(ppa1 + nameLenOffset)) if size > 128 { return "", fmt.Errorf("Function name seems too long, length=%d\n", size) } var name [128]byte funcname := (*[128]byte)(unsafe.Pointer(ppa1 + nameOffset)) copy(name[0:size], funcname[0:size]) runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___E2A_L<<4, // __e2a_l []uintptr{uintptr(unsafe.Pointer(&name[0])), uintptr(size)}) return string(name[:size]), nil } // Check z/OS version func zosLeVersion() (version, release uint32) { p1 := (*(*uintptr)(unsafe.Pointer(uintptr(1208)))) >> 32 p1 = *(*uintptr)(unsafe.Pointer(uintptr(p1 + 88))) p1 = *(*uintptr)(unsafe.Pointer(uintptr(p1 + 8))) p1 = *(*uintptr)(unsafe.Pointer(uintptr(p1 + 984))) vrm := *(*uint32)(unsafe.Pointer(p1 + 80)) version = (vrm & 0x00ff0000) >> 16 release = (vrm & 0x0000ff00) >> 8 return } // returns a zos C FILE * for stdio fd 0, 1, 2 func ZosStdioFilep(fd int32) uintptr { return uintptr(*(*uint64)(unsafe.Pointer(uintptr(*(*uint64)(unsafe.Pointer(uintptr(*(*uint64)(unsafe.Pointer(uintptr(uint64(*(*uint32)(unsafe.Pointer(uintptr(1208)))) + 80))) + uint64((fd+2)<<3)))))))) } func copyStat(stat *Stat_t, statLE *Stat_LE_t) { stat.Dev = uint64(statLE.Dev) stat.Ino = uint64(statLE.Ino) stat.Nlink = uint64(statLE.Nlink) stat.Mode = uint32(statLE.Mode) stat.Uid = uint32(statLE.Uid) stat.Gid = uint32(statLE.Gid) stat.Rdev = uint64(statLE.Rdev) stat.Size = statLE.Size stat.Atim.Sec = int64(statLE.Atim) stat.Atim.Nsec = 0 //zos doesn't return nanoseconds stat.Mtim.Sec = int64(statLE.Mtim) stat.Mtim.Nsec = 0 //zos doesn't return nanoseconds stat.Ctim.Sec = int64(statLE.Ctim) stat.Ctim.Nsec = 0 //zos doesn't return nanoseconds stat.Blksize = int64(statLE.Blksize) stat.Blocks = statLE.Blocks } func svcCall(fnptr unsafe.Pointer, argv *unsafe.Pointer, dsa *uint64) func svcLoad(name *byte) unsafe.Pointer func svcUnload(name *byte, fnptr unsafe.Pointer) int64 func (d *Dirent) NameString() string { if d == nil { return "" } s := string(d.Name[:]) idx := strings.IndexByte(s, 0) if idx == -1 { return s } else { return s[:idx] } } func DecodeData(dest []byte, sz int, val uint64) { for i := 0; i < sz; i++ { dest[sz-1-i] = byte((val >> (uint64(i * 8))) & 0xff) } } func EncodeData(data []byte) uint64 { var value uint64 sz := len(data) for i := 0; i < sz; i++ { value |= uint64(data[i]) << uint64(((sz - i - 1) * 8)) } return value } 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 anyToSockaddr(_ int, rsa *RawSockaddrAny) (Sockaddr, error) { // TODO(neeilan): Implement use of first param (fd) switch rsa.Addr.Family { case AF_UNIX: pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa)) sa := new(SockaddrUnix) // For z/OS, only replace NUL with @ when the // length is not zero. if pp.Len != 0 && 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. // // For z/OS, the length of the name is a field // in the structure. To be on the safe side, we // will still scan the name for a NUL but only // to the length provided in the structure. // // 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 < int(pp.Len) && pp.Path[n] != 0 { n++ } sa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n)) 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 } // TODO(neeilan): Remove 0 in call sa, err = anyToSockaddr(0, &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") } // TODO(neeilan): Remove 0 in call sa, err = anyToSockaddr(0, &rsa) if err != nil { Close(nfd) nfd = 0 } return } func Ctermid() (tty string, err error) { var termdev [1025]byte runtime.EnterSyscall() r0, err2, err1 := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS___CTERMID_A<<4, uintptr(unsafe.Pointer(&termdev[0]))) runtime.ExitSyscall() if r0 == 0 { return "", fmt.Errorf("%s (errno2=0x%x)\n", err1.Error(), err2) } s := string(termdev[:]) idx := strings.Index(s, string(rune(0))) if idx == -1 { tty = s } else { tty = s[:idx] } return } func (iov *Iovec) SetLen(length int) { iov.Len = uint64(length) } func (msghdr *Msghdr) SetControllen(length int) { msghdr.Controllen = int32(length) } func (cmsg *Cmsghdr) SetLen(length int) { cmsg.Len = int32(length) } //sys fcntl(fd int, cmd int, arg int) (val int, err error) //sys Flistxattr(fd int, dest []byte) (sz int, err error) = SYS___FLISTXATTR_A //sys Fremovexattr(fd int, attr string) (err error) = SYS___FREMOVEXATTR_A //sys read(fd int, p []byte) (n int, err error) //sys write(fd int, p []byte) (n int, err error) //sys Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) = SYS___FGETXATTR_A //sys Fsetxattr(fd int, attr string, data []byte, flag int) (err error) = SYS___FSETXATTR_A //sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) = SYS___ACCEPT_A //sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) = SYS___ACCEPT4_A //sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = SYS___BIND_A //sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = SYS___CONNECT_A //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) = SYS___GETPEERNAME_A //sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = SYS___GETSOCKNAME_A //sys Removexattr(path string, attr string) (err error) = SYS___REMOVEXATTR_A //sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) = SYS___RECVFROM_A //sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) = SYS___SENDTO_A //sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = SYS___RECVMSG_A //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = SYS___SENDMSG_A //sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) = SYS_MMAP //sys munmap(addr uintptr, length uintptr) (err error) = SYS_MUNMAP //sys ioctl(fd int, req int, arg uintptr) (err error) = SYS_IOCTL //sys ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) = SYS_IOCTL //sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error) = SYS_SHMAT //sys shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) = SYS_SHMCTL64 //sys shmdt(addr uintptr) (err error) = SYS_SHMDT //sys shmget(key int, size int, flag int) (id int, err error) = SYS_SHMGET //sys Access(path string, mode uint32) (err error) = SYS___ACCESS_A //sys Chdir(path string) (err error) = SYS___CHDIR_A //sys Chown(path string, uid int, gid int) (err error) = SYS___CHOWN_A //sys Chmod(path string, mode uint32) (err error) = SYS___CHMOD_A //sys Creat(path string, mode uint32) (fd int, err error) = SYS___CREAT_A //sys Dup(oldfd int) (fd int, err error) //sys Dup2(oldfd int, newfd int) (err error) //sys Dup3(oldfd int, newfd int, flags int) (err error) = SYS_DUP3 //sys Dirfd(dirp uintptr) (fd int, err error) = SYS_DIRFD //sys EpollCreate(size int) (fd int, err error) = SYS_EPOLL_CREATE //sys EpollCreate1(flags int) (fd int, err error) = SYS_EPOLL_CREATE1 //sys EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) = SYS_EPOLL_CTL //sys EpollPwait(epfd int, events []EpollEvent, msec int, sigmask *int) (n int, err error) = SYS_EPOLL_PWAIT //sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_WAIT //sys Errno2() (er2 int) = SYS___ERRNO2 //sys Eventfd(initval uint, flags int) (fd int, err error) = SYS_EVENTFD //sys Exit(code int) //sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error) = SYS___FACCESSAT_A func Faccessat2(dirfd int, path string, mode uint32, flags int) (err error) { return Faccessat(dirfd, path, mode, flags) } //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___FCHMODAT_A //sys Fchown(fd int, uid int, gid int) (err error) //sys Fchownat(fd int, path string, uid int, gid int, flags int) (err error) = SYS___FCHOWNAT_A //sys FcntlInt(fd uintptr, cmd int, arg int) (retval int, err error) = SYS_FCNTL //sys Fdatasync(fd int) (err error) = SYS_FDATASYNC //sys fstat(fd int, stat *Stat_LE_t) (err error) //sys fstatat(dirfd int, path string, stat *Stat_LE_t, flags int) (err error) = SYS___FSTATAT_A func Fstat(fd int, stat *Stat_t) (err error) { var statLE Stat_LE_t err = fstat(fd, &statLE) copyStat(stat, &statLE) return } func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { var statLE Stat_LE_t err = fstatat(dirfd, path, &statLE, flags) copyStat(stat, &statLE) return } func impl_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, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___GETXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest))) sz = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_GetxattrAddr() *(func(path string, attr string, dest []byte) (sz int, err error)) var Getxattr = enter_Getxattr func enter_Getxattr(path string, attr string, dest []byte) (sz int, err error) { funcref := get_GetxattrAddr() if validGetxattr() { *funcref = impl_Getxattr } else { *funcref = error_Getxattr } return (*funcref)(path, attr, dest) } func error_Getxattr(path string, attr string, dest []byte) (sz int, err error) { return -1, ENOSYS } func validGetxattr() bool { if funcptrtest(GetZosLibVec()+SYS___GETXATTR_A<<4, "") == 0 { if name, err := getLeFuncName(GetZosLibVec() + SYS___GETXATTR_A<<4); err == nil { return name == "__getxattr_a" } } return false } //sys Lgetxattr(link string, attr string, dest []byte) (sz int, err error) = SYS___LGETXATTR_A //sys Lsetxattr(path string, attr string, data []byte, flags int) (err error) = SYS___LSETXATTR_A func impl_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) } r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___SETXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags)) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_SetxattrAddr() *(func(path string, attr string, data []byte, flags int) (err error)) var Setxattr = enter_Setxattr func enter_Setxattr(path string, attr string, data []byte, flags int) (err error) { funcref := get_SetxattrAddr() if validSetxattr() { *funcref = impl_Setxattr } else { *funcref = error_Setxattr } return (*funcref)(path, attr, data, flags) } func error_Setxattr(path string, attr string, data []byte, flags int) (err error) { return ENOSYS } func validSetxattr() bool { if funcptrtest(GetZosLibVec()+SYS___SETXATTR_A<<4, "") == 0 { if name, err := getLeFuncName(GetZosLibVec() + SYS___SETXATTR_A<<4); err == nil { return name == "__setxattr_a" } } return false } //sys Fstatfs(fd int, buf *Statfs_t) (err error) = SYS_FSTATFS //sys Fstatvfs(fd int, stat *Statvfs_t) (err error) = SYS_FSTATVFS //sys Fsync(fd int) (err error) //sys Futimes(fd int, tv []Timeval) (err error) = SYS_FUTIMES //sys Futimesat(dirfd int, path string, tv []Timeval) (err error) = SYS___FUTIMESAT_A //sys Ftruncate(fd int, length int64) (err error) //sys Getrandom(buf []byte, flags int) (n int, err error) = SYS_GETRANDOM //sys InotifyInit() (fd int, err error) = SYS_INOTIFY_INIT //sys InotifyInit1(flags int) (fd int, err error) = SYS_INOTIFY_INIT1 //sys InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) = SYS___INOTIFY_ADD_WATCH_A //sys InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) = SYS_INOTIFY_RM_WATCH //sys Listxattr(path string, dest []byte) (sz int, err error) = SYS___LISTXATTR_A //sys Llistxattr(path string, dest []byte) (sz int, err error) = SYS___LLISTXATTR_A //sys Lremovexattr(path string, attr string) (err error) = SYS___LREMOVEXATTR_A //sys Lutimes(path string, tv []Timeval) (err error) = SYS___LUTIMES_A //sys Mprotect(b []byte, prot int) (err error) = SYS_MPROTECT //sys Msync(b []byte, flags int) (err error) = SYS_MSYNC //sys Console2(cmsg *ConsMsg2, modstr *byte, concmd *uint32) (err error) = SYS___CONSOLE2 // Pipe2 begin //go:nosplit func getPipe2Addr() *(func([]int, int) error) var Pipe2 = pipe2Enter func pipe2Enter(p []int, flags int) (err error) { if funcptrtest(GetZosLibVec()+SYS_PIPE2<<4, "") == 0 { *getPipe2Addr() = pipe2Impl } else { *getPipe2Addr() = pipe2Error } return (*getPipe2Addr())(p, flags) } func pipe2Impl(p []int, flags int) (err error) { var pp [2]_C_int r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_PIPE2<<4, uintptr(unsafe.Pointer(&pp[0])), uintptr(flags)) if int64(r0) == -1 { err = errnoErr2(e1, e2) } else { p[0] = int(pp[0]) p[1] = int(pp[1]) } return } func pipe2Error(p []int, flags int) (err error) { return fmt.Errorf("Pipe2 is not available on this system") } // Pipe2 end //sys Poll(fds []PollFd, timeout int) (n int, err error) = SYS_POLL func Readdir(dir uintptr) (dirent *Dirent, err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___READDIR_A<<4, uintptr(dir)) runtime.ExitSyscall() dirent = (*Dirent)(unsafe.Pointer(r0)) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //sys Readdir_r(dirp uintptr, entry *direntLE, result **direntLE) (err error) = SYS___READDIR_R_A //sys Statfs(path string, buf *Statfs_t) (err error) = SYS___STATFS_A //sys Syncfs(fd int) (err error) = SYS_SYNCFS //sys Times(tms *Tms) (ticks uintptr, err error) = SYS_TIMES //sys W_Getmntent(buff *byte, size int) (lastsys int, err error) = SYS_W_GETMNTENT //sys W_Getmntent_A(buff *byte, size int) (lastsys int, err error) = SYS___W_GETMNTENT_A //sys mount_LE(path string, filesystem string, fstype string, mtm uint32, parmlen int32, parm string) (err error) = SYS___MOUNT_A //sys unmount_LE(filesystem string, mtm int) (err error) = SYS___UMOUNT_A //sys Chroot(path string) (err error) = SYS___CHROOT_A //sys Select(nmsgsfds int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (ret int, err error) = SYS_SELECT //sysnb Uname(buf *Utsname) (err error) = SYS_____OSNAME_A //sys Unshare(flags int) (err error) = SYS_UNSHARE func Ptsname(fd int) (name string, err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS___PTSNAME_A<<4, uintptr(fd)) runtime.ExitSyscall() if r0 == 0 { err = errnoErr2(e1, e2) } else { name = u2s(unsafe.Pointer(r0)) } return } func u2s(cstr unsafe.Pointer) string { str := (*[1024]uint8)(cstr) i := 0 for str[i] != 0 { i++ } return string(str[:i]) } func Close(fd int) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_CLOSE<<4, uintptr(fd)) runtime.ExitSyscall() for i := 0; e1 == EAGAIN && i < 10; i++ { runtime.EnterSyscall() CallLeFuncWithErr(GetZosLibVec()+SYS_USLEEP<<4, uintptr(10)) runtime.ExitSyscall() runtime.EnterSyscall() r0, e2, e1 = CallLeFuncWithErr(GetZosLibVec()+SYS_CLOSE<<4, uintptr(fd)) runtime.ExitSyscall() } if r0 != 0 { err = errnoErr2(e1, e2) } return } // Dummy function: there are no semantics for Madvise on z/OS func Madvise(b []byte, advice int) (err error) { return } 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 Gethostname(buf []byte) (err error) = SYS___GETHOSTNAME_A //sysnb Getgid() (gid int) //sysnb Getpid() (pid int) //sysnb Getpgid(pid int) (pgid int, err error) = SYS_GETPGID func Getpgrp() (pid int) { pid, _ = Getpgid(0) return } //sysnb Getppid() (pid int) //sys Getpriority(which int, who int) (prio int, err error) //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = SYS_GETRLIMIT //sysnb getrusage(who int, rusage *rusage_zos) (err error) = SYS_GETRUSAGE func Getrusage(who int, rusage *Rusage) (err error) { var ruz rusage_zos err = getrusage(who, &ruz) //Only the first two fields of Rusage are set rusage.Utime.Sec = ruz.Utime.Sec rusage.Utime.Usec = int64(ruz.Utime.Usec) rusage.Stime.Sec = ruz.Stime.Sec rusage.Stime.Usec = int64(ruz.Stime.Usec) return } //sys Getegid() (egid int) = SYS_GETEGID //sys Geteuid() (euid int) = SYS_GETEUID //sysnb Getsid(pid int) (sid int, err error) = SYS_GETSID //sysnb Getuid() (uid int) //sysnb Kill(pid int, sig Signal) (err error) //sys Lchown(path string, uid int, gid int) (err error) = SYS___LCHOWN_A //sys Link(path string, link string) (err error) = SYS___LINK_A //sys Linkat(oldDirFd int, oldPath string, newDirFd int, newPath string, flags int) (err error) = SYS___LINKAT_A //sys Listen(s int, n int) (err error) //sys lstat(path string, stat *Stat_LE_t) (err error) = SYS___LSTAT_A func Lstat(path string, stat *Stat_t) (err error) { var statLE Stat_LE_t err = lstat(path, &statLE) copyStat(stat, &statLE) return } // for checking symlinks begins with $VERSION/ $SYSNAME/ $SYSSYMR/ $SYSSYMA/ func isSpecialPath(path []byte) (v bool) { var special = [4][8]byte{ [8]byte{'V', 'E', 'R', 'S', 'I', 'O', 'N', '/'}, [8]byte{'S', 'Y', 'S', 'N', 'A', 'M', 'E', '/'}, [8]byte{'S', 'Y', 'S', 'S', 'Y', 'M', 'R', '/'}, [8]byte{'S', 'Y', 'S', 'S', 'Y', 'M', 'A', '/'}} var i, j int for i = 0; i < len(special); i++ { for j = 0; j < len(special[i]); j++ { if path[j] != special[i][j] { break } } if j == len(special[i]) { return true } } return false } func realpath(srcpath string, abspath []byte) (pathlen int, errno int) { var source [1024]byte copy(source[:], srcpath) source[len(srcpath)] = 0 ret := runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___REALPATH_A<<4, //__realpath_a() []uintptr{uintptr(unsafe.Pointer(&source[0])), uintptr(unsafe.Pointer(&abspath[0]))}) if ret != 0 { index := bytes.IndexByte(abspath[:], byte(0)) if index != -1 { return index, 0 } } else { errptr := (*int)(unsafe.Pointer(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO<<4, []uintptr{}))) //__errno() return 0, *errptr } return 0, 245 // EBADDATA 245 } 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) } n = int(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___READLINK_A<<4, []uintptr{uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))})) runtime.KeepAlive(unsafe.Pointer(_p0)) if n == -1 { value := *(*int32)(unsafe.Pointer(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO<<4, []uintptr{}))) err = errnoErr(Errno(value)) } else { if buf[0] == '$' { if isSpecialPath(buf[1:9]) { cnt, err1 := realpath(path, buf) if err1 == 0 { n = cnt } } } } return } func impl_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) } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___READLINKAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) runtime.ExitSyscall() n = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) return n, err } else { if buf[0] == '$' { if isSpecialPath(buf[1:9]) { cnt, err1 := realpath(path, buf) if err1 == 0 { n = cnt } } } } return } //go:nosplit func get_ReadlinkatAddr() *(func(dirfd int, path string, buf []byte) (n int, err error)) var Readlinkat = enter_Readlinkat func enter_Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { funcref := get_ReadlinkatAddr() if funcptrtest(GetZosLibVec()+SYS___READLINKAT_A<<4, "") == 0 { *funcref = impl_Readlinkat } else { *funcref = error_Readlinkat } return (*funcref)(dirfd, path, buf) } func error_Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { n = -1 err = ENOSYS return } //sys Mkdir(path string, mode uint32) (err error) = SYS___MKDIR_A //sys Mkdirat(dirfd int, path string, mode uint32) (err error) = SYS___MKDIRAT_A //sys Mkfifo(path string, mode uint32) (err error) = SYS___MKFIFO_A //sys Mknod(path string, mode uint32, dev int) (err error) = SYS___MKNOD_A //sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error) = SYS___MKNODAT_A //sys PivotRoot(newroot string, oldroot string) (err error) = SYS___PIVOT_ROOT_A //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 Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) = SYS___PRCTL_A //sysnb Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT //sys Rename(from string, to string) (err error) = SYS___RENAME_A //sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) = SYS___RENAMEAT_A //sys Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) = SYS___RENAMEAT2_A //sys Rmdir(path string) (err error) = SYS___RMDIR_A //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK //sys Setegid(egid int) (err error) = SYS_SETEGID //sys Seteuid(euid int) (err error) = SYS_SETEUID //sys Sethostname(p []byte) (err error) = SYS___SETHOSTNAME_A //sys Setns(fd int, nstype int) (err error) = SYS_SETNS //sys Setpriority(which int, who int, prio int) (err error) //sysnb Setpgid(pid int, pgid int) (err error) = SYS_SETPGID //sysnb Setrlimit(resource int, lim *Rlimit) (err error) //sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID //sysnb Setreuid(ruid int, euid int) (err error) = SYS_SETREUID //sysnb Setsid() (pid int, err error) = SYS_SETSID //sys Setuid(uid int) (err error) = SYS_SETUID //sys Setgid(uid int) (err error) = SYS_SETGID //sys Shutdown(fd int, how int) (err error) //sys stat(path string, statLE *Stat_LE_t) (err error) = SYS___STAT_A func Stat(path string, sta *Stat_t) (err error) { var statLE Stat_LE_t err = stat(path, &statLE) copyStat(sta, &statLE) return } //sys Symlink(path string, link string) (err error) = SYS___SYMLINK_A //sys Symlinkat(oldPath string, dirfd int, newPath string) (err error) = SYS___SYMLINKAT_A //sys Sync() = SYS_SYNC //sys Truncate(path string, length int64) (err error) = SYS___TRUNCATE_A //sys Tcgetattr(fildes int, termptr *Termios) (err error) = SYS_TCGETATTR //sys Tcsetattr(fildes int, when int, termptr *Termios) (err error) = SYS_TCSETATTR //sys Umask(mask int) (oldmask int) //sys Unlink(path string) (err error) = SYS___UNLINK_A //sys Unlinkat(dirfd int, path string, flags int) (err error) = SYS___UNLINKAT_A //sys Utime(path string, utim *Utimbuf) (err error) = SYS___UTIME_A //sys open(path string, mode int, perm uint32) (fd int, err error) = SYS___OPEN_A func Open(path string, mode int, perm uint32) (fd int, err error) { if mode&O_ACCMODE == 0 { mode |= O_RDONLY } return open(path, mode, perm) } //sys openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) = SYS___OPENAT_A func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { if flags&O_ACCMODE == 0 { flags |= O_RDONLY } return openat(dirfd, path, flags, mode) } //sys openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error) = SYS___OPENAT2_A func Openat2(dirfd int, path string, how *OpenHow) (fd int, err error) { if how.Flags&O_ACCMODE == 0 { how.Flags |= O_RDONLY } return openat2(dirfd, path, how, SizeofOpenHow) } func ZosFdToPath(dirfd int) (path string, err error) { var buffer [1024]byte runtime.EnterSyscall() ret, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_W_IOCTL<<4, uintptr(dirfd), 17, 1024, uintptr(unsafe.Pointer(&buffer[0]))) runtime.ExitSyscall() if ret == 0 { zb := bytes.IndexByte(buffer[:], 0) if zb == -1 { zb = len(buffer) } CallLeFuncWithErr(GetZosLibVec()+SYS___E2A_L<<4, uintptr(unsafe.Pointer(&buffer[0])), uintptr(zb)) return string(buffer[:zb]), nil } return "", errnoErr2(e1, e2) } //sys remove(path string) (err error) func Remove(path string) error { return remove(path) } const ImplementsGetwd = true func Getcwd(buf []byte) (n int, err error) { var p unsafe.Pointer if len(buf) > 0 { p = unsafe.Pointer(&buf[0]) } else { p = unsafe.Pointer(&_zero) } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS___GETCWD_A<<4, uintptr(p), uintptr(len(buf))) runtime.ExitSyscall() n = clen(buf) + 1 if r0 == 0 { err = errnoErr2(e1, e2) } return } 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]) } func gettid() uint64 func Gettid() (tid int) { return int(gettid()) } 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() Signal { if !w.Signaled() { return -1 } return Signal(w & mask) } func (w WaitStatus) StopSignal() Signal { if !w.Stopped() { return -1 } return Signal(w>>shift) & 0xFF } func (w WaitStatus) TrapCause() int { return -1 } //sys waitid(idType int, id int, info *Siginfo, options int) (err error) func Waitid(idType int, id int, info *Siginfo, options int, rusage *Rusage) (err error) { return waitid(idType, id, info, options) } //sys waitpid(pid int, wstatus *_C_int, options int) (wpid int, err error) func impl_Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_WAIT4<<4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage))) runtime.ExitSyscall() wpid = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_Wait4Addr() *(func(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error)) var Wait4 = enter_Wait4 func enter_Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) { funcref := get_Wait4Addr() if funcptrtest(GetZosLibVec()+SYS_WAIT4<<4, "") == 0 { *funcref = impl_Wait4 } else { *funcref = legacyWait4 } return (*funcref)(pid, wstatus, options, rusage) } func legacyWait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) { // TODO(mundaym): z/OS doesn't have wait4. I don't think getrusage does what we want. // At the moment rusage will not be touched. var status _C_int wpid, err = waitpid(pid, &status, options) if wstatus != nil { *wstatus = WaitStatus(status) } return } //sysnb gettimeofday(tv *timeval_zos) (err error) func Gettimeofday(tv *Timeval) (err error) { var tvz timeval_zos err = gettimeofday(&tvz) tv.Sec = tvz.Sec tv.Usec = int64(tvz.Usec) return } func Time(t *Time_t) (tt Time_t, err error) { var tv Timeval err = Gettimeofday(&tv) if err != nil { return 0, err } if t != nil { *t = Time_t(tv.Sec) } return Time_t(tv.Sec), nil } func setTimespec(sec, nsec int64) Timespec { return Timespec{Sec: sec, Nsec: nsec} } func setTimeval(sec, usec int64) Timeval { //fix return Timeval{Sec: sec, Usec: usec} } //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 utimes(path string, timeval *[2]Timeval) (err error) = SYS___UTIMES_A 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, ts *[2]Timespec, flags int) (err error) = SYS___UTIMENSAT_A func validUtimensat() bool { if funcptrtest(GetZosLibVec()+SYS___UTIMENSAT_A<<4, "") == 0 { if name, err := getLeFuncName(GetZosLibVec() + SYS___UTIMENSAT_A<<4); err == nil { return name == "__utimensat_a" } } return false } // Begin UtimesNano //go:nosplit func get_UtimesNanoAddr() *(func(path string, ts []Timespec) (err error)) var UtimesNano = enter_UtimesNano func enter_UtimesNano(path string, ts []Timespec) (err error) { funcref := get_UtimesNanoAddr() if validUtimensat() { *funcref = utimesNanoImpl } else { *funcref = legacyUtimesNano } return (*funcref)(path, ts) } func utimesNanoImpl(path string, ts []Timespec) (err 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 legacyUtimesNano(path string, ts []Timespec) (err error) { 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]))) } // End UtimesNano // Begin UtimesNanoAt //go:nosplit func get_UtimesNanoAtAddr() *(func(dirfd int, path string, ts []Timespec, flags int) (err error)) var UtimesNanoAt = enter_UtimesNanoAt func enter_UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) (err error) { funcref := get_UtimesNanoAtAddr() if validUtimensat() { *funcref = utimesNanoAtImpl } else { *funcref = legacyUtimesNanoAt } return (*funcref)(dirfd, path, ts, flags) } func utimesNanoAtImpl(dirfd int, path string, ts []Timespec, flags int) (err 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) } func legacyUtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) (err error) { if path[0] != '/' { dirPath, err := ZosFdToPath(dirfd) if err != nil { return err } path = dirPath + "/" + path } if flags == AT_SYMLINK_NOFOLLOW { if len(ts) != 2 { return EINVAL } if ts[0].Nsec >= 5e8 { ts[0].Sec++ } ts[0].Nsec = 0 if ts[1].Nsec >= 5e8 { ts[1].Sec++ } ts[1].Nsec = 0 // Not as efficient as it could be because Timespec and // Timeval have different types in the different OSes tv := []Timeval{ NsecToTimeval(TimespecToNsec(ts[0])), NsecToTimeval(TimespecToNsec(ts[1])), } return Lutimes(path, tv) } return UtimesNano(path, ts) } // End UtimesNanoAt 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(neeilan) : Remove this 0 ( added to get sys/unix compiling on z/OS ) return anyToSockaddr(0, &rsa) } const ( // identifier constants nwmHeaderIdentifier = 0xd5e6d4c8 nwmFilterIdentifier = 0xd5e6d4c6 nwmTCPConnIdentifier = 0xd5e6d4c3 nwmRecHeaderIdentifier = 0xd5e6d4d9 nwmIPStatsIdentifier = 0xd5e6d4c9d7e2e340 nwmIPGStatsIdentifier = 0xd5e6d4c9d7c7e2e3 nwmTCPStatsIdentifier = 0xd5e6d4e3c3d7e2e3 nwmUDPStatsIdentifier = 0xd5e6d4e4c4d7e2e3 nwmICMPGStatsEntry = 0xd5e6d4c9c3d4d7c7 nwmICMPTStatsEntry = 0xd5e6d4c9c3d4d7e3 // nwmHeader constants nwmVersion1 = 1 nwmVersion2 = 2 nwmCurrentVer = 2 nwmTCPConnType = 1 nwmGlobalStatsType = 14 // nwmFilter constants nwmFilterLclAddrMask = 0x20000000 // Local address nwmFilterSrcAddrMask = 0x20000000 // Source address nwmFilterLclPortMask = 0x10000000 // Local port nwmFilterSrcPortMask = 0x10000000 // Source port // nwmConnEntry constants nwmTCPStateClosed = 1 nwmTCPStateListen = 2 nwmTCPStateSynSent = 3 nwmTCPStateSynRcvd = 4 nwmTCPStateEstab = 5 nwmTCPStateFinWait1 = 6 nwmTCPStateFinWait2 = 7 nwmTCPStateClosWait = 8 nwmTCPStateLastAck = 9 nwmTCPStateClosing = 10 nwmTCPStateTimeWait = 11 nwmTCPStateDeletTCB = 12 // Existing constants on linux BPF_TCP_CLOSE = 1 BPF_TCP_LISTEN = 2 BPF_TCP_SYN_SENT = 3 BPF_TCP_SYN_RECV = 4 BPF_TCP_ESTABLISHED = 5 BPF_TCP_FIN_WAIT1 = 6 BPF_TCP_FIN_WAIT2 = 7 BPF_TCP_CLOSE_WAIT = 8 BPF_TCP_LAST_ACK = 9 BPF_TCP_CLOSING = 10 BPF_TCP_TIME_WAIT = 11 BPF_TCP_NEW_SYN_RECV = -1 BPF_TCP_MAX_STATES = -2 ) type nwmTriplet struct { offset uint32 length uint32 number uint32 } type nwmQuadruplet struct { offset uint32 length uint32 number uint32 match uint32 } type nwmHeader struct { ident uint32 length uint32 version uint16 nwmType uint16 bytesNeeded uint32 options uint32 _ [16]byte inputDesc nwmTriplet outputDesc nwmQuadruplet } type nwmFilter struct { ident uint32 flags uint32 resourceName [8]byte resourceId uint32 listenerId uint32 local [28]byte // union of sockaddr4 and sockaddr6 remote [28]byte // union of sockaddr4 and sockaddr6 _ uint16 _ uint16 asid uint16 _ [2]byte tnLuName [8]byte tnMonGrp uint32 tnAppl [8]byte applData [40]byte nInterface [16]byte dVipa [16]byte dVipaPfx uint16 dVipaPort uint16 dVipaFamily byte _ [3]byte destXCF [16]byte destXCFPfx uint16 destXCFFamily byte _ [1]byte targIP [16]byte targIPPfx uint16 targIPFamily byte _ [1]byte _ [20]byte } type nwmRecHeader struct { ident uint32 length uint32 number byte _ [3]byte } type nwmTCPStatsEntry struct { ident uint64 currEstab uint32 activeOpened uint32 passiveOpened uint32 connClosed uint32 estabResets uint32 attemptFails uint32 passiveDrops uint32 timeWaitReused uint32 inSegs uint64 predictAck uint32 predictData uint32 inDupAck uint32 inBadSum uint32 inBadLen uint32 inShort uint32 inDiscOldTime uint32 inAllBeforeWin uint32 inSomeBeforeWin uint32 inAllAfterWin uint32 inSomeAfterWin uint32 inOutOfOrder uint32 inAfterClose uint32 inWinProbes uint32 inWinUpdates uint32 outWinUpdates uint32 outSegs uint64 outDelayAcks uint32 outRsts uint32 retransSegs uint32 retransTimeouts uint32 retransDrops uint32 pmtuRetrans uint32 pmtuErrors uint32 outWinProbes uint32 probeDrops uint32 keepAliveProbes uint32 keepAliveDrops uint32 finwait2Drops uint32 acceptCount uint64 inBulkQSegs uint64 inDiscards uint64 connFloods uint32 connStalls uint32 cfgEphemDef uint16 ephemInUse uint16 ephemHiWater uint16 flags byte _ [1]byte ephemExhaust uint32 smcRCurrEstabLnks uint32 smcRLnkActTimeOut uint32 smcRActLnkOpened uint32 smcRPasLnkOpened uint32 smcRLnksClosed uint32 smcRCurrEstab uint32 smcRActiveOpened uint32 smcRPassiveOpened uint32 smcRConnClosed uint32 smcRInSegs uint64 smcROutSegs uint64 smcRInRsts uint32 smcROutRsts uint32 smcDCurrEstabLnks uint32 smcDActLnkOpened uint32 smcDPasLnkOpened uint32 smcDLnksClosed uint32 smcDCurrEstab uint32 smcDActiveOpened uint32 smcDPassiveOpened uint32 smcDConnClosed uint32 smcDInSegs uint64 smcDOutSegs uint64 smcDInRsts uint32 smcDOutRsts uint32 } type nwmConnEntry struct { ident uint32 local [28]byte // union of sockaddr4 and sockaddr6 remote [28]byte // union of sockaddr4 and sockaddr6 startTime [8]byte // uint64, changed to prevent padding from being inserted lastActivity [8]byte // uint64 bytesIn [8]byte // uint64 bytesOut [8]byte // uint64 inSegs [8]byte // uint64 outSegs [8]byte // uint64 state uint16 activeOpen byte flag01 byte outBuffered uint32 inBuffered uint32 maxSndWnd uint32 reXmtCount uint32 congestionWnd uint32 ssThresh uint32 roundTripTime uint32 roundTripVar uint32 sendMSS uint32 sndWnd uint32 rcvBufSize uint32 sndBufSize uint32 outOfOrderCount uint32 lcl0WindowCount uint32 rmt0WindowCount uint32 dupacks uint32 flag02 byte sockOpt6Cont byte asid uint16 resourceName [8]byte resourceId uint32 subtask uint32 sockOpt byte sockOpt6 byte clusterConnFlag byte proto byte targetAppl [8]byte luName [8]byte clientUserId [8]byte logMode [8]byte timeStamp uint32 timeStampAge uint32 serverResourceId uint32 intfName [16]byte ttlsStatPol byte ttlsStatConn byte ttlsSSLProt uint16 ttlsNegCiph [2]byte ttlsSecType byte ttlsFIPS140Mode byte ttlsUserID [8]byte applData [40]byte inOldestTime [8]byte // uint64 outOldestTime [8]byte // uint64 tcpTrustedPartner byte _ [3]byte bulkDataIntfName [16]byte ttlsNegCiph4 [4]byte smcReason uint32 lclSMCLinkId uint32 rmtSMCLinkId uint32 smcStatus byte smcFlags byte _ [2]byte rcvWnd uint32 lclSMCBufSz uint32 rmtSMCBufSz uint32 ttlsSessID [32]byte ttlsSessIDLen int16 _ [1]byte smcDStatus byte smcDReason uint32 } var svcNameTable [][]byte = [][]byte{ []byte("\xc5\xe9\xc2\xd5\xd4\xc9\xc6\xf4"), // svc_EZBNMIF4 } const ( svc_EZBNMIF4 = 0 ) func GetsockoptTCPInfo(fd, level, opt int) (*TCPInfo, error) { jobname := []byte("\x5c\x40\x40\x40\x40\x40\x40\x40") // "*" responseBuffer := [4096]byte{0} var bufferAlet, reasonCode uint32 = 0, 0 var bufferLen, returnValue, returnCode int32 = 4096, 0, 0 dsa := [18]uint64{0} var argv [7]unsafe.Pointer argv[0] = unsafe.Pointer(&jobname[0]) argv[1] = unsafe.Pointer(&responseBuffer[0]) argv[2] = unsafe.Pointer(&bufferAlet) argv[3] = unsafe.Pointer(&bufferLen) argv[4] = unsafe.Pointer(&returnValue) argv[5] = unsafe.Pointer(&returnCode) argv[6] = unsafe.Pointer(&reasonCode) request := (*struct { header nwmHeader filter nwmFilter })(unsafe.Pointer(&responseBuffer[0])) EZBNMIF4 := svcLoad(&svcNameTable[svc_EZBNMIF4][0]) if EZBNMIF4 == nil { return nil, errnoErr(EINVAL) } // GetGlobalStats EZBNMIF4 call request.header.ident = nwmHeaderIdentifier request.header.length = uint32(unsafe.Sizeof(request.header)) request.header.version = nwmCurrentVer request.header.nwmType = nwmGlobalStatsType request.header.options = 0x80000000 svcCall(EZBNMIF4, &argv[0], &dsa[0]) // outputDesc field is filled by EZBNMIF4 on success if returnCode != 0 || request.header.outputDesc.offset == 0 { return nil, errnoErr(EINVAL) } // Check that EZBNMIF4 returned a nwmRecHeader recHeader := (*nwmRecHeader)(unsafe.Pointer(&responseBuffer[request.header.outputDesc.offset])) if recHeader.ident != nwmRecHeaderIdentifier { return nil, errnoErr(EINVAL) } // Parse nwmTriplets to get offsets of returned entries var sections []*uint64 var sectionDesc *nwmTriplet = (*nwmTriplet)(unsafe.Pointer(&responseBuffer[0])) for i := uint32(0); i < uint32(recHeader.number); i++ { offset := request.header.outputDesc.offset + uint32(unsafe.Sizeof(*recHeader)) + i*uint32(unsafe.Sizeof(*sectionDesc)) sectionDesc = (*nwmTriplet)(unsafe.Pointer(&responseBuffer[offset])) for j := uint32(0); j < sectionDesc.number; j++ { offset = request.header.outputDesc.offset + sectionDesc.offset + j*sectionDesc.length sections = append(sections, (*uint64)(unsafe.Pointer(&responseBuffer[offset]))) } } // Find nwmTCPStatsEntry in returned entries var tcpStats *nwmTCPStatsEntry = nil for _, ptr := range sections { switch *ptr { case nwmTCPStatsIdentifier: if tcpStats != nil { return nil, errnoErr(EINVAL) } tcpStats = (*nwmTCPStatsEntry)(unsafe.Pointer(ptr)) case nwmIPStatsIdentifier: case nwmIPGStatsIdentifier: case nwmUDPStatsIdentifier: case nwmICMPGStatsEntry: case nwmICMPTStatsEntry: default: return nil, errnoErr(EINVAL) } } if tcpStats == nil { return nil, errnoErr(EINVAL) } // GetConnectionDetail EZBNMIF4 call responseBuffer = [4096]byte{0} dsa = [18]uint64{0} bufferAlet, reasonCode = 0, 0 bufferLen, returnValue, returnCode = 4096, 0, 0 nameptr := (*uint32)(unsafe.Pointer(uintptr(0x21c))) // Get jobname of current process nameptr = (*uint32)(unsafe.Pointer(uintptr(*nameptr + 12))) argv[0] = unsafe.Pointer(uintptr(*nameptr)) request.header.ident = nwmHeaderIdentifier request.header.length = uint32(unsafe.Sizeof(request.header)) request.header.version = nwmCurrentVer request.header.nwmType = nwmTCPConnType request.header.options = 0x80000000 request.filter.ident = nwmFilterIdentifier var localSockaddr RawSockaddrAny socklen := _Socklen(SizeofSockaddrAny) err := getsockname(fd, &localSockaddr, &socklen) if err != nil { return nil, errnoErr(EINVAL) } if localSockaddr.Addr.Family == AF_INET { localSockaddr := (*RawSockaddrInet4)(unsafe.Pointer(&localSockaddr.Addr)) localSockFilter := (*RawSockaddrInet4)(unsafe.Pointer(&request.filter.local[0])) localSockFilter.Family = AF_INET var i int for i = 0; i < 4; i++ { if localSockaddr.Addr[i] != 0 { break } } if i != 4 { request.filter.flags |= nwmFilterLclAddrMask for i = 0; i < 4; i++ { localSockFilter.Addr[i] = localSockaddr.Addr[i] } } if localSockaddr.Port != 0 { request.filter.flags |= nwmFilterLclPortMask localSockFilter.Port = localSockaddr.Port } } else if localSockaddr.Addr.Family == AF_INET6 { localSockaddr := (*RawSockaddrInet6)(unsafe.Pointer(&localSockaddr.Addr)) localSockFilter := (*RawSockaddrInet6)(unsafe.Pointer(&request.filter.local[0])) localSockFilter.Family = AF_INET6 var i int for i = 0; i < 16; i++ { if localSockaddr.Addr[i] != 0 { break } } if i != 16 { request.filter.flags |= nwmFilterLclAddrMask for i = 0; i < 16; i++ { localSockFilter.Addr[i] = localSockaddr.Addr[i] } } if localSockaddr.Port != 0 { request.filter.flags |= nwmFilterLclPortMask localSockFilter.Port = localSockaddr.Port } } svcCall(EZBNMIF4, &argv[0], &dsa[0]) // outputDesc field is filled by EZBNMIF4 on success if returnCode != 0 || request.header.outputDesc.offset == 0 { return nil, errnoErr(EINVAL) } // Check that EZBNMIF4 returned a nwmConnEntry conn := (*nwmConnEntry)(unsafe.Pointer(&responseBuffer[request.header.outputDesc.offset])) if conn.ident != nwmTCPConnIdentifier { return nil, errnoErr(EINVAL) } // Copy data from the returned data structures into tcpInfo // Stats from nwmConnEntry are specific to that connection. // Stats from nwmTCPStatsEntry are global (to the interface?) // Fields may not be an exact match. Some fields have no equivalent. var tcpinfo TCPInfo tcpinfo.State = uint8(conn.state) tcpinfo.Ca_state = 0 // dummy tcpinfo.Retransmits = uint8(tcpStats.retransSegs) tcpinfo.Probes = uint8(tcpStats.outWinProbes) tcpinfo.Backoff = 0 // dummy tcpinfo.Options = 0 // dummy tcpinfo.Rto = tcpStats.retransTimeouts tcpinfo.Ato = tcpStats.outDelayAcks tcpinfo.Snd_mss = conn.sendMSS tcpinfo.Rcv_mss = conn.sendMSS // dummy tcpinfo.Unacked = 0 // dummy tcpinfo.Sacked = 0 // dummy tcpinfo.Lost = 0 // dummy tcpinfo.Retrans = conn.reXmtCount tcpinfo.Fackets = 0 // dummy tcpinfo.Last_data_sent = uint32(*(*uint64)(unsafe.Pointer(&conn.lastActivity[0]))) tcpinfo.Last_ack_sent = uint32(*(*uint64)(unsafe.Pointer(&conn.outOldestTime[0]))) tcpinfo.Last_data_recv = uint32(*(*uint64)(unsafe.Pointer(&conn.inOldestTime[0]))) tcpinfo.Last_ack_recv = uint32(*(*uint64)(unsafe.Pointer(&conn.inOldestTime[0]))) tcpinfo.Pmtu = conn.sendMSS // dummy, NWMIfRouteMtu is a candidate tcpinfo.Rcv_ssthresh = conn.ssThresh tcpinfo.Rtt = conn.roundTripTime tcpinfo.Rttvar = conn.roundTripVar tcpinfo.Snd_ssthresh = conn.ssThresh // dummy tcpinfo.Snd_cwnd = conn.congestionWnd tcpinfo.Advmss = conn.sendMSS // dummy tcpinfo.Reordering = 0 // dummy tcpinfo.Rcv_rtt = conn.roundTripTime // dummy tcpinfo.Rcv_space = conn.sendMSS // dummy tcpinfo.Total_retrans = conn.reXmtCount svcUnload(&svcNameTable[svc_EZBNMIF4][0], EZBNMIF4) return &tcpinfo, nil } // GetsockoptString returns the string value of the socket option opt for the // socket associated with fd at the given socket level. func GetsockoptString(fd, level, opt int) (string, error) { buf := make([]byte, 256) vallen := _Socklen(len(buf)) err := getsockopt(fd, level, opt, unsafe.Pointer(&buf[0]), &vallen) if err != nil { return "", err } return ByteSliceToString(buf[:vallen]), nil } 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 = 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 { // TODO(neeilan): Remove 0 arg added to get this compiling on z/OS from, err = anyToSockaddr(0, &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 = int32(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 } func Opendir(name string) (uintptr, error) { p, err := BytePtrFromString(name) if err != nil { return 0, err } err = nil runtime.EnterSyscall() dir, e2, e1 := CallLeFuncWithPtrReturn(GetZosLibVec()+SYS___OPENDIR_A<<4, uintptr(unsafe.Pointer(p))) runtime.ExitSyscall() runtime.KeepAlive(unsafe.Pointer(p)) if dir == 0 { err = errnoErr2(e1, e2) } return dir, err } // clearsyscall.Errno resets the errno value to 0. func clearErrno() func Closedir(dir uintptr) error { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_CLOSEDIR<<4, dir) runtime.ExitSyscall() if r0 != 0 { return errnoErr2(e1, e2) } return nil } func Seekdir(dir uintptr, pos int) { runtime.EnterSyscall() CallLeFuncWithErr(GetZosLibVec()+SYS_SEEKDIR<<4, dir, uintptr(pos)) runtime.ExitSyscall() } func Telldir(dir uintptr) (int, error) { p, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_TELLDIR<<4, dir) pos := int(p) if int64(p) == -1 { return pos, errnoErr2(e1, e2) } return pos, nil } // 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 { // struct flock is packed on z/OS. We can't emulate that in Go so // instead we pack it here. var flock [24]byte *(*int16)(unsafe.Pointer(&flock[0])) = lk.Type *(*int16)(unsafe.Pointer(&flock[2])) = lk.Whence *(*int64)(unsafe.Pointer(&flock[4])) = lk.Start *(*int64)(unsafe.Pointer(&flock[12])) = lk.Len *(*int32)(unsafe.Pointer(&flock[20])) = lk.Pid runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCNTL<<4, fd, uintptr(cmd), uintptr(unsafe.Pointer(&flock))) runtime.ExitSyscall() lk.Type = *(*int16)(unsafe.Pointer(&flock[0])) lk.Whence = *(*int16)(unsafe.Pointer(&flock[2])) lk.Start = *(*int64)(unsafe.Pointer(&flock[4])) lk.Len = *(*int64)(unsafe.Pointer(&flock[12])) lk.Pid = *(*int32)(unsafe.Pointer(&flock[20])) if r0 == 0 { return nil } return errnoErr2(e1, e2) } func impl_Flock(fd int, how int) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FLOCK<<4, uintptr(fd), uintptr(how)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_FlockAddr() *(func(fd int, how int) (err error)) var Flock = enter_Flock func validFlock(fp uintptr) bool { if funcptrtest(GetZosLibVec()+SYS_FLOCK<<4, "") == 0 { if name, err := getLeFuncName(GetZosLibVec() + SYS_FLOCK<<4); err == nil { return name == "flock" } } return false } func enter_Flock(fd int, how int) (err error) { funcref := get_FlockAddr() if validFlock(GetZosLibVec() + SYS_FLOCK<<4) { *funcref = impl_Flock } else { *funcref = legacyFlock } return (*funcref)(fd, how) } func legacyFlock(fd int, how int) error { var flock_type int16 var fcntl_cmd int switch how { case LOCK_SH | LOCK_NB: flock_type = F_RDLCK fcntl_cmd = F_SETLK case LOCK_EX | LOCK_NB: flock_type = F_WRLCK fcntl_cmd = F_SETLK case LOCK_EX: flock_type = F_WRLCK fcntl_cmd = F_SETLKW case LOCK_UN: flock_type = F_UNLCK fcntl_cmd = F_SETLKW default: } flock := Flock_t{ Type: int16(flock_type), Whence: int16(0), Start: int64(0), Len: int64(0), Pid: int32(Getppid()), } err := FcntlFlock(uintptr(fd), fcntl_cmd, &flock) return err } func Mlock(b []byte) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MLOCKALL<<4, _BPX_NONSWAP) runtime.ExitSyscall() if r0 != 0 { err = errnoErr2(e1, e2) } return } func Mlock2(b []byte, flags int) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MLOCKALL<<4, _BPX_NONSWAP) runtime.ExitSyscall() if r0 != 0 { err = errnoErr2(e1, e2) } return } func Mlockall(flags int) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MLOCKALL<<4, _BPX_NONSWAP) runtime.ExitSyscall() if r0 != 0 { err = errnoErr2(e1, e2) } return } func Munlock(b []byte) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MLOCKALL<<4, _BPX_SWAP) runtime.ExitSyscall() if r0 != 0 { err = errnoErr2(e1, e2) } return } func Munlockall() (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MLOCKALL<<4, _BPX_SWAP) runtime.ExitSyscall() if r0 != 0 { err = errnoErr2(e1, e2) } return } func ClockGettime(clockid int32, ts *Timespec) error { var ticks_per_sec uint32 = 100 //TODO(kenan): value is currently hardcoded; need sysconf() call otherwise var nsec_per_sec int64 = 1000000000 if ts == nil { return EFAULT } if clockid == CLOCK_REALTIME || clockid == CLOCK_MONOTONIC { var nanotime int64 = runtime.Nanotime1() ts.Sec = nanotime / nsec_per_sec ts.Nsec = nanotime % nsec_per_sec } else if clockid == CLOCK_PROCESS_CPUTIME_ID || clockid == CLOCK_THREAD_CPUTIME_ID { var tm Tms _, err := Times(&tm) if err != nil { return EFAULT } ts.Sec = int64(tm.Utime / ticks_per_sec) ts.Nsec = int64(tm.Utime) * nsec_per_sec / int64(ticks_per_sec) } else { return EINVAL } return nil } // Chtag //go:nosplit func get_ChtagAddr() *(func(path string, ccsid uint64, textbit uint64) error) var Chtag = enter_Chtag func enter_Chtag(path string, ccsid uint64, textbit uint64) error { funcref := get_ChtagAddr() if validSetxattr() { *funcref = impl_Chtag } else { *funcref = legacy_Chtag } return (*funcref)(path, ccsid, textbit) } func legacy_Chtag(path string, ccsid uint64, textbit uint64) error { tag := ccsid<<16 | textbit<<15 var tag_buff [8]byte DecodeData(tag_buff[:], 8, tag) return Setxattr(path, "filetag", tag_buff[:], XATTR_REPLACE) } func impl_Chtag(path string, ccsid uint64, textbit uint64) error { tag := ccsid<<16 | textbit<<15 var tag_buff [4]byte DecodeData(tag_buff[:], 4, tag) return Setxattr(path, "system.filetag", tag_buff[:], XATTR_REPLACE) } // End of Chtag // Nanosleep //go:nosplit func get_NanosleepAddr() *(func(time *Timespec, leftover *Timespec) error) var Nanosleep = enter_Nanosleep func enter_Nanosleep(time *Timespec, leftover *Timespec) error { funcref := get_NanosleepAddr() if funcptrtest(GetZosLibVec()+SYS_NANOSLEEP<<4, "") == 0 { *funcref = impl_Nanosleep } else { *funcref = legacyNanosleep } return (*funcref)(time, leftover) } func impl_Nanosleep(time *Timespec, leftover *Timespec) error { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_NANOSLEEP<<4, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover))) runtime.ExitSyscall() if int64(r0) == -1 { return errnoErr2(e1, e2) } return nil } func legacyNanosleep(time *Timespec, leftover *Timespec) error { t0 := runtime.Nanotime1() var secrem uint32 var nsecrem uint32 total := time.Sec*1000000000 + time.Nsec elapsed := runtime.Nanotime1() - t0 var rv int32 var rc int32 var err error // repeatedly sleep for 1 second until less than 1 second left for total-elapsed > 1000000000 { rv, rc, _ = BpxCondTimedWait(uint32(1), uint32(0), uint32(CW_CONDVAR), &secrem, &nsecrem) if rv != 0 && rc != 112 { // 112 is EAGAIN if leftover != nil && rc == 120 { // 120 is EINTR leftover.Sec = int64(secrem) leftover.Nsec = int64(nsecrem) } err = Errno(rc) return err } elapsed = runtime.Nanotime1() - t0 } // sleep the remainder if total > elapsed { rv, rc, _ = BpxCondTimedWait(uint32(0), uint32(total-elapsed), uint32(CW_CONDVAR), &secrem, &nsecrem) } if leftover != nil && rc == 120 { leftover.Sec = int64(secrem) leftover.Nsec = int64(nsecrem) } if rv != 0 && rc != 112 { err = Errno(rc) } return err } // End of Nanosleep var ( Stdin = 0 Stdout = 1 Stderr = 2 ) // Do the interface allocations only once for common // Errno values. var ( errEAGAIN error = syscall.EAGAIN errEINVAL error = syscall.EINVAL errENOENT error = syscall.ENOENT ) var ZosTraceLevel int var ZosTracefile *os.File var ( signalNameMapOnce sync.Once signalNameMap map[string]syscall.Signal ) // errnoErr returns common boxed Errno values, to prevent // allocations at runtime. func errnoErr(e Errno) error { switch e { case 0: return nil case EAGAIN: return errEAGAIN case EINVAL: return errEINVAL case ENOENT: return errENOENT } return e } var reg *regexp.Regexp // enhanced with zos specific errno2 func errnoErr2(e Errno, e2 uintptr) error { switch e { case 0: return nil case EAGAIN: return errEAGAIN /* Allow the retrieval of errno2 for EINVAL and ENOENT on zos case EINVAL: return errEINVAL case ENOENT: return errENOENT */ } if ZosTraceLevel > 0 { var name string if reg == nil { reg = regexp.MustCompile("(^unix\\.[^/]+$|.*\\/unix\\.[^/]+$)") } i := 1 pc, file, line, ok := runtime.Caller(i) if ok { name = runtime.FuncForPC(pc).Name() } for ok && reg.MatchString(runtime.FuncForPC(pc).Name()) { i += 1 pc, file, line, ok = runtime.Caller(i) } if ok { if ZosTracefile == nil { ZosConsolePrintf("From %s:%d\n", file, line) ZosConsolePrintf("%s: %s (errno2=0x%x)\n", name, e.Error(), e2) } else { fmt.Fprintf(ZosTracefile, "From %s:%d\n", file, line) fmt.Fprintf(ZosTracefile, "%s: %s (errno2=0x%x)\n", name, e.Error(), e2) } } else { if ZosTracefile == nil { ZosConsolePrintf("%s (errno2=0x%x)\n", e.Error(), e2) } else { fmt.Fprintf(ZosTracefile, "%s (errno2=0x%x)\n", e.Error(), e2) } } } return e } // ErrnoName returns the error name for error number e. func ErrnoName(e Errno) string { i := sort.Search(len(errorList), func(i int) bool { return errorList[i].num >= e }) if i < len(errorList) && errorList[i].num == e { return errorList[i].name } return "" } // SignalName returns the signal name for signal number s. func SignalName(s syscall.Signal) string { i := sort.Search(len(signalList), func(i int) bool { return signalList[i].num >= s }) if i < len(signalList) && signalList[i].num == s { return signalList[i].name } return "" } // SignalNum returns the syscall.Signal for signal named s, // or 0 if a signal with such name is not found. // The signal name should start with "SIG". func SignalNum(s string) syscall.Signal { signalNameMapOnce.Do(func() { signalNameMap = make(map[string]syscall.Signal, len(signalList)) for _, signal := range signalList { signalNameMap[signal.name] = signal.num } }) return signalNameMap[s] } // clen returns the index of the first NULL byte in n or len(n) if n contains no NULL byte. func clen(n []byte) int { i := bytes.IndexByte(n, 0) if i == -1 { i = len(n) } return i } // 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 } // Set __MAP_64 by default flags |= __MAP_64 // 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 // Sockaddr represents a socket address. type Sockaddr interface { sockaddr() (ptr unsafe.Pointer, len _Socklen, err error) // lowercase; only we can define Sockaddrs } // SockaddrInet4 implements the Sockaddr interface for AF_INET type sockets. type SockaddrInet4 struct { Port int Addr [4]byte raw RawSockaddrInet4 } // SockaddrInet6 implements the Sockaddr interface for AF_INET6 type sockets. type SockaddrInet6 struct { Port int ZoneId uint32 Addr [16]byte raw RawSockaddrInet6 } // SockaddrUnix implements the Sockaddr interface for AF_UNIX type sockets. 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(fd, &rsa) } 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 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 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 } func GetsockoptLinger(fd, level, opt int) (*Linger, error) { var linger Linger vallen := _Socklen(SizeofLinger) err := getsockopt(fd, level, opt, unsafe.Pointer(&linger), &vallen) return &linger, err } func GetsockoptTimeval(fd, level, opt int) (*Timeval, error) { var tv Timeval vallen := _Socklen(unsafe.Sizeof(tv)) err := getsockopt(fd, level, opt, unsafe.Pointer(&tv), &vallen) return &tv, err } func GetsockoptUint64(fd, level, opt int) (value uint64, err error) { var n uint64 vallen := _Socklen(8) err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen) return 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(fd, &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) { var p unsafe.Pointer if len(s) > 0 { p = unsafe.Pointer(&[]byte(s)[0]) } return setsockopt(fd, level, opt, p, 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 SetsockoptUint64(fd, level, opt int, value uint64) (err error) { return setsockopt(fd, level, opt, unsafe.Pointer(&value), 8) } 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 } 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 } // Exec calls execve(2), which replaces the calling executable in the process // tree. argv0 should be the full path to an executable ("/bin/ls") and the // executable name should also be the first argument in argv (["ls", "-l"]). // envv are the environment variables that should be passed to the new // process (["USER=go", "PWD=/tmp"]). func Exec(argv0 string, argv []string, envv []string) error { return syscall.Exec(argv0, argv, envv) } func Getag(path string) (ccsid uint16, flag uint16, err error) { var val [8]byte sz, err := Getxattr(path, "ccsid", val[:]) if err != nil { return } ccsid = uint16(EncodeData(val[0:sz])) sz, err = Getxattr(path, "flags", val[:]) if err != nil { return } flag = uint16(EncodeData(val[0:sz]) >> 15) return } // Mount begin func impl_Mount(source string, target string, fstype string, flags uintptr, data string) (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 } var _p3 *byte _p3, err = BytePtrFromString(data) if err != nil { return } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MOUNT1_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(_p3))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_MountAddr() *(func(source string, target string, fstype string, flags uintptr, data string) (err error)) var Mount = enter_Mount func enter_Mount(source string, target string, fstype string, flags uintptr, data string) (err error) { funcref := get_MountAddr() if validMount() { *funcref = impl_Mount } else { *funcref = legacyMount } return (*funcref)(source, target, fstype, flags, data) } func legacyMount(source string, target string, fstype string, flags uintptr, data string) (err error) { if needspace := 8 - len(fstype); needspace <= 0 { fstype = fstype[0:8] } else { fstype += " "[0:needspace] } return mount_LE(target, source, fstype, uint32(flags), int32(len(data)), data) } func validMount() bool { if funcptrtest(GetZosLibVec()+SYS___MOUNT1_A<<4, "") == 0 { if name, err := getLeFuncName(GetZosLibVec() + SYS___MOUNT1_A<<4); err == nil { return name == "__mount1_a" } } return false } // Mount end // Unmount begin func impl_Unmount(target string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(target) if err != nil { return } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UMOUNT2_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(flags)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_UnmountAddr() *(func(target string, flags int) (err error)) var Unmount = enter_Unmount func enter_Unmount(target string, flags int) (err error) { funcref := get_UnmountAddr() if funcptrtest(GetZosLibVec()+SYS___UMOUNT2_A<<4, "") == 0 { *funcref = impl_Unmount } else { *funcref = legacyUnmount } return (*funcref)(target, flags) } func legacyUnmount(name string, mtm int) (err error) { // mountpoint is always a full path and starts with a '/' // check if input string is not a mountpoint but a filesystem name if name[0] != '/' { return unmount_LE(name, mtm) } // treat name as mountpoint b2s := func(arr []byte) string { var str string for i := 0; i < len(arr); i++ { if arr[i] == 0 { str = string(arr[:i]) break } } return str } var buffer struct { header W_Mnth fsinfo [64]W_Mntent } fs_count, err := W_Getmntent_A((*byte)(unsafe.Pointer(&buffer)), int(unsafe.Sizeof(buffer))) if err == nil { err = EINVAL for i := 0; i < fs_count; i++ { if b2s(buffer.fsinfo[i].Mountpoint[:]) == name { err = unmount_LE(b2s(buffer.fsinfo[i].Fsname[:]), mtm) break } } } else if fs_count == 0 { err = EINVAL } return err } // Unmount end func direntIno(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino)) } func direntReclen(buf []byte) (uint64, bool) { return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen)) } func direntNamlen(buf []byte) (uint64, bool) { reclen, ok := direntReclen(buf) if !ok { return 0, false } return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true } func direntLeToDirentUnix(dirent *direntLE, dir uintptr, path string) (Dirent, error) { var d Dirent d.Ino = uint64(dirent.Ino) offset, err := Telldir(dir) if err != nil { return d, err } d.Off = int64(offset) s := string(bytes.Split(dirent.Name[:], []byte{0})[0]) copy(d.Name[:], s) d.Reclen = uint16(24 + len(d.NameString())) var st Stat_t path = path + "/" + s err = Lstat(path, &st) if err != nil { return d, err } d.Type = uint8(st.Mode >> 24) return d, err } func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { // Simulation of Getdirentries port from the Darwin implementation. // COMMENTS FROM DARWIN: // It's not the full required semantics, but should handle the case // of calling Getdirentries or ReadDirent repeatedly. // It won't handle assigning the results of lseek to *basep, or handle // the directory being edited underfoot. skip, err := Seek(fd, 0, 1 /* SEEK_CUR */) if err != nil { return 0, err } // Get path from fd to avoid unavailable call (fdopendir) path, err := ZosFdToPath(fd) if err != nil { return 0, err } d, err := Opendir(path) if err != nil { return 0, err } defer Closedir(d) var cnt int64 for { var entryLE direntLE var entrypLE *direntLE e := Readdir_r(d, &entryLE, &entrypLE) if e != nil { return n, e } if entrypLE == nil { break } if skip > 0 { skip-- cnt++ continue } // Dirent on zos has a different structure entry, e := direntLeToDirentUnix(&entryLE, d, path) if e != nil { return n, e } reclen := int(entry.Reclen) if reclen > len(buf) { // Not enough room. Return for now. // The counter will let us know where we should start up again. // Note: this strategy for suspending in the middle and // restarting is O(n^2) in the length of the directory. Oh well. break } // Copy entry into return buffer. s := unsafe.Slice((*byte)(unsafe.Pointer(&entry)), reclen) copy(buf, s) buf = buf[reclen:] n += reclen cnt++ } // Set the seek offset of the input fd to record // how many files we've already returned. _, err = Seek(fd, cnt, 0 /* SEEK_SET */) if err != nil { return n, err } return n, nil } func Err2ad() (eadd *int) { r0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS___ERR2AD<<4) eadd = (*int)(unsafe.Pointer(r0)) return } func ZosConsolePrintf(format string, v ...interface{}) (int, error) { type __cmsg struct { _ uint16 _ [2]uint8 __msg_length uint32 __msg uintptr _ [4]uint8 } msg := fmt.Sprintf(format, v...) strptr := unsafe.Pointer((*reflect.StringHeader)(unsafe.Pointer(&msg)).Data) len := (*reflect.StringHeader)(unsafe.Pointer(&msg)).Len cmsg := __cmsg{__msg_length: uint32(len), __msg: uintptr(strptr)} cmd := uint32(0) runtime.EnterSyscall() rc, err2, err1 := CallLeFuncWithErr(GetZosLibVec()+SYS_____CONSOLE_A<<4, uintptr(unsafe.Pointer(&cmsg)), 0, uintptr(unsafe.Pointer(&cmd))) runtime.ExitSyscall() if rc != 0 { return 0, fmt.Errorf("%s (errno2=0x%x)\n", err1.Error(), err2) } return 0, nil } func ZosStringToEbcdicBytes(str string, nullterm bool) (ebcdicBytes []byte) { if nullterm { ebcdicBytes = []byte(str + "\x00") } else { ebcdicBytes = []byte(str) } A2e(ebcdicBytes) return } func ZosEbcdicBytesToString(b []byte, trimRight bool) (str string) { res := make([]byte, len(b)) copy(res, b) E2a(res) if trimRight { str = string(bytes.TrimRight(res, " \x00")) } else { str = string(res) } return } func fdToPath(dirfd int) (path string, err error) { var buffer [1024]byte // w_ctrl() ret := runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS_W_IOCTL<<4, []uintptr{uintptr(dirfd), 17, 1024, uintptr(unsafe.Pointer(&buffer[0]))}) if ret == 0 { zb := bytes.IndexByte(buffer[:], 0) if zb == -1 { zb = len(buffer) } // __e2a_l() runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___E2A_L<<4, []uintptr{uintptr(unsafe.Pointer(&buffer[0])), uintptr(zb)}) return string(buffer[:zb]), nil } // __errno() errno := int(*(*int32)(unsafe.Pointer(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO<<4, []uintptr{})))) // __errno2() errno2 := int(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO2<<4, []uintptr{})) // strerror_r() ret = runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS_STRERROR_R<<4, []uintptr{uintptr(errno), uintptr(unsafe.Pointer(&buffer[0])), 1024}) if ret == 0 { zb := bytes.IndexByte(buffer[:], 0) if zb == -1 { zb = len(buffer) } return "", fmt.Errorf("%s (errno2=0x%x)", buffer[:zb], errno2) } else { return "", fmt.Errorf("fdToPath errno %d (errno2=0x%x)", errno, errno2) } } func impl_Mkfifoat(dirfd int, path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MKFIFOAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_MkfifoatAddr() *(func(dirfd int, path string, mode uint32) (err error)) var Mkfifoat = enter_Mkfifoat func enter_Mkfifoat(dirfd int, path string, mode uint32) (err error) { funcref := get_MkfifoatAddr() if funcptrtest(GetZosLibVec()+SYS___MKFIFOAT_A<<4, "") == 0 { *funcref = impl_Mkfifoat } else { *funcref = legacy_Mkfifoat } return (*funcref)(dirfd, path, mode) } func legacy_Mkfifoat(dirfd int, path string, mode uint32) (err error) { dirname, err := ZosFdToPath(dirfd) if err != nil { return err } return Mkfifo(dirname+"/"+path, mode) } //sys Posix_openpt(oflag int) (fd int, err error) = SYS_POSIX_OPENPT //sys Grantpt(fildes int) (rc int, err error) = SYS_GRANTPT //sys Unlockpt(fildes int) (rc int, err error) = SYS_UNLOCKPT ================================================ FILE: vendor/golang.org/x/sys/unix/sysvshm_linux.go ================================================ // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build linux package unix import "runtime" // SysvShmCtl performs control operations on the shared memory segment // specified by id. func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { if runtime.GOARCH == "arm" || runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" { cmd |= ipc_64 } return shmctl(id, cmd, desc) } ================================================ FILE: vendor/golang.org/x/sys/unix/sysvshm_unix.go ================================================ // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build (darwin && !ios) || linux || zos package unix import "unsafe" // SysvShmAttach attaches the Sysv shared memory segment associated with the // shared memory identifier id. func SysvShmAttach(id int, addr uintptr, flag int) ([]byte, error) { addr, errno := shmat(id, addr, flag) if errno != nil { return nil, errno } // Retrieve the size of the shared memory to enable slice creation var info SysvShmDesc _, err := SysvShmCtl(id, IPC_STAT, &info) if err != nil { // release the shared memory if we can't find the size // ignoring error from shmdt as there's nothing sensible to return here shmdt(addr) return nil, err } // Use unsafe to convert addr into a []byte. b := unsafe.Slice((*byte)(unsafe.Pointer(addr)), int(info.Segsz)) return b, nil } // SysvShmDetach unmaps the shared memory slice returned from SysvShmAttach. // // It is not safe to use the slice after calling this function. func SysvShmDetach(data []byte) error { if len(data) == 0 { return EINVAL } return shmdt(uintptr(unsafe.Pointer(&data[0]))) } // SysvShmGet returns the Sysv shared memory identifier associated with key. // If the IPC_CREAT flag is specified a new segment is created. func SysvShmGet(key, size, flag int) (id int, err error) { return shmget(key, size, flag) } ================================================ FILE: vendor/golang.org/x/sys/unix/sysvshm_unix_other.go ================================================ // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build (darwin && !ios) || zos package unix // SysvShmCtl performs control operations on the shared memory segment // specified by id. func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { return shmctl(id, cmd, desc) } ================================================ FILE: vendor/golang.org/x/sys/unix/timestruct.go ================================================ // Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos package unix import "time" // TimespecToNsec returns the time stored in ts as nanoseconds. func TimespecToNsec(ts Timespec) int64 { return ts.Nano() } // NsecToTimespec converts a number of nanoseconds into a Timespec. func NsecToTimespec(nsec int64) Timespec { sec := nsec / 1e9 nsec = nsec % 1e9 if nsec < 0 { nsec += 1e9 sec-- } return setTimespec(sec, nsec) } // TimeToTimespec converts t into a Timespec. // On some 32-bit systems the range of valid Timespec values are smaller // than that of time.Time values. So if t is out of the valid range of // Timespec, it returns a zero Timespec and ERANGE. func TimeToTimespec(t time.Time) (Timespec, error) { sec := t.Unix() nsec := int64(t.Nanosecond()) ts := setTimespec(sec, nsec) // Currently all targets have either int32 or int64 for Timespec.Sec. // If there were a new target with floating point type for it, we have // to consider the rounding error. if int64(ts.Sec) != sec { return Timespec{}, ERANGE } return ts, nil } // TimevalToNsec returns the time stored in tv as nanoseconds. func TimevalToNsec(tv Timeval) int64 { return tv.Nano() } // NsecToTimeval converts a number of nanoseconds into a Timeval. func NsecToTimeval(nsec int64) Timeval { nsec += 999 // round up to microsecond usec := nsec % 1e9 / 1e3 sec := nsec / 1e9 if usec < 0 { usec += 1e6 sec-- } return setTimeval(sec, usec) } // Unix returns the time stored in ts as seconds plus nanoseconds. func (ts *Timespec) Unix() (sec int64, nsec int64) { return int64(ts.Sec), int64(ts.Nsec) } // Unix returns the time stored in tv as seconds plus nanoseconds. func (tv *Timeval) Unix() (sec int64, nsec int64) { return int64(tv.Sec), int64(tv.Usec) * 1000 } // Nano returns the time stored in ts as nanoseconds. func (ts *Timespec) Nano() int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } // Nano returns the time stored in tv as nanoseconds. func (tv *Timeval) Nano() int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000 } ================================================ FILE: vendor/golang.org/x/sys/unix/unveil_openbsd.go ================================================ // Copyright 2018 The Go 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 "fmt" // Unveil implements the unveil syscall. // For more information see unveil(2). // Note that the special case of blocking further // unveil calls is handled by UnveilBlock. func Unveil(path string, flags string) error { if err := supportsUnveil(); err != nil { return err } pathPtr, err := BytePtrFromString(path) if err != nil { return err } flagsPtr, err := BytePtrFromString(flags) if err != nil { return err } return unveil(pathPtr, flagsPtr) } // UnveilBlock blocks future unveil calls. // For more information see unveil(2). func UnveilBlock() error { if err := supportsUnveil(); err != nil { return err } return unveil(nil, nil) } // supportsUnveil checks for availability of the unveil(2) system call based // on the running OpenBSD version. func supportsUnveil() error { maj, min, err := majmin() if err != nil { return err } // unveil is not available before 6.4 if maj < 6 || (maj == 6 && min <= 3) { return fmt.Errorf("cannot call Unveil on OpenBSD %d.%d", maj, min) } return nil } ================================================ FILE: vendor/golang.org/x/sys/unix/xattr_bsd.go ================================================ // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build freebsd || netbsd package unix import ( "strings" "unsafe" ) // Derive extattr namespace and attribute name func xattrnamespace(fullattr string) (ns int, attr string, err error) { s := strings.IndexByte(fullattr, '.') 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]) } if dest != nil { // extattr_get_file and extattr_list_file treat NULL differently from // a non-NULL pointer of length zero. Preserve the property of nilness, // even if we can't use dest directly. return unsafe.Pointer(&_zero) } return nil } // FreeBSD and NetBSD implement their 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) { var d unsafe.Pointer if len(data) > 0 { 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) { var d unsafe.Pointer if len(data) > 0 { 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) { var d unsafe.Pointer if len(data) > 0 { 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) { destsiz := len(dest) // FreeBSD won't allow you to list xattrs from multiple namespaces s, pos := 0, 0 for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} { stmp, e := ListxattrNS(file, nsid, dest[pos:]) /* 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 { if e == EPERM && nsid != EXTATTR_NAMESPACE_USER { continue } return s, e } s += stmp pos = s if pos > destsiz { pos = destsiz } } return s, nil } func ListxattrNS(file string, nsid int, dest []byte) (sz int, err error) { d := initxattrdest(dest, 0) destsiz := len(dest) s, e := ExtattrListFile(file, nsid, uintptr(d), destsiz) if e != nil { return 0, err } return s, nil } func Flistxattr(fd int, dest []byte) (sz int, err error) { destsiz := len(dest) s, pos := 0, 0 for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} { stmp, e := FlistxattrNS(fd, nsid, dest[pos:]) if e != nil { if e == EPERM && nsid != EXTATTR_NAMESPACE_USER { continue } return s, e } s += stmp pos = s if pos > destsiz { pos = destsiz } } return s, nil } func FlistxattrNS(fd int, nsid int, dest []byte) (sz int, err error) { d := initxattrdest(dest, 0) destsiz := len(dest) s, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz) if e != nil { return 0, err } return s, nil } func Llistxattr(link string, dest []byte) (sz int, err error) { destsiz := len(dest) s, pos := 0, 0 for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} { stmp, e := LlistxattrNS(link, nsid, dest[pos:]) if e != nil { if e == EPERM && nsid != EXTATTR_NAMESPACE_USER { continue } return s, e } s += stmp pos = s if pos > destsiz { pos = destsiz } } return s, nil } func LlistxattrNS(link string, nsid int, dest []byte) (sz int, err error) { d := initxattrdest(dest, 0) destsiz := len(dest) s, e := ExtattrListLink(link, nsid, uintptr(d), destsiz) if e != nil { return 0, err } return s, nil } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go ================================================ // mkerrors.sh -maix32 // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc && aix // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- -maix32 _const.go package unix import "syscall" const ( AF_APPLETALK = 0x10 AF_BYPASS = 0x19 AF_CCITT = 0xa AF_CHAOS = 0x5 AF_DATAKIT = 0x9 AF_DECnet = 0xc AF_DLI = 0xd AF_ECMA = 0x8 AF_HYLINK = 0xf AF_IMPLINK = 0x3 AF_INET = 0x2 AF_INET6 = 0x18 AF_INTF = 0x14 AF_ISO = 0x7 AF_LAT = 0xe AF_LINK = 0x12 AF_LOCAL = 0x1 AF_MAX = 0x1e AF_NDD = 0x17 AF_NETWARE = 0x16 AF_NS = 0x6 AF_OSI = 0x7 AF_PUP = 0x4 AF_RIF = 0x15 AF_ROUTE = 0x11 AF_SNA = 0xb AF_UNIX = 0x1 AF_UNSPEC = 0x0 ALTWERASE = 0x400000 ARPHRD_802_3 = 0x6 ARPHRD_802_5 = 0x6 ARPHRD_ETHER = 0x1 ARPHRD_FDDI = 0x1 B0 = 0x0 B110 = 0x3 B1200 = 0x9 B134 = 0x4 B150 = 0x5 B1800 = 0xa B19200 = 0xe B200 = 0x6 B2400 = 0xb B300 = 0x7 B38400 = 0xf B4800 = 0xc B50 = 0x1 B600 = 0x8 B75 = 0x2 B9600 = 0xd BRKINT = 0x2 BS0 = 0x0 BS1 = 0x1000 BSDLY = 0x1000 CAP_AACCT = 0x6 CAP_ARM_APPLICATION = 0x5 CAP_BYPASS_RAC_VMM = 0x3 CAP_CLEAR = 0x0 CAP_CREDENTIALS = 0x7 CAP_EFFECTIVE = 0x1 CAP_EWLM_AGENT = 0x4 CAP_INHERITABLE = 0x2 CAP_MAXIMUM = 0x7 CAP_NUMA_ATTACH = 0x2 CAP_PERMITTED = 0x3 CAP_PROPAGATE = 0x1 CAP_PROPOGATE = 0x1 CAP_SET = 0x1 CBAUD = 0xf CFLUSH = 0xf CIBAUD = 0xf0000 CLOCAL = 0x800 CLOCK_MONOTONIC = 0xa CLOCK_PROCESS_CPUTIME_ID = 0xb CLOCK_REALTIME = 0x9 CLOCK_THREAD_CPUTIME_ID = 0xc CR0 = 0x0 CR1 = 0x100 CR2 = 0x200 CR3 = 0x300 CRDLY = 0x300 CREAD = 0x80 CS5 = 0x0 CS6 = 0x10 CS7 = 0x20 CS8 = 0x30 CSIOCGIFCONF = -0x3ff796dc CSIZE = 0x30 CSMAP_DIR = "/usr/lib/nls/csmap/" CSTART = '\021' CSTOP = '\023' CSTOPB = 0x40 CSUSP = 0x1a ECHO = 0x8 ECHOCTL = 0x20000 ECHOE = 0x10 ECHOK = 0x20 ECHOKE = 0x80000 ECHONL = 0x40 ECHOPRT = 0x40000 ECH_ICMPID = 0x2 ETHERNET_CSMACD = 0x6 EVENP = 0x80 EXCONTINUE = 0x0 EXDLOK = 0x3 EXIO = 0x2 EXPGIO = 0x0 EXRESUME = 0x2 EXRETURN = 0x1 EXSIG = 0x4 EXTA = 0xe EXTB = 0xf EXTRAP = 0x1 EYEC_RTENTRYA = 0x257274656e747241 EYEC_RTENTRYF = 0x257274656e747246 E_ACC = 0x0 FD_CLOEXEC = 0x1 FD_SETSIZE = 0xfffe FF0 = 0x0 FF1 = 0x2000 FFDLY = 0x2000 FLUSHBAND = 0x40 FLUSHLOW = 0x8 FLUSHO = 0x100000 FLUSHR = 0x1 FLUSHRW = 0x3 FLUSHW = 0x2 F_CLOSEM = 0xa F_DUP2FD = 0xe F_DUPFD = 0x0 F_GETFD = 0x1 F_GETFL = 0x3 F_GETLK = 0x5 F_GETLK64 = 0xb F_GETOWN = 0x8 F_LOCK = 0x1 F_OK = 0x0 F_RDLCK = 0x1 F_SETFD = 0x2 F_SETFL = 0x4 F_SETLK = 0x6 F_SETLK64 = 0xc F_SETLKW = 0x7 F_SETLKW64 = 0xd F_SETOWN = 0x9 F_TEST = 0x3 F_TLOCK = 0x2 F_TSTLK = 0xf F_ULOCK = 0x0 F_UNLCK = 0x3 F_WRLCK = 0x2 HUPCL = 0x400 IBSHIFT = 0x10 ICANON = 0x2 ICMP6_FILTER = 0x26 ICMP6_SEC_SEND_DEL = 0x46 ICMP6_SEC_SEND_GET = 0x47 ICMP6_SEC_SEND_SET = 0x44 ICMP6_SEC_SEND_SET_CGA_ADDR = 0x45 ICRNL = 0x100 IEXTEN = 0x200000 IFA_FIRSTALIAS = 0x2000 IFA_ROUTE = 0x1 IFF_64BIT = 0x4000000 IFF_ALLCAST = 0x20000 IFF_ALLMULTI = 0x200 IFF_BPF = 0x8000000 IFF_BRIDGE = 0x40000 IFF_BROADCAST = 0x2 IFF_CANTCHANGE = 0x80c52 IFF_CHECKSUM_OFFLOAD = 0x10000000 IFF_D1 = 0x8000 IFF_D2 = 0x4000 IFF_D3 = 0x2000 IFF_D4 = 0x1000 IFF_DEBUG = 0x4 IFF_DEVHEALTH = 0x4000 IFF_DO_HW_LOOPBACK = 0x10000 IFF_GROUP_ROUTING = 0x2000000 IFF_IFBUFMGT = 0x800000 IFF_LINK0 = 0x100000 IFF_LINK1 = 0x200000 IFF_LINK2 = 0x400000 IFF_LOOPBACK = 0x8 IFF_MULTICAST = 0x80000 IFF_NOARP = 0x80 IFF_NOECHO = 0x800 IFF_NOTRAILERS = 0x20 IFF_OACTIVE = 0x400 IFF_POINTOPOINT = 0x10 IFF_PROMISC = 0x100 IFF_PSEG = 0x40000000 IFF_RUNNING = 0x40 IFF_SIMPLEX = 0x800 IFF_SNAP = 0x8000 IFF_TCP_DISABLE_CKSUM = 0x20000000 IFF_TCP_NOCKSUM = 0x1000000 IFF_UP = 0x1 IFF_VIPA = 0x80000000 IFNAMSIZ = 0x10 IFO_FLUSH = 0x1 IFT_1822 = 0x2 IFT_AAL5 = 0x31 IFT_ARCNET = 0x23 IFT_ARCNETPLUS = 0x24 IFT_ATM = 0x25 IFT_CEPT = 0x13 IFT_CLUSTER = 0x3e IFT_DS3 = 0x1e IFT_EON = 0x19 IFT_ETHER = 0x6 IFT_FCS = 0x3a IFT_FDDI = 0xf IFT_FRELAY = 0x20 IFT_FRELAYDCE = 0x2c IFT_GIFTUNNEL = 0x3c IFT_HDH1822 = 0x3 IFT_HF = 0x3d IFT_HIPPI = 0x2f IFT_HSSI = 0x2e IFT_HY = 0xe IFT_IB = 0xc7 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_SN = 0x38 IFT_SONET = 0x27 IFT_SONETPATH = 0x32 IFT_SONETVT = 0x33 IFT_SP = 0x39 IFT_STARLAN = 0xb IFT_T1 = 0x12 IFT_TUNNEL = 0x3b IFT_ULTRA = 0x1d IFT_V35 = 0x2d IFT_VIPA = 0x37 IFT_X25 = 0x5 IFT_X25DDN = 0x4 IFT_X25PLE = 0x28 IFT_XETHER = 0x1a IGNBRK = 0x1 IGNCR = 0x80 IGNPAR = 0x4 IMAXBEL = 0x10000 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_USE = 0x1 IPPROTO_AH = 0x33 IPPROTO_BIP = 0x53 IPPROTO_DSTOPTS = 0x3c IPPROTO_EGP = 0x8 IPPROTO_EON = 0x50 IPPROTO_ESP = 0x32 IPPROTO_FRAGMENT = 0x2c IPPROTO_GGP = 0x3 IPPROTO_GIF = 0x8c 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_LOCAL = 0x3f IPPROTO_MAX = 0x100 IPPROTO_MH = 0x87 IPPROTO_NONE = 0x3b IPPROTO_PUP = 0xc IPPROTO_QOS = 0x2d IPPROTO_RAW = 0xff IPPROTO_ROUTING = 0x2b IPPROTO_RSVP = 0x2e IPPROTO_SCTP = 0x84 IPPROTO_TCP = 0x6 IPPROTO_TP = 0x1d IPPROTO_UDP = 0x11 IPV6_ADDRFORM = 0x16 IPV6_ADDR_PREFERENCES = 0x4a IPV6_ADD_MEMBERSHIP = 0xc IPV6_AIXRAWSOCKET = 0x39 IPV6_CHECKSUM = 0x27 IPV6_DONTFRAG = 0x2d IPV6_DROP_MEMBERSHIP = 0xd IPV6_DSTOPTS = 0x36 IPV6_FLOWINFO_FLOWLABEL = 0xffffff IPV6_FLOWINFO_PRIFLOW = 0xfffffff IPV6_FLOWINFO_PRIORITY = 0xf000000 IPV6_FLOWINFO_SRFLAG = 0x10000000 IPV6_FLOWINFO_VERSION = 0xf0000000 IPV6_HOPLIMIT = 0x28 IPV6_HOPOPTS = 0x34 IPV6_JOIN_GROUP = 0xc IPV6_LEAVE_GROUP = 0xd IPV6_MIPDSTOPTS = 0x36 IPV6_MULTICAST_HOPS = 0xa IPV6_MULTICAST_IF = 0x9 IPV6_MULTICAST_LOOP = 0xb IPV6_NEXTHOP = 0x30 IPV6_NOPROBE = 0x1c IPV6_PATHMTU = 0x2e IPV6_PKTINFO = 0x21 IPV6_PKTOPTIONS = 0x24 IPV6_PRIORITY_10 = 0xa000000 IPV6_PRIORITY_11 = 0xb000000 IPV6_PRIORITY_12 = 0xc000000 IPV6_PRIORITY_13 = 0xd000000 IPV6_PRIORITY_14 = 0xe000000 IPV6_PRIORITY_15 = 0xf000000 IPV6_PRIORITY_8 = 0x8000000 IPV6_PRIORITY_9 = 0x9000000 IPV6_PRIORITY_BULK = 0x4000000 IPV6_PRIORITY_CONTROL = 0x7000000 IPV6_PRIORITY_FILLER = 0x1000000 IPV6_PRIORITY_INTERACTIVE = 0x6000000 IPV6_PRIORITY_RESERVED1 = 0x3000000 IPV6_PRIORITY_RESERVED2 = 0x5000000 IPV6_PRIORITY_UNATTENDED = 0x2000000 IPV6_PRIORITY_UNCHARACTERIZED = 0x0 IPV6_RECVDSTOPTS = 0x38 IPV6_RECVHOPLIMIT = 0x29 IPV6_RECVHOPOPTS = 0x35 IPV6_RECVHOPS = 0x22 IPV6_RECVIF = 0x1e IPV6_RECVPATHMTU = 0x2f IPV6_RECVPKTINFO = 0x23 IPV6_RECVRTHDR = 0x33 IPV6_RECVSRCRT = 0x1d IPV6_RECVTCLASS = 0x2a IPV6_RTHDR = 0x32 IPV6_RTHDRDSTOPTS = 0x37 IPV6_RTHDR_TYPE_0 = 0x0 IPV6_RTHDR_TYPE_2 = 0x2 IPV6_SENDIF = 0x1f IPV6_SRFLAG_LOOSE = 0x0 IPV6_SRFLAG_STRICT = 0x10000000 IPV6_TCLASS = 0x2b IPV6_TOKEN_LENGTH = 0x40 IPV6_UNICAST_HOPS = 0x4 IPV6_USE_MIN_MTU = 0x2c IPV6_V6ONLY = 0x25 IPV6_VERSION = 0x60000000 IP_ADDRFORM = 0x16 IP_ADD_MEMBERSHIP = 0xc IP_ADD_SOURCE_MEMBERSHIP = 0x3c IP_BLOCK_SOURCE = 0x3a IP_BROADCAST_IF = 0x10 IP_CACHE_LINE_SIZE = 0x80 IP_DEFAULT_MULTICAST_LOOP = 0x1 IP_DEFAULT_MULTICAST_TTL = 0x1 IP_DF = 0x4000 IP_DHCPMODE = 0x11 IP_DONTFRAG = 0x19 IP_DROP_MEMBERSHIP = 0xd IP_DROP_SOURCE_MEMBERSHIP = 0x3d IP_FINDPMTU = 0x1a IP_HDRINCL = 0x2 IP_INC_MEMBERSHIPS = 0x14 IP_INIT_MEMBERSHIP = 0x14 IP_MAXPACKET = 0xffff IP_MF = 0x2000 IP_MSS = 0x240 IP_MULTICAST_HOPS = 0xa IP_MULTICAST_IF = 0x9 IP_MULTICAST_LOOP = 0xb IP_MULTICAST_TTL = 0xa IP_OPT = 0x1b IP_OPTIONS = 0x1 IP_PMTUAGE = 0x1b IP_RECVDSTADDR = 0x7 IP_RECVIF = 0x14 IP_RECVIFINFO = 0xf IP_RECVINTERFACE = 0x20 IP_RECVMACHDR = 0xe IP_RECVOPTS = 0x5 IP_RECVRETOPTS = 0x6 IP_RECVTTL = 0x22 IP_RETOPTS = 0x8 IP_SOURCE_FILTER = 0x48 IP_TOS = 0x3 IP_TTL = 0x4 IP_UNBLOCK_SOURCE = 0x3b IP_UNICAST_HOPS = 0x4 ISIG = 0x1 ISTRIP = 0x20 IUCLC = 0x800 IXANY = 0x1000 IXOFF = 0x400 IXON = 0x200 I_FLUSH = 0x20005305 LNOFLSH = 0x8000 LOCK_EX = 0x2 LOCK_NB = 0x4 LOCK_SH = 0x1 LOCK_UN = 0x8 MADV_DONTNEED = 0x4 MADV_NORMAL = 0x0 MADV_RANDOM = 0x1 MADV_SEQUENTIAL = 0x2 MADV_SPACEAVAIL = 0x5 MADV_WILLNEED = 0x3 MAP_ANON = 0x10 MAP_ANONYMOUS = 0x10 MAP_FILE = 0x0 MAP_FIXED = 0x100 MAP_PRIVATE = 0x2 MAP_SHARED = 0x1 MAP_TYPE = 0xf0 MAP_VARIABLE = 0x0 MCAST_BLOCK_SOURCE = 0x40 MCAST_EXCLUDE = 0x2 MCAST_INCLUDE = 0x1 MCAST_JOIN_GROUP = 0x3e MCAST_JOIN_SOURCE_GROUP = 0x42 MCAST_LEAVE_GROUP = 0x3f MCAST_LEAVE_SOURCE_GROUP = 0x43 MCAST_SOURCE_FILTER = 0x49 MCAST_UNBLOCK_SOURCE = 0x41 MCL_CURRENT = 0x100 MCL_FUTURE = 0x200 MSG_ANY = 0x4 MSG_ARGEXT = 0x400 MSG_BAND = 0x2 MSG_COMPAT = 0x8000 MSG_CTRUNC = 0x20 MSG_DONTROUTE = 0x4 MSG_EOR = 0x8 MSG_HIPRI = 0x1 MSG_MAXIOVLEN = 0x10 MSG_MPEG2 = 0x80 MSG_NONBLOCK = 0x4000 MSG_NOSIGNAL = 0x100 MSG_OOB = 0x1 MSG_PEEK = 0x2 MSG_TRUNC = 0x10 MSG_WAITALL = 0x40 MSG_WAITFORONE = 0x200 MS_ASYNC = 0x10 MS_EINTR = 0x80 MS_INVALIDATE = 0x40 MS_PER_SEC = 0x3e8 MS_SYNC = 0x20 NFDBITS = 0x20 NL0 = 0x0 NL1 = 0x4000 NL2 = 0x8000 NL3 = 0xc000 NLDLY = 0x4000 NOFLSH = 0x80 NOFLUSH = 0x80000000 OCRNL = 0x8 OFDEL = 0x80 OFILL = 0x40 OLCUC = 0x2 ONLCR = 0x4 ONLRET = 0x20 ONOCR = 0x10 ONOEOT = 0x80000 OPOST = 0x1 OXTABS = 0x40000 O_ACCMODE = 0x23 O_APPEND = 0x8 O_CIO = 0x80 O_CIOR = 0x800000000 O_CLOEXEC = 0x800000 O_CREAT = 0x100 O_DEFER = 0x2000 O_DELAY = 0x4000 O_DIRECT = 0x8000000 O_DIRECTORY = 0x80000 O_DSYNC = 0x400000 O_EFSOFF = 0x400000000 O_EFSON = 0x200000000 O_EXCL = 0x400 O_EXEC = 0x20 O_LARGEFILE = 0x4000000 O_NDELAY = 0x8000 O_NOCACHE = 0x100000 O_NOCTTY = 0x800 O_NOFOLLOW = 0x1000000 O_NONBLOCK = 0x4 O_NONE = 0x3 O_NSHARE = 0x10000 O_RAW = 0x100000000 O_RDONLY = 0x0 O_RDWR = 0x2 O_RSHARE = 0x1000 O_RSYNC = 0x200000 O_SEARCH = 0x20 O_SNAPSHOT = 0x40 O_SYNC = 0x10 O_TRUNC = 0x200 O_TTY_INIT = 0x0 O_WRONLY = 0x1 PARENB = 0x100 PAREXT = 0x100000 PARMRK = 0x8 PARODD = 0x200 PENDIN = 0x20000000 PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 PROT_EXEC = 0x4 PROT_NONE = 0x0 PROT_READ = 0x1 PROT_WRITE = 0x2 PR_64BIT = 0x20 PR_ADDR = 0x2 PR_ARGEXT = 0x400 PR_ATOMIC = 0x1 PR_CONNREQUIRED = 0x4 PR_FASTHZ = 0x5 PR_INP = 0x40 PR_INTRLEVEL = 0x8000 PR_MLS = 0x100 PR_MLS_1_LABEL = 0x200 PR_NOEOR = 0x4000 PR_RIGHTS = 0x10 PR_SLOWHZ = 0x2 PR_WANTRCVD = 0x8 RLIMIT_AS = 0x6 RLIMIT_CORE = 0x4 RLIMIT_CPU = 0x0 RLIMIT_DATA = 0x2 RLIMIT_FSIZE = 0x1 RLIMIT_NOFILE = 0x7 RLIMIT_NPROC = 0x9 RLIMIT_RSS = 0x5 RLIMIT_STACK = 0x3 RLIM_INFINITY = 0x7fffffff 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_DOWNSTREAM = 0x100 RTA_DST = 0x1 RTA_GATEWAY = 0x2 RTA_GENMASK = 0x8 RTA_IFA = 0x20 RTA_IFP = 0x10 RTA_NETMASK = 0x4 RTC_IA64 = 0x3 RTC_POWER = 0x1 RTC_POWER_PC = 0x2 RTF_ACTIVE_DGD = 0x1000000 RTF_BCE = 0x80000 RTF_BLACKHOLE = 0x1000 RTF_BROADCAST = 0x400000 RTF_BUL = 0x2000 RTF_CLONE = 0x10000 RTF_CLONED = 0x20000 RTF_CLONING = 0x100 RTF_DONE = 0x40 RTF_DYNAMIC = 0x10 RTF_FREE_IN_PROG = 0x4000000 RTF_GATEWAY = 0x2 RTF_HOST = 0x4 RTF_LLINFO = 0x400 RTF_LOCAL = 0x200000 RTF_MASK = 0x80 RTF_MODIFIED = 0x20 RTF_MULTICAST = 0x800000 RTF_PERMANENT6 = 0x8000000 RTF_PINNED = 0x100000 RTF_PROTO1 = 0x8000 RTF_PROTO2 = 0x4000 RTF_PROTO3 = 0x40000 RTF_REJECT = 0x8 RTF_SMALLMTU = 0x40000 RTF_STATIC = 0x800 RTF_STOPSRCH = 0x2000000 RTF_UNREACHABLE = 0x10000000 RTF_UP = 0x1 RTF_XRESOLVE = 0x200 RTM_ADD = 0x1 RTM_CHANGE = 0x3 RTM_DELADDR = 0xd RTM_DELETE = 0x2 RTM_EXPIRE = 0xf RTM_GET = 0x4 RTM_GETNEXT = 0x11 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_RTLOST = 0x10 RTM_RTTUNIT = 0xf4240 RTM_SAMEADDR = 0x12 RTM_SET = 0x13 RTM_VERSION = 0x2 RTM_VERSION_GR = 0x4 RTM_VERSION_GR_COMPAT = 0x3 RTM_VERSION_POLICY = 0x5 RTM_VERSION_POLICY_EXT = 0x6 RTM_VERSION_POLICY_PRFN = 0x7 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 RUSAGE_THREAD = 0x1 SCM_RIGHTS = 0x1 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 SIGMAX64 = 0xff SIGQUEUE_MAX = 0x20 SIOCADDIFVIPA = 0x20006942 SIOCADDMTU = -0x7ffb9690 SIOCADDMULTI = -0x7fdf96cf SIOCADDNETID = -0x7fd796a9 SIOCADDRT = -0x7fcf8df6 SIOCAIFADDR = -0x7fbf96e6 SIOCATMARK = 0x40047307 SIOCDARP = -0x7fb396e0 SIOCDELIFVIPA = 0x20006943 SIOCDELMTU = -0x7ffb968f SIOCDELMULTI = -0x7fdf96ce SIOCDELPMTU = -0x7fd78ff6 SIOCDELRT = -0x7fcf8df5 SIOCDIFADDR = -0x7fd796e7 SIOCDNETOPT = -0x3ffe9680 SIOCDX25XLATE = -0x7fd7969b SIOCFIFADDR = -0x7fdf966d SIOCGARP = -0x3fb396da SIOCGETMTUS = 0x2000696f SIOCGETSGCNT = -0x3feb8acc SIOCGETVIFCNT = -0x3feb8acd SIOCGHIWAT = 0x40047301 SIOCGIFADDR = -0x3fd796df SIOCGIFADDRS = 0x2000698c SIOCGIFBAUDRATE = -0x3fdf9669 SIOCGIFBRDADDR = -0x3fd796dd SIOCGIFCONF = -0x3ff796bb SIOCGIFCONFGLOB = -0x3ff79670 SIOCGIFDSTADDR = -0x3fd796de SIOCGIFFLAGS = -0x3fd796ef SIOCGIFGIDLIST = 0x20006968 SIOCGIFHWADDR = -0x3fab966b SIOCGIFMETRIC = -0x3fd796e9 SIOCGIFMTU = -0x3fd796aa SIOCGIFNETMASK = -0x3fd796db SIOCGIFOPTIONS = -0x3fd796d6 SIOCGISNO = -0x3fd79695 SIOCGLOADF = -0x3ffb967e SIOCGLOWAT = 0x40047303 SIOCGNETOPT = -0x3ffe96a5 SIOCGNETOPT1 = -0x3fdf967f SIOCGNMTUS = 0x2000696e SIOCGPGRP = 0x40047309 SIOCGSIZIFCONF = 0x4004696a SIOCGSRCFILTER = -0x3fe796cb SIOCGTUNEPHASE = -0x3ffb9676 SIOCGX25XLATE = -0x3fd7969c SIOCIFATTACH = -0x7fdf9699 SIOCIFDETACH = -0x7fdf969a SIOCIFGETPKEY = -0x7fdf969b SIOCIF_ATM_DARP = -0x7fdf9683 SIOCIF_ATM_DUMPARP = -0x7fdf9685 SIOCIF_ATM_GARP = -0x7fdf9682 SIOCIF_ATM_IDLE = -0x7fdf9686 SIOCIF_ATM_SARP = -0x7fdf9681 SIOCIF_ATM_SNMPARP = -0x7fdf9687 SIOCIF_ATM_SVC = -0x7fdf9684 SIOCIF_ATM_UBR = -0x7fdf9688 SIOCIF_DEVHEALTH = -0x7ffb966c SIOCIF_IB_ARP_INCOMP = -0x7fdf9677 SIOCIF_IB_ARP_TIMER = -0x7fdf9678 SIOCIF_IB_CLEAR_PINFO = -0x3fdf966f SIOCIF_IB_DEL_ARP = -0x7fdf967f SIOCIF_IB_DEL_PINFO = -0x3fdf9670 SIOCIF_IB_DUMP_ARP = -0x7fdf9680 SIOCIF_IB_GET_ARP = -0x7fdf967e SIOCIF_IB_GET_INFO = -0x3f879675 SIOCIF_IB_GET_STATS = -0x3f879672 SIOCIF_IB_NOTIFY_ADDR_REM = -0x3f87966a SIOCIF_IB_RESET_STATS = -0x3f879671 SIOCIF_IB_RESIZE_CQ = -0x7fdf9679 SIOCIF_IB_SET_ARP = -0x7fdf967d SIOCIF_IB_SET_PKEY = -0x7fdf967c SIOCIF_IB_SET_PORT = -0x7fdf967b SIOCIF_IB_SET_QKEY = -0x7fdf9676 SIOCIF_IB_SET_QSIZE = -0x7fdf967a SIOCLISTIFVIPA = 0x20006944 SIOCSARP = -0x7fb396e2 SIOCSHIWAT = 0x80047300 SIOCSIFADDR = -0x7fd796f4 SIOCSIFADDRORI = -0x7fdb9673 SIOCSIFBRDADDR = -0x7fd796ed SIOCSIFDSTADDR = -0x7fd796f2 SIOCSIFFLAGS = -0x7fd796f0 SIOCSIFGIDLIST = 0x20006969 SIOCSIFMETRIC = -0x7fd796e8 SIOCSIFMTU = -0x7fd796a8 SIOCSIFNETDUMP = -0x7fd796e4 SIOCSIFNETMASK = -0x7fd796ea SIOCSIFOPTIONS = -0x7fd796d7 SIOCSIFSUBCHAN = -0x7fd796e5 SIOCSISNO = -0x7fd79694 SIOCSLOADF = -0x3ffb967d SIOCSLOWAT = 0x80047302 SIOCSNETOPT = -0x7ffe96a6 SIOCSPGRP = 0x80047308 SIOCSX25XLATE = -0x7fd7969d SOCK_CONN_DGRAM = 0x6 SOCK_DGRAM = 0x2 SOCK_RAW = 0x3 SOCK_RDM = 0x4 SOCK_SEQPACKET = 0x5 SOCK_STREAM = 0x1 SOL_SOCKET = 0xffff SOMAXCONN = 0x400 SO_ACCEPTCONN = 0x2 SO_AUDIT = 0x8000 SO_BROADCAST = 0x20 SO_CKSUMRECV = 0x800 SO_DEBUG = 0x1 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 SO_KEEPALIVE = 0x8 SO_KERNACCEPT = 0x2000 SO_LINGER = 0x80 SO_NOMULTIPATH = 0x4000 SO_NOREUSEADDR = 0x1000 SO_OOBINLINE = 0x100 SO_PEERID = 0x1009 SO_RCVBUF = 0x1002 SO_RCVLOWAT = 0x1004 SO_RCVTIMEO = 0x1006 SO_REUSEADDR = 0x4 SO_REUSEPORT = 0x200 SO_SNDBUF = 0x1001 SO_SNDLOWAT = 0x1003 SO_SNDTIMEO = 0x1005 SO_TIMESTAMPNS = 0x100a SO_TYPE = 0x1008 SO_USELOOPBACK = 0x40 SO_USE_IFBUFS = 0x400 S_BANDURG = 0x400 S_EMODFMT = 0x3c000000 S_ENFMT = 0x400 S_ERROR = 0x100 S_HANGUP = 0x200 S_HIPRI = 0x2 S_ICRYPTO = 0x80000 S_IEXEC = 0x40 S_IFBLK = 0x6000 S_IFCHR = 0x2000 S_IFDIR = 0x4000 S_IFIFO = 0x1000 S_IFJOURNAL = 0x10000 S_IFLNK = 0xa000 S_IFMPX = 0x2200 S_IFMT = 0xf000 S_IFPDIR = 0x4000000 S_IFPSDIR = 0x8000000 S_IFPSSDIR = 0xc000000 S_IFREG = 0x8000 S_IFSOCK = 0xc000 S_IFSYSEA = 0x30000000 S_INPUT = 0x1 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_ITCB = 0x1000000 S_ITP = 0x800000 S_IWGRP = 0x10 S_IWOTH = 0x2 S_IWRITE = 0x80 S_IWUSR = 0x80 S_IXACL = 0x2000000 S_IXATTR = 0x40000 S_IXGRP = 0x8 S_IXINTERFACE = 0x100000 S_IXMOD = 0x40000000 S_IXOTH = 0x1 S_IXUSR = 0x40 S_MSG = 0x8 S_OUTPUT = 0x4 S_RDBAND = 0x20 S_RDNORM = 0x10 S_RESERVED1 = 0x20000 S_RESERVED2 = 0x200000 S_RESERVED3 = 0x400000 S_RESERVED4 = 0x80000000 S_RESFMT1 = 0x10000000 S_RESFMT10 = 0x34000000 S_RESFMT11 = 0x38000000 S_RESFMT12 = 0x3c000000 S_RESFMT2 = 0x14000000 S_RESFMT3 = 0x18000000 S_RESFMT4 = 0x1c000000 S_RESFMT5 = 0x20000000 S_RESFMT6 = 0x24000000 S_RESFMT7 = 0x28000000 S_RESFMT8 = 0x2c000000 S_WRBAND = 0x80 S_WRNORM = 0x40 TAB0 = 0x0 TAB1 = 0x400 TAB2 = 0x800 TAB3 = 0xc00 TABDLY = 0xc00 TCFLSH = 0x540c TCGETA = 0x5405 TCGETS = 0x5401 TCIFLUSH = 0x0 TCIOFF = 0x2 TCIOFLUSH = 0x2 TCION = 0x3 TCOFLUSH = 0x1 TCOOFF = 0x0 TCOON = 0x1 TCP_24DAYS_WORTH_OF_SLOWTICKS = 0x3f4800 TCP_ACLADD = 0x23 TCP_ACLBIND = 0x26 TCP_ACLCLEAR = 0x22 TCP_ACLDEL = 0x24 TCP_ACLDENY = 0x8 TCP_ACLFLUSH = 0x21 TCP_ACLGID = 0x1 TCP_ACLLS = 0x25 TCP_ACLSUBNET = 0x4 TCP_ACLUID = 0x2 TCP_CWND_DF = 0x16 TCP_CWND_IF = 0x15 TCP_DELAY_ACK_FIN = 0x2 TCP_DELAY_ACK_SYN = 0x1 TCP_FASTNAME = 0x101080a TCP_KEEPCNT = 0x13 TCP_KEEPIDLE = 0x11 TCP_KEEPINTVL = 0x12 TCP_LSPRIV = 0x29 TCP_LUID = 0x20 TCP_MAXBURST = 0x8 TCP_MAXDF = 0x64 TCP_MAXIF = 0x64 TCP_MAXSEG = 0x2 TCP_MAXWIN = 0xffff TCP_MAXWINDOWSCALE = 0xe TCP_MAX_SACK = 0x4 TCP_MSS = 0x5b4 TCP_NODELAY = 0x1 TCP_NODELAYACK = 0x14 TCP_NOREDUCE_CWND_EXIT_FRXMT = 0x19 TCP_NOREDUCE_CWND_IN_FRXMT = 0x18 TCP_NOTENTER_SSTART = 0x17 TCP_OPT = 0x19 TCP_RFC1323 = 0x4 TCP_SETPRIV = 0x27 TCP_STDURG = 0x10 TCP_TIMESTAMP_OPTLEN = 0xc TCP_UNSETPRIV = 0x28 TCSAFLUSH = 0x2 TCSBRK = 0x5409 TCSETA = 0x5406 TCSETAF = 0x5408 TCSETAW = 0x5407 TCSETS = 0x5402 TCSETSF = 0x5404 TCSETSW = 0x5403 TCXONC = 0x540b TIMER_ABSTIME = 0x3e7 TIMER_MAX = 0x20 TIOC = 0x5400 TIOCCBRK = 0x2000747a TIOCCDTR = 0x20007478 TIOCCONS = 0x80047462 TIOCEXCL = 0x2000740d TIOCFLUSH = 0x80047410 TIOCGETC = 0x40067412 TIOCGETD = 0x40047400 TIOCGETP = 0x40067408 TIOCGLTC = 0x40067474 TIOCGPGRP = 0x40047477 TIOCGSID = 0x40047448 TIOCGSIZE = 0x40087468 TIOCGWINSZ = 0x40087468 TIOCHPCL = 0x20007402 TIOCLBIC = 0x8004747e TIOCLBIS = 0x8004747f TIOCLGET = 0x4004747c TIOCLSET = 0x8004747d TIOCMBIC = 0x8004746b TIOCMBIS = 0x8004746c TIOCMGET = 0x4004746a TIOCMIWAIT = 0x80047464 TIOCMODG = 0x40047403 TIOCMODS = 0x80047404 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_NOSTOP = 0x10 TIOCPKT_START = 0x8 TIOCPKT_STOP = 0x4 TIOCREMOTE = 0x80047469 TIOCSBRK = 0x2000747b TIOCSDTR = 0x20007479 TIOCSETC = 0x80067411 TIOCSETD = 0x80047401 TIOCSETN = 0x8006740a TIOCSETP = 0x80067409 TIOCSLTC = 0x80067475 TIOCSPGRP = 0x80047476 TIOCSSIZE = 0x80087467 TIOCSTART = 0x2000746e TIOCSTI = 0x80017472 TIOCSTOP = 0x2000746f TIOCSWINSZ = 0x80087467 TIOCUCNTL = 0x80047466 TOSTOP = 0x10000 UTIME_NOW = -0x2 UTIME_OMIT = -0x3 VDISCRD = 0xc VDSUSP = 0xa VEOF = 0x4 VEOL = 0x5 VEOL2 = 0x6 VERASE = 0x2 VINTR = 0x0 VKILL = 0x3 VLNEXT = 0xe VMIN = 0x4 VQUIT = 0x1 VREPRINT = 0xb VSTART = 0x7 VSTOP = 0x8 VSTRT = 0x7 VSUSP = 0x9 VT0 = 0x0 VT1 = 0x8000 VTDELAY = 0x2000 VTDLY = 0x8000 VTIME = 0x5 VWERSE = 0xd WPARSTART = 0x1 WPARSTOP = 0x2 WPARTTYNAME = "Global" XCASE = 0x4 XTABS = 0xc00 _FDATAFLUSH = 0x2000000000 ) // Errors const ( E2BIG = syscall.Errno(0x7) EACCES = syscall.Errno(0xd) EADDRINUSE = syscall.Errno(0x43) EADDRNOTAVAIL = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x42) EAGAIN = syscall.Errno(0xb) EALREADY = syscall.Errno(0x38) EBADF = syscall.Errno(0x9) EBADMSG = syscall.Errno(0x78) EBUSY = syscall.Errno(0x10) ECANCELED = syscall.Errno(0x75) ECHILD = syscall.Errno(0xa) ECHRNG = syscall.Errno(0x25) ECLONEME = syscall.Errno(0x52) ECONNABORTED = syscall.Errno(0x48) ECONNREFUSED = syscall.Errno(0x4f) ECONNRESET = syscall.Errno(0x49) ECORRUPT = syscall.Errno(0x59) EDEADLK = syscall.Errno(0x2d) EDESTADDREQ = syscall.Errno(0x3a) EDESTADDRREQ = syscall.Errno(0x3a) EDIST = syscall.Errno(0x35) EDOM = syscall.Errno(0x21) EDQUOT = syscall.Errno(0x58) EEXIST = syscall.Errno(0x11) EFAULT = syscall.Errno(0xe) EFBIG = syscall.Errno(0x1b) EFORMAT = syscall.Errno(0x30) EHOSTDOWN = syscall.Errno(0x50) EHOSTUNREACH = syscall.Errno(0x51) EIDRM = syscall.Errno(0x24) EILSEQ = syscall.Errno(0x74) EINPROGRESS = syscall.Errno(0x37) EINTR = syscall.Errno(0x4) EINVAL = syscall.Errno(0x16) EIO = syscall.Errno(0x5) EISCONN = syscall.Errno(0x4b) EISDIR = syscall.Errno(0x15) EL2HLT = syscall.Errno(0x2c) EL2NSYNC = syscall.Errno(0x26) EL3HLT = syscall.Errno(0x27) EL3RST = syscall.Errno(0x28) ELNRNG = syscall.Errno(0x29) ELOOP = syscall.Errno(0x55) EMEDIA = syscall.Errno(0x6e) EMFILE = syscall.Errno(0x18) EMLINK = syscall.Errno(0x1f) EMSGSIZE = syscall.Errno(0x3b) EMULTIHOP = syscall.Errno(0x7d) ENAMETOOLONG = syscall.Errno(0x56) ENETDOWN = syscall.Errno(0x45) ENETRESET = syscall.Errno(0x47) ENETUNREACH = syscall.Errno(0x46) ENFILE = syscall.Errno(0x17) ENOATTR = syscall.Errno(0x70) ENOBUFS = syscall.Errno(0x4a) ENOCONNECT = syscall.Errno(0x32) ENOCSI = syscall.Errno(0x2b) ENODATA = syscall.Errno(0x7a) ENODEV = syscall.Errno(0x13) ENOENT = syscall.Errno(0x2) ENOEXEC = syscall.Errno(0x8) ENOLCK = syscall.Errno(0x31) ENOLINK = syscall.Errno(0x7e) ENOMEM = syscall.Errno(0xc) ENOMSG = syscall.Errno(0x23) ENOPROTOOPT = syscall.Errno(0x3d) ENOSPC = syscall.Errno(0x1c) ENOSR = syscall.Errno(0x76) ENOSTR = syscall.Errno(0x7b) ENOSYS = syscall.Errno(0x6d) ENOTBLK = syscall.Errno(0xf) ENOTCONN = syscall.Errno(0x4c) ENOTDIR = syscall.Errno(0x14) ENOTEMPTY = syscall.Errno(0x11) ENOTREADY = syscall.Errno(0x2e) ENOTRECOVERABLE = syscall.Errno(0x5e) ENOTRUST = syscall.Errno(0x72) ENOTSOCK = syscall.Errno(0x39) ENOTSUP = syscall.Errno(0x7c) ENOTTY = syscall.Errno(0x19) ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x40) EOVERFLOW = syscall.Errno(0x7f) EOWNERDEAD = syscall.Errno(0x5f) EPERM = syscall.Errno(0x1) EPFNOSUPPORT = syscall.Errno(0x41) EPIPE = syscall.Errno(0x20) EPROCLIM = syscall.Errno(0x53) EPROTO = syscall.Errno(0x79) EPROTONOSUPPORT = syscall.Errno(0x3e) EPROTOTYPE = syscall.Errno(0x3c) ERANGE = syscall.Errno(0x22) EREMOTE = syscall.Errno(0x5d) ERESTART = syscall.Errno(0x52) EROFS = syscall.Errno(0x1e) ESAD = syscall.Errno(0x71) ESHUTDOWN = syscall.Errno(0x4d) ESOCKTNOSUPPORT = syscall.Errno(0x3f) ESOFT = syscall.Errno(0x6f) ESPIPE = syscall.Errno(0x1d) ESRCH = syscall.Errno(0x3) ESTALE = syscall.Errno(0x34) ESYSERROR = syscall.Errno(0x5a) ETIME = syscall.Errno(0x77) ETIMEDOUT = syscall.Errno(0x4e) ETOOMANYREFS = syscall.Errno(0x73) ETXTBSY = syscall.Errno(0x1a) EUNATCH = syscall.Errno(0x2a) EUSERS = syscall.Errno(0x54) EWOULDBLOCK = syscall.Errno(0xb) EWRPROTECT = syscall.Errno(0x2f) EXDEV = syscall.Errno(0x12) ) // Signals const ( SIGABRT = syscall.Signal(0x6) SIGAIO = syscall.Signal(0x17) SIGALRM = syscall.Signal(0xe) SIGALRM1 = syscall.Signal(0x26) SIGBUS = syscall.Signal(0xa) SIGCAPI = syscall.Signal(0x31) SIGCHLD = syscall.Signal(0x14) SIGCLD = syscall.Signal(0x14) SIGCONT = syscall.Signal(0x13) SIGCPUFAIL = syscall.Signal(0x3b) SIGDANGER = syscall.Signal(0x21) SIGEMT = syscall.Signal(0x7) SIGFPE = syscall.Signal(0x8) SIGGRANT = syscall.Signal(0x3c) SIGHUP = syscall.Signal(0x1) SIGILL = syscall.Signal(0x4) SIGINT = syscall.Signal(0x2) SIGIO = syscall.Signal(0x17) SIGIOINT = syscall.Signal(0x10) SIGIOT = syscall.Signal(0x6) SIGKAP = syscall.Signal(0x3c) SIGKILL = syscall.Signal(0x9) SIGLOST = syscall.Signal(0x6) SIGMAX = syscall.Signal(0x3f) SIGMAX32 = syscall.Signal(0x3f) SIGMIGRATE = syscall.Signal(0x23) SIGMSG = syscall.Signal(0x1b) SIGPIPE = syscall.Signal(0xd) SIGPOLL = syscall.Signal(0x17) SIGPRE = syscall.Signal(0x24) SIGPROF = syscall.Signal(0x20) SIGPTY = syscall.Signal(0x17) SIGPWR = syscall.Signal(0x1d) SIGQUIT = syscall.Signal(0x3) SIGRECONFIG = syscall.Signal(0x3a) SIGRETRACT = syscall.Signal(0x3d) SIGSAK = syscall.Signal(0x3f) SIGSEGV = syscall.Signal(0xb) SIGSOUND = syscall.Signal(0x3e) SIGSTOP = syscall.Signal(0x11) SIGSYS = syscall.Signal(0xc) SIGSYSERROR = syscall.Signal(0x30) SIGTALRM = syscall.Signal(0x26) 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) SIGVIRT = syscall.Signal(0x25) SIGVTALRM = syscall.Signal(0x22) SIGWAITING = syscall.Signal(0x27) SIGWINCH = syscall.Signal(0x1c) SIGXCPU = syscall.Signal(0x18) SIGXFSZ = syscall.Signal(0x19) ) // Error table var errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "not owner"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "I/O error"}, {6, "ENXIO", "no such device or address"}, {7, "E2BIG", "arg list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file number"}, {10, "ECHILD", "no child processes"}, {11, "EWOULDBLOCK", "resource temporarily unavailable"}, {12, "ENOMEM", "not enough space"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device busy"}, {17, "ENOTEMPTY", "file exists"}, {18, "EXDEV", "cross-device link"}, {19, "ENODEV", "no such device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "file table overflow"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "not a typewriter"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "argument out of domain"}, {34, "ERANGE", "result too large"}, {35, "ENOMSG", "no message of desired type"}, {36, "EIDRM", "identifier removed"}, {37, "ECHRNG", "channel number out of range"}, {38, "EL2NSYNC", "level 2 not synchronized"}, {39, "EL3HLT", "level 3 halted"}, {40, "EL3RST", "level 3 reset"}, {41, "ELNRNG", "link number out of range"}, {42, "EUNATCH", "protocol driver not attached"}, {43, "ENOCSI", "no CSI structure available"}, {44, "EL2HLT", "level 2 halted"}, {45, "EDEADLK", "deadlock condition if locked"}, {46, "ENOTREADY", "device not ready"}, {47, "EWRPROTECT", "write-protected media"}, {48, "EFORMAT", "unformatted or incompatible media"}, {49, "ENOLCK", "no locks available"}, {50, "ENOCONNECT", "cannot Establish Connection"}, {52, "ESTALE", "missing file or filesystem"}, {53, "EDIST", "requests blocked by Administrator"}, {55, "EINPROGRESS", "operation now in progress"}, {56, "EALREADY", "operation already in progress"}, {57, "ENOTSOCK", "socket operation on non-socket"}, {58, "EDESTADDREQ", "destination address required"}, {59, "EMSGSIZE", "message too long"}, {60, "EPROTOTYPE", "protocol wrong type for socket"}, {61, "ENOPROTOOPT", "protocol not available"}, {62, "EPROTONOSUPPORT", "protocol not supported"}, {63, "ESOCKTNOSUPPORT", "socket type not supported"}, {64, "EOPNOTSUPP", "operation not supported on socket"}, {65, "EPFNOSUPPORT", "protocol family not supported"}, {66, "EAFNOSUPPORT", "addr family not supported by protocol"}, {67, "EADDRINUSE", "address already in use"}, {68, "EADDRNOTAVAIL", "can't assign requested address"}, {69, "ENETDOWN", "network is down"}, {70, "ENETUNREACH", "network is unreachable"}, {71, "ENETRESET", "network dropped connection on reset"}, {72, "ECONNABORTED", "software caused connection abort"}, {73, "ECONNRESET", "connection reset by peer"}, {74, "ENOBUFS", "no buffer space available"}, {75, "EISCONN", "socket is already connected"}, {76, "ENOTCONN", "socket is not connected"}, {77, "ESHUTDOWN", "can't send after socket shutdown"}, {78, "ETIMEDOUT", "connection timed out"}, {79, "ECONNREFUSED", "connection refused"}, {80, "EHOSTDOWN", "host is down"}, {81, "EHOSTUNREACH", "no route to host"}, {82, "ERESTART", "restart the system call"}, {83, "EPROCLIM", "too many processes"}, {84, "EUSERS", "too many users"}, {85, "ELOOP", "too many levels of symbolic links"}, {86, "ENAMETOOLONG", "file name too long"}, {88, "EDQUOT", "disk quota exceeded"}, {89, "ECORRUPT", "invalid file system control data detected"}, {90, "ESYSERROR", "for future use "}, {93, "EREMOTE", "item is not local to host"}, {94, "ENOTRECOVERABLE", "state not recoverable "}, {95, "EOWNERDEAD", "previous owner died "}, {109, "ENOSYS", "function not implemented"}, {110, "EMEDIA", "media surface error"}, {111, "ESOFT", "I/O completed, but needs relocation"}, {112, "ENOATTR", "no attribute found"}, {113, "ESAD", "security Authentication Denied"}, {114, "ENOTRUST", "not a Trusted Program"}, {115, "ETOOMANYREFS", "too many references: can't splice"}, {116, "EILSEQ", "invalid wide character"}, {117, "ECANCELED", "asynchronous I/O cancelled"}, {118, "ENOSR", "out of STREAMS resources"}, {119, "ETIME", "system call timed out"}, {120, "EBADMSG", "next message has wrong type"}, {121, "EPROTO", "error in protocol"}, {122, "ENODATA", "no message on stream head read q"}, {123, "ENOSTR", "fd not associated with a stream"}, {124, "ENOTSUP", "unsupported attribute value"}, {125, "EMULTIHOP", "multihop is not allowed"}, {126, "ENOLINK", "the server link has been severed"}, {127, "EOVERFLOW", "value too large to be stored in data type"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, {6, "SIGIOT", "IOT/Abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGURG", "urgent I/O condition"}, {17, "SIGSTOP", "stopped (signal)"}, {18, "SIGTSTP", "stopped"}, {19, "SIGCONT", "continued"}, {20, "SIGCHLD", "child exited"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGIO", "I/O possible/complete"}, {24, "SIGXCPU", "cputime limit exceeded"}, {25, "SIGXFSZ", "filesize limit exceeded"}, {27, "SIGMSG", "input device data"}, {28, "SIGWINCH", "window size changes"}, {29, "SIGPWR", "power-failure"}, {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGPROF", "profiling timer expired"}, {33, "SIGDANGER", "paging space low"}, {34, "SIGVTALRM", "virtual timer expired"}, {35, "SIGMIGRATE", "signal 35"}, {36, "SIGPRE", "signal 36"}, {37, "SIGVIRT", "signal 37"}, {38, "SIGTALRM", "signal 38"}, {39, "SIGWAITING", "signal 39"}, {48, "SIGSYSERROR", "signal 48"}, {49, "SIGCAPI", "signal 49"}, {58, "SIGRECONFIG", "signal 58"}, {59, "SIGCPUFAIL", "CPU Failure Predicted"}, {60, "SIGKAP", "monitor mode granted"}, {61, "SIGRETRACT", "monitor mode retracted"}, {62, "SIGSOUND", "sound completed"}, {63, "SIGSAK", "secure attention"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go ================================================ // mkerrors.sh -maix64 // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64 && aix // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -maix64 _const.go package unix import "syscall" const ( AF_APPLETALK = 0x10 AF_BYPASS = 0x19 AF_CCITT = 0xa AF_CHAOS = 0x5 AF_DATAKIT = 0x9 AF_DECnet = 0xc AF_DLI = 0xd AF_ECMA = 0x8 AF_HYLINK = 0xf AF_IMPLINK = 0x3 AF_INET = 0x2 AF_INET6 = 0x18 AF_INTF = 0x14 AF_ISO = 0x7 AF_LAT = 0xe AF_LINK = 0x12 AF_LOCAL = 0x1 AF_MAX = 0x1e AF_NDD = 0x17 AF_NETWARE = 0x16 AF_NS = 0x6 AF_OSI = 0x7 AF_PUP = 0x4 AF_RIF = 0x15 AF_ROUTE = 0x11 AF_SNA = 0xb AF_UNIX = 0x1 AF_UNSPEC = 0x0 ALTWERASE = 0x400000 ARPHRD_802_3 = 0x6 ARPHRD_802_5 = 0x6 ARPHRD_ETHER = 0x1 ARPHRD_FDDI = 0x1 B0 = 0x0 B110 = 0x3 B1200 = 0x9 B134 = 0x4 B150 = 0x5 B1800 = 0xa B19200 = 0xe B200 = 0x6 B2400 = 0xb B300 = 0x7 B38400 = 0xf B4800 = 0xc B50 = 0x1 B600 = 0x8 B75 = 0x2 B9600 = 0xd BRKINT = 0x2 BS0 = 0x0 BS1 = 0x1000 BSDLY = 0x1000 CAP_AACCT = 0x6 CAP_ARM_APPLICATION = 0x5 CAP_BYPASS_RAC_VMM = 0x3 CAP_CLEAR = 0x0 CAP_CREDENTIALS = 0x7 CAP_EFFECTIVE = 0x1 CAP_EWLM_AGENT = 0x4 CAP_INHERITABLE = 0x2 CAP_MAXIMUM = 0x7 CAP_NUMA_ATTACH = 0x2 CAP_PERMITTED = 0x3 CAP_PROPAGATE = 0x1 CAP_PROPOGATE = 0x1 CAP_SET = 0x1 CBAUD = 0xf CFLUSH = 0xf CIBAUD = 0xf0000 CLOCAL = 0x800 CLOCK_MONOTONIC = 0xa CLOCK_PROCESS_CPUTIME_ID = 0xb CLOCK_REALTIME = 0x9 CLOCK_THREAD_CPUTIME_ID = 0xc CR0 = 0x0 CR1 = 0x100 CR2 = 0x200 CR3 = 0x300 CRDLY = 0x300 CREAD = 0x80 CS5 = 0x0 CS6 = 0x10 CS7 = 0x20 CS8 = 0x30 CSIOCGIFCONF = -0x3fef96dc CSIZE = 0x30 CSMAP_DIR = "/usr/lib/nls/csmap/" CSTART = '\021' CSTOP = '\023' CSTOPB = 0x40 CSUSP = 0x1a ECHO = 0x8 ECHOCTL = 0x20000 ECHOE = 0x10 ECHOK = 0x20 ECHOKE = 0x80000 ECHONL = 0x40 ECHOPRT = 0x40000 ECH_ICMPID = 0x2 ETHERNET_CSMACD = 0x6 EVENP = 0x80 EXCONTINUE = 0x0 EXDLOK = 0x3 EXIO = 0x2 EXPGIO = 0x0 EXRESUME = 0x2 EXRETURN = 0x1 EXSIG = 0x4 EXTA = 0xe EXTB = 0xf EXTRAP = 0x1 EYEC_RTENTRYA = 0x257274656e747241 EYEC_RTENTRYF = 0x257274656e747246 E_ACC = 0x0 FD_CLOEXEC = 0x1 FD_SETSIZE = 0xfffe FF0 = 0x0 FF1 = 0x2000 FFDLY = 0x2000 FLUSHBAND = 0x40 FLUSHLOW = 0x8 FLUSHO = 0x100000 FLUSHR = 0x1 FLUSHRW = 0x3 FLUSHW = 0x2 F_CLOSEM = 0xa F_DUP2FD = 0xe F_DUPFD = 0x0 F_GETFD = 0x1 F_GETFL = 0x3 F_GETLK = 0xb F_GETLK64 = 0xb F_GETOWN = 0x8 F_LOCK = 0x1 F_OK = 0x0 F_RDLCK = 0x1 F_SETFD = 0x2 F_SETFL = 0x4 F_SETLK = 0xc F_SETLK64 = 0xc F_SETLKW = 0xd F_SETLKW64 = 0xd F_SETOWN = 0x9 F_TEST = 0x3 F_TLOCK = 0x2 F_TSTLK = 0xf F_ULOCK = 0x0 F_UNLCK = 0x3 F_WRLCK = 0x2 HUPCL = 0x400 IBSHIFT = 0x10 ICANON = 0x2 ICMP6_FILTER = 0x26 ICMP6_SEC_SEND_DEL = 0x46 ICMP6_SEC_SEND_GET = 0x47 ICMP6_SEC_SEND_SET = 0x44 ICMP6_SEC_SEND_SET_CGA_ADDR = 0x45 ICRNL = 0x100 IEXTEN = 0x200000 IFA_FIRSTALIAS = 0x2000 IFA_ROUTE = 0x1 IFF_64BIT = 0x4000000 IFF_ALLCAST = 0x20000 IFF_ALLMULTI = 0x200 IFF_BPF = 0x8000000 IFF_BRIDGE = 0x40000 IFF_BROADCAST = 0x2 IFF_CANTCHANGE = 0x80c52 IFF_CHECKSUM_OFFLOAD = 0x10000000 IFF_D1 = 0x8000 IFF_D2 = 0x4000 IFF_D3 = 0x2000 IFF_D4 = 0x1000 IFF_DEBUG = 0x4 IFF_DEVHEALTH = 0x4000 IFF_DO_HW_LOOPBACK = 0x10000 IFF_GROUP_ROUTING = 0x2000000 IFF_IFBUFMGT = 0x800000 IFF_LINK0 = 0x100000 IFF_LINK1 = 0x200000 IFF_LINK2 = 0x400000 IFF_LOOPBACK = 0x8 IFF_MULTICAST = 0x80000 IFF_NOARP = 0x80 IFF_NOECHO = 0x800 IFF_NOTRAILERS = 0x20 IFF_OACTIVE = 0x400 IFF_POINTOPOINT = 0x10 IFF_PROMISC = 0x100 IFF_PSEG = 0x40000000 IFF_RUNNING = 0x40 IFF_SIMPLEX = 0x800 IFF_SNAP = 0x8000 IFF_TCP_DISABLE_CKSUM = 0x20000000 IFF_TCP_NOCKSUM = 0x1000000 IFF_UP = 0x1 IFF_VIPA = 0x80000000 IFNAMSIZ = 0x10 IFO_FLUSH = 0x1 IFT_1822 = 0x2 IFT_AAL5 = 0x31 IFT_ARCNET = 0x23 IFT_ARCNETPLUS = 0x24 IFT_ATM = 0x25 IFT_CEPT = 0x13 IFT_CLUSTER = 0x3e IFT_DS3 = 0x1e IFT_EON = 0x19 IFT_ETHER = 0x6 IFT_FCS = 0x3a IFT_FDDI = 0xf IFT_FRELAY = 0x20 IFT_FRELAYDCE = 0x2c IFT_GIFTUNNEL = 0x3c IFT_HDH1822 = 0x3 IFT_HF = 0x3d IFT_HIPPI = 0x2f IFT_HSSI = 0x2e IFT_HY = 0xe IFT_IB = 0xc7 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_SN = 0x38 IFT_SONET = 0x27 IFT_SONETPATH = 0x32 IFT_SONETVT = 0x33 IFT_SP = 0x39 IFT_STARLAN = 0xb IFT_T1 = 0x12 IFT_TUNNEL = 0x3b IFT_ULTRA = 0x1d IFT_V35 = 0x2d IFT_VIPA = 0x37 IFT_X25 = 0x5 IFT_X25DDN = 0x4 IFT_X25PLE = 0x28 IFT_XETHER = 0x1a IGNBRK = 0x1 IGNCR = 0x80 IGNPAR = 0x4 IMAXBEL = 0x10000 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_USE = 0x1 IPPROTO_AH = 0x33 IPPROTO_BIP = 0x53 IPPROTO_DSTOPTS = 0x3c IPPROTO_EGP = 0x8 IPPROTO_EON = 0x50 IPPROTO_ESP = 0x32 IPPROTO_FRAGMENT = 0x2c IPPROTO_GGP = 0x3 IPPROTO_GIF = 0x8c 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_LOCAL = 0x3f IPPROTO_MAX = 0x100 IPPROTO_MH = 0x87 IPPROTO_NONE = 0x3b IPPROTO_PUP = 0xc IPPROTO_QOS = 0x2d IPPROTO_RAW = 0xff IPPROTO_ROUTING = 0x2b IPPROTO_RSVP = 0x2e IPPROTO_SCTP = 0x84 IPPROTO_TCP = 0x6 IPPROTO_TP = 0x1d IPPROTO_UDP = 0x11 IPV6_ADDRFORM = 0x16 IPV6_ADDR_PREFERENCES = 0x4a IPV6_ADD_MEMBERSHIP = 0xc IPV6_AIXRAWSOCKET = 0x39 IPV6_CHECKSUM = 0x27 IPV6_DONTFRAG = 0x2d IPV6_DROP_MEMBERSHIP = 0xd IPV6_DSTOPTS = 0x36 IPV6_FLOWINFO_FLOWLABEL = 0xffffff IPV6_FLOWINFO_PRIFLOW = 0xfffffff IPV6_FLOWINFO_PRIORITY = 0xf000000 IPV6_FLOWINFO_SRFLAG = 0x10000000 IPV6_FLOWINFO_VERSION = 0xf0000000 IPV6_HOPLIMIT = 0x28 IPV6_HOPOPTS = 0x34 IPV6_JOIN_GROUP = 0xc IPV6_LEAVE_GROUP = 0xd IPV6_MIPDSTOPTS = 0x36 IPV6_MULTICAST_HOPS = 0xa IPV6_MULTICAST_IF = 0x9 IPV6_MULTICAST_LOOP = 0xb IPV6_NEXTHOP = 0x30 IPV6_NOPROBE = 0x1c IPV6_PATHMTU = 0x2e IPV6_PKTINFO = 0x21 IPV6_PKTOPTIONS = 0x24 IPV6_PRIORITY_10 = 0xa000000 IPV6_PRIORITY_11 = 0xb000000 IPV6_PRIORITY_12 = 0xc000000 IPV6_PRIORITY_13 = 0xd000000 IPV6_PRIORITY_14 = 0xe000000 IPV6_PRIORITY_15 = 0xf000000 IPV6_PRIORITY_8 = 0x8000000 IPV6_PRIORITY_9 = 0x9000000 IPV6_PRIORITY_BULK = 0x4000000 IPV6_PRIORITY_CONTROL = 0x7000000 IPV6_PRIORITY_FILLER = 0x1000000 IPV6_PRIORITY_INTERACTIVE = 0x6000000 IPV6_PRIORITY_RESERVED1 = 0x3000000 IPV6_PRIORITY_RESERVED2 = 0x5000000 IPV6_PRIORITY_UNATTENDED = 0x2000000 IPV6_PRIORITY_UNCHARACTERIZED = 0x0 IPV6_RECVDSTOPTS = 0x38 IPV6_RECVHOPLIMIT = 0x29 IPV6_RECVHOPOPTS = 0x35 IPV6_RECVHOPS = 0x22 IPV6_RECVIF = 0x1e IPV6_RECVPATHMTU = 0x2f IPV6_RECVPKTINFO = 0x23 IPV6_RECVRTHDR = 0x33 IPV6_RECVSRCRT = 0x1d IPV6_RECVTCLASS = 0x2a IPV6_RTHDR = 0x32 IPV6_RTHDRDSTOPTS = 0x37 IPV6_RTHDR_TYPE_0 = 0x0 IPV6_RTHDR_TYPE_2 = 0x2 IPV6_SENDIF = 0x1f IPV6_SRFLAG_LOOSE = 0x0 IPV6_SRFLAG_STRICT = 0x10000000 IPV6_TCLASS = 0x2b IPV6_TOKEN_LENGTH = 0x40 IPV6_UNICAST_HOPS = 0x4 IPV6_USE_MIN_MTU = 0x2c IPV6_V6ONLY = 0x25 IPV6_VERSION = 0x60000000 IP_ADDRFORM = 0x16 IP_ADD_MEMBERSHIP = 0xc IP_ADD_SOURCE_MEMBERSHIP = 0x3c IP_BLOCK_SOURCE = 0x3a IP_BROADCAST_IF = 0x10 IP_CACHE_LINE_SIZE = 0x80 IP_DEFAULT_MULTICAST_LOOP = 0x1 IP_DEFAULT_MULTICAST_TTL = 0x1 IP_DF = 0x4000 IP_DHCPMODE = 0x11 IP_DONTFRAG = 0x19 IP_DROP_MEMBERSHIP = 0xd IP_DROP_SOURCE_MEMBERSHIP = 0x3d IP_FINDPMTU = 0x1a IP_HDRINCL = 0x2 IP_INC_MEMBERSHIPS = 0x14 IP_INIT_MEMBERSHIP = 0x14 IP_MAXPACKET = 0xffff IP_MF = 0x2000 IP_MSS = 0x240 IP_MULTICAST_HOPS = 0xa IP_MULTICAST_IF = 0x9 IP_MULTICAST_LOOP = 0xb IP_MULTICAST_TTL = 0xa IP_OPT = 0x1b IP_OPTIONS = 0x1 IP_PMTUAGE = 0x1b IP_RECVDSTADDR = 0x7 IP_RECVIF = 0x14 IP_RECVIFINFO = 0xf IP_RECVINTERFACE = 0x20 IP_RECVMACHDR = 0xe IP_RECVOPTS = 0x5 IP_RECVRETOPTS = 0x6 IP_RECVTTL = 0x22 IP_RETOPTS = 0x8 IP_SOURCE_FILTER = 0x48 IP_TOS = 0x3 IP_TTL = 0x4 IP_UNBLOCK_SOURCE = 0x3b IP_UNICAST_HOPS = 0x4 ISIG = 0x1 ISTRIP = 0x20 IUCLC = 0x800 IXANY = 0x1000 IXOFF = 0x400 IXON = 0x200 I_FLUSH = 0x20005305 LNOFLSH = 0x8000 LOCK_EX = 0x2 LOCK_NB = 0x4 LOCK_SH = 0x1 LOCK_UN = 0x8 MADV_DONTNEED = 0x4 MADV_NORMAL = 0x0 MADV_RANDOM = 0x1 MADV_SEQUENTIAL = 0x2 MADV_SPACEAVAIL = 0x5 MADV_WILLNEED = 0x3 MAP_ANON = 0x10 MAP_ANONYMOUS = 0x10 MAP_FILE = 0x0 MAP_FIXED = 0x100 MAP_PRIVATE = 0x2 MAP_SHARED = 0x1 MAP_TYPE = 0xf0 MAP_VARIABLE = 0x0 MCAST_BLOCK_SOURCE = 0x40 MCAST_EXCLUDE = 0x2 MCAST_INCLUDE = 0x1 MCAST_JOIN_GROUP = 0x3e MCAST_JOIN_SOURCE_GROUP = 0x42 MCAST_LEAVE_GROUP = 0x3f MCAST_LEAVE_SOURCE_GROUP = 0x43 MCAST_SOURCE_FILTER = 0x49 MCAST_UNBLOCK_SOURCE = 0x41 MCL_CURRENT = 0x100 MCL_FUTURE = 0x200 MSG_ANY = 0x4 MSG_ARGEXT = 0x400 MSG_BAND = 0x2 MSG_COMPAT = 0x8000 MSG_CTRUNC = 0x20 MSG_DONTROUTE = 0x4 MSG_EOR = 0x8 MSG_HIPRI = 0x1 MSG_MAXIOVLEN = 0x10 MSG_MPEG2 = 0x80 MSG_NONBLOCK = 0x4000 MSG_NOSIGNAL = 0x100 MSG_OOB = 0x1 MSG_PEEK = 0x2 MSG_TRUNC = 0x10 MSG_WAITALL = 0x40 MSG_WAITFORONE = 0x200 MS_ASYNC = 0x10 MS_EINTR = 0x80 MS_INVALIDATE = 0x40 MS_PER_SEC = 0x3e8 MS_SYNC = 0x20 NFDBITS = 0x40 NL0 = 0x0 NL1 = 0x4000 NL2 = 0x8000 NL3 = 0xc000 NLDLY = 0x4000 NOFLSH = 0x80 NOFLUSH = 0x80000000 OCRNL = 0x8 OFDEL = 0x80 OFILL = 0x40 OLCUC = 0x2 ONLCR = 0x4 ONLRET = 0x20 ONOCR = 0x10 ONOEOT = 0x80000 OPOST = 0x1 OXTABS = 0x40000 O_ACCMODE = 0x23 O_APPEND = 0x8 O_CIO = 0x80 O_CIOR = 0x800000000 O_CLOEXEC = 0x800000 O_CREAT = 0x100 O_DEFER = 0x2000 O_DELAY = 0x4000 O_DIRECT = 0x8000000 O_DIRECTORY = 0x80000 O_DSYNC = 0x400000 O_EFSOFF = 0x400000000 O_EFSON = 0x200000000 O_EXCL = 0x400 O_EXEC = 0x20 O_LARGEFILE = 0x4000000 O_NDELAY = 0x8000 O_NOCACHE = 0x100000 O_NOCTTY = 0x800 O_NOFOLLOW = 0x1000000 O_NONBLOCK = 0x4 O_NONE = 0x3 O_NSHARE = 0x10000 O_RAW = 0x100000000 O_RDONLY = 0x0 O_RDWR = 0x2 O_RSHARE = 0x1000 O_RSYNC = 0x200000 O_SEARCH = 0x20 O_SNAPSHOT = 0x40 O_SYNC = 0x10 O_TRUNC = 0x200 O_TTY_INIT = 0x0 O_WRONLY = 0x1 PARENB = 0x100 PAREXT = 0x100000 PARMRK = 0x8 PARODD = 0x200 PENDIN = 0x20000000 PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 PROT_EXEC = 0x4 PROT_NONE = 0x0 PROT_READ = 0x1 PROT_WRITE = 0x2 PR_64BIT = 0x20 PR_ADDR = 0x2 PR_ARGEXT = 0x400 PR_ATOMIC = 0x1 PR_CONNREQUIRED = 0x4 PR_FASTHZ = 0x5 PR_INP = 0x40 PR_INTRLEVEL = 0x8000 PR_MLS = 0x100 PR_MLS_1_LABEL = 0x200 PR_NOEOR = 0x4000 PR_RIGHTS = 0x10 PR_SLOWHZ = 0x2 PR_WANTRCVD = 0x8 RLIMIT_AS = 0x6 RLIMIT_CORE = 0x4 RLIMIT_CPU = 0x0 RLIMIT_DATA = 0x2 RLIMIT_FSIZE = 0x1 RLIMIT_NOFILE = 0x7 RLIMIT_NPROC = 0x9 RLIMIT_RSS = 0x5 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_DOWNSTREAM = 0x100 RTA_DST = 0x1 RTA_GATEWAY = 0x2 RTA_GENMASK = 0x8 RTA_IFA = 0x20 RTA_IFP = 0x10 RTA_NETMASK = 0x4 RTC_IA64 = 0x3 RTC_POWER = 0x1 RTC_POWER_PC = 0x2 RTF_ACTIVE_DGD = 0x1000000 RTF_BCE = 0x80000 RTF_BLACKHOLE = 0x1000 RTF_BROADCAST = 0x400000 RTF_BUL = 0x2000 RTF_CLONE = 0x10000 RTF_CLONED = 0x20000 RTF_CLONING = 0x100 RTF_DONE = 0x40 RTF_DYNAMIC = 0x10 RTF_FREE_IN_PROG = 0x4000000 RTF_GATEWAY = 0x2 RTF_HOST = 0x4 RTF_LLINFO = 0x400 RTF_LOCAL = 0x200000 RTF_MASK = 0x80 RTF_MODIFIED = 0x20 RTF_MULTICAST = 0x800000 RTF_PERMANENT6 = 0x8000000 RTF_PINNED = 0x100000 RTF_PROTO1 = 0x8000 RTF_PROTO2 = 0x4000 RTF_PROTO3 = 0x40000 RTF_REJECT = 0x8 RTF_SMALLMTU = 0x40000 RTF_STATIC = 0x800 RTF_STOPSRCH = 0x2000000 RTF_UNREACHABLE = 0x10000000 RTF_UP = 0x1 RTF_XRESOLVE = 0x200 RTM_ADD = 0x1 RTM_CHANGE = 0x3 RTM_DELADDR = 0xd RTM_DELETE = 0x2 RTM_EXPIRE = 0xf RTM_GET = 0x4 RTM_GETNEXT = 0x11 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_RTLOST = 0x10 RTM_RTTUNIT = 0xf4240 RTM_SAMEADDR = 0x12 RTM_SET = 0x13 RTM_VERSION = 0x2 RTM_VERSION_GR = 0x4 RTM_VERSION_GR_COMPAT = 0x3 RTM_VERSION_POLICY = 0x5 RTM_VERSION_POLICY_EXT = 0x6 RTM_VERSION_POLICY_PRFN = 0x7 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 RUSAGE_THREAD = 0x1 SCM_RIGHTS = 0x1 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 SIGMAX64 = 0xff SIGQUEUE_MAX = 0x20 SIOCADDIFVIPA = 0x20006942 SIOCADDMTU = -0x7ffb9690 SIOCADDMULTI = -0x7fdf96cf SIOCADDNETID = -0x7fd796a9 SIOCADDRT = -0x7fc78df6 SIOCAIFADDR = -0x7fbf96e6 SIOCATMARK = 0x40047307 SIOCDARP = -0x7fb396e0 SIOCDELIFVIPA = 0x20006943 SIOCDELMTU = -0x7ffb968f SIOCDELMULTI = -0x7fdf96ce SIOCDELPMTU = -0x7fd78ff6 SIOCDELRT = -0x7fc78df5 SIOCDIFADDR = -0x7fd796e7 SIOCDNETOPT = -0x3ffe9680 SIOCDX25XLATE = -0x7fd7969b SIOCFIFADDR = -0x7fdf966d SIOCGARP = -0x3fb396da SIOCGETMTUS = 0x2000696f SIOCGETSGCNT = -0x3feb8acc SIOCGETVIFCNT = -0x3feb8acd SIOCGHIWAT = 0x40047301 SIOCGIFADDR = -0x3fd796df SIOCGIFADDRS = 0x2000698c SIOCGIFBAUDRATE = -0x3fdf9669 SIOCGIFBRDADDR = -0x3fd796dd SIOCGIFCONF = -0x3fef96bb SIOCGIFCONFGLOB = -0x3fef9670 SIOCGIFDSTADDR = -0x3fd796de SIOCGIFFLAGS = -0x3fd796ef SIOCGIFGIDLIST = 0x20006968 SIOCGIFHWADDR = -0x3fab966b SIOCGIFMETRIC = -0x3fd796e9 SIOCGIFMTU = -0x3fd796aa SIOCGIFNETMASK = -0x3fd796db SIOCGIFOPTIONS = -0x3fd796d6 SIOCGISNO = -0x3fd79695 SIOCGLOADF = -0x3ffb967e SIOCGLOWAT = 0x40047303 SIOCGNETOPT = -0x3ffe96a5 SIOCGNETOPT1 = -0x3fdf967f SIOCGNMTUS = 0x2000696e SIOCGPGRP = 0x40047309 SIOCGSIZIFCONF = 0x4004696a SIOCGSRCFILTER = -0x3fe796cb SIOCGTUNEPHASE = -0x3ffb9676 SIOCGX25XLATE = -0x3fd7969c SIOCIFATTACH = -0x7fdf9699 SIOCIFDETACH = -0x7fdf969a SIOCIFGETPKEY = -0x7fdf969b SIOCIF_ATM_DARP = -0x7fdf9683 SIOCIF_ATM_DUMPARP = -0x7fdf9685 SIOCIF_ATM_GARP = -0x7fdf9682 SIOCIF_ATM_IDLE = -0x7fdf9686 SIOCIF_ATM_SARP = -0x7fdf9681 SIOCIF_ATM_SNMPARP = -0x7fdf9687 SIOCIF_ATM_SVC = -0x7fdf9684 SIOCIF_ATM_UBR = -0x7fdf9688 SIOCIF_DEVHEALTH = -0x7ffb966c SIOCIF_IB_ARP_INCOMP = -0x7fdf9677 SIOCIF_IB_ARP_TIMER = -0x7fdf9678 SIOCIF_IB_CLEAR_PINFO = -0x3fdf966f SIOCIF_IB_DEL_ARP = -0x7fdf967f SIOCIF_IB_DEL_PINFO = -0x3fdf9670 SIOCIF_IB_DUMP_ARP = -0x7fdf9680 SIOCIF_IB_GET_ARP = -0x7fdf967e SIOCIF_IB_GET_INFO = -0x3f879675 SIOCIF_IB_GET_STATS = -0x3f879672 SIOCIF_IB_NOTIFY_ADDR_REM = -0x3f87966a SIOCIF_IB_RESET_STATS = -0x3f879671 SIOCIF_IB_RESIZE_CQ = -0x7fdf9679 SIOCIF_IB_SET_ARP = -0x7fdf967d SIOCIF_IB_SET_PKEY = -0x7fdf967c SIOCIF_IB_SET_PORT = -0x7fdf967b SIOCIF_IB_SET_QKEY = -0x7fdf9676 SIOCIF_IB_SET_QSIZE = -0x7fdf967a SIOCLISTIFVIPA = 0x20006944 SIOCSARP = -0x7fb396e2 SIOCSHIWAT = 0xffffffff80047300 SIOCSIFADDR = -0x7fd796f4 SIOCSIFADDRORI = -0x7fdb9673 SIOCSIFBRDADDR = -0x7fd796ed SIOCSIFDSTADDR = -0x7fd796f2 SIOCSIFFLAGS = -0x7fd796f0 SIOCSIFGIDLIST = 0x20006969 SIOCSIFMETRIC = -0x7fd796e8 SIOCSIFMTU = -0x7fd796a8 SIOCSIFNETDUMP = -0x7fd796e4 SIOCSIFNETMASK = -0x7fd796ea SIOCSIFOPTIONS = -0x7fd796d7 SIOCSIFSUBCHAN = -0x7fd796e5 SIOCSISNO = -0x7fd79694 SIOCSLOADF = -0x3ffb967d SIOCSLOWAT = 0xffffffff80047302 SIOCSNETOPT = -0x7ffe96a6 SIOCSPGRP = 0xffffffff80047308 SIOCSX25XLATE = -0x7fd7969d SOCK_CONN_DGRAM = 0x6 SOCK_DGRAM = 0x2 SOCK_RAW = 0x3 SOCK_RDM = 0x4 SOCK_SEQPACKET = 0x5 SOCK_STREAM = 0x1 SOL_SOCKET = 0xffff SOMAXCONN = 0x400 SO_ACCEPTCONN = 0x2 SO_AUDIT = 0x8000 SO_BROADCAST = 0x20 SO_CKSUMRECV = 0x800 SO_DEBUG = 0x1 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 SO_KEEPALIVE = 0x8 SO_KERNACCEPT = 0x2000 SO_LINGER = 0x80 SO_NOMULTIPATH = 0x4000 SO_NOREUSEADDR = 0x1000 SO_OOBINLINE = 0x100 SO_PEERID = 0x1009 SO_RCVBUF = 0x1002 SO_RCVLOWAT = 0x1004 SO_RCVTIMEO = 0x1006 SO_REUSEADDR = 0x4 SO_REUSEPORT = 0x200 SO_SNDBUF = 0x1001 SO_SNDLOWAT = 0x1003 SO_SNDTIMEO = 0x1005 SO_TIMESTAMPNS = 0x100a SO_TYPE = 0x1008 SO_USELOOPBACK = 0x40 SO_USE_IFBUFS = 0x400 S_BANDURG = 0x400 S_EMODFMT = 0x3c000000 S_ENFMT = 0x400 S_ERROR = 0x100 S_HANGUP = 0x200 S_HIPRI = 0x2 S_ICRYPTO = 0x80000 S_IEXEC = 0x40 S_IFBLK = 0x6000 S_IFCHR = 0x2000 S_IFDIR = 0x4000 S_IFIFO = 0x1000 S_IFJOURNAL = 0x10000 S_IFLNK = 0xa000 S_IFMPX = 0x2200 S_IFMT = 0xf000 S_IFPDIR = 0x4000000 S_IFPSDIR = 0x8000000 S_IFPSSDIR = 0xc000000 S_IFREG = 0x8000 S_IFSOCK = 0xc000 S_IFSYSEA = 0x30000000 S_INPUT = 0x1 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_ITCB = 0x1000000 S_ITP = 0x800000 S_IWGRP = 0x10 S_IWOTH = 0x2 S_IWRITE = 0x80 S_IWUSR = 0x80 S_IXACL = 0x2000000 S_IXATTR = 0x40000 S_IXGRP = 0x8 S_IXINTERFACE = 0x100000 S_IXMOD = 0x40000000 S_IXOTH = 0x1 S_IXUSR = 0x40 S_MSG = 0x8 S_OUTPUT = 0x4 S_RDBAND = 0x20 S_RDNORM = 0x10 S_RESERVED1 = 0x20000 S_RESERVED2 = 0x200000 S_RESERVED3 = 0x400000 S_RESERVED4 = 0x80000000 S_RESFMT1 = 0x10000000 S_RESFMT10 = 0x34000000 S_RESFMT11 = 0x38000000 S_RESFMT12 = 0x3c000000 S_RESFMT2 = 0x14000000 S_RESFMT3 = 0x18000000 S_RESFMT4 = 0x1c000000 S_RESFMT5 = 0x20000000 S_RESFMT6 = 0x24000000 S_RESFMT7 = 0x28000000 S_RESFMT8 = 0x2c000000 S_WRBAND = 0x80 S_WRNORM = 0x40 TAB0 = 0x0 TAB1 = 0x400 TAB2 = 0x800 TAB3 = 0xc00 TABDLY = 0xc00 TCFLSH = 0x540c TCGETA = 0x5405 TCGETS = 0x5401 TCIFLUSH = 0x0 TCIOFF = 0x2 TCIOFLUSH = 0x2 TCION = 0x3 TCOFLUSH = 0x1 TCOOFF = 0x0 TCOON = 0x1 TCP_24DAYS_WORTH_OF_SLOWTICKS = 0x3f4800 TCP_ACLADD = 0x23 TCP_ACLBIND = 0x26 TCP_ACLCLEAR = 0x22 TCP_ACLDEL = 0x24 TCP_ACLDENY = 0x8 TCP_ACLFLUSH = 0x21 TCP_ACLGID = 0x1 TCP_ACLLS = 0x25 TCP_ACLSUBNET = 0x4 TCP_ACLUID = 0x2 TCP_CWND_DF = 0x16 TCP_CWND_IF = 0x15 TCP_DELAY_ACK_FIN = 0x2 TCP_DELAY_ACK_SYN = 0x1 TCP_FASTNAME = 0x101080a TCP_KEEPCNT = 0x13 TCP_KEEPIDLE = 0x11 TCP_KEEPINTVL = 0x12 TCP_LSPRIV = 0x29 TCP_LUID = 0x20 TCP_MAXBURST = 0x8 TCP_MAXDF = 0x64 TCP_MAXIF = 0x64 TCP_MAXSEG = 0x2 TCP_MAXWIN = 0xffff TCP_MAXWINDOWSCALE = 0xe TCP_MAX_SACK = 0x4 TCP_MSS = 0x5b4 TCP_NODELAY = 0x1 TCP_NODELAYACK = 0x14 TCP_NOREDUCE_CWND_EXIT_FRXMT = 0x19 TCP_NOREDUCE_CWND_IN_FRXMT = 0x18 TCP_NOTENTER_SSTART = 0x17 TCP_OPT = 0x19 TCP_RFC1323 = 0x4 TCP_SETPRIV = 0x27 TCP_STDURG = 0x10 TCP_TIMESTAMP_OPTLEN = 0xc TCP_UNSETPRIV = 0x28 TCSAFLUSH = 0x2 TCSBRK = 0x5409 TCSETA = 0x5406 TCSETAF = 0x5408 TCSETAW = 0x5407 TCSETS = 0x5402 TCSETSF = 0x5404 TCSETSW = 0x5403 TCXONC = 0x540b TIMER_ABSTIME = 0x3e7 TIMER_MAX = 0x20 TIOC = 0x5400 TIOCCBRK = 0x2000747a TIOCCDTR = 0x20007478 TIOCCONS = 0xffffffff80047462 TIOCEXCL = 0x2000740d TIOCFLUSH = 0xffffffff80047410 TIOCGETC = 0x40067412 TIOCGETD = 0x40047400 TIOCGETP = 0x40067408 TIOCGLTC = 0x40067474 TIOCGPGRP = 0x40047477 TIOCGSID = 0x40047448 TIOCGSIZE = 0x40087468 TIOCGWINSZ = 0x40087468 TIOCHPCL = 0x20007402 TIOCLBIC = 0xffffffff8004747e TIOCLBIS = 0xffffffff8004747f TIOCLGET = 0x4004747c TIOCLSET = 0xffffffff8004747d TIOCMBIC = 0xffffffff8004746b TIOCMBIS = 0xffffffff8004746c TIOCMGET = 0x4004746a TIOCMIWAIT = 0xffffffff80047464 TIOCMODG = 0x40047403 TIOCMODS = 0xffffffff80047404 TIOCMSET = 0xffffffff8004746d 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 = 0xffffffff80047470 TIOCPKT_DATA = 0x0 TIOCPKT_DOSTOP = 0x20 TIOCPKT_FLUSHREAD = 0x1 TIOCPKT_FLUSHWRITE = 0x2 TIOCPKT_NOSTOP = 0x10 TIOCPKT_START = 0x8 TIOCPKT_STOP = 0x4 TIOCREMOTE = 0xffffffff80047469 TIOCSBRK = 0x2000747b TIOCSDTR = 0x20007479 TIOCSETC = 0xffffffff80067411 TIOCSETD = 0xffffffff80047401 TIOCSETN = 0xffffffff8006740a TIOCSETP = 0xffffffff80067409 TIOCSLTC = 0xffffffff80067475 TIOCSPGRP = 0xffffffff80047476 TIOCSSIZE = 0xffffffff80087467 TIOCSTART = 0x2000746e TIOCSTI = 0xffffffff80017472 TIOCSTOP = 0x2000746f TIOCSWINSZ = 0xffffffff80087467 TIOCUCNTL = 0xffffffff80047466 TOSTOP = 0x10000 UTIME_NOW = -0x2 UTIME_OMIT = -0x3 VDISCRD = 0xc VDSUSP = 0xa VEOF = 0x4 VEOL = 0x5 VEOL2 = 0x6 VERASE = 0x2 VINTR = 0x0 VKILL = 0x3 VLNEXT = 0xe VMIN = 0x4 VQUIT = 0x1 VREPRINT = 0xb VSTART = 0x7 VSTOP = 0x8 VSTRT = 0x7 VSUSP = 0x9 VT0 = 0x0 VT1 = 0x8000 VTDELAY = 0x2000 VTDLY = 0x8000 VTIME = 0x5 VWERSE = 0xd WPARSTART = 0x1 WPARSTOP = 0x2 WPARTTYNAME = "Global" XCASE = 0x4 XTABS = 0xc00 _FDATAFLUSH = 0x2000000000 ) // Errors const ( E2BIG = syscall.Errno(0x7) EACCES = syscall.Errno(0xd) EADDRINUSE = syscall.Errno(0x43) EADDRNOTAVAIL = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x42) EAGAIN = syscall.Errno(0xb) EALREADY = syscall.Errno(0x38) EBADF = syscall.Errno(0x9) EBADMSG = syscall.Errno(0x78) EBUSY = syscall.Errno(0x10) ECANCELED = syscall.Errno(0x75) ECHILD = syscall.Errno(0xa) ECHRNG = syscall.Errno(0x25) ECLONEME = syscall.Errno(0x52) ECONNABORTED = syscall.Errno(0x48) ECONNREFUSED = syscall.Errno(0x4f) ECONNRESET = syscall.Errno(0x49) ECORRUPT = syscall.Errno(0x59) EDEADLK = syscall.Errno(0x2d) EDESTADDREQ = syscall.Errno(0x3a) EDESTADDRREQ = syscall.Errno(0x3a) EDIST = syscall.Errno(0x35) EDOM = syscall.Errno(0x21) EDQUOT = syscall.Errno(0x58) EEXIST = syscall.Errno(0x11) EFAULT = syscall.Errno(0xe) EFBIG = syscall.Errno(0x1b) EFORMAT = syscall.Errno(0x30) EHOSTDOWN = syscall.Errno(0x50) EHOSTUNREACH = syscall.Errno(0x51) EIDRM = syscall.Errno(0x24) EILSEQ = syscall.Errno(0x74) EINPROGRESS = syscall.Errno(0x37) EINTR = syscall.Errno(0x4) EINVAL = syscall.Errno(0x16) EIO = syscall.Errno(0x5) EISCONN = syscall.Errno(0x4b) EISDIR = syscall.Errno(0x15) EL2HLT = syscall.Errno(0x2c) EL2NSYNC = syscall.Errno(0x26) EL3HLT = syscall.Errno(0x27) EL3RST = syscall.Errno(0x28) ELNRNG = syscall.Errno(0x29) ELOOP = syscall.Errno(0x55) EMEDIA = syscall.Errno(0x6e) EMFILE = syscall.Errno(0x18) EMLINK = syscall.Errno(0x1f) EMSGSIZE = syscall.Errno(0x3b) EMULTIHOP = syscall.Errno(0x7d) ENAMETOOLONG = syscall.Errno(0x56) ENETDOWN = syscall.Errno(0x45) ENETRESET = syscall.Errno(0x47) ENETUNREACH = syscall.Errno(0x46) ENFILE = syscall.Errno(0x17) ENOATTR = syscall.Errno(0x70) ENOBUFS = syscall.Errno(0x4a) ENOCONNECT = syscall.Errno(0x32) ENOCSI = syscall.Errno(0x2b) ENODATA = syscall.Errno(0x7a) ENODEV = syscall.Errno(0x13) ENOENT = syscall.Errno(0x2) ENOEXEC = syscall.Errno(0x8) ENOLCK = syscall.Errno(0x31) ENOLINK = syscall.Errno(0x7e) ENOMEM = syscall.Errno(0xc) ENOMSG = syscall.Errno(0x23) ENOPROTOOPT = syscall.Errno(0x3d) ENOSPC = syscall.Errno(0x1c) ENOSR = syscall.Errno(0x76) ENOSTR = syscall.Errno(0x7b) ENOSYS = syscall.Errno(0x6d) ENOTBLK = syscall.Errno(0xf) ENOTCONN = syscall.Errno(0x4c) ENOTDIR = syscall.Errno(0x14) ENOTEMPTY = syscall.Errno(0x11) ENOTREADY = syscall.Errno(0x2e) ENOTRECOVERABLE = syscall.Errno(0x5e) ENOTRUST = syscall.Errno(0x72) ENOTSOCK = syscall.Errno(0x39) ENOTSUP = syscall.Errno(0x7c) ENOTTY = syscall.Errno(0x19) ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x40) EOVERFLOW = syscall.Errno(0x7f) EOWNERDEAD = syscall.Errno(0x5f) EPERM = syscall.Errno(0x1) EPFNOSUPPORT = syscall.Errno(0x41) EPIPE = syscall.Errno(0x20) EPROCLIM = syscall.Errno(0x53) EPROTO = syscall.Errno(0x79) EPROTONOSUPPORT = syscall.Errno(0x3e) EPROTOTYPE = syscall.Errno(0x3c) ERANGE = syscall.Errno(0x22) EREMOTE = syscall.Errno(0x5d) ERESTART = syscall.Errno(0x52) EROFS = syscall.Errno(0x1e) ESAD = syscall.Errno(0x71) ESHUTDOWN = syscall.Errno(0x4d) ESOCKTNOSUPPORT = syscall.Errno(0x3f) ESOFT = syscall.Errno(0x6f) ESPIPE = syscall.Errno(0x1d) ESRCH = syscall.Errno(0x3) ESTALE = syscall.Errno(0x34) ESYSERROR = syscall.Errno(0x5a) ETIME = syscall.Errno(0x77) ETIMEDOUT = syscall.Errno(0x4e) ETOOMANYREFS = syscall.Errno(0x73) ETXTBSY = syscall.Errno(0x1a) EUNATCH = syscall.Errno(0x2a) EUSERS = syscall.Errno(0x54) EWOULDBLOCK = syscall.Errno(0xb) EWRPROTECT = syscall.Errno(0x2f) EXDEV = syscall.Errno(0x12) ) // Signals const ( SIGABRT = syscall.Signal(0x6) SIGAIO = syscall.Signal(0x17) SIGALRM = syscall.Signal(0xe) SIGALRM1 = syscall.Signal(0x26) SIGBUS = syscall.Signal(0xa) SIGCAPI = syscall.Signal(0x31) SIGCHLD = syscall.Signal(0x14) SIGCLD = syscall.Signal(0x14) SIGCONT = syscall.Signal(0x13) SIGCPUFAIL = syscall.Signal(0x3b) SIGDANGER = syscall.Signal(0x21) SIGEMT = syscall.Signal(0x7) SIGFPE = syscall.Signal(0x8) SIGGRANT = syscall.Signal(0x3c) SIGHUP = syscall.Signal(0x1) SIGILL = syscall.Signal(0x4) SIGINT = syscall.Signal(0x2) SIGIO = syscall.Signal(0x17) SIGIOINT = syscall.Signal(0x10) SIGIOT = syscall.Signal(0x6) SIGKAP = syscall.Signal(0x3c) SIGKILL = syscall.Signal(0x9) SIGLOST = syscall.Signal(0x6) SIGMAX = syscall.Signal(0xff) SIGMAX32 = syscall.Signal(0x3f) SIGMIGRATE = syscall.Signal(0x23) SIGMSG = syscall.Signal(0x1b) SIGPIPE = syscall.Signal(0xd) SIGPOLL = syscall.Signal(0x17) SIGPRE = syscall.Signal(0x24) SIGPROF = syscall.Signal(0x20) SIGPTY = syscall.Signal(0x17) SIGPWR = syscall.Signal(0x1d) SIGQUIT = syscall.Signal(0x3) SIGRECONFIG = syscall.Signal(0x3a) SIGRETRACT = syscall.Signal(0x3d) SIGSAK = syscall.Signal(0x3f) SIGSEGV = syscall.Signal(0xb) SIGSOUND = syscall.Signal(0x3e) SIGSTOP = syscall.Signal(0x11) SIGSYS = syscall.Signal(0xc) SIGSYSERROR = syscall.Signal(0x30) SIGTALRM = syscall.Signal(0x26) 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) SIGVIRT = syscall.Signal(0x25) SIGVTALRM = syscall.Signal(0x22) SIGWAITING = syscall.Signal(0x27) SIGWINCH = syscall.Signal(0x1c) SIGXCPU = syscall.Signal(0x18) SIGXFSZ = syscall.Signal(0x19) ) // Error table var errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "not owner"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "I/O error"}, {6, "ENXIO", "no such device or address"}, {7, "E2BIG", "arg list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file number"}, {10, "ECHILD", "no child processes"}, {11, "EWOULDBLOCK", "resource temporarily unavailable"}, {12, "ENOMEM", "not enough space"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device busy"}, {17, "ENOTEMPTY", "file exists"}, {18, "EXDEV", "cross-device link"}, {19, "ENODEV", "no such device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "file table overflow"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "not a typewriter"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "argument out of domain"}, {34, "ERANGE", "result too large"}, {35, "ENOMSG", "no message of desired type"}, {36, "EIDRM", "identifier removed"}, {37, "ECHRNG", "channel number out of range"}, {38, "EL2NSYNC", "level 2 not synchronized"}, {39, "EL3HLT", "level 3 halted"}, {40, "EL3RST", "level 3 reset"}, {41, "ELNRNG", "link number out of range"}, {42, "EUNATCH", "protocol driver not attached"}, {43, "ENOCSI", "no CSI structure available"}, {44, "EL2HLT", "level 2 halted"}, {45, "EDEADLK", "deadlock condition if locked"}, {46, "ENOTREADY", "device not ready"}, {47, "EWRPROTECT", "write-protected media"}, {48, "EFORMAT", "unformatted or incompatible media"}, {49, "ENOLCK", "no locks available"}, {50, "ENOCONNECT", "cannot Establish Connection"}, {52, "ESTALE", "missing file or filesystem"}, {53, "EDIST", "requests blocked by Administrator"}, {55, "EINPROGRESS", "operation now in progress"}, {56, "EALREADY", "operation already in progress"}, {57, "ENOTSOCK", "socket operation on non-socket"}, {58, "EDESTADDREQ", "destination address required"}, {59, "EMSGSIZE", "message too long"}, {60, "EPROTOTYPE", "protocol wrong type for socket"}, {61, "ENOPROTOOPT", "protocol not available"}, {62, "EPROTONOSUPPORT", "protocol not supported"}, {63, "ESOCKTNOSUPPORT", "socket type not supported"}, {64, "EOPNOTSUPP", "operation not supported on socket"}, {65, "EPFNOSUPPORT", "protocol family not supported"}, {66, "EAFNOSUPPORT", "addr family not supported by protocol"}, {67, "EADDRINUSE", "address already in use"}, {68, "EADDRNOTAVAIL", "can't assign requested address"}, {69, "ENETDOWN", "network is down"}, {70, "ENETUNREACH", "network is unreachable"}, {71, "ENETRESET", "network dropped connection on reset"}, {72, "ECONNABORTED", "software caused connection abort"}, {73, "ECONNRESET", "connection reset by peer"}, {74, "ENOBUFS", "no buffer space available"}, {75, "EISCONN", "socket is already connected"}, {76, "ENOTCONN", "socket is not connected"}, {77, "ESHUTDOWN", "can't send after socket shutdown"}, {78, "ETIMEDOUT", "connection timed out"}, {79, "ECONNREFUSED", "connection refused"}, {80, "EHOSTDOWN", "host is down"}, {81, "EHOSTUNREACH", "no route to host"}, {82, "ERESTART", "restart the system call"}, {83, "EPROCLIM", "too many processes"}, {84, "EUSERS", "too many users"}, {85, "ELOOP", "too many levels of symbolic links"}, {86, "ENAMETOOLONG", "file name too long"}, {88, "EDQUOT", "disk quota exceeded"}, {89, "ECORRUPT", "invalid file system control data detected"}, {90, "ESYSERROR", "for future use "}, {93, "EREMOTE", "item is not local to host"}, {94, "ENOTRECOVERABLE", "state not recoverable "}, {95, "EOWNERDEAD", "previous owner died "}, {109, "ENOSYS", "function not implemented"}, {110, "EMEDIA", "media surface error"}, {111, "ESOFT", "I/O completed, but needs relocation"}, {112, "ENOATTR", "no attribute found"}, {113, "ESAD", "security Authentication Denied"}, {114, "ENOTRUST", "not a Trusted Program"}, {115, "ETOOMANYREFS", "too many references: can't splice"}, {116, "EILSEQ", "invalid wide character"}, {117, "ECANCELED", "asynchronous I/O cancelled"}, {118, "ENOSR", "out of STREAMS resources"}, {119, "ETIME", "system call timed out"}, {120, "EBADMSG", "next message has wrong type"}, {121, "EPROTO", "error in protocol"}, {122, "ENODATA", "no message on stream head read q"}, {123, "ENOSTR", "fd not associated with a stream"}, {124, "ENOTSUP", "unsupported attribute value"}, {125, "EMULTIHOP", "multihop is not allowed"}, {126, "ENOLINK", "the server link has been severed"}, {127, "EOVERFLOW", "value too large to be stored in data type"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, {6, "SIGIOT", "IOT/Abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGURG", "urgent I/O condition"}, {17, "SIGSTOP", "stopped (signal)"}, {18, "SIGTSTP", "stopped"}, {19, "SIGCONT", "continued"}, {20, "SIGCHLD", "child exited"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGIO", "I/O possible/complete"}, {24, "SIGXCPU", "cputime limit exceeded"}, {25, "SIGXFSZ", "filesize limit exceeded"}, {27, "SIGMSG", "input device data"}, {28, "SIGWINCH", "window size changes"}, {29, "SIGPWR", "power-failure"}, {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGPROF", "profiling timer expired"}, {33, "SIGDANGER", "paging space low"}, {34, "SIGVTALRM", "virtual timer expired"}, {35, "SIGMIGRATE", "signal 35"}, {36, "SIGPRE", "signal 36"}, {37, "SIGVIRT", "signal 37"}, {38, "SIGTALRM", "signal 38"}, {39, "SIGWAITING", "signal 39"}, {48, "SIGSYSERROR", "signal 48"}, {49, "SIGCAPI", "signal 49"}, {58, "SIGRECONFIG", "signal 58"}, {59, "SIGCPUFAIL", "CPU Failure Predicted"}, {60, "SIGGRANT", "monitor mode granted"}, {61, "SIGRETRACT", "monitor mode retracted"}, {62, "SIGSOUND", "sound completed"}, {63, "SIGMAX32", "secure attention"}, {255, "SIGMAX", "signal 255"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go ================================================ // mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && darwin // Code generated by cmd/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 = 0x29 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_SYS_CONTROL = 0x2 AF_UNIX = 0x1 AF_UNSPEC = 0x0 AF_UTUN = 0x26 AF_VSOCK = 0x28 ALTWERASE = 0x200 ATTR_BIT_MAP_COUNT = 0x5 ATTR_CMN_ACCESSMASK = 0x20000 ATTR_CMN_ACCTIME = 0x1000 ATTR_CMN_ADDEDTIME = 0x10000000 ATTR_CMN_BKUPTIME = 0x2000 ATTR_CMN_CHGTIME = 0x800 ATTR_CMN_CRTIME = 0x200 ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000 ATTR_CMN_DEVID = 0x2 ATTR_CMN_DOCUMENT_ID = 0x100000 ATTR_CMN_ERROR = 0x20000000 ATTR_CMN_EXTENDED_SECURITY = 0x400000 ATTR_CMN_FILEID = 0x2000000 ATTR_CMN_FLAGS = 0x40000 ATTR_CMN_FNDRINFO = 0x4000 ATTR_CMN_FSID = 0x4 ATTR_CMN_FULLPATH = 0x8000000 ATTR_CMN_GEN_COUNT = 0x80000 ATTR_CMN_GRPID = 0x10000 ATTR_CMN_GRPUUID = 0x1000000 ATTR_CMN_MODTIME = 0x400 ATTR_CMN_NAME = 0x1 ATTR_CMN_NAMEDATTRCOUNT = 0x80000 ATTR_CMN_NAMEDATTRLIST = 0x100000 ATTR_CMN_OBJID = 0x20 ATTR_CMN_OBJPERMANENTID = 0x40 ATTR_CMN_OBJTAG = 0x10 ATTR_CMN_OBJTYPE = 0x8 ATTR_CMN_OWNERID = 0x8000 ATTR_CMN_PARENTID = 0x4000000 ATTR_CMN_PAROBJID = 0x80 ATTR_CMN_RETURNED_ATTRS = 0x80000000 ATTR_CMN_SCRIPT = 0x100 ATTR_CMN_SETMASK = 0x51c7ff00 ATTR_CMN_USERACCESS = 0x200000 ATTR_CMN_UUID = 0x800000 ATTR_CMN_VALIDMASK = 0xffffffff ATTR_CMN_VOLSETMASK = 0x6700 ATTR_FILE_ALLOCSIZE = 0x4 ATTR_FILE_CLUMPSIZE = 0x10 ATTR_FILE_DATAALLOCSIZE = 0x400 ATTR_FILE_DATAEXTENTS = 0x800 ATTR_FILE_DATALENGTH = 0x200 ATTR_FILE_DEVTYPE = 0x20 ATTR_FILE_FILETYPE = 0x40 ATTR_FILE_FORKCOUNT = 0x80 ATTR_FILE_FORKLIST = 0x100 ATTR_FILE_IOBLOCKSIZE = 0x8 ATTR_FILE_LINKCOUNT = 0x1 ATTR_FILE_RSRCALLOCSIZE = 0x2000 ATTR_FILE_RSRCEXTENTS = 0x4000 ATTR_FILE_RSRCLENGTH = 0x1000 ATTR_FILE_SETMASK = 0x20 ATTR_FILE_TOTALSIZE = 0x2 ATTR_FILE_VALIDMASK = 0x37ff ATTR_VOL_ALLOCATIONCLUMP = 0x40 ATTR_VOL_ATTRIBUTES = 0x40000000 ATTR_VOL_CAPABILITIES = 0x20000 ATTR_VOL_DIRCOUNT = 0x400 ATTR_VOL_ENCODINGSUSED = 0x10000 ATTR_VOL_FILECOUNT = 0x200 ATTR_VOL_FSTYPE = 0x1 ATTR_VOL_INFO = 0x80000000 ATTR_VOL_IOBLOCKSIZE = 0x80 ATTR_VOL_MAXOBJCOUNT = 0x800 ATTR_VOL_MINALLOCATION = 0x20 ATTR_VOL_MOUNTEDDEVICE = 0x8000 ATTR_VOL_MOUNTFLAGS = 0x4000 ATTR_VOL_MOUNTPOINT = 0x1000 ATTR_VOL_NAME = 0x2000 ATTR_VOL_OBJCOUNT = 0x100 ATTR_VOL_QUOTA_SIZE = 0x10000000 ATTR_VOL_RESERVED_SIZE = 0x20000000 ATTR_VOL_SETMASK = 0x80002000 ATTR_VOL_SIGNATURE = 0x2 ATTR_VOL_SIZE = 0x4 ATTR_VOL_SPACEAVAIL = 0x10 ATTR_VOL_SPACEFREE = 0x8 ATTR_VOL_SPACEUSED = 0x800000 ATTR_VOL_UUID = 0x40000 ATTR_VOL_VALIDMASK = 0xf087ffff 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 BS0 = 0x0 BS1 = 0x8000 BSDLY = 0x8000 CFLUSH = 0xf CLOCAL = 0x8000 CLOCK_MONOTONIC = 0x6 CLOCK_MONOTONIC_RAW = 0x4 CLOCK_MONOTONIC_RAW_APPROX = 0x5 CLOCK_PROCESS_CPUTIME_ID = 0xc CLOCK_REALTIME = 0x0 CLOCK_THREAD_CPUTIME_ID = 0x10 CLOCK_UPTIME_RAW = 0x8 CLOCK_UPTIME_RAW_APPROX = 0x9 CLONE_NOFOLLOW = 0x1 CLONE_NOOWNERCOPY = 0x2 CR0 = 0x0 CR1 = 0x1000 CR2 = 0x2000 CR3 = 0x3000 CRDLY = 0x3000 CREAD = 0x800 CRTSCTS = 0x30000 CS5 = 0x0 CS6 = 0x100 CS7 = 0x200 CS8 = 0x300 CSIZE = 0x300 CSTART = 0x11 CSTATUS = 0x14 CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a CTLIOCGINFO = 0xc0644e03 CTL_HW = 0x6 CTL_KERN = 0x1 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 = 0x10a 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_DARWIN = 0x10a 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_EXCEPT = -0xf EVFILT_FS = -0x9 EVFILT_MACHPORT = -0x8 EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 EVFILT_SYSCOUNT = 0x11 EVFILT_THREADMARKER = 0x11 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_DISPATCH2 = 0x180 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 EV_UDATA_SPECIFIC = 0x100 EV_VANISHED = 0x200 EXTA = 0x4b00 EXTB = 0x9600 EXTPROC = 0x800 FD_CLOEXEC = 0x1 FD_SETSIZE = 0x400 FF0 = 0x0 FF1 = 0x4000 FFDLY = 0x4000 FLUSHO = 0x800000 FSOPT_ATTR_CMN_EXTENDED = 0x20 FSOPT_NOFOLLOW = 0x1 FSOPT_NOINMEMUPDATE = 0x2 FSOPT_PACK_INVAL_ATTRS = 0x8 FSOPT_REPORT_FULLSIZE = 0x4 FSOPT_RETURN_REALDEV = 0x200 F_ADDFILESIGS = 0x3d F_ADDFILESIGS_FOR_DYLD_SIM = 0x53 F_ADDFILESIGS_INFO = 0x67 F_ADDFILESIGS_RETURN = 0x61 F_ADDFILESUPPL = 0x68 F_ADDSIGS = 0x3b F_ALLOCATEALL = 0x4 F_ALLOCATECONTIG = 0x2 F_BARRIERFSYNC = 0x55 F_CHECK_LV = 0x62 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_GETPATH_NOFIRMLINK = 0x66 F_GETPROTECTIONCLASS = 0x3f F_GETPROTECTIONLEVEL = 0x4d F_GETSIGSINFO = 0x69 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_PUNCHHOLE = 0x63 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_SPECULATIVE_READ = 0x65 F_THAW_FS = 0x36 F_TRANSCODEKEY = 0x4b F_TRIM_ACTIVE_FILE = 0x64 F_UNLCK = 0x2 F_VOLPOSMODE = 0x4 F_WRLCK = 0x3 HUPCL = 0x4000 HW_MACHINE = 0x1 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_6LOWPAN = 0x40 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 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x400473d1 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_3542DSTOPTS = 0x32 IPV6_3542HOPLIMIT = 0x2f IPV6_3542HOPOPTS = 0x31 IPV6_3542NEXTHOP = 0x30 IPV6_3542PKTINFO = 0x2e IPV6_3542RTHDR = 0x33 IPV6_ADDR_MC_FLAGS_PREFIX = 0x20 IPV6_ADDR_MC_FLAGS_TRANSIENT = 0x10 IPV6_ADDR_MC_FLAGS_UNICAST_BASED = 0x30 IPV6_AUTOFLOWLABEL = 0x3b IPV6_BINDV6ONLY = 0x1b IPV6_BOUND_IF = 0x7d 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_FLOW_ECN_MASK = 0x3000 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_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 = 0x3d IPV6_RECVRTHDR = 0x26 IPV6_RECVTCLASS = 0x23 IPV6_RTHDR = 0x33 IPV6_RTHDRDSTOPTS = 0x39 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_USE_MIN_MTU = 0x2a 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_DONTFRAG = 0x1c 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_RECVTOS = 0x1b 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 KERN_HOSTNAME = 0xa KERN_OSRELEASE = 0x2 KERN_OSTYPE = 0x1 KERN_VERSION = 0x4 LOCAL_PEERCRED = 0x1 LOCAL_PEEREPID = 0x3 LOCAL_PEEREUUID = 0x5 LOCAL_PEERPID = 0x2 LOCAL_PEERTOKEN = 0x6 LOCAL_PEERUUID = 0x4 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_PAGEOUT = 0xa MADV_RANDOM = 0x1 MADV_SEQUENTIAL = 0x2 MADV_WILLNEED = 0x3 MADV_ZERO_WIRED_PAGES = 0x6 MAP_32BIT = 0x8000 MAP_ANON = 0x1000 MAP_ANONYMOUS = 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_RESILIENT_CODESIGN = 0x2000 MAP_RESILIENT_MEDIA = 0x4000 MAP_SHARED = 0x1 MAP_TRANSLATED_ALLOW_EXECUTE = 0x20000 MAP_UNIX03 = 0x40000 MCAST_BLOCK_SOURCE = 0x54 MCAST_EXCLUDE = 0x2 MCAST_INCLUDE = 0x1 MCAST_JOIN_GROUP = 0x50 MCAST_JOIN_SOURCE_GROUP = 0x52 MCAST_LEAVE_GROUP = 0x51 MCAST_LEAVE_SOURCE_GROUP = 0x53 MCAST_UNBLOCK_SOURCE = 0x55 MCAST_UNDEFINED = 0x0 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MNT_ASYNC = 0x40 MNT_AUTOMOUNTED = 0x400000 MNT_CMDFLAGS = 0xf0000 MNT_CPROTECT = 0x80 MNT_DEFWRITE = 0x2000000 MNT_DONTBROWSE = 0x100000 MNT_DOVOLFS = 0x8000 MNT_DWAIT = 0x4 MNT_EXPORTED = 0x100 MNT_EXT_ROOT_DATA_VOL = 0x1 MNT_FORCE = 0x80000 MNT_IGNORE_OWNERSHIP = 0x200000 MNT_JOURNALED = 0x800000 MNT_LOCAL = 0x1000 MNT_MULTILABEL = 0x4000000 MNT_NOATIME = 0x10000000 MNT_NOBLOCK = 0x20000 MNT_NODEV = 0x10 MNT_NOEXEC = 0x4 MNT_NOSUID = 0x8 MNT_NOUSERXATTR = 0x1000000 MNT_NOWAIT = 0x2 MNT_QUARANTINE = 0x400 MNT_QUOTA = 0x2000 MNT_RDONLY = 0x1 MNT_RELOAD = 0x40000 MNT_REMOVABLE = 0x200 MNT_ROOTFS = 0x4000 MNT_SNAPSHOT = 0x40000000 MNT_STRICTATIME = 0x80000000 MNT_SYNCHRONOUS = 0x2 MNT_UNION = 0x20 MNT_UNKNOWNPERMISSIONS = 0x200000 MNT_UPDATE = 0x10000 MNT_VISFLAGMASK = 0xd7f0f7ff MNT_WAIT = 0x1 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_NOSIGNAL = 0x80000 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_FLAGS_PRIV = 0xa NET_RT_IFLIST = 0x3 NET_RT_IFLIST2 = 0x6 NET_RT_MAXID = 0xb NET_RT_STAT = 0x4 NET_RT_TRASH = 0x5 NFDBITS = 0x20 NL0 = 0x0 NL1 = 0x100 NL2 = 0x200 NL3 = 0x300 NLDLY = 0x300 NOFLSH = 0x80000000 NOKERNINFO = 0x2000000 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_FUNLOCK = 0x100 NOTE_LEEWAY = 0x10 NOTE_LINK = 0x10 NOTE_LOWAT = 0x1 NOTE_MACHTIME = 0x100 NOTE_MACH_CONTINUOUS_TIME = 0x80 NOTE_NONE = 0x80 NOTE_NSECONDS = 0x4 NOTE_OOB = 0x2 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 OXTABS = 0x4 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_DP_GETRAWUNENCRYPTED = 0x2 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_NOFOLLOW_ANY = 0x20000000 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 RENAME_EXCL = 0x4 RENAME_NOFOLLOW_ANY = 0x10 RENAME_RESERVED1 = 0x8 RENAME_SECLUDE = 0x1 RENAME_SWAP = 0x2 RLIMIT_AS = 0x5 RLIMIT_CORE = 0x4 RLIMIT_CPU = 0x0 RLIMIT_CPU_USAGE_MONITOR = 0x2 RLIMIT_DATA = 0x2 RLIMIT_FSIZE = 0x1 RLIMIT_MEMLOCK = 0x6 RLIMIT_NOFILE = 0x8 RLIMIT_NPROC = 0x7 RLIMIT_RSS = 0x5 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_DEAD = 0x20000000 RTF_DELCLONE = 0x80 RTF_DONE = 0x40 RTF_DYNAMIC = 0x10 RTF_GATEWAY = 0x2 RTF_GLOBAL = 0x40000000 RTF_HOST = 0x4 RTF_IFREF = 0x4000000 RTF_IFSCOPE = 0x1000000 RTF_LLDATA = 0x400 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 SEEK_CUR = 0x1 SEEK_DATA = 0x4 SEEK_END = 0x2 SEEK_HOLE = 0x3 SEEK_SET = 0x0 SF_APPEND = 0x40000 SF_ARCHIVED = 0x10000 SF_DATALESS = 0x40000000 SF_FIRMLINK = 0x800000 SF_IMMUTABLE = 0x20000 SF_NOUNLINK = 0x100000 SF_RESTRICTED = 0x80000 SF_SETTABLE = 0x3fff0000 SF_SUPPORTED = 0x9f0000 SF_SYNTHETIC = 0xc0000000 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 SIOCGIF6LOWPAN = 0xc02069c5 SIOCGIFADDR = 0xc0206921 SIOCGIFALTMTU = 0xc0206948 SIOCGIFASYNCMAP = 0xc020697c SIOCGIFBOND = 0xc0206947 SIOCGIFBRDADDR = 0xc0206923 SIOCGIFCAP = 0xc020695b SIOCGIFCONF = 0xc00c6924 SIOCGIFDEVMTU = 0xc0206944 SIOCGIFDSTADDR = 0xc0206922 SIOCGIFFLAGS = 0xc0206911 SIOCGIFFUNCTIONALTYPE = 0xc02069ad 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 SIOCGIFXMEDIA = 0xc02c6948 SIOCGLOWAT = 0x40047303 SIOCGPGRP = 0x40047309 SIOCIFCREATE = 0xc0206978 SIOCIFCREATE2 = 0xc020697a SIOCIFDESTROY = 0x80206979 SIOCIFGCLONERS = 0xc0106981 SIOCRSLVMULTI = 0xc010693b SIOCSDRVSPEC = 0x8028697b SIOCSETVLAN = 0x8020697e SIOCSHIWAT = 0x80047300 SIOCSIF6LOWPAN = 0x802069c4 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_LOCAL = 0x0 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_NETSVC_MARKING_LEVEL = 0x1119 SO_NET_SERVICE_TYPE = 0x1116 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_TRACKER_ATTRIBUTE_FLAGS_APP_APPROVED = 0x1 SO_TRACKER_ATTRIBUTE_FLAGS_DOMAIN_SHORT = 0x4 SO_TRACKER_ATTRIBUTE_FLAGS_TRACKER = 0x2 SO_TRACKER_TRANSPARENCY_VERSION = 0x3 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 TAB0 = 0x0 TAB1 = 0x400 TAB2 = 0x800 TAB3 = 0x4 TABDLY = 0xc04 TCIFLUSH = 0x1 TCIOFF = 0x3 TCIOFLUSH = 0x3 TCION = 0x4 TCOFLUSH = 0x2 TCOOFF = 0x1 TCOON = 0x2 TCPOPT_CC = 0xb TCPOPT_CCECHO = 0xd TCPOPT_CCNEW = 0xc TCPOPT_EOL = 0x0 TCPOPT_FASTOPEN = 0x22 TCPOPT_MAXSEG = 0x2 TCPOPT_NOP = 0x1 TCPOPT_SACK = 0x5 TCPOPT_SACK_HDR = 0x1010500 TCPOPT_SACK_PERMITTED = 0x4 TCPOPT_SACK_PERMIT_HDR = 0x1010402 TCPOPT_SIGNATURE = 0x13 TCPOPT_TIMESTAMP = 0x8 TCPOPT_TSTAMP_HDR = 0x101080a TCPOPT_WINDOW = 0x3 TCP_CONNECTIONTIMEOUT = 0x20 TCP_CONNECTION_INFO = 0x106 TCP_ENABLE_ECN = 0x104 TCP_FASTOPEN = 0x105 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 UF_APPEND = 0x4 UF_COMPRESSED = 0x20 UF_DATAVAULT = 0x80 UF_HIDDEN = 0x8000 UF_IMMUTABLE = 0x2 UF_NODUMP = 0x1 UF_OPAQUE = 0x8 UF_SETTABLE = 0xffff UF_TRACKED = 0x40 VDISCARD = 0xf VDSUSP = 0xb VEOF = 0x0 VEOL = 0x1 VEOL2 = 0x2 VERASE = 0x3 VINTR = 0x8 VKILL = 0x5 VLNEXT = 0xe VMADDR_CID_ANY = 0xffffffff VMADDR_CID_HOST = 0x2 VMADDR_CID_HYPERVISOR = 0x0 VMADDR_CID_RESERVED = 0x1 VMADDR_PORT_ANY = 0xffffffff VMIN = 0x10 VM_LOADAVG = 0x2 VM_MACHFACTOR = 0x4 VM_MAXID = 0x6 VM_METER = 0x1 VM_SWAPUSAGE = 0x5 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 XATTR_CREATE = 0x2 XATTR_NODEFAULT = 0x10 XATTR_NOFOLLOW = 0x1 XATTR_NOSECURITY = 0x8 XATTR_REPLACE = 0x4 XATTR_SHOWCOMPRESSION = 0x20 ) // 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "device not configured"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EDEADLK", "resource deadlock avoided"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "resource busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "cross-device link"}, {19, "ENODEV", "operation not supported by device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "result too large"}, {35, "EAGAIN", "resource temporarily unavailable"}, {36, "EINPROGRESS", "operation now in progress"}, {37, "EALREADY", "operation already in progress"}, {38, "ENOTSOCK", "socket operation on non-socket"}, {39, "EDESTADDRREQ", "destination address required"}, {40, "EMSGSIZE", "message too long"}, {41, "EPROTOTYPE", "protocol wrong type for socket"}, {42, "ENOPROTOOPT", "protocol not available"}, {43, "EPROTONOSUPPORT", "protocol not supported"}, {44, "ESOCKTNOSUPPORT", "socket type not supported"}, {45, "ENOTSUP", "operation not supported"}, {46, "EPFNOSUPPORT", "protocol family not supported"}, {47, "EAFNOSUPPORT", "address family not supported by protocol family"}, {48, "EADDRINUSE", "address already in use"}, {49, "EADDRNOTAVAIL", "can't assign requested address"}, {50, "ENETDOWN", "network is down"}, {51, "ENETUNREACH", "network is unreachable"}, {52, "ENETRESET", "network dropped connection on reset"}, {53, "ECONNABORTED", "software caused connection abort"}, {54, "ECONNRESET", "connection reset by peer"}, {55, "ENOBUFS", "no buffer space available"}, {56, "EISCONN", "socket is already connected"}, {57, "ENOTCONN", "socket is not connected"}, {58, "ESHUTDOWN", "can't send after socket shutdown"}, {59, "ETOOMANYREFS", "too many references: can't splice"}, {60, "ETIMEDOUT", "operation timed out"}, {61, "ECONNREFUSED", "connection refused"}, {62, "ELOOP", "too many levels of symbolic links"}, {63, "ENAMETOOLONG", "file name too long"}, {64, "EHOSTDOWN", "host is down"}, {65, "EHOSTUNREACH", "no route to host"}, {66, "ENOTEMPTY", "directory not empty"}, {67, "EPROCLIM", "too many processes"}, {68, "EUSERS", "too many users"}, {69, "EDQUOT", "disc quota exceeded"}, {70, "ESTALE", "stale NFS file handle"}, {71, "EREMOTE", "too many levels of remote in path"}, {72, "EBADRPC", "RPC struct is bad"}, {73, "ERPCMISMATCH", "RPC version wrong"}, {74, "EPROGUNAVAIL", "RPC prog. not avail"}, {75, "EPROGMISMATCH", "program version wrong"}, {76, "EPROCUNAVAIL", "bad procedure for program"}, {77, "ENOLCK", "no locks available"}, {78, "ENOSYS", "function not implemented"}, {79, "EFTYPE", "inappropriate file type or format"}, {80, "EAUTH", "authentication error"}, {81, "ENEEDAUTH", "need authenticator"}, {82, "EPWROFF", "device power is off"}, {83, "EDEVERR", "device error"}, {84, "EOVERFLOW", "value too large to be stored in data type"}, {85, "EBADEXEC", "bad executable (or shared library)"}, {86, "EBADARCH", "bad CPU type in executable"}, {87, "ESHLIBVERS", "shared library version mismatch"}, {88, "EBADMACHO", "malformed Mach-o file"}, {89, "ECANCELED", "operation canceled"}, {90, "EIDRM", "identifier removed"}, {91, "ENOMSG", "no message of desired type"}, {92, "EILSEQ", "illegal byte sequence"}, {93, "ENOATTR", "attribute not found"}, {94, "EBADMSG", "bad message"}, {95, "EMULTIHOP", "EMULTIHOP (Reserved)"}, {96, "ENODATA", "no message available on STREAM"}, {97, "ENOLINK", "ENOLINK (Reserved)"}, {98, "ENOSR", "no STREAM resources"}, {99, "ENOSTR", "not a STREAM"}, {100, "EPROTO", "protocol error"}, {101, "ETIME", "STREAM ioctl timeout"}, {102, "EOPNOTSUPP", "operation not supported on socket"}, {103, "ENOPOLICY", "policy not found"}, {104, "ENOTRECOVERABLE", "state not recoverable"}, {105, "EOWNERDEAD", "previous owner died"}, {106, "EQFULL", "interface output queue is full"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, {6, "SIGABRT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGURG", "urgent I/O condition"}, {17, "SIGSTOP", "suspended (signal)"}, {18, "SIGTSTP", "suspended"}, {19, "SIGCONT", "continued"}, {20, "SIGCHLD", "child exited"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGIO", "I/O possible"}, {24, "SIGXCPU", "cputime limit exceeded"}, {25, "SIGXFSZ", "filesize limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window size changes"}, {29, "SIGINFO", "information request"}, {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go ================================================ // mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && darwin // Code generated by cmd/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 = 0x29 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_SYS_CONTROL = 0x2 AF_UNIX = 0x1 AF_UNSPEC = 0x0 AF_UTUN = 0x26 AF_VSOCK = 0x28 ALTWERASE = 0x200 ATTR_BIT_MAP_COUNT = 0x5 ATTR_CMN_ACCESSMASK = 0x20000 ATTR_CMN_ACCTIME = 0x1000 ATTR_CMN_ADDEDTIME = 0x10000000 ATTR_CMN_BKUPTIME = 0x2000 ATTR_CMN_CHGTIME = 0x800 ATTR_CMN_CRTIME = 0x200 ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000 ATTR_CMN_DEVID = 0x2 ATTR_CMN_DOCUMENT_ID = 0x100000 ATTR_CMN_ERROR = 0x20000000 ATTR_CMN_EXTENDED_SECURITY = 0x400000 ATTR_CMN_FILEID = 0x2000000 ATTR_CMN_FLAGS = 0x40000 ATTR_CMN_FNDRINFO = 0x4000 ATTR_CMN_FSID = 0x4 ATTR_CMN_FULLPATH = 0x8000000 ATTR_CMN_GEN_COUNT = 0x80000 ATTR_CMN_GRPID = 0x10000 ATTR_CMN_GRPUUID = 0x1000000 ATTR_CMN_MODTIME = 0x400 ATTR_CMN_NAME = 0x1 ATTR_CMN_NAMEDATTRCOUNT = 0x80000 ATTR_CMN_NAMEDATTRLIST = 0x100000 ATTR_CMN_OBJID = 0x20 ATTR_CMN_OBJPERMANENTID = 0x40 ATTR_CMN_OBJTAG = 0x10 ATTR_CMN_OBJTYPE = 0x8 ATTR_CMN_OWNERID = 0x8000 ATTR_CMN_PARENTID = 0x4000000 ATTR_CMN_PAROBJID = 0x80 ATTR_CMN_RETURNED_ATTRS = 0x80000000 ATTR_CMN_SCRIPT = 0x100 ATTR_CMN_SETMASK = 0x51c7ff00 ATTR_CMN_USERACCESS = 0x200000 ATTR_CMN_UUID = 0x800000 ATTR_CMN_VALIDMASK = 0xffffffff ATTR_CMN_VOLSETMASK = 0x6700 ATTR_FILE_ALLOCSIZE = 0x4 ATTR_FILE_CLUMPSIZE = 0x10 ATTR_FILE_DATAALLOCSIZE = 0x400 ATTR_FILE_DATAEXTENTS = 0x800 ATTR_FILE_DATALENGTH = 0x200 ATTR_FILE_DEVTYPE = 0x20 ATTR_FILE_FILETYPE = 0x40 ATTR_FILE_FORKCOUNT = 0x80 ATTR_FILE_FORKLIST = 0x100 ATTR_FILE_IOBLOCKSIZE = 0x8 ATTR_FILE_LINKCOUNT = 0x1 ATTR_FILE_RSRCALLOCSIZE = 0x2000 ATTR_FILE_RSRCEXTENTS = 0x4000 ATTR_FILE_RSRCLENGTH = 0x1000 ATTR_FILE_SETMASK = 0x20 ATTR_FILE_TOTALSIZE = 0x2 ATTR_FILE_VALIDMASK = 0x37ff ATTR_VOL_ALLOCATIONCLUMP = 0x40 ATTR_VOL_ATTRIBUTES = 0x40000000 ATTR_VOL_CAPABILITIES = 0x20000 ATTR_VOL_DIRCOUNT = 0x400 ATTR_VOL_ENCODINGSUSED = 0x10000 ATTR_VOL_FILECOUNT = 0x200 ATTR_VOL_FSTYPE = 0x1 ATTR_VOL_INFO = 0x80000000 ATTR_VOL_IOBLOCKSIZE = 0x80 ATTR_VOL_MAXOBJCOUNT = 0x800 ATTR_VOL_MINALLOCATION = 0x20 ATTR_VOL_MOUNTEDDEVICE = 0x8000 ATTR_VOL_MOUNTFLAGS = 0x4000 ATTR_VOL_MOUNTPOINT = 0x1000 ATTR_VOL_NAME = 0x2000 ATTR_VOL_OBJCOUNT = 0x100 ATTR_VOL_QUOTA_SIZE = 0x10000000 ATTR_VOL_RESERVED_SIZE = 0x20000000 ATTR_VOL_SETMASK = 0x80002000 ATTR_VOL_SIGNATURE = 0x2 ATTR_VOL_SIZE = 0x4 ATTR_VOL_SPACEAVAIL = 0x10 ATTR_VOL_SPACEFREE = 0x8 ATTR_VOL_SPACEUSED = 0x800000 ATTR_VOL_UUID = 0x40000 ATTR_VOL_VALIDMASK = 0xf087ffff 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 BS0 = 0x0 BS1 = 0x8000 BSDLY = 0x8000 CFLUSH = 0xf CLOCAL = 0x8000 CLOCK_MONOTONIC = 0x6 CLOCK_MONOTONIC_RAW = 0x4 CLOCK_MONOTONIC_RAW_APPROX = 0x5 CLOCK_PROCESS_CPUTIME_ID = 0xc CLOCK_REALTIME = 0x0 CLOCK_THREAD_CPUTIME_ID = 0x10 CLOCK_UPTIME_RAW = 0x8 CLOCK_UPTIME_RAW_APPROX = 0x9 CLONE_NOFOLLOW = 0x1 CLONE_NOOWNERCOPY = 0x2 CR0 = 0x0 CR1 = 0x1000 CR2 = 0x2000 CR3 = 0x3000 CRDLY = 0x3000 CREAD = 0x800 CRTSCTS = 0x30000 CS5 = 0x0 CS6 = 0x100 CS7 = 0x200 CS8 = 0x300 CSIZE = 0x300 CSTART = 0x11 CSTATUS = 0x14 CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a CTLIOCGINFO = 0xc0644e03 CTL_HW = 0x6 CTL_KERN = 0x1 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 = 0x10a 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_DARWIN = 0x10a 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_EXCEPT = -0xf EVFILT_FS = -0x9 EVFILT_MACHPORT = -0x8 EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 EVFILT_SYSCOUNT = 0x11 EVFILT_THREADMARKER = 0x11 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_DISPATCH2 = 0x180 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 EV_UDATA_SPECIFIC = 0x100 EV_VANISHED = 0x200 EXTA = 0x4b00 EXTB = 0x9600 EXTPROC = 0x800 FD_CLOEXEC = 0x1 FD_SETSIZE = 0x400 FF0 = 0x0 FF1 = 0x4000 FFDLY = 0x4000 FLUSHO = 0x800000 FSOPT_ATTR_CMN_EXTENDED = 0x20 FSOPT_NOFOLLOW = 0x1 FSOPT_NOINMEMUPDATE = 0x2 FSOPT_PACK_INVAL_ATTRS = 0x8 FSOPT_REPORT_FULLSIZE = 0x4 FSOPT_RETURN_REALDEV = 0x200 F_ADDFILESIGS = 0x3d F_ADDFILESIGS_FOR_DYLD_SIM = 0x53 F_ADDFILESIGS_INFO = 0x67 F_ADDFILESIGS_RETURN = 0x61 F_ADDFILESUPPL = 0x68 F_ADDSIGS = 0x3b F_ALLOCATEALL = 0x4 F_ALLOCATECONTIG = 0x2 F_BARRIERFSYNC = 0x55 F_CHECK_LV = 0x62 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_GETPATH_NOFIRMLINK = 0x66 F_GETPROTECTIONCLASS = 0x3f F_GETPROTECTIONLEVEL = 0x4d F_GETSIGSINFO = 0x69 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_PUNCHHOLE = 0x63 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_SPECULATIVE_READ = 0x65 F_THAW_FS = 0x36 F_TRANSCODEKEY = 0x4b F_TRIM_ACTIVE_FILE = 0x64 F_UNLCK = 0x2 F_VOLPOSMODE = 0x4 F_WRLCK = 0x3 HUPCL = 0x4000 HW_MACHINE = 0x1 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_6LOWPAN = 0x40 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 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x400473d1 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_3542DSTOPTS = 0x32 IPV6_3542HOPLIMIT = 0x2f IPV6_3542HOPOPTS = 0x31 IPV6_3542NEXTHOP = 0x30 IPV6_3542PKTINFO = 0x2e IPV6_3542RTHDR = 0x33 IPV6_ADDR_MC_FLAGS_PREFIX = 0x20 IPV6_ADDR_MC_FLAGS_TRANSIENT = 0x10 IPV6_ADDR_MC_FLAGS_UNICAST_BASED = 0x30 IPV6_AUTOFLOWLABEL = 0x3b IPV6_BINDV6ONLY = 0x1b IPV6_BOUND_IF = 0x7d 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_FLOW_ECN_MASK = 0x3000 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_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 = 0x3d IPV6_RECVRTHDR = 0x26 IPV6_RECVTCLASS = 0x23 IPV6_RTHDR = 0x33 IPV6_RTHDRDSTOPTS = 0x39 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_USE_MIN_MTU = 0x2a 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_DONTFRAG = 0x1c 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_RECVTOS = 0x1b 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 KERN_HOSTNAME = 0xa KERN_OSRELEASE = 0x2 KERN_OSTYPE = 0x1 KERN_VERSION = 0x4 LOCAL_PEERCRED = 0x1 LOCAL_PEEREPID = 0x3 LOCAL_PEEREUUID = 0x5 LOCAL_PEERPID = 0x2 LOCAL_PEERTOKEN = 0x6 LOCAL_PEERUUID = 0x4 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_PAGEOUT = 0xa MADV_RANDOM = 0x1 MADV_SEQUENTIAL = 0x2 MADV_WILLNEED = 0x3 MADV_ZERO_WIRED_PAGES = 0x6 MAP_32BIT = 0x8000 MAP_ANON = 0x1000 MAP_ANONYMOUS = 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_RESILIENT_CODESIGN = 0x2000 MAP_RESILIENT_MEDIA = 0x4000 MAP_SHARED = 0x1 MAP_TRANSLATED_ALLOW_EXECUTE = 0x20000 MAP_UNIX03 = 0x40000 MCAST_BLOCK_SOURCE = 0x54 MCAST_EXCLUDE = 0x2 MCAST_INCLUDE = 0x1 MCAST_JOIN_GROUP = 0x50 MCAST_JOIN_SOURCE_GROUP = 0x52 MCAST_LEAVE_GROUP = 0x51 MCAST_LEAVE_SOURCE_GROUP = 0x53 MCAST_UNBLOCK_SOURCE = 0x55 MCAST_UNDEFINED = 0x0 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MNT_ASYNC = 0x40 MNT_AUTOMOUNTED = 0x400000 MNT_CMDFLAGS = 0xf0000 MNT_CPROTECT = 0x80 MNT_DEFWRITE = 0x2000000 MNT_DONTBROWSE = 0x100000 MNT_DOVOLFS = 0x8000 MNT_DWAIT = 0x4 MNT_EXPORTED = 0x100 MNT_EXT_ROOT_DATA_VOL = 0x1 MNT_FORCE = 0x80000 MNT_IGNORE_OWNERSHIP = 0x200000 MNT_JOURNALED = 0x800000 MNT_LOCAL = 0x1000 MNT_MULTILABEL = 0x4000000 MNT_NOATIME = 0x10000000 MNT_NOBLOCK = 0x20000 MNT_NODEV = 0x10 MNT_NOEXEC = 0x4 MNT_NOSUID = 0x8 MNT_NOUSERXATTR = 0x1000000 MNT_NOWAIT = 0x2 MNT_QUARANTINE = 0x400 MNT_QUOTA = 0x2000 MNT_RDONLY = 0x1 MNT_RELOAD = 0x40000 MNT_REMOVABLE = 0x200 MNT_ROOTFS = 0x4000 MNT_SNAPSHOT = 0x40000000 MNT_STRICTATIME = 0x80000000 MNT_SYNCHRONOUS = 0x2 MNT_UNION = 0x20 MNT_UNKNOWNPERMISSIONS = 0x200000 MNT_UPDATE = 0x10000 MNT_VISFLAGMASK = 0xd7f0f7ff MNT_WAIT = 0x1 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_NOSIGNAL = 0x80000 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_FLAGS_PRIV = 0xa NET_RT_IFLIST = 0x3 NET_RT_IFLIST2 = 0x6 NET_RT_MAXID = 0xb NET_RT_STAT = 0x4 NET_RT_TRASH = 0x5 NFDBITS = 0x20 NL0 = 0x0 NL1 = 0x100 NL2 = 0x200 NL3 = 0x300 NLDLY = 0x300 NOFLSH = 0x80000000 NOKERNINFO = 0x2000000 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_FUNLOCK = 0x100 NOTE_LEEWAY = 0x10 NOTE_LINK = 0x10 NOTE_LOWAT = 0x1 NOTE_MACHTIME = 0x100 NOTE_MACH_CONTINUOUS_TIME = 0x80 NOTE_NONE = 0x80 NOTE_NSECONDS = 0x4 NOTE_OOB = 0x2 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 OXTABS = 0x4 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_DP_GETRAWUNENCRYPTED = 0x2 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_NOFOLLOW_ANY = 0x20000000 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 RENAME_EXCL = 0x4 RENAME_NOFOLLOW_ANY = 0x10 RENAME_RESERVED1 = 0x8 RENAME_SECLUDE = 0x1 RENAME_SWAP = 0x2 RLIMIT_AS = 0x5 RLIMIT_CORE = 0x4 RLIMIT_CPU = 0x0 RLIMIT_CPU_USAGE_MONITOR = 0x2 RLIMIT_DATA = 0x2 RLIMIT_FSIZE = 0x1 RLIMIT_MEMLOCK = 0x6 RLIMIT_NOFILE = 0x8 RLIMIT_NPROC = 0x7 RLIMIT_RSS = 0x5 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_DEAD = 0x20000000 RTF_DELCLONE = 0x80 RTF_DONE = 0x40 RTF_DYNAMIC = 0x10 RTF_GATEWAY = 0x2 RTF_GLOBAL = 0x40000000 RTF_HOST = 0x4 RTF_IFREF = 0x4000000 RTF_IFSCOPE = 0x1000000 RTF_LLDATA = 0x400 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 SEEK_CUR = 0x1 SEEK_DATA = 0x4 SEEK_END = 0x2 SEEK_HOLE = 0x3 SEEK_SET = 0x0 SF_APPEND = 0x40000 SF_ARCHIVED = 0x10000 SF_DATALESS = 0x40000000 SF_FIRMLINK = 0x800000 SF_IMMUTABLE = 0x20000 SF_NOUNLINK = 0x100000 SF_RESTRICTED = 0x80000 SF_SETTABLE = 0x3fff0000 SF_SUPPORTED = 0x9f0000 SF_SYNTHETIC = 0xc0000000 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 SIOCGIF6LOWPAN = 0xc02069c5 SIOCGIFADDR = 0xc0206921 SIOCGIFALTMTU = 0xc0206948 SIOCGIFASYNCMAP = 0xc020697c SIOCGIFBOND = 0xc0206947 SIOCGIFBRDADDR = 0xc0206923 SIOCGIFCAP = 0xc020695b SIOCGIFCONF = 0xc00c6924 SIOCGIFDEVMTU = 0xc0206944 SIOCGIFDSTADDR = 0xc0206922 SIOCGIFFLAGS = 0xc0206911 SIOCGIFFUNCTIONALTYPE = 0xc02069ad 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 SIOCGIFXMEDIA = 0xc02c6948 SIOCGLOWAT = 0x40047303 SIOCGPGRP = 0x40047309 SIOCIFCREATE = 0xc0206978 SIOCIFCREATE2 = 0xc020697a SIOCIFDESTROY = 0x80206979 SIOCIFGCLONERS = 0xc0106981 SIOCRSLVMULTI = 0xc010693b SIOCSDRVSPEC = 0x8028697b SIOCSETVLAN = 0x8020697e SIOCSHIWAT = 0x80047300 SIOCSIF6LOWPAN = 0x802069c4 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_LOCAL = 0x0 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_NETSVC_MARKING_LEVEL = 0x1119 SO_NET_SERVICE_TYPE = 0x1116 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_TRACKER_ATTRIBUTE_FLAGS_APP_APPROVED = 0x1 SO_TRACKER_ATTRIBUTE_FLAGS_DOMAIN_SHORT = 0x4 SO_TRACKER_ATTRIBUTE_FLAGS_TRACKER = 0x2 SO_TRACKER_TRANSPARENCY_VERSION = 0x3 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 TAB0 = 0x0 TAB1 = 0x400 TAB2 = 0x800 TAB3 = 0x4 TABDLY = 0xc04 TCIFLUSH = 0x1 TCIOFF = 0x3 TCIOFLUSH = 0x3 TCION = 0x4 TCOFLUSH = 0x2 TCOOFF = 0x1 TCOON = 0x2 TCPOPT_CC = 0xb TCPOPT_CCECHO = 0xd TCPOPT_CCNEW = 0xc TCPOPT_EOL = 0x0 TCPOPT_FASTOPEN = 0x22 TCPOPT_MAXSEG = 0x2 TCPOPT_NOP = 0x1 TCPOPT_SACK = 0x5 TCPOPT_SACK_HDR = 0x1010500 TCPOPT_SACK_PERMITTED = 0x4 TCPOPT_SACK_PERMIT_HDR = 0x1010402 TCPOPT_SIGNATURE = 0x13 TCPOPT_TIMESTAMP = 0x8 TCPOPT_TSTAMP_HDR = 0x101080a TCPOPT_WINDOW = 0x3 TCP_CONNECTIONTIMEOUT = 0x20 TCP_CONNECTION_INFO = 0x106 TCP_ENABLE_ECN = 0x104 TCP_FASTOPEN = 0x105 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 UF_APPEND = 0x4 UF_COMPRESSED = 0x20 UF_DATAVAULT = 0x80 UF_HIDDEN = 0x8000 UF_IMMUTABLE = 0x2 UF_NODUMP = 0x1 UF_OPAQUE = 0x8 UF_SETTABLE = 0xffff UF_TRACKED = 0x40 VDISCARD = 0xf VDSUSP = 0xb VEOF = 0x0 VEOL = 0x1 VEOL2 = 0x2 VERASE = 0x3 VINTR = 0x8 VKILL = 0x5 VLNEXT = 0xe VMADDR_CID_ANY = 0xffffffff VMADDR_CID_HOST = 0x2 VMADDR_CID_HYPERVISOR = 0x0 VMADDR_CID_RESERVED = 0x1 VMADDR_PORT_ANY = 0xffffffff VMIN = 0x10 VM_LOADAVG = 0x2 VM_MACHFACTOR = 0x4 VM_MAXID = 0x6 VM_METER = 0x1 VM_SWAPUSAGE = 0x5 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 XATTR_CREATE = 0x2 XATTR_NODEFAULT = 0x10 XATTR_NOFOLLOW = 0x1 XATTR_NOSECURITY = 0x8 XATTR_REPLACE = 0x4 XATTR_SHOWCOMPRESSION = 0x20 ) // 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "device not configured"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EDEADLK", "resource deadlock avoided"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "resource busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "cross-device link"}, {19, "ENODEV", "operation not supported by device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "result too large"}, {35, "EAGAIN", "resource temporarily unavailable"}, {36, "EINPROGRESS", "operation now in progress"}, {37, "EALREADY", "operation already in progress"}, {38, "ENOTSOCK", "socket operation on non-socket"}, {39, "EDESTADDRREQ", "destination address required"}, {40, "EMSGSIZE", "message too long"}, {41, "EPROTOTYPE", "protocol wrong type for socket"}, {42, "ENOPROTOOPT", "protocol not available"}, {43, "EPROTONOSUPPORT", "protocol not supported"}, {44, "ESOCKTNOSUPPORT", "socket type not supported"}, {45, "ENOTSUP", "operation not supported"}, {46, "EPFNOSUPPORT", "protocol family not supported"}, {47, "EAFNOSUPPORT", "address family not supported by protocol family"}, {48, "EADDRINUSE", "address already in use"}, {49, "EADDRNOTAVAIL", "can't assign requested address"}, {50, "ENETDOWN", "network is down"}, {51, "ENETUNREACH", "network is unreachable"}, {52, "ENETRESET", "network dropped connection on reset"}, {53, "ECONNABORTED", "software caused connection abort"}, {54, "ECONNRESET", "connection reset by peer"}, {55, "ENOBUFS", "no buffer space available"}, {56, "EISCONN", "socket is already connected"}, {57, "ENOTCONN", "socket is not connected"}, {58, "ESHUTDOWN", "can't send after socket shutdown"}, {59, "ETOOMANYREFS", "too many references: can't splice"}, {60, "ETIMEDOUT", "operation timed out"}, {61, "ECONNREFUSED", "connection refused"}, {62, "ELOOP", "too many levels of symbolic links"}, {63, "ENAMETOOLONG", "file name too long"}, {64, "EHOSTDOWN", "host is down"}, {65, "EHOSTUNREACH", "no route to host"}, {66, "ENOTEMPTY", "directory not empty"}, {67, "EPROCLIM", "too many processes"}, {68, "EUSERS", "too many users"}, {69, "EDQUOT", "disc quota exceeded"}, {70, "ESTALE", "stale NFS file handle"}, {71, "EREMOTE", "too many levels of remote in path"}, {72, "EBADRPC", "RPC struct is bad"}, {73, "ERPCMISMATCH", "RPC version wrong"}, {74, "EPROGUNAVAIL", "RPC prog. not avail"}, {75, "EPROGMISMATCH", "program version wrong"}, {76, "EPROCUNAVAIL", "bad procedure for program"}, {77, "ENOLCK", "no locks available"}, {78, "ENOSYS", "function not implemented"}, {79, "EFTYPE", "inappropriate file type or format"}, {80, "EAUTH", "authentication error"}, {81, "ENEEDAUTH", "need authenticator"}, {82, "EPWROFF", "device power is off"}, {83, "EDEVERR", "device error"}, {84, "EOVERFLOW", "value too large to be stored in data type"}, {85, "EBADEXEC", "bad executable (or shared library)"}, {86, "EBADARCH", "bad CPU type in executable"}, {87, "ESHLIBVERS", "shared library version mismatch"}, {88, "EBADMACHO", "malformed Mach-o file"}, {89, "ECANCELED", "operation canceled"}, {90, "EIDRM", "identifier removed"}, {91, "ENOMSG", "no message of desired type"}, {92, "EILSEQ", "illegal byte sequence"}, {93, "ENOATTR", "attribute not found"}, {94, "EBADMSG", "bad message"}, {95, "EMULTIHOP", "EMULTIHOP (Reserved)"}, {96, "ENODATA", "no message available on STREAM"}, {97, "ENOLINK", "ENOLINK (Reserved)"}, {98, "ENOSR", "no STREAM resources"}, {99, "ENOSTR", "not a STREAM"}, {100, "EPROTO", "protocol error"}, {101, "ETIME", "STREAM ioctl timeout"}, {102, "EOPNOTSUPP", "operation not supported on socket"}, {103, "ENOPOLICY", "policy not found"}, {104, "ENOTRECOVERABLE", "state not recoverable"}, {105, "EOWNERDEAD", "previous owner died"}, {106, "EQFULL", "interface output queue is full"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, {6, "SIGABRT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGURG", "urgent I/O condition"}, {17, "SIGSTOP", "suspended (signal)"}, {18, "SIGTSTP", "suspended"}, {19, "SIGCONT", "continued"}, {20, "SIGCHLD", "child exited"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGIO", "I/O possible"}, {24, "SIGXCPU", "cputime limit exceeded"}, {25, "SIGXFSZ", "filesize limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window size changes"}, {29, "SIGINFO", "information request"}, {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go ================================================ // mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && dragonfly // Code generated by cmd/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_NETBIOS = 0x6 AF_NETGRAPH = 0x20 AF_OSI = 0x7 AF_PUP = 0x4 AF_ROUTE = 0x11 AF_SIP = 0x18 AF_SNA = 0xb AF_UNIX = 0x1 AF_UNSPEC = 0x0 ALTWERASE = 0x200 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 = 0xc0104279 BIOCGETIF = 0x4020426b BIOCGFEEDBACK = 0x4004427c 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 BIOCSFEEDBACK = 0x8004427d 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_MOD = 0x90 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 BPF_XOR = 0xa0 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 CPUSTATES = 0x5 CP_IDLE = 0x4 CP_INTR = 0x3 CP_NICE = 0x1 CP_SYS = 0x2 CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x30000 CS5 = 0x0 CS6 = 0x100 CS7 = 0x200 CS8 = 0x300 CSIZE = 0x300 CSTART = 0x11 CSTATUS = 0x14 CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a CTL_HW = 0x6 CTL_KERN = 0x1 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_BREDR_BB = 0xff DLT_BLUETOOTH_HCI_H4 = 0xbb DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 DLT_BLUETOOTH_LE_LL = 0xfb DLT_BLUETOOTH_LE_LL_WITH_PHDR = 0x100 DLT_BLUETOOTH_LINUX_MONITOR = 0xfe 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_EPON = 0x103 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_INFINIBAND = 0xf7 DLT_IPFILTER = 0x74 DLT_IPMB = 0xc7 DLT_IPMB_LINUX = 0xd1 DLT_IPMI_HPM_2 = 0x104 DLT_IPNET = 0xe2 DLT_IPOIB = 0xf2 DLT_IPV4 = 0xe4 DLT_IPV6 = 0xe5 DLT_IP_OVER_FC = 0x7a DLT_ISO_14443 = 0x108 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_SLL = 0x71 DLT_LOOP = 0x6c DLT_LTALK = 0x72 DLT_MATCHING_MAX = 0x109 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_NETLINK = 0xfd DLT_NFC_LLCP = 0xf5 DLT_NFLOG = 0xef DLT_NG40 = 0xf4 DLT_NULL = 0x0 DLT_PCI_EXP = 0x7d DLT_PFLOG = 0x75 DLT_PFSYNC = 0x12 DLT_PKTAP = 0x102 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_PROFIBUS_DL = 0x101 DLT_PRONET = 0x4 DLT_RAIF1 = 0xc6 DLT_RAW = 0xc DLT_RDS = 0x109 DLT_REDBACK_SMARTEDGE = 0x20 DLT_RIO = 0x7c DLT_RTAC_SERIAL = 0xfa DLT_SCCP = 0x8e DLT_SCTP = 0xf8 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_USBPCAP = 0xf9 DLT_USB_FREEBSD = 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_WATTSTOPPER_DLM = 0x107 DLT_WIHART = 0xdf DLT_WIRESHARK_UPPER_PDU = 0xfc DLT_X2E_SERIAL = 0xd5 DLT_X2E_XORAYA = 0xd6 DLT_ZWAVE_R1_R2 = 0x105 DLT_ZWAVE_R3 = 0x106 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_FS = -0xa EVFILT_MARKER = 0xf EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 EVFILT_SYSCOUNT = 0xa EVFILT_TIMER = -0x7 EVFILT_USER = -0x9 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_FLAG1 = 0x2000 EV_HUP = 0x800 EV_NODATA = 0x1000 EV_ONESHOT = 0x10 EV_RECEIPT = 0x40 EV_SYSFLAGS = 0xf800 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 HW_MACHINE = 0x1 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 = 0x318e72 IFF_DEBUG = 0x4 IFF_IDIRECT = 0x200000 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_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 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 = 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_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_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_JOIN_GROUP = 0xc IPV6_LEAVE_GROUP = 0xd IPV6_MAXHLIM = 0xff IPV6_MAXPACKET = 0xffff IPV6_MINHLIM = 0x28 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_FW_ADD = 0x32 IP_FW_DEL = 0x33 IP_FW_FLUSH = 0x34 IP_FW_GET = 0x36 IP_FW_RESETLOG = 0x37 IP_FW_TBL_ADD = 0x2a IP_FW_TBL_CREATE = 0x28 IP_FW_TBL_DEL = 0x2b IP_FW_TBL_DESTROY = 0x29 IP_FW_TBL_EXPIRE = 0x2f IP_FW_TBL_FLUSH = 0x2c IP_FW_TBL_GET = 0x2d IP_FW_TBL_ZERO = 0x2e IP_FW_X = 0x31 IP_FW_ZERO = 0x35 IP_HDRINCL = 0x2 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 KERN_HOSTNAME = 0xa KERN_OSRELEASE = 0x2 KERN_OSTYPE = 0x1 KERN_VERSION = 0x4 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_ANONYMOUS = 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 MNT_ASYNC = 0x40 MNT_AUTOMOUNTED = 0x20 MNT_CMDFLAGS = 0xf0000 MNT_DEFEXPORTED = 0x200 MNT_DELEXPORT = 0x20000 MNT_EXKERB = 0x800 MNT_EXPORTANON = 0x400 MNT_EXPORTED = 0x100 MNT_EXPUBLIC = 0x20000000 MNT_EXRDONLY = 0x80 MNT_FORCE = 0x80000 MNT_IGNORE = 0x800000 MNT_LAZY = 0x4 MNT_LOCAL = 0x1000 MNT_NOATIME = 0x10000000 MNT_NOCLUSTERR = 0x40000000 MNT_NOCLUSTERW = 0x80000000 MNT_NODEV = 0x10 MNT_NOEXEC = 0x4 MNT_NOSUID = 0x8 MNT_NOSYMFOLLOW = 0x400000 MNT_NOWAIT = 0x2 MNT_QUOTA = 0x2000 MNT_RDONLY = 0x1 MNT_RELOAD = 0x40000 MNT_ROOTFS = 0x4000 MNT_SOFTDEP = 0x200000 MNT_SUIDDIR = 0x100000 MNT_SYNCHRONOUS = 0x2 MNT_TRIM = 0x1000000 MNT_UPDATE = 0x10000 MNT_USER = 0x8000 MNT_VISFLAGMASK = 0xf1f0ffff MNT_WAIT = 0x1 MSG_CMSG_CLOEXEC = 0x1000 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_OOB = 0x1 MSG_PEEK = 0x2 MSG_SYNC = 0x800 MSG_TRUNC = 0x10 MSG_UNUSED09 = 0x200 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 NFDBITS = 0x40 NOFLSH = 0x80000000 NOKERNINFO = 0x2000000 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_OOB = 0x2 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 OXTABS = 0x4 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_FMASK = 0xfc0000 O_FNONBLOCKING = 0x80000 O_FOFFSET = 0x200000 O_FSYNC = 0x80 O_FSYNCWRITE = 0x400000 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_MEMLOCK = 0x6 RLIMIT_NOFILE = 0x8 RLIMIT_NPROC = 0x7 RLIMIT_RSS = 0x5 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_REDIRECT = 0x6 RTM_RESOLVE = 0xb RTM_RTTUNIT = 0xf4240 RTM_VERSION = 0x7 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 SIOCAIFADDR = 0x8040691a SIOCAIFGROUP = 0x80286987 SIOCALIFADDR = 0x8118691b SIOCATMARK = 0x40047307 SIOCDELMULTI = 0x80206932 SIOCDIFADDR = 0x80206919 SIOCDIFGROUP = 0x80286989 SIOCDIFPHYADDR = 0x80206949 SIOCDLIFADDR = 0x8118691d SIOCGDRVSPEC = 0xc028697b SIOCGETSGCNT = 0xc0207210 SIOCGETVIFCNT = 0xc028720f SIOCGHIWAT = 0x40047301 SIOCGIFADDR = 0xc0206921 SIOCGIFALIAS = 0xc0406929 SIOCGIFBRDADDR = 0xc0206923 SIOCGIFCAP = 0xc020691f SIOCGIFCONF = 0xc0106924 SIOCGIFDATA = 0xc0206926 SIOCGIFDSTADDR = 0xc0206922 SIOCGIFFLAGS = 0xc0206911 SIOCGIFGENERIC = 0xc020693a SIOCGIFGMEMB = 0xc028698a SIOCGIFGROUP = 0xc0286988 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_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_BROADCAST = 0x20 SO_CPUHINT = 0x1030 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_RERROR = 0x2000 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 S_BLKSIZE = 0x200 S_IEXEC = 0x40 S_IFBLK = 0x6000 S_IFCHR = 0x2000 S_IFDB = 0x9000 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 TAB0 = 0x0 TAB3 = 0x4 TABDLY = 0x4 TCIFLUSH = 0x1 TCIOFF = 0x3 TCIOFLUSH = 0x3 TCION = 0x4 TCOFLUSH = 0x2 TCOOFF = 0x1 TCOON = 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 TIMER_ABSTIME = 0x1 TIMER_RELTIME = 0x0 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 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 TIOCSTART = 0x2000746e TIOCSTAT = 0x20007465 TIOCSTI = 0x80017472 TIOCSTOP = 0x2000746f TIOCSWINSZ = 0x80087467 TIOCTIMESTAMP = 0x40107459 TIOCUCNTL = 0x80047466 TOSTOP = 0x400000 UTIME_NOW = -0x1 UTIME_OMIT = -0x2 VCHECKPT = 0x13 VDISCARD = 0xf VDSUSP = 0xb VEOF = 0x0 VEOL = 0x1 VEOL2 = 0x2 VERASE = 0x3 VERASE2 = 0x7 VINTR = 0x8 VKILL = 0x5 VLNEXT = 0xe VMIN = 0x10 VM_BCACHE_SIZE_MAX = 0x0 VM_SWZONE_SIZE_MAX = 0x4000000000 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) 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) 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "device not configured"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EDEADLK", "resource deadlock avoided"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "cross-device link"}, {19, "ENODEV", "operation not supported by device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "result too large"}, {35, "EWOULDBLOCK", "resource temporarily unavailable"}, {36, "EINPROGRESS", "operation now in progress"}, {37, "EALREADY", "operation already in progress"}, {38, "ENOTSOCK", "socket operation on non-socket"}, {39, "EDESTADDRREQ", "destination address required"}, {40, "EMSGSIZE", "message too long"}, {41, "EPROTOTYPE", "protocol wrong type for socket"}, {42, "ENOPROTOOPT", "protocol not available"}, {43, "EPROTONOSUPPORT", "protocol not supported"}, {44, "ESOCKTNOSUPPORT", "socket type not supported"}, {45, "EOPNOTSUPP", "operation not supported"}, {46, "EPFNOSUPPORT", "protocol family not supported"}, {47, "EAFNOSUPPORT", "address family not supported by protocol family"}, {48, "EADDRINUSE", "address already in use"}, {49, "EADDRNOTAVAIL", "can't assign requested address"}, {50, "ENETDOWN", "network is down"}, {51, "ENETUNREACH", "network is unreachable"}, {52, "ENETRESET", "network dropped connection on reset"}, {53, "ECONNABORTED", "software caused connection abort"}, {54, "ECONNRESET", "connection reset by peer"}, {55, "ENOBUFS", "no buffer space available"}, {56, "EISCONN", "socket is already connected"}, {57, "ENOTCONN", "socket is not connected"}, {58, "ESHUTDOWN", "can't send after socket shutdown"}, {59, "ETOOMANYREFS", "too many references: can't splice"}, {60, "ETIMEDOUT", "operation timed out"}, {61, "ECONNREFUSED", "connection refused"}, {62, "ELOOP", "too many levels of symbolic links"}, {63, "ENAMETOOLONG", "file name too long"}, {64, "EHOSTDOWN", "host is down"}, {65, "EHOSTUNREACH", "no route to host"}, {66, "ENOTEMPTY", "directory not empty"}, {67, "EPROCLIM", "too many processes"}, {68, "EUSERS", "too many users"}, {69, "EDQUOT", "disc quota exceeded"}, {70, "ESTALE", "stale NFS file handle"}, {71, "EREMOTE", "too many levels of remote in path"}, {72, "EBADRPC", "RPC struct is bad"}, {73, "ERPCMISMATCH", "RPC version wrong"}, {74, "EPROGUNAVAIL", "RPC prog. not avail"}, {75, "EPROGMISMATCH", "program version wrong"}, {76, "EPROCUNAVAIL", "bad procedure for program"}, {77, "ENOLCK", "no locks available"}, {78, "ENOSYS", "function not implemented"}, {79, "EFTYPE", "inappropriate file type or format"}, {80, "EAUTH", "authentication error"}, {81, "ENEEDAUTH", "need authenticator"}, {82, "EIDRM", "identifier removed"}, {83, "ENOMSG", "no message of desired type"}, {84, "EOVERFLOW", "value too large to be stored in data type"}, {85, "ECANCELED", "operation canceled"}, {86, "EILSEQ", "illegal byte sequence"}, {87, "ENOATTR", "attribute not found"}, {88, "EDOOFUS", "programming error"}, {89, "EBADMSG", "bad message"}, {90, "EMULTIHOP", "multihop attempted"}, {91, "ENOLINK", "link has been severed"}, {92, "EPROTO", "protocol error"}, {93, "ENOMEDIUM", "no medium found"}, {99, "EASYNC", "unknown error: 99"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, {6, "SIGIOT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGURG", "urgent I/O condition"}, {17, "SIGSTOP", "suspended (signal)"}, {18, "SIGTSTP", "suspended"}, {19, "SIGCONT", "continued"}, {20, "SIGCHLD", "child exited"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGIO", "I/O possible"}, {24, "SIGXCPU", "cputime limit exceeded"}, {25, "SIGXFSZ", "filesize limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window size changes"}, {29, "SIGINFO", "information request"}, {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGTHR", "thread Scheduler"}, {33, "SIGCKPT", "checkPoint"}, {34, "SIGCKPTEXIT", "checkPointExit"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go ================================================ // mkerrors.sh -m32 // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && freebsd // Code generated by cmd/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 ALTWERASE = 0x200 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 BIOCSETVLANPCP = 0x80044285 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_MOD = 0x90 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 BPF_XOR = 0xa0 BRKINT = 0x2 CAP_ACCEPT = 0x200000020000000 CAP_ACL_CHECK = 0x400000000010000 CAP_ACL_DELETE = 0x400000000020000 CAP_ACL_GET = 0x400000000040000 CAP_ACL_SET = 0x400000000080000 CAP_ALL0 = 0x20007ffffffffff CAP_ALL1 = 0x4000000001fffff CAP_BIND = 0x200000040000000 CAP_BINDAT = 0x200008000000400 CAP_CHFLAGSAT = 0x200000000001400 CAP_CONNECT = 0x200000080000000 CAP_CONNECTAT = 0x200010000000400 CAP_CREATE = 0x200000000000040 CAP_EVENT = 0x400000000000020 CAP_EXTATTR_DELETE = 0x400000000001000 CAP_EXTATTR_GET = 0x400000000002000 CAP_EXTATTR_LIST = 0x400000000004000 CAP_EXTATTR_SET = 0x400000000008000 CAP_FCHDIR = 0x200000000000800 CAP_FCHFLAGS = 0x200000000001000 CAP_FCHMOD = 0x200000000002000 CAP_FCHMODAT = 0x200000000002400 CAP_FCHOWN = 0x200000000004000 CAP_FCHOWNAT = 0x200000000004400 CAP_FCNTL = 0x200000000008000 CAP_FCNTL_ALL = 0x78 CAP_FCNTL_GETFL = 0x8 CAP_FCNTL_GETOWN = 0x20 CAP_FCNTL_SETFL = 0x10 CAP_FCNTL_SETOWN = 0x40 CAP_FEXECVE = 0x200000000000080 CAP_FLOCK = 0x200000000010000 CAP_FPATHCONF = 0x200000000020000 CAP_FSCK = 0x200000000040000 CAP_FSTAT = 0x200000000080000 CAP_FSTATAT = 0x200000000080400 CAP_FSTATFS = 0x200000000100000 CAP_FSYNC = 0x200000000000100 CAP_FTRUNCATE = 0x200000000000200 CAP_FUTIMES = 0x200000000200000 CAP_FUTIMESAT = 0x200000000200400 CAP_GETPEERNAME = 0x200000100000000 CAP_GETSOCKNAME = 0x200000200000000 CAP_GETSOCKOPT = 0x200000400000000 CAP_IOCTL = 0x400000000000080 CAP_IOCTLS_ALL = 0x7fffffff CAP_KQUEUE = 0x400000000100040 CAP_KQUEUE_CHANGE = 0x400000000100000 CAP_KQUEUE_EVENT = 0x400000000000040 CAP_LINKAT_SOURCE = 0x200020000000400 CAP_LINKAT_TARGET = 0x200000000400400 CAP_LISTEN = 0x200000800000000 CAP_LOOKUP = 0x200000000000400 CAP_MAC_GET = 0x400000000000001 CAP_MAC_SET = 0x400000000000002 CAP_MKDIRAT = 0x200000000800400 CAP_MKFIFOAT = 0x200000001000400 CAP_MKNODAT = 0x200000002000400 CAP_MMAP = 0x200000000000010 CAP_MMAP_R = 0x20000000000001d CAP_MMAP_RW = 0x20000000000001f CAP_MMAP_RWX = 0x20000000000003f CAP_MMAP_RX = 0x20000000000003d CAP_MMAP_W = 0x20000000000001e CAP_MMAP_WX = 0x20000000000003e CAP_MMAP_X = 0x20000000000003c CAP_PDGETPID = 0x400000000000200 CAP_PDKILL = 0x400000000000800 CAP_PDWAIT = 0x400000000000400 CAP_PEELOFF = 0x200001000000000 CAP_POLL_EVENT = 0x400000000000020 CAP_PREAD = 0x20000000000000d CAP_PWRITE = 0x20000000000000e CAP_READ = 0x200000000000001 CAP_RECV = 0x200000000000001 CAP_RENAMEAT_SOURCE = 0x200000004000400 CAP_RENAMEAT_TARGET = 0x200040000000400 CAP_RIGHTS_VERSION = 0x0 CAP_RIGHTS_VERSION_00 = 0x0 CAP_SEEK = 0x20000000000000c CAP_SEEK_TELL = 0x200000000000004 CAP_SEM_GETVALUE = 0x400000000000004 CAP_SEM_POST = 0x400000000000008 CAP_SEM_WAIT = 0x400000000000010 CAP_SEND = 0x200000000000002 CAP_SETSOCKOPT = 0x200002000000000 CAP_SHUTDOWN = 0x200004000000000 CAP_SOCK_CLIENT = 0x200007780000003 CAP_SOCK_SERVER = 0x200007f60000003 CAP_SYMLINKAT = 0x200000008000400 CAP_TTYHOOK = 0x400000000000100 CAP_UNLINKAT = 0x200000010000400 CAP_UNUSED0_44 = 0x200080000000000 CAP_UNUSED0_57 = 0x300000000000000 CAP_UNUSED1_22 = 0x400000000200000 CAP_UNUSED1_57 = 0x500000000000000 CAP_WRITE = 0x200000000000002 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 CPUSTATES = 0x5 CP_IDLE = 0x4 CP_INTR = 0x3 CP_NICE = 0x1 CP_SYS = 0x2 CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x30000 CS5 = 0x0 CS6 = 0x100 CS7 = 0x200 CS8 = 0x300 CSIZE = 0x300 CSTART = 0x11 CSTATUS = 0x14 CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a CTL_HW = 0x6 CTL_KERN = 0x1 CTL_MAXNAME = 0x18 CTL_NET = 0x4 DIOCGATTR = 0xc144648e DIOCGDELETE = 0x80106488 DIOCGFLUSH = 0x20006487 DIOCGFRONTSTUFF = 0x40086486 DIOCGFWHEADS = 0x40046483 DIOCGFWSECTORS = 0x40046482 DIOCGIDENT = 0x41006489 DIOCGMEDIASIZE = 0x40086481 DIOCGPHYSPATH = 0x4400648d DIOCGPROVIDERNAME = 0x4400648a DIOCGSECTORSIZE = 0x40046480 DIOCGSTRIPEOFFSET = 0x4008648c DIOCGSTRIPESIZE = 0x4008648b DIOCSKERNELDUMP = 0x804c6490 DIOCSKERNELDUMP_FREEBSD11 = 0x80046485 DIOCZONECMD = 0xc06c648f 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_BREDR_BB = 0xff DLT_BLUETOOTH_HCI_H4 = 0xbb DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 DLT_BLUETOOTH_LE_LL = 0xfb DLT_BLUETOOTH_LE_LL_WITH_PHDR = 0x100 DLT_BLUETOOTH_LINUX_MONITOR = 0xfe DLT_CAN20B = 0xbe DLT_CAN_SOCKETCAN = 0xe3 DLT_CHAOS = 0x5 DLT_CHDLC = 0x68 DLT_CISCO_IOS = 0x76 DLT_CLASS_NETBSD_RAWAF = 0x2240000 DLT_C_HDLC = 0x68 DLT_C_HDLC_WITH_DIR = 0xcd DLT_DBUS = 0xe7 DLT_DECT = 0xdd DLT_DISPLAYPORT_AUX = 0x113 DLT_DOCSIS = 0x8f DLT_DOCSIS31_XRA31 = 0x111 DLT_DVB_CI = 0xeb DLT_ECONET = 0x73 DLT_EN10MB = 0x1 DLT_EN3MB = 0x2 DLT_ENC = 0x6d DLT_EPON = 0x103 DLT_ERF = 0xc5 DLT_ERF_ETH = 0xaf DLT_ERF_POS = 0xb0 DLT_ETHERNET_MPACKET = 0x112 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_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_INFINIBAND = 0xf7 DLT_IPFILTER = 0x74 DLT_IPMB_KONTRON = 0xc7 DLT_IPMB_LINUX = 0xd1 DLT_IPMI_HPM_2 = 0x104 DLT_IPNET = 0xe2 DLT_IPOIB = 0xf2 DLT_IPV4 = 0xe4 DLT_IPV6 = 0xe5 DLT_IP_OVER_FC = 0x7a DLT_ISO_14443 = 0x108 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_LINUX_SLL2 = 0x114 DLT_LOOP = 0x6c DLT_LORATAP = 0x10e DLT_LTALK = 0x72 DLT_MATCHING_MAX = 0x114 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_NETLINK = 0xfd DLT_NFC_LLCP = 0xf5 DLT_NFLOG = 0xef DLT_NG40 = 0xf4 DLT_NORDIC_BLE = 0x110 DLT_NULL = 0x0 DLT_OPENFLOW = 0x10b DLT_PCI_EXP = 0x7d DLT_PFLOG = 0x75 DLT_PFSYNC = 0x79 DLT_PKTAP = 0x102 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_PPP_WITH_DIRECTION = 0xa6 DLT_PRISM_HEADER = 0x77 DLT_PROFIBUS_DL = 0x101 DLT_PRONET = 0x4 DLT_RAIF1 = 0xc6 DLT_RAW = 0xc DLT_RDS = 0x109 DLT_REDBACK_SMARTEDGE = 0x20 DLT_RIO = 0x7c DLT_RTAC_SERIAL = 0xfa DLT_SCCP = 0x8e DLT_SCTP = 0xf8 DLT_SDLC = 0x10c DLT_SITA = 0xc4 DLT_SLIP = 0x8 DLT_SLIP_BSDOS = 0xd DLT_STANAG_5066_D_PDU = 0xed DLT_SUNATM = 0x7b DLT_SYMANTEC_FIREWALL = 0x63 DLT_TI_LLN_SNIFFER = 0x10d DLT_TZSP = 0x80 DLT_USB = 0xba DLT_USBPCAP = 0xf9 DLT_USB_DARWIN = 0x10a DLT_USB_FREEBSD = 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_VSOCK = 0x10f DLT_WATTSTOPPER_DLM = 0x107 DLT_WIHART = 0xdf DLT_WIRESHARK_UPPER_PDU = 0xfc DLT_X2E_SERIAL = 0xd5 DLT_X2E_XORAYA = 0xd6 DLT_ZWAVE_R1_R2 = 0x105 DLT_ZWAVE_R3 = 0x106 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_EMPTY = -0xd EVFILT_FS = -0x9 EVFILT_LIO = -0xa EVFILT_PROC = -0x5 EVFILT_PROCDESC = -0x8 EVFILT_READ = -0x1 EVFILT_SENDFILE = -0xc EVFILT_SIGNAL = -0x6 EVFILT_SYSCOUNT = 0xd EVFILT_TIMER = -0x7 EVFILT_USER = -0xb EVFILT_VNODE = -0x4 EVFILT_WRITE = -0x2 EVNAMEMAP_NAME_SIZE = 0x40 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_FLAG2 = 0x4000 EV_FORCEONESHOT = 0x100 EV_ONESHOT = 0x10 EV_RECEIPT = 0x40 EV_SYSFLAGS = 0xf000 EXTA = 0x4b00 EXTATTR_MAXNAMELEN = 0xff 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 HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 IEXTEN = 0x400 IFAN_ARRIVAL = 0x0 IFAN_DEPARTURE = 0x1 IFCAP_WOL_MAGIC = 0x2000 IFF_ALLMULTI = 0x200 IFF_ALTPHYS = 0x4000 IFF_BROADCAST = 0x2 IFF_CANTCHANGE = 0x218f52 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_NOGROUP = 0x800000 IFF_OACTIVE = 0x400 IFF_POINTOPOINT = 0x10 IFF_PPROMISC = 0x20000 IFF_PROMISC = 0x100 IFF_RENAMING = 0x400000 IFF_RUNNING = 0x40 IFF_SIMPLEX = 0x800 IFF_STATICARP = 0x80000 IFF_UP = 0x1 IFNAMSIZ = 0x10 IFT_BRIDGE = 0xd1 IFT_CARP = 0xf8 IFT_IEEE1394 = 0x90 IFT_INFINIBAND = 0xc7 IFT_L2VLAN = 0x87 IFT_L3IPVLAN = 0x88 IFT_PPP = 0x17 IFT_PROPVIRTUAL = 0x35 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_DCCP = 0x21 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_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_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_BINDMULTI = 0x41 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_FLOWID = 0x43 IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_LEN = 0x14 IPV6_FLOWLABEL_MASK = 0xffff0f00 IPV6_FLOWTYPE = 0x44 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_MMTU = 0x500 IPV6_MSFILTER = 0x4a IPV6_MULTICAST_HOPS = 0xa IPV6_MULTICAST_IF = 0x9 IPV6_MULTICAST_LOOP = 0xb IPV6_NEXTHOP = 0x30 IPV6_ORIGDSTADDR = 0x48 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_RECVFLOWID = 0x46 IPV6_RECVHOPLIMIT = 0x25 IPV6_RECVHOPOPTS = 0x27 IPV6_RECVORIGDSTADDR = 0x48 IPV6_RECVPATHMTU = 0x2b IPV6_RECVPKTINFO = 0x24 IPV6_RECVRSSBUCKETID = 0x47 IPV6_RECVRTHDR = 0x26 IPV6_RECVTCLASS = 0x39 IPV6_RSSBUCKETID = 0x45 IPV6_RSS_LISTEN_BUCKET = 0x42 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 IPV6_VLAN_PCP = 0x4b IP_ADD_MEMBERSHIP = 0xc IP_ADD_SOURCE_MEMBERSHIP = 0x46 IP_BINDANY = 0x18 IP_BINDMULTI = 0x19 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_FLOWID = 0x5a IP_FLOWTYPE = 0x5b 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_MF = 0x2000 IP_MINTTL = 0x42 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_ORIGDSTADDR = 0x1b IP_PORTRANGE = 0x13 IP_PORTRANGE_DEFAULT = 0x0 IP_PORTRANGE_HIGH = 0x1 IP_PORTRANGE_LOW = 0x2 IP_RECVDSTADDR = 0x7 IP_RECVFLOWID = 0x5d IP_RECVIF = 0x14 IP_RECVOPTS = 0x5 IP_RECVORIGDSTADDR = 0x1b IP_RECVRETOPTS = 0x6 IP_RECVRSSBUCKETID = 0x5e IP_RECVTOS = 0x44 IP_RECVTTL = 0x41 IP_RETOPTS = 0x8 IP_RF = 0x8000 IP_RSSBUCKETID = 0x5c IP_RSS_LISTEN_BUCKET = 0x1a 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 IP_VLAN_PCP = 0x4b ISIG = 0x80 ISTRIP = 0x20 ITIMER_PROF = 0x2 ITIMER_REAL = 0x0 ITIMER_VIRTUAL = 0x1 IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 KERN_HOSTNAME = 0xa KERN_OSRELEASE = 0x2 KERN_OSTYPE = 0x1 KERN_VERSION = 0x4 LOCAL_CONNWAIT = 0x4 LOCAL_CREDS = 0x2 LOCAL_PEERCRED = 0x1 LOCAL_VENDOR = 0x80000000 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_GUARD = 0x2000 MAP_HASSEMAPHORE = 0x200 MAP_NOCORE = 0x20000 MAP_NOSYNC = 0x800 MAP_PREFAULT_READ = 0x40000 MAP_PRIVATE = 0x2 MAP_RESERVED0020 = 0x20 MAP_RESERVED0040 = 0x40 MAP_RESERVED0080 = 0x80 MAP_RESERVED0100 = 0x100 MAP_SHARED = 0x1 MAP_STACK = 0x400 MCAST_BLOCK_SOURCE = 0x54 MCAST_EXCLUDE = 0x2 MCAST_INCLUDE = 0x1 MCAST_JOIN_GROUP = 0x50 MCAST_JOIN_SOURCE_GROUP = 0x52 MCAST_LEAVE_GROUP = 0x51 MCAST_LEAVE_SOURCE_GROUP = 0x53 MCAST_UNBLOCK_SOURCE = 0x55 MCAST_UNDEFINED = 0x0 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MNT_ACLS = 0x8000000 MNT_ASYNC = 0x40 MNT_AUTOMOUNTED = 0x200000000 MNT_BYFSID = 0x8000000 MNT_CMDFLAGS = 0xd0f0000 MNT_DEFEXPORTED = 0x200 MNT_DELEXPORT = 0x20000 MNT_EXKERB = 0x800 MNT_EXPORTANON = 0x400 MNT_EXPORTED = 0x100 MNT_EXPUBLIC = 0x20000000 MNT_EXRDONLY = 0x80 MNT_FORCE = 0x80000 MNT_GJOURNAL = 0x2000000 MNT_IGNORE = 0x800000 MNT_LAZY = 0x3 MNT_LOCAL = 0x1000 MNT_MULTILABEL = 0x4000000 MNT_NFS4ACLS = 0x10 MNT_NOATIME = 0x10000000 MNT_NOCLUSTERR = 0x40000000 MNT_NOCLUSTERW = 0x80000000 MNT_NOEXEC = 0x4 MNT_NONBUSY = 0x4000000 MNT_NOSUID = 0x8 MNT_NOSYMFOLLOW = 0x400000 MNT_NOWAIT = 0x2 MNT_QUOTA = 0x2000 MNT_RDONLY = 0x1 MNT_RELOAD = 0x40000 MNT_ROOTFS = 0x4000 MNT_SNAPSHOT = 0x1000000 MNT_SOFTDEP = 0x200000 MNT_SUIDDIR = 0x100000 MNT_SUJ = 0x100000000 MNT_SUSPEND = 0x4 MNT_SYNCHRONOUS = 0x2 MNT_UNION = 0x20 MNT_UNTRUSTED = 0x800000000 MNT_UPDATE = 0x10000 MNT_UPDATEMASK = 0xad8d0807e MNT_USER = 0x8000 MNT_VERIFIED = 0x400000000 MNT_VISFLAGMASK = 0xffef0ffff MNT_WAIT = 0x1 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 MSG_WAITFORONE = 0x80000 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 NFDBITS = 0x20 NOFLSH = 0x80000000 NOKERNINFO = 0x2000000 NOTE_ABSTIME = 0x10 NOTE_ATTRIB = 0x8 NOTE_CHILD = 0x4 NOTE_CLOSE = 0x100 NOTE_CLOSE_WRITE = 0x200 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_FILE_POLL = 0x2 NOTE_FORK = 0x40000000 NOTE_LINK = 0x10 NOTE_LOWAT = 0x1 NOTE_MSECONDS = 0x2 NOTE_NSECONDS = 0x8 NOTE_OPEN = 0x80 NOTE_PCTRLMASK = 0xf0000000 NOTE_PDATAMASK = 0xfffff NOTE_READ = 0x400 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 OXTABS = 0x4 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_RESOLVE_BENEATH = 0x800000 O_SEARCH = 0x40000 O_SHLOCK = 0x10 O_SYNC = 0x80 O_TRUNC = 0x400 O_TTY_INIT = 0x80000 O_VERIFY = 0x200000 O_WRONLY = 0x1 PARENB = 0x1000 PARMRK = 0x8 PARODD = 0x2000 PENDIN = 0x20000000 PIOD_READ_D = 0x1 PIOD_READ_I = 0x3 PIOD_WRITE_D = 0x2 PIOD_WRITE_I = 0x4 PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 PROT_EXEC = 0x4 PROT_NONE = 0x0 PROT_READ = 0x1 PROT_WRITE = 0x2 PTRACE_DEFAULT = 0x1 PTRACE_EXEC = 0x1 PTRACE_FORK = 0x8 PTRACE_LWP = 0x10 PTRACE_SCE = 0x2 PTRACE_SCX = 0x4 PTRACE_SYSCALL = 0x6 PTRACE_VFORK = 0x20 PT_ATTACH = 0xa PT_CLEARSTEP = 0x10 PT_CONTINUE = 0x7 PT_DETACH = 0xb PT_FIRSTMACH = 0x40 PT_FOLLOW_FORK = 0x17 PT_GETDBREGS = 0x25 PT_GETFPREGS = 0x23 PT_GETFSBASE = 0x47 PT_GETGSBASE = 0x49 PT_GETLWPLIST = 0xf PT_GETNUMLWPS = 0xe PT_GETREGS = 0x21 PT_GETXMMREGS = 0x40 PT_GETXSTATE = 0x45 PT_GETXSTATE_INFO = 0x44 PT_GET_EVENT_MASK = 0x19 PT_GET_SC_ARGS = 0x1b PT_GET_SC_RET = 0x1c PT_IO = 0xc PT_KILL = 0x8 PT_LWPINFO = 0xd PT_LWP_EVENTS = 0x18 PT_READ_D = 0x2 PT_READ_I = 0x1 PT_RESUME = 0x13 PT_SETDBREGS = 0x26 PT_SETFPREGS = 0x24 PT_SETFSBASE = 0x48 PT_SETGSBASE = 0x4a PT_SETREGS = 0x22 PT_SETSTEP = 0x11 PT_SETXMMREGS = 0x41 PT_SETXSTATE = 0x46 PT_SET_EVENT_MASK = 0x1a PT_STEP = 0x9 PT_SUSPEND = 0x12 PT_SYSCALL = 0x16 PT_TO_SCE = 0x14 PT_TO_SCX = 0x15 PT_TRACE_ME = 0x0 PT_VM_ENTRY = 0x29 PT_VM_TIMESTAMP = 0x28 PT_WRITE_D = 0x5 PT_WRITE_I = 0x4 P_ZONEID = 0xc RLIMIT_AS = 0xa RLIMIT_CORE = 0x4 RLIMIT_CPU = 0x0 RLIMIT_DATA = 0x2 RLIMIT_FSIZE = 0x1 RLIMIT_MEMLOCK = 0x6 RLIMIT_NOFILE = 0x8 RLIMIT_NPROC = 0x7 RLIMIT_RSS = 0x5 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_FIXEDMTU = 0x80000 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_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_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_BLACKHOLE = 0x40 RT_DEFAULT_FIB = 0x0 RT_HAS_GW = 0x80 RT_HAS_HEADER = 0x10 RT_HAS_HEADER_BIT = 0x4 RT_L2_ME = 0x4 RT_L2_ME_BIT = 0x2 RT_LLE_CACHE = 0x100 RT_MAY_LOOP = 0x8 RT_MAY_LOOP_BIT = 0x3 RT_REJECT = 0x20 RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 RUSAGE_THREAD = 0x1 SCM_BINTIME = 0x4 SCM_CREDS = 0x3 SCM_MONOTONIC = 0x6 SCM_REALTIME = 0x5 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x2 SCM_TIME_INFO = 0x7 SEEK_CUR = 0x1 SEEK_DATA = 0x3 SEEK_END = 0x2 SEEK_HOLE = 0x4 SEEK_SET = 0x0 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 SIOCADDMULTI = 0x80206931 SIOCAIFADDR = 0x8040691a SIOCAIFGROUP = 0x80246987 SIOCATMARK = 0x40047307 SIOCDELMULTI = 0x80206932 SIOCDIFADDR = 0x80206919 SIOCDIFGROUP = 0x80246989 SIOCDIFPHYADDR = 0x80206949 SIOCGDRVSPEC = 0xc01c697b SIOCGETSGCNT = 0xc0147210 SIOCGETVIFCNT = 0xc014720f SIOCGHIWAT = 0x40047301 SIOCGHWADDR = 0xc020693e SIOCGI2C = 0xc020693d SIOCGIFADDR = 0xc0206921 SIOCGIFALIAS = 0xc044692d SIOCGIFBRDADDR = 0xc0206923 SIOCGIFCAP = 0xc020691f SIOCGIFCONF = 0xc0086924 SIOCGIFDESCR = 0xc020692a SIOCGIFDOWNREASON = 0xc058699a 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 SIOCGIFRSSHASH = 0xc0186997 SIOCGIFRSSKEY = 0xc0946996 SIOCGIFSTATUS = 0xc331693b SIOCGIFXMEDIA = 0xc028698b SIOCGLANPCP = 0xc0206998 SIOCGLOWAT = 0x40047303 SIOCGPGRP = 0x40047309 SIOCGPRIVATE_0 = 0xc0206950 SIOCGPRIVATE_1 = 0xc0206951 SIOCGTUNFIB = 0xc020695e 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 SIOCSLANPCP = 0x80206999 SIOCSLOWAT = 0x80047302 SIOCSPGRP = 0x80047308 SIOCSTUNFIB = 0x8020695f 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_LOCAL = 0x0 SOL_SOCKET = 0xffff SOMAXCONN = 0x80 SO_ACCEPTCONN = 0x2 SO_ACCEPTFILTER = 0x1000 SO_BINTIME = 0x2000 SO_BROADCAST = 0x20 SO_DEBUG = 0x1 SO_DOMAIN = 0x1019 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_MAX_PACING_RATE = 0x1018 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_RERROR = 0x20000 SO_REUSEADDR = 0x4 SO_REUSEPORT = 0x200 SO_REUSEPORT_LB = 0x10000 SO_SETFIB = 0x1014 SO_SNDBUF = 0x1001 SO_SNDLOWAT = 0x1003 SO_SNDTIMEO = 0x1005 SO_TIMESTAMP = 0x400 SO_TS_BINTIME = 0x1 SO_TS_CLOCK = 0x1017 SO_TS_CLOCK_MAX = 0x3 SO_TS_DEFAULT = 0x0 SO_TS_MONOTONIC = 0x3 SO_TS_REALTIME = 0x2 SO_TS_REALTIME_MICRO = 0x0 SO_TYPE = 0x1008 SO_USELOOPBACK = 0x40 SO_USER_COOKIE = 0x1015 SO_VENDOR = 0x80000000 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 TAB0 = 0x0 TAB3 = 0x4 TABDLY = 0x4 TCIFLUSH = 0x1 TCIOFF = 0x3 TCIOFLUSH = 0x3 TCION = 0x4 TCOFLUSH = 0x2 TCOOFF = 0x1 TCOON = 0x2 TCPOPT_EOL = 0x0 TCPOPT_FAST_OPEN = 0x22 TCPOPT_MAXSEG = 0x2 TCPOPT_NOP = 0x1 TCPOPT_PAD = 0x0 TCPOPT_SACK = 0x5 TCPOPT_SACK_PERMITTED = 0x4 TCPOPT_SIGNATURE = 0x13 TCPOPT_TIMESTAMP = 0x8 TCPOPT_WINDOW = 0x3 TCP_BBR_ACK_COMP_ALG = 0x448 TCP_BBR_ALGORITHM = 0x43b TCP_BBR_DRAIN_INC_EXTRA = 0x43c TCP_BBR_DRAIN_PG = 0x42e TCP_BBR_EXTRA_GAIN = 0x449 TCP_BBR_EXTRA_STATE = 0x453 TCP_BBR_FLOOR_MIN_TSO = 0x454 TCP_BBR_HDWR_PACE = 0x451 TCP_BBR_HOLD_TARGET = 0x436 TCP_BBR_IWINTSO = 0x42b TCP_BBR_LOWGAIN_FD = 0x436 TCP_BBR_LOWGAIN_HALF = 0x435 TCP_BBR_LOWGAIN_THRESH = 0x434 TCP_BBR_MAX_RTO = 0x439 TCP_BBR_MIN_RTO = 0x438 TCP_BBR_MIN_TOPACEOUT = 0x455 TCP_BBR_ONE_RETRAN = 0x431 TCP_BBR_PACE_CROSS = 0x442 TCP_BBR_PACE_DEL_TAR = 0x43f TCP_BBR_PACE_OH = 0x435 TCP_BBR_PACE_PER_SEC = 0x43e TCP_BBR_PACE_SEG_MAX = 0x440 TCP_BBR_PACE_SEG_MIN = 0x441 TCP_BBR_POLICER_DETECT = 0x457 TCP_BBR_PROBE_RTT_GAIN = 0x44d TCP_BBR_PROBE_RTT_INT = 0x430 TCP_BBR_PROBE_RTT_LEN = 0x44e TCP_BBR_RACK_RTT_USE = 0x44a TCP_BBR_RECFORCE = 0x42c TCP_BBR_REC_OVER_HPTS = 0x43a TCP_BBR_RETRAN_WTSO = 0x44b TCP_BBR_RWND_IS_APP = 0x42f TCP_BBR_SEND_IWND_IN_TSO = 0x44f TCP_BBR_STARTUP_EXIT_EPOCH = 0x43d TCP_BBR_STARTUP_LOSS_EXIT = 0x432 TCP_BBR_STARTUP_PG = 0x42d TCP_BBR_TMR_PACE_OH = 0x448 TCP_BBR_TSLIMITS = 0x434 TCP_BBR_TSTMP_RAISES = 0x456 TCP_BBR_UNLIMITED = 0x43b TCP_BBR_USEDEL_RATE = 0x437 TCP_BBR_USE_LOWGAIN = 0x433 TCP_BBR_USE_RACK_CHEAT = 0x450 TCP_BBR_UTTER_MAX_TSO = 0x452 TCP_CA_NAME_MAX = 0x10 TCP_CCALGOOPT = 0x41 TCP_CONGESTION = 0x40 TCP_DATA_AFTER_CLOSE = 0x44c TCP_DELACK = 0x48 TCP_FASTOPEN = 0x401 TCP_FASTOPEN_MAX_COOKIE_LEN = 0x10 TCP_FASTOPEN_MIN_COOKIE_LEN = 0x4 TCP_FASTOPEN_PSK_LEN = 0x10 TCP_FUNCTION_BLK = 0x2000 TCP_FUNCTION_NAME_LEN_MAX = 0x20 TCP_INFO = 0x20 TCP_KEEPCNT = 0x400 TCP_KEEPIDLE = 0x100 TCP_KEEPINIT = 0x80 TCP_KEEPINTVL = 0x200 TCP_LOG = 0x22 TCP_LOGBUF = 0x23 TCP_LOGDUMP = 0x25 TCP_LOGDUMPID = 0x26 TCP_LOGID = 0x24 TCP_LOG_ID_LEN = 0x40 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_PCAP_IN = 0x1000 TCP_PCAP_OUT = 0x800 TCP_RACK_EARLY_RECOV = 0x423 TCP_RACK_EARLY_SEG = 0x424 TCP_RACK_GP_INCREASE = 0x446 TCP_RACK_IDLE_REDUCE_HIGH = 0x444 TCP_RACK_MIN_PACE = 0x445 TCP_RACK_MIN_PACE_SEG = 0x446 TCP_RACK_MIN_TO = 0x422 TCP_RACK_PACE_ALWAYS = 0x41f TCP_RACK_PACE_MAX_SEG = 0x41e TCP_RACK_PACE_REDUCE = 0x41d TCP_RACK_PKT_DELAY = 0x428 TCP_RACK_PROP = 0x41b TCP_RACK_PROP_RATE = 0x420 TCP_RACK_PRR_SENDALOT = 0x421 TCP_RACK_REORD_FADE = 0x426 TCP_RACK_REORD_THRESH = 0x425 TCP_RACK_TLP_INC_VAR = 0x429 TCP_RACK_TLP_REDUCE = 0x41c TCP_RACK_TLP_THRESH = 0x427 TCP_RACK_TLP_USE = 0x447 TCP_VENDOR = 0x80000000 TCSAFLUSH = 0x2 TIMER_ABSTIME = 0x1 TIMER_RELTIME = 0x0 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 UTIME_NOW = -0x1 UTIME_OMIT = -0x2 VDISCARD = 0xf VDSUSP = 0xb VEOF = 0x0 VEOL = 0x1 VEOL2 = 0x2 VERASE = 0x3 VERASE2 = 0x7 VINTR = 0x8 VKILL = 0x5 VLNEXT = 0xe VMIN = 0x10 VM_BCACHE_SIZE_MAX = 0x70e0000 VM_SWZONE_SIZE_MAX = 0x2280000 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) EINTEGRITY = syscall.Errno(0x61) EINTR = syscall.Errno(0x4) EINVAL = syscall.Errno(0x16) EIO = syscall.Errno(0x5) EISCONN = syscall.Errno(0x38) EISDIR = syscall.Errno(0x15) ELAST = syscall.Errno(0x61) 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "device not configured"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EDEADLK", "resource deadlock avoided"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "cross-device link"}, {19, "ENODEV", "operation not supported by device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "result too large"}, {35, "EWOULDBLOCK", "resource temporarily unavailable"}, {36, "EINPROGRESS", "operation now in progress"}, {37, "EALREADY", "operation already in progress"}, {38, "ENOTSOCK", "socket operation on non-socket"}, {39, "EDESTADDRREQ", "destination address required"}, {40, "EMSGSIZE", "message too long"}, {41, "EPROTOTYPE", "protocol wrong type for socket"}, {42, "ENOPROTOOPT", "protocol not available"}, {43, "EPROTONOSUPPORT", "protocol not supported"}, {44, "ESOCKTNOSUPPORT", "socket type not supported"}, {45, "EOPNOTSUPP", "operation not supported"}, {46, "EPFNOSUPPORT", "protocol family not supported"}, {47, "EAFNOSUPPORT", "address family not supported by protocol family"}, {48, "EADDRINUSE", "address already in use"}, {49, "EADDRNOTAVAIL", "can't assign requested address"}, {50, "ENETDOWN", "network is down"}, {51, "ENETUNREACH", "network is unreachable"}, {52, "ENETRESET", "network dropped connection on reset"}, {53, "ECONNABORTED", "software caused connection abort"}, {54, "ECONNRESET", "connection reset by peer"}, {55, "ENOBUFS", "no buffer space available"}, {56, "EISCONN", "socket is already connected"}, {57, "ENOTCONN", "socket is not connected"}, {58, "ESHUTDOWN", "can't send after socket shutdown"}, {59, "ETOOMANYREFS", "too many references: can't splice"}, {60, "ETIMEDOUT", "operation timed out"}, {61, "ECONNREFUSED", "connection refused"}, {62, "ELOOP", "too many levels of symbolic links"}, {63, "ENAMETOOLONG", "file name too long"}, {64, "EHOSTDOWN", "host is down"}, {65, "EHOSTUNREACH", "no route to host"}, {66, "ENOTEMPTY", "directory not empty"}, {67, "EPROCLIM", "too many processes"}, {68, "EUSERS", "too many users"}, {69, "EDQUOT", "disc quota exceeded"}, {70, "ESTALE", "stale NFS file handle"}, {71, "EREMOTE", "too many levels of remote in path"}, {72, "EBADRPC", "RPC struct is bad"}, {73, "ERPCMISMATCH", "RPC version wrong"}, {74, "EPROGUNAVAIL", "RPC prog. not avail"}, {75, "EPROGMISMATCH", "program version wrong"}, {76, "EPROCUNAVAIL", "bad procedure for program"}, {77, "ENOLCK", "no locks available"}, {78, "ENOSYS", "function not implemented"}, {79, "EFTYPE", "inappropriate file type or format"}, {80, "EAUTH", "authentication error"}, {81, "ENEEDAUTH", "need authenticator"}, {82, "EIDRM", "identifier removed"}, {83, "ENOMSG", "no message of desired type"}, {84, "EOVERFLOW", "value too large to be stored in data type"}, {85, "ECANCELED", "operation canceled"}, {86, "EILSEQ", "illegal byte sequence"}, {87, "ENOATTR", "attribute not found"}, {88, "EDOOFUS", "programming error"}, {89, "EBADMSG", "bad message"}, {90, "EMULTIHOP", "multihop attempted"}, {91, "ENOLINK", "link has been severed"}, {92, "EPROTO", "protocol error"}, {93, "ENOTCAPABLE", "capabilities insufficient"}, {94, "ECAPMODE", "not permitted in capability mode"}, {95, "ENOTRECOVERABLE", "state not recoverable"}, {96, "EOWNERDEAD", "previous owner died"}, {97, "EINTEGRITY", "integrity check failed"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, {6, "SIGIOT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGURG", "urgent I/O condition"}, {17, "SIGSTOP", "suspended (signal)"}, {18, "SIGTSTP", "suspended"}, {19, "SIGCONT", "continued"}, {20, "SIGCHLD", "child exited"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGIO", "I/O possible"}, {24, "SIGXCPU", "cputime limit exceeded"}, {25, "SIGXFSZ", "filesize limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window size changes"}, {29, "SIGINFO", "information request"}, {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGTHR", "unknown signal"}, {33, "SIGLIBRT", "unknown signal"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go ================================================ // mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && freebsd // Code generated by cmd/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 ALTWERASE = 0x200 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 BIOCSETVLANPCP = 0x80044285 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_MOD = 0x90 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 BPF_XOR = 0xa0 BRKINT = 0x2 CAP_ACCEPT = 0x200000020000000 CAP_ACL_CHECK = 0x400000000010000 CAP_ACL_DELETE = 0x400000000020000 CAP_ACL_GET = 0x400000000040000 CAP_ACL_SET = 0x400000000080000 CAP_ALL0 = 0x20007ffffffffff CAP_ALL1 = 0x4000000001fffff CAP_BIND = 0x200000040000000 CAP_BINDAT = 0x200008000000400 CAP_CHFLAGSAT = 0x200000000001400 CAP_CONNECT = 0x200000080000000 CAP_CONNECTAT = 0x200010000000400 CAP_CREATE = 0x200000000000040 CAP_EVENT = 0x400000000000020 CAP_EXTATTR_DELETE = 0x400000000001000 CAP_EXTATTR_GET = 0x400000000002000 CAP_EXTATTR_LIST = 0x400000000004000 CAP_EXTATTR_SET = 0x400000000008000 CAP_FCHDIR = 0x200000000000800 CAP_FCHFLAGS = 0x200000000001000 CAP_FCHMOD = 0x200000000002000 CAP_FCHMODAT = 0x200000000002400 CAP_FCHOWN = 0x200000000004000 CAP_FCHOWNAT = 0x200000000004400 CAP_FCNTL = 0x200000000008000 CAP_FCNTL_ALL = 0x78 CAP_FCNTL_GETFL = 0x8 CAP_FCNTL_GETOWN = 0x20 CAP_FCNTL_SETFL = 0x10 CAP_FCNTL_SETOWN = 0x40 CAP_FEXECVE = 0x200000000000080 CAP_FLOCK = 0x200000000010000 CAP_FPATHCONF = 0x200000000020000 CAP_FSCK = 0x200000000040000 CAP_FSTAT = 0x200000000080000 CAP_FSTATAT = 0x200000000080400 CAP_FSTATFS = 0x200000000100000 CAP_FSYNC = 0x200000000000100 CAP_FTRUNCATE = 0x200000000000200 CAP_FUTIMES = 0x200000000200000 CAP_FUTIMESAT = 0x200000000200400 CAP_GETPEERNAME = 0x200000100000000 CAP_GETSOCKNAME = 0x200000200000000 CAP_GETSOCKOPT = 0x200000400000000 CAP_IOCTL = 0x400000000000080 CAP_IOCTLS_ALL = 0x7fffffffffffffff CAP_KQUEUE = 0x400000000100040 CAP_KQUEUE_CHANGE = 0x400000000100000 CAP_KQUEUE_EVENT = 0x400000000000040 CAP_LINKAT_SOURCE = 0x200020000000400 CAP_LINKAT_TARGET = 0x200000000400400 CAP_LISTEN = 0x200000800000000 CAP_LOOKUP = 0x200000000000400 CAP_MAC_GET = 0x400000000000001 CAP_MAC_SET = 0x400000000000002 CAP_MKDIRAT = 0x200000000800400 CAP_MKFIFOAT = 0x200000001000400 CAP_MKNODAT = 0x200000002000400 CAP_MMAP = 0x200000000000010 CAP_MMAP_R = 0x20000000000001d CAP_MMAP_RW = 0x20000000000001f CAP_MMAP_RWX = 0x20000000000003f CAP_MMAP_RX = 0x20000000000003d CAP_MMAP_W = 0x20000000000001e CAP_MMAP_WX = 0x20000000000003e CAP_MMAP_X = 0x20000000000003c CAP_PDGETPID = 0x400000000000200 CAP_PDKILL = 0x400000000000800 CAP_PDWAIT = 0x400000000000400 CAP_PEELOFF = 0x200001000000000 CAP_POLL_EVENT = 0x400000000000020 CAP_PREAD = 0x20000000000000d CAP_PWRITE = 0x20000000000000e CAP_READ = 0x200000000000001 CAP_RECV = 0x200000000000001 CAP_RENAMEAT_SOURCE = 0x200000004000400 CAP_RENAMEAT_TARGET = 0x200040000000400 CAP_RIGHTS_VERSION = 0x0 CAP_RIGHTS_VERSION_00 = 0x0 CAP_SEEK = 0x20000000000000c CAP_SEEK_TELL = 0x200000000000004 CAP_SEM_GETVALUE = 0x400000000000004 CAP_SEM_POST = 0x400000000000008 CAP_SEM_WAIT = 0x400000000000010 CAP_SEND = 0x200000000000002 CAP_SETSOCKOPT = 0x200002000000000 CAP_SHUTDOWN = 0x200004000000000 CAP_SOCK_CLIENT = 0x200007780000003 CAP_SOCK_SERVER = 0x200007f60000003 CAP_SYMLINKAT = 0x200000008000400 CAP_TTYHOOK = 0x400000000000100 CAP_UNLINKAT = 0x200000010000400 CAP_UNUSED0_44 = 0x200080000000000 CAP_UNUSED0_57 = 0x300000000000000 CAP_UNUSED1_22 = 0x400000000200000 CAP_UNUSED1_57 = 0x500000000000000 CAP_WRITE = 0x200000000000002 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 CPUSTATES = 0x5 CP_IDLE = 0x4 CP_INTR = 0x3 CP_NICE = 0x1 CP_SYS = 0x2 CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x30000 CS5 = 0x0 CS6 = 0x100 CS7 = 0x200 CS8 = 0x300 CSIZE = 0x300 CSTART = 0x11 CSTATUS = 0x14 CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a CTL_HW = 0x6 CTL_KERN = 0x1 CTL_MAXNAME = 0x18 CTL_NET = 0x4 DIOCGATTR = 0xc148648e DIOCGDELETE = 0x80106488 DIOCGFLUSH = 0x20006487 DIOCGFRONTSTUFF = 0x40086486 DIOCGFWHEADS = 0x40046483 DIOCGFWSECTORS = 0x40046482 DIOCGIDENT = 0x41006489 DIOCGMEDIASIZE = 0x40086481 DIOCGPHYSPATH = 0x4400648d DIOCGPROVIDERNAME = 0x4400648a DIOCGSECTORSIZE = 0x40046480 DIOCGSTRIPEOFFSET = 0x4008648c DIOCGSTRIPESIZE = 0x4008648b DIOCSKERNELDUMP = 0x80506490 DIOCSKERNELDUMP_FREEBSD11 = 0x80046485 DIOCZONECMD = 0xc080648f 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_BREDR_BB = 0xff DLT_BLUETOOTH_HCI_H4 = 0xbb DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 DLT_BLUETOOTH_LE_LL = 0xfb DLT_BLUETOOTH_LE_LL_WITH_PHDR = 0x100 DLT_BLUETOOTH_LINUX_MONITOR = 0xfe DLT_CAN20B = 0xbe DLT_CAN_SOCKETCAN = 0xe3 DLT_CHAOS = 0x5 DLT_CHDLC = 0x68 DLT_CISCO_IOS = 0x76 DLT_CLASS_NETBSD_RAWAF = 0x2240000 DLT_C_HDLC = 0x68 DLT_C_HDLC_WITH_DIR = 0xcd DLT_DBUS = 0xe7 DLT_DECT = 0xdd DLT_DISPLAYPORT_AUX = 0x113 DLT_DOCSIS = 0x8f DLT_DOCSIS31_XRA31 = 0x111 DLT_DVB_CI = 0xeb DLT_ECONET = 0x73 DLT_EN10MB = 0x1 DLT_EN3MB = 0x2 DLT_ENC = 0x6d DLT_EPON = 0x103 DLT_ERF = 0xc5 DLT_ERF_ETH = 0xaf DLT_ERF_POS = 0xb0 DLT_ETHERNET_MPACKET = 0x112 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_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_INFINIBAND = 0xf7 DLT_IPFILTER = 0x74 DLT_IPMB_KONTRON = 0xc7 DLT_IPMB_LINUX = 0xd1 DLT_IPMI_HPM_2 = 0x104 DLT_IPNET = 0xe2 DLT_IPOIB = 0xf2 DLT_IPV4 = 0xe4 DLT_IPV6 = 0xe5 DLT_IP_OVER_FC = 0x7a DLT_ISO_14443 = 0x108 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_LINUX_SLL2 = 0x114 DLT_LOOP = 0x6c DLT_LORATAP = 0x10e DLT_LTALK = 0x72 DLT_MATCHING_MAX = 0x114 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_NETLINK = 0xfd DLT_NFC_LLCP = 0xf5 DLT_NFLOG = 0xef DLT_NG40 = 0xf4 DLT_NORDIC_BLE = 0x110 DLT_NULL = 0x0 DLT_OPENFLOW = 0x10b DLT_PCI_EXP = 0x7d DLT_PFLOG = 0x75 DLT_PFSYNC = 0x79 DLT_PKTAP = 0x102 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_PPP_WITH_DIRECTION = 0xa6 DLT_PRISM_HEADER = 0x77 DLT_PROFIBUS_DL = 0x101 DLT_PRONET = 0x4 DLT_RAIF1 = 0xc6 DLT_RAW = 0xc DLT_RDS = 0x109 DLT_REDBACK_SMARTEDGE = 0x20 DLT_RIO = 0x7c DLT_RTAC_SERIAL = 0xfa DLT_SCCP = 0x8e DLT_SCTP = 0xf8 DLT_SDLC = 0x10c DLT_SITA = 0xc4 DLT_SLIP = 0x8 DLT_SLIP_BSDOS = 0xd DLT_STANAG_5066_D_PDU = 0xed DLT_SUNATM = 0x7b DLT_SYMANTEC_FIREWALL = 0x63 DLT_TI_LLN_SNIFFER = 0x10d DLT_TZSP = 0x80 DLT_USB = 0xba DLT_USBPCAP = 0xf9 DLT_USB_DARWIN = 0x10a DLT_USB_FREEBSD = 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_VSOCK = 0x10f DLT_WATTSTOPPER_DLM = 0x107 DLT_WIHART = 0xdf DLT_WIRESHARK_UPPER_PDU = 0xfc DLT_X2E_SERIAL = 0xd5 DLT_X2E_XORAYA = 0xd6 DLT_ZWAVE_R1_R2 = 0x105 DLT_ZWAVE_R3 = 0x106 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_EMPTY = -0xd EVFILT_FS = -0x9 EVFILT_LIO = -0xa EVFILT_PROC = -0x5 EVFILT_PROCDESC = -0x8 EVFILT_READ = -0x1 EVFILT_SENDFILE = -0xc EVFILT_SIGNAL = -0x6 EVFILT_SYSCOUNT = 0xd EVFILT_TIMER = -0x7 EVFILT_USER = -0xb EVFILT_VNODE = -0x4 EVFILT_WRITE = -0x2 EVNAMEMAP_NAME_SIZE = 0x40 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_FLAG2 = 0x4000 EV_FORCEONESHOT = 0x100 EV_ONESHOT = 0x10 EV_RECEIPT = 0x40 EV_SYSFLAGS = 0xf000 EXTA = 0x4b00 EXTATTR_MAXNAMELEN = 0xff 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 HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 IEXTEN = 0x400 IFAN_ARRIVAL = 0x0 IFAN_DEPARTURE = 0x1 IFCAP_WOL_MAGIC = 0x2000 IFF_ALLMULTI = 0x200 IFF_ALTPHYS = 0x4000 IFF_BROADCAST = 0x2 IFF_CANTCHANGE = 0x218f52 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_NOGROUP = 0x800000 IFF_OACTIVE = 0x400 IFF_POINTOPOINT = 0x10 IFF_PPROMISC = 0x20000 IFF_PROMISC = 0x100 IFF_RENAMING = 0x400000 IFF_RUNNING = 0x40 IFF_SIMPLEX = 0x800 IFF_STATICARP = 0x80000 IFF_UP = 0x1 IFNAMSIZ = 0x10 IFT_BRIDGE = 0xd1 IFT_CARP = 0xf8 IFT_IEEE1394 = 0x90 IFT_INFINIBAND = 0xc7 IFT_L2VLAN = 0x87 IFT_L3IPVLAN = 0x88 IFT_PPP = 0x17 IFT_PROPVIRTUAL = 0x35 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_DCCP = 0x21 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_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_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_BINDMULTI = 0x41 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_FLOWID = 0x43 IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_LEN = 0x14 IPV6_FLOWLABEL_MASK = 0xffff0f00 IPV6_FLOWTYPE = 0x44 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_MMTU = 0x500 IPV6_MSFILTER = 0x4a IPV6_MULTICAST_HOPS = 0xa IPV6_MULTICAST_IF = 0x9 IPV6_MULTICAST_LOOP = 0xb IPV6_NEXTHOP = 0x30 IPV6_ORIGDSTADDR = 0x48 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_RECVFLOWID = 0x46 IPV6_RECVHOPLIMIT = 0x25 IPV6_RECVHOPOPTS = 0x27 IPV6_RECVORIGDSTADDR = 0x48 IPV6_RECVPATHMTU = 0x2b IPV6_RECVPKTINFO = 0x24 IPV6_RECVRSSBUCKETID = 0x47 IPV6_RECVRTHDR = 0x26 IPV6_RECVTCLASS = 0x39 IPV6_RSSBUCKETID = 0x45 IPV6_RSS_LISTEN_BUCKET = 0x42 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 IPV6_VLAN_PCP = 0x4b IP_ADD_MEMBERSHIP = 0xc IP_ADD_SOURCE_MEMBERSHIP = 0x46 IP_BINDANY = 0x18 IP_BINDMULTI = 0x19 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_FLOWID = 0x5a IP_FLOWTYPE = 0x5b 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_MF = 0x2000 IP_MINTTL = 0x42 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_ORIGDSTADDR = 0x1b IP_PORTRANGE = 0x13 IP_PORTRANGE_DEFAULT = 0x0 IP_PORTRANGE_HIGH = 0x1 IP_PORTRANGE_LOW = 0x2 IP_RECVDSTADDR = 0x7 IP_RECVFLOWID = 0x5d IP_RECVIF = 0x14 IP_RECVOPTS = 0x5 IP_RECVORIGDSTADDR = 0x1b IP_RECVRETOPTS = 0x6 IP_RECVRSSBUCKETID = 0x5e IP_RECVTOS = 0x44 IP_RECVTTL = 0x41 IP_RETOPTS = 0x8 IP_RF = 0x8000 IP_RSSBUCKETID = 0x5c IP_RSS_LISTEN_BUCKET = 0x1a 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 IP_VLAN_PCP = 0x4b ISIG = 0x80 ISTRIP = 0x20 ITIMER_PROF = 0x2 ITIMER_REAL = 0x0 ITIMER_VIRTUAL = 0x1 IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 KERN_HOSTNAME = 0xa KERN_OSRELEASE = 0x2 KERN_OSTYPE = 0x1 KERN_VERSION = 0x4 LOCAL_CONNWAIT = 0x4 LOCAL_CREDS = 0x2 LOCAL_PEERCRED = 0x1 LOCAL_VENDOR = 0x80000000 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_GUARD = 0x2000 MAP_HASSEMAPHORE = 0x200 MAP_NOCORE = 0x20000 MAP_NOSYNC = 0x800 MAP_PREFAULT_READ = 0x40000 MAP_PRIVATE = 0x2 MAP_RESERVED0020 = 0x20 MAP_RESERVED0040 = 0x40 MAP_RESERVED0080 = 0x80 MAP_RESERVED0100 = 0x100 MAP_SHARED = 0x1 MAP_STACK = 0x400 MCAST_BLOCK_SOURCE = 0x54 MCAST_EXCLUDE = 0x2 MCAST_INCLUDE = 0x1 MCAST_JOIN_GROUP = 0x50 MCAST_JOIN_SOURCE_GROUP = 0x52 MCAST_LEAVE_GROUP = 0x51 MCAST_LEAVE_SOURCE_GROUP = 0x53 MCAST_UNBLOCK_SOURCE = 0x55 MCAST_UNDEFINED = 0x0 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MNT_ACLS = 0x8000000 MNT_ASYNC = 0x40 MNT_AUTOMOUNTED = 0x200000000 MNT_BYFSID = 0x8000000 MNT_CMDFLAGS = 0xd0f0000 MNT_DEFEXPORTED = 0x200 MNT_DELEXPORT = 0x20000 MNT_EXKERB = 0x800 MNT_EXPORTANON = 0x400 MNT_EXPORTED = 0x100 MNT_EXPUBLIC = 0x20000000 MNT_EXRDONLY = 0x80 MNT_FORCE = 0x80000 MNT_GJOURNAL = 0x2000000 MNT_IGNORE = 0x800000 MNT_LAZY = 0x3 MNT_LOCAL = 0x1000 MNT_MULTILABEL = 0x4000000 MNT_NFS4ACLS = 0x10 MNT_NOATIME = 0x10000000 MNT_NOCLUSTERR = 0x40000000 MNT_NOCLUSTERW = 0x80000000 MNT_NOEXEC = 0x4 MNT_NONBUSY = 0x4000000 MNT_NOSUID = 0x8 MNT_NOSYMFOLLOW = 0x400000 MNT_NOWAIT = 0x2 MNT_QUOTA = 0x2000 MNT_RDONLY = 0x1 MNT_RELOAD = 0x40000 MNT_ROOTFS = 0x4000 MNT_SNAPSHOT = 0x1000000 MNT_SOFTDEP = 0x200000 MNT_SUIDDIR = 0x100000 MNT_SUJ = 0x100000000 MNT_SUSPEND = 0x4 MNT_SYNCHRONOUS = 0x2 MNT_UNION = 0x20 MNT_UNTRUSTED = 0x800000000 MNT_UPDATE = 0x10000 MNT_UPDATEMASK = 0xad8d0807e MNT_USER = 0x8000 MNT_VERIFIED = 0x400000000 MNT_VISFLAGMASK = 0xffef0ffff MNT_WAIT = 0x1 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 MSG_WAITFORONE = 0x80000 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 NFDBITS = 0x40 NOFLSH = 0x80000000 NOKERNINFO = 0x2000000 NOTE_ABSTIME = 0x10 NOTE_ATTRIB = 0x8 NOTE_CHILD = 0x4 NOTE_CLOSE = 0x100 NOTE_CLOSE_WRITE = 0x200 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_FILE_POLL = 0x2 NOTE_FORK = 0x40000000 NOTE_LINK = 0x10 NOTE_LOWAT = 0x1 NOTE_MSECONDS = 0x2 NOTE_NSECONDS = 0x8 NOTE_OPEN = 0x80 NOTE_PCTRLMASK = 0xf0000000 NOTE_PDATAMASK = 0xfffff NOTE_READ = 0x400 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 OXTABS = 0x4 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_RESOLVE_BENEATH = 0x800000 O_SEARCH = 0x40000 O_SHLOCK = 0x10 O_SYNC = 0x80 O_TRUNC = 0x400 O_TTY_INIT = 0x80000 O_VERIFY = 0x200000 O_WRONLY = 0x1 PARENB = 0x1000 PARMRK = 0x8 PARODD = 0x2000 PENDIN = 0x20000000 PIOD_READ_D = 0x1 PIOD_READ_I = 0x3 PIOD_WRITE_D = 0x2 PIOD_WRITE_I = 0x4 PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 PROT_EXEC = 0x4 PROT_NONE = 0x0 PROT_READ = 0x1 PROT_WRITE = 0x2 PTRACE_DEFAULT = 0x1 PTRACE_EXEC = 0x1 PTRACE_FORK = 0x8 PTRACE_LWP = 0x10 PTRACE_SCE = 0x2 PTRACE_SCX = 0x4 PTRACE_SYSCALL = 0x6 PTRACE_VFORK = 0x20 PT_ATTACH = 0xa PT_CLEARSTEP = 0x10 PT_CONTINUE = 0x7 PT_DETACH = 0xb PT_FIRSTMACH = 0x40 PT_FOLLOW_FORK = 0x17 PT_GETDBREGS = 0x25 PT_GETFPREGS = 0x23 PT_GETFSBASE = 0x47 PT_GETGSBASE = 0x49 PT_GETLWPLIST = 0xf PT_GETNUMLWPS = 0xe PT_GETREGS = 0x21 PT_GETXSTATE = 0x45 PT_GETXSTATE_INFO = 0x44 PT_GET_EVENT_MASK = 0x19 PT_GET_SC_ARGS = 0x1b PT_GET_SC_RET = 0x1c PT_IO = 0xc PT_KILL = 0x8 PT_LWPINFO = 0xd PT_LWP_EVENTS = 0x18 PT_READ_D = 0x2 PT_READ_I = 0x1 PT_RESUME = 0x13 PT_SETDBREGS = 0x26 PT_SETFPREGS = 0x24 PT_SETFSBASE = 0x48 PT_SETGSBASE = 0x4a PT_SETREGS = 0x22 PT_SETSTEP = 0x11 PT_SETXSTATE = 0x46 PT_SET_EVENT_MASK = 0x1a PT_STEP = 0x9 PT_SUSPEND = 0x12 PT_SYSCALL = 0x16 PT_TO_SCE = 0x14 PT_TO_SCX = 0x15 PT_TRACE_ME = 0x0 PT_VM_ENTRY = 0x29 PT_VM_TIMESTAMP = 0x28 PT_WRITE_D = 0x5 PT_WRITE_I = 0x4 P_ZONEID = 0xc RLIMIT_AS = 0xa RLIMIT_CORE = 0x4 RLIMIT_CPU = 0x0 RLIMIT_DATA = 0x2 RLIMIT_FSIZE = 0x1 RLIMIT_MEMLOCK = 0x6 RLIMIT_NOFILE = 0x8 RLIMIT_NPROC = 0x7 RLIMIT_RSS = 0x5 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_FIXEDMTU = 0x80000 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_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_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_BLACKHOLE = 0x40 RT_DEFAULT_FIB = 0x0 RT_HAS_GW = 0x80 RT_HAS_HEADER = 0x10 RT_HAS_HEADER_BIT = 0x4 RT_L2_ME = 0x4 RT_L2_ME_BIT = 0x2 RT_LLE_CACHE = 0x100 RT_MAY_LOOP = 0x8 RT_MAY_LOOP_BIT = 0x3 RT_REJECT = 0x20 RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 RUSAGE_THREAD = 0x1 SCM_BINTIME = 0x4 SCM_CREDS = 0x3 SCM_MONOTONIC = 0x6 SCM_REALTIME = 0x5 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x2 SCM_TIME_INFO = 0x7 SEEK_CUR = 0x1 SEEK_DATA = 0x3 SEEK_END = 0x2 SEEK_HOLE = 0x4 SEEK_SET = 0x0 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 SIOCADDMULTI = 0x80206931 SIOCAIFADDR = 0x8040691a SIOCAIFGROUP = 0x80286987 SIOCATMARK = 0x40047307 SIOCDELMULTI = 0x80206932 SIOCDIFADDR = 0x80206919 SIOCDIFGROUP = 0x80286989 SIOCDIFPHYADDR = 0x80206949 SIOCGDRVSPEC = 0xc028697b SIOCGETSGCNT = 0xc0207210 SIOCGETVIFCNT = 0xc028720f SIOCGHIWAT = 0x40047301 SIOCGHWADDR = 0xc020693e SIOCGI2C = 0xc020693d SIOCGIFADDR = 0xc0206921 SIOCGIFALIAS = 0xc044692d SIOCGIFBRDADDR = 0xc0206923 SIOCGIFCAP = 0xc020691f SIOCGIFCONF = 0xc0106924 SIOCGIFDESCR = 0xc020692a SIOCGIFDOWNREASON = 0xc058699a 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 SIOCGIFRSSHASH = 0xc0186997 SIOCGIFRSSKEY = 0xc0946996 SIOCGIFSTATUS = 0xc331693b SIOCGIFXMEDIA = 0xc030698b SIOCGLANPCP = 0xc0206998 SIOCGLOWAT = 0x40047303 SIOCGPGRP = 0x40047309 SIOCGPRIVATE_0 = 0xc0206950 SIOCGPRIVATE_1 = 0xc0206951 SIOCGTUNFIB = 0xc020695e 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 SIOCSLANPCP = 0x80206999 SIOCSLOWAT = 0x80047302 SIOCSPGRP = 0x80047308 SIOCSTUNFIB = 0x8020695f 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_LOCAL = 0x0 SOL_SOCKET = 0xffff SOMAXCONN = 0x80 SO_ACCEPTCONN = 0x2 SO_ACCEPTFILTER = 0x1000 SO_BINTIME = 0x2000 SO_BROADCAST = 0x20 SO_DEBUG = 0x1 SO_DOMAIN = 0x1019 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_MAX_PACING_RATE = 0x1018 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_RERROR = 0x20000 SO_REUSEADDR = 0x4 SO_REUSEPORT = 0x200 SO_REUSEPORT_LB = 0x10000 SO_SETFIB = 0x1014 SO_SNDBUF = 0x1001 SO_SNDLOWAT = 0x1003 SO_SNDTIMEO = 0x1005 SO_TIMESTAMP = 0x400 SO_TS_BINTIME = 0x1 SO_TS_CLOCK = 0x1017 SO_TS_CLOCK_MAX = 0x3 SO_TS_DEFAULT = 0x0 SO_TS_MONOTONIC = 0x3 SO_TS_REALTIME = 0x2 SO_TS_REALTIME_MICRO = 0x0 SO_TYPE = 0x1008 SO_USELOOPBACK = 0x40 SO_USER_COOKIE = 0x1015 SO_VENDOR = 0x80000000 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 TAB0 = 0x0 TAB3 = 0x4 TABDLY = 0x4 TCIFLUSH = 0x1 TCIOFF = 0x3 TCIOFLUSH = 0x3 TCION = 0x4 TCOFLUSH = 0x2 TCOOFF = 0x1 TCOON = 0x2 TCPOPT_EOL = 0x0 TCPOPT_FAST_OPEN = 0x22 TCPOPT_MAXSEG = 0x2 TCPOPT_NOP = 0x1 TCPOPT_PAD = 0x0 TCPOPT_SACK = 0x5 TCPOPT_SACK_PERMITTED = 0x4 TCPOPT_SIGNATURE = 0x13 TCPOPT_TIMESTAMP = 0x8 TCPOPT_WINDOW = 0x3 TCP_BBR_ACK_COMP_ALG = 0x448 TCP_BBR_ALGORITHM = 0x43b TCP_BBR_DRAIN_INC_EXTRA = 0x43c TCP_BBR_DRAIN_PG = 0x42e TCP_BBR_EXTRA_GAIN = 0x449 TCP_BBR_EXTRA_STATE = 0x453 TCP_BBR_FLOOR_MIN_TSO = 0x454 TCP_BBR_HDWR_PACE = 0x451 TCP_BBR_HOLD_TARGET = 0x436 TCP_BBR_IWINTSO = 0x42b TCP_BBR_LOWGAIN_FD = 0x436 TCP_BBR_LOWGAIN_HALF = 0x435 TCP_BBR_LOWGAIN_THRESH = 0x434 TCP_BBR_MAX_RTO = 0x439 TCP_BBR_MIN_RTO = 0x438 TCP_BBR_MIN_TOPACEOUT = 0x455 TCP_BBR_ONE_RETRAN = 0x431 TCP_BBR_PACE_CROSS = 0x442 TCP_BBR_PACE_DEL_TAR = 0x43f TCP_BBR_PACE_OH = 0x435 TCP_BBR_PACE_PER_SEC = 0x43e TCP_BBR_PACE_SEG_MAX = 0x440 TCP_BBR_PACE_SEG_MIN = 0x441 TCP_BBR_POLICER_DETECT = 0x457 TCP_BBR_PROBE_RTT_GAIN = 0x44d TCP_BBR_PROBE_RTT_INT = 0x430 TCP_BBR_PROBE_RTT_LEN = 0x44e TCP_BBR_RACK_RTT_USE = 0x44a TCP_BBR_RECFORCE = 0x42c TCP_BBR_REC_OVER_HPTS = 0x43a TCP_BBR_RETRAN_WTSO = 0x44b TCP_BBR_RWND_IS_APP = 0x42f TCP_BBR_SEND_IWND_IN_TSO = 0x44f TCP_BBR_STARTUP_EXIT_EPOCH = 0x43d TCP_BBR_STARTUP_LOSS_EXIT = 0x432 TCP_BBR_STARTUP_PG = 0x42d TCP_BBR_TMR_PACE_OH = 0x448 TCP_BBR_TSLIMITS = 0x434 TCP_BBR_TSTMP_RAISES = 0x456 TCP_BBR_UNLIMITED = 0x43b TCP_BBR_USEDEL_RATE = 0x437 TCP_BBR_USE_LOWGAIN = 0x433 TCP_BBR_USE_RACK_CHEAT = 0x450 TCP_BBR_UTTER_MAX_TSO = 0x452 TCP_CA_NAME_MAX = 0x10 TCP_CCALGOOPT = 0x41 TCP_CONGESTION = 0x40 TCP_DATA_AFTER_CLOSE = 0x44c TCP_DELACK = 0x48 TCP_FASTOPEN = 0x401 TCP_FASTOPEN_MAX_COOKIE_LEN = 0x10 TCP_FASTOPEN_MIN_COOKIE_LEN = 0x4 TCP_FASTOPEN_PSK_LEN = 0x10 TCP_FUNCTION_BLK = 0x2000 TCP_FUNCTION_NAME_LEN_MAX = 0x20 TCP_INFO = 0x20 TCP_KEEPCNT = 0x400 TCP_KEEPIDLE = 0x100 TCP_KEEPINIT = 0x80 TCP_KEEPINTVL = 0x200 TCP_LOG = 0x22 TCP_LOGBUF = 0x23 TCP_LOGDUMP = 0x25 TCP_LOGDUMPID = 0x26 TCP_LOGID = 0x24 TCP_LOG_ID_LEN = 0x40 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_PCAP_IN = 0x1000 TCP_PCAP_OUT = 0x800 TCP_RACK_EARLY_RECOV = 0x423 TCP_RACK_EARLY_SEG = 0x424 TCP_RACK_GP_INCREASE = 0x446 TCP_RACK_IDLE_REDUCE_HIGH = 0x444 TCP_RACK_MIN_PACE = 0x445 TCP_RACK_MIN_PACE_SEG = 0x446 TCP_RACK_MIN_TO = 0x422 TCP_RACK_PACE_ALWAYS = 0x41f TCP_RACK_PACE_MAX_SEG = 0x41e TCP_RACK_PACE_REDUCE = 0x41d TCP_RACK_PKT_DELAY = 0x428 TCP_RACK_PROP = 0x41b TCP_RACK_PROP_RATE = 0x420 TCP_RACK_PRR_SENDALOT = 0x421 TCP_RACK_REORD_FADE = 0x426 TCP_RACK_REORD_THRESH = 0x425 TCP_RACK_TLP_INC_VAR = 0x429 TCP_RACK_TLP_REDUCE = 0x41c TCP_RACK_TLP_THRESH = 0x427 TCP_RACK_TLP_USE = 0x447 TCP_VENDOR = 0x80000000 TCSAFLUSH = 0x2 TIMER_ABSTIME = 0x1 TIMER_RELTIME = 0x0 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 UTIME_NOW = -0x1 UTIME_OMIT = -0x2 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) EINTEGRITY = syscall.Errno(0x61) EINTR = syscall.Errno(0x4) EINVAL = syscall.Errno(0x16) EIO = syscall.Errno(0x5) EISCONN = syscall.Errno(0x38) EISDIR = syscall.Errno(0x15) ELAST = syscall.Errno(0x61) 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "device not configured"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EDEADLK", "resource deadlock avoided"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "cross-device link"}, {19, "ENODEV", "operation not supported by device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "result too large"}, {35, "EWOULDBLOCK", "resource temporarily unavailable"}, {36, "EINPROGRESS", "operation now in progress"}, {37, "EALREADY", "operation already in progress"}, {38, "ENOTSOCK", "socket operation on non-socket"}, {39, "EDESTADDRREQ", "destination address required"}, {40, "EMSGSIZE", "message too long"}, {41, "EPROTOTYPE", "protocol wrong type for socket"}, {42, "ENOPROTOOPT", "protocol not available"}, {43, "EPROTONOSUPPORT", "protocol not supported"}, {44, "ESOCKTNOSUPPORT", "socket type not supported"}, {45, "EOPNOTSUPP", "operation not supported"}, {46, "EPFNOSUPPORT", "protocol family not supported"}, {47, "EAFNOSUPPORT", "address family not supported by protocol family"}, {48, "EADDRINUSE", "address already in use"}, {49, "EADDRNOTAVAIL", "can't assign requested address"}, {50, "ENETDOWN", "network is down"}, {51, "ENETUNREACH", "network is unreachable"}, {52, "ENETRESET", "network dropped connection on reset"}, {53, "ECONNABORTED", "software caused connection abort"}, {54, "ECONNRESET", "connection reset by peer"}, {55, "ENOBUFS", "no buffer space available"}, {56, "EISCONN", "socket is already connected"}, {57, "ENOTCONN", "socket is not connected"}, {58, "ESHUTDOWN", "can't send after socket shutdown"}, {59, "ETOOMANYREFS", "too many references: can't splice"}, {60, "ETIMEDOUT", "operation timed out"}, {61, "ECONNREFUSED", "connection refused"}, {62, "ELOOP", "too many levels of symbolic links"}, {63, "ENAMETOOLONG", "file name too long"}, {64, "EHOSTDOWN", "host is down"}, {65, "EHOSTUNREACH", "no route to host"}, {66, "ENOTEMPTY", "directory not empty"}, {67, "EPROCLIM", "too many processes"}, {68, "EUSERS", "too many users"}, {69, "EDQUOT", "disc quota exceeded"}, {70, "ESTALE", "stale NFS file handle"}, {71, "EREMOTE", "too many levels of remote in path"}, {72, "EBADRPC", "RPC struct is bad"}, {73, "ERPCMISMATCH", "RPC version wrong"}, {74, "EPROGUNAVAIL", "RPC prog. not avail"}, {75, "EPROGMISMATCH", "program version wrong"}, {76, "EPROCUNAVAIL", "bad procedure for program"}, {77, "ENOLCK", "no locks available"}, {78, "ENOSYS", "function not implemented"}, {79, "EFTYPE", "inappropriate file type or format"}, {80, "EAUTH", "authentication error"}, {81, "ENEEDAUTH", "need authenticator"}, {82, "EIDRM", "identifier removed"}, {83, "ENOMSG", "no message of desired type"}, {84, "EOVERFLOW", "value too large to be stored in data type"}, {85, "ECANCELED", "operation canceled"}, {86, "EILSEQ", "illegal byte sequence"}, {87, "ENOATTR", "attribute not found"}, {88, "EDOOFUS", "programming error"}, {89, "EBADMSG", "bad message"}, {90, "EMULTIHOP", "multihop attempted"}, {91, "ENOLINK", "link has been severed"}, {92, "EPROTO", "protocol error"}, {93, "ENOTCAPABLE", "capabilities insufficient"}, {94, "ECAPMODE", "not permitted in capability mode"}, {95, "ENOTRECOVERABLE", "state not recoverable"}, {96, "EOWNERDEAD", "previous owner died"}, {97, "EINTEGRITY", "integrity check failed"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, {6, "SIGIOT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGURG", "urgent I/O condition"}, {17, "SIGSTOP", "suspended (signal)"}, {18, "SIGTSTP", "suspended"}, {19, "SIGCONT", "continued"}, {20, "SIGCHLD", "child exited"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGIO", "I/O possible"}, {24, "SIGXCPU", "cputime limit exceeded"}, {25, "SIGXFSZ", "filesize limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window size changes"}, {29, "SIGINFO", "information request"}, {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGTHR", "unknown signal"}, {33, "SIGLIBRT", "unknown signal"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go ================================================ // mkerrors.sh // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && freebsd // Code generated by cmd/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 ALTWERASE = 0x200 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 = 0x4010426e 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 BIOCSETVLANPCP = 0x80044285 BIOCSETWF = 0x8008427b BIOCSETZBUF = 0x800c4281 BIOCSHDRCMPLT = 0x80044275 BIOCSRSIG = 0x80044273 BIOCSRTIMEOUT = 0x8010426d 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_MOD = 0x90 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 BPF_XOR = 0xa0 BRKINT = 0x2 CAP_ACCEPT = 0x200000020000000 CAP_ACL_CHECK = 0x400000000010000 CAP_ACL_DELETE = 0x400000000020000 CAP_ACL_GET = 0x400000000040000 CAP_ACL_SET = 0x400000000080000 CAP_ALL0 = 0x20007ffffffffff CAP_ALL1 = 0x4000000001fffff CAP_BIND = 0x200000040000000 CAP_BINDAT = 0x200008000000400 CAP_CHFLAGSAT = 0x200000000001400 CAP_CONNECT = 0x200000080000000 CAP_CONNECTAT = 0x200010000000400 CAP_CREATE = 0x200000000000040 CAP_EVENT = 0x400000000000020 CAP_EXTATTR_DELETE = 0x400000000001000 CAP_EXTATTR_GET = 0x400000000002000 CAP_EXTATTR_LIST = 0x400000000004000 CAP_EXTATTR_SET = 0x400000000008000 CAP_FCHDIR = 0x200000000000800 CAP_FCHFLAGS = 0x200000000001000 CAP_FCHMOD = 0x200000000002000 CAP_FCHMODAT = 0x200000000002400 CAP_FCHOWN = 0x200000000004000 CAP_FCHOWNAT = 0x200000000004400 CAP_FCNTL = 0x200000000008000 CAP_FCNTL_ALL = 0x78 CAP_FCNTL_GETFL = 0x8 CAP_FCNTL_GETOWN = 0x20 CAP_FCNTL_SETFL = 0x10 CAP_FCNTL_SETOWN = 0x40 CAP_FEXECVE = 0x200000000000080 CAP_FLOCK = 0x200000000010000 CAP_FPATHCONF = 0x200000000020000 CAP_FSCK = 0x200000000040000 CAP_FSTAT = 0x200000000080000 CAP_FSTATAT = 0x200000000080400 CAP_FSTATFS = 0x200000000100000 CAP_FSYNC = 0x200000000000100 CAP_FTRUNCATE = 0x200000000000200 CAP_FUTIMES = 0x200000000200000 CAP_FUTIMESAT = 0x200000000200400 CAP_GETPEERNAME = 0x200000100000000 CAP_GETSOCKNAME = 0x200000200000000 CAP_GETSOCKOPT = 0x200000400000000 CAP_IOCTL = 0x400000000000080 CAP_IOCTLS_ALL = 0x7fffffff CAP_KQUEUE = 0x400000000100040 CAP_KQUEUE_CHANGE = 0x400000000100000 CAP_KQUEUE_EVENT = 0x400000000000040 CAP_LINKAT_SOURCE = 0x200020000000400 CAP_LINKAT_TARGET = 0x200000000400400 CAP_LISTEN = 0x200000800000000 CAP_LOOKUP = 0x200000000000400 CAP_MAC_GET = 0x400000000000001 CAP_MAC_SET = 0x400000000000002 CAP_MKDIRAT = 0x200000000800400 CAP_MKFIFOAT = 0x200000001000400 CAP_MKNODAT = 0x200000002000400 CAP_MMAP = 0x200000000000010 CAP_MMAP_R = 0x20000000000001d CAP_MMAP_RW = 0x20000000000001f CAP_MMAP_RWX = 0x20000000000003f CAP_MMAP_RX = 0x20000000000003d CAP_MMAP_W = 0x20000000000001e CAP_MMAP_WX = 0x20000000000003e CAP_MMAP_X = 0x20000000000003c CAP_PDGETPID = 0x400000000000200 CAP_PDKILL = 0x400000000000800 CAP_PDWAIT = 0x400000000000400 CAP_PEELOFF = 0x200001000000000 CAP_POLL_EVENT = 0x400000000000020 CAP_PREAD = 0x20000000000000d CAP_PWRITE = 0x20000000000000e CAP_READ = 0x200000000000001 CAP_RECV = 0x200000000000001 CAP_RENAMEAT_SOURCE = 0x200000004000400 CAP_RENAMEAT_TARGET = 0x200040000000400 CAP_RIGHTS_VERSION = 0x0 CAP_RIGHTS_VERSION_00 = 0x0 CAP_SEEK = 0x20000000000000c CAP_SEEK_TELL = 0x200000000000004 CAP_SEM_GETVALUE = 0x400000000000004 CAP_SEM_POST = 0x400000000000008 CAP_SEM_WAIT = 0x400000000000010 CAP_SEND = 0x200000000000002 CAP_SETSOCKOPT = 0x200002000000000 CAP_SHUTDOWN = 0x200004000000000 CAP_SOCK_CLIENT = 0x200007780000003 CAP_SOCK_SERVER = 0x200007f60000003 CAP_SYMLINKAT = 0x200000008000400 CAP_TTYHOOK = 0x400000000000100 CAP_UNLINKAT = 0x200000010000400 CAP_UNUSED0_44 = 0x200080000000000 CAP_UNUSED0_57 = 0x300000000000000 CAP_UNUSED1_22 = 0x400000000200000 CAP_UNUSED1_57 = 0x500000000000000 CAP_WRITE = 0x200000000000002 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 CPUSTATES = 0x5 CP_IDLE = 0x4 CP_INTR = 0x3 CP_NICE = 0x1 CP_SYS = 0x2 CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x30000 CS5 = 0x0 CS6 = 0x100 CS7 = 0x200 CS8 = 0x300 CSIZE = 0x300 CSTART = 0x11 CSTATUS = 0x14 CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a CTL_HW = 0x6 CTL_KERN = 0x1 CTL_MAXNAME = 0x18 CTL_NET = 0x4 DIOCGATTR = 0xc148648e DIOCGDELETE = 0x80106488 DIOCGFLUSH = 0x20006487 DIOCGFRONTSTUFF = 0x40086486 DIOCGFWHEADS = 0x40046483 DIOCGFWSECTORS = 0x40046482 DIOCGIDENT = 0x41006489 DIOCGMEDIASIZE = 0x40086481 DIOCGPHYSPATH = 0x4400648d DIOCGPROVIDERNAME = 0x4400648a DIOCGSECTORSIZE = 0x40046480 DIOCGSTRIPEOFFSET = 0x4008648c DIOCGSTRIPESIZE = 0x4008648b DIOCSKERNELDUMP = 0x804c6490 DIOCSKERNELDUMP_FREEBSD11 = 0x80046485 DIOCZONECMD = 0xc078648f 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_BREDR_BB = 0xff DLT_BLUETOOTH_HCI_H4 = 0xbb DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 DLT_BLUETOOTH_LE_LL = 0xfb DLT_BLUETOOTH_LE_LL_WITH_PHDR = 0x100 DLT_BLUETOOTH_LINUX_MONITOR = 0xfe DLT_CAN20B = 0xbe DLT_CAN_SOCKETCAN = 0xe3 DLT_CHAOS = 0x5 DLT_CHDLC = 0x68 DLT_CISCO_IOS = 0x76 DLT_CLASS_NETBSD_RAWAF = 0x2240000 DLT_C_HDLC = 0x68 DLT_C_HDLC_WITH_DIR = 0xcd DLT_DBUS = 0xe7 DLT_DECT = 0xdd DLT_DISPLAYPORT_AUX = 0x113 DLT_DOCSIS = 0x8f DLT_DOCSIS31_XRA31 = 0x111 DLT_DVB_CI = 0xeb DLT_ECONET = 0x73 DLT_EN10MB = 0x1 DLT_EN3MB = 0x2 DLT_ENC = 0x6d DLT_EPON = 0x103 DLT_ERF = 0xc5 DLT_ERF_ETH = 0xaf DLT_ERF_POS = 0xb0 DLT_ETHERNET_MPACKET = 0x112 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_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_INFINIBAND = 0xf7 DLT_IPFILTER = 0x74 DLT_IPMB_KONTRON = 0xc7 DLT_IPMB_LINUX = 0xd1 DLT_IPMI_HPM_2 = 0x104 DLT_IPNET = 0xe2 DLT_IPOIB = 0xf2 DLT_IPV4 = 0xe4 DLT_IPV6 = 0xe5 DLT_IP_OVER_FC = 0x7a DLT_ISO_14443 = 0x108 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_LINUX_SLL2 = 0x114 DLT_LOOP = 0x6c DLT_LORATAP = 0x10e DLT_LTALK = 0x72 DLT_MATCHING_MAX = 0x114 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_NETLINK = 0xfd DLT_NFC_LLCP = 0xf5 DLT_NFLOG = 0xef DLT_NG40 = 0xf4 DLT_NORDIC_BLE = 0x110 DLT_NULL = 0x0 DLT_OPENFLOW = 0x10b DLT_PCI_EXP = 0x7d DLT_PFLOG = 0x75 DLT_PFSYNC = 0x79 DLT_PKTAP = 0x102 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_PPP_WITH_DIRECTION = 0xa6 DLT_PRISM_HEADER = 0x77 DLT_PROFIBUS_DL = 0x101 DLT_PRONET = 0x4 DLT_RAIF1 = 0xc6 DLT_RAW = 0xc DLT_RDS = 0x109 DLT_REDBACK_SMARTEDGE = 0x20 DLT_RIO = 0x7c DLT_RTAC_SERIAL = 0xfa DLT_SCCP = 0x8e DLT_SCTP = 0xf8 DLT_SDLC = 0x10c DLT_SITA = 0xc4 DLT_SLIP = 0x8 DLT_SLIP_BSDOS = 0xd DLT_STANAG_5066_D_PDU = 0xed DLT_SUNATM = 0x7b DLT_SYMANTEC_FIREWALL = 0x63 DLT_TI_LLN_SNIFFER = 0x10d DLT_TZSP = 0x80 DLT_USB = 0xba DLT_USBPCAP = 0xf9 DLT_USB_DARWIN = 0x10a DLT_USB_FREEBSD = 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_VSOCK = 0x10f DLT_WATTSTOPPER_DLM = 0x107 DLT_WIHART = 0xdf DLT_WIRESHARK_UPPER_PDU = 0xfc DLT_X2E_SERIAL = 0xd5 DLT_X2E_XORAYA = 0xd6 DLT_ZWAVE_R1_R2 = 0x105 DLT_ZWAVE_R3 = 0x106 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_EMPTY = -0xd EVFILT_FS = -0x9 EVFILT_LIO = -0xa EVFILT_PROC = -0x5 EVFILT_PROCDESC = -0x8 EVFILT_READ = -0x1 EVFILT_SENDFILE = -0xc EVFILT_SIGNAL = -0x6 EVFILT_SYSCOUNT = 0xd EVFILT_TIMER = -0x7 EVFILT_USER = -0xb EVFILT_VNODE = -0x4 EVFILT_WRITE = -0x2 EVNAMEMAP_NAME_SIZE = 0x40 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_FLAG2 = 0x4000 EV_FORCEONESHOT = 0x100 EV_ONESHOT = 0x10 EV_RECEIPT = 0x40 EV_SYSFLAGS = 0xf000 EXTA = 0x4b00 EXTATTR_MAXNAMELEN = 0xff 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 HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 IEXTEN = 0x400 IFAN_ARRIVAL = 0x0 IFAN_DEPARTURE = 0x1 IFCAP_WOL_MAGIC = 0x2000 IFF_ALLMULTI = 0x200 IFF_ALTPHYS = 0x4000 IFF_BROADCAST = 0x2 IFF_CANTCHANGE = 0x218f52 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_NOGROUP = 0x800000 IFF_OACTIVE = 0x400 IFF_POINTOPOINT = 0x10 IFF_PPROMISC = 0x20000 IFF_PROMISC = 0x100 IFF_RENAMING = 0x400000 IFF_RUNNING = 0x40 IFF_SIMPLEX = 0x800 IFF_STATICARP = 0x80000 IFF_UP = 0x1 IFNAMSIZ = 0x10 IFT_BRIDGE = 0xd1 IFT_CARP = 0xf8 IFT_IEEE1394 = 0x90 IFT_INFINIBAND = 0xc7 IFT_L2VLAN = 0x87 IFT_L3IPVLAN = 0x88 IFT_PPP = 0x17 IFT_PROPVIRTUAL = 0x35 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_DCCP = 0x21 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_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_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_BINDMULTI = 0x41 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_FLOWID = 0x43 IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_LEN = 0x14 IPV6_FLOWLABEL_MASK = 0xffff0f00 IPV6_FLOWTYPE = 0x44 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_MMTU = 0x500 IPV6_MSFILTER = 0x4a IPV6_MULTICAST_HOPS = 0xa IPV6_MULTICAST_IF = 0x9 IPV6_MULTICAST_LOOP = 0xb IPV6_NEXTHOP = 0x30 IPV6_ORIGDSTADDR = 0x48 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_RECVFLOWID = 0x46 IPV6_RECVHOPLIMIT = 0x25 IPV6_RECVHOPOPTS = 0x27 IPV6_RECVORIGDSTADDR = 0x48 IPV6_RECVPATHMTU = 0x2b IPV6_RECVPKTINFO = 0x24 IPV6_RECVRSSBUCKETID = 0x47 IPV6_RECVRTHDR = 0x26 IPV6_RECVTCLASS = 0x39 IPV6_RSSBUCKETID = 0x45 IPV6_RSS_LISTEN_BUCKET = 0x42 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 IPV6_VLAN_PCP = 0x4b IP_ADD_MEMBERSHIP = 0xc IP_ADD_SOURCE_MEMBERSHIP = 0x46 IP_BINDANY = 0x18 IP_BINDMULTI = 0x19 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_FLOWID = 0x5a IP_FLOWTYPE = 0x5b 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_MF = 0x2000 IP_MINTTL = 0x42 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_ORIGDSTADDR = 0x1b IP_PORTRANGE = 0x13 IP_PORTRANGE_DEFAULT = 0x0 IP_PORTRANGE_HIGH = 0x1 IP_PORTRANGE_LOW = 0x2 IP_RECVDSTADDR = 0x7 IP_RECVFLOWID = 0x5d IP_RECVIF = 0x14 IP_RECVOPTS = 0x5 IP_RECVORIGDSTADDR = 0x1b IP_RECVRETOPTS = 0x6 IP_RECVRSSBUCKETID = 0x5e IP_RECVTOS = 0x44 IP_RECVTTL = 0x41 IP_RETOPTS = 0x8 IP_RF = 0x8000 IP_RSSBUCKETID = 0x5c IP_RSS_LISTEN_BUCKET = 0x1a 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 IP_VLAN_PCP = 0x4b ISIG = 0x80 ISTRIP = 0x20 ITIMER_PROF = 0x2 ITIMER_REAL = 0x0 ITIMER_VIRTUAL = 0x1 IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 KERN_HOSTNAME = 0xa KERN_OSRELEASE = 0x2 KERN_OSTYPE = 0x1 KERN_VERSION = 0x4 LOCAL_CONNWAIT = 0x4 LOCAL_CREDS = 0x2 LOCAL_PEERCRED = 0x1 LOCAL_VENDOR = 0x80000000 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_GUARD = 0x2000 MAP_HASSEMAPHORE = 0x200 MAP_NOCORE = 0x20000 MAP_NOSYNC = 0x800 MAP_PREFAULT_READ = 0x40000 MAP_PRIVATE = 0x2 MAP_RESERVED0020 = 0x20 MAP_RESERVED0040 = 0x40 MAP_RESERVED0080 = 0x80 MAP_RESERVED0100 = 0x100 MAP_SHARED = 0x1 MAP_STACK = 0x400 MCAST_BLOCK_SOURCE = 0x54 MCAST_EXCLUDE = 0x2 MCAST_INCLUDE = 0x1 MCAST_JOIN_GROUP = 0x50 MCAST_JOIN_SOURCE_GROUP = 0x52 MCAST_LEAVE_GROUP = 0x51 MCAST_LEAVE_SOURCE_GROUP = 0x53 MCAST_UNBLOCK_SOURCE = 0x55 MCAST_UNDEFINED = 0x0 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MNT_ACLS = 0x8000000 MNT_ASYNC = 0x40 MNT_AUTOMOUNTED = 0x200000000 MNT_BYFSID = 0x8000000 MNT_CMDFLAGS = 0xd0f0000 MNT_DEFEXPORTED = 0x200 MNT_DELEXPORT = 0x20000 MNT_EXKERB = 0x800 MNT_EXPORTANON = 0x400 MNT_EXPORTED = 0x100 MNT_EXPUBLIC = 0x20000000 MNT_EXRDONLY = 0x80 MNT_FORCE = 0x80000 MNT_GJOURNAL = 0x2000000 MNT_IGNORE = 0x800000 MNT_LAZY = 0x3 MNT_LOCAL = 0x1000 MNT_MULTILABEL = 0x4000000 MNT_NFS4ACLS = 0x10 MNT_NOATIME = 0x10000000 MNT_NOCLUSTERR = 0x40000000 MNT_NOCLUSTERW = 0x80000000 MNT_NOEXEC = 0x4 MNT_NONBUSY = 0x4000000 MNT_NOSUID = 0x8 MNT_NOSYMFOLLOW = 0x400000 MNT_NOWAIT = 0x2 MNT_QUOTA = 0x2000 MNT_RDONLY = 0x1 MNT_RELOAD = 0x40000 MNT_ROOTFS = 0x4000 MNT_SNAPSHOT = 0x1000000 MNT_SOFTDEP = 0x200000 MNT_SUIDDIR = 0x100000 MNT_SUJ = 0x100000000 MNT_SUSPEND = 0x4 MNT_SYNCHRONOUS = 0x2 MNT_UNION = 0x20 MNT_UNTRUSTED = 0x800000000 MNT_UPDATE = 0x10000 MNT_UPDATEMASK = 0xad8d0807e MNT_USER = 0x8000 MNT_VERIFIED = 0x400000000 MNT_VISFLAGMASK = 0xffef0ffff MNT_WAIT = 0x1 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 MSG_WAITFORONE = 0x80000 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 NFDBITS = 0x20 NOFLSH = 0x80000000 NOKERNINFO = 0x2000000 NOTE_ABSTIME = 0x10 NOTE_ATTRIB = 0x8 NOTE_CHILD = 0x4 NOTE_CLOSE = 0x100 NOTE_CLOSE_WRITE = 0x200 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_FILE_POLL = 0x2 NOTE_FORK = 0x40000000 NOTE_LINK = 0x10 NOTE_LOWAT = 0x1 NOTE_MSECONDS = 0x2 NOTE_NSECONDS = 0x8 NOTE_OPEN = 0x80 NOTE_PCTRLMASK = 0xf0000000 NOTE_PDATAMASK = 0xfffff NOTE_READ = 0x400 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 OXTABS = 0x4 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_RESOLVE_BENEATH = 0x800000 O_SEARCH = 0x40000 O_SHLOCK = 0x10 O_SYNC = 0x80 O_TRUNC = 0x400 O_TTY_INIT = 0x80000 O_VERIFY = 0x200000 O_WRONLY = 0x1 PARENB = 0x1000 PARMRK = 0x8 PARODD = 0x2000 PENDIN = 0x20000000 PIOD_READ_D = 0x1 PIOD_READ_I = 0x3 PIOD_WRITE_D = 0x2 PIOD_WRITE_I = 0x4 PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 PROT_EXEC = 0x4 PROT_NONE = 0x0 PROT_READ = 0x1 PROT_WRITE = 0x2 PTRACE_DEFAULT = 0x1 PTRACE_EXEC = 0x1 PTRACE_FORK = 0x8 PTRACE_LWP = 0x10 PTRACE_SCE = 0x2 PTRACE_SCX = 0x4 PTRACE_SYSCALL = 0x6 PTRACE_VFORK = 0x20 PT_ATTACH = 0xa PT_CLEARSTEP = 0x10 PT_CONTINUE = 0x7 PT_DETACH = 0xb PT_FIRSTMACH = 0x40 PT_FOLLOW_FORK = 0x17 PT_GETDBREGS = 0x25 PT_GETFPREGS = 0x23 PT_GETLWPLIST = 0xf PT_GETNUMLWPS = 0xe PT_GETREGS = 0x21 PT_GETVFPREGS = 0x40 PT_GET_EVENT_MASK = 0x19 PT_GET_SC_ARGS = 0x1b PT_GET_SC_RET = 0x1c PT_IO = 0xc PT_KILL = 0x8 PT_LWPINFO = 0xd PT_LWP_EVENTS = 0x18 PT_READ_D = 0x2 PT_READ_I = 0x1 PT_RESUME = 0x13 PT_SETDBREGS = 0x26 PT_SETFPREGS = 0x24 PT_SETREGS = 0x22 PT_SETSTEP = 0x11 PT_SETVFPREGS = 0x41 PT_SET_EVENT_MASK = 0x1a PT_STEP = 0x9 PT_SUSPEND = 0x12 PT_SYSCALL = 0x16 PT_TO_SCE = 0x14 PT_TO_SCX = 0x15 PT_TRACE_ME = 0x0 PT_VM_ENTRY = 0x29 PT_VM_TIMESTAMP = 0x28 PT_WRITE_D = 0x5 PT_WRITE_I = 0x4 P_ZONEID = 0xc RLIMIT_AS = 0xa RLIMIT_CORE = 0x4 RLIMIT_CPU = 0x0 RLIMIT_DATA = 0x2 RLIMIT_FSIZE = 0x1 RLIMIT_MEMLOCK = 0x6 RLIMIT_NOFILE = 0x8 RLIMIT_NPROC = 0x7 RLIMIT_RSS = 0x5 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_FIXEDMTU = 0x80000 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_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_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_BLACKHOLE = 0x40 RT_DEFAULT_FIB = 0x0 RT_HAS_GW = 0x80 RT_HAS_HEADER = 0x10 RT_HAS_HEADER_BIT = 0x4 RT_L2_ME = 0x4 RT_L2_ME_BIT = 0x2 RT_LLE_CACHE = 0x100 RT_MAY_LOOP = 0x8 RT_MAY_LOOP_BIT = 0x3 RT_REJECT = 0x20 RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 RUSAGE_THREAD = 0x1 SCM_BINTIME = 0x4 SCM_CREDS = 0x3 SCM_MONOTONIC = 0x6 SCM_REALTIME = 0x5 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x2 SCM_TIME_INFO = 0x7 SEEK_CUR = 0x1 SEEK_DATA = 0x3 SEEK_END = 0x2 SEEK_HOLE = 0x4 SEEK_SET = 0x0 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 SIOCADDMULTI = 0x80206931 SIOCAIFADDR = 0x8040691a SIOCAIFGROUP = 0x80246987 SIOCATMARK = 0x40047307 SIOCDELMULTI = 0x80206932 SIOCDIFADDR = 0x80206919 SIOCDIFGROUP = 0x80246989 SIOCDIFPHYADDR = 0x80206949 SIOCGDRVSPEC = 0xc01c697b SIOCGETSGCNT = 0xc0147210 SIOCGETVIFCNT = 0xc014720f SIOCGHIWAT = 0x40047301 SIOCGHWADDR = 0xc020693e SIOCGI2C = 0xc020693d SIOCGIFADDR = 0xc0206921 SIOCGIFALIAS = 0xc044692d SIOCGIFBRDADDR = 0xc0206923 SIOCGIFCAP = 0xc020691f SIOCGIFCONF = 0xc0086924 SIOCGIFDESCR = 0xc020692a SIOCGIFDOWNREASON = 0xc058699a 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 SIOCGIFRSSHASH = 0xc0186997 SIOCGIFRSSKEY = 0xc0946996 SIOCGIFSTATUS = 0xc331693b SIOCGIFXMEDIA = 0xc028698b SIOCGLANPCP = 0xc0206998 SIOCGLOWAT = 0x40047303 SIOCGPGRP = 0x40047309 SIOCGPRIVATE_0 = 0xc0206950 SIOCGPRIVATE_1 = 0xc0206951 SIOCGTUNFIB = 0xc020695e 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 SIOCSLANPCP = 0x80206999 SIOCSLOWAT = 0x80047302 SIOCSPGRP = 0x80047308 SIOCSTUNFIB = 0x8020695f 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_LOCAL = 0x0 SOL_SOCKET = 0xffff SOMAXCONN = 0x80 SO_ACCEPTCONN = 0x2 SO_ACCEPTFILTER = 0x1000 SO_BINTIME = 0x2000 SO_BROADCAST = 0x20 SO_DEBUG = 0x1 SO_DOMAIN = 0x1019 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_MAX_PACING_RATE = 0x1018 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_RERROR = 0x20000 SO_REUSEADDR = 0x4 SO_REUSEPORT = 0x200 SO_REUSEPORT_LB = 0x10000 SO_SETFIB = 0x1014 SO_SNDBUF = 0x1001 SO_SNDLOWAT = 0x1003 SO_SNDTIMEO = 0x1005 SO_TIMESTAMP = 0x400 SO_TS_BINTIME = 0x1 SO_TS_CLOCK = 0x1017 SO_TS_CLOCK_MAX = 0x3 SO_TS_DEFAULT = 0x0 SO_TS_MONOTONIC = 0x3 SO_TS_REALTIME = 0x2 SO_TS_REALTIME_MICRO = 0x0 SO_TYPE = 0x1008 SO_USELOOPBACK = 0x40 SO_USER_COOKIE = 0x1015 SO_VENDOR = 0x80000000 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 TAB0 = 0x0 TAB3 = 0x4 TABDLY = 0x4 TCIFLUSH = 0x1 TCIOFF = 0x3 TCIOFLUSH = 0x3 TCION = 0x4 TCOFLUSH = 0x2 TCOOFF = 0x1 TCOON = 0x2 TCPOPT_EOL = 0x0 TCPOPT_FAST_OPEN = 0x22 TCPOPT_MAXSEG = 0x2 TCPOPT_NOP = 0x1 TCPOPT_PAD = 0x0 TCPOPT_SACK = 0x5 TCPOPT_SACK_PERMITTED = 0x4 TCPOPT_SIGNATURE = 0x13 TCPOPT_TIMESTAMP = 0x8 TCPOPT_WINDOW = 0x3 TCP_BBR_ACK_COMP_ALG = 0x448 TCP_BBR_ALGORITHM = 0x43b TCP_BBR_DRAIN_INC_EXTRA = 0x43c TCP_BBR_DRAIN_PG = 0x42e TCP_BBR_EXTRA_GAIN = 0x449 TCP_BBR_EXTRA_STATE = 0x453 TCP_BBR_FLOOR_MIN_TSO = 0x454 TCP_BBR_HDWR_PACE = 0x451 TCP_BBR_HOLD_TARGET = 0x436 TCP_BBR_IWINTSO = 0x42b TCP_BBR_LOWGAIN_FD = 0x436 TCP_BBR_LOWGAIN_HALF = 0x435 TCP_BBR_LOWGAIN_THRESH = 0x434 TCP_BBR_MAX_RTO = 0x439 TCP_BBR_MIN_RTO = 0x438 TCP_BBR_MIN_TOPACEOUT = 0x455 TCP_BBR_ONE_RETRAN = 0x431 TCP_BBR_PACE_CROSS = 0x442 TCP_BBR_PACE_DEL_TAR = 0x43f TCP_BBR_PACE_OH = 0x435 TCP_BBR_PACE_PER_SEC = 0x43e TCP_BBR_PACE_SEG_MAX = 0x440 TCP_BBR_PACE_SEG_MIN = 0x441 TCP_BBR_POLICER_DETECT = 0x457 TCP_BBR_PROBE_RTT_GAIN = 0x44d TCP_BBR_PROBE_RTT_INT = 0x430 TCP_BBR_PROBE_RTT_LEN = 0x44e TCP_BBR_RACK_RTT_USE = 0x44a TCP_BBR_RECFORCE = 0x42c TCP_BBR_REC_OVER_HPTS = 0x43a TCP_BBR_RETRAN_WTSO = 0x44b TCP_BBR_RWND_IS_APP = 0x42f TCP_BBR_SEND_IWND_IN_TSO = 0x44f TCP_BBR_STARTUP_EXIT_EPOCH = 0x43d TCP_BBR_STARTUP_LOSS_EXIT = 0x432 TCP_BBR_STARTUP_PG = 0x42d TCP_BBR_TMR_PACE_OH = 0x448 TCP_BBR_TSLIMITS = 0x434 TCP_BBR_TSTMP_RAISES = 0x456 TCP_BBR_UNLIMITED = 0x43b TCP_BBR_USEDEL_RATE = 0x437 TCP_BBR_USE_LOWGAIN = 0x433 TCP_BBR_USE_RACK_CHEAT = 0x450 TCP_BBR_UTTER_MAX_TSO = 0x452 TCP_CA_NAME_MAX = 0x10 TCP_CCALGOOPT = 0x41 TCP_CONGESTION = 0x40 TCP_DATA_AFTER_CLOSE = 0x44c TCP_DELACK = 0x48 TCP_FASTOPEN = 0x401 TCP_FASTOPEN_MAX_COOKIE_LEN = 0x10 TCP_FASTOPEN_MIN_COOKIE_LEN = 0x4 TCP_FASTOPEN_PSK_LEN = 0x10 TCP_FUNCTION_BLK = 0x2000 TCP_FUNCTION_NAME_LEN_MAX = 0x20 TCP_INFO = 0x20 TCP_KEEPCNT = 0x400 TCP_KEEPIDLE = 0x100 TCP_KEEPINIT = 0x80 TCP_KEEPINTVL = 0x200 TCP_LOG = 0x22 TCP_LOGBUF = 0x23 TCP_LOGDUMP = 0x25 TCP_LOGDUMPID = 0x26 TCP_LOGID = 0x24 TCP_LOG_ID_LEN = 0x40 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_PCAP_IN = 0x1000 TCP_PCAP_OUT = 0x800 TCP_RACK_EARLY_RECOV = 0x423 TCP_RACK_EARLY_SEG = 0x424 TCP_RACK_GP_INCREASE = 0x446 TCP_RACK_IDLE_REDUCE_HIGH = 0x444 TCP_RACK_MIN_PACE = 0x445 TCP_RACK_MIN_PACE_SEG = 0x446 TCP_RACK_MIN_TO = 0x422 TCP_RACK_PACE_ALWAYS = 0x41f TCP_RACK_PACE_MAX_SEG = 0x41e TCP_RACK_PACE_REDUCE = 0x41d TCP_RACK_PKT_DELAY = 0x428 TCP_RACK_PROP = 0x41b TCP_RACK_PROP_RATE = 0x420 TCP_RACK_PRR_SENDALOT = 0x421 TCP_RACK_REORD_FADE = 0x426 TCP_RACK_REORD_THRESH = 0x425 TCP_RACK_TLP_INC_VAR = 0x429 TCP_RACK_TLP_REDUCE = 0x41c TCP_RACK_TLP_THRESH = 0x427 TCP_RACK_TLP_USE = 0x447 TCP_VENDOR = 0x80000000 TCSAFLUSH = 0x2 TIMER_ABSTIME = 0x1 TIMER_RELTIME = 0x0 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 UTIME_NOW = -0x1 UTIME_OMIT = -0x2 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) EINTEGRITY = syscall.Errno(0x61) EINTR = syscall.Errno(0x4) EINVAL = syscall.Errno(0x16) EIO = syscall.Errno(0x5) EISCONN = syscall.Errno(0x38) EISDIR = syscall.Errno(0x15) ELAST = syscall.Errno(0x61) 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "device not configured"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EDEADLK", "resource deadlock avoided"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "cross-device link"}, {19, "ENODEV", "operation not supported by device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "result too large"}, {35, "EWOULDBLOCK", "resource temporarily unavailable"}, {36, "EINPROGRESS", "operation now in progress"}, {37, "EALREADY", "operation already in progress"}, {38, "ENOTSOCK", "socket operation on non-socket"}, {39, "EDESTADDRREQ", "destination address required"}, {40, "EMSGSIZE", "message too long"}, {41, "EPROTOTYPE", "protocol wrong type for socket"}, {42, "ENOPROTOOPT", "protocol not available"}, {43, "EPROTONOSUPPORT", "protocol not supported"}, {44, "ESOCKTNOSUPPORT", "socket type not supported"}, {45, "EOPNOTSUPP", "operation not supported"}, {46, "EPFNOSUPPORT", "protocol family not supported"}, {47, "EAFNOSUPPORT", "address family not supported by protocol family"}, {48, "EADDRINUSE", "address already in use"}, {49, "EADDRNOTAVAIL", "can't assign requested address"}, {50, "ENETDOWN", "network is down"}, {51, "ENETUNREACH", "network is unreachable"}, {52, "ENETRESET", "network dropped connection on reset"}, {53, "ECONNABORTED", "software caused connection abort"}, {54, "ECONNRESET", "connection reset by peer"}, {55, "ENOBUFS", "no buffer space available"}, {56, "EISCONN", "socket is already connected"}, {57, "ENOTCONN", "socket is not connected"}, {58, "ESHUTDOWN", "can't send after socket shutdown"}, {59, "ETOOMANYREFS", "too many references: can't splice"}, {60, "ETIMEDOUT", "operation timed out"}, {61, "ECONNREFUSED", "connection refused"}, {62, "ELOOP", "too many levels of symbolic links"}, {63, "ENAMETOOLONG", "file name too long"}, {64, "EHOSTDOWN", "host is down"}, {65, "EHOSTUNREACH", "no route to host"}, {66, "ENOTEMPTY", "directory not empty"}, {67, "EPROCLIM", "too many processes"}, {68, "EUSERS", "too many users"}, {69, "EDQUOT", "disc quota exceeded"}, {70, "ESTALE", "stale NFS file handle"}, {71, "EREMOTE", "too many levels of remote in path"}, {72, "EBADRPC", "RPC struct is bad"}, {73, "ERPCMISMATCH", "RPC version wrong"}, {74, "EPROGUNAVAIL", "RPC prog. not avail"}, {75, "EPROGMISMATCH", "program version wrong"}, {76, "EPROCUNAVAIL", "bad procedure for program"}, {77, "ENOLCK", "no locks available"}, {78, "ENOSYS", "function not implemented"}, {79, "EFTYPE", "inappropriate file type or format"}, {80, "EAUTH", "authentication error"}, {81, "ENEEDAUTH", "need authenticator"}, {82, "EIDRM", "identifier removed"}, {83, "ENOMSG", "no message of desired type"}, {84, "EOVERFLOW", "value too large to be stored in data type"}, {85, "ECANCELED", "operation canceled"}, {86, "EILSEQ", "illegal byte sequence"}, {87, "ENOATTR", "attribute not found"}, {88, "EDOOFUS", "programming error"}, {89, "EBADMSG", "bad message"}, {90, "EMULTIHOP", "multihop attempted"}, {91, "ENOLINK", "link has been severed"}, {92, "EPROTO", "protocol error"}, {93, "ENOTCAPABLE", "capabilities insufficient"}, {94, "ECAPMODE", "not permitted in capability mode"}, {95, "ENOTRECOVERABLE", "state not recoverable"}, {96, "EOWNERDEAD", "previous owner died"}, {97, "EINTEGRITY", "integrity check failed"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, {6, "SIGIOT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGURG", "urgent I/O condition"}, {17, "SIGSTOP", "suspended (signal)"}, {18, "SIGTSTP", "suspended"}, {19, "SIGCONT", "continued"}, {20, "SIGCHLD", "child exited"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGIO", "I/O possible"}, {24, "SIGXCPU", "cputime limit exceeded"}, {25, "SIGXFSZ", "filesize limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window size changes"}, {29, "SIGINFO", "information request"}, {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGTHR", "unknown signal"}, {33, "SIGLIBRT", "unknown signal"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go ================================================ // mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && freebsd // Code generated by cmd/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 ALTWERASE = 0x200 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 BIOCSETVLANPCP = 0x80044285 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_MOD = 0x90 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 BPF_XOR = 0xa0 BRKINT = 0x2 CAP_ACCEPT = 0x200000020000000 CAP_ACL_CHECK = 0x400000000010000 CAP_ACL_DELETE = 0x400000000020000 CAP_ACL_GET = 0x400000000040000 CAP_ACL_SET = 0x400000000080000 CAP_ALL0 = 0x20007ffffffffff CAP_ALL1 = 0x4000000001fffff CAP_BIND = 0x200000040000000 CAP_BINDAT = 0x200008000000400 CAP_CHFLAGSAT = 0x200000000001400 CAP_CONNECT = 0x200000080000000 CAP_CONNECTAT = 0x200010000000400 CAP_CREATE = 0x200000000000040 CAP_EVENT = 0x400000000000020 CAP_EXTATTR_DELETE = 0x400000000001000 CAP_EXTATTR_GET = 0x400000000002000 CAP_EXTATTR_LIST = 0x400000000004000 CAP_EXTATTR_SET = 0x400000000008000 CAP_FCHDIR = 0x200000000000800 CAP_FCHFLAGS = 0x200000000001000 CAP_FCHMOD = 0x200000000002000 CAP_FCHMODAT = 0x200000000002400 CAP_FCHOWN = 0x200000000004000 CAP_FCHOWNAT = 0x200000000004400 CAP_FCNTL = 0x200000000008000 CAP_FCNTL_ALL = 0x78 CAP_FCNTL_GETFL = 0x8 CAP_FCNTL_GETOWN = 0x20 CAP_FCNTL_SETFL = 0x10 CAP_FCNTL_SETOWN = 0x40 CAP_FEXECVE = 0x200000000000080 CAP_FLOCK = 0x200000000010000 CAP_FPATHCONF = 0x200000000020000 CAP_FSCK = 0x200000000040000 CAP_FSTAT = 0x200000000080000 CAP_FSTATAT = 0x200000000080400 CAP_FSTATFS = 0x200000000100000 CAP_FSYNC = 0x200000000000100 CAP_FTRUNCATE = 0x200000000000200 CAP_FUTIMES = 0x200000000200000 CAP_FUTIMESAT = 0x200000000200400 CAP_GETPEERNAME = 0x200000100000000 CAP_GETSOCKNAME = 0x200000200000000 CAP_GETSOCKOPT = 0x200000400000000 CAP_IOCTL = 0x400000000000080 CAP_IOCTLS_ALL = 0x7fffffffffffffff CAP_KQUEUE = 0x400000000100040 CAP_KQUEUE_CHANGE = 0x400000000100000 CAP_KQUEUE_EVENT = 0x400000000000040 CAP_LINKAT_SOURCE = 0x200020000000400 CAP_LINKAT_TARGET = 0x200000000400400 CAP_LISTEN = 0x200000800000000 CAP_LOOKUP = 0x200000000000400 CAP_MAC_GET = 0x400000000000001 CAP_MAC_SET = 0x400000000000002 CAP_MKDIRAT = 0x200000000800400 CAP_MKFIFOAT = 0x200000001000400 CAP_MKNODAT = 0x200000002000400 CAP_MMAP = 0x200000000000010 CAP_MMAP_R = 0x20000000000001d CAP_MMAP_RW = 0x20000000000001f CAP_MMAP_RWX = 0x20000000000003f CAP_MMAP_RX = 0x20000000000003d CAP_MMAP_W = 0x20000000000001e CAP_MMAP_WX = 0x20000000000003e CAP_MMAP_X = 0x20000000000003c CAP_PDGETPID = 0x400000000000200 CAP_PDKILL = 0x400000000000800 CAP_PDWAIT = 0x400000000000400 CAP_PEELOFF = 0x200001000000000 CAP_POLL_EVENT = 0x400000000000020 CAP_PREAD = 0x20000000000000d CAP_PWRITE = 0x20000000000000e CAP_READ = 0x200000000000001 CAP_RECV = 0x200000000000001 CAP_RENAMEAT_SOURCE = 0x200000004000400 CAP_RENAMEAT_TARGET = 0x200040000000400 CAP_RIGHTS_VERSION = 0x0 CAP_RIGHTS_VERSION_00 = 0x0 CAP_SEEK = 0x20000000000000c CAP_SEEK_TELL = 0x200000000000004 CAP_SEM_GETVALUE = 0x400000000000004 CAP_SEM_POST = 0x400000000000008 CAP_SEM_WAIT = 0x400000000000010 CAP_SEND = 0x200000000000002 CAP_SETSOCKOPT = 0x200002000000000 CAP_SHUTDOWN = 0x200004000000000 CAP_SOCK_CLIENT = 0x200007780000003 CAP_SOCK_SERVER = 0x200007f60000003 CAP_SYMLINKAT = 0x200000008000400 CAP_TTYHOOK = 0x400000000000100 CAP_UNLINKAT = 0x200000010000400 CAP_UNUSED0_44 = 0x200080000000000 CAP_UNUSED0_57 = 0x300000000000000 CAP_UNUSED1_22 = 0x400000000200000 CAP_UNUSED1_57 = 0x500000000000000 CAP_WRITE = 0x200000000000002 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 CPUSTATES = 0x5 CP_IDLE = 0x4 CP_INTR = 0x3 CP_NICE = 0x1 CP_SYS = 0x2 CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x30000 CS5 = 0x0 CS6 = 0x100 CS7 = 0x200 CS8 = 0x300 CSIZE = 0x300 CSTART = 0x11 CSTATUS = 0x14 CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a CTL_HW = 0x6 CTL_KERN = 0x1 CTL_MAXNAME = 0x18 CTL_NET = 0x4 DIOCGATTR = 0xc148648e DIOCGDELETE = 0x80106488 DIOCGFLUSH = 0x20006487 DIOCGFRONTSTUFF = 0x40086486 DIOCGFWHEADS = 0x40046483 DIOCGFWSECTORS = 0x40046482 DIOCGIDENT = 0x41006489 DIOCGMEDIASIZE = 0x40086481 DIOCGPHYSPATH = 0x4400648d DIOCGPROVIDERNAME = 0x4400648a DIOCGSECTORSIZE = 0x40046480 DIOCGSTRIPEOFFSET = 0x4008648c DIOCGSTRIPESIZE = 0x4008648b DIOCSKERNELDUMP = 0x80506490 DIOCSKERNELDUMP_FREEBSD11 = 0x80046485 DIOCZONECMD = 0xc080648f 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_BREDR_BB = 0xff DLT_BLUETOOTH_HCI_H4 = 0xbb DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 DLT_BLUETOOTH_LE_LL = 0xfb DLT_BLUETOOTH_LE_LL_WITH_PHDR = 0x100 DLT_BLUETOOTH_LINUX_MONITOR = 0xfe DLT_CAN20B = 0xbe DLT_CAN_SOCKETCAN = 0xe3 DLT_CHAOS = 0x5 DLT_CHDLC = 0x68 DLT_CISCO_IOS = 0x76 DLT_CLASS_NETBSD_RAWAF = 0x2240000 DLT_C_HDLC = 0x68 DLT_C_HDLC_WITH_DIR = 0xcd DLT_DBUS = 0xe7 DLT_DECT = 0xdd DLT_DISPLAYPORT_AUX = 0x113 DLT_DOCSIS = 0x8f DLT_DOCSIS31_XRA31 = 0x111 DLT_DVB_CI = 0xeb DLT_ECONET = 0x73 DLT_EN10MB = 0x1 DLT_EN3MB = 0x2 DLT_ENC = 0x6d DLT_EPON = 0x103 DLT_ERF = 0xc5 DLT_ERF_ETH = 0xaf DLT_ERF_POS = 0xb0 DLT_ETHERNET_MPACKET = 0x112 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_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_INFINIBAND = 0xf7 DLT_IPFILTER = 0x74 DLT_IPMB_KONTRON = 0xc7 DLT_IPMB_LINUX = 0xd1 DLT_IPMI_HPM_2 = 0x104 DLT_IPNET = 0xe2 DLT_IPOIB = 0xf2 DLT_IPV4 = 0xe4 DLT_IPV6 = 0xe5 DLT_IP_OVER_FC = 0x7a DLT_ISO_14443 = 0x108 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_LINUX_SLL2 = 0x114 DLT_LOOP = 0x6c DLT_LORATAP = 0x10e DLT_LTALK = 0x72 DLT_MATCHING_MAX = 0x114 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_NETLINK = 0xfd DLT_NFC_LLCP = 0xf5 DLT_NFLOG = 0xef DLT_NG40 = 0xf4 DLT_NORDIC_BLE = 0x110 DLT_NULL = 0x0 DLT_OPENFLOW = 0x10b DLT_PCI_EXP = 0x7d DLT_PFLOG = 0x75 DLT_PFSYNC = 0x79 DLT_PKTAP = 0x102 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_PPP_WITH_DIRECTION = 0xa6 DLT_PRISM_HEADER = 0x77 DLT_PROFIBUS_DL = 0x101 DLT_PRONET = 0x4 DLT_RAIF1 = 0xc6 DLT_RAW = 0xc DLT_RDS = 0x109 DLT_REDBACK_SMARTEDGE = 0x20 DLT_RIO = 0x7c DLT_RTAC_SERIAL = 0xfa DLT_SCCP = 0x8e DLT_SCTP = 0xf8 DLT_SDLC = 0x10c DLT_SITA = 0xc4 DLT_SLIP = 0x8 DLT_SLIP_BSDOS = 0xd DLT_STANAG_5066_D_PDU = 0xed DLT_SUNATM = 0x7b DLT_SYMANTEC_FIREWALL = 0x63 DLT_TI_LLN_SNIFFER = 0x10d DLT_TZSP = 0x80 DLT_USB = 0xba DLT_USBPCAP = 0xf9 DLT_USB_DARWIN = 0x10a DLT_USB_FREEBSD = 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_VSOCK = 0x10f DLT_WATTSTOPPER_DLM = 0x107 DLT_WIHART = 0xdf DLT_WIRESHARK_UPPER_PDU = 0xfc DLT_X2E_SERIAL = 0xd5 DLT_X2E_XORAYA = 0xd6 DLT_ZWAVE_R1_R2 = 0x105 DLT_ZWAVE_R3 = 0x106 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_EMPTY = -0xd EVFILT_FS = -0x9 EVFILT_LIO = -0xa EVFILT_PROC = -0x5 EVFILT_PROCDESC = -0x8 EVFILT_READ = -0x1 EVFILT_SENDFILE = -0xc EVFILT_SIGNAL = -0x6 EVFILT_SYSCOUNT = 0xd EVFILT_TIMER = -0x7 EVFILT_USER = -0xb EVFILT_VNODE = -0x4 EVFILT_WRITE = -0x2 EVNAMEMAP_NAME_SIZE = 0x40 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_FLAG2 = 0x4000 EV_FORCEONESHOT = 0x100 EV_ONESHOT = 0x10 EV_RECEIPT = 0x40 EV_SYSFLAGS = 0xf000 EXTA = 0x4b00 EXTATTR_MAXNAMELEN = 0xff 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 HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 IEXTEN = 0x400 IFAN_ARRIVAL = 0x0 IFAN_DEPARTURE = 0x1 IFCAP_WOL_MAGIC = 0x2000 IFF_ALLMULTI = 0x200 IFF_ALTPHYS = 0x4000 IFF_BROADCAST = 0x2 IFF_CANTCHANGE = 0x218f52 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_NOGROUP = 0x800000 IFF_OACTIVE = 0x400 IFF_POINTOPOINT = 0x10 IFF_PPROMISC = 0x20000 IFF_PROMISC = 0x100 IFF_RENAMING = 0x400000 IFF_RUNNING = 0x40 IFF_SIMPLEX = 0x800 IFF_STATICARP = 0x80000 IFF_UP = 0x1 IFNAMSIZ = 0x10 IFT_BRIDGE = 0xd1 IFT_CARP = 0xf8 IFT_IEEE1394 = 0x90 IFT_INFINIBAND = 0xc7 IFT_L2VLAN = 0x87 IFT_L3IPVLAN = 0x88 IFT_PPP = 0x17 IFT_PROPVIRTUAL = 0x35 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_DCCP = 0x21 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_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_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_BINDMULTI = 0x41 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_FLOWID = 0x43 IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_LEN = 0x14 IPV6_FLOWLABEL_MASK = 0xffff0f00 IPV6_FLOWTYPE = 0x44 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_MMTU = 0x500 IPV6_MSFILTER = 0x4a IPV6_MULTICAST_HOPS = 0xa IPV6_MULTICAST_IF = 0x9 IPV6_MULTICAST_LOOP = 0xb IPV6_NEXTHOP = 0x30 IPV6_ORIGDSTADDR = 0x48 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_RECVFLOWID = 0x46 IPV6_RECVHOPLIMIT = 0x25 IPV6_RECVHOPOPTS = 0x27 IPV6_RECVORIGDSTADDR = 0x48 IPV6_RECVPATHMTU = 0x2b IPV6_RECVPKTINFO = 0x24 IPV6_RECVRSSBUCKETID = 0x47 IPV6_RECVRTHDR = 0x26 IPV6_RECVTCLASS = 0x39 IPV6_RSSBUCKETID = 0x45 IPV6_RSS_LISTEN_BUCKET = 0x42 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 IPV6_VLAN_PCP = 0x4b IP_ADD_MEMBERSHIP = 0xc IP_ADD_SOURCE_MEMBERSHIP = 0x46 IP_BINDANY = 0x18 IP_BINDMULTI = 0x19 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_FLOWID = 0x5a IP_FLOWTYPE = 0x5b 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_MF = 0x2000 IP_MINTTL = 0x42 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_ORIGDSTADDR = 0x1b IP_PORTRANGE = 0x13 IP_PORTRANGE_DEFAULT = 0x0 IP_PORTRANGE_HIGH = 0x1 IP_PORTRANGE_LOW = 0x2 IP_RECVDSTADDR = 0x7 IP_RECVFLOWID = 0x5d IP_RECVIF = 0x14 IP_RECVOPTS = 0x5 IP_RECVORIGDSTADDR = 0x1b IP_RECVRETOPTS = 0x6 IP_RECVRSSBUCKETID = 0x5e IP_RECVTOS = 0x44 IP_RECVTTL = 0x41 IP_RETOPTS = 0x8 IP_RF = 0x8000 IP_RSSBUCKETID = 0x5c IP_RSS_LISTEN_BUCKET = 0x1a 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 IP_VLAN_PCP = 0x4b ISIG = 0x80 ISTRIP = 0x20 ITIMER_PROF = 0x2 ITIMER_REAL = 0x0 ITIMER_VIRTUAL = 0x1 IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 KERN_HOSTNAME = 0xa KERN_OSRELEASE = 0x2 KERN_OSTYPE = 0x1 KERN_VERSION = 0x4 LOCAL_CONNWAIT = 0x4 LOCAL_CREDS = 0x2 LOCAL_PEERCRED = 0x1 LOCAL_VENDOR = 0x80000000 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_GUARD = 0x2000 MAP_HASSEMAPHORE = 0x200 MAP_NOCORE = 0x20000 MAP_NOSYNC = 0x800 MAP_PREFAULT_READ = 0x40000 MAP_PRIVATE = 0x2 MAP_RESERVED0020 = 0x20 MAP_RESERVED0040 = 0x40 MAP_RESERVED0080 = 0x80 MAP_RESERVED0100 = 0x100 MAP_SHARED = 0x1 MAP_STACK = 0x400 MCAST_BLOCK_SOURCE = 0x54 MCAST_EXCLUDE = 0x2 MCAST_INCLUDE = 0x1 MCAST_JOIN_GROUP = 0x50 MCAST_JOIN_SOURCE_GROUP = 0x52 MCAST_LEAVE_GROUP = 0x51 MCAST_LEAVE_SOURCE_GROUP = 0x53 MCAST_UNBLOCK_SOURCE = 0x55 MCAST_UNDEFINED = 0x0 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MNT_ACLS = 0x8000000 MNT_ASYNC = 0x40 MNT_AUTOMOUNTED = 0x200000000 MNT_BYFSID = 0x8000000 MNT_CMDFLAGS = 0xd0f0000 MNT_DEFEXPORTED = 0x200 MNT_DELEXPORT = 0x20000 MNT_EXKERB = 0x800 MNT_EXPORTANON = 0x400 MNT_EXPORTED = 0x100 MNT_EXPUBLIC = 0x20000000 MNT_EXRDONLY = 0x80 MNT_FORCE = 0x80000 MNT_GJOURNAL = 0x2000000 MNT_IGNORE = 0x800000 MNT_LAZY = 0x3 MNT_LOCAL = 0x1000 MNT_MULTILABEL = 0x4000000 MNT_NFS4ACLS = 0x10 MNT_NOATIME = 0x10000000 MNT_NOCLUSTERR = 0x40000000 MNT_NOCLUSTERW = 0x80000000 MNT_NOEXEC = 0x4 MNT_NONBUSY = 0x4000000 MNT_NOSUID = 0x8 MNT_NOSYMFOLLOW = 0x400000 MNT_NOWAIT = 0x2 MNT_QUOTA = 0x2000 MNT_RDONLY = 0x1 MNT_RELOAD = 0x40000 MNT_ROOTFS = 0x4000 MNT_SNAPSHOT = 0x1000000 MNT_SOFTDEP = 0x200000 MNT_SUIDDIR = 0x100000 MNT_SUJ = 0x100000000 MNT_SUSPEND = 0x4 MNT_SYNCHRONOUS = 0x2 MNT_UNION = 0x20 MNT_UNTRUSTED = 0x800000000 MNT_UPDATE = 0x10000 MNT_UPDATEMASK = 0xad8d0807e MNT_USER = 0x8000 MNT_VERIFIED = 0x400000000 MNT_VISFLAGMASK = 0xffef0ffff MNT_WAIT = 0x1 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 MSG_WAITFORONE = 0x80000 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 NFDBITS = 0x40 NOFLSH = 0x80000000 NOKERNINFO = 0x2000000 NOTE_ABSTIME = 0x10 NOTE_ATTRIB = 0x8 NOTE_CHILD = 0x4 NOTE_CLOSE = 0x100 NOTE_CLOSE_WRITE = 0x200 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_FILE_POLL = 0x2 NOTE_FORK = 0x40000000 NOTE_LINK = 0x10 NOTE_LOWAT = 0x1 NOTE_MSECONDS = 0x2 NOTE_NSECONDS = 0x8 NOTE_OPEN = 0x80 NOTE_PCTRLMASK = 0xf0000000 NOTE_PDATAMASK = 0xfffff NOTE_READ = 0x400 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 OXTABS = 0x4 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_RESOLVE_BENEATH = 0x800000 O_SEARCH = 0x40000 O_SHLOCK = 0x10 O_SYNC = 0x80 O_TRUNC = 0x400 O_TTY_INIT = 0x80000 O_VERIFY = 0x200000 O_WRONLY = 0x1 PARENB = 0x1000 PARMRK = 0x8 PARODD = 0x2000 PENDIN = 0x20000000 PIOD_READ_D = 0x1 PIOD_READ_I = 0x3 PIOD_WRITE_D = 0x2 PIOD_WRITE_I = 0x4 PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 PROT_EXEC = 0x4 PROT_NONE = 0x0 PROT_READ = 0x1 PROT_WRITE = 0x2 PTRACE_DEFAULT = 0x1 PTRACE_EXEC = 0x1 PTRACE_FORK = 0x8 PTRACE_LWP = 0x10 PTRACE_SCE = 0x2 PTRACE_SCX = 0x4 PTRACE_SYSCALL = 0x6 PTRACE_VFORK = 0x20 PT_ATTACH = 0xa PT_CLEARSTEP = 0x10 PT_CONTINUE = 0x7 PT_DETACH = 0xb PT_FIRSTMACH = 0x40 PT_FOLLOW_FORK = 0x17 PT_GETDBREGS = 0x25 PT_GETFPREGS = 0x23 PT_GETLWPLIST = 0xf PT_GETNUMLWPS = 0xe PT_GETREGS = 0x21 PT_GET_EVENT_MASK = 0x19 PT_GET_SC_ARGS = 0x1b PT_GET_SC_RET = 0x1c PT_IO = 0xc PT_KILL = 0x8 PT_LWPINFO = 0xd PT_LWP_EVENTS = 0x18 PT_READ_D = 0x2 PT_READ_I = 0x1 PT_RESUME = 0x13 PT_SETDBREGS = 0x26 PT_SETFPREGS = 0x24 PT_SETREGS = 0x22 PT_SETSTEP = 0x11 PT_SET_EVENT_MASK = 0x1a PT_STEP = 0x9 PT_SUSPEND = 0x12 PT_SYSCALL = 0x16 PT_TO_SCE = 0x14 PT_TO_SCX = 0x15 PT_TRACE_ME = 0x0 PT_VM_ENTRY = 0x29 PT_VM_TIMESTAMP = 0x28 PT_WRITE_D = 0x5 PT_WRITE_I = 0x4 P_ZONEID = 0xc RLIMIT_AS = 0xa RLIMIT_CORE = 0x4 RLIMIT_CPU = 0x0 RLIMIT_DATA = 0x2 RLIMIT_FSIZE = 0x1 RLIMIT_MEMLOCK = 0x6 RLIMIT_NOFILE = 0x8 RLIMIT_NPROC = 0x7 RLIMIT_RSS = 0x5 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_FIXEDMTU = 0x80000 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_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_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_BLACKHOLE = 0x40 RT_DEFAULT_FIB = 0x0 RT_HAS_GW = 0x80 RT_HAS_HEADER = 0x10 RT_HAS_HEADER_BIT = 0x4 RT_L2_ME = 0x4 RT_L2_ME_BIT = 0x2 RT_LLE_CACHE = 0x100 RT_MAY_LOOP = 0x8 RT_MAY_LOOP_BIT = 0x3 RT_REJECT = 0x20 RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 RUSAGE_THREAD = 0x1 SCM_BINTIME = 0x4 SCM_CREDS = 0x3 SCM_MONOTONIC = 0x6 SCM_REALTIME = 0x5 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x2 SCM_TIME_INFO = 0x7 SEEK_CUR = 0x1 SEEK_DATA = 0x3 SEEK_END = 0x2 SEEK_HOLE = 0x4 SEEK_SET = 0x0 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 SIOCADDMULTI = 0x80206931 SIOCAIFADDR = 0x8040691a SIOCAIFGROUP = 0x80286987 SIOCATMARK = 0x40047307 SIOCDELMULTI = 0x80206932 SIOCDIFADDR = 0x80206919 SIOCDIFGROUP = 0x80286989 SIOCDIFPHYADDR = 0x80206949 SIOCGDRVSPEC = 0xc028697b SIOCGETSGCNT = 0xc0207210 SIOCGETVIFCNT = 0xc028720f SIOCGHIWAT = 0x40047301 SIOCGHWADDR = 0xc020693e SIOCGI2C = 0xc020693d SIOCGIFADDR = 0xc0206921 SIOCGIFALIAS = 0xc044692d SIOCGIFBRDADDR = 0xc0206923 SIOCGIFCAP = 0xc020691f SIOCGIFCONF = 0xc0106924 SIOCGIFDESCR = 0xc020692a SIOCGIFDOWNREASON = 0xc058699a 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 SIOCGIFRSSHASH = 0xc0186997 SIOCGIFRSSKEY = 0xc0946996 SIOCGIFSTATUS = 0xc331693b SIOCGIFXMEDIA = 0xc030698b SIOCGLANPCP = 0xc0206998 SIOCGLOWAT = 0x40047303 SIOCGPGRP = 0x40047309 SIOCGPRIVATE_0 = 0xc0206950 SIOCGPRIVATE_1 = 0xc0206951 SIOCGTUNFIB = 0xc020695e 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 SIOCSLANPCP = 0x80206999 SIOCSLOWAT = 0x80047302 SIOCSPGRP = 0x80047308 SIOCSTUNFIB = 0x8020695f 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_LOCAL = 0x0 SOL_SOCKET = 0xffff SOMAXCONN = 0x80 SO_ACCEPTCONN = 0x2 SO_ACCEPTFILTER = 0x1000 SO_BINTIME = 0x2000 SO_BROADCAST = 0x20 SO_DEBUG = 0x1 SO_DOMAIN = 0x1019 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_MAX_PACING_RATE = 0x1018 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_RERROR = 0x20000 SO_REUSEADDR = 0x4 SO_REUSEPORT = 0x200 SO_REUSEPORT_LB = 0x10000 SO_SETFIB = 0x1014 SO_SNDBUF = 0x1001 SO_SNDLOWAT = 0x1003 SO_SNDTIMEO = 0x1005 SO_TIMESTAMP = 0x400 SO_TS_BINTIME = 0x1 SO_TS_CLOCK = 0x1017 SO_TS_CLOCK_MAX = 0x3 SO_TS_DEFAULT = 0x0 SO_TS_MONOTONIC = 0x3 SO_TS_REALTIME = 0x2 SO_TS_REALTIME_MICRO = 0x0 SO_TYPE = 0x1008 SO_USELOOPBACK = 0x40 SO_USER_COOKIE = 0x1015 SO_VENDOR = 0x80000000 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 TAB0 = 0x0 TAB3 = 0x4 TABDLY = 0x4 TCIFLUSH = 0x1 TCIOFF = 0x3 TCIOFLUSH = 0x3 TCION = 0x4 TCOFLUSH = 0x2 TCOOFF = 0x1 TCOON = 0x2 TCPOPT_EOL = 0x0 TCPOPT_FAST_OPEN = 0x22 TCPOPT_MAXSEG = 0x2 TCPOPT_NOP = 0x1 TCPOPT_PAD = 0x0 TCPOPT_SACK = 0x5 TCPOPT_SACK_PERMITTED = 0x4 TCPOPT_SIGNATURE = 0x13 TCPOPT_TIMESTAMP = 0x8 TCPOPT_WINDOW = 0x3 TCP_BBR_ACK_COMP_ALG = 0x448 TCP_BBR_ALGORITHM = 0x43b TCP_BBR_DRAIN_INC_EXTRA = 0x43c TCP_BBR_DRAIN_PG = 0x42e TCP_BBR_EXTRA_GAIN = 0x449 TCP_BBR_EXTRA_STATE = 0x453 TCP_BBR_FLOOR_MIN_TSO = 0x454 TCP_BBR_HDWR_PACE = 0x451 TCP_BBR_HOLD_TARGET = 0x436 TCP_BBR_IWINTSO = 0x42b TCP_BBR_LOWGAIN_FD = 0x436 TCP_BBR_LOWGAIN_HALF = 0x435 TCP_BBR_LOWGAIN_THRESH = 0x434 TCP_BBR_MAX_RTO = 0x439 TCP_BBR_MIN_RTO = 0x438 TCP_BBR_MIN_TOPACEOUT = 0x455 TCP_BBR_ONE_RETRAN = 0x431 TCP_BBR_PACE_CROSS = 0x442 TCP_BBR_PACE_DEL_TAR = 0x43f TCP_BBR_PACE_OH = 0x435 TCP_BBR_PACE_PER_SEC = 0x43e TCP_BBR_PACE_SEG_MAX = 0x440 TCP_BBR_PACE_SEG_MIN = 0x441 TCP_BBR_POLICER_DETECT = 0x457 TCP_BBR_PROBE_RTT_GAIN = 0x44d TCP_BBR_PROBE_RTT_INT = 0x430 TCP_BBR_PROBE_RTT_LEN = 0x44e TCP_BBR_RACK_RTT_USE = 0x44a TCP_BBR_RECFORCE = 0x42c TCP_BBR_REC_OVER_HPTS = 0x43a TCP_BBR_RETRAN_WTSO = 0x44b TCP_BBR_RWND_IS_APP = 0x42f TCP_BBR_SEND_IWND_IN_TSO = 0x44f TCP_BBR_STARTUP_EXIT_EPOCH = 0x43d TCP_BBR_STARTUP_LOSS_EXIT = 0x432 TCP_BBR_STARTUP_PG = 0x42d TCP_BBR_TMR_PACE_OH = 0x448 TCP_BBR_TSLIMITS = 0x434 TCP_BBR_TSTMP_RAISES = 0x456 TCP_BBR_UNLIMITED = 0x43b TCP_BBR_USEDEL_RATE = 0x437 TCP_BBR_USE_LOWGAIN = 0x433 TCP_BBR_USE_RACK_CHEAT = 0x450 TCP_BBR_UTTER_MAX_TSO = 0x452 TCP_CA_NAME_MAX = 0x10 TCP_CCALGOOPT = 0x41 TCP_CONGESTION = 0x40 TCP_DATA_AFTER_CLOSE = 0x44c TCP_DELACK = 0x48 TCP_FASTOPEN = 0x401 TCP_FASTOPEN_MAX_COOKIE_LEN = 0x10 TCP_FASTOPEN_MIN_COOKIE_LEN = 0x4 TCP_FASTOPEN_PSK_LEN = 0x10 TCP_FUNCTION_BLK = 0x2000 TCP_FUNCTION_NAME_LEN_MAX = 0x20 TCP_INFO = 0x20 TCP_KEEPCNT = 0x400 TCP_KEEPIDLE = 0x100 TCP_KEEPINIT = 0x80 TCP_KEEPINTVL = 0x200 TCP_LOG = 0x22 TCP_LOGBUF = 0x23 TCP_LOGDUMP = 0x25 TCP_LOGDUMPID = 0x26 TCP_LOGID = 0x24 TCP_LOG_ID_LEN = 0x40 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_PCAP_IN = 0x1000 TCP_PCAP_OUT = 0x800 TCP_RACK_EARLY_RECOV = 0x423 TCP_RACK_EARLY_SEG = 0x424 TCP_RACK_GP_INCREASE = 0x446 TCP_RACK_IDLE_REDUCE_HIGH = 0x444 TCP_RACK_MIN_PACE = 0x445 TCP_RACK_MIN_PACE_SEG = 0x446 TCP_RACK_MIN_TO = 0x422 TCP_RACK_PACE_ALWAYS = 0x41f TCP_RACK_PACE_MAX_SEG = 0x41e TCP_RACK_PACE_REDUCE = 0x41d TCP_RACK_PKT_DELAY = 0x428 TCP_RACK_PROP = 0x41b TCP_RACK_PROP_RATE = 0x420 TCP_RACK_PRR_SENDALOT = 0x421 TCP_RACK_REORD_FADE = 0x426 TCP_RACK_REORD_THRESH = 0x425 TCP_RACK_TLP_INC_VAR = 0x429 TCP_RACK_TLP_REDUCE = 0x41c TCP_RACK_TLP_THRESH = 0x427 TCP_RACK_TLP_USE = 0x447 TCP_VENDOR = 0x80000000 TCSAFLUSH = 0x2 TIMER_ABSTIME = 0x1 TIMER_RELTIME = 0x0 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 UTIME_NOW = -0x1 UTIME_OMIT = -0x2 VDISCARD = 0xf VDSUSP = 0xb VEOF = 0x0 VEOL = 0x1 VEOL2 = 0x2 VERASE = 0x3 VERASE2 = 0x7 VINTR = 0x8 VKILL = 0x5 VLNEXT = 0xe VMIN = 0x10 VM_BCACHE_SIZE_MAX = 0x19000000 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) EINTEGRITY = syscall.Errno(0x61) EINTR = syscall.Errno(0x4) EINVAL = syscall.Errno(0x16) EIO = syscall.Errno(0x5) EISCONN = syscall.Errno(0x38) EISDIR = syscall.Errno(0x15) ELAST = syscall.Errno(0x61) 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "device not configured"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EDEADLK", "resource deadlock avoided"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "cross-device link"}, {19, "ENODEV", "operation not supported by device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "result too large"}, {35, "EWOULDBLOCK", "resource temporarily unavailable"}, {36, "EINPROGRESS", "operation now in progress"}, {37, "EALREADY", "operation already in progress"}, {38, "ENOTSOCK", "socket operation on non-socket"}, {39, "EDESTADDRREQ", "destination address required"}, {40, "EMSGSIZE", "message too long"}, {41, "EPROTOTYPE", "protocol wrong type for socket"}, {42, "ENOPROTOOPT", "protocol not available"}, {43, "EPROTONOSUPPORT", "protocol not supported"}, {44, "ESOCKTNOSUPPORT", "socket type not supported"}, {45, "EOPNOTSUPP", "operation not supported"}, {46, "EPFNOSUPPORT", "protocol family not supported"}, {47, "EAFNOSUPPORT", "address family not supported by protocol family"}, {48, "EADDRINUSE", "address already in use"}, {49, "EADDRNOTAVAIL", "can't assign requested address"}, {50, "ENETDOWN", "network is down"}, {51, "ENETUNREACH", "network is unreachable"}, {52, "ENETRESET", "network dropped connection on reset"}, {53, "ECONNABORTED", "software caused connection abort"}, {54, "ECONNRESET", "connection reset by peer"}, {55, "ENOBUFS", "no buffer space available"}, {56, "EISCONN", "socket is already connected"}, {57, "ENOTCONN", "socket is not connected"}, {58, "ESHUTDOWN", "can't send after socket shutdown"}, {59, "ETOOMANYREFS", "too many references: can't splice"}, {60, "ETIMEDOUT", "operation timed out"}, {61, "ECONNREFUSED", "connection refused"}, {62, "ELOOP", "too many levels of symbolic links"}, {63, "ENAMETOOLONG", "file name too long"}, {64, "EHOSTDOWN", "host is down"}, {65, "EHOSTUNREACH", "no route to host"}, {66, "ENOTEMPTY", "directory not empty"}, {67, "EPROCLIM", "too many processes"}, {68, "EUSERS", "too many users"}, {69, "EDQUOT", "disc quota exceeded"}, {70, "ESTALE", "stale NFS file handle"}, {71, "EREMOTE", "too many levels of remote in path"}, {72, "EBADRPC", "RPC struct is bad"}, {73, "ERPCMISMATCH", "RPC version wrong"}, {74, "EPROGUNAVAIL", "RPC prog. not avail"}, {75, "EPROGMISMATCH", "program version wrong"}, {76, "EPROCUNAVAIL", "bad procedure for program"}, {77, "ENOLCK", "no locks available"}, {78, "ENOSYS", "function not implemented"}, {79, "EFTYPE", "inappropriate file type or format"}, {80, "EAUTH", "authentication error"}, {81, "ENEEDAUTH", "need authenticator"}, {82, "EIDRM", "identifier removed"}, {83, "ENOMSG", "no message of desired type"}, {84, "EOVERFLOW", "value too large to be stored in data type"}, {85, "ECANCELED", "operation canceled"}, {86, "EILSEQ", "illegal byte sequence"}, {87, "ENOATTR", "attribute not found"}, {88, "EDOOFUS", "programming error"}, {89, "EBADMSG", "bad message"}, {90, "EMULTIHOP", "multihop attempted"}, {91, "ENOLINK", "link has been severed"}, {92, "EPROTO", "protocol error"}, {93, "ENOTCAPABLE", "capabilities insufficient"}, {94, "ECAPMODE", "not permitted in capability mode"}, {95, "ENOTRECOVERABLE", "state not recoverable"}, {96, "EOWNERDEAD", "previous owner died"}, {97, "EINTEGRITY", "integrity check failed"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, {6, "SIGIOT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGURG", "urgent I/O condition"}, {17, "SIGSTOP", "suspended (signal)"}, {18, "SIGTSTP", "suspended"}, {19, "SIGCONT", "continued"}, {20, "SIGCHLD", "child exited"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGIO", "I/O possible"}, {24, "SIGXCPU", "cputime limit exceeded"}, {25, "SIGXFSZ", "filesize limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window size changes"}, {29, "SIGINFO", "information request"}, {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGTHR", "unknown signal"}, {33, "SIGLIBRT", "unknown signal"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_freebsd_riscv64.go ================================================ // mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && freebsd // Code generated by cmd/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_HYPERV = 0x2b 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 = 0x2b 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_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 ALTWERASE = 0x200 B0 = 0x0 B1000000 = 0xf4240 B110 = 0x6e B115200 = 0x1c200 B1200 = 0x4b0 B134 = 0x86 B14400 = 0x3840 B150 = 0x96 B1500000 = 0x16e360 B1800 = 0x708 B19200 = 0x4b00 B200 = 0xc8 B2000000 = 0x1e8480 B230400 = 0x38400 B2400 = 0x960 B2500000 = 0x2625a0 B28800 = 0x7080 B300 = 0x12c B3000000 = 0x2dc6c0 B3500000 = 0x3567e0 B38400 = 0x9600 B4000000 = 0x3d0900 B460800 = 0x70800 B4800 = 0x12c0 B50 = 0x32 B500000 = 0x7a120 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 BIOCSETVLANPCP = 0x80044285 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_MOD = 0x90 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 BPF_XOR = 0xa0 BRKINT = 0x2 CAP_ACCEPT = 0x200000020000000 CAP_ACL_CHECK = 0x400000000010000 CAP_ACL_DELETE = 0x400000000020000 CAP_ACL_GET = 0x400000000040000 CAP_ACL_SET = 0x400000000080000 CAP_ALL0 = 0x20007ffffffffff CAP_ALL1 = 0x4000000001fffff CAP_BIND = 0x200000040000000 CAP_BINDAT = 0x200008000000400 CAP_CHFLAGSAT = 0x200000000001400 CAP_CONNECT = 0x200000080000000 CAP_CONNECTAT = 0x200010000000400 CAP_CREATE = 0x200000000000040 CAP_EVENT = 0x400000000000020 CAP_EXTATTR_DELETE = 0x400000000001000 CAP_EXTATTR_GET = 0x400000000002000 CAP_EXTATTR_LIST = 0x400000000004000 CAP_EXTATTR_SET = 0x400000000008000 CAP_FCHDIR = 0x200000000000800 CAP_FCHFLAGS = 0x200000000001000 CAP_FCHMOD = 0x200000000002000 CAP_FCHMODAT = 0x200000000002400 CAP_FCHOWN = 0x200000000004000 CAP_FCHOWNAT = 0x200000000004400 CAP_FCNTL = 0x200000000008000 CAP_FCNTL_ALL = 0x78 CAP_FCNTL_GETFL = 0x8 CAP_FCNTL_GETOWN = 0x20 CAP_FCNTL_SETFL = 0x10 CAP_FCNTL_SETOWN = 0x40 CAP_FEXECVE = 0x200000000000080 CAP_FLOCK = 0x200000000010000 CAP_FPATHCONF = 0x200000000020000 CAP_FSCK = 0x200000000040000 CAP_FSTAT = 0x200000000080000 CAP_FSTATAT = 0x200000000080400 CAP_FSTATFS = 0x200000000100000 CAP_FSYNC = 0x200000000000100 CAP_FTRUNCATE = 0x200000000000200 CAP_FUTIMES = 0x200000000200000 CAP_FUTIMESAT = 0x200000000200400 CAP_GETPEERNAME = 0x200000100000000 CAP_GETSOCKNAME = 0x200000200000000 CAP_GETSOCKOPT = 0x200000400000000 CAP_IOCTL = 0x400000000000080 CAP_IOCTLS_ALL = 0x7fffffffffffffff CAP_KQUEUE = 0x400000000100040 CAP_KQUEUE_CHANGE = 0x400000000100000 CAP_KQUEUE_EVENT = 0x400000000000040 CAP_LINKAT_SOURCE = 0x200020000000400 CAP_LINKAT_TARGET = 0x200000000400400 CAP_LISTEN = 0x200000800000000 CAP_LOOKUP = 0x200000000000400 CAP_MAC_GET = 0x400000000000001 CAP_MAC_SET = 0x400000000000002 CAP_MKDIRAT = 0x200000000800400 CAP_MKFIFOAT = 0x200000001000400 CAP_MKNODAT = 0x200000002000400 CAP_MMAP = 0x200000000000010 CAP_MMAP_R = 0x20000000000001d CAP_MMAP_RW = 0x20000000000001f CAP_MMAP_RWX = 0x20000000000003f CAP_MMAP_RX = 0x20000000000003d CAP_MMAP_W = 0x20000000000001e CAP_MMAP_WX = 0x20000000000003e CAP_MMAP_X = 0x20000000000003c CAP_PDGETPID = 0x400000000000200 CAP_PDKILL = 0x400000000000800 CAP_PDWAIT = 0x400000000000400 CAP_PEELOFF = 0x200001000000000 CAP_POLL_EVENT = 0x400000000000020 CAP_PREAD = 0x20000000000000d CAP_PWRITE = 0x20000000000000e CAP_READ = 0x200000000000001 CAP_RECV = 0x200000000000001 CAP_RENAMEAT_SOURCE = 0x200000004000400 CAP_RENAMEAT_TARGET = 0x200040000000400 CAP_RIGHTS_VERSION = 0x0 CAP_RIGHTS_VERSION_00 = 0x0 CAP_SEEK = 0x20000000000000c CAP_SEEK_TELL = 0x200000000000004 CAP_SEM_GETVALUE = 0x400000000000004 CAP_SEM_POST = 0x400000000000008 CAP_SEM_WAIT = 0x400000000000010 CAP_SEND = 0x200000000000002 CAP_SETSOCKOPT = 0x200002000000000 CAP_SHUTDOWN = 0x200004000000000 CAP_SOCK_CLIENT = 0x200007780000003 CAP_SOCK_SERVER = 0x200007f60000003 CAP_SYMLINKAT = 0x200000008000400 CAP_TTYHOOK = 0x400000000000100 CAP_UNLINKAT = 0x200000010000400 CAP_UNUSED0_44 = 0x200080000000000 CAP_UNUSED0_57 = 0x300000000000000 CAP_UNUSED1_22 = 0x400000000200000 CAP_UNUSED1_57 = 0x500000000000000 CAP_WRITE = 0x200000000000002 CFLUSH = 0xf CLOCAL = 0x8000 CLOCK_BOOTTIME = 0x5 CLOCK_MONOTONIC = 0x4 CLOCK_MONOTONIC_COARSE = 0xc CLOCK_MONOTONIC_FAST = 0xc CLOCK_MONOTONIC_PRECISE = 0xb CLOCK_PROCESS_CPUTIME_ID = 0xf CLOCK_PROF = 0x2 CLOCK_REALTIME = 0x0 CLOCK_REALTIME_COARSE = 0xa 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 CPUSTATES = 0x5 CP_IDLE = 0x4 CP_INTR = 0x3 CP_NICE = 0x1 CP_SYS = 0x2 CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x30000 CS5 = 0x0 CS6 = 0x100 CS7 = 0x200 CS8 = 0x300 CSIZE = 0x300 CSTART = 0x11 CSTATUS = 0x14 CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a CTL_HW = 0x6 CTL_KERN = 0x1 CTL_MAXNAME = 0x18 CTL_NET = 0x4 DIOCGATTR = 0xc148648e DIOCGDELETE = 0x80106488 DIOCGFLUSH = 0x20006487 DIOCGFWHEADS = 0x40046483 DIOCGFWSECTORS = 0x40046482 DIOCGIDENT = 0x41006489 DIOCGKERNELDUMP = 0xc0986492 DIOCGMEDIASIZE = 0x40086481 DIOCGPHYSPATH = 0x4400648d DIOCGPROVIDERNAME = 0x4400648a DIOCGSECTORSIZE = 0x40046480 DIOCGSTRIPEOFFSET = 0x4008648c DIOCGSTRIPESIZE = 0x4008648b DIOCSKERNELDUMP = 0x80986491 DIOCSKERNELDUMP_FREEBSD11 = 0x80046485 DIOCSKERNELDUMP_FREEBSD12 = 0x80506490 DIOCZONECMD = 0xc080648f 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_BREDR_BB = 0xff DLT_BLUETOOTH_HCI_H4 = 0xbb DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 DLT_BLUETOOTH_LE_LL = 0xfb DLT_BLUETOOTH_LE_LL_WITH_PHDR = 0x100 DLT_BLUETOOTH_LINUX_MONITOR = 0xfe DLT_CAN20B = 0xbe DLT_CAN_SOCKETCAN = 0xe3 DLT_CHAOS = 0x5 DLT_CHDLC = 0x68 DLT_CISCO_IOS = 0x76 DLT_CLASS_NETBSD_RAWAF = 0x2240000 DLT_C_HDLC = 0x68 DLT_C_HDLC_WITH_DIR = 0xcd DLT_DBUS = 0xe7 DLT_DECT = 0xdd DLT_DISPLAYPORT_AUX = 0x113 DLT_DOCSIS = 0x8f DLT_DOCSIS31_XRA31 = 0x111 DLT_DVB_CI = 0xeb DLT_ECONET = 0x73 DLT_EN10MB = 0x1 DLT_EN3MB = 0x2 DLT_ENC = 0x6d DLT_EPON = 0x103 DLT_ERF = 0xc5 DLT_ERF_ETH = 0xaf DLT_ERF_POS = 0xb0 DLT_ETHERNET_MPACKET = 0x112 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_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_INFINIBAND = 0xf7 DLT_IPFILTER = 0x74 DLT_IPMB_KONTRON = 0xc7 DLT_IPMB_LINUX = 0xd1 DLT_IPMI_HPM_2 = 0x104 DLT_IPNET = 0xe2 DLT_IPOIB = 0xf2 DLT_IPV4 = 0xe4 DLT_IPV6 = 0xe5 DLT_IP_OVER_FC = 0x7a DLT_ISO_14443 = 0x108 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_LINUX_SLL2 = 0x114 DLT_LOOP = 0x6c DLT_LORATAP = 0x10e DLT_LTALK = 0x72 DLT_MATCHING_MAX = 0x114 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_NETLINK = 0xfd DLT_NFC_LLCP = 0xf5 DLT_NFLOG = 0xef DLT_NG40 = 0xf4 DLT_NORDIC_BLE = 0x110 DLT_NULL = 0x0 DLT_OPENFLOW = 0x10b DLT_PCI_EXP = 0x7d DLT_PFLOG = 0x75 DLT_PFSYNC = 0x79 DLT_PKTAP = 0x102 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_PPP_WITH_DIRECTION = 0xa6 DLT_PRISM_HEADER = 0x77 DLT_PROFIBUS_DL = 0x101 DLT_PRONET = 0x4 DLT_RAIF1 = 0xc6 DLT_RAW = 0xc DLT_RDS = 0x109 DLT_REDBACK_SMARTEDGE = 0x20 DLT_RIO = 0x7c DLT_RTAC_SERIAL = 0xfa DLT_SCCP = 0x8e DLT_SCTP = 0xf8 DLT_SDLC = 0x10c DLT_SITA = 0xc4 DLT_SLIP = 0x8 DLT_SLIP_BSDOS = 0xd DLT_STANAG_5066_D_PDU = 0xed DLT_SUNATM = 0x7b DLT_SYMANTEC_FIREWALL = 0x63 DLT_TI_LLN_SNIFFER = 0x10d DLT_TZSP = 0x80 DLT_USB = 0xba DLT_USBPCAP = 0xf9 DLT_USB_DARWIN = 0x10a DLT_USB_FREEBSD = 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_VSOCK = 0x10f DLT_WATTSTOPPER_DLM = 0x107 DLT_WIHART = 0xdf DLT_WIRESHARK_UPPER_PDU = 0xfc DLT_X2E_SERIAL = 0xd5 DLT_X2E_XORAYA = 0xd6 DLT_ZWAVE_R1_R2 = 0x105 DLT_ZWAVE_R3 = 0x106 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 EHE_DEAD_PRIORITY = -0x1 EVFILT_AIO = -0x3 EVFILT_EMPTY = -0xd EVFILT_FS = -0x9 EVFILT_LIO = -0xa EVFILT_PROC = -0x5 EVFILT_PROCDESC = -0x8 EVFILT_READ = -0x1 EVFILT_SENDFILE = -0xc EVFILT_SIGNAL = -0x6 EVFILT_SYSCOUNT = 0xd EVFILT_TIMER = -0x7 EVFILT_USER = -0xb EVFILT_VNODE = -0x4 EVFILT_WRITE = -0x2 EVNAMEMAP_NAME_SIZE = 0x40 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_FLAG2 = 0x4000 EV_FORCEONESHOT = 0x100 EV_ONESHOT = 0x10 EV_RECEIPT = 0x40 EV_SYSFLAGS = 0xf000 EXTA = 0x4b00 EXTATTR_MAXNAMELEN = 0xff EXTATTR_NAMESPACE_EMPTY = 0x0 EXTATTR_NAMESPACE_SYSTEM = 0x2 EXTATTR_NAMESPACE_USER = 0x1 EXTB = 0x9600 EXTPROC = 0x800 FD_CLOEXEC = 0x1 FD_NONE = -0xc8 FD_SETSIZE = 0x400 FLUSHO = 0x800000 F_ADD_SEALS = 0x13 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_GET_SEALS = 0x14 F_ISUNIONSTACK = 0x15 F_KINFO = 0x16 F_OGETLK = 0x7 F_OK = 0x0 F_OSETLK = 0x8 F_OSETLKW = 0x9 F_RDAHEAD = 0x10 F_RDLCK = 0x1 F_READAHEAD = 0xf F_SEAL_GROW = 0x4 F_SEAL_SEAL = 0x1 F_SEAL_SHRINK = 0x2 F_SEAL_WRITE = 0x8 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 HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 IEXTEN = 0x400 IFAN_ARRIVAL = 0x0 IFAN_DEPARTURE = 0x1 IFCAP_WOL_MAGIC = 0x2000 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_KNOWSEPOCH = 0x20 IFF_LINK0 = 0x1000 IFF_LINK1 = 0x2000 IFF_LINK2 = 0x4000 IFF_LOOPBACK = 0x8 IFF_MONITOR = 0x40000 IFF_MULTICAST = 0x8000 IFF_NOARP = 0x80 IFF_NOGROUP = 0x800000 IFF_OACTIVE = 0x400 IFF_POINTOPOINT = 0x10 IFF_PPROMISC = 0x20000 IFF_PROMISC = 0x100 IFF_RENAMING = 0x400000 IFF_RUNNING = 0x40 IFF_SIMPLEX = 0x800 IFF_STATICARP = 0x80000 IFF_UP = 0x1 IFNAMSIZ = 0x10 IFT_BRIDGE = 0xd1 IFT_CARP = 0xf8 IFT_IEEE1394 = 0x90 IFT_INFINIBAND = 0xc7 IFT_L2VLAN = 0x87 IFT_L3IPVLAN = 0x88 IFT_PPP = 0x17 IFT_PROPVIRTUAL = 0x35 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_NETMASK_DEFAULT = 0xffffff00 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_DCCP = 0x21 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_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_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_BINDMULTI = 0x41 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_FLOWID = 0x43 IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_LEN = 0x14 IPV6_FLOWLABEL_MASK = 0xffff0f00 IPV6_FLOWTYPE = 0x44 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_MMTU = 0x500 IPV6_MSFILTER = 0x4a IPV6_MULTICAST_HOPS = 0xa IPV6_MULTICAST_IF = 0x9 IPV6_MULTICAST_LOOP = 0xb IPV6_NEXTHOP = 0x30 IPV6_ORIGDSTADDR = 0x48 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_RECVFLOWID = 0x46 IPV6_RECVHOPLIMIT = 0x25 IPV6_RECVHOPOPTS = 0x27 IPV6_RECVORIGDSTADDR = 0x48 IPV6_RECVPATHMTU = 0x2b IPV6_RECVPKTINFO = 0x24 IPV6_RECVRSSBUCKETID = 0x47 IPV6_RECVRTHDR = 0x26 IPV6_RECVTCLASS = 0x39 IPV6_RSSBUCKETID = 0x45 IPV6_RSS_LISTEN_BUCKET = 0x42 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 IPV6_VLAN_PCP = 0x4b IP_ADD_MEMBERSHIP = 0xc IP_ADD_SOURCE_MEMBERSHIP = 0x46 IP_BINDANY = 0x18 IP_BINDMULTI = 0x19 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_FLOWID = 0x5a IP_FLOWTYPE = 0x5b 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_MF = 0x2000 IP_MINTTL = 0x42 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_ORIGDSTADDR = 0x1b IP_PORTRANGE = 0x13 IP_PORTRANGE_DEFAULT = 0x0 IP_PORTRANGE_HIGH = 0x1 IP_PORTRANGE_LOW = 0x2 IP_RECVDSTADDR = 0x7 IP_RECVFLOWID = 0x5d IP_RECVIF = 0x14 IP_RECVOPTS = 0x5 IP_RECVORIGDSTADDR = 0x1b IP_RECVRETOPTS = 0x6 IP_RECVRSSBUCKETID = 0x5e IP_RECVTOS = 0x44 IP_RECVTTL = 0x41 IP_RETOPTS = 0x8 IP_RF = 0x8000 IP_RSSBUCKETID = 0x5c IP_RSS_LISTEN_BUCKET = 0x1a 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 IP_VLAN_PCP = 0x4b ISIG = 0x80 ISTRIP = 0x20 ITIMER_PROF = 0x2 ITIMER_REAL = 0x0 ITIMER_VIRTUAL = 0x1 IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 KERN_HOSTNAME = 0xa KERN_OSRELEASE = 0x2 KERN_OSTYPE = 0x1 KERN_VERSION = 0x4 LOCAL_CONNWAIT = 0x4 LOCAL_CREDS = 0x2 LOCAL_CREDS_PERSISTENT = 0x3 LOCAL_PEERCRED = 0x1 LOCAL_VENDOR = 0x80000000 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_GUARD = 0x2000 MAP_HASSEMAPHORE = 0x200 MAP_NOCORE = 0x20000 MAP_NOSYNC = 0x800 MAP_PREFAULT_READ = 0x40000 MAP_PRIVATE = 0x2 MAP_RESERVED0020 = 0x20 MAP_RESERVED0040 = 0x40 MAP_RESERVED0080 = 0x80 MAP_RESERVED0100 = 0x100 MAP_SHARED = 0x1 MAP_STACK = 0x400 MCAST_BLOCK_SOURCE = 0x54 MCAST_EXCLUDE = 0x2 MCAST_INCLUDE = 0x1 MCAST_JOIN_GROUP = 0x50 MCAST_JOIN_SOURCE_GROUP = 0x52 MCAST_LEAVE_GROUP = 0x51 MCAST_LEAVE_SOURCE_GROUP = 0x53 MCAST_UNBLOCK_SOURCE = 0x55 MCAST_UNDEFINED = 0x0 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MFD_ALLOW_SEALING = 0x2 MFD_CLOEXEC = 0x1 MFD_HUGETLB = 0x4 MFD_HUGE_16GB = -0x78000000 MFD_HUGE_16MB = 0x60000000 MFD_HUGE_1GB = 0x78000000 MFD_HUGE_1MB = 0x50000000 MFD_HUGE_256MB = 0x70000000 MFD_HUGE_2GB = 0x7c000000 MFD_HUGE_2MB = 0x54000000 MFD_HUGE_32MB = 0x64000000 MFD_HUGE_512KB = 0x4c000000 MFD_HUGE_512MB = 0x74000000 MFD_HUGE_64KB = 0x40000000 MFD_HUGE_8MB = 0x5c000000 MFD_HUGE_MASK = 0xfc000000 MFD_HUGE_SHIFT = 0x1a MNT_ACLS = 0x8000000 MNT_ASYNC = 0x40 MNT_AUTOMOUNTED = 0x200000000 MNT_BYFSID = 0x8000000 MNT_CMDFLAGS = 0x300d0f0000 MNT_DEFEXPORTED = 0x200 MNT_DELEXPORT = 0x20000 MNT_EMPTYDIR = 0x2000000000 MNT_EXKERB = 0x800 MNT_EXPORTANON = 0x400 MNT_EXPORTED = 0x100 MNT_EXPUBLIC = 0x20000000 MNT_EXRDONLY = 0x80 MNT_EXTLS = 0x4000000000 MNT_EXTLSCERT = 0x8000000000 MNT_EXTLSCERTUSER = 0x10000000000 MNT_FORCE = 0x80000 MNT_GJOURNAL = 0x2000000 MNT_IGNORE = 0x800000 MNT_LAZY = 0x3 MNT_LOCAL = 0x1000 MNT_MULTILABEL = 0x4000000 MNT_NFS4ACLS = 0x10 MNT_NOATIME = 0x10000000 MNT_NOCLUSTERR = 0x40000000 MNT_NOCLUSTERW = 0x80000000 MNT_NOCOVER = 0x1000000000 MNT_NOEXEC = 0x4 MNT_NONBUSY = 0x4000000 MNT_NOSUID = 0x8 MNT_NOSYMFOLLOW = 0x400000 MNT_NOWAIT = 0x2 MNT_QUOTA = 0x2000 MNT_RDONLY = 0x1 MNT_RELOAD = 0x40000 MNT_ROOTFS = 0x4000 MNT_SNAPSHOT = 0x1000000 MNT_SOFTDEP = 0x200000 MNT_SUIDDIR = 0x100000 MNT_SUJ = 0x100000000 MNT_SUSPEND = 0x4 MNT_SYNCHRONOUS = 0x2 MNT_UNION = 0x20 MNT_UNTRUSTED = 0x800000000 MNT_UPDATE = 0x10000 MNT_UPDATEMASK = 0xad8d0807e MNT_USER = 0x8000 MNT_VERIFIED = 0x400000000 MNT_VISFLAGMASK = 0xffef0ffff MNT_WAIT = 0x1 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 MSG_WAITFORONE = 0x80000 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_NHGRP = 0x7 NET_RT_NHOP = 0x6 NFDBITS = 0x40 NOFLSH = 0x80000000 NOKERNINFO = 0x2000000 NOTE_ABSTIME = 0x10 NOTE_ATTRIB = 0x8 NOTE_CHILD = 0x4 NOTE_CLOSE = 0x100 NOTE_CLOSE_WRITE = 0x200 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_FILE_POLL = 0x2 NOTE_FORK = 0x40000000 NOTE_LINK = 0x10 NOTE_LOWAT = 0x1 NOTE_MSECONDS = 0x2 NOTE_NSECONDS = 0x8 NOTE_OPEN = 0x80 NOTE_PCTRLMASK = 0xf0000000 NOTE_PDATAMASK = 0xfffff NOTE_READ = 0x400 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 OXTABS = 0x4 O_ACCMODE = 0x3 O_APPEND = 0x8 O_ASYNC = 0x40 O_CLOEXEC = 0x100000 O_CREAT = 0x200 O_DIRECT = 0x10000 O_DIRECTORY = 0x20000 O_DSYNC = 0x1000000 O_EMPTY_PATH = 0x2000000 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_PATH = 0x400000 O_RDONLY = 0x0 O_RDWR = 0x2 O_RESOLVE_BENEATH = 0x800000 O_SEARCH = 0x40000 O_SHLOCK = 0x10 O_SYNC = 0x80 O_TRUNC = 0x400 O_TTY_INIT = 0x80000 O_VERIFY = 0x200000 O_WRONLY = 0x1 PARENB = 0x1000 PARMRK = 0x8 PARODD = 0x2000 PENDIN = 0x20000000 PIOD_READ_D = 0x1 PIOD_READ_I = 0x3 PIOD_WRITE_D = 0x2 PIOD_WRITE_I = 0x4 PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 PROT_EXEC = 0x4 PROT_NONE = 0x0 PROT_READ = 0x1 PROT_WRITE = 0x2 PTRACE_DEFAULT = 0x1 PTRACE_EXEC = 0x1 PTRACE_FORK = 0x8 PTRACE_LWP = 0x10 PTRACE_SCE = 0x2 PTRACE_SCX = 0x4 PTRACE_SYSCALL = 0x6 PTRACE_VFORK = 0x20 PT_ATTACH = 0xa PT_CLEARSTEP = 0x10 PT_CONTINUE = 0x7 PT_COREDUMP = 0x1d PT_DETACH = 0xb PT_FIRSTMACH = 0x40 PT_FOLLOW_FORK = 0x17 PT_GETDBREGS = 0x25 PT_GETFPREGS = 0x23 PT_GETLWPLIST = 0xf PT_GETNUMLWPS = 0xe PT_GETREGS = 0x21 PT_GET_EVENT_MASK = 0x19 PT_GET_SC_ARGS = 0x1b PT_GET_SC_RET = 0x1c PT_IO = 0xc PT_KILL = 0x8 PT_LWPINFO = 0xd PT_LWP_EVENTS = 0x18 PT_READ_D = 0x2 PT_READ_I = 0x1 PT_RESUME = 0x13 PT_SETDBREGS = 0x26 PT_SETFPREGS = 0x24 PT_SETREGS = 0x22 PT_SETSTEP = 0x11 PT_SET_EVENT_MASK = 0x1a PT_STEP = 0x9 PT_SUSPEND = 0x12 PT_SYSCALL = 0x16 PT_TO_SCE = 0x14 PT_TO_SCX = 0x15 PT_TRACE_ME = 0x0 PT_VM_ENTRY = 0x29 PT_VM_TIMESTAMP = 0x28 PT_WRITE_D = 0x5 PT_WRITE_I = 0x4 P_ZONEID = 0xc RLIMIT_AS = 0xa RLIMIT_CORE = 0x4 RLIMIT_CPU = 0x0 RLIMIT_DATA = 0x2 RLIMIT_FSIZE = 0x1 RLIMIT_MEMLOCK = 0x6 RLIMIT_NOFILE = 0x8 RLIMIT_NPROC = 0x7 RLIMIT_RSS = 0x5 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_FIXEDMTU = 0x80000 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_PROTO1 = 0x8000 RTF_PROTO2 = 0x4000 RTF_PROTO3 = 0x40000 RTF_REJECT = 0x8 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_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_BLACKHOLE = 0x40 RT_DEFAULT_FIB = 0x0 RT_DEFAULT_WEIGHT = 0x1 RT_HAS_GW = 0x80 RT_HAS_HEADER = 0x10 RT_HAS_HEADER_BIT = 0x4 RT_L2_ME = 0x4 RT_L2_ME_BIT = 0x2 RT_LLE_CACHE = 0x100 RT_MAX_WEIGHT = 0xffffff RT_MAY_LOOP = 0x8 RT_MAY_LOOP_BIT = 0x3 RT_REJECT = 0x20 RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 RUSAGE_THREAD = 0x1 SCM_BINTIME = 0x4 SCM_CREDS = 0x3 SCM_CREDS2 = 0x8 SCM_MONOTONIC = 0x6 SCM_REALTIME = 0x5 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x2 SCM_TIME_INFO = 0x7 SEEK_CUR = 0x1 SEEK_DATA = 0x3 SEEK_END = 0x2 SEEK_HOLE = 0x4 SEEK_SET = 0x0 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 SIOCADDMULTI = 0x80206931 SIOCAIFADDR = 0x8040691a SIOCAIFGROUP = 0x80286987 SIOCATMARK = 0x40047307 SIOCDELMULTI = 0x80206932 SIOCDIFADDR = 0x80206919 SIOCDIFGROUP = 0x80286989 SIOCDIFPHYADDR = 0x80206949 SIOCGDRVSPEC = 0xc028697b SIOCGETSGCNT = 0xc0207210 SIOCGETVIFCNT = 0xc028720f SIOCGHIWAT = 0x40047301 SIOCGHWADDR = 0xc020693e SIOCGI2C = 0xc020693d SIOCGIFADDR = 0xc0206921 SIOCGIFALIAS = 0xc044692d SIOCGIFBRDADDR = 0xc0206923 SIOCGIFCAP = 0xc020691f SIOCGIFCONF = 0xc0106924 SIOCGIFDATA = 0x8020692c SIOCGIFDESCR = 0xc020692a SIOCGIFDOWNREASON = 0xc058699a 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 SIOCGIFRSSHASH = 0xc0186997 SIOCGIFRSSKEY = 0xc0946996 SIOCGIFSTATUS = 0xc331693b SIOCGIFXMEDIA = 0xc030698b SIOCGLANPCP = 0xc0206998 SIOCGLOWAT = 0x40047303 SIOCGPGRP = 0x40047309 SIOCGPRIVATE_0 = 0xc0206950 SIOCGPRIVATE_1 = 0xc0206951 SIOCGTUNFIB = 0xc020695e 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 SIOCSLANPCP = 0x80206999 SIOCSLOWAT = 0x80047302 SIOCSPGRP = 0x80047308 SIOCSTUNFIB = 0x8020695f 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_LOCAL = 0x0 SOL_SOCKET = 0xffff SOMAXCONN = 0x80 SO_ACCEPTCONN = 0x2 SO_ACCEPTFILTER = 0x1000 SO_BINTIME = 0x2000 SO_BROADCAST = 0x20 SO_DEBUG = 0x1 SO_DOMAIN = 0x1019 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_MAX_PACING_RATE = 0x1018 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_RERROR = 0x20000 SO_REUSEADDR = 0x4 SO_REUSEPORT = 0x200 SO_REUSEPORT_LB = 0x10000 SO_SETFIB = 0x1014 SO_SNDBUF = 0x1001 SO_SNDLOWAT = 0x1003 SO_SNDTIMEO = 0x1005 SO_TIMESTAMP = 0x400 SO_TS_BINTIME = 0x1 SO_TS_CLOCK = 0x1017 SO_TS_CLOCK_MAX = 0x3 SO_TS_DEFAULT = 0x0 SO_TS_MONOTONIC = 0x3 SO_TS_REALTIME = 0x2 SO_TS_REALTIME_MICRO = 0x0 SO_TYPE = 0x1008 SO_USELOOPBACK = 0x40 SO_USER_COOKIE = 0x1015 SO_VENDOR = 0x80000000 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 TAB0 = 0x0 TAB3 = 0x4 TABDLY = 0x4 TCIFLUSH = 0x1 TCIOFF = 0x3 TCIOFLUSH = 0x3 TCION = 0x4 TCOFLUSH = 0x2 TCOOFF = 0x1 TCOON = 0x2 TCPOPT_EOL = 0x0 TCPOPT_FAST_OPEN = 0x22 TCPOPT_MAXSEG = 0x2 TCPOPT_NOP = 0x1 TCPOPT_PAD = 0x0 TCPOPT_SACK = 0x5 TCPOPT_SACK_PERMITTED = 0x4 TCPOPT_SIGNATURE = 0x13 TCPOPT_TIMESTAMP = 0x8 TCPOPT_WINDOW = 0x3 TCP_BBR_ACK_COMP_ALG = 0x448 TCP_BBR_ALGORITHM = 0x43b TCP_BBR_DRAIN_INC_EXTRA = 0x43c TCP_BBR_DRAIN_PG = 0x42e TCP_BBR_EXTRA_GAIN = 0x449 TCP_BBR_EXTRA_STATE = 0x453 TCP_BBR_FLOOR_MIN_TSO = 0x454 TCP_BBR_HDWR_PACE = 0x451 TCP_BBR_HOLD_TARGET = 0x436 TCP_BBR_IWINTSO = 0x42b TCP_BBR_LOWGAIN_FD = 0x436 TCP_BBR_LOWGAIN_HALF = 0x435 TCP_BBR_LOWGAIN_THRESH = 0x434 TCP_BBR_MAX_RTO = 0x439 TCP_BBR_MIN_RTO = 0x438 TCP_BBR_MIN_TOPACEOUT = 0x455 TCP_BBR_ONE_RETRAN = 0x431 TCP_BBR_PACE_CROSS = 0x442 TCP_BBR_PACE_DEL_TAR = 0x43f TCP_BBR_PACE_OH = 0x435 TCP_BBR_PACE_PER_SEC = 0x43e TCP_BBR_PACE_SEG_MAX = 0x440 TCP_BBR_PACE_SEG_MIN = 0x441 TCP_BBR_POLICER_DETECT = 0x457 TCP_BBR_PROBE_RTT_GAIN = 0x44d TCP_BBR_PROBE_RTT_INT = 0x430 TCP_BBR_PROBE_RTT_LEN = 0x44e TCP_BBR_RACK_INIT_RATE = 0x458 TCP_BBR_RACK_RTT_USE = 0x44a TCP_BBR_RECFORCE = 0x42c TCP_BBR_REC_OVER_HPTS = 0x43a TCP_BBR_RETRAN_WTSO = 0x44b TCP_BBR_RWND_IS_APP = 0x42f TCP_BBR_SEND_IWND_IN_TSO = 0x44f TCP_BBR_STARTUP_EXIT_EPOCH = 0x43d TCP_BBR_STARTUP_LOSS_EXIT = 0x432 TCP_BBR_STARTUP_PG = 0x42d TCP_BBR_TMR_PACE_OH = 0x448 TCP_BBR_TSLIMITS = 0x434 TCP_BBR_TSTMP_RAISES = 0x456 TCP_BBR_UNLIMITED = 0x43b TCP_BBR_USEDEL_RATE = 0x437 TCP_BBR_USE_LOWGAIN = 0x433 TCP_BBR_USE_RACK_CHEAT = 0x450 TCP_BBR_USE_RACK_RR = 0x450 TCP_BBR_UTTER_MAX_TSO = 0x452 TCP_CA_NAME_MAX = 0x10 TCP_CCALGOOPT = 0x41 TCP_CONGESTION = 0x40 TCP_DATA_AFTER_CLOSE = 0x44c TCP_DEFER_OPTIONS = 0x470 TCP_DELACK = 0x48 TCP_FASTOPEN = 0x401 TCP_FASTOPEN_MAX_COOKIE_LEN = 0x10 TCP_FASTOPEN_MIN_COOKIE_LEN = 0x4 TCP_FASTOPEN_PSK_LEN = 0x10 TCP_FAST_RSM_HACK = 0x471 TCP_FIN_IS_RST = 0x49 TCP_FUNCTION_BLK = 0x2000 TCP_FUNCTION_NAME_LEN_MAX = 0x20 TCP_HDWR_RATE_CAP = 0x46a TCP_HDWR_UP_ONLY = 0x46c TCP_IDLE_REDUCE = 0x46 TCP_INFO = 0x20 TCP_IWND_NB = 0x2b TCP_IWND_NSEG = 0x2c TCP_KEEPCNT = 0x400 TCP_KEEPIDLE = 0x100 TCP_KEEPINIT = 0x80 TCP_KEEPINTVL = 0x200 TCP_LOG = 0x22 TCP_LOGBUF = 0x23 TCP_LOGDUMP = 0x25 TCP_LOGDUMPID = 0x26 TCP_LOGID = 0x24 TCP_LOGID_CNT = 0x2e TCP_LOG_ID_LEN = 0x40 TCP_LOG_LIMIT = 0x4a TCP_LOG_TAG = 0x2f TCP_MAXBURST = 0x4 TCP_MAXHLEN = 0x3c TCP_MAXOLEN = 0x28 TCP_MAXPEAKRATE = 0x45 TCP_MAXSEG = 0x2 TCP_MAXUNACKTIME = 0x44 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_NO_PRR = 0x462 TCP_PACING_RATE_CAP = 0x46b TCP_PCAP_IN = 0x1000 TCP_PCAP_OUT = 0x800 TCP_PERF_INFO = 0x4e TCP_PROC_ACCOUNTING = 0x4c TCP_RACK_ABC_VAL = 0x46d TCP_RACK_CHEAT_NOT_CONF_RATE = 0x459 TCP_RACK_DO_DETECTION = 0x449 TCP_RACK_EARLY_RECOV = 0x423 TCP_RACK_EARLY_SEG = 0x424 TCP_RACK_FORCE_MSEG = 0x45d TCP_RACK_GP_INCREASE = 0x446 TCP_RACK_GP_INCREASE_CA = 0x45a TCP_RACK_GP_INCREASE_REC = 0x45c TCP_RACK_GP_INCREASE_SS = 0x45b TCP_RACK_IDLE_REDUCE_HIGH = 0x444 TCP_RACK_MBUF_QUEUE = 0x41a TCP_RACK_MEASURE_CNT = 0x46f TCP_RACK_MIN_PACE = 0x445 TCP_RACK_MIN_PACE_SEG = 0x446 TCP_RACK_MIN_TO = 0x422 TCP_RACK_NONRXT_CFG_RATE = 0x463 TCP_RACK_NO_PUSH_AT_MAX = 0x466 TCP_RACK_PACE_ALWAYS = 0x41f TCP_RACK_PACE_MAX_SEG = 0x41e TCP_RACK_PACE_RATE_CA = 0x45e TCP_RACK_PACE_RATE_REC = 0x460 TCP_RACK_PACE_RATE_SS = 0x45f TCP_RACK_PACE_REDUCE = 0x41d TCP_RACK_PACE_TO_FILL = 0x467 TCP_RACK_PACING_BETA = 0x472 TCP_RACK_PACING_BETA_ECN = 0x473 TCP_RACK_PKT_DELAY = 0x428 TCP_RACK_PROFILE = 0x469 TCP_RACK_PROP = 0x41b TCP_RACK_PROP_RATE = 0x420 TCP_RACK_PRR_SENDALOT = 0x421 TCP_RACK_REORD_FADE = 0x426 TCP_RACK_REORD_THRESH = 0x425 TCP_RACK_RR_CONF = 0x459 TCP_RACK_TIMER_SLOP = 0x474 TCP_RACK_TLP_INC_VAR = 0x429 TCP_RACK_TLP_REDUCE = 0x41c TCP_RACK_TLP_THRESH = 0x427 TCP_RACK_TLP_USE = 0x447 TCP_REC_ABC_VAL = 0x46e TCP_REMOTE_UDP_ENCAPS_PORT = 0x47 TCP_REUSPORT_LB_NUMA = 0x402 TCP_REUSPORT_LB_NUMA_CURDOM = -0x1 TCP_REUSPORT_LB_NUMA_NODOM = -0x2 TCP_RXTLS_ENABLE = 0x29 TCP_RXTLS_MODE = 0x2a TCP_SHARED_CWND_ALLOWED = 0x4b TCP_SHARED_CWND_ENABLE = 0x464 TCP_SHARED_CWND_TIME_LIMIT = 0x468 TCP_STATS = 0x21 TCP_TIMELY_DYN_ADJ = 0x465 TCP_TLS_MODE_IFNET = 0x2 TCP_TLS_MODE_NONE = 0x0 TCP_TLS_MODE_SW = 0x1 TCP_TLS_MODE_TOE = 0x3 TCP_TXTLS_ENABLE = 0x27 TCP_TXTLS_MODE = 0x28 TCP_USER_LOG = 0x30 TCP_USE_CMP_ACKS = 0x4d TCP_VENDOR = 0x80000000 TCSAFLUSH = 0x2 TIMER_ABSTIME = 0x1 TIMER_RELTIME = 0x0 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 UTIME_NOW = -0x1 UTIME_OMIT = -0x2 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) EINTEGRITY = syscall.Errno(0x61) EINTR = syscall.Errno(0x4) EINVAL = syscall.Errno(0x16) EIO = syscall.Errno(0x5) EISCONN = syscall.Errno(0x38) EISDIR = syscall.Errno(0x15) ELAST = syscall.Errno(0x61) 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "device not configured"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EDEADLK", "resource deadlock avoided"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "cross-device link"}, {19, "ENODEV", "operation not supported by device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "result too large"}, {35, "EWOULDBLOCK", "resource temporarily unavailable"}, {36, "EINPROGRESS", "operation now in progress"}, {37, "EALREADY", "operation already in progress"}, {38, "ENOTSOCK", "socket operation on non-socket"}, {39, "EDESTADDRREQ", "destination address required"}, {40, "EMSGSIZE", "message too long"}, {41, "EPROTOTYPE", "protocol wrong type for socket"}, {42, "ENOPROTOOPT", "protocol not available"}, {43, "EPROTONOSUPPORT", "protocol not supported"}, {44, "ESOCKTNOSUPPORT", "socket type not supported"}, {45, "EOPNOTSUPP", "operation not supported"}, {46, "EPFNOSUPPORT", "protocol family not supported"}, {47, "EAFNOSUPPORT", "address family not supported by protocol family"}, {48, "EADDRINUSE", "address already in use"}, {49, "EADDRNOTAVAIL", "can't assign requested address"}, {50, "ENETDOWN", "network is down"}, {51, "ENETUNREACH", "network is unreachable"}, {52, "ENETRESET", "network dropped connection on reset"}, {53, "ECONNABORTED", "software caused connection abort"}, {54, "ECONNRESET", "connection reset by peer"}, {55, "ENOBUFS", "no buffer space available"}, {56, "EISCONN", "socket is already connected"}, {57, "ENOTCONN", "socket is not connected"}, {58, "ESHUTDOWN", "can't send after socket shutdown"}, {59, "ETOOMANYREFS", "too many references: can't splice"}, {60, "ETIMEDOUT", "operation timed out"}, {61, "ECONNREFUSED", "connection refused"}, {62, "ELOOP", "too many levels of symbolic links"}, {63, "ENAMETOOLONG", "file name too long"}, {64, "EHOSTDOWN", "host is down"}, {65, "EHOSTUNREACH", "no route to host"}, {66, "ENOTEMPTY", "directory not empty"}, {67, "EPROCLIM", "too many processes"}, {68, "EUSERS", "too many users"}, {69, "EDQUOT", "disc quota exceeded"}, {70, "ESTALE", "stale NFS file handle"}, {71, "EREMOTE", "too many levels of remote in path"}, {72, "EBADRPC", "RPC struct is bad"}, {73, "ERPCMISMATCH", "RPC version wrong"}, {74, "EPROGUNAVAIL", "RPC prog. not avail"}, {75, "EPROGMISMATCH", "program version wrong"}, {76, "EPROCUNAVAIL", "bad procedure for program"}, {77, "ENOLCK", "no locks available"}, {78, "ENOSYS", "function not implemented"}, {79, "EFTYPE", "inappropriate file type or format"}, {80, "EAUTH", "authentication error"}, {81, "ENEEDAUTH", "need authenticator"}, {82, "EIDRM", "identifier removed"}, {83, "ENOMSG", "no message of desired type"}, {84, "EOVERFLOW", "value too large to be stored in data type"}, {85, "ECANCELED", "operation canceled"}, {86, "EILSEQ", "illegal byte sequence"}, {87, "ENOATTR", "attribute not found"}, {88, "EDOOFUS", "programming error"}, {89, "EBADMSG", "bad message"}, {90, "EMULTIHOP", "multihop attempted"}, {91, "ENOLINK", "link has been severed"}, {92, "EPROTO", "protocol error"}, {93, "ENOTCAPABLE", "capabilities insufficient"}, {94, "ECAPMODE", "not permitted in capability mode"}, {95, "ENOTRECOVERABLE", "state not recoverable"}, {96, "EOWNERDEAD", "previous owner died"}, {97, "EINTEGRITY", "integrity check failed"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, {6, "SIGIOT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGURG", "urgent I/O condition"}, {17, "SIGSTOP", "suspended (signal)"}, {18, "SIGTSTP", "suspended"}, {19, "SIGCONT", "continued"}, {20, "SIGCHLD", "child exited"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGIO", "I/O possible"}, {24, "SIGXCPU", "cputime limit exceeded"}, {25, "SIGXFSZ", "filesize limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window size changes"}, {29, "SIGINFO", "information request"}, {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGTHR", "unknown signal"}, {33, "SIGLIBRT", "unknown signal"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_linux.go ================================================ // Code generated by mkmerge; DO NOT EDIT. //go:build linux package unix import "syscall" const ( AAFS_MAGIC = 0x5a3c69f0 ADFS_SUPER_MAGIC = 0xadf5 AFFS_SUPER_MAGIC = 0xadff AFS_FS_MAGIC = 0x6b414653 AFS_SUPER_MAGIC = 0x5346414f 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_IB = 0x1b AF_IEEE802154 = 0x24 AF_INET = 0x2 AF_INET6 = 0xa AF_IPX = 0x4 AF_IRDA = 0x17 AF_ISDN = 0x22 AF_IUCV = 0x20 AF_KCM = 0x29 AF_KEY = 0xf AF_LLC = 0x1a AF_LOCAL = 0x1 AF_MAX = 0x2e AF_MCTP = 0x2d AF_MPLS = 0x1c AF_NETBEUI = 0xd AF_NETLINK = 0x10 AF_NETROM = 0x6 AF_NFC = 0x27 AF_PACKET = 0x11 AF_PHONET = 0x23 AF_PPPOX = 0x18 AF_QIPCRTR = 0x2a AF_RDS = 0x15 AF_ROSE = 0xb AF_ROUTE = 0x10 AF_RXRPC = 0x21 AF_SECURITY = 0xe AF_SMC = 0x2b AF_SNA = 0x16 AF_TIPC = 0x1e AF_UNIX = 0x1 AF_UNSPEC = 0x0 AF_VSOCK = 0x28 AF_WANPIPE = 0x19 AF_X25 = 0x9 AF_XDP = 0x2c ALG_OP_DECRYPT = 0x0 ALG_OP_ENCRYPT = 0x1 ALG_SET_AEAD_ASSOCLEN = 0x4 ALG_SET_AEAD_AUTHSIZE = 0x5 ALG_SET_DRBG_ENTROPY = 0x6 ALG_SET_IV = 0x2 ALG_SET_KEY = 0x1 ALG_SET_KEY_BY_KEY_SERIAL = 0x7 ALG_SET_OP = 0x3 ANON_INODE_FS_MAGIC = 0x9041934 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_MCTP = 0x122 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_RAWIP = 0x207 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_VSOCKMON = 0x33a ARPHRD_X25 = 0x10f AUDIT_ADD = 0x3eb AUDIT_ADD_RULE = 0x3f3 AUDIT_ALWAYS = 0x2 AUDIT_ANOM_ABEND = 0x6a5 AUDIT_ANOM_CREAT = 0x6a7 AUDIT_ANOM_LINK = 0x6a6 AUDIT_ANOM_PROMISCUOUS = 0x6a4 AUDIT_ARCH = 0xb AUDIT_ARCH_AARCH64 = 0xc00000b7 AUDIT_ARCH_ALPHA = 0xc0009026 AUDIT_ARCH_ARCOMPACT = 0x4000005d AUDIT_ARCH_ARCOMPACTBE = 0x5d AUDIT_ARCH_ARCV2 = 0x400000c3 AUDIT_ARCH_ARCV2BE = 0xc3 AUDIT_ARCH_ARM = 0x40000028 AUDIT_ARCH_ARMEB = 0x28 AUDIT_ARCH_C6X = 0x4000008c AUDIT_ARCH_C6XBE = 0x8c AUDIT_ARCH_CRIS = 0x4000004c AUDIT_ARCH_CSKY = 0x400000fc AUDIT_ARCH_FRV = 0x5441 AUDIT_ARCH_H8300 = 0x2e AUDIT_ARCH_HEXAGON = 0xa4 AUDIT_ARCH_I386 = 0x40000003 AUDIT_ARCH_IA64 = 0xc0000032 AUDIT_ARCH_LOONGARCH32 = 0x40000102 AUDIT_ARCH_LOONGARCH64 = 0xc0000102 AUDIT_ARCH_M32R = 0x58 AUDIT_ARCH_M68K = 0x4 AUDIT_ARCH_MICROBLAZE = 0xbd AUDIT_ARCH_MIPS = 0x8 AUDIT_ARCH_MIPS64 = 0x80000008 AUDIT_ARCH_MIPS64N32 = 0xa0000008 AUDIT_ARCH_MIPSEL = 0x40000008 AUDIT_ARCH_MIPSEL64 = 0xc0000008 AUDIT_ARCH_MIPSEL64N32 = 0xe0000008 AUDIT_ARCH_NDS32 = 0x400000a7 AUDIT_ARCH_NDS32BE = 0xa7 AUDIT_ARCH_NIOS2 = 0x40000071 AUDIT_ARCH_OPENRISC = 0x5c AUDIT_ARCH_PARISC = 0xf AUDIT_ARCH_PARISC64 = 0x8000000f AUDIT_ARCH_PPC = 0x14 AUDIT_ARCH_PPC64 = 0x80000015 AUDIT_ARCH_PPC64LE = 0xc0000015 AUDIT_ARCH_RISCV32 = 0x400000f3 AUDIT_ARCH_RISCV64 = 0xc00000f3 AUDIT_ARCH_S390 = 0x16 AUDIT_ARCH_S390X = 0x80000016 AUDIT_ARCH_SH = 0x2a AUDIT_ARCH_SH64 = 0x8000002a AUDIT_ARCH_SHEL = 0x4000002a AUDIT_ARCH_SHEL64 = 0xc000002a AUDIT_ARCH_SPARC = 0x2 AUDIT_ARCH_SPARC64 = 0x8000002b AUDIT_ARCH_TILEGX = 0xc00000bf AUDIT_ARCH_TILEGX32 = 0x400000bf AUDIT_ARCH_TILEPRO = 0x400000bc AUDIT_ARCH_UNICORE = 0x4000006e AUDIT_ARCH_X86_64 = 0xc000003e AUDIT_ARCH_XTENSA = 0x5e AUDIT_ARG0 = 0xc8 AUDIT_ARG1 = 0xc9 AUDIT_ARG2 = 0xca AUDIT_ARG3 = 0xcb AUDIT_AVC = 0x578 AUDIT_AVC_PATH = 0x57a AUDIT_BITMASK_SIZE = 0x40 AUDIT_BIT_MASK = 0x8000000 AUDIT_BIT_TEST = 0x48000000 AUDIT_BPF = 0x536 AUDIT_BPRM_FCAPS = 0x529 AUDIT_CAPSET = 0x52a AUDIT_CLASS_CHATTR = 0x2 AUDIT_CLASS_CHATTR_32 = 0x3 AUDIT_CLASS_DIR_WRITE = 0x0 AUDIT_CLASS_DIR_WRITE_32 = 0x1 AUDIT_CLASS_READ = 0x4 AUDIT_CLASS_READ_32 = 0x5 AUDIT_CLASS_SIGNAL = 0x8 AUDIT_CLASS_SIGNAL_32 = 0x9 AUDIT_CLASS_WRITE = 0x6 AUDIT_CLASS_WRITE_32 = 0x7 AUDIT_COMPARE_AUID_TO_EUID = 0x10 AUDIT_COMPARE_AUID_TO_FSUID = 0xe AUDIT_COMPARE_AUID_TO_OBJ_UID = 0x5 AUDIT_COMPARE_AUID_TO_SUID = 0xf AUDIT_COMPARE_EGID_TO_FSGID = 0x17 AUDIT_COMPARE_EGID_TO_OBJ_GID = 0x4 AUDIT_COMPARE_EGID_TO_SGID = 0x18 AUDIT_COMPARE_EUID_TO_FSUID = 0x12 AUDIT_COMPARE_EUID_TO_OBJ_UID = 0x3 AUDIT_COMPARE_EUID_TO_SUID = 0x11 AUDIT_COMPARE_FSGID_TO_OBJ_GID = 0x9 AUDIT_COMPARE_FSUID_TO_OBJ_UID = 0x8 AUDIT_COMPARE_GID_TO_EGID = 0x14 AUDIT_COMPARE_GID_TO_FSGID = 0x15 AUDIT_COMPARE_GID_TO_OBJ_GID = 0x2 AUDIT_COMPARE_GID_TO_SGID = 0x16 AUDIT_COMPARE_SGID_TO_FSGID = 0x19 AUDIT_COMPARE_SGID_TO_OBJ_GID = 0x7 AUDIT_COMPARE_SUID_TO_FSUID = 0x13 AUDIT_COMPARE_SUID_TO_OBJ_UID = 0x6 AUDIT_COMPARE_UID_TO_AUID = 0xa AUDIT_COMPARE_UID_TO_EUID = 0xb AUDIT_COMPARE_UID_TO_FSUID = 0xc AUDIT_COMPARE_UID_TO_OBJ_UID = 0x1 AUDIT_COMPARE_UID_TO_SUID = 0xd AUDIT_CONFIG_CHANGE = 0x519 AUDIT_CWD = 0x51b AUDIT_DAEMON_ABORT = 0x4b2 AUDIT_DAEMON_CONFIG = 0x4b3 AUDIT_DAEMON_END = 0x4b1 AUDIT_DAEMON_START = 0x4b0 AUDIT_DEL = 0x3ec AUDIT_DEL_RULE = 0x3f4 AUDIT_DEVMAJOR = 0x64 AUDIT_DEVMINOR = 0x65 AUDIT_DIR = 0x6b AUDIT_DM_CTRL = 0x53a AUDIT_DM_EVENT = 0x53b AUDIT_EGID = 0x6 AUDIT_EOE = 0x528 AUDIT_EQUAL = 0x40000000 AUDIT_EUID = 0x2 AUDIT_EVENT_LISTENER = 0x537 AUDIT_EXE = 0x70 AUDIT_EXECVE = 0x51d AUDIT_EXIT = 0x67 AUDIT_FAIL_PANIC = 0x2 AUDIT_FAIL_PRINTK = 0x1 AUDIT_FAIL_SILENT = 0x0 AUDIT_FANOTIFY = 0x533 AUDIT_FD_PAIR = 0x525 AUDIT_FEATURE_BITMAP_ALL = 0x7f AUDIT_FEATURE_BITMAP_BACKLOG_LIMIT = 0x1 AUDIT_FEATURE_BITMAP_BACKLOG_WAIT_TIME = 0x2 AUDIT_FEATURE_BITMAP_EXCLUDE_EXTEND = 0x8 AUDIT_FEATURE_BITMAP_EXECUTABLE_PATH = 0x4 AUDIT_FEATURE_BITMAP_FILTER_FS = 0x40 AUDIT_FEATURE_BITMAP_LOST_RESET = 0x20 AUDIT_FEATURE_BITMAP_SESSIONID_FILTER = 0x10 AUDIT_FEATURE_CHANGE = 0x530 AUDIT_FEATURE_LOGINUID_IMMUTABLE = 0x1 AUDIT_FEATURE_ONLY_UNSET_LOGINUID = 0x0 AUDIT_FEATURE_VERSION = 0x1 AUDIT_FIELD_COMPARE = 0x6f AUDIT_FILETYPE = 0x6c AUDIT_FILTERKEY = 0xd2 AUDIT_FILTER_ENTRY = 0x2 AUDIT_FILTER_EXCLUDE = 0x5 AUDIT_FILTER_EXIT = 0x4 AUDIT_FILTER_FS = 0x6 AUDIT_FILTER_PREPEND = 0x10 AUDIT_FILTER_TASK = 0x1 AUDIT_FILTER_TYPE = 0x5 AUDIT_FILTER_URING_EXIT = 0x7 AUDIT_FILTER_USER = 0x0 AUDIT_FILTER_WATCH = 0x3 AUDIT_FIRST_KERN_ANOM_MSG = 0x6a4 AUDIT_FIRST_USER_MSG = 0x44c AUDIT_FIRST_USER_MSG2 = 0x834 AUDIT_FSGID = 0x8 AUDIT_FSTYPE = 0x1a AUDIT_FSUID = 0x4 AUDIT_GET = 0x3e8 AUDIT_GET_FEATURE = 0x3fb AUDIT_GID = 0x5 AUDIT_GREATER_THAN = 0x20000000 AUDIT_GREATER_THAN_OR_EQUAL = 0x60000000 AUDIT_INODE = 0x66 AUDIT_INTEGRITY_DATA = 0x708 AUDIT_INTEGRITY_EVM_XATTR = 0x70e AUDIT_INTEGRITY_HASH = 0x70b AUDIT_INTEGRITY_METADATA = 0x709 AUDIT_INTEGRITY_PCR = 0x70c AUDIT_INTEGRITY_POLICY_RULE = 0x70f AUDIT_INTEGRITY_RULE = 0x70d AUDIT_INTEGRITY_STATUS = 0x70a AUDIT_IPC = 0x517 AUDIT_IPC_SET_PERM = 0x51f AUDIT_KERNEL = 0x7d0 AUDIT_KERNEL_OTHER = 0x524 AUDIT_KERN_MODULE = 0x532 AUDIT_LAST_FEATURE = 0x1 AUDIT_LAST_KERN_ANOM_MSG = 0x707 AUDIT_LAST_USER_MSG = 0x4af AUDIT_LAST_USER_MSG2 = 0xbb7 AUDIT_LESS_THAN = 0x10000000 AUDIT_LESS_THAN_OR_EQUAL = 0x50000000 AUDIT_LIST = 0x3ea AUDIT_LIST_RULES = 0x3f5 AUDIT_LOGIN = 0x3ee AUDIT_LOGINUID = 0x9 AUDIT_LOGINUID_SET = 0x18 AUDIT_MAC_CALIPSO_ADD = 0x58a AUDIT_MAC_CALIPSO_DEL = 0x58b AUDIT_MAC_CIPSOV4_ADD = 0x57f AUDIT_MAC_CIPSOV4_DEL = 0x580 AUDIT_MAC_CONFIG_CHANGE = 0x57d AUDIT_MAC_IPSEC_ADDSA = 0x583 AUDIT_MAC_IPSEC_ADDSPD = 0x585 AUDIT_MAC_IPSEC_DELSA = 0x584 AUDIT_MAC_IPSEC_DELSPD = 0x586 AUDIT_MAC_IPSEC_EVENT = 0x587 AUDIT_MAC_MAP_ADD = 0x581 AUDIT_MAC_MAP_DEL = 0x582 AUDIT_MAC_POLICY_LOAD = 0x57b AUDIT_MAC_STATUS = 0x57c AUDIT_MAC_UNLBL_ALLOW = 0x57e AUDIT_MAC_UNLBL_STCADD = 0x588 AUDIT_MAC_UNLBL_STCDEL = 0x589 AUDIT_MAKE_EQUIV = 0x3f7 AUDIT_MAX_FIELDS = 0x40 AUDIT_MAX_FIELD_COMPARE = 0x19 AUDIT_MAX_KEY_LEN = 0x100 AUDIT_MESSAGE_TEXT_MAX = 0x2170 AUDIT_MMAP = 0x52b AUDIT_MQ_GETSETATTR = 0x523 AUDIT_MQ_NOTIFY = 0x522 AUDIT_MQ_OPEN = 0x520 AUDIT_MQ_SENDRECV = 0x521 AUDIT_MSGTYPE = 0xc AUDIT_NEGATE = 0x80000000 AUDIT_NETFILTER_CFG = 0x52d AUDIT_NETFILTER_PKT = 0x52c AUDIT_NEVER = 0x0 AUDIT_NLGRP_MAX = 0x1 AUDIT_NOT_EQUAL = 0x30000000 AUDIT_NR_FILTERS = 0x8 AUDIT_OBJ_GID = 0x6e AUDIT_OBJ_LEV_HIGH = 0x17 AUDIT_OBJ_LEV_LOW = 0x16 AUDIT_OBJ_PID = 0x526 AUDIT_OBJ_ROLE = 0x14 AUDIT_OBJ_TYPE = 0x15 AUDIT_OBJ_UID = 0x6d AUDIT_OBJ_USER = 0x13 AUDIT_OPENAT2 = 0x539 AUDIT_OPERATORS = 0x78000000 AUDIT_PATH = 0x516 AUDIT_PERM = 0x6a AUDIT_PERM_ATTR = 0x8 AUDIT_PERM_EXEC = 0x1 AUDIT_PERM_READ = 0x4 AUDIT_PERM_WRITE = 0x2 AUDIT_PERS = 0xa AUDIT_PID = 0x0 AUDIT_POSSIBLE = 0x1 AUDIT_PPID = 0x12 AUDIT_PROCTITLE = 0x52f AUDIT_REPLACE = 0x531 AUDIT_SADDR_FAM = 0x71 AUDIT_SECCOMP = 0x52e AUDIT_SELINUX_ERR = 0x579 AUDIT_SESSIONID = 0x19 AUDIT_SET = 0x3e9 AUDIT_SET_FEATURE = 0x3fa AUDIT_SGID = 0x7 AUDIT_SID_UNSET = 0xffffffff AUDIT_SIGNAL_INFO = 0x3f2 AUDIT_SOCKADDR = 0x51a AUDIT_SOCKETCALL = 0x518 AUDIT_STATUS_BACKLOG_LIMIT = 0x10 AUDIT_STATUS_BACKLOG_WAIT_TIME = 0x20 AUDIT_STATUS_BACKLOG_WAIT_TIME_ACTUAL = 0x80 AUDIT_STATUS_ENABLED = 0x1 AUDIT_STATUS_FAILURE = 0x2 AUDIT_STATUS_LOST = 0x40 AUDIT_STATUS_PID = 0x4 AUDIT_STATUS_RATE_LIMIT = 0x8 AUDIT_SUBJ_CLR = 0x11 AUDIT_SUBJ_ROLE = 0xe AUDIT_SUBJ_SEN = 0x10 AUDIT_SUBJ_TYPE = 0xf AUDIT_SUBJ_USER = 0xd AUDIT_SUCCESS = 0x68 AUDIT_SUID = 0x3 AUDIT_SYSCALL = 0x514 AUDIT_SYSCALL_CLASSES = 0x10 AUDIT_TIME_ADJNTPVAL = 0x535 AUDIT_TIME_INJOFFSET = 0x534 AUDIT_TRIM = 0x3f6 AUDIT_TTY = 0x527 AUDIT_TTY_GET = 0x3f8 AUDIT_TTY_SET = 0x3f9 AUDIT_UID = 0x1 AUDIT_UID_UNSET = 0xffffffff AUDIT_UNUSED_BITS = 0x7fffc00 AUDIT_URINGOP = 0x538 AUDIT_USER = 0x3ed AUDIT_USER_AVC = 0x453 AUDIT_USER_TTY = 0x464 AUDIT_VERSION_BACKLOG_LIMIT = 0x1 AUDIT_VERSION_BACKLOG_WAIT_TIME = 0x2 AUDIT_VERSION_LATEST = 0x7f AUDIT_WATCH = 0x69 AUDIT_WATCH_INS = 0x3ef AUDIT_WATCH_LIST = 0x3f1 AUDIT_WATCH_REM = 0x3f0 AUTOFS_SUPER_MAGIC = 0x187 B0 = 0x0 B110 = 0x3 B1200 = 0x9 B134 = 0x4 B150 = 0x5 B1800 = 0xa B19200 = 0xe B200 = 0x6 B2400 = 0xb B300 = 0x7 B38400 = 0xf B4800 = 0xc B50 = 0x1 B600 = 0x8 B75 = 0x2 B9600 = 0xd BCACHEFS_SUPER_MAGIC = 0xca451a4e BDEVFS_MAGIC = 0x62646576 BINDERFS_SUPER_MAGIC = 0x6c6f6f70 BINFMTFS_MAGIC = 0x42494e4d BPF_A = 0x10 BPF_ABS = 0x20 BPF_ADD = 0x0 BPF_ALU = 0x4 BPF_ALU64 = 0x7 BPF_AND = 0x50 BPF_ARSH = 0xc0 BPF_ATOMIC = 0xc0 BPF_B = 0x10 BPF_BUILD_ID_SIZE = 0x14 BPF_CALL = 0x80 BPF_CMPXCHG = 0xf1 BPF_DIV = 0x30 BPF_DW = 0x18 BPF_END = 0xd0 BPF_EXIT = 0x90 BPF_FETCH = 0x1 BPF_FROM_BE = 0x8 BPF_FROM_LE = 0x0 BPF_FS_MAGIC = 0xcafe4a11 BPF_F_AFTER = 0x10 BPF_F_ALLOW_MULTI = 0x2 BPF_F_ALLOW_OVERRIDE = 0x1 BPF_F_ANY_ALIGNMENT = 0x2 BPF_F_BEFORE = 0x8 BPF_F_ID = 0x20 BPF_F_NETFILTER_IP_DEFRAG = 0x1 BPF_F_QUERY_EFFECTIVE = 0x1 BPF_F_REPLACE = 0x4 BPF_F_SLEEPABLE = 0x10 BPF_F_STRICT_ALIGNMENT = 0x1 BPF_F_TEST_REG_INVARIANTS = 0x80 BPF_F_TEST_RND_HI32 = 0x4 BPF_F_TEST_RUN_ON_CPU = 0x1 BPF_F_TEST_STATE_FREQ = 0x8 BPF_F_TEST_XDP_LIVE_FRAMES = 0x2 BPF_F_XDP_DEV_BOUND_ONLY = 0x40 BPF_F_XDP_HAS_FRAGS = 0x20 BPF_H = 0x8 BPF_IMM = 0x0 BPF_IND = 0x40 BPF_JA = 0x0 BPF_JCOND = 0xe0 BPF_JEQ = 0x10 BPF_JGE = 0x30 BPF_JGT = 0x20 BPF_JLE = 0xb0 BPF_JLT = 0xa0 BPF_JMP = 0x5 BPF_JMP32 = 0x6 BPF_JNE = 0x50 BPF_JSET = 0x40 BPF_JSGE = 0x70 BPF_JSGT = 0x60 BPF_JSLE = 0xd0 BPF_JSLT = 0xc0 BPF_K = 0x0 BPF_LD = 0x0 BPF_LDX = 0x1 BPF_LEN = 0x80 BPF_LL_OFF = -0x200000 BPF_LSH = 0x60 BPF_MAJOR_VERSION = 0x1 BPF_MAXINSNS = 0x1000 BPF_MEM = 0x60 BPF_MEMSX = 0x80 BPF_MEMWORDS = 0x10 BPF_MINOR_VERSION = 0x1 BPF_MISC = 0x7 BPF_MOD = 0x90 BPF_MOV = 0xb0 BPF_MSH = 0xa0 BPF_MUL = 0x20 BPF_NEG = 0x80 BPF_NET_OFF = -0x100000 BPF_OBJ_NAME_LEN = 0x10 BPF_OR = 0x40 BPF_PSEUDO_BTF_ID = 0x3 BPF_PSEUDO_CALL = 0x1 BPF_PSEUDO_FUNC = 0x4 BPF_PSEUDO_KFUNC_CALL = 0x2 BPF_PSEUDO_MAP_FD = 0x1 BPF_PSEUDO_MAP_IDX = 0x5 BPF_PSEUDO_MAP_IDX_VALUE = 0x6 BPF_PSEUDO_MAP_VALUE = 0x2 BPF_RET = 0x6 BPF_RSH = 0x70 BPF_ST = 0x2 BPF_STX = 0x3 BPF_SUB = 0x10 BPF_TAG_SIZE = 0x8 BPF_TAX = 0x0 BPF_TO_BE = 0x8 BPF_TO_LE = 0x0 BPF_TXA = 0x80 BPF_W = 0x0 BPF_X = 0x8 BPF_XADD = 0xc0 BPF_XCHG = 0xe1 BPF_XOR = 0xa0 BRKINT = 0x2 BS0 = 0x0 BTRFS_SUPER_MAGIC = 0x9123683e BTRFS_TEST_MAGIC = 0x73727279 BUS_BLUETOOTH = 0x5 BUS_HIL = 0x4 BUS_USB = 0x3 BUS_VIRTUAL = 0x6 CAN_BCM = 0x2 CAN_BUS_OFF_THRESHOLD = 0x100 CAN_CTRLMODE_3_SAMPLES = 0x4 CAN_CTRLMODE_BERR_REPORTING = 0x10 CAN_CTRLMODE_CC_LEN8_DLC = 0x100 CAN_CTRLMODE_FD = 0x20 CAN_CTRLMODE_FD_NON_ISO = 0x80 CAN_CTRLMODE_LISTENONLY = 0x2 CAN_CTRLMODE_LOOPBACK = 0x1 CAN_CTRLMODE_ONE_SHOT = 0x8 CAN_CTRLMODE_PRESUME_ACK = 0x40 CAN_CTRLMODE_TDC_AUTO = 0x200 CAN_CTRLMODE_TDC_MANUAL = 0x400 CAN_EFF_FLAG = 0x80000000 CAN_EFF_ID_BITS = 0x1d CAN_EFF_MASK = 0x1fffffff CAN_ERROR_PASSIVE_THRESHOLD = 0x80 CAN_ERROR_WARNING_THRESHOLD = 0x60 CAN_ERR_ACK = 0x20 CAN_ERR_BUSERROR = 0x80 CAN_ERR_BUSOFF = 0x40 CAN_ERR_CNT = 0x200 CAN_ERR_CRTL = 0x4 CAN_ERR_CRTL_ACTIVE = 0x40 CAN_ERR_CRTL_RX_OVERFLOW = 0x1 CAN_ERR_CRTL_RX_PASSIVE = 0x10 CAN_ERR_CRTL_RX_WARNING = 0x4 CAN_ERR_CRTL_TX_OVERFLOW = 0x2 CAN_ERR_CRTL_TX_PASSIVE = 0x20 CAN_ERR_CRTL_TX_WARNING = 0x8 CAN_ERR_CRTL_UNSPEC = 0x0 CAN_ERR_DLC = 0x8 CAN_ERR_FLAG = 0x20000000 CAN_ERR_LOSTARB = 0x2 CAN_ERR_LOSTARB_UNSPEC = 0x0 CAN_ERR_MASK = 0x1fffffff CAN_ERR_PROT = 0x8 CAN_ERR_PROT_ACTIVE = 0x40 CAN_ERR_PROT_BIT = 0x1 CAN_ERR_PROT_BIT0 = 0x8 CAN_ERR_PROT_BIT1 = 0x10 CAN_ERR_PROT_FORM = 0x2 CAN_ERR_PROT_LOC_ACK = 0x19 CAN_ERR_PROT_LOC_ACK_DEL = 0x1b CAN_ERR_PROT_LOC_CRC_DEL = 0x18 CAN_ERR_PROT_LOC_CRC_SEQ = 0x8 CAN_ERR_PROT_LOC_DATA = 0xa CAN_ERR_PROT_LOC_DLC = 0xb CAN_ERR_PROT_LOC_EOF = 0x1a CAN_ERR_PROT_LOC_ID04_00 = 0xe CAN_ERR_PROT_LOC_ID12_05 = 0xf CAN_ERR_PROT_LOC_ID17_13 = 0x7 CAN_ERR_PROT_LOC_ID20_18 = 0x6 CAN_ERR_PROT_LOC_ID28_21 = 0x2 CAN_ERR_PROT_LOC_IDE = 0x5 CAN_ERR_PROT_LOC_INTERM = 0x12 CAN_ERR_PROT_LOC_RES0 = 0x9 CAN_ERR_PROT_LOC_RES1 = 0xd CAN_ERR_PROT_LOC_RTR = 0xc CAN_ERR_PROT_LOC_SOF = 0x3 CAN_ERR_PROT_LOC_SRTR = 0x4 CAN_ERR_PROT_LOC_UNSPEC = 0x0 CAN_ERR_PROT_OVERLOAD = 0x20 CAN_ERR_PROT_STUFF = 0x4 CAN_ERR_PROT_TX = 0x80 CAN_ERR_PROT_UNSPEC = 0x0 CAN_ERR_RESTARTED = 0x100 CAN_ERR_TRX = 0x10 CAN_ERR_TRX_CANH_NO_WIRE = 0x4 CAN_ERR_TRX_CANH_SHORT_TO_BAT = 0x5 CAN_ERR_TRX_CANH_SHORT_TO_GND = 0x7 CAN_ERR_TRX_CANH_SHORT_TO_VCC = 0x6 CAN_ERR_TRX_CANL_NO_WIRE = 0x40 CAN_ERR_TRX_CANL_SHORT_TO_BAT = 0x50 CAN_ERR_TRX_CANL_SHORT_TO_CANH = 0x80 CAN_ERR_TRX_CANL_SHORT_TO_GND = 0x70 CAN_ERR_TRX_CANL_SHORT_TO_VCC = 0x60 CAN_ERR_TRX_UNSPEC = 0x0 CAN_ERR_TX_TIMEOUT = 0x1 CAN_INV_FILTER = 0x20000000 CAN_ISOTP = 0x6 CAN_J1939 = 0x7 CAN_MAX_DLC = 0x8 CAN_MAX_DLEN = 0x8 CAN_MAX_RAW_DLC = 0xf CAN_MCNET = 0x5 CAN_MTU = 0x10 CAN_NPROTO = 0x8 CAN_RAW = 0x1 CAN_RAW_FILTER_MAX = 0x200 CAN_RAW_XL_VCID_RX_FILTER = 0x4 CAN_RAW_XL_VCID_TX_PASS = 0x2 CAN_RAW_XL_VCID_TX_SET = 0x1 CAN_RTR_FLAG = 0x40000000 CAN_SFF_ID_BITS = 0xb CAN_SFF_MASK = 0x7ff CAN_TERMINATION_DISABLED = 0x0 CAN_TP16 = 0x3 CAN_TP20 = 0x4 CAP_AUDIT_CONTROL = 0x1e CAP_AUDIT_READ = 0x25 CAP_AUDIT_WRITE = 0x1d CAP_BLOCK_SUSPEND = 0x24 CAP_BPF = 0x27 CAP_CHECKPOINT_RESTORE = 0x28 CAP_CHOWN = 0x0 CAP_DAC_OVERRIDE = 0x1 CAP_DAC_READ_SEARCH = 0x2 CAP_FOWNER = 0x3 CAP_FSETID = 0x4 CAP_IPC_LOCK = 0xe CAP_IPC_OWNER = 0xf CAP_KILL = 0x5 CAP_LAST_CAP = 0x28 CAP_LEASE = 0x1c CAP_LINUX_IMMUTABLE = 0x9 CAP_MAC_ADMIN = 0x21 CAP_MAC_OVERRIDE = 0x20 CAP_MKNOD = 0x1b CAP_NET_ADMIN = 0xc CAP_NET_BIND_SERVICE = 0xa CAP_NET_BROADCAST = 0xb CAP_NET_RAW = 0xd CAP_PERFMON = 0x26 CAP_SETFCAP = 0x1f CAP_SETGID = 0x6 CAP_SETPCAP = 0x8 CAP_SETUID = 0x7 CAP_SYSLOG = 0x22 CAP_SYS_ADMIN = 0x15 CAP_SYS_BOOT = 0x16 CAP_SYS_CHROOT = 0x12 CAP_SYS_MODULE = 0x10 CAP_SYS_NICE = 0x17 CAP_SYS_PACCT = 0x14 CAP_SYS_PTRACE = 0x13 CAP_SYS_RAWIO = 0x11 CAP_SYS_RESOURCE = 0x18 CAP_SYS_TIME = 0x19 CAP_SYS_TTY_CONFIG = 0x1a CAP_WAKE_ALARM = 0x23 CEPH_SUPER_MAGIC = 0xc36400 CFLUSH = 0xf CGROUP2_SUPER_MAGIC = 0x63677270 CGROUP_SUPER_MAGIC = 0x27e0eb CIFS_SUPER_MAGIC = 0xff534d42 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_TAI = 0xb CLOCK_THREAD_CPUTIME_ID = 0x3 CLOCK_TXFROMRX = 0x4 CLOCK_TXINT = 0x3 CLONE_ARGS_SIZE_VER0 = 0x40 CLONE_ARGS_SIZE_VER1 = 0x50 CLONE_ARGS_SIZE_VER2 = 0x58 CLONE_CHILD_CLEARTID = 0x200000 CLONE_CHILD_SETTID = 0x1000000 CLONE_CLEAR_SIGHAND = 0x100000000 CLONE_DETACHED = 0x400000 CLONE_FILES = 0x400 CLONE_FS = 0x200 CLONE_INTO_CGROUP = 0x200000000 CLONE_IO = 0x80000000 CLONE_NEWCGROUP = 0x2000000 CLONE_NEWIPC = 0x8000000 CLONE_NEWNET = 0x40000000 CLONE_NEWNS = 0x20000 CLONE_NEWPID = 0x20000000 CLONE_NEWTIME = 0x80 CLONE_NEWUSER = 0x10000000 CLONE_NEWUTS = 0x4000000 CLONE_PARENT = 0x8000 CLONE_PARENT_SETTID = 0x100000 CLONE_PIDFD = 0x1000 CLONE_PTRACE = 0x2000 CLONE_SETTLS = 0x80000 CLONE_SIGHAND = 0x800 CLONE_SYSVSEM = 0x40000 CLONE_THREAD = 0x10000 CLONE_UNTRACED = 0x800000 CLONE_VFORK = 0x4000 CLONE_VM = 0x100 CMSPAR = 0x40000000 CODA_SUPER_MAGIC = 0x73757245 CR0 = 0x0 CRAMFS_MAGIC = 0x28cd3d45 CRTSCTS = 0x80000000 CRYPTO_MAX_NAME = 0x40 CRYPTO_MSG_MAX = 0x15 CRYPTO_NR_MSGTYPES = 0x6 CRYPTO_REPORT_MAXSIZE = 0x160 CS5 = 0x0 CSIGNAL = 0xff CSTART = 0x11 CSTATUS = 0x0 CSTOP = 0x13 CSUSP = 0x1a DAXFS_MAGIC = 0x64646178 DEBUGFS_MAGIC = 0x64626720 DEVLINK_CMD_ESWITCH_MODE_GET = 0x1d DEVLINK_CMD_ESWITCH_MODE_SET = 0x1e DEVLINK_FLASH_OVERWRITE_IDENTIFIERS = 0x2 DEVLINK_FLASH_OVERWRITE_SETTINGS = 0x1 DEVLINK_GENL_MCGRP_CONFIG_NAME = "config" DEVLINK_GENL_NAME = "devlink" DEVLINK_GENL_VERSION = 0x1 DEVLINK_PORT_FN_CAP_IPSEC_CRYPTO = 0x4 DEVLINK_PORT_FN_CAP_IPSEC_PACKET = 0x8 DEVLINK_PORT_FN_CAP_MIGRATABLE = 0x2 DEVLINK_PORT_FN_CAP_ROCE = 0x1 DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX = 0x14 DEVLINK_SUPPORTED_FLASH_OVERWRITE_SECTIONS = 0x3 DEVMEM_MAGIC = 0x454d444d DEVPTS_SUPER_MAGIC = 0x1cd1 DMA_BUF_MAGIC = 0x444d4142 DM_ACTIVE_PRESENT_FLAG = 0x20 DM_BUFFER_FULL_FLAG = 0x100 DM_CONTROL_NODE = "control" DM_DATA_OUT_FLAG = 0x10000 DM_DEFERRED_REMOVE = 0x20000 DM_DEV_ARM_POLL = 0xc138fd10 DM_DEV_CREATE = 0xc138fd03 DM_DEV_REMOVE = 0xc138fd04 DM_DEV_RENAME = 0xc138fd05 DM_DEV_SET_GEOMETRY = 0xc138fd0f DM_DEV_STATUS = 0xc138fd07 DM_DEV_SUSPEND = 0xc138fd06 DM_DEV_WAIT = 0xc138fd08 DM_DIR = "mapper" DM_GET_TARGET_VERSION = 0xc138fd11 DM_IMA_MEASUREMENT_FLAG = 0x80000 DM_INACTIVE_PRESENT_FLAG = 0x40 DM_INTERNAL_SUSPEND_FLAG = 0x40000 DM_IOCTL = 0xfd DM_LIST_DEVICES = 0xc138fd02 DM_LIST_VERSIONS = 0xc138fd0d DM_MAX_TYPE_NAME = 0x10 DM_NAME_LEN = 0x80 DM_NAME_LIST_FLAG_DOESNT_HAVE_UUID = 0x2 DM_NAME_LIST_FLAG_HAS_UUID = 0x1 DM_NOFLUSH_FLAG = 0x800 DM_PERSISTENT_DEV_FLAG = 0x8 DM_QUERY_INACTIVE_TABLE_FLAG = 0x1000 DM_READONLY_FLAG = 0x1 DM_REMOVE_ALL = 0xc138fd01 DM_SECURE_DATA_FLAG = 0x8000 DM_SKIP_BDGET_FLAG = 0x200 DM_SKIP_LOCKFS_FLAG = 0x400 DM_STATUS_TABLE_FLAG = 0x10 DM_SUSPEND_FLAG = 0x2 DM_TABLE_CLEAR = 0xc138fd0a DM_TABLE_DEPS = 0xc138fd0b DM_TABLE_LOAD = 0xc138fd09 DM_TABLE_STATUS = 0xc138fd0c DM_TARGET_MSG = 0xc138fd0e DM_UEVENT_GENERATED_FLAG = 0x2000 DM_UUID_FLAG = 0x4000 DM_UUID_LEN = 0x81 DM_VERSION = 0xc138fd00 DM_VERSION_EXTRA = "-ioctl (2023-03-01)" DM_VERSION_MAJOR = 0x4 DM_VERSION_MINOR = 0x30 DM_VERSION_PATCHLEVEL = 0x0 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 ECRYPTFS_SUPER_MAGIC = 0xf15f EFD_SEMAPHORE = 0x1 EFIVARFS_MAGIC = 0xde5e81e4 EFS_SUPER_MAGIC = 0x414a53 EM_386 = 0x3 EM_486 = 0x6 EM_68K = 0x4 EM_860 = 0x7 EM_88K = 0x5 EM_AARCH64 = 0xb7 EM_ALPHA = 0x9026 EM_ALTERA_NIOS2 = 0x71 EM_ARCOMPACT = 0x5d EM_ARCV2 = 0xc3 EM_ARM = 0x28 EM_BLACKFIN = 0x6a EM_BPF = 0xf7 EM_CRIS = 0x4c EM_CSKY = 0xfc EM_CYGNUS_M32R = 0x9041 EM_CYGNUS_MN10300 = 0xbeef EM_FRV = 0x5441 EM_H8_300 = 0x2e EM_HEXAGON = 0xa4 EM_IA_64 = 0x32 EM_LOONGARCH = 0x102 EM_M32 = 0x1 EM_M32R = 0x58 EM_MICROBLAZE = 0xbd EM_MIPS = 0x8 EM_MIPS_RS3_LE = 0xa EM_MIPS_RS4_BE = 0xa EM_MN10300 = 0x59 EM_NDS32 = 0xa7 EM_NONE = 0x0 EM_OPENRISC = 0x5c EM_PARISC = 0xf EM_PPC = 0x14 EM_PPC64 = 0x15 EM_RISCV = 0xf3 EM_S390 = 0x16 EM_S390_OLD = 0xa390 EM_SH = 0x2a EM_SPARC = 0x2 EM_SPARC32PLUS = 0x12 EM_SPARCV9 = 0x2b EM_SPU = 0x17 EM_TILEGX = 0xbf EM_TILEPRO = 0xbc EM_TI_C6000 = 0x8c EM_UNICORE = 0x6e EM_X86_64 = 0x3e EM_XTENSA = 0x5e ENCODING_DEFAULT = 0x0 ENCODING_FM_MARK = 0x3 ENCODING_FM_SPACE = 0x4 ENCODING_MANCHESTER = 0x5 ENCODING_NRZ = 0x1 ENCODING_NRZI = 0x2 EPOLLERR = 0x8 EPOLLET = 0x80000000 EPOLLEXCLUSIVE = 0x10000000 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_CTL_ADD = 0x1 EPOLL_CTL_DEL = 0x2 EPOLL_CTL_MOD = 0x3 EPOLL_IOC_TYPE = 0x8a EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2 ESP_V4_FLOW = 0xa ESP_V6_FLOW = 0xc ETHER_FLOW = 0x12 ETHTOOL_BUSINFO_LEN = 0x20 ETHTOOL_EROMVERS_LEN = 0x20 ETHTOOL_FEC_AUTO = 0x2 ETHTOOL_FEC_BASER = 0x10 ETHTOOL_FEC_LLRS = 0x20 ETHTOOL_FEC_NONE = 0x1 ETHTOOL_FEC_OFF = 0x4 ETHTOOL_FEC_RS = 0x8 ETHTOOL_FLAG_ALL = 0x7 ETHTOOL_FLASHDEV = 0x33 ETHTOOL_FLASH_MAX_FILENAME = 0x80 ETHTOOL_FWVERS_LEN = 0x20 ETHTOOL_F_COMPAT = 0x4 ETHTOOL_F_UNSUPPORTED = 0x1 ETHTOOL_F_WISH = 0x2 ETHTOOL_GCHANNELS = 0x3c ETHTOOL_GCOALESCE = 0xe ETHTOOL_GDRVINFO = 0x3 ETHTOOL_GEEE = 0x44 ETHTOOL_GEEPROM = 0xb ETHTOOL_GENL_NAME = "ethtool" ETHTOOL_GENL_VERSION = 0x1 ETHTOOL_GET_DUMP_DATA = 0x40 ETHTOOL_GET_DUMP_FLAG = 0x3f ETHTOOL_GET_TS_INFO = 0x41 ETHTOOL_GFEATURES = 0x3a ETHTOOL_GFECPARAM = 0x50 ETHTOOL_GFLAGS = 0x25 ETHTOOL_GGRO = 0x2b ETHTOOL_GGSO = 0x23 ETHTOOL_GLINK = 0xa ETHTOOL_GLINKSETTINGS = 0x4c ETHTOOL_GMODULEEEPROM = 0x43 ETHTOOL_GMODULEINFO = 0x42 ETHTOOL_GMSGLVL = 0x7 ETHTOOL_GPAUSEPARAM = 0x12 ETHTOOL_GPERMADDR = 0x20 ETHTOOL_GPFLAGS = 0x27 ETHTOOL_GPHYSTATS = 0x4a ETHTOOL_GREGS = 0x4 ETHTOOL_GRINGPARAM = 0x10 ETHTOOL_GRSSH = 0x46 ETHTOOL_GRXCLSRLALL = 0x30 ETHTOOL_GRXCLSRLCNT = 0x2e ETHTOOL_GRXCLSRULE = 0x2f ETHTOOL_GRXCSUM = 0x14 ETHTOOL_GRXFH = 0x29 ETHTOOL_GRXFHINDIR = 0x38 ETHTOOL_GRXNTUPLE = 0x36 ETHTOOL_GRXRINGS = 0x2d ETHTOOL_GSET = 0x1 ETHTOOL_GSG = 0x18 ETHTOOL_GSSET_INFO = 0x37 ETHTOOL_GSTATS = 0x1d ETHTOOL_GSTRINGS = 0x1b ETHTOOL_GTSO = 0x1e ETHTOOL_GTUNABLE = 0x48 ETHTOOL_GTXCSUM = 0x16 ETHTOOL_GUFO = 0x21 ETHTOOL_GWOL = 0x5 ETHTOOL_MCGRP_MONITOR_NAME = "monitor" ETHTOOL_NWAY_RST = 0x9 ETHTOOL_PERQUEUE = 0x4b ETHTOOL_PHYS_ID = 0x1c ETHTOOL_PHY_EDPD_DFLT_TX_MSECS = 0xffff ETHTOOL_PHY_EDPD_DISABLE = 0x0 ETHTOOL_PHY_EDPD_NO_TX = 0xfffe ETHTOOL_PHY_FAST_LINK_DOWN_OFF = 0xff ETHTOOL_PHY_FAST_LINK_DOWN_ON = 0x0 ETHTOOL_PHY_GTUNABLE = 0x4e ETHTOOL_PHY_STUNABLE = 0x4f ETHTOOL_RESET = 0x34 ETHTOOL_RXNTUPLE_ACTION_CLEAR = -0x2 ETHTOOL_RXNTUPLE_ACTION_DROP = -0x1 ETHTOOL_RX_FLOW_SPEC_RING = 0xffffffff ETHTOOL_RX_FLOW_SPEC_RING_VF = 0xff00000000 ETHTOOL_RX_FLOW_SPEC_RING_VF_OFF = 0x20 ETHTOOL_SCHANNELS = 0x3d ETHTOOL_SCOALESCE = 0xf ETHTOOL_SEEE = 0x45 ETHTOOL_SEEPROM = 0xc ETHTOOL_SET_DUMP = 0x3e ETHTOOL_SFEATURES = 0x3b ETHTOOL_SFECPARAM = 0x51 ETHTOOL_SFLAGS = 0x26 ETHTOOL_SGRO = 0x2c ETHTOOL_SGSO = 0x24 ETHTOOL_SLINKSETTINGS = 0x4d ETHTOOL_SMSGLVL = 0x8 ETHTOOL_SPAUSEPARAM = 0x13 ETHTOOL_SPFLAGS = 0x28 ETHTOOL_SRINGPARAM = 0x11 ETHTOOL_SRSSH = 0x47 ETHTOOL_SRXCLSRLDEL = 0x31 ETHTOOL_SRXCLSRLINS = 0x32 ETHTOOL_SRXCSUM = 0x15 ETHTOOL_SRXFH = 0x2a ETHTOOL_SRXFHINDIR = 0x39 ETHTOOL_SRXNTUPLE = 0x35 ETHTOOL_SSET = 0x2 ETHTOOL_SSG = 0x19 ETHTOOL_STSO = 0x1f ETHTOOL_STUNABLE = 0x49 ETHTOOL_STXCSUM = 0x17 ETHTOOL_SUFO = 0x22 ETHTOOL_SWOL = 0x6 ETHTOOL_TEST = 0x1a 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_CANXL = 0xe ETH_P_CFM = 0x8902 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_DSA_8021Q = 0xdadb ETH_P_DSA_A5PSW = 0xe001 ETH_P_ECONET = 0x18 ETH_P_EDSA = 0xdada ETH_P_ERSPAN = 0x88be ETH_P_ERSPAN2 = 0x22eb ETH_P_ETHERCAT = 0x88a4 ETH_P_FCOE = 0x8906 ETH_P_FIP = 0x8914 ETH_P_HDLC = 0x19 ETH_P_HSR = 0x892f ETH_P_IBOE = 0x8915 ETH_P_IEEE802154 = 0xf6 ETH_P_IEEEPUP = 0xa00 ETH_P_IEEEPUPAT = 0xa01 ETH_P_IFE = 0xed3e 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_LLDP = 0x88cc ETH_P_LOCALTALK = 0x9 ETH_P_LOOP = 0x60 ETH_P_LOOPBACK = 0x9000 ETH_P_MACSEC = 0x88e5 ETH_P_MAP = 0xf9 ETH_P_MCTP = 0xfa ETH_P_MOBITEX = 0x15 ETH_P_MPLS_MC = 0x8848 ETH_P_MPLS_UC = 0x8847 ETH_P_MRP = 0x88e3 ETH_P_MVRP = 0x88f5 ETH_P_NCSI = 0x88f8 ETH_P_NSH = 0x894f 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_PREAUTH = 0x88c7 ETH_P_PROFINET = 0x8892 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_REALTEK = 0x8899 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_TSN = 0x22f0 ETH_P_WAN_PPP = 0x7 ETH_P_WCCP = 0x883e ETH_P_X25 = 0x805 ETH_P_XDSA = 0xf8 EV_ABS = 0x3 EV_CNT = 0x20 EV_FF = 0x15 EV_FF_STATUS = 0x17 EV_KEY = 0x1 EV_LED = 0x11 EV_MAX = 0x1f EV_MSC = 0x4 EV_PWR = 0x16 EV_REL = 0x2 EV_REP = 0x14 EV_SND = 0x12 EV_SW = 0x5 EV_SYN = 0x0 EV_VERSION = 0x10001 EXABYTE_ENABLE_NEST = 0xf0 EXFAT_SUPER_MAGIC = 0x2011bab0 EXT2_SUPER_MAGIC = 0xef53 EXT3_SUPER_MAGIC = 0xef53 EXT4_SUPER_MAGIC = 0xef53 EXTA = 0xe EXTB = 0xf F2FS_SUPER_MAGIC = 0xf2f52010 FALLOC_FL_COLLAPSE_RANGE = 0x8 FALLOC_FL_INSERT_RANGE = 0x20 FALLOC_FL_KEEP_SIZE = 0x1 FALLOC_FL_NO_HIDE_STALE = 0x4 FALLOC_FL_PUNCH_HOLE = 0x2 FALLOC_FL_UNSHARE_RANGE = 0x40 FALLOC_FL_ZERO_RANGE = 0x10 FANOTIFY_METADATA_VERSION = 0x3 FAN_ACCESS = 0x1 FAN_ACCESS_PERM = 0x20000 FAN_ALLOW = 0x1 FAN_ALL_CLASS_BITS = 0xc FAN_ALL_EVENTS = 0x3b FAN_ALL_INIT_FLAGS = 0x3f FAN_ALL_MARK_FLAGS = 0xff FAN_ALL_OUTGOING_EVENTS = 0x3403b FAN_ALL_PERM_EVENTS = 0x30000 FAN_ATTRIB = 0x4 FAN_AUDIT = 0x10 FAN_CLASS_CONTENT = 0x4 FAN_CLASS_NOTIF = 0x0 FAN_CLASS_PRE_CONTENT = 0x8 FAN_CLOEXEC = 0x1 FAN_CLOSE = 0x18 FAN_CLOSE_NOWRITE = 0x10 FAN_CLOSE_WRITE = 0x8 FAN_CREATE = 0x100 FAN_DELETE = 0x200 FAN_DELETE_SELF = 0x400 FAN_DENY = 0x2 FAN_ENABLE_AUDIT = 0x40 FAN_EPIDFD = -0x2 FAN_EVENT_INFO_TYPE_DFID = 0x3 FAN_EVENT_INFO_TYPE_DFID_NAME = 0x2 FAN_EVENT_INFO_TYPE_ERROR = 0x5 FAN_EVENT_INFO_TYPE_FID = 0x1 FAN_EVENT_INFO_TYPE_NEW_DFID_NAME = 0xc FAN_EVENT_INFO_TYPE_OLD_DFID_NAME = 0xa FAN_EVENT_INFO_TYPE_PIDFD = 0x4 FAN_EVENT_METADATA_LEN = 0x18 FAN_EVENT_ON_CHILD = 0x8000000 FAN_FS_ERROR = 0x8000 FAN_INFO = 0x20 FAN_MARK_ADD = 0x1 FAN_MARK_DONT_FOLLOW = 0x4 FAN_MARK_EVICTABLE = 0x200 FAN_MARK_FILESYSTEM = 0x100 FAN_MARK_FLUSH = 0x80 FAN_MARK_IGNORE = 0x400 FAN_MARK_IGNORED_MASK = 0x20 FAN_MARK_IGNORED_SURV_MODIFY = 0x40 FAN_MARK_IGNORE_SURV = 0x440 FAN_MARK_INODE = 0x0 FAN_MARK_MOUNT = 0x10 FAN_MARK_ONLYDIR = 0x8 FAN_MARK_REMOVE = 0x2 FAN_MODIFY = 0x2 FAN_MOVE = 0xc0 FAN_MOVED_FROM = 0x40 FAN_MOVED_TO = 0x80 FAN_MOVE_SELF = 0x800 FAN_NOFD = -0x1 FAN_NONBLOCK = 0x2 FAN_NOPIDFD = -0x1 FAN_ONDIR = 0x40000000 FAN_OPEN = 0x20 FAN_OPEN_EXEC = 0x1000 FAN_OPEN_EXEC_PERM = 0x40000 FAN_OPEN_PERM = 0x10000 FAN_Q_OVERFLOW = 0x4000 FAN_RENAME = 0x10000000 FAN_REPORT_DFID_NAME = 0xc00 FAN_REPORT_DFID_NAME_TARGET = 0x1e00 FAN_REPORT_DIR_FID = 0x400 FAN_REPORT_FID = 0x200 FAN_REPORT_NAME = 0x800 FAN_REPORT_PIDFD = 0x80 FAN_REPORT_TARGET_FID = 0x1000 FAN_REPORT_TID = 0x100 FAN_RESPONSE_INFO_AUDIT_RULE = 0x1 FAN_RESPONSE_INFO_NONE = 0x0 FAN_UNLIMITED_MARKS = 0x20 FAN_UNLIMITED_QUEUE = 0x10 FD_CLOEXEC = 0x1 FD_SETSIZE = 0x400 FF0 = 0x0 FIB_RULE_DEV_DETACHED = 0x8 FIB_RULE_FIND_SADDR = 0x10000 FIB_RULE_IIF_DETACHED = 0x8 FIB_RULE_INVERT = 0x2 FIB_RULE_OIF_DETACHED = 0x10 FIB_RULE_PERMANENT = 0x1 FIB_RULE_UNRESOLVED = 0x4 FIDEDUPERANGE = 0xc0189436 FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8 FSCRYPT_KEY_DESC_PREFIX = "fscrypt:" FSCRYPT_KEY_DESC_PREFIX_SIZE = 0x8 FSCRYPT_KEY_IDENTIFIER_SIZE = 0x10 FSCRYPT_KEY_REMOVAL_STATUS_FLAG_FILES_BUSY = 0x1 FSCRYPT_KEY_REMOVAL_STATUS_FLAG_OTHER_USERS = 0x2 FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR = 0x1 FSCRYPT_KEY_SPEC_TYPE_IDENTIFIER = 0x2 FSCRYPT_KEY_STATUS_ABSENT = 0x1 FSCRYPT_KEY_STATUS_FLAG_ADDED_BY_SELF = 0x1 FSCRYPT_KEY_STATUS_INCOMPLETELY_REMOVED = 0x3 FSCRYPT_KEY_STATUS_PRESENT = 0x2 FSCRYPT_MAX_KEY_SIZE = 0x40 FSCRYPT_MODE_ADIANTUM = 0x9 FSCRYPT_MODE_AES_128_CBC = 0x5 FSCRYPT_MODE_AES_128_CTS = 0x6 FSCRYPT_MODE_AES_256_CTS = 0x4 FSCRYPT_MODE_AES_256_HCTR2 = 0xa FSCRYPT_MODE_AES_256_XTS = 0x1 FSCRYPT_MODE_SM4_CTS = 0x8 FSCRYPT_MODE_SM4_XTS = 0x7 FSCRYPT_POLICY_FLAGS_PAD_16 = 0x2 FSCRYPT_POLICY_FLAGS_PAD_32 = 0x3 FSCRYPT_POLICY_FLAGS_PAD_4 = 0x0 FSCRYPT_POLICY_FLAGS_PAD_8 = 0x1 FSCRYPT_POLICY_FLAGS_PAD_MASK = 0x3 FSCRYPT_POLICY_FLAG_DIRECT_KEY = 0x4 FSCRYPT_POLICY_FLAG_IV_INO_LBLK_32 = 0x10 FSCRYPT_POLICY_FLAG_IV_INO_LBLK_64 = 0x8 FSCRYPT_POLICY_V1 = 0x0 FSCRYPT_POLICY_V2 = 0x2 FS_ENCRYPTION_MODE_ADIANTUM = 0x9 FS_ENCRYPTION_MODE_AES_128_CBC = 0x5 FS_ENCRYPTION_MODE_AES_128_CTS = 0x6 FS_ENCRYPTION_MODE_AES_256_CBC = 0x3 FS_ENCRYPTION_MODE_AES_256_CTS = 0x4 FS_ENCRYPTION_MODE_AES_256_GCM = 0x2 FS_ENCRYPTION_MODE_AES_256_XTS = 0x1 FS_ENCRYPTION_MODE_INVALID = 0x0 FS_IOC_ADD_ENCRYPTION_KEY = 0xc0506617 FS_IOC_GET_ENCRYPTION_KEY_STATUS = 0xc080661a FS_IOC_GET_ENCRYPTION_POLICY_EX = 0xc0096616 FS_IOC_MEASURE_VERITY = 0xc0046686 FS_IOC_READ_VERITY_METADATA = 0xc0286687 FS_IOC_REMOVE_ENCRYPTION_KEY = 0xc0406618 FS_IOC_REMOVE_ENCRYPTION_KEY_ALL_USERS = 0xc0406619 FS_KEY_DESCRIPTOR_SIZE = 0x8 FS_KEY_DESC_PREFIX = "fscrypt:" FS_KEY_DESC_PREFIX_SIZE = 0x8 FS_MAX_KEY_SIZE = 0x40 FS_POLICY_FLAGS_PAD_16 = 0x2 FS_POLICY_FLAGS_PAD_32 = 0x3 FS_POLICY_FLAGS_PAD_4 = 0x0 FS_POLICY_FLAGS_PAD_8 = 0x1 FS_POLICY_FLAGS_PAD_MASK = 0x3 FS_POLICY_FLAGS_VALID = 0x7 FS_VERITY_FL = 0x100000 FS_VERITY_HASH_ALG_SHA256 = 0x1 FS_VERITY_HASH_ALG_SHA512 = 0x2 FS_VERITY_METADATA_TYPE_DESCRIPTOR = 0x2 FS_VERITY_METADATA_TYPE_MERKLE_TREE = 0x1 FS_VERITY_METADATA_TYPE_SIGNATURE = 0x3 FUSE_SUPER_MAGIC = 0x65735546 FUTEXFS_SUPER_MAGIC = 0xbad1dea F_ADD_SEALS = 0x409 F_DUPFD = 0x0 F_DUPFD_CLOEXEC = 0x406 F_EXLCK = 0x4 F_GETFD = 0x1 F_GETFL = 0x3 F_GETLEASE = 0x401 F_GETOWN_EX = 0x10 F_GETPIPE_SZ = 0x408 F_GETSIG = 0xb F_GET_FILE_RW_HINT = 0x40d F_GET_RW_HINT = 0x40b F_GET_SEALS = 0x40a F_LOCK = 0x1 F_NOTIFY = 0x402 F_OFD_GETLK = 0x24 F_OFD_SETLK = 0x25 F_OFD_SETLKW = 0x26 F_OK = 0x0 F_SEAL_EXEC = 0x20 F_SEAL_FUTURE_WRITE = 0x10 F_SEAL_GROW = 0x4 F_SEAL_SEAL = 0x1 F_SEAL_SHRINK = 0x2 F_SEAL_WRITE = 0x8 F_SETFD = 0x2 F_SETFL = 0x4 F_SETLEASE = 0x400 F_SETOWN_EX = 0xf F_SETPIPE_SZ = 0x407 F_SETSIG = 0xa F_SET_FILE_RW_HINT = 0x40e F_SET_RW_HINT = 0x40c F_SHLCK = 0x8 F_TEST = 0x3 F_TLOCK = 0x2 F_ULOCK = 0x0 GENL_ADMIN_PERM = 0x1 GENL_CMD_CAP_DO = 0x2 GENL_CMD_CAP_DUMP = 0x4 GENL_CMD_CAP_HASPOL = 0x8 GENL_HDRLEN = 0x4 GENL_ID_CTRL = 0x10 GENL_ID_PMCRAID = 0x12 GENL_ID_VFS_DQUOT = 0x11 GENL_MAX_ID = 0x3ff GENL_MIN_ID = 0x10 GENL_NAMSIZ = 0x10 GENL_START_ALLOC = 0x13 GENL_UNS_ADMIN_PERM = 0x10 GRND_INSECURE = 0x4 GRND_NONBLOCK = 0x1 GRND_RANDOM = 0x2 HDIO_DRIVE_CMD = 0x31f HDIO_DRIVE_CMD_AEB = 0x31e HDIO_DRIVE_CMD_HDR_SIZE = 0x4 HDIO_DRIVE_HOB_HDR_SIZE = 0x8 HDIO_DRIVE_RESET = 0x31c HDIO_DRIVE_TASK = 0x31e HDIO_DRIVE_TASKFILE = 0x31d HDIO_DRIVE_TASK_HDR_SIZE = 0x8 HDIO_GETGEO = 0x301 HDIO_GET_32BIT = 0x309 HDIO_GET_ACOUSTIC = 0x30f HDIO_GET_ADDRESS = 0x310 HDIO_GET_BUSSTATE = 0x31a HDIO_GET_DMA = 0x30b HDIO_GET_IDENTITY = 0x30d HDIO_GET_KEEPSETTINGS = 0x308 HDIO_GET_MULTCOUNT = 0x304 HDIO_GET_NICE = 0x30c HDIO_GET_NOWERR = 0x30a HDIO_GET_QDMA = 0x305 HDIO_GET_UNMASKINTR = 0x302 HDIO_GET_WCACHE = 0x30e HDIO_OBSOLETE_IDENTITY = 0x307 HDIO_SCAN_HWIF = 0x328 HDIO_SET_32BIT = 0x324 HDIO_SET_ACOUSTIC = 0x32c HDIO_SET_ADDRESS = 0x32f HDIO_SET_BUSSTATE = 0x32d HDIO_SET_DMA = 0x326 HDIO_SET_KEEPSETTINGS = 0x323 HDIO_SET_MULTCOUNT = 0x321 HDIO_SET_NICE = 0x329 HDIO_SET_NOWERR = 0x325 HDIO_SET_PIO_MODE = 0x327 HDIO_SET_QDMA = 0x32e HDIO_SET_UNMASKINTR = 0x322 HDIO_SET_WCACHE = 0x32b HDIO_SET_XFER = 0x306 HDIO_TRISTATE_HWIF = 0x31b HDIO_UNREGISTER_HWIF = 0x32a HID_MAX_DESCRIPTOR_SIZE = 0x1000 HOSTFS_SUPER_MAGIC = 0xc0ffee HPFS_SUPER_MAGIC = 0xf995e849 HUGETLBFS_MAGIC = 0x958458f6 IBSHIFT = 0x10 ICRNL = 0x100 IFA_F_DADFAILED = 0x8 IFA_F_DEPRECATED = 0x20 IFA_F_HOMEADDRESS = 0x10 IFA_F_MANAGETEMPADDR = 0x100 IFA_F_MCAUTOJOIN = 0x400 IFA_F_NODAD = 0x2 IFA_F_NOPREFIXROUTE = 0x200 IFA_F_OPTIMISTIC = 0x4 IFA_F_PERMANENT = 0x80 IFA_F_SECONDARY = 0x1 IFA_F_STABLE_PRIVACY = 0x800 IFA_F_TEMPORARY = 0x1 IFA_F_TENTATIVE = 0x40 IFA_MAX = 0xb 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_NAPI = 0x10 IFF_NAPI_FRAGS = 0x20 IFF_NOARP = 0x80 IFF_NOFILTER = 0x1000 IFF_NOTRAILERS = 0x20 IFF_NO_CARRIER = 0x40 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_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_MASK_CREATE = 0x10000000 IN_MODIFY = 0x2 IN_MOVE = 0xc0 IN_MOVED_FROM = 0x40 IN_MOVED_TO = 0x80 IN_MOVE_SELF = 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_ETHERNET = 0x8f 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_L2TP = 0x73 IPPROTO_MH = 0x87 IPPROTO_MPLS = 0x89 IPPROTO_MPTCP = 0x106 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_ADDR_PREFERENCES = 0x48 IPV6_ADD_MEMBERSHIP = 0x14 IPV6_AUTHHDR = 0xa IPV6_AUTOFLOWLABEL = 0x46 IPV6_CHECKSUM = 0x7 IPV6_DONTFRAG = 0x3e IPV6_DROP_MEMBERSHIP = 0x15 IPV6_DSTOPTS = 0x3b IPV6_FLOW = 0x11 IPV6_FREEBIND = 0x4e IPV6_HDRINCL = 0x24 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_MINHOPCOUNT = 0x49 IPV6_MTU = 0x18 IPV6_MTU_DISCOVER = 0x17 IPV6_MULTICAST_ALL = 0x1d IPV6_MULTICAST_HOPS = 0x12 IPV6_MULTICAST_IF = 0x11 IPV6_MULTICAST_LOOP = 0x13 IPV6_NEXTHOP = 0x9 IPV6_ORIGDSTADDR = 0x4a IPV6_PATHMTU = 0x3d 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_RECVERR_RFC4884 = 0x1f IPV6_RECVFRAGSIZE = 0x4d IPV6_RECVHOPLIMIT = 0x33 IPV6_RECVHOPOPTS = 0x35 IPV6_RECVORIGDSTADDR = 0x4a IPV6_RECVPATHMTU = 0x3c IPV6_RECVPKTINFO = 0x31 IPV6_RECVRTHDR = 0x38 IPV6_RECVTCLASS = 0x42 IPV6_ROUTER_ALERT = 0x16 IPV6_ROUTER_ALERT_ISOLATE = 0x1e 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_TRANSPARENT = 0x4b IPV6_UNICAST_HOPS = 0x10 IPV6_UNICAST_IF = 0x4c IPV6_USER_FLOW = 0xe IPV6_V6ONLY = 0x1a IPV6_XFRM_POLICY = 0x23 IP_ADD_MEMBERSHIP = 0x23 IP_ADD_SOURCE_MEMBERSHIP = 0x27 IP_BIND_ADDRESS_NO_PORT = 0x18 IP_BLOCK_SOURCE = 0x26 IP_CHECKSUM = 0x17 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_LOCAL_PORT_RANGE = 0x33 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_PROTOCOL = 0x34 IP_RECVERR = 0xb IP_RECVERR_RFC4884 = 0x1a IP_RECVFRAGSIZE = 0x19 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_USER_FLOW = 0xd IP_XFRM_POLICY = 0x11 ISOFS_SUPER_MAGIC = 0x9660 ISTRIP = 0x20 ITIMER_PROF = 0x2 ITIMER_REAL = 0x0 ITIMER_VIRTUAL = 0x1 IUTF8 = 0x4000 IXANY = 0x800 JFFS2_SUPER_MAGIC = 0x72b6 KCMPROTO_CONNECTED = 0x0 KCM_RECV_DISABLE = 0x1 KEXEC_ARCH_386 = 0x30000 KEXEC_ARCH_68K = 0x40000 KEXEC_ARCH_AARCH64 = 0xb70000 KEXEC_ARCH_ARM = 0x280000 KEXEC_ARCH_DEFAULT = 0x0 KEXEC_ARCH_IA_64 = 0x320000 KEXEC_ARCH_LOONGARCH = 0x1020000 KEXEC_ARCH_MASK = 0xffff0000 KEXEC_ARCH_MIPS = 0x80000 KEXEC_ARCH_MIPS_LE = 0xa0000 KEXEC_ARCH_PARISC = 0xf0000 KEXEC_ARCH_PPC = 0x140000 KEXEC_ARCH_PPC64 = 0x150000 KEXEC_ARCH_RISCV = 0xf30000 KEXEC_ARCH_S390 = 0x160000 KEXEC_ARCH_SH = 0x2a0000 KEXEC_ARCH_X86_64 = 0x3e0000 KEXEC_CRASH_HOTPLUG_SUPPORT = 0x8 KEXEC_FILE_DEBUG = 0x8 KEXEC_FILE_NO_INITRAMFS = 0x4 KEXEC_FILE_ON_CRASH = 0x2 KEXEC_FILE_UNLOAD = 0x1 KEXEC_ON_CRASH = 0x1 KEXEC_PRESERVE_CONTEXT = 0x2 KEXEC_SEGMENT_MAX = 0x10 KEXEC_UPDATE_ELFCOREHDR = 0x4 KEYCTL_ASSUME_AUTHORITY = 0x10 KEYCTL_CAPABILITIES = 0x1f KEYCTL_CAPS0_BIG_KEY = 0x10 KEYCTL_CAPS0_CAPABILITIES = 0x1 KEYCTL_CAPS0_DIFFIE_HELLMAN = 0x4 KEYCTL_CAPS0_INVALIDATE = 0x20 KEYCTL_CAPS0_MOVE = 0x80 KEYCTL_CAPS0_PERSISTENT_KEYRINGS = 0x2 KEYCTL_CAPS0_PUBLIC_KEY = 0x8 KEYCTL_CAPS0_RESTRICT_KEYRING = 0x40 KEYCTL_CAPS1_NOTIFICATIONS = 0x4 KEYCTL_CAPS1_NS_KEYRING_NAME = 0x1 KEYCTL_CAPS1_NS_KEY_TAG = 0x2 KEYCTL_CHOWN = 0x4 KEYCTL_CLEAR = 0x7 KEYCTL_DESCRIBE = 0x6 KEYCTL_DH_COMPUTE = 0x17 KEYCTL_GET_KEYRING_ID = 0x0 KEYCTL_GET_PERSISTENT = 0x16 KEYCTL_GET_SECURITY = 0x11 KEYCTL_INSTANTIATE = 0xc KEYCTL_INSTANTIATE_IOV = 0x14 KEYCTL_INVALIDATE = 0x15 KEYCTL_JOIN_SESSION_KEYRING = 0x1 KEYCTL_LINK = 0x8 KEYCTL_MOVE = 0x1e KEYCTL_MOVE_EXCL = 0x1 KEYCTL_NEGATE = 0xd KEYCTL_PKEY_DECRYPT = 0x1a KEYCTL_PKEY_ENCRYPT = 0x19 KEYCTL_PKEY_QUERY = 0x18 KEYCTL_PKEY_SIGN = 0x1b KEYCTL_PKEY_VERIFY = 0x1c KEYCTL_READ = 0xb KEYCTL_REJECT = 0x13 KEYCTL_RESTRICT_KEYRING = 0x1d KEYCTL_REVOKE = 0x3 KEYCTL_SEARCH = 0xa KEYCTL_SESSION_TO_PARENT = 0x12 KEYCTL_SETPERM = 0x5 KEYCTL_SET_REQKEY_KEYRING = 0xe KEYCTL_SET_TIMEOUT = 0xf KEYCTL_SUPPORTS_DECRYPT = 0x2 KEYCTL_SUPPORTS_ENCRYPT = 0x1 KEYCTL_SUPPORTS_SIGN = 0x4 KEYCTL_SUPPORTS_VERIFY = 0x8 KEYCTL_UNLINK = 0x9 KEYCTL_UPDATE = 0x2 KEYCTL_WATCH_KEY = 0x20 KEY_REQKEY_DEFL_DEFAULT = 0x0 KEY_REQKEY_DEFL_GROUP_KEYRING = 0x6 KEY_REQKEY_DEFL_NO_CHANGE = -0x1 KEY_REQKEY_DEFL_PROCESS_KEYRING = 0x2 KEY_REQKEY_DEFL_REQUESTOR_KEYRING = 0x7 KEY_REQKEY_DEFL_SESSION_KEYRING = 0x3 KEY_REQKEY_DEFL_THREAD_KEYRING = 0x1 KEY_REQKEY_DEFL_USER_KEYRING = 0x4 KEY_REQKEY_DEFL_USER_SESSION_KEYRING = 0x5 KEY_SPEC_GROUP_KEYRING = -0x6 KEY_SPEC_PROCESS_KEYRING = -0x2 KEY_SPEC_REQKEY_AUTH_KEY = -0x7 KEY_SPEC_REQUESTOR_KEYRING = -0x8 KEY_SPEC_SESSION_KEYRING = -0x3 KEY_SPEC_THREAD_KEYRING = -0x1 KEY_SPEC_USER_KEYRING = -0x4 KEY_SPEC_USER_SESSION_KEYRING = -0x5 LANDLOCK_ACCESS_FS_EXECUTE = 0x1 LANDLOCK_ACCESS_FS_IOCTL_DEV = 0x8000 LANDLOCK_ACCESS_FS_MAKE_BLOCK = 0x800 LANDLOCK_ACCESS_FS_MAKE_CHAR = 0x40 LANDLOCK_ACCESS_FS_MAKE_DIR = 0x80 LANDLOCK_ACCESS_FS_MAKE_FIFO = 0x400 LANDLOCK_ACCESS_FS_MAKE_REG = 0x100 LANDLOCK_ACCESS_FS_MAKE_SOCK = 0x200 LANDLOCK_ACCESS_FS_MAKE_SYM = 0x1000 LANDLOCK_ACCESS_FS_READ_DIR = 0x8 LANDLOCK_ACCESS_FS_READ_FILE = 0x4 LANDLOCK_ACCESS_FS_REFER = 0x2000 LANDLOCK_ACCESS_FS_REMOVE_DIR = 0x10 LANDLOCK_ACCESS_FS_REMOVE_FILE = 0x20 LANDLOCK_ACCESS_FS_TRUNCATE = 0x4000 LANDLOCK_ACCESS_FS_WRITE_FILE = 0x2 LANDLOCK_ACCESS_NET_BIND_TCP = 0x1 LANDLOCK_ACCESS_NET_CONNECT_TCP = 0x2 LANDLOCK_CREATE_RULESET_VERSION = 0x1 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 LOOP_CLR_FD = 0x4c01 LOOP_CONFIGURE = 0x4c0a LOOP_CTL_ADD = 0x4c80 LOOP_CTL_GET_FREE = 0x4c82 LOOP_CTL_REMOVE = 0x4c81 LOOP_GET_STATUS = 0x4c03 LOOP_GET_STATUS64 = 0x4c05 LOOP_SET_BLOCK_SIZE = 0x4c09 LOOP_SET_CAPACITY = 0x4c07 LOOP_SET_DIRECT_IO = 0x4c08 LOOP_SET_FD = 0x4c00 LOOP_SET_STATUS = 0x4c02 LOOP_SET_STATUS64 = 0x4c04 LOOP_SET_STATUS_CLEARABLE_FLAGS = 0x4 LOOP_SET_STATUS_SETTABLE_FLAGS = 0xc LO_KEY_SIZE = 0x20 LO_NAME_SIZE = 0x40 LWTUNNEL_IP6_MAX = 0x8 LWTUNNEL_IP_MAX = 0x8 LWTUNNEL_IP_OPTS_MAX = 0x3 LWTUNNEL_IP_OPT_ERSPAN_MAX = 0x4 LWTUNNEL_IP_OPT_GENEVE_MAX = 0x3 LWTUNNEL_IP_OPT_VXLAN_MAX = 0x1 MADV_COLD = 0x14 MADV_COLLAPSE = 0x19 MADV_DODUMP = 0x11 MADV_DOFORK = 0xb MADV_DONTDUMP = 0x10 MADV_DONTFORK = 0xa MADV_DONTNEED = 0x4 MADV_DONTNEED_LOCKED = 0x18 MADV_FREE = 0x8 MADV_HUGEPAGE = 0xe MADV_HWPOISON = 0x64 MADV_KEEPONFORK = 0x13 MADV_MERGEABLE = 0xc MADV_NOHUGEPAGE = 0xf MADV_NORMAL = 0x0 MADV_PAGEOUT = 0x15 MADV_POPULATE_READ = 0x16 MADV_POPULATE_WRITE = 0x17 MADV_RANDOM = 0x1 MADV_REMOVE = 0x9 MADV_SEQUENTIAL = 0x2 MADV_UNMERGEABLE = 0xd MADV_WILLNEED = 0x3 MADV_WIPEONFORK = 0x12 MAP_FILE = 0x0 MAP_FIXED = 0x10 MAP_FIXED_NOREPLACE = 0x100000 MAP_HUGE_16GB = 0x88000000 MAP_HUGE_16KB = 0x38000000 MAP_HUGE_16MB = 0x60000000 MAP_HUGE_1GB = 0x78000000 MAP_HUGE_1MB = 0x50000000 MAP_HUGE_256MB = 0x70000000 MAP_HUGE_2GB = 0x7c000000 MAP_HUGE_2MB = 0x54000000 MAP_HUGE_32MB = 0x64000000 MAP_HUGE_512KB = 0x4c000000 MAP_HUGE_512MB = 0x74000000 MAP_HUGE_64KB = 0x40000000 MAP_HUGE_8MB = 0x5c000000 MAP_HUGE_MASK = 0x3f MAP_HUGE_SHIFT = 0x1a MAP_PRIVATE = 0x2 MAP_SHARED = 0x1 MAP_SHARED_VALIDATE = 0x3 MAP_TYPE = 0xf MCAST_BLOCK_SOURCE = 0x2b MCAST_EXCLUDE = 0x0 MCAST_INCLUDE = 0x1 MCAST_JOIN_GROUP = 0x2a MCAST_JOIN_SOURCE_GROUP = 0x2e MCAST_LEAVE_GROUP = 0x2d MCAST_LEAVE_SOURCE_GROUP = 0x2f MCAST_MSFILTER = 0x30 MCAST_UNBLOCK_SOURCE = 0x2c MEMGETREGIONINFO = 0xc0104d08 MEMREADOOB64 = 0xc0184d16 MEMWRITE = 0xc0304d18 MEMWRITEOOB64 = 0xc0184d15 MFD_ALLOW_SEALING = 0x2 MFD_CLOEXEC = 0x1 MFD_EXEC = 0x10 MFD_HUGETLB = 0x4 MFD_HUGE_16GB = 0x88000000 MFD_HUGE_16MB = 0x60000000 MFD_HUGE_1GB = 0x78000000 MFD_HUGE_1MB = 0x50000000 MFD_HUGE_256MB = 0x70000000 MFD_HUGE_2GB = 0x7c000000 MFD_HUGE_2MB = 0x54000000 MFD_HUGE_32MB = 0x64000000 MFD_HUGE_512KB = 0x4c000000 MFD_HUGE_512MB = 0x74000000 MFD_HUGE_64KB = 0x40000000 MFD_HUGE_8MB = 0x5c000000 MFD_HUGE_MASK = 0x3f MFD_HUGE_SHIFT = 0x1a MFD_NOEXEC_SEAL = 0x8 MINIX2_SUPER_MAGIC = 0x2468 MINIX2_SUPER_MAGIC2 = 0x2478 MINIX3_SUPER_MAGIC = 0x4d5a MINIX_SUPER_MAGIC = 0x137f MINIX_SUPER_MAGIC2 = 0x138f MNT_DETACH = 0x2 MNT_EXPIRE = 0x4 MNT_FORCE = 0x1 MNT_ID_REQ_SIZE_VER0 = 0x18 MODULE_INIT_COMPRESSED_FILE = 0x4 MODULE_INIT_IGNORE_MODVERSIONS = 0x1 MODULE_INIT_IGNORE_VERMAGIC = 0x2 MOUNT_ATTR_IDMAP = 0x100000 MOUNT_ATTR_NOATIME = 0x10 MOUNT_ATTR_NODEV = 0x4 MOUNT_ATTR_NODIRATIME = 0x80 MOUNT_ATTR_NOEXEC = 0x8 MOUNT_ATTR_NOSUID = 0x2 MOUNT_ATTR_NOSYMFOLLOW = 0x200000 MOUNT_ATTR_RDONLY = 0x1 MOUNT_ATTR_RELATIME = 0x0 MOUNT_ATTR_SIZE_VER0 = 0x20 MOUNT_ATTR_STRICTATIME = 0x20 MOUNT_ATTR__ATIME = 0x70 MREMAP_DONTUNMAP = 0x4 MREMAP_FIXED = 0x2 MREMAP_MAYMOVE = 0x1 MSDOS_SUPER_MAGIC = 0x4d44 MSG_BATCH = 0x40000 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 MSG_ZEROCOPY = 0x4000000 MS_ACTIVE = 0x40000000 MS_ASYNC = 0x1 MS_BIND = 0x1000 MS_BORN = 0x20000000 MS_DIRSYNC = 0x80 MS_INVALIDATE = 0x2 MS_I_VERSION = 0x800000 MS_KERNMOUNT = 0x400000 MS_LAZYTIME = 0x2000000 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_NOREMOTELOCK = 0x8000000 MS_NOSEC = 0x10000000 MS_NOSUID = 0x2 MS_NOSYMFOLLOW = 0x100 MS_NOUSER = -0x80000000 MS_POSIXACL = 0x10000 MS_PRIVATE = 0x40000 MS_RDONLY = 0x1 MS_REC = 0x4000 MS_RELATIME = 0x200000 MS_REMOUNT = 0x20 MS_RMT_MASK = 0x2800051 MS_SHARED = 0x100000 MS_SILENT = 0x8000 MS_SLAVE = 0x80000 MS_STRICTATIME = 0x1000000 MS_SUBMOUNT = 0x4000000 MS_SYNC = 0x4 MS_SYNCHRONOUS = 0x10 MS_UNBINDABLE = 0x20000 MS_VERBOSE = 0x8000 MTD_ABSENT = 0x0 MTD_BIT_WRITEABLE = 0x800 MTD_CAP_NANDFLASH = 0x400 MTD_CAP_NORFLASH = 0xc00 MTD_CAP_NVRAM = 0x1c00 MTD_CAP_RAM = 0x1c00 MTD_CAP_ROM = 0x0 MTD_DATAFLASH = 0x6 MTD_INODE_FS_MAGIC = 0x11307854 MTD_MAX_ECCPOS_ENTRIES = 0x40 MTD_MAX_OOBFREE_ENTRIES = 0x8 MTD_MLCNANDFLASH = 0x8 MTD_NANDECC_AUTOPLACE = 0x2 MTD_NANDECC_AUTOPL_USR = 0x4 MTD_NANDECC_OFF = 0x0 MTD_NANDECC_PLACE = 0x1 MTD_NANDECC_PLACEONLY = 0x3 MTD_NANDFLASH = 0x4 MTD_NORFLASH = 0x3 MTD_NO_ERASE = 0x1000 MTD_OTP_FACTORY = 0x1 MTD_OTP_OFF = 0x0 MTD_OTP_USER = 0x2 MTD_POWERUP_LOCK = 0x2000 MTD_RAM = 0x1 MTD_ROM = 0x2 MTD_SLC_ON_MLC_EMULATION = 0x4000 MTD_UBIVOLUME = 0x7 MTD_WRITEABLE = 0x400 NAME_MAX = 0xff NCP_SUPER_MAGIC = 0x564c NETLINK_ADD_MEMBERSHIP = 0x1 NETLINK_AUDIT = 0x9 NETLINK_BROADCAST_ERROR = 0x4 NETLINK_CAP_ACK = 0xa NETLINK_CONNECTOR = 0xb NETLINK_CRYPTO = 0x15 NETLINK_DNRTMSG = 0xe NETLINK_DROP_MEMBERSHIP = 0x2 NETLINK_ECRYPTFS = 0x13 NETLINK_EXT_ACK = 0xb NETLINK_FIB_LOOKUP = 0xa NETLINK_FIREWALL = 0x3 NETLINK_GENERIC = 0x10 NETLINK_GET_STRICT_CHK = 0xc NETLINK_INET_DIAG = 0x4 NETLINK_IP6_FW = 0xd NETLINK_ISCSI = 0x8 NETLINK_KOBJECT_UEVENT = 0xf NETLINK_LISTEN_ALL_NSID = 0x8 NETLINK_LIST_MEMBERSHIPS = 0x9 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_SMC = 0x16 NETLINK_SOCK_DIAG = 0x4 NETLINK_TX_RING = 0x7 NETLINK_UNUSED = 0x1 NETLINK_USERSOCK = 0x2 NETLINK_XFRM = 0x6 NETNSA_MAX = 0x5 NETNSA_NSID_NOT_ASSIGNED = -0x1 NFC_ATR_REQ_GB_MAXSIZE = 0x30 NFC_ATR_REQ_MAXSIZE = 0x40 NFC_ATR_RES_GB_MAXSIZE = 0x2f NFC_ATR_RES_MAXSIZE = 0x40 NFC_COMM_ACTIVE = 0x0 NFC_COMM_PASSIVE = 0x1 NFC_DEVICE_NAME_MAXSIZE = 0x8 NFC_DIRECTION_RX = 0x0 NFC_DIRECTION_TX = 0x1 NFC_FIRMWARE_NAME_MAXSIZE = 0x20 NFC_GB_MAXSIZE = 0x30 NFC_GENL_MCAST_EVENT_NAME = "events" NFC_GENL_NAME = "nfc" NFC_GENL_VERSION = 0x1 NFC_HEADER_SIZE = 0x1 NFC_ISO15693_UID_MAXSIZE = 0x8 NFC_LLCP_MAX_SERVICE_NAME = 0x3f NFC_LLCP_MIUX = 0x1 NFC_LLCP_REMOTE_LTO = 0x3 NFC_LLCP_REMOTE_MIU = 0x2 NFC_LLCP_REMOTE_RW = 0x4 NFC_LLCP_RW = 0x0 NFC_NFCID1_MAXSIZE = 0xa NFC_NFCID2_MAXSIZE = 0x8 NFC_NFCID3_MAXSIZE = 0xa NFC_PROTO_FELICA = 0x3 NFC_PROTO_FELICA_MASK = 0x8 NFC_PROTO_ISO14443 = 0x4 NFC_PROTO_ISO14443_B = 0x6 NFC_PROTO_ISO14443_B_MASK = 0x40 NFC_PROTO_ISO14443_MASK = 0x10 NFC_PROTO_ISO15693 = 0x7 NFC_PROTO_ISO15693_MASK = 0x80 NFC_PROTO_JEWEL = 0x1 NFC_PROTO_JEWEL_MASK = 0x2 NFC_PROTO_MAX = 0x8 NFC_PROTO_MIFARE = 0x2 NFC_PROTO_MIFARE_MASK = 0x4 NFC_PROTO_NFC_DEP = 0x5 NFC_PROTO_NFC_DEP_MASK = 0x20 NFC_RAW_HEADER_SIZE = 0x2 NFC_RF_INITIATOR = 0x0 NFC_RF_NONE = 0x2 NFC_RF_TARGET = 0x1 NFC_SENSB_RES_MAXSIZE = 0xc NFC_SENSF_RES_MAXSIZE = 0x12 NFC_SE_DISABLED = 0x0 NFC_SE_EMBEDDED = 0x2 NFC_SE_ENABLED = 0x1 NFC_SE_UICC = 0x1 NFC_SOCKPROTO_LLCP = 0x1 NFC_SOCKPROTO_MAX = 0x2 NFC_SOCKPROTO_RAW = 0x0 NFNETLINK_V0 = 0x0 NFNLGRP_ACCT_QUOTA = 0x8 NFNLGRP_CONNTRACK_DESTROY = 0x3 NFNLGRP_CONNTRACK_EXP_DESTROY = 0x6 NFNLGRP_CONNTRACK_EXP_NEW = 0x4 NFNLGRP_CONNTRACK_EXP_UPDATE = 0x5 NFNLGRP_CONNTRACK_NEW = 0x1 NFNLGRP_CONNTRACK_UPDATE = 0x2 NFNLGRP_MAX = 0x9 NFNLGRP_NFTABLES = 0x7 NFNLGRP_NFTRACE = 0x9 NFNLGRP_NONE = 0x0 NFNL_BATCH_MAX = 0x1 NFNL_MSG_BATCH_BEGIN = 0x10 NFNL_MSG_BATCH_END = 0x11 NFNL_NFA_NEST = 0x8000 NFNL_SUBSYS_ACCT = 0x7 NFNL_SUBSYS_COUNT = 0xd NFNL_SUBSYS_CTHELPER = 0x9 NFNL_SUBSYS_CTNETLINK = 0x1 NFNL_SUBSYS_CTNETLINK_EXP = 0x2 NFNL_SUBSYS_CTNETLINK_TIMEOUT = 0x8 NFNL_SUBSYS_HOOK = 0xc NFNL_SUBSYS_IPSET = 0x6 NFNL_SUBSYS_NFTABLES = 0xa NFNL_SUBSYS_NFT_COMPAT = 0xb NFNL_SUBSYS_NONE = 0x0 NFNL_SUBSYS_OSF = 0x5 NFNL_SUBSYS_QUEUE = 0x3 NFNL_SUBSYS_ULOG = 0x4 NFS_SUPER_MAGIC = 0x6969 NFT_CHAIN_FLAGS = 0x7 NFT_CHAIN_MAXNAMELEN = 0x100 NFT_CT_MAX = 0x17 NFT_DATA_RESERVED_MASK = 0xffffff00 NFT_DATA_VALUE_MAXLEN = 0x40 NFT_EXTHDR_OP_MAX = 0x4 NFT_FIB_RESULT_MAX = 0x3 NFT_INNER_MASK = 0xf NFT_LOGLEVEL_MAX = 0x8 NFT_NAME_MAXLEN = 0x100 NFT_NG_MAX = 0x1 NFT_OBJECT_CONNLIMIT = 0x5 NFT_OBJECT_COUNTER = 0x1 NFT_OBJECT_CT_EXPECT = 0x9 NFT_OBJECT_CT_HELPER = 0x3 NFT_OBJECT_CT_TIMEOUT = 0x7 NFT_OBJECT_LIMIT = 0x4 NFT_OBJECT_MAX = 0xa NFT_OBJECT_QUOTA = 0x2 NFT_OBJECT_SECMARK = 0x8 NFT_OBJECT_SYNPROXY = 0xa NFT_OBJECT_TUNNEL = 0x6 NFT_OBJECT_UNSPEC = 0x0 NFT_OBJ_MAXNAMELEN = 0x100 NFT_OSF_MAXGENRELEN = 0x10 NFT_QUEUE_FLAG_BYPASS = 0x1 NFT_QUEUE_FLAG_CPU_FANOUT = 0x2 NFT_QUEUE_FLAG_MASK = 0x3 NFT_REG32_COUNT = 0x10 NFT_REG32_SIZE = 0x4 NFT_REG_MAX = 0x4 NFT_REG_SIZE = 0x10 NFT_REJECT_ICMPX_MAX = 0x3 NFT_RT_MAX = 0x4 NFT_SECMARK_CTX_MAXLEN = 0x100 NFT_SET_MAXNAMELEN = 0x100 NFT_SOCKET_MAX = 0x3 NFT_TABLE_F_MASK = 0x7 NFT_TABLE_MAXNAMELEN = 0x100 NFT_TRACETYPE_MAX = 0x3 NFT_TUNNEL_F_MASK = 0x7 NFT_TUNNEL_MAX = 0x1 NFT_TUNNEL_MODE_MAX = 0x2 NFT_USERDATA_MAXLEN = 0x100 NFT_XFRM_KEY_MAX = 0x6 NF_NAT_RANGE_MAP_IPS = 0x1 NF_NAT_RANGE_MASK = 0x7f NF_NAT_RANGE_NETMAP = 0x40 NF_NAT_RANGE_PERSISTENT = 0x8 NF_NAT_RANGE_PROTO_OFFSET = 0x20 NF_NAT_RANGE_PROTO_RANDOM = 0x4 NF_NAT_RANGE_PROTO_RANDOM_ALL = 0x14 NF_NAT_RANGE_PROTO_RANDOM_FULLY = 0x10 NF_NAT_RANGE_PROTO_SPECIFIED = 0x2 NILFS_SUPER_MAGIC = 0x3434 NL0 = 0x0 NL1 = 0x100 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_ACK_TLVS = 0x200 NLM_F_APPEND = 0x800 NLM_F_ATOMIC = 0x400 NLM_F_BULK = 0x200 NLM_F_CAPPED = 0x100 NLM_F_CREATE = 0x400 NLM_F_DUMP = 0x300 NLM_F_DUMP_FILTERED = 0x20 NLM_F_DUMP_INTR = 0x10 NLM_F_ECHO = 0x8 NLM_F_EXCL = 0x200 NLM_F_MATCH = 0x200 NLM_F_MULTI = 0x2 NLM_F_NONREC = 0x100 NLM_F_REPLACE = 0x100 NLM_F_REQUEST = 0x1 NLM_F_ROOT = 0x100 NSFS_MAGIC = 0x6e736673 OCFS2_SUPER_MAGIC = 0x7461636f OCRNL = 0x8 OFDEL = 0x80 OFILL = 0x40 ONLRET = 0x20 ONOCR = 0x10 OPENPROM_SUPER_MAGIC = 0x9fa1 OPOST = 0x1 OVERLAYFS_SUPER_MAGIC = 0x794c7630 O_ACCMODE = 0x3 O_RDONLY = 0x0 O_RDWR = 0x2 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_CBPF = 0x6 PACKET_FANOUT_CPU = 0x2 PACKET_FANOUT_DATA = 0x16 PACKET_FANOUT_EBPF = 0x7 PACKET_FANOUT_FLAG_DEFRAG = 0x8000 PACKET_FANOUT_FLAG_IGNORE_OUTGOING = 0x4000 PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 PACKET_FANOUT_FLAG_UNIQUEID = 0x2000 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_IGNORE_OUTGOING = 0x17 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_ROLLOVER_STATS = 0x15 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 PACKET_VNET_HDR_SZ = 0x18 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 PERF_ATTR_SIZE_VER0 = 0x40 PERF_ATTR_SIZE_VER1 = 0x48 PERF_ATTR_SIZE_VER2 = 0x50 PERF_ATTR_SIZE_VER3 = 0x60 PERF_ATTR_SIZE_VER4 = 0x68 PERF_ATTR_SIZE_VER5 = 0x70 PERF_ATTR_SIZE_VER6 = 0x78 PERF_ATTR_SIZE_VER7 = 0x80 PERF_ATTR_SIZE_VER8 = 0x88 PERF_AUX_FLAG_COLLISION = 0x8 PERF_AUX_FLAG_CORESIGHT_FORMAT_CORESIGHT = 0x0 PERF_AUX_FLAG_CORESIGHT_FORMAT_RAW = 0x100 PERF_AUX_FLAG_OVERWRITE = 0x2 PERF_AUX_FLAG_PARTIAL = 0x4 PERF_AUX_FLAG_PMU_FORMAT_TYPE_MASK = 0xff00 PERF_AUX_FLAG_TRUNCATED = 0x1 PERF_BRANCH_ENTRY_INFO_BITS_MAX = 0x21 PERF_BR_ARM64_DEBUG_DATA = 0x7 PERF_BR_ARM64_DEBUG_EXIT = 0x5 PERF_BR_ARM64_DEBUG_HALT = 0x4 PERF_BR_ARM64_DEBUG_INST = 0x6 PERF_BR_ARM64_FIQ = 0x3 PERF_FLAG_FD_CLOEXEC = 0x8 PERF_FLAG_FD_NO_GROUP = 0x1 PERF_FLAG_FD_OUTPUT = 0x2 PERF_FLAG_PID_CGROUP = 0x4 PERF_HW_EVENT_MASK = 0xffffffff PERF_MAX_CONTEXTS_PER_STACK = 0x8 PERF_MAX_STACK_DEPTH = 0x7f PERF_MEM_BLK_ADDR = 0x4 PERF_MEM_BLK_DATA = 0x2 PERF_MEM_BLK_NA = 0x1 PERF_MEM_BLK_SHIFT = 0x28 PERF_MEM_HOPS_0 = 0x1 PERF_MEM_HOPS_1 = 0x2 PERF_MEM_HOPS_2 = 0x3 PERF_MEM_HOPS_3 = 0x4 PERF_MEM_HOPS_SHIFT = 0x2b PERF_MEM_LOCK_LOCKED = 0x2 PERF_MEM_LOCK_NA = 0x1 PERF_MEM_LOCK_SHIFT = 0x18 PERF_MEM_LVLNUM_ANY_CACHE = 0xb PERF_MEM_LVLNUM_CXL = 0x9 PERF_MEM_LVLNUM_IO = 0xa PERF_MEM_LVLNUM_L1 = 0x1 PERF_MEM_LVLNUM_L2 = 0x2 PERF_MEM_LVLNUM_L3 = 0x3 PERF_MEM_LVLNUM_L4 = 0x4 PERF_MEM_LVLNUM_LFB = 0xc PERF_MEM_LVLNUM_NA = 0xf PERF_MEM_LVLNUM_PMEM = 0xe PERF_MEM_LVLNUM_RAM = 0xd PERF_MEM_LVLNUM_SHIFT = 0x21 PERF_MEM_LVLNUM_UNC = 0x8 PERF_MEM_LVL_HIT = 0x2 PERF_MEM_LVL_IO = 0x1000 PERF_MEM_LVL_L1 = 0x8 PERF_MEM_LVL_L2 = 0x20 PERF_MEM_LVL_L3 = 0x40 PERF_MEM_LVL_LFB = 0x10 PERF_MEM_LVL_LOC_RAM = 0x80 PERF_MEM_LVL_MISS = 0x4 PERF_MEM_LVL_NA = 0x1 PERF_MEM_LVL_REM_CCE1 = 0x400 PERF_MEM_LVL_REM_CCE2 = 0x800 PERF_MEM_LVL_REM_RAM1 = 0x100 PERF_MEM_LVL_REM_RAM2 = 0x200 PERF_MEM_LVL_SHIFT = 0x5 PERF_MEM_LVL_UNC = 0x2000 PERF_MEM_OP_EXEC = 0x10 PERF_MEM_OP_LOAD = 0x2 PERF_MEM_OP_NA = 0x1 PERF_MEM_OP_PFETCH = 0x8 PERF_MEM_OP_SHIFT = 0x0 PERF_MEM_OP_STORE = 0x4 PERF_MEM_REMOTE_REMOTE = 0x1 PERF_MEM_REMOTE_SHIFT = 0x25 PERF_MEM_SNOOPX_FWD = 0x1 PERF_MEM_SNOOPX_PEER = 0x2 PERF_MEM_SNOOPX_SHIFT = 0x26 PERF_MEM_SNOOP_HIT = 0x4 PERF_MEM_SNOOP_HITM = 0x10 PERF_MEM_SNOOP_MISS = 0x8 PERF_MEM_SNOOP_NA = 0x1 PERF_MEM_SNOOP_NONE = 0x2 PERF_MEM_SNOOP_SHIFT = 0x13 PERF_MEM_TLB_HIT = 0x2 PERF_MEM_TLB_L1 = 0x8 PERF_MEM_TLB_L2 = 0x10 PERF_MEM_TLB_MISS = 0x4 PERF_MEM_TLB_NA = 0x1 PERF_MEM_TLB_OS = 0x40 PERF_MEM_TLB_SHIFT = 0x1a PERF_MEM_TLB_WK = 0x20 PERF_PMU_TYPE_SHIFT = 0x20 PERF_RECORD_KSYMBOL_FLAGS_UNREGISTER = 0x1 PERF_RECORD_MISC_COMM_EXEC = 0x2000 PERF_RECORD_MISC_CPUMODE_MASK = 0x7 PERF_RECORD_MISC_CPUMODE_UNKNOWN = 0x0 PERF_RECORD_MISC_EXACT_IP = 0x4000 PERF_RECORD_MISC_EXT_RESERVED = 0x8000 PERF_RECORD_MISC_FORK_EXEC = 0x2000 PERF_RECORD_MISC_GUEST_KERNEL = 0x4 PERF_RECORD_MISC_GUEST_USER = 0x5 PERF_RECORD_MISC_HYPERVISOR = 0x3 PERF_RECORD_MISC_KERNEL = 0x1 PERF_RECORD_MISC_MMAP_BUILD_ID = 0x4000 PERF_RECORD_MISC_MMAP_DATA = 0x2000 PERF_RECORD_MISC_PROC_MAP_PARSE_TIMEOUT = 0x1000 PERF_RECORD_MISC_SWITCH_OUT = 0x2000 PERF_RECORD_MISC_SWITCH_OUT_PREEMPT = 0x4000 PERF_RECORD_MISC_USER = 0x2 PERF_SAMPLE_BRANCH_PLM_ALL = 0x7 PERF_SAMPLE_WEIGHT_TYPE = 0x1004000 PID_FS_MAGIC = 0x50494446 PIPEFS_MAGIC = 0x50495045 PPPIOCGNPMODE = 0xc008744c PPPIOCNEWUNIT = 0xc004743e PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 PROC_SUPER_MAGIC = 0x9fa0 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_CAP_AMBIENT = 0x2f PR_CAP_AMBIENT_CLEAR_ALL = 0x4 PR_CAP_AMBIENT_IS_SET = 0x1 PR_CAP_AMBIENT_LOWER = 0x3 PR_CAP_AMBIENT_RAISE = 0x2 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_FP_MODE_FR = 0x1 PR_FP_MODE_FRE = 0x2 PR_GET_AUXV = 0x41555856 PR_GET_CHILD_SUBREAPER = 0x25 PR_GET_DUMPABLE = 0x3 PR_GET_ENDIAN = 0x13 PR_GET_FPEMU = 0x9 PR_GET_FPEXC = 0xb PR_GET_FP_MODE = 0x2e PR_GET_IO_FLUSHER = 0x3a PR_GET_KEEPCAPS = 0x7 PR_GET_MDWE = 0x42 PR_GET_MEMORY_MERGE = 0x44 PR_GET_NAME = 0x10 PR_GET_NO_NEW_PRIVS = 0x27 PR_GET_PDEATHSIG = 0x2 PR_GET_SECCOMP = 0x15 PR_GET_SECUREBITS = 0x1b PR_GET_SPECULATION_CTRL = 0x34 PR_GET_TAGGED_ADDR_CTRL = 0x38 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_MDWE_NO_INHERIT = 0x2 PR_MDWE_REFUSE_EXEC_GAIN = 0x1 PR_MPX_DISABLE_MANAGEMENT = 0x2c PR_MPX_ENABLE_MANAGEMENT = 0x2b PR_MTE_TAG_MASK = 0x7fff8 PR_MTE_TAG_SHIFT = 0x3 PR_MTE_TCF_ASYNC = 0x4 PR_MTE_TCF_MASK = 0x6 PR_MTE_TCF_NONE = 0x0 PR_MTE_TCF_SHIFT = 0x1 PR_MTE_TCF_SYNC = 0x2 PR_PAC_APDAKEY = 0x4 PR_PAC_APDBKEY = 0x8 PR_PAC_APGAKEY = 0x10 PR_PAC_APIAKEY = 0x1 PR_PAC_APIBKEY = 0x2 PR_PAC_GET_ENABLED_KEYS = 0x3d PR_PAC_RESET_KEYS = 0x36 PR_PAC_SET_ENABLED_KEYS = 0x3c PR_PPC_DEXCR_CTRL_CLEAR = 0x4 PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC = 0x10 PR_PPC_DEXCR_CTRL_EDITABLE = 0x1 PR_PPC_DEXCR_CTRL_MASK = 0x1f PR_PPC_DEXCR_CTRL_SET = 0x2 PR_PPC_DEXCR_CTRL_SET_ONEXEC = 0x8 PR_PPC_DEXCR_IBRTPD = 0x1 PR_PPC_DEXCR_NPHIE = 0x3 PR_PPC_DEXCR_SBHE = 0x0 PR_PPC_DEXCR_SRAPD = 0x2 PR_PPC_GET_DEXCR = 0x48 PR_PPC_SET_DEXCR = 0x49 PR_RISCV_CTX_SW_FENCEI_OFF = 0x1 PR_RISCV_CTX_SW_FENCEI_ON = 0x0 PR_RISCV_SCOPE_PER_PROCESS = 0x0 PR_RISCV_SCOPE_PER_THREAD = 0x1 PR_RISCV_SET_ICACHE_FLUSH_CTX = 0x47 PR_RISCV_V_GET_CONTROL = 0x46 PR_RISCV_V_SET_CONTROL = 0x45 PR_RISCV_V_VSTATE_CTRL_CUR_MASK = 0x3 PR_RISCV_V_VSTATE_CTRL_DEFAULT = 0x0 PR_RISCV_V_VSTATE_CTRL_INHERIT = 0x10 PR_RISCV_V_VSTATE_CTRL_MASK = 0x1f PR_RISCV_V_VSTATE_CTRL_NEXT_MASK = 0xc PR_RISCV_V_VSTATE_CTRL_OFF = 0x1 PR_RISCV_V_VSTATE_CTRL_ON = 0x2 PR_SCHED_CORE = 0x3e PR_SCHED_CORE_CREATE = 0x1 PR_SCHED_CORE_GET = 0x0 PR_SCHED_CORE_MAX = 0x4 PR_SCHED_CORE_SCOPE_PROCESS_GROUP = 0x2 PR_SCHED_CORE_SCOPE_THREAD = 0x0 PR_SCHED_CORE_SCOPE_THREAD_GROUP = 0x1 PR_SCHED_CORE_SHARE_FROM = 0x3 PR_SCHED_CORE_SHARE_TO = 0x2 PR_SET_CHILD_SUBREAPER = 0x24 PR_SET_DUMPABLE = 0x4 PR_SET_ENDIAN = 0x14 PR_SET_FPEMU = 0xa PR_SET_FPEXC = 0xc PR_SET_FP_MODE = 0x2d PR_SET_IO_FLUSHER = 0x39 PR_SET_KEEPCAPS = 0x8 PR_SET_MDWE = 0x41 PR_SET_MEMORY_MERGE = 0x43 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_SECCOMP = 0x16 PR_SET_SECUREBITS = 0x1c PR_SET_SPECULATION_CTRL = 0x35 PR_SET_SYSCALL_USER_DISPATCH = 0x3b PR_SET_TAGGED_ADDR_CTRL = 0x37 PR_SET_THP_DISABLE = 0x29 PR_SET_TIMERSLACK = 0x1d PR_SET_TIMING = 0xe PR_SET_TSC = 0x1a PR_SET_UNALIGN = 0x6 PR_SET_VMA = 0x53564d41 PR_SET_VMA_ANON_NAME = 0x0 PR_SME_GET_VL = 0x40 PR_SME_SET_VL = 0x3f PR_SME_SET_VL_ONEXEC = 0x40000 PR_SME_VL_INHERIT = 0x20000 PR_SME_VL_LEN_MASK = 0xffff PR_SPEC_DISABLE = 0x4 PR_SPEC_DISABLE_NOEXEC = 0x10 PR_SPEC_ENABLE = 0x2 PR_SPEC_FORCE_DISABLE = 0x8 PR_SPEC_INDIRECT_BRANCH = 0x1 PR_SPEC_L1D_FLUSH = 0x2 PR_SPEC_NOT_AFFECTED = 0x0 PR_SPEC_PRCTL = 0x1 PR_SPEC_STORE_BYPASS = 0x0 PR_SVE_GET_VL = 0x33 PR_SVE_SET_VL = 0x32 PR_SVE_SET_VL_ONEXEC = 0x40000 PR_SVE_VL_INHERIT = 0x20000 PR_SVE_VL_LEN_MASK = 0xffff PR_SYS_DISPATCH_OFF = 0x0 PR_SYS_DISPATCH_ON = 0x1 PR_TAGGED_ADDR_ENABLE = 0x1 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 PSTOREFS_MAGIC = 0x6165676c PTRACE_ATTACH = 0x10 PTRACE_CONT = 0x7 PTRACE_DETACH = 0x11 PTRACE_EVENTMSG_SYSCALL_ENTRY = 0x1 PTRACE_EVENTMSG_SYSCALL_EXIT = 0x2 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_GET_RSEQ_CONFIGURATION = 0x420f PTRACE_GET_SYSCALL_INFO = 0x420e PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG = 0x4211 PTRACE_INTERRUPT = 0x4207 PTRACE_KILL = 0x8 PTRACE_LISTEN = 0x4208 PTRACE_O_EXITKILL = 0x100000 PTRACE_O_MASK = 0x3000ff PTRACE_O_SUSPEND_SECCOMP = 0x200000 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_SECCOMP_GET_FILTER = 0x420c PTRACE_SECCOMP_GET_METADATA = 0x420d PTRACE_SEIZE = 0x4206 PTRACE_SETOPTIONS = 0x4200 PTRACE_SETREGS = 0xd PTRACE_SETREGSET = 0x4205 PTRACE_SETSIGINFO = 0x4203 PTRACE_SETSIGMASK = 0x420b PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG = 0x4210 PTRACE_SINGLESTEP = 0x9 PTRACE_SYSCALL = 0x18 PTRACE_SYSCALL_INFO_ENTRY = 0x1 PTRACE_SYSCALL_INFO_EXIT = 0x2 PTRACE_SYSCALL_INFO_NONE = 0x0 PTRACE_SYSCALL_INFO_SECCOMP = 0x3 PTRACE_TRACEME = 0x0 P_ALL = 0x0 P_PGID = 0x2 P_PID = 0x1 P_PIDFD = 0x3 QNX4_SUPER_MAGIC = 0x2f QNX6_SUPER_MAGIC = 0x68191122 RAMFS_MAGIC = 0x858458f6 RAW_PAYLOAD_DIGITAL = 0x3 RAW_PAYLOAD_HCI = 0x2 RAW_PAYLOAD_LLCP = 0x0 RAW_PAYLOAD_NCI = 0x1 RAW_PAYLOAD_PROPRIETARY = 0x4 RDTGROUP_SUPER_MAGIC = 0x7655821 REISERFS_SUPER_MAGIC = 0x52654973 RENAME_EXCHANGE = 0x2 RENAME_NOREPLACE = 0x1 RENAME_WHITEOUT = 0x4 RLIMIT_CORE = 0x4 RLIMIT_CPU = 0x0 RLIMIT_DATA = 0x2 RLIMIT_FSIZE = 0x1 RLIMIT_LOCKS = 0xa RLIMIT_MSGQUEUE = 0xc RLIMIT_NICE = 0xd RLIMIT_RTPRIO = 0xe RLIMIT_RTTIME = 0xf RLIMIT_SIGPENDING = 0xb RLIMIT_STACK = 0x3 RLIM_INFINITY = 0xffffffffffffffff RTAX_ADVMSS = 0x8 RTAX_CC_ALGO = 0x10 RTAX_CWND = 0x7 RTAX_FASTOPEN_NO_COOKIE = 0x11 RTAX_FEATURES = 0xc RTAX_FEATURE_ALLFRAG = 0x8 RTAX_FEATURE_ECN = 0x1 RTAX_FEATURE_MASK = 0x1f RTAX_FEATURE_SACK = 0x2 RTAX_FEATURE_TCP_USEC_TS = 0x10 RTAX_FEATURE_TIMESTAMP = 0x4 RTAX_HOPLIMIT = 0xa RTAX_INITCWND = 0xb RTAX_INITRWND = 0xe RTAX_LOCK = 0x1 RTAX_MAX = 0x11 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 = 0x1e RTCF_DIRECTSRC = 0x4000000 RTCF_DOREDIRECT = 0x1000000 RTCF_LOG = 0x2000000 RTCF_MASQ = 0x400000 RTCF_NAT = 0x800000 RTCF_VALVE = 0x200000 RTC_AF = 0x20 RTC_BSM_DIRECT = 0x1 RTC_BSM_DISABLED = 0x0 RTC_BSM_LEVEL = 0x2 RTC_BSM_STANDBY = 0x3 RTC_FEATURE_ALARM = 0x0 RTC_FEATURE_ALARM_RES_2S = 0x3 RTC_FEATURE_ALARM_RES_MINUTE = 0x1 RTC_FEATURE_ALARM_WAKEUP_ONLY = 0x7 RTC_FEATURE_BACKUP_SWITCH_MODE = 0x6 RTC_FEATURE_CNT = 0x8 RTC_FEATURE_CORRECTION = 0x5 RTC_FEATURE_NEED_WEEK_DAY = 0x2 RTC_FEATURE_UPDATE_INTERRUPT = 0x4 RTC_IRQF = 0x80 RTC_MAX_FREQ = 0x2000 RTC_PARAM_BACKUP_SWITCH_MODE = 0x2 RTC_PARAM_CORRECTION = 0x1 RTC_PARAM_FEATURES = 0x0 RTC_PF = 0x40 RTC_UF = 0x10 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 RTMGRP_DECnet_IFADDR = 0x1000 RTMGRP_DECnet_ROUTE = 0x4000 RTMGRP_IPV4_IFADDR = 0x10 RTMGRP_IPV4_MROUTE = 0x20 RTMGRP_IPV4_ROUTE = 0x40 RTMGRP_IPV4_RULE = 0x80 RTMGRP_IPV6_IFADDR = 0x100 RTMGRP_IPV6_IFINFO = 0x800 RTMGRP_IPV6_MROUTE = 0x200 RTMGRP_IPV6_PREFIX = 0x20000 RTMGRP_IPV6_ROUTE = 0x400 RTMGRP_LINK = 0x1 RTMGRP_NEIGH = 0x4 RTMGRP_NOTIFY = 0x2 RTMGRP_TC = 0x8 RTM_BASE = 0x10 RTM_DELACTION = 0x31 RTM_DELADDR = 0x15 RTM_DELADDRLABEL = 0x49 RTM_DELCHAIN = 0x65 RTM_DELLINK = 0x11 RTM_DELLINKPROP = 0x6d RTM_DELMDB = 0x55 RTM_DELNEIGH = 0x1d RTM_DELNETCONF = 0x51 RTM_DELNEXTHOP = 0x69 RTM_DELNEXTHOPBUCKET = 0x75 RTM_DELNSID = 0x59 RTM_DELQDISC = 0x25 RTM_DELROUTE = 0x19 RTM_DELRULE = 0x21 RTM_DELTCLASS = 0x29 RTM_DELTFILTER = 0x2d RTM_DELTUNNEL = 0x79 RTM_DELVLAN = 0x71 RTM_F_CLONED = 0x200 RTM_F_EQUALIZE = 0x400 RTM_F_FIB_MATCH = 0x2000 RTM_F_LOOKUP_TABLE = 0x1000 RTM_F_NOTIFY = 0x100 RTM_F_OFFLOAD = 0x4000 RTM_F_OFFLOAD_FAILED = 0x20000000 RTM_F_PREFIX = 0x800 RTM_F_TRAP = 0x8000 RTM_GETACTION = 0x32 RTM_GETADDR = 0x16 RTM_GETADDRLABEL = 0x4a RTM_GETANYCAST = 0x3e RTM_GETCHAIN = 0x66 RTM_GETDCB = 0x4e RTM_GETLINK = 0x12 RTM_GETLINKPROP = 0x6e RTM_GETMDB = 0x56 RTM_GETMULTICAST = 0x3a RTM_GETNEIGH = 0x1e RTM_GETNEIGHTBL = 0x42 RTM_GETNETCONF = 0x52 RTM_GETNEXTHOP = 0x6a RTM_GETNEXTHOPBUCKET = 0x76 RTM_GETNSID = 0x5a RTM_GETQDISC = 0x26 RTM_GETROUTE = 0x1a RTM_GETRULE = 0x22 RTM_GETSTATS = 0x5e RTM_GETTCLASS = 0x2a RTM_GETTFILTER = 0x2e RTM_GETTUNNEL = 0x7a RTM_GETVLAN = 0x72 RTM_MAX = 0x7b RTM_NEWACTION = 0x30 RTM_NEWADDR = 0x14 RTM_NEWADDRLABEL = 0x48 RTM_NEWCACHEREPORT = 0x60 RTM_NEWCHAIN = 0x64 RTM_NEWLINK = 0x10 RTM_NEWLINKPROP = 0x6c RTM_NEWMDB = 0x54 RTM_NEWNDUSEROPT = 0x44 RTM_NEWNEIGH = 0x1c RTM_NEWNEIGHTBL = 0x40 RTM_NEWNETCONF = 0x50 RTM_NEWNEXTHOP = 0x68 RTM_NEWNEXTHOPBUCKET = 0x74 RTM_NEWNSID = 0x58 RTM_NEWNVLAN = 0x70 RTM_NEWPREFIX = 0x34 RTM_NEWQDISC = 0x24 RTM_NEWROUTE = 0x18 RTM_NEWRULE = 0x20 RTM_NEWSTATS = 0x5c RTM_NEWTCLASS = 0x28 RTM_NEWTFILTER = 0x2c RTM_NEWTUNNEL = 0x78 RTM_NR_FAMILIES = 0x1b RTM_NR_MSGTYPES = 0x6c RTM_SETDCB = 0x4f RTM_SETLINK = 0x13 RTM_SETNEIGHTBL = 0x43 RTM_SETSTATS = 0x5f RTNH_ALIGNTO = 0x4 RTNH_COMPARE_MASK = 0x59 RTNH_F_DEAD = 0x1 RTNH_F_LINKDOWN = 0x10 RTNH_F_OFFLOAD = 0x8 RTNH_F_ONLINK = 0x4 RTNH_F_PERVASIVE = 0x2 RTNH_F_TRAP = 0x40 RTNH_F_UNRESOLVED = 0x20 RTN_MAX = 0xb RTPROT_BABEL = 0x2a RTPROT_BGP = 0xba RTPROT_BIRD = 0xc RTPROT_BOOT = 0x3 RTPROT_DHCP = 0x10 RTPROT_DNROUTED = 0xd RTPROT_EIGRP = 0xc0 RTPROT_GATED = 0x8 RTPROT_ISIS = 0xbb RTPROT_KEEPALIVED = 0x12 RTPROT_KERNEL = 0x2 RTPROT_MROUTED = 0x11 RTPROT_MRT = 0xa RTPROT_NTK = 0xf RTPROT_OPENR = 0x63 RTPROT_OSPF = 0xbc RTPROT_RA = 0x9 RTPROT_REDIRECT = 0x1 RTPROT_RIP = 0xbd 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 RWF_APPEND = 0x10 RWF_DSYNC = 0x2 RWF_HIPRI = 0x1 RWF_NOAPPEND = 0x20 RWF_NOWAIT = 0x8 RWF_SUPPORTED = 0x3f RWF_SYNC = 0x4 RWF_WRITE_LIFE_NOT_SET = 0x0 SCHED_BATCH = 0x3 SCHED_DEADLINE = 0x6 SCHED_FIFO = 0x1 SCHED_FLAG_ALL = 0x7f SCHED_FLAG_DL_OVERRUN = 0x4 SCHED_FLAG_KEEP_ALL = 0x18 SCHED_FLAG_KEEP_PARAMS = 0x10 SCHED_FLAG_KEEP_POLICY = 0x8 SCHED_FLAG_RECLAIM = 0x2 SCHED_FLAG_RESET_ON_FORK = 0x1 SCHED_FLAG_UTIL_CLAMP = 0x60 SCHED_FLAG_UTIL_CLAMP_MAX = 0x40 SCHED_FLAG_UTIL_CLAMP_MIN = 0x20 SCHED_IDLE = 0x5 SCHED_NORMAL = 0x0 SCHED_RESET_ON_FORK = 0x40000000 SCHED_RR = 0x2 SCM_CREDENTIALS = 0x2 SCM_PIDFD = 0x4 SCM_RIGHTS = 0x1 SCM_SECURITY = 0x3 SCM_TIMESTAMP = 0x1d SC_LOG_FLUSH = 0x100000 SECCOMP_ADDFD_FLAG_SEND = 0x2 SECCOMP_ADDFD_FLAG_SETFD = 0x1 SECCOMP_FILTER_FLAG_LOG = 0x2 SECCOMP_FILTER_FLAG_NEW_LISTENER = 0x8 SECCOMP_FILTER_FLAG_SPEC_ALLOW = 0x4 SECCOMP_FILTER_FLAG_TSYNC = 0x1 SECCOMP_FILTER_FLAG_TSYNC_ESRCH = 0x10 SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV = 0x20 SECCOMP_GET_ACTION_AVAIL = 0x2 SECCOMP_GET_NOTIF_SIZES = 0x3 SECCOMP_IOCTL_NOTIF_RECV = 0xc0502100 SECCOMP_IOCTL_NOTIF_SEND = 0xc0182101 SECCOMP_IOC_MAGIC = '!' SECCOMP_MODE_DISABLED = 0x0 SECCOMP_MODE_FILTER = 0x2 SECCOMP_MODE_STRICT = 0x1 SECCOMP_RET_ACTION = 0x7fff0000 SECCOMP_RET_ACTION_FULL = 0xffff0000 SECCOMP_RET_ALLOW = 0x7fff0000 SECCOMP_RET_DATA = 0xffff SECCOMP_RET_ERRNO = 0x50000 SECCOMP_RET_KILL = 0x0 SECCOMP_RET_KILL_PROCESS = 0x80000000 SECCOMP_RET_KILL_THREAD = 0x0 SECCOMP_RET_LOG = 0x7ffc0000 SECCOMP_RET_TRACE = 0x7ff00000 SECCOMP_RET_TRAP = 0x30000 SECCOMP_RET_USER_NOTIF = 0x7fc00000 SECCOMP_SET_MODE_FILTER = 0x1 SECCOMP_SET_MODE_STRICT = 0x0 SECCOMP_USER_NOTIF_FD_SYNC_WAKE_UP = 0x1 SECCOMP_USER_NOTIF_FLAG_CONTINUE = 0x1 SECRETMEM_MAGIC = 0x5345434d SECURITYFS_MAGIC = 0x73636673 SEEK_CUR = 0x1 SEEK_DATA = 0x3 SEEK_END = 0x2 SEEK_HOLE = 0x4 SEEK_MAX = 0x4 SEEK_SET = 0x0 SELINUX_MAGIC = 0xf97cff8c SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 SIOCADDDLCI = 0x8980 SIOCADDMULTI = 0x8931 SIOCADDRT = 0x890b SIOCBONDCHANGEACTIVE = 0x8995 SIOCBONDENSLAVE = 0x8990 SIOCBONDINFOQUERY = 0x8994 SIOCBONDRELEASE = 0x8991 SIOCBONDSETHWADDR = 0x8992 SIOCBONDSLAVEINFOQUERY = 0x8993 SIOCBRADDBR = 0x89a0 SIOCBRADDIF = 0x89a2 SIOCBRDELBR = 0x89a1 SIOCBRDELIF = 0x89a3 SIOCDARP = 0x8953 SIOCDELDLCI = 0x8981 SIOCDELMULTI = 0x8932 SIOCDELRT = 0x890c SIOCDEVPRIVATE = 0x89f0 SIOCDIFADDR = 0x8936 SIOCDRARP = 0x8960 SIOCETHTOOL = 0x8946 SIOCGARP = 0x8954 SIOCGETLINKNAME = 0x89e0 SIOCGETNODEID = 0x89e1 SIOCGHWTSTAMP = 0x89b1 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 SIOCGIFVLAN = 0x8982 SIOCGMIIPHY = 0x8947 SIOCGMIIREG = 0x8948 SIOCGPPPCSTATS = 0x89f2 SIOCGPPPSTATS = 0x89f0 SIOCGPPPVER = 0x89f1 SIOCGRARP = 0x8961 SIOCGSKNS = 0x894c SIOCGSTAMP = 0x8906 SIOCGSTAMPNS = 0x8907 SIOCGSTAMPNS_OLD = 0x8907 SIOCGSTAMP_OLD = 0x8906 SIOCKCMATTACH = 0x89e0 SIOCKCMCLONE = 0x89e2 SIOCKCMUNATTACH = 0x89e1 SIOCOUTQNSD = 0x894b SIOCPROTOPRIVATE = 0x89e0 SIOCRTMSG = 0x890d SIOCSARP = 0x8955 SIOCSHWTSTAMP = 0x89b0 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 SIOCSIFVLAN = 0x8983 SIOCSMIIREG = 0x8949 SIOCSRARP = 0x8962 SIOCWANDEV = 0x894a SK_DIAG_BPF_STORAGE_MAX = 0x3 SK_DIAG_BPF_STORAGE_REQ_MAX = 0x1 SMACK_MAGIC = 0x43415d53 SMART_AUTOSAVE = 0xd2 SMART_AUTO_OFFLINE = 0xdb SMART_DISABLE = 0xd9 SMART_ENABLE = 0xd8 SMART_HCYL_PASS = 0xc2 SMART_IMMEDIATE_OFFLINE = 0xd4 SMART_LCYL_PASS = 0x4f SMART_READ_LOG_SECTOR = 0xd5 SMART_READ_THRESHOLDS = 0xd1 SMART_READ_VALUES = 0xd0 SMART_SAVE = 0xd3 SMART_STATUS = 0xda SMART_WRITE_LOG_SECTOR = 0xd6 SMART_WRITE_THRESHOLDS = 0xd7 SMB2_SUPER_MAGIC = 0xfe534d42 SMB_SUPER_MAGIC = 0x517b SOCKFS_MAGIC = 0x534f434b SOCK_BUF_LOCK_MASK = 0x3 SOCK_DCCP = 0x6 SOCK_DESTROY = 0x15 SOCK_DIAG_BY_FAMILY = 0x14 SOCK_IOC_TYPE = 0x89 SOCK_PACKET = 0xa SOCK_RAW = 0x3 SOCK_RCVBUF_LOCK = 0x2 SOCK_RDM = 0x4 SOCK_SEQPACKET = 0x5 SOCK_SNDBUF_LOCK = 0x1 SOCK_TXREHASH_DEFAULT = 0xff SOCK_TXREHASH_DISABLED = 0x0 SOCK_TXREHASH_ENABLED = 0x1 SOL_AAL = 0x109 SOL_ALG = 0x117 SOL_ATM = 0x108 SOL_CAIF = 0x116 SOL_CAN_BASE = 0x64 SOL_CAN_RAW = 0x65 SOL_DCCP = 0x10d SOL_DECNET = 0x105 SOL_ICMPV6 = 0x3a SOL_IP = 0x0 SOL_IPV6 = 0x29 SOL_IRDA = 0x10a SOL_IUCV = 0x115 SOL_KCM = 0x119 SOL_LLC = 0x10c SOL_MCTP = 0x11d SOL_MPTCP = 0x11c SOL_NETBEUI = 0x10b SOL_NETLINK = 0x10e SOL_NFC = 0x118 SOL_PACKET = 0x107 SOL_PNPIPE = 0x113 SOL_PPPOL2TP = 0x111 SOL_RAW = 0xff SOL_RDS = 0x114 SOL_RXRPC = 0x110 SOL_SMC = 0x11e SOL_TCP = 0x6 SOL_TIPC = 0x10f SOL_TLS = 0x11a SOL_UDP = 0x11 SOL_VSOCK = 0x11f SOL_X25 = 0x106 SOL_XDP = 0x11b SOMAXCONN = 0x1000 SO_ATTACH_FILTER = 0x1a SO_DEBUG = 0x1 SO_DETACH_BPF = 0x1b SO_DETACH_FILTER = 0x1b SO_EE_CODE_TXTIME_INVALID_PARAM = 0x1 SO_EE_CODE_TXTIME_MISSED = 0x2 SO_EE_CODE_ZEROCOPY_COPIED = 0x1 SO_EE_ORIGIN_ICMP = 0x2 SO_EE_ORIGIN_ICMP6 = 0x3 SO_EE_ORIGIN_LOCAL = 0x1 SO_EE_ORIGIN_NONE = 0x0 SO_EE_ORIGIN_TIMESTAMPING = 0x4 SO_EE_ORIGIN_TXSTATUS = 0x4 SO_EE_ORIGIN_TXTIME = 0x6 SO_EE_ORIGIN_ZEROCOPY = 0x5 SO_EE_RFC4884_FLAG_INVALID = 0x1 SO_GET_FILTER = 0x1a SO_NO_CHECK = 0xb SO_PEERNAME = 0x1c SO_PRIORITY = 0xc SO_TIMESTAMP = 0x1d SO_TIMESTAMP_OLD = 0x1d SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2 SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1 SO_VM_SOCKETS_BUFFER_SIZE = 0x0 SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6 SO_VM_SOCKETS_CONNECT_TIMEOUT_NEW = 0x8 SO_VM_SOCKETS_CONNECT_TIMEOUT_OLD = 0x6 SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7 SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3 SO_VM_SOCKETS_TRUSTED = 0x5 SPLICE_F_GIFT = 0x8 SPLICE_F_MORE = 0x4 SPLICE_F_MOVE = 0x1 SPLICE_F_NONBLOCK = 0x2 SQUASHFS_MAGIC = 0x73717368 STACK_END_MAGIC = 0x57ac6e9d STATX_ALL = 0xfff STATX_ATIME = 0x20 STATX_ATTR_APPEND = 0x20 STATX_ATTR_AUTOMOUNT = 0x1000 STATX_ATTR_COMPRESSED = 0x4 STATX_ATTR_DAX = 0x200000 STATX_ATTR_ENCRYPTED = 0x800 STATX_ATTR_IMMUTABLE = 0x10 STATX_ATTR_MOUNT_ROOT = 0x2000 STATX_ATTR_NODUMP = 0x40 STATX_ATTR_VERITY = 0x100000 STATX_BASIC_STATS = 0x7ff STATX_BLOCKS = 0x400 STATX_BTIME = 0x800 STATX_CTIME = 0x80 STATX_DIOALIGN = 0x2000 STATX_GID = 0x10 STATX_INO = 0x100 STATX_MNT_ID = 0x1000 STATX_MNT_ID_UNIQUE = 0x4000 STATX_MODE = 0x2 STATX_MTIME = 0x40 STATX_NLINK = 0x4 STATX_SIZE = 0x200 STATX_SUBVOL = 0x8000 STATX_TYPE = 0x1 STATX_UID = 0x8 STATX__RESERVED = 0x80000000 SYNC_FILE_RANGE_WAIT_AFTER = 0x4 SYNC_FILE_RANGE_WAIT_BEFORE = 0x1 SYNC_FILE_RANGE_WRITE = 0x2 SYNC_FILE_RANGE_WRITE_AND_WAIT = 0x7 SYSFS_MAGIC = 0x62656572 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 TAB0 = 0x0 TASKSTATS_CMD_ATTR_MAX = 0x4 TASKSTATS_CMD_MAX = 0x2 TASKSTATS_GENL_NAME = "TASKSTATS" TASKSTATS_GENL_VERSION = 0x1 TASKSTATS_TYPE_MAX = 0x6 TASKSTATS_VERSION = 0xe TCIFLUSH = 0x0 TCIOFF = 0x2 TCIOFLUSH = 0x2 TCION = 0x3 TCOFLUSH = 0x1 TCOOFF = 0x0 TCOON = 0x1 TCPOPT_EOL = 0x0 TCPOPT_MAXSEG = 0x2 TCPOPT_NOP = 0x1 TCPOPT_SACK = 0x5 TCPOPT_SACK_PERMITTED = 0x4 TCPOPT_TIMESTAMP = 0x8 TCPOPT_TSTAMP_HDR = 0x101080a TCPOPT_WINDOW = 0x3 TCP_CC_INFO = 0x1a TCP_CM_INQ = 0x24 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_FASTOPEN_CONNECT = 0x1e TCP_FASTOPEN_KEY = 0x21 TCP_FASTOPEN_NO_COOKIE = 0x22 TCP_INFO = 0xb TCP_INQ = 0x24 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_EXT = 0x20 TCP_MD5SIG_FLAG_IFINDEX = 0x2 TCP_MD5SIG_FLAG_PREFIX = 0x1 TCP_MD5SIG_MAXKEYLEN = 0x50 TCP_MSS = 0x200 TCP_MSS_DEFAULT = 0x218 TCP_MSS_DESIRED = 0x4c4 TCP_NODELAY = 0x1 TCP_NOTSENT_LOWAT = 0x19 TCP_QUEUE_SEQ = 0x15 TCP_QUICKACK = 0xc TCP_REPAIR = 0x13 TCP_REPAIR_OFF = 0x0 TCP_REPAIR_OFF_NO_WP = -0x1 TCP_REPAIR_ON = 0x1 TCP_REPAIR_OPTIONS = 0x16 TCP_REPAIR_QUEUE = 0x14 TCP_REPAIR_WINDOW = 0x1d TCP_SAVED_SYN = 0x1c TCP_SAVE_SYN = 0x1b 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_TX_DELAY = 0x25 TCP_ULP = 0x1f TCP_USER_TIMEOUT = 0x12 TCP_V4_FLOW = 0x1 TCP_V6_FLOW = 0x5 TCP_WINDOW_CLAMP = 0xa TCP_ZEROCOPY_RECEIVE = 0x23 TFD_TIMER_ABSTIME = 0x1 TFD_TIMER_CANCEL_ON_SET = 0x2 TIMER_ABSTIME = 0x1 TIOCM_DTR = 0x2 TIOCM_LE = 0x1 TIOCM_RTS = 0x4 TIOCPKT_DATA = 0x0 TIOCPKT_DOSTOP = 0x20 TIOCPKT_FLUSHREAD = 0x1 TIOCPKT_FLUSHWRITE = 0x2 TIOCPKT_IOCTL = 0x40 TIOCPKT_NOSTOP = 0x10 TIOCPKT_START = 0x8 TIOCPKT_STOP = 0x4 TIPC_ADDR_ID = 0x3 TIPC_ADDR_MCAST = 0x1 TIPC_ADDR_NAME = 0x2 TIPC_ADDR_NAMESEQ = 0x1 TIPC_AEAD_ALG_NAME = 0x20 TIPC_AEAD_KEYLEN_MAX = 0x24 TIPC_AEAD_KEYLEN_MIN = 0x14 TIPC_AEAD_KEY_SIZE_MAX = 0x48 TIPC_CFG_SRV = 0x0 TIPC_CLUSTER_BITS = 0xc TIPC_CLUSTER_MASK = 0xfff000 TIPC_CLUSTER_OFFSET = 0xc TIPC_CLUSTER_SIZE = 0xfff TIPC_CONN_SHUTDOWN = 0x5 TIPC_CONN_TIMEOUT = 0x82 TIPC_CRITICAL_IMPORTANCE = 0x3 TIPC_DESTNAME = 0x3 TIPC_DEST_DROPPABLE = 0x81 TIPC_ERRINFO = 0x1 TIPC_ERR_NO_NAME = 0x1 TIPC_ERR_NO_NODE = 0x3 TIPC_ERR_NO_PORT = 0x2 TIPC_ERR_OVERLOAD = 0x4 TIPC_GROUP_JOIN = 0x87 TIPC_GROUP_LEAVE = 0x88 TIPC_GROUP_LOOPBACK = 0x1 TIPC_GROUP_MEMBER_EVTS = 0x2 TIPC_HIGH_IMPORTANCE = 0x2 TIPC_IMPORTANCE = 0x7f TIPC_LINK_STATE = 0x2 TIPC_LOW_IMPORTANCE = 0x0 TIPC_MAX_BEARER_NAME = 0x20 TIPC_MAX_IF_NAME = 0x10 TIPC_MAX_LINK_NAME = 0x44 TIPC_MAX_MEDIA_NAME = 0x10 TIPC_MAX_USER_MSG_SIZE = 0x101d0 TIPC_MCAST_BROADCAST = 0x85 TIPC_MCAST_REPLICAST = 0x86 TIPC_MEDIUM_IMPORTANCE = 0x1 TIPC_NODEID_LEN = 0x10 TIPC_NODELAY = 0x8a TIPC_NODE_BITS = 0xc TIPC_NODE_MASK = 0xfff TIPC_NODE_OFFSET = 0x0 TIPC_NODE_RECVQ_DEPTH = 0x83 TIPC_NODE_SIZE = 0xfff TIPC_NODE_STATE = 0x0 TIPC_OK = 0x0 TIPC_PUBLISHED = 0x1 TIPC_REKEYING_NOW = 0xffffffff TIPC_RESERVED_TYPES = 0x40 TIPC_RETDATA = 0x2 TIPC_SERVICE_ADDR = 0x2 TIPC_SERVICE_RANGE = 0x1 TIPC_SOCKET_ADDR = 0x3 TIPC_SOCK_RECVQ_DEPTH = 0x84 TIPC_SOCK_RECVQ_USED = 0x89 TIPC_SRC_DROPPABLE = 0x80 TIPC_SUBSCR_TIMEOUT = 0x3 TIPC_SUB_CANCEL = 0x4 TIPC_SUB_PORTS = 0x1 TIPC_SUB_SERVICE = 0x2 TIPC_TOP_SRV = 0x1 TIPC_WAIT_FOREVER = 0xffffffff TIPC_WITHDRAWN = 0x2 TIPC_ZONE_BITS = 0x8 TIPC_ZONE_CLUSTER_MASK = 0xfffff000 TIPC_ZONE_MASK = 0xff000000 TIPC_ZONE_OFFSET = 0x18 TIPC_ZONE_SCOPE = 0x1 TIPC_ZONE_SIZE = 0xff TMPFS_MAGIC = 0x1021994 TPACKET_ALIGNMENT = 0x10 TPACKET_HDRLEN = 0x34 TP_STATUS_AVAILABLE = 0x0 TP_STATUS_BLK_TMO = 0x20 TP_STATUS_COPY = 0x2 TP_STATUS_CSUMNOTREADY = 0x8 TP_STATUS_CSUM_VALID = 0x80 TP_STATUS_GSO_TCP = 0x100 TP_STATUS_KERNEL = 0x0 TP_STATUS_LOSING = 0x4 TP_STATUS_SENDING = 0x2 TP_STATUS_SEND_REQUEST = 0x1 TP_STATUS_TS_RAW_HARDWARE = 0x80000000 TP_STATUS_TS_SOFTWARE = 0x20000000 TP_STATUS_TS_SYS_HARDWARE = 0x40000000 TP_STATUS_USER = 0x1 TP_STATUS_VLAN_TPID_VALID = 0x40 TP_STATUS_VLAN_VALID = 0x10 TP_STATUS_WRONG_FORMAT = 0x4 TRACEFS_MAGIC = 0x74726163 TS_COMM_LEN = 0x20 UDF_SUPER_MAGIC = 0x15013346 UDP_CORK = 0x1 UDP_ENCAP = 0x64 UDP_ENCAP_ESPINUDP = 0x2 UDP_ENCAP_ESPINUDP_NON_IKE = 0x1 UDP_ENCAP_GTP0 = 0x4 UDP_ENCAP_GTP1U = 0x5 UDP_ENCAP_L2TPINUDP = 0x3 UDP_GRO = 0x68 UDP_NO_CHECK6_RX = 0x66 UDP_NO_CHECK6_TX = 0x65 UDP_SEGMENT = 0x67 UDP_V4_FLOW = 0x2 UDP_V6_FLOW = 0x6 UMOUNT_NOFOLLOW = 0x8 USBDEVICE_SUPER_MAGIC = 0x9fa2 UTIME_NOW = 0x3fffffff UTIME_OMIT = 0x3ffffffe V9FS_MAGIC = 0x1021997 VERASE = 0x2 VINTR = 0x0 VKILL = 0x3 VLNEXT = 0xf VMADDR_CID_ANY = 0xffffffff VMADDR_CID_HOST = 0x2 VMADDR_CID_HYPERVISOR = 0x0 VMADDR_CID_LOCAL = 0x1 VMADDR_FLAG_TO_HOST = 0x1 VMADDR_PORT_ANY = 0xffffffff VM_SOCKETS_INVALID_VERSION = 0xffffffff VQUIT = 0x1 VT0 = 0x0 WAKE_MAGIC = 0x20 WALL = 0x40000000 WCLONE = 0x80000000 WCONTINUED = 0x8 WDIOC_SETPRETIMEOUT = 0xc0045708 WDIOC_SETTIMEOUT = 0xc0045706 WDIOF_ALARMONLY = 0x400 WDIOF_CARDRESET = 0x20 WDIOF_EXTERN1 = 0x4 WDIOF_EXTERN2 = 0x8 WDIOF_FANFAULT = 0x2 WDIOF_KEEPALIVEPING = 0x8000 WDIOF_MAGICCLOSE = 0x100 WDIOF_OVERHEAT = 0x1 WDIOF_POWEROVER = 0x40 WDIOF_POWERUNDER = 0x10 WDIOF_PRETIMEOUT = 0x200 WDIOF_SETTIMEOUT = 0x80 WDIOF_UNKNOWN = -0x1 WDIOS_DISABLECARD = 0x1 WDIOS_ENABLECARD = 0x2 WDIOS_TEMPPANIC = 0x4 WDIOS_UNKNOWN = -0x1 WEXITED = 0x4 WGALLOWEDIP_A_MAX = 0x3 WGDEVICE_A_MAX = 0x8 WGPEER_A_MAX = 0xa WG_CMD_MAX = 0x1 WG_GENL_NAME = "wireguard" WG_GENL_VERSION = 0x1 WG_KEY_LEN = 0x20 WIN_ACKMEDIACHANGE = 0xdb WIN_CHECKPOWERMODE1 = 0xe5 WIN_CHECKPOWERMODE2 = 0x98 WIN_DEVICE_RESET = 0x8 WIN_DIAGNOSE = 0x90 WIN_DOORLOCK = 0xde WIN_DOORUNLOCK = 0xdf WIN_DOWNLOAD_MICROCODE = 0x92 WIN_FLUSH_CACHE = 0xe7 WIN_FLUSH_CACHE_EXT = 0xea WIN_FORMAT = 0x50 WIN_GETMEDIASTATUS = 0xda WIN_IDENTIFY = 0xec WIN_IDENTIFY_DMA = 0xee WIN_IDLEIMMEDIATE = 0xe1 WIN_INIT = 0x60 WIN_MEDIAEJECT = 0xed WIN_MULTREAD = 0xc4 WIN_MULTREAD_EXT = 0x29 WIN_MULTWRITE = 0xc5 WIN_MULTWRITE_EXT = 0x39 WIN_NOP = 0x0 WIN_PACKETCMD = 0xa0 WIN_PIDENTIFY = 0xa1 WIN_POSTBOOT = 0xdc WIN_PREBOOT = 0xdd WIN_QUEUED_SERVICE = 0xa2 WIN_READ = 0x20 WIN_READDMA = 0xc8 WIN_READDMA_EXT = 0x25 WIN_READDMA_ONCE = 0xc9 WIN_READDMA_QUEUED = 0xc7 WIN_READDMA_QUEUED_EXT = 0x26 WIN_READ_BUFFER = 0xe4 WIN_READ_EXT = 0x24 WIN_READ_LONG = 0x22 WIN_READ_LONG_ONCE = 0x23 WIN_READ_NATIVE_MAX = 0xf8 WIN_READ_NATIVE_MAX_EXT = 0x27 WIN_READ_ONCE = 0x21 WIN_RECAL = 0x10 WIN_RESTORE = 0x10 WIN_SECURITY_DISABLE = 0xf6 WIN_SECURITY_ERASE_PREPARE = 0xf3 WIN_SECURITY_ERASE_UNIT = 0xf4 WIN_SECURITY_FREEZE_LOCK = 0xf5 WIN_SECURITY_SET_PASS = 0xf1 WIN_SECURITY_UNLOCK = 0xf2 WIN_SEEK = 0x70 WIN_SETFEATURES = 0xef WIN_SETIDLE1 = 0xe3 WIN_SETIDLE2 = 0x97 WIN_SETMULT = 0xc6 WIN_SET_MAX = 0xf9 WIN_SET_MAX_EXT = 0x37 WIN_SLEEPNOW1 = 0xe6 WIN_SLEEPNOW2 = 0x99 WIN_SMART = 0xb0 WIN_SPECIFY = 0x91 WIN_SRST = 0x8 WIN_STANDBY = 0xe2 WIN_STANDBY2 = 0x96 WIN_STANDBYNOW1 = 0xe0 WIN_STANDBYNOW2 = 0x94 WIN_VERIFY = 0x40 WIN_VERIFY_EXT = 0x42 WIN_VERIFY_ONCE = 0x41 WIN_WRITE = 0x30 WIN_WRITEDMA = 0xca WIN_WRITEDMA_EXT = 0x35 WIN_WRITEDMA_ONCE = 0xcb WIN_WRITEDMA_QUEUED = 0xcc WIN_WRITEDMA_QUEUED_EXT = 0x36 WIN_WRITE_BUFFER = 0xe8 WIN_WRITE_EXT = 0x34 WIN_WRITE_LONG = 0x32 WIN_WRITE_LONG_ONCE = 0x33 WIN_WRITE_ONCE = 0x31 WIN_WRITE_SAME = 0xe9 WIN_WRITE_VERIFY = 0x3c WNOHANG = 0x1 WNOTHREAD = 0x20000000 WNOWAIT = 0x1000000 WSTOPPED = 0x2 WUNTRACED = 0x2 XATTR_CREATE = 0x1 XATTR_REPLACE = 0x2 XDP_COPY = 0x2 XDP_FLAGS_DRV_MODE = 0x4 XDP_FLAGS_HW_MODE = 0x8 XDP_FLAGS_MASK = 0x1f XDP_FLAGS_MODES = 0xe XDP_FLAGS_REPLACE = 0x10 XDP_FLAGS_SKB_MODE = 0x2 XDP_FLAGS_UPDATE_IF_NOEXIST = 0x1 XDP_MMAP_OFFSETS = 0x1 XDP_OPTIONS = 0x8 XDP_OPTIONS_ZEROCOPY = 0x1 XDP_PACKET_HEADROOM = 0x100 XDP_PGOFF_RX_RING = 0x0 XDP_PGOFF_TX_RING = 0x80000000 XDP_PKT_CONTD = 0x1 XDP_RING_NEED_WAKEUP = 0x1 XDP_RX_RING = 0x2 XDP_SHARED_UMEM = 0x1 XDP_STATISTICS = 0x7 XDP_TXMD_FLAGS_CHECKSUM = 0x2 XDP_TXMD_FLAGS_TIMESTAMP = 0x1 XDP_TX_METADATA = 0x2 XDP_TX_RING = 0x3 XDP_UMEM_COMPLETION_RING = 0x6 XDP_UMEM_FILL_RING = 0x5 XDP_UMEM_PGOFF_COMPLETION_RING = 0x180000000 XDP_UMEM_PGOFF_FILL_RING = 0x100000000 XDP_UMEM_REG = 0x4 XDP_UMEM_TX_SW_CSUM = 0x2 XDP_UMEM_UNALIGNED_CHUNK_FLAG = 0x1 XDP_USE_NEED_WAKEUP = 0x8 XDP_USE_SG = 0x10 XDP_ZEROCOPY = 0x4 XENFS_SUPER_MAGIC = 0xabba1974 XFS_SUPER_MAGIC = 0x58465342 ZONEFS_MAGIC = 0x5a4f4653 _HIDIOCGRAWNAME_LEN = 0x80 _HIDIOCGRAWPHYS_LEN = 0x40 _HIDIOCGRAWUNIQ_LEN = 0x40 ) // Errors const ( E2BIG = syscall.Errno(0x7) EACCES = syscall.Errno(0xd) EAGAIN = syscall.Errno(0xb) EBADF = syscall.Errno(0x9) EBUSY = syscall.Errno(0x10) ECHILD = syscall.Errno(0xa) EDOM = syscall.Errno(0x21) EEXIST = syscall.Errno(0x11) EFAULT = syscall.Errno(0xe) EFBIG = syscall.Errno(0x1b) EINTR = syscall.Errno(0x4) EINVAL = syscall.Errno(0x16) EIO = syscall.Errno(0x5) EISDIR = syscall.Errno(0x15) EMFILE = syscall.Errno(0x18) EMLINK = syscall.Errno(0x1f) ENFILE = syscall.Errno(0x17) ENODEV = syscall.Errno(0x13) ENOENT = syscall.Errno(0x2) ENOEXEC = syscall.Errno(0x8) ENOMEM = syscall.Errno(0xc) ENOSPC = syscall.Errno(0x1c) ENOTBLK = syscall.Errno(0xf) ENOTDIR = syscall.Errno(0x14) ENOTTY = syscall.Errno(0x19) ENXIO = syscall.Errno(0x6) EPERM = syscall.Errno(0x1) EPIPE = syscall.Errno(0x20) ERANGE = syscall.Errno(0x22) EROFS = syscall.Errno(0x1e) ESPIPE = syscall.Errno(0x1d) ESRCH = syscall.Errno(0x3) ETXTBSY = syscall.Errno(0x1a) EWOULDBLOCK = syscall.Errno(0xb) EXDEV = syscall.Errno(0x12) ) // Signals const ( SIGABRT = syscall.Signal(0x6) SIGALRM = syscall.Signal(0xe) SIGFPE = syscall.Signal(0x8) SIGHUP = syscall.Signal(0x1) SIGILL = syscall.Signal(0x4) SIGINT = syscall.Signal(0x2) SIGIOT = syscall.Signal(0x6) SIGKILL = syscall.Signal(0x9) SIGPIPE = syscall.Signal(0xd) SIGQUIT = syscall.Signal(0x3) SIGSEGV = syscall.Signal(0xb) SIGTERM = syscall.Signal(0xf) SIGTRAP = syscall.Signal(0x5) ) ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_linux_386.go ================================================ // mkerrors.sh -Wall -Werror -static -I/tmp/386/include -m32 // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/386/include -m32 _const.go package unix import "syscall" const ( B1000000 = 0x1008 B115200 = 0x1002 B1152000 = 0x1009 B1500000 = 0x100a B2000000 = 0x100b B230400 = 0x1003 B2500000 = 0x100c B3000000 = 0x100d B3500000 = 0x100e B4000000 = 0x100f B460800 = 0x1004 B500000 = 0x1005 B57600 = 0x1001 B576000 = 0x1006 B921600 = 0x1007 BLKALIGNOFF = 0x127a BLKBSZGET = 0x80041270 BLKBSZSET = 0x40041271 BLKDISCARD = 0x1277 BLKDISCARDZEROES = 0x127c BLKFLSBUF = 0x1261 BLKFRAGET = 0x1265 BLKFRASET = 0x1264 BLKGETDISKSEQ = 0x80081280 BLKGETSIZE = 0x1260 BLKGETSIZE64 = 0x80041272 BLKIOMIN = 0x1278 BLKIOOPT = 0x1279 BLKPBSZGET = 0x127b BLKRAGET = 0x1263 BLKRASET = 0x1262 BLKROGET = 0x125e BLKROSET = 0x125d BLKROTATIONAL = 0x127e BLKRRPART = 0x125f BLKSECDISCARD = 0x127d BLKSECTGET = 0x1267 BLKSECTSET = 0x1266 BLKSSZGET = 0x1268 BLKZEROOUT = 0x127f BOTHER = 0x1000 BS1 = 0x2000 BSDLY = 0x2000 CBAUD = 0x100f CBAUDEX = 0x1000 CIBAUD = 0x100f0000 CLOCAL = 0x800 CR1 = 0x200 CR2 = 0x400 CR3 = 0x600 CRDLY = 0x600 CREAD = 0x80 CS6 = 0x10 CS7 = 0x20 CS8 = 0x30 CSIZE = 0x30 CSTOPB = 0x40 ECCGETLAYOUT = 0x81484d11 ECCGETSTATS = 0x80104d12 ECHOCTL = 0x200 ECHOE = 0x10 ECHOK = 0x20 ECHOKE = 0x800 ECHONL = 0x40 ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 EPIOCGPARAMS = 0x80088a02 EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 FFDLY = 0x8000 FICLONE = 0x40049409 FICLONERANGE = 0x4020940d FLUSHO = 0x1000 FP_XSTATE_MAGIC2 = 0x46505845 FS_IOC_ENABLE_VERITY = 0x40806685 FS_IOC_GETFLAGS = 0x80046601 FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 FS_IOC_SETFLAGS = 0x40046602 FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 F_GETLK = 0xc F_GETLK64 = 0xc F_GETOWN = 0x9 F_RDLCK = 0x0 F_SETLK = 0xd F_SETLK64 = 0xd F_SETLKW = 0xe F_SETLKW64 = 0xe F_SETOWN = 0x8 F_UNLCK = 0x2 F_WRLCK = 0x1 HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 ISIG = 0x1 IUCLC = 0x200 IXOFF = 0x1000 IXON = 0x400 MAP_32BIT = 0x40 MAP_ABOVE4G = 0x80 MAP_ANON = 0x20 MAP_ANONYMOUS = 0x20 MAP_DENYWRITE = 0x800 MAP_EXECUTABLE = 0x1000 MAP_GROWSDOWN = 0x100 MAP_HUGETLB = 0x40000 MAP_LOCKED = 0x2000 MAP_NONBLOCK = 0x10000 MAP_NORESERVE = 0x4000 MAP_POPULATE = 0x8000 MAP_STACK = 0x20000 MAP_SYNC = 0x80000 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MCL_ONFAULT = 0x4 MEMERASE = 0x40084d02 MEMERASE64 = 0x40104d14 MEMGETBADBLOCK = 0x40084d0b MEMGETINFO = 0x80204d01 MEMGETOOBSEL = 0x80c84d0a MEMGETREGIONCOUNT = 0x80044d07 MEMISLOCKED = 0x80084d17 MEMLOCK = 0x40084d05 MEMREAD = 0xc03c4d1a MEMREADOOB = 0xc00c4d04 MEMSETBADBLOCK = 0x40084d0c MEMUNLOCK = 0x40084d06 MEMWRITEOOB = 0xc00c4d03 MTDFILEMODE = 0x4d13 NFDBITS = 0x20 NLDLY = 0x100 NOFLSH = 0x80 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 OTPERASE = 0x400c4d19 OTPGETREGIONCOUNT = 0x40044d0e OTPGETREGIONINFO = 0x400c4d0f OTPLOCK = 0x800c4d10 OTPSELECT = 0x80044d0d 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_RSYNC = 0x101000 O_SYNC = 0x101000 O_TMPFILE = 0x410000 O_TRUNC = 0x200 PARENB = 0x100 PARODD = 0x200 PENDIN = 0x4000 PERF_EVENT_IOC_DISABLE = 0x2401 PERF_EVENT_IOC_ENABLE = 0x2400 PERF_EVENT_IOC_ID = 0x80042407 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4004240b PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409 PERF_EVENT_IOC_PERIOD = 0x40082404 PERF_EVENT_IOC_QUERY_BPF = 0xc004240a PERF_EVENT_IOC_REFRESH = 0x2402 PERF_EVENT_IOC_RESET = 0x2403 PERF_EVENT_IOC_SET_BPF = 0x40042408 PERF_EVENT_IOC_SET_FILTER = 0x40042406 PERF_EVENT_IOC_SET_OUTPUT = 0x2405 PPPIOCATTACH = 0x4004743d PPPIOCATTCHAN = 0x40047438 PPPIOCBRIDGECHAN = 0x40047435 PPPIOCCONNECT = 0x4004743a PPPIOCDETACH = 0x4004743c PPPIOCDISCONN = 0x7439 PPPIOCGASYNCMAP = 0x80047458 PPPIOCGCHAN = 0x80047437 PPPIOCGDEBUG = 0x80047441 PPPIOCGFLAGS = 0x8004745a PPPIOCGIDLE = 0x8008743f PPPIOCGIDLE32 = 0x8008743f PPPIOCGIDLE64 = 0x8010743f PPPIOCGL2TPSTATS = 0x80487436 PPPIOCGMRU = 0x80047453 PPPIOCGRASYNCMAP = 0x80047455 PPPIOCGUNIT = 0x80047456 PPPIOCGXASYNCMAP = 0x80207450 PPPIOCSACTIVE = 0x40087446 PPPIOCSASYNCMAP = 0x40047457 PPPIOCSCOMPRESS = 0x400c744d PPPIOCSDEBUG = 0x40047440 PPPIOCSFLAGS = 0x40047459 PPPIOCSMAXCID = 0x40047451 PPPIOCSMRRU = 0x4004743b PPPIOCSMRU = 0x40047452 PPPIOCSNPMODE = 0x4008744b PPPIOCSPASS = 0x40087447 PPPIOCSRASYNCMAP = 0x40047454 PPPIOCSXASYNCMAP = 0x4020744f PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PR_SET_PTRACER_ANY = 0xffffffff PTRACE_GETFPREGS = 0xe PTRACE_GETFPXREGS = 0x12 PTRACE_GET_THREAD_AREA = 0x19 PTRACE_OLDSETOPTIONS = 0x15 PTRACE_SETFPREGS = 0xf PTRACE_SETFPXREGS = 0x13 PTRACE_SET_THREAD_AREA = 0x1a PTRACE_SINGLEBLOCK = 0x21 PTRACE_SYSEMU = 0x1f PTRACE_SYSEMU_SINGLESTEP = 0x20 RLIMIT_AS = 0x9 RLIMIT_MEMLOCK = 0x8 RLIMIT_NOFILE = 0x7 RLIMIT_NPROC = 0x6 RLIMIT_RSS = 0x5 RNDADDENTROPY = 0x40085203 RNDADDTOENTCNT = 0x40045201 RNDCLEARPOOL = 0x5206 RNDGETENTCNT = 0x80045200 RNDGETPOOL = 0x80085202 RNDRESEEDCRNG = 0x5207 RNDZAPENTCNT = 0x5204 RTC_AIE_OFF = 0x7002 RTC_AIE_ON = 0x7001 RTC_ALM_READ = 0x80247008 RTC_ALM_SET = 0x40247007 RTC_EPOCH_READ = 0x8004700d RTC_EPOCH_SET = 0x4004700e RTC_IRQP_READ = 0x8004700b RTC_IRQP_SET = 0x4004700c RTC_PARAM_GET = 0x40187013 RTC_PARAM_SET = 0x40187014 RTC_PIE_OFF = 0x7006 RTC_PIE_ON = 0x7005 RTC_PLL_GET = 0x801c7011 RTC_PLL_SET = 0x401c7012 RTC_RD_TIME = 0x80247009 RTC_SET_TIME = 0x4024700a RTC_UIE_OFF = 0x7004 RTC_UIE_ON = 0x7003 RTC_VL_CLR = 0x7014 RTC_VL_READ = 0x80047013 RTC_WIE_OFF = 0x7010 RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 SIOCGPGRP = 0x8904 SIOCGSTAMPNS_NEW = 0x80108907 SIOCGSTAMP_NEW = 0x80108906 SIOCINQ = 0x541b SIOCOUTQ = 0x5411 SIOCSPGRP = 0x8902 SOCK_CLOEXEC = 0x80000 SOCK_DGRAM = 0x2 SOCK_NONBLOCK = 0x800 SOCK_STREAM = 0x1 SOL_SOCKET = 0x1 SO_ACCEPTCONN = 0x1e SO_ATTACH_BPF = 0x32 SO_ATTACH_REUSEPORT_CBPF = 0x33 SO_ATTACH_REUSEPORT_EBPF = 0x34 SO_BINDTODEVICE = 0x19 SO_BINDTOIFINDEX = 0x3e SO_BPF_EXTENSIONS = 0x30 SO_BROADCAST = 0x6 SO_BSDCOMPAT = 0xe SO_BUF_LOCK = 0x48 SO_BUSY_POLL = 0x2e SO_BUSY_POLL_BUDGET = 0x46 SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f SO_MEMINFO = 0x37 SO_NETNS_COOKIE = 0x47 SO_NOFCS = 0x2b SO_OOBINLINE = 0xa SO_PASSCRED = 0x10 SO_PASSPIDFD = 0x4c SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 SO_PEERGROUPS = 0x3b SO_PEERPIDFD = 0x4d SO_PEERSEC = 0x1f SO_PREFER_BUSY_POLL = 0x45 SO_PROTOCOL = 0x26 SO_RCVBUF = 0x8 SO_RCVBUFFORCE = 0x21 SO_RCVLOWAT = 0x12 SO_RCVMARK = 0x4b SO_RCVTIMEO = 0x14 SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_OLD = 0x14 SO_RESERVE_MEM = 0x49 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_SNDTIMEO_NEW = 0x43 SO_SNDTIMEO_OLD = 0x15 SO_TIMESTAMPING = 0x25 SO_TIMESTAMPING_NEW = 0x41 SO_TIMESTAMPING_OLD = 0x25 SO_TIMESTAMPNS = 0x23 SO_TIMESTAMPNS_NEW = 0x40 SO_TIMESTAMPNS_OLD = 0x23 SO_TIMESTAMP_NEW = 0x3f SO_TXREHASH = 0x4a SO_TXTIME = 0x3d SO_TYPE = 0x3 SO_WIFI_STATUS = 0x29 SO_ZEROCOPY = 0x3c TAB1 = 0x800 TAB2 = 0x1000 TAB3 = 0x1800 TABDLY = 0x1800 TCFLSH = 0x540b TCGETA = 0x5405 TCGETS = 0x5401 TCGETS2 = 0x802c542a TCGETX = 0x5432 TCSAFLUSH = 0x2 TCSBRK = 0x5409 TCSBRKP = 0x5425 TCSETA = 0x5406 TCSETAF = 0x5408 TCSETAW = 0x5407 TCSETS = 0x5402 TCSETS2 = 0x402c542b TCSETSF = 0x5404 TCSETSF2 = 0x402c542d TCSETSW = 0x5403 TCSETSW2 = 0x402c542c TCSETX = 0x5433 TCSETXF = 0x5434 TCSETXW = 0x5435 TCXONC = 0x540a TFD_CLOEXEC = 0x80000 TFD_NONBLOCK = 0x800 TIOCCBRK = 0x5428 TIOCCONS = 0x541d TIOCEXCL = 0x540c TIOCGDEV = 0x80045432 TIOCGETD = 0x5424 TIOCGEXCL = 0x80045440 TIOCGICOUNT = 0x545d TIOCGISO7816 = 0x80285442 TIOCGLCKTRMIOS = 0x5456 TIOCGPGRP = 0x540f TIOCGPKT = 0x80045438 TIOCGPTLCK = 0x80045439 TIOCGPTN = 0x80045430 TIOCGPTPEER = 0x5441 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_RI = 0x80 TIOCM_RNG = 0x80 TIOCM_SR = 0x10 TIOCM_ST = 0x8 TIOCNOTTY = 0x5422 TIOCNXCL = 0x540d TIOCOUTQ = 0x5411 TIOCPKT = 0x5420 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 TIOCSISO7816 = 0xc0285443 TIOCSLCKTRMIOS = 0x5457 TIOCSPGRP = 0x5410 TIOCSPTLCK = 0x40045431 TIOCSRS485 = 0x542f TIOCSSERIAL = 0x541f TIOCSSOFTCAR = 0x541a TIOCSTI = 0x5412 TIOCSWINSZ = 0x5414 TIOCVHANGUP = 0x5437 TOSTOP = 0x100 TUNATTACHFILTER = 0x400854d5 TUNDETACHFILTER = 0x400854d6 TUNGETDEVNETNS = 0x54e3 TUNGETFEATURES = 0x800454cf TUNGETFILTER = 0x800854db TUNGETIFF = 0x800454d2 TUNGETSNDBUF = 0x800454d3 TUNGETVNETBE = 0x800454df TUNGETVNETHDRSZ = 0x800454d7 TUNGETVNETLE = 0x800454dd TUNSETCARRIER = 0x400454e2 TUNSETDEBUG = 0x400454c9 TUNSETFILTEREBPF = 0x800454e1 TUNSETGROUP = 0x400454ce TUNSETIFF = 0x400454ca TUNSETIFINDEX = 0x400454da TUNSETLINK = 0x400454cd TUNSETNOCSUM = 0x400454c8 TUNSETOFFLOAD = 0x400454d0 TUNSETOWNER = 0x400454cc TUNSETPERSIST = 0x400454cb TUNSETQUEUE = 0x400454d9 TUNSETSNDBUF = 0x400454d4 TUNSETSTEERINGEBPF = 0x800454e0 TUNSETTXFILTER = 0x400454d1 TUNSETVNETBE = 0x400454de TUNSETVNETHDRSZ = 0x400454d8 TUNSETVNETLE = 0x400454dc UBI_IOCATT = 0x40186f40 UBI_IOCDET = 0x40046f41 UBI_IOCEBCH = 0x40044f02 UBI_IOCEBER = 0x40044f01 UBI_IOCEBISMAP = 0x80044f05 UBI_IOCEBMAP = 0x40084f03 UBI_IOCEBUNMAP = 0x40044f04 UBI_IOCMKVOL = 0x40986f00 UBI_IOCRMVOL = 0x40046f01 UBI_IOCRNVOL = 0x51106f03 UBI_IOCRPEB = 0x40046f04 UBI_IOCRSVOL = 0x400c6f02 UBI_IOCSETVOLPROP = 0x40104f06 UBI_IOCSPEB = 0x40046f05 UBI_IOCVOLCRBLK = 0x40804f07 UBI_IOCVOLRMBLK = 0x4f08 UBI_IOCVOLUP = 0x40084f00 VDISCARD = 0xd VEOF = 0x4 VEOL = 0xb VEOL2 = 0x10 VMIN = 0x6 VREPRINT = 0xc VSTART = 0x8 VSTOP = 0x9 VSUSP = 0xa VSWTC = 0x7 VT1 = 0x4000 VTDLY = 0x4000 VTIME = 0x5 VWERASE = 0xe WDIOC_GETBOOTSTATUS = 0x80045702 WDIOC_GETPRETIMEOUT = 0x80045709 WDIOC_GETSTATUS = 0x80045701 WDIOC_GETSUPPORT = 0x80285700 WDIOC_GETTEMP = 0x80045703 WDIOC_GETTIMELEFT = 0x8004570a WDIOC_GETTIMEOUT = 0x80045707 WDIOC_KEEPALIVE = 0x80045705 WDIOC_SETOPTIONS = 0x80045704 WORDSIZE = 0x20 X86_FXSR_MAGIC = 0x0 XCASE = 0x4 XTABS = 0x1800 _HIDIOCGRAWNAME = 0x80804804 _HIDIOCGRAWPHYS = 0x80404805 _HIDIOCGRAWUNIQ = 0x80404808 ) // Errors const ( EADDRINUSE = syscall.Errno(0x62) EADDRNOTAVAIL = syscall.Errno(0x63) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x61) EALREADY = syscall.Errno(0x72) EBADE = syscall.Errno(0x34) EBADFD = syscall.Errno(0x4d) EBADMSG = syscall.Errno(0x4a) EBADR = syscall.Errno(0x35) EBADRQC = syscall.Errno(0x38) EBADSLT = syscall.Errno(0x39) EBFONT = syscall.Errno(0x3b) ECANCELED = syscall.Errno(0x7d) 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) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) EIDRM = syscall.Errno(0x2b) EILSEQ = syscall.Errno(0x54) EINPROGRESS = syscall.Errno(0x73) EISCONN = syscall.Errno(0x6a) 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) 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) ENOANO = syscall.Errno(0x37) ENOBUFS = syscall.Errno(0x69) ENOCSI = syscall.Errno(0x32) ENODATA = syscall.Errno(0x3d) ENOKEY = syscall.Errno(0x7e) ENOLCK = syscall.Errno(0x25) ENOLINK = syscall.Errno(0x43) ENOMEDIUM = syscall.Errno(0x7b) ENOMSG = syscall.Errno(0x2a) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x5c) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x26) ENOTCONN = syscall.Errno(0x6b) ENOTEMPTY = syscall.Errno(0x27) ENOTNAM = syscall.Errno(0x76) ENOTRECOVERABLE = syscall.Errno(0x83) ENOTSOCK = syscall.Errno(0x58) ENOTSUP = syscall.Errno(0x5f) ENOTUNIQ = syscall.Errno(0x4c) EOPNOTSUPP = syscall.Errno(0x5f) EOVERFLOW = syscall.Errno(0x4b) EOWNERDEAD = syscall.Errno(0x82) EPFNOSUPPORT = syscall.Errno(0x60) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x5d) EPROTOTYPE = syscall.Errno(0x5b) EREMCHG = syscall.Errno(0x4e) EREMOTE = syscall.Errno(0x42) EREMOTEIO = syscall.Errno(0x79) ERESTART = syscall.Errno(0x55) ERFKILL = syscall.Errno(0x84) ESHUTDOWN = syscall.Errno(0x6c) ESOCKTNOSUPPORT = syscall.Errno(0x5e) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x74) ESTRPIPE = syscall.Errno(0x56) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x6e) ETOOMANYREFS = syscall.Errno(0x6d) EUCLEAN = syscall.Errno(0x75) EUNATCH = syscall.Errno(0x31) EUSERS = syscall.Errno(0x57) EXFULL = syscall.Errno(0x36) ) // Signals const ( SIGBUS = syscall.Signal(0x7) SIGCHLD = syscall.Signal(0x11) SIGCLD = syscall.Signal(0x11) SIGCONT = syscall.Signal(0x12) SIGIO = syscall.Signal(0x1d) SIGPOLL = syscall.Signal(0x1d) SIGPROF = syscall.Signal(0x1b) SIGPWR = syscall.Signal(0x1e) SIGSTKFLT = syscall.Signal(0x10) SIGSTOP = syscall.Signal(0x13) SIGSYS = syscall.Signal(0x1f) SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "no such device or address"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EAGAIN", "resource temporarily unavailable"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device or resource busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "invalid cross-device link"}, {19, "ENODEV", "no such device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "numerical result out of range"}, {35, "EDEADLK", "resource deadlock avoided"}, {36, "ENAMETOOLONG", "file name too long"}, {37, "ENOLCK", "no locks available"}, {38, "ENOSYS", "function not implemented"}, {39, "ENOTEMPTY", "directory not empty"}, {40, "ELOOP", "too many levels of symbolic links"}, {42, "ENOMSG", "no message of desired type"}, {43, "EIDRM", "identifier removed"}, {44, "ECHRNG", "channel number out of range"}, {45, "EL2NSYNC", "level 2 not synchronized"}, {46, "EL3HLT", "level 3 halted"}, {47, "EL3RST", "level 3 reset"}, {48, "ELNRNG", "link number out of range"}, {49, "EUNATCH", "protocol driver not attached"}, {50, "ENOCSI", "no CSI structure available"}, {51, "EL2HLT", "level 2 halted"}, {52, "EBADE", "invalid exchange"}, {53, "EBADR", "invalid request descriptor"}, {54, "EXFULL", "exchange full"}, {55, "ENOANO", "no anode"}, {56, "EBADRQC", "invalid request code"}, {57, "EBADSLT", "invalid slot"}, {59, "EBFONT", "bad font file format"}, {60, "ENOSTR", "device not a stream"}, {61, "ENODATA", "no data available"}, {62, "ETIME", "timer expired"}, {63, "ENOSR", "out of streams resources"}, {64, "ENONET", "machine is not on the network"}, {65, "ENOPKG", "package not installed"}, {66, "EREMOTE", "object is remote"}, {67, "ENOLINK", "link has been severed"}, {68, "EADV", "advertise error"}, {69, "ESRMNT", "srmount error"}, {70, "ECOMM", "communication error on send"}, {71, "EPROTO", "protocol error"}, {72, "EMULTIHOP", "multihop attempted"}, {73, "EDOTDOT", "RFS specific error"}, {74, "EBADMSG", "bad message"}, {75, "EOVERFLOW", "value too large for defined data type"}, {76, "ENOTUNIQ", "name not unique on network"}, {77, "EBADFD", "file descriptor in bad state"}, {78, "EREMCHG", "remote address changed"}, {79, "ELIBACC", "can not access a needed shared library"}, {80, "ELIBBAD", "accessing a corrupted shared library"}, {81, "ELIBSCN", ".lib section in a.out corrupted"}, {82, "ELIBMAX", "attempting to link in too many shared libraries"}, {83, "ELIBEXEC", "cannot exec a shared library directly"}, {84, "EILSEQ", "invalid or incomplete multibyte or wide character"}, {85, "ERESTART", "interrupted system call should be restarted"}, {86, "ESTRPIPE", "streams pipe error"}, {87, "EUSERS", "too many users"}, {88, "ENOTSOCK", "socket operation on non-socket"}, {89, "EDESTADDRREQ", "destination address required"}, {90, "EMSGSIZE", "message too long"}, {91, "EPROTOTYPE", "protocol wrong type for socket"}, {92, "ENOPROTOOPT", "protocol not available"}, {93, "EPROTONOSUPPORT", "protocol not supported"}, {94, "ESOCKTNOSUPPORT", "socket type not supported"}, {95, "ENOTSUP", "operation not supported"}, {96, "EPFNOSUPPORT", "protocol family not supported"}, {97, "EAFNOSUPPORT", "address family not supported by protocol"}, {98, "EADDRINUSE", "address already in use"}, {99, "EADDRNOTAVAIL", "cannot assign requested address"}, {100, "ENETDOWN", "network is down"}, {101, "ENETUNREACH", "network is unreachable"}, {102, "ENETRESET", "network dropped connection on reset"}, {103, "ECONNABORTED", "software caused connection abort"}, {104, "ECONNRESET", "connection reset by peer"}, {105, "ENOBUFS", "no buffer space available"}, {106, "EISCONN", "transport endpoint is already connected"}, {107, "ENOTCONN", "transport endpoint is not connected"}, {108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"}, {109, "ETOOMANYREFS", "too many references: cannot splice"}, {110, "ETIMEDOUT", "connection timed out"}, {111, "ECONNREFUSED", "connection refused"}, {112, "EHOSTDOWN", "host is down"}, {113, "EHOSTUNREACH", "no route to host"}, {114, "EALREADY", "operation already in progress"}, {115, "EINPROGRESS", "operation now in progress"}, {116, "ESTALE", "stale file handle"}, {117, "EUCLEAN", "structure needs cleaning"}, {118, "ENOTNAM", "not a XENIX named type file"}, {119, "ENAVAIL", "no XENIX semaphores available"}, {120, "EISNAM", "is a named type file"}, {121, "EREMOTEIO", "remote I/O error"}, {122, "EDQUOT", "disk quota exceeded"}, {123, "ENOMEDIUM", "no medium found"}, {124, "EMEDIUMTYPE", "wrong medium type"}, {125, "ECANCELED", "operation canceled"}, {126, "ENOKEY", "required key not available"}, {127, "EKEYEXPIRED", "key has expired"}, {128, "EKEYREVOKED", "key has been revoked"}, {129, "EKEYREJECTED", "key was rejected by service"}, {130, "EOWNERDEAD", "owner died"}, {131, "ENOTRECOVERABLE", "state not recoverable"}, {132, "ERFKILL", "operation not possible due to RF-kill"}, {133, "EHWPOISON", "memory page has hardware error"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/breakpoint trap"}, {6, "SIGABRT", "aborted"}, {7, "SIGBUS", "bus error"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGUSR1", "user defined signal 1"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGUSR2", "user defined signal 2"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGSTKFLT", "stack fault"}, {17, "SIGCHLD", "child exited"}, {18, "SIGCONT", "continued"}, {19, "SIGSTOP", "stopped (signal)"}, {20, "SIGTSTP", "stopped"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGURG", "urgent I/O condition"}, {24, "SIGXCPU", "CPU time limit exceeded"}, {25, "SIGXFSZ", "file size limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window changed"}, {29, "SIGIO", "I/O possible"}, {30, "SIGPWR", "power failure"}, {31, "SIGSYS", "bad system call"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go ================================================ // mkerrors.sh -Wall -Werror -static -I/tmp/amd64/include -m64 // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/amd64/include -m64 _const.go package unix import "syscall" const ( B1000000 = 0x1008 B115200 = 0x1002 B1152000 = 0x1009 B1500000 = 0x100a B2000000 = 0x100b B230400 = 0x1003 B2500000 = 0x100c B3000000 = 0x100d B3500000 = 0x100e B4000000 = 0x100f B460800 = 0x1004 B500000 = 0x1005 B57600 = 0x1001 B576000 = 0x1006 B921600 = 0x1007 BLKALIGNOFF = 0x127a BLKBSZGET = 0x80081270 BLKBSZSET = 0x40081271 BLKDISCARD = 0x1277 BLKDISCARDZEROES = 0x127c BLKFLSBUF = 0x1261 BLKFRAGET = 0x1265 BLKFRASET = 0x1264 BLKGETDISKSEQ = 0x80081280 BLKGETSIZE = 0x1260 BLKGETSIZE64 = 0x80081272 BLKIOMIN = 0x1278 BLKIOOPT = 0x1279 BLKPBSZGET = 0x127b BLKRAGET = 0x1263 BLKRASET = 0x1262 BLKROGET = 0x125e BLKROSET = 0x125d BLKROTATIONAL = 0x127e BLKRRPART = 0x125f BLKSECDISCARD = 0x127d BLKSECTGET = 0x1267 BLKSECTSET = 0x1266 BLKSSZGET = 0x1268 BLKZEROOUT = 0x127f BOTHER = 0x1000 BS1 = 0x2000 BSDLY = 0x2000 CBAUD = 0x100f CBAUDEX = 0x1000 CIBAUD = 0x100f0000 CLOCAL = 0x800 CR1 = 0x200 CR2 = 0x400 CR3 = 0x600 CRDLY = 0x600 CREAD = 0x80 CS6 = 0x10 CS7 = 0x20 CS8 = 0x30 CSIZE = 0x30 CSTOPB = 0x40 ECCGETLAYOUT = 0x81484d11 ECCGETSTATS = 0x80104d12 ECHOCTL = 0x200 ECHOE = 0x10 ECHOK = 0x20 ECHOKE = 0x800 ECHONL = 0x40 ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 EPIOCGPARAMS = 0x80088a02 EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 FFDLY = 0x8000 FICLONE = 0x40049409 FICLONERANGE = 0x4020940d FLUSHO = 0x1000 FP_XSTATE_MAGIC2 = 0x46505845 FS_IOC_ENABLE_VERITY = 0x40806685 FS_IOC_GETFLAGS = 0x80086601 FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 FS_IOC_SETFLAGS = 0x40086602 FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 F_GETLK = 0x5 F_GETLK64 = 0x5 F_GETOWN = 0x9 F_RDLCK = 0x0 F_SETLK = 0x6 F_SETLK64 = 0x6 F_SETLKW = 0x7 F_SETLKW64 = 0x7 F_SETOWN = 0x8 F_UNLCK = 0x2 F_WRLCK = 0x1 HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 ISIG = 0x1 IUCLC = 0x200 IXOFF = 0x1000 IXON = 0x400 MAP_32BIT = 0x40 MAP_ABOVE4G = 0x80 MAP_ANON = 0x20 MAP_ANONYMOUS = 0x20 MAP_DENYWRITE = 0x800 MAP_EXECUTABLE = 0x1000 MAP_GROWSDOWN = 0x100 MAP_HUGETLB = 0x40000 MAP_LOCKED = 0x2000 MAP_NONBLOCK = 0x10000 MAP_NORESERVE = 0x4000 MAP_POPULATE = 0x8000 MAP_STACK = 0x20000 MAP_SYNC = 0x80000 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MCL_ONFAULT = 0x4 MEMERASE = 0x40084d02 MEMERASE64 = 0x40104d14 MEMGETBADBLOCK = 0x40084d0b MEMGETINFO = 0x80204d01 MEMGETOOBSEL = 0x80c84d0a MEMGETREGIONCOUNT = 0x80044d07 MEMISLOCKED = 0x80084d17 MEMLOCK = 0x40084d05 MEMREAD = 0xc0404d1a MEMREADOOB = 0xc0104d04 MEMSETBADBLOCK = 0x40084d0c MEMUNLOCK = 0x40084d06 MEMWRITEOOB = 0xc0104d03 MTDFILEMODE = 0x4d13 NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 OTPERASE = 0x400c4d19 OTPGETREGIONCOUNT = 0x40044d0e OTPGETREGIONINFO = 0x400c4d0f OTPLOCK = 0x800c4d10 OTPSELECT = 0x80044d0d 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_RSYNC = 0x101000 O_SYNC = 0x101000 O_TMPFILE = 0x410000 O_TRUNC = 0x200 PARENB = 0x100 PARODD = 0x200 PENDIN = 0x4000 PERF_EVENT_IOC_DISABLE = 0x2401 PERF_EVENT_IOC_ENABLE = 0x2400 PERF_EVENT_IOC_ID = 0x80082407 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409 PERF_EVENT_IOC_PERIOD = 0x40082404 PERF_EVENT_IOC_QUERY_BPF = 0xc008240a PERF_EVENT_IOC_REFRESH = 0x2402 PERF_EVENT_IOC_RESET = 0x2403 PERF_EVENT_IOC_SET_BPF = 0x40042408 PERF_EVENT_IOC_SET_FILTER = 0x40082406 PERF_EVENT_IOC_SET_OUTPUT = 0x2405 PPPIOCATTACH = 0x4004743d PPPIOCATTCHAN = 0x40047438 PPPIOCBRIDGECHAN = 0x40047435 PPPIOCCONNECT = 0x4004743a PPPIOCDETACH = 0x4004743c PPPIOCDISCONN = 0x7439 PPPIOCGASYNCMAP = 0x80047458 PPPIOCGCHAN = 0x80047437 PPPIOCGDEBUG = 0x80047441 PPPIOCGFLAGS = 0x8004745a PPPIOCGIDLE = 0x8010743f PPPIOCGIDLE32 = 0x8008743f PPPIOCGIDLE64 = 0x8010743f PPPIOCGL2TPSTATS = 0x80487436 PPPIOCGMRU = 0x80047453 PPPIOCGRASYNCMAP = 0x80047455 PPPIOCGUNIT = 0x80047456 PPPIOCGXASYNCMAP = 0x80207450 PPPIOCSACTIVE = 0x40107446 PPPIOCSASYNCMAP = 0x40047457 PPPIOCSCOMPRESS = 0x4010744d PPPIOCSDEBUG = 0x40047440 PPPIOCSFLAGS = 0x40047459 PPPIOCSMAXCID = 0x40047451 PPPIOCSMRRU = 0x4004743b PPPIOCSMRU = 0x40047452 PPPIOCSNPMODE = 0x4008744b PPPIOCSPASS = 0x40107447 PPPIOCSRASYNCMAP = 0x40047454 PPPIOCSXASYNCMAP = 0x4020744f PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PR_SET_PTRACER_ANY = 0xffffffffffffffff PTRACE_ARCH_PRCTL = 0x1e PTRACE_GETFPREGS = 0xe PTRACE_GETFPXREGS = 0x12 PTRACE_GET_THREAD_AREA = 0x19 PTRACE_OLDSETOPTIONS = 0x15 PTRACE_SETFPREGS = 0xf PTRACE_SETFPXREGS = 0x13 PTRACE_SET_THREAD_AREA = 0x1a PTRACE_SINGLEBLOCK = 0x21 PTRACE_SYSEMU = 0x1f PTRACE_SYSEMU_SINGLESTEP = 0x20 RLIMIT_AS = 0x9 RLIMIT_MEMLOCK = 0x8 RLIMIT_NOFILE = 0x7 RLIMIT_NPROC = 0x6 RLIMIT_RSS = 0x5 RNDADDENTROPY = 0x40085203 RNDADDTOENTCNT = 0x40045201 RNDCLEARPOOL = 0x5206 RNDGETENTCNT = 0x80045200 RNDGETPOOL = 0x80085202 RNDRESEEDCRNG = 0x5207 RNDZAPENTCNT = 0x5204 RTC_AIE_OFF = 0x7002 RTC_AIE_ON = 0x7001 RTC_ALM_READ = 0x80247008 RTC_ALM_SET = 0x40247007 RTC_EPOCH_READ = 0x8008700d RTC_EPOCH_SET = 0x4008700e RTC_IRQP_READ = 0x8008700b RTC_IRQP_SET = 0x4008700c RTC_PARAM_GET = 0x40187013 RTC_PARAM_SET = 0x40187014 RTC_PIE_OFF = 0x7006 RTC_PIE_ON = 0x7005 RTC_PLL_GET = 0x80207011 RTC_PLL_SET = 0x40207012 RTC_RD_TIME = 0x80247009 RTC_SET_TIME = 0x4024700a RTC_UIE_OFF = 0x7004 RTC_UIE_ON = 0x7003 RTC_VL_CLR = 0x7014 RTC_VL_READ = 0x80047013 RTC_WIE_OFF = 0x7010 RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 SIOCGPGRP = 0x8904 SIOCGSTAMPNS_NEW = 0x80108907 SIOCGSTAMP_NEW = 0x80108906 SIOCINQ = 0x541b SIOCOUTQ = 0x5411 SIOCSPGRP = 0x8902 SOCK_CLOEXEC = 0x80000 SOCK_DGRAM = 0x2 SOCK_NONBLOCK = 0x800 SOCK_STREAM = 0x1 SOL_SOCKET = 0x1 SO_ACCEPTCONN = 0x1e SO_ATTACH_BPF = 0x32 SO_ATTACH_REUSEPORT_CBPF = 0x33 SO_ATTACH_REUSEPORT_EBPF = 0x34 SO_BINDTODEVICE = 0x19 SO_BINDTOIFINDEX = 0x3e SO_BPF_EXTENSIONS = 0x30 SO_BROADCAST = 0x6 SO_BSDCOMPAT = 0xe SO_BUF_LOCK = 0x48 SO_BUSY_POLL = 0x2e SO_BUSY_POLL_BUDGET = 0x46 SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f SO_MEMINFO = 0x37 SO_NETNS_COOKIE = 0x47 SO_NOFCS = 0x2b SO_OOBINLINE = 0xa SO_PASSCRED = 0x10 SO_PASSPIDFD = 0x4c SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 SO_PEERGROUPS = 0x3b SO_PEERPIDFD = 0x4d SO_PEERSEC = 0x1f SO_PREFER_BUSY_POLL = 0x45 SO_PROTOCOL = 0x26 SO_RCVBUF = 0x8 SO_RCVBUFFORCE = 0x21 SO_RCVLOWAT = 0x12 SO_RCVMARK = 0x4b SO_RCVTIMEO = 0x14 SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_OLD = 0x14 SO_RESERVE_MEM = 0x49 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_SNDTIMEO_NEW = 0x43 SO_SNDTIMEO_OLD = 0x15 SO_TIMESTAMPING = 0x25 SO_TIMESTAMPING_NEW = 0x41 SO_TIMESTAMPING_OLD = 0x25 SO_TIMESTAMPNS = 0x23 SO_TIMESTAMPNS_NEW = 0x40 SO_TIMESTAMPNS_OLD = 0x23 SO_TIMESTAMP_NEW = 0x3f SO_TXREHASH = 0x4a SO_TXTIME = 0x3d SO_TYPE = 0x3 SO_WIFI_STATUS = 0x29 SO_ZEROCOPY = 0x3c TAB1 = 0x800 TAB2 = 0x1000 TAB3 = 0x1800 TABDLY = 0x1800 TCFLSH = 0x540b TCGETA = 0x5405 TCGETS = 0x5401 TCGETS2 = 0x802c542a TCGETX = 0x5432 TCSAFLUSH = 0x2 TCSBRK = 0x5409 TCSBRKP = 0x5425 TCSETA = 0x5406 TCSETAF = 0x5408 TCSETAW = 0x5407 TCSETS = 0x5402 TCSETS2 = 0x402c542b TCSETSF = 0x5404 TCSETSF2 = 0x402c542d TCSETSW = 0x5403 TCSETSW2 = 0x402c542c TCSETX = 0x5433 TCSETXF = 0x5434 TCSETXW = 0x5435 TCXONC = 0x540a TFD_CLOEXEC = 0x80000 TFD_NONBLOCK = 0x800 TIOCCBRK = 0x5428 TIOCCONS = 0x541d TIOCEXCL = 0x540c TIOCGDEV = 0x80045432 TIOCGETD = 0x5424 TIOCGEXCL = 0x80045440 TIOCGICOUNT = 0x545d TIOCGISO7816 = 0x80285442 TIOCGLCKTRMIOS = 0x5456 TIOCGPGRP = 0x540f TIOCGPKT = 0x80045438 TIOCGPTLCK = 0x80045439 TIOCGPTN = 0x80045430 TIOCGPTPEER = 0x5441 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_RI = 0x80 TIOCM_RNG = 0x80 TIOCM_SR = 0x10 TIOCM_ST = 0x8 TIOCNOTTY = 0x5422 TIOCNXCL = 0x540d TIOCOUTQ = 0x5411 TIOCPKT = 0x5420 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 TIOCSISO7816 = 0xc0285443 TIOCSLCKTRMIOS = 0x5457 TIOCSPGRP = 0x5410 TIOCSPTLCK = 0x40045431 TIOCSRS485 = 0x542f TIOCSSERIAL = 0x541f TIOCSSOFTCAR = 0x541a TIOCSTI = 0x5412 TIOCSWINSZ = 0x5414 TIOCVHANGUP = 0x5437 TOSTOP = 0x100 TUNATTACHFILTER = 0x401054d5 TUNDETACHFILTER = 0x401054d6 TUNGETDEVNETNS = 0x54e3 TUNGETFEATURES = 0x800454cf TUNGETFILTER = 0x801054db TUNGETIFF = 0x800454d2 TUNGETSNDBUF = 0x800454d3 TUNGETVNETBE = 0x800454df TUNGETVNETHDRSZ = 0x800454d7 TUNGETVNETLE = 0x800454dd TUNSETCARRIER = 0x400454e2 TUNSETDEBUG = 0x400454c9 TUNSETFILTEREBPF = 0x800454e1 TUNSETGROUP = 0x400454ce TUNSETIFF = 0x400454ca TUNSETIFINDEX = 0x400454da TUNSETLINK = 0x400454cd TUNSETNOCSUM = 0x400454c8 TUNSETOFFLOAD = 0x400454d0 TUNSETOWNER = 0x400454cc TUNSETPERSIST = 0x400454cb TUNSETQUEUE = 0x400454d9 TUNSETSNDBUF = 0x400454d4 TUNSETSTEERINGEBPF = 0x800454e0 TUNSETTXFILTER = 0x400454d1 TUNSETVNETBE = 0x400454de TUNSETVNETHDRSZ = 0x400454d8 TUNSETVNETLE = 0x400454dc UBI_IOCATT = 0x40186f40 UBI_IOCDET = 0x40046f41 UBI_IOCEBCH = 0x40044f02 UBI_IOCEBER = 0x40044f01 UBI_IOCEBISMAP = 0x80044f05 UBI_IOCEBMAP = 0x40084f03 UBI_IOCEBUNMAP = 0x40044f04 UBI_IOCMKVOL = 0x40986f00 UBI_IOCRMVOL = 0x40046f01 UBI_IOCRNVOL = 0x51106f03 UBI_IOCRPEB = 0x40046f04 UBI_IOCRSVOL = 0x400c6f02 UBI_IOCSETVOLPROP = 0x40104f06 UBI_IOCSPEB = 0x40046f05 UBI_IOCVOLCRBLK = 0x40804f07 UBI_IOCVOLRMBLK = 0x4f08 UBI_IOCVOLUP = 0x40084f00 VDISCARD = 0xd VEOF = 0x4 VEOL = 0xb VEOL2 = 0x10 VMIN = 0x6 VREPRINT = 0xc VSTART = 0x8 VSTOP = 0x9 VSUSP = 0xa VSWTC = 0x7 VT1 = 0x4000 VTDLY = 0x4000 VTIME = 0x5 VWERASE = 0xe WDIOC_GETBOOTSTATUS = 0x80045702 WDIOC_GETPRETIMEOUT = 0x80045709 WDIOC_GETSTATUS = 0x80045701 WDIOC_GETSUPPORT = 0x80285700 WDIOC_GETTEMP = 0x80045703 WDIOC_GETTIMELEFT = 0x8004570a WDIOC_GETTIMEOUT = 0x80045707 WDIOC_KEEPALIVE = 0x80045705 WDIOC_SETOPTIONS = 0x80045704 WORDSIZE = 0x40 XCASE = 0x4 XTABS = 0x1800 _HIDIOCGRAWNAME = 0x80804804 _HIDIOCGRAWPHYS = 0x80404805 _HIDIOCGRAWUNIQ = 0x80404808 ) // Errors const ( EADDRINUSE = syscall.Errno(0x62) EADDRNOTAVAIL = syscall.Errno(0x63) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x61) EALREADY = syscall.Errno(0x72) EBADE = syscall.Errno(0x34) EBADFD = syscall.Errno(0x4d) EBADMSG = syscall.Errno(0x4a) EBADR = syscall.Errno(0x35) EBADRQC = syscall.Errno(0x38) EBADSLT = syscall.Errno(0x39) EBFONT = syscall.Errno(0x3b) ECANCELED = syscall.Errno(0x7d) 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) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) EIDRM = syscall.Errno(0x2b) EILSEQ = syscall.Errno(0x54) EINPROGRESS = syscall.Errno(0x73) EISCONN = syscall.Errno(0x6a) 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) 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) ENOANO = syscall.Errno(0x37) ENOBUFS = syscall.Errno(0x69) ENOCSI = syscall.Errno(0x32) ENODATA = syscall.Errno(0x3d) ENOKEY = syscall.Errno(0x7e) ENOLCK = syscall.Errno(0x25) ENOLINK = syscall.Errno(0x43) ENOMEDIUM = syscall.Errno(0x7b) ENOMSG = syscall.Errno(0x2a) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x5c) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x26) ENOTCONN = syscall.Errno(0x6b) ENOTEMPTY = syscall.Errno(0x27) ENOTNAM = syscall.Errno(0x76) ENOTRECOVERABLE = syscall.Errno(0x83) ENOTSOCK = syscall.Errno(0x58) ENOTSUP = syscall.Errno(0x5f) ENOTUNIQ = syscall.Errno(0x4c) EOPNOTSUPP = syscall.Errno(0x5f) EOVERFLOW = syscall.Errno(0x4b) EOWNERDEAD = syscall.Errno(0x82) EPFNOSUPPORT = syscall.Errno(0x60) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x5d) EPROTOTYPE = syscall.Errno(0x5b) EREMCHG = syscall.Errno(0x4e) EREMOTE = syscall.Errno(0x42) EREMOTEIO = syscall.Errno(0x79) ERESTART = syscall.Errno(0x55) ERFKILL = syscall.Errno(0x84) ESHUTDOWN = syscall.Errno(0x6c) ESOCKTNOSUPPORT = syscall.Errno(0x5e) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x74) ESTRPIPE = syscall.Errno(0x56) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x6e) ETOOMANYREFS = syscall.Errno(0x6d) EUCLEAN = syscall.Errno(0x75) EUNATCH = syscall.Errno(0x31) EUSERS = syscall.Errno(0x57) EXFULL = syscall.Errno(0x36) ) // Signals const ( SIGBUS = syscall.Signal(0x7) SIGCHLD = syscall.Signal(0x11) SIGCLD = syscall.Signal(0x11) SIGCONT = syscall.Signal(0x12) SIGIO = syscall.Signal(0x1d) SIGPOLL = syscall.Signal(0x1d) SIGPROF = syscall.Signal(0x1b) SIGPWR = syscall.Signal(0x1e) SIGSTKFLT = syscall.Signal(0x10) SIGSTOP = syscall.Signal(0x13) SIGSYS = syscall.Signal(0x1f) SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "no such device or address"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EAGAIN", "resource temporarily unavailable"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device or resource busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "invalid cross-device link"}, {19, "ENODEV", "no such device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "numerical result out of range"}, {35, "EDEADLK", "resource deadlock avoided"}, {36, "ENAMETOOLONG", "file name too long"}, {37, "ENOLCK", "no locks available"}, {38, "ENOSYS", "function not implemented"}, {39, "ENOTEMPTY", "directory not empty"}, {40, "ELOOP", "too many levels of symbolic links"}, {42, "ENOMSG", "no message of desired type"}, {43, "EIDRM", "identifier removed"}, {44, "ECHRNG", "channel number out of range"}, {45, "EL2NSYNC", "level 2 not synchronized"}, {46, "EL3HLT", "level 3 halted"}, {47, "EL3RST", "level 3 reset"}, {48, "ELNRNG", "link number out of range"}, {49, "EUNATCH", "protocol driver not attached"}, {50, "ENOCSI", "no CSI structure available"}, {51, "EL2HLT", "level 2 halted"}, {52, "EBADE", "invalid exchange"}, {53, "EBADR", "invalid request descriptor"}, {54, "EXFULL", "exchange full"}, {55, "ENOANO", "no anode"}, {56, "EBADRQC", "invalid request code"}, {57, "EBADSLT", "invalid slot"}, {59, "EBFONT", "bad font file format"}, {60, "ENOSTR", "device not a stream"}, {61, "ENODATA", "no data available"}, {62, "ETIME", "timer expired"}, {63, "ENOSR", "out of streams resources"}, {64, "ENONET", "machine is not on the network"}, {65, "ENOPKG", "package not installed"}, {66, "EREMOTE", "object is remote"}, {67, "ENOLINK", "link has been severed"}, {68, "EADV", "advertise error"}, {69, "ESRMNT", "srmount error"}, {70, "ECOMM", "communication error on send"}, {71, "EPROTO", "protocol error"}, {72, "EMULTIHOP", "multihop attempted"}, {73, "EDOTDOT", "RFS specific error"}, {74, "EBADMSG", "bad message"}, {75, "EOVERFLOW", "value too large for defined data type"}, {76, "ENOTUNIQ", "name not unique on network"}, {77, "EBADFD", "file descriptor in bad state"}, {78, "EREMCHG", "remote address changed"}, {79, "ELIBACC", "can not access a needed shared library"}, {80, "ELIBBAD", "accessing a corrupted shared library"}, {81, "ELIBSCN", ".lib section in a.out corrupted"}, {82, "ELIBMAX", "attempting to link in too many shared libraries"}, {83, "ELIBEXEC", "cannot exec a shared library directly"}, {84, "EILSEQ", "invalid or incomplete multibyte or wide character"}, {85, "ERESTART", "interrupted system call should be restarted"}, {86, "ESTRPIPE", "streams pipe error"}, {87, "EUSERS", "too many users"}, {88, "ENOTSOCK", "socket operation on non-socket"}, {89, "EDESTADDRREQ", "destination address required"}, {90, "EMSGSIZE", "message too long"}, {91, "EPROTOTYPE", "protocol wrong type for socket"}, {92, "ENOPROTOOPT", "protocol not available"}, {93, "EPROTONOSUPPORT", "protocol not supported"}, {94, "ESOCKTNOSUPPORT", "socket type not supported"}, {95, "ENOTSUP", "operation not supported"}, {96, "EPFNOSUPPORT", "protocol family not supported"}, {97, "EAFNOSUPPORT", "address family not supported by protocol"}, {98, "EADDRINUSE", "address already in use"}, {99, "EADDRNOTAVAIL", "cannot assign requested address"}, {100, "ENETDOWN", "network is down"}, {101, "ENETUNREACH", "network is unreachable"}, {102, "ENETRESET", "network dropped connection on reset"}, {103, "ECONNABORTED", "software caused connection abort"}, {104, "ECONNRESET", "connection reset by peer"}, {105, "ENOBUFS", "no buffer space available"}, {106, "EISCONN", "transport endpoint is already connected"}, {107, "ENOTCONN", "transport endpoint is not connected"}, {108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"}, {109, "ETOOMANYREFS", "too many references: cannot splice"}, {110, "ETIMEDOUT", "connection timed out"}, {111, "ECONNREFUSED", "connection refused"}, {112, "EHOSTDOWN", "host is down"}, {113, "EHOSTUNREACH", "no route to host"}, {114, "EALREADY", "operation already in progress"}, {115, "EINPROGRESS", "operation now in progress"}, {116, "ESTALE", "stale file handle"}, {117, "EUCLEAN", "structure needs cleaning"}, {118, "ENOTNAM", "not a XENIX named type file"}, {119, "ENAVAIL", "no XENIX semaphores available"}, {120, "EISNAM", "is a named type file"}, {121, "EREMOTEIO", "remote I/O error"}, {122, "EDQUOT", "disk quota exceeded"}, {123, "ENOMEDIUM", "no medium found"}, {124, "EMEDIUMTYPE", "wrong medium type"}, {125, "ECANCELED", "operation canceled"}, {126, "ENOKEY", "required key not available"}, {127, "EKEYEXPIRED", "key has expired"}, {128, "EKEYREVOKED", "key has been revoked"}, {129, "EKEYREJECTED", "key was rejected by service"}, {130, "EOWNERDEAD", "owner died"}, {131, "ENOTRECOVERABLE", "state not recoverable"}, {132, "ERFKILL", "operation not possible due to RF-kill"}, {133, "EHWPOISON", "memory page has hardware error"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/breakpoint trap"}, {6, "SIGABRT", "aborted"}, {7, "SIGBUS", "bus error"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGUSR1", "user defined signal 1"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGUSR2", "user defined signal 2"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGSTKFLT", "stack fault"}, {17, "SIGCHLD", "child exited"}, {18, "SIGCONT", "continued"}, {19, "SIGSTOP", "stopped (signal)"}, {20, "SIGTSTP", "stopped"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGURG", "urgent I/O condition"}, {24, "SIGXCPU", "CPU time limit exceeded"}, {25, "SIGXFSZ", "file size limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window changed"}, {29, "SIGIO", "I/O possible"}, {30, "SIGPWR", "power failure"}, {31, "SIGSYS", "bad system call"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_linux_arm.go ================================================ // mkerrors.sh -Wall -Werror -static -I/tmp/arm/include // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/arm/include _const.go package unix import "syscall" const ( B1000000 = 0x1008 B115200 = 0x1002 B1152000 = 0x1009 B1500000 = 0x100a B2000000 = 0x100b B230400 = 0x1003 B2500000 = 0x100c B3000000 = 0x100d B3500000 = 0x100e B4000000 = 0x100f B460800 = 0x1004 B500000 = 0x1005 B57600 = 0x1001 B576000 = 0x1006 B921600 = 0x1007 BLKALIGNOFF = 0x127a BLKBSZGET = 0x80041270 BLKBSZSET = 0x40041271 BLKDISCARD = 0x1277 BLKDISCARDZEROES = 0x127c BLKFLSBUF = 0x1261 BLKFRAGET = 0x1265 BLKFRASET = 0x1264 BLKGETDISKSEQ = 0x80081280 BLKGETSIZE = 0x1260 BLKGETSIZE64 = 0x80041272 BLKIOMIN = 0x1278 BLKIOOPT = 0x1279 BLKPBSZGET = 0x127b BLKRAGET = 0x1263 BLKRASET = 0x1262 BLKROGET = 0x125e BLKROSET = 0x125d BLKROTATIONAL = 0x127e BLKRRPART = 0x125f BLKSECDISCARD = 0x127d BLKSECTGET = 0x1267 BLKSECTSET = 0x1266 BLKSSZGET = 0x1268 BLKZEROOUT = 0x127f BOTHER = 0x1000 BS1 = 0x2000 BSDLY = 0x2000 CBAUD = 0x100f CBAUDEX = 0x1000 CIBAUD = 0x100f0000 CLOCAL = 0x800 CR1 = 0x200 CR2 = 0x400 CR3 = 0x600 CRDLY = 0x600 CREAD = 0x80 CS6 = 0x10 CS7 = 0x20 CS8 = 0x30 CSIZE = 0x30 CSTOPB = 0x40 ECCGETLAYOUT = 0x81484d11 ECCGETSTATS = 0x80104d12 ECHOCTL = 0x200 ECHOE = 0x10 ECHOK = 0x20 ECHOKE = 0x800 ECHONL = 0x40 ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 EPIOCGPARAMS = 0x80088a02 EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 FFDLY = 0x8000 FICLONE = 0x40049409 FICLONERANGE = 0x4020940d FLUSHO = 0x1000 FS_IOC_ENABLE_VERITY = 0x40806685 FS_IOC_GETFLAGS = 0x80046601 FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 FS_IOC_SETFLAGS = 0x40046602 FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 F_GETLK = 0xc F_GETLK64 = 0xc F_GETOWN = 0x9 F_RDLCK = 0x0 F_SETLK = 0xd F_SETLK64 = 0xd F_SETLKW = 0xe F_SETLKW64 = 0xe F_SETOWN = 0x8 F_UNLCK = 0x2 F_WRLCK = 0x1 HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 ISIG = 0x1 IUCLC = 0x200 IXOFF = 0x1000 IXON = 0x400 MAP_ANON = 0x20 MAP_ANONYMOUS = 0x20 MAP_DENYWRITE = 0x800 MAP_EXECUTABLE = 0x1000 MAP_GROWSDOWN = 0x100 MAP_HUGETLB = 0x40000 MAP_LOCKED = 0x2000 MAP_NONBLOCK = 0x10000 MAP_NORESERVE = 0x4000 MAP_POPULATE = 0x8000 MAP_STACK = 0x20000 MAP_SYNC = 0x80000 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MCL_ONFAULT = 0x4 MEMERASE = 0x40084d02 MEMERASE64 = 0x40104d14 MEMGETBADBLOCK = 0x40084d0b MEMGETINFO = 0x80204d01 MEMGETOOBSEL = 0x80c84d0a MEMGETREGIONCOUNT = 0x80044d07 MEMISLOCKED = 0x80084d17 MEMLOCK = 0x40084d05 MEMREAD = 0xc0404d1a MEMREADOOB = 0xc00c4d04 MEMSETBADBLOCK = 0x40084d0c MEMUNLOCK = 0x40084d06 MEMWRITEOOB = 0xc00c4d03 MTDFILEMODE = 0x4d13 NFDBITS = 0x20 NLDLY = 0x100 NOFLSH = 0x80 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 OTPERASE = 0x400c4d19 OTPGETREGIONCOUNT = 0x40044d0e OTPGETREGIONINFO = 0x400c4d0f OTPLOCK = 0x800c4d10 OTPSELECT = 0x80044d0d 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 = 0x20000 O_NDELAY = 0x800 O_NOATIME = 0x40000 O_NOCTTY = 0x100 O_NOFOLLOW = 0x8000 O_NONBLOCK = 0x800 O_PATH = 0x200000 O_RSYNC = 0x101000 O_SYNC = 0x101000 O_TMPFILE = 0x404000 O_TRUNC = 0x200 PARENB = 0x100 PARODD = 0x200 PENDIN = 0x4000 PERF_EVENT_IOC_DISABLE = 0x2401 PERF_EVENT_IOC_ENABLE = 0x2400 PERF_EVENT_IOC_ID = 0x80042407 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4004240b PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409 PERF_EVENT_IOC_PERIOD = 0x40082404 PERF_EVENT_IOC_QUERY_BPF = 0xc004240a PERF_EVENT_IOC_REFRESH = 0x2402 PERF_EVENT_IOC_RESET = 0x2403 PERF_EVENT_IOC_SET_BPF = 0x40042408 PERF_EVENT_IOC_SET_FILTER = 0x40042406 PERF_EVENT_IOC_SET_OUTPUT = 0x2405 PPPIOCATTACH = 0x4004743d PPPIOCATTCHAN = 0x40047438 PPPIOCBRIDGECHAN = 0x40047435 PPPIOCCONNECT = 0x4004743a PPPIOCDETACH = 0x4004743c PPPIOCDISCONN = 0x7439 PPPIOCGASYNCMAP = 0x80047458 PPPIOCGCHAN = 0x80047437 PPPIOCGDEBUG = 0x80047441 PPPIOCGFLAGS = 0x8004745a PPPIOCGIDLE = 0x8008743f PPPIOCGIDLE32 = 0x8008743f PPPIOCGIDLE64 = 0x8010743f PPPIOCGL2TPSTATS = 0x80487436 PPPIOCGMRU = 0x80047453 PPPIOCGRASYNCMAP = 0x80047455 PPPIOCGUNIT = 0x80047456 PPPIOCGXASYNCMAP = 0x80207450 PPPIOCSACTIVE = 0x40087446 PPPIOCSASYNCMAP = 0x40047457 PPPIOCSCOMPRESS = 0x400c744d PPPIOCSDEBUG = 0x40047440 PPPIOCSFLAGS = 0x40047459 PPPIOCSMAXCID = 0x40047451 PPPIOCSMRRU = 0x4004743b PPPIOCSMRU = 0x40047452 PPPIOCSNPMODE = 0x4008744b PPPIOCSPASS = 0x40087447 PPPIOCSRASYNCMAP = 0x40047454 PPPIOCSXASYNCMAP = 0x4020744f PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PR_SET_PTRACER_ANY = 0xffffffff PTRACE_GETCRUNCHREGS = 0x19 PTRACE_GETFDPIC = 0x1f PTRACE_GETFDPIC_EXEC = 0x0 PTRACE_GETFDPIC_INTERP = 0x1 PTRACE_GETFPREGS = 0xe PTRACE_GETHBPREGS = 0x1d PTRACE_GETVFPREGS = 0x1b PTRACE_GETWMMXREGS = 0x12 PTRACE_GET_THREAD_AREA = 0x16 PTRACE_OLDSETOPTIONS = 0x15 PTRACE_SETCRUNCHREGS = 0x1a PTRACE_SETFPREGS = 0xf PTRACE_SETHBPREGS = 0x1e PTRACE_SETVFPREGS = 0x1c PTRACE_SETWMMXREGS = 0x13 PTRACE_SET_SYSCALL = 0x17 PT_DATA_ADDR = 0x10004 PT_TEXT_ADDR = 0x10000 PT_TEXT_END_ADDR = 0x10008 RLIMIT_AS = 0x9 RLIMIT_MEMLOCK = 0x8 RLIMIT_NOFILE = 0x7 RLIMIT_NPROC = 0x6 RLIMIT_RSS = 0x5 RNDADDENTROPY = 0x40085203 RNDADDTOENTCNT = 0x40045201 RNDCLEARPOOL = 0x5206 RNDGETENTCNT = 0x80045200 RNDGETPOOL = 0x80085202 RNDRESEEDCRNG = 0x5207 RNDZAPENTCNT = 0x5204 RTC_AIE_OFF = 0x7002 RTC_AIE_ON = 0x7001 RTC_ALM_READ = 0x80247008 RTC_ALM_SET = 0x40247007 RTC_EPOCH_READ = 0x8004700d RTC_EPOCH_SET = 0x4004700e RTC_IRQP_READ = 0x8004700b RTC_IRQP_SET = 0x4004700c RTC_PARAM_GET = 0x40187013 RTC_PARAM_SET = 0x40187014 RTC_PIE_OFF = 0x7006 RTC_PIE_ON = 0x7005 RTC_PLL_GET = 0x801c7011 RTC_PLL_SET = 0x401c7012 RTC_RD_TIME = 0x80247009 RTC_SET_TIME = 0x4024700a RTC_UIE_OFF = 0x7004 RTC_UIE_ON = 0x7003 RTC_VL_CLR = 0x7014 RTC_VL_READ = 0x80047013 RTC_WIE_OFF = 0x7010 RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 SIOCGPGRP = 0x8904 SIOCGSTAMPNS_NEW = 0x80108907 SIOCGSTAMP_NEW = 0x80108906 SIOCINQ = 0x541b SIOCOUTQ = 0x5411 SIOCSPGRP = 0x8902 SOCK_CLOEXEC = 0x80000 SOCK_DGRAM = 0x2 SOCK_NONBLOCK = 0x800 SOCK_STREAM = 0x1 SOL_SOCKET = 0x1 SO_ACCEPTCONN = 0x1e SO_ATTACH_BPF = 0x32 SO_ATTACH_REUSEPORT_CBPF = 0x33 SO_ATTACH_REUSEPORT_EBPF = 0x34 SO_BINDTODEVICE = 0x19 SO_BINDTOIFINDEX = 0x3e SO_BPF_EXTENSIONS = 0x30 SO_BROADCAST = 0x6 SO_BSDCOMPAT = 0xe SO_BUF_LOCK = 0x48 SO_BUSY_POLL = 0x2e SO_BUSY_POLL_BUDGET = 0x46 SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f SO_MEMINFO = 0x37 SO_NETNS_COOKIE = 0x47 SO_NOFCS = 0x2b SO_OOBINLINE = 0xa SO_PASSCRED = 0x10 SO_PASSPIDFD = 0x4c SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 SO_PEERGROUPS = 0x3b SO_PEERPIDFD = 0x4d SO_PEERSEC = 0x1f SO_PREFER_BUSY_POLL = 0x45 SO_PROTOCOL = 0x26 SO_RCVBUF = 0x8 SO_RCVBUFFORCE = 0x21 SO_RCVLOWAT = 0x12 SO_RCVMARK = 0x4b SO_RCVTIMEO = 0x14 SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_OLD = 0x14 SO_RESERVE_MEM = 0x49 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_SNDTIMEO_NEW = 0x43 SO_SNDTIMEO_OLD = 0x15 SO_TIMESTAMPING = 0x25 SO_TIMESTAMPING_NEW = 0x41 SO_TIMESTAMPING_OLD = 0x25 SO_TIMESTAMPNS = 0x23 SO_TIMESTAMPNS_NEW = 0x40 SO_TIMESTAMPNS_OLD = 0x23 SO_TIMESTAMP_NEW = 0x3f SO_TXREHASH = 0x4a SO_TXTIME = 0x3d SO_TYPE = 0x3 SO_WIFI_STATUS = 0x29 SO_ZEROCOPY = 0x3c TAB1 = 0x800 TAB2 = 0x1000 TAB3 = 0x1800 TABDLY = 0x1800 TCFLSH = 0x540b TCGETA = 0x5405 TCGETS = 0x5401 TCGETS2 = 0x802c542a TCGETX = 0x5432 TCSAFLUSH = 0x2 TCSBRK = 0x5409 TCSBRKP = 0x5425 TCSETA = 0x5406 TCSETAF = 0x5408 TCSETAW = 0x5407 TCSETS = 0x5402 TCSETS2 = 0x402c542b TCSETSF = 0x5404 TCSETSF2 = 0x402c542d TCSETSW = 0x5403 TCSETSW2 = 0x402c542c TCSETX = 0x5433 TCSETXF = 0x5434 TCSETXW = 0x5435 TCXONC = 0x540a TFD_CLOEXEC = 0x80000 TFD_NONBLOCK = 0x800 TIOCCBRK = 0x5428 TIOCCONS = 0x541d TIOCEXCL = 0x540c TIOCGDEV = 0x80045432 TIOCGETD = 0x5424 TIOCGEXCL = 0x80045440 TIOCGICOUNT = 0x545d TIOCGISO7816 = 0x80285442 TIOCGLCKTRMIOS = 0x5456 TIOCGPGRP = 0x540f TIOCGPKT = 0x80045438 TIOCGPTLCK = 0x80045439 TIOCGPTN = 0x80045430 TIOCGPTPEER = 0x5441 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_RI = 0x80 TIOCM_RNG = 0x80 TIOCM_SR = 0x10 TIOCM_ST = 0x8 TIOCNOTTY = 0x5422 TIOCNXCL = 0x540d TIOCOUTQ = 0x5411 TIOCPKT = 0x5420 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 TIOCSISO7816 = 0xc0285443 TIOCSLCKTRMIOS = 0x5457 TIOCSPGRP = 0x5410 TIOCSPTLCK = 0x40045431 TIOCSRS485 = 0x542f TIOCSSERIAL = 0x541f TIOCSSOFTCAR = 0x541a TIOCSTI = 0x5412 TIOCSWINSZ = 0x5414 TIOCVHANGUP = 0x5437 TOSTOP = 0x100 TUNATTACHFILTER = 0x400854d5 TUNDETACHFILTER = 0x400854d6 TUNGETDEVNETNS = 0x54e3 TUNGETFEATURES = 0x800454cf TUNGETFILTER = 0x800854db TUNGETIFF = 0x800454d2 TUNGETSNDBUF = 0x800454d3 TUNGETVNETBE = 0x800454df TUNGETVNETHDRSZ = 0x800454d7 TUNGETVNETLE = 0x800454dd TUNSETCARRIER = 0x400454e2 TUNSETDEBUG = 0x400454c9 TUNSETFILTEREBPF = 0x800454e1 TUNSETGROUP = 0x400454ce TUNSETIFF = 0x400454ca TUNSETIFINDEX = 0x400454da TUNSETLINK = 0x400454cd TUNSETNOCSUM = 0x400454c8 TUNSETOFFLOAD = 0x400454d0 TUNSETOWNER = 0x400454cc TUNSETPERSIST = 0x400454cb TUNSETQUEUE = 0x400454d9 TUNSETSNDBUF = 0x400454d4 TUNSETSTEERINGEBPF = 0x800454e0 TUNSETTXFILTER = 0x400454d1 TUNSETVNETBE = 0x400454de TUNSETVNETHDRSZ = 0x400454d8 TUNSETVNETLE = 0x400454dc UBI_IOCATT = 0x40186f40 UBI_IOCDET = 0x40046f41 UBI_IOCEBCH = 0x40044f02 UBI_IOCEBER = 0x40044f01 UBI_IOCEBISMAP = 0x80044f05 UBI_IOCEBMAP = 0x40084f03 UBI_IOCEBUNMAP = 0x40044f04 UBI_IOCMKVOL = 0x40986f00 UBI_IOCRMVOL = 0x40046f01 UBI_IOCRNVOL = 0x51106f03 UBI_IOCRPEB = 0x40046f04 UBI_IOCRSVOL = 0x400c6f02 UBI_IOCSETVOLPROP = 0x40104f06 UBI_IOCSPEB = 0x40046f05 UBI_IOCVOLCRBLK = 0x40804f07 UBI_IOCVOLRMBLK = 0x4f08 UBI_IOCVOLUP = 0x40084f00 VDISCARD = 0xd VEOF = 0x4 VEOL = 0xb VEOL2 = 0x10 VMIN = 0x6 VREPRINT = 0xc VSTART = 0x8 VSTOP = 0x9 VSUSP = 0xa VSWTC = 0x7 VT1 = 0x4000 VTDLY = 0x4000 VTIME = 0x5 VWERASE = 0xe WDIOC_GETBOOTSTATUS = 0x80045702 WDIOC_GETPRETIMEOUT = 0x80045709 WDIOC_GETSTATUS = 0x80045701 WDIOC_GETSUPPORT = 0x80285700 WDIOC_GETTEMP = 0x80045703 WDIOC_GETTIMELEFT = 0x8004570a WDIOC_GETTIMEOUT = 0x80045707 WDIOC_KEEPALIVE = 0x80045705 WDIOC_SETOPTIONS = 0x80045704 WORDSIZE = 0x20 XCASE = 0x4 XTABS = 0x1800 _HIDIOCGRAWNAME = 0x80804804 _HIDIOCGRAWPHYS = 0x80404805 _HIDIOCGRAWUNIQ = 0x80404808 ) // Errors const ( EADDRINUSE = syscall.Errno(0x62) EADDRNOTAVAIL = syscall.Errno(0x63) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x61) EALREADY = syscall.Errno(0x72) EBADE = syscall.Errno(0x34) EBADFD = syscall.Errno(0x4d) EBADMSG = syscall.Errno(0x4a) EBADR = syscall.Errno(0x35) EBADRQC = syscall.Errno(0x38) EBADSLT = syscall.Errno(0x39) EBFONT = syscall.Errno(0x3b) ECANCELED = syscall.Errno(0x7d) 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) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) EIDRM = syscall.Errno(0x2b) EILSEQ = syscall.Errno(0x54) EINPROGRESS = syscall.Errno(0x73) EISCONN = syscall.Errno(0x6a) 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) 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) ENOANO = syscall.Errno(0x37) ENOBUFS = syscall.Errno(0x69) ENOCSI = syscall.Errno(0x32) ENODATA = syscall.Errno(0x3d) ENOKEY = syscall.Errno(0x7e) ENOLCK = syscall.Errno(0x25) ENOLINK = syscall.Errno(0x43) ENOMEDIUM = syscall.Errno(0x7b) ENOMSG = syscall.Errno(0x2a) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x5c) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x26) ENOTCONN = syscall.Errno(0x6b) ENOTEMPTY = syscall.Errno(0x27) ENOTNAM = syscall.Errno(0x76) ENOTRECOVERABLE = syscall.Errno(0x83) ENOTSOCK = syscall.Errno(0x58) ENOTSUP = syscall.Errno(0x5f) ENOTUNIQ = syscall.Errno(0x4c) EOPNOTSUPP = syscall.Errno(0x5f) EOVERFLOW = syscall.Errno(0x4b) EOWNERDEAD = syscall.Errno(0x82) EPFNOSUPPORT = syscall.Errno(0x60) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x5d) EPROTOTYPE = syscall.Errno(0x5b) EREMCHG = syscall.Errno(0x4e) EREMOTE = syscall.Errno(0x42) EREMOTEIO = syscall.Errno(0x79) ERESTART = syscall.Errno(0x55) ERFKILL = syscall.Errno(0x84) ESHUTDOWN = syscall.Errno(0x6c) ESOCKTNOSUPPORT = syscall.Errno(0x5e) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x74) ESTRPIPE = syscall.Errno(0x56) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x6e) ETOOMANYREFS = syscall.Errno(0x6d) EUCLEAN = syscall.Errno(0x75) EUNATCH = syscall.Errno(0x31) EUSERS = syscall.Errno(0x57) EXFULL = syscall.Errno(0x36) ) // Signals const ( SIGBUS = syscall.Signal(0x7) SIGCHLD = syscall.Signal(0x11) SIGCLD = syscall.Signal(0x11) SIGCONT = syscall.Signal(0x12) SIGIO = syscall.Signal(0x1d) SIGPOLL = syscall.Signal(0x1d) SIGPROF = syscall.Signal(0x1b) SIGPWR = syscall.Signal(0x1e) SIGSTKFLT = syscall.Signal(0x10) SIGSTOP = syscall.Signal(0x13) SIGSYS = syscall.Signal(0x1f) SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "no such device or address"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EAGAIN", "resource temporarily unavailable"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device or resource busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "invalid cross-device link"}, {19, "ENODEV", "no such device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "numerical result out of range"}, {35, "EDEADLK", "resource deadlock avoided"}, {36, "ENAMETOOLONG", "file name too long"}, {37, "ENOLCK", "no locks available"}, {38, "ENOSYS", "function not implemented"}, {39, "ENOTEMPTY", "directory not empty"}, {40, "ELOOP", "too many levels of symbolic links"}, {42, "ENOMSG", "no message of desired type"}, {43, "EIDRM", "identifier removed"}, {44, "ECHRNG", "channel number out of range"}, {45, "EL2NSYNC", "level 2 not synchronized"}, {46, "EL3HLT", "level 3 halted"}, {47, "EL3RST", "level 3 reset"}, {48, "ELNRNG", "link number out of range"}, {49, "EUNATCH", "protocol driver not attached"}, {50, "ENOCSI", "no CSI structure available"}, {51, "EL2HLT", "level 2 halted"}, {52, "EBADE", "invalid exchange"}, {53, "EBADR", "invalid request descriptor"}, {54, "EXFULL", "exchange full"}, {55, "ENOANO", "no anode"}, {56, "EBADRQC", "invalid request code"}, {57, "EBADSLT", "invalid slot"}, {59, "EBFONT", "bad font file format"}, {60, "ENOSTR", "device not a stream"}, {61, "ENODATA", "no data available"}, {62, "ETIME", "timer expired"}, {63, "ENOSR", "out of streams resources"}, {64, "ENONET", "machine is not on the network"}, {65, "ENOPKG", "package not installed"}, {66, "EREMOTE", "object is remote"}, {67, "ENOLINK", "link has been severed"}, {68, "EADV", "advertise error"}, {69, "ESRMNT", "srmount error"}, {70, "ECOMM", "communication error on send"}, {71, "EPROTO", "protocol error"}, {72, "EMULTIHOP", "multihop attempted"}, {73, "EDOTDOT", "RFS specific error"}, {74, "EBADMSG", "bad message"}, {75, "EOVERFLOW", "value too large for defined data type"}, {76, "ENOTUNIQ", "name not unique on network"}, {77, "EBADFD", "file descriptor in bad state"}, {78, "EREMCHG", "remote address changed"}, {79, "ELIBACC", "can not access a needed shared library"}, {80, "ELIBBAD", "accessing a corrupted shared library"}, {81, "ELIBSCN", ".lib section in a.out corrupted"}, {82, "ELIBMAX", "attempting to link in too many shared libraries"}, {83, "ELIBEXEC", "cannot exec a shared library directly"}, {84, "EILSEQ", "invalid or incomplete multibyte or wide character"}, {85, "ERESTART", "interrupted system call should be restarted"}, {86, "ESTRPIPE", "streams pipe error"}, {87, "EUSERS", "too many users"}, {88, "ENOTSOCK", "socket operation on non-socket"}, {89, "EDESTADDRREQ", "destination address required"}, {90, "EMSGSIZE", "message too long"}, {91, "EPROTOTYPE", "protocol wrong type for socket"}, {92, "ENOPROTOOPT", "protocol not available"}, {93, "EPROTONOSUPPORT", "protocol not supported"}, {94, "ESOCKTNOSUPPORT", "socket type not supported"}, {95, "ENOTSUP", "operation not supported"}, {96, "EPFNOSUPPORT", "protocol family not supported"}, {97, "EAFNOSUPPORT", "address family not supported by protocol"}, {98, "EADDRINUSE", "address already in use"}, {99, "EADDRNOTAVAIL", "cannot assign requested address"}, {100, "ENETDOWN", "network is down"}, {101, "ENETUNREACH", "network is unreachable"}, {102, "ENETRESET", "network dropped connection on reset"}, {103, "ECONNABORTED", "software caused connection abort"}, {104, "ECONNRESET", "connection reset by peer"}, {105, "ENOBUFS", "no buffer space available"}, {106, "EISCONN", "transport endpoint is already connected"}, {107, "ENOTCONN", "transport endpoint is not connected"}, {108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"}, {109, "ETOOMANYREFS", "too many references: cannot splice"}, {110, "ETIMEDOUT", "connection timed out"}, {111, "ECONNREFUSED", "connection refused"}, {112, "EHOSTDOWN", "host is down"}, {113, "EHOSTUNREACH", "no route to host"}, {114, "EALREADY", "operation already in progress"}, {115, "EINPROGRESS", "operation now in progress"}, {116, "ESTALE", "stale file handle"}, {117, "EUCLEAN", "structure needs cleaning"}, {118, "ENOTNAM", "not a XENIX named type file"}, {119, "ENAVAIL", "no XENIX semaphores available"}, {120, "EISNAM", "is a named type file"}, {121, "EREMOTEIO", "remote I/O error"}, {122, "EDQUOT", "disk quota exceeded"}, {123, "ENOMEDIUM", "no medium found"}, {124, "EMEDIUMTYPE", "wrong medium type"}, {125, "ECANCELED", "operation canceled"}, {126, "ENOKEY", "required key not available"}, {127, "EKEYEXPIRED", "key has expired"}, {128, "EKEYREVOKED", "key has been revoked"}, {129, "EKEYREJECTED", "key was rejected by service"}, {130, "EOWNERDEAD", "owner died"}, {131, "ENOTRECOVERABLE", "state not recoverable"}, {132, "ERFKILL", "operation not possible due to RF-kill"}, {133, "EHWPOISON", "memory page has hardware error"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/breakpoint trap"}, {6, "SIGABRT", "aborted"}, {7, "SIGBUS", "bus error"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGUSR1", "user defined signal 1"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGUSR2", "user defined signal 2"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGSTKFLT", "stack fault"}, {17, "SIGCHLD", "child exited"}, {18, "SIGCONT", "continued"}, {19, "SIGSTOP", "stopped (signal)"}, {20, "SIGTSTP", "stopped"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGURG", "urgent I/O condition"}, {24, "SIGXCPU", "CPU time limit exceeded"}, {25, "SIGXFSZ", "file size limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window changed"}, {29, "SIGIO", "I/O possible"}, {30, "SIGPWR", "power failure"}, {31, "SIGSYS", "bad system call"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go ================================================ // mkerrors.sh -Wall -Werror -static -I/tmp/arm64/include -fsigned-char // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/arm64/include -fsigned-char _const.go package unix import "syscall" const ( B1000000 = 0x1008 B115200 = 0x1002 B1152000 = 0x1009 B1500000 = 0x100a B2000000 = 0x100b B230400 = 0x1003 B2500000 = 0x100c B3000000 = 0x100d B3500000 = 0x100e B4000000 = 0x100f B460800 = 0x1004 B500000 = 0x1005 B57600 = 0x1001 B576000 = 0x1006 B921600 = 0x1007 BLKALIGNOFF = 0x127a BLKBSZGET = 0x80081270 BLKBSZSET = 0x40081271 BLKDISCARD = 0x1277 BLKDISCARDZEROES = 0x127c BLKFLSBUF = 0x1261 BLKFRAGET = 0x1265 BLKFRASET = 0x1264 BLKGETDISKSEQ = 0x80081280 BLKGETSIZE = 0x1260 BLKGETSIZE64 = 0x80081272 BLKIOMIN = 0x1278 BLKIOOPT = 0x1279 BLKPBSZGET = 0x127b BLKRAGET = 0x1263 BLKRASET = 0x1262 BLKROGET = 0x125e BLKROSET = 0x125d BLKROTATIONAL = 0x127e BLKRRPART = 0x125f BLKSECDISCARD = 0x127d BLKSECTGET = 0x1267 BLKSECTSET = 0x1266 BLKSSZGET = 0x1268 BLKZEROOUT = 0x127f BOTHER = 0x1000 BS1 = 0x2000 BSDLY = 0x2000 CBAUD = 0x100f CBAUDEX = 0x1000 CIBAUD = 0x100f0000 CLOCAL = 0x800 CR1 = 0x200 CR2 = 0x400 CR3 = 0x600 CRDLY = 0x600 CREAD = 0x80 CS6 = 0x10 CS7 = 0x20 CS8 = 0x30 CSIZE = 0x30 CSTOPB = 0x40 ECCGETLAYOUT = 0x81484d11 ECCGETSTATS = 0x80104d12 ECHOCTL = 0x200 ECHOE = 0x10 ECHOK = 0x20 ECHOKE = 0x800 ECHONL = 0x40 ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 EPIOCGPARAMS = 0x80088a02 EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 ESR_MAGIC = 0x45535201 EXTPROC = 0x10000 EXTRA_MAGIC = 0x45585401 FF1 = 0x8000 FFDLY = 0x8000 FICLONE = 0x40049409 FICLONERANGE = 0x4020940d FLUSHO = 0x1000 FPMR_MAGIC = 0x46504d52 FPSIMD_MAGIC = 0x46508001 FS_IOC_ENABLE_VERITY = 0x40806685 FS_IOC_GETFLAGS = 0x80086601 FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 FS_IOC_SETFLAGS = 0x40086602 FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 F_GETLK = 0x5 F_GETLK64 = 0x5 F_GETOWN = 0x9 F_RDLCK = 0x0 F_SETLK = 0x6 F_SETLK64 = 0x6 F_SETLKW = 0x7 F_SETLKW64 = 0x7 F_SETOWN = 0x8 F_UNLCK = 0x2 F_WRLCK = 0x1 HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 ISIG = 0x1 IUCLC = 0x200 IXOFF = 0x1000 IXON = 0x400 MAP_ANON = 0x20 MAP_ANONYMOUS = 0x20 MAP_DENYWRITE = 0x800 MAP_EXECUTABLE = 0x1000 MAP_GROWSDOWN = 0x100 MAP_HUGETLB = 0x40000 MAP_LOCKED = 0x2000 MAP_NONBLOCK = 0x10000 MAP_NORESERVE = 0x4000 MAP_POPULATE = 0x8000 MAP_STACK = 0x20000 MAP_SYNC = 0x80000 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MCL_ONFAULT = 0x4 MEMERASE = 0x40084d02 MEMERASE64 = 0x40104d14 MEMGETBADBLOCK = 0x40084d0b MEMGETINFO = 0x80204d01 MEMGETOOBSEL = 0x80c84d0a MEMGETREGIONCOUNT = 0x80044d07 MEMISLOCKED = 0x80084d17 MEMLOCK = 0x40084d05 MEMREAD = 0xc0404d1a MEMREADOOB = 0xc0104d04 MEMSETBADBLOCK = 0x40084d0c MEMUNLOCK = 0x40084d06 MEMWRITEOOB = 0xc0104d03 MTDFILEMODE = 0x4d13 NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 OTPERASE = 0x400c4d19 OTPGETREGIONCOUNT = 0x40044d0e OTPGETREGIONINFO = 0x400c4d0f OTPLOCK = 0x800c4d10 OTPSELECT = 0x80044d0d 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_RSYNC = 0x101000 O_SYNC = 0x101000 O_TMPFILE = 0x404000 O_TRUNC = 0x200 PARENB = 0x100 PARODD = 0x200 PENDIN = 0x4000 PERF_EVENT_IOC_DISABLE = 0x2401 PERF_EVENT_IOC_ENABLE = 0x2400 PERF_EVENT_IOC_ID = 0x80082407 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409 PERF_EVENT_IOC_PERIOD = 0x40082404 PERF_EVENT_IOC_QUERY_BPF = 0xc008240a PERF_EVENT_IOC_REFRESH = 0x2402 PERF_EVENT_IOC_RESET = 0x2403 PERF_EVENT_IOC_SET_BPF = 0x40042408 PERF_EVENT_IOC_SET_FILTER = 0x40082406 PERF_EVENT_IOC_SET_OUTPUT = 0x2405 PPPIOCATTACH = 0x4004743d PPPIOCATTCHAN = 0x40047438 PPPIOCBRIDGECHAN = 0x40047435 PPPIOCCONNECT = 0x4004743a PPPIOCDETACH = 0x4004743c PPPIOCDISCONN = 0x7439 PPPIOCGASYNCMAP = 0x80047458 PPPIOCGCHAN = 0x80047437 PPPIOCGDEBUG = 0x80047441 PPPIOCGFLAGS = 0x8004745a PPPIOCGIDLE = 0x8010743f PPPIOCGIDLE32 = 0x8008743f PPPIOCGIDLE64 = 0x8010743f PPPIOCGL2TPSTATS = 0x80487436 PPPIOCGMRU = 0x80047453 PPPIOCGRASYNCMAP = 0x80047455 PPPIOCGUNIT = 0x80047456 PPPIOCGXASYNCMAP = 0x80207450 PPPIOCSACTIVE = 0x40107446 PPPIOCSASYNCMAP = 0x40047457 PPPIOCSCOMPRESS = 0x4010744d PPPIOCSDEBUG = 0x40047440 PPPIOCSFLAGS = 0x40047459 PPPIOCSMAXCID = 0x40047451 PPPIOCSMRRU = 0x4004743b PPPIOCSMRU = 0x40047452 PPPIOCSNPMODE = 0x4008744b PPPIOCSPASS = 0x40107447 PPPIOCSRASYNCMAP = 0x40047454 PPPIOCSXASYNCMAP = 0x4020744f PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PROT_BTI = 0x10 PROT_MTE = 0x20 PR_SET_PTRACER_ANY = 0xffffffffffffffff PTRACE_PEEKMTETAGS = 0x21 PTRACE_POKEMTETAGS = 0x22 PTRACE_SYSEMU = 0x1f PTRACE_SYSEMU_SINGLESTEP = 0x20 RLIMIT_AS = 0x9 RLIMIT_MEMLOCK = 0x8 RLIMIT_NOFILE = 0x7 RLIMIT_NPROC = 0x6 RLIMIT_RSS = 0x5 RNDADDENTROPY = 0x40085203 RNDADDTOENTCNT = 0x40045201 RNDCLEARPOOL = 0x5206 RNDGETENTCNT = 0x80045200 RNDGETPOOL = 0x80085202 RNDRESEEDCRNG = 0x5207 RNDZAPENTCNT = 0x5204 RTC_AIE_OFF = 0x7002 RTC_AIE_ON = 0x7001 RTC_ALM_READ = 0x80247008 RTC_ALM_SET = 0x40247007 RTC_EPOCH_READ = 0x8008700d RTC_EPOCH_SET = 0x4008700e RTC_IRQP_READ = 0x8008700b RTC_IRQP_SET = 0x4008700c RTC_PARAM_GET = 0x40187013 RTC_PARAM_SET = 0x40187014 RTC_PIE_OFF = 0x7006 RTC_PIE_ON = 0x7005 RTC_PLL_GET = 0x80207011 RTC_PLL_SET = 0x40207012 RTC_RD_TIME = 0x80247009 RTC_SET_TIME = 0x4024700a RTC_UIE_OFF = 0x7004 RTC_UIE_ON = 0x7003 RTC_VL_CLR = 0x7014 RTC_VL_READ = 0x80047013 RTC_WIE_OFF = 0x7010 RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 SIOCGPGRP = 0x8904 SIOCGSTAMPNS_NEW = 0x80108907 SIOCGSTAMP_NEW = 0x80108906 SIOCINQ = 0x541b SIOCOUTQ = 0x5411 SIOCSPGRP = 0x8902 SOCK_CLOEXEC = 0x80000 SOCK_DGRAM = 0x2 SOCK_NONBLOCK = 0x800 SOCK_STREAM = 0x1 SOL_SOCKET = 0x1 SO_ACCEPTCONN = 0x1e SO_ATTACH_BPF = 0x32 SO_ATTACH_REUSEPORT_CBPF = 0x33 SO_ATTACH_REUSEPORT_EBPF = 0x34 SO_BINDTODEVICE = 0x19 SO_BINDTOIFINDEX = 0x3e SO_BPF_EXTENSIONS = 0x30 SO_BROADCAST = 0x6 SO_BSDCOMPAT = 0xe SO_BUF_LOCK = 0x48 SO_BUSY_POLL = 0x2e SO_BUSY_POLL_BUDGET = 0x46 SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f SO_MEMINFO = 0x37 SO_NETNS_COOKIE = 0x47 SO_NOFCS = 0x2b SO_OOBINLINE = 0xa SO_PASSCRED = 0x10 SO_PASSPIDFD = 0x4c SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 SO_PEERGROUPS = 0x3b SO_PEERPIDFD = 0x4d SO_PEERSEC = 0x1f SO_PREFER_BUSY_POLL = 0x45 SO_PROTOCOL = 0x26 SO_RCVBUF = 0x8 SO_RCVBUFFORCE = 0x21 SO_RCVLOWAT = 0x12 SO_RCVMARK = 0x4b SO_RCVTIMEO = 0x14 SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_OLD = 0x14 SO_RESERVE_MEM = 0x49 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_SNDTIMEO_NEW = 0x43 SO_SNDTIMEO_OLD = 0x15 SO_TIMESTAMPING = 0x25 SO_TIMESTAMPING_NEW = 0x41 SO_TIMESTAMPING_OLD = 0x25 SO_TIMESTAMPNS = 0x23 SO_TIMESTAMPNS_NEW = 0x40 SO_TIMESTAMPNS_OLD = 0x23 SO_TIMESTAMP_NEW = 0x3f SO_TXREHASH = 0x4a SO_TXTIME = 0x3d SO_TYPE = 0x3 SO_WIFI_STATUS = 0x29 SO_ZEROCOPY = 0x3c SVE_MAGIC = 0x53564501 TAB1 = 0x800 TAB2 = 0x1000 TAB3 = 0x1800 TABDLY = 0x1800 TCFLSH = 0x540b TCGETA = 0x5405 TCGETS = 0x5401 TCGETS2 = 0x802c542a TCGETX = 0x5432 TCSAFLUSH = 0x2 TCSBRK = 0x5409 TCSBRKP = 0x5425 TCSETA = 0x5406 TCSETAF = 0x5408 TCSETAW = 0x5407 TCSETS = 0x5402 TCSETS2 = 0x402c542b TCSETSF = 0x5404 TCSETSF2 = 0x402c542d TCSETSW = 0x5403 TCSETSW2 = 0x402c542c TCSETX = 0x5433 TCSETXF = 0x5434 TCSETXW = 0x5435 TCXONC = 0x540a TFD_CLOEXEC = 0x80000 TFD_NONBLOCK = 0x800 TIOCCBRK = 0x5428 TIOCCONS = 0x541d TIOCEXCL = 0x540c TIOCGDEV = 0x80045432 TIOCGETD = 0x5424 TIOCGEXCL = 0x80045440 TIOCGICOUNT = 0x545d TIOCGISO7816 = 0x80285442 TIOCGLCKTRMIOS = 0x5456 TIOCGPGRP = 0x540f TIOCGPKT = 0x80045438 TIOCGPTLCK = 0x80045439 TIOCGPTN = 0x80045430 TIOCGPTPEER = 0x5441 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_RI = 0x80 TIOCM_RNG = 0x80 TIOCM_SR = 0x10 TIOCM_ST = 0x8 TIOCNOTTY = 0x5422 TIOCNXCL = 0x540d TIOCOUTQ = 0x5411 TIOCPKT = 0x5420 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 TIOCSISO7816 = 0xc0285443 TIOCSLCKTRMIOS = 0x5457 TIOCSPGRP = 0x5410 TIOCSPTLCK = 0x40045431 TIOCSRS485 = 0x542f TIOCSSERIAL = 0x541f TIOCSSOFTCAR = 0x541a TIOCSTI = 0x5412 TIOCSWINSZ = 0x5414 TIOCVHANGUP = 0x5437 TOSTOP = 0x100 TPIDR2_MAGIC = 0x54504902 TUNATTACHFILTER = 0x401054d5 TUNDETACHFILTER = 0x401054d6 TUNGETDEVNETNS = 0x54e3 TUNGETFEATURES = 0x800454cf TUNGETFILTER = 0x801054db TUNGETIFF = 0x800454d2 TUNGETSNDBUF = 0x800454d3 TUNGETVNETBE = 0x800454df TUNGETVNETHDRSZ = 0x800454d7 TUNGETVNETLE = 0x800454dd TUNSETCARRIER = 0x400454e2 TUNSETDEBUG = 0x400454c9 TUNSETFILTEREBPF = 0x800454e1 TUNSETGROUP = 0x400454ce TUNSETIFF = 0x400454ca TUNSETIFINDEX = 0x400454da TUNSETLINK = 0x400454cd TUNSETNOCSUM = 0x400454c8 TUNSETOFFLOAD = 0x400454d0 TUNSETOWNER = 0x400454cc TUNSETPERSIST = 0x400454cb TUNSETQUEUE = 0x400454d9 TUNSETSNDBUF = 0x400454d4 TUNSETSTEERINGEBPF = 0x800454e0 TUNSETTXFILTER = 0x400454d1 TUNSETVNETBE = 0x400454de TUNSETVNETHDRSZ = 0x400454d8 TUNSETVNETLE = 0x400454dc UBI_IOCATT = 0x40186f40 UBI_IOCDET = 0x40046f41 UBI_IOCEBCH = 0x40044f02 UBI_IOCEBER = 0x40044f01 UBI_IOCEBISMAP = 0x80044f05 UBI_IOCEBMAP = 0x40084f03 UBI_IOCEBUNMAP = 0x40044f04 UBI_IOCMKVOL = 0x40986f00 UBI_IOCRMVOL = 0x40046f01 UBI_IOCRNVOL = 0x51106f03 UBI_IOCRPEB = 0x40046f04 UBI_IOCRSVOL = 0x400c6f02 UBI_IOCSETVOLPROP = 0x40104f06 UBI_IOCSPEB = 0x40046f05 UBI_IOCVOLCRBLK = 0x40804f07 UBI_IOCVOLRMBLK = 0x4f08 UBI_IOCVOLUP = 0x40084f00 VDISCARD = 0xd VEOF = 0x4 VEOL = 0xb VEOL2 = 0x10 VMIN = 0x6 VREPRINT = 0xc VSTART = 0x8 VSTOP = 0x9 VSUSP = 0xa VSWTC = 0x7 VT1 = 0x4000 VTDLY = 0x4000 VTIME = 0x5 VWERASE = 0xe WDIOC_GETBOOTSTATUS = 0x80045702 WDIOC_GETPRETIMEOUT = 0x80045709 WDIOC_GETSTATUS = 0x80045701 WDIOC_GETSUPPORT = 0x80285700 WDIOC_GETTEMP = 0x80045703 WDIOC_GETTIMELEFT = 0x8004570a WDIOC_GETTIMEOUT = 0x80045707 WDIOC_KEEPALIVE = 0x80045705 WDIOC_SETOPTIONS = 0x80045704 WORDSIZE = 0x40 XCASE = 0x4 XTABS = 0x1800 ZA_MAGIC = 0x54366345 ZT_MAGIC = 0x5a544e01 _HIDIOCGRAWNAME = 0x80804804 _HIDIOCGRAWPHYS = 0x80404805 _HIDIOCGRAWUNIQ = 0x80404808 ) // Errors const ( EADDRINUSE = syscall.Errno(0x62) EADDRNOTAVAIL = syscall.Errno(0x63) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x61) EALREADY = syscall.Errno(0x72) EBADE = syscall.Errno(0x34) EBADFD = syscall.Errno(0x4d) EBADMSG = syscall.Errno(0x4a) EBADR = syscall.Errno(0x35) EBADRQC = syscall.Errno(0x38) EBADSLT = syscall.Errno(0x39) EBFONT = syscall.Errno(0x3b) ECANCELED = syscall.Errno(0x7d) 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) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) EIDRM = syscall.Errno(0x2b) EILSEQ = syscall.Errno(0x54) EINPROGRESS = syscall.Errno(0x73) EISCONN = syscall.Errno(0x6a) 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) 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) ENOANO = syscall.Errno(0x37) ENOBUFS = syscall.Errno(0x69) ENOCSI = syscall.Errno(0x32) ENODATA = syscall.Errno(0x3d) ENOKEY = syscall.Errno(0x7e) ENOLCK = syscall.Errno(0x25) ENOLINK = syscall.Errno(0x43) ENOMEDIUM = syscall.Errno(0x7b) ENOMSG = syscall.Errno(0x2a) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x5c) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x26) ENOTCONN = syscall.Errno(0x6b) ENOTEMPTY = syscall.Errno(0x27) ENOTNAM = syscall.Errno(0x76) ENOTRECOVERABLE = syscall.Errno(0x83) ENOTSOCK = syscall.Errno(0x58) ENOTSUP = syscall.Errno(0x5f) ENOTUNIQ = syscall.Errno(0x4c) EOPNOTSUPP = syscall.Errno(0x5f) EOVERFLOW = syscall.Errno(0x4b) EOWNERDEAD = syscall.Errno(0x82) EPFNOSUPPORT = syscall.Errno(0x60) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x5d) EPROTOTYPE = syscall.Errno(0x5b) EREMCHG = syscall.Errno(0x4e) EREMOTE = syscall.Errno(0x42) EREMOTEIO = syscall.Errno(0x79) ERESTART = syscall.Errno(0x55) ERFKILL = syscall.Errno(0x84) ESHUTDOWN = syscall.Errno(0x6c) ESOCKTNOSUPPORT = syscall.Errno(0x5e) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x74) ESTRPIPE = syscall.Errno(0x56) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x6e) ETOOMANYREFS = syscall.Errno(0x6d) EUCLEAN = syscall.Errno(0x75) EUNATCH = syscall.Errno(0x31) EUSERS = syscall.Errno(0x57) EXFULL = syscall.Errno(0x36) ) // Signals const ( SIGBUS = syscall.Signal(0x7) SIGCHLD = syscall.Signal(0x11) SIGCLD = syscall.Signal(0x11) SIGCONT = syscall.Signal(0x12) SIGIO = syscall.Signal(0x1d) SIGPOLL = syscall.Signal(0x1d) SIGPROF = syscall.Signal(0x1b) SIGPWR = syscall.Signal(0x1e) SIGSTKFLT = syscall.Signal(0x10) SIGSTOP = syscall.Signal(0x13) SIGSYS = syscall.Signal(0x1f) SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "no such device or address"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EAGAIN", "resource temporarily unavailable"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device or resource busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "invalid cross-device link"}, {19, "ENODEV", "no such device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "numerical result out of range"}, {35, "EDEADLK", "resource deadlock avoided"}, {36, "ENAMETOOLONG", "file name too long"}, {37, "ENOLCK", "no locks available"}, {38, "ENOSYS", "function not implemented"}, {39, "ENOTEMPTY", "directory not empty"}, {40, "ELOOP", "too many levels of symbolic links"}, {42, "ENOMSG", "no message of desired type"}, {43, "EIDRM", "identifier removed"}, {44, "ECHRNG", "channel number out of range"}, {45, "EL2NSYNC", "level 2 not synchronized"}, {46, "EL3HLT", "level 3 halted"}, {47, "EL3RST", "level 3 reset"}, {48, "ELNRNG", "link number out of range"}, {49, "EUNATCH", "protocol driver not attached"}, {50, "ENOCSI", "no CSI structure available"}, {51, "EL2HLT", "level 2 halted"}, {52, "EBADE", "invalid exchange"}, {53, "EBADR", "invalid request descriptor"}, {54, "EXFULL", "exchange full"}, {55, "ENOANO", "no anode"}, {56, "EBADRQC", "invalid request code"}, {57, "EBADSLT", "invalid slot"}, {59, "EBFONT", "bad font file format"}, {60, "ENOSTR", "device not a stream"}, {61, "ENODATA", "no data available"}, {62, "ETIME", "timer expired"}, {63, "ENOSR", "out of streams resources"}, {64, "ENONET", "machine is not on the network"}, {65, "ENOPKG", "package not installed"}, {66, "EREMOTE", "object is remote"}, {67, "ENOLINK", "link has been severed"}, {68, "EADV", "advertise error"}, {69, "ESRMNT", "srmount error"}, {70, "ECOMM", "communication error on send"}, {71, "EPROTO", "protocol error"}, {72, "EMULTIHOP", "multihop attempted"}, {73, "EDOTDOT", "RFS specific error"}, {74, "EBADMSG", "bad message"}, {75, "EOVERFLOW", "value too large for defined data type"}, {76, "ENOTUNIQ", "name not unique on network"}, {77, "EBADFD", "file descriptor in bad state"}, {78, "EREMCHG", "remote address changed"}, {79, "ELIBACC", "can not access a needed shared library"}, {80, "ELIBBAD", "accessing a corrupted shared library"}, {81, "ELIBSCN", ".lib section in a.out corrupted"}, {82, "ELIBMAX", "attempting to link in too many shared libraries"}, {83, "ELIBEXEC", "cannot exec a shared library directly"}, {84, "EILSEQ", "invalid or incomplete multibyte or wide character"}, {85, "ERESTART", "interrupted system call should be restarted"}, {86, "ESTRPIPE", "streams pipe error"}, {87, "EUSERS", "too many users"}, {88, "ENOTSOCK", "socket operation on non-socket"}, {89, "EDESTADDRREQ", "destination address required"}, {90, "EMSGSIZE", "message too long"}, {91, "EPROTOTYPE", "protocol wrong type for socket"}, {92, "ENOPROTOOPT", "protocol not available"}, {93, "EPROTONOSUPPORT", "protocol not supported"}, {94, "ESOCKTNOSUPPORT", "socket type not supported"}, {95, "ENOTSUP", "operation not supported"}, {96, "EPFNOSUPPORT", "protocol family not supported"}, {97, "EAFNOSUPPORT", "address family not supported by protocol"}, {98, "EADDRINUSE", "address already in use"}, {99, "EADDRNOTAVAIL", "cannot assign requested address"}, {100, "ENETDOWN", "network is down"}, {101, "ENETUNREACH", "network is unreachable"}, {102, "ENETRESET", "network dropped connection on reset"}, {103, "ECONNABORTED", "software caused connection abort"}, {104, "ECONNRESET", "connection reset by peer"}, {105, "ENOBUFS", "no buffer space available"}, {106, "EISCONN", "transport endpoint is already connected"}, {107, "ENOTCONN", "transport endpoint is not connected"}, {108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"}, {109, "ETOOMANYREFS", "too many references: cannot splice"}, {110, "ETIMEDOUT", "connection timed out"}, {111, "ECONNREFUSED", "connection refused"}, {112, "EHOSTDOWN", "host is down"}, {113, "EHOSTUNREACH", "no route to host"}, {114, "EALREADY", "operation already in progress"}, {115, "EINPROGRESS", "operation now in progress"}, {116, "ESTALE", "stale file handle"}, {117, "EUCLEAN", "structure needs cleaning"}, {118, "ENOTNAM", "not a XENIX named type file"}, {119, "ENAVAIL", "no XENIX semaphores available"}, {120, "EISNAM", "is a named type file"}, {121, "EREMOTEIO", "remote I/O error"}, {122, "EDQUOT", "disk quota exceeded"}, {123, "ENOMEDIUM", "no medium found"}, {124, "EMEDIUMTYPE", "wrong medium type"}, {125, "ECANCELED", "operation canceled"}, {126, "ENOKEY", "required key not available"}, {127, "EKEYEXPIRED", "key has expired"}, {128, "EKEYREVOKED", "key has been revoked"}, {129, "EKEYREJECTED", "key was rejected by service"}, {130, "EOWNERDEAD", "owner died"}, {131, "ENOTRECOVERABLE", "state not recoverable"}, {132, "ERFKILL", "operation not possible due to RF-kill"}, {133, "EHWPOISON", "memory page has hardware error"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/breakpoint trap"}, {6, "SIGABRT", "aborted"}, {7, "SIGBUS", "bus error"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGUSR1", "user defined signal 1"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGUSR2", "user defined signal 2"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGSTKFLT", "stack fault"}, {17, "SIGCHLD", "child exited"}, {18, "SIGCONT", "continued"}, {19, "SIGSTOP", "stopped (signal)"}, {20, "SIGTSTP", "stopped"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGURG", "urgent I/O condition"}, {24, "SIGXCPU", "CPU time limit exceeded"}, {25, "SIGXFSZ", "file size limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window changed"}, {29, "SIGIO", "I/O possible"}, {30, "SIGPWR", "power failure"}, {31, "SIGSYS", "bad system call"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go ================================================ // mkerrors.sh -Wall -Werror -static -I/tmp/loong64/include // Code generated by the command above; see README.md. DO NOT EDIT. //go:build loong64 && linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/loong64/include _const.go package unix import "syscall" const ( B1000000 = 0x1008 B115200 = 0x1002 B1152000 = 0x1009 B1500000 = 0x100a B2000000 = 0x100b B230400 = 0x1003 B2500000 = 0x100c B3000000 = 0x100d B3500000 = 0x100e B4000000 = 0x100f B460800 = 0x1004 B500000 = 0x1005 B57600 = 0x1001 B576000 = 0x1006 B921600 = 0x1007 BLKALIGNOFF = 0x127a BLKBSZGET = 0x80081270 BLKBSZSET = 0x40081271 BLKDISCARD = 0x1277 BLKDISCARDZEROES = 0x127c BLKFLSBUF = 0x1261 BLKFRAGET = 0x1265 BLKFRASET = 0x1264 BLKGETDISKSEQ = 0x80081280 BLKGETSIZE = 0x1260 BLKGETSIZE64 = 0x80081272 BLKIOMIN = 0x1278 BLKIOOPT = 0x1279 BLKPBSZGET = 0x127b BLKRAGET = 0x1263 BLKRASET = 0x1262 BLKROGET = 0x125e BLKROSET = 0x125d BLKROTATIONAL = 0x127e BLKRRPART = 0x125f BLKSECDISCARD = 0x127d BLKSECTGET = 0x1267 BLKSECTSET = 0x1266 BLKSSZGET = 0x1268 BLKZEROOUT = 0x127f BOTHER = 0x1000 BS1 = 0x2000 BSDLY = 0x2000 CBAUD = 0x100f CBAUDEX = 0x1000 CIBAUD = 0x100f0000 CLOCAL = 0x800 CR1 = 0x200 CR2 = 0x400 CR3 = 0x600 CRDLY = 0x600 CREAD = 0x80 CS6 = 0x10 CS7 = 0x20 CS8 = 0x30 CSIZE = 0x30 CSTOPB = 0x40 ECCGETLAYOUT = 0x81484d11 ECCGETSTATS = 0x80104d12 ECHOCTL = 0x200 ECHOE = 0x10 ECHOK = 0x20 ECHOKE = 0x800 ECHONL = 0x40 ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 EPIOCGPARAMS = 0x80088a02 EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 FFDLY = 0x8000 FICLONE = 0x40049409 FICLONERANGE = 0x4020940d FLUSHO = 0x1000 FPU_CTX_MAGIC = 0x46505501 FS_IOC_ENABLE_VERITY = 0x40806685 FS_IOC_GETFLAGS = 0x80086601 FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 FS_IOC_SETFLAGS = 0x40086602 FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 F_GETLK = 0x5 F_GETLK64 = 0x5 F_GETOWN = 0x9 F_RDLCK = 0x0 F_SETLK = 0x6 F_SETLK64 = 0x6 F_SETLKW = 0x7 F_SETLKW64 = 0x7 F_SETOWN = 0x8 F_UNLCK = 0x2 F_WRLCK = 0x1 HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 ISIG = 0x1 IUCLC = 0x200 IXOFF = 0x1000 IXON = 0x400 LASX_CTX_MAGIC = 0x41535801 LBT_CTX_MAGIC = 0x42540001 LSX_CTX_MAGIC = 0x53580001 MAP_ANON = 0x20 MAP_ANONYMOUS = 0x20 MAP_DENYWRITE = 0x800 MAP_EXECUTABLE = 0x1000 MAP_GROWSDOWN = 0x100 MAP_HUGETLB = 0x40000 MAP_LOCKED = 0x2000 MAP_NONBLOCK = 0x10000 MAP_NORESERVE = 0x4000 MAP_POPULATE = 0x8000 MAP_STACK = 0x20000 MAP_SYNC = 0x80000 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MCL_ONFAULT = 0x4 MEMERASE = 0x40084d02 MEMERASE64 = 0x40104d14 MEMGETBADBLOCK = 0x40084d0b MEMGETINFO = 0x80204d01 MEMGETOOBSEL = 0x80c84d0a MEMGETREGIONCOUNT = 0x80044d07 MEMISLOCKED = 0x80084d17 MEMLOCK = 0x40084d05 MEMREAD = 0xc0404d1a MEMREADOOB = 0xc0104d04 MEMSETBADBLOCK = 0x40084d0c MEMUNLOCK = 0x40084d06 MEMWRITEOOB = 0xc0104d03 MTDFILEMODE = 0x4d13 NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 OTPERASE = 0x400c4d19 OTPGETREGIONCOUNT = 0x40044d0e OTPGETREGIONINFO = 0x400c4d0f OTPLOCK = 0x800c4d10 OTPSELECT = 0x80044d0d 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_RSYNC = 0x101000 O_SYNC = 0x101000 O_TMPFILE = 0x410000 O_TRUNC = 0x200 PARENB = 0x100 PARODD = 0x200 PENDIN = 0x4000 PERF_EVENT_IOC_DISABLE = 0x2401 PERF_EVENT_IOC_ENABLE = 0x2400 PERF_EVENT_IOC_ID = 0x80082407 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409 PERF_EVENT_IOC_PERIOD = 0x40082404 PERF_EVENT_IOC_QUERY_BPF = 0xc008240a PERF_EVENT_IOC_REFRESH = 0x2402 PERF_EVENT_IOC_RESET = 0x2403 PERF_EVENT_IOC_SET_BPF = 0x40042408 PERF_EVENT_IOC_SET_FILTER = 0x40082406 PERF_EVENT_IOC_SET_OUTPUT = 0x2405 PPPIOCATTACH = 0x4004743d PPPIOCATTCHAN = 0x40047438 PPPIOCBRIDGECHAN = 0x40047435 PPPIOCCONNECT = 0x4004743a PPPIOCDETACH = 0x4004743c PPPIOCDISCONN = 0x7439 PPPIOCGASYNCMAP = 0x80047458 PPPIOCGCHAN = 0x80047437 PPPIOCGDEBUG = 0x80047441 PPPIOCGFLAGS = 0x8004745a PPPIOCGIDLE = 0x8010743f PPPIOCGIDLE32 = 0x8008743f PPPIOCGIDLE64 = 0x8010743f PPPIOCGL2TPSTATS = 0x80487436 PPPIOCGMRU = 0x80047453 PPPIOCGRASYNCMAP = 0x80047455 PPPIOCGUNIT = 0x80047456 PPPIOCGXASYNCMAP = 0x80207450 PPPIOCSACTIVE = 0x40107446 PPPIOCSASYNCMAP = 0x40047457 PPPIOCSCOMPRESS = 0x4010744d PPPIOCSDEBUG = 0x40047440 PPPIOCSFLAGS = 0x40047459 PPPIOCSMAXCID = 0x40047451 PPPIOCSMRRU = 0x4004743b PPPIOCSMRU = 0x40047452 PPPIOCSNPMODE = 0x4008744b PPPIOCSPASS = 0x40107447 PPPIOCSRASYNCMAP = 0x40047454 PPPIOCSXASYNCMAP = 0x4020744f PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PR_SET_PTRACER_ANY = 0xffffffffffffffff PTRACE_SYSEMU = 0x1f PTRACE_SYSEMU_SINGLESTEP = 0x20 RLIMIT_AS = 0x9 RLIMIT_MEMLOCK = 0x8 RLIMIT_NOFILE = 0x7 RLIMIT_NPROC = 0x6 RLIMIT_RSS = 0x5 RNDADDENTROPY = 0x40085203 RNDADDTOENTCNT = 0x40045201 RNDCLEARPOOL = 0x5206 RNDGETENTCNT = 0x80045200 RNDGETPOOL = 0x80085202 RNDRESEEDCRNG = 0x5207 RNDZAPENTCNT = 0x5204 RTC_AIE_OFF = 0x7002 RTC_AIE_ON = 0x7001 RTC_ALM_READ = 0x80247008 RTC_ALM_SET = 0x40247007 RTC_EPOCH_READ = 0x8008700d RTC_EPOCH_SET = 0x4008700e RTC_IRQP_READ = 0x8008700b RTC_IRQP_SET = 0x4008700c RTC_PARAM_GET = 0x40187013 RTC_PARAM_SET = 0x40187014 RTC_PIE_OFF = 0x7006 RTC_PIE_ON = 0x7005 RTC_PLL_GET = 0x80207011 RTC_PLL_SET = 0x40207012 RTC_RD_TIME = 0x80247009 RTC_SET_TIME = 0x4024700a RTC_UIE_OFF = 0x7004 RTC_UIE_ON = 0x7003 RTC_VL_CLR = 0x7014 RTC_VL_READ = 0x80047013 RTC_WIE_OFF = 0x7010 RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 SIOCGPGRP = 0x8904 SIOCGSTAMPNS_NEW = 0x80108907 SIOCGSTAMP_NEW = 0x80108906 SIOCINQ = 0x541b SIOCOUTQ = 0x5411 SIOCSPGRP = 0x8902 SOCK_CLOEXEC = 0x80000 SOCK_DGRAM = 0x2 SOCK_NONBLOCK = 0x800 SOCK_STREAM = 0x1 SOL_SOCKET = 0x1 SO_ACCEPTCONN = 0x1e SO_ATTACH_BPF = 0x32 SO_ATTACH_REUSEPORT_CBPF = 0x33 SO_ATTACH_REUSEPORT_EBPF = 0x34 SO_BINDTODEVICE = 0x19 SO_BINDTOIFINDEX = 0x3e SO_BPF_EXTENSIONS = 0x30 SO_BROADCAST = 0x6 SO_BSDCOMPAT = 0xe SO_BUF_LOCK = 0x48 SO_BUSY_POLL = 0x2e SO_BUSY_POLL_BUDGET = 0x46 SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f SO_MEMINFO = 0x37 SO_NETNS_COOKIE = 0x47 SO_NOFCS = 0x2b SO_OOBINLINE = 0xa SO_PASSCRED = 0x10 SO_PASSPIDFD = 0x4c SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 SO_PEERGROUPS = 0x3b SO_PEERPIDFD = 0x4d SO_PEERSEC = 0x1f SO_PREFER_BUSY_POLL = 0x45 SO_PROTOCOL = 0x26 SO_RCVBUF = 0x8 SO_RCVBUFFORCE = 0x21 SO_RCVLOWAT = 0x12 SO_RCVMARK = 0x4b SO_RCVTIMEO = 0x14 SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_OLD = 0x14 SO_RESERVE_MEM = 0x49 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_SNDTIMEO_NEW = 0x43 SO_SNDTIMEO_OLD = 0x15 SO_TIMESTAMPING = 0x25 SO_TIMESTAMPING_NEW = 0x41 SO_TIMESTAMPING_OLD = 0x25 SO_TIMESTAMPNS = 0x23 SO_TIMESTAMPNS_NEW = 0x40 SO_TIMESTAMPNS_OLD = 0x23 SO_TIMESTAMP_NEW = 0x3f SO_TXREHASH = 0x4a SO_TXTIME = 0x3d SO_TYPE = 0x3 SO_WIFI_STATUS = 0x29 SO_ZEROCOPY = 0x3c TAB1 = 0x800 TAB2 = 0x1000 TAB3 = 0x1800 TABDLY = 0x1800 TCFLSH = 0x540b TCGETA = 0x5405 TCGETS = 0x5401 TCGETS2 = 0x802c542a TCGETX = 0x5432 TCSAFLUSH = 0x2 TCSBRK = 0x5409 TCSBRKP = 0x5425 TCSETA = 0x5406 TCSETAF = 0x5408 TCSETAW = 0x5407 TCSETS = 0x5402 TCSETS2 = 0x402c542b TCSETSF = 0x5404 TCSETSF2 = 0x402c542d TCSETSW = 0x5403 TCSETSW2 = 0x402c542c TCSETX = 0x5433 TCSETXF = 0x5434 TCSETXW = 0x5435 TCXONC = 0x540a TFD_CLOEXEC = 0x80000 TFD_NONBLOCK = 0x800 TIOCCBRK = 0x5428 TIOCCONS = 0x541d TIOCEXCL = 0x540c TIOCGDEV = 0x80045432 TIOCGETD = 0x5424 TIOCGEXCL = 0x80045440 TIOCGICOUNT = 0x545d TIOCGISO7816 = 0x80285442 TIOCGLCKTRMIOS = 0x5456 TIOCGPGRP = 0x540f TIOCGPKT = 0x80045438 TIOCGPTLCK = 0x80045439 TIOCGPTN = 0x80045430 TIOCGPTPEER = 0x5441 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_RI = 0x80 TIOCM_RNG = 0x80 TIOCM_SR = 0x10 TIOCM_ST = 0x8 TIOCNOTTY = 0x5422 TIOCNXCL = 0x540d TIOCOUTQ = 0x5411 TIOCPKT = 0x5420 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 TIOCSISO7816 = 0xc0285443 TIOCSLCKTRMIOS = 0x5457 TIOCSPGRP = 0x5410 TIOCSPTLCK = 0x40045431 TIOCSRS485 = 0x542f TIOCSSERIAL = 0x541f TIOCSSOFTCAR = 0x541a TIOCSTI = 0x5412 TIOCSWINSZ = 0x5414 TIOCVHANGUP = 0x5437 TOSTOP = 0x100 TUNATTACHFILTER = 0x401054d5 TUNDETACHFILTER = 0x401054d6 TUNGETDEVNETNS = 0x54e3 TUNGETFEATURES = 0x800454cf TUNGETFILTER = 0x801054db TUNGETIFF = 0x800454d2 TUNGETSNDBUF = 0x800454d3 TUNGETVNETBE = 0x800454df TUNGETVNETHDRSZ = 0x800454d7 TUNGETVNETLE = 0x800454dd TUNSETCARRIER = 0x400454e2 TUNSETDEBUG = 0x400454c9 TUNSETFILTEREBPF = 0x800454e1 TUNSETGROUP = 0x400454ce TUNSETIFF = 0x400454ca TUNSETIFINDEX = 0x400454da TUNSETLINK = 0x400454cd TUNSETNOCSUM = 0x400454c8 TUNSETOFFLOAD = 0x400454d0 TUNSETOWNER = 0x400454cc TUNSETPERSIST = 0x400454cb TUNSETQUEUE = 0x400454d9 TUNSETSNDBUF = 0x400454d4 TUNSETSTEERINGEBPF = 0x800454e0 TUNSETTXFILTER = 0x400454d1 TUNSETVNETBE = 0x400454de TUNSETVNETHDRSZ = 0x400454d8 TUNSETVNETLE = 0x400454dc UBI_IOCATT = 0x40186f40 UBI_IOCDET = 0x40046f41 UBI_IOCEBCH = 0x40044f02 UBI_IOCEBER = 0x40044f01 UBI_IOCEBISMAP = 0x80044f05 UBI_IOCEBMAP = 0x40084f03 UBI_IOCEBUNMAP = 0x40044f04 UBI_IOCMKVOL = 0x40986f00 UBI_IOCRMVOL = 0x40046f01 UBI_IOCRNVOL = 0x51106f03 UBI_IOCRPEB = 0x40046f04 UBI_IOCRSVOL = 0x400c6f02 UBI_IOCSETVOLPROP = 0x40104f06 UBI_IOCSPEB = 0x40046f05 UBI_IOCVOLCRBLK = 0x40804f07 UBI_IOCVOLRMBLK = 0x4f08 UBI_IOCVOLUP = 0x40084f00 VDISCARD = 0xd VEOF = 0x4 VEOL = 0xb VEOL2 = 0x10 VMIN = 0x6 VREPRINT = 0xc VSTART = 0x8 VSTOP = 0x9 VSUSP = 0xa VSWTC = 0x7 VT1 = 0x4000 VTDLY = 0x4000 VTIME = 0x5 VWERASE = 0xe WDIOC_GETBOOTSTATUS = 0x80045702 WDIOC_GETPRETIMEOUT = 0x80045709 WDIOC_GETSTATUS = 0x80045701 WDIOC_GETSUPPORT = 0x80285700 WDIOC_GETTEMP = 0x80045703 WDIOC_GETTIMELEFT = 0x8004570a WDIOC_GETTIMEOUT = 0x80045707 WDIOC_KEEPALIVE = 0x80045705 WDIOC_SETOPTIONS = 0x80045704 WORDSIZE = 0x40 XCASE = 0x4 XTABS = 0x1800 _HIDIOCGRAWNAME = 0x80804804 _HIDIOCGRAWPHYS = 0x80404805 _HIDIOCGRAWUNIQ = 0x80404808 ) // Errors const ( EADDRINUSE = syscall.Errno(0x62) EADDRNOTAVAIL = syscall.Errno(0x63) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x61) EALREADY = syscall.Errno(0x72) EBADE = syscall.Errno(0x34) EBADFD = syscall.Errno(0x4d) EBADMSG = syscall.Errno(0x4a) EBADR = syscall.Errno(0x35) EBADRQC = syscall.Errno(0x38) EBADSLT = syscall.Errno(0x39) EBFONT = syscall.Errno(0x3b) ECANCELED = syscall.Errno(0x7d) 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) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) EIDRM = syscall.Errno(0x2b) EILSEQ = syscall.Errno(0x54) EINPROGRESS = syscall.Errno(0x73) EISCONN = syscall.Errno(0x6a) 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) 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) ENOANO = syscall.Errno(0x37) ENOBUFS = syscall.Errno(0x69) ENOCSI = syscall.Errno(0x32) ENODATA = syscall.Errno(0x3d) ENOKEY = syscall.Errno(0x7e) ENOLCK = syscall.Errno(0x25) ENOLINK = syscall.Errno(0x43) ENOMEDIUM = syscall.Errno(0x7b) ENOMSG = syscall.Errno(0x2a) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x5c) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x26) ENOTCONN = syscall.Errno(0x6b) ENOTEMPTY = syscall.Errno(0x27) ENOTNAM = syscall.Errno(0x76) ENOTRECOVERABLE = syscall.Errno(0x83) ENOTSOCK = syscall.Errno(0x58) ENOTSUP = syscall.Errno(0x5f) ENOTUNIQ = syscall.Errno(0x4c) EOPNOTSUPP = syscall.Errno(0x5f) EOVERFLOW = syscall.Errno(0x4b) EOWNERDEAD = syscall.Errno(0x82) EPFNOSUPPORT = syscall.Errno(0x60) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x5d) EPROTOTYPE = syscall.Errno(0x5b) EREMCHG = syscall.Errno(0x4e) EREMOTE = syscall.Errno(0x42) EREMOTEIO = syscall.Errno(0x79) ERESTART = syscall.Errno(0x55) ERFKILL = syscall.Errno(0x84) ESHUTDOWN = syscall.Errno(0x6c) ESOCKTNOSUPPORT = syscall.Errno(0x5e) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x74) ESTRPIPE = syscall.Errno(0x56) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x6e) ETOOMANYREFS = syscall.Errno(0x6d) EUCLEAN = syscall.Errno(0x75) EUNATCH = syscall.Errno(0x31) EUSERS = syscall.Errno(0x57) EXFULL = syscall.Errno(0x36) ) // Signals const ( SIGBUS = syscall.Signal(0x7) SIGCHLD = syscall.Signal(0x11) SIGCLD = syscall.Signal(0x11) SIGCONT = syscall.Signal(0x12) SIGIO = syscall.Signal(0x1d) SIGPOLL = syscall.Signal(0x1d) SIGPROF = syscall.Signal(0x1b) SIGPWR = syscall.Signal(0x1e) SIGSTKFLT = syscall.Signal(0x10) SIGSTOP = syscall.Signal(0x13) SIGSYS = syscall.Signal(0x1f) SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "no such device or address"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EAGAIN", "resource temporarily unavailable"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device or resource busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "invalid cross-device link"}, {19, "ENODEV", "no such device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "numerical result out of range"}, {35, "EDEADLK", "resource deadlock avoided"}, {36, "ENAMETOOLONG", "file name too long"}, {37, "ENOLCK", "no locks available"}, {38, "ENOSYS", "function not implemented"}, {39, "ENOTEMPTY", "directory not empty"}, {40, "ELOOP", "too many levels of symbolic links"}, {42, "ENOMSG", "no message of desired type"}, {43, "EIDRM", "identifier removed"}, {44, "ECHRNG", "channel number out of range"}, {45, "EL2NSYNC", "level 2 not synchronized"}, {46, "EL3HLT", "level 3 halted"}, {47, "EL3RST", "level 3 reset"}, {48, "ELNRNG", "link number out of range"}, {49, "EUNATCH", "protocol driver not attached"}, {50, "ENOCSI", "no CSI structure available"}, {51, "EL2HLT", "level 2 halted"}, {52, "EBADE", "invalid exchange"}, {53, "EBADR", "invalid request descriptor"}, {54, "EXFULL", "exchange full"}, {55, "ENOANO", "no anode"}, {56, "EBADRQC", "invalid request code"}, {57, "EBADSLT", "invalid slot"}, {59, "EBFONT", "bad font file format"}, {60, "ENOSTR", "device not a stream"}, {61, "ENODATA", "no data available"}, {62, "ETIME", "timer expired"}, {63, "ENOSR", "out of streams resources"}, {64, "ENONET", "machine is not on the network"}, {65, "ENOPKG", "package not installed"}, {66, "EREMOTE", "object is remote"}, {67, "ENOLINK", "link has been severed"}, {68, "EADV", "advertise error"}, {69, "ESRMNT", "srmount error"}, {70, "ECOMM", "communication error on send"}, {71, "EPROTO", "protocol error"}, {72, "EMULTIHOP", "multihop attempted"}, {73, "EDOTDOT", "RFS specific error"}, {74, "EBADMSG", "bad message"}, {75, "EOVERFLOW", "value too large for defined data type"}, {76, "ENOTUNIQ", "name not unique on network"}, {77, "EBADFD", "file descriptor in bad state"}, {78, "EREMCHG", "remote address changed"}, {79, "ELIBACC", "can not access a needed shared library"}, {80, "ELIBBAD", "accessing a corrupted shared library"}, {81, "ELIBSCN", ".lib section in a.out corrupted"}, {82, "ELIBMAX", "attempting to link in too many shared libraries"}, {83, "ELIBEXEC", "cannot exec a shared library directly"}, {84, "EILSEQ", "invalid or incomplete multibyte or wide character"}, {85, "ERESTART", "interrupted system call should be restarted"}, {86, "ESTRPIPE", "streams pipe error"}, {87, "EUSERS", "too many users"}, {88, "ENOTSOCK", "socket operation on non-socket"}, {89, "EDESTADDRREQ", "destination address required"}, {90, "EMSGSIZE", "message too long"}, {91, "EPROTOTYPE", "protocol wrong type for socket"}, {92, "ENOPROTOOPT", "protocol not available"}, {93, "EPROTONOSUPPORT", "protocol not supported"}, {94, "ESOCKTNOSUPPORT", "socket type not supported"}, {95, "ENOTSUP", "operation not supported"}, {96, "EPFNOSUPPORT", "protocol family not supported"}, {97, "EAFNOSUPPORT", "address family not supported by protocol"}, {98, "EADDRINUSE", "address already in use"}, {99, "EADDRNOTAVAIL", "cannot assign requested address"}, {100, "ENETDOWN", "network is down"}, {101, "ENETUNREACH", "network is unreachable"}, {102, "ENETRESET", "network dropped connection on reset"}, {103, "ECONNABORTED", "software caused connection abort"}, {104, "ECONNRESET", "connection reset by peer"}, {105, "ENOBUFS", "no buffer space available"}, {106, "EISCONN", "transport endpoint is already connected"}, {107, "ENOTCONN", "transport endpoint is not connected"}, {108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"}, {109, "ETOOMANYREFS", "too many references: cannot splice"}, {110, "ETIMEDOUT", "connection timed out"}, {111, "ECONNREFUSED", "connection refused"}, {112, "EHOSTDOWN", "host is down"}, {113, "EHOSTUNREACH", "no route to host"}, {114, "EALREADY", "operation already in progress"}, {115, "EINPROGRESS", "operation now in progress"}, {116, "ESTALE", "stale file handle"}, {117, "EUCLEAN", "structure needs cleaning"}, {118, "ENOTNAM", "not a XENIX named type file"}, {119, "ENAVAIL", "no XENIX semaphores available"}, {120, "EISNAM", "is a named type file"}, {121, "EREMOTEIO", "remote I/O error"}, {122, "EDQUOT", "disk quota exceeded"}, {123, "ENOMEDIUM", "no medium found"}, {124, "EMEDIUMTYPE", "wrong medium type"}, {125, "ECANCELED", "operation canceled"}, {126, "ENOKEY", "required key not available"}, {127, "EKEYEXPIRED", "key has expired"}, {128, "EKEYREVOKED", "key has been revoked"}, {129, "EKEYREJECTED", "key was rejected by service"}, {130, "EOWNERDEAD", "owner died"}, {131, "ENOTRECOVERABLE", "state not recoverable"}, {132, "ERFKILL", "operation not possible due to RF-kill"}, {133, "EHWPOISON", "memory page has hardware error"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/breakpoint trap"}, {6, "SIGABRT", "aborted"}, {7, "SIGBUS", "bus error"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGUSR1", "user defined signal 1"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGUSR2", "user defined signal 2"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGSTKFLT", "stack fault"}, {17, "SIGCHLD", "child exited"}, {18, "SIGCONT", "continued"}, {19, "SIGSTOP", "stopped (signal)"}, {20, "SIGTSTP", "stopped"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGURG", "urgent I/O condition"}, {24, "SIGXCPU", "CPU time limit exceeded"}, {25, "SIGXFSZ", "file size limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window changed"}, {29, "SIGIO", "I/O possible"}, {30, "SIGPWR", "power failure"}, {31, "SIGSYS", "bad system call"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_linux_mips.go ================================================ // mkerrors.sh -Wall -Werror -static -I/tmp/mips/include // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips && linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/mips/include _const.go package unix import "syscall" const ( B1000000 = 0x1008 B115200 = 0x1002 B1152000 = 0x1009 B1500000 = 0x100a B2000000 = 0x100b B230400 = 0x1003 B2500000 = 0x100c B3000000 = 0x100d B3500000 = 0x100e B4000000 = 0x100f B460800 = 0x1004 B500000 = 0x1005 B57600 = 0x1001 B576000 = 0x1006 B921600 = 0x1007 BLKALIGNOFF = 0x2000127a BLKBSZGET = 0x40041270 BLKBSZSET = 0x80041271 BLKDISCARD = 0x20001277 BLKDISCARDZEROES = 0x2000127c BLKFLSBUF = 0x20001261 BLKFRAGET = 0x20001265 BLKFRASET = 0x20001264 BLKGETDISKSEQ = 0x40081280 BLKGETSIZE = 0x20001260 BLKGETSIZE64 = 0x40041272 BLKIOMIN = 0x20001278 BLKIOOPT = 0x20001279 BLKPBSZGET = 0x2000127b BLKRAGET = 0x20001263 BLKRASET = 0x20001262 BLKROGET = 0x2000125e BLKROSET = 0x2000125d BLKROTATIONAL = 0x2000127e BLKRRPART = 0x2000125f BLKSECDISCARD = 0x2000127d BLKSECTGET = 0x20001267 BLKSECTSET = 0x20001266 BLKSSZGET = 0x20001268 BLKZEROOUT = 0x2000127f BOTHER = 0x1000 BS1 = 0x2000 BSDLY = 0x2000 CBAUD = 0x100f CBAUDEX = 0x1000 CIBAUD = 0x100f0000 CLOCAL = 0x800 CR1 = 0x200 CR2 = 0x400 CR3 = 0x600 CRDLY = 0x600 CREAD = 0x80 CS6 = 0x10 CS7 = 0x20 CS8 = 0x30 CSIZE = 0x30 CSTOPB = 0x40 ECCGETLAYOUT = 0x41484d11 ECCGETSTATS = 0x40104d12 ECHOCTL = 0x200 ECHOE = 0x10 ECHOK = 0x20 ECHOKE = 0x800 ECHONL = 0x40 ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x80 EPIOCGPARAMS = 0x40088a02 EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 FFDLY = 0x8000 FICLONE = 0x80049409 FICLONERANGE = 0x8020940d FLUSHO = 0x2000 FS_IOC_ENABLE_VERITY = 0x80806685 FS_IOC_GETFLAGS = 0x40046601 FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 FS_IOC_SETFLAGS = 0x80046602 FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 F_GETLK = 0x21 F_GETLK64 = 0x21 F_GETOWN = 0x17 F_RDLCK = 0x0 F_SETLK = 0x22 F_SETLK64 = 0x22 F_SETLKW = 0x23 F_SETLKW64 = 0x23 F_SETOWN = 0x18 F_UNLCK = 0x2 F_WRLCK = 0x1 HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x100 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x80 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 ISIG = 0x1 IUCLC = 0x200 IXOFF = 0x1000 IXON = 0x400 MAP_ANON = 0x800 MAP_ANONYMOUS = 0x800 MAP_DENYWRITE = 0x2000 MAP_EXECUTABLE = 0x4000 MAP_GROWSDOWN = 0x1000 MAP_HUGETLB = 0x80000 MAP_LOCKED = 0x8000 MAP_NONBLOCK = 0x20000 MAP_NORESERVE = 0x400 MAP_POPULATE = 0x10000 MAP_RENAME = 0x800 MAP_STACK = 0x40000 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MCL_ONFAULT = 0x4 MEMERASE = 0x80084d02 MEMERASE64 = 0x80104d14 MEMGETBADBLOCK = 0x80084d0b MEMGETINFO = 0x40204d01 MEMGETOOBSEL = 0x40c84d0a MEMGETREGIONCOUNT = 0x40044d07 MEMISLOCKED = 0x40084d17 MEMLOCK = 0x80084d05 MEMREAD = 0xc0404d1a MEMREADOOB = 0xc00c4d04 MEMSETBADBLOCK = 0x80084d0c MEMUNLOCK = 0x80084d06 MEMWRITEOOB = 0xc00c4d03 MTDFILEMODE = 0x20004d13 NFDBITS = 0x20 NLDLY = 0x100 NOFLSH = 0x80 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 NS_GET_USERNS = 0x2000b701 OLCUC = 0x2 ONLCR = 0x4 OTPERASE = 0x800c4d19 OTPGETREGIONCOUNT = 0x80044d0e OTPGETREGIONINFO = 0x800c4d0f OTPLOCK = 0x400c4d10 OTPSELECT = 0x40044d0d O_APPEND = 0x8 O_ASYNC = 0x1000 O_CLOEXEC = 0x80000 O_CREAT = 0x100 O_DIRECT = 0x8000 O_DIRECTORY = 0x10000 O_DSYNC = 0x10 O_EXCL = 0x400 O_FSYNC = 0x4010 O_LARGEFILE = 0x2000 O_NDELAY = 0x80 O_NOATIME = 0x40000 O_NOCTTY = 0x800 O_NOFOLLOW = 0x20000 O_NONBLOCK = 0x80 O_PATH = 0x200000 O_RSYNC = 0x4010 O_SYNC = 0x4010 O_TMPFILE = 0x410000 O_TRUNC = 0x200 PARENB = 0x100 PARODD = 0x200 PENDIN = 0x4000 PERF_EVENT_IOC_DISABLE = 0x20002401 PERF_EVENT_IOC_ENABLE = 0x20002400 PERF_EVENT_IOC_ID = 0x40042407 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8004240b PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409 PERF_EVENT_IOC_PERIOD = 0x80082404 PERF_EVENT_IOC_QUERY_BPF = 0xc004240a PERF_EVENT_IOC_REFRESH = 0x20002402 PERF_EVENT_IOC_RESET = 0x20002403 PERF_EVENT_IOC_SET_BPF = 0x80042408 PERF_EVENT_IOC_SET_FILTER = 0x80042406 PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 PPPIOCATTACH = 0x8004743d PPPIOCATTCHAN = 0x80047438 PPPIOCBRIDGECHAN = 0x80047435 PPPIOCCONNECT = 0x8004743a PPPIOCDETACH = 0x8004743c PPPIOCDISCONN = 0x20007439 PPPIOCGASYNCMAP = 0x40047458 PPPIOCGCHAN = 0x40047437 PPPIOCGDEBUG = 0x40047441 PPPIOCGFLAGS = 0x4004745a PPPIOCGIDLE = 0x4008743f PPPIOCGIDLE32 = 0x4008743f PPPIOCGIDLE64 = 0x4010743f PPPIOCGL2TPSTATS = 0x40487436 PPPIOCGMRU = 0x40047453 PPPIOCGRASYNCMAP = 0x40047455 PPPIOCGUNIT = 0x40047456 PPPIOCGXASYNCMAP = 0x40207450 PPPIOCSACTIVE = 0x80087446 PPPIOCSASYNCMAP = 0x80047457 PPPIOCSCOMPRESS = 0x800c744d PPPIOCSDEBUG = 0x80047440 PPPIOCSFLAGS = 0x80047459 PPPIOCSMAXCID = 0x80047451 PPPIOCSMRRU = 0x8004743b PPPIOCSMRU = 0x80047452 PPPIOCSNPMODE = 0x8008744b PPPIOCSPASS = 0x80087447 PPPIOCSRASYNCMAP = 0x80047454 PPPIOCSXASYNCMAP = 0x8020744f PPPIOCUNBRIDGECHAN = 0x20007434 PPPIOCXFERUNIT = 0x2000744e PR_SET_PTRACER_ANY = 0xffffffff PTRACE_GETFPREGS = 0xe PTRACE_GET_THREAD_AREA = 0x19 PTRACE_GET_THREAD_AREA_3264 = 0xc4 PTRACE_GET_WATCH_REGS = 0xd0 PTRACE_OLDSETOPTIONS = 0x15 PTRACE_PEEKDATA_3264 = 0xc1 PTRACE_PEEKTEXT_3264 = 0xc0 PTRACE_POKEDATA_3264 = 0xc3 PTRACE_POKETEXT_3264 = 0xc2 PTRACE_SETFPREGS = 0xf PTRACE_SET_THREAD_AREA = 0x1a PTRACE_SET_WATCH_REGS = 0xd1 RLIMIT_AS = 0x6 RLIMIT_MEMLOCK = 0x9 RLIMIT_NOFILE = 0x5 RLIMIT_NPROC = 0x8 RLIMIT_RSS = 0x7 RNDADDENTROPY = 0x80085203 RNDADDTOENTCNT = 0x80045201 RNDCLEARPOOL = 0x20005206 RNDGETENTCNT = 0x40045200 RNDGETPOOL = 0x40085202 RNDRESEEDCRNG = 0x20005207 RNDZAPENTCNT = 0x20005204 RTC_AIE_OFF = 0x20007002 RTC_AIE_ON = 0x20007001 RTC_ALM_READ = 0x40247008 RTC_ALM_SET = 0x80247007 RTC_EPOCH_READ = 0x4004700d RTC_EPOCH_SET = 0x8004700e RTC_IRQP_READ = 0x4004700b RTC_IRQP_SET = 0x8004700c RTC_PARAM_GET = 0x80187013 RTC_PARAM_SET = 0x80187014 RTC_PIE_OFF = 0x20007006 RTC_PIE_ON = 0x20007005 RTC_PLL_GET = 0x401c7011 RTC_PLL_SET = 0x801c7012 RTC_RD_TIME = 0x40247009 RTC_SET_TIME = 0x8024700a RTC_UIE_OFF = 0x20007004 RTC_UIE_ON = 0x20007003 RTC_VL_CLR = 0x20007014 RTC_VL_READ = 0x40047013 RTC_WIE_OFF = 0x20007010 RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x80 SIOCATMARK = 0x40047307 SIOCGPGRP = 0x40047309 SIOCGSTAMPNS_NEW = 0x40108907 SIOCGSTAMP_NEW = 0x40108906 SIOCINQ = 0x467f SIOCOUTQ = 0x7472 SIOCSPGRP = 0x80047308 SOCK_CLOEXEC = 0x80000 SOCK_DGRAM = 0x1 SOCK_NONBLOCK = 0x80 SOCK_STREAM = 0x2 SOL_SOCKET = 0xffff SO_ACCEPTCONN = 0x1009 SO_ATTACH_BPF = 0x32 SO_ATTACH_REUSEPORT_CBPF = 0x33 SO_ATTACH_REUSEPORT_EBPF = 0x34 SO_BINDTODEVICE = 0x19 SO_BINDTOIFINDEX = 0x3e SO_BPF_EXTENSIONS = 0x30 SO_BROADCAST = 0x20 SO_BSDCOMPAT = 0xe SO_BUF_LOCK = 0x48 SO_BUSY_POLL = 0x2e SO_BUSY_POLL_BUDGET = 0x46 SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 SO_DOMAIN = 0x1029 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f SO_MEMINFO = 0x37 SO_NETNS_COOKIE = 0x47 SO_NOFCS = 0x2b SO_OOBINLINE = 0x100 SO_PASSCRED = 0x11 SO_PASSPIDFD = 0x4c SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x12 SO_PEERGROUPS = 0x3b SO_PEERPIDFD = 0x4d SO_PEERSEC = 0x1e SO_PREFER_BUSY_POLL = 0x45 SO_PROTOCOL = 0x1028 SO_RCVBUF = 0x1002 SO_RCVBUFFORCE = 0x21 SO_RCVLOWAT = 0x1004 SO_RCVMARK = 0x4b SO_RCVTIMEO = 0x1006 SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_OLD = 0x1006 SO_RESERVE_MEM = 0x49 SO_REUSEADDR = 0x4 SO_REUSEPORT = 0x200 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 = 0x1001 SO_SNDBUFFORCE = 0x1f SO_SNDLOWAT = 0x1003 SO_SNDTIMEO = 0x1005 SO_SNDTIMEO_NEW = 0x43 SO_SNDTIMEO_OLD = 0x1005 SO_STYLE = 0x1008 SO_TIMESTAMPING = 0x25 SO_TIMESTAMPING_NEW = 0x41 SO_TIMESTAMPING_OLD = 0x25 SO_TIMESTAMPNS = 0x23 SO_TIMESTAMPNS_NEW = 0x40 SO_TIMESTAMPNS_OLD = 0x23 SO_TIMESTAMP_NEW = 0x3f SO_TXREHASH = 0x4a SO_TXTIME = 0x3d SO_TYPE = 0x1008 SO_WIFI_STATUS = 0x29 SO_ZEROCOPY = 0x3c TAB1 = 0x800 TAB2 = 0x1000 TAB3 = 0x1800 TABDLY = 0x1800 TCFLSH = 0x5407 TCGETA = 0x5401 TCGETS = 0x540d TCGETS2 = 0x4030542a TCSAFLUSH = 0x5410 TCSBRK = 0x5405 TCSBRKP = 0x5486 TCSETA = 0x5402 TCSETAF = 0x5404 TCSETAW = 0x5403 TCSETS = 0x540e TCSETS2 = 0x8030542b TCSETSF = 0x5410 TCSETSF2 = 0x8030542d TCSETSW = 0x540f TCSETSW2 = 0x8030542c TCXONC = 0x5406 TFD_CLOEXEC = 0x80000 TFD_NONBLOCK = 0x80 TIOCCBRK = 0x5428 TIOCCONS = 0x80047478 TIOCEXCL = 0x740d TIOCGDEV = 0x40045432 TIOCGETD = 0x7400 TIOCGETP = 0x7408 TIOCGEXCL = 0x40045440 TIOCGICOUNT = 0x5492 TIOCGISO7816 = 0x40285442 TIOCGLCKTRMIOS = 0x548b TIOCGLTC = 0x7474 TIOCGPGRP = 0x40047477 TIOCGPKT = 0x40045438 TIOCGPTLCK = 0x40045439 TIOCGPTN = 0x40045430 TIOCGPTPEER = 0x20005441 TIOCGRS485 = 0x4020542e TIOCGSERIAL = 0x5484 TIOCGSID = 0x7416 TIOCGSOFTCAR = 0x5481 TIOCGWINSZ = 0x40087468 TIOCINQ = 0x467f TIOCLINUX = 0x5483 TIOCMBIC = 0x741c TIOCMBIS = 0x741b TIOCMGET = 0x741d TIOCMIWAIT = 0x5491 TIOCMSET = 0x741a TIOCM_CAR = 0x100 TIOCM_CD = 0x100 TIOCM_CTS = 0x40 TIOCM_DSR = 0x400 TIOCM_RI = 0x200 TIOCM_RNG = 0x200 TIOCM_SR = 0x20 TIOCM_ST = 0x10 TIOCNOTTY = 0x5471 TIOCNXCL = 0x740e TIOCOUTQ = 0x7472 TIOCPKT = 0x5470 TIOCSBRK = 0x5427 TIOCSCTTY = 0x5480 TIOCSERCONFIG = 0x5488 TIOCSERGETLSR = 0x548e TIOCSERGETMULTI = 0x548f TIOCSERGSTRUCT = 0x548d TIOCSERGWILD = 0x5489 TIOCSERSETMULTI = 0x5490 TIOCSERSWILD = 0x548a TIOCSER_TEMT = 0x1 TIOCSETD = 0x7401 TIOCSETN = 0x740a TIOCSETP = 0x7409 TIOCSIG = 0x80045436 TIOCSISO7816 = 0xc0285443 TIOCSLCKTRMIOS = 0x548c TIOCSLTC = 0x7475 TIOCSPGRP = 0x80047476 TIOCSPTLCK = 0x80045431 TIOCSRS485 = 0xc020542f TIOCSSERIAL = 0x5485 TIOCSSOFTCAR = 0x5482 TIOCSTI = 0x5472 TIOCSWINSZ = 0x80087467 TIOCVHANGUP = 0x5437 TOSTOP = 0x8000 TUNATTACHFILTER = 0x800854d5 TUNDETACHFILTER = 0x800854d6 TUNGETDEVNETNS = 0x200054e3 TUNGETFEATURES = 0x400454cf TUNGETFILTER = 0x400854db TUNGETIFF = 0x400454d2 TUNGETSNDBUF = 0x400454d3 TUNGETVNETBE = 0x400454df TUNGETVNETHDRSZ = 0x400454d7 TUNGETVNETLE = 0x400454dd TUNSETCARRIER = 0x800454e2 TUNSETDEBUG = 0x800454c9 TUNSETFILTEREBPF = 0x400454e1 TUNSETGROUP = 0x800454ce TUNSETIFF = 0x800454ca TUNSETIFINDEX = 0x800454da TUNSETLINK = 0x800454cd TUNSETNOCSUM = 0x800454c8 TUNSETOFFLOAD = 0x800454d0 TUNSETOWNER = 0x800454cc TUNSETPERSIST = 0x800454cb TUNSETQUEUE = 0x800454d9 TUNSETSNDBUF = 0x800454d4 TUNSETSTEERINGEBPF = 0x400454e0 TUNSETTXFILTER = 0x800454d1 TUNSETVNETBE = 0x800454de TUNSETVNETHDRSZ = 0x800454d8 TUNSETVNETLE = 0x800454dc UBI_IOCATT = 0x80186f40 UBI_IOCDET = 0x80046f41 UBI_IOCEBCH = 0x80044f02 UBI_IOCEBER = 0x80044f01 UBI_IOCEBISMAP = 0x40044f05 UBI_IOCEBMAP = 0x80084f03 UBI_IOCEBUNMAP = 0x80044f04 UBI_IOCMKVOL = 0x80986f00 UBI_IOCRMVOL = 0x80046f01 UBI_IOCRNVOL = 0x91106f03 UBI_IOCRPEB = 0x80046f04 UBI_IOCRSVOL = 0x800c6f02 UBI_IOCSETVOLPROP = 0x80104f06 UBI_IOCSPEB = 0x80046f05 UBI_IOCVOLCRBLK = 0x80804f07 UBI_IOCVOLRMBLK = 0x20004f08 UBI_IOCVOLUP = 0x80084f00 VDISCARD = 0xd VEOF = 0x10 VEOL = 0x11 VEOL2 = 0x6 VMIN = 0x4 VREPRINT = 0xc VSTART = 0x8 VSTOP = 0x9 VSUSP = 0xa VSWTC = 0x7 VSWTCH = 0x7 VT1 = 0x4000 VTDLY = 0x4000 VTIME = 0x5 VWERASE = 0xe WDIOC_GETBOOTSTATUS = 0x40045702 WDIOC_GETPRETIMEOUT = 0x40045709 WDIOC_GETSTATUS = 0x40045701 WDIOC_GETSUPPORT = 0x40285700 WDIOC_GETTEMP = 0x40045703 WDIOC_GETTIMELEFT = 0x4004570a WDIOC_GETTIMEOUT = 0x40045707 WDIOC_KEEPALIVE = 0x40045705 WDIOC_SETOPTIONS = 0x40045704 WORDSIZE = 0x20 XCASE = 0x4 XTABS = 0x1800 _HIDIOCGRAWNAME = 0x40804804 _HIDIOCGRAWPHYS = 0x40404805 _HIDIOCGRAWUNIQ = 0x40404808 ) // Errors const ( EADDRINUSE = syscall.Errno(0x7d) EADDRNOTAVAIL = syscall.Errno(0x7e) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x7c) EALREADY = syscall.Errno(0x95) EBADE = syscall.Errno(0x32) EBADFD = syscall.Errno(0x51) EBADMSG = syscall.Errno(0x4d) EBADR = syscall.Errno(0x33) EBADRQC = syscall.Errno(0x36) EBADSLT = syscall.Errno(0x37) EBFONT = syscall.Errno(0x3b) ECANCELED = syscall.Errno(0x9e) 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) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x46d) EHOSTDOWN = syscall.Errno(0x93) EHOSTUNREACH = syscall.Errno(0x94) EHWPOISON = syscall.Errno(0xa8) EIDRM = syscall.Errno(0x24) EILSEQ = syscall.Errno(0x58) EINIT = syscall.Errno(0x8d) EINPROGRESS = syscall.Errno(0x96) EISCONN = syscall.Errno(0x85) EISNAM = syscall.Errno(0x8b) EKEYEXPIRED = syscall.Errno(0xa2) EKEYREJECTED = syscall.Errno(0xa4) EKEYREVOKED = syscall.Errno(0xa3) 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) ELOOP = syscall.Errno(0x5a) EMEDIUMTYPE = syscall.Errno(0xa0) EMSGSIZE = syscall.Errno(0x61) EMULTIHOP = syscall.Errno(0x4a) ENAMETOOLONG = syscall.Errno(0x4e) ENAVAIL = syscall.Errno(0x8a) ENETDOWN = syscall.Errno(0x7f) ENETRESET = syscall.Errno(0x81) ENETUNREACH = syscall.Errno(0x80) ENOANO = syscall.Errno(0x35) ENOBUFS = syscall.Errno(0x84) ENOCSI = syscall.Errno(0x2b) ENODATA = syscall.Errno(0x3d) ENOKEY = syscall.Errno(0xa1) ENOLCK = syscall.Errno(0x2e) ENOLINK = syscall.Errno(0x43) ENOMEDIUM = syscall.Errno(0x9f) ENOMSG = syscall.Errno(0x23) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x63) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x59) ENOTCONN = syscall.Errno(0x86) ENOTEMPTY = syscall.Errno(0x5d) ENOTNAM = syscall.Errno(0x89) ENOTRECOVERABLE = syscall.Errno(0xa6) ENOTSOCK = syscall.Errno(0x5f) ENOTSUP = syscall.Errno(0x7a) ENOTUNIQ = syscall.Errno(0x50) EOPNOTSUPP = syscall.Errno(0x7a) EOVERFLOW = syscall.Errno(0x4f) EOWNERDEAD = syscall.Errno(0xa5) EPFNOSUPPORT = syscall.Errno(0x7b) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x78) EPROTOTYPE = syscall.Errno(0x62) EREMCHG = syscall.Errno(0x52) EREMDEV = syscall.Errno(0x8e) EREMOTE = syscall.Errno(0x42) EREMOTEIO = syscall.Errno(0x8c) ERESTART = syscall.Errno(0x5b) ERFKILL = syscall.Errno(0xa7) ESHUTDOWN = syscall.Errno(0x8f) ESOCKTNOSUPPORT = syscall.Errno(0x79) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x97) ESTRPIPE = syscall.Errno(0x5c) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x91) ETOOMANYREFS = syscall.Errno(0x90) EUCLEAN = syscall.Errno(0x87) EUNATCH = syscall.Errno(0x2a) EUSERS = syscall.Errno(0x5e) EXFULL = syscall.Errno(0x34) ) // Signals const ( SIGBUS = syscall.Signal(0xa) SIGCHLD = syscall.Signal(0x12) SIGCLD = syscall.Signal(0x12) SIGCONT = syscall.Signal(0x19) SIGEMT = syscall.Signal(0x7) SIGIO = syscall.Signal(0x16) SIGPOLL = syscall.Signal(0x16) SIGPROF = syscall.Signal(0x1d) SIGPWR = syscall.Signal(0x13) SIGSTOP = syscall.Signal(0x17) SIGSYS = syscall.Signal(0xc) 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) SIGWINCH = syscall.Signal(0x14) SIGXCPU = syscall.Signal(0x1e) SIGXFSZ = syscall.Signal(0x1f) ) // Error table var errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "no such device or address"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EAGAIN", "resource temporarily unavailable"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device or resource busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "invalid cross-device link"}, {19, "ENODEV", "no such device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "numerical result out of range"}, {35, "ENOMSG", "no message of desired type"}, {36, "EIDRM", "identifier removed"}, {37, "ECHRNG", "channel number out of range"}, {38, "EL2NSYNC", "level 2 not synchronized"}, {39, "EL3HLT", "level 3 halted"}, {40, "EL3RST", "level 3 reset"}, {41, "ELNRNG", "link number out of range"}, {42, "EUNATCH", "protocol driver not attached"}, {43, "ENOCSI", "no CSI structure available"}, {44, "EL2HLT", "level 2 halted"}, {45, "EDEADLK", "resource deadlock avoided"}, {46, "ENOLCK", "no locks available"}, {50, "EBADE", "invalid exchange"}, {51, "EBADR", "invalid request descriptor"}, {52, "EXFULL", "exchange full"}, {53, "ENOANO", "no anode"}, {54, "EBADRQC", "invalid request code"}, {55, "EBADSLT", "invalid slot"}, {56, "EDEADLOCK", "file locking deadlock error"}, {59, "EBFONT", "bad font file format"}, {60, "ENOSTR", "device not a stream"}, {61, "ENODATA", "no data available"}, {62, "ETIME", "timer expired"}, {63, "ENOSR", "out of streams resources"}, {64, "ENONET", "machine is not on the network"}, {65, "ENOPKG", "package not installed"}, {66, "EREMOTE", "object is remote"}, {67, "ENOLINK", "link has been severed"}, {68, "EADV", "advertise error"}, {69, "ESRMNT", "srmount error"}, {70, "ECOMM", "communication error on send"}, {71, "EPROTO", "protocol error"}, {73, "EDOTDOT", "RFS specific error"}, {74, "EMULTIHOP", "multihop attempted"}, {77, "EBADMSG", "bad message"}, {78, "ENAMETOOLONG", "file name too long"}, {79, "EOVERFLOW", "value too large for defined data type"}, {80, "ENOTUNIQ", "name not unique on network"}, {81, "EBADFD", "file descriptor in bad state"}, {82, "EREMCHG", "remote address changed"}, {83, "ELIBACC", "can not access a needed shared library"}, {84, "ELIBBAD", "accessing a corrupted shared library"}, {85, "ELIBSCN", ".lib section in a.out corrupted"}, {86, "ELIBMAX", "attempting to link in too many shared libraries"}, {87, "ELIBEXEC", "cannot exec a shared library directly"}, {88, "EILSEQ", "invalid or incomplete multibyte or wide character"}, {89, "ENOSYS", "function not implemented"}, {90, "ELOOP", "too many levels of symbolic links"}, {91, "ERESTART", "interrupted system call should be restarted"}, {92, "ESTRPIPE", "streams pipe error"}, {93, "ENOTEMPTY", "directory not empty"}, {94, "EUSERS", "too many users"}, {95, "ENOTSOCK", "socket operation on non-socket"}, {96, "EDESTADDRREQ", "destination address required"}, {97, "EMSGSIZE", "message too long"}, {98, "EPROTOTYPE", "protocol wrong type for socket"}, {99, "ENOPROTOOPT", "protocol not available"}, {120, "EPROTONOSUPPORT", "protocol not supported"}, {121, "ESOCKTNOSUPPORT", "socket type not supported"}, {122, "ENOTSUP", "operation not supported"}, {123, "EPFNOSUPPORT", "protocol family not supported"}, {124, "EAFNOSUPPORT", "address family not supported by protocol"}, {125, "EADDRINUSE", "address already in use"}, {126, "EADDRNOTAVAIL", "cannot assign requested address"}, {127, "ENETDOWN", "network is down"}, {128, "ENETUNREACH", "network is unreachable"}, {129, "ENETRESET", "network dropped connection on reset"}, {130, "ECONNABORTED", "software caused connection abort"}, {131, "ECONNRESET", "connection reset by peer"}, {132, "ENOBUFS", "no buffer space available"}, {133, "EISCONN", "transport endpoint is already connected"}, {134, "ENOTCONN", "transport endpoint is not connected"}, {135, "EUCLEAN", "structure needs cleaning"}, {137, "ENOTNAM", "not a XENIX named type file"}, {138, "ENAVAIL", "no XENIX semaphores available"}, {139, "EISNAM", "is a named type file"}, {140, "EREMOTEIO", "remote I/O error"}, {141, "EINIT", "unknown error 141"}, {142, "EREMDEV", "unknown error 142"}, {143, "ESHUTDOWN", "cannot send after transport endpoint shutdown"}, {144, "ETOOMANYREFS", "too many references: cannot splice"}, {145, "ETIMEDOUT", "connection timed out"}, {146, "ECONNREFUSED", "connection refused"}, {147, "EHOSTDOWN", "host is down"}, {148, "EHOSTUNREACH", "no route to host"}, {149, "EALREADY", "operation already in progress"}, {150, "EINPROGRESS", "operation now in progress"}, {151, "ESTALE", "stale file handle"}, {158, "ECANCELED", "operation canceled"}, {159, "ENOMEDIUM", "no medium found"}, {160, "EMEDIUMTYPE", "wrong medium type"}, {161, "ENOKEY", "required key not available"}, {162, "EKEYEXPIRED", "key has expired"}, {163, "EKEYREVOKED", "key has been revoked"}, {164, "EKEYREJECTED", "key was rejected by service"}, {165, "EOWNERDEAD", "owner died"}, {166, "ENOTRECOVERABLE", "state not recoverable"}, {167, "ERFKILL", "operation not possible due to RF-kill"}, {168, "EHWPOISON", "memory page has hardware error"}, {1133, "EDQUOT", "disk quota exceeded"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/breakpoint trap"}, {6, "SIGABRT", "aborted"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGUSR1", "user defined signal 1"}, {17, "SIGUSR2", "user defined signal 2"}, {18, "SIGCHLD", "child exited"}, {19, "SIGPWR", "power failure"}, {20, "SIGWINCH", "window changed"}, {21, "SIGURG", "urgent I/O condition"}, {22, "SIGIO", "I/O possible"}, {23, "SIGSTOP", "stopped (signal)"}, {24, "SIGTSTP", "stopped"}, {25, "SIGCONT", "continued"}, {26, "SIGTTIN", "stopped (tty input)"}, {27, "SIGTTOU", "stopped (tty output)"}, {28, "SIGVTALRM", "virtual timer expired"}, {29, "SIGPROF", "profiling timer expired"}, {30, "SIGXCPU", "CPU time limit exceeded"}, {31, "SIGXFSZ", "file size limit exceeded"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go ================================================ // mkerrors.sh -Wall -Werror -static -I/tmp/mips64/include // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64 && linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/mips64/include _const.go package unix import "syscall" const ( B1000000 = 0x1008 B115200 = 0x1002 B1152000 = 0x1009 B1500000 = 0x100a B2000000 = 0x100b B230400 = 0x1003 B2500000 = 0x100c B3000000 = 0x100d B3500000 = 0x100e B4000000 = 0x100f B460800 = 0x1004 B500000 = 0x1005 B57600 = 0x1001 B576000 = 0x1006 B921600 = 0x1007 BLKALIGNOFF = 0x2000127a BLKBSZGET = 0x40081270 BLKBSZSET = 0x80081271 BLKDISCARD = 0x20001277 BLKDISCARDZEROES = 0x2000127c BLKFLSBUF = 0x20001261 BLKFRAGET = 0x20001265 BLKFRASET = 0x20001264 BLKGETDISKSEQ = 0x40081280 BLKGETSIZE = 0x20001260 BLKGETSIZE64 = 0x40081272 BLKIOMIN = 0x20001278 BLKIOOPT = 0x20001279 BLKPBSZGET = 0x2000127b BLKRAGET = 0x20001263 BLKRASET = 0x20001262 BLKROGET = 0x2000125e BLKROSET = 0x2000125d BLKROTATIONAL = 0x2000127e BLKRRPART = 0x2000125f BLKSECDISCARD = 0x2000127d BLKSECTGET = 0x20001267 BLKSECTSET = 0x20001266 BLKSSZGET = 0x20001268 BLKZEROOUT = 0x2000127f BOTHER = 0x1000 BS1 = 0x2000 BSDLY = 0x2000 CBAUD = 0x100f CBAUDEX = 0x1000 CIBAUD = 0x100f0000 CLOCAL = 0x800 CR1 = 0x200 CR2 = 0x400 CR3 = 0x600 CRDLY = 0x600 CREAD = 0x80 CS6 = 0x10 CS7 = 0x20 CS8 = 0x30 CSIZE = 0x30 CSTOPB = 0x40 ECCGETLAYOUT = 0x41484d11 ECCGETSTATS = 0x40104d12 ECHOCTL = 0x200 ECHOE = 0x10 ECHOK = 0x20 ECHOKE = 0x800 ECHONL = 0x40 ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x80 EPIOCGPARAMS = 0x40088a02 EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 FFDLY = 0x8000 FICLONE = 0x80049409 FICLONERANGE = 0x8020940d FLUSHO = 0x2000 FS_IOC_ENABLE_VERITY = 0x80806685 FS_IOC_GETFLAGS = 0x40086601 FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 FS_IOC_SETFLAGS = 0x80086602 FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 F_GETLK = 0xe F_GETLK64 = 0xe F_GETOWN = 0x17 F_RDLCK = 0x0 F_SETLK = 0x6 F_SETLK64 = 0x6 F_SETLKW = 0x7 F_SETLKW64 = 0x7 F_SETOWN = 0x18 F_UNLCK = 0x2 F_WRLCK = 0x1 HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x100 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x80 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 ISIG = 0x1 IUCLC = 0x200 IXOFF = 0x1000 IXON = 0x400 MAP_ANON = 0x800 MAP_ANONYMOUS = 0x800 MAP_DENYWRITE = 0x2000 MAP_EXECUTABLE = 0x4000 MAP_GROWSDOWN = 0x1000 MAP_HUGETLB = 0x80000 MAP_LOCKED = 0x8000 MAP_NONBLOCK = 0x20000 MAP_NORESERVE = 0x400 MAP_POPULATE = 0x10000 MAP_RENAME = 0x800 MAP_STACK = 0x40000 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MCL_ONFAULT = 0x4 MEMERASE = 0x80084d02 MEMERASE64 = 0x80104d14 MEMGETBADBLOCK = 0x80084d0b MEMGETINFO = 0x40204d01 MEMGETOOBSEL = 0x40c84d0a MEMGETREGIONCOUNT = 0x40044d07 MEMISLOCKED = 0x40084d17 MEMLOCK = 0x80084d05 MEMREAD = 0xc0404d1a MEMREADOOB = 0xc0104d04 MEMSETBADBLOCK = 0x80084d0c MEMUNLOCK = 0x80084d06 MEMWRITEOOB = 0xc0104d03 MTDFILEMODE = 0x20004d13 NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 NS_GET_USERNS = 0x2000b701 OLCUC = 0x2 ONLCR = 0x4 OTPERASE = 0x800c4d19 OTPGETREGIONCOUNT = 0x80044d0e OTPGETREGIONINFO = 0x800c4d0f OTPLOCK = 0x400c4d10 OTPSELECT = 0x40044d0d O_APPEND = 0x8 O_ASYNC = 0x1000 O_CLOEXEC = 0x80000 O_CREAT = 0x100 O_DIRECT = 0x8000 O_DIRECTORY = 0x10000 O_DSYNC = 0x10 O_EXCL = 0x400 O_FSYNC = 0x4010 O_LARGEFILE = 0x0 O_NDELAY = 0x80 O_NOATIME = 0x40000 O_NOCTTY = 0x800 O_NOFOLLOW = 0x20000 O_NONBLOCK = 0x80 O_PATH = 0x200000 O_RSYNC = 0x4010 O_SYNC = 0x4010 O_TMPFILE = 0x410000 O_TRUNC = 0x200 PARENB = 0x100 PARODD = 0x200 PENDIN = 0x4000 PERF_EVENT_IOC_DISABLE = 0x20002401 PERF_EVENT_IOC_ENABLE = 0x20002400 PERF_EVENT_IOC_ID = 0x40082407 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409 PERF_EVENT_IOC_PERIOD = 0x80082404 PERF_EVENT_IOC_QUERY_BPF = 0xc008240a PERF_EVENT_IOC_REFRESH = 0x20002402 PERF_EVENT_IOC_RESET = 0x20002403 PERF_EVENT_IOC_SET_BPF = 0x80042408 PERF_EVENT_IOC_SET_FILTER = 0x80082406 PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 PPPIOCATTACH = 0x8004743d PPPIOCATTCHAN = 0x80047438 PPPIOCBRIDGECHAN = 0x80047435 PPPIOCCONNECT = 0x8004743a PPPIOCDETACH = 0x8004743c PPPIOCDISCONN = 0x20007439 PPPIOCGASYNCMAP = 0x40047458 PPPIOCGCHAN = 0x40047437 PPPIOCGDEBUG = 0x40047441 PPPIOCGFLAGS = 0x4004745a PPPIOCGIDLE = 0x4010743f PPPIOCGIDLE32 = 0x4008743f PPPIOCGIDLE64 = 0x4010743f PPPIOCGL2TPSTATS = 0x40487436 PPPIOCGMRU = 0x40047453 PPPIOCGRASYNCMAP = 0x40047455 PPPIOCGUNIT = 0x40047456 PPPIOCGXASYNCMAP = 0x40207450 PPPIOCSACTIVE = 0x80107446 PPPIOCSASYNCMAP = 0x80047457 PPPIOCSCOMPRESS = 0x8010744d PPPIOCSDEBUG = 0x80047440 PPPIOCSFLAGS = 0x80047459 PPPIOCSMAXCID = 0x80047451 PPPIOCSMRRU = 0x8004743b PPPIOCSMRU = 0x80047452 PPPIOCSNPMODE = 0x8008744b PPPIOCSPASS = 0x80107447 PPPIOCSRASYNCMAP = 0x80047454 PPPIOCSXASYNCMAP = 0x8020744f PPPIOCUNBRIDGECHAN = 0x20007434 PPPIOCXFERUNIT = 0x2000744e PR_SET_PTRACER_ANY = 0xffffffffffffffff PTRACE_GETFPREGS = 0xe PTRACE_GET_THREAD_AREA = 0x19 PTRACE_GET_THREAD_AREA_3264 = 0xc4 PTRACE_GET_WATCH_REGS = 0xd0 PTRACE_OLDSETOPTIONS = 0x15 PTRACE_PEEKDATA_3264 = 0xc1 PTRACE_PEEKTEXT_3264 = 0xc0 PTRACE_POKEDATA_3264 = 0xc3 PTRACE_POKETEXT_3264 = 0xc2 PTRACE_SETFPREGS = 0xf PTRACE_SET_THREAD_AREA = 0x1a PTRACE_SET_WATCH_REGS = 0xd1 RLIMIT_AS = 0x6 RLIMIT_MEMLOCK = 0x9 RLIMIT_NOFILE = 0x5 RLIMIT_NPROC = 0x8 RLIMIT_RSS = 0x7 RNDADDENTROPY = 0x80085203 RNDADDTOENTCNT = 0x80045201 RNDCLEARPOOL = 0x20005206 RNDGETENTCNT = 0x40045200 RNDGETPOOL = 0x40085202 RNDRESEEDCRNG = 0x20005207 RNDZAPENTCNT = 0x20005204 RTC_AIE_OFF = 0x20007002 RTC_AIE_ON = 0x20007001 RTC_ALM_READ = 0x40247008 RTC_ALM_SET = 0x80247007 RTC_EPOCH_READ = 0x4008700d RTC_EPOCH_SET = 0x8008700e RTC_IRQP_READ = 0x4008700b RTC_IRQP_SET = 0x8008700c RTC_PARAM_GET = 0x80187013 RTC_PARAM_SET = 0x80187014 RTC_PIE_OFF = 0x20007006 RTC_PIE_ON = 0x20007005 RTC_PLL_GET = 0x40207011 RTC_PLL_SET = 0x80207012 RTC_RD_TIME = 0x40247009 RTC_SET_TIME = 0x8024700a RTC_UIE_OFF = 0x20007004 RTC_UIE_ON = 0x20007003 RTC_VL_CLR = 0x20007014 RTC_VL_READ = 0x40047013 RTC_WIE_OFF = 0x20007010 RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x80 SIOCATMARK = 0x40047307 SIOCGPGRP = 0x40047309 SIOCGSTAMPNS_NEW = 0x40108907 SIOCGSTAMP_NEW = 0x40108906 SIOCINQ = 0x467f SIOCOUTQ = 0x7472 SIOCSPGRP = 0x80047308 SOCK_CLOEXEC = 0x80000 SOCK_DGRAM = 0x1 SOCK_NONBLOCK = 0x80 SOCK_STREAM = 0x2 SOL_SOCKET = 0xffff SO_ACCEPTCONN = 0x1009 SO_ATTACH_BPF = 0x32 SO_ATTACH_REUSEPORT_CBPF = 0x33 SO_ATTACH_REUSEPORT_EBPF = 0x34 SO_BINDTODEVICE = 0x19 SO_BINDTOIFINDEX = 0x3e SO_BPF_EXTENSIONS = 0x30 SO_BROADCAST = 0x20 SO_BSDCOMPAT = 0xe SO_BUF_LOCK = 0x48 SO_BUSY_POLL = 0x2e SO_BUSY_POLL_BUDGET = 0x46 SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 SO_DOMAIN = 0x1029 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f SO_MEMINFO = 0x37 SO_NETNS_COOKIE = 0x47 SO_NOFCS = 0x2b SO_OOBINLINE = 0x100 SO_PASSCRED = 0x11 SO_PASSPIDFD = 0x4c SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x12 SO_PEERGROUPS = 0x3b SO_PEERPIDFD = 0x4d SO_PEERSEC = 0x1e SO_PREFER_BUSY_POLL = 0x45 SO_PROTOCOL = 0x1028 SO_RCVBUF = 0x1002 SO_RCVBUFFORCE = 0x21 SO_RCVLOWAT = 0x1004 SO_RCVMARK = 0x4b SO_RCVTIMEO = 0x1006 SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_OLD = 0x1006 SO_RESERVE_MEM = 0x49 SO_REUSEADDR = 0x4 SO_REUSEPORT = 0x200 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 = 0x1001 SO_SNDBUFFORCE = 0x1f SO_SNDLOWAT = 0x1003 SO_SNDTIMEO = 0x1005 SO_SNDTIMEO_NEW = 0x43 SO_SNDTIMEO_OLD = 0x1005 SO_STYLE = 0x1008 SO_TIMESTAMPING = 0x25 SO_TIMESTAMPING_NEW = 0x41 SO_TIMESTAMPING_OLD = 0x25 SO_TIMESTAMPNS = 0x23 SO_TIMESTAMPNS_NEW = 0x40 SO_TIMESTAMPNS_OLD = 0x23 SO_TIMESTAMP_NEW = 0x3f SO_TXREHASH = 0x4a SO_TXTIME = 0x3d SO_TYPE = 0x1008 SO_WIFI_STATUS = 0x29 SO_ZEROCOPY = 0x3c TAB1 = 0x800 TAB2 = 0x1000 TAB3 = 0x1800 TABDLY = 0x1800 TCFLSH = 0x5407 TCGETA = 0x5401 TCGETS = 0x540d TCGETS2 = 0x4030542a TCSAFLUSH = 0x5410 TCSBRK = 0x5405 TCSBRKP = 0x5486 TCSETA = 0x5402 TCSETAF = 0x5404 TCSETAW = 0x5403 TCSETS = 0x540e TCSETS2 = 0x8030542b TCSETSF = 0x5410 TCSETSF2 = 0x8030542d TCSETSW = 0x540f TCSETSW2 = 0x8030542c TCXONC = 0x5406 TFD_CLOEXEC = 0x80000 TFD_NONBLOCK = 0x80 TIOCCBRK = 0x5428 TIOCCONS = 0x80047478 TIOCEXCL = 0x740d TIOCGDEV = 0x40045432 TIOCGETD = 0x7400 TIOCGETP = 0x7408 TIOCGEXCL = 0x40045440 TIOCGICOUNT = 0x5492 TIOCGISO7816 = 0x40285442 TIOCGLCKTRMIOS = 0x548b TIOCGLTC = 0x7474 TIOCGPGRP = 0x40047477 TIOCGPKT = 0x40045438 TIOCGPTLCK = 0x40045439 TIOCGPTN = 0x40045430 TIOCGPTPEER = 0x20005441 TIOCGRS485 = 0x4020542e TIOCGSERIAL = 0x5484 TIOCGSID = 0x7416 TIOCGSOFTCAR = 0x5481 TIOCGWINSZ = 0x40087468 TIOCINQ = 0x467f TIOCLINUX = 0x5483 TIOCMBIC = 0x741c TIOCMBIS = 0x741b TIOCMGET = 0x741d TIOCMIWAIT = 0x5491 TIOCMSET = 0x741a TIOCM_CAR = 0x100 TIOCM_CD = 0x100 TIOCM_CTS = 0x40 TIOCM_DSR = 0x400 TIOCM_RI = 0x200 TIOCM_RNG = 0x200 TIOCM_SR = 0x20 TIOCM_ST = 0x10 TIOCNOTTY = 0x5471 TIOCNXCL = 0x740e TIOCOUTQ = 0x7472 TIOCPKT = 0x5470 TIOCSBRK = 0x5427 TIOCSCTTY = 0x5480 TIOCSERCONFIG = 0x5488 TIOCSERGETLSR = 0x548e TIOCSERGETMULTI = 0x548f TIOCSERGSTRUCT = 0x548d TIOCSERGWILD = 0x5489 TIOCSERSETMULTI = 0x5490 TIOCSERSWILD = 0x548a TIOCSER_TEMT = 0x1 TIOCSETD = 0x7401 TIOCSETN = 0x740a TIOCSETP = 0x7409 TIOCSIG = 0x80045436 TIOCSISO7816 = 0xc0285443 TIOCSLCKTRMIOS = 0x548c TIOCSLTC = 0x7475 TIOCSPGRP = 0x80047476 TIOCSPTLCK = 0x80045431 TIOCSRS485 = 0xc020542f TIOCSSERIAL = 0x5485 TIOCSSOFTCAR = 0x5482 TIOCSTI = 0x5472 TIOCSWINSZ = 0x80087467 TIOCVHANGUP = 0x5437 TOSTOP = 0x8000 TUNATTACHFILTER = 0x801054d5 TUNDETACHFILTER = 0x801054d6 TUNGETDEVNETNS = 0x200054e3 TUNGETFEATURES = 0x400454cf TUNGETFILTER = 0x401054db TUNGETIFF = 0x400454d2 TUNGETSNDBUF = 0x400454d3 TUNGETVNETBE = 0x400454df TUNGETVNETHDRSZ = 0x400454d7 TUNGETVNETLE = 0x400454dd TUNSETCARRIER = 0x800454e2 TUNSETDEBUG = 0x800454c9 TUNSETFILTEREBPF = 0x400454e1 TUNSETGROUP = 0x800454ce TUNSETIFF = 0x800454ca TUNSETIFINDEX = 0x800454da TUNSETLINK = 0x800454cd TUNSETNOCSUM = 0x800454c8 TUNSETOFFLOAD = 0x800454d0 TUNSETOWNER = 0x800454cc TUNSETPERSIST = 0x800454cb TUNSETQUEUE = 0x800454d9 TUNSETSNDBUF = 0x800454d4 TUNSETSTEERINGEBPF = 0x400454e0 TUNSETTXFILTER = 0x800454d1 TUNSETVNETBE = 0x800454de TUNSETVNETHDRSZ = 0x800454d8 TUNSETVNETLE = 0x800454dc UBI_IOCATT = 0x80186f40 UBI_IOCDET = 0x80046f41 UBI_IOCEBCH = 0x80044f02 UBI_IOCEBER = 0x80044f01 UBI_IOCEBISMAP = 0x40044f05 UBI_IOCEBMAP = 0x80084f03 UBI_IOCEBUNMAP = 0x80044f04 UBI_IOCMKVOL = 0x80986f00 UBI_IOCRMVOL = 0x80046f01 UBI_IOCRNVOL = 0x91106f03 UBI_IOCRPEB = 0x80046f04 UBI_IOCRSVOL = 0x800c6f02 UBI_IOCSETVOLPROP = 0x80104f06 UBI_IOCSPEB = 0x80046f05 UBI_IOCVOLCRBLK = 0x80804f07 UBI_IOCVOLRMBLK = 0x20004f08 UBI_IOCVOLUP = 0x80084f00 VDISCARD = 0xd VEOF = 0x10 VEOL = 0x11 VEOL2 = 0x6 VMIN = 0x4 VREPRINT = 0xc VSTART = 0x8 VSTOP = 0x9 VSUSP = 0xa VSWTC = 0x7 VSWTCH = 0x7 VT1 = 0x4000 VTDLY = 0x4000 VTIME = 0x5 VWERASE = 0xe WDIOC_GETBOOTSTATUS = 0x40045702 WDIOC_GETPRETIMEOUT = 0x40045709 WDIOC_GETSTATUS = 0x40045701 WDIOC_GETSUPPORT = 0x40285700 WDIOC_GETTEMP = 0x40045703 WDIOC_GETTIMELEFT = 0x4004570a WDIOC_GETTIMEOUT = 0x40045707 WDIOC_KEEPALIVE = 0x40045705 WDIOC_SETOPTIONS = 0x40045704 WORDSIZE = 0x40 XCASE = 0x4 XTABS = 0x1800 _HIDIOCGRAWNAME = 0x40804804 _HIDIOCGRAWPHYS = 0x40404805 _HIDIOCGRAWUNIQ = 0x40404808 ) // Errors const ( EADDRINUSE = syscall.Errno(0x7d) EADDRNOTAVAIL = syscall.Errno(0x7e) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x7c) EALREADY = syscall.Errno(0x95) EBADE = syscall.Errno(0x32) EBADFD = syscall.Errno(0x51) EBADMSG = syscall.Errno(0x4d) EBADR = syscall.Errno(0x33) EBADRQC = syscall.Errno(0x36) EBADSLT = syscall.Errno(0x37) EBFONT = syscall.Errno(0x3b) ECANCELED = syscall.Errno(0x9e) 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) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x46d) EHOSTDOWN = syscall.Errno(0x93) EHOSTUNREACH = syscall.Errno(0x94) EHWPOISON = syscall.Errno(0xa8) EIDRM = syscall.Errno(0x24) EILSEQ = syscall.Errno(0x58) EINIT = syscall.Errno(0x8d) EINPROGRESS = syscall.Errno(0x96) EISCONN = syscall.Errno(0x85) EISNAM = syscall.Errno(0x8b) EKEYEXPIRED = syscall.Errno(0xa2) EKEYREJECTED = syscall.Errno(0xa4) EKEYREVOKED = syscall.Errno(0xa3) 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) ELOOP = syscall.Errno(0x5a) EMEDIUMTYPE = syscall.Errno(0xa0) EMSGSIZE = syscall.Errno(0x61) EMULTIHOP = syscall.Errno(0x4a) ENAMETOOLONG = syscall.Errno(0x4e) ENAVAIL = syscall.Errno(0x8a) ENETDOWN = syscall.Errno(0x7f) ENETRESET = syscall.Errno(0x81) ENETUNREACH = syscall.Errno(0x80) ENOANO = syscall.Errno(0x35) ENOBUFS = syscall.Errno(0x84) ENOCSI = syscall.Errno(0x2b) ENODATA = syscall.Errno(0x3d) ENOKEY = syscall.Errno(0xa1) ENOLCK = syscall.Errno(0x2e) ENOLINK = syscall.Errno(0x43) ENOMEDIUM = syscall.Errno(0x9f) ENOMSG = syscall.Errno(0x23) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x63) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x59) ENOTCONN = syscall.Errno(0x86) ENOTEMPTY = syscall.Errno(0x5d) ENOTNAM = syscall.Errno(0x89) ENOTRECOVERABLE = syscall.Errno(0xa6) ENOTSOCK = syscall.Errno(0x5f) ENOTSUP = syscall.Errno(0x7a) ENOTUNIQ = syscall.Errno(0x50) EOPNOTSUPP = syscall.Errno(0x7a) EOVERFLOW = syscall.Errno(0x4f) EOWNERDEAD = syscall.Errno(0xa5) EPFNOSUPPORT = syscall.Errno(0x7b) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x78) EPROTOTYPE = syscall.Errno(0x62) EREMCHG = syscall.Errno(0x52) EREMDEV = syscall.Errno(0x8e) EREMOTE = syscall.Errno(0x42) EREMOTEIO = syscall.Errno(0x8c) ERESTART = syscall.Errno(0x5b) ERFKILL = syscall.Errno(0xa7) ESHUTDOWN = syscall.Errno(0x8f) ESOCKTNOSUPPORT = syscall.Errno(0x79) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x97) ESTRPIPE = syscall.Errno(0x5c) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x91) ETOOMANYREFS = syscall.Errno(0x90) EUCLEAN = syscall.Errno(0x87) EUNATCH = syscall.Errno(0x2a) EUSERS = syscall.Errno(0x5e) EXFULL = syscall.Errno(0x34) ) // Signals const ( SIGBUS = syscall.Signal(0xa) SIGCHLD = syscall.Signal(0x12) SIGCLD = syscall.Signal(0x12) SIGCONT = syscall.Signal(0x19) SIGEMT = syscall.Signal(0x7) SIGIO = syscall.Signal(0x16) SIGPOLL = syscall.Signal(0x16) SIGPROF = syscall.Signal(0x1d) SIGPWR = syscall.Signal(0x13) SIGSTOP = syscall.Signal(0x17) SIGSYS = syscall.Signal(0xc) 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) SIGWINCH = syscall.Signal(0x14) SIGXCPU = syscall.Signal(0x1e) SIGXFSZ = syscall.Signal(0x1f) ) // Error table var errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "no such device or address"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EAGAIN", "resource temporarily unavailable"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device or resource busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "invalid cross-device link"}, {19, "ENODEV", "no such device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "numerical result out of range"}, {35, "ENOMSG", "no message of desired type"}, {36, "EIDRM", "identifier removed"}, {37, "ECHRNG", "channel number out of range"}, {38, "EL2NSYNC", "level 2 not synchronized"}, {39, "EL3HLT", "level 3 halted"}, {40, "EL3RST", "level 3 reset"}, {41, "ELNRNG", "link number out of range"}, {42, "EUNATCH", "protocol driver not attached"}, {43, "ENOCSI", "no CSI structure available"}, {44, "EL2HLT", "level 2 halted"}, {45, "EDEADLK", "resource deadlock avoided"}, {46, "ENOLCK", "no locks available"}, {50, "EBADE", "invalid exchange"}, {51, "EBADR", "invalid request descriptor"}, {52, "EXFULL", "exchange full"}, {53, "ENOANO", "no anode"}, {54, "EBADRQC", "invalid request code"}, {55, "EBADSLT", "invalid slot"}, {56, "EDEADLOCK", "file locking deadlock error"}, {59, "EBFONT", "bad font file format"}, {60, "ENOSTR", "device not a stream"}, {61, "ENODATA", "no data available"}, {62, "ETIME", "timer expired"}, {63, "ENOSR", "out of streams resources"}, {64, "ENONET", "machine is not on the network"}, {65, "ENOPKG", "package not installed"}, {66, "EREMOTE", "object is remote"}, {67, "ENOLINK", "link has been severed"}, {68, "EADV", "advertise error"}, {69, "ESRMNT", "srmount error"}, {70, "ECOMM", "communication error on send"}, {71, "EPROTO", "protocol error"}, {73, "EDOTDOT", "RFS specific error"}, {74, "EMULTIHOP", "multihop attempted"}, {77, "EBADMSG", "bad message"}, {78, "ENAMETOOLONG", "file name too long"}, {79, "EOVERFLOW", "value too large for defined data type"}, {80, "ENOTUNIQ", "name not unique on network"}, {81, "EBADFD", "file descriptor in bad state"}, {82, "EREMCHG", "remote address changed"}, {83, "ELIBACC", "can not access a needed shared library"}, {84, "ELIBBAD", "accessing a corrupted shared library"}, {85, "ELIBSCN", ".lib section in a.out corrupted"}, {86, "ELIBMAX", "attempting to link in too many shared libraries"}, {87, "ELIBEXEC", "cannot exec a shared library directly"}, {88, "EILSEQ", "invalid or incomplete multibyte or wide character"}, {89, "ENOSYS", "function not implemented"}, {90, "ELOOP", "too many levels of symbolic links"}, {91, "ERESTART", "interrupted system call should be restarted"}, {92, "ESTRPIPE", "streams pipe error"}, {93, "ENOTEMPTY", "directory not empty"}, {94, "EUSERS", "too many users"}, {95, "ENOTSOCK", "socket operation on non-socket"}, {96, "EDESTADDRREQ", "destination address required"}, {97, "EMSGSIZE", "message too long"}, {98, "EPROTOTYPE", "protocol wrong type for socket"}, {99, "ENOPROTOOPT", "protocol not available"}, {120, "EPROTONOSUPPORT", "protocol not supported"}, {121, "ESOCKTNOSUPPORT", "socket type not supported"}, {122, "ENOTSUP", "operation not supported"}, {123, "EPFNOSUPPORT", "protocol family not supported"}, {124, "EAFNOSUPPORT", "address family not supported by protocol"}, {125, "EADDRINUSE", "address already in use"}, {126, "EADDRNOTAVAIL", "cannot assign requested address"}, {127, "ENETDOWN", "network is down"}, {128, "ENETUNREACH", "network is unreachable"}, {129, "ENETRESET", "network dropped connection on reset"}, {130, "ECONNABORTED", "software caused connection abort"}, {131, "ECONNRESET", "connection reset by peer"}, {132, "ENOBUFS", "no buffer space available"}, {133, "EISCONN", "transport endpoint is already connected"}, {134, "ENOTCONN", "transport endpoint is not connected"}, {135, "EUCLEAN", "structure needs cleaning"}, {137, "ENOTNAM", "not a XENIX named type file"}, {138, "ENAVAIL", "no XENIX semaphores available"}, {139, "EISNAM", "is a named type file"}, {140, "EREMOTEIO", "remote I/O error"}, {141, "EINIT", "unknown error 141"}, {142, "EREMDEV", "unknown error 142"}, {143, "ESHUTDOWN", "cannot send after transport endpoint shutdown"}, {144, "ETOOMANYREFS", "too many references: cannot splice"}, {145, "ETIMEDOUT", "connection timed out"}, {146, "ECONNREFUSED", "connection refused"}, {147, "EHOSTDOWN", "host is down"}, {148, "EHOSTUNREACH", "no route to host"}, {149, "EALREADY", "operation already in progress"}, {150, "EINPROGRESS", "operation now in progress"}, {151, "ESTALE", "stale file handle"}, {158, "ECANCELED", "operation canceled"}, {159, "ENOMEDIUM", "no medium found"}, {160, "EMEDIUMTYPE", "wrong medium type"}, {161, "ENOKEY", "required key not available"}, {162, "EKEYEXPIRED", "key has expired"}, {163, "EKEYREVOKED", "key has been revoked"}, {164, "EKEYREJECTED", "key was rejected by service"}, {165, "EOWNERDEAD", "owner died"}, {166, "ENOTRECOVERABLE", "state not recoverable"}, {167, "ERFKILL", "operation not possible due to RF-kill"}, {168, "EHWPOISON", "memory page has hardware error"}, {1133, "EDQUOT", "disk quota exceeded"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/breakpoint trap"}, {6, "SIGABRT", "aborted"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGUSR1", "user defined signal 1"}, {17, "SIGUSR2", "user defined signal 2"}, {18, "SIGCHLD", "child exited"}, {19, "SIGPWR", "power failure"}, {20, "SIGWINCH", "window changed"}, {21, "SIGURG", "urgent I/O condition"}, {22, "SIGIO", "I/O possible"}, {23, "SIGSTOP", "stopped (signal)"}, {24, "SIGTSTP", "stopped"}, {25, "SIGCONT", "continued"}, {26, "SIGTTIN", "stopped (tty input)"}, {27, "SIGTTOU", "stopped (tty output)"}, {28, "SIGVTALRM", "virtual timer expired"}, {29, "SIGPROF", "profiling timer expired"}, {30, "SIGXCPU", "CPU time limit exceeded"}, {31, "SIGXFSZ", "file size limit exceeded"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go ================================================ // mkerrors.sh -Wall -Werror -static -I/tmp/mips64le/include // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64le && linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/mips64le/include _const.go package unix import "syscall" const ( B1000000 = 0x1008 B115200 = 0x1002 B1152000 = 0x1009 B1500000 = 0x100a B2000000 = 0x100b B230400 = 0x1003 B2500000 = 0x100c B3000000 = 0x100d B3500000 = 0x100e B4000000 = 0x100f B460800 = 0x1004 B500000 = 0x1005 B57600 = 0x1001 B576000 = 0x1006 B921600 = 0x1007 BLKALIGNOFF = 0x2000127a BLKBSZGET = 0x40081270 BLKBSZSET = 0x80081271 BLKDISCARD = 0x20001277 BLKDISCARDZEROES = 0x2000127c BLKFLSBUF = 0x20001261 BLKFRAGET = 0x20001265 BLKFRASET = 0x20001264 BLKGETDISKSEQ = 0x40081280 BLKGETSIZE = 0x20001260 BLKGETSIZE64 = 0x40081272 BLKIOMIN = 0x20001278 BLKIOOPT = 0x20001279 BLKPBSZGET = 0x2000127b BLKRAGET = 0x20001263 BLKRASET = 0x20001262 BLKROGET = 0x2000125e BLKROSET = 0x2000125d BLKROTATIONAL = 0x2000127e BLKRRPART = 0x2000125f BLKSECDISCARD = 0x2000127d BLKSECTGET = 0x20001267 BLKSECTSET = 0x20001266 BLKSSZGET = 0x20001268 BLKZEROOUT = 0x2000127f BOTHER = 0x1000 BS1 = 0x2000 BSDLY = 0x2000 CBAUD = 0x100f CBAUDEX = 0x1000 CIBAUD = 0x100f0000 CLOCAL = 0x800 CR1 = 0x200 CR2 = 0x400 CR3 = 0x600 CRDLY = 0x600 CREAD = 0x80 CS6 = 0x10 CS7 = 0x20 CS8 = 0x30 CSIZE = 0x30 CSTOPB = 0x40 ECCGETLAYOUT = 0x41484d11 ECCGETSTATS = 0x40104d12 ECHOCTL = 0x200 ECHOE = 0x10 ECHOK = 0x20 ECHOKE = 0x800 ECHONL = 0x40 ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x80 EPIOCGPARAMS = 0x40088a02 EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 FFDLY = 0x8000 FICLONE = 0x80049409 FICLONERANGE = 0x8020940d FLUSHO = 0x2000 FS_IOC_ENABLE_VERITY = 0x80806685 FS_IOC_GETFLAGS = 0x40086601 FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 FS_IOC_SETFLAGS = 0x80086602 FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 F_GETLK = 0xe F_GETLK64 = 0xe F_GETOWN = 0x17 F_RDLCK = 0x0 F_SETLK = 0x6 F_SETLK64 = 0x6 F_SETLKW = 0x7 F_SETLKW64 = 0x7 F_SETOWN = 0x18 F_UNLCK = 0x2 F_WRLCK = 0x1 HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x100 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x80 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 ISIG = 0x1 IUCLC = 0x200 IXOFF = 0x1000 IXON = 0x400 MAP_ANON = 0x800 MAP_ANONYMOUS = 0x800 MAP_DENYWRITE = 0x2000 MAP_EXECUTABLE = 0x4000 MAP_GROWSDOWN = 0x1000 MAP_HUGETLB = 0x80000 MAP_LOCKED = 0x8000 MAP_NONBLOCK = 0x20000 MAP_NORESERVE = 0x400 MAP_POPULATE = 0x10000 MAP_RENAME = 0x800 MAP_STACK = 0x40000 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MCL_ONFAULT = 0x4 MEMERASE = 0x80084d02 MEMERASE64 = 0x80104d14 MEMGETBADBLOCK = 0x80084d0b MEMGETINFO = 0x40204d01 MEMGETOOBSEL = 0x40c84d0a MEMGETREGIONCOUNT = 0x40044d07 MEMISLOCKED = 0x40084d17 MEMLOCK = 0x80084d05 MEMREAD = 0xc0404d1a MEMREADOOB = 0xc0104d04 MEMSETBADBLOCK = 0x80084d0c MEMUNLOCK = 0x80084d06 MEMWRITEOOB = 0xc0104d03 MTDFILEMODE = 0x20004d13 NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 NS_GET_USERNS = 0x2000b701 OLCUC = 0x2 ONLCR = 0x4 OTPERASE = 0x800c4d19 OTPGETREGIONCOUNT = 0x80044d0e OTPGETREGIONINFO = 0x800c4d0f OTPLOCK = 0x400c4d10 OTPSELECT = 0x40044d0d O_APPEND = 0x8 O_ASYNC = 0x1000 O_CLOEXEC = 0x80000 O_CREAT = 0x100 O_DIRECT = 0x8000 O_DIRECTORY = 0x10000 O_DSYNC = 0x10 O_EXCL = 0x400 O_FSYNC = 0x4010 O_LARGEFILE = 0x0 O_NDELAY = 0x80 O_NOATIME = 0x40000 O_NOCTTY = 0x800 O_NOFOLLOW = 0x20000 O_NONBLOCK = 0x80 O_PATH = 0x200000 O_RSYNC = 0x4010 O_SYNC = 0x4010 O_TMPFILE = 0x410000 O_TRUNC = 0x200 PARENB = 0x100 PARODD = 0x200 PENDIN = 0x4000 PERF_EVENT_IOC_DISABLE = 0x20002401 PERF_EVENT_IOC_ENABLE = 0x20002400 PERF_EVENT_IOC_ID = 0x40082407 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409 PERF_EVENT_IOC_PERIOD = 0x80082404 PERF_EVENT_IOC_QUERY_BPF = 0xc008240a PERF_EVENT_IOC_REFRESH = 0x20002402 PERF_EVENT_IOC_RESET = 0x20002403 PERF_EVENT_IOC_SET_BPF = 0x80042408 PERF_EVENT_IOC_SET_FILTER = 0x80082406 PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 PPPIOCATTACH = 0x8004743d PPPIOCATTCHAN = 0x80047438 PPPIOCBRIDGECHAN = 0x80047435 PPPIOCCONNECT = 0x8004743a PPPIOCDETACH = 0x8004743c PPPIOCDISCONN = 0x20007439 PPPIOCGASYNCMAP = 0x40047458 PPPIOCGCHAN = 0x40047437 PPPIOCGDEBUG = 0x40047441 PPPIOCGFLAGS = 0x4004745a PPPIOCGIDLE = 0x4010743f PPPIOCGIDLE32 = 0x4008743f PPPIOCGIDLE64 = 0x4010743f PPPIOCGL2TPSTATS = 0x40487436 PPPIOCGMRU = 0x40047453 PPPIOCGRASYNCMAP = 0x40047455 PPPIOCGUNIT = 0x40047456 PPPIOCGXASYNCMAP = 0x40207450 PPPIOCSACTIVE = 0x80107446 PPPIOCSASYNCMAP = 0x80047457 PPPIOCSCOMPRESS = 0x8010744d PPPIOCSDEBUG = 0x80047440 PPPIOCSFLAGS = 0x80047459 PPPIOCSMAXCID = 0x80047451 PPPIOCSMRRU = 0x8004743b PPPIOCSMRU = 0x80047452 PPPIOCSNPMODE = 0x8008744b PPPIOCSPASS = 0x80107447 PPPIOCSRASYNCMAP = 0x80047454 PPPIOCSXASYNCMAP = 0x8020744f PPPIOCUNBRIDGECHAN = 0x20007434 PPPIOCXFERUNIT = 0x2000744e PR_SET_PTRACER_ANY = 0xffffffffffffffff PTRACE_GETFPREGS = 0xe PTRACE_GET_THREAD_AREA = 0x19 PTRACE_GET_THREAD_AREA_3264 = 0xc4 PTRACE_GET_WATCH_REGS = 0xd0 PTRACE_OLDSETOPTIONS = 0x15 PTRACE_PEEKDATA_3264 = 0xc1 PTRACE_PEEKTEXT_3264 = 0xc0 PTRACE_POKEDATA_3264 = 0xc3 PTRACE_POKETEXT_3264 = 0xc2 PTRACE_SETFPREGS = 0xf PTRACE_SET_THREAD_AREA = 0x1a PTRACE_SET_WATCH_REGS = 0xd1 RLIMIT_AS = 0x6 RLIMIT_MEMLOCK = 0x9 RLIMIT_NOFILE = 0x5 RLIMIT_NPROC = 0x8 RLIMIT_RSS = 0x7 RNDADDENTROPY = 0x80085203 RNDADDTOENTCNT = 0x80045201 RNDCLEARPOOL = 0x20005206 RNDGETENTCNT = 0x40045200 RNDGETPOOL = 0x40085202 RNDRESEEDCRNG = 0x20005207 RNDZAPENTCNT = 0x20005204 RTC_AIE_OFF = 0x20007002 RTC_AIE_ON = 0x20007001 RTC_ALM_READ = 0x40247008 RTC_ALM_SET = 0x80247007 RTC_EPOCH_READ = 0x4008700d RTC_EPOCH_SET = 0x8008700e RTC_IRQP_READ = 0x4008700b RTC_IRQP_SET = 0x8008700c RTC_PARAM_GET = 0x80187013 RTC_PARAM_SET = 0x80187014 RTC_PIE_OFF = 0x20007006 RTC_PIE_ON = 0x20007005 RTC_PLL_GET = 0x40207011 RTC_PLL_SET = 0x80207012 RTC_RD_TIME = 0x40247009 RTC_SET_TIME = 0x8024700a RTC_UIE_OFF = 0x20007004 RTC_UIE_ON = 0x20007003 RTC_VL_CLR = 0x20007014 RTC_VL_READ = 0x40047013 RTC_WIE_OFF = 0x20007010 RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x80 SIOCATMARK = 0x40047307 SIOCGPGRP = 0x40047309 SIOCGSTAMPNS_NEW = 0x40108907 SIOCGSTAMP_NEW = 0x40108906 SIOCINQ = 0x467f SIOCOUTQ = 0x7472 SIOCSPGRP = 0x80047308 SOCK_CLOEXEC = 0x80000 SOCK_DGRAM = 0x1 SOCK_NONBLOCK = 0x80 SOCK_STREAM = 0x2 SOL_SOCKET = 0xffff SO_ACCEPTCONN = 0x1009 SO_ATTACH_BPF = 0x32 SO_ATTACH_REUSEPORT_CBPF = 0x33 SO_ATTACH_REUSEPORT_EBPF = 0x34 SO_BINDTODEVICE = 0x19 SO_BINDTOIFINDEX = 0x3e SO_BPF_EXTENSIONS = 0x30 SO_BROADCAST = 0x20 SO_BSDCOMPAT = 0xe SO_BUF_LOCK = 0x48 SO_BUSY_POLL = 0x2e SO_BUSY_POLL_BUDGET = 0x46 SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 SO_DOMAIN = 0x1029 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f SO_MEMINFO = 0x37 SO_NETNS_COOKIE = 0x47 SO_NOFCS = 0x2b SO_OOBINLINE = 0x100 SO_PASSCRED = 0x11 SO_PASSPIDFD = 0x4c SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x12 SO_PEERGROUPS = 0x3b SO_PEERPIDFD = 0x4d SO_PEERSEC = 0x1e SO_PREFER_BUSY_POLL = 0x45 SO_PROTOCOL = 0x1028 SO_RCVBUF = 0x1002 SO_RCVBUFFORCE = 0x21 SO_RCVLOWAT = 0x1004 SO_RCVMARK = 0x4b SO_RCVTIMEO = 0x1006 SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_OLD = 0x1006 SO_RESERVE_MEM = 0x49 SO_REUSEADDR = 0x4 SO_REUSEPORT = 0x200 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 = 0x1001 SO_SNDBUFFORCE = 0x1f SO_SNDLOWAT = 0x1003 SO_SNDTIMEO = 0x1005 SO_SNDTIMEO_NEW = 0x43 SO_SNDTIMEO_OLD = 0x1005 SO_STYLE = 0x1008 SO_TIMESTAMPING = 0x25 SO_TIMESTAMPING_NEW = 0x41 SO_TIMESTAMPING_OLD = 0x25 SO_TIMESTAMPNS = 0x23 SO_TIMESTAMPNS_NEW = 0x40 SO_TIMESTAMPNS_OLD = 0x23 SO_TIMESTAMP_NEW = 0x3f SO_TXREHASH = 0x4a SO_TXTIME = 0x3d SO_TYPE = 0x1008 SO_WIFI_STATUS = 0x29 SO_ZEROCOPY = 0x3c TAB1 = 0x800 TAB2 = 0x1000 TAB3 = 0x1800 TABDLY = 0x1800 TCFLSH = 0x5407 TCGETA = 0x5401 TCGETS = 0x540d TCGETS2 = 0x4030542a TCSAFLUSH = 0x5410 TCSBRK = 0x5405 TCSBRKP = 0x5486 TCSETA = 0x5402 TCSETAF = 0x5404 TCSETAW = 0x5403 TCSETS = 0x540e TCSETS2 = 0x8030542b TCSETSF = 0x5410 TCSETSF2 = 0x8030542d TCSETSW = 0x540f TCSETSW2 = 0x8030542c TCXONC = 0x5406 TFD_CLOEXEC = 0x80000 TFD_NONBLOCK = 0x80 TIOCCBRK = 0x5428 TIOCCONS = 0x80047478 TIOCEXCL = 0x740d TIOCGDEV = 0x40045432 TIOCGETD = 0x7400 TIOCGETP = 0x7408 TIOCGEXCL = 0x40045440 TIOCGICOUNT = 0x5492 TIOCGISO7816 = 0x40285442 TIOCGLCKTRMIOS = 0x548b TIOCGLTC = 0x7474 TIOCGPGRP = 0x40047477 TIOCGPKT = 0x40045438 TIOCGPTLCK = 0x40045439 TIOCGPTN = 0x40045430 TIOCGPTPEER = 0x20005441 TIOCGRS485 = 0x4020542e TIOCGSERIAL = 0x5484 TIOCGSID = 0x7416 TIOCGSOFTCAR = 0x5481 TIOCGWINSZ = 0x40087468 TIOCINQ = 0x467f TIOCLINUX = 0x5483 TIOCMBIC = 0x741c TIOCMBIS = 0x741b TIOCMGET = 0x741d TIOCMIWAIT = 0x5491 TIOCMSET = 0x741a TIOCM_CAR = 0x100 TIOCM_CD = 0x100 TIOCM_CTS = 0x40 TIOCM_DSR = 0x400 TIOCM_RI = 0x200 TIOCM_RNG = 0x200 TIOCM_SR = 0x20 TIOCM_ST = 0x10 TIOCNOTTY = 0x5471 TIOCNXCL = 0x740e TIOCOUTQ = 0x7472 TIOCPKT = 0x5470 TIOCSBRK = 0x5427 TIOCSCTTY = 0x5480 TIOCSERCONFIG = 0x5488 TIOCSERGETLSR = 0x548e TIOCSERGETMULTI = 0x548f TIOCSERGSTRUCT = 0x548d TIOCSERGWILD = 0x5489 TIOCSERSETMULTI = 0x5490 TIOCSERSWILD = 0x548a TIOCSER_TEMT = 0x1 TIOCSETD = 0x7401 TIOCSETN = 0x740a TIOCSETP = 0x7409 TIOCSIG = 0x80045436 TIOCSISO7816 = 0xc0285443 TIOCSLCKTRMIOS = 0x548c TIOCSLTC = 0x7475 TIOCSPGRP = 0x80047476 TIOCSPTLCK = 0x80045431 TIOCSRS485 = 0xc020542f TIOCSSERIAL = 0x5485 TIOCSSOFTCAR = 0x5482 TIOCSTI = 0x5472 TIOCSWINSZ = 0x80087467 TIOCVHANGUP = 0x5437 TOSTOP = 0x8000 TUNATTACHFILTER = 0x801054d5 TUNDETACHFILTER = 0x801054d6 TUNGETDEVNETNS = 0x200054e3 TUNGETFEATURES = 0x400454cf TUNGETFILTER = 0x401054db TUNGETIFF = 0x400454d2 TUNGETSNDBUF = 0x400454d3 TUNGETVNETBE = 0x400454df TUNGETVNETHDRSZ = 0x400454d7 TUNGETVNETLE = 0x400454dd TUNSETCARRIER = 0x800454e2 TUNSETDEBUG = 0x800454c9 TUNSETFILTEREBPF = 0x400454e1 TUNSETGROUP = 0x800454ce TUNSETIFF = 0x800454ca TUNSETIFINDEX = 0x800454da TUNSETLINK = 0x800454cd TUNSETNOCSUM = 0x800454c8 TUNSETOFFLOAD = 0x800454d0 TUNSETOWNER = 0x800454cc TUNSETPERSIST = 0x800454cb TUNSETQUEUE = 0x800454d9 TUNSETSNDBUF = 0x800454d4 TUNSETSTEERINGEBPF = 0x400454e0 TUNSETTXFILTER = 0x800454d1 TUNSETVNETBE = 0x800454de TUNSETVNETHDRSZ = 0x800454d8 TUNSETVNETLE = 0x800454dc UBI_IOCATT = 0x80186f40 UBI_IOCDET = 0x80046f41 UBI_IOCEBCH = 0x80044f02 UBI_IOCEBER = 0x80044f01 UBI_IOCEBISMAP = 0x40044f05 UBI_IOCEBMAP = 0x80084f03 UBI_IOCEBUNMAP = 0x80044f04 UBI_IOCMKVOL = 0x80986f00 UBI_IOCRMVOL = 0x80046f01 UBI_IOCRNVOL = 0x91106f03 UBI_IOCRPEB = 0x80046f04 UBI_IOCRSVOL = 0x800c6f02 UBI_IOCSETVOLPROP = 0x80104f06 UBI_IOCSPEB = 0x80046f05 UBI_IOCVOLCRBLK = 0x80804f07 UBI_IOCVOLRMBLK = 0x20004f08 UBI_IOCVOLUP = 0x80084f00 VDISCARD = 0xd VEOF = 0x10 VEOL = 0x11 VEOL2 = 0x6 VMIN = 0x4 VREPRINT = 0xc VSTART = 0x8 VSTOP = 0x9 VSUSP = 0xa VSWTC = 0x7 VSWTCH = 0x7 VT1 = 0x4000 VTDLY = 0x4000 VTIME = 0x5 VWERASE = 0xe WDIOC_GETBOOTSTATUS = 0x40045702 WDIOC_GETPRETIMEOUT = 0x40045709 WDIOC_GETSTATUS = 0x40045701 WDIOC_GETSUPPORT = 0x40285700 WDIOC_GETTEMP = 0x40045703 WDIOC_GETTIMELEFT = 0x4004570a WDIOC_GETTIMEOUT = 0x40045707 WDIOC_KEEPALIVE = 0x40045705 WDIOC_SETOPTIONS = 0x40045704 WORDSIZE = 0x40 XCASE = 0x4 XTABS = 0x1800 _HIDIOCGRAWNAME = 0x40804804 _HIDIOCGRAWPHYS = 0x40404805 _HIDIOCGRAWUNIQ = 0x40404808 ) // Errors const ( EADDRINUSE = syscall.Errno(0x7d) EADDRNOTAVAIL = syscall.Errno(0x7e) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x7c) EALREADY = syscall.Errno(0x95) EBADE = syscall.Errno(0x32) EBADFD = syscall.Errno(0x51) EBADMSG = syscall.Errno(0x4d) EBADR = syscall.Errno(0x33) EBADRQC = syscall.Errno(0x36) EBADSLT = syscall.Errno(0x37) EBFONT = syscall.Errno(0x3b) ECANCELED = syscall.Errno(0x9e) 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) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x46d) EHOSTDOWN = syscall.Errno(0x93) EHOSTUNREACH = syscall.Errno(0x94) EHWPOISON = syscall.Errno(0xa8) EIDRM = syscall.Errno(0x24) EILSEQ = syscall.Errno(0x58) EINIT = syscall.Errno(0x8d) EINPROGRESS = syscall.Errno(0x96) EISCONN = syscall.Errno(0x85) EISNAM = syscall.Errno(0x8b) EKEYEXPIRED = syscall.Errno(0xa2) EKEYREJECTED = syscall.Errno(0xa4) EKEYREVOKED = syscall.Errno(0xa3) 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) ELOOP = syscall.Errno(0x5a) EMEDIUMTYPE = syscall.Errno(0xa0) EMSGSIZE = syscall.Errno(0x61) EMULTIHOP = syscall.Errno(0x4a) ENAMETOOLONG = syscall.Errno(0x4e) ENAVAIL = syscall.Errno(0x8a) ENETDOWN = syscall.Errno(0x7f) ENETRESET = syscall.Errno(0x81) ENETUNREACH = syscall.Errno(0x80) ENOANO = syscall.Errno(0x35) ENOBUFS = syscall.Errno(0x84) ENOCSI = syscall.Errno(0x2b) ENODATA = syscall.Errno(0x3d) ENOKEY = syscall.Errno(0xa1) ENOLCK = syscall.Errno(0x2e) ENOLINK = syscall.Errno(0x43) ENOMEDIUM = syscall.Errno(0x9f) ENOMSG = syscall.Errno(0x23) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x63) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x59) ENOTCONN = syscall.Errno(0x86) ENOTEMPTY = syscall.Errno(0x5d) ENOTNAM = syscall.Errno(0x89) ENOTRECOVERABLE = syscall.Errno(0xa6) ENOTSOCK = syscall.Errno(0x5f) ENOTSUP = syscall.Errno(0x7a) ENOTUNIQ = syscall.Errno(0x50) EOPNOTSUPP = syscall.Errno(0x7a) EOVERFLOW = syscall.Errno(0x4f) EOWNERDEAD = syscall.Errno(0xa5) EPFNOSUPPORT = syscall.Errno(0x7b) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x78) EPROTOTYPE = syscall.Errno(0x62) EREMCHG = syscall.Errno(0x52) EREMDEV = syscall.Errno(0x8e) EREMOTE = syscall.Errno(0x42) EREMOTEIO = syscall.Errno(0x8c) ERESTART = syscall.Errno(0x5b) ERFKILL = syscall.Errno(0xa7) ESHUTDOWN = syscall.Errno(0x8f) ESOCKTNOSUPPORT = syscall.Errno(0x79) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x97) ESTRPIPE = syscall.Errno(0x5c) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x91) ETOOMANYREFS = syscall.Errno(0x90) EUCLEAN = syscall.Errno(0x87) EUNATCH = syscall.Errno(0x2a) EUSERS = syscall.Errno(0x5e) EXFULL = syscall.Errno(0x34) ) // Signals const ( SIGBUS = syscall.Signal(0xa) SIGCHLD = syscall.Signal(0x12) SIGCLD = syscall.Signal(0x12) SIGCONT = syscall.Signal(0x19) SIGEMT = syscall.Signal(0x7) SIGIO = syscall.Signal(0x16) SIGPOLL = syscall.Signal(0x16) SIGPROF = syscall.Signal(0x1d) SIGPWR = syscall.Signal(0x13) SIGSTOP = syscall.Signal(0x17) SIGSYS = syscall.Signal(0xc) 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) SIGWINCH = syscall.Signal(0x14) SIGXCPU = syscall.Signal(0x1e) SIGXFSZ = syscall.Signal(0x1f) ) // Error table var errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "no such device or address"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EAGAIN", "resource temporarily unavailable"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device or resource busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "invalid cross-device link"}, {19, "ENODEV", "no such device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "numerical result out of range"}, {35, "ENOMSG", "no message of desired type"}, {36, "EIDRM", "identifier removed"}, {37, "ECHRNG", "channel number out of range"}, {38, "EL2NSYNC", "level 2 not synchronized"}, {39, "EL3HLT", "level 3 halted"}, {40, "EL3RST", "level 3 reset"}, {41, "ELNRNG", "link number out of range"}, {42, "EUNATCH", "protocol driver not attached"}, {43, "ENOCSI", "no CSI structure available"}, {44, "EL2HLT", "level 2 halted"}, {45, "EDEADLK", "resource deadlock avoided"}, {46, "ENOLCK", "no locks available"}, {50, "EBADE", "invalid exchange"}, {51, "EBADR", "invalid request descriptor"}, {52, "EXFULL", "exchange full"}, {53, "ENOANO", "no anode"}, {54, "EBADRQC", "invalid request code"}, {55, "EBADSLT", "invalid slot"}, {56, "EDEADLOCK", "file locking deadlock error"}, {59, "EBFONT", "bad font file format"}, {60, "ENOSTR", "device not a stream"}, {61, "ENODATA", "no data available"}, {62, "ETIME", "timer expired"}, {63, "ENOSR", "out of streams resources"}, {64, "ENONET", "machine is not on the network"}, {65, "ENOPKG", "package not installed"}, {66, "EREMOTE", "object is remote"}, {67, "ENOLINK", "link has been severed"}, {68, "EADV", "advertise error"}, {69, "ESRMNT", "srmount error"}, {70, "ECOMM", "communication error on send"}, {71, "EPROTO", "protocol error"}, {73, "EDOTDOT", "RFS specific error"}, {74, "EMULTIHOP", "multihop attempted"}, {77, "EBADMSG", "bad message"}, {78, "ENAMETOOLONG", "file name too long"}, {79, "EOVERFLOW", "value too large for defined data type"}, {80, "ENOTUNIQ", "name not unique on network"}, {81, "EBADFD", "file descriptor in bad state"}, {82, "EREMCHG", "remote address changed"}, {83, "ELIBACC", "can not access a needed shared library"}, {84, "ELIBBAD", "accessing a corrupted shared library"}, {85, "ELIBSCN", ".lib section in a.out corrupted"}, {86, "ELIBMAX", "attempting to link in too many shared libraries"}, {87, "ELIBEXEC", "cannot exec a shared library directly"}, {88, "EILSEQ", "invalid or incomplete multibyte or wide character"}, {89, "ENOSYS", "function not implemented"}, {90, "ELOOP", "too many levels of symbolic links"}, {91, "ERESTART", "interrupted system call should be restarted"}, {92, "ESTRPIPE", "streams pipe error"}, {93, "ENOTEMPTY", "directory not empty"}, {94, "EUSERS", "too many users"}, {95, "ENOTSOCK", "socket operation on non-socket"}, {96, "EDESTADDRREQ", "destination address required"}, {97, "EMSGSIZE", "message too long"}, {98, "EPROTOTYPE", "protocol wrong type for socket"}, {99, "ENOPROTOOPT", "protocol not available"}, {120, "EPROTONOSUPPORT", "protocol not supported"}, {121, "ESOCKTNOSUPPORT", "socket type not supported"}, {122, "ENOTSUP", "operation not supported"}, {123, "EPFNOSUPPORT", "protocol family not supported"}, {124, "EAFNOSUPPORT", "address family not supported by protocol"}, {125, "EADDRINUSE", "address already in use"}, {126, "EADDRNOTAVAIL", "cannot assign requested address"}, {127, "ENETDOWN", "network is down"}, {128, "ENETUNREACH", "network is unreachable"}, {129, "ENETRESET", "network dropped connection on reset"}, {130, "ECONNABORTED", "software caused connection abort"}, {131, "ECONNRESET", "connection reset by peer"}, {132, "ENOBUFS", "no buffer space available"}, {133, "EISCONN", "transport endpoint is already connected"}, {134, "ENOTCONN", "transport endpoint is not connected"}, {135, "EUCLEAN", "structure needs cleaning"}, {137, "ENOTNAM", "not a XENIX named type file"}, {138, "ENAVAIL", "no XENIX semaphores available"}, {139, "EISNAM", "is a named type file"}, {140, "EREMOTEIO", "remote I/O error"}, {141, "EINIT", "unknown error 141"}, {142, "EREMDEV", "unknown error 142"}, {143, "ESHUTDOWN", "cannot send after transport endpoint shutdown"}, {144, "ETOOMANYREFS", "too many references: cannot splice"}, {145, "ETIMEDOUT", "connection timed out"}, {146, "ECONNREFUSED", "connection refused"}, {147, "EHOSTDOWN", "host is down"}, {148, "EHOSTUNREACH", "no route to host"}, {149, "EALREADY", "operation already in progress"}, {150, "EINPROGRESS", "operation now in progress"}, {151, "ESTALE", "stale file handle"}, {158, "ECANCELED", "operation canceled"}, {159, "ENOMEDIUM", "no medium found"}, {160, "EMEDIUMTYPE", "wrong medium type"}, {161, "ENOKEY", "required key not available"}, {162, "EKEYEXPIRED", "key has expired"}, {163, "EKEYREVOKED", "key has been revoked"}, {164, "EKEYREJECTED", "key was rejected by service"}, {165, "EOWNERDEAD", "owner died"}, {166, "ENOTRECOVERABLE", "state not recoverable"}, {167, "ERFKILL", "operation not possible due to RF-kill"}, {168, "EHWPOISON", "memory page has hardware error"}, {1133, "EDQUOT", "disk quota exceeded"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/breakpoint trap"}, {6, "SIGABRT", "aborted"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGUSR1", "user defined signal 1"}, {17, "SIGUSR2", "user defined signal 2"}, {18, "SIGCHLD", "child exited"}, {19, "SIGPWR", "power failure"}, {20, "SIGWINCH", "window changed"}, {21, "SIGURG", "urgent I/O condition"}, {22, "SIGIO", "I/O possible"}, {23, "SIGSTOP", "stopped (signal)"}, {24, "SIGTSTP", "stopped"}, {25, "SIGCONT", "continued"}, {26, "SIGTTIN", "stopped (tty input)"}, {27, "SIGTTOU", "stopped (tty output)"}, {28, "SIGVTALRM", "virtual timer expired"}, {29, "SIGPROF", "profiling timer expired"}, {30, "SIGXCPU", "CPU time limit exceeded"}, {31, "SIGXFSZ", "file size limit exceeded"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go ================================================ // mkerrors.sh -Wall -Werror -static -I/tmp/mipsle/include // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mipsle && linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/mipsle/include _const.go package unix import "syscall" const ( B1000000 = 0x1008 B115200 = 0x1002 B1152000 = 0x1009 B1500000 = 0x100a B2000000 = 0x100b B230400 = 0x1003 B2500000 = 0x100c B3000000 = 0x100d B3500000 = 0x100e B4000000 = 0x100f B460800 = 0x1004 B500000 = 0x1005 B57600 = 0x1001 B576000 = 0x1006 B921600 = 0x1007 BLKALIGNOFF = 0x2000127a BLKBSZGET = 0x40041270 BLKBSZSET = 0x80041271 BLKDISCARD = 0x20001277 BLKDISCARDZEROES = 0x2000127c BLKFLSBUF = 0x20001261 BLKFRAGET = 0x20001265 BLKFRASET = 0x20001264 BLKGETDISKSEQ = 0x40081280 BLKGETSIZE = 0x20001260 BLKGETSIZE64 = 0x40041272 BLKIOMIN = 0x20001278 BLKIOOPT = 0x20001279 BLKPBSZGET = 0x2000127b BLKRAGET = 0x20001263 BLKRASET = 0x20001262 BLKROGET = 0x2000125e BLKROSET = 0x2000125d BLKROTATIONAL = 0x2000127e BLKRRPART = 0x2000125f BLKSECDISCARD = 0x2000127d BLKSECTGET = 0x20001267 BLKSECTSET = 0x20001266 BLKSSZGET = 0x20001268 BLKZEROOUT = 0x2000127f BOTHER = 0x1000 BS1 = 0x2000 BSDLY = 0x2000 CBAUD = 0x100f CBAUDEX = 0x1000 CIBAUD = 0x100f0000 CLOCAL = 0x800 CR1 = 0x200 CR2 = 0x400 CR3 = 0x600 CRDLY = 0x600 CREAD = 0x80 CS6 = 0x10 CS7 = 0x20 CS8 = 0x30 CSIZE = 0x30 CSTOPB = 0x40 ECCGETLAYOUT = 0x41484d11 ECCGETSTATS = 0x40104d12 ECHOCTL = 0x200 ECHOE = 0x10 ECHOK = 0x20 ECHOKE = 0x800 ECHONL = 0x40 ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x80 EPIOCGPARAMS = 0x40088a02 EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 FFDLY = 0x8000 FICLONE = 0x80049409 FICLONERANGE = 0x8020940d FLUSHO = 0x2000 FS_IOC_ENABLE_VERITY = 0x80806685 FS_IOC_GETFLAGS = 0x40046601 FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 FS_IOC_SETFLAGS = 0x80046602 FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 F_GETLK = 0x21 F_GETLK64 = 0x21 F_GETOWN = 0x17 F_RDLCK = 0x0 F_SETLK = 0x22 F_SETLK64 = 0x22 F_SETLKW = 0x23 F_SETLKW64 = 0x23 F_SETOWN = 0x18 F_UNLCK = 0x2 F_WRLCK = 0x1 HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x100 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x80 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 ISIG = 0x1 IUCLC = 0x200 IXOFF = 0x1000 IXON = 0x400 MAP_ANON = 0x800 MAP_ANONYMOUS = 0x800 MAP_DENYWRITE = 0x2000 MAP_EXECUTABLE = 0x4000 MAP_GROWSDOWN = 0x1000 MAP_HUGETLB = 0x80000 MAP_LOCKED = 0x8000 MAP_NONBLOCK = 0x20000 MAP_NORESERVE = 0x400 MAP_POPULATE = 0x10000 MAP_RENAME = 0x800 MAP_STACK = 0x40000 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MCL_ONFAULT = 0x4 MEMERASE = 0x80084d02 MEMERASE64 = 0x80104d14 MEMGETBADBLOCK = 0x80084d0b MEMGETINFO = 0x40204d01 MEMGETOOBSEL = 0x40c84d0a MEMGETREGIONCOUNT = 0x40044d07 MEMISLOCKED = 0x40084d17 MEMLOCK = 0x80084d05 MEMREAD = 0xc0404d1a MEMREADOOB = 0xc00c4d04 MEMSETBADBLOCK = 0x80084d0c MEMUNLOCK = 0x80084d06 MEMWRITEOOB = 0xc00c4d03 MTDFILEMODE = 0x20004d13 NFDBITS = 0x20 NLDLY = 0x100 NOFLSH = 0x80 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 NS_GET_USERNS = 0x2000b701 OLCUC = 0x2 ONLCR = 0x4 OTPERASE = 0x800c4d19 OTPGETREGIONCOUNT = 0x80044d0e OTPGETREGIONINFO = 0x800c4d0f OTPLOCK = 0x400c4d10 OTPSELECT = 0x40044d0d O_APPEND = 0x8 O_ASYNC = 0x1000 O_CLOEXEC = 0x80000 O_CREAT = 0x100 O_DIRECT = 0x8000 O_DIRECTORY = 0x10000 O_DSYNC = 0x10 O_EXCL = 0x400 O_FSYNC = 0x4010 O_LARGEFILE = 0x2000 O_NDELAY = 0x80 O_NOATIME = 0x40000 O_NOCTTY = 0x800 O_NOFOLLOW = 0x20000 O_NONBLOCK = 0x80 O_PATH = 0x200000 O_RSYNC = 0x4010 O_SYNC = 0x4010 O_TMPFILE = 0x410000 O_TRUNC = 0x200 PARENB = 0x100 PARODD = 0x200 PENDIN = 0x4000 PERF_EVENT_IOC_DISABLE = 0x20002401 PERF_EVENT_IOC_ENABLE = 0x20002400 PERF_EVENT_IOC_ID = 0x40042407 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8004240b PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409 PERF_EVENT_IOC_PERIOD = 0x80082404 PERF_EVENT_IOC_QUERY_BPF = 0xc004240a PERF_EVENT_IOC_REFRESH = 0x20002402 PERF_EVENT_IOC_RESET = 0x20002403 PERF_EVENT_IOC_SET_BPF = 0x80042408 PERF_EVENT_IOC_SET_FILTER = 0x80042406 PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 PPPIOCATTACH = 0x8004743d PPPIOCATTCHAN = 0x80047438 PPPIOCBRIDGECHAN = 0x80047435 PPPIOCCONNECT = 0x8004743a PPPIOCDETACH = 0x8004743c PPPIOCDISCONN = 0x20007439 PPPIOCGASYNCMAP = 0x40047458 PPPIOCGCHAN = 0x40047437 PPPIOCGDEBUG = 0x40047441 PPPIOCGFLAGS = 0x4004745a PPPIOCGIDLE = 0x4008743f PPPIOCGIDLE32 = 0x4008743f PPPIOCGIDLE64 = 0x4010743f PPPIOCGL2TPSTATS = 0x40487436 PPPIOCGMRU = 0x40047453 PPPIOCGRASYNCMAP = 0x40047455 PPPIOCGUNIT = 0x40047456 PPPIOCGXASYNCMAP = 0x40207450 PPPIOCSACTIVE = 0x80087446 PPPIOCSASYNCMAP = 0x80047457 PPPIOCSCOMPRESS = 0x800c744d PPPIOCSDEBUG = 0x80047440 PPPIOCSFLAGS = 0x80047459 PPPIOCSMAXCID = 0x80047451 PPPIOCSMRRU = 0x8004743b PPPIOCSMRU = 0x80047452 PPPIOCSNPMODE = 0x8008744b PPPIOCSPASS = 0x80087447 PPPIOCSRASYNCMAP = 0x80047454 PPPIOCSXASYNCMAP = 0x8020744f PPPIOCUNBRIDGECHAN = 0x20007434 PPPIOCXFERUNIT = 0x2000744e PR_SET_PTRACER_ANY = 0xffffffff PTRACE_GETFPREGS = 0xe PTRACE_GET_THREAD_AREA = 0x19 PTRACE_GET_THREAD_AREA_3264 = 0xc4 PTRACE_GET_WATCH_REGS = 0xd0 PTRACE_OLDSETOPTIONS = 0x15 PTRACE_PEEKDATA_3264 = 0xc1 PTRACE_PEEKTEXT_3264 = 0xc0 PTRACE_POKEDATA_3264 = 0xc3 PTRACE_POKETEXT_3264 = 0xc2 PTRACE_SETFPREGS = 0xf PTRACE_SET_THREAD_AREA = 0x1a PTRACE_SET_WATCH_REGS = 0xd1 RLIMIT_AS = 0x6 RLIMIT_MEMLOCK = 0x9 RLIMIT_NOFILE = 0x5 RLIMIT_NPROC = 0x8 RLIMIT_RSS = 0x7 RNDADDENTROPY = 0x80085203 RNDADDTOENTCNT = 0x80045201 RNDCLEARPOOL = 0x20005206 RNDGETENTCNT = 0x40045200 RNDGETPOOL = 0x40085202 RNDRESEEDCRNG = 0x20005207 RNDZAPENTCNT = 0x20005204 RTC_AIE_OFF = 0x20007002 RTC_AIE_ON = 0x20007001 RTC_ALM_READ = 0x40247008 RTC_ALM_SET = 0x80247007 RTC_EPOCH_READ = 0x4004700d RTC_EPOCH_SET = 0x8004700e RTC_IRQP_READ = 0x4004700b RTC_IRQP_SET = 0x8004700c RTC_PARAM_GET = 0x80187013 RTC_PARAM_SET = 0x80187014 RTC_PIE_OFF = 0x20007006 RTC_PIE_ON = 0x20007005 RTC_PLL_GET = 0x401c7011 RTC_PLL_SET = 0x801c7012 RTC_RD_TIME = 0x40247009 RTC_SET_TIME = 0x8024700a RTC_UIE_OFF = 0x20007004 RTC_UIE_ON = 0x20007003 RTC_VL_CLR = 0x20007014 RTC_VL_READ = 0x40047013 RTC_WIE_OFF = 0x20007010 RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x80 SIOCATMARK = 0x40047307 SIOCGPGRP = 0x40047309 SIOCGSTAMPNS_NEW = 0x40108907 SIOCGSTAMP_NEW = 0x40108906 SIOCINQ = 0x467f SIOCOUTQ = 0x7472 SIOCSPGRP = 0x80047308 SOCK_CLOEXEC = 0x80000 SOCK_DGRAM = 0x1 SOCK_NONBLOCK = 0x80 SOCK_STREAM = 0x2 SOL_SOCKET = 0xffff SO_ACCEPTCONN = 0x1009 SO_ATTACH_BPF = 0x32 SO_ATTACH_REUSEPORT_CBPF = 0x33 SO_ATTACH_REUSEPORT_EBPF = 0x34 SO_BINDTODEVICE = 0x19 SO_BINDTOIFINDEX = 0x3e SO_BPF_EXTENSIONS = 0x30 SO_BROADCAST = 0x20 SO_BSDCOMPAT = 0xe SO_BUF_LOCK = 0x48 SO_BUSY_POLL = 0x2e SO_BUSY_POLL_BUDGET = 0x46 SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 SO_DOMAIN = 0x1029 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f SO_MEMINFO = 0x37 SO_NETNS_COOKIE = 0x47 SO_NOFCS = 0x2b SO_OOBINLINE = 0x100 SO_PASSCRED = 0x11 SO_PASSPIDFD = 0x4c SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x12 SO_PEERGROUPS = 0x3b SO_PEERPIDFD = 0x4d SO_PEERSEC = 0x1e SO_PREFER_BUSY_POLL = 0x45 SO_PROTOCOL = 0x1028 SO_RCVBUF = 0x1002 SO_RCVBUFFORCE = 0x21 SO_RCVLOWAT = 0x1004 SO_RCVMARK = 0x4b SO_RCVTIMEO = 0x1006 SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_OLD = 0x1006 SO_RESERVE_MEM = 0x49 SO_REUSEADDR = 0x4 SO_REUSEPORT = 0x200 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 = 0x1001 SO_SNDBUFFORCE = 0x1f SO_SNDLOWAT = 0x1003 SO_SNDTIMEO = 0x1005 SO_SNDTIMEO_NEW = 0x43 SO_SNDTIMEO_OLD = 0x1005 SO_STYLE = 0x1008 SO_TIMESTAMPING = 0x25 SO_TIMESTAMPING_NEW = 0x41 SO_TIMESTAMPING_OLD = 0x25 SO_TIMESTAMPNS = 0x23 SO_TIMESTAMPNS_NEW = 0x40 SO_TIMESTAMPNS_OLD = 0x23 SO_TIMESTAMP_NEW = 0x3f SO_TXREHASH = 0x4a SO_TXTIME = 0x3d SO_TYPE = 0x1008 SO_WIFI_STATUS = 0x29 SO_ZEROCOPY = 0x3c TAB1 = 0x800 TAB2 = 0x1000 TAB3 = 0x1800 TABDLY = 0x1800 TCFLSH = 0x5407 TCGETA = 0x5401 TCGETS = 0x540d TCGETS2 = 0x4030542a TCSAFLUSH = 0x5410 TCSBRK = 0x5405 TCSBRKP = 0x5486 TCSETA = 0x5402 TCSETAF = 0x5404 TCSETAW = 0x5403 TCSETS = 0x540e TCSETS2 = 0x8030542b TCSETSF = 0x5410 TCSETSF2 = 0x8030542d TCSETSW = 0x540f TCSETSW2 = 0x8030542c TCXONC = 0x5406 TFD_CLOEXEC = 0x80000 TFD_NONBLOCK = 0x80 TIOCCBRK = 0x5428 TIOCCONS = 0x80047478 TIOCEXCL = 0x740d TIOCGDEV = 0x40045432 TIOCGETD = 0x7400 TIOCGETP = 0x7408 TIOCGEXCL = 0x40045440 TIOCGICOUNT = 0x5492 TIOCGISO7816 = 0x40285442 TIOCGLCKTRMIOS = 0x548b TIOCGLTC = 0x7474 TIOCGPGRP = 0x40047477 TIOCGPKT = 0x40045438 TIOCGPTLCK = 0x40045439 TIOCGPTN = 0x40045430 TIOCGPTPEER = 0x20005441 TIOCGRS485 = 0x4020542e TIOCGSERIAL = 0x5484 TIOCGSID = 0x7416 TIOCGSOFTCAR = 0x5481 TIOCGWINSZ = 0x40087468 TIOCINQ = 0x467f TIOCLINUX = 0x5483 TIOCMBIC = 0x741c TIOCMBIS = 0x741b TIOCMGET = 0x741d TIOCMIWAIT = 0x5491 TIOCMSET = 0x741a TIOCM_CAR = 0x100 TIOCM_CD = 0x100 TIOCM_CTS = 0x40 TIOCM_DSR = 0x400 TIOCM_RI = 0x200 TIOCM_RNG = 0x200 TIOCM_SR = 0x20 TIOCM_ST = 0x10 TIOCNOTTY = 0x5471 TIOCNXCL = 0x740e TIOCOUTQ = 0x7472 TIOCPKT = 0x5470 TIOCSBRK = 0x5427 TIOCSCTTY = 0x5480 TIOCSERCONFIG = 0x5488 TIOCSERGETLSR = 0x548e TIOCSERGETMULTI = 0x548f TIOCSERGSTRUCT = 0x548d TIOCSERGWILD = 0x5489 TIOCSERSETMULTI = 0x5490 TIOCSERSWILD = 0x548a TIOCSER_TEMT = 0x1 TIOCSETD = 0x7401 TIOCSETN = 0x740a TIOCSETP = 0x7409 TIOCSIG = 0x80045436 TIOCSISO7816 = 0xc0285443 TIOCSLCKTRMIOS = 0x548c TIOCSLTC = 0x7475 TIOCSPGRP = 0x80047476 TIOCSPTLCK = 0x80045431 TIOCSRS485 = 0xc020542f TIOCSSERIAL = 0x5485 TIOCSSOFTCAR = 0x5482 TIOCSTI = 0x5472 TIOCSWINSZ = 0x80087467 TIOCVHANGUP = 0x5437 TOSTOP = 0x8000 TUNATTACHFILTER = 0x800854d5 TUNDETACHFILTER = 0x800854d6 TUNGETDEVNETNS = 0x200054e3 TUNGETFEATURES = 0x400454cf TUNGETFILTER = 0x400854db TUNGETIFF = 0x400454d2 TUNGETSNDBUF = 0x400454d3 TUNGETVNETBE = 0x400454df TUNGETVNETHDRSZ = 0x400454d7 TUNGETVNETLE = 0x400454dd TUNSETCARRIER = 0x800454e2 TUNSETDEBUG = 0x800454c9 TUNSETFILTEREBPF = 0x400454e1 TUNSETGROUP = 0x800454ce TUNSETIFF = 0x800454ca TUNSETIFINDEX = 0x800454da TUNSETLINK = 0x800454cd TUNSETNOCSUM = 0x800454c8 TUNSETOFFLOAD = 0x800454d0 TUNSETOWNER = 0x800454cc TUNSETPERSIST = 0x800454cb TUNSETQUEUE = 0x800454d9 TUNSETSNDBUF = 0x800454d4 TUNSETSTEERINGEBPF = 0x400454e0 TUNSETTXFILTER = 0x800454d1 TUNSETVNETBE = 0x800454de TUNSETVNETHDRSZ = 0x800454d8 TUNSETVNETLE = 0x800454dc UBI_IOCATT = 0x80186f40 UBI_IOCDET = 0x80046f41 UBI_IOCEBCH = 0x80044f02 UBI_IOCEBER = 0x80044f01 UBI_IOCEBISMAP = 0x40044f05 UBI_IOCEBMAP = 0x80084f03 UBI_IOCEBUNMAP = 0x80044f04 UBI_IOCMKVOL = 0x80986f00 UBI_IOCRMVOL = 0x80046f01 UBI_IOCRNVOL = 0x91106f03 UBI_IOCRPEB = 0x80046f04 UBI_IOCRSVOL = 0x800c6f02 UBI_IOCSETVOLPROP = 0x80104f06 UBI_IOCSPEB = 0x80046f05 UBI_IOCVOLCRBLK = 0x80804f07 UBI_IOCVOLRMBLK = 0x20004f08 UBI_IOCVOLUP = 0x80084f00 VDISCARD = 0xd VEOF = 0x10 VEOL = 0x11 VEOL2 = 0x6 VMIN = 0x4 VREPRINT = 0xc VSTART = 0x8 VSTOP = 0x9 VSUSP = 0xa VSWTC = 0x7 VSWTCH = 0x7 VT1 = 0x4000 VTDLY = 0x4000 VTIME = 0x5 VWERASE = 0xe WDIOC_GETBOOTSTATUS = 0x40045702 WDIOC_GETPRETIMEOUT = 0x40045709 WDIOC_GETSTATUS = 0x40045701 WDIOC_GETSUPPORT = 0x40285700 WDIOC_GETTEMP = 0x40045703 WDIOC_GETTIMELEFT = 0x4004570a WDIOC_GETTIMEOUT = 0x40045707 WDIOC_KEEPALIVE = 0x40045705 WDIOC_SETOPTIONS = 0x40045704 WORDSIZE = 0x20 XCASE = 0x4 XTABS = 0x1800 _HIDIOCGRAWNAME = 0x40804804 _HIDIOCGRAWPHYS = 0x40404805 _HIDIOCGRAWUNIQ = 0x40404808 ) // Errors const ( EADDRINUSE = syscall.Errno(0x7d) EADDRNOTAVAIL = syscall.Errno(0x7e) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x7c) EALREADY = syscall.Errno(0x95) EBADE = syscall.Errno(0x32) EBADFD = syscall.Errno(0x51) EBADMSG = syscall.Errno(0x4d) EBADR = syscall.Errno(0x33) EBADRQC = syscall.Errno(0x36) EBADSLT = syscall.Errno(0x37) EBFONT = syscall.Errno(0x3b) ECANCELED = syscall.Errno(0x9e) 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) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x46d) EHOSTDOWN = syscall.Errno(0x93) EHOSTUNREACH = syscall.Errno(0x94) EHWPOISON = syscall.Errno(0xa8) EIDRM = syscall.Errno(0x24) EILSEQ = syscall.Errno(0x58) EINIT = syscall.Errno(0x8d) EINPROGRESS = syscall.Errno(0x96) EISCONN = syscall.Errno(0x85) EISNAM = syscall.Errno(0x8b) EKEYEXPIRED = syscall.Errno(0xa2) EKEYREJECTED = syscall.Errno(0xa4) EKEYREVOKED = syscall.Errno(0xa3) 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) ELOOP = syscall.Errno(0x5a) EMEDIUMTYPE = syscall.Errno(0xa0) EMSGSIZE = syscall.Errno(0x61) EMULTIHOP = syscall.Errno(0x4a) ENAMETOOLONG = syscall.Errno(0x4e) ENAVAIL = syscall.Errno(0x8a) ENETDOWN = syscall.Errno(0x7f) ENETRESET = syscall.Errno(0x81) ENETUNREACH = syscall.Errno(0x80) ENOANO = syscall.Errno(0x35) ENOBUFS = syscall.Errno(0x84) ENOCSI = syscall.Errno(0x2b) ENODATA = syscall.Errno(0x3d) ENOKEY = syscall.Errno(0xa1) ENOLCK = syscall.Errno(0x2e) ENOLINK = syscall.Errno(0x43) ENOMEDIUM = syscall.Errno(0x9f) ENOMSG = syscall.Errno(0x23) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x63) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x59) ENOTCONN = syscall.Errno(0x86) ENOTEMPTY = syscall.Errno(0x5d) ENOTNAM = syscall.Errno(0x89) ENOTRECOVERABLE = syscall.Errno(0xa6) ENOTSOCK = syscall.Errno(0x5f) ENOTSUP = syscall.Errno(0x7a) ENOTUNIQ = syscall.Errno(0x50) EOPNOTSUPP = syscall.Errno(0x7a) EOVERFLOW = syscall.Errno(0x4f) EOWNERDEAD = syscall.Errno(0xa5) EPFNOSUPPORT = syscall.Errno(0x7b) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x78) EPROTOTYPE = syscall.Errno(0x62) EREMCHG = syscall.Errno(0x52) EREMDEV = syscall.Errno(0x8e) EREMOTE = syscall.Errno(0x42) EREMOTEIO = syscall.Errno(0x8c) ERESTART = syscall.Errno(0x5b) ERFKILL = syscall.Errno(0xa7) ESHUTDOWN = syscall.Errno(0x8f) ESOCKTNOSUPPORT = syscall.Errno(0x79) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x97) ESTRPIPE = syscall.Errno(0x5c) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x91) ETOOMANYREFS = syscall.Errno(0x90) EUCLEAN = syscall.Errno(0x87) EUNATCH = syscall.Errno(0x2a) EUSERS = syscall.Errno(0x5e) EXFULL = syscall.Errno(0x34) ) // Signals const ( SIGBUS = syscall.Signal(0xa) SIGCHLD = syscall.Signal(0x12) SIGCLD = syscall.Signal(0x12) SIGCONT = syscall.Signal(0x19) SIGEMT = syscall.Signal(0x7) SIGIO = syscall.Signal(0x16) SIGPOLL = syscall.Signal(0x16) SIGPROF = syscall.Signal(0x1d) SIGPWR = syscall.Signal(0x13) SIGSTOP = syscall.Signal(0x17) SIGSYS = syscall.Signal(0xc) 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) SIGWINCH = syscall.Signal(0x14) SIGXCPU = syscall.Signal(0x1e) SIGXFSZ = syscall.Signal(0x1f) ) // Error table var errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "no such device or address"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EAGAIN", "resource temporarily unavailable"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device or resource busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "invalid cross-device link"}, {19, "ENODEV", "no such device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "numerical result out of range"}, {35, "ENOMSG", "no message of desired type"}, {36, "EIDRM", "identifier removed"}, {37, "ECHRNG", "channel number out of range"}, {38, "EL2NSYNC", "level 2 not synchronized"}, {39, "EL3HLT", "level 3 halted"}, {40, "EL3RST", "level 3 reset"}, {41, "ELNRNG", "link number out of range"}, {42, "EUNATCH", "protocol driver not attached"}, {43, "ENOCSI", "no CSI structure available"}, {44, "EL2HLT", "level 2 halted"}, {45, "EDEADLK", "resource deadlock avoided"}, {46, "ENOLCK", "no locks available"}, {50, "EBADE", "invalid exchange"}, {51, "EBADR", "invalid request descriptor"}, {52, "EXFULL", "exchange full"}, {53, "ENOANO", "no anode"}, {54, "EBADRQC", "invalid request code"}, {55, "EBADSLT", "invalid slot"}, {56, "EDEADLOCK", "file locking deadlock error"}, {59, "EBFONT", "bad font file format"}, {60, "ENOSTR", "device not a stream"}, {61, "ENODATA", "no data available"}, {62, "ETIME", "timer expired"}, {63, "ENOSR", "out of streams resources"}, {64, "ENONET", "machine is not on the network"}, {65, "ENOPKG", "package not installed"}, {66, "EREMOTE", "object is remote"}, {67, "ENOLINK", "link has been severed"}, {68, "EADV", "advertise error"}, {69, "ESRMNT", "srmount error"}, {70, "ECOMM", "communication error on send"}, {71, "EPROTO", "protocol error"}, {73, "EDOTDOT", "RFS specific error"}, {74, "EMULTIHOP", "multihop attempted"}, {77, "EBADMSG", "bad message"}, {78, "ENAMETOOLONG", "file name too long"}, {79, "EOVERFLOW", "value too large for defined data type"}, {80, "ENOTUNIQ", "name not unique on network"}, {81, "EBADFD", "file descriptor in bad state"}, {82, "EREMCHG", "remote address changed"}, {83, "ELIBACC", "can not access a needed shared library"}, {84, "ELIBBAD", "accessing a corrupted shared library"}, {85, "ELIBSCN", ".lib section in a.out corrupted"}, {86, "ELIBMAX", "attempting to link in too many shared libraries"}, {87, "ELIBEXEC", "cannot exec a shared library directly"}, {88, "EILSEQ", "invalid or incomplete multibyte or wide character"}, {89, "ENOSYS", "function not implemented"}, {90, "ELOOP", "too many levels of symbolic links"}, {91, "ERESTART", "interrupted system call should be restarted"}, {92, "ESTRPIPE", "streams pipe error"}, {93, "ENOTEMPTY", "directory not empty"}, {94, "EUSERS", "too many users"}, {95, "ENOTSOCK", "socket operation on non-socket"}, {96, "EDESTADDRREQ", "destination address required"}, {97, "EMSGSIZE", "message too long"}, {98, "EPROTOTYPE", "protocol wrong type for socket"}, {99, "ENOPROTOOPT", "protocol not available"}, {120, "EPROTONOSUPPORT", "protocol not supported"}, {121, "ESOCKTNOSUPPORT", "socket type not supported"}, {122, "ENOTSUP", "operation not supported"}, {123, "EPFNOSUPPORT", "protocol family not supported"}, {124, "EAFNOSUPPORT", "address family not supported by protocol"}, {125, "EADDRINUSE", "address already in use"}, {126, "EADDRNOTAVAIL", "cannot assign requested address"}, {127, "ENETDOWN", "network is down"}, {128, "ENETUNREACH", "network is unreachable"}, {129, "ENETRESET", "network dropped connection on reset"}, {130, "ECONNABORTED", "software caused connection abort"}, {131, "ECONNRESET", "connection reset by peer"}, {132, "ENOBUFS", "no buffer space available"}, {133, "EISCONN", "transport endpoint is already connected"}, {134, "ENOTCONN", "transport endpoint is not connected"}, {135, "EUCLEAN", "structure needs cleaning"}, {137, "ENOTNAM", "not a XENIX named type file"}, {138, "ENAVAIL", "no XENIX semaphores available"}, {139, "EISNAM", "is a named type file"}, {140, "EREMOTEIO", "remote I/O error"}, {141, "EINIT", "unknown error 141"}, {142, "EREMDEV", "unknown error 142"}, {143, "ESHUTDOWN", "cannot send after transport endpoint shutdown"}, {144, "ETOOMANYREFS", "too many references: cannot splice"}, {145, "ETIMEDOUT", "connection timed out"}, {146, "ECONNREFUSED", "connection refused"}, {147, "EHOSTDOWN", "host is down"}, {148, "EHOSTUNREACH", "no route to host"}, {149, "EALREADY", "operation already in progress"}, {150, "EINPROGRESS", "operation now in progress"}, {151, "ESTALE", "stale file handle"}, {158, "ECANCELED", "operation canceled"}, {159, "ENOMEDIUM", "no medium found"}, {160, "EMEDIUMTYPE", "wrong medium type"}, {161, "ENOKEY", "required key not available"}, {162, "EKEYEXPIRED", "key has expired"}, {163, "EKEYREVOKED", "key has been revoked"}, {164, "EKEYREJECTED", "key was rejected by service"}, {165, "EOWNERDEAD", "owner died"}, {166, "ENOTRECOVERABLE", "state not recoverable"}, {167, "ERFKILL", "operation not possible due to RF-kill"}, {168, "EHWPOISON", "memory page has hardware error"}, {1133, "EDQUOT", "disk quota exceeded"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/breakpoint trap"}, {6, "SIGABRT", "aborted"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGUSR1", "user defined signal 1"}, {17, "SIGUSR2", "user defined signal 2"}, {18, "SIGCHLD", "child exited"}, {19, "SIGPWR", "power failure"}, {20, "SIGWINCH", "window changed"}, {21, "SIGURG", "urgent I/O condition"}, {22, "SIGIO", "I/O possible"}, {23, "SIGSTOP", "stopped (signal)"}, {24, "SIGTSTP", "stopped"}, {25, "SIGCONT", "continued"}, {26, "SIGTTIN", "stopped (tty input)"}, {27, "SIGTTOU", "stopped (tty output)"}, {28, "SIGVTALRM", "virtual timer expired"}, {29, "SIGPROF", "profiling timer expired"}, {30, "SIGXCPU", "CPU time limit exceeded"}, {31, "SIGXFSZ", "file size limit exceeded"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go ================================================ // mkerrors.sh -Wall -Werror -static -I/tmp/ppc/include // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc && linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/ppc/include _const.go package unix import "syscall" const ( B1000000 = 0x17 B115200 = 0x11 B1152000 = 0x18 B1500000 = 0x19 B2000000 = 0x1a B230400 = 0x12 B2500000 = 0x1b B3000000 = 0x1c B3500000 = 0x1d B4000000 = 0x1e B460800 = 0x13 B500000 = 0x14 B57600 = 0x10 B576000 = 0x15 B921600 = 0x16 BLKALIGNOFF = 0x2000127a BLKBSZGET = 0x40041270 BLKBSZSET = 0x80041271 BLKDISCARD = 0x20001277 BLKDISCARDZEROES = 0x2000127c BLKFLSBUF = 0x20001261 BLKFRAGET = 0x20001265 BLKFRASET = 0x20001264 BLKGETDISKSEQ = 0x40081280 BLKGETSIZE = 0x20001260 BLKGETSIZE64 = 0x40041272 BLKIOMIN = 0x20001278 BLKIOOPT = 0x20001279 BLKPBSZGET = 0x2000127b BLKRAGET = 0x20001263 BLKRASET = 0x20001262 BLKROGET = 0x2000125e BLKROSET = 0x2000125d BLKROTATIONAL = 0x2000127e BLKRRPART = 0x2000125f BLKSECDISCARD = 0x2000127d BLKSECTGET = 0x20001267 BLKSECTSET = 0x20001266 BLKSSZGET = 0x20001268 BLKZEROOUT = 0x2000127f BOTHER = 0x1f BS1 = 0x8000 BSDLY = 0x8000 CBAUD = 0xff CBAUDEX = 0x0 CIBAUD = 0xff0000 CLOCAL = 0x8000 CR1 = 0x1000 CR2 = 0x2000 CR3 = 0x3000 CRDLY = 0x3000 CREAD = 0x800 CS6 = 0x100 CS7 = 0x200 CS8 = 0x300 CSIZE = 0x300 CSTOPB = 0x400 ECCGETLAYOUT = 0x41484d11 ECCGETSTATS = 0x40104d12 ECHOCTL = 0x40 ECHOE = 0x2 ECHOK = 0x4 ECHOKE = 0x1 ECHONL = 0x10 ECHOPRT = 0x20 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 EPIOCGPARAMS = 0x40088a02 EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000000 FF1 = 0x4000 FFDLY = 0x4000 FICLONE = 0x80049409 FICLONERANGE = 0x8020940d FLUSHO = 0x800000 FS_IOC_ENABLE_VERITY = 0x80806685 FS_IOC_GETFLAGS = 0x40046601 FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 FS_IOC_SETFLAGS = 0x80046602 FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 F_GETLK = 0xc F_GETLK64 = 0xc F_GETOWN = 0x9 F_RDLCK = 0x0 F_SETLK = 0xd F_SETLK64 = 0xd F_SETLKW = 0xe F_SETLKW64 = 0xe F_SETOWN = 0x8 F_UNLCK = 0x2 F_WRLCK = 0x1 HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 HUPCL = 0x4000 ICANON = 0x100 IEXTEN = 0x400 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 ISIG = 0x80 IUCLC = 0x1000 IXOFF = 0x400 IXON = 0x200 MAP_ANON = 0x20 MAP_ANONYMOUS = 0x20 MAP_DENYWRITE = 0x800 MAP_EXECUTABLE = 0x1000 MAP_GROWSDOWN = 0x100 MAP_HUGETLB = 0x40000 MAP_LOCKED = 0x80 MAP_NONBLOCK = 0x10000 MAP_NORESERVE = 0x40 MAP_POPULATE = 0x8000 MAP_STACK = 0x20000 MAP_SYNC = 0x80000 MCL_CURRENT = 0x2000 MCL_FUTURE = 0x4000 MCL_ONFAULT = 0x8000 MEMERASE = 0x80084d02 MEMERASE64 = 0x80104d14 MEMGETBADBLOCK = 0x80084d0b MEMGETINFO = 0x40204d01 MEMGETOOBSEL = 0x40c84d0a MEMGETREGIONCOUNT = 0x40044d07 MEMISLOCKED = 0x40084d17 MEMLOCK = 0x80084d05 MEMREAD = 0xc0404d1a MEMREADOOB = 0xc00c4d04 MEMSETBADBLOCK = 0x80084d0c MEMUNLOCK = 0x80084d06 MEMWRITEOOB = 0xc00c4d03 MTDFILEMODE = 0x20004d13 NFDBITS = 0x20 NL2 = 0x200 NL3 = 0x300 NLDLY = 0x300 NOFLSH = 0x80000000 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 NS_GET_USERNS = 0x2000b701 OLCUC = 0x4 ONLCR = 0x2 OTPERASE = 0x800c4d19 OTPGETREGIONCOUNT = 0x80044d0e OTPGETREGIONINFO = 0x800c4d0f OTPLOCK = 0x400c4d10 OTPSELECT = 0x40044d0d 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 = 0x10000 O_NDELAY = 0x800 O_NOATIME = 0x40000 O_NOCTTY = 0x100 O_NOFOLLOW = 0x8000 O_NONBLOCK = 0x800 O_PATH = 0x200000 O_RSYNC = 0x101000 O_SYNC = 0x101000 O_TMPFILE = 0x404000 O_TRUNC = 0x200 PARENB = 0x1000 PARODD = 0x2000 PENDIN = 0x20000000 PERF_EVENT_IOC_DISABLE = 0x20002401 PERF_EVENT_IOC_ENABLE = 0x20002400 PERF_EVENT_IOC_ID = 0x40042407 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8004240b PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409 PERF_EVENT_IOC_PERIOD = 0x80082404 PERF_EVENT_IOC_QUERY_BPF = 0xc004240a PERF_EVENT_IOC_REFRESH = 0x20002402 PERF_EVENT_IOC_RESET = 0x20002403 PERF_EVENT_IOC_SET_BPF = 0x80042408 PERF_EVENT_IOC_SET_FILTER = 0x80042406 PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 PPPIOCATTACH = 0x8004743d PPPIOCATTCHAN = 0x80047438 PPPIOCBRIDGECHAN = 0x80047435 PPPIOCCONNECT = 0x8004743a PPPIOCDETACH = 0x8004743c PPPIOCDISCONN = 0x20007439 PPPIOCGASYNCMAP = 0x40047458 PPPIOCGCHAN = 0x40047437 PPPIOCGDEBUG = 0x40047441 PPPIOCGFLAGS = 0x4004745a PPPIOCGIDLE = 0x4008743f PPPIOCGIDLE32 = 0x4008743f PPPIOCGIDLE64 = 0x4010743f PPPIOCGL2TPSTATS = 0x40487436 PPPIOCGMRU = 0x40047453 PPPIOCGRASYNCMAP = 0x40047455 PPPIOCGUNIT = 0x40047456 PPPIOCGXASYNCMAP = 0x40207450 PPPIOCSACTIVE = 0x80087446 PPPIOCSASYNCMAP = 0x80047457 PPPIOCSCOMPRESS = 0x800c744d PPPIOCSDEBUG = 0x80047440 PPPIOCSFLAGS = 0x80047459 PPPIOCSMAXCID = 0x80047451 PPPIOCSMRRU = 0x8004743b PPPIOCSMRU = 0x80047452 PPPIOCSNPMODE = 0x8008744b PPPIOCSPASS = 0x80087447 PPPIOCSRASYNCMAP = 0x80047454 PPPIOCSXASYNCMAP = 0x8020744f PPPIOCUNBRIDGECHAN = 0x20007434 PPPIOCXFERUNIT = 0x2000744e PROT_SAO = 0x10 PR_SET_PTRACER_ANY = 0xffffffff PTRACE_GETEVRREGS = 0x14 PTRACE_GETFPREGS = 0xe PTRACE_GETREGS64 = 0x16 PTRACE_GETVRREGS = 0x12 PTRACE_GETVSRREGS = 0x1b PTRACE_GET_DEBUGREG = 0x19 PTRACE_SETEVRREGS = 0x15 PTRACE_SETFPREGS = 0xf PTRACE_SETREGS64 = 0x17 PTRACE_SETVRREGS = 0x13 PTRACE_SETVSRREGS = 0x1c PTRACE_SET_DEBUGREG = 0x1a PTRACE_SINGLEBLOCK = 0x100 PTRACE_SYSEMU = 0x1d PTRACE_SYSEMU_SINGLESTEP = 0x1e PT_CCR = 0x26 PT_CTR = 0x23 PT_DAR = 0x29 PT_DSCR = 0x2c PT_DSISR = 0x2a PT_FPR0 = 0x30 PT_FPR31 = 0x6e PT_FPSCR = 0x71 PT_LNK = 0x24 PT_MQ = 0x27 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_TRAP = 0x28 PT_XER = 0x25 RLIMIT_AS = 0x9 RLIMIT_MEMLOCK = 0x8 RLIMIT_NOFILE = 0x7 RLIMIT_NPROC = 0x6 RLIMIT_RSS = 0x5 RNDADDENTROPY = 0x80085203 RNDADDTOENTCNT = 0x80045201 RNDCLEARPOOL = 0x20005206 RNDGETENTCNT = 0x40045200 RNDGETPOOL = 0x40085202 RNDRESEEDCRNG = 0x20005207 RNDZAPENTCNT = 0x20005204 RTC_AIE_OFF = 0x20007002 RTC_AIE_ON = 0x20007001 RTC_ALM_READ = 0x40247008 RTC_ALM_SET = 0x80247007 RTC_EPOCH_READ = 0x4004700d RTC_EPOCH_SET = 0x8004700e RTC_IRQP_READ = 0x4004700b RTC_IRQP_SET = 0x8004700c RTC_PARAM_GET = 0x80187013 RTC_PARAM_SET = 0x80187014 RTC_PIE_OFF = 0x20007006 RTC_PIE_ON = 0x20007005 RTC_PLL_GET = 0x401c7011 RTC_PLL_SET = 0x801c7012 RTC_RD_TIME = 0x40247009 RTC_SET_TIME = 0x8024700a RTC_UIE_OFF = 0x20007004 RTC_UIE_ON = 0x20007003 RTC_VL_CLR = 0x20007014 RTC_VL_READ = 0x40047013 RTC_WIE_OFF = 0x20007010 RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 SIOCGPGRP = 0x8904 SIOCGSTAMPNS_NEW = 0x40108907 SIOCGSTAMP_NEW = 0x40108906 SIOCINQ = 0x4004667f SIOCOUTQ = 0x40047473 SIOCSPGRP = 0x8902 SOCK_CLOEXEC = 0x80000 SOCK_DGRAM = 0x2 SOCK_NONBLOCK = 0x800 SOCK_STREAM = 0x1 SOL_SOCKET = 0x1 SO_ACCEPTCONN = 0x1e SO_ATTACH_BPF = 0x32 SO_ATTACH_REUSEPORT_CBPF = 0x33 SO_ATTACH_REUSEPORT_EBPF = 0x34 SO_BINDTODEVICE = 0x19 SO_BINDTOIFINDEX = 0x3e SO_BPF_EXTENSIONS = 0x30 SO_BROADCAST = 0x6 SO_BSDCOMPAT = 0xe SO_BUF_LOCK = 0x48 SO_BUSY_POLL = 0x2e SO_BUSY_POLL_BUDGET = 0x46 SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f SO_MEMINFO = 0x37 SO_NETNS_COOKIE = 0x47 SO_NOFCS = 0x2b SO_OOBINLINE = 0xa SO_PASSCRED = 0x14 SO_PASSPIDFD = 0x4c SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x15 SO_PEERGROUPS = 0x3b SO_PEERPIDFD = 0x4d SO_PEERSEC = 0x1f SO_PREFER_BUSY_POLL = 0x45 SO_PROTOCOL = 0x26 SO_RCVBUF = 0x8 SO_RCVBUFFORCE = 0x21 SO_RCVLOWAT = 0x10 SO_RCVMARK = 0x4b SO_RCVTIMEO = 0x12 SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_OLD = 0x12 SO_RESERVE_MEM = 0x49 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_SNDTIMEO_NEW = 0x43 SO_SNDTIMEO_OLD = 0x13 SO_TIMESTAMPING = 0x25 SO_TIMESTAMPING_NEW = 0x41 SO_TIMESTAMPING_OLD = 0x25 SO_TIMESTAMPNS = 0x23 SO_TIMESTAMPNS_NEW = 0x40 SO_TIMESTAMPNS_OLD = 0x23 SO_TIMESTAMP_NEW = 0x3f SO_TXREHASH = 0x4a SO_TXTIME = 0x3d SO_TYPE = 0x3 SO_WIFI_STATUS = 0x29 SO_ZEROCOPY = 0x3c TAB1 = 0x400 TAB2 = 0x800 TAB3 = 0xc00 TABDLY = 0xc00 TCFLSH = 0x2000741f TCGETA = 0x40147417 TCGETS = 0x402c7413 TCSAFLUSH = 0x2 TCSBRK = 0x2000741d TCSBRKP = 0x5425 TCSETA = 0x80147418 TCSETAF = 0x8014741c TCSETAW = 0x80147419 TCSETS = 0x802c7414 TCSETSF = 0x802c7416 TCSETSW = 0x802c7415 TCXONC = 0x2000741e TFD_CLOEXEC = 0x80000 TFD_NONBLOCK = 0x800 TIOCCBRK = 0x5428 TIOCCONS = 0x541d TIOCEXCL = 0x540c TIOCGDEV = 0x40045432 TIOCGETC = 0x40067412 TIOCGETD = 0x5424 TIOCGETP = 0x40067408 TIOCGEXCL = 0x40045440 TIOCGICOUNT = 0x545d TIOCGISO7816 = 0x40285442 TIOCGLCKTRMIOS = 0x5456 TIOCGLTC = 0x40067474 TIOCGPGRP = 0x40047477 TIOCGPKT = 0x40045438 TIOCGPTLCK = 0x40045439 TIOCGPTN = 0x40045430 TIOCGPTPEER = 0x20005441 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_LOOP = 0x8000 TIOCM_OUT1 = 0x2000 TIOCM_OUT2 = 0x4000 TIOCM_RI = 0x80 TIOCM_RNG = 0x80 TIOCM_SR = 0x10 TIOCM_ST = 0x8 TIOCNOTTY = 0x5422 TIOCNXCL = 0x540d TIOCOUTQ = 0x40047473 TIOCPKT = 0x5420 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 TIOCSISO7816 = 0xc0285443 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 = 0x800854d5 TUNDETACHFILTER = 0x800854d6 TUNGETDEVNETNS = 0x200054e3 TUNGETFEATURES = 0x400454cf TUNGETFILTER = 0x400854db TUNGETIFF = 0x400454d2 TUNGETSNDBUF = 0x400454d3 TUNGETVNETBE = 0x400454df TUNGETVNETHDRSZ = 0x400454d7 TUNGETVNETLE = 0x400454dd TUNSETCARRIER = 0x800454e2 TUNSETDEBUG = 0x800454c9 TUNSETFILTEREBPF = 0x400454e1 TUNSETGROUP = 0x800454ce TUNSETIFF = 0x800454ca TUNSETIFINDEX = 0x800454da TUNSETLINK = 0x800454cd TUNSETNOCSUM = 0x800454c8 TUNSETOFFLOAD = 0x800454d0 TUNSETOWNER = 0x800454cc TUNSETPERSIST = 0x800454cb TUNSETQUEUE = 0x800454d9 TUNSETSNDBUF = 0x800454d4 TUNSETSTEERINGEBPF = 0x400454e0 TUNSETTXFILTER = 0x800454d1 TUNSETVNETBE = 0x800454de TUNSETVNETHDRSZ = 0x800454d8 TUNSETVNETLE = 0x800454dc UBI_IOCATT = 0x80186f40 UBI_IOCDET = 0x80046f41 UBI_IOCEBCH = 0x80044f02 UBI_IOCEBER = 0x80044f01 UBI_IOCEBISMAP = 0x40044f05 UBI_IOCEBMAP = 0x80084f03 UBI_IOCEBUNMAP = 0x80044f04 UBI_IOCMKVOL = 0x80986f00 UBI_IOCRMVOL = 0x80046f01 UBI_IOCRNVOL = 0x91106f03 UBI_IOCRPEB = 0x80046f04 UBI_IOCRSVOL = 0x800c6f02 UBI_IOCSETVOLPROP = 0x80104f06 UBI_IOCSPEB = 0x80046f05 UBI_IOCVOLCRBLK = 0x80804f07 UBI_IOCVOLRMBLK = 0x20004f08 UBI_IOCVOLUP = 0x80084f00 VDISCARD = 0x10 VEOF = 0x4 VEOL = 0x6 VEOL2 = 0x8 VMIN = 0x5 VREPRINT = 0xb VSTART = 0xd VSTOP = 0xe VSUSP = 0xc VSWTC = 0x9 VT1 = 0x10000 VTDLY = 0x10000 VTIME = 0x7 VWERASE = 0xa WDIOC_GETBOOTSTATUS = 0x40045702 WDIOC_GETPRETIMEOUT = 0x40045709 WDIOC_GETSTATUS = 0x40045701 WDIOC_GETSUPPORT = 0x40285700 WDIOC_GETTEMP = 0x40045703 WDIOC_GETTIMELEFT = 0x4004570a WDIOC_GETTIMEOUT = 0x40045707 WDIOC_KEEPALIVE = 0x40045705 WDIOC_SETOPTIONS = 0x40045704 WORDSIZE = 0x20 XCASE = 0x4000 XTABS = 0xc00 _HIDIOCGRAWNAME = 0x40804804 _HIDIOCGRAWPHYS = 0x40404805 _HIDIOCGRAWUNIQ = 0x40404808 ) // Errors const ( EADDRINUSE = syscall.Errno(0x62) EADDRNOTAVAIL = syscall.Errno(0x63) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x61) EALREADY = syscall.Errno(0x72) EBADE = syscall.Errno(0x34) EBADFD = syscall.Errno(0x4d) EBADMSG = syscall.Errno(0x4a) EBADR = syscall.Errno(0x35) EBADRQC = syscall.Errno(0x38) EBADSLT = syscall.Errno(0x39) EBFONT = syscall.Errno(0x3b) ECANCELED = syscall.Errno(0x7d) 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) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) EIDRM = syscall.Errno(0x2b) EILSEQ = syscall.Errno(0x54) EINPROGRESS = syscall.Errno(0x73) EISCONN = syscall.Errno(0x6a) 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) 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) ENOANO = syscall.Errno(0x37) ENOBUFS = syscall.Errno(0x69) ENOCSI = syscall.Errno(0x32) ENODATA = syscall.Errno(0x3d) ENOKEY = syscall.Errno(0x7e) ENOLCK = syscall.Errno(0x25) ENOLINK = syscall.Errno(0x43) ENOMEDIUM = syscall.Errno(0x7b) ENOMSG = syscall.Errno(0x2a) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x5c) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x26) ENOTCONN = syscall.Errno(0x6b) ENOTEMPTY = syscall.Errno(0x27) ENOTNAM = syscall.Errno(0x76) ENOTRECOVERABLE = syscall.Errno(0x83) ENOTSOCK = syscall.Errno(0x58) ENOTSUP = syscall.Errno(0x5f) ENOTUNIQ = syscall.Errno(0x4c) EOPNOTSUPP = syscall.Errno(0x5f) EOVERFLOW = syscall.Errno(0x4b) EOWNERDEAD = syscall.Errno(0x82) EPFNOSUPPORT = syscall.Errno(0x60) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x5d) EPROTOTYPE = syscall.Errno(0x5b) EREMCHG = syscall.Errno(0x4e) EREMOTE = syscall.Errno(0x42) EREMOTEIO = syscall.Errno(0x79) ERESTART = syscall.Errno(0x55) ERFKILL = syscall.Errno(0x84) ESHUTDOWN = syscall.Errno(0x6c) ESOCKTNOSUPPORT = syscall.Errno(0x5e) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x74) ESTRPIPE = syscall.Errno(0x56) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x6e) ETOOMANYREFS = syscall.Errno(0x6d) EUCLEAN = syscall.Errno(0x75) EUNATCH = syscall.Errno(0x31) EUSERS = syscall.Errno(0x57) EXFULL = syscall.Errno(0x36) ) // Signals const ( SIGBUS = syscall.Signal(0x7) SIGCHLD = syscall.Signal(0x11) SIGCLD = syscall.Signal(0x11) SIGCONT = syscall.Signal(0x12) SIGIO = syscall.Signal(0x1d) SIGPOLL = syscall.Signal(0x1d) SIGPROF = syscall.Signal(0x1b) SIGPWR = syscall.Signal(0x1e) SIGSTKFLT = syscall.Signal(0x10) SIGSTOP = syscall.Signal(0x13) SIGSYS = syscall.Signal(0x1f) SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "no such device or address"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EAGAIN", "resource temporarily unavailable"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device or resource busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "invalid cross-device link"}, {19, "ENODEV", "no such device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "numerical result out of range"}, {35, "EDEADLK", "resource deadlock avoided"}, {36, "ENAMETOOLONG", "file name too long"}, {37, "ENOLCK", "no locks available"}, {38, "ENOSYS", "function not implemented"}, {39, "ENOTEMPTY", "directory not empty"}, {40, "ELOOP", "too many levels of symbolic links"}, {42, "ENOMSG", "no message of desired type"}, {43, "EIDRM", "identifier removed"}, {44, "ECHRNG", "channel number out of range"}, {45, "EL2NSYNC", "level 2 not synchronized"}, {46, "EL3HLT", "level 3 halted"}, {47, "EL3RST", "level 3 reset"}, {48, "ELNRNG", "link number out of range"}, {49, "EUNATCH", "protocol driver not attached"}, {50, "ENOCSI", "no CSI structure available"}, {51, "EL2HLT", "level 2 halted"}, {52, "EBADE", "invalid exchange"}, {53, "EBADR", "invalid request descriptor"}, {54, "EXFULL", "exchange full"}, {55, "ENOANO", "no anode"}, {56, "EBADRQC", "invalid request code"}, {57, "EBADSLT", "invalid slot"}, {58, "EDEADLOCK", "file locking deadlock error"}, {59, "EBFONT", "bad font file format"}, {60, "ENOSTR", "device not a stream"}, {61, "ENODATA", "no data available"}, {62, "ETIME", "timer expired"}, {63, "ENOSR", "out of streams resources"}, {64, "ENONET", "machine is not on the network"}, {65, "ENOPKG", "package not installed"}, {66, "EREMOTE", "object is remote"}, {67, "ENOLINK", "link has been severed"}, {68, "EADV", "advertise error"}, {69, "ESRMNT", "srmount error"}, {70, "ECOMM", "communication error on send"}, {71, "EPROTO", "protocol error"}, {72, "EMULTIHOP", "multihop attempted"}, {73, "EDOTDOT", "RFS specific error"}, {74, "EBADMSG", "bad message"}, {75, "EOVERFLOW", "value too large for defined data type"}, {76, "ENOTUNIQ", "name not unique on network"}, {77, "EBADFD", "file descriptor in bad state"}, {78, "EREMCHG", "remote address changed"}, {79, "ELIBACC", "can not access a needed shared library"}, {80, "ELIBBAD", "accessing a corrupted shared library"}, {81, "ELIBSCN", ".lib section in a.out corrupted"}, {82, "ELIBMAX", "attempting to link in too many shared libraries"}, {83, "ELIBEXEC", "cannot exec a shared library directly"}, {84, "EILSEQ", "invalid or incomplete multibyte or wide character"}, {85, "ERESTART", "interrupted system call should be restarted"}, {86, "ESTRPIPE", "streams pipe error"}, {87, "EUSERS", "too many users"}, {88, "ENOTSOCK", "socket operation on non-socket"}, {89, "EDESTADDRREQ", "destination address required"}, {90, "EMSGSIZE", "message too long"}, {91, "EPROTOTYPE", "protocol wrong type for socket"}, {92, "ENOPROTOOPT", "protocol not available"}, {93, "EPROTONOSUPPORT", "protocol not supported"}, {94, "ESOCKTNOSUPPORT", "socket type not supported"}, {95, "ENOTSUP", "operation not supported"}, {96, "EPFNOSUPPORT", "protocol family not supported"}, {97, "EAFNOSUPPORT", "address family not supported by protocol"}, {98, "EADDRINUSE", "address already in use"}, {99, "EADDRNOTAVAIL", "cannot assign requested address"}, {100, "ENETDOWN", "network is down"}, {101, "ENETUNREACH", "network is unreachable"}, {102, "ENETRESET", "network dropped connection on reset"}, {103, "ECONNABORTED", "software caused connection abort"}, {104, "ECONNRESET", "connection reset by peer"}, {105, "ENOBUFS", "no buffer space available"}, {106, "EISCONN", "transport endpoint is already connected"}, {107, "ENOTCONN", "transport endpoint is not connected"}, {108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"}, {109, "ETOOMANYREFS", "too many references: cannot splice"}, {110, "ETIMEDOUT", "connection timed out"}, {111, "ECONNREFUSED", "connection refused"}, {112, "EHOSTDOWN", "host is down"}, {113, "EHOSTUNREACH", "no route to host"}, {114, "EALREADY", "operation already in progress"}, {115, "EINPROGRESS", "operation now in progress"}, {116, "ESTALE", "stale file handle"}, {117, "EUCLEAN", "structure needs cleaning"}, {118, "ENOTNAM", "not a XENIX named type file"}, {119, "ENAVAIL", "no XENIX semaphores available"}, {120, "EISNAM", "is a named type file"}, {121, "EREMOTEIO", "remote I/O error"}, {122, "EDQUOT", "disk quota exceeded"}, {123, "ENOMEDIUM", "no medium found"}, {124, "EMEDIUMTYPE", "wrong medium type"}, {125, "ECANCELED", "operation canceled"}, {126, "ENOKEY", "required key not available"}, {127, "EKEYEXPIRED", "key has expired"}, {128, "EKEYREVOKED", "key has been revoked"}, {129, "EKEYREJECTED", "key was rejected by service"}, {130, "EOWNERDEAD", "owner died"}, {131, "ENOTRECOVERABLE", "state not recoverable"}, {132, "ERFKILL", "operation not possible due to RF-kill"}, {133, "EHWPOISON", "memory page has hardware error"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/breakpoint trap"}, {6, "SIGABRT", "aborted"}, {7, "SIGBUS", "bus error"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGUSR1", "user defined signal 1"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGUSR2", "user defined signal 2"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGSTKFLT", "stack fault"}, {17, "SIGCHLD", "child exited"}, {18, "SIGCONT", "continued"}, {19, "SIGSTOP", "stopped (signal)"}, {20, "SIGTSTP", "stopped"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGURG", "urgent I/O condition"}, {24, "SIGXCPU", "CPU time limit exceeded"}, {25, "SIGXFSZ", "file size limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window changed"}, {29, "SIGIO", "I/O possible"}, {30, "SIGPWR", "power failure"}, {31, "SIGSYS", "bad system call"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go ================================================ // mkerrors.sh -Wall -Werror -static -I/tmp/ppc64/include // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64 && linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/ppc64/include _const.go package unix import "syscall" const ( B1000000 = 0x17 B115200 = 0x11 B1152000 = 0x18 B1500000 = 0x19 B2000000 = 0x1a B230400 = 0x12 B2500000 = 0x1b B3000000 = 0x1c B3500000 = 0x1d B4000000 = 0x1e B460800 = 0x13 B500000 = 0x14 B57600 = 0x10 B576000 = 0x15 B921600 = 0x16 BLKALIGNOFF = 0x2000127a BLKBSZGET = 0x40081270 BLKBSZSET = 0x80081271 BLKDISCARD = 0x20001277 BLKDISCARDZEROES = 0x2000127c BLKFLSBUF = 0x20001261 BLKFRAGET = 0x20001265 BLKFRASET = 0x20001264 BLKGETDISKSEQ = 0x40081280 BLKGETSIZE = 0x20001260 BLKGETSIZE64 = 0x40081272 BLKIOMIN = 0x20001278 BLKIOOPT = 0x20001279 BLKPBSZGET = 0x2000127b BLKRAGET = 0x20001263 BLKRASET = 0x20001262 BLKROGET = 0x2000125e BLKROSET = 0x2000125d BLKROTATIONAL = 0x2000127e BLKRRPART = 0x2000125f BLKSECDISCARD = 0x2000127d BLKSECTGET = 0x20001267 BLKSECTSET = 0x20001266 BLKSSZGET = 0x20001268 BLKZEROOUT = 0x2000127f BOTHER = 0x1f BS1 = 0x8000 BSDLY = 0x8000 CBAUD = 0xff CBAUDEX = 0x0 CIBAUD = 0xff0000 CLOCAL = 0x8000 CR1 = 0x1000 CR2 = 0x2000 CR3 = 0x3000 CRDLY = 0x3000 CREAD = 0x800 CS6 = 0x100 CS7 = 0x200 CS8 = 0x300 CSIZE = 0x300 CSTOPB = 0x400 ECCGETLAYOUT = 0x41484d11 ECCGETSTATS = 0x40104d12 ECHOCTL = 0x40 ECHOE = 0x2 ECHOK = 0x4 ECHOKE = 0x1 ECHONL = 0x10 ECHOPRT = 0x20 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 EPIOCGPARAMS = 0x40088a02 EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000000 FF1 = 0x4000 FFDLY = 0x4000 FICLONE = 0x80049409 FICLONERANGE = 0x8020940d FLUSHO = 0x800000 FS_IOC_ENABLE_VERITY = 0x80806685 FS_IOC_GETFLAGS = 0x40086601 FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 FS_IOC_SETFLAGS = 0x80086602 FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 F_GETLK = 0x5 F_GETLK64 = 0xc F_GETOWN = 0x9 F_RDLCK = 0x0 F_SETLK = 0x6 F_SETLK64 = 0xd F_SETLKW = 0x7 F_SETLKW64 = 0xe F_SETOWN = 0x8 F_UNLCK = 0x2 F_WRLCK = 0x1 HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 HUPCL = 0x4000 ICANON = 0x100 IEXTEN = 0x400 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 ISIG = 0x80 IUCLC = 0x1000 IXOFF = 0x400 IXON = 0x200 MAP_ANON = 0x20 MAP_ANONYMOUS = 0x20 MAP_DENYWRITE = 0x800 MAP_EXECUTABLE = 0x1000 MAP_GROWSDOWN = 0x100 MAP_HUGETLB = 0x40000 MAP_LOCKED = 0x80 MAP_NONBLOCK = 0x10000 MAP_NORESERVE = 0x40 MAP_POPULATE = 0x8000 MAP_STACK = 0x20000 MAP_SYNC = 0x80000 MCL_CURRENT = 0x2000 MCL_FUTURE = 0x4000 MCL_ONFAULT = 0x8000 MEMERASE = 0x80084d02 MEMERASE64 = 0x80104d14 MEMGETBADBLOCK = 0x80084d0b MEMGETINFO = 0x40204d01 MEMGETOOBSEL = 0x40c84d0a MEMGETREGIONCOUNT = 0x40044d07 MEMISLOCKED = 0x40084d17 MEMLOCK = 0x80084d05 MEMREAD = 0xc0404d1a MEMREADOOB = 0xc0104d04 MEMSETBADBLOCK = 0x80084d0c MEMUNLOCK = 0x80084d06 MEMWRITEOOB = 0xc0104d03 MTDFILEMODE = 0x20004d13 NFDBITS = 0x40 NL2 = 0x200 NL3 = 0x300 NLDLY = 0x300 NOFLSH = 0x80000000 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 NS_GET_USERNS = 0x2000b701 OLCUC = 0x4 ONLCR = 0x2 OTPERASE = 0x800c4d19 OTPGETREGIONCOUNT = 0x80044d0e OTPGETREGIONINFO = 0x800c4d0f OTPLOCK = 0x400c4d10 OTPSELECT = 0x40044d0d 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_RSYNC = 0x101000 O_SYNC = 0x101000 O_TMPFILE = 0x404000 O_TRUNC = 0x200 PARENB = 0x1000 PARODD = 0x2000 PENDIN = 0x20000000 PERF_EVENT_IOC_DISABLE = 0x20002401 PERF_EVENT_IOC_ENABLE = 0x20002400 PERF_EVENT_IOC_ID = 0x40082407 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409 PERF_EVENT_IOC_PERIOD = 0x80082404 PERF_EVENT_IOC_QUERY_BPF = 0xc008240a PERF_EVENT_IOC_REFRESH = 0x20002402 PERF_EVENT_IOC_RESET = 0x20002403 PERF_EVENT_IOC_SET_BPF = 0x80042408 PERF_EVENT_IOC_SET_FILTER = 0x80082406 PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 PPPIOCATTACH = 0x8004743d PPPIOCATTCHAN = 0x80047438 PPPIOCBRIDGECHAN = 0x80047435 PPPIOCCONNECT = 0x8004743a PPPIOCDETACH = 0x8004743c PPPIOCDISCONN = 0x20007439 PPPIOCGASYNCMAP = 0x40047458 PPPIOCGCHAN = 0x40047437 PPPIOCGDEBUG = 0x40047441 PPPIOCGFLAGS = 0x4004745a PPPIOCGIDLE = 0x4010743f PPPIOCGIDLE32 = 0x4008743f PPPIOCGIDLE64 = 0x4010743f PPPIOCGL2TPSTATS = 0x40487436 PPPIOCGMRU = 0x40047453 PPPIOCGRASYNCMAP = 0x40047455 PPPIOCGUNIT = 0x40047456 PPPIOCGXASYNCMAP = 0x40207450 PPPIOCSACTIVE = 0x80107446 PPPIOCSASYNCMAP = 0x80047457 PPPIOCSCOMPRESS = 0x8010744d PPPIOCSDEBUG = 0x80047440 PPPIOCSFLAGS = 0x80047459 PPPIOCSMAXCID = 0x80047451 PPPIOCSMRRU = 0x8004743b PPPIOCSMRU = 0x80047452 PPPIOCSNPMODE = 0x8008744b PPPIOCSPASS = 0x80107447 PPPIOCSRASYNCMAP = 0x80047454 PPPIOCSXASYNCMAP = 0x8020744f PPPIOCUNBRIDGECHAN = 0x20007434 PPPIOCXFERUNIT = 0x2000744e PROT_SAO = 0x10 PR_SET_PTRACER_ANY = 0xffffffffffffffff PTRACE_GETEVRREGS = 0x14 PTRACE_GETFPREGS = 0xe PTRACE_GETREGS64 = 0x16 PTRACE_GETVRREGS = 0x12 PTRACE_GETVSRREGS = 0x1b PTRACE_GET_DEBUGREG = 0x19 PTRACE_SETEVRREGS = 0x15 PTRACE_SETFPREGS = 0xf PTRACE_SETREGS64 = 0x17 PTRACE_SETVRREGS = 0x13 PTRACE_SETVSRREGS = 0x1c PTRACE_SET_DEBUGREG = 0x1a PTRACE_SINGLEBLOCK = 0x100 PTRACE_SYSEMU = 0x1d PTRACE_SYSEMU_SINGLESTEP = 0x1e 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_MEMLOCK = 0x8 RLIMIT_NOFILE = 0x7 RLIMIT_NPROC = 0x6 RLIMIT_RSS = 0x5 RNDADDENTROPY = 0x80085203 RNDADDTOENTCNT = 0x80045201 RNDCLEARPOOL = 0x20005206 RNDGETENTCNT = 0x40045200 RNDGETPOOL = 0x40085202 RNDRESEEDCRNG = 0x20005207 RNDZAPENTCNT = 0x20005204 RTC_AIE_OFF = 0x20007002 RTC_AIE_ON = 0x20007001 RTC_ALM_READ = 0x40247008 RTC_ALM_SET = 0x80247007 RTC_EPOCH_READ = 0x4008700d RTC_EPOCH_SET = 0x8008700e RTC_IRQP_READ = 0x4008700b RTC_IRQP_SET = 0x8008700c RTC_PARAM_GET = 0x80187013 RTC_PARAM_SET = 0x80187014 RTC_PIE_OFF = 0x20007006 RTC_PIE_ON = 0x20007005 RTC_PLL_GET = 0x40207011 RTC_PLL_SET = 0x80207012 RTC_RD_TIME = 0x40247009 RTC_SET_TIME = 0x8024700a RTC_UIE_OFF = 0x20007004 RTC_UIE_ON = 0x20007003 RTC_VL_CLR = 0x20007014 RTC_VL_READ = 0x40047013 RTC_WIE_OFF = 0x20007010 RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 SIOCGPGRP = 0x8904 SIOCGSTAMPNS_NEW = 0x40108907 SIOCGSTAMP_NEW = 0x40108906 SIOCINQ = 0x4004667f SIOCOUTQ = 0x40047473 SIOCSPGRP = 0x8902 SOCK_CLOEXEC = 0x80000 SOCK_DGRAM = 0x2 SOCK_NONBLOCK = 0x800 SOCK_STREAM = 0x1 SOL_SOCKET = 0x1 SO_ACCEPTCONN = 0x1e SO_ATTACH_BPF = 0x32 SO_ATTACH_REUSEPORT_CBPF = 0x33 SO_ATTACH_REUSEPORT_EBPF = 0x34 SO_BINDTODEVICE = 0x19 SO_BINDTOIFINDEX = 0x3e SO_BPF_EXTENSIONS = 0x30 SO_BROADCAST = 0x6 SO_BSDCOMPAT = 0xe SO_BUF_LOCK = 0x48 SO_BUSY_POLL = 0x2e SO_BUSY_POLL_BUDGET = 0x46 SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f SO_MEMINFO = 0x37 SO_NETNS_COOKIE = 0x47 SO_NOFCS = 0x2b SO_OOBINLINE = 0xa SO_PASSCRED = 0x14 SO_PASSPIDFD = 0x4c SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x15 SO_PEERGROUPS = 0x3b SO_PEERPIDFD = 0x4d SO_PEERSEC = 0x1f SO_PREFER_BUSY_POLL = 0x45 SO_PROTOCOL = 0x26 SO_RCVBUF = 0x8 SO_RCVBUFFORCE = 0x21 SO_RCVLOWAT = 0x10 SO_RCVMARK = 0x4b SO_RCVTIMEO = 0x12 SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_OLD = 0x12 SO_RESERVE_MEM = 0x49 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_SNDTIMEO_NEW = 0x43 SO_SNDTIMEO_OLD = 0x13 SO_TIMESTAMPING = 0x25 SO_TIMESTAMPING_NEW = 0x41 SO_TIMESTAMPING_OLD = 0x25 SO_TIMESTAMPNS = 0x23 SO_TIMESTAMPNS_NEW = 0x40 SO_TIMESTAMPNS_OLD = 0x23 SO_TIMESTAMP_NEW = 0x3f SO_TXREHASH = 0x4a SO_TXTIME = 0x3d SO_TYPE = 0x3 SO_WIFI_STATUS = 0x29 SO_ZEROCOPY = 0x3c TAB1 = 0x400 TAB2 = 0x800 TAB3 = 0xc00 TABDLY = 0xc00 TCFLSH = 0x2000741f TCGETA = 0x40147417 TCGETS = 0x402c7413 TCSAFLUSH = 0x2 TCSBRK = 0x2000741d TCSBRKP = 0x5425 TCSETA = 0x80147418 TCSETAF = 0x8014741c TCSETAW = 0x80147419 TCSETS = 0x802c7414 TCSETSF = 0x802c7416 TCSETSW = 0x802c7415 TCXONC = 0x2000741e TFD_CLOEXEC = 0x80000 TFD_NONBLOCK = 0x800 TIOCCBRK = 0x5428 TIOCCONS = 0x541d TIOCEXCL = 0x540c TIOCGDEV = 0x40045432 TIOCGETC = 0x40067412 TIOCGETD = 0x5424 TIOCGETP = 0x40067408 TIOCGEXCL = 0x40045440 TIOCGICOUNT = 0x545d TIOCGISO7816 = 0x40285442 TIOCGLCKTRMIOS = 0x5456 TIOCGLTC = 0x40067474 TIOCGPGRP = 0x40047477 TIOCGPKT = 0x40045438 TIOCGPTLCK = 0x40045439 TIOCGPTN = 0x40045430 TIOCGPTPEER = 0x20005441 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_LOOP = 0x8000 TIOCM_OUT1 = 0x2000 TIOCM_OUT2 = 0x4000 TIOCM_RI = 0x80 TIOCM_RNG = 0x80 TIOCM_SR = 0x10 TIOCM_ST = 0x8 TIOCNOTTY = 0x5422 TIOCNXCL = 0x540d TIOCOUTQ = 0x40047473 TIOCPKT = 0x5420 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 TIOCSISO7816 = 0xc0285443 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 TUNGETDEVNETNS = 0x200054e3 TUNGETFEATURES = 0x400454cf TUNGETFILTER = 0x401054db TUNGETIFF = 0x400454d2 TUNGETSNDBUF = 0x400454d3 TUNGETVNETBE = 0x400454df TUNGETVNETHDRSZ = 0x400454d7 TUNGETVNETLE = 0x400454dd TUNSETCARRIER = 0x800454e2 TUNSETDEBUG = 0x800454c9 TUNSETFILTEREBPF = 0x400454e1 TUNSETGROUP = 0x800454ce TUNSETIFF = 0x800454ca TUNSETIFINDEX = 0x800454da TUNSETLINK = 0x800454cd TUNSETNOCSUM = 0x800454c8 TUNSETOFFLOAD = 0x800454d0 TUNSETOWNER = 0x800454cc TUNSETPERSIST = 0x800454cb TUNSETQUEUE = 0x800454d9 TUNSETSNDBUF = 0x800454d4 TUNSETSTEERINGEBPF = 0x400454e0 TUNSETTXFILTER = 0x800454d1 TUNSETVNETBE = 0x800454de TUNSETVNETHDRSZ = 0x800454d8 TUNSETVNETLE = 0x800454dc UBI_IOCATT = 0x80186f40 UBI_IOCDET = 0x80046f41 UBI_IOCEBCH = 0x80044f02 UBI_IOCEBER = 0x80044f01 UBI_IOCEBISMAP = 0x40044f05 UBI_IOCEBMAP = 0x80084f03 UBI_IOCEBUNMAP = 0x80044f04 UBI_IOCMKVOL = 0x80986f00 UBI_IOCRMVOL = 0x80046f01 UBI_IOCRNVOL = 0x91106f03 UBI_IOCRPEB = 0x80046f04 UBI_IOCRSVOL = 0x800c6f02 UBI_IOCSETVOLPROP = 0x80104f06 UBI_IOCSPEB = 0x80046f05 UBI_IOCVOLCRBLK = 0x80804f07 UBI_IOCVOLRMBLK = 0x20004f08 UBI_IOCVOLUP = 0x80084f00 VDISCARD = 0x10 VEOF = 0x4 VEOL = 0x6 VEOL2 = 0x8 VMIN = 0x5 VREPRINT = 0xb VSTART = 0xd VSTOP = 0xe VSUSP = 0xc VSWTC = 0x9 VT1 = 0x10000 VTDLY = 0x10000 VTIME = 0x7 VWERASE = 0xa WDIOC_GETBOOTSTATUS = 0x40045702 WDIOC_GETPRETIMEOUT = 0x40045709 WDIOC_GETSTATUS = 0x40045701 WDIOC_GETSUPPORT = 0x40285700 WDIOC_GETTEMP = 0x40045703 WDIOC_GETTIMELEFT = 0x4004570a WDIOC_GETTIMEOUT = 0x40045707 WDIOC_KEEPALIVE = 0x40045705 WDIOC_SETOPTIONS = 0x40045704 WORDSIZE = 0x40 XCASE = 0x4000 XTABS = 0xc00 _HIDIOCGRAWNAME = 0x40804804 _HIDIOCGRAWPHYS = 0x40404805 _HIDIOCGRAWUNIQ = 0x40404808 ) // Errors const ( EADDRINUSE = syscall.Errno(0x62) EADDRNOTAVAIL = syscall.Errno(0x63) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x61) EALREADY = syscall.Errno(0x72) EBADE = syscall.Errno(0x34) EBADFD = syscall.Errno(0x4d) EBADMSG = syscall.Errno(0x4a) EBADR = syscall.Errno(0x35) EBADRQC = syscall.Errno(0x38) EBADSLT = syscall.Errno(0x39) EBFONT = syscall.Errno(0x3b) ECANCELED = syscall.Errno(0x7d) 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) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) EIDRM = syscall.Errno(0x2b) EILSEQ = syscall.Errno(0x54) EINPROGRESS = syscall.Errno(0x73) EISCONN = syscall.Errno(0x6a) 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) 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) ENOANO = syscall.Errno(0x37) ENOBUFS = syscall.Errno(0x69) ENOCSI = syscall.Errno(0x32) ENODATA = syscall.Errno(0x3d) ENOKEY = syscall.Errno(0x7e) ENOLCK = syscall.Errno(0x25) ENOLINK = syscall.Errno(0x43) ENOMEDIUM = syscall.Errno(0x7b) ENOMSG = syscall.Errno(0x2a) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x5c) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x26) ENOTCONN = syscall.Errno(0x6b) ENOTEMPTY = syscall.Errno(0x27) ENOTNAM = syscall.Errno(0x76) ENOTRECOVERABLE = syscall.Errno(0x83) ENOTSOCK = syscall.Errno(0x58) ENOTSUP = syscall.Errno(0x5f) ENOTUNIQ = syscall.Errno(0x4c) EOPNOTSUPP = syscall.Errno(0x5f) EOVERFLOW = syscall.Errno(0x4b) EOWNERDEAD = syscall.Errno(0x82) EPFNOSUPPORT = syscall.Errno(0x60) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x5d) EPROTOTYPE = syscall.Errno(0x5b) EREMCHG = syscall.Errno(0x4e) EREMOTE = syscall.Errno(0x42) EREMOTEIO = syscall.Errno(0x79) ERESTART = syscall.Errno(0x55) ERFKILL = syscall.Errno(0x84) ESHUTDOWN = syscall.Errno(0x6c) ESOCKTNOSUPPORT = syscall.Errno(0x5e) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x74) ESTRPIPE = syscall.Errno(0x56) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x6e) ETOOMANYREFS = syscall.Errno(0x6d) EUCLEAN = syscall.Errno(0x75) EUNATCH = syscall.Errno(0x31) EUSERS = syscall.Errno(0x57) EXFULL = syscall.Errno(0x36) ) // Signals const ( SIGBUS = syscall.Signal(0x7) SIGCHLD = syscall.Signal(0x11) SIGCLD = syscall.Signal(0x11) SIGCONT = syscall.Signal(0x12) SIGIO = syscall.Signal(0x1d) SIGPOLL = syscall.Signal(0x1d) SIGPROF = syscall.Signal(0x1b) SIGPWR = syscall.Signal(0x1e) SIGSTKFLT = syscall.Signal(0x10) SIGSTOP = syscall.Signal(0x13) SIGSYS = syscall.Signal(0x1f) SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "no such device or address"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EAGAIN", "resource temporarily unavailable"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device or resource busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "invalid cross-device link"}, {19, "ENODEV", "no such device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "numerical result out of range"}, {35, "EDEADLK", "resource deadlock avoided"}, {36, "ENAMETOOLONG", "file name too long"}, {37, "ENOLCK", "no locks available"}, {38, "ENOSYS", "function not implemented"}, {39, "ENOTEMPTY", "directory not empty"}, {40, "ELOOP", "too many levels of symbolic links"}, {42, "ENOMSG", "no message of desired type"}, {43, "EIDRM", "identifier removed"}, {44, "ECHRNG", "channel number out of range"}, {45, "EL2NSYNC", "level 2 not synchronized"}, {46, "EL3HLT", "level 3 halted"}, {47, "EL3RST", "level 3 reset"}, {48, "ELNRNG", "link number out of range"}, {49, "EUNATCH", "protocol driver not attached"}, {50, "ENOCSI", "no CSI structure available"}, {51, "EL2HLT", "level 2 halted"}, {52, "EBADE", "invalid exchange"}, {53, "EBADR", "invalid request descriptor"}, {54, "EXFULL", "exchange full"}, {55, "ENOANO", "no anode"}, {56, "EBADRQC", "invalid request code"}, {57, "EBADSLT", "invalid slot"}, {58, "EDEADLOCK", "file locking deadlock error"}, {59, "EBFONT", "bad font file format"}, {60, "ENOSTR", "device not a stream"}, {61, "ENODATA", "no data available"}, {62, "ETIME", "timer expired"}, {63, "ENOSR", "out of streams resources"}, {64, "ENONET", "machine is not on the network"}, {65, "ENOPKG", "package not installed"}, {66, "EREMOTE", "object is remote"}, {67, "ENOLINK", "link has been severed"}, {68, "EADV", "advertise error"}, {69, "ESRMNT", "srmount error"}, {70, "ECOMM", "communication error on send"}, {71, "EPROTO", "protocol error"}, {72, "EMULTIHOP", "multihop attempted"}, {73, "EDOTDOT", "RFS specific error"}, {74, "EBADMSG", "bad message"}, {75, "EOVERFLOW", "value too large for defined data type"}, {76, "ENOTUNIQ", "name not unique on network"}, {77, "EBADFD", "file descriptor in bad state"}, {78, "EREMCHG", "remote address changed"}, {79, "ELIBACC", "can not access a needed shared library"}, {80, "ELIBBAD", "accessing a corrupted shared library"}, {81, "ELIBSCN", ".lib section in a.out corrupted"}, {82, "ELIBMAX", "attempting to link in too many shared libraries"}, {83, "ELIBEXEC", "cannot exec a shared library directly"}, {84, "EILSEQ", "invalid or incomplete multibyte or wide character"}, {85, "ERESTART", "interrupted system call should be restarted"}, {86, "ESTRPIPE", "streams pipe error"}, {87, "EUSERS", "too many users"}, {88, "ENOTSOCK", "socket operation on non-socket"}, {89, "EDESTADDRREQ", "destination address required"}, {90, "EMSGSIZE", "message too long"}, {91, "EPROTOTYPE", "protocol wrong type for socket"}, {92, "ENOPROTOOPT", "protocol not available"}, {93, "EPROTONOSUPPORT", "protocol not supported"}, {94, "ESOCKTNOSUPPORT", "socket type not supported"}, {95, "ENOTSUP", "operation not supported"}, {96, "EPFNOSUPPORT", "protocol family not supported"}, {97, "EAFNOSUPPORT", "address family not supported by protocol"}, {98, "EADDRINUSE", "address already in use"}, {99, "EADDRNOTAVAIL", "cannot assign requested address"}, {100, "ENETDOWN", "network is down"}, {101, "ENETUNREACH", "network is unreachable"}, {102, "ENETRESET", "network dropped connection on reset"}, {103, "ECONNABORTED", "software caused connection abort"}, {104, "ECONNRESET", "connection reset by peer"}, {105, "ENOBUFS", "no buffer space available"}, {106, "EISCONN", "transport endpoint is already connected"}, {107, "ENOTCONN", "transport endpoint is not connected"}, {108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"}, {109, "ETOOMANYREFS", "too many references: cannot splice"}, {110, "ETIMEDOUT", "connection timed out"}, {111, "ECONNREFUSED", "connection refused"}, {112, "EHOSTDOWN", "host is down"}, {113, "EHOSTUNREACH", "no route to host"}, {114, "EALREADY", "operation already in progress"}, {115, "EINPROGRESS", "operation now in progress"}, {116, "ESTALE", "stale file handle"}, {117, "EUCLEAN", "structure needs cleaning"}, {118, "ENOTNAM", "not a XENIX named type file"}, {119, "ENAVAIL", "no XENIX semaphores available"}, {120, "EISNAM", "is a named type file"}, {121, "EREMOTEIO", "remote I/O error"}, {122, "EDQUOT", "disk quota exceeded"}, {123, "ENOMEDIUM", "no medium found"}, {124, "EMEDIUMTYPE", "wrong medium type"}, {125, "ECANCELED", "operation canceled"}, {126, "ENOKEY", "required key not available"}, {127, "EKEYEXPIRED", "key has expired"}, {128, "EKEYREVOKED", "key has been revoked"}, {129, "EKEYREJECTED", "key was rejected by service"}, {130, "EOWNERDEAD", "owner died"}, {131, "ENOTRECOVERABLE", "state not recoverable"}, {132, "ERFKILL", "operation not possible due to RF-kill"}, {133, "EHWPOISON", "memory page has hardware error"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/breakpoint trap"}, {6, "SIGABRT", "aborted"}, {7, "SIGBUS", "bus error"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGUSR1", "user defined signal 1"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGUSR2", "user defined signal 2"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGSTKFLT", "stack fault"}, {17, "SIGCHLD", "child exited"}, {18, "SIGCONT", "continued"}, {19, "SIGSTOP", "stopped (signal)"}, {20, "SIGTSTP", "stopped"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGURG", "urgent I/O condition"}, {24, "SIGXCPU", "CPU time limit exceeded"}, {25, "SIGXFSZ", "file size limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window changed"}, {29, "SIGIO", "I/O possible"}, {30, "SIGPWR", "power failure"}, {31, "SIGSYS", "bad system call"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go ================================================ // mkerrors.sh -Wall -Werror -static -I/tmp/ppc64le/include // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64le && linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/ppc64le/include _const.go package unix import "syscall" const ( B1000000 = 0x17 B115200 = 0x11 B1152000 = 0x18 B1500000 = 0x19 B2000000 = 0x1a B230400 = 0x12 B2500000 = 0x1b B3000000 = 0x1c B3500000 = 0x1d B4000000 = 0x1e B460800 = 0x13 B500000 = 0x14 B57600 = 0x10 B576000 = 0x15 B921600 = 0x16 BLKALIGNOFF = 0x2000127a BLKBSZGET = 0x40081270 BLKBSZSET = 0x80081271 BLKDISCARD = 0x20001277 BLKDISCARDZEROES = 0x2000127c BLKFLSBUF = 0x20001261 BLKFRAGET = 0x20001265 BLKFRASET = 0x20001264 BLKGETDISKSEQ = 0x40081280 BLKGETSIZE = 0x20001260 BLKGETSIZE64 = 0x40081272 BLKIOMIN = 0x20001278 BLKIOOPT = 0x20001279 BLKPBSZGET = 0x2000127b BLKRAGET = 0x20001263 BLKRASET = 0x20001262 BLKROGET = 0x2000125e BLKROSET = 0x2000125d BLKROTATIONAL = 0x2000127e BLKRRPART = 0x2000125f BLKSECDISCARD = 0x2000127d BLKSECTGET = 0x20001267 BLKSECTSET = 0x20001266 BLKSSZGET = 0x20001268 BLKZEROOUT = 0x2000127f BOTHER = 0x1f BS1 = 0x8000 BSDLY = 0x8000 CBAUD = 0xff CBAUDEX = 0x0 CIBAUD = 0xff0000 CLOCAL = 0x8000 CR1 = 0x1000 CR2 = 0x2000 CR3 = 0x3000 CRDLY = 0x3000 CREAD = 0x800 CS6 = 0x100 CS7 = 0x200 CS8 = 0x300 CSIZE = 0x300 CSTOPB = 0x400 ECCGETLAYOUT = 0x41484d11 ECCGETSTATS = 0x40104d12 ECHOCTL = 0x40 ECHOE = 0x2 ECHOK = 0x4 ECHOKE = 0x1 ECHONL = 0x10 ECHOPRT = 0x20 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 EPIOCGPARAMS = 0x40088a02 EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000000 FF1 = 0x4000 FFDLY = 0x4000 FICLONE = 0x80049409 FICLONERANGE = 0x8020940d FLUSHO = 0x800000 FS_IOC_ENABLE_VERITY = 0x80806685 FS_IOC_GETFLAGS = 0x40086601 FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 FS_IOC_SETFLAGS = 0x80086602 FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 F_GETLK = 0x5 F_GETLK64 = 0xc F_GETOWN = 0x9 F_RDLCK = 0x0 F_SETLK = 0x6 F_SETLK64 = 0xd F_SETLKW = 0x7 F_SETLKW64 = 0xe F_SETOWN = 0x8 F_UNLCK = 0x2 F_WRLCK = 0x1 HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 HUPCL = 0x4000 ICANON = 0x100 IEXTEN = 0x400 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 ISIG = 0x80 IUCLC = 0x1000 IXOFF = 0x400 IXON = 0x200 MAP_ANON = 0x20 MAP_ANONYMOUS = 0x20 MAP_DENYWRITE = 0x800 MAP_EXECUTABLE = 0x1000 MAP_GROWSDOWN = 0x100 MAP_HUGETLB = 0x40000 MAP_LOCKED = 0x80 MAP_NONBLOCK = 0x10000 MAP_NORESERVE = 0x40 MAP_POPULATE = 0x8000 MAP_STACK = 0x20000 MAP_SYNC = 0x80000 MCL_CURRENT = 0x2000 MCL_FUTURE = 0x4000 MCL_ONFAULT = 0x8000 MEMERASE = 0x80084d02 MEMERASE64 = 0x80104d14 MEMGETBADBLOCK = 0x80084d0b MEMGETINFO = 0x40204d01 MEMGETOOBSEL = 0x40c84d0a MEMGETREGIONCOUNT = 0x40044d07 MEMISLOCKED = 0x40084d17 MEMLOCK = 0x80084d05 MEMREAD = 0xc0404d1a MEMREADOOB = 0xc0104d04 MEMSETBADBLOCK = 0x80084d0c MEMUNLOCK = 0x80084d06 MEMWRITEOOB = 0xc0104d03 MTDFILEMODE = 0x20004d13 NFDBITS = 0x40 NL2 = 0x200 NL3 = 0x300 NLDLY = 0x300 NOFLSH = 0x80000000 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 NS_GET_USERNS = 0x2000b701 OLCUC = 0x4 ONLCR = 0x2 OTPERASE = 0x800c4d19 OTPGETREGIONCOUNT = 0x80044d0e OTPGETREGIONINFO = 0x800c4d0f OTPLOCK = 0x400c4d10 OTPSELECT = 0x40044d0d 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_RSYNC = 0x101000 O_SYNC = 0x101000 O_TMPFILE = 0x404000 O_TRUNC = 0x200 PARENB = 0x1000 PARODD = 0x2000 PENDIN = 0x20000000 PERF_EVENT_IOC_DISABLE = 0x20002401 PERF_EVENT_IOC_ENABLE = 0x20002400 PERF_EVENT_IOC_ID = 0x40082407 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409 PERF_EVENT_IOC_PERIOD = 0x80082404 PERF_EVENT_IOC_QUERY_BPF = 0xc008240a PERF_EVENT_IOC_REFRESH = 0x20002402 PERF_EVENT_IOC_RESET = 0x20002403 PERF_EVENT_IOC_SET_BPF = 0x80042408 PERF_EVENT_IOC_SET_FILTER = 0x80082406 PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 PPPIOCATTACH = 0x8004743d PPPIOCATTCHAN = 0x80047438 PPPIOCBRIDGECHAN = 0x80047435 PPPIOCCONNECT = 0x8004743a PPPIOCDETACH = 0x8004743c PPPIOCDISCONN = 0x20007439 PPPIOCGASYNCMAP = 0x40047458 PPPIOCGCHAN = 0x40047437 PPPIOCGDEBUG = 0x40047441 PPPIOCGFLAGS = 0x4004745a PPPIOCGIDLE = 0x4010743f PPPIOCGIDLE32 = 0x4008743f PPPIOCGIDLE64 = 0x4010743f PPPIOCGL2TPSTATS = 0x40487436 PPPIOCGMRU = 0x40047453 PPPIOCGRASYNCMAP = 0x40047455 PPPIOCGUNIT = 0x40047456 PPPIOCGXASYNCMAP = 0x40207450 PPPIOCSACTIVE = 0x80107446 PPPIOCSASYNCMAP = 0x80047457 PPPIOCSCOMPRESS = 0x8010744d PPPIOCSDEBUG = 0x80047440 PPPIOCSFLAGS = 0x80047459 PPPIOCSMAXCID = 0x80047451 PPPIOCSMRRU = 0x8004743b PPPIOCSMRU = 0x80047452 PPPIOCSNPMODE = 0x8008744b PPPIOCSPASS = 0x80107447 PPPIOCSRASYNCMAP = 0x80047454 PPPIOCSXASYNCMAP = 0x8020744f PPPIOCUNBRIDGECHAN = 0x20007434 PPPIOCXFERUNIT = 0x2000744e PROT_SAO = 0x10 PR_SET_PTRACER_ANY = 0xffffffffffffffff PTRACE_GETEVRREGS = 0x14 PTRACE_GETFPREGS = 0xe PTRACE_GETREGS64 = 0x16 PTRACE_GETVRREGS = 0x12 PTRACE_GETVSRREGS = 0x1b PTRACE_GET_DEBUGREG = 0x19 PTRACE_SETEVRREGS = 0x15 PTRACE_SETFPREGS = 0xf PTRACE_SETREGS64 = 0x17 PTRACE_SETVRREGS = 0x13 PTRACE_SETVSRREGS = 0x1c PTRACE_SET_DEBUGREG = 0x1a PTRACE_SINGLEBLOCK = 0x100 PTRACE_SYSEMU = 0x1d PTRACE_SYSEMU_SINGLESTEP = 0x1e 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_MEMLOCK = 0x8 RLIMIT_NOFILE = 0x7 RLIMIT_NPROC = 0x6 RLIMIT_RSS = 0x5 RNDADDENTROPY = 0x80085203 RNDADDTOENTCNT = 0x80045201 RNDCLEARPOOL = 0x20005206 RNDGETENTCNT = 0x40045200 RNDGETPOOL = 0x40085202 RNDRESEEDCRNG = 0x20005207 RNDZAPENTCNT = 0x20005204 RTC_AIE_OFF = 0x20007002 RTC_AIE_ON = 0x20007001 RTC_ALM_READ = 0x40247008 RTC_ALM_SET = 0x80247007 RTC_EPOCH_READ = 0x4008700d RTC_EPOCH_SET = 0x8008700e RTC_IRQP_READ = 0x4008700b RTC_IRQP_SET = 0x8008700c RTC_PARAM_GET = 0x80187013 RTC_PARAM_SET = 0x80187014 RTC_PIE_OFF = 0x20007006 RTC_PIE_ON = 0x20007005 RTC_PLL_GET = 0x40207011 RTC_PLL_SET = 0x80207012 RTC_RD_TIME = 0x40247009 RTC_SET_TIME = 0x8024700a RTC_UIE_OFF = 0x20007004 RTC_UIE_ON = 0x20007003 RTC_VL_CLR = 0x20007014 RTC_VL_READ = 0x40047013 RTC_WIE_OFF = 0x20007010 RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 SIOCGPGRP = 0x8904 SIOCGSTAMPNS_NEW = 0x40108907 SIOCGSTAMP_NEW = 0x40108906 SIOCINQ = 0x4004667f SIOCOUTQ = 0x40047473 SIOCSPGRP = 0x8902 SOCK_CLOEXEC = 0x80000 SOCK_DGRAM = 0x2 SOCK_NONBLOCK = 0x800 SOCK_STREAM = 0x1 SOL_SOCKET = 0x1 SO_ACCEPTCONN = 0x1e SO_ATTACH_BPF = 0x32 SO_ATTACH_REUSEPORT_CBPF = 0x33 SO_ATTACH_REUSEPORT_EBPF = 0x34 SO_BINDTODEVICE = 0x19 SO_BINDTOIFINDEX = 0x3e SO_BPF_EXTENSIONS = 0x30 SO_BROADCAST = 0x6 SO_BSDCOMPAT = 0xe SO_BUF_LOCK = 0x48 SO_BUSY_POLL = 0x2e SO_BUSY_POLL_BUDGET = 0x46 SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f SO_MEMINFO = 0x37 SO_NETNS_COOKIE = 0x47 SO_NOFCS = 0x2b SO_OOBINLINE = 0xa SO_PASSCRED = 0x14 SO_PASSPIDFD = 0x4c SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x15 SO_PEERGROUPS = 0x3b SO_PEERPIDFD = 0x4d SO_PEERSEC = 0x1f SO_PREFER_BUSY_POLL = 0x45 SO_PROTOCOL = 0x26 SO_RCVBUF = 0x8 SO_RCVBUFFORCE = 0x21 SO_RCVLOWAT = 0x10 SO_RCVMARK = 0x4b SO_RCVTIMEO = 0x12 SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_OLD = 0x12 SO_RESERVE_MEM = 0x49 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_SNDTIMEO_NEW = 0x43 SO_SNDTIMEO_OLD = 0x13 SO_TIMESTAMPING = 0x25 SO_TIMESTAMPING_NEW = 0x41 SO_TIMESTAMPING_OLD = 0x25 SO_TIMESTAMPNS = 0x23 SO_TIMESTAMPNS_NEW = 0x40 SO_TIMESTAMPNS_OLD = 0x23 SO_TIMESTAMP_NEW = 0x3f SO_TXREHASH = 0x4a SO_TXTIME = 0x3d SO_TYPE = 0x3 SO_WIFI_STATUS = 0x29 SO_ZEROCOPY = 0x3c TAB1 = 0x400 TAB2 = 0x800 TAB3 = 0xc00 TABDLY = 0xc00 TCFLSH = 0x2000741f TCGETA = 0x40147417 TCGETS = 0x402c7413 TCSAFLUSH = 0x2 TCSBRK = 0x2000741d TCSBRKP = 0x5425 TCSETA = 0x80147418 TCSETAF = 0x8014741c TCSETAW = 0x80147419 TCSETS = 0x802c7414 TCSETSF = 0x802c7416 TCSETSW = 0x802c7415 TCXONC = 0x2000741e TFD_CLOEXEC = 0x80000 TFD_NONBLOCK = 0x800 TIOCCBRK = 0x5428 TIOCCONS = 0x541d TIOCEXCL = 0x540c TIOCGDEV = 0x40045432 TIOCGETC = 0x40067412 TIOCGETD = 0x5424 TIOCGETP = 0x40067408 TIOCGEXCL = 0x40045440 TIOCGICOUNT = 0x545d TIOCGISO7816 = 0x40285442 TIOCGLCKTRMIOS = 0x5456 TIOCGLTC = 0x40067474 TIOCGPGRP = 0x40047477 TIOCGPKT = 0x40045438 TIOCGPTLCK = 0x40045439 TIOCGPTN = 0x40045430 TIOCGPTPEER = 0x20005441 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_LOOP = 0x8000 TIOCM_OUT1 = 0x2000 TIOCM_OUT2 = 0x4000 TIOCM_RI = 0x80 TIOCM_RNG = 0x80 TIOCM_SR = 0x10 TIOCM_ST = 0x8 TIOCNOTTY = 0x5422 TIOCNXCL = 0x540d TIOCOUTQ = 0x40047473 TIOCPKT = 0x5420 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 TIOCSISO7816 = 0xc0285443 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 TUNGETDEVNETNS = 0x200054e3 TUNGETFEATURES = 0x400454cf TUNGETFILTER = 0x401054db TUNGETIFF = 0x400454d2 TUNGETSNDBUF = 0x400454d3 TUNGETVNETBE = 0x400454df TUNGETVNETHDRSZ = 0x400454d7 TUNGETVNETLE = 0x400454dd TUNSETCARRIER = 0x800454e2 TUNSETDEBUG = 0x800454c9 TUNSETFILTEREBPF = 0x400454e1 TUNSETGROUP = 0x800454ce TUNSETIFF = 0x800454ca TUNSETIFINDEX = 0x800454da TUNSETLINK = 0x800454cd TUNSETNOCSUM = 0x800454c8 TUNSETOFFLOAD = 0x800454d0 TUNSETOWNER = 0x800454cc TUNSETPERSIST = 0x800454cb TUNSETQUEUE = 0x800454d9 TUNSETSNDBUF = 0x800454d4 TUNSETSTEERINGEBPF = 0x400454e0 TUNSETTXFILTER = 0x800454d1 TUNSETVNETBE = 0x800454de TUNSETVNETHDRSZ = 0x800454d8 TUNSETVNETLE = 0x800454dc UBI_IOCATT = 0x80186f40 UBI_IOCDET = 0x80046f41 UBI_IOCEBCH = 0x80044f02 UBI_IOCEBER = 0x80044f01 UBI_IOCEBISMAP = 0x40044f05 UBI_IOCEBMAP = 0x80084f03 UBI_IOCEBUNMAP = 0x80044f04 UBI_IOCMKVOL = 0x80986f00 UBI_IOCRMVOL = 0x80046f01 UBI_IOCRNVOL = 0x91106f03 UBI_IOCRPEB = 0x80046f04 UBI_IOCRSVOL = 0x800c6f02 UBI_IOCSETVOLPROP = 0x80104f06 UBI_IOCSPEB = 0x80046f05 UBI_IOCVOLCRBLK = 0x80804f07 UBI_IOCVOLRMBLK = 0x20004f08 UBI_IOCVOLUP = 0x80084f00 VDISCARD = 0x10 VEOF = 0x4 VEOL = 0x6 VEOL2 = 0x8 VMIN = 0x5 VREPRINT = 0xb VSTART = 0xd VSTOP = 0xe VSUSP = 0xc VSWTC = 0x9 VT1 = 0x10000 VTDLY = 0x10000 VTIME = 0x7 VWERASE = 0xa WDIOC_GETBOOTSTATUS = 0x40045702 WDIOC_GETPRETIMEOUT = 0x40045709 WDIOC_GETSTATUS = 0x40045701 WDIOC_GETSUPPORT = 0x40285700 WDIOC_GETTEMP = 0x40045703 WDIOC_GETTIMELEFT = 0x4004570a WDIOC_GETTIMEOUT = 0x40045707 WDIOC_KEEPALIVE = 0x40045705 WDIOC_SETOPTIONS = 0x40045704 WORDSIZE = 0x40 XCASE = 0x4000 XTABS = 0xc00 _HIDIOCGRAWNAME = 0x40804804 _HIDIOCGRAWPHYS = 0x40404805 _HIDIOCGRAWUNIQ = 0x40404808 ) // Errors const ( EADDRINUSE = syscall.Errno(0x62) EADDRNOTAVAIL = syscall.Errno(0x63) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x61) EALREADY = syscall.Errno(0x72) EBADE = syscall.Errno(0x34) EBADFD = syscall.Errno(0x4d) EBADMSG = syscall.Errno(0x4a) EBADR = syscall.Errno(0x35) EBADRQC = syscall.Errno(0x38) EBADSLT = syscall.Errno(0x39) EBFONT = syscall.Errno(0x3b) ECANCELED = syscall.Errno(0x7d) 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) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) EIDRM = syscall.Errno(0x2b) EILSEQ = syscall.Errno(0x54) EINPROGRESS = syscall.Errno(0x73) EISCONN = syscall.Errno(0x6a) 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) 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) ENOANO = syscall.Errno(0x37) ENOBUFS = syscall.Errno(0x69) ENOCSI = syscall.Errno(0x32) ENODATA = syscall.Errno(0x3d) ENOKEY = syscall.Errno(0x7e) ENOLCK = syscall.Errno(0x25) ENOLINK = syscall.Errno(0x43) ENOMEDIUM = syscall.Errno(0x7b) ENOMSG = syscall.Errno(0x2a) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x5c) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x26) ENOTCONN = syscall.Errno(0x6b) ENOTEMPTY = syscall.Errno(0x27) ENOTNAM = syscall.Errno(0x76) ENOTRECOVERABLE = syscall.Errno(0x83) ENOTSOCK = syscall.Errno(0x58) ENOTSUP = syscall.Errno(0x5f) ENOTUNIQ = syscall.Errno(0x4c) EOPNOTSUPP = syscall.Errno(0x5f) EOVERFLOW = syscall.Errno(0x4b) EOWNERDEAD = syscall.Errno(0x82) EPFNOSUPPORT = syscall.Errno(0x60) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x5d) EPROTOTYPE = syscall.Errno(0x5b) EREMCHG = syscall.Errno(0x4e) EREMOTE = syscall.Errno(0x42) EREMOTEIO = syscall.Errno(0x79) ERESTART = syscall.Errno(0x55) ERFKILL = syscall.Errno(0x84) ESHUTDOWN = syscall.Errno(0x6c) ESOCKTNOSUPPORT = syscall.Errno(0x5e) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x74) ESTRPIPE = syscall.Errno(0x56) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x6e) ETOOMANYREFS = syscall.Errno(0x6d) EUCLEAN = syscall.Errno(0x75) EUNATCH = syscall.Errno(0x31) EUSERS = syscall.Errno(0x57) EXFULL = syscall.Errno(0x36) ) // Signals const ( SIGBUS = syscall.Signal(0x7) SIGCHLD = syscall.Signal(0x11) SIGCLD = syscall.Signal(0x11) SIGCONT = syscall.Signal(0x12) SIGIO = syscall.Signal(0x1d) SIGPOLL = syscall.Signal(0x1d) SIGPROF = syscall.Signal(0x1b) SIGPWR = syscall.Signal(0x1e) SIGSTKFLT = syscall.Signal(0x10) SIGSTOP = syscall.Signal(0x13) SIGSYS = syscall.Signal(0x1f) SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "no such device or address"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EAGAIN", "resource temporarily unavailable"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device or resource busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "invalid cross-device link"}, {19, "ENODEV", "no such device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "numerical result out of range"}, {35, "EDEADLK", "resource deadlock avoided"}, {36, "ENAMETOOLONG", "file name too long"}, {37, "ENOLCK", "no locks available"}, {38, "ENOSYS", "function not implemented"}, {39, "ENOTEMPTY", "directory not empty"}, {40, "ELOOP", "too many levels of symbolic links"}, {42, "ENOMSG", "no message of desired type"}, {43, "EIDRM", "identifier removed"}, {44, "ECHRNG", "channel number out of range"}, {45, "EL2NSYNC", "level 2 not synchronized"}, {46, "EL3HLT", "level 3 halted"}, {47, "EL3RST", "level 3 reset"}, {48, "ELNRNG", "link number out of range"}, {49, "EUNATCH", "protocol driver not attached"}, {50, "ENOCSI", "no CSI structure available"}, {51, "EL2HLT", "level 2 halted"}, {52, "EBADE", "invalid exchange"}, {53, "EBADR", "invalid request descriptor"}, {54, "EXFULL", "exchange full"}, {55, "ENOANO", "no anode"}, {56, "EBADRQC", "invalid request code"}, {57, "EBADSLT", "invalid slot"}, {58, "EDEADLOCK", "file locking deadlock error"}, {59, "EBFONT", "bad font file format"}, {60, "ENOSTR", "device not a stream"}, {61, "ENODATA", "no data available"}, {62, "ETIME", "timer expired"}, {63, "ENOSR", "out of streams resources"}, {64, "ENONET", "machine is not on the network"}, {65, "ENOPKG", "package not installed"}, {66, "EREMOTE", "object is remote"}, {67, "ENOLINK", "link has been severed"}, {68, "EADV", "advertise error"}, {69, "ESRMNT", "srmount error"}, {70, "ECOMM", "communication error on send"}, {71, "EPROTO", "protocol error"}, {72, "EMULTIHOP", "multihop attempted"}, {73, "EDOTDOT", "RFS specific error"}, {74, "EBADMSG", "bad message"}, {75, "EOVERFLOW", "value too large for defined data type"}, {76, "ENOTUNIQ", "name not unique on network"}, {77, "EBADFD", "file descriptor in bad state"}, {78, "EREMCHG", "remote address changed"}, {79, "ELIBACC", "can not access a needed shared library"}, {80, "ELIBBAD", "accessing a corrupted shared library"}, {81, "ELIBSCN", ".lib section in a.out corrupted"}, {82, "ELIBMAX", "attempting to link in too many shared libraries"}, {83, "ELIBEXEC", "cannot exec a shared library directly"}, {84, "EILSEQ", "invalid or incomplete multibyte or wide character"}, {85, "ERESTART", "interrupted system call should be restarted"}, {86, "ESTRPIPE", "streams pipe error"}, {87, "EUSERS", "too many users"}, {88, "ENOTSOCK", "socket operation on non-socket"}, {89, "EDESTADDRREQ", "destination address required"}, {90, "EMSGSIZE", "message too long"}, {91, "EPROTOTYPE", "protocol wrong type for socket"}, {92, "ENOPROTOOPT", "protocol not available"}, {93, "EPROTONOSUPPORT", "protocol not supported"}, {94, "ESOCKTNOSUPPORT", "socket type not supported"}, {95, "ENOTSUP", "operation not supported"}, {96, "EPFNOSUPPORT", "protocol family not supported"}, {97, "EAFNOSUPPORT", "address family not supported by protocol"}, {98, "EADDRINUSE", "address already in use"}, {99, "EADDRNOTAVAIL", "cannot assign requested address"}, {100, "ENETDOWN", "network is down"}, {101, "ENETUNREACH", "network is unreachable"}, {102, "ENETRESET", "network dropped connection on reset"}, {103, "ECONNABORTED", "software caused connection abort"}, {104, "ECONNRESET", "connection reset by peer"}, {105, "ENOBUFS", "no buffer space available"}, {106, "EISCONN", "transport endpoint is already connected"}, {107, "ENOTCONN", "transport endpoint is not connected"}, {108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"}, {109, "ETOOMANYREFS", "too many references: cannot splice"}, {110, "ETIMEDOUT", "connection timed out"}, {111, "ECONNREFUSED", "connection refused"}, {112, "EHOSTDOWN", "host is down"}, {113, "EHOSTUNREACH", "no route to host"}, {114, "EALREADY", "operation already in progress"}, {115, "EINPROGRESS", "operation now in progress"}, {116, "ESTALE", "stale file handle"}, {117, "EUCLEAN", "structure needs cleaning"}, {118, "ENOTNAM", "not a XENIX named type file"}, {119, "ENAVAIL", "no XENIX semaphores available"}, {120, "EISNAM", "is a named type file"}, {121, "EREMOTEIO", "remote I/O error"}, {122, "EDQUOT", "disk quota exceeded"}, {123, "ENOMEDIUM", "no medium found"}, {124, "EMEDIUMTYPE", "wrong medium type"}, {125, "ECANCELED", "operation canceled"}, {126, "ENOKEY", "required key not available"}, {127, "EKEYEXPIRED", "key has expired"}, {128, "EKEYREVOKED", "key has been revoked"}, {129, "EKEYREJECTED", "key was rejected by service"}, {130, "EOWNERDEAD", "owner died"}, {131, "ENOTRECOVERABLE", "state not recoverable"}, {132, "ERFKILL", "operation not possible due to RF-kill"}, {133, "EHWPOISON", "memory page has hardware error"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/breakpoint trap"}, {6, "SIGABRT", "aborted"}, {7, "SIGBUS", "bus error"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGUSR1", "user defined signal 1"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGUSR2", "user defined signal 2"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGSTKFLT", "stack fault"}, {17, "SIGCHLD", "child exited"}, {18, "SIGCONT", "continued"}, {19, "SIGSTOP", "stopped (signal)"}, {20, "SIGTSTP", "stopped"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGURG", "urgent I/O condition"}, {24, "SIGXCPU", "CPU time limit exceeded"}, {25, "SIGXFSZ", "file size limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window changed"}, {29, "SIGIO", "I/O possible"}, {30, "SIGPWR", "power failure"}, {31, "SIGSYS", "bad system call"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go ================================================ // mkerrors.sh -Wall -Werror -static -I/tmp/riscv64/include // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/riscv64/include _const.go package unix import "syscall" const ( B1000000 = 0x1008 B115200 = 0x1002 B1152000 = 0x1009 B1500000 = 0x100a B2000000 = 0x100b B230400 = 0x1003 B2500000 = 0x100c B3000000 = 0x100d B3500000 = 0x100e B4000000 = 0x100f B460800 = 0x1004 B500000 = 0x1005 B57600 = 0x1001 B576000 = 0x1006 B921600 = 0x1007 BLKALIGNOFF = 0x127a BLKBSZGET = 0x80081270 BLKBSZSET = 0x40081271 BLKDISCARD = 0x1277 BLKDISCARDZEROES = 0x127c BLKFLSBUF = 0x1261 BLKFRAGET = 0x1265 BLKFRASET = 0x1264 BLKGETDISKSEQ = 0x80081280 BLKGETSIZE = 0x1260 BLKGETSIZE64 = 0x80081272 BLKIOMIN = 0x1278 BLKIOOPT = 0x1279 BLKPBSZGET = 0x127b BLKRAGET = 0x1263 BLKRASET = 0x1262 BLKROGET = 0x125e BLKROSET = 0x125d BLKROTATIONAL = 0x127e BLKRRPART = 0x125f BLKSECDISCARD = 0x127d BLKSECTGET = 0x1267 BLKSECTSET = 0x1266 BLKSSZGET = 0x1268 BLKZEROOUT = 0x127f BOTHER = 0x1000 BS1 = 0x2000 BSDLY = 0x2000 CBAUD = 0x100f CBAUDEX = 0x1000 CIBAUD = 0x100f0000 CLOCAL = 0x800 CR1 = 0x200 CR2 = 0x400 CR3 = 0x600 CRDLY = 0x600 CREAD = 0x80 CS6 = 0x10 CS7 = 0x20 CS8 = 0x30 CSIZE = 0x30 CSTOPB = 0x40 ECCGETLAYOUT = 0x81484d11 ECCGETSTATS = 0x80104d12 ECHOCTL = 0x200 ECHOE = 0x10 ECHOK = 0x20 ECHOKE = 0x800 ECHONL = 0x40 ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 EPIOCGPARAMS = 0x80088a02 EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 FFDLY = 0x8000 FICLONE = 0x40049409 FICLONERANGE = 0x4020940d FLUSHO = 0x1000 FS_IOC_ENABLE_VERITY = 0x40806685 FS_IOC_GETFLAGS = 0x80086601 FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 FS_IOC_SETFLAGS = 0x40086602 FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 F_GETLK = 0x5 F_GETLK64 = 0x5 F_GETOWN = 0x9 F_RDLCK = 0x0 F_SETLK = 0x6 F_SETLK64 = 0x6 F_SETLKW = 0x7 F_SETLKW64 = 0x7 F_SETOWN = 0x8 F_UNLCK = 0x2 F_WRLCK = 0x1 HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 ISIG = 0x1 IUCLC = 0x200 IXOFF = 0x1000 IXON = 0x400 MAP_ANON = 0x20 MAP_ANONYMOUS = 0x20 MAP_DENYWRITE = 0x800 MAP_EXECUTABLE = 0x1000 MAP_GROWSDOWN = 0x100 MAP_HUGETLB = 0x40000 MAP_LOCKED = 0x2000 MAP_NONBLOCK = 0x10000 MAP_NORESERVE = 0x4000 MAP_POPULATE = 0x8000 MAP_STACK = 0x20000 MAP_SYNC = 0x80000 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MCL_ONFAULT = 0x4 MEMERASE = 0x40084d02 MEMERASE64 = 0x40104d14 MEMGETBADBLOCK = 0x40084d0b MEMGETINFO = 0x80204d01 MEMGETOOBSEL = 0x80c84d0a MEMGETREGIONCOUNT = 0x80044d07 MEMISLOCKED = 0x80084d17 MEMLOCK = 0x40084d05 MEMREAD = 0xc0404d1a MEMREADOOB = 0xc0104d04 MEMSETBADBLOCK = 0x40084d0c MEMUNLOCK = 0x40084d06 MEMWRITEOOB = 0xc0104d03 MTDFILEMODE = 0x4d13 NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 OTPERASE = 0x400c4d19 OTPGETREGIONCOUNT = 0x40044d0e OTPGETREGIONINFO = 0x400c4d0f OTPLOCK = 0x800c4d10 OTPSELECT = 0x80044d0d 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_RSYNC = 0x101000 O_SYNC = 0x101000 O_TMPFILE = 0x410000 O_TRUNC = 0x200 PARENB = 0x100 PARODD = 0x200 PENDIN = 0x4000 PERF_EVENT_IOC_DISABLE = 0x2401 PERF_EVENT_IOC_ENABLE = 0x2400 PERF_EVENT_IOC_ID = 0x80082407 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409 PERF_EVENT_IOC_PERIOD = 0x40082404 PERF_EVENT_IOC_QUERY_BPF = 0xc008240a PERF_EVENT_IOC_REFRESH = 0x2402 PERF_EVENT_IOC_RESET = 0x2403 PERF_EVENT_IOC_SET_BPF = 0x40042408 PERF_EVENT_IOC_SET_FILTER = 0x40082406 PERF_EVENT_IOC_SET_OUTPUT = 0x2405 PPPIOCATTACH = 0x4004743d PPPIOCATTCHAN = 0x40047438 PPPIOCBRIDGECHAN = 0x40047435 PPPIOCCONNECT = 0x4004743a PPPIOCDETACH = 0x4004743c PPPIOCDISCONN = 0x7439 PPPIOCGASYNCMAP = 0x80047458 PPPIOCGCHAN = 0x80047437 PPPIOCGDEBUG = 0x80047441 PPPIOCGFLAGS = 0x8004745a PPPIOCGIDLE = 0x8010743f PPPIOCGIDLE32 = 0x8008743f PPPIOCGIDLE64 = 0x8010743f PPPIOCGL2TPSTATS = 0x80487436 PPPIOCGMRU = 0x80047453 PPPIOCGRASYNCMAP = 0x80047455 PPPIOCGUNIT = 0x80047456 PPPIOCGXASYNCMAP = 0x80207450 PPPIOCSACTIVE = 0x40107446 PPPIOCSASYNCMAP = 0x40047457 PPPIOCSCOMPRESS = 0x4010744d PPPIOCSDEBUG = 0x40047440 PPPIOCSFLAGS = 0x40047459 PPPIOCSMAXCID = 0x40047451 PPPIOCSMRRU = 0x4004743b PPPIOCSMRU = 0x40047452 PPPIOCSNPMODE = 0x4008744b PPPIOCSPASS = 0x40107447 PPPIOCSRASYNCMAP = 0x40047454 PPPIOCSXASYNCMAP = 0x4020744f PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PR_SET_PTRACER_ANY = 0xffffffffffffffff PTRACE_GETFDPIC = 0x21 PTRACE_GETFDPIC_EXEC = 0x0 PTRACE_GETFDPIC_INTERP = 0x1 RLIMIT_AS = 0x9 RLIMIT_MEMLOCK = 0x8 RLIMIT_NOFILE = 0x7 RLIMIT_NPROC = 0x6 RLIMIT_RSS = 0x5 RNDADDENTROPY = 0x40085203 RNDADDTOENTCNT = 0x40045201 RNDCLEARPOOL = 0x5206 RNDGETENTCNT = 0x80045200 RNDGETPOOL = 0x80085202 RNDRESEEDCRNG = 0x5207 RNDZAPENTCNT = 0x5204 RTC_AIE_OFF = 0x7002 RTC_AIE_ON = 0x7001 RTC_ALM_READ = 0x80247008 RTC_ALM_SET = 0x40247007 RTC_EPOCH_READ = 0x8008700d RTC_EPOCH_SET = 0x4008700e RTC_IRQP_READ = 0x8008700b RTC_IRQP_SET = 0x4008700c RTC_PARAM_GET = 0x40187013 RTC_PARAM_SET = 0x40187014 RTC_PIE_OFF = 0x7006 RTC_PIE_ON = 0x7005 RTC_PLL_GET = 0x80207011 RTC_PLL_SET = 0x40207012 RTC_RD_TIME = 0x80247009 RTC_SET_TIME = 0x4024700a RTC_UIE_OFF = 0x7004 RTC_UIE_ON = 0x7003 RTC_VL_CLR = 0x7014 RTC_VL_READ = 0x80047013 RTC_WIE_OFF = 0x7010 RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 SIOCGPGRP = 0x8904 SIOCGSTAMPNS_NEW = 0x80108907 SIOCGSTAMP_NEW = 0x80108906 SIOCINQ = 0x541b SIOCOUTQ = 0x5411 SIOCSPGRP = 0x8902 SOCK_CLOEXEC = 0x80000 SOCK_DGRAM = 0x2 SOCK_NONBLOCK = 0x800 SOCK_STREAM = 0x1 SOL_SOCKET = 0x1 SO_ACCEPTCONN = 0x1e SO_ATTACH_BPF = 0x32 SO_ATTACH_REUSEPORT_CBPF = 0x33 SO_ATTACH_REUSEPORT_EBPF = 0x34 SO_BINDTODEVICE = 0x19 SO_BINDTOIFINDEX = 0x3e SO_BPF_EXTENSIONS = 0x30 SO_BROADCAST = 0x6 SO_BSDCOMPAT = 0xe SO_BUF_LOCK = 0x48 SO_BUSY_POLL = 0x2e SO_BUSY_POLL_BUDGET = 0x46 SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f SO_MEMINFO = 0x37 SO_NETNS_COOKIE = 0x47 SO_NOFCS = 0x2b SO_OOBINLINE = 0xa SO_PASSCRED = 0x10 SO_PASSPIDFD = 0x4c SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 SO_PEERGROUPS = 0x3b SO_PEERPIDFD = 0x4d SO_PEERSEC = 0x1f SO_PREFER_BUSY_POLL = 0x45 SO_PROTOCOL = 0x26 SO_RCVBUF = 0x8 SO_RCVBUFFORCE = 0x21 SO_RCVLOWAT = 0x12 SO_RCVMARK = 0x4b SO_RCVTIMEO = 0x14 SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_OLD = 0x14 SO_RESERVE_MEM = 0x49 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_SNDTIMEO_NEW = 0x43 SO_SNDTIMEO_OLD = 0x15 SO_TIMESTAMPING = 0x25 SO_TIMESTAMPING_NEW = 0x41 SO_TIMESTAMPING_OLD = 0x25 SO_TIMESTAMPNS = 0x23 SO_TIMESTAMPNS_NEW = 0x40 SO_TIMESTAMPNS_OLD = 0x23 SO_TIMESTAMP_NEW = 0x3f SO_TXREHASH = 0x4a SO_TXTIME = 0x3d SO_TYPE = 0x3 SO_WIFI_STATUS = 0x29 SO_ZEROCOPY = 0x3c TAB1 = 0x800 TAB2 = 0x1000 TAB3 = 0x1800 TABDLY = 0x1800 TCFLSH = 0x540b TCGETA = 0x5405 TCGETS = 0x5401 TCGETS2 = 0x802c542a TCGETX = 0x5432 TCSAFLUSH = 0x2 TCSBRK = 0x5409 TCSBRKP = 0x5425 TCSETA = 0x5406 TCSETAF = 0x5408 TCSETAW = 0x5407 TCSETS = 0x5402 TCSETS2 = 0x402c542b TCSETSF = 0x5404 TCSETSF2 = 0x402c542d TCSETSW = 0x5403 TCSETSW2 = 0x402c542c TCSETX = 0x5433 TCSETXF = 0x5434 TCSETXW = 0x5435 TCXONC = 0x540a TFD_CLOEXEC = 0x80000 TFD_NONBLOCK = 0x800 TIOCCBRK = 0x5428 TIOCCONS = 0x541d TIOCEXCL = 0x540c TIOCGDEV = 0x80045432 TIOCGETD = 0x5424 TIOCGEXCL = 0x80045440 TIOCGICOUNT = 0x545d TIOCGISO7816 = 0x80285442 TIOCGLCKTRMIOS = 0x5456 TIOCGPGRP = 0x540f TIOCGPKT = 0x80045438 TIOCGPTLCK = 0x80045439 TIOCGPTN = 0x80045430 TIOCGPTPEER = 0x5441 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_RI = 0x80 TIOCM_RNG = 0x80 TIOCM_SR = 0x10 TIOCM_ST = 0x8 TIOCNOTTY = 0x5422 TIOCNXCL = 0x540d TIOCOUTQ = 0x5411 TIOCPKT = 0x5420 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 TIOCSISO7816 = 0xc0285443 TIOCSLCKTRMIOS = 0x5457 TIOCSPGRP = 0x5410 TIOCSPTLCK = 0x40045431 TIOCSRS485 = 0x542f TIOCSSERIAL = 0x541f TIOCSSOFTCAR = 0x541a TIOCSTI = 0x5412 TIOCSWINSZ = 0x5414 TIOCVHANGUP = 0x5437 TOSTOP = 0x100 TUNATTACHFILTER = 0x401054d5 TUNDETACHFILTER = 0x401054d6 TUNGETDEVNETNS = 0x54e3 TUNGETFEATURES = 0x800454cf TUNGETFILTER = 0x801054db TUNGETIFF = 0x800454d2 TUNGETSNDBUF = 0x800454d3 TUNGETVNETBE = 0x800454df TUNGETVNETHDRSZ = 0x800454d7 TUNGETVNETLE = 0x800454dd TUNSETCARRIER = 0x400454e2 TUNSETDEBUG = 0x400454c9 TUNSETFILTEREBPF = 0x800454e1 TUNSETGROUP = 0x400454ce TUNSETIFF = 0x400454ca TUNSETIFINDEX = 0x400454da TUNSETLINK = 0x400454cd TUNSETNOCSUM = 0x400454c8 TUNSETOFFLOAD = 0x400454d0 TUNSETOWNER = 0x400454cc TUNSETPERSIST = 0x400454cb TUNSETQUEUE = 0x400454d9 TUNSETSNDBUF = 0x400454d4 TUNSETSTEERINGEBPF = 0x800454e0 TUNSETTXFILTER = 0x400454d1 TUNSETVNETBE = 0x400454de TUNSETVNETHDRSZ = 0x400454d8 TUNSETVNETLE = 0x400454dc UBI_IOCATT = 0x40186f40 UBI_IOCDET = 0x40046f41 UBI_IOCEBCH = 0x40044f02 UBI_IOCEBER = 0x40044f01 UBI_IOCEBISMAP = 0x80044f05 UBI_IOCEBMAP = 0x40084f03 UBI_IOCEBUNMAP = 0x40044f04 UBI_IOCMKVOL = 0x40986f00 UBI_IOCRMVOL = 0x40046f01 UBI_IOCRNVOL = 0x51106f03 UBI_IOCRPEB = 0x40046f04 UBI_IOCRSVOL = 0x400c6f02 UBI_IOCSETVOLPROP = 0x40104f06 UBI_IOCSPEB = 0x40046f05 UBI_IOCVOLCRBLK = 0x40804f07 UBI_IOCVOLRMBLK = 0x4f08 UBI_IOCVOLUP = 0x40084f00 VDISCARD = 0xd VEOF = 0x4 VEOL = 0xb VEOL2 = 0x10 VMIN = 0x6 VREPRINT = 0xc VSTART = 0x8 VSTOP = 0x9 VSUSP = 0xa VSWTC = 0x7 VT1 = 0x4000 VTDLY = 0x4000 VTIME = 0x5 VWERASE = 0xe WDIOC_GETBOOTSTATUS = 0x80045702 WDIOC_GETPRETIMEOUT = 0x80045709 WDIOC_GETSTATUS = 0x80045701 WDIOC_GETSUPPORT = 0x80285700 WDIOC_GETTEMP = 0x80045703 WDIOC_GETTIMELEFT = 0x8004570a WDIOC_GETTIMEOUT = 0x80045707 WDIOC_KEEPALIVE = 0x80045705 WDIOC_SETOPTIONS = 0x80045704 WORDSIZE = 0x40 XCASE = 0x4 XTABS = 0x1800 _HIDIOCGRAWNAME = 0x80804804 _HIDIOCGRAWPHYS = 0x80404805 _HIDIOCGRAWUNIQ = 0x80404808 ) // Errors const ( EADDRINUSE = syscall.Errno(0x62) EADDRNOTAVAIL = syscall.Errno(0x63) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x61) EALREADY = syscall.Errno(0x72) EBADE = syscall.Errno(0x34) EBADFD = syscall.Errno(0x4d) EBADMSG = syscall.Errno(0x4a) EBADR = syscall.Errno(0x35) EBADRQC = syscall.Errno(0x38) EBADSLT = syscall.Errno(0x39) EBFONT = syscall.Errno(0x3b) ECANCELED = syscall.Errno(0x7d) 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) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) EIDRM = syscall.Errno(0x2b) EILSEQ = syscall.Errno(0x54) EINPROGRESS = syscall.Errno(0x73) EISCONN = syscall.Errno(0x6a) 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) 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) ENOANO = syscall.Errno(0x37) ENOBUFS = syscall.Errno(0x69) ENOCSI = syscall.Errno(0x32) ENODATA = syscall.Errno(0x3d) ENOKEY = syscall.Errno(0x7e) ENOLCK = syscall.Errno(0x25) ENOLINK = syscall.Errno(0x43) ENOMEDIUM = syscall.Errno(0x7b) ENOMSG = syscall.Errno(0x2a) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x5c) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x26) ENOTCONN = syscall.Errno(0x6b) ENOTEMPTY = syscall.Errno(0x27) ENOTNAM = syscall.Errno(0x76) ENOTRECOVERABLE = syscall.Errno(0x83) ENOTSOCK = syscall.Errno(0x58) ENOTSUP = syscall.Errno(0x5f) ENOTUNIQ = syscall.Errno(0x4c) EOPNOTSUPP = syscall.Errno(0x5f) EOVERFLOW = syscall.Errno(0x4b) EOWNERDEAD = syscall.Errno(0x82) EPFNOSUPPORT = syscall.Errno(0x60) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x5d) EPROTOTYPE = syscall.Errno(0x5b) EREMCHG = syscall.Errno(0x4e) EREMOTE = syscall.Errno(0x42) EREMOTEIO = syscall.Errno(0x79) ERESTART = syscall.Errno(0x55) ERFKILL = syscall.Errno(0x84) ESHUTDOWN = syscall.Errno(0x6c) ESOCKTNOSUPPORT = syscall.Errno(0x5e) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x74) ESTRPIPE = syscall.Errno(0x56) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x6e) ETOOMANYREFS = syscall.Errno(0x6d) EUCLEAN = syscall.Errno(0x75) EUNATCH = syscall.Errno(0x31) EUSERS = syscall.Errno(0x57) EXFULL = syscall.Errno(0x36) ) // Signals const ( SIGBUS = syscall.Signal(0x7) SIGCHLD = syscall.Signal(0x11) SIGCLD = syscall.Signal(0x11) SIGCONT = syscall.Signal(0x12) SIGIO = syscall.Signal(0x1d) SIGPOLL = syscall.Signal(0x1d) SIGPROF = syscall.Signal(0x1b) SIGPWR = syscall.Signal(0x1e) SIGSTKFLT = syscall.Signal(0x10) SIGSTOP = syscall.Signal(0x13) SIGSYS = syscall.Signal(0x1f) SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "no such device or address"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EAGAIN", "resource temporarily unavailable"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device or resource busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "invalid cross-device link"}, {19, "ENODEV", "no such device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "numerical result out of range"}, {35, "EDEADLK", "resource deadlock avoided"}, {36, "ENAMETOOLONG", "file name too long"}, {37, "ENOLCK", "no locks available"}, {38, "ENOSYS", "function not implemented"}, {39, "ENOTEMPTY", "directory not empty"}, {40, "ELOOP", "too many levels of symbolic links"}, {42, "ENOMSG", "no message of desired type"}, {43, "EIDRM", "identifier removed"}, {44, "ECHRNG", "channel number out of range"}, {45, "EL2NSYNC", "level 2 not synchronized"}, {46, "EL3HLT", "level 3 halted"}, {47, "EL3RST", "level 3 reset"}, {48, "ELNRNG", "link number out of range"}, {49, "EUNATCH", "protocol driver not attached"}, {50, "ENOCSI", "no CSI structure available"}, {51, "EL2HLT", "level 2 halted"}, {52, "EBADE", "invalid exchange"}, {53, "EBADR", "invalid request descriptor"}, {54, "EXFULL", "exchange full"}, {55, "ENOANO", "no anode"}, {56, "EBADRQC", "invalid request code"}, {57, "EBADSLT", "invalid slot"}, {59, "EBFONT", "bad font file format"}, {60, "ENOSTR", "device not a stream"}, {61, "ENODATA", "no data available"}, {62, "ETIME", "timer expired"}, {63, "ENOSR", "out of streams resources"}, {64, "ENONET", "machine is not on the network"}, {65, "ENOPKG", "package not installed"}, {66, "EREMOTE", "object is remote"}, {67, "ENOLINK", "link has been severed"}, {68, "EADV", "advertise error"}, {69, "ESRMNT", "srmount error"}, {70, "ECOMM", "communication error on send"}, {71, "EPROTO", "protocol error"}, {72, "EMULTIHOP", "multihop attempted"}, {73, "EDOTDOT", "RFS specific error"}, {74, "EBADMSG", "bad message"}, {75, "EOVERFLOW", "value too large for defined data type"}, {76, "ENOTUNIQ", "name not unique on network"}, {77, "EBADFD", "file descriptor in bad state"}, {78, "EREMCHG", "remote address changed"}, {79, "ELIBACC", "can not access a needed shared library"}, {80, "ELIBBAD", "accessing a corrupted shared library"}, {81, "ELIBSCN", ".lib section in a.out corrupted"}, {82, "ELIBMAX", "attempting to link in too many shared libraries"}, {83, "ELIBEXEC", "cannot exec a shared library directly"}, {84, "EILSEQ", "invalid or incomplete multibyte or wide character"}, {85, "ERESTART", "interrupted system call should be restarted"}, {86, "ESTRPIPE", "streams pipe error"}, {87, "EUSERS", "too many users"}, {88, "ENOTSOCK", "socket operation on non-socket"}, {89, "EDESTADDRREQ", "destination address required"}, {90, "EMSGSIZE", "message too long"}, {91, "EPROTOTYPE", "protocol wrong type for socket"}, {92, "ENOPROTOOPT", "protocol not available"}, {93, "EPROTONOSUPPORT", "protocol not supported"}, {94, "ESOCKTNOSUPPORT", "socket type not supported"}, {95, "ENOTSUP", "operation not supported"}, {96, "EPFNOSUPPORT", "protocol family not supported"}, {97, "EAFNOSUPPORT", "address family not supported by protocol"}, {98, "EADDRINUSE", "address already in use"}, {99, "EADDRNOTAVAIL", "cannot assign requested address"}, {100, "ENETDOWN", "network is down"}, {101, "ENETUNREACH", "network is unreachable"}, {102, "ENETRESET", "network dropped connection on reset"}, {103, "ECONNABORTED", "software caused connection abort"}, {104, "ECONNRESET", "connection reset by peer"}, {105, "ENOBUFS", "no buffer space available"}, {106, "EISCONN", "transport endpoint is already connected"}, {107, "ENOTCONN", "transport endpoint is not connected"}, {108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"}, {109, "ETOOMANYREFS", "too many references: cannot splice"}, {110, "ETIMEDOUT", "connection timed out"}, {111, "ECONNREFUSED", "connection refused"}, {112, "EHOSTDOWN", "host is down"}, {113, "EHOSTUNREACH", "no route to host"}, {114, "EALREADY", "operation already in progress"}, {115, "EINPROGRESS", "operation now in progress"}, {116, "ESTALE", "stale file handle"}, {117, "EUCLEAN", "structure needs cleaning"}, {118, "ENOTNAM", "not a XENIX named type file"}, {119, "ENAVAIL", "no XENIX semaphores available"}, {120, "EISNAM", "is a named type file"}, {121, "EREMOTEIO", "remote I/O error"}, {122, "EDQUOT", "disk quota exceeded"}, {123, "ENOMEDIUM", "no medium found"}, {124, "EMEDIUMTYPE", "wrong medium type"}, {125, "ECANCELED", "operation canceled"}, {126, "ENOKEY", "required key not available"}, {127, "EKEYEXPIRED", "key has expired"}, {128, "EKEYREVOKED", "key has been revoked"}, {129, "EKEYREJECTED", "key was rejected by service"}, {130, "EOWNERDEAD", "owner died"}, {131, "ENOTRECOVERABLE", "state not recoverable"}, {132, "ERFKILL", "operation not possible due to RF-kill"}, {133, "EHWPOISON", "memory page has hardware error"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/breakpoint trap"}, {6, "SIGABRT", "aborted"}, {7, "SIGBUS", "bus error"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGUSR1", "user defined signal 1"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGUSR2", "user defined signal 2"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGSTKFLT", "stack fault"}, {17, "SIGCHLD", "child exited"}, {18, "SIGCONT", "continued"}, {19, "SIGSTOP", "stopped (signal)"}, {20, "SIGTSTP", "stopped"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGURG", "urgent I/O condition"}, {24, "SIGXCPU", "CPU time limit exceeded"}, {25, "SIGXFSZ", "file size limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window changed"}, {29, "SIGIO", "I/O possible"}, {30, "SIGPWR", "power failure"}, {31, "SIGSYS", "bad system call"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go ================================================ // mkerrors.sh -Wall -Werror -static -I/tmp/s390x/include -fsigned-char // Code generated by the command above; see README.md. DO NOT EDIT. //go:build s390x && linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/s390x/include -fsigned-char _const.go package unix import "syscall" const ( B1000000 = 0x1008 B115200 = 0x1002 B1152000 = 0x1009 B1500000 = 0x100a B2000000 = 0x100b B230400 = 0x1003 B2500000 = 0x100c B3000000 = 0x100d B3500000 = 0x100e B4000000 = 0x100f B460800 = 0x1004 B500000 = 0x1005 B57600 = 0x1001 B576000 = 0x1006 B921600 = 0x1007 BLKALIGNOFF = 0x127a BLKBSZGET = 0x80081270 BLKBSZSET = 0x40081271 BLKDISCARD = 0x1277 BLKDISCARDZEROES = 0x127c BLKFLSBUF = 0x1261 BLKFRAGET = 0x1265 BLKFRASET = 0x1264 BLKGETDISKSEQ = 0x80081280 BLKGETSIZE = 0x1260 BLKGETSIZE64 = 0x80081272 BLKIOMIN = 0x1278 BLKIOOPT = 0x1279 BLKPBSZGET = 0x127b BLKRAGET = 0x1263 BLKRASET = 0x1262 BLKROGET = 0x125e BLKROSET = 0x125d BLKROTATIONAL = 0x127e BLKRRPART = 0x125f BLKSECDISCARD = 0x127d BLKSECTGET = 0x1267 BLKSECTSET = 0x1266 BLKSSZGET = 0x1268 BLKZEROOUT = 0x127f BOTHER = 0x1000 BS1 = 0x2000 BSDLY = 0x2000 CBAUD = 0x100f CBAUDEX = 0x1000 CIBAUD = 0x100f0000 CLOCAL = 0x800 CR1 = 0x200 CR2 = 0x400 CR3 = 0x600 CRDLY = 0x600 CREAD = 0x80 CS6 = 0x10 CS7 = 0x20 CS8 = 0x30 CSIZE = 0x30 CSTOPB = 0x40 ECCGETLAYOUT = 0x81484d11 ECCGETSTATS = 0x80104d12 ECHOCTL = 0x200 ECHOE = 0x10 ECHOK = 0x20 ECHOKE = 0x800 ECHONL = 0x40 ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 EPIOCGPARAMS = 0x80088a02 EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 FFDLY = 0x8000 FICLONE = 0x40049409 FICLONERANGE = 0x4020940d FLUSHO = 0x1000 FS_IOC_ENABLE_VERITY = 0x40806685 FS_IOC_GETFLAGS = 0x80086601 FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614 FS_IOC_SETFLAGS = 0x40086602 FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613 F_GETLK = 0x5 F_GETLK64 = 0x5 F_GETOWN = 0x9 F_RDLCK = 0x0 F_SETLK = 0x6 F_SETLK64 = 0x6 F_SETLKW = 0x7 F_SETLKW64 = 0x7 F_SETOWN = 0x8 F_UNLCK = 0x2 F_WRLCK = 0x1 HIDIOCGRAWINFO = 0x80084803 HIDIOCGRDESC = 0x90044802 HIDIOCGRDESCSIZE = 0x80044801 HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 IN_CLOEXEC = 0x80000 IN_NONBLOCK = 0x800 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9 ISIG = 0x1 IUCLC = 0x200 IXOFF = 0x1000 IXON = 0x400 MAP_ANON = 0x20 MAP_ANONYMOUS = 0x20 MAP_DENYWRITE = 0x800 MAP_EXECUTABLE = 0x1000 MAP_GROWSDOWN = 0x100 MAP_HUGETLB = 0x40000 MAP_LOCKED = 0x2000 MAP_NONBLOCK = 0x10000 MAP_NORESERVE = 0x4000 MAP_POPULATE = 0x8000 MAP_STACK = 0x20000 MAP_SYNC = 0x80000 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MCL_ONFAULT = 0x4 MEMERASE = 0x40084d02 MEMERASE64 = 0x40104d14 MEMGETBADBLOCK = 0x40084d0b MEMGETINFO = 0x80204d01 MEMGETOOBSEL = 0x80c84d0a MEMGETREGIONCOUNT = 0x80044d07 MEMISLOCKED = 0x80084d17 MEMLOCK = 0x40084d05 MEMREAD = 0xc0404d1a MEMREADOOB = 0xc0104d04 MEMSETBADBLOCK = 0x40084d0c MEMUNLOCK = 0x40084d06 MEMWRITEOOB = 0xc0104d03 MTDFILEMODE = 0x4d13 NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 NS_GET_NSTYPE = 0xb703 NS_GET_OWNER_UID = 0xb704 NS_GET_PARENT = 0xb702 NS_GET_USERNS = 0xb701 OLCUC = 0x2 ONLCR = 0x4 OTPERASE = 0x400c4d19 OTPGETREGIONCOUNT = 0x40044d0e OTPGETREGIONINFO = 0x400c4d0f OTPLOCK = 0x800c4d10 OTPSELECT = 0x80044d0d 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_RSYNC = 0x101000 O_SYNC = 0x101000 O_TMPFILE = 0x410000 O_TRUNC = 0x200 PARENB = 0x100 PARODD = 0x200 PENDIN = 0x4000 PERF_EVENT_IOC_DISABLE = 0x2401 PERF_EVENT_IOC_ENABLE = 0x2400 PERF_EVENT_IOC_ID = 0x80082407 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409 PERF_EVENT_IOC_PERIOD = 0x40082404 PERF_EVENT_IOC_QUERY_BPF = 0xc008240a PERF_EVENT_IOC_REFRESH = 0x2402 PERF_EVENT_IOC_RESET = 0x2403 PERF_EVENT_IOC_SET_BPF = 0x40042408 PERF_EVENT_IOC_SET_FILTER = 0x40082406 PERF_EVENT_IOC_SET_OUTPUT = 0x2405 PPPIOCATTACH = 0x4004743d PPPIOCATTCHAN = 0x40047438 PPPIOCBRIDGECHAN = 0x40047435 PPPIOCCONNECT = 0x4004743a PPPIOCDETACH = 0x4004743c PPPIOCDISCONN = 0x7439 PPPIOCGASYNCMAP = 0x80047458 PPPIOCGCHAN = 0x80047437 PPPIOCGDEBUG = 0x80047441 PPPIOCGFLAGS = 0x8004745a PPPIOCGIDLE = 0x8010743f PPPIOCGIDLE32 = 0x8008743f PPPIOCGIDLE64 = 0x8010743f PPPIOCGL2TPSTATS = 0x80487436 PPPIOCGMRU = 0x80047453 PPPIOCGRASYNCMAP = 0x80047455 PPPIOCGUNIT = 0x80047456 PPPIOCGXASYNCMAP = 0x80207450 PPPIOCSACTIVE = 0x40107446 PPPIOCSASYNCMAP = 0x40047457 PPPIOCSCOMPRESS = 0x4010744d PPPIOCSDEBUG = 0x40047440 PPPIOCSFLAGS = 0x40047459 PPPIOCSMAXCID = 0x40047451 PPPIOCSMRRU = 0x4004743b PPPIOCSMRU = 0x40047452 PPPIOCSNPMODE = 0x4008744b PPPIOCSPASS = 0x40107447 PPPIOCSRASYNCMAP = 0x40047454 PPPIOCSXASYNCMAP = 0x4020744f PPPIOCUNBRIDGECHAN = 0x7434 PPPIOCXFERUNIT = 0x744e PR_SET_PTRACER_ANY = 0xffffffffffffffff PTRACE_DISABLE_TE = 0x5010 PTRACE_ENABLE_TE = 0x5009 PTRACE_GET_LAST_BREAK = 0x5006 PTRACE_OLDSETOPTIONS = 0x15 PTRACE_PEEKDATA_AREA = 0x5003 PTRACE_PEEKTEXT_AREA = 0x5002 PTRACE_PEEKUSR_AREA = 0x5000 PTRACE_PEEK_SYSTEM_CALL = 0x5007 PTRACE_POKEDATA_AREA = 0x5005 PTRACE_POKETEXT_AREA = 0x5004 PTRACE_POKEUSR_AREA = 0x5001 PTRACE_POKE_SYSTEM_CALL = 0x5008 PTRACE_PROT = 0x15 PTRACE_SINGLEBLOCK = 0xc PTRACE_SYSEMU = 0x1f PTRACE_SYSEMU_SINGLESTEP = 0x20 PTRACE_TE_ABORT_RAND = 0x5011 PT_ACR0 = 0x90 PT_ACR1 = 0x94 PT_ACR10 = 0xb8 PT_ACR11 = 0xbc PT_ACR12 = 0xc0 PT_ACR13 = 0xc4 PT_ACR14 = 0xc8 PT_ACR15 = 0xcc PT_ACR2 = 0x98 PT_ACR3 = 0x9c PT_ACR4 = 0xa0 PT_ACR5 = 0xa4 PT_ACR6 = 0xa8 PT_ACR7 = 0xac PT_ACR8 = 0xb0 PT_ACR9 = 0xb4 PT_CR_10 = 0x168 PT_CR_11 = 0x170 PT_CR_9 = 0x160 PT_ENDREGS = 0x1af PT_FPC = 0xd8 PT_FPR0 = 0xe0 PT_FPR1 = 0xe8 PT_FPR10 = 0x130 PT_FPR11 = 0x138 PT_FPR12 = 0x140 PT_FPR13 = 0x148 PT_FPR14 = 0x150 PT_FPR15 = 0x158 PT_FPR2 = 0xf0 PT_FPR3 = 0xf8 PT_FPR4 = 0x100 PT_FPR5 = 0x108 PT_FPR6 = 0x110 PT_FPR7 = 0x118 PT_FPR8 = 0x120 PT_FPR9 = 0x128 PT_GPR0 = 0x10 PT_GPR1 = 0x18 PT_GPR10 = 0x60 PT_GPR11 = 0x68 PT_GPR12 = 0x70 PT_GPR13 = 0x78 PT_GPR14 = 0x80 PT_GPR15 = 0x88 PT_GPR2 = 0x20 PT_GPR3 = 0x28 PT_GPR4 = 0x30 PT_GPR5 = 0x38 PT_GPR6 = 0x40 PT_GPR7 = 0x48 PT_GPR8 = 0x50 PT_GPR9 = 0x58 PT_IEEE_IP = 0x1a8 PT_LASTOFF = 0x1a8 PT_ORIGGPR2 = 0xd0 PT_PSWADDR = 0x8 PT_PSWMASK = 0x0 RLIMIT_AS = 0x9 RLIMIT_MEMLOCK = 0x8 RLIMIT_NOFILE = 0x7 RLIMIT_NPROC = 0x6 RLIMIT_RSS = 0x5 RNDADDENTROPY = 0x40085203 RNDADDTOENTCNT = 0x40045201 RNDCLEARPOOL = 0x5206 RNDGETENTCNT = 0x80045200 RNDGETPOOL = 0x80085202 RNDRESEEDCRNG = 0x5207 RNDZAPENTCNT = 0x5204 RTC_AIE_OFF = 0x7002 RTC_AIE_ON = 0x7001 RTC_ALM_READ = 0x80247008 RTC_ALM_SET = 0x40247007 RTC_EPOCH_READ = 0x8008700d RTC_EPOCH_SET = 0x4008700e RTC_IRQP_READ = 0x8008700b RTC_IRQP_SET = 0x4008700c RTC_PARAM_GET = 0x40187013 RTC_PARAM_SET = 0x40187014 RTC_PIE_OFF = 0x7006 RTC_PIE_ON = 0x7005 RTC_PLL_GET = 0x80207011 RTC_PLL_SET = 0x40207012 RTC_RD_TIME = 0x80247009 RTC_SET_TIME = 0x4024700a RTC_UIE_OFF = 0x7004 RTC_UIE_ON = 0x7003 RTC_VL_CLR = 0x7014 RTC_VL_READ = 0x80047013 RTC_WIE_OFF = 0x7010 RTC_WIE_ON = 0x700f RTC_WKALM_RD = 0x80287010 RTC_WKALM_SET = 0x4028700f SCM_TIMESTAMPING = 0x25 SCM_TIMESTAMPING_OPT_STATS = 0x36 SCM_TIMESTAMPING_PKTINFO = 0x3a SCM_TIMESTAMPNS = 0x23 SCM_TXTIME = 0x3d SCM_WIFI_STATUS = 0x29 SECCOMP_IOCTL_NOTIF_ADDFD = 0x40182103 SECCOMP_IOCTL_NOTIF_ID_VALID = 0x40082102 SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x40082104 SFD_CLOEXEC = 0x80000 SFD_NONBLOCK = 0x800 SIOCATMARK = 0x8905 SIOCGPGRP = 0x8904 SIOCGSTAMPNS_NEW = 0x80108907 SIOCGSTAMP_NEW = 0x80108906 SIOCINQ = 0x541b SIOCOUTQ = 0x5411 SIOCSPGRP = 0x8902 SOCK_CLOEXEC = 0x80000 SOCK_DGRAM = 0x2 SOCK_NONBLOCK = 0x800 SOCK_STREAM = 0x1 SOL_SOCKET = 0x1 SO_ACCEPTCONN = 0x1e SO_ATTACH_BPF = 0x32 SO_ATTACH_REUSEPORT_CBPF = 0x33 SO_ATTACH_REUSEPORT_EBPF = 0x34 SO_BINDTODEVICE = 0x19 SO_BINDTOIFINDEX = 0x3e SO_BPF_EXTENSIONS = 0x30 SO_BROADCAST = 0x6 SO_BSDCOMPAT = 0xe SO_BUF_LOCK = 0x48 SO_BUSY_POLL = 0x2e SO_BUSY_POLL_BUDGET = 0x46 SO_CNX_ADVICE = 0x35 SO_COOKIE = 0x39 SO_DETACH_REUSEPORT_BPF = 0x44 SO_DOMAIN = 0x27 SO_DONTROUTE = 0x5 SO_ERROR = 0x4 SO_INCOMING_CPU = 0x31 SO_INCOMING_NAPI_ID = 0x38 SO_KEEPALIVE = 0x9 SO_LINGER = 0xd SO_LOCK_FILTER = 0x2c SO_MARK = 0x24 SO_MAX_PACING_RATE = 0x2f SO_MEMINFO = 0x37 SO_NETNS_COOKIE = 0x47 SO_NOFCS = 0x2b SO_OOBINLINE = 0xa SO_PASSCRED = 0x10 SO_PASSPIDFD = 0x4c SO_PASSSEC = 0x22 SO_PEEK_OFF = 0x2a SO_PEERCRED = 0x11 SO_PEERGROUPS = 0x3b SO_PEERPIDFD = 0x4d SO_PEERSEC = 0x1f SO_PREFER_BUSY_POLL = 0x45 SO_PROTOCOL = 0x26 SO_RCVBUF = 0x8 SO_RCVBUFFORCE = 0x21 SO_RCVLOWAT = 0x12 SO_RCVMARK = 0x4b SO_RCVTIMEO = 0x14 SO_RCVTIMEO_NEW = 0x42 SO_RCVTIMEO_OLD = 0x14 SO_RESERVE_MEM = 0x49 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_SNDTIMEO_NEW = 0x43 SO_SNDTIMEO_OLD = 0x15 SO_TIMESTAMPING = 0x25 SO_TIMESTAMPING_NEW = 0x41 SO_TIMESTAMPING_OLD = 0x25 SO_TIMESTAMPNS = 0x23 SO_TIMESTAMPNS_NEW = 0x40 SO_TIMESTAMPNS_OLD = 0x23 SO_TIMESTAMP_NEW = 0x3f SO_TXREHASH = 0x4a SO_TXTIME = 0x3d SO_TYPE = 0x3 SO_WIFI_STATUS = 0x29 SO_ZEROCOPY = 0x3c TAB1 = 0x800 TAB2 = 0x1000 TAB3 = 0x1800 TABDLY = 0x1800 TCFLSH = 0x540b TCGETA = 0x5405 TCGETS = 0x5401 TCGETS2 = 0x802c542a TCGETX = 0x5432 TCSAFLUSH = 0x2 TCSBRK = 0x5409 TCSBRKP = 0x5425 TCSETA = 0x5406 TCSETAF = 0x5408 TCSETAW = 0x5407 TCSETS = 0x5402 TCSETS2 = 0x402c542b TCSETSF = 0x5404 TCSETSF2 = 0x402c542d TCSETSW = 0x5403 TCSETSW2 = 0x402c542c TCSETX = 0x5433 TCSETXF = 0x5434 TCSETXW = 0x5435 TCXONC = 0x540a TFD_CLOEXEC = 0x80000 TFD_NONBLOCK = 0x800 TIOCCBRK = 0x5428 TIOCCONS = 0x541d TIOCEXCL = 0x540c TIOCGDEV = 0x80045432 TIOCGETD = 0x5424 TIOCGEXCL = 0x80045440 TIOCGICOUNT = 0x545d TIOCGISO7816 = 0x80285442 TIOCGLCKTRMIOS = 0x5456 TIOCGPGRP = 0x540f TIOCGPKT = 0x80045438 TIOCGPTLCK = 0x80045439 TIOCGPTN = 0x80045430 TIOCGPTPEER = 0x5441 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_RI = 0x80 TIOCM_RNG = 0x80 TIOCM_SR = 0x10 TIOCM_ST = 0x8 TIOCNOTTY = 0x5422 TIOCNXCL = 0x540d TIOCOUTQ = 0x5411 TIOCPKT = 0x5420 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 TIOCSISO7816 = 0xc0285443 TIOCSLCKTRMIOS = 0x5457 TIOCSPGRP = 0x5410 TIOCSPTLCK = 0x40045431 TIOCSRS485 = 0x542f TIOCSSERIAL = 0x541f TIOCSSOFTCAR = 0x541a TIOCSTI = 0x5412 TIOCSWINSZ = 0x5414 TIOCVHANGUP = 0x5437 TOSTOP = 0x100 TUNATTACHFILTER = 0x401054d5 TUNDETACHFILTER = 0x401054d6 TUNGETDEVNETNS = 0x54e3 TUNGETFEATURES = 0x800454cf TUNGETFILTER = 0x801054db TUNGETIFF = 0x800454d2 TUNGETSNDBUF = 0x800454d3 TUNGETVNETBE = 0x800454df TUNGETVNETHDRSZ = 0x800454d7 TUNGETVNETLE = 0x800454dd TUNSETCARRIER = 0x400454e2 TUNSETDEBUG = 0x400454c9 TUNSETFILTEREBPF = 0x800454e1 TUNSETGROUP = 0x400454ce TUNSETIFF = 0x400454ca TUNSETIFINDEX = 0x400454da TUNSETLINK = 0x400454cd TUNSETNOCSUM = 0x400454c8 TUNSETOFFLOAD = 0x400454d0 TUNSETOWNER = 0x400454cc TUNSETPERSIST = 0x400454cb TUNSETQUEUE = 0x400454d9 TUNSETSNDBUF = 0x400454d4 TUNSETSTEERINGEBPF = 0x800454e0 TUNSETTXFILTER = 0x400454d1 TUNSETVNETBE = 0x400454de TUNSETVNETHDRSZ = 0x400454d8 TUNSETVNETLE = 0x400454dc UBI_IOCATT = 0x40186f40 UBI_IOCDET = 0x40046f41 UBI_IOCEBCH = 0x40044f02 UBI_IOCEBER = 0x40044f01 UBI_IOCEBISMAP = 0x80044f05 UBI_IOCEBMAP = 0x40084f03 UBI_IOCEBUNMAP = 0x40044f04 UBI_IOCMKVOL = 0x40986f00 UBI_IOCRMVOL = 0x40046f01 UBI_IOCRNVOL = 0x51106f03 UBI_IOCRPEB = 0x40046f04 UBI_IOCRSVOL = 0x400c6f02 UBI_IOCSETVOLPROP = 0x40104f06 UBI_IOCSPEB = 0x40046f05 UBI_IOCVOLCRBLK = 0x40804f07 UBI_IOCVOLRMBLK = 0x4f08 UBI_IOCVOLUP = 0x40084f00 VDISCARD = 0xd VEOF = 0x4 VEOL = 0xb VEOL2 = 0x10 VMIN = 0x6 VREPRINT = 0xc VSTART = 0x8 VSTOP = 0x9 VSUSP = 0xa VSWTC = 0x7 VT1 = 0x4000 VTDLY = 0x4000 VTIME = 0x5 VWERASE = 0xe WDIOC_GETBOOTSTATUS = 0x80045702 WDIOC_GETPRETIMEOUT = 0x80045709 WDIOC_GETSTATUS = 0x80045701 WDIOC_GETSUPPORT = 0x80285700 WDIOC_GETTEMP = 0x80045703 WDIOC_GETTIMELEFT = 0x8004570a WDIOC_GETTIMEOUT = 0x80045707 WDIOC_KEEPALIVE = 0x80045705 WDIOC_SETOPTIONS = 0x80045704 WORDSIZE = 0x40 XCASE = 0x4 XTABS = 0x1800 _HIDIOCGRAWNAME = 0x80804804 _HIDIOCGRAWPHYS = 0x80404805 _HIDIOCGRAWUNIQ = 0x80404808 ) // Errors const ( EADDRINUSE = syscall.Errno(0x62) EADDRNOTAVAIL = syscall.Errno(0x63) EADV = syscall.Errno(0x44) EAFNOSUPPORT = syscall.Errno(0x61) EALREADY = syscall.Errno(0x72) EBADE = syscall.Errno(0x34) EBADFD = syscall.Errno(0x4d) EBADMSG = syscall.Errno(0x4a) EBADR = syscall.Errno(0x35) EBADRQC = syscall.Errno(0x38) EBADSLT = syscall.Errno(0x39) EBFONT = syscall.Errno(0x3b) ECANCELED = syscall.Errno(0x7d) 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) EDOTDOT = syscall.Errno(0x49) EDQUOT = syscall.Errno(0x7a) EHOSTDOWN = syscall.Errno(0x70) EHOSTUNREACH = syscall.Errno(0x71) EHWPOISON = syscall.Errno(0x85) EIDRM = syscall.Errno(0x2b) EILSEQ = syscall.Errno(0x54) EINPROGRESS = syscall.Errno(0x73) EISCONN = syscall.Errno(0x6a) 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) 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) ENOANO = syscall.Errno(0x37) ENOBUFS = syscall.Errno(0x69) ENOCSI = syscall.Errno(0x32) ENODATA = syscall.Errno(0x3d) ENOKEY = syscall.Errno(0x7e) ENOLCK = syscall.Errno(0x25) ENOLINK = syscall.Errno(0x43) ENOMEDIUM = syscall.Errno(0x7b) ENOMSG = syscall.Errno(0x2a) ENONET = syscall.Errno(0x40) ENOPKG = syscall.Errno(0x41) ENOPROTOOPT = syscall.Errno(0x5c) ENOSR = syscall.Errno(0x3f) ENOSTR = syscall.Errno(0x3c) ENOSYS = syscall.Errno(0x26) ENOTCONN = syscall.Errno(0x6b) ENOTEMPTY = syscall.Errno(0x27) ENOTNAM = syscall.Errno(0x76) ENOTRECOVERABLE = syscall.Errno(0x83) ENOTSOCK = syscall.Errno(0x58) ENOTSUP = syscall.Errno(0x5f) ENOTUNIQ = syscall.Errno(0x4c) EOPNOTSUPP = syscall.Errno(0x5f) EOVERFLOW = syscall.Errno(0x4b) EOWNERDEAD = syscall.Errno(0x82) EPFNOSUPPORT = syscall.Errno(0x60) EPROTO = syscall.Errno(0x47) EPROTONOSUPPORT = syscall.Errno(0x5d) EPROTOTYPE = syscall.Errno(0x5b) EREMCHG = syscall.Errno(0x4e) EREMOTE = syscall.Errno(0x42) EREMOTEIO = syscall.Errno(0x79) ERESTART = syscall.Errno(0x55) ERFKILL = syscall.Errno(0x84) ESHUTDOWN = syscall.Errno(0x6c) ESOCKTNOSUPPORT = syscall.Errno(0x5e) ESRMNT = syscall.Errno(0x45) ESTALE = syscall.Errno(0x74) ESTRPIPE = syscall.Errno(0x56) ETIME = syscall.Errno(0x3e) ETIMEDOUT = syscall.Errno(0x6e) ETOOMANYREFS = syscall.Errno(0x6d) EUCLEAN = syscall.Errno(0x75) EUNATCH = syscall.Errno(0x31) EUSERS = syscall.Errno(0x57) EXFULL = syscall.Errno(0x36) ) // Signals const ( SIGBUS = syscall.Signal(0x7) SIGCHLD = syscall.Signal(0x11) SIGCLD = syscall.Signal(0x11) SIGCONT = syscall.Signal(0x12) SIGIO = syscall.Signal(0x1d) SIGPOLL = syscall.Signal(0x1d) SIGPROF = syscall.Signal(0x1b) SIGPWR = syscall.Signal(0x1e) SIGSTKFLT = syscall.Signal(0x10) SIGSTOP = syscall.Signal(0x13) SIGSYS = syscall.Signal(0x1f) SIGTSTP = syscall.Signal(0x14) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "no such device or address"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EAGAIN", "resource temporarily unavailable"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device or resource busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "invalid cross-device link"}, {19, "ENODEV", "no such device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "numerical result out of range"}, {35, "EDEADLK", "resource deadlock avoided"}, {36, "ENAMETOOLONG", "file name too long"}, {37, "ENOLCK", "no locks available"}, {38, "ENOSYS", "function not implemented"}, {39, "ENOTEMPTY", "directory not empty"}, {40, "ELOOP", "too many levels of symbolic links"}, {42, "ENOMSG", "no message of desired type"}, {43, "EIDRM", "identifier removed"}, {44, "ECHRNG", "channel number out of range"}, {45, "EL2NSYNC", "level 2 not synchronized"}, {46, "EL3HLT", "level 3 halted"}, {47, "EL3RST", "level 3 reset"}, {48, "ELNRNG", "link number out of range"}, {49, "EUNATCH", "protocol driver not attached"}, {50, "ENOCSI", "no CSI structure available"}, {51, "EL2HLT", "level 2 halted"}, {52, "EBADE", "invalid exchange"}, {53, "EBADR", "invalid request descriptor"}, {54, "EXFULL", "exchange full"}, {55, "ENOANO", "no anode"}, {56, "EBADRQC", "invalid request code"}, {57, "EBADSLT", "invalid slot"}, {59, "EBFONT", "bad font file format"}, {60, "ENOSTR", "device not a stream"}, {61, "ENODATA", "no data available"}, {62, "ETIME", "timer expired"}, {63, "ENOSR", "out of streams resources"}, {64, "ENONET", "machine is not on the network"}, {65, "ENOPKG", "package not installed"}, {66, "EREMOTE", "object is remote"}, {67, "ENOLINK", "link has been severed"}, {68, "EADV", "advertise error"}, {69, "ESRMNT", "srmount error"}, {70, "ECOMM", "communication error on send"}, {71, "EPROTO", "protocol error"}, {72, "EMULTIHOP", "multihop attempted"}, {73, "EDOTDOT", "RFS specific error"}, {74, "EBADMSG", "bad message"}, {75, "EOVERFLOW", "value too large for defined data type"}, {76, "ENOTUNIQ", "name not unique on network"}, {77, "EBADFD", "file descriptor in bad state"}, {78, "EREMCHG", "remote address changed"}, {79, "ELIBACC", "can not access a needed shared library"}, {80, "ELIBBAD", "accessing a corrupted shared library"}, {81, "ELIBSCN", ".lib section in a.out corrupted"}, {82, "ELIBMAX", "attempting to link in too many shared libraries"}, {83, "ELIBEXEC", "cannot exec a shared library directly"}, {84, "EILSEQ", "invalid or incomplete multibyte or wide character"}, {85, "ERESTART", "interrupted system call should be restarted"}, {86, "ESTRPIPE", "streams pipe error"}, {87, "EUSERS", "too many users"}, {88, "ENOTSOCK", "socket operation on non-socket"}, {89, "EDESTADDRREQ", "destination address required"}, {90, "EMSGSIZE", "message too long"}, {91, "EPROTOTYPE", "protocol wrong type for socket"}, {92, "ENOPROTOOPT", "protocol not available"}, {93, "EPROTONOSUPPORT", "protocol not supported"}, {94, "ESOCKTNOSUPPORT", "socket type not supported"}, {95, "ENOTSUP", "operation not supported"}, {96, "EPFNOSUPPORT", "protocol family not supported"}, {97, "EAFNOSUPPORT", "address family not supported by protocol"}, {98, "EADDRINUSE", "address already in use"}, {99, "EADDRNOTAVAIL", "cannot assign requested address"}, {100, "ENETDOWN", "network is down"}, {101, "ENETUNREACH", "network is unreachable"}, {102, "ENETRESET", "network dropped connection on reset"}, {103, "ECONNABORTED", "software caused connection abort"}, {104, "ECONNRESET", "connection reset by peer"}, {105, "ENOBUFS", "no buffer space available"}, {106, "EISCONN", "transport endpoint is already connected"}, {107, "ENOTCONN", "transport endpoint is not connected"}, {108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"}, {109, "ETOOMANYREFS", "too many references: cannot splice"}, {110, "ETIMEDOUT", "connection timed out"}, {111, "ECONNREFUSED", "connection refused"}, {112, "EHOSTDOWN", "host is down"}, {113, "EHOSTUNREACH", "no route to host"}, {114, "EALREADY", "operation already in progress"}, {115, "EINPROGRESS", "operation now in progress"}, {116, "ESTALE", "stale file handle"}, {117, "EUCLEAN", "structure needs cleaning"}, {118, "ENOTNAM", "not a XENIX named type file"}, {119, "ENAVAIL", "no XENIX semaphores available"}, {120, "EISNAM", "is a named type file"}, {121, "EREMOTEIO", "remote I/O error"}, {122, "EDQUOT", "disk quota exceeded"}, {123, "ENOMEDIUM", "no medium found"}, {124, "EMEDIUMTYPE", "wrong medium type"}, {125, "ECANCELED", "operation canceled"}, {126, "ENOKEY", "required key not available"}, {127, "EKEYEXPIRED", "key has expired"}, {128, "EKEYREVOKED", "key has been revoked"}, {129, "EKEYREJECTED", "key was rejected by service"}, {130, "EOWNERDEAD", "owner died"}, {131, "ENOTRECOVERABLE", "state not recoverable"}, {132, "ERFKILL", "operation not possible due to RF-kill"}, {133, "EHWPOISON", "memory page has hardware error"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/breakpoint trap"}, {6, "SIGABRT", "aborted"}, {7, "SIGBUS", "bus error"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGUSR1", "user defined signal 1"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGUSR2", "user defined signal 2"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGSTKFLT", "stack fault"}, {17, "SIGCHLD", "child exited"}, {18, "SIGCONT", "continued"}, {19, "SIGSTOP", "stopped (signal)"}, {20, "SIGTSTP", "stopped"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGURG", "urgent I/O condition"}, {24, "SIGXCPU", "CPU time limit exceeded"}, {25, "SIGXFSZ", "file size limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window changed"}, {29, "SIGIO", "I/O possible"}, {30, "SIGPWR", "power failure"}, {31, "SIGSYS", "bad system call"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go ================================================ // mkerrors.sh -Wall -Werror -static -I/tmp/sparc64/include // Code generated by the command above; see README.md. DO NOT EDIT. //go:build sparc64 && linux // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -Wall -Werror -static -I/tmp/sparc64/include _const.go package unix import "syscall" const ( ASI_LEON_DFLUSH = 0x11 ASI_LEON_IFLUSH = 0x10 ASI_LEON_MMUFLUSH = 0x18 B1000000 = 0x1008 B115200 = 0x1002 B1152000 = 0x1009 B1500000 = 0x100a B2000000 = 0x100b B230400 = 0x1003 B2500000 = 0x100c B3000000 = 0x100d B3500000 = 0x100e B4000000 = 0x100f B460800 = 0x1004 B500000 = 0x1005 B57600 = 0x1001 B576000 = 0x1006 B921600 = 0x1007 BLKALIGNOFF = 0x2000127a BLKBSZGET = 0x40081270 BLKBSZSET = 0x80081271 BLKDISCARD = 0x20001277 BLKDISCARDZEROES = 0x2000127c BLKFLSBUF = 0x20001261 BLKFRAGET = 0x20001265 BLKFRASET = 0x20001264 BLKGETDISKSEQ = 0x40081280 BLKGETSIZE = 0x20001260 BLKGETSIZE64 = 0x40081272 BLKIOMIN = 0x20001278 BLKIOOPT = 0x20001279 BLKPBSZGET = 0x2000127b BLKRAGET = 0x20001263 BLKRASET = 0x20001262 BLKROGET = 0x2000125e BLKROSET = 0x2000125d BLKROTATIONAL = 0x2000127e BLKRRPART = 0x2000125f BLKSECDISCARD = 0x2000127d BLKSECTGET = 0x20001267 BLKSECTSET = 0x20001266 BLKSSZGET = 0x20001268 BLKZEROOUT = 0x2000127f BOTHER = 0x1000 BS1 = 0x2000 BSDLY = 0x2000 CBAUD = 0x100f CBAUDEX = 0x1000 CIBAUD = 0x100f0000 CLOCAL = 0x800 CR1 = 0x200 CR2 = 0x400 CR3 = 0x600 CRDLY = 0x600 CREAD = 0x80 CS6 = 0x10 CS7 = 0x20 CS8 = 0x30 CSIZE = 0x30 CSTOPB = 0x40 ECCGETLAYOUT = 0x41484d11 ECCGETSTATS = 0x40104d12 ECHOCTL = 0x200 ECHOE = 0x10 ECHOK = 0x20 ECHOKE = 0x800 ECHONL = 0x40 ECHOPRT = 0x400 EFD_CLOEXEC = 0x400000 EFD_NONBLOCK = 0x4000 EMT_TAGOVF = 0x1 EPIOCGPARAMS = 0x40088a02 EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x400000 EXTPROC = 0x10000 FF1 = 0x8000 FFDLY = 0x8000 FICLONE = 0x80049409 FICLONERANGE = 0x8020940d FLUSHO = 0x1000 FS_IOC_ENABLE_VERITY = 0x80806685 FS_IOC_GETFLAGS = 0x40086601 FS_IOC_GET_ENCRYPTION_NONCE = 0x4010661b FS_IOC_GET_ENCRYPTION_POLICY = 0x800c6615 FS_IOC_GET_ENCRYPTION_PWSALT = 0x80106614 FS_IOC_SETFLAGS = 0x80086602 FS_IOC_SET_ENCRYPTION_POLICY = 0x400c6613 F_GETLK = 0x7 F_GETLK64 = 0x7 F_GETOWN = 0x5 F_RDLCK = 0x1 F_SETLK = 0x8 F_SETLK64 = 0x8 F_SETLKW = 0x9 F_SETLKW64 = 0x9 F_SETOWN = 0x6 F_UNLCK = 0x3 F_WRLCK = 0x2 HIDIOCGRAWINFO = 0x40084803 HIDIOCGRDESC = 0x50044802 HIDIOCGRDESCSIZE = 0x40044801 HUPCL = 0x400 ICANON = 0x2 IEXTEN = 0x8000 IN_CLOEXEC = 0x400000 IN_NONBLOCK = 0x4000 IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x200007b9 ISIG = 0x1 IUCLC = 0x200 IXOFF = 0x1000 IXON = 0x400 MAP_ANON = 0x20 MAP_ANONYMOUS = 0x20 MAP_DENYWRITE = 0x800 MAP_EXECUTABLE = 0x1000 MAP_GROWSDOWN = 0x200 MAP_HUGETLB = 0x40000 MAP_LOCKED = 0x100 MAP_NONBLOCK = 0x10000 MAP_NORESERVE = 0x40 MAP_POPULATE = 0x8000 MAP_RENAME = 0x20 MAP_STACK = 0x20000 MAP_SYNC = 0x80000 MCL_CURRENT = 0x2000 MCL_FUTURE = 0x4000 MCL_ONFAULT = 0x8000 MEMERASE = 0x80084d02 MEMERASE64 = 0x80104d14 MEMGETBADBLOCK = 0x80084d0b MEMGETINFO = 0x40204d01 MEMGETOOBSEL = 0x40c84d0a MEMGETREGIONCOUNT = 0x40044d07 MEMISLOCKED = 0x40084d17 MEMLOCK = 0x80084d05 MEMREAD = 0xc0404d1a MEMREADOOB = 0xc0104d04 MEMSETBADBLOCK = 0x80084d0c MEMUNLOCK = 0x80084d06 MEMWRITEOOB = 0xc0104d03 MTDFILEMODE = 0x20004d13 NFDBITS = 0x40 NLDLY = 0x100 NOFLSH = 0x80 NS_GET_NSTYPE = 0x2000b703 NS_GET_OWNER_UID = 0x2000b704 NS_GET_PARENT = 0x2000b702 NS_GET_USERNS = 0x2000b701 OLCUC = 0x2 ONLCR = 0x4 OTPERASE = 0x800c4d19 OTPGETREGIONCOUNT = 0x80044d0e OTPGETREGIONINFO = 0x800c4d0f OTPLOCK = 0x400c4d10 OTPSELECT = 0x40044d0d O_APPEND = 0x8 O_ASYNC = 0x40 O_CLOEXEC = 0x400000 O_CREAT = 0x200 O_DIRECT = 0x100000 O_DIRECTORY = 0x10000 O_DSYNC = 0x2000 O_EXCL = 0x800 O_FSYNC = 0x802000 O_LARGEFILE = 0x0 O_NDELAY = 0x4004 O_NOATIME = 0x200000 O_NOCTTY = 0x8000 O_NOFOLLOW = 0x20000 O_NONBLOCK = 0x4000 O_PATH = 0x1000000 O_RSYNC = 0x802000 O_SYNC = 0x802000 O_TMPFILE = 0x2010000 O_TRUNC = 0x400 PARENB = 0x100 PARODD = 0x200 PENDIN = 0x4000 PERF_EVENT_IOC_DISABLE = 0x20002401 PERF_EVENT_IOC_ENABLE = 0x20002400 PERF_EVENT_IOC_ID = 0x40082407 PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x8008240b PERF_EVENT_IOC_PAUSE_OUTPUT = 0x80042409 PERF_EVENT_IOC_PERIOD = 0x80082404 PERF_EVENT_IOC_QUERY_BPF = 0xc008240a PERF_EVENT_IOC_REFRESH = 0x20002402 PERF_EVENT_IOC_RESET = 0x20002403 PERF_EVENT_IOC_SET_BPF = 0x80042408 PERF_EVENT_IOC_SET_FILTER = 0x80082406 PERF_EVENT_IOC_SET_OUTPUT = 0x20002405 PPPIOCATTACH = 0x8004743d PPPIOCATTCHAN = 0x80047438 PPPIOCBRIDGECHAN = 0x80047435 PPPIOCCONNECT = 0x8004743a PPPIOCDETACH = 0x8004743c PPPIOCDISCONN = 0x20007439 PPPIOCGASYNCMAP = 0x40047458 PPPIOCGCHAN = 0x40047437 PPPIOCGDEBUG = 0x40047441 PPPIOCGFLAGS = 0x4004745a PPPIOCGIDLE = 0x4010743f PPPIOCGIDLE32 = 0x4008743f PPPIOCGIDLE64 = 0x4010743f PPPIOCGL2TPSTATS = 0x40487436 PPPIOCGMRU = 0x40047453 PPPIOCGRASYNCMAP = 0x40047455 PPPIOCGUNIT = 0x40047456 PPPIOCGXASYNCMAP = 0x40207450 PPPIOCSACTIVE = 0x80107446 PPPIOCSASYNCMAP = 0x80047457 PPPIOCSCOMPRESS = 0x8010744d PPPIOCSDEBUG = 0x80047440 PPPIOCSFLAGS = 0x80047459 PPPIOCSMAXCID = 0x80047451 PPPIOCSMRRU = 0x8004743b PPPIOCSMRU = 0x80047452 PPPIOCSNPMODE = 0x8008744b PPPIOCSPASS = 0x80107447 PPPIOCSRASYNCMAP = 0x80047454 PPPIOCSXASYNCMAP = 0x8020744f PPPIOCUNBRIDGECHAN = 0x20007434 PPPIOCXFERUNIT = 0x2000744e PR_SET_PTRACER_ANY = 0xffffffffffffffff PTRACE_GETFPAREGS = 0x14 PTRACE_GETFPREGS = 0xe PTRACE_GETFPREGS64 = 0x19 PTRACE_GETREGS64 = 0x16 PTRACE_READDATA = 0x10 PTRACE_READTEXT = 0x12 PTRACE_SETFPAREGS = 0x15 PTRACE_SETFPREGS = 0xf PTRACE_SETFPREGS64 = 0x1a PTRACE_SETREGS64 = 0x17 PTRACE_SPARC_DETACH = 0xb PTRACE_WRITEDATA = 0x11 PTRACE_WRITETEXT = 0x13 PT_FP = 0x48 PT_G0 = 0x10 PT_G1 = 0x14 PT_G2 = 0x18 PT_G3 = 0x1c PT_G4 = 0x20 PT_G5 = 0x24 PT_G6 = 0x28 PT_G7 = 0x2c PT_I0 = 0x30 PT_I1 = 0x34 PT_I2 = 0x38 PT_I3 = 0x3c PT_I4 = 0x40 PT_I5 = 0x44 PT_I6 = 0x48 PT_I7 = 0x4c PT_NPC = 0x8 PT_PC = 0x4 PT_PSR = 0x0 PT_REGS_MAGIC = 0x57ac6c00 PT_TNPC = 0x90 PT_TPC = 0x88 PT_TSTATE = 0x80 PT_V9_FP = 0x70 PT_V9_G0 = 0x0 PT_V9_G1 = 0x8 PT_V9_G2 = 0x10 PT_V9_G3 = 0x18 PT_V9_G4 = 0x20 PT_V9_G5 = 0x28 PT_V9_G6 = 0x30 PT_V9_G7 = 0x38 PT_V9_I0 = 0x40 PT_V9_I1 = 0x48 PT_V9_I2 = 0x50 PT_V9_I3 = 0x58 PT_V9_I4 = 0x60 PT_V9_I5 = 0x68 PT_V9_I6 = 0x70 PT_V9_I7 = 0x78 PT_V9_MAGIC = 0x9c PT_V9_TNPC = 0x90 PT_V9_TPC = 0x88 PT_V9_TSTATE = 0x80 PT_V9_Y = 0x98 PT_WIM = 0x10 PT_Y = 0xc RLIMIT_AS = 0x9 RLIMIT_MEMLOCK = 0x8 RLIMIT_NOFILE = 0x6 RLIMIT_NPROC = 0x7 RLIMIT_RSS = 0x5 RNDADDENTROPY = 0x80085203 RNDADDTOENTCNT = 0x80045201 RNDCLEARPOOL = 0x20005206 RNDGETENTCNT = 0x40045200 RNDGETPOOL = 0x40085202 RNDRESEEDCRNG = 0x20005207 RNDZAPENTCNT = 0x20005204 RTC_AIE_OFF = 0x20007002 RTC_AIE_ON = 0x20007001 RTC_ALM_READ = 0x40247008 RTC_ALM_SET = 0x80247007 RTC_EPOCH_READ = 0x4008700d RTC_EPOCH_SET = 0x8008700e RTC_IRQP_READ = 0x4008700b RTC_IRQP_SET = 0x8008700c RTC_PARAM_GET = 0x80187013 RTC_PARAM_SET = 0x80187014 RTC_PIE_OFF = 0x20007006 RTC_PIE_ON = 0x20007005 RTC_PLL_GET = 0x40207011 RTC_PLL_SET = 0x80207012 RTC_RD_TIME = 0x40247009 RTC_SET_TIME = 0x8024700a RTC_UIE_OFF = 0x20007004 RTC_UIE_ON = 0x20007003 RTC_VL_CLR = 0x20007014 RTC_VL_READ = 0x40047013 RTC_WIE_OFF = 0x20007010 RTC_WIE_ON = 0x2000700f RTC_WKALM_RD = 0x40287010 RTC_WKALM_SET = 0x8028700f SCM_TIMESTAMPING = 0x23 SCM_TIMESTAMPING_OPT_STATS = 0x38 SCM_TIMESTAMPING_PKTINFO = 0x3c SCM_TIMESTAMPNS = 0x21 SCM_TXTIME = 0x3f SCM_WIFI_STATUS = 0x25 SECCOMP_IOCTL_NOTIF_ADDFD = 0x80182103 SECCOMP_IOCTL_NOTIF_ID_VALID = 0x80082102 SECCOMP_IOCTL_NOTIF_SET_FLAGS = 0x80082104 SFD_CLOEXEC = 0x400000 SFD_NONBLOCK = 0x4000 SF_FP = 0x38 SF_I0 = 0x20 SF_I1 = 0x24 SF_I2 = 0x28 SF_I3 = 0x2c SF_I4 = 0x30 SF_I5 = 0x34 SF_L0 = 0x0 SF_L1 = 0x4 SF_L2 = 0x8 SF_L3 = 0xc SF_L4 = 0x10 SF_L5 = 0x14 SF_L6 = 0x18 SF_L7 = 0x1c SF_PC = 0x3c SF_RETP = 0x40 SF_V9_FP = 0x70 SF_V9_I0 = 0x40 SF_V9_I1 = 0x48 SF_V9_I2 = 0x50 SF_V9_I3 = 0x58 SF_V9_I4 = 0x60 SF_V9_I5 = 0x68 SF_V9_L0 = 0x0 SF_V9_L1 = 0x8 SF_V9_L2 = 0x10 SF_V9_L3 = 0x18 SF_V9_L4 = 0x20 SF_V9_L5 = 0x28 SF_V9_L6 = 0x30 SF_V9_L7 = 0x38 SF_V9_PC = 0x78 SF_V9_RETP = 0x80 SF_V9_XARG0 = 0x88 SF_V9_XARG1 = 0x90 SF_V9_XARG2 = 0x98 SF_V9_XARG3 = 0xa0 SF_V9_XARG4 = 0xa8 SF_V9_XARG5 = 0xb0 SF_V9_XXARG = 0xb8 SF_XARG0 = 0x44 SF_XARG1 = 0x48 SF_XARG2 = 0x4c SF_XARG3 = 0x50 SF_XARG4 = 0x54 SF_XARG5 = 0x58 SF_XXARG = 0x5c SIOCATMARK = 0x8905 SIOCGPGRP = 0x8904 SIOCGSTAMPNS_NEW = 0x40108907 SIOCGSTAMP_NEW = 0x40108906 SIOCINQ = 0x4004667f SIOCOUTQ = 0x40047473 SIOCSPGRP = 0x8902 SOCK_CLOEXEC = 0x400000 SOCK_DGRAM = 0x2 SOCK_NONBLOCK = 0x4000 SOCK_STREAM = 0x1 SOL_SOCKET = 0xffff SO_ACCEPTCONN = 0x8000 SO_ATTACH_BPF = 0x34 SO_ATTACH_REUSEPORT_CBPF = 0x35 SO_ATTACH_REUSEPORT_EBPF = 0x36 SO_BINDTODEVICE = 0xd SO_BINDTOIFINDEX = 0x41 SO_BPF_EXTENSIONS = 0x32 SO_BROADCAST = 0x20 SO_BSDCOMPAT = 0x400 SO_BUF_LOCK = 0x51 SO_BUSY_POLL = 0x30 SO_BUSY_POLL_BUDGET = 0x49 SO_CNX_ADVICE = 0x37 SO_COOKIE = 0x3b SO_DETACH_REUSEPORT_BPF = 0x47 SO_DOMAIN = 0x1029 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 SO_INCOMING_CPU = 0x33 SO_INCOMING_NAPI_ID = 0x3a SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_LOCK_FILTER = 0x28 SO_MARK = 0x22 SO_MAX_PACING_RATE = 0x31 SO_MEMINFO = 0x39 SO_NETNS_COOKIE = 0x50 SO_NOFCS = 0x27 SO_OOBINLINE = 0x100 SO_PASSCRED = 0x2 SO_PASSPIDFD = 0x55 SO_PASSSEC = 0x1f SO_PEEK_OFF = 0x26 SO_PEERCRED = 0x40 SO_PEERGROUPS = 0x3d SO_PEERPIDFD = 0x56 SO_PEERSEC = 0x1e SO_PREFER_BUSY_POLL = 0x48 SO_PROTOCOL = 0x1028 SO_RCVBUF = 0x1002 SO_RCVBUFFORCE = 0x100b SO_RCVLOWAT = 0x800 SO_RCVMARK = 0x54 SO_RCVTIMEO = 0x2000 SO_RCVTIMEO_NEW = 0x44 SO_RCVTIMEO_OLD = 0x2000 SO_RESERVE_MEM = 0x52 SO_REUSEADDR = 0x4 SO_REUSEPORT = 0x200 SO_RXQ_OVFL = 0x24 SO_SECURITY_AUTHENTICATION = 0x5001 SO_SECURITY_ENCRYPTION_NETWORK = 0x5004 SO_SECURITY_ENCRYPTION_TRANSPORT = 0x5002 SO_SELECT_ERR_QUEUE = 0x29 SO_SNDBUF = 0x1001 SO_SNDBUFFORCE = 0x100a SO_SNDLOWAT = 0x1000 SO_SNDTIMEO = 0x4000 SO_SNDTIMEO_NEW = 0x45 SO_SNDTIMEO_OLD = 0x4000 SO_TIMESTAMPING = 0x23 SO_TIMESTAMPING_NEW = 0x43 SO_TIMESTAMPING_OLD = 0x23 SO_TIMESTAMPNS = 0x21 SO_TIMESTAMPNS_NEW = 0x42 SO_TIMESTAMPNS_OLD = 0x21 SO_TIMESTAMP_NEW = 0x46 SO_TXREHASH = 0x53 SO_TXTIME = 0x3f SO_TYPE = 0x1008 SO_WIFI_STATUS = 0x25 SO_ZEROCOPY = 0x3e TAB1 = 0x800 TAB2 = 0x1000 TAB3 = 0x1800 TABDLY = 0x1800 TCFLSH = 0x20005407 TCGETA = 0x40125401 TCGETS = 0x40245408 TCGETS2 = 0x402c540c TCSAFLUSH = 0x2 TCSBRK = 0x20005405 TCSBRKP = 0x5425 TCSETA = 0x80125402 TCSETAF = 0x80125404 TCSETAW = 0x80125403 TCSETS = 0x80245409 TCSETS2 = 0x802c540d TCSETSF = 0x8024540b TCSETSF2 = 0x802c540f TCSETSW = 0x8024540a TCSETSW2 = 0x802c540e TCXONC = 0x20005406 TFD_CLOEXEC = 0x400000 TFD_NONBLOCK = 0x4000 TIOCCBRK = 0x2000747a TIOCCONS = 0x20007424 TIOCEXCL = 0x2000740d TIOCGDEV = 0x40045432 TIOCGETD = 0x40047400 TIOCGEXCL = 0x40045440 TIOCGICOUNT = 0x545d TIOCGISO7816 = 0x40285443 TIOCGLCKTRMIOS = 0x5456 TIOCGPGRP = 0x40047483 TIOCGPKT = 0x40045438 TIOCGPTLCK = 0x40045439 TIOCGPTN = 0x40047486 TIOCGPTPEER = 0x20007489 TIOCGRS485 = 0x40205441 TIOCGSERIAL = 0x541e TIOCGSID = 0x40047485 TIOCGSOFTCAR = 0x40047464 TIOCGWINSZ = 0x40087468 TIOCINQ = 0x4004667f TIOCLINUX = 0x541c TIOCMBIC = 0x8004746b TIOCMBIS = 0x8004746c TIOCMGET = 0x4004746a TIOCMIWAIT = 0x545c TIOCMSET = 0x8004746d TIOCM_CAR = 0x40 TIOCM_CD = 0x40 TIOCM_CTS = 0x20 TIOCM_DSR = 0x100 TIOCM_RI = 0x80 TIOCM_RNG = 0x80 TIOCM_SR = 0x10 TIOCM_ST = 0x8 TIOCNOTTY = 0x20007471 TIOCNXCL = 0x2000740e TIOCOUTQ = 0x40047473 TIOCPKT = 0x80047470 TIOCSBRK = 0x2000747b TIOCSCTTY = 0x20007484 TIOCSERCONFIG = 0x5453 TIOCSERGETLSR = 0x5459 TIOCSERGETMULTI = 0x545a TIOCSERGSTRUCT = 0x5458 TIOCSERGWILD = 0x5454 TIOCSERSETMULTI = 0x545b TIOCSERSWILD = 0x5455 TIOCSETD = 0x80047401 TIOCSIG = 0x80047488 TIOCSISO7816 = 0xc0285444 TIOCSLCKTRMIOS = 0x5457 TIOCSPGRP = 0x80047482 TIOCSPTLCK = 0x80047487 TIOCSRS485 = 0xc0205442 TIOCSSERIAL = 0x541f TIOCSSOFTCAR = 0x80047465 TIOCSTART = 0x2000746e TIOCSTI = 0x80017472 TIOCSTOP = 0x2000746f TIOCSWINSZ = 0x80087467 TIOCVHANGUP = 0x20005437 TOSTOP = 0x100 TUNATTACHFILTER = 0x801054d5 TUNDETACHFILTER = 0x801054d6 TUNGETDEVNETNS = 0x200054e3 TUNGETFEATURES = 0x400454cf TUNGETFILTER = 0x401054db TUNGETIFF = 0x400454d2 TUNGETSNDBUF = 0x400454d3 TUNGETVNETBE = 0x400454df TUNGETVNETHDRSZ = 0x400454d7 TUNGETVNETLE = 0x400454dd TUNSETCARRIER = 0x800454e2 TUNSETDEBUG = 0x800454c9 TUNSETFILTEREBPF = 0x400454e1 TUNSETGROUP = 0x800454ce TUNSETIFF = 0x800454ca TUNSETIFINDEX = 0x800454da TUNSETLINK = 0x800454cd TUNSETNOCSUM = 0x800454c8 TUNSETOFFLOAD = 0x800454d0 TUNSETOWNER = 0x800454cc TUNSETPERSIST = 0x800454cb TUNSETQUEUE = 0x800454d9 TUNSETSNDBUF = 0x800454d4 TUNSETSTEERINGEBPF = 0x400454e0 TUNSETTXFILTER = 0x800454d1 TUNSETVNETBE = 0x800454de TUNSETVNETHDRSZ = 0x800454d8 TUNSETVNETLE = 0x800454dc UBI_IOCATT = 0x80186f40 UBI_IOCDET = 0x80046f41 UBI_IOCEBCH = 0x80044f02 UBI_IOCEBER = 0x80044f01 UBI_IOCEBISMAP = 0x40044f05 UBI_IOCEBMAP = 0x80084f03 UBI_IOCEBUNMAP = 0x80044f04 UBI_IOCMKVOL = 0x80986f00 UBI_IOCRMVOL = 0x80046f01 UBI_IOCRNVOL = 0x91106f03 UBI_IOCRPEB = 0x80046f04 UBI_IOCRSVOL = 0x800c6f02 UBI_IOCSETVOLPROP = 0x80104f06 UBI_IOCSPEB = 0x80046f05 UBI_IOCVOLCRBLK = 0x80804f07 UBI_IOCVOLRMBLK = 0x20004f08 UBI_IOCVOLUP = 0x80084f00 VDISCARD = 0xd VEOF = 0x4 VEOL = 0xb VEOL2 = 0x10 VMIN = 0x6 VREPRINT = 0xc VSTART = 0x8 VSTOP = 0x9 VSUSP = 0xa VSWTC = 0x7 VT1 = 0x4000 VTDLY = 0x4000 VTIME = 0x5 VWERASE = 0xe WDIOC_GETBOOTSTATUS = 0x40045702 WDIOC_GETPRETIMEOUT = 0x40045709 WDIOC_GETSTATUS = 0x40045701 WDIOC_GETSUPPORT = 0x40285700 WDIOC_GETTEMP = 0x40045703 WDIOC_GETTIMELEFT = 0x4004570a WDIOC_GETTIMEOUT = 0x40045707 WDIOC_KEEPALIVE = 0x40045705 WDIOC_SETOPTIONS = 0x40045704 WORDSIZE = 0x40 XCASE = 0x4 XTABS = 0x1800 _HIDIOCGRAWNAME = 0x40804804 _HIDIOCGRAWPHYS = 0x40404805 _HIDIOCGRAWUNIQ = 0x40404808 __TIOCFLUSH = 0x80047410 ) // Errors const ( EADDRINUSE = syscall.Errno(0x30) EADDRNOTAVAIL = syscall.Errno(0x31) EADV = syscall.Errno(0x53) EAFNOSUPPORT = syscall.Errno(0x2f) EALREADY = syscall.Errno(0x25) EBADE = syscall.Errno(0x66) EBADFD = syscall.Errno(0x5d) EBADMSG = syscall.Errno(0x4c) EBADR = syscall.Errno(0x67) EBADRQC = syscall.Errno(0x6a) EBADSLT = syscall.Errno(0x6b) EBFONT = syscall.Errno(0x6d) ECANCELED = syscall.Errno(0x7f) ECHRNG = syscall.Errno(0x5e) ECOMM = syscall.Errno(0x55) ECONNABORTED = syscall.Errno(0x35) ECONNREFUSED = syscall.Errno(0x3d) ECONNRESET = syscall.Errno(0x36) EDEADLK = syscall.Errno(0x4e) EDEADLOCK = syscall.Errno(0x6c) EDESTADDRREQ = syscall.Errno(0x27) EDOTDOT = syscall.Errno(0x58) EDQUOT = syscall.Errno(0x45) EHOSTDOWN = syscall.Errno(0x40) EHOSTUNREACH = syscall.Errno(0x41) EHWPOISON = syscall.Errno(0x87) EIDRM = syscall.Errno(0x4d) EILSEQ = syscall.Errno(0x7a) EINPROGRESS = syscall.Errno(0x24) EISCONN = syscall.Errno(0x38) EISNAM = syscall.Errno(0x78) EKEYEXPIRED = syscall.Errno(0x81) EKEYREJECTED = syscall.Errno(0x83) EKEYREVOKED = syscall.Errno(0x82) EL2HLT = syscall.Errno(0x65) EL2NSYNC = syscall.Errno(0x5f) EL3HLT = syscall.Errno(0x60) EL3RST = syscall.Errno(0x61) ELIBACC = syscall.Errno(0x72) ELIBBAD = syscall.Errno(0x70) ELIBEXEC = syscall.Errno(0x6e) ELIBMAX = syscall.Errno(0x7b) ELIBSCN = syscall.Errno(0x7c) ELNRNG = syscall.Errno(0x62) ELOOP = syscall.Errno(0x3e) EMEDIUMTYPE = syscall.Errno(0x7e) EMSGSIZE = syscall.Errno(0x28) EMULTIHOP = syscall.Errno(0x57) ENAMETOOLONG = syscall.Errno(0x3f) ENAVAIL = syscall.Errno(0x77) ENETDOWN = syscall.Errno(0x32) ENETRESET = syscall.Errno(0x34) ENETUNREACH = syscall.Errno(0x33) ENOANO = syscall.Errno(0x69) ENOBUFS = syscall.Errno(0x37) ENOCSI = syscall.Errno(0x64) ENODATA = syscall.Errno(0x6f) ENOKEY = syscall.Errno(0x80) ENOLCK = syscall.Errno(0x4f) ENOLINK = syscall.Errno(0x52) ENOMEDIUM = syscall.Errno(0x7d) ENOMSG = syscall.Errno(0x4b) ENONET = syscall.Errno(0x50) ENOPKG = syscall.Errno(0x71) ENOPROTOOPT = syscall.Errno(0x2a) ENOSR = syscall.Errno(0x4a) ENOSTR = syscall.Errno(0x48) ENOSYS = syscall.Errno(0x5a) ENOTCONN = syscall.Errno(0x39) ENOTEMPTY = syscall.Errno(0x42) ENOTNAM = syscall.Errno(0x76) ENOTRECOVERABLE = syscall.Errno(0x85) ENOTSOCK = syscall.Errno(0x26) ENOTSUP = syscall.Errno(0x2d) ENOTUNIQ = syscall.Errno(0x73) EOPNOTSUPP = syscall.Errno(0x2d) EOVERFLOW = syscall.Errno(0x5c) EOWNERDEAD = syscall.Errno(0x84) EPFNOSUPPORT = syscall.Errno(0x2e) EPROCLIM = syscall.Errno(0x43) EPROTO = syscall.Errno(0x56) EPROTONOSUPPORT = syscall.Errno(0x2b) EPROTOTYPE = syscall.Errno(0x29) EREMCHG = syscall.Errno(0x59) EREMOTE = syscall.Errno(0x47) EREMOTEIO = syscall.Errno(0x79) ERESTART = syscall.Errno(0x74) ERFKILL = syscall.Errno(0x86) ERREMOTE = syscall.Errno(0x51) ESHUTDOWN = syscall.Errno(0x3a) ESOCKTNOSUPPORT = syscall.Errno(0x2c) ESRMNT = syscall.Errno(0x54) ESTALE = syscall.Errno(0x46) ESTRPIPE = syscall.Errno(0x5b) ETIME = syscall.Errno(0x49) ETIMEDOUT = syscall.Errno(0x3c) ETOOMANYREFS = syscall.Errno(0x3b) EUCLEAN = syscall.Errno(0x75) EUNATCH = syscall.Errno(0x63) EUSERS = syscall.Errno(0x44) EXFULL = syscall.Errno(0x68) ) // Signals const ( SIGBUS = syscall.Signal(0xa) SIGCHLD = syscall.Signal(0x14) SIGCLD = syscall.Signal(0x14) SIGCONT = syscall.Signal(0x13) SIGEMT = syscall.Signal(0x7) SIGIO = syscall.Signal(0x17) SIGLOST = syscall.Signal(0x1d) SIGPOLL = syscall.Signal(0x17) SIGPROF = syscall.Signal(0x1b) SIGPWR = syscall.Signal(0x1d) SIGSTOP = syscall.Signal(0x11) SIGSYS = syscall.Signal(0xc) 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "no such device or address"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EAGAIN", "resource temporarily unavailable"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device or resource busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "invalid cross-device link"}, {19, "ENODEV", "no such device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "numerical result out of range"}, {36, "EINPROGRESS", "operation now in progress"}, {37, "EALREADY", "operation already in progress"}, {38, "ENOTSOCK", "socket operation on non-socket"}, {39, "EDESTADDRREQ", "destination address required"}, {40, "EMSGSIZE", "message too long"}, {41, "EPROTOTYPE", "protocol wrong type for socket"}, {42, "ENOPROTOOPT", "protocol not available"}, {43, "EPROTONOSUPPORT", "protocol not supported"}, {44, "ESOCKTNOSUPPORT", "socket type not supported"}, {45, "ENOTSUP", "operation not supported"}, {46, "EPFNOSUPPORT", "protocol family not supported"}, {47, "EAFNOSUPPORT", "address family not supported by protocol"}, {48, "EADDRINUSE", "address already in use"}, {49, "EADDRNOTAVAIL", "cannot assign requested address"}, {50, "ENETDOWN", "network is down"}, {51, "ENETUNREACH", "network is unreachable"}, {52, "ENETRESET", "network dropped connection on reset"}, {53, "ECONNABORTED", "software caused connection abort"}, {54, "ECONNRESET", "connection reset by peer"}, {55, "ENOBUFS", "no buffer space available"}, {56, "EISCONN", "transport endpoint is already connected"}, {57, "ENOTCONN", "transport endpoint is not connected"}, {58, "ESHUTDOWN", "cannot send after transport endpoint shutdown"}, {59, "ETOOMANYREFS", "too many references: cannot splice"}, {60, "ETIMEDOUT", "connection timed out"}, {61, "ECONNREFUSED", "connection refused"}, {62, "ELOOP", "too many levels of symbolic links"}, {63, "ENAMETOOLONG", "file name too long"}, {64, "EHOSTDOWN", "host is down"}, {65, "EHOSTUNREACH", "no route to host"}, {66, "ENOTEMPTY", "directory not empty"}, {67, "EPROCLIM", "too many processes"}, {68, "EUSERS", "too many users"}, {69, "EDQUOT", "disk quota exceeded"}, {70, "ESTALE", "stale file handle"}, {71, "EREMOTE", "object is remote"}, {72, "ENOSTR", "device not a stream"}, {73, "ETIME", "timer expired"}, {74, "ENOSR", "out of streams resources"}, {75, "ENOMSG", "no message of desired type"}, {76, "EBADMSG", "bad message"}, {77, "EIDRM", "identifier removed"}, {78, "EDEADLK", "resource deadlock avoided"}, {79, "ENOLCK", "no locks available"}, {80, "ENONET", "machine is not on the network"}, {81, "ERREMOTE", "unknown error 81"}, {82, "ENOLINK", "link has been severed"}, {83, "EADV", "advertise error"}, {84, "ESRMNT", "srmount error"}, {85, "ECOMM", "communication error on send"}, {86, "EPROTO", "protocol error"}, {87, "EMULTIHOP", "multihop attempted"}, {88, "EDOTDOT", "RFS specific error"}, {89, "EREMCHG", "remote address changed"}, {90, "ENOSYS", "function not implemented"}, {91, "ESTRPIPE", "streams pipe error"}, {92, "EOVERFLOW", "value too large for defined data type"}, {93, "EBADFD", "file descriptor in bad state"}, {94, "ECHRNG", "channel number out of range"}, {95, "EL2NSYNC", "level 2 not synchronized"}, {96, "EL3HLT", "level 3 halted"}, {97, "EL3RST", "level 3 reset"}, {98, "ELNRNG", "link number out of range"}, {99, "EUNATCH", "protocol driver not attached"}, {100, "ENOCSI", "no CSI structure available"}, {101, "EL2HLT", "level 2 halted"}, {102, "EBADE", "invalid exchange"}, {103, "EBADR", "invalid request descriptor"}, {104, "EXFULL", "exchange full"}, {105, "ENOANO", "no anode"}, {106, "EBADRQC", "invalid request code"}, {107, "EBADSLT", "invalid slot"}, {108, "EDEADLOCK", "file locking deadlock error"}, {109, "EBFONT", "bad font file format"}, {110, "ELIBEXEC", "cannot exec a shared library directly"}, {111, "ENODATA", "no data available"}, {112, "ELIBBAD", "accessing a corrupted shared library"}, {113, "ENOPKG", "package not installed"}, {114, "ELIBACC", "can not access a needed shared library"}, {115, "ENOTUNIQ", "name not unique on network"}, {116, "ERESTART", "interrupted system call should be restarted"}, {117, "EUCLEAN", "structure needs cleaning"}, {118, "ENOTNAM", "not a XENIX named type file"}, {119, "ENAVAIL", "no XENIX semaphores available"}, {120, "EISNAM", "is a named type file"}, {121, "EREMOTEIO", "remote I/O error"}, {122, "EILSEQ", "invalid or incomplete multibyte or wide character"}, {123, "ELIBMAX", "attempting to link in too many shared libraries"}, {124, "ELIBSCN", ".lib section in a.out corrupted"}, {125, "ENOMEDIUM", "no medium found"}, {126, "EMEDIUMTYPE", "wrong medium type"}, {127, "ECANCELED", "operation canceled"}, {128, "ENOKEY", "required key not available"}, {129, "EKEYEXPIRED", "key has expired"}, {130, "EKEYREVOKED", "key has been revoked"}, {131, "EKEYREJECTED", "key was rejected by service"}, {132, "EOWNERDEAD", "owner died"}, {133, "ENOTRECOVERABLE", "state not recoverable"}, {134, "ERFKILL", "operation not possible due to RF-kill"}, {135, "EHWPOISON", "memory page has hardware error"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/breakpoint trap"}, {6, "SIGABRT", "aborted"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGURG", "urgent I/O condition"}, {17, "SIGSTOP", "stopped (signal)"}, {18, "SIGTSTP", "stopped"}, {19, "SIGCONT", "continued"}, {20, "SIGCHLD", "child exited"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGIO", "I/O possible"}, {24, "SIGXCPU", "CPU time limit exceeded"}, {25, "SIGXFSZ", "file size limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window changed"}, {29, "SIGLOST", "power failure"}, {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go ================================================ // mkerrors.sh -m32 // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && netbsd // Code generated by cmd/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 CPUSTATES = 0x5 CP_IDLE = 0x4 CP_INTR = 0x3 CP_NICE = 0x1 CP_SYS = 0x2 CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x10000 CS5 = 0x0 CS6 = 0x100 CS7 = 0x200 CS8 = 0x300 CSIZE = 0x300 CSTART = 0x11 CSTATUS = 0x14 CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a CTL_HW = 0x6 CTL_KERN = 0x1 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 EXTATTR_CMD_START = 0x1 EXTATTR_CMD_STOP = 0x2 EXTATTR_NAMESPACE_SYSTEM = 0x2 EXTATTR_NAMESPACE_USER = 0x1 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 HW_MACHINE = 0x1 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 KERN_HOSTNAME = 0xa KERN_OSRELEASE = 0x2 KERN_OSTYPE = 0x1 KERN_VERSION = 0x4 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 MNT_ASYNC = 0x40 MNT_BASIC_FLAGS = 0xe782807f MNT_DEFEXPORTED = 0x200 MNT_DISCARD = 0x800000 MNT_EXKERB = 0x800 MNT_EXNORESPORT = 0x8000000 MNT_EXPORTANON = 0x400 MNT_EXPORTED = 0x100 MNT_EXPUBLIC = 0x10000000 MNT_EXRDONLY = 0x80 MNT_EXTATTR = 0x1000000 MNT_FORCE = 0x80000 MNT_GETARGS = 0x400000 MNT_IGNORE = 0x100000 MNT_LAZY = 0x3 MNT_LOCAL = 0x1000 MNT_LOG = 0x2000000 MNT_NOATIME = 0x4000000 MNT_NOCOREDUMP = 0x8000 MNT_NODEV = 0x10 MNT_NODEVMTIME = 0x40000000 MNT_NOEXEC = 0x4 MNT_NOSUID = 0x8 MNT_NOWAIT = 0x2 MNT_OP_FLAGS = 0x4d0000 MNT_QUOTA = 0x2000 MNT_RDONLY = 0x1 MNT_RELATIME = 0x20000 MNT_RELOAD = 0x40000 MNT_ROOTFS = 0x4000 MNT_SOFTDEP = 0x80000000 MNT_SYMPERM = 0x20000000 MNT_SYNCHRONOUS = 0x2 MNT_UNION = 0x20 MNT_UPDATE = 0x10000 MNT_VISFLAGMASK = 0xff90ffff MNT_WAIT = 0x1 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 NFDBITS = 0x20 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_MEMLOCK = 0x6 RLIMIT_NOFILE = 0x8 RLIMIT_NPROC = 0x7 RLIMIT_RSS = 0x5 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "device not configured"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EDEADLK", "resource deadlock avoided"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "cross-device link"}, {19, "ENODEV", "operation not supported by device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "result too large or too small"}, {35, "EAGAIN", "resource temporarily unavailable"}, {36, "EINPROGRESS", "operation now in progress"}, {37, "EALREADY", "operation already in progress"}, {38, "ENOTSOCK", "socket operation on non-socket"}, {39, "EDESTADDRREQ", "destination address required"}, {40, "EMSGSIZE", "message too long"}, {41, "EPROTOTYPE", "protocol wrong type for socket"}, {42, "ENOPROTOOPT", "protocol option not available"}, {43, "EPROTONOSUPPORT", "protocol not supported"}, {44, "ESOCKTNOSUPPORT", "socket type not supported"}, {45, "EOPNOTSUPP", "operation not supported"}, {46, "EPFNOSUPPORT", "protocol family not supported"}, {47, "EAFNOSUPPORT", "address family not supported by protocol family"}, {48, "EADDRINUSE", "address already in use"}, {49, "EADDRNOTAVAIL", "can't assign requested address"}, {50, "ENETDOWN", "network is down"}, {51, "ENETUNREACH", "network is unreachable"}, {52, "ENETRESET", "network dropped connection on reset"}, {53, "ECONNABORTED", "software caused connection abort"}, {54, "ECONNRESET", "connection reset by peer"}, {55, "ENOBUFS", "no buffer space available"}, {56, "EISCONN", "socket is already connected"}, {57, "ENOTCONN", "socket is not connected"}, {58, "ESHUTDOWN", "can't send after socket shutdown"}, {59, "ETOOMANYREFS", "too many references: can't splice"}, {60, "ETIMEDOUT", "connection timed out"}, {61, "ECONNREFUSED", "connection refused"}, {62, "ELOOP", "too many levels of symbolic links"}, {63, "ENAMETOOLONG", "file name too long"}, {64, "EHOSTDOWN", "host is down"}, {65, "EHOSTUNREACH", "no route to host"}, {66, "ENOTEMPTY", "directory not empty"}, {67, "EPROCLIM", "too many processes"}, {68, "EUSERS", "too many users"}, {69, "EDQUOT", "disc quota exceeded"}, {70, "ESTALE", "stale NFS file handle"}, {71, "EREMOTE", "too many levels of remote in path"}, {72, "EBADRPC", "RPC struct is bad"}, {73, "ERPCMISMATCH", "RPC version wrong"}, {74, "EPROGUNAVAIL", "RPC prog. not avail"}, {75, "EPROGMISMATCH", "program version wrong"}, {76, "EPROCUNAVAIL", "bad procedure for program"}, {77, "ENOLCK", "no locks available"}, {78, "ENOSYS", "function not implemented"}, {79, "EFTYPE", "inappropriate file type or format"}, {80, "EAUTH", "authentication error"}, {81, "ENEEDAUTH", "need authenticator"}, {82, "EIDRM", "identifier removed"}, {83, "ENOMSG", "no message of desired type"}, {84, "EOVERFLOW", "value too large to be stored in data type"}, {85, "EILSEQ", "illegal byte sequence"}, {86, "ENOTSUP", "not supported"}, {87, "ECANCELED", "operation Canceled"}, {88, "EBADMSG", "bad or Corrupt message"}, {89, "ENODATA", "no message available"}, {90, "ENOSR", "no STREAM resources"}, {91, "ENOSTR", "not a STREAM"}, {92, "ETIME", "STREAM ioctl timeout"}, {93, "ENOATTR", "attribute not found"}, {94, "EMULTIHOP", "multihop attempted"}, {95, "ENOLINK", "link has been severed"}, {96, "ELAST", "protocol error"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, {6, "SIGIOT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGURG", "urgent I/O condition"}, {17, "SIGSTOP", "stopped (signal)"}, {18, "SIGTSTP", "stopped"}, {19, "SIGCONT", "continued"}, {20, "SIGCHLD", "child exited"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGIO", "I/O possible"}, {24, "SIGXCPU", "cputime limit exceeded"}, {25, "SIGXFSZ", "filesize limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window size changes"}, {29, "SIGINFO", "information request"}, {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGPWR", "power fail/restart"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go ================================================ // mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && netbsd // Code generated by cmd/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 CPUSTATES = 0x5 CP_IDLE = 0x4 CP_INTR = 0x3 CP_NICE = 0x1 CP_SYS = 0x2 CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x10000 CS5 = 0x0 CS6 = 0x100 CS7 = 0x200 CS8 = 0x300 CSIZE = 0x300 CSTART = 0x11 CSTATUS = 0x14 CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a CTL_HW = 0x6 CTL_KERN = 0x1 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 EXTATTR_CMD_START = 0x1 EXTATTR_CMD_STOP = 0x2 EXTATTR_NAMESPACE_SYSTEM = 0x2 EXTATTR_NAMESPACE_USER = 0x1 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 HW_MACHINE = 0x1 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 KERN_HOSTNAME = 0xa KERN_OSRELEASE = 0x2 KERN_OSTYPE = 0x1 KERN_VERSION = 0x4 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 MNT_ASYNC = 0x40 MNT_BASIC_FLAGS = 0xe782807f MNT_DEFEXPORTED = 0x200 MNT_DISCARD = 0x800000 MNT_EXKERB = 0x800 MNT_EXNORESPORT = 0x8000000 MNT_EXPORTANON = 0x400 MNT_EXPORTED = 0x100 MNT_EXPUBLIC = 0x10000000 MNT_EXRDONLY = 0x80 MNT_EXTATTR = 0x1000000 MNT_FORCE = 0x80000 MNT_GETARGS = 0x400000 MNT_IGNORE = 0x100000 MNT_LAZY = 0x3 MNT_LOCAL = 0x1000 MNT_LOG = 0x2000000 MNT_NOATIME = 0x4000000 MNT_NOCOREDUMP = 0x8000 MNT_NODEV = 0x10 MNT_NODEVMTIME = 0x40000000 MNT_NOEXEC = 0x4 MNT_NOSUID = 0x8 MNT_NOWAIT = 0x2 MNT_OP_FLAGS = 0x4d0000 MNT_QUOTA = 0x2000 MNT_RDONLY = 0x1 MNT_RELATIME = 0x20000 MNT_RELOAD = 0x40000 MNT_ROOTFS = 0x4000 MNT_SOFTDEP = 0x80000000 MNT_SYMPERM = 0x20000000 MNT_SYNCHRONOUS = 0x2 MNT_UNION = 0x20 MNT_UPDATE = 0x10000 MNT_VISFLAGMASK = 0xff90ffff MNT_WAIT = 0x1 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 NFDBITS = 0x20 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_MEMLOCK = 0x6 RLIMIT_NOFILE = 0x8 RLIMIT_NPROC = 0x7 RLIMIT_RSS = 0x5 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "device not configured"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EDEADLK", "resource deadlock avoided"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "cross-device link"}, {19, "ENODEV", "operation not supported by device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "result too large or too small"}, {35, "EAGAIN", "resource temporarily unavailable"}, {36, "EINPROGRESS", "operation now in progress"}, {37, "EALREADY", "operation already in progress"}, {38, "ENOTSOCK", "socket operation on non-socket"}, {39, "EDESTADDRREQ", "destination address required"}, {40, "EMSGSIZE", "message too long"}, {41, "EPROTOTYPE", "protocol wrong type for socket"}, {42, "ENOPROTOOPT", "protocol option not available"}, {43, "EPROTONOSUPPORT", "protocol not supported"}, {44, "ESOCKTNOSUPPORT", "socket type not supported"}, {45, "EOPNOTSUPP", "operation not supported"}, {46, "EPFNOSUPPORT", "protocol family not supported"}, {47, "EAFNOSUPPORT", "address family not supported by protocol family"}, {48, "EADDRINUSE", "address already in use"}, {49, "EADDRNOTAVAIL", "can't assign requested address"}, {50, "ENETDOWN", "network is down"}, {51, "ENETUNREACH", "network is unreachable"}, {52, "ENETRESET", "network dropped connection on reset"}, {53, "ECONNABORTED", "software caused connection abort"}, {54, "ECONNRESET", "connection reset by peer"}, {55, "ENOBUFS", "no buffer space available"}, {56, "EISCONN", "socket is already connected"}, {57, "ENOTCONN", "socket is not connected"}, {58, "ESHUTDOWN", "can't send after socket shutdown"}, {59, "ETOOMANYREFS", "too many references: can't splice"}, {60, "ETIMEDOUT", "connection timed out"}, {61, "ECONNREFUSED", "connection refused"}, {62, "ELOOP", "too many levels of symbolic links"}, {63, "ENAMETOOLONG", "file name too long"}, {64, "EHOSTDOWN", "host is down"}, {65, "EHOSTUNREACH", "no route to host"}, {66, "ENOTEMPTY", "directory not empty"}, {67, "EPROCLIM", "too many processes"}, {68, "EUSERS", "too many users"}, {69, "EDQUOT", "disc quota exceeded"}, {70, "ESTALE", "stale NFS file handle"}, {71, "EREMOTE", "too many levels of remote in path"}, {72, "EBADRPC", "RPC struct is bad"}, {73, "ERPCMISMATCH", "RPC version wrong"}, {74, "EPROGUNAVAIL", "RPC prog. not avail"}, {75, "EPROGMISMATCH", "program version wrong"}, {76, "EPROCUNAVAIL", "bad procedure for program"}, {77, "ENOLCK", "no locks available"}, {78, "ENOSYS", "function not implemented"}, {79, "EFTYPE", "inappropriate file type or format"}, {80, "EAUTH", "authentication error"}, {81, "ENEEDAUTH", "need authenticator"}, {82, "EIDRM", "identifier removed"}, {83, "ENOMSG", "no message of desired type"}, {84, "EOVERFLOW", "value too large to be stored in data type"}, {85, "EILSEQ", "illegal byte sequence"}, {86, "ENOTSUP", "not supported"}, {87, "ECANCELED", "operation Canceled"}, {88, "EBADMSG", "bad or Corrupt message"}, {89, "ENODATA", "no message available"}, {90, "ENOSR", "no STREAM resources"}, {91, "ENOSTR", "not a STREAM"}, {92, "ETIME", "STREAM ioctl timeout"}, {93, "ENOATTR", "attribute not found"}, {94, "EMULTIHOP", "multihop attempted"}, {95, "ENOLINK", "link has been severed"}, {96, "ELAST", "protocol error"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, {6, "SIGIOT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGURG", "urgent I/O condition"}, {17, "SIGSTOP", "stopped (signal)"}, {18, "SIGTSTP", "stopped"}, {19, "SIGCONT", "continued"}, {20, "SIGCHLD", "child exited"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGIO", "I/O possible"}, {24, "SIGXCPU", "cputime limit exceeded"}, {25, "SIGXFSZ", "filesize limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window size changes"}, {29, "SIGINFO", "information request"}, {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGPWR", "power fail/restart"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go ================================================ // mkerrors.sh -marm // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && netbsd // Code generated by cmd/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 CPUSTATES = 0x5 CP_IDLE = 0x4 CP_INTR = 0x3 CP_NICE = 0x1 CP_SYS = 0x2 CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x10000 CS5 = 0x0 CS6 = 0x100 CS7 = 0x200 CS8 = 0x300 CSIZE = 0x300 CSTART = 0x11 CSTATUS = 0x14 CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a CTL_HW = 0x6 CTL_KERN = 0x1 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 EXTATTR_CMD_START = 0x1 EXTATTR_CMD_STOP = 0x2 EXTATTR_NAMESPACE_SYSTEM = 0x2 EXTATTR_NAMESPACE_USER = 0x1 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 HW_MACHINE = 0x1 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 KERN_HOSTNAME = 0xa KERN_OSRELEASE = 0x2 KERN_OSTYPE = 0x1 KERN_VERSION = 0x4 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 MNT_ASYNC = 0x40 MNT_BASIC_FLAGS = 0xe782807f MNT_DEFEXPORTED = 0x200 MNT_DISCARD = 0x800000 MNT_EXKERB = 0x800 MNT_EXNORESPORT = 0x8000000 MNT_EXPORTANON = 0x400 MNT_EXPORTED = 0x100 MNT_EXPUBLIC = 0x10000000 MNT_EXRDONLY = 0x80 MNT_EXTATTR = 0x1000000 MNT_FORCE = 0x80000 MNT_GETARGS = 0x400000 MNT_IGNORE = 0x100000 MNT_LAZY = 0x3 MNT_LOCAL = 0x1000 MNT_LOG = 0x2000000 MNT_NOATIME = 0x4000000 MNT_NOCOREDUMP = 0x8000 MNT_NODEV = 0x10 MNT_NODEVMTIME = 0x40000000 MNT_NOEXEC = 0x4 MNT_NOSUID = 0x8 MNT_NOWAIT = 0x2 MNT_OP_FLAGS = 0x4d0000 MNT_QUOTA = 0x2000 MNT_RDONLY = 0x1 MNT_RELATIME = 0x20000 MNT_RELOAD = 0x40000 MNT_ROOTFS = 0x4000 MNT_SOFTDEP = 0x80000000 MNT_SYMPERM = 0x20000000 MNT_SYNCHRONOUS = 0x2 MNT_UNION = 0x20 MNT_UPDATE = 0x10000 MNT_VISFLAGMASK = 0xff90ffff MNT_WAIT = 0x1 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 NFDBITS = 0x20 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_MEMLOCK = 0x6 RLIMIT_NOFILE = 0x8 RLIMIT_NPROC = 0x7 RLIMIT_RSS = 0x5 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "device not configured"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EDEADLK", "resource deadlock avoided"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "cross-device link"}, {19, "ENODEV", "operation not supported by device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "result too large or too small"}, {35, "EAGAIN", "resource temporarily unavailable"}, {36, "EINPROGRESS", "operation now in progress"}, {37, "EALREADY", "operation already in progress"}, {38, "ENOTSOCK", "socket operation on non-socket"}, {39, "EDESTADDRREQ", "destination address required"}, {40, "EMSGSIZE", "message too long"}, {41, "EPROTOTYPE", "protocol wrong type for socket"}, {42, "ENOPROTOOPT", "protocol option not available"}, {43, "EPROTONOSUPPORT", "protocol not supported"}, {44, "ESOCKTNOSUPPORT", "socket type not supported"}, {45, "EOPNOTSUPP", "operation not supported"}, {46, "EPFNOSUPPORT", "protocol family not supported"}, {47, "EAFNOSUPPORT", "address family not supported by protocol family"}, {48, "EADDRINUSE", "address already in use"}, {49, "EADDRNOTAVAIL", "can't assign requested address"}, {50, "ENETDOWN", "network is down"}, {51, "ENETUNREACH", "network is unreachable"}, {52, "ENETRESET", "network dropped connection on reset"}, {53, "ECONNABORTED", "software caused connection abort"}, {54, "ECONNRESET", "connection reset by peer"}, {55, "ENOBUFS", "no buffer space available"}, {56, "EISCONN", "socket is already connected"}, {57, "ENOTCONN", "socket is not connected"}, {58, "ESHUTDOWN", "can't send after socket shutdown"}, {59, "ETOOMANYREFS", "too many references: can't splice"}, {60, "ETIMEDOUT", "connection timed out"}, {61, "ECONNREFUSED", "connection refused"}, {62, "ELOOP", "too many levels of symbolic links"}, {63, "ENAMETOOLONG", "file name too long"}, {64, "EHOSTDOWN", "host is down"}, {65, "EHOSTUNREACH", "no route to host"}, {66, "ENOTEMPTY", "directory not empty"}, {67, "EPROCLIM", "too many processes"}, {68, "EUSERS", "too many users"}, {69, "EDQUOT", "disc quota exceeded"}, {70, "ESTALE", "stale NFS file handle"}, {71, "EREMOTE", "too many levels of remote in path"}, {72, "EBADRPC", "RPC struct is bad"}, {73, "ERPCMISMATCH", "RPC version wrong"}, {74, "EPROGUNAVAIL", "RPC prog. not avail"}, {75, "EPROGMISMATCH", "program version wrong"}, {76, "EPROCUNAVAIL", "bad procedure for program"}, {77, "ENOLCK", "no locks available"}, {78, "ENOSYS", "function not implemented"}, {79, "EFTYPE", "inappropriate file type or format"}, {80, "EAUTH", "authentication error"}, {81, "ENEEDAUTH", "need authenticator"}, {82, "EIDRM", "identifier removed"}, {83, "ENOMSG", "no message of desired type"}, {84, "EOVERFLOW", "value too large to be stored in data type"}, {85, "EILSEQ", "illegal byte sequence"}, {86, "ENOTSUP", "not supported"}, {87, "ECANCELED", "operation Canceled"}, {88, "EBADMSG", "bad or Corrupt message"}, {89, "ENODATA", "no message available"}, {90, "ENOSR", "no STREAM resources"}, {91, "ENOSTR", "not a STREAM"}, {92, "ETIME", "STREAM ioctl timeout"}, {93, "ENOATTR", "attribute not found"}, {94, "EMULTIHOP", "multihop attempted"}, {95, "ENOLINK", "link has been severed"}, {96, "ELAST", "protocol error"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, {6, "SIGIOT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGURG", "urgent I/O condition"}, {17, "SIGSTOP", "stopped (signal)"}, {18, "SIGTSTP", "stopped"}, {19, "SIGCONT", "continued"}, {20, "SIGCHLD", "child exited"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGIO", "I/O possible"}, {24, "SIGXCPU", "cputime limit exceeded"}, {25, "SIGXFSZ", "filesize limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window size changes"}, {29, "SIGINFO", "information request"}, {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGPWR", "power fail/restart"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_netbsd_arm64.go ================================================ // mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && netbsd // Code generated by cmd/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 CPUSTATES = 0x5 CP_IDLE = 0x4 CP_INTR = 0x3 CP_NICE = 0x1 CP_SYS = 0x2 CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x10000 CS5 = 0x0 CS6 = 0x100 CS7 = 0x200 CS8 = 0x300 CSIZE = 0x300 CSTART = 0x11 CSTATUS = 0x14 CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a CTL_HW = 0x6 CTL_KERN = 0x1 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 EXTATTR_CMD_START = 0x1 EXTATTR_CMD_STOP = 0x2 EXTATTR_NAMESPACE_SYSTEM = 0x2 EXTATTR_NAMESPACE_USER = 0x1 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 HW_MACHINE = 0x1 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 KERN_HOSTNAME = 0xa KERN_OSRELEASE = 0x2 KERN_OSTYPE = 0x1 KERN_VERSION = 0x4 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 MNT_ASYNC = 0x40 MNT_BASIC_FLAGS = 0xe782807f MNT_DEFEXPORTED = 0x200 MNT_DISCARD = 0x800000 MNT_EXKERB = 0x800 MNT_EXNORESPORT = 0x8000000 MNT_EXPORTANON = 0x400 MNT_EXPORTED = 0x100 MNT_EXPUBLIC = 0x10000000 MNT_EXRDONLY = 0x80 MNT_EXTATTR = 0x1000000 MNT_FORCE = 0x80000 MNT_GETARGS = 0x400000 MNT_IGNORE = 0x100000 MNT_LAZY = 0x3 MNT_LOCAL = 0x1000 MNT_LOG = 0x2000000 MNT_NOATIME = 0x4000000 MNT_NOCOREDUMP = 0x8000 MNT_NODEV = 0x10 MNT_NODEVMTIME = 0x40000000 MNT_NOEXEC = 0x4 MNT_NOSUID = 0x8 MNT_NOWAIT = 0x2 MNT_OP_FLAGS = 0x4d0000 MNT_QUOTA = 0x2000 MNT_RDONLY = 0x1 MNT_RELATIME = 0x20000 MNT_RELOAD = 0x40000 MNT_ROOTFS = 0x4000 MNT_SOFTDEP = 0x80000000 MNT_SYMPERM = 0x20000000 MNT_SYNCHRONOUS = 0x2 MNT_UNION = 0x20 MNT_UPDATE = 0x10000 MNT_VISFLAGMASK = 0xff90ffff MNT_WAIT = 0x1 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 NFDBITS = 0x20 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_MEMLOCK = 0x6 RLIMIT_NOFILE = 0x8 RLIMIT_NPROC = 0x7 RLIMIT_RSS = 0x5 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "device not configured"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EDEADLK", "resource deadlock avoided"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "cross-device link"}, {19, "ENODEV", "operation not supported by device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "result too large or too small"}, {35, "EAGAIN", "resource temporarily unavailable"}, {36, "EINPROGRESS", "operation now in progress"}, {37, "EALREADY", "operation already in progress"}, {38, "ENOTSOCK", "socket operation on non-socket"}, {39, "EDESTADDRREQ", "destination address required"}, {40, "EMSGSIZE", "message too long"}, {41, "EPROTOTYPE", "protocol wrong type for socket"}, {42, "ENOPROTOOPT", "protocol option not available"}, {43, "EPROTONOSUPPORT", "protocol not supported"}, {44, "ESOCKTNOSUPPORT", "socket type not supported"}, {45, "EOPNOTSUPP", "operation not supported"}, {46, "EPFNOSUPPORT", "protocol family not supported"}, {47, "EAFNOSUPPORT", "address family not supported by protocol family"}, {48, "EADDRINUSE", "address already in use"}, {49, "EADDRNOTAVAIL", "can't assign requested address"}, {50, "ENETDOWN", "network is down"}, {51, "ENETUNREACH", "network is unreachable"}, {52, "ENETRESET", "network dropped connection on reset"}, {53, "ECONNABORTED", "software caused connection abort"}, {54, "ECONNRESET", "connection reset by peer"}, {55, "ENOBUFS", "no buffer space available"}, {56, "EISCONN", "socket is already connected"}, {57, "ENOTCONN", "socket is not connected"}, {58, "ESHUTDOWN", "can't send after socket shutdown"}, {59, "ETOOMANYREFS", "too many references: can't splice"}, {60, "ETIMEDOUT", "connection timed out"}, {61, "ECONNREFUSED", "connection refused"}, {62, "ELOOP", "too many levels of symbolic links"}, {63, "ENAMETOOLONG", "file name too long"}, {64, "EHOSTDOWN", "host is down"}, {65, "EHOSTUNREACH", "no route to host"}, {66, "ENOTEMPTY", "directory not empty"}, {67, "EPROCLIM", "too many processes"}, {68, "EUSERS", "too many users"}, {69, "EDQUOT", "disc quota exceeded"}, {70, "ESTALE", "stale NFS file handle"}, {71, "EREMOTE", "too many levels of remote in path"}, {72, "EBADRPC", "RPC struct is bad"}, {73, "ERPCMISMATCH", "RPC version wrong"}, {74, "EPROGUNAVAIL", "RPC prog. not avail"}, {75, "EPROGMISMATCH", "program version wrong"}, {76, "EPROCUNAVAIL", "bad procedure for program"}, {77, "ENOLCK", "no locks available"}, {78, "ENOSYS", "function not implemented"}, {79, "EFTYPE", "inappropriate file type or format"}, {80, "EAUTH", "authentication error"}, {81, "ENEEDAUTH", "need authenticator"}, {82, "EIDRM", "identifier removed"}, {83, "ENOMSG", "no message of desired type"}, {84, "EOVERFLOW", "value too large to be stored in data type"}, {85, "EILSEQ", "illegal byte sequence"}, {86, "ENOTSUP", "not supported"}, {87, "ECANCELED", "operation Canceled"}, {88, "EBADMSG", "bad or Corrupt message"}, {89, "ENODATA", "no message available"}, {90, "ENOSR", "no STREAM resources"}, {91, "ENOSTR", "not a STREAM"}, {92, "ETIME", "STREAM ioctl timeout"}, {93, "ENOATTR", "attribute not found"}, {94, "EMULTIHOP", "multihop attempted"}, {95, "ENOLINK", "link has been severed"}, {96, "ELAST", "protocol error"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, {6, "SIGIOT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGURG", "urgent I/O condition"}, {17, "SIGSTOP", "stopped (signal)"}, {18, "SIGTSTP", "stopped"}, {19, "SIGCONT", "continued"}, {20, "SIGCHLD", "child exited"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGIO", "I/O possible"}, {24, "SIGXCPU", "cputime limit exceeded"}, {25, "SIGXFSZ", "filesize limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window size changes"}, {29, "SIGINFO", "information request"}, {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGPWR", "power fail/restart"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go ================================================ // mkerrors.sh -m32 // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && openbsd // Code generated by cmd/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 ALTWERASE = 0x200 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_FILDROP_CAPTURE = 0x1 BPF_FILDROP_DROP = 0x2 BPF_FILDROP_PASS = 0x0 BPF_F_DIR_IN = 0x10 BPF_F_DIR_MASK = 0x30 BPF_F_DIR_OUT = 0x20 BPF_F_DIR_SHIFT = 0x4 BPF_F_FLOWID = 0x8 BPF_F_PRI_MASK = 0x7 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_RND = 0xc0 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 CLOCK_BOOTTIME = 0x6 CLOCK_MONOTONIC = 0x3 CLOCK_PROCESS_CPUTIME_ID = 0x2 CLOCK_REALTIME = 0x0 CLOCK_THREAD_CPUTIME_ID = 0x4 CLOCK_UPTIME = 0x5 CPUSTATES = 0x6 CP_IDLE = 0x5 CP_INTR = 0x4 CP_NICE = 0x1 CP_SPIN = 0x3 CP_SYS = 0x2 CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x10000 CS5 = 0x0 CS6 = 0x100 CS7 = 0x200 CS8 = 0x300 CSIZE = 0x300 CSTART = 0x11 CSTATUS = 0xff CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a CTL_HW = 0x6 CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 DIOCADDQUEUE = 0xc100445d DIOCADDRULE = 0xccc84404 DIOCADDSTATE = 0xc1084425 DIOCCHANGERULE = 0xccc8441a DIOCCLRIFFLAG = 0xc024445a DIOCCLRSRCNODES = 0x20004455 DIOCCLRSTATES = 0xc0d04412 DIOCCLRSTATUS = 0xc0244416 DIOCGETLIMIT = 0xc0084427 DIOCGETQSTATS = 0xc1084460 DIOCGETQUEUE = 0xc100445f DIOCGETQUEUES = 0xc100445e DIOCGETRULE = 0xccc84407 DIOCGETRULES = 0xccc84406 DIOCGETRULESET = 0xc444443b DIOCGETRULESETS = 0xc444443a DIOCGETSRCNODES = 0xc0084454 DIOCGETSTATE = 0xc1084413 DIOCGETSTATES = 0xc0084419 DIOCGETSTATUS = 0xc1e84415 DIOCGETSYNFLWATS = 0xc0084463 DIOCGETTIMEOUT = 0xc008441e DIOCIGETIFACES = 0xc0244457 DIOCKILLSRCNODES = 0xc068445b DIOCKILLSTATES = 0xc0d04429 DIOCNATLOOK = 0xc0504417 DIOCOSFPADD = 0xc084444f DIOCOSFPFLUSH = 0x2000444e DIOCOSFPGET = 0xc0844450 DIOCRADDADDRS = 0xc44c4443 DIOCRADDTABLES = 0xc44c443d DIOCRCLRADDRS = 0xc44c4442 DIOCRCLRASTATS = 0xc44c4448 DIOCRCLRTABLES = 0xc44c443c DIOCRCLRTSTATS = 0xc44c4441 DIOCRDELADDRS = 0xc44c4444 DIOCRDELTABLES = 0xc44c443e DIOCRGETADDRS = 0xc44c4446 DIOCRGETASTATS = 0xc44c4447 DIOCRGETTABLES = 0xc44c443f DIOCRGETTSTATS = 0xc44c4440 DIOCRINADEFINE = 0xc44c444d DIOCRSETADDRS = 0xc44c4445 DIOCRSETTFLAGS = 0xc44c444a DIOCRTSTADDRS = 0xc44c4449 DIOCSETDEBUG = 0xc0044418 DIOCSETHOSTID = 0xc0044456 DIOCSETIFFLAG = 0xc0244459 DIOCSETLIMIT = 0xc0084428 DIOCSETREASS = 0xc004445c DIOCSETSTATUSIF = 0xc0244414 DIOCSETSYNCOOKIES = 0xc0014462 DIOCSETSYNFLWATS = 0xc0084461 DIOCSETTIMEOUT = 0xc008441d DIOCSTART = 0x20004401 DIOCSTOP = 0x20004402 DIOCXBEGIN = 0xc00c4451 DIOCXCOMMIT = 0xc00c4452 DIOCXROLLBACK = 0xc00c4453 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_OPENFLOW = 0x10b 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 DLT_USBPCAP = 0xf9 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 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 ETH64_8021_RSVD_MASK = 0xfffffffffff0 ETH64_8021_RSVD_PREFIX = 0x180c2000000 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_EAPOL = 0x888e 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_MACSEC = 0x88e5 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_NHRP = 0x2001 ETHERTYPE_NOVELL = 0x8138 ETHERTYPE_NS = 0x600 ETHERTYPE_NSAT = 0x601 ETHERTYPE_NSCOMPAT = 0x807 ETHERTYPE_NSH = 0x984f ETHERTYPE_NTRAILER = 0x10 ETHERTYPE_OS9 = 0x7007 ETHERTYPE_OS9NET = 0x7009 ETHERTYPE_PACER = 0x80c6 ETHERTYPE_PBB = 0x88e7 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_HARDMTU_LEN = 0xff9b ETHER_MAX_LEN = 0x5ee ETHER_MIN_LEN = 0x40 ETHER_TYPE_LEN = 0x2 ETHER_VLAN_ENCAP_LEN = 0x4 EVFILT_AIO = -0x3 EVFILT_DEVICE = -0x8 EVFILT_EXCEPT = -0x9 EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 EVFILT_SYSCOUNT = 0x9 EVFILT_TIMER = -0x7 EVFILT_VNODE = -0x4 EVFILT_WRITE = -0x2 EVL_ENCAPLEN = 0x4 EVL_PRIO_BITS = 0xd EVL_PRIO_MAX = 0x7 EVL_VLID_MASK = 0xfff EVL_VLID_MAX = 0xffe EVL_VLID_MIN = 0x1 EVL_VLID_NULL = 0x0 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_FLAG1 = 0x2000 EV_ONESHOT = 0x10 EV_RECEIPT = 0x40 EV_SYSFLAGS = 0xf800 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_ISATTY = 0xb 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 HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 IEXTEN = 0x400 IFAN_ARRIVAL = 0x0 IFAN_DEPARTURE = 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_OACTIVE = 0x400 IFF_POINTOPOINT = 0x10 IFF_PROMISC = 0x100 IFF_RUNNING = 0x40 IFF_SIMPLEX = 0x800 IFF_STATICARP = 0x20 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_MBIM = 0xfa 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_WIREGUARD = 0xfb 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_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_SCTP = 0x84 IPPROTO_TCP = 0x6 IPPROTO_TP = 0x1d IPPROTO_UDP = 0x11 IPPROTO_UDPLITE = 0x88 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_MINHOPCOUNT = 0x41 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_DROP_MEMBERSHIP = 0xd IP_ESP_NETWORK_LEVEL = 0x16 IP_ESP_TRANS_LEVEL = 0x15 IP_HDRINCL = 0x2 IP_IPCOMP_LEVEL = 0x1d IP_IPDEFTTL = 0x25 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_SENDSRCADDR = 0x7 IP_TOS = 0x3 IP_TTL = 0x4 ISIG = 0x80 ISTRIP = 0x20 ITIMER_PROF = 0x2 ITIMER_REAL = 0x0 ITIMER_VIRTUAL = 0x1 IUCLC = 0x1000 IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 KERN_HOSTNAME = 0xa KERN_OSRELEASE = 0x2 KERN_OSTYPE = 0x1 KERN_VERSION = 0x4 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_ANONYMOUS = 0x1000 MAP_CONCEAL = 0x8000 MAP_COPY = 0x2 MAP_FILE = 0x0 MAP_FIXED = 0x10 MAP_FLAGMASK = 0xfff7 MAP_HASSEMAPHORE = 0x0 MAP_INHERIT = 0x0 MAP_INHERIT_COPY = 0x1 MAP_INHERIT_NONE = 0x2 MAP_INHERIT_SHARE = 0x0 MAP_INHERIT_ZERO = 0x3 MAP_NOEXTEND = 0x0 MAP_NORESERVE = 0x0 MAP_PRIVATE = 0x2 MAP_RENAME = 0x0 MAP_SHARED = 0x1 MAP_STACK = 0x4000 MAP_TRYFIXED = 0x0 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MNT_ASYNC = 0x40 MNT_DEFEXPORTED = 0x200 MNT_DELEXPORT = 0x20000 MNT_DOOMED = 0x8000000 MNT_EXPORTANON = 0x400 MNT_EXPORTED = 0x100 MNT_EXRDONLY = 0x80 MNT_FORCE = 0x80000 MNT_LAZY = 0x3 MNT_LOCAL = 0x1000 MNT_NOATIME = 0x8000 MNT_NODEV = 0x10 MNT_NOEXEC = 0x4 MNT_NOPERM = 0x20 MNT_NOSUID = 0x8 MNT_NOWAIT = 0x2 MNT_QUOTA = 0x2000 MNT_RDONLY = 0x1 MNT_RELOAD = 0x40000 MNT_ROOTFS = 0x4000 MNT_SOFTDEP = 0x4000000 MNT_STALLED = 0x100000 MNT_SWAPPABLE = 0x200000 MNT_SYNCHRONOUS = 0x2 MNT_UPDATE = 0x10000 MNT_VISFLAGMASK = 0x400ffff MNT_WAIT = 0x1 MNT_WANTRDWR = 0x2000000 MNT_WXALLOWED = 0x800 MOUNT_AFS = "afs" MOUNT_CD9660 = "cd9660" MOUNT_EXT2FS = "ext2fs" MOUNT_FFS = "ffs" MOUNT_FUSEFS = "fuse" MOUNT_MFS = "mfs" MOUNT_MSDOS = "msdos" MOUNT_NCPFS = "ncpfs" MOUNT_NFS = "nfs" MOUNT_NTFS = "ntfs" MOUNT_TMPFS = "tmpfs" MOUNT_UDF = "udf" MOUNT_UFS = "ffs" MSG_BCAST = 0x100 MSG_CMSG_CLOEXEC = 0x800 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 MSG_WAITFORONE = 0x1000 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_IFNAMES = 0x6 NET_RT_MAXID = 0x8 NET_RT_SOURCE = 0x7 NET_RT_STATS = 0x4 NET_RT_TABLE = 0x5 NFDBITS = 0x20 NOFLSH = 0x80000000 NOKERNINFO = 0x2000000 NOTE_ATTRIB = 0x8 NOTE_CHANGE = 0x1 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_OOB = 0x4 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 OLCUC = 0x20 ONLCR = 0x2 ONLRET = 0x80 ONOCR = 0x40 ONOEOT = 0x8 OPOST = 0x1 OXTABS = 0x4 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_MEMLOCK = 0x6 RLIMIT_NOFILE = 0x8 RLIMIT_NPROC = 0x7 RLIMIT_RSS = 0x5 RLIMIT_STACK = 0x3 RLIM_INFINITY = 0x7fffffffffffffff RTAX_AUTHOR = 0x6 RTAX_BFD = 0xb RTAX_BRD = 0x7 RTAX_DNS = 0xc RTAX_DST = 0x0 RTAX_GATEWAY = 0x1 RTAX_GENMASK = 0x3 RTAX_IFA = 0x5 RTAX_IFP = 0x4 RTAX_LABEL = 0xa RTAX_MAX = 0xf RTAX_NETMASK = 0x2 RTAX_SEARCH = 0xe RTAX_SRC = 0x8 RTAX_SRCMASK = 0x9 RTAX_STATIC = 0xd RTA_AUTHOR = 0x40 RTA_BFD = 0x800 RTA_BRD = 0x80 RTA_DNS = 0x1000 RTA_DST = 0x1 RTA_GATEWAY = 0x2 RTA_GENMASK = 0x8 RTA_IFA = 0x20 RTA_IFP = 0x10 RTA_LABEL = 0x400 RTA_NETMASK = 0x4 RTA_SEARCH = 0x4000 RTA_SRC = 0x100 RTA_SRCMASK = 0x200 RTA_STATIC = 0x2000 RTF_ANNOUNCE = 0x4000 RTF_BFD = 0x1000000 RTF_BLACKHOLE = 0x1000 RTF_BROADCAST = 0x400000 RTF_CACHED = 0x20000 RTF_CLONED = 0x10000 RTF_CLONING = 0x100 RTF_CONNECTED = 0x800000 RTF_DONE = 0x40 RTF_DYNAMIC = 0x10 RTF_FMASK = 0x110fc08 RTF_GATEWAY = 0x2 RTF_HOST = 0x4 RTF_LLINFO = 0x400 RTF_LOCAL = 0x200000 RTF_MODIFIED = 0x20 RTF_MPATH = 0x40000 RTF_MPLS = 0x100000 RTF_MULTICAST = 0x200 RTF_PERMANENT_ARP = 0x2000 RTF_PROTO1 = 0x8000 RTF_PROTO2 = 0x4000 RTF_PROTO3 = 0x2000 RTF_REJECT = 0x8 RTF_STATIC = 0x800 RTF_UP = 0x1 RTF_USETRAILERS = 0x8000 RTM_80211INFO = 0x15 RTM_ADD = 0x1 RTM_BFD = 0x12 RTM_CHANGE = 0x3 RTM_CHGADDRATTR = 0x14 RTM_DELADDR = 0xd RTM_DELETE = 0x2 RTM_DESYNC = 0x10 RTM_GET = 0x4 RTM_IFANNOUNCE = 0xf RTM_IFINFO = 0xe RTM_INVALIDATE = 0x11 RTM_LOSING = 0x5 RTM_MAXSIZE = 0x800 RTM_MISS = 0x7 RTM_NEWADDR = 0xc RTM_PROPOSAL = 0x13 RTM_REDIRECT = 0x6 RTM_RESOLVE = 0xb RTM_SOURCE = 0x16 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_BITS = 0x8 RT_TABLEID_MASK = 0xff RT_TABLEID_MAX = 0xff RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 RUSAGE_THREAD = 0x1 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x4 SEEK_CUR = 0x1 SEEK_END = 0x2 SEEK_SET = 0x0 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 SIOCADDMULTI = 0x80206931 SIOCAIFADDR = 0x8040691a SIOCAIFGROUP = 0x80246987 SIOCATMARK = 0x40047307 SIOCBRDGADD = 0x805c693c SIOCBRDGADDL = 0x805c6949 SIOCBRDGADDS = 0x805c6941 SIOCBRDGARL = 0x808c694d SIOCBRDGDADDR = 0x81286947 SIOCBRDGDEL = 0x805c693d SIOCBRDGDELS = 0x805c6942 SIOCBRDGFLUSH = 0x805c6948 SIOCBRDGFRL = 0x808c694e SIOCBRDGGCACHE = 0xc0146941 SIOCBRDGGFD = 0xc0146952 SIOCBRDGGHT = 0xc0146951 SIOCBRDGGIFFLGS = 0xc05c693e SIOCBRDGGMA = 0xc0146953 SIOCBRDGGPARAM = 0xc03c6958 SIOCBRDGGPRI = 0xc0146950 SIOCBRDGGRL = 0xc028694f SIOCBRDGGTO = 0xc0146946 SIOCBRDGIFS = 0xc05c6942 SIOCBRDGRTS = 0xc0186943 SIOCBRDGSADDR = 0xc1286944 SIOCBRDGSCACHE = 0x80146940 SIOCBRDGSFD = 0x80146952 SIOCBRDGSHT = 0x80146951 SIOCBRDGSIFCOST = 0x805c6955 SIOCBRDGSIFFLGS = 0x805c693f SIOCBRDGSIFPRIO = 0x805c6954 SIOCBRDGSIFPROT = 0x805c694a SIOCBRDGSMA = 0x80146953 SIOCBRDGSPRI = 0x80146950 SIOCBRDGSPROTO = 0x8014695a SIOCBRDGSTO = 0x80146945 SIOCBRDGSTXHC = 0x80146959 SIOCDELLABEL = 0x80206997 SIOCDELMULTI = 0x80206932 SIOCDIFADDR = 0x80206919 SIOCDIFGROUP = 0x80246989 SIOCDIFPARENT = 0x802069b4 SIOCDIFPHYADDR = 0x80206949 SIOCDPWE3NEIGHBOR = 0x802069de SIOCDVNETID = 0x802069af SIOCGETKALIVE = 0xc01869a4 SIOCGETLABEL = 0x8020699a SIOCGETMPWCFG = 0xc02069ae SIOCGETPFLOW = 0xc02069fe SIOCGETPFSYNC = 0xc02069f8 SIOCGETSGCNT = 0xc0147534 SIOCGETVIFCNT = 0xc0147533 SIOCGETVLAN = 0xc0206990 SIOCGIFADDR = 0xc0206921 SIOCGIFBRDADDR = 0xc0206923 SIOCGIFCONF = 0xc0086924 SIOCGIFDATA = 0xc020691b SIOCGIFDESCR = 0xc0206981 SIOCGIFDSTADDR = 0xc0206922 SIOCGIFFLAGS = 0xc0206911 SIOCGIFGATTR = 0xc024698b SIOCGIFGENERIC = 0xc020693a SIOCGIFGLIST = 0xc024698d SIOCGIFGMEMB = 0xc024698a SIOCGIFGROUP = 0xc0246988 SIOCGIFHARDMTU = 0xc02069a5 SIOCGIFLLPRIO = 0xc02069b6 SIOCGIFMEDIA = 0xc0386938 SIOCGIFMETRIC = 0xc0206917 SIOCGIFMTU = 0xc020697e SIOCGIFNETMASK = 0xc0206925 SIOCGIFPAIR = 0xc02069b1 SIOCGIFPARENT = 0xc02069b3 SIOCGIFPRIORITY = 0xc020699c SIOCGIFRDOMAIN = 0xc02069a0 SIOCGIFRTLABEL = 0xc0206983 SIOCGIFRXR = 0x802069aa SIOCGIFSFFPAGE = 0xc1126939 SIOCGIFXFLAGS = 0xc020699e SIOCGLIFPHYADDR = 0xc218694b SIOCGLIFPHYDF = 0xc02069c2 SIOCGLIFPHYECN = 0xc02069c8 SIOCGLIFPHYRTABLE = 0xc02069a2 SIOCGLIFPHYTTL = 0xc02069a9 SIOCGPGRP = 0x40047309 SIOCGPWE3 = 0xc0206998 SIOCGPWE3CTRLWORD = 0xc02069dc SIOCGPWE3FAT = 0xc02069dd SIOCGPWE3NEIGHBOR = 0xc21869de SIOCGRXHPRIO = 0xc02069db SIOCGSPPPPARAMS = 0xc0206994 SIOCGTXHPRIO = 0xc02069c6 SIOCGUMBINFO = 0xc02069be SIOCGUMBPARAM = 0xc02069c0 SIOCGVH = 0xc02069f6 SIOCGVNETFLOWID = 0xc02069c4 SIOCGVNETID = 0xc02069a7 SIOCIFAFATTACH = 0x801169ab SIOCIFAFDETACH = 0x801169ac SIOCIFCREATE = 0x8020697a SIOCIFDESTROY = 0x80206979 SIOCIFGCLONERS = 0xc00c6978 SIOCSETKALIVE = 0x801869a3 SIOCSETLABEL = 0x80206999 SIOCSETMPWCFG = 0x802069ad SIOCSETPFLOW = 0x802069fd SIOCSETPFSYNC = 0x802069f7 SIOCSETVLAN = 0x8020698f SIOCSIFADDR = 0x8020690c SIOCSIFBRDADDR = 0x80206913 SIOCSIFDESCR = 0x80206980 SIOCSIFDSTADDR = 0x8020690e SIOCSIFFLAGS = 0x80206910 SIOCSIFGATTR = 0x8024698c SIOCSIFGENERIC = 0x80206939 SIOCSIFLLADDR = 0x8020691f SIOCSIFLLPRIO = 0x802069b5 SIOCSIFMEDIA = 0xc0206937 SIOCSIFMETRIC = 0x80206918 SIOCSIFMTU = 0x8020697f SIOCSIFNETMASK = 0x80206916 SIOCSIFPAIR = 0x802069b0 SIOCSIFPARENT = 0x802069b2 SIOCSIFPRIORITY = 0x8020699b SIOCSIFRDOMAIN = 0x8020699f SIOCSIFRTLABEL = 0x80206982 SIOCSIFXFLAGS = 0x8020699d SIOCSLIFPHYADDR = 0x8218694a SIOCSLIFPHYDF = 0x802069c1 SIOCSLIFPHYECN = 0x802069c7 SIOCSLIFPHYRTABLE = 0x802069a1 SIOCSLIFPHYTTL = 0x802069a8 SIOCSPGRP = 0x80047308 SIOCSPWE3CTRLWORD = 0x802069dc SIOCSPWE3FAT = 0x802069dd SIOCSPWE3NEIGHBOR = 0x821869de SIOCSRXHPRIO = 0x802069db SIOCSSPPPPARAMS = 0x80206993 SIOCSTXHPRIO = 0x802069c5 SIOCSUMBPARAM = 0x802069bf SIOCSVH = 0xc02069f5 SIOCSVNETFLOWID = 0x802069c3 SIOCSVNETID = 0x802069a6 SOCK_CLOEXEC = 0x8000 SOCK_DGRAM = 0x2 SOCK_DNS = 0x1000 SOCK_NONBLOCK = 0x4000 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_DOMAIN = 0x1024 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_NETPROC = 0x1020 SO_OOBINLINE = 0x100 SO_PEERCRED = 0x1022 SO_PROTOCOL = 0x1025 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 SO_ZEROIZE = 0x2000 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_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 TCIOFF = 0x3 TCIOFLUSH = 0x3 TCION = 0x4 TCOFLUSH = 0x2 TCOOFF = 0x1 TCOON = 0x2 TCPOPT_EOL = 0x0 TCPOPT_MAXSEG = 0x2 TCPOPT_NOP = 0x1 TCPOPT_SACK = 0x5 TCPOPT_SACK_HDR = 0x1010500 TCPOPT_SACK_PERMITTED = 0x4 TCPOPT_SACK_PERMIT_HDR = 0x1010402 TCPOPT_SIGNATURE = 0x13 TCPOPT_TIMESTAMP = 0x8 TCPOPT_TSTAMP_HDR = 0x101080a TCPOPT_WINDOW = 0x3 TCP_INFO = 0x9 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_SACKHOLE_LIMIT = 0x80 TCP_SACK_ENABLE = 0x8 TCSAFLUSH = 0x2 TIMER_ABSTIME = 0x1 TIMER_RELTIME = 0x0 TIOCCBRK = 0x2000747a TIOCCDTR = 0x20007478 TIOCCHKVERAUTH = 0x2000741e TIOCCLRVERAUTH = 0x2000741d 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 TIOCSETVERAUTH = 0x8004741c TIOCSFLAGS = 0x8004745c TIOCSIG = 0x8004745f TIOCSPGRP = 0x80047476 TIOCSTART = 0x2000746e TIOCSTAT = 0x20007465 TIOCSTOP = 0x2000746f TIOCSTSTAMP = 0x8008745a TIOCSWINSZ = 0x80087467 TIOCUCNTL = 0x80047466 TIOCUCNTL_CBRK = 0x7a TIOCUCNTL_SBRK = 0x7b TOSTOP = 0x400000 UTIME_NOW = -0x2 UTIME_OMIT = -0x1 VDISCARD = 0xf VDSUSP = 0xb VEOF = 0x0 VEOL = 0x1 VEOL2 = 0x2 VERASE = 0x3 VINTR = 0x8 VKILL = 0x5 VLNEXT = 0xe VMIN = 0x10 VM_ANONMIN = 0x7 VM_LOADAVG = 0x2 VM_MALLOC_CONF = 0xc VM_MAXID = 0xd VM_MAXSLP = 0xa VM_METER = 0x1 VM_NKMEMPAGES = 0x6 VM_PSSTRINGS = 0x3 VM_SWAPENCRYPT = 0x5 VM_USPACE = 0xb VM_UVMEXP = 0x4 VM_VNODEMIN = 0x9 VM_VTEXTMIN = 0x8 VQUIT = 0x9 VREPRINT = 0x6 VSTART = 0xc VSTATUS = 0x12 VSTOP = 0xd VSUSP = 0xa VTIME = 0x11 VWERASE = 0x4 WALTSIG = 0x4 WCONTINUED = 0x8 WCOREFLAG = 0x80 WNOHANG = 0x1 WUNTRACED = 0x2 XCASE = 0x1000000 ) // 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(0x5c) 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(0x5f) 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) ENOTRECOVERABLE = syscall.Errno(0x5d) ENOTSOCK = syscall.Errno(0x26) ENOTSUP = syscall.Errno(0x5b) ENOTTY = syscall.Errno(0x19) ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x2d) EOVERFLOW = syscall.Errno(0x57) EOWNERDEAD = syscall.Errno(0x5e) 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(0x5f) 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "device not configured"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EDEADLK", "resource deadlock avoided"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "cross-device link"}, {19, "ENODEV", "operation not supported by device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "result too large"}, {35, "EAGAIN", "resource temporarily unavailable"}, {36, "EINPROGRESS", "operation now in progress"}, {37, "EALREADY", "operation already in progress"}, {38, "ENOTSOCK", "socket operation on non-socket"}, {39, "EDESTADDRREQ", "destination address required"}, {40, "EMSGSIZE", "message too long"}, {41, "EPROTOTYPE", "protocol wrong type for socket"}, {42, "ENOPROTOOPT", "protocol not available"}, {43, "EPROTONOSUPPORT", "protocol not supported"}, {44, "ESOCKTNOSUPPORT", "socket type not supported"}, {45, "EOPNOTSUPP", "operation not supported"}, {46, "EPFNOSUPPORT", "protocol family not supported"}, {47, "EAFNOSUPPORT", "address family not supported by protocol family"}, {48, "EADDRINUSE", "address already in use"}, {49, "EADDRNOTAVAIL", "can't assign requested address"}, {50, "ENETDOWN", "network is down"}, {51, "ENETUNREACH", "network is unreachable"}, {52, "ENETRESET", "network dropped connection on reset"}, {53, "ECONNABORTED", "software caused connection abort"}, {54, "ECONNRESET", "connection reset by peer"}, {55, "ENOBUFS", "no buffer space available"}, {56, "EISCONN", "socket is already connected"}, {57, "ENOTCONN", "socket is not connected"}, {58, "ESHUTDOWN", "can't send after socket shutdown"}, {59, "ETOOMANYREFS", "too many references: can't splice"}, {60, "ETIMEDOUT", "operation timed out"}, {61, "ECONNREFUSED", "connection refused"}, {62, "ELOOP", "too many levels of symbolic links"}, {63, "ENAMETOOLONG", "file name too long"}, {64, "EHOSTDOWN", "host is down"}, {65, "EHOSTUNREACH", "no route to host"}, {66, "ENOTEMPTY", "directory not empty"}, {67, "EPROCLIM", "too many processes"}, {68, "EUSERS", "too many users"}, {69, "EDQUOT", "disk quota exceeded"}, {70, "ESTALE", "stale NFS file handle"}, {71, "EREMOTE", "too many levels of remote in path"}, {72, "EBADRPC", "RPC struct is bad"}, {73, "ERPCMISMATCH", "RPC version wrong"}, {74, "EPROGUNAVAIL", "RPC program not available"}, {75, "EPROGMISMATCH", "program version wrong"}, {76, "EPROCUNAVAIL", "bad procedure for program"}, {77, "ENOLCK", "no locks available"}, {78, "ENOSYS", "function not implemented"}, {79, "EFTYPE", "inappropriate file type or format"}, {80, "EAUTH", "authentication error"}, {81, "ENEEDAUTH", "need authenticator"}, {82, "EIPSEC", "IPsec processing failure"}, {83, "ENOATTR", "attribute not found"}, {84, "EILSEQ", "illegal byte sequence"}, {85, "ENOMEDIUM", "no medium found"}, {86, "EMEDIUMTYPE", "wrong medium type"}, {87, "EOVERFLOW", "value too large to be stored in data type"}, {88, "ECANCELED", "operation canceled"}, {89, "EIDRM", "identifier removed"}, {90, "ENOMSG", "no message of desired type"}, {91, "ENOTSUP", "not supported"}, {92, "EBADMSG", "bad message"}, {93, "ENOTRECOVERABLE", "state not recoverable"}, {94, "EOWNERDEAD", "previous owner died"}, {95, "ELAST", "protocol error"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, {6, "SIGIOT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGURG", "urgent I/O condition"}, {17, "SIGSTOP", "suspended (signal)"}, {18, "SIGTSTP", "suspended"}, {19, "SIGCONT", "continued"}, {20, "SIGCHLD", "child exited"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGIO", "I/O possible"}, {24, "SIGXCPU", "cputime limit exceeded"}, {25, "SIGXFSZ", "filesize limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window size changes"}, {29, "SIGINFO", "information request"}, {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGTHR", "thread AST"}, {28672, "SIGSTKSZ", "unknown signal"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go ================================================ // mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && openbsd // Code generated by cmd/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 ALTWERASE = 0x200 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_FILDROP_CAPTURE = 0x1 BPF_FILDROP_DROP = 0x2 BPF_FILDROP_PASS = 0x0 BPF_F_DIR_IN = 0x10 BPF_F_DIR_MASK = 0x30 BPF_F_DIR_OUT = 0x20 BPF_F_DIR_SHIFT = 0x4 BPF_F_FLOWID = 0x8 BPF_F_PRI_MASK = 0x7 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_RND = 0xc0 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 CLOCK_BOOTTIME = 0x6 CLOCK_MONOTONIC = 0x3 CLOCK_PROCESS_CPUTIME_ID = 0x2 CLOCK_REALTIME = 0x0 CLOCK_THREAD_CPUTIME_ID = 0x4 CLOCK_UPTIME = 0x5 CPUSTATES = 0x6 CP_IDLE = 0x5 CP_INTR = 0x4 CP_NICE = 0x1 CP_SPIN = 0x3 CP_SYS = 0x2 CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x10000 CS5 = 0x0 CS6 = 0x100 CS7 = 0x200 CS8 = 0x300 CSIZE = 0x300 CSTART = 0x11 CSTATUS = 0xff CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a CTL_HW = 0x6 CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 DIOCADDQUEUE = 0xc110445d DIOCADDRULE = 0xcd604404 DIOCADDSTATE = 0xc1084425 DIOCCHANGERULE = 0xcd60441a DIOCCLRIFFLAG = 0xc028445a DIOCCLRSRCNODES = 0x20004455 DIOCCLRSTATES = 0xc0e04412 DIOCCLRSTATUS = 0xc0284416 DIOCGETLIMIT = 0xc0084427 DIOCGETQSTATS = 0xc1204460 DIOCGETQUEUE = 0xc110445f DIOCGETQUEUES = 0xc110445e DIOCGETRULE = 0xcd604407 DIOCGETRULES = 0xcd604406 DIOCGETRULESET = 0xc444443b DIOCGETRULESETS = 0xc444443a DIOCGETSRCNODES = 0xc0104454 DIOCGETSTATE = 0xc1084413 DIOCGETSTATES = 0xc0104419 DIOCGETSTATUS = 0xc1e84415 DIOCGETSYNFLWATS = 0xc0084463 DIOCGETTIMEOUT = 0xc008441e DIOCIGETIFACES = 0xc0284457 DIOCKILLSRCNODES = 0xc080445b DIOCKILLSTATES = 0xc0e04429 DIOCNATLOOK = 0xc0504417 DIOCOSFPADD = 0xc088444f DIOCOSFPFLUSH = 0x2000444e DIOCOSFPGET = 0xc0884450 DIOCRADDADDRS = 0xc4504443 DIOCRADDTABLES = 0xc450443d DIOCRCLRADDRS = 0xc4504442 DIOCRCLRASTATS = 0xc4504448 DIOCRCLRTABLES = 0xc450443c DIOCRCLRTSTATS = 0xc4504441 DIOCRDELADDRS = 0xc4504444 DIOCRDELTABLES = 0xc450443e DIOCRGETADDRS = 0xc4504446 DIOCRGETASTATS = 0xc4504447 DIOCRGETTABLES = 0xc450443f DIOCRGETTSTATS = 0xc4504440 DIOCRINADEFINE = 0xc450444d DIOCRSETADDRS = 0xc4504445 DIOCRSETTFLAGS = 0xc450444a DIOCRTSTADDRS = 0xc4504449 DIOCSETDEBUG = 0xc0044418 DIOCSETHOSTID = 0xc0044456 DIOCSETIFFLAG = 0xc0284459 DIOCSETLIMIT = 0xc0084428 DIOCSETREASS = 0xc004445c DIOCSETSTATUSIF = 0xc0284414 DIOCSETSYNCOOKIES = 0xc0014462 DIOCSETSYNFLWATS = 0xc0084461 DIOCSETTIMEOUT = 0xc008441d DIOCSTART = 0x20004401 DIOCSTOP = 0x20004402 DIOCXBEGIN = 0xc0104451 DIOCXCOMMIT = 0xc0104452 DIOCXROLLBACK = 0xc0104453 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_OPENFLOW = 0x10b 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 DLT_USBPCAP = 0xf9 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 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 ETH64_8021_RSVD_MASK = 0xfffffffffff0 ETH64_8021_RSVD_PREFIX = 0x180c2000000 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_EAPOL = 0x888e 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_MACSEC = 0x88e5 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_NHRP = 0x2001 ETHERTYPE_NOVELL = 0x8138 ETHERTYPE_NS = 0x600 ETHERTYPE_NSAT = 0x601 ETHERTYPE_NSCOMPAT = 0x807 ETHERTYPE_NSH = 0x984f ETHERTYPE_NTRAILER = 0x10 ETHERTYPE_OS9 = 0x7007 ETHERTYPE_OS9NET = 0x7009 ETHERTYPE_PACER = 0x80c6 ETHERTYPE_PBB = 0x88e7 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_HARDMTU_LEN = 0xff9b ETHER_MAX_LEN = 0x5ee ETHER_MIN_LEN = 0x40 ETHER_TYPE_LEN = 0x2 ETHER_VLAN_ENCAP_LEN = 0x4 EVFILT_AIO = -0x3 EVFILT_DEVICE = -0x8 EVFILT_EXCEPT = -0x9 EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 EVFILT_SYSCOUNT = 0x9 EVFILT_TIMER = -0x7 EVFILT_VNODE = -0x4 EVFILT_WRITE = -0x2 EVL_ENCAPLEN = 0x4 EVL_PRIO_BITS = 0xd EVL_PRIO_MAX = 0x7 EVL_VLID_MASK = 0xfff EVL_VLID_MAX = 0xffe EVL_VLID_MIN = 0x1 EVL_VLID_NULL = 0x0 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_FLAG1 = 0x2000 EV_ONESHOT = 0x10 EV_RECEIPT = 0x40 EV_SYSFLAGS = 0xf800 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_ISATTY = 0xb 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 HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 IEXTEN = 0x400 IFAN_ARRIVAL = 0x0 IFAN_DEPARTURE = 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_OACTIVE = 0x400 IFF_POINTOPOINT = 0x10 IFF_PROMISC = 0x100 IFF_RUNNING = 0x40 IFF_SIMPLEX = 0x800 IFF_STATICARP = 0x20 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_MBIM = 0xfa 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_WIREGUARD = 0xfb 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_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_SCTP = 0x84 IPPROTO_TCP = 0x6 IPPROTO_TP = 0x1d IPPROTO_UDP = 0x11 IPPROTO_UDPLITE = 0x88 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_MINHOPCOUNT = 0x41 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_DROP_MEMBERSHIP = 0xd IP_ESP_NETWORK_LEVEL = 0x16 IP_ESP_TRANS_LEVEL = 0x15 IP_HDRINCL = 0x2 IP_IPCOMP_LEVEL = 0x1d IP_IPDEFTTL = 0x25 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_SENDSRCADDR = 0x7 IP_TOS = 0x3 IP_TTL = 0x4 ISIG = 0x80 ISTRIP = 0x20 ITIMER_PROF = 0x2 ITIMER_REAL = 0x0 ITIMER_VIRTUAL = 0x1 IUCLC = 0x1000 IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 KERN_HOSTNAME = 0xa KERN_OSRELEASE = 0x2 KERN_OSTYPE = 0x1 KERN_VERSION = 0x4 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_ANONYMOUS = 0x1000 MAP_CONCEAL = 0x8000 MAP_COPY = 0x2 MAP_FILE = 0x0 MAP_FIXED = 0x10 MAP_FLAGMASK = 0xfff7 MAP_HASSEMAPHORE = 0x0 MAP_INHERIT = 0x0 MAP_INHERIT_COPY = 0x1 MAP_INHERIT_NONE = 0x2 MAP_INHERIT_SHARE = 0x0 MAP_INHERIT_ZERO = 0x3 MAP_NOEXTEND = 0x0 MAP_NORESERVE = 0x0 MAP_PRIVATE = 0x2 MAP_RENAME = 0x0 MAP_SHARED = 0x1 MAP_STACK = 0x4000 MAP_TRYFIXED = 0x0 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MNT_ASYNC = 0x40 MNT_DEFEXPORTED = 0x200 MNT_DELEXPORT = 0x20000 MNT_DOOMED = 0x8000000 MNT_EXPORTANON = 0x400 MNT_EXPORTED = 0x100 MNT_EXRDONLY = 0x80 MNT_FORCE = 0x80000 MNT_LAZY = 0x3 MNT_LOCAL = 0x1000 MNT_NOATIME = 0x8000 MNT_NODEV = 0x10 MNT_NOEXEC = 0x4 MNT_NOPERM = 0x20 MNT_NOSUID = 0x8 MNT_NOWAIT = 0x2 MNT_QUOTA = 0x2000 MNT_RDONLY = 0x1 MNT_RELOAD = 0x40000 MNT_ROOTFS = 0x4000 MNT_SOFTDEP = 0x4000000 MNT_STALLED = 0x100000 MNT_SWAPPABLE = 0x200000 MNT_SYNCHRONOUS = 0x2 MNT_UPDATE = 0x10000 MNT_VISFLAGMASK = 0x400ffff MNT_WAIT = 0x1 MNT_WANTRDWR = 0x2000000 MNT_WXALLOWED = 0x800 MOUNT_AFS = "afs" MOUNT_CD9660 = "cd9660" MOUNT_EXT2FS = "ext2fs" MOUNT_FFS = "ffs" MOUNT_FUSEFS = "fuse" MOUNT_MFS = "mfs" MOUNT_MSDOS = "msdos" MOUNT_NCPFS = "ncpfs" MOUNT_NFS = "nfs" MOUNT_NTFS = "ntfs" MOUNT_TMPFS = "tmpfs" MOUNT_UDF = "udf" MOUNT_UFS = "ffs" MSG_BCAST = 0x100 MSG_CMSG_CLOEXEC = 0x800 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 MSG_WAITFORONE = 0x1000 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_IFNAMES = 0x6 NET_RT_MAXID = 0x8 NET_RT_SOURCE = 0x7 NET_RT_STATS = 0x4 NET_RT_TABLE = 0x5 NFDBITS = 0x20 NOFLSH = 0x80000000 NOKERNINFO = 0x2000000 NOTE_ATTRIB = 0x8 NOTE_CHANGE = 0x1 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_OOB = 0x4 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 OLCUC = 0x20 ONLCR = 0x2 ONLRET = 0x80 ONOCR = 0x40 ONOEOT = 0x8 OPOST = 0x1 OXTABS = 0x4 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_MEMLOCK = 0x6 RLIMIT_NOFILE = 0x8 RLIMIT_NPROC = 0x7 RLIMIT_RSS = 0x5 RLIMIT_STACK = 0x3 RLIM_INFINITY = 0x7fffffffffffffff RTAX_AUTHOR = 0x6 RTAX_BFD = 0xb RTAX_BRD = 0x7 RTAX_DNS = 0xc RTAX_DST = 0x0 RTAX_GATEWAY = 0x1 RTAX_GENMASK = 0x3 RTAX_IFA = 0x5 RTAX_IFP = 0x4 RTAX_LABEL = 0xa RTAX_MAX = 0xf RTAX_NETMASK = 0x2 RTAX_SEARCH = 0xe RTAX_SRC = 0x8 RTAX_SRCMASK = 0x9 RTAX_STATIC = 0xd RTA_AUTHOR = 0x40 RTA_BFD = 0x800 RTA_BRD = 0x80 RTA_DNS = 0x1000 RTA_DST = 0x1 RTA_GATEWAY = 0x2 RTA_GENMASK = 0x8 RTA_IFA = 0x20 RTA_IFP = 0x10 RTA_LABEL = 0x400 RTA_NETMASK = 0x4 RTA_SEARCH = 0x4000 RTA_SRC = 0x100 RTA_SRCMASK = 0x200 RTA_STATIC = 0x2000 RTF_ANNOUNCE = 0x4000 RTF_BFD = 0x1000000 RTF_BLACKHOLE = 0x1000 RTF_BROADCAST = 0x400000 RTF_CACHED = 0x20000 RTF_CLONED = 0x10000 RTF_CLONING = 0x100 RTF_CONNECTED = 0x800000 RTF_DONE = 0x40 RTF_DYNAMIC = 0x10 RTF_FMASK = 0x110fc08 RTF_GATEWAY = 0x2 RTF_HOST = 0x4 RTF_LLINFO = 0x400 RTF_LOCAL = 0x200000 RTF_MODIFIED = 0x20 RTF_MPATH = 0x40000 RTF_MPLS = 0x100000 RTF_MULTICAST = 0x200 RTF_PERMANENT_ARP = 0x2000 RTF_PROTO1 = 0x8000 RTF_PROTO2 = 0x4000 RTF_PROTO3 = 0x2000 RTF_REJECT = 0x8 RTF_STATIC = 0x800 RTF_UP = 0x1 RTF_USETRAILERS = 0x8000 RTM_80211INFO = 0x15 RTM_ADD = 0x1 RTM_BFD = 0x12 RTM_CHANGE = 0x3 RTM_CHGADDRATTR = 0x14 RTM_DELADDR = 0xd RTM_DELETE = 0x2 RTM_DESYNC = 0x10 RTM_GET = 0x4 RTM_IFANNOUNCE = 0xf RTM_IFINFO = 0xe RTM_INVALIDATE = 0x11 RTM_LOSING = 0x5 RTM_MAXSIZE = 0x800 RTM_MISS = 0x7 RTM_NEWADDR = 0xc RTM_PROPOSAL = 0x13 RTM_REDIRECT = 0x6 RTM_RESOLVE = 0xb RTM_SOURCE = 0x16 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_BITS = 0x8 RT_TABLEID_MASK = 0xff RT_TABLEID_MAX = 0xff RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 RUSAGE_THREAD = 0x1 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x4 SEEK_CUR = 0x1 SEEK_END = 0x2 SEEK_SET = 0x0 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 SIOCADDMULTI = 0x80206931 SIOCAIFADDR = 0x8040691a SIOCAIFGROUP = 0x80286987 SIOCATMARK = 0x40047307 SIOCBRDGADD = 0x8060693c SIOCBRDGADDL = 0x80606949 SIOCBRDGADDS = 0x80606941 SIOCBRDGARL = 0x808c694d SIOCBRDGDADDR = 0x81286947 SIOCBRDGDEL = 0x8060693d SIOCBRDGDELS = 0x80606942 SIOCBRDGFLUSH = 0x80606948 SIOCBRDGFRL = 0x808c694e SIOCBRDGGCACHE = 0xc0146941 SIOCBRDGGFD = 0xc0146952 SIOCBRDGGHT = 0xc0146951 SIOCBRDGGIFFLGS = 0xc060693e SIOCBRDGGMA = 0xc0146953 SIOCBRDGGPARAM = 0xc0406958 SIOCBRDGGPRI = 0xc0146950 SIOCBRDGGRL = 0xc030694f SIOCBRDGGTO = 0xc0146946 SIOCBRDGIFS = 0xc0606942 SIOCBRDGRTS = 0xc0206943 SIOCBRDGSADDR = 0xc1286944 SIOCBRDGSCACHE = 0x80146940 SIOCBRDGSFD = 0x80146952 SIOCBRDGSHT = 0x80146951 SIOCBRDGSIFCOST = 0x80606955 SIOCBRDGSIFFLGS = 0x8060693f SIOCBRDGSIFPRIO = 0x80606954 SIOCBRDGSIFPROT = 0x8060694a SIOCBRDGSMA = 0x80146953 SIOCBRDGSPRI = 0x80146950 SIOCBRDGSPROTO = 0x8014695a SIOCBRDGSTO = 0x80146945 SIOCBRDGSTXHC = 0x80146959 SIOCDELLABEL = 0x80206997 SIOCDELMULTI = 0x80206932 SIOCDIFADDR = 0x80206919 SIOCDIFGROUP = 0x80286989 SIOCDIFPARENT = 0x802069b4 SIOCDIFPHYADDR = 0x80206949 SIOCDPWE3NEIGHBOR = 0x802069de SIOCDVNETID = 0x802069af SIOCGETKALIVE = 0xc01869a4 SIOCGETLABEL = 0x8020699a SIOCGETMPWCFG = 0xc02069ae SIOCGETPFLOW = 0xc02069fe SIOCGETPFSYNC = 0xc02069f8 SIOCGETSGCNT = 0xc0207534 SIOCGETVIFCNT = 0xc0287533 SIOCGETVLAN = 0xc0206990 SIOCGIFADDR = 0xc0206921 SIOCGIFBRDADDR = 0xc0206923 SIOCGIFCONF = 0xc0106924 SIOCGIFDATA = 0xc020691b SIOCGIFDESCR = 0xc0206981 SIOCGIFDSTADDR = 0xc0206922 SIOCGIFFLAGS = 0xc0206911 SIOCGIFGATTR = 0xc028698b SIOCGIFGENERIC = 0xc020693a SIOCGIFGLIST = 0xc028698d SIOCGIFGMEMB = 0xc028698a SIOCGIFGROUP = 0xc0286988 SIOCGIFHARDMTU = 0xc02069a5 SIOCGIFLLPRIO = 0xc02069b6 SIOCGIFMEDIA = 0xc0406938 SIOCGIFMETRIC = 0xc0206917 SIOCGIFMTU = 0xc020697e SIOCGIFNETMASK = 0xc0206925 SIOCGIFPAIR = 0xc02069b1 SIOCGIFPARENT = 0xc02069b3 SIOCGIFPRIORITY = 0xc020699c SIOCGIFRDOMAIN = 0xc02069a0 SIOCGIFRTLABEL = 0xc0206983 SIOCGIFRXR = 0x802069aa SIOCGIFSFFPAGE = 0xc1126939 SIOCGIFXFLAGS = 0xc020699e SIOCGLIFPHYADDR = 0xc218694b SIOCGLIFPHYDF = 0xc02069c2 SIOCGLIFPHYECN = 0xc02069c8 SIOCGLIFPHYRTABLE = 0xc02069a2 SIOCGLIFPHYTTL = 0xc02069a9 SIOCGPGRP = 0x40047309 SIOCGPWE3 = 0xc0206998 SIOCGPWE3CTRLWORD = 0xc02069dc SIOCGPWE3FAT = 0xc02069dd SIOCGPWE3NEIGHBOR = 0xc21869de SIOCGRXHPRIO = 0xc02069db SIOCGSPPPPARAMS = 0xc0206994 SIOCGTXHPRIO = 0xc02069c6 SIOCGUMBINFO = 0xc02069be SIOCGUMBPARAM = 0xc02069c0 SIOCGVH = 0xc02069f6 SIOCGVNETFLOWID = 0xc02069c4 SIOCGVNETID = 0xc02069a7 SIOCIFAFATTACH = 0x801169ab SIOCIFAFDETACH = 0x801169ac SIOCIFCREATE = 0x8020697a SIOCIFDESTROY = 0x80206979 SIOCIFGCLONERS = 0xc0106978 SIOCSETKALIVE = 0x801869a3 SIOCSETLABEL = 0x80206999 SIOCSETMPWCFG = 0x802069ad SIOCSETPFLOW = 0x802069fd SIOCSETPFSYNC = 0x802069f7 SIOCSETVLAN = 0x8020698f SIOCSIFADDR = 0x8020690c SIOCSIFBRDADDR = 0x80206913 SIOCSIFDESCR = 0x80206980 SIOCSIFDSTADDR = 0x8020690e SIOCSIFFLAGS = 0x80206910 SIOCSIFGATTR = 0x8028698c SIOCSIFGENERIC = 0x80206939 SIOCSIFLLADDR = 0x8020691f SIOCSIFLLPRIO = 0x802069b5 SIOCSIFMEDIA = 0xc0206937 SIOCSIFMETRIC = 0x80206918 SIOCSIFMTU = 0x8020697f SIOCSIFNETMASK = 0x80206916 SIOCSIFPAIR = 0x802069b0 SIOCSIFPARENT = 0x802069b2 SIOCSIFPRIORITY = 0x8020699b SIOCSIFRDOMAIN = 0x8020699f SIOCSIFRTLABEL = 0x80206982 SIOCSIFXFLAGS = 0x8020699d SIOCSLIFPHYADDR = 0x8218694a SIOCSLIFPHYDF = 0x802069c1 SIOCSLIFPHYECN = 0x802069c7 SIOCSLIFPHYRTABLE = 0x802069a1 SIOCSLIFPHYTTL = 0x802069a8 SIOCSPGRP = 0x80047308 SIOCSPWE3CTRLWORD = 0x802069dc SIOCSPWE3FAT = 0x802069dd SIOCSPWE3NEIGHBOR = 0x821869de SIOCSRXHPRIO = 0x802069db SIOCSSPPPPARAMS = 0x80206993 SIOCSTXHPRIO = 0x802069c5 SIOCSUMBPARAM = 0x802069bf SIOCSVH = 0xc02069f5 SIOCSVNETFLOWID = 0x802069c3 SIOCSVNETID = 0x802069a6 SOCK_CLOEXEC = 0x8000 SOCK_DGRAM = 0x2 SOCK_DNS = 0x1000 SOCK_NONBLOCK = 0x4000 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_DOMAIN = 0x1024 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_NETPROC = 0x1020 SO_OOBINLINE = 0x100 SO_PEERCRED = 0x1022 SO_PROTOCOL = 0x1025 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 SO_ZEROIZE = 0x2000 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_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 TCIOFF = 0x3 TCIOFLUSH = 0x3 TCION = 0x4 TCOFLUSH = 0x2 TCOOFF = 0x1 TCOON = 0x2 TCPOPT_EOL = 0x0 TCPOPT_MAXSEG = 0x2 TCPOPT_NOP = 0x1 TCPOPT_SACK = 0x5 TCPOPT_SACK_HDR = 0x1010500 TCPOPT_SACK_PERMITTED = 0x4 TCPOPT_SACK_PERMIT_HDR = 0x1010402 TCPOPT_SIGNATURE = 0x13 TCPOPT_TIMESTAMP = 0x8 TCPOPT_TSTAMP_HDR = 0x101080a TCPOPT_WINDOW = 0x3 TCP_INFO = 0x9 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_SACKHOLE_LIMIT = 0x80 TCP_SACK_ENABLE = 0x8 TCSAFLUSH = 0x2 TIMER_ABSTIME = 0x1 TIMER_RELTIME = 0x0 TIOCCBRK = 0x2000747a TIOCCDTR = 0x20007478 TIOCCHKVERAUTH = 0x2000741e TIOCCLRVERAUTH = 0x2000741d 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 TIOCSETVERAUTH = 0x8004741c TIOCSFLAGS = 0x8004745c TIOCSIG = 0x8004745f TIOCSPGRP = 0x80047476 TIOCSTART = 0x2000746e TIOCSTAT = 0x20007465 TIOCSTOP = 0x2000746f TIOCSTSTAMP = 0x8008745a TIOCSWINSZ = 0x80087467 TIOCUCNTL = 0x80047466 TIOCUCNTL_CBRK = 0x7a TIOCUCNTL_SBRK = 0x7b TOSTOP = 0x400000 UTIME_NOW = -0x2 UTIME_OMIT = -0x1 VDISCARD = 0xf VDSUSP = 0xb VEOF = 0x0 VEOL = 0x1 VEOL2 = 0x2 VERASE = 0x3 VINTR = 0x8 VKILL = 0x5 VLNEXT = 0xe VMIN = 0x10 VM_ANONMIN = 0x7 VM_LOADAVG = 0x2 VM_MALLOC_CONF = 0xc VM_MAXID = 0xd VM_MAXSLP = 0xa VM_METER = 0x1 VM_NKMEMPAGES = 0x6 VM_PSSTRINGS = 0x3 VM_SWAPENCRYPT = 0x5 VM_USPACE = 0xb VM_UVMEXP = 0x4 VM_VNODEMIN = 0x9 VM_VTEXTMIN = 0x8 VQUIT = 0x9 VREPRINT = 0x6 VSTART = 0xc VSTATUS = 0x12 VSTOP = 0xd VSUSP = 0xa VTIME = 0x11 VWERASE = 0x4 WALTSIG = 0x4 WCONTINUED = 0x8 WCOREFLAG = 0x80 WNOHANG = 0x1 WUNTRACED = 0x2 XCASE = 0x1000000 ) // 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(0x5c) 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(0x5f) 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) ENOTRECOVERABLE = syscall.Errno(0x5d) ENOTSOCK = syscall.Errno(0x26) ENOTSUP = syscall.Errno(0x5b) ENOTTY = syscall.Errno(0x19) ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x2d) EOVERFLOW = syscall.Errno(0x57) EOWNERDEAD = syscall.Errno(0x5e) 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(0x5f) 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "device not configured"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EDEADLK", "resource deadlock avoided"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "cross-device link"}, {19, "ENODEV", "operation not supported by device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "result too large"}, {35, "EAGAIN", "resource temporarily unavailable"}, {36, "EINPROGRESS", "operation now in progress"}, {37, "EALREADY", "operation already in progress"}, {38, "ENOTSOCK", "socket operation on non-socket"}, {39, "EDESTADDRREQ", "destination address required"}, {40, "EMSGSIZE", "message too long"}, {41, "EPROTOTYPE", "protocol wrong type for socket"}, {42, "ENOPROTOOPT", "protocol not available"}, {43, "EPROTONOSUPPORT", "protocol not supported"}, {44, "ESOCKTNOSUPPORT", "socket type not supported"}, {45, "EOPNOTSUPP", "operation not supported"}, {46, "EPFNOSUPPORT", "protocol family not supported"}, {47, "EAFNOSUPPORT", "address family not supported by protocol family"}, {48, "EADDRINUSE", "address already in use"}, {49, "EADDRNOTAVAIL", "can't assign requested address"}, {50, "ENETDOWN", "network is down"}, {51, "ENETUNREACH", "network is unreachable"}, {52, "ENETRESET", "network dropped connection on reset"}, {53, "ECONNABORTED", "software caused connection abort"}, {54, "ECONNRESET", "connection reset by peer"}, {55, "ENOBUFS", "no buffer space available"}, {56, "EISCONN", "socket is already connected"}, {57, "ENOTCONN", "socket is not connected"}, {58, "ESHUTDOWN", "can't send after socket shutdown"}, {59, "ETOOMANYREFS", "too many references: can't splice"}, {60, "ETIMEDOUT", "operation timed out"}, {61, "ECONNREFUSED", "connection refused"}, {62, "ELOOP", "too many levels of symbolic links"}, {63, "ENAMETOOLONG", "file name too long"}, {64, "EHOSTDOWN", "host is down"}, {65, "EHOSTUNREACH", "no route to host"}, {66, "ENOTEMPTY", "directory not empty"}, {67, "EPROCLIM", "too many processes"}, {68, "EUSERS", "too many users"}, {69, "EDQUOT", "disk quota exceeded"}, {70, "ESTALE", "stale NFS file handle"}, {71, "EREMOTE", "too many levels of remote in path"}, {72, "EBADRPC", "RPC struct is bad"}, {73, "ERPCMISMATCH", "RPC version wrong"}, {74, "EPROGUNAVAIL", "RPC program not available"}, {75, "EPROGMISMATCH", "program version wrong"}, {76, "EPROCUNAVAIL", "bad procedure for program"}, {77, "ENOLCK", "no locks available"}, {78, "ENOSYS", "function not implemented"}, {79, "EFTYPE", "inappropriate file type or format"}, {80, "EAUTH", "authentication error"}, {81, "ENEEDAUTH", "need authenticator"}, {82, "EIPSEC", "IPsec processing failure"}, {83, "ENOATTR", "attribute not found"}, {84, "EILSEQ", "illegal byte sequence"}, {85, "ENOMEDIUM", "no medium found"}, {86, "EMEDIUMTYPE", "wrong medium type"}, {87, "EOVERFLOW", "value too large to be stored in data type"}, {88, "ECANCELED", "operation canceled"}, {89, "EIDRM", "identifier removed"}, {90, "ENOMSG", "no message of desired type"}, {91, "ENOTSUP", "not supported"}, {92, "EBADMSG", "bad message"}, {93, "ENOTRECOVERABLE", "state not recoverable"}, {94, "EOWNERDEAD", "previous owner died"}, {95, "ELAST", "protocol error"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, {6, "SIGIOT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGURG", "urgent I/O condition"}, {17, "SIGSTOP", "suspended (signal)"}, {18, "SIGTSTP", "suspended"}, {19, "SIGCONT", "continued"}, {20, "SIGCHLD", "child exited"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGIO", "I/O possible"}, {24, "SIGXCPU", "cputime limit exceeded"}, {25, "SIGXFSZ", "filesize limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window size changes"}, {29, "SIGINFO", "information request"}, {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGTHR", "thread AST"}, {28672, "SIGSTKSZ", "unknown signal"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_openbsd_arm.go ================================================ // mkerrors.sh // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && openbsd // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- _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 ALTWERASE = 0x200 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 = 0x4010426e 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 = 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_FILDROP_CAPTURE = 0x1 BPF_FILDROP_DROP = 0x2 BPF_FILDROP_PASS = 0x0 BPF_F_DIR_IN = 0x10 BPF_F_DIR_MASK = 0x30 BPF_F_DIR_OUT = 0x20 BPF_F_DIR_SHIFT = 0x4 BPF_F_FLOWID = 0x8 BPF_F_PRI_MASK = 0x7 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_RND = 0xc0 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 CLOCK_BOOTTIME = 0x6 CLOCK_MONOTONIC = 0x3 CLOCK_PROCESS_CPUTIME_ID = 0x2 CLOCK_REALTIME = 0x0 CLOCK_THREAD_CPUTIME_ID = 0x4 CLOCK_UPTIME = 0x5 CPUSTATES = 0x6 CP_IDLE = 0x5 CP_INTR = 0x4 CP_NICE = 0x1 CP_SPIN = 0x3 CP_SYS = 0x2 CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x10000 CS5 = 0x0 CS6 = 0x100 CS7 = 0x200 CS8 = 0x300 CSIZE = 0x300 CSTART = 0x11 CSTATUS = 0xff CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a CTL_HW = 0x6 CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 DIOCADDQUEUE = 0xc100445d DIOCADDRULE = 0xcce04404 DIOCADDSTATE = 0xc1084425 DIOCCHANGERULE = 0xcce0441a DIOCCLRIFFLAG = 0xc024445a DIOCCLRSRCNODES = 0x20004455 DIOCCLRSTATES = 0xc0d04412 DIOCCLRSTATUS = 0xc0244416 DIOCGETLIMIT = 0xc0084427 DIOCGETQSTATS = 0xc1084460 DIOCGETQUEUE = 0xc100445f DIOCGETQUEUES = 0xc100445e DIOCGETRULE = 0xcce04407 DIOCGETRULES = 0xcce04406 DIOCGETRULESET = 0xc444443b DIOCGETRULESETS = 0xc444443a DIOCGETSRCNODES = 0xc0084454 DIOCGETSTATE = 0xc1084413 DIOCGETSTATES = 0xc0084419 DIOCGETSTATUS = 0xc1e84415 DIOCGETSYNFLWATS = 0xc0084463 DIOCGETTIMEOUT = 0xc008441e DIOCIGETIFACES = 0xc0244457 DIOCKILLSRCNODES = 0xc068445b DIOCKILLSTATES = 0xc0d04429 DIOCNATLOOK = 0xc0504417 DIOCOSFPADD = 0xc088444f DIOCOSFPFLUSH = 0x2000444e DIOCOSFPGET = 0xc0884450 DIOCRADDADDRS = 0xc44c4443 DIOCRADDTABLES = 0xc44c443d DIOCRCLRADDRS = 0xc44c4442 DIOCRCLRASTATS = 0xc44c4448 DIOCRCLRTABLES = 0xc44c443c DIOCRCLRTSTATS = 0xc44c4441 DIOCRDELADDRS = 0xc44c4444 DIOCRDELTABLES = 0xc44c443e DIOCRGETADDRS = 0xc44c4446 DIOCRGETASTATS = 0xc44c4447 DIOCRGETTABLES = 0xc44c443f DIOCRGETTSTATS = 0xc44c4440 DIOCRINADEFINE = 0xc44c444d DIOCRSETADDRS = 0xc44c4445 DIOCRSETTFLAGS = 0xc44c444a DIOCRTSTADDRS = 0xc44c4449 DIOCSETDEBUG = 0xc0044418 DIOCSETHOSTID = 0xc0044456 DIOCSETIFFLAG = 0xc0244459 DIOCSETLIMIT = 0xc0084428 DIOCSETREASS = 0xc004445c DIOCSETSTATUSIF = 0xc0244414 DIOCSETSYNCOOKIES = 0xc0014462 DIOCSETSYNFLWATS = 0xc0084461 DIOCSETTIMEOUT = 0xc008441d DIOCSTART = 0x20004401 DIOCSTOP = 0x20004402 DIOCXBEGIN = 0xc00c4451 DIOCXCOMMIT = 0xc00c4452 DIOCXROLLBACK = 0xc00c4453 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_OPENFLOW = 0x10b 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 DLT_USBPCAP = 0xf9 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 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 ETH64_8021_RSVD_MASK = 0xfffffffffff0 ETH64_8021_RSVD_PREFIX = 0x180c2000000 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_EAPOL = 0x888e 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_MACSEC = 0x88e5 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_NHRP = 0x2001 ETHERTYPE_NOVELL = 0x8138 ETHERTYPE_NS = 0x600 ETHERTYPE_NSAT = 0x601 ETHERTYPE_NSCOMPAT = 0x807 ETHERTYPE_NSH = 0x984f ETHERTYPE_NTRAILER = 0x10 ETHERTYPE_OS9 = 0x7007 ETHERTYPE_OS9NET = 0x7009 ETHERTYPE_PACER = 0x80c6 ETHERTYPE_PBB = 0x88e7 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_HARDMTU_LEN = 0xff9b ETHER_MAX_LEN = 0x5ee ETHER_MIN_LEN = 0x40 ETHER_TYPE_LEN = 0x2 ETHER_VLAN_ENCAP_LEN = 0x4 EVFILT_AIO = -0x3 EVFILT_DEVICE = -0x8 EVFILT_EXCEPT = -0x9 EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 EVFILT_SYSCOUNT = 0x9 EVFILT_TIMER = -0x7 EVFILT_VNODE = -0x4 EVFILT_WRITE = -0x2 EVL_ENCAPLEN = 0x4 EVL_PRIO_BITS = 0xd EVL_PRIO_MAX = 0x7 EVL_VLID_MASK = 0xfff EVL_VLID_MAX = 0xffe EVL_VLID_MIN = 0x1 EVL_VLID_NULL = 0x0 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_FLAG1 = 0x2000 EV_ONESHOT = 0x10 EV_RECEIPT = 0x40 EV_SYSFLAGS = 0xf800 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_ISATTY = 0xb 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 HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 IEXTEN = 0x400 IFAN_ARRIVAL = 0x0 IFAN_DEPARTURE = 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_OACTIVE = 0x400 IFF_POINTOPOINT = 0x10 IFF_PROMISC = 0x100 IFF_RUNNING = 0x40 IFF_SIMPLEX = 0x800 IFF_STATICARP = 0x20 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_MBIM = 0xfa 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_WIREGUARD = 0xfb 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_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_SCTP = 0x84 IPPROTO_TCP = 0x6 IPPROTO_TP = 0x1d IPPROTO_UDP = 0x11 IPPROTO_UDPLITE = 0x88 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_MINHOPCOUNT = 0x41 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_DROP_MEMBERSHIP = 0xd IP_ESP_NETWORK_LEVEL = 0x16 IP_ESP_TRANS_LEVEL = 0x15 IP_HDRINCL = 0x2 IP_IPCOMP_LEVEL = 0x1d IP_IPDEFTTL = 0x25 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_SENDSRCADDR = 0x7 IP_TOS = 0x3 IP_TTL = 0x4 ISIG = 0x80 ISTRIP = 0x20 ITIMER_PROF = 0x2 ITIMER_REAL = 0x0 ITIMER_VIRTUAL = 0x1 IUCLC = 0x1000 IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 KERN_HOSTNAME = 0xa KERN_OSRELEASE = 0x2 KERN_OSTYPE = 0x1 KERN_VERSION = 0x4 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_ANONYMOUS = 0x1000 MAP_CONCEAL = 0x8000 MAP_COPY = 0x2 MAP_FILE = 0x0 MAP_FIXED = 0x10 MAP_FLAGMASK = 0xfff7 MAP_HASSEMAPHORE = 0x0 MAP_INHERIT = 0x0 MAP_INHERIT_COPY = 0x1 MAP_INHERIT_NONE = 0x2 MAP_INHERIT_SHARE = 0x0 MAP_INHERIT_ZERO = 0x3 MAP_NOEXTEND = 0x0 MAP_NORESERVE = 0x0 MAP_PRIVATE = 0x2 MAP_RENAME = 0x0 MAP_SHARED = 0x1 MAP_STACK = 0x4000 MAP_TRYFIXED = 0x0 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MNT_ASYNC = 0x40 MNT_DEFEXPORTED = 0x200 MNT_DELEXPORT = 0x20000 MNT_DOOMED = 0x8000000 MNT_EXPORTANON = 0x400 MNT_EXPORTED = 0x100 MNT_EXRDONLY = 0x80 MNT_FORCE = 0x80000 MNT_LAZY = 0x3 MNT_LOCAL = 0x1000 MNT_NOATIME = 0x8000 MNT_NODEV = 0x10 MNT_NOEXEC = 0x4 MNT_NOPERM = 0x20 MNT_NOSUID = 0x8 MNT_NOWAIT = 0x2 MNT_QUOTA = 0x2000 MNT_RDONLY = 0x1 MNT_RELOAD = 0x40000 MNT_ROOTFS = 0x4000 MNT_SOFTDEP = 0x4000000 MNT_STALLED = 0x100000 MNT_SWAPPABLE = 0x200000 MNT_SYNCHRONOUS = 0x2 MNT_UPDATE = 0x10000 MNT_VISFLAGMASK = 0x400ffff MNT_WAIT = 0x1 MNT_WANTRDWR = 0x2000000 MNT_WXALLOWED = 0x800 MOUNT_AFS = "afs" MOUNT_CD9660 = "cd9660" MOUNT_EXT2FS = "ext2fs" MOUNT_FFS = "ffs" MOUNT_FUSEFS = "fuse" MOUNT_MFS = "mfs" MOUNT_MSDOS = "msdos" MOUNT_NCPFS = "ncpfs" MOUNT_NFS = "nfs" MOUNT_NTFS = "ntfs" MOUNT_TMPFS = "tmpfs" MOUNT_UDF = "udf" MOUNT_UFS = "ffs" MSG_BCAST = 0x100 MSG_CMSG_CLOEXEC = 0x800 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 MSG_WAITFORONE = 0x1000 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_IFNAMES = 0x6 NET_RT_MAXID = 0x8 NET_RT_SOURCE = 0x7 NET_RT_STATS = 0x4 NET_RT_TABLE = 0x5 NFDBITS = 0x20 NOFLSH = 0x80000000 NOKERNINFO = 0x2000000 NOTE_ATTRIB = 0x8 NOTE_CHANGE = 0x1 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_OOB = 0x4 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 OLCUC = 0x20 ONLCR = 0x2 ONLRET = 0x80 ONOCR = 0x40 ONOEOT = 0x8 OPOST = 0x1 OXTABS = 0x4 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_MEMLOCK = 0x6 RLIMIT_NOFILE = 0x8 RLIMIT_NPROC = 0x7 RLIMIT_RSS = 0x5 RLIMIT_STACK = 0x3 RLIM_INFINITY = 0x7fffffffffffffff RTAX_AUTHOR = 0x6 RTAX_BFD = 0xb RTAX_BRD = 0x7 RTAX_DNS = 0xc RTAX_DST = 0x0 RTAX_GATEWAY = 0x1 RTAX_GENMASK = 0x3 RTAX_IFA = 0x5 RTAX_IFP = 0x4 RTAX_LABEL = 0xa RTAX_MAX = 0xf RTAX_NETMASK = 0x2 RTAX_SEARCH = 0xe RTAX_SRC = 0x8 RTAX_SRCMASK = 0x9 RTAX_STATIC = 0xd RTA_AUTHOR = 0x40 RTA_BFD = 0x800 RTA_BRD = 0x80 RTA_DNS = 0x1000 RTA_DST = 0x1 RTA_GATEWAY = 0x2 RTA_GENMASK = 0x8 RTA_IFA = 0x20 RTA_IFP = 0x10 RTA_LABEL = 0x400 RTA_NETMASK = 0x4 RTA_SEARCH = 0x4000 RTA_SRC = 0x100 RTA_SRCMASK = 0x200 RTA_STATIC = 0x2000 RTF_ANNOUNCE = 0x4000 RTF_BFD = 0x1000000 RTF_BLACKHOLE = 0x1000 RTF_BROADCAST = 0x400000 RTF_CACHED = 0x20000 RTF_CLONED = 0x10000 RTF_CLONING = 0x100 RTF_CONNECTED = 0x800000 RTF_DONE = 0x40 RTF_DYNAMIC = 0x10 RTF_FMASK = 0x110fc08 RTF_GATEWAY = 0x2 RTF_HOST = 0x4 RTF_LLINFO = 0x400 RTF_LOCAL = 0x200000 RTF_MODIFIED = 0x20 RTF_MPATH = 0x40000 RTF_MPLS = 0x100000 RTF_MULTICAST = 0x200 RTF_PERMANENT_ARP = 0x2000 RTF_PROTO1 = 0x8000 RTF_PROTO2 = 0x4000 RTF_PROTO3 = 0x2000 RTF_REJECT = 0x8 RTF_STATIC = 0x800 RTF_UP = 0x1 RTF_USETRAILERS = 0x8000 RTM_80211INFO = 0x15 RTM_ADD = 0x1 RTM_BFD = 0x12 RTM_CHANGE = 0x3 RTM_CHGADDRATTR = 0x14 RTM_DELADDR = 0xd RTM_DELETE = 0x2 RTM_DESYNC = 0x10 RTM_GET = 0x4 RTM_IFANNOUNCE = 0xf RTM_IFINFO = 0xe RTM_INVALIDATE = 0x11 RTM_LOSING = 0x5 RTM_MAXSIZE = 0x800 RTM_MISS = 0x7 RTM_NEWADDR = 0xc RTM_PROPOSAL = 0x13 RTM_REDIRECT = 0x6 RTM_RESOLVE = 0xb RTM_SOURCE = 0x16 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_BITS = 0x8 RT_TABLEID_MASK = 0xff RT_TABLEID_MAX = 0xff RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 RUSAGE_THREAD = 0x1 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x4 SEEK_CUR = 0x1 SEEK_END = 0x2 SEEK_SET = 0x0 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 SIOCADDMULTI = 0x80206931 SIOCAIFADDR = 0x8040691a SIOCAIFGROUP = 0x80246987 SIOCATMARK = 0x40047307 SIOCBRDGADD = 0x8060693c SIOCBRDGADDL = 0x80606949 SIOCBRDGADDS = 0x80606941 SIOCBRDGARL = 0x808c694d SIOCBRDGDADDR = 0x81286947 SIOCBRDGDEL = 0x8060693d SIOCBRDGDELS = 0x80606942 SIOCBRDGFLUSH = 0x80606948 SIOCBRDGFRL = 0x808c694e SIOCBRDGGCACHE = 0xc0146941 SIOCBRDGGFD = 0xc0146952 SIOCBRDGGHT = 0xc0146951 SIOCBRDGGIFFLGS = 0xc060693e SIOCBRDGGMA = 0xc0146953 SIOCBRDGGPARAM = 0xc0406958 SIOCBRDGGPRI = 0xc0146950 SIOCBRDGGRL = 0xc028694f SIOCBRDGGTO = 0xc0146946 SIOCBRDGIFS = 0xc0606942 SIOCBRDGRTS = 0xc0186943 SIOCBRDGSADDR = 0xc1286944 SIOCBRDGSCACHE = 0x80146940 SIOCBRDGSFD = 0x80146952 SIOCBRDGSHT = 0x80146951 SIOCBRDGSIFCOST = 0x80606955 SIOCBRDGSIFFLGS = 0x8060693f SIOCBRDGSIFPRIO = 0x80606954 SIOCBRDGSIFPROT = 0x8060694a SIOCBRDGSMA = 0x80146953 SIOCBRDGSPRI = 0x80146950 SIOCBRDGSPROTO = 0x8014695a SIOCBRDGSTO = 0x80146945 SIOCBRDGSTXHC = 0x80146959 SIOCDELLABEL = 0x80206997 SIOCDELMULTI = 0x80206932 SIOCDIFADDR = 0x80206919 SIOCDIFGROUP = 0x80246989 SIOCDIFPARENT = 0x802069b4 SIOCDIFPHYADDR = 0x80206949 SIOCDPWE3NEIGHBOR = 0x802069de SIOCDVNETID = 0x802069af SIOCGETKALIVE = 0xc01869a4 SIOCGETLABEL = 0x8020699a SIOCGETMPWCFG = 0xc02069ae SIOCGETPFLOW = 0xc02069fe SIOCGETPFSYNC = 0xc02069f8 SIOCGETSGCNT = 0xc0147534 SIOCGETVIFCNT = 0xc0147533 SIOCGETVLAN = 0xc0206990 SIOCGIFADDR = 0xc0206921 SIOCGIFBRDADDR = 0xc0206923 SIOCGIFCONF = 0xc0086924 SIOCGIFDATA = 0xc020691b SIOCGIFDESCR = 0xc0206981 SIOCGIFDSTADDR = 0xc0206922 SIOCGIFFLAGS = 0xc0206911 SIOCGIFGATTR = 0xc024698b SIOCGIFGENERIC = 0xc020693a SIOCGIFGLIST = 0xc024698d SIOCGIFGMEMB = 0xc024698a SIOCGIFGROUP = 0xc0246988 SIOCGIFHARDMTU = 0xc02069a5 SIOCGIFLLPRIO = 0xc02069b6 SIOCGIFMEDIA = 0xc0386938 SIOCGIFMETRIC = 0xc0206917 SIOCGIFMTU = 0xc020697e SIOCGIFNETMASK = 0xc0206925 SIOCGIFPAIR = 0xc02069b1 SIOCGIFPARENT = 0xc02069b3 SIOCGIFPRIORITY = 0xc020699c SIOCGIFRDOMAIN = 0xc02069a0 SIOCGIFRTLABEL = 0xc0206983 SIOCGIFRXR = 0x802069aa SIOCGIFSFFPAGE = 0xc1126939 SIOCGIFXFLAGS = 0xc020699e SIOCGLIFPHYADDR = 0xc218694b SIOCGLIFPHYDF = 0xc02069c2 SIOCGLIFPHYECN = 0xc02069c8 SIOCGLIFPHYRTABLE = 0xc02069a2 SIOCGLIFPHYTTL = 0xc02069a9 SIOCGPGRP = 0x40047309 SIOCGPWE3 = 0xc0206998 SIOCGPWE3CTRLWORD = 0xc02069dc SIOCGPWE3FAT = 0xc02069dd SIOCGPWE3NEIGHBOR = 0xc21869de SIOCGRXHPRIO = 0xc02069db SIOCGSPPPPARAMS = 0xc0206994 SIOCGTXHPRIO = 0xc02069c6 SIOCGUMBINFO = 0xc02069be SIOCGUMBPARAM = 0xc02069c0 SIOCGVH = 0xc02069f6 SIOCGVNETFLOWID = 0xc02069c4 SIOCGVNETID = 0xc02069a7 SIOCIFAFATTACH = 0x801169ab SIOCIFAFDETACH = 0x801169ac SIOCIFCREATE = 0x8020697a SIOCIFDESTROY = 0x80206979 SIOCIFGCLONERS = 0xc00c6978 SIOCSETKALIVE = 0x801869a3 SIOCSETLABEL = 0x80206999 SIOCSETMPWCFG = 0x802069ad SIOCSETPFLOW = 0x802069fd SIOCSETPFSYNC = 0x802069f7 SIOCSETVLAN = 0x8020698f SIOCSIFADDR = 0x8020690c SIOCSIFBRDADDR = 0x80206913 SIOCSIFDESCR = 0x80206980 SIOCSIFDSTADDR = 0x8020690e SIOCSIFFLAGS = 0x80206910 SIOCSIFGATTR = 0x8024698c SIOCSIFGENERIC = 0x80206939 SIOCSIFLLADDR = 0x8020691f SIOCSIFLLPRIO = 0x802069b5 SIOCSIFMEDIA = 0xc0206937 SIOCSIFMETRIC = 0x80206918 SIOCSIFMTU = 0x8020697f SIOCSIFNETMASK = 0x80206916 SIOCSIFPAIR = 0x802069b0 SIOCSIFPARENT = 0x802069b2 SIOCSIFPRIORITY = 0x8020699b SIOCSIFRDOMAIN = 0x8020699f SIOCSIFRTLABEL = 0x80206982 SIOCSIFXFLAGS = 0x8020699d SIOCSLIFPHYADDR = 0x8218694a SIOCSLIFPHYDF = 0x802069c1 SIOCSLIFPHYECN = 0x802069c7 SIOCSLIFPHYRTABLE = 0x802069a1 SIOCSLIFPHYTTL = 0x802069a8 SIOCSPGRP = 0x80047308 SIOCSPWE3CTRLWORD = 0x802069dc SIOCSPWE3FAT = 0x802069dd SIOCSPWE3NEIGHBOR = 0x821869de SIOCSRXHPRIO = 0x802069db SIOCSSPPPPARAMS = 0x80206993 SIOCSTXHPRIO = 0x802069c5 SIOCSUMBPARAM = 0x802069bf SIOCSVH = 0xc02069f5 SIOCSVNETFLOWID = 0x802069c3 SIOCSVNETID = 0x802069a6 SOCK_CLOEXEC = 0x8000 SOCK_DGRAM = 0x2 SOCK_DNS = 0x1000 SOCK_NONBLOCK = 0x4000 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_DOMAIN = 0x1024 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_NETPROC = 0x1020 SO_OOBINLINE = 0x100 SO_PEERCRED = 0x1022 SO_PROTOCOL = 0x1025 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 SO_ZEROIZE = 0x2000 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_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 TCIOFF = 0x3 TCIOFLUSH = 0x3 TCION = 0x4 TCOFLUSH = 0x2 TCOOFF = 0x1 TCOON = 0x2 TCPOPT_EOL = 0x0 TCPOPT_MAXSEG = 0x2 TCPOPT_NOP = 0x1 TCPOPT_SACK = 0x5 TCPOPT_SACK_HDR = 0x1010500 TCPOPT_SACK_PERMITTED = 0x4 TCPOPT_SACK_PERMIT_HDR = 0x1010402 TCPOPT_SIGNATURE = 0x13 TCPOPT_TIMESTAMP = 0x8 TCPOPT_TSTAMP_HDR = 0x101080a TCPOPT_WINDOW = 0x3 TCP_INFO = 0x9 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_SACKHOLE_LIMIT = 0x80 TCP_SACK_ENABLE = 0x8 TCSAFLUSH = 0x2 TIMER_ABSTIME = 0x1 TIMER_RELTIME = 0x0 TIOCCBRK = 0x2000747a TIOCCDTR = 0x20007478 TIOCCHKVERAUTH = 0x2000741e TIOCCLRVERAUTH = 0x2000741d 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 TIOCSETVERAUTH = 0x8004741c TIOCSFLAGS = 0x8004745c TIOCSIG = 0x8004745f TIOCSPGRP = 0x80047476 TIOCSTART = 0x2000746e TIOCSTAT = 0x20007465 TIOCSTOP = 0x2000746f TIOCSTSTAMP = 0x8008745a TIOCSWINSZ = 0x80087467 TIOCUCNTL = 0x80047466 TIOCUCNTL_CBRK = 0x7a TIOCUCNTL_SBRK = 0x7b TOSTOP = 0x400000 UTIME_NOW = -0x2 UTIME_OMIT = -0x1 VDISCARD = 0xf VDSUSP = 0xb VEOF = 0x0 VEOL = 0x1 VEOL2 = 0x2 VERASE = 0x3 VINTR = 0x8 VKILL = 0x5 VLNEXT = 0xe VMIN = 0x10 VM_ANONMIN = 0x7 VM_LOADAVG = 0x2 VM_MALLOC_CONF = 0xc VM_MAXID = 0xd VM_MAXSLP = 0xa VM_METER = 0x1 VM_NKMEMPAGES = 0x6 VM_PSSTRINGS = 0x3 VM_SWAPENCRYPT = 0x5 VM_USPACE = 0xb VM_UVMEXP = 0x4 VM_VNODEMIN = 0x9 VM_VTEXTMIN = 0x8 VQUIT = 0x9 VREPRINT = 0x6 VSTART = 0xc VSTATUS = 0x12 VSTOP = 0xd VSUSP = 0xa VTIME = 0x11 VWERASE = 0x4 WALTSIG = 0x4 WCONTINUED = 0x8 WCOREFLAG = 0x80 WNOHANG = 0x1 WUNTRACED = 0x2 XCASE = 0x1000000 ) // 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(0x5c) 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(0x5f) 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) ENOTRECOVERABLE = syscall.Errno(0x5d) ENOTSOCK = syscall.Errno(0x26) ENOTSUP = syscall.Errno(0x5b) ENOTTY = syscall.Errno(0x19) ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x2d) EOVERFLOW = syscall.Errno(0x57) EOWNERDEAD = syscall.Errno(0x5e) 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(0x5f) 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "device not configured"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EDEADLK", "resource deadlock avoided"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "cross-device link"}, {19, "ENODEV", "operation not supported by device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "result too large"}, {35, "EAGAIN", "resource temporarily unavailable"}, {36, "EINPROGRESS", "operation now in progress"}, {37, "EALREADY", "operation already in progress"}, {38, "ENOTSOCK", "socket operation on non-socket"}, {39, "EDESTADDRREQ", "destination address required"}, {40, "EMSGSIZE", "message too long"}, {41, "EPROTOTYPE", "protocol wrong type for socket"}, {42, "ENOPROTOOPT", "protocol not available"}, {43, "EPROTONOSUPPORT", "protocol not supported"}, {44, "ESOCKTNOSUPPORT", "socket type not supported"}, {45, "EOPNOTSUPP", "operation not supported"}, {46, "EPFNOSUPPORT", "protocol family not supported"}, {47, "EAFNOSUPPORT", "address family not supported by protocol family"}, {48, "EADDRINUSE", "address already in use"}, {49, "EADDRNOTAVAIL", "can't assign requested address"}, {50, "ENETDOWN", "network is down"}, {51, "ENETUNREACH", "network is unreachable"}, {52, "ENETRESET", "network dropped connection on reset"}, {53, "ECONNABORTED", "software caused connection abort"}, {54, "ECONNRESET", "connection reset by peer"}, {55, "ENOBUFS", "no buffer space available"}, {56, "EISCONN", "socket is already connected"}, {57, "ENOTCONN", "socket is not connected"}, {58, "ESHUTDOWN", "can't send after socket shutdown"}, {59, "ETOOMANYREFS", "too many references: can't splice"}, {60, "ETIMEDOUT", "operation timed out"}, {61, "ECONNREFUSED", "connection refused"}, {62, "ELOOP", "too many levels of symbolic links"}, {63, "ENAMETOOLONG", "file name too long"}, {64, "EHOSTDOWN", "host is down"}, {65, "EHOSTUNREACH", "no route to host"}, {66, "ENOTEMPTY", "directory not empty"}, {67, "EPROCLIM", "too many processes"}, {68, "EUSERS", "too many users"}, {69, "EDQUOT", "disk quota exceeded"}, {70, "ESTALE", "stale NFS file handle"}, {71, "EREMOTE", "too many levels of remote in path"}, {72, "EBADRPC", "RPC struct is bad"}, {73, "ERPCMISMATCH", "RPC version wrong"}, {74, "EPROGUNAVAIL", "RPC program not available"}, {75, "EPROGMISMATCH", "program version wrong"}, {76, "EPROCUNAVAIL", "bad procedure for program"}, {77, "ENOLCK", "no locks available"}, {78, "ENOSYS", "function not implemented"}, {79, "EFTYPE", "inappropriate file type or format"}, {80, "EAUTH", "authentication error"}, {81, "ENEEDAUTH", "need authenticator"}, {82, "EIPSEC", "IPsec processing failure"}, {83, "ENOATTR", "attribute not found"}, {84, "EILSEQ", "illegal byte sequence"}, {85, "ENOMEDIUM", "no medium found"}, {86, "EMEDIUMTYPE", "wrong medium type"}, {87, "EOVERFLOW", "value too large to be stored in data type"}, {88, "ECANCELED", "operation canceled"}, {89, "EIDRM", "identifier removed"}, {90, "ENOMSG", "no message of desired type"}, {91, "ENOTSUP", "not supported"}, {92, "EBADMSG", "bad message"}, {93, "ENOTRECOVERABLE", "state not recoverable"}, {94, "EOWNERDEAD", "previous owner died"}, {95, "ELAST", "protocol error"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, {6, "SIGIOT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGURG", "urgent I/O condition"}, {17, "SIGSTOP", "suspended (signal)"}, {18, "SIGTSTP", "suspended"}, {19, "SIGCONT", "continued"}, {20, "SIGCHLD", "child exited"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGIO", "I/O possible"}, {24, "SIGXCPU", "cputime limit exceeded"}, {25, "SIGXFSZ", "filesize limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window size changes"}, {29, "SIGINFO", "information request"}, {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGTHR", "thread AST"}, {28672, "SIGSTKSZ", "unknown signal"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_openbsd_arm64.go ================================================ // mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && openbsd // Code generated by cmd/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 ALTWERASE = 0x200 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_FILDROP_CAPTURE = 0x1 BPF_FILDROP_DROP = 0x2 BPF_FILDROP_PASS = 0x0 BPF_F_DIR_IN = 0x10 BPF_F_DIR_MASK = 0x30 BPF_F_DIR_OUT = 0x20 BPF_F_DIR_SHIFT = 0x4 BPF_F_FLOWID = 0x8 BPF_F_PRI_MASK = 0x7 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_RND = 0xc0 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 CLOCK_BOOTTIME = 0x6 CLOCK_MONOTONIC = 0x3 CLOCK_PROCESS_CPUTIME_ID = 0x2 CLOCK_REALTIME = 0x0 CLOCK_THREAD_CPUTIME_ID = 0x4 CLOCK_UPTIME = 0x5 CPUSTATES = 0x6 CP_IDLE = 0x5 CP_INTR = 0x4 CP_NICE = 0x1 CP_SPIN = 0x3 CP_SYS = 0x2 CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x10000 CS5 = 0x0 CS6 = 0x100 CS7 = 0x200 CS8 = 0x300 CSIZE = 0x300 CSTART = 0x11 CSTATUS = 0xff CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a CTL_HW = 0x6 CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 DIOCADDQUEUE = 0xc110445d DIOCADDRULE = 0xcd604404 DIOCADDSTATE = 0xc1084425 DIOCCHANGERULE = 0xcd60441a DIOCCLRIFFLAG = 0xc028445a DIOCCLRSRCNODES = 0x20004455 DIOCCLRSTATES = 0xc0e04412 DIOCCLRSTATUS = 0xc0284416 DIOCGETLIMIT = 0xc0084427 DIOCGETQSTATS = 0xc1204460 DIOCGETQUEUE = 0xc110445f DIOCGETQUEUES = 0xc110445e DIOCGETRULE = 0xcd604407 DIOCGETRULES = 0xcd604406 DIOCGETRULESET = 0xc444443b DIOCGETRULESETS = 0xc444443a DIOCGETSRCNODES = 0xc0104454 DIOCGETSTATE = 0xc1084413 DIOCGETSTATES = 0xc0104419 DIOCGETSTATUS = 0xc1e84415 DIOCGETSYNFLWATS = 0xc0084463 DIOCGETTIMEOUT = 0xc008441e DIOCIGETIFACES = 0xc0284457 DIOCKILLSRCNODES = 0xc080445b DIOCKILLSTATES = 0xc0e04429 DIOCNATLOOK = 0xc0504417 DIOCOSFPADD = 0xc088444f DIOCOSFPFLUSH = 0x2000444e DIOCOSFPGET = 0xc0884450 DIOCRADDADDRS = 0xc4504443 DIOCRADDTABLES = 0xc450443d DIOCRCLRADDRS = 0xc4504442 DIOCRCLRASTATS = 0xc4504448 DIOCRCLRTABLES = 0xc450443c DIOCRCLRTSTATS = 0xc4504441 DIOCRDELADDRS = 0xc4504444 DIOCRDELTABLES = 0xc450443e DIOCRGETADDRS = 0xc4504446 DIOCRGETASTATS = 0xc4504447 DIOCRGETTABLES = 0xc450443f DIOCRGETTSTATS = 0xc4504440 DIOCRINADEFINE = 0xc450444d DIOCRSETADDRS = 0xc4504445 DIOCRSETTFLAGS = 0xc450444a DIOCRTSTADDRS = 0xc4504449 DIOCSETDEBUG = 0xc0044418 DIOCSETHOSTID = 0xc0044456 DIOCSETIFFLAG = 0xc0284459 DIOCSETLIMIT = 0xc0084428 DIOCSETREASS = 0xc004445c DIOCSETSTATUSIF = 0xc0284414 DIOCSETSYNCOOKIES = 0xc0014462 DIOCSETSYNFLWATS = 0xc0084461 DIOCSETTIMEOUT = 0xc008441d DIOCSTART = 0x20004401 DIOCSTOP = 0x20004402 DIOCXBEGIN = 0xc0104451 DIOCXCOMMIT = 0xc0104452 DIOCXROLLBACK = 0xc0104453 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_OPENFLOW = 0x10b 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 DLT_USBPCAP = 0xf9 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 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 ETH64_8021_RSVD_MASK = 0xfffffffffff0 ETH64_8021_RSVD_PREFIX = 0x180c2000000 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_EAPOL = 0x888e 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_MACSEC = 0x88e5 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_NHRP = 0x2001 ETHERTYPE_NOVELL = 0x8138 ETHERTYPE_NS = 0x600 ETHERTYPE_NSAT = 0x601 ETHERTYPE_NSCOMPAT = 0x807 ETHERTYPE_NSH = 0x984f ETHERTYPE_NTRAILER = 0x10 ETHERTYPE_OS9 = 0x7007 ETHERTYPE_OS9NET = 0x7009 ETHERTYPE_PACER = 0x80c6 ETHERTYPE_PBB = 0x88e7 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_HARDMTU_LEN = 0xff9b ETHER_MAX_LEN = 0x5ee ETHER_MIN_LEN = 0x40 ETHER_TYPE_LEN = 0x2 ETHER_VLAN_ENCAP_LEN = 0x4 EVFILT_AIO = -0x3 EVFILT_DEVICE = -0x8 EVFILT_EXCEPT = -0x9 EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 EVFILT_SYSCOUNT = 0x9 EVFILT_TIMER = -0x7 EVFILT_VNODE = -0x4 EVFILT_WRITE = -0x2 EVL_ENCAPLEN = 0x4 EVL_PRIO_BITS = 0xd EVL_PRIO_MAX = 0x7 EVL_VLID_MASK = 0xfff EVL_VLID_MAX = 0xffe EVL_VLID_MIN = 0x1 EVL_VLID_NULL = 0x0 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_FLAG1 = 0x2000 EV_ONESHOT = 0x10 EV_RECEIPT = 0x40 EV_SYSFLAGS = 0xf800 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_ISATTY = 0xb 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 HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 IEXTEN = 0x400 IFAN_ARRIVAL = 0x0 IFAN_DEPARTURE = 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_OACTIVE = 0x400 IFF_POINTOPOINT = 0x10 IFF_PROMISC = 0x100 IFF_RUNNING = 0x40 IFF_SIMPLEX = 0x800 IFF_STATICARP = 0x20 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_MBIM = 0xfa 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_WIREGUARD = 0xfb 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_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_SCTP = 0x84 IPPROTO_TCP = 0x6 IPPROTO_TP = 0x1d IPPROTO_UDP = 0x11 IPPROTO_UDPLITE = 0x88 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_MINHOPCOUNT = 0x41 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_DROP_MEMBERSHIP = 0xd IP_ESP_NETWORK_LEVEL = 0x16 IP_ESP_TRANS_LEVEL = 0x15 IP_HDRINCL = 0x2 IP_IPCOMP_LEVEL = 0x1d IP_IPDEFTTL = 0x25 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_SENDSRCADDR = 0x7 IP_TOS = 0x3 IP_TTL = 0x4 ISIG = 0x80 ISTRIP = 0x20 ITIMER_PROF = 0x2 ITIMER_REAL = 0x0 ITIMER_VIRTUAL = 0x1 IUCLC = 0x1000 IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 KERN_HOSTNAME = 0xa KERN_OSRELEASE = 0x2 KERN_OSTYPE = 0x1 KERN_VERSION = 0x4 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_ANONYMOUS = 0x1000 MAP_CONCEAL = 0x8000 MAP_COPY = 0x2 MAP_FILE = 0x0 MAP_FIXED = 0x10 MAP_FLAGMASK = 0xfff7 MAP_HASSEMAPHORE = 0x0 MAP_INHERIT = 0x0 MAP_INHERIT_COPY = 0x1 MAP_INHERIT_NONE = 0x2 MAP_INHERIT_SHARE = 0x0 MAP_INHERIT_ZERO = 0x3 MAP_NOEXTEND = 0x0 MAP_NORESERVE = 0x0 MAP_PRIVATE = 0x2 MAP_RENAME = 0x0 MAP_SHARED = 0x1 MAP_STACK = 0x4000 MAP_TRYFIXED = 0x0 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MNT_ASYNC = 0x40 MNT_DEFEXPORTED = 0x200 MNT_DELEXPORT = 0x20000 MNT_DOOMED = 0x8000000 MNT_EXPORTANON = 0x400 MNT_EXPORTED = 0x100 MNT_EXRDONLY = 0x80 MNT_FORCE = 0x80000 MNT_LAZY = 0x3 MNT_LOCAL = 0x1000 MNT_NOATIME = 0x8000 MNT_NODEV = 0x10 MNT_NOEXEC = 0x4 MNT_NOPERM = 0x20 MNT_NOSUID = 0x8 MNT_NOWAIT = 0x2 MNT_QUOTA = 0x2000 MNT_RDONLY = 0x1 MNT_RELOAD = 0x40000 MNT_ROOTFS = 0x4000 MNT_SOFTDEP = 0x4000000 MNT_STALLED = 0x100000 MNT_SWAPPABLE = 0x200000 MNT_SYNCHRONOUS = 0x2 MNT_UPDATE = 0x10000 MNT_VISFLAGMASK = 0x400ffff MNT_WAIT = 0x1 MNT_WANTRDWR = 0x2000000 MNT_WXALLOWED = 0x800 MOUNT_AFS = "afs" MOUNT_CD9660 = "cd9660" MOUNT_EXT2FS = "ext2fs" MOUNT_FFS = "ffs" MOUNT_FUSEFS = "fuse" MOUNT_MFS = "mfs" MOUNT_MSDOS = "msdos" MOUNT_NCPFS = "ncpfs" MOUNT_NFS = "nfs" MOUNT_NTFS = "ntfs" MOUNT_TMPFS = "tmpfs" MOUNT_UDF = "udf" MOUNT_UFS = "ffs" MSG_BCAST = 0x100 MSG_CMSG_CLOEXEC = 0x800 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 MSG_WAITFORONE = 0x1000 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_IFNAMES = 0x6 NET_RT_MAXID = 0x8 NET_RT_SOURCE = 0x7 NET_RT_STATS = 0x4 NET_RT_TABLE = 0x5 NFDBITS = 0x20 NOFLSH = 0x80000000 NOKERNINFO = 0x2000000 NOTE_ATTRIB = 0x8 NOTE_CHANGE = 0x1 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_OOB = 0x4 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 OLCUC = 0x20 ONLCR = 0x2 ONLRET = 0x80 ONOCR = 0x40 ONOEOT = 0x8 OPOST = 0x1 OXTABS = 0x4 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_MEMLOCK = 0x6 RLIMIT_NOFILE = 0x8 RLIMIT_NPROC = 0x7 RLIMIT_RSS = 0x5 RLIMIT_STACK = 0x3 RLIM_INFINITY = 0x7fffffffffffffff RTAX_AUTHOR = 0x6 RTAX_BFD = 0xb RTAX_BRD = 0x7 RTAX_DNS = 0xc RTAX_DST = 0x0 RTAX_GATEWAY = 0x1 RTAX_GENMASK = 0x3 RTAX_IFA = 0x5 RTAX_IFP = 0x4 RTAX_LABEL = 0xa RTAX_MAX = 0xf RTAX_NETMASK = 0x2 RTAX_SEARCH = 0xe RTAX_SRC = 0x8 RTAX_SRCMASK = 0x9 RTAX_STATIC = 0xd RTA_AUTHOR = 0x40 RTA_BFD = 0x800 RTA_BRD = 0x80 RTA_DNS = 0x1000 RTA_DST = 0x1 RTA_GATEWAY = 0x2 RTA_GENMASK = 0x8 RTA_IFA = 0x20 RTA_IFP = 0x10 RTA_LABEL = 0x400 RTA_NETMASK = 0x4 RTA_SEARCH = 0x4000 RTA_SRC = 0x100 RTA_SRCMASK = 0x200 RTA_STATIC = 0x2000 RTF_ANNOUNCE = 0x4000 RTF_BFD = 0x1000000 RTF_BLACKHOLE = 0x1000 RTF_BROADCAST = 0x400000 RTF_CACHED = 0x20000 RTF_CLONED = 0x10000 RTF_CLONING = 0x100 RTF_CONNECTED = 0x800000 RTF_DONE = 0x40 RTF_DYNAMIC = 0x10 RTF_FMASK = 0x110fc08 RTF_GATEWAY = 0x2 RTF_HOST = 0x4 RTF_LLINFO = 0x400 RTF_LOCAL = 0x200000 RTF_MODIFIED = 0x20 RTF_MPATH = 0x40000 RTF_MPLS = 0x100000 RTF_MULTICAST = 0x200 RTF_PERMANENT_ARP = 0x2000 RTF_PROTO1 = 0x8000 RTF_PROTO2 = 0x4000 RTF_PROTO3 = 0x2000 RTF_REJECT = 0x8 RTF_STATIC = 0x800 RTF_UP = 0x1 RTF_USETRAILERS = 0x8000 RTM_80211INFO = 0x15 RTM_ADD = 0x1 RTM_BFD = 0x12 RTM_CHANGE = 0x3 RTM_CHGADDRATTR = 0x14 RTM_DELADDR = 0xd RTM_DELETE = 0x2 RTM_DESYNC = 0x10 RTM_GET = 0x4 RTM_IFANNOUNCE = 0xf RTM_IFINFO = 0xe RTM_INVALIDATE = 0x11 RTM_LOSING = 0x5 RTM_MAXSIZE = 0x800 RTM_MISS = 0x7 RTM_NEWADDR = 0xc RTM_PROPOSAL = 0x13 RTM_REDIRECT = 0x6 RTM_RESOLVE = 0xb RTM_SOURCE = 0x16 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_BITS = 0x8 RT_TABLEID_MASK = 0xff RT_TABLEID_MAX = 0xff RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 RUSAGE_THREAD = 0x1 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x4 SEEK_CUR = 0x1 SEEK_END = 0x2 SEEK_SET = 0x0 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 SIOCADDMULTI = 0x80206931 SIOCAIFADDR = 0x8040691a SIOCAIFGROUP = 0x80286987 SIOCATMARK = 0x40047307 SIOCBRDGADD = 0x8060693c SIOCBRDGADDL = 0x80606949 SIOCBRDGADDS = 0x80606941 SIOCBRDGARL = 0x808c694d SIOCBRDGDADDR = 0x81286947 SIOCBRDGDEL = 0x8060693d SIOCBRDGDELS = 0x80606942 SIOCBRDGFLUSH = 0x80606948 SIOCBRDGFRL = 0x808c694e SIOCBRDGGCACHE = 0xc0146941 SIOCBRDGGFD = 0xc0146952 SIOCBRDGGHT = 0xc0146951 SIOCBRDGGIFFLGS = 0xc060693e SIOCBRDGGMA = 0xc0146953 SIOCBRDGGPARAM = 0xc0406958 SIOCBRDGGPRI = 0xc0146950 SIOCBRDGGRL = 0xc030694f SIOCBRDGGTO = 0xc0146946 SIOCBRDGIFS = 0xc0606942 SIOCBRDGRTS = 0xc0206943 SIOCBRDGSADDR = 0xc1286944 SIOCBRDGSCACHE = 0x80146940 SIOCBRDGSFD = 0x80146952 SIOCBRDGSHT = 0x80146951 SIOCBRDGSIFCOST = 0x80606955 SIOCBRDGSIFFLGS = 0x8060693f SIOCBRDGSIFPRIO = 0x80606954 SIOCBRDGSIFPROT = 0x8060694a SIOCBRDGSMA = 0x80146953 SIOCBRDGSPRI = 0x80146950 SIOCBRDGSPROTO = 0x8014695a SIOCBRDGSTO = 0x80146945 SIOCBRDGSTXHC = 0x80146959 SIOCDELLABEL = 0x80206997 SIOCDELMULTI = 0x80206932 SIOCDIFADDR = 0x80206919 SIOCDIFGROUP = 0x80286989 SIOCDIFPARENT = 0x802069b4 SIOCDIFPHYADDR = 0x80206949 SIOCDPWE3NEIGHBOR = 0x802069de SIOCDVNETID = 0x802069af SIOCGETKALIVE = 0xc01869a4 SIOCGETLABEL = 0x8020699a SIOCGETMPWCFG = 0xc02069ae SIOCGETPFLOW = 0xc02069fe SIOCGETPFSYNC = 0xc02069f8 SIOCGETSGCNT = 0xc0207534 SIOCGETVIFCNT = 0xc0287533 SIOCGETVLAN = 0xc0206990 SIOCGIFADDR = 0xc0206921 SIOCGIFBRDADDR = 0xc0206923 SIOCGIFCONF = 0xc0106924 SIOCGIFDATA = 0xc020691b SIOCGIFDESCR = 0xc0206981 SIOCGIFDSTADDR = 0xc0206922 SIOCGIFFLAGS = 0xc0206911 SIOCGIFGATTR = 0xc028698b SIOCGIFGENERIC = 0xc020693a SIOCGIFGLIST = 0xc028698d SIOCGIFGMEMB = 0xc028698a SIOCGIFGROUP = 0xc0286988 SIOCGIFHARDMTU = 0xc02069a5 SIOCGIFLLPRIO = 0xc02069b6 SIOCGIFMEDIA = 0xc0406938 SIOCGIFMETRIC = 0xc0206917 SIOCGIFMTU = 0xc020697e SIOCGIFNETMASK = 0xc0206925 SIOCGIFPAIR = 0xc02069b1 SIOCGIFPARENT = 0xc02069b3 SIOCGIFPRIORITY = 0xc020699c SIOCGIFRDOMAIN = 0xc02069a0 SIOCGIFRTLABEL = 0xc0206983 SIOCGIFRXR = 0x802069aa SIOCGIFSFFPAGE = 0xc1126939 SIOCGIFXFLAGS = 0xc020699e SIOCGLIFPHYADDR = 0xc218694b SIOCGLIFPHYDF = 0xc02069c2 SIOCGLIFPHYECN = 0xc02069c8 SIOCGLIFPHYRTABLE = 0xc02069a2 SIOCGLIFPHYTTL = 0xc02069a9 SIOCGPGRP = 0x40047309 SIOCGPWE3 = 0xc0206998 SIOCGPWE3CTRLWORD = 0xc02069dc SIOCGPWE3FAT = 0xc02069dd SIOCGPWE3NEIGHBOR = 0xc21869de SIOCGRXHPRIO = 0xc02069db SIOCGSPPPPARAMS = 0xc0206994 SIOCGTXHPRIO = 0xc02069c6 SIOCGUMBINFO = 0xc02069be SIOCGUMBPARAM = 0xc02069c0 SIOCGVH = 0xc02069f6 SIOCGVNETFLOWID = 0xc02069c4 SIOCGVNETID = 0xc02069a7 SIOCIFAFATTACH = 0x801169ab SIOCIFAFDETACH = 0x801169ac SIOCIFCREATE = 0x8020697a SIOCIFDESTROY = 0x80206979 SIOCIFGCLONERS = 0xc0106978 SIOCSETKALIVE = 0x801869a3 SIOCSETLABEL = 0x80206999 SIOCSETMPWCFG = 0x802069ad SIOCSETPFLOW = 0x802069fd SIOCSETPFSYNC = 0x802069f7 SIOCSETVLAN = 0x8020698f SIOCSIFADDR = 0x8020690c SIOCSIFBRDADDR = 0x80206913 SIOCSIFDESCR = 0x80206980 SIOCSIFDSTADDR = 0x8020690e SIOCSIFFLAGS = 0x80206910 SIOCSIFGATTR = 0x8028698c SIOCSIFGENERIC = 0x80206939 SIOCSIFLLADDR = 0x8020691f SIOCSIFLLPRIO = 0x802069b5 SIOCSIFMEDIA = 0xc0206937 SIOCSIFMETRIC = 0x80206918 SIOCSIFMTU = 0x8020697f SIOCSIFNETMASK = 0x80206916 SIOCSIFPAIR = 0x802069b0 SIOCSIFPARENT = 0x802069b2 SIOCSIFPRIORITY = 0x8020699b SIOCSIFRDOMAIN = 0x8020699f SIOCSIFRTLABEL = 0x80206982 SIOCSIFXFLAGS = 0x8020699d SIOCSLIFPHYADDR = 0x8218694a SIOCSLIFPHYDF = 0x802069c1 SIOCSLIFPHYECN = 0x802069c7 SIOCSLIFPHYRTABLE = 0x802069a1 SIOCSLIFPHYTTL = 0x802069a8 SIOCSPGRP = 0x80047308 SIOCSPWE3CTRLWORD = 0x802069dc SIOCSPWE3FAT = 0x802069dd SIOCSPWE3NEIGHBOR = 0x821869de SIOCSRXHPRIO = 0x802069db SIOCSSPPPPARAMS = 0x80206993 SIOCSTXHPRIO = 0x802069c5 SIOCSUMBPARAM = 0x802069bf SIOCSVH = 0xc02069f5 SIOCSVNETFLOWID = 0x802069c3 SIOCSVNETID = 0x802069a6 SOCK_CLOEXEC = 0x8000 SOCK_DGRAM = 0x2 SOCK_DNS = 0x1000 SOCK_NONBLOCK = 0x4000 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_DOMAIN = 0x1024 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_NETPROC = 0x1020 SO_OOBINLINE = 0x100 SO_PEERCRED = 0x1022 SO_PROTOCOL = 0x1025 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 SO_ZEROIZE = 0x2000 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_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 TCIOFF = 0x3 TCIOFLUSH = 0x3 TCION = 0x4 TCOFLUSH = 0x2 TCOOFF = 0x1 TCOON = 0x2 TCPOPT_EOL = 0x0 TCPOPT_MAXSEG = 0x2 TCPOPT_NOP = 0x1 TCPOPT_SACK = 0x5 TCPOPT_SACK_HDR = 0x1010500 TCPOPT_SACK_PERMITTED = 0x4 TCPOPT_SACK_PERMIT_HDR = 0x1010402 TCPOPT_SIGNATURE = 0x13 TCPOPT_TIMESTAMP = 0x8 TCPOPT_TSTAMP_HDR = 0x101080a TCPOPT_WINDOW = 0x3 TCP_INFO = 0x9 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_SACKHOLE_LIMIT = 0x80 TCP_SACK_ENABLE = 0x8 TCSAFLUSH = 0x2 TIMER_ABSTIME = 0x1 TIMER_RELTIME = 0x0 TIOCCBRK = 0x2000747a TIOCCDTR = 0x20007478 TIOCCHKVERAUTH = 0x2000741e TIOCCLRVERAUTH = 0x2000741d 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 TIOCSETVERAUTH = 0x8004741c TIOCSFLAGS = 0x8004745c TIOCSIG = 0x8004745f TIOCSPGRP = 0x80047476 TIOCSTART = 0x2000746e TIOCSTAT = 0x20007465 TIOCSTOP = 0x2000746f TIOCSTSTAMP = 0x8008745a TIOCSWINSZ = 0x80087467 TIOCUCNTL = 0x80047466 TIOCUCNTL_CBRK = 0x7a TIOCUCNTL_SBRK = 0x7b TOSTOP = 0x400000 UTIME_NOW = -0x2 UTIME_OMIT = -0x1 VDISCARD = 0xf VDSUSP = 0xb VEOF = 0x0 VEOL = 0x1 VEOL2 = 0x2 VERASE = 0x3 VINTR = 0x8 VKILL = 0x5 VLNEXT = 0xe VMIN = 0x10 VM_ANONMIN = 0x7 VM_LOADAVG = 0x2 VM_MALLOC_CONF = 0xc VM_MAXID = 0xd VM_MAXSLP = 0xa VM_METER = 0x1 VM_NKMEMPAGES = 0x6 VM_PSSTRINGS = 0x3 VM_SWAPENCRYPT = 0x5 VM_USPACE = 0xb VM_UVMEXP = 0x4 VM_VNODEMIN = 0x9 VM_VTEXTMIN = 0x8 VQUIT = 0x9 VREPRINT = 0x6 VSTART = 0xc VSTATUS = 0x12 VSTOP = 0xd VSUSP = 0xa VTIME = 0x11 VWERASE = 0x4 WALTSIG = 0x4 WCONTINUED = 0x8 WCOREFLAG = 0x80 WNOHANG = 0x1 WUNTRACED = 0x2 XCASE = 0x1000000 ) // 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(0x5c) 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(0x5f) 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) ENOTRECOVERABLE = syscall.Errno(0x5d) ENOTSOCK = syscall.Errno(0x26) ENOTSUP = syscall.Errno(0x5b) ENOTTY = syscall.Errno(0x19) ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x2d) EOVERFLOW = syscall.Errno(0x57) EOWNERDEAD = syscall.Errno(0x5e) 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(0x5f) 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "device not configured"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EDEADLK", "resource deadlock avoided"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "cross-device link"}, {19, "ENODEV", "operation not supported by device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "result too large"}, {35, "EAGAIN", "resource temporarily unavailable"}, {36, "EINPROGRESS", "operation now in progress"}, {37, "EALREADY", "operation already in progress"}, {38, "ENOTSOCK", "socket operation on non-socket"}, {39, "EDESTADDRREQ", "destination address required"}, {40, "EMSGSIZE", "message too long"}, {41, "EPROTOTYPE", "protocol wrong type for socket"}, {42, "ENOPROTOOPT", "protocol not available"}, {43, "EPROTONOSUPPORT", "protocol not supported"}, {44, "ESOCKTNOSUPPORT", "socket type not supported"}, {45, "EOPNOTSUPP", "operation not supported"}, {46, "EPFNOSUPPORT", "protocol family not supported"}, {47, "EAFNOSUPPORT", "address family not supported by protocol family"}, {48, "EADDRINUSE", "address already in use"}, {49, "EADDRNOTAVAIL", "can't assign requested address"}, {50, "ENETDOWN", "network is down"}, {51, "ENETUNREACH", "network is unreachable"}, {52, "ENETRESET", "network dropped connection on reset"}, {53, "ECONNABORTED", "software caused connection abort"}, {54, "ECONNRESET", "connection reset by peer"}, {55, "ENOBUFS", "no buffer space available"}, {56, "EISCONN", "socket is already connected"}, {57, "ENOTCONN", "socket is not connected"}, {58, "ESHUTDOWN", "can't send after socket shutdown"}, {59, "ETOOMANYREFS", "too many references: can't splice"}, {60, "ETIMEDOUT", "operation timed out"}, {61, "ECONNREFUSED", "connection refused"}, {62, "ELOOP", "too many levels of symbolic links"}, {63, "ENAMETOOLONG", "file name too long"}, {64, "EHOSTDOWN", "host is down"}, {65, "EHOSTUNREACH", "no route to host"}, {66, "ENOTEMPTY", "directory not empty"}, {67, "EPROCLIM", "too many processes"}, {68, "EUSERS", "too many users"}, {69, "EDQUOT", "disk quota exceeded"}, {70, "ESTALE", "stale NFS file handle"}, {71, "EREMOTE", "too many levels of remote in path"}, {72, "EBADRPC", "RPC struct is bad"}, {73, "ERPCMISMATCH", "RPC version wrong"}, {74, "EPROGUNAVAIL", "RPC program not available"}, {75, "EPROGMISMATCH", "program version wrong"}, {76, "EPROCUNAVAIL", "bad procedure for program"}, {77, "ENOLCK", "no locks available"}, {78, "ENOSYS", "function not implemented"}, {79, "EFTYPE", "inappropriate file type or format"}, {80, "EAUTH", "authentication error"}, {81, "ENEEDAUTH", "need authenticator"}, {82, "EIPSEC", "IPsec processing failure"}, {83, "ENOATTR", "attribute not found"}, {84, "EILSEQ", "illegal byte sequence"}, {85, "ENOMEDIUM", "no medium found"}, {86, "EMEDIUMTYPE", "wrong medium type"}, {87, "EOVERFLOW", "value too large to be stored in data type"}, {88, "ECANCELED", "operation canceled"}, {89, "EIDRM", "identifier removed"}, {90, "ENOMSG", "no message of desired type"}, {91, "ENOTSUP", "not supported"}, {92, "EBADMSG", "bad message"}, {93, "ENOTRECOVERABLE", "state not recoverable"}, {94, "EOWNERDEAD", "previous owner died"}, {95, "ELAST", "protocol error"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, {6, "SIGIOT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGURG", "urgent I/O condition"}, {17, "SIGSTOP", "suspended (signal)"}, {18, "SIGTSTP", "suspended"}, {19, "SIGCONT", "continued"}, {20, "SIGCHLD", "child exited"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGIO", "I/O possible"}, {24, "SIGXCPU", "cputime limit exceeded"}, {25, "SIGXFSZ", "filesize limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window size changes"}, {29, "SIGINFO", "information request"}, {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGTHR", "thread AST"}, {28672, "SIGSTKSZ", "unknown signal"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_openbsd_mips64.go ================================================ // mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64 && openbsd // Code generated by cmd/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 ALTWERASE = 0x200 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_FILDROP_CAPTURE = 0x1 BPF_FILDROP_DROP = 0x2 BPF_FILDROP_PASS = 0x0 BPF_F_DIR_IN = 0x10 BPF_F_DIR_MASK = 0x30 BPF_F_DIR_OUT = 0x20 BPF_F_DIR_SHIFT = 0x4 BPF_F_FLOWID = 0x8 BPF_F_PRI_MASK = 0x7 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_RND = 0xc0 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 CLOCK_BOOTTIME = 0x6 CLOCK_MONOTONIC = 0x3 CLOCK_PROCESS_CPUTIME_ID = 0x2 CLOCK_REALTIME = 0x0 CLOCK_THREAD_CPUTIME_ID = 0x4 CLOCK_UPTIME = 0x5 CPUSTATES = 0x6 CP_IDLE = 0x5 CP_INTR = 0x4 CP_NICE = 0x1 CP_SPIN = 0x3 CP_SYS = 0x2 CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x10000 CS5 = 0x0 CS6 = 0x100 CS7 = 0x200 CS8 = 0x300 CSIZE = 0x300 CSTART = 0x11 CSTATUS = 0xff CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a CTL_HW = 0x6 CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 DIOCADDQUEUE = 0xc110445d DIOCADDRULE = 0xcd604404 DIOCADDSTATE = 0xc1084425 DIOCCHANGERULE = 0xcd60441a DIOCCLRIFFLAG = 0xc028445a DIOCCLRSRCNODES = 0x20004455 DIOCCLRSTATES = 0xc0e04412 DIOCCLRSTATUS = 0xc0284416 DIOCGETLIMIT = 0xc0084427 DIOCGETQSTATS = 0xc1204460 DIOCGETQUEUE = 0xc110445f DIOCGETQUEUES = 0xc110445e DIOCGETRULE = 0xcd604407 DIOCGETRULES = 0xcd604406 DIOCGETRULESET = 0xc444443b DIOCGETRULESETS = 0xc444443a DIOCGETSRCNODES = 0xc0104454 DIOCGETSTATE = 0xc1084413 DIOCGETSTATES = 0xc0104419 DIOCGETSTATUS = 0xc1e84415 DIOCGETSYNFLWATS = 0xc0084463 DIOCGETTIMEOUT = 0xc008441e DIOCIGETIFACES = 0xc0284457 DIOCKILLSRCNODES = 0xc080445b DIOCKILLSTATES = 0xc0e04429 DIOCNATLOOK = 0xc0504417 DIOCOSFPADD = 0xc088444f DIOCOSFPFLUSH = 0x2000444e DIOCOSFPGET = 0xc0884450 DIOCRADDADDRS = 0xc4504443 DIOCRADDTABLES = 0xc450443d DIOCRCLRADDRS = 0xc4504442 DIOCRCLRASTATS = 0xc4504448 DIOCRCLRTABLES = 0xc450443c DIOCRCLRTSTATS = 0xc4504441 DIOCRDELADDRS = 0xc4504444 DIOCRDELTABLES = 0xc450443e DIOCRGETADDRS = 0xc4504446 DIOCRGETASTATS = 0xc4504447 DIOCRGETTABLES = 0xc450443f DIOCRGETTSTATS = 0xc4504440 DIOCRINADEFINE = 0xc450444d DIOCRSETADDRS = 0xc4504445 DIOCRSETTFLAGS = 0xc450444a DIOCRTSTADDRS = 0xc4504449 DIOCSETDEBUG = 0xc0044418 DIOCSETHOSTID = 0xc0044456 DIOCSETIFFLAG = 0xc0284459 DIOCSETLIMIT = 0xc0084428 DIOCSETREASS = 0xc004445c DIOCSETSTATUSIF = 0xc0284414 DIOCSETSYNCOOKIES = 0xc0014462 DIOCSETSYNFLWATS = 0xc0084461 DIOCSETTIMEOUT = 0xc008441d DIOCSTART = 0x20004401 DIOCSTOP = 0x20004402 DIOCXBEGIN = 0xc0104451 DIOCXCOMMIT = 0xc0104452 DIOCXROLLBACK = 0xc0104453 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_OPENFLOW = 0x10b 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 DLT_USBPCAP = 0xf9 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 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 ETH64_8021_RSVD_MASK = 0xfffffffffff0 ETH64_8021_RSVD_PREFIX = 0x180c2000000 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_EAPOL = 0x888e 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_MACSEC = 0x88e5 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_NHRP = 0x2001 ETHERTYPE_NOVELL = 0x8138 ETHERTYPE_NS = 0x600 ETHERTYPE_NSAT = 0x601 ETHERTYPE_NSCOMPAT = 0x807 ETHERTYPE_NSH = 0x984f ETHERTYPE_NTRAILER = 0x10 ETHERTYPE_OS9 = 0x7007 ETHERTYPE_OS9NET = 0x7009 ETHERTYPE_PACER = 0x80c6 ETHERTYPE_PBB = 0x88e7 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_HARDMTU_LEN = 0xff9b ETHER_MAX_LEN = 0x5ee ETHER_MIN_LEN = 0x40 ETHER_TYPE_LEN = 0x2 ETHER_VLAN_ENCAP_LEN = 0x4 EVFILT_AIO = -0x3 EVFILT_DEVICE = -0x8 EVFILT_EXCEPT = -0x9 EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 EVFILT_SYSCOUNT = 0x9 EVFILT_TIMER = -0x7 EVFILT_VNODE = -0x4 EVFILT_WRITE = -0x2 EVL_ENCAPLEN = 0x4 EVL_PRIO_BITS = 0xd EVL_PRIO_MAX = 0x7 EVL_VLID_MASK = 0xfff EVL_VLID_MAX = 0xffe EVL_VLID_MIN = 0x1 EVL_VLID_NULL = 0x0 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_FLAG1 = 0x2000 EV_ONESHOT = 0x10 EV_RECEIPT = 0x40 EV_SYSFLAGS = 0xf800 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_ISATTY = 0xb 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 HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 IEXTEN = 0x400 IFAN_ARRIVAL = 0x0 IFAN_DEPARTURE = 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_OACTIVE = 0x400 IFF_POINTOPOINT = 0x10 IFF_PROMISC = 0x100 IFF_RUNNING = 0x40 IFF_SIMPLEX = 0x800 IFF_STATICARP = 0x20 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_MBIM = 0xfa 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_WIREGUARD = 0xfb 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_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_SCTP = 0x84 IPPROTO_TCP = 0x6 IPPROTO_TP = 0x1d IPPROTO_UDP = 0x11 IPPROTO_UDPLITE = 0x88 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 = 0xfffffff IPV6_FLOWLABEL_MASK = 0xfffff 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_MINHOPCOUNT = 0x41 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_DROP_MEMBERSHIP = 0xd IP_ESP_NETWORK_LEVEL = 0x16 IP_ESP_TRANS_LEVEL = 0x15 IP_HDRINCL = 0x2 IP_IPCOMP_LEVEL = 0x1d IP_IPDEFTTL = 0x25 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_SENDSRCADDR = 0x7 IP_TOS = 0x3 IP_TTL = 0x4 ISIG = 0x80 ISTRIP = 0x20 ITIMER_PROF = 0x2 ITIMER_REAL = 0x0 ITIMER_VIRTUAL = 0x1 IUCLC = 0x1000 IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 KERN_HOSTNAME = 0xa KERN_OSRELEASE = 0x2 KERN_OSTYPE = 0x1 KERN_VERSION = 0x4 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_ANONYMOUS = 0x1000 MAP_CONCEAL = 0x8000 MAP_COPY = 0x2 MAP_FILE = 0x0 MAP_FIXED = 0x10 MAP_FLAGMASK = 0xfff7 MAP_HASSEMAPHORE = 0x0 MAP_INHERIT = 0x0 MAP_INHERIT_COPY = 0x1 MAP_INHERIT_NONE = 0x2 MAP_INHERIT_SHARE = 0x0 MAP_INHERIT_ZERO = 0x3 MAP_NOEXTEND = 0x0 MAP_NORESERVE = 0x0 MAP_PRIVATE = 0x2 MAP_RENAME = 0x0 MAP_SHARED = 0x1 MAP_STACK = 0x4000 MAP_TRYFIXED = 0x0 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MNT_ASYNC = 0x40 MNT_DEFEXPORTED = 0x200 MNT_DELEXPORT = 0x20000 MNT_DOOMED = 0x8000000 MNT_EXPORTANON = 0x400 MNT_EXPORTED = 0x100 MNT_EXRDONLY = 0x80 MNT_FORCE = 0x80000 MNT_LAZY = 0x3 MNT_LOCAL = 0x1000 MNT_NOATIME = 0x8000 MNT_NODEV = 0x10 MNT_NOEXEC = 0x4 MNT_NOPERM = 0x20 MNT_NOSUID = 0x8 MNT_NOWAIT = 0x2 MNT_QUOTA = 0x2000 MNT_RDONLY = 0x1 MNT_RELOAD = 0x40000 MNT_ROOTFS = 0x4000 MNT_SOFTDEP = 0x4000000 MNT_STALLED = 0x100000 MNT_SWAPPABLE = 0x200000 MNT_SYNCHRONOUS = 0x2 MNT_UPDATE = 0x10000 MNT_VISFLAGMASK = 0x400ffff MNT_WAIT = 0x1 MNT_WANTRDWR = 0x2000000 MNT_WXALLOWED = 0x800 MOUNT_AFS = "afs" MOUNT_CD9660 = "cd9660" MOUNT_EXT2FS = "ext2fs" MOUNT_FFS = "ffs" MOUNT_FUSEFS = "fuse" MOUNT_MFS = "mfs" MOUNT_MSDOS = "msdos" MOUNT_NCPFS = "ncpfs" MOUNT_NFS = "nfs" MOUNT_NTFS = "ntfs" MOUNT_TMPFS = "tmpfs" MOUNT_UDF = "udf" MOUNT_UFS = "ffs" MSG_BCAST = 0x100 MSG_CMSG_CLOEXEC = 0x800 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 MSG_WAITFORONE = 0x1000 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_IFNAMES = 0x6 NET_RT_MAXID = 0x8 NET_RT_SOURCE = 0x7 NET_RT_STATS = 0x4 NET_RT_TABLE = 0x5 NFDBITS = 0x20 NOFLSH = 0x80000000 NOKERNINFO = 0x2000000 NOTE_ATTRIB = 0x8 NOTE_CHANGE = 0x1 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_OOB = 0x4 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 OLCUC = 0x20 ONLCR = 0x2 ONLRET = 0x80 ONOCR = 0x40 ONOEOT = 0x8 OPOST = 0x1 OXTABS = 0x4 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_MEMLOCK = 0x6 RLIMIT_NOFILE = 0x8 RLIMIT_NPROC = 0x7 RLIMIT_RSS = 0x5 RLIMIT_STACK = 0x3 RLIM_INFINITY = 0x7fffffffffffffff RTAX_AUTHOR = 0x6 RTAX_BFD = 0xb RTAX_BRD = 0x7 RTAX_DNS = 0xc RTAX_DST = 0x0 RTAX_GATEWAY = 0x1 RTAX_GENMASK = 0x3 RTAX_IFA = 0x5 RTAX_IFP = 0x4 RTAX_LABEL = 0xa RTAX_MAX = 0xf RTAX_NETMASK = 0x2 RTAX_SEARCH = 0xe RTAX_SRC = 0x8 RTAX_SRCMASK = 0x9 RTAX_STATIC = 0xd RTA_AUTHOR = 0x40 RTA_BFD = 0x800 RTA_BRD = 0x80 RTA_DNS = 0x1000 RTA_DST = 0x1 RTA_GATEWAY = 0x2 RTA_GENMASK = 0x8 RTA_IFA = 0x20 RTA_IFP = 0x10 RTA_LABEL = 0x400 RTA_NETMASK = 0x4 RTA_SEARCH = 0x4000 RTA_SRC = 0x100 RTA_SRCMASK = 0x200 RTA_STATIC = 0x2000 RTF_ANNOUNCE = 0x4000 RTF_BFD = 0x1000000 RTF_BLACKHOLE = 0x1000 RTF_BROADCAST = 0x400000 RTF_CACHED = 0x20000 RTF_CLONED = 0x10000 RTF_CLONING = 0x100 RTF_CONNECTED = 0x800000 RTF_DONE = 0x40 RTF_DYNAMIC = 0x10 RTF_FMASK = 0x110fc08 RTF_GATEWAY = 0x2 RTF_HOST = 0x4 RTF_LLINFO = 0x400 RTF_LOCAL = 0x200000 RTF_MODIFIED = 0x20 RTF_MPATH = 0x40000 RTF_MPLS = 0x100000 RTF_MULTICAST = 0x200 RTF_PERMANENT_ARP = 0x2000 RTF_PROTO1 = 0x8000 RTF_PROTO2 = 0x4000 RTF_PROTO3 = 0x2000 RTF_REJECT = 0x8 RTF_STATIC = 0x800 RTF_UP = 0x1 RTF_USETRAILERS = 0x8000 RTM_80211INFO = 0x15 RTM_ADD = 0x1 RTM_BFD = 0x12 RTM_CHANGE = 0x3 RTM_CHGADDRATTR = 0x14 RTM_DELADDR = 0xd RTM_DELETE = 0x2 RTM_DESYNC = 0x10 RTM_GET = 0x4 RTM_IFANNOUNCE = 0xf RTM_IFINFO = 0xe RTM_INVALIDATE = 0x11 RTM_LOSING = 0x5 RTM_MAXSIZE = 0x800 RTM_MISS = 0x7 RTM_NEWADDR = 0xc RTM_PROPOSAL = 0x13 RTM_REDIRECT = 0x6 RTM_RESOLVE = 0xb RTM_SOURCE = 0x16 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_BITS = 0x8 RT_TABLEID_MASK = 0xff RT_TABLEID_MAX = 0xff RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 RUSAGE_THREAD = 0x1 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x4 SEEK_CUR = 0x1 SEEK_END = 0x2 SEEK_SET = 0x0 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 SIOCADDMULTI = 0x80206931 SIOCAIFADDR = 0x8040691a SIOCAIFGROUP = 0x80286987 SIOCATMARK = 0x40047307 SIOCBRDGADD = 0x8060693c SIOCBRDGADDL = 0x80606949 SIOCBRDGADDS = 0x80606941 SIOCBRDGARL = 0x808c694d SIOCBRDGDADDR = 0x81286947 SIOCBRDGDEL = 0x8060693d SIOCBRDGDELS = 0x80606942 SIOCBRDGFLUSH = 0x80606948 SIOCBRDGFRL = 0x808c694e SIOCBRDGGCACHE = 0xc0146941 SIOCBRDGGFD = 0xc0146952 SIOCBRDGGHT = 0xc0146951 SIOCBRDGGIFFLGS = 0xc060693e SIOCBRDGGMA = 0xc0146953 SIOCBRDGGPARAM = 0xc0406958 SIOCBRDGGPRI = 0xc0146950 SIOCBRDGGRL = 0xc030694f SIOCBRDGGTO = 0xc0146946 SIOCBRDGIFS = 0xc0606942 SIOCBRDGRTS = 0xc0206943 SIOCBRDGSADDR = 0xc1286944 SIOCBRDGSCACHE = 0x80146940 SIOCBRDGSFD = 0x80146952 SIOCBRDGSHT = 0x80146951 SIOCBRDGSIFCOST = 0x80606955 SIOCBRDGSIFFLGS = 0x8060693f SIOCBRDGSIFPRIO = 0x80606954 SIOCBRDGSIFPROT = 0x8060694a SIOCBRDGSMA = 0x80146953 SIOCBRDGSPRI = 0x80146950 SIOCBRDGSPROTO = 0x8014695a SIOCBRDGSTO = 0x80146945 SIOCBRDGSTXHC = 0x80146959 SIOCDELLABEL = 0x80206997 SIOCDELMULTI = 0x80206932 SIOCDIFADDR = 0x80206919 SIOCDIFGROUP = 0x80286989 SIOCDIFPARENT = 0x802069b4 SIOCDIFPHYADDR = 0x80206949 SIOCDPWE3NEIGHBOR = 0x802069de SIOCDVNETID = 0x802069af SIOCGETKALIVE = 0xc01869a4 SIOCGETLABEL = 0x8020699a SIOCGETMPWCFG = 0xc02069ae SIOCGETPFLOW = 0xc02069fe SIOCGETPFSYNC = 0xc02069f8 SIOCGETSGCNT = 0xc0207534 SIOCGETVIFCNT = 0xc0287533 SIOCGETVLAN = 0xc0206990 SIOCGIFADDR = 0xc0206921 SIOCGIFBRDADDR = 0xc0206923 SIOCGIFCONF = 0xc0106924 SIOCGIFDATA = 0xc020691b SIOCGIFDESCR = 0xc0206981 SIOCGIFDSTADDR = 0xc0206922 SIOCGIFFLAGS = 0xc0206911 SIOCGIFGATTR = 0xc028698b SIOCGIFGENERIC = 0xc020693a SIOCGIFGLIST = 0xc028698d SIOCGIFGMEMB = 0xc028698a SIOCGIFGROUP = 0xc0286988 SIOCGIFHARDMTU = 0xc02069a5 SIOCGIFLLPRIO = 0xc02069b6 SIOCGIFMEDIA = 0xc0406938 SIOCGIFMETRIC = 0xc0206917 SIOCGIFMTU = 0xc020697e SIOCGIFNETMASK = 0xc0206925 SIOCGIFPAIR = 0xc02069b1 SIOCGIFPARENT = 0xc02069b3 SIOCGIFPRIORITY = 0xc020699c SIOCGIFRDOMAIN = 0xc02069a0 SIOCGIFRTLABEL = 0xc0206983 SIOCGIFRXR = 0x802069aa SIOCGIFSFFPAGE = 0xc1126939 SIOCGIFXFLAGS = 0xc020699e SIOCGLIFPHYADDR = 0xc218694b SIOCGLIFPHYDF = 0xc02069c2 SIOCGLIFPHYECN = 0xc02069c8 SIOCGLIFPHYRTABLE = 0xc02069a2 SIOCGLIFPHYTTL = 0xc02069a9 SIOCGPGRP = 0x40047309 SIOCGPWE3 = 0xc0206998 SIOCGPWE3CTRLWORD = 0xc02069dc SIOCGPWE3FAT = 0xc02069dd SIOCGPWE3NEIGHBOR = 0xc21869de SIOCGRXHPRIO = 0xc02069db SIOCGSPPPPARAMS = 0xc0206994 SIOCGTXHPRIO = 0xc02069c6 SIOCGUMBINFO = 0xc02069be SIOCGUMBPARAM = 0xc02069c0 SIOCGVH = 0xc02069f6 SIOCGVNETFLOWID = 0xc02069c4 SIOCGVNETID = 0xc02069a7 SIOCIFAFATTACH = 0x801169ab SIOCIFAFDETACH = 0x801169ac SIOCIFCREATE = 0x8020697a SIOCIFDESTROY = 0x80206979 SIOCIFGCLONERS = 0xc0106978 SIOCSETKALIVE = 0x801869a3 SIOCSETLABEL = 0x80206999 SIOCSETMPWCFG = 0x802069ad SIOCSETPFLOW = 0x802069fd SIOCSETPFSYNC = 0x802069f7 SIOCSETVLAN = 0x8020698f SIOCSIFADDR = 0x8020690c SIOCSIFBRDADDR = 0x80206913 SIOCSIFDESCR = 0x80206980 SIOCSIFDSTADDR = 0x8020690e SIOCSIFFLAGS = 0x80206910 SIOCSIFGATTR = 0x8028698c SIOCSIFGENERIC = 0x80206939 SIOCSIFLLADDR = 0x8020691f SIOCSIFLLPRIO = 0x802069b5 SIOCSIFMEDIA = 0xc0206937 SIOCSIFMETRIC = 0x80206918 SIOCSIFMTU = 0x8020697f SIOCSIFNETMASK = 0x80206916 SIOCSIFPAIR = 0x802069b0 SIOCSIFPARENT = 0x802069b2 SIOCSIFPRIORITY = 0x8020699b SIOCSIFRDOMAIN = 0x8020699f SIOCSIFRTLABEL = 0x80206982 SIOCSIFXFLAGS = 0x8020699d SIOCSLIFPHYADDR = 0x8218694a SIOCSLIFPHYDF = 0x802069c1 SIOCSLIFPHYECN = 0x802069c7 SIOCSLIFPHYRTABLE = 0x802069a1 SIOCSLIFPHYTTL = 0x802069a8 SIOCSPGRP = 0x80047308 SIOCSPWE3CTRLWORD = 0x802069dc SIOCSPWE3FAT = 0x802069dd SIOCSPWE3NEIGHBOR = 0x821869de SIOCSRXHPRIO = 0x802069db SIOCSSPPPPARAMS = 0x80206993 SIOCSTXHPRIO = 0x802069c5 SIOCSUMBPARAM = 0x802069bf SIOCSVH = 0xc02069f5 SIOCSVNETFLOWID = 0x802069c3 SIOCSVNETID = 0x802069a6 SOCK_CLOEXEC = 0x8000 SOCK_DGRAM = 0x2 SOCK_DNS = 0x1000 SOCK_NONBLOCK = 0x4000 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_DOMAIN = 0x1024 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_NETPROC = 0x1020 SO_OOBINLINE = 0x100 SO_PEERCRED = 0x1022 SO_PROTOCOL = 0x1025 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 SO_ZEROIZE = 0x2000 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_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 TCIOFF = 0x3 TCIOFLUSH = 0x3 TCION = 0x4 TCOFLUSH = 0x2 TCOOFF = 0x1 TCOON = 0x2 TCPOPT_EOL = 0x0 TCPOPT_MAXSEG = 0x2 TCPOPT_NOP = 0x1 TCPOPT_SACK = 0x5 TCPOPT_SACK_HDR = 0x1010500 TCPOPT_SACK_PERMITTED = 0x4 TCPOPT_SACK_PERMIT_HDR = 0x1010402 TCPOPT_SIGNATURE = 0x13 TCPOPT_TIMESTAMP = 0x8 TCPOPT_TSTAMP_HDR = 0x101080a TCPOPT_WINDOW = 0x3 TCP_INFO = 0x9 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_SACKHOLE_LIMIT = 0x80 TCP_SACK_ENABLE = 0x8 TCSAFLUSH = 0x2 TIMER_ABSTIME = 0x1 TIMER_RELTIME = 0x0 TIOCCBRK = 0x2000747a TIOCCDTR = 0x20007478 TIOCCHKVERAUTH = 0x2000741e TIOCCLRVERAUTH = 0x2000741d 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 TIOCSETVERAUTH = 0x8004741c TIOCSFLAGS = 0x8004745c TIOCSIG = 0x8004745f TIOCSPGRP = 0x80047476 TIOCSTART = 0x2000746e TIOCSTAT = 0x20007465 TIOCSTOP = 0x2000746f TIOCSTSTAMP = 0x8008745a TIOCSWINSZ = 0x80087467 TIOCUCNTL = 0x80047466 TIOCUCNTL_CBRK = 0x7a TIOCUCNTL_SBRK = 0x7b TOSTOP = 0x400000 UTIME_NOW = -0x2 UTIME_OMIT = -0x1 VDISCARD = 0xf VDSUSP = 0xb VEOF = 0x0 VEOL = 0x1 VEOL2 = 0x2 VERASE = 0x3 VINTR = 0x8 VKILL = 0x5 VLNEXT = 0xe VMIN = 0x10 VM_ANONMIN = 0x7 VM_LOADAVG = 0x2 VM_MALLOC_CONF = 0xc VM_MAXID = 0xd VM_MAXSLP = 0xa VM_METER = 0x1 VM_NKMEMPAGES = 0x6 VM_PSSTRINGS = 0x3 VM_SWAPENCRYPT = 0x5 VM_USPACE = 0xb VM_UVMEXP = 0x4 VM_VNODEMIN = 0x9 VM_VTEXTMIN = 0x8 VQUIT = 0x9 VREPRINT = 0x6 VSTART = 0xc VSTATUS = 0x12 VSTOP = 0xd VSUSP = 0xa VTIME = 0x11 VWERASE = 0x4 WALTSIG = 0x4 WCONTINUED = 0x8 WCOREFLAG = 0x80 WNOHANG = 0x1 WUNTRACED = 0x2 XCASE = 0x1000000 ) // 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(0x5c) 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(0x5f) 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) ENOTRECOVERABLE = syscall.Errno(0x5d) ENOTSOCK = syscall.Errno(0x26) ENOTSUP = syscall.Errno(0x5b) ENOTTY = syscall.Errno(0x19) ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x2d) EOVERFLOW = syscall.Errno(0x57) EOWNERDEAD = syscall.Errno(0x5e) 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(0x5f) 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "device not configured"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EDEADLK", "resource deadlock avoided"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "cross-device link"}, {19, "ENODEV", "operation not supported by device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "result too large"}, {35, "EAGAIN", "resource temporarily unavailable"}, {36, "EINPROGRESS", "operation now in progress"}, {37, "EALREADY", "operation already in progress"}, {38, "ENOTSOCK", "socket operation on non-socket"}, {39, "EDESTADDRREQ", "destination address required"}, {40, "EMSGSIZE", "message too long"}, {41, "EPROTOTYPE", "protocol wrong type for socket"}, {42, "ENOPROTOOPT", "protocol not available"}, {43, "EPROTONOSUPPORT", "protocol not supported"}, {44, "ESOCKTNOSUPPORT", "socket type not supported"}, {45, "EOPNOTSUPP", "operation not supported"}, {46, "EPFNOSUPPORT", "protocol family not supported"}, {47, "EAFNOSUPPORT", "address family not supported by protocol family"}, {48, "EADDRINUSE", "address already in use"}, {49, "EADDRNOTAVAIL", "can't assign requested address"}, {50, "ENETDOWN", "network is down"}, {51, "ENETUNREACH", "network is unreachable"}, {52, "ENETRESET", "network dropped connection on reset"}, {53, "ECONNABORTED", "software caused connection abort"}, {54, "ECONNRESET", "connection reset by peer"}, {55, "ENOBUFS", "no buffer space available"}, {56, "EISCONN", "socket is already connected"}, {57, "ENOTCONN", "socket is not connected"}, {58, "ESHUTDOWN", "can't send after socket shutdown"}, {59, "ETOOMANYREFS", "too many references: can't splice"}, {60, "ETIMEDOUT", "operation timed out"}, {61, "ECONNREFUSED", "connection refused"}, {62, "ELOOP", "too many levels of symbolic links"}, {63, "ENAMETOOLONG", "file name too long"}, {64, "EHOSTDOWN", "host is down"}, {65, "EHOSTUNREACH", "no route to host"}, {66, "ENOTEMPTY", "directory not empty"}, {67, "EPROCLIM", "too many processes"}, {68, "EUSERS", "too many users"}, {69, "EDQUOT", "disk quota exceeded"}, {70, "ESTALE", "stale NFS file handle"}, {71, "EREMOTE", "too many levels of remote in path"}, {72, "EBADRPC", "RPC struct is bad"}, {73, "ERPCMISMATCH", "RPC version wrong"}, {74, "EPROGUNAVAIL", "RPC program not available"}, {75, "EPROGMISMATCH", "program version wrong"}, {76, "EPROCUNAVAIL", "bad procedure for program"}, {77, "ENOLCK", "no locks available"}, {78, "ENOSYS", "function not implemented"}, {79, "EFTYPE", "inappropriate file type or format"}, {80, "EAUTH", "authentication error"}, {81, "ENEEDAUTH", "need authenticator"}, {82, "EIPSEC", "IPsec processing failure"}, {83, "ENOATTR", "attribute not found"}, {84, "EILSEQ", "illegal byte sequence"}, {85, "ENOMEDIUM", "no medium found"}, {86, "EMEDIUMTYPE", "wrong medium type"}, {87, "EOVERFLOW", "value too large to be stored in data type"}, {88, "ECANCELED", "operation canceled"}, {89, "EIDRM", "identifier removed"}, {90, "ENOMSG", "no message of desired type"}, {91, "ENOTSUP", "not supported"}, {92, "EBADMSG", "bad message"}, {93, "ENOTRECOVERABLE", "state not recoverable"}, {94, "EOWNERDEAD", "previous owner died"}, {95, "ELAST", "protocol error"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, {6, "SIGIOT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGURG", "urgent I/O condition"}, {17, "SIGSTOP", "suspended (signal)"}, {18, "SIGTSTP", "suspended"}, {19, "SIGCONT", "continued"}, {20, "SIGCHLD", "child exited"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGIO", "I/O possible"}, {24, "SIGXCPU", "cputime limit exceeded"}, {25, "SIGXFSZ", "filesize limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window size changes"}, {29, "SIGINFO", "information request"}, {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGTHR", "thread AST"}, {81920, "SIGSTKSZ", "unknown signal"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_openbsd_ppc64.go ================================================ // mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64 && openbsd // Code generated by cmd/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 ALTWERASE = 0x200 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_FILDROP_CAPTURE = 0x1 BPF_FILDROP_DROP = 0x2 BPF_FILDROP_PASS = 0x0 BPF_F_DIR_IN = 0x10 BPF_F_DIR_MASK = 0x30 BPF_F_DIR_OUT = 0x20 BPF_F_DIR_SHIFT = 0x4 BPF_F_FLOWID = 0x8 BPF_F_PRI_MASK = 0x7 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_RND = 0xc0 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 CLOCK_BOOTTIME = 0x6 CLOCK_MONOTONIC = 0x3 CLOCK_PROCESS_CPUTIME_ID = 0x2 CLOCK_REALTIME = 0x0 CLOCK_THREAD_CPUTIME_ID = 0x4 CLOCK_UPTIME = 0x5 CPUSTATES = 0x6 CP_IDLE = 0x5 CP_INTR = 0x4 CP_NICE = 0x1 CP_SPIN = 0x3 CP_SYS = 0x2 CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x10000 CS5 = 0x0 CS6 = 0x100 CS7 = 0x200 CS8 = 0x300 CSIZE = 0x300 CSTART = 0x11 CSTATUS = 0xff CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a CTL_HW = 0x6 CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 DIOCADDQUEUE = 0xc110445d DIOCADDRULE = 0xcd604404 DIOCADDSTATE = 0xc1084425 DIOCCHANGERULE = 0xcd60441a DIOCCLRIFFLAG = 0xc028445a DIOCCLRSRCNODES = 0x20004455 DIOCCLRSTATES = 0xc0e04412 DIOCCLRSTATUS = 0xc0284416 DIOCGETLIMIT = 0xc0084427 DIOCGETQSTATS = 0xc1204460 DIOCGETQUEUE = 0xc110445f DIOCGETQUEUES = 0xc110445e DIOCGETRULE = 0xcd604407 DIOCGETRULES = 0xcd604406 DIOCGETRULESET = 0xc444443b DIOCGETRULESETS = 0xc444443a DIOCGETSRCNODES = 0xc0104454 DIOCGETSTATE = 0xc1084413 DIOCGETSTATES = 0xc0104419 DIOCGETSTATUS = 0xc1e84415 DIOCGETSYNFLWATS = 0xc0084463 DIOCGETTIMEOUT = 0xc008441e DIOCIGETIFACES = 0xc0284457 DIOCKILLSRCNODES = 0xc080445b DIOCKILLSTATES = 0xc0e04429 DIOCNATLOOK = 0xc0504417 DIOCOSFPADD = 0xc088444f DIOCOSFPFLUSH = 0x2000444e DIOCOSFPGET = 0xc0884450 DIOCRADDADDRS = 0xc4504443 DIOCRADDTABLES = 0xc450443d DIOCRCLRADDRS = 0xc4504442 DIOCRCLRASTATS = 0xc4504448 DIOCRCLRTABLES = 0xc450443c DIOCRCLRTSTATS = 0xc4504441 DIOCRDELADDRS = 0xc4504444 DIOCRDELTABLES = 0xc450443e DIOCRGETADDRS = 0xc4504446 DIOCRGETASTATS = 0xc4504447 DIOCRGETTABLES = 0xc450443f DIOCRGETTSTATS = 0xc4504440 DIOCRINADEFINE = 0xc450444d DIOCRSETADDRS = 0xc4504445 DIOCRSETTFLAGS = 0xc450444a DIOCRTSTADDRS = 0xc4504449 DIOCSETDEBUG = 0xc0044418 DIOCSETHOSTID = 0xc0044456 DIOCSETIFFLAG = 0xc0284459 DIOCSETLIMIT = 0xc0084428 DIOCSETREASS = 0xc004445c DIOCSETSTATUSIF = 0xc0284414 DIOCSETSYNCOOKIES = 0xc0014462 DIOCSETSYNFLWATS = 0xc0084461 DIOCSETTIMEOUT = 0xc008441d DIOCSTART = 0x20004401 DIOCSTOP = 0x20004402 DIOCXBEGIN = 0xc0104451 DIOCXCOMMIT = 0xc0104452 DIOCXROLLBACK = 0xc0104453 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_OPENFLOW = 0x10b 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 DLT_USBPCAP = 0xf9 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 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 ETH64_8021_RSVD_MASK = 0xfffffffffff0 ETH64_8021_RSVD_PREFIX = 0x180c2000000 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_EAPOL = 0x888e 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_MACSEC = 0x88e5 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_NHRP = 0x2001 ETHERTYPE_NOVELL = 0x8138 ETHERTYPE_NS = 0x600 ETHERTYPE_NSAT = 0x601 ETHERTYPE_NSCOMPAT = 0x807 ETHERTYPE_NSH = 0x984f ETHERTYPE_NTRAILER = 0x10 ETHERTYPE_OS9 = 0x7007 ETHERTYPE_OS9NET = 0x7009 ETHERTYPE_PACER = 0x80c6 ETHERTYPE_PBB = 0x88e7 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_HARDMTU_LEN = 0xff9b ETHER_MAX_LEN = 0x5ee ETHER_MIN_LEN = 0x40 ETHER_TYPE_LEN = 0x2 ETHER_VLAN_ENCAP_LEN = 0x4 EVFILT_AIO = -0x3 EVFILT_DEVICE = -0x8 EVFILT_EXCEPT = -0x9 EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 EVFILT_SYSCOUNT = 0x9 EVFILT_TIMER = -0x7 EVFILT_VNODE = -0x4 EVFILT_WRITE = -0x2 EVL_ENCAPLEN = 0x4 EVL_PRIO_BITS = 0xd EVL_PRIO_MAX = 0x7 EVL_VLID_MASK = 0xfff EVL_VLID_MAX = 0xffe EVL_VLID_MIN = 0x1 EVL_VLID_NULL = 0x0 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_FLAG1 = 0x2000 EV_ONESHOT = 0x10 EV_RECEIPT = 0x40 EV_SYSFLAGS = 0xf800 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_ISATTY = 0xb 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 HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 IEXTEN = 0x400 IFAN_ARRIVAL = 0x0 IFAN_DEPARTURE = 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_OACTIVE = 0x400 IFF_POINTOPOINT = 0x10 IFF_PROMISC = 0x100 IFF_RUNNING = 0x40 IFF_SIMPLEX = 0x800 IFF_STATICARP = 0x20 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_MBIM = 0xfa 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_WIREGUARD = 0xfb 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_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_SCTP = 0x84 IPPROTO_TCP = 0x6 IPPROTO_TP = 0x1d IPPROTO_UDP = 0x11 IPPROTO_UDPLITE = 0x88 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 = 0xfffffff IPV6_FLOWLABEL_MASK = 0xfffff 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_MINHOPCOUNT = 0x41 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_DROP_MEMBERSHIP = 0xd IP_ESP_NETWORK_LEVEL = 0x16 IP_ESP_TRANS_LEVEL = 0x15 IP_HDRINCL = 0x2 IP_IPCOMP_LEVEL = 0x1d IP_IPDEFTTL = 0x25 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_SENDSRCADDR = 0x7 IP_TOS = 0x3 IP_TTL = 0x4 ISIG = 0x80 ISTRIP = 0x20 ITIMER_PROF = 0x2 ITIMER_REAL = 0x0 ITIMER_VIRTUAL = 0x1 IUCLC = 0x1000 IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 KERN_HOSTNAME = 0xa KERN_OSRELEASE = 0x2 KERN_OSTYPE = 0x1 KERN_VERSION = 0x4 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_ANONYMOUS = 0x1000 MAP_CONCEAL = 0x8000 MAP_COPY = 0x2 MAP_FILE = 0x0 MAP_FIXED = 0x10 MAP_FLAGMASK = 0xfff7 MAP_HASSEMAPHORE = 0x0 MAP_INHERIT = 0x0 MAP_INHERIT_COPY = 0x1 MAP_INHERIT_NONE = 0x2 MAP_INHERIT_SHARE = 0x0 MAP_INHERIT_ZERO = 0x3 MAP_NOEXTEND = 0x0 MAP_NORESERVE = 0x0 MAP_PRIVATE = 0x2 MAP_RENAME = 0x0 MAP_SHARED = 0x1 MAP_STACK = 0x4000 MAP_TRYFIXED = 0x0 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MNT_ASYNC = 0x40 MNT_DEFEXPORTED = 0x200 MNT_DELEXPORT = 0x20000 MNT_DOOMED = 0x8000000 MNT_EXPORTANON = 0x400 MNT_EXPORTED = 0x100 MNT_EXRDONLY = 0x80 MNT_FORCE = 0x80000 MNT_LAZY = 0x3 MNT_LOCAL = 0x1000 MNT_NOATIME = 0x8000 MNT_NODEV = 0x10 MNT_NOEXEC = 0x4 MNT_NOPERM = 0x20 MNT_NOSUID = 0x8 MNT_NOWAIT = 0x2 MNT_QUOTA = 0x2000 MNT_RDONLY = 0x1 MNT_RELOAD = 0x40000 MNT_ROOTFS = 0x4000 MNT_SOFTDEP = 0x4000000 MNT_STALLED = 0x100000 MNT_SWAPPABLE = 0x200000 MNT_SYNCHRONOUS = 0x2 MNT_UPDATE = 0x10000 MNT_VISFLAGMASK = 0x400ffff MNT_WAIT = 0x1 MNT_WANTRDWR = 0x2000000 MNT_WXALLOWED = 0x800 MOUNT_AFS = "afs" MOUNT_CD9660 = "cd9660" MOUNT_EXT2FS = "ext2fs" MOUNT_FFS = "ffs" MOUNT_FUSEFS = "fuse" MOUNT_MFS = "mfs" MOUNT_MSDOS = "msdos" MOUNT_NCPFS = "ncpfs" MOUNT_NFS = "nfs" MOUNT_NTFS = "ntfs" MOUNT_TMPFS = "tmpfs" MOUNT_UDF = "udf" MOUNT_UFS = "ffs" MSG_BCAST = 0x100 MSG_CMSG_CLOEXEC = 0x800 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 MSG_WAITFORONE = 0x1000 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_IFNAMES = 0x6 NET_RT_MAXID = 0x8 NET_RT_SOURCE = 0x7 NET_RT_STATS = 0x4 NET_RT_TABLE = 0x5 NFDBITS = 0x20 NOFLSH = 0x80000000 NOKERNINFO = 0x2000000 NOTE_ATTRIB = 0x8 NOTE_CHANGE = 0x1 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_OOB = 0x4 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 OLCUC = 0x20 ONLCR = 0x2 ONLRET = 0x80 ONOCR = 0x40 ONOEOT = 0x8 OPOST = 0x1 OXTABS = 0x4 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_MEMLOCK = 0x6 RLIMIT_NOFILE = 0x8 RLIMIT_NPROC = 0x7 RLIMIT_RSS = 0x5 RLIMIT_STACK = 0x3 RLIM_INFINITY = 0x7fffffffffffffff RTAX_AUTHOR = 0x6 RTAX_BFD = 0xb RTAX_BRD = 0x7 RTAX_DNS = 0xc RTAX_DST = 0x0 RTAX_GATEWAY = 0x1 RTAX_GENMASK = 0x3 RTAX_IFA = 0x5 RTAX_IFP = 0x4 RTAX_LABEL = 0xa RTAX_MAX = 0xf RTAX_NETMASK = 0x2 RTAX_SEARCH = 0xe RTAX_SRC = 0x8 RTAX_SRCMASK = 0x9 RTAX_STATIC = 0xd RTA_AUTHOR = 0x40 RTA_BFD = 0x800 RTA_BRD = 0x80 RTA_DNS = 0x1000 RTA_DST = 0x1 RTA_GATEWAY = 0x2 RTA_GENMASK = 0x8 RTA_IFA = 0x20 RTA_IFP = 0x10 RTA_LABEL = 0x400 RTA_NETMASK = 0x4 RTA_SEARCH = 0x4000 RTA_SRC = 0x100 RTA_SRCMASK = 0x200 RTA_STATIC = 0x2000 RTF_ANNOUNCE = 0x4000 RTF_BFD = 0x1000000 RTF_BLACKHOLE = 0x1000 RTF_BROADCAST = 0x400000 RTF_CACHED = 0x20000 RTF_CLONED = 0x10000 RTF_CLONING = 0x100 RTF_CONNECTED = 0x800000 RTF_DONE = 0x40 RTF_DYNAMIC = 0x10 RTF_FMASK = 0x110fc08 RTF_GATEWAY = 0x2 RTF_HOST = 0x4 RTF_LLINFO = 0x400 RTF_LOCAL = 0x200000 RTF_MODIFIED = 0x20 RTF_MPATH = 0x40000 RTF_MPLS = 0x100000 RTF_MULTICAST = 0x200 RTF_PERMANENT_ARP = 0x2000 RTF_PROTO1 = 0x8000 RTF_PROTO2 = 0x4000 RTF_PROTO3 = 0x2000 RTF_REJECT = 0x8 RTF_STATIC = 0x800 RTF_UP = 0x1 RTF_USETRAILERS = 0x8000 RTM_80211INFO = 0x15 RTM_ADD = 0x1 RTM_BFD = 0x12 RTM_CHANGE = 0x3 RTM_CHGADDRATTR = 0x14 RTM_DELADDR = 0xd RTM_DELETE = 0x2 RTM_DESYNC = 0x10 RTM_GET = 0x4 RTM_IFANNOUNCE = 0xf RTM_IFINFO = 0xe RTM_INVALIDATE = 0x11 RTM_LOSING = 0x5 RTM_MAXSIZE = 0x800 RTM_MISS = 0x7 RTM_NEWADDR = 0xc RTM_PROPOSAL = 0x13 RTM_REDIRECT = 0x6 RTM_RESOLVE = 0xb RTM_SOURCE = 0x16 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_BITS = 0x8 RT_TABLEID_MASK = 0xff RT_TABLEID_MAX = 0xff RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 RUSAGE_THREAD = 0x1 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x4 SEEK_CUR = 0x1 SEEK_END = 0x2 SEEK_SET = 0x0 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 SIOCADDMULTI = 0x80206931 SIOCAIFADDR = 0x8040691a SIOCAIFGROUP = 0x80286987 SIOCATMARK = 0x40047307 SIOCBRDGADD = 0x8060693c SIOCBRDGADDL = 0x80606949 SIOCBRDGADDS = 0x80606941 SIOCBRDGARL = 0x808c694d SIOCBRDGDADDR = 0x81286947 SIOCBRDGDEL = 0x8060693d SIOCBRDGDELS = 0x80606942 SIOCBRDGFLUSH = 0x80606948 SIOCBRDGFRL = 0x808c694e SIOCBRDGGCACHE = 0xc0146941 SIOCBRDGGFD = 0xc0146952 SIOCBRDGGHT = 0xc0146951 SIOCBRDGGIFFLGS = 0xc060693e SIOCBRDGGMA = 0xc0146953 SIOCBRDGGPARAM = 0xc0406958 SIOCBRDGGPRI = 0xc0146950 SIOCBRDGGRL = 0xc030694f SIOCBRDGGTO = 0xc0146946 SIOCBRDGIFS = 0xc0606942 SIOCBRDGRTS = 0xc0206943 SIOCBRDGSADDR = 0xc1286944 SIOCBRDGSCACHE = 0x80146940 SIOCBRDGSFD = 0x80146952 SIOCBRDGSHT = 0x80146951 SIOCBRDGSIFCOST = 0x80606955 SIOCBRDGSIFFLGS = 0x8060693f SIOCBRDGSIFPRIO = 0x80606954 SIOCBRDGSIFPROT = 0x8060694a SIOCBRDGSMA = 0x80146953 SIOCBRDGSPRI = 0x80146950 SIOCBRDGSPROTO = 0x8014695a SIOCBRDGSTO = 0x80146945 SIOCBRDGSTXHC = 0x80146959 SIOCDELLABEL = 0x80206997 SIOCDELMULTI = 0x80206932 SIOCDIFADDR = 0x80206919 SIOCDIFGROUP = 0x80286989 SIOCDIFPARENT = 0x802069b4 SIOCDIFPHYADDR = 0x80206949 SIOCDPWE3NEIGHBOR = 0x802069de SIOCDVNETID = 0x802069af SIOCGETKALIVE = 0xc01869a4 SIOCGETLABEL = 0x8020699a SIOCGETMPWCFG = 0xc02069ae SIOCGETPFLOW = 0xc02069fe SIOCGETPFSYNC = 0xc02069f8 SIOCGETSGCNT = 0xc0207534 SIOCGETVIFCNT = 0xc0287533 SIOCGETVLAN = 0xc0206990 SIOCGIFADDR = 0xc0206921 SIOCGIFBRDADDR = 0xc0206923 SIOCGIFCONF = 0xc0106924 SIOCGIFDATA = 0xc020691b SIOCGIFDESCR = 0xc0206981 SIOCGIFDSTADDR = 0xc0206922 SIOCGIFFLAGS = 0xc0206911 SIOCGIFGATTR = 0xc028698b SIOCGIFGENERIC = 0xc020693a SIOCGIFGLIST = 0xc028698d SIOCGIFGMEMB = 0xc028698a SIOCGIFGROUP = 0xc0286988 SIOCGIFHARDMTU = 0xc02069a5 SIOCGIFLLPRIO = 0xc02069b6 SIOCGIFMEDIA = 0xc0406938 SIOCGIFMETRIC = 0xc0206917 SIOCGIFMTU = 0xc020697e SIOCGIFNETMASK = 0xc0206925 SIOCGIFPAIR = 0xc02069b1 SIOCGIFPARENT = 0xc02069b3 SIOCGIFPRIORITY = 0xc020699c SIOCGIFRDOMAIN = 0xc02069a0 SIOCGIFRTLABEL = 0xc0206983 SIOCGIFRXR = 0x802069aa SIOCGIFSFFPAGE = 0xc1126939 SIOCGIFXFLAGS = 0xc020699e SIOCGLIFPHYADDR = 0xc218694b SIOCGLIFPHYDF = 0xc02069c2 SIOCGLIFPHYECN = 0xc02069c8 SIOCGLIFPHYRTABLE = 0xc02069a2 SIOCGLIFPHYTTL = 0xc02069a9 SIOCGPGRP = 0x40047309 SIOCGPWE3 = 0xc0206998 SIOCGPWE3CTRLWORD = 0xc02069dc SIOCGPWE3FAT = 0xc02069dd SIOCGPWE3NEIGHBOR = 0xc21869de SIOCGRXHPRIO = 0xc02069db SIOCGSPPPPARAMS = 0xc0206994 SIOCGTXHPRIO = 0xc02069c6 SIOCGUMBINFO = 0xc02069be SIOCGUMBPARAM = 0xc02069c0 SIOCGVH = 0xc02069f6 SIOCGVNETFLOWID = 0xc02069c4 SIOCGVNETID = 0xc02069a7 SIOCIFAFATTACH = 0x801169ab SIOCIFAFDETACH = 0x801169ac SIOCIFCREATE = 0x8020697a SIOCIFDESTROY = 0x80206979 SIOCIFGCLONERS = 0xc0106978 SIOCSETKALIVE = 0x801869a3 SIOCSETLABEL = 0x80206999 SIOCSETMPWCFG = 0x802069ad SIOCSETPFLOW = 0x802069fd SIOCSETPFSYNC = 0x802069f7 SIOCSETVLAN = 0x8020698f SIOCSIFADDR = 0x8020690c SIOCSIFBRDADDR = 0x80206913 SIOCSIFDESCR = 0x80206980 SIOCSIFDSTADDR = 0x8020690e SIOCSIFFLAGS = 0x80206910 SIOCSIFGATTR = 0x8028698c SIOCSIFGENERIC = 0x80206939 SIOCSIFLLADDR = 0x8020691f SIOCSIFLLPRIO = 0x802069b5 SIOCSIFMEDIA = 0xc0206937 SIOCSIFMETRIC = 0x80206918 SIOCSIFMTU = 0x8020697f SIOCSIFNETMASK = 0x80206916 SIOCSIFPAIR = 0x802069b0 SIOCSIFPARENT = 0x802069b2 SIOCSIFPRIORITY = 0x8020699b SIOCSIFRDOMAIN = 0x8020699f SIOCSIFRTLABEL = 0x80206982 SIOCSIFXFLAGS = 0x8020699d SIOCSLIFPHYADDR = 0x8218694a SIOCSLIFPHYDF = 0x802069c1 SIOCSLIFPHYECN = 0x802069c7 SIOCSLIFPHYRTABLE = 0x802069a1 SIOCSLIFPHYTTL = 0x802069a8 SIOCSPGRP = 0x80047308 SIOCSPWE3CTRLWORD = 0x802069dc SIOCSPWE3FAT = 0x802069dd SIOCSPWE3NEIGHBOR = 0x821869de SIOCSRXHPRIO = 0x802069db SIOCSSPPPPARAMS = 0x80206993 SIOCSTXHPRIO = 0x802069c5 SIOCSUMBPARAM = 0x802069bf SIOCSVH = 0xc02069f5 SIOCSVNETFLOWID = 0x802069c3 SIOCSVNETID = 0x802069a6 SOCK_CLOEXEC = 0x8000 SOCK_DGRAM = 0x2 SOCK_DNS = 0x1000 SOCK_NONBLOCK = 0x4000 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_DOMAIN = 0x1024 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_NETPROC = 0x1020 SO_OOBINLINE = 0x100 SO_PEERCRED = 0x1022 SO_PROTOCOL = 0x1025 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 SO_ZEROIZE = 0x2000 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_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 TCIOFF = 0x3 TCIOFLUSH = 0x3 TCION = 0x4 TCOFLUSH = 0x2 TCOOFF = 0x1 TCOON = 0x2 TCPOPT_EOL = 0x0 TCPOPT_MAXSEG = 0x2 TCPOPT_NOP = 0x1 TCPOPT_SACK = 0x5 TCPOPT_SACK_HDR = 0x1010500 TCPOPT_SACK_PERMITTED = 0x4 TCPOPT_SACK_PERMIT_HDR = 0x1010402 TCPOPT_SIGNATURE = 0x13 TCPOPT_TIMESTAMP = 0x8 TCPOPT_TSTAMP_HDR = 0x101080a TCPOPT_WINDOW = 0x3 TCP_INFO = 0x9 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_SACKHOLE_LIMIT = 0x80 TCP_SACK_ENABLE = 0x8 TCSAFLUSH = 0x2 TIMER_ABSTIME = 0x1 TIMER_RELTIME = 0x0 TIOCCBRK = 0x2000747a TIOCCDTR = 0x20007478 TIOCCHKVERAUTH = 0x2000741e TIOCCLRVERAUTH = 0x2000741d 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 TIOCSETVERAUTH = 0x8004741c TIOCSFLAGS = 0x8004745c TIOCSIG = 0x8004745f TIOCSPGRP = 0x80047476 TIOCSTART = 0x2000746e TIOCSTAT = 0x20007465 TIOCSTOP = 0x2000746f TIOCSTSTAMP = 0x8008745a TIOCSWINSZ = 0x80087467 TIOCUCNTL = 0x80047466 TIOCUCNTL_CBRK = 0x7a TIOCUCNTL_SBRK = 0x7b TOSTOP = 0x400000 UTIME_NOW = -0x2 UTIME_OMIT = -0x1 VDISCARD = 0xf VDSUSP = 0xb VEOF = 0x0 VEOL = 0x1 VEOL2 = 0x2 VERASE = 0x3 VINTR = 0x8 VKILL = 0x5 VLNEXT = 0xe VMIN = 0x10 VM_ANONMIN = 0x7 VM_LOADAVG = 0x2 VM_MALLOC_CONF = 0xc VM_MAXID = 0xd VM_MAXSLP = 0xa VM_METER = 0x1 VM_NKMEMPAGES = 0x6 VM_PSSTRINGS = 0x3 VM_SWAPENCRYPT = 0x5 VM_USPACE = 0xb VM_UVMEXP = 0x4 VM_VNODEMIN = 0x9 VM_VTEXTMIN = 0x8 VQUIT = 0x9 VREPRINT = 0x6 VSTART = 0xc VSTATUS = 0x12 VSTOP = 0xd VSUSP = 0xa VTIME = 0x11 VWERASE = 0x4 WALTSIG = 0x4 WCONTINUED = 0x8 WCOREFLAG = 0x80 WNOHANG = 0x1 WUNTRACED = 0x2 XCASE = 0x1000000 ) // 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(0x5c) 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(0x5f) 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) ENOTRECOVERABLE = syscall.Errno(0x5d) ENOTSOCK = syscall.Errno(0x26) ENOTSUP = syscall.Errno(0x5b) ENOTTY = syscall.Errno(0x19) ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x2d) EOVERFLOW = syscall.Errno(0x57) EOWNERDEAD = syscall.Errno(0x5e) 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(0x5f) 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "device not configured"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EDEADLK", "resource deadlock avoided"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "cross-device link"}, {19, "ENODEV", "operation not supported by device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "result too large"}, {35, "EAGAIN", "resource temporarily unavailable"}, {36, "EINPROGRESS", "operation now in progress"}, {37, "EALREADY", "operation already in progress"}, {38, "ENOTSOCK", "socket operation on non-socket"}, {39, "EDESTADDRREQ", "destination address required"}, {40, "EMSGSIZE", "message too long"}, {41, "EPROTOTYPE", "protocol wrong type for socket"}, {42, "ENOPROTOOPT", "protocol not available"}, {43, "EPROTONOSUPPORT", "protocol not supported"}, {44, "ESOCKTNOSUPPORT", "socket type not supported"}, {45, "EOPNOTSUPP", "operation not supported"}, {46, "EPFNOSUPPORT", "protocol family not supported"}, {47, "EAFNOSUPPORT", "address family not supported by protocol family"}, {48, "EADDRINUSE", "address already in use"}, {49, "EADDRNOTAVAIL", "can't assign requested address"}, {50, "ENETDOWN", "network is down"}, {51, "ENETUNREACH", "network is unreachable"}, {52, "ENETRESET", "network dropped connection on reset"}, {53, "ECONNABORTED", "software caused connection abort"}, {54, "ECONNRESET", "connection reset by peer"}, {55, "ENOBUFS", "no buffer space available"}, {56, "EISCONN", "socket is already connected"}, {57, "ENOTCONN", "socket is not connected"}, {58, "ESHUTDOWN", "can't send after socket shutdown"}, {59, "ETOOMANYREFS", "too many references: can't splice"}, {60, "ETIMEDOUT", "operation timed out"}, {61, "ECONNREFUSED", "connection refused"}, {62, "ELOOP", "too many levels of symbolic links"}, {63, "ENAMETOOLONG", "file name too long"}, {64, "EHOSTDOWN", "host is down"}, {65, "EHOSTUNREACH", "no route to host"}, {66, "ENOTEMPTY", "directory not empty"}, {67, "EPROCLIM", "too many processes"}, {68, "EUSERS", "too many users"}, {69, "EDQUOT", "disk quota exceeded"}, {70, "ESTALE", "stale NFS file handle"}, {71, "EREMOTE", "too many levels of remote in path"}, {72, "EBADRPC", "RPC struct is bad"}, {73, "ERPCMISMATCH", "RPC version wrong"}, {74, "EPROGUNAVAIL", "RPC program not available"}, {75, "EPROGMISMATCH", "program version wrong"}, {76, "EPROCUNAVAIL", "bad procedure for program"}, {77, "ENOLCK", "no locks available"}, {78, "ENOSYS", "function not implemented"}, {79, "EFTYPE", "inappropriate file type or format"}, {80, "EAUTH", "authentication error"}, {81, "ENEEDAUTH", "need authenticator"}, {82, "EIPSEC", "IPsec processing failure"}, {83, "ENOATTR", "attribute not found"}, {84, "EILSEQ", "illegal byte sequence"}, {85, "ENOMEDIUM", "no medium found"}, {86, "EMEDIUMTYPE", "wrong medium type"}, {87, "EOVERFLOW", "value too large to be stored in data type"}, {88, "ECANCELED", "operation canceled"}, {89, "EIDRM", "identifier removed"}, {90, "ENOMSG", "no message of desired type"}, {91, "ENOTSUP", "not supported"}, {92, "EBADMSG", "bad message"}, {93, "ENOTRECOVERABLE", "state not recoverable"}, {94, "EOWNERDEAD", "previous owner died"}, {95, "ELAST", "protocol error"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, {6, "SIGABRT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGURG", "urgent I/O condition"}, {17, "SIGSTOP", "suspended (signal)"}, {18, "SIGTSTP", "suspended"}, {19, "SIGCONT", "continued"}, {20, "SIGCHLD", "child exited"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGIO", "I/O possible"}, {24, "SIGXCPU", "cputime limit exceeded"}, {25, "SIGXFSZ", "filesize limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window size changes"}, {29, "SIGINFO", "information request"}, {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGTHR", "thread AST"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_openbsd_riscv64.go ================================================ // mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && openbsd // Code generated by cmd/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 ALTWERASE = 0x200 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_FILDROP_CAPTURE = 0x1 BPF_FILDROP_DROP = 0x2 BPF_FILDROP_PASS = 0x0 BPF_F_DIR_IN = 0x10 BPF_F_DIR_MASK = 0x30 BPF_F_DIR_OUT = 0x20 BPF_F_DIR_SHIFT = 0x4 BPF_F_FLOWID = 0x8 BPF_F_PRI_MASK = 0x7 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_RND = 0xc0 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 CLOCK_BOOTTIME = 0x6 CLOCK_MONOTONIC = 0x3 CLOCK_PROCESS_CPUTIME_ID = 0x2 CLOCK_REALTIME = 0x0 CLOCK_THREAD_CPUTIME_ID = 0x4 CLOCK_UPTIME = 0x5 CPUSTATES = 0x6 CP_IDLE = 0x5 CP_INTR = 0x4 CP_NICE = 0x1 CP_SPIN = 0x3 CP_SYS = 0x2 CP_USER = 0x0 CREAD = 0x800 CRTSCTS = 0x10000 CS5 = 0x0 CS6 = 0x100 CS7 = 0x200 CS8 = 0x300 CSIZE = 0x300 CSTART = 0x11 CSTATUS = 0xff CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a CTL_HW = 0x6 CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 DIOCADDQUEUE = 0xc110445d DIOCADDRULE = 0xcd604404 DIOCADDSTATE = 0xc1084425 DIOCCHANGERULE = 0xcd60441a DIOCCLRIFFLAG = 0xc028445a DIOCCLRSRCNODES = 0x20004455 DIOCCLRSTATES = 0xc0e04412 DIOCCLRSTATUS = 0xc0284416 DIOCGETLIMIT = 0xc0084427 DIOCGETQSTATS = 0xc1204460 DIOCGETQUEUE = 0xc110445f DIOCGETQUEUES = 0xc110445e DIOCGETRULE = 0xcd604407 DIOCGETRULES = 0xcd604406 DIOCGETRULESET = 0xc444443b DIOCGETRULESETS = 0xc444443a DIOCGETSRCNODES = 0xc0104454 DIOCGETSTATE = 0xc1084413 DIOCGETSTATES = 0xc0104419 DIOCGETSTATUS = 0xc1e84415 DIOCGETSYNFLWATS = 0xc0084463 DIOCGETTIMEOUT = 0xc008441e DIOCIGETIFACES = 0xc0284457 DIOCKILLSRCNODES = 0xc080445b DIOCKILLSTATES = 0xc0e04429 DIOCNATLOOK = 0xc0504417 DIOCOSFPADD = 0xc088444f DIOCOSFPFLUSH = 0x2000444e DIOCOSFPGET = 0xc0884450 DIOCRADDADDRS = 0xc4504443 DIOCRADDTABLES = 0xc450443d DIOCRCLRADDRS = 0xc4504442 DIOCRCLRASTATS = 0xc4504448 DIOCRCLRTABLES = 0xc450443c DIOCRCLRTSTATS = 0xc4504441 DIOCRDELADDRS = 0xc4504444 DIOCRDELTABLES = 0xc450443e DIOCRGETADDRS = 0xc4504446 DIOCRGETASTATS = 0xc4504447 DIOCRGETTABLES = 0xc450443f DIOCRGETTSTATS = 0xc4504440 DIOCRINADEFINE = 0xc450444d DIOCRSETADDRS = 0xc4504445 DIOCRSETTFLAGS = 0xc450444a DIOCRTSTADDRS = 0xc4504449 DIOCSETDEBUG = 0xc0044418 DIOCSETHOSTID = 0xc0044456 DIOCSETIFFLAG = 0xc0284459 DIOCSETLIMIT = 0xc0084428 DIOCSETREASS = 0xc004445c DIOCSETSTATUSIF = 0xc0284414 DIOCSETSYNCOOKIES = 0xc0014462 DIOCSETSYNFLWATS = 0xc0084461 DIOCSETTIMEOUT = 0xc008441d DIOCSTART = 0x20004401 DIOCSTOP = 0x20004402 DIOCXBEGIN = 0xc0104451 DIOCXCOMMIT = 0xc0104452 DIOCXROLLBACK = 0xc0104453 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_OPENFLOW = 0x10b 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 DLT_USBPCAP = 0xf9 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 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 ETH64_8021_RSVD_MASK = 0xfffffffffff0 ETH64_8021_RSVD_PREFIX = 0x180c2000000 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_EAPOL = 0x888e 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_MACSEC = 0x88e5 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_NHRP = 0x2001 ETHERTYPE_NOVELL = 0x8138 ETHERTYPE_NS = 0x600 ETHERTYPE_NSAT = 0x601 ETHERTYPE_NSCOMPAT = 0x807 ETHERTYPE_NSH = 0x984f ETHERTYPE_NTRAILER = 0x10 ETHERTYPE_OS9 = 0x7007 ETHERTYPE_OS9NET = 0x7009 ETHERTYPE_PACER = 0x80c6 ETHERTYPE_PBB = 0x88e7 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_HARDMTU_LEN = 0xff9b ETHER_MAX_LEN = 0x5ee ETHER_MIN_LEN = 0x40 ETHER_TYPE_LEN = 0x2 ETHER_VLAN_ENCAP_LEN = 0x4 EVFILT_AIO = -0x3 EVFILT_DEVICE = -0x8 EVFILT_EXCEPT = -0x9 EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 EVFILT_SYSCOUNT = 0x9 EVFILT_TIMER = -0x7 EVFILT_VNODE = -0x4 EVFILT_WRITE = -0x2 EVL_ENCAPLEN = 0x4 EVL_PRIO_BITS = 0xd EVL_PRIO_MAX = 0x7 EVL_VLID_MASK = 0xfff EVL_VLID_MAX = 0xffe EVL_VLID_MIN = 0x1 EVL_VLID_NULL = 0x0 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_FLAG1 = 0x2000 EV_ONESHOT = 0x10 EV_RECEIPT = 0x40 EV_SYSFLAGS = 0xf800 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_ISATTY = 0xb 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 HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 IEXTEN = 0x400 IFAN_ARRIVAL = 0x0 IFAN_DEPARTURE = 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_OACTIVE = 0x400 IFF_POINTOPOINT = 0x10 IFF_PROMISC = 0x100 IFF_RUNNING = 0x40 IFF_SIMPLEX = 0x800 IFF_STATICARP = 0x20 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_MBIM = 0xfa 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_WIREGUARD = 0xfb 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_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_SCTP = 0x84 IPPROTO_TCP = 0x6 IPPROTO_TP = 0x1d IPPROTO_UDP = 0x11 IPPROTO_UDPLITE = 0x88 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_MINHOPCOUNT = 0x41 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_DROP_MEMBERSHIP = 0xd IP_ESP_NETWORK_LEVEL = 0x16 IP_ESP_TRANS_LEVEL = 0x15 IP_HDRINCL = 0x2 IP_IPCOMP_LEVEL = 0x1d IP_IPDEFTTL = 0x25 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_SENDSRCADDR = 0x7 IP_TOS = 0x3 IP_TTL = 0x4 ISIG = 0x80 ISTRIP = 0x20 ITIMER_PROF = 0x2 ITIMER_REAL = 0x0 ITIMER_VIRTUAL = 0x1 IUCLC = 0x1000 IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 KERN_HOSTNAME = 0xa KERN_OSRELEASE = 0x2 KERN_OSTYPE = 0x1 KERN_VERSION = 0x4 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_ANONYMOUS = 0x1000 MAP_CONCEAL = 0x8000 MAP_COPY = 0x2 MAP_FILE = 0x0 MAP_FIXED = 0x10 MAP_FLAGMASK = 0xfff7 MAP_HASSEMAPHORE = 0x0 MAP_INHERIT = 0x0 MAP_INHERIT_COPY = 0x1 MAP_INHERIT_NONE = 0x2 MAP_INHERIT_SHARE = 0x0 MAP_INHERIT_ZERO = 0x3 MAP_NOEXTEND = 0x0 MAP_NORESERVE = 0x0 MAP_PRIVATE = 0x2 MAP_RENAME = 0x0 MAP_SHARED = 0x1 MAP_STACK = 0x4000 MAP_TRYFIXED = 0x0 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MNT_ASYNC = 0x40 MNT_DEFEXPORTED = 0x200 MNT_DELEXPORT = 0x20000 MNT_DOOMED = 0x8000000 MNT_EXPORTANON = 0x400 MNT_EXPORTED = 0x100 MNT_EXRDONLY = 0x80 MNT_FORCE = 0x80000 MNT_LAZY = 0x3 MNT_LOCAL = 0x1000 MNT_NOATIME = 0x8000 MNT_NODEV = 0x10 MNT_NOEXEC = 0x4 MNT_NOPERM = 0x20 MNT_NOSUID = 0x8 MNT_NOWAIT = 0x2 MNT_QUOTA = 0x2000 MNT_RDONLY = 0x1 MNT_RELOAD = 0x40000 MNT_ROOTFS = 0x4000 MNT_SOFTDEP = 0x4000000 MNT_STALLED = 0x100000 MNT_SWAPPABLE = 0x200000 MNT_SYNCHRONOUS = 0x2 MNT_UPDATE = 0x10000 MNT_VISFLAGMASK = 0x400ffff MNT_WAIT = 0x1 MNT_WANTRDWR = 0x2000000 MNT_WXALLOWED = 0x800 MOUNT_AFS = "afs" MOUNT_CD9660 = "cd9660" MOUNT_EXT2FS = "ext2fs" MOUNT_FFS = "ffs" MOUNT_FUSEFS = "fuse" MOUNT_MFS = "mfs" MOUNT_MSDOS = "msdos" MOUNT_NCPFS = "ncpfs" MOUNT_NFS = "nfs" MOUNT_NTFS = "ntfs" MOUNT_TMPFS = "tmpfs" MOUNT_UDF = "udf" MOUNT_UFS = "ffs" MSG_BCAST = 0x100 MSG_CMSG_CLOEXEC = 0x800 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_IFNAMES = 0x6 NET_RT_MAXID = 0x8 NET_RT_SOURCE = 0x7 NET_RT_STATS = 0x4 NET_RT_TABLE = 0x5 NFDBITS = 0x20 NOFLSH = 0x80000000 NOKERNINFO = 0x2000000 NOTE_ATTRIB = 0x8 NOTE_CHANGE = 0x1 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_OOB = 0x4 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 OLCUC = 0x20 ONLCR = 0x2 ONLRET = 0x80 ONOCR = 0x40 ONOEOT = 0x8 OPOST = 0x1 OXTABS = 0x4 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_MEMLOCK = 0x6 RLIMIT_NOFILE = 0x8 RLIMIT_NPROC = 0x7 RLIMIT_RSS = 0x5 RLIMIT_STACK = 0x3 RLIM_INFINITY = 0x7fffffffffffffff RTAX_AUTHOR = 0x6 RTAX_BFD = 0xb RTAX_BRD = 0x7 RTAX_DNS = 0xc RTAX_DST = 0x0 RTAX_GATEWAY = 0x1 RTAX_GENMASK = 0x3 RTAX_IFA = 0x5 RTAX_IFP = 0x4 RTAX_LABEL = 0xa RTAX_MAX = 0xf RTAX_NETMASK = 0x2 RTAX_SEARCH = 0xe RTAX_SRC = 0x8 RTAX_SRCMASK = 0x9 RTAX_STATIC = 0xd RTA_AUTHOR = 0x40 RTA_BFD = 0x800 RTA_BRD = 0x80 RTA_DNS = 0x1000 RTA_DST = 0x1 RTA_GATEWAY = 0x2 RTA_GENMASK = 0x8 RTA_IFA = 0x20 RTA_IFP = 0x10 RTA_LABEL = 0x400 RTA_NETMASK = 0x4 RTA_SEARCH = 0x4000 RTA_SRC = 0x100 RTA_SRCMASK = 0x200 RTA_STATIC = 0x2000 RTF_ANNOUNCE = 0x4000 RTF_BFD = 0x1000000 RTF_BLACKHOLE = 0x1000 RTF_BROADCAST = 0x400000 RTF_CACHED = 0x20000 RTF_CLONED = 0x10000 RTF_CLONING = 0x100 RTF_CONNECTED = 0x800000 RTF_DONE = 0x40 RTF_DYNAMIC = 0x10 RTF_FMASK = 0x110fc08 RTF_GATEWAY = 0x2 RTF_HOST = 0x4 RTF_LLINFO = 0x400 RTF_LOCAL = 0x200000 RTF_MODIFIED = 0x20 RTF_MPATH = 0x40000 RTF_MPLS = 0x100000 RTF_MULTICAST = 0x200 RTF_PERMANENT_ARP = 0x2000 RTF_PROTO1 = 0x8000 RTF_PROTO2 = 0x4000 RTF_PROTO3 = 0x2000 RTF_REJECT = 0x8 RTF_STATIC = 0x800 RTF_UP = 0x1 RTF_USETRAILERS = 0x8000 RTM_80211INFO = 0x15 RTM_ADD = 0x1 RTM_BFD = 0x12 RTM_CHANGE = 0x3 RTM_CHGADDRATTR = 0x14 RTM_DELADDR = 0xd RTM_DELETE = 0x2 RTM_DESYNC = 0x10 RTM_GET = 0x4 RTM_IFANNOUNCE = 0xf RTM_IFINFO = 0xe RTM_INVALIDATE = 0x11 RTM_LOSING = 0x5 RTM_MAXSIZE = 0x800 RTM_MISS = 0x7 RTM_NEWADDR = 0xc RTM_PROPOSAL = 0x13 RTM_REDIRECT = 0x6 RTM_RESOLVE = 0xb RTM_SOURCE = 0x16 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_BITS = 0x8 RT_TABLEID_MASK = 0xff RT_TABLEID_MAX = 0xff RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 RUSAGE_THREAD = 0x1 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x4 SEEK_CUR = 0x1 SEEK_END = 0x2 SEEK_SET = 0x0 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 SIOCADDMULTI = 0x80206931 SIOCAIFADDR = 0x8040691a SIOCAIFGROUP = 0x80286987 SIOCATMARK = 0x40047307 SIOCBRDGADD = 0x8060693c SIOCBRDGADDL = 0x80606949 SIOCBRDGADDS = 0x80606941 SIOCBRDGARL = 0x808c694d SIOCBRDGDADDR = 0x81286947 SIOCBRDGDEL = 0x8060693d SIOCBRDGDELS = 0x80606942 SIOCBRDGFLUSH = 0x80606948 SIOCBRDGFRL = 0x808c694e SIOCBRDGGCACHE = 0xc0146941 SIOCBRDGGFD = 0xc0146952 SIOCBRDGGHT = 0xc0146951 SIOCBRDGGIFFLGS = 0xc060693e SIOCBRDGGMA = 0xc0146953 SIOCBRDGGPARAM = 0xc0406958 SIOCBRDGGPRI = 0xc0146950 SIOCBRDGGRL = 0xc030694f SIOCBRDGGTO = 0xc0146946 SIOCBRDGIFS = 0xc0606942 SIOCBRDGRTS = 0xc0206943 SIOCBRDGSADDR = 0xc1286944 SIOCBRDGSCACHE = 0x80146940 SIOCBRDGSFD = 0x80146952 SIOCBRDGSHT = 0x80146951 SIOCBRDGSIFCOST = 0x80606955 SIOCBRDGSIFFLGS = 0x8060693f SIOCBRDGSIFPRIO = 0x80606954 SIOCBRDGSIFPROT = 0x8060694a SIOCBRDGSMA = 0x80146953 SIOCBRDGSPRI = 0x80146950 SIOCBRDGSPROTO = 0x8014695a SIOCBRDGSTO = 0x80146945 SIOCBRDGSTXHC = 0x80146959 SIOCDELLABEL = 0x80206997 SIOCDELMULTI = 0x80206932 SIOCDIFADDR = 0x80206919 SIOCDIFGROUP = 0x80286989 SIOCDIFPARENT = 0x802069b4 SIOCDIFPHYADDR = 0x80206949 SIOCDPWE3NEIGHBOR = 0x802069de SIOCDVNETID = 0x802069af SIOCGETKALIVE = 0xc01869a4 SIOCGETLABEL = 0x8020699a SIOCGETMPWCFG = 0xc02069ae SIOCGETPFLOW = 0xc02069fe SIOCGETPFSYNC = 0xc02069f8 SIOCGETSGCNT = 0xc0207534 SIOCGETVIFCNT = 0xc0287533 SIOCGETVLAN = 0xc0206990 SIOCGIFADDR = 0xc0206921 SIOCGIFBRDADDR = 0xc0206923 SIOCGIFCONF = 0xc0106924 SIOCGIFDATA = 0xc020691b SIOCGIFDESCR = 0xc0206981 SIOCGIFDSTADDR = 0xc0206922 SIOCGIFFLAGS = 0xc0206911 SIOCGIFGATTR = 0xc028698b SIOCGIFGENERIC = 0xc020693a SIOCGIFGLIST = 0xc028698d SIOCGIFGMEMB = 0xc028698a SIOCGIFGROUP = 0xc0286988 SIOCGIFHARDMTU = 0xc02069a5 SIOCGIFLLPRIO = 0xc02069b6 SIOCGIFMEDIA = 0xc0406938 SIOCGIFMETRIC = 0xc0206917 SIOCGIFMTU = 0xc020697e SIOCGIFNETMASK = 0xc0206925 SIOCGIFPAIR = 0xc02069b1 SIOCGIFPARENT = 0xc02069b3 SIOCGIFPRIORITY = 0xc020699c SIOCGIFRDOMAIN = 0xc02069a0 SIOCGIFRTLABEL = 0xc0206983 SIOCGIFRXR = 0x802069aa SIOCGIFSFFPAGE = 0xc1126939 SIOCGIFXFLAGS = 0xc020699e SIOCGLIFPHYADDR = 0xc218694b SIOCGLIFPHYDF = 0xc02069c2 SIOCGLIFPHYECN = 0xc02069c8 SIOCGLIFPHYRTABLE = 0xc02069a2 SIOCGLIFPHYTTL = 0xc02069a9 SIOCGPGRP = 0x40047309 SIOCGPWE3 = 0xc0206998 SIOCGPWE3CTRLWORD = 0xc02069dc SIOCGPWE3FAT = 0xc02069dd SIOCGPWE3NEIGHBOR = 0xc21869de SIOCGRXHPRIO = 0xc02069db SIOCGSPPPPARAMS = 0xc0206994 SIOCGTXHPRIO = 0xc02069c6 SIOCGUMBINFO = 0xc02069be SIOCGUMBPARAM = 0xc02069c0 SIOCGVH = 0xc02069f6 SIOCGVNETFLOWID = 0xc02069c4 SIOCGVNETID = 0xc02069a7 SIOCIFAFATTACH = 0x801169ab SIOCIFAFDETACH = 0x801169ac SIOCIFCREATE = 0x8020697a SIOCIFDESTROY = 0x80206979 SIOCIFGCLONERS = 0xc0106978 SIOCSETKALIVE = 0x801869a3 SIOCSETLABEL = 0x80206999 SIOCSETMPWCFG = 0x802069ad SIOCSETPFLOW = 0x802069fd SIOCSETPFSYNC = 0x802069f7 SIOCSETVLAN = 0x8020698f SIOCSIFADDR = 0x8020690c SIOCSIFBRDADDR = 0x80206913 SIOCSIFDESCR = 0x80206980 SIOCSIFDSTADDR = 0x8020690e SIOCSIFFLAGS = 0x80206910 SIOCSIFGATTR = 0x8028698c SIOCSIFGENERIC = 0x80206939 SIOCSIFLLADDR = 0x8020691f SIOCSIFLLPRIO = 0x802069b5 SIOCSIFMEDIA = 0xc0206937 SIOCSIFMETRIC = 0x80206918 SIOCSIFMTU = 0x8020697f SIOCSIFNETMASK = 0x80206916 SIOCSIFPAIR = 0x802069b0 SIOCSIFPARENT = 0x802069b2 SIOCSIFPRIORITY = 0x8020699b SIOCSIFRDOMAIN = 0x8020699f SIOCSIFRTLABEL = 0x80206982 SIOCSIFXFLAGS = 0x8020699d SIOCSLIFPHYADDR = 0x8218694a SIOCSLIFPHYDF = 0x802069c1 SIOCSLIFPHYECN = 0x802069c7 SIOCSLIFPHYRTABLE = 0x802069a1 SIOCSLIFPHYTTL = 0x802069a8 SIOCSPGRP = 0x80047308 SIOCSPWE3CTRLWORD = 0x802069dc SIOCSPWE3FAT = 0x802069dd SIOCSPWE3NEIGHBOR = 0x821869de SIOCSRXHPRIO = 0x802069db SIOCSSPPPPARAMS = 0x80206993 SIOCSTXHPRIO = 0x802069c5 SIOCSUMBPARAM = 0x802069bf SIOCSVH = 0xc02069f5 SIOCSVNETFLOWID = 0x802069c3 SIOCSVNETID = 0x802069a6 SOCK_CLOEXEC = 0x8000 SOCK_DGRAM = 0x2 SOCK_DNS = 0x1000 SOCK_NONBLOCK = 0x4000 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_DOMAIN = 0x1024 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_NETPROC = 0x1020 SO_OOBINLINE = 0x100 SO_PEERCRED = 0x1022 SO_PROTOCOL = 0x1025 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 SO_ZEROIZE = 0x2000 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_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 TCIOFF = 0x3 TCIOFLUSH = 0x3 TCION = 0x4 TCOFLUSH = 0x2 TCOOFF = 0x1 TCOON = 0x2 TCPOPT_EOL = 0x0 TCPOPT_MAXSEG = 0x2 TCPOPT_NOP = 0x1 TCPOPT_SACK = 0x5 TCPOPT_SACK_HDR = 0x1010500 TCPOPT_SACK_PERMITTED = 0x4 TCPOPT_SACK_PERMIT_HDR = 0x1010402 TCPOPT_SIGNATURE = 0x13 TCPOPT_TIMESTAMP = 0x8 TCPOPT_TSTAMP_HDR = 0x101080a TCPOPT_WINDOW = 0x3 TCP_INFO = 0x9 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_SACKHOLE_LIMIT = 0x80 TCP_SACK_ENABLE = 0x8 TCSAFLUSH = 0x2 TIMER_ABSTIME = 0x1 TIMER_RELTIME = 0x0 TIOCCBRK = 0x2000747a TIOCCDTR = 0x20007478 TIOCCHKVERAUTH = 0x2000741e TIOCCLRVERAUTH = 0x2000741d 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 TIOCSETVERAUTH = 0x8004741c TIOCSFLAGS = 0x8004745c TIOCSIG = 0x8004745f TIOCSPGRP = 0x80047476 TIOCSTART = 0x2000746e TIOCSTAT = 0x20007465 TIOCSTOP = 0x2000746f TIOCSTSTAMP = 0x8008745a TIOCSWINSZ = 0x80087467 TIOCUCNTL = 0x80047466 TIOCUCNTL_CBRK = 0x7a TIOCUCNTL_SBRK = 0x7b TOSTOP = 0x400000 UTIME_NOW = -0x2 UTIME_OMIT = -0x1 VDISCARD = 0xf VDSUSP = 0xb VEOF = 0x0 VEOL = 0x1 VEOL2 = 0x2 VERASE = 0x3 VINTR = 0x8 VKILL = 0x5 VLNEXT = 0xe VMIN = 0x10 VM_ANONMIN = 0x7 VM_LOADAVG = 0x2 VM_MALLOC_CONF = 0xc VM_MAXID = 0xd VM_MAXSLP = 0xa VM_METER = 0x1 VM_NKMEMPAGES = 0x6 VM_PSSTRINGS = 0x3 VM_SWAPENCRYPT = 0x5 VM_USPACE = 0xb VM_UVMEXP = 0x4 VM_VNODEMIN = 0x9 VM_VTEXTMIN = 0x8 VQUIT = 0x9 VREPRINT = 0x6 VSTART = 0xc VSTATUS = 0x12 VSTOP = 0xd VSUSP = 0xa VTIME = 0x11 VWERASE = 0x4 WALTSIG = 0x4 WCONTINUED = 0x8 WCOREFLAG = 0x80 WNOHANG = 0x1 WUNTRACED = 0x2 XCASE = 0x1000000 ) // 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(0x5c) 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(0x5f) 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) ENOTRECOVERABLE = syscall.Errno(0x5d) ENOTSOCK = syscall.Errno(0x26) ENOTSUP = syscall.Errno(0x5b) ENOTTY = syscall.Errno(0x19) ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x2d) EOVERFLOW = syscall.Errno(0x57) EOWNERDEAD = syscall.Errno(0x5e) 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(0x5f) 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "device not configured"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EDEADLK", "resource deadlock avoided"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "cross-device link"}, {19, "ENODEV", "operation not supported by device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "result too large"}, {35, "EAGAIN", "resource temporarily unavailable"}, {36, "EINPROGRESS", "operation now in progress"}, {37, "EALREADY", "operation already in progress"}, {38, "ENOTSOCK", "socket operation on non-socket"}, {39, "EDESTADDRREQ", "destination address required"}, {40, "EMSGSIZE", "message too long"}, {41, "EPROTOTYPE", "protocol wrong type for socket"}, {42, "ENOPROTOOPT", "protocol not available"}, {43, "EPROTONOSUPPORT", "protocol not supported"}, {44, "ESOCKTNOSUPPORT", "socket type not supported"}, {45, "EOPNOTSUPP", "operation not supported"}, {46, "EPFNOSUPPORT", "protocol family not supported"}, {47, "EAFNOSUPPORT", "address family not supported by protocol family"}, {48, "EADDRINUSE", "address already in use"}, {49, "EADDRNOTAVAIL", "can't assign requested address"}, {50, "ENETDOWN", "network is down"}, {51, "ENETUNREACH", "network is unreachable"}, {52, "ENETRESET", "network dropped connection on reset"}, {53, "ECONNABORTED", "software caused connection abort"}, {54, "ECONNRESET", "connection reset by peer"}, {55, "ENOBUFS", "no buffer space available"}, {56, "EISCONN", "socket is already connected"}, {57, "ENOTCONN", "socket is not connected"}, {58, "ESHUTDOWN", "can't send after socket shutdown"}, {59, "ETOOMANYREFS", "too many references: can't splice"}, {60, "ETIMEDOUT", "operation timed out"}, {61, "ECONNREFUSED", "connection refused"}, {62, "ELOOP", "too many levels of symbolic links"}, {63, "ENAMETOOLONG", "file name too long"}, {64, "EHOSTDOWN", "host is down"}, {65, "EHOSTUNREACH", "no route to host"}, {66, "ENOTEMPTY", "directory not empty"}, {67, "EPROCLIM", "too many processes"}, {68, "EUSERS", "too many users"}, {69, "EDQUOT", "disk quota exceeded"}, {70, "ESTALE", "stale NFS file handle"}, {71, "EREMOTE", "too many levels of remote in path"}, {72, "EBADRPC", "RPC struct is bad"}, {73, "ERPCMISMATCH", "RPC version wrong"}, {74, "EPROGUNAVAIL", "RPC program not available"}, {75, "EPROGMISMATCH", "program version wrong"}, {76, "EPROCUNAVAIL", "bad procedure for program"}, {77, "ENOLCK", "no locks available"}, {78, "ENOSYS", "function not implemented"}, {79, "EFTYPE", "inappropriate file type or format"}, {80, "EAUTH", "authentication error"}, {81, "ENEEDAUTH", "need authenticator"}, {82, "EIPSEC", "IPsec processing failure"}, {83, "ENOATTR", "attribute not found"}, {84, "EILSEQ", "illegal byte sequence"}, {85, "ENOMEDIUM", "no medium found"}, {86, "EMEDIUMTYPE", "wrong medium type"}, {87, "EOVERFLOW", "value too large to be stored in data type"}, {88, "ECANCELED", "operation canceled"}, {89, "EIDRM", "identifier removed"}, {90, "ENOMSG", "no message of desired type"}, {91, "ENOTSUP", "not supported"}, {92, "EBADMSG", "bad message"}, {93, "ENOTRECOVERABLE", "state not recoverable"}, {94, "EOWNERDEAD", "previous owner died"}, {95, "ELAST", "protocol error"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, {6, "SIGABRT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGURG", "urgent I/O condition"}, {17, "SIGSTOP", "suspended (signal)"}, {18, "SIGTSTP", "suspended"}, {19, "SIGCONT", "continued"}, {20, "SIGCHLD", "child exited"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGIO", "I/O possible"}, {24, "SIGXCPU", "cputime limit exceeded"}, {25, "SIGXFSZ", "filesize limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window size changes"}, {29, "SIGINFO", "information request"}, {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGTHR", "thread AST"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go ================================================ // mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && solaris // Code generated by cmd/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 BS0 = 0x0 BS1 = 0x2000 BSDLY = 0x2000 CBAUD = 0xf CFLUSH = 0xf CIBAUD = 0xf0000 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 CR0 = 0x0 CR1 = 0x200 CR2 = 0x400 CR3 = 0x600 CRDLY = 0x600 CREAD = 0x80 CRTSCTS = 0x80000000 CS5 = 0x0 CS6 = 0x10 CS7 = 0x20 CS8 = 0x30 CSIZE = 0x30 CSTART = 0x11 CSTATUS = 0x14 CSTOP = 0x13 CSTOPB = 0x40 CSUSP = 0x1a CSWTCH = 0x1a DIOC = 0x6400 DIOCGETB = 0x6402 DIOCGETC = 0x6401 DIOCGETP = 0x6408 DIOCSETE = 0x6403 DIOCSETP = 0x6409 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 FF0 = 0x0 FF1 = 0x8000 FFDLY = 0x8000 FIORDCHK = 0x6603 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_FLOCK = 0x35 F_FLOCK64 = 0x35 F_FLOCKW = 0x36 F_FLOCKW64 = 0x36 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_OFD_GETLK = 0x2f F_OFD_GETLK64 = 0x2f F_OFD_SETLK = 0x30 F_OFD_SETLK64 = 0x30 F_OFD_SETLKW = 0x31 F_OFD_SETLKW64 = 0x31 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 IBSHIFT = 0x10 ICANON = 0x2 ICMP6_FILTER = 0x1 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_RECVTOS = 0xc 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 IUCLC = 0x200 IXANY = 0x800 IXOFF = 0x1000 IXON = 0x400 LOCK_EX = 0x2 LOCK_NB = 0x4 LOCK_SH = 0x1 LOCK_UN = 0x8 MADV_ACCESS_DEFAULT = 0x6 MADV_ACCESS_LWP = 0x7 MADV_ACCESS_MANY = 0x8 MADV_DONTNEED = 0x4 MADV_FREE = 0x5 MADV_NORMAL = 0x0 MADV_PURGE = 0x9 MADV_RANDOM = 0x1 MADV_SEQUENTIAL = 0x2 MADV_WILLNEED = 0x3 MAP_32BIT = 0x80 MAP_ALIGN = 0x200 MAP_ANON = 0x100 MAP_ANONYMOUS = 0x100 MAP_FILE = 0x0 MAP_FIXED = 0x10 MAP_INITDATA = 0x800 MAP_NORESERVE = 0x40 MAP_PRIVATE = 0x2 MAP_RENAME = 0x20 MAP_SHARED = 0x1 MAP_TEXT = 0x400 MAP_TYPE = 0xf MCAST_BLOCK_SOURCE = 0x2b MCAST_EXCLUDE = 0x2 MCAST_INCLUDE = 0x1 MCAST_JOIN_GROUP = 0x29 MCAST_JOIN_SOURCE_GROUP = 0x2d MCAST_LEAVE_GROUP = 0x2a MCAST_LEAVE_SOURCE_GROUP = 0x2e MCAST_UNBLOCK_SOURCE = 0x2c 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_NOSIGNAL = 0x200 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 NAME_MAX = 0xff NEWDEV = 0x1 NFDBITS = 0x40 NL0 = 0x0 NL1 = 0x100 NLDLY = 0x100 NOFLSH = 0x80 OCRNL = 0x8 OFDEL = 0x80 OFILL = 0x40 OLCUC = 0x2 OLDDEV = 0x0 ONBITSMAJOR = 0x7 ONBITSMINOR = 0x8 ONLCR = 0x4 ONLRET = 0x20 ONOCR = 0x10 OPENFAIL = -0x1 OPOST = 0x1 O_ACCMODE = 0x600003 O_APPEND = 0x8 O_CLOEXEC = 0x800000 O_CREAT = 0x100 O_DIRECT = 0x2000000 O_DIRECTORY = 0x1000000 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 = 0xfffffffffffffffd 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 S_ENFMT = 0x400 S_IAMB = 0x1ff S_IEXEC = 0x40 S_IFBLK = 0x6000 S_IFCHR = 0x2000 S_IFDIR = 0x4000 S_IFDOOR = 0xd000 S_IFIFO = 0x1000 S_IFLNK = 0xa000 S_IFMT = 0xf000 S_IFNAM = 0x5000 S_IFPORT = 0xe000 S_IFREG = 0x8000 S_IFSOCK = 0xc000 S_INSEM = 0x1 S_INSHD = 0x2 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 TAB0 = 0x0 TAB1 = 0x800 TAB2 = 0x1000 TAB3 = 0x1800 TABDLY = 0x1800 TCFLSH = 0x5407 TCGETA = 0x5401 TCGETS = 0x540d TCIFLUSH = 0x0 TCIOFF = 0x2 TCIOFLUSH = 0x2 TCION = 0x3 TCOFLUSH = 0x1 TCOOFF = 0x0 TCOON = 0x1 TCP_ABORT_THRESHOLD = 0x11 TCP_ANONPRIVBIND = 0x20 TCP_CONGESTION = 0x25 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 TIMER_ABSTIME = 0x1 TIMER_RELTIME = 0x0 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 UTIME_NOW = -0x1 UTIME_OMIT = -0x2 VCEOF = 0x8 VCEOL = 0x9 VDISCARD = 0xd VDSUSP = 0xb VEOF = 0x4 VEOL = 0x5 VEOL2 = 0x6 VERASE = 0x2 VERASE2 = 0x11 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 XCASE = 0x4 XTABS = 0x1800 ) // 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 errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "not owner"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "I/O error"}, {6, "ENXIO", "no such device or address"}, {7, "E2BIG", "arg list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file number"}, {10, "ECHILD", "no child processes"}, {11, "EAGAIN", "resource temporarily unavailable"}, {12, "ENOMEM", "not enough space"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "cross-device link"}, {19, "ENODEV", "no such device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "file table overflow"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "argument out of domain"}, {34, "ERANGE", "result too large"}, {35, "ENOMSG", "no message of desired type"}, {36, "EIDRM", "identifier removed"}, {37, "ECHRNG", "channel number out of range"}, {38, "EL2NSYNC", "level 2 not synchronized"}, {39, "EL3HLT", "level 3 halted"}, {40, "EL3RST", "level 3 reset"}, {41, "ELNRNG", "link number out of range"}, {42, "EUNATCH", "protocol driver not attached"}, {43, "ENOCSI", "no CSI structure available"}, {44, "EL2HLT", "level 2 halted"}, {45, "EDEADLK", "deadlock situation detected/avoided"}, {46, "ENOLCK", "no record locks available"}, {47, "ECANCELED", "operation canceled"}, {48, "ENOTSUP", "operation not supported"}, {49, "EDQUOT", "disc quota exceeded"}, {50, "EBADE", "bad exchange descriptor"}, {51, "EBADR", "bad request descriptor"}, {52, "EXFULL", "message tables full"}, {53, "ENOANO", "anode table overflow"}, {54, "EBADRQC", "bad request code"}, {55, "EBADSLT", "invalid slot"}, {56, "EDEADLOCK", "file locking deadlock"}, {57, "EBFONT", "bad font file format"}, {58, "EOWNERDEAD", "owner of the lock died"}, {59, "ENOTRECOVERABLE", "lock is not recoverable"}, {60, "ENOSTR", "not a stream device"}, {61, "ENODATA", "no data available"}, {62, "ETIME", "timer expired"}, {63, "ENOSR", "out of stream resources"}, {64, "ENONET", "machine is not on the network"}, {65, "ENOPKG", "package not installed"}, {66, "EREMOTE", "object is remote"}, {67, "ENOLINK", "link has been severed"}, {68, "EADV", "advertise error"}, {69, "ESRMNT", "srmount error"}, {70, "ECOMM", "communication error on send"}, {71, "EPROTO", "protocol error"}, {72, "ELOCKUNMAPPED", "locked lock was unmapped "}, {73, "ENOTACTIVE", "facility is not active"}, {74, "EMULTIHOP", "multihop attempted"}, {77, "EBADMSG", "not a data message"}, {78, "ENAMETOOLONG", "file name too long"}, {79, "EOVERFLOW", "value too large for defined data type"}, {80, "ENOTUNIQ", "name not unique on network"}, {81, "EBADFD", "file descriptor in bad state"}, {82, "EREMCHG", "remote address changed"}, {83, "ELIBACC", "can not access a needed shared library"}, {84, "ELIBBAD", "accessing a corrupted shared library"}, {85, "ELIBSCN", ".lib section in a.out corrupted"}, {86, "ELIBMAX", "attempting to link in more shared libraries than system limit"}, {87, "ELIBEXEC", "can not exec a shared library directly"}, {88, "EILSEQ", "illegal byte sequence"}, {89, "ENOSYS", "operation not applicable"}, {90, "ELOOP", "number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS"}, {91, "ERESTART", "error 91"}, {92, "ESTRPIPE", "error 92"}, {93, "ENOTEMPTY", "directory not empty"}, {94, "EUSERS", "too many users"}, {95, "ENOTSOCK", "socket operation on non-socket"}, {96, "EDESTADDRREQ", "destination address required"}, {97, "EMSGSIZE", "message too long"}, {98, "EPROTOTYPE", "protocol wrong type for socket"}, {99, "ENOPROTOOPT", "option not supported by protocol"}, {120, "EPROTONOSUPPORT", "protocol not supported"}, {121, "ESOCKTNOSUPPORT", "socket type not supported"}, {122, "EOPNOTSUPP", "operation not supported on transport endpoint"}, {123, "EPFNOSUPPORT", "protocol family not supported"}, {124, "EAFNOSUPPORT", "address family not supported by protocol family"}, {125, "EADDRINUSE", "address already in use"}, {126, "EADDRNOTAVAIL", "cannot assign requested address"}, {127, "ENETDOWN", "network is down"}, {128, "ENETUNREACH", "network is unreachable"}, {129, "ENETRESET", "network dropped connection because of reset"}, {130, "ECONNABORTED", "software caused connection abort"}, {131, "ECONNRESET", "connection reset by peer"}, {132, "ENOBUFS", "no buffer space available"}, {133, "EISCONN", "transport endpoint is already connected"}, {134, "ENOTCONN", "transport endpoint is not connected"}, {143, "ESHUTDOWN", "cannot send after socket shutdown"}, {144, "ETOOMANYREFS", "too many references: cannot splice"}, {145, "ETIMEDOUT", "connection timed out"}, {146, "ECONNREFUSED", "connection refused"}, {147, "EHOSTDOWN", "host is down"}, {148, "EHOSTUNREACH", "no route to host"}, {149, "EALREADY", "operation already in progress"}, {150, "EINPROGRESS", "operation now in progress"}, {151, "ESTALE", "stale NFS file handle"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal Instruction"}, {5, "SIGTRAP", "trace/Breakpoint Trap"}, {6, "SIGABRT", "abort"}, {7, "SIGEMT", "emulation Trap"}, {8, "SIGFPE", "arithmetic Exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus Error"}, {11, "SIGSEGV", "segmentation Fault"}, {12, "SIGSYS", "bad System Call"}, {13, "SIGPIPE", "broken Pipe"}, {14, "SIGALRM", "alarm Clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGUSR1", "user Signal 1"}, {17, "SIGUSR2", "user Signal 2"}, {18, "SIGCHLD", "child Status Changed"}, {19, "SIGPWR", "power-Fail/Restart"}, {20, "SIGWINCH", "window Size Change"}, {21, "SIGURG", "urgent Socket Condition"}, {22, "SIGIO", "pollable Event"}, {23, "SIGSTOP", "stopped (signal)"}, {24, "SIGTSTP", "stopped (user)"}, {25, "SIGCONT", "continued"}, {26, "SIGTTIN", "stopped (tty input)"}, {27, "SIGTTOU", "stopped (tty output)"}, {28, "SIGVTALRM", "virtual Timer Expired"}, {29, "SIGPROF", "profiling Timer Expired"}, {30, "SIGXCPU", "cpu Limit Exceeded"}, {31, "SIGXFSZ", "file Size Limit Exceeded"}, {32, "SIGWAITING", "no runnable lwp"}, {33, "SIGLWP", "inter-lwp signal"}, {34, "SIGFREEZE", "checkpoint Freeze"}, {35, "SIGTHAW", "checkpoint Thaw"}, {36, "SIGCANCEL", "thread Cancellation"}, {37, "SIGLOST", "resource Lost"}, {38, "SIGXRES", "resource Control Exceeded"}, {39, "SIGJVM1", "reserved for JVM 1"}, {40, "SIGJVM2", "reserved for JVM 2"}, {41, "SIGINFO", "information Request"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go ================================================ // Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build zos && s390x // Hand edited based on zerrors_linux_s390x.go // TODO: auto-generate. package unix const ( BRKINT = 0x0001 CLOCAL = 0x1 CLOCK_MONOTONIC = 0x1 CLOCK_PROCESS_CPUTIME_ID = 0x2 CLOCK_REALTIME = 0x0 CLOCK_THREAD_CPUTIME_ID = 0x3 CLONE_NEWIPC = 0x08000000 CLONE_NEWNET = 0x40000000 CLONE_NEWNS = 0x00020000 CLONE_NEWPID = 0x20000000 CLONE_NEWUTS = 0x04000000 CLONE_PARENT = 0x00008000 CS8 = 0x0030 CSIZE = 0x0030 ECHO = 0x00000008 ECHONL = 0x00000001 EFD_SEMAPHORE = 0x00002000 EFD_CLOEXEC = 0x00001000 EFD_NONBLOCK = 0x00000004 EPOLL_CLOEXEC = 0x00001000 EPOLL_CTL_ADD = 0 EPOLL_CTL_MOD = 1 EPOLL_CTL_DEL = 2 EPOLLRDNORM = 0x0001 EPOLLRDBAND = 0x0002 EPOLLIN = 0x0003 EPOLLOUT = 0x0004 EPOLLWRBAND = 0x0008 EPOLLPRI = 0x0010 EPOLLERR = 0x0020 EPOLLHUP = 0x0040 EPOLLEXCLUSIVE = 0x20000000 EPOLLONESHOT = 0x40000000 FD_CLOEXEC = 0x01 FD_CLOFORK = 0x02 FD_SETSIZE = 0x800 FNDELAY = 0x04 F_CLOSFD = 9 F_CONTROL_CVT = 13 F_DUPFD = 0 F_DUPFD2 = 8 F_GETFD = 1 F_GETFL = 259 F_GETLK = 5 F_GETOWN = 10 F_OK = 0x0 F_RDLCK = 1 F_SETFD = 2 F_SETFL = 4 F_SETLK = 6 F_SETLKW = 7 F_SETOWN = 11 F_SETTAG = 12 F_UNLCK = 3 F_WRLCK = 2 FSTYPE_ZFS = 0xe9 //"Z" FSTYPE_HFS = 0xc8 //"H" FSTYPE_NFS = 0xd5 //"N" FSTYPE_TFS = 0xe3 //"T" FSTYPE_AUTOMOUNT = 0xc1 //"A" GRND_NONBLOCK = 1 GRND_RANDOM = 2 HUPCL = 0x0100 // Hang up on last close IN_CLOEXEC = 0x00001000 IN_NONBLOCK = 0x00000004 IN_ACCESS = 0x00000001 IN_MODIFY = 0x00000002 IN_ATTRIB = 0x00000004 IN_CLOSE_WRITE = 0x00000008 IN_CLOSE_NOWRITE = 0x00000010 IN_OPEN = 0x00000020 IN_MOVED_FROM = 0x00000040 IN_MOVED_TO = 0x00000080 IN_CREATE = 0x00000100 IN_DELETE = 0x00000200 IN_DELETE_SELF = 0x00000400 IN_MOVE_SELF = 0x00000800 IN_UNMOUNT = 0x00002000 IN_Q_OVERFLOW = 0x00004000 IN_IGNORED = 0x00008000 IN_CLOSE = (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) IN_MOVE = (IN_MOVED_FROM | IN_MOVED_TO) IN_ALL_EVENTS = (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE | IN_OPEN | IN_MOVE | IN_CREATE | IN_DELETE | IN_DELETE_SELF | IN_MOVE_SELF) IN_ONLYDIR = 0x01000000 IN_DONT_FOLLOW = 0x02000000 IN_EXCL_UNLINK = 0x04000000 IN_MASK_CREATE = 0x10000000 IN_MASK_ADD = 0x20000000 IN_ISDIR = 0x40000000 IN_ONESHOT = 0x80000000 IP6F_MORE_FRAG = 0x0001 IP6F_OFF_MASK = 0xfff8 IP6F_RESERVED_MASK = 0x0006 IP6OPT_JUMBO = 0xc2 IP6OPT_JUMBO_LEN = 6 IP6OPT_MUTABLE = 0x20 IP6OPT_NSAP_ADDR = 0xc3 IP6OPT_PAD1 = 0x00 IP6OPT_PADN = 0x01 IP6OPT_ROUTER_ALERT = 0x05 IP6OPT_TUNNEL_LIMIT = 0x04 IP6OPT_TYPE_DISCARD = 0x40 IP6OPT_TYPE_FORCEICMP = 0x80 IP6OPT_TYPE_ICMP = 0xc0 IP6OPT_TYPE_SKIP = 0x00 IP6_ALERT_AN = 0x0002 IP6_ALERT_MLD = 0x0000 IP6_ALERT_RSVP = 0x0001 IPPORT_RESERVED = 1024 IPPORT_USERRESERVED = 5000 IPPROTO_AH = 51 SOL_AH = 51 IPPROTO_DSTOPTS = 60 SOL_DSTOPTS = 60 IPPROTO_EGP = 8 SOL_EGP = 8 IPPROTO_ESP = 50 SOL_ESP = 50 IPPROTO_FRAGMENT = 44 SOL_FRAGMENT = 44 IPPROTO_GGP = 2 SOL_GGP = 2 IPPROTO_HOPOPTS = 0 SOL_HOPOPTS = 0 IPPROTO_ICMP = 1 SOL_ICMP = 1 IPPROTO_ICMPV6 = 58 SOL_ICMPV6 = 58 IPPROTO_IDP = 22 SOL_IDP = 22 IPPROTO_IP = 0 SOL_IP = 0 IPPROTO_IPV6 = 41 SOL_IPV6 = 41 IPPROTO_MAX = 256 SOL_MAX = 256 IPPROTO_NONE = 59 SOL_NONE = 59 IPPROTO_PUP = 12 SOL_PUP = 12 IPPROTO_RAW = 255 SOL_RAW = 255 IPPROTO_ROUTING = 43 SOL_ROUTING = 43 IPPROTO_TCP = 6 SOL_TCP = 6 IPPROTO_UDP = 17 SOL_UDP = 17 IPV6_ADDR_PREFERENCES = 32 IPV6_CHECKSUM = 19 IPV6_DONTFRAG = 29 IPV6_DSTOPTS = 23 IPV6_HOPLIMIT = 11 IPV6_HOPOPTS = 22 IPV6_JOIN_GROUP = 5 IPV6_LEAVE_GROUP = 6 IPV6_MULTICAST_HOPS = 9 IPV6_MULTICAST_IF = 7 IPV6_MULTICAST_LOOP = 4 IPV6_NEXTHOP = 20 IPV6_PATHMTU = 12 IPV6_PKTINFO = 13 IPV6_PREFER_SRC_CGA = 0x10 IPV6_PREFER_SRC_COA = 0x02 IPV6_PREFER_SRC_HOME = 0x01 IPV6_PREFER_SRC_NONCGA = 0x20 IPV6_PREFER_SRC_PUBLIC = 0x08 IPV6_PREFER_SRC_TMP = 0x04 IPV6_RECVDSTOPTS = 28 IPV6_RECVHOPLIMIT = 14 IPV6_RECVHOPOPTS = 26 IPV6_RECVPATHMTU = 16 IPV6_RECVPKTINFO = 15 IPV6_RECVRTHDR = 25 IPV6_RECVTCLASS = 31 IPV6_RTHDR = 21 IPV6_RTHDRDSTOPTS = 24 IPV6_RTHDR_TYPE_0 = 0 IPV6_TCLASS = 30 IPV6_UNICAST_HOPS = 3 IPV6_USE_MIN_MTU = 18 IPV6_V6ONLY = 10 IP_ADD_MEMBERSHIP = 5 IP_ADD_SOURCE_MEMBERSHIP = 12 IP_BLOCK_SOURCE = 10 IP_DEFAULT_MULTICAST_LOOP = 1 IP_DEFAULT_MULTICAST_TTL = 1 IP_DROP_MEMBERSHIP = 6 IP_DROP_SOURCE_MEMBERSHIP = 13 IP_MAX_MEMBERSHIPS = 20 IP_MULTICAST_IF = 7 IP_MULTICAST_LOOP = 4 IP_MULTICAST_TTL = 3 IP_OPTIONS = 1 IP_PKTINFO = 101 IP_RECVPKTINFO = 102 IP_TOS = 2 IP_TTL = 14 IP_UNBLOCK_SOURCE = 11 ICMP6_FILTER = 1 MCAST_INCLUDE = 0 MCAST_EXCLUDE = 1 MCAST_JOIN_GROUP = 40 MCAST_LEAVE_GROUP = 41 MCAST_JOIN_SOURCE_GROUP = 42 MCAST_LEAVE_SOURCE_GROUP = 43 MCAST_BLOCK_SOURCE = 44 MCAST_UNBLOCK_SOURCE = 46 ICANON = 0x0010 ICRNL = 0x0002 IEXTEN = 0x0020 IGNBRK = 0x0004 IGNCR = 0x0008 INLCR = 0x0020 ISIG = 0x0040 ISTRIP = 0x0080 IXON = 0x0200 IXOFF = 0x0100 LOCK_SH = 0x1 LOCK_EX = 0x2 LOCK_NB = 0x4 LOCK_UN = 0x8 POLLIN = 0x0003 POLLOUT = 0x0004 POLLPRI = 0x0010 POLLERR = 0x0020 POLLHUP = 0x0040 POLLNVAL = 0x0080 PROT_READ = 0x1 // mmap - page can be read PROT_WRITE = 0x2 // page can be written PROT_NONE = 0x4 // can't be accessed PROT_EXEC = 0x8 // can be executed MAP_PRIVATE = 0x1 // changes are private MAP_SHARED = 0x2 // changes are shared MAP_FIXED = 0x4 // place exactly __MAP_MEGA = 0x8 __MAP_64 = 0x10 MAP_ANON = 0x20 MAP_ANONYMOUS = 0x20 MS_SYNC = 0x1 // msync - synchronous writes MS_ASYNC = 0x2 // asynchronous writes MS_INVALIDATE = 0x4 // invalidate mappings MS_BIND = 0x00001000 MS_MOVE = 0x00002000 MS_NOSUID = 0x00000002 MS_PRIVATE = 0x00040000 MS_REC = 0x00004000 MS_REMOUNT = 0x00008000 MS_RDONLY = 0x00000001 MS_UNBINDABLE = 0x00020000 MNT_DETACH = 0x00000004 ZOSDSFS_SUPER_MAGIC = 0x44534653 // zOS DSFS NFS_SUPER_MAGIC = 0x6969 // NFS NSFS_MAGIC = 0x6e736673 // PROCNS PROC_SUPER_MAGIC = 0x9fa0 // proc FS ZOSTFS_SUPER_MAGIC = 0x544653 // zOS TFS ZOSUFS_SUPER_MAGIC = 0x554653 // zOS UFS ZOSZFS_SUPER_MAGIC = 0x5A4653 // zOS ZFS MTM_RDONLY = 0x80000000 MTM_RDWR = 0x40000000 MTM_UMOUNT = 0x10000000 MTM_IMMED = 0x08000000 MTM_FORCE = 0x04000000 MTM_DRAIN = 0x02000000 MTM_RESET = 0x01000000 MTM_SAMEMODE = 0x00100000 MTM_UNQSEFORCE = 0x00040000 MTM_NOSUID = 0x00000400 MTM_SYNCHONLY = 0x00000200 MTM_REMOUNT = 0x00000100 MTM_NOSECURITY = 0x00000080 NFDBITS = 0x20 ONLRET = 0x0020 // NL performs CR function O_ACCMODE = 0x03 O_APPEND = 0x08 O_ASYNCSIG = 0x0200 O_CREAT = 0x80 O_DIRECT = 0x00002000 O_NOFOLLOW = 0x00004000 O_DIRECTORY = 0x00008000 O_PATH = 0x00080000 O_CLOEXEC = 0x00001000 O_EXCL = 0x40 O_GETFL = 0x0F O_LARGEFILE = 0x0400 O_NDELAY = 0x4 O_NONBLOCK = 0x04 O_RDONLY = 0x02 O_RDWR = 0x03 O_SYNC = 0x0100 O_TRUNC = 0x10 O_WRONLY = 0x01 O_NOCTTY = 0x20 OPOST = 0x0001 ONLCR = 0x0004 PARENB = 0x0200 PARMRK = 0x0400 QUERYCVT = 3 RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 // RUSAGE_THREAD unsupported on z/OS SEEK_CUR = 1 SEEK_END = 2 SEEK_SET = 0 SETAUTOCVTALL = 5 SETAUTOCVTON = 2 SETCVTALL = 4 SETCVTOFF = 0 SETCVTON = 1 AF_APPLETALK = 16 AF_CCITT = 10 AF_CHAOS = 5 AF_DATAKIT = 9 AF_DLI = 13 AF_ECMA = 8 AF_HYLINK = 15 AF_IMPLINK = 3 AF_INET = 2 AF_INET6 = 19 AF_INTF = 20 AF_IUCV = 17 AF_LAT = 14 AF_LINK = 18 AF_LOCAL = AF_UNIX // AF_LOCAL is an alias for AF_UNIX AF_MAX = 30 AF_NBS = 7 AF_NDD = 23 AF_NETWARE = 22 AF_NS = 6 AF_PUP = 4 AF_RIF = 21 AF_ROUTE = 20 AF_SNA = 11 AF_UNIX = 1 AF_UNSPEC = 0 IBMTCP_IMAGE = 1 MSG_ACK_EXPECTED = 0x10 MSG_ACK_GEN = 0x40 MSG_ACK_TIMEOUT = 0x20 MSG_CONNTERM = 0x80 MSG_CTRUNC = 0x20 MSG_DONTROUTE = 0x4 MSG_EOF = 0x8000 MSG_EOR = 0x8 MSG_MAXIOVLEN = 16 MSG_NONBLOCK = 0x4000 MSG_OOB = 0x1 MSG_PEEK = 0x2 MSG_TRUNC = 0x10 MSG_WAITALL = 0x40 PRIO_PROCESS = 1 PRIO_PGRP = 2 PRIO_USER = 3 RLIMIT_CPU = 0 RLIMIT_FSIZE = 1 RLIMIT_DATA = 2 RLIMIT_STACK = 3 RLIMIT_CORE = 4 RLIMIT_AS = 5 RLIMIT_NOFILE = 6 RLIMIT_MEMLIMIT = 7 RLIMIT_MEMLOCK = 0x8 RLIM_INFINITY = 2147483647 SCHED_FIFO = 0x2 SCM_CREDENTIALS = 0x2 SCM_RIGHTS = 0x01 SF_CLOSE = 0x00000002 SF_REUSE = 0x00000001 SHM_RND = 0x2 SHM_RDONLY = 0x1 SHMLBA = 0x1000 IPC_STAT = 0x3 IPC_SET = 0x2 IPC_RMID = 0x1 IPC_PRIVATE = 0x0 IPC_CREAT = 0x1000000 __IPC_MEGA = 0x4000000 __IPC_SHAREAS = 0x20000000 __IPC_BELOWBAR = 0x10000000 IPC_EXCL = 0x2000000 __IPC_GIGA = 0x8000000 SHUT_RD = 0 SHUT_RDWR = 2 SHUT_WR = 1 SOCK_CLOEXEC = 0x00001000 SOCK_CONN_DGRAM = 6 SOCK_DGRAM = 2 SOCK_NONBLOCK = 0x800 SOCK_RAW = 3 SOCK_RDM = 4 SOCK_SEQPACKET = 5 SOCK_STREAM = 1 SOL_SOCKET = 0xffff SOMAXCONN = 10 SO_ACCEPTCONN = 0x0002 SO_ACCEPTECONNABORTED = 0x0006 SO_ACKNOW = 0x7700 SO_BROADCAST = 0x0020 SO_BULKMODE = 0x8000 SO_CKSUMRECV = 0x0800 SO_CLOSE = 0x01 SO_CLUSTERCONNTYPE = 0x00004001 SO_CLUSTERCONNTYPE_INTERNAL = 8 SO_CLUSTERCONNTYPE_NOCONN = 0 SO_CLUSTERCONNTYPE_NONE = 1 SO_CLUSTERCONNTYPE_SAME_CLUSTER = 2 SO_CLUSTERCONNTYPE_SAME_IMAGE = 4 SO_DEBUG = 0x0001 SO_DONTROUTE = 0x0010 SO_ERROR = 0x1007 SO_IGNOREINCOMINGPUSH = 0x1 SO_IGNORESOURCEVIPA = 0x0002 SO_KEEPALIVE = 0x0008 SO_LINGER = 0x0080 SO_NONBLOCKLOCAL = 0x8001 SO_NOREUSEADDR = 0x1000 SO_OOBINLINE = 0x0100 SO_OPTACK = 0x8004 SO_OPTMSS = 0x8003 SO_RCVBUF = 0x1002 SO_RCVLOWAT = 0x1004 SO_RCVTIMEO = 0x1006 SO_REUSEADDR = 0x0004 SO_REUSEPORT = 0x0200 SO_SECINFO = 0x00004002 SO_SET = 0x0200 SO_SNDBUF = 0x1001 SO_SNDLOWAT = 0x1003 SO_SNDTIMEO = 0x1005 SO_TYPE = 0x1008 SO_UNSET = 0x0400 SO_USELOOPBACK = 0x0040 SO_USE_IFBUFS = 0x0400 S_ISUID = 0x0800 S_ISGID = 0x0400 S_ISVTX = 0x0200 S_IRUSR = 0x0100 S_IWUSR = 0x0080 S_IXUSR = 0x0040 S_IRWXU = 0x01C0 S_IRGRP = 0x0020 S_IWGRP = 0x0010 S_IXGRP = 0x0008 S_IRWXG = 0x0038 S_IROTH = 0x0004 S_IWOTH = 0x0002 S_IXOTH = 0x0001 S_IRWXO = 0x0007 S_IREAD = S_IRUSR S_IWRITE = S_IWUSR S_IEXEC = S_IXUSR S_IFDIR = 0x01000000 S_IFCHR = 0x02000000 S_IFREG = 0x03000000 S_IFFIFO = 0x04000000 S_IFIFO = 0x04000000 S_IFLNK = 0x05000000 S_IFBLK = 0x06000000 S_IFSOCK = 0x07000000 S_IFVMEXTL = 0xFE000000 S_IFVMEXTL_EXEC = 0x00010000 S_IFVMEXTL_DATA = 0x00020000 S_IFVMEXTL_MEL = 0x00030000 S_IFEXTL = 0x00000001 S_IFPROGCTL = 0x00000002 S_IFAPFCTL = 0x00000004 S_IFNOSHARE = 0x00000008 S_IFSHARELIB = 0x00000010 S_IFMT = 0xFF000000 S_IFMST = 0x00FF0000 TCP_KEEPALIVE = 0x8 TCP_NODELAY = 0x1 TIOCGWINSZ = 0x4008a368 TIOCSWINSZ = 0x8008a367 TIOCSBRK = 0x2000a77b TIOCCBRK = 0x2000a77a TIOCSTI = 0x8001a772 TIOCGPGRP = 0x4004a777 // _IOR(167, 119, int) TCSANOW = 0 TCSETS = 0 // equivalent to TCSANOW for tcsetattr TCSADRAIN = 1 TCSETSW = 1 // equivalent to TCSADRAIN for tcsetattr TCSAFLUSH = 2 TCSETSF = 2 // equivalent to TCSAFLUSH for tcsetattr TCGETS = 3 // not defined in ioctl.h -- zos golang only TCIFLUSH = 0 TCOFLUSH = 1 TCIOFLUSH = 2 TCOOFF = 0 TCOON = 1 TCIOFF = 2 TCION = 3 TIOCSPGRP = 0x8004a776 TIOCNOTTY = 0x2000a771 TIOCEXCL = 0x2000a70d TIOCNXCL = 0x2000a70e TIOCGETD = 0x4004a700 TIOCSETD = 0x8004a701 TIOCPKT = 0x8004a770 TIOCSTOP = 0x2000a76f TIOCSTART = 0x2000a76e TIOCUCNTL = 0x8004a766 TIOCREMOTE = 0x8004a769 TIOCMGET = 0x4004a76a TIOCMSET = 0x8004a76d TIOCMBIC = 0x8004a76b TIOCMBIS = 0x8004a76c VINTR = 0 VQUIT = 1 VERASE = 2 VKILL = 3 VEOF = 4 VEOL = 5 VMIN = 6 VSTART = 7 VSTOP = 8 VSUSP = 9 VTIME = 10 WCONTINUED = 0x4 WEXITED = 0x8 WNOHANG = 0x1 WNOWAIT = 0x20 WSTOPPED = 0x10 WUNTRACED = 0x2 _BPX_SWAP = 1 _BPX_NONSWAP = 2 MCL_CURRENT = 1 // for Linux compatibility -- no zos semantics MCL_FUTURE = 2 // for Linux compatibility -- no zos semantics MCL_ONFAULT = 3 // for Linux compatibility -- no zos semantics MADV_NORMAL = 0 // for Linux compatibility -- no zos semantics MADV_RANDOM = 1 // for Linux compatibility -- no zos semantics MADV_SEQUENTIAL = 2 // for Linux compatibility -- no zos semantics MADV_WILLNEED = 3 // for Linux compatibility -- no zos semantics MADV_REMOVE = 4 // for Linux compatibility -- no zos semantics MADV_DONTFORK = 5 // for Linux compatibility -- no zos semantics MADV_DOFORK = 6 // for Linux compatibility -- no zos semantics MADV_HWPOISON = 7 // for Linux compatibility -- no zos semantics MADV_MERGEABLE = 8 // for Linux compatibility -- no zos semantics MADV_UNMERGEABLE = 9 // for Linux compatibility -- no zos semantics MADV_SOFT_OFFLINE = 10 // for Linux compatibility -- no zos semantics MADV_HUGEPAGE = 11 // for Linux compatibility -- no zos semantics MADV_NOHUGEPAGE = 12 // for Linux compatibility -- no zos semantics MADV_DONTDUMP = 13 // for Linux compatibility -- no zos semantics MADV_DODUMP = 14 // for Linux compatibility -- no zos semantics MADV_FREE = 15 // for Linux compatibility -- no zos semantics MADV_WIPEONFORK = 16 // for Linux compatibility -- no zos semantics MADV_KEEPONFORK = 17 // for Linux compatibility -- no zos semantics AT_SYMLINK_FOLLOW = 0x400 AT_SYMLINK_NOFOLLOW = 0x100 XATTR_CREATE = 0x1 XATTR_REPLACE = 0x2 P_PID = 0 P_PGID = 1 P_ALL = 2 PR_SET_NAME = 15 PR_GET_NAME = 16 PR_SET_NO_NEW_PRIVS = 38 PR_GET_NO_NEW_PRIVS = 39 PR_SET_DUMPABLE = 4 PR_GET_DUMPABLE = 3 PR_SET_PDEATHSIG = 1 PR_GET_PDEATHSIG = 2 PR_SET_CHILD_SUBREAPER = 36 PR_GET_CHILD_SUBREAPER = 37 AT_FDCWD = -100 AT_EACCESS = 0x200 AT_EMPTY_PATH = 0x1000 AT_REMOVEDIR = 0x200 RENAME_NOREPLACE = 1 << 0 ) const ( EDOM = Errno(1) ERANGE = Errno(2) EACCES = Errno(111) EAGAIN = Errno(112) EBADF = Errno(113) EBUSY = Errno(114) ECHILD = Errno(115) EDEADLK = Errno(116) EEXIST = Errno(117) EFAULT = Errno(118) EFBIG = Errno(119) EINTR = Errno(120) EINVAL = Errno(121) EIO = Errno(122) EISDIR = Errno(123) EMFILE = Errno(124) EMLINK = Errno(125) ENAMETOOLONG = Errno(126) ENFILE = Errno(127) ENOATTR = Errno(265) ENODEV = Errno(128) ENOENT = Errno(129) ENOEXEC = Errno(130) ENOLCK = Errno(131) ENOMEM = Errno(132) ENOSPC = Errno(133) ENOSYS = Errno(134) ENOTDIR = Errno(135) ENOTEMPTY = Errno(136) ENOTTY = Errno(137) ENXIO = Errno(138) EPERM = Errno(139) EPIPE = Errno(140) EROFS = Errno(141) ESPIPE = Errno(142) ESRCH = Errno(143) EXDEV = Errno(144) E2BIG = Errno(145) ELOOP = Errno(146) EILSEQ = Errno(147) ENODATA = Errno(148) EOVERFLOW = Errno(149) EMVSNOTUP = Errno(150) ECMSSTORAGE = Errno(151) EMVSDYNALC = Errno(151) EMVSCVAF = Errno(152) EMVSCATLG = Errno(153) ECMSINITIAL = Errno(156) EMVSINITIAL = Errno(156) ECMSERR = Errno(157) EMVSERR = Errno(157) EMVSPARM = Errno(158) ECMSPFSFILE = Errno(159) EMVSPFSFILE = Errno(159) EMVSBADCHAR = Errno(160) ECMSPFSPERM = Errno(162) EMVSPFSPERM = Errno(162) EMVSSAFEXTRERR = Errno(163) EMVSSAF2ERR = Errno(164) EMVSTODNOTSET = Errno(165) EMVSPATHOPTS = Errno(166) EMVSNORTL = Errno(167) EMVSEXPIRE = Errno(168) EMVSPASSWORD = Errno(169) EMVSWLMERROR = Errno(170) EMVSCPLERROR = Errno(171) EMVSARMERROR = Errno(172) ELENOFORK = Errno(200) ELEMSGERR = Errno(201) EFPMASKINV = Errno(202) EFPMODEINV = Errno(203) EBUFLEN = Errno(227) EEXTLINK = Errno(228) ENODD = Errno(229) ECMSESMERR = Errno(230) ECPERR = Errno(231) ELEMULTITHREAD = Errno(232) ELEFENCE = Errno(244) EBADDATA = Errno(245) EUNKNOWN = Errno(246) ENOTSUP = Errno(247) EBADNAME = Errno(248) ENOTSAFE = Errno(249) ELEMULTITHREADFORK = Errno(257) ECUNNOENV = Errno(258) ECUNNOCONV = Errno(259) ECUNNOTALIGNED = Errno(260) ECUNERR = Errno(262) EIBMBADCALL = Errno(1000) EIBMBADPARM = Errno(1001) EIBMSOCKOUTOFRANGE = Errno(1002) EIBMSOCKINUSE = Errno(1003) EIBMIUCVERR = Errno(1004) EOFFLOADboxERROR = Errno(1005) EOFFLOADboxRESTART = Errno(1006) EOFFLOADboxDOWN = Errno(1007) EIBMCONFLICT = Errno(1008) EIBMCANCELLED = Errno(1009) EIBMBADTCPNAME = Errno(1011) ENOTBLK = Errno(1100) ETXTBSY = Errno(1101) EWOULDBLOCK = Errno(1102) EINPROGRESS = Errno(1103) EALREADY = Errno(1104) ENOTSOCK = Errno(1105) EDESTADDRREQ = Errno(1106) EMSGSIZE = Errno(1107) EPROTOTYPE = Errno(1108) ENOPROTOOPT = Errno(1109) EPROTONOSUPPORT = Errno(1110) ESOCKTNOSUPPORT = Errno(1111) EOPNOTSUPP = Errno(1112) EPFNOSUPPORT = Errno(1113) EAFNOSUPPORT = Errno(1114) EADDRINUSE = Errno(1115) EADDRNOTAVAIL = Errno(1116) ENETDOWN = Errno(1117) ENETUNREACH = Errno(1118) ENETRESET = Errno(1119) ECONNABORTED = Errno(1120) ECONNRESET = Errno(1121) ENOBUFS = Errno(1122) EISCONN = Errno(1123) ENOTCONN = Errno(1124) ESHUTDOWN = Errno(1125) ETOOMANYREFS = Errno(1126) ETIMEDOUT = Errno(1127) ECONNREFUSED = Errno(1128) EHOSTDOWN = Errno(1129) EHOSTUNREACH = Errno(1130) EPROCLIM = Errno(1131) EUSERS = Errno(1132) EDQUOT = Errno(1133) ESTALE = Errno(1134) EREMOTE = Errno(1135) ENOSTR = Errno(1136) ETIME = Errno(1137) ENOSR = Errno(1138) ENOMSG = Errno(1139) EBADMSG = Errno(1140) EIDRM = Errno(1141) ENONET = Errno(1142) ERREMOTE = Errno(1143) ENOLINK = Errno(1144) EADV = Errno(1145) ESRMNT = Errno(1146) ECOMM = Errno(1147) EPROTO = Errno(1148) EMULTIHOP = Errno(1149) EDOTDOT = Errno(1150) EREMCHG = Errno(1151) ECANCELED = Errno(1152) EINTRNODATA = Errno(1159) ENOREUSE = Errno(1160) ENOMOVE = Errno(1161) ) // Signals const ( SIGHUP = Signal(1) SIGINT = Signal(2) SIGABRT = Signal(3) SIGILL = Signal(4) SIGPOLL = Signal(5) SIGURG = Signal(6) SIGSTOP = Signal(7) SIGFPE = Signal(8) SIGKILL = Signal(9) SIGBUS = Signal(10) SIGSEGV = Signal(11) SIGSYS = Signal(12) SIGPIPE = Signal(13) SIGALRM = Signal(14) SIGTERM = Signal(15) SIGUSR1 = Signal(16) SIGUSR2 = Signal(17) SIGABND = Signal(18) SIGCONT = Signal(19) SIGCHLD = Signal(20) SIGTTIN = Signal(21) SIGTTOU = Signal(22) SIGIO = Signal(23) SIGQUIT = Signal(24) SIGTSTP = Signal(25) SIGTRAP = Signal(26) SIGIOERR = Signal(27) SIGWINCH = Signal(28) SIGXCPU = Signal(29) SIGXFSZ = Signal(30) SIGVTALRM = Signal(31) SIGPROF = Signal(32) SIGDANGER = Signal(33) SIGTHSTOP = Signal(34) SIGTHCONT = Signal(35) SIGTRACE = Signal(37) SIGDCE = Signal(38) SIGDUMP = Signal(39) ) // Error table var errorList = [...]struct { num Errno name string desc string }{ {1, "EDC5001I", "A domain error occurred."}, {2, "EDC5002I", "A range error occurred."}, {111, "EDC5111I", "Permission denied."}, {112, "EDC5112I", "Resource temporarily unavailable."}, {113, "EDC5113I", "Bad file descriptor."}, {114, "EDC5114I", "Resource busy."}, {115, "EDC5115I", "No child processes."}, {116, "EDC5116I", "Resource deadlock avoided."}, {117, "EDC5117I", "File exists."}, {118, "EDC5118I", "Incorrect address."}, {119, "EDC5119I", "File too large."}, {120, "EDC5120I", "Interrupted function call."}, {121, "EDC5121I", "Invalid argument."}, {122, "EDC5122I", "Input/output error."}, {123, "EDC5123I", "Is a directory."}, {124, "EDC5124I", "Too many open files."}, {125, "EDC5125I", "Too many links."}, {126, "EDC5126I", "Filename too long."}, {127, "EDC5127I", "Too many open files in system."}, {128, "EDC5128I", "No such device."}, {129, "EDC5129I", "No such file or directory."}, {130, "EDC5130I", "Exec format error."}, {131, "EDC5131I", "No locks available."}, {132, "EDC5132I", "Not enough memory."}, {133, "EDC5133I", "No space left on device."}, {134, "EDC5134I", "Function not implemented."}, {135, "EDC5135I", "Not a directory."}, {136, "EDC5136I", "Directory not empty."}, {137, "EDC5137I", "Inappropriate I/O control operation."}, {138, "EDC5138I", "No such device or address."}, {139, "EDC5139I", "Operation not permitted."}, {140, "EDC5140I", "Broken pipe."}, {141, "EDC5141I", "Read-only file system."}, {142, "EDC5142I", "Invalid seek."}, {143, "EDC5143I", "No such process."}, {144, "EDC5144I", "Improper link."}, {145, "EDC5145I", "The parameter list is too long, or the message to receive was too large for the buffer."}, {146, "EDC5146I", "Too many levels of symbolic links."}, {147, "EDC5147I", "Illegal byte sequence."}, {148, "EDC5148I", "The named attribute or data not available."}, {149, "EDC5149I", "Value Overflow Error."}, {150, "EDC5150I", "UNIX System Services is not active."}, {151, "EDC5151I", "Dynamic allocation error."}, {152, "EDC5152I", "Common VTOC access facility (CVAF) error."}, {153, "EDC5153I", "Catalog obtain error."}, {156, "EDC5156I", "Process initialization error."}, {157, "EDC5157I", "An internal error has occurred."}, {158, "EDC5158I", "Bad parameters were passed to the service."}, {159, "EDC5159I", "The Physical File System encountered a permanent file error."}, {160, "EDC5160I", "Bad character in environment variable name."}, {162, "EDC5162I", "The Physical File System encountered a system error."}, {163, "EDC5163I", "SAF/RACF extract error."}, {164, "EDC5164I", "SAF/RACF error."}, {165, "EDC5165I", "System TOD clock not set."}, {166, "EDC5166I", "Access mode argument on function call conflicts with PATHOPTS parameter on JCL DD statement."}, {167, "EDC5167I", "Access to the UNIX System Services version of the C RTL is denied."}, {168, "EDC5168I", "Password has expired."}, {169, "EDC5169I", "Password is invalid."}, {170, "EDC5170I", "An error was encountered with WLM."}, {171, "EDC5171I", "An error was encountered with CPL."}, {172, "EDC5172I", "An error was encountered with Application Response Measurement (ARM) component."}, {200, "EDC5200I", "The application contains a Language Environment member language that cannot tolerate a fork()."}, {201, "EDC5201I", "The Language Environment message file was not found in the hierarchical file system."}, {202, "EDC5202E", "DLL facilities are not supported under SPC environment."}, {203, "EDC5203E", "DLL facilities are not supported under POSIX environment."}, {227, "EDC5227I", "Buffer is not long enough to contain a path definition"}, {228, "EDC5228I", "The file referred to is an external link"}, {229, "EDC5229I", "No path definition for ddname in effect"}, {230, "EDC5230I", "ESM error."}, {231, "EDC5231I", "CP or the external security manager had an error"}, {232, "EDC5232I", "The function failed because it was invoked from a multithread environment."}, {244, "EDC5244I", "The program, module or DLL is not supported in this environment."}, {245, "EDC5245I", "Data is not valid."}, {246, "EDC5246I", "Unknown system state."}, {247, "EDC5247I", "Operation not supported."}, {248, "EDC5248I", "The object name specified is not correct."}, {249, "EDC5249I", "The function is not allowed."}, {257, "EDC5257I", "Function cannot be called in the child process of a fork() from a multithreaded process until exec() is called."}, {258, "EDC5258I", "A CUN_RS_NO_UNI_ENV error was issued by Unicode Services."}, {259, "EDC5259I", "A CUN_RS_NO_CONVERSION error was issued by Unicode Services."}, {260, "EDC5260I", "A CUN_RS_TABLE_NOT_ALIGNED error was issued by Unicode Services."}, {262, "EDC5262I", "An iconv() function encountered an unexpected error while using Unicode Services."}, {265, "EDC5265I", "The named attribute not available."}, {1000, "EDC8000I", "A bad socket-call constant was found in the IUCV header."}, {1001, "EDC8001I", "An error was found in the IUCV header."}, {1002, "EDC8002I", "A socket descriptor is out of range."}, {1003, "EDC8003I", "A socket descriptor is in use."}, {1004, "EDC8004I", "Request failed because of an IUCV error."}, {1005, "EDC8005I", "Offload box error."}, {1006, "EDC8006I", "Offload box restarted."}, {1007, "EDC8007I", "Offload box down."}, {1008, "EDC8008I", "Already a conflicting call outstanding on socket."}, {1009, "EDC8009I", "Request cancelled using a SOCKcallCANCEL request."}, {1011, "EDC8011I", "A name of a PFS was specified that either is not configured or is not a Sockets PFS."}, {1100, "EDC8100I", "Block device required."}, {1101, "EDC8101I", "Text file busy."}, {1102, "EDC8102I", "Operation would block."}, {1103, "EDC8103I", "Operation now in progress."}, {1104, "EDC8104I", "Connection already in progress."}, {1105, "EDC8105I", "Socket operation on non-socket."}, {1106, "EDC8106I", "Destination address required."}, {1107, "EDC8107I", "Message too long."}, {1108, "EDC8108I", "Protocol wrong type for socket."}, {1109, "EDC8109I", "Protocol not available."}, {1110, "EDC8110I", "Protocol not supported."}, {1111, "EDC8111I", "Socket type not supported."}, {1112, "EDC8112I", "Operation not supported on socket."}, {1113, "EDC8113I", "Protocol family not supported."}, {1114, "EDC8114I", "Address family not supported."}, {1115, "EDC8115I", "Address already in use."}, {1116, "EDC8116I", "Address not available."}, {1117, "EDC8117I", "Network is down."}, {1118, "EDC8118I", "Network is unreachable."}, {1119, "EDC8119I", "Network dropped connection on reset."}, {1120, "EDC8120I", "Connection ended abnormally."}, {1121, "EDC8121I", "Connection reset."}, {1122, "EDC8122I", "No buffer space available."}, {1123, "EDC8123I", "Socket already connected."}, {1124, "EDC8124I", "Socket not connected."}, {1125, "EDC8125I", "Can't send after socket shutdown."}, {1126, "EDC8126I", "Too many references; can't splice."}, {1127, "EDC8127I", "Connection timed out."}, {1128, "EDC8128I", "Connection refused."}, {1129, "EDC8129I", "Host is not available."}, {1130, "EDC8130I", "Host cannot be reached."}, {1131, "EDC8131I", "Too many processes."}, {1132, "EDC8132I", "Too many users."}, {1133, "EDC8133I", "Disk quota exceeded."}, {1134, "EDC8134I", "Stale file handle."}, {1135, "", ""}, {1136, "EDC8136I", "File is not a STREAM."}, {1137, "EDC8137I", "STREAMS ioctl() timeout."}, {1138, "EDC8138I", "No STREAMS resources."}, {1139, "EDC8139I", "The message identified by set_id and msg_id is not in the message catalog."}, {1140, "EDC8140I", "Bad message."}, {1141, "EDC8141I", "Identifier removed."}, {1142, "", ""}, {1143, "", ""}, {1144, "EDC8144I", "The link has been severed."}, {1145, "", ""}, {1146, "", ""}, {1147, "", ""}, {1148, "EDC8148I", "Protocol error."}, {1149, "EDC8149I", "Multihop not allowed."}, {1150, "", ""}, {1151, "", ""}, {1152, "EDC8152I", "The asynchronous I/O request has been canceled."}, {1159, "EDC8159I", "Function call was interrupted before any data was received."}, {1160, "EDC8160I", "Socket reuse is not supported."}, {1161, "EDC8161I", "The file system cannot currently be moved."}, } // Signal table var signalList = [...]struct { num Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGABT", "aborted"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGPOLL", "pollable event"}, {6, "SIGURG", "urgent I/O condition"}, {7, "SIGSTOP", "stop process"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad argument to routine"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGUSR1", "user defined signal 1"}, {17, "SIGUSR2", "user defined signal 2"}, {18, "SIGABND", "abend"}, {19, "SIGCONT", "continued"}, {20, "SIGCHLD", "child exited"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGIO", "I/O possible"}, {24, "SIGQUIT", "quit"}, {25, "SIGTSTP", "stopped"}, {26, "SIGTRAP", "trace/breakpoint trap"}, {27, "SIGIOER", "I/O error"}, {28, "SIGWINCH", "window changed"}, {29, "SIGXCPU", "CPU time limit exceeded"}, {30, "SIGXFSZ", "file size limit exceeded"}, {31, "SIGVTALRM", "virtual timer expired"}, {32, "SIGPROF", "profiling timer expired"}, {33, "SIGDANGER", "danger"}, {34, "SIGTHSTOP", "stop thread"}, {35, "SIGTHCONT", "continue thread"}, {37, "SIGTRACE", "trace"}, {38, "", "DCE"}, {39, "SIGDUMP", "dump"}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go ================================================ // Code generated by linux/mkall.go generatePtracePair("arm", "arm64"). DO NOT EDIT. //go:build linux && (arm || arm64) package unix import "unsafe" // PtraceRegsArm is the registers used by arm binaries. type PtraceRegsArm struct { Uregs [18]uint32 } // PtraceGetRegsArm fetches the registers used by arm binaries. func PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error { return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout)) } // PtraceSetRegsArm sets the registers used by arm binaries. func PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error { return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs)) } // PtraceRegsArm64 is the registers used by arm64 binaries. type PtraceRegsArm64 struct { Regs [31]uint64 Sp uint64 Pc uint64 Pstate uint64 } // PtraceGetRegsArm64 fetches the registers used by arm64 binaries. func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error { return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout)) } // PtraceSetRegsArm64 sets the registers used by arm64 binaries. func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error { return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs)) } ================================================ FILE: vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go ================================================ // Code generated by linux/mkall.go generatePtraceRegSet("arm64"). DO NOT EDIT. package unix import "unsafe" // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries. func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error { iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))} return ptracePtr(PTRACE_GETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec)) } // PtraceSetRegSetArm64 sets the registers used by arm64 binaries. func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error { iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))} return ptracePtr(PTRACE_SETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec)) } ================================================ FILE: vendor/golang.org/x/sys/unix/zptrace_mipsnn_linux.go ================================================ // Code generated by linux/mkall.go generatePtracePair("mips", "mips64"). DO NOT EDIT. //go:build linux && (mips || mips64) package unix import "unsafe" // PtraceRegsMips is the registers used by mips binaries. type PtraceRegsMips struct { Regs [32]uint64 Lo uint64 Hi uint64 Epc uint64 Badvaddr uint64 Status uint64 Cause uint64 } // PtraceGetRegsMips fetches the registers used by mips binaries. func PtraceGetRegsMips(pid int, regsout *PtraceRegsMips) error { return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout)) } // PtraceSetRegsMips sets the registers used by mips binaries. func PtraceSetRegsMips(pid int, regs *PtraceRegsMips) error { return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs)) } // PtraceRegsMips64 is the registers used by mips64 binaries. type PtraceRegsMips64 struct { Regs [32]uint64 Lo uint64 Hi uint64 Epc uint64 Badvaddr uint64 Status uint64 Cause uint64 } // PtraceGetRegsMips64 fetches the registers used by mips64 binaries. func PtraceGetRegsMips64(pid int, regsout *PtraceRegsMips64) error { return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout)) } // PtraceSetRegsMips64 sets the registers used by mips64 binaries. func PtraceSetRegsMips64(pid int, regs *PtraceRegsMips64) error { return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs)) } ================================================ FILE: vendor/golang.org/x/sys/unix/zptrace_mipsnnle_linux.go ================================================ // Code generated by linux/mkall.go generatePtracePair("mipsle", "mips64le"). DO NOT EDIT. //go:build linux && (mipsle || mips64le) package unix import "unsafe" // PtraceRegsMipsle is the registers used by mipsle binaries. type PtraceRegsMipsle struct { Regs [32]uint64 Lo uint64 Hi uint64 Epc uint64 Badvaddr uint64 Status uint64 Cause uint64 } // PtraceGetRegsMipsle fetches the registers used by mipsle binaries. func PtraceGetRegsMipsle(pid int, regsout *PtraceRegsMipsle) error { return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout)) } // PtraceSetRegsMipsle sets the registers used by mipsle binaries. func PtraceSetRegsMipsle(pid int, regs *PtraceRegsMipsle) error { return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs)) } // PtraceRegsMips64le is the registers used by mips64le binaries. type PtraceRegsMips64le struct { Regs [32]uint64 Lo uint64 Hi uint64 Epc uint64 Badvaddr uint64 Status uint64 Cause uint64 } // PtraceGetRegsMips64le fetches the registers used by mips64le binaries. func PtraceGetRegsMips64le(pid int, regsout *PtraceRegsMips64le) error { return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout)) } // PtraceSetRegsMips64le sets the registers used by mips64le binaries. func PtraceSetRegsMips64le(pid int, regs *PtraceRegsMips64le) error { return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs)) } ================================================ FILE: vendor/golang.org/x/sys/unix/zptrace_x86_linux.go ================================================ // Code generated by linux/mkall.go generatePtracePair("386", "amd64"). DO NOT EDIT. //go:build linux && (386 || amd64) package unix import "unsafe" // PtraceRegs386 is the registers used by 386 binaries. type PtraceRegs386 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 } // PtraceGetRegs386 fetches the registers used by 386 binaries. func PtraceGetRegs386(pid int, regsout *PtraceRegs386) error { return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout)) } // PtraceSetRegs386 sets the registers used by 386 binaries. func PtraceSetRegs386(pid int, regs *PtraceRegs386) error { return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs)) } // PtraceRegsAmd64 is the registers used by amd64 binaries. type PtraceRegsAmd64 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 } // PtraceGetRegsAmd64 fetches the registers used by amd64 binaries. func PtraceGetRegsAmd64(pid int, regsout *PtraceRegsAmd64) error { return ptracePtr(PTRACE_GETREGS, pid, 0, unsafe.Pointer(regsout)) } // PtraceSetRegsAmd64 sets the registers used by amd64 binaries. func PtraceSetRegsAmd64(pid int, regs *PtraceRegsAmd64) error { return ptracePtr(PTRACE_SETREGS, pid, 0, unsafe.Pointer(regs)) } ================================================ FILE: vendor/golang.org/x/sys/unix/zsymaddr_zos_s390x.s ================================================ // go run mksyscall_zos_s390x.go -o_sysnum zsysnum_zos_s390x.go -o_syscall zsyscall_zos_s390x.go -i_syscall syscall_zos_s390x.go -o_asm zsymaddr_zos_s390x.s // Code generated by the command above; see README.md. DO NOT EDIT. //go:build zos && s390x #include "textflag.h" // provide the address of function variable to be fixed up. // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_FlistxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Flistxattr(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_FremovexattrAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Fremovexattr(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_FgetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Fgetxattr(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_FsetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Fsetxattr(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_accept4Addr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·accept4(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_RemovexattrAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Removexattr(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_Dup3Addr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Dup3(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_DirfdAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Dirfd(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_EpollCreateAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·EpollCreate(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_EpollCreate1Addr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·EpollCreate1(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_EpollCtlAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·EpollCtl(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_EpollPwaitAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·EpollPwait(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_EpollWaitAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·EpollWait(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_EventfdAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Eventfd(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_FaccessatAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Faccessat(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_FchmodatAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Fchmodat(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_FchownatAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Fchownat(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_FdatasyncAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Fdatasync(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_fstatatAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·fstatat(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_LgetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Lgetxattr(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_LsetxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Lsetxattr(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_FstatfsAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Fstatfs(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_FutimesAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Futimes(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_FutimesatAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Futimesat(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_GetrandomAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Getrandom(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_InotifyInitAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·InotifyInit(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_InotifyInit1Addr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·InotifyInit1(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_InotifyAddWatchAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·InotifyAddWatch(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_InotifyRmWatchAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·InotifyRmWatch(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_ListxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Listxattr(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_LlistxattrAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Llistxattr(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_LremovexattrAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Lremovexattr(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_LutimesAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Lutimes(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_StatfsAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Statfs(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_SyncfsAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Syncfs(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_UnshareAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Unshare(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_LinkatAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Linkat(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_MkdiratAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Mkdirat(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_MknodatAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Mknodat(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_PivotRootAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·PivotRoot(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_PrctlAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Prctl(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_PrlimitAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Prlimit(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_RenameatAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Renameat(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_Renameat2Addr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Renameat2(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_SethostnameAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Sethostname(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_SetnsAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Setns(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_SymlinkatAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Symlinkat(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_UnlinkatAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·Unlinkat(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_openatAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·openat(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_openat2Addr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·openat2(SB), R8 MOVD R8, ret+0(FP) RET // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT TEXT ·get_utimensatAddr(SB), NOSPLIT|NOFRAME, $0-8 MOVD $·utimensat(SB), R8 MOVD R8, ret+0(FP) RET ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go ================================================ // go run mksyscall_aix_ppc.go -aix -tags aix,ppc syscall_aix.go syscall_aix_ppc.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build aix && ppc package unix /* #include #include int utimes(uintptr_t, uintptr_t); int utimensat(int, uintptr_t, uintptr_t, int); int getcwd(uintptr_t, size_t); int accept(int, uintptr_t, uintptr_t); int getdirent(int, uintptr_t, size_t); int wait4(int, uintptr_t, int, uintptr_t); int ioctl(int, int, uintptr_t); int fcntl(uintptr_t, int, uintptr_t); int fsync_range(int, int, long long, long long); int acct(uintptr_t); int chdir(uintptr_t); int chroot(uintptr_t); int close(int); int dup(int); void exit(int); int faccessat(int, uintptr_t, unsigned int, int); int fchdir(int); int fchmod(int, unsigned int); int fchmodat(int, uintptr_t, unsigned int, int); int fchownat(int, uintptr_t, int, int, int); int fdatasync(int); int getpgid(int); int getpgrp(); int getpid(); int getppid(); int getpriority(int, int); int getrusage(int, uintptr_t); int getsid(int); int kill(int, int); int syslog(int, uintptr_t, size_t); int mkdir(int, uintptr_t, unsigned int); int mkdirat(int, uintptr_t, unsigned int); int mkfifo(uintptr_t, unsigned int); int mknod(uintptr_t, unsigned int, int); int mknodat(int, uintptr_t, unsigned int, int); int nanosleep(uintptr_t, uintptr_t); int open64(uintptr_t, int, unsigned int); int openat(int, uintptr_t, int, unsigned int); int read(int, uintptr_t, size_t); int readlink(uintptr_t, uintptr_t, size_t); int renameat(int, uintptr_t, int, uintptr_t); int setdomainname(uintptr_t, size_t); int sethostname(uintptr_t, size_t); int setpgid(int, int); int setsid(); int settimeofday(uintptr_t); int setuid(int); int setgid(int); int setpriority(int, int, int); int statx(int, uintptr_t, int, int, uintptr_t); int sync(); uintptr_t times(uintptr_t); int umask(int); int uname(uintptr_t); int unlink(uintptr_t); int unlinkat(int, uintptr_t, int); int ustat(int, uintptr_t); int write(int, uintptr_t, size_t); int dup2(int, int); int posix_fadvise64(int, long long, long long, int); int fchown(int, int, int); int fstat(int, uintptr_t); int fstatat(int, uintptr_t, uintptr_t, int); int fstatfs(int, uintptr_t); int ftruncate(int, long long); int getegid(); int geteuid(); int getgid(); int getuid(); int lchown(uintptr_t, int, int); int listen(int, int); int lstat(uintptr_t, uintptr_t); int pause(); int pread64(int, uintptr_t, size_t, long long); int pwrite64(int, uintptr_t, size_t, long long); #define c_select select int select(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t); int pselect(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t); int setregid(int, int); int setreuid(int, int); int shutdown(int, int); long long splice(int, uintptr_t, int, uintptr_t, int, int); int stat(uintptr_t, uintptr_t); int statfs(uintptr_t, uintptr_t); int truncate(uintptr_t, long long); int bind(int, uintptr_t, uintptr_t); int connect(int, uintptr_t, uintptr_t); int getgroups(int, uintptr_t); int setgroups(int, uintptr_t); int getsockopt(int, int, int, uintptr_t, uintptr_t); int setsockopt(int, int, int, uintptr_t, uintptr_t); int socket(int, int, int); int socketpair(int, int, int, uintptr_t); int getpeername(int, uintptr_t, uintptr_t); int getsockname(int, uintptr_t, uintptr_t); int recvfrom(int, uintptr_t, size_t, int, uintptr_t, uintptr_t); int sendto(int, uintptr_t, size_t, int, uintptr_t, uintptr_t); int nrecvmsg(int, uintptr_t, int); int nsendmsg(int, uintptr_t, int); int munmap(uintptr_t, uintptr_t); int madvise(uintptr_t, size_t, int); int mprotect(uintptr_t, size_t, int); int mlock(uintptr_t, size_t); int mlockall(int); int msync(uintptr_t, size_t, int); int munlock(uintptr_t, size_t); int munlockall(); int pipe(uintptr_t); int poll(uintptr_t, int, int); int gettimeofday(uintptr_t, uintptr_t); int time(uintptr_t); int utime(uintptr_t, uintptr_t); unsigned long long getsystemcfg(int); int umount(uintptr_t); int getrlimit64(int, uintptr_t); long long lseek64(int, long long, int); uintptr_t mmap(uintptr_t, uintptr_t, int, int, int, long long); */ import "C" import ( "unsafe" ) // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func utimes(path string, times *[2]Timeval) (err error) { _p0 := uintptr(unsafe.Pointer(C.CString(path))) r0, er := C.utimes(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(times)))) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error) { _p0 := uintptr(unsafe.Pointer(C.CString(path))) r0, er := C.utimensat(C.int(dirfd), C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(times))), C.int(flag)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getcwd(buf []byte) (err error) { var _p0 *byte if len(buf) > 0 { _p0 = &buf[0] } var _p1 int _p1 = len(buf) r0, er := C.getcwd(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1)) if r0 == -1 && er != nil { err = er } 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, er := C.accept(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(rsa))), C.uintptr_t(uintptr(unsafe.Pointer(addrlen)))) fd = int(r0) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getdirent(fd int, buf []byte) (n int, err error) { var _p0 *byte if len(buf) > 0 { _p0 = &buf[0] } var _p1 int _p1 = len(buf) r0, er := C.getdirent(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1)) n = int(r0) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t, err error) { r0, er := C.wait4(C.int(pid), C.uintptr_t(uintptr(unsafe.Pointer(status))), C.int(options), C.uintptr_t(uintptr(unsafe.Pointer(rusage)))) wpid = Pid_t(r0) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctl(fd int, req int, arg uintptr) (err error) { r0, er := C.ioctl(C.int(fd), C.int(req), C.uintptr_t(arg)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) { r0, er := C.ioctl(C.int(fd), C.int(req), C.uintptr_t(uintptr(arg))) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func FcntlInt(fd uintptr, cmd int, arg int) (r int, err error) { r0, er := C.fcntl(C.uintptr_t(fd), C.int(cmd), C.uintptr_t(arg)) r = int(r0) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) (err error) { r0, er := C.fcntl(C.uintptr_t(fd), C.int(cmd), C.uintptr_t(uintptr(unsafe.Pointer(lk)))) if r0 == -1 && er != nil { err = er } 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, er := C.fcntl(C.uintptr_t(fd), C.int(cmd), C.uintptr_t(arg)) val = int(r0) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fsyncRange(fd int, how int, start int64, length int64) (err error) { r0, er := C.fsync_range(C.int(fd), C.int(how), C.longlong(start), C.longlong(length)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Acct(path string) (err error) { _p0 := uintptr(unsafe.Pointer(C.CString(path))) r0, er := C.acct(C.uintptr_t(_p0)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Chdir(path string) (err error) { _p0 := uintptr(unsafe.Pointer(C.CString(path))) r0, er := C.chdir(C.uintptr_t(_p0)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Chroot(path string) (err error) { _p0 := uintptr(unsafe.Pointer(C.CString(path))) r0, er := C.chroot(C.uintptr_t(_p0)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Close(fd int) (err error) { r0, er := C.close(C.int(fd)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup(oldfd int) (fd int, err error) { r0, er := C.dup(C.int(oldfd)) fd = int(r0) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { C.exit(C.int(code)) 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) { _p0 := uintptr(unsafe.Pointer(C.CString(path))) r0, er := C.faccessat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(flags)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchdir(fd int) (err error) { r0, er := C.fchdir(C.int(fd)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchmod(fd int, mode uint32) (err error) { r0, er := C.fchmod(C.int(fd), C.uint(mode)) if r0 == -1 && er != nil { err = er } 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) { _p0 := uintptr(unsafe.Pointer(C.CString(path))) r0, er := C.fchmodat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(flags)) if r0 == -1 && er != nil { err = er } 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) { _p0 := uintptr(unsafe.Pointer(C.CString(path))) r0, er := C.fchownat(C.int(dirfd), C.uintptr_t(_p0), C.int(uid), C.int(gid), C.int(flags)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fdatasync(fd int) (err error) { r0, er := C.fdatasync(C.int(fd)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgid(pid int) (pgid int, err error) { r0, er := C.getpgid(C.int(pid)) pgid = int(r0) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgrp() (pid int) { r0, _ := C.getpgrp() pid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { r0, _ := C.getpid() pid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { r0, _ := C.getppid() 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, er := C.getpriority(C.int(which), C.int(who)) prio = int(r0) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrusage(who int, rusage *Rusage) (err error) { r0, er := C.getrusage(C.int(who), C.uintptr_t(uintptr(unsafe.Pointer(rusage)))) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getsid(pid int) (sid int, err error) { r0, er := C.getsid(C.int(pid)) sid = int(r0) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Kill(pid int, sig Signal) (err error) { r0, er := C.kill(C.int(pid), C.int(sig)) if r0 == -1 && er != nil { err = er } 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 *byte if len(buf) > 0 { _p0 = &buf[0] } var _p1 int _p1 = len(buf) r0, er := C.syslog(C.int(typ), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1)) n = int(r0) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkdir(dirfd int, path string, mode uint32) (err error) { _p0 := uintptr(unsafe.Pointer(C.CString(path))) r0, er := C.mkdir(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkdirat(dirfd int, path string, mode uint32) (err error) { _p0 := uintptr(unsafe.Pointer(C.CString(path))) r0, er := C.mkdirat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkfifo(path string, mode uint32) (err error) { _p0 := uintptr(unsafe.Pointer(C.CString(path))) r0, er := C.mkfifo(C.uintptr_t(_p0), C.uint(mode)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mknod(path string, mode uint32, dev int) (err error) { _p0 := uintptr(unsafe.Pointer(C.CString(path))) r0, er := C.mknod(C.uintptr_t(_p0), C.uint(mode), C.int(dev)) if r0 == -1 && er != nil { err = er } 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) { _p0 := uintptr(unsafe.Pointer(C.CString(path))) r0, er := C.mknodat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(dev)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Nanosleep(time *Timespec, leftover *Timespec) (err error) { r0, er := C.nanosleep(C.uintptr_t(uintptr(unsafe.Pointer(time))), C.uintptr_t(uintptr(unsafe.Pointer(leftover)))) if r0 == -1 && er != nil { err = er } 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) { _p0 := uintptr(unsafe.Pointer(C.CString(path))) r0, er := C.open64(C.uintptr_t(_p0), C.int(mode), C.uint(perm)) fd = int(r0) if r0 == -1 && er != nil { err = er } 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) { _p0 := uintptr(unsafe.Pointer(C.CString(path))) r0, er := C.openat(C.int(dirfd), C.uintptr_t(_p0), C.int(flags), C.uint(mode)) fd = int(r0) if r0 == -1 && er != nil { err = er } 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 *byte if len(p) > 0 { _p0 = &p[0] } var _p1 int _p1 = len(p) r0, er := C.read(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1)) n = int(r0) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Readlink(path string, buf []byte) (n int, err error) { _p0 := uintptr(unsafe.Pointer(C.CString(path))) var _p1 *byte if len(buf) > 0 { _p1 = &buf[0] } var _p2 int _p2 = len(buf) r0, er := C.readlink(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(_p1))), C.size_t(_p2)) n = int(r0) if r0 == -1 && er != nil { err = er } 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) { _p0 := uintptr(unsafe.Pointer(C.CString(oldpath))) _p1 := uintptr(unsafe.Pointer(C.CString(newpath))) r0, er := C.renameat(C.int(olddirfd), C.uintptr_t(_p0), C.int(newdirfd), C.uintptr_t(_p1)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setdomainname(p []byte) (err error) { var _p0 *byte if len(p) > 0 { _p0 = &p[0] } var _p1 int _p1 = len(p) r0, er := C.setdomainname(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Sethostname(p []byte) (err error) { var _p0 *byte if len(p) > 0 { _p0 = &p[0] } var _p1 int _p1 = len(p) r0, er := C.sethostname(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setpgid(pid int, pgid int) (err error) { r0, er := C.setpgid(C.int(pid), C.int(pgid)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setsid() (pid int, err error) { r0, er := C.setsid() pid = int(r0) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Settimeofday(tv *Timeval) (err error) { r0, er := C.settimeofday(C.uintptr_t(uintptr(unsafe.Pointer(tv)))) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setuid(uid int) (err error) { r0, er := C.setuid(C.int(uid)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setgid(uid int) (err error) { r0, er := C.setgid(C.int(uid)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setpriority(which int, who int, prio int) (err error) { r0, er := C.setpriority(C.int(which), C.int(who), C.int(prio)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { _p0 := uintptr(unsafe.Pointer(C.CString(path))) r0, er := C.statx(C.int(dirfd), C.uintptr_t(_p0), C.int(flags), C.int(mask), C.uintptr_t(uintptr(unsafe.Pointer(stat)))) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Sync() { C.sync() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Times(tms *Tms) (ticks uintptr, err error) { r0, er := C.times(C.uintptr_t(uintptr(unsafe.Pointer(tms)))) ticks = uintptr(r0) if uintptr(r0) == ^uintptr(0) && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(mask int) (oldmask int) { r0, _ := C.umask(C.int(mask)) oldmask = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Uname(buf *Utsname) (err error) { r0, er := C.uname(C.uintptr_t(uintptr(unsafe.Pointer(buf)))) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Unlink(path string) (err error) { _p0 := uintptr(unsafe.Pointer(C.CString(path))) r0, er := C.unlink(C.uintptr_t(_p0)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Unlinkat(dirfd int, path string, flags int) (err error) { _p0 := uintptr(unsafe.Pointer(C.CString(path))) r0, er := C.unlinkat(C.int(dirfd), C.uintptr_t(_p0), C.int(flags)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Ustat(dev int, ubuf *Ustat_t) (err error) { r0, er := C.ustat(C.int(dev), C.uintptr_t(uintptr(unsafe.Pointer(ubuf)))) if r0 == -1 && er != nil { err = er } 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 *byte if len(p) > 0 { _p0 = &p[0] } var _p1 int _p1 = len(p) r0, er := C.write(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1)) n = int(r0) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup2(oldfd int, newfd int) (err error) { r0, er := C.dup2(C.int(oldfd), C.int(newfd)) if r0 == -1 && er != nil { err = er } 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) { r0, er := C.posix_fadvise64(C.int(fd), C.longlong(offset), C.longlong(length), C.int(advice)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchown(fd int, uid int, gid int) (err error) { r0, er := C.fchown(C.int(fd), C.int(uid), C.int(gid)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fstat(fd int, stat *Stat_t) (err error) { r0, er := C.fstat(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(stat)))) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { _p0 := uintptr(unsafe.Pointer(C.CString(path))) r0, er := C.fstatat(C.int(dirfd), C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(stat))), C.int(flags)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstatfs(fd int, buf *Statfs_t) (err error) { r0, er := C.fstatfs(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(buf)))) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Ftruncate(fd int, length int64) (err error) { r0, er := C.ftruncate(C.int(fd), C.longlong(length)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { r0, _ := C.getegid() egid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (euid int) { r0, _ := C.geteuid() euid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { r0, _ := C.getgid() gid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { r0, _ := C.getuid() uid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Lchown(path string, uid int, gid int) (err error) { _p0 := uintptr(unsafe.Pointer(C.CString(path))) r0, er := C.lchown(C.uintptr_t(_p0), C.int(uid), C.int(gid)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Listen(s int, n int) (err error) { r0, er := C.listen(C.int(s), C.int(n)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func lstat(path string, stat *Stat_t) (err error) { _p0 := uintptr(unsafe.Pointer(C.CString(path))) r0, er := C.lstat(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(stat)))) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Pause() (err error) { r0, er := C.pause() if r0 == -1 && er != nil { err = er } 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 *byte if len(p) > 0 { _p0 = &p[0] } var _p1 int _p1 = len(p) r0, er := C.pread64(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.longlong(offset)) n = int(r0) if r0 == -1 && er != nil { err = er } 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 *byte if len(p) > 0 { _p0 = &p[0] } var _p1 int _p1 = len(p) r0, er := C.pwrite64(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.longlong(offset)) n = int(r0) if r0 == -1 && er != nil { err = er } 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, er := C.c_select(C.int(nfd), C.uintptr_t(uintptr(unsafe.Pointer(r))), C.uintptr_t(uintptr(unsafe.Pointer(w))), C.uintptr_t(uintptr(unsafe.Pointer(e))), C.uintptr_t(uintptr(unsafe.Pointer(timeout)))) n = int(r0) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, er := C.pselect(C.int(nfd), C.uintptr_t(uintptr(unsafe.Pointer(r))), C.uintptr_t(uintptr(unsafe.Pointer(w))), C.uintptr_t(uintptr(unsafe.Pointer(e))), C.uintptr_t(uintptr(unsafe.Pointer(timeout))), C.uintptr_t(uintptr(unsafe.Pointer(sigmask)))) n = int(r0) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setregid(rgid int, egid int) (err error) { r0, er := C.setregid(C.int(rgid), C.int(egid)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setreuid(ruid int, euid int) (err error) { r0, er := C.setreuid(C.int(ruid), C.int(euid)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Shutdown(fd int, how int) (err error) { r0, er := C.shutdown(C.int(fd), C.int(how)) if r0 == -1 && er != nil { err = er } 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, er := C.splice(C.int(rfd), C.uintptr_t(uintptr(unsafe.Pointer(roff))), C.int(wfd), C.uintptr_t(uintptr(unsafe.Pointer(woff))), C.int(len), C.int(flags)) n = int64(r0) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func stat(path string, statptr *Stat_t) (err error) { _p0 := uintptr(unsafe.Pointer(C.CString(path))) r0, er := C.stat(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(statptr)))) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Statfs(path string, buf *Statfs_t) (err error) { _p0 := uintptr(unsafe.Pointer(C.CString(path))) r0, er := C.statfs(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(buf)))) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Truncate(path string, length int64) (err error) { _p0 := uintptr(unsafe.Pointer(C.CString(path))) r0, er := C.truncate(C.uintptr_t(_p0), C.longlong(length)) if r0 == -1 && er != nil { err = er } 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) { r0, er := C.bind(C.int(s), C.uintptr_t(uintptr(addr)), C.uintptr_t(uintptr(addrlen))) if r0 == -1 && er != nil { err = er } 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) { r0, er := C.connect(C.int(s), C.uintptr_t(uintptr(addr)), C.uintptr_t(uintptr(addrlen))) if r0 == -1 && er != nil { err = er } 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, er := C.getgroups(C.int(n), C.uintptr_t(uintptr(unsafe.Pointer(list)))) nn = int(r0) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setgroups(n int, list *_Gid_t) (err error) { r0, er := C.setgroups(C.int(n), C.uintptr_t(uintptr(unsafe.Pointer(list)))) if r0 == -1 && er != nil { err = er } 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) { r0, er := C.getsockopt(C.int(s), C.int(level), C.int(name), C.uintptr_t(uintptr(val)), C.uintptr_t(uintptr(unsafe.Pointer(vallen)))) if r0 == -1 && er != nil { err = er } 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) { r0, er := C.setsockopt(C.int(s), C.int(level), C.int(name), C.uintptr_t(uintptr(val)), C.uintptr_t(vallen)) if r0 == -1 && er != nil { err = er } 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, er := C.socket(C.int(domain), C.int(typ), C.int(proto)) fd = int(r0) if r0 == -1 && er != nil { err = er } 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) { r0, er := C.socketpair(C.int(domain), C.int(typ), C.int(proto), C.uintptr_t(uintptr(unsafe.Pointer(fd)))) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { r0, er := C.getpeername(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(rsa))), C.uintptr_t(uintptr(unsafe.Pointer(addrlen)))) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { r0, er := C.getsockname(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(rsa))), C.uintptr_t(uintptr(unsafe.Pointer(addrlen)))) if r0 == -1 && er != nil { err = er } 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 *byte if len(p) > 0 { _p0 = &p[0] } var _p1 int _p1 = len(p) r0, er := C.recvfrom(C.int(fd), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(flags), C.uintptr_t(uintptr(unsafe.Pointer(from))), C.uintptr_t(uintptr(unsafe.Pointer(fromlen)))) n = int(r0) if r0 == -1 && er != nil { err = er } 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 *byte if len(buf) > 0 { _p0 = &buf[0] } var _p1 int _p1 = len(buf) r0, er := C.sendto(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(flags), C.uintptr_t(uintptr(to)), C.uintptr_t(uintptr(addrlen))) if r0 == -1 && er != nil { err = er } 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, er := C.nrecvmsg(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(msg))), C.int(flags)) n = int(r0) if r0 == -1 && er != nil { err = er } 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, er := C.nsendmsg(C.int(s), C.uintptr_t(uintptr(unsafe.Pointer(msg))), C.int(flags)) n = int(r0) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func munmap(addr uintptr, length uintptr) (err error) { r0, er := C.munmap(C.uintptr_t(addr), C.uintptr_t(length)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Madvise(b []byte, advice int) (err error) { var _p0 *byte if len(b) > 0 { _p0 = &b[0] } var _p1 int _p1 = len(b) r0, er := C.madvise(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(advice)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mprotect(b []byte, prot int) (err error) { var _p0 *byte if len(b) > 0 { _p0 = &b[0] } var _p1 int _p1 = len(b) r0, er := C.mprotect(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(prot)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mlock(b []byte) (err error) { var _p0 *byte if len(b) > 0 { _p0 = &b[0] } var _p1 int _p1 = len(b) r0, er := C.mlock(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mlockall(flags int) (err error) { r0, er := C.mlockall(C.int(flags)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Msync(b []byte, flags int) (err error) { var _p0 *byte if len(b) > 0 { _p0 = &b[0] } var _p1 int _p1 = len(b) r0, er := C.msync(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1), C.int(flags)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Munlock(b []byte) (err error) { var _p0 *byte if len(b) > 0 { _p0 = &b[0] } var _p1 int _p1 = len(b) r0, er := C.munlock(C.uintptr_t(uintptr(unsafe.Pointer(_p0))), C.size_t(_p1)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Munlockall() (err error) { r0, er := C.munlockall() if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pipe(p *[2]_C_int) (err error) { r0, er := C.pipe(C.uintptr_t(uintptr(unsafe.Pointer(p)))) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, er := C.poll(C.uintptr_t(uintptr(unsafe.Pointer(fds))), C.int(nfds), C.int(timeout)) n = int(r0) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func gettimeofday(tv *Timeval, tzp *Timezone) (err error) { r0, er := C.gettimeofday(C.uintptr_t(uintptr(unsafe.Pointer(tv))), C.uintptr_t(uintptr(unsafe.Pointer(tzp)))) if r0 == -1 && er != nil { err = er } 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, er := C.time(C.uintptr_t(uintptr(unsafe.Pointer(t)))) tt = Time_t(r0) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Utime(path string, buf *Utimbuf) (err error) { _p0 := uintptr(unsafe.Pointer(C.CString(path))) r0, er := C.utime(C.uintptr_t(_p0), C.uintptr_t(uintptr(unsafe.Pointer(buf)))) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getsystemcfg(label int) (n uint64) { r0, _ := C.getsystemcfg(C.int(label)) n = uint64(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func umount(target string) (err error) { _p0 := uintptr(unsafe.Pointer(C.CString(target))) r0, er := C.umount(C.uintptr_t(_p0)) if r0 == -1 && er != nil { err = er } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrlimit(resource int, rlim *Rlimit) (err error) { r0, er := C.getrlimit64(C.int(resource), C.uintptr_t(uintptr(unsafe.Pointer(rlim)))) if r0 == -1 && er != nil { err = er } 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, er := C.lseek64(C.int(fd), C.longlong(offset), C.int(whence)) off = int64(r0) if r0 == -1 && er != nil { err = er } 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, er := C.mmap(C.uintptr_t(addr), C.uintptr_t(length), C.int(prot), C.int(flags), C.int(fd), C.longlong(offset)) xaddr = uintptr(r0) if uintptr(r0) == ^uintptr(0) && er != nil { err = er } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go ================================================ // go run mksyscall_aix_ppc64.go -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build aix && ppc64 package unix import ( "unsafe" ) // 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 := callutimes(uintptr(unsafe.Pointer(_p0)), 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 utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := callutimensat(dirfd, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), flag) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getcwd(buf []byte) (err error) { var _p0 *byte if len(buf) > 0 { _p0 = &buf[0] } _, e1 := callgetcwd(uintptr(unsafe.Pointer(_p0)), len(buf)) 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 := callaccept(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 getdirent(fd int, buf []byte) (n int, err error) { var _p0 *byte if len(buf) > 0 { _p0 = &buf[0] } r0, e1 := callgetdirent(fd, uintptr(unsafe.Pointer(_p0)), 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 wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t, err error) { r0, e1 := callwait4(int(pid), uintptr(unsafe.Pointer(status)), options, uintptr(unsafe.Pointer(rusage))) wpid = Pid_t(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctl(fd int, req int, arg uintptr) (err error) { _, e1 := callioctl(fd, req, arg) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) { _, e1 := callioctl_ptr(fd, req, arg) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func FcntlInt(fd uintptr, cmd int, arg int) (r int, err error) { r0, e1 := callfcntl(fd, cmd, uintptr(arg)) r = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) (err error) { _, e1 := callfcntl(fd, cmd, uintptr(unsafe.Pointer(lk))) 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 := callfcntl(uintptr(fd), 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 fsyncRange(fd int, how int, start int64, length int64) (err error) { _, e1 := callfsync_range(fd, how, start, length) 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 := callacct(uintptr(unsafe.Pointer(_p0))) 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 := callchdir(uintptr(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 := callchroot(uintptr(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 := callclose(fd) 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 := calldup(oldfd) fd = 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) { callexit(code) 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 := callfaccessat(dirfd, uintptr(unsafe.Pointer(_p0)), mode, flags) 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 := callfchdir(fd) 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 := callfchmod(fd, mode) 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 := callfchmodat(dirfd, uintptr(unsafe.Pointer(_p0)), mode, flags) 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 := callfchownat(dirfd, uintptr(unsafe.Pointer(_p0)), uid, gid, flags) 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 := callfdatasync(fd) 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 := callgetpgid(pid) 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() (pid int) { r0, _ := callgetpgrp() pid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { r0, _ := callgetpid() pid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { r0, _ := callgetppid() 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 := callgetpriority(which, who) 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 := callgetrusage(who, uintptr(unsafe.Pointer(rusage))) 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 := callgetsid(pid) sid = 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 Signal) (err error) { _, e1 := callkill(pid, int(sig)) 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 *byte if len(buf) > 0 { _p0 = &buf[0] } r0, e1 := callsyslog(typ, uintptr(unsafe.Pointer(_p0)), 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 Mkdir(dirfd int, path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := callmkdir(dirfd, uintptr(unsafe.Pointer(_p0)), mode) 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 := callmkdirat(dirfd, uintptr(unsafe.Pointer(_p0)), mode) 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 := callmkfifo(uintptr(unsafe.Pointer(_p0)), mode) 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 := callmknod(uintptr(unsafe.Pointer(_p0)), mode, dev) 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 := callmknodat(dirfd, uintptr(unsafe.Pointer(_p0)), mode, dev) 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 := callnanosleep(uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover))) 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 := callopen64(uintptr(unsafe.Pointer(_p0)), mode, perm) fd = int(r0) 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 := callopenat(dirfd, uintptr(unsafe.Pointer(_p0)), flags, mode) fd = 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 *byte if len(p) > 0 { _p0 = &p[0] } r0, e1 := callread(fd, uintptr(unsafe.Pointer(_p0)), 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 *byte if len(buf) > 0 { _p1 = &buf[0] } r0, e1 := callreadlink(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 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 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 := callrenameat(olddirfd, uintptr(unsafe.Pointer(_p0)), newdirfd, uintptr(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 *byte if len(p) > 0 { _p0 = &p[0] } _, e1 := callsetdomainname(uintptr(unsafe.Pointer(_p0)), len(p)) 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 *byte if len(p) > 0 { _p0 = &p[0] } _, e1 := callsethostname(uintptr(unsafe.Pointer(_p0)), len(p)) 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 := callsetpgid(pid, pgid) 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 := callsetsid() 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 := callsettimeofday(uintptr(unsafe.Pointer(tv))) 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 := callsetuid(uid) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setgid(uid int) (err error) { _, e1 := callsetgid(uid) 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 := callsetpriority(which, who, prio) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := callstatx(dirfd, uintptr(unsafe.Pointer(_p0)), flags, mask, uintptr(unsafe.Pointer(stat))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Sync() { callsync() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Times(tms *Tms) (ticks uintptr, err error) { r0, e1 := calltimes(uintptr(unsafe.Pointer(tms))) 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, _ := callumask(mask) oldmask = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Uname(buf *Utsname) (err error) { _, e1 := calluname(uintptr(unsafe.Pointer(buf))) 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 := callunlink(uintptr(unsafe.Pointer(_p0))) 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 := callunlinkat(dirfd, uintptr(unsafe.Pointer(_p0)), flags) 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 := callustat(dev, uintptr(unsafe.Pointer(ubuf))) 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 *byte if len(p) > 0 { _p0 = &p[0] } r0, e1 := callwrite(fd, uintptr(unsafe.Pointer(_p0)), 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 Dup2(oldfd int, newfd int) (err error) { _, e1 := calldup2(oldfd, newfd) 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 := callposix_fadvise64(fd, offset, length, 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 := callfchown(fd, uid, 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 := callfstat(fd, uintptr(unsafe.Pointer(stat))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := callfstatat(dirfd, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), flags) 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 := callfstatfs(fd, uintptr(unsafe.Pointer(buf))) 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 := callftruncate(fd, 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, _ := callgetegid() egid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (euid int) { r0, _ := callgeteuid() euid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { r0, _ := callgetgid() gid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { r0, _ := callgetuid() uid = int(r0) 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 := calllchown(uintptr(unsafe.Pointer(_p0)), uid, gid) 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 := calllisten(s, n) 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 := calllstat(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat))) 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 := callpause() 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 *byte if len(p) > 0 { _p0 = &p[0] } r0, e1 := callpread64(fd, uintptr(unsafe.Pointer(_p0)), len(p), offset) 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 *byte if len(p) > 0 { _p0 = &p[0] } r0, e1 := callpwrite64(fd, uintptr(unsafe.Pointer(_p0)), len(p), offset) n = 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 := callselect(nfd, uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), 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 Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, e1 := callpselect(nfd, uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask))) n = int(r0) 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 := callsetregid(rgid, egid) 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 := callsetreuid(ruid, euid) 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 := callshutdown(fd, how) 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 := callsplice(rfd, uintptr(unsafe.Pointer(roff)), wfd, uintptr(unsafe.Pointer(woff)), len, 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, statptr *Stat_t) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := callstat(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(statptr))) 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 := callstatfs(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf))) 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 := calltruncate(uintptr(unsafe.Pointer(_p0)), length) 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 := callbind(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 := callconnect(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 := callgetgroups(n, uintptr(unsafe.Pointer(list))) 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 := callsetgroups(n, uintptr(unsafe.Pointer(list))) 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 := callgetsockopt(s, level, name, uintptr(val), uintptr(unsafe.Pointer(vallen))) 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 := callsetsockopt(s, level, name, uintptr(val), vallen) 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 := callsocket(domain, typ, 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 := callsocketpair(domain, typ, proto, uintptr(unsafe.Pointer(fd))) 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 := callgetpeername(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 := callgetsockname(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 *byte if len(p) > 0 { _p0 = &p[0] } r0, e1 := callrecvfrom(fd, uintptr(unsafe.Pointer(_p0)), len(p), 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 *byte if len(buf) > 0 { _p0 = &buf[0] } _, e1 := callsendto(s, uintptr(unsafe.Pointer(_p0)), len(buf), 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 := callnrecvmsg(s, uintptr(unsafe.Pointer(msg)), 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 := callnsendmsg(s, uintptr(unsafe.Pointer(msg)), 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 munmap(addr uintptr, length uintptr) (err error) { _, e1 := callmunmap(addr, length) 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 *byte if len(b) > 0 { _p0 = &b[0] } _, e1 := callmadvise(uintptr(unsafe.Pointer(_p0)), len(b), 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 *byte if len(b) > 0 { _p0 = &b[0] } _, e1 := callmprotect(uintptr(unsafe.Pointer(_p0)), len(b), 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 *byte if len(b) > 0 { _p0 = &b[0] } _, e1 := callmlock(uintptr(unsafe.Pointer(_p0)), len(b)) 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 := callmlockall(flags) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Msync(b []byte, flags int) (err error) { var _p0 *byte if len(b) > 0 { _p0 = &b[0] } _, e1 := callmsync(uintptr(unsafe.Pointer(_p0)), len(b), flags) 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 *byte if len(b) > 0 { _p0 = &b[0] } _, e1 := callmunlock(uintptr(unsafe.Pointer(_p0)), len(b)) 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 := callmunlockall() 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 := callpipe(uintptr(unsafe.Pointer(p))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, e1 := callpoll(uintptr(unsafe.Pointer(fds)), nfds, 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 gettimeofday(tv *Timeval, tzp *Timezone) (err error) { _, e1 := callgettimeofday(uintptr(unsafe.Pointer(tv)), uintptr(unsafe.Pointer(tzp))) 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 := calltime(uintptr(unsafe.Pointer(t))) 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 Utime(path string, buf *Utimbuf) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, e1 := callutime(uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getsystemcfg(label int) (n uint64) { r0, _ := callgetsystemcfg(label) n = uint64(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func umount(target string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(target) if err != nil { return } _, e1 := callumount(uintptr(unsafe.Pointer(_p0))) 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 *Rlimit) (err error) { _, e1 := callgetrlimit(resource, uintptr(unsafe.Pointer(rlim))) 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 := calllseek(fd, offset, 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 mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { r0, e1 := callmmap64(addr, length, prot, flags, fd, offset) xaddr = uintptr(r0) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go ================================================ // go run mksyscall_aix_ppc64.go -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build aix && ppc64 && gc package unix import ( "unsafe" ) //go:cgo_import_dynamic libc_utimes utimes "libc.a/shr_64.o" //go:cgo_import_dynamic libc_utimensat utimensat "libc.a/shr_64.o" //go:cgo_import_dynamic libc_getcwd getcwd "libc.a/shr_64.o" //go:cgo_import_dynamic libc_accept accept "libc.a/shr_64.o" //go:cgo_import_dynamic libc_getdirent getdirent "libc.a/shr_64.o" //go:cgo_import_dynamic libc_wait4 wait4 "libc.a/shr_64.o" //go:cgo_import_dynamic libc_ioctl ioctl "libc.a/shr_64.o" //go:cgo_import_dynamic libc_fcntl fcntl "libc.a/shr_64.o" //go:cgo_import_dynamic libc_fsync_range fsync_range "libc.a/shr_64.o" //go:cgo_import_dynamic libc_acct acct "libc.a/shr_64.o" //go:cgo_import_dynamic libc_chdir chdir "libc.a/shr_64.o" //go:cgo_import_dynamic libc_chroot chroot "libc.a/shr_64.o" //go:cgo_import_dynamic libc_close close "libc.a/shr_64.o" //go:cgo_import_dynamic libc_dup dup "libc.a/shr_64.o" //go:cgo_import_dynamic libc_exit exit "libc.a/shr_64.o" //go:cgo_import_dynamic libc_faccessat faccessat "libc.a/shr_64.o" //go:cgo_import_dynamic libc_fchdir fchdir "libc.a/shr_64.o" //go:cgo_import_dynamic libc_fchmod fchmod "libc.a/shr_64.o" //go:cgo_import_dynamic libc_fchmodat fchmodat "libc.a/shr_64.o" //go:cgo_import_dynamic libc_fchownat fchownat "libc.a/shr_64.o" //go:cgo_import_dynamic libc_fdatasync fdatasync "libc.a/shr_64.o" //go:cgo_import_dynamic libc_getpgid getpgid "libc.a/shr_64.o" //go:cgo_import_dynamic libc_getpgrp getpgrp "libc.a/shr_64.o" //go:cgo_import_dynamic libc_getpid getpid "libc.a/shr_64.o" //go:cgo_import_dynamic libc_getppid getppid "libc.a/shr_64.o" //go:cgo_import_dynamic libc_getpriority getpriority "libc.a/shr_64.o" //go:cgo_import_dynamic libc_getrusage getrusage "libc.a/shr_64.o" //go:cgo_import_dynamic libc_getsid getsid "libc.a/shr_64.o" //go:cgo_import_dynamic libc_kill kill "libc.a/shr_64.o" //go:cgo_import_dynamic libc_syslog syslog "libc.a/shr_64.o" //go:cgo_import_dynamic libc_mkdir mkdir "libc.a/shr_64.o" //go:cgo_import_dynamic libc_mkdirat mkdirat "libc.a/shr_64.o" //go:cgo_import_dynamic libc_mkfifo mkfifo "libc.a/shr_64.o" //go:cgo_import_dynamic libc_mknod mknod "libc.a/shr_64.o" //go:cgo_import_dynamic libc_mknodat mknodat "libc.a/shr_64.o" //go:cgo_import_dynamic libc_nanosleep nanosleep "libc.a/shr_64.o" //go:cgo_import_dynamic libc_open64 open64 "libc.a/shr_64.o" //go:cgo_import_dynamic libc_openat openat "libc.a/shr_64.o" //go:cgo_import_dynamic libc_read read "libc.a/shr_64.o" //go:cgo_import_dynamic libc_readlink readlink "libc.a/shr_64.o" //go:cgo_import_dynamic libc_renameat renameat "libc.a/shr_64.o" //go:cgo_import_dynamic libc_setdomainname setdomainname "libc.a/shr_64.o" //go:cgo_import_dynamic libc_sethostname sethostname "libc.a/shr_64.o" //go:cgo_import_dynamic libc_setpgid setpgid "libc.a/shr_64.o" //go:cgo_import_dynamic libc_setsid setsid "libc.a/shr_64.o" //go:cgo_import_dynamic libc_settimeofday settimeofday "libc.a/shr_64.o" //go:cgo_import_dynamic libc_setuid setuid "libc.a/shr_64.o" //go:cgo_import_dynamic libc_setgid setgid "libc.a/shr_64.o" //go:cgo_import_dynamic libc_setpriority setpriority "libc.a/shr_64.o" //go:cgo_import_dynamic libc_statx statx "libc.a/shr_64.o" //go:cgo_import_dynamic libc_sync sync "libc.a/shr_64.o" //go:cgo_import_dynamic libc_times times "libc.a/shr_64.o" //go:cgo_import_dynamic libc_umask umask "libc.a/shr_64.o" //go:cgo_import_dynamic libc_uname uname "libc.a/shr_64.o" //go:cgo_import_dynamic libc_unlink unlink "libc.a/shr_64.o" //go:cgo_import_dynamic libc_unlinkat unlinkat "libc.a/shr_64.o" //go:cgo_import_dynamic libc_ustat ustat "libc.a/shr_64.o" //go:cgo_import_dynamic libc_write write "libc.a/shr_64.o" //go:cgo_import_dynamic libc_dup2 dup2 "libc.a/shr_64.o" //go:cgo_import_dynamic libc_posix_fadvise64 posix_fadvise64 "libc.a/shr_64.o" //go:cgo_import_dynamic libc_fchown fchown "libc.a/shr_64.o" //go:cgo_import_dynamic libc_fstat fstat "libc.a/shr_64.o" //go:cgo_import_dynamic libc_fstatat fstatat "libc.a/shr_64.o" //go:cgo_import_dynamic libc_fstatfs fstatfs "libc.a/shr_64.o" //go:cgo_import_dynamic libc_ftruncate ftruncate "libc.a/shr_64.o" //go:cgo_import_dynamic libc_getegid getegid "libc.a/shr_64.o" //go:cgo_import_dynamic libc_geteuid geteuid "libc.a/shr_64.o" //go:cgo_import_dynamic libc_getgid getgid "libc.a/shr_64.o" //go:cgo_import_dynamic libc_getuid getuid "libc.a/shr_64.o" //go:cgo_import_dynamic libc_lchown lchown "libc.a/shr_64.o" //go:cgo_import_dynamic libc_listen listen "libc.a/shr_64.o" //go:cgo_import_dynamic libc_lstat lstat "libc.a/shr_64.o" //go:cgo_import_dynamic libc_pause pause "libc.a/shr_64.o" //go:cgo_import_dynamic libc_pread64 pread64 "libc.a/shr_64.o" //go:cgo_import_dynamic libc_pwrite64 pwrite64 "libc.a/shr_64.o" //go:cgo_import_dynamic libc_select select "libc.a/shr_64.o" //go:cgo_import_dynamic libc_pselect pselect "libc.a/shr_64.o" //go:cgo_import_dynamic libc_setregid setregid "libc.a/shr_64.o" //go:cgo_import_dynamic libc_setreuid setreuid "libc.a/shr_64.o" //go:cgo_import_dynamic libc_shutdown shutdown "libc.a/shr_64.o" //go:cgo_import_dynamic libc_splice splice "libc.a/shr_64.o" //go:cgo_import_dynamic libc_stat stat "libc.a/shr_64.o" //go:cgo_import_dynamic libc_statfs statfs "libc.a/shr_64.o" //go:cgo_import_dynamic libc_truncate truncate "libc.a/shr_64.o" //go:cgo_import_dynamic libc_bind bind "libc.a/shr_64.o" //go:cgo_import_dynamic libc_connect connect "libc.a/shr_64.o" //go:cgo_import_dynamic libc_getgroups getgroups "libc.a/shr_64.o" //go:cgo_import_dynamic libc_setgroups setgroups "libc.a/shr_64.o" //go:cgo_import_dynamic libc_getsockopt getsockopt "libc.a/shr_64.o" //go:cgo_import_dynamic libc_setsockopt setsockopt "libc.a/shr_64.o" //go:cgo_import_dynamic libc_socket socket "libc.a/shr_64.o" //go:cgo_import_dynamic libc_socketpair socketpair "libc.a/shr_64.o" //go:cgo_import_dynamic libc_getpeername getpeername "libc.a/shr_64.o" //go:cgo_import_dynamic libc_getsockname getsockname "libc.a/shr_64.o" //go:cgo_import_dynamic libc_recvfrom recvfrom "libc.a/shr_64.o" //go:cgo_import_dynamic libc_sendto sendto "libc.a/shr_64.o" //go:cgo_import_dynamic libc_nrecvmsg nrecvmsg "libc.a/shr_64.o" //go:cgo_import_dynamic libc_nsendmsg nsendmsg "libc.a/shr_64.o" //go:cgo_import_dynamic libc_munmap munmap "libc.a/shr_64.o" //go:cgo_import_dynamic libc_madvise madvise "libc.a/shr_64.o" //go:cgo_import_dynamic libc_mprotect mprotect "libc.a/shr_64.o" //go:cgo_import_dynamic libc_mlock mlock "libc.a/shr_64.o" //go:cgo_import_dynamic libc_mlockall mlockall "libc.a/shr_64.o" //go:cgo_import_dynamic libc_msync msync "libc.a/shr_64.o" //go:cgo_import_dynamic libc_munlock munlock "libc.a/shr_64.o" //go:cgo_import_dynamic libc_munlockall munlockall "libc.a/shr_64.o" //go:cgo_import_dynamic libc_pipe pipe "libc.a/shr_64.o" //go:cgo_import_dynamic libc_poll poll "libc.a/shr_64.o" //go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.a/shr_64.o" //go:cgo_import_dynamic libc_time time "libc.a/shr_64.o" //go:cgo_import_dynamic libc_utime utime "libc.a/shr_64.o" //go:cgo_import_dynamic libc_getsystemcfg getsystemcfg "libc.a/shr_64.o" //go:cgo_import_dynamic libc_umount umount "libc.a/shr_64.o" //go:cgo_import_dynamic libc_getrlimit getrlimit "libc.a/shr_64.o" //go:cgo_import_dynamic libc_lseek lseek "libc.a/shr_64.o" //go:cgo_import_dynamic libc_mmap64 mmap64 "libc.a/shr_64.o" //go:linkname libc_utimes libc_utimes //go:linkname libc_utimensat libc_utimensat //go:linkname libc_getcwd libc_getcwd //go:linkname libc_accept libc_accept //go:linkname libc_getdirent libc_getdirent //go:linkname libc_wait4 libc_wait4 //go:linkname libc_ioctl libc_ioctl //go:linkname libc_fcntl libc_fcntl //go:linkname libc_fsync_range libc_fsync_range //go:linkname libc_acct libc_acct //go:linkname libc_chdir libc_chdir //go:linkname libc_chroot libc_chroot //go:linkname libc_close libc_close //go:linkname libc_dup libc_dup //go:linkname libc_exit libc_exit //go:linkname libc_faccessat libc_faccessat //go:linkname libc_fchdir libc_fchdir //go:linkname libc_fchmod libc_fchmod //go:linkname libc_fchmodat libc_fchmodat //go:linkname libc_fchownat libc_fchownat //go:linkname libc_fdatasync libc_fdatasync //go:linkname libc_getpgid libc_getpgid //go:linkname libc_getpgrp libc_getpgrp //go:linkname libc_getpid libc_getpid //go:linkname libc_getppid libc_getppid //go:linkname libc_getpriority libc_getpriority //go:linkname libc_getrusage libc_getrusage //go:linkname libc_getsid libc_getsid //go:linkname libc_kill libc_kill //go:linkname libc_syslog libc_syslog //go:linkname libc_mkdir libc_mkdir //go:linkname libc_mkdirat libc_mkdirat //go:linkname libc_mkfifo libc_mkfifo //go:linkname libc_mknod libc_mknod //go:linkname libc_mknodat libc_mknodat //go:linkname libc_nanosleep libc_nanosleep //go:linkname libc_open64 libc_open64 //go:linkname libc_openat libc_openat //go:linkname libc_read libc_read //go:linkname libc_readlink libc_readlink //go:linkname libc_renameat libc_renameat //go:linkname libc_setdomainname libc_setdomainname //go:linkname libc_sethostname libc_sethostname //go:linkname libc_setpgid libc_setpgid //go:linkname libc_setsid libc_setsid //go:linkname libc_settimeofday libc_settimeofday //go:linkname libc_setuid libc_setuid //go:linkname libc_setgid libc_setgid //go:linkname libc_setpriority libc_setpriority //go:linkname libc_statx libc_statx //go:linkname libc_sync libc_sync //go:linkname libc_times libc_times //go:linkname libc_umask libc_umask //go:linkname libc_uname libc_uname //go:linkname libc_unlink libc_unlink //go:linkname libc_unlinkat libc_unlinkat //go:linkname libc_ustat libc_ustat //go:linkname libc_write libc_write //go:linkname libc_dup2 libc_dup2 //go:linkname libc_posix_fadvise64 libc_posix_fadvise64 //go:linkname libc_fchown libc_fchown //go:linkname libc_fstat libc_fstat //go:linkname libc_fstatat libc_fstatat //go:linkname libc_fstatfs libc_fstatfs //go:linkname libc_ftruncate libc_ftruncate //go:linkname libc_getegid libc_getegid //go:linkname libc_geteuid libc_geteuid //go:linkname libc_getgid libc_getgid //go:linkname libc_getuid libc_getuid //go:linkname libc_lchown libc_lchown //go:linkname libc_listen libc_listen //go:linkname libc_lstat libc_lstat //go:linkname libc_pause libc_pause //go:linkname libc_pread64 libc_pread64 //go:linkname libc_pwrite64 libc_pwrite64 //go:linkname libc_select libc_select //go:linkname libc_pselect libc_pselect //go:linkname libc_setregid libc_setregid //go:linkname libc_setreuid libc_setreuid //go:linkname libc_shutdown libc_shutdown //go:linkname libc_splice libc_splice //go:linkname libc_stat libc_stat //go:linkname libc_statfs libc_statfs //go:linkname libc_truncate libc_truncate //go:linkname libc_bind libc_bind //go:linkname libc_connect libc_connect //go:linkname libc_getgroups libc_getgroups //go:linkname libc_setgroups libc_setgroups //go:linkname libc_getsockopt libc_getsockopt //go:linkname libc_setsockopt libc_setsockopt //go:linkname libc_socket libc_socket //go:linkname libc_socketpair libc_socketpair //go:linkname libc_getpeername libc_getpeername //go:linkname libc_getsockname libc_getsockname //go:linkname libc_recvfrom libc_recvfrom //go:linkname libc_sendto libc_sendto //go:linkname libc_nrecvmsg libc_nrecvmsg //go:linkname libc_nsendmsg libc_nsendmsg //go:linkname libc_munmap libc_munmap //go:linkname libc_madvise libc_madvise //go:linkname libc_mprotect libc_mprotect //go:linkname libc_mlock libc_mlock //go:linkname libc_mlockall libc_mlockall //go:linkname libc_msync libc_msync //go:linkname libc_munlock libc_munlock //go:linkname libc_munlockall libc_munlockall //go:linkname libc_pipe libc_pipe //go:linkname libc_poll libc_poll //go:linkname libc_gettimeofday libc_gettimeofday //go:linkname libc_time libc_time //go:linkname libc_utime libc_utime //go:linkname libc_getsystemcfg libc_getsystemcfg //go:linkname libc_umount libc_umount //go:linkname libc_getrlimit libc_getrlimit //go:linkname libc_lseek libc_lseek //go:linkname libc_mmap64 libc_mmap64 type syscallFunc uintptr var ( libc_utimes, libc_utimensat, libc_getcwd, libc_accept, libc_getdirent, libc_wait4, libc_ioctl, libc_fcntl, libc_fsync_range, libc_acct, libc_chdir, libc_chroot, libc_close, libc_dup, libc_exit, libc_faccessat, libc_fchdir, libc_fchmod, libc_fchmodat, libc_fchownat, libc_fdatasync, libc_getpgid, libc_getpgrp, libc_getpid, libc_getppid, libc_getpriority, libc_getrusage, libc_getsid, libc_kill, libc_syslog, libc_mkdir, libc_mkdirat, libc_mkfifo, libc_mknod, libc_mknodat, libc_nanosleep, libc_open64, libc_openat, libc_read, libc_readlink, libc_renameat, libc_setdomainname, libc_sethostname, libc_setpgid, libc_setsid, libc_settimeofday, libc_setuid, libc_setgid, libc_setpriority, libc_statx, libc_sync, libc_times, libc_umask, libc_uname, libc_unlink, libc_unlinkat, libc_ustat, libc_write, libc_dup2, libc_posix_fadvise64, libc_fchown, libc_fstat, libc_fstatat, libc_fstatfs, libc_ftruncate, libc_getegid, libc_geteuid, libc_getgid, libc_getuid, libc_lchown, libc_listen, libc_lstat, libc_pause, libc_pread64, libc_pwrite64, libc_select, libc_pselect, libc_setregid, libc_setreuid, libc_shutdown, libc_splice, libc_stat, libc_statfs, libc_truncate, libc_bind, libc_connect, libc_getgroups, libc_setgroups, libc_getsockopt, libc_setsockopt, libc_socket, libc_socketpair, libc_getpeername, libc_getsockname, libc_recvfrom, libc_sendto, libc_nrecvmsg, libc_nsendmsg, libc_munmap, libc_madvise, libc_mprotect, libc_mlock, libc_mlockall, libc_msync, libc_munlock, libc_munlockall, libc_pipe, libc_poll, libc_gettimeofday, libc_time, libc_utime, libc_getsystemcfg, libc_umount, libc_getrlimit, libc_lseek, libc_mmap64 syscallFunc ) // Implemented in runtime/syscall_aix.go. func rawSyscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) func syscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno) // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callutimes(_p0 uintptr, times uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_utimes)), 2, _p0, times, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callutimensat(dirfd int, _p0 uintptr, times uintptr, flag int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_utimensat)), 4, uintptr(dirfd), _p0, times, uintptr(flag), 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetcwd(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getcwd)), 2, _p0, uintptr(_lenp0), 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callaccept(s int, rsa uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_accept)), 3, uintptr(s), rsa, addrlen, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetdirent(fd int, _p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getdirent)), 3, uintptr(fd), _p0, uintptr(_lenp0), 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callwait4(pid int, status uintptr, options int, rusage uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_wait4)), 4, uintptr(pid), status, uintptr(options), rusage, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callioctl(fd int, req int, arg uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_ioctl)), 3, uintptr(fd), uintptr(req), arg, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callioctl_ptr(fd int, req int, arg unsafe.Pointer) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_ioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callfcntl(fd uintptr, cmd int, arg uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fcntl)), 3, fd, uintptr(cmd), arg, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callfsync_range(fd int, how int, start int64, length int64) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fsync_range)), 4, uintptr(fd), uintptr(how), uintptr(start), uintptr(length), 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callacct(_p0 uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_acct)), 1, _p0, 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callchdir(_p0 uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_chdir)), 1, _p0, 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callchroot(_p0 uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_chroot)), 1, _p0, 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callclose(fd int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_close)), 1, uintptr(fd), 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func calldup(oldfd int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_dup)), 1, uintptr(oldfd), 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callexit(code int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_exit)), 1, uintptr(code), 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callfaccessat(dirfd int, _p0 uintptr, mode uint32, flags int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_faccessat)), 4, uintptr(dirfd), _p0, uintptr(mode), uintptr(flags), 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callfchdir(fd int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fchdir)), 1, uintptr(fd), 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callfchmod(fd int, mode uint32) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fchmod)), 2, uintptr(fd), uintptr(mode), 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callfchmodat(dirfd int, _p0 uintptr, mode uint32, flags int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fchmodat)), 4, uintptr(dirfd), _p0, uintptr(mode), uintptr(flags), 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callfchownat(dirfd int, _p0 uintptr, uid int, gid int, flags int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fchownat)), 5, uintptr(dirfd), _p0, uintptr(uid), uintptr(gid), uintptr(flags), 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callfdatasync(fd int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fdatasync)), 1, uintptr(fd), 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetpgid(pid int) (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getpgid)), 1, uintptr(pid), 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetpgrp() (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getpgrp)), 0, 0, 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetpid() (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getpid)), 0, 0, 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetppid() (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getppid)), 0, 0, 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetpriority(which int, who int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getpriority)), 2, uintptr(which), uintptr(who), 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetrusage(who int, rusage uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getrusage)), 2, uintptr(who), rusage, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetsid(pid int) (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getsid)), 1, uintptr(pid), 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callkill(pid int, sig int) (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_kill)), 2, uintptr(pid), uintptr(sig), 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsyslog(typ int, _p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_syslog)), 3, uintptr(typ), _p0, uintptr(_lenp0), 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmkdir(dirfd int, _p0 uintptr, mode uint32) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mkdir)), 3, uintptr(dirfd), _p0, uintptr(mode), 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmkdirat(dirfd int, _p0 uintptr, mode uint32) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mkdirat)), 3, uintptr(dirfd), _p0, uintptr(mode), 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmkfifo(_p0 uintptr, mode uint32) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mkfifo)), 2, _p0, uintptr(mode), 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmknod(_p0 uintptr, mode uint32, dev int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mknod)), 3, _p0, uintptr(mode), uintptr(dev), 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmknodat(dirfd int, _p0 uintptr, mode uint32, dev int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mknodat)), 4, uintptr(dirfd), _p0, uintptr(mode), uintptr(dev), 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callnanosleep(time uintptr, leftover uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_nanosleep)), 2, time, leftover, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callopen64(_p0 uintptr, mode int, perm uint32) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_open64)), 3, _p0, uintptr(mode), uintptr(perm), 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callopenat(dirfd int, _p0 uintptr, flags int, mode uint32) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_openat)), 4, uintptr(dirfd), _p0, uintptr(flags), uintptr(mode), 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callread(fd int, _p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_read)), 3, uintptr(fd), _p0, uintptr(_lenp0), 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callreadlink(_p0 uintptr, _p1 uintptr, _lenp1 int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_readlink)), 3, _p0, _p1, uintptr(_lenp1), 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callrenameat(olddirfd int, _p0 uintptr, newdirfd int, _p1 uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_renameat)), 4, uintptr(olddirfd), _p0, uintptr(newdirfd), _p1, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsetdomainname(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_setdomainname)), 2, _p0, uintptr(_lenp0), 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsethostname(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_sethostname)), 2, _p0, uintptr(_lenp0), 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsetpgid(pid int, pgid int) (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_setpgid)), 2, uintptr(pid), uintptr(pgid), 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsetsid() (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_setsid)), 0, 0, 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsettimeofday(tv uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_settimeofday)), 1, tv, 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsetuid(uid int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_setuid)), 1, uintptr(uid), 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsetgid(uid int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_setgid)), 1, uintptr(uid), 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsetpriority(which int, who int, prio int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_setpriority)), 3, uintptr(which), uintptr(who), uintptr(prio), 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callstatx(dirfd int, _p0 uintptr, flags int, mask int, stat uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_statx)), 5, uintptr(dirfd), _p0, uintptr(flags), uintptr(mask), stat, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsync() (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_sync)), 0, 0, 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func calltimes(tms uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_times)), 1, tms, 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callumask(mask int) (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_umask)), 1, uintptr(mask), 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func calluname(buf uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_uname)), 1, buf, 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callunlink(_p0 uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_unlink)), 1, _p0, 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callunlinkat(dirfd int, _p0 uintptr, flags int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_unlinkat)), 3, uintptr(dirfd), _p0, uintptr(flags), 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callustat(dev int, ubuf uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_ustat)), 2, uintptr(dev), ubuf, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callwrite(fd int, _p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_write)), 3, uintptr(fd), _p0, uintptr(_lenp0), 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func calldup2(oldfd int, newfd int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_dup2)), 2, uintptr(oldfd), uintptr(newfd), 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callposix_fadvise64(fd int, offset int64, length int64, advice int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_posix_fadvise64)), 4, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callfchown(fd int, uid int, gid int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fchown)), 3, uintptr(fd), uintptr(uid), uintptr(gid), 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callfstat(fd int, stat uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fstat)), 2, uintptr(fd), stat, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callfstatat(dirfd int, _p0 uintptr, stat uintptr, flags int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fstatat)), 4, uintptr(dirfd), _p0, stat, uintptr(flags), 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callfstatfs(fd int, buf uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fstatfs)), 2, uintptr(fd), buf, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callftruncate(fd int, length int64) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_ftruncate)), 2, uintptr(fd), uintptr(length), 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetegid() (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getegid)), 0, 0, 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgeteuid() (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_geteuid)), 0, 0, 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetgid() (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getgid)), 0, 0, 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetuid() (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getuid)), 0, 0, 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func calllchown(_p0 uintptr, uid int, gid int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_lchown)), 3, _p0, uintptr(uid), uintptr(gid), 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func calllisten(s int, n int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_listen)), 2, uintptr(s), uintptr(n), 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func calllstat(_p0 uintptr, stat uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_lstat)), 2, _p0, stat, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callpause() (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_pause)), 0, 0, 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callpread64(fd int, _p0 uintptr, _lenp0 int, offset int64) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_pread64)), 4, uintptr(fd), _p0, uintptr(_lenp0), uintptr(offset), 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callpwrite64(fd int, _p0 uintptr, _lenp0 int, offset int64) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_pwrite64)), 4, uintptr(fd), _p0, uintptr(_lenp0), uintptr(offset), 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callselect(nfd int, r uintptr, w uintptr, e uintptr, timeout uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_select)), 5, uintptr(nfd), r, w, e, timeout, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callpselect(nfd int, r uintptr, w uintptr, e uintptr, timeout uintptr, sigmask uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_pselect)), 6, uintptr(nfd), r, w, e, timeout, sigmask) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsetregid(rgid int, egid int) (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_setregid)), 2, uintptr(rgid), uintptr(egid), 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsetreuid(ruid int, euid int) (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_setreuid)), 2, uintptr(ruid), uintptr(euid), 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callshutdown(fd int, how int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_shutdown)), 2, uintptr(fd), uintptr(how), 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsplice(rfd int, roff uintptr, wfd int, woff uintptr, len int, flags int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_splice)), 6, uintptr(rfd), roff, uintptr(wfd), woff, uintptr(len), uintptr(flags)) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callstat(_p0 uintptr, statptr uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_stat)), 2, _p0, statptr, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callstatfs(_p0 uintptr, buf uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_statfs)), 2, _p0, buf, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func calltruncate(_p0 uintptr, length int64) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_truncate)), 2, _p0, uintptr(length), 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callbind(s int, addr uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_bind)), 3, uintptr(s), addr, addrlen, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callconnect(s int, addr uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_connect)), 3, uintptr(s), addr, addrlen, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetgroups(n int, list uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getgroups)), 2, uintptr(n), list, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsetgroups(n int, list uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_setgroups)), 2, uintptr(n), list, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetsockopt(s int, level int, name int, val uintptr, vallen uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), val, vallen, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsetsockopt(s int, level int, name int, val uintptr, vallen uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_setsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), val, vallen, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsocket(domain int, typ int, proto int) (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_socket)), 3, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsocketpair(domain int, typ int, proto int, fd uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_socketpair)), 4, uintptr(domain), uintptr(typ), uintptr(proto), fd, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetpeername(fd int, rsa uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getpeername)), 3, uintptr(fd), rsa, addrlen, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetsockname(fd int, rsa uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getsockname)), 3, uintptr(fd), rsa, addrlen, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callrecvfrom(fd int, _p0 uintptr, _lenp0 int, flags int, from uintptr, fromlen uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_recvfrom)), 6, uintptr(fd), _p0, uintptr(_lenp0), uintptr(flags), from, fromlen) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsendto(s int, _p0 uintptr, _lenp0 int, flags int, to uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_sendto)), 6, uintptr(s), _p0, uintptr(_lenp0), uintptr(flags), to, addrlen) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callnrecvmsg(s int, msg uintptr, flags int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_nrecvmsg)), 3, uintptr(s), msg, uintptr(flags), 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callnsendmsg(s int, msg uintptr, flags int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_nsendmsg)), 3, uintptr(s), msg, uintptr(flags), 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmunmap(addr uintptr, length uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_munmap)), 2, addr, length, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmadvise(_p0 uintptr, _lenp0 int, advice int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_madvise)), 3, _p0, uintptr(_lenp0), uintptr(advice), 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmprotect(_p0 uintptr, _lenp0 int, prot int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mprotect)), 3, _p0, uintptr(_lenp0), uintptr(prot), 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmlock(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mlock)), 2, _p0, uintptr(_lenp0), 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmlockall(flags int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mlockall)), 1, uintptr(flags), 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmsync(_p0 uintptr, _lenp0 int, flags int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_msync)), 3, _p0, uintptr(_lenp0), uintptr(flags), 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmunlock(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_munlock)), 2, _p0, uintptr(_lenp0), 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmunlockall() (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_munlockall)), 0, 0, 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callpipe(p uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_pipe)), 1, p, 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callpoll(fds uintptr, nfds int, timeout int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_poll)), 3, fds, uintptr(nfds), uintptr(timeout), 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgettimeofday(tv uintptr, tzp uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_gettimeofday)), 2, tv, tzp, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func calltime(t uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_time)), 1, t, 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callutime(_p0 uintptr, buf uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_utime)), 2, _p0, buf, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetsystemcfg(label int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getsystemcfg)), 1, uintptr(label), 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callumount(_p0 uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_umount)), 1, _p0, 0, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) { r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getrlimit)), 2, uintptr(resource), rlim, 0, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func calllseek(fd int, offset int64, whence int) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_lseek)), 3, uintptr(fd), uintptr(offset), uintptr(whence), 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmmap64(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (r1 uintptr, e1 Errno) { r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_mmap64)), 6, addr, length, uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)) return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go ================================================ // go run mksyscall_aix_ppc64.go -aix -tags aix,ppc64 syscall_aix.go syscall_aix_ppc64.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build aix && ppc64 && gccgo package unix /* #include int utimes(uintptr_t, uintptr_t); int utimensat(int, uintptr_t, uintptr_t, int); int getcwd(uintptr_t, size_t); int accept(int, uintptr_t, uintptr_t); int getdirent(int, uintptr_t, size_t); int wait4(int, uintptr_t, int, uintptr_t); int ioctl(int, int, uintptr_t); int fcntl(uintptr_t, int, uintptr_t); int fsync_range(int, int, long long, long long); int acct(uintptr_t); int chdir(uintptr_t); int chroot(uintptr_t); int close(int); int dup(int); void exit(int); int faccessat(int, uintptr_t, unsigned int, int); int fchdir(int); int fchmod(int, unsigned int); int fchmodat(int, uintptr_t, unsigned int, int); int fchownat(int, uintptr_t, int, int, int); int fdatasync(int); int getpgid(int); int getpgrp(); int getpid(); int getppid(); int getpriority(int, int); int getrusage(int, uintptr_t); int getsid(int); int kill(int, int); int syslog(int, uintptr_t, size_t); int mkdir(int, uintptr_t, unsigned int); int mkdirat(int, uintptr_t, unsigned int); int mkfifo(uintptr_t, unsigned int); int mknod(uintptr_t, unsigned int, int); int mknodat(int, uintptr_t, unsigned int, int); int nanosleep(uintptr_t, uintptr_t); int open64(uintptr_t, int, unsigned int); int openat(int, uintptr_t, int, unsigned int); int read(int, uintptr_t, size_t); int readlink(uintptr_t, uintptr_t, size_t); int renameat(int, uintptr_t, int, uintptr_t); int setdomainname(uintptr_t, size_t); int sethostname(uintptr_t, size_t); int setpgid(int, int); int setsid(); int settimeofday(uintptr_t); int setuid(int); int setgid(int); int setpriority(int, int, int); int statx(int, uintptr_t, int, int, uintptr_t); int sync(); uintptr_t times(uintptr_t); int umask(int); int uname(uintptr_t); int unlink(uintptr_t); int unlinkat(int, uintptr_t, int); int ustat(int, uintptr_t); int write(int, uintptr_t, size_t); int dup2(int, int); int posix_fadvise64(int, long long, long long, int); int fchown(int, int, int); int fstat(int, uintptr_t); int fstatat(int, uintptr_t, uintptr_t, int); int fstatfs(int, uintptr_t); int ftruncate(int, long long); int getegid(); int geteuid(); int getgid(); int getuid(); int lchown(uintptr_t, int, int); int listen(int, int); int lstat(uintptr_t, uintptr_t); int pause(); int pread64(int, uintptr_t, size_t, long long); int pwrite64(int, uintptr_t, size_t, long long); #define c_select select int select(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t); int pselect(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t); int setregid(int, int); int setreuid(int, int); int shutdown(int, int); long long splice(int, uintptr_t, int, uintptr_t, int, int); int stat(uintptr_t, uintptr_t); int statfs(uintptr_t, uintptr_t); int truncate(uintptr_t, long long); int bind(int, uintptr_t, uintptr_t); int connect(int, uintptr_t, uintptr_t); int getgroups(int, uintptr_t); int setgroups(int, uintptr_t); int getsockopt(int, int, int, uintptr_t, uintptr_t); int setsockopt(int, int, int, uintptr_t, uintptr_t); int socket(int, int, int); int socketpair(int, int, int, uintptr_t); int getpeername(int, uintptr_t, uintptr_t); int getsockname(int, uintptr_t, uintptr_t); int recvfrom(int, uintptr_t, size_t, int, uintptr_t, uintptr_t); int sendto(int, uintptr_t, size_t, int, uintptr_t, uintptr_t); int nrecvmsg(int, uintptr_t, int); int nsendmsg(int, uintptr_t, int); int munmap(uintptr_t, uintptr_t); int madvise(uintptr_t, size_t, int); int mprotect(uintptr_t, size_t, int); int mlock(uintptr_t, size_t); int mlockall(int); int msync(uintptr_t, size_t, int); int munlock(uintptr_t, size_t); int munlockall(); int pipe(uintptr_t); int poll(uintptr_t, int, int); int gettimeofday(uintptr_t, uintptr_t); int time(uintptr_t); int utime(uintptr_t, uintptr_t); unsigned long long getsystemcfg(int); int umount(uintptr_t); int getrlimit(int, uintptr_t); long long lseek(int, long long, int); uintptr_t mmap64(uintptr_t, uintptr_t, int, int, int, long long); */ import "C" import ( "syscall" "unsafe" ) // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callutimes(_p0 uintptr, times uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.utimes(C.uintptr_t(_p0), C.uintptr_t(times))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callutimensat(dirfd int, _p0 uintptr, times uintptr, flag int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.utimensat(C.int(dirfd), C.uintptr_t(_p0), C.uintptr_t(times), C.int(flag))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetcwd(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.getcwd(C.uintptr_t(_p0), C.size_t(_lenp0))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callaccept(s int, rsa uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.accept(C.int(s), C.uintptr_t(rsa), C.uintptr_t(addrlen))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetdirent(fd int, _p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.getdirent(C.int(fd), C.uintptr_t(_p0), C.size_t(_lenp0))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callwait4(pid int, status uintptr, options int, rusage uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.wait4(C.int(pid), C.uintptr_t(status), C.int(options), C.uintptr_t(rusage))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callioctl(fd int, req int, arg uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.ioctl(C.int(fd), C.int(req), C.uintptr_t(arg))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callioctl_ptr(fd int, req int, arg unsafe.Pointer) (r1 uintptr, e1 Errno) { r1 = uintptr(C.ioctl(C.int(fd), C.int(req), C.uintptr_t(uintptr(arg)))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callfcntl(fd uintptr, cmd int, arg uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.fcntl(C.uintptr_t(fd), C.int(cmd), C.uintptr_t(arg))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callfsync_range(fd int, how int, start int64, length int64) (r1 uintptr, e1 Errno) { r1 = uintptr(C.fsync_range(C.int(fd), C.int(how), C.longlong(start), C.longlong(length))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callacct(_p0 uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.acct(C.uintptr_t(_p0))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callchdir(_p0 uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.chdir(C.uintptr_t(_p0))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callchroot(_p0 uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.chroot(C.uintptr_t(_p0))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callclose(fd int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.close(C.int(fd))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func calldup(oldfd int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.dup(C.int(oldfd))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callexit(code int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.exit(C.int(code))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callfaccessat(dirfd int, _p0 uintptr, mode uint32, flags int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.faccessat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(flags))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callfchdir(fd int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.fchdir(C.int(fd))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callfchmod(fd int, mode uint32) (r1 uintptr, e1 Errno) { r1 = uintptr(C.fchmod(C.int(fd), C.uint(mode))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callfchmodat(dirfd int, _p0 uintptr, mode uint32, flags int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.fchmodat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(flags))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callfchownat(dirfd int, _p0 uintptr, uid int, gid int, flags int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.fchownat(C.int(dirfd), C.uintptr_t(_p0), C.int(uid), C.int(gid), C.int(flags))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callfdatasync(fd int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.fdatasync(C.int(fd))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetpgid(pid int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.getpgid(C.int(pid))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetpgrp() (r1 uintptr, e1 Errno) { r1 = uintptr(C.getpgrp()) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetpid() (r1 uintptr, e1 Errno) { r1 = uintptr(C.getpid()) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetppid() (r1 uintptr, e1 Errno) { r1 = uintptr(C.getppid()) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetpriority(which int, who int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.getpriority(C.int(which), C.int(who))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetrusage(who int, rusage uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.getrusage(C.int(who), C.uintptr_t(rusage))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetsid(pid int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.getsid(C.int(pid))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callkill(pid int, sig int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.kill(C.int(pid), C.int(sig))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsyslog(typ int, _p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.syslog(C.int(typ), C.uintptr_t(_p0), C.size_t(_lenp0))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmkdir(dirfd int, _p0 uintptr, mode uint32) (r1 uintptr, e1 Errno) { r1 = uintptr(C.mkdir(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmkdirat(dirfd int, _p0 uintptr, mode uint32) (r1 uintptr, e1 Errno) { r1 = uintptr(C.mkdirat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmkfifo(_p0 uintptr, mode uint32) (r1 uintptr, e1 Errno) { r1 = uintptr(C.mkfifo(C.uintptr_t(_p0), C.uint(mode))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmknod(_p0 uintptr, mode uint32, dev int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.mknod(C.uintptr_t(_p0), C.uint(mode), C.int(dev))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmknodat(dirfd int, _p0 uintptr, mode uint32, dev int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.mknodat(C.int(dirfd), C.uintptr_t(_p0), C.uint(mode), C.int(dev))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callnanosleep(time uintptr, leftover uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.nanosleep(C.uintptr_t(time), C.uintptr_t(leftover))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callopen64(_p0 uintptr, mode int, perm uint32) (r1 uintptr, e1 Errno) { r1 = uintptr(C.open64(C.uintptr_t(_p0), C.int(mode), C.uint(perm))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callopenat(dirfd int, _p0 uintptr, flags int, mode uint32) (r1 uintptr, e1 Errno) { r1 = uintptr(C.openat(C.int(dirfd), C.uintptr_t(_p0), C.int(flags), C.uint(mode))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callread(fd int, _p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.read(C.int(fd), C.uintptr_t(_p0), C.size_t(_lenp0))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callreadlink(_p0 uintptr, _p1 uintptr, _lenp1 int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.readlink(C.uintptr_t(_p0), C.uintptr_t(_p1), C.size_t(_lenp1))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callrenameat(olddirfd int, _p0 uintptr, newdirfd int, _p1 uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.renameat(C.int(olddirfd), C.uintptr_t(_p0), C.int(newdirfd), C.uintptr_t(_p1))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsetdomainname(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.setdomainname(C.uintptr_t(_p0), C.size_t(_lenp0))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsethostname(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.sethostname(C.uintptr_t(_p0), C.size_t(_lenp0))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsetpgid(pid int, pgid int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.setpgid(C.int(pid), C.int(pgid))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsetsid() (r1 uintptr, e1 Errno) { r1 = uintptr(C.setsid()) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsettimeofday(tv uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.settimeofday(C.uintptr_t(tv))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsetuid(uid int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.setuid(C.int(uid))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsetgid(uid int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.setgid(C.int(uid))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsetpriority(which int, who int, prio int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.setpriority(C.int(which), C.int(who), C.int(prio))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callstatx(dirfd int, _p0 uintptr, flags int, mask int, stat uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.statx(C.int(dirfd), C.uintptr_t(_p0), C.int(flags), C.int(mask), C.uintptr_t(stat))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsync() (r1 uintptr, e1 Errno) { r1 = uintptr(C.sync()) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func calltimes(tms uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.times(C.uintptr_t(tms))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callumask(mask int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.umask(C.int(mask))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func calluname(buf uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.uname(C.uintptr_t(buf))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callunlink(_p0 uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.unlink(C.uintptr_t(_p0))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callunlinkat(dirfd int, _p0 uintptr, flags int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.unlinkat(C.int(dirfd), C.uintptr_t(_p0), C.int(flags))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callustat(dev int, ubuf uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.ustat(C.int(dev), C.uintptr_t(ubuf))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callwrite(fd int, _p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.write(C.int(fd), C.uintptr_t(_p0), C.size_t(_lenp0))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func calldup2(oldfd int, newfd int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.dup2(C.int(oldfd), C.int(newfd))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callposix_fadvise64(fd int, offset int64, length int64, advice int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.posix_fadvise64(C.int(fd), C.longlong(offset), C.longlong(length), C.int(advice))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callfchown(fd int, uid int, gid int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.fchown(C.int(fd), C.int(uid), C.int(gid))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callfstat(fd int, stat uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.fstat(C.int(fd), C.uintptr_t(stat))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callfstatat(dirfd int, _p0 uintptr, stat uintptr, flags int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.fstatat(C.int(dirfd), C.uintptr_t(_p0), C.uintptr_t(stat), C.int(flags))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callfstatfs(fd int, buf uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.fstatfs(C.int(fd), C.uintptr_t(buf))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callftruncate(fd int, length int64) (r1 uintptr, e1 Errno) { r1 = uintptr(C.ftruncate(C.int(fd), C.longlong(length))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetegid() (r1 uintptr, e1 Errno) { r1 = uintptr(C.getegid()) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgeteuid() (r1 uintptr, e1 Errno) { r1 = uintptr(C.geteuid()) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetgid() (r1 uintptr, e1 Errno) { r1 = uintptr(C.getgid()) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetuid() (r1 uintptr, e1 Errno) { r1 = uintptr(C.getuid()) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func calllchown(_p0 uintptr, uid int, gid int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.lchown(C.uintptr_t(_p0), C.int(uid), C.int(gid))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func calllisten(s int, n int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.listen(C.int(s), C.int(n))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func calllstat(_p0 uintptr, stat uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.lstat(C.uintptr_t(_p0), C.uintptr_t(stat))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callpause() (r1 uintptr, e1 Errno) { r1 = uintptr(C.pause()) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callpread64(fd int, _p0 uintptr, _lenp0 int, offset int64) (r1 uintptr, e1 Errno) { r1 = uintptr(C.pread64(C.int(fd), C.uintptr_t(_p0), C.size_t(_lenp0), C.longlong(offset))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callpwrite64(fd int, _p0 uintptr, _lenp0 int, offset int64) (r1 uintptr, e1 Errno) { r1 = uintptr(C.pwrite64(C.int(fd), C.uintptr_t(_p0), C.size_t(_lenp0), C.longlong(offset))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callselect(nfd int, r uintptr, w uintptr, e uintptr, timeout uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.c_select(C.int(nfd), C.uintptr_t(r), C.uintptr_t(w), C.uintptr_t(e), C.uintptr_t(timeout))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callpselect(nfd int, r uintptr, w uintptr, e uintptr, timeout uintptr, sigmask uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.pselect(C.int(nfd), C.uintptr_t(r), C.uintptr_t(w), C.uintptr_t(e), C.uintptr_t(timeout), C.uintptr_t(sigmask))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsetregid(rgid int, egid int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.setregid(C.int(rgid), C.int(egid))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsetreuid(ruid int, euid int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.setreuid(C.int(ruid), C.int(euid))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callshutdown(fd int, how int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.shutdown(C.int(fd), C.int(how))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsplice(rfd int, roff uintptr, wfd int, woff uintptr, len int, flags int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.splice(C.int(rfd), C.uintptr_t(roff), C.int(wfd), C.uintptr_t(woff), C.int(len), C.int(flags))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callstat(_p0 uintptr, statptr uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.stat(C.uintptr_t(_p0), C.uintptr_t(statptr))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callstatfs(_p0 uintptr, buf uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.statfs(C.uintptr_t(_p0), C.uintptr_t(buf))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func calltruncate(_p0 uintptr, length int64) (r1 uintptr, e1 Errno) { r1 = uintptr(C.truncate(C.uintptr_t(_p0), C.longlong(length))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callbind(s int, addr uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.bind(C.int(s), C.uintptr_t(addr), C.uintptr_t(addrlen))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callconnect(s int, addr uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.connect(C.int(s), C.uintptr_t(addr), C.uintptr_t(addrlen))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetgroups(n int, list uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.getgroups(C.int(n), C.uintptr_t(list))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsetgroups(n int, list uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.setgroups(C.int(n), C.uintptr_t(list))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetsockopt(s int, level int, name int, val uintptr, vallen uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.getsockopt(C.int(s), C.int(level), C.int(name), C.uintptr_t(val), C.uintptr_t(vallen))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsetsockopt(s int, level int, name int, val uintptr, vallen uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.setsockopt(C.int(s), C.int(level), C.int(name), C.uintptr_t(val), C.uintptr_t(vallen))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsocket(domain int, typ int, proto int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.socket(C.int(domain), C.int(typ), C.int(proto))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsocketpair(domain int, typ int, proto int, fd uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.socketpair(C.int(domain), C.int(typ), C.int(proto), C.uintptr_t(fd))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetpeername(fd int, rsa uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.getpeername(C.int(fd), C.uintptr_t(rsa), C.uintptr_t(addrlen))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetsockname(fd int, rsa uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.getsockname(C.int(fd), C.uintptr_t(rsa), C.uintptr_t(addrlen))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callrecvfrom(fd int, _p0 uintptr, _lenp0 int, flags int, from uintptr, fromlen uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.recvfrom(C.int(fd), C.uintptr_t(_p0), C.size_t(_lenp0), C.int(flags), C.uintptr_t(from), C.uintptr_t(fromlen))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callsendto(s int, _p0 uintptr, _lenp0 int, flags int, to uintptr, addrlen uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.sendto(C.int(s), C.uintptr_t(_p0), C.size_t(_lenp0), C.int(flags), C.uintptr_t(to), C.uintptr_t(addrlen))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callnrecvmsg(s int, msg uintptr, flags int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.nrecvmsg(C.int(s), C.uintptr_t(msg), C.int(flags))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callnsendmsg(s int, msg uintptr, flags int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.nsendmsg(C.int(s), C.uintptr_t(msg), C.int(flags))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmunmap(addr uintptr, length uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.munmap(C.uintptr_t(addr), C.uintptr_t(length))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmadvise(_p0 uintptr, _lenp0 int, advice int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.madvise(C.uintptr_t(_p0), C.size_t(_lenp0), C.int(advice))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmprotect(_p0 uintptr, _lenp0 int, prot int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.mprotect(C.uintptr_t(_p0), C.size_t(_lenp0), C.int(prot))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmlock(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.mlock(C.uintptr_t(_p0), C.size_t(_lenp0))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmlockall(flags int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.mlockall(C.int(flags))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmsync(_p0 uintptr, _lenp0 int, flags int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.msync(C.uintptr_t(_p0), C.size_t(_lenp0), C.int(flags))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmunlock(_p0 uintptr, _lenp0 int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.munlock(C.uintptr_t(_p0), C.size_t(_lenp0))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmunlockall() (r1 uintptr, e1 Errno) { r1 = uintptr(C.munlockall()) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callpipe(p uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.pipe(C.uintptr_t(p))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callpoll(fds uintptr, nfds int, timeout int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.poll(C.uintptr_t(fds), C.int(nfds), C.int(timeout))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgettimeofday(tv uintptr, tzp uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.gettimeofday(C.uintptr_t(tv), C.uintptr_t(tzp))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func calltime(t uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.time(C.uintptr_t(t))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callutime(_p0 uintptr, buf uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.utime(C.uintptr_t(_p0), C.uintptr_t(buf))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetsystemcfg(label int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.getsystemcfg(C.int(label))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callumount(_p0 uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.umount(C.uintptr_t(_p0))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callgetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) { r1 = uintptr(C.getrlimit(C.int(resource), C.uintptr_t(rlim))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func calllseek(fd int, offset int64, whence int) (r1 uintptr, e1 Errno) { r1 = uintptr(C.lseek(C.int(fd), C.longlong(offset), C.int(whence))) e1 = syscall.GetErrno() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func callmmap64(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (r1 uintptr, e1 Errno) { r1 = uintptr(C.mmap64(C.uintptr_t(addr), C.uintptr_t(length), C.int(prot), C.int(flags), C.int(fd), C.longlong(offset))) e1 = syscall.GetErrno() return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go ================================================ // go run mksyscall.go -tags darwin,amd64 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build darwin && amd64 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 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getgroups_trampoline_addr uintptr //go:cgo_import_dynamic libc_getgroups getgroups "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setgroups(ngid int, gid *_Gid_t) (err error) { _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setgroups_trampoline_addr uintptr //go:cgo_import_dynamic libc_setgroups setgroups "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) wpid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_wait4_trampoline_addr uintptr //go:cgo_import_dynamic libc_wait4 wait4 "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_accept_trampoline_addr uintptr //go:cgo_import_dynamic libc_accept accept "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_bind_trampoline_addr uintptr //go:cgo_import_dynamic libc_bind bind "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_connect_trampoline_addr uintptr //go:cgo_import_dynamic libc_connect connect "/usr/lib/libSystem.B.dylib" // 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 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_socket_trampoline_addr uintptr //go:cgo_import_dynamic libc_socket socket "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsockopt_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsockopt getsockopt "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setsockopt_trampoline_addr uintptr //go:cgo_import_dynamic libc_setsockopt setsockopt "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpeername_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpeername getpeername "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsockname_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsockname getsockname "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Shutdown(s int, how int) (err error) { _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_shutdown_trampoline_addr uintptr //go:cgo_import_dynamic libc_shutdown shutdown "/usr/lib/libSystem.B.dylib" // 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 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_socketpair_trampoline_addr uintptr //go:cgo_import_dynamic libc_socketpair socketpair "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_recvfrom_trampoline_addr, 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 } var libc_recvfrom_trampoline_addr uintptr //go:cgo_import_dynamic libc_recvfrom recvfrom "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_sendto_trampoline_addr uintptr //go:cgo_import_dynamic libc_sendto sendto "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_recvmsg_trampoline_addr uintptr //go:cgo_import_dynamic libc_recvmsg recvmsg "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_sendmsg_trampoline_addr uintptr //go:cgo_import_dynamic libc_sendmsg sendmsg "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_kevent_trampoline_addr uintptr //go:cgo_import_dynamic libc_kevent kevent "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_utimes_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimes utimes "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func futimes(fd int, timeval *[2]Timeval) (err error) { _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_futimes_trampoline_addr uintptr //go:cgo_import_dynamic libc_futimes futimes "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_poll_trampoline_addr uintptr //go:cgo_import_dynamic libc_poll poll "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Madvise(b []byte, behav int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav)) if e1 != 0 { err = errnoErr(e1) } return } var libc_madvise_trampoline_addr uintptr //go:cgo_import_dynamic libc_madvise madvise "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mlock_trampoline_addr uintptr //go:cgo_import_dynamic libc_mlock mlock "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mlockall(flags int) (err error) { _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mlockall_trampoline_addr uintptr //go:cgo_import_dynamic libc_mlockall mlockall "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mprotect_trampoline_addr uintptr //go:cgo_import_dynamic libc_mprotect mprotect "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Msync(b []byte, flags int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_msync_trampoline_addr uintptr //go:cgo_import_dynamic libc_msync msync "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munlock_trampoline_addr uintptr //go:cgo_import_dynamic libc_munlock munlock "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Munlockall() (err error) { _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munlockall_trampoline_addr uintptr //go:cgo_import_dynamic libc_munlockall munlockall "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func closedir(dir uintptr) (err error) { _, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_closedir_trampoline_addr uintptr //go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) { r0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result))) res = Errno(r0) return } var libc_readdir_r_trampoline_addr uintptr //go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pipe(p *[2]int32) (err error) { _, _, e1 := syscall_rawSyscall(libc_pipe_trampoline_addr, uintptr(unsafe.Pointer(p)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pipe_trampoline_addr uintptr //go:cgo_import_dynamic libc_pipe pipe "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (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 } r0, _, e1 := syscall_syscall6(libc_getxattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options)) sz = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getxattr_trampoline_addr uintptr //go:cgo_import_dynamic libc_getxattr getxattr "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) { var _p0 *byte _p0, err = BytePtrFromString(attr) if err != nil { return } r0, _, e1 := syscall_syscall6(libc_fgetxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options)) sz = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fgetxattr_trampoline_addr uintptr //go:cgo_import_dynamic libc_fgetxattr fgetxattr "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setxattr(path string, attr string, data *byte, size int, position uint32, options 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 } _, _, e1 := syscall_syscall6(libc_setxattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options)) if e1 != 0 { err = errnoErr(e1) } return } var libc_setxattr_trampoline_addr uintptr //go:cgo_import_dynamic libc_setxattr setxattr "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(attr) if err != nil { return } _, _, e1 := syscall_syscall6(libc_fsetxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options)) if e1 != 0 { err = errnoErr(e1) } return } var libc_fsetxattr_trampoline_addr uintptr //go:cgo_import_dynamic libc_fsetxattr fsetxattr "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func removexattr(path string, attr string, options 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 } _, _, e1 := syscall_syscall(libc_removexattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options)) if e1 != 0 { err = errnoErr(e1) } return } var libc_removexattr_trampoline_addr uintptr //go:cgo_import_dynamic libc_removexattr removexattr "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fremovexattr(fd int, attr string, options int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(attr) if err != nil { return } _, _, e1 := syscall_syscall(libc_fremovexattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options)) if e1 != 0 { err = errnoErr(e1) } return } var libc_fremovexattr_trampoline_addr uintptr //go:cgo_import_dynamic libc_fremovexattr fremovexattr "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func listxattr(path string, dest *byte, size int, options int) (sz int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } r0, _, e1 := syscall_syscall6(libc_listxattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0) sz = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_listxattr_trampoline_addr uintptr //go:cgo_import_dynamic libc_listxattr listxattr "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) { r0, _, e1 := syscall_syscall6(libc_flistxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0) sz = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_flistxattr_trampoline_addr uintptr //go:cgo_import_dynamic libc_flistxattr flistxattr "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_utimensat_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimensat utimensat "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) val = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fcntl_trampoline_addr uintptr //go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), uintptr(posix)) if e1 != 0 { err = errnoErr(e1) } return } var libc_kill_trampoline_addr uintptr //go:cgo_import_dynamic libc_kill kill "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) } return } var libc_ioctl_trampoline_addr uintptr //go:cgo_import_dynamic libc_ioctl ioctl "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func renamexNp(from string, to string, flag uint32) (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_syscall(libc_renamex_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag)) if e1 != 0 { err = errnoErr(e1) } return } var libc_renamex_np_trampoline_addr uintptr //go:cgo_import_dynamic libc_renamex_np renamex_np "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func renameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (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_syscall6(libc_renameatx_np_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), uintptr(flag), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_renameatx_np_trampoline_addr uintptr //go:cgo_import_dynamic libc_renameatx_np renameatx_np "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_sysctl_trampoline_addr, 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 } var libc_sysctl_trampoline_addr uintptr //go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pthread_chdir_np(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := syscall_syscall(libc_pthread_chdir_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pthread_chdir_np_trampoline_addr uintptr //go:cgo_import_dynamic libc_pthread_chdir_np pthread_chdir_np "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pthread_fchdir_np(fd int) (err error) { _, _, e1 := syscall_syscall(libc_pthread_fchdir_np_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pthread_fchdir_np_trampoline_addr uintptr //go:cgo_import_dynamic libc_pthread_fchdir_np pthread_fchdir_np "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) { _, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_sendfile_trampoline_addr uintptr //go:cgo_import_dynamic libc_sendfile sendfile "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) { r0, _, e1 := syscall_syscall(libc_shmat_trampoline_addr, uintptr(id), uintptr(addr), uintptr(flag)) ret = uintptr(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_shmat_trampoline_addr uintptr //go:cgo_import_dynamic libc_shmat shmat "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) { r0, _, e1 := syscall_syscall(libc_shmctl_trampoline_addr, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf))) result = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_shmctl_trampoline_addr uintptr //go:cgo_import_dynamic libc_shmctl shmctl "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func shmdt(addr uintptr) (err error) { _, _, e1 := syscall_syscall(libc_shmdt_trampoline_addr, uintptr(addr), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_shmdt_trampoline_addr uintptr //go:cgo_import_dynamic libc_shmdt shmdt "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func shmget(key int, size int, flag int) (id int, err error) { r0, _, e1 := syscall_syscall(libc_shmget_trampoline_addr, uintptr(key), uintptr(size), uintptr(flag)) id = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_shmget_trampoline_addr uintptr //go:cgo_import_dynamic libc_shmget shmget "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_access_trampoline_addr uintptr //go:cgo_import_dynamic libc_access access "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_adjtime_trampoline_addr uintptr //go:cgo_import_dynamic libc_adjtime adjtime "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_chdir chdir "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chflags_trampoline_addr uintptr //go:cgo_import_dynamic libc_chflags chflags "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chmod_trampoline_addr uintptr //go:cgo_import_dynamic libc_chmod chmod "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_chown_trampoline_addr uintptr //go:cgo_import_dynamic libc_chown chown "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chroot_trampoline_addr uintptr //go:cgo_import_dynamic libc_chroot chroot "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ClockGettime(clockid int32, time *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_clock_gettime_trampoline_addr uintptr //go:cgo_import_dynamic libc_clock_gettime clock_gettime "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Close(fd int) (err error) { _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_close_trampoline_addr uintptr //go:cgo_import_dynamic libc_close close "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Clonefile(src string, dst string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(src) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(dst) if err != nil { return } _, _, e1 := syscall_syscall(libc_clonefile_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_clonefile_trampoline_addr uintptr //go:cgo_import_dynamic libc_clonefile clonefile "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Clonefileat(srcDirfd int, src string, dstDirfd int, dst string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(src) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(dst) if err != nil { return } _, _, e1 := syscall_syscall6(libc_clonefileat_trampoline_addr, uintptr(srcDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(dstDirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_clonefileat_trampoline_addr uintptr //go:cgo_import_dynamic libc_clonefileat clonefileat "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup(fd int) (nfd int, err error) { r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0) nfd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_dup_trampoline_addr uintptr //go:cgo_import_dynamic libc_dup dup "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup2(from int, to int) (err error) { _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_dup2_trampoline_addr uintptr //go:cgo_import_dynamic libc_dup2 dup2 "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_exchangedata_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options)) if e1 != 0 { err = errnoErr(e1) } return } var libc_exchangedata_trampoline_addr uintptr //go:cgo_import_dynamic libc_exchangedata exchangedata "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0) return } var libc_exit_trampoline_addr uintptr //go:cgo_import_dynamic libc_exit exit "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_faccessat_trampoline_addr uintptr //go:cgo_import_dynamic libc_faccessat faccessat "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchdir(fd int) (err error) { _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchdir fchdir "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchflags(fd int, flags int) (err error) { _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchflags_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchflags fchflags "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchmod(fd int, mode uint32) (err error) { _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchmod_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchmod fchmod "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchmodat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchmodat fchmodat "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchown_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchown fchown "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchownat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchownat fchownat "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fclonefileat(srcDirfd int, dstDirfd int, dst string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(dst) if err != nil { return } _, _, e1 := syscall_syscall6(libc_fclonefileat_trampoline_addr, uintptr(srcDirfd), uintptr(dstDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fclonefileat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fclonefileat fclonefileat "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Flock(fd int, how int) (err error) { _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_flock_trampoline_addr uintptr //go:cgo_import_dynamic libc_flock flock "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0) val = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fpathconf_trampoline_addr uintptr //go:cgo_import_dynamic libc_fpathconf fpathconf "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fsync(fd int) (err error) { _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fsync_trampoline_addr uintptr //go:cgo_import_dynamic libc_fsync fsync "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Ftruncate(fd int, length int64) (err error) { _, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_ftruncate_trampoline_addr uintptr //go:cgo_import_dynamic libc_ftruncate ftruncate "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getcwd_trampoline_addr uintptr //go:cgo_import_dynamic libc_getcwd getcwd "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getdtablesize() (size int) { r0, _, _ := syscall_syscall(libc_getdtablesize_trampoline_addr, 0, 0, 0) size = int(r0) return } var libc_getdtablesize_trampoline_addr uintptr //go:cgo_import_dynamic libc_getdtablesize getdtablesize "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0) egid = int(r0) return } var libc_getegid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getegid getegid "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (uid int) { r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0) uid = int(r0) return } var libc_geteuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_geteuid geteuid "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0) gid = int(r0) return } var libc_getgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getgid getgid "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgid(pid int) (pgid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0) pgid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpgid getpgid "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgrp() (pgrp int) { r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0) pgrp = int(r0) return } var libc_getpgrp_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpgrp getpgrp "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0) pid = int(r0) return } var libc_getpid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpid getpid "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0) ppid = int(r0) return } var libc_getppid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getppid getppid "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0) prio = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpriority_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpriority getpriority "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrlimit(which int, lim *Rlimit) (err error) { _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getrlimit_trampoline_addr uintptr //go:cgo_import_dynamic libc_getrlimit getrlimit "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrusage(who int, rusage *Rusage) (err error) { _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getrusage_trampoline_addr uintptr //go:cgo_import_dynamic libc_getrusage getrusage "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getsid(pid int) (sid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0) sid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsid getsid "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Gettimeofday(tp *Timeval) (err error) { _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_gettimeofday_trampoline_addr uintptr //go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0) uid = int(r0) return } var libc_getuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getuid getuid "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Issetugid() (tainted bool) { r0, _, _ := syscall_rawSyscall(libc_issetugid_trampoline_addr, 0, 0, 0) tainted = bool(r0 != 0) return } var libc_issetugid_trampoline_addr uintptr //go:cgo_import_dynamic libc_issetugid issetugid "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Kqueue() (fd int, err error) { r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_kqueue_trampoline_addr uintptr //go:cgo_import_dynamic libc_kqueue kqueue "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_lchown_trampoline_addr uintptr //go:cgo_import_dynamic libc_lchown lchown "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_link_trampoline_addr uintptr //go:cgo_import_dynamic libc_link link "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Linkat(pathfd int, path string, linkfd int, link string, flags int) (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_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_linkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_linkat linkat "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Listen(s int, backlog int) (err error) { _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_listen_trampoline_addr uintptr //go:cgo_import_dynamic libc_listen listen "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkdir mkdir "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkdirat_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkdirat mkdirat "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkfifo_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkfifo mkfifo "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mknod_trampoline_addr uintptr //go:cgo_import_dynamic libc_mknod mknod "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { var _p0 *byte _p0, err = BytePtrFromString(fsType) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(dir) if err != nil { return } _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mount_trampoline_addr uintptr //go:cgo_import_dynamic libc_mount mount "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_open_trampoline_addr uintptr //go:cgo_import_dynamic libc_open open "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_openat_trampoline_addr uintptr //go:cgo_import_dynamic libc_openat openat "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) val = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pathconf_trampoline_addr uintptr //go:cgo_import_dynamic libc_pathconf pathconf "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pread_trampoline_addr uintptr //go:cgo_import_dynamic libc_pread pread "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pwrite_trampoline_addr uintptr //go:cgo_import_dynamic libc_pwrite pwrite "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_read_trampoline_addr uintptr //go:cgo_import_dynamic libc_read read "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_readlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_readlink readlink "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_readlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_readlinkat readlinkat "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_rename_trampoline_addr uintptr //go:cgo_import_dynamic libc_rename rename "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Renameat(fromfd int, from string, tofd int, 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_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_renameat_trampoline_addr uintptr //go:cgo_import_dynamic libc_renameat renameat "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_revoke_trampoline_addr uintptr //go:cgo_import_dynamic libc_revoke revoke "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_rmdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_rmdir rmdir "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence)) newoffset = int64(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_lseek_trampoline_addr uintptr //go:cgo_import_dynamic libc_lseek lseek "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_select_trampoline_addr, 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 } var libc_select_trampoline_addr uintptr //go:cgo_import_dynamic libc_select select "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setattrlist(path string, attrlist *Attrlist, attrBuf []byte, options int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } var _p1 unsafe.Pointer if len(attrBuf) > 0 { _p1 = unsafe.Pointer(&attrBuf[0]) } else { _p1 = unsafe.Pointer(&_zero) } _, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(attrlist)), uintptr(_p1), uintptr(len(attrBuf)), uintptr(options), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setattrlist_trampoline_addr uintptr //go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setegid(egid int) (err error) { _, _, e1 := syscall_syscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setegid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setegid setegid "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Seteuid(euid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_seteuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_seteuid seteuid "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setgid(gid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setgid setgid "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setlogin_trampoline_addr uintptr //go:cgo_import_dynamic libc_setlogin setlogin "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setpgid(pid int, pgid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setpgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setpgid setpgid "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio)) if e1 != 0 { err = errnoErr(e1) } return } var libc_setpriority_trampoline_addr uintptr //go:cgo_import_dynamic libc_setpriority setpriority "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setprivexec(flag int) (err error) { _, _, e1 := syscall_syscall(libc_setprivexec_trampoline_addr, uintptr(flag), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setprivexec_trampoline_addr uintptr //go:cgo_import_dynamic libc_setprivexec setprivexec "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setregid(rgid int, egid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setregid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setregid setregid "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setreuid(ruid int, euid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setreuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setreuid setreuid "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setsid() (pid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0) pid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setsid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setsid setsid "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Settimeofday(tp *Timeval) (err error) { _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_settimeofday_trampoline_addr uintptr //go:cgo_import_dynamic libc_settimeofday settimeofday "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setuid(uid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setuid setuid "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_symlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_symlink symlink "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) if e1 != 0 { err = errnoErr(e1) } return } var libc_symlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_symlinkat symlinkat "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Sync() (err error) { _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_sync_trampoline_addr uintptr //go:cgo_import_dynamic libc_sync sync "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_truncate_trampoline_addr uintptr //go:cgo_import_dynamic libc_truncate truncate "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(newmask int) (oldmask int) { r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0) oldmask = int(r0) return } var libc_umask_trampoline_addr uintptr //go:cgo_import_dynamic libc_umask umask "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_undelete_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_undelete_trampoline_addr uintptr //go:cgo_import_dynamic libc_undelete undelete "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_unlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_unlink unlink "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_unlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_unlinkat unlinkat "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_unmount_trampoline_addr uintptr //go:cgo_import_dynamic libc_unmount unmount "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_write_trampoline_addr uintptr //go:cgo_import_dynamic libc_write write "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) ret = uintptr(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mmap_trampoline_addr uintptr //go:cgo_import_dynamic libc_mmap mmap "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func munmap(addr uintptr, length uintptr) (err error) { _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munmap_trampoline_addr uintptr //go:cgo_import_dynamic libc_munmap munmap "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstat(fd int, stat *Stat_t) (err error) { _, _, e1 := syscall_syscall(libc_fstat64_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstat64_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstat64 fstat64 "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_fstatat64_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstatat64_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstatat64 fstatat64 "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstatfs(fd int, stat *Statfs_t) (err error) { _, _, e1 := syscall_syscall(libc_fstatfs64_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstatfs64_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstatfs64 fstatfs64 "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) { r0, _, e1 := syscall_syscall(libc_getfsstat64_trampoline_addr, uintptr(buf), uintptr(size), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getfsstat64_trampoline_addr uintptr //go:cgo_import_dynamic libc_getfsstat64 getfsstat64 "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_lstat64_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_lstat64_trampoline_addr uintptr //go:cgo_import_dynamic libc_lstat64 lstat64 "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) { _, _, e1 := syscall_syscall6(libc_ptrace_trampoline_addr, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_ptrace_trampoline_addr uintptr //go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_stat64_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_stat64_trampoline_addr uintptr //go:cgo_import_dynamic libc_stat64 stat64 "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_statfs64_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_statfs64_trampoline_addr uintptr //go:cgo_import_dynamic libc_statfs64 statfs64 "/usr/lib/libSystem.B.dylib" ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s ================================================ // go run mkasm.go darwin amd64 // Code generated by the command above; DO NOT EDIT. #include "textflag.h" TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fdopendir(SB) GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8 DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB) TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgroups(SB) GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8 DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB) TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgroups(SB) GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8 DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB) TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_wait4(SB) GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8 DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB) TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_accept(SB) GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8 DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB) TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_bind(SB) GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8 DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB) TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_connect(SB) GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8 DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB) TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socket(SB) GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8 DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB) TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockopt(SB) GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB) TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsockopt(SB) GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8 DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB) TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpeername(SB) GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB) TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockname(SB) GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB) TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_shutdown(SB) GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8 DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB) TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socketpair(SB) GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8 DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB) TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvfrom(SB) GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8 DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB) TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendto(SB) GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB) TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvmsg(SB) GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8 DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB) TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendmsg(SB) GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB) TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kevent(SB) GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8 DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB) TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimes(SB) GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB) TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_futimes(SB) GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8 DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB) TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_poll(SB) GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8 DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB) TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_madvise(SB) GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8 DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB) TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlock(SB) GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8 DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB) TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlockall(SB) GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8 DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB) TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mprotect(SB) GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8 DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB) TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_msync(SB) GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8 DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB) TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlock(SB) GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8 DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB) TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlockall(SB) GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8 DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB) TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_closedir(SB) GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8 DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB) TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readdir_r(SB) GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8 DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB) TEXT libc_pipe_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pipe(SB) GLOBL ·libc_pipe_trampoline_addr(SB), RODATA, $8 DATA ·libc_pipe_trampoline_addr(SB)/8, $libc_pipe_trampoline<>(SB) TEXT libc_getxattr_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getxattr(SB) GLOBL ·libc_getxattr_trampoline_addr(SB), RODATA, $8 DATA ·libc_getxattr_trampoline_addr(SB)/8, $libc_getxattr_trampoline<>(SB) TEXT libc_fgetxattr_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fgetxattr(SB) GLOBL ·libc_fgetxattr_trampoline_addr(SB), RODATA, $8 DATA ·libc_fgetxattr_trampoline_addr(SB)/8, $libc_fgetxattr_trampoline<>(SB) TEXT libc_setxattr_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setxattr(SB) GLOBL ·libc_setxattr_trampoline_addr(SB), RODATA, $8 DATA ·libc_setxattr_trampoline_addr(SB)/8, $libc_setxattr_trampoline<>(SB) TEXT libc_fsetxattr_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fsetxattr(SB) GLOBL ·libc_fsetxattr_trampoline_addr(SB), RODATA, $8 DATA ·libc_fsetxattr_trampoline_addr(SB)/8, $libc_fsetxattr_trampoline<>(SB) TEXT libc_removexattr_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_removexattr(SB) GLOBL ·libc_removexattr_trampoline_addr(SB), RODATA, $8 DATA ·libc_removexattr_trampoline_addr(SB)/8, $libc_removexattr_trampoline<>(SB) TEXT libc_fremovexattr_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fremovexattr(SB) GLOBL ·libc_fremovexattr_trampoline_addr(SB), RODATA, $8 DATA ·libc_fremovexattr_trampoline_addr(SB)/8, $libc_fremovexattr_trampoline<>(SB) TEXT libc_listxattr_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_listxattr(SB) GLOBL ·libc_listxattr_trampoline_addr(SB), RODATA, $8 DATA ·libc_listxattr_trampoline_addr(SB)/8, $libc_listxattr_trampoline<>(SB) TEXT libc_flistxattr_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_flistxattr(SB) GLOBL ·libc_flistxattr_trampoline_addr(SB), RODATA, $8 DATA ·libc_flistxattr_trampoline_addr(SB)/8, $libc_flistxattr_trampoline<>(SB) TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB) TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fcntl(SB) GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $8 DATA ·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB) TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kill(SB) GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8 DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB) TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ioctl(SB) GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB) TEXT libc_renamex_np_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_renamex_np(SB) GLOBL ·libc_renamex_np_trampoline_addr(SB), RODATA, $8 DATA ·libc_renamex_np_trampoline_addr(SB)/8, $libc_renamex_np_trampoline<>(SB) TEXT libc_renameatx_np_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_renameatx_np(SB) GLOBL ·libc_renameatx_np_trampoline_addr(SB), RODATA, $8 DATA ·libc_renameatx_np_trampoline_addr(SB)/8, $libc_renameatx_np_trampoline<>(SB) TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sysctl(SB) GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) TEXT libc_pthread_chdir_np_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pthread_chdir_np(SB) GLOBL ·libc_pthread_chdir_np_trampoline_addr(SB), RODATA, $8 DATA ·libc_pthread_chdir_np_trampoline_addr(SB)/8, $libc_pthread_chdir_np_trampoline<>(SB) TEXT libc_pthread_fchdir_np_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pthread_fchdir_np(SB) GLOBL ·libc_pthread_fchdir_np_trampoline_addr(SB), RODATA, $8 DATA ·libc_pthread_fchdir_np_trampoline_addr(SB)/8, $libc_pthread_fchdir_np_trampoline<>(SB) TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendfile(SB) GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendfile_trampoline_addr(SB)/8, $libc_sendfile_trampoline<>(SB) TEXT libc_shmat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_shmat(SB) GLOBL ·libc_shmat_trampoline_addr(SB), RODATA, $8 DATA ·libc_shmat_trampoline_addr(SB)/8, $libc_shmat_trampoline<>(SB) TEXT libc_shmctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_shmctl(SB) GLOBL ·libc_shmctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_shmctl_trampoline_addr(SB)/8, $libc_shmctl_trampoline<>(SB) TEXT libc_shmdt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_shmdt(SB) GLOBL ·libc_shmdt_trampoline_addr(SB), RODATA, $8 DATA ·libc_shmdt_trampoline_addr(SB)/8, $libc_shmdt_trampoline<>(SB) TEXT libc_shmget_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_shmget(SB) GLOBL ·libc_shmget_trampoline_addr(SB), RODATA, $8 DATA ·libc_shmget_trampoline_addr(SB)/8, $libc_shmget_trampoline<>(SB) TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_access(SB) GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8 DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB) TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_adjtime(SB) GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8 DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB) TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chdir(SB) GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB) TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chflags(SB) GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8 DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB) TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chmod(SB) GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8 DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB) TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chown(SB) GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8 DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB) TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chroot(SB) GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8 DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB) TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_clock_gettime(SB) GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $8 DATA ·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB) TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_close(SB) GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8 DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB) TEXT libc_clonefile_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_clonefile(SB) GLOBL ·libc_clonefile_trampoline_addr(SB), RODATA, $8 DATA ·libc_clonefile_trampoline_addr(SB)/8, $libc_clonefile_trampoline<>(SB) TEXT libc_clonefileat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_clonefileat(SB) GLOBL ·libc_clonefileat_trampoline_addr(SB), RODATA, $8 DATA ·libc_clonefileat_trampoline_addr(SB)/8, $libc_clonefileat_trampoline<>(SB) TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup(SB) GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB) TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup2(SB) GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB) TEXT libc_exchangedata_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_exchangedata(SB) GLOBL ·libc_exchangedata_trampoline_addr(SB), RODATA, $8 DATA ·libc_exchangedata_trampoline_addr(SB)/8, $libc_exchangedata_trampoline<>(SB) TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_exit(SB) GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8 DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB) TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_faccessat(SB) GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8 DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB) TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchdir(SB) GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB) TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchflags(SB) GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB) TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmod(SB) GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB) TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmodat(SB) GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB) TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchown(SB) GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB) TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchownat(SB) GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB) TEXT libc_fclonefileat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fclonefileat(SB) GLOBL ·libc_fclonefileat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fclonefileat_trampoline_addr(SB)/8, $libc_fclonefileat_trampoline<>(SB) TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_flock(SB) GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8 DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB) TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fpathconf(SB) GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8 DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB) TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fsync(SB) GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8 DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB) TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ftruncate(SB) GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8 DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB) TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getcwd(SB) GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8 DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB) TEXT libc_getdtablesize_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getdtablesize(SB) GLOBL ·libc_getdtablesize_trampoline_addr(SB), RODATA, $8 DATA ·libc_getdtablesize_trampoline_addr(SB)/8, $libc_getdtablesize_trampoline<>(SB) TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getegid(SB) GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB) TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_geteuid(SB) GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB) TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgid(SB) GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB) TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgid(SB) GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB) TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgrp(SB) GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB) TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpid(SB) GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB) TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getppid(SB) GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB) TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpriority(SB) GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB) TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrlimit(SB) GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB) TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrusage(SB) GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB) TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsid(SB) GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB) TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_gettimeofday(SB) GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8 DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB) TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getuid(SB) GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB) TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_issetugid(SB) GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8 DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB) TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kqueue(SB) GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8 DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB) TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lchown(SB) GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8 DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB) TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_link(SB) GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8 DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB) TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_linkat(SB) GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB) TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_listen(SB) GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8 DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB) TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdir(SB) GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB) TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdirat(SB) GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB) TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifo(SB) GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB) TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknod(SB) GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB) TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mount(SB) GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_open(SB) GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8 DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB) TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_openat(SB) GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8 DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB) TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pathconf(SB) GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8 DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB) TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pread(SB) GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8 DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB) TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pwrite(SB) GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8 DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB) TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_read(SB) GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8 DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB) TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlink(SB) GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB) TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlinkat(SB) GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB) TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rename(SB) GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8 DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB) TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_renameat(SB) GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8 DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB) TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_revoke(SB) GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8 DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB) TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rmdir(SB) GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB) TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lseek(SB) GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8 DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB) TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_select(SB) GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8 DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB) TEXT libc_setattrlist_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setattrlist(SB) GLOBL ·libc_setattrlist_trampoline_addr(SB), RODATA, $8 DATA ·libc_setattrlist_trampoline_addr(SB)/8, $libc_setattrlist_trampoline<>(SB) TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setegid(SB) GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB) TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_seteuid(SB) GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB) TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgid(SB) GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB) TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setlogin(SB) GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8 DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB) TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpgid(SB) GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB) TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpriority(SB) GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8 DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB) TEXT libc_setprivexec_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setprivexec(SB) GLOBL ·libc_setprivexec_trampoline_addr(SB), RODATA, $8 DATA ·libc_setprivexec_trampoline_addr(SB)/8, $libc_setprivexec_trampoline<>(SB) TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setregid(SB) GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB) TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setreuid(SB) GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB) TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsid(SB) GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB) TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_settimeofday(SB) GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8 DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB) TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setuid(SB) GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB) TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlink(SB) GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB) TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlinkat(SB) GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB) TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sync(SB) GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8 DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB) TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_truncate(SB) GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8 DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB) TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_umask(SB) GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8 DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB) TEXT libc_undelete_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_undelete(SB) GLOBL ·libc_undelete_trampoline_addr(SB), RODATA, $8 DATA ·libc_undelete_trampoline_addr(SB)/8, $libc_undelete_trampoline<>(SB) TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlink(SB) GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB) TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlinkat(SB) GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB) TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unmount(SB) GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8 DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB) TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_write(SB) GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8 DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB) TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mmap(SB) GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB) TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munmap(SB) GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) TEXT libc_fstat64_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstat64(SB) GLOBL ·libc_fstat64_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstat64_trampoline_addr(SB)/8, $libc_fstat64_trampoline<>(SB) TEXT libc_fstatat64_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatat64(SB) GLOBL ·libc_fstatat64_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstatat64_trampoline_addr(SB)/8, $libc_fstatat64_trampoline<>(SB) TEXT libc_fstatfs64_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatfs64(SB) GLOBL ·libc_fstatfs64_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstatfs64_trampoline_addr(SB)/8, $libc_fstatfs64_trampoline<>(SB) TEXT libc_getfsstat64_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getfsstat64(SB) GLOBL ·libc_getfsstat64_trampoline_addr(SB), RODATA, $8 DATA ·libc_getfsstat64_trampoline_addr(SB)/8, $libc_getfsstat64_trampoline<>(SB) TEXT libc_lstat64_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lstat64(SB) GLOBL ·libc_lstat64_trampoline_addr(SB), RODATA, $8 DATA ·libc_lstat64_trampoline_addr(SB)/8, $libc_lstat64_trampoline<>(SB) TEXT libc_ptrace_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ptrace(SB) GLOBL ·libc_ptrace_trampoline_addr(SB), RODATA, $8 DATA ·libc_ptrace_trampoline_addr(SB)/8, $libc_ptrace_trampoline<>(SB) TEXT libc_stat64_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_stat64(SB) GLOBL ·libc_stat64_trampoline_addr(SB), RODATA, $8 DATA ·libc_stat64_trampoline_addr(SB)/8, $libc_stat64_trampoline<>(SB) TEXT libc_statfs64_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_statfs64(SB) GLOBL ·libc_statfs64_trampoline_addr(SB), RODATA, $8 DATA ·libc_statfs64_trampoline_addr(SB)/8, $libc_statfs64_trampoline<>(SB) ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go ================================================ // go run mksyscall.go -tags darwin,arm64 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build darwin && arm64 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 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getgroups_trampoline_addr uintptr //go:cgo_import_dynamic libc_getgroups getgroups "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setgroups(ngid int, gid *_Gid_t) (err error) { _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setgroups_trampoline_addr uintptr //go:cgo_import_dynamic libc_setgroups setgroups "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) wpid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_wait4_trampoline_addr uintptr //go:cgo_import_dynamic libc_wait4 wait4 "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_accept_trampoline_addr uintptr //go:cgo_import_dynamic libc_accept accept "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_bind_trampoline_addr uintptr //go:cgo_import_dynamic libc_bind bind "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_connect_trampoline_addr uintptr //go:cgo_import_dynamic libc_connect connect "/usr/lib/libSystem.B.dylib" // 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 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_socket_trampoline_addr uintptr //go:cgo_import_dynamic libc_socket socket "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsockopt_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsockopt getsockopt "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setsockopt_trampoline_addr uintptr //go:cgo_import_dynamic libc_setsockopt setsockopt "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpeername_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpeername getpeername "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsockname_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsockname getsockname "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Shutdown(s int, how int) (err error) { _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_shutdown_trampoline_addr uintptr //go:cgo_import_dynamic libc_shutdown shutdown "/usr/lib/libSystem.B.dylib" // 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 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_socketpair_trampoline_addr uintptr //go:cgo_import_dynamic libc_socketpair socketpair "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_recvfrom_trampoline_addr, 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 } var libc_recvfrom_trampoline_addr uintptr //go:cgo_import_dynamic libc_recvfrom recvfrom "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_sendto_trampoline_addr uintptr //go:cgo_import_dynamic libc_sendto sendto "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_recvmsg_trampoline_addr uintptr //go:cgo_import_dynamic libc_recvmsg recvmsg "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_sendmsg_trampoline_addr uintptr //go:cgo_import_dynamic libc_sendmsg sendmsg "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_kevent_trampoline_addr uintptr //go:cgo_import_dynamic libc_kevent kevent "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_utimes_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimes utimes "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func futimes(fd int, timeval *[2]Timeval) (err error) { _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_futimes_trampoline_addr uintptr //go:cgo_import_dynamic libc_futimes futimes "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_poll_trampoline_addr uintptr //go:cgo_import_dynamic libc_poll poll "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Madvise(b []byte, behav int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav)) if e1 != 0 { err = errnoErr(e1) } return } var libc_madvise_trampoline_addr uintptr //go:cgo_import_dynamic libc_madvise madvise "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mlock_trampoline_addr uintptr //go:cgo_import_dynamic libc_mlock mlock "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mlockall(flags int) (err error) { _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mlockall_trampoline_addr uintptr //go:cgo_import_dynamic libc_mlockall mlockall "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mprotect_trampoline_addr uintptr //go:cgo_import_dynamic libc_mprotect mprotect "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Msync(b []byte, flags int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_msync_trampoline_addr uintptr //go:cgo_import_dynamic libc_msync msync "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munlock_trampoline_addr uintptr //go:cgo_import_dynamic libc_munlock munlock "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Munlockall() (err error) { _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munlockall_trampoline_addr uintptr //go:cgo_import_dynamic libc_munlockall munlockall "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func closedir(dir uintptr) (err error) { _, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_closedir_trampoline_addr uintptr //go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) { r0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result))) res = Errno(r0) return } var libc_readdir_r_trampoline_addr uintptr //go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pipe(p *[2]int32) (err error) { _, _, e1 := syscall_rawSyscall(libc_pipe_trampoline_addr, uintptr(unsafe.Pointer(p)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pipe_trampoline_addr uintptr //go:cgo_import_dynamic libc_pipe pipe "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (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 } r0, _, e1 := syscall_syscall6(libc_getxattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options)) sz = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getxattr_trampoline_addr uintptr //go:cgo_import_dynamic libc_getxattr getxattr "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) { var _p0 *byte _p0, err = BytePtrFromString(attr) if err != nil { return } r0, _, e1 := syscall_syscall6(libc_fgetxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options)) sz = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fgetxattr_trampoline_addr uintptr //go:cgo_import_dynamic libc_fgetxattr fgetxattr "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setxattr(path string, attr string, data *byte, size int, position uint32, options 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 } _, _, e1 := syscall_syscall6(libc_setxattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options)) if e1 != 0 { err = errnoErr(e1) } return } var libc_setxattr_trampoline_addr uintptr //go:cgo_import_dynamic libc_setxattr setxattr "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(attr) if err != nil { return } _, _, e1 := syscall_syscall6(libc_fsetxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options)) if e1 != 0 { err = errnoErr(e1) } return } var libc_fsetxattr_trampoline_addr uintptr //go:cgo_import_dynamic libc_fsetxattr fsetxattr "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func removexattr(path string, attr string, options 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 } _, _, e1 := syscall_syscall(libc_removexattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options)) if e1 != 0 { err = errnoErr(e1) } return } var libc_removexattr_trampoline_addr uintptr //go:cgo_import_dynamic libc_removexattr removexattr "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fremovexattr(fd int, attr string, options int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(attr) if err != nil { return } _, _, e1 := syscall_syscall(libc_fremovexattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options)) if e1 != 0 { err = errnoErr(e1) } return } var libc_fremovexattr_trampoline_addr uintptr //go:cgo_import_dynamic libc_fremovexattr fremovexattr "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func listxattr(path string, dest *byte, size int, options int) (sz int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } r0, _, e1 := syscall_syscall6(libc_listxattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0) sz = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_listxattr_trampoline_addr uintptr //go:cgo_import_dynamic libc_listxattr listxattr "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) { r0, _, e1 := syscall_syscall6(libc_flistxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0) sz = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_flistxattr_trampoline_addr uintptr //go:cgo_import_dynamic libc_flistxattr flistxattr "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_utimensat_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimensat utimensat "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) val = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fcntl_trampoline_addr uintptr //go:cgo_import_dynamic libc_fcntl fcntl "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), uintptr(posix)) if e1 != 0 { err = errnoErr(e1) } return } var libc_kill_trampoline_addr uintptr //go:cgo_import_dynamic libc_kill kill "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) } return } var libc_ioctl_trampoline_addr uintptr //go:cgo_import_dynamic libc_ioctl ioctl "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func renamexNp(from string, to string, flag uint32) (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_syscall(libc_renamex_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag)) if e1 != 0 { err = errnoErr(e1) } return } var libc_renamex_np_trampoline_addr uintptr //go:cgo_import_dynamic libc_renamex_np renamex_np "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func renameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (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_syscall6(libc_renameatx_np_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), uintptr(flag), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_renameatx_np_trampoline_addr uintptr //go:cgo_import_dynamic libc_renameatx_np renameatx_np "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_sysctl_trampoline_addr, 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 } var libc_sysctl_trampoline_addr uintptr //go:cgo_import_dynamic libc_sysctl sysctl "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pthread_chdir_np(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := syscall_syscall(libc_pthread_chdir_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pthread_chdir_np_trampoline_addr uintptr //go:cgo_import_dynamic libc_pthread_chdir_np pthread_chdir_np "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pthread_fchdir_np(fd int) (err error) { _, _, e1 := syscall_syscall(libc_pthread_fchdir_np_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pthread_fchdir_np_trampoline_addr uintptr //go:cgo_import_dynamic libc_pthread_fchdir_np pthread_fchdir_np "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) { _, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_sendfile_trampoline_addr uintptr //go:cgo_import_dynamic libc_sendfile sendfile "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) { r0, _, e1 := syscall_syscall(libc_shmat_trampoline_addr, uintptr(id), uintptr(addr), uintptr(flag)) ret = uintptr(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_shmat_trampoline_addr uintptr //go:cgo_import_dynamic libc_shmat shmat "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) { r0, _, e1 := syscall_syscall(libc_shmctl_trampoline_addr, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf))) result = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_shmctl_trampoline_addr uintptr //go:cgo_import_dynamic libc_shmctl shmctl "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func shmdt(addr uintptr) (err error) { _, _, e1 := syscall_syscall(libc_shmdt_trampoline_addr, uintptr(addr), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_shmdt_trampoline_addr uintptr //go:cgo_import_dynamic libc_shmdt shmdt "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func shmget(key int, size int, flag int) (id int, err error) { r0, _, e1 := syscall_syscall(libc_shmget_trampoline_addr, uintptr(key), uintptr(size), uintptr(flag)) id = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_shmget_trampoline_addr uintptr //go:cgo_import_dynamic libc_shmget shmget "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_access_trampoline_addr uintptr //go:cgo_import_dynamic libc_access access "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_adjtime_trampoline_addr uintptr //go:cgo_import_dynamic libc_adjtime adjtime "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_chdir chdir "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chflags_trampoline_addr uintptr //go:cgo_import_dynamic libc_chflags chflags "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chmod_trampoline_addr uintptr //go:cgo_import_dynamic libc_chmod chmod "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_chown_trampoline_addr uintptr //go:cgo_import_dynamic libc_chown chown "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chroot_trampoline_addr uintptr //go:cgo_import_dynamic libc_chroot chroot "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ClockGettime(clockid int32, time *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_clock_gettime_trampoline_addr uintptr //go:cgo_import_dynamic libc_clock_gettime clock_gettime "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Close(fd int) (err error) { _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_close_trampoline_addr uintptr //go:cgo_import_dynamic libc_close close "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Clonefile(src string, dst string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(src) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(dst) if err != nil { return } _, _, e1 := syscall_syscall(libc_clonefile_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_clonefile_trampoline_addr uintptr //go:cgo_import_dynamic libc_clonefile clonefile "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Clonefileat(srcDirfd int, src string, dstDirfd int, dst string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(src) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(dst) if err != nil { return } _, _, e1 := syscall_syscall6(libc_clonefileat_trampoline_addr, uintptr(srcDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(dstDirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_clonefileat_trampoline_addr uintptr //go:cgo_import_dynamic libc_clonefileat clonefileat "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup(fd int) (nfd int, err error) { r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0) nfd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_dup_trampoline_addr uintptr //go:cgo_import_dynamic libc_dup dup "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup2(from int, to int) (err error) { _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_dup2_trampoline_addr uintptr //go:cgo_import_dynamic libc_dup2 dup2 "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_exchangedata_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options)) if e1 != 0 { err = errnoErr(e1) } return } var libc_exchangedata_trampoline_addr uintptr //go:cgo_import_dynamic libc_exchangedata exchangedata "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0) return } var libc_exit_trampoline_addr uintptr //go:cgo_import_dynamic libc_exit exit "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_faccessat_trampoline_addr uintptr //go:cgo_import_dynamic libc_faccessat faccessat "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchdir(fd int) (err error) { _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchdir fchdir "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchflags(fd int, flags int) (err error) { _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchflags_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchflags fchflags "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchmod(fd int, mode uint32) (err error) { _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchmod_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchmod fchmod "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchmodat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchmodat fchmodat "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchown_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchown fchown "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchownat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchownat fchownat "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fclonefileat(srcDirfd int, dstDirfd int, dst string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(dst) if err != nil { return } _, _, e1 := syscall_syscall6(libc_fclonefileat_trampoline_addr, uintptr(srcDirfd), uintptr(dstDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fclonefileat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fclonefileat fclonefileat "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Flock(fd int, how int) (err error) { _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_flock_trampoline_addr uintptr //go:cgo_import_dynamic libc_flock flock "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0) val = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fpathconf_trampoline_addr uintptr //go:cgo_import_dynamic libc_fpathconf fpathconf "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fsync(fd int) (err error) { _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fsync_trampoline_addr uintptr //go:cgo_import_dynamic libc_fsync fsync "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Ftruncate(fd int, length int64) (err error) { _, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_ftruncate_trampoline_addr uintptr //go:cgo_import_dynamic libc_ftruncate ftruncate "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getcwd_trampoline_addr uintptr //go:cgo_import_dynamic libc_getcwd getcwd "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getdtablesize() (size int) { r0, _, _ := syscall_syscall(libc_getdtablesize_trampoline_addr, 0, 0, 0) size = int(r0) return } var libc_getdtablesize_trampoline_addr uintptr //go:cgo_import_dynamic libc_getdtablesize getdtablesize "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0) egid = int(r0) return } var libc_getegid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getegid getegid "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (uid int) { r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0) uid = int(r0) return } var libc_geteuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_geteuid geteuid "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0) gid = int(r0) return } var libc_getgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getgid getgid "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgid(pid int) (pgid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0) pgid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpgid getpgid "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgrp() (pgrp int) { r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0) pgrp = int(r0) return } var libc_getpgrp_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpgrp getpgrp "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0) pid = int(r0) return } var libc_getpid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpid getpid "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0) ppid = int(r0) return } var libc_getppid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getppid getppid "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0) prio = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpriority_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpriority getpriority "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrlimit(which int, lim *Rlimit) (err error) { _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getrlimit_trampoline_addr uintptr //go:cgo_import_dynamic libc_getrlimit getrlimit "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrusage(who int, rusage *Rusage) (err error) { _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getrusage_trampoline_addr uintptr //go:cgo_import_dynamic libc_getrusage getrusage "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getsid(pid int) (sid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0) sid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsid getsid "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Gettimeofday(tp *Timeval) (err error) { _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_gettimeofday_trampoline_addr uintptr //go:cgo_import_dynamic libc_gettimeofday gettimeofday "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0) uid = int(r0) return } var libc_getuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getuid getuid "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Issetugid() (tainted bool) { r0, _, _ := syscall_rawSyscall(libc_issetugid_trampoline_addr, 0, 0, 0) tainted = bool(r0 != 0) return } var libc_issetugid_trampoline_addr uintptr //go:cgo_import_dynamic libc_issetugid issetugid "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Kqueue() (fd int, err error) { r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_kqueue_trampoline_addr uintptr //go:cgo_import_dynamic libc_kqueue kqueue "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_lchown_trampoline_addr uintptr //go:cgo_import_dynamic libc_lchown lchown "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_link_trampoline_addr uintptr //go:cgo_import_dynamic libc_link link "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Linkat(pathfd int, path string, linkfd int, link string, flags int) (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_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_linkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_linkat linkat "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Listen(s int, backlog int) (err error) { _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_listen_trampoline_addr uintptr //go:cgo_import_dynamic libc_listen listen "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkdir mkdir "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkdirat_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkdirat mkdirat "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkfifo_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkfifo mkfifo "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mknod_trampoline_addr uintptr //go:cgo_import_dynamic libc_mknod mknod "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { var _p0 *byte _p0, err = BytePtrFromString(fsType) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(dir) if err != nil { return } _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mount_trampoline_addr uintptr //go:cgo_import_dynamic libc_mount mount "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_open_trampoline_addr uintptr //go:cgo_import_dynamic libc_open open "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_openat_trampoline_addr uintptr //go:cgo_import_dynamic libc_openat openat "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) val = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pathconf_trampoline_addr uintptr //go:cgo_import_dynamic libc_pathconf pathconf "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pread_trampoline_addr uintptr //go:cgo_import_dynamic libc_pread pread "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pwrite_trampoline_addr uintptr //go:cgo_import_dynamic libc_pwrite pwrite "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_read_trampoline_addr uintptr //go:cgo_import_dynamic libc_read read "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_readlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_readlink readlink "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_readlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_readlinkat readlinkat "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_rename_trampoline_addr uintptr //go:cgo_import_dynamic libc_rename rename "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Renameat(fromfd int, from string, tofd int, 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_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_renameat_trampoline_addr uintptr //go:cgo_import_dynamic libc_renameat renameat "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_revoke_trampoline_addr uintptr //go:cgo_import_dynamic libc_revoke revoke "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_rmdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_rmdir rmdir "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence)) newoffset = int64(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_lseek_trampoline_addr uintptr //go:cgo_import_dynamic libc_lseek lseek "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_select_trampoline_addr, 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 } var libc_select_trampoline_addr uintptr //go:cgo_import_dynamic libc_select select "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setattrlist(path string, attrlist *Attrlist, attrBuf []byte, options int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } var _p1 unsafe.Pointer if len(attrBuf) > 0 { _p1 = unsafe.Pointer(&attrBuf[0]) } else { _p1 = unsafe.Pointer(&_zero) } _, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(attrlist)), uintptr(_p1), uintptr(len(attrBuf)), uintptr(options), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setattrlist_trampoline_addr uintptr //go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setegid(egid int) (err error) { _, _, e1 := syscall_syscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setegid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setegid setegid "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Seteuid(euid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_seteuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_seteuid seteuid "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setgid(gid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setgid setgid "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setlogin_trampoline_addr uintptr //go:cgo_import_dynamic libc_setlogin setlogin "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setpgid(pid int, pgid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setpgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setpgid setpgid "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio)) if e1 != 0 { err = errnoErr(e1) } return } var libc_setpriority_trampoline_addr uintptr //go:cgo_import_dynamic libc_setpriority setpriority "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setprivexec(flag int) (err error) { _, _, e1 := syscall_syscall(libc_setprivexec_trampoline_addr, uintptr(flag), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setprivexec_trampoline_addr uintptr //go:cgo_import_dynamic libc_setprivexec setprivexec "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setregid(rgid int, egid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setregid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setregid setregid "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setreuid(ruid int, euid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setreuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setreuid setreuid "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setsid() (pid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0) pid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setsid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setsid setsid "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Settimeofday(tp *Timeval) (err error) { _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_settimeofday_trampoline_addr uintptr //go:cgo_import_dynamic libc_settimeofday settimeofday "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setuid(uid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setuid setuid "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_symlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_symlink symlink "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) if e1 != 0 { err = errnoErr(e1) } return } var libc_symlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_symlinkat symlinkat "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Sync() (err error) { _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_sync_trampoline_addr uintptr //go:cgo_import_dynamic libc_sync sync "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_truncate_trampoline_addr uintptr //go:cgo_import_dynamic libc_truncate truncate "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(newmask int) (oldmask int) { r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0) oldmask = int(r0) return } var libc_umask_trampoline_addr uintptr //go:cgo_import_dynamic libc_umask umask "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_undelete_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_undelete_trampoline_addr uintptr //go:cgo_import_dynamic libc_undelete undelete "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_unlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_unlink unlink "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_unlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_unlinkat unlinkat "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_unmount_trampoline_addr uintptr //go:cgo_import_dynamic libc_unmount unmount "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_write_trampoline_addr uintptr //go:cgo_import_dynamic libc_write write "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) ret = uintptr(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mmap_trampoline_addr uintptr //go:cgo_import_dynamic libc_mmap mmap "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func munmap(addr uintptr, length uintptr) (err error) { _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munmap_trampoline_addr uintptr //go:cgo_import_dynamic libc_munmap munmap "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstat(fd int, stat *Stat_t) (err error) { _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstat fstat "/usr/lib/libSystem.B.dylib" // 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 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstatat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstatat fstatat "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstatfs(fd int, stat *Statfs_t) (err error) { _, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstatfs_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstatfs fstatfs "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) { r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(buf), uintptr(size), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getfsstat_trampoline_addr uintptr //go:cgo_import_dynamic libc_getfsstat getfsstat "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_lstat_trampoline_addr uintptr //go:cgo_import_dynamic libc_lstat lstat "/usr/lib/libSystem.B.dylib" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) { _, _, e1 := syscall_syscall6(libc_ptrace_trampoline_addr, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_ptrace_trampoline_addr uintptr //go:cgo_import_dynamic libc_ptrace ptrace "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_stat_trampoline_addr uintptr //go:cgo_import_dynamic libc_stat stat "/usr/lib/libSystem.B.dylib" // 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_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_statfs_trampoline_addr uintptr //go:cgo_import_dynamic libc_statfs statfs "/usr/lib/libSystem.B.dylib" ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s ================================================ // go run mkasm.go darwin arm64 // Code generated by the command above; DO NOT EDIT. #include "textflag.h" TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fdopendir(SB) GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8 DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB) TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgroups(SB) GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8 DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB) TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgroups(SB) GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8 DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB) TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_wait4(SB) GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8 DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB) TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_accept(SB) GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8 DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB) TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_bind(SB) GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8 DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB) TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_connect(SB) GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8 DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB) TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socket(SB) GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8 DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB) TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockopt(SB) GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB) TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsockopt(SB) GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8 DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB) TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpeername(SB) GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB) TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockname(SB) GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB) TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_shutdown(SB) GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8 DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB) TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socketpair(SB) GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8 DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB) TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvfrom(SB) GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8 DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB) TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendto(SB) GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB) TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvmsg(SB) GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8 DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB) TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendmsg(SB) GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB) TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kevent(SB) GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8 DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB) TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimes(SB) GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB) TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_futimes(SB) GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8 DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB) TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_poll(SB) GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8 DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB) TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_madvise(SB) GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8 DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB) TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlock(SB) GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8 DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB) TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlockall(SB) GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8 DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB) TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mprotect(SB) GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8 DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB) TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_msync(SB) GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8 DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB) TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlock(SB) GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8 DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB) TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlockall(SB) GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8 DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB) TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_closedir(SB) GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8 DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB) TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readdir_r(SB) GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8 DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB) TEXT libc_pipe_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pipe(SB) GLOBL ·libc_pipe_trampoline_addr(SB), RODATA, $8 DATA ·libc_pipe_trampoline_addr(SB)/8, $libc_pipe_trampoline<>(SB) TEXT libc_getxattr_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getxattr(SB) GLOBL ·libc_getxattr_trampoline_addr(SB), RODATA, $8 DATA ·libc_getxattr_trampoline_addr(SB)/8, $libc_getxattr_trampoline<>(SB) TEXT libc_fgetxattr_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fgetxattr(SB) GLOBL ·libc_fgetxattr_trampoline_addr(SB), RODATA, $8 DATA ·libc_fgetxattr_trampoline_addr(SB)/8, $libc_fgetxattr_trampoline<>(SB) TEXT libc_setxattr_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setxattr(SB) GLOBL ·libc_setxattr_trampoline_addr(SB), RODATA, $8 DATA ·libc_setxattr_trampoline_addr(SB)/8, $libc_setxattr_trampoline<>(SB) TEXT libc_fsetxattr_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fsetxattr(SB) GLOBL ·libc_fsetxattr_trampoline_addr(SB), RODATA, $8 DATA ·libc_fsetxattr_trampoline_addr(SB)/8, $libc_fsetxattr_trampoline<>(SB) TEXT libc_removexattr_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_removexattr(SB) GLOBL ·libc_removexattr_trampoline_addr(SB), RODATA, $8 DATA ·libc_removexattr_trampoline_addr(SB)/8, $libc_removexattr_trampoline<>(SB) TEXT libc_fremovexattr_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fremovexattr(SB) GLOBL ·libc_fremovexattr_trampoline_addr(SB), RODATA, $8 DATA ·libc_fremovexattr_trampoline_addr(SB)/8, $libc_fremovexattr_trampoline<>(SB) TEXT libc_listxattr_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_listxattr(SB) GLOBL ·libc_listxattr_trampoline_addr(SB), RODATA, $8 DATA ·libc_listxattr_trampoline_addr(SB)/8, $libc_listxattr_trampoline<>(SB) TEXT libc_flistxattr_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_flistxattr(SB) GLOBL ·libc_flistxattr_trampoline_addr(SB), RODATA, $8 DATA ·libc_flistxattr_trampoline_addr(SB)/8, $libc_flistxattr_trampoline<>(SB) TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB) TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fcntl(SB) GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $8 DATA ·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB) TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kill(SB) GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8 DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB) TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ioctl(SB) GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB) TEXT libc_renamex_np_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_renamex_np(SB) GLOBL ·libc_renamex_np_trampoline_addr(SB), RODATA, $8 DATA ·libc_renamex_np_trampoline_addr(SB)/8, $libc_renamex_np_trampoline<>(SB) TEXT libc_renameatx_np_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_renameatx_np(SB) GLOBL ·libc_renameatx_np_trampoline_addr(SB), RODATA, $8 DATA ·libc_renameatx_np_trampoline_addr(SB)/8, $libc_renameatx_np_trampoline<>(SB) TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sysctl(SB) GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) TEXT libc_pthread_chdir_np_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pthread_chdir_np(SB) GLOBL ·libc_pthread_chdir_np_trampoline_addr(SB), RODATA, $8 DATA ·libc_pthread_chdir_np_trampoline_addr(SB)/8, $libc_pthread_chdir_np_trampoline<>(SB) TEXT libc_pthread_fchdir_np_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pthread_fchdir_np(SB) GLOBL ·libc_pthread_fchdir_np_trampoline_addr(SB), RODATA, $8 DATA ·libc_pthread_fchdir_np_trampoline_addr(SB)/8, $libc_pthread_fchdir_np_trampoline<>(SB) TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendfile(SB) GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendfile_trampoline_addr(SB)/8, $libc_sendfile_trampoline<>(SB) TEXT libc_shmat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_shmat(SB) GLOBL ·libc_shmat_trampoline_addr(SB), RODATA, $8 DATA ·libc_shmat_trampoline_addr(SB)/8, $libc_shmat_trampoline<>(SB) TEXT libc_shmctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_shmctl(SB) GLOBL ·libc_shmctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_shmctl_trampoline_addr(SB)/8, $libc_shmctl_trampoline<>(SB) TEXT libc_shmdt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_shmdt(SB) GLOBL ·libc_shmdt_trampoline_addr(SB), RODATA, $8 DATA ·libc_shmdt_trampoline_addr(SB)/8, $libc_shmdt_trampoline<>(SB) TEXT libc_shmget_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_shmget(SB) GLOBL ·libc_shmget_trampoline_addr(SB), RODATA, $8 DATA ·libc_shmget_trampoline_addr(SB)/8, $libc_shmget_trampoline<>(SB) TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_access(SB) GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8 DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB) TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_adjtime(SB) GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8 DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB) TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chdir(SB) GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB) TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chflags(SB) GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8 DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB) TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chmod(SB) GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8 DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB) TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chown(SB) GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8 DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB) TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chroot(SB) GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8 DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB) TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_clock_gettime(SB) GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $8 DATA ·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB) TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_close(SB) GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8 DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB) TEXT libc_clonefile_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_clonefile(SB) GLOBL ·libc_clonefile_trampoline_addr(SB), RODATA, $8 DATA ·libc_clonefile_trampoline_addr(SB)/8, $libc_clonefile_trampoline<>(SB) TEXT libc_clonefileat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_clonefileat(SB) GLOBL ·libc_clonefileat_trampoline_addr(SB), RODATA, $8 DATA ·libc_clonefileat_trampoline_addr(SB)/8, $libc_clonefileat_trampoline<>(SB) TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup(SB) GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB) TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup2(SB) GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB) TEXT libc_exchangedata_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_exchangedata(SB) GLOBL ·libc_exchangedata_trampoline_addr(SB), RODATA, $8 DATA ·libc_exchangedata_trampoline_addr(SB)/8, $libc_exchangedata_trampoline<>(SB) TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_exit(SB) GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8 DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB) TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_faccessat(SB) GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8 DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB) TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchdir(SB) GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB) TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchflags(SB) GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB) TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmod(SB) GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB) TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmodat(SB) GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB) TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchown(SB) GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB) TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchownat(SB) GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB) TEXT libc_fclonefileat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fclonefileat(SB) GLOBL ·libc_fclonefileat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fclonefileat_trampoline_addr(SB)/8, $libc_fclonefileat_trampoline<>(SB) TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_flock(SB) GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8 DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB) TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fpathconf(SB) GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8 DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB) TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fsync(SB) GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8 DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB) TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ftruncate(SB) GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8 DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB) TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getcwd(SB) GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8 DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB) TEXT libc_getdtablesize_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getdtablesize(SB) GLOBL ·libc_getdtablesize_trampoline_addr(SB), RODATA, $8 DATA ·libc_getdtablesize_trampoline_addr(SB)/8, $libc_getdtablesize_trampoline<>(SB) TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getegid(SB) GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB) TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_geteuid(SB) GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB) TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgid(SB) GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB) TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgid(SB) GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB) TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgrp(SB) GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB) TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpid(SB) GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB) TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getppid(SB) GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB) TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpriority(SB) GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB) TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrlimit(SB) GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB) TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrusage(SB) GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB) TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsid(SB) GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB) TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_gettimeofday(SB) GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8 DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB) TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getuid(SB) GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB) TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_issetugid(SB) GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8 DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB) TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kqueue(SB) GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8 DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB) TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lchown(SB) GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8 DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB) TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_link(SB) GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8 DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB) TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_linkat(SB) GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB) TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_listen(SB) GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8 DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB) TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdir(SB) GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB) TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdirat(SB) GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB) TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifo(SB) GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB) TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknod(SB) GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB) TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mount(SB) GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_open(SB) GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8 DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB) TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_openat(SB) GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8 DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB) TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pathconf(SB) GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8 DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB) TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pread(SB) GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8 DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB) TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pwrite(SB) GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8 DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB) TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_read(SB) GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8 DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB) TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlink(SB) GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB) TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlinkat(SB) GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB) TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rename(SB) GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8 DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB) TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_renameat(SB) GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8 DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB) TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_revoke(SB) GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8 DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB) TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rmdir(SB) GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB) TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lseek(SB) GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8 DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB) TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_select(SB) GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8 DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB) TEXT libc_setattrlist_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setattrlist(SB) GLOBL ·libc_setattrlist_trampoline_addr(SB), RODATA, $8 DATA ·libc_setattrlist_trampoline_addr(SB)/8, $libc_setattrlist_trampoline<>(SB) TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setegid(SB) GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB) TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_seteuid(SB) GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB) TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgid(SB) GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB) TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setlogin(SB) GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8 DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB) TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpgid(SB) GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB) TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpriority(SB) GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8 DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB) TEXT libc_setprivexec_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setprivexec(SB) GLOBL ·libc_setprivexec_trampoline_addr(SB), RODATA, $8 DATA ·libc_setprivexec_trampoline_addr(SB)/8, $libc_setprivexec_trampoline<>(SB) TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setregid(SB) GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB) TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setreuid(SB) GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB) TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsid(SB) GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB) TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_settimeofday(SB) GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8 DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB) TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setuid(SB) GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB) TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlink(SB) GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB) TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlinkat(SB) GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB) TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sync(SB) GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8 DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB) TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_truncate(SB) GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8 DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB) TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_umask(SB) GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8 DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB) TEXT libc_undelete_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_undelete(SB) GLOBL ·libc_undelete_trampoline_addr(SB), RODATA, $8 DATA ·libc_undelete_trampoline_addr(SB)/8, $libc_undelete_trampoline<>(SB) TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlink(SB) GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB) TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlinkat(SB) GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB) TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unmount(SB) GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8 DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB) TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_write(SB) GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8 DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB) TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mmap(SB) GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB) TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munmap(SB) GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstat(SB) GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB) TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatat(SB) GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB) TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatfs(SB) GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB) TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getfsstat(SB) GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB) TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lstat(SB) GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB) TEXT libc_ptrace_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ptrace(SB) GLOBL ·libc_ptrace_trampoline_addr(SB), RODATA, $8 DATA ·libc_ptrace_trampoline_addr(SB)/8, $libc_ptrace_trampoline<>(SB) TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_stat(SB) GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8 DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB) TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_statfs(SB) GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8 DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB) ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go ================================================ // go run mksyscall.go -dragonfly -tags dragonfly,amd64 syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_amd64.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build dragonfly && amd64 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 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) 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 poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(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 Madvise(b []byte, behav 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(behav)) 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 Msync(b []byte, flags int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) 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 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 pipe2(p *[2]_C_int, flags int) (r int, w int, err error) { r0, r1, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 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 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 ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) 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 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) 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) 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) 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) 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)) 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) 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(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 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) 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 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) 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 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) 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 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) 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 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 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)) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Linkat(pathfd int, path string, linkfd int, link string, flags int) (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 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) 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) 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) 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)) 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) 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)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mknodat(fd 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(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 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)) fd = int(r0) 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, mode int, perm 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(mode), uintptr(perm), 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 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) 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))) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Renameat(fromfd int, from string, tofd int, 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 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) 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) 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) 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(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 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) 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 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) 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) 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) 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))) 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)) 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) 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) 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)) 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) 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 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 } // 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) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go ================================================ // go run mksyscall.go -l32 -tags freebsd,386 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build freebsd && 386 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 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) 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 poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(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 Madvise(b []byte, behav 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(behav)) 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 Msync(b []byte, flags int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) 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 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 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 ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) 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 ptrace(request int, pid int, addr uintptr, data int) (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 ptracePtr(request int, pid int, addr unsafe.Pointer, data int) (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 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) 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 CapEnter() (err error) { _, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func capRightsGet(version int, fd int, rightsp *CapRights) (err error) { _, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func capRightsLimit(fd int, rightsp *CapRights) (err error) { _, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 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) 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) 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) 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)) 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) 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(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) 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) 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))) 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) 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) 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))) 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) 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) 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) 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))) 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) 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 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) 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 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) 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 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) 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 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) 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 *uint64) (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)) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Linkat(pathfd int, path string, linkfd int, link string, flags int) (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 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) 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 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) 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)) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mknodat(fd int, path string, mode uint32, dev uint64) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), uintptr(dev>>32), 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)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Openat(fdat int, path string, mode int, perm uint32) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(fdat), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 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 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) 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))) n = 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) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Renameat(fromfd int, from string, tofd int, 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 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) 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) 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) 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(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 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) 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 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 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) 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) 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))) 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)) 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) 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) 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)) 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) 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 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 } // 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) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go ================================================ // go run mksyscall.go -tags freebsd,amd64 syscall_bsd.go syscall_freebsd.go syscall_freebsd_amd64.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build freebsd && amd64 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 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) 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 poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(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 Madvise(b []byte, behav 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(behav)) 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 Msync(b []byte, flags int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) 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 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 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 ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) 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 ptrace(request int, pid int, addr uintptr, data int) (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 ptracePtr(request int, pid int, addr unsafe.Pointer, data int) (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 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) 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 CapEnter() (err error) { _, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func capRightsGet(version int, fd int, rightsp *CapRights) (err error) { _, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func capRightsLimit(fd int, rightsp *CapRights) (err error) { _, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 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) 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) 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) 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)) 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) 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(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) 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) 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))) 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) 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) 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))) 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) 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) 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) 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))) 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) 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 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) 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 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) 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 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) 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 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) 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 *uint64) (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)) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Linkat(pathfd int, path string, linkfd int, link string, flags int) (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 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) 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 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) 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)) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mknodat(fd int, path string, mode uint32, dev uint64) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 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)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Openat(fdat int, path string, mode int, perm uint32) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(fdat), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 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 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) 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))) n = 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) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Renameat(fromfd int, from string, tofd int, 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 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) 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) 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) 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(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 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) 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 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 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) 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) 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))) 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) 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) 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) 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)) 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) 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 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 } // 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) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go ================================================ // go run mksyscall.go -l32 -arm -tags freebsd,arm syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build freebsd && arm 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 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) 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 poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(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 Madvise(b []byte, behav 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(behav)) 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 Msync(b []byte, flags int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) 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 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 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 ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) 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 ptrace(request int, pid int, addr uintptr, data int) (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 ptracePtr(request int, pid int, addr unsafe.Pointer, data int) (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 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) 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 CapEnter() (err error) { _, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func capRightsGet(version int, fd int, rightsp *CapRights) (err error) { _, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func capRightsLimit(fd int, rightsp *CapRights) (err error) { _, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 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) 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) 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) 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)) 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) 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(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) 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) 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))) 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) 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) 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))) 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) 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) 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) 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))) 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) 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 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) 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 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) 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 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) 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 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) 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 *uint64) (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)) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Linkat(pathfd int, path string, linkfd int, link string, flags int) (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 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) 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 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) 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)) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mknodat(fd int, path string, mode uint32, dev uint64) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, uintptr(dev), uintptr(dev>>32)) 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)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Openat(fdat int, path string, mode int, perm uint32) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(fdat), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 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 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) 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))) n = 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) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Renameat(fromfd int, from string, tofd int, 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 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) 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) 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) 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(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 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) 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 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 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) 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) 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))) 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) 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) 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) 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)) 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) 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 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 } // 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) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go ================================================ // go run mksyscall.go -tags freebsd,arm64 syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm64.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build freebsd && arm64 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 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) 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 poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(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 Madvise(b []byte, behav 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(behav)) 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 Msync(b []byte, flags int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) 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 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 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 ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) 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 ptrace(request int, pid int, addr uintptr, data int) (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 ptracePtr(request int, pid int, addr unsafe.Pointer, data int) (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 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) 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 CapEnter() (err error) { _, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func capRightsGet(version int, fd int, rightsp *CapRights) (err error) { _, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func capRightsLimit(fd int, rightsp *CapRights) (err error) { _, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 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) 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) 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) 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)) 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) 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(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) 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) 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))) 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) 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) 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))) 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) 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) 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) 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))) 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) 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 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) 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 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) 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 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) 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 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) 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 *uint64) (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)) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Linkat(pathfd int, path string, linkfd int, link string, flags int) (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 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) 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 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) 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)) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mknodat(fd int, path string, mode uint32, dev uint64) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 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)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Openat(fdat int, path string, mode int, perm uint32) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(fdat), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 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 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) 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))) n = 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) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Renameat(fromfd int, from string, tofd int, 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 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) 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) 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) 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(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 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) 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 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 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) 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) 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))) 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) 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) 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) 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)) 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) 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 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 } // 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) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go ================================================ // go run mksyscall.go -tags freebsd,riscv64 syscall_bsd.go syscall_freebsd.go syscall_freebsd_riscv64.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build freebsd && riscv64 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 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) 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 poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(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 Madvise(b []byte, behav 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(behav)) 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 Msync(b []byte, flags int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) 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 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 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 ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) 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 ptrace(request int, pid int, addr uintptr, data int) (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 ptracePtr(request int, pid int, addr unsafe.Pointer, data int) (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 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) 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 CapEnter() (err error) { _, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func capRightsGet(version int, fd int, rightsp *CapRights) (err error) { _, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func capRightsLimit(fd int, rightsp *CapRights) (err error) { _, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 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) 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) 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) 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)) 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) 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(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) 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) 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))) 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) 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) 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))) 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) 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) 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) 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))) 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) 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 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) 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 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) 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 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) 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 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) 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 *uint64) (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)) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Linkat(pathfd int, path string, linkfd int, link string, flags int) (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 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) 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 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) 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)) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mknodat(fd int, path string, mode uint32, dev uint64) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 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)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Openat(fdat int, path string, mode int, perm uint32) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(fdat), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 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 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) 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))) n = 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) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Renameat(fromfd int, from string, tofd int, 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 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) 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) 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) 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(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 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) 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 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 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) 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) 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))) 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) 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) 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) 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)) 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) 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 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 } // 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) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go ================================================ // go run mksyscall_solaris.go -illumos -tags illumos,amd64 syscall_illumos.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build illumos && amd64 package unix import ( "unsafe" ) //go:cgo_import_dynamic libc_readv readv "libc.so" //go:cgo_import_dynamic libc_preadv preadv "libc.so" //go:cgo_import_dynamic libc_writev writev "libc.so" //go:cgo_import_dynamic libc_pwritev pwritev "libc.so" //go:cgo_import_dynamic libc_accept4 accept4 "libsocket.so" //go:linkname procreadv libc_readv //go:linkname procpreadv libc_preadv //go:linkname procwritev libc_writev //go:linkname procpwritev libc_pwritev //go:linkname procaccept4 libc_accept4 var ( procreadv, procpreadv, procwritev, procpwritev, procaccept4 syscallFunc ) // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func readv(fd int, iovs []Iovec) (n int, err error) { var _p0 *Iovec if len(iovs) > 0 { _p0 = &iovs[0] } r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procreadv)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), 0, 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 preadv(fd int, iovs []Iovec, off int64) (n int, err error) { var _p0 *Iovec if len(iovs) > 0 { _p0 = &iovs[0] } r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpreadv)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), uintptr(off), 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 writev(fd int, iovs []Iovec) (n int, err error) { var _p0 *Iovec if len(iovs) > 0 { _p0 = &iovs[0] } r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwritev)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), 0, 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 pwritev(fd int, iovs []Iovec, off int64) (n int, err error) { var _p0 *Iovec if len(iovs) > 0 { _p0 = &iovs[0] } r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpwritev)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(iovs)), uintptr(off), 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 accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procaccept4)), 4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_linux.go ================================================ // Code generated by mkmerge; DO NOT EDIT. //go:build linux package unix import ( "syscall" "unsafe" ) // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) { r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 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 fchmodat(dirfd int, path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fchmodat2(dirfd int, path string, mode uint32, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall6(SYS_FCHMODAT2, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 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 ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) } return } // 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) 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) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } r0, _, e1 := Syscall6(SYS_OPENAT2, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(open_how)), 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 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 ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 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 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) 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))) 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)) 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) 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 Waitid(idType int, id int, info *Siginfo, options int, rusage *Rusage) (err error) { _, _, e1 := Syscall6(SYS_WAITID, uintptr(idType), uintptr(id), uintptr(unsafe.Pointer(info)), uintptr(options), 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 KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) { r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 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 KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret 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_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 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 keyctlJoin(cmd int, arg2 string) (ret int, err error) { var _p0 *byte _p0, err = BytePtrFromString(arg2) if err != nil { return } r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 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 keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) { var _p0 *byte _p0, err = BytePtrFromString(arg3) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(arg4) if err != nil { return } r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 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 keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) { var _p0 unsafe.Pointer if len(payload) > 0 { _p0 = unsafe.Pointer(&payload[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret 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_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 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 keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(keyType) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(restriction) if err != nil { return } _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func keyctlRestrictKeyring(cmd int, arg2 int) (err error) { _, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0) 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 ptracePtr(request int, pid int, addr uintptr, data unsafe.Pointer) (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) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func mountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr, size uintptr) (err error) { var _p0 *byte _p0, err = BytePtrFromString(pathname) if err != nil { return } _, _, e1 := Syscall6(SYS_MOUNT_SETATTR, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(unsafe.Pointer(attr)), uintptr(size), 0) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) { var _p0 *byte _p0, err = BytePtrFromString(keyType) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(description) if err != nil { return } var _p2 unsafe.Pointer if len(payload) > 0 { _p2 = unsafe.Pointer(&payload[0]) } else { _p2 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0) id = int(r0) 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 Capget(hdr *CapUserHeader, data *CapUserData) (err error) { _, _, e1 := RawSyscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Capset(hdr *CapUserHeader, data *CapUserData) (err error) { _, _, e1 := RawSyscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 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) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ClockAdjtime(clockid int32, buf *Timex) (state int, err error) { r0, _, e1 := Syscall(SYS_CLOCK_ADJTIME, uintptr(clockid), uintptr(unsafe.Pointer(buf)), 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 ClockGetres(clockid int32, res *Timespec) (err error) { _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0) 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 ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) { _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 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 CloseRange(first uint, last uint, flags uint) (err error) { _, _, e1 := Syscall(SYS_CLOSE_RANGE, uintptr(first), uintptr(last), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, 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 DeleteModule(name string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(name) if err != nil { return } _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 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 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 Eventfd(initval uint, flags int) (fd int, err error) { r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 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 Exit(code int) { SyscallNoError(SYS_EXIT_GROUP, 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 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 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) 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 Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { var _p0 *byte _p0, err = BytePtrFromString(attr) if err != nil { return } var _p1 unsafe.Pointer if len(dest) > 0 { _p1 = unsafe.Pointer(&dest[0]) } else { _p1 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0) sz = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func FinitModule(fd int, params string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(params) if err != nil { return } _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Flistxattr(fd int, dest []byte) (sz int, err error) { var _p0 unsafe.Pointer if len(dest) > 0 { _p0 = unsafe.Pointer(&dest[0]) } else { _p0 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest))) sz = int(r0) 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 Fremovexattr(fd int, attr string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(attr) if err != nil { return } _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(attr) if err != nil { return } var _p1 unsafe.Pointer if len(dest) > 0 { _p1 = unsafe.Pointer(&dest[0]) } else { _p1 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 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 Fsmount(fd int, flags int, mountAttrs int) (fsfd int, err error) { r0, _, e1 := Syscall(SYS_FSMOUNT, uintptr(fd), uintptr(flags), uintptr(mountAttrs)) fsfd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fsopen(fsName string, flags int) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(fsName) if err != nil { return } r0, _, e1 := Syscall(SYS_FSOPEN, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 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 Fspick(dirfd int, pathName string, flags int) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(pathName) if err != nil { return } r0, _, e1 := Syscall(SYS_FSPICK, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fsconfig(fd int, cmd uint, key *byte, value *byte, aux int) (err error) { _, _, e1 := Syscall6(SYS_FSCONFIG, uintptr(fd), uintptr(cmd), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(value)), uintptr(aux), 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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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 Getrandom(buf []byte, flags int) (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_GETRANDOM, uintptr(_p0), uintptr(len(buf)), 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 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 Gettid() (tid int) { r0, _ := RawSyscallNoError(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) sz = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func InitModule(moduleImage []byte, params string) (err error) { var _p0 unsafe.Pointer if len(moduleImage) > 0 { _p0 = unsafe.Pointer(&moduleImage[0]) } else { _p0 = unsafe.Pointer(&_zero) } var _p1 *byte _p1, err = BytePtrFromString(params) if err != nil { return } _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) 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)) 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 Lgetxattr(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_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) sz = 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))) sz = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Llistxattr(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_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) sz = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Lremovexattr(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_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Lsetxattr(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_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func MemfdCreate(name string, flags int) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(name) if err != nil { return } r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 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 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)) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func MoveMount(fromDirfd int, fromPathName string, toDirfd int, toPathName string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(fromPathName) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(toPathName) if err != nil { return } _, _, e1 := Syscall6(SYS_MOVE_MOUNT, uintptr(fromDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(toDirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 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 OpenTree(dfd int, fileName string, flags uint) (r int, err error) { var _p0 *byte _p0, err = BytePtrFromString(fileName) if err != nil { return } r0, _, e1 := Syscall(SYS_OPEN_TREE, uintptr(dfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) r = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) { r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 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 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) 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 pselect6(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *sigset_argpack) (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)), uintptr(unsafe.Pointer(sigmask))) 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 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (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_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) { var _p0 *byte _p0, err = BytePtrFromString(keyType) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(description) if err != nil { return } var _p2 *byte _p2, err = BytePtrFromString(callback) if err != nil { return } r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0) id = int(r0) 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 Setns(fd int, nstype int) (err error) { _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) { r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0) newfd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), 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 Sync() { SyscallNoError(SYS_SYNC, 0, 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Syncfs(fd int) (err error) { _, _, e1 := Syscall(SYS_SYNCFS, 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 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 TimerfdCreate(clockid int, flags int) (fd int, err error) { r0, _, e1 := RawSyscall(SYS_TIMERFD_CREATE, uintptr(clockid), uintptr(flags), 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 TimerfdGettime(fd int, currValue *ItimerSpec) (err error) { _, _, e1 := RawSyscall(SYS_TIMERFD_GETTIME, uintptr(fd), uintptr(unsafe.Pointer(currValue)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func TimerfdSettime(fd int, flags int, newValue *ItimerSpec, oldValue *ItimerSpec) (err error) { _, _, e1 := RawSyscall6(SYS_TIMERFD_SETTIME, uintptr(fd), uintptr(flags), uintptr(unsafe.Pointer(newValue)), uintptr(unsafe.Pointer(oldValue)), 0, 0) 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, _ := RawSyscallNoError(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) 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 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 readv(fd int, iovs []Iovec) (n int, err error) { var _p0 unsafe.Pointer if len(iovs) > 0 { _p0 = unsafe.Pointer(&iovs[0]) } else { _p0 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall(SYS_READV, uintptr(fd), uintptr(_p0), uintptr(len(iovs))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func writev(fd int, iovs []Iovec) (n int, err error) { var _p0 unsafe.Pointer if len(iovs) > 0 { _p0 = unsafe.Pointer(&iovs[0]) } else { _p0 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall(SYS_WRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func preadv(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) { var _p0 unsafe.Pointer if len(iovs) > 0 { _p0 = unsafe.Pointer(&iovs[0]) } else { _p0 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall6(SYS_PREADV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 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 pwritev(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr) (n int, err error) { var _p0 unsafe.Pointer if len(iovs) > 0 { _p0 = unsafe.Pointer(&iovs[0]) } else { _p0 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall6(SYS_PWRITEV, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 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 preadv2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) { var _p0 unsafe.Pointer if len(iovs) > 0 { _p0 = unsafe.Pointer(&iovs[0]) } else { _p0 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall6(SYS_PREADV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 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 pwritev2(fd int, iovs []Iovec, offs_l uintptr, offs_h uintptr, flags int) (n int, err error) { var _p0 unsafe.Pointer if len(iovs) > 0 { _p0 = unsafe.Pointer(&iovs[0]) } else { _p0 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall6(SYS_PWRITEV2, uintptr(fd), uintptr(_p0), uintptr(len(iovs)), uintptr(offs_l), uintptr(offs_h), 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 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 mremap(oldaddr uintptr, oldlength uintptr, newlength uintptr, flags int, newaddr uintptr) (xaddr uintptr, err error) { r0, _, e1 := Syscall6(SYS_MREMAP, uintptr(oldaddr), uintptr(oldlength), uintptr(newlength), uintptr(flags), uintptr(newaddr), 0) xaddr = uintptr(r0) 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 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 Msync(b []byte, flags int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) 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 faccessat(dirfd int, path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Faccessat2(dirfd int, path string, mode uint32, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall6(SYS_FACCESSAT2, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 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 nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(pathname) if err != nil { return } _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) { r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ProcessVMReadv(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) { var _p0 unsafe.Pointer if len(localIov) > 0 { _p0 = unsafe.Pointer(&localIov[0]) } else { _p0 = unsafe.Pointer(&_zero) } var _p1 unsafe.Pointer if len(remoteIov) > 0 { _p1 = unsafe.Pointer(&remoteIov[0]) } else { _p1 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall6(SYS_PROCESS_VM_READV, uintptr(pid), uintptr(_p0), uintptr(len(localIov)), uintptr(_p1), uintptr(len(remoteIov)), 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 ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) { var _p0 unsafe.Pointer if len(localIov) > 0 { _p0 = unsafe.Pointer(&localIov[0]) } else { _p0 = unsafe.Pointer(&_zero) } var _p1 unsafe.Pointer if len(remoteIov) > 0 { _p1 = unsafe.Pointer(&remoteIov[0]) } else { _p1 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall6(SYS_PROCESS_VM_WRITEV, uintptr(pid), uintptr(_p0), uintptr(len(localIov)), uintptr(_p1), uintptr(len(remoteIov)), 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 PidfdOpen(pid int, flags int) (fd int, err error) { r0, _, e1 := Syscall(SYS_PIDFD_OPEN, uintptr(pid), uintptr(flags), 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 PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) { r0, _, e1 := Syscall(SYS_PIDFD_GETFD, uintptr(pidfd), uintptr(targetfd), uintptr(flags)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func PidfdSendSignal(pidfd int, sig Signal, info *Siginfo, flags int) (err error) { _, _, e1 := Syscall6(SYS_PIDFD_SEND_SIGNAL, uintptr(pidfd), uintptr(sig), uintptr(unsafe.Pointer(info)), 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 shmat(id int, addr uintptr, flag int) (ret uintptr, err error) { r0, _, e1 := Syscall(SYS_SHMAT, uintptr(id), uintptr(addr), uintptr(flag)) ret = uintptr(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) { r0, _, e1 := Syscall(SYS_SHMCTL, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf))) result = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func shmdt(addr uintptr) (err error) { _, _, e1 := Syscall(SYS_SHMDT, uintptr(addr), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func shmget(key int, size int, flag int) (id int, err error) { r0, _, e1 := Syscall(SYS_SHMGET, uintptr(key), uintptr(size), uintptr(flag)) id = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getitimer(which int, currValue *Itimerval) (err error) { _, _, e1 := Syscall(SYS_GETITIMER, uintptr(which), uintptr(unsafe.Pointer(currValue)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setitimer(which int, newValue *Itimerval, oldValue *Itimerval) (err error) { _, _, e1 := Syscall(SYS_SETITIMER, uintptr(which), uintptr(unsafe.Pointer(newValue)), uintptr(unsafe.Pointer(oldValue))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func rtSigprocmask(how int, set *Sigset_t, oldset *Sigset_t, sigsetsize uintptr) (err error) { _, _, e1 := RawSyscall6(SYS_RT_SIGPROCMASK, uintptr(how), uintptr(unsafe.Pointer(set)), uintptr(unsafe.Pointer(oldset)), uintptr(sigsetsize), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) { RawSyscallNoError(SYS_GETRESUID, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid))) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) { RawSyscallNoError(SYS_GETRESGID, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid))) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func schedSetattr(pid int, attr *SchedAttr, flags uint) (err error) { _, _, e1 := Syscall(SYS_SCHED_SETATTR, uintptr(pid), uintptr(unsafe.Pointer(attr)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func schedGetattr(pid int, attr *SchedAttr, size uint, flags uint) (err error) { _, _, e1 := Syscall6(SYS_SCHED_GETATTR, uintptr(pid), uintptr(unsafe.Pointer(attr)), uintptr(size), 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 Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error) { _, _, e1 := Syscall6(SYS_CACHESTAT, uintptr(fd), uintptr(unsafe.Pointer(crange)), uintptr(unsafe.Pointer(cstat)), 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 Mseal(b []byte, flags uint) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall(SYS_MSEAL, uintptr(_p0), uintptr(len(b)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_linux_386.go ================================================ // go run mksyscall.go -l32 -tags linux,386 syscall_linux.go syscall_linux_386.go syscall_linux_alarm.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && 386 package unix import ( "syscall" "unsafe" ) var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname))) 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 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 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 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 Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 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 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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(SYS_GETUID32, 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_LCHOWN32, uintptr(unsafe.Pointer(_p0)), 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 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) 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 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) 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) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0) prev = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setfsuid(uid int) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0) prev = int(r0) 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) 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)) 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 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 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 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 futimesat(dirfd int, path string, times *[2]Timeval) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), 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 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 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) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Alarm(seconds uint) (remaining uint, err error) { r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0) remaining = uint(r0) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go ================================================ // go run mksyscall.go -tags linux,amd64 syscall_linux.go syscall_linux_amd64.go syscall_linux_alarm.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && amd64 package unix import ( "syscall" "unsafe" ) var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) 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 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 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 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 Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 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 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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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)) 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 MemfdSecret(flags int) (fd int, err error) { r0, _, e1 := Syscall(SYS_MEMFD_SECRET, 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 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 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 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) 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 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) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) prev = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setfsuid(uid int) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) prev = int(r0) 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) 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) 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 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 futimesat(dirfd int, path string, times *[2]Timeval) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), 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 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) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(cmdline) if err != nil { return } _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Alarm(seconds uint) (remaining uint, err error) { r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0) remaining = uint(r0) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go ================================================ // go run mksyscall.go -l32 -arm -tags linux,arm syscall_linux.go syscall_linux_arm.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && arm package unix import ( "syscall" "unsafe" ) var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname))) 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 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 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 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 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 Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 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 Getegid() (egid int) { r0, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(SYS_GETUID32, 0, 0, 0) uid = int(r0) 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)) 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) 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 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) 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) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0) prev = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setfsuid(uid int) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0) prev = int(r0) 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) 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 futimesat(dirfd int, path string, times *[2]Timeval) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), 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 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 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) 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) 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_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 armSyncFileRange(fd int, flags int, off int64, n int64) (err error) { _, _, e1 := Syscall6(SYS_ARM_SYNC_FILE_RANGE, uintptr(fd), uintptr(flags), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(cmdline) if err != nil { return } _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go ================================================ // go run mksyscall.go -tags linux,arm64 syscall_linux.go syscall_linux_arm64.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && arm64 package unix import ( "syscall" "unsafe" ) var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) 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 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 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_PWAIT, 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 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 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) 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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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 MemfdSecret(flags int) (fd int, err error) { r0, _, e1 := Syscall(SYS_MEMFD_SECRET, 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 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 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) 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 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) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) prev = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setfsuid(uid int) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) prev = int(r0) 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) 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) 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 kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(cmdline) if err != nil { return } _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go ================================================ // go run mksyscall.go -tags linux,loong64 syscall_linux.go syscall_linux_loong64.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && loong64 package unix import ( "syscall" "unsafe" ) var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) 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 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 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_PWAIT, 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 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 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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(SYS_GETGID, 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, _ := RawSyscallNoError(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 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) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) prev = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setfsuid(uid int) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) prev = int(r0) 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) 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) 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 kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(cmdline) if err != nil { return } _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go ================================================ // go run mksyscall.go -b32 -arm -tags linux,mips syscall_linux.go syscall_linux_mipsx.go syscall_linux_alarm.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && mips package unix import ( "syscall" "unsafe" ) var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask>>32), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname))) 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>>32), uintptr(off), uintptr(len>>32), uintptr(len)) 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(r0)<<32 | int64(r1)) 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 Fadvise(fd int, offset int64, length int64, advice int) (err error) { _, _, e1 := Syscall9(SYS_FADVISE64, uintptr(fd), 0, uintptr(offset>>32), uintptr(offset), uintptr(length>>32), 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 Ftruncate(fd int, length int64) (err error) { _, _, e1 := Syscall6(SYS_FTRUNCATE64, uintptr(fd), 0, uintptr(length>>32), uintptr(length), 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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(SYS_GETGID, 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, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0) uid = int(r0) 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)) 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 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>>32), uintptr(offset)) 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>>32), uintptr(offset)) n = int(r0) 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) 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 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) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) prev = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setfsuid(uid int) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) prev = int(r0) 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 SyncFileRange(fd int, off int64, n int64, flags int) (err error) { _, _, e1 := Syscall9(SYS_SYNC_FILE_RANGE, uintptr(fd), 0, uintptr(off>>32), uintptr(off), uintptr(n>>32), 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 := Syscall6(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length>>32), uintptr(length), 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 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 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 futimesat(dirfd int, path string, times *[2]Timeval) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), 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 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 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) 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) 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) 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 Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 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 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) 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 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 Alarm(seconds uint) (remaining uint, err error) { r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0) remaining = uint(r0) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go ================================================ // go run mksyscall.go -tags linux,mips64 syscall_linux.go syscall_linux_mips64x.go syscall_linux_alarm.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && mips64 package unix import ( "syscall" "unsafe" ) var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) 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 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 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 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 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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0) uid = int(r0) 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)) 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 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 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 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) 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 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) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) prev = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setfsuid(uid int) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) prev = int(r0) 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) 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) 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 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 futimesat(dirfd int, path string, times *[2]Timeval) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), 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 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 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) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fstat(fd int, st *stat_t) (err error) { _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(st)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fstatat(dirfd int, path string, st *stat_t, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 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 lstat(path string, st *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(st)), 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, st *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(st)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Alarm(seconds uint) (remaining uint, err error) { r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0) remaining = uint(r0) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go ================================================ // go run mksyscall.go -tags linux,mips64le syscall_linux.go syscall_linux_mips64x.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && mips64le package unix import ( "syscall" "unsafe" ) var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) 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 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 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 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 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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0) uid = int(r0) 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)) 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 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 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 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) 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 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) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) prev = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setfsuid(uid int) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) prev = int(r0) 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) 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) 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 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 futimesat(dirfd int, path string, times *[2]Timeval) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), 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 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 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) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fstat(fd int, st *stat_t) (err error) { _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(st)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fstatat(dirfd int, path string, st *stat_t, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 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 lstat(path string, st *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(st)), 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, st *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(st)), 0) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go ================================================ // go run mksyscall.go -l32 -arm -tags linux,mipsle syscall_linux.go syscall_linux_mipsx.go syscall_linux_alarm.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && mipsle package unix import ( "syscall" "unsafe" ) var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname))) 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 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 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 Fadvise(fd int, offset int64, length int64, advice int) (err error) { _, _, e1 := Syscall9(SYS_FADVISE64, 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 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 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 Getegid() (egid int) { r0, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(SYS_GETGID, 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, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0) uid = int(r0) 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)) 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 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 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) 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 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) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) prev = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setfsuid(uid int) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) prev = int(r0) 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 SyncFileRange(fd int, off int64, n int64, flags int) (err error) { _, _, e1 := Syscall9(SYS_SYNC_FILE_RANGE, uintptr(fd), 0, uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32), 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 := Syscall6(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), 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 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 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 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 futimesat(dirfd int, path string, times *[2]Timeval) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), 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 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 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) 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) 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) 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 Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 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 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) 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 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 Alarm(seconds uint) (remaining uint, err error) { r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0) remaining = uint(r0) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go ================================================ // go run mksyscall.go -b32 -tags linux,ppc syscall_linux.go syscall_linux_ppc.go syscall_linux_alarm.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && ppc package unix import ( "syscall" "unsafe" ) var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask>>32), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname))) 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>>32), uintptr(off), uintptr(len>>32), uintptr(len)) 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(r0)<<32 | int64(r1)) 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 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_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 Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 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 Ftruncate(fd int, length int64) (err error) { _, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length>>32), 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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(SYS_GETGID, 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, _ := RawSyscallNoError(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)) 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) 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 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>>32), 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_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset>>32), 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 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) 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 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) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) prev = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setfsuid(uid int) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) prev = int(r0) 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) 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>>32), uintptr(length)) 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 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 futimesat(dirfd int, path string, times *[2]Timeval) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), 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 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 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) 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) 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_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 syncFileRange2(fd int, flags int, off int64, n int64) (err error) { _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off>>32), uintptr(off), uintptr(n>>32), uintptr(n)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(cmdline) if err != nil { return } _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Alarm(seconds uint) (remaining uint, err error) { r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0) remaining = uint(r0) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go ================================================ // go run mksyscall.go -tags linux,ppc64 syscall_linux.go syscall_linux_ppc64x.go syscall_linux_alarm.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && ppc64 package unix import ( "syscall" "unsafe" ) var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) 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 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 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 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 Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 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 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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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)) 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) 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 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 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) 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__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 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) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) prev = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setfsuid(uid int) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) prev = int(r0) 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) 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) 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) 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 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 futimesat(dirfd int, path string, times *[2]Timeval) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), 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 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 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) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func syncFileRange2(fd int, flags int, off int64, n int64) (err error) { _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(cmdline) if err != nil { return } _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Alarm(seconds uint) (remaining uint, err error) { r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0) remaining = uint(r0) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go ================================================ // go run mksyscall.go -tags linux,ppc64le syscall_linux.go syscall_linux_ppc64x.go syscall_linux_alarm.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && ppc64le package unix import ( "syscall" "unsafe" ) var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) 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 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 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 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 Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 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 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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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)) 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) 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 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 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) 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__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 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) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) prev = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setfsuid(uid int) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) prev = int(r0) 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) 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) 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) 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 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 futimesat(dirfd int, path string, times *[2]Timeval) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), 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 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 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) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func syncFileRange2(fd int, flags int, off int64, n int64) (err error) { _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(cmdline) if err != nil { return } _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Alarm(seconds uint) (remaining uint, err error) { r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0) remaining = uint(r0) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go ================================================ // go run mksyscall.go -tags linux,riscv64 syscall_linux.go syscall_linux_riscv64.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && riscv64 package unix import ( "syscall" "unsafe" ) var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) 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 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 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_PWAIT, 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 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 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) 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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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 MemfdSecret(flags int) (fd int, err error) { r0, _, e1 := Syscall(SYS_MEMFD_SECRET, 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 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 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) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) prev = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setfsuid(uid int) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) prev = int(r0) 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) 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) 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 kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(cmdline) if err != nil { return } _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func riscvHWProbe(pairs []RISCVHWProbePairs, cpuCount uintptr, cpus *CPUSet, flags uint) (err error) { var _p0 unsafe.Pointer if len(pairs) > 0 { _p0 = unsafe.Pointer(&pairs[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall6(SYS_RISCV_HWPROBE, uintptr(_p0), uintptr(len(pairs)), uintptr(cpuCount), uintptr(unsafe.Pointer(cpus)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go ================================================ // go run mksyscall.go -tags linux,s390x syscall_linux.go syscall_linux_s390x.go syscall_linux_alarm.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && s390x package unix import ( "syscall" "unsafe" ) var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) 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 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 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 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 Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 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 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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0) uid = int(r0) 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)) 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) 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 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 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) 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) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) prev = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setfsuid(uid int) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) prev = int(r0) 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) 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) 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) 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 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 futimesat(dirfd int, path string, times *[2]Timeval) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), 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 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 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) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(cmdline) if err != nil { return } _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Alarm(seconds uint) (remaining uint, err error) { r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0) remaining = uint(r0) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go ================================================ // go run mksyscall.go -tags linux,sparc64 syscall_linux.go syscall_linux_sparc64.go syscall_linux_alarm.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build linux && sparc64 package unix import ( "syscall" "unsafe" ) var _ syscall.Errno // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) 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 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 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 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 Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 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 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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(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, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0) uid = int(r0) 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)) 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) 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 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 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) 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) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) prev = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setfsuid(uid int) (prev int, err error) { r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) prev = int(r0) 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) 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) 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) 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 futimesat(dirfd int, path string, times *[2]Timeval) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), 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 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 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) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Alarm(seconds uint) (remaining uint, err error) { r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0) remaining = uint(r0) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go ================================================ // go run mksyscall.go -l32 -netbsd -tags netbsd,386 syscall_bsd.go syscall_netbsd.go syscall_netbsd_386.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build netbsd && 386 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 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) 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 poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(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 Madvise(b []byte, behav 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(behav)) 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 Msync(b []byte, flags int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) 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 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 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 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 ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) 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 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) 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) 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) 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) 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)) 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) 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(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 Dup3(from int, to int, flags int) (err error) { _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags)) 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) 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) 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))) 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) 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) 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))) 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) 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) 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) 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))) 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) ret = int(r0) if e1 != 0 { err = errnoErr(e1) } 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) 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), 0, uintptr(length), uintptr(length>>32), uintptr(advice), 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 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) 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 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) 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 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstatvfs1(fd int, buf *Statvfs_t, flags int) (err error) { _, _, e1 := Syscall(SYS_FSTATVFS1, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(flags)) 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)) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Linkat(pathfd int, path string, linkfd int, link string, flags int) (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 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) 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) 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) 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)) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkfifoat(dirfd int, path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) 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)) 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) 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)) fd = int(r0) 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, mode int, perm 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(mode), uintptr(perm), 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 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) 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))) n = 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) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Renameat(fromfd int, from string, tofd int, 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 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) 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) 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) 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(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 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 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Statvfs1(path string, buf *Statvfs_t, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_STATVFS1, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), uintptr(flags)) 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) 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))) 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) 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) 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)) 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) 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 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func mremapNetBSD(oldp uintptr, oldsize uintptr, newp uintptr, newsize uintptr, flags int) (xaddr uintptr, err error) { r0, _, e1 := Syscall6(SYS_MREMAP, uintptr(oldp), uintptr(oldsize), uintptr(newp), uintptr(newsize), uintptr(flags), 0) xaddr = uintptr(r0) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go ================================================ // go run mksyscall.go -netbsd -tags netbsd,amd64 syscall_bsd.go syscall_netbsd.go syscall_netbsd_amd64.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build netbsd && amd64 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 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) 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 poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(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 Madvise(b []byte, behav 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(behav)) 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 Msync(b []byte, flags int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) 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 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 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 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 ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) 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 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) 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) 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) 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) 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)) 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) 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(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 Dup3(from int, to int, flags int) (err error) { _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags)) 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) 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) 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))) 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) 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) 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))) 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) 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) 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) 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))) 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) ret = int(r0) if e1 != 0 { err = errnoErr(e1) } 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) 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), 0, uintptr(offset), 0, uintptr(length), 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 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) 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 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) 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 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstatvfs1(fd int, buf *Statvfs_t, flags int) (err error) { _, _, e1 := Syscall(SYS_FSTATVFS1, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(flags)) 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)) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Linkat(pathfd int, path string, linkfd int, link string, flags int) (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 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) 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) 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) 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)) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkfifoat(dirfd int, path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) 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)) 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) 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)) fd = int(r0) 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, mode int, perm 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(mode), uintptr(perm), 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 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) 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))) n = 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) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Renameat(fromfd int, from string, tofd int, 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 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) 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) 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) 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(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 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 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Statvfs1(path string, buf *Statvfs_t, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_STATVFS1, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), uintptr(flags)) 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) 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))) 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)) 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) 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)) 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) 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 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func mremapNetBSD(oldp uintptr, oldsize uintptr, newp uintptr, newsize uintptr, flags int) (xaddr uintptr, err error) { r0, _, e1 := Syscall6(SYS_MREMAP, uintptr(oldp), uintptr(oldsize), uintptr(newp), uintptr(newsize), uintptr(flags), 0) xaddr = uintptr(r0) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go ================================================ // go run mksyscall.go -l32 -netbsd -arm -tags netbsd,arm syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build netbsd && arm 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 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) 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 poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(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 Madvise(b []byte, behav 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(behav)) 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 Msync(b []byte, flags int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) 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 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 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 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 ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) 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 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) 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) 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) 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) 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)) 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) 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(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 Dup3(from int, to int, flags int) (err error) { _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags)) 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) 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) 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))) 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) 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) 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))) 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) 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) 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) 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))) 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) ret = int(r0) if e1 != 0 { err = errnoErr(e1) } 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) 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), 0, uintptr(length), uintptr(length>>32), uintptr(advice), 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 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) 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 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) 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 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstatvfs1(fd int, buf *Statvfs_t, flags int) (err error) { _, _, e1 := Syscall(SYS_FSTATVFS1, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(flags)) 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)) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Linkat(pathfd int, path string, linkfd int, link string, flags int) (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 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) 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) 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) 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)) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkfifoat(dirfd int, path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) 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)) 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) 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)) fd = int(r0) 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, mode int, perm 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(mode), uintptr(perm), 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 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) 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))) n = 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) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Renameat(fromfd int, from string, tofd int, 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 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) 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) 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) 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(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 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 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Statvfs1(path string, buf *Statvfs_t, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_STATVFS1, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), uintptr(flags)) 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) 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))) 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) 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) 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)) 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) 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 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func mremapNetBSD(oldp uintptr, oldsize uintptr, newp uintptr, newsize uintptr, flags int) (xaddr uintptr, err error) { r0, _, e1 := Syscall6(SYS_MREMAP, uintptr(oldp), uintptr(oldsize), uintptr(newp), uintptr(newsize), uintptr(flags), 0) xaddr = uintptr(r0) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go ================================================ // go run mksyscall.go -netbsd -tags netbsd,arm64 syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm64.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build netbsd && arm64 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 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) 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 poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(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 Madvise(b []byte, behav 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(behav)) 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 Msync(b []byte, flags int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) 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 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 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 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 ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) 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 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) 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) 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) 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) 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)) 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) 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(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 Dup3(from int, to int, flags int) (err error) { _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags)) 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) 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) 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))) 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) 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) 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))) 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) 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) 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) 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))) 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) ret = int(r0) if e1 != 0 { err = errnoErr(e1) } 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) 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), 0, uintptr(offset), 0, uintptr(length), 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 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) 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 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) 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 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstatvfs1(fd int, buf *Statvfs_t, flags int) (err error) { _, _, e1 := Syscall(SYS_FSTATVFS1, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(flags)) 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)) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Linkat(pathfd int, path string, linkfd int, link string, flags int) (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 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) 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) 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) 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)) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkfifoat(dirfd int, path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) 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)) 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) 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)) fd = int(r0) 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, mode int, perm 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(mode), uintptr(perm), 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 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) 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))) n = 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) 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Renameat(fromfd int, from string, tofd int, 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 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) 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) 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) 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(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 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 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Statvfs1(path string, buf *Statvfs_t, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_STATVFS1, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), uintptr(flags)) 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) 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))) 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)) 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) 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)) 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) 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 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func mremapNetBSD(oldp uintptr, oldsize uintptr, newp uintptr, newsize uintptr, flags int) (xaddr uintptr, err error) { r0, _, e1 := Syscall6(SYS_MREMAP, uintptr(oldp), uintptr(oldsize), uintptr(newp), uintptr(newsize), uintptr(flags), 0) xaddr = uintptr(r0) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go ================================================ // go run mksyscall.go -l32 -openbsd -libc -tags openbsd,386 syscall_bsd.go syscall_openbsd.go syscall_openbsd_386.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build openbsd && 386 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 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getgroups_trampoline_addr uintptr //go:cgo_import_dynamic libc_getgroups getgroups "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setgroups(ngid int, gid *_Gid_t) (err error) { _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setgroups_trampoline_addr uintptr //go:cgo_import_dynamic libc_setgroups setgroups "libc.so" // 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 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) wpid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_wait4_trampoline_addr uintptr //go:cgo_import_dynamic libc_wait4 wait4 "libc.so" // 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_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_accept_trampoline_addr uintptr //go:cgo_import_dynamic libc_accept accept "libc.so" // 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_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_bind_trampoline_addr uintptr //go:cgo_import_dynamic libc_bind bind "libc.so" // 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_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_connect_trampoline_addr uintptr //go:cgo_import_dynamic libc_connect connect "libc.so" // 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 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_socket_trampoline_addr uintptr //go:cgo_import_dynamic libc_socket socket "libc.so" // 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 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsockopt_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsockopt getsockopt "libc.so" // 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 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setsockopt_trampoline_addr uintptr //go:cgo_import_dynamic libc_setsockopt setsockopt "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpeername_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpeername getpeername "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsockname_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsockname getsockname "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Shutdown(s int, how int) (err error) { _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_shutdown_trampoline_addr uintptr //go:cgo_import_dynamic libc_shutdown shutdown "libc.so" // 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 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_socketpair_trampoline_addr uintptr //go:cgo_import_dynamic libc_socketpair socketpair "libc.so" // 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 := syscall_syscall6(libc_recvfrom_trampoline_addr, 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 } var libc_recvfrom_trampoline_addr uintptr //go:cgo_import_dynamic libc_recvfrom recvfrom "libc.so" // 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 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_sendto_trampoline_addr uintptr //go:cgo_import_dynamic libc_sendto sendto "libc.so" // 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_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_recvmsg_trampoline_addr uintptr //go:cgo_import_dynamic libc_recvmsg recvmsg "libc.so" // 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_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_sendmsg_trampoline_addr uintptr //go:cgo_import_dynamic libc_sendmsg sendmsg "libc.so" // 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 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_kevent_trampoline_addr uintptr //go:cgo_import_dynamic libc_kevent kevent "libc.so" // 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_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_utimes_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimes utimes "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func futimes(fd int, timeval *[2]Timeval) (err error) { _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_futimes_trampoline_addr uintptr //go:cgo_import_dynamic libc_futimes futimes "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_poll_trampoline_addr uintptr //go:cgo_import_dynamic libc_poll poll "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Madvise(b []byte, behav int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav)) if e1 != 0 { err = errnoErr(e1) } return } var libc_madvise_trampoline_addr uintptr //go:cgo_import_dynamic libc_madvise madvise "libc.so" // 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_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mlock_trampoline_addr uintptr //go:cgo_import_dynamic libc_mlock mlock "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mlockall(flags int) (err error) { _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mlockall_trampoline_addr uintptr //go:cgo_import_dynamic libc_mlockall mlockall "libc.so" // 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_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mprotect_trampoline_addr uintptr //go:cgo_import_dynamic libc_mprotect mprotect "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Msync(b []byte, flags int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_msync_trampoline_addr uintptr //go:cgo_import_dynamic libc_msync msync "libc.so" // 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_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munlock_trampoline_addr uintptr //go:cgo_import_dynamic libc_munlock munlock "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Munlockall() (err error) { _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munlockall_trampoline_addr uintptr //go:cgo_import_dynamic libc_munlockall munlockall "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pipe2(p *[2]_C_int, flags int) (err error) { _, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pipe2_trampoline_addr uintptr //go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so" // 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_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getdents_trampoline_addr uintptr //go:cgo_import_dynamic libc_getdents getdents "libc.so" // 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_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getcwd_trampoline_addr uintptr //go:cgo_import_dynamic libc_getcwd getcwd "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) { syscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid))) return } var libc_getresuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getresuid getresuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) { syscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid))) return } var libc_getresgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getresgid getresgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) } return } var libc_ioctl_trampoline_addr uintptr //go:cgo_import_dynamic libc_ioctl ioctl "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg)) 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 := syscall_syscall6(libc_sysctl_trampoline_addr, 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 } var libc_sysctl_trampoline_addr uintptr //go:cgo_import_dynamic libc_sysctl sysctl "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fcntl(fd int, cmd int, arg int) (n int, err error) { r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fcntl_trampoline_addr uintptr //go:cgo_import_dynamic libc_fcntl fcntl "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) { r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_ppoll_trampoline_addr uintptr //go:cgo_import_dynamic libc_ppoll ppoll "libc.so" // 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_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_access_trampoline_addr uintptr //go:cgo_import_dynamic libc_access access "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_adjtime_trampoline_addr uintptr //go:cgo_import_dynamic libc_adjtime adjtime "libc.so" // 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_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_chdir chdir "libc.so" // 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_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chflags_trampoline_addr uintptr //go:cgo_import_dynamic libc_chflags chflags "libc.so" // 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_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chmod_trampoline_addr uintptr //go:cgo_import_dynamic libc_chmod chmod "libc.so" // 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_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_chown_trampoline_addr uintptr //go:cgo_import_dynamic libc_chown chown "libc.so" // 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_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chroot_trampoline_addr uintptr //go:cgo_import_dynamic libc_chroot chroot "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ClockGettime(clockid int32, time *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_clock_gettime_trampoline_addr uintptr //go:cgo_import_dynamic libc_clock_gettime clock_gettime "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Close(fd int) (err error) { _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_close_trampoline_addr uintptr //go:cgo_import_dynamic libc_close close "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup(fd int) (nfd int, err error) { r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0) nfd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_dup_trampoline_addr uintptr //go:cgo_import_dynamic libc_dup dup "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup2(from int, to int) (err error) { _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_dup2_trampoline_addr uintptr //go:cgo_import_dynamic libc_dup2 dup2 "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup3(from int, to int, flags int) (err error) { _, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_dup3_trampoline_addr uintptr //go:cgo_import_dynamic libc_dup3 dup3 "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0) return } var libc_exit_trampoline_addr uintptr //go:cgo_import_dynamic libc_exit exit "libc.so" // 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 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_faccessat_trampoline_addr uintptr //go:cgo_import_dynamic libc_faccessat faccessat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchdir(fd int) (err error) { _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchdir fchdir "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchflags(fd int, flags int) (err error) { _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchflags_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchflags fchflags "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchmod(fd int, mode uint32) (err error) { _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchmod_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchmod fchmod "libc.so" // 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 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchmodat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so" // 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_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchown_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchown fchown "libc.so" // 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 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchownat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchownat fchownat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Flock(fd int, how int) (err error) { _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_flock_trampoline_addr uintptr //go:cgo_import_dynamic libc_flock flock "libc.so" // 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_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0) val = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fpathconf_trampoline_addr uintptr //go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstat(fd int, stat *Stat_t) (err error) { _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstat fstat "libc.so" // 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 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstatat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstatat fstatat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstatfs(fd int, stat *Statfs_t) (err error) { _, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstatfs_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstatfs fstatfs "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fsync(fd int) (err error) { _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fsync_trampoline_addr uintptr //go:cgo_import_dynamic libc_fsync fsync "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Ftruncate(fd int, length int64) (err error) { _, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), uintptr(length>>32)) if e1 != 0 { err = errnoErr(e1) } return } var libc_ftruncate_trampoline_addr uintptr //go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0) egid = int(r0) return } var libc_getegid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getegid getegid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (uid int) { r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0) uid = int(r0) return } var libc_geteuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_geteuid geteuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0) gid = int(r0) return } var libc_getgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getgid getgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgid(pid int) (pgid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0) pgid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpgid getpgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgrp() (pgrp int) { r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0) pgrp = int(r0) return } var libc_getpgrp_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0) pid = int(r0) return } var libc_getpid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpid getpid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0) ppid = int(r0) return } var libc_getppid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getppid getppid "libc.so" // 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_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0) prio = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpriority_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpriority getpriority "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrlimit(which int, lim *Rlimit) (err error) { _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getrlimit_trampoline_addr uintptr //go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrtable() (rtable int, err error) { r0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0) rtable = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getrtable_trampoline_addr uintptr //go:cgo_import_dynamic libc_getrtable getrtable "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrusage(who int, rusage *Rusage) (err error) { _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getrusage_trampoline_addr uintptr //go:cgo_import_dynamic libc_getrusage getrusage "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getsid(pid int) (sid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0) sid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsid getsid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Gettimeofday(tv *Timeval) (err error) { _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_gettimeofday_trampoline_addr uintptr //go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0) uid = int(r0) return } var libc_getuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getuid getuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Issetugid() (tainted bool) { r0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0) tainted = bool(r0 != 0) return } var libc_issetugid_trampoline_addr uintptr //go:cgo_import_dynamic libc_issetugid issetugid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Kill(pid int, signum syscall.Signal) (err error) { _, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_kill_trampoline_addr uintptr //go:cgo_import_dynamic libc_kill kill "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Kqueue() (fd int, err error) { r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_kqueue_trampoline_addr uintptr //go:cgo_import_dynamic libc_kqueue kqueue "libc.so" // 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_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_lchown_trampoline_addr uintptr //go:cgo_import_dynamic libc_lchown lchown "libc.so" // 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_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_link_trampoline_addr uintptr //go:cgo_import_dynamic libc_link link "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Linkat(pathfd int, path string, linkfd int, link string, flags int) (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_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_linkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_linkat linkat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Listen(s int, backlog int) (err error) { _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_listen_trampoline_addr uintptr //go:cgo_import_dynamic libc_listen listen "libc.so" // 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_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_lstat_trampoline_addr uintptr //go:cgo_import_dynamic libc_lstat lstat "libc.so" // 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_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkdir mkdir "libc.so" // 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_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkdirat_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so" // 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_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkfifo_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkfifoat(dirfd int, path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkfifoat_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so" // 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_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mknod_trampoline_addr uintptr //go:cgo_import_dynamic libc_mknod mknod "libc.so" // 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 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mknodat_trampoline_addr uintptr //go:cgo_import_dynamic libc_mknodat mknodat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { var _p0 *byte _p0, err = BytePtrFromString(fsType) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(dir) if err != nil { return } _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mount_trampoline_addr uintptr //go:cgo_import_dynamic libc_mount mount "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_nanosleep_trampoline_addr uintptr //go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so" // 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_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_open_trampoline_addr uintptr //go:cgo_import_dynamic libc_open open "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_openat_trampoline_addr uintptr //go:cgo_import_dynamic libc_openat openat "libc.so" // 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_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) val = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pathconf_trampoline_addr uintptr //go:cgo_import_dynamic libc_pathconf pathconf "libc.so" // 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 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pread_trampoline_addr uintptr //go:cgo_import_dynamic libc_pread pread "libc.so" // 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 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pwrite_trampoline_addr uintptr //go:cgo_import_dynamic libc_pwrite pwrite "libc.so" // 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_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_read_trampoline_addr uintptr //go:cgo_import_dynamic libc_read read "libc.so" // 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_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_readlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_readlink readlink "libc.so" // 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 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_readlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_readlinkat readlinkat "libc.so" // 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_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_rename_trampoline_addr uintptr //go:cgo_import_dynamic libc_rename rename "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Renameat(fromfd int, from string, tofd int, 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_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_renameat_trampoline_addr uintptr //go:cgo_import_dynamic libc_renameat renameat "libc.so" // 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_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_revoke_trampoline_addr uintptr //go:cgo_import_dynamic libc_revoke revoke "libc.so" // 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_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_rmdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_rmdir rmdir "libc.so" // 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 := syscall_syscall6(libc_lseek_trampoline_addr, 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 } var libc_lseek_trampoline_addr uintptr //go:cgo_import_dynamic libc_lseek lseek "libc.so" // 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 := syscall_syscall6(libc_select_trampoline_addr, 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 } var libc_select_trampoline_addr uintptr //go:cgo_import_dynamic libc_select select "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setegid(egid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setegid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setegid setegid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Seteuid(euid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_seteuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_seteuid seteuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setgid(gid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setgid setgid "libc.so" // 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_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setlogin_trampoline_addr uintptr //go:cgo_import_dynamic libc_setlogin setlogin "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setpgid(pid int, pgid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setpgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setpgid setpgid "libc.so" // 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_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio)) if e1 != 0 { err = errnoErr(e1) } return } var libc_setpriority_trampoline_addr uintptr //go:cgo_import_dynamic libc_setpriority setpriority "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setregid(rgid int, egid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setregid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setregid setregid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setreuid(ruid int, euid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setreuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setreuid setreuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setresgid(rgid int, egid int, sgid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_setresgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setresgid setresgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setresuid(ruid int, euid int, suid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_setresuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setresuid setresuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setrtable(rtable int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setrtable_trampoline_addr uintptr //go:cgo_import_dynamic libc_setrtable setrtable "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setsid() (pid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0) pid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setsid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setsid setsid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Settimeofday(tp *Timeval) (err error) { _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_settimeofday_trampoline_addr uintptr //go:cgo_import_dynamic libc_settimeofday settimeofday "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setuid(uid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setuid setuid "libc.so" // 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_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_stat_trampoline_addr uintptr //go:cgo_import_dynamic libc_stat stat "libc.so" // 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_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_statfs_trampoline_addr uintptr //go:cgo_import_dynamic libc_statfs statfs "libc.so" // 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_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_symlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_symlink symlink "libc.so" // 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_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) if e1 != 0 { err = errnoErr(e1) } return } var libc_symlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_symlinkat symlinkat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Sync() (err error) { _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_sync_trampoline_addr uintptr //go:cgo_import_dynamic libc_sync sync "libc.so" // 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_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32)) if e1 != 0 { err = errnoErr(e1) } return } var libc_truncate_trampoline_addr uintptr //go:cgo_import_dynamic libc_truncate truncate "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(newmask int) (oldmask int) { r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0) oldmask = int(r0) return } var libc_umask_trampoline_addr uintptr //go:cgo_import_dynamic libc_umask umask "libc.so" // 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_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_unlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_unlink unlink "libc.so" // 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_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_unlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so" // 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_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_unmount_trampoline_addr uintptr //go:cgo_import_dynamic libc_unmount unmount "libc.so" // 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_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_write_trampoline_addr uintptr //go:cgo_import_dynamic libc_write write "libc.so" // 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 := syscall_syscall9(libc_mmap_trampoline_addr, 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 } var libc_mmap_trampoline_addr uintptr //go:cgo_import_dynamic libc_mmap mmap "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func munmap(addr uintptr, length uintptr) (err error) { _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munmap_trampoline_addr uintptr //go:cgo_import_dynamic libc_munmap munmap "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) { r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getfsstat_trampoline_addr uintptr //go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so" // 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 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_utimensat_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimensat utimensat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pledge(promises *byte, execpromises *byte) (err error) { _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pledge_trampoline_addr uintptr //go:cgo_import_dynamic libc_pledge pledge "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func unveil(path *byte, flags *byte) (err error) { _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_unveil_trampoline_addr uintptr //go:cgo_import_dynamic libc_unveil unveil "libc.so" ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s ================================================ // go run mkasm.go openbsd 386 // Code generated by the command above; DO NOT EDIT. #include "textflag.h" TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgroups(SB) GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $4 DATA ·libc_getgroups_trampoline_addr(SB)/4, $libc_getgroups_trampoline<>(SB) TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgroups(SB) GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $4 DATA ·libc_setgroups_trampoline_addr(SB)/4, $libc_setgroups_trampoline<>(SB) TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_wait4(SB) GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $4 DATA ·libc_wait4_trampoline_addr(SB)/4, $libc_wait4_trampoline<>(SB) TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_accept(SB) GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $4 DATA ·libc_accept_trampoline_addr(SB)/4, $libc_accept_trampoline<>(SB) TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_bind(SB) GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $4 DATA ·libc_bind_trampoline_addr(SB)/4, $libc_bind_trampoline<>(SB) TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_connect(SB) GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $4 DATA ·libc_connect_trampoline_addr(SB)/4, $libc_connect_trampoline<>(SB) TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socket(SB) GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $4 DATA ·libc_socket_trampoline_addr(SB)/4, $libc_socket_trampoline<>(SB) TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockopt(SB) GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $4 DATA ·libc_getsockopt_trampoline_addr(SB)/4, $libc_getsockopt_trampoline<>(SB) TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsockopt(SB) GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $4 DATA ·libc_setsockopt_trampoline_addr(SB)/4, $libc_setsockopt_trampoline<>(SB) TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpeername(SB) GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpeername_trampoline_addr(SB)/4, $libc_getpeername_trampoline<>(SB) TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockname(SB) GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $4 DATA ·libc_getsockname_trampoline_addr(SB)/4, $libc_getsockname_trampoline<>(SB) TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_shutdown(SB) GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $4 DATA ·libc_shutdown_trampoline_addr(SB)/4, $libc_shutdown_trampoline<>(SB) TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socketpair(SB) GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $4 DATA ·libc_socketpair_trampoline_addr(SB)/4, $libc_socketpair_trampoline<>(SB) TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvfrom(SB) GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $4 DATA ·libc_recvfrom_trampoline_addr(SB)/4, $libc_recvfrom_trampoline<>(SB) TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendto(SB) GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $4 DATA ·libc_sendto_trampoline_addr(SB)/4, $libc_sendto_trampoline<>(SB) TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvmsg(SB) GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $4 DATA ·libc_recvmsg_trampoline_addr(SB)/4, $libc_recvmsg_trampoline<>(SB) TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendmsg(SB) GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $4 DATA ·libc_sendmsg_trampoline_addr(SB)/4, $libc_sendmsg_trampoline<>(SB) TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kevent(SB) GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $4 DATA ·libc_kevent_trampoline_addr(SB)/4, $libc_kevent_trampoline<>(SB) TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimes(SB) GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $4 DATA ·libc_utimes_trampoline_addr(SB)/4, $libc_utimes_trampoline<>(SB) TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_futimes(SB) GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $4 DATA ·libc_futimes_trampoline_addr(SB)/4, $libc_futimes_trampoline<>(SB) TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_poll(SB) GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $4 DATA ·libc_poll_trampoline_addr(SB)/4, $libc_poll_trampoline<>(SB) TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_madvise(SB) GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $4 DATA ·libc_madvise_trampoline_addr(SB)/4, $libc_madvise_trampoline<>(SB) TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlock(SB) GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $4 DATA ·libc_mlock_trampoline_addr(SB)/4, $libc_mlock_trampoline<>(SB) TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlockall(SB) GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $4 DATA ·libc_mlockall_trampoline_addr(SB)/4, $libc_mlockall_trampoline<>(SB) TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mprotect(SB) GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $4 DATA ·libc_mprotect_trampoline_addr(SB)/4, $libc_mprotect_trampoline<>(SB) TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_msync(SB) GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $4 DATA ·libc_msync_trampoline_addr(SB)/4, $libc_msync_trampoline<>(SB) TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlock(SB) GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $4 DATA ·libc_munlock_trampoline_addr(SB)/4, $libc_munlock_trampoline<>(SB) TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlockall(SB) GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $4 DATA ·libc_munlockall_trampoline_addr(SB)/4, $libc_munlockall_trampoline<>(SB) TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pipe2(SB) GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $4 DATA ·libc_pipe2_trampoline_addr(SB)/4, $libc_pipe2_trampoline<>(SB) TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getdents(SB) GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $4 DATA ·libc_getdents_trampoline_addr(SB)/4, $libc_getdents_trampoline<>(SB) TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getcwd(SB) GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $4 DATA ·libc_getcwd_trampoline_addr(SB)/4, $libc_getcwd_trampoline<>(SB) TEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getresuid(SB) GLOBL ·libc_getresuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getresuid_trampoline_addr(SB)/4, $libc_getresuid_trampoline<>(SB) TEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getresgid(SB) GLOBL ·libc_getresgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getresgid_trampoline_addr(SB)/4, $libc_getresgid_trampoline<>(SB) TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ioctl(SB) GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $4 DATA ·libc_ioctl_trampoline_addr(SB)/4, $libc_ioctl_trampoline<>(SB) TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sysctl(SB) GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $4 DATA ·libc_sysctl_trampoline_addr(SB)/4, $libc_sysctl_trampoline<>(SB) TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fcntl(SB) GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $4 DATA ·libc_fcntl_trampoline_addr(SB)/4, $libc_fcntl_trampoline<>(SB) TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $4 DATA ·libc_ppoll_trampoline_addr(SB)/4, $libc_ppoll_trampoline<>(SB) TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_access(SB) GLOBL ·libc_access_trampoline_addr(SB), RODATA, $4 DATA ·libc_access_trampoline_addr(SB)/4, $libc_access_trampoline<>(SB) TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_adjtime(SB) GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $4 DATA ·libc_adjtime_trampoline_addr(SB)/4, $libc_adjtime_trampoline<>(SB) TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chdir(SB) GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $4 DATA ·libc_chdir_trampoline_addr(SB)/4, $libc_chdir_trampoline<>(SB) TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chflags(SB) GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $4 DATA ·libc_chflags_trampoline_addr(SB)/4, $libc_chflags_trampoline<>(SB) TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chmod(SB) GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $4 DATA ·libc_chmod_trampoline_addr(SB)/4, $libc_chmod_trampoline<>(SB) TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chown(SB) GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $4 DATA ·libc_chown_trampoline_addr(SB)/4, $libc_chown_trampoline<>(SB) TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chroot(SB) GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $4 DATA ·libc_chroot_trampoline_addr(SB)/4, $libc_chroot_trampoline<>(SB) TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_clock_gettime(SB) GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $4 DATA ·libc_clock_gettime_trampoline_addr(SB)/4, $libc_clock_gettime_trampoline<>(SB) TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_close(SB) GLOBL ·libc_close_trampoline_addr(SB), RODATA, $4 DATA ·libc_close_trampoline_addr(SB)/4, $libc_close_trampoline<>(SB) TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup(SB) GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $4 DATA ·libc_dup_trampoline_addr(SB)/4, $libc_dup_trampoline<>(SB) TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup2(SB) GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $4 DATA ·libc_dup2_trampoline_addr(SB)/4, $libc_dup2_trampoline<>(SB) TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup3(SB) GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $4 DATA ·libc_dup3_trampoline_addr(SB)/4, $libc_dup3_trampoline<>(SB) TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_exit(SB) GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $4 DATA ·libc_exit_trampoline_addr(SB)/4, $libc_exit_trampoline<>(SB) TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_faccessat(SB) GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $4 DATA ·libc_faccessat_trampoline_addr(SB)/4, $libc_faccessat_trampoline<>(SB) TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchdir(SB) GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchdir_trampoline_addr(SB)/4, $libc_fchdir_trampoline<>(SB) TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchflags(SB) GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchflags_trampoline_addr(SB)/4, $libc_fchflags_trampoline<>(SB) TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmod(SB) GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchmod_trampoline_addr(SB)/4, $libc_fchmod_trampoline<>(SB) TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmodat(SB) GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchmodat_trampoline_addr(SB)/4, $libc_fchmodat_trampoline<>(SB) TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchown(SB) GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchown_trampoline_addr(SB)/4, $libc_fchown_trampoline<>(SB) TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchownat(SB) GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchownat_trampoline_addr(SB)/4, $libc_fchownat_trampoline<>(SB) TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_flock(SB) GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $4 DATA ·libc_flock_trampoline_addr(SB)/4, $libc_flock_trampoline<>(SB) TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fpathconf(SB) GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $4 DATA ·libc_fpathconf_trampoline_addr(SB)/4, $libc_fpathconf_trampoline<>(SB) TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstat(SB) GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $4 DATA ·libc_fstat_trampoline_addr(SB)/4, $libc_fstat_trampoline<>(SB) TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatat(SB) GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $4 DATA ·libc_fstatat_trampoline_addr(SB)/4, $libc_fstatat_trampoline<>(SB) TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatfs(SB) GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $4 DATA ·libc_fstatfs_trampoline_addr(SB)/4, $libc_fstatfs_trampoline<>(SB) TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fsync(SB) GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $4 DATA ·libc_fsync_trampoline_addr(SB)/4, $libc_fsync_trampoline<>(SB) TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ftruncate(SB) GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $4 DATA ·libc_ftruncate_trampoline_addr(SB)/4, $libc_ftruncate_trampoline<>(SB) TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getegid(SB) GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getegid_trampoline_addr(SB)/4, $libc_getegid_trampoline<>(SB) TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_geteuid(SB) GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_geteuid_trampoline_addr(SB)/4, $libc_geteuid_trampoline<>(SB) TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgid(SB) GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getgid_trampoline_addr(SB)/4, $libc_getgid_trampoline<>(SB) TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgid(SB) GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpgid_trampoline_addr(SB)/4, $libc_getpgid_trampoline<>(SB) TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgrp(SB) GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpgrp_trampoline_addr(SB)/4, $libc_getpgrp_trampoline<>(SB) TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpid(SB) GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpid_trampoline_addr(SB)/4, $libc_getpid_trampoline<>(SB) TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getppid(SB) GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getppid_trampoline_addr(SB)/4, $libc_getppid_trampoline<>(SB) TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpriority(SB) GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpriority_trampoline_addr(SB)/4, $libc_getpriority_trampoline<>(SB) TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrlimit(SB) GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $4 DATA ·libc_getrlimit_trampoline_addr(SB)/4, $libc_getrlimit_trampoline<>(SB) TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrtable(SB) GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $4 DATA ·libc_getrtable_trampoline_addr(SB)/4, $libc_getrtable_trampoline<>(SB) TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrusage(SB) GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $4 DATA ·libc_getrusage_trampoline_addr(SB)/4, $libc_getrusage_trampoline<>(SB) TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsid(SB) GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getsid_trampoline_addr(SB)/4, $libc_getsid_trampoline<>(SB) TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_gettimeofday(SB) GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $4 DATA ·libc_gettimeofday_trampoline_addr(SB)/4, $libc_gettimeofday_trampoline<>(SB) TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getuid(SB) GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getuid_trampoline_addr(SB)/4, $libc_getuid_trampoline<>(SB) TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_issetugid(SB) GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $4 DATA ·libc_issetugid_trampoline_addr(SB)/4, $libc_issetugid_trampoline<>(SB) TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kill(SB) GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $4 DATA ·libc_kill_trampoline_addr(SB)/4, $libc_kill_trampoline<>(SB) TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kqueue(SB) GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $4 DATA ·libc_kqueue_trampoline_addr(SB)/4, $libc_kqueue_trampoline<>(SB) TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lchown(SB) GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $4 DATA ·libc_lchown_trampoline_addr(SB)/4, $libc_lchown_trampoline<>(SB) TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_link(SB) GLOBL ·libc_link_trampoline_addr(SB), RODATA, $4 DATA ·libc_link_trampoline_addr(SB)/4, $libc_link_trampoline<>(SB) TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_linkat(SB) GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $4 DATA ·libc_linkat_trampoline_addr(SB)/4, $libc_linkat_trampoline<>(SB) TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_listen(SB) GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $4 DATA ·libc_listen_trampoline_addr(SB)/4, $libc_listen_trampoline<>(SB) TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lstat(SB) GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $4 DATA ·libc_lstat_trampoline_addr(SB)/4, $libc_lstat_trampoline<>(SB) TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdir(SB) GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $4 DATA ·libc_mkdir_trampoline_addr(SB)/4, $libc_mkdir_trampoline<>(SB) TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdirat(SB) GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $4 DATA ·libc_mkdirat_trampoline_addr(SB)/4, $libc_mkdirat_trampoline<>(SB) TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifo(SB) GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $4 DATA ·libc_mkfifo_trampoline_addr(SB)/4, $libc_mkfifo_trampoline<>(SB) TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifoat(SB) GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $4 DATA ·libc_mkfifoat_trampoline_addr(SB)/4, $libc_mkfifoat_trampoline<>(SB) TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknod(SB) GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $4 DATA ·libc_mknod_trampoline_addr(SB)/4, $libc_mknod_trampoline<>(SB) TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknodat(SB) GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4 DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB) TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mount(SB) GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $4 DATA ·libc_mount_trampoline_addr(SB)/4, $libc_mount_trampoline<>(SB) TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4 DATA ·libc_nanosleep_trampoline_addr(SB)/4, $libc_nanosleep_trampoline<>(SB) TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_open(SB) GLOBL ·libc_open_trampoline_addr(SB), RODATA, $4 DATA ·libc_open_trampoline_addr(SB)/4, $libc_open_trampoline<>(SB) TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_openat(SB) GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $4 DATA ·libc_openat_trampoline_addr(SB)/4, $libc_openat_trampoline<>(SB) TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pathconf(SB) GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $4 DATA ·libc_pathconf_trampoline_addr(SB)/4, $libc_pathconf_trampoline<>(SB) TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pread(SB) GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $4 DATA ·libc_pread_trampoline_addr(SB)/4, $libc_pread_trampoline<>(SB) TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pwrite(SB) GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $4 DATA ·libc_pwrite_trampoline_addr(SB)/4, $libc_pwrite_trampoline<>(SB) TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_read(SB) GLOBL ·libc_read_trampoline_addr(SB), RODATA, $4 DATA ·libc_read_trampoline_addr(SB)/4, $libc_read_trampoline<>(SB) TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlink(SB) GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $4 DATA ·libc_readlink_trampoline_addr(SB)/4, $libc_readlink_trampoline<>(SB) TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlinkat(SB) GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $4 DATA ·libc_readlinkat_trampoline_addr(SB)/4, $libc_readlinkat_trampoline<>(SB) TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rename(SB) GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $4 DATA ·libc_rename_trampoline_addr(SB)/4, $libc_rename_trampoline<>(SB) TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_renameat(SB) GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $4 DATA ·libc_renameat_trampoline_addr(SB)/4, $libc_renameat_trampoline<>(SB) TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_revoke(SB) GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $4 DATA ·libc_revoke_trampoline_addr(SB)/4, $libc_revoke_trampoline<>(SB) TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rmdir(SB) GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $4 DATA ·libc_rmdir_trampoline_addr(SB)/4, $libc_rmdir_trampoline<>(SB) TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lseek(SB) GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $4 DATA ·libc_lseek_trampoline_addr(SB)/4, $libc_lseek_trampoline<>(SB) TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_select(SB) GLOBL ·libc_select_trampoline_addr(SB), RODATA, $4 DATA ·libc_select_trampoline_addr(SB)/4, $libc_select_trampoline<>(SB) TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setegid(SB) GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setegid_trampoline_addr(SB)/4, $libc_setegid_trampoline<>(SB) TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_seteuid(SB) GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_seteuid_trampoline_addr(SB)/4, $libc_seteuid_trampoline<>(SB) TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgid(SB) GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setgid_trampoline_addr(SB)/4, $libc_setgid_trampoline<>(SB) TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setlogin(SB) GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $4 DATA ·libc_setlogin_trampoline_addr(SB)/4, $libc_setlogin_trampoline<>(SB) TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpgid(SB) GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setpgid_trampoline_addr(SB)/4, $libc_setpgid_trampoline<>(SB) TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpriority(SB) GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $4 DATA ·libc_setpriority_trampoline_addr(SB)/4, $libc_setpriority_trampoline<>(SB) TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setregid(SB) GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setregid_trampoline_addr(SB)/4, $libc_setregid_trampoline<>(SB) TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setreuid(SB) GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setreuid_trampoline_addr(SB)/4, $libc_setreuid_trampoline<>(SB) TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresgid(SB) GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setresgid_trampoline_addr(SB)/4, $libc_setresgid_trampoline<>(SB) TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresuid(SB) GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setresuid_trampoline_addr(SB)/4, $libc_setresuid_trampoline<>(SB) TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $4 DATA ·libc_setrtable_trampoline_addr(SB)/4, $libc_setrtable_trampoline<>(SB) TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsid(SB) GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setsid_trampoline_addr(SB)/4, $libc_setsid_trampoline<>(SB) TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_settimeofday(SB) GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $4 DATA ·libc_settimeofday_trampoline_addr(SB)/4, $libc_settimeofday_trampoline<>(SB) TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setuid(SB) GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setuid_trampoline_addr(SB)/4, $libc_setuid_trampoline<>(SB) TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_stat(SB) GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $4 DATA ·libc_stat_trampoline_addr(SB)/4, $libc_stat_trampoline<>(SB) TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_statfs(SB) GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $4 DATA ·libc_statfs_trampoline_addr(SB)/4, $libc_statfs_trampoline<>(SB) TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlink(SB) GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $4 DATA ·libc_symlink_trampoline_addr(SB)/4, $libc_symlink_trampoline<>(SB) TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlinkat(SB) GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $4 DATA ·libc_symlinkat_trampoline_addr(SB)/4, $libc_symlinkat_trampoline<>(SB) TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sync(SB) GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $4 DATA ·libc_sync_trampoline_addr(SB)/4, $libc_sync_trampoline<>(SB) TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_truncate(SB) GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $4 DATA ·libc_truncate_trampoline_addr(SB)/4, $libc_truncate_trampoline<>(SB) TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_umask(SB) GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $4 DATA ·libc_umask_trampoline_addr(SB)/4, $libc_umask_trampoline<>(SB) TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlink(SB) GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $4 DATA ·libc_unlink_trampoline_addr(SB)/4, $libc_unlink_trampoline<>(SB) TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlinkat(SB) GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $4 DATA ·libc_unlinkat_trampoline_addr(SB)/4, $libc_unlinkat_trampoline<>(SB) TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unmount(SB) GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $4 DATA ·libc_unmount_trampoline_addr(SB)/4, $libc_unmount_trampoline<>(SB) TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_write(SB) GLOBL ·libc_write_trampoline_addr(SB), RODATA, $4 DATA ·libc_write_trampoline_addr(SB)/4, $libc_write_trampoline<>(SB) TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mmap(SB) GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $4 DATA ·libc_mmap_trampoline_addr(SB)/4, $libc_mmap_trampoline<>(SB) TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munmap(SB) GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $4 DATA ·libc_munmap_trampoline_addr(SB)/4, $libc_munmap_trampoline<>(SB) TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getfsstat(SB) GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $4 DATA ·libc_getfsstat_trampoline_addr(SB)/4, $libc_getfsstat_trampoline<>(SB) TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $4 DATA ·libc_utimensat_trampoline_addr(SB)/4, $libc_utimensat_trampoline<>(SB) TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pledge(SB) GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $4 DATA ·libc_pledge_trampoline_addr(SB)/4, $libc_pledge_trampoline<>(SB) TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unveil(SB) GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $4 DATA ·libc_unveil_trampoline_addr(SB)/4, $libc_unveil_trampoline<>(SB) ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go ================================================ // go run mksyscall.go -openbsd -libc -tags openbsd,amd64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_amd64.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build openbsd && amd64 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 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getgroups_trampoline_addr uintptr //go:cgo_import_dynamic libc_getgroups getgroups "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setgroups(ngid int, gid *_Gid_t) (err error) { _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setgroups_trampoline_addr uintptr //go:cgo_import_dynamic libc_setgroups setgroups "libc.so" // 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 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) wpid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_wait4_trampoline_addr uintptr //go:cgo_import_dynamic libc_wait4 wait4 "libc.so" // 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_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_accept_trampoline_addr uintptr //go:cgo_import_dynamic libc_accept accept "libc.so" // 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_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_bind_trampoline_addr uintptr //go:cgo_import_dynamic libc_bind bind "libc.so" // 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_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_connect_trampoline_addr uintptr //go:cgo_import_dynamic libc_connect connect "libc.so" // 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 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_socket_trampoline_addr uintptr //go:cgo_import_dynamic libc_socket socket "libc.so" // 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 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsockopt_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsockopt getsockopt "libc.so" // 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 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setsockopt_trampoline_addr uintptr //go:cgo_import_dynamic libc_setsockopt setsockopt "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpeername_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpeername getpeername "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsockname_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsockname getsockname "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Shutdown(s int, how int) (err error) { _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_shutdown_trampoline_addr uintptr //go:cgo_import_dynamic libc_shutdown shutdown "libc.so" // 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 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_socketpair_trampoline_addr uintptr //go:cgo_import_dynamic libc_socketpair socketpair "libc.so" // 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 := syscall_syscall6(libc_recvfrom_trampoline_addr, 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 } var libc_recvfrom_trampoline_addr uintptr //go:cgo_import_dynamic libc_recvfrom recvfrom "libc.so" // 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 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_sendto_trampoline_addr uintptr //go:cgo_import_dynamic libc_sendto sendto "libc.so" // 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_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_recvmsg_trampoline_addr uintptr //go:cgo_import_dynamic libc_recvmsg recvmsg "libc.so" // 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_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_sendmsg_trampoline_addr uintptr //go:cgo_import_dynamic libc_sendmsg sendmsg "libc.so" // 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 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_kevent_trampoline_addr uintptr //go:cgo_import_dynamic libc_kevent kevent "libc.so" // 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_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_utimes_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimes utimes "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func futimes(fd int, timeval *[2]Timeval) (err error) { _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_futimes_trampoline_addr uintptr //go:cgo_import_dynamic libc_futimes futimes "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_poll_trampoline_addr uintptr //go:cgo_import_dynamic libc_poll poll "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Madvise(b []byte, behav int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav)) if e1 != 0 { err = errnoErr(e1) } return } var libc_madvise_trampoline_addr uintptr //go:cgo_import_dynamic libc_madvise madvise "libc.so" // 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_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mlock_trampoline_addr uintptr //go:cgo_import_dynamic libc_mlock mlock "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mlockall(flags int) (err error) { _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mlockall_trampoline_addr uintptr //go:cgo_import_dynamic libc_mlockall mlockall "libc.so" // 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_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mprotect_trampoline_addr uintptr //go:cgo_import_dynamic libc_mprotect mprotect "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Msync(b []byte, flags int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_msync_trampoline_addr uintptr //go:cgo_import_dynamic libc_msync msync "libc.so" // 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_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munlock_trampoline_addr uintptr //go:cgo_import_dynamic libc_munlock munlock "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Munlockall() (err error) { _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munlockall_trampoline_addr uintptr //go:cgo_import_dynamic libc_munlockall munlockall "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pipe2(p *[2]_C_int, flags int) (err error) { _, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pipe2_trampoline_addr uintptr //go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so" // 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_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getdents_trampoline_addr uintptr //go:cgo_import_dynamic libc_getdents getdents "libc.so" // 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_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getcwd_trampoline_addr uintptr //go:cgo_import_dynamic libc_getcwd getcwd "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) { syscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid))) return } var libc_getresuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getresuid getresuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) { syscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid))) return } var libc_getresgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getresgid getresgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) } return } var libc_ioctl_trampoline_addr uintptr //go:cgo_import_dynamic libc_ioctl ioctl "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg)) 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 := syscall_syscall6(libc_sysctl_trampoline_addr, 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 } var libc_sysctl_trampoline_addr uintptr //go:cgo_import_dynamic libc_sysctl sysctl "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fcntl(fd int, cmd int, arg int) (n int, err error) { r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fcntl_trampoline_addr uintptr //go:cgo_import_dynamic libc_fcntl fcntl "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) { r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_ppoll_trampoline_addr uintptr //go:cgo_import_dynamic libc_ppoll ppoll "libc.so" // 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_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_access_trampoline_addr uintptr //go:cgo_import_dynamic libc_access access "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_adjtime_trampoline_addr uintptr //go:cgo_import_dynamic libc_adjtime adjtime "libc.so" // 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_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_chdir chdir "libc.so" // 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_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chflags_trampoline_addr uintptr //go:cgo_import_dynamic libc_chflags chflags "libc.so" // 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_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chmod_trampoline_addr uintptr //go:cgo_import_dynamic libc_chmod chmod "libc.so" // 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_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_chown_trampoline_addr uintptr //go:cgo_import_dynamic libc_chown chown "libc.so" // 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_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chroot_trampoline_addr uintptr //go:cgo_import_dynamic libc_chroot chroot "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ClockGettime(clockid int32, time *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_clock_gettime_trampoline_addr uintptr //go:cgo_import_dynamic libc_clock_gettime clock_gettime "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Close(fd int) (err error) { _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_close_trampoline_addr uintptr //go:cgo_import_dynamic libc_close close "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup(fd int) (nfd int, err error) { r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0) nfd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_dup_trampoline_addr uintptr //go:cgo_import_dynamic libc_dup dup "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup2(from int, to int) (err error) { _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_dup2_trampoline_addr uintptr //go:cgo_import_dynamic libc_dup2 dup2 "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup3(from int, to int, flags int) (err error) { _, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_dup3_trampoline_addr uintptr //go:cgo_import_dynamic libc_dup3 dup3 "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0) return } var libc_exit_trampoline_addr uintptr //go:cgo_import_dynamic libc_exit exit "libc.so" // 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 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_faccessat_trampoline_addr uintptr //go:cgo_import_dynamic libc_faccessat faccessat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchdir(fd int) (err error) { _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchdir fchdir "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchflags(fd int, flags int) (err error) { _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchflags_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchflags fchflags "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchmod(fd int, mode uint32) (err error) { _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchmod_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchmod fchmod "libc.so" // 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 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchmodat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so" // 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_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchown_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchown fchown "libc.so" // 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 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchownat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchownat fchownat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Flock(fd int, how int) (err error) { _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_flock_trampoline_addr uintptr //go:cgo_import_dynamic libc_flock flock "libc.so" // 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_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0) val = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fpathconf_trampoline_addr uintptr //go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstat(fd int, stat *Stat_t) (err error) { _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstat fstat "libc.so" // 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 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstatat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstatat fstatat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstatfs(fd int, stat *Statfs_t) (err error) { _, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstatfs_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstatfs fstatfs "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fsync(fd int) (err error) { _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fsync_trampoline_addr uintptr //go:cgo_import_dynamic libc_fsync fsync "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Ftruncate(fd int, length int64) (err error) { _, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_ftruncate_trampoline_addr uintptr //go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0) egid = int(r0) return } var libc_getegid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getegid getegid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (uid int) { r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0) uid = int(r0) return } var libc_geteuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_geteuid geteuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0) gid = int(r0) return } var libc_getgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getgid getgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgid(pid int) (pgid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0) pgid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpgid getpgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgrp() (pgrp int) { r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0) pgrp = int(r0) return } var libc_getpgrp_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0) pid = int(r0) return } var libc_getpid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpid getpid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0) ppid = int(r0) return } var libc_getppid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getppid getppid "libc.so" // 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_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0) prio = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpriority_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpriority getpriority "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrlimit(which int, lim *Rlimit) (err error) { _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getrlimit_trampoline_addr uintptr //go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrtable() (rtable int, err error) { r0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0) rtable = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getrtable_trampoline_addr uintptr //go:cgo_import_dynamic libc_getrtable getrtable "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrusage(who int, rusage *Rusage) (err error) { _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getrusage_trampoline_addr uintptr //go:cgo_import_dynamic libc_getrusage getrusage "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getsid(pid int) (sid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0) sid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsid getsid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Gettimeofday(tv *Timeval) (err error) { _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_gettimeofday_trampoline_addr uintptr //go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0) uid = int(r0) return } var libc_getuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getuid getuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Issetugid() (tainted bool) { r0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0) tainted = bool(r0 != 0) return } var libc_issetugid_trampoline_addr uintptr //go:cgo_import_dynamic libc_issetugid issetugid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Kill(pid int, signum syscall.Signal) (err error) { _, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_kill_trampoline_addr uintptr //go:cgo_import_dynamic libc_kill kill "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Kqueue() (fd int, err error) { r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_kqueue_trampoline_addr uintptr //go:cgo_import_dynamic libc_kqueue kqueue "libc.so" // 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_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_lchown_trampoline_addr uintptr //go:cgo_import_dynamic libc_lchown lchown "libc.so" // 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_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_link_trampoline_addr uintptr //go:cgo_import_dynamic libc_link link "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Linkat(pathfd int, path string, linkfd int, link string, flags int) (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_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_linkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_linkat linkat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Listen(s int, backlog int) (err error) { _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_listen_trampoline_addr uintptr //go:cgo_import_dynamic libc_listen listen "libc.so" // 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_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_lstat_trampoline_addr uintptr //go:cgo_import_dynamic libc_lstat lstat "libc.so" // 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_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkdir mkdir "libc.so" // 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_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkdirat_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so" // 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_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkfifo_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkfifoat(dirfd int, path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkfifoat_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so" // 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_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mknod_trampoline_addr uintptr //go:cgo_import_dynamic libc_mknod mknod "libc.so" // 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 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mknodat_trampoline_addr uintptr //go:cgo_import_dynamic libc_mknodat mknodat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { var _p0 *byte _p0, err = BytePtrFromString(fsType) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(dir) if err != nil { return } _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mount_trampoline_addr uintptr //go:cgo_import_dynamic libc_mount mount "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_nanosleep_trampoline_addr uintptr //go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so" // 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_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_open_trampoline_addr uintptr //go:cgo_import_dynamic libc_open open "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_openat_trampoline_addr uintptr //go:cgo_import_dynamic libc_openat openat "libc.so" // 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_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) val = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pathconf_trampoline_addr uintptr //go:cgo_import_dynamic libc_pathconf pathconf "libc.so" // 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 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pread_trampoline_addr uintptr //go:cgo_import_dynamic libc_pread pread "libc.so" // 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 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pwrite_trampoline_addr uintptr //go:cgo_import_dynamic libc_pwrite pwrite "libc.so" // 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_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_read_trampoline_addr uintptr //go:cgo_import_dynamic libc_read read "libc.so" // 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_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_readlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_readlink readlink "libc.so" // 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 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_readlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_readlinkat readlinkat "libc.so" // 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_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_rename_trampoline_addr uintptr //go:cgo_import_dynamic libc_rename rename "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Renameat(fromfd int, from string, tofd int, 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_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_renameat_trampoline_addr uintptr //go:cgo_import_dynamic libc_renameat renameat "libc.so" // 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_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_revoke_trampoline_addr uintptr //go:cgo_import_dynamic libc_revoke revoke "libc.so" // 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_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_rmdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_rmdir rmdir "libc.so" // 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_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence)) newoffset = int64(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_lseek_trampoline_addr uintptr //go:cgo_import_dynamic libc_lseek lseek "libc.so" // 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 := syscall_syscall6(libc_select_trampoline_addr, 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 } var libc_select_trampoline_addr uintptr //go:cgo_import_dynamic libc_select select "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setegid(egid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setegid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setegid setegid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Seteuid(euid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_seteuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_seteuid seteuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setgid(gid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setgid setgid "libc.so" // 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_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setlogin_trampoline_addr uintptr //go:cgo_import_dynamic libc_setlogin setlogin "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setpgid(pid int, pgid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setpgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setpgid setpgid "libc.so" // 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_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio)) if e1 != 0 { err = errnoErr(e1) } return } var libc_setpriority_trampoline_addr uintptr //go:cgo_import_dynamic libc_setpriority setpriority "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setregid(rgid int, egid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setregid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setregid setregid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setreuid(ruid int, euid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setreuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setreuid setreuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setresgid(rgid int, egid int, sgid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_setresgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setresgid setresgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setresuid(ruid int, euid int, suid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_setresuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setresuid setresuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setrtable(rtable int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setrtable_trampoline_addr uintptr //go:cgo_import_dynamic libc_setrtable setrtable "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setsid() (pid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0) pid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setsid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setsid setsid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Settimeofday(tp *Timeval) (err error) { _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_settimeofday_trampoline_addr uintptr //go:cgo_import_dynamic libc_settimeofday settimeofday "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setuid(uid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setuid setuid "libc.so" // 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_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_stat_trampoline_addr uintptr //go:cgo_import_dynamic libc_stat stat "libc.so" // 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_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_statfs_trampoline_addr uintptr //go:cgo_import_dynamic libc_statfs statfs "libc.so" // 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_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_symlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_symlink symlink "libc.so" // 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_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) if e1 != 0 { err = errnoErr(e1) } return } var libc_symlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_symlinkat symlinkat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Sync() (err error) { _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_sync_trampoline_addr uintptr //go:cgo_import_dynamic libc_sync sync "libc.so" // 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_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_truncate_trampoline_addr uintptr //go:cgo_import_dynamic libc_truncate truncate "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(newmask int) (oldmask int) { r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0) oldmask = int(r0) return } var libc_umask_trampoline_addr uintptr //go:cgo_import_dynamic libc_umask umask "libc.so" // 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_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_unlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_unlink unlink "libc.so" // 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_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_unlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so" // 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_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_unmount_trampoline_addr uintptr //go:cgo_import_dynamic libc_unmount unmount "libc.so" // 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_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_write_trampoline_addr uintptr //go:cgo_import_dynamic libc_write write "libc.so" // 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 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) ret = uintptr(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mmap_trampoline_addr uintptr //go:cgo_import_dynamic libc_mmap mmap "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func munmap(addr uintptr, length uintptr) (err error) { _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munmap_trampoline_addr uintptr //go:cgo_import_dynamic libc_munmap munmap "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) { r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getfsstat_trampoline_addr uintptr //go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so" // 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 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_utimensat_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimensat utimensat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pledge(promises *byte, execpromises *byte) (err error) { _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pledge_trampoline_addr uintptr //go:cgo_import_dynamic libc_pledge pledge "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func unveil(path *byte, flags *byte) (err error) { _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_unveil_trampoline_addr uintptr //go:cgo_import_dynamic libc_unveil unveil "libc.so" ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s ================================================ // go run mkasm.go openbsd amd64 // Code generated by the command above; DO NOT EDIT. #include "textflag.h" TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgroups(SB) GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8 DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB) TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgroups(SB) GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8 DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB) TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_wait4(SB) GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8 DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB) TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_accept(SB) GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8 DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB) TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_bind(SB) GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8 DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB) TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_connect(SB) GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8 DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB) TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socket(SB) GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8 DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB) TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockopt(SB) GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB) TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsockopt(SB) GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8 DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB) TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpeername(SB) GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB) TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockname(SB) GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB) TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_shutdown(SB) GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8 DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB) TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socketpair(SB) GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8 DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB) TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvfrom(SB) GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8 DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB) TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendto(SB) GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB) TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvmsg(SB) GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8 DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB) TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendmsg(SB) GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB) TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kevent(SB) GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8 DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB) TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimes(SB) GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB) TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_futimes(SB) GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8 DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB) TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_poll(SB) GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8 DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB) TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_madvise(SB) GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8 DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB) TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlock(SB) GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8 DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB) TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlockall(SB) GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8 DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB) TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mprotect(SB) GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8 DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB) TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_msync(SB) GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8 DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB) TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlock(SB) GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8 DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB) TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlockall(SB) GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8 DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB) TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pipe2(SB) GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $8 DATA ·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB) TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getdents(SB) GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $8 DATA ·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB) TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getcwd(SB) GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8 DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB) TEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getresuid(SB) GLOBL ·libc_getresuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getresuid_trampoline_addr(SB)/8, $libc_getresuid_trampoline<>(SB) TEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getresgid(SB) GLOBL ·libc_getresgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getresgid_trampoline_addr(SB)/8, $libc_getresgid_trampoline<>(SB) TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ioctl(SB) GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB) TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sysctl(SB) GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fcntl(SB) GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $8 DATA ·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB) TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8 DATA ·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB) TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_access(SB) GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8 DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB) TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_adjtime(SB) GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8 DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB) TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chdir(SB) GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB) TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chflags(SB) GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8 DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB) TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chmod(SB) GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8 DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB) TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chown(SB) GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8 DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB) TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chroot(SB) GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8 DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB) TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_clock_gettime(SB) GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $8 DATA ·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB) TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_close(SB) GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8 DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB) TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup(SB) GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB) TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup2(SB) GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB) TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup3(SB) GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB) TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_exit(SB) GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8 DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB) TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_faccessat(SB) GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8 DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB) TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchdir(SB) GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB) TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchflags(SB) GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB) TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmod(SB) GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB) TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmodat(SB) GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB) TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchown(SB) GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB) TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchownat(SB) GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB) TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_flock(SB) GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8 DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB) TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fpathconf(SB) GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8 DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB) TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstat(SB) GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB) TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatat(SB) GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB) TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatfs(SB) GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB) TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fsync(SB) GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8 DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB) TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ftruncate(SB) GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8 DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB) TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getegid(SB) GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB) TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_geteuid(SB) GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB) TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgid(SB) GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB) TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgid(SB) GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB) TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgrp(SB) GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB) TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpid(SB) GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB) TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getppid(SB) GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB) TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpriority(SB) GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB) TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrlimit(SB) GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB) TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrtable(SB) GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB) TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrusage(SB) GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB) TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsid(SB) GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB) TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_gettimeofday(SB) GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8 DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB) TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getuid(SB) GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB) TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_issetugid(SB) GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8 DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB) TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kill(SB) GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8 DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB) TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kqueue(SB) GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8 DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB) TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lchown(SB) GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8 DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB) TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_link(SB) GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8 DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB) TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_linkat(SB) GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB) TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_listen(SB) GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8 DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB) TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lstat(SB) GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB) TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdir(SB) GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB) TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdirat(SB) GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB) TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifo(SB) GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB) TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifoat(SB) GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB) TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknod(SB) GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB) TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknodat(SB) GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mount(SB) GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 DATA ·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB) TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_open(SB) GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8 DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB) TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_openat(SB) GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8 DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB) TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pathconf(SB) GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8 DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB) TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pread(SB) GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8 DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB) TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pwrite(SB) GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8 DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB) TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_read(SB) GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8 DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB) TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlink(SB) GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB) TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlinkat(SB) GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB) TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rename(SB) GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8 DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB) TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_renameat(SB) GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8 DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB) TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_revoke(SB) GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8 DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB) TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rmdir(SB) GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB) TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lseek(SB) GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8 DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB) TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_select(SB) GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8 DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB) TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setegid(SB) GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB) TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_seteuid(SB) GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB) TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgid(SB) GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB) TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setlogin(SB) GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8 DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB) TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpgid(SB) GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB) TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpriority(SB) GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8 DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB) TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setregid(SB) GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB) TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setreuid(SB) GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB) TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresgid(SB) GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB) TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresuid(SB) GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB) TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8 DATA ·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB) TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsid(SB) GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB) TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_settimeofday(SB) GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8 DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB) TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setuid(SB) GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB) TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_stat(SB) GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8 DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB) TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_statfs(SB) GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8 DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB) TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlink(SB) GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB) TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlinkat(SB) GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB) TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sync(SB) GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8 DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB) TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_truncate(SB) GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8 DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB) TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_umask(SB) GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8 DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB) TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlink(SB) GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB) TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlinkat(SB) GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB) TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unmount(SB) GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8 DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB) TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_write(SB) GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8 DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB) TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mmap(SB) GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB) TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munmap(SB) GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getfsstat(SB) GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB) TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB) TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pledge(SB) GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $8 DATA ·libc_pledge_trampoline_addr(SB)/8, $libc_pledge_trampoline<>(SB) TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unveil(SB) GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $8 DATA ·libc_unveil_trampoline_addr(SB)/8, $libc_unveil_trampoline<>(SB) ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go ================================================ // go run mksyscall.go -l32 -openbsd -arm -libc -tags openbsd,arm syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build openbsd && arm 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 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getgroups_trampoline_addr uintptr //go:cgo_import_dynamic libc_getgroups getgroups "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setgroups(ngid int, gid *_Gid_t) (err error) { _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setgroups_trampoline_addr uintptr //go:cgo_import_dynamic libc_setgroups setgroups "libc.so" // 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 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) wpid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_wait4_trampoline_addr uintptr //go:cgo_import_dynamic libc_wait4 wait4 "libc.so" // 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_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_accept_trampoline_addr uintptr //go:cgo_import_dynamic libc_accept accept "libc.so" // 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_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_bind_trampoline_addr uintptr //go:cgo_import_dynamic libc_bind bind "libc.so" // 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_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_connect_trampoline_addr uintptr //go:cgo_import_dynamic libc_connect connect "libc.so" // 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 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_socket_trampoline_addr uintptr //go:cgo_import_dynamic libc_socket socket "libc.so" // 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 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsockopt_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsockopt getsockopt "libc.so" // 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 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setsockopt_trampoline_addr uintptr //go:cgo_import_dynamic libc_setsockopt setsockopt "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpeername_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpeername getpeername "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsockname_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsockname getsockname "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Shutdown(s int, how int) (err error) { _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_shutdown_trampoline_addr uintptr //go:cgo_import_dynamic libc_shutdown shutdown "libc.so" // 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 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_socketpair_trampoline_addr uintptr //go:cgo_import_dynamic libc_socketpair socketpair "libc.so" // 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 := syscall_syscall6(libc_recvfrom_trampoline_addr, 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 } var libc_recvfrom_trampoline_addr uintptr //go:cgo_import_dynamic libc_recvfrom recvfrom "libc.so" // 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 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_sendto_trampoline_addr uintptr //go:cgo_import_dynamic libc_sendto sendto "libc.so" // 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_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_recvmsg_trampoline_addr uintptr //go:cgo_import_dynamic libc_recvmsg recvmsg "libc.so" // 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_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_sendmsg_trampoline_addr uintptr //go:cgo_import_dynamic libc_sendmsg sendmsg "libc.so" // 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 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_kevent_trampoline_addr uintptr //go:cgo_import_dynamic libc_kevent kevent "libc.so" // 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_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_utimes_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimes utimes "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func futimes(fd int, timeval *[2]Timeval) (err error) { _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_futimes_trampoline_addr uintptr //go:cgo_import_dynamic libc_futimes futimes "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_poll_trampoline_addr uintptr //go:cgo_import_dynamic libc_poll poll "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Madvise(b []byte, behav int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav)) if e1 != 0 { err = errnoErr(e1) } return } var libc_madvise_trampoline_addr uintptr //go:cgo_import_dynamic libc_madvise madvise "libc.so" // 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_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mlock_trampoline_addr uintptr //go:cgo_import_dynamic libc_mlock mlock "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mlockall(flags int) (err error) { _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mlockall_trampoline_addr uintptr //go:cgo_import_dynamic libc_mlockall mlockall "libc.so" // 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_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mprotect_trampoline_addr uintptr //go:cgo_import_dynamic libc_mprotect mprotect "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Msync(b []byte, flags int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_msync_trampoline_addr uintptr //go:cgo_import_dynamic libc_msync msync "libc.so" // 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_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munlock_trampoline_addr uintptr //go:cgo_import_dynamic libc_munlock munlock "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Munlockall() (err error) { _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munlockall_trampoline_addr uintptr //go:cgo_import_dynamic libc_munlockall munlockall "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pipe2(p *[2]_C_int, flags int) (err error) { _, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pipe2_trampoline_addr uintptr //go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so" // 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_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getdents_trampoline_addr uintptr //go:cgo_import_dynamic libc_getdents getdents "libc.so" // 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_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getcwd_trampoline_addr uintptr //go:cgo_import_dynamic libc_getcwd getcwd "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) { syscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid))) return } var libc_getresuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getresuid getresuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) { syscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid))) return } var libc_getresgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getresgid getresgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) } return } var libc_ioctl_trampoline_addr uintptr //go:cgo_import_dynamic libc_ioctl ioctl "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg)) 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 := syscall_syscall6(libc_sysctl_trampoline_addr, 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 } var libc_sysctl_trampoline_addr uintptr //go:cgo_import_dynamic libc_sysctl sysctl "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fcntl(fd int, cmd int, arg int) (n int, err error) { r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fcntl_trampoline_addr uintptr //go:cgo_import_dynamic libc_fcntl fcntl "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) { r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_ppoll_trampoline_addr uintptr //go:cgo_import_dynamic libc_ppoll ppoll "libc.so" // 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_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_access_trampoline_addr uintptr //go:cgo_import_dynamic libc_access access "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_adjtime_trampoline_addr uintptr //go:cgo_import_dynamic libc_adjtime adjtime "libc.so" // 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_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_chdir chdir "libc.so" // 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_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chflags_trampoline_addr uintptr //go:cgo_import_dynamic libc_chflags chflags "libc.so" // 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_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chmod_trampoline_addr uintptr //go:cgo_import_dynamic libc_chmod chmod "libc.so" // 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_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_chown_trampoline_addr uintptr //go:cgo_import_dynamic libc_chown chown "libc.so" // 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_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chroot_trampoline_addr uintptr //go:cgo_import_dynamic libc_chroot chroot "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ClockGettime(clockid int32, time *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_clock_gettime_trampoline_addr uintptr //go:cgo_import_dynamic libc_clock_gettime clock_gettime "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Close(fd int) (err error) { _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_close_trampoline_addr uintptr //go:cgo_import_dynamic libc_close close "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup(fd int) (nfd int, err error) { r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0) nfd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_dup_trampoline_addr uintptr //go:cgo_import_dynamic libc_dup dup "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup2(from int, to int) (err error) { _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_dup2_trampoline_addr uintptr //go:cgo_import_dynamic libc_dup2 dup2 "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup3(from int, to int, flags int) (err error) { _, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_dup3_trampoline_addr uintptr //go:cgo_import_dynamic libc_dup3 dup3 "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0) return } var libc_exit_trampoline_addr uintptr //go:cgo_import_dynamic libc_exit exit "libc.so" // 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 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_faccessat_trampoline_addr uintptr //go:cgo_import_dynamic libc_faccessat faccessat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchdir(fd int) (err error) { _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchdir fchdir "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchflags(fd int, flags int) (err error) { _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchflags_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchflags fchflags "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchmod(fd int, mode uint32) (err error) { _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchmod_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchmod fchmod "libc.so" // 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 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchmodat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so" // 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_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchown_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchown fchown "libc.so" // 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 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchownat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchownat fchownat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Flock(fd int, how int) (err error) { _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_flock_trampoline_addr uintptr //go:cgo_import_dynamic libc_flock flock "libc.so" // 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_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0) val = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fpathconf_trampoline_addr uintptr //go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstat(fd int, stat *Stat_t) (err error) { _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstat fstat "libc.so" // 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 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstatat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstatat fstatat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstatfs(fd int, stat *Statfs_t) (err error) { _, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstatfs_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstatfs fstatfs "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fsync(fd int) (err error) { _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fsync_trampoline_addr uintptr //go:cgo_import_dynamic libc_fsync fsync "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Ftruncate(fd int, length int64) (err error) { _, _, e1 := syscall_syscall6(libc_ftruncate_trampoline_addr, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_ftruncate_trampoline_addr uintptr //go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0) egid = int(r0) return } var libc_getegid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getegid getegid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (uid int) { r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0) uid = int(r0) return } var libc_geteuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_geteuid geteuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0) gid = int(r0) return } var libc_getgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getgid getgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgid(pid int) (pgid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0) pgid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpgid getpgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgrp() (pgrp int) { r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0) pgrp = int(r0) return } var libc_getpgrp_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0) pid = int(r0) return } var libc_getpid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpid getpid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0) ppid = int(r0) return } var libc_getppid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getppid getppid "libc.so" // 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_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0) prio = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpriority_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpriority getpriority "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrlimit(which int, lim *Rlimit) (err error) { _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getrlimit_trampoline_addr uintptr //go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrtable() (rtable int, err error) { r0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0) rtable = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getrtable_trampoline_addr uintptr //go:cgo_import_dynamic libc_getrtable getrtable "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrusage(who int, rusage *Rusage) (err error) { _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getrusage_trampoline_addr uintptr //go:cgo_import_dynamic libc_getrusage getrusage "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getsid(pid int) (sid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0) sid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsid getsid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Gettimeofday(tv *Timeval) (err error) { _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_gettimeofday_trampoline_addr uintptr //go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0) uid = int(r0) return } var libc_getuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getuid getuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Issetugid() (tainted bool) { r0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0) tainted = bool(r0 != 0) return } var libc_issetugid_trampoline_addr uintptr //go:cgo_import_dynamic libc_issetugid issetugid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Kill(pid int, signum syscall.Signal) (err error) { _, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_kill_trampoline_addr uintptr //go:cgo_import_dynamic libc_kill kill "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Kqueue() (fd int, err error) { r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_kqueue_trampoline_addr uintptr //go:cgo_import_dynamic libc_kqueue kqueue "libc.so" // 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_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_lchown_trampoline_addr uintptr //go:cgo_import_dynamic libc_lchown lchown "libc.so" // 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_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_link_trampoline_addr uintptr //go:cgo_import_dynamic libc_link link "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Linkat(pathfd int, path string, linkfd int, link string, flags int) (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_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_linkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_linkat linkat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Listen(s int, backlog int) (err error) { _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_listen_trampoline_addr uintptr //go:cgo_import_dynamic libc_listen listen "libc.so" // 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_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_lstat_trampoline_addr uintptr //go:cgo_import_dynamic libc_lstat lstat "libc.so" // 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_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkdir mkdir "libc.so" // 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_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkdirat_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so" // 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_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkfifo_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkfifoat(dirfd int, path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkfifoat_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so" // 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_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mknod_trampoline_addr uintptr //go:cgo_import_dynamic libc_mknod mknod "libc.so" // 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 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mknodat_trampoline_addr uintptr //go:cgo_import_dynamic libc_mknodat mknodat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { var _p0 *byte _p0, err = BytePtrFromString(fsType) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(dir) if err != nil { return } _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mount_trampoline_addr uintptr //go:cgo_import_dynamic libc_mount mount "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_nanosleep_trampoline_addr uintptr //go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so" // 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_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_open_trampoline_addr uintptr //go:cgo_import_dynamic libc_open open "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_openat_trampoline_addr uintptr //go:cgo_import_dynamic libc_openat openat "libc.so" // 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_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) val = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pathconf_trampoline_addr uintptr //go:cgo_import_dynamic libc_pathconf pathconf "libc.so" // 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 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pread_trampoline_addr uintptr //go:cgo_import_dynamic libc_pread pread "libc.so" // 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 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pwrite_trampoline_addr uintptr //go:cgo_import_dynamic libc_pwrite pwrite "libc.so" // 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_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_read_trampoline_addr uintptr //go:cgo_import_dynamic libc_read read "libc.so" // 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_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_readlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_readlink readlink "libc.so" // 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 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_readlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_readlinkat readlinkat "libc.so" // 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_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_rename_trampoline_addr uintptr //go:cgo_import_dynamic libc_rename rename "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Renameat(fromfd int, from string, tofd int, 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_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_renameat_trampoline_addr uintptr //go:cgo_import_dynamic libc_renameat renameat "libc.so" // 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_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_revoke_trampoline_addr uintptr //go:cgo_import_dynamic libc_revoke revoke "libc.so" // 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_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_rmdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_rmdir rmdir "libc.so" // 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 := syscall_syscall6(libc_lseek_trampoline_addr, 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 } var libc_lseek_trampoline_addr uintptr //go:cgo_import_dynamic libc_lseek lseek "libc.so" // 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 := syscall_syscall6(libc_select_trampoline_addr, 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 } var libc_select_trampoline_addr uintptr //go:cgo_import_dynamic libc_select select "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setegid(egid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setegid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setegid setegid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Seteuid(euid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_seteuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_seteuid seteuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setgid(gid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setgid setgid "libc.so" // 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_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setlogin_trampoline_addr uintptr //go:cgo_import_dynamic libc_setlogin setlogin "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setpgid(pid int, pgid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setpgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setpgid setpgid "libc.so" // 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_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio)) if e1 != 0 { err = errnoErr(e1) } return } var libc_setpriority_trampoline_addr uintptr //go:cgo_import_dynamic libc_setpriority setpriority "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setregid(rgid int, egid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setregid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setregid setregid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setreuid(ruid int, euid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setreuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setreuid setreuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setresgid(rgid int, egid int, sgid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_setresgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setresgid setresgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setresuid(ruid int, euid int, suid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_setresuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setresuid setresuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setrtable(rtable int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setrtable_trampoline_addr uintptr //go:cgo_import_dynamic libc_setrtable setrtable "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setsid() (pid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0) pid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setsid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setsid setsid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Settimeofday(tp *Timeval) (err error) { _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_settimeofday_trampoline_addr uintptr //go:cgo_import_dynamic libc_settimeofday settimeofday "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setuid(uid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setuid setuid "libc.so" // 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_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_stat_trampoline_addr uintptr //go:cgo_import_dynamic libc_stat stat "libc.so" // 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_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_statfs_trampoline_addr uintptr //go:cgo_import_dynamic libc_statfs statfs "libc.so" // 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_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_symlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_symlink symlink "libc.so" // 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_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) if e1 != 0 { err = errnoErr(e1) } return } var libc_symlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_symlinkat symlinkat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Sync() (err error) { _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_sync_trampoline_addr uintptr //go:cgo_import_dynamic libc_sync sync "libc.so" // 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_syscall6(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_truncate_trampoline_addr uintptr //go:cgo_import_dynamic libc_truncate truncate "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(newmask int) (oldmask int) { r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0) oldmask = int(r0) return } var libc_umask_trampoline_addr uintptr //go:cgo_import_dynamic libc_umask umask "libc.so" // 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_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_unlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_unlink unlink "libc.so" // 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_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_unlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so" // 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_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_unmount_trampoline_addr uintptr //go:cgo_import_dynamic libc_unmount unmount "libc.so" // 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_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_write_trampoline_addr uintptr //go:cgo_import_dynamic libc_write write "libc.so" // 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 := syscall_syscall9(libc_mmap_trampoline_addr, 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 } var libc_mmap_trampoline_addr uintptr //go:cgo_import_dynamic libc_mmap mmap "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func munmap(addr uintptr, length uintptr) (err error) { _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munmap_trampoline_addr uintptr //go:cgo_import_dynamic libc_munmap munmap "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) { r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getfsstat_trampoline_addr uintptr //go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so" // 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 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_utimensat_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimensat utimensat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pledge(promises *byte, execpromises *byte) (err error) { _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pledge_trampoline_addr uintptr //go:cgo_import_dynamic libc_pledge pledge "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func unveil(path *byte, flags *byte) (err error) { _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_unveil_trampoline_addr uintptr //go:cgo_import_dynamic libc_unveil unveil "libc.so" ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s ================================================ // go run mkasm.go openbsd arm // Code generated by the command above; DO NOT EDIT. #include "textflag.h" TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgroups(SB) GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $4 DATA ·libc_getgroups_trampoline_addr(SB)/4, $libc_getgroups_trampoline<>(SB) TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgroups(SB) GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $4 DATA ·libc_setgroups_trampoline_addr(SB)/4, $libc_setgroups_trampoline<>(SB) TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_wait4(SB) GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $4 DATA ·libc_wait4_trampoline_addr(SB)/4, $libc_wait4_trampoline<>(SB) TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_accept(SB) GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $4 DATA ·libc_accept_trampoline_addr(SB)/4, $libc_accept_trampoline<>(SB) TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_bind(SB) GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $4 DATA ·libc_bind_trampoline_addr(SB)/4, $libc_bind_trampoline<>(SB) TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_connect(SB) GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $4 DATA ·libc_connect_trampoline_addr(SB)/4, $libc_connect_trampoline<>(SB) TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socket(SB) GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $4 DATA ·libc_socket_trampoline_addr(SB)/4, $libc_socket_trampoline<>(SB) TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockopt(SB) GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $4 DATA ·libc_getsockopt_trampoline_addr(SB)/4, $libc_getsockopt_trampoline<>(SB) TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsockopt(SB) GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $4 DATA ·libc_setsockopt_trampoline_addr(SB)/4, $libc_setsockopt_trampoline<>(SB) TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpeername(SB) GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpeername_trampoline_addr(SB)/4, $libc_getpeername_trampoline<>(SB) TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockname(SB) GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $4 DATA ·libc_getsockname_trampoline_addr(SB)/4, $libc_getsockname_trampoline<>(SB) TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_shutdown(SB) GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $4 DATA ·libc_shutdown_trampoline_addr(SB)/4, $libc_shutdown_trampoline<>(SB) TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socketpair(SB) GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $4 DATA ·libc_socketpair_trampoline_addr(SB)/4, $libc_socketpair_trampoline<>(SB) TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvfrom(SB) GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $4 DATA ·libc_recvfrom_trampoline_addr(SB)/4, $libc_recvfrom_trampoline<>(SB) TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendto(SB) GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $4 DATA ·libc_sendto_trampoline_addr(SB)/4, $libc_sendto_trampoline<>(SB) TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvmsg(SB) GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $4 DATA ·libc_recvmsg_trampoline_addr(SB)/4, $libc_recvmsg_trampoline<>(SB) TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendmsg(SB) GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $4 DATA ·libc_sendmsg_trampoline_addr(SB)/4, $libc_sendmsg_trampoline<>(SB) TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kevent(SB) GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $4 DATA ·libc_kevent_trampoline_addr(SB)/4, $libc_kevent_trampoline<>(SB) TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimes(SB) GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $4 DATA ·libc_utimes_trampoline_addr(SB)/4, $libc_utimes_trampoline<>(SB) TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_futimes(SB) GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $4 DATA ·libc_futimes_trampoline_addr(SB)/4, $libc_futimes_trampoline<>(SB) TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_poll(SB) GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $4 DATA ·libc_poll_trampoline_addr(SB)/4, $libc_poll_trampoline<>(SB) TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_madvise(SB) GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $4 DATA ·libc_madvise_trampoline_addr(SB)/4, $libc_madvise_trampoline<>(SB) TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlock(SB) GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $4 DATA ·libc_mlock_trampoline_addr(SB)/4, $libc_mlock_trampoline<>(SB) TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlockall(SB) GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $4 DATA ·libc_mlockall_trampoline_addr(SB)/4, $libc_mlockall_trampoline<>(SB) TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mprotect(SB) GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $4 DATA ·libc_mprotect_trampoline_addr(SB)/4, $libc_mprotect_trampoline<>(SB) TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_msync(SB) GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $4 DATA ·libc_msync_trampoline_addr(SB)/4, $libc_msync_trampoline<>(SB) TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlock(SB) GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $4 DATA ·libc_munlock_trampoline_addr(SB)/4, $libc_munlock_trampoline<>(SB) TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlockall(SB) GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $4 DATA ·libc_munlockall_trampoline_addr(SB)/4, $libc_munlockall_trampoline<>(SB) TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pipe2(SB) GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $4 DATA ·libc_pipe2_trampoline_addr(SB)/4, $libc_pipe2_trampoline<>(SB) TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getdents(SB) GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $4 DATA ·libc_getdents_trampoline_addr(SB)/4, $libc_getdents_trampoline<>(SB) TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getcwd(SB) GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $4 DATA ·libc_getcwd_trampoline_addr(SB)/4, $libc_getcwd_trampoline<>(SB) TEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getresuid(SB) GLOBL ·libc_getresuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getresuid_trampoline_addr(SB)/4, $libc_getresuid_trampoline<>(SB) TEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getresgid(SB) GLOBL ·libc_getresgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getresgid_trampoline_addr(SB)/4, $libc_getresgid_trampoline<>(SB) TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ioctl(SB) GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $4 DATA ·libc_ioctl_trampoline_addr(SB)/4, $libc_ioctl_trampoline<>(SB) TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sysctl(SB) GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $4 DATA ·libc_sysctl_trampoline_addr(SB)/4, $libc_sysctl_trampoline<>(SB) TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fcntl(SB) GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $4 DATA ·libc_fcntl_trampoline_addr(SB)/4, $libc_fcntl_trampoline<>(SB) TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $4 DATA ·libc_ppoll_trampoline_addr(SB)/4, $libc_ppoll_trampoline<>(SB) TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_access(SB) GLOBL ·libc_access_trampoline_addr(SB), RODATA, $4 DATA ·libc_access_trampoline_addr(SB)/4, $libc_access_trampoline<>(SB) TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_adjtime(SB) GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $4 DATA ·libc_adjtime_trampoline_addr(SB)/4, $libc_adjtime_trampoline<>(SB) TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chdir(SB) GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $4 DATA ·libc_chdir_trampoline_addr(SB)/4, $libc_chdir_trampoline<>(SB) TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chflags(SB) GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $4 DATA ·libc_chflags_trampoline_addr(SB)/4, $libc_chflags_trampoline<>(SB) TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chmod(SB) GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $4 DATA ·libc_chmod_trampoline_addr(SB)/4, $libc_chmod_trampoline<>(SB) TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chown(SB) GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $4 DATA ·libc_chown_trampoline_addr(SB)/4, $libc_chown_trampoline<>(SB) TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chroot(SB) GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $4 DATA ·libc_chroot_trampoline_addr(SB)/4, $libc_chroot_trampoline<>(SB) TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_clock_gettime(SB) GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $4 DATA ·libc_clock_gettime_trampoline_addr(SB)/4, $libc_clock_gettime_trampoline<>(SB) TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_close(SB) GLOBL ·libc_close_trampoline_addr(SB), RODATA, $4 DATA ·libc_close_trampoline_addr(SB)/4, $libc_close_trampoline<>(SB) TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup(SB) GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $4 DATA ·libc_dup_trampoline_addr(SB)/4, $libc_dup_trampoline<>(SB) TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup2(SB) GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $4 DATA ·libc_dup2_trampoline_addr(SB)/4, $libc_dup2_trampoline<>(SB) TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup3(SB) GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $4 DATA ·libc_dup3_trampoline_addr(SB)/4, $libc_dup3_trampoline<>(SB) TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_exit(SB) GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $4 DATA ·libc_exit_trampoline_addr(SB)/4, $libc_exit_trampoline<>(SB) TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_faccessat(SB) GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $4 DATA ·libc_faccessat_trampoline_addr(SB)/4, $libc_faccessat_trampoline<>(SB) TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchdir(SB) GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchdir_trampoline_addr(SB)/4, $libc_fchdir_trampoline<>(SB) TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchflags(SB) GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchflags_trampoline_addr(SB)/4, $libc_fchflags_trampoline<>(SB) TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmod(SB) GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchmod_trampoline_addr(SB)/4, $libc_fchmod_trampoline<>(SB) TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmodat(SB) GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchmodat_trampoline_addr(SB)/4, $libc_fchmodat_trampoline<>(SB) TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchown(SB) GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchown_trampoline_addr(SB)/4, $libc_fchown_trampoline<>(SB) TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchownat(SB) GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $4 DATA ·libc_fchownat_trampoline_addr(SB)/4, $libc_fchownat_trampoline<>(SB) TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_flock(SB) GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $4 DATA ·libc_flock_trampoline_addr(SB)/4, $libc_flock_trampoline<>(SB) TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fpathconf(SB) GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $4 DATA ·libc_fpathconf_trampoline_addr(SB)/4, $libc_fpathconf_trampoline<>(SB) TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstat(SB) GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $4 DATA ·libc_fstat_trampoline_addr(SB)/4, $libc_fstat_trampoline<>(SB) TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatat(SB) GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $4 DATA ·libc_fstatat_trampoline_addr(SB)/4, $libc_fstatat_trampoline<>(SB) TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatfs(SB) GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $4 DATA ·libc_fstatfs_trampoline_addr(SB)/4, $libc_fstatfs_trampoline<>(SB) TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fsync(SB) GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $4 DATA ·libc_fsync_trampoline_addr(SB)/4, $libc_fsync_trampoline<>(SB) TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ftruncate(SB) GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $4 DATA ·libc_ftruncate_trampoline_addr(SB)/4, $libc_ftruncate_trampoline<>(SB) TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getegid(SB) GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getegid_trampoline_addr(SB)/4, $libc_getegid_trampoline<>(SB) TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_geteuid(SB) GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_geteuid_trampoline_addr(SB)/4, $libc_geteuid_trampoline<>(SB) TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgid(SB) GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getgid_trampoline_addr(SB)/4, $libc_getgid_trampoline<>(SB) TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgid(SB) GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpgid_trampoline_addr(SB)/4, $libc_getpgid_trampoline<>(SB) TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgrp(SB) GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpgrp_trampoline_addr(SB)/4, $libc_getpgrp_trampoline<>(SB) TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpid(SB) GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpid_trampoline_addr(SB)/4, $libc_getpid_trampoline<>(SB) TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getppid(SB) GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getppid_trampoline_addr(SB)/4, $libc_getppid_trampoline<>(SB) TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpriority(SB) GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $4 DATA ·libc_getpriority_trampoline_addr(SB)/4, $libc_getpriority_trampoline<>(SB) TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrlimit(SB) GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $4 DATA ·libc_getrlimit_trampoline_addr(SB)/4, $libc_getrlimit_trampoline<>(SB) TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrtable(SB) GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $4 DATA ·libc_getrtable_trampoline_addr(SB)/4, $libc_getrtable_trampoline<>(SB) TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrusage(SB) GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $4 DATA ·libc_getrusage_trampoline_addr(SB)/4, $libc_getrusage_trampoline<>(SB) TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsid(SB) GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getsid_trampoline_addr(SB)/4, $libc_getsid_trampoline<>(SB) TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_gettimeofday(SB) GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $4 DATA ·libc_gettimeofday_trampoline_addr(SB)/4, $libc_gettimeofday_trampoline<>(SB) TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getuid(SB) GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_getuid_trampoline_addr(SB)/4, $libc_getuid_trampoline<>(SB) TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_issetugid(SB) GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $4 DATA ·libc_issetugid_trampoline_addr(SB)/4, $libc_issetugid_trampoline<>(SB) TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kill(SB) GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $4 DATA ·libc_kill_trampoline_addr(SB)/4, $libc_kill_trampoline<>(SB) TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kqueue(SB) GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $4 DATA ·libc_kqueue_trampoline_addr(SB)/4, $libc_kqueue_trampoline<>(SB) TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lchown(SB) GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $4 DATA ·libc_lchown_trampoline_addr(SB)/4, $libc_lchown_trampoline<>(SB) TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_link(SB) GLOBL ·libc_link_trampoline_addr(SB), RODATA, $4 DATA ·libc_link_trampoline_addr(SB)/4, $libc_link_trampoline<>(SB) TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_linkat(SB) GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $4 DATA ·libc_linkat_trampoline_addr(SB)/4, $libc_linkat_trampoline<>(SB) TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_listen(SB) GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $4 DATA ·libc_listen_trampoline_addr(SB)/4, $libc_listen_trampoline<>(SB) TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lstat(SB) GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $4 DATA ·libc_lstat_trampoline_addr(SB)/4, $libc_lstat_trampoline<>(SB) TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdir(SB) GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $4 DATA ·libc_mkdir_trampoline_addr(SB)/4, $libc_mkdir_trampoline<>(SB) TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdirat(SB) GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $4 DATA ·libc_mkdirat_trampoline_addr(SB)/4, $libc_mkdirat_trampoline<>(SB) TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifo(SB) GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $4 DATA ·libc_mkfifo_trampoline_addr(SB)/4, $libc_mkfifo_trampoline<>(SB) TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifoat(SB) GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $4 DATA ·libc_mkfifoat_trampoline_addr(SB)/4, $libc_mkfifoat_trampoline<>(SB) TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknod(SB) GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $4 DATA ·libc_mknod_trampoline_addr(SB)/4, $libc_mknod_trampoline<>(SB) TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknodat(SB) GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4 DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB) TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mount(SB) GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $4 DATA ·libc_mount_trampoline_addr(SB)/4, $libc_mount_trampoline<>(SB) TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4 DATA ·libc_nanosleep_trampoline_addr(SB)/4, $libc_nanosleep_trampoline<>(SB) TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_open(SB) GLOBL ·libc_open_trampoline_addr(SB), RODATA, $4 DATA ·libc_open_trampoline_addr(SB)/4, $libc_open_trampoline<>(SB) TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_openat(SB) GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $4 DATA ·libc_openat_trampoline_addr(SB)/4, $libc_openat_trampoline<>(SB) TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pathconf(SB) GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $4 DATA ·libc_pathconf_trampoline_addr(SB)/4, $libc_pathconf_trampoline<>(SB) TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pread(SB) GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $4 DATA ·libc_pread_trampoline_addr(SB)/4, $libc_pread_trampoline<>(SB) TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pwrite(SB) GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $4 DATA ·libc_pwrite_trampoline_addr(SB)/4, $libc_pwrite_trampoline<>(SB) TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_read(SB) GLOBL ·libc_read_trampoline_addr(SB), RODATA, $4 DATA ·libc_read_trampoline_addr(SB)/4, $libc_read_trampoline<>(SB) TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlink(SB) GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $4 DATA ·libc_readlink_trampoline_addr(SB)/4, $libc_readlink_trampoline<>(SB) TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlinkat(SB) GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $4 DATA ·libc_readlinkat_trampoline_addr(SB)/4, $libc_readlinkat_trampoline<>(SB) TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rename(SB) GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $4 DATA ·libc_rename_trampoline_addr(SB)/4, $libc_rename_trampoline<>(SB) TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_renameat(SB) GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $4 DATA ·libc_renameat_trampoline_addr(SB)/4, $libc_renameat_trampoline<>(SB) TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_revoke(SB) GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $4 DATA ·libc_revoke_trampoline_addr(SB)/4, $libc_revoke_trampoline<>(SB) TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rmdir(SB) GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $4 DATA ·libc_rmdir_trampoline_addr(SB)/4, $libc_rmdir_trampoline<>(SB) TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lseek(SB) GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $4 DATA ·libc_lseek_trampoline_addr(SB)/4, $libc_lseek_trampoline<>(SB) TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_select(SB) GLOBL ·libc_select_trampoline_addr(SB), RODATA, $4 DATA ·libc_select_trampoline_addr(SB)/4, $libc_select_trampoline<>(SB) TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setegid(SB) GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setegid_trampoline_addr(SB)/4, $libc_setegid_trampoline<>(SB) TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_seteuid(SB) GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_seteuid_trampoline_addr(SB)/4, $libc_seteuid_trampoline<>(SB) TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgid(SB) GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setgid_trampoline_addr(SB)/4, $libc_setgid_trampoline<>(SB) TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setlogin(SB) GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $4 DATA ·libc_setlogin_trampoline_addr(SB)/4, $libc_setlogin_trampoline<>(SB) TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpgid(SB) GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setpgid_trampoline_addr(SB)/4, $libc_setpgid_trampoline<>(SB) TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpriority(SB) GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $4 DATA ·libc_setpriority_trampoline_addr(SB)/4, $libc_setpriority_trampoline<>(SB) TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setregid(SB) GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setregid_trampoline_addr(SB)/4, $libc_setregid_trampoline<>(SB) TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setreuid(SB) GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setreuid_trampoline_addr(SB)/4, $libc_setreuid_trampoline<>(SB) TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresgid(SB) GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setresgid_trampoline_addr(SB)/4, $libc_setresgid_trampoline<>(SB) TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresuid(SB) GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setresuid_trampoline_addr(SB)/4, $libc_setresuid_trampoline<>(SB) TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $4 DATA ·libc_setrtable_trampoline_addr(SB)/4, $libc_setrtable_trampoline<>(SB) TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsid(SB) GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setsid_trampoline_addr(SB)/4, $libc_setsid_trampoline<>(SB) TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_settimeofday(SB) GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $4 DATA ·libc_settimeofday_trampoline_addr(SB)/4, $libc_settimeofday_trampoline<>(SB) TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setuid(SB) GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $4 DATA ·libc_setuid_trampoline_addr(SB)/4, $libc_setuid_trampoline<>(SB) TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_stat(SB) GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $4 DATA ·libc_stat_trampoline_addr(SB)/4, $libc_stat_trampoline<>(SB) TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_statfs(SB) GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $4 DATA ·libc_statfs_trampoline_addr(SB)/4, $libc_statfs_trampoline<>(SB) TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlink(SB) GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $4 DATA ·libc_symlink_trampoline_addr(SB)/4, $libc_symlink_trampoline<>(SB) TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlinkat(SB) GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $4 DATA ·libc_symlinkat_trampoline_addr(SB)/4, $libc_symlinkat_trampoline<>(SB) TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sync(SB) GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $4 DATA ·libc_sync_trampoline_addr(SB)/4, $libc_sync_trampoline<>(SB) TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_truncate(SB) GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $4 DATA ·libc_truncate_trampoline_addr(SB)/4, $libc_truncate_trampoline<>(SB) TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_umask(SB) GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $4 DATA ·libc_umask_trampoline_addr(SB)/4, $libc_umask_trampoline<>(SB) TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlink(SB) GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $4 DATA ·libc_unlink_trampoline_addr(SB)/4, $libc_unlink_trampoline<>(SB) TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlinkat(SB) GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $4 DATA ·libc_unlinkat_trampoline_addr(SB)/4, $libc_unlinkat_trampoline<>(SB) TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unmount(SB) GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $4 DATA ·libc_unmount_trampoline_addr(SB)/4, $libc_unmount_trampoline<>(SB) TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_write(SB) GLOBL ·libc_write_trampoline_addr(SB), RODATA, $4 DATA ·libc_write_trampoline_addr(SB)/4, $libc_write_trampoline<>(SB) TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mmap(SB) GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $4 DATA ·libc_mmap_trampoline_addr(SB)/4, $libc_mmap_trampoline<>(SB) TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munmap(SB) GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $4 DATA ·libc_munmap_trampoline_addr(SB)/4, $libc_munmap_trampoline<>(SB) TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getfsstat(SB) GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $4 DATA ·libc_getfsstat_trampoline_addr(SB)/4, $libc_getfsstat_trampoline<>(SB) TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $4 DATA ·libc_utimensat_trampoline_addr(SB)/4, $libc_utimensat_trampoline<>(SB) TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pledge(SB) GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $4 DATA ·libc_pledge_trampoline_addr(SB)/4, $libc_pledge_trampoline<>(SB) TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unveil(SB) GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $4 DATA ·libc_unveil_trampoline_addr(SB)/4, $libc_unveil_trampoline<>(SB) ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go ================================================ // go run mksyscall.go -openbsd -libc -tags openbsd,arm64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm64.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build openbsd && arm64 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 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getgroups_trampoline_addr uintptr //go:cgo_import_dynamic libc_getgroups getgroups "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setgroups(ngid int, gid *_Gid_t) (err error) { _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setgroups_trampoline_addr uintptr //go:cgo_import_dynamic libc_setgroups setgroups "libc.so" // 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 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) wpid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_wait4_trampoline_addr uintptr //go:cgo_import_dynamic libc_wait4 wait4 "libc.so" // 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_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_accept_trampoline_addr uintptr //go:cgo_import_dynamic libc_accept accept "libc.so" // 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_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_bind_trampoline_addr uintptr //go:cgo_import_dynamic libc_bind bind "libc.so" // 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_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_connect_trampoline_addr uintptr //go:cgo_import_dynamic libc_connect connect "libc.so" // 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 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_socket_trampoline_addr uintptr //go:cgo_import_dynamic libc_socket socket "libc.so" // 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 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsockopt_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsockopt getsockopt "libc.so" // 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 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setsockopt_trampoline_addr uintptr //go:cgo_import_dynamic libc_setsockopt setsockopt "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpeername_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpeername getpeername "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsockname_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsockname getsockname "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Shutdown(s int, how int) (err error) { _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_shutdown_trampoline_addr uintptr //go:cgo_import_dynamic libc_shutdown shutdown "libc.so" // 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 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_socketpair_trampoline_addr uintptr //go:cgo_import_dynamic libc_socketpair socketpair "libc.so" // 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 := syscall_syscall6(libc_recvfrom_trampoline_addr, 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 } var libc_recvfrom_trampoline_addr uintptr //go:cgo_import_dynamic libc_recvfrom recvfrom "libc.so" // 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 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_sendto_trampoline_addr uintptr //go:cgo_import_dynamic libc_sendto sendto "libc.so" // 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_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_recvmsg_trampoline_addr uintptr //go:cgo_import_dynamic libc_recvmsg recvmsg "libc.so" // 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_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_sendmsg_trampoline_addr uintptr //go:cgo_import_dynamic libc_sendmsg sendmsg "libc.so" // 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 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_kevent_trampoline_addr uintptr //go:cgo_import_dynamic libc_kevent kevent "libc.so" // 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_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_utimes_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimes utimes "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func futimes(fd int, timeval *[2]Timeval) (err error) { _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_futimes_trampoline_addr uintptr //go:cgo_import_dynamic libc_futimes futimes "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_poll_trampoline_addr uintptr //go:cgo_import_dynamic libc_poll poll "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Madvise(b []byte, behav int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav)) if e1 != 0 { err = errnoErr(e1) } return } var libc_madvise_trampoline_addr uintptr //go:cgo_import_dynamic libc_madvise madvise "libc.so" // 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_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mlock_trampoline_addr uintptr //go:cgo_import_dynamic libc_mlock mlock "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mlockall(flags int) (err error) { _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mlockall_trampoline_addr uintptr //go:cgo_import_dynamic libc_mlockall mlockall "libc.so" // 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_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mprotect_trampoline_addr uintptr //go:cgo_import_dynamic libc_mprotect mprotect "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Msync(b []byte, flags int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_msync_trampoline_addr uintptr //go:cgo_import_dynamic libc_msync msync "libc.so" // 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_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munlock_trampoline_addr uintptr //go:cgo_import_dynamic libc_munlock munlock "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Munlockall() (err error) { _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munlockall_trampoline_addr uintptr //go:cgo_import_dynamic libc_munlockall munlockall "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pipe2(p *[2]_C_int, flags int) (err error) { _, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pipe2_trampoline_addr uintptr //go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so" // 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_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getdents_trampoline_addr uintptr //go:cgo_import_dynamic libc_getdents getdents "libc.so" // 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_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getcwd_trampoline_addr uintptr //go:cgo_import_dynamic libc_getcwd getcwd "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) { syscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid))) return } var libc_getresuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getresuid getresuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) { syscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid))) return } var libc_getresgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getresgid getresgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) } return } var libc_ioctl_trampoline_addr uintptr //go:cgo_import_dynamic libc_ioctl ioctl "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg)) 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 := syscall_syscall6(libc_sysctl_trampoline_addr, 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 } var libc_sysctl_trampoline_addr uintptr //go:cgo_import_dynamic libc_sysctl sysctl "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fcntl(fd int, cmd int, arg int) (n int, err error) { r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fcntl_trampoline_addr uintptr //go:cgo_import_dynamic libc_fcntl fcntl "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) { r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_ppoll_trampoline_addr uintptr //go:cgo_import_dynamic libc_ppoll ppoll "libc.so" // 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_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_access_trampoline_addr uintptr //go:cgo_import_dynamic libc_access access "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_adjtime_trampoline_addr uintptr //go:cgo_import_dynamic libc_adjtime adjtime "libc.so" // 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_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_chdir chdir "libc.so" // 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_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chflags_trampoline_addr uintptr //go:cgo_import_dynamic libc_chflags chflags "libc.so" // 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_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chmod_trampoline_addr uintptr //go:cgo_import_dynamic libc_chmod chmod "libc.so" // 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_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_chown_trampoline_addr uintptr //go:cgo_import_dynamic libc_chown chown "libc.so" // 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_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chroot_trampoline_addr uintptr //go:cgo_import_dynamic libc_chroot chroot "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ClockGettime(clockid int32, time *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_clock_gettime_trampoline_addr uintptr //go:cgo_import_dynamic libc_clock_gettime clock_gettime "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Close(fd int) (err error) { _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_close_trampoline_addr uintptr //go:cgo_import_dynamic libc_close close "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup(fd int) (nfd int, err error) { r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0) nfd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_dup_trampoline_addr uintptr //go:cgo_import_dynamic libc_dup dup "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup2(from int, to int) (err error) { _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_dup2_trampoline_addr uintptr //go:cgo_import_dynamic libc_dup2 dup2 "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup3(from int, to int, flags int) (err error) { _, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_dup3_trampoline_addr uintptr //go:cgo_import_dynamic libc_dup3 dup3 "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0) return } var libc_exit_trampoline_addr uintptr //go:cgo_import_dynamic libc_exit exit "libc.so" // 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 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_faccessat_trampoline_addr uintptr //go:cgo_import_dynamic libc_faccessat faccessat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchdir(fd int) (err error) { _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchdir fchdir "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchflags(fd int, flags int) (err error) { _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchflags_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchflags fchflags "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchmod(fd int, mode uint32) (err error) { _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchmod_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchmod fchmod "libc.so" // 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 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchmodat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so" // 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_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchown_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchown fchown "libc.so" // 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 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchownat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchownat fchownat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Flock(fd int, how int) (err error) { _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_flock_trampoline_addr uintptr //go:cgo_import_dynamic libc_flock flock "libc.so" // 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_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0) val = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fpathconf_trampoline_addr uintptr //go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstat(fd int, stat *Stat_t) (err error) { _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstat fstat "libc.so" // 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 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstatat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstatat fstatat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstatfs(fd int, stat *Statfs_t) (err error) { _, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstatfs_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstatfs fstatfs "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fsync(fd int) (err error) { _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fsync_trampoline_addr uintptr //go:cgo_import_dynamic libc_fsync fsync "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Ftruncate(fd int, length int64) (err error) { _, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_ftruncate_trampoline_addr uintptr //go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0) egid = int(r0) return } var libc_getegid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getegid getegid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (uid int) { r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0) uid = int(r0) return } var libc_geteuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_geteuid geteuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0) gid = int(r0) return } var libc_getgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getgid getgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgid(pid int) (pgid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0) pgid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpgid getpgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgrp() (pgrp int) { r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0) pgrp = int(r0) return } var libc_getpgrp_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0) pid = int(r0) return } var libc_getpid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpid getpid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0) ppid = int(r0) return } var libc_getppid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getppid getppid "libc.so" // 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_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0) prio = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpriority_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpriority getpriority "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrlimit(which int, lim *Rlimit) (err error) { _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getrlimit_trampoline_addr uintptr //go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrtable() (rtable int, err error) { r0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0) rtable = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getrtable_trampoline_addr uintptr //go:cgo_import_dynamic libc_getrtable getrtable "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrusage(who int, rusage *Rusage) (err error) { _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getrusage_trampoline_addr uintptr //go:cgo_import_dynamic libc_getrusage getrusage "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getsid(pid int) (sid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0) sid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsid getsid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Gettimeofday(tv *Timeval) (err error) { _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_gettimeofday_trampoline_addr uintptr //go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0) uid = int(r0) return } var libc_getuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getuid getuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Issetugid() (tainted bool) { r0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0) tainted = bool(r0 != 0) return } var libc_issetugid_trampoline_addr uintptr //go:cgo_import_dynamic libc_issetugid issetugid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Kill(pid int, signum syscall.Signal) (err error) { _, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_kill_trampoline_addr uintptr //go:cgo_import_dynamic libc_kill kill "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Kqueue() (fd int, err error) { r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_kqueue_trampoline_addr uintptr //go:cgo_import_dynamic libc_kqueue kqueue "libc.so" // 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_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_lchown_trampoline_addr uintptr //go:cgo_import_dynamic libc_lchown lchown "libc.so" // 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_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_link_trampoline_addr uintptr //go:cgo_import_dynamic libc_link link "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Linkat(pathfd int, path string, linkfd int, link string, flags int) (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_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_linkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_linkat linkat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Listen(s int, backlog int) (err error) { _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_listen_trampoline_addr uintptr //go:cgo_import_dynamic libc_listen listen "libc.so" // 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_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_lstat_trampoline_addr uintptr //go:cgo_import_dynamic libc_lstat lstat "libc.so" // 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_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkdir mkdir "libc.so" // 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_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkdirat_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so" // 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_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkfifo_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkfifoat(dirfd int, path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkfifoat_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so" // 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_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mknod_trampoline_addr uintptr //go:cgo_import_dynamic libc_mknod mknod "libc.so" // 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 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mknodat_trampoline_addr uintptr //go:cgo_import_dynamic libc_mknodat mknodat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { var _p0 *byte _p0, err = BytePtrFromString(fsType) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(dir) if err != nil { return } _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mount_trampoline_addr uintptr //go:cgo_import_dynamic libc_mount mount "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_nanosleep_trampoline_addr uintptr //go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so" // 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_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_open_trampoline_addr uintptr //go:cgo_import_dynamic libc_open open "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_openat_trampoline_addr uintptr //go:cgo_import_dynamic libc_openat openat "libc.so" // 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_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) val = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pathconf_trampoline_addr uintptr //go:cgo_import_dynamic libc_pathconf pathconf "libc.so" // 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 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pread_trampoline_addr uintptr //go:cgo_import_dynamic libc_pread pread "libc.so" // 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 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pwrite_trampoline_addr uintptr //go:cgo_import_dynamic libc_pwrite pwrite "libc.so" // 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_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_read_trampoline_addr uintptr //go:cgo_import_dynamic libc_read read "libc.so" // 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_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_readlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_readlink readlink "libc.so" // 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 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_readlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_readlinkat readlinkat "libc.so" // 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_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_rename_trampoline_addr uintptr //go:cgo_import_dynamic libc_rename rename "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Renameat(fromfd int, from string, tofd int, 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_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_renameat_trampoline_addr uintptr //go:cgo_import_dynamic libc_renameat renameat "libc.so" // 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_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_revoke_trampoline_addr uintptr //go:cgo_import_dynamic libc_revoke revoke "libc.so" // 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_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_rmdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_rmdir rmdir "libc.so" // 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_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence)) newoffset = int64(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_lseek_trampoline_addr uintptr //go:cgo_import_dynamic libc_lseek lseek "libc.so" // 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 := syscall_syscall6(libc_select_trampoline_addr, 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 } var libc_select_trampoline_addr uintptr //go:cgo_import_dynamic libc_select select "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setegid(egid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setegid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setegid setegid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Seteuid(euid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_seteuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_seteuid seteuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setgid(gid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setgid setgid "libc.so" // 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_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setlogin_trampoline_addr uintptr //go:cgo_import_dynamic libc_setlogin setlogin "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setpgid(pid int, pgid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setpgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setpgid setpgid "libc.so" // 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_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio)) if e1 != 0 { err = errnoErr(e1) } return } var libc_setpriority_trampoline_addr uintptr //go:cgo_import_dynamic libc_setpriority setpriority "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setregid(rgid int, egid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setregid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setregid setregid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setreuid(ruid int, euid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setreuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setreuid setreuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setresgid(rgid int, egid int, sgid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_setresgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setresgid setresgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setresuid(ruid int, euid int, suid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_setresuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setresuid setresuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setrtable(rtable int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setrtable_trampoline_addr uintptr //go:cgo_import_dynamic libc_setrtable setrtable "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setsid() (pid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0) pid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setsid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setsid setsid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Settimeofday(tp *Timeval) (err error) { _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_settimeofday_trampoline_addr uintptr //go:cgo_import_dynamic libc_settimeofday settimeofday "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setuid(uid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setuid setuid "libc.so" // 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_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_stat_trampoline_addr uintptr //go:cgo_import_dynamic libc_stat stat "libc.so" // 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_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_statfs_trampoline_addr uintptr //go:cgo_import_dynamic libc_statfs statfs "libc.so" // 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_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_symlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_symlink symlink "libc.so" // 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_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) if e1 != 0 { err = errnoErr(e1) } return } var libc_symlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_symlinkat symlinkat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Sync() (err error) { _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_sync_trampoline_addr uintptr //go:cgo_import_dynamic libc_sync sync "libc.so" // 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_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_truncate_trampoline_addr uintptr //go:cgo_import_dynamic libc_truncate truncate "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(newmask int) (oldmask int) { r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0) oldmask = int(r0) return } var libc_umask_trampoline_addr uintptr //go:cgo_import_dynamic libc_umask umask "libc.so" // 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_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_unlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_unlink unlink "libc.so" // 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_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_unlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so" // 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_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_unmount_trampoline_addr uintptr //go:cgo_import_dynamic libc_unmount unmount "libc.so" // 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_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_write_trampoline_addr uintptr //go:cgo_import_dynamic libc_write write "libc.so" // 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 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) ret = uintptr(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mmap_trampoline_addr uintptr //go:cgo_import_dynamic libc_mmap mmap "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func munmap(addr uintptr, length uintptr) (err error) { _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munmap_trampoline_addr uintptr //go:cgo_import_dynamic libc_munmap munmap "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) { r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getfsstat_trampoline_addr uintptr //go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so" // 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 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_utimensat_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimensat utimensat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pledge(promises *byte, execpromises *byte) (err error) { _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pledge_trampoline_addr uintptr //go:cgo_import_dynamic libc_pledge pledge "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func unveil(path *byte, flags *byte) (err error) { _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_unveil_trampoline_addr uintptr //go:cgo_import_dynamic libc_unveil unveil "libc.so" ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s ================================================ // go run mkasm.go openbsd arm64 // Code generated by the command above; DO NOT EDIT. #include "textflag.h" TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgroups(SB) GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8 DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB) TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgroups(SB) GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8 DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB) TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_wait4(SB) GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8 DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB) TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_accept(SB) GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8 DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB) TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_bind(SB) GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8 DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB) TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_connect(SB) GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8 DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB) TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socket(SB) GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8 DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB) TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockopt(SB) GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB) TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsockopt(SB) GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8 DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB) TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpeername(SB) GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB) TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockname(SB) GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB) TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_shutdown(SB) GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8 DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB) TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socketpair(SB) GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8 DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB) TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvfrom(SB) GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8 DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB) TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendto(SB) GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB) TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvmsg(SB) GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8 DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB) TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendmsg(SB) GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB) TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kevent(SB) GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8 DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB) TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimes(SB) GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB) TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_futimes(SB) GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8 DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB) TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_poll(SB) GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8 DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB) TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_madvise(SB) GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8 DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB) TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlock(SB) GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8 DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB) TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlockall(SB) GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8 DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB) TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mprotect(SB) GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8 DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB) TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_msync(SB) GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8 DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB) TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlock(SB) GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8 DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB) TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlockall(SB) GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8 DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB) TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pipe2(SB) GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $8 DATA ·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB) TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getdents(SB) GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $8 DATA ·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB) TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getcwd(SB) GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8 DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB) TEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getresuid(SB) GLOBL ·libc_getresuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getresuid_trampoline_addr(SB)/8, $libc_getresuid_trampoline<>(SB) TEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getresgid(SB) GLOBL ·libc_getresgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getresgid_trampoline_addr(SB)/8, $libc_getresgid_trampoline<>(SB) TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ioctl(SB) GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB) TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sysctl(SB) GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fcntl(SB) GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $8 DATA ·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB) TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8 DATA ·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB) TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_access(SB) GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8 DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB) TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_adjtime(SB) GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8 DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB) TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chdir(SB) GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB) TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chflags(SB) GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8 DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB) TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chmod(SB) GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8 DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB) TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chown(SB) GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8 DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB) TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chroot(SB) GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8 DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB) TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_clock_gettime(SB) GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $8 DATA ·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB) TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_close(SB) GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8 DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB) TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup(SB) GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB) TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup2(SB) GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB) TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup3(SB) GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB) TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_exit(SB) GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8 DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB) TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_faccessat(SB) GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8 DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB) TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchdir(SB) GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB) TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchflags(SB) GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB) TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmod(SB) GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB) TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmodat(SB) GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB) TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchown(SB) GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB) TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchownat(SB) GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB) TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_flock(SB) GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8 DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB) TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fpathconf(SB) GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8 DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB) TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstat(SB) GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB) TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatat(SB) GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB) TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatfs(SB) GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB) TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fsync(SB) GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8 DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB) TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ftruncate(SB) GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8 DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB) TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getegid(SB) GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB) TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_geteuid(SB) GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB) TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgid(SB) GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB) TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgid(SB) GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB) TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgrp(SB) GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB) TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpid(SB) GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB) TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getppid(SB) GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB) TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpriority(SB) GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB) TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrlimit(SB) GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB) TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrtable(SB) GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB) TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrusage(SB) GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB) TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsid(SB) GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB) TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_gettimeofday(SB) GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8 DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB) TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getuid(SB) GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB) TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_issetugid(SB) GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8 DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB) TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kill(SB) GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8 DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB) TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kqueue(SB) GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8 DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB) TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lchown(SB) GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8 DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB) TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_link(SB) GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8 DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB) TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_linkat(SB) GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB) TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_listen(SB) GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8 DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB) TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lstat(SB) GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB) TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdir(SB) GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB) TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdirat(SB) GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB) TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifo(SB) GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB) TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifoat(SB) GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB) TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknod(SB) GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB) TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknodat(SB) GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mount(SB) GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 DATA ·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB) TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_open(SB) GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8 DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB) TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_openat(SB) GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8 DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB) TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pathconf(SB) GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8 DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB) TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pread(SB) GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8 DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB) TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pwrite(SB) GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8 DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB) TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_read(SB) GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8 DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB) TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlink(SB) GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB) TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlinkat(SB) GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB) TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rename(SB) GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8 DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB) TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_renameat(SB) GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8 DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB) TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_revoke(SB) GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8 DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB) TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rmdir(SB) GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB) TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lseek(SB) GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8 DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB) TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_select(SB) GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8 DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB) TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setegid(SB) GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB) TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_seteuid(SB) GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB) TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgid(SB) GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB) TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setlogin(SB) GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8 DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB) TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpgid(SB) GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB) TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpriority(SB) GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8 DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB) TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setregid(SB) GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB) TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setreuid(SB) GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB) TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresgid(SB) GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB) TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresuid(SB) GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB) TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8 DATA ·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB) TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsid(SB) GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB) TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_settimeofday(SB) GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8 DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB) TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setuid(SB) GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB) TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_stat(SB) GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8 DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB) TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_statfs(SB) GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8 DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB) TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlink(SB) GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB) TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlinkat(SB) GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB) TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sync(SB) GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8 DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB) TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_truncate(SB) GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8 DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB) TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_umask(SB) GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8 DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB) TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlink(SB) GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB) TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlinkat(SB) GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB) TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unmount(SB) GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8 DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB) TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_write(SB) GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8 DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB) TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mmap(SB) GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB) TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munmap(SB) GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getfsstat(SB) GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB) TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB) TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pledge(SB) GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $8 DATA ·libc_pledge_trampoline_addr(SB)/8, $libc_pledge_trampoline<>(SB) TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unveil(SB) GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $8 DATA ·libc_unveil_trampoline_addr(SB)/8, $libc_unveil_trampoline<>(SB) ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go ================================================ // go run mksyscall.go -openbsd -libc -tags openbsd,mips64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_mips64.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build openbsd && mips64 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 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getgroups_trampoline_addr uintptr //go:cgo_import_dynamic libc_getgroups getgroups "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setgroups(ngid int, gid *_Gid_t) (err error) { _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setgroups_trampoline_addr uintptr //go:cgo_import_dynamic libc_setgroups setgroups "libc.so" // 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 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) wpid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_wait4_trampoline_addr uintptr //go:cgo_import_dynamic libc_wait4 wait4 "libc.so" // 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_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_accept_trampoline_addr uintptr //go:cgo_import_dynamic libc_accept accept "libc.so" // 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_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_bind_trampoline_addr uintptr //go:cgo_import_dynamic libc_bind bind "libc.so" // 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_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_connect_trampoline_addr uintptr //go:cgo_import_dynamic libc_connect connect "libc.so" // 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 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_socket_trampoline_addr uintptr //go:cgo_import_dynamic libc_socket socket "libc.so" // 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 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsockopt_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsockopt getsockopt "libc.so" // 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 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setsockopt_trampoline_addr uintptr //go:cgo_import_dynamic libc_setsockopt setsockopt "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpeername_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpeername getpeername "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsockname_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsockname getsockname "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Shutdown(s int, how int) (err error) { _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_shutdown_trampoline_addr uintptr //go:cgo_import_dynamic libc_shutdown shutdown "libc.so" // 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 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_socketpair_trampoline_addr uintptr //go:cgo_import_dynamic libc_socketpair socketpair "libc.so" // 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 := syscall_syscall6(libc_recvfrom_trampoline_addr, 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 } var libc_recvfrom_trampoline_addr uintptr //go:cgo_import_dynamic libc_recvfrom recvfrom "libc.so" // 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 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_sendto_trampoline_addr uintptr //go:cgo_import_dynamic libc_sendto sendto "libc.so" // 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_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_recvmsg_trampoline_addr uintptr //go:cgo_import_dynamic libc_recvmsg recvmsg "libc.so" // 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_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_sendmsg_trampoline_addr uintptr //go:cgo_import_dynamic libc_sendmsg sendmsg "libc.so" // 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 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_kevent_trampoline_addr uintptr //go:cgo_import_dynamic libc_kevent kevent "libc.so" // 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_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_utimes_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimes utimes "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func futimes(fd int, timeval *[2]Timeval) (err error) { _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_futimes_trampoline_addr uintptr //go:cgo_import_dynamic libc_futimes futimes "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_poll_trampoline_addr uintptr //go:cgo_import_dynamic libc_poll poll "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Madvise(b []byte, behav int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav)) if e1 != 0 { err = errnoErr(e1) } return } var libc_madvise_trampoline_addr uintptr //go:cgo_import_dynamic libc_madvise madvise "libc.so" // 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_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mlock_trampoline_addr uintptr //go:cgo_import_dynamic libc_mlock mlock "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mlockall(flags int) (err error) { _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mlockall_trampoline_addr uintptr //go:cgo_import_dynamic libc_mlockall mlockall "libc.so" // 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_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mprotect_trampoline_addr uintptr //go:cgo_import_dynamic libc_mprotect mprotect "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Msync(b []byte, flags int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_msync_trampoline_addr uintptr //go:cgo_import_dynamic libc_msync msync "libc.so" // 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_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munlock_trampoline_addr uintptr //go:cgo_import_dynamic libc_munlock munlock "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Munlockall() (err error) { _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munlockall_trampoline_addr uintptr //go:cgo_import_dynamic libc_munlockall munlockall "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pipe2(p *[2]_C_int, flags int) (err error) { _, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pipe2_trampoline_addr uintptr //go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so" // 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_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getdents_trampoline_addr uintptr //go:cgo_import_dynamic libc_getdents getdents "libc.so" // 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_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getcwd_trampoline_addr uintptr //go:cgo_import_dynamic libc_getcwd getcwd "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) { syscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid))) return } var libc_getresuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getresuid getresuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) { syscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid))) return } var libc_getresgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getresgid getresgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) } return } var libc_ioctl_trampoline_addr uintptr //go:cgo_import_dynamic libc_ioctl ioctl "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg)) 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 := syscall_syscall6(libc_sysctl_trampoline_addr, 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 } var libc_sysctl_trampoline_addr uintptr //go:cgo_import_dynamic libc_sysctl sysctl "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fcntl(fd int, cmd int, arg int) (n int, err error) { r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fcntl_trampoline_addr uintptr //go:cgo_import_dynamic libc_fcntl fcntl "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) { r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_ppoll_trampoline_addr uintptr //go:cgo_import_dynamic libc_ppoll ppoll "libc.so" // 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_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_access_trampoline_addr uintptr //go:cgo_import_dynamic libc_access access "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_adjtime_trampoline_addr uintptr //go:cgo_import_dynamic libc_adjtime adjtime "libc.so" // 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_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_chdir chdir "libc.so" // 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_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chflags_trampoline_addr uintptr //go:cgo_import_dynamic libc_chflags chflags "libc.so" // 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_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chmod_trampoline_addr uintptr //go:cgo_import_dynamic libc_chmod chmod "libc.so" // 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_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_chown_trampoline_addr uintptr //go:cgo_import_dynamic libc_chown chown "libc.so" // 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_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chroot_trampoline_addr uintptr //go:cgo_import_dynamic libc_chroot chroot "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ClockGettime(clockid int32, time *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_clock_gettime_trampoline_addr uintptr //go:cgo_import_dynamic libc_clock_gettime clock_gettime "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Close(fd int) (err error) { _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_close_trampoline_addr uintptr //go:cgo_import_dynamic libc_close close "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup(fd int) (nfd int, err error) { r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0) nfd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_dup_trampoline_addr uintptr //go:cgo_import_dynamic libc_dup dup "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup2(from int, to int) (err error) { _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_dup2_trampoline_addr uintptr //go:cgo_import_dynamic libc_dup2 dup2 "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup3(from int, to int, flags int) (err error) { _, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_dup3_trampoline_addr uintptr //go:cgo_import_dynamic libc_dup3 dup3 "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0) return } var libc_exit_trampoline_addr uintptr //go:cgo_import_dynamic libc_exit exit "libc.so" // 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 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_faccessat_trampoline_addr uintptr //go:cgo_import_dynamic libc_faccessat faccessat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchdir(fd int) (err error) { _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchdir fchdir "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchflags(fd int, flags int) (err error) { _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchflags_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchflags fchflags "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchmod(fd int, mode uint32) (err error) { _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchmod_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchmod fchmod "libc.so" // 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 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchmodat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so" // 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_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchown_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchown fchown "libc.so" // 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 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchownat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchownat fchownat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Flock(fd int, how int) (err error) { _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_flock_trampoline_addr uintptr //go:cgo_import_dynamic libc_flock flock "libc.so" // 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_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0) val = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fpathconf_trampoline_addr uintptr //go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstat(fd int, stat *Stat_t) (err error) { _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstat fstat "libc.so" // 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 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstatat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstatat fstatat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstatfs(fd int, stat *Statfs_t) (err error) { _, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstatfs_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstatfs fstatfs "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fsync(fd int) (err error) { _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fsync_trampoline_addr uintptr //go:cgo_import_dynamic libc_fsync fsync "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Ftruncate(fd int, length int64) (err error) { _, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_ftruncate_trampoline_addr uintptr //go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0) egid = int(r0) return } var libc_getegid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getegid getegid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (uid int) { r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0) uid = int(r0) return } var libc_geteuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_geteuid geteuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0) gid = int(r0) return } var libc_getgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getgid getgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgid(pid int) (pgid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0) pgid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpgid getpgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgrp() (pgrp int) { r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0) pgrp = int(r0) return } var libc_getpgrp_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0) pid = int(r0) return } var libc_getpid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpid getpid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0) ppid = int(r0) return } var libc_getppid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getppid getppid "libc.so" // 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_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0) prio = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpriority_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpriority getpriority "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrlimit(which int, lim *Rlimit) (err error) { _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getrlimit_trampoline_addr uintptr //go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrtable() (rtable int, err error) { r0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0) rtable = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getrtable_trampoline_addr uintptr //go:cgo_import_dynamic libc_getrtable getrtable "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrusage(who int, rusage *Rusage) (err error) { _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getrusage_trampoline_addr uintptr //go:cgo_import_dynamic libc_getrusage getrusage "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getsid(pid int) (sid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0) sid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsid getsid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Gettimeofday(tv *Timeval) (err error) { _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_gettimeofday_trampoline_addr uintptr //go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0) uid = int(r0) return } var libc_getuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getuid getuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Issetugid() (tainted bool) { r0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0) tainted = bool(r0 != 0) return } var libc_issetugid_trampoline_addr uintptr //go:cgo_import_dynamic libc_issetugid issetugid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Kill(pid int, signum syscall.Signal) (err error) { _, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_kill_trampoline_addr uintptr //go:cgo_import_dynamic libc_kill kill "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Kqueue() (fd int, err error) { r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_kqueue_trampoline_addr uintptr //go:cgo_import_dynamic libc_kqueue kqueue "libc.so" // 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_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_lchown_trampoline_addr uintptr //go:cgo_import_dynamic libc_lchown lchown "libc.so" // 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_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_link_trampoline_addr uintptr //go:cgo_import_dynamic libc_link link "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Linkat(pathfd int, path string, linkfd int, link string, flags int) (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_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_linkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_linkat linkat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Listen(s int, backlog int) (err error) { _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_listen_trampoline_addr uintptr //go:cgo_import_dynamic libc_listen listen "libc.so" // 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_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_lstat_trampoline_addr uintptr //go:cgo_import_dynamic libc_lstat lstat "libc.so" // 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_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkdir mkdir "libc.so" // 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_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkdirat_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so" // 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_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkfifo_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkfifoat(dirfd int, path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkfifoat_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so" // 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_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mknod_trampoline_addr uintptr //go:cgo_import_dynamic libc_mknod mknod "libc.so" // 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 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mknodat_trampoline_addr uintptr //go:cgo_import_dynamic libc_mknodat mknodat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { var _p0 *byte _p0, err = BytePtrFromString(fsType) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(dir) if err != nil { return } _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mount_trampoline_addr uintptr //go:cgo_import_dynamic libc_mount mount "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_nanosleep_trampoline_addr uintptr //go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so" // 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_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_open_trampoline_addr uintptr //go:cgo_import_dynamic libc_open open "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_openat_trampoline_addr uintptr //go:cgo_import_dynamic libc_openat openat "libc.so" // 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_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) val = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pathconf_trampoline_addr uintptr //go:cgo_import_dynamic libc_pathconf pathconf "libc.so" // 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 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pread_trampoline_addr uintptr //go:cgo_import_dynamic libc_pread pread "libc.so" // 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 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pwrite_trampoline_addr uintptr //go:cgo_import_dynamic libc_pwrite pwrite "libc.so" // 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_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_read_trampoline_addr uintptr //go:cgo_import_dynamic libc_read read "libc.so" // 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_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_readlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_readlink readlink "libc.so" // 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 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_readlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_readlinkat readlinkat "libc.so" // 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_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_rename_trampoline_addr uintptr //go:cgo_import_dynamic libc_rename rename "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Renameat(fromfd int, from string, tofd int, 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_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_renameat_trampoline_addr uintptr //go:cgo_import_dynamic libc_renameat renameat "libc.so" // 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_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_revoke_trampoline_addr uintptr //go:cgo_import_dynamic libc_revoke revoke "libc.so" // 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_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_rmdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_rmdir rmdir "libc.so" // 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_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence)) newoffset = int64(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_lseek_trampoline_addr uintptr //go:cgo_import_dynamic libc_lseek lseek "libc.so" // 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 := syscall_syscall6(libc_select_trampoline_addr, 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 } var libc_select_trampoline_addr uintptr //go:cgo_import_dynamic libc_select select "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setegid(egid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setegid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setegid setegid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Seteuid(euid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_seteuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_seteuid seteuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setgid(gid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setgid setgid "libc.so" // 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_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setlogin_trampoline_addr uintptr //go:cgo_import_dynamic libc_setlogin setlogin "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setpgid(pid int, pgid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setpgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setpgid setpgid "libc.so" // 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_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio)) if e1 != 0 { err = errnoErr(e1) } return } var libc_setpriority_trampoline_addr uintptr //go:cgo_import_dynamic libc_setpriority setpriority "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setregid(rgid int, egid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setregid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setregid setregid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setreuid(ruid int, euid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setreuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setreuid setreuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setresgid(rgid int, egid int, sgid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_setresgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setresgid setresgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setresuid(ruid int, euid int, suid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_setresuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setresuid setresuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setrtable(rtable int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setrtable_trampoline_addr uintptr //go:cgo_import_dynamic libc_setrtable setrtable "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setsid() (pid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0) pid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setsid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setsid setsid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Settimeofday(tp *Timeval) (err error) { _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_settimeofday_trampoline_addr uintptr //go:cgo_import_dynamic libc_settimeofday settimeofday "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setuid(uid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setuid setuid "libc.so" // 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_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_stat_trampoline_addr uintptr //go:cgo_import_dynamic libc_stat stat "libc.so" // 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_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_statfs_trampoline_addr uintptr //go:cgo_import_dynamic libc_statfs statfs "libc.so" // 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_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_symlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_symlink symlink "libc.so" // 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_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) if e1 != 0 { err = errnoErr(e1) } return } var libc_symlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_symlinkat symlinkat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Sync() (err error) { _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_sync_trampoline_addr uintptr //go:cgo_import_dynamic libc_sync sync "libc.so" // 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_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_truncate_trampoline_addr uintptr //go:cgo_import_dynamic libc_truncate truncate "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(newmask int) (oldmask int) { r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0) oldmask = int(r0) return } var libc_umask_trampoline_addr uintptr //go:cgo_import_dynamic libc_umask umask "libc.so" // 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_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_unlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_unlink unlink "libc.so" // 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_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_unlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so" // 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_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_unmount_trampoline_addr uintptr //go:cgo_import_dynamic libc_unmount unmount "libc.so" // 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_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_write_trampoline_addr uintptr //go:cgo_import_dynamic libc_write write "libc.so" // 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 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) ret = uintptr(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mmap_trampoline_addr uintptr //go:cgo_import_dynamic libc_mmap mmap "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func munmap(addr uintptr, length uintptr) (err error) { _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munmap_trampoline_addr uintptr //go:cgo_import_dynamic libc_munmap munmap "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) { r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getfsstat_trampoline_addr uintptr //go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so" // 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 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_utimensat_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimensat utimensat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pledge(promises *byte, execpromises *byte) (err error) { _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pledge_trampoline_addr uintptr //go:cgo_import_dynamic libc_pledge pledge "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func unveil(path *byte, flags *byte) (err error) { _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_unveil_trampoline_addr uintptr //go:cgo_import_dynamic libc_unveil unveil "libc.so" ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s ================================================ // go run mkasm.go openbsd mips64 // Code generated by the command above; DO NOT EDIT. #include "textflag.h" TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgroups(SB) GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8 DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB) TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgroups(SB) GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8 DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB) TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_wait4(SB) GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8 DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB) TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_accept(SB) GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8 DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB) TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_bind(SB) GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8 DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB) TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_connect(SB) GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8 DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB) TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socket(SB) GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8 DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB) TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockopt(SB) GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB) TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsockopt(SB) GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8 DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB) TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpeername(SB) GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB) TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockname(SB) GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB) TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_shutdown(SB) GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8 DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB) TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socketpair(SB) GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8 DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB) TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvfrom(SB) GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8 DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB) TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendto(SB) GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB) TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvmsg(SB) GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8 DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB) TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendmsg(SB) GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB) TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kevent(SB) GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8 DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB) TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimes(SB) GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB) TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_futimes(SB) GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8 DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB) TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_poll(SB) GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8 DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB) TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_madvise(SB) GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8 DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB) TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlock(SB) GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8 DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB) TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlockall(SB) GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8 DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB) TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mprotect(SB) GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8 DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB) TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_msync(SB) GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8 DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB) TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlock(SB) GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8 DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB) TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlockall(SB) GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8 DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB) TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pipe2(SB) GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $8 DATA ·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB) TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getdents(SB) GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $8 DATA ·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB) TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getcwd(SB) GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8 DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB) TEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getresuid(SB) GLOBL ·libc_getresuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getresuid_trampoline_addr(SB)/8, $libc_getresuid_trampoline<>(SB) TEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getresgid(SB) GLOBL ·libc_getresgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getresgid_trampoline_addr(SB)/8, $libc_getresgid_trampoline<>(SB) TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ioctl(SB) GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB) TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sysctl(SB) GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fcntl(SB) GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $8 DATA ·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB) TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8 DATA ·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB) TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_access(SB) GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8 DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB) TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_adjtime(SB) GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8 DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB) TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chdir(SB) GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB) TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chflags(SB) GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8 DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB) TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chmod(SB) GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8 DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB) TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chown(SB) GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8 DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB) TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chroot(SB) GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8 DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB) TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_clock_gettime(SB) GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $8 DATA ·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB) TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_close(SB) GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8 DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB) TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup(SB) GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB) TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup2(SB) GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB) TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup3(SB) GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB) TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_exit(SB) GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8 DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB) TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_faccessat(SB) GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8 DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB) TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchdir(SB) GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB) TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchflags(SB) GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB) TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmod(SB) GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB) TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmodat(SB) GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB) TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchown(SB) GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB) TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchownat(SB) GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB) TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_flock(SB) GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8 DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB) TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fpathconf(SB) GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8 DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB) TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstat(SB) GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB) TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatat(SB) GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB) TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatfs(SB) GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB) TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fsync(SB) GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8 DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB) TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ftruncate(SB) GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8 DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB) TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getegid(SB) GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB) TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_geteuid(SB) GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB) TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgid(SB) GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB) TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgid(SB) GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB) TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgrp(SB) GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB) TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpid(SB) GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB) TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getppid(SB) GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB) TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpriority(SB) GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB) TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrlimit(SB) GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB) TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrtable(SB) GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB) TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrusage(SB) GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB) TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsid(SB) GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB) TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_gettimeofday(SB) GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8 DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB) TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getuid(SB) GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB) TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_issetugid(SB) GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8 DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB) TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kill(SB) GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8 DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB) TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kqueue(SB) GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8 DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB) TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lchown(SB) GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8 DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB) TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_link(SB) GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8 DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB) TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_linkat(SB) GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB) TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_listen(SB) GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8 DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB) TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lstat(SB) GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB) TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdir(SB) GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB) TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdirat(SB) GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB) TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifo(SB) GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB) TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifoat(SB) GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB) TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknod(SB) GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB) TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknodat(SB) GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mount(SB) GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 DATA ·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB) TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_open(SB) GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8 DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB) TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_openat(SB) GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8 DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB) TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pathconf(SB) GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8 DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB) TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pread(SB) GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8 DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB) TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pwrite(SB) GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8 DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB) TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_read(SB) GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8 DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB) TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlink(SB) GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB) TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlinkat(SB) GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB) TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rename(SB) GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8 DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB) TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_renameat(SB) GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8 DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB) TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_revoke(SB) GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8 DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB) TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rmdir(SB) GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB) TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lseek(SB) GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8 DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB) TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_select(SB) GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8 DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB) TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setegid(SB) GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB) TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_seteuid(SB) GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB) TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgid(SB) GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB) TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setlogin(SB) GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8 DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB) TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpgid(SB) GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB) TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpriority(SB) GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8 DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB) TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setregid(SB) GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB) TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setreuid(SB) GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB) TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresgid(SB) GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB) TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresuid(SB) GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB) TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8 DATA ·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB) TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsid(SB) GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB) TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_settimeofday(SB) GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8 DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB) TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setuid(SB) GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB) TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_stat(SB) GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8 DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB) TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_statfs(SB) GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8 DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB) TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlink(SB) GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB) TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlinkat(SB) GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB) TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sync(SB) GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8 DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB) TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_truncate(SB) GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8 DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB) TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_umask(SB) GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8 DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB) TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlink(SB) GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB) TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlinkat(SB) GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB) TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unmount(SB) GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8 DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB) TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_write(SB) GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8 DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB) TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mmap(SB) GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB) TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munmap(SB) GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getfsstat(SB) GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB) TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB) TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pledge(SB) GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $8 DATA ·libc_pledge_trampoline_addr(SB)/8, $libc_pledge_trampoline<>(SB) TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unveil(SB) GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $8 DATA ·libc_unveil_trampoline_addr(SB)/8, $libc_unveil_trampoline<>(SB) ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go ================================================ // go run mksyscall.go -openbsd -libc -tags openbsd,ppc64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_ppc64.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build openbsd && ppc64 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 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getgroups_trampoline_addr uintptr //go:cgo_import_dynamic libc_getgroups getgroups "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setgroups(ngid int, gid *_Gid_t) (err error) { _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setgroups_trampoline_addr uintptr //go:cgo_import_dynamic libc_setgroups setgroups "libc.so" // 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 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) wpid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_wait4_trampoline_addr uintptr //go:cgo_import_dynamic libc_wait4 wait4 "libc.so" // 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_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_accept_trampoline_addr uintptr //go:cgo_import_dynamic libc_accept accept "libc.so" // 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_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_bind_trampoline_addr uintptr //go:cgo_import_dynamic libc_bind bind "libc.so" // 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_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_connect_trampoline_addr uintptr //go:cgo_import_dynamic libc_connect connect "libc.so" // 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 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_socket_trampoline_addr uintptr //go:cgo_import_dynamic libc_socket socket "libc.so" // 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 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsockopt_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsockopt getsockopt "libc.so" // 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 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setsockopt_trampoline_addr uintptr //go:cgo_import_dynamic libc_setsockopt setsockopt "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpeername_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpeername getpeername "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsockname_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsockname getsockname "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Shutdown(s int, how int) (err error) { _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_shutdown_trampoline_addr uintptr //go:cgo_import_dynamic libc_shutdown shutdown "libc.so" // 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 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_socketpair_trampoline_addr uintptr //go:cgo_import_dynamic libc_socketpair socketpair "libc.so" // 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 := syscall_syscall6(libc_recvfrom_trampoline_addr, 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 } var libc_recvfrom_trampoline_addr uintptr //go:cgo_import_dynamic libc_recvfrom recvfrom "libc.so" // 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 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_sendto_trampoline_addr uintptr //go:cgo_import_dynamic libc_sendto sendto "libc.so" // 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_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_recvmsg_trampoline_addr uintptr //go:cgo_import_dynamic libc_recvmsg recvmsg "libc.so" // 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_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_sendmsg_trampoline_addr uintptr //go:cgo_import_dynamic libc_sendmsg sendmsg "libc.so" // 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 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_kevent_trampoline_addr uintptr //go:cgo_import_dynamic libc_kevent kevent "libc.so" // 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_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_utimes_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimes utimes "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func futimes(fd int, timeval *[2]Timeval) (err error) { _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_futimes_trampoline_addr uintptr //go:cgo_import_dynamic libc_futimes futimes "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_poll_trampoline_addr uintptr //go:cgo_import_dynamic libc_poll poll "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Madvise(b []byte, behav int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav)) if e1 != 0 { err = errnoErr(e1) } return } var libc_madvise_trampoline_addr uintptr //go:cgo_import_dynamic libc_madvise madvise "libc.so" // 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_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mlock_trampoline_addr uintptr //go:cgo_import_dynamic libc_mlock mlock "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mlockall(flags int) (err error) { _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mlockall_trampoline_addr uintptr //go:cgo_import_dynamic libc_mlockall mlockall "libc.so" // 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_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mprotect_trampoline_addr uintptr //go:cgo_import_dynamic libc_mprotect mprotect "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Msync(b []byte, flags int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_msync_trampoline_addr uintptr //go:cgo_import_dynamic libc_msync msync "libc.so" // 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_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munlock_trampoline_addr uintptr //go:cgo_import_dynamic libc_munlock munlock "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Munlockall() (err error) { _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munlockall_trampoline_addr uintptr //go:cgo_import_dynamic libc_munlockall munlockall "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pipe2(p *[2]_C_int, flags int) (err error) { _, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pipe2_trampoline_addr uintptr //go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so" // 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_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getdents_trampoline_addr uintptr //go:cgo_import_dynamic libc_getdents getdents "libc.so" // 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_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getcwd_trampoline_addr uintptr //go:cgo_import_dynamic libc_getcwd getcwd "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) { syscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid))) return } var libc_getresuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getresuid getresuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) { syscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid))) return } var libc_getresgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getresgid getresgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) } return } var libc_ioctl_trampoline_addr uintptr //go:cgo_import_dynamic libc_ioctl ioctl "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg)) 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 := syscall_syscall6(libc_sysctl_trampoline_addr, 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 } var libc_sysctl_trampoline_addr uintptr //go:cgo_import_dynamic libc_sysctl sysctl "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fcntl(fd int, cmd int, arg int) (n int, err error) { r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fcntl_trampoline_addr uintptr //go:cgo_import_dynamic libc_fcntl fcntl "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) { r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_ppoll_trampoline_addr uintptr //go:cgo_import_dynamic libc_ppoll ppoll "libc.so" // 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_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_access_trampoline_addr uintptr //go:cgo_import_dynamic libc_access access "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_adjtime_trampoline_addr uintptr //go:cgo_import_dynamic libc_adjtime adjtime "libc.so" // 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_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_chdir chdir "libc.so" // 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_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chflags_trampoline_addr uintptr //go:cgo_import_dynamic libc_chflags chflags "libc.so" // 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_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chmod_trampoline_addr uintptr //go:cgo_import_dynamic libc_chmod chmod "libc.so" // 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_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_chown_trampoline_addr uintptr //go:cgo_import_dynamic libc_chown chown "libc.so" // 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_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chroot_trampoline_addr uintptr //go:cgo_import_dynamic libc_chroot chroot "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ClockGettime(clockid int32, time *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_clock_gettime_trampoline_addr uintptr //go:cgo_import_dynamic libc_clock_gettime clock_gettime "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Close(fd int) (err error) { _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_close_trampoline_addr uintptr //go:cgo_import_dynamic libc_close close "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup(fd int) (nfd int, err error) { r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0) nfd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_dup_trampoline_addr uintptr //go:cgo_import_dynamic libc_dup dup "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup2(from int, to int) (err error) { _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_dup2_trampoline_addr uintptr //go:cgo_import_dynamic libc_dup2 dup2 "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup3(from int, to int, flags int) (err error) { _, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_dup3_trampoline_addr uintptr //go:cgo_import_dynamic libc_dup3 dup3 "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0) return } var libc_exit_trampoline_addr uintptr //go:cgo_import_dynamic libc_exit exit "libc.so" // 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 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_faccessat_trampoline_addr uintptr //go:cgo_import_dynamic libc_faccessat faccessat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchdir(fd int) (err error) { _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchdir fchdir "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchflags(fd int, flags int) (err error) { _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchflags_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchflags fchflags "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchmod(fd int, mode uint32) (err error) { _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchmod_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchmod fchmod "libc.so" // 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 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchmodat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so" // 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_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchown_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchown fchown "libc.so" // 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 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchownat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchownat fchownat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Flock(fd int, how int) (err error) { _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_flock_trampoline_addr uintptr //go:cgo_import_dynamic libc_flock flock "libc.so" // 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_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0) val = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fpathconf_trampoline_addr uintptr //go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstat(fd int, stat *Stat_t) (err error) { _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstat fstat "libc.so" // 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 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstatat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstatat fstatat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstatfs(fd int, stat *Statfs_t) (err error) { _, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstatfs_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstatfs fstatfs "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fsync(fd int) (err error) { _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fsync_trampoline_addr uintptr //go:cgo_import_dynamic libc_fsync fsync "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Ftruncate(fd int, length int64) (err error) { _, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_ftruncate_trampoline_addr uintptr //go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0) egid = int(r0) return } var libc_getegid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getegid getegid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (uid int) { r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0) uid = int(r0) return } var libc_geteuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_geteuid geteuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0) gid = int(r0) return } var libc_getgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getgid getgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgid(pid int) (pgid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0) pgid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpgid getpgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgrp() (pgrp int) { r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0) pgrp = int(r0) return } var libc_getpgrp_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0) pid = int(r0) return } var libc_getpid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpid getpid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0) ppid = int(r0) return } var libc_getppid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getppid getppid "libc.so" // 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_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0) prio = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpriority_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpriority getpriority "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrlimit(which int, lim *Rlimit) (err error) { _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getrlimit_trampoline_addr uintptr //go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrtable() (rtable int, err error) { r0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0) rtable = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getrtable_trampoline_addr uintptr //go:cgo_import_dynamic libc_getrtable getrtable "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrusage(who int, rusage *Rusage) (err error) { _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getrusage_trampoline_addr uintptr //go:cgo_import_dynamic libc_getrusage getrusage "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getsid(pid int) (sid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0) sid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsid getsid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Gettimeofday(tv *Timeval) (err error) { _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_gettimeofday_trampoline_addr uintptr //go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0) uid = int(r0) return } var libc_getuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getuid getuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Issetugid() (tainted bool) { r0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0) tainted = bool(r0 != 0) return } var libc_issetugid_trampoline_addr uintptr //go:cgo_import_dynamic libc_issetugid issetugid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Kill(pid int, signum syscall.Signal) (err error) { _, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_kill_trampoline_addr uintptr //go:cgo_import_dynamic libc_kill kill "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Kqueue() (fd int, err error) { r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_kqueue_trampoline_addr uintptr //go:cgo_import_dynamic libc_kqueue kqueue "libc.so" // 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_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_lchown_trampoline_addr uintptr //go:cgo_import_dynamic libc_lchown lchown "libc.so" // 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_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_link_trampoline_addr uintptr //go:cgo_import_dynamic libc_link link "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Linkat(pathfd int, path string, linkfd int, link string, flags int) (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_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_linkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_linkat linkat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Listen(s int, backlog int) (err error) { _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_listen_trampoline_addr uintptr //go:cgo_import_dynamic libc_listen listen "libc.so" // 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_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_lstat_trampoline_addr uintptr //go:cgo_import_dynamic libc_lstat lstat "libc.so" // 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_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkdir mkdir "libc.so" // 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_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkdirat_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so" // 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_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkfifo_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkfifoat(dirfd int, path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkfifoat_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so" // 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_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mknod_trampoline_addr uintptr //go:cgo_import_dynamic libc_mknod mknod "libc.so" // 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 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mknodat_trampoline_addr uintptr //go:cgo_import_dynamic libc_mknodat mknodat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { var _p0 *byte _p0, err = BytePtrFromString(fsType) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(dir) if err != nil { return } _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mount_trampoline_addr uintptr //go:cgo_import_dynamic libc_mount mount "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_nanosleep_trampoline_addr uintptr //go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so" // 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_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_open_trampoline_addr uintptr //go:cgo_import_dynamic libc_open open "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_openat_trampoline_addr uintptr //go:cgo_import_dynamic libc_openat openat "libc.so" // 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_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) val = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pathconf_trampoline_addr uintptr //go:cgo_import_dynamic libc_pathconf pathconf "libc.so" // 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 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pread_trampoline_addr uintptr //go:cgo_import_dynamic libc_pread pread "libc.so" // 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 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pwrite_trampoline_addr uintptr //go:cgo_import_dynamic libc_pwrite pwrite "libc.so" // 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_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_read_trampoline_addr uintptr //go:cgo_import_dynamic libc_read read "libc.so" // 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_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_readlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_readlink readlink "libc.so" // 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 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_readlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_readlinkat readlinkat "libc.so" // 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_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_rename_trampoline_addr uintptr //go:cgo_import_dynamic libc_rename rename "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Renameat(fromfd int, from string, tofd int, 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_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_renameat_trampoline_addr uintptr //go:cgo_import_dynamic libc_renameat renameat "libc.so" // 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_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_revoke_trampoline_addr uintptr //go:cgo_import_dynamic libc_revoke revoke "libc.so" // 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_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_rmdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_rmdir rmdir "libc.so" // 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_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence)) newoffset = int64(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_lseek_trampoline_addr uintptr //go:cgo_import_dynamic libc_lseek lseek "libc.so" // 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 := syscall_syscall6(libc_select_trampoline_addr, 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 } var libc_select_trampoline_addr uintptr //go:cgo_import_dynamic libc_select select "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setegid(egid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setegid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setegid setegid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Seteuid(euid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_seteuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_seteuid seteuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setgid(gid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setgid setgid "libc.so" // 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_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setlogin_trampoline_addr uintptr //go:cgo_import_dynamic libc_setlogin setlogin "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setpgid(pid int, pgid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setpgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setpgid setpgid "libc.so" // 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_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio)) if e1 != 0 { err = errnoErr(e1) } return } var libc_setpriority_trampoline_addr uintptr //go:cgo_import_dynamic libc_setpriority setpriority "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setregid(rgid int, egid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setregid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setregid setregid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setreuid(ruid int, euid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setreuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setreuid setreuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setresgid(rgid int, egid int, sgid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_setresgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setresgid setresgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setresuid(ruid int, euid int, suid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_setresuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setresuid setresuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setrtable(rtable int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setrtable_trampoline_addr uintptr //go:cgo_import_dynamic libc_setrtable setrtable "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setsid() (pid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0) pid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setsid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setsid setsid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Settimeofday(tp *Timeval) (err error) { _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_settimeofday_trampoline_addr uintptr //go:cgo_import_dynamic libc_settimeofday settimeofday "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setuid(uid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setuid setuid "libc.so" // 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_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_stat_trampoline_addr uintptr //go:cgo_import_dynamic libc_stat stat "libc.so" // 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_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_statfs_trampoline_addr uintptr //go:cgo_import_dynamic libc_statfs statfs "libc.so" // 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_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_symlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_symlink symlink "libc.so" // 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_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) if e1 != 0 { err = errnoErr(e1) } return } var libc_symlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_symlinkat symlinkat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Sync() (err error) { _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_sync_trampoline_addr uintptr //go:cgo_import_dynamic libc_sync sync "libc.so" // 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_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_truncate_trampoline_addr uintptr //go:cgo_import_dynamic libc_truncate truncate "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(newmask int) (oldmask int) { r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0) oldmask = int(r0) return } var libc_umask_trampoline_addr uintptr //go:cgo_import_dynamic libc_umask umask "libc.so" // 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_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_unlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_unlink unlink "libc.so" // 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_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_unlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so" // 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_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_unmount_trampoline_addr uintptr //go:cgo_import_dynamic libc_unmount unmount "libc.so" // 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_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_write_trampoline_addr uintptr //go:cgo_import_dynamic libc_write write "libc.so" // 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 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) ret = uintptr(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mmap_trampoline_addr uintptr //go:cgo_import_dynamic libc_mmap mmap "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func munmap(addr uintptr, length uintptr) (err error) { _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munmap_trampoline_addr uintptr //go:cgo_import_dynamic libc_munmap munmap "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) { r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getfsstat_trampoline_addr uintptr //go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so" // 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 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_utimensat_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimensat utimensat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pledge(promises *byte, execpromises *byte) (err error) { _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pledge_trampoline_addr uintptr //go:cgo_import_dynamic libc_pledge pledge "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func unveil(path *byte, flags *byte) (err error) { _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_unveil_trampoline_addr uintptr //go:cgo_import_dynamic libc_unveil unveil "libc.so" ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s ================================================ // go run mkasm.go openbsd ppc64 // Code generated by the command above; DO NOT EDIT. #include "textflag.h" TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_getgroups(SB) RET GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8 DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB) TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_setgroups(SB) RET GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8 DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB) TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_wait4(SB) RET GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8 DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB) TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_accept(SB) RET GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8 DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB) TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_bind(SB) RET GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8 DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB) TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_connect(SB) RET GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8 DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB) TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_socket(SB) RET GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8 DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB) TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_getsockopt(SB) RET GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB) TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_setsockopt(SB) RET GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8 DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB) TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_getpeername(SB) RET GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB) TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_getsockname(SB) RET GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB) TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_shutdown(SB) RET GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8 DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB) TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_socketpair(SB) RET GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8 DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB) TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_recvfrom(SB) RET GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8 DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB) TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_sendto(SB) RET GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB) TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_recvmsg(SB) RET GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8 DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB) TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_sendmsg(SB) RET GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB) TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_kevent(SB) RET GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8 DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB) TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_utimes(SB) RET GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB) TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_futimes(SB) RET GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8 DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB) TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_poll(SB) RET GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8 DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB) TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_madvise(SB) RET GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8 DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB) TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_mlock(SB) RET GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8 DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB) TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_mlockall(SB) RET GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8 DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB) TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_mprotect(SB) RET GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8 DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB) TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_msync(SB) RET GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8 DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB) TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_munlock(SB) RET GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8 DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB) TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_munlockall(SB) RET GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8 DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB) TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_pipe2(SB) RET GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $8 DATA ·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB) TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_getdents(SB) RET GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $8 DATA ·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB) TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_getcwd(SB) RET GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8 DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB) TEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_getresuid(SB) RET GLOBL ·libc_getresuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getresuid_trampoline_addr(SB)/8, $libc_getresuid_trampoline<>(SB) TEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_getresgid(SB) RET GLOBL ·libc_getresgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getresgid_trampoline_addr(SB)/8, $libc_getresgid_trampoline<>(SB) TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_ioctl(SB) RET GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB) TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_sysctl(SB) RET GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_fcntl(SB) RET GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $8 DATA ·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB) TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_ppoll(SB) RET GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8 DATA ·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB) TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_access(SB) RET GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8 DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB) TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_adjtime(SB) RET GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8 DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB) TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_chdir(SB) RET GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB) TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_chflags(SB) RET GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8 DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB) TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_chmod(SB) RET GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8 DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB) TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_chown(SB) RET GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8 DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB) TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_chroot(SB) RET GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8 DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB) TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_clock_gettime(SB) RET GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $8 DATA ·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB) TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_close(SB) RET GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8 DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB) TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_dup(SB) RET GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB) TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_dup2(SB) RET GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB) TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_dup3(SB) RET GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB) TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_exit(SB) RET GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8 DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB) TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_faccessat(SB) RET GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8 DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB) TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_fchdir(SB) RET GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB) TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_fchflags(SB) RET GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB) TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_fchmod(SB) RET GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB) TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_fchmodat(SB) RET GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB) TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_fchown(SB) RET GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB) TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_fchownat(SB) RET GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB) TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_flock(SB) RET GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8 DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB) TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_fpathconf(SB) RET GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8 DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB) TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_fstat(SB) RET GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB) TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_fstatat(SB) RET GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB) TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_fstatfs(SB) RET GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB) TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_fsync(SB) RET GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8 DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB) TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_ftruncate(SB) RET GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8 DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB) TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_getegid(SB) RET GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB) TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_geteuid(SB) RET GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB) TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_getgid(SB) RET GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB) TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_getpgid(SB) RET GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB) TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_getpgrp(SB) RET GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB) TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_getpid(SB) RET GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB) TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_getppid(SB) RET GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB) TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_getpriority(SB) RET GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB) TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_getrlimit(SB) RET GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB) TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_getrtable(SB) RET GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB) TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_getrusage(SB) RET GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB) TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_getsid(SB) RET GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB) TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_gettimeofday(SB) RET GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8 DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB) TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_getuid(SB) RET GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB) TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_issetugid(SB) RET GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8 DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB) TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_kill(SB) RET GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8 DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB) TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_kqueue(SB) RET GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8 DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB) TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_lchown(SB) RET GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8 DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB) TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_link(SB) RET GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8 DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB) TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_linkat(SB) RET GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB) TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_listen(SB) RET GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8 DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB) TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_lstat(SB) RET GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB) TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_mkdir(SB) RET GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB) TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_mkdirat(SB) RET GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB) TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_mkfifo(SB) RET GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB) TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_mkfifoat(SB) RET GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB) TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_mknod(SB) RET GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB) TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_mknodat(SB) RET GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_mount(SB) RET GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_nanosleep(SB) RET GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 DATA ·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB) TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_open(SB) RET GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8 DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB) TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_openat(SB) RET GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8 DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB) TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_pathconf(SB) RET GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8 DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB) TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_pread(SB) RET GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8 DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB) TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_pwrite(SB) RET GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8 DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB) TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_read(SB) RET GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8 DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB) TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_readlink(SB) RET GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB) TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_readlinkat(SB) RET GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB) TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_rename(SB) RET GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8 DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB) TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_renameat(SB) RET GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8 DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB) TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_revoke(SB) RET GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8 DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB) TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_rmdir(SB) RET GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB) TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_lseek(SB) RET GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8 DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB) TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_select(SB) RET GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8 DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB) TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_setegid(SB) RET GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB) TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_seteuid(SB) RET GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB) TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_setgid(SB) RET GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB) TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_setlogin(SB) RET GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8 DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB) TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_setpgid(SB) RET GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB) TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_setpriority(SB) RET GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8 DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB) TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_setregid(SB) RET GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB) TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_setreuid(SB) RET GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB) TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_setresgid(SB) RET GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB) TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_setresuid(SB) RET GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB) TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_setrtable(SB) RET GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8 DATA ·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB) TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_setsid(SB) RET GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB) TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_settimeofday(SB) RET GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8 DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB) TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_setuid(SB) RET GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB) TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_stat(SB) RET GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8 DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB) TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_statfs(SB) RET GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8 DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB) TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_symlink(SB) RET GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB) TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_symlinkat(SB) RET GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB) TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_sync(SB) RET GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8 DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB) TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_truncate(SB) RET GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8 DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB) TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_umask(SB) RET GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8 DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB) TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_unlink(SB) RET GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB) TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_unlinkat(SB) RET GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB) TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_unmount(SB) RET GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8 DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB) TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_write(SB) RET GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8 DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB) TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_mmap(SB) RET GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB) TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_munmap(SB) RET GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_getfsstat(SB) RET GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB) TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_utimensat(SB) RET GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB) TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_pledge(SB) RET GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $8 DATA ·libc_pledge_trampoline_addr(SB)/8, $libc_pledge_trampoline<>(SB) TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_unveil(SB) RET GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $8 DATA ·libc_unveil_trampoline_addr(SB)/8, $libc_unveil_trampoline<>(SB) ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go ================================================ // go run mksyscall.go -openbsd -libc -tags openbsd,riscv64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_riscv64.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build openbsd && riscv64 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 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getgroups_trampoline_addr uintptr //go:cgo_import_dynamic libc_getgroups getgroups "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setgroups(ngid int, gid *_Gid_t) (err error) { _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setgroups_trampoline_addr uintptr //go:cgo_import_dynamic libc_setgroups setgroups "libc.so" // 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 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) wpid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_wait4_trampoline_addr uintptr //go:cgo_import_dynamic libc_wait4 wait4 "libc.so" // 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_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_accept_trampoline_addr uintptr //go:cgo_import_dynamic libc_accept accept "libc.so" // 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_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_bind_trampoline_addr uintptr //go:cgo_import_dynamic libc_bind bind "libc.so" // 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_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_connect_trampoline_addr uintptr //go:cgo_import_dynamic libc_connect connect "libc.so" // 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 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_socket_trampoline_addr uintptr //go:cgo_import_dynamic libc_socket socket "libc.so" // 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 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsockopt_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsockopt getsockopt "libc.so" // 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 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setsockopt_trampoline_addr uintptr //go:cgo_import_dynamic libc_setsockopt setsockopt "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpeername_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpeername getpeername "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsockname_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsockname getsockname "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Shutdown(s int, how int) (err error) { _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_shutdown_trampoline_addr uintptr //go:cgo_import_dynamic libc_shutdown shutdown "libc.so" // 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 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_socketpair_trampoline_addr uintptr //go:cgo_import_dynamic libc_socketpair socketpair "libc.so" // 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 := syscall_syscall6(libc_recvfrom_trampoline_addr, 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 } var libc_recvfrom_trampoline_addr uintptr //go:cgo_import_dynamic libc_recvfrom recvfrom "libc.so" // 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 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } var libc_sendto_trampoline_addr uintptr //go:cgo_import_dynamic libc_sendto sendto "libc.so" // 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_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_recvmsg_trampoline_addr uintptr //go:cgo_import_dynamic libc_recvmsg recvmsg "libc.so" // 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_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_sendmsg_trampoline_addr uintptr //go:cgo_import_dynamic libc_sendmsg sendmsg "libc.so" // 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 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_kevent_trampoline_addr uintptr //go:cgo_import_dynamic libc_kevent kevent "libc.so" // 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_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_utimes_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimes utimes "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func futimes(fd int, timeval *[2]Timeval) (err error) { _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_futimes_trampoline_addr uintptr //go:cgo_import_dynamic libc_futimes futimes "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_poll_trampoline_addr uintptr //go:cgo_import_dynamic libc_poll poll "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Madvise(b []byte, behav int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav)) if e1 != 0 { err = errnoErr(e1) } return } var libc_madvise_trampoline_addr uintptr //go:cgo_import_dynamic libc_madvise madvise "libc.so" // 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_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mlock_trampoline_addr uintptr //go:cgo_import_dynamic libc_mlock mlock "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mlockall(flags int) (err error) { _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mlockall_trampoline_addr uintptr //go:cgo_import_dynamic libc_mlockall mlockall "libc.so" // 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_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mprotect_trampoline_addr uintptr //go:cgo_import_dynamic libc_mprotect mprotect "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Msync(b []byte, flags int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_msync_trampoline_addr uintptr //go:cgo_import_dynamic libc_msync msync "libc.so" // 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_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munlock_trampoline_addr uintptr //go:cgo_import_dynamic libc_munlock munlock "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Munlockall() (err error) { _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munlockall_trampoline_addr uintptr //go:cgo_import_dynamic libc_munlockall munlockall "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pipe2(p *[2]_C_int, flags int) (err error) { _, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pipe2_trampoline_addr uintptr //go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so" // 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_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getdents_trampoline_addr uintptr //go:cgo_import_dynamic libc_getdents getdents "libc.so" // 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_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getcwd_trampoline_addr uintptr //go:cgo_import_dynamic libc_getcwd getcwd "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) { syscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid))) return } var libc_getresuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getresuid getresuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) { syscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid))) return } var libc_getresgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getresgid getresgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { err = errnoErr(e1) } return } var libc_ioctl_trampoline_addr uintptr //go:cgo_import_dynamic libc_ioctl ioctl "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg)) 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 := syscall_syscall6(libc_sysctl_trampoline_addr, 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 } var libc_sysctl_trampoline_addr uintptr //go:cgo_import_dynamic libc_sysctl sysctl "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fcntl(fd int, cmd int, arg int) (n int, err error) { r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fcntl_trampoline_addr uintptr //go:cgo_import_dynamic libc_fcntl fcntl "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) { r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_ppoll_trampoline_addr uintptr //go:cgo_import_dynamic libc_ppoll ppoll "libc.so" // 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_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_access_trampoline_addr uintptr //go:cgo_import_dynamic libc_access access "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_adjtime_trampoline_addr uintptr //go:cgo_import_dynamic libc_adjtime adjtime "libc.so" // 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_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_chdir chdir "libc.so" // 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_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chflags_trampoline_addr uintptr //go:cgo_import_dynamic libc_chflags chflags "libc.so" // 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_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chmod_trampoline_addr uintptr //go:cgo_import_dynamic libc_chmod chmod "libc.so" // 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_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_chown_trampoline_addr uintptr //go:cgo_import_dynamic libc_chown chown "libc.so" // 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_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_chroot_trampoline_addr uintptr //go:cgo_import_dynamic libc_chroot chroot "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ClockGettime(clockid int32, time *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_clock_gettime_trampoline_addr uintptr //go:cgo_import_dynamic libc_clock_gettime clock_gettime "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Close(fd int) (err error) { _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_close_trampoline_addr uintptr //go:cgo_import_dynamic libc_close close "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup(fd int) (nfd int, err error) { r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0) nfd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_dup_trampoline_addr uintptr //go:cgo_import_dynamic libc_dup dup "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup2(from int, to int) (err error) { _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_dup2_trampoline_addr uintptr //go:cgo_import_dynamic libc_dup2 dup2 "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup3(from int, to int, flags int) (err error) { _, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_dup3_trampoline_addr uintptr //go:cgo_import_dynamic libc_dup3 dup3 "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0) return } var libc_exit_trampoline_addr uintptr //go:cgo_import_dynamic libc_exit exit "libc.so" // 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 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_faccessat_trampoline_addr uintptr //go:cgo_import_dynamic libc_faccessat faccessat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchdir(fd int) (err error) { _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchdir fchdir "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchflags(fd int, flags int) (err error) { _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchflags_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchflags fchflags "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchmod(fd int, mode uint32) (err error) { _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchmod_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchmod fchmod "libc.so" // 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 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchmodat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so" // 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_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchown_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchown fchown "libc.so" // 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 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fchownat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fchownat fchownat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Flock(fd int, how int) (err error) { _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_flock_trampoline_addr uintptr //go:cgo_import_dynamic libc_flock flock "libc.so" // 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_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0) val = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fpathconf_trampoline_addr uintptr //go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstat(fd int, stat *Stat_t) (err error) { _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstat fstat "libc.so" // 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 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstatat_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstatat fstatat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstatfs(fd int, stat *Statfs_t) (err error) { _, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fstatfs_trampoline_addr uintptr //go:cgo_import_dynamic libc_fstatfs fstatfs "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fsync(fd int) (err error) { _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_fsync_trampoline_addr uintptr //go:cgo_import_dynamic libc_fsync fsync "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Ftruncate(fd int, length int64) (err error) { _, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_ftruncate_trampoline_addr uintptr //go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0) egid = int(r0) return } var libc_getegid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getegid getegid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (uid int) { r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0) uid = int(r0) return } var libc_geteuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_geteuid geteuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0) gid = int(r0) return } var libc_getgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getgid getgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgid(pid int) (pgid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0) pgid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpgid getpgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgrp() (pgrp int) { r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0) pgrp = int(r0) return } var libc_getpgrp_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0) pid = int(r0) return } var libc_getpid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpid getpid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0) ppid = int(r0) return } var libc_getppid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getppid getppid "libc.so" // 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_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0) prio = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getpriority_trampoline_addr uintptr //go:cgo_import_dynamic libc_getpriority getpriority "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrlimit(which int, lim *Rlimit) (err error) { _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getrlimit_trampoline_addr uintptr //go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrtable() (rtable int, err error) { r0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0) rtable = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getrtable_trampoline_addr uintptr //go:cgo_import_dynamic libc_getrtable getrtable "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrusage(who int, rusage *Rusage) (err error) { _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getrusage_trampoline_addr uintptr //go:cgo_import_dynamic libc_getrusage getrusage "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getsid(pid int) (sid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0) sid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getsid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getsid getsid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Gettimeofday(tv *Timeval) (err error) { _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_gettimeofday_trampoline_addr uintptr //go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0) uid = int(r0) return } var libc_getuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_getuid getuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Issetugid() (tainted bool) { r0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0) tainted = bool(r0 != 0) return } var libc_issetugid_trampoline_addr uintptr //go:cgo_import_dynamic libc_issetugid issetugid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Kill(pid int, signum syscall.Signal) (err error) { _, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_kill_trampoline_addr uintptr //go:cgo_import_dynamic libc_kill kill "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Kqueue() (fd int, err error) { r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_kqueue_trampoline_addr uintptr //go:cgo_import_dynamic libc_kqueue kqueue "libc.so" // 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_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_lchown_trampoline_addr uintptr //go:cgo_import_dynamic libc_lchown lchown "libc.so" // 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_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_link_trampoline_addr uintptr //go:cgo_import_dynamic libc_link link "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Linkat(pathfd int, path string, linkfd int, link string, flags int) (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_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_linkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_linkat linkat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Listen(s int, backlog int) (err error) { _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_listen_trampoline_addr uintptr //go:cgo_import_dynamic libc_listen listen "libc.so" // 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_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_lstat_trampoline_addr uintptr //go:cgo_import_dynamic libc_lstat lstat "libc.so" // 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_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkdir mkdir "libc.so" // 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_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkdirat_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so" // 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_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkfifo_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkfifoat(dirfd int, path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mkfifoat_trampoline_addr uintptr //go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so" // 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_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) if e1 != 0 { err = errnoErr(e1) } return } var libc_mknod_trampoline_addr uintptr //go:cgo_import_dynamic libc_mknod mknod "libc.so" // 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 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mknodat_trampoline_addr uintptr //go:cgo_import_dynamic libc_mknodat mknodat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { var _p0 *byte _p0, err = BytePtrFromString(fsType) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(dir) if err != nil { return } _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mount_trampoline_addr uintptr //go:cgo_import_dynamic libc_mount mount "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_nanosleep_trampoline_addr uintptr //go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so" // 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_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_open_trampoline_addr uintptr //go:cgo_import_dynamic libc_open open "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_openat_trampoline_addr uintptr //go:cgo_import_dynamic libc_openat openat "libc.so" // 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_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) val = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pathconf_trampoline_addr uintptr //go:cgo_import_dynamic libc_pathconf pathconf "libc.so" // 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 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pread_trampoline_addr uintptr //go:cgo_import_dynamic libc_pread pread "libc.so" // 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 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pwrite_trampoline_addr uintptr //go:cgo_import_dynamic libc_pwrite pwrite "libc.so" // 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_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_read_trampoline_addr uintptr //go:cgo_import_dynamic libc_read read "libc.so" // 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_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_readlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_readlink readlink "libc.so" // 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 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_readlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_readlinkat readlinkat "libc.so" // 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_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_rename_trampoline_addr uintptr //go:cgo_import_dynamic libc_rename rename "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Renameat(fromfd int, from string, tofd int, 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_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_renameat_trampoline_addr uintptr //go:cgo_import_dynamic libc_renameat renameat "libc.so" // 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_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_revoke_trampoline_addr uintptr //go:cgo_import_dynamic libc_revoke revoke "libc.so" // 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_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_rmdir_trampoline_addr uintptr //go:cgo_import_dynamic libc_rmdir rmdir "libc.so" // 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_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence)) newoffset = int64(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_lseek_trampoline_addr uintptr //go:cgo_import_dynamic libc_lseek lseek "libc.so" // 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 := syscall_syscall6(libc_select_trampoline_addr, 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 } var libc_select_trampoline_addr uintptr //go:cgo_import_dynamic libc_select select "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setegid(egid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setegid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setegid setegid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Seteuid(euid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_seteuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_seteuid seteuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setgid(gid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setgid setgid "libc.so" // 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_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setlogin_trampoline_addr uintptr //go:cgo_import_dynamic libc_setlogin setlogin "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setpgid(pid int, pgid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setpgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setpgid setpgid "libc.so" // 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_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio)) if e1 != 0 { err = errnoErr(e1) } return } var libc_setpriority_trampoline_addr uintptr //go:cgo_import_dynamic libc_setpriority setpriority "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setregid(rgid int, egid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setregid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setregid setregid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setreuid(ruid int, euid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setreuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setreuid setreuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setresgid(rgid int, egid int, sgid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_setresgid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setresgid setresgid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setresuid(ruid int, euid int, suid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid)) if e1 != 0 { err = errnoErr(e1) } return } var libc_setresuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setresuid setresuid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setrtable(rtable int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setrtable_trampoline_addr uintptr //go:cgo_import_dynamic libc_setrtable setrtable "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setsid() (pid int, err error) { r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0) pid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setsid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setsid setsid "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Settimeofday(tp *Timeval) (err error) { _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_settimeofday_trampoline_addr uintptr //go:cgo_import_dynamic libc_settimeofday settimeofday "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setuid(uid int) (err error) { _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_setuid_trampoline_addr uintptr //go:cgo_import_dynamic libc_setuid setuid "libc.so" // 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_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_stat_trampoline_addr uintptr //go:cgo_import_dynamic libc_stat stat "libc.so" // 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_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_statfs_trampoline_addr uintptr //go:cgo_import_dynamic libc_statfs statfs "libc.so" // 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_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_symlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_symlink symlink "libc.so" // 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_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) if e1 != 0 { err = errnoErr(e1) } return } var libc_symlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_symlinkat symlinkat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Sync() (err error) { _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_sync_trampoline_addr uintptr //go:cgo_import_dynamic libc_sync sync "libc.so" // 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_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_truncate_trampoline_addr uintptr //go:cgo_import_dynamic libc_truncate truncate "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(newmask int) (oldmask int) { r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0) oldmask = int(r0) return } var libc_umask_trampoline_addr uintptr //go:cgo_import_dynamic libc_umask umask "libc.so" // 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_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_unlink_trampoline_addr uintptr //go:cgo_import_dynamic libc_unlink unlink "libc.so" // 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_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) if e1 != 0 { err = errnoErr(e1) } return } var libc_unlinkat_trampoline_addr uintptr //go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so" // 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_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_unmount_trampoline_addr uintptr //go:cgo_import_dynamic libc_unmount unmount "libc.so" // 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_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_write_trampoline_addr uintptr //go:cgo_import_dynamic libc_write write "libc.so" // 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 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) ret = uintptr(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_mmap_trampoline_addr uintptr //go:cgo_import_dynamic libc_mmap mmap "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func munmap(addr uintptr, length uintptr) (err error) { _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_munmap_trampoline_addr uintptr //go:cgo_import_dynamic libc_munmap munmap "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) { r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } var libc_getfsstat_trampoline_addr uintptr //go:cgo_import_dynamic libc_getfsstat getfsstat "libc.so" // 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 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_utimensat_trampoline_addr uintptr //go:cgo_import_dynamic libc_utimensat utimensat "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pledge(promises *byte, execpromises *byte) (err error) { _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_pledge_trampoline_addr uintptr //go:cgo_import_dynamic libc_pledge pledge "libc.so" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func unveil(path *byte, flags *byte) (err error) { _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0) if e1 != 0 { err = errnoErr(e1) } return } var libc_unveil_trampoline_addr uintptr //go:cgo_import_dynamic libc_unveil unveil "libc.so" ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s ================================================ // go run mkasm.go openbsd riscv64 // Code generated by the command above; DO NOT EDIT. #include "textflag.h" TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgroups(SB) GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8 DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB) TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgroups(SB) GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8 DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB) TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_wait4(SB) GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8 DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB) TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_accept(SB) GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8 DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB) TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_bind(SB) GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8 DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB) TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_connect(SB) GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8 DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB) TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socket(SB) GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8 DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB) TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockopt(SB) GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB) TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsockopt(SB) GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8 DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB) TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpeername(SB) GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB) TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsockname(SB) GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB) TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_shutdown(SB) GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8 DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB) TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_socketpair(SB) GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8 DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB) TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvfrom(SB) GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8 DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB) TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendto(SB) GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB) TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_recvmsg(SB) GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8 DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB) TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendmsg(SB) GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8 DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB) TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kevent(SB) GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8 DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB) TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimes(SB) GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB) TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_futimes(SB) GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8 DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB) TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_poll(SB) GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8 DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB) TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_madvise(SB) GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8 DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB) TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlock(SB) GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8 DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB) TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mlockall(SB) GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8 DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB) TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mprotect(SB) GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8 DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB) TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_msync(SB) GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8 DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB) TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlock(SB) GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8 DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB) TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munlockall(SB) GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8 DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB) TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pipe2(SB) GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $8 DATA ·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB) TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getdents(SB) GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $8 DATA ·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB) TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getcwd(SB) GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8 DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB) TEXT libc_getresuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getresuid(SB) GLOBL ·libc_getresuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getresuid_trampoline_addr(SB)/8, $libc_getresuid_trampoline<>(SB) TEXT libc_getresgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getresgid(SB) GLOBL ·libc_getresgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getresgid_trampoline_addr(SB)/8, $libc_getresgid_trampoline<>(SB) TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ioctl(SB) GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB) TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sysctl(SB) GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fcntl(SB) GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $8 DATA ·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB) TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8 DATA ·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB) TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_access(SB) GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8 DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB) TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_adjtime(SB) GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8 DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB) TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chdir(SB) GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB) TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chflags(SB) GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8 DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB) TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chmod(SB) GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8 DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB) TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chown(SB) GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8 DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB) TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_chroot(SB) GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8 DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB) TEXT libc_clock_gettime_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_clock_gettime(SB) GLOBL ·libc_clock_gettime_trampoline_addr(SB), RODATA, $8 DATA ·libc_clock_gettime_trampoline_addr(SB)/8, $libc_clock_gettime_trampoline<>(SB) TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_close(SB) GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8 DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB) TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup(SB) GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB) TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup2(SB) GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB) TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_dup3(SB) GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $8 DATA ·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB) TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_exit(SB) GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8 DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB) TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_faccessat(SB) GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8 DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB) TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchdir(SB) GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB) TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchflags(SB) GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB) TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmod(SB) GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB) TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchmodat(SB) GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB) TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchown(SB) GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB) TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fchownat(SB) GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB) TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_flock(SB) GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8 DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB) TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fpathconf(SB) GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8 DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB) TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstat(SB) GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB) TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatat(SB) GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB) TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fstatfs(SB) GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8 DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB) TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_fsync(SB) GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8 DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB) TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ftruncate(SB) GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8 DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB) TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getegid(SB) GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB) TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_geteuid(SB) GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB) TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getgid(SB) GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB) TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgid(SB) GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB) TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpgrp(SB) GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB) TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpid(SB) GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB) TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getppid(SB) GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB) TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getpriority(SB) GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8 DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB) TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrlimit(SB) GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB) TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrtable(SB) GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB) TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getrusage(SB) GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8 DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB) TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getsid(SB) GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB) TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_gettimeofday(SB) GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8 DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB) TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getuid(SB) GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB) TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_issetugid(SB) GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8 DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB) TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kill(SB) GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8 DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB) TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_kqueue(SB) GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8 DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB) TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lchown(SB) GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8 DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB) TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_link(SB) GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8 DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB) TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_linkat(SB) GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB) TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_listen(SB) GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8 DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB) TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lstat(SB) GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB) TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdir(SB) GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB) TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkdirat(SB) GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB) TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifo(SB) GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB) TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mkfifoat(SB) GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB) TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknod(SB) GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB) TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mknodat(SB) GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mount(SB) GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 DATA ·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB) TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_open(SB) GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8 DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB) TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_openat(SB) GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8 DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB) TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pathconf(SB) GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8 DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB) TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pread(SB) GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8 DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB) TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pwrite(SB) GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8 DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB) TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_read(SB) GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8 DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB) TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlink(SB) GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB) TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_readlinkat(SB) GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB) TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rename(SB) GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8 DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB) TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_renameat(SB) GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8 DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB) TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_revoke(SB) GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8 DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB) TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_rmdir(SB) GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8 DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB) TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_lseek(SB) GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8 DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB) TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_select(SB) GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8 DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB) TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setegid(SB) GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB) TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_seteuid(SB) GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB) TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setgid(SB) GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB) TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setlogin(SB) GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8 DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB) TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpgid(SB) GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB) TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setpriority(SB) GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8 DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB) TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setregid(SB) GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB) TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setreuid(SB) GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB) TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresgid(SB) GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB) TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setresuid(SB) GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB) TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setrtable(SB) GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8 DATA ·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB) TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setsid(SB) GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB) TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_settimeofday(SB) GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8 DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB) TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_setuid(SB) GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8 DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB) TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_stat(SB) GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8 DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB) TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_statfs(SB) GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8 DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB) TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlink(SB) GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB) TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_symlinkat(SB) GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB) TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sync(SB) GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8 DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB) TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_truncate(SB) GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8 DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB) TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_umask(SB) GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8 DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB) TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlink(SB) GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8 DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB) TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unlinkat(SB) GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8 DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB) TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unmount(SB) GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8 DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB) TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_write(SB) GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8 DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB) TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_mmap(SB) GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB) TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_munmap(SB) GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8 DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB) TEXT libc_getfsstat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_getfsstat(SB) GLOBL ·libc_getfsstat_trampoline_addr(SB), RODATA, $8 DATA ·libc_getfsstat_trampoline_addr(SB)/8, $libc_getfsstat_trampoline<>(SB) TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_utimensat(SB) GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8 DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB) TEXT libc_pledge_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_pledge(SB) GLOBL ·libc_pledge_trampoline_addr(SB), RODATA, $8 DATA ·libc_pledge_trampoline_addr(SB)/8, $libc_pledge_trampoline<>(SB) TEXT libc_unveil_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_unveil(SB) GLOBL ·libc_unveil_trampoline_addr(SB), RODATA, $8 DATA ·libc_unveil_trampoline_addr(SB)/8, $libc_unveil_trampoline<>(SB) ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go ================================================ // go run mksyscall_solaris.go -tags solaris,amd64 syscall_solaris.go syscall_solaris_amd64.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build solaris && amd64 package unix import ( "syscall" "unsafe" ) //go:cgo_import_dynamic libc_pipe pipe "libc.so" //go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so" //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_wait4 wait4 "libc.so" //go:cgo_import_dynamic libc_gethostname gethostname "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___xnet_recvmsg __xnet_recvmsg "libsocket.so" //go:cgo_import_dynamic libc___xnet_sendmsg __xnet_sendmsg "libsocket.so" //go:cgo_import_dynamic libc_acct acct "libc.so" //go:cgo_import_dynamic libc___makedev __makedev "libc.so" //go:cgo_import_dynamic libc___major __major "libc.so" //go:cgo_import_dynamic libc___minor __minor "libc.so" //go:cgo_import_dynamic libc_ioctl ioctl "libc.so" //go:cgo_import_dynamic libc_poll poll "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_clockgettime clockgettime "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_faccessat faccessat "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_flock flock "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_fstatat fstatat "libc.so" //go:cgo_import_dynamic libc_fstatvfs fstatvfs "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_getsid getsid "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___xnet_llisten __xnet_llisten "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_msync msync "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_select select "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_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_statvfs statvfs "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_sysconf sysconf "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___xnet_bind __xnet_bind "libsocket.so" //go:cgo_import_dynamic libc___xnet_connect __xnet_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_sendfile sendfile "libsendfile.so" //go:cgo_import_dynamic libc___xnet_sendto __xnet_sendto "libsocket.so" //go:cgo_import_dynamic libc___xnet_socket __xnet_socket "libsocket.so" //go:cgo_import_dynamic libc___xnet_socketpair __xnet_socketpair "libsocket.so" //go:cgo_import_dynamic libc_write write "libc.so" //go:cgo_import_dynamic libc___xnet_getsockopt __xnet_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_port_create port_create "libc.so" //go:cgo_import_dynamic libc_port_associate port_associate "libc.so" //go:cgo_import_dynamic libc_port_dissociate port_dissociate "libc.so" //go:cgo_import_dynamic libc_port_get port_get "libc.so" //go:cgo_import_dynamic libc_port_getn port_getn "libc.so" //go:cgo_import_dynamic libc_putmsg putmsg "libc.so" //go:cgo_import_dynamic libc_getmsg getmsg "libc.so" //go:linkname procpipe libc_pipe //go:linkname procpipe2 libc_pipe2 //go:linkname procgetsockname libc_getsockname //go:linkname procGetcwd libc_getcwd //go:linkname procgetgroups libc_getgroups //go:linkname procsetgroups libc_setgroups //go:linkname procwait4 libc_wait4 //go:linkname procgethostname libc_gethostname //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 proc__xnet_recvmsg libc___xnet_recvmsg //go:linkname proc__xnet_sendmsg libc___xnet_sendmsg //go:linkname procacct libc_acct //go:linkname proc__makedev libc___makedev //go:linkname proc__major libc___major //go:linkname proc__minor libc___minor //go:linkname procioctl libc_ioctl //go:linkname procpoll libc_poll //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 procClockGettime libc_clockgettime //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 procFaccessat libc_faccessat //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 procFlock libc_flock //go:linkname procFpathconf libc_fpathconf //go:linkname procFstat libc_fstat //go:linkname procFstatat libc_fstatat //go:linkname procFstatvfs libc_fstatvfs //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 procGetsid libc_getsid //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 proc__xnet_llisten libc___xnet_llisten //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 procMsync libc_msync //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 procSelect libc_select //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 procSetsid libc_setsid //go:linkname procSetuid libc_setuid //go:linkname procshutdown libc_shutdown //go:linkname procStat libc_stat //go:linkname procStatvfs libc_statvfs //go:linkname procSymlink libc_symlink //go:linkname procSync libc_sync //go:linkname procSysconf libc_sysconf //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 proc__xnet_bind libc___xnet_bind //go:linkname proc__xnet_connect libc___xnet_connect //go:linkname procmmap libc_mmap //go:linkname procmunmap libc_munmap //go:linkname procsendfile libc_sendfile //go:linkname proc__xnet_sendto libc___xnet_sendto //go:linkname proc__xnet_socket libc___xnet_socket //go:linkname proc__xnet_socketpair libc___xnet_socketpair //go:linkname procwrite libc_write //go:linkname proc__xnet_getsockopt libc___xnet_getsockopt //go:linkname procgetpeername libc_getpeername //go:linkname procsetsockopt libc_setsockopt //go:linkname procrecvfrom libc_recvfrom //go:linkname procport_create libc_port_create //go:linkname procport_associate libc_port_associate //go:linkname procport_dissociate libc_port_dissociate //go:linkname procport_get libc_port_get //go:linkname procport_getn libc_port_getn //go:linkname procputmsg libc_putmsg //go:linkname procgetmsg libc_getmsg var ( procpipe, procpipe2, procgetsockname, procGetcwd, procgetgroups, procsetgroups, procwait4, procgethostname, procutimes, procutimensat, procfcntl, procfutimesat, procaccept, proc__xnet_recvmsg, proc__xnet_sendmsg, procacct, proc__makedev, proc__major, proc__minor, procioctl, procpoll, procAccess, procAdjtime, procChdir, procChmod, procChown, procChroot, procClockGettime, procClose, procCreat, procDup, procDup2, procExit, procFaccessat, procFchdir, procFchmod, procFchmodat, procFchown, procFchownat, procFdatasync, procFlock, procFpathconf, procFstat, procFstatat, procFstatvfs, procGetdents, procGetgid, procGetpid, procGetpgid, procGetpgrp, procGeteuid, procGetegid, procGetppid, procGetpriority, procGetrlimit, procGetrusage, procGetsid, procGettimeofday, procGetuid, procKill, procLchown, procLink, proc__xnet_llisten, procLstat, procMadvise, procMkdir, procMkdirat, procMkfifo, procMkfifoat, procMknod, procMknodat, procMlock, procMlockall, procMprotect, procMsync, procMunlock, procMunlockall, procNanosleep, procOpen, procOpenat, procPathconf, procPause, procpread, procpwrite, procread, procReadlink, procRename, procRenameat, procRmdir, proclseek, procSelect, procSetegid, procSeteuid, procSetgid, procSethostname, procSetpgid, procSetpriority, procSetregid, procSetreuid, procSetsid, procSetuid, procshutdown, procStat, procStatvfs, procSymlink, procSync, procSysconf, procTimes, procTruncate, procFsync, procFtruncate, procUmask, procUname, procumount, procUnlink, procUnlinkat, procUstat, procUtime, proc__xnet_bind, proc__xnet_connect, procmmap, procmunmap, procsendfile, proc__xnet_sendto, proc__xnet_socket, proc__xnet_socketpair, procwrite, proc__xnet_getsockopt, procgetpeername, procsetsockopt, procrecvfrom, procport_create, procport_associate, procport_dissociate, procport_get, procport_getn, procputmsg, procgetmsg syscallFunc ) // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pipe(p *[2]_C_int) (n int, err error) { r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procpipe)), 1, uintptr(unsafe.Pointer(p)), 0, 0, 0, 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 pipe2(p *[2]_C_int, flags int) (err error) { _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procpipe2)), 2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0, 0, 0, 0) 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 := sysvicall6(uintptr(unsafe.Pointer(&procgetsockname)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0) 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 *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 = errnoErr(e1) } return } // 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 := rawSysvicall6(uintptr(unsafe.Pointer(&procgetgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 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 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 = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func wait4(pid int32, statusp *_C_int, options int, rusage *Rusage) (wpid int32, err error) { r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwait4)), 4, uintptr(pid), uintptr(unsafe.Pointer(statusp)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) wpid = int32(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func gethostname(buf []byte) (n int, err error) { var _p0 *byte if len(buf) > 0 { _p0 = &buf[0] } r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgethostname)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0, 0, 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 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) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 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) 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 := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(arg), 0, 0, 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 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 = 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 := 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 = 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 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_recvmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 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 sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_sendmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 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 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 = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func __makedev(version int, major uint, minor uint) (val uint64) { r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&proc__makedev)), 3, uintptr(version), uintptr(major), uintptr(minor), 0, 0, 0) val = uint64(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func __major(version int, dev uint64) (val uint) { r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&proc__major)), 2, uintptr(version), uintptr(dev), 0, 0, 0, 0) val = uint(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func __minor(version int, dev uint64) (val uint) { r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&proc__minor)), 2, uintptr(version), uintptr(dev), 0, 0, 0, 0) val = uint(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctlRet(fd int, req int, arg uintptr) (ret int, err error) { r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 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 ioctlPtrRet(fd int, req int, arg unsafe.Pointer) (ret int, err error) { r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 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 poll(fds *PollFd, nfds int, timeout int) (n int, err error) { r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpoll)), 3, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout), 0, 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 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) 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 := sysvicall6(uintptr(unsafe.Pointer(&procAdjtime)), 2, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0, 0, 0, 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 := sysvicall6(uintptr(unsafe.Pointer(&procChdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0) 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 := sysvicall6(uintptr(unsafe.Pointer(&procChmod)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0) 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 := sysvicall6(uintptr(unsafe.Pointer(&procChown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0) 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 := sysvicall6(uintptr(unsafe.Pointer(&procChroot)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0) 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 := sysvicall6(uintptr(unsafe.Pointer(&procClockGettime)), 2, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0, 0, 0, 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 := sysvicall6(uintptr(unsafe.Pointer(&procClose)), 1, uintptr(fd), 0, 0, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 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) fd = int(r0) 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 := sysvicall6(uintptr(unsafe.Pointer(&procDup)), 1, uintptr(fd), 0, 0, 0, 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(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 = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { sysvicall6(uintptr(unsafe.Pointer(&procExit)), 1, uintptr(code), 0, 0, 0, 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 := sysvicall6(uintptr(unsafe.Pointer(&procFaccessat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 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 Fchdir(fd int) (err error) { _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchdir)), 1, uintptr(fd), 0, 0, 0, 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 := sysvicall6(uintptr(unsafe.Pointer(&procFchmod)), 2, uintptr(fd), uintptr(mode), 0, 0, 0, 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 := sysvicall6(uintptr(unsafe.Pointer(&procFchmodat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 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 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 = 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 := sysvicall6(uintptr(unsafe.Pointer(&procFchownat)), 5, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) 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 := sysvicall6(uintptr(unsafe.Pointer(&procFdatasync)), 1, uintptr(fd), 0, 0, 0, 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 := sysvicall6(uintptr(unsafe.Pointer(&procFlock)), 2, uintptr(fd), uintptr(how), 0, 0, 0, 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 := sysvicall6(uintptr(unsafe.Pointer(&procFpathconf)), 2, uintptr(fd), uintptr(name), 0, 0, 0, 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 := sysvicall6(uintptr(unsafe.Pointer(&procFstat)), 2, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 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 := sysvicall6(uintptr(unsafe.Pointer(&procFstatat)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 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 Fstatvfs(fd int, vfsstat *Statvfs_t) (err error) { _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstatvfs)), 2, uintptr(fd), uintptr(unsafe.Pointer(vfsstat)), 0, 0, 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, 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 = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetgid)), 0, 0, 0, 0, 0, 0, 0) gid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpid)), 0, 0, 0, 0, 0, 0, 0) pid = 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 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpgid)), 1, uintptr(pid), 0, 0, 0, 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() (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 = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (euid int) { r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGeteuid)), 0, 0, 0, 0, 0, 0, 0) euid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGetegid)), 0, 0, 0, 0, 0, 0, 0) egid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGetppid)), 0, 0, 0, 0, 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) (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 = 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 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 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 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetrusage)), 2, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0, 0, 0, 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 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetsid)), 1, uintptr(pid), 0, 0, 0, 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 := rawSysvicall6(uintptr(unsafe.Pointer(&procGettimeofday)), 1, uintptr(unsafe.Pointer(tv)), 0, 0, 0, 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, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetuid)), 0, 0, 0, 0, 0, 0, 0) uid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 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 = 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 := sysvicall6(uintptr(unsafe.Pointer(&procLchown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0) 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 := sysvicall6(uintptr(unsafe.Pointer(&procLink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0) 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 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_llisten)), 2, uintptr(s), uintptr(backlog), 0, 0, 0, 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 := sysvicall6(uintptr(unsafe.Pointer(&procLstat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 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 *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 = 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 := sysvicall6(uintptr(unsafe.Pointer(&procMkdir)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0) 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 := sysvicall6(uintptr(unsafe.Pointer(&procMkdirat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0) 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 := sysvicall6(uintptr(unsafe.Pointer(&procMkfifo)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 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) 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 := sysvicall6(uintptr(unsafe.Pointer(&procMknod)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0, 0) 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 := sysvicall6(uintptr(unsafe.Pointer(&procMknodat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) 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 *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 = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mlockall(flags int) (err error) { _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMlockall)), 1, uintptr(flags), 0, 0, 0, 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 *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 = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Msync(b []byte, flags int) (err error) { var _p0 *byte if len(b) > 0 { _p0 = &b[0] } _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMsync)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(flags), 0, 0, 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 *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 = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Munlockall() (err error) { _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMunlockall)), 0, 0, 0, 0, 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 := sysvicall6(uintptr(unsafe.Pointer(&procNanosleep)), 2, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0, 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 := sysvicall6(uintptr(unsafe.Pointer(&procOpen)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 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 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) 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 := sysvicall6(uintptr(unsafe.Pointer(&procPathconf)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0, 0, 0, 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 Pause() (err error) { _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPause)), 0, 0, 0, 0, 0, 0, 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 *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 = 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 *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 = 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 *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 = 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 *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) 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 := sysvicall6(uintptr(unsafe.Pointer(&procRename)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0) 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 := sysvicall6(uintptr(unsafe.Pointer(&procRenameat)), 4, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) 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 := sysvicall6(uintptr(unsafe.Pointer(&procRmdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0) 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 := sysvicall6(uintptr(unsafe.Pointer(&proclseek)), 3, uintptr(fd), uintptr(offset), uintptr(whence), 0, 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(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSelect)), 5, 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 Setegid(egid int) (err error) { _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetegid)), 1, uintptr(egid), 0, 0, 0, 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 := rawSysvicall6(uintptr(unsafe.Pointer(&procSeteuid)), 1, uintptr(euid), 0, 0, 0, 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 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetgid)), 1, uintptr(gid), 0, 0, 0, 0, 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 *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 = 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 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetpgid)), 2, uintptr(pid), uintptr(pgid), 0, 0, 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 := sysvicall6(uintptr(unsafe.Pointer(&procSetpriority)), 3, uintptr(which), uintptr(who), uintptr(prio), 0, 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 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetregid)), 2, uintptr(rgid), uintptr(egid), 0, 0, 0, 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 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetreuid)), 2, uintptr(ruid), uintptr(euid), 0, 0, 0, 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 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetsid)), 0, 0, 0, 0, 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 Setuid(uid int) (err error) { _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetuid)), 1, uintptr(uid), 0, 0, 0, 0, 0) 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 := sysvicall6(uintptr(unsafe.Pointer(&procshutdown)), 2, uintptr(s), uintptr(how), 0, 0, 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 := sysvicall6(uintptr(unsafe.Pointer(&procStat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Statvfs(path string, vfsstat *Statvfs_t) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procStatvfs)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(vfsstat)), 0, 0, 0, 0) 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 := sysvicall6(uintptr(unsafe.Pointer(&procSymlink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0) 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 := sysvicall6(uintptr(unsafe.Pointer(&procSync)), 0, 0, 0, 0, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Sysconf(which int) (n int64, err error) { r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSysconf)), 1, uintptr(which), 0, 0, 0, 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 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 = 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 := sysvicall6(uintptr(unsafe.Pointer(&procTruncate)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0, 0, 0, 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 := sysvicall6(uintptr(unsafe.Pointer(&procFsync)), 1, uintptr(fd), 0, 0, 0, 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 := sysvicall6(uintptr(unsafe.Pointer(&procFtruncate)), 2, uintptr(fd), uintptr(length), 0, 0, 0, 0) 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, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procUmask)), 1, uintptr(mask), 0, 0, 0, 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 := rawSysvicall6(uintptr(unsafe.Pointer(&procUname)), 1, uintptr(unsafe.Pointer(buf)), 0, 0, 0, 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 := sysvicall6(uintptr(unsafe.Pointer(&procumount)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0, 0, 0) 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 := sysvicall6(uintptr(unsafe.Pointer(&procUnlink)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0) 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 := sysvicall6(uintptr(unsafe.Pointer(&procUnlinkat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 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 := sysvicall6(uintptr(unsafe.Pointer(&procUstat)), 2, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0, 0, 0, 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 := sysvicall6(uintptr(unsafe.Pointer(&procUtime)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0, 0, 0, 0) 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 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_bind)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0) 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 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_connect)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0) 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 := 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 = 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 := sysvicall6(uintptr(unsafe.Pointer(&procmunmap)), 2, uintptr(addr), uintptr(length), 0, 0, 0, 0) 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 := sysvicall6(uintptr(unsafe.Pointer(&procsendfile)), 4, 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 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(&proc__xnet_sendto)), 6, uintptr(s), uintptr(unsafe.Pointer(_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 socket(domain int, typ int, proto int) (fd int, err error) { r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_socket)), 3, uintptr(domain), uintptr(typ), uintptr(proto), 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 socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&proc__xnet_socketpair)), 4, 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 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 = 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 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_getsockopt)), 5, 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 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 = 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 := sysvicall6(uintptr(unsafe.Pointer(&procsetsockopt)), 5, 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 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 = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func port_create() (n int, err error) { r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_create)), 0, 0, 0, 0, 0, 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 port_associate(port int, source int, object uintptr, events int, user *byte) (n int, err error) { r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_associate)), 5, uintptr(port), uintptr(source), uintptr(object), uintptr(events), uintptr(unsafe.Pointer(user)), 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 port_dissociate(port int, source int, object uintptr) (n int, err error) { r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_dissociate)), 3, uintptr(port), uintptr(source), uintptr(object), 0, 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 port_get(port int, pe *portEvent, timeout *Timespec) (n int, err error) { r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_get)), 3, uintptr(port), uintptr(unsafe.Pointer(pe)), uintptr(unsafe.Pointer(timeout)), 0, 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 port_getn(port int, pe *portEvent, max uint32, nget *uint32, timeout *Timespec) (n int, err error) { r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procport_getn)), 5, uintptr(port), uintptr(unsafe.Pointer(pe)), uintptr(max), uintptr(unsafe.Pointer(nget)), 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 putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error) { _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procputmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), 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 getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error) { _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(unsafe.Pointer(flags)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go ================================================ // go run mksyscall_zos_s390x.go -o_sysnum zsysnum_zos_s390x.go -o_syscall zsyscall_zos_s390x.go -i_syscall syscall_zos_s390x.go -o_asm zsymaddr_zos_s390x.s // Code generated by the command above; see README.md. DO NOT EDIT. //go:build zos && s390x package unix import ( "runtime" "syscall" "unsafe" ) var _ syscall.Errno // 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) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCNTL<<4, uintptr(fd), uintptr(cmd), uintptr(arg)) runtime.ExitSyscall() val = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Flistxattr(fd int, dest []byte) (sz int, err error) { var _p0 unsafe.Pointer if len(dest) > 0 { _p0 = unsafe.Pointer(&dest[0]) } else { _p0 = unsafe.Pointer(&_zero) } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FLISTXATTR_A<<4, uintptr(fd), uintptr(_p0), uintptr(len(dest))) runtime.ExitSyscall() sz = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_FlistxattrAddr() *(func(fd int, dest []byte) (sz int, err error)) var Flistxattr = enter_Flistxattr func enter_Flistxattr(fd int, dest []byte) (sz int, err error) { funcref := get_FlistxattrAddr() if funcptrtest(GetZosLibVec()+SYS___FLISTXATTR_A<<4, "") == 0 { *funcref = impl_Flistxattr } else { *funcref = error_Flistxattr } return (*funcref)(fd, dest) } func error_Flistxattr(fd int, dest []byte) (sz int, err error) { sz = -1 err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Fremovexattr(fd int, attr string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(attr) if err != nil { return } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FREMOVEXATTR_A<<4, uintptr(fd), uintptr(unsafe.Pointer(_p0))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_FremovexattrAddr() *(func(fd int, attr string) (err error)) var Fremovexattr = enter_Fremovexattr func enter_Fremovexattr(fd int, attr string) (err error) { funcref := get_FremovexattrAddr() if funcptrtest(GetZosLibVec()+SYS___FREMOVEXATTR_A<<4, "") == 0 { *funcref = impl_Fremovexattr } else { *funcref = error_Fremovexattr } return (*funcref)(fd, attr) } func error_Fremovexattr(fd int, attr string) (err error) { err = ENOSYS 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) } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_READ<<4, uintptr(fd), uintptr(_p0), uintptr(len(p))) runtime.ExitSyscall() n = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } 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) } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_WRITE<<4, uintptr(fd), uintptr(_p0), uintptr(len(p))) runtime.ExitSyscall() n = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { var _p0 *byte _p0, err = BytePtrFromString(attr) if err != nil { return } var _p1 unsafe.Pointer if len(dest) > 0 { _p1 = unsafe.Pointer(&dest[0]) } else { _p1 = unsafe.Pointer(&_zero) } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FGETXATTR_A<<4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) runtime.ExitSyscall() sz = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_FgetxattrAddr() *(func(fd int, attr string, dest []byte) (sz int, err error)) var Fgetxattr = enter_Fgetxattr func enter_Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { funcref := get_FgetxattrAddr() if funcptrtest(GetZosLibVec()+SYS___FGETXATTR_A<<4, "") == 0 { *funcref = impl_Fgetxattr } else { *funcref = error_Fgetxattr } return (*funcref)(fd, attr, dest) } func error_Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { sz = -1 err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Fsetxattr(fd int, attr string, data []byte, flag int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(attr) if err != nil { return } var _p1 unsafe.Pointer if len(data) > 0 { _p1 = unsafe.Pointer(&data[0]) } else { _p1 = unsafe.Pointer(&_zero) } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FSETXATTR_A<<4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(data)), uintptr(flag)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_FsetxattrAddr() *(func(fd int, attr string, data []byte, flag int) (err error)) var Fsetxattr = enter_Fsetxattr func enter_Fsetxattr(fd int, attr string, data []byte, flag int) (err error) { funcref := get_FsetxattrAddr() if funcptrtest(GetZosLibVec()+SYS___FSETXATTR_A<<4, "") == 0 { *funcref = impl_Fsetxattr } else { *funcref = error_Fsetxattr } return (*funcref)(fd, attr, data, flag) } func error_Fsetxattr(fd int, attr string, data []byte, flag int) (err error) { err = ENOSYS 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) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___ACCEPT_A<<4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) runtime.ExitSyscall() fd = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___ACCEPT4_A<<4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags)) runtime.ExitSyscall() fd = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_accept4Addr() *(func(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)) var accept4 = enter_accept4 func enter_accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { funcref := get_accept4Addr() if funcptrtest(GetZosLibVec()+SYS___ACCEPT4_A<<4, "") == 0 { *funcref = impl_accept4 } else { *funcref = error_accept4 } return (*funcref)(s, rsa, addrlen, flags) } func error_accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { fd = -1 err = ENOSYS 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) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___BIND_A<<4, uintptr(s), uintptr(addr), uintptr(addrlen)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } 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) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CONNECT_A<<4, uintptr(s), uintptr(addr), uintptr(addrlen)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } 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, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETGROUPS<<4, uintptr(n), uintptr(unsafe.Pointer(list))) nn = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setgroups(n int, list *_Gid_t) (err error) { r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETGROUPS<<4, uintptr(n), uintptr(unsafe.Pointer(list))) if int64(r0) == -1 { err = errnoErr2(e1, e2) } 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) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETSOCKOPT<<4, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } 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) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETSOCKOPT<<4, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } 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, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SOCKET<<4, uintptr(domain), uintptr(typ), uintptr(proto)) fd = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } 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) { r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SOCKETPAIR<<4, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd))) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___GETPEERNAME_A<<4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___GETSOCKNAME_A<<4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_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 } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___REMOVEXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_RemovexattrAddr() *(func(path string, attr string) (err error)) var Removexattr = enter_Removexattr func enter_Removexattr(path string, attr string) (err error) { funcref := get_RemovexattrAddr() if funcptrtest(GetZosLibVec()+SYS___REMOVEXATTR_A<<4, "") == 0 { *funcref = impl_Removexattr } else { *funcref = error_Removexattr } return (*funcref)(path, attr) } func error_Removexattr(path string, attr string) (err error) { err = ENOSYS 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) } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___RECVFROM_A<<4, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) runtime.ExitSyscall() n = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } 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) } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___SENDTO_A<<4, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } 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) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___RECVMSG_A<<4, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) runtime.ExitSyscall() n = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } 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) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___SENDMSG_A<<4, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) runtime.ExitSyscall() n = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } 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) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_MMAP<<4, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) runtime.ExitSyscall() ret = uintptr(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func munmap(addr uintptr, length uintptr) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_MUNMAP<<4, uintptr(addr), uintptr(length)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctl(fd int, req int, arg uintptr) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_IOCTL<<4, uintptr(fd), uintptr(req), uintptr(arg)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_IOCTL<<4, uintptr(fd), uintptr(req), uintptr(arg)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SHMAT<<4, uintptr(id), uintptr(addr), uintptr(flag)) runtime.ExitSyscall() ret = uintptr(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SHMCTL64<<4, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf))) runtime.ExitSyscall() result = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func shmdt(addr uintptr) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SHMDT<<4, uintptr(addr)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func shmget(key int, size int, flag int) (id int, err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SHMGET<<4, uintptr(key), uintptr(size), uintptr(flag)) runtime.ExitSyscall() id = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } 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 } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___ACCESS_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } 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 } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CHDIR_A<<4, uintptr(unsafe.Pointer(_p0))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } 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 } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CHOWN_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } 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 } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CHMOD_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Creat(path string, mode uint32) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CREAT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode)) runtime.ExitSyscall() fd = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup(oldfd int) (fd int, err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_DUP<<4, uintptr(oldfd)) runtime.ExitSyscall() fd = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup2(oldfd int, newfd int) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_DUP2<<4, uintptr(oldfd), uintptr(newfd)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Dup3(oldfd int, newfd int, flags int) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_DUP3<<4, uintptr(oldfd), uintptr(newfd), uintptr(flags)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_Dup3Addr() *(func(oldfd int, newfd int, flags int) (err error)) var Dup3 = enter_Dup3 func enter_Dup3(oldfd int, newfd int, flags int) (err error) { funcref := get_Dup3Addr() if funcptrtest(GetZosLibVec()+SYS_DUP3<<4, "") == 0 { *funcref = impl_Dup3 } else { *funcref = error_Dup3 } return (*funcref)(oldfd, newfd, flags) } func error_Dup3(oldfd int, newfd int, flags int) (err error) { err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Dirfd(dirp uintptr) (fd int, err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_DIRFD<<4, uintptr(dirp)) runtime.ExitSyscall() fd = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_DirfdAddr() *(func(dirp uintptr) (fd int, err error)) var Dirfd = enter_Dirfd func enter_Dirfd(dirp uintptr) (fd int, err error) { funcref := get_DirfdAddr() if funcptrtest(GetZosLibVec()+SYS_DIRFD<<4, "") == 0 { *funcref = impl_Dirfd } else { *funcref = error_Dirfd } return (*funcref)(dirp) } func error_Dirfd(dirp uintptr) (fd int, err error) { fd = -1 err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_EpollCreate(size int) (fd int, err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_EPOLL_CREATE<<4, uintptr(size)) runtime.ExitSyscall() fd = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_EpollCreateAddr() *(func(size int) (fd int, err error)) var EpollCreate = enter_EpollCreate func enter_EpollCreate(size int) (fd int, err error) { funcref := get_EpollCreateAddr() if funcptrtest(GetZosLibVec()+SYS_EPOLL_CREATE<<4, "") == 0 { *funcref = impl_EpollCreate } else { *funcref = error_EpollCreate } return (*funcref)(size) } func error_EpollCreate(size int) (fd int, err error) { fd = -1 err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_EpollCreate1(flags int) (fd int, err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_EPOLL_CREATE1<<4, uintptr(flags)) runtime.ExitSyscall() fd = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_EpollCreate1Addr() *(func(flags int) (fd int, err error)) var EpollCreate1 = enter_EpollCreate1 func enter_EpollCreate1(flags int) (fd int, err error) { funcref := get_EpollCreate1Addr() if funcptrtest(GetZosLibVec()+SYS_EPOLL_CREATE1<<4, "") == 0 { *funcref = impl_EpollCreate1 } else { *funcref = error_EpollCreate1 } return (*funcref)(flags) } func error_EpollCreate1(flags int) (fd int, err error) { fd = -1 err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_EPOLL_CTL<<4, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_EpollCtlAddr() *(func(epfd int, op int, fd int, event *EpollEvent) (err error)) var EpollCtl = enter_EpollCtl func enter_EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { funcref := get_EpollCtlAddr() if funcptrtest(GetZosLibVec()+SYS_EPOLL_CTL<<4, "") == 0 { *funcref = impl_EpollCtl } else { *funcref = error_EpollCtl } return (*funcref)(epfd, op, fd, event) } func error_EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_EpollPwait(epfd int, events []EpollEvent, msec int, sigmask *int) (n int, err error) { var _p0 unsafe.Pointer if len(events) > 0 { _p0 = unsafe.Pointer(&events[0]) } else { _p0 = unsafe.Pointer(&_zero) } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_EPOLL_PWAIT<<4, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), uintptr(unsafe.Pointer(sigmask))) runtime.ExitSyscall() n = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_EpollPwaitAddr() *(func(epfd int, events []EpollEvent, msec int, sigmask *int) (n int, err error)) var EpollPwait = enter_EpollPwait func enter_EpollPwait(epfd int, events []EpollEvent, msec int, sigmask *int) (n int, err error) { funcref := get_EpollPwaitAddr() if funcptrtest(GetZosLibVec()+SYS_EPOLL_PWAIT<<4, "") == 0 { *funcref = impl_EpollPwait } else { *funcref = error_EpollPwait } return (*funcref)(epfd, events, msec, sigmask) } func error_EpollPwait(epfd int, events []EpollEvent, msec int, sigmask *int) (n int, err error) { n = -1 err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_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) } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_EPOLL_WAIT<<4, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec)) runtime.ExitSyscall() n = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_EpollWaitAddr() *(func(epfd int, events []EpollEvent, msec int) (n int, err error)) var EpollWait = enter_EpollWait func enter_EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { funcref := get_EpollWaitAddr() if funcptrtest(GetZosLibVec()+SYS_EPOLL_WAIT<<4, "") == 0 { *funcref = impl_EpollWait } else { *funcref = error_EpollWait } return (*funcref)(epfd, events, msec) } func error_EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { n = -1 err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Errno2() (er2 int) { runtime.EnterSyscall() r0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS___ERRNO2<<4) runtime.ExitSyscall() er2 = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Eventfd(initval uint, flags int) (fd int, err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_EVENTFD<<4, uintptr(initval), uintptr(flags)) runtime.ExitSyscall() fd = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_EventfdAddr() *(func(initval uint, flags int) (fd int, err error)) var Eventfd = enter_Eventfd func enter_Eventfd(initval uint, flags int) (fd int, err error) { funcref := get_EventfdAddr() if funcptrtest(GetZosLibVec()+SYS_EVENTFD<<4, "") == 0 { *funcref = impl_Eventfd } else { *funcref = error_Eventfd } return (*funcref)(initval, flags) } func error_Eventfd(initval uint, flags int) (fd int, err error) { fd = -1 err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { runtime.EnterSyscall() CallLeFuncWithErr(GetZosLibVec()+SYS_EXIT<<4, uintptr(code)) runtime.ExitSyscall() return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FACCESSAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_FaccessatAddr() *(func(dirfd int, path string, mode uint32, flags int) (err error)) var Faccessat = enter_Faccessat func enter_Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { funcref := get_FaccessatAddr() if funcptrtest(GetZosLibVec()+SYS___FACCESSAT_A<<4, "") == 0 { *funcref = impl_Faccessat } else { *funcref = error_Faccessat } return (*funcref)(dirfd, path, mode, flags) } func error_Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchdir(fd int) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCHDIR<<4, uintptr(fd)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchmod(fd int, mode uint32) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCHMOD<<4, uintptr(fd), uintptr(mode)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FCHMODAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_FchmodatAddr() *(func(dirfd int, path string, mode uint32, flags int) (err error)) var Fchmodat = enter_Fchmodat func enter_Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { funcref := get_FchmodatAddr() if funcptrtest(GetZosLibVec()+SYS___FCHMODAT_A<<4, "") == 0 { *funcref = impl_Fchmodat } else { *funcref = error_Fchmodat } return (*funcref)(dirfd, path, mode, flags) } func error_Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchown(fd int, uid int, gid int) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCHOWN<<4, uintptr(fd), uintptr(uid), uintptr(gid)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Fchownat(fd int, path string, uid int, gid int, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FCHOWNAT_A<<4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_FchownatAddr() *(func(fd int, path string, uid int, gid int, flags int) (err error)) var Fchownat = enter_Fchownat func enter_Fchownat(fd int, path string, uid int, gid int, flags int) (err error) { funcref := get_FchownatAddr() if funcptrtest(GetZosLibVec()+SYS___FCHOWNAT_A<<4, "") == 0 { *funcref = impl_Fchownat } else { *funcref = error_Fchownat } return (*funcref)(fd, path, uid, gid, flags) } func error_Fchownat(fd int, path string, uid int, gid int, flags int) (err error) { err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func FcntlInt(fd uintptr, cmd int, arg int) (retval int, err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FCNTL<<4, uintptr(fd), uintptr(cmd), uintptr(arg)) runtime.ExitSyscall() retval = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Fdatasync(fd int) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FDATASYNC<<4, uintptr(fd)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_FdatasyncAddr() *(func(fd int) (err error)) var Fdatasync = enter_Fdatasync func enter_Fdatasync(fd int) (err error) { funcref := get_FdatasyncAddr() if funcptrtest(GetZosLibVec()+SYS_FDATASYNC<<4, "") == 0 { *funcref = impl_Fdatasync } else { *funcref = error_Fdatasync } return (*funcref)(fd) } func error_Fdatasync(fd int) (err error) { err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fstat(fd int, stat *Stat_LE_t) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FSTAT<<4, uintptr(fd), uintptr(unsafe.Pointer(stat))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_fstatat(dirfd int, path string, stat *Stat_LE_t, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FSTATAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_fstatatAddr() *(func(dirfd int, path string, stat *Stat_LE_t, flags int) (err error)) var fstatat = enter_fstatat func enter_fstatat(dirfd int, path string, stat *Stat_LE_t, flags int) (err error) { funcref := get_fstatatAddr() if funcptrtest(GetZosLibVec()+SYS___FSTATAT_A<<4, "") == 0 { *funcref = impl_fstatat } else { *funcref = error_fstatat } return (*funcref)(dirfd, path, stat, flags) } func error_fstatat(dirfd int, path string, stat *Stat_LE_t, flags int) (err error) { err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Lgetxattr(link string, attr string, dest []byte) (sz int, err error) { var _p0 *byte _p0, err = BytePtrFromString(link) 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) } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LGETXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest))) runtime.ExitSyscall() sz = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_LgetxattrAddr() *(func(link string, attr string, dest []byte) (sz int, err error)) var Lgetxattr = enter_Lgetxattr func enter_Lgetxattr(link string, attr string, dest []byte) (sz int, err error) { funcref := get_LgetxattrAddr() if funcptrtest(GetZosLibVec()+SYS___LGETXATTR_A<<4, "") == 0 { *funcref = impl_Lgetxattr } else { *funcref = error_Lgetxattr } return (*funcref)(link, attr, dest) } func error_Lgetxattr(link string, attr string, dest []byte) (sz int, err error) { sz = -1 err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Lsetxattr(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) } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LSETXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_LsetxattrAddr() *(func(path string, attr string, data []byte, flags int) (err error)) var Lsetxattr = enter_Lsetxattr func enter_Lsetxattr(path string, attr string, data []byte, flags int) (err error) { funcref := get_LsetxattrAddr() if funcptrtest(GetZosLibVec()+SYS___LSETXATTR_A<<4, "") == 0 { *funcref = impl_Lsetxattr } else { *funcref = error_Lsetxattr } return (*funcref)(path, attr, data, flags) } func error_Lsetxattr(path string, attr string, data []byte, flags int) (err error) { err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Fstatfs(fd int, buf *Statfs_t) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FSTATFS<<4, uintptr(fd), uintptr(unsafe.Pointer(buf))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_FstatfsAddr() *(func(fd int, buf *Statfs_t) (err error)) var Fstatfs = enter_Fstatfs func enter_Fstatfs(fd int, buf *Statfs_t) (err error) { funcref := get_FstatfsAddr() if funcptrtest(GetZosLibVec()+SYS_FSTATFS<<4, "") == 0 { *funcref = impl_Fstatfs } else { *funcref = error_Fstatfs } return (*funcref)(fd, buf) } func error_Fstatfs(fd int, buf *Statfs_t) (err error) { err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstatvfs(fd int, stat *Statvfs_t) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FSTATVFS<<4, uintptr(fd), uintptr(unsafe.Pointer(stat))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fsync(fd int) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FSYNC<<4, uintptr(fd)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Futimes(fd int, tv []Timeval) (err error) { var _p0 unsafe.Pointer if len(tv) > 0 { _p0 = unsafe.Pointer(&tv[0]) } else { _p0 = unsafe.Pointer(&_zero) } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FUTIMES<<4, uintptr(fd), uintptr(_p0), uintptr(len(tv))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_FutimesAddr() *(func(fd int, tv []Timeval) (err error)) var Futimes = enter_Futimes func enter_Futimes(fd int, tv []Timeval) (err error) { funcref := get_FutimesAddr() if funcptrtest(GetZosLibVec()+SYS_FUTIMES<<4, "") == 0 { *funcref = impl_Futimes } else { *funcref = error_Futimes } return (*funcref)(fd, tv) } func error_Futimes(fd int, tv []Timeval) (err error) { err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Futimesat(dirfd int, path string, tv []Timeval) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } var _p1 unsafe.Pointer if len(tv) > 0 { _p1 = unsafe.Pointer(&tv[0]) } else { _p1 = unsafe.Pointer(&_zero) } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___FUTIMESAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(tv))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_FutimesatAddr() *(func(dirfd int, path string, tv []Timeval) (err error)) var Futimesat = enter_Futimesat func enter_Futimesat(dirfd int, path string, tv []Timeval) (err error) { funcref := get_FutimesatAddr() if funcptrtest(GetZosLibVec()+SYS___FUTIMESAT_A<<4, "") == 0 { *funcref = impl_Futimesat } else { *funcref = error_Futimesat } return (*funcref)(dirfd, path, tv) } func error_Futimesat(dirfd int, path string, tv []Timeval) (err error) { err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Ftruncate(fd int, length int64) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_FTRUNCATE<<4, uintptr(fd), uintptr(length)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Getrandom(buf []byte, flags int) (n int, err error) { var _p0 unsafe.Pointer if len(buf) > 0 { _p0 = unsafe.Pointer(&buf[0]) } else { _p0 = unsafe.Pointer(&_zero) } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETRANDOM<<4, uintptr(_p0), uintptr(len(buf)), uintptr(flags)) runtime.ExitSyscall() n = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_GetrandomAddr() *(func(buf []byte, flags int) (n int, err error)) var Getrandom = enter_Getrandom func enter_Getrandom(buf []byte, flags int) (n int, err error) { funcref := get_GetrandomAddr() if funcptrtest(GetZosLibVec()+SYS_GETRANDOM<<4, "") == 0 { *funcref = impl_Getrandom } else { *funcref = error_Getrandom } return (*funcref)(buf, flags) } func error_Getrandom(buf []byte, flags int) (n int, err error) { n = -1 err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_InotifyInit() (fd int, err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec() + SYS_INOTIFY_INIT<<4) runtime.ExitSyscall() fd = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_InotifyInitAddr() *(func() (fd int, err error)) var InotifyInit = enter_InotifyInit func enter_InotifyInit() (fd int, err error) { funcref := get_InotifyInitAddr() if funcptrtest(GetZosLibVec()+SYS_INOTIFY_INIT<<4, "") == 0 { *funcref = impl_InotifyInit } else { *funcref = error_InotifyInit } return (*funcref)() } func error_InotifyInit() (fd int, err error) { fd = -1 err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_InotifyInit1(flags int) (fd int, err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_INOTIFY_INIT1<<4, uintptr(flags)) runtime.ExitSyscall() fd = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_InotifyInit1Addr() *(func(flags int) (fd int, err error)) var InotifyInit1 = enter_InotifyInit1 func enter_InotifyInit1(flags int) (fd int, err error) { funcref := get_InotifyInit1Addr() if funcptrtest(GetZosLibVec()+SYS_INOTIFY_INIT1<<4, "") == 0 { *funcref = impl_InotifyInit1 } else { *funcref = error_InotifyInit1 } return (*funcref)(flags) } func error_InotifyInit1(flags int) (fd int, err error) { fd = -1 err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { var _p0 *byte _p0, err = BytePtrFromString(pathname) if err != nil { return } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___INOTIFY_ADD_WATCH_A<<4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) runtime.ExitSyscall() watchdesc = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_InotifyAddWatchAddr() *(func(fd int, pathname string, mask uint32) (watchdesc int, err error)) var InotifyAddWatch = enter_InotifyAddWatch func enter_InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { funcref := get_InotifyAddWatchAddr() if funcptrtest(GetZosLibVec()+SYS___INOTIFY_ADD_WATCH_A<<4, "") == 0 { *funcref = impl_InotifyAddWatch } else { *funcref = error_InotifyAddWatch } return (*funcref)(fd, pathname, mask) } func error_InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { watchdesc = -1 err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_INOTIFY_RM_WATCH<<4, uintptr(fd), uintptr(watchdesc)) runtime.ExitSyscall() success = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_InotifyRmWatchAddr() *(func(fd int, watchdesc uint32) (success int, err error)) var InotifyRmWatch = enter_InotifyRmWatch func enter_InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { funcref := get_InotifyRmWatchAddr() if funcptrtest(GetZosLibVec()+SYS_INOTIFY_RM_WATCH<<4, "") == 0 { *funcref = impl_InotifyRmWatch } else { *funcref = error_InotifyRmWatch } return (*funcref)(fd, watchdesc) } func error_InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { success = -1 err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_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) } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LISTXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) runtime.ExitSyscall() sz = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_ListxattrAddr() *(func(path string, dest []byte) (sz int, err error)) var Listxattr = enter_Listxattr func enter_Listxattr(path string, dest []byte) (sz int, err error) { funcref := get_ListxattrAddr() if funcptrtest(GetZosLibVec()+SYS___LISTXATTR_A<<4, "") == 0 { *funcref = impl_Listxattr } else { *funcref = error_Listxattr } return (*funcref)(path, dest) } func error_Listxattr(path string, dest []byte) (sz int, err error) { sz = -1 err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Llistxattr(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) } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LLISTXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) runtime.ExitSyscall() sz = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_LlistxattrAddr() *(func(path string, dest []byte) (sz int, err error)) var Llistxattr = enter_Llistxattr func enter_Llistxattr(path string, dest []byte) (sz int, err error) { funcref := get_LlistxattrAddr() if funcptrtest(GetZosLibVec()+SYS___LLISTXATTR_A<<4, "") == 0 { *funcref = impl_Llistxattr } else { *funcref = error_Llistxattr } return (*funcref)(path, dest) } func error_Llistxattr(path string, dest []byte) (sz int, err error) { sz = -1 err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Lremovexattr(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 } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LREMOVEXATTR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_LremovexattrAddr() *(func(path string, attr string) (err error)) var Lremovexattr = enter_Lremovexattr func enter_Lremovexattr(path string, attr string) (err error) { funcref := get_LremovexattrAddr() if funcptrtest(GetZosLibVec()+SYS___LREMOVEXATTR_A<<4, "") == 0 { *funcref = impl_Lremovexattr } else { *funcref = error_Lremovexattr } return (*funcref)(path, attr) } func error_Lremovexattr(path string, attr string) (err error) { err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Lutimes(path string, tv []Timeval) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } var _p1 unsafe.Pointer if len(tv) > 0 { _p1 = unsafe.Pointer(&tv[0]) } else { _p1 = unsafe.Pointer(&_zero) } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LUTIMES_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(tv))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_LutimesAddr() *(func(path string, tv []Timeval) (err error)) var Lutimes = enter_Lutimes func enter_Lutimes(path string, tv []Timeval) (err error) { funcref := get_LutimesAddr() if funcptrtest(GetZosLibVec()+SYS___LUTIMES_A<<4, "") == 0 { *funcref = impl_Lutimes } else { *funcref = error_Lutimes } return (*funcref)(path, tv) } func error_Lutimes(path string, tv []Timeval) (err error) { err = ENOSYS 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) } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_MPROTECT<<4, uintptr(_p0), uintptr(len(b)), uintptr(prot)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Msync(b []byte, flags int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_MSYNC<<4, uintptr(_p0), uintptr(len(b)), uintptr(flags)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Console2(cmsg *ConsMsg2, modstr *byte, concmd *uint32) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CONSOLE2<<4, uintptr(unsafe.Pointer(cmsg)), uintptr(unsafe.Pointer(modstr)), uintptr(unsafe.Pointer(concmd))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Poll(fds []PollFd, timeout int) (n int, err error) { var _p0 unsafe.Pointer if len(fds) > 0 { _p0 = unsafe.Pointer(&fds[0]) } else { _p0 = unsafe.Pointer(&_zero) } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_POLL<<4, uintptr(_p0), uintptr(len(fds)), uintptr(timeout)) runtime.ExitSyscall() n = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Readdir_r(dirp uintptr, entry *direntLE, result **direntLE) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___READDIR_R_A<<4, uintptr(dirp), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Statfs(path string, buf *Statfs_t) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___STATFS_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_StatfsAddr() *(func(path string, buf *Statfs_t) (err error)) var Statfs = enter_Statfs func enter_Statfs(path string, buf *Statfs_t) (err error) { funcref := get_StatfsAddr() if funcptrtest(GetZosLibVec()+SYS___STATFS_A<<4, "") == 0 { *funcref = impl_Statfs } else { *funcref = error_Statfs } return (*funcref)(path, buf) } func error_Statfs(path string, buf *Statfs_t) (err error) { err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Syncfs(fd int) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SYNCFS<<4, uintptr(fd)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_SyncfsAddr() *(func(fd int) (err error)) var Syncfs = enter_Syncfs func enter_Syncfs(fd int) (err error) { funcref := get_SyncfsAddr() if funcptrtest(GetZosLibVec()+SYS_SYNCFS<<4, "") == 0 { *funcref = impl_Syncfs } else { *funcref = error_Syncfs } return (*funcref)(fd) } func error_Syncfs(fd int) (err error) { err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Times(tms *Tms) (ticks uintptr, err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_TIMES<<4, uintptr(unsafe.Pointer(tms))) runtime.ExitSyscall() ticks = uintptr(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func W_Getmntent(buff *byte, size int) (lastsys int, err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_W_GETMNTENT<<4, uintptr(unsafe.Pointer(buff)), uintptr(size)) runtime.ExitSyscall() lastsys = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func W_Getmntent_A(buff *byte, size int) (lastsys int, err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___W_GETMNTENT_A<<4, uintptr(unsafe.Pointer(buff)), uintptr(size)) runtime.ExitSyscall() lastsys = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func mount_LE(path string, filesystem string, fstype string, mtm uint32, parmlen int32, parm string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(filesystem) if err != nil { return } var _p2 *byte _p2, err = BytePtrFromString(fstype) if err != nil { return } var _p3 *byte _p3, err = BytePtrFromString(parm) if err != nil { return } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MOUNT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(mtm), uintptr(parmlen), uintptr(unsafe.Pointer(_p3))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func unmount_LE(filesystem string, mtm int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(filesystem) if err != nil { return } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UMOUNT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mtm)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } 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 } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___CHROOT_A<<4, uintptr(unsafe.Pointer(_p0))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Select(nmsgsfds int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (ret int, err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SELECT<<4, uintptr(nmsgsfds), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout))) runtime.ExitSyscall() ret = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Uname(buf *Utsname) (err error) { r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_____OSNAME_A<<4, uintptr(unsafe.Pointer(buf))) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Unshare(flags int) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_UNSHARE<<4, uintptr(flags)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_UnshareAddr() *(func(flags int) (err error)) var Unshare = enter_Unshare func enter_Unshare(flags int) (err error) { funcref := get_UnshareAddr() if funcptrtest(GetZosLibVec()+SYS_UNSHARE<<4, "") == 0 { *funcref = impl_Unshare } else { *funcref = error_Unshare } return (*funcref)(flags) } func error_Unshare(flags int) (err error) { err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Gethostname(buf []byte) (err error) { var _p0 unsafe.Pointer if len(buf) > 0 { _p0 = unsafe.Pointer(&buf[0]) } else { _p0 = unsafe.Pointer(&_zero) } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___GETHOSTNAME_A<<4, uintptr(_p0), uintptr(len(buf))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { r0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS_GETGID<<4) gid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { r0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS_GETPID<<4) pid = 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, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETPGID<<4, uintptr(pid)) pgid = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (pid int) { r0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS_GETPPID<<4) pid = 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) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETPRIORITY<<4, uintptr(which), uintptr(who)) runtime.ExitSyscall() prio = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrlimit(resource int, rlim *Rlimit) (err error) { r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETRLIMIT<<4, uintptr(resource), uintptr(unsafe.Pointer(rlim))) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getrusage(who int, rusage *rusage_zos) (err error) { r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETRUSAGE<<4, uintptr(who), uintptr(unsafe.Pointer(rusage))) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { runtime.EnterSyscall() r0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS_GETEGID<<4) runtime.ExitSyscall() egid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (euid int) { runtime.EnterSyscall() r0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS_GETEUID<<4) runtime.ExitSyscall() euid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getsid(pid int) (sid int, err error) { r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETSID<<4, uintptr(pid)) sid = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { r0, _, _ := CallLeFuncWithErr(GetZosLibVec() + SYS_GETUID<<4) uid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Kill(pid int, sig Signal) (err error) { r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_KILL<<4, uintptr(pid), uintptr(sig)) if int64(r0) == -1 { err = errnoErr2(e1, e2) } 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 } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LCHOWN_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } 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 } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LINK_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_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 } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LINKAT_A<<4, uintptr(oldDirFd), uintptr(unsafe.Pointer(_p0)), uintptr(newDirFd), uintptr(unsafe.Pointer(_p1)), uintptr(flags)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_LinkatAddr() *(func(oldDirFd int, oldPath string, newDirFd int, newPath string, flags int) (err error)) var Linkat = enter_Linkat func enter_Linkat(oldDirFd int, oldPath string, newDirFd int, newPath string, flags int) (err error) { funcref := get_LinkatAddr() if funcptrtest(GetZosLibVec()+SYS___LINKAT_A<<4, "") == 0 { *funcref = impl_Linkat } else { *funcref = error_Linkat } return (*funcref)(oldDirFd, oldPath, newDirFd, newPath, flags) } func error_Linkat(oldDirFd int, oldPath string, newDirFd int, newPath string, flags int) (err error) { err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Listen(s int, n int) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_LISTEN<<4, uintptr(s), uintptr(n)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func lstat(path string, stat *Stat_LE_t) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___LSTAT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } 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 } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MKDIR_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Mkdirat(dirfd int, path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MKDIRAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_MkdiratAddr() *(func(dirfd int, path string, mode uint32) (err error)) var Mkdirat = enter_Mkdirat func enter_Mkdirat(dirfd int, path string, mode uint32) (err error) { funcref := get_MkdiratAddr() if funcptrtest(GetZosLibVec()+SYS___MKDIRAT_A<<4, "") == 0 { *funcref = impl_Mkdirat } else { *funcref = error_Mkdirat } return (*funcref)(dirfd, path, mode) } func error_Mkdirat(dirfd int, path string, mode uint32) (err error) { err = ENOSYS 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 } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MKFIFO_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } 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 } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MKNOD_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___MKNODAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_MknodatAddr() *(func(dirfd int, path string, mode uint32, dev int) (err error)) var Mknodat = enter_Mknodat func enter_Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { funcref := get_MknodatAddr() if funcptrtest(GetZosLibVec()+SYS___MKNODAT_A<<4, "") == 0 { *funcref = impl_Mknodat } else { *funcref = error_Mknodat } return (*funcref)(dirfd, path, mode, dev) } func error_Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_PivotRoot(newroot string, oldroot string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(newroot) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(oldroot) if err != nil { return } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___PIVOT_ROOT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_PivotRootAddr() *(func(newroot string, oldroot string) (err error)) var PivotRoot = enter_PivotRoot func enter_PivotRoot(newroot string, oldroot string) (err error) { funcref := get_PivotRootAddr() if funcptrtest(GetZosLibVec()+SYS___PIVOT_ROOT_A<<4, "") == 0 { *funcref = impl_PivotRoot } else { *funcref = error_PivotRoot } return (*funcref)(newroot, oldroot) } func error_PivotRoot(newroot string, oldroot string) (err error) { err = ENOSYS 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) } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_PREAD<<4, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset)) runtime.ExitSyscall() n = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } 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) } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_PWRITE<<4, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset)) runtime.ExitSyscall() n = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___PRCTL_A<<4, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_PrctlAddr() *(func(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)) var Prctl = enter_Prctl func enter_Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { funcref := get_PrctlAddr() if funcptrtest(GetZosLibVec()+SYS___PRCTL_A<<4, "") == 0 { *funcref = impl_Prctl } else { *funcref = error_Prctl } return (*funcref)(option, arg2, arg3, arg4, arg5) } func error_Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_PRLIMIT<<4, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old))) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_PrlimitAddr() *(func(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error)) var Prlimit = enter_Prlimit func enter_Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { funcref := get_PrlimitAddr() if funcptrtest(GetZosLibVec()+SYS_PRLIMIT<<4, "") == 0 { *funcref = impl_Prlimit } else { *funcref = error_Prlimit } return (*funcref)(pid, resource, newlimit, old) } func error_Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { err = ENOSYS 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 } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___RENAME_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_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 } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___RENAMEAT_A<<4, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_RenameatAddr() *(func(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)) var Renameat = enter_Renameat func enter_Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { funcref := get_RenameatAddr() if funcptrtest(GetZosLibVec()+SYS___RENAMEAT_A<<4, "") == 0 { *funcref = impl_Renameat } else { *funcref = error_Renameat } return (*funcref)(olddirfd, oldpath, newdirfd, newpath) } func error_Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { var _p0 *byte _p0, err = BytePtrFromString(oldpath) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(newpath) if err != nil { return } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___RENAMEAT2_A<<4, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_Renameat2Addr() *(func(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error)) var Renameat2 = enter_Renameat2 func enter_Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { funcref := get_Renameat2Addr() if funcptrtest(GetZosLibVec()+SYS___RENAMEAT2_A<<4, "") == 0 { *funcref = impl_Renameat2 } else { *funcref = error_Renameat2 } return (*funcref)(olddirfd, oldpath, newdirfd, newpath, flags) } func error_Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { err = ENOSYS 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 } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___RMDIR_A<<4, uintptr(unsafe.Pointer(_p0))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } 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) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_LSEEK<<4, uintptr(fd), uintptr(offset), uintptr(whence)) runtime.ExitSyscall() off = int64(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setegid(egid int) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETEGID<<4, uintptr(egid)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Seteuid(euid int) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETEUID<<4, uintptr(euid)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Sethostname(p []byte) (err error) { var _p0 unsafe.Pointer if len(p) > 0 { _p0 = unsafe.Pointer(&p[0]) } else { _p0 = unsafe.Pointer(&_zero) } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___SETHOSTNAME_A<<4, uintptr(_p0), uintptr(len(p))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_SethostnameAddr() *(func(p []byte) (err error)) var Sethostname = enter_Sethostname func enter_Sethostname(p []byte) (err error) { funcref := get_SethostnameAddr() if funcptrtest(GetZosLibVec()+SYS___SETHOSTNAME_A<<4, "") == 0 { *funcref = impl_Sethostname } else { *funcref = error_Sethostname } return (*funcref)(p) } func error_Sethostname(p []byte) (err error) { err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Setns(fd int, nstype int) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETNS<<4, uintptr(fd), uintptr(nstype)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_SetnsAddr() *(func(fd int, nstype int) (err error)) var Setns = enter_Setns func enter_Setns(fd int, nstype int) (err error) { funcref := get_SetnsAddr() if funcptrtest(GetZosLibVec()+SYS_SETNS<<4, "") == 0 { *funcref = impl_Setns } else { *funcref = error_Setns } return (*funcref)(fd, nstype) } func error_Setns(fd int, nstype int) (err error) { err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setpriority(which int, who int, prio int) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETPRIORITY<<4, uintptr(which), uintptr(who), uintptr(prio)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setpgid(pid int, pgid int) (err error) { r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETPGID<<4, uintptr(pid), uintptr(pgid)) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setrlimit(resource int, lim *Rlimit) (err error) { r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETRLIMIT<<4, uintptr(resource), uintptr(unsafe.Pointer(lim))) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setregid(rgid int, egid int) (err error) { r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETREGID<<4, uintptr(rgid), uintptr(egid)) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setreuid(ruid int, euid int) (err error) { r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETREUID<<4, uintptr(ruid), uintptr(euid)) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setsid() (pid int, err error) { r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec() + SYS_SETSID<<4) pid = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setuid(uid int) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETUID<<4, uintptr(uid)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setgid(uid int) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SETGID<<4, uintptr(uid)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Shutdown(fd int, how int) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_SHUTDOWN<<4, uintptr(fd), uintptr(how)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func stat(path string, statLE *Stat_LE_t) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___STAT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(statLE))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } 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 } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___SYMLINK_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Symlinkat(oldPath string, dirfd 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 } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___SYMLINKAT_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(dirfd), uintptr(unsafe.Pointer(_p1))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_SymlinkatAddr() *(func(oldPath string, dirfd int, newPath string) (err error)) var Symlinkat = enter_Symlinkat func enter_Symlinkat(oldPath string, dirfd int, newPath string) (err error) { funcref := get_SymlinkatAddr() if funcptrtest(GetZosLibVec()+SYS___SYMLINKAT_A<<4, "") == 0 { *funcref = impl_Symlinkat } else { *funcref = error_Symlinkat } return (*funcref)(oldPath, dirfd, newPath) } func error_Symlinkat(oldPath string, dirfd int, newPath string) (err error) { err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Sync() { runtime.EnterSyscall() CallLeFuncWithErr(GetZosLibVec() + SYS_SYNC<<4) runtime.ExitSyscall() 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 } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___TRUNCATE_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(length)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Tcgetattr(fildes int, termptr *Termios) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_TCGETATTR<<4, uintptr(fildes), uintptr(unsafe.Pointer(termptr))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Tcsetattr(fildes int, when int, termptr *Termios) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_TCSETATTR<<4, uintptr(fildes), uintptr(when), uintptr(unsafe.Pointer(termptr))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(mask int) (oldmask int) { runtime.EnterSyscall() r0, _, _ := CallLeFuncWithErr(GetZosLibVec()+SYS_UMASK<<4, uintptr(mask)) runtime.ExitSyscall() 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 } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UNLINK_A<<4, uintptr(unsafe.Pointer(_p0))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_Unlinkat(dirfd int, path string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UNLINKAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_UnlinkatAddr() *(func(dirfd int, path string, flags int) (err error)) var Unlinkat = enter_Unlinkat func enter_Unlinkat(dirfd int, path string, flags int) (err error) { funcref := get_UnlinkatAddr() if funcptrtest(GetZosLibVec()+SYS___UNLINKAT_A<<4, "") == 0 { *funcref = impl_Unlinkat } else { *funcref = error_Unlinkat } return (*funcref)(dirfd, path, flags) } func error_Unlinkat(dirfd int, path string, flags int) (err error) { err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Utime(path string, utim *Utimbuf) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UTIME_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(utim))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } 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 } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___OPEN_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) runtime.ExitSyscall() fd = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___OPENAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode)) runtime.ExitSyscall() fd = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_openatAddr() *(func(dirfd int, path string, flags int, mode uint32) (fd int, err error)) var openat = enter_openat func enter_openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { funcref := get_openatAddr() if funcptrtest(GetZosLibVec()+SYS___OPENAT_A<<4, "") == 0 { *funcref = impl_openat } else { *funcref = error_openat } return (*funcref)(dirfd, path, flags, mode) } func error_openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { fd = -1 err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___OPENAT2_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(open_how)), uintptr(size)) runtime.ExitSyscall() fd = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_openat2Addr() *(func(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error)) var openat2 = enter_openat2 func enter_openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error) { funcref := get_openat2Addr() if funcptrtest(GetZosLibVec()+SYS___OPENAT2_A<<4, "") == 0 { *funcref = impl_openat2 } else { *funcref = error_openat2 } return (*funcref)(dirfd, path, open_how, size) } func error_openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err error) { fd = -1 err = ENOSYS 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 } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_REMOVE<<4, uintptr(unsafe.Pointer(_p0))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func waitid(idType int, id int, info *Siginfo, options int) (err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_WAITID<<4, uintptr(idType), uintptr(id), uintptr(unsafe.Pointer(info)), uintptr(options)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func waitpid(pid int, wstatus *_C_int, options int) (wpid int, err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_WAITPID<<4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options)) runtime.ExitSyscall() wpid = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func gettimeofday(tv *timeval_zos) (err error) { r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GETTIMEOFDAY<<4, uintptr(unsafe.Pointer(tv))) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pipe(p *[2]_C_int) (err error) { r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_PIPE<<4, uintptr(unsafe.Pointer(p))) if int64(r0) == -1 { err = errnoErr2(e1, e2) } 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 } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UTIMES_A<<4, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval))) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func impl_utimensat(dirfd int, path string, ts *[2]Timespec, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS___UTIMENSAT_A<<4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(ts)), uintptr(flags)) runtime.ExitSyscall() if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } //go:nosplit func get_utimensatAddr() *(func(dirfd int, path string, ts *[2]Timespec, flags int) (err error)) var utimensat = enter_utimensat func enter_utimensat(dirfd int, path string, ts *[2]Timespec, flags int) (err error) { funcref := get_utimensatAddr() if funcptrtest(GetZosLibVec()+SYS___UTIMENSAT_A<<4, "") == 0 { *funcref = impl_utimensat } else { *funcref = error_utimensat } return (*funcref)(dirfd, path, ts, flags) } func error_utimensat(dirfd int, path string, ts *[2]Timespec, flags int) (err error) { err = ENOSYS return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Posix_openpt(oflag int) (fd int, err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_POSIX_OPENPT<<4, uintptr(oflag)) runtime.ExitSyscall() fd = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Grantpt(fildes int) (rc int, err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_GRANTPT<<4, uintptr(fildes)) runtime.ExitSyscall() rc = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Unlockpt(fildes int) (rc int, err error) { runtime.EnterSyscall() r0, e2, e1 := CallLeFuncWithErr(GetZosLibVec()+SYS_UNLOCKPT<<4, uintptr(fildes)) runtime.ExitSyscall() rc = int(r0) if int64(r0) == -1 { err = errnoErr2(e1, e2) } return } ================================================ FILE: vendor/golang.org/x/sys/unix/zsysctl_openbsd_386.go ================================================ // go run mksysctl_openbsd.go // Code generated by the command above; DO NOT EDIT. //go:build 386 && openbsd 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.profile", []_C_int{9, 9}}, {"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.ncpuonline", []_C_int{6, 25}}, {"hw.pagesize", []_C_int{6, 7}}, {"hw.perfpolicy", []_C_int{6, 23}}, {"hw.physmem", []_C_int{6, 19}}, {"hw.power", []_C_int{6, 26}}, {"hw.product", []_C_int{6, 15}}, {"hw.serialno", []_C_int{6, 17}}, {"hw.setperf", []_C_int{6, 13}}, {"hw.smt", []_C_int{6, 24}}, {"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.allowdt", []_C_int{1, 65}}, {"kern.allowkmem", []_C_int{1, 52}}, {"kern.argmax", []_C_int{1, 8}}, {"kern.audio", []_C_int{1, 84}}, {"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.consbuf", []_C_int{1, 83}}, {"kern.consbufsize", []_C_int{1, 82}}, {"kern.consdev", []_C_int{1, 75}}, {"kern.cp_time", []_C_int{1, 40}}, {"kern.cp_time2", []_C_int{1, 71}}, {"kern.cpustats", []_C_int{1, 85}}, {"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.global_ptrace", []_C_int{1, 81}}, {"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.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.pfstatus", []_C_int{1, 86}}, {"kern.pool_debug", []_C_int{1, 77}}, {"kern.posix1version", []_C_int{1, 17}}, {"kern.proc", []_C_int{1, 66}}, {"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.timeout_stats", []_C_int{1, 87}}, {"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.utc_offset", []_C_int{1, 88}}, {"kern.version", []_C_int{1, 4}}, {"kern.video", []_C_int{1, 89}}, {"kern.watchdog.auto", []_C_int{1, 64, 2}}, {"kern.watchdog.period", []_C_int{1, 64, 1}}, {"kern.witnesswatch", []_C_int{1, 53}}, {"kern.wxabort", []_C_int{1, 74}}, {"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.arpdown", []_C_int{4, 2, 0, 40}}, {"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}}, {"net.inet.ip.arptimeout", []_C_int{4, 2, 0, 39}}, {"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.mrtmfc", []_C_int{4, 2, 0, 37}}, {"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}}, {"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}}, {"net.inet.ip.mrtvif", []_C_int{4, 2, 0, 38}}, {"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.pfsync.stats", []_C_int{4, 2, 240, 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.rootonly", []_C_int{4, 2, 6, 24}}, {"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.tcp.synhashsize", []_C_int{4, 2, 6, 25}}, {"net.inet.tcp.synuselimit", []_C_int{4, 2, 6, 23}}, {"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.rootonly", []_C_int{4, 2, 17, 6}}, {"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_umaxtries", []_C_int{4, 24, 30, 9}}, {"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}}, {"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.mforwarding", []_C_int{4, 24, 17, 42}}, {"net.inet6.ip6.mrtmfc", []_C_int{4, 24, 17, 53}}, {"net.inet6.ip6.mrtmif", []_C_int{4, 24, 17, 52}}, {"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.soiikey", []_C_int{4, 24, 17, 54}}, {"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.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.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.malloc_conf", []_C_int{2, 12}}, {"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}}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zsysctl_openbsd_amd64.go ================================================ // go run mksysctl_openbsd.go // Code generated by the command above; DO NOT EDIT. //go:build amd64 && openbsd 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.profile", []_C_int{9, 9}}, {"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.ncpuonline", []_C_int{6, 25}}, {"hw.pagesize", []_C_int{6, 7}}, {"hw.perfpolicy", []_C_int{6, 23}}, {"hw.physmem", []_C_int{6, 19}}, {"hw.power", []_C_int{6, 26}}, {"hw.product", []_C_int{6, 15}}, {"hw.serialno", []_C_int{6, 17}}, {"hw.setperf", []_C_int{6, 13}}, {"hw.smt", []_C_int{6, 24}}, {"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.allowdt", []_C_int{1, 65}}, {"kern.allowkmem", []_C_int{1, 52}}, {"kern.argmax", []_C_int{1, 8}}, {"kern.audio", []_C_int{1, 84}}, {"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.consbuf", []_C_int{1, 83}}, {"kern.consbufsize", []_C_int{1, 82}}, {"kern.consdev", []_C_int{1, 75}}, {"kern.cp_time", []_C_int{1, 40}}, {"kern.cp_time2", []_C_int{1, 71}}, {"kern.cpustats", []_C_int{1, 85}}, {"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.global_ptrace", []_C_int{1, 81}}, {"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.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.pfstatus", []_C_int{1, 86}}, {"kern.pool_debug", []_C_int{1, 77}}, {"kern.posix1version", []_C_int{1, 17}}, {"kern.proc", []_C_int{1, 66}}, {"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.timeout_stats", []_C_int{1, 87}}, {"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.utc_offset", []_C_int{1, 88}}, {"kern.version", []_C_int{1, 4}}, {"kern.video", []_C_int{1, 89}}, {"kern.watchdog.auto", []_C_int{1, 64, 2}}, {"kern.watchdog.period", []_C_int{1, 64, 1}}, {"kern.witnesswatch", []_C_int{1, 53}}, {"kern.wxabort", []_C_int{1, 74}}, {"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.arpdown", []_C_int{4, 2, 0, 40}}, {"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}}, {"net.inet.ip.arptimeout", []_C_int{4, 2, 0, 39}}, {"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.mrtmfc", []_C_int{4, 2, 0, 37}}, {"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}}, {"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}}, {"net.inet.ip.mrtvif", []_C_int{4, 2, 0, 38}}, {"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.pfsync.stats", []_C_int{4, 2, 240, 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.rootonly", []_C_int{4, 2, 6, 24}}, {"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.tcp.synhashsize", []_C_int{4, 2, 6, 25}}, {"net.inet.tcp.synuselimit", []_C_int{4, 2, 6, 23}}, {"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.rootonly", []_C_int{4, 2, 17, 6}}, {"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_umaxtries", []_C_int{4, 24, 30, 9}}, {"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}}, {"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.mforwarding", []_C_int{4, 24, 17, 42}}, {"net.inet6.ip6.mrtmfc", []_C_int{4, 24, 17, 53}}, {"net.inet6.ip6.mrtmif", []_C_int{4, 24, 17, 52}}, {"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.soiikey", []_C_int{4, 24, 17, 54}}, {"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.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.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.malloc_conf", []_C_int{2, 12}}, {"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}}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm.go ================================================ // go run mksysctl_openbsd.go // Code generated by the command above; DO NOT EDIT. //go:build arm && openbsd 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.profile", []_C_int{9, 9}}, {"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.ncpuonline", []_C_int{6, 25}}, {"hw.pagesize", []_C_int{6, 7}}, {"hw.perfpolicy", []_C_int{6, 23}}, {"hw.physmem", []_C_int{6, 19}}, {"hw.power", []_C_int{6, 26}}, {"hw.product", []_C_int{6, 15}}, {"hw.serialno", []_C_int{6, 17}}, {"hw.setperf", []_C_int{6, 13}}, {"hw.smt", []_C_int{6, 24}}, {"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.allowdt", []_C_int{1, 65}}, {"kern.allowkmem", []_C_int{1, 52}}, {"kern.argmax", []_C_int{1, 8}}, {"kern.audio", []_C_int{1, 84}}, {"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.consbuf", []_C_int{1, 83}}, {"kern.consbufsize", []_C_int{1, 82}}, {"kern.consdev", []_C_int{1, 75}}, {"kern.cp_time", []_C_int{1, 40}}, {"kern.cp_time2", []_C_int{1, 71}}, {"kern.cpustats", []_C_int{1, 85}}, {"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.global_ptrace", []_C_int{1, 81}}, {"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.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.pfstatus", []_C_int{1, 86}}, {"kern.pool_debug", []_C_int{1, 77}}, {"kern.posix1version", []_C_int{1, 17}}, {"kern.proc", []_C_int{1, 66}}, {"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.timeout_stats", []_C_int{1, 87}}, {"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.utc_offset", []_C_int{1, 88}}, {"kern.version", []_C_int{1, 4}}, {"kern.video", []_C_int{1, 89}}, {"kern.watchdog.auto", []_C_int{1, 64, 2}}, {"kern.watchdog.period", []_C_int{1, 64, 1}}, {"kern.witnesswatch", []_C_int{1, 53}}, {"kern.wxabort", []_C_int{1, 74}}, {"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.arpdown", []_C_int{4, 2, 0, 40}}, {"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}}, {"net.inet.ip.arptimeout", []_C_int{4, 2, 0, 39}}, {"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.mrtmfc", []_C_int{4, 2, 0, 37}}, {"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}}, {"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}}, {"net.inet.ip.mrtvif", []_C_int{4, 2, 0, 38}}, {"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.pfsync.stats", []_C_int{4, 2, 240, 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.rootonly", []_C_int{4, 2, 6, 24}}, {"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.tcp.synhashsize", []_C_int{4, 2, 6, 25}}, {"net.inet.tcp.synuselimit", []_C_int{4, 2, 6, 23}}, {"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.rootonly", []_C_int{4, 2, 17, 6}}, {"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_umaxtries", []_C_int{4, 24, 30, 9}}, {"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}}, {"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.mforwarding", []_C_int{4, 24, 17, 42}}, {"net.inet6.ip6.mrtmfc", []_C_int{4, 24, 17, 53}}, {"net.inet6.ip6.mrtmif", []_C_int{4, 24, 17, 52}}, {"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.soiikey", []_C_int{4, 24, 17, 54}}, {"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.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.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.malloc_conf", []_C_int{2, 12}}, {"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}}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zsysctl_openbsd_arm64.go ================================================ // go run mksysctl_openbsd.go // Code generated by the command above; DO NOT EDIT. //go:build arm64 && openbsd 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.profile", []_C_int{9, 9}}, {"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.ncpuonline", []_C_int{6, 25}}, {"hw.pagesize", []_C_int{6, 7}}, {"hw.perfpolicy", []_C_int{6, 23}}, {"hw.physmem", []_C_int{6, 19}}, {"hw.power", []_C_int{6, 26}}, {"hw.product", []_C_int{6, 15}}, {"hw.serialno", []_C_int{6, 17}}, {"hw.setperf", []_C_int{6, 13}}, {"hw.smt", []_C_int{6, 24}}, {"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.allowdt", []_C_int{1, 65}}, {"kern.allowkmem", []_C_int{1, 52}}, {"kern.argmax", []_C_int{1, 8}}, {"kern.audio", []_C_int{1, 84}}, {"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.consbuf", []_C_int{1, 83}}, {"kern.consbufsize", []_C_int{1, 82}}, {"kern.consdev", []_C_int{1, 75}}, {"kern.cp_time", []_C_int{1, 40}}, {"kern.cp_time2", []_C_int{1, 71}}, {"kern.cpustats", []_C_int{1, 85}}, {"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.global_ptrace", []_C_int{1, 81}}, {"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.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.pfstatus", []_C_int{1, 86}}, {"kern.pool_debug", []_C_int{1, 77}}, {"kern.posix1version", []_C_int{1, 17}}, {"kern.proc", []_C_int{1, 66}}, {"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.timeout_stats", []_C_int{1, 87}}, {"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.utc_offset", []_C_int{1, 88}}, {"kern.version", []_C_int{1, 4}}, {"kern.video", []_C_int{1, 89}}, {"kern.watchdog.auto", []_C_int{1, 64, 2}}, {"kern.watchdog.period", []_C_int{1, 64, 1}}, {"kern.witnesswatch", []_C_int{1, 53}}, {"kern.wxabort", []_C_int{1, 74}}, {"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.arpdown", []_C_int{4, 2, 0, 40}}, {"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}}, {"net.inet.ip.arptimeout", []_C_int{4, 2, 0, 39}}, {"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.mrtmfc", []_C_int{4, 2, 0, 37}}, {"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}}, {"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}}, {"net.inet.ip.mrtvif", []_C_int{4, 2, 0, 38}}, {"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.pfsync.stats", []_C_int{4, 2, 240, 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.rootonly", []_C_int{4, 2, 6, 24}}, {"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.tcp.synhashsize", []_C_int{4, 2, 6, 25}}, {"net.inet.tcp.synuselimit", []_C_int{4, 2, 6, 23}}, {"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.rootonly", []_C_int{4, 2, 17, 6}}, {"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_umaxtries", []_C_int{4, 24, 30, 9}}, {"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}}, {"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.mforwarding", []_C_int{4, 24, 17, 42}}, {"net.inet6.ip6.mrtmfc", []_C_int{4, 24, 17, 53}}, {"net.inet6.ip6.mrtmif", []_C_int{4, 24, 17, 52}}, {"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.soiikey", []_C_int{4, 24, 17, 54}}, {"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.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.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.malloc_conf", []_C_int{2, 12}}, {"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}}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zsysctl_openbsd_mips64.go ================================================ // go run mksysctl_openbsd.go // Code generated by the command above; DO NOT EDIT. //go:build mips64 && openbsd 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.profile", []_C_int{9, 9}}, {"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.ncpuonline", []_C_int{6, 25}}, {"hw.pagesize", []_C_int{6, 7}}, {"hw.perfpolicy", []_C_int{6, 23}}, {"hw.physmem", []_C_int{6, 19}}, {"hw.power", []_C_int{6, 26}}, {"hw.product", []_C_int{6, 15}}, {"hw.serialno", []_C_int{6, 17}}, {"hw.setperf", []_C_int{6, 13}}, {"hw.smt", []_C_int{6, 24}}, {"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.allowdt", []_C_int{1, 65}}, {"kern.allowkmem", []_C_int{1, 52}}, {"kern.argmax", []_C_int{1, 8}}, {"kern.audio", []_C_int{1, 84}}, {"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.consbuf", []_C_int{1, 83}}, {"kern.consbufsize", []_C_int{1, 82}}, {"kern.consdev", []_C_int{1, 75}}, {"kern.cp_time", []_C_int{1, 40}}, {"kern.cp_time2", []_C_int{1, 71}}, {"kern.cpustats", []_C_int{1, 85}}, {"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.global_ptrace", []_C_int{1, 81}}, {"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.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.pfstatus", []_C_int{1, 86}}, {"kern.pool_debug", []_C_int{1, 77}}, {"kern.posix1version", []_C_int{1, 17}}, {"kern.proc", []_C_int{1, 66}}, {"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.timeout_stats", []_C_int{1, 87}}, {"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.utc_offset", []_C_int{1, 88}}, {"kern.version", []_C_int{1, 4}}, {"kern.video", []_C_int{1, 89}}, {"kern.watchdog.auto", []_C_int{1, 64, 2}}, {"kern.watchdog.period", []_C_int{1, 64, 1}}, {"kern.witnesswatch", []_C_int{1, 53}}, {"kern.wxabort", []_C_int{1, 74}}, {"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.arpdown", []_C_int{4, 2, 0, 40}}, {"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}}, {"net.inet.ip.arptimeout", []_C_int{4, 2, 0, 39}}, {"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.mrtmfc", []_C_int{4, 2, 0, 37}}, {"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}}, {"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}}, {"net.inet.ip.mrtvif", []_C_int{4, 2, 0, 38}}, {"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.pfsync.stats", []_C_int{4, 2, 240, 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.rootonly", []_C_int{4, 2, 6, 24}}, {"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.tcp.synhashsize", []_C_int{4, 2, 6, 25}}, {"net.inet.tcp.synuselimit", []_C_int{4, 2, 6, 23}}, {"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.rootonly", []_C_int{4, 2, 17, 6}}, {"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_umaxtries", []_C_int{4, 24, 30, 9}}, {"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}}, {"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.mforwarding", []_C_int{4, 24, 17, 42}}, {"net.inet6.ip6.mrtmfc", []_C_int{4, 24, 17, 53}}, {"net.inet6.ip6.mrtmif", []_C_int{4, 24, 17, 52}}, {"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.soiikey", []_C_int{4, 24, 17, 54}}, {"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.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.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.malloc_conf", []_C_int{2, 12}}, {"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}}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zsysctl_openbsd_ppc64.go ================================================ // go run mksysctl_openbsd.go // Code generated by the command above; DO NOT EDIT. //go:build ppc64 && openbsd 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.profile", []_C_int{9, 9}}, {"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.ncpuonline", []_C_int{6, 25}}, {"hw.pagesize", []_C_int{6, 7}}, {"hw.perfpolicy", []_C_int{6, 23}}, {"hw.physmem", []_C_int{6, 19}}, {"hw.power", []_C_int{6, 26}}, {"hw.product", []_C_int{6, 15}}, {"hw.serialno", []_C_int{6, 17}}, {"hw.setperf", []_C_int{6, 13}}, {"hw.smt", []_C_int{6, 24}}, {"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.allowdt", []_C_int{1, 65}}, {"kern.allowkmem", []_C_int{1, 52}}, {"kern.argmax", []_C_int{1, 8}}, {"kern.audio", []_C_int{1, 84}}, {"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.consbuf", []_C_int{1, 83}}, {"kern.consbufsize", []_C_int{1, 82}}, {"kern.consdev", []_C_int{1, 75}}, {"kern.cp_time", []_C_int{1, 40}}, {"kern.cp_time2", []_C_int{1, 71}}, {"kern.cpustats", []_C_int{1, 85}}, {"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.global_ptrace", []_C_int{1, 81}}, {"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.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.pfstatus", []_C_int{1, 86}}, {"kern.pool_debug", []_C_int{1, 77}}, {"kern.posix1version", []_C_int{1, 17}}, {"kern.proc", []_C_int{1, 66}}, {"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.timeout_stats", []_C_int{1, 87}}, {"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.utc_offset", []_C_int{1, 88}}, {"kern.version", []_C_int{1, 4}}, {"kern.video", []_C_int{1, 89}}, {"kern.watchdog.auto", []_C_int{1, 64, 2}}, {"kern.watchdog.period", []_C_int{1, 64, 1}}, {"kern.witnesswatch", []_C_int{1, 53}}, {"kern.wxabort", []_C_int{1, 74}}, {"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.arpdown", []_C_int{4, 2, 0, 40}}, {"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}}, {"net.inet.ip.arptimeout", []_C_int{4, 2, 0, 39}}, {"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.mrtmfc", []_C_int{4, 2, 0, 37}}, {"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}}, {"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}}, {"net.inet.ip.mrtvif", []_C_int{4, 2, 0, 38}}, {"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.pfsync.stats", []_C_int{4, 2, 240, 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.rootonly", []_C_int{4, 2, 6, 24}}, {"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.tcp.synhashsize", []_C_int{4, 2, 6, 25}}, {"net.inet.tcp.synuselimit", []_C_int{4, 2, 6, 23}}, {"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.rootonly", []_C_int{4, 2, 17, 6}}, {"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_umaxtries", []_C_int{4, 24, 30, 9}}, {"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}}, {"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.mforwarding", []_C_int{4, 24, 17, 42}}, {"net.inet6.ip6.mrtmfc", []_C_int{4, 24, 17, 53}}, {"net.inet6.ip6.mrtmif", []_C_int{4, 24, 17, 52}}, {"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.soiikey", []_C_int{4, 24, 17, 54}}, {"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.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.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.malloc_conf", []_C_int{2, 12}}, {"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}}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zsysctl_openbsd_riscv64.go ================================================ // go run mksysctl_openbsd.go // Code generated by the command above; DO NOT EDIT. //go:build riscv64 && openbsd 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.profile", []_C_int{9, 9}}, {"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.ncpuonline", []_C_int{6, 25}}, {"hw.pagesize", []_C_int{6, 7}}, {"hw.perfpolicy", []_C_int{6, 23}}, {"hw.physmem", []_C_int{6, 19}}, {"hw.power", []_C_int{6, 26}}, {"hw.product", []_C_int{6, 15}}, {"hw.serialno", []_C_int{6, 17}}, {"hw.setperf", []_C_int{6, 13}}, {"hw.smt", []_C_int{6, 24}}, {"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.allowdt", []_C_int{1, 65}}, {"kern.allowkmem", []_C_int{1, 52}}, {"kern.argmax", []_C_int{1, 8}}, {"kern.audio", []_C_int{1, 84}}, {"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.consbuf", []_C_int{1, 83}}, {"kern.consbufsize", []_C_int{1, 82}}, {"kern.consdev", []_C_int{1, 75}}, {"kern.cp_time", []_C_int{1, 40}}, {"kern.cp_time2", []_C_int{1, 71}}, {"kern.cpustats", []_C_int{1, 85}}, {"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.global_ptrace", []_C_int{1, 81}}, {"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.pfstatus", []_C_int{1, 86}}, {"kern.pool_debug", []_C_int{1, 77}}, {"kern.posix1version", []_C_int{1, 17}}, {"kern.proc", []_C_int{1, 66}}, {"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.timeout_stats", []_C_int{1, 87}}, {"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.utc_offset", []_C_int{1, 88}}, {"kern.version", []_C_int{1, 4}}, {"kern.video", []_C_int{1, 89}}, {"kern.watchdog.auto", []_C_int{1, 64, 2}}, {"kern.watchdog.period", []_C_int{1, 64, 1}}, {"kern.witnesswatch", []_C_int{1, 53}}, {"kern.wxabort", []_C_int{1, 74}}, {"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.arpdown", []_C_int{4, 2, 0, 40}}, {"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}}, {"net.inet.ip.arptimeout", []_C_int{4, 2, 0, 39}}, {"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.mrtmfc", []_C_int{4, 2, 0, 37}}, {"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}}, {"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}}, {"net.inet.ip.mrtvif", []_C_int{4, 2, 0, 38}}, {"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.pfsync.stats", []_C_int{4, 2, 240, 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.rootonly", []_C_int{4, 2, 6, 24}}, {"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.tcp.synhashsize", []_C_int{4, 2, 6, 25}}, {"net.inet.tcp.synuselimit", []_C_int{4, 2, 6, 23}}, {"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.rootonly", []_C_int{4, 2, 17, 6}}, {"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_umaxtries", []_C_int{4, 24, 30, 9}}, {"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}}, {"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.mforwarding", []_C_int{4, 24, 17, 42}}, {"net.inet6.ip6.mrtmfc", []_C_int{4, 24, 17, 53}}, {"net.inet6.ip6.mrtmif", []_C_int{4, 24, 17, 52}}, {"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.soiikey", []_C_int{4, 24, 17, 54}}, {"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.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.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.malloc_conf", []_C_int{2, 12}}, {"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}}, } ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go ================================================ // go run mksysnum.go /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/sys/syscall.h // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && darwin package unix // Deprecated: Use libSystem wrappers instead of direct syscalls. 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_TYPEFILTER = 177 SYS_KDEBUG_TRACE_STRING = 178 SYS_KDEBUG_TRACE64 = 179 SYS_KDEBUG_TRACE = 180 SYS_SETGID = 181 SYS_SETEGID = 182 SYS_SETEUID = 183 SYS_SIGRETURN = 184 SYS_THREAD_SELFCOUNTS = 186 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_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_KEVENT_QOS = 374 SYS_KEVENT_ID = 375 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_PSELECT = 394 SYS_PSELECT_NOCANCEL = 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_USRCTL = 445 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_CLONEFILEAT = 462 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_RENAMEATX_NP = 488 SYS_MREMAP_ENCRYPTED = 489 SYS_NETAGENT_TRIGGER = 490 SYS_STACK_SNAPSHOT_WITH_CONFIG = 491 SYS_MICROSTACKSHOT = 492 SYS_GRAB_PGO_DATA = 493 SYS_PERSONA = 494 SYS_WORK_INTERVAL_CTL = 499 SYS_GETENTROPY = 500 SYS_NECP_OPEN = 501 SYS_NECP_CLIENT_ACTION = 502 SYS___NEXUS_OPEN = 503 SYS___NEXUS_REGISTER = 504 SYS___NEXUS_DEREGISTER = 505 SYS___NEXUS_CREATE = 506 SYS___NEXUS_DESTROY = 507 SYS___NEXUS_GET_OPT = 508 SYS___NEXUS_SET_OPT = 509 SYS___CHANNEL_OPEN = 510 SYS___CHANNEL_GET_INFO = 511 SYS___CHANNEL_SYNC = 512 SYS___CHANNEL_GET_OPT = 513 SYS___CHANNEL_SET_OPT = 514 SYS_ULOCK_WAIT = 515 SYS_ULOCK_WAKE = 516 SYS_FCLONEFILEAT = 517 SYS_FS_SNAPSHOT = 518 SYS_TERMINATE_WITH_PAYLOAD = 520 SYS_ABORT_WITH_PAYLOAD = 521 SYS_NECP_SESSION_OPEN = 522 SYS_NECP_SESSION_ACTION = 523 SYS_SETATTRLISTAT = 524 SYS_NET_QOS_GUIDELINE = 525 SYS_FMOUNT = 526 SYS_NTP_ADJTIME = 527 SYS_NTP_GETTIME = 528 SYS_OS_FAULT_WITH_PAYLOAD = 529 SYS_KQUEUE_WORKLOOP_CTL = 530 SYS___MACH_BRIDGE_REMOTE_TIME = 531 SYS_MAXSYSCALL = 532 SYS_INVALID = 63 ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go ================================================ // go run mksysnum.go /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.1.sdk/usr/include/sys/syscall.h // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && darwin package unix // Deprecated: Use libSystem wrappers instead of direct syscalls. 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_TYPEFILTER = 177 SYS_KDEBUG_TRACE_STRING = 178 SYS_KDEBUG_TRACE64 = 179 SYS_KDEBUG_TRACE = 180 SYS_SETGID = 181 SYS_SETEGID = 182 SYS_SETEUID = 183 SYS_SIGRETURN = 184 SYS_THREAD_SELFCOUNTS = 186 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_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_KEVENT_QOS = 374 SYS_KEVENT_ID = 375 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_PSELECT = 394 SYS_PSELECT_NOCANCEL = 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_USRCTL = 445 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_CLONEFILEAT = 462 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_RENAMEATX_NP = 488 SYS_MREMAP_ENCRYPTED = 489 SYS_NETAGENT_TRIGGER = 490 SYS_STACK_SNAPSHOT_WITH_CONFIG = 491 SYS_MICROSTACKSHOT = 492 SYS_GRAB_PGO_DATA = 493 SYS_PERSONA = 494 SYS_WORK_INTERVAL_CTL = 499 SYS_GETENTROPY = 500 SYS_NECP_OPEN = 501 SYS_NECP_CLIENT_ACTION = 502 SYS___NEXUS_OPEN = 503 SYS___NEXUS_REGISTER = 504 SYS___NEXUS_DEREGISTER = 505 SYS___NEXUS_CREATE = 506 SYS___NEXUS_DESTROY = 507 SYS___NEXUS_GET_OPT = 508 SYS___NEXUS_SET_OPT = 509 SYS___CHANNEL_OPEN = 510 SYS___CHANNEL_GET_INFO = 511 SYS___CHANNEL_SYNC = 512 SYS___CHANNEL_GET_OPT = 513 SYS___CHANNEL_SET_OPT = 514 SYS_ULOCK_WAIT = 515 SYS_ULOCK_WAKE = 516 SYS_FCLONEFILEAT = 517 SYS_FS_SNAPSHOT = 518 SYS_TERMINATE_WITH_PAYLOAD = 520 SYS_ABORT_WITH_PAYLOAD = 521 SYS_NECP_SESSION_OPEN = 522 SYS_NECP_SESSION_ACTION = 523 SYS_SETATTRLISTAT = 524 SYS_NET_QOS_GUIDELINE = 525 SYS_FMOUNT = 526 SYS_NTP_ADJTIME = 527 SYS_NTP_GETTIME = 528 SYS_OS_FAULT_WITH_PAYLOAD = 529 SYS_MAXSYSCALL = 530 SYS_INVALID = 63 ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go ================================================ // go run mksysnum.go https://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && dragonfly package unix const ( 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, struct rusage *rusage); } wait4 wait_args int // SYS_NOSYS = 8; // { int nosys(void); } __nosys nosys_args int 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, int flags); } SYS_GETPID = 20 // { pid_t getpid(void); } SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, caddr_t data); } 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, int data); } 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, int flags, caddr_t from, int *fromlenaddr); } 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(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(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, u_long offset, u_int scale); } SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, int pid); } SYS_GETGID = 47 // { gid_t getgid(void); } SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, size_t 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 // { caddr_t sbrk(size_t incr); } SYS_SSTK = 70 // { int sstk(size_t 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, char *vec); } 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, struct itimerval *oitv); } 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(int from, 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, fd_set *ex, struct timeval *tv); } 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, caddr_t val, int valsize); } SYS_LISTEN = 106 // { int listen(int s, int backlog); } SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, struct timezone *tzp); } SYS_GETRUSAGE = 117 // { int getrusage(int who, struct rusage *rusage); } SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, caddr_t val, int *avalsize); } SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); } SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, u_int iovcnt); } SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, struct timezone *tzp); } 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, int flags, caddr_t to, int tolen); } SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); } SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, int protocol, int *rsv); } 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, struct timeval *olddelta); } SYS_SETSID = 147 // { int setsid(void); } SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, caddr_t arg); } 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_SYSARCH = 165 // { int sysarch(int op, char *parms); } SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, struct rtprio *rtp); } SYS_EXTPREAD = 173 // { ssize_t extpread(int fd, void *buf, size_t nbyte, int flags, off_t offset); } SYS_EXTPWRITE = 174 // { ssize_t extpwrite(int fd, const void *buf, size_t nbyte, int flags, off_t offset); } 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, struct rlimit *rlp); } getrlimit __getrlimit_args int SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int SYS_MMAP = 197 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, int pad, off_t pos); } SYS_LSEEK = 199 // { off_t lseek(int fd, int pad, off_t offset, int whence); } 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, size_t *oldlenp, void *new, size_t newlen); } __sysctl sysctl_args int 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, int timeout); } SYS___SEMCTL = 220 // { int __semctl(int semid, int semnum, int cmd, union semun *arg); } SYS_SEMGET = 221 // { int semget(key_t key, int nsems, int semflg); } SYS_SEMOP = 222 // { int semop(int semid, struct sembuf *sops, u_int nsops); } SYS_MSGCTL = 224 // { int msgctl(int msqid, int cmd, struct msqid_ds *buf); } SYS_MSGGET = 225 // { int msgget(key_t key, int msgflg); } SYS_MSGSND = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); } SYS_MSGRCV = 227 // { int msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); } SYS_SHMAT = 228 // { caddr_t shmat(int shmid, const void *shmaddr, int shmflg); } SYS_SHMCTL = 229 // { int shmctl(int shmid, int cmd, struct shmid_ds *buf); } 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, struct timespec *tp); } SYS_CLOCK_SETTIME = 233 // { int clock_settime(clockid_t clock_id, const struct timespec *tp); } SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, struct timespec *tp); } SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); } 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, int timeout); } 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, const struct iovec *iovp, int iovcnt, int flags, off_t offset); } SYS_EXTPWRITEV = 290 // { ssize_t extpwritev(int fd, const struct iovec *iovp, int iovcnt, int flags, off_t offset); } 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, sigset_t *oset); } SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); } SYS_SIGACTION = 342 // { int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); } 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,siginfo_t *info, const struct timespec *timeout); } SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set,siginfo_t *info); } SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, acl_type_t type, struct acl *aclp); } SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, acl_type_t type, struct acl *aclp); } SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, acl_type_t type, struct acl *aclp); } SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, acl_type_t type, struct acl *aclp); } SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, acl_type_t type); } 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, acl_type_t type, struct acl *aclp); } SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, struct acl *aclp); } SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); } SYS_EXTATTR_SET_FILE = 356 // { int extattr_set_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_GET_FILE = 357 // { int extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, int attrnamespace, const char *attrname); } 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, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); } SYS_KENV = 390 // { int kenv(int what, const char *name, char *value, int len); } SYS_LCHFLAGS = 391 // { int lchflags(const char *path, u_long 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, struct sf_hdtr *hdtr, off_t *sbytes, int flags); } 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, long *basep); } 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, int bytes); } 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, struct trapframe *tframe, struct vextframe *vframe); } SYS_VMSPACE_MMAP = 489 // { int vmspace_mmap(void *id, void *addr, size_t len, int prot, int flags, int fd, off_t offset); } SYS_VMSPACE_MUNMAP = 490 // { int vmspace_munmap(void *id, void *addr, size_t len); } SYS_VMSPACE_MCONTROL = 491 // { int vmspace_mcontrol(void *id, void *addr, size_t len, int behav, off_t value); } SYS_VMSPACE_PREAD = 492 // { ssize_t vmspace_pread(void *id, void *buf, size_t nbyte, int flags, off_t offset); } SYS_VMSPACE_PWRITE = 493 // { ssize_t vmspace_pwrite(void *id, const void *buf, size_t nbyte, int flags, off_t offset); } 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, fd_set *ex, const struct timespec *ts, const sigset_t *sigmask); } 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, struct statvfs *vbuf, long vbufsize, int flags); } SYS_OPENAT = 504 // { int openat(int fd, char *path, int flags, int mode); } SYS_FSTATAT = 505 // { int fstatat(int fd, char *path, struct stat *sb, int flags); } SYS_FCHMODAT = 506 // { int fchmodat(int fd, char *path, int mode, int flags); } SYS_FCHOWNAT = 507 // { int fchownat(int fd, char *path, int uid, int gid, int flags); } SYS_UNLINKAT = 508 // { int unlinkat(int fd, char *path, int flags); } SYS_FACCESSAT = 509 // { int faccessat(int fd, char *path, int amode, int flags); } SYS_MQ_OPEN = 510 // { mqd_t mq_open(const char * name, int oflag, mode_t mode, struct mq_attr *attr); } 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, struct mq_attr *mqstat); } SYS_MQ_SETATTR = 514 // { int mq_setattr(mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat); } SYS_MQ_NOTIFY = 515 // { int mq_notify(mqd_t mqdes, const struct sigevent *notification); } SYS_MQ_SEND = 516 // { int mq_send(mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned msg_prio); } SYS_MQ_RECEIVE = 517 // { ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned *msg_prio); } SYS_MQ_TIMEDSEND = 518 // { int mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec *abs_timeout); } SYS_MQ_TIMEDRECEIVE = 519 // { ssize_t mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); } 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, char *new); } 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, dev_t dev); } SYS_READLINKAT = 527 // { int readlinkat(int fd, char *path, char *buf, size_t bufsize); } 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, struct plistref *pref); } SYS_LINKAT = 531 // { int linkat(int fd1, char *path1, int fd2, char *path2, int flags); } 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); } SYS_PROCCTL = 536 // { int procctl(idtype_t idtype, id_t id, int cmd, void *data); } SYS_CHFLAGSAT = 537 // { int chflagsat(int fd, const char *path, u_long flags, int atflags);} SYS_PIPE2 = 538 // { int pipe2(int *fildes, int flags); } SYS_UTIMENSAT = 539 // { int utimensat(int fd, const char *path, const struct timespec *ts, int flags); } SYS_FUTIMENS = 540 // { int futimens(int fd, const struct timespec *ts); } SYS_ACCEPT4 = 541 // { int accept4(int s, caddr_t name, int *anamelen, int flags); } SYS_LWP_SETNAME = 542 // { int lwp_setname(lwpid_t tid, const char *name); } SYS_PPOLL = 543 // { int ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *sigmask); } SYS_LWP_SETAFFINITY = 544 // { int lwp_setaffinity(pid_t pid, lwpid_t tid, const cpumask_t *mask); } SYS_LWP_GETAFFINITY = 545 // { int lwp_getaffinity(pid_t pid, lwpid_t tid, cpumask_t *mask); } SYS_LWP_CREATE2 = 546 // { int lwp_create2(struct lwp_params *params, const cpumask_t *mask); } SYS_GETCPUCLOCKID = 547 // { int getcpuclockid(pid_t pid, lwpid_t lwp_id, clockid_t *clock_id); } SYS_WAIT6 = 548 // { int wait6(idtype_t idtype, id_t id, int *status, int options, struct __wrusage *wrusage, siginfo_t *info); } SYS_LWP_GETNAME = 549 // { int lwp_getname(lwpid_t tid, char *name, size_t len); } SYS_GETRANDOM = 550 // { ssize_t getrandom(void *buf, size_t len, unsigned flags); } SYS___REALPATH = 551 // { ssize_t __realpath(const char *path, char *buf, size_t len); } ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go ================================================ // go run mksysnum.go https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12 // Code generated by the command above; see README.md. DO NOT EDIT. //go: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_exit_args void 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, struct rusage *rusage); } 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_CHMOD = 15 // { int chmod(char *path, int mode); } SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); } SYS_BREAK = 17 // { caddr_t break(char *nsize); } SYS_GETPID = 20 // { pid_t getpid(void); } SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, caddr_t data); } 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, int data); } SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, int flags); } SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, int flags); } SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, size_t len, int flags, struct sockaddr * __restrict from, __socklen_t * __restrict fromlenaddr); } SYS_ACCEPT = 30 // { int accept(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen); } SYS_GETPEERNAME = 31 // { int getpeername(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); } SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); } 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_GETEGID = 43 // { gid_t getegid(void); } SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, size_t offset, u_int scale); } SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, int pid); } 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 // { ssize_t readlink(char *path, char *buf, size_t count); } SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); } SYS_UMASK = 60 // { int umask(int newmask); } SYS_CHROOT = 61 // { int chroot(char *path); } SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); } SYS_VFORK = 66 // { int 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, char *vec); } 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, struct itimerval *oitv); } 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, fd_set *ex, struct timeval *tv); } 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, caddr_t val, int valsize); } SYS_LISTEN = 106 // { int listen(int s, int backlog); } SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, struct timezone *tzp); } SYS_GETRUSAGE = 117 // { int getrusage(int who, struct rusage *rusage); } SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, caddr_t val, int *avalsize); } SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); } SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, u_int iovcnt); } SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, struct timezone *tzp); } 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, int flags, caddr_t to, int tolen); } SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); } SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, int protocol, int *rsv); } 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, struct timeval *olddelta); } SYS_SETSID = 147 // { int setsid(void); } SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, caddr_t arg); } SYS_NLM_SYSCALL = 154 // { int nlm_syscall(int debug_level, int grace_period, int addr_count, char **addrs); } SYS_NFSSVC = 155 // { int nfssvc(int flag, caddr_t argp); } SYS_LGETFH = 160 // { int lgetfh(char *fname, struct fhandle *fhp); } SYS_GETFH = 161 // { int getfh(char *fname, struct fhandle *fhp); } SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); } SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, struct rtprio *rtp); } SYS_SEMSYS = 169 // { int semsys(int which, int a2, int a3, int a4, int a5); } SYS_MSGSYS = 170 // { int msgsys(int which, int a2, int a3, int a4, int a5, int a6); } SYS_SHMSYS = 171 // { int shmsys(int which, int a2, int a3, int a4); } 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_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, struct rlimit *rlp); } getrlimit __getrlimit_args int SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } __sysctl sysctl_args int 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, int timeout); } SYS_SEMGET = 221 // { int semget(key_t key, int nsems, int semflg); } SYS_SEMOP = 222 // { int semop(int semid, struct sembuf *sops, size_t nsops); } SYS_MSGGET = 225 // { int msgget(key_t key, int msgflg); } SYS_MSGSND = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); } SYS_MSGRCV = 227 // { ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); } SYS_SHMAT = 228 // { int shmat(int shmid, const void *shmaddr, int shmflg); } 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, struct timespec *tp); } SYS_CLOCK_SETTIME = 233 // { int clock_settime(clockid_t clock_id, const struct timespec *tp); } SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, struct timespec *tp); } SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, struct sigevent *evp, int *timerid); } SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); } SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); } SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct itimerspec *value); } SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); } SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); } SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); } SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate(struct ffclock_estimate *cest); } SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate(struct ffclock_estimate *cest); } SYS_CLOCK_NANOSLEEP = 244 // { int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp); } SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id, int which, clockid_t *clock_id); } SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); } SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, int inherit); } SYS_RFORK = 251 // { int rfork(int flags); } SYS_ISSETUGID = 253 // { int issetugid(void); } SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); } SYS_AIO_READ = 255 // { int aio_read(struct aiocb *aiocbp); } SYS_AIO_WRITE = 256 // { int aio_write(struct aiocb *aiocbp); } SYS_LIO_LISTIO = 257 // { int lio_listio(int mode, struct aiocb* const *acb_list, int nent, struct sigevent *sig); } SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); } SYS_LUTIMES = 276 // { int lutimes(char *path, struct timeval *tptr); } SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); } SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); } 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 // { ssize_t 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_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, size_t 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, sigset_t *oset); } 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, siginfo_t *info, const struct timespec *timeout); } SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, siginfo_t *info); } SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, acl_type_t type, struct acl *aclp); } SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, acl_type_t type, struct acl *aclp); } SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, acl_type_t type, struct acl *aclp); } SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, acl_type_t type, struct acl *aclp); } SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, acl_type_t type); } 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, acl_type_t type, struct acl *aclp); } SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, struct acl *aclp); } SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); } SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, int attrnamespace, const char *attrname); } SYS_AIO_WAITCOMPLETE = 359 // { ssize_t 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_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, int attrnamespace, const char *attrname); } SYS___SETUGID = 374 // { int __setugid(int flag); } SYS_EACCESS = 376 // { int eaccess(char *path, int amode); } SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, unsigned int iovcnt, int flags); } 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, struct mac *mac_p); } SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, struct mac *mac_p); } SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, struct mac *mac_p); } SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, struct mac *mac_p); } SYS_KENV = 390 // { int kenv(int what, const char *name, char *value, int len); } SYS_LCHFLAGS = 391 // { int lchflags(const char *path, u_long 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, struct sf_hdtr *hdtr, off_t *sbytes, int flags); } SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, int call, void *arg); } SYS_KSEM_CLOSE = 400 // { int ksem_close(semid_t id); } SYS_KSEM_POST = 401 // { int ksem_post(semid_t id); } SYS_KSEM_WAIT = 402 // { int ksem_wait(semid_t id); } SYS_KSEM_TRYWAIT = 403 // { int ksem_trywait(semid_t id); } SYS_KSEM_INIT = 404 // { int ksem_init(semid_t *idp, unsigned int value); } SYS_KSEM_OPEN = 405 // { int ksem_open(semid_t *idp, const char *name, int oflag, mode_t mode, unsigned int value); } SYS_KSEM_UNLINK = 406 // { int ksem_unlink(const char *name); } SYS_KSEM_GETVALUE = 407 // { int ksem_getvalue(semid_t id, int *val); } SYS_KSEM_DESTROY = 408 // { int ksem_destroy(semid_t id); } SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, struct mac *mac_p); } SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, struct mac *mac_p); } SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, struct mac *mac_p); } SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link(const char *path, int attrnamespace, const char *attrname); } SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, char **envv, struct mac *mac_p); } SYS_SIGACTION = 416 // { int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); } SYS_SIGRETURN = 417 // { int sigreturn(const struct __ucontext *sigcntxp); } SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); } SYS_SETCONTEXT = 422 // { int setcontext(const struct __ucontext *ucp); } SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, const struct __ucontext *ucp); } SYS_SWAPOFF = 424 // { int swapoff(const char *name); } SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, acl_type_t type, struct acl *aclp); } SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, acl_type_t type, struct acl *aclp); } SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, acl_type_t type); } SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, acl_type_t type, struct acl *aclp); } SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, int *sig); } SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, int flags); } 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_JAIL_ATTACH = 436 // { int jail_attach(int jid); } SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); } SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); } SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); } SYS_KSEM_TIMEDWAIT = 441 // { int ksem_timedwait(semid_t id, const struct timespec *abstime); } SYS_THR_SUSPEND = 442 // { int thr_suspend(const struct timespec *timeout); } 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, u_int length); } SYS_AUDITON = 446 // { int auditon(int cmd, void *data, u_int length); } 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(struct auditinfo_addr *auditinfo_addr, u_int length); } SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); } SYS_AUDITCTL = 453 // { int auditctl(char *path); } SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, u_long val, void *uaddr1, void *uaddr2); } SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, int param_size); } SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); } SYS_KMQ_OPEN = 457 // { int kmq_open(const char *path, int flags, mode_t mode, const struct mq_attr *attr); } SYS_KMQ_SETATTR = 458 // { int kmq_setattr(int mqd, const struct mq_attr *attr, struct mq_attr *oattr); } SYS_KMQ_TIMEDRECEIVE = 459 // { int kmq_timedreceive(int mqd, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); } SYS_KMQ_TIMEDSEND = 460 // { int kmq_timedsend(int mqd, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec *abs_timeout); } SYS_KMQ_NOTIFY = 461 // { int kmq_notify(int mqd, const struct sigevent *sigev); } SYS_KMQ_UNLINK = 462 // { int kmq_unlink(const char *path); } 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_AIO_FSYNC = 465 // { int aio_fsync(int op, struct aiocb *aiocbp); } SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, lwpid_t lwpid, struct rtprio *rtp); } 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, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); } SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); } SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr *from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); } SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, size_t nbyte, off_t offset); } SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, size_t nbyte, off_t offset); } SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t pos); } SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, int whence); } 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, mode_t mode); } 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, cpusetid_t setid); } SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, cpuwhich_t which, id_t id, cpusetid_t *setid); } SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, cpuset_t *mask); } SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, const cpuset_t *mask); } SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, int flag); } SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, int flag); } SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, gid_t gid, int flag); } SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, char **envv); } SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, struct timeval *times); } SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, char *path2, int flag); } 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_OPENAT = 499 // { int openat(int fd, char *path, int flag, mode_t mode); } SYS_READLINKAT = 500 // { ssize_t readlinkat(int fd, char *path, char *buf, size_t bufsize); } SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, char *new); } SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, char *path2); } SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); } SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); } SYS_GSSD_SYSCALL = 505 // { int gssd_syscall(char *path); } SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, unsigned int iovcnt, int flags); } SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, unsigned int iovcnt, int flags); } SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); } SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); } SYS___SEMCTL = 510 // { int __semctl(int semid, int semnum, int cmd, union semun *arg); } SYS_MSGCTL = 511 // { int msgctl(int msqid, int cmd, struct msqid_ds *buf); } SYS_SHMCTL = 512 // { int shmctl(int shmid, int cmd, struct shmid_ds *buf); } SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); } SYS___CAP_RIGHTS_GET = 515 // { int __cap_rights_get(int version, int fd, cap_rights_t *rightsp); } 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, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *sm); } SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, size_t namelen); } SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); } SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); } SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); } SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); } SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); } SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); } SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, off_t offset, off_t len); } SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, off_t len, int advice); } SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, int *status, int options, struct __wrusage *wrusage, siginfo_t *info); } SYS_CAP_RIGHTS_LIMIT = 533 // { int cap_rights_limit(int fd, cap_rights_t *rightsp); } SYS_CAP_IOCTLS_LIMIT = 534 // { int cap_ioctls_limit(int fd, const u_long *cmds, size_t ncmds); } SYS_CAP_IOCTLS_GET = 535 // { ssize_t cap_ioctls_get(int fd, u_long *cmds, size_t maxcmds); } SYS_CAP_FCNTLS_LIMIT = 536 // { int cap_fcntls_limit(int fd, uint32_t fcntlrights); } SYS_CAP_FCNTLS_GET = 537 // { int cap_fcntls_get(int fd, uint32_t *fcntlrightsp); } SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, int namelen); } SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, int namelen); } SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, u_long flags, int atflag); } SYS_ACCEPT4 = 541 // { int accept4(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen, int flags); } SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); } SYS_AIO_MLOCK = 543 // { int aio_mlock(struct aiocb *aiocbp); } SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, int com, void *data); } SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *set); } SYS_FUTIMENS = 546 // { int futimens(int fd, struct timespec *times); } SYS_UTIMENSAT = 547 // { int utimensat(int fd, char *path, struct timespec *times, int flag); } SYS_FDATASYNC = 550 // { int fdatasync(int fd); } SYS_FSTAT = 551 // { int fstat(int fd, struct stat *sb); } SYS_FSTATAT = 552 // { int fstatat(int fd, char *path, struct stat *buf, int flag); } SYS_FHSTAT = 553 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); } SYS_GETDIRENTRIES = 554 // { ssize_t getdirentries(int fd, char *buf, size_t count, off_t *basep); } SYS_STATFS = 555 // { int statfs(char *path, struct statfs *buf); } SYS_FSTATFS = 556 // { int fstatfs(int fd, struct statfs *buf); } SYS_GETFSSTAT = 557 // { int getfsstat(struct statfs *buf, long bufsize, int mode); } SYS_FHSTATFS = 558 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); } SYS_MKNODAT = 559 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); } SYS_KEVENT = 560 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); } SYS_CPUSET_GETDOMAIN = 561 // { int cpuset_getdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int *policy); } SYS_CPUSET_SETDOMAIN = 562 // { int cpuset_setdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int policy); } SYS_GETRANDOM = 563 // { int getrandom(void *buf, size_t buflen, unsigned int flags); } SYS_GETFHAT = 564 // { int getfhat(int fd, char *path, struct fhandle *fhp, int flags); } SYS_FHLINK = 565 // { int fhlink(struct fhandle *fhp, const char *to); } SYS_FHLINKAT = 566 // { int fhlinkat(struct fhandle *fhp, int tofd, const char *to,); } SYS_FHREADLINK = 567 // { int fhreadlink(struct fhandle *fhp, char *buf, size_t bufsize); } SYS___SYSCTLBYNAME = 570 // { int __sysctlbyname(const char *name, size_t namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } SYS_CLOSE_RANGE = 575 // { int close_range(u_int lowfd, u_int highfd, int flags); } ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go ================================================ // go run mksysnum.go https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12 // Code generated by the command above; see README.md. DO NOT EDIT. //go: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_exit_args void 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, struct rusage *rusage); } 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_CHMOD = 15 // { int chmod(char *path, int mode); } SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); } SYS_BREAK = 17 // { caddr_t break(char *nsize); } SYS_GETPID = 20 // { pid_t getpid(void); } SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, caddr_t data); } 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, int data); } SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, int flags); } SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, int flags); } SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, size_t len, int flags, struct sockaddr * __restrict from, __socklen_t * __restrict fromlenaddr); } SYS_ACCEPT = 30 // { int accept(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen); } SYS_GETPEERNAME = 31 // { int getpeername(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); } SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); } 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_GETEGID = 43 // { gid_t getegid(void); } SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, size_t offset, u_int scale); } SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, int pid); } 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 // { ssize_t readlink(char *path, char *buf, size_t count); } SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); } SYS_UMASK = 60 // { int umask(int newmask); } SYS_CHROOT = 61 // { int chroot(char *path); } SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); } SYS_VFORK = 66 // { int 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, char *vec); } 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, struct itimerval *oitv); } 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, fd_set *ex, struct timeval *tv); } 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, caddr_t val, int valsize); } SYS_LISTEN = 106 // { int listen(int s, int backlog); } SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, struct timezone *tzp); } SYS_GETRUSAGE = 117 // { int getrusage(int who, struct rusage *rusage); } SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, caddr_t val, int *avalsize); } SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); } SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, u_int iovcnt); } SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, struct timezone *tzp); } 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, int flags, caddr_t to, int tolen); } SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); } SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, int protocol, int *rsv); } 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, struct timeval *olddelta); } SYS_SETSID = 147 // { int setsid(void); } SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, caddr_t arg); } SYS_NLM_SYSCALL = 154 // { int nlm_syscall(int debug_level, int grace_period, int addr_count, char **addrs); } SYS_NFSSVC = 155 // { int nfssvc(int flag, caddr_t argp); } SYS_LGETFH = 160 // { int lgetfh(char *fname, struct fhandle *fhp); } SYS_GETFH = 161 // { int getfh(char *fname, struct fhandle *fhp); } SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); } SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, struct rtprio *rtp); } SYS_SEMSYS = 169 // { int semsys(int which, int a2, int a3, int a4, int a5); } SYS_MSGSYS = 170 // { int msgsys(int which, int a2, int a3, int a4, int a5, int a6); } SYS_SHMSYS = 171 // { int shmsys(int which, int a2, int a3, int a4); } 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_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, struct rlimit *rlp); } getrlimit __getrlimit_args int SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } __sysctl sysctl_args int 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, int timeout); } SYS_SEMGET = 221 // { int semget(key_t key, int nsems, int semflg); } SYS_SEMOP = 222 // { int semop(int semid, struct sembuf *sops, size_t nsops); } SYS_MSGGET = 225 // { int msgget(key_t key, int msgflg); } SYS_MSGSND = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); } SYS_MSGRCV = 227 // { ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); } SYS_SHMAT = 228 // { int shmat(int shmid, const void *shmaddr, int shmflg); } 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, struct timespec *tp); } SYS_CLOCK_SETTIME = 233 // { int clock_settime(clockid_t clock_id, const struct timespec *tp); } SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, struct timespec *tp); } SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, struct sigevent *evp, int *timerid); } SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); } SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); } SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct itimerspec *value); } SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); } SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); } SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); } SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate(struct ffclock_estimate *cest); } SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate(struct ffclock_estimate *cest); } SYS_CLOCK_NANOSLEEP = 244 // { int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp); } SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id, int which, clockid_t *clock_id); } SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); } SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, int inherit); } SYS_RFORK = 251 // { int rfork(int flags); } SYS_ISSETUGID = 253 // { int issetugid(void); } SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); } SYS_AIO_READ = 255 // { int aio_read(struct aiocb *aiocbp); } SYS_AIO_WRITE = 256 // { int aio_write(struct aiocb *aiocbp); } SYS_LIO_LISTIO = 257 // { int lio_listio(int mode, struct aiocb* const *acb_list, int nent, struct sigevent *sig); } SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); } SYS_LUTIMES = 276 // { int lutimes(char *path, struct timeval *tptr); } SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); } SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); } 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 // { ssize_t 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_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, size_t 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, sigset_t *oset); } 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, siginfo_t *info, const struct timespec *timeout); } SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, siginfo_t *info); } SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, acl_type_t type, struct acl *aclp); } SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, acl_type_t type, struct acl *aclp); } SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, acl_type_t type, struct acl *aclp); } SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, acl_type_t type, struct acl *aclp); } SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, acl_type_t type); } 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, acl_type_t type, struct acl *aclp); } SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, struct acl *aclp); } SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); } SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, int attrnamespace, const char *attrname); } SYS_AIO_WAITCOMPLETE = 359 // { ssize_t 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_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, int attrnamespace, const char *attrname); } SYS___SETUGID = 374 // { int __setugid(int flag); } SYS_EACCESS = 376 // { int eaccess(char *path, int amode); } SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, unsigned int iovcnt, int flags); } 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, struct mac *mac_p); } SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, struct mac *mac_p); } SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, struct mac *mac_p); } SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, struct mac *mac_p); } SYS_KENV = 390 // { int kenv(int what, const char *name, char *value, int len); } SYS_LCHFLAGS = 391 // { int lchflags(const char *path, u_long 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, struct sf_hdtr *hdtr, off_t *sbytes, int flags); } SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, int call, void *arg); } SYS_KSEM_CLOSE = 400 // { int ksem_close(semid_t id); } SYS_KSEM_POST = 401 // { int ksem_post(semid_t id); } SYS_KSEM_WAIT = 402 // { int ksem_wait(semid_t id); } SYS_KSEM_TRYWAIT = 403 // { int ksem_trywait(semid_t id); } SYS_KSEM_INIT = 404 // { int ksem_init(semid_t *idp, unsigned int value); } SYS_KSEM_OPEN = 405 // { int ksem_open(semid_t *idp, const char *name, int oflag, mode_t mode, unsigned int value); } SYS_KSEM_UNLINK = 406 // { int ksem_unlink(const char *name); } SYS_KSEM_GETVALUE = 407 // { int ksem_getvalue(semid_t id, int *val); } SYS_KSEM_DESTROY = 408 // { int ksem_destroy(semid_t id); } SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, struct mac *mac_p); } SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, struct mac *mac_p); } SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, struct mac *mac_p); } SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link(const char *path, int attrnamespace, const char *attrname); } SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, char **envv, struct mac *mac_p); } SYS_SIGACTION = 416 // { int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); } SYS_SIGRETURN = 417 // { int sigreturn(const struct __ucontext *sigcntxp); } SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); } SYS_SETCONTEXT = 422 // { int setcontext(const struct __ucontext *ucp); } SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, const struct __ucontext *ucp); } SYS_SWAPOFF = 424 // { int swapoff(const char *name); } SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, acl_type_t type, struct acl *aclp); } SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, acl_type_t type, struct acl *aclp); } SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, acl_type_t type); } SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, acl_type_t type, struct acl *aclp); } SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, int *sig); } SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, int flags); } 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_JAIL_ATTACH = 436 // { int jail_attach(int jid); } SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); } SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); } SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); } SYS_KSEM_TIMEDWAIT = 441 // { int ksem_timedwait(semid_t id, const struct timespec *abstime); } SYS_THR_SUSPEND = 442 // { int thr_suspend(const struct timespec *timeout); } 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, u_int length); } SYS_AUDITON = 446 // { int auditon(int cmd, void *data, u_int length); } 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(struct auditinfo_addr *auditinfo_addr, u_int length); } SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); } SYS_AUDITCTL = 453 // { int auditctl(char *path); } SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, u_long val, void *uaddr1, void *uaddr2); } SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, int param_size); } SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); } SYS_KMQ_OPEN = 457 // { int kmq_open(const char *path, int flags, mode_t mode, const struct mq_attr *attr); } SYS_KMQ_SETATTR = 458 // { int kmq_setattr(int mqd, const struct mq_attr *attr, struct mq_attr *oattr); } SYS_KMQ_TIMEDRECEIVE = 459 // { int kmq_timedreceive(int mqd, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); } SYS_KMQ_TIMEDSEND = 460 // { int kmq_timedsend(int mqd, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec *abs_timeout); } SYS_KMQ_NOTIFY = 461 // { int kmq_notify(int mqd, const struct sigevent *sigev); } SYS_KMQ_UNLINK = 462 // { int kmq_unlink(const char *path); } 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_AIO_FSYNC = 465 // { int aio_fsync(int op, struct aiocb *aiocbp); } SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, lwpid_t lwpid, struct rtprio *rtp); } 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, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); } SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); } SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr *from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); } SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, size_t nbyte, off_t offset); } SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, size_t nbyte, off_t offset); } SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t pos); } SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, int whence); } 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, mode_t mode); } 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, cpusetid_t setid); } SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, cpuwhich_t which, id_t id, cpusetid_t *setid); } SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, cpuset_t *mask); } SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, const cpuset_t *mask); } SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, int flag); } SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, int flag); } SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, gid_t gid, int flag); } SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, char **envv); } SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, struct timeval *times); } SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, char *path2, int flag); } 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_OPENAT = 499 // { int openat(int fd, char *path, int flag, mode_t mode); } SYS_READLINKAT = 500 // { ssize_t readlinkat(int fd, char *path, char *buf, size_t bufsize); } SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, char *new); } SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, char *path2); } SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); } SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); } SYS_GSSD_SYSCALL = 505 // { int gssd_syscall(char *path); } SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, unsigned int iovcnt, int flags); } SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, unsigned int iovcnt, int flags); } SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); } SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); } SYS___SEMCTL = 510 // { int __semctl(int semid, int semnum, int cmd, union semun *arg); } SYS_MSGCTL = 511 // { int msgctl(int msqid, int cmd, struct msqid_ds *buf); } SYS_SHMCTL = 512 // { int shmctl(int shmid, int cmd, struct shmid_ds *buf); } SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); } SYS___CAP_RIGHTS_GET = 515 // { int __cap_rights_get(int version, int fd, cap_rights_t *rightsp); } 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, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *sm); } SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, size_t namelen); } SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); } SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); } SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); } SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); } SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); } SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); } SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, off_t offset, off_t len); } SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, off_t len, int advice); } SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, int *status, int options, struct __wrusage *wrusage, siginfo_t *info); } SYS_CAP_RIGHTS_LIMIT = 533 // { int cap_rights_limit(int fd, cap_rights_t *rightsp); } SYS_CAP_IOCTLS_LIMIT = 534 // { int cap_ioctls_limit(int fd, const u_long *cmds, size_t ncmds); } SYS_CAP_IOCTLS_GET = 535 // { ssize_t cap_ioctls_get(int fd, u_long *cmds, size_t maxcmds); } SYS_CAP_FCNTLS_LIMIT = 536 // { int cap_fcntls_limit(int fd, uint32_t fcntlrights); } SYS_CAP_FCNTLS_GET = 537 // { int cap_fcntls_get(int fd, uint32_t *fcntlrightsp); } SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, int namelen); } SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, int namelen); } SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, u_long flags, int atflag); } SYS_ACCEPT4 = 541 // { int accept4(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen, int flags); } SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); } SYS_AIO_MLOCK = 543 // { int aio_mlock(struct aiocb *aiocbp); } SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, int com, void *data); } SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *set); } SYS_FUTIMENS = 546 // { int futimens(int fd, struct timespec *times); } SYS_UTIMENSAT = 547 // { int utimensat(int fd, char *path, struct timespec *times, int flag); } SYS_FDATASYNC = 550 // { int fdatasync(int fd); } SYS_FSTAT = 551 // { int fstat(int fd, struct stat *sb); } SYS_FSTATAT = 552 // { int fstatat(int fd, char *path, struct stat *buf, int flag); } SYS_FHSTAT = 553 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); } SYS_GETDIRENTRIES = 554 // { ssize_t getdirentries(int fd, char *buf, size_t count, off_t *basep); } SYS_STATFS = 555 // { int statfs(char *path, struct statfs *buf); } SYS_FSTATFS = 556 // { int fstatfs(int fd, struct statfs *buf); } SYS_GETFSSTAT = 557 // { int getfsstat(struct statfs *buf, long bufsize, int mode); } SYS_FHSTATFS = 558 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); } SYS_MKNODAT = 559 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); } SYS_KEVENT = 560 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); } SYS_CPUSET_GETDOMAIN = 561 // { int cpuset_getdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int *policy); } SYS_CPUSET_SETDOMAIN = 562 // { int cpuset_setdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int policy); } SYS_GETRANDOM = 563 // { int getrandom(void *buf, size_t buflen, unsigned int flags); } SYS_GETFHAT = 564 // { int getfhat(int fd, char *path, struct fhandle *fhp, int flags); } SYS_FHLINK = 565 // { int fhlink(struct fhandle *fhp, const char *to); } SYS_FHLINKAT = 566 // { int fhlinkat(struct fhandle *fhp, int tofd, const char *to,); } SYS_FHREADLINK = 567 // { int fhreadlink(struct fhandle *fhp, char *buf, size_t bufsize); } SYS___SYSCTLBYNAME = 570 // { int __sysctlbyname(const char *name, size_t namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } SYS_CLOSE_RANGE = 575 // { int close_range(u_int lowfd, u_int highfd, int flags); } ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go ================================================ // go run mksysnum.go https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12 // Code generated by the command above; see README.md. DO NOT EDIT. //go: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_exit_args void 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, struct rusage *rusage); } 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_CHMOD = 15 // { int chmod(char *path, int mode); } SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); } SYS_BREAK = 17 // { caddr_t break(char *nsize); } SYS_GETPID = 20 // { pid_t getpid(void); } SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, caddr_t data); } 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, int data); } SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, int flags); } SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, int flags); } SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, size_t len, int flags, struct sockaddr * __restrict from, __socklen_t * __restrict fromlenaddr); } SYS_ACCEPT = 30 // { int accept(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen); } SYS_GETPEERNAME = 31 // { int getpeername(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); } SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); } 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_GETEGID = 43 // { gid_t getegid(void); } SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, size_t offset, u_int scale); } SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, int pid); } 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 // { ssize_t readlink(char *path, char *buf, size_t count); } SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); } SYS_UMASK = 60 // { int umask(int newmask); } SYS_CHROOT = 61 // { int chroot(char *path); } SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); } SYS_VFORK = 66 // { int 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, char *vec); } 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, struct itimerval *oitv); } 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, fd_set *ex, struct timeval *tv); } 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, caddr_t val, int valsize); } SYS_LISTEN = 106 // { int listen(int s, int backlog); } SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, struct timezone *tzp); } SYS_GETRUSAGE = 117 // { int getrusage(int who, struct rusage *rusage); } SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, caddr_t val, int *avalsize); } SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); } SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, u_int iovcnt); } SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, struct timezone *tzp); } 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, int flags, caddr_t to, int tolen); } SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); } SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, int protocol, int *rsv); } 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, struct timeval *olddelta); } SYS_SETSID = 147 // { int setsid(void); } SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, caddr_t arg); } SYS_NLM_SYSCALL = 154 // { int nlm_syscall(int debug_level, int grace_period, int addr_count, char **addrs); } SYS_NFSSVC = 155 // { int nfssvc(int flag, caddr_t argp); } SYS_LGETFH = 160 // { int lgetfh(char *fname, struct fhandle *fhp); } SYS_GETFH = 161 // { int getfh(char *fname, struct fhandle *fhp); } SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); } SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, struct rtprio *rtp); } SYS_SEMSYS = 169 // { int semsys(int which, int a2, int a3, int a4, int a5); } SYS_MSGSYS = 170 // { int msgsys(int which, int a2, int a3, int a4, int a5, int a6); } SYS_SHMSYS = 171 // { int shmsys(int which, int a2, int a3, int a4); } 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_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, struct rlimit *rlp); } getrlimit __getrlimit_args int SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } __sysctl sysctl_args int 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, int timeout); } SYS_SEMGET = 221 // { int semget(key_t key, int nsems, int semflg); } SYS_SEMOP = 222 // { int semop(int semid, struct sembuf *sops, size_t nsops); } SYS_MSGGET = 225 // { int msgget(key_t key, int msgflg); } SYS_MSGSND = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); } SYS_MSGRCV = 227 // { ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); } SYS_SHMAT = 228 // { int shmat(int shmid, const void *shmaddr, int shmflg); } 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, struct timespec *tp); } SYS_CLOCK_SETTIME = 233 // { int clock_settime(clockid_t clock_id, const struct timespec *tp); } SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, struct timespec *tp); } SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, struct sigevent *evp, int *timerid); } SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); } SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); } SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct itimerspec *value); } SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); } SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); } SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); } SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate(struct ffclock_estimate *cest); } SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate(struct ffclock_estimate *cest); } SYS_CLOCK_NANOSLEEP = 244 // { int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp); } SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id, int which, clockid_t *clock_id); } SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); } SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, int inherit); } SYS_RFORK = 251 // { int rfork(int flags); } SYS_ISSETUGID = 253 // { int issetugid(void); } SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); } SYS_AIO_READ = 255 // { int aio_read(struct aiocb *aiocbp); } SYS_AIO_WRITE = 256 // { int aio_write(struct aiocb *aiocbp); } SYS_LIO_LISTIO = 257 // { int lio_listio(int mode, struct aiocb* const *acb_list, int nent, struct sigevent *sig); } SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); } SYS_LUTIMES = 276 // { int lutimes(char *path, struct timeval *tptr); } SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); } SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); } 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 // { ssize_t 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_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, size_t 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, sigset_t *oset); } 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, siginfo_t *info, const struct timespec *timeout); } SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, siginfo_t *info); } SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, acl_type_t type, struct acl *aclp); } SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, acl_type_t type, struct acl *aclp); } SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, acl_type_t type, struct acl *aclp); } SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, acl_type_t type, struct acl *aclp); } SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, acl_type_t type); } 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, acl_type_t type, struct acl *aclp); } SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, struct acl *aclp); } SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); } SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, int attrnamespace, const char *attrname); } SYS_AIO_WAITCOMPLETE = 359 // { ssize_t 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_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, int attrnamespace, const char *attrname); } SYS___SETUGID = 374 // { int __setugid(int flag); } SYS_EACCESS = 376 // { int eaccess(char *path, int amode); } SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, unsigned int iovcnt, int flags); } 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, struct mac *mac_p); } SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, struct mac *mac_p); } SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, struct mac *mac_p); } SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, struct mac *mac_p); } SYS_KENV = 390 // { int kenv(int what, const char *name, char *value, int len); } SYS_LCHFLAGS = 391 // { int lchflags(const char *path, u_long 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, struct sf_hdtr *hdtr, off_t *sbytes, int flags); } SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, int call, void *arg); } SYS_KSEM_CLOSE = 400 // { int ksem_close(semid_t id); } SYS_KSEM_POST = 401 // { int ksem_post(semid_t id); } SYS_KSEM_WAIT = 402 // { int ksem_wait(semid_t id); } SYS_KSEM_TRYWAIT = 403 // { int ksem_trywait(semid_t id); } SYS_KSEM_INIT = 404 // { int ksem_init(semid_t *idp, unsigned int value); } SYS_KSEM_OPEN = 405 // { int ksem_open(semid_t *idp, const char *name, int oflag, mode_t mode, unsigned int value); } SYS_KSEM_UNLINK = 406 // { int ksem_unlink(const char *name); } SYS_KSEM_GETVALUE = 407 // { int ksem_getvalue(semid_t id, int *val); } SYS_KSEM_DESTROY = 408 // { int ksem_destroy(semid_t id); } SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, struct mac *mac_p); } SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, struct mac *mac_p); } SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, struct mac *mac_p); } SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link(const char *path, int attrnamespace, const char *attrname); } SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, char **envv, struct mac *mac_p); } SYS_SIGACTION = 416 // { int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); } SYS_SIGRETURN = 417 // { int sigreturn(const struct __ucontext *sigcntxp); } SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); } SYS_SETCONTEXT = 422 // { int setcontext(const struct __ucontext *ucp); } SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, const struct __ucontext *ucp); } SYS_SWAPOFF = 424 // { int swapoff(const char *name); } SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, acl_type_t type, struct acl *aclp); } SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, acl_type_t type, struct acl *aclp); } SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, acl_type_t type); } SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, acl_type_t type, struct acl *aclp); } SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, int *sig); } SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, int flags); } 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_JAIL_ATTACH = 436 // { int jail_attach(int jid); } SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); } SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); } SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); } SYS_KSEM_TIMEDWAIT = 441 // { int ksem_timedwait(semid_t id, const struct timespec *abstime); } SYS_THR_SUSPEND = 442 // { int thr_suspend(const struct timespec *timeout); } 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, u_int length); } SYS_AUDITON = 446 // { int auditon(int cmd, void *data, u_int length); } 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(struct auditinfo_addr *auditinfo_addr, u_int length); } SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); } SYS_AUDITCTL = 453 // { int auditctl(char *path); } SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, u_long val, void *uaddr1, void *uaddr2); } SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, int param_size); } SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); } SYS_KMQ_OPEN = 457 // { int kmq_open(const char *path, int flags, mode_t mode, const struct mq_attr *attr); } SYS_KMQ_SETATTR = 458 // { int kmq_setattr(int mqd, const struct mq_attr *attr, struct mq_attr *oattr); } SYS_KMQ_TIMEDRECEIVE = 459 // { int kmq_timedreceive(int mqd, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); } SYS_KMQ_TIMEDSEND = 460 // { int kmq_timedsend(int mqd, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec *abs_timeout); } SYS_KMQ_NOTIFY = 461 // { int kmq_notify(int mqd, const struct sigevent *sigev); } SYS_KMQ_UNLINK = 462 // { int kmq_unlink(const char *path); } 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_AIO_FSYNC = 465 // { int aio_fsync(int op, struct aiocb *aiocbp); } SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, lwpid_t lwpid, struct rtprio *rtp); } 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, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); } SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); } SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr *from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); } SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, size_t nbyte, off_t offset); } SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, size_t nbyte, off_t offset); } SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t pos); } SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, int whence); } 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, mode_t mode); } 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, cpusetid_t setid); } SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, cpuwhich_t which, id_t id, cpusetid_t *setid); } SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, cpuset_t *mask); } SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, const cpuset_t *mask); } SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, int flag); } SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, int flag); } SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, gid_t gid, int flag); } SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, char **envv); } SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, struct timeval *times); } SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, char *path2, int flag); } 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_OPENAT = 499 // { int openat(int fd, char *path, int flag, mode_t mode); } SYS_READLINKAT = 500 // { ssize_t readlinkat(int fd, char *path, char *buf, size_t bufsize); } SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, char *new); } SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, char *path2); } SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); } SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); } SYS_GSSD_SYSCALL = 505 // { int gssd_syscall(char *path); } SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, unsigned int iovcnt, int flags); } SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, unsigned int iovcnt, int flags); } SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); } SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); } SYS___SEMCTL = 510 // { int __semctl(int semid, int semnum, int cmd, union semun *arg); } SYS_MSGCTL = 511 // { int msgctl(int msqid, int cmd, struct msqid_ds *buf); } SYS_SHMCTL = 512 // { int shmctl(int shmid, int cmd, struct shmid_ds *buf); } SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); } SYS___CAP_RIGHTS_GET = 515 // { int __cap_rights_get(int version, int fd, cap_rights_t *rightsp); } 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, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *sm); } SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, size_t namelen); } SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); } SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); } SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); } SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); } SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); } SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); } SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, off_t offset, off_t len); } SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, off_t len, int advice); } SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, int *status, int options, struct __wrusage *wrusage, siginfo_t *info); } SYS_CAP_RIGHTS_LIMIT = 533 // { int cap_rights_limit(int fd, cap_rights_t *rightsp); } SYS_CAP_IOCTLS_LIMIT = 534 // { int cap_ioctls_limit(int fd, const u_long *cmds, size_t ncmds); } SYS_CAP_IOCTLS_GET = 535 // { ssize_t cap_ioctls_get(int fd, u_long *cmds, size_t maxcmds); } SYS_CAP_FCNTLS_LIMIT = 536 // { int cap_fcntls_limit(int fd, uint32_t fcntlrights); } SYS_CAP_FCNTLS_GET = 537 // { int cap_fcntls_get(int fd, uint32_t *fcntlrightsp); } SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, int namelen); } SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, int namelen); } SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, u_long flags, int atflag); } SYS_ACCEPT4 = 541 // { int accept4(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen, int flags); } SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); } SYS_AIO_MLOCK = 543 // { int aio_mlock(struct aiocb *aiocbp); } SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, int com, void *data); } SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *set); } SYS_FUTIMENS = 546 // { int futimens(int fd, struct timespec *times); } SYS_UTIMENSAT = 547 // { int utimensat(int fd, char *path, struct timespec *times, int flag); } SYS_FDATASYNC = 550 // { int fdatasync(int fd); } SYS_FSTAT = 551 // { int fstat(int fd, struct stat *sb); } SYS_FSTATAT = 552 // { int fstatat(int fd, char *path, struct stat *buf, int flag); } SYS_FHSTAT = 553 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); } SYS_GETDIRENTRIES = 554 // { ssize_t getdirentries(int fd, char *buf, size_t count, off_t *basep); } SYS_STATFS = 555 // { int statfs(char *path, struct statfs *buf); } SYS_FSTATFS = 556 // { int fstatfs(int fd, struct statfs *buf); } SYS_GETFSSTAT = 557 // { int getfsstat(struct statfs *buf, long bufsize, int mode); } SYS_FHSTATFS = 558 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); } SYS_MKNODAT = 559 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); } SYS_KEVENT = 560 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); } SYS_CPUSET_GETDOMAIN = 561 // { int cpuset_getdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int *policy); } SYS_CPUSET_SETDOMAIN = 562 // { int cpuset_setdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int policy); } SYS_GETRANDOM = 563 // { int getrandom(void *buf, size_t buflen, unsigned int flags); } SYS_GETFHAT = 564 // { int getfhat(int fd, char *path, struct fhandle *fhp, int flags); } SYS_FHLINK = 565 // { int fhlink(struct fhandle *fhp, const char *to); } SYS_FHLINKAT = 566 // { int fhlinkat(struct fhandle *fhp, int tofd, const char *to,); } SYS_FHREADLINK = 567 // { int fhreadlink(struct fhandle *fhp, char *buf, size_t bufsize); } SYS___SYSCTLBYNAME = 570 // { int __sysctlbyname(const char *name, size_t namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } SYS_CLOSE_RANGE = 575 // { int close_range(u_int lowfd, u_int highfd, int flags); } ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm64.go ================================================ // go run mksysnum.go https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12 // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && freebsd package unix const ( // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int SYS_EXIT = 1 // { void sys_exit(int rval); } exit sys_exit_args void 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, struct rusage *rusage); } 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_CHMOD = 15 // { int chmod(char *path, int mode); } SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); } SYS_BREAK = 17 // { caddr_t break(char *nsize); } SYS_GETPID = 20 // { pid_t getpid(void); } SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, caddr_t data); } 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, int data); } SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, int flags); } SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, int flags); } SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, size_t len, int flags, struct sockaddr * __restrict from, __socklen_t * __restrict fromlenaddr); } SYS_ACCEPT = 30 // { int accept(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen); } SYS_GETPEERNAME = 31 // { int getpeername(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); } SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); } 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_GETEGID = 43 // { gid_t getegid(void); } SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, size_t offset, u_int scale); } SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, int pid); } 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 // { ssize_t readlink(char *path, char *buf, size_t count); } SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); } SYS_UMASK = 60 // { int umask(int newmask); } SYS_CHROOT = 61 // { int chroot(char *path); } SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); } SYS_VFORK = 66 // { int 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, char *vec); } 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, struct itimerval *oitv); } 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, fd_set *ex, struct timeval *tv); } 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, caddr_t val, int valsize); } SYS_LISTEN = 106 // { int listen(int s, int backlog); } SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, struct timezone *tzp); } SYS_GETRUSAGE = 117 // { int getrusage(int who, struct rusage *rusage); } SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, caddr_t val, int *avalsize); } SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); } SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, u_int iovcnt); } SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, struct timezone *tzp); } 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, int flags, caddr_t to, int tolen); } SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); } SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, int protocol, int *rsv); } 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, struct timeval *olddelta); } SYS_SETSID = 147 // { int setsid(void); } SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, caddr_t arg); } SYS_NLM_SYSCALL = 154 // { int nlm_syscall(int debug_level, int grace_period, int addr_count, char **addrs); } SYS_NFSSVC = 155 // { int nfssvc(int flag, caddr_t argp); } SYS_LGETFH = 160 // { int lgetfh(char *fname, struct fhandle *fhp); } SYS_GETFH = 161 // { int getfh(char *fname, struct fhandle *fhp); } SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); } SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, struct rtprio *rtp); } SYS_SEMSYS = 169 // { int semsys(int which, int a2, int a3, int a4, int a5); } SYS_MSGSYS = 170 // { int msgsys(int which, int a2, int a3, int a4, int a5, int a6); } SYS_SHMSYS = 171 // { int shmsys(int which, int a2, int a3, int a4); } 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_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, struct rlimit *rlp); } getrlimit __getrlimit_args int SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } __sysctl sysctl_args int 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, int timeout); } SYS_SEMGET = 221 // { int semget(key_t key, int nsems, int semflg); } SYS_SEMOP = 222 // { int semop(int semid, struct sembuf *sops, size_t nsops); } SYS_MSGGET = 225 // { int msgget(key_t key, int msgflg); } SYS_MSGSND = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); } SYS_MSGRCV = 227 // { ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); } SYS_SHMAT = 228 // { int shmat(int shmid, const void *shmaddr, int shmflg); } 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, struct timespec *tp); } SYS_CLOCK_SETTIME = 233 // { int clock_settime(clockid_t clock_id, const struct timespec *tp); } SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, struct timespec *tp); } SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, struct sigevent *evp, int *timerid); } SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); } SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); } SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct itimerspec *value); } SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); } SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); } SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); } SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate(struct ffclock_estimate *cest); } SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate(struct ffclock_estimate *cest); } SYS_CLOCK_NANOSLEEP = 244 // { int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp); } SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id, int which, clockid_t *clock_id); } SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); } SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, int inherit); } SYS_RFORK = 251 // { int rfork(int flags); } SYS_ISSETUGID = 253 // { int issetugid(void); } SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); } SYS_AIO_READ = 255 // { int aio_read(struct aiocb *aiocbp); } SYS_AIO_WRITE = 256 // { int aio_write(struct aiocb *aiocbp); } SYS_LIO_LISTIO = 257 // { int lio_listio(int mode, struct aiocb* const *acb_list, int nent, struct sigevent *sig); } SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); } SYS_LUTIMES = 276 // { int lutimes(char *path, struct timeval *tptr); } SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); } SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); } 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 // { ssize_t 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_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, size_t 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, sigset_t *oset); } 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, siginfo_t *info, const struct timespec *timeout); } SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, siginfo_t *info); } SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, acl_type_t type, struct acl *aclp); } SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, acl_type_t type, struct acl *aclp); } SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, acl_type_t type, struct acl *aclp); } SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, acl_type_t type, struct acl *aclp); } SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, acl_type_t type); } 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, acl_type_t type, struct acl *aclp); } SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, struct acl *aclp); } SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); } SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, int attrnamespace, const char *attrname); } SYS_AIO_WAITCOMPLETE = 359 // { ssize_t 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_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, int attrnamespace, const char *attrname); } SYS___SETUGID = 374 // { int __setugid(int flag); } SYS_EACCESS = 376 // { int eaccess(char *path, int amode); } SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, unsigned int iovcnt, int flags); } 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, struct mac *mac_p); } SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, struct mac *mac_p); } SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, struct mac *mac_p); } SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, struct mac *mac_p); } SYS_KENV = 390 // { int kenv(int what, const char *name, char *value, int len); } SYS_LCHFLAGS = 391 // { int lchflags(const char *path, u_long 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, struct sf_hdtr *hdtr, off_t *sbytes, int flags); } SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, int call, void *arg); } SYS_KSEM_CLOSE = 400 // { int ksem_close(semid_t id); } SYS_KSEM_POST = 401 // { int ksem_post(semid_t id); } SYS_KSEM_WAIT = 402 // { int ksem_wait(semid_t id); } SYS_KSEM_TRYWAIT = 403 // { int ksem_trywait(semid_t id); } SYS_KSEM_INIT = 404 // { int ksem_init(semid_t *idp, unsigned int value); } SYS_KSEM_OPEN = 405 // { int ksem_open(semid_t *idp, const char *name, int oflag, mode_t mode, unsigned int value); } SYS_KSEM_UNLINK = 406 // { int ksem_unlink(const char *name); } SYS_KSEM_GETVALUE = 407 // { int ksem_getvalue(semid_t id, int *val); } SYS_KSEM_DESTROY = 408 // { int ksem_destroy(semid_t id); } SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, struct mac *mac_p); } SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, struct mac *mac_p); } SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, struct mac *mac_p); } SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link(const char *path, int attrnamespace, const char *attrname); } SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, char **envv, struct mac *mac_p); } SYS_SIGACTION = 416 // { int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); } SYS_SIGRETURN = 417 // { int sigreturn(const struct __ucontext *sigcntxp); } SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); } SYS_SETCONTEXT = 422 // { int setcontext(const struct __ucontext *ucp); } SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, const struct __ucontext *ucp); } SYS_SWAPOFF = 424 // { int swapoff(const char *name); } SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, acl_type_t type, struct acl *aclp); } SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, acl_type_t type, struct acl *aclp); } SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, acl_type_t type); } SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, acl_type_t type, struct acl *aclp); } SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, int *sig); } SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, int flags); } 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_JAIL_ATTACH = 436 // { int jail_attach(int jid); } SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); } SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); } SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); } SYS_KSEM_TIMEDWAIT = 441 // { int ksem_timedwait(semid_t id, const struct timespec *abstime); } SYS_THR_SUSPEND = 442 // { int thr_suspend(const struct timespec *timeout); } 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, u_int length); } SYS_AUDITON = 446 // { int auditon(int cmd, void *data, u_int length); } 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(struct auditinfo_addr *auditinfo_addr, u_int length); } SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); } SYS_AUDITCTL = 453 // { int auditctl(char *path); } SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, u_long val, void *uaddr1, void *uaddr2); } SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, int param_size); } SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); } SYS_KMQ_OPEN = 457 // { int kmq_open(const char *path, int flags, mode_t mode, const struct mq_attr *attr); } SYS_KMQ_SETATTR = 458 // { int kmq_setattr(int mqd, const struct mq_attr *attr, struct mq_attr *oattr); } SYS_KMQ_TIMEDRECEIVE = 459 // { int kmq_timedreceive(int mqd, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); } SYS_KMQ_TIMEDSEND = 460 // { int kmq_timedsend(int mqd, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec *abs_timeout); } SYS_KMQ_NOTIFY = 461 // { int kmq_notify(int mqd, const struct sigevent *sigev); } SYS_KMQ_UNLINK = 462 // { int kmq_unlink(const char *path); } 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_AIO_FSYNC = 465 // { int aio_fsync(int op, struct aiocb *aiocbp); } SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, lwpid_t lwpid, struct rtprio *rtp); } 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, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); } SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); } SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr *from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); } SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, size_t nbyte, off_t offset); } SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, size_t nbyte, off_t offset); } SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t pos); } SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, int whence); } 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, mode_t mode); } 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, cpusetid_t setid); } SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, cpuwhich_t which, id_t id, cpusetid_t *setid); } SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, cpuset_t *mask); } SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, const cpuset_t *mask); } SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, int flag); } SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, int flag); } SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, gid_t gid, int flag); } SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, char **envv); } SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, struct timeval *times); } SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, char *path2, int flag); } 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_OPENAT = 499 // { int openat(int fd, char *path, int flag, mode_t mode); } SYS_READLINKAT = 500 // { ssize_t readlinkat(int fd, char *path, char *buf, size_t bufsize); } SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, char *new); } SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, char *path2); } SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); } SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); } SYS_GSSD_SYSCALL = 505 // { int gssd_syscall(char *path); } SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, unsigned int iovcnt, int flags); } SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, unsigned int iovcnt, int flags); } SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); } SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); } SYS___SEMCTL = 510 // { int __semctl(int semid, int semnum, int cmd, union semun *arg); } SYS_MSGCTL = 511 // { int msgctl(int msqid, int cmd, struct msqid_ds *buf); } SYS_SHMCTL = 512 // { int shmctl(int shmid, int cmd, struct shmid_ds *buf); } SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); } SYS___CAP_RIGHTS_GET = 515 // { int __cap_rights_get(int version, int fd, cap_rights_t *rightsp); } 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, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *sm); } SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, size_t namelen); } SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); } SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); } SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); } SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); } SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); } SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); } SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, off_t offset, off_t len); } SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, off_t len, int advice); } SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, int *status, int options, struct __wrusage *wrusage, siginfo_t *info); } SYS_CAP_RIGHTS_LIMIT = 533 // { int cap_rights_limit(int fd, cap_rights_t *rightsp); } SYS_CAP_IOCTLS_LIMIT = 534 // { int cap_ioctls_limit(int fd, const u_long *cmds, size_t ncmds); } SYS_CAP_IOCTLS_GET = 535 // { ssize_t cap_ioctls_get(int fd, u_long *cmds, size_t maxcmds); } SYS_CAP_FCNTLS_LIMIT = 536 // { int cap_fcntls_limit(int fd, uint32_t fcntlrights); } SYS_CAP_FCNTLS_GET = 537 // { int cap_fcntls_get(int fd, uint32_t *fcntlrightsp); } SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, int namelen); } SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, int namelen); } SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, u_long flags, int atflag); } SYS_ACCEPT4 = 541 // { int accept4(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen, int flags); } SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); } SYS_AIO_MLOCK = 543 // { int aio_mlock(struct aiocb *aiocbp); } SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, int com, void *data); } SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *set); } SYS_FUTIMENS = 546 // { int futimens(int fd, struct timespec *times); } SYS_UTIMENSAT = 547 // { int utimensat(int fd, char *path, struct timespec *times, int flag); } SYS_FDATASYNC = 550 // { int fdatasync(int fd); } SYS_FSTAT = 551 // { int fstat(int fd, struct stat *sb); } SYS_FSTATAT = 552 // { int fstatat(int fd, char *path, struct stat *buf, int flag); } SYS_FHSTAT = 553 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); } SYS_GETDIRENTRIES = 554 // { ssize_t getdirentries(int fd, char *buf, size_t count, off_t *basep); } SYS_STATFS = 555 // { int statfs(char *path, struct statfs *buf); } SYS_FSTATFS = 556 // { int fstatfs(int fd, struct statfs *buf); } SYS_GETFSSTAT = 557 // { int getfsstat(struct statfs *buf, long bufsize, int mode); } SYS_FHSTATFS = 558 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); } SYS_MKNODAT = 559 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); } SYS_KEVENT = 560 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); } SYS_CPUSET_GETDOMAIN = 561 // { int cpuset_getdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int *policy); } SYS_CPUSET_SETDOMAIN = 562 // { int cpuset_setdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int policy); } SYS_GETRANDOM = 563 // { int getrandom(void *buf, size_t buflen, unsigned int flags); } SYS_GETFHAT = 564 // { int getfhat(int fd, char *path, struct fhandle *fhp, int flags); } SYS_FHLINK = 565 // { int fhlink(struct fhandle *fhp, const char *to); } SYS_FHLINKAT = 566 // { int fhlinkat(struct fhandle *fhp, int tofd, const char *to,); } SYS_FHREADLINK = 567 // { int fhreadlink(struct fhandle *fhp, char *buf, size_t bufsize); } SYS___SYSCTLBYNAME = 570 // { int __sysctlbyname(const char *name, size_t namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } SYS_CLOSE_RANGE = 575 // { int close_range(u_int lowfd, u_int highfd, int flags); } ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_freebsd_riscv64.go ================================================ // go run mksysnum.go https://cgit.freebsd.org/src/plain/sys/kern/syscalls.master?h=stable/12 // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && freebsd package unix const ( // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int SYS_EXIT = 1 // { void sys_exit(int rval); } exit sys_exit_args void 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, struct rusage *rusage); } 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_CHMOD = 15 // { int chmod(char *path, int mode); } SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); } SYS_BREAK = 17 // { caddr_t break(char *nsize); } SYS_GETPID = 20 // { pid_t getpid(void); } SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, caddr_t data); } 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, int data); } SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, int flags); } SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, int flags); } SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, size_t len, int flags, struct sockaddr * __restrict from, __socklen_t * __restrict fromlenaddr); } SYS_ACCEPT = 30 // { int accept(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen); } SYS_GETPEERNAME = 31 // { int getpeername(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); } SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, struct sockaddr * __restrict asa, __socklen_t * __restrict alen); } 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_GETEGID = 43 // { gid_t getegid(void); } SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, size_t offset, u_int scale); } SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, int pid); } 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 // { ssize_t readlink(char *path, char *buf, size_t count); } SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); } SYS_UMASK = 60 // { int umask(int newmask); } SYS_CHROOT = 61 // { int chroot(char *path); } SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); } SYS_VFORK = 66 // { int 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, char *vec); } 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, struct itimerval *oitv); } 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, fd_set *ex, struct timeval *tv); } 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, caddr_t val, int valsize); } SYS_LISTEN = 106 // { int listen(int s, int backlog); } SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, struct timezone *tzp); } SYS_GETRUSAGE = 117 // { int getrusage(int who, struct rusage *rusage); } SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, caddr_t val, int *avalsize); } SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); } SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, u_int iovcnt); } SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, struct timezone *tzp); } 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, int flags, caddr_t to, int tolen); } SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); } SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, int protocol, int *rsv); } 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, struct timeval *olddelta); } SYS_SETSID = 147 // { int setsid(void); } SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, caddr_t arg); } SYS_NLM_SYSCALL = 154 // { int nlm_syscall(int debug_level, int grace_period, int addr_count, char **addrs); } SYS_NFSSVC = 155 // { int nfssvc(int flag, caddr_t argp); } SYS_LGETFH = 160 // { int lgetfh(char *fname, struct fhandle *fhp); } SYS_GETFH = 161 // { int getfh(char *fname, struct fhandle *fhp); } SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); } SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, struct rtprio *rtp); } SYS_SEMSYS = 169 // { int semsys(int which, int a2, int a3, int a4, int a5); } SYS_MSGSYS = 170 // { int msgsys(int which, int a2, int a3, int a4, int a5, int a6); } SYS_SHMSYS = 171 // { int shmsys(int which, int a2, int a3, int a4); } 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_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, struct rlimit *rlp); } getrlimit __getrlimit_args int SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, struct rlimit *rlp); } setrlimit __setrlimit_args int SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } __sysctl sysctl_args int 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, int timeout); } SYS_SEMGET = 221 // { int semget(key_t key, int nsems, int semflg); } SYS_SEMOP = 222 // { int semop(int semid, struct sembuf *sops, size_t nsops); } SYS_MSGGET = 225 // { int msgget(key_t key, int msgflg); } SYS_MSGSND = 226 // { int msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); } SYS_MSGRCV = 227 // { ssize_t msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); } SYS_SHMAT = 228 // { int shmat(int shmid, const void *shmaddr, int shmflg); } 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, struct timespec *tp); } SYS_CLOCK_SETTIME = 233 // { int clock_settime(clockid_t clock_id, const struct timespec *tp); } SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, struct timespec *tp); } SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, struct sigevent *evp, int *timerid); } SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); } SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); } SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct itimerspec *value); } SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); } SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); } SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); } SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate(struct ffclock_estimate *cest); } SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate(struct ffclock_estimate *cest); } SYS_CLOCK_NANOSLEEP = 244 // { int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp); } SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id, int which, clockid_t *clock_id); } SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); } SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, int inherit); } SYS_RFORK = 251 // { int rfork(int flags); } SYS_ISSETUGID = 253 // { int issetugid(void); } SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); } SYS_AIO_READ = 255 // { int aio_read(struct aiocb *aiocbp); } SYS_AIO_WRITE = 256 // { int aio_write(struct aiocb *aiocbp); } SYS_LIO_LISTIO = 257 // { int lio_listio(int mode, struct aiocb* const *acb_list, int nent, struct sigevent *sig); } SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); } SYS_LUTIMES = 276 // { int lutimes(char *path, struct timeval *tptr); } SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); } SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, u_int iovcnt, off_t offset); } 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 // { ssize_t 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_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, size_t 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, sigset_t *oset); } 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, siginfo_t *info, const struct timespec *timeout); } SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, siginfo_t *info); } SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, acl_type_t type, struct acl *aclp); } SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, acl_type_t type, struct acl *aclp); } SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, acl_type_t type, struct acl *aclp); } SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, acl_type_t type, struct acl *aclp); } SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, acl_type_t type); } 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, acl_type_t type, struct acl *aclp); } SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, struct acl *aclp); } SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); } SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, int attrnamespace, const char *attrname); } SYS_AIO_WAITCOMPLETE = 359 // { ssize_t 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_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, int attrnamespace, const char *attrname); } SYS___SETUGID = 374 // { int __setugid(int flag); } SYS_EACCESS = 376 // { int eaccess(char *path, int amode); } SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, unsigned int iovcnt, int flags); } 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, struct mac *mac_p); } SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, struct mac *mac_p); } SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, struct mac *mac_p); } SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, struct mac *mac_p); } SYS_KENV = 390 // { int kenv(int what, const char *name, char *value, int len); } SYS_LCHFLAGS = 391 // { int lchflags(const char *path, u_long 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, struct sf_hdtr *hdtr, off_t *sbytes, int flags); } SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, int call, void *arg); } SYS_KSEM_CLOSE = 400 // { int ksem_close(semid_t id); } SYS_KSEM_POST = 401 // { int ksem_post(semid_t id); } SYS_KSEM_WAIT = 402 // { int ksem_wait(semid_t id); } SYS_KSEM_TRYWAIT = 403 // { int ksem_trywait(semid_t id); } SYS_KSEM_INIT = 404 // { int ksem_init(semid_t *idp, unsigned int value); } SYS_KSEM_OPEN = 405 // { int ksem_open(semid_t *idp, const char *name, int oflag, mode_t mode, unsigned int value); } SYS_KSEM_UNLINK = 406 // { int ksem_unlink(const char *name); } SYS_KSEM_GETVALUE = 407 // { int ksem_getvalue(semid_t id, int *val); } SYS_KSEM_DESTROY = 408 // { int ksem_destroy(semid_t id); } SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, struct mac *mac_p); } SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, struct mac *mac_p); } SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, struct mac *mac_p); } SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link(const char *path, int attrnamespace, const char *attrname); } SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, char **envv, struct mac *mac_p); } SYS_SIGACTION = 416 // { int sigaction(int sig, const struct sigaction *act, struct sigaction *oact); } SYS_SIGRETURN = 417 // { int sigreturn(const struct __ucontext *sigcntxp); } SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); } SYS_SETCONTEXT = 422 // { int setcontext(const struct __ucontext *ucp); } SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, const struct __ucontext *ucp); } SYS_SWAPOFF = 424 // { int swapoff(const char *name); } SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, acl_type_t type, struct acl *aclp); } SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, acl_type_t type, struct acl *aclp); } SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, acl_type_t type); } SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, acl_type_t type, struct acl *aclp); } SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, int *sig); } SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, int flags); } 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_JAIL_ATTACH = 436 // { int jail_attach(int jid); } SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); } SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); } SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); } SYS_KSEM_TIMEDWAIT = 441 // { int ksem_timedwait(semid_t id, const struct timespec *abstime); } SYS_THR_SUSPEND = 442 // { int thr_suspend(const struct timespec *timeout); } 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, u_int length); } SYS_AUDITON = 446 // { int auditon(int cmd, void *data, u_int length); } 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(struct auditinfo_addr *auditinfo_addr, u_int length); } SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr(struct auditinfo_addr *auditinfo_addr, u_int length); } SYS_AUDITCTL = 453 // { int auditctl(char *path); } SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, u_long val, void *uaddr1, void *uaddr2); } SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, int param_size); } SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); } SYS_KMQ_OPEN = 457 // { int kmq_open(const char *path, int flags, mode_t mode, const struct mq_attr *attr); } SYS_KMQ_SETATTR = 458 // { int kmq_setattr(int mqd, const struct mq_attr *attr, struct mq_attr *oattr); } SYS_KMQ_TIMEDRECEIVE = 459 // { int kmq_timedreceive(int mqd, char *msg_ptr, size_t msg_len, unsigned *msg_prio, const struct timespec *abs_timeout); } SYS_KMQ_TIMEDSEND = 460 // { int kmq_timedsend(int mqd, const char *msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec *abs_timeout); } SYS_KMQ_NOTIFY = 461 // { int kmq_notify(int mqd, const struct sigevent *sigev); } SYS_KMQ_UNLINK = 462 // { int kmq_unlink(const char *path); } 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_AIO_FSYNC = 465 // { int aio_fsync(int op, struct aiocb *aiocbp); } SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, lwpid_t lwpid, struct rtprio *rtp); } 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, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); } SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, caddr_t to, __socklen_t tolen, struct sctp_sndrcvinfo *sinfo, int flags); } SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, struct sockaddr *from, __socklen_t *fromlenaddr, struct sctp_sndrcvinfo *sinfo, int *msg_flags); } SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, size_t nbyte, off_t offset); } SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, size_t nbyte, off_t offset); } SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t pos); } SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, int whence); } 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, mode_t mode); } 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, cpusetid_t setid); } SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, cpuwhich_t which, id_t id, cpusetid_t *setid); } SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, cpuset_t *mask); } SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, const cpuset_t *mask); } SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, int flag); } SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, int flag); } SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, gid_t gid, int flag); } SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, char **envv); } SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, struct timeval *times); } SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, char *path2, int flag); } 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_OPENAT = 499 // { int openat(int fd, char *path, int flag, mode_t mode); } SYS_READLINKAT = 500 // { ssize_t readlinkat(int fd, char *path, char *buf, size_t bufsize); } SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, char *new); } SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, char *path2); } SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); } SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); } SYS_GSSD_SYSCALL = 505 // { int gssd_syscall(char *path); } SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, unsigned int iovcnt, int flags); } SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, unsigned int iovcnt, int flags); } SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); } SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); } SYS___SEMCTL = 510 // { int __semctl(int semid, int semnum, int cmd, union semun *arg); } SYS_MSGCTL = 511 // { int msgctl(int msqid, int cmd, struct msqid_ds *buf); } SYS_SHMCTL = 512 // { int shmctl(int shmid, int cmd, struct shmid_ds *buf); } SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); } SYS___CAP_RIGHTS_GET = 515 // { int __cap_rights_get(int version, int fd, cap_rights_t *rightsp); } 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, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *sm); } SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, size_t namelen); } SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); } SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); } SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); } SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); } SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); } SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, size_t inbuflen, void *outbufp, size_t outbuflen); } SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, off_t offset, off_t len); } SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, off_t len, int advice); } SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, int *status, int options, struct __wrusage *wrusage, siginfo_t *info); } SYS_CAP_RIGHTS_LIMIT = 533 // { int cap_rights_limit(int fd, cap_rights_t *rightsp); } SYS_CAP_IOCTLS_LIMIT = 534 // { int cap_ioctls_limit(int fd, const u_long *cmds, size_t ncmds); } SYS_CAP_IOCTLS_GET = 535 // { ssize_t cap_ioctls_get(int fd, u_long *cmds, size_t maxcmds); } SYS_CAP_FCNTLS_LIMIT = 536 // { int cap_fcntls_limit(int fd, uint32_t fcntlrights); } SYS_CAP_FCNTLS_GET = 537 // { int cap_fcntls_get(int fd, uint32_t *fcntlrightsp); } SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, int namelen); } SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, int namelen); } SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, u_long flags, int atflag); } SYS_ACCEPT4 = 541 // { int accept4(int s, struct sockaddr * __restrict name, __socklen_t * __restrict anamelen, int flags); } SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); } SYS_AIO_MLOCK = 543 // { int aio_mlock(struct aiocb *aiocbp); } SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, int com, void *data); } SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *set); } SYS_FUTIMENS = 546 // { int futimens(int fd, struct timespec *times); } SYS_UTIMENSAT = 547 // { int utimensat(int fd, char *path, struct timespec *times, int flag); } SYS_FDATASYNC = 550 // { int fdatasync(int fd); } SYS_FSTAT = 551 // { int fstat(int fd, struct stat *sb); } SYS_FSTATAT = 552 // { int fstatat(int fd, char *path, struct stat *buf, int flag); } SYS_FHSTAT = 553 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); } SYS_GETDIRENTRIES = 554 // { ssize_t getdirentries(int fd, char *buf, size_t count, off_t *basep); } SYS_STATFS = 555 // { int statfs(char *path, struct statfs *buf); } SYS_FSTATFS = 556 // { int fstatfs(int fd, struct statfs *buf); } SYS_GETFSSTAT = 557 // { int getfsstat(struct statfs *buf, long bufsize, int mode); } SYS_FHSTATFS = 558 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); } SYS_MKNODAT = 559 // { int mknodat(int fd, char *path, mode_t mode, dev_t dev); } SYS_KEVENT = 560 // { int kevent(int fd, struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); } SYS_CPUSET_GETDOMAIN = 561 // { int cpuset_getdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int *policy); } SYS_CPUSET_SETDOMAIN = 562 // { int cpuset_setdomain(cpulevel_t level, cpuwhich_t which, id_t id, size_t domainsetsize, domainset_t *mask, int policy); } SYS_GETRANDOM = 563 // { int getrandom(void *buf, size_t buflen, unsigned int flags); } SYS_GETFHAT = 564 // { int getfhat(int fd, char *path, struct fhandle *fhp, int flags); } SYS_FHLINK = 565 // { int fhlink(struct fhandle *fhp, const char *to); } SYS_FHLINKAT = 566 // { int fhlinkat(struct fhandle *fhp, int tofd, const char *to,); } SYS_FHREADLINK = 567 // { int fhreadlink(struct fhandle *fhp, char *buf, size_t bufsize); } SYS___SYSCTLBYNAME = 570 // { int __sysctlbyname(const char *name, size_t namelen, void *old, size_t *oldlenp, void *new, size_t newlen); } SYS_CLOSE_RANGE = 575 // { int close_range(u_int lowfd, u_int highfd, int flags); } ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_linux_386.go ================================================ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/386/include -m32 /tmp/386/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. //go: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_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 SYS_KCMP = 349 SYS_FINIT_MODULE = 350 SYS_SCHED_SETATTR = 351 SYS_SCHED_GETATTR = 352 SYS_RENAMEAT2 = 353 SYS_SECCOMP = 354 SYS_GETRANDOM = 355 SYS_MEMFD_CREATE = 356 SYS_BPF = 357 SYS_EXECVEAT = 358 SYS_SOCKET = 359 SYS_SOCKETPAIR = 360 SYS_BIND = 361 SYS_CONNECT = 362 SYS_LISTEN = 363 SYS_ACCEPT4 = 364 SYS_GETSOCKOPT = 365 SYS_SETSOCKOPT = 366 SYS_GETSOCKNAME = 367 SYS_GETPEERNAME = 368 SYS_SENDTO = 369 SYS_SENDMSG = 370 SYS_RECVFROM = 371 SYS_RECVMSG = 372 SYS_SHUTDOWN = 373 SYS_USERFAULTFD = 374 SYS_MEMBARRIER = 375 SYS_MLOCK2 = 376 SYS_COPY_FILE_RANGE = 377 SYS_PREADV2 = 378 SYS_PWRITEV2 = 379 SYS_PKEY_MPROTECT = 380 SYS_PKEY_ALLOC = 381 SYS_PKEY_FREE = 382 SYS_STATX = 383 SYS_ARCH_PRCTL = 384 SYS_IO_PGETEVENTS = 385 SYS_RSEQ = 386 SYS_SEMGET = 393 SYS_SEMCTL = 394 SYS_SHMGET = 395 SYS_SHMCTL = 396 SYS_SHMAT = 397 SYS_SHMDT = 398 SYS_MSGGET = 399 SYS_MSGSND = 400 SYS_MSGRCV = 401 SYS_MSGCTL = 402 SYS_CLOCK_GETTIME64 = 403 SYS_CLOCK_SETTIME64 = 404 SYS_CLOCK_ADJTIME64 = 405 SYS_CLOCK_GETRES_TIME64 = 406 SYS_CLOCK_NANOSLEEP_TIME64 = 407 SYS_TIMER_GETTIME64 = 408 SYS_TIMER_SETTIME64 = 409 SYS_TIMERFD_GETTIME64 = 410 SYS_TIMERFD_SETTIME64 = 411 SYS_UTIMENSAT_TIME64 = 412 SYS_PSELECT6_TIME64 = 413 SYS_PPOLL_TIME64 = 414 SYS_IO_PGETEVENTS_TIME64 = 416 SYS_RECVMMSG_TIME64 = 417 SYS_MQ_TIMEDSEND_TIME64 = 418 SYS_MQ_TIMEDRECEIVE_TIME64 = 419 SYS_SEMTIMEDOP_TIME64 = 420 SYS_RT_SIGTIMEDWAIT_TIME64 = 421 SYS_FUTEX_TIME64 = 422 SYS_SCHED_RR_GET_INTERVAL_TIME64 = 423 SYS_PIDFD_SEND_SIGNAL = 424 SYS_IO_URING_SETUP = 425 SYS_IO_URING_ENTER = 426 SYS_IO_URING_REGISTER = 427 SYS_OPEN_TREE = 428 SYS_MOVE_MOUNT = 429 SYS_FSOPEN = 430 SYS_FSCONFIG = 431 SYS_FSMOUNT = 432 SYS_FSPICK = 433 SYS_PIDFD_OPEN = 434 SYS_CLONE3 = 435 SYS_CLOSE_RANGE = 436 SYS_OPENAT2 = 437 SYS_PIDFD_GETFD = 438 SYS_FACCESSAT2 = 439 SYS_PROCESS_MADVISE = 440 SYS_EPOLL_PWAIT2 = 441 SYS_MOUNT_SETATTR = 442 SYS_QUOTACTL_FD = 443 SYS_LANDLOCK_CREATE_RULESET = 444 SYS_LANDLOCK_ADD_RULE = 445 SYS_LANDLOCK_RESTRICT_SELF = 446 SYS_MEMFD_SECRET = 447 SYS_PROCESS_MRELEASE = 448 SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 SYS_MAP_SHADOW_STACK = 453 SYS_FUTEX_WAKE = 454 SYS_FUTEX_WAIT = 455 SYS_FUTEX_REQUEUE = 456 SYS_STATMOUNT = 457 SYS_LISTMOUNT = 458 SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 SYS_MSEAL = 462 ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go ================================================ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/amd64/include -m64 /tmp/amd64/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. //go: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 SYS_KCMP = 312 SYS_FINIT_MODULE = 313 SYS_SCHED_SETATTR = 314 SYS_SCHED_GETATTR = 315 SYS_RENAMEAT2 = 316 SYS_SECCOMP = 317 SYS_GETRANDOM = 318 SYS_MEMFD_CREATE = 319 SYS_KEXEC_FILE_LOAD = 320 SYS_BPF = 321 SYS_EXECVEAT = 322 SYS_USERFAULTFD = 323 SYS_MEMBARRIER = 324 SYS_MLOCK2 = 325 SYS_COPY_FILE_RANGE = 326 SYS_PREADV2 = 327 SYS_PWRITEV2 = 328 SYS_PKEY_MPROTECT = 329 SYS_PKEY_ALLOC = 330 SYS_PKEY_FREE = 331 SYS_STATX = 332 SYS_IO_PGETEVENTS = 333 SYS_RSEQ = 334 SYS_PIDFD_SEND_SIGNAL = 424 SYS_IO_URING_SETUP = 425 SYS_IO_URING_ENTER = 426 SYS_IO_URING_REGISTER = 427 SYS_OPEN_TREE = 428 SYS_MOVE_MOUNT = 429 SYS_FSOPEN = 430 SYS_FSCONFIG = 431 SYS_FSMOUNT = 432 SYS_FSPICK = 433 SYS_PIDFD_OPEN = 434 SYS_CLONE3 = 435 SYS_CLOSE_RANGE = 436 SYS_OPENAT2 = 437 SYS_PIDFD_GETFD = 438 SYS_FACCESSAT2 = 439 SYS_PROCESS_MADVISE = 440 SYS_EPOLL_PWAIT2 = 441 SYS_MOUNT_SETATTR = 442 SYS_QUOTACTL_FD = 443 SYS_LANDLOCK_CREATE_RULESET = 444 SYS_LANDLOCK_ADD_RULE = 445 SYS_LANDLOCK_RESTRICT_SELF = 446 SYS_MEMFD_SECRET = 447 SYS_PROCESS_MRELEASE = 448 SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 SYS_MAP_SHADOW_STACK = 453 SYS_FUTEX_WAKE = 454 SYS_FUTEX_WAIT = 455 SYS_FUTEX_REQUEUE = 456 SYS_STATMOUNT = 457 SYS_LISTMOUNT = 458 SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 SYS_MSEAL = 462 ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go ================================================ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/arm/include /tmp/arm/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && linux package unix const ( SYS_SYSCALL_MASK = 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_MKNOD = 14 SYS_CHMOD = 15 SYS_LCHOWN = 16 SYS_LSEEK = 19 SYS_GETPID = 20 SYS_MOUNT = 21 SYS_SETUID = 23 SYS_GETUID = 24 SYS_PTRACE = 26 SYS_PAUSE = 29 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_GETRUSAGE = 77 SYS_GETTIMEOFDAY = 78 SYS_SETTIMEOFDAY = 79 SYS_GETGROUPS = 80 SYS_SETGROUPS = 81 SYS_SYMLINK = 83 SYS_READLINK = 85 SYS_USELIB = 86 SYS_SWAPON = 87 SYS_REBOOT = 88 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_SYSLOG = 103 SYS_SETITIMER = 104 SYS_GETITIMER = 105 SYS_STAT = 106 SYS_LSTAT = 107 SYS_FSTAT = 108 SYS_VHANGUP = 111 SYS_WAIT4 = 114 SYS_SWAPOFF = 115 SYS_SYSINFO = 116 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 SYS_KCMP = 378 SYS_FINIT_MODULE = 379 SYS_SCHED_SETATTR = 380 SYS_SCHED_GETATTR = 381 SYS_RENAMEAT2 = 382 SYS_SECCOMP = 383 SYS_GETRANDOM = 384 SYS_MEMFD_CREATE = 385 SYS_BPF = 386 SYS_EXECVEAT = 387 SYS_USERFAULTFD = 388 SYS_MEMBARRIER = 389 SYS_MLOCK2 = 390 SYS_COPY_FILE_RANGE = 391 SYS_PREADV2 = 392 SYS_PWRITEV2 = 393 SYS_PKEY_MPROTECT = 394 SYS_PKEY_ALLOC = 395 SYS_PKEY_FREE = 396 SYS_STATX = 397 SYS_RSEQ = 398 SYS_IO_PGETEVENTS = 399 SYS_MIGRATE_PAGES = 400 SYS_KEXEC_FILE_LOAD = 401 SYS_CLOCK_GETTIME64 = 403 SYS_CLOCK_SETTIME64 = 404 SYS_CLOCK_ADJTIME64 = 405 SYS_CLOCK_GETRES_TIME64 = 406 SYS_CLOCK_NANOSLEEP_TIME64 = 407 SYS_TIMER_GETTIME64 = 408 SYS_TIMER_SETTIME64 = 409 SYS_TIMERFD_GETTIME64 = 410 SYS_TIMERFD_SETTIME64 = 411 SYS_UTIMENSAT_TIME64 = 412 SYS_PSELECT6_TIME64 = 413 SYS_PPOLL_TIME64 = 414 SYS_IO_PGETEVENTS_TIME64 = 416 SYS_RECVMMSG_TIME64 = 417 SYS_MQ_TIMEDSEND_TIME64 = 418 SYS_MQ_TIMEDRECEIVE_TIME64 = 419 SYS_SEMTIMEDOP_TIME64 = 420 SYS_RT_SIGTIMEDWAIT_TIME64 = 421 SYS_FUTEX_TIME64 = 422 SYS_SCHED_RR_GET_INTERVAL_TIME64 = 423 SYS_PIDFD_SEND_SIGNAL = 424 SYS_IO_URING_SETUP = 425 SYS_IO_URING_ENTER = 426 SYS_IO_URING_REGISTER = 427 SYS_OPEN_TREE = 428 SYS_MOVE_MOUNT = 429 SYS_FSOPEN = 430 SYS_FSCONFIG = 431 SYS_FSMOUNT = 432 SYS_FSPICK = 433 SYS_PIDFD_OPEN = 434 SYS_CLONE3 = 435 SYS_CLOSE_RANGE = 436 SYS_OPENAT2 = 437 SYS_PIDFD_GETFD = 438 SYS_FACCESSAT2 = 439 SYS_PROCESS_MADVISE = 440 SYS_EPOLL_PWAIT2 = 441 SYS_MOUNT_SETATTR = 442 SYS_QUOTACTL_FD = 443 SYS_LANDLOCK_CREATE_RULESET = 444 SYS_LANDLOCK_ADD_RULE = 445 SYS_LANDLOCK_RESTRICT_SELF = 446 SYS_PROCESS_MRELEASE = 448 SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 SYS_MAP_SHADOW_STACK = 453 SYS_FUTEX_WAKE = 454 SYS_FUTEX_WAIT = 455 SYS_FUTEX_REQUEUE = 456 SYS_STATMOUNT = 457 SYS_LISTMOUNT = 458 SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 SYS_MSEAL = 462 ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go ================================================ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/arm64/include -fsigned-char /tmp/arm64/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. //go: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 SYS_GETRANDOM = 278 SYS_MEMFD_CREATE = 279 SYS_BPF = 280 SYS_EXECVEAT = 281 SYS_USERFAULTFD = 282 SYS_MEMBARRIER = 283 SYS_MLOCK2 = 284 SYS_COPY_FILE_RANGE = 285 SYS_PREADV2 = 286 SYS_PWRITEV2 = 287 SYS_PKEY_MPROTECT = 288 SYS_PKEY_ALLOC = 289 SYS_PKEY_FREE = 290 SYS_STATX = 291 SYS_IO_PGETEVENTS = 292 SYS_RSEQ = 293 SYS_KEXEC_FILE_LOAD = 294 SYS_PIDFD_SEND_SIGNAL = 424 SYS_IO_URING_SETUP = 425 SYS_IO_URING_ENTER = 426 SYS_IO_URING_REGISTER = 427 SYS_OPEN_TREE = 428 SYS_MOVE_MOUNT = 429 SYS_FSOPEN = 430 SYS_FSCONFIG = 431 SYS_FSMOUNT = 432 SYS_FSPICK = 433 SYS_PIDFD_OPEN = 434 SYS_CLONE3 = 435 SYS_CLOSE_RANGE = 436 SYS_OPENAT2 = 437 SYS_PIDFD_GETFD = 438 SYS_FACCESSAT2 = 439 SYS_PROCESS_MADVISE = 440 SYS_EPOLL_PWAIT2 = 441 SYS_MOUNT_SETATTR = 442 SYS_QUOTACTL_FD = 443 SYS_LANDLOCK_CREATE_RULESET = 444 SYS_LANDLOCK_ADD_RULE = 445 SYS_LANDLOCK_RESTRICT_SELF = 446 SYS_MEMFD_SECRET = 447 SYS_PROCESS_MRELEASE = 448 SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 SYS_MAP_SHADOW_STACK = 453 SYS_FUTEX_WAKE = 454 SYS_FUTEX_WAIT = 455 SYS_FUTEX_REQUEUE = 456 SYS_STATMOUNT = 457 SYS_LISTMOUNT = 458 SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 SYS_MSEAL = 462 ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go ================================================ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/loong64/include /tmp/loong64/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. //go:build loong64 && 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_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_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_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 SYS_GETRANDOM = 278 SYS_MEMFD_CREATE = 279 SYS_BPF = 280 SYS_EXECVEAT = 281 SYS_USERFAULTFD = 282 SYS_MEMBARRIER = 283 SYS_MLOCK2 = 284 SYS_COPY_FILE_RANGE = 285 SYS_PREADV2 = 286 SYS_PWRITEV2 = 287 SYS_PKEY_MPROTECT = 288 SYS_PKEY_ALLOC = 289 SYS_PKEY_FREE = 290 SYS_STATX = 291 SYS_IO_PGETEVENTS = 292 SYS_RSEQ = 293 SYS_KEXEC_FILE_LOAD = 294 SYS_PIDFD_SEND_SIGNAL = 424 SYS_IO_URING_SETUP = 425 SYS_IO_URING_ENTER = 426 SYS_IO_URING_REGISTER = 427 SYS_OPEN_TREE = 428 SYS_MOVE_MOUNT = 429 SYS_FSOPEN = 430 SYS_FSCONFIG = 431 SYS_FSMOUNT = 432 SYS_FSPICK = 433 SYS_PIDFD_OPEN = 434 SYS_CLONE3 = 435 SYS_CLOSE_RANGE = 436 SYS_OPENAT2 = 437 SYS_PIDFD_GETFD = 438 SYS_FACCESSAT2 = 439 SYS_PROCESS_MADVISE = 440 SYS_EPOLL_PWAIT2 = 441 SYS_MOUNT_SETATTR = 442 SYS_QUOTACTL_FD = 443 SYS_LANDLOCK_CREATE_RULESET = 444 SYS_LANDLOCK_ADD_RULE = 445 SYS_LANDLOCK_RESTRICT_SELF = 446 SYS_PROCESS_MRELEASE = 448 SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 SYS_MAP_SHADOW_STACK = 453 SYS_FUTEX_WAKE = 454 SYS_FUTEX_WAIT = 455 SYS_FUTEX_REQUEUE = 456 SYS_STATMOUNT = 457 SYS_LISTMOUNT = 458 SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 SYS_MSEAL = 462 ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go ================================================ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/mips/include /tmp/mips/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips && linux package unix const ( SYS_SYSCALL = 4000 SYS_EXIT = 4001 SYS_FORK = 4002 SYS_READ = 4003 SYS_WRITE = 4004 SYS_OPEN = 4005 SYS_CLOSE = 4006 SYS_WAITPID = 4007 SYS_CREAT = 4008 SYS_LINK = 4009 SYS_UNLINK = 4010 SYS_EXECVE = 4011 SYS_CHDIR = 4012 SYS_TIME = 4013 SYS_MKNOD = 4014 SYS_CHMOD = 4015 SYS_LCHOWN = 4016 SYS_BREAK = 4017 SYS_UNUSED18 = 4018 SYS_LSEEK = 4019 SYS_GETPID = 4020 SYS_MOUNT = 4021 SYS_UMOUNT = 4022 SYS_SETUID = 4023 SYS_GETUID = 4024 SYS_STIME = 4025 SYS_PTRACE = 4026 SYS_ALARM = 4027 SYS_UNUSED28 = 4028 SYS_PAUSE = 4029 SYS_UTIME = 4030 SYS_STTY = 4031 SYS_GTTY = 4032 SYS_ACCESS = 4033 SYS_NICE = 4034 SYS_FTIME = 4035 SYS_SYNC = 4036 SYS_KILL = 4037 SYS_RENAME = 4038 SYS_MKDIR = 4039 SYS_RMDIR = 4040 SYS_DUP = 4041 SYS_PIPE = 4042 SYS_TIMES = 4043 SYS_PROF = 4044 SYS_BRK = 4045 SYS_SETGID = 4046 SYS_GETGID = 4047 SYS_SIGNAL = 4048 SYS_GETEUID = 4049 SYS_GETEGID = 4050 SYS_ACCT = 4051 SYS_UMOUNT2 = 4052 SYS_LOCK = 4053 SYS_IOCTL = 4054 SYS_FCNTL = 4055 SYS_MPX = 4056 SYS_SETPGID = 4057 SYS_ULIMIT = 4058 SYS_UNUSED59 = 4059 SYS_UMASK = 4060 SYS_CHROOT = 4061 SYS_USTAT = 4062 SYS_DUP2 = 4063 SYS_GETPPID = 4064 SYS_GETPGRP = 4065 SYS_SETSID = 4066 SYS_SIGACTION = 4067 SYS_SGETMASK = 4068 SYS_SSETMASK = 4069 SYS_SETREUID = 4070 SYS_SETREGID = 4071 SYS_SIGSUSPEND = 4072 SYS_SIGPENDING = 4073 SYS_SETHOSTNAME = 4074 SYS_SETRLIMIT = 4075 SYS_GETRLIMIT = 4076 SYS_GETRUSAGE = 4077 SYS_GETTIMEOFDAY = 4078 SYS_SETTIMEOFDAY = 4079 SYS_GETGROUPS = 4080 SYS_SETGROUPS = 4081 SYS_RESERVED82 = 4082 SYS_SYMLINK = 4083 SYS_UNUSED84 = 4084 SYS_READLINK = 4085 SYS_USELIB = 4086 SYS_SWAPON = 4087 SYS_REBOOT = 4088 SYS_READDIR = 4089 SYS_MMAP = 4090 SYS_MUNMAP = 4091 SYS_TRUNCATE = 4092 SYS_FTRUNCATE = 4093 SYS_FCHMOD = 4094 SYS_FCHOWN = 4095 SYS_GETPRIORITY = 4096 SYS_SETPRIORITY = 4097 SYS_PROFIL = 4098 SYS_STATFS = 4099 SYS_FSTATFS = 4100 SYS_IOPERM = 4101 SYS_SOCKETCALL = 4102 SYS_SYSLOG = 4103 SYS_SETITIMER = 4104 SYS_GETITIMER = 4105 SYS_STAT = 4106 SYS_LSTAT = 4107 SYS_FSTAT = 4108 SYS_UNUSED109 = 4109 SYS_IOPL = 4110 SYS_VHANGUP = 4111 SYS_IDLE = 4112 SYS_VM86 = 4113 SYS_WAIT4 = 4114 SYS_SWAPOFF = 4115 SYS_SYSINFO = 4116 SYS_IPC = 4117 SYS_FSYNC = 4118 SYS_SIGRETURN = 4119 SYS_CLONE = 4120 SYS_SETDOMAINNAME = 4121 SYS_UNAME = 4122 SYS_MODIFY_LDT = 4123 SYS_ADJTIMEX = 4124 SYS_MPROTECT = 4125 SYS_SIGPROCMASK = 4126 SYS_CREATE_MODULE = 4127 SYS_INIT_MODULE = 4128 SYS_DELETE_MODULE = 4129 SYS_GET_KERNEL_SYMS = 4130 SYS_QUOTACTL = 4131 SYS_GETPGID = 4132 SYS_FCHDIR = 4133 SYS_BDFLUSH = 4134 SYS_SYSFS = 4135 SYS_PERSONALITY = 4136 SYS_AFS_SYSCALL = 4137 SYS_SETFSUID = 4138 SYS_SETFSGID = 4139 SYS__LLSEEK = 4140 SYS_GETDENTS = 4141 SYS__NEWSELECT = 4142 SYS_FLOCK = 4143 SYS_MSYNC = 4144 SYS_READV = 4145 SYS_WRITEV = 4146 SYS_CACHEFLUSH = 4147 SYS_CACHECTL = 4148 SYS_SYSMIPS = 4149 SYS_UNUSED150 = 4150 SYS_GETSID = 4151 SYS_FDATASYNC = 4152 SYS__SYSCTL = 4153 SYS_MLOCK = 4154 SYS_MUNLOCK = 4155 SYS_MLOCKALL = 4156 SYS_MUNLOCKALL = 4157 SYS_SCHED_SETPARAM = 4158 SYS_SCHED_GETPARAM = 4159 SYS_SCHED_SETSCHEDULER = 4160 SYS_SCHED_GETSCHEDULER = 4161 SYS_SCHED_YIELD = 4162 SYS_SCHED_GET_PRIORITY_MAX = 4163 SYS_SCHED_GET_PRIORITY_MIN = 4164 SYS_SCHED_RR_GET_INTERVAL = 4165 SYS_NANOSLEEP = 4166 SYS_MREMAP = 4167 SYS_ACCEPT = 4168 SYS_BIND = 4169 SYS_CONNECT = 4170 SYS_GETPEERNAME = 4171 SYS_GETSOCKNAME = 4172 SYS_GETSOCKOPT = 4173 SYS_LISTEN = 4174 SYS_RECV = 4175 SYS_RECVFROM = 4176 SYS_RECVMSG = 4177 SYS_SEND = 4178 SYS_SENDMSG = 4179 SYS_SENDTO = 4180 SYS_SETSOCKOPT = 4181 SYS_SHUTDOWN = 4182 SYS_SOCKET = 4183 SYS_SOCKETPAIR = 4184 SYS_SETRESUID = 4185 SYS_GETRESUID = 4186 SYS_QUERY_MODULE = 4187 SYS_POLL = 4188 SYS_NFSSERVCTL = 4189 SYS_SETRESGID = 4190 SYS_GETRESGID = 4191 SYS_PRCTL = 4192 SYS_RT_SIGRETURN = 4193 SYS_RT_SIGACTION = 4194 SYS_RT_SIGPROCMASK = 4195 SYS_RT_SIGPENDING = 4196 SYS_RT_SIGTIMEDWAIT = 4197 SYS_RT_SIGQUEUEINFO = 4198 SYS_RT_SIGSUSPEND = 4199 SYS_PREAD64 = 4200 SYS_PWRITE64 = 4201 SYS_CHOWN = 4202 SYS_GETCWD = 4203 SYS_CAPGET = 4204 SYS_CAPSET = 4205 SYS_SIGALTSTACK = 4206 SYS_SENDFILE = 4207 SYS_GETPMSG = 4208 SYS_PUTPMSG = 4209 SYS_MMAP2 = 4210 SYS_TRUNCATE64 = 4211 SYS_FTRUNCATE64 = 4212 SYS_STAT64 = 4213 SYS_LSTAT64 = 4214 SYS_FSTAT64 = 4215 SYS_PIVOT_ROOT = 4216 SYS_MINCORE = 4217 SYS_MADVISE = 4218 SYS_GETDENTS64 = 4219 SYS_FCNTL64 = 4220 SYS_RESERVED221 = 4221 SYS_GETTID = 4222 SYS_READAHEAD = 4223 SYS_SETXATTR = 4224 SYS_LSETXATTR = 4225 SYS_FSETXATTR = 4226 SYS_GETXATTR = 4227 SYS_LGETXATTR = 4228 SYS_FGETXATTR = 4229 SYS_LISTXATTR = 4230 SYS_LLISTXATTR = 4231 SYS_FLISTXATTR = 4232 SYS_REMOVEXATTR = 4233 SYS_LREMOVEXATTR = 4234 SYS_FREMOVEXATTR = 4235 SYS_TKILL = 4236 SYS_SENDFILE64 = 4237 SYS_FUTEX = 4238 SYS_SCHED_SETAFFINITY = 4239 SYS_SCHED_GETAFFINITY = 4240 SYS_IO_SETUP = 4241 SYS_IO_DESTROY = 4242 SYS_IO_GETEVENTS = 4243 SYS_IO_SUBMIT = 4244 SYS_IO_CANCEL = 4245 SYS_EXIT_GROUP = 4246 SYS_LOOKUP_DCOOKIE = 4247 SYS_EPOLL_CREATE = 4248 SYS_EPOLL_CTL = 4249 SYS_EPOLL_WAIT = 4250 SYS_REMAP_FILE_PAGES = 4251 SYS_SET_TID_ADDRESS = 4252 SYS_RESTART_SYSCALL = 4253 SYS_FADVISE64 = 4254 SYS_STATFS64 = 4255 SYS_FSTATFS64 = 4256 SYS_TIMER_CREATE = 4257 SYS_TIMER_SETTIME = 4258 SYS_TIMER_GETTIME = 4259 SYS_TIMER_GETOVERRUN = 4260 SYS_TIMER_DELETE = 4261 SYS_CLOCK_SETTIME = 4262 SYS_CLOCK_GETTIME = 4263 SYS_CLOCK_GETRES = 4264 SYS_CLOCK_NANOSLEEP = 4265 SYS_TGKILL = 4266 SYS_UTIMES = 4267 SYS_MBIND = 4268 SYS_GET_MEMPOLICY = 4269 SYS_SET_MEMPOLICY = 4270 SYS_MQ_OPEN = 4271 SYS_MQ_UNLINK = 4272 SYS_MQ_TIMEDSEND = 4273 SYS_MQ_TIMEDRECEIVE = 4274 SYS_MQ_NOTIFY = 4275 SYS_MQ_GETSETATTR = 4276 SYS_VSERVER = 4277 SYS_WAITID = 4278 SYS_ADD_KEY = 4280 SYS_REQUEST_KEY = 4281 SYS_KEYCTL = 4282 SYS_SET_THREAD_AREA = 4283 SYS_INOTIFY_INIT = 4284 SYS_INOTIFY_ADD_WATCH = 4285 SYS_INOTIFY_RM_WATCH = 4286 SYS_MIGRATE_PAGES = 4287 SYS_OPENAT = 4288 SYS_MKDIRAT = 4289 SYS_MKNODAT = 4290 SYS_FCHOWNAT = 4291 SYS_FUTIMESAT = 4292 SYS_FSTATAT64 = 4293 SYS_UNLINKAT = 4294 SYS_RENAMEAT = 4295 SYS_LINKAT = 4296 SYS_SYMLINKAT = 4297 SYS_READLINKAT = 4298 SYS_FCHMODAT = 4299 SYS_FACCESSAT = 4300 SYS_PSELECT6 = 4301 SYS_PPOLL = 4302 SYS_UNSHARE = 4303 SYS_SPLICE = 4304 SYS_SYNC_FILE_RANGE = 4305 SYS_TEE = 4306 SYS_VMSPLICE = 4307 SYS_MOVE_PAGES = 4308 SYS_SET_ROBUST_LIST = 4309 SYS_GET_ROBUST_LIST = 4310 SYS_KEXEC_LOAD = 4311 SYS_GETCPU = 4312 SYS_EPOLL_PWAIT = 4313 SYS_IOPRIO_SET = 4314 SYS_IOPRIO_GET = 4315 SYS_UTIMENSAT = 4316 SYS_SIGNALFD = 4317 SYS_TIMERFD = 4318 SYS_EVENTFD = 4319 SYS_FALLOCATE = 4320 SYS_TIMERFD_CREATE = 4321 SYS_TIMERFD_GETTIME = 4322 SYS_TIMERFD_SETTIME = 4323 SYS_SIGNALFD4 = 4324 SYS_EVENTFD2 = 4325 SYS_EPOLL_CREATE1 = 4326 SYS_DUP3 = 4327 SYS_PIPE2 = 4328 SYS_INOTIFY_INIT1 = 4329 SYS_PREADV = 4330 SYS_PWRITEV = 4331 SYS_RT_TGSIGQUEUEINFO = 4332 SYS_PERF_EVENT_OPEN = 4333 SYS_ACCEPT4 = 4334 SYS_RECVMMSG = 4335 SYS_FANOTIFY_INIT = 4336 SYS_FANOTIFY_MARK = 4337 SYS_PRLIMIT64 = 4338 SYS_NAME_TO_HANDLE_AT = 4339 SYS_OPEN_BY_HANDLE_AT = 4340 SYS_CLOCK_ADJTIME = 4341 SYS_SYNCFS = 4342 SYS_SENDMMSG = 4343 SYS_SETNS = 4344 SYS_PROCESS_VM_READV = 4345 SYS_PROCESS_VM_WRITEV = 4346 SYS_KCMP = 4347 SYS_FINIT_MODULE = 4348 SYS_SCHED_SETATTR = 4349 SYS_SCHED_GETATTR = 4350 SYS_RENAMEAT2 = 4351 SYS_SECCOMP = 4352 SYS_GETRANDOM = 4353 SYS_MEMFD_CREATE = 4354 SYS_BPF = 4355 SYS_EXECVEAT = 4356 SYS_USERFAULTFD = 4357 SYS_MEMBARRIER = 4358 SYS_MLOCK2 = 4359 SYS_COPY_FILE_RANGE = 4360 SYS_PREADV2 = 4361 SYS_PWRITEV2 = 4362 SYS_PKEY_MPROTECT = 4363 SYS_PKEY_ALLOC = 4364 SYS_PKEY_FREE = 4365 SYS_STATX = 4366 SYS_RSEQ = 4367 SYS_IO_PGETEVENTS = 4368 SYS_SEMGET = 4393 SYS_SEMCTL = 4394 SYS_SHMGET = 4395 SYS_SHMCTL = 4396 SYS_SHMAT = 4397 SYS_SHMDT = 4398 SYS_MSGGET = 4399 SYS_MSGSND = 4400 SYS_MSGRCV = 4401 SYS_MSGCTL = 4402 SYS_CLOCK_GETTIME64 = 4403 SYS_CLOCK_SETTIME64 = 4404 SYS_CLOCK_ADJTIME64 = 4405 SYS_CLOCK_GETRES_TIME64 = 4406 SYS_CLOCK_NANOSLEEP_TIME64 = 4407 SYS_TIMER_GETTIME64 = 4408 SYS_TIMER_SETTIME64 = 4409 SYS_TIMERFD_GETTIME64 = 4410 SYS_TIMERFD_SETTIME64 = 4411 SYS_UTIMENSAT_TIME64 = 4412 SYS_PSELECT6_TIME64 = 4413 SYS_PPOLL_TIME64 = 4414 SYS_IO_PGETEVENTS_TIME64 = 4416 SYS_RECVMMSG_TIME64 = 4417 SYS_MQ_TIMEDSEND_TIME64 = 4418 SYS_MQ_TIMEDRECEIVE_TIME64 = 4419 SYS_SEMTIMEDOP_TIME64 = 4420 SYS_RT_SIGTIMEDWAIT_TIME64 = 4421 SYS_FUTEX_TIME64 = 4422 SYS_SCHED_RR_GET_INTERVAL_TIME64 = 4423 SYS_PIDFD_SEND_SIGNAL = 4424 SYS_IO_URING_SETUP = 4425 SYS_IO_URING_ENTER = 4426 SYS_IO_URING_REGISTER = 4427 SYS_OPEN_TREE = 4428 SYS_MOVE_MOUNT = 4429 SYS_FSOPEN = 4430 SYS_FSCONFIG = 4431 SYS_FSMOUNT = 4432 SYS_FSPICK = 4433 SYS_PIDFD_OPEN = 4434 SYS_CLONE3 = 4435 SYS_CLOSE_RANGE = 4436 SYS_OPENAT2 = 4437 SYS_PIDFD_GETFD = 4438 SYS_FACCESSAT2 = 4439 SYS_PROCESS_MADVISE = 4440 SYS_EPOLL_PWAIT2 = 4441 SYS_MOUNT_SETATTR = 4442 SYS_QUOTACTL_FD = 4443 SYS_LANDLOCK_CREATE_RULESET = 4444 SYS_LANDLOCK_ADD_RULE = 4445 SYS_LANDLOCK_RESTRICT_SELF = 4446 SYS_PROCESS_MRELEASE = 4448 SYS_FUTEX_WAITV = 4449 SYS_SET_MEMPOLICY_HOME_NODE = 4450 SYS_CACHESTAT = 4451 SYS_FCHMODAT2 = 4452 SYS_MAP_SHADOW_STACK = 4453 SYS_FUTEX_WAKE = 4454 SYS_FUTEX_WAIT = 4455 SYS_FUTEX_REQUEUE = 4456 SYS_STATMOUNT = 4457 SYS_LISTMOUNT = 4458 SYS_LSM_GET_SELF_ATTR = 4459 SYS_LSM_SET_SELF_ATTR = 4460 SYS_LSM_LIST_MODULES = 4461 SYS_MSEAL = 4462 ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go ================================================ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/mips64/include /tmp/mips64/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64 && linux package unix const ( SYS_READ = 5000 SYS_WRITE = 5001 SYS_OPEN = 5002 SYS_CLOSE = 5003 SYS_STAT = 5004 SYS_FSTAT = 5005 SYS_LSTAT = 5006 SYS_POLL = 5007 SYS_LSEEK = 5008 SYS_MMAP = 5009 SYS_MPROTECT = 5010 SYS_MUNMAP = 5011 SYS_BRK = 5012 SYS_RT_SIGACTION = 5013 SYS_RT_SIGPROCMASK = 5014 SYS_IOCTL = 5015 SYS_PREAD64 = 5016 SYS_PWRITE64 = 5017 SYS_READV = 5018 SYS_WRITEV = 5019 SYS_ACCESS = 5020 SYS_PIPE = 5021 SYS__NEWSELECT = 5022 SYS_SCHED_YIELD = 5023 SYS_MREMAP = 5024 SYS_MSYNC = 5025 SYS_MINCORE = 5026 SYS_MADVISE = 5027 SYS_SHMGET = 5028 SYS_SHMAT = 5029 SYS_SHMCTL = 5030 SYS_DUP = 5031 SYS_DUP2 = 5032 SYS_PAUSE = 5033 SYS_NANOSLEEP = 5034 SYS_GETITIMER = 5035 SYS_SETITIMER = 5036 SYS_ALARM = 5037 SYS_GETPID = 5038 SYS_SENDFILE = 5039 SYS_SOCKET = 5040 SYS_CONNECT = 5041 SYS_ACCEPT = 5042 SYS_SENDTO = 5043 SYS_RECVFROM = 5044 SYS_SENDMSG = 5045 SYS_RECVMSG = 5046 SYS_SHUTDOWN = 5047 SYS_BIND = 5048 SYS_LISTEN = 5049 SYS_GETSOCKNAME = 5050 SYS_GETPEERNAME = 5051 SYS_SOCKETPAIR = 5052 SYS_SETSOCKOPT = 5053 SYS_GETSOCKOPT = 5054 SYS_CLONE = 5055 SYS_FORK = 5056 SYS_EXECVE = 5057 SYS_EXIT = 5058 SYS_WAIT4 = 5059 SYS_KILL = 5060 SYS_UNAME = 5061 SYS_SEMGET = 5062 SYS_SEMOP = 5063 SYS_SEMCTL = 5064 SYS_SHMDT = 5065 SYS_MSGGET = 5066 SYS_MSGSND = 5067 SYS_MSGRCV = 5068 SYS_MSGCTL = 5069 SYS_FCNTL = 5070 SYS_FLOCK = 5071 SYS_FSYNC = 5072 SYS_FDATASYNC = 5073 SYS_TRUNCATE = 5074 SYS_FTRUNCATE = 5075 SYS_GETDENTS = 5076 SYS_GETCWD = 5077 SYS_CHDIR = 5078 SYS_FCHDIR = 5079 SYS_RENAME = 5080 SYS_MKDIR = 5081 SYS_RMDIR = 5082 SYS_CREAT = 5083 SYS_LINK = 5084 SYS_UNLINK = 5085 SYS_SYMLINK = 5086 SYS_READLINK = 5087 SYS_CHMOD = 5088 SYS_FCHMOD = 5089 SYS_CHOWN = 5090 SYS_FCHOWN = 5091 SYS_LCHOWN = 5092 SYS_UMASK = 5093 SYS_GETTIMEOFDAY = 5094 SYS_GETRLIMIT = 5095 SYS_GETRUSAGE = 5096 SYS_SYSINFO = 5097 SYS_TIMES = 5098 SYS_PTRACE = 5099 SYS_GETUID = 5100 SYS_SYSLOG = 5101 SYS_GETGID = 5102 SYS_SETUID = 5103 SYS_SETGID = 5104 SYS_GETEUID = 5105 SYS_GETEGID = 5106 SYS_SETPGID = 5107 SYS_GETPPID = 5108 SYS_GETPGRP = 5109 SYS_SETSID = 5110 SYS_SETREUID = 5111 SYS_SETREGID = 5112 SYS_GETGROUPS = 5113 SYS_SETGROUPS = 5114 SYS_SETRESUID = 5115 SYS_GETRESUID = 5116 SYS_SETRESGID = 5117 SYS_GETRESGID = 5118 SYS_GETPGID = 5119 SYS_SETFSUID = 5120 SYS_SETFSGID = 5121 SYS_GETSID = 5122 SYS_CAPGET = 5123 SYS_CAPSET = 5124 SYS_RT_SIGPENDING = 5125 SYS_RT_SIGTIMEDWAIT = 5126 SYS_RT_SIGQUEUEINFO = 5127 SYS_RT_SIGSUSPEND = 5128 SYS_SIGALTSTACK = 5129 SYS_UTIME = 5130 SYS_MKNOD = 5131 SYS_PERSONALITY = 5132 SYS_USTAT = 5133 SYS_STATFS = 5134 SYS_FSTATFS = 5135 SYS_SYSFS = 5136 SYS_GETPRIORITY = 5137 SYS_SETPRIORITY = 5138 SYS_SCHED_SETPARAM = 5139 SYS_SCHED_GETPARAM = 5140 SYS_SCHED_SETSCHEDULER = 5141 SYS_SCHED_GETSCHEDULER = 5142 SYS_SCHED_GET_PRIORITY_MAX = 5143 SYS_SCHED_GET_PRIORITY_MIN = 5144 SYS_SCHED_RR_GET_INTERVAL = 5145 SYS_MLOCK = 5146 SYS_MUNLOCK = 5147 SYS_MLOCKALL = 5148 SYS_MUNLOCKALL = 5149 SYS_VHANGUP = 5150 SYS_PIVOT_ROOT = 5151 SYS__SYSCTL = 5152 SYS_PRCTL = 5153 SYS_ADJTIMEX = 5154 SYS_SETRLIMIT = 5155 SYS_CHROOT = 5156 SYS_SYNC = 5157 SYS_ACCT = 5158 SYS_SETTIMEOFDAY = 5159 SYS_MOUNT = 5160 SYS_UMOUNT2 = 5161 SYS_SWAPON = 5162 SYS_SWAPOFF = 5163 SYS_REBOOT = 5164 SYS_SETHOSTNAME = 5165 SYS_SETDOMAINNAME = 5166 SYS_CREATE_MODULE = 5167 SYS_INIT_MODULE = 5168 SYS_DELETE_MODULE = 5169 SYS_GET_KERNEL_SYMS = 5170 SYS_QUERY_MODULE = 5171 SYS_QUOTACTL = 5172 SYS_NFSSERVCTL = 5173 SYS_GETPMSG = 5174 SYS_PUTPMSG = 5175 SYS_AFS_SYSCALL = 5176 SYS_RESERVED177 = 5177 SYS_GETTID = 5178 SYS_READAHEAD = 5179 SYS_SETXATTR = 5180 SYS_LSETXATTR = 5181 SYS_FSETXATTR = 5182 SYS_GETXATTR = 5183 SYS_LGETXATTR = 5184 SYS_FGETXATTR = 5185 SYS_LISTXATTR = 5186 SYS_LLISTXATTR = 5187 SYS_FLISTXATTR = 5188 SYS_REMOVEXATTR = 5189 SYS_LREMOVEXATTR = 5190 SYS_FREMOVEXATTR = 5191 SYS_TKILL = 5192 SYS_RESERVED193 = 5193 SYS_FUTEX = 5194 SYS_SCHED_SETAFFINITY = 5195 SYS_SCHED_GETAFFINITY = 5196 SYS_CACHEFLUSH = 5197 SYS_CACHECTL = 5198 SYS_SYSMIPS = 5199 SYS_IO_SETUP = 5200 SYS_IO_DESTROY = 5201 SYS_IO_GETEVENTS = 5202 SYS_IO_SUBMIT = 5203 SYS_IO_CANCEL = 5204 SYS_EXIT_GROUP = 5205 SYS_LOOKUP_DCOOKIE = 5206 SYS_EPOLL_CREATE = 5207 SYS_EPOLL_CTL = 5208 SYS_EPOLL_WAIT = 5209 SYS_REMAP_FILE_PAGES = 5210 SYS_RT_SIGRETURN = 5211 SYS_SET_TID_ADDRESS = 5212 SYS_RESTART_SYSCALL = 5213 SYS_SEMTIMEDOP = 5214 SYS_FADVISE64 = 5215 SYS_TIMER_CREATE = 5216 SYS_TIMER_SETTIME = 5217 SYS_TIMER_GETTIME = 5218 SYS_TIMER_GETOVERRUN = 5219 SYS_TIMER_DELETE = 5220 SYS_CLOCK_SETTIME = 5221 SYS_CLOCK_GETTIME = 5222 SYS_CLOCK_GETRES = 5223 SYS_CLOCK_NANOSLEEP = 5224 SYS_TGKILL = 5225 SYS_UTIMES = 5226 SYS_MBIND = 5227 SYS_GET_MEMPOLICY = 5228 SYS_SET_MEMPOLICY = 5229 SYS_MQ_OPEN = 5230 SYS_MQ_UNLINK = 5231 SYS_MQ_TIMEDSEND = 5232 SYS_MQ_TIMEDRECEIVE = 5233 SYS_MQ_NOTIFY = 5234 SYS_MQ_GETSETATTR = 5235 SYS_VSERVER = 5236 SYS_WAITID = 5237 SYS_ADD_KEY = 5239 SYS_REQUEST_KEY = 5240 SYS_KEYCTL = 5241 SYS_SET_THREAD_AREA = 5242 SYS_INOTIFY_INIT = 5243 SYS_INOTIFY_ADD_WATCH = 5244 SYS_INOTIFY_RM_WATCH = 5245 SYS_MIGRATE_PAGES = 5246 SYS_OPENAT = 5247 SYS_MKDIRAT = 5248 SYS_MKNODAT = 5249 SYS_FCHOWNAT = 5250 SYS_FUTIMESAT = 5251 SYS_NEWFSTATAT = 5252 SYS_UNLINKAT = 5253 SYS_RENAMEAT = 5254 SYS_LINKAT = 5255 SYS_SYMLINKAT = 5256 SYS_READLINKAT = 5257 SYS_FCHMODAT = 5258 SYS_FACCESSAT = 5259 SYS_PSELECT6 = 5260 SYS_PPOLL = 5261 SYS_UNSHARE = 5262 SYS_SPLICE = 5263 SYS_SYNC_FILE_RANGE = 5264 SYS_TEE = 5265 SYS_VMSPLICE = 5266 SYS_MOVE_PAGES = 5267 SYS_SET_ROBUST_LIST = 5268 SYS_GET_ROBUST_LIST = 5269 SYS_KEXEC_LOAD = 5270 SYS_GETCPU = 5271 SYS_EPOLL_PWAIT = 5272 SYS_IOPRIO_SET = 5273 SYS_IOPRIO_GET = 5274 SYS_UTIMENSAT = 5275 SYS_SIGNALFD = 5276 SYS_TIMERFD = 5277 SYS_EVENTFD = 5278 SYS_FALLOCATE = 5279 SYS_TIMERFD_CREATE = 5280 SYS_TIMERFD_GETTIME = 5281 SYS_TIMERFD_SETTIME = 5282 SYS_SIGNALFD4 = 5283 SYS_EVENTFD2 = 5284 SYS_EPOLL_CREATE1 = 5285 SYS_DUP3 = 5286 SYS_PIPE2 = 5287 SYS_INOTIFY_INIT1 = 5288 SYS_PREADV = 5289 SYS_PWRITEV = 5290 SYS_RT_TGSIGQUEUEINFO = 5291 SYS_PERF_EVENT_OPEN = 5292 SYS_ACCEPT4 = 5293 SYS_RECVMMSG = 5294 SYS_FANOTIFY_INIT = 5295 SYS_FANOTIFY_MARK = 5296 SYS_PRLIMIT64 = 5297 SYS_NAME_TO_HANDLE_AT = 5298 SYS_OPEN_BY_HANDLE_AT = 5299 SYS_CLOCK_ADJTIME = 5300 SYS_SYNCFS = 5301 SYS_SENDMMSG = 5302 SYS_SETNS = 5303 SYS_PROCESS_VM_READV = 5304 SYS_PROCESS_VM_WRITEV = 5305 SYS_KCMP = 5306 SYS_FINIT_MODULE = 5307 SYS_GETDENTS64 = 5308 SYS_SCHED_SETATTR = 5309 SYS_SCHED_GETATTR = 5310 SYS_RENAMEAT2 = 5311 SYS_SECCOMP = 5312 SYS_GETRANDOM = 5313 SYS_MEMFD_CREATE = 5314 SYS_BPF = 5315 SYS_EXECVEAT = 5316 SYS_USERFAULTFD = 5317 SYS_MEMBARRIER = 5318 SYS_MLOCK2 = 5319 SYS_COPY_FILE_RANGE = 5320 SYS_PREADV2 = 5321 SYS_PWRITEV2 = 5322 SYS_PKEY_MPROTECT = 5323 SYS_PKEY_ALLOC = 5324 SYS_PKEY_FREE = 5325 SYS_STATX = 5326 SYS_RSEQ = 5327 SYS_IO_PGETEVENTS = 5328 SYS_PIDFD_SEND_SIGNAL = 5424 SYS_IO_URING_SETUP = 5425 SYS_IO_URING_ENTER = 5426 SYS_IO_URING_REGISTER = 5427 SYS_OPEN_TREE = 5428 SYS_MOVE_MOUNT = 5429 SYS_FSOPEN = 5430 SYS_FSCONFIG = 5431 SYS_FSMOUNT = 5432 SYS_FSPICK = 5433 SYS_PIDFD_OPEN = 5434 SYS_CLONE3 = 5435 SYS_CLOSE_RANGE = 5436 SYS_OPENAT2 = 5437 SYS_PIDFD_GETFD = 5438 SYS_FACCESSAT2 = 5439 SYS_PROCESS_MADVISE = 5440 SYS_EPOLL_PWAIT2 = 5441 SYS_MOUNT_SETATTR = 5442 SYS_QUOTACTL_FD = 5443 SYS_LANDLOCK_CREATE_RULESET = 5444 SYS_LANDLOCK_ADD_RULE = 5445 SYS_LANDLOCK_RESTRICT_SELF = 5446 SYS_PROCESS_MRELEASE = 5448 SYS_FUTEX_WAITV = 5449 SYS_SET_MEMPOLICY_HOME_NODE = 5450 SYS_CACHESTAT = 5451 SYS_FCHMODAT2 = 5452 SYS_MAP_SHADOW_STACK = 5453 SYS_FUTEX_WAKE = 5454 SYS_FUTEX_WAIT = 5455 SYS_FUTEX_REQUEUE = 5456 SYS_STATMOUNT = 5457 SYS_LISTMOUNT = 5458 SYS_LSM_GET_SELF_ATTR = 5459 SYS_LSM_SET_SELF_ATTR = 5460 SYS_LSM_LIST_MODULES = 5461 SYS_MSEAL = 5462 ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go ================================================ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/mips64le/include /tmp/mips64le/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64le && linux package unix const ( SYS_READ = 5000 SYS_WRITE = 5001 SYS_OPEN = 5002 SYS_CLOSE = 5003 SYS_STAT = 5004 SYS_FSTAT = 5005 SYS_LSTAT = 5006 SYS_POLL = 5007 SYS_LSEEK = 5008 SYS_MMAP = 5009 SYS_MPROTECT = 5010 SYS_MUNMAP = 5011 SYS_BRK = 5012 SYS_RT_SIGACTION = 5013 SYS_RT_SIGPROCMASK = 5014 SYS_IOCTL = 5015 SYS_PREAD64 = 5016 SYS_PWRITE64 = 5017 SYS_READV = 5018 SYS_WRITEV = 5019 SYS_ACCESS = 5020 SYS_PIPE = 5021 SYS__NEWSELECT = 5022 SYS_SCHED_YIELD = 5023 SYS_MREMAP = 5024 SYS_MSYNC = 5025 SYS_MINCORE = 5026 SYS_MADVISE = 5027 SYS_SHMGET = 5028 SYS_SHMAT = 5029 SYS_SHMCTL = 5030 SYS_DUP = 5031 SYS_DUP2 = 5032 SYS_PAUSE = 5033 SYS_NANOSLEEP = 5034 SYS_GETITIMER = 5035 SYS_SETITIMER = 5036 SYS_ALARM = 5037 SYS_GETPID = 5038 SYS_SENDFILE = 5039 SYS_SOCKET = 5040 SYS_CONNECT = 5041 SYS_ACCEPT = 5042 SYS_SENDTO = 5043 SYS_RECVFROM = 5044 SYS_SENDMSG = 5045 SYS_RECVMSG = 5046 SYS_SHUTDOWN = 5047 SYS_BIND = 5048 SYS_LISTEN = 5049 SYS_GETSOCKNAME = 5050 SYS_GETPEERNAME = 5051 SYS_SOCKETPAIR = 5052 SYS_SETSOCKOPT = 5053 SYS_GETSOCKOPT = 5054 SYS_CLONE = 5055 SYS_FORK = 5056 SYS_EXECVE = 5057 SYS_EXIT = 5058 SYS_WAIT4 = 5059 SYS_KILL = 5060 SYS_UNAME = 5061 SYS_SEMGET = 5062 SYS_SEMOP = 5063 SYS_SEMCTL = 5064 SYS_SHMDT = 5065 SYS_MSGGET = 5066 SYS_MSGSND = 5067 SYS_MSGRCV = 5068 SYS_MSGCTL = 5069 SYS_FCNTL = 5070 SYS_FLOCK = 5071 SYS_FSYNC = 5072 SYS_FDATASYNC = 5073 SYS_TRUNCATE = 5074 SYS_FTRUNCATE = 5075 SYS_GETDENTS = 5076 SYS_GETCWD = 5077 SYS_CHDIR = 5078 SYS_FCHDIR = 5079 SYS_RENAME = 5080 SYS_MKDIR = 5081 SYS_RMDIR = 5082 SYS_CREAT = 5083 SYS_LINK = 5084 SYS_UNLINK = 5085 SYS_SYMLINK = 5086 SYS_READLINK = 5087 SYS_CHMOD = 5088 SYS_FCHMOD = 5089 SYS_CHOWN = 5090 SYS_FCHOWN = 5091 SYS_LCHOWN = 5092 SYS_UMASK = 5093 SYS_GETTIMEOFDAY = 5094 SYS_GETRLIMIT = 5095 SYS_GETRUSAGE = 5096 SYS_SYSINFO = 5097 SYS_TIMES = 5098 SYS_PTRACE = 5099 SYS_GETUID = 5100 SYS_SYSLOG = 5101 SYS_GETGID = 5102 SYS_SETUID = 5103 SYS_SETGID = 5104 SYS_GETEUID = 5105 SYS_GETEGID = 5106 SYS_SETPGID = 5107 SYS_GETPPID = 5108 SYS_GETPGRP = 5109 SYS_SETSID = 5110 SYS_SETREUID = 5111 SYS_SETREGID = 5112 SYS_GETGROUPS = 5113 SYS_SETGROUPS = 5114 SYS_SETRESUID = 5115 SYS_GETRESUID = 5116 SYS_SETRESGID = 5117 SYS_GETRESGID = 5118 SYS_GETPGID = 5119 SYS_SETFSUID = 5120 SYS_SETFSGID = 5121 SYS_GETSID = 5122 SYS_CAPGET = 5123 SYS_CAPSET = 5124 SYS_RT_SIGPENDING = 5125 SYS_RT_SIGTIMEDWAIT = 5126 SYS_RT_SIGQUEUEINFO = 5127 SYS_RT_SIGSUSPEND = 5128 SYS_SIGALTSTACK = 5129 SYS_UTIME = 5130 SYS_MKNOD = 5131 SYS_PERSONALITY = 5132 SYS_USTAT = 5133 SYS_STATFS = 5134 SYS_FSTATFS = 5135 SYS_SYSFS = 5136 SYS_GETPRIORITY = 5137 SYS_SETPRIORITY = 5138 SYS_SCHED_SETPARAM = 5139 SYS_SCHED_GETPARAM = 5140 SYS_SCHED_SETSCHEDULER = 5141 SYS_SCHED_GETSCHEDULER = 5142 SYS_SCHED_GET_PRIORITY_MAX = 5143 SYS_SCHED_GET_PRIORITY_MIN = 5144 SYS_SCHED_RR_GET_INTERVAL = 5145 SYS_MLOCK = 5146 SYS_MUNLOCK = 5147 SYS_MLOCKALL = 5148 SYS_MUNLOCKALL = 5149 SYS_VHANGUP = 5150 SYS_PIVOT_ROOT = 5151 SYS__SYSCTL = 5152 SYS_PRCTL = 5153 SYS_ADJTIMEX = 5154 SYS_SETRLIMIT = 5155 SYS_CHROOT = 5156 SYS_SYNC = 5157 SYS_ACCT = 5158 SYS_SETTIMEOFDAY = 5159 SYS_MOUNT = 5160 SYS_UMOUNT2 = 5161 SYS_SWAPON = 5162 SYS_SWAPOFF = 5163 SYS_REBOOT = 5164 SYS_SETHOSTNAME = 5165 SYS_SETDOMAINNAME = 5166 SYS_CREATE_MODULE = 5167 SYS_INIT_MODULE = 5168 SYS_DELETE_MODULE = 5169 SYS_GET_KERNEL_SYMS = 5170 SYS_QUERY_MODULE = 5171 SYS_QUOTACTL = 5172 SYS_NFSSERVCTL = 5173 SYS_GETPMSG = 5174 SYS_PUTPMSG = 5175 SYS_AFS_SYSCALL = 5176 SYS_RESERVED177 = 5177 SYS_GETTID = 5178 SYS_READAHEAD = 5179 SYS_SETXATTR = 5180 SYS_LSETXATTR = 5181 SYS_FSETXATTR = 5182 SYS_GETXATTR = 5183 SYS_LGETXATTR = 5184 SYS_FGETXATTR = 5185 SYS_LISTXATTR = 5186 SYS_LLISTXATTR = 5187 SYS_FLISTXATTR = 5188 SYS_REMOVEXATTR = 5189 SYS_LREMOVEXATTR = 5190 SYS_FREMOVEXATTR = 5191 SYS_TKILL = 5192 SYS_RESERVED193 = 5193 SYS_FUTEX = 5194 SYS_SCHED_SETAFFINITY = 5195 SYS_SCHED_GETAFFINITY = 5196 SYS_CACHEFLUSH = 5197 SYS_CACHECTL = 5198 SYS_SYSMIPS = 5199 SYS_IO_SETUP = 5200 SYS_IO_DESTROY = 5201 SYS_IO_GETEVENTS = 5202 SYS_IO_SUBMIT = 5203 SYS_IO_CANCEL = 5204 SYS_EXIT_GROUP = 5205 SYS_LOOKUP_DCOOKIE = 5206 SYS_EPOLL_CREATE = 5207 SYS_EPOLL_CTL = 5208 SYS_EPOLL_WAIT = 5209 SYS_REMAP_FILE_PAGES = 5210 SYS_RT_SIGRETURN = 5211 SYS_SET_TID_ADDRESS = 5212 SYS_RESTART_SYSCALL = 5213 SYS_SEMTIMEDOP = 5214 SYS_FADVISE64 = 5215 SYS_TIMER_CREATE = 5216 SYS_TIMER_SETTIME = 5217 SYS_TIMER_GETTIME = 5218 SYS_TIMER_GETOVERRUN = 5219 SYS_TIMER_DELETE = 5220 SYS_CLOCK_SETTIME = 5221 SYS_CLOCK_GETTIME = 5222 SYS_CLOCK_GETRES = 5223 SYS_CLOCK_NANOSLEEP = 5224 SYS_TGKILL = 5225 SYS_UTIMES = 5226 SYS_MBIND = 5227 SYS_GET_MEMPOLICY = 5228 SYS_SET_MEMPOLICY = 5229 SYS_MQ_OPEN = 5230 SYS_MQ_UNLINK = 5231 SYS_MQ_TIMEDSEND = 5232 SYS_MQ_TIMEDRECEIVE = 5233 SYS_MQ_NOTIFY = 5234 SYS_MQ_GETSETATTR = 5235 SYS_VSERVER = 5236 SYS_WAITID = 5237 SYS_ADD_KEY = 5239 SYS_REQUEST_KEY = 5240 SYS_KEYCTL = 5241 SYS_SET_THREAD_AREA = 5242 SYS_INOTIFY_INIT = 5243 SYS_INOTIFY_ADD_WATCH = 5244 SYS_INOTIFY_RM_WATCH = 5245 SYS_MIGRATE_PAGES = 5246 SYS_OPENAT = 5247 SYS_MKDIRAT = 5248 SYS_MKNODAT = 5249 SYS_FCHOWNAT = 5250 SYS_FUTIMESAT = 5251 SYS_NEWFSTATAT = 5252 SYS_UNLINKAT = 5253 SYS_RENAMEAT = 5254 SYS_LINKAT = 5255 SYS_SYMLINKAT = 5256 SYS_READLINKAT = 5257 SYS_FCHMODAT = 5258 SYS_FACCESSAT = 5259 SYS_PSELECT6 = 5260 SYS_PPOLL = 5261 SYS_UNSHARE = 5262 SYS_SPLICE = 5263 SYS_SYNC_FILE_RANGE = 5264 SYS_TEE = 5265 SYS_VMSPLICE = 5266 SYS_MOVE_PAGES = 5267 SYS_SET_ROBUST_LIST = 5268 SYS_GET_ROBUST_LIST = 5269 SYS_KEXEC_LOAD = 5270 SYS_GETCPU = 5271 SYS_EPOLL_PWAIT = 5272 SYS_IOPRIO_SET = 5273 SYS_IOPRIO_GET = 5274 SYS_UTIMENSAT = 5275 SYS_SIGNALFD = 5276 SYS_TIMERFD = 5277 SYS_EVENTFD = 5278 SYS_FALLOCATE = 5279 SYS_TIMERFD_CREATE = 5280 SYS_TIMERFD_GETTIME = 5281 SYS_TIMERFD_SETTIME = 5282 SYS_SIGNALFD4 = 5283 SYS_EVENTFD2 = 5284 SYS_EPOLL_CREATE1 = 5285 SYS_DUP3 = 5286 SYS_PIPE2 = 5287 SYS_INOTIFY_INIT1 = 5288 SYS_PREADV = 5289 SYS_PWRITEV = 5290 SYS_RT_TGSIGQUEUEINFO = 5291 SYS_PERF_EVENT_OPEN = 5292 SYS_ACCEPT4 = 5293 SYS_RECVMMSG = 5294 SYS_FANOTIFY_INIT = 5295 SYS_FANOTIFY_MARK = 5296 SYS_PRLIMIT64 = 5297 SYS_NAME_TO_HANDLE_AT = 5298 SYS_OPEN_BY_HANDLE_AT = 5299 SYS_CLOCK_ADJTIME = 5300 SYS_SYNCFS = 5301 SYS_SENDMMSG = 5302 SYS_SETNS = 5303 SYS_PROCESS_VM_READV = 5304 SYS_PROCESS_VM_WRITEV = 5305 SYS_KCMP = 5306 SYS_FINIT_MODULE = 5307 SYS_GETDENTS64 = 5308 SYS_SCHED_SETATTR = 5309 SYS_SCHED_GETATTR = 5310 SYS_RENAMEAT2 = 5311 SYS_SECCOMP = 5312 SYS_GETRANDOM = 5313 SYS_MEMFD_CREATE = 5314 SYS_BPF = 5315 SYS_EXECVEAT = 5316 SYS_USERFAULTFD = 5317 SYS_MEMBARRIER = 5318 SYS_MLOCK2 = 5319 SYS_COPY_FILE_RANGE = 5320 SYS_PREADV2 = 5321 SYS_PWRITEV2 = 5322 SYS_PKEY_MPROTECT = 5323 SYS_PKEY_ALLOC = 5324 SYS_PKEY_FREE = 5325 SYS_STATX = 5326 SYS_RSEQ = 5327 SYS_IO_PGETEVENTS = 5328 SYS_PIDFD_SEND_SIGNAL = 5424 SYS_IO_URING_SETUP = 5425 SYS_IO_URING_ENTER = 5426 SYS_IO_URING_REGISTER = 5427 SYS_OPEN_TREE = 5428 SYS_MOVE_MOUNT = 5429 SYS_FSOPEN = 5430 SYS_FSCONFIG = 5431 SYS_FSMOUNT = 5432 SYS_FSPICK = 5433 SYS_PIDFD_OPEN = 5434 SYS_CLONE3 = 5435 SYS_CLOSE_RANGE = 5436 SYS_OPENAT2 = 5437 SYS_PIDFD_GETFD = 5438 SYS_FACCESSAT2 = 5439 SYS_PROCESS_MADVISE = 5440 SYS_EPOLL_PWAIT2 = 5441 SYS_MOUNT_SETATTR = 5442 SYS_QUOTACTL_FD = 5443 SYS_LANDLOCK_CREATE_RULESET = 5444 SYS_LANDLOCK_ADD_RULE = 5445 SYS_LANDLOCK_RESTRICT_SELF = 5446 SYS_PROCESS_MRELEASE = 5448 SYS_FUTEX_WAITV = 5449 SYS_SET_MEMPOLICY_HOME_NODE = 5450 SYS_CACHESTAT = 5451 SYS_FCHMODAT2 = 5452 SYS_MAP_SHADOW_STACK = 5453 SYS_FUTEX_WAKE = 5454 SYS_FUTEX_WAIT = 5455 SYS_FUTEX_REQUEUE = 5456 SYS_STATMOUNT = 5457 SYS_LISTMOUNT = 5458 SYS_LSM_GET_SELF_ATTR = 5459 SYS_LSM_SET_SELF_ATTR = 5460 SYS_LSM_LIST_MODULES = 5461 SYS_MSEAL = 5462 ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go ================================================ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/mipsle/include /tmp/mipsle/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mipsle && linux package unix const ( SYS_SYSCALL = 4000 SYS_EXIT = 4001 SYS_FORK = 4002 SYS_READ = 4003 SYS_WRITE = 4004 SYS_OPEN = 4005 SYS_CLOSE = 4006 SYS_WAITPID = 4007 SYS_CREAT = 4008 SYS_LINK = 4009 SYS_UNLINK = 4010 SYS_EXECVE = 4011 SYS_CHDIR = 4012 SYS_TIME = 4013 SYS_MKNOD = 4014 SYS_CHMOD = 4015 SYS_LCHOWN = 4016 SYS_BREAK = 4017 SYS_UNUSED18 = 4018 SYS_LSEEK = 4019 SYS_GETPID = 4020 SYS_MOUNT = 4021 SYS_UMOUNT = 4022 SYS_SETUID = 4023 SYS_GETUID = 4024 SYS_STIME = 4025 SYS_PTRACE = 4026 SYS_ALARM = 4027 SYS_UNUSED28 = 4028 SYS_PAUSE = 4029 SYS_UTIME = 4030 SYS_STTY = 4031 SYS_GTTY = 4032 SYS_ACCESS = 4033 SYS_NICE = 4034 SYS_FTIME = 4035 SYS_SYNC = 4036 SYS_KILL = 4037 SYS_RENAME = 4038 SYS_MKDIR = 4039 SYS_RMDIR = 4040 SYS_DUP = 4041 SYS_PIPE = 4042 SYS_TIMES = 4043 SYS_PROF = 4044 SYS_BRK = 4045 SYS_SETGID = 4046 SYS_GETGID = 4047 SYS_SIGNAL = 4048 SYS_GETEUID = 4049 SYS_GETEGID = 4050 SYS_ACCT = 4051 SYS_UMOUNT2 = 4052 SYS_LOCK = 4053 SYS_IOCTL = 4054 SYS_FCNTL = 4055 SYS_MPX = 4056 SYS_SETPGID = 4057 SYS_ULIMIT = 4058 SYS_UNUSED59 = 4059 SYS_UMASK = 4060 SYS_CHROOT = 4061 SYS_USTAT = 4062 SYS_DUP2 = 4063 SYS_GETPPID = 4064 SYS_GETPGRP = 4065 SYS_SETSID = 4066 SYS_SIGACTION = 4067 SYS_SGETMASK = 4068 SYS_SSETMASK = 4069 SYS_SETREUID = 4070 SYS_SETREGID = 4071 SYS_SIGSUSPEND = 4072 SYS_SIGPENDING = 4073 SYS_SETHOSTNAME = 4074 SYS_SETRLIMIT = 4075 SYS_GETRLIMIT = 4076 SYS_GETRUSAGE = 4077 SYS_GETTIMEOFDAY = 4078 SYS_SETTIMEOFDAY = 4079 SYS_GETGROUPS = 4080 SYS_SETGROUPS = 4081 SYS_RESERVED82 = 4082 SYS_SYMLINK = 4083 SYS_UNUSED84 = 4084 SYS_READLINK = 4085 SYS_USELIB = 4086 SYS_SWAPON = 4087 SYS_REBOOT = 4088 SYS_READDIR = 4089 SYS_MMAP = 4090 SYS_MUNMAP = 4091 SYS_TRUNCATE = 4092 SYS_FTRUNCATE = 4093 SYS_FCHMOD = 4094 SYS_FCHOWN = 4095 SYS_GETPRIORITY = 4096 SYS_SETPRIORITY = 4097 SYS_PROFIL = 4098 SYS_STATFS = 4099 SYS_FSTATFS = 4100 SYS_IOPERM = 4101 SYS_SOCKETCALL = 4102 SYS_SYSLOG = 4103 SYS_SETITIMER = 4104 SYS_GETITIMER = 4105 SYS_STAT = 4106 SYS_LSTAT = 4107 SYS_FSTAT = 4108 SYS_UNUSED109 = 4109 SYS_IOPL = 4110 SYS_VHANGUP = 4111 SYS_IDLE = 4112 SYS_VM86 = 4113 SYS_WAIT4 = 4114 SYS_SWAPOFF = 4115 SYS_SYSINFO = 4116 SYS_IPC = 4117 SYS_FSYNC = 4118 SYS_SIGRETURN = 4119 SYS_CLONE = 4120 SYS_SETDOMAINNAME = 4121 SYS_UNAME = 4122 SYS_MODIFY_LDT = 4123 SYS_ADJTIMEX = 4124 SYS_MPROTECT = 4125 SYS_SIGPROCMASK = 4126 SYS_CREATE_MODULE = 4127 SYS_INIT_MODULE = 4128 SYS_DELETE_MODULE = 4129 SYS_GET_KERNEL_SYMS = 4130 SYS_QUOTACTL = 4131 SYS_GETPGID = 4132 SYS_FCHDIR = 4133 SYS_BDFLUSH = 4134 SYS_SYSFS = 4135 SYS_PERSONALITY = 4136 SYS_AFS_SYSCALL = 4137 SYS_SETFSUID = 4138 SYS_SETFSGID = 4139 SYS__LLSEEK = 4140 SYS_GETDENTS = 4141 SYS__NEWSELECT = 4142 SYS_FLOCK = 4143 SYS_MSYNC = 4144 SYS_READV = 4145 SYS_WRITEV = 4146 SYS_CACHEFLUSH = 4147 SYS_CACHECTL = 4148 SYS_SYSMIPS = 4149 SYS_UNUSED150 = 4150 SYS_GETSID = 4151 SYS_FDATASYNC = 4152 SYS__SYSCTL = 4153 SYS_MLOCK = 4154 SYS_MUNLOCK = 4155 SYS_MLOCKALL = 4156 SYS_MUNLOCKALL = 4157 SYS_SCHED_SETPARAM = 4158 SYS_SCHED_GETPARAM = 4159 SYS_SCHED_SETSCHEDULER = 4160 SYS_SCHED_GETSCHEDULER = 4161 SYS_SCHED_YIELD = 4162 SYS_SCHED_GET_PRIORITY_MAX = 4163 SYS_SCHED_GET_PRIORITY_MIN = 4164 SYS_SCHED_RR_GET_INTERVAL = 4165 SYS_NANOSLEEP = 4166 SYS_MREMAP = 4167 SYS_ACCEPT = 4168 SYS_BIND = 4169 SYS_CONNECT = 4170 SYS_GETPEERNAME = 4171 SYS_GETSOCKNAME = 4172 SYS_GETSOCKOPT = 4173 SYS_LISTEN = 4174 SYS_RECV = 4175 SYS_RECVFROM = 4176 SYS_RECVMSG = 4177 SYS_SEND = 4178 SYS_SENDMSG = 4179 SYS_SENDTO = 4180 SYS_SETSOCKOPT = 4181 SYS_SHUTDOWN = 4182 SYS_SOCKET = 4183 SYS_SOCKETPAIR = 4184 SYS_SETRESUID = 4185 SYS_GETRESUID = 4186 SYS_QUERY_MODULE = 4187 SYS_POLL = 4188 SYS_NFSSERVCTL = 4189 SYS_SETRESGID = 4190 SYS_GETRESGID = 4191 SYS_PRCTL = 4192 SYS_RT_SIGRETURN = 4193 SYS_RT_SIGACTION = 4194 SYS_RT_SIGPROCMASK = 4195 SYS_RT_SIGPENDING = 4196 SYS_RT_SIGTIMEDWAIT = 4197 SYS_RT_SIGQUEUEINFO = 4198 SYS_RT_SIGSUSPEND = 4199 SYS_PREAD64 = 4200 SYS_PWRITE64 = 4201 SYS_CHOWN = 4202 SYS_GETCWD = 4203 SYS_CAPGET = 4204 SYS_CAPSET = 4205 SYS_SIGALTSTACK = 4206 SYS_SENDFILE = 4207 SYS_GETPMSG = 4208 SYS_PUTPMSG = 4209 SYS_MMAP2 = 4210 SYS_TRUNCATE64 = 4211 SYS_FTRUNCATE64 = 4212 SYS_STAT64 = 4213 SYS_LSTAT64 = 4214 SYS_FSTAT64 = 4215 SYS_PIVOT_ROOT = 4216 SYS_MINCORE = 4217 SYS_MADVISE = 4218 SYS_GETDENTS64 = 4219 SYS_FCNTL64 = 4220 SYS_RESERVED221 = 4221 SYS_GETTID = 4222 SYS_READAHEAD = 4223 SYS_SETXATTR = 4224 SYS_LSETXATTR = 4225 SYS_FSETXATTR = 4226 SYS_GETXATTR = 4227 SYS_LGETXATTR = 4228 SYS_FGETXATTR = 4229 SYS_LISTXATTR = 4230 SYS_LLISTXATTR = 4231 SYS_FLISTXATTR = 4232 SYS_REMOVEXATTR = 4233 SYS_LREMOVEXATTR = 4234 SYS_FREMOVEXATTR = 4235 SYS_TKILL = 4236 SYS_SENDFILE64 = 4237 SYS_FUTEX = 4238 SYS_SCHED_SETAFFINITY = 4239 SYS_SCHED_GETAFFINITY = 4240 SYS_IO_SETUP = 4241 SYS_IO_DESTROY = 4242 SYS_IO_GETEVENTS = 4243 SYS_IO_SUBMIT = 4244 SYS_IO_CANCEL = 4245 SYS_EXIT_GROUP = 4246 SYS_LOOKUP_DCOOKIE = 4247 SYS_EPOLL_CREATE = 4248 SYS_EPOLL_CTL = 4249 SYS_EPOLL_WAIT = 4250 SYS_REMAP_FILE_PAGES = 4251 SYS_SET_TID_ADDRESS = 4252 SYS_RESTART_SYSCALL = 4253 SYS_FADVISE64 = 4254 SYS_STATFS64 = 4255 SYS_FSTATFS64 = 4256 SYS_TIMER_CREATE = 4257 SYS_TIMER_SETTIME = 4258 SYS_TIMER_GETTIME = 4259 SYS_TIMER_GETOVERRUN = 4260 SYS_TIMER_DELETE = 4261 SYS_CLOCK_SETTIME = 4262 SYS_CLOCK_GETTIME = 4263 SYS_CLOCK_GETRES = 4264 SYS_CLOCK_NANOSLEEP = 4265 SYS_TGKILL = 4266 SYS_UTIMES = 4267 SYS_MBIND = 4268 SYS_GET_MEMPOLICY = 4269 SYS_SET_MEMPOLICY = 4270 SYS_MQ_OPEN = 4271 SYS_MQ_UNLINK = 4272 SYS_MQ_TIMEDSEND = 4273 SYS_MQ_TIMEDRECEIVE = 4274 SYS_MQ_NOTIFY = 4275 SYS_MQ_GETSETATTR = 4276 SYS_VSERVER = 4277 SYS_WAITID = 4278 SYS_ADD_KEY = 4280 SYS_REQUEST_KEY = 4281 SYS_KEYCTL = 4282 SYS_SET_THREAD_AREA = 4283 SYS_INOTIFY_INIT = 4284 SYS_INOTIFY_ADD_WATCH = 4285 SYS_INOTIFY_RM_WATCH = 4286 SYS_MIGRATE_PAGES = 4287 SYS_OPENAT = 4288 SYS_MKDIRAT = 4289 SYS_MKNODAT = 4290 SYS_FCHOWNAT = 4291 SYS_FUTIMESAT = 4292 SYS_FSTATAT64 = 4293 SYS_UNLINKAT = 4294 SYS_RENAMEAT = 4295 SYS_LINKAT = 4296 SYS_SYMLINKAT = 4297 SYS_READLINKAT = 4298 SYS_FCHMODAT = 4299 SYS_FACCESSAT = 4300 SYS_PSELECT6 = 4301 SYS_PPOLL = 4302 SYS_UNSHARE = 4303 SYS_SPLICE = 4304 SYS_SYNC_FILE_RANGE = 4305 SYS_TEE = 4306 SYS_VMSPLICE = 4307 SYS_MOVE_PAGES = 4308 SYS_SET_ROBUST_LIST = 4309 SYS_GET_ROBUST_LIST = 4310 SYS_KEXEC_LOAD = 4311 SYS_GETCPU = 4312 SYS_EPOLL_PWAIT = 4313 SYS_IOPRIO_SET = 4314 SYS_IOPRIO_GET = 4315 SYS_UTIMENSAT = 4316 SYS_SIGNALFD = 4317 SYS_TIMERFD = 4318 SYS_EVENTFD = 4319 SYS_FALLOCATE = 4320 SYS_TIMERFD_CREATE = 4321 SYS_TIMERFD_GETTIME = 4322 SYS_TIMERFD_SETTIME = 4323 SYS_SIGNALFD4 = 4324 SYS_EVENTFD2 = 4325 SYS_EPOLL_CREATE1 = 4326 SYS_DUP3 = 4327 SYS_PIPE2 = 4328 SYS_INOTIFY_INIT1 = 4329 SYS_PREADV = 4330 SYS_PWRITEV = 4331 SYS_RT_TGSIGQUEUEINFO = 4332 SYS_PERF_EVENT_OPEN = 4333 SYS_ACCEPT4 = 4334 SYS_RECVMMSG = 4335 SYS_FANOTIFY_INIT = 4336 SYS_FANOTIFY_MARK = 4337 SYS_PRLIMIT64 = 4338 SYS_NAME_TO_HANDLE_AT = 4339 SYS_OPEN_BY_HANDLE_AT = 4340 SYS_CLOCK_ADJTIME = 4341 SYS_SYNCFS = 4342 SYS_SENDMMSG = 4343 SYS_SETNS = 4344 SYS_PROCESS_VM_READV = 4345 SYS_PROCESS_VM_WRITEV = 4346 SYS_KCMP = 4347 SYS_FINIT_MODULE = 4348 SYS_SCHED_SETATTR = 4349 SYS_SCHED_GETATTR = 4350 SYS_RENAMEAT2 = 4351 SYS_SECCOMP = 4352 SYS_GETRANDOM = 4353 SYS_MEMFD_CREATE = 4354 SYS_BPF = 4355 SYS_EXECVEAT = 4356 SYS_USERFAULTFD = 4357 SYS_MEMBARRIER = 4358 SYS_MLOCK2 = 4359 SYS_COPY_FILE_RANGE = 4360 SYS_PREADV2 = 4361 SYS_PWRITEV2 = 4362 SYS_PKEY_MPROTECT = 4363 SYS_PKEY_ALLOC = 4364 SYS_PKEY_FREE = 4365 SYS_STATX = 4366 SYS_RSEQ = 4367 SYS_IO_PGETEVENTS = 4368 SYS_SEMGET = 4393 SYS_SEMCTL = 4394 SYS_SHMGET = 4395 SYS_SHMCTL = 4396 SYS_SHMAT = 4397 SYS_SHMDT = 4398 SYS_MSGGET = 4399 SYS_MSGSND = 4400 SYS_MSGRCV = 4401 SYS_MSGCTL = 4402 SYS_CLOCK_GETTIME64 = 4403 SYS_CLOCK_SETTIME64 = 4404 SYS_CLOCK_ADJTIME64 = 4405 SYS_CLOCK_GETRES_TIME64 = 4406 SYS_CLOCK_NANOSLEEP_TIME64 = 4407 SYS_TIMER_GETTIME64 = 4408 SYS_TIMER_SETTIME64 = 4409 SYS_TIMERFD_GETTIME64 = 4410 SYS_TIMERFD_SETTIME64 = 4411 SYS_UTIMENSAT_TIME64 = 4412 SYS_PSELECT6_TIME64 = 4413 SYS_PPOLL_TIME64 = 4414 SYS_IO_PGETEVENTS_TIME64 = 4416 SYS_RECVMMSG_TIME64 = 4417 SYS_MQ_TIMEDSEND_TIME64 = 4418 SYS_MQ_TIMEDRECEIVE_TIME64 = 4419 SYS_SEMTIMEDOP_TIME64 = 4420 SYS_RT_SIGTIMEDWAIT_TIME64 = 4421 SYS_FUTEX_TIME64 = 4422 SYS_SCHED_RR_GET_INTERVAL_TIME64 = 4423 SYS_PIDFD_SEND_SIGNAL = 4424 SYS_IO_URING_SETUP = 4425 SYS_IO_URING_ENTER = 4426 SYS_IO_URING_REGISTER = 4427 SYS_OPEN_TREE = 4428 SYS_MOVE_MOUNT = 4429 SYS_FSOPEN = 4430 SYS_FSCONFIG = 4431 SYS_FSMOUNT = 4432 SYS_FSPICK = 4433 SYS_PIDFD_OPEN = 4434 SYS_CLONE3 = 4435 SYS_CLOSE_RANGE = 4436 SYS_OPENAT2 = 4437 SYS_PIDFD_GETFD = 4438 SYS_FACCESSAT2 = 4439 SYS_PROCESS_MADVISE = 4440 SYS_EPOLL_PWAIT2 = 4441 SYS_MOUNT_SETATTR = 4442 SYS_QUOTACTL_FD = 4443 SYS_LANDLOCK_CREATE_RULESET = 4444 SYS_LANDLOCK_ADD_RULE = 4445 SYS_LANDLOCK_RESTRICT_SELF = 4446 SYS_PROCESS_MRELEASE = 4448 SYS_FUTEX_WAITV = 4449 SYS_SET_MEMPOLICY_HOME_NODE = 4450 SYS_CACHESTAT = 4451 SYS_FCHMODAT2 = 4452 SYS_MAP_SHADOW_STACK = 4453 SYS_FUTEX_WAKE = 4454 SYS_FUTEX_WAIT = 4455 SYS_FUTEX_REQUEUE = 4456 SYS_STATMOUNT = 4457 SYS_LISTMOUNT = 4458 SYS_LSM_GET_SELF_ATTR = 4459 SYS_LSM_SET_SELF_ATTR = 4460 SYS_LSM_LIST_MODULES = 4461 SYS_MSEAL = 4462 ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go ================================================ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/ppc/include /tmp/ppc/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc && 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_MMAP2 = 192 SYS_TRUNCATE64 = 193 SYS_FTRUNCATE64 = 194 SYS_STAT64 = 195 SYS_LSTAT64 = 196 SYS_FSTAT64 = 197 SYS_PCICONFIG_READ = 198 SYS_PCICONFIG_WRITE = 199 SYS_PCICONFIG_IOBASE = 200 SYS_MULTIPLEXER = 201 SYS_GETDENTS64 = 202 SYS_PIVOT_ROOT = 203 SYS_FCNTL64 = 204 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_SENDFILE64 = 226 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_FADVISE64_64 = 254 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_FSTATAT64 = 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 SYS_EXECVEAT = 362 SYS_SWITCH_ENDIAN = 363 SYS_USERFAULTFD = 364 SYS_MEMBARRIER = 365 SYS_MLOCK2 = 378 SYS_COPY_FILE_RANGE = 379 SYS_PREADV2 = 380 SYS_PWRITEV2 = 381 SYS_KEXEC_FILE_LOAD = 382 SYS_STATX = 383 SYS_PKEY_ALLOC = 384 SYS_PKEY_FREE = 385 SYS_PKEY_MPROTECT = 386 SYS_RSEQ = 387 SYS_IO_PGETEVENTS = 388 SYS_SEMGET = 393 SYS_SEMCTL = 394 SYS_SHMGET = 395 SYS_SHMCTL = 396 SYS_SHMAT = 397 SYS_SHMDT = 398 SYS_MSGGET = 399 SYS_MSGSND = 400 SYS_MSGRCV = 401 SYS_MSGCTL = 402 SYS_CLOCK_GETTIME64 = 403 SYS_CLOCK_SETTIME64 = 404 SYS_CLOCK_ADJTIME64 = 405 SYS_CLOCK_GETRES_TIME64 = 406 SYS_CLOCK_NANOSLEEP_TIME64 = 407 SYS_TIMER_GETTIME64 = 408 SYS_TIMER_SETTIME64 = 409 SYS_TIMERFD_GETTIME64 = 410 SYS_TIMERFD_SETTIME64 = 411 SYS_UTIMENSAT_TIME64 = 412 SYS_PSELECT6_TIME64 = 413 SYS_PPOLL_TIME64 = 414 SYS_IO_PGETEVENTS_TIME64 = 416 SYS_RECVMMSG_TIME64 = 417 SYS_MQ_TIMEDSEND_TIME64 = 418 SYS_MQ_TIMEDRECEIVE_TIME64 = 419 SYS_SEMTIMEDOP_TIME64 = 420 SYS_RT_SIGTIMEDWAIT_TIME64 = 421 SYS_FUTEX_TIME64 = 422 SYS_SCHED_RR_GET_INTERVAL_TIME64 = 423 SYS_PIDFD_SEND_SIGNAL = 424 SYS_IO_URING_SETUP = 425 SYS_IO_URING_ENTER = 426 SYS_IO_URING_REGISTER = 427 SYS_OPEN_TREE = 428 SYS_MOVE_MOUNT = 429 SYS_FSOPEN = 430 SYS_FSCONFIG = 431 SYS_FSMOUNT = 432 SYS_FSPICK = 433 SYS_PIDFD_OPEN = 434 SYS_CLONE3 = 435 SYS_CLOSE_RANGE = 436 SYS_OPENAT2 = 437 SYS_PIDFD_GETFD = 438 SYS_FACCESSAT2 = 439 SYS_PROCESS_MADVISE = 440 SYS_EPOLL_PWAIT2 = 441 SYS_MOUNT_SETATTR = 442 SYS_QUOTACTL_FD = 443 SYS_LANDLOCK_CREATE_RULESET = 444 SYS_LANDLOCK_ADD_RULE = 445 SYS_LANDLOCK_RESTRICT_SELF = 446 SYS_PROCESS_MRELEASE = 448 SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 SYS_MAP_SHADOW_STACK = 453 SYS_FUTEX_WAKE = 454 SYS_FUTEX_WAIT = 455 SYS_FUTEX_REQUEUE = 456 SYS_STATMOUNT = 457 SYS_LISTMOUNT = 458 SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 SYS_MSEAL = 462 ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go ================================================ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/ppc64/include /tmp/ppc64/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. //go: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 SYS_EXECVEAT = 362 SYS_SWITCH_ENDIAN = 363 SYS_USERFAULTFD = 364 SYS_MEMBARRIER = 365 SYS_MLOCK2 = 378 SYS_COPY_FILE_RANGE = 379 SYS_PREADV2 = 380 SYS_PWRITEV2 = 381 SYS_KEXEC_FILE_LOAD = 382 SYS_STATX = 383 SYS_PKEY_ALLOC = 384 SYS_PKEY_FREE = 385 SYS_PKEY_MPROTECT = 386 SYS_RSEQ = 387 SYS_IO_PGETEVENTS = 388 SYS_SEMTIMEDOP = 392 SYS_SEMGET = 393 SYS_SEMCTL = 394 SYS_SHMGET = 395 SYS_SHMCTL = 396 SYS_SHMAT = 397 SYS_SHMDT = 398 SYS_MSGGET = 399 SYS_MSGSND = 400 SYS_MSGRCV = 401 SYS_MSGCTL = 402 SYS_PIDFD_SEND_SIGNAL = 424 SYS_IO_URING_SETUP = 425 SYS_IO_URING_ENTER = 426 SYS_IO_URING_REGISTER = 427 SYS_OPEN_TREE = 428 SYS_MOVE_MOUNT = 429 SYS_FSOPEN = 430 SYS_FSCONFIG = 431 SYS_FSMOUNT = 432 SYS_FSPICK = 433 SYS_PIDFD_OPEN = 434 SYS_CLONE3 = 435 SYS_CLOSE_RANGE = 436 SYS_OPENAT2 = 437 SYS_PIDFD_GETFD = 438 SYS_FACCESSAT2 = 439 SYS_PROCESS_MADVISE = 440 SYS_EPOLL_PWAIT2 = 441 SYS_MOUNT_SETATTR = 442 SYS_QUOTACTL_FD = 443 SYS_LANDLOCK_CREATE_RULESET = 444 SYS_LANDLOCK_ADD_RULE = 445 SYS_LANDLOCK_RESTRICT_SELF = 446 SYS_PROCESS_MRELEASE = 448 SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 SYS_MAP_SHADOW_STACK = 453 SYS_FUTEX_WAKE = 454 SYS_FUTEX_WAIT = 455 SYS_FUTEX_REQUEUE = 456 SYS_STATMOUNT = 457 SYS_LISTMOUNT = 458 SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 SYS_MSEAL = 462 ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go ================================================ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/ppc64le/include /tmp/ppc64le/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. //go: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 SYS_SCHED_SETATTR = 355 SYS_SCHED_GETATTR = 356 SYS_RENAMEAT2 = 357 SYS_SECCOMP = 358 SYS_GETRANDOM = 359 SYS_MEMFD_CREATE = 360 SYS_BPF = 361 SYS_EXECVEAT = 362 SYS_SWITCH_ENDIAN = 363 SYS_USERFAULTFD = 364 SYS_MEMBARRIER = 365 SYS_MLOCK2 = 378 SYS_COPY_FILE_RANGE = 379 SYS_PREADV2 = 380 SYS_PWRITEV2 = 381 SYS_KEXEC_FILE_LOAD = 382 SYS_STATX = 383 SYS_PKEY_ALLOC = 384 SYS_PKEY_FREE = 385 SYS_PKEY_MPROTECT = 386 SYS_RSEQ = 387 SYS_IO_PGETEVENTS = 388 SYS_SEMTIMEDOP = 392 SYS_SEMGET = 393 SYS_SEMCTL = 394 SYS_SHMGET = 395 SYS_SHMCTL = 396 SYS_SHMAT = 397 SYS_SHMDT = 398 SYS_MSGGET = 399 SYS_MSGSND = 400 SYS_MSGRCV = 401 SYS_MSGCTL = 402 SYS_PIDFD_SEND_SIGNAL = 424 SYS_IO_URING_SETUP = 425 SYS_IO_URING_ENTER = 426 SYS_IO_URING_REGISTER = 427 SYS_OPEN_TREE = 428 SYS_MOVE_MOUNT = 429 SYS_FSOPEN = 430 SYS_FSCONFIG = 431 SYS_FSMOUNT = 432 SYS_FSPICK = 433 SYS_PIDFD_OPEN = 434 SYS_CLONE3 = 435 SYS_CLOSE_RANGE = 436 SYS_OPENAT2 = 437 SYS_PIDFD_GETFD = 438 SYS_FACCESSAT2 = 439 SYS_PROCESS_MADVISE = 440 SYS_EPOLL_PWAIT2 = 441 SYS_MOUNT_SETATTR = 442 SYS_QUOTACTL_FD = 443 SYS_LANDLOCK_CREATE_RULESET = 444 SYS_LANDLOCK_ADD_RULE = 445 SYS_LANDLOCK_RESTRICT_SELF = 446 SYS_PROCESS_MRELEASE = 448 SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 SYS_MAP_SHADOW_STACK = 453 SYS_FUTEX_WAKE = 454 SYS_FUTEX_WAIT = 455 SYS_FUTEX_REQUEUE = 456 SYS_STATMOUNT = 457 SYS_LISTMOUNT = 458 SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 SYS_MSEAL = 462 ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go ================================================ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/riscv64/include /tmp/riscv64/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && 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_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_RISCV_HWPROBE = 258 SYS_RISCV_FLUSH_ICACHE = 259 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 SYS_GETRANDOM = 278 SYS_MEMFD_CREATE = 279 SYS_BPF = 280 SYS_EXECVEAT = 281 SYS_USERFAULTFD = 282 SYS_MEMBARRIER = 283 SYS_MLOCK2 = 284 SYS_COPY_FILE_RANGE = 285 SYS_PREADV2 = 286 SYS_PWRITEV2 = 287 SYS_PKEY_MPROTECT = 288 SYS_PKEY_ALLOC = 289 SYS_PKEY_FREE = 290 SYS_STATX = 291 SYS_IO_PGETEVENTS = 292 SYS_RSEQ = 293 SYS_KEXEC_FILE_LOAD = 294 SYS_PIDFD_SEND_SIGNAL = 424 SYS_IO_URING_SETUP = 425 SYS_IO_URING_ENTER = 426 SYS_IO_URING_REGISTER = 427 SYS_OPEN_TREE = 428 SYS_MOVE_MOUNT = 429 SYS_FSOPEN = 430 SYS_FSCONFIG = 431 SYS_FSMOUNT = 432 SYS_FSPICK = 433 SYS_PIDFD_OPEN = 434 SYS_CLONE3 = 435 SYS_CLOSE_RANGE = 436 SYS_OPENAT2 = 437 SYS_PIDFD_GETFD = 438 SYS_FACCESSAT2 = 439 SYS_PROCESS_MADVISE = 440 SYS_EPOLL_PWAIT2 = 441 SYS_MOUNT_SETATTR = 442 SYS_QUOTACTL_FD = 443 SYS_LANDLOCK_CREATE_RULESET = 444 SYS_LANDLOCK_ADD_RULE = 445 SYS_LANDLOCK_RESTRICT_SELF = 446 SYS_MEMFD_SECRET = 447 SYS_PROCESS_MRELEASE = 448 SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 SYS_MAP_SHADOW_STACK = 453 SYS_FUTEX_WAKE = 454 SYS_FUTEX_WAIT = 455 SYS_FUTEX_REQUEUE = 456 SYS_STATMOUNT = 457 SYS_LISTMOUNT = 458 SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 SYS_MSEAL = 462 ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go ================================================ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/s390x/include -fsigned-char /tmp/s390x/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. //go:build s390x && linux package unix const ( SYS_EXIT = 1 SYS_FORK = 2 SYS_READ = 3 SYS_WRITE = 4 SYS_OPEN = 5 SYS_CLOSE = 6 SYS_RESTART_SYSCALL = 7 SYS_CREAT = 8 SYS_LINK = 9 SYS_UNLINK = 10 SYS_EXECVE = 11 SYS_CHDIR = 12 SYS_MKNOD = 14 SYS_CHMOD = 15 SYS_LSEEK = 19 SYS_GETPID = 20 SYS_MOUNT = 21 SYS_UMOUNT = 22 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_SIGNAL = 48 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_SIGSUSPEND = 72 SYS_SIGPENDING = 73 SYS_SETHOSTNAME = 74 SYS_SETRLIMIT = 75 SYS_GETRUSAGE = 77 SYS_GETTIMEOFDAY = 78 SYS_SETTIMEOFDAY = 79 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_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_LOOKUP_DCOOKIE = 110 SYS_VHANGUP = 111 SYS_IDLE = 112 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_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_GETDENTS = 141 SYS_SELECT = 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_QUERY_MODULE = 167 SYS_POLL = 168 SYS_NFSSERVCTL = 169 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_GETCWD = 183 SYS_CAPGET = 184 SYS_CAPSET = 185 SYS_SIGALTSTACK = 186 SYS_SENDFILE = 187 SYS_GETPMSG = 188 SYS_PUTPMSG = 189 SYS_VFORK = 190 SYS_GETRLIMIT = 191 SYS_LCHOWN = 198 SYS_GETUID = 199 SYS_GETGID = 200 SYS_GETEUID = 201 SYS_GETEGID = 202 SYS_SETREUID = 203 SYS_SETREGID = 204 SYS_GETGROUPS = 205 SYS_SETGROUPS = 206 SYS_FCHOWN = 207 SYS_SETRESUID = 208 SYS_GETRESUID = 209 SYS_SETRESGID = 210 SYS_GETRESGID = 211 SYS_CHOWN = 212 SYS_SETUID = 213 SYS_SETGID = 214 SYS_SETFSUID = 215 SYS_SETFSGID = 216 SYS_PIVOT_ROOT = 217 SYS_MINCORE = 218 SYS_MADVISE = 219 SYS_GETDENTS64 = 220 SYS_READAHEAD = 222 SYS_SETXATTR = 224 SYS_LSETXATTR = 225 SYS_FSETXATTR = 226 SYS_GETXATTR = 227 SYS_LGETXATTR = 228 SYS_FGETXATTR = 229 SYS_LISTXATTR = 230 SYS_LLISTXATTR = 231 SYS_FLISTXATTR = 232 SYS_REMOVEXATTR = 233 SYS_LREMOVEXATTR = 234 SYS_FREMOVEXATTR = 235 SYS_GETTID = 236 SYS_TKILL = 237 SYS_FUTEX = 238 SYS_SCHED_SETAFFINITY = 239 SYS_SCHED_GETAFFINITY = 240 SYS_TGKILL = 241 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_EPOLL_CREATE = 249 SYS_EPOLL_CTL = 250 SYS_EPOLL_WAIT = 251 SYS_SET_TID_ADDRESS = 252 SYS_FADVISE64 = 253 SYS_TIMER_CREATE = 254 SYS_TIMER_SETTIME = 255 SYS_TIMER_GETTIME = 256 SYS_TIMER_GETOVERRUN = 257 SYS_TIMER_DELETE = 258 SYS_CLOCK_SETTIME = 259 SYS_CLOCK_GETTIME = 260 SYS_CLOCK_GETRES = 261 SYS_CLOCK_NANOSLEEP = 262 SYS_STATFS64 = 265 SYS_FSTATFS64 = 266 SYS_REMAP_FILE_PAGES = 267 SYS_MBIND = 268 SYS_GET_MEMPOLICY = 269 SYS_SET_MEMPOLICY = 270 SYS_MQ_OPEN = 271 SYS_MQ_UNLINK = 272 SYS_MQ_TIMEDSEND = 273 SYS_MQ_TIMEDRECEIVE = 274 SYS_MQ_NOTIFY = 275 SYS_MQ_GETSETATTR = 276 SYS_KEXEC_LOAD = 277 SYS_ADD_KEY = 278 SYS_REQUEST_KEY = 279 SYS_KEYCTL = 280 SYS_WAITID = 281 SYS_IOPRIO_SET = 282 SYS_IOPRIO_GET = 283 SYS_INOTIFY_INIT = 284 SYS_INOTIFY_ADD_WATCH = 285 SYS_INOTIFY_RM_WATCH = 286 SYS_MIGRATE_PAGES = 287 SYS_OPENAT = 288 SYS_MKDIRAT = 289 SYS_MKNODAT = 290 SYS_FCHOWNAT = 291 SYS_FUTIMESAT = 292 SYS_NEWFSTATAT = 293 SYS_UNLINKAT = 294 SYS_RENAMEAT = 295 SYS_LINKAT = 296 SYS_SYMLINKAT = 297 SYS_READLINKAT = 298 SYS_FCHMODAT = 299 SYS_FACCESSAT = 300 SYS_PSELECT6 = 301 SYS_PPOLL = 302 SYS_UNSHARE = 303 SYS_SET_ROBUST_LIST = 304 SYS_GET_ROBUST_LIST = 305 SYS_SPLICE = 306 SYS_SYNC_FILE_RANGE = 307 SYS_TEE = 308 SYS_VMSPLICE = 309 SYS_MOVE_PAGES = 310 SYS_GETCPU = 311 SYS_EPOLL_PWAIT = 312 SYS_UTIMES = 313 SYS_FALLOCATE = 314 SYS_UTIMENSAT = 315 SYS_SIGNALFD = 316 SYS_TIMERFD = 317 SYS_EVENTFD = 318 SYS_TIMERFD_CREATE = 319 SYS_TIMERFD_SETTIME = 320 SYS_TIMERFD_GETTIME = 321 SYS_SIGNALFD4 = 322 SYS_EVENTFD2 = 323 SYS_INOTIFY_INIT1 = 324 SYS_PIPE2 = 325 SYS_DUP3 = 326 SYS_EPOLL_CREATE1 = 327 SYS_PREADV = 328 SYS_PWRITEV = 329 SYS_RT_TGSIGQUEUEINFO = 330 SYS_PERF_EVENT_OPEN = 331 SYS_FANOTIFY_INIT = 332 SYS_FANOTIFY_MARK = 333 SYS_PRLIMIT64 = 334 SYS_NAME_TO_HANDLE_AT = 335 SYS_OPEN_BY_HANDLE_AT = 336 SYS_CLOCK_ADJTIME = 337 SYS_SYNCFS = 338 SYS_SETNS = 339 SYS_PROCESS_VM_READV = 340 SYS_PROCESS_VM_WRITEV = 341 SYS_S390_RUNTIME_INSTR = 342 SYS_KCMP = 343 SYS_FINIT_MODULE = 344 SYS_SCHED_SETATTR = 345 SYS_SCHED_GETATTR = 346 SYS_RENAMEAT2 = 347 SYS_SECCOMP = 348 SYS_GETRANDOM = 349 SYS_MEMFD_CREATE = 350 SYS_BPF = 351 SYS_S390_PCI_MMIO_WRITE = 352 SYS_S390_PCI_MMIO_READ = 353 SYS_EXECVEAT = 354 SYS_USERFAULTFD = 355 SYS_MEMBARRIER = 356 SYS_RECVMMSG = 357 SYS_SENDMMSG = 358 SYS_SOCKET = 359 SYS_SOCKETPAIR = 360 SYS_BIND = 361 SYS_CONNECT = 362 SYS_LISTEN = 363 SYS_ACCEPT4 = 364 SYS_GETSOCKOPT = 365 SYS_SETSOCKOPT = 366 SYS_GETSOCKNAME = 367 SYS_GETPEERNAME = 368 SYS_SENDTO = 369 SYS_SENDMSG = 370 SYS_RECVFROM = 371 SYS_RECVMSG = 372 SYS_SHUTDOWN = 373 SYS_MLOCK2 = 374 SYS_COPY_FILE_RANGE = 375 SYS_PREADV2 = 376 SYS_PWRITEV2 = 377 SYS_S390_GUARDED_STORAGE = 378 SYS_STATX = 379 SYS_S390_STHYI = 380 SYS_KEXEC_FILE_LOAD = 381 SYS_IO_PGETEVENTS = 382 SYS_RSEQ = 383 SYS_PKEY_MPROTECT = 384 SYS_PKEY_ALLOC = 385 SYS_PKEY_FREE = 386 SYS_SEMTIMEDOP = 392 SYS_SEMGET = 393 SYS_SEMCTL = 394 SYS_SHMGET = 395 SYS_SHMCTL = 396 SYS_SHMAT = 397 SYS_SHMDT = 398 SYS_MSGGET = 399 SYS_MSGSND = 400 SYS_MSGRCV = 401 SYS_MSGCTL = 402 SYS_PIDFD_SEND_SIGNAL = 424 SYS_IO_URING_SETUP = 425 SYS_IO_URING_ENTER = 426 SYS_IO_URING_REGISTER = 427 SYS_OPEN_TREE = 428 SYS_MOVE_MOUNT = 429 SYS_FSOPEN = 430 SYS_FSCONFIG = 431 SYS_FSMOUNT = 432 SYS_FSPICK = 433 SYS_PIDFD_OPEN = 434 SYS_CLONE3 = 435 SYS_CLOSE_RANGE = 436 SYS_OPENAT2 = 437 SYS_PIDFD_GETFD = 438 SYS_FACCESSAT2 = 439 SYS_PROCESS_MADVISE = 440 SYS_EPOLL_PWAIT2 = 441 SYS_MOUNT_SETATTR = 442 SYS_QUOTACTL_FD = 443 SYS_LANDLOCK_CREATE_RULESET = 444 SYS_LANDLOCK_ADD_RULE = 445 SYS_LANDLOCK_RESTRICT_SELF = 446 SYS_MEMFD_SECRET = 447 SYS_PROCESS_MRELEASE = 448 SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 SYS_MAP_SHADOW_STACK = 453 SYS_FUTEX_WAKE = 454 SYS_FUTEX_WAIT = 455 SYS_FUTEX_REQUEUE = 456 SYS_STATMOUNT = 457 SYS_LISTMOUNT = 458 SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 SYS_MSEAL = 462 ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go ================================================ // go run linux/mksysnum.go -Wall -Werror -static -I/tmp/sparc64/include /tmp/sparc64/include/asm/unistd.h // Code generated by the command above; see README.md. DO NOT EDIT. //go:build sparc64 && 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_WAIT4 = 7 SYS_CREAT = 8 SYS_LINK = 9 SYS_UNLINK = 10 SYS_EXECV = 11 SYS_CHDIR = 12 SYS_CHOWN = 13 SYS_MKNOD = 14 SYS_CHMOD = 15 SYS_LCHOWN = 16 SYS_BRK = 17 SYS_PERFCTR = 18 SYS_LSEEK = 19 SYS_GETPID = 20 SYS_CAPGET = 21 SYS_CAPSET = 22 SYS_SETUID = 23 SYS_GETUID = 24 SYS_VMSPLICE = 25 SYS_PTRACE = 26 SYS_ALARM = 27 SYS_SIGALTSTACK = 28 SYS_PAUSE = 29 SYS_UTIME = 30 SYS_ACCESS = 33 SYS_NICE = 34 SYS_SYNC = 36 SYS_KILL = 37 SYS_STAT = 38 SYS_SENDFILE = 39 SYS_LSTAT = 40 SYS_DUP = 41 SYS_PIPE = 42 SYS_TIMES = 43 SYS_UMOUNT2 = 45 SYS_SETGID = 46 SYS_GETGID = 47 SYS_SIGNAL = 48 SYS_GETEUID = 49 SYS_GETEGID = 50 SYS_ACCT = 51 SYS_MEMORY_ORDERING = 52 SYS_IOCTL = 54 SYS_REBOOT = 55 SYS_SYMLINK = 57 SYS_READLINK = 58 SYS_EXECVE = 59 SYS_UMASK = 60 SYS_CHROOT = 61 SYS_FSTAT = 62 SYS_FSTAT64 = 63 SYS_GETPAGESIZE = 64 SYS_MSYNC = 65 SYS_VFORK = 66 SYS_PREAD64 = 67 SYS_PWRITE64 = 68 SYS_MMAP = 71 SYS_MUNMAP = 73 SYS_MPROTECT = 74 SYS_MADVISE = 75 SYS_VHANGUP = 76 SYS_MINCORE = 78 SYS_GETGROUPS = 79 SYS_SETGROUPS = 80 SYS_GETPGRP = 81 SYS_SETITIMER = 83 SYS_SWAPON = 85 SYS_GETITIMER = 86 SYS_SETHOSTNAME = 88 SYS_DUP2 = 90 SYS_FCNTL = 92 SYS_SELECT = 93 SYS_FSYNC = 95 SYS_SETPRIORITY = 96 SYS_SOCKET = 97 SYS_CONNECT = 98 SYS_ACCEPT = 99 SYS_GETPRIORITY = 100 SYS_RT_SIGRETURN = 101 SYS_RT_SIGACTION = 102 SYS_RT_SIGPROCMASK = 103 SYS_RT_SIGPENDING = 104 SYS_RT_SIGTIMEDWAIT = 105 SYS_RT_SIGQUEUEINFO = 106 SYS_RT_SIGSUSPEND = 107 SYS_SETRESUID = 108 SYS_GETRESUID = 109 SYS_SETRESGID = 110 SYS_GETRESGID = 111 SYS_RECVMSG = 113 SYS_SENDMSG = 114 SYS_GETTIMEOFDAY = 116 SYS_GETRUSAGE = 117 SYS_GETSOCKOPT = 118 SYS_GETCWD = 119 SYS_READV = 120 SYS_WRITEV = 121 SYS_SETTIMEOFDAY = 122 SYS_FCHOWN = 123 SYS_FCHMOD = 124 SYS_RECVFROM = 125 SYS_SETREUID = 126 SYS_SETREGID = 127 SYS_RENAME = 128 SYS_TRUNCATE = 129 SYS_FTRUNCATE = 130 SYS_FLOCK = 131 SYS_LSTAT64 = 132 SYS_SENDTO = 133 SYS_SHUTDOWN = 134 SYS_SOCKETPAIR = 135 SYS_MKDIR = 136 SYS_RMDIR = 137 SYS_UTIMES = 138 SYS_STAT64 = 139 SYS_SENDFILE64 = 140 SYS_GETPEERNAME = 141 SYS_FUTEX = 142 SYS_GETTID = 143 SYS_GETRLIMIT = 144 SYS_SETRLIMIT = 145 SYS_PIVOT_ROOT = 146 SYS_PRCTL = 147 SYS_PCICONFIG_READ = 148 SYS_PCICONFIG_WRITE = 149 SYS_GETSOCKNAME = 150 SYS_INOTIFY_INIT = 151 SYS_INOTIFY_ADD_WATCH = 152 SYS_POLL = 153 SYS_GETDENTS64 = 154 SYS_INOTIFY_RM_WATCH = 156 SYS_STATFS = 157 SYS_FSTATFS = 158 SYS_UMOUNT = 159 SYS_SCHED_SET_AFFINITY = 160 SYS_SCHED_GET_AFFINITY = 161 SYS_GETDOMAINNAME = 162 SYS_SETDOMAINNAME = 163 SYS_UTRAP_INSTALL = 164 SYS_QUOTACTL = 165 SYS_SET_TID_ADDRESS = 166 SYS_MOUNT = 167 SYS_USTAT = 168 SYS_SETXATTR = 169 SYS_LSETXATTR = 170 SYS_FSETXATTR = 171 SYS_GETXATTR = 172 SYS_LGETXATTR = 173 SYS_GETDENTS = 174 SYS_SETSID = 175 SYS_FCHDIR = 176 SYS_FGETXATTR = 177 SYS_LISTXATTR = 178 SYS_LLISTXATTR = 179 SYS_FLISTXATTR = 180 SYS_REMOVEXATTR = 181 SYS_LREMOVEXATTR = 182 SYS_SIGPENDING = 183 SYS_QUERY_MODULE = 184 SYS_SETPGID = 185 SYS_FREMOVEXATTR = 186 SYS_TKILL = 187 SYS_EXIT_GROUP = 188 SYS_UNAME = 189 SYS_INIT_MODULE = 190 SYS_PERSONALITY = 191 SYS_REMAP_FILE_PAGES = 192 SYS_EPOLL_CREATE = 193 SYS_EPOLL_CTL = 194 SYS_EPOLL_WAIT = 195 SYS_IOPRIO_SET = 196 SYS_GETPPID = 197 SYS_SIGACTION = 198 SYS_SGETMASK = 199 SYS_SSETMASK = 200 SYS_SIGSUSPEND = 201 SYS_OLDLSTAT = 202 SYS_USELIB = 203 SYS_READDIR = 204 SYS_READAHEAD = 205 SYS_SOCKETCALL = 206 SYS_SYSLOG = 207 SYS_LOOKUP_DCOOKIE = 208 SYS_FADVISE64 = 209 SYS_FADVISE64_64 = 210 SYS_TGKILL = 211 SYS_WAITPID = 212 SYS_SWAPOFF = 213 SYS_SYSINFO = 214 SYS_IPC = 215 SYS_SIGRETURN = 216 SYS_CLONE = 217 SYS_IOPRIO_GET = 218 SYS_ADJTIMEX = 219 SYS_SIGPROCMASK = 220 SYS_CREATE_MODULE = 221 SYS_DELETE_MODULE = 222 SYS_GET_KERNEL_SYMS = 223 SYS_GETPGID = 224 SYS_BDFLUSH = 225 SYS_SYSFS = 226 SYS_AFS_SYSCALL = 227 SYS_SETFSUID = 228 SYS_SETFSGID = 229 SYS__NEWSELECT = 230 SYS_SPLICE = 232 SYS_STIME = 233 SYS_STATFS64 = 234 SYS_FSTATFS64 = 235 SYS__LLSEEK = 236 SYS_MLOCK = 237 SYS_MUNLOCK = 238 SYS_MLOCKALL = 239 SYS_MUNLOCKALL = 240 SYS_SCHED_SETPARAM = 241 SYS_SCHED_GETPARAM = 242 SYS_SCHED_SETSCHEDULER = 243 SYS_SCHED_GETSCHEDULER = 244 SYS_SCHED_YIELD = 245 SYS_SCHED_GET_PRIORITY_MAX = 246 SYS_SCHED_GET_PRIORITY_MIN = 247 SYS_SCHED_RR_GET_INTERVAL = 248 SYS_NANOSLEEP = 249 SYS_MREMAP = 250 SYS__SYSCTL = 251 SYS_GETSID = 252 SYS_FDATASYNC = 253 SYS_NFSSERVCTL = 254 SYS_SYNC_FILE_RANGE = 255 SYS_CLOCK_SETTIME = 256 SYS_CLOCK_GETTIME = 257 SYS_CLOCK_GETRES = 258 SYS_CLOCK_NANOSLEEP = 259 SYS_SCHED_GETAFFINITY = 260 SYS_SCHED_SETAFFINITY = 261 SYS_TIMER_SETTIME = 262 SYS_TIMER_GETTIME = 263 SYS_TIMER_GETOVERRUN = 264 SYS_TIMER_DELETE = 265 SYS_TIMER_CREATE = 266 SYS_VSERVER = 267 SYS_IO_SETUP = 268 SYS_IO_DESTROY = 269 SYS_IO_SUBMIT = 270 SYS_IO_CANCEL = 271 SYS_IO_GETEVENTS = 272 SYS_MQ_OPEN = 273 SYS_MQ_UNLINK = 274 SYS_MQ_TIMEDSEND = 275 SYS_MQ_TIMEDRECEIVE = 276 SYS_MQ_NOTIFY = 277 SYS_MQ_GETSETATTR = 278 SYS_WAITID = 279 SYS_TEE = 280 SYS_ADD_KEY = 281 SYS_REQUEST_KEY = 282 SYS_KEYCTL = 283 SYS_OPENAT = 284 SYS_MKDIRAT = 285 SYS_MKNODAT = 286 SYS_FCHOWNAT = 287 SYS_FUTIMESAT = 288 SYS_FSTATAT64 = 289 SYS_UNLINKAT = 290 SYS_RENAMEAT = 291 SYS_LINKAT = 292 SYS_SYMLINKAT = 293 SYS_READLINKAT = 294 SYS_FCHMODAT = 295 SYS_FACCESSAT = 296 SYS_PSELECT6 = 297 SYS_PPOLL = 298 SYS_UNSHARE = 299 SYS_SET_ROBUST_LIST = 300 SYS_GET_ROBUST_LIST = 301 SYS_MIGRATE_PAGES = 302 SYS_MBIND = 303 SYS_GET_MEMPOLICY = 304 SYS_SET_MEMPOLICY = 305 SYS_KEXEC_LOAD = 306 SYS_MOVE_PAGES = 307 SYS_GETCPU = 308 SYS_EPOLL_PWAIT = 309 SYS_UTIMENSAT = 310 SYS_SIGNALFD = 311 SYS_TIMERFD_CREATE = 312 SYS_EVENTFD = 313 SYS_FALLOCATE = 314 SYS_TIMERFD_SETTIME = 315 SYS_TIMERFD_GETTIME = 316 SYS_SIGNALFD4 = 317 SYS_EVENTFD2 = 318 SYS_EPOLL_CREATE1 = 319 SYS_DUP3 = 320 SYS_PIPE2 = 321 SYS_INOTIFY_INIT1 = 322 SYS_ACCEPT4 = 323 SYS_PREADV = 324 SYS_PWRITEV = 325 SYS_RT_TGSIGQUEUEINFO = 326 SYS_PERF_EVENT_OPEN = 327 SYS_RECVMMSG = 328 SYS_FANOTIFY_INIT = 329 SYS_FANOTIFY_MARK = 330 SYS_PRLIMIT64 = 331 SYS_NAME_TO_HANDLE_AT = 332 SYS_OPEN_BY_HANDLE_AT = 333 SYS_CLOCK_ADJTIME = 334 SYS_SYNCFS = 335 SYS_SENDMMSG = 336 SYS_SETNS = 337 SYS_PROCESS_VM_READV = 338 SYS_PROCESS_VM_WRITEV = 339 SYS_KERN_FEATURES = 340 SYS_KCMP = 341 SYS_FINIT_MODULE = 342 SYS_SCHED_SETATTR = 343 SYS_SCHED_GETATTR = 344 SYS_RENAMEAT2 = 345 SYS_SECCOMP = 346 SYS_GETRANDOM = 347 SYS_MEMFD_CREATE = 348 SYS_BPF = 349 SYS_EXECVEAT = 350 SYS_MEMBARRIER = 351 SYS_USERFAULTFD = 352 SYS_BIND = 353 SYS_LISTEN = 354 SYS_SETSOCKOPT = 355 SYS_MLOCK2 = 356 SYS_COPY_FILE_RANGE = 357 SYS_PREADV2 = 358 SYS_PWRITEV2 = 359 SYS_STATX = 360 SYS_IO_PGETEVENTS = 361 SYS_PKEY_MPROTECT = 362 SYS_PKEY_ALLOC = 363 SYS_PKEY_FREE = 364 SYS_RSEQ = 365 SYS_SEMTIMEDOP = 392 SYS_SEMGET = 393 SYS_SEMCTL = 394 SYS_SHMGET = 395 SYS_SHMCTL = 396 SYS_SHMAT = 397 SYS_SHMDT = 398 SYS_MSGGET = 399 SYS_MSGSND = 400 SYS_MSGRCV = 401 SYS_MSGCTL = 402 SYS_PIDFD_SEND_SIGNAL = 424 SYS_IO_URING_SETUP = 425 SYS_IO_URING_ENTER = 426 SYS_IO_URING_REGISTER = 427 SYS_OPEN_TREE = 428 SYS_MOVE_MOUNT = 429 SYS_FSOPEN = 430 SYS_FSCONFIG = 431 SYS_FSMOUNT = 432 SYS_FSPICK = 433 SYS_PIDFD_OPEN = 434 SYS_CLOSE_RANGE = 436 SYS_OPENAT2 = 437 SYS_PIDFD_GETFD = 438 SYS_FACCESSAT2 = 439 SYS_PROCESS_MADVISE = 440 SYS_EPOLL_PWAIT2 = 441 SYS_MOUNT_SETATTR = 442 SYS_QUOTACTL_FD = 443 SYS_LANDLOCK_CREATE_RULESET = 444 SYS_LANDLOCK_ADD_RULE = 445 SYS_LANDLOCK_RESTRICT_SELF = 446 SYS_PROCESS_MRELEASE = 448 SYS_FUTEX_WAITV = 449 SYS_SET_MEMPOLICY_HOME_NODE = 450 SYS_CACHESTAT = 451 SYS_FCHMODAT2 = 452 SYS_MAP_SHADOW_STACK = 453 SYS_FUTEX_WAKE = 454 SYS_FUTEX_WAIT = 455 SYS_FUTEX_REQUEUE = 456 SYS_STATMOUNT = 457 SYS_LISTMOUNT = 458 SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 SYS_MSEAL = 462 ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go ================================================ // go run mksysnum.go http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master // Code generated by the command above; see README.md. DO NOT EDIT. //go: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_MSYNC = 277 // { int|sys|13|msync(void *addr, size_t len, int flags); } 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); } ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go ================================================ // go run mksysnum.go http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master // Code generated by the command above; see README.md. DO NOT EDIT. //go: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_MSYNC = 277 // { int|sys|13|msync(void *addr, size_t len, int flags); } 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); } ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go ================================================ // go run mksysnum.go http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master // Code generated by the command above; see README.md. DO NOT EDIT. //go: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_MSYNC = 277 // { int|sys|13|msync(void *addr, size_t len, int flags); } 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); } ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm64.go ================================================ // go run mksysnum.go http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master // Code generated by the command above; DO NOT EDIT. //go:build arm64 && 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_MSYNC = 277 // { int|sys|13|msync(void *addr, size_t len, int flags); } 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); } ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go ================================================ // go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && openbsd package unix // Deprecated: Use libc wrappers instead of direct syscalls. 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_GETENTROPY = 7 // { int sys_getentropy(void *buf, size_t nbyte); } SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, size_t psize); } 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, int options, struct rusage *rusage); } 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, dev_t dev); } 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_OBREAK = 17 // { int sys_obreak(char *nsize); } break SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); } SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, struct rusage *rusage); } SYS_GETPID = 20 // { pid_t sys_getpid(void); } SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, int flags, void *data); } 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, 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 amode); } 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_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, struct stat *buf, int flag); } SYS_GETEGID = 43 // { gid_t sys_getegid(void); } SYS_PROFIL = 44 // { int sys_profil(caddr_t 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_SIGACTION = 46 // { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); } SYS_GETGID = 47 // { gid_t sys_getgid(void); } SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); } 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, u_long com, ... void *data); } 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, 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_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); } SYS_STATFS = 63 // { int sys_statfs(const char *path, struct statfs *buf); } SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); } SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); } SYS_VFORK = 66 // { int sys_vfork(void); } SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); } SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); } SYS_SETITIMER = 69 // { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); } SYS_GETITIMER = 70 // { int sys_getitimer(int which, struct itimerval *itv); } SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); } SYS_KEVENT = 72 // { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); } 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_UTIMES = 76 // { int sys_utimes(const char *path, const struct timeval *tptr); } SYS_FUTIMES = 77 // { int sys_futimes(int fd, const struct timeval *tptr); } 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_FUTEX = 83 // { int sys_futex(uint32_t *f, int op, int val, const struct timespec *timeout, uint32_t *g); } SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, const struct timespec *times, int flag); } SYS_FUTIMENS = 85 // { int sys_futimens(int fd, const struct timespec *times); } SYS_KBIND = 86 // { int sys_kbind(const struct __kbind *param, size_t psize, int64_t proc_cookie); } SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); } SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); } SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); } SYS_DUP2 = 90 // { int sys_dup2(int from, int to); } SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); } SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); } SYS_ACCEPT4 = 93 // { int sys_accept4(int s, struct sockaddr *name, socklen_t *anamelen, int flags); } SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, clockid_t clock_id, const struct timespec *tp, void *lock, const int *abort); } 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, socklen_t namelen); } 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_PIPE2 = 101 // { int sys_pipe2(int *fdp, int flags); } SYS_DUP3 = 102 // { int sys_dup3(int from, int to, int flags); } SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); } 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_CHFLAGSAT = 107 // { int sys_chflagsat(int fd, const char *path, u_int flags, int atflags); } SYS_PLEDGE = 108 // { int sys_pledge(const char *promises, const char *execpromises); } SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); } SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); } SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); } SYS_SENDSYSLOG = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, int flags); } SYS_UNVEIL = 114 // { int sys_unveil(const char *path, const char *permissions); } SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); } SYS_THRKILL = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); } 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_KILL = 122 // { int sys_kill(int pid, int signum); } 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_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); } SYS_GETLOGIN_R = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); } SYS_SETSID = 147 // { int sys_setsid(void); } SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, int uid, char *arg); } 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, 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_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, 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, 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_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); } SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, size_t len); } 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, int msgflg); } SYS_MSGRCV = 227 // { int 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_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, int inherit); } SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); } 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, const struct iovec *iovp, int iovcnt, int pad, off_t offset); } SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); } 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, uid_t *suid); } SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); } SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); } SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); } SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); } SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); } SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); } 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, size_t nsops); } SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); } SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); } SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); } SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); } 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, int n); } SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); } SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, siginfo_t *info, const struct timespec *timeout); } SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); } SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); } 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, int amode, int flag); } SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, mode_t mode, int flag); } SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag); } SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); } SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, mode_t mode); } SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, mode_t mode); } SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, mode_t mode, dev_t dev); } SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, ... mode_t mode); } SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, char *buf, size_t count); } SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, int tofd, const char *to); } SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, const char *link); } SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, int flag); } SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); } SYS___GET_TCB = 330 // { void *sys___get_tcb(void); } ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go ================================================ // go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && openbsd package unix // Deprecated: Use libc wrappers instead of direct syscalls. 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_GETENTROPY = 7 // { int sys_getentropy(void *buf, size_t nbyte); } SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, size_t psize); } 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, int options, struct rusage *rusage); } 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, dev_t dev); } 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_OBREAK = 17 // { int sys_obreak(char *nsize); } break SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); } SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, struct rusage *rusage); } SYS_GETPID = 20 // { pid_t sys_getpid(void); } SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, int flags, void *data); } 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, 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 amode); } 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_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, struct stat *buf, int flag); } SYS_GETEGID = 43 // { gid_t sys_getegid(void); } SYS_PROFIL = 44 // { int sys_profil(caddr_t 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_SIGACTION = 46 // { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); } SYS_GETGID = 47 // { gid_t sys_getgid(void); } SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); } 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, u_long com, ... void *data); } 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, 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_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); } SYS_STATFS = 63 // { int sys_statfs(const char *path, struct statfs *buf); } SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); } SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); } SYS_VFORK = 66 // { int sys_vfork(void); } SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); } SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); } SYS_SETITIMER = 69 // { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); } SYS_GETITIMER = 70 // { int sys_getitimer(int which, struct itimerval *itv); } SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); } SYS_KEVENT = 72 // { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); } 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_UTIMES = 76 // { int sys_utimes(const char *path, const struct timeval *tptr); } SYS_FUTIMES = 77 // { int sys_futimes(int fd, const struct timeval *tptr); } 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_FUTEX = 83 // { int sys_futex(uint32_t *f, int op, int val, const struct timespec *timeout, uint32_t *g); } SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, const struct timespec *times, int flag); } SYS_FUTIMENS = 85 // { int sys_futimens(int fd, const struct timespec *times); } SYS_KBIND = 86 // { int sys_kbind(const struct __kbind *param, size_t psize, int64_t proc_cookie); } SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); } SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); } SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); } SYS_DUP2 = 90 // { int sys_dup2(int from, int to); } SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); } SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); } SYS_ACCEPT4 = 93 // { int sys_accept4(int s, struct sockaddr *name, socklen_t *anamelen, int flags); } SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, clockid_t clock_id, const struct timespec *tp, void *lock, const int *abort); } 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, socklen_t namelen); } 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_PIPE2 = 101 // { int sys_pipe2(int *fdp, int flags); } SYS_DUP3 = 102 // { int sys_dup3(int from, int to, int flags); } SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); } 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_CHFLAGSAT = 107 // { int sys_chflagsat(int fd, const char *path, u_int flags, int atflags); } SYS_PLEDGE = 108 // { int sys_pledge(const char *promises, const char *execpromises); } SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); } SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); } SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); } SYS_SENDSYSLOG = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, int flags); } SYS_UNVEIL = 114 // { int sys_unveil(const char *path, const char *permissions); } SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); } SYS_THRKILL = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); } 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_KILL = 122 // { int sys_kill(int pid, int signum); } 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_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); } SYS_GETLOGIN_R = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); } SYS_SETSID = 147 // { int sys_setsid(void); } SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, int uid, char *arg); } 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, 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_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, 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, 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_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); } SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, size_t len); } 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, int msgflg); } SYS_MSGRCV = 227 // { int 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_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, int inherit); } SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); } 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, const struct iovec *iovp, int iovcnt, int pad, off_t offset); } SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); } 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, uid_t *suid); } SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); } SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); } SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); } SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); } SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); } SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); } 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, size_t nsops); } SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); } SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); } SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); } SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); } 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, int n); } SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); } SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, siginfo_t *info, const struct timespec *timeout); } SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); } SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); } 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, int amode, int flag); } SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, mode_t mode, int flag); } SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag); } SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); } SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, mode_t mode); } SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, mode_t mode); } SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, mode_t mode, dev_t dev); } SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, ... mode_t mode); } SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, char *buf, size_t count); } SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, int tofd, const char *to); } SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, const char *link); } SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, int flag); } SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); } SYS___GET_TCB = 330 // { void *sys___get_tcb(void); } ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go ================================================ // go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && openbsd package unix // Deprecated: Use libc wrappers instead of direct syscalls. 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_GETENTROPY = 7 // { int sys_getentropy(void *buf, size_t nbyte); } SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, size_t psize); } 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, int options, struct rusage *rusage); } 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, dev_t dev); } 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_OBREAK = 17 // { int sys_obreak(char *nsize); } break SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); } SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, struct rusage *rusage); } SYS_GETPID = 20 // { pid_t sys_getpid(void); } SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, int flags, void *data); } 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, 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 amode); } 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_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, struct stat *buf, int flag); } SYS_GETEGID = 43 // { gid_t sys_getegid(void); } SYS_PROFIL = 44 // { int sys_profil(caddr_t 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_SIGACTION = 46 // { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); } SYS_GETGID = 47 // { gid_t sys_getgid(void); } SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); } 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, u_long com, ... void *data); } 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, 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_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); } SYS_STATFS = 63 // { int sys_statfs(const char *path, struct statfs *buf); } SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); } SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); } SYS_VFORK = 66 // { int sys_vfork(void); } SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); } SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); } SYS_SETITIMER = 69 // { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); } SYS_GETITIMER = 70 // { int sys_getitimer(int which, struct itimerval *itv); } SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); } SYS_KEVENT = 72 // { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); } 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_UTIMES = 76 // { int sys_utimes(const char *path, const struct timeval *tptr); } SYS_FUTIMES = 77 // { int sys_futimes(int fd, const struct timeval *tptr); } 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_FUTEX = 83 // { int sys_futex(uint32_t *f, int op, int val, const struct timespec *timeout, uint32_t *g); } SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, const struct timespec *times, int flag); } SYS_FUTIMENS = 85 // { int sys_futimens(int fd, const struct timespec *times); } SYS_KBIND = 86 // { int sys_kbind(const struct __kbind *param, size_t psize, int64_t proc_cookie); } SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); } SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); } SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); } SYS_DUP2 = 90 // { int sys_dup2(int from, int to); } SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); } SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); } SYS_ACCEPT4 = 93 // { int sys_accept4(int s, struct sockaddr *name, socklen_t *anamelen, int flags); } SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, clockid_t clock_id, const struct timespec *tp, void *lock, const int *abort); } 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, socklen_t namelen); } 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_PIPE2 = 101 // { int sys_pipe2(int *fdp, int flags); } SYS_DUP3 = 102 // { int sys_dup3(int from, int to, int flags); } SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); } 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_CHFLAGSAT = 107 // { int sys_chflagsat(int fd, const char *path, u_int flags, int atflags); } SYS_PLEDGE = 108 // { int sys_pledge(const char *promises, const char *execpromises); } SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); } SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); } SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); } SYS_SENDSYSLOG = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, int flags); } SYS_UNVEIL = 114 // { int sys_unveil(const char *path, const char *permissions); } SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); } SYS_THRKILL = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); } 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_KILL = 122 // { int sys_kill(int pid, int signum); } 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_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); } SYS_GETLOGIN_R = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); } SYS_SETSID = 147 // { int sys_setsid(void); } SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, int uid, char *arg); } 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, 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_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, 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, 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_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); } SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, size_t len); } 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, int msgflg); } SYS_MSGRCV = 227 // { int 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_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, int inherit); } SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); } 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, const struct iovec *iovp, int iovcnt, int pad, off_t offset); } SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); } 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, uid_t *suid); } SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); } SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); } SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); } SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); } SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); } SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); } 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, size_t nsops); } SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); } SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); } SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); } SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); } 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, int n); } SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); } SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, siginfo_t *info, const struct timespec *timeout); } SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); } SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); } 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, int amode, int flag); } SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, mode_t mode, int flag); } SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag); } SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); } SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, mode_t mode); } SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, mode_t mode); } SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, mode_t mode, dev_t dev); } SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, ... mode_t mode); } SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, char *buf, size_t count); } SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, int tofd, const char *to); } SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, const char *link); } SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, int flag); } SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); } SYS___GET_TCB = 330 // { void *sys___get_tcb(void); } ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go ================================================ // go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && openbsd package unix // Deprecated: Use libc wrappers instead of direct syscalls. 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_GETENTROPY = 7 // { int sys_getentropy(void *buf, size_t nbyte); } SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, size_t psize); } 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, int options, struct rusage *rusage); } 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, dev_t dev); } 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_OBREAK = 17 // { int sys_obreak(char *nsize); } break SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); } SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, struct rusage *rusage); } SYS_GETPID = 20 // { pid_t sys_getpid(void); } SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, int flags, void *data); } 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, 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 amode); } 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_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, struct stat *buf, int flag); } SYS_GETEGID = 43 // { gid_t sys_getegid(void); } SYS_PROFIL = 44 // { int sys_profil(caddr_t 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_SIGACTION = 46 // { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); } SYS_GETGID = 47 // { gid_t sys_getgid(void); } SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); } 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, u_long com, ... void *data); } 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, 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_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); } SYS_STATFS = 63 // { int sys_statfs(const char *path, struct statfs *buf); } SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); } SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); } SYS_VFORK = 66 // { int sys_vfork(void); } SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); } SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); } SYS_SETITIMER = 69 // { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); } SYS_GETITIMER = 70 // { int sys_getitimer(int which, struct itimerval *itv); } SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); } SYS_KEVENT = 72 // { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); } 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_UTIMES = 76 // { int sys_utimes(const char *path, const struct timeval *tptr); } SYS_FUTIMES = 77 // { int sys_futimes(int fd, const struct timeval *tptr); } 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_FUTEX = 83 // { int sys_futex(uint32_t *f, int op, int val, const struct timespec *timeout, uint32_t *g); } SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, const struct timespec *times, int flag); } SYS_FUTIMENS = 85 // { int sys_futimens(int fd, const struct timespec *times); } SYS_KBIND = 86 // { int sys_kbind(const struct __kbind *param, size_t psize, int64_t proc_cookie); } SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); } SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); } SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); } SYS_DUP2 = 90 // { int sys_dup2(int from, int to); } SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); } SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); } SYS_ACCEPT4 = 93 // { int sys_accept4(int s, struct sockaddr *name, socklen_t *anamelen, int flags); } SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, clockid_t clock_id, const struct timespec *tp, void *lock, const int *abort); } 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, socklen_t namelen); } 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_PIPE2 = 101 // { int sys_pipe2(int *fdp, int flags); } SYS_DUP3 = 102 // { int sys_dup3(int from, int to, int flags); } SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); } 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_CHFLAGSAT = 107 // { int sys_chflagsat(int fd, const char *path, u_int flags, int atflags); } SYS_PLEDGE = 108 // { int sys_pledge(const char *promises, const char *execpromises); } SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); } SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); } SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); } SYS_SENDSYSLOG = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, int flags); } SYS_UNVEIL = 114 // { int sys_unveil(const char *path, const char *permissions); } SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); } SYS_THRKILL = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); } 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_KILL = 122 // { int sys_kill(int pid, int signum); } 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_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); } SYS_GETLOGIN_R = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); } SYS_SETSID = 147 // { int sys_setsid(void); } SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, int uid, char *arg); } 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, 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_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, 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, 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_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); } SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, size_t len); } 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, int msgflg); } SYS_MSGRCV = 227 // { int 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_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, int inherit); } SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); } 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, const struct iovec *iovp, int iovcnt, int pad, off_t offset); } SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); } 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, uid_t *suid); } SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); } SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); } SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); } SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); } SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); } SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); } 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, size_t nsops); } SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); } SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); } SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); } SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); } 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, int n); } SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); } SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, siginfo_t *info, const struct timespec *timeout); } SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); } SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); } 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, int amode, int flag); } SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, mode_t mode, int flag); } SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag); } SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); } SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, mode_t mode); } SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, mode_t mode); } SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, mode_t mode, dev_t dev); } SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, ... mode_t mode); } SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, char *buf, size_t count); } SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, int tofd, const char *to); } SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, const char *link); } SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, int flag); } SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); } SYS___GET_TCB = 330 // { void *sys___get_tcb(void); } ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_openbsd_mips64.go ================================================ // go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64 && openbsd package unix // Deprecated: Use libc wrappers instead of direct syscalls. 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_GETENTROPY = 7 // { int sys_getentropy(void *buf, size_t nbyte); } SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, size_t psize); } 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, int options, struct rusage *rusage); } 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, dev_t dev); } 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_OBREAK = 17 // { int sys_obreak(char *nsize); } break SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); } SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, struct rusage *rusage); } SYS_GETPID = 20 // { pid_t sys_getpid(void); } SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, int flags, void *data); } 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, 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 amode); } 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_MSYSCALL = 37 // { int sys_msyscall(void *addr, size_t len); } 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, struct stat *buf, int flag); } SYS_GETEGID = 43 // { gid_t sys_getegid(void); } SYS_PROFIL = 44 // { int sys_profil(caddr_t 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_SIGACTION = 46 // { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); } SYS_GETGID = 47 // { gid_t sys_getgid(void); } SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); } 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, u_long com, ... void *data); } 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, 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_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); } SYS_STATFS = 63 // { int sys_statfs(const char *path, struct statfs *buf); } SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); } SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); } SYS_VFORK = 66 // { int sys_vfork(void); } SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); } SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); } SYS_SETITIMER = 69 // { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); } SYS_GETITIMER = 70 // { int sys_getitimer(int which, struct itimerval *itv); } SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); } SYS_KEVENT = 72 // { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); } 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_UTIMES = 76 // { int sys_utimes(const char *path, const struct timeval *tptr); } SYS_FUTIMES = 77 // { int sys_futimes(int fd, const struct timeval *tptr); } 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_FUTEX = 83 // { int sys_futex(uint32_t *f, int op, int val, const struct timespec *timeout, uint32_t *g); } SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, const struct timespec *times, int flag); } SYS_FUTIMENS = 85 // { int sys_futimens(int fd, const struct timespec *times); } SYS_KBIND = 86 // { int sys_kbind(const struct __kbind *param, size_t psize, int64_t proc_cookie); } SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); } SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); } SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); } SYS_DUP2 = 90 // { int sys_dup2(int from, int to); } SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); } SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); } SYS_ACCEPT4 = 93 // { int sys_accept4(int s, struct sockaddr *name, socklen_t *anamelen, int flags); } SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, clockid_t clock_id, const struct timespec *tp, void *lock, const int *abort); } 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, socklen_t namelen); } 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_PIPE2 = 101 // { int sys_pipe2(int *fdp, int flags); } SYS_DUP3 = 102 // { int sys_dup3(int from, int to, int flags); } SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); } 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_CHFLAGSAT = 107 // { int sys_chflagsat(int fd, const char *path, u_int flags, int atflags); } SYS_PLEDGE = 108 // { int sys_pledge(const char *promises, const char *execpromises); } SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); } SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); } SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); } SYS_SENDSYSLOG = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, int flags); } SYS_UNVEIL = 114 // { int sys_unveil(const char *path, const char *permissions); } SYS___REALPATH = 115 // { int sys___realpath(const char *pathname, char *resolved); } SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); } SYS_THRKILL = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); } 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_KILL = 122 // { int sys_kill(int pid, int signum); } 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_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); } SYS_GETLOGIN_R = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); } SYS_SETSID = 147 // { int sys_setsid(void); } SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, int uid, char *arg); } SYS_NFSSVC = 155 // { int sys_nfssvc(int flag, void *argp); } SYS_GETFH = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); } SYS___TMPFD = 164 // { int sys___tmpfd(int flags); } 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_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, 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, 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_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); } SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, size_t len); } 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, int msgflg); } SYS_MSGRCV = 227 // { int 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_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, int inherit); } SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); } 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, const struct iovec *iovp, int iovcnt, int pad, off_t offset); } SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); } 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, uid_t *suid); } SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); } SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); } SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); } SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); } SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); } SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); } 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, size_t nsops); } SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); } SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); } SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); } SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); } 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, int n); } SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); } SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, siginfo_t *info, const struct timespec *timeout); } SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); } SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); } 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, int amode, int flag); } SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, mode_t mode, int flag); } SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag); } SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); } SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, mode_t mode); } SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, mode_t mode); } SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, mode_t mode, dev_t dev); } SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, ... mode_t mode); } SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, char *buf, size_t count); } SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, int tofd, const char *to); } SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, const char *link); } SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, int flag); } SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); } SYS___GET_TCB = 330 // { void *sys___get_tcb(void); } ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_openbsd_ppc64.go ================================================ // go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64 && 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, 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_GETENTROPY = 7 // { int sys_getentropy(void *buf, size_t nbyte); } SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, size_t psize); } 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, int options, struct rusage *rusage); } 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, dev_t dev); } 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_OBREAK = 17 // { int sys_obreak(char *nsize); } break SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); } SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, struct rusage *rusage); } SYS_GETPID = 20 // { pid_t sys_getpid(void); } SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, int flags, void *data); } 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, 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 amode); } 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_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, struct stat *buf, int flag); } SYS_GETEGID = 43 // { gid_t sys_getegid(void); } SYS_PROFIL = 44 // { int sys_profil(caddr_t 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_SIGACTION = 46 // { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); } SYS_GETGID = 47 // { gid_t sys_getgid(void); } SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); } 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, u_long com, ... void *data); } 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, 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_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); } SYS_STATFS = 63 // { int sys_statfs(const char *path, struct statfs *buf); } SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); } SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); } SYS_VFORK = 66 // { int sys_vfork(void); } SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); } SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); } SYS_SETITIMER = 69 // { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); } SYS_GETITIMER = 70 // { int sys_getitimer(int which, struct itimerval *itv); } SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); } SYS_KEVENT = 72 // { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); } 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_UTIMES = 76 // { int sys_utimes(const char *path, const struct timeval *tptr); } SYS_FUTIMES = 77 // { int sys_futimes(int fd, const struct timeval *tptr); } 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_FUTEX = 83 // { int sys_futex(uint32_t *f, int op, int val, const struct timespec *timeout, uint32_t *g); } SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, const struct timespec *times, int flag); } SYS_FUTIMENS = 85 // { int sys_futimens(int fd, const struct timespec *times); } SYS_KBIND = 86 // { int sys_kbind(const struct __kbind *param, size_t psize, int64_t proc_cookie); } SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); } SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); } SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); } SYS_DUP2 = 90 // { int sys_dup2(int from, int to); } SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); } SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); } SYS_ACCEPT4 = 93 // { int sys_accept4(int s, struct sockaddr *name, socklen_t *anamelen, int flags); } SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, clockid_t clock_id, const struct timespec *tp, void *lock, const int *abort); } 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, socklen_t namelen); } 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_PIPE2 = 101 // { int sys_pipe2(int *fdp, int flags); } SYS_DUP3 = 102 // { int sys_dup3(int from, int to, int flags); } SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); } 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_CHFLAGSAT = 107 // { int sys_chflagsat(int fd, const char *path, u_int flags, int atflags); } SYS_PLEDGE = 108 // { int sys_pledge(const char *promises, const char *execpromises); } SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); } SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); } SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); } SYS_SENDSYSLOG = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, int flags); } SYS_UNVEIL = 114 // { int sys_unveil(const char *path, const char *permissions); } SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); } SYS_THRKILL = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); } 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_KILL = 122 // { int sys_kill(int pid, int signum); } 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_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); } SYS_GETLOGIN_R = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); } SYS_SETSID = 147 // { int sys_setsid(void); } SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, int uid, char *arg); } 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, 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_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, 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, 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_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); } SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, size_t len); } 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, int msgflg); } SYS_MSGRCV = 227 // { int 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_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, int inherit); } SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); } 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, const struct iovec *iovp, int iovcnt, int pad, off_t offset); } SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); } 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, uid_t *suid); } SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); } SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); } SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); } SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); } SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); } SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); } 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, size_t nsops); } SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); } SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); } SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); } SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); } 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, int n); } SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); } SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, siginfo_t *info, const struct timespec *timeout); } SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); } SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); } 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, int amode, int flag); } SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, mode_t mode, int flag); } SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag); } SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); } SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, mode_t mode); } SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, mode_t mode); } SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, mode_t mode, dev_t dev); } SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, ... mode_t mode); } SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, char *buf, size_t count); } SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, int tofd, const char *to); } SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, const char *link); } SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, int flag); } SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); } SYS___GET_TCB = 330 // { void *sys___get_tcb(void); } ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_openbsd_riscv64.go ================================================ // go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && openbsd package unix // Deprecated: Use libc wrappers instead of direct syscalls. 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_GETENTROPY = 7 // { int sys_getentropy(void *buf, size_t nbyte); } SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, size_t psize); } 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, int options, struct rusage *rusage); } 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, dev_t dev); } 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_OBREAK = 17 // { int sys_obreak(char *nsize); } break SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); } SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, struct rusage *rusage); } SYS_GETPID = 20 // { pid_t sys_getpid(void); } SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, int flags, void *data); } 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, 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 amode); } 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_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, struct stat *buf, int flag); } SYS_GETEGID = 43 // { gid_t sys_getegid(void); } SYS_PROFIL = 44 // { int sys_profil(caddr_t 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_SIGACTION = 46 // { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); } SYS_GETGID = 47 // { gid_t sys_getgid(void); } SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); } 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, u_long com, ... void *data); } 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, 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_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); } SYS_STATFS = 63 // { int sys_statfs(const char *path, struct statfs *buf); } SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); } SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); } SYS_VFORK = 66 // { int sys_vfork(void); } SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); } SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); } SYS_SETITIMER = 69 // { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); } SYS_GETITIMER = 70 // { int sys_getitimer(int which, struct itimerval *itv); } SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); } SYS_KEVENT = 72 // { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); } 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_UTIMES = 76 // { int sys_utimes(const char *path, const struct timeval *tptr); } SYS_FUTIMES = 77 // { int sys_futimes(int fd, const struct timeval *tptr); } 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_FUTEX = 83 // { int sys_futex(uint32_t *f, int op, int val, const struct timespec *timeout, uint32_t *g); } SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, const struct timespec *times, int flag); } SYS_FUTIMENS = 85 // { int sys_futimens(int fd, const struct timespec *times); } SYS_KBIND = 86 // { int sys_kbind(const struct __kbind *param, size_t psize, int64_t proc_cookie); } SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); } SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); } SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); } SYS_DUP2 = 90 // { int sys_dup2(int from, int to); } SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); } SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); } SYS_ACCEPT4 = 93 // { int sys_accept4(int s, struct sockaddr *name, socklen_t *anamelen, int flags); } SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, clockid_t clock_id, const struct timespec *tp, void *lock, const int *abort); } 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, socklen_t namelen); } 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_PIPE2 = 101 // { int sys_pipe2(int *fdp, int flags); } SYS_DUP3 = 102 // { int sys_dup3(int from, int to, int flags); } SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); } 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_CHFLAGSAT = 107 // { int sys_chflagsat(int fd, const char *path, u_int flags, int atflags); } SYS_PLEDGE = 108 // { int sys_pledge(const char *promises, const char *execpromises); } SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); } SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); } SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); } SYS_SENDSYSLOG = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, int flags); } SYS_UNVEIL = 114 // { int sys_unveil(const char *path, const char *permissions); } SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); } SYS_THRKILL = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); } 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_KILL = 122 // { int sys_kill(int pid, int signum); } 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_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); } SYS_GETLOGIN_R = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); } SYS_SETSID = 147 // { int sys_setsid(void); } SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, int uid, char *arg); } 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, 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_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, 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, 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_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); } SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, size_t len); } 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, int msgflg); } SYS_MSGRCV = 227 // { int 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_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, int inherit); } SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); } 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, const struct iovec *iovp, int iovcnt, int pad, off_t offset); } SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); } 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, uid_t *suid); } SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); } SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); } SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); } SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); } SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); } SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); } 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, size_t nsops); } SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); } SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); } SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); } SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); } 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, int n); } SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); } SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, siginfo_t *info, const struct timespec *timeout); } SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); } SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); } 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, int amode, int flag); } SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, mode_t mode, int flag); } SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag); } SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); } SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, mode_t mode); } SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, mode_t mode); } SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, mode_t mode, dev_t dev); } SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, ... mode_t mode); } SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, char *buf, size_t count); } SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, int tofd, const char *to); } SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, const char *link); } SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, int flag); } SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); } SYS___GET_TCB = 330 // { void *sys___get_tcb(void); } ) ================================================ FILE: vendor/golang.org/x/sys/unix/zsysnum_zos_s390x.go ================================================ // go run mksyscall_zos_s390x.go -o_sysnum zsysnum_zos_s390x.go -o_syscall zsyscall_zos_s390x.go -i_syscall syscall_zos_s390x.go -o_asm zsymaddr_zos_s390x.s // Code generated by the command above; see README.md. DO NOT EDIT. //go:build zos && s390x package unix const ( SYS_LOG = 0x17 // 23 SYS_COSH = 0x18 // 24 SYS_TANH = 0x19 // 25 SYS_EXP = 0x1A // 26 SYS_MODF = 0x1B // 27 SYS_LOG10 = 0x1C // 28 SYS_FREXP = 0x1D // 29 SYS_LDEXP = 0x1E // 30 SYS_CEIL = 0x1F // 31 SYS_POW = 0x20 // 32 SYS_SQRT = 0x21 // 33 SYS_FLOOR = 0x22 // 34 SYS_J1 = 0x23 // 35 SYS_FABS = 0x24 // 36 SYS_FMOD = 0x25 // 37 SYS_J0 = 0x26 // 38 SYS_YN = 0x27 // 39 SYS_JN = 0x28 // 40 SYS_Y0 = 0x29 // 41 SYS_Y1 = 0x2A // 42 SYS_HYPOT = 0x2B // 43 SYS_ERF = 0x2C // 44 SYS_ERFC = 0x2D // 45 SYS_GAMMA = 0x2E // 46 SYS_ISALPHA = 0x30 // 48 SYS_ISALNUM = 0x31 // 49 SYS_ISLOWER = 0x32 // 50 SYS_ISCNTRL = 0x33 // 51 SYS_ISDIGIT = 0x34 // 52 SYS_ISGRAPH = 0x35 // 53 SYS_ISUPPER = 0x36 // 54 SYS_ISPRINT = 0x37 // 55 SYS_ISPUNCT = 0x38 // 56 SYS_ISSPACE = 0x39 // 57 SYS_SETLOCAL = 0x3A // 58 SYS_SETLOCALE = 0x3A // 58 SYS_ISXDIGIT = 0x3B // 59 SYS_TOLOWER = 0x3C // 60 SYS_TOUPPER = 0x3D // 61 SYS_ASIN = 0x3E // 62 SYS_SIN = 0x3F // 63 SYS_COS = 0x40 // 64 SYS_TAN = 0x41 // 65 SYS_SINH = 0x42 // 66 SYS_ACOS = 0x43 // 67 SYS_ATAN = 0x44 // 68 SYS_ATAN2 = 0x45 // 69 SYS_FTELL = 0x46 // 70 SYS_FGETPOS = 0x47 // 71 SYS_FSEEK = 0x48 // 72 SYS_FSETPOS = 0x49 // 73 SYS_FERROR = 0x4A // 74 SYS_REWIND = 0x4B // 75 SYS_CLEARERR = 0x4C // 76 SYS_FEOF = 0x4D // 77 SYS_ATOL = 0x4E // 78 SYS_PERROR = 0x4F // 79 SYS_ATOF = 0x50 // 80 SYS_ATOI = 0x51 // 81 SYS_RAND = 0x52 // 82 SYS_STRTOD = 0x53 // 83 SYS_STRTOL = 0x54 // 84 SYS_STRTOUL = 0x55 // 85 SYS_MALLOC = 0x56 // 86 SYS_SRAND = 0x57 // 87 SYS_CALLOC = 0x58 // 88 SYS_FREE = 0x59 // 89 SYS_EXIT = 0x5A // 90 SYS_REALLOC = 0x5B // 91 SYS_ABORT = 0x5C // 92 SYS___ABORT = 0x5C // 92 SYS_ATEXIT = 0x5D // 93 SYS_RAISE = 0x5E // 94 SYS_SETJMP = 0x5F // 95 SYS_LONGJMP = 0x60 // 96 SYS_SIGNAL = 0x61 // 97 SYS_TMPNAM = 0x62 // 98 SYS_REMOVE = 0x63 // 99 SYS_RENAME = 0x64 // 100 SYS_TMPFILE = 0x65 // 101 SYS_FREOPEN = 0x66 // 102 SYS_FCLOSE = 0x67 // 103 SYS_FFLUSH = 0x68 // 104 SYS_FOPEN = 0x69 // 105 SYS_FSCANF = 0x6A // 106 SYS_SETBUF = 0x6B // 107 SYS_SETVBUF = 0x6C // 108 SYS_FPRINTF = 0x6D // 109 SYS_SSCANF = 0x6E // 110 SYS_PRINTF = 0x6F // 111 SYS_SCANF = 0x70 // 112 SYS_SPRINTF = 0x71 // 113 SYS_FGETC = 0x72 // 114 SYS_VFPRINTF = 0x73 // 115 SYS_VPRINTF = 0x74 // 116 SYS_VSPRINTF = 0x75 // 117 SYS_GETC = 0x76 // 118 SYS_FGETS = 0x77 // 119 SYS_FPUTC = 0x78 // 120 SYS_FPUTS = 0x79 // 121 SYS_PUTCHAR = 0x7A // 122 SYS_GETCHAR = 0x7B // 123 SYS_GETS = 0x7C // 124 SYS_PUTC = 0x7D // 125 SYS_FWRITE = 0x7E // 126 SYS_PUTS = 0x7F // 127 SYS_UNGETC = 0x80 // 128 SYS_FREAD = 0x81 // 129 SYS_WCSTOMBS = 0x82 // 130 SYS_MBTOWC = 0x83 // 131 SYS_WCTOMB = 0x84 // 132 SYS_MBSTOWCS = 0x85 // 133 SYS_WCSCPY = 0x86 // 134 SYS_WCSCAT = 0x87 // 135 SYS_WCSCHR = 0x88 // 136 SYS_WCSCMP = 0x89 // 137 SYS_WCSNCMP = 0x8A // 138 SYS_WCSCSPN = 0x8B // 139 SYS_WCSLEN = 0x8C // 140 SYS_WCSNCAT = 0x8D // 141 SYS_WCSSPN = 0x8E // 142 SYS_WCSNCPY = 0x8F // 143 SYS_ABS = 0x90 // 144 SYS_DIV = 0x91 // 145 SYS_LABS = 0x92 // 146 SYS_STRNCPY = 0x93 // 147 SYS_MEMCPY = 0x94 // 148 SYS_MEMMOVE = 0x95 // 149 SYS_STRCPY = 0x96 // 150 SYS_STRCMP = 0x97 // 151 SYS_STRCAT = 0x98 // 152 SYS_STRNCAT = 0x99 // 153 SYS_MEMCMP = 0x9A // 154 SYS_MEMCHR = 0x9B // 155 SYS_STRCOLL = 0x9C // 156 SYS_STRNCMP = 0x9D // 157 SYS_STRXFRM = 0x9E // 158 SYS_STRRCHR = 0x9F // 159 SYS_STRCHR = 0xA0 // 160 SYS_STRCSPN = 0xA1 // 161 SYS_STRPBRK = 0xA2 // 162 SYS_MEMSET = 0xA3 // 163 SYS_STRSPN = 0xA4 // 164 SYS_STRSTR = 0xA5 // 165 SYS_STRTOK = 0xA6 // 166 SYS_DIFFTIME = 0xA7 // 167 SYS_STRERROR = 0xA8 // 168 SYS_STRLEN = 0xA9 // 169 SYS_CLOCK = 0xAA // 170 SYS_CTIME = 0xAB // 171 SYS_MKTIME = 0xAC // 172 SYS_TIME = 0xAD // 173 SYS_ASCTIME = 0xAE // 174 SYS_MBLEN = 0xAF // 175 SYS_GMTIME = 0xB0 // 176 SYS_LOCALTIM = 0xB1 // 177 SYS_LOCALTIME = 0xB1 // 177 SYS_STRFTIME = 0xB2 // 178 SYS___GETCB = 0xB4 // 180 SYS_FUPDATE = 0xB5 // 181 SYS___FUPDT = 0xB5 // 181 SYS_CLRMEMF = 0xBD // 189 SYS___CLRMF = 0xBD // 189 SYS_FETCHEP = 0xBF // 191 SYS___FTCHEP = 0xBF // 191 SYS_FLDATA = 0xC1 // 193 SYS___FLDATA = 0xC1 // 193 SYS_DYNFREE = 0xC2 // 194 SYS___DYNFRE = 0xC2 // 194 SYS_DYNALLOC = 0xC3 // 195 SYS___DYNALL = 0xC3 // 195 SYS___CDUMP = 0xC4 // 196 SYS_CSNAP = 0xC5 // 197 SYS___CSNAP = 0xC5 // 197 SYS_CTRACE = 0xC6 // 198 SYS___CTRACE = 0xC6 // 198 SYS___CTEST = 0xC7 // 199 SYS_SETENV = 0xC8 // 200 SYS___SETENV = 0xC8 // 200 SYS_CLEARENV = 0xC9 // 201 SYS___CLRENV = 0xC9 // 201 SYS___REGCOMP_STD = 0xEA // 234 SYS_NL_LANGINFO = 0xFC // 252 SYS_GETSYNTX = 0xFD // 253 SYS_ISBLANK = 0xFE // 254 SYS___ISBLNK = 0xFE // 254 SYS_ISWALNUM = 0xFF // 255 SYS_ISWALPHA = 0x100 // 256 SYS_ISWBLANK = 0x101 // 257 SYS___ISWBLK = 0x101 // 257 SYS_ISWCNTRL = 0x102 // 258 SYS_ISWDIGIT = 0x103 // 259 SYS_ISWGRAPH = 0x104 // 260 SYS_ISWLOWER = 0x105 // 261 SYS_ISWPRINT = 0x106 // 262 SYS_ISWPUNCT = 0x107 // 263 SYS_ISWSPACE = 0x108 // 264 SYS_ISWUPPER = 0x109 // 265 SYS_ISWXDIGI = 0x10A // 266 SYS_ISWXDIGIT = 0x10A // 266 SYS_WCTYPE = 0x10B // 267 SYS_ISWCTYPE = 0x10C // 268 SYS_TOWLOWER = 0x10D // 269 SYS_TOWUPPER = 0x10E // 270 SYS_MBSINIT = 0x10F // 271 SYS_WCTOB = 0x110 // 272 SYS_MBRLEN = 0x111 // 273 SYS_MBRTOWC = 0x112 // 274 SYS_MBSRTOWC = 0x113 // 275 SYS_MBSRTOWCS = 0x113 // 275 SYS_WCRTOMB = 0x114 // 276 SYS_WCSRTOMB = 0x115 // 277 SYS_WCSRTOMBS = 0x115 // 277 SYS___CSID = 0x116 // 278 SYS___WCSID = 0x117 // 279 SYS_STRPTIME = 0x118 // 280 SYS___STRPTM = 0x118 // 280 SYS_STRFMON = 0x119 // 281 SYS___RPMTCH = 0x11A // 282 SYS_WCSSTR = 0x11B // 283 SYS_WCSTOK = 0x12C // 300 SYS_WCSTOL = 0x12D // 301 SYS_WCSTOD = 0x12E // 302 SYS_WCSTOUL = 0x12F // 303 SYS_WCSCOLL = 0x130 // 304 SYS_WCSXFRM = 0x131 // 305 SYS_WCSWIDTH = 0x132 // 306 SYS_WCWIDTH = 0x133 // 307 SYS_WCSFTIME = 0x134 // 308 SYS_SWPRINTF = 0x135 // 309 SYS_VSWPRINT = 0x136 // 310 SYS_VSWPRINTF = 0x136 // 310 SYS_SWSCANF = 0x137 // 311 SYS_REGCOMP = 0x138 // 312 SYS_REGEXEC = 0x139 // 313 SYS_REGFREE = 0x13A // 314 SYS_REGERROR = 0x13B // 315 SYS_FGETWC = 0x13C // 316 SYS_FGETWS = 0x13D // 317 SYS_FPUTWC = 0x13E // 318 SYS_FPUTWS = 0x13F // 319 SYS_GETWC = 0x140 // 320 SYS_GETWCHAR = 0x141 // 321 SYS_PUTWC = 0x142 // 322 SYS_PUTWCHAR = 0x143 // 323 SYS_UNGETWC = 0x144 // 324 SYS_ICONV_OPEN = 0x145 // 325 SYS_ICONV = 0x146 // 326 SYS_ICONV_CLOSE = 0x147 // 327 SYS_ISMCCOLLEL = 0x14C // 332 SYS_STRTOCOLL = 0x14D // 333 SYS_COLLTOSTR = 0x14E // 334 SYS_COLLEQUIV = 0x14F // 335 SYS_COLLRANGE = 0x150 // 336 SYS_CCLASS = 0x151 // 337 SYS_COLLORDER = 0x152 // 338 SYS___DEMANGLE = 0x154 // 340 SYS_FDOPEN = 0x155 // 341 SYS___ERRNO = 0x156 // 342 SYS___ERRNO2 = 0x157 // 343 SYS___TERROR = 0x158 // 344 SYS_MAXCOLL = 0x169 // 361 SYS_GETMCCOLL = 0x16A // 362 SYS_GETWMCCOLL = 0x16B // 363 SYS___ERR2AD = 0x16C // 364 SYS_DLLQUERYFN = 0x16D // 365 SYS_DLLQUERYVAR = 0x16E // 366 SYS_DLLFREE = 0x16F // 367 SYS_DLLLOAD = 0x170 // 368 SYS__EXIT = 0x174 // 372 SYS_ACCESS = 0x175 // 373 SYS_ALARM = 0x176 // 374 SYS_CFGETISPEED = 0x177 // 375 SYS_CFGETOSPEED = 0x178 // 376 SYS_CFSETISPEED = 0x179 // 377 SYS_CFSETOSPEED = 0x17A // 378 SYS_CHDIR = 0x17B // 379 SYS_CHMOD = 0x17C // 380 SYS_CHOWN = 0x17D // 381 SYS_CLOSE = 0x17E // 382 SYS_CLOSEDIR = 0x17F // 383 SYS_CREAT = 0x180 // 384 SYS_CTERMID = 0x181 // 385 SYS_DUP = 0x182 // 386 SYS_DUP2 = 0x183 // 387 SYS_EXECL = 0x184 // 388 SYS_EXECLE = 0x185 // 389 SYS_EXECLP = 0x186 // 390 SYS_EXECV = 0x187 // 391 SYS_EXECVE = 0x188 // 392 SYS_EXECVP = 0x189 // 393 SYS_FCHMOD = 0x18A // 394 SYS_FCHOWN = 0x18B // 395 SYS_FCNTL = 0x18C // 396 SYS_FILENO = 0x18D // 397 SYS_FORK = 0x18E // 398 SYS_FPATHCONF = 0x18F // 399 SYS_FSTAT = 0x190 // 400 SYS_FSYNC = 0x191 // 401 SYS_FTRUNCATE = 0x192 // 402 SYS_GETCWD = 0x193 // 403 SYS_GETEGID = 0x194 // 404 SYS_GETEUID = 0x195 // 405 SYS_GETGID = 0x196 // 406 SYS_GETGRGID = 0x197 // 407 SYS_GETGRNAM = 0x198 // 408 SYS_GETGROUPS = 0x199 // 409 SYS_GETLOGIN = 0x19A // 410 SYS_W_GETMNTENT = 0x19B // 411 SYS_GETPGRP = 0x19C // 412 SYS_GETPID = 0x19D // 413 SYS_GETPPID = 0x19E // 414 SYS_GETPWNAM = 0x19F // 415 SYS_GETPWUID = 0x1A0 // 416 SYS_GETUID = 0x1A1 // 417 SYS_W_IOCTL = 0x1A2 // 418 SYS_ISATTY = 0x1A3 // 419 SYS_KILL = 0x1A4 // 420 SYS_LINK = 0x1A5 // 421 SYS_LSEEK = 0x1A6 // 422 SYS_LSTAT = 0x1A7 // 423 SYS_MKDIR = 0x1A8 // 424 SYS_MKFIFO = 0x1A9 // 425 SYS_MKNOD = 0x1AA // 426 SYS_MOUNT = 0x1AB // 427 SYS_OPEN = 0x1AC // 428 SYS_OPENDIR = 0x1AD // 429 SYS_PATHCONF = 0x1AE // 430 SYS_PAUSE = 0x1AF // 431 SYS_PIPE = 0x1B0 // 432 SYS_W_GETPSENT = 0x1B1 // 433 SYS_READ = 0x1B2 // 434 SYS_READDIR = 0x1B3 // 435 SYS_READLINK = 0x1B4 // 436 SYS_REWINDDIR = 0x1B5 // 437 SYS_RMDIR = 0x1B6 // 438 SYS_SETEGID = 0x1B7 // 439 SYS_SETEUID = 0x1B8 // 440 SYS_SETGID = 0x1B9 // 441 SYS_SETPGID = 0x1BA // 442 SYS_SETSID = 0x1BB // 443 SYS_SETUID = 0x1BC // 444 SYS_SIGACTION = 0x1BD // 445 SYS_SIGADDSET = 0x1BE // 446 SYS_SIGDELSET = 0x1BF // 447 SYS_SIGEMPTYSET = 0x1C0 // 448 SYS_SIGFILLSET = 0x1C1 // 449 SYS_SIGISMEMBER = 0x1C2 // 450 SYS_SIGLONGJMP = 0x1C3 // 451 SYS_SIGPENDING = 0x1C4 // 452 SYS_SIGPROCMASK = 0x1C5 // 453 SYS_SIGSETJMP = 0x1C6 // 454 SYS_SIGSUSPEND = 0x1C7 // 455 SYS_SLEEP = 0x1C8 // 456 SYS_STAT = 0x1C9 // 457 SYS_W_STATFS = 0x1CA // 458 SYS_SYMLINK = 0x1CB // 459 SYS_SYSCONF = 0x1CC // 460 SYS_TCDRAIN = 0x1CD // 461 SYS_TCFLOW = 0x1CE // 462 SYS_TCFLUSH = 0x1CF // 463 SYS_TCGETATTR = 0x1D0 // 464 SYS_TCGETPGRP = 0x1D1 // 465 SYS_TCSENDBREAK = 0x1D2 // 466 SYS_TCSETATTR = 0x1D3 // 467 SYS_TCSETPGRP = 0x1D4 // 468 SYS_TIMES = 0x1D5 // 469 SYS_TTYNAME = 0x1D6 // 470 SYS_TZSET = 0x1D7 // 471 SYS_UMASK = 0x1D8 // 472 SYS_UMOUNT = 0x1D9 // 473 SYS_UNAME = 0x1DA // 474 SYS_UNLINK = 0x1DB // 475 SYS_UTIME = 0x1DC // 476 SYS_WAIT = 0x1DD // 477 SYS_WAITPID = 0x1DE // 478 SYS_WRITE = 0x1DF // 479 SYS_CHAUDIT = 0x1E0 // 480 SYS_FCHAUDIT = 0x1E1 // 481 SYS_GETGROUPSBYNAME = 0x1E2 // 482 SYS_SIGWAIT = 0x1E3 // 483 SYS_PTHREAD_EXIT = 0x1E4 // 484 SYS_PTHREAD_KILL = 0x1E5 // 485 SYS_PTHREAD_ATTR_INIT = 0x1E6 // 486 SYS_PTHREAD_ATTR_DESTROY = 0x1E7 // 487 SYS_PTHREAD_ATTR_SETSTACKSIZE = 0x1E8 // 488 SYS_PTHREAD_ATTR_GETSTACKSIZE = 0x1E9 // 489 SYS_PTHREAD_ATTR_SETDETACHSTATE = 0x1EA // 490 SYS_PTHREAD_ATTR_GETDETACHSTATE = 0x1EB // 491 SYS_PTHREAD_ATTR_SETWEIGHT_NP = 0x1EC // 492 SYS_PTHREAD_ATTR_GETWEIGHT_NP = 0x1ED // 493 SYS_PTHREAD_CANCEL = 0x1EE // 494 SYS_PTHREAD_CLEANUP_PUSH = 0x1EF // 495 SYS_PTHREAD_CLEANUP_POP = 0x1F0 // 496 SYS_PTHREAD_CONDATTR_INIT = 0x1F1 // 497 SYS_PTHREAD_CONDATTR_DESTROY = 0x1F2 // 498 SYS_PTHREAD_COND_INIT = 0x1F3 // 499 SYS_PTHREAD_COND_DESTROY = 0x1F4 // 500 SYS_PTHREAD_COND_SIGNAL = 0x1F5 // 501 SYS_PTHREAD_COND_BROADCAST = 0x1F6 // 502 SYS_PTHREAD_COND_WAIT = 0x1F7 // 503 SYS_PTHREAD_COND_TIMEDWAIT = 0x1F8 // 504 SYS_PTHREAD_CREATE = 0x1F9 // 505 SYS_PTHREAD_DETACH = 0x1FA // 506 SYS_PTHREAD_EQUAL = 0x1FB // 507 SYS_PTHREAD_GETSPECIFIC = 0x1FC // 508 SYS_PTHREAD_JOIN = 0x1FD // 509 SYS_PTHREAD_KEY_CREATE = 0x1FE // 510 SYS_PTHREAD_MUTEXATTR_INIT = 0x1FF // 511 SYS_PTHREAD_MUTEXATTR_DESTROY = 0x200 // 512 SYS_PTHREAD_MUTEXATTR_SETKIND_NP = 0x201 // 513 SYS_PTHREAD_MUTEXATTR_GETKIND_NP = 0x202 // 514 SYS_PTHREAD_MUTEX_INIT = 0x203 // 515 SYS_PTHREAD_MUTEX_DESTROY = 0x204 // 516 SYS_PTHREAD_MUTEX_LOCK = 0x205 // 517 SYS_PTHREAD_MUTEX_TRYLOCK = 0x206 // 518 SYS_PTHREAD_MUTEX_UNLOCK = 0x207 // 519 SYS_PTHREAD_ONCE = 0x209 // 521 SYS_PTHREAD_SELF = 0x20A // 522 SYS_PTHREAD_SETINTR = 0x20B // 523 SYS_PTHREAD_SETINTRTYPE = 0x20C // 524 SYS_PTHREAD_SETSPECIFIC = 0x20D // 525 SYS_PTHREAD_TESTINTR = 0x20E // 526 SYS_PTHREAD_YIELD = 0x20F // 527 SYS_TW_OPEN = 0x210 // 528 SYS_TW_FCNTL = 0x211 // 529 SYS_PTHREAD_JOIN_D4_NP = 0x212 // 530 SYS_PTHREAD_CONDATTR_SETKIND_NP = 0x213 // 531 SYS_PTHREAD_CONDATTR_GETKIND_NP = 0x214 // 532 SYS_EXTLINK_NP = 0x215 // 533 SYS___PASSWD = 0x216 // 534 SYS_SETGROUPS = 0x217 // 535 SYS_INITGROUPS = 0x218 // 536 SYS_WCSPBRK = 0x23F // 575 SYS_WCSRCHR = 0x240 // 576 SYS_SVC99 = 0x241 // 577 SYS___SVC99 = 0x241 // 577 SYS_WCSWCS = 0x242 // 578 SYS_LOCALECO = 0x243 // 579 SYS_LOCALECONV = 0x243 // 579 SYS___LIBREL = 0x244 // 580 SYS_RELEASE = 0x245 // 581 SYS___RLSE = 0x245 // 581 SYS_FLOCATE = 0x246 // 582 SYS___FLOCT = 0x246 // 582 SYS_FDELREC = 0x247 // 583 SYS___FDLREC = 0x247 // 583 SYS_FETCH = 0x248 // 584 SYS___FETCH = 0x248 // 584 SYS_QSORT = 0x249 // 585 SYS_GETENV = 0x24A // 586 SYS_SYSTEM = 0x24B // 587 SYS_BSEARCH = 0x24C // 588 SYS_LDIV = 0x24D // 589 SYS___THROW = 0x25E // 606 SYS___RETHROW = 0x25F // 607 SYS___CLEANUPCATCH = 0x260 // 608 SYS___CATCHMATCH = 0x261 // 609 SYS___CLEAN2UPCATCH = 0x262 // 610 SYS_PUTENV = 0x26A // 618 SYS___GETENV = 0x26F // 623 SYS_GETPRIORITY = 0x270 // 624 SYS_NICE = 0x271 // 625 SYS_SETPRIORITY = 0x272 // 626 SYS_GETITIMER = 0x273 // 627 SYS_SETITIMER = 0x274 // 628 SYS_MSGCTL = 0x275 // 629 SYS_MSGGET = 0x276 // 630 SYS_MSGRCV = 0x277 // 631 SYS_MSGSND = 0x278 // 632 SYS_MSGXRCV = 0x279 // 633 SYS___MSGXR = 0x279 // 633 SYS_SEMCTL = 0x27A // 634 SYS_SEMGET = 0x27B // 635 SYS_SEMOP = 0x27C // 636 SYS_SHMAT = 0x27D // 637 SYS_SHMCTL = 0x27E // 638 SYS_SHMDT = 0x27F // 639 SYS_SHMGET = 0x280 // 640 SYS___GETIPC = 0x281 // 641 SYS_SETGRENT = 0x282 // 642 SYS_GETGRENT = 0x283 // 643 SYS_ENDGRENT = 0x284 // 644 SYS_SETPWENT = 0x285 // 645 SYS_GETPWENT = 0x286 // 646 SYS_ENDPWENT = 0x287 // 647 SYS_BSD_SIGNAL = 0x288 // 648 SYS_KILLPG = 0x289 // 649 SYS_SIGALTSTACK = 0x28A // 650 SYS_SIGHOLD = 0x28B // 651 SYS_SIGIGNORE = 0x28C // 652 SYS_SIGINTERRUPT = 0x28D // 653 SYS_SIGPAUSE = 0x28E // 654 SYS_SIGRELSE = 0x28F // 655 SYS_SIGSET = 0x290 // 656 SYS_SIGSTACK = 0x291 // 657 SYS_GETRLIMIT = 0x292 // 658 SYS_SETRLIMIT = 0x293 // 659 SYS_GETRUSAGE = 0x294 // 660 SYS_MMAP = 0x295 // 661 SYS_MPROTECT = 0x296 // 662 SYS_MSYNC = 0x297 // 663 SYS_MUNMAP = 0x298 // 664 SYS_CONFSTR = 0x299 // 665 SYS_GETOPT = 0x29A // 666 SYS_LCHOWN = 0x29B // 667 SYS_TRUNCATE = 0x29C // 668 SYS_GETSUBOPT = 0x29D // 669 SYS_SETPGRP = 0x29E // 670 SYS___GDERR = 0x29F // 671 SYS___TZONE = 0x2A0 // 672 SYS___DLGHT = 0x2A1 // 673 SYS___OPARGF = 0x2A2 // 674 SYS___OPOPTF = 0x2A3 // 675 SYS___OPINDF = 0x2A4 // 676 SYS___OPERRF = 0x2A5 // 677 SYS_GETDATE = 0x2A6 // 678 SYS_WAIT3 = 0x2A7 // 679 SYS_WAITID = 0x2A8 // 680 SYS___CATTRM = 0x2A9 // 681 SYS___GDTRM = 0x2AA // 682 SYS___RNDTRM = 0x2AB // 683 SYS_CRYPT = 0x2AC // 684 SYS_ENCRYPT = 0x2AD // 685 SYS_SETKEY = 0x2AE // 686 SYS___CNVBLK = 0x2AF // 687 SYS___CRYTRM = 0x2B0 // 688 SYS___ECRTRM = 0x2B1 // 689 SYS_DRAND48 = 0x2B2 // 690 SYS_ERAND48 = 0x2B3 // 691 SYS_FSTATVFS = 0x2B4 // 692 SYS_STATVFS = 0x2B5 // 693 SYS_CATCLOSE = 0x2B6 // 694 SYS_CATGETS = 0x2B7 // 695 SYS_CATOPEN = 0x2B8 // 696 SYS_BCMP = 0x2B9 // 697 SYS_BCOPY = 0x2BA // 698 SYS_BZERO = 0x2BB // 699 SYS_FFS = 0x2BC // 700 SYS_INDEX = 0x2BD // 701 SYS_RINDEX = 0x2BE // 702 SYS_STRCASECMP = 0x2BF // 703 SYS_STRDUP = 0x2C0 // 704 SYS_STRNCASECMP = 0x2C1 // 705 SYS_INITSTATE = 0x2C2 // 706 SYS_SETSTATE = 0x2C3 // 707 SYS_RANDOM = 0x2C4 // 708 SYS_SRANDOM = 0x2C5 // 709 SYS_HCREATE = 0x2C6 // 710 SYS_HDESTROY = 0x2C7 // 711 SYS_HSEARCH = 0x2C8 // 712 SYS_LFIND = 0x2C9 // 713 SYS_LSEARCH = 0x2CA // 714 SYS_TDELETE = 0x2CB // 715 SYS_TFIND = 0x2CC // 716 SYS_TSEARCH = 0x2CD // 717 SYS_TWALK = 0x2CE // 718 SYS_INSQUE = 0x2CF // 719 SYS_REMQUE = 0x2D0 // 720 SYS_POPEN = 0x2D1 // 721 SYS_PCLOSE = 0x2D2 // 722 SYS_SWAB = 0x2D3 // 723 SYS_MEMCCPY = 0x2D4 // 724 SYS_GETPAGESIZE = 0x2D8 // 728 SYS_FCHDIR = 0x2D9 // 729 SYS___OCLCK = 0x2DA // 730 SYS___ATOE = 0x2DB // 731 SYS___ATOE_L = 0x2DC // 732 SYS___ETOA = 0x2DD // 733 SYS___ETOA_L = 0x2DE // 734 SYS_SETUTXENT = 0x2DF // 735 SYS_GETUTXENT = 0x2E0 // 736 SYS_ENDUTXENT = 0x2E1 // 737 SYS_GETUTXID = 0x2E2 // 738 SYS_GETUTXLINE = 0x2E3 // 739 SYS_PUTUTXLINE = 0x2E4 // 740 SYS_FMTMSG = 0x2E5 // 741 SYS_JRAND48 = 0x2E6 // 742 SYS_LRAND48 = 0x2E7 // 743 SYS_MRAND48 = 0x2E8 // 744 SYS_NRAND48 = 0x2E9 // 745 SYS_LCONG48 = 0x2EA // 746 SYS_SRAND48 = 0x2EB // 747 SYS_SEED48 = 0x2EC // 748 SYS_ISASCII = 0x2ED // 749 SYS_TOASCII = 0x2EE // 750 SYS_A64L = 0x2EF // 751 SYS_L64A = 0x2F0 // 752 SYS_UALARM = 0x2F1 // 753 SYS_USLEEP = 0x2F2 // 754 SYS___UTXTRM = 0x2F3 // 755 SYS___SRCTRM = 0x2F4 // 756 SYS_FTIME = 0x2F5 // 757 SYS_GETTIMEOFDAY = 0x2F6 // 758 SYS_DBM_CLEARERR = 0x2F7 // 759 SYS_DBM_CLOSE = 0x2F8 // 760 SYS_DBM_DELETE = 0x2F9 // 761 SYS_DBM_ERROR = 0x2FA // 762 SYS_DBM_FETCH = 0x2FB // 763 SYS_DBM_FIRSTKEY = 0x2FC // 764 SYS_DBM_NEXTKEY = 0x2FD // 765 SYS_DBM_OPEN = 0x2FE // 766 SYS_DBM_STORE = 0x2FF // 767 SYS___NDMTRM = 0x300 // 768 SYS_FTOK = 0x301 // 769 SYS_BASENAME = 0x302 // 770 SYS_DIRNAME = 0x303 // 771 SYS_GETDTABLESIZE = 0x304 // 772 SYS_MKSTEMP = 0x305 // 773 SYS_MKTEMP = 0x306 // 774 SYS_NFTW = 0x307 // 775 SYS_GETWD = 0x308 // 776 SYS_LOCKF = 0x309 // 777 SYS__LONGJMP = 0x30D // 781 SYS__SETJMP = 0x30E // 782 SYS_VFORK = 0x30F // 783 SYS_WORDEXP = 0x310 // 784 SYS_WORDFREE = 0x311 // 785 SYS_GETPGID = 0x312 // 786 SYS_GETSID = 0x313 // 787 SYS___UTMPXNAME = 0x314 // 788 SYS_CUSERID = 0x315 // 789 SYS_GETPASS = 0x316 // 790 SYS_FNMATCH = 0x317 // 791 SYS_FTW = 0x318 // 792 SYS_GETW = 0x319 // 793 SYS_GLOB = 0x31A // 794 SYS_GLOBFREE = 0x31B // 795 SYS_PUTW = 0x31C // 796 SYS_SEEKDIR = 0x31D // 797 SYS_TELLDIR = 0x31E // 798 SYS_TEMPNAM = 0x31F // 799 SYS_ACOSH = 0x320 // 800 SYS_ASINH = 0x321 // 801 SYS_ATANH = 0x322 // 802 SYS_CBRT = 0x323 // 803 SYS_EXPM1 = 0x324 // 804 SYS_ILOGB = 0x325 // 805 SYS_LOGB = 0x326 // 806 SYS_LOG1P = 0x327 // 807 SYS_NEXTAFTER = 0x328 // 808 SYS_RINT = 0x329 // 809 SYS_REMAINDER = 0x32A // 810 SYS_SCALB = 0x32B // 811 SYS_LGAMMA = 0x32C // 812 SYS_TTYSLOT = 0x32D // 813 SYS_GETTIMEOFDAY_R = 0x32E // 814 SYS_SYNC = 0x32F // 815 SYS_SPAWN = 0x330 // 816 SYS_SPAWNP = 0x331 // 817 SYS_GETLOGIN_UU = 0x332 // 818 SYS_ECVT = 0x333 // 819 SYS_FCVT = 0x334 // 820 SYS_GCVT = 0x335 // 821 SYS_ACCEPT = 0x336 // 822 SYS_BIND = 0x337 // 823 SYS_CONNECT = 0x338 // 824 SYS_ENDHOSTENT = 0x339 // 825 SYS_ENDPROTOENT = 0x33A // 826 SYS_ENDSERVENT = 0x33B // 827 SYS_GETHOSTBYADDR_R = 0x33C // 828 SYS_GETHOSTBYADDR = 0x33D // 829 SYS_GETHOSTBYNAME_R = 0x33E // 830 SYS_GETHOSTBYNAME = 0x33F // 831 SYS_GETHOSTENT = 0x340 // 832 SYS_GETHOSTID = 0x341 // 833 SYS_GETHOSTNAME = 0x342 // 834 SYS_GETNETBYADDR = 0x343 // 835 SYS_GETNETBYNAME = 0x344 // 836 SYS_GETNETENT = 0x345 // 837 SYS_GETPEERNAME = 0x346 // 838 SYS_GETPROTOBYNAME = 0x347 // 839 SYS_GETPROTOBYNUMBER = 0x348 // 840 SYS_GETPROTOENT = 0x349 // 841 SYS_GETSERVBYNAME = 0x34A // 842 SYS_GETSERVBYPORT = 0x34B // 843 SYS_GETSERVENT = 0x34C // 844 SYS_GETSOCKNAME = 0x34D // 845 SYS_GETSOCKOPT = 0x34E // 846 SYS_INET_ADDR = 0x34F // 847 SYS_INET_LNAOF = 0x350 // 848 SYS_INET_MAKEADDR = 0x351 // 849 SYS_INET_NETOF = 0x352 // 850 SYS_INET_NETWORK = 0x353 // 851 SYS_INET_NTOA = 0x354 // 852 SYS_IOCTL = 0x355 // 853 SYS_LISTEN = 0x356 // 854 SYS_READV = 0x357 // 855 SYS_RECV = 0x358 // 856 SYS_RECVFROM = 0x359 // 857 SYS_SELECT = 0x35B // 859 SYS_SELECTEX = 0x35C // 860 SYS_SEND = 0x35D // 861 SYS_SENDTO = 0x35F // 863 SYS_SETHOSTENT = 0x360 // 864 SYS_SETNETENT = 0x361 // 865 SYS_SETPEER = 0x362 // 866 SYS_SETPROTOENT = 0x363 // 867 SYS_SETSERVENT = 0x364 // 868 SYS_SETSOCKOPT = 0x365 // 869 SYS_SHUTDOWN = 0x366 // 870 SYS_SOCKET = 0x367 // 871 SYS_SOCKETPAIR = 0x368 // 872 SYS_WRITEV = 0x369 // 873 SYS_CHROOT = 0x36A // 874 SYS_W_STATVFS = 0x36B // 875 SYS_ULIMIT = 0x36C // 876 SYS_ISNAN = 0x36D // 877 SYS_UTIMES = 0x36E // 878 SYS___H_ERRNO = 0x36F // 879 SYS_ENDNETENT = 0x370 // 880 SYS_CLOSELOG = 0x371 // 881 SYS_OPENLOG = 0x372 // 882 SYS_SETLOGMASK = 0x373 // 883 SYS_SYSLOG = 0x374 // 884 SYS_PTSNAME = 0x375 // 885 SYS_SETREUID = 0x376 // 886 SYS_SETREGID = 0x377 // 887 SYS_REALPATH = 0x378 // 888 SYS___SIGNGAM = 0x379 // 889 SYS_GRANTPT = 0x37A // 890 SYS_UNLOCKPT = 0x37B // 891 SYS_TCGETSID = 0x37C // 892 SYS___TCGETCP = 0x37D // 893 SYS___TCSETCP = 0x37E // 894 SYS___TCSETTABLES = 0x37F // 895 SYS_POLL = 0x380 // 896 SYS_REXEC = 0x381 // 897 SYS___ISASCII2 = 0x382 // 898 SYS___TOASCII2 = 0x383 // 899 SYS_CHPRIORITY = 0x384 // 900 SYS_PTHREAD_ATTR_SETSYNCTYPE_NP = 0x385 // 901 SYS_PTHREAD_ATTR_GETSYNCTYPE_NP = 0x386 // 902 SYS_PTHREAD_SET_LIMIT_NP = 0x387 // 903 SYS___STNETENT = 0x388 // 904 SYS___STPROTOENT = 0x389 // 905 SYS___STSERVENT = 0x38A // 906 SYS___STHOSTENT = 0x38B // 907 SYS_NLIST = 0x38C // 908 SYS___IPDBCS = 0x38D // 909 SYS___IPDSPX = 0x38E // 910 SYS___IPMSGC = 0x38F // 911 SYS___SELECT1 = 0x390 // 912 SYS_PTHREAD_SECURITY_NP = 0x391 // 913 SYS___CHECK_RESOURCE_AUTH_NP = 0x392 // 914 SYS___CONVERT_ID_NP = 0x393 // 915 SYS___OPENVMREL = 0x394 // 916 SYS_WMEMCHR = 0x395 // 917 SYS_WMEMCMP = 0x396 // 918 SYS_WMEMCPY = 0x397 // 919 SYS_WMEMMOVE = 0x398 // 920 SYS_WMEMSET = 0x399 // 921 SYS___FPUTWC = 0x400 // 1024 SYS___PUTWC = 0x401 // 1025 SYS___PWCHAR = 0x402 // 1026 SYS___WCSFTM = 0x403 // 1027 SYS___WCSTOK = 0x404 // 1028 SYS___WCWDTH = 0x405 // 1029 SYS_T_ACCEPT = 0x409 // 1033 SYS_T_ALLOC = 0x40A // 1034 SYS_T_BIND = 0x40B // 1035 SYS_T_CLOSE = 0x40C // 1036 SYS_T_CONNECT = 0x40D // 1037 SYS_T_ERROR = 0x40E // 1038 SYS_T_FREE = 0x40F // 1039 SYS_T_GETINFO = 0x410 // 1040 SYS_T_GETPROTADDR = 0x411 // 1041 SYS_T_GETSTATE = 0x412 // 1042 SYS_T_LISTEN = 0x413 // 1043 SYS_T_LOOK = 0x414 // 1044 SYS_T_OPEN = 0x415 // 1045 SYS_T_OPTMGMT = 0x416 // 1046 SYS_T_RCV = 0x417 // 1047 SYS_T_RCVCONNECT = 0x418 // 1048 SYS_T_RCVDIS = 0x419 // 1049 SYS_T_RCVREL = 0x41A // 1050 SYS_T_RCVUDATA = 0x41B // 1051 SYS_T_RCVUDERR = 0x41C // 1052 SYS_T_SND = 0x41D // 1053 SYS_T_SNDDIS = 0x41E // 1054 SYS_T_SNDREL = 0x41F // 1055 SYS_T_SNDUDATA = 0x420 // 1056 SYS_T_STRERROR = 0x421 // 1057 SYS_T_SYNC = 0x422 // 1058 SYS_T_UNBIND = 0x423 // 1059 SYS___T_ERRNO = 0x424 // 1060 SYS___RECVMSG2 = 0x425 // 1061 SYS___SENDMSG2 = 0x426 // 1062 SYS_FATTACH = 0x427 // 1063 SYS_FDETACH = 0x428 // 1064 SYS_GETMSG = 0x429 // 1065 SYS_GETPMSG = 0x42A // 1066 SYS_ISASTREAM = 0x42B // 1067 SYS_PUTMSG = 0x42C // 1068 SYS_PUTPMSG = 0x42D // 1069 SYS___ISPOSIXON = 0x42E // 1070 SYS___OPENMVSREL = 0x42F // 1071 SYS_GETCONTEXT = 0x430 // 1072 SYS_SETCONTEXT = 0x431 // 1073 SYS_MAKECONTEXT = 0x432 // 1074 SYS_SWAPCONTEXT = 0x433 // 1075 SYS_PTHREAD_GETSPECIFIC_D8_NP = 0x434 // 1076 SYS_GETCLIENTID = 0x470 // 1136 SYS___GETCLIENTID = 0x471 // 1137 SYS_GETSTABLESIZE = 0x472 // 1138 SYS_GETIBMOPT = 0x473 // 1139 SYS_GETIBMSOCKOPT = 0x474 // 1140 SYS_GIVESOCKET = 0x475 // 1141 SYS_IBMSFLUSH = 0x476 // 1142 SYS_MAXDESC = 0x477 // 1143 SYS_SETIBMOPT = 0x478 // 1144 SYS_SETIBMSOCKOPT = 0x479 // 1145 SYS_SOCK_DEBUG = 0x47A // 1146 SYS_SOCK_DO_TESTSTOR = 0x47D // 1149 SYS_TAKESOCKET = 0x47E // 1150 SYS___SERVER_INIT = 0x47F // 1151 SYS___SERVER_PWU = 0x480 // 1152 SYS_PTHREAD_TAG_NP = 0x481 // 1153 SYS___CONSOLE = 0x482 // 1154 SYS___WSINIT = 0x483 // 1155 SYS___IPTCPN = 0x489 // 1161 SYS___SMF_RECORD = 0x48A // 1162 SYS___IPHOST = 0x48B // 1163 SYS___IPNODE = 0x48C // 1164 SYS___SERVER_CLASSIFY_CREATE = 0x48D // 1165 SYS___SERVER_CLASSIFY_DESTROY = 0x48E // 1166 SYS___SERVER_CLASSIFY_RESET = 0x48F // 1167 SYS___SERVER_CLASSIFY = 0x490 // 1168 SYS___HEAPRPT = 0x496 // 1174 SYS___FNWSA = 0x49B // 1179 SYS___SPAWN2 = 0x49D // 1181 SYS___SPAWNP2 = 0x49E // 1182 SYS___GDRR = 0x4A1 // 1185 SYS___HRRNO = 0x4A2 // 1186 SYS___OPRG = 0x4A3 // 1187 SYS___OPRR = 0x4A4 // 1188 SYS___OPND = 0x4A5 // 1189 SYS___OPPT = 0x4A6 // 1190 SYS___SIGGM = 0x4A7 // 1191 SYS___DGHT = 0x4A8 // 1192 SYS___TZNE = 0x4A9 // 1193 SYS___TZZN = 0x4AA // 1194 SYS___TRRNO = 0x4AF // 1199 SYS___ENVN = 0x4B0 // 1200 SYS___MLOCKALL = 0x4B1 // 1201 SYS_CREATEWO = 0x4B2 // 1202 SYS_CREATEWORKUNIT = 0x4B2 // 1202 SYS_CONTINUE = 0x4B3 // 1203 SYS_CONTINUEWORKUNIT = 0x4B3 // 1203 SYS_CONNECTW = 0x4B4 // 1204 SYS_CONNECTWORKMGR = 0x4B4 // 1204 SYS_CONNECTS = 0x4B5 // 1205 SYS_CONNECTSERVER = 0x4B5 // 1205 SYS_DISCONNE = 0x4B6 // 1206 SYS_DISCONNECTSERVER = 0x4B6 // 1206 SYS_JOINWORK = 0x4B7 // 1207 SYS_JOINWORKUNIT = 0x4B7 // 1207 SYS_LEAVEWOR = 0x4B8 // 1208 SYS_LEAVEWORKUNIT = 0x4B8 // 1208 SYS_DELETEWO = 0x4B9 // 1209 SYS_DELETEWORKUNIT = 0x4B9 // 1209 SYS_QUERYMET = 0x4BA // 1210 SYS_QUERYMETRICS = 0x4BA // 1210 SYS_QUERYSCH = 0x4BB // 1211 SYS_QUERYSCHENV = 0x4BB // 1211 SYS_CHECKSCH = 0x4BC // 1212 SYS_CHECKSCHENV = 0x4BC // 1212 SYS___PID_AFFINITY = 0x4BD // 1213 SYS___ASINH_B = 0x4BE // 1214 SYS___ATAN_B = 0x4BF // 1215 SYS___CBRT_B = 0x4C0 // 1216 SYS___CEIL_B = 0x4C1 // 1217 SYS_COPYSIGN = 0x4C2 // 1218 SYS___COS_B = 0x4C3 // 1219 SYS___ERF_B = 0x4C4 // 1220 SYS___ERFC_B = 0x4C5 // 1221 SYS___EXPM1_B = 0x4C6 // 1222 SYS___FABS_B = 0x4C7 // 1223 SYS_FINITE = 0x4C8 // 1224 SYS___FLOOR_B = 0x4C9 // 1225 SYS___FREXP_B = 0x4CA // 1226 SYS___ILOGB_B = 0x4CB // 1227 SYS___ISNAN_B = 0x4CC // 1228 SYS___LDEXP_B = 0x4CD // 1229 SYS___LOG1P_B = 0x4CE // 1230 SYS___LOGB_B = 0x4CF // 1231 SYS_MATHERR = 0x4D0 // 1232 SYS___MODF_B = 0x4D1 // 1233 SYS___NEXTAFTER_B = 0x4D2 // 1234 SYS___RINT_B = 0x4D3 // 1235 SYS_SCALBN = 0x4D4 // 1236 SYS_SIGNIFIC = 0x4D5 // 1237 SYS_SIGNIFICAND = 0x4D5 // 1237 SYS___SIN_B = 0x4D6 // 1238 SYS___TAN_B = 0x4D7 // 1239 SYS___TANH_B = 0x4D8 // 1240 SYS___ACOS_B = 0x4D9 // 1241 SYS___ACOSH_B = 0x4DA // 1242 SYS___ASIN_B = 0x4DB // 1243 SYS___ATAN2_B = 0x4DC // 1244 SYS___ATANH_B = 0x4DD // 1245 SYS___COSH_B = 0x4DE // 1246 SYS___EXP_B = 0x4DF // 1247 SYS___FMOD_B = 0x4E0 // 1248 SYS___GAMMA_B = 0x4E1 // 1249 SYS_GAMMA_R = 0x4E2 // 1250 SYS___HYPOT_B = 0x4E3 // 1251 SYS___J0_B = 0x4E4 // 1252 SYS___Y0_B = 0x4E5 // 1253 SYS___J1_B = 0x4E6 // 1254 SYS___Y1_B = 0x4E7 // 1255 SYS___JN_B = 0x4E8 // 1256 SYS___YN_B = 0x4E9 // 1257 SYS___LGAMMA_B = 0x4EA // 1258 SYS_LGAMMA_R = 0x4EB // 1259 SYS___LOG_B = 0x4EC // 1260 SYS___LOG10_B = 0x4ED // 1261 SYS___POW_B = 0x4EE // 1262 SYS___REMAINDER_B = 0x4EF // 1263 SYS___SCALB_B = 0x4F0 // 1264 SYS___SINH_B = 0x4F1 // 1265 SYS___SQRT_B = 0x4F2 // 1266 SYS___OPENDIR2 = 0x4F3 // 1267 SYS___READDIR2 = 0x4F4 // 1268 SYS___LOGIN = 0x4F5 // 1269 SYS___OPEN_STAT = 0x4F6 // 1270 SYS_ACCEPT_AND_RECV = 0x4F7 // 1271 SYS___FP_SETMODE = 0x4F8 // 1272 SYS___SIGACTIONSET = 0x4FB // 1275 SYS___UCREATE = 0x4FC // 1276 SYS___UMALLOC = 0x4FD // 1277 SYS___UFREE = 0x4FE // 1278 SYS___UHEAPREPORT = 0x4FF // 1279 SYS___ISBFP = 0x500 // 1280 SYS___FP_CAST = 0x501 // 1281 SYS___CERTIFICATE = 0x502 // 1282 SYS_SEND_FILE = 0x503 // 1283 SYS_AIO_CANCEL = 0x504 // 1284 SYS_AIO_ERROR = 0x505 // 1285 SYS_AIO_READ = 0x506 // 1286 SYS_AIO_RETURN = 0x507 // 1287 SYS_AIO_SUSPEND = 0x508 // 1288 SYS_AIO_WRITE = 0x509 // 1289 SYS_PTHREAD_MUTEXATTR_GETPSHARED = 0x50A // 1290 SYS_PTHREAD_MUTEXATTR_SETPSHARED = 0x50B // 1291 SYS_PTHREAD_RWLOCK_DESTROY = 0x50C // 1292 SYS_PTHREAD_RWLOCK_INIT = 0x50D // 1293 SYS_PTHREAD_RWLOCK_RDLOCK = 0x50E // 1294 SYS_PTHREAD_RWLOCK_TRYRDLOCK = 0x50F // 1295 SYS_PTHREAD_RWLOCK_TRYWRLOCK = 0x510 // 1296 SYS_PTHREAD_RWLOCK_UNLOCK = 0x511 // 1297 SYS_PTHREAD_RWLOCK_WRLOCK = 0x512 // 1298 SYS_PTHREAD_RWLOCKATTR_GETPSHARED = 0x513 // 1299 SYS_PTHREAD_RWLOCKATTR_SETPSHARED = 0x514 // 1300 SYS_PTHREAD_RWLOCKATTR_INIT = 0x515 // 1301 SYS_PTHREAD_RWLOCKATTR_DESTROY = 0x516 // 1302 SYS___CTTBL = 0x517 // 1303 SYS_PTHREAD_MUTEXATTR_SETTYPE = 0x518 // 1304 SYS_PTHREAD_MUTEXATTR_GETTYPE = 0x519 // 1305 SYS___FP_CLR_FLAG = 0x51A // 1306 SYS___FP_READ_FLAG = 0x51B // 1307 SYS___FP_RAISE_XCP = 0x51C // 1308 SYS___FP_CLASS = 0x51D // 1309 SYS___FP_FINITE = 0x51E // 1310 SYS___FP_ISNAN = 0x51F // 1311 SYS___FP_UNORDERED = 0x520 // 1312 SYS___FP_READ_RND = 0x521 // 1313 SYS___FP_READ_RND_B = 0x522 // 1314 SYS___FP_SWAP_RND = 0x523 // 1315 SYS___FP_SWAP_RND_B = 0x524 // 1316 SYS___FP_LEVEL = 0x525 // 1317 SYS___FP_BTOH = 0x526 // 1318 SYS___FP_HTOB = 0x527 // 1319 SYS___FPC_RD = 0x528 // 1320 SYS___FPC_WR = 0x529 // 1321 SYS___FPC_RW = 0x52A // 1322 SYS___FPC_SM = 0x52B // 1323 SYS___FPC_RS = 0x52C // 1324 SYS_SIGTIMEDWAIT = 0x52D // 1325 SYS_SIGWAITINFO = 0x52E // 1326 SYS___CHKBFP = 0x52F // 1327 SYS___W_PIOCTL = 0x59E // 1438 SYS___OSENV = 0x59F // 1439 SYS_EXPORTWO = 0x5A1 // 1441 SYS_EXPORTWORKUNIT = 0x5A1 // 1441 SYS_UNDOEXPO = 0x5A2 // 1442 SYS_UNDOEXPORTWORKUNIT = 0x5A2 // 1442 SYS_IMPORTWO = 0x5A3 // 1443 SYS_IMPORTWORKUNIT = 0x5A3 // 1443 SYS_UNDOIMPO = 0x5A4 // 1444 SYS_UNDOIMPORTWORKUNIT = 0x5A4 // 1444 SYS_EXTRACTW = 0x5A5 // 1445 SYS_EXTRACTWORKUNIT = 0x5A5 // 1445 SYS___CPL = 0x5A6 // 1446 SYS___MAP_INIT = 0x5A7 // 1447 SYS___MAP_SERVICE = 0x5A8 // 1448 SYS_SIGQUEUE = 0x5A9 // 1449 SYS___MOUNT = 0x5AA // 1450 SYS___GETUSERID = 0x5AB // 1451 SYS___IPDOMAINNAME = 0x5AC // 1452 SYS_QUERYENC = 0x5AD // 1453 SYS_QUERYWORKUNITCLASSIFICATION = 0x5AD // 1453 SYS_CONNECTE = 0x5AE // 1454 SYS_CONNECTEXPORTIMPORT = 0x5AE // 1454 SYS___FP_SWAPMODE = 0x5AF // 1455 SYS_STRTOLL = 0x5B0 // 1456 SYS_STRTOULL = 0x5B1 // 1457 SYS___DSA_PREV = 0x5B2 // 1458 SYS___EP_FIND = 0x5B3 // 1459 SYS___SERVER_THREADS_QUERY = 0x5B4 // 1460 SYS___MSGRCV_TIMED = 0x5B7 // 1463 SYS___SEMOP_TIMED = 0x5B8 // 1464 SYS___GET_CPUID = 0x5B9 // 1465 SYS___GET_SYSTEM_SETTINGS = 0x5BA // 1466 SYS_FTELLO = 0x5C8 // 1480 SYS_FSEEKO = 0x5C9 // 1481 SYS_LLDIV = 0x5CB // 1483 SYS_WCSTOLL = 0x5CC // 1484 SYS_WCSTOULL = 0x5CD // 1485 SYS_LLABS = 0x5CE // 1486 SYS___CONSOLE2 = 0x5D2 // 1490 SYS_INET_NTOP = 0x5D3 // 1491 SYS_INET_PTON = 0x5D4 // 1492 SYS___RES = 0x5D6 // 1494 SYS_RES_MKQUERY = 0x5D7 // 1495 SYS_RES_INIT = 0x5D8 // 1496 SYS_RES_QUERY = 0x5D9 // 1497 SYS_RES_SEARCH = 0x5DA // 1498 SYS_RES_SEND = 0x5DB // 1499 SYS_RES_QUERYDOMAIN = 0x5DC // 1500 SYS_DN_EXPAND = 0x5DD // 1501 SYS_DN_SKIPNAME = 0x5DE // 1502 SYS_DN_COMP = 0x5DF // 1503 SYS_ASCTIME_R = 0x5E0 // 1504 SYS_CTIME_R = 0x5E1 // 1505 SYS_GMTIME_R = 0x5E2 // 1506 SYS_LOCALTIME_R = 0x5E3 // 1507 SYS_RAND_R = 0x5E4 // 1508 SYS_STRTOK_R = 0x5E5 // 1509 SYS_READDIR_R = 0x5E6 // 1510 SYS_GETGRGID_R = 0x5E7 // 1511 SYS_GETGRNAM_R = 0x5E8 // 1512 SYS_GETLOGIN_R = 0x5E9 // 1513 SYS_GETPWNAM_R = 0x5EA // 1514 SYS_GETPWUID_R = 0x5EB // 1515 SYS_TTYNAME_R = 0x5EC // 1516 SYS_PTHREAD_ATFORK = 0x5ED // 1517 SYS_PTHREAD_ATTR_GETGUARDSIZE = 0x5EE // 1518 SYS_PTHREAD_ATTR_GETSTACKADDR = 0x5EF // 1519 SYS_PTHREAD_ATTR_SETGUARDSIZE = 0x5F0 // 1520 SYS_PTHREAD_ATTR_SETSTACKADDR = 0x5F1 // 1521 SYS_PTHREAD_CONDATTR_GETPSHARED = 0x5F2 // 1522 SYS_PTHREAD_CONDATTR_SETPSHARED = 0x5F3 // 1523 SYS_PTHREAD_GETCONCURRENCY = 0x5F4 // 1524 SYS_PTHREAD_KEY_DELETE = 0x5F5 // 1525 SYS_PTHREAD_SETCONCURRENCY = 0x5F6 // 1526 SYS_PTHREAD_SIGMASK = 0x5F7 // 1527 SYS___DISCARDDATA = 0x5F8 // 1528 SYS_PTHREAD_ATTR_GETSCHEDPARAM = 0x5F9 // 1529 SYS_PTHREAD_ATTR_SETSCHEDPARAM = 0x5FA // 1530 SYS_PTHREAD_ATTR_GETDETACHSTATE_U98 = 0x5FB // 1531 SYS_PTHREAD_ATTR_SETDETACHSTATE_U98 = 0x5FC // 1532 SYS_PTHREAD_DETACH_U98 = 0x5FD // 1533 SYS_PTHREAD_GETSPECIFIC_U98 = 0x5FE // 1534 SYS_PTHREAD_SETCANCELSTATE = 0x5FF // 1535 SYS_PTHREAD_SETCANCELTYPE = 0x600 // 1536 SYS_PTHREAD_TESTCANCEL = 0x601 // 1537 SYS___ATANF_B = 0x602 // 1538 SYS___ATANL_B = 0x603 // 1539 SYS___CEILF_B = 0x604 // 1540 SYS___CEILL_B = 0x605 // 1541 SYS___COSF_B = 0x606 // 1542 SYS___COSL_B = 0x607 // 1543 SYS___FABSF_B = 0x608 // 1544 SYS___FABSL_B = 0x609 // 1545 SYS___FLOORF_B = 0x60A // 1546 SYS___FLOORL_B = 0x60B // 1547 SYS___FREXPF_B = 0x60C // 1548 SYS___FREXPL_B = 0x60D // 1549 SYS___LDEXPF_B = 0x60E // 1550 SYS___LDEXPL_B = 0x60F // 1551 SYS___SINF_B = 0x610 // 1552 SYS___SINL_B = 0x611 // 1553 SYS___TANF_B = 0x612 // 1554 SYS___TANL_B = 0x613 // 1555 SYS___TANHF_B = 0x614 // 1556 SYS___TANHL_B = 0x615 // 1557 SYS___ACOSF_B = 0x616 // 1558 SYS___ACOSL_B = 0x617 // 1559 SYS___ASINF_B = 0x618 // 1560 SYS___ASINL_B = 0x619 // 1561 SYS___ATAN2F_B = 0x61A // 1562 SYS___ATAN2L_B = 0x61B // 1563 SYS___COSHF_B = 0x61C // 1564 SYS___COSHL_B = 0x61D // 1565 SYS___EXPF_B = 0x61E // 1566 SYS___EXPL_B = 0x61F // 1567 SYS___LOGF_B = 0x620 // 1568 SYS___LOGL_B = 0x621 // 1569 SYS___LOG10F_B = 0x622 // 1570 SYS___LOG10L_B = 0x623 // 1571 SYS___POWF_B = 0x624 // 1572 SYS___POWL_B = 0x625 // 1573 SYS___SINHF_B = 0x626 // 1574 SYS___SINHL_B = 0x627 // 1575 SYS___SQRTF_B = 0x628 // 1576 SYS___SQRTL_B = 0x629 // 1577 SYS___ABSF_B = 0x62A // 1578 SYS___ABS_B = 0x62B // 1579 SYS___ABSL_B = 0x62C // 1580 SYS___FMODF_B = 0x62D // 1581 SYS___FMODL_B = 0x62E // 1582 SYS___MODFF_B = 0x62F // 1583 SYS___MODFL_B = 0x630 // 1584 SYS_ABSF = 0x631 // 1585 SYS_ABSL = 0x632 // 1586 SYS_ACOSF = 0x633 // 1587 SYS_ACOSL = 0x634 // 1588 SYS_ASINF = 0x635 // 1589 SYS_ASINL = 0x636 // 1590 SYS_ATAN2F = 0x637 // 1591 SYS_ATAN2L = 0x638 // 1592 SYS_ATANF = 0x639 // 1593 SYS_ATANL = 0x63A // 1594 SYS_CEILF = 0x63B // 1595 SYS_CEILL = 0x63C // 1596 SYS_COSF = 0x63D // 1597 SYS_COSL = 0x63E // 1598 SYS_COSHF = 0x63F // 1599 SYS_COSHL = 0x640 // 1600 SYS_EXPF = 0x641 // 1601 SYS_EXPL = 0x642 // 1602 SYS_TANHF = 0x643 // 1603 SYS_TANHL = 0x644 // 1604 SYS_LOG10F = 0x645 // 1605 SYS_LOG10L = 0x646 // 1606 SYS_LOGF = 0x647 // 1607 SYS_LOGL = 0x648 // 1608 SYS_POWF = 0x649 // 1609 SYS_POWL = 0x64A // 1610 SYS_SINF = 0x64B // 1611 SYS_SINL = 0x64C // 1612 SYS_SQRTF = 0x64D // 1613 SYS_SQRTL = 0x64E // 1614 SYS_SINHF = 0x64F // 1615 SYS_SINHL = 0x650 // 1616 SYS_TANF = 0x651 // 1617 SYS_TANL = 0x652 // 1618 SYS_FABSF = 0x653 // 1619 SYS_FABSL = 0x654 // 1620 SYS_FLOORF = 0x655 // 1621 SYS_FLOORL = 0x656 // 1622 SYS_FMODF = 0x657 // 1623 SYS_FMODL = 0x658 // 1624 SYS_FREXPF = 0x659 // 1625 SYS_FREXPL = 0x65A // 1626 SYS_LDEXPF = 0x65B // 1627 SYS_LDEXPL = 0x65C // 1628 SYS_MODFF = 0x65D // 1629 SYS_MODFL = 0x65E // 1630 SYS_BTOWC = 0x65F // 1631 SYS___CHATTR = 0x660 // 1632 SYS___FCHATTR = 0x661 // 1633 SYS___TOCCSID = 0x662 // 1634 SYS___CSNAMETYPE = 0x663 // 1635 SYS___TOCSNAME = 0x664 // 1636 SYS___CCSIDTYPE = 0x665 // 1637 SYS___AE_CORRESTBL_QUERY = 0x666 // 1638 SYS___AE_AUTOCONVERT_STATE = 0x667 // 1639 SYS_DN_FIND = 0x668 // 1640 SYS___GETHOSTBYADDR_A = 0x669 // 1641 SYS___GETHOSTBYNAME_A = 0x66A // 1642 SYS___RES_INIT_A = 0x66B // 1643 SYS___GETHOSTBYADDR_R_A = 0x66C // 1644 SYS___GETHOSTBYNAME_R_A = 0x66D // 1645 SYS___CHARMAP_INIT_A = 0x66E // 1646 SYS___MBLEN_A = 0x66F // 1647 SYS___MBLEN_SB_A = 0x670 // 1648 SYS___MBLEN_STD_A = 0x671 // 1649 SYS___MBLEN_UTF = 0x672 // 1650 SYS___MBSTOWCS_A = 0x673 // 1651 SYS___MBSTOWCS_STD_A = 0x674 // 1652 SYS___MBTOWC_A = 0x675 // 1653 SYS___MBTOWC_ISO1 = 0x676 // 1654 SYS___MBTOWC_SBCS = 0x677 // 1655 SYS___MBTOWC_MBCS = 0x678 // 1656 SYS___MBTOWC_UTF = 0x679 // 1657 SYS___WCSTOMBS_A = 0x67A // 1658 SYS___WCSTOMBS_STD_A = 0x67B // 1659 SYS___WCSWIDTH_A = 0x67C // 1660 SYS___GETGRGID_R_A = 0x67D // 1661 SYS___WCSWIDTH_STD_A = 0x67E // 1662 SYS___WCSWIDTH_ASIA = 0x67F // 1663 SYS___CSID_A = 0x680 // 1664 SYS___CSID_STD_A = 0x681 // 1665 SYS___WCSID_A = 0x682 // 1666 SYS___WCSID_STD_A = 0x683 // 1667 SYS___WCTOMB_A = 0x684 // 1668 SYS___WCTOMB_ISO1 = 0x685 // 1669 SYS___WCTOMB_STD_A = 0x686 // 1670 SYS___WCTOMB_UTF = 0x687 // 1671 SYS___WCWIDTH_A = 0x688 // 1672 SYS___GETGRNAM_R_A = 0x689 // 1673 SYS___WCWIDTH_STD_A = 0x68A // 1674 SYS___WCWIDTH_ASIA = 0x68B // 1675 SYS___GETPWNAM_R_A = 0x68C // 1676 SYS___GETPWUID_R_A = 0x68D // 1677 SYS___GETLOGIN_R_A = 0x68E // 1678 SYS___TTYNAME_R_A = 0x68F // 1679 SYS___READDIR_R_A = 0x690 // 1680 SYS___E2A_S = 0x691 // 1681 SYS___FNMATCH_A = 0x692 // 1682 SYS___FNMATCH_C_A = 0x693 // 1683 SYS___EXECL_A = 0x694 // 1684 SYS___FNMATCH_STD_A = 0x695 // 1685 SYS___REGCOMP_A = 0x696 // 1686 SYS___REGCOMP_STD_A = 0x697 // 1687 SYS___REGERROR_A = 0x698 // 1688 SYS___REGERROR_STD_A = 0x699 // 1689 SYS___REGEXEC_A = 0x69A // 1690 SYS___REGEXEC_STD_A = 0x69B // 1691 SYS___REGFREE_A = 0x69C // 1692 SYS___REGFREE_STD_A = 0x69D // 1693 SYS___STRCOLL_A = 0x69E // 1694 SYS___STRCOLL_C_A = 0x69F // 1695 SYS___EXECLE_A = 0x6A0 // 1696 SYS___STRCOLL_STD_A = 0x6A1 // 1697 SYS___STRXFRM_A = 0x6A2 // 1698 SYS___STRXFRM_C_A = 0x6A3 // 1699 SYS___EXECLP_A = 0x6A4 // 1700 SYS___STRXFRM_STD_A = 0x6A5 // 1701 SYS___WCSCOLL_A = 0x6A6 // 1702 SYS___WCSCOLL_C_A = 0x6A7 // 1703 SYS___WCSCOLL_STD_A = 0x6A8 // 1704 SYS___WCSXFRM_A = 0x6A9 // 1705 SYS___WCSXFRM_C_A = 0x6AA // 1706 SYS___WCSXFRM_STD_A = 0x6AB // 1707 SYS___COLLATE_INIT_A = 0x6AC // 1708 SYS___WCTYPE_A = 0x6AD // 1709 SYS___GET_WCTYPE_STD_A = 0x6AE // 1710 SYS___CTYPE_INIT_A = 0x6AF // 1711 SYS___ISWCTYPE_A = 0x6B0 // 1712 SYS___EXECV_A = 0x6B1 // 1713 SYS___IS_WCTYPE_STD_A = 0x6B2 // 1714 SYS___TOWLOWER_A = 0x6B3 // 1715 SYS___TOWLOWER_STD_A = 0x6B4 // 1716 SYS___TOWUPPER_A = 0x6B5 // 1717 SYS___TOWUPPER_STD_A = 0x6B6 // 1718 SYS___LOCALE_INIT_A = 0x6B7 // 1719 SYS___LOCALECONV_A = 0x6B8 // 1720 SYS___LOCALECONV_STD_A = 0x6B9 // 1721 SYS___NL_LANGINFO_A = 0x6BA // 1722 SYS___NL_LNAGINFO_STD_A = 0x6BB // 1723 SYS___MONETARY_INIT_A = 0x6BC // 1724 SYS___STRFMON_A = 0x6BD // 1725 SYS___STRFMON_STD_A = 0x6BE // 1726 SYS___GETADDRINFO_A = 0x6BF // 1727 SYS___CATGETS_A = 0x6C0 // 1728 SYS___EXECVE_A = 0x6C1 // 1729 SYS___EXECVP_A = 0x6C2 // 1730 SYS___SPAWN_A = 0x6C3 // 1731 SYS___GETNAMEINFO_A = 0x6C4 // 1732 SYS___SPAWNP_A = 0x6C5 // 1733 SYS___NUMERIC_INIT_A = 0x6C6 // 1734 SYS___RESP_INIT_A = 0x6C7 // 1735 SYS___RPMATCH_A = 0x6C8 // 1736 SYS___RPMATCH_C_A = 0x6C9 // 1737 SYS___RPMATCH_STD_A = 0x6CA // 1738 SYS___TIME_INIT_A = 0x6CB // 1739 SYS___STRFTIME_A = 0x6CC // 1740 SYS___STRFTIME_STD_A = 0x6CD // 1741 SYS___STRPTIME_A = 0x6CE // 1742 SYS___STRPTIME_STD_A = 0x6CF // 1743 SYS___WCSFTIME_A = 0x6D0 // 1744 SYS___WCSFTIME_STD_A = 0x6D1 // 1745 SYS_____SPAWN2_A = 0x6D2 // 1746 SYS_____SPAWNP2_A = 0x6D3 // 1747 SYS___SYNTAX_INIT_A = 0x6D4 // 1748 SYS___TOD_INIT_A = 0x6D5 // 1749 SYS___NL_CSINFO_A = 0x6D6 // 1750 SYS___NL_MONINFO_A = 0x6D7 // 1751 SYS___NL_NUMINFO_A = 0x6D8 // 1752 SYS___NL_RESPINFO_A = 0x6D9 // 1753 SYS___NL_TIMINFO_A = 0x6DA // 1754 SYS___IF_NAMETOINDEX_A = 0x6DB // 1755 SYS___IF_INDEXTONAME_A = 0x6DC // 1756 SYS___PRINTF_A = 0x6DD // 1757 SYS___ICONV_OPEN_A = 0x6DE // 1758 SYS___DLLLOAD_A = 0x6DF // 1759 SYS___DLLQUERYFN_A = 0x6E0 // 1760 SYS___DLLQUERYVAR_A = 0x6E1 // 1761 SYS_____CHATTR_A = 0x6E2 // 1762 SYS___E2A_L = 0x6E3 // 1763 SYS_____TOCCSID_A = 0x6E4 // 1764 SYS_____TOCSNAME_A = 0x6E5 // 1765 SYS_____CCSIDTYPE_A = 0x6E6 // 1766 SYS_____CSNAMETYPE_A = 0x6E7 // 1767 SYS___CHMOD_A = 0x6E8 // 1768 SYS___MKDIR_A = 0x6E9 // 1769 SYS___STAT_A = 0x6EA // 1770 SYS___STAT_O_A = 0x6EB // 1771 SYS___MKFIFO_A = 0x6EC // 1772 SYS_____OPEN_STAT_A = 0x6ED // 1773 SYS___LSTAT_A = 0x6EE // 1774 SYS___LSTAT_O_A = 0x6EF // 1775 SYS___MKNOD_A = 0x6F0 // 1776 SYS___MOUNT_A = 0x6F1 // 1777 SYS___UMOUNT_A = 0x6F2 // 1778 SYS___CHAUDIT_A = 0x6F4 // 1780 SYS___W_GETMNTENT_A = 0x6F5 // 1781 SYS___CREAT_A = 0x6F6 // 1782 SYS___OPEN_A = 0x6F7 // 1783 SYS___SETLOCALE_A = 0x6F9 // 1785 SYS___FPRINTF_A = 0x6FA // 1786 SYS___SPRINTF_A = 0x6FB // 1787 SYS___VFPRINTF_A = 0x6FC // 1788 SYS___VPRINTF_A = 0x6FD // 1789 SYS___VSPRINTF_A = 0x6FE // 1790 SYS___VSWPRINTF_A = 0x6FF // 1791 SYS___SWPRINTF_A = 0x700 // 1792 SYS___FSCANF_A = 0x701 // 1793 SYS___SCANF_A = 0x702 // 1794 SYS___SSCANF_A = 0x703 // 1795 SYS___SWSCANF_A = 0x704 // 1796 SYS___ATOF_A = 0x705 // 1797 SYS___ATOI_A = 0x706 // 1798 SYS___ATOL_A = 0x707 // 1799 SYS___STRTOD_A = 0x708 // 1800 SYS___STRTOL_A = 0x709 // 1801 SYS___STRTOUL_A = 0x70A // 1802 SYS_____AE_CORRESTBL_QUERY_A = 0x70B // 1803 SYS___A64L_A = 0x70C // 1804 SYS___ECVT_A = 0x70D // 1805 SYS___FCVT_A = 0x70E // 1806 SYS___GCVT_A = 0x70F // 1807 SYS___L64A_A = 0x710 // 1808 SYS___STRERROR_A = 0x711 // 1809 SYS___PERROR_A = 0x712 // 1810 SYS___FETCH_A = 0x713 // 1811 SYS___GETENV_A = 0x714 // 1812 SYS___MKSTEMP_A = 0x717 // 1815 SYS___PTSNAME_A = 0x718 // 1816 SYS___PUTENV_A = 0x719 // 1817 SYS___REALPATH_A = 0x71A // 1818 SYS___SETENV_A = 0x71B // 1819 SYS___SYSTEM_A = 0x71C // 1820 SYS___GETOPT_A = 0x71D // 1821 SYS___CATOPEN_A = 0x71E // 1822 SYS___ACCESS_A = 0x71F // 1823 SYS___CHDIR_A = 0x720 // 1824 SYS___CHOWN_A = 0x721 // 1825 SYS___CHROOT_A = 0x722 // 1826 SYS___GETCWD_A = 0x723 // 1827 SYS___GETWD_A = 0x724 // 1828 SYS___LCHOWN_A = 0x725 // 1829 SYS___LINK_A = 0x726 // 1830 SYS___PATHCONF_A = 0x727 // 1831 SYS___IF_NAMEINDEX_A = 0x728 // 1832 SYS___READLINK_A = 0x729 // 1833 SYS___RMDIR_A = 0x72A // 1834 SYS___STATVFS_A = 0x72B // 1835 SYS___SYMLINK_A = 0x72C // 1836 SYS___TRUNCATE_A = 0x72D // 1837 SYS___UNLINK_A = 0x72E // 1838 SYS___GAI_STRERROR_A = 0x72F // 1839 SYS___EXTLINK_NP_A = 0x730 // 1840 SYS___ISALNUM_A = 0x731 // 1841 SYS___ISALPHA_A = 0x732 // 1842 SYS___A2E_S = 0x733 // 1843 SYS___ISCNTRL_A = 0x734 // 1844 SYS___ISDIGIT_A = 0x735 // 1845 SYS___ISGRAPH_A = 0x736 // 1846 SYS___ISLOWER_A = 0x737 // 1847 SYS___ISPRINT_A = 0x738 // 1848 SYS___ISPUNCT_A = 0x739 // 1849 SYS___ISSPACE_A = 0x73A // 1850 SYS___ISUPPER_A = 0x73B // 1851 SYS___ISXDIGIT_A = 0x73C // 1852 SYS___TOLOWER_A = 0x73D // 1853 SYS___TOUPPER_A = 0x73E // 1854 SYS___ISWALNUM_A = 0x73F // 1855 SYS___ISWALPHA_A = 0x740 // 1856 SYS___A2E_L = 0x741 // 1857 SYS___ISWCNTRL_A = 0x742 // 1858 SYS___ISWDIGIT_A = 0x743 // 1859 SYS___ISWGRAPH_A = 0x744 // 1860 SYS___ISWLOWER_A = 0x745 // 1861 SYS___ISWPRINT_A = 0x746 // 1862 SYS___ISWPUNCT_A = 0x747 // 1863 SYS___ISWSPACE_A = 0x748 // 1864 SYS___ISWUPPER_A = 0x749 // 1865 SYS___ISWXDIGIT_A = 0x74A // 1866 SYS___CONFSTR_A = 0x74B // 1867 SYS___FTOK_A = 0x74C // 1868 SYS___MKTEMP_A = 0x74D // 1869 SYS___FDOPEN_A = 0x74E // 1870 SYS___FLDATA_A = 0x74F // 1871 SYS___REMOVE_A = 0x750 // 1872 SYS___RENAME_A = 0x751 // 1873 SYS___TMPNAM_A = 0x752 // 1874 SYS___FOPEN_A = 0x753 // 1875 SYS___FREOPEN_A = 0x754 // 1876 SYS___CUSERID_A = 0x755 // 1877 SYS___POPEN_A = 0x756 // 1878 SYS___TEMPNAM_A = 0x757 // 1879 SYS___FTW_A = 0x758 // 1880 SYS___GETGRENT_A = 0x759 // 1881 SYS___GETGRGID_A = 0x75A // 1882 SYS___GETGRNAM_A = 0x75B // 1883 SYS___GETGROUPSBYNAME_A = 0x75C // 1884 SYS___GETHOSTENT_A = 0x75D // 1885 SYS___GETHOSTNAME_A = 0x75E // 1886 SYS___GETLOGIN_A = 0x75F // 1887 SYS___INET_NTOP_A = 0x760 // 1888 SYS___GETPASS_A = 0x761 // 1889 SYS___GETPWENT_A = 0x762 // 1890 SYS___GETPWNAM_A = 0x763 // 1891 SYS___GETPWUID_A = 0x764 // 1892 SYS_____CHECK_RESOURCE_AUTH_NP_A = 0x765 // 1893 SYS___CHECKSCHENV_A = 0x766 // 1894 SYS___CONNECTSERVER_A = 0x767 // 1895 SYS___CONNECTWORKMGR_A = 0x768 // 1896 SYS_____CONSOLE_A = 0x769 // 1897 SYS___CREATEWORKUNIT_A = 0x76A // 1898 SYS___CTERMID_A = 0x76B // 1899 SYS___FMTMSG_A = 0x76C // 1900 SYS___INITGROUPS_A = 0x76D // 1901 SYS_____LOGIN_A = 0x76E // 1902 SYS___MSGRCV_A = 0x76F // 1903 SYS___MSGSND_A = 0x770 // 1904 SYS___MSGXRCV_A = 0x771 // 1905 SYS___NFTW_A = 0x772 // 1906 SYS_____PASSWD_A = 0x773 // 1907 SYS___PTHREAD_SECURITY_NP_A = 0x774 // 1908 SYS___QUERYMETRICS_A = 0x775 // 1909 SYS___QUERYSCHENV = 0x776 // 1910 SYS___READV_A = 0x777 // 1911 SYS_____SERVER_CLASSIFY_A = 0x778 // 1912 SYS_____SERVER_INIT_A = 0x779 // 1913 SYS_____SERVER_PWU_A = 0x77A // 1914 SYS___STRCASECMP_A = 0x77B // 1915 SYS___STRNCASECMP_A = 0x77C // 1916 SYS___TTYNAME_A = 0x77D // 1917 SYS___UNAME_A = 0x77E // 1918 SYS___UTIMES_A = 0x77F // 1919 SYS___W_GETPSENT_A = 0x780 // 1920 SYS___WRITEV_A = 0x781 // 1921 SYS___W_STATFS_A = 0x782 // 1922 SYS___W_STATVFS_A = 0x783 // 1923 SYS___FPUTC_A = 0x784 // 1924 SYS___PUTCHAR_A = 0x785 // 1925 SYS___PUTS_A = 0x786 // 1926 SYS___FGETS_A = 0x787 // 1927 SYS___GETS_A = 0x788 // 1928 SYS___FPUTS_A = 0x789 // 1929 SYS___FREAD_A = 0x78A // 1930 SYS___FWRITE_A = 0x78B // 1931 SYS___OPEN_O_A = 0x78C // 1932 SYS___ISASCII = 0x78D // 1933 SYS___CREAT_O_A = 0x78E // 1934 SYS___ENVNA = 0x78F // 1935 SYS___PUTC_A = 0x790 // 1936 SYS___AE_THREAD_SETMODE = 0x791 // 1937 SYS___AE_THREAD_SWAPMODE = 0x792 // 1938 SYS___GETNETBYADDR_A = 0x793 // 1939 SYS___GETNETBYNAME_A = 0x794 // 1940 SYS___GETNETENT_A = 0x795 // 1941 SYS___GETPROTOBYNAME_A = 0x796 // 1942 SYS___GETPROTOBYNUMBER_A = 0x797 // 1943 SYS___GETPROTOENT_A = 0x798 // 1944 SYS___GETSERVBYNAME_A = 0x799 // 1945 SYS___GETSERVBYPORT_A = 0x79A // 1946 SYS___GETSERVENT_A = 0x79B // 1947 SYS___ASCTIME_A = 0x79C // 1948 SYS___CTIME_A = 0x79D // 1949 SYS___GETDATE_A = 0x79E // 1950 SYS___TZSET_A = 0x79F // 1951 SYS___UTIME_A = 0x7A0 // 1952 SYS___ASCTIME_R_A = 0x7A1 // 1953 SYS___CTIME_R_A = 0x7A2 // 1954 SYS___STRTOLL_A = 0x7A3 // 1955 SYS___STRTOULL_A = 0x7A4 // 1956 SYS___FPUTWC_A = 0x7A5 // 1957 SYS___PUTWC_A = 0x7A6 // 1958 SYS___PUTWCHAR_A = 0x7A7 // 1959 SYS___FPUTWS_A = 0x7A8 // 1960 SYS___UNGETWC_A = 0x7A9 // 1961 SYS___FGETWC_A = 0x7AA // 1962 SYS___GETWC_A = 0x7AB // 1963 SYS___GETWCHAR_A = 0x7AC // 1964 SYS___FGETWS_A = 0x7AD // 1965 SYS___GETTIMEOFDAY_A = 0x7AE // 1966 SYS___GMTIME_A = 0x7AF // 1967 SYS___GMTIME_R_A = 0x7B0 // 1968 SYS___LOCALTIME_A = 0x7B1 // 1969 SYS___LOCALTIME_R_A = 0x7B2 // 1970 SYS___MKTIME_A = 0x7B3 // 1971 SYS___TZZNA = 0x7B4 // 1972 SYS_UNATEXIT = 0x7B5 // 1973 SYS___CEE3DMP_A = 0x7B6 // 1974 SYS___CDUMP_A = 0x7B7 // 1975 SYS___CSNAP_A = 0x7B8 // 1976 SYS___CTEST_A = 0x7B9 // 1977 SYS___CTRACE_A = 0x7BA // 1978 SYS___VSWPRNTF2_A = 0x7BB // 1979 SYS___INET_PTON_A = 0x7BC // 1980 SYS___SYSLOG_A = 0x7BD // 1981 SYS___CRYPT_A = 0x7BE // 1982 SYS_____OPENDIR2_A = 0x7BF // 1983 SYS_____READDIR2_A = 0x7C0 // 1984 SYS___OPENDIR_A = 0x7C2 // 1986 SYS___READDIR_A = 0x7C3 // 1987 SYS_PREAD = 0x7C7 // 1991 SYS_PWRITE = 0x7C8 // 1992 SYS_M_CREATE_LAYOUT = 0x7C9 // 1993 SYS_M_DESTROY_LAYOUT = 0x7CA // 1994 SYS_M_GETVALUES_LAYOUT = 0x7CB // 1995 SYS_M_SETVALUES_LAYOUT = 0x7CC // 1996 SYS_M_TRANSFORM_LAYOUT = 0x7CD // 1997 SYS_M_WTRANSFORM_LAYOUT = 0x7CE // 1998 SYS_FWPRINTF = 0x7D1 // 2001 SYS_WPRINTF = 0x7D2 // 2002 SYS_VFWPRINT = 0x7D3 // 2003 SYS_VFWPRINTF = 0x7D3 // 2003 SYS_VWPRINTF = 0x7D4 // 2004 SYS_FWSCANF = 0x7D5 // 2005 SYS_WSCANF = 0x7D6 // 2006 SYS_WCTRANS = 0x7D7 // 2007 SYS_TOWCTRAN = 0x7D8 // 2008 SYS_TOWCTRANS = 0x7D8 // 2008 SYS___WCSTOD_A = 0x7D9 // 2009 SYS___WCSTOL_A = 0x7DA // 2010 SYS___WCSTOUL_A = 0x7DB // 2011 SYS___BASENAME_A = 0x7DC // 2012 SYS___DIRNAME_A = 0x7DD // 2013 SYS___GLOB_A = 0x7DE // 2014 SYS_FWIDE = 0x7DF // 2015 SYS___OSNAME = 0x7E0 // 2016 SYS_____OSNAME_A = 0x7E1 // 2017 SYS___BTOWC_A = 0x7E4 // 2020 SYS___WCTOB_A = 0x7E5 // 2021 SYS___DBM_OPEN_A = 0x7E6 // 2022 SYS___VFPRINTF2_A = 0x7E7 // 2023 SYS___VPRINTF2_A = 0x7E8 // 2024 SYS___VSPRINTF2_A = 0x7E9 // 2025 SYS___CEIL_H = 0x7EA // 2026 SYS___FLOOR_H = 0x7EB // 2027 SYS___MODF_H = 0x7EC // 2028 SYS___FABS_H = 0x7ED // 2029 SYS___J0_H = 0x7EE // 2030 SYS___J1_H = 0x7EF // 2031 SYS___JN_H = 0x7F0 // 2032 SYS___Y0_H = 0x7F1 // 2033 SYS___Y1_H = 0x7F2 // 2034 SYS___YN_H = 0x7F3 // 2035 SYS___CEILF_H = 0x7F4 // 2036 SYS___CEILL_H = 0x7F5 // 2037 SYS___FLOORF_H = 0x7F6 // 2038 SYS___FLOORL_H = 0x7F7 // 2039 SYS___MODFF_H = 0x7F8 // 2040 SYS___MODFL_H = 0x7F9 // 2041 SYS___FABSF_H = 0x7FA // 2042 SYS___FABSL_H = 0x7FB // 2043 SYS___MALLOC24 = 0x7FC // 2044 SYS___MALLOC31 = 0x7FD // 2045 SYS_ACL_INIT = 0x7FE // 2046 SYS_ACL_FREE = 0x7FF // 2047 SYS_ACL_FIRST_ENTRY = 0x800 // 2048 SYS_ACL_GET_ENTRY = 0x801 // 2049 SYS_ACL_VALID = 0x802 // 2050 SYS_ACL_CREATE_ENTRY = 0x803 // 2051 SYS_ACL_DELETE_ENTRY = 0x804 // 2052 SYS_ACL_UPDATE_ENTRY = 0x805 // 2053 SYS_ACL_DELETE_FD = 0x806 // 2054 SYS_ACL_DELETE_FILE = 0x807 // 2055 SYS_ACL_GET_FD = 0x808 // 2056 SYS_ACL_GET_FILE = 0x809 // 2057 SYS_ACL_SET_FD = 0x80A // 2058 SYS_ACL_SET_FILE = 0x80B // 2059 SYS_ACL_FROM_TEXT = 0x80C // 2060 SYS_ACL_TO_TEXT = 0x80D // 2061 SYS_ACL_SORT = 0x80E // 2062 SYS___SHUTDOWN_REGISTRATION = 0x80F // 2063 SYS___ERFL_B = 0x810 // 2064 SYS___ERFCL_B = 0x811 // 2065 SYS___LGAMMAL_B = 0x812 // 2066 SYS___SETHOOKEVENTS = 0x813 // 2067 SYS_IF_NAMETOINDEX = 0x814 // 2068 SYS_IF_INDEXTONAME = 0x815 // 2069 SYS_IF_NAMEINDEX = 0x816 // 2070 SYS_IF_FREENAMEINDEX = 0x817 // 2071 SYS_GETADDRINFO = 0x818 // 2072 SYS_GETNAMEINFO = 0x819 // 2073 SYS_FREEADDRINFO = 0x81A // 2074 SYS_GAI_STRERROR = 0x81B // 2075 SYS_REXEC_AF = 0x81C // 2076 SYS___POE = 0x81D // 2077 SYS___DYNALLOC_A = 0x81F // 2079 SYS___DYNFREE_A = 0x820 // 2080 SYS___RES_QUERY_A = 0x821 // 2081 SYS___RES_SEARCH_A = 0x822 // 2082 SYS___RES_QUERYDOMAIN_A = 0x823 // 2083 SYS___RES_MKQUERY_A = 0x824 // 2084 SYS___RES_SEND_A = 0x825 // 2085 SYS___DN_EXPAND_A = 0x826 // 2086 SYS___DN_SKIPNAME_A = 0x827 // 2087 SYS___DN_COMP_A = 0x828 // 2088 SYS___DN_FIND_A = 0x829 // 2089 SYS___NLIST_A = 0x82A // 2090 SYS_____TCGETCP_A = 0x82B // 2091 SYS_____TCSETCP_A = 0x82C // 2092 SYS_____W_PIOCTL_A = 0x82E // 2094 SYS___INET_ADDR_A = 0x82F // 2095 SYS___INET_NTOA_A = 0x830 // 2096 SYS___INET_NETWORK_A = 0x831 // 2097 SYS___ACCEPT_A = 0x832 // 2098 SYS___ACCEPT_AND_RECV_A = 0x833 // 2099 SYS___BIND_A = 0x834 // 2100 SYS___CONNECT_A = 0x835 // 2101 SYS___GETPEERNAME_A = 0x836 // 2102 SYS___GETSOCKNAME_A = 0x837 // 2103 SYS___RECVFROM_A = 0x838 // 2104 SYS___SENDTO_A = 0x839 // 2105 SYS___SENDMSG_A = 0x83A // 2106 SYS___RECVMSG_A = 0x83B // 2107 SYS_____LCHATTR_A = 0x83C // 2108 SYS___CABEND = 0x83D // 2109 SYS___LE_CIB_GET = 0x83E // 2110 SYS___SET_LAA_FOR_JIT = 0x83F // 2111 SYS___LCHATTR = 0x840 // 2112 SYS___WRITEDOWN = 0x841 // 2113 SYS_PTHREAD_MUTEX_INIT2 = 0x842 // 2114 SYS___ACOSHF_B = 0x843 // 2115 SYS___ACOSHL_B = 0x844 // 2116 SYS___ASINHF_B = 0x845 // 2117 SYS___ASINHL_B = 0x846 // 2118 SYS___ATANHF_B = 0x847 // 2119 SYS___ATANHL_B = 0x848 // 2120 SYS___CBRTF_B = 0x849 // 2121 SYS___CBRTL_B = 0x84A // 2122 SYS___COPYSIGNF_B = 0x84B // 2123 SYS___COPYSIGNL_B = 0x84C // 2124 SYS___COTANF_B = 0x84D // 2125 SYS___COTAN_B = 0x84E // 2126 SYS___COTANL_B = 0x84F // 2127 SYS___EXP2F_B = 0x850 // 2128 SYS___EXP2L_B = 0x851 // 2129 SYS___EXPM1F_B = 0x852 // 2130 SYS___EXPM1L_B = 0x853 // 2131 SYS___FDIMF_B = 0x854 // 2132 SYS___FDIM_B = 0x855 // 2133 SYS___FDIML_B = 0x856 // 2134 SYS___HYPOTF_B = 0x857 // 2135 SYS___HYPOTL_B = 0x858 // 2136 SYS___LOG1PF_B = 0x859 // 2137 SYS___LOG1PL_B = 0x85A // 2138 SYS___LOG2F_B = 0x85B // 2139 SYS___LOG2_B = 0x85C // 2140 SYS___LOG2L_B = 0x85D // 2141 SYS___REMAINDERF_B = 0x85E // 2142 SYS___REMAINDERL_B = 0x85F // 2143 SYS___REMQUOF_B = 0x860 // 2144 SYS___REMQUO_B = 0x861 // 2145 SYS___REMQUOL_B = 0x862 // 2146 SYS___TGAMMAF_B = 0x863 // 2147 SYS___TGAMMA_B = 0x864 // 2148 SYS___TGAMMAL_B = 0x865 // 2149 SYS___TRUNCF_B = 0x866 // 2150 SYS___TRUNC_B = 0x867 // 2151 SYS___TRUNCL_B = 0x868 // 2152 SYS___LGAMMAF_B = 0x869 // 2153 SYS___LROUNDF_B = 0x86A // 2154 SYS___LROUND_B = 0x86B // 2155 SYS___ERFF_B = 0x86C // 2156 SYS___ERFCF_B = 0x86D // 2157 SYS_ACOSHF = 0x86E // 2158 SYS_ACOSHL = 0x86F // 2159 SYS_ASINHF = 0x870 // 2160 SYS_ASINHL = 0x871 // 2161 SYS_ATANHF = 0x872 // 2162 SYS_ATANHL = 0x873 // 2163 SYS_CBRTF = 0x874 // 2164 SYS_CBRTL = 0x875 // 2165 SYS_COPYSIGNF = 0x876 // 2166 SYS_CPYSIGNF = 0x876 // 2166 SYS_COPYSIGNL = 0x877 // 2167 SYS_CPYSIGNL = 0x877 // 2167 SYS_COTANF = 0x878 // 2168 SYS___COTANF = 0x878 // 2168 SYS_COTAN = 0x879 // 2169 SYS___COTAN = 0x879 // 2169 SYS_COTANL = 0x87A // 2170 SYS___COTANL = 0x87A // 2170 SYS_EXP2F = 0x87B // 2171 SYS_EXP2L = 0x87C // 2172 SYS_EXPM1F = 0x87D // 2173 SYS_EXPM1L = 0x87E // 2174 SYS_FDIMF = 0x87F // 2175 SYS_FDIM = 0x881 // 2177 SYS_FDIML = 0x882 // 2178 SYS_HYPOTF = 0x883 // 2179 SYS_HYPOTL = 0x884 // 2180 SYS_LOG1PF = 0x885 // 2181 SYS_LOG1PL = 0x886 // 2182 SYS_LOG2F = 0x887 // 2183 SYS_LOG2 = 0x888 // 2184 SYS_LOG2L = 0x889 // 2185 SYS_REMAINDERF = 0x88A // 2186 SYS_REMAINDF = 0x88A // 2186 SYS_REMAINDERL = 0x88B // 2187 SYS_REMAINDL = 0x88B // 2187 SYS_REMQUOF = 0x88C // 2188 SYS_REMQUO = 0x88D // 2189 SYS_REMQUOL = 0x88E // 2190 SYS_TGAMMAF = 0x88F // 2191 SYS_TGAMMA = 0x890 // 2192 SYS_TGAMMAL = 0x891 // 2193 SYS_TRUNCF = 0x892 // 2194 SYS_TRUNC = 0x893 // 2195 SYS_TRUNCL = 0x894 // 2196 SYS_LGAMMAF = 0x895 // 2197 SYS_LGAMMAL = 0x896 // 2198 SYS_LROUNDF = 0x897 // 2199 SYS_LROUND = 0x898 // 2200 SYS_ERFF = 0x899 // 2201 SYS_ERFL = 0x89A // 2202 SYS_ERFCF = 0x89B // 2203 SYS_ERFCL = 0x89C // 2204 SYS___EXP2_B = 0x89D // 2205 SYS_EXP2 = 0x89E // 2206 SYS___FAR_JUMP = 0x89F // 2207 SYS___TCGETATTR_A = 0x8A1 // 2209 SYS___TCSETATTR_A = 0x8A2 // 2210 SYS___SUPERKILL = 0x8A4 // 2212 SYS___LE_CONDITION_TOKEN_BUILD = 0x8A5 // 2213 SYS___LE_MSG_ADD_INSERT = 0x8A6 // 2214 SYS___LE_MSG_GET = 0x8A7 // 2215 SYS___LE_MSG_GET_AND_WRITE = 0x8A8 // 2216 SYS___LE_MSG_WRITE = 0x8A9 // 2217 SYS___ITOA = 0x8AA // 2218 SYS___UTOA = 0x8AB // 2219 SYS___LTOA = 0x8AC // 2220 SYS___ULTOA = 0x8AD // 2221 SYS___LLTOA = 0x8AE // 2222 SYS___ULLTOA = 0x8AF // 2223 SYS___ITOA_A = 0x8B0 // 2224 SYS___UTOA_A = 0x8B1 // 2225 SYS___LTOA_A = 0x8B2 // 2226 SYS___ULTOA_A = 0x8B3 // 2227 SYS___LLTOA_A = 0x8B4 // 2228 SYS___ULLTOA_A = 0x8B5 // 2229 SYS_____GETENV_A = 0x8C3 // 2243 SYS___REXEC_A = 0x8C4 // 2244 SYS___REXEC_AF_A = 0x8C5 // 2245 SYS___GETUTXENT_A = 0x8C6 // 2246 SYS___GETUTXID_A = 0x8C7 // 2247 SYS___GETUTXLINE_A = 0x8C8 // 2248 SYS___PUTUTXLINE_A = 0x8C9 // 2249 SYS_____UTMPXNAME_A = 0x8CA // 2250 SYS___PUTC_UNLOCKED_A = 0x8CB // 2251 SYS___PUTCHAR_UNLOCKED_A = 0x8CC // 2252 SYS___SNPRINTF_A = 0x8CD // 2253 SYS___VSNPRINTF_A = 0x8CE // 2254 SYS___DLOPEN_A = 0x8D0 // 2256 SYS___DLSYM_A = 0x8D1 // 2257 SYS___DLERROR_A = 0x8D2 // 2258 SYS_FLOCKFILE = 0x8D3 // 2259 SYS_FTRYLOCKFILE = 0x8D4 // 2260 SYS_FUNLOCKFILE = 0x8D5 // 2261 SYS_GETC_UNLOCKED = 0x8D6 // 2262 SYS_GETCHAR_UNLOCKED = 0x8D7 // 2263 SYS_PUTC_UNLOCKED = 0x8D8 // 2264 SYS_PUTCHAR_UNLOCKED = 0x8D9 // 2265 SYS_SNPRINTF = 0x8DA // 2266 SYS_VSNPRINTF = 0x8DB // 2267 SYS_DLOPEN = 0x8DD // 2269 SYS_DLSYM = 0x8DE // 2270 SYS_DLCLOSE = 0x8DF // 2271 SYS_DLERROR = 0x8E0 // 2272 SYS___SET_EXCEPTION_HANDLER = 0x8E2 // 2274 SYS___RESET_EXCEPTION_HANDLER = 0x8E3 // 2275 SYS___VHM_EVENT = 0x8E4 // 2276 SYS___ABS_H = 0x8E6 // 2278 SYS___ABSF_H = 0x8E7 // 2279 SYS___ABSL_H = 0x8E8 // 2280 SYS___ACOS_H = 0x8E9 // 2281 SYS___ACOSF_H = 0x8EA // 2282 SYS___ACOSL_H = 0x8EB // 2283 SYS___ACOSH_H = 0x8EC // 2284 SYS___ASIN_H = 0x8ED // 2285 SYS___ASINF_H = 0x8EE // 2286 SYS___ASINL_H = 0x8EF // 2287 SYS___ASINH_H = 0x8F0 // 2288 SYS___ATAN_H = 0x8F1 // 2289 SYS___ATANF_H = 0x8F2 // 2290 SYS___ATANL_H = 0x8F3 // 2291 SYS___ATANH_H = 0x8F4 // 2292 SYS___ATANHF_H = 0x8F5 // 2293 SYS___ATANHL_H = 0x8F6 // 2294 SYS___ATAN2_H = 0x8F7 // 2295 SYS___ATAN2F_H = 0x8F8 // 2296 SYS___ATAN2L_H = 0x8F9 // 2297 SYS___CBRT_H = 0x8FA // 2298 SYS___COPYSIGNF_H = 0x8FB // 2299 SYS___COPYSIGNL_H = 0x8FC // 2300 SYS___COS_H = 0x8FD // 2301 SYS___COSF_H = 0x8FE // 2302 SYS___COSL_H = 0x8FF // 2303 SYS___COSHF_H = 0x900 // 2304 SYS___COSHL_H = 0x901 // 2305 SYS___COTAN_H = 0x902 // 2306 SYS___COTANF_H = 0x903 // 2307 SYS___COTANL_H = 0x904 // 2308 SYS___ERF_H = 0x905 // 2309 SYS___ERFF_H = 0x906 // 2310 SYS___ERFL_H = 0x907 // 2311 SYS___ERFC_H = 0x908 // 2312 SYS___ERFCF_H = 0x909 // 2313 SYS___ERFCL_H = 0x90A // 2314 SYS___EXP_H = 0x90B // 2315 SYS___EXPF_H = 0x90C // 2316 SYS___EXPL_H = 0x90D // 2317 SYS___EXPM1_H = 0x90E // 2318 SYS___FDIM_H = 0x90F // 2319 SYS___FDIMF_H = 0x910 // 2320 SYS___FDIML_H = 0x911 // 2321 SYS___FMOD_H = 0x912 // 2322 SYS___FMODF_H = 0x913 // 2323 SYS___FMODL_H = 0x914 // 2324 SYS___GAMMA_H = 0x915 // 2325 SYS___HYPOT_H = 0x916 // 2326 SYS___ILOGB_H = 0x917 // 2327 SYS___LGAMMA_H = 0x918 // 2328 SYS___LGAMMAF_H = 0x919 // 2329 SYS___LOG_H = 0x91A // 2330 SYS___LOGF_H = 0x91B // 2331 SYS___LOGL_H = 0x91C // 2332 SYS___LOGB_H = 0x91D // 2333 SYS___LOG2_H = 0x91E // 2334 SYS___LOG2F_H = 0x91F // 2335 SYS___LOG2L_H = 0x920 // 2336 SYS___LOG1P_H = 0x921 // 2337 SYS___LOG10_H = 0x922 // 2338 SYS___LOG10F_H = 0x923 // 2339 SYS___LOG10L_H = 0x924 // 2340 SYS___LROUND_H = 0x925 // 2341 SYS___LROUNDF_H = 0x926 // 2342 SYS___NEXTAFTER_H = 0x927 // 2343 SYS___POW_H = 0x928 // 2344 SYS___POWF_H = 0x929 // 2345 SYS___POWL_H = 0x92A // 2346 SYS___REMAINDER_H = 0x92B // 2347 SYS___RINT_H = 0x92C // 2348 SYS___SCALB_H = 0x92D // 2349 SYS___SIN_H = 0x92E // 2350 SYS___SINF_H = 0x92F // 2351 SYS___SINL_H = 0x930 // 2352 SYS___SINH_H = 0x931 // 2353 SYS___SINHF_H = 0x932 // 2354 SYS___SINHL_H = 0x933 // 2355 SYS___SQRT_H = 0x934 // 2356 SYS___SQRTF_H = 0x935 // 2357 SYS___SQRTL_H = 0x936 // 2358 SYS___TAN_H = 0x937 // 2359 SYS___TANF_H = 0x938 // 2360 SYS___TANL_H = 0x939 // 2361 SYS___TANH_H = 0x93A // 2362 SYS___TANHF_H = 0x93B // 2363 SYS___TANHL_H = 0x93C // 2364 SYS___TGAMMA_H = 0x93D // 2365 SYS___TGAMMAF_H = 0x93E // 2366 SYS___TRUNC_H = 0x93F // 2367 SYS___TRUNCF_H = 0x940 // 2368 SYS___TRUNCL_H = 0x941 // 2369 SYS___COSH_H = 0x942 // 2370 SYS___LE_DEBUG_SET_RESUME_MCH = 0x943 // 2371 SYS_VFSCANF = 0x944 // 2372 SYS_VSCANF = 0x946 // 2374 SYS_VSSCANF = 0x948 // 2376 SYS_VFWSCANF = 0x94A // 2378 SYS_VWSCANF = 0x94C // 2380 SYS_VSWSCANF = 0x94E // 2382 SYS_IMAXABS = 0x950 // 2384 SYS_IMAXDIV = 0x951 // 2385 SYS_STRTOIMAX = 0x952 // 2386 SYS_STRTOUMAX = 0x953 // 2387 SYS_WCSTOIMAX = 0x954 // 2388 SYS_WCSTOUMAX = 0x955 // 2389 SYS_ATOLL = 0x956 // 2390 SYS_STRTOF = 0x957 // 2391 SYS_STRTOLD = 0x958 // 2392 SYS_WCSTOF = 0x959 // 2393 SYS_WCSTOLD = 0x95A // 2394 SYS_INET6_RTH_SPACE = 0x95B // 2395 SYS_INET6_RTH_INIT = 0x95C // 2396 SYS_INET6_RTH_ADD = 0x95D // 2397 SYS_INET6_RTH_REVERSE = 0x95E // 2398 SYS_INET6_RTH_SEGMENTS = 0x95F // 2399 SYS_INET6_RTH_GETADDR = 0x960 // 2400 SYS_INET6_OPT_INIT = 0x961 // 2401 SYS_INET6_OPT_APPEND = 0x962 // 2402 SYS_INET6_OPT_FINISH = 0x963 // 2403 SYS_INET6_OPT_SET_VAL = 0x964 // 2404 SYS_INET6_OPT_NEXT = 0x965 // 2405 SYS_INET6_OPT_FIND = 0x966 // 2406 SYS_INET6_OPT_GET_VAL = 0x967 // 2407 SYS___POW_I = 0x987 // 2439 SYS___POW_I_B = 0x988 // 2440 SYS___POW_I_H = 0x989 // 2441 SYS___POW_II = 0x98A // 2442 SYS___POW_II_B = 0x98B // 2443 SYS___POW_II_H = 0x98C // 2444 SYS_CABS = 0x98E // 2446 SYS___CABS_B = 0x98F // 2447 SYS___CABS_H = 0x990 // 2448 SYS_CABSF = 0x991 // 2449 SYS___CABSF_B = 0x992 // 2450 SYS___CABSF_H = 0x993 // 2451 SYS_CABSL = 0x994 // 2452 SYS___CABSL_B = 0x995 // 2453 SYS___CABSL_H = 0x996 // 2454 SYS_CACOS = 0x997 // 2455 SYS___CACOS_B = 0x998 // 2456 SYS___CACOS_H = 0x999 // 2457 SYS_CACOSF = 0x99A // 2458 SYS___CACOSF_B = 0x99B // 2459 SYS___CACOSF_H = 0x99C // 2460 SYS_CACOSL = 0x99D // 2461 SYS___CACOSL_B = 0x99E // 2462 SYS___CACOSL_H = 0x99F // 2463 SYS_CACOSH = 0x9A0 // 2464 SYS___CACOSH_B = 0x9A1 // 2465 SYS___CACOSH_H = 0x9A2 // 2466 SYS_CACOSHF = 0x9A3 // 2467 SYS___CACOSHF_B = 0x9A4 // 2468 SYS___CACOSHF_H = 0x9A5 // 2469 SYS_CACOSHL = 0x9A6 // 2470 SYS___CACOSHL_B = 0x9A7 // 2471 SYS___CACOSHL_H = 0x9A8 // 2472 SYS_CARG = 0x9A9 // 2473 SYS___CARG_B = 0x9AA // 2474 SYS___CARG_H = 0x9AB // 2475 SYS_CARGF = 0x9AC // 2476 SYS___CARGF_B = 0x9AD // 2477 SYS___CARGF_H = 0x9AE // 2478 SYS_CARGL = 0x9AF // 2479 SYS___CARGL_B = 0x9B0 // 2480 SYS___CARGL_H = 0x9B1 // 2481 SYS_CASIN = 0x9B2 // 2482 SYS___CASIN_B = 0x9B3 // 2483 SYS___CASIN_H = 0x9B4 // 2484 SYS_CASINF = 0x9B5 // 2485 SYS___CASINF_B = 0x9B6 // 2486 SYS___CASINF_H = 0x9B7 // 2487 SYS_CASINL = 0x9B8 // 2488 SYS___CASINL_B = 0x9B9 // 2489 SYS___CASINL_H = 0x9BA // 2490 SYS_CASINH = 0x9BB // 2491 SYS___CASINH_B = 0x9BC // 2492 SYS___CASINH_H = 0x9BD // 2493 SYS_CASINHF = 0x9BE // 2494 SYS___CASINHF_B = 0x9BF // 2495 SYS___CASINHF_H = 0x9C0 // 2496 SYS_CASINHL = 0x9C1 // 2497 SYS___CASINHL_B = 0x9C2 // 2498 SYS___CASINHL_H = 0x9C3 // 2499 SYS_CATAN = 0x9C4 // 2500 SYS___CATAN_B = 0x9C5 // 2501 SYS___CATAN_H = 0x9C6 // 2502 SYS_CATANF = 0x9C7 // 2503 SYS___CATANF_B = 0x9C8 // 2504 SYS___CATANF_H = 0x9C9 // 2505 SYS_CATANL = 0x9CA // 2506 SYS___CATANL_B = 0x9CB // 2507 SYS___CATANL_H = 0x9CC // 2508 SYS_CATANH = 0x9CD // 2509 SYS___CATANH_B = 0x9CE // 2510 SYS___CATANH_H = 0x9CF // 2511 SYS_CATANHF = 0x9D0 // 2512 SYS___CATANHF_B = 0x9D1 // 2513 SYS___CATANHF_H = 0x9D2 // 2514 SYS_CATANHL = 0x9D3 // 2515 SYS___CATANHL_B = 0x9D4 // 2516 SYS___CATANHL_H = 0x9D5 // 2517 SYS_CCOS = 0x9D6 // 2518 SYS___CCOS_B = 0x9D7 // 2519 SYS___CCOS_H = 0x9D8 // 2520 SYS_CCOSF = 0x9D9 // 2521 SYS___CCOSF_B = 0x9DA // 2522 SYS___CCOSF_H = 0x9DB // 2523 SYS_CCOSL = 0x9DC // 2524 SYS___CCOSL_B = 0x9DD // 2525 SYS___CCOSL_H = 0x9DE // 2526 SYS_CCOSH = 0x9DF // 2527 SYS___CCOSH_B = 0x9E0 // 2528 SYS___CCOSH_H = 0x9E1 // 2529 SYS_CCOSHF = 0x9E2 // 2530 SYS___CCOSHF_B = 0x9E3 // 2531 SYS___CCOSHF_H = 0x9E4 // 2532 SYS_CCOSHL = 0x9E5 // 2533 SYS___CCOSHL_B = 0x9E6 // 2534 SYS___CCOSHL_H = 0x9E7 // 2535 SYS_CEXP = 0x9E8 // 2536 SYS___CEXP_B = 0x9E9 // 2537 SYS___CEXP_H = 0x9EA // 2538 SYS_CEXPF = 0x9EB // 2539 SYS___CEXPF_B = 0x9EC // 2540 SYS___CEXPF_H = 0x9ED // 2541 SYS_CEXPL = 0x9EE // 2542 SYS___CEXPL_B = 0x9EF // 2543 SYS___CEXPL_H = 0x9F0 // 2544 SYS_CIMAG = 0x9F1 // 2545 SYS___CIMAG_B = 0x9F2 // 2546 SYS___CIMAG_H = 0x9F3 // 2547 SYS_CIMAGF = 0x9F4 // 2548 SYS___CIMAGF_B = 0x9F5 // 2549 SYS___CIMAGF_H = 0x9F6 // 2550 SYS_CIMAGL = 0x9F7 // 2551 SYS___CIMAGL_B = 0x9F8 // 2552 SYS___CIMAGL_H = 0x9F9 // 2553 SYS___CLOG = 0x9FA // 2554 SYS___CLOG_B = 0x9FB // 2555 SYS___CLOG_H = 0x9FC // 2556 SYS_CLOGF = 0x9FD // 2557 SYS___CLOGF_B = 0x9FE // 2558 SYS___CLOGF_H = 0x9FF // 2559 SYS_CLOGL = 0xA00 // 2560 SYS___CLOGL_B = 0xA01 // 2561 SYS___CLOGL_H = 0xA02 // 2562 SYS_CONJ = 0xA03 // 2563 SYS___CONJ_B = 0xA04 // 2564 SYS___CONJ_H = 0xA05 // 2565 SYS_CONJF = 0xA06 // 2566 SYS___CONJF_B = 0xA07 // 2567 SYS___CONJF_H = 0xA08 // 2568 SYS_CONJL = 0xA09 // 2569 SYS___CONJL_B = 0xA0A // 2570 SYS___CONJL_H = 0xA0B // 2571 SYS_CPOW = 0xA0C // 2572 SYS___CPOW_B = 0xA0D // 2573 SYS___CPOW_H = 0xA0E // 2574 SYS_CPOWF = 0xA0F // 2575 SYS___CPOWF_B = 0xA10 // 2576 SYS___CPOWF_H = 0xA11 // 2577 SYS_CPOWL = 0xA12 // 2578 SYS___CPOWL_B = 0xA13 // 2579 SYS___CPOWL_H = 0xA14 // 2580 SYS_CPROJ = 0xA15 // 2581 SYS___CPROJ_B = 0xA16 // 2582 SYS___CPROJ_H = 0xA17 // 2583 SYS_CPROJF = 0xA18 // 2584 SYS___CPROJF_B = 0xA19 // 2585 SYS___CPROJF_H = 0xA1A // 2586 SYS_CPROJL = 0xA1B // 2587 SYS___CPROJL_B = 0xA1C // 2588 SYS___CPROJL_H = 0xA1D // 2589 SYS_CREAL = 0xA1E // 2590 SYS___CREAL_B = 0xA1F // 2591 SYS___CREAL_H = 0xA20 // 2592 SYS_CREALF = 0xA21 // 2593 SYS___CREALF_B = 0xA22 // 2594 SYS___CREALF_H = 0xA23 // 2595 SYS_CREALL = 0xA24 // 2596 SYS___CREALL_B = 0xA25 // 2597 SYS___CREALL_H = 0xA26 // 2598 SYS_CSIN = 0xA27 // 2599 SYS___CSIN_B = 0xA28 // 2600 SYS___CSIN_H = 0xA29 // 2601 SYS_CSINF = 0xA2A // 2602 SYS___CSINF_B = 0xA2B // 2603 SYS___CSINF_H = 0xA2C // 2604 SYS_CSINL = 0xA2D // 2605 SYS___CSINL_B = 0xA2E // 2606 SYS___CSINL_H = 0xA2F // 2607 SYS_CSINH = 0xA30 // 2608 SYS___CSINH_B = 0xA31 // 2609 SYS___CSINH_H = 0xA32 // 2610 SYS_CSINHF = 0xA33 // 2611 SYS___CSINHF_B = 0xA34 // 2612 SYS___CSINHF_H = 0xA35 // 2613 SYS_CSINHL = 0xA36 // 2614 SYS___CSINHL_B = 0xA37 // 2615 SYS___CSINHL_H = 0xA38 // 2616 SYS_CSQRT = 0xA39 // 2617 SYS___CSQRT_B = 0xA3A // 2618 SYS___CSQRT_H = 0xA3B // 2619 SYS_CSQRTF = 0xA3C // 2620 SYS___CSQRTF_B = 0xA3D // 2621 SYS___CSQRTF_H = 0xA3E // 2622 SYS_CSQRTL = 0xA3F // 2623 SYS___CSQRTL_B = 0xA40 // 2624 SYS___CSQRTL_H = 0xA41 // 2625 SYS_CTAN = 0xA42 // 2626 SYS___CTAN_B = 0xA43 // 2627 SYS___CTAN_H = 0xA44 // 2628 SYS_CTANF = 0xA45 // 2629 SYS___CTANF_B = 0xA46 // 2630 SYS___CTANF_H = 0xA47 // 2631 SYS_CTANL = 0xA48 // 2632 SYS___CTANL_B = 0xA49 // 2633 SYS___CTANL_H = 0xA4A // 2634 SYS_CTANH = 0xA4B // 2635 SYS___CTANH_B = 0xA4C // 2636 SYS___CTANH_H = 0xA4D // 2637 SYS_CTANHF = 0xA4E // 2638 SYS___CTANHF_B = 0xA4F // 2639 SYS___CTANHF_H = 0xA50 // 2640 SYS_CTANHL = 0xA51 // 2641 SYS___CTANHL_B = 0xA52 // 2642 SYS___CTANHL_H = 0xA53 // 2643 SYS___ACOSHF_H = 0xA54 // 2644 SYS___ACOSHL_H = 0xA55 // 2645 SYS___ASINHF_H = 0xA56 // 2646 SYS___ASINHL_H = 0xA57 // 2647 SYS___CBRTF_H = 0xA58 // 2648 SYS___CBRTL_H = 0xA59 // 2649 SYS___COPYSIGN_B = 0xA5A // 2650 SYS___EXPM1F_H = 0xA5B // 2651 SYS___EXPM1L_H = 0xA5C // 2652 SYS___EXP2_H = 0xA5D // 2653 SYS___EXP2F_H = 0xA5E // 2654 SYS___EXP2L_H = 0xA5F // 2655 SYS___LOG1PF_H = 0xA60 // 2656 SYS___LOG1PL_H = 0xA61 // 2657 SYS___LGAMMAL_H = 0xA62 // 2658 SYS_FMA = 0xA63 // 2659 SYS___FMA_B = 0xA64 // 2660 SYS___FMA_H = 0xA65 // 2661 SYS_FMAF = 0xA66 // 2662 SYS___FMAF_B = 0xA67 // 2663 SYS___FMAF_H = 0xA68 // 2664 SYS_FMAL = 0xA69 // 2665 SYS___FMAL_B = 0xA6A // 2666 SYS___FMAL_H = 0xA6B // 2667 SYS_FMAX = 0xA6C // 2668 SYS___FMAX_B = 0xA6D // 2669 SYS___FMAX_H = 0xA6E // 2670 SYS_FMAXF = 0xA6F // 2671 SYS___FMAXF_B = 0xA70 // 2672 SYS___FMAXF_H = 0xA71 // 2673 SYS_FMAXL = 0xA72 // 2674 SYS___FMAXL_B = 0xA73 // 2675 SYS___FMAXL_H = 0xA74 // 2676 SYS_FMIN = 0xA75 // 2677 SYS___FMIN_B = 0xA76 // 2678 SYS___FMIN_H = 0xA77 // 2679 SYS_FMINF = 0xA78 // 2680 SYS___FMINF_B = 0xA79 // 2681 SYS___FMINF_H = 0xA7A // 2682 SYS_FMINL = 0xA7B // 2683 SYS___FMINL_B = 0xA7C // 2684 SYS___FMINL_H = 0xA7D // 2685 SYS_ILOGBF = 0xA7E // 2686 SYS___ILOGBF_B = 0xA7F // 2687 SYS___ILOGBF_H = 0xA80 // 2688 SYS_ILOGBL = 0xA81 // 2689 SYS___ILOGBL_B = 0xA82 // 2690 SYS___ILOGBL_H = 0xA83 // 2691 SYS_LLRINT = 0xA84 // 2692 SYS___LLRINT_B = 0xA85 // 2693 SYS___LLRINT_H = 0xA86 // 2694 SYS_LLRINTF = 0xA87 // 2695 SYS___LLRINTF_B = 0xA88 // 2696 SYS___LLRINTF_H = 0xA89 // 2697 SYS_LLRINTL = 0xA8A // 2698 SYS___LLRINTL_B = 0xA8B // 2699 SYS___LLRINTL_H = 0xA8C // 2700 SYS_LLROUND = 0xA8D // 2701 SYS___LLROUND_B = 0xA8E // 2702 SYS___LLROUND_H = 0xA8F // 2703 SYS_LLROUNDF = 0xA90 // 2704 SYS___LLROUNDF_B = 0xA91 // 2705 SYS___LLROUNDF_H = 0xA92 // 2706 SYS_LLROUNDL = 0xA93 // 2707 SYS___LLROUNDL_B = 0xA94 // 2708 SYS___LLROUNDL_H = 0xA95 // 2709 SYS_LOGBF = 0xA96 // 2710 SYS___LOGBF_B = 0xA97 // 2711 SYS___LOGBF_H = 0xA98 // 2712 SYS_LOGBL = 0xA99 // 2713 SYS___LOGBL_B = 0xA9A // 2714 SYS___LOGBL_H = 0xA9B // 2715 SYS_LRINT = 0xA9C // 2716 SYS___LRINT_B = 0xA9D // 2717 SYS___LRINT_H = 0xA9E // 2718 SYS_LRINTF = 0xA9F // 2719 SYS___LRINTF_B = 0xAA0 // 2720 SYS___LRINTF_H = 0xAA1 // 2721 SYS_LRINTL = 0xAA2 // 2722 SYS___LRINTL_B = 0xAA3 // 2723 SYS___LRINTL_H = 0xAA4 // 2724 SYS_LROUNDL = 0xAA5 // 2725 SYS___LROUNDL_B = 0xAA6 // 2726 SYS___LROUNDL_H = 0xAA7 // 2727 SYS_NAN = 0xAA8 // 2728 SYS___NAN_B = 0xAA9 // 2729 SYS_NANF = 0xAAA // 2730 SYS___NANF_B = 0xAAB // 2731 SYS_NANL = 0xAAC // 2732 SYS___NANL_B = 0xAAD // 2733 SYS_NEARBYINT = 0xAAE // 2734 SYS___NEARBYINT_B = 0xAAF // 2735 SYS___NEARBYINT_H = 0xAB0 // 2736 SYS_NEARBYINTF = 0xAB1 // 2737 SYS___NEARBYINTF_B = 0xAB2 // 2738 SYS___NEARBYINTF_H = 0xAB3 // 2739 SYS_NEARBYINTL = 0xAB4 // 2740 SYS___NEARBYINTL_B = 0xAB5 // 2741 SYS___NEARBYINTL_H = 0xAB6 // 2742 SYS_NEXTAFTERF = 0xAB7 // 2743 SYS___NEXTAFTERF_B = 0xAB8 // 2744 SYS___NEXTAFTERF_H = 0xAB9 // 2745 SYS_NEXTAFTERL = 0xABA // 2746 SYS___NEXTAFTERL_B = 0xABB // 2747 SYS___NEXTAFTERL_H = 0xABC // 2748 SYS_NEXTTOWARD = 0xABD // 2749 SYS___NEXTTOWARD_B = 0xABE // 2750 SYS___NEXTTOWARD_H = 0xABF // 2751 SYS_NEXTTOWARDF = 0xAC0 // 2752 SYS___NEXTTOWARDF_B = 0xAC1 // 2753 SYS___NEXTTOWARDF_H = 0xAC2 // 2754 SYS_NEXTTOWARDL = 0xAC3 // 2755 SYS___NEXTTOWARDL_B = 0xAC4 // 2756 SYS___NEXTTOWARDL_H = 0xAC5 // 2757 SYS___REMAINDERF_H = 0xAC6 // 2758 SYS___REMAINDERL_H = 0xAC7 // 2759 SYS___REMQUO_H = 0xAC8 // 2760 SYS___REMQUOF_H = 0xAC9 // 2761 SYS___REMQUOL_H = 0xACA // 2762 SYS_RINTF = 0xACB // 2763 SYS___RINTF_B = 0xACC // 2764 SYS_RINTL = 0xACD // 2765 SYS___RINTL_B = 0xACE // 2766 SYS_ROUND = 0xACF // 2767 SYS___ROUND_B = 0xAD0 // 2768 SYS___ROUND_H = 0xAD1 // 2769 SYS_ROUNDF = 0xAD2 // 2770 SYS___ROUNDF_B = 0xAD3 // 2771 SYS___ROUNDF_H = 0xAD4 // 2772 SYS_ROUNDL = 0xAD5 // 2773 SYS___ROUNDL_B = 0xAD6 // 2774 SYS___ROUNDL_H = 0xAD7 // 2775 SYS_SCALBLN = 0xAD8 // 2776 SYS___SCALBLN_B = 0xAD9 // 2777 SYS___SCALBLN_H = 0xADA // 2778 SYS_SCALBLNF = 0xADB // 2779 SYS___SCALBLNF_B = 0xADC // 2780 SYS___SCALBLNF_H = 0xADD // 2781 SYS_SCALBLNL = 0xADE // 2782 SYS___SCALBLNL_B = 0xADF // 2783 SYS___SCALBLNL_H = 0xAE0 // 2784 SYS___SCALBN_B = 0xAE1 // 2785 SYS___SCALBN_H = 0xAE2 // 2786 SYS_SCALBNF = 0xAE3 // 2787 SYS___SCALBNF_B = 0xAE4 // 2788 SYS___SCALBNF_H = 0xAE5 // 2789 SYS_SCALBNL = 0xAE6 // 2790 SYS___SCALBNL_B = 0xAE7 // 2791 SYS___SCALBNL_H = 0xAE8 // 2792 SYS___TGAMMAL_H = 0xAE9 // 2793 SYS_FECLEAREXCEPT = 0xAEA // 2794 SYS_FEGETENV = 0xAEB // 2795 SYS_FEGETEXCEPTFLAG = 0xAEC // 2796 SYS_FEGETROUND = 0xAED // 2797 SYS_FEHOLDEXCEPT = 0xAEE // 2798 SYS_FERAISEEXCEPT = 0xAEF // 2799 SYS_FESETENV = 0xAF0 // 2800 SYS_FESETEXCEPTFLAG = 0xAF1 // 2801 SYS_FESETROUND = 0xAF2 // 2802 SYS_FETESTEXCEPT = 0xAF3 // 2803 SYS_FEUPDATEENV = 0xAF4 // 2804 SYS___COPYSIGN_H = 0xAF5 // 2805 SYS___HYPOTF_H = 0xAF6 // 2806 SYS___HYPOTL_H = 0xAF7 // 2807 SYS___CLASS = 0xAFA // 2810 SYS___CLASS_B = 0xAFB // 2811 SYS___CLASS_H = 0xAFC // 2812 SYS___ISBLANK_A = 0xB2E // 2862 SYS___ISWBLANK_A = 0xB2F // 2863 SYS___LROUND_FIXUP = 0xB30 // 2864 SYS___LROUNDF_FIXUP = 0xB31 // 2865 SYS_SCHED_YIELD = 0xB32 // 2866 SYS_STRERROR_R = 0xB33 // 2867 SYS_UNSETENV = 0xB34 // 2868 SYS___LGAMMA_H_C99 = 0xB38 // 2872 SYS___LGAMMA_B_C99 = 0xB39 // 2873 SYS___LGAMMA_R_C99 = 0xB3A // 2874 SYS___FTELL2 = 0xB3B // 2875 SYS___FSEEK2 = 0xB3C // 2876 SYS___STATIC_REINIT = 0xB3D // 2877 SYS_PTHREAD_ATTR_GETSTACK = 0xB3E // 2878 SYS_PTHREAD_ATTR_SETSTACK = 0xB3F // 2879 SYS___TGAMMA_H_C99 = 0xB78 // 2936 SYS___TGAMMAF_H_C99 = 0xB79 // 2937 SYS___LE_TRACEBACK = 0xB7A // 2938 SYS___MUST_STAY_CLEAN = 0xB7C // 2940 SYS___O_ENV = 0xB7D // 2941 SYS_ACOSD32 = 0xB7E // 2942 SYS_ACOSD64 = 0xB7F // 2943 SYS_ACOSD128 = 0xB80 // 2944 SYS_ACOSHD32 = 0xB81 // 2945 SYS_ACOSHD64 = 0xB82 // 2946 SYS_ACOSHD128 = 0xB83 // 2947 SYS_ASIND32 = 0xB84 // 2948 SYS_ASIND64 = 0xB85 // 2949 SYS_ASIND128 = 0xB86 // 2950 SYS_ASINHD32 = 0xB87 // 2951 SYS_ASINHD64 = 0xB88 // 2952 SYS_ASINHD128 = 0xB89 // 2953 SYS_ATAND32 = 0xB8A // 2954 SYS_ATAND64 = 0xB8B // 2955 SYS_ATAND128 = 0xB8C // 2956 SYS_ATAN2D32 = 0xB8D // 2957 SYS_ATAN2D64 = 0xB8E // 2958 SYS_ATAN2D128 = 0xB8F // 2959 SYS_ATANHD32 = 0xB90 // 2960 SYS_ATANHD64 = 0xB91 // 2961 SYS_ATANHD128 = 0xB92 // 2962 SYS_CBRTD32 = 0xB93 // 2963 SYS_CBRTD64 = 0xB94 // 2964 SYS_CBRTD128 = 0xB95 // 2965 SYS_CEILD32 = 0xB96 // 2966 SYS_CEILD64 = 0xB97 // 2967 SYS_CEILD128 = 0xB98 // 2968 SYS___CLASS2 = 0xB99 // 2969 SYS___CLASS2_B = 0xB9A // 2970 SYS___CLASS2_H = 0xB9B // 2971 SYS_COPYSIGND32 = 0xB9C // 2972 SYS_COPYSIGND64 = 0xB9D // 2973 SYS_COPYSIGND128 = 0xB9E // 2974 SYS_COSD32 = 0xB9F // 2975 SYS_COSD64 = 0xBA0 // 2976 SYS_COSD128 = 0xBA1 // 2977 SYS_COSHD32 = 0xBA2 // 2978 SYS_COSHD64 = 0xBA3 // 2979 SYS_COSHD128 = 0xBA4 // 2980 SYS_ERFD32 = 0xBA5 // 2981 SYS_ERFD64 = 0xBA6 // 2982 SYS_ERFD128 = 0xBA7 // 2983 SYS_ERFCD32 = 0xBA8 // 2984 SYS_ERFCD64 = 0xBA9 // 2985 SYS_ERFCD128 = 0xBAA // 2986 SYS_EXPD32 = 0xBAB // 2987 SYS_EXPD64 = 0xBAC // 2988 SYS_EXPD128 = 0xBAD // 2989 SYS_EXP2D32 = 0xBAE // 2990 SYS_EXP2D64 = 0xBAF // 2991 SYS_EXP2D128 = 0xBB0 // 2992 SYS_EXPM1D32 = 0xBB1 // 2993 SYS_EXPM1D64 = 0xBB2 // 2994 SYS_EXPM1D128 = 0xBB3 // 2995 SYS_FABSD32 = 0xBB4 // 2996 SYS_FABSD64 = 0xBB5 // 2997 SYS_FABSD128 = 0xBB6 // 2998 SYS_FDIMD32 = 0xBB7 // 2999 SYS_FDIMD64 = 0xBB8 // 3000 SYS_FDIMD128 = 0xBB9 // 3001 SYS_FE_DEC_GETROUND = 0xBBA // 3002 SYS_FE_DEC_SETROUND = 0xBBB // 3003 SYS_FLOORD32 = 0xBBC // 3004 SYS_FLOORD64 = 0xBBD // 3005 SYS_FLOORD128 = 0xBBE // 3006 SYS_FMAD32 = 0xBBF // 3007 SYS_FMAD64 = 0xBC0 // 3008 SYS_FMAD128 = 0xBC1 // 3009 SYS_FMAXD32 = 0xBC2 // 3010 SYS_FMAXD64 = 0xBC3 // 3011 SYS_FMAXD128 = 0xBC4 // 3012 SYS_FMIND32 = 0xBC5 // 3013 SYS_FMIND64 = 0xBC6 // 3014 SYS_FMIND128 = 0xBC7 // 3015 SYS_FMODD32 = 0xBC8 // 3016 SYS_FMODD64 = 0xBC9 // 3017 SYS_FMODD128 = 0xBCA // 3018 SYS___FP_CAST_D = 0xBCB // 3019 SYS_FREXPD32 = 0xBCC // 3020 SYS_FREXPD64 = 0xBCD // 3021 SYS_FREXPD128 = 0xBCE // 3022 SYS_HYPOTD32 = 0xBCF // 3023 SYS_HYPOTD64 = 0xBD0 // 3024 SYS_HYPOTD128 = 0xBD1 // 3025 SYS_ILOGBD32 = 0xBD2 // 3026 SYS_ILOGBD64 = 0xBD3 // 3027 SYS_ILOGBD128 = 0xBD4 // 3028 SYS_LDEXPD32 = 0xBD5 // 3029 SYS_LDEXPD64 = 0xBD6 // 3030 SYS_LDEXPD128 = 0xBD7 // 3031 SYS_LGAMMAD32 = 0xBD8 // 3032 SYS_LGAMMAD64 = 0xBD9 // 3033 SYS_LGAMMAD128 = 0xBDA // 3034 SYS_LLRINTD32 = 0xBDB // 3035 SYS_LLRINTD64 = 0xBDC // 3036 SYS_LLRINTD128 = 0xBDD // 3037 SYS_LLROUNDD32 = 0xBDE // 3038 SYS_LLROUNDD64 = 0xBDF // 3039 SYS_LLROUNDD128 = 0xBE0 // 3040 SYS_LOGD32 = 0xBE1 // 3041 SYS_LOGD64 = 0xBE2 // 3042 SYS_LOGD128 = 0xBE3 // 3043 SYS_LOG10D32 = 0xBE4 // 3044 SYS_LOG10D64 = 0xBE5 // 3045 SYS_LOG10D128 = 0xBE6 // 3046 SYS_LOG1PD32 = 0xBE7 // 3047 SYS_LOG1PD64 = 0xBE8 // 3048 SYS_LOG1PD128 = 0xBE9 // 3049 SYS_LOG2D32 = 0xBEA // 3050 SYS_LOG2D64 = 0xBEB // 3051 SYS_LOG2D128 = 0xBEC // 3052 SYS_LOGBD32 = 0xBED // 3053 SYS_LOGBD64 = 0xBEE // 3054 SYS_LOGBD128 = 0xBEF // 3055 SYS_LRINTD32 = 0xBF0 // 3056 SYS_LRINTD64 = 0xBF1 // 3057 SYS_LRINTD128 = 0xBF2 // 3058 SYS_LROUNDD32 = 0xBF3 // 3059 SYS_LROUNDD64 = 0xBF4 // 3060 SYS_LROUNDD128 = 0xBF5 // 3061 SYS_MODFD32 = 0xBF6 // 3062 SYS_MODFD64 = 0xBF7 // 3063 SYS_MODFD128 = 0xBF8 // 3064 SYS_NAND32 = 0xBF9 // 3065 SYS_NAND64 = 0xBFA // 3066 SYS_NAND128 = 0xBFB // 3067 SYS_NEARBYINTD32 = 0xBFC // 3068 SYS_NEARBYINTD64 = 0xBFD // 3069 SYS_NEARBYINTD128 = 0xBFE // 3070 SYS_NEXTAFTERD32 = 0xBFF // 3071 SYS_NEXTAFTERD64 = 0xC00 // 3072 SYS_NEXTAFTERD128 = 0xC01 // 3073 SYS_NEXTTOWARDD32 = 0xC02 // 3074 SYS_NEXTTOWARDD64 = 0xC03 // 3075 SYS_NEXTTOWARDD128 = 0xC04 // 3076 SYS_POWD32 = 0xC05 // 3077 SYS_POWD64 = 0xC06 // 3078 SYS_POWD128 = 0xC07 // 3079 SYS_QUANTIZED32 = 0xC08 // 3080 SYS_QUANTIZED64 = 0xC09 // 3081 SYS_QUANTIZED128 = 0xC0A // 3082 SYS_REMAINDERD32 = 0xC0B // 3083 SYS_REMAINDERD64 = 0xC0C // 3084 SYS_REMAINDERD128 = 0xC0D // 3085 SYS___REMQUOD32 = 0xC0E // 3086 SYS___REMQUOD64 = 0xC0F // 3087 SYS___REMQUOD128 = 0xC10 // 3088 SYS_RINTD32 = 0xC11 // 3089 SYS_RINTD64 = 0xC12 // 3090 SYS_RINTD128 = 0xC13 // 3091 SYS_ROUNDD32 = 0xC14 // 3092 SYS_ROUNDD64 = 0xC15 // 3093 SYS_ROUNDD128 = 0xC16 // 3094 SYS_SAMEQUANTUMD32 = 0xC17 // 3095 SYS_SAMEQUANTUMD64 = 0xC18 // 3096 SYS_SAMEQUANTUMD128 = 0xC19 // 3097 SYS_SCALBLND32 = 0xC1A // 3098 SYS_SCALBLND64 = 0xC1B // 3099 SYS_SCALBLND128 = 0xC1C // 3100 SYS_SCALBND32 = 0xC1D // 3101 SYS_SCALBND64 = 0xC1E // 3102 SYS_SCALBND128 = 0xC1F // 3103 SYS_SIND32 = 0xC20 // 3104 SYS_SIND64 = 0xC21 // 3105 SYS_SIND128 = 0xC22 // 3106 SYS_SINHD32 = 0xC23 // 3107 SYS_SINHD64 = 0xC24 // 3108 SYS_SINHD128 = 0xC25 // 3109 SYS_SQRTD32 = 0xC26 // 3110 SYS_SQRTD64 = 0xC27 // 3111 SYS_SQRTD128 = 0xC28 // 3112 SYS_STRTOD32 = 0xC29 // 3113 SYS_STRTOD64 = 0xC2A // 3114 SYS_STRTOD128 = 0xC2B // 3115 SYS_TAND32 = 0xC2C // 3116 SYS_TAND64 = 0xC2D // 3117 SYS_TAND128 = 0xC2E // 3118 SYS_TANHD32 = 0xC2F // 3119 SYS_TANHD64 = 0xC30 // 3120 SYS_TANHD128 = 0xC31 // 3121 SYS_TGAMMAD32 = 0xC32 // 3122 SYS_TGAMMAD64 = 0xC33 // 3123 SYS_TGAMMAD128 = 0xC34 // 3124 SYS_TRUNCD32 = 0xC3E // 3134 SYS_TRUNCD64 = 0xC3F // 3135 SYS_TRUNCD128 = 0xC40 // 3136 SYS_WCSTOD32 = 0xC41 // 3137 SYS_WCSTOD64 = 0xC42 // 3138 SYS_WCSTOD128 = 0xC43 // 3139 SYS___CODEPAGE_INFO = 0xC64 // 3172 SYS_POSIX_OPENPT = 0xC66 // 3174 SYS_PSELECT = 0xC67 // 3175 SYS_SOCKATMARK = 0xC68 // 3176 SYS_AIO_FSYNC = 0xC69 // 3177 SYS_LIO_LISTIO = 0xC6A // 3178 SYS___ATANPID32 = 0xC6B // 3179 SYS___ATANPID64 = 0xC6C // 3180 SYS___ATANPID128 = 0xC6D // 3181 SYS___COSPID32 = 0xC6E // 3182 SYS___COSPID64 = 0xC6F // 3183 SYS___COSPID128 = 0xC70 // 3184 SYS___SINPID32 = 0xC71 // 3185 SYS___SINPID64 = 0xC72 // 3186 SYS___SINPID128 = 0xC73 // 3187 SYS_SETIPV4SOURCEFILTER = 0xC76 // 3190 SYS_GETIPV4SOURCEFILTER = 0xC77 // 3191 SYS_SETSOURCEFILTER = 0xC78 // 3192 SYS_GETSOURCEFILTER = 0xC79 // 3193 SYS_FWRITE_UNLOCKED = 0xC7A // 3194 SYS_FREAD_UNLOCKED = 0xC7B // 3195 SYS_FGETS_UNLOCKED = 0xC7C // 3196 SYS_GETS_UNLOCKED = 0xC7D // 3197 SYS_FPUTS_UNLOCKED = 0xC7E // 3198 SYS_PUTS_UNLOCKED = 0xC7F // 3199 SYS_FGETC_UNLOCKED = 0xC80 // 3200 SYS_FPUTC_UNLOCKED = 0xC81 // 3201 SYS_DLADDR = 0xC82 // 3202 SYS_SHM_OPEN = 0xC8C // 3212 SYS_SHM_UNLINK = 0xC8D // 3213 SYS___CLASS2F = 0xC91 // 3217 SYS___CLASS2L = 0xC92 // 3218 SYS___CLASS2F_B = 0xC93 // 3219 SYS___CLASS2F_H = 0xC94 // 3220 SYS___CLASS2L_B = 0xC95 // 3221 SYS___CLASS2L_H = 0xC96 // 3222 SYS___CLASS2D32 = 0xC97 // 3223 SYS___CLASS2D64 = 0xC98 // 3224 SYS___CLASS2D128 = 0xC99 // 3225 SYS___TOCSNAME2 = 0xC9A // 3226 SYS___D1TOP = 0xC9B // 3227 SYS___D2TOP = 0xC9C // 3228 SYS___D4TOP = 0xC9D // 3229 SYS___PTOD1 = 0xC9E // 3230 SYS___PTOD2 = 0xC9F // 3231 SYS___PTOD4 = 0xCA0 // 3232 SYS_CLEARERR_UNLOCKED = 0xCA1 // 3233 SYS_FDELREC_UNLOCKED = 0xCA2 // 3234 SYS_FEOF_UNLOCKED = 0xCA3 // 3235 SYS_FERROR_UNLOCKED = 0xCA4 // 3236 SYS_FFLUSH_UNLOCKED = 0xCA5 // 3237 SYS_FGETPOS_UNLOCKED = 0xCA6 // 3238 SYS_FGETWC_UNLOCKED = 0xCA7 // 3239 SYS_FGETWS_UNLOCKED = 0xCA8 // 3240 SYS_FILENO_UNLOCKED = 0xCA9 // 3241 SYS_FLDATA_UNLOCKED = 0xCAA // 3242 SYS_FLOCATE_UNLOCKED = 0xCAB // 3243 SYS_FPRINTF_UNLOCKED = 0xCAC // 3244 SYS_FPUTWC_UNLOCKED = 0xCAD // 3245 SYS_FPUTWS_UNLOCKED = 0xCAE // 3246 SYS_FSCANF_UNLOCKED = 0xCAF // 3247 SYS_FSEEK_UNLOCKED = 0xCB0 // 3248 SYS_FSEEKO_UNLOCKED = 0xCB1 // 3249 SYS_FSETPOS_UNLOCKED = 0xCB3 // 3251 SYS_FTELL_UNLOCKED = 0xCB4 // 3252 SYS_FTELLO_UNLOCKED = 0xCB5 // 3253 SYS_FUPDATE_UNLOCKED = 0xCB7 // 3255 SYS_FWIDE_UNLOCKED = 0xCB8 // 3256 SYS_FWPRINTF_UNLOCKED = 0xCB9 // 3257 SYS_FWSCANF_UNLOCKED = 0xCBA // 3258 SYS_GETWC_UNLOCKED = 0xCBB // 3259 SYS_GETWCHAR_UNLOCKED = 0xCBC // 3260 SYS_PERROR_UNLOCKED = 0xCBD // 3261 SYS_PRINTF_UNLOCKED = 0xCBE // 3262 SYS_PUTWC_UNLOCKED = 0xCBF // 3263 SYS_PUTWCHAR_UNLOCKED = 0xCC0 // 3264 SYS_REWIND_UNLOCKED = 0xCC1 // 3265 SYS_SCANF_UNLOCKED = 0xCC2 // 3266 SYS_UNGETC_UNLOCKED = 0xCC3 // 3267 SYS_UNGETWC_UNLOCKED = 0xCC4 // 3268 SYS_VFPRINTF_UNLOCKED = 0xCC5 // 3269 SYS_VFSCANF_UNLOCKED = 0xCC7 // 3271 SYS_VFWPRINTF_UNLOCKED = 0xCC9 // 3273 SYS_VFWSCANF_UNLOCKED = 0xCCB // 3275 SYS_VPRINTF_UNLOCKED = 0xCCD // 3277 SYS_VSCANF_UNLOCKED = 0xCCF // 3279 SYS_VWPRINTF_UNLOCKED = 0xCD1 // 3281 SYS_VWSCANF_UNLOCKED = 0xCD3 // 3283 SYS_WPRINTF_UNLOCKED = 0xCD5 // 3285 SYS_WSCANF_UNLOCKED = 0xCD6 // 3286 SYS_ASCTIME64 = 0xCD7 // 3287 SYS_ASCTIME64_R = 0xCD8 // 3288 SYS_CTIME64 = 0xCD9 // 3289 SYS_CTIME64_R = 0xCDA // 3290 SYS_DIFFTIME64 = 0xCDB // 3291 SYS_GMTIME64 = 0xCDC // 3292 SYS_GMTIME64_R = 0xCDD // 3293 SYS_LOCALTIME64 = 0xCDE // 3294 SYS_LOCALTIME64_R = 0xCDF // 3295 SYS_MKTIME64 = 0xCE0 // 3296 SYS_TIME64 = 0xCE1 // 3297 SYS___LOGIN_APPLID = 0xCE2 // 3298 SYS___PASSWD_APPLID = 0xCE3 // 3299 SYS_PTHREAD_SECURITY_APPLID_NP = 0xCE4 // 3300 SYS___GETTHENT = 0xCE5 // 3301 SYS_FREEIFADDRS = 0xCE6 // 3302 SYS_GETIFADDRS = 0xCE7 // 3303 SYS_POSIX_FALLOCATE = 0xCE8 // 3304 SYS_POSIX_MEMALIGN = 0xCE9 // 3305 SYS_SIZEOF_ALLOC = 0xCEA // 3306 SYS_RESIZE_ALLOC = 0xCEB // 3307 SYS_FREAD_NOUPDATE = 0xCEC // 3308 SYS_FREAD_NOUPDATE_UNLOCKED = 0xCED // 3309 SYS_FGETPOS64 = 0xCEE // 3310 SYS_FSEEK64 = 0xCEF // 3311 SYS_FSEEKO64 = 0xCF0 // 3312 SYS_FSETPOS64 = 0xCF1 // 3313 SYS_FTELL64 = 0xCF2 // 3314 SYS_FTELLO64 = 0xCF3 // 3315 SYS_FGETPOS64_UNLOCKED = 0xCF4 // 3316 SYS_FSEEK64_UNLOCKED = 0xCF5 // 3317 SYS_FSEEKO64_UNLOCKED = 0xCF6 // 3318 SYS_FSETPOS64_UNLOCKED = 0xCF7 // 3319 SYS_FTELL64_UNLOCKED = 0xCF8 // 3320 SYS_FTELLO64_UNLOCKED = 0xCF9 // 3321 SYS_FOPEN_UNLOCKED = 0xCFA // 3322 SYS_FREOPEN_UNLOCKED = 0xCFB // 3323 SYS_FDOPEN_UNLOCKED = 0xCFC // 3324 SYS_TMPFILE_UNLOCKED = 0xCFD // 3325 SYS___MOSERVICES = 0xD3D // 3389 SYS___GETTOD = 0xD3E // 3390 SYS_C16RTOMB = 0xD40 // 3392 SYS_C32RTOMB = 0xD41 // 3393 SYS_MBRTOC16 = 0xD42 // 3394 SYS_MBRTOC32 = 0xD43 // 3395 SYS_QUANTEXPD32 = 0xD44 // 3396 SYS_QUANTEXPD64 = 0xD45 // 3397 SYS_QUANTEXPD128 = 0xD46 // 3398 SYS___LOCALE_CTL = 0xD47 // 3399 SYS___SMF_RECORD2 = 0xD48 // 3400 SYS_FOPEN64 = 0xD49 // 3401 SYS_FOPEN64_UNLOCKED = 0xD4A // 3402 SYS_FREOPEN64 = 0xD4B // 3403 SYS_FREOPEN64_UNLOCKED = 0xD4C // 3404 SYS_TMPFILE64 = 0xD4D // 3405 SYS_TMPFILE64_UNLOCKED = 0xD4E // 3406 SYS_GETDATE64 = 0xD4F // 3407 SYS_GETTIMEOFDAY64 = 0xD50 // 3408 SYS_BIND2ADDRSEL = 0xD59 // 3417 SYS_INET6_IS_SRCADDR = 0xD5A // 3418 SYS___GETGRGID1 = 0xD5B // 3419 SYS___GETGRNAM1 = 0xD5C // 3420 SYS___FBUFSIZE = 0xD60 // 3424 SYS___FPENDING = 0xD61 // 3425 SYS___FLBF = 0xD62 // 3426 SYS___FREADABLE = 0xD63 // 3427 SYS___FWRITABLE = 0xD64 // 3428 SYS___FREADING = 0xD65 // 3429 SYS___FWRITING = 0xD66 // 3430 SYS___FSETLOCKING = 0xD67 // 3431 SYS__FLUSHLBF = 0xD68 // 3432 SYS___FPURGE = 0xD69 // 3433 SYS___FREADAHEAD = 0xD6A // 3434 SYS___FSETERR = 0xD6B // 3435 SYS___FPENDING_UNLOCKED = 0xD6C // 3436 SYS___FREADING_UNLOCKED = 0xD6D // 3437 SYS___FWRITING_UNLOCKED = 0xD6E // 3438 SYS__FLUSHLBF_UNLOCKED = 0xD6F // 3439 SYS___FPURGE_UNLOCKED = 0xD70 // 3440 SYS___FREADAHEAD_UNLOCKED = 0xD71 // 3441 SYS___LE_CEEGTJS = 0xD72 // 3442 SYS___LE_RECORD_DUMP = 0xD73 // 3443 SYS_FSTAT64 = 0xD74 // 3444 SYS_LSTAT64 = 0xD75 // 3445 SYS_STAT64 = 0xD76 // 3446 SYS___READDIR2_64 = 0xD77 // 3447 SYS___OPEN_STAT64 = 0xD78 // 3448 SYS_FTW64 = 0xD79 // 3449 SYS_NFTW64 = 0xD7A // 3450 SYS_UTIME64 = 0xD7B // 3451 SYS_UTIMES64 = 0xD7C // 3452 SYS___GETIPC64 = 0xD7D // 3453 SYS_MSGCTL64 = 0xD7E // 3454 SYS_SEMCTL64 = 0xD7F // 3455 SYS_SHMCTL64 = 0xD80 // 3456 SYS_MSGXRCV64 = 0xD81 // 3457 SYS___MGXR64 = 0xD81 // 3457 SYS_W_GETPSENT64 = 0xD82 // 3458 SYS_PTHREAD_COND_TIMEDWAIT64 = 0xD83 // 3459 SYS_FTIME64 = 0xD85 // 3461 SYS_GETUTXENT64 = 0xD86 // 3462 SYS_GETUTXID64 = 0xD87 // 3463 SYS_GETUTXLINE64 = 0xD88 // 3464 SYS_PUTUTXLINE64 = 0xD89 // 3465 SYS_NEWLOCALE = 0xD8A // 3466 SYS_FREELOCALE = 0xD8B // 3467 SYS_USELOCALE = 0xD8C // 3468 SYS_DUPLOCALE = 0xD8D // 3469 SYS___CHATTR64 = 0xD9C // 3484 SYS___LCHATTR64 = 0xD9D // 3485 SYS___FCHATTR64 = 0xD9E // 3486 SYS_____CHATTR64_A = 0xD9F // 3487 SYS_____LCHATTR64_A = 0xDA0 // 3488 SYS___LE_CEEUSGD = 0xDA1 // 3489 SYS___LE_IFAM_CON = 0xDA2 // 3490 SYS___LE_IFAM_DSC = 0xDA3 // 3491 SYS___LE_IFAM_GET = 0xDA4 // 3492 SYS___LE_IFAM_QRY = 0xDA5 // 3493 SYS_ALIGNED_ALLOC = 0xDA6 // 3494 SYS_ACCEPT4 = 0xDA7 // 3495 SYS___ACCEPT4_A = 0xDA8 // 3496 SYS_COPYFILERANGE = 0xDA9 // 3497 SYS_GETLINE = 0xDAA // 3498 SYS___GETLINE_A = 0xDAB // 3499 SYS_DIRFD = 0xDAC // 3500 SYS_CLOCK_GETTIME = 0xDAD // 3501 SYS_DUP3 = 0xDAE // 3502 SYS_EPOLL_CREATE = 0xDAF // 3503 SYS_EPOLL_CREATE1 = 0xDB0 // 3504 SYS_EPOLL_CTL = 0xDB1 // 3505 SYS_EPOLL_WAIT = 0xDB2 // 3506 SYS_EPOLL_PWAIT = 0xDB3 // 3507 SYS_EVENTFD = 0xDB4 // 3508 SYS_STATFS = 0xDB5 // 3509 SYS___STATFS_A = 0xDB6 // 3510 SYS_FSTATFS = 0xDB7 // 3511 SYS_INOTIFY_INIT = 0xDB8 // 3512 SYS_INOTIFY_INIT1 = 0xDB9 // 3513 SYS_INOTIFY_ADD_WATCH = 0xDBA // 3514 SYS___INOTIFY_ADD_WATCH_A = 0xDBB // 3515 SYS_INOTIFY_RM_WATCH = 0xDBC // 3516 SYS_PIPE2 = 0xDBD // 3517 SYS_PIVOT_ROOT = 0xDBE // 3518 SYS___PIVOT_ROOT_A = 0xDBF // 3519 SYS_PRCTL = 0xDC0 // 3520 SYS_PRLIMIT = 0xDC1 // 3521 SYS_SETHOSTNAME = 0xDC2 // 3522 SYS___SETHOSTNAME_A = 0xDC3 // 3523 SYS_SETRESUID = 0xDC4 // 3524 SYS_SETRESGID = 0xDC5 // 3525 SYS_PTHREAD_CONDATTR_GETCLOCK = 0xDC6 // 3526 SYS_FLOCK = 0xDC7 // 3527 SYS_FGETXATTR = 0xDC8 // 3528 SYS___FGETXATTR_A = 0xDC9 // 3529 SYS_FLISTXATTR = 0xDCA // 3530 SYS___FLISTXATTR_A = 0xDCB // 3531 SYS_FREMOVEXATTR = 0xDCC // 3532 SYS___FREMOVEXATTR_A = 0xDCD // 3533 SYS_FSETXATTR = 0xDCE // 3534 SYS___FSETXATTR_A = 0xDCF // 3535 SYS_GETXATTR = 0xDD0 // 3536 SYS___GETXATTR_A = 0xDD1 // 3537 SYS_LGETXATTR = 0xDD2 // 3538 SYS___LGETXATTR_A = 0xDD3 // 3539 SYS_LISTXATTR = 0xDD4 // 3540 SYS___LISTXATTR_A = 0xDD5 // 3541 SYS_LLISTXATTR = 0xDD6 // 3542 SYS___LLISTXATTR_A = 0xDD7 // 3543 SYS_LREMOVEXATTR = 0xDD8 // 3544 SYS___LREMOVEXATTR_A = 0xDD9 // 3545 SYS_LSETXATTR = 0xDDA // 3546 SYS___LSETXATTR_A = 0xDDB // 3547 SYS_REMOVEXATTR = 0xDDC // 3548 SYS___REMOVEXATTR_A = 0xDDD // 3549 SYS_SETXATTR = 0xDDE // 3550 SYS___SETXATTR_A = 0xDDF // 3551 SYS_FDATASYNC = 0xDE0 // 3552 SYS_SYNCFS = 0xDE1 // 3553 SYS_FUTIMES = 0xDE2 // 3554 SYS_FUTIMESAT = 0xDE3 // 3555 SYS___FUTIMESAT_A = 0xDE4 // 3556 SYS_LUTIMES = 0xDE5 // 3557 SYS___LUTIMES_A = 0xDE6 // 3558 SYS_INET_ATON = 0xDE7 // 3559 SYS_GETRANDOM = 0xDE8 // 3560 SYS_GETTID = 0xDE9 // 3561 SYS_MEMFD_CREATE = 0xDEA // 3562 SYS___MEMFD_CREATE_A = 0xDEB // 3563 SYS_FACCESSAT = 0xDEC // 3564 SYS___FACCESSAT_A = 0xDED // 3565 SYS_FCHMODAT = 0xDEE // 3566 SYS___FCHMODAT_A = 0xDEF // 3567 SYS_FCHOWNAT = 0xDF0 // 3568 SYS___FCHOWNAT_A = 0xDF1 // 3569 SYS_FSTATAT = 0xDF2 // 3570 SYS___FSTATAT_A = 0xDF3 // 3571 SYS_LINKAT = 0xDF4 // 3572 SYS___LINKAT_A = 0xDF5 // 3573 SYS_MKDIRAT = 0xDF6 // 3574 SYS___MKDIRAT_A = 0xDF7 // 3575 SYS_MKFIFOAT = 0xDF8 // 3576 SYS___MKFIFOAT_A = 0xDF9 // 3577 SYS_MKNODAT = 0xDFA // 3578 SYS___MKNODAT_A = 0xDFB // 3579 SYS_OPENAT = 0xDFC // 3580 SYS___OPENAT_A = 0xDFD // 3581 SYS_READLINKAT = 0xDFE // 3582 SYS___READLINKAT_A = 0xDFF // 3583 SYS_RENAMEAT = 0xE00 // 3584 SYS___RENAMEAT_A = 0xE01 // 3585 SYS_RENAMEAT2 = 0xE02 // 3586 SYS___RENAMEAT2_A = 0xE03 // 3587 SYS_SYMLINKAT = 0xE04 // 3588 SYS___SYMLINKAT_A = 0xE05 // 3589 SYS_UNLINKAT = 0xE06 // 3590 SYS___UNLINKAT_A = 0xE07 // 3591 SYS_SYSINFO = 0xE08 // 3592 SYS_WAIT4 = 0xE0A // 3594 SYS_CLONE = 0xE0B // 3595 SYS_UNSHARE = 0xE0C // 3596 SYS_SETNS = 0xE0D // 3597 SYS_CAPGET = 0xE0E // 3598 SYS_CAPSET = 0xE0F // 3599 SYS_STRCHRNUL = 0xE10 // 3600 SYS_PTHREAD_CONDATTR_SETCLOCK = 0xE12 // 3602 SYS_OPEN_BY_HANDLE_AT = 0xE13 // 3603 SYS___OPEN_BY_HANDLE_AT_A = 0xE14 // 3604 SYS___INET_ATON_A = 0xE15 // 3605 SYS_MOUNT1 = 0xE16 // 3606 SYS___MOUNT1_A = 0xE17 // 3607 SYS_UMOUNT1 = 0xE18 // 3608 SYS___UMOUNT1_A = 0xE19 // 3609 SYS_UMOUNT2 = 0xE1A // 3610 SYS___UMOUNT2_A = 0xE1B // 3611 SYS___PRCTL_A = 0xE1C // 3612 SYS_LOCALTIME_R2 = 0xE1D // 3613 SYS___LOCALTIME_R2_A = 0xE1E // 3614 SYS_OPENAT2 = 0xE1F // 3615 SYS___OPENAT2_A = 0xE20 // 3616 SYS___LE_CEEMICT = 0xE21 // 3617 SYS_GETENTROPY = 0xE22 // 3618 SYS_NANOSLEEP = 0xE23 // 3619 SYS_UTIMENSAT = 0xE24 // 3620 SYS___UTIMENSAT_A = 0xE25 // 3621 SYS_ASPRINTF = 0xE26 // 3622 SYS___ASPRINTF_A = 0xE27 // 3623 SYS_VASPRINTF = 0xE28 // 3624 SYS___VASPRINTF_A = 0xE29 // 3625 SYS_DPRINTF = 0xE2A // 3626 SYS___DPRINTF_A = 0xE2B // 3627 SYS_GETOPT_LONG = 0xE2C // 3628 SYS___GETOPT_LONG_A = 0xE2D // 3629 SYS_PSIGNAL = 0xE2E // 3630 SYS___PSIGNAL_A = 0xE2F // 3631 SYS_PSIGNAL_UNLOCKED = 0xE30 // 3632 SYS___PSIGNAL_UNLOCKED_A = 0xE31 // 3633 SYS_FSTATAT_O = 0xE32 // 3634 SYS___FSTATAT_O_A = 0xE33 // 3635 SYS_FSTATAT64 = 0xE34 // 3636 SYS___FSTATAT64_A = 0xE35 // 3637 SYS___CHATTRAT = 0xE36 // 3638 SYS_____CHATTRAT_A = 0xE37 // 3639 SYS___CHATTRAT64 = 0xE38 // 3640 SYS_____CHATTRAT64_A = 0xE39 // 3641 SYS_MADVISE = 0xE3A // 3642 SYS___AUTHENTICATE = 0xE3B // 3643 ) ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go ================================================ // cgo -godefs types_aix.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc && aix package unix const ( SizeofPtr = 0x4 SizeofShort = 0x2 SizeofInt = 0x4 SizeofLong = 0x4 SizeofLongLong = 0x8 PathMax = 0x3ff ) type ( _C_short int16 _C_int int32 _C_long int32 _C_long_long int64 ) type off64 int64 type off int32 type Mode_t uint32 type Timespec struct { Sec int32 Nsec int32 } type Timeval struct { Sec int32 Usec int32 } type Timeval32 struct { Sec int32 Usec int32 } type Timex struct{} type Time_t int32 type Tms struct{} type Utimbuf struct { Actime int32 Modtime int32 } type Timezone struct { Minuteswest int32 Dsttime 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 Pid_t int32 type _Gid_t uint32 type dev_t uint32 type Stat_t struct { Dev uint32 Ino uint32 Mode uint32 Nlink int16 Flag uint16 Uid uint32 Gid uint32 Rdev uint32 Size int32 Atim Timespec Mtim Timespec Ctim Timespec Blksize int32 Blocks int32 Vfstype int32 Vfs uint32 Type uint32 Gen uint32 Reserved [9]uint32 } type StatxTimestamp struct{} type Statx_t struct{} type Dirent struct { Offset uint32 Ino uint32 Reclen uint16 Namlen uint16 Name [256]uint8 } type RawSockaddrInet4 struct { Len uint8 Family uint8 Port uint16 Addr [4]byte /* in_addr */ Zero [8]uint8 } 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 [1023]uint8 } type RawSockaddrDatalink struct { Len uint8 Family uint8 Index uint16 Type uint8 Nlen uint8 Alen uint8 Slen uint8 Data [120]uint8 } type RawSockaddr struct { Len uint8 Family uint8 Data [14]uint8 } type RawSockaddrAny struct { Addr RawSockaddr Pad [1012]uint8 } type _Socklen uint32 type Cmsghdr struct { Len uint32 Level int32 Type int32 } type ICMPv6Filter struct { Filt [8]uint32 } 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 IPv6MTUInfo struct { Addr RawSockaddrInet6 Mtu uint32 } type Linger struct { Onoff int32 Linger int32 } type Msghdr struct { Name *byte Namelen uint32 Iov *Iovec Iovlen int32 Control *byte Controllen uint32 Flags int32 } const ( SizeofSockaddrInet4 = 0x10 SizeofSockaddrInet6 = 0x1c SizeofSockaddrAny = 0x404 SizeofSockaddrUnix = 0x401 SizeofSockaddrDatalink = 0x80 SizeofLinger = 0x8 SizeofIovec = 0x8 SizeofIPMreq = 0x8 SizeofIPv6Mreq = 0x14 SizeofIPv6MTUInfo = 0x20 SizeofMsghdr = 0x1c SizeofCmsghdr = 0xc SizeofICMPv6Filter = 0x20 ) const ( SizeofIfMsghdr = 0x10 ) type IfMsgHdr struct { Msglen uint16 Version uint8 Type uint8 Addrs int32 Flags int32 Index uint16 Addrlen uint8 _ [1]byte } type FdSet struct { Bits [2048]int32 } type Utsname struct { Sysname [32]byte Nodename [32]byte Release [32]byte Version [32]byte Machine [32]byte } type Ustat_t struct{} type Sigset_t struct { Losigs uint32 Hisigs uint32 } const ( AT_FDCWD = -0x2 AT_REMOVEDIR = 0x1 AT_SYMLINK_NOFOLLOW = 0x1 ) type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Cc [16]uint8 } type Termio struct { Iflag uint16 Oflag uint16 Cflag uint16 Lflag uint16 Line uint8 Cc [8]uint8 _ [1]byte } type Winsize struct { Row uint16 Col uint16 Xpixel uint16 Ypixel uint16 } type PollFd struct { Fd int32 Events uint16 Revents uint16 } const ( POLLERR = 0x4000 POLLHUP = 0x2000 POLLIN = 0x1 POLLNVAL = 0x8000 POLLOUT = 0x2 POLLPRI = 0x4 POLLRDBAND = 0x20 POLLRDNORM = 0x10 POLLWRBAND = 0x40 POLLWRNORM = 0x2 ) type Flock_t struct { Type int16 Whence int16 Sysid uint32 Pid int32 Vfs int32 Start int64 Len int64 } type Fsid_t struct { Val [2]uint32 } type Fsid64_t struct { Val [2]uint64 } type Statfs_t struct { Version int32 Type int32 Bsize uint32 Blocks uint32 Bfree uint32 Bavail uint32 Files uint32 Ffree uint32 Fsid Fsid_t Vfstype int32 Fsize uint32 Vfsnumber int32 Vfsoff int32 Vfslen int32 Vfsvers int32 Fname [32]uint8 Fpack [32]uint8 Name_max int32 } const RNDGETENTCNT = 0x80045200 ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go ================================================ // cgo -godefs types_aix.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64 && aix package unix const ( SizeofPtr = 0x8 SizeofShort = 0x2 SizeofInt = 0x4 SizeofLong = 0x8 SizeofLongLong = 0x8 PathMax = 0x3ff ) type ( _C_short int16 _C_int int32 _C_long int64 _C_long_long int64 ) type off64 int64 type off int64 type Mode_t uint32 type Timespec struct { Sec int64 Nsec int64 } type Timeval struct { Sec int64 Usec int32 _ [4]byte } type Timeval32 struct { Sec int32 Usec int32 } type Timex struct{} type Time_t int64 type Tms struct{} type Utimbuf struct { Actime int64 Modtime int64 } type Timezone struct { Minuteswest int32 Dsttime 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 Pid_t int32 type _Gid_t uint32 type dev_t uint64 type Stat_t struct { Dev uint64 Ino uint64 Mode uint32 Nlink int16 Flag uint16 Uid uint32 Gid uint32 Rdev uint64 Ssize int32 Atim Timespec Mtim Timespec Ctim Timespec Blksize int64 Blocks int64 Vfstype int32 Vfs uint32 Type uint32 Gen uint32 Reserved [9]uint32 Padto_ll uint32 Size int64 } type StatxTimestamp struct{} type Statx_t struct{} type Dirent struct { Offset uint64 Ino uint64 Reclen uint16 Namlen uint16 Name [256]uint8 _ [4]byte } type RawSockaddrInet4 struct { Len uint8 Family uint8 Port uint16 Addr [4]byte /* in_addr */ Zero [8]uint8 } 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 [1023]uint8 } type RawSockaddrDatalink struct { Len uint8 Family uint8 Index uint16 Type uint8 Nlen uint8 Alen uint8 Slen uint8 Data [120]uint8 } type RawSockaddr struct { Len uint8 Family uint8 Data [14]uint8 } type RawSockaddrAny struct { Addr RawSockaddr Pad [1012]uint8 } type _Socklen uint32 type Cmsghdr struct { Len uint32 Level int32 Type int32 } type ICMPv6Filter struct { Filt [8]uint32 } 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 IPv6MTUInfo struct { Addr RawSockaddrInet6 Mtu uint32 } type Linger struct { Onoff int32 Linger int32 } type Msghdr struct { Name *byte Namelen uint32 Iov *Iovec Iovlen int32 Control *byte Controllen uint32 Flags int32 } const ( SizeofSockaddrInet4 = 0x10 SizeofSockaddrInet6 = 0x1c SizeofSockaddrAny = 0x404 SizeofSockaddrUnix = 0x401 SizeofSockaddrDatalink = 0x80 SizeofLinger = 0x8 SizeofIovec = 0x10 SizeofIPMreq = 0x8 SizeofIPv6Mreq = 0x14 SizeofIPv6MTUInfo = 0x20 SizeofMsghdr = 0x30 SizeofCmsghdr = 0xc SizeofICMPv6Filter = 0x20 ) const ( SizeofIfMsghdr = 0x10 ) type IfMsgHdr struct { Msglen uint16 Version uint8 Type uint8 Addrs int32 Flags int32 Index uint16 Addrlen uint8 _ [1]byte } type FdSet struct { Bits [1024]int64 } type Utsname struct { Sysname [32]byte Nodename [32]byte Release [32]byte Version [32]byte Machine [32]byte } type Ustat_t struct{} type Sigset_t struct { Set [4]uint64 } const ( AT_FDCWD = -0x2 AT_REMOVEDIR = 0x1 AT_SYMLINK_NOFOLLOW = 0x1 ) type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Cc [16]uint8 } type Termio struct { Iflag uint16 Oflag uint16 Cflag uint16 Lflag uint16 Line uint8 Cc [8]uint8 _ [1]byte } type Winsize struct { Row uint16 Col uint16 Xpixel uint16 Ypixel uint16 } type PollFd struct { Fd int32 Events uint16 Revents uint16 } const ( POLLERR = 0x4000 POLLHUP = 0x2000 POLLIN = 0x1 POLLNVAL = 0x8000 POLLOUT = 0x2 POLLPRI = 0x4 POLLRDBAND = 0x20 POLLRDNORM = 0x10 POLLWRBAND = 0x40 POLLWRNORM = 0x2 ) type Flock_t struct { Type int16 Whence int16 Sysid uint32 Pid int32 Vfs int32 Start int64 Len int64 } type Fsid_t struct { Val [2]uint32 } type Fsid64_t struct { Val [2]uint64 } type Statfs_t struct { Version int32 Type int32 Bsize uint64 Blocks uint64 Bfree uint64 Bavail uint64 Files uint64 Ffree uint64 Fsid Fsid64_t Vfstype int32 Fsize uint64 Vfsnumber int32 Vfsoff int32 Vfslen int32 Vfsvers int32 Fname [32]uint8 Fpack [32]uint8 Name_max int32 _ [4]byte } const RNDGETENTCNT = 0x80045200 ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go ================================================ // cgo -godefs types_darwin.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && darwin 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 _ [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 Atim Timespec Mtim Timespec Ctim Timespec Btim 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]byte Mntonname [1024]byte Mntfromname [1024]byte Flags_ext uint32 Reserved [7]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 _ [4]byte } type Fbootstraptransfer_t struct { Offset int64 Length uint64 Buffer *byte } type Log2phys_t struct { Flags uint32 _ [16]byte } type Fsid struct { Val [2]int32 } type Dirent struct { Ino uint64 Seekoff uint64 Reclen uint16 Namlen uint16 Type uint8 Name [1024]int8 _ [3]byte } type Attrlist struct { Bitmapcount uint16 Reserved uint16 Commonattr uint32 Volattr uint32 Dirattr uint32 Fileattr uint32 Forkattr uint32 } const ( PathMax = 0x400 ) 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 RawSockaddrCtl struct { Sc_len uint8 Sc_family uint8 Ss_sysaddr uint16 Sc_id uint32 Sc_unit uint32 Sc_reserved [5]uint32 } type RawSockaddrVM struct { Len uint8 Family uint8 Reserved1 uint16 Port uint32 Cid uint32 } type XVSockPCB struct { Xv_len uint32 Xv_vsockpp uint64 Xvp_local_cid uint32 Xvp_local_port uint32 Xvp_remote_cid uint32 Xvp_remote_port uint32 Xvp_rxcnt uint32 Xvp_txcnt uint32 Xvp_peer_rxhiwat uint32 Xvp_peer_rxcnt uint32 Xvp_last_pid int32 Xvp_gencnt uint64 Xv_socket XSocket _ [4]byte } type XSocket struct { Xso_len uint32 Xso_so uint32 So_type int16 So_options int16 So_linger int16 So_state int16 So_pcb uint32 Xso_protocol int32 Xso_family int32 So_qlen int16 So_incqlen int16 So_qlimit int16 So_timeo int16 So_error uint16 So_pgid int32 So_oobmark uint32 So_rcv XSockbuf So_snd XSockbuf So_uid uint32 } type XSocket64 struct { Xso_len uint32 _ [8]byte So_type int16 So_options int16 So_linger int16 So_state int16 _ [8]byte Xso_protocol int32 Xso_family int32 So_qlen int16 So_incqlen int16 So_qlimit int16 So_timeo int16 So_error uint16 So_pgid int32 So_oobmark uint32 So_rcv XSockbuf So_snd XSockbuf So_uid uint32 } type XSockbuf struct { Cc uint32 Hiwat uint32 Mbcnt uint32 Mbmax uint32 Lowat int32 Flags int16 Timeo int16 } type XVSockPgen struct { Len uint32 Count uint64 Gen uint64 Sogen uint64 } type _Socklen uint32 type Xucred struct { Version uint32 Uid uint32 Ngroups int16 Groups [16]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 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 } type TCPConnectionInfo struct { State uint8 Snd_wscale uint8 Rcv_wscale uint8 _ uint8 Options uint32 Flags uint32 Rto uint32 Maxseg uint32 Snd_ssthresh uint32 Snd_cwnd uint32 Snd_wnd uint32 Snd_sbbytes uint32 Rcv_wnd uint32 Rttcur uint32 Srtt uint32 Rttvar uint32 Txpackets uint64 Txbytes uint64 Txretransmitbytes uint64 Rxpackets uint64 Rxbytes uint64 Rxoutoforderbytes uint64 Txretransmitpackets uint64 } const ( SizeofSockaddrInet4 = 0x10 SizeofSockaddrInet6 = 0x1c SizeofSockaddrAny = 0x6c SizeofSockaddrUnix = 0x6a SizeofSockaddrDatalink = 0x14 SizeofSockaddrCtl = 0x20 SizeofSockaddrVM = 0xc SizeofXvsockpcb = 0xa8 SizeofXSocket = 0x64 SizeofXSockbuf = 0x18 SizeofXVSockPgen = 0x20 SizeofXucred = 0x4c SizeofLinger = 0x8 SizeofIovec = 0x10 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc SizeofIPv6Mreq = 0x14 SizeofMsghdr = 0x30 SizeofCmsghdr = 0xc SizeofInet4Pktinfo = 0xc SizeofInet6Pktinfo = 0x14 SizeofIPv6MTUInfo = 0x20 SizeofICMPv6Filter = 0x20 SizeofTCPConnectionInfo = 0x70 ) 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 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 Metric int32 } type IfmaMsghdr struct { Msglen uint16 Version uint8 Type uint8 Addrs int32 Flags int32 Index uint16 _ [2]byte } type IfmaMsghdr2 struct { Msglen uint16 Version uint8 Type uint8 Addrs int32 Flags int32 Index uint16 Refcount int32 } type RtMsghdr struct { Msglen uint16 Version uint8 Type uint8 Index uint16 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 State uint32 Filler [3]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 Insns *BpfInsn } type BpfInsn struct { Code uint16 Jt uint8 Jf uint8 K uint32 } type BpfHdr struct { Tstamp Timeval32 Caplen uint32 Datalen uint32 Hdrlen uint16 _ [2]byte } type Termios struct { Iflag uint64 Oflag uint64 Cflag uint64 Lflag uint64 Cc [20]uint8 Ispeed uint64 Ospeed uint64 } type Winsize struct { Row uint16 Col uint16 Xpixel uint16 Ypixel uint16 } const ( AT_FDCWD = -0x2 AT_REMOVEDIR = 0x80 AT_SYMLINK_FOLLOW = 0x40 AT_SYMLINK_NOFOLLOW = 0x20 AT_EACCESS = 0x10 ) type PollFd struct { Fd int32 Events int16 Revents int16 } const ( POLLERR = 0x8 POLLHUP = 0x10 POLLIN = 0x1 POLLNVAL = 0x20 POLLOUT = 0x4 POLLPRI = 0x2 POLLRDBAND = 0x80 POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) type Utsname struct { Sysname [256]byte Nodename [256]byte Release [256]byte Version [256]byte Machine [256]byte } const SizeofClockinfo = 0x14 type Clockinfo struct { Hz int32 Tick int32 Tickadj int32 Stathz int32 Profhz int32 } type CtlInfo struct { Id uint32 Name [96]byte } const SizeofKinfoProc = 0x288 type Eproc struct { Paddr uintptr Sess uintptr Pcred Pcred Ucred Ucred Vm Vmspace Ppid int32 Pgid int32 Jobc int16 Tdev int32 Tpgid int32 Tsess uintptr Wmesg [8]byte Xsize int32 Xrssize int16 Xccount int16 Xswrss int16 Flag int32 Login [12]byte Spare [4]int32 _ [4]byte } type ExternProc struct { P_starttime Timeval P_vmspace *Vmspace P_sigacts uintptr P_flag int32 P_stat int8 P_pid int32 P_oppid int32 P_dupfd int32 User_stack *int8 Exit_thread *byte P_debugger int32 Sigwait int32 P_estcpu uint32 P_cpticks int32 P_pctcpu uint32 P_wchan *byte P_wmesg *int8 P_swtime uint32 P_slptime uint32 P_realtimer Itimerval P_rtime Timeval P_uticks uint64 P_sticks uint64 P_iticks uint64 P_traceflag int32 P_tracep uintptr P_siglist int32 P_textvp uintptr P_holdcnt int32 P_sigmask uint32 P_sigignore uint32 P_sigcatch uint32 P_priority uint8 P_usrpri uint8 P_nice int8 P_comm [17]byte P_pgrp uintptr P_addr uintptr P_xstat uint16 P_acflag uint16 P_ru *Rusage } type Itimerval struct { Interval Timeval Value Timeval } type KinfoProc struct { Proc ExternProc Eproc Eproc } type Vmspace struct { Dummy int32 Dummy2 *int8 Dummy3 [5]int32 Dummy4 [3]*int8 } type Pcred struct { Pc_lock [72]int8 Pc_ucred uintptr P_ruid uint32 P_svuid uint32 P_rgid uint32 P_svgid uint32 P_refcnt int32 _ [4]byte } type Ucred struct { Ref int32 Uid uint32 Ngroups int16 Groups [16]uint32 } type SysvIpcPerm struct { Uid uint32 Gid uint32 Cuid uint32 Cgid uint32 Mode uint16 _ uint16 _ int32 } type SysvShmDesc struct { Perm SysvIpcPerm Segsz uint64 Lpid int32 Cpid int32 Nattch uint16 _ [34]byte } const ( IPC_CREAT = 0x200 IPC_EXCL = 0x400 IPC_NOWAIT = 0x800 IPC_PRIVATE = 0x0 ) const ( IPC_RMID = 0x0 IPC_SET = 0x1 IPC_STAT = 0x2 ) const ( SHM_RDONLY = 0x1000 SHM_RND = 0x2000 ) ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go ================================================ // cgo -godefs types_darwin.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && darwin 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 _ [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 Atim Timespec Mtim Timespec Ctim Timespec Btim 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]byte Mntonname [1024]byte Mntfromname [1024]byte Flags_ext uint32 Reserved [7]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 _ [4]byte } type Fbootstraptransfer_t struct { Offset int64 Length uint64 Buffer *byte } type Log2phys_t struct { Flags uint32 _ [16]byte } type Fsid struct { Val [2]int32 } type Dirent struct { Ino uint64 Seekoff uint64 Reclen uint16 Namlen uint16 Type uint8 Name [1024]int8 _ [3]byte } type Attrlist struct { Bitmapcount uint16 Reserved uint16 Commonattr uint32 Volattr uint32 Dirattr uint32 Fileattr uint32 Forkattr uint32 } const ( PathMax = 0x400 ) 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 RawSockaddrCtl struct { Sc_len uint8 Sc_family uint8 Ss_sysaddr uint16 Sc_id uint32 Sc_unit uint32 Sc_reserved [5]uint32 } type RawSockaddrVM struct { Len uint8 Family uint8 Reserved1 uint16 Port uint32 Cid uint32 } type XVSockPCB struct { Xv_len uint32 Xv_vsockpp uint64 Xvp_local_cid uint32 Xvp_local_port uint32 Xvp_remote_cid uint32 Xvp_remote_port uint32 Xvp_rxcnt uint32 Xvp_txcnt uint32 Xvp_peer_rxhiwat uint32 Xvp_peer_rxcnt uint32 Xvp_last_pid int32 Xvp_gencnt uint64 Xv_socket XSocket _ [4]byte } type XSocket struct { Xso_len uint32 Xso_so uint32 So_type int16 So_options int16 So_linger int16 So_state int16 So_pcb uint32 Xso_protocol int32 Xso_family int32 So_qlen int16 So_incqlen int16 So_qlimit int16 So_timeo int16 So_error uint16 So_pgid int32 So_oobmark uint32 So_rcv XSockbuf So_snd XSockbuf So_uid uint32 } type XSocket64 struct { Xso_len uint32 _ [8]byte So_type int16 So_options int16 So_linger int16 So_state int16 _ [8]byte Xso_protocol int32 Xso_family int32 So_qlen int16 So_incqlen int16 So_qlimit int16 So_timeo int16 So_error uint16 So_pgid int32 So_oobmark uint32 So_rcv XSockbuf So_snd XSockbuf So_uid uint32 } type XSockbuf struct { Cc uint32 Hiwat uint32 Mbcnt uint32 Mbmax uint32 Lowat int32 Flags int16 Timeo int16 } type XVSockPgen struct { Len uint32 Count uint64 Gen uint64 Sogen uint64 } type _Socklen uint32 type Xucred struct { Version uint32 Uid uint32 Ngroups int16 Groups [16]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 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 } type TCPConnectionInfo struct { State uint8 Snd_wscale uint8 Rcv_wscale uint8 _ uint8 Options uint32 Flags uint32 Rto uint32 Maxseg uint32 Snd_ssthresh uint32 Snd_cwnd uint32 Snd_wnd uint32 Snd_sbbytes uint32 Rcv_wnd uint32 Rttcur uint32 Srtt uint32 Rttvar uint32 Txpackets uint64 Txbytes uint64 Txretransmitbytes uint64 Rxpackets uint64 Rxbytes uint64 Rxoutoforderbytes uint64 Txretransmitpackets uint64 } const ( SizeofSockaddrInet4 = 0x10 SizeofSockaddrInet6 = 0x1c SizeofSockaddrAny = 0x6c SizeofSockaddrUnix = 0x6a SizeofSockaddrDatalink = 0x14 SizeofSockaddrCtl = 0x20 SizeofSockaddrVM = 0xc SizeofXvsockpcb = 0xa8 SizeofXSocket = 0x64 SizeofXSockbuf = 0x18 SizeofXVSockPgen = 0x20 SizeofXucred = 0x4c SizeofLinger = 0x8 SizeofIovec = 0x10 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc SizeofIPv6Mreq = 0x14 SizeofMsghdr = 0x30 SizeofCmsghdr = 0xc SizeofInet4Pktinfo = 0xc SizeofInet6Pktinfo = 0x14 SizeofIPv6MTUInfo = 0x20 SizeofICMPv6Filter = 0x20 SizeofTCPConnectionInfo = 0x70 ) 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 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 Metric int32 } type IfmaMsghdr struct { Msglen uint16 Version uint8 Type uint8 Addrs int32 Flags int32 Index uint16 _ [2]byte } type IfmaMsghdr2 struct { Msglen uint16 Version uint8 Type uint8 Addrs int32 Flags int32 Index uint16 Refcount int32 } type RtMsghdr struct { Msglen uint16 Version uint8 Type uint8 Index uint16 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 State uint32 Filler [3]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 Insns *BpfInsn } type BpfInsn struct { Code uint16 Jt uint8 Jf uint8 K uint32 } type BpfHdr struct { Tstamp Timeval32 Caplen uint32 Datalen uint32 Hdrlen uint16 _ [2]byte } type Termios struct { Iflag uint64 Oflag uint64 Cflag uint64 Lflag uint64 Cc [20]uint8 Ispeed uint64 Ospeed uint64 } type Winsize struct { Row uint16 Col uint16 Xpixel uint16 Ypixel uint16 } const ( AT_FDCWD = -0x2 AT_REMOVEDIR = 0x80 AT_SYMLINK_FOLLOW = 0x40 AT_SYMLINK_NOFOLLOW = 0x20 AT_EACCESS = 0x10 ) type PollFd struct { Fd int32 Events int16 Revents int16 } const ( POLLERR = 0x8 POLLHUP = 0x10 POLLIN = 0x1 POLLNVAL = 0x20 POLLOUT = 0x4 POLLPRI = 0x2 POLLRDBAND = 0x80 POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) type Utsname struct { Sysname [256]byte Nodename [256]byte Release [256]byte Version [256]byte Machine [256]byte } const SizeofClockinfo = 0x14 type Clockinfo struct { Hz int32 Tick int32 Tickadj int32 Stathz int32 Profhz int32 } type CtlInfo struct { Id uint32 Name [96]byte } const SizeofKinfoProc = 0x288 type Eproc struct { Paddr uintptr Sess uintptr Pcred Pcred Ucred Ucred Vm Vmspace Ppid int32 Pgid int32 Jobc int16 Tdev int32 Tpgid int32 Tsess uintptr Wmesg [8]byte Xsize int32 Xrssize int16 Xccount int16 Xswrss int16 Flag int32 Login [12]byte Spare [4]int32 _ [4]byte } type ExternProc struct { P_starttime Timeval P_vmspace *Vmspace P_sigacts uintptr P_flag int32 P_stat int8 P_pid int32 P_oppid int32 P_dupfd int32 User_stack *int8 Exit_thread *byte P_debugger int32 Sigwait int32 P_estcpu uint32 P_cpticks int32 P_pctcpu uint32 P_wchan *byte P_wmesg *int8 P_swtime uint32 P_slptime uint32 P_realtimer Itimerval P_rtime Timeval P_uticks uint64 P_sticks uint64 P_iticks uint64 P_traceflag int32 P_tracep uintptr P_siglist int32 P_textvp uintptr P_holdcnt int32 P_sigmask uint32 P_sigignore uint32 P_sigcatch uint32 P_priority uint8 P_usrpri uint8 P_nice int8 P_comm [17]byte P_pgrp uintptr P_addr uintptr P_xstat uint16 P_acflag uint16 P_ru *Rusage } type Itimerval struct { Interval Timeval Value Timeval } type KinfoProc struct { Proc ExternProc Eproc Eproc } type Vmspace struct { Dummy int32 Dummy2 *int8 Dummy3 [5]int32 Dummy4 [3]*int8 } type Pcred struct { Pc_lock [72]int8 Pc_ucred uintptr P_ruid uint32 P_svuid uint32 P_rgid uint32 P_svgid uint32 P_refcnt int32 _ [4]byte } type Ucred struct { Ref int32 Uid uint32 Ngroups int16 Groups [16]uint32 } type SysvIpcPerm struct { Uid uint32 Gid uint32 Cuid uint32 Cgid uint32 Mode uint16 _ uint16 _ int32 } type SysvShmDesc struct { Perm SysvIpcPerm Segsz uint64 Lpid int32 Cpid int32 Nattch uint16 _ [34]byte } const ( IPC_CREAT = 0x200 IPC_EXCL = 0x400 IPC_NOWAIT = 0x800 IPC_PRIVATE = 0x0 ) const ( IPC_RMID = 0x0 IPC_SET = 0x1 IPC_STAT = 0x2 ) const ( SHM_RDONLY = 0x1000 SHM_RND = 0x2000 ) ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go ================================================ // cgo -godefs types_dragonfly.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //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 type Stat_t struct { Ino uint64 Nlink uint32 Dev uint32 Mode uint16 _1 uint16 Uid uint32 Gid uint32 Rdev uint32 Atim Timespec Mtim Timespec Ctim Timespec Size int64 Blocks int64 _ uint32 Flags uint32 Gen uint32 Lspare int32 Blksize 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 Syncwrites int64 Asyncwrites int64 Fstypename [16]byte Mntonname [80]byte Syncreads int64 Asyncreads int64 Spares1 int16 Mntfromname [80]byte Spares2 int16 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 } const ( PathMax = 0x400 ) 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 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 SizeofIovec = 0x10 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 = 0x18 SizeofIfmaMsghdr = 0x10 SizeofIfAnnounceMsghdr = 0x18 SizeofRtMsghdr = 0x98 SizeofRtMetrics = 0x70 ) type IfMsghdr struct { Msglen uint16 Version uint8 Type uint8 Index uint16 Flags int32 Addrs int32 Data IfData } type IfData struct { Type uint8 Physical uint8 Addrlen uint8 Hdrlen uint8 Recvquota uint8 Xmitquota uint8 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 Oqdrops uint64 Lastchange Timeval } type IfaMsghdr struct { Msglen uint16 Version uint8 Type uint8 Index uint16 Flags int32 Addrs int32 Addrflags int32 Metric int32 } type IfmaMsghdr struct { Msglen uint16 Version uint8 Type uint8 Index uint16 Flags int32 Addrs int32 } 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 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 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 Insns *BpfInsn } type BpfInsn struct { Code uint16 Jt uint8 Jf uint8 K uint32 } type BpfHdr struct { Tstamp Timeval Caplen uint32 Datalen uint32 Hdrlen uint16 _ [6]byte } type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Cc [20]uint8 Ispeed uint32 Ospeed uint32 } type Winsize struct { Row uint16 Col uint16 Xpixel uint16 Ypixel uint16 } const ( AT_FDCWD = 0xfffafdcd AT_SYMLINK_NOFOLLOW = 0x1 AT_REMOVEDIR = 0x2 AT_EACCESS = 0x4 AT_SYMLINK_FOLLOW = 0x8 ) type PollFd struct { Fd int32 Events int16 Revents int16 } const ( POLLERR = 0x8 POLLHUP = 0x10 POLLIN = 0x1 POLLNVAL = 0x20 POLLOUT = 0x4 POLLPRI = 0x2 POLLRDBAND = 0x80 POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) type Utsname struct { Sysname [32]byte Nodename [32]byte Release [32]byte Version [32]byte Machine [32]byte } const SizeofClockinfo = 0x14 type Clockinfo struct { Hz int32 Tick int32 Tickadj int32 Stathz int32 Profhz int32 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go ================================================ // cgo -godefs types_freebsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && 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 int32 Nsec int32 } type Timeval struct { Sec int32 Usec int32 } type Time_t 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 ( _statfsVersion = 0x20140518 _dirblksiz = 0x400 ) type Stat_t struct { Dev uint64 Ino uint64 Nlink uint64 Mode uint16 _0 int16 Uid uint32 Gid uint32 _1 int32 Rdev uint64 _ int32 Atim Timespec _ int32 Mtim Timespec _ int32 Ctim Timespec _ int32 Btim Timespec Size int64 Blocks int64 Blksize int32 Flags uint32 Gen uint64 Spare [10]uint64 } 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]byte Mntfromname [1024]byte Mntonname [1024]byte } type Flock_t struct { Start int64 Len int64 Pid int32 Type int16 Whence int16 Sysid int32 } type Dirent struct { Fileno uint64 Off int64 Reclen uint16 Type uint8 Pad0 uint8 Namlen uint16 Pad1 uint16 Name [256]int8 } type Fsid struct { Val [2]int32 } const ( PathMax = 0x400 ) 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 Xucred struct { Version uint32 Uid uint32 Ngroups int16 Groups [16]uint32 _ *byte } 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 SizeofXucred = 0x50 SizeofLinger = 0x8 SizeofIovec = 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 PtraceLwpInfoStruct struct { Lwpid int32 Event int32 Flags int32 Sigmask Sigset_t Siglist Sigset_t Siginfo __PtraceSiginfo Tdname [20]int8 Child_pid int32 Syscall_code uint32 Syscall_narg uint32 } type __Siginfo struct { Signo int32 Errno int32 Code int32 Pid int32 Uid uint32 Status int32 Addr *byte Value [4]byte _ [32]byte } type __PtraceSiginfo struct { Signo int32 Errno int32 Code int32 Pid int32 Uid uint32 Status int32 Addr uintptr Value [4]byte _ [32]byte } type Sigset_t struct { Val [4]uint32 } type Reg struct { Fs uint32 Es uint32 Ds uint32 Edi uint32 Esi uint32 Ebp uint32 Isp uint32 Ebx uint32 Edx uint32 Ecx uint32 Eax uint32 Trapno uint32 Err uint32 Eip uint32 Cs uint32 Eflags uint32 Esp uint32 Ss uint32 Gs uint32 } type FpReg struct { Env [7]uint32 Acc [8][10]uint8 Ex_sw uint32 Pad [64]uint8 } type FpExtendedPrecision struct{} type PtraceIoDesc struct { Op int32 Offs uintptr Addr *byte Len uint32 } type Kevent_t struct { Ident uint32 Filter int16 Flags uint16 Fflags uint32 Data int64 Udata *byte Ext [4]uint64 } type FdSet struct { Bits [32]uint32 } const ( sizeofIfMsghdr = 0xa8 SizeofIfMsghdr = 0x60 sizeofIfData = 0x98 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 _ uint16 Data ifData } type IfMsghdr struct { Msglen uint16 Version uint8 Type uint8 Addrs int32 Flags int32 Index uint16 Data IfData } type ifData struct { Type uint8 Physical uint8 Addrlen uint8 Hdrlen uint8 Link_state uint8 Vhid uint8 Datalen uint16 Mtu uint32 Metric uint32 Baudrate uint64 Ipackets uint64 Ierrors uint64 Opackets uint64 Oerrors uint64 Collisions uint64 Ibytes uint64 Obytes uint64 Imcasts uint64 Omcasts uint64 Iqdrops uint64 Oqdrops uint64 Noproto uint64 Hwassist uint64 _ [8]byte _ [16]byte } 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 _ uint16 Metric int32 } type IfmaMsghdr struct { Msglen uint16 Version uint8 Type uint8 Addrs int32 Flags int32 Index uint16 _ uint16 } 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 _ uint16 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 _ [2]byte } type BpfZbufHeader struct { Kernel_gen uint32 Kernel_len uint32 User_gen uint32 _ [5]uint32 } type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Cc [20]uint8 Ispeed uint32 Ospeed uint32 } type Winsize struct { Row uint16 Col uint16 Xpixel uint16 Ypixel uint16 } const ( AT_FDCWD = -0x64 AT_EACCESS = 0x100 AT_SYMLINK_NOFOLLOW = 0x200 AT_SYMLINK_FOLLOW = 0x400 AT_REMOVEDIR = 0x800 ) type PollFd struct { Fd int32 Events int16 Revents int16 } const ( POLLERR = 0x8 POLLHUP = 0x10 POLLIN = 0x1 POLLINIGNEOF = 0x2000 POLLNVAL = 0x20 POLLOUT = 0x4 POLLPRI = 0x2 POLLRDBAND = 0x80 POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) type CapRights struct { Rights [2]uint64 } type Utsname struct { Sysname [256]byte Nodename [256]byte Release [256]byte Version [256]byte Machine [256]byte } const SizeofClockinfo = 0x14 type Clockinfo struct { Hz int32 Tick int32 Spare int32 Stathz int32 Profhz int32 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go ================================================ // cgo -godefs types_freebsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && freebsd 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 Time_t 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 ( _statfsVersion = 0x20140518 _dirblksiz = 0x400 ) type Stat_t struct { Dev uint64 Ino uint64 Nlink uint64 Mode uint16 _0 int16 Uid uint32 Gid uint32 _1 int32 Rdev uint64 Atim Timespec Mtim Timespec Ctim Timespec Btim Timespec Size int64 Blocks int64 Blksize int32 Flags uint32 Gen uint64 Spare [10]uint64 } 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]byte Mntfromname [1024]byte Mntonname [1024]byte } type Flock_t struct { Start int64 Len int64 Pid int32 Type int16 Whence int16 Sysid int32 _ [4]byte } type Dirent struct { Fileno uint64 Off int64 Reclen uint16 Type uint8 Pad0 uint8 Namlen uint16 Pad1 uint16 Name [256]int8 } type Fsid struct { Val [2]int32 } const ( PathMax = 0x400 ) 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 Xucred struct { Version uint32 Uid uint32 Ngroups int16 Groups [16]uint32 _ *byte } 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 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 SizeofXucred = 0x58 SizeofLinger = 0x8 SizeofIovec = 0x10 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 PtraceLwpInfoStruct struct { Lwpid int32 Event int32 Flags int32 Sigmask Sigset_t Siglist Sigset_t Siginfo __PtraceSiginfo Tdname [20]int8 Child_pid int32 Syscall_code uint32 Syscall_narg uint32 } type __Siginfo struct { Signo int32 Errno int32 Code int32 Pid int32 Uid uint32 Status int32 Addr *byte Value [8]byte _ [40]byte } type __PtraceSiginfo struct { Signo int32 Errno int32 Code int32 Pid int32 Uid uint32 Status int32 Addr uintptr Value [8]byte _ [40]byte } type Sigset_t struct { Val [4]uint32 } type Reg struct { R15 int64 R14 int64 R13 int64 R12 int64 R11 int64 R10 int64 R9 int64 R8 int64 Rdi int64 Rsi int64 Rbp int64 Rbx int64 Rdx int64 Rcx int64 Rax int64 Trapno uint32 Fs uint16 Gs uint16 Err uint32 Es uint16 Ds uint16 Rip int64 Cs int64 Rflags int64 Rsp int64 Ss int64 } type FpReg struct { Env [4]uint64 Acc [8][16]uint8 Xacc [16][16]uint8 Spare [12]uint64 } type FpExtendedPrecision struct{} type PtraceIoDesc struct { Op int32 Offs uintptr Addr *byte Len uint64 } type Kevent_t struct { Ident uint64 Filter int16 Flags uint16 Fflags uint32 Data int64 Udata *byte Ext [4]uint64 } type FdSet struct { 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 _ uint16 Data ifData } type IfMsghdr struct { Msglen uint16 Version uint8 Type uint8 Addrs int32 Flags int32 Index uint16 Data IfData } type ifData struct { Type uint8 Physical uint8 Addrlen uint8 Hdrlen uint8 Link_state uint8 Vhid uint8 Datalen uint16 Mtu uint32 Metric uint32 Baudrate uint64 Ipackets uint64 Ierrors uint64 Opackets uint64 Oerrors uint64 Collisions uint64 Ibytes uint64 Obytes uint64 Imcasts uint64 Omcasts uint64 Iqdrops uint64 Oqdrops uint64 Noproto uint64 Hwassist uint64 _ [8]byte _ [16]byte } 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 _ uint16 Metric int32 } type IfmaMsghdr struct { Msglen uint16 Version uint8 Type uint8 Addrs int32 Flags int32 Index uint16 _ uint16 } 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 _ uint16 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 Insns *BpfInsn } type BpfInsn struct { Code uint16 Jt uint8 Jf uint8 K uint32 } type BpfHdr struct { Tstamp Timeval Caplen uint32 Datalen uint32 Hdrlen uint16 _ [6]byte } type BpfZbufHeader struct { Kernel_gen uint32 Kernel_len uint32 User_gen uint32 _ [5]uint32 } type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Cc [20]uint8 Ispeed uint32 Ospeed uint32 } type Winsize struct { Row uint16 Col uint16 Xpixel uint16 Ypixel uint16 } const ( AT_FDCWD = -0x64 AT_EACCESS = 0x100 AT_SYMLINK_NOFOLLOW = 0x200 AT_SYMLINK_FOLLOW = 0x400 AT_REMOVEDIR = 0x800 ) type PollFd struct { Fd int32 Events int16 Revents int16 } const ( POLLERR = 0x8 POLLHUP = 0x10 POLLIN = 0x1 POLLINIGNEOF = 0x2000 POLLNVAL = 0x20 POLLOUT = 0x4 POLLPRI = 0x2 POLLRDBAND = 0x80 POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) type CapRights struct { Rights [2]uint64 } type Utsname struct { Sysname [256]byte Nodename [256]byte Release [256]byte Version [256]byte Machine [256]byte } const SizeofClockinfo = 0x14 type Clockinfo struct { Hz int32 Tick int32 Spare int32 Stathz int32 Profhz int32 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go ================================================ // cgo -godefs -- -fsigned-char types_freebsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //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 _ [4]byte } type Timeval struct { Sec int64 Usec int32 _ [4]byte } type Time_t int64 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 ( _statfsVersion = 0x20140518 _dirblksiz = 0x400 ) type Stat_t struct { Dev uint64 Ino uint64 Nlink uint64 Mode uint16 _0 int16 Uid uint32 Gid uint32 _1 int32 Rdev uint64 Atim Timespec Mtim Timespec Ctim Timespec Btim Timespec Size int64 Blocks int64 Blksize int32 Flags uint32 Gen uint64 Spare [10]uint64 } 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]byte Mntfromname [1024]byte Mntonname [1024]byte } type Flock_t struct { Start int64 Len int64 Pid int32 Type int16 Whence int16 Sysid int32 _ [4]byte } type Dirent struct { Fileno uint64 Off int64 Reclen uint16 Type uint8 Pad0 uint8 Namlen uint16 Pad1 uint16 Name [256]int8 } type Fsid struct { Val [2]int32 } const ( PathMax = 0x400 ) 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 Xucred struct { Version uint32 Uid uint32 Ngroups int16 Groups [16]uint32 _ *byte } 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 SizeofXucred = 0x50 SizeofLinger = 0x8 SizeofIovec = 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 PtraceLwpInfoStruct struct { Lwpid int32 Event int32 Flags int32 Sigmask Sigset_t Siglist Sigset_t Siginfo __PtraceSiginfo Tdname [20]int8 Child_pid int32 Syscall_code uint32 Syscall_narg uint32 } type __Siginfo struct { Signo int32 Errno int32 Code int32 Pid int32 Uid uint32 Status int32 Addr *byte Value [4]byte _ [32]byte } type __PtraceSiginfo struct { Signo int32 Errno int32 Code int32 Pid int32 Uid uint32 Status int32 Addr uintptr Value [4]byte _ [32]byte } type Sigset_t struct { Val [4]uint32 } type Reg struct { R [13]uint32 Sp uint32 Lr uint32 Pc uint32 Cpsr uint32 } type FpReg struct { Fpsr uint32 Fpr [8]FpExtendedPrecision } type FpExtendedPrecision struct { Exponent uint32 Mantissa_hi uint32 Mantissa_lo uint32 } type PtraceIoDesc struct { Op int32 Offs uintptr Addr *byte Len uint32 } type Kevent_t struct { Ident uint32 Filter int16 Flags uint16 Fflags uint32 _ [4]byte Data int64 Udata *byte _ [4]byte Ext [4]uint64 } type FdSet struct { Bits [32]uint32 } const ( sizeofIfMsghdr = 0xa8 SizeofIfMsghdr = 0x70 sizeofIfData = 0x98 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 _ uint16 Data ifData } type IfMsghdr struct { Msglen uint16 Version uint8 Type uint8 Addrs int32 Flags int32 Index uint16 Data IfData } type ifData struct { Type uint8 Physical uint8 Addrlen uint8 Hdrlen uint8 Link_state uint8 Vhid uint8 Datalen uint16 Mtu uint32 Metric uint32 Baudrate uint64 Ipackets uint64 Ierrors uint64 Opackets uint64 Oerrors uint64 Collisions uint64 Ibytes uint64 Obytes uint64 Imcasts uint64 Omcasts uint64 Iqdrops uint64 Oqdrops uint64 Noproto uint64 Hwassist uint64 _ [8]byte _ [16]byte } 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 _ [4]byte Epoch int64 Lastchange Timeval } type IfaMsghdr struct { Msglen uint16 Version uint8 Type uint8 Addrs int32 Flags int32 Index uint16 _ uint16 Metric int32 } type IfmaMsghdr struct { Msglen uint16 Version uint8 Type uint8 Addrs int32 Flags int32 Index uint16 _ uint16 } 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 _ uint16 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 _ [6]byte } type BpfZbufHeader struct { Kernel_gen uint32 Kernel_len uint32 User_gen uint32 _ [5]uint32 } type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Cc [20]uint8 Ispeed uint32 Ospeed uint32 } type Winsize struct { Row uint16 Col uint16 Xpixel uint16 Ypixel uint16 } const ( AT_FDCWD = -0x64 AT_EACCESS = 0x100 AT_SYMLINK_NOFOLLOW = 0x200 AT_SYMLINK_FOLLOW = 0x400 AT_REMOVEDIR = 0x800 ) type PollFd struct { Fd int32 Events int16 Revents int16 } const ( POLLERR = 0x8 POLLHUP = 0x10 POLLIN = 0x1 POLLINIGNEOF = 0x2000 POLLNVAL = 0x20 POLLOUT = 0x4 POLLPRI = 0x2 POLLRDBAND = 0x80 POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) type CapRights struct { Rights [2]uint64 } type Utsname struct { Sysname [256]byte Nodename [256]byte Release [256]byte Version [256]byte Machine [256]byte } const SizeofClockinfo = 0x14 type Clockinfo struct { Hz int32 Tick int32 Spare int32 Stathz int32 Profhz int32 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go ================================================ // cgo -godefs -- -fsigned-char types_freebsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && freebsd 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 Time_t 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 ( _statfsVersion = 0x20140518 _dirblksiz = 0x400 ) type Stat_t struct { Dev uint64 Ino uint64 Nlink uint64 Mode uint16 _0 int16 Uid uint32 Gid uint32 _1 int32 Rdev uint64 Atim Timespec Mtim Timespec Ctim Timespec Btim Timespec Size int64 Blocks int64 Blksize int32 Flags uint32 Gen uint64 Spare [10]uint64 } 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]byte Mntfromname [1024]byte Mntonname [1024]byte } type Flock_t struct { Start int64 Len int64 Pid int32 Type int16 Whence int16 Sysid int32 _ [4]byte } type Dirent struct { Fileno uint64 Off int64 Reclen uint16 Type uint8 Pad0 uint8 Namlen uint16 Pad1 uint16 Name [256]int8 } type Fsid struct { Val [2]int32 } const ( PathMax = 0x400 ) 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 Xucred struct { Version uint32 Uid uint32 Ngroups int16 Groups [16]uint32 _ *byte } 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 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 SizeofXucred = 0x58 SizeofLinger = 0x8 SizeofIovec = 0x10 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 PtraceLwpInfoStruct struct { Lwpid int32 Event int32 Flags int32 Sigmask Sigset_t Siglist Sigset_t Siginfo __PtraceSiginfo Tdname [20]int8 Child_pid int32 Syscall_code uint32 Syscall_narg uint32 } type __Siginfo struct { Signo int32 Errno int32 Code int32 Pid int32 Uid uint32 Status int32 Addr *byte Value [8]byte _ [40]byte } type __PtraceSiginfo struct { Signo int32 Errno int32 Code int32 Pid int32 Uid uint32 Status int32 Addr uintptr Value [8]byte _ [40]byte } type Sigset_t struct { Val [4]uint32 } type Reg struct { X [30]uint64 Lr uint64 Sp uint64 Elr uint64 Spsr uint32 _ [4]byte } type FpReg struct { Q [32][16]uint8 Sr uint32 Cr uint32 _ [8]byte } type FpExtendedPrecision struct{} type PtraceIoDesc struct { Op int32 Offs uintptr Addr *byte Len uint64 } type Kevent_t struct { Ident uint64 Filter int16 Flags uint16 Fflags uint32 Data int64 Udata *byte Ext [4]uint64 } type FdSet struct { 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 _ uint16 Data ifData } type IfMsghdr struct { Msglen uint16 Version uint8 Type uint8 Addrs int32 Flags int32 Index uint16 Data IfData } type ifData struct { Type uint8 Physical uint8 Addrlen uint8 Hdrlen uint8 Link_state uint8 Vhid uint8 Datalen uint16 Mtu uint32 Metric uint32 Baudrate uint64 Ipackets uint64 Ierrors uint64 Opackets uint64 Oerrors uint64 Collisions uint64 Ibytes uint64 Obytes uint64 Imcasts uint64 Omcasts uint64 Iqdrops uint64 Oqdrops uint64 Noproto uint64 Hwassist uint64 _ [8]byte _ [16]byte } 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 _ uint16 Metric int32 } type IfmaMsghdr struct { Msglen uint16 Version uint8 Type uint8 Addrs int32 Flags int32 Index uint16 _ uint16 } 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 _ uint16 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 Insns *BpfInsn } type BpfInsn struct { Code uint16 Jt uint8 Jf uint8 K uint32 } type BpfHdr struct { Tstamp Timeval Caplen uint32 Datalen uint32 Hdrlen uint16 _ [6]byte } type BpfZbufHeader struct { Kernel_gen uint32 Kernel_len uint32 User_gen uint32 _ [5]uint32 } type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Cc [20]uint8 Ispeed uint32 Ospeed uint32 } type Winsize struct { Row uint16 Col uint16 Xpixel uint16 Ypixel uint16 } const ( AT_FDCWD = -0x64 AT_EACCESS = 0x100 AT_SYMLINK_NOFOLLOW = 0x200 AT_SYMLINK_FOLLOW = 0x400 AT_REMOVEDIR = 0x800 ) type PollFd struct { Fd int32 Events int16 Revents int16 } const ( POLLERR = 0x8 POLLHUP = 0x10 POLLIN = 0x1 POLLINIGNEOF = 0x2000 POLLNVAL = 0x20 POLLOUT = 0x4 POLLPRI = 0x2 POLLRDBAND = 0x80 POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) type CapRights struct { Rights [2]uint64 } type Utsname struct { Sysname [256]byte Nodename [256]byte Release [256]byte Version [256]byte Machine [256]byte } const SizeofClockinfo = 0x14 type Clockinfo struct { Hz int32 Tick int32 Spare int32 Stathz int32 Profhz int32 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go ================================================ // cgo -godefs -- -fsigned-char types_freebsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && freebsd 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 Time_t 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 ( _statfsVersion = 0x20140518 _dirblksiz = 0x400 ) type Stat_t struct { Dev uint64 Ino uint64 Nlink uint64 Mode uint16 _0 int16 Uid uint32 Gid uint32 _1 int32 Rdev uint64 Atim Timespec Mtim Timespec Ctim Timespec Btim Timespec Size int64 Blocks int64 Blksize int32 Flags uint32 Gen uint64 Spare [10]uint64 } 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]byte Mntfromname [1024]byte Mntonname [1024]byte } type Flock_t struct { Start int64 Len int64 Pid int32 Type int16 Whence int16 Sysid int32 _ [4]byte } type Dirent struct { Fileno uint64 Off int64 Reclen uint16 Type uint8 Pad0 uint8 Namlen uint16 Pad1 uint16 Name [256]int8 } type Fsid struct { Val [2]int32 } const ( PathMax = 0x400 ) 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 Xucred struct { Version uint32 Uid uint32 Ngroups int16 Groups [16]uint32 _ *byte } 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 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 SizeofXucred = 0x58 SizeofLinger = 0x8 SizeofIovec = 0x10 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 PtraceLwpInfoStruct struct { Lwpid int32 Event int32 Flags int32 Sigmask Sigset_t Siglist Sigset_t Siginfo __PtraceSiginfo Tdname [20]int8 Child_pid int32 Syscall_code uint32 Syscall_narg uint32 } type __Siginfo struct { Signo int32 Errno int32 Code int32 Pid int32 Uid uint32 Status int32 Addr *byte Value [8]byte _ [40]byte } type __PtraceSiginfo struct { Signo int32 Errno int32 Code int32 Pid int32 Uid uint32 Status int32 Addr uintptr Value [8]byte _ [40]byte } type Sigset_t struct { Val [4]uint32 } type Reg struct { Ra uint64 Sp uint64 Gp uint64 Tp uint64 T [7]uint64 S [12]uint64 A [8]uint64 Sepc uint64 Sstatus uint64 } type FpReg struct { X [32][2]uint64 Fcsr uint64 } type FpExtendedPrecision struct{} type PtraceIoDesc struct { Op int32 Offs uintptr Addr *byte Len uint64 } type Kevent_t struct { Ident uint64 Filter int16 Flags uint16 Fflags uint32 Data int64 Udata *byte Ext [4]uint64 } type FdSet struct { 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 _ uint16 Data ifData } type IfMsghdr struct { Msglen uint16 Version uint8 Type uint8 Addrs int32 Flags int32 Index uint16 Data IfData } type ifData struct { Type uint8 Physical uint8 Addrlen uint8 Hdrlen uint8 Link_state uint8 Vhid uint8 Datalen uint16 Mtu uint32 Metric uint32 Baudrate uint64 Ipackets uint64 Ierrors uint64 Opackets uint64 Oerrors uint64 Collisions uint64 Ibytes uint64 Obytes uint64 Imcasts uint64 Omcasts uint64 Iqdrops uint64 Oqdrops uint64 Noproto uint64 Hwassist uint64 _ [8]byte _ [16]byte } 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 _ uint16 Metric int32 } type IfmaMsghdr struct { Msglen uint16 Version uint8 Type uint8 Addrs int32 Flags int32 Index uint16 _ uint16 } 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 _ uint16 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 Nhidx uint64 Filler [2]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 Insns *BpfInsn } type BpfInsn struct { Code uint16 Jt uint8 Jf uint8 K uint32 } type BpfHdr struct { Tstamp Timeval Caplen uint32 Datalen uint32 Hdrlen uint16 _ [6]byte } type BpfZbufHeader struct { Kernel_gen uint32 Kernel_len uint32 User_gen uint32 _ [5]uint32 } type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Cc [20]uint8 Ispeed uint32 Ospeed uint32 } type Winsize struct { Row uint16 Col uint16 Xpixel uint16 Ypixel uint16 } const ( AT_FDCWD = -0x64 AT_EACCESS = 0x100 AT_SYMLINK_NOFOLLOW = 0x200 AT_SYMLINK_FOLLOW = 0x400 AT_REMOVEDIR = 0x800 ) type PollFd struct { Fd int32 Events int16 Revents int16 } const ( POLLERR = 0x8 POLLHUP = 0x10 POLLIN = 0x1 POLLINIGNEOF = 0x2000 POLLNVAL = 0x20 POLLOUT = 0x4 POLLPRI = 0x2 POLLRDBAND = 0x80 POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) type CapRights struct { Rights [2]uint64 } type Utsname struct { Sysname [256]byte Nodename [256]byte Release [256]byte Version [256]byte Machine [256]byte } const SizeofClockinfo = 0x14 type Clockinfo struct { Hz int32 Tick int32 Spare int32 Stathz int32 Profhz int32 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_linux.go ================================================ // Code generated by mkmerge; DO NOT EDIT. //go:build linux package unix const ( SizeofShort = 0x2 SizeofInt = 0x4 SizeofLongLong = 0x8 PathMax = 0x1000 ) type ( _C_short int16 _C_int int32 _C_long_long int64 ) type ItimerSpec struct { Interval Timespec Value Timespec } type Itimerval struct { Interval Timeval Value Timeval } const ( ADJ_OFFSET = 0x1 ADJ_FREQUENCY = 0x2 ADJ_MAXERROR = 0x4 ADJ_ESTERROR = 0x8 ADJ_STATUS = 0x10 ADJ_TIMECONST = 0x20 ADJ_TAI = 0x80 ADJ_SETOFFSET = 0x100 ADJ_MICRO = 0x1000 ADJ_NANO = 0x2000 ADJ_TICK = 0x4000 ADJ_OFFSET_SINGLESHOT = 0x8001 ADJ_OFFSET_SS_READ = 0xa001 ) const ( STA_PLL = 0x1 STA_PPSFREQ = 0x2 STA_PPSTIME = 0x4 STA_FLL = 0x8 STA_INS = 0x10 STA_DEL = 0x20 STA_UNSYNC = 0x40 STA_FREQHOLD = 0x80 STA_PPSSIGNAL = 0x100 STA_PPSJITTER = 0x200 STA_PPSWANDER = 0x400 STA_PPSERROR = 0x800 STA_CLOCKERR = 0x1000 STA_NANO = 0x2000 STA_MODE = 0x4000 STA_CLK = 0x8000 ) const ( TIME_OK = 0x0 TIME_INS = 0x1 TIME_DEL = 0x2 TIME_OOP = 0x3 TIME_WAIT = 0x4 TIME_ERROR = 0x5 TIME_BAD = 0x5 ) type Rlimit struct { Cur uint64 Max uint64 } type _Gid_t uint32 type StatxTimestamp struct { Sec int64 Nsec uint32 _ int32 } type Statx_t struct { Mask uint32 Blksize uint32 Attributes uint64 Nlink uint32 Uid uint32 Gid uint32 Mode uint16 _ [1]uint16 Ino uint64 Size uint64 Blocks uint64 Attributes_mask uint64 Atime StatxTimestamp Btime StatxTimestamp Ctime StatxTimestamp Mtime StatxTimestamp Rdev_major uint32 Rdev_minor uint32 Dev_major uint32 Dev_minor uint32 Mnt_id uint64 Dio_mem_align uint32 Dio_offset_align uint32 Subvol uint64 _ [11]uint64 } type Fsid struct { Val [2]int32 } type FileCloneRange struct { Src_fd int64 Src_offset uint64 Src_length uint64 Dest_offset uint64 } type RawFileDedupeRange struct { Src_offset uint64 Src_length uint64 Dest_count uint16 Reserved1 uint16 Reserved2 uint32 } type RawFileDedupeRangeInfo struct { Dest_fd int64 Dest_offset uint64 Bytes_deduped uint64 Status int32 Reserved uint32 } const ( SizeofRawFileDedupeRange = 0x18 SizeofRawFileDedupeRangeInfo = 0x20 FILE_DEDUPE_RANGE_SAME = 0x0 FILE_DEDUPE_RANGE_DIFFERS = 0x1 ) type FscryptPolicy struct { Version uint8 Contents_encryption_mode uint8 Filenames_encryption_mode uint8 Flags uint8 Master_key_descriptor [8]uint8 } type FscryptKey struct { Mode uint32 Raw [64]uint8 Size uint32 } type FscryptPolicyV1 struct { Version uint8 Contents_encryption_mode uint8 Filenames_encryption_mode uint8 Flags uint8 Master_key_descriptor [8]uint8 } type FscryptPolicyV2 struct { Version uint8 Contents_encryption_mode uint8 Filenames_encryption_mode uint8 Flags uint8 Log2_data_unit_size uint8 _ [3]uint8 Master_key_identifier [16]uint8 } type FscryptGetPolicyExArg struct { Size uint64 Policy [24]byte } type FscryptKeySpecifier struct { Type uint32 _ uint32 U [32]byte } type FscryptAddKeyArg struct { Key_spec FscryptKeySpecifier Raw_size uint32 Key_id uint32 _ [8]uint32 } type FscryptRemoveKeyArg struct { Key_spec FscryptKeySpecifier Removal_status_flags uint32 _ [5]uint32 } type FscryptGetKeyStatusArg struct { Key_spec FscryptKeySpecifier _ [6]uint32 Status uint32 Status_flags uint32 User_count uint32 _ [13]uint32 } type DmIoctl struct { Version [3]uint32 Data_size uint32 Data_start uint32 Target_count uint32 Open_count int32 Flags uint32 Event_nr uint32 _ uint32 Dev uint64 Name [128]byte Uuid [129]byte Data [7]byte } type DmTargetSpec struct { Sector_start uint64 Length uint64 Status int32 Next uint32 Target_type [16]byte } type DmTargetDeps struct { Count uint32 _ uint32 } type DmTargetVersions struct { Next uint32 Version [3]uint32 } type DmTargetMsg struct { Sector uint64 } const ( SizeofDmIoctl = 0x138 SizeofDmTargetSpec = 0x28 ) type KeyctlDHParams struct { Private int32 Prime int32 Base int32 } const ( FADV_NORMAL = 0x0 FADV_RANDOM = 0x1 FADV_SEQUENTIAL = 0x2 FADV_WILLNEED = 0x3 ) 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 RawSockaddrHCI struct { Family uint16 Dev uint16 Channel uint16 } type RawSockaddrL2 struct { Family uint16 Psm uint16 Bdaddr [6]uint8 Cid uint16 Bdaddr_type uint8 _ [1]byte } type RawSockaddrRFCOMM struct { Family uint16 Bdaddr [6]uint8 Channel uint8 _ [1]byte } type RawSockaddrCAN struct { Family uint16 Ifindex int32 Addr [16]byte } type RawSockaddrALG struct { Family uint16 Type [14]uint8 Feat uint32 Mask uint32 Name [64]uint8 } type RawSockaddrVM struct { Family uint16 Reserved1 uint16 Port uint32 Cid uint32 Flags uint8 Zero [3]uint8 } type RawSockaddrXDP struct { Family uint16 Flags uint16 Ifindex uint32 Queue_id uint32 Shared_umem_fd uint32 } type RawSockaddrPPPoX [0x1e]byte type RawSockaddrTIPC struct { Family uint16 Addrtype uint8 Scope int8 Addr [12]byte } type RawSockaddrL2TPIP struct { Family uint16 Unused uint16 Addr [4]byte /* in_addr */ Conn_id uint32 _ [4]uint8 } type RawSockaddrL2TPIP6 struct { Family uint16 Unused uint16 Flowinfo uint32 Addr [16]byte /* in6_addr */ Scope_id uint32 Conn_id uint32 } type RawSockaddrIUCV struct { Family uint16 Port uint16 Addr uint32 Nodeid [8]int8 User_id [8]int8 Name [8]int8 } type RawSockaddrNFC struct { Sa_family uint16 Dev_idx uint32 Target_idx uint32 Nfc_protocol uint32 } type _Socklen uint32 type Linger struct { Onoff int32 Linger int32 } 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 PacketMreq struct { Ifindex int32 Type uint16 Alen uint16 Address [8]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 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 Pacing_rate uint64 Max_pacing_rate uint64 Bytes_acked uint64 Bytes_received uint64 Segs_out uint32 Segs_in uint32 Notsent_bytes uint32 Min_rtt uint32 Data_segs_in uint32 Data_segs_out uint32 Delivery_rate uint64 Busy_time uint64 Rwnd_limited uint64 Sndbuf_limited uint64 Delivered uint32 Delivered_ce uint32 Bytes_sent uint64 Bytes_retrans uint64 Dsack_dups uint32 Reord_seen uint32 Rcv_ooopack uint32 Snd_wnd uint32 Rcv_wnd uint32 Rehash uint32 Total_rto uint16 Total_rto_recoveries uint16 Total_rto_time uint32 } type CanFilter struct { Id uint32 Mask uint32 } type TCPRepairOpt struct { Code uint32 Val uint32 } const ( SizeofSockaddrInet4 = 0x10 SizeofSockaddrInet6 = 0x1c SizeofSockaddrAny = 0x70 SizeofSockaddrUnix = 0x6e SizeofSockaddrLinklayer = 0x14 SizeofSockaddrNetlink = 0xc SizeofSockaddrHCI = 0x6 SizeofSockaddrL2 = 0xe SizeofSockaddrRFCOMM = 0xa SizeofSockaddrCAN = 0x18 SizeofSockaddrALG = 0x58 SizeofSockaddrVM = 0x10 SizeofSockaddrXDP = 0x10 SizeofSockaddrPPPoX = 0x1e SizeofSockaddrTIPC = 0x10 SizeofSockaddrL2TPIP = 0x10 SizeofSockaddrL2TPIP6 = 0x20 SizeofSockaddrIUCV = 0x20 SizeofSockaddrNFC = 0x10 SizeofLinger = 0x8 SizeofIPMreq = 0x8 SizeofIPMreqn = 0xc SizeofIPv6Mreq = 0x14 SizeofPacketMreq = 0x10 SizeofInet4Pktinfo = 0xc SizeofInet6Pktinfo = 0x14 SizeofIPv6MTUInfo = 0x20 SizeofICMPv6Filter = 0x20 SizeofUcred = 0xc SizeofTCPInfo = 0xf8 SizeofCanFilter = 0x8 SizeofTCPRepairOpt = 0x8 ) const ( NDA_UNSPEC = 0x0 NDA_DST = 0x1 NDA_LLADDR = 0x2 NDA_CACHEINFO = 0x3 NDA_PROBES = 0x4 NDA_VLAN = 0x5 NDA_PORT = 0x6 NDA_VNI = 0x7 NDA_IFINDEX = 0x8 NDA_MASTER = 0x9 NDA_LINK_NETNSID = 0xa NDA_SRC_VNI = 0xb NTF_USE = 0x1 NTF_SELF = 0x2 NTF_MASTER = 0x4 NTF_PROXY = 0x8 NTF_EXT_LEARNED = 0x10 NTF_OFFLOADED = 0x20 NTF_ROUTER = 0x80 NUD_INCOMPLETE = 0x1 NUD_REACHABLE = 0x2 NUD_STALE = 0x4 NUD_DELAY = 0x8 NUD_PROBE = 0x10 NUD_FAILED = 0x20 NUD_NOARP = 0x40 NUD_PERMANENT = 0x80 NUD_NONE = 0x0 IFA_UNSPEC = 0x0 IFA_ADDRESS = 0x1 IFA_LOCAL = 0x2 IFA_LABEL = 0x3 IFA_BROADCAST = 0x4 IFA_ANYCAST = 0x5 IFA_CACHEINFO = 0x6 IFA_MULTICAST = 0x7 IFA_FLAGS = 0x8 IFA_RT_PRIORITY = 0x9 IFA_TARGET_NETNSID = 0xa 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 RTA_MARK = 0x10 RTA_MFC_STATS = 0x11 RTA_VIA = 0x12 RTA_NEWDST = 0x13 RTA_PREF = 0x14 RTA_ENCAP_TYPE = 0x15 RTA_ENCAP = 0x16 RTA_EXPIRES = 0x17 RTA_PAD = 0x18 RTA_UID = 0x19 RTA_TTL_PROPAGATE = 0x1a RTA_IP_PROTO = 0x1b RTA_SPORT = 0x1c RTA_DPORT = 0x1d 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 SizeofNlMsghdr = 0x10 SizeofNlMsgerr = 0x14 SizeofRtGenmsg = 0x1 SizeofNlAttr = 0x4 SizeofRtAttr = 0x4 SizeofIfInfomsg = 0x10 SizeofIfAddrmsg = 0x8 SizeofIfaCacheinfo = 0x10 SizeofRtMsg = 0xc SizeofRtNexthop = 0x8 SizeofNdUseroptmsg = 0x10 SizeofNdMsg = 0xc ) 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 _ uint8 Type uint16 Index int32 Flags uint32 Change uint32 } type IfAddrmsg struct { Family uint8 Prefixlen uint8 Flags uint8 Scope uint8 Index uint32 } type IfaCacheinfo struct { Prefered uint32 Valid uint32 Cstamp uint32 Tstamp 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 } type NdUseroptmsg struct { Family uint8 Pad1 uint8 Opts_len uint16 Ifindex int32 Icmp_type uint8 Icmp_code uint8 Pad2 uint16 Pad3 uint32 } type NdMsg struct { Family uint8 Pad1 uint8 Pad2 uint16 Ifindex int32 State uint16 Flags uint8 Type uint8 } const ( ICMP_FILTER = 0x1 ICMPV6_FILTER = 0x1 ICMPV6_FILTER_BLOCK = 0x1 ICMPV6_FILTER_BLOCKOTHERS = 0x3 ICMPV6_FILTER_PASS = 0x2 ICMPV6_FILTER_PASSONLY = 0x4 ) const ( SizeofSockFilter = 0x8 ) type SockFilter struct { Code uint16 Jt uint8 Jf uint8 K uint32 } type SockFprog struct { Len uint16 Filter *SockFilter } type InotifyEvent struct { Wd int32 Mask uint32 Cookie uint32 Len uint32 } const SizeofInotifyEvent = 0x10 const SI_LOAD_SHIFT = 0x10 type Utsname struct { Sysname [65]byte Nodename [65]byte Release [65]byte Version [65]byte Machine [65]byte Domainname [65]byte } const ( AT_EMPTY_PATH = 0x1000 AT_FDCWD = -0x64 AT_NO_AUTOMOUNT = 0x800 AT_REMOVEDIR = 0x200 AT_STATX_SYNC_AS_STAT = 0x0 AT_STATX_FORCE_SYNC = 0x2000 AT_STATX_DONT_SYNC = 0x4000 AT_RECURSIVE = 0x8000 AT_SYMLINK_FOLLOW = 0x400 AT_SYMLINK_NOFOLLOW = 0x100 AT_EACCESS = 0x200 OPEN_TREE_CLONE = 0x1 MOVE_MOUNT_F_SYMLINKS = 0x1 MOVE_MOUNT_F_AUTOMOUNTS = 0x2 MOVE_MOUNT_F_EMPTY_PATH = 0x4 MOVE_MOUNT_T_SYMLINKS = 0x10 MOVE_MOUNT_T_AUTOMOUNTS = 0x20 MOVE_MOUNT_T_EMPTY_PATH = 0x40 MOVE_MOUNT_SET_GROUP = 0x100 FSOPEN_CLOEXEC = 0x1 FSPICK_CLOEXEC = 0x1 FSPICK_SYMLINK_NOFOLLOW = 0x2 FSPICK_NO_AUTOMOUNT = 0x4 FSPICK_EMPTY_PATH = 0x8 FSMOUNT_CLOEXEC = 0x1 FSCONFIG_SET_FLAG = 0x0 FSCONFIG_SET_STRING = 0x1 FSCONFIG_SET_BINARY = 0x2 FSCONFIG_SET_PATH = 0x3 FSCONFIG_SET_PATH_EMPTY = 0x4 FSCONFIG_SET_FD = 0x5 FSCONFIG_CMD_CREATE = 0x6 FSCONFIG_CMD_RECONFIGURE = 0x7 ) type OpenHow struct { Flags uint64 Mode uint64 Resolve uint64 } const SizeofOpenHow = 0x18 const ( RESOLVE_BENEATH = 0x8 RESOLVE_IN_ROOT = 0x10 RESOLVE_NO_MAGICLINKS = 0x2 RESOLVE_NO_SYMLINKS = 0x4 RESOLVE_NO_XDEV = 0x1 ) type PollFd struct { Fd int32 Events int16 Revents int16 } const ( POLLIN = 0x1 POLLPRI = 0x2 POLLOUT = 0x4 POLLERR = 0x8 POLLHUP = 0x10 POLLNVAL = 0x20 ) type sigset_argpack struct { ss *Sigset_t ssLen uintptr } type SignalfdSiginfo struct { Signo uint32 Errno int32 Code int32 Pid uint32 Uid uint32 Fd int32 Tid uint32 Band uint32 Overrun uint32 Trapno uint32 Status int32 Int int32 Ptr uint64 Utime uint64 Stime uint64 Addr uint64 Addr_lsb uint16 _ uint16 Syscall int32 Call_addr uint64 Arch uint32 _ [28]uint8 } type Winsize struct { Row uint16 Col uint16 Xpixel uint16 Ypixel uint16 } const ( TASKSTATS_CMD_UNSPEC = 0x0 TASKSTATS_CMD_GET = 0x1 TASKSTATS_CMD_NEW = 0x2 TASKSTATS_TYPE_UNSPEC = 0x0 TASKSTATS_TYPE_PID = 0x1 TASKSTATS_TYPE_TGID = 0x2 TASKSTATS_TYPE_STATS = 0x3 TASKSTATS_TYPE_AGGR_PID = 0x4 TASKSTATS_TYPE_AGGR_TGID = 0x5 TASKSTATS_TYPE_NULL = 0x6 TASKSTATS_CMD_ATTR_UNSPEC = 0x0 TASKSTATS_CMD_ATTR_PID = 0x1 TASKSTATS_CMD_ATTR_TGID = 0x2 TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3 TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4 ) type CGroupStats struct { Sleeping uint64 Running uint64 Stopped uint64 Uninterruptible uint64 Io_wait uint64 } const ( CGROUPSTATS_CMD_UNSPEC = 0x3 CGROUPSTATS_CMD_GET = 0x4 CGROUPSTATS_CMD_NEW = 0x5 CGROUPSTATS_TYPE_UNSPEC = 0x0 CGROUPSTATS_TYPE_CGROUP_STATS = 0x1 CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0 CGROUPSTATS_CMD_ATTR_FD = 0x1 ) type Genlmsghdr struct { Cmd uint8 Version uint8 Reserved uint16 } const ( CTRL_CMD_UNSPEC = 0x0 CTRL_CMD_NEWFAMILY = 0x1 CTRL_CMD_DELFAMILY = 0x2 CTRL_CMD_GETFAMILY = 0x3 CTRL_CMD_NEWOPS = 0x4 CTRL_CMD_DELOPS = 0x5 CTRL_CMD_GETOPS = 0x6 CTRL_CMD_NEWMCAST_GRP = 0x7 CTRL_CMD_DELMCAST_GRP = 0x8 CTRL_CMD_GETMCAST_GRP = 0x9 CTRL_CMD_GETPOLICY = 0xa CTRL_ATTR_UNSPEC = 0x0 CTRL_ATTR_FAMILY_ID = 0x1 CTRL_ATTR_FAMILY_NAME = 0x2 CTRL_ATTR_VERSION = 0x3 CTRL_ATTR_HDRSIZE = 0x4 CTRL_ATTR_MAXATTR = 0x5 CTRL_ATTR_OPS = 0x6 CTRL_ATTR_MCAST_GROUPS = 0x7 CTRL_ATTR_POLICY = 0x8 CTRL_ATTR_OP_POLICY = 0x9 CTRL_ATTR_OP = 0xa CTRL_ATTR_OP_UNSPEC = 0x0 CTRL_ATTR_OP_ID = 0x1 CTRL_ATTR_OP_FLAGS = 0x2 CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0 CTRL_ATTR_MCAST_GRP_NAME = 0x1 CTRL_ATTR_MCAST_GRP_ID = 0x2 CTRL_ATTR_POLICY_UNSPEC = 0x0 CTRL_ATTR_POLICY_DO = 0x1 CTRL_ATTR_POLICY_DUMP = 0x2 CTRL_ATTR_POLICY_DUMP_MAX = 0x2 ) const ( _CPU_SETSIZE = 0x400 ) const ( BDADDR_BREDR = 0x0 BDADDR_LE_PUBLIC = 0x1 BDADDR_LE_RANDOM = 0x2 ) type PerfEventAttr struct { Type uint32 Size uint32 Config uint64 Sample uint64 Sample_type uint64 Read_format uint64 Bits uint64 Wakeup uint32 Bp_type uint32 Ext1 uint64 Ext2 uint64 Branch_sample_type uint64 Sample_regs_user uint64 Sample_stack_user uint32 Clockid int32 Sample_regs_intr uint64 Aux_watermark uint32 Sample_max_stack uint16 _ uint16 Aux_sample_size uint32 _ uint32 Sig_data uint64 } type PerfEventMmapPage struct { Version uint32 Compat_version uint32 Lock uint32 Index uint32 Offset int64 Time_enabled uint64 Time_running uint64 Capabilities uint64 Pmc_width uint16 Time_shift uint16 Time_mult uint32 Time_offset uint64 Time_zero uint64 Size uint32 _ uint32 Time_cycles uint64 Time_mask uint64 _ [928]uint8 Data_head uint64 Data_tail uint64 Data_offset uint64 Data_size uint64 Aux_head uint64 Aux_tail uint64 Aux_offset uint64 Aux_size uint64 } const ( PerfBitDisabled uint64 = CBitFieldMaskBit0 PerfBitInherit = CBitFieldMaskBit1 PerfBitPinned = CBitFieldMaskBit2 PerfBitExclusive = CBitFieldMaskBit3 PerfBitExcludeUser = CBitFieldMaskBit4 PerfBitExcludeKernel = CBitFieldMaskBit5 PerfBitExcludeHv = CBitFieldMaskBit6 PerfBitExcludeIdle = CBitFieldMaskBit7 PerfBitMmap = CBitFieldMaskBit8 PerfBitComm = CBitFieldMaskBit9 PerfBitFreq = CBitFieldMaskBit10 PerfBitInheritStat = CBitFieldMaskBit11 PerfBitEnableOnExec = CBitFieldMaskBit12 PerfBitTask = CBitFieldMaskBit13 PerfBitWatermark = CBitFieldMaskBit14 PerfBitPreciseIPBit1 = CBitFieldMaskBit15 PerfBitPreciseIPBit2 = CBitFieldMaskBit16 PerfBitMmapData = CBitFieldMaskBit17 PerfBitSampleIDAll = CBitFieldMaskBit18 PerfBitExcludeHost = CBitFieldMaskBit19 PerfBitExcludeGuest = CBitFieldMaskBit20 PerfBitExcludeCallchainKernel = CBitFieldMaskBit21 PerfBitExcludeCallchainUser = CBitFieldMaskBit22 PerfBitMmap2 = CBitFieldMaskBit23 PerfBitCommExec = CBitFieldMaskBit24 PerfBitUseClockID = CBitFieldMaskBit25 PerfBitContextSwitch = CBitFieldMaskBit26 PerfBitWriteBackward = CBitFieldMaskBit27 ) const ( PERF_TYPE_HARDWARE = 0x0 PERF_TYPE_SOFTWARE = 0x1 PERF_TYPE_TRACEPOINT = 0x2 PERF_TYPE_HW_CACHE = 0x3 PERF_TYPE_RAW = 0x4 PERF_TYPE_BREAKPOINT = 0x5 PERF_TYPE_MAX = 0x6 PERF_COUNT_HW_CPU_CYCLES = 0x0 PERF_COUNT_HW_INSTRUCTIONS = 0x1 PERF_COUNT_HW_CACHE_REFERENCES = 0x2 PERF_COUNT_HW_CACHE_MISSES = 0x3 PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4 PERF_COUNT_HW_BRANCH_MISSES = 0x5 PERF_COUNT_HW_BUS_CYCLES = 0x6 PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7 PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8 PERF_COUNT_HW_REF_CPU_CYCLES = 0x9 PERF_COUNT_HW_MAX = 0xa PERF_COUNT_HW_CACHE_L1D = 0x0 PERF_COUNT_HW_CACHE_L1I = 0x1 PERF_COUNT_HW_CACHE_LL = 0x2 PERF_COUNT_HW_CACHE_DTLB = 0x3 PERF_COUNT_HW_CACHE_ITLB = 0x4 PERF_COUNT_HW_CACHE_BPU = 0x5 PERF_COUNT_HW_CACHE_NODE = 0x6 PERF_COUNT_HW_CACHE_MAX = 0x7 PERF_COUNT_HW_CACHE_OP_READ = 0x0 PERF_COUNT_HW_CACHE_OP_WRITE = 0x1 PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2 PERF_COUNT_HW_CACHE_OP_MAX = 0x3 PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0 PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1 PERF_COUNT_HW_CACHE_RESULT_MAX = 0x2 PERF_COUNT_SW_CPU_CLOCK = 0x0 PERF_COUNT_SW_TASK_CLOCK = 0x1 PERF_COUNT_SW_PAGE_FAULTS = 0x2 PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3 PERF_COUNT_SW_CPU_MIGRATIONS = 0x4 PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5 PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6 PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7 PERF_COUNT_SW_EMULATION_FAULTS = 0x8 PERF_COUNT_SW_DUMMY = 0x9 PERF_COUNT_SW_BPF_OUTPUT = 0xa PERF_COUNT_SW_MAX = 0xc PERF_SAMPLE_IP = 0x1 PERF_SAMPLE_TID = 0x2 PERF_SAMPLE_TIME = 0x4 PERF_SAMPLE_ADDR = 0x8 PERF_SAMPLE_READ = 0x10 PERF_SAMPLE_CALLCHAIN = 0x20 PERF_SAMPLE_ID = 0x40 PERF_SAMPLE_CPU = 0x80 PERF_SAMPLE_PERIOD = 0x100 PERF_SAMPLE_STREAM_ID = 0x200 PERF_SAMPLE_RAW = 0x400 PERF_SAMPLE_BRANCH_STACK = 0x800 PERF_SAMPLE_REGS_USER = 0x1000 PERF_SAMPLE_STACK_USER = 0x2000 PERF_SAMPLE_WEIGHT = 0x4000 PERF_SAMPLE_DATA_SRC = 0x8000 PERF_SAMPLE_IDENTIFIER = 0x10000 PERF_SAMPLE_TRANSACTION = 0x20000 PERF_SAMPLE_REGS_INTR = 0x40000 PERF_SAMPLE_PHYS_ADDR = 0x80000 PERF_SAMPLE_AUX = 0x100000 PERF_SAMPLE_CGROUP = 0x200000 PERF_SAMPLE_DATA_PAGE_SIZE = 0x400000 PERF_SAMPLE_CODE_PAGE_SIZE = 0x800000 PERF_SAMPLE_WEIGHT_STRUCT = 0x1000000 PERF_SAMPLE_MAX = 0x2000000 PERF_SAMPLE_BRANCH_USER_SHIFT = 0x0 PERF_SAMPLE_BRANCH_KERNEL_SHIFT = 0x1 PERF_SAMPLE_BRANCH_HV_SHIFT = 0x2 PERF_SAMPLE_BRANCH_ANY_SHIFT = 0x3 PERF_SAMPLE_BRANCH_ANY_CALL_SHIFT = 0x4 PERF_SAMPLE_BRANCH_ANY_RETURN_SHIFT = 0x5 PERF_SAMPLE_BRANCH_IND_CALL_SHIFT = 0x6 PERF_SAMPLE_BRANCH_ABORT_TX_SHIFT = 0x7 PERF_SAMPLE_BRANCH_IN_TX_SHIFT = 0x8 PERF_SAMPLE_BRANCH_NO_TX_SHIFT = 0x9 PERF_SAMPLE_BRANCH_COND_SHIFT = 0xa PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT = 0xb PERF_SAMPLE_BRANCH_IND_JUMP_SHIFT = 0xc PERF_SAMPLE_BRANCH_CALL_SHIFT = 0xd PERF_SAMPLE_BRANCH_NO_FLAGS_SHIFT = 0xe PERF_SAMPLE_BRANCH_NO_CYCLES_SHIFT = 0xf PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT = 0x10 PERF_SAMPLE_BRANCH_HW_INDEX_SHIFT = 0x11 PERF_SAMPLE_BRANCH_PRIV_SAVE_SHIFT = 0x12 PERF_SAMPLE_BRANCH_COUNTERS = 0x80000 PERF_SAMPLE_BRANCH_MAX_SHIFT = 0x14 PERF_SAMPLE_BRANCH_USER = 0x1 PERF_SAMPLE_BRANCH_KERNEL = 0x2 PERF_SAMPLE_BRANCH_HV = 0x4 PERF_SAMPLE_BRANCH_ANY = 0x8 PERF_SAMPLE_BRANCH_ANY_CALL = 0x10 PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20 PERF_SAMPLE_BRANCH_IND_CALL = 0x40 PERF_SAMPLE_BRANCH_ABORT_TX = 0x80 PERF_SAMPLE_BRANCH_IN_TX = 0x100 PERF_SAMPLE_BRANCH_NO_TX = 0x200 PERF_SAMPLE_BRANCH_COND = 0x400 PERF_SAMPLE_BRANCH_CALL_STACK = 0x800 PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000 PERF_SAMPLE_BRANCH_CALL = 0x2000 PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000 PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000 PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000 PERF_SAMPLE_BRANCH_HW_INDEX = 0x20000 PERF_SAMPLE_BRANCH_PRIV_SAVE = 0x40000 PERF_SAMPLE_BRANCH_MAX = 0x100000 PERF_BR_UNKNOWN = 0x0 PERF_BR_COND = 0x1 PERF_BR_UNCOND = 0x2 PERF_BR_IND = 0x3 PERF_BR_CALL = 0x4 PERF_BR_IND_CALL = 0x5 PERF_BR_RET = 0x6 PERF_BR_SYSCALL = 0x7 PERF_BR_SYSRET = 0x8 PERF_BR_COND_CALL = 0x9 PERF_BR_COND_RET = 0xa PERF_BR_ERET = 0xb PERF_BR_IRQ = 0xc PERF_BR_SERROR = 0xd PERF_BR_NO_TX = 0xe PERF_BR_EXTEND_ABI = 0xf PERF_BR_MAX = 0x10 PERF_SAMPLE_REGS_ABI_NONE = 0x0 PERF_SAMPLE_REGS_ABI_32 = 0x1 PERF_SAMPLE_REGS_ABI_64 = 0x2 PERF_TXN_ELISION = 0x1 PERF_TXN_TRANSACTION = 0x2 PERF_TXN_SYNC = 0x4 PERF_TXN_ASYNC = 0x8 PERF_TXN_RETRY = 0x10 PERF_TXN_CONFLICT = 0x20 PERF_TXN_CAPACITY_WRITE = 0x40 PERF_TXN_CAPACITY_READ = 0x80 PERF_TXN_MAX = 0x100 PERF_TXN_ABORT_MASK = -0x100000000 PERF_TXN_ABORT_SHIFT = 0x20 PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1 PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2 PERF_FORMAT_ID = 0x4 PERF_FORMAT_GROUP = 0x8 PERF_FORMAT_LOST = 0x10 PERF_FORMAT_MAX = 0x20 PERF_IOC_FLAG_GROUP = 0x1 PERF_RECORD_MMAP = 0x1 PERF_RECORD_LOST = 0x2 PERF_RECORD_COMM = 0x3 PERF_RECORD_EXIT = 0x4 PERF_RECORD_THROTTLE = 0x5 PERF_RECORD_UNTHROTTLE = 0x6 PERF_RECORD_FORK = 0x7 PERF_RECORD_READ = 0x8 PERF_RECORD_SAMPLE = 0x9 PERF_RECORD_MMAP2 = 0xa PERF_RECORD_AUX = 0xb PERF_RECORD_ITRACE_START = 0xc PERF_RECORD_LOST_SAMPLES = 0xd PERF_RECORD_SWITCH = 0xe PERF_RECORD_SWITCH_CPU_WIDE = 0xf PERF_RECORD_NAMESPACES = 0x10 PERF_RECORD_KSYMBOL = 0x11 PERF_RECORD_BPF_EVENT = 0x12 PERF_RECORD_CGROUP = 0x13 PERF_RECORD_TEXT_POKE = 0x14 PERF_RECORD_AUX_OUTPUT_HW_ID = 0x15 PERF_RECORD_MAX = 0x16 PERF_RECORD_KSYMBOL_TYPE_UNKNOWN = 0x0 PERF_RECORD_KSYMBOL_TYPE_BPF = 0x1 PERF_RECORD_KSYMBOL_TYPE_OOL = 0x2 PERF_RECORD_KSYMBOL_TYPE_MAX = 0x3 PERF_BPF_EVENT_UNKNOWN = 0x0 PERF_BPF_EVENT_PROG_LOAD = 0x1 PERF_BPF_EVENT_PROG_UNLOAD = 0x2 PERF_BPF_EVENT_MAX = 0x3 PERF_CONTEXT_HV = -0x20 PERF_CONTEXT_KERNEL = -0x80 PERF_CONTEXT_USER = -0x200 PERF_CONTEXT_GUEST = -0x800 PERF_CONTEXT_GUEST_KERNEL = -0x880 PERF_CONTEXT_GUEST_USER = -0xa00 PERF_CONTEXT_MAX = -0xfff ) type TCPMD5Sig struct { Addr SockaddrStorage Flags uint8 Prefixlen uint8 Keylen uint16 Ifindex int32 Key [80]uint8 } type HDDriveCmdHdr struct { Command uint8 Number uint8 Feature uint8 Count uint8 } type HDDriveID struct { Config uint16 Cyls uint16 Reserved2 uint16 Heads uint16 Track_bytes uint16 Sector_bytes uint16 Sectors uint16 Vendor0 uint16 Vendor1 uint16 Vendor2 uint16 Serial_no [20]uint8 Buf_type uint16 Buf_size uint16 Ecc_bytes uint16 Fw_rev [8]uint8 Model [40]uint8 Max_multsect uint8 Vendor3 uint8 Dword_io uint16 Vendor4 uint8 Capability uint8 Reserved50 uint16 Vendor5 uint8 TPIO uint8 Vendor6 uint8 TDMA uint8 Field_valid uint16 Cur_cyls uint16 Cur_heads uint16 Cur_sectors uint16 Cur_capacity0 uint16 Cur_capacity1 uint16 Multsect uint8 Multsect_valid uint8 Lba_capacity uint32 Dma_1word uint16 Dma_mword uint16 Eide_pio_modes uint16 Eide_dma_min uint16 Eide_dma_time uint16 Eide_pio uint16 Eide_pio_iordy uint16 Words69_70 [2]uint16 Words71_74 [4]uint16 Queue_depth uint16 Words76_79 [4]uint16 Major_rev_num uint16 Minor_rev_num uint16 Command_set_1 uint16 Command_set_2 uint16 Cfsse uint16 Cfs_enable_1 uint16 Cfs_enable_2 uint16 Csf_default uint16 Dma_ultra uint16 Trseuc uint16 TrsEuc uint16 CurAPMvalues uint16 Mprc uint16 Hw_config uint16 Acoustic uint16 Msrqs uint16 Sxfert uint16 Sal uint16 Spg uint32 Lba_capacity_2 uint64 Words104_125 [22]uint16 Last_lun uint16 Word127 uint16 Dlf uint16 Csfo uint16 Words130_155 [26]uint16 Word156 uint16 Words157_159 [3]uint16 Cfa_power uint16 Words161_175 [15]uint16 Words176_205 [30]uint16 Words206_254 [49]uint16 Integrity_word uint16 } const ( ST_MANDLOCK = 0x40 ST_NOATIME = 0x400 ST_NODEV = 0x4 ST_NODIRATIME = 0x800 ST_NOEXEC = 0x8 ST_NOSUID = 0x2 ST_RDONLY = 0x1 ST_RELATIME = 0x1000 ST_SYNCHRONOUS = 0x10 ) type Tpacket2Hdr struct { Status uint32 Len uint32 Snaplen uint32 Mac uint16 Net uint16 Sec uint32 Nsec uint32 Vlan_tci uint16 Vlan_tpid uint16 _ [4]uint8 } type Tpacket3Hdr struct { Next_offset uint32 Sec uint32 Nsec uint32 Snaplen uint32 Len uint32 Status uint32 Mac uint16 Net uint16 Hv1 TpacketHdrVariant1 _ [8]uint8 } type TpacketHdrVariant1 struct { Rxhash uint32 Vlan_tci uint32 Vlan_tpid uint16 _ uint16 } type TpacketBlockDesc struct { Version uint32 To_priv uint32 Hdr [40]byte } type TpacketBDTS struct { Sec uint32 Usec uint32 } type TpacketHdrV1 struct { Block_status uint32 Num_pkts uint32 Offset_to_first_pkt uint32 Blk_len uint32 Seq_num uint64 Ts_first_pkt TpacketBDTS Ts_last_pkt TpacketBDTS } type TpacketReq struct { Block_size uint32 Block_nr uint32 Frame_size uint32 Frame_nr uint32 } type TpacketReq3 struct { Block_size uint32 Block_nr uint32 Frame_size uint32 Frame_nr uint32 Retire_blk_tov uint32 Sizeof_priv uint32 Feature_req_word uint32 } type TpacketStats struct { Packets uint32 Drops uint32 } type TpacketStatsV3 struct { Packets uint32 Drops uint32 Freeze_q_cnt uint32 } type TpacketAuxdata struct { Status uint32 Len uint32 Snaplen uint32 Mac uint16 Net uint16 Vlan_tci uint16 Vlan_tpid uint16 } const ( TPACKET_V1 = 0x0 TPACKET_V2 = 0x1 TPACKET_V3 = 0x2 ) const ( SizeofTpacket2Hdr = 0x20 SizeofTpacket3Hdr = 0x30 SizeofTpacketStats = 0x8 SizeofTpacketStatsV3 = 0xc ) const ( 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_NUM_VF = 0x15 IFLA_VFINFO_LIST = 0x16 IFLA_STATS64 = 0x17 IFLA_VF_PORTS = 0x18 IFLA_PORT_SELF = 0x19 IFLA_AF_SPEC = 0x1a IFLA_GROUP = 0x1b IFLA_NET_NS_FD = 0x1c IFLA_EXT_MASK = 0x1d IFLA_PROMISCUITY = 0x1e IFLA_NUM_TX_QUEUES = 0x1f IFLA_NUM_RX_QUEUES = 0x20 IFLA_CARRIER = 0x21 IFLA_PHYS_PORT_ID = 0x22 IFLA_CARRIER_CHANGES = 0x23 IFLA_PHYS_SWITCH_ID = 0x24 IFLA_LINK_NETNSID = 0x25 IFLA_PHYS_PORT_NAME = 0x26 IFLA_PROTO_DOWN = 0x27 IFLA_GSO_MAX_SEGS = 0x28 IFLA_GSO_MAX_SIZE = 0x29 IFLA_PAD = 0x2a IFLA_XDP = 0x2b IFLA_EVENT = 0x2c IFLA_NEW_NETNSID = 0x2d IFLA_IF_NETNSID = 0x2e IFLA_TARGET_NETNSID = 0x2e IFLA_CARRIER_UP_COUNT = 0x2f IFLA_CARRIER_DOWN_COUNT = 0x30 IFLA_NEW_IFINDEX = 0x31 IFLA_MIN_MTU = 0x32 IFLA_MAX_MTU = 0x33 IFLA_PROP_LIST = 0x34 IFLA_ALT_IFNAME = 0x35 IFLA_PERM_ADDRESS = 0x36 IFLA_PROTO_DOWN_REASON = 0x37 IFLA_PARENT_DEV_NAME = 0x38 IFLA_PARENT_DEV_BUS_NAME = 0x39 IFLA_GRO_MAX_SIZE = 0x3a IFLA_TSO_MAX_SIZE = 0x3b IFLA_TSO_MAX_SEGS = 0x3c IFLA_ALLMULTI = 0x3d IFLA_DEVLINK_PORT = 0x3e IFLA_GSO_IPV4_MAX_SIZE = 0x3f IFLA_GRO_IPV4_MAX_SIZE = 0x40 IFLA_DPLL_PIN = 0x41 IFLA_PROTO_DOWN_REASON_UNSPEC = 0x0 IFLA_PROTO_DOWN_REASON_MASK = 0x1 IFLA_PROTO_DOWN_REASON_VALUE = 0x2 IFLA_PROTO_DOWN_REASON_MAX = 0x2 IFLA_INET_UNSPEC = 0x0 IFLA_INET_CONF = 0x1 IFLA_INET6_UNSPEC = 0x0 IFLA_INET6_FLAGS = 0x1 IFLA_INET6_CONF = 0x2 IFLA_INET6_STATS = 0x3 IFLA_INET6_MCAST = 0x4 IFLA_INET6_CACHEINFO = 0x5 IFLA_INET6_ICMP6STATS = 0x6 IFLA_INET6_TOKEN = 0x7 IFLA_INET6_ADDR_GEN_MODE = 0x8 IFLA_INET6_RA_MTU = 0x9 IFLA_BR_UNSPEC = 0x0 IFLA_BR_FORWARD_DELAY = 0x1 IFLA_BR_HELLO_TIME = 0x2 IFLA_BR_MAX_AGE = 0x3 IFLA_BR_AGEING_TIME = 0x4 IFLA_BR_STP_STATE = 0x5 IFLA_BR_PRIORITY = 0x6 IFLA_BR_VLAN_FILTERING = 0x7 IFLA_BR_VLAN_PROTOCOL = 0x8 IFLA_BR_GROUP_FWD_MASK = 0x9 IFLA_BR_ROOT_ID = 0xa IFLA_BR_BRIDGE_ID = 0xb IFLA_BR_ROOT_PORT = 0xc IFLA_BR_ROOT_PATH_COST = 0xd IFLA_BR_TOPOLOGY_CHANGE = 0xe IFLA_BR_TOPOLOGY_CHANGE_DETECTED = 0xf IFLA_BR_HELLO_TIMER = 0x10 IFLA_BR_TCN_TIMER = 0x11 IFLA_BR_TOPOLOGY_CHANGE_TIMER = 0x12 IFLA_BR_GC_TIMER = 0x13 IFLA_BR_GROUP_ADDR = 0x14 IFLA_BR_FDB_FLUSH = 0x15 IFLA_BR_MCAST_ROUTER = 0x16 IFLA_BR_MCAST_SNOOPING = 0x17 IFLA_BR_MCAST_QUERY_USE_IFADDR = 0x18 IFLA_BR_MCAST_QUERIER = 0x19 IFLA_BR_MCAST_HASH_ELASTICITY = 0x1a IFLA_BR_MCAST_HASH_MAX = 0x1b IFLA_BR_MCAST_LAST_MEMBER_CNT = 0x1c IFLA_BR_MCAST_STARTUP_QUERY_CNT = 0x1d IFLA_BR_MCAST_LAST_MEMBER_INTVL = 0x1e IFLA_BR_MCAST_MEMBERSHIP_INTVL = 0x1f IFLA_BR_MCAST_QUERIER_INTVL = 0x20 IFLA_BR_MCAST_QUERY_INTVL = 0x21 IFLA_BR_MCAST_QUERY_RESPONSE_INTVL = 0x22 IFLA_BR_MCAST_STARTUP_QUERY_INTVL = 0x23 IFLA_BR_NF_CALL_IPTABLES = 0x24 IFLA_BR_NF_CALL_IP6TABLES = 0x25 IFLA_BR_NF_CALL_ARPTABLES = 0x26 IFLA_BR_VLAN_DEFAULT_PVID = 0x27 IFLA_BR_PAD = 0x28 IFLA_BR_VLAN_STATS_ENABLED = 0x29 IFLA_BR_MCAST_STATS_ENABLED = 0x2a IFLA_BR_MCAST_IGMP_VERSION = 0x2b IFLA_BR_MCAST_MLD_VERSION = 0x2c IFLA_BR_VLAN_STATS_PER_PORT = 0x2d IFLA_BR_MULTI_BOOLOPT = 0x2e IFLA_BR_MCAST_QUERIER_STATE = 0x2f IFLA_BR_FDB_N_LEARNED = 0x30 IFLA_BR_FDB_MAX_LEARNED = 0x31 IFLA_BRPORT_UNSPEC = 0x0 IFLA_BRPORT_STATE = 0x1 IFLA_BRPORT_PRIORITY = 0x2 IFLA_BRPORT_COST = 0x3 IFLA_BRPORT_MODE = 0x4 IFLA_BRPORT_GUARD = 0x5 IFLA_BRPORT_PROTECT = 0x6 IFLA_BRPORT_FAST_LEAVE = 0x7 IFLA_BRPORT_LEARNING = 0x8 IFLA_BRPORT_UNICAST_FLOOD = 0x9 IFLA_BRPORT_PROXYARP = 0xa IFLA_BRPORT_LEARNING_SYNC = 0xb IFLA_BRPORT_PROXYARP_WIFI = 0xc IFLA_BRPORT_ROOT_ID = 0xd IFLA_BRPORT_BRIDGE_ID = 0xe IFLA_BRPORT_DESIGNATED_PORT = 0xf IFLA_BRPORT_DESIGNATED_COST = 0x10 IFLA_BRPORT_ID = 0x11 IFLA_BRPORT_NO = 0x12 IFLA_BRPORT_TOPOLOGY_CHANGE_ACK = 0x13 IFLA_BRPORT_CONFIG_PENDING = 0x14 IFLA_BRPORT_MESSAGE_AGE_TIMER = 0x15 IFLA_BRPORT_FORWARD_DELAY_TIMER = 0x16 IFLA_BRPORT_HOLD_TIMER = 0x17 IFLA_BRPORT_FLUSH = 0x18 IFLA_BRPORT_MULTICAST_ROUTER = 0x19 IFLA_BRPORT_PAD = 0x1a IFLA_BRPORT_MCAST_FLOOD = 0x1b IFLA_BRPORT_MCAST_TO_UCAST = 0x1c IFLA_BRPORT_VLAN_TUNNEL = 0x1d IFLA_BRPORT_BCAST_FLOOD = 0x1e IFLA_BRPORT_GROUP_FWD_MASK = 0x1f IFLA_BRPORT_NEIGH_SUPPRESS = 0x20 IFLA_BRPORT_ISOLATED = 0x21 IFLA_BRPORT_BACKUP_PORT = 0x22 IFLA_BRPORT_MRP_RING_OPEN = 0x23 IFLA_BRPORT_MRP_IN_OPEN = 0x24 IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT = 0x25 IFLA_BRPORT_MCAST_EHT_HOSTS_CNT = 0x26 IFLA_BRPORT_LOCKED = 0x27 IFLA_BRPORT_MAB = 0x28 IFLA_BRPORT_MCAST_N_GROUPS = 0x29 IFLA_BRPORT_MCAST_MAX_GROUPS = 0x2a IFLA_BRPORT_NEIGH_VLAN_SUPPRESS = 0x2b IFLA_BRPORT_BACKUP_NHID = 0x2c IFLA_INFO_UNSPEC = 0x0 IFLA_INFO_KIND = 0x1 IFLA_INFO_DATA = 0x2 IFLA_INFO_XSTATS = 0x3 IFLA_INFO_SLAVE_KIND = 0x4 IFLA_INFO_SLAVE_DATA = 0x5 IFLA_VLAN_UNSPEC = 0x0 IFLA_VLAN_ID = 0x1 IFLA_VLAN_FLAGS = 0x2 IFLA_VLAN_EGRESS_QOS = 0x3 IFLA_VLAN_INGRESS_QOS = 0x4 IFLA_VLAN_PROTOCOL = 0x5 IFLA_VLAN_QOS_UNSPEC = 0x0 IFLA_VLAN_QOS_MAPPING = 0x1 IFLA_MACVLAN_UNSPEC = 0x0 IFLA_MACVLAN_MODE = 0x1 IFLA_MACVLAN_FLAGS = 0x2 IFLA_MACVLAN_MACADDR_MODE = 0x3 IFLA_MACVLAN_MACADDR = 0x4 IFLA_MACVLAN_MACADDR_DATA = 0x5 IFLA_MACVLAN_MACADDR_COUNT = 0x6 IFLA_MACVLAN_BC_QUEUE_LEN = 0x7 IFLA_MACVLAN_BC_QUEUE_LEN_USED = 0x8 IFLA_MACVLAN_BC_CUTOFF = 0x9 IFLA_VRF_UNSPEC = 0x0 IFLA_VRF_TABLE = 0x1 IFLA_VRF_PORT_UNSPEC = 0x0 IFLA_VRF_PORT_TABLE = 0x1 IFLA_MACSEC_UNSPEC = 0x0 IFLA_MACSEC_SCI = 0x1 IFLA_MACSEC_PORT = 0x2 IFLA_MACSEC_ICV_LEN = 0x3 IFLA_MACSEC_CIPHER_SUITE = 0x4 IFLA_MACSEC_WINDOW = 0x5 IFLA_MACSEC_ENCODING_SA = 0x6 IFLA_MACSEC_ENCRYPT = 0x7 IFLA_MACSEC_PROTECT = 0x8 IFLA_MACSEC_INC_SCI = 0x9 IFLA_MACSEC_ES = 0xa IFLA_MACSEC_SCB = 0xb IFLA_MACSEC_REPLAY_PROTECT = 0xc IFLA_MACSEC_VALIDATION = 0xd IFLA_MACSEC_PAD = 0xe IFLA_MACSEC_OFFLOAD = 0xf IFLA_XFRM_UNSPEC = 0x0 IFLA_XFRM_LINK = 0x1 IFLA_XFRM_IF_ID = 0x2 IFLA_XFRM_COLLECT_METADATA = 0x3 IFLA_IPVLAN_UNSPEC = 0x0 IFLA_IPVLAN_MODE = 0x1 IFLA_IPVLAN_FLAGS = 0x2 NETKIT_NEXT = -0x1 NETKIT_PASS = 0x0 NETKIT_DROP = 0x2 NETKIT_REDIRECT = 0x7 NETKIT_L2 = 0x0 NETKIT_L3 = 0x1 IFLA_NETKIT_UNSPEC = 0x0 IFLA_NETKIT_PEER_INFO = 0x1 IFLA_NETKIT_PRIMARY = 0x2 IFLA_NETKIT_POLICY = 0x3 IFLA_NETKIT_PEER_POLICY = 0x4 IFLA_NETKIT_MODE = 0x5 IFLA_VXLAN_UNSPEC = 0x0 IFLA_VXLAN_ID = 0x1 IFLA_VXLAN_GROUP = 0x2 IFLA_VXLAN_LINK = 0x3 IFLA_VXLAN_LOCAL = 0x4 IFLA_VXLAN_TTL = 0x5 IFLA_VXLAN_TOS = 0x6 IFLA_VXLAN_LEARNING = 0x7 IFLA_VXLAN_AGEING = 0x8 IFLA_VXLAN_LIMIT = 0x9 IFLA_VXLAN_PORT_RANGE = 0xa IFLA_VXLAN_PROXY = 0xb IFLA_VXLAN_RSC = 0xc IFLA_VXLAN_L2MISS = 0xd IFLA_VXLAN_L3MISS = 0xe IFLA_VXLAN_PORT = 0xf IFLA_VXLAN_GROUP6 = 0x10 IFLA_VXLAN_LOCAL6 = 0x11 IFLA_VXLAN_UDP_CSUM = 0x12 IFLA_VXLAN_UDP_ZERO_CSUM6_TX = 0x13 IFLA_VXLAN_UDP_ZERO_CSUM6_RX = 0x14 IFLA_VXLAN_REMCSUM_TX = 0x15 IFLA_VXLAN_REMCSUM_RX = 0x16 IFLA_VXLAN_GBP = 0x17 IFLA_VXLAN_REMCSUM_NOPARTIAL = 0x18 IFLA_VXLAN_COLLECT_METADATA = 0x19 IFLA_VXLAN_LABEL = 0x1a IFLA_VXLAN_GPE = 0x1b IFLA_VXLAN_TTL_INHERIT = 0x1c IFLA_VXLAN_DF = 0x1d IFLA_VXLAN_VNIFILTER = 0x1e IFLA_VXLAN_LOCALBYPASS = 0x1f IFLA_GENEVE_UNSPEC = 0x0 IFLA_GENEVE_ID = 0x1 IFLA_GENEVE_REMOTE = 0x2 IFLA_GENEVE_TTL = 0x3 IFLA_GENEVE_TOS = 0x4 IFLA_GENEVE_PORT = 0x5 IFLA_GENEVE_COLLECT_METADATA = 0x6 IFLA_GENEVE_REMOTE6 = 0x7 IFLA_GENEVE_UDP_CSUM = 0x8 IFLA_GENEVE_UDP_ZERO_CSUM6_TX = 0x9 IFLA_GENEVE_UDP_ZERO_CSUM6_RX = 0xa IFLA_GENEVE_LABEL = 0xb IFLA_GENEVE_TTL_INHERIT = 0xc IFLA_GENEVE_DF = 0xd IFLA_GENEVE_INNER_PROTO_INHERIT = 0xe IFLA_BAREUDP_UNSPEC = 0x0 IFLA_BAREUDP_PORT = 0x1 IFLA_BAREUDP_ETHERTYPE = 0x2 IFLA_BAREUDP_SRCPORT_MIN = 0x3 IFLA_BAREUDP_MULTIPROTO_MODE = 0x4 IFLA_PPP_UNSPEC = 0x0 IFLA_PPP_DEV_FD = 0x1 IFLA_GTP_UNSPEC = 0x0 IFLA_GTP_FD0 = 0x1 IFLA_GTP_FD1 = 0x2 IFLA_GTP_PDP_HASHSIZE = 0x3 IFLA_GTP_ROLE = 0x4 IFLA_GTP_CREATE_SOCKETS = 0x5 IFLA_GTP_RESTART_COUNT = 0x6 IFLA_BOND_UNSPEC = 0x0 IFLA_BOND_MODE = 0x1 IFLA_BOND_ACTIVE_SLAVE = 0x2 IFLA_BOND_MIIMON = 0x3 IFLA_BOND_UPDELAY = 0x4 IFLA_BOND_DOWNDELAY = 0x5 IFLA_BOND_USE_CARRIER = 0x6 IFLA_BOND_ARP_INTERVAL = 0x7 IFLA_BOND_ARP_IP_TARGET = 0x8 IFLA_BOND_ARP_VALIDATE = 0x9 IFLA_BOND_ARP_ALL_TARGETS = 0xa IFLA_BOND_PRIMARY = 0xb IFLA_BOND_PRIMARY_RESELECT = 0xc IFLA_BOND_FAIL_OVER_MAC = 0xd IFLA_BOND_XMIT_HASH_POLICY = 0xe IFLA_BOND_RESEND_IGMP = 0xf IFLA_BOND_NUM_PEER_NOTIF = 0x10 IFLA_BOND_ALL_SLAVES_ACTIVE = 0x11 IFLA_BOND_MIN_LINKS = 0x12 IFLA_BOND_LP_INTERVAL = 0x13 IFLA_BOND_PACKETS_PER_SLAVE = 0x14 IFLA_BOND_AD_LACP_RATE = 0x15 IFLA_BOND_AD_SELECT = 0x16 IFLA_BOND_AD_INFO = 0x17 IFLA_BOND_AD_ACTOR_SYS_PRIO = 0x18 IFLA_BOND_AD_USER_PORT_KEY = 0x19 IFLA_BOND_AD_ACTOR_SYSTEM = 0x1a IFLA_BOND_TLB_DYNAMIC_LB = 0x1b IFLA_BOND_PEER_NOTIF_DELAY = 0x1c IFLA_BOND_AD_LACP_ACTIVE = 0x1d IFLA_BOND_MISSED_MAX = 0x1e IFLA_BOND_NS_IP6_TARGET = 0x1f IFLA_BOND_AD_INFO_UNSPEC = 0x0 IFLA_BOND_AD_INFO_AGGREGATOR = 0x1 IFLA_BOND_AD_INFO_NUM_PORTS = 0x2 IFLA_BOND_AD_INFO_ACTOR_KEY = 0x3 IFLA_BOND_AD_INFO_PARTNER_KEY = 0x4 IFLA_BOND_AD_INFO_PARTNER_MAC = 0x5 IFLA_BOND_SLAVE_UNSPEC = 0x0 IFLA_BOND_SLAVE_STATE = 0x1 IFLA_BOND_SLAVE_MII_STATUS = 0x2 IFLA_BOND_SLAVE_LINK_FAILURE_COUNT = 0x3 IFLA_BOND_SLAVE_PERM_HWADDR = 0x4 IFLA_BOND_SLAVE_QUEUE_ID = 0x5 IFLA_BOND_SLAVE_AD_AGGREGATOR_ID = 0x6 IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE = 0x7 IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE = 0x8 IFLA_BOND_SLAVE_PRIO = 0x9 IFLA_VF_INFO_UNSPEC = 0x0 IFLA_VF_INFO = 0x1 IFLA_VF_UNSPEC = 0x0 IFLA_VF_MAC = 0x1 IFLA_VF_VLAN = 0x2 IFLA_VF_TX_RATE = 0x3 IFLA_VF_SPOOFCHK = 0x4 IFLA_VF_LINK_STATE = 0x5 IFLA_VF_RATE = 0x6 IFLA_VF_RSS_QUERY_EN = 0x7 IFLA_VF_STATS = 0x8 IFLA_VF_TRUST = 0x9 IFLA_VF_IB_NODE_GUID = 0xa IFLA_VF_IB_PORT_GUID = 0xb IFLA_VF_VLAN_LIST = 0xc IFLA_VF_BROADCAST = 0xd IFLA_VF_VLAN_INFO_UNSPEC = 0x0 IFLA_VF_VLAN_INFO = 0x1 IFLA_VF_LINK_STATE_AUTO = 0x0 IFLA_VF_LINK_STATE_ENABLE = 0x1 IFLA_VF_LINK_STATE_DISABLE = 0x2 IFLA_VF_STATS_RX_PACKETS = 0x0 IFLA_VF_STATS_TX_PACKETS = 0x1 IFLA_VF_STATS_RX_BYTES = 0x2 IFLA_VF_STATS_TX_BYTES = 0x3 IFLA_VF_STATS_BROADCAST = 0x4 IFLA_VF_STATS_MULTICAST = 0x5 IFLA_VF_STATS_PAD = 0x6 IFLA_VF_STATS_RX_DROPPED = 0x7 IFLA_VF_STATS_TX_DROPPED = 0x8 IFLA_VF_PORT_UNSPEC = 0x0 IFLA_VF_PORT = 0x1 IFLA_PORT_UNSPEC = 0x0 IFLA_PORT_VF = 0x1 IFLA_PORT_PROFILE = 0x2 IFLA_PORT_VSI_TYPE = 0x3 IFLA_PORT_INSTANCE_UUID = 0x4 IFLA_PORT_HOST_UUID = 0x5 IFLA_PORT_REQUEST = 0x6 IFLA_PORT_RESPONSE = 0x7 IFLA_IPOIB_UNSPEC = 0x0 IFLA_IPOIB_PKEY = 0x1 IFLA_IPOIB_MODE = 0x2 IFLA_IPOIB_UMCAST = 0x3 IFLA_HSR_UNSPEC = 0x0 IFLA_HSR_SLAVE1 = 0x1 IFLA_HSR_SLAVE2 = 0x2 IFLA_HSR_MULTICAST_SPEC = 0x3 IFLA_HSR_SUPERVISION_ADDR = 0x4 IFLA_HSR_SEQ_NR = 0x5 IFLA_HSR_VERSION = 0x6 IFLA_HSR_PROTOCOL = 0x7 IFLA_STATS_UNSPEC = 0x0 IFLA_STATS_LINK_64 = 0x1 IFLA_STATS_LINK_XSTATS = 0x2 IFLA_STATS_LINK_XSTATS_SLAVE = 0x3 IFLA_STATS_LINK_OFFLOAD_XSTATS = 0x4 IFLA_STATS_AF_SPEC = 0x5 IFLA_STATS_GETSET_UNSPEC = 0x0 IFLA_STATS_GET_FILTERS = 0x1 IFLA_STATS_SET_OFFLOAD_XSTATS_L3_STATS = 0x2 IFLA_OFFLOAD_XSTATS_UNSPEC = 0x0 IFLA_OFFLOAD_XSTATS_CPU_HIT = 0x1 IFLA_OFFLOAD_XSTATS_HW_S_INFO = 0x2 IFLA_OFFLOAD_XSTATS_L3_STATS = 0x3 IFLA_OFFLOAD_XSTATS_HW_S_INFO_UNSPEC = 0x0 IFLA_OFFLOAD_XSTATS_HW_S_INFO_REQUEST = 0x1 IFLA_OFFLOAD_XSTATS_HW_S_INFO_USED = 0x2 IFLA_XDP_UNSPEC = 0x0 IFLA_XDP_FD = 0x1 IFLA_XDP_ATTACHED = 0x2 IFLA_XDP_FLAGS = 0x3 IFLA_XDP_PROG_ID = 0x4 IFLA_XDP_DRV_PROG_ID = 0x5 IFLA_XDP_SKB_PROG_ID = 0x6 IFLA_XDP_HW_PROG_ID = 0x7 IFLA_XDP_EXPECTED_FD = 0x8 IFLA_EVENT_NONE = 0x0 IFLA_EVENT_REBOOT = 0x1 IFLA_EVENT_FEATURES = 0x2 IFLA_EVENT_BONDING_FAILOVER = 0x3 IFLA_EVENT_NOTIFY_PEERS = 0x4 IFLA_EVENT_IGMP_RESEND = 0x5 IFLA_EVENT_BONDING_OPTIONS = 0x6 IFLA_TUN_UNSPEC = 0x0 IFLA_TUN_OWNER = 0x1 IFLA_TUN_GROUP = 0x2 IFLA_TUN_TYPE = 0x3 IFLA_TUN_PI = 0x4 IFLA_TUN_VNET_HDR = 0x5 IFLA_TUN_PERSIST = 0x6 IFLA_TUN_MULTI_QUEUE = 0x7 IFLA_TUN_NUM_QUEUES = 0x8 IFLA_TUN_NUM_DISABLED_QUEUES = 0x9 IFLA_RMNET_UNSPEC = 0x0 IFLA_RMNET_MUX_ID = 0x1 IFLA_RMNET_FLAGS = 0x2 IFLA_MCTP_UNSPEC = 0x0 IFLA_MCTP_NET = 0x1 IFLA_DSA_UNSPEC = 0x0 IFLA_DSA_CONDUIT = 0x1 IFLA_DSA_MASTER = 0x1 ) const ( NF_INET_PRE_ROUTING = 0x0 NF_INET_LOCAL_IN = 0x1 NF_INET_FORWARD = 0x2 NF_INET_LOCAL_OUT = 0x3 NF_INET_POST_ROUTING = 0x4 NF_INET_NUMHOOKS = 0x5 ) const ( NF_NETDEV_INGRESS = 0x0 NF_NETDEV_EGRESS = 0x1 NF_NETDEV_NUMHOOKS = 0x2 ) const ( NFPROTO_UNSPEC = 0x0 NFPROTO_INET = 0x1 NFPROTO_IPV4 = 0x2 NFPROTO_ARP = 0x3 NFPROTO_NETDEV = 0x5 NFPROTO_BRIDGE = 0x7 NFPROTO_IPV6 = 0xa NFPROTO_DECNET = 0xc NFPROTO_NUMPROTO = 0xd ) const SO_ORIGINAL_DST = 0x50 type Nfgenmsg struct { Nfgen_family uint8 Version uint8 Res_id uint16 } const ( NFNL_BATCH_UNSPEC = 0x0 NFNL_BATCH_GENID = 0x1 ) const ( NFT_REG_VERDICT = 0x0 NFT_REG_1 = 0x1 NFT_REG_2 = 0x2 NFT_REG_3 = 0x3 NFT_REG_4 = 0x4 NFT_REG32_00 = 0x8 NFT_REG32_01 = 0x9 NFT_REG32_02 = 0xa NFT_REG32_03 = 0xb NFT_REG32_04 = 0xc NFT_REG32_05 = 0xd NFT_REG32_06 = 0xe NFT_REG32_07 = 0xf NFT_REG32_08 = 0x10 NFT_REG32_09 = 0x11 NFT_REG32_10 = 0x12 NFT_REG32_11 = 0x13 NFT_REG32_12 = 0x14 NFT_REG32_13 = 0x15 NFT_REG32_14 = 0x16 NFT_REG32_15 = 0x17 NFT_CONTINUE = -0x1 NFT_BREAK = -0x2 NFT_JUMP = -0x3 NFT_GOTO = -0x4 NFT_RETURN = -0x5 NFT_MSG_NEWTABLE = 0x0 NFT_MSG_GETTABLE = 0x1 NFT_MSG_DELTABLE = 0x2 NFT_MSG_NEWCHAIN = 0x3 NFT_MSG_GETCHAIN = 0x4 NFT_MSG_DELCHAIN = 0x5 NFT_MSG_NEWRULE = 0x6 NFT_MSG_GETRULE = 0x7 NFT_MSG_DELRULE = 0x8 NFT_MSG_NEWSET = 0x9 NFT_MSG_GETSET = 0xa NFT_MSG_DELSET = 0xb NFT_MSG_NEWSETELEM = 0xc NFT_MSG_GETSETELEM = 0xd NFT_MSG_DELSETELEM = 0xe NFT_MSG_NEWGEN = 0xf NFT_MSG_GETGEN = 0x10 NFT_MSG_TRACE = 0x11 NFT_MSG_NEWOBJ = 0x12 NFT_MSG_GETOBJ = 0x13 NFT_MSG_DELOBJ = 0x14 NFT_MSG_GETOBJ_RESET = 0x15 NFT_MSG_NEWFLOWTABLE = 0x16 NFT_MSG_GETFLOWTABLE = 0x17 NFT_MSG_DELFLOWTABLE = 0x18 NFT_MSG_GETRULE_RESET = 0x19 NFT_MSG_MAX = 0x22 NFTA_LIST_UNSPEC = 0x0 NFTA_LIST_ELEM = 0x1 NFTA_HOOK_UNSPEC = 0x0 NFTA_HOOK_HOOKNUM = 0x1 NFTA_HOOK_PRIORITY = 0x2 NFTA_HOOK_DEV = 0x3 NFT_TABLE_F_DORMANT = 0x1 NFTA_TABLE_UNSPEC = 0x0 NFTA_TABLE_NAME = 0x1 NFTA_TABLE_FLAGS = 0x2 NFTA_TABLE_USE = 0x3 NFTA_CHAIN_UNSPEC = 0x0 NFTA_CHAIN_TABLE = 0x1 NFTA_CHAIN_HANDLE = 0x2 NFTA_CHAIN_NAME = 0x3 NFTA_CHAIN_HOOK = 0x4 NFTA_CHAIN_POLICY = 0x5 NFTA_CHAIN_USE = 0x6 NFTA_CHAIN_TYPE = 0x7 NFTA_CHAIN_COUNTERS = 0x8 NFTA_CHAIN_PAD = 0x9 NFTA_RULE_UNSPEC = 0x0 NFTA_RULE_TABLE = 0x1 NFTA_RULE_CHAIN = 0x2 NFTA_RULE_HANDLE = 0x3 NFTA_RULE_EXPRESSIONS = 0x4 NFTA_RULE_COMPAT = 0x5 NFTA_RULE_POSITION = 0x6 NFTA_RULE_USERDATA = 0x7 NFTA_RULE_PAD = 0x8 NFTA_RULE_ID = 0x9 NFT_RULE_COMPAT_F_INV = 0x2 NFT_RULE_COMPAT_F_MASK = 0x2 NFTA_RULE_COMPAT_UNSPEC = 0x0 NFTA_RULE_COMPAT_PROTO = 0x1 NFTA_RULE_COMPAT_FLAGS = 0x2 NFT_SET_ANONYMOUS = 0x1 NFT_SET_CONSTANT = 0x2 NFT_SET_INTERVAL = 0x4 NFT_SET_MAP = 0x8 NFT_SET_TIMEOUT = 0x10 NFT_SET_EVAL = 0x20 NFT_SET_OBJECT = 0x40 NFT_SET_POL_PERFORMANCE = 0x0 NFT_SET_POL_MEMORY = 0x1 NFTA_SET_DESC_UNSPEC = 0x0 NFTA_SET_DESC_SIZE = 0x1 NFTA_SET_UNSPEC = 0x0 NFTA_SET_TABLE = 0x1 NFTA_SET_NAME = 0x2 NFTA_SET_FLAGS = 0x3 NFTA_SET_KEY_TYPE = 0x4 NFTA_SET_KEY_LEN = 0x5 NFTA_SET_DATA_TYPE = 0x6 NFTA_SET_DATA_LEN = 0x7 NFTA_SET_POLICY = 0x8 NFTA_SET_DESC = 0x9 NFTA_SET_ID = 0xa NFTA_SET_TIMEOUT = 0xb NFTA_SET_GC_INTERVAL = 0xc NFTA_SET_USERDATA = 0xd NFTA_SET_PAD = 0xe NFTA_SET_OBJ_TYPE = 0xf NFT_SET_ELEM_INTERVAL_END = 0x1 NFTA_SET_ELEM_UNSPEC = 0x0 NFTA_SET_ELEM_KEY = 0x1 NFTA_SET_ELEM_DATA = 0x2 NFTA_SET_ELEM_FLAGS = 0x3 NFTA_SET_ELEM_TIMEOUT = 0x4 NFTA_SET_ELEM_EXPIRATION = 0x5 NFTA_SET_ELEM_USERDATA = 0x6 NFTA_SET_ELEM_EXPR = 0x7 NFTA_SET_ELEM_PAD = 0x8 NFTA_SET_ELEM_OBJREF = 0x9 NFTA_SET_ELEM_LIST_UNSPEC = 0x0 NFTA_SET_ELEM_LIST_TABLE = 0x1 NFTA_SET_ELEM_LIST_SET = 0x2 NFTA_SET_ELEM_LIST_ELEMENTS = 0x3 NFTA_SET_ELEM_LIST_SET_ID = 0x4 NFT_DATA_VALUE = 0x0 NFT_DATA_VERDICT = 0xffffff00 NFTA_DATA_UNSPEC = 0x0 NFTA_DATA_VALUE = 0x1 NFTA_DATA_VERDICT = 0x2 NFTA_VERDICT_UNSPEC = 0x0 NFTA_VERDICT_CODE = 0x1 NFTA_VERDICT_CHAIN = 0x2 NFTA_EXPR_UNSPEC = 0x0 NFTA_EXPR_NAME = 0x1 NFTA_EXPR_DATA = 0x2 NFTA_IMMEDIATE_UNSPEC = 0x0 NFTA_IMMEDIATE_DREG = 0x1 NFTA_IMMEDIATE_DATA = 0x2 NFTA_BITWISE_UNSPEC = 0x0 NFTA_BITWISE_SREG = 0x1 NFTA_BITWISE_DREG = 0x2 NFTA_BITWISE_LEN = 0x3 NFTA_BITWISE_MASK = 0x4 NFTA_BITWISE_XOR = 0x5 NFT_BYTEORDER_NTOH = 0x0 NFT_BYTEORDER_HTON = 0x1 NFTA_BYTEORDER_UNSPEC = 0x0 NFTA_BYTEORDER_SREG = 0x1 NFTA_BYTEORDER_DREG = 0x2 NFTA_BYTEORDER_OP = 0x3 NFTA_BYTEORDER_LEN = 0x4 NFTA_BYTEORDER_SIZE = 0x5 NFT_CMP_EQ = 0x0 NFT_CMP_NEQ = 0x1 NFT_CMP_LT = 0x2 NFT_CMP_LTE = 0x3 NFT_CMP_GT = 0x4 NFT_CMP_GTE = 0x5 NFTA_CMP_UNSPEC = 0x0 NFTA_CMP_SREG = 0x1 NFTA_CMP_OP = 0x2 NFTA_CMP_DATA = 0x3 NFT_RANGE_EQ = 0x0 NFT_RANGE_NEQ = 0x1 NFTA_RANGE_UNSPEC = 0x0 NFTA_RANGE_SREG = 0x1 NFTA_RANGE_OP = 0x2 NFTA_RANGE_FROM_DATA = 0x3 NFTA_RANGE_TO_DATA = 0x4 NFT_LOOKUP_F_INV = 0x1 NFTA_LOOKUP_UNSPEC = 0x0 NFTA_LOOKUP_SET = 0x1 NFTA_LOOKUP_SREG = 0x2 NFTA_LOOKUP_DREG = 0x3 NFTA_LOOKUP_SET_ID = 0x4 NFTA_LOOKUP_FLAGS = 0x5 NFT_DYNSET_OP_ADD = 0x0 NFT_DYNSET_OP_UPDATE = 0x1 NFT_DYNSET_F_INV = 0x1 NFTA_DYNSET_UNSPEC = 0x0 NFTA_DYNSET_SET_NAME = 0x1 NFTA_DYNSET_SET_ID = 0x2 NFTA_DYNSET_OP = 0x3 NFTA_DYNSET_SREG_KEY = 0x4 NFTA_DYNSET_SREG_DATA = 0x5 NFTA_DYNSET_TIMEOUT = 0x6 NFTA_DYNSET_EXPR = 0x7 NFTA_DYNSET_PAD = 0x8 NFTA_DYNSET_FLAGS = 0x9 NFT_PAYLOAD_LL_HEADER = 0x0 NFT_PAYLOAD_NETWORK_HEADER = 0x1 NFT_PAYLOAD_TRANSPORT_HEADER = 0x2 NFT_PAYLOAD_CSUM_NONE = 0x0 NFT_PAYLOAD_CSUM_INET = 0x1 NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1 NFTA_PAYLOAD_UNSPEC = 0x0 NFTA_PAYLOAD_DREG = 0x1 NFTA_PAYLOAD_BASE = 0x2 NFTA_PAYLOAD_OFFSET = 0x3 NFTA_PAYLOAD_LEN = 0x4 NFTA_PAYLOAD_SREG = 0x5 NFTA_PAYLOAD_CSUM_TYPE = 0x6 NFTA_PAYLOAD_CSUM_OFFSET = 0x7 NFTA_PAYLOAD_CSUM_FLAGS = 0x8 NFT_EXTHDR_F_PRESENT = 0x1 NFT_EXTHDR_OP_IPV6 = 0x0 NFT_EXTHDR_OP_TCPOPT = 0x1 NFTA_EXTHDR_UNSPEC = 0x0 NFTA_EXTHDR_DREG = 0x1 NFTA_EXTHDR_TYPE = 0x2 NFTA_EXTHDR_OFFSET = 0x3 NFTA_EXTHDR_LEN = 0x4 NFTA_EXTHDR_FLAGS = 0x5 NFTA_EXTHDR_OP = 0x6 NFTA_EXTHDR_SREG = 0x7 NFT_META_LEN = 0x0 NFT_META_PROTOCOL = 0x1 NFT_META_PRIORITY = 0x2 NFT_META_MARK = 0x3 NFT_META_IIF = 0x4 NFT_META_OIF = 0x5 NFT_META_IIFNAME = 0x6 NFT_META_OIFNAME = 0x7 NFT_META_IIFTYPE = 0x8 NFT_META_OIFTYPE = 0x9 NFT_META_SKUID = 0xa NFT_META_SKGID = 0xb NFT_META_NFTRACE = 0xc NFT_META_RTCLASSID = 0xd NFT_META_SECMARK = 0xe NFT_META_NFPROTO = 0xf NFT_META_L4PROTO = 0x10 NFT_META_BRI_IIFNAME = 0x11 NFT_META_BRI_OIFNAME = 0x12 NFT_META_PKTTYPE = 0x13 NFT_META_CPU = 0x14 NFT_META_IIFGROUP = 0x15 NFT_META_OIFGROUP = 0x16 NFT_META_CGROUP = 0x17 NFT_META_PRANDOM = 0x18 NFT_RT_CLASSID = 0x0 NFT_RT_NEXTHOP4 = 0x1 NFT_RT_NEXTHOP6 = 0x2 NFT_RT_TCPMSS = 0x3 NFT_HASH_JENKINS = 0x0 NFT_HASH_SYM = 0x1 NFTA_HASH_UNSPEC = 0x0 NFTA_HASH_SREG = 0x1 NFTA_HASH_DREG = 0x2 NFTA_HASH_LEN = 0x3 NFTA_HASH_MODULUS = 0x4 NFTA_HASH_SEED = 0x5 NFTA_HASH_OFFSET = 0x6 NFTA_HASH_TYPE = 0x7 NFTA_META_UNSPEC = 0x0 NFTA_META_DREG = 0x1 NFTA_META_KEY = 0x2 NFTA_META_SREG = 0x3 NFTA_RT_UNSPEC = 0x0 NFTA_RT_DREG = 0x1 NFTA_RT_KEY = 0x2 NFT_CT_STATE = 0x0 NFT_CT_DIRECTION = 0x1 NFT_CT_STATUS = 0x2 NFT_CT_MARK = 0x3 NFT_CT_SECMARK = 0x4 NFT_CT_EXPIRATION = 0x5 NFT_CT_HELPER = 0x6 NFT_CT_L3PROTOCOL = 0x7 NFT_CT_SRC = 0x8 NFT_CT_DST = 0x9 NFT_CT_PROTOCOL = 0xa NFT_CT_PROTO_SRC = 0xb NFT_CT_PROTO_DST = 0xc NFT_CT_LABELS = 0xd NFT_CT_PKTS = 0xe NFT_CT_BYTES = 0xf NFT_CT_AVGPKT = 0x10 NFT_CT_ZONE = 0x11 NFT_CT_EVENTMASK = 0x12 NFTA_CT_UNSPEC = 0x0 NFTA_CT_DREG = 0x1 NFTA_CT_KEY = 0x2 NFTA_CT_DIRECTION = 0x3 NFTA_CT_SREG = 0x4 NFT_LIMIT_PKTS = 0x0 NFT_LIMIT_PKT_BYTES = 0x1 NFT_LIMIT_F_INV = 0x1 NFTA_LIMIT_UNSPEC = 0x0 NFTA_LIMIT_RATE = 0x1 NFTA_LIMIT_UNIT = 0x2 NFTA_LIMIT_BURST = 0x3 NFTA_LIMIT_TYPE = 0x4 NFTA_LIMIT_FLAGS = 0x5 NFTA_LIMIT_PAD = 0x6 NFTA_COUNTER_UNSPEC = 0x0 NFTA_COUNTER_BYTES = 0x1 NFTA_COUNTER_PACKETS = 0x2 NFTA_COUNTER_PAD = 0x3 NFTA_LOG_UNSPEC = 0x0 NFTA_LOG_GROUP = 0x1 NFTA_LOG_PREFIX = 0x2 NFTA_LOG_SNAPLEN = 0x3 NFTA_LOG_QTHRESHOLD = 0x4 NFTA_LOG_LEVEL = 0x5 NFTA_LOG_FLAGS = 0x6 NFTA_QUEUE_UNSPEC = 0x0 NFTA_QUEUE_NUM = 0x1 NFTA_QUEUE_TOTAL = 0x2 NFTA_QUEUE_FLAGS = 0x3 NFTA_QUEUE_SREG_QNUM = 0x4 NFT_QUOTA_F_INV = 0x1 NFT_QUOTA_F_DEPLETED = 0x2 NFTA_QUOTA_UNSPEC = 0x0 NFTA_QUOTA_BYTES = 0x1 NFTA_QUOTA_FLAGS = 0x2 NFTA_QUOTA_PAD = 0x3 NFTA_QUOTA_CONSUMED = 0x4 NFT_REJECT_ICMP_UNREACH = 0x0 NFT_REJECT_TCP_RST = 0x1 NFT_REJECT_ICMPX_UNREACH = 0x2 NFT_REJECT_ICMPX_NO_ROUTE = 0x0 NFT_REJECT_ICMPX_PORT_UNREACH = 0x1 NFT_REJECT_ICMPX_HOST_UNREACH = 0x2 NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3 NFTA_REJECT_UNSPEC = 0x0 NFTA_REJECT_TYPE = 0x1 NFTA_REJECT_ICMP_CODE = 0x2 NFT_NAT_SNAT = 0x0 NFT_NAT_DNAT = 0x1 NFTA_NAT_UNSPEC = 0x0 NFTA_NAT_TYPE = 0x1 NFTA_NAT_FAMILY = 0x2 NFTA_NAT_REG_ADDR_MIN = 0x3 NFTA_NAT_REG_ADDR_MAX = 0x4 NFTA_NAT_REG_PROTO_MIN = 0x5 NFTA_NAT_REG_PROTO_MAX = 0x6 NFTA_NAT_FLAGS = 0x7 NFTA_MASQ_UNSPEC = 0x0 NFTA_MASQ_FLAGS = 0x1 NFTA_MASQ_REG_PROTO_MIN = 0x2 NFTA_MASQ_REG_PROTO_MAX = 0x3 NFTA_REDIR_UNSPEC = 0x0 NFTA_REDIR_REG_PROTO_MIN = 0x1 NFTA_REDIR_REG_PROTO_MAX = 0x2 NFTA_REDIR_FLAGS = 0x3 NFTA_DUP_UNSPEC = 0x0 NFTA_DUP_SREG_ADDR = 0x1 NFTA_DUP_SREG_DEV = 0x2 NFTA_FWD_UNSPEC = 0x0 NFTA_FWD_SREG_DEV = 0x1 NFTA_OBJREF_UNSPEC = 0x0 NFTA_OBJREF_IMM_TYPE = 0x1 NFTA_OBJREF_IMM_NAME = 0x2 NFTA_OBJREF_SET_SREG = 0x3 NFTA_OBJREF_SET_NAME = 0x4 NFTA_OBJREF_SET_ID = 0x5 NFTA_GEN_UNSPEC = 0x0 NFTA_GEN_ID = 0x1 NFTA_GEN_PROC_PID = 0x2 NFTA_GEN_PROC_NAME = 0x3 NFTA_FIB_UNSPEC = 0x0 NFTA_FIB_DREG = 0x1 NFTA_FIB_RESULT = 0x2 NFTA_FIB_FLAGS = 0x3 NFT_FIB_RESULT_UNSPEC = 0x0 NFT_FIB_RESULT_OIF = 0x1 NFT_FIB_RESULT_OIFNAME = 0x2 NFT_FIB_RESULT_ADDRTYPE = 0x3 NFTA_FIB_F_SADDR = 0x1 NFTA_FIB_F_DADDR = 0x2 NFTA_FIB_F_MARK = 0x4 NFTA_FIB_F_IIF = 0x8 NFTA_FIB_F_OIF = 0x10 NFTA_FIB_F_PRESENT = 0x20 NFTA_CT_HELPER_UNSPEC = 0x0 NFTA_CT_HELPER_NAME = 0x1 NFTA_CT_HELPER_L3PROTO = 0x2 NFTA_CT_HELPER_L4PROTO = 0x3 NFTA_OBJ_UNSPEC = 0x0 NFTA_OBJ_TABLE = 0x1 NFTA_OBJ_NAME = 0x2 NFTA_OBJ_TYPE = 0x3 NFTA_OBJ_DATA = 0x4 NFTA_OBJ_USE = 0x5 NFTA_TRACE_UNSPEC = 0x0 NFTA_TRACE_TABLE = 0x1 NFTA_TRACE_CHAIN = 0x2 NFTA_TRACE_RULE_HANDLE = 0x3 NFTA_TRACE_TYPE = 0x4 NFTA_TRACE_VERDICT = 0x5 NFTA_TRACE_ID = 0x6 NFTA_TRACE_LL_HEADER = 0x7 NFTA_TRACE_NETWORK_HEADER = 0x8 NFTA_TRACE_TRANSPORT_HEADER = 0x9 NFTA_TRACE_IIF = 0xa NFTA_TRACE_IIFTYPE = 0xb NFTA_TRACE_OIF = 0xc NFTA_TRACE_OIFTYPE = 0xd NFTA_TRACE_MARK = 0xe NFTA_TRACE_NFPROTO = 0xf NFTA_TRACE_POLICY = 0x10 NFTA_TRACE_PAD = 0x11 NFT_TRACETYPE_UNSPEC = 0x0 NFT_TRACETYPE_POLICY = 0x1 NFT_TRACETYPE_RETURN = 0x2 NFT_TRACETYPE_RULE = 0x3 NFTA_NG_UNSPEC = 0x0 NFTA_NG_DREG = 0x1 NFTA_NG_MODULUS = 0x2 NFTA_NG_TYPE = 0x3 NFTA_NG_OFFSET = 0x4 NFT_NG_INCREMENTAL = 0x0 NFT_NG_RANDOM = 0x1 ) const ( NFTA_TARGET_UNSPEC = 0x0 NFTA_TARGET_NAME = 0x1 NFTA_TARGET_REV = 0x2 NFTA_TARGET_INFO = 0x3 NFTA_MATCH_UNSPEC = 0x0 NFTA_MATCH_NAME = 0x1 NFTA_MATCH_REV = 0x2 NFTA_MATCH_INFO = 0x3 NFTA_COMPAT_UNSPEC = 0x0 NFTA_COMPAT_NAME = 0x1 NFTA_COMPAT_REV = 0x2 NFTA_COMPAT_TYPE = 0x3 ) type RTCTime struct { Sec int32 Min int32 Hour int32 Mday int32 Mon int32 Year int32 Wday int32 Yday int32 Isdst int32 } type RTCWkAlrm struct { Enabled uint8 Pending uint8 Time RTCTime } type BlkpgIoctlArg struct { Op int32 Flags int32 Datalen int32 Data *byte } const ( BLKPG_ADD_PARTITION = 0x1 BLKPG_DEL_PARTITION = 0x2 BLKPG_RESIZE_PARTITION = 0x3 ) const ( NETNSA_NONE = 0x0 NETNSA_NSID = 0x1 NETNSA_PID = 0x2 NETNSA_FD = 0x3 NETNSA_TARGET_NSID = 0x4 NETNSA_CURRENT_NSID = 0x5 ) type XDPRingOffset struct { Producer uint64 Consumer uint64 Desc uint64 Flags uint64 } type XDPMmapOffsets struct { Rx XDPRingOffset Tx XDPRingOffset Fr XDPRingOffset Cr XDPRingOffset } type XDPUmemReg struct { Addr uint64 Len uint64 Chunk_size uint32 Headroom uint32 Flags uint32 Tx_metadata_len uint32 } type XDPStatistics struct { Rx_dropped uint64 Rx_invalid_descs uint64 Tx_invalid_descs uint64 Rx_ring_full uint64 Rx_fill_ring_empty_descs uint64 Tx_ring_empty_descs uint64 } type XDPDesc struct { Addr uint64 Len uint32 Options uint32 } const ( NCSI_CMD_UNSPEC = 0x0 NCSI_CMD_PKG_INFO = 0x1 NCSI_CMD_SET_INTERFACE = 0x2 NCSI_CMD_CLEAR_INTERFACE = 0x3 NCSI_ATTR_UNSPEC = 0x0 NCSI_ATTR_IFINDEX = 0x1 NCSI_ATTR_PACKAGE_LIST = 0x2 NCSI_ATTR_PACKAGE_ID = 0x3 NCSI_ATTR_CHANNEL_ID = 0x4 NCSI_PKG_ATTR_UNSPEC = 0x0 NCSI_PKG_ATTR = 0x1 NCSI_PKG_ATTR_ID = 0x2 NCSI_PKG_ATTR_FORCED = 0x3 NCSI_PKG_ATTR_CHANNEL_LIST = 0x4 NCSI_CHANNEL_ATTR_UNSPEC = 0x0 NCSI_CHANNEL_ATTR = 0x1 NCSI_CHANNEL_ATTR_ID = 0x2 NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3 NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4 NCSI_CHANNEL_ATTR_VERSION_STR = 0x5 NCSI_CHANNEL_ATTR_LINK_STATE = 0x6 NCSI_CHANNEL_ATTR_ACTIVE = 0x7 NCSI_CHANNEL_ATTR_FORCED = 0x8 NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9 NCSI_CHANNEL_ATTR_VLAN_ID = 0xa ) type ScmTimestamping struct { Ts [3]Timespec } const ( SOF_TIMESTAMPING_TX_HARDWARE = 0x1 SOF_TIMESTAMPING_TX_SOFTWARE = 0x2 SOF_TIMESTAMPING_RX_HARDWARE = 0x4 SOF_TIMESTAMPING_RX_SOFTWARE = 0x8 SOF_TIMESTAMPING_SOFTWARE = 0x10 SOF_TIMESTAMPING_SYS_HARDWARE = 0x20 SOF_TIMESTAMPING_RAW_HARDWARE = 0x40 SOF_TIMESTAMPING_OPT_ID = 0x80 SOF_TIMESTAMPING_TX_SCHED = 0x100 SOF_TIMESTAMPING_TX_ACK = 0x200 SOF_TIMESTAMPING_OPT_CMSG = 0x400 SOF_TIMESTAMPING_OPT_TSONLY = 0x800 SOF_TIMESTAMPING_OPT_STATS = 0x1000 SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000 SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000 SOF_TIMESTAMPING_BIND_PHC = 0x8000 SOF_TIMESTAMPING_OPT_ID_TCP = 0x10000 SOF_TIMESTAMPING_LAST = 0x10000 SOF_TIMESTAMPING_MASK = 0x1ffff SCM_TSTAMP_SND = 0x0 SCM_TSTAMP_SCHED = 0x1 SCM_TSTAMP_ACK = 0x2 ) type SockExtendedErr struct { Errno uint32 Origin uint8 Type uint8 Code uint8 Pad uint8 Info uint32 Data uint32 } type FanotifyEventMetadata struct { Event_len uint32 Vers uint8 Reserved uint8 Metadata_len uint16 Mask uint64 Fd int32 Pid int32 } type FanotifyResponse struct { Fd int32 Response uint32 } const ( CRYPTO_MSG_BASE = 0x10 CRYPTO_MSG_NEWALG = 0x10 CRYPTO_MSG_DELALG = 0x11 CRYPTO_MSG_UPDATEALG = 0x12 CRYPTO_MSG_GETALG = 0x13 CRYPTO_MSG_DELRNG = 0x14 CRYPTO_MSG_GETSTAT = 0x15 ) const ( CRYPTOCFGA_UNSPEC = 0x0 CRYPTOCFGA_PRIORITY_VAL = 0x1 CRYPTOCFGA_REPORT_LARVAL = 0x2 CRYPTOCFGA_REPORT_HASH = 0x3 CRYPTOCFGA_REPORT_BLKCIPHER = 0x4 CRYPTOCFGA_REPORT_AEAD = 0x5 CRYPTOCFGA_REPORT_COMPRESS = 0x6 CRYPTOCFGA_REPORT_RNG = 0x7 CRYPTOCFGA_REPORT_CIPHER = 0x8 CRYPTOCFGA_REPORT_AKCIPHER = 0x9 CRYPTOCFGA_REPORT_KPP = 0xa CRYPTOCFGA_REPORT_ACOMP = 0xb CRYPTOCFGA_STAT_LARVAL = 0xc CRYPTOCFGA_STAT_HASH = 0xd CRYPTOCFGA_STAT_BLKCIPHER = 0xe CRYPTOCFGA_STAT_AEAD = 0xf CRYPTOCFGA_STAT_COMPRESS = 0x10 CRYPTOCFGA_STAT_RNG = 0x11 CRYPTOCFGA_STAT_CIPHER = 0x12 CRYPTOCFGA_STAT_AKCIPHER = 0x13 CRYPTOCFGA_STAT_KPP = 0x14 CRYPTOCFGA_STAT_ACOMP = 0x15 ) const ( BPF_REG_0 = 0x0 BPF_REG_1 = 0x1 BPF_REG_2 = 0x2 BPF_REG_3 = 0x3 BPF_REG_4 = 0x4 BPF_REG_5 = 0x5 BPF_REG_6 = 0x6 BPF_REG_7 = 0x7 BPF_REG_8 = 0x8 BPF_REG_9 = 0x9 BPF_REG_10 = 0xa BPF_CGROUP_ITER_ORDER_UNSPEC = 0x0 BPF_CGROUP_ITER_SELF_ONLY = 0x1 BPF_CGROUP_ITER_DESCENDANTS_PRE = 0x2 BPF_CGROUP_ITER_DESCENDANTS_POST = 0x3 BPF_CGROUP_ITER_ANCESTORS_UP = 0x4 BPF_MAP_CREATE = 0x0 BPF_MAP_LOOKUP_ELEM = 0x1 BPF_MAP_UPDATE_ELEM = 0x2 BPF_MAP_DELETE_ELEM = 0x3 BPF_MAP_GET_NEXT_KEY = 0x4 BPF_PROG_LOAD = 0x5 BPF_OBJ_PIN = 0x6 BPF_OBJ_GET = 0x7 BPF_PROG_ATTACH = 0x8 BPF_PROG_DETACH = 0x9 BPF_PROG_TEST_RUN = 0xa BPF_PROG_RUN = 0xa BPF_PROG_GET_NEXT_ID = 0xb BPF_MAP_GET_NEXT_ID = 0xc BPF_PROG_GET_FD_BY_ID = 0xd BPF_MAP_GET_FD_BY_ID = 0xe BPF_OBJ_GET_INFO_BY_FD = 0xf BPF_PROG_QUERY = 0x10 BPF_RAW_TRACEPOINT_OPEN = 0x11 BPF_BTF_LOAD = 0x12 BPF_BTF_GET_FD_BY_ID = 0x13 BPF_TASK_FD_QUERY = 0x14 BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15 BPF_MAP_FREEZE = 0x16 BPF_BTF_GET_NEXT_ID = 0x17 BPF_MAP_LOOKUP_BATCH = 0x18 BPF_MAP_LOOKUP_AND_DELETE_BATCH = 0x19 BPF_MAP_UPDATE_BATCH = 0x1a BPF_MAP_DELETE_BATCH = 0x1b BPF_LINK_CREATE = 0x1c BPF_LINK_UPDATE = 0x1d BPF_LINK_GET_FD_BY_ID = 0x1e BPF_LINK_GET_NEXT_ID = 0x1f BPF_ENABLE_STATS = 0x20 BPF_ITER_CREATE = 0x21 BPF_LINK_DETACH = 0x22 BPF_PROG_BIND_MAP = 0x23 BPF_MAP_TYPE_UNSPEC = 0x0 BPF_MAP_TYPE_HASH = 0x1 BPF_MAP_TYPE_ARRAY = 0x2 BPF_MAP_TYPE_PROG_ARRAY = 0x3 BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4 BPF_MAP_TYPE_PERCPU_HASH = 0x5 BPF_MAP_TYPE_PERCPU_ARRAY = 0x6 BPF_MAP_TYPE_STACK_TRACE = 0x7 BPF_MAP_TYPE_CGROUP_ARRAY = 0x8 BPF_MAP_TYPE_LRU_HASH = 0x9 BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa BPF_MAP_TYPE_LPM_TRIE = 0xb BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc BPF_MAP_TYPE_HASH_OF_MAPS = 0xd BPF_MAP_TYPE_DEVMAP = 0xe BPF_MAP_TYPE_SOCKMAP = 0xf BPF_MAP_TYPE_CPUMAP = 0x10 BPF_MAP_TYPE_XSKMAP = 0x11 BPF_MAP_TYPE_SOCKHASH = 0x12 BPF_MAP_TYPE_CGROUP_STORAGE_DEPRECATED = 0x13 BPF_MAP_TYPE_CGROUP_STORAGE = 0x13 BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14 BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15 BPF_MAP_TYPE_QUEUE = 0x16 BPF_MAP_TYPE_STACK = 0x17 BPF_MAP_TYPE_SK_STORAGE = 0x18 BPF_MAP_TYPE_DEVMAP_HASH = 0x19 BPF_MAP_TYPE_STRUCT_OPS = 0x1a BPF_MAP_TYPE_RINGBUF = 0x1b BPF_MAP_TYPE_INODE_STORAGE = 0x1c BPF_MAP_TYPE_TASK_STORAGE = 0x1d BPF_MAP_TYPE_BLOOM_FILTER = 0x1e BPF_MAP_TYPE_USER_RINGBUF = 0x1f BPF_MAP_TYPE_CGRP_STORAGE = 0x20 BPF_PROG_TYPE_UNSPEC = 0x0 BPF_PROG_TYPE_SOCKET_FILTER = 0x1 BPF_PROG_TYPE_KPROBE = 0x2 BPF_PROG_TYPE_SCHED_CLS = 0x3 BPF_PROG_TYPE_SCHED_ACT = 0x4 BPF_PROG_TYPE_TRACEPOINT = 0x5 BPF_PROG_TYPE_XDP = 0x6 BPF_PROG_TYPE_PERF_EVENT = 0x7 BPF_PROG_TYPE_CGROUP_SKB = 0x8 BPF_PROG_TYPE_CGROUP_SOCK = 0x9 BPF_PROG_TYPE_LWT_IN = 0xa BPF_PROG_TYPE_LWT_OUT = 0xb BPF_PROG_TYPE_LWT_XMIT = 0xc BPF_PROG_TYPE_SOCK_OPS = 0xd BPF_PROG_TYPE_SK_SKB = 0xe BPF_PROG_TYPE_CGROUP_DEVICE = 0xf BPF_PROG_TYPE_SK_MSG = 0x10 BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11 BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12 BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13 BPF_PROG_TYPE_LIRC_MODE2 = 0x14 BPF_PROG_TYPE_SK_REUSEPORT = 0x15 BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16 BPF_PROG_TYPE_CGROUP_SYSCTL = 0x17 BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE = 0x18 BPF_PROG_TYPE_CGROUP_SOCKOPT = 0x19 BPF_PROG_TYPE_TRACING = 0x1a BPF_PROG_TYPE_STRUCT_OPS = 0x1b BPF_PROG_TYPE_EXT = 0x1c BPF_PROG_TYPE_LSM = 0x1d BPF_PROG_TYPE_SK_LOOKUP = 0x1e BPF_PROG_TYPE_SYSCALL = 0x1f BPF_PROG_TYPE_NETFILTER = 0x20 BPF_CGROUP_INET_INGRESS = 0x0 BPF_CGROUP_INET_EGRESS = 0x1 BPF_CGROUP_INET_SOCK_CREATE = 0x2 BPF_CGROUP_SOCK_OPS = 0x3 BPF_SK_SKB_STREAM_PARSER = 0x4 BPF_SK_SKB_STREAM_VERDICT = 0x5 BPF_CGROUP_DEVICE = 0x6 BPF_SK_MSG_VERDICT = 0x7 BPF_CGROUP_INET4_BIND = 0x8 BPF_CGROUP_INET6_BIND = 0x9 BPF_CGROUP_INET4_CONNECT = 0xa BPF_CGROUP_INET6_CONNECT = 0xb BPF_CGROUP_INET4_POST_BIND = 0xc BPF_CGROUP_INET6_POST_BIND = 0xd BPF_CGROUP_UDP4_SENDMSG = 0xe BPF_CGROUP_UDP6_SENDMSG = 0xf BPF_LIRC_MODE2 = 0x10 BPF_FLOW_DISSECTOR = 0x11 BPF_CGROUP_SYSCTL = 0x12 BPF_CGROUP_UDP4_RECVMSG = 0x13 BPF_CGROUP_UDP6_RECVMSG = 0x14 BPF_CGROUP_GETSOCKOPT = 0x15 BPF_CGROUP_SETSOCKOPT = 0x16 BPF_TRACE_RAW_TP = 0x17 BPF_TRACE_FENTRY = 0x18 BPF_TRACE_FEXIT = 0x19 BPF_MODIFY_RETURN = 0x1a BPF_LSM_MAC = 0x1b BPF_TRACE_ITER = 0x1c BPF_CGROUP_INET4_GETPEERNAME = 0x1d BPF_CGROUP_INET6_GETPEERNAME = 0x1e BPF_CGROUP_INET4_GETSOCKNAME = 0x1f BPF_CGROUP_INET6_GETSOCKNAME = 0x20 BPF_XDP_DEVMAP = 0x21 BPF_CGROUP_INET_SOCK_RELEASE = 0x22 BPF_XDP_CPUMAP = 0x23 BPF_SK_LOOKUP = 0x24 BPF_XDP = 0x25 BPF_SK_SKB_VERDICT = 0x26 BPF_SK_REUSEPORT_SELECT = 0x27 BPF_SK_REUSEPORT_SELECT_OR_MIGRATE = 0x28 BPF_PERF_EVENT = 0x29 BPF_TRACE_KPROBE_MULTI = 0x2a BPF_LSM_CGROUP = 0x2b BPF_STRUCT_OPS = 0x2c BPF_NETFILTER = 0x2d BPF_TCX_INGRESS = 0x2e BPF_TCX_EGRESS = 0x2f BPF_TRACE_UPROBE_MULTI = 0x30 BPF_LINK_TYPE_UNSPEC = 0x0 BPF_LINK_TYPE_RAW_TRACEPOINT = 0x1 BPF_LINK_TYPE_TRACING = 0x2 BPF_LINK_TYPE_CGROUP = 0x3 BPF_LINK_TYPE_ITER = 0x4 BPF_LINK_TYPE_NETNS = 0x5 BPF_LINK_TYPE_XDP = 0x6 BPF_LINK_TYPE_PERF_EVENT = 0x7 BPF_LINK_TYPE_KPROBE_MULTI = 0x8 BPF_LINK_TYPE_STRUCT_OPS = 0x9 BPF_LINK_TYPE_NETFILTER = 0xa BPF_LINK_TYPE_TCX = 0xb BPF_LINK_TYPE_UPROBE_MULTI = 0xc BPF_PERF_EVENT_UNSPEC = 0x0 BPF_PERF_EVENT_UPROBE = 0x1 BPF_PERF_EVENT_URETPROBE = 0x2 BPF_PERF_EVENT_KPROBE = 0x3 BPF_PERF_EVENT_KRETPROBE = 0x4 BPF_PERF_EVENT_TRACEPOINT = 0x5 BPF_PERF_EVENT_EVENT = 0x6 BPF_F_KPROBE_MULTI_RETURN = 0x1 BPF_F_UPROBE_MULTI_RETURN = 0x1 BPF_ANY = 0x0 BPF_NOEXIST = 0x1 BPF_EXIST = 0x2 BPF_F_LOCK = 0x4 BPF_F_NO_PREALLOC = 0x1 BPF_F_NO_COMMON_LRU = 0x2 BPF_F_NUMA_NODE = 0x4 BPF_F_RDONLY = 0x8 BPF_F_WRONLY = 0x10 BPF_F_STACK_BUILD_ID = 0x20 BPF_F_ZERO_SEED = 0x40 BPF_F_RDONLY_PROG = 0x80 BPF_F_WRONLY_PROG = 0x100 BPF_F_CLONE = 0x200 BPF_F_MMAPABLE = 0x400 BPF_F_PRESERVE_ELEMS = 0x800 BPF_F_INNER_MAP = 0x1000 BPF_F_LINK = 0x2000 BPF_F_PATH_FD = 0x4000 BPF_STATS_RUN_TIME = 0x0 BPF_STACK_BUILD_ID_EMPTY = 0x0 BPF_STACK_BUILD_ID_VALID = 0x1 BPF_STACK_BUILD_ID_IP = 0x2 BPF_F_RECOMPUTE_CSUM = 0x1 BPF_F_INVALIDATE_HASH = 0x2 BPF_F_HDR_FIELD_MASK = 0xf BPF_F_PSEUDO_HDR = 0x10 BPF_F_MARK_MANGLED_0 = 0x20 BPF_F_MARK_ENFORCE = 0x40 BPF_F_INGRESS = 0x1 BPF_F_TUNINFO_IPV6 = 0x1 BPF_F_SKIP_FIELD_MASK = 0xff BPF_F_USER_STACK = 0x100 BPF_F_FAST_STACK_CMP = 0x200 BPF_F_REUSE_STACKID = 0x400 BPF_F_USER_BUILD_ID = 0x800 BPF_F_ZERO_CSUM_TX = 0x2 BPF_F_DONT_FRAGMENT = 0x4 BPF_F_SEQ_NUMBER = 0x8 BPF_F_NO_TUNNEL_KEY = 0x10 BPF_F_TUNINFO_FLAGS = 0x10 BPF_F_INDEX_MASK = 0xffffffff BPF_F_CURRENT_CPU = 0xffffffff BPF_F_CTXLEN_MASK = 0xfffff00000000 BPF_F_CURRENT_NETNS = -0x1 BPF_CSUM_LEVEL_QUERY = 0x0 BPF_CSUM_LEVEL_INC = 0x1 BPF_CSUM_LEVEL_DEC = 0x2 BPF_CSUM_LEVEL_RESET = 0x3 BPF_F_ADJ_ROOM_FIXED_GSO = 0x1 BPF_F_ADJ_ROOM_ENCAP_L3_IPV4 = 0x2 BPF_F_ADJ_ROOM_ENCAP_L3_IPV6 = 0x4 BPF_F_ADJ_ROOM_ENCAP_L4_GRE = 0x8 BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10 BPF_F_ADJ_ROOM_NO_CSUM_RESET = 0x20 BPF_F_ADJ_ROOM_ENCAP_L2_ETH = 0x40 BPF_F_ADJ_ROOM_DECAP_L3_IPV4 = 0x80 BPF_F_ADJ_ROOM_DECAP_L3_IPV6 = 0x100 BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38 BPF_F_SYSCTL_BASE_NAME = 0x1 BPF_LOCAL_STORAGE_GET_F_CREATE = 0x1 BPF_SK_STORAGE_GET_F_CREATE = 0x1 BPF_F_GET_BRANCH_RECORDS_SIZE = 0x1 BPF_RB_NO_WAKEUP = 0x1 BPF_RB_FORCE_WAKEUP = 0x2 BPF_RB_AVAIL_DATA = 0x0 BPF_RB_RING_SIZE = 0x1 BPF_RB_CONS_POS = 0x2 BPF_RB_PROD_POS = 0x3 BPF_RINGBUF_BUSY_BIT = 0x80000000 BPF_RINGBUF_DISCARD_BIT = 0x40000000 BPF_RINGBUF_HDR_SZ = 0x8 BPF_SK_LOOKUP_F_REPLACE = 0x1 BPF_SK_LOOKUP_F_NO_REUSEPORT = 0x2 BPF_ADJ_ROOM_NET = 0x0 BPF_ADJ_ROOM_MAC = 0x1 BPF_HDR_START_MAC = 0x0 BPF_HDR_START_NET = 0x1 BPF_LWT_ENCAP_SEG6 = 0x0 BPF_LWT_ENCAP_SEG6_INLINE = 0x1 BPF_LWT_ENCAP_IP = 0x2 BPF_F_BPRM_SECUREEXEC = 0x1 BPF_F_BROADCAST = 0x8 BPF_F_EXCLUDE_INGRESS = 0x10 BPF_SKB_TSTAMP_UNSPEC = 0x0 BPF_SKB_TSTAMP_DELIVERY_MONO = 0x1 BPF_OK = 0x0 BPF_DROP = 0x2 BPF_REDIRECT = 0x7 BPF_LWT_REROUTE = 0x80 BPF_FLOW_DISSECTOR_CONTINUE = 0x81 BPF_SOCK_OPS_RTO_CB_FLAG = 0x1 BPF_SOCK_OPS_RETRANS_CB_FLAG = 0x2 BPF_SOCK_OPS_STATE_CB_FLAG = 0x4 BPF_SOCK_OPS_RTT_CB_FLAG = 0x8 BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG = 0x10 BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG = 0x20 BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG = 0x40 BPF_SOCK_OPS_ALL_CB_FLAGS = 0x7f BPF_SOCK_OPS_VOID = 0x0 BPF_SOCK_OPS_TIMEOUT_INIT = 0x1 BPF_SOCK_OPS_RWND_INIT = 0x2 BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3 BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4 BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5 BPF_SOCK_OPS_NEEDS_ECN = 0x6 BPF_SOCK_OPS_BASE_RTT = 0x7 BPF_SOCK_OPS_RTO_CB = 0x8 BPF_SOCK_OPS_RETRANS_CB = 0x9 BPF_SOCK_OPS_STATE_CB = 0xa BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb BPF_SOCK_OPS_RTT_CB = 0xc BPF_SOCK_OPS_PARSE_HDR_OPT_CB = 0xd BPF_SOCK_OPS_HDR_OPT_LEN_CB = 0xe BPF_SOCK_OPS_WRITE_HDR_OPT_CB = 0xf BPF_TCP_ESTABLISHED = 0x1 BPF_TCP_SYN_SENT = 0x2 BPF_TCP_SYN_RECV = 0x3 BPF_TCP_FIN_WAIT1 = 0x4 BPF_TCP_FIN_WAIT2 = 0x5 BPF_TCP_TIME_WAIT = 0x6 BPF_TCP_CLOSE = 0x7 BPF_TCP_CLOSE_WAIT = 0x8 BPF_TCP_LAST_ACK = 0x9 BPF_TCP_LISTEN = 0xa BPF_TCP_CLOSING = 0xb BPF_TCP_NEW_SYN_RECV = 0xc BPF_TCP_MAX_STATES = 0xe TCP_BPF_IW = 0x3e9 TCP_BPF_SNDCWND_CLAMP = 0x3ea TCP_BPF_DELACK_MAX = 0x3eb TCP_BPF_RTO_MIN = 0x3ec TCP_BPF_SYN = 0x3ed TCP_BPF_SYN_IP = 0x3ee TCP_BPF_SYN_MAC = 0x3ef BPF_LOAD_HDR_OPT_TCP_SYN = 0x1 BPF_WRITE_HDR_TCP_CURRENT_MSS = 0x1 BPF_WRITE_HDR_TCP_SYNACK_COOKIE = 0x2 BPF_DEVCG_ACC_MKNOD = 0x1 BPF_DEVCG_ACC_READ = 0x2 BPF_DEVCG_ACC_WRITE = 0x4 BPF_DEVCG_DEV_BLOCK = 0x1 BPF_DEVCG_DEV_CHAR = 0x2 BPF_FIB_LOOKUP_DIRECT = 0x1 BPF_FIB_LOOKUP_OUTPUT = 0x2 BPF_FIB_LOOKUP_SKIP_NEIGH = 0x4 BPF_FIB_LOOKUP_TBID = 0x8 BPF_FIB_LKUP_RET_SUCCESS = 0x0 BPF_FIB_LKUP_RET_BLACKHOLE = 0x1 BPF_FIB_LKUP_RET_UNREACHABLE = 0x2 BPF_FIB_LKUP_RET_PROHIBIT = 0x3 BPF_FIB_LKUP_RET_NOT_FWDED = 0x4 BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5 BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6 BPF_FIB_LKUP_RET_NO_NEIGH = 0x7 BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8 BPF_MTU_CHK_SEGS = 0x1 BPF_MTU_CHK_RET_SUCCESS = 0x0 BPF_MTU_CHK_RET_FRAG_NEEDED = 0x1 BPF_MTU_CHK_RET_SEGS_TOOBIG = 0x2 BPF_FD_TYPE_RAW_TRACEPOINT = 0x0 BPF_FD_TYPE_TRACEPOINT = 0x1 BPF_FD_TYPE_KPROBE = 0x2 BPF_FD_TYPE_KRETPROBE = 0x3 BPF_FD_TYPE_UPROBE = 0x4 BPF_FD_TYPE_URETPROBE = 0x5 BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG = 0x1 BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL = 0x2 BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP = 0x4 BPF_CORE_FIELD_BYTE_OFFSET = 0x0 BPF_CORE_FIELD_BYTE_SIZE = 0x1 BPF_CORE_FIELD_EXISTS = 0x2 BPF_CORE_FIELD_SIGNED = 0x3 BPF_CORE_FIELD_LSHIFT_U64 = 0x4 BPF_CORE_FIELD_RSHIFT_U64 = 0x5 BPF_CORE_TYPE_ID_LOCAL = 0x6 BPF_CORE_TYPE_ID_TARGET = 0x7 BPF_CORE_TYPE_EXISTS = 0x8 BPF_CORE_TYPE_SIZE = 0x9 BPF_CORE_ENUMVAL_EXISTS = 0xa BPF_CORE_ENUMVAL_VALUE = 0xb BPF_CORE_TYPE_MATCHES = 0xc BPF_F_TIMER_ABS = 0x1 ) const ( 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_DECnet_IFADDR = 0xd RTNLGRP_NOP2 = 0xe RTNLGRP_DECnet_ROUTE = 0xf RTNLGRP_DECnet_RULE = 0x10 RTNLGRP_NOP4 = 0x11 RTNLGRP_IPV6_PREFIX = 0x12 RTNLGRP_IPV6_RULE = 0x13 RTNLGRP_ND_USEROPT = 0x14 RTNLGRP_PHONET_IFADDR = 0x15 RTNLGRP_PHONET_ROUTE = 0x16 RTNLGRP_DCB = 0x17 RTNLGRP_IPV4_NETCONF = 0x18 RTNLGRP_IPV6_NETCONF = 0x19 RTNLGRP_MDB = 0x1a RTNLGRP_MPLS_ROUTE = 0x1b RTNLGRP_NSID = 0x1c RTNLGRP_MPLS_NETCONF = 0x1d RTNLGRP_IPV4_MROUTE_R = 0x1e RTNLGRP_IPV6_MROUTE_R = 0x1f RTNLGRP_NEXTHOP = 0x20 RTNLGRP_BRVLAN = 0x21 ) type CapUserHeader struct { Version uint32 Pid int32 } type CapUserData struct { Effective uint32 Permitted uint32 Inheritable uint32 } const ( LINUX_CAPABILITY_VERSION_1 = 0x19980330 LINUX_CAPABILITY_VERSION_2 = 0x20071026 LINUX_CAPABILITY_VERSION_3 = 0x20080522 ) const ( LO_FLAGS_READ_ONLY = 0x1 LO_FLAGS_AUTOCLEAR = 0x4 LO_FLAGS_PARTSCAN = 0x8 LO_FLAGS_DIRECT_IO = 0x10 ) type LoopInfo64 struct { Device uint64 Inode uint64 Rdevice uint64 Offset uint64 Sizelimit uint64 Number uint32 Encrypt_type uint32 Encrypt_key_size uint32 Flags uint32 File_name [64]uint8 Crypt_name [64]uint8 Encrypt_key [32]uint8 Init [2]uint64 } type LoopConfig struct { Fd uint32 Size uint32 Info LoopInfo64 _ [8]uint64 } type TIPCSocketAddr struct { Ref uint32 Node uint32 } type TIPCServiceRange struct { Type uint32 Lower uint32 Upper uint32 } type TIPCServiceName struct { Type uint32 Instance uint32 Domain uint32 } type TIPCEvent struct { Event uint32 Lower uint32 Upper uint32 Port TIPCSocketAddr S TIPCSubscr } type TIPCGroupReq struct { Type uint32 Instance uint32 Scope uint32 Flags uint32 } const ( TIPC_CLUSTER_SCOPE = 0x2 TIPC_NODE_SCOPE = 0x3 ) const ( SYSLOG_ACTION_CLOSE = 0 SYSLOG_ACTION_OPEN = 1 SYSLOG_ACTION_READ = 2 SYSLOG_ACTION_READ_ALL = 3 SYSLOG_ACTION_READ_CLEAR = 4 SYSLOG_ACTION_CLEAR = 5 SYSLOG_ACTION_CONSOLE_OFF = 6 SYSLOG_ACTION_CONSOLE_ON = 7 SYSLOG_ACTION_CONSOLE_LEVEL = 8 SYSLOG_ACTION_SIZE_UNREAD = 9 SYSLOG_ACTION_SIZE_BUFFER = 10 ) const ( DEVLINK_CMD_UNSPEC = 0x0 DEVLINK_CMD_GET = 0x1 DEVLINK_CMD_SET = 0x2 DEVLINK_CMD_NEW = 0x3 DEVLINK_CMD_DEL = 0x4 DEVLINK_CMD_PORT_GET = 0x5 DEVLINK_CMD_PORT_SET = 0x6 DEVLINK_CMD_PORT_NEW = 0x7 DEVLINK_CMD_PORT_DEL = 0x8 DEVLINK_CMD_PORT_SPLIT = 0x9 DEVLINK_CMD_PORT_UNSPLIT = 0xa DEVLINK_CMD_SB_GET = 0xb DEVLINK_CMD_SB_SET = 0xc DEVLINK_CMD_SB_NEW = 0xd DEVLINK_CMD_SB_DEL = 0xe DEVLINK_CMD_SB_POOL_GET = 0xf DEVLINK_CMD_SB_POOL_SET = 0x10 DEVLINK_CMD_SB_POOL_NEW = 0x11 DEVLINK_CMD_SB_POOL_DEL = 0x12 DEVLINK_CMD_SB_PORT_POOL_GET = 0x13 DEVLINK_CMD_SB_PORT_POOL_SET = 0x14 DEVLINK_CMD_SB_PORT_POOL_NEW = 0x15 DEVLINK_CMD_SB_PORT_POOL_DEL = 0x16 DEVLINK_CMD_SB_TC_POOL_BIND_GET = 0x17 DEVLINK_CMD_SB_TC_POOL_BIND_SET = 0x18 DEVLINK_CMD_SB_TC_POOL_BIND_NEW = 0x19 DEVLINK_CMD_SB_TC_POOL_BIND_DEL = 0x1a DEVLINK_CMD_SB_OCC_SNAPSHOT = 0x1b DEVLINK_CMD_SB_OCC_MAX_CLEAR = 0x1c DEVLINK_CMD_ESWITCH_GET = 0x1d DEVLINK_CMD_ESWITCH_SET = 0x1e DEVLINK_CMD_DPIPE_TABLE_GET = 0x1f DEVLINK_CMD_DPIPE_ENTRIES_GET = 0x20 DEVLINK_CMD_DPIPE_HEADERS_GET = 0x21 DEVLINK_CMD_DPIPE_TABLE_COUNTERS_SET = 0x22 DEVLINK_CMD_RESOURCE_SET = 0x23 DEVLINK_CMD_RESOURCE_DUMP = 0x24 DEVLINK_CMD_RELOAD = 0x25 DEVLINK_CMD_PARAM_GET = 0x26 DEVLINK_CMD_PARAM_SET = 0x27 DEVLINK_CMD_PARAM_NEW = 0x28 DEVLINK_CMD_PARAM_DEL = 0x29 DEVLINK_CMD_REGION_GET = 0x2a DEVLINK_CMD_REGION_SET = 0x2b DEVLINK_CMD_REGION_NEW = 0x2c DEVLINK_CMD_REGION_DEL = 0x2d DEVLINK_CMD_REGION_READ = 0x2e DEVLINK_CMD_PORT_PARAM_GET = 0x2f DEVLINK_CMD_PORT_PARAM_SET = 0x30 DEVLINK_CMD_PORT_PARAM_NEW = 0x31 DEVLINK_CMD_PORT_PARAM_DEL = 0x32 DEVLINK_CMD_INFO_GET = 0x33 DEVLINK_CMD_HEALTH_REPORTER_GET = 0x34 DEVLINK_CMD_HEALTH_REPORTER_SET = 0x35 DEVLINK_CMD_HEALTH_REPORTER_RECOVER = 0x36 DEVLINK_CMD_HEALTH_REPORTER_DIAGNOSE = 0x37 DEVLINK_CMD_HEALTH_REPORTER_DUMP_GET = 0x38 DEVLINK_CMD_HEALTH_REPORTER_DUMP_CLEAR = 0x39 DEVLINK_CMD_FLASH_UPDATE = 0x3a DEVLINK_CMD_FLASH_UPDATE_END = 0x3b DEVLINK_CMD_FLASH_UPDATE_STATUS = 0x3c DEVLINK_CMD_TRAP_GET = 0x3d DEVLINK_CMD_TRAP_SET = 0x3e DEVLINK_CMD_TRAP_NEW = 0x3f DEVLINK_CMD_TRAP_DEL = 0x40 DEVLINK_CMD_TRAP_GROUP_GET = 0x41 DEVLINK_CMD_TRAP_GROUP_SET = 0x42 DEVLINK_CMD_TRAP_GROUP_NEW = 0x43 DEVLINK_CMD_TRAP_GROUP_DEL = 0x44 DEVLINK_CMD_TRAP_POLICER_GET = 0x45 DEVLINK_CMD_TRAP_POLICER_SET = 0x46 DEVLINK_CMD_TRAP_POLICER_NEW = 0x47 DEVLINK_CMD_TRAP_POLICER_DEL = 0x48 DEVLINK_CMD_HEALTH_REPORTER_TEST = 0x49 DEVLINK_CMD_RATE_GET = 0x4a DEVLINK_CMD_RATE_SET = 0x4b DEVLINK_CMD_RATE_NEW = 0x4c DEVLINK_CMD_RATE_DEL = 0x4d DEVLINK_CMD_LINECARD_GET = 0x4e DEVLINK_CMD_LINECARD_SET = 0x4f DEVLINK_CMD_LINECARD_NEW = 0x50 DEVLINK_CMD_LINECARD_DEL = 0x51 DEVLINK_CMD_SELFTESTS_GET = 0x52 DEVLINK_CMD_MAX = 0x54 DEVLINK_PORT_TYPE_NOTSET = 0x0 DEVLINK_PORT_TYPE_AUTO = 0x1 DEVLINK_PORT_TYPE_ETH = 0x2 DEVLINK_PORT_TYPE_IB = 0x3 DEVLINK_SB_POOL_TYPE_INGRESS = 0x0 DEVLINK_SB_POOL_TYPE_EGRESS = 0x1 DEVLINK_SB_THRESHOLD_TYPE_STATIC = 0x0 DEVLINK_SB_THRESHOLD_TYPE_DYNAMIC = 0x1 DEVLINK_ESWITCH_MODE_LEGACY = 0x0 DEVLINK_ESWITCH_MODE_SWITCHDEV = 0x1 DEVLINK_ESWITCH_INLINE_MODE_NONE = 0x0 DEVLINK_ESWITCH_INLINE_MODE_LINK = 0x1 DEVLINK_ESWITCH_INLINE_MODE_NETWORK = 0x2 DEVLINK_ESWITCH_INLINE_MODE_TRANSPORT = 0x3 DEVLINK_ESWITCH_ENCAP_MODE_NONE = 0x0 DEVLINK_ESWITCH_ENCAP_MODE_BASIC = 0x1 DEVLINK_PORT_FLAVOUR_PHYSICAL = 0x0 DEVLINK_PORT_FLAVOUR_CPU = 0x1 DEVLINK_PORT_FLAVOUR_DSA = 0x2 DEVLINK_PORT_FLAVOUR_PCI_PF = 0x3 DEVLINK_PORT_FLAVOUR_PCI_VF = 0x4 DEVLINK_PORT_FLAVOUR_VIRTUAL = 0x5 DEVLINK_PORT_FLAVOUR_UNUSED = 0x6 DEVLINK_PARAM_CMODE_RUNTIME = 0x0 DEVLINK_PARAM_CMODE_DRIVERINIT = 0x1 DEVLINK_PARAM_CMODE_PERMANENT = 0x2 DEVLINK_PARAM_CMODE_MAX = 0x2 DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DRIVER = 0x0 DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_FLASH = 0x1 DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_DISK = 0x2 DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_UNKNOWN = 0x3 DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_UNKNOWN = 0x0 DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_ALWAYS = 0x1 DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_NEVER = 0x2 DEVLINK_PARAM_RESET_DEV_ON_DRV_PROBE_VALUE_DISK = 0x3 DEVLINK_ATTR_STATS_RX_PACKETS = 0x0 DEVLINK_ATTR_STATS_RX_BYTES = 0x1 DEVLINK_ATTR_STATS_RX_DROPPED = 0x2 DEVLINK_ATTR_STATS_MAX = 0x2 DEVLINK_FLASH_OVERWRITE_SETTINGS_BIT = 0x0 DEVLINK_FLASH_OVERWRITE_IDENTIFIERS_BIT = 0x1 DEVLINK_FLASH_OVERWRITE_MAX_BIT = 0x1 DEVLINK_TRAP_ACTION_DROP = 0x0 DEVLINK_TRAP_ACTION_TRAP = 0x1 DEVLINK_TRAP_ACTION_MIRROR = 0x2 DEVLINK_TRAP_TYPE_DROP = 0x0 DEVLINK_TRAP_TYPE_EXCEPTION = 0x1 DEVLINK_TRAP_TYPE_CONTROL = 0x2 DEVLINK_ATTR_TRAP_METADATA_TYPE_IN_PORT = 0x0 DEVLINK_ATTR_TRAP_METADATA_TYPE_FA_COOKIE = 0x1 DEVLINK_RELOAD_ACTION_UNSPEC = 0x0 DEVLINK_RELOAD_ACTION_DRIVER_REINIT = 0x1 DEVLINK_RELOAD_ACTION_FW_ACTIVATE = 0x2 DEVLINK_RELOAD_ACTION_MAX = 0x2 DEVLINK_RELOAD_LIMIT_UNSPEC = 0x0 DEVLINK_RELOAD_LIMIT_NO_RESET = 0x1 DEVLINK_RELOAD_LIMIT_MAX = 0x1 DEVLINK_ATTR_UNSPEC = 0x0 DEVLINK_ATTR_BUS_NAME = 0x1 DEVLINK_ATTR_DEV_NAME = 0x2 DEVLINK_ATTR_PORT_INDEX = 0x3 DEVLINK_ATTR_PORT_TYPE = 0x4 DEVLINK_ATTR_PORT_DESIRED_TYPE = 0x5 DEVLINK_ATTR_PORT_NETDEV_IFINDEX = 0x6 DEVLINK_ATTR_PORT_NETDEV_NAME = 0x7 DEVLINK_ATTR_PORT_IBDEV_NAME = 0x8 DEVLINK_ATTR_PORT_SPLIT_COUNT = 0x9 DEVLINK_ATTR_PORT_SPLIT_GROUP = 0xa DEVLINK_ATTR_SB_INDEX = 0xb DEVLINK_ATTR_SB_SIZE = 0xc DEVLINK_ATTR_SB_INGRESS_POOL_COUNT = 0xd DEVLINK_ATTR_SB_EGRESS_POOL_COUNT = 0xe DEVLINK_ATTR_SB_INGRESS_TC_COUNT = 0xf DEVLINK_ATTR_SB_EGRESS_TC_COUNT = 0x10 DEVLINK_ATTR_SB_POOL_INDEX = 0x11 DEVLINK_ATTR_SB_POOL_TYPE = 0x12 DEVLINK_ATTR_SB_POOL_SIZE = 0x13 DEVLINK_ATTR_SB_POOL_THRESHOLD_TYPE = 0x14 DEVLINK_ATTR_SB_THRESHOLD = 0x15 DEVLINK_ATTR_SB_TC_INDEX = 0x16 DEVLINK_ATTR_SB_OCC_CUR = 0x17 DEVLINK_ATTR_SB_OCC_MAX = 0x18 DEVLINK_ATTR_ESWITCH_MODE = 0x19 DEVLINK_ATTR_ESWITCH_INLINE_MODE = 0x1a DEVLINK_ATTR_DPIPE_TABLES = 0x1b DEVLINK_ATTR_DPIPE_TABLE = 0x1c DEVLINK_ATTR_DPIPE_TABLE_NAME = 0x1d DEVLINK_ATTR_DPIPE_TABLE_SIZE = 0x1e DEVLINK_ATTR_DPIPE_TABLE_MATCHES = 0x1f DEVLINK_ATTR_DPIPE_TABLE_ACTIONS = 0x20 DEVLINK_ATTR_DPIPE_TABLE_COUNTERS_ENABLED = 0x21 DEVLINK_ATTR_DPIPE_ENTRIES = 0x22 DEVLINK_ATTR_DPIPE_ENTRY = 0x23 DEVLINK_ATTR_DPIPE_ENTRY_INDEX = 0x24 DEVLINK_ATTR_DPIPE_ENTRY_MATCH_VALUES = 0x25 DEVLINK_ATTR_DPIPE_ENTRY_ACTION_VALUES = 0x26 DEVLINK_ATTR_DPIPE_ENTRY_COUNTER = 0x27 DEVLINK_ATTR_DPIPE_MATCH = 0x28 DEVLINK_ATTR_DPIPE_MATCH_VALUE = 0x29 DEVLINK_ATTR_DPIPE_MATCH_TYPE = 0x2a DEVLINK_ATTR_DPIPE_ACTION = 0x2b DEVLINK_ATTR_DPIPE_ACTION_VALUE = 0x2c DEVLINK_ATTR_DPIPE_ACTION_TYPE = 0x2d DEVLINK_ATTR_DPIPE_VALUE = 0x2e DEVLINK_ATTR_DPIPE_VALUE_MASK = 0x2f DEVLINK_ATTR_DPIPE_VALUE_MAPPING = 0x30 DEVLINK_ATTR_DPIPE_HEADERS = 0x31 DEVLINK_ATTR_DPIPE_HEADER = 0x32 DEVLINK_ATTR_DPIPE_HEADER_NAME = 0x33 DEVLINK_ATTR_DPIPE_HEADER_ID = 0x34 DEVLINK_ATTR_DPIPE_HEADER_FIELDS = 0x35 DEVLINK_ATTR_DPIPE_HEADER_GLOBAL = 0x36 DEVLINK_ATTR_DPIPE_HEADER_INDEX = 0x37 DEVLINK_ATTR_DPIPE_FIELD = 0x38 DEVLINK_ATTR_DPIPE_FIELD_NAME = 0x39 DEVLINK_ATTR_DPIPE_FIELD_ID = 0x3a DEVLINK_ATTR_DPIPE_FIELD_BITWIDTH = 0x3b DEVLINK_ATTR_DPIPE_FIELD_MAPPING_TYPE = 0x3c DEVLINK_ATTR_PAD = 0x3d DEVLINK_ATTR_ESWITCH_ENCAP_MODE = 0x3e DEVLINK_ATTR_RESOURCE_LIST = 0x3f DEVLINK_ATTR_RESOURCE = 0x40 DEVLINK_ATTR_RESOURCE_NAME = 0x41 DEVLINK_ATTR_RESOURCE_ID = 0x42 DEVLINK_ATTR_RESOURCE_SIZE = 0x43 DEVLINK_ATTR_RESOURCE_SIZE_NEW = 0x44 DEVLINK_ATTR_RESOURCE_SIZE_VALID = 0x45 DEVLINK_ATTR_RESOURCE_SIZE_MIN = 0x46 DEVLINK_ATTR_RESOURCE_SIZE_MAX = 0x47 DEVLINK_ATTR_RESOURCE_SIZE_GRAN = 0x48 DEVLINK_ATTR_RESOURCE_UNIT = 0x49 DEVLINK_ATTR_RESOURCE_OCC = 0x4a DEVLINK_ATTR_DPIPE_TABLE_RESOURCE_ID = 0x4b DEVLINK_ATTR_DPIPE_TABLE_RESOURCE_UNITS = 0x4c DEVLINK_ATTR_PORT_FLAVOUR = 0x4d DEVLINK_ATTR_PORT_NUMBER = 0x4e DEVLINK_ATTR_PORT_SPLIT_SUBPORT_NUMBER = 0x4f DEVLINK_ATTR_PARAM = 0x50 DEVLINK_ATTR_PARAM_NAME = 0x51 DEVLINK_ATTR_PARAM_GENERIC = 0x52 DEVLINK_ATTR_PARAM_TYPE = 0x53 DEVLINK_ATTR_PARAM_VALUES_LIST = 0x54 DEVLINK_ATTR_PARAM_VALUE = 0x55 DEVLINK_ATTR_PARAM_VALUE_DATA = 0x56 DEVLINK_ATTR_PARAM_VALUE_CMODE = 0x57 DEVLINK_ATTR_REGION_NAME = 0x58 DEVLINK_ATTR_REGION_SIZE = 0x59 DEVLINK_ATTR_REGION_SNAPSHOTS = 0x5a DEVLINK_ATTR_REGION_SNAPSHOT = 0x5b DEVLINK_ATTR_REGION_SNAPSHOT_ID = 0x5c DEVLINK_ATTR_REGION_CHUNKS = 0x5d DEVLINK_ATTR_REGION_CHUNK = 0x5e DEVLINK_ATTR_REGION_CHUNK_DATA = 0x5f DEVLINK_ATTR_REGION_CHUNK_ADDR = 0x60 DEVLINK_ATTR_REGION_CHUNK_LEN = 0x61 DEVLINK_ATTR_INFO_DRIVER_NAME = 0x62 DEVLINK_ATTR_INFO_SERIAL_NUMBER = 0x63 DEVLINK_ATTR_INFO_VERSION_FIXED = 0x64 DEVLINK_ATTR_INFO_VERSION_RUNNING = 0x65 DEVLINK_ATTR_INFO_VERSION_STORED = 0x66 DEVLINK_ATTR_INFO_VERSION_NAME = 0x67 DEVLINK_ATTR_INFO_VERSION_VALUE = 0x68 DEVLINK_ATTR_SB_POOL_CELL_SIZE = 0x69 DEVLINK_ATTR_FMSG = 0x6a DEVLINK_ATTR_FMSG_OBJ_NEST_START = 0x6b DEVLINK_ATTR_FMSG_PAIR_NEST_START = 0x6c DEVLINK_ATTR_FMSG_ARR_NEST_START = 0x6d DEVLINK_ATTR_FMSG_NEST_END = 0x6e DEVLINK_ATTR_FMSG_OBJ_NAME = 0x6f DEVLINK_ATTR_FMSG_OBJ_VALUE_TYPE = 0x70 DEVLINK_ATTR_FMSG_OBJ_VALUE_DATA = 0x71 DEVLINK_ATTR_HEALTH_REPORTER = 0x72 DEVLINK_ATTR_HEALTH_REPORTER_NAME = 0x73 DEVLINK_ATTR_HEALTH_REPORTER_STATE = 0x74 DEVLINK_ATTR_HEALTH_REPORTER_ERR_COUNT = 0x75 DEVLINK_ATTR_HEALTH_REPORTER_RECOVER_COUNT = 0x76 DEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS = 0x77 DEVLINK_ATTR_HEALTH_REPORTER_GRACEFUL_PERIOD = 0x78 DEVLINK_ATTR_HEALTH_REPORTER_AUTO_RECOVER = 0x79 DEVLINK_ATTR_FLASH_UPDATE_FILE_NAME = 0x7a DEVLINK_ATTR_FLASH_UPDATE_COMPONENT = 0x7b DEVLINK_ATTR_FLASH_UPDATE_STATUS_MSG = 0x7c DEVLINK_ATTR_FLASH_UPDATE_STATUS_DONE = 0x7d DEVLINK_ATTR_FLASH_UPDATE_STATUS_TOTAL = 0x7e DEVLINK_ATTR_PORT_PCI_PF_NUMBER = 0x7f DEVLINK_ATTR_PORT_PCI_VF_NUMBER = 0x80 DEVLINK_ATTR_STATS = 0x81 DEVLINK_ATTR_TRAP_NAME = 0x82 DEVLINK_ATTR_TRAP_ACTION = 0x83 DEVLINK_ATTR_TRAP_TYPE = 0x84 DEVLINK_ATTR_TRAP_GENERIC = 0x85 DEVLINK_ATTR_TRAP_METADATA = 0x86 DEVLINK_ATTR_TRAP_GROUP_NAME = 0x87 DEVLINK_ATTR_RELOAD_FAILED = 0x88 DEVLINK_ATTR_HEALTH_REPORTER_DUMP_TS_NS = 0x89 DEVLINK_ATTR_NETNS_FD = 0x8a DEVLINK_ATTR_NETNS_PID = 0x8b DEVLINK_ATTR_NETNS_ID = 0x8c DEVLINK_ATTR_HEALTH_REPORTER_AUTO_DUMP = 0x8d DEVLINK_ATTR_TRAP_POLICER_ID = 0x8e DEVLINK_ATTR_TRAP_POLICER_RATE = 0x8f DEVLINK_ATTR_TRAP_POLICER_BURST = 0x90 DEVLINK_ATTR_PORT_FUNCTION = 0x91 DEVLINK_ATTR_INFO_BOARD_SERIAL_NUMBER = 0x92 DEVLINK_ATTR_PORT_LANES = 0x93 DEVLINK_ATTR_PORT_SPLITTABLE = 0x94 DEVLINK_ATTR_PORT_EXTERNAL = 0x95 DEVLINK_ATTR_PORT_CONTROLLER_NUMBER = 0x96 DEVLINK_ATTR_FLASH_UPDATE_STATUS_TIMEOUT = 0x97 DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK = 0x98 DEVLINK_ATTR_RELOAD_ACTION = 0x99 DEVLINK_ATTR_RELOAD_ACTIONS_PERFORMED = 0x9a DEVLINK_ATTR_RELOAD_LIMITS = 0x9b DEVLINK_ATTR_DEV_STATS = 0x9c DEVLINK_ATTR_RELOAD_STATS = 0x9d DEVLINK_ATTR_RELOAD_STATS_ENTRY = 0x9e DEVLINK_ATTR_RELOAD_STATS_LIMIT = 0x9f DEVLINK_ATTR_RELOAD_STATS_VALUE = 0xa0 DEVLINK_ATTR_REMOTE_RELOAD_STATS = 0xa1 DEVLINK_ATTR_RELOAD_ACTION_INFO = 0xa2 DEVLINK_ATTR_RELOAD_ACTION_STATS = 0xa3 DEVLINK_ATTR_PORT_PCI_SF_NUMBER = 0xa4 DEVLINK_ATTR_RATE_TYPE = 0xa5 DEVLINK_ATTR_RATE_TX_SHARE = 0xa6 DEVLINK_ATTR_RATE_TX_MAX = 0xa7 DEVLINK_ATTR_RATE_NODE_NAME = 0xa8 DEVLINK_ATTR_RATE_PARENT_NODE_NAME = 0xa9 DEVLINK_ATTR_REGION_MAX_SNAPSHOTS = 0xaa DEVLINK_ATTR_LINECARD_INDEX = 0xab DEVLINK_ATTR_LINECARD_STATE = 0xac DEVLINK_ATTR_LINECARD_TYPE = 0xad DEVLINK_ATTR_LINECARD_SUPPORTED_TYPES = 0xae DEVLINK_ATTR_NESTED_DEVLINK = 0xaf DEVLINK_ATTR_SELFTESTS = 0xb0 DEVLINK_ATTR_MAX = 0xb3 DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0 DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1 DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0 DEVLINK_DPIPE_ACTION_TYPE_FIELD_MODIFY = 0x0 DEVLINK_DPIPE_FIELD_ETHERNET_DST_MAC = 0x0 DEVLINK_DPIPE_FIELD_IPV4_DST_IP = 0x0 DEVLINK_DPIPE_FIELD_IPV6_DST_IP = 0x0 DEVLINK_DPIPE_HEADER_ETHERNET = 0x0 DEVLINK_DPIPE_HEADER_IPV4 = 0x1 DEVLINK_DPIPE_HEADER_IPV6 = 0x2 DEVLINK_RESOURCE_UNIT_ENTRY = 0x0 DEVLINK_PORT_FUNCTION_ATTR_UNSPEC = 0x0 DEVLINK_PORT_FUNCTION_ATTR_HW_ADDR = 0x1 DEVLINK_PORT_FN_ATTR_STATE = 0x2 DEVLINK_PORT_FN_ATTR_OPSTATE = 0x3 DEVLINK_PORT_FN_ATTR_CAPS = 0x4 DEVLINK_PORT_FUNCTION_ATTR_MAX = 0x6 ) type FsverityDigest struct { Algorithm uint16 Size uint16 } type FsverityEnableArg struct { Version uint32 Hash_algorithm uint32 Block_size uint32 Salt_size uint32 Salt_ptr uint64 Sig_size uint32 _ uint32 Sig_ptr uint64 _ [11]uint64 } type Nhmsg struct { Family uint8 Scope uint8 Protocol uint8 Resvd uint8 Flags uint32 } type NexthopGrp struct { Id uint32 Weight uint8 Resvd1 uint8 Resvd2 uint16 } const ( NHA_UNSPEC = 0x0 NHA_ID = 0x1 NHA_GROUP = 0x2 NHA_GROUP_TYPE = 0x3 NHA_BLACKHOLE = 0x4 NHA_OIF = 0x5 NHA_GATEWAY = 0x6 NHA_ENCAP_TYPE = 0x7 NHA_ENCAP = 0x8 NHA_GROUPS = 0x9 NHA_MASTER = 0xa ) const ( CAN_RAW_FILTER = 0x1 CAN_RAW_ERR_FILTER = 0x2 CAN_RAW_LOOPBACK = 0x3 CAN_RAW_RECV_OWN_MSGS = 0x4 CAN_RAW_FD_FRAMES = 0x5 CAN_RAW_JOIN_FILTERS = 0x6 ) type WatchdogInfo struct { Options uint32 Version uint32 Identity [32]uint8 } type PPSFData struct { Info PPSKInfo Timeout PPSKTime } type PPSKParams struct { Api_version int32 Mode int32 Assert_off_tu PPSKTime Clear_off_tu PPSKTime } type PPSKTime struct { Sec int64 Nsec int32 Flags uint32 } const ( LWTUNNEL_ENCAP_NONE = 0x0 LWTUNNEL_ENCAP_MPLS = 0x1 LWTUNNEL_ENCAP_IP = 0x2 LWTUNNEL_ENCAP_ILA = 0x3 LWTUNNEL_ENCAP_IP6 = 0x4 LWTUNNEL_ENCAP_SEG6 = 0x5 LWTUNNEL_ENCAP_BPF = 0x6 LWTUNNEL_ENCAP_SEG6_LOCAL = 0x7 LWTUNNEL_ENCAP_RPL = 0x8 LWTUNNEL_ENCAP_IOAM6 = 0x9 LWTUNNEL_ENCAP_XFRM = 0xa LWTUNNEL_ENCAP_MAX = 0xa MPLS_IPTUNNEL_UNSPEC = 0x0 MPLS_IPTUNNEL_DST = 0x1 MPLS_IPTUNNEL_TTL = 0x2 MPLS_IPTUNNEL_MAX = 0x2 ) const ( ETHTOOL_ID_UNSPEC = 0x0 ETHTOOL_RX_COPYBREAK = 0x1 ETHTOOL_TX_COPYBREAK = 0x2 ETHTOOL_PFC_PREVENTION_TOUT = 0x3 ETHTOOL_TUNABLE_UNSPEC = 0x0 ETHTOOL_TUNABLE_U8 = 0x1 ETHTOOL_TUNABLE_U16 = 0x2 ETHTOOL_TUNABLE_U32 = 0x3 ETHTOOL_TUNABLE_U64 = 0x4 ETHTOOL_TUNABLE_STRING = 0x5 ETHTOOL_TUNABLE_S8 = 0x6 ETHTOOL_TUNABLE_S16 = 0x7 ETHTOOL_TUNABLE_S32 = 0x8 ETHTOOL_TUNABLE_S64 = 0x9 ETHTOOL_PHY_ID_UNSPEC = 0x0 ETHTOOL_PHY_DOWNSHIFT = 0x1 ETHTOOL_PHY_FAST_LINK_DOWN = 0x2 ETHTOOL_PHY_EDPD = 0x3 ETHTOOL_LINK_EXT_STATE_AUTONEG = 0x0 ETHTOOL_LINK_EXT_STATE_LINK_TRAINING_FAILURE = 0x1 ETHTOOL_LINK_EXT_STATE_LINK_LOGICAL_MISMATCH = 0x2 ETHTOOL_LINK_EXT_STATE_BAD_SIGNAL_INTEGRITY = 0x3 ETHTOOL_LINK_EXT_STATE_NO_CABLE = 0x4 ETHTOOL_LINK_EXT_STATE_CABLE_ISSUE = 0x5 ETHTOOL_LINK_EXT_STATE_EEPROM_ISSUE = 0x6 ETHTOOL_LINK_EXT_STATE_CALIBRATION_FAILURE = 0x7 ETHTOOL_LINK_EXT_STATE_POWER_BUDGET_EXCEEDED = 0x8 ETHTOOL_LINK_EXT_STATE_OVERHEAT = 0x9 ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_PARTNER_DETECTED = 0x1 ETHTOOL_LINK_EXT_SUBSTATE_AN_ACK_NOT_RECEIVED = 0x2 ETHTOOL_LINK_EXT_SUBSTATE_AN_NEXT_PAGE_EXCHANGE_FAILED = 0x3 ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_PARTNER_DETECTED_FORCE_MODE = 0x4 ETHTOOL_LINK_EXT_SUBSTATE_AN_FEC_MISMATCH_DURING_OVERRIDE = 0x5 ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_HCD = 0x6 ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_FRAME_LOCK_NOT_ACQUIRED = 0x1 ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_LINK_INHIBIT_TIMEOUT = 0x2 ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_LINK_PARTNER_DID_NOT_SET_RECEIVER_READY = 0x3 ETHTOOL_LINK_EXT_SUBSTATE_LT_REMOTE_FAULT = 0x4 ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_ACQUIRE_BLOCK_LOCK = 0x1 ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_ACQUIRE_AM_LOCK = 0x2 ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_GET_ALIGN_STATUS = 0x3 ETHTOOL_LINK_EXT_SUBSTATE_LLM_FC_FEC_IS_NOT_LOCKED = 0x4 ETHTOOL_LINK_EXT_SUBSTATE_LLM_RS_FEC_IS_NOT_LOCKED = 0x5 ETHTOOL_LINK_EXT_SUBSTATE_BSI_LARGE_NUMBER_OF_PHYSICAL_ERRORS = 0x1 ETHTOOL_LINK_EXT_SUBSTATE_BSI_UNSUPPORTED_RATE = 0x2 ETHTOOL_LINK_EXT_SUBSTATE_CI_UNSUPPORTED_CABLE = 0x1 ETHTOOL_LINK_EXT_SUBSTATE_CI_CABLE_TEST_FAILURE = 0x2 ETHTOOL_FLASH_ALL_REGIONS = 0x0 ETHTOOL_F_UNSUPPORTED__BIT = 0x0 ETHTOOL_F_WISH__BIT = 0x1 ETHTOOL_F_COMPAT__BIT = 0x2 ETHTOOL_FEC_NONE_BIT = 0x0 ETHTOOL_FEC_AUTO_BIT = 0x1 ETHTOOL_FEC_OFF_BIT = 0x2 ETHTOOL_FEC_RS_BIT = 0x3 ETHTOOL_FEC_BASER_BIT = 0x4 ETHTOOL_FEC_LLRS_BIT = 0x5 ETHTOOL_LINK_MODE_10baseT_Half_BIT = 0x0 ETHTOOL_LINK_MODE_10baseT_Full_BIT = 0x1 ETHTOOL_LINK_MODE_100baseT_Half_BIT = 0x2 ETHTOOL_LINK_MODE_100baseT_Full_BIT = 0x3 ETHTOOL_LINK_MODE_1000baseT_Half_BIT = 0x4 ETHTOOL_LINK_MODE_1000baseT_Full_BIT = 0x5 ETHTOOL_LINK_MODE_Autoneg_BIT = 0x6 ETHTOOL_LINK_MODE_TP_BIT = 0x7 ETHTOOL_LINK_MODE_AUI_BIT = 0x8 ETHTOOL_LINK_MODE_MII_BIT = 0x9 ETHTOOL_LINK_MODE_FIBRE_BIT = 0xa ETHTOOL_LINK_MODE_BNC_BIT = 0xb ETHTOOL_LINK_MODE_10000baseT_Full_BIT = 0xc ETHTOOL_LINK_MODE_Pause_BIT = 0xd ETHTOOL_LINK_MODE_Asym_Pause_BIT = 0xe ETHTOOL_LINK_MODE_2500baseX_Full_BIT = 0xf ETHTOOL_LINK_MODE_Backplane_BIT = 0x10 ETHTOOL_LINK_MODE_1000baseKX_Full_BIT = 0x11 ETHTOOL_LINK_MODE_10000baseKX4_Full_BIT = 0x12 ETHTOOL_LINK_MODE_10000baseKR_Full_BIT = 0x13 ETHTOOL_LINK_MODE_10000baseR_FEC_BIT = 0x14 ETHTOOL_LINK_MODE_20000baseMLD2_Full_BIT = 0x15 ETHTOOL_LINK_MODE_20000baseKR2_Full_BIT = 0x16 ETHTOOL_LINK_MODE_40000baseKR4_Full_BIT = 0x17 ETHTOOL_LINK_MODE_40000baseCR4_Full_BIT = 0x18 ETHTOOL_LINK_MODE_40000baseSR4_Full_BIT = 0x19 ETHTOOL_LINK_MODE_40000baseLR4_Full_BIT = 0x1a ETHTOOL_LINK_MODE_56000baseKR4_Full_BIT = 0x1b ETHTOOL_LINK_MODE_56000baseCR4_Full_BIT = 0x1c ETHTOOL_LINK_MODE_56000baseSR4_Full_BIT = 0x1d ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT = 0x1e ETHTOOL_LINK_MODE_25000baseCR_Full_BIT = 0x1f ETHTOOL_LINK_MODE_25000baseKR_Full_BIT = 0x20 ETHTOOL_LINK_MODE_25000baseSR_Full_BIT = 0x21 ETHTOOL_LINK_MODE_50000baseCR2_Full_BIT = 0x22 ETHTOOL_LINK_MODE_50000baseKR2_Full_BIT = 0x23 ETHTOOL_LINK_MODE_100000baseKR4_Full_BIT = 0x24 ETHTOOL_LINK_MODE_100000baseSR4_Full_BIT = 0x25 ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT = 0x26 ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT = 0x27 ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT = 0x28 ETHTOOL_LINK_MODE_1000baseX_Full_BIT = 0x29 ETHTOOL_LINK_MODE_10000baseCR_Full_BIT = 0x2a ETHTOOL_LINK_MODE_10000baseSR_Full_BIT = 0x2b ETHTOOL_LINK_MODE_10000baseLR_Full_BIT = 0x2c ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT = 0x2d ETHTOOL_LINK_MODE_10000baseER_Full_BIT = 0x2e ETHTOOL_LINK_MODE_2500baseT_Full_BIT = 0x2f ETHTOOL_LINK_MODE_5000baseT_Full_BIT = 0x30 ETHTOOL_LINK_MODE_FEC_NONE_BIT = 0x31 ETHTOOL_LINK_MODE_FEC_RS_BIT = 0x32 ETHTOOL_LINK_MODE_FEC_BASER_BIT = 0x33 ETHTOOL_LINK_MODE_50000baseKR_Full_BIT = 0x34 ETHTOOL_LINK_MODE_50000baseSR_Full_BIT = 0x35 ETHTOOL_LINK_MODE_50000baseCR_Full_BIT = 0x36 ETHTOOL_LINK_MODE_50000baseLR_ER_FR_Full_BIT = 0x37 ETHTOOL_LINK_MODE_50000baseDR_Full_BIT = 0x38 ETHTOOL_LINK_MODE_100000baseKR2_Full_BIT = 0x39 ETHTOOL_LINK_MODE_100000baseSR2_Full_BIT = 0x3a ETHTOOL_LINK_MODE_100000baseCR2_Full_BIT = 0x3b ETHTOOL_LINK_MODE_100000baseLR2_ER2_FR2_Full_BIT = 0x3c ETHTOOL_LINK_MODE_100000baseDR2_Full_BIT = 0x3d ETHTOOL_LINK_MODE_200000baseKR4_Full_BIT = 0x3e ETHTOOL_LINK_MODE_200000baseSR4_Full_BIT = 0x3f ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT = 0x40 ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT = 0x41 ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT = 0x42 ETHTOOL_LINK_MODE_100baseT1_Full_BIT = 0x43 ETHTOOL_LINK_MODE_1000baseT1_Full_BIT = 0x44 ETHTOOL_LINK_MODE_400000baseKR8_Full_BIT = 0x45 ETHTOOL_LINK_MODE_400000baseSR8_Full_BIT = 0x46 ETHTOOL_LINK_MODE_400000baseLR8_ER8_FR8_Full_BIT = 0x47 ETHTOOL_LINK_MODE_400000baseDR8_Full_BIT = 0x48 ETHTOOL_LINK_MODE_400000baseCR8_Full_BIT = 0x49 ETHTOOL_LINK_MODE_FEC_LLRS_BIT = 0x4a ETHTOOL_LINK_MODE_100000baseKR_Full_BIT = 0x4b ETHTOOL_LINK_MODE_100000baseSR_Full_BIT = 0x4c ETHTOOL_LINK_MODE_100000baseLR_ER_FR_Full_BIT = 0x4d ETHTOOL_LINK_MODE_100000baseCR_Full_BIT = 0x4e ETHTOOL_LINK_MODE_100000baseDR_Full_BIT = 0x4f ETHTOOL_LINK_MODE_200000baseKR2_Full_BIT = 0x50 ETHTOOL_LINK_MODE_200000baseSR2_Full_BIT = 0x51 ETHTOOL_LINK_MODE_200000baseLR2_ER2_FR2_Full_BIT = 0x52 ETHTOOL_LINK_MODE_200000baseDR2_Full_BIT = 0x53 ETHTOOL_LINK_MODE_200000baseCR2_Full_BIT = 0x54 ETHTOOL_LINK_MODE_400000baseKR4_Full_BIT = 0x55 ETHTOOL_LINK_MODE_400000baseSR4_Full_BIT = 0x56 ETHTOOL_LINK_MODE_400000baseLR4_ER4_FR4_Full_BIT = 0x57 ETHTOOL_LINK_MODE_400000baseDR4_Full_BIT = 0x58 ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT = 0x59 ETHTOOL_LINK_MODE_100baseFX_Half_BIT = 0x5a ETHTOOL_LINK_MODE_100baseFX_Full_BIT = 0x5b ETHTOOL_MSG_USER_NONE = 0x0 ETHTOOL_MSG_STRSET_GET = 0x1 ETHTOOL_MSG_LINKINFO_GET = 0x2 ETHTOOL_MSG_LINKINFO_SET = 0x3 ETHTOOL_MSG_LINKMODES_GET = 0x4 ETHTOOL_MSG_LINKMODES_SET = 0x5 ETHTOOL_MSG_LINKSTATE_GET = 0x6 ETHTOOL_MSG_DEBUG_GET = 0x7 ETHTOOL_MSG_DEBUG_SET = 0x8 ETHTOOL_MSG_WOL_GET = 0x9 ETHTOOL_MSG_WOL_SET = 0xa ETHTOOL_MSG_FEATURES_GET = 0xb ETHTOOL_MSG_FEATURES_SET = 0xc ETHTOOL_MSG_PRIVFLAGS_GET = 0xd ETHTOOL_MSG_PRIVFLAGS_SET = 0xe ETHTOOL_MSG_RINGS_GET = 0xf ETHTOOL_MSG_RINGS_SET = 0x10 ETHTOOL_MSG_CHANNELS_GET = 0x11 ETHTOOL_MSG_CHANNELS_SET = 0x12 ETHTOOL_MSG_COALESCE_GET = 0x13 ETHTOOL_MSG_COALESCE_SET = 0x14 ETHTOOL_MSG_PAUSE_GET = 0x15 ETHTOOL_MSG_PAUSE_SET = 0x16 ETHTOOL_MSG_EEE_GET = 0x17 ETHTOOL_MSG_EEE_SET = 0x18 ETHTOOL_MSG_TSINFO_GET = 0x19 ETHTOOL_MSG_CABLE_TEST_ACT = 0x1a ETHTOOL_MSG_CABLE_TEST_TDR_ACT = 0x1b ETHTOOL_MSG_TUNNEL_INFO_GET = 0x1c ETHTOOL_MSG_FEC_GET = 0x1d ETHTOOL_MSG_FEC_SET = 0x1e ETHTOOL_MSG_MODULE_EEPROM_GET = 0x1f ETHTOOL_MSG_STATS_GET = 0x20 ETHTOOL_MSG_PHC_VCLOCKS_GET = 0x21 ETHTOOL_MSG_MODULE_GET = 0x22 ETHTOOL_MSG_MODULE_SET = 0x23 ETHTOOL_MSG_PSE_GET = 0x24 ETHTOOL_MSG_PSE_SET = 0x25 ETHTOOL_MSG_RSS_GET = 0x26 ETHTOOL_MSG_USER_MAX = 0x2b ETHTOOL_MSG_KERNEL_NONE = 0x0 ETHTOOL_MSG_STRSET_GET_REPLY = 0x1 ETHTOOL_MSG_LINKINFO_GET_REPLY = 0x2 ETHTOOL_MSG_LINKINFO_NTF = 0x3 ETHTOOL_MSG_LINKMODES_GET_REPLY = 0x4 ETHTOOL_MSG_LINKMODES_NTF = 0x5 ETHTOOL_MSG_LINKSTATE_GET_REPLY = 0x6 ETHTOOL_MSG_DEBUG_GET_REPLY = 0x7 ETHTOOL_MSG_DEBUG_NTF = 0x8 ETHTOOL_MSG_WOL_GET_REPLY = 0x9 ETHTOOL_MSG_WOL_NTF = 0xa ETHTOOL_MSG_FEATURES_GET_REPLY = 0xb ETHTOOL_MSG_FEATURES_SET_REPLY = 0xc ETHTOOL_MSG_FEATURES_NTF = 0xd ETHTOOL_MSG_PRIVFLAGS_GET_REPLY = 0xe ETHTOOL_MSG_PRIVFLAGS_NTF = 0xf ETHTOOL_MSG_RINGS_GET_REPLY = 0x10 ETHTOOL_MSG_RINGS_NTF = 0x11 ETHTOOL_MSG_CHANNELS_GET_REPLY = 0x12 ETHTOOL_MSG_CHANNELS_NTF = 0x13 ETHTOOL_MSG_COALESCE_GET_REPLY = 0x14 ETHTOOL_MSG_COALESCE_NTF = 0x15 ETHTOOL_MSG_PAUSE_GET_REPLY = 0x16 ETHTOOL_MSG_PAUSE_NTF = 0x17 ETHTOOL_MSG_EEE_GET_REPLY = 0x18 ETHTOOL_MSG_EEE_NTF = 0x19 ETHTOOL_MSG_TSINFO_GET_REPLY = 0x1a ETHTOOL_MSG_CABLE_TEST_NTF = 0x1b ETHTOOL_MSG_CABLE_TEST_TDR_NTF = 0x1c ETHTOOL_MSG_TUNNEL_INFO_GET_REPLY = 0x1d ETHTOOL_MSG_FEC_GET_REPLY = 0x1e ETHTOOL_MSG_FEC_NTF = 0x1f ETHTOOL_MSG_MODULE_EEPROM_GET_REPLY = 0x20 ETHTOOL_MSG_STATS_GET_REPLY = 0x21 ETHTOOL_MSG_PHC_VCLOCKS_GET_REPLY = 0x22 ETHTOOL_MSG_MODULE_GET_REPLY = 0x23 ETHTOOL_MSG_MODULE_NTF = 0x24 ETHTOOL_MSG_PSE_GET_REPLY = 0x25 ETHTOOL_MSG_RSS_GET_REPLY = 0x26 ETHTOOL_MSG_KERNEL_MAX = 0x2b ETHTOOL_FLAG_COMPACT_BITSETS = 0x1 ETHTOOL_FLAG_OMIT_REPLY = 0x2 ETHTOOL_FLAG_STATS = 0x4 ETHTOOL_A_HEADER_UNSPEC = 0x0 ETHTOOL_A_HEADER_DEV_INDEX = 0x1 ETHTOOL_A_HEADER_DEV_NAME = 0x2 ETHTOOL_A_HEADER_FLAGS = 0x3 ETHTOOL_A_HEADER_MAX = 0x3 ETHTOOL_A_BITSET_BIT_UNSPEC = 0x0 ETHTOOL_A_BITSET_BIT_INDEX = 0x1 ETHTOOL_A_BITSET_BIT_NAME = 0x2 ETHTOOL_A_BITSET_BIT_VALUE = 0x3 ETHTOOL_A_BITSET_BIT_MAX = 0x3 ETHTOOL_A_BITSET_BITS_UNSPEC = 0x0 ETHTOOL_A_BITSET_BITS_BIT = 0x1 ETHTOOL_A_BITSET_BITS_MAX = 0x1 ETHTOOL_A_BITSET_UNSPEC = 0x0 ETHTOOL_A_BITSET_NOMASK = 0x1 ETHTOOL_A_BITSET_SIZE = 0x2 ETHTOOL_A_BITSET_BITS = 0x3 ETHTOOL_A_BITSET_VALUE = 0x4 ETHTOOL_A_BITSET_MASK = 0x5 ETHTOOL_A_BITSET_MAX = 0x5 ETHTOOL_A_STRING_UNSPEC = 0x0 ETHTOOL_A_STRING_INDEX = 0x1 ETHTOOL_A_STRING_VALUE = 0x2 ETHTOOL_A_STRING_MAX = 0x2 ETHTOOL_A_STRINGS_UNSPEC = 0x0 ETHTOOL_A_STRINGS_STRING = 0x1 ETHTOOL_A_STRINGS_MAX = 0x1 ETHTOOL_A_STRINGSET_UNSPEC = 0x0 ETHTOOL_A_STRINGSET_ID = 0x1 ETHTOOL_A_STRINGSET_COUNT = 0x2 ETHTOOL_A_STRINGSET_STRINGS = 0x3 ETHTOOL_A_STRINGSET_MAX = 0x3 ETHTOOL_A_STRINGSETS_UNSPEC = 0x0 ETHTOOL_A_STRINGSETS_STRINGSET = 0x1 ETHTOOL_A_STRINGSETS_MAX = 0x1 ETHTOOL_A_STRSET_UNSPEC = 0x0 ETHTOOL_A_STRSET_HEADER = 0x1 ETHTOOL_A_STRSET_STRINGSETS = 0x2 ETHTOOL_A_STRSET_COUNTS_ONLY = 0x3 ETHTOOL_A_STRSET_MAX = 0x3 ETHTOOL_A_LINKINFO_UNSPEC = 0x0 ETHTOOL_A_LINKINFO_HEADER = 0x1 ETHTOOL_A_LINKINFO_PORT = 0x2 ETHTOOL_A_LINKINFO_PHYADDR = 0x3 ETHTOOL_A_LINKINFO_TP_MDIX = 0x4 ETHTOOL_A_LINKINFO_TP_MDIX_CTRL = 0x5 ETHTOOL_A_LINKINFO_TRANSCEIVER = 0x6 ETHTOOL_A_LINKINFO_MAX = 0x6 ETHTOOL_A_LINKMODES_UNSPEC = 0x0 ETHTOOL_A_LINKMODES_HEADER = 0x1 ETHTOOL_A_LINKMODES_AUTONEG = 0x2 ETHTOOL_A_LINKMODES_OURS = 0x3 ETHTOOL_A_LINKMODES_PEER = 0x4 ETHTOOL_A_LINKMODES_SPEED = 0x5 ETHTOOL_A_LINKMODES_DUPLEX = 0x6 ETHTOOL_A_LINKMODES_MASTER_SLAVE_CFG = 0x7 ETHTOOL_A_LINKMODES_MASTER_SLAVE_STATE = 0x8 ETHTOOL_A_LINKMODES_LANES = 0x9 ETHTOOL_A_LINKMODES_RATE_MATCHING = 0xa ETHTOOL_A_LINKMODES_MAX = 0xa ETHTOOL_A_LINKSTATE_UNSPEC = 0x0 ETHTOOL_A_LINKSTATE_HEADER = 0x1 ETHTOOL_A_LINKSTATE_LINK = 0x2 ETHTOOL_A_LINKSTATE_SQI = 0x3 ETHTOOL_A_LINKSTATE_SQI_MAX = 0x4 ETHTOOL_A_LINKSTATE_EXT_STATE = 0x5 ETHTOOL_A_LINKSTATE_EXT_SUBSTATE = 0x6 ETHTOOL_A_LINKSTATE_EXT_DOWN_CNT = 0x7 ETHTOOL_A_LINKSTATE_MAX = 0x7 ETHTOOL_A_DEBUG_UNSPEC = 0x0 ETHTOOL_A_DEBUG_HEADER = 0x1 ETHTOOL_A_DEBUG_MSGMASK = 0x2 ETHTOOL_A_DEBUG_MAX = 0x2 ETHTOOL_A_WOL_UNSPEC = 0x0 ETHTOOL_A_WOL_HEADER = 0x1 ETHTOOL_A_WOL_MODES = 0x2 ETHTOOL_A_WOL_SOPASS = 0x3 ETHTOOL_A_WOL_MAX = 0x3 ETHTOOL_A_FEATURES_UNSPEC = 0x0 ETHTOOL_A_FEATURES_HEADER = 0x1 ETHTOOL_A_FEATURES_HW = 0x2 ETHTOOL_A_FEATURES_WANTED = 0x3 ETHTOOL_A_FEATURES_ACTIVE = 0x4 ETHTOOL_A_FEATURES_NOCHANGE = 0x5 ETHTOOL_A_FEATURES_MAX = 0x5 ETHTOOL_A_PRIVFLAGS_UNSPEC = 0x0 ETHTOOL_A_PRIVFLAGS_HEADER = 0x1 ETHTOOL_A_PRIVFLAGS_FLAGS = 0x2 ETHTOOL_A_PRIVFLAGS_MAX = 0x2 ETHTOOL_A_RINGS_UNSPEC = 0x0 ETHTOOL_A_RINGS_HEADER = 0x1 ETHTOOL_A_RINGS_RX_MAX = 0x2 ETHTOOL_A_RINGS_RX_MINI_MAX = 0x3 ETHTOOL_A_RINGS_RX_JUMBO_MAX = 0x4 ETHTOOL_A_RINGS_TX_MAX = 0x5 ETHTOOL_A_RINGS_RX = 0x6 ETHTOOL_A_RINGS_RX_MINI = 0x7 ETHTOOL_A_RINGS_RX_JUMBO = 0x8 ETHTOOL_A_RINGS_TX = 0x9 ETHTOOL_A_RINGS_RX_BUF_LEN = 0xa ETHTOOL_A_RINGS_TCP_DATA_SPLIT = 0xb ETHTOOL_A_RINGS_CQE_SIZE = 0xc ETHTOOL_A_RINGS_TX_PUSH = 0xd ETHTOOL_A_RINGS_MAX = 0x10 ETHTOOL_A_CHANNELS_UNSPEC = 0x0 ETHTOOL_A_CHANNELS_HEADER = 0x1 ETHTOOL_A_CHANNELS_RX_MAX = 0x2 ETHTOOL_A_CHANNELS_TX_MAX = 0x3 ETHTOOL_A_CHANNELS_OTHER_MAX = 0x4 ETHTOOL_A_CHANNELS_COMBINED_MAX = 0x5 ETHTOOL_A_CHANNELS_RX_COUNT = 0x6 ETHTOOL_A_CHANNELS_TX_COUNT = 0x7 ETHTOOL_A_CHANNELS_OTHER_COUNT = 0x8 ETHTOOL_A_CHANNELS_COMBINED_COUNT = 0x9 ETHTOOL_A_CHANNELS_MAX = 0x9 ETHTOOL_A_COALESCE_UNSPEC = 0x0 ETHTOOL_A_COALESCE_HEADER = 0x1 ETHTOOL_A_COALESCE_RX_USECS = 0x2 ETHTOOL_A_COALESCE_RX_MAX_FRAMES = 0x3 ETHTOOL_A_COALESCE_RX_USECS_IRQ = 0x4 ETHTOOL_A_COALESCE_RX_MAX_FRAMES_IRQ = 0x5 ETHTOOL_A_COALESCE_TX_USECS = 0x6 ETHTOOL_A_COALESCE_TX_MAX_FRAMES = 0x7 ETHTOOL_A_COALESCE_TX_USECS_IRQ = 0x8 ETHTOOL_A_COALESCE_TX_MAX_FRAMES_IRQ = 0x9 ETHTOOL_A_COALESCE_STATS_BLOCK_USECS = 0xa ETHTOOL_A_COALESCE_USE_ADAPTIVE_RX = 0xb ETHTOOL_A_COALESCE_USE_ADAPTIVE_TX = 0xc ETHTOOL_A_COALESCE_PKT_RATE_LOW = 0xd ETHTOOL_A_COALESCE_RX_USECS_LOW = 0xe ETHTOOL_A_COALESCE_RX_MAX_FRAMES_LOW = 0xf ETHTOOL_A_COALESCE_TX_USECS_LOW = 0x10 ETHTOOL_A_COALESCE_TX_MAX_FRAMES_LOW = 0x11 ETHTOOL_A_COALESCE_PKT_RATE_HIGH = 0x12 ETHTOOL_A_COALESCE_RX_USECS_HIGH = 0x13 ETHTOOL_A_COALESCE_RX_MAX_FRAMES_HIGH = 0x14 ETHTOOL_A_COALESCE_TX_USECS_HIGH = 0x15 ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH = 0x16 ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL = 0x17 ETHTOOL_A_COALESCE_USE_CQE_MODE_TX = 0x18 ETHTOOL_A_COALESCE_USE_CQE_MODE_RX = 0x19 ETHTOOL_A_COALESCE_MAX = 0x1c ETHTOOL_A_PAUSE_UNSPEC = 0x0 ETHTOOL_A_PAUSE_HEADER = 0x1 ETHTOOL_A_PAUSE_AUTONEG = 0x2 ETHTOOL_A_PAUSE_RX = 0x3 ETHTOOL_A_PAUSE_TX = 0x4 ETHTOOL_A_PAUSE_STATS = 0x5 ETHTOOL_A_PAUSE_MAX = 0x6 ETHTOOL_A_PAUSE_STAT_UNSPEC = 0x0 ETHTOOL_A_PAUSE_STAT_PAD = 0x1 ETHTOOL_A_PAUSE_STAT_TX_FRAMES = 0x2 ETHTOOL_A_PAUSE_STAT_RX_FRAMES = 0x3 ETHTOOL_A_PAUSE_STAT_MAX = 0x3 ETHTOOL_A_EEE_UNSPEC = 0x0 ETHTOOL_A_EEE_HEADER = 0x1 ETHTOOL_A_EEE_MODES_OURS = 0x2 ETHTOOL_A_EEE_MODES_PEER = 0x3 ETHTOOL_A_EEE_ACTIVE = 0x4 ETHTOOL_A_EEE_ENABLED = 0x5 ETHTOOL_A_EEE_TX_LPI_ENABLED = 0x6 ETHTOOL_A_EEE_TX_LPI_TIMER = 0x7 ETHTOOL_A_EEE_MAX = 0x7 ETHTOOL_A_TSINFO_UNSPEC = 0x0 ETHTOOL_A_TSINFO_HEADER = 0x1 ETHTOOL_A_TSINFO_TIMESTAMPING = 0x2 ETHTOOL_A_TSINFO_TX_TYPES = 0x3 ETHTOOL_A_TSINFO_RX_FILTERS = 0x4 ETHTOOL_A_TSINFO_PHC_INDEX = 0x5 ETHTOOL_A_TSINFO_MAX = 0x6 ETHTOOL_A_CABLE_TEST_UNSPEC = 0x0 ETHTOOL_A_CABLE_TEST_HEADER = 0x1 ETHTOOL_A_CABLE_TEST_MAX = 0x1 ETHTOOL_A_CABLE_RESULT_CODE_UNSPEC = 0x0 ETHTOOL_A_CABLE_RESULT_CODE_OK = 0x1 ETHTOOL_A_CABLE_RESULT_CODE_OPEN = 0x2 ETHTOOL_A_CABLE_RESULT_CODE_SAME_SHORT = 0x3 ETHTOOL_A_CABLE_RESULT_CODE_CROSS_SHORT = 0x4 ETHTOOL_A_CABLE_PAIR_A = 0x0 ETHTOOL_A_CABLE_PAIR_B = 0x1 ETHTOOL_A_CABLE_PAIR_C = 0x2 ETHTOOL_A_CABLE_PAIR_D = 0x3 ETHTOOL_A_CABLE_RESULT_UNSPEC = 0x0 ETHTOOL_A_CABLE_RESULT_PAIR = 0x1 ETHTOOL_A_CABLE_RESULT_CODE = 0x2 ETHTOOL_A_CABLE_RESULT_MAX = 0x2 ETHTOOL_A_CABLE_FAULT_LENGTH_UNSPEC = 0x0 ETHTOOL_A_CABLE_FAULT_LENGTH_PAIR = 0x1 ETHTOOL_A_CABLE_FAULT_LENGTH_CM = 0x2 ETHTOOL_A_CABLE_FAULT_LENGTH_MAX = 0x2 ETHTOOL_A_CABLE_TEST_NTF_STATUS_UNSPEC = 0x0 ETHTOOL_A_CABLE_TEST_NTF_STATUS_STARTED = 0x1 ETHTOOL_A_CABLE_TEST_NTF_STATUS_COMPLETED = 0x2 ETHTOOL_A_CABLE_NEST_UNSPEC = 0x0 ETHTOOL_A_CABLE_NEST_RESULT = 0x1 ETHTOOL_A_CABLE_NEST_FAULT_LENGTH = 0x2 ETHTOOL_A_CABLE_NEST_MAX = 0x2 ETHTOOL_A_CABLE_TEST_NTF_UNSPEC = 0x0 ETHTOOL_A_CABLE_TEST_NTF_HEADER = 0x1 ETHTOOL_A_CABLE_TEST_NTF_STATUS = 0x2 ETHTOOL_A_CABLE_TEST_NTF_NEST = 0x3 ETHTOOL_A_CABLE_TEST_NTF_MAX = 0x3 ETHTOOL_A_CABLE_TEST_TDR_CFG_UNSPEC = 0x0 ETHTOOL_A_CABLE_TEST_TDR_CFG_FIRST = 0x1 ETHTOOL_A_CABLE_TEST_TDR_CFG_LAST = 0x2 ETHTOOL_A_CABLE_TEST_TDR_CFG_STEP = 0x3 ETHTOOL_A_CABLE_TEST_TDR_CFG_PAIR = 0x4 ETHTOOL_A_CABLE_TEST_TDR_CFG_MAX = 0x4 ETHTOOL_A_CABLE_TEST_TDR_UNSPEC = 0x0 ETHTOOL_A_CABLE_TEST_TDR_HEADER = 0x1 ETHTOOL_A_CABLE_TEST_TDR_CFG = 0x2 ETHTOOL_A_CABLE_TEST_TDR_MAX = 0x2 ETHTOOL_A_CABLE_AMPLITUDE_UNSPEC = 0x0 ETHTOOL_A_CABLE_AMPLITUDE_PAIR = 0x1 ETHTOOL_A_CABLE_AMPLITUDE_mV = 0x2 ETHTOOL_A_CABLE_AMPLITUDE_MAX = 0x2 ETHTOOL_A_CABLE_PULSE_UNSPEC = 0x0 ETHTOOL_A_CABLE_PULSE_mV = 0x1 ETHTOOL_A_CABLE_PULSE_MAX = 0x1 ETHTOOL_A_CABLE_STEP_UNSPEC = 0x0 ETHTOOL_A_CABLE_STEP_FIRST_DISTANCE = 0x1 ETHTOOL_A_CABLE_STEP_LAST_DISTANCE = 0x2 ETHTOOL_A_CABLE_STEP_STEP_DISTANCE = 0x3 ETHTOOL_A_CABLE_STEP_MAX = 0x3 ETHTOOL_A_CABLE_TDR_NEST_UNSPEC = 0x0 ETHTOOL_A_CABLE_TDR_NEST_STEP = 0x1 ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE = 0x2 ETHTOOL_A_CABLE_TDR_NEST_PULSE = 0x3 ETHTOOL_A_CABLE_TDR_NEST_MAX = 0x3 ETHTOOL_A_CABLE_TEST_TDR_NTF_UNSPEC = 0x0 ETHTOOL_A_CABLE_TEST_TDR_NTF_HEADER = 0x1 ETHTOOL_A_CABLE_TEST_TDR_NTF_STATUS = 0x2 ETHTOOL_A_CABLE_TEST_TDR_NTF_NEST = 0x3 ETHTOOL_A_CABLE_TEST_TDR_NTF_MAX = 0x3 ETHTOOL_UDP_TUNNEL_TYPE_VXLAN = 0x0 ETHTOOL_UDP_TUNNEL_TYPE_GENEVE = 0x1 ETHTOOL_UDP_TUNNEL_TYPE_VXLAN_GPE = 0x2 ETHTOOL_A_TUNNEL_UDP_ENTRY_UNSPEC = 0x0 ETHTOOL_A_TUNNEL_UDP_ENTRY_PORT = 0x1 ETHTOOL_A_TUNNEL_UDP_ENTRY_TYPE = 0x2 ETHTOOL_A_TUNNEL_UDP_ENTRY_MAX = 0x2 ETHTOOL_A_TUNNEL_UDP_TABLE_UNSPEC = 0x0 ETHTOOL_A_TUNNEL_UDP_TABLE_SIZE = 0x1 ETHTOOL_A_TUNNEL_UDP_TABLE_TYPES = 0x2 ETHTOOL_A_TUNNEL_UDP_TABLE_ENTRY = 0x3 ETHTOOL_A_TUNNEL_UDP_TABLE_MAX = 0x3 ETHTOOL_A_TUNNEL_UDP_UNSPEC = 0x0 ETHTOOL_A_TUNNEL_UDP_TABLE = 0x1 ETHTOOL_A_TUNNEL_UDP_MAX = 0x1 ETHTOOL_A_TUNNEL_INFO_UNSPEC = 0x0 ETHTOOL_A_TUNNEL_INFO_HEADER = 0x1 ETHTOOL_A_TUNNEL_INFO_UDP_PORTS = 0x2 ETHTOOL_A_TUNNEL_INFO_MAX = 0x2 ) const SPEED_UNKNOWN = -0x1 type EthtoolDrvinfo struct { Cmd uint32 Driver [32]byte Version [32]byte Fw_version [32]byte Bus_info [32]byte Erom_version [32]byte Reserved2 [12]byte N_priv_flags uint32 N_stats uint32 Testinfo_len uint32 Eedump_len uint32 Regdump_len uint32 } type ( HIDRawReportDescriptor struct { Size uint32 Value [4096]uint8 } HIDRawDevInfo struct { Bustype uint32 Vendor int16 Product int16 } ) const ( CLOSE_RANGE_UNSHARE = 0x2 CLOSE_RANGE_CLOEXEC = 0x4 ) const ( NLMSGERR_ATTR_MSG = 0x1 NLMSGERR_ATTR_OFFS = 0x2 NLMSGERR_ATTR_COOKIE = 0x3 ) type ( EraseInfo struct { Start uint32 Length uint32 } EraseInfo64 struct { Start uint64 Length uint64 } MtdOobBuf struct { Start uint32 Length uint32 Ptr *uint8 } MtdOobBuf64 struct { Start uint64 Pad uint32 Length uint32 Ptr uint64 } MtdWriteReq struct { Start uint64 Len uint64 Ooblen uint64 Data uint64 Oob uint64 Mode uint8 _ [7]uint8 } MtdInfo struct { Type uint8 Flags uint32 Size uint32 Erasesize uint32 Writesize uint32 Oobsize uint32 _ uint64 } RegionInfo struct { Offset uint32 Erasesize uint32 Numblocks uint32 Regionindex uint32 } OtpInfo struct { Start uint32 Length uint32 Locked uint32 } NandOobinfo struct { Useecc uint32 Eccbytes uint32 Oobfree [8][2]uint32 Eccpos [32]uint32 } NandOobfree struct { Offset uint32 Length uint32 } NandEcclayout struct { Eccbytes uint32 Eccpos [64]uint32 Oobavail uint32 Oobfree [8]NandOobfree } MtdEccStats struct { Corrected uint32 Failed uint32 Badblocks uint32 Bbtblocks uint32 } ) const ( MTD_OPS_PLACE_OOB = 0x0 MTD_OPS_AUTO_OOB = 0x1 MTD_OPS_RAW = 0x2 ) const ( MTD_FILE_MODE_NORMAL = 0x0 MTD_FILE_MODE_OTP_FACTORY = 0x1 MTD_FILE_MODE_OTP_USER = 0x2 MTD_FILE_MODE_RAW = 0x3 ) const ( NFC_CMD_UNSPEC = 0x0 NFC_CMD_GET_DEVICE = 0x1 NFC_CMD_DEV_UP = 0x2 NFC_CMD_DEV_DOWN = 0x3 NFC_CMD_DEP_LINK_UP = 0x4 NFC_CMD_DEP_LINK_DOWN = 0x5 NFC_CMD_START_POLL = 0x6 NFC_CMD_STOP_POLL = 0x7 NFC_CMD_GET_TARGET = 0x8 NFC_EVENT_TARGETS_FOUND = 0x9 NFC_EVENT_DEVICE_ADDED = 0xa NFC_EVENT_DEVICE_REMOVED = 0xb NFC_EVENT_TARGET_LOST = 0xc NFC_EVENT_TM_ACTIVATED = 0xd NFC_EVENT_TM_DEACTIVATED = 0xe NFC_CMD_LLC_GET_PARAMS = 0xf NFC_CMD_LLC_SET_PARAMS = 0x10 NFC_CMD_ENABLE_SE = 0x11 NFC_CMD_DISABLE_SE = 0x12 NFC_CMD_LLC_SDREQ = 0x13 NFC_EVENT_LLC_SDRES = 0x14 NFC_CMD_FW_DOWNLOAD = 0x15 NFC_EVENT_SE_ADDED = 0x16 NFC_EVENT_SE_REMOVED = 0x17 NFC_EVENT_SE_CONNECTIVITY = 0x18 NFC_EVENT_SE_TRANSACTION = 0x19 NFC_CMD_GET_SE = 0x1a NFC_CMD_SE_IO = 0x1b NFC_CMD_ACTIVATE_TARGET = 0x1c NFC_CMD_VENDOR = 0x1d NFC_CMD_DEACTIVATE_TARGET = 0x1e NFC_ATTR_UNSPEC = 0x0 NFC_ATTR_DEVICE_INDEX = 0x1 NFC_ATTR_DEVICE_NAME = 0x2 NFC_ATTR_PROTOCOLS = 0x3 NFC_ATTR_TARGET_INDEX = 0x4 NFC_ATTR_TARGET_SENS_RES = 0x5 NFC_ATTR_TARGET_SEL_RES = 0x6 NFC_ATTR_TARGET_NFCID1 = 0x7 NFC_ATTR_TARGET_SENSB_RES = 0x8 NFC_ATTR_TARGET_SENSF_RES = 0x9 NFC_ATTR_COMM_MODE = 0xa NFC_ATTR_RF_MODE = 0xb NFC_ATTR_DEVICE_POWERED = 0xc NFC_ATTR_IM_PROTOCOLS = 0xd NFC_ATTR_TM_PROTOCOLS = 0xe NFC_ATTR_LLC_PARAM_LTO = 0xf NFC_ATTR_LLC_PARAM_RW = 0x10 NFC_ATTR_LLC_PARAM_MIUX = 0x11 NFC_ATTR_SE = 0x12 NFC_ATTR_LLC_SDP = 0x13 NFC_ATTR_FIRMWARE_NAME = 0x14 NFC_ATTR_SE_INDEX = 0x15 NFC_ATTR_SE_TYPE = 0x16 NFC_ATTR_SE_AID = 0x17 NFC_ATTR_FIRMWARE_DOWNLOAD_STATUS = 0x18 NFC_ATTR_SE_APDU = 0x19 NFC_ATTR_TARGET_ISO15693_DSFID = 0x1a NFC_ATTR_TARGET_ISO15693_UID = 0x1b NFC_ATTR_SE_PARAMS = 0x1c NFC_ATTR_VENDOR_ID = 0x1d NFC_ATTR_VENDOR_SUBCMD = 0x1e NFC_ATTR_VENDOR_DATA = 0x1f NFC_SDP_ATTR_UNSPEC = 0x0 NFC_SDP_ATTR_URI = 0x1 NFC_SDP_ATTR_SAP = 0x2 ) type LandlockRulesetAttr struct { Access_fs uint64 Access_net uint64 } type LandlockPathBeneathAttr struct { Allowed_access uint64 Parent_fd int32 } const ( LANDLOCK_RULE_PATH_BENEATH = 0x1 ) const ( IPC_CREAT = 0x200 IPC_EXCL = 0x400 IPC_NOWAIT = 0x800 IPC_PRIVATE = 0x0 ipc_64 = 0x100 ) const ( IPC_RMID = 0x0 IPC_SET = 0x1 IPC_STAT = 0x2 ) const ( SHM_RDONLY = 0x1000 SHM_RND = 0x2000 ) type MountAttr struct { Attr_set uint64 Attr_clr uint64 Propagation uint64 Userns_fd uint64 } const ( WG_CMD_GET_DEVICE = 0x0 WG_CMD_SET_DEVICE = 0x1 WGDEVICE_F_REPLACE_PEERS = 0x1 WGDEVICE_A_UNSPEC = 0x0 WGDEVICE_A_IFINDEX = 0x1 WGDEVICE_A_IFNAME = 0x2 WGDEVICE_A_PRIVATE_KEY = 0x3 WGDEVICE_A_PUBLIC_KEY = 0x4 WGDEVICE_A_FLAGS = 0x5 WGDEVICE_A_LISTEN_PORT = 0x6 WGDEVICE_A_FWMARK = 0x7 WGDEVICE_A_PEERS = 0x8 WGPEER_F_REMOVE_ME = 0x1 WGPEER_F_REPLACE_ALLOWEDIPS = 0x2 WGPEER_F_UPDATE_ONLY = 0x4 WGPEER_A_UNSPEC = 0x0 WGPEER_A_PUBLIC_KEY = 0x1 WGPEER_A_PRESHARED_KEY = 0x2 WGPEER_A_FLAGS = 0x3 WGPEER_A_ENDPOINT = 0x4 WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL = 0x5 WGPEER_A_LAST_HANDSHAKE_TIME = 0x6 WGPEER_A_RX_BYTES = 0x7 WGPEER_A_TX_BYTES = 0x8 WGPEER_A_ALLOWEDIPS = 0x9 WGPEER_A_PROTOCOL_VERSION = 0xa WGALLOWEDIP_A_UNSPEC = 0x0 WGALLOWEDIP_A_FAMILY = 0x1 WGALLOWEDIP_A_IPADDR = 0x2 WGALLOWEDIP_A_CIDR_MASK = 0x3 ) const ( NL_ATTR_TYPE_INVALID = 0x0 NL_ATTR_TYPE_FLAG = 0x1 NL_ATTR_TYPE_U8 = 0x2 NL_ATTR_TYPE_U16 = 0x3 NL_ATTR_TYPE_U32 = 0x4 NL_ATTR_TYPE_U64 = 0x5 NL_ATTR_TYPE_S8 = 0x6 NL_ATTR_TYPE_S16 = 0x7 NL_ATTR_TYPE_S32 = 0x8 NL_ATTR_TYPE_S64 = 0x9 NL_ATTR_TYPE_BINARY = 0xa NL_ATTR_TYPE_STRING = 0xb NL_ATTR_TYPE_NUL_STRING = 0xc NL_ATTR_TYPE_NESTED = 0xd NL_ATTR_TYPE_NESTED_ARRAY = 0xe NL_ATTR_TYPE_BITFIELD32 = 0xf NL_POLICY_TYPE_ATTR_UNSPEC = 0x0 NL_POLICY_TYPE_ATTR_TYPE = 0x1 NL_POLICY_TYPE_ATTR_MIN_VALUE_S = 0x2 NL_POLICY_TYPE_ATTR_MAX_VALUE_S = 0x3 NL_POLICY_TYPE_ATTR_MIN_VALUE_U = 0x4 NL_POLICY_TYPE_ATTR_MAX_VALUE_U = 0x5 NL_POLICY_TYPE_ATTR_MIN_LENGTH = 0x6 NL_POLICY_TYPE_ATTR_MAX_LENGTH = 0x7 NL_POLICY_TYPE_ATTR_POLICY_IDX = 0x8 NL_POLICY_TYPE_ATTR_POLICY_MAXTYPE = 0x9 NL_POLICY_TYPE_ATTR_BITFIELD32_MASK = 0xa NL_POLICY_TYPE_ATTR_PAD = 0xb NL_POLICY_TYPE_ATTR_MASK = 0xc NL_POLICY_TYPE_ATTR_MAX = 0xc ) type CANBitTiming struct { Bitrate uint32 Sample_point uint32 Tq uint32 Prop_seg uint32 Phase_seg1 uint32 Phase_seg2 uint32 Sjw uint32 Brp uint32 } type CANBitTimingConst struct { Name [16]uint8 Tseg1_min uint32 Tseg1_max uint32 Tseg2_min uint32 Tseg2_max uint32 Sjw_max uint32 Brp_min uint32 Brp_max uint32 Brp_inc uint32 } type CANClock struct { Freq uint32 } type CANBusErrorCounters struct { Txerr uint16 Rxerr uint16 } type CANCtrlMode struct { Mask uint32 Flags uint32 } type CANDeviceStats struct { Bus_error uint32 Error_warning uint32 Error_passive uint32 Bus_off uint32 Arbitration_lost uint32 Restarts uint32 } const ( CAN_STATE_ERROR_ACTIVE = 0x0 CAN_STATE_ERROR_WARNING = 0x1 CAN_STATE_ERROR_PASSIVE = 0x2 CAN_STATE_BUS_OFF = 0x3 CAN_STATE_STOPPED = 0x4 CAN_STATE_SLEEPING = 0x5 CAN_STATE_MAX = 0x6 ) const ( IFLA_CAN_UNSPEC = 0x0 IFLA_CAN_BITTIMING = 0x1 IFLA_CAN_BITTIMING_CONST = 0x2 IFLA_CAN_CLOCK = 0x3 IFLA_CAN_STATE = 0x4 IFLA_CAN_CTRLMODE = 0x5 IFLA_CAN_RESTART_MS = 0x6 IFLA_CAN_RESTART = 0x7 IFLA_CAN_BERR_COUNTER = 0x8 IFLA_CAN_DATA_BITTIMING = 0x9 IFLA_CAN_DATA_BITTIMING_CONST = 0xa IFLA_CAN_TERMINATION = 0xb IFLA_CAN_TERMINATION_CONST = 0xc IFLA_CAN_BITRATE_CONST = 0xd IFLA_CAN_DATA_BITRATE_CONST = 0xe IFLA_CAN_BITRATE_MAX = 0xf ) type KCMAttach struct { Fd int32 Bpf_fd int32 } type KCMUnattach struct { Fd int32 } type KCMClone struct { Fd int32 } const ( NL80211_AC_BE = 0x2 NL80211_AC_BK = 0x3 NL80211_ACL_POLICY_ACCEPT_UNLESS_LISTED = 0x0 NL80211_ACL_POLICY_DENY_UNLESS_LISTED = 0x1 NL80211_AC_VI = 0x1 NL80211_AC_VO = 0x0 NL80211_AP_SETTINGS_EXTERNAL_AUTH_SUPPORT = 0x1 NL80211_AP_SETTINGS_SA_QUERY_OFFLOAD_SUPPORT = 0x2 NL80211_AP_SME_SA_QUERY_OFFLOAD = 0x1 NL80211_ATTR_4ADDR = 0x53 NL80211_ATTR_ACK = 0x5c NL80211_ATTR_ACK_SIGNAL = 0x107 NL80211_ATTR_ACL_POLICY = 0xa5 NL80211_ATTR_ADMITTED_TIME = 0xd4 NL80211_ATTR_AIRTIME_WEIGHT = 0x112 NL80211_ATTR_AKM_SUITES = 0x4c NL80211_ATTR_AP_ISOLATE = 0x60 NL80211_ATTR_AP_SETTINGS_FLAGS = 0x135 NL80211_ATTR_AUTH_DATA = 0x9c NL80211_ATTR_AUTH_TYPE = 0x35 NL80211_ATTR_BANDS = 0xef NL80211_ATTR_BEACON_HEAD = 0xe NL80211_ATTR_BEACON_INTERVAL = 0xc NL80211_ATTR_BEACON_TAIL = 0xf NL80211_ATTR_BG_SCAN_PERIOD = 0x98 NL80211_ATTR_BSS_BASIC_RATES = 0x24 NL80211_ATTR_BSS = 0x2f NL80211_ATTR_BSS_CTS_PROT = 0x1c NL80211_ATTR_BSS_HT_OPMODE = 0x6d NL80211_ATTR_BSSID = 0xf5 NL80211_ATTR_BSS_SELECT = 0xe3 NL80211_ATTR_BSS_SHORT_PREAMBLE = 0x1d NL80211_ATTR_BSS_SHORT_SLOT_TIME = 0x1e NL80211_ATTR_CENTER_FREQ1 = 0xa0 NL80211_ATTR_CENTER_FREQ1_OFFSET = 0x123 NL80211_ATTR_CENTER_FREQ2 = 0xa1 NL80211_ATTR_CHANNEL_WIDTH = 0x9f NL80211_ATTR_CH_SWITCH_BLOCK_TX = 0xb8 NL80211_ATTR_CH_SWITCH_COUNT = 0xb7 NL80211_ATTR_CIPHER_SUITE_GROUP = 0x4a NL80211_ATTR_CIPHER_SUITES = 0x39 NL80211_ATTR_CIPHER_SUITES_PAIRWISE = 0x49 NL80211_ATTR_CNTDWN_OFFS_BEACON = 0xba NL80211_ATTR_CNTDWN_OFFS_PRESP = 0xbb NL80211_ATTR_COALESCE_RULE = 0xb6 NL80211_ATTR_COALESCE_RULE_CONDITION = 0x2 NL80211_ATTR_COALESCE_RULE_DELAY = 0x1 NL80211_ATTR_COALESCE_RULE_MAX = 0x3 NL80211_ATTR_COALESCE_RULE_PKT_PATTERN = 0x3 NL80211_ATTR_COLOR_CHANGE_COLOR = 0x130 NL80211_ATTR_COLOR_CHANGE_COUNT = 0x12f NL80211_ATTR_COLOR_CHANGE_ELEMS = 0x131 NL80211_ATTR_CONN_FAILED_REASON = 0x9b NL80211_ATTR_CONTROL_PORT = 0x44 NL80211_ATTR_CONTROL_PORT_ETHERTYPE = 0x66 NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT = 0x67 NL80211_ATTR_CONTROL_PORT_NO_PREAUTH = 0x11e NL80211_ATTR_CONTROL_PORT_OVER_NL80211 = 0x108 NL80211_ATTR_COOKIE = 0x58 NL80211_ATTR_CQM_BEACON_LOSS_EVENT = 0x8 NL80211_ATTR_CQM = 0x5e NL80211_ATTR_CQM_MAX = 0x9 NL80211_ATTR_CQM_PKT_LOSS_EVENT = 0x4 NL80211_ATTR_CQM_RSSI_HYST = 0x2 NL80211_ATTR_CQM_RSSI_LEVEL = 0x9 NL80211_ATTR_CQM_RSSI_THOLD = 0x1 NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT = 0x3 NL80211_ATTR_CQM_TXE_INTVL = 0x7 NL80211_ATTR_CQM_TXE_PKTS = 0x6 NL80211_ATTR_CQM_TXE_RATE = 0x5 NL80211_ATTR_CRIT_PROT_ID = 0xb3 NL80211_ATTR_CSA_C_OFF_BEACON = 0xba NL80211_ATTR_CSA_C_OFF_PRESP = 0xbb NL80211_ATTR_CSA_C_OFFSETS_TX = 0xcd NL80211_ATTR_CSA_IES = 0xb9 NL80211_ATTR_DEVICE_AP_SME = 0x8d NL80211_ATTR_DFS_CAC_TIME = 0x7 NL80211_ATTR_DFS_REGION = 0x92 NL80211_ATTR_DISABLE_EHT = 0x137 NL80211_ATTR_DISABLE_HE = 0x12d NL80211_ATTR_DISABLE_HT = 0x93 NL80211_ATTR_DISABLE_VHT = 0xaf NL80211_ATTR_DISCONNECTED_BY_AP = 0x47 NL80211_ATTR_DONT_WAIT_FOR_ACK = 0x8e NL80211_ATTR_DTIM_PERIOD = 0xd NL80211_ATTR_DURATION = 0x57 NL80211_ATTR_EHT_CAPABILITY = 0x136 NL80211_ATTR_EML_CAPABILITY = 0x13d NL80211_ATTR_EXT_CAPA = 0xa9 NL80211_ATTR_EXT_CAPA_MASK = 0xaa NL80211_ATTR_EXTERNAL_AUTH_ACTION = 0x104 NL80211_ATTR_EXTERNAL_AUTH_SUPPORT = 0x105 NL80211_ATTR_EXT_FEATURES = 0xd9 NL80211_ATTR_FEATURE_FLAGS = 0x8f NL80211_ATTR_FILS_CACHE_ID = 0xfd NL80211_ATTR_FILS_DISCOVERY = 0x126 NL80211_ATTR_FILS_ERP_NEXT_SEQ_NUM = 0xfb NL80211_ATTR_FILS_ERP_REALM = 0xfa NL80211_ATTR_FILS_ERP_RRK = 0xfc NL80211_ATTR_FILS_ERP_USERNAME = 0xf9 NL80211_ATTR_FILS_KEK = 0xf2 NL80211_ATTR_FILS_NONCES = 0xf3 NL80211_ATTR_FRAME = 0x33 NL80211_ATTR_FRAME_MATCH = 0x5b NL80211_ATTR_FRAME_TYPE = 0x65 NL80211_ATTR_FREQ_AFTER = 0x3b NL80211_ATTR_FREQ_BEFORE = 0x3a NL80211_ATTR_FREQ_FIXED = 0x3c NL80211_ATTR_FREQ_RANGE_END = 0x3 NL80211_ATTR_FREQ_RANGE_MAX_BW = 0x4 NL80211_ATTR_FREQ_RANGE_START = 0x2 NL80211_ATTR_FTM_RESPONDER = 0x10e NL80211_ATTR_FTM_RESPONDER_STATS = 0x10f NL80211_ATTR_GENERATION = 0x2e NL80211_ATTR_HANDLE_DFS = 0xbf NL80211_ATTR_HE_6GHZ_CAPABILITY = 0x125 NL80211_ATTR_HE_BSS_COLOR = 0x11b NL80211_ATTR_HE_CAPABILITY = 0x10d NL80211_ATTR_HE_OBSS_PD = 0x117 NL80211_ATTR_HIDDEN_SSID = 0x7e NL80211_ATTR_HT_CAPABILITY = 0x1f NL80211_ATTR_HT_CAPABILITY_MASK = 0x94 NL80211_ATTR_IE_ASSOC_RESP = 0x80 NL80211_ATTR_IE = 0x2a NL80211_ATTR_IE_PROBE_RESP = 0x7f NL80211_ATTR_IE_RIC = 0xb2 NL80211_ATTR_IFACE_SOCKET_OWNER = 0xcc NL80211_ATTR_IFINDEX = 0x3 NL80211_ATTR_IFNAME = 0x4 NL80211_ATTR_IFTYPE_AKM_SUITES = 0x11c NL80211_ATTR_IFTYPE = 0x5 NL80211_ATTR_IFTYPE_EXT_CAPA = 0xe6 NL80211_ATTR_INACTIVITY_TIMEOUT = 0x96 NL80211_ATTR_INTERFACE_COMBINATIONS = 0x78 NL80211_ATTR_KEY_CIPHER = 0x9 NL80211_ATTR_KEY = 0x50 NL80211_ATTR_KEY_DATA = 0x7 NL80211_ATTR_KEY_DEFAULT = 0xb NL80211_ATTR_KEY_DEFAULT_MGMT = 0x28 NL80211_ATTR_KEY_DEFAULT_TYPES = 0x6e NL80211_ATTR_KEY_IDX = 0x8 NL80211_ATTR_KEYS = 0x51 NL80211_ATTR_KEY_SEQ = 0xa NL80211_ATTR_KEY_TYPE = 0x37 NL80211_ATTR_LOCAL_MESH_POWER_MODE = 0xa4 NL80211_ATTR_LOCAL_STATE_CHANGE = 0x5f NL80211_ATTR_MAC_ACL_MAX = 0xa7 NL80211_ATTR_MAC_ADDRS = 0xa6 NL80211_ATTR_MAC = 0x6 NL80211_ATTR_MAC_HINT = 0xc8 NL80211_ATTR_MAC_MASK = 0xd7 NL80211_ATTR_MAX_AP_ASSOC_STA = 0xca NL80211_ATTR_MAX = 0x14a NL80211_ATTR_MAX_CRIT_PROT_DURATION = 0xb4 NL80211_ATTR_MAX_CSA_COUNTERS = 0xce NL80211_ATTR_MAX_MATCH_SETS = 0x85 NL80211_ATTR_MAX_NUM_AKM_SUITES = 0x13c NL80211_ATTR_MAX_NUM_PMKIDS = 0x56 NL80211_ATTR_MAX_NUM_SCAN_SSIDS = 0x2b NL80211_ATTR_MAX_NUM_SCHED_SCAN_PLANS = 0xde NL80211_ATTR_MAX_NUM_SCHED_SCAN_SSIDS = 0x7b NL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION = 0x6f NL80211_ATTR_MAX_SCAN_IE_LEN = 0x38 NL80211_ATTR_MAX_SCAN_PLAN_INTERVAL = 0xdf NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS = 0xe0 NL80211_ATTR_MAX_SCHED_SCAN_IE_LEN = 0x7c NL80211_ATTR_MBSSID_CONFIG = 0x132 NL80211_ATTR_MBSSID_ELEMS = 0x133 NL80211_ATTR_MCAST_RATE = 0x6b NL80211_ATTR_MDID = 0xb1 NL80211_ATTR_MEASUREMENT_DURATION = 0xeb NL80211_ATTR_MEASUREMENT_DURATION_MANDATORY = 0xec NL80211_ATTR_MESH_CONFIG = 0x23 NL80211_ATTR_MESH_ID = 0x18 NL80211_ATTR_MESH_PEER_AID = 0xed NL80211_ATTR_MESH_SETUP = 0x70 NL80211_ATTR_MGMT_SUBTYPE = 0x29 NL80211_ATTR_MLD_ADDR = 0x13a NL80211_ATTR_MLD_CAPA_AND_OPS = 0x13e NL80211_ATTR_MLO_LINK_ID = 0x139 NL80211_ATTR_MLO_LINKS = 0x138 NL80211_ATTR_MLO_SUPPORT = 0x13b NL80211_ATTR_MNTR_FLAGS = 0x17 NL80211_ATTR_MPATH_INFO = 0x1b NL80211_ATTR_MPATH_NEXT_HOP = 0x1a NL80211_ATTR_MULTICAST_TO_UNICAST_ENABLED = 0xf4 NL80211_ATTR_MU_MIMO_FOLLOW_MAC_ADDR = 0xe8 NL80211_ATTR_MU_MIMO_GROUP_DATA = 0xe7 NL80211_ATTR_NAN_FUNC = 0xf0 NL80211_ATTR_NAN_MASTER_PREF = 0xee NL80211_ATTR_NAN_MATCH = 0xf1 NL80211_ATTR_NETNS_FD = 0xdb NL80211_ATTR_NOACK_MAP = 0x95 NL80211_ATTR_NSS = 0x106 NL80211_ATTR_OBSS_COLOR_BITMAP = 0x12e NL80211_ATTR_OFFCHANNEL_TX_OK = 0x6c NL80211_ATTR_OPER_CLASS = 0xd6 NL80211_ATTR_OPMODE_NOTIF = 0xc2 NL80211_ATTR_P2P_CTWINDOW = 0xa2 NL80211_ATTR_P2P_OPPPS = 0xa3 NL80211_ATTR_PAD = 0xe5 NL80211_ATTR_PBSS = 0xe2 NL80211_ATTR_PEER_AID = 0xb5 NL80211_ATTR_PEER_MEASUREMENTS = 0x111 NL80211_ATTR_PID = 0x52 NL80211_ATTR_PMK = 0xfe NL80211_ATTR_PMKID = 0x55 NL80211_ATTR_PMK_LIFETIME = 0x11f NL80211_ATTR_PMKR0_NAME = 0x102 NL80211_ATTR_PMK_REAUTH_THRESHOLD = 0x120 NL80211_ATTR_PMKSA_CANDIDATE = 0x86 NL80211_ATTR_PORT_AUTHORIZED = 0x103 NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN = 0x5 NL80211_ATTR_POWER_RULE_MAX_EIRP = 0x6 NL80211_ATTR_PREV_BSSID = 0x4f NL80211_ATTR_PRIVACY = 0x46 NL80211_ATTR_PROBE_RESP = 0x91 NL80211_ATTR_PROBE_RESP_OFFLOAD = 0x90 NL80211_ATTR_PROTOCOL_FEATURES = 0xad NL80211_ATTR_PS_STATE = 0x5d NL80211_ATTR_QOS_MAP = 0xc7 NL80211_ATTR_RADAR_BACKGROUND = 0x134 NL80211_ATTR_RADAR_EVENT = 0xa8 NL80211_ATTR_REASON_CODE = 0x36 NL80211_ATTR_RECEIVE_MULTICAST = 0x121 NL80211_ATTR_RECONNECT_REQUESTED = 0x12b NL80211_ATTR_REG_ALPHA2 = 0x21 NL80211_ATTR_REG_INDOOR = 0xdd NL80211_ATTR_REG_INITIATOR = 0x30 NL80211_ATTR_REG_RULE_FLAGS = 0x1 NL80211_ATTR_REG_RULES = 0x22 NL80211_ATTR_REG_TYPE = 0x31 NL80211_ATTR_REKEY_DATA = 0x7a NL80211_ATTR_REQ_IE = 0x4d NL80211_ATTR_RESP_IE = 0x4e NL80211_ATTR_ROAM_SUPPORT = 0x83 NL80211_ATTR_RX_FRAME_TYPES = 0x64 NL80211_ATTR_RX_HW_TIMESTAMP = 0x140 NL80211_ATTR_RXMGMT_FLAGS = 0xbc NL80211_ATTR_RX_SIGNAL_DBM = 0x97 NL80211_ATTR_S1G_CAPABILITY = 0x128 NL80211_ATTR_S1G_CAPABILITY_MASK = 0x129 NL80211_ATTR_SAE_DATA = 0x9c NL80211_ATTR_SAE_PASSWORD = 0x115 NL80211_ATTR_SAE_PWE = 0x12a NL80211_ATTR_SAR_SPEC = 0x12c NL80211_ATTR_SCAN_FLAGS = 0x9e NL80211_ATTR_SCAN_FREQ_KHZ = 0x124 NL80211_ATTR_SCAN_FREQUENCIES = 0x2c NL80211_ATTR_SCAN_GENERATION = 0x2e NL80211_ATTR_SCAN_SSIDS = 0x2d NL80211_ATTR_SCAN_START_TIME_TSF_BSSID = 0xea NL80211_ATTR_SCAN_START_TIME_TSF = 0xe9 NL80211_ATTR_SCAN_SUPP_RATES = 0x7d NL80211_ATTR_SCHED_SCAN_DELAY = 0xdc NL80211_ATTR_SCHED_SCAN_INTERVAL = 0x77 NL80211_ATTR_SCHED_SCAN_MATCH = 0x84 NL80211_ATTR_SCHED_SCAN_MATCH_SSID = 0x1 NL80211_ATTR_SCHED_SCAN_MAX_REQS = 0x100 NL80211_ATTR_SCHED_SCAN_MULTI = 0xff NL80211_ATTR_SCHED_SCAN_PLANS = 0xe1 NL80211_ATTR_SCHED_SCAN_RELATIVE_RSSI = 0xf6 NL80211_ATTR_SCHED_SCAN_RSSI_ADJUST = 0xf7 NL80211_ATTR_SMPS_MODE = 0xd5 NL80211_ATTR_SOCKET_OWNER = 0xcc NL80211_ATTR_SOFTWARE_IFTYPES = 0x79 NL80211_ATTR_SPLIT_WIPHY_DUMP = 0xae NL80211_ATTR_SSID = 0x34 NL80211_ATTR_STA_AID = 0x10 NL80211_ATTR_STA_CAPABILITY = 0xab NL80211_ATTR_STA_EXT_CAPABILITY = 0xac NL80211_ATTR_STA_FLAGS2 = 0x43 NL80211_ATTR_STA_FLAGS = 0x11 NL80211_ATTR_STA_INFO = 0x15 NL80211_ATTR_STA_LISTEN_INTERVAL = 0x12 NL80211_ATTR_STA_PLINK_ACTION = 0x19 NL80211_ATTR_STA_PLINK_STATE = 0x74 NL80211_ATTR_STA_SUPPORTED_CHANNELS = 0xbd NL80211_ATTR_STA_SUPPORTED_OPER_CLASSES = 0xbe NL80211_ATTR_STA_SUPPORTED_RATES = 0x13 NL80211_ATTR_STA_SUPPORT_P2P_PS = 0xe4 NL80211_ATTR_STATUS_CODE = 0x48 NL80211_ATTR_STA_TX_POWER = 0x114 NL80211_ATTR_STA_TX_POWER_SETTING = 0x113 NL80211_ATTR_STA_VLAN = 0x14 NL80211_ATTR_STA_WME = 0x81 NL80211_ATTR_SUPPORT_10_MHZ = 0xc1 NL80211_ATTR_SUPPORT_5_MHZ = 0xc0 NL80211_ATTR_SUPPORT_AP_UAPSD = 0x82 NL80211_ATTR_SUPPORTED_COMMANDS = 0x32 NL80211_ATTR_SUPPORTED_IFTYPES = 0x20 NL80211_ATTR_SUPPORT_IBSS_RSN = 0x68 NL80211_ATTR_SUPPORT_MESH_AUTH = 0x73 NL80211_ATTR_SURVEY_INFO = 0x54 NL80211_ATTR_SURVEY_RADIO_STATS = 0xda NL80211_ATTR_TD_BITMAP = 0x141 NL80211_ATTR_TDLS_ACTION = 0x88 NL80211_ATTR_TDLS_DIALOG_TOKEN = 0x89 NL80211_ATTR_TDLS_EXTERNAL_SETUP = 0x8c NL80211_ATTR_TDLS_INITIATOR = 0xcf NL80211_ATTR_TDLS_OPERATION = 0x8a NL80211_ATTR_TDLS_PEER_CAPABILITY = 0xcb NL80211_ATTR_TDLS_SUPPORT = 0x8b NL80211_ATTR_TESTDATA = 0x45 NL80211_ATTR_TID_CONFIG = 0x11d NL80211_ATTR_TIMED_OUT = 0x41 NL80211_ATTR_TIMEOUT = 0x110 NL80211_ATTR_TIMEOUT_REASON = 0xf8 NL80211_ATTR_TSID = 0xd2 NL80211_ATTR_TWT_RESPONDER = 0x116 NL80211_ATTR_TX_FRAME_TYPES = 0x63 NL80211_ATTR_TX_HW_TIMESTAMP = 0x13f NL80211_ATTR_TX_NO_CCK_RATE = 0x87 NL80211_ATTR_TXQ_LIMIT = 0x10a NL80211_ATTR_TXQ_MEMORY_LIMIT = 0x10b NL80211_ATTR_TXQ_QUANTUM = 0x10c NL80211_ATTR_TXQ_STATS = 0x109 NL80211_ATTR_TX_RATES = 0x5a NL80211_ATTR_UNSOL_BCAST_PROBE_RESP = 0x127 NL80211_ATTR_UNSPEC = 0x0 NL80211_ATTR_USE_MFP = 0x42 NL80211_ATTR_USER_PRIO = 0xd3 NL80211_ATTR_USER_REG_HINT_TYPE = 0x9a NL80211_ATTR_USE_RRM = 0xd0 NL80211_ATTR_VENDOR_DATA = 0xc5 NL80211_ATTR_VENDOR_EVENTS = 0xc6 NL80211_ATTR_VENDOR_ID = 0xc3 NL80211_ATTR_VENDOR_SUBCMD = 0xc4 NL80211_ATTR_VHT_CAPABILITY = 0x9d NL80211_ATTR_VHT_CAPABILITY_MASK = 0xb0 NL80211_ATTR_VLAN_ID = 0x11a NL80211_ATTR_WANT_1X_4WAY_HS = 0x101 NL80211_ATTR_WDEV = 0x99 NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX = 0x72 NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX = 0x71 NL80211_ATTR_WIPHY_ANTENNA_RX = 0x6a NL80211_ATTR_WIPHY_ANTENNA_TX = 0x69 NL80211_ATTR_WIPHY_BANDS = 0x16 NL80211_ATTR_WIPHY_CHANNEL_TYPE = 0x27 NL80211_ATTR_WIPHY = 0x1 NL80211_ATTR_WIPHY_COVERAGE_CLASS = 0x59 NL80211_ATTR_WIPHY_DYN_ACK = 0xd1 NL80211_ATTR_WIPHY_EDMG_BW_CONFIG = 0x119 NL80211_ATTR_WIPHY_EDMG_CHANNELS = 0x118 NL80211_ATTR_WIPHY_FRAG_THRESHOLD = 0x3f NL80211_ATTR_WIPHY_FREQ = 0x26 NL80211_ATTR_WIPHY_FREQ_HINT = 0xc9 NL80211_ATTR_WIPHY_FREQ_OFFSET = 0x122 NL80211_ATTR_WIPHY_NAME = 0x2 NL80211_ATTR_WIPHY_RETRY_LONG = 0x3e NL80211_ATTR_WIPHY_RETRY_SHORT = 0x3d NL80211_ATTR_WIPHY_RTS_THRESHOLD = 0x40 NL80211_ATTR_WIPHY_SELF_MANAGED_REG = 0xd8 NL80211_ATTR_WIPHY_TX_POWER_LEVEL = 0x62 NL80211_ATTR_WIPHY_TX_POWER_SETTING = 0x61 NL80211_ATTR_WIPHY_TXQ_PARAMS = 0x25 NL80211_ATTR_WOWLAN_TRIGGERS = 0x75 NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED = 0x76 NL80211_ATTR_WPA_VERSIONS = 0x4b NL80211_AUTHTYPE_AUTOMATIC = 0x8 NL80211_AUTHTYPE_FILS_PK = 0x7 NL80211_AUTHTYPE_FILS_SK = 0x5 NL80211_AUTHTYPE_FILS_SK_PFS = 0x6 NL80211_AUTHTYPE_FT = 0x2 NL80211_AUTHTYPE_MAX = 0x7 NL80211_AUTHTYPE_NETWORK_EAP = 0x3 NL80211_AUTHTYPE_OPEN_SYSTEM = 0x0 NL80211_AUTHTYPE_SAE = 0x4 NL80211_AUTHTYPE_SHARED_KEY = 0x1 NL80211_BAND_2GHZ = 0x0 NL80211_BAND_5GHZ = 0x1 NL80211_BAND_60GHZ = 0x2 NL80211_BAND_6GHZ = 0x3 NL80211_BAND_ATTR_EDMG_BW_CONFIG = 0xb NL80211_BAND_ATTR_EDMG_CHANNELS = 0xa NL80211_BAND_ATTR_FREQS = 0x1 NL80211_BAND_ATTR_HT_AMPDU_DENSITY = 0x6 NL80211_BAND_ATTR_HT_AMPDU_FACTOR = 0x5 NL80211_BAND_ATTR_HT_CAPA = 0x4 NL80211_BAND_ATTR_HT_MCS_SET = 0x3 NL80211_BAND_ATTR_IFTYPE_DATA = 0x9 NL80211_BAND_ATTR_MAX = 0xd NL80211_BAND_ATTR_RATES = 0x2 NL80211_BAND_ATTR_VHT_CAPA = 0x8 NL80211_BAND_ATTR_VHT_MCS_SET = 0x7 NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC = 0x8 NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MCS_SET = 0xa NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PHY = 0x9 NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PPE = 0xb NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA = 0x6 NL80211_BAND_IFTYPE_ATTR_HE_CAP_MAC = 0x2 NL80211_BAND_IFTYPE_ATTR_HE_CAP_MCS_SET = 0x4 NL80211_BAND_IFTYPE_ATTR_HE_CAP_PHY = 0x3 NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE = 0x5 NL80211_BAND_IFTYPE_ATTR_IFTYPES = 0x1 NL80211_BAND_IFTYPE_ATTR_MAX = 0xb NL80211_BAND_IFTYPE_ATTR_VENDOR_ELEMS = 0x7 NL80211_BAND_LC = 0x5 NL80211_BAND_S1GHZ = 0x4 NL80211_BITRATE_ATTR_2GHZ_SHORTPREAMBLE = 0x2 NL80211_BITRATE_ATTR_MAX = 0x2 NL80211_BITRATE_ATTR_RATE = 0x1 NL80211_BSS_BEACON_IES = 0xb NL80211_BSS_BEACON_INTERVAL = 0x4 NL80211_BSS_BEACON_TSF = 0xd NL80211_BSS_BSSID = 0x1 NL80211_BSS_CAPABILITY = 0x5 NL80211_BSS_CHAIN_SIGNAL = 0x13 NL80211_BSS_CHAN_WIDTH_10 = 0x1 NL80211_BSS_CHAN_WIDTH_1 = 0x3 NL80211_BSS_CHAN_WIDTH_20 = 0x0 NL80211_BSS_CHAN_WIDTH_2 = 0x4 NL80211_BSS_CHAN_WIDTH_5 = 0x2 NL80211_BSS_CHAN_WIDTH = 0xc NL80211_BSS_FREQUENCY = 0x2 NL80211_BSS_FREQUENCY_OFFSET = 0x14 NL80211_BSS_INFORMATION_ELEMENTS = 0x6 NL80211_BSS_LAST_SEEN_BOOTTIME = 0xf NL80211_BSS_MAX = 0x18 NL80211_BSS_MLD_ADDR = 0x16 NL80211_BSS_MLO_LINK_ID = 0x15 NL80211_BSS_PAD = 0x10 NL80211_BSS_PARENT_BSSID = 0x12 NL80211_BSS_PARENT_TSF = 0x11 NL80211_BSS_PRESP_DATA = 0xe NL80211_BSS_SEEN_MS_AGO = 0xa NL80211_BSS_SELECT_ATTR_BAND_PREF = 0x2 NL80211_BSS_SELECT_ATTR_MAX = 0x3 NL80211_BSS_SELECT_ATTR_RSSI_ADJUST = 0x3 NL80211_BSS_SELECT_ATTR_RSSI = 0x1 NL80211_BSS_SIGNAL_MBM = 0x7 NL80211_BSS_SIGNAL_UNSPEC = 0x8 NL80211_BSS_STATUS_ASSOCIATED = 0x1 NL80211_BSS_STATUS_AUTHENTICATED = 0x0 NL80211_BSS_STATUS = 0x9 NL80211_BSS_STATUS_IBSS_JOINED = 0x2 NL80211_BSS_TSF = 0x3 NL80211_CHAN_HT20 = 0x1 NL80211_CHAN_HT40MINUS = 0x2 NL80211_CHAN_HT40PLUS = 0x3 NL80211_CHAN_NO_HT = 0x0 NL80211_CHAN_WIDTH_10 = 0x7 NL80211_CHAN_WIDTH_160 = 0x5 NL80211_CHAN_WIDTH_16 = 0xc NL80211_CHAN_WIDTH_1 = 0x8 NL80211_CHAN_WIDTH_20 = 0x1 NL80211_CHAN_WIDTH_20_NOHT = 0x0 NL80211_CHAN_WIDTH_2 = 0x9 NL80211_CHAN_WIDTH_320 = 0xd NL80211_CHAN_WIDTH_40 = 0x2 NL80211_CHAN_WIDTH_4 = 0xa NL80211_CHAN_WIDTH_5 = 0x6 NL80211_CHAN_WIDTH_80 = 0x3 NL80211_CHAN_WIDTH_80P80 = 0x4 NL80211_CHAN_WIDTH_8 = 0xb NL80211_CMD_ABORT_SCAN = 0x72 NL80211_CMD_ACTION = 0x3b NL80211_CMD_ACTION_TX_STATUS = 0x3c NL80211_CMD_ADD_LINK = 0x94 NL80211_CMD_ADD_LINK_STA = 0x96 NL80211_CMD_ADD_NAN_FUNCTION = 0x75 NL80211_CMD_ADD_TX_TS = 0x69 NL80211_CMD_ASSOC_COMEBACK = 0x93 NL80211_CMD_ASSOCIATE = 0x26 NL80211_CMD_AUTHENTICATE = 0x25 NL80211_CMD_CANCEL_REMAIN_ON_CHANNEL = 0x38 NL80211_CMD_CHANGE_NAN_CONFIG = 0x77 NL80211_CMD_CHANNEL_SWITCH = 0x66 NL80211_CMD_CH_SWITCH_NOTIFY = 0x58 NL80211_CMD_CH_SWITCH_STARTED_NOTIFY = 0x6e NL80211_CMD_COLOR_CHANGE_ABORTED = 0x90 NL80211_CMD_COLOR_CHANGE_COMPLETED = 0x91 NL80211_CMD_COLOR_CHANGE_REQUEST = 0x8e NL80211_CMD_COLOR_CHANGE_STARTED = 0x8f NL80211_CMD_CONNECT = 0x2e NL80211_CMD_CONN_FAILED = 0x5b NL80211_CMD_CONTROL_PORT_FRAME = 0x81 NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS = 0x8b NL80211_CMD_CRIT_PROTOCOL_START = 0x62 NL80211_CMD_CRIT_PROTOCOL_STOP = 0x63 NL80211_CMD_DEAUTHENTICATE = 0x27 NL80211_CMD_DEL_BEACON = 0x10 NL80211_CMD_DEL_INTERFACE = 0x8 NL80211_CMD_DEL_KEY = 0xc NL80211_CMD_DEL_MPATH = 0x18 NL80211_CMD_DEL_NAN_FUNCTION = 0x76 NL80211_CMD_DEL_PMK = 0x7c NL80211_CMD_DEL_PMKSA = 0x35 NL80211_CMD_DEL_STATION = 0x14 NL80211_CMD_DEL_TX_TS = 0x6a NL80211_CMD_DEL_WIPHY = 0x4 NL80211_CMD_DISASSOCIATE = 0x28 NL80211_CMD_DISCONNECT = 0x30 NL80211_CMD_EXTERNAL_AUTH = 0x7f NL80211_CMD_FLUSH_PMKSA = 0x36 NL80211_CMD_FRAME = 0x3b NL80211_CMD_FRAME_TX_STATUS = 0x3c NL80211_CMD_FRAME_WAIT_CANCEL = 0x43 NL80211_CMD_FT_EVENT = 0x61 NL80211_CMD_GET_BEACON = 0xd NL80211_CMD_GET_COALESCE = 0x64 NL80211_CMD_GET_FTM_RESPONDER_STATS = 0x82 NL80211_CMD_GET_INTERFACE = 0x5 NL80211_CMD_GET_KEY = 0x9 NL80211_CMD_GET_MESH_CONFIG = 0x1c NL80211_CMD_GET_MESH_PARAMS = 0x1c NL80211_CMD_GET_MPATH = 0x15 NL80211_CMD_GET_MPP = 0x6b NL80211_CMD_GET_POWER_SAVE = 0x3e NL80211_CMD_GET_PROTOCOL_FEATURES = 0x5f NL80211_CMD_GET_REG = 0x1f NL80211_CMD_GET_SCAN = 0x20 NL80211_CMD_GET_STATION = 0x11 NL80211_CMD_GET_SURVEY = 0x32 NL80211_CMD_GET_WIPHY = 0x1 NL80211_CMD_GET_WOWLAN = 0x49 NL80211_CMD_JOIN_IBSS = 0x2b NL80211_CMD_JOIN_MESH = 0x44 NL80211_CMD_JOIN_OCB = 0x6c NL80211_CMD_LEAVE_IBSS = 0x2c NL80211_CMD_LEAVE_MESH = 0x45 NL80211_CMD_LEAVE_OCB = 0x6d NL80211_CMD_MAX = 0x9b NL80211_CMD_MICHAEL_MIC_FAILURE = 0x29 NL80211_CMD_MODIFY_LINK_STA = 0x97 NL80211_CMD_NAN_MATCH = 0x78 NL80211_CMD_NEW_BEACON = 0xf NL80211_CMD_NEW_INTERFACE = 0x7 NL80211_CMD_NEW_KEY = 0xb NL80211_CMD_NEW_MPATH = 0x17 NL80211_CMD_NEW_PEER_CANDIDATE = 0x48 NL80211_CMD_NEW_SCAN_RESULTS = 0x22 NL80211_CMD_NEW_STATION = 0x13 NL80211_CMD_NEW_SURVEY_RESULTS = 0x33 NL80211_CMD_NEW_WIPHY = 0x3 NL80211_CMD_NOTIFY_CQM = 0x40 NL80211_CMD_NOTIFY_RADAR = 0x86 NL80211_CMD_OBSS_COLOR_COLLISION = 0x8d NL80211_CMD_PEER_MEASUREMENT_COMPLETE = 0x85 NL80211_CMD_PEER_MEASUREMENT_RESULT = 0x84 NL80211_CMD_PEER_MEASUREMENT_START = 0x83 NL80211_CMD_PMKSA_CANDIDATE = 0x50 NL80211_CMD_PORT_AUTHORIZED = 0x7d NL80211_CMD_PROBE_CLIENT = 0x54 NL80211_CMD_PROBE_MESH_LINK = 0x88 NL80211_CMD_RADAR_DETECT = 0x5e NL80211_CMD_REG_BEACON_HINT = 0x2a NL80211_CMD_REG_CHANGE = 0x24 NL80211_CMD_REGISTER_ACTION = 0x3a NL80211_CMD_REGISTER_BEACONS = 0x55 NL80211_CMD_REGISTER_FRAME = 0x3a NL80211_CMD_RELOAD_REGDB = 0x7e NL80211_CMD_REMAIN_ON_CHANNEL = 0x37 NL80211_CMD_REMOVE_LINK = 0x95 NL80211_CMD_REMOVE_LINK_STA = 0x98 NL80211_CMD_REQ_SET_REG = 0x1b NL80211_CMD_ROAM = 0x2f NL80211_CMD_SCAN_ABORTED = 0x23 NL80211_CMD_SCHED_SCAN_RESULTS = 0x4d NL80211_CMD_SCHED_SCAN_STOPPED = 0x4e NL80211_CMD_SET_BEACON = 0xe NL80211_CMD_SET_BSS = 0x19 NL80211_CMD_SET_CHANNEL = 0x41 NL80211_CMD_SET_COALESCE = 0x65 NL80211_CMD_SET_CQM = 0x3f NL80211_CMD_SET_FILS_AAD = 0x92 NL80211_CMD_SET_INTERFACE = 0x6 NL80211_CMD_SET_KEY = 0xa NL80211_CMD_SET_MAC_ACL = 0x5d NL80211_CMD_SET_MCAST_RATE = 0x5c NL80211_CMD_SET_MESH_CONFIG = 0x1d NL80211_CMD_SET_MESH_PARAMS = 0x1d NL80211_CMD_SET_MGMT_EXTRA_IE = 0x1e NL80211_CMD_SET_MPATH = 0x16 NL80211_CMD_SET_MULTICAST_TO_UNICAST = 0x79 NL80211_CMD_SET_NOACK_MAP = 0x57 NL80211_CMD_SET_PMK = 0x7b NL80211_CMD_SET_PMKSA = 0x34 NL80211_CMD_SET_POWER_SAVE = 0x3d NL80211_CMD_SET_QOS_MAP = 0x68 NL80211_CMD_SET_REG = 0x1a NL80211_CMD_SET_REKEY_OFFLOAD = 0x4f NL80211_CMD_SET_SAR_SPECS = 0x8c NL80211_CMD_SET_STATION = 0x12 NL80211_CMD_SET_TID_CONFIG = 0x89 NL80211_CMD_SET_TX_BITRATE_MASK = 0x39 NL80211_CMD_SET_WDS_PEER = 0x42 NL80211_CMD_SET_WIPHY = 0x2 NL80211_CMD_SET_WIPHY_NETNS = 0x31 NL80211_CMD_SET_WOWLAN = 0x4a NL80211_CMD_STA_OPMODE_CHANGED = 0x80 NL80211_CMD_START_AP = 0xf NL80211_CMD_START_NAN = 0x73 NL80211_CMD_START_P2P_DEVICE = 0x59 NL80211_CMD_START_SCHED_SCAN = 0x4b NL80211_CMD_STOP_AP = 0x10 NL80211_CMD_STOP_NAN = 0x74 NL80211_CMD_STOP_P2P_DEVICE = 0x5a NL80211_CMD_STOP_SCHED_SCAN = 0x4c NL80211_CMD_TDLS_CANCEL_CHANNEL_SWITCH = 0x70 NL80211_CMD_TDLS_CHANNEL_SWITCH = 0x6f NL80211_CMD_TDLS_MGMT = 0x52 NL80211_CMD_TDLS_OPER = 0x51 NL80211_CMD_TESTMODE = 0x2d NL80211_CMD_TRIGGER_SCAN = 0x21 NL80211_CMD_UNEXPECTED_4ADDR_FRAME = 0x56 NL80211_CMD_UNEXPECTED_FRAME = 0x53 NL80211_CMD_UNPROT_BEACON = 0x8a NL80211_CMD_UNPROT_DEAUTHENTICATE = 0x46 NL80211_CMD_UNPROT_DISASSOCIATE = 0x47 NL80211_CMD_UNSPEC = 0x0 NL80211_CMD_UPDATE_CONNECT_PARAMS = 0x7a NL80211_CMD_UPDATE_FT_IES = 0x60 NL80211_CMD_UPDATE_OWE_INFO = 0x87 NL80211_CMD_VENDOR = 0x67 NL80211_CMD_WIPHY_REG_CHANGE = 0x71 NL80211_COALESCE_CONDITION_MATCH = 0x0 NL80211_COALESCE_CONDITION_NO_MATCH = 0x1 NL80211_CONN_FAIL_BLOCKED_CLIENT = 0x1 NL80211_CONN_FAIL_MAX_CLIENTS = 0x0 NL80211_CQM_RSSI_BEACON_LOSS_EVENT = 0x2 NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH = 0x1 NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW = 0x0 NL80211_CQM_TXE_MAX_INTVL = 0x708 NL80211_CRIT_PROTO_APIPA = 0x3 NL80211_CRIT_PROTO_DHCP = 0x1 NL80211_CRIT_PROTO_EAPOL = 0x2 NL80211_CRIT_PROTO_MAX_DURATION = 0x1388 NL80211_CRIT_PROTO_UNSPEC = 0x0 NL80211_DFS_AVAILABLE = 0x2 NL80211_DFS_ETSI = 0x2 NL80211_DFS_FCC = 0x1 NL80211_DFS_JP = 0x3 NL80211_DFS_UNAVAILABLE = 0x1 NL80211_DFS_UNSET = 0x0 NL80211_DFS_USABLE = 0x0 NL80211_EDMG_BW_CONFIG_MAX = 0xf NL80211_EDMG_BW_CONFIG_MIN = 0x4 NL80211_EDMG_CHANNELS_MAX = 0x3c NL80211_EDMG_CHANNELS_MIN = 0x1 NL80211_EHT_MAX_CAPABILITY_LEN = 0x33 NL80211_EHT_MIN_CAPABILITY_LEN = 0xd NL80211_EXTERNAL_AUTH_ABORT = 0x1 NL80211_EXTERNAL_AUTH_START = 0x0 NL80211_EXT_FEATURE_4WAY_HANDSHAKE_AP_PSK = 0x32 NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X = 0x10 NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK = 0xf NL80211_EXT_FEATURE_ACCEPT_BCAST_PROBE_RESP = 0x12 NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT = 0x1b NL80211_EXT_FEATURE_AIRTIME_FAIRNESS = 0x21 NL80211_EXT_FEATURE_AP_PMKSA_CACHING = 0x22 NL80211_EXT_FEATURE_AQL = 0x28 NL80211_EXT_FEATURE_BEACON_PROTECTION_CLIENT = 0x2e NL80211_EXT_FEATURE_BEACON_PROTECTION = 0x29 NL80211_EXT_FEATURE_BEACON_RATE_HE = 0x36 NL80211_EXT_FEATURE_BEACON_RATE_HT = 0x7 NL80211_EXT_FEATURE_BEACON_RATE_LEGACY = 0x6 NL80211_EXT_FEATURE_BEACON_RATE_VHT = 0x8 NL80211_EXT_FEATURE_BSS_COLOR = 0x3a NL80211_EXT_FEATURE_BSS_PARENT_TSF = 0x4 NL80211_EXT_FEATURE_CAN_REPLACE_PTK0 = 0x1f NL80211_EXT_FEATURE_CONTROL_PORT_NO_PREAUTH = 0x2a NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211 = 0x1a NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_TX_STATUS = 0x30 NL80211_EXT_FEATURE_CQM_RSSI_LIST = 0xd NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT = 0x1b NL80211_EXT_FEATURE_DEL_IBSS_STA = 0x2c NL80211_EXT_FEATURE_DFS_OFFLOAD = 0x19 NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER = 0x20 NL80211_EXT_FEATURE_EXT_KEY_ID = 0x24 NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD = 0x3b NL80211_EXT_FEATURE_FILS_DISCOVERY = 0x34 NL80211_EXT_FEATURE_FILS_MAX_CHANNEL_TIME = 0x11 NL80211_EXT_FEATURE_FILS_SK_OFFLOAD = 0xe NL80211_EXT_FEATURE_FILS_STA = 0x9 NL80211_EXT_FEATURE_HIGH_ACCURACY_SCAN = 0x18 NL80211_EXT_FEATURE_LOW_POWER_SCAN = 0x17 NL80211_EXT_FEATURE_LOW_SPAN_SCAN = 0x16 NL80211_EXT_FEATURE_MFP_OPTIONAL = 0x15 NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA = 0xa NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA_CONNECTED = 0xb NL80211_EXT_FEATURE_MULTICAST_REGISTRATIONS = 0x2d NL80211_EXT_FEATURE_MU_MIMO_AIR_SNIFFER = 0x2 NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION = 0x14 NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE = 0x13 NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION = 0x31 NL80211_EXT_FEATURE_POWERED_ADDR_CHANGE = 0x3d NL80211_EXT_FEATURE_PROTECTED_TWT = 0x2b NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE = 0x39 NL80211_EXT_FEATURE_RADAR_BACKGROUND = 0x3c NL80211_EXT_FEATURE_RRM = 0x1 NL80211_EXT_FEATURE_SAE_OFFLOAD_AP = 0x33 NL80211_EXT_FEATURE_SAE_OFFLOAD = 0x26 NL80211_EXT_FEATURE_SCAN_FREQ_KHZ = 0x2f NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT = 0x1e NL80211_EXT_FEATURE_SCAN_RANDOM_SN = 0x1d NL80211_EXT_FEATURE_SCAN_START_TIME = 0x3 NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD = 0x23 NL80211_EXT_FEATURE_SCHED_SCAN_RELATIVE_RSSI = 0xc NL80211_EXT_FEATURE_SECURE_LTF = 0x37 NL80211_EXT_FEATURE_SECURE_RTT = 0x38 NL80211_EXT_FEATURE_SET_SCAN_DWELL = 0x5 NL80211_EXT_FEATURE_STA_TX_PWR = 0x25 NL80211_EXT_FEATURE_TXQS = 0x1c NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP = 0x35 NL80211_EXT_FEATURE_VHT_IBSS = 0x0 NL80211_EXT_FEATURE_VLAN_OFFLOAD = 0x27 NL80211_FEATURE_ACKTO_ESTIMATION = 0x800000 NL80211_FEATURE_ACTIVE_MONITOR = 0x20000 NL80211_FEATURE_ADVERTISE_CHAN_LIMITS = 0x4000 NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE = 0x40000 NL80211_FEATURE_AP_SCAN = 0x100 NL80211_FEATURE_CELL_BASE_REG_HINTS = 0x8 NL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES = 0x80000 NL80211_FEATURE_DYNAMIC_SMPS = 0x2000000 NL80211_FEATURE_FULL_AP_CLIENT_STATE = 0x8000 NL80211_FEATURE_HT_IBSS = 0x2 NL80211_FEATURE_INACTIVITY_TIMER = 0x4 NL80211_FEATURE_LOW_PRIORITY_SCAN = 0x40 NL80211_FEATURE_MAC_ON_CREATE = 0x8000000 NL80211_FEATURE_ND_RANDOM_MAC_ADDR = 0x80000000 NL80211_FEATURE_NEED_OBSS_SCAN = 0x400 NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL = 0x10 NL80211_FEATURE_P2P_GO_CTWIN = 0x800 NL80211_FEATURE_P2P_GO_OPPPS = 0x1000 NL80211_FEATURE_QUIET = 0x200000 NL80211_FEATURE_SAE = 0x20 NL80211_FEATURE_SCAN_FLUSH = 0x80 NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR = 0x20000000 NL80211_FEATURE_SCHED_SCAN_RANDOM_MAC_ADDR = 0x40000000 NL80211_FEATURE_SK_TX_STATUS = 0x1 NL80211_FEATURE_STATIC_SMPS = 0x1000000 NL80211_FEATURE_SUPPORTS_WMM_ADMISSION = 0x4000000 NL80211_FEATURE_TDLS_CHANNEL_SWITCH = 0x10000000 NL80211_FEATURE_TX_POWER_INSERTION = 0x400000 NL80211_FEATURE_USERSPACE_MPM = 0x10000 NL80211_FEATURE_VIF_TXPOWER = 0x200 NL80211_FEATURE_WFA_TPC_IE_IN_PROBES = 0x100000 NL80211_FILS_DISCOVERY_ATTR_INT_MAX = 0x2 NL80211_FILS_DISCOVERY_ATTR_INT_MIN = 0x1 NL80211_FILS_DISCOVERY_ATTR_MAX = 0x3 NL80211_FILS_DISCOVERY_ATTR_TMPL = 0x3 NL80211_FILS_DISCOVERY_TMPL_MIN_LEN = 0x2a NL80211_FREQUENCY_ATTR_16MHZ = 0x19 NL80211_FREQUENCY_ATTR_1MHZ = 0x15 NL80211_FREQUENCY_ATTR_2MHZ = 0x16 NL80211_FREQUENCY_ATTR_4MHZ = 0x17 NL80211_FREQUENCY_ATTR_8MHZ = 0x18 NL80211_FREQUENCY_ATTR_DFS_CAC_TIME = 0xd NL80211_FREQUENCY_ATTR_DFS_STATE = 0x7 NL80211_FREQUENCY_ATTR_DFS_TIME = 0x8 NL80211_FREQUENCY_ATTR_DISABLED = 0x2 NL80211_FREQUENCY_ATTR_FREQ = 0x1 NL80211_FREQUENCY_ATTR_GO_CONCURRENT = 0xf NL80211_FREQUENCY_ATTR_INDOOR_ONLY = 0xe NL80211_FREQUENCY_ATTR_IR_CONCURRENT = 0xf NL80211_FREQUENCY_ATTR_MAX = 0x20 NL80211_FREQUENCY_ATTR_MAX_TX_POWER = 0x6 NL80211_FREQUENCY_ATTR_NO_10MHZ = 0x11 NL80211_FREQUENCY_ATTR_NO_160MHZ = 0xc NL80211_FREQUENCY_ATTR_NO_20MHZ = 0x10 NL80211_FREQUENCY_ATTR_NO_320MHZ = 0x1a NL80211_FREQUENCY_ATTR_NO_80MHZ = 0xb NL80211_FREQUENCY_ATTR_NO_EHT = 0x1b NL80211_FREQUENCY_ATTR_NO_HE = 0x13 NL80211_FREQUENCY_ATTR_NO_HT40_MINUS = 0x9 NL80211_FREQUENCY_ATTR_NO_HT40_PLUS = 0xa NL80211_FREQUENCY_ATTR_NO_IBSS = 0x3 NL80211_FREQUENCY_ATTR_NO_IR = 0x3 NL80211_FREQUENCY_ATTR_OFFSET = 0x14 NL80211_FREQUENCY_ATTR_PASSIVE_SCAN = 0x3 NL80211_FREQUENCY_ATTR_RADAR = 0x5 NL80211_FREQUENCY_ATTR_WMM = 0x12 NL80211_FTM_RESP_ATTR_CIVICLOC = 0x3 NL80211_FTM_RESP_ATTR_ENABLED = 0x1 NL80211_FTM_RESP_ATTR_LCI = 0x2 NL80211_FTM_RESP_ATTR_MAX = 0x3 NL80211_FTM_STATS_ASAP_NUM = 0x4 NL80211_FTM_STATS_FAILED_NUM = 0x3 NL80211_FTM_STATS_MAX = 0xa NL80211_FTM_STATS_NON_ASAP_NUM = 0x5 NL80211_FTM_STATS_OUT_OF_WINDOW_TRIGGERS_NUM = 0x9 NL80211_FTM_STATS_PAD = 0xa NL80211_FTM_STATS_PARTIAL_NUM = 0x2 NL80211_FTM_STATS_RESCHEDULE_REQUESTS_NUM = 0x8 NL80211_FTM_STATS_SUCCESS_NUM = 0x1 NL80211_FTM_STATS_TOTAL_DURATION_MSEC = 0x6 NL80211_FTM_STATS_UNKNOWN_TRIGGERS_NUM = 0x7 NL80211_GENL_NAME = "nl80211" NL80211_HE_BSS_COLOR_ATTR_COLOR = 0x1 NL80211_HE_BSS_COLOR_ATTR_DISABLED = 0x2 NL80211_HE_BSS_COLOR_ATTR_MAX = 0x3 NL80211_HE_BSS_COLOR_ATTR_PARTIAL = 0x3 NL80211_HE_MAX_CAPABILITY_LEN = 0x36 NL80211_HE_MIN_CAPABILITY_LEN = 0x10 NL80211_HE_NSS_MAX = 0x8 NL80211_HE_OBSS_PD_ATTR_BSS_COLOR_BITMAP = 0x4 NL80211_HE_OBSS_PD_ATTR_MAX = 0x6 NL80211_HE_OBSS_PD_ATTR_MAX_OFFSET = 0x2 NL80211_HE_OBSS_PD_ATTR_MIN_OFFSET = 0x1 NL80211_HE_OBSS_PD_ATTR_NON_SRG_MAX_OFFSET = 0x3 NL80211_HE_OBSS_PD_ATTR_PARTIAL_BSSID_BITMAP = 0x5 NL80211_HE_OBSS_PD_ATTR_SR_CTRL = 0x6 NL80211_HIDDEN_SSID_NOT_IN_USE = 0x0 NL80211_HIDDEN_SSID_ZERO_CONTENTS = 0x2 NL80211_HIDDEN_SSID_ZERO_LEN = 0x1 NL80211_HT_CAPABILITY_LEN = 0x1a NL80211_IFACE_COMB_BI_MIN_GCD = 0x7 NL80211_IFACE_COMB_LIMITS = 0x1 NL80211_IFACE_COMB_MAXNUM = 0x2 NL80211_IFACE_COMB_NUM_CHANNELS = 0x4 NL80211_IFACE_COMB_RADAR_DETECT_REGIONS = 0x6 NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS = 0x5 NL80211_IFACE_COMB_STA_AP_BI_MATCH = 0x3 NL80211_IFACE_COMB_UNSPEC = 0x0 NL80211_IFACE_LIMIT_MAX = 0x1 NL80211_IFACE_LIMIT_TYPES = 0x2 NL80211_IFACE_LIMIT_UNSPEC = 0x0 NL80211_IFTYPE_ADHOC = 0x1 NL80211_IFTYPE_AKM_ATTR_IFTYPES = 0x1 NL80211_IFTYPE_AKM_ATTR_MAX = 0x2 NL80211_IFTYPE_AKM_ATTR_SUITES = 0x2 NL80211_IFTYPE_AP = 0x3 NL80211_IFTYPE_AP_VLAN = 0x4 NL80211_IFTYPE_MAX = 0xc NL80211_IFTYPE_MESH_POINT = 0x7 NL80211_IFTYPE_MONITOR = 0x6 NL80211_IFTYPE_NAN = 0xc NL80211_IFTYPE_OCB = 0xb NL80211_IFTYPE_P2P_CLIENT = 0x8 NL80211_IFTYPE_P2P_DEVICE = 0xa NL80211_IFTYPE_P2P_GO = 0x9 NL80211_IFTYPE_STATION = 0x2 NL80211_IFTYPE_UNSPECIFIED = 0x0 NL80211_IFTYPE_WDS = 0x5 NL80211_KCK_EXT_LEN = 0x18 NL80211_KCK_LEN = 0x10 NL80211_KEK_EXT_LEN = 0x20 NL80211_KEK_LEN = 0x10 NL80211_KEY_CIPHER = 0x3 NL80211_KEY_DATA = 0x1 NL80211_KEY_DEFAULT_BEACON = 0xa NL80211_KEY_DEFAULT = 0x5 NL80211_KEY_DEFAULT_MGMT = 0x6 NL80211_KEY_DEFAULT_TYPE_MULTICAST = 0x2 NL80211_KEY_DEFAULT_TYPES = 0x8 NL80211_KEY_DEFAULT_TYPE_UNICAST = 0x1 NL80211_KEY_IDX = 0x2 NL80211_KEY_MAX = 0xa NL80211_KEY_MODE = 0x9 NL80211_KEY_NO_TX = 0x1 NL80211_KEY_RX_TX = 0x0 NL80211_KEY_SEQ = 0x4 NL80211_KEY_SET_TX = 0x2 NL80211_KEY_TYPE = 0x7 NL80211_KEYTYPE_GROUP = 0x0 NL80211_KEYTYPE_PAIRWISE = 0x1 NL80211_KEYTYPE_PEERKEY = 0x2 NL80211_MAX_NR_AKM_SUITES = 0x2 NL80211_MAX_NR_CIPHER_SUITES = 0x5 NL80211_MAX_SUPP_HT_RATES = 0x4d NL80211_MAX_SUPP_RATES = 0x20 NL80211_MAX_SUPP_REG_RULES = 0x80 NL80211_MBSSID_CONFIG_ATTR_EMA = 0x5 NL80211_MBSSID_CONFIG_ATTR_INDEX = 0x3 NL80211_MBSSID_CONFIG_ATTR_MAX = 0x5 NL80211_MBSSID_CONFIG_ATTR_MAX_EMA_PROFILE_PERIODICITY = 0x2 NL80211_MBSSID_CONFIG_ATTR_MAX_INTERFACES = 0x1 NL80211_MBSSID_CONFIG_ATTR_TX_IFINDEX = 0x4 NL80211_MESHCONF_ATTR_MAX = 0x1f NL80211_MESHCONF_AUTO_OPEN_PLINKS = 0x7 NL80211_MESHCONF_AWAKE_WINDOW = 0x1b NL80211_MESHCONF_CONFIRM_TIMEOUT = 0x2 NL80211_MESHCONF_CONNECTED_TO_AS = 0x1f NL80211_MESHCONF_CONNECTED_TO_GATE = 0x1d NL80211_MESHCONF_ELEMENT_TTL = 0xf NL80211_MESHCONF_FORWARDING = 0x13 NL80211_MESHCONF_GATE_ANNOUNCEMENTS = 0x11 NL80211_MESHCONF_HOLDING_TIMEOUT = 0x3 NL80211_MESHCONF_HT_OPMODE = 0x16 NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT = 0xb NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL = 0x19 NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES = 0x8 NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME = 0xd NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT = 0x17 NL80211_MESHCONF_HWMP_PERR_MIN_INTERVAL = 0x12 NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL = 0xc NL80211_MESHCONF_HWMP_RANN_INTERVAL = 0x10 NL80211_MESHCONF_HWMP_ROOT_INTERVAL = 0x18 NL80211_MESHCONF_HWMP_ROOTMODE = 0xe NL80211_MESHCONF_MAX_PEER_LINKS = 0x4 NL80211_MESHCONF_MAX_RETRIES = 0x5 NL80211_MESHCONF_MIN_DISCOVERY_TIMEOUT = 0xa NL80211_MESHCONF_NOLEARN = 0x1e NL80211_MESHCONF_PATH_REFRESH_TIME = 0x9 NL80211_MESHCONF_PLINK_TIMEOUT = 0x1c NL80211_MESHCONF_POWER_MODE = 0x1a NL80211_MESHCONF_RETRY_TIMEOUT = 0x1 NL80211_MESHCONF_RSSI_THRESHOLD = 0x14 NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR = 0x15 NL80211_MESHCONF_TTL = 0x6 NL80211_MESH_POWER_ACTIVE = 0x1 NL80211_MESH_POWER_DEEP_SLEEP = 0x3 NL80211_MESH_POWER_LIGHT_SLEEP = 0x2 NL80211_MESH_POWER_MAX = 0x3 NL80211_MESH_POWER_UNKNOWN = 0x0 NL80211_MESH_SETUP_ATTR_MAX = 0x8 NL80211_MESH_SETUP_AUTH_PROTOCOL = 0x8 NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC = 0x2 NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL = 0x1 NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC = 0x6 NL80211_MESH_SETUP_IE = 0x3 NL80211_MESH_SETUP_USERSPACE_AMPE = 0x5 NL80211_MESH_SETUP_USERSPACE_AUTH = 0x4 NL80211_MESH_SETUP_USERSPACE_MPM = 0x7 NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE = 0x3 NL80211_MFP_NO = 0x0 NL80211_MFP_OPTIONAL = 0x2 NL80211_MFP_REQUIRED = 0x1 NL80211_MIN_REMAIN_ON_CHANNEL_TIME = 0xa NL80211_MNTR_FLAG_ACTIVE = 0x6 NL80211_MNTR_FLAG_CONTROL = 0x3 NL80211_MNTR_FLAG_COOK_FRAMES = 0x5 NL80211_MNTR_FLAG_FCSFAIL = 0x1 NL80211_MNTR_FLAG_MAX = 0x6 NL80211_MNTR_FLAG_OTHER_BSS = 0x4 NL80211_MNTR_FLAG_PLCPFAIL = 0x2 NL80211_MPATH_FLAG_ACTIVE = 0x1 NL80211_MPATH_FLAG_FIXED = 0x8 NL80211_MPATH_FLAG_RESOLVED = 0x10 NL80211_MPATH_FLAG_RESOLVING = 0x2 NL80211_MPATH_FLAG_SN_VALID = 0x4 NL80211_MPATH_INFO_DISCOVERY_RETRIES = 0x7 NL80211_MPATH_INFO_DISCOVERY_TIMEOUT = 0x6 NL80211_MPATH_INFO_EXPTIME = 0x4 NL80211_MPATH_INFO_FLAGS = 0x5 NL80211_MPATH_INFO_FRAME_QLEN = 0x1 NL80211_MPATH_INFO_HOP_COUNT = 0x8 NL80211_MPATH_INFO_MAX = 0x9 NL80211_MPATH_INFO_METRIC = 0x3 NL80211_MPATH_INFO_PATH_CHANGE = 0x9 NL80211_MPATH_INFO_SN = 0x2 NL80211_MULTICAST_GROUP_CONFIG = "config" NL80211_MULTICAST_GROUP_MLME = "mlme" NL80211_MULTICAST_GROUP_NAN = "nan" NL80211_MULTICAST_GROUP_REG = "regulatory" NL80211_MULTICAST_GROUP_SCAN = "scan" NL80211_MULTICAST_GROUP_TESTMODE = "testmode" NL80211_MULTICAST_GROUP_VENDOR = "vendor" NL80211_NAN_FUNC_ATTR_MAX = 0x10 NL80211_NAN_FUNC_CLOSE_RANGE = 0x9 NL80211_NAN_FUNC_FOLLOW_UP = 0x2 NL80211_NAN_FUNC_FOLLOW_UP_DEST = 0x8 NL80211_NAN_FUNC_FOLLOW_UP_ID = 0x6 NL80211_NAN_FUNC_FOLLOW_UP_REQ_ID = 0x7 NL80211_NAN_FUNC_INSTANCE_ID = 0xf NL80211_NAN_FUNC_MAX_TYPE = 0x2 NL80211_NAN_FUNC_PUBLISH_BCAST = 0x4 NL80211_NAN_FUNC_PUBLISH = 0x0 NL80211_NAN_FUNC_PUBLISH_TYPE = 0x3 NL80211_NAN_FUNC_RX_MATCH_FILTER = 0xd NL80211_NAN_FUNC_SERVICE_ID = 0x2 NL80211_NAN_FUNC_SERVICE_ID_LEN = 0x6 NL80211_NAN_FUNC_SERVICE_INFO = 0xb NL80211_NAN_FUNC_SERVICE_SPEC_INFO_MAX_LEN = 0xff NL80211_NAN_FUNC_SRF = 0xc NL80211_NAN_FUNC_SRF_MAX_LEN = 0xff NL80211_NAN_FUNC_SUBSCRIBE_ACTIVE = 0x5 NL80211_NAN_FUNC_SUBSCRIBE = 0x1 NL80211_NAN_FUNC_TERM_REASON = 0x10 NL80211_NAN_FUNC_TERM_REASON_ERROR = 0x2 NL80211_NAN_FUNC_TERM_REASON_TTL_EXPIRED = 0x1 NL80211_NAN_FUNC_TERM_REASON_USER_REQUEST = 0x0 NL80211_NAN_FUNC_TTL = 0xa NL80211_NAN_FUNC_TX_MATCH_FILTER = 0xe NL80211_NAN_FUNC_TYPE = 0x1 NL80211_NAN_MATCH_ATTR_MAX = 0x2 NL80211_NAN_MATCH_FUNC_LOCAL = 0x1 NL80211_NAN_MATCH_FUNC_PEER = 0x2 NL80211_NAN_SOLICITED_PUBLISH = 0x1 NL80211_NAN_SRF_ATTR_MAX = 0x4 NL80211_NAN_SRF_BF = 0x2 NL80211_NAN_SRF_BF_IDX = 0x3 NL80211_NAN_SRF_INCLUDE = 0x1 NL80211_NAN_SRF_MAC_ADDRS = 0x4 NL80211_NAN_UNSOLICITED_PUBLISH = 0x2 NL80211_NUM_ACS = 0x4 NL80211_P2P_PS_SUPPORTED = 0x1 NL80211_P2P_PS_UNSUPPORTED = 0x0 NL80211_PKTPAT_MASK = 0x1 NL80211_PKTPAT_OFFSET = 0x3 NL80211_PKTPAT_PATTERN = 0x2 NL80211_PLINK_ACTION_BLOCK = 0x2 NL80211_PLINK_ACTION_NO_ACTION = 0x0 NL80211_PLINK_ACTION_OPEN = 0x1 NL80211_PLINK_BLOCKED = 0x6 NL80211_PLINK_CNF_RCVD = 0x3 NL80211_PLINK_ESTAB = 0x4 NL80211_PLINK_HOLDING = 0x5 NL80211_PLINK_LISTEN = 0x0 NL80211_PLINK_OPN_RCVD = 0x2 NL80211_PLINK_OPN_SNT = 0x1 NL80211_PMKSA_CANDIDATE_BSSID = 0x2 NL80211_PMKSA_CANDIDATE_INDEX = 0x1 NL80211_PMKSA_CANDIDATE_PREAUTH = 0x3 NL80211_PMSR_ATTR_MAX = 0x5 NL80211_PMSR_ATTR_MAX_PEERS = 0x1 NL80211_PMSR_ATTR_PEERS = 0x5 NL80211_PMSR_ATTR_RANDOMIZE_MAC_ADDR = 0x3 NL80211_PMSR_ATTR_REPORT_AP_TSF = 0x2 NL80211_PMSR_ATTR_TYPE_CAPA = 0x4 NL80211_PMSR_FTM_CAPA_ATTR_ASAP = 0x1 NL80211_PMSR_FTM_CAPA_ATTR_BANDWIDTHS = 0x6 NL80211_PMSR_FTM_CAPA_ATTR_MAX_BURSTS_EXPONENT = 0x7 NL80211_PMSR_FTM_CAPA_ATTR_MAX = 0xa NL80211_PMSR_FTM_CAPA_ATTR_MAX_FTMS_PER_BURST = 0x8 NL80211_PMSR_FTM_CAPA_ATTR_NON_ASAP = 0x2 NL80211_PMSR_FTM_CAPA_ATTR_NON_TRIGGER_BASED = 0xa NL80211_PMSR_FTM_CAPA_ATTR_PREAMBLES = 0x5 NL80211_PMSR_FTM_CAPA_ATTR_REQ_CIVICLOC = 0x4 NL80211_PMSR_FTM_CAPA_ATTR_REQ_LCI = 0x3 NL80211_PMSR_FTM_CAPA_ATTR_TRIGGER_BASED = 0x9 NL80211_PMSR_FTM_FAILURE_BAD_CHANGED_PARAMS = 0x7 NL80211_PMSR_FTM_FAILURE_INVALID_TIMESTAMP = 0x5 NL80211_PMSR_FTM_FAILURE_NO_RESPONSE = 0x1 NL80211_PMSR_FTM_FAILURE_PEER_BUSY = 0x6 NL80211_PMSR_FTM_FAILURE_PEER_NOT_CAPABLE = 0x4 NL80211_PMSR_FTM_FAILURE_REJECTED = 0x2 NL80211_PMSR_FTM_FAILURE_UNSPECIFIED = 0x0 NL80211_PMSR_FTM_FAILURE_WRONG_CHANNEL = 0x3 NL80211_PMSR_FTM_REQ_ATTR_ASAP = 0x1 NL80211_PMSR_FTM_REQ_ATTR_BSS_COLOR = 0xd NL80211_PMSR_FTM_REQ_ATTR_BURST_DURATION = 0x5 NL80211_PMSR_FTM_REQ_ATTR_BURST_PERIOD = 0x4 NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST = 0x6 NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK = 0xc NL80211_PMSR_FTM_REQ_ATTR_MAX = 0xd NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED = 0xb NL80211_PMSR_FTM_REQ_ATTR_NUM_BURSTS_EXP = 0x3 NL80211_PMSR_FTM_REQ_ATTR_NUM_FTMR_RETRIES = 0x7 NL80211_PMSR_FTM_REQ_ATTR_PREAMBLE = 0x2 NL80211_PMSR_FTM_REQ_ATTR_REQUEST_CIVICLOC = 0x9 NL80211_PMSR_FTM_REQ_ATTR_REQUEST_LCI = 0x8 NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED = 0xa NL80211_PMSR_FTM_RESP_ATTR_BURST_DURATION = 0x7 NL80211_PMSR_FTM_RESP_ATTR_BURST_INDEX = 0x2 NL80211_PMSR_FTM_RESP_ATTR_BUSY_RETRY_TIME = 0x5 NL80211_PMSR_FTM_RESP_ATTR_CIVICLOC = 0x14 NL80211_PMSR_FTM_RESP_ATTR_DIST_AVG = 0x10 NL80211_PMSR_FTM_RESP_ATTR_DIST_SPREAD = 0x12 NL80211_PMSR_FTM_RESP_ATTR_DIST_VARIANCE = 0x11 NL80211_PMSR_FTM_RESP_ATTR_FAIL_REASON = 0x1 NL80211_PMSR_FTM_RESP_ATTR_FTMS_PER_BURST = 0x8 NL80211_PMSR_FTM_RESP_ATTR_LCI = 0x13 NL80211_PMSR_FTM_RESP_ATTR_MAX = 0x15 NL80211_PMSR_FTM_RESP_ATTR_NUM_BURSTS_EXP = 0x6 NL80211_PMSR_FTM_RESP_ATTR_NUM_FTMR_ATTEMPTS = 0x3 NL80211_PMSR_FTM_RESP_ATTR_NUM_FTMR_SUCCESSES = 0x4 NL80211_PMSR_FTM_RESP_ATTR_PAD = 0x15 NL80211_PMSR_FTM_RESP_ATTR_RSSI_AVG = 0x9 NL80211_PMSR_FTM_RESP_ATTR_RSSI_SPREAD = 0xa NL80211_PMSR_FTM_RESP_ATTR_RTT_AVG = 0xd NL80211_PMSR_FTM_RESP_ATTR_RTT_SPREAD = 0xf NL80211_PMSR_FTM_RESP_ATTR_RTT_VARIANCE = 0xe NL80211_PMSR_FTM_RESP_ATTR_RX_RATE = 0xc NL80211_PMSR_FTM_RESP_ATTR_TX_RATE = 0xb NL80211_PMSR_PEER_ATTR_ADDR = 0x1 NL80211_PMSR_PEER_ATTR_CHAN = 0x2 NL80211_PMSR_PEER_ATTR_MAX = 0x4 NL80211_PMSR_PEER_ATTR_REQ = 0x3 NL80211_PMSR_PEER_ATTR_RESP = 0x4 NL80211_PMSR_REQ_ATTR_DATA = 0x1 NL80211_PMSR_REQ_ATTR_GET_AP_TSF = 0x2 NL80211_PMSR_REQ_ATTR_MAX = 0x2 NL80211_PMSR_RESP_ATTR_AP_TSF = 0x4 NL80211_PMSR_RESP_ATTR_DATA = 0x1 NL80211_PMSR_RESP_ATTR_FINAL = 0x5 NL80211_PMSR_RESP_ATTR_HOST_TIME = 0x3 NL80211_PMSR_RESP_ATTR_MAX = 0x6 NL80211_PMSR_RESP_ATTR_PAD = 0x6 NL80211_PMSR_RESP_ATTR_STATUS = 0x2 NL80211_PMSR_STATUS_FAILURE = 0x3 NL80211_PMSR_STATUS_REFUSED = 0x1 NL80211_PMSR_STATUS_SUCCESS = 0x0 NL80211_PMSR_STATUS_TIMEOUT = 0x2 NL80211_PMSR_TYPE_FTM = 0x1 NL80211_PMSR_TYPE_INVALID = 0x0 NL80211_PMSR_TYPE_MAX = 0x1 NL80211_PREAMBLE_DMG = 0x3 NL80211_PREAMBLE_HE = 0x4 NL80211_PREAMBLE_HT = 0x1 NL80211_PREAMBLE_LEGACY = 0x0 NL80211_PREAMBLE_VHT = 0x2 NL80211_PROBE_RESP_OFFLOAD_SUPPORT_80211U = 0x8 NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P = 0x4 NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2 = 0x2 NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS = 0x1 NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP = 0x1 NL80211_PS_DISABLED = 0x0 NL80211_PS_ENABLED = 0x1 NL80211_RADAR_CAC_ABORTED = 0x2 NL80211_RADAR_CAC_FINISHED = 0x1 NL80211_RADAR_CAC_STARTED = 0x5 NL80211_RADAR_DETECTED = 0x0 NL80211_RADAR_NOP_FINISHED = 0x3 NL80211_RADAR_PRE_CAC_EXPIRED = 0x4 NL80211_RATE_INFO_10_MHZ_WIDTH = 0xb NL80211_RATE_INFO_160_MHZ_WIDTH = 0xa NL80211_RATE_INFO_320_MHZ_WIDTH = 0x12 NL80211_RATE_INFO_40_MHZ_WIDTH = 0x3 NL80211_RATE_INFO_5_MHZ_WIDTH = 0xc NL80211_RATE_INFO_80_MHZ_WIDTH = 0x8 NL80211_RATE_INFO_80P80_MHZ_WIDTH = 0x9 NL80211_RATE_INFO_BITRATE32 = 0x5 NL80211_RATE_INFO_BITRATE = 0x1 NL80211_RATE_INFO_EHT_GI_0_8 = 0x0 NL80211_RATE_INFO_EHT_GI_1_6 = 0x1 NL80211_RATE_INFO_EHT_GI_3_2 = 0x2 NL80211_RATE_INFO_EHT_GI = 0x15 NL80211_RATE_INFO_EHT_MCS = 0x13 NL80211_RATE_INFO_EHT_NSS = 0x14 NL80211_RATE_INFO_EHT_RU_ALLOC_106 = 0x3 NL80211_RATE_INFO_EHT_RU_ALLOC_106P26 = 0x4 NL80211_RATE_INFO_EHT_RU_ALLOC_242 = 0x5 NL80211_RATE_INFO_EHT_RU_ALLOC_26 = 0x0 NL80211_RATE_INFO_EHT_RU_ALLOC_2x996 = 0xb NL80211_RATE_INFO_EHT_RU_ALLOC_2x996P484 = 0xc NL80211_RATE_INFO_EHT_RU_ALLOC_3x996 = 0xd NL80211_RATE_INFO_EHT_RU_ALLOC_3x996P484 = 0xe NL80211_RATE_INFO_EHT_RU_ALLOC_484 = 0x6 NL80211_RATE_INFO_EHT_RU_ALLOC_484P242 = 0x7 NL80211_RATE_INFO_EHT_RU_ALLOC_4x996 = 0xf NL80211_RATE_INFO_EHT_RU_ALLOC_52 = 0x1 NL80211_RATE_INFO_EHT_RU_ALLOC_52P26 = 0x2 NL80211_RATE_INFO_EHT_RU_ALLOC_996 = 0x8 NL80211_RATE_INFO_EHT_RU_ALLOC_996P484 = 0x9 NL80211_RATE_INFO_EHT_RU_ALLOC_996P484P242 = 0xa NL80211_RATE_INFO_EHT_RU_ALLOC = 0x16 NL80211_RATE_INFO_HE_1XLTF = 0x0 NL80211_RATE_INFO_HE_2XLTF = 0x1 NL80211_RATE_INFO_HE_4XLTF = 0x2 NL80211_RATE_INFO_HE_DCM = 0x10 NL80211_RATE_INFO_HE_GI_0_8 = 0x0 NL80211_RATE_INFO_HE_GI_1_6 = 0x1 NL80211_RATE_INFO_HE_GI_3_2 = 0x2 NL80211_RATE_INFO_HE_GI = 0xf NL80211_RATE_INFO_HE_MCS = 0xd NL80211_RATE_INFO_HE_NSS = 0xe NL80211_RATE_INFO_HE_RU_ALLOC_106 = 0x2 NL80211_RATE_INFO_HE_RU_ALLOC_242 = 0x3 NL80211_RATE_INFO_HE_RU_ALLOC_26 = 0x0 NL80211_RATE_INFO_HE_RU_ALLOC_2x996 = 0x6 NL80211_RATE_INFO_HE_RU_ALLOC_484 = 0x4 NL80211_RATE_INFO_HE_RU_ALLOC_52 = 0x1 NL80211_RATE_INFO_HE_RU_ALLOC_996 = 0x5 NL80211_RATE_INFO_HE_RU_ALLOC = 0x11 NL80211_RATE_INFO_MAX = 0x1d NL80211_RATE_INFO_MCS = 0x2 NL80211_RATE_INFO_SHORT_GI = 0x4 NL80211_RATE_INFO_VHT_MCS = 0x6 NL80211_RATE_INFO_VHT_NSS = 0x7 NL80211_REGDOM_SET_BY_CORE = 0x0 NL80211_REGDOM_SET_BY_COUNTRY_IE = 0x3 NL80211_REGDOM_SET_BY_DRIVER = 0x2 NL80211_REGDOM_SET_BY_USER = 0x1 NL80211_REGDOM_TYPE_COUNTRY = 0x0 NL80211_REGDOM_TYPE_CUSTOM_WORLD = 0x2 NL80211_REGDOM_TYPE_INTERSECTION = 0x3 NL80211_REGDOM_TYPE_WORLD = 0x1 NL80211_REG_RULE_ATTR_MAX = 0x8 NL80211_REKEY_DATA_AKM = 0x4 NL80211_REKEY_DATA_KCK = 0x2 NL80211_REKEY_DATA_KEK = 0x1 NL80211_REKEY_DATA_REPLAY_CTR = 0x3 NL80211_REPLAY_CTR_LEN = 0x8 NL80211_RRF_AUTO_BW = 0x800 NL80211_RRF_DFS = 0x10 NL80211_RRF_GO_CONCURRENT = 0x1000 NL80211_RRF_IR_CONCURRENT = 0x1000 NL80211_RRF_NO_160MHZ = 0x10000 NL80211_RRF_NO_320MHZ = 0x40000 NL80211_RRF_NO_80MHZ = 0x8000 NL80211_RRF_NO_CCK = 0x2 NL80211_RRF_NO_HE = 0x20000 NL80211_RRF_NO_HT40 = 0x6000 NL80211_RRF_NO_HT40MINUS = 0x2000 NL80211_RRF_NO_HT40PLUS = 0x4000 NL80211_RRF_NO_IBSS = 0x80 NL80211_RRF_NO_INDOOR = 0x4 NL80211_RRF_NO_IR_ALL = 0x180 NL80211_RRF_NO_IR = 0x80 NL80211_RRF_NO_OFDM = 0x1 NL80211_RRF_NO_OUTDOOR = 0x8 NL80211_RRF_PASSIVE_SCAN = 0x80 NL80211_RRF_PTMP_ONLY = 0x40 NL80211_RRF_PTP_ONLY = 0x20 NL80211_RXMGMT_FLAG_ANSWERED = 0x1 NL80211_RXMGMT_FLAG_EXTERNAL_AUTH = 0x2 NL80211_SAE_PWE_BOTH = 0x3 NL80211_SAE_PWE_HASH_TO_ELEMENT = 0x2 NL80211_SAE_PWE_HUNT_AND_PECK = 0x1 NL80211_SAE_PWE_UNSPECIFIED = 0x0 NL80211_SAR_ATTR_MAX = 0x2 NL80211_SAR_ATTR_SPECS = 0x2 NL80211_SAR_ATTR_SPECS_END_FREQ = 0x4 NL80211_SAR_ATTR_SPECS_MAX = 0x4 NL80211_SAR_ATTR_SPECS_POWER = 0x1 NL80211_SAR_ATTR_SPECS_RANGE_INDEX = 0x2 NL80211_SAR_ATTR_SPECS_START_FREQ = 0x3 NL80211_SAR_ATTR_TYPE = 0x1 NL80211_SAR_TYPE_POWER = 0x0 NL80211_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP = 0x20 NL80211_SCAN_FLAG_AP = 0x4 NL80211_SCAN_FLAG_COLOCATED_6GHZ = 0x4000 NL80211_SCAN_FLAG_FILS_MAX_CHANNEL_TIME = 0x10 NL80211_SCAN_FLAG_FLUSH = 0x2 NL80211_SCAN_FLAG_FREQ_KHZ = 0x2000 NL80211_SCAN_FLAG_HIGH_ACCURACY = 0x400 NL80211_SCAN_FLAG_LOW_POWER = 0x200 NL80211_SCAN_FLAG_LOW_PRIORITY = 0x1 NL80211_SCAN_FLAG_LOW_SPAN = 0x100 NL80211_SCAN_FLAG_MIN_PREQ_CONTENT = 0x1000 NL80211_SCAN_FLAG_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION = 0x80 NL80211_SCAN_FLAG_OCE_PROBE_REQ_HIGH_TX_RATE = 0x40 NL80211_SCAN_FLAG_RANDOM_ADDR = 0x8 NL80211_SCAN_FLAG_RANDOM_SN = 0x800 NL80211_SCAN_RSSI_THOLD_OFF = -0x12c NL80211_SCHED_SCAN_MATCH_ATTR_BSSID = 0x5 NL80211_SCHED_SCAN_MATCH_ATTR_MAX = 0x6 NL80211_SCHED_SCAN_MATCH_ATTR_RELATIVE_RSSI = 0x3 NL80211_SCHED_SCAN_MATCH_ATTR_RSSI_ADJUST = 0x4 NL80211_SCHED_SCAN_MATCH_ATTR_RSSI = 0x2 NL80211_SCHED_SCAN_MATCH_ATTR_SSID = 0x1 NL80211_SCHED_SCAN_MATCH_PER_BAND_RSSI = 0x6 NL80211_SCHED_SCAN_PLAN_INTERVAL = 0x1 NL80211_SCHED_SCAN_PLAN_ITERATIONS = 0x2 NL80211_SCHED_SCAN_PLAN_MAX = 0x2 NL80211_SMPS_DYNAMIC = 0x2 NL80211_SMPS_MAX = 0x2 NL80211_SMPS_OFF = 0x0 NL80211_SMPS_STATIC = 0x1 NL80211_STA_BSS_PARAM_BEACON_INTERVAL = 0x5 NL80211_STA_BSS_PARAM_CTS_PROT = 0x1 NL80211_STA_BSS_PARAM_DTIM_PERIOD = 0x4 NL80211_STA_BSS_PARAM_MAX = 0x5 NL80211_STA_BSS_PARAM_SHORT_PREAMBLE = 0x2 NL80211_STA_BSS_PARAM_SHORT_SLOT_TIME = 0x3 NL80211_STA_FLAG_ASSOCIATED = 0x7 NL80211_STA_FLAG_AUTHENTICATED = 0x5 NL80211_STA_FLAG_AUTHORIZED = 0x1 NL80211_STA_FLAG_MAX = 0x8 NL80211_STA_FLAG_MAX_OLD_API = 0x6 NL80211_STA_FLAG_MFP = 0x4 NL80211_STA_FLAG_SHORT_PREAMBLE = 0x2 NL80211_STA_FLAG_TDLS_PEER = 0x6 NL80211_STA_FLAG_WME = 0x3 NL80211_STA_INFO_ACK_SIGNAL_AVG = 0x23 NL80211_STA_INFO_ACK_SIGNAL = 0x22 NL80211_STA_INFO_AIRTIME_LINK_METRIC = 0x29 NL80211_STA_INFO_AIRTIME_WEIGHT = 0x28 NL80211_STA_INFO_ASSOC_AT_BOOTTIME = 0x2a NL80211_STA_INFO_BEACON_LOSS = 0x12 NL80211_STA_INFO_BEACON_RX = 0x1d NL80211_STA_INFO_BEACON_SIGNAL_AVG = 0x1e NL80211_STA_INFO_BSS_PARAM = 0xf NL80211_STA_INFO_CHAIN_SIGNAL_AVG = 0x1a NL80211_STA_INFO_CHAIN_SIGNAL = 0x19 NL80211_STA_INFO_CONNECTED_TIME = 0x10 NL80211_STA_INFO_CONNECTED_TO_AS = 0x2b NL80211_STA_INFO_CONNECTED_TO_GATE = 0x26 NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG = 0x23 NL80211_STA_INFO_EXPECTED_THROUGHPUT = 0x1b NL80211_STA_INFO_FCS_ERROR_COUNT = 0x25 NL80211_STA_INFO_INACTIVE_TIME = 0x1 NL80211_STA_INFO_LLID = 0x4 NL80211_STA_INFO_LOCAL_PM = 0x14 NL80211_STA_INFO_MAX = 0x2b NL80211_STA_INFO_NONPEER_PM = 0x16 NL80211_STA_INFO_PAD = 0x21 NL80211_STA_INFO_PEER_PM = 0x15 NL80211_STA_INFO_PLID = 0x5 NL80211_STA_INFO_PLINK_STATE = 0x6 NL80211_STA_INFO_RX_BITRATE = 0xe NL80211_STA_INFO_RX_BYTES64 = 0x17 NL80211_STA_INFO_RX_BYTES = 0x2 NL80211_STA_INFO_RX_DROP_MISC = 0x1c NL80211_STA_INFO_RX_DURATION = 0x20 NL80211_STA_INFO_RX_MPDUS = 0x24 NL80211_STA_INFO_RX_PACKETS = 0x9 NL80211_STA_INFO_SIGNAL_AVG = 0xd NL80211_STA_INFO_SIGNAL = 0x7 NL80211_STA_INFO_STA_FLAGS = 0x11 NL80211_STA_INFO_TID_STATS = 0x1f NL80211_STA_INFO_T_OFFSET = 0x13 NL80211_STA_INFO_TX_BITRATE = 0x8 NL80211_STA_INFO_TX_BYTES64 = 0x18 NL80211_STA_INFO_TX_BYTES = 0x3 NL80211_STA_INFO_TX_DURATION = 0x27 NL80211_STA_INFO_TX_FAILED = 0xc NL80211_STA_INFO_TX_PACKETS = 0xa NL80211_STA_INFO_TX_RETRIES = 0xb NL80211_STA_WME_MAX = 0x2 NL80211_STA_WME_MAX_SP = 0x2 NL80211_STA_WME_UAPSD_QUEUES = 0x1 NL80211_SURVEY_INFO_CHANNEL_TIME_BUSY = 0x5 NL80211_SURVEY_INFO_CHANNEL_TIME = 0x4 NL80211_SURVEY_INFO_CHANNEL_TIME_EXT_BUSY = 0x6 NL80211_SURVEY_INFO_CHANNEL_TIME_RX = 0x7 NL80211_SURVEY_INFO_CHANNEL_TIME_TX = 0x8 NL80211_SURVEY_INFO_FREQUENCY = 0x1 NL80211_SURVEY_INFO_FREQUENCY_OFFSET = 0xc NL80211_SURVEY_INFO_IN_USE = 0x3 NL80211_SURVEY_INFO_MAX = 0xc NL80211_SURVEY_INFO_NOISE = 0x2 NL80211_SURVEY_INFO_PAD = 0xa NL80211_SURVEY_INFO_TIME_BSS_RX = 0xb NL80211_SURVEY_INFO_TIME_BUSY = 0x5 NL80211_SURVEY_INFO_TIME = 0x4 NL80211_SURVEY_INFO_TIME_EXT_BUSY = 0x6 NL80211_SURVEY_INFO_TIME_RX = 0x7 NL80211_SURVEY_INFO_TIME_SCAN = 0x9 NL80211_SURVEY_INFO_TIME_TX = 0x8 NL80211_TDLS_DISABLE_LINK = 0x4 NL80211_TDLS_DISCOVERY_REQ = 0x0 NL80211_TDLS_ENABLE_LINK = 0x3 NL80211_TDLS_PEER_HE = 0x8 NL80211_TDLS_PEER_HT = 0x1 NL80211_TDLS_PEER_VHT = 0x2 NL80211_TDLS_PEER_WMM = 0x4 NL80211_TDLS_SETUP = 0x1 NL80211_TDLS_TEARDOWN = 0x2 NL80211_TID_CONFIG_ATTR_AMPDU_CTRL = 0x9 NL80211_TID_CONFIG_ATTR_AMSDU_CTRL = 0xb NL80211_TID_CONFIG_ATTR_MAX = 0xd NL80211_TID_CONFIG_ATTR_NOACK = 0x6 NL80211_TID_CONFIG_ATTR_OVERRIDE = 0x4 NL80211_TID_CONFIG_ATTR_PAD = 0x1 NL80211_TID_CONFIG_ATTR_PEER_SUPP = 0x3 NL80211_TID_CONFIG_ATTR_RETRY_LONG = 0x8 NL80211_TID_CONFIG_ATTR_RETRY_SHORT = 0x7 NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL = 0xa NL80211_TID_CONFIG_ATTR_TIDS = 0x5 NL80211_TID_CONFIG_ATTR_TX_RATE = 0xd NL80211_TID_CONFIG_ATTR_TX_RATE_TYPE = 0xc NL80211_TID_CONFIG_ATTR_VIF_SUPP = 0x2 NL80211_TID_CONFIG_DISABLE = 0x1 NL80211_TID_CONFIG_ENABLE = 0x0 NL80211_TID_STATS_MAX = 0x6 NL80211_TID_STATS_PAD = 0x5 NL80211_TID_STATS_RX_MSDU = 0x1 NL80211_TID_STATS_TX_MSDU = 0x2 NL80211_TID_STATS_TX_MSDU_FAILED = 0x4 NL80211_TID_STATS_TX_MSDU_RETRIES = 0x3 NL80211_TID_STATS_TXQ_STATS = 0x6 NL80211_TIMEOUT_ASSOC = 0x3 NL80211_TIMEOUT_AUTH = 0x2 NL80211_TIMEOUT_SCAN = 0x1 NL80211_TIMEOUT_UNSPECIFIED = 0x0 NL80211_TKIP_DATA_OFFSET_ENCR_KEY = 0x0 NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY = 0x18 NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY = 0x10 NL80211_TX_POWER_AUTOMATIC = 0x0 NL80211_TX_POWER_FIXED = 0x2 NL80211_TX_POWER_LIMITED = 0x1 NL80211_TXQ_ATTR_AC = 0x1 NL80211_TXQ_ATTR_AIFS = 0x5 NL80211_TXQ_ATTR_CWMAX = 0x4 NL80211_TXQ_ATTR_CWMIN = 0x3 NL80211_TXQ_ATTR_MAX = 0x5 NL80211_TXQ_ATTR_QUEUE = 0x1 NL80211_TXQ_ATTR_TXOP = 0x2 NL80211_TXQ_Q_BE = 0x2 NL80211_TXQ_Q_BK = 0x3 NL80211_TXQ_Q_VI = 0x1 NL80211_TXQ_Q_VO = 0x0 NL80211_TXQ_STATS_BACKLOG_BYTES = 0x1 NL80211_TXQ_STATS_BACKLOG_PACKETS = 0x2 NL80211_TXQ_STATS_COLLISIONS = 0x8 NL80211_TXQ_STATS_DROPS = 0x4 NL80211_TXQ_STATS_ECN_MARKS = 0x5 NL80211_TXQ_STATS_FLOWS = 0x3 NL80211_TXQ_STATS_MAX = 0xb NL80211_TXQ_STATS_MAX_FLOWS = 0xb NL80211_TXQ_STATS_OVERLIMIT = 0x6 NL80211_TXQ_STATS_OVERMEMORY = 0x7 NL80211_TXQ_STATS_TX_BYTES = 0x9 NL80211_TXQ_STATS_TX_PACKETS = 0xa NL80211_TX_RATE_AUTOMATIC = 0x0 NL80211_TXRATE_DEFAULT_GI = 0x0 NL80211_TX_RATE_FIXED = 0x2 NL80211_TXRATE_FORCE_LGI = 0x2 NL80211_TXRATE_FORCE_SGI = 0x1 NL80211_TXRATE_GI = 0x4 NL80211_TXRATE_HE = 0x5 NL80211_TXRATE_HE_GI = 0x6 NL80211_TXRATE_HE_LTF = 0x7 NL80211_TXRATE_HT = 0x2 NL80211_TXRATE_LEGACY = 0x1 NL80211_TX_RATE_LIMITED = 0x1 NL80211_TXRATE_MAX = 0x7 NL80211_TXRATE_MCS = 0x2 NL80211_TXRATE_VHT = 0x3 NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT = 0x1 NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_MAX = 0x2 NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL = 0x2 NL80211_USER_REG_HINT_CELL_BASE = 0x1 NL80211_USER_REG_HINT_INDOOR = 0x2 NL80211_USER_REG_HINT_USER = 0x0 NL80211_VENDOR_ID_IS_LINUX = 0x80000000 NL80211_VHT_CAPABILITY_LEN = 0xc NL80211_VHT_NSS_MAX = 0x8 NL80211_WIPHY_NAME_MAXLEN = 0x40 NL80211_WMMR_AIFSN = 0x3 NL80211_WMMR_CW_MAX = 0x2 NL80211_WMMR_CW_MIN = 0x1 NL80211_WMMR_MAX = 0x4 NL80211_WMMR_TXOP = 0x4 NL80211_WOWLAN_PKTPAT_MASK = 0x1 NL80211_WOWLAN_PKTPAT_OFFSET = 0x3 NL80211_WOWLAN_PKTPAT_PATTERN = 0x2 NL80211_WOWLAN_TCP_DATA_INTERVAL = 0x9 NL80211_WOWLAN_TCP_DATA_PAYLOAD = 0x6 NL80211_WOWLAN_TCP_DATA_PAYLOAD_SEQ = 0x7 NL80211_WOWLAN_TCP_DATA_PAYLOAD_TOKEN = 0x8 NL80211_WOWLAN_TCP_DST_IPV4 = 0x2 NL80211_WOWLAN_TCP_DST_MAC = 0x3 NL80211_WOWLAN_TCP_DST_PORT = 0x5 NL80211_WOWLAN_TCP_SRC_IPV4 = 0x1 NL80211_WOWLAN_TCP_SRC_PORT = 0x4 NL80211_WOWLAN_TCP_WAKE_MASK = 0xb NL80211_WOWLAN_TCP_WAKE_PAYLOAD = 0xa NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE = 0x8 NL80211_WOWLAN_TRIG_ANY = 0x1 NL80211_WOWLAN_TRIG_DISCONNECT = 0x2 NL80211_WOWLAN_TRIG_EAP_IDENT_REQUEST = 0x7 NL80211_WOWLAN_TRIG_GTK_REKEY_FAILURE = 0x6 NL80211_WOWLAN_TRIG_GTK_REKEY_SUPPORTED = 0x5 NL80211_WOWLAN_TRIG_MAGIC_PKT = 0x3 NL80211_WOWLAN_TRIG_NET_DETECT = 0x12 NL80211_WOWLAN_TRIG_NET_DETECT_RESULTS = 0x13 NL80211_WOWLAN_TRIG_PKT_PATTERN = 0x4 NL80211_WOWLAN_TRIG_RFKILL_RELEASE = 0x9 NL80211_WOWLAN_TRIG_TCP_CONNECTION = 0xe NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211 = 0xa NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN = 0xb NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023 = 0xc NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023_LEN = 0xd NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST = 0x10 NL80211_WOWLAN_TRIG_WAKEUP_TCP_MATCH = 0xf NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS = 0x11 NL80211_WPA_VERSION_1 = 0x1 NL80211_WPA_VERSION_2 = 0x2 NL80211_WPA_VERSION_3 = 0x4 ) const ( FRA_UNSPEC = 0x0 FRA_DST = 0x1 FRA_SRC = 0x2 FRA_IIFNAME = 0x3 FRA_GOTO = 0x4 FRA_UNUSED2 = 0x5 FRA_PRIORITY = 0x6 FRA_UNUSED3 = 0x7 FRA_UNUSED4 = 0x8 FRA_UNUSED5 = 0x9 FRA_FWMARK = 0xa FRA_FLOW = 0xb FRA_TUN_ID = 0xc FRA_SUPPRESS_IFGROUP = 0xd FRA_SUPPRESS_PREFIXLEN = 0xe FRA_TABLE = 0xf FRA_FWMASK = 0x10 FRA_OIFNAME = 0x11 FRA_PAD = 0x12 FRA_L3MDEV = 0x13 FRA_UID_RANGE = 0x14 FRA_PROTOCOL = 0x15 FRA_IP_PROTO = 0x16 FRA_SPORT_RANGE = 0x17 FRA_DPORT_RANGE = 0x18 FR_ACT_UNSPEC = 0x0 FR_ACT_TO_TBL = 0x1 FR_ACT_GOTO = 0x2 FR_ACT_NOP = 0x3 FR_ACT_RES3 = 0x4 FR_ACT_RES4 = 0x5 FR_ACT_BLACKHOLE = 0x6 FR_ACT_UNREACHABLE = 0x7 FR_ACT_PROHIBIT = 0x8 ) const ( AUDIT_NLGRP_NONE = 0x0 AUDIT_NLGRP_READLOG = 0x1 ) const ( TUN_F_CSUM = 0x1 TUN_F_TSO4 = 0x2 TUN_F_TSO6 = 0x4 TUN_F_TSO_ECN = 0x8 TUN_F_UFO = 0x10 TUN_F_USO4 = 0x20 TUN_F_USO6 = 0x40 ) const ( VIRTIO_NET_HDR_F_NEEDS_CSUM = 0x1 VIRTIO_NET_HDR_F_DATA_VALID = 0x2 VIRTIO_NET_HDR_F_RSC_INFO = 0x4 ) const ( VIRTIO_NET_HDR_GSO_NONE = 0x0 VIRTIO_NET_HDR_GSO_TCPV4 = 0x1 VIRTIO_NET_HDR_GSO_UDP = 0x3 VIRTIO_NET_HDR_GSO_TCPV6 = 0x4 VIRTIO_NET_HDR_GSO_UDP_L4 = 0x5 VIRTIO_NET_HDR_GSO_ECN = 0x80 ) type SchedAttr struct { Size uint32 Policy uint32 Flags uint64 Nice int32 Priority uint32 Runtime uint64 Deadline uint64 Period uint64 Util_min uint32 Util_max uint32 } const SizeofSchedAttr = 0x38 type Cachestat_t struct { Cache uint64 Dirty uint64 Writeback uint64 Evicted uint64 Recently_evicted uint64 } type CachestatRange struct { Off uint64 Len uint64 } const ( SK_MEMINFO_RMEM_ALLOC = 0x0 SK_MEMINFO_RCVBUF = 0x1 SK_MEMINFO_WMEM_ALLOC = 0x2 SK_MEMINFO_SNDBUF = 0x3 SK_MEMINFO_FWD_ALLOC = 0x4 SK_MEMINFO_WMEM_QUEUED = 0x5 SK_MEMINFO_OPTMEM = 0x6 SK_MEMINFO_BACKLOG = 0x7 SK_MEMINFO_DROPS = 0x8 SK_MEMINFO_VARS = 0x9 SKNLGRP_NONE = 0x0 SKNLGRP_INET_TCP_DESTROY = 0x1 SKNLGRP_INET_UDP_DESTROY = 0x2 SKNLGRP_INET6_TCP_DESTROY = 0x3 SKNLGRP_INET6_UDP_DESTROY = 0x4 SK_DIAG_BPF_STORAGE_REQ_NONE = 0x0 SK_DIAG_BPF_STORAGE_REQ_MAP_FD = 0x1 SK_DIAG_BPF_STORAGE_REP_NONE = 0x0 SK_DIAG_BPF_STORAGE = 0x1 SK_DIAG_BPF_STORAGE_NONE = 0x0 SK_DIAG_BPF_STORAGE_PAD = 0x1 SK_DIAG_BPF_STORAGE_MAP_ID = 0x2 SK_DIAG_BPF_STORAGE_MAP_VALUE = 0x3 ) type SockDiagReq struct { Family uint8 Protocol uint8 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_linux_386.go ================================================ // cgo -godefs -objdir=/tmp/386/cgo -- -Wall -Werror -static -I/tmp/386/include -m32 linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build 386 && linux package unix const ( SizeofPtr = 0x4 SizeofLong = 0x4 ) type ( _C_long int32 ) 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 _ [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 Stat_t struct { Dev uint64 _ uint16 _ uint32 Mode uint32 Nlink uint32 Uid uint32 Gid uint32 Rdev uint64 _ uint16 Size int64 Blksize int32 Blocks int64 Atim Timespec Mtim Timespec Ctim Timespec Ino uint64 } type Dirent struct { Ino uint64 Off int64 Reclen uint16 Type uint8 Name [256]int8 _ [1]byte } type Flock_t struct { Type int16 Whence int16 Start int64 Len int64 Pid int32 } type DmNameList struct { Dev uint64 Next uint32 } const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 ) type RawSockaddrNFCLLCP struct { Sa_family uint16 Dev_idx uint32 Target_idx uint32 Nfc_protocol uint32 Dsap uint8 Ssap uint8 Service_name [63]uint8 Service_name_len uint32 } type RawSockaddr struct { Family uint16 Data [14]int8 } type RawSockaddrAny struct { Addr RawSockaddr Pad [96]int8 } type Iovec struct { Base *byte Len 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 ifreq struct { Ifrn [16]byte Ifru [16]byte } const ( SizeofSockaddrNFCLLCP = 0x58 SizeofIovec = 0x8 SizeofMsghdr = 0x1c SizeofCmsghdr = 0xc ) const ( SizeofSockFprog = 0x8 ) 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 _ [8]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 ( OPEN_TREE_CLOEXEC = 0x80000 ) const ( POLLRDHUP = 0x2000 ) type Sigset_t struct { Val [32]uint32 } const _C__NSIG = 0x41 const ( SIG_BLOCK = 0x0 SIG_UNBLOCK = 0x1 SIG_SETMASK = 0x2 ) type Siginfo struct { Signo int32 Errno int32 Code int32 _ [116]byte } type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Line uint8 Cc [19]uint8 Ispeed uint32 Ospeed uint32 } type Taskstats struct { Version uint16 Ac_exitcode uint32 Ac_flag uint8 Ac_nice uint8 _ [4]byte Cpu_count uint64 Cpu_delay_total uint64 Blkio_count uint64 Blkio_delay_total uint64 Swapin_count uint64 Swapin_delay_total uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]int8 Ac_sched uint8 Ac_pad [3]uint8 _ [4]byte Ac_uid uint32 Ac_gid uint32 Ac_pid uint32 Ac_ppid uint32 Ac_btime uint32 _ [4]byte Ac_etime uint64 Ac_utime uint64 Ac_stime uint64 Ac_minflt uint64 Ac_majflt uint64 Coremem uint64 Virtmem uint64 Hiwater_rss uint64 Hiwater_vm uint64 Read_char uint64 Write_char uint64 Read_syscalls uint64 Write_syscalls uint64 Read_bytes uint64 Write_bytes uint64 Cancelled_write_bytes uint64 Nvcsw uint64 Nivcsw uint64 Ac_utimescaled uint64 Ac_stimescaled uint64 Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 Ac_tgid uint32 _ [4]byte Ac_tgetime uint64 Ac_exe_dev uint64 Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 Irq_count uint64 Irq_delay_total uint64 } type cpuMask uint32 const ( _NCPUBITS = 0x20 ) const ( CBitFieldMaskBit0 = 0x1 CBitFieldMaskBit1 = 0x2 CBitFieldMaskBit2 = 0x4 CBitFieldMaskBit3 = 0x8 CBitFieldMaskBit4 = 0x10 CBitFieldMaskBit5 = 0x20 CBitFieldMaskBit6 = 0x40 CBitFieldMaskBit7 = 0x80 CBitFieldMaskBit8 = 0x100 CBitFieldMaskBit9 = 0x200 CBitFieldMaskBit10 = 0x400 CBitFieldMaskBit11 = 0x800 CBitFieldMaskBit12 = 0x1000 CBitFieldMaskBit13 = 0x2000 CBitFieldMaskBit14 = 0x4000 CBitFieldMaskBit15 = 0x8000 CBitFieldMaskBit16 = 0x10000 CBitFieldMaskBit17 = 0x20000 CBitFieldMaskBit18 = 0x40000 CBitFieldMaskBit19 = 0x80000 CBitFieldMaskBit20 = 0x100000 CBitFieldMaskBit21 = 0x200000 CBitFieldMaskBit22 = 0x400000 CBitFieldMaskBit23 = 0x800000 CBitFieldMaskBit24 = 0x1000000 CBitFieldMaskBit25 = 0x2000000 CBitFieldMaskBit26 = 0x4000000 CBitFieldMaskBit27 = 0x8000000 CBitFieldMaskBit28 = 0x10000000 CBitFieldMaskBit29 = 0x20000000 CBitFieldMaskBit30 = 0x40000000 CBitFieldMaskBit31 = 0x80000000 CBitFieldMaskBit32 = 0x100000000 CBitFieldMaskBit33 = 0x200000000 CBitFieldMaskBit34 = 0x400000000 CBitFieldMaskBit35 = 0x800000000 CBitFieldMaskBit36 = 0x1000000000 CBitFieldMaskBit37 = 0x2000000000 CBitFieldMaskBit38 = 0x4000000000 CBitFieldMaskBit39 = 0x8000000000 CBitFieldMaskBit40 = 0x10000000000 CBitFieldMaskBit41 = 0x20000000000 CBitFieldMaskBit42 = 0x40000000000 CBitFieldMaskBit43 = 0x80000000000 CBitFieldMaskBit44 = 0x100000000000 CBitFieldMaskBit45 = 0x200000000000 CBitFieldMaskBit46 = 0x400000000000 CBitFieldMaskBit47 = 0x800000000000 CBitFieldMaskBit48 = 0x1000000000000 CBitFieldMaskBit49 = 0x2000000000000 CBitFieldMaskBit50 = 0x4000000000000 CBitFieldMaskBit51 = 0x8000000000000 CBitFieldMaskBit52 = 0x10000000000000 CBitFieldMaskBit53 = 0x20000000000000 CBitFieldMaskBit54 = 0x40000000000000 CBitFieldMaskBit55 = 0x80000000000000 CBitFieldMaskBit56 = 0x100000000000000 CBitFieldMaskBit57 = 0x200000000000000 CBitFieldMaskBit58 = 0x400000000000000 CBitFieldMaskBit59 = 0x800000000000000 CBitFieldMaskBit60 = 0x1000000000000000 CBitFieldMaskBit61 = 0x2000000000000000 CBitFieldMaskBit62 = 0x4000000000000000 CBitFieldMaskBit63 = 0x8000000000000000 ) type SockaddrStorage struct { Family uint16 Data [122]byte _ uint32 } type HDGeometry struct { Heads uint8 Sectors uint8 Cylinders uint16 Start uint32 } 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 TpacketHdr struct { Status uint32 Len uint32 Snaplen uint32 Mac uint16 Net uint16 Sec uint32 Usec uint32 } const ( SizeofTpacketHdr = 0x18 ) type RTCPLLInfo struct { Ctrl int32 Value int32 Max int32 Min int32 Posmult int32 Negmult int32 Clock int32 } type BlkpgPartition struct { Start int64 Length int64 Pno int32 Devname [64]uint8 Volname [64]uint8 } const ( BLKPG = 0x1269 ) type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 Module_name [64]int8 Type uint32 Mask uint32 Refcnt uint32 Flags uint32 } type CryptoStatAEAD struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatAKCipher struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Verify_cnt uint64 Sign_cnt uint64 Err_cnt uint64 } type CryptoStatCipher struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatCompress struct { Type [64]int8 Compress_cnt uint64 Compress_tlen uint64 Decompress_cnt uint64 Decompress_tlen uint64 Err_cnt uint64 } type CryptoStatHash struct { Type [64]int8 Hash_cnt uint64 Hash_tlen uint64 Err_cnt uint64 } type CryptoStatKPP struct { Type [64]int8 Setsecret_cnt uint64 Generate_public_key_cnt uint64 Compute_shared_secret_cnt uint64 Err_cnt uint64 } type CryptoStatRNG struct { Type [64]int8 Generate_cnt uint64 Generate_tlen uint64 Seed_cnt uint64 Err_cnt uint64 } type CryptoStatLarval struct { Type [64]int8 } type CryptoReportLarval struct { Type [64]int8 } type CryptoReportHash struct { Type [64]int8 Blocksize uint32 Digestsize uint32 } type CryptoReportCipher struct { Type [64]int8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 } type CryptoReportBlkCipher struct { Type [64]int8 Geniv [64]int8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 Ivsize uint32 } type CryptoReportAEAD struct { Type [64]int8 Geniv [64]int8 Blocksize uint32 Maxauthsize uint32 Ivsize uint32 } type CryptoReportComp struct { Type [64]int8 } type CryptoReportRNG struct { Type [64]int8 Seedsize uint32 } type CryptoReportAKCipher struct { Type [64]int8 } type CryptoReportKPP struct { Type [64]int8 } type CryptoReportAcomp struct { Type [64]int8 } type LoopInfo struct { Number int32 Device uint16 Inode uint32 Rdevice uint16 Offset int32 Encrypt_type int32 Encrypt_key_size int32 Flags int32 Name [64]int8 Encrypt_key [32]uint8 Init [2]uint32 Reserved [4]int8 } type TIPCSubscr struct { Seq TIPCServiceRange Timeout uint32 Filter uint32 Handle [8]int8 } type TIPCSIOCLNReq struct { Peer uint32 Id uint32 Linkname [68]int8 } type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]int8 } type PPSKInfo struct { Assert_sequence uint32 Clear_sequence uint32 Assert_tu PPSKTime Clear_tu PPSKTime Current_mode int32 } const ( PPS_GETPARAMS = 0x800470a1 PPS_SETPARAMS = 0x400470a2 PPS_GETCAP = 0x800470a3 PPS_FETCH = 0xc00470a4 ) const ( PIDFD_NONBLOCK = 0x800 ) type SysvIpcPerm struct { Key int32 Uid uint32 Gid uint32 Cuid uint32 Cgid uint32 Mode uint16 _ [2]uint8 Seq uint16 _ uint16 _ uint32 _ uint32 } type SysvShmDesc struct { Perm SysvIpcPerm Segsz uint32 Atime uint32 Atime_high uint32 Dtime uint32 Dtime_high uint32 Ctime uint32 Ctime_high uint32 Cpid int32 Lpid int32 Nattch uint32 _ uint32 _ uint32 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go ================================================ // cgo -godefs -objdir=/tmp/amd64/cgo -- -Wall -Werror -static -I/tmp/amd64/include -m64 linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && linux package unix const ( SizeofPtr = 0x8 SizeofLong = 0x8 ) type ( _C_long int64 ) type Timespec struct { Sec int64 Nsec int64 } type Timeval struct { Sec int64 Usec int64 } type Timex struct { Modes uint32 Offset int64 Freq int64 Maxerror int64 Esterror int64 Status int32 Constant int64 Precision int64 Tolerance int64 Time Timeval Tick int64 Ppsfreq int64 Jitter int64 Shift int32 Stabil int64 Jitcnt int64 Calcnt int64 Errcnt int64 Stbcnt int64 Tai int32 _ [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 Stat_t struct { Dev uint64 Ino uint64 Nlink uint64 Mode uint32 Uid uint32 Gid uint32 _ int32 Rdev uint64 Size int64 Blksize int64 Blocks int64 Atim Timespec Mtim Timespec Ctim Timespec _ [3]int64 } type Dirent struct { Ino uint64 Off int64 Reclen uint16 Type uint8 Name [256]int8 _ [5]byte } type Flock_t struct { Type int16 Whence int16 Start int64 Len int64 Pid int32 _ [4]byte } type DmNameList struct { Dev uint64 Next uint32 Name [0]byte _ [4]byte } const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 ) type RawSockaddrNFCLLCP struct { Sa_family uint16 Dev_idx uint32 Target_idx uint32 Nfc_protocol uint32 Dsap uint8 Ssap uint8 Service_name [63]uint8 Service_name_len uint64 } type RawSockaddr struct { Family uint16 Data [14]int8 } type RawSockaddrAny struct { Addr RawSockaddr Pad [96]int8 } type Iovec struct { Base *byte Len uint64 } type Msghdr struct { Name *byte Namelen uint32 Iov *Iovec Iovlen uint64 Control *byte Controllen uint64 Flags int32 _ [4]byte } type Cmsghdr struct { Len uint64 Level int32 Type int32 } type ifreq struct { Ifrn [16]byte Ifru [24]byte } const ( SizeofSockaddrNFCLLCP = 0x60 SizeofIovec = 0x10 SizeofMsghdr = 0x38 SizeofCmsghdr = 0x10 ) const ( SizeofSockFprog = 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 Totalhigh uint64 Freehigh uint64 Unit uint32 _ [0]int8 _ [4]byte } type Ustat_t struct { Tfree int32 Tinode uint64 Fname [6]int8 Fpack [6]int8 _ [4]byte } type EpollEvent struct { Events uint32 Fd int32 Pad int32 } const ( OPEN_TREE_CLOEXEC = 0x80000 ) const ( POLLRDHUP = 0x2000 ) type Sigset_t struct { Val [16]uint64 } const _C__NSIG = 0x41 const ( SIG_BLOCK = 0x0 SIG_UNBLOCK = 0x1 SIG_SETMASK = 0x2 ) type Siginfo struct { Signo int32 Errno int32 Code int32 _ int32 _ [112]byte } type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Line uint8 Cc [19]uint8 Ispeed uint32 Ospeed uint32 } type Taskstats struct { Version uint16 Ac_exitcode uint32 Ac_flag uint8 Ac_nice uint8 Cpu_count uint64 Cpu_delay_total uint64 Blkio_count uint64 Blkio_delay_total uint64 Swapin_count uint64 Swapin_delay_total uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]int8 Ac_sched uint8 Ac_pad [3]uint8 _ [4]byte Ac_uid uint32 Ac_gid uint32 Ac_pid uint32 Ac_ppid uint32 Ac_btime uint32 Ac_etime uint64 Ac_utime uint64 Ac_stime uint64 Ac_minflt uint64 Ac_majflt uint64 Coremem uint64 Virtmem uint64 Hiwater_rss uint64 Hiwater_vm uint64 Read_char uint64 Write_char uint64 Read_syscalls uint64 Write_syscalls uint64 Read_bytes uint64 Write_bytes uint64 Cancelled_write_bytes uint64 Nvcsw uint64 Nivcsw uint64 Ac_utimescaled uint64 Ac_stimescaled uint64 Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 Ac_tgid uint32 Ac_tgetime uint64 Ac_exe_dev uint64 Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 Irq_count uint64 Irq_delay_total uint64 } type cpuMask uint64 const ( _NCPUBITS = 0x40 ) const ( CBitFieldMaskBit0 = 0x1 CBitFieldMaskBit1 = 0x2 CBitFieldMaskBit2 = 0x4 CBitFieldMaskBit3 = 0x8 CBitFieldMaskBit4 = 0x10 CBitFieldMaskBit5 = 0x20 CBitFieldMaskBit6 = 0x40 CBitFieldMaskBit7 = 0x80 CBitFieldMaskBit8 = 0x100 CBitFieldMaskBit9 = 0x200 CBitFieldMaskBit10 = 0x400 CBitFieldMaskBit11 = 0x800 CBitFieldMaskBit12 = 0x1000 CBitFieldMaskBit13 = 0x2000 CBitFieldMaskBit14 = 0x4000 CBitFieldMaskBit15 = 0x8000 CBitFieldMaskBit16 = 0x10000 CBitFieldMaskBit17 = 0x20000 CBitFieldMaskBit18 = 0x40000 CBitFieldMaskBit19 = 0x80000 CBitFieldMaskBit20 = 0x100000 CBitFieldMaskBit21 = 0x200000 CBitFieldMaskBit22 = 0x400000 CBitFieldMaskBit23 = 0x800000 CBitFieldMaskBit24 = 0x1000000 CBitFieldMaskBit25 = 0x2000000 CBitFieldMaskBit26 = 0x4000000 CBitFieldMaskBit27 = 0x8000000 CBitFieldMaskBit28 = 0x10000000 CBitFieldMaskBit29 = 0x20000000 CBitFieldMaskBit30 = 0x40000000 CBitFieldMaskBit31 = 0x80000000 CBitFieldMaskBit32 = 0x100000000 CBitFieldMaskBit33 = 0x200000000 CBitFieldMaskBit34 = 0x400000000 CBitFieldMaskBit35 = 0x800000000 CBitFieldMaskBit36 = 0x1000000000 CBitFieldMaskBit37 = 0x2000000000 CBitFieldMaskBit38 = 0x4000000000 CBitFieldMaskBit39 = 0x8000000000 CBitFieldMaskBit40 = 0x10000000000 CBitFieldMaskBit41 = 0x20000000000 CBitFieldMaskBit42 = 0x40000000000 CBitFieldMaskBit43 = 0x80000000000 CBitFieldMaskBit44 = 0x100000000000 CBitFieldMaskBit45 = 0x200000000000 CBitFieldMaskBit46 = 0x400000000000 CBitFieldMaskBit47 = 0x800000000000 CBitFieldMaskBit48 = 0x1000000000000 CBitFieldMaskBit49 = 0x2000000000000 CBitFieldMaskBit50 = 0x4000000000000 CBitFieldMaskBit51 = 0x8000000000000 CBitFieldMaskBit52 = 0x10000000000000 CBitFieldMaskBit53 = 0x20000000000000 CBitFieldMaskBit54 = 0x40000000000000 CBitFieldMaskBit55 = 0x80000000000000 CBitFieldMaskBit56 = 0x100000000000000 CBitFieldMaskBit57 = 0x200000000000000 CBitFieldMaskBit58 = 0x400000000000000 CBitFieldMaskBit59 = 0x800000000000000 CBitFieldMaskBit60 = 0x1000000000000000 CBitFieldMaskBit61 = 0x2000000000000000 CBitFieldMaskBit62 = 0x4000000000000000 CBitFieldMaskBit63 = 0x8000000000000000 ) type SockaddrStorage struct { Family uint16 Data [118]byte _ uint64 } type HDGeometry struct { Heads uint8 Sectors uint8 Cylinders uint16 Start 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 TpacketHdr struct { Status uint64 Len uint32 Snaplen uint32 Mac uint16 Net uint16 Sec uint32 Usec uint32 _ [4]byte } const ( SizeofTpacketHdr = 0x20 ) type RTCPLLInfo struct { Ctrl int32 Value int32 Max int32 Min int32 Posmult int32 Negmult int32 Clock int64 } type BlkpgPartition struct { Start int64 Length int64 Pno int32 Devname [64]uint8 Volname [64]uint8 _ [4]byte } const ( BLKPG = 0x1269 ) type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 Module_name [64]int8 Type uint32 Mask uint32 Refcnt uint32 Flags uint32 } type CryptoStatAEAD struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatAKCipher struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Verify_cnt uint64 Sign_cnt uint64 Err_cnt uint64 } type CryptoStatCipher struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatCompress struct { Type [64]int8 Compress_cnt uint64 Compress_tlen uint64 Decompress_cnt uint64 Decompress_tlen uint64 Err_cnt uint64 } type CryptoStatHash struct { Type [64]int8 Hash_cnt uint64 Hash_tlen uint64 Err_cnt uint64 } type CryptoStatKPP struct { Type [64]int8 Setsecret_cnt uint64 Generate_public_key_cnt uint64 Compute_shared_secret_cnt uint64 Err_cnt uint64 } type CryptoStatRNG struct { Type [64]int8 Generate_cnt uint64 Generate_tlen uint64 Seed_cnt uint64 Err_cnt uint64 } type CryptoStatLarval struct { Type [64]int8 } type CryptoReportLarval struct { Type [64]int8 } type CryptoReportHash struct { Type [64]int8 Blocksize uint32 Digestsize uint32 } type CryptoReportCipher struct { Type [64]int8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 } type CryptoReportBlkCipher struct { Type [64]int8 Geniv [64]int8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 Ivsize uint32 } type CryptoReportAEAD struct { Type [64]int8 Geniv [64]int8 Blocksize uint32 Maxauthsize uint32 Ivsize uint32 } type CryptoReportComp struct { Type [64]int8 } type CryptoReportRNG struct { Type [64]int8 Seedsize uint32 } type CryptoReportAKCipher struct { Type [64]int8 } type CryptoReportKPP struct { Type [64]int8 } type CryptoReportAcomp struct { Type [64]int8 } type LoopInfo struct { Number int32 Device uint64 Inode uint64 Rdevice uint64 Offset int32 Encrypt_type int32 Encrypt_key_size int32 Flags int32 Name [64]int8 Encrypt_key [32]uint8 Init [2]uint64 Reserved [4]int8 _ [4]byte } type TIPCSubscr struct { Seq TIPCServiceRange Timeout uint32 Filter uint32 Handle [8]int8 } type TIPCSIOCLNReq struct { Peer uint32 Id uint32 Linkname [68]int8 } type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]int8 } type PPSKInfo struct { Assert_sequence uint32 Clear_sequence uint32 Assert_tu PPSKTime Clear_tu PPSKTime Current_mode int32 _ [4]byte } const ( PPS_GETPARAMS = 0x800870a1 PPS_SETPARAMS = 0x400870a2 PPS_GETCAP = 0x800870a3 PPS_FETCH = 0xc00870a4 ) const ( PIDFD_NONBLOCK = 0x800 ) type SysvIpcPerm struct { Key int32 Uid uint32 Gid uint32 Cuid uint32 Cgid uint32 Mode uint32 _ [0]uint8 Seq uint16 _ uint16 _ uint64 _ uint64 } type SysvShmDesc struct { Perm SysvIpcPerm Segsz uint64 Atime int64 Dtime int64 Ctime int64 Cpid int32 Lpid int32 Nattch uint64 _ uint64 _ uint64 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_linux_arm.go ================================================ // cgo -godefs -objdir=/tmp/arm/cgo -- -Wall -Werror -static -I/tmp/arm/include linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && linux package unix const ( SizeofPtr = 0x4 SizeofLong = 0x4 ) type ( _C_long int32 ) 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 _ [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 Stat_t struct { Dev uint64 _ uint16 _ uint32 Mode uint32 Nlink uint32 Uid uint32 Gid uint32 Rdev uint64 _ uint16 _ [4]byte Size int64 Blksize int32 _ [4]byte Blocks int64 Atim Timespec Mtim Timespec Ctim Timespec Ino uint64 } type Dirent struct { Ino uint64 Off int64 Reclen uint16 Type uint8 Name [256]uint8 _ [5]byte } type Flock_t struct { Type int16 Whence int16 _ [4]byte Start int64 Len int64 Pid int32 _ [4]byte } type DmNameList struct { Dev uint64 Next uint32 Name [0]byte _ [4]byte } const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 ) type RawSockaddrNFCLLCP struct { Sa_family uint16 Dev_idx uint32 Target_idx uint32 Nfc_protocol uint32 Dsap uint8 Ssap uint8 Service_name [63]uint8 Service_name_len uint32 } type RawSockaddr struct { Family uint16 Data [14]uint8 } type RawSockaddrAny struct { Addr RawSockaddr Pad [96]uint8 } type Iovec struct { Base *byte Len 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 ifreq struct { Ifrn [16]byte Ifru [16]byte } const ( SizeofSockaddrNFCLLCP = 0x58 SizeofIovec = 0x8 SizeofMsghdr = 0x1c SizeofCmsghdr = 0xc ) const ( SizeofSockFprog = 0x8 ) 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 _ [8]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 ( OPEN_TREE_CLOEXEC = 0x80000 ) const ( POLLRDHUP = 0x2000 ) type Sigset_t struct { Val [32]uint32 } const _C__NSIG = 0x41 const ( SIG_BLOCK = 0x0 SIG_UNBLOCK = 0x1 SIG_SETMASK = 0x2 ) type Siginfo struct { Signo int32 Errno int32 Code int32 _ [116]byte } type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Line uint8 Cc [19]uint8 Ispeed uint32 Ospeed uint32 } type Taskstats struct { Version uint16 Ac_exitcode uint32 Ac_flag uint8 Ac_nice uint8 _ [4]byte Cpu_count uint64 Cpu_delay_total uint64 Blkio_count uint64 Blkio_delay_total uint64 Swapin_count uint64 Swapin_delay_total uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]uint8 Ac_sched uint8 Ac_pad [3]uint8 _ [4]byte Ac_uid uint32 Ac_gid uint32 Ac_pid uint32 Ac_ppid uint32 Ac_btime uint32 _ [4]byte Ac_etime uint64 Ac_utime uint64 Ac_stime uint64 Ac_minflt uint64 Ac_majflt uint64 Coremem uint64 Virtmem uint64 Hiwater_rss uint64 Hiwater_vm uint64 Read_char uint64 Write_char uint64 Read_syscalls uint64 Write_syscalls uint64 Read_bytes uint64 Write_bytes uint64 Cancelled_write_bytes uint64 Nvcsw uint64 Nivcsw uint64 Ac_utimescaled uint64 Ac_stimescaled uint64 Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 Ac_tgid uint32 _ [4]byte Ac_tgetime uint64 Ac_exe_dev uint64 Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 Irq_count uint64 Irq_delay_total uint64 } type cpuMask uint32 const ( _NCPUBITS = 0x20 ) const ( CBitFieldMaskBit0 = 0x1 CBitFieldMaskBit1 = 0x2 CBitFieldMaskBit2 = 0x4 CBitFieldMaskBit3 = 0x8 CBitFieldMaskBit4 = 0x10 CBitFieldMaskBit5 = 0x20 CBitFieldMaskBit6 = 0x40 CBitFieldMaskBit7 = 0x80 CBitFieldMaskBit8 = 0x100 CBitFieldMaskBit9 = 0x200 CBitFieldMaskBit10 = 0x400 CBitFieldMaskBit11 = 0x800 CBitFieldMaskBit12 = 0x1000 CBitFieldMaskBit13 = 0x2000 CBitFieldMaskBit14 = 0x4000 CBitFieldMaskBit15 = 0x8000 CBitFieldMaskBit16 = 0x10000 CBitFieldMaskBit17 = 0x20000 CBitFieldMaskBit18 = 0x40000 CBitFieldMaskBit19 = 0x80000 CBitFieldMaskBit20 = 0x100000 CBitFieldMaskBit21 = 0x200000 CBitFieldMaskBit22 = 0x400000 CBitFieldMaskBit23 = 0x800000 CBitFieldMaskBit24 = 0x1000000 CBitFieldMaskBit25 = 0x2000000 CBitFieldMaskBit26 = 0x4000000 CBitFieldMaskBit27 = 0x8000000 CBitFieldMaskBit28 = 0x10000000 CBitFieldMaskBit29 = 0x20000000 CBitFieldMaskBit30 = 0x40000000 CBitFieldMaskBit31 = 0x80000000 CBitFieldMaskBit32 = 0x100000000 CBitFieldMaskBit33 = 0x200000000 CBitFieldMaskBit34 = 0x400000000 CBitFieldMaskBit35 = 0x800000000 CBitFieldMaskBit36 = 0x1000000000 CBitFieldMaskBit37 = 0x2000000000 CBitFieldMaskBit38 = 0x4000000000 CBitFieldMaskBit39 = 0x8000000000 CBitFieldMaskBit40 = 0x10000000000 CBitFieldMaskBit41 = 0x20000000000 CBitFieldMaskBit42 = 0x40000000000 CBitFieldMaskBit43 = 0x80000000000 CBitFieldMaskBit44 = 0x100000000000 CBitFieldMaskBit45 = 0x200000000000 CBitFieldMaskBit46 = 0x400000000000 CBitFieldMaskBit47 = 0x800000000000 CBitFieldMaskBit48 = 0x1000000000000 CBitFieldMaskBit49 = 0x2000000000000 CBitFieldMaskBit50 = 0x4000000000000 CBitFieldMaskBit51 = 0x8000000000000 CBitFieldMaskBit52 = 0x10000000000000 CBitFieldMaskBit53 = 0x20000000000000 CBitFieldMaskBit54 = 0x40000000000000 CBitFieldMaskBit55 = 0x80000000000000 CBitFieldMaskBit56 = 0x100000000000000 CBitFieldMaskBit57 = 0x200000000000000 CBitFieldMaskBit58 = 0x400000000000000 CBitFieldMaskBit59 = 0x800000000000000 CBitFieldMaskBit60 = 0x1000000000000000 CBitFieldMaskBit61 = 0x2000000000000000 CBitFieldMaskBit62 = 0x4000000000000000 CBitFieldMaskBit63 = 0x8000000000000000 ) type SockaddrStorage struct { Family uint16 Data [122]byte _ uint32 } type HDGeometry struct { Heads uint8 Sectors uint8 Cylinders uint16 Start uint32 } 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 _ [4]byte } type TpacketHdr struct { Status uint32 Len uint32 Snaplen uint32 Mac uint16 Net uint16 Sec uint32 Usec uint32 } const ( SizeofTpacketHdr = 0x18 ) type RTCPLLInfo struct { Ctrl int32 Value int32 Max int32 Min int32 Posmult int32 Negmult int32 Clock int32 } type BlkpgPartition struct { Start int64 Length int64 Pno int32 Devname [64]uint8 Volname [64]uint8 _ [4]byte } const ( BLKPG = 0x1269 ) type CryptoUserAlg struct { Name [64]uint8 Driver_name [64]uint8 Module_name [64]uint8 Type uint32 Mask uint32 Refcnt uint32 Flags uint32 } type CryptoStatAEAD struct { Type [64]uint8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatAKCipher struct { Type [64]uint8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Verify_cnt uint64 Sign_cnt uint64 Err_cnt uint64 } type CryptoStatCipher struct { Type [64]uint8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatCompress struct { Type [64]uint8 Compress_cnt uint64 Compress_tlen uint64 Decompress_cnt uint64 Decompress_tlen uint64 Err_cnt uint64 } type CryptoStatHash struct { Type [64]uint8 Hash_cnt uint64 Hash_tlen uint64 Err_cnt uint64 } type CryptoStatKPP struct { Type [64]uint8 Setsecret_cnt uint64 Generate_public_key_cnt uint64 Compute_shared_secret_cnt uint64 Err_cnt uint64 } type CryptoStatRNG struct { Type [64]uint8 Generate_cnt uint64 Generate_tlen uint64 Seed_cnt uint64 Err_cnt uint64 } type CryptoStatLarval struct { Type [64]uint8 } type CryptoReportLarval struct { Type [64]uint8 } type CryptoReportHash struct { Type [64]uint8 Blocksize uint32 Digestsize uint32 } type CryptoReportCipher struct { Type [64]uint8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 } type CryptoReportBlkCipher struct { Type [64]uint8 Geniv [64]uint8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 Ivsize uint32 } type CryptoReportAEAD struct { Type [64]uint8 Geniv [64]uint8 Blocksize uint32 Maxauthsize uint32 Ivsize uint32 } type CryptoReportComp struct { Type [64]uint8 } type CryptoReportRNG struct { Type [64]uint8 Seedsize uint32 } type CryptoReportAKCipher struct { Type [64]uint8 } type CryptoReportKPP struct { Type [64]uint8 } type CryptoReportAcomp struct { Type [64]uint8 } type LoopInfo struct { Number int32 Device uint16 Inode uint32 Rdevice uint16 Offset int32 Encrypt_type int32 Encrypt_key_size int32 Flags int32 Name [64]uint8 Encrypt_key [32]uint8 Init [2]uint32 Reserved [4]uint8 } type TIPCSubscr struct { Seq TIPCServiceRange Timeout uint32 Filter uint32 Handle [8]uint8 } type TIPCSIOCLNReq struct { Peer uint32 Id uint32 Linkname [68]uint8 } type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]uint8 } type PPSKInfo struct { Assert_sequence uint32 Clear_sequence uint32 Assert_tu PPSKTime Clear_tu PPSKTime Current_mode int32 _ [4]byte } const ( PPS_GETPARAMS = 0x800470a1 PPS_SETPARAMS = 0x400470a2 PPS_GETCAP = 0x800470a3 PPS_FETCH = 0xc00470a4 ) const ( PIDFD_NONBLOCK = 0x800 ) type SysvIpcPerm struct { Key int32 Uid uint32 Gid uint32 Cuid uint32 Cgid uint32 Mode uint16 _ [2]uint8 Seq uint16 _ uint16 _ uint32 _ uint32 } type SysvShmDesc struct { Perm SysvIpcPerm Segsz uint32 Atime uint32 Atime_high uint32 Dtime uint32 Dtime_high uint32 Ctime uint32 Ctime_high uint32 Cpid int32 Lpid int32 Nattch uint32 _ uint32 _ uint32 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go ================================================ // cgo -godefs -objdir=/tmp/arm64/cgo -- -Wall -Werror -static -I/tmp/arm64/include -fsigned-char linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && linux package unix const ( SizeofPtr = 0x8 SizeofLong = 0x8 ) type ( _C_long int64 ) type Timespec struct { Sec int64 Nsec int64 } type Timeval struct { Sec int64 Usec int64 } type Timex struct { Modes uint32 Offset int64 Freq int64 Maxerror int64 Esterror int64 Status int32 Constant int64 Precision int64 Tolerance int64 Time Timeval Tick int64 Ppsfreq int64 Jitter int64 Shift int32 Stabil int64 Jitcnt int64 Calcnt int64 Errcnt int64 Stbcnt int64 Tai int32 _ [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 Stat_t struct { Dev uint64 Ino uint64 Mode uint32 Nlink uint32 Uid uint32 Gid uint32 Rdev uint64 _ uint64 Size int64 Blksize int32 _ int32 Blocks int64 Atim Timespec Mtim Timespec Ctim Timespec _ [2]int32 } type Dirent struct { Ino uint64 Off int64 Reclen uint16 Type uint8 Name [256]int8 _ [5]byte } type Flock_t struct { Type int16 Whence int16 Start int64 Len int64 Pid int32 _ [4]byte } type DmNameList struct { Dev uint64 Next uint32 Name [0]byte _ [4]byte } const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 ) type RawSockaddrNFCLLCP struct { Sa_family uint16 Dev_idx uint32 Target_idx uint32 Nfc_protocol uint32 Dsap uint8 Ssap uint8 Service_name [63]uint8 Service_name_len uint64 } type RawSockaddr struct { Family uint16 Data [14]int8 } type RawSockaddrAny struct { Addr RawSockaddr Pad [96]int8 } type Iovec struct { Base *byte Len uint64 } type Msghdr struct { Name *byte Namelen uint32 Iov *Iovec Iovlen uint64 Control *byte Controllen uint64 Flags int32 _ [4]byte } type Cmsghdr struct { Len uint64 Level int32 Type int32 } type ifreq struct { Ifrn [16]byte Ifru [24]byte } const ( SizeofSockaddrNFCLLCP = 0x60 SizeofIovec = 0x10 SizeofMsghdr = 0x38 SizeofCmsghdr = 0x10 ) const ( SizeofSockFprog = 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 Totalhigh uint64 Freehigh uint64 Unit uint32 _ [0]int8 _ [4]byte } type Ustat_t struct { Tfree int32 Tinode uint64 Fname [6]int8 Fpack [6]int8 _ [4]byte } type EpollEvent struct { Events uint32 PadFd int32 Fd int32 Pad int32 } const ( OPEN_TREE_CLOEXEC = 0x80000 ) const ( POLLRDHUP = 0x2000 ) type Sigset_t struct { Val [16]uint64 } const _C__NSIG = 0x41 const ( SIG_BLOCK = 0x0 SIG_UNBLOCK = 0x1 SIG_SETMASK = 0x2 ) type Siginfo struct { Signo int32 Errno int32 Code int32 _ int32 _ [112]byte } type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Line uint8 Cc [19]uint8 Ispeed uint32 Ospeed uint32 } type Taskstats struct { Version uint16 Ac_exitcode uint32 Ac_flag uint8 Ac_nice uint8 Cpu_count uint64 Cpu_delay_total uint64 Blkio_count uint64 Blkio_delay_total uint64 Swapin_count uint64 Swapin_delay_total uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]int8 Ac_sched uint8 Ac_pad [3]uint8 _ [4]byte Ac_uid uint32 Ac_gid uint32 Ac_pid uint32 Ac_ppid uint32 Ac_btime uint32 Ac_etime uint64 Ac_utime uint64 Ac_stime uint64 Ac_minflt uint64 Ac_majflt uint64 Coremem uint64 Virtmem uint64 Hiwater_rss uint64 Hiwater_vm uint64 Read_char uint64 Write_char uint64 Read_syscalls uint64 Write_syscalls uint64 Read_bytes uint64 Write_bytes uint64 Cancelled_write_bytes uint64 Nvcsw uint64 Nivcsw uint64 Ac_utimescaled uint64 Ac_stimescaled uint64 Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 Ac_tgid uint32 Ac_tgetime uint64 Ac_exe_dev uint64 Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 Irq_count uint64 Irq_delay_total uint64 } type cpuMask uint64 const ( _NCPUBITS = 0x40 ) const ( CBitFieldMaskBit0 = 0x1 CBitFieldMaskBit1 = 0x2 CBitFieldMaskBit2 = 0x4 CBitFieldMaskBit3 = 0x8 CBitFieldMaskBit4 = 0x10 CBitFieldMaskBit5 = 0x20 CBitFieldMaskBit6 = 0x40 CBitFieldMaskBit7 = 0x80 CBitFieldMaskBit8 = 0x100 CBitFieldMaskBit9 = 0x200 CBitFieldMaskBit10 = 0x400 CBitFieldMaskBit11 = 0x800 CBitFieldMaskBit12 = 0x1000 CBitFieldMaskBit13 = 0x2000 CBitFieldMaskBit14 = 0x4000 CBitFieldMaskBit15 = 0x8000 CBitFieldMaskBit16 = 0x10000 CBitFieldMaskBit17 = 0x20000 CBitFieldMaskBit18 = 0x40000 CBitFieldMaskBit19 = 0x80000 CBitFieldMaskBit20 = 0x100000 CBitFieldMaskBit21 = 0x200000 CBitFieldMaskBit22 = 0x400000 CBitFieldMaskBit23 = 0x800000 CBitFieldMaskBit24 = 0x1000000 CBitFieldMaskBit25 = 0x2000000 CBitFieldMaskBit26 = 0x4000000 CBitFieldMaskBit27 = 0x8000000 CBitFieldMaskBit28 = 0x10000000 CBitFieldMaskBit29 = 0x20000000 CBitFieldMaskBit30 = 0x40000000 CBitFieldMaskBit31 = 0x80000000 CBitFieldMaskBit32 = 0x100000000 CBitFieldMaskBit33 = 0x200000000 CBitFieldMaskBit34 = 0x400000000 CBitFieldMaskBit35 = 0x800000000 CBitFieldMaskBit36 = 0x1000000000 CBitFieldMaskBit37 = 0x2000000000 CBitFieldMaskBit38 = 0x4000000000 CBitFieldMaskBit39 = 0x8000000000 CBitFieldMaskBit40 = 0x10000000000 CBitFieldMaskBit41 = 0x20000000000 CBitFieldMaskBit42 = 0x40000000000 CBitFieldMaskBit43 = 0x80000000000 CBitFieldMaskBit44 = 0x100000000000 CBitFieldMaskBit45 = 0x200000000000 CBitFieldMaskBit46 = 0x400000000000 CBitFieldMaskBit47 = 0x800000000000 CBitFieldMaskBit48 = 0x1000000000000 CBitFieldMaskBit49 = 0x2000000000000 CBitFieldMaskBit50 = 0x4000000000000 CBitFieldMaskBit51 = 0x8000000000000 CBitFieldMaskBit52 = 0x10000000000000 CBitFieldMaskBit53 = 0x20000000000000 CBitFieldMaskBit54 = 0x40000000000000 CBitFieldMaskBit55 = 0x80000000000000 CBitFieldMaskBit56 = 0x100000000000000 CBitFieldMaskBit57 = 0x200000000000000 CBitFieldMaskBit58 = 0x400000000000000 CBitFieldMaskBit59 = 0x800000000000000 CBitFieldMaskBit60 = 0x1000000000000000 CBitFieldMaskBit61 = 0x2000000000000000 CBitFieldMaskBit62 = 0x4000000000000000 CBitFieldMaskBit63 = 0x8000000000000000 ) type SockaddrStorage struct { Family uint16 Data [118]byte _ uint64 } type HDGeometry struct { Heads uint8 Sectors uint8 Cylinders uint16 Start 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 TpacketHdr struct { Status uint64 Len uint32 Snaplen uint32 Mac uint16 Net uint16 Sec uint32 Usec uint32 _ [4]byte } const ( SizeofTpacketHdr = 0x20 ) type RTCPLLInfo struct { Ctrl int32 Value int32 Max int32 Min int32 Posmult int32 Negmult int32 Clock int64 } type BlkpgPartition struct { Start int64 Length int64 Pno int32 Devname [64]uint8 Volname [64]uint8 _ [4]byte } const ( BLKPG = 0x1269 ) type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 Module_name [64]int8 Type uint32 Mask uint32 Refcnt uint32 Flags uint32 } type CryptoStatAEAD struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatAKCipher struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Verify_cnt uint64 Sign_cnt uint64 Err_cnt uint64 } type CryptoStatCipher struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatCompress struct { Type [64]int8 Compress_cnt uint64 Compress_tlen uint64 Decompress_cnt uint64 Decompress_tlen uint64 Err_cnt uint64 } type CryptoStatHash struct { Type [64]int8 Hash_cnt uint64 Hash_tlen uint64 Err_cnt uint64 } type CryptoStatKPP struct { Type [64]int8 Setsecret_cnt uint64 Generate_public_key_cnt uint64 Compute_shared_secret_cnt uint64 Err_cnt uint64 } type CryptoStatRNG struct { Type [64]int8 Generate_cnt uint64 Generate_tlen uint64 Seed_cnt uint64 Err_cnt uint64 } type CryptoStatLarval struct { Type [64]int8 } type CryptoReportLarval struct { Type [64]int8 } type CryptoReportHash struct { Type [64]int8 Blocksize uint32 Digestsize uint32 } type CryptoReportCipher struct { Type [64]int8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 } type CryptoReportBlkCipher struct { Type [64]int8 Geniv [64]int8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 Ivsize uint32 } type CryptoReportAEAD struct { Type [64]int8 Geniv [64]int8 Blocksize uint32 Maxauthsize uint32 Ivsize uint32 } type CryptoReportComp struct { Type [64]int8 } type CryptoReportRNG struct { Type [64]int8 Seedsize uint32 } type CryptoReportAKCipher struct { Type [64]int8 } type CryptoReportKPP struct { Type [64]int8 } type CryptoReportAcomp struct { Type [64]int8 } type LoopInfo struct { Number int32 Device uint32 Inode uint64 Rdevice uint32 Offset int32 Encrypt_type int32 Encrypt_key_size int32 Flags int32 Name [64]int8 Encrypt_key [32]uint8 Init [2]uint64 Reserved [4]int8 _ [4]byte } type TIPCSubscr struct { Seq TIPCServiceRange Timeout uint32 Filter uint32 Handle [8]int8 } type TIPCSIOCLNReq struct { Peer uint32 Id uint32 Linkname [68]int8 } type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]int8 } type PPSKInfo struct { Assert_sequence uint32 Clear_sequence uint32 Assert_tu PPSKTime Clear_tu PPSKTime Current_mode int32 _ [4]byte } const ( PPS_GETPARAMS = 0x800870a1 PPS_SETPARAMS = 0x400870a2 PPS_GETCAP = 0x800870a3 PPS_FETCH = 0xc00870a4 ) const ( PIDFD_NONBLOCK = 0x800 ) type SysvIpcPerm struct { Key int32 Uid uint32 Gid uint32 Cuid uint32 Cgid uint32 Mode uint32 _ [0]uint8 Seq uint16 _ uint16 _ uint64 _ uint64 } type SysvShmDesc struct { Perm SysvIpcPerm Segsz uint64 Atime int64 Dtime int64 Ctime int64 Cpid int32 Lpid int32 Nattch uint64 _ uint64 _ uint64 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go ================================================ // cgo -godefs -objdir=/tmp/loong64/cgo -- -Wall -Werror -static -I/tmp/loong64/include linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build loong64 && linux package unix const ( SizeofPtr = 0x8 SizeofLong = 0x8 ) type ( _C_long int64 ) type Timespec struct { Sec int64 Nsec int64 } type Timeval struct { Sec int64 Usec int64 } type Timex struct { Modes uint32 Offset int64 Freq int64 Maxerror int64 Esterror int64 Status int32 Constant int64 Precision int64 Tolerance int64 Time Timeval Tick int64 Ppsfreq int64 Jitter int64 Shift int32 Stabil int64 Jitcnt int64 Calcnt int64 Errcnt int64 Stbcnt int64 Tai int32 _ [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 Stat_t struct { Dev uint64 Ino uint64 Mode uint32 Nlink uint32 Uid uint32 Gid uint32 Rdev uint64 _ uint64 Size int64 Blksize int32 _ int32 Blocks int64 Atim Timespec Mtim Timespec Ctim Timespec _ [2]int32 } type Dirent struct { Ino uint64 Off int64 Reclen uint16 Type uint8 Name [256]int8 _ [5]byte } type Flock_t struct { Type int16 Whence int16 Start int64 Len int64 Pid int32 _ [4]byte } type DmNameList struct { Dev uint64 Next uint32 Name [0]byte _ [4]byte } const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 ) type RawSockaddrNFCLLCP struct { Sa_family uint16 Dev_idx uint32 Target_idx uint32 Nfc_protocol uint32 Dsap uint8 Ssap uint8 Service_name [63]uint8 Service_name_len uint64 } type RawSockaddr struct { Family uint16 Data [14]int8 } type RawSockaddrAny struct { Addr RawSockaddr Pad [96]int8 } type Iovec struct { Base *byte Len uint64 } type Msghdr struct { Name *byte Namelen uint32 Iov *Iovec Iovlen uint64 Control *byte Controllen uint64 Flags int32 _ [4]byte } type Cmsghdr struct { Len uint64 Level int32 Type int32 } type ifreq struct { Ifrn [16]byte Ifru [24]byte } const ( SizeofSockaddrNFCLLCP = 0x60 SizeofIovec = 0x10 SizeofMsghdr = 0x38 SizeofCmsghdr = 0x10 ) const ( SizeofSockFprog = 0x10 ) type PtraceRegs struct { Regs [32]uint64 Orig_a0 uint64 Era uint64 Badv uint64 Reserved [10]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 Totalhigh uint64 Freehigh uint64 Unit uint32 _ [0]int8 _ [4]byte } type Ustat_t struct { Tfree int32 Tinode uint64 Fname [6]int8 Fpack [6]int8 _ [4]byte } type EpollEvent struct { Events uint32 _ int32 Fd int32 Pad int32 } const ( OPEN_TREE_CLOEXEC = 0x80000 ) const ( POLLRDHUP = 0x2000 ) type Sigset_t struct { Val [16]uint64 } const _C__NSIG = 0x41 const ( SIG_BLOCK = 0x0 SIG_UNBLOCK = 0x1 SIG_SETMASK = 0x2 ) type Siginfo struct { Signo int32 Errno int32 Code int32 _ int32 _ [112]byte } type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Line uint8 Cc [19]uint8 Ispeed uint32 Ospeed uint32 } type Taskstats struct { Version uint16 Ac_exitcode uint32 Ac_flag uint8 Ac_nice uint8 Cpu_count uint64 Cpu_delay_total uint64 Blkio_count uint64 Blkio_delay_total uint64 Swapin_count uint64 Swapin_delay_total uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]int8 Ac_sched uint8 Ac_pad [3]uint8 _ [4]byte Ac_uid uint32 Ac_gid uint32 Ac_pid uint32 Ac_ppid uint32 Ac_btime uint32 Ac_etime uint64 Ac_utime uint64 Ac_stime uint64 Ac_minflt uint64 Ac_majflt uint64 Coremem uint64 Virtmem uint64 Hiwater_rss uint64 Hiwater_vm uint64 Read_char uint64 Write_char uint64 Read_syscalls uint64 Write_syscalls uint64 Read_bytes uint64 Write_bytes uint64 Cancelled_write_bytes uint64 Nvcsw uint64 Nivcsw uint64 Ac_utimescaled uint64 Ac_stimescaled uint64 Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 Ac_tgid uint32 Ac_tgetime uint64 Ac_exe_dev uint64 Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 Irq_count uint64 Irq_delay_total uint64 } type cpuMask uint64 const ( _NCPUBITS = 0x40 ) const ( CBitFieldMaskBit0 = 0x1 CBitFieldMaskBit1 = 0x2 CBitFieldMaskBit2 = 0x4 CBitFieldMaskBit3 = 0x8 CBitFieldMaskBit4 = 0x10 CBitFieldMaskBit5 = 0x20 CBitFieldMaskBit6 = 0x40 CBitFieldMaskBit7 = 0x80 CBitFieldMaskBit8 = 0x100 CBitFieldMaskBit9 = 0x200 CBitFieldMaskBit10 = 0x400 CBitFieldMaskBit11 = 0x800 CBitFieldMaskBit12 = 0x1000 CBitFieldMaskBit13 = 0x2000 CBitFieldMaskBit14 = 0x4000 CBitFieldMaskBit15 = 0x8000 CBitFieldMaskBit16 = 0x10000 CBitFieldMaskBit17 = 0x20000 CBitFieldMaskBit18 = 0x40000 CBitFieldMaskBit19 = 0x80000 CBitFieldMaskBit20 = 0x100000 CBitFieldMaskBit21 = 0x200000 CBitFieldMaskBit22 = 0x400000 CBitFieldMaskBit23 = 0x800000 CBitFieldMaskBit24 = 0x1000000 CBitFieldMaskBit25 = 0x2000000 CBitFieldMaskBit26 = 0x4000000 CBitFieldMaskBit27 = 0x8000000 CBitFieldMaskBit28 = 0x10000000 CBitFieldMaskBit29 = 0x20000000 CBitFieldMaskBit30 = 0x40000000 CBitFieldMaskBit31 = 0x80000000 CBitFieldMaskBit32 = 0x100000000 CBitFieldMaskBit33 = 0x200000000 CBitFieldMaskBit34 = 0x400000000 CBitFieldMaskBit35 = 0x800000000 CBitFieldMaskBit36 = 0x1000000000 CBitFieldMaskBit37 = 0x2000000000 CBitFieldMaskBit38 = 0x4000000000 CBitFieldMaskBit39 = 0x8000000000 CBitFieldMaskBit40 = 0x10000000000 CBitFieldMaskBit41 = 0x20000000000 CBitFieldMaskBit42 = 0x40000000000 CBitFieldMaskBit43 = 0x80000000000 CBitFieldMaskBit44 = 0x100000000000 CBitFieldMaskBit45 = 0x200000000000 CBitFieldMaskBit46 = 0x400000000000 CBitFieldMaskBit47 = 0x800000000000 CBitFieldMaskBit48 = 0x1000000000000 CBitFieldMaskBit49 = 0x2000000000000 CBitFieldMaskBit50 = 0x4000000000000 CBitFieldMaskBit51 = 0x8000000000000 CBitFieldMaskBit52 = 0x10000000000000 CBitFieldMaskBit53 = 0x20000000000000 CBitFieldMaskBit54 = 0x40000000000000 CBitFieldMaskBit55 = 0x80000000000000 CBitFieldMaskBit56 = 0x100000000000000 CBitFieldMaskBit57 = 0x200000000000000 CBitFieldMaskBit58 = 0x400000000000000 CBitFieldMaskBit59 = 0x800000000000000 CBitFieldMaskBit60 = 0x1000000000000000 CBitFieldMaskBit61 = 0x2000000000000000 CBitFieldMaskBit62 = 0x4000000000000000 CBitFieldMaskBit63 = 0x8000000000000000 ) type SockaddrStorage struct { Family uint16 Data [118]byte _ uint64 } type HDGeometry struct { Heads uint8 Sectors uint8 Cylinders uint16 Start 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 TpacketHdr struct { Status uint64 Len uint32 Snaplen uint32 Mac uint16 Net uint16 Sec uint32 Usec uint32 _ [4]byte } const ( SizeofTpacketHdr = 0x20 ) type RTCPLLInfo struct { Ctrl int32 Value int32 Max int32 Min int32 Posmult int32 Negmult int32 Clock int64 } type BlkpgPartition struct { Start int64 Length int64 Pno int32 Devname [64]uint8 Volname [64]uint8 _ [4]byte } const ( BLKPG = 0x1269 ) type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 Module_name [64]int8 Type uint32 Mask uint32 Refcnt uint32 Flags uint32 } type CryptoStatAEAD struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatAKCipher struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Verify_cnt uint64 Sign_cnt uint64 Err_cnt uint64 } type CryptoStatCipher struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatCompress struct { Type [64]int8 Compress_cnt uint64 Compress_tlen uint64 Decompress_cnt uint64 Decompress_tlen uint64 Err_cnt uint64 } type CryptoStatHash struct { Type [64]int8 Hash_cnt uint64 Hash_tlen uint64 Err_cnt uint64 } type CryptoStatKPP struct { Type [64]int8 Setsecret_cnt uint64 Generate_public_key_cnt uint64 Compute_shared_secret_cnt uint64 Err_cnt uint64 } type CryptoStatRNG struct { Type [64]int8 Generate_cnt uint64 Generate_tlen uint64 Seed_cnt uint64 Err_cnt uint64 } type CryptoStatLarval struct { Type [64]int8 } type CryptoReportLarval struct { Type [64]int8 } type CryptoReportHash struct { Type [64]int8 Blocksize uint32 Digestsize uint32 } type CryptoReportCipher struct { Type [64]int8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 } type CryptoReportBlkCipher struct { Type [64]int8 Geniv [64]int8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 Ivsize uint32 } type CryptoReportAEAD struct { Type [64]int8 Geniv [64]int8 Blocksize uint32 Maxauthsize uint32 Ivsize uint32 } type CryptoReportComp struct { Type [64]int8 } type CryptoReportRNG struct { Type [64]int8 Seedsize uint32 } type CryptoReportAKCipher struct { Type [64]int8 } type CryptoReportKPP struct { Type [64]int8 } type CryptoReportAcomp struct { Type [64]int8 } type LoopInfo struct { Number int32 Device uint32 Inode uint64 Rdevice uint32 Offset int32 Encrypt_type int32 Encrypt_key_size int32 Flags int32 Name [64]int8 Encrypt_key [32]uint8 Init [2]uint64 Reserved [4]int8 _ [4]byte } type TIPCSubscr struct { Seq TIPCServiceRange Timeout uint32 Filter uint32 Handle [8]int8 } type TIPCSIOCLNReq struct { Peer uint32 Id uint32 Linkname [68]int8 } type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]int8 } type PPSKInfo struct { Assert_sequence uint32 Clear_sequence uint32 Assert_tu PPSKTime Clear_tu PPSKTime Current_mode int32 _ [4]byte } const ( PPS_GETPARAMS = 0x800870a1 PPS_SETPARAMS = 0x400870a2 PPS_GETCAP = 0x800870a3 PPS_FETCH = 0xc00870a4 ) const ( PIDFD_NONBLOCK = 0x800 ) type SysvIpcPerm struct { Key int32 Uid uint32 Gid uint32 Cuid uint32 Cgid uint32 Mode uint32 _ [0]uint8 Seq uint16 _ uint16 _ uint64 _ uint64 } type SysvShmDesc struct { Perm SysvIpcPerm Segsz uint64 Atime int64 Dtime int64 Ctime int64 Cpid int32 Lpid int32 Nattch uint64 _ uint64 _ uint64 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_linux_mips.go ================================================ // cgo -godefs -objdir=/tmp/mips/cgo -- -Wall -Werror -static -I/tmp/mips/include linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips && linux package unix const ( SizeofPtr = 0x4 SizeofLong = 0x4 ) type ( _C_long int32 ) 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 _ [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 Stat_t struct { Dev uint32 Pad1 [3]int32 Ino uint64 Mode uint32 Nlink uint32 Uid uint32 Gid uint32 Rdev uint32 Pad2 [3]int32 Size int64 Atim Timespec Mtim Timespec Ctim Timespec Blksize int32 Pad4 int32 Blocks int64 Pad5 [14]int32 } type Dirent struct { Ino uint64 Off int64 Reclen uint16 Type uint8 Name [256]int8 _ [5]byte } type Flock_t struct { Type int16 Whence int16 _ [4]byte Start int64 Len int64 Pid int32 _ [4]byte } type DmNameList struct { Dev uint64 Next uint32 Name [0]byte _ [4]byte } const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 ) type RawSockaddrNFCLLCP struct { Sa_family uint16 Dev_idx uint32 Target_idx uint32 Nfc_protocol uint32 Dsap uint8 Ssap uint8 Service_name [63]uint8 Service_name_len uint32 } type RawSockaddr struct { Family uint16 Data [14]int8 } type RawSockaddrAny struct { Addr RawSockaddr Pad [96]int8 } type Iovec struct { Base *byte Len 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 ifreq struct { Ifrn [16]byte Ifru [16]byte } const ( SizeofSockaddrNFCLLCP = 0x58 SizeofIovec = 0x8 SizeofMsghdr = 0x1c SizeofCmsghdr = 0xc ) const ( SizeofSockFprog = 0x8 ) type PtraceRegs struct { Regs [32]uint64 Lo uint64 Hi uint64 Epc uint64 Badvaddr uint64 Status uint64 Cause uint64 } 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 _ [8]int8 } type Ustat_t struct { Tfree int32 Tinode uint32 Fname [6]int8 Fpack [6]int8 } type EpollEvent struct { Events uint32 PadFd int32 Fd int32 Pad int32 } const ( OPEN_TREE_CLOEXEC = 0x80000 ) const ( POLLRDHUP = 0x2000 ) type Sigset_t struct { Val [32]uint32 } const _C__NSIG = 0x80 const ( SIG_BLOCK = 0x1 SIG_UNBLOCK = 0x2 SIG_SETMASK = 0x3 ) type Siginfo struct { Signo int32 Code int32 Errno int32 _ [116]byte } type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Line uint8 Cc [23]uint8 Ispeed uint32 Ospeed uint32 } type Taskstats struct { Version uint16 Ac_exitcode uint32 Ac_flag uint8 Ac_nice uint8 _ [4]byte Cpu_count uint64 Cpu_delay_total uint64 Blkio_count uint64 Blkio_delay_total uint64 Swapin_count uint64 Swapin_delay_total uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]int8 Ac_sched uint8 Ac_pad [3]uint8 _ [4]byte Ac_uid uint32 Ac_gid uint32 Ac_pid uint32 Ac_ppid uint32 Ac_btime uint32 _ [4]byte Ac_etime uint64 Ac_utime uint64 Ac_stime uint64 Ac_minflt uint64 Ac_majflt uint64 Coremem uint64 Virtmem uint64 Hiwater_rss uint64 Hiwater_vm uint64 Read_char uint64 Write_char uint64 Read_syscalls uint64 Write_syscalls uint64 Read_bytes uint64 Write_bytes uint64 Cancelled_write_bytes uint64 Nvcsw uint64 Nivcsw uint64 Ac_utimescaled uint64 Ac_stimescaled uint64 Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 Ac_tgid uint32 _ [4]byte Ac_tgetime uint64 Ac_exe_dev uint64 Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 Irq_count uint64 Irq_delay_total uint64 } type cpuMask uint32 const ( _NCPUBITS = 0x20 ) const ( CBitFieldMaskBit0 = 0x8000000000000000 CBitFieldMaskBit1 = 0x4000000000000000 CBitFieldMaskBit2 = 0x2000000000000000 CBitFieldMaskBit3 = 0x1000000000000000 CBitFieldMaskBit4 = 0x800000000000000 CBitFieldMaskBit5 = 0x400000000000000 CBitFieldMaskBit6 = 0x200000000000000 CBitFieldMaskBit7 = 0x100000000000000 CBitFieldMaskBit8 = 0x80000000000000 CBitFieldMaskBit9 = 0x40000000000000 CBitFieldMaskBit10 = 0x20000000000000 CBitFieldMaskBit11 = 0x10000000000000 CBitFieldMaskBit12 = 0x8000000000000 CBitFieldMaskBit13 = 0x4000000000000 CBitFieldMaskBit14 = 0x2000000000000 CBitFieldMaskBit15 = 0x1000000000000 CBitFieldMaskBit16 = 0x800000000000 CBitFieldMaskBit17 = 0x400000000000 CBitFieldMaskBit18 = 0x200000000000 CBitFieldMaskBit19 = 0x100000000000 CBitFieldMaskBit20 = 0x80000000000 CBitFieldMaskBit21 = 0x40000000000 CBitFieldMaskBit22 = 0x20000000000 CBitFieldMaskBit23 = 0x10000000000 CBitFieldMaskBit24 = 0x8000000000 CBitFieldMaskBit25 = 0x4000000000 CBitFieldMaskBit26 = 0x2000000000 CBitFieldMaskBit27 = 0x1000000000 CBitFieldMaskBit28 = 0x800000000 CBitFieldMaskBit29 = 0x400000000 CBitFieldMaskBit30 = 0x200000000 CBitFieldMaskBit31 = 0x100000000 CBitFieldMaskBit32 = 0x80000000 CBitFieldMaskBit33 = 0x40000000 CBitFieldMaskBit34 = 0x20000000 CBitFieldMaskBit35 = 0x10000000 CBitFieldMaskBit36 = 0x8000000 CBitFieldMaskBit37 = 0x4000000 CBitFieldMaskBit38 = 0x2000000 CBitFieldMaskBit39 = 0x1000000 CBitFieldMaskBit40 = 0x800000 CBitFieldMaskBit41 = 0x400000 CBitFieldMaskBit42 = 0x200000 CBitFieldMaskBit43 = 0x100000 CBitFieldMaskBit44 = 0x80000 CBitFieldMaskBit45 = 0x40000 CBitFieldMaskBit46 = 0x20000 CBitFieldMaskBit47 = 0x10000 CBitFieldMaskBit48 = 0x8000 CBitFieldMaskBit49 = 0x4000 CBitFieldMaskBit50 = 0x2000 CBitFieldMaskBit51 = 0x1000 CBitFieldMaskBit52 = 0x800 CBitFieldMaskBit53 = 0x400 CBitFieldMaskBit54 = 0x200 CBitFieldMaskBit55 = 0x100 CBitFieldMaskBit56 = 0x80 CBitFieldMaskBit57 = 0x40 CBitFieldMaskBit58 = 0x20 CBitFieldMaskBit59 = 0x10 CBitFieldMaskBit60 = 0x8 CBitFieldMaskBit61 = 0x4 CBitFieldMaskBit62 = 0x2 CBitFieldMaskBit63 = 0x1 ) type SockaddrStorage struct { Family uint16 Data [122]byte _ uint32 } type HDGeometry struct { Heads uint8 Sectors uint8 Cylinders uint16 Start uint32 } type Statfs_t struct { Type int32 Bsize int32 Frsize int32 _ [4]byte Blocks uint64 Bfree uint64 Files uint64 Ffree uint64 Bavail uint64 Fsid Fsid Namelen int32 Flags int32 Spare [5]int32 _ [4]byte } type TpacketHdr struct { Status uint32 Len uint32 Snaplen uint32 Mac uint16 Net uint16 Sec uint32 Usec uint32 } const ( SizeofTpacketHdr = 0x18 ) type RTCPLLInfo struct { Ctrl int32 Value int32 Max int32 Min int32 Posmult int32 Negmult int32 Clock int32 } type BlkpgPartition struct { Start int64 Length int64 Pno int32 Devname [64]uint8 Volname [64]uint8 _ [4]byte } const ( BLKPG = 0x20001269 ) type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 Module_name [64]int8 Type uint32 Mask uint32 Refcnt uint32 Flags uint32 } type CryptoStatAEAD struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatAKCipher struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Verify_cnt uint64 Sign_cnt uint64 Err_cnt uint64 } type CryptoStatCipher struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatCompress struct { Type [64]int8 Compress_cnt uint64 Compress_tlen uint64 Decompress_cnt uint64 Decompress_tlen uint64 Err_cnt uint64 } type CryptoStatHash struct { Type [64]int8 Hash_cnt uint64 Hash_tlen uint64 Err_cnt uint64 } type CryptoStatKPP struct { Type [64]int8 Setsecret_cnt uint64 Generate_public_key_cnt uint64 Compute_shared_secret_cnt uint64 Err_cnt uint64 } type CryptoStatRNG struct { Type [64]int8 Generate_cnt uint64 Generate_tlen uint64 Seed_cnt uint64 Err_cnt uint64 } type CryptoStatLarval struct { Type [64]int8 } type CryptoReportLarval struct { Type [64]int8 } type CryptoReportHash struct { Type [64]int8 Blocksize uint32 Digestsize uint32 } type CryptoReportCipher struct { Type [64]int8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 } type CryptoReportBlkCipher struct { Type [64]int8 Geniv [64]int8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 Ivsize uint32 } type CryptoReportAEAD struct { Type [64]int8 Geniv [64]int8 Blocksize uint32 Maxauthsize uint32 Ivsize uint32 } type CryptoReportComp struct { Type [64]int8 } type CryptoReportRNG struct { Type [64]int8 Seedsize uint32 } type CryptoReportAKCipher struct { Type [64]int8 } type CryptoReportKPP struct { Type [64]int8 } type CryptoReportAcomp struct { Type [64]int8 } type LoopInfo struct { Number int32 Device uint32 Inode uint32 Rdevice uint32 Offset int32 Encrypt_type int32 Encrypt_key_size int32 Flags int32 Name [64]int8 Encrypt_key [32]uint8 Init [2]uint32 Reserved [4]int8 } type TIPCSubscr struct { Seq TIPCServiceRange Timeout uint32 Filter uint32 Handle [8]int8 } type TIPCSIOCLNReq struct { Peer uint32 Id uint32 Linkname [68]int8 } type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]int8 } type PPSKInfo struct { Assert_sequence uint32 Clear_sequence uint32 Assert_tu PPSKTime Clear_tu PPSKTime Current_mode int32 _ [4]byte } const ( PPS_GETPARAMS = 0x400470a1 PPS_SETPARAMS = 0x800470a2 PPS_GETCAP = 0x400470a3 PPS_FETCH = 0xc00470a4 ) const ( PIDFD_NONBLOCK = 0x80 ) type SysvIpcPerm struct { Key int32 Uid uint32 Gid uint32 Cuid uint32 Cgid uint32 Mode uint32 _ [0]uint8 Seq uint16 _ uint16 _ uint32 _ uint32 } type SysvShmDesc struct { Perm SysvIpcPerm Segsz uint32 Atime uint32 Dtime uint32 Ctime uint32 Cpid int32 Lpid int32 Nattch uint32 Atime_high uint16 Dtime_high uint16 Ctime_high uint16 _ uint16 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go ================================================ // cgo -godefs -objdir=/tmp/mips64/cgo -- -Wall -Werror -static -I/tmp/mips64/include linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64 && linux package unix const ( SizeofPtr = 0x8 SizeofLong = 0x8 ) type ( _C_long int64 ) type Timespec struct { Sec int64 Nsec int64 } type Timeval struct { Sec int64 Usec int64 } type Timex struct { Modes uint32 Offset int64 Freq int64 Maxerror int64 Esterror int64 Status int32 Constant int64 Precision int64 Tolerance int64 Time Timeval Tick int64 Ppsfreq int64 Jitter int64 Shift int32 Stabil int64 Jitcnt int64 Calcnt int64 Errcnt int64 Stbcnt int64 Tai int32 _ [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 Stat_t struct { Dev uint32 Pad1 [3]uint32 Ino uint64 Mode uint32 Nlink uint32 Uid uint32 Gid uint32 Rdev uint32 Pad2 [3]uint32 Size int64 Atim Timespec Mtim Timespec Ctim Timespec Blksize uint32 Pad4 uint32 Blocks int64 } type Dirent struct { Ino uint64 Off int64 Reclen uint16 Type uint8 Name [256]int8 _ [5]byte } type Flock_t struct { Type int16 Whence int16 Start int64 Len int64 Pid int32 _ [4]byte } type DmNameList struct { Dev uint64 Next uint32 Name [0]byte _ [4]byte } const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 ) type RawSockaddrNFCLLCP struct { Sa_family uint16 Dev_idx uint32 Target_idx uint32 Nfc_protocol uint32 Dsap uint8 Ssap uint8 Service_name [63]uint8 Service_name_len uint64 } type RawSockaddr struct { Family uint16 Data [14]int8 } type RawSockaddrAny struct { Addr RawSockaddr Pad [96]int8 } type Iovec struct { Base *byte Len uint64 } type Msghdr struct { Name *byte Namelen uint32 Iov *Iovec Iovlen uint64 Control *byte Controllen uint64 Flags int32 _ [4]byte } type Cmsghdr struct { Len uint64 Level int32 Type int32 } type ifreq struct { Ifrn [16]byte Ifru [24]byte } const ( SizeofSockaddrNFCLLCP = 0x60 SizeofIovec = 0x10 SizeofMsghdr = 0x38 SizeofCmsghdr = 0x10 ) const ( SizeofSockFprog = 0x10 ) type PtraceRegs struct { Regs [32]uint64 Lo uint64 Hi uint64 Epc uint64 Badvaddr uint64 Status uint64 Cause 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 Totalhigh uint64 Freehigh uint64 Unit uint32 _ [0]int8 _ [4]byte } type Ustat_t struct { Tfree int32 Tinode uint64 Fname [6]int8 Fpack [6]int8 _ [4]byte } type EpollEvent struct { Events uint32 _ int32 Fd int32 Pad int32 } const ( OPEN_TREE_CLOEXEC = 0x80000 ) const ( POLLRDHUP = 0x2000 ) type Sigset_t struct { Val [16]uint64 } const _C__NSIG = 0x80 const ( SIG_BLOCK = 0x1 SIG_UNBLOCK = 0x2 SIG_SETMASK = 0x3 ) type Siginfo struct { Signo int32 Code int32 Errno int32 _ int32 _ [112]byte } type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Line uint8 Cc [23]uint8 Ispeed uint32 Ospeed uint32 } type Taskstats struct { Version uint16 Ac_exitcode uint32 Ac_flag uint8 Ac_nice uint8 Cpu_count uint64 Cpu_delay_total uint64 Blkio_count uint64 Blkio_delay_total uint64 Swapin_count uint64 Swapin_delay_total uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]int8 Ac_sched uint8 Ac_pad [3]uint8 _ [4]byte Ac_uid uint32 Ac_gid uint32 Ac_pid uint32 Ac_ppid uint32 Ac_btime uint32 Ac_etime uint64 Ac_utime uint64 Ac_stime uint64 Ac_minflt uint64 Ac_majflt uint64 Coremem uint64 Virtmem uint64 Hiwater_rss uint64 Hiwater_vm uint64 Read_char uint64 Write_char uint64 Read_syscalls uint64 Write_syscalls uint64 Read_bytes uint64 Write_bytes uint64 Cancelled_write_bytes uint64 Nvcsw uint64 Nivcsw uint64 Ac_utimescaled uint64 Ac_stimescaled uint64 Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 Ac_tgid uint32 Ac_tgetime uint64 Ac_exe_dev uint64 Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 Irq_count uint64 Irq_delay_total uint64 } type cpuMask uint64 const ( _NCPUBITS = 0x40 ) const ( CBitFieldMaskBit0 = 0x8000000000000000 CBitFieldMaskBit1 = 0x4000000000000000 CBitFieldMaskBit2 = 0x2000000000000000 CBitFieldMaskBit3 = 0x1000000000000000 CBitFieldMaskBit4 = 0x800000000000000 CBitFieldMaskBit5 = 0x400000000000000 CBitFieldMaskBit6 = 0x200000000000000 CBitFieldMaskBit7 = 0x100000000000000 CBitFieldMaskBit8 = 0x80000000000000 CBitFieldMaskBit9 = 0x40000000000000 CBitFieldMaskBit10 = 0x20000000000000 CBitFieldMaskBit11 = 0x10000000000000 CBitFieldMaskBit12 = 0x8000000000000 CBitFieldMaskBit13 = 0x4000000000000 CBitFieldMaskBit14 = 0x2000000000000 CBitFieldMaskBit15 = 0x1000000000000 CBitFieldMaskBit16 = 0x800000000000 CBitFieldMaskBit17 = 0x400000000000 CBitFieldMaskBit18 = 0x200000000000 CBitFieldMaskBit19 = 0x100000000000 CBitFieldMaskBit20 = 0x80000000000 CBitFieldMaskBit21 = 0x40000000000 CBitFieldMaskBit22 = 0x20000000000 CBitFieldMaskBit23 = 0x10000000000 CBitFieldMaskBit24 = 0x8000000000 CBitFieldMaskBit25 = 0x4000000000 CBitFieldMaskBit26 = 0x2000000000 CBitFieldMaskBit27 = 0x1000000000 CBitFieldMaskBit28 = 0x800000000 CBitFieldMaskBit29 = 0x400000000 CBitFieldMaskBit30 = 0x200000000 CBitFieldMaskBit31 = 0x100000000 CBitFieldMaskBit32 = 0x80000000 CBitFieldMaskBit33 = 0x40000000 CBitFieldMaskBit34 = 0x20000000 CBitFieldMaskBit35 = 0x10000000 CBitFieldMaskBit36 = 0x8000000 CBitFieldMaskBit37 = 0x4000000 CBitFieldMaskBit38 = 0x2000000 CBitFieldMaskBit39 = 0x1000000 CBitFieldMaskBit40 = 0x800000 CBitFieldMaskBit41 = 0x400000 CBitFieldMaskBit42 = 0x200000 CBitFieldMaskBit43 = 0x100000 CBitFieldMaskBit44 = 0x80000 CBitFieldMaskBit45 = 0x40000 CBitFieldMaskBit46 = 0x20000 CBitFieldMaskBit47 = 0x10000 CBitFieldMaskBit48 = 0x8000 CBitFieldMaskBit49 = 0x4000 CBitFieldMaskBit50 = 0x2000 CBitFieldMaskBit51 = 0x1000 CBitFieldMaskBit52 = 0x800 CBitFieldMaskBit53 = 0x400 CBitFieldMaskBit54 = 0x200 CBitFieldMaskBit55 = 0x100 CBitFieldMaskBit56 = 0x80 CBitFieldMaskBit57 = 0x40 CBitFieldMaskBit58 = 0x20 CBitFieldMaskBit59 = 0x10 CBitFieldMaskBit60 = 0x8 CBitFieldMaskBit61 = 0x4 CBitFieldMaskBit62 = 0x2 CBitFieldMaskBit63 = 0x1 ) type SockaddrStorage struct { Family uint16 Data [118]byte _ uint64 } type HDGeometry struct { Heads uint8 Sectors uint8 Cylinders uint16 Start uint64 } type Statfs_t struct { Type int64 Bsize int64 Frsize int64 Blocks uint64 Bfree uint64 Files uint64 Ffree uint64 Bavail uint64 Fsid Fsid Namelen int64 Flags int64 Spare [5]int64 } type TpacketHdr struct { Status uint64 Len uint32 Snaplen uint32 Mac uint16 Net uint16 Sec uint32 Usec uint32 _ [4]byte } const ( SizeofTpacketHdr = 0x20 ) type RTCPLLInfo struct { Ctrl int32 Value int32 Max int32 Min int32 Posmult int32 Negmult int32 Clock int64 } type BlkpgPartition struct { Start int64 Length int64 Pno int32 Devname [64]uint8 Volname [64]uint8 _ [4]byte } const ( BLKPG = 0x20001269 ) type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 Module_name [64]int8 Type uint32 Mask uint32 Refcnt uint32 Flags uint32 } type CryptoStatAEAD struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatAKCipher struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Verify_cnt uint64 Sign_cnt uint64 Err_cnt uint64 } type CryptoStatCipher struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatCompress struct { Type [64]int8 Compress_cnt uint64 Compress_tlen uint64 Decompress_cnt uint64 Decompress_tlen uint64 Err_cnt uint64 } type CryptoStatHash struct { Type [64]int8 Hash_cnt uint64 Hash_tlen uint64 Err_cnt uint64 } type CryptoStatKPP struct { Type [64]int8 Setsecret_cnt uint64 Generate_public_key_cnt uint64 Compute_shared_secret_cnt uint64 Err_cnt uint64 } type CryptoStatRNG struct { Type [64]int8 Generate_cnt uint64 Generate_tlen uint64 Seed_cnt uint64 Err_cnt uint64 } type CryptoStatLarval struct { Type [64]int8 } type CryptoReportLarval struct { Type [64]int8 } type CryptoReportHash struct { Type [64]int8 Blocksize uint32 Digestsize uint32 } type CryptoReportCipher struct { Type [64]int8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 } type CryptoReportBlkCipher struct { Type [64]int8 Geniv [64]int8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 Ivsize uint32 } type CryptoReportAEAD struct { Type [64]int8 Geniv [64]int8 Blocksize uint32 Maxauthsize uint32 Ivsize uint32 } type CryptoReportComp struct { Type [64]int8 } type CryptoReportRNG struct { Type [64]int8 Seedsize uint32 } type CryptoReportAKCipher struct { Type [64]int8 } type CryptoReportKPP struct { Type [64]int8 } type CryptoReportAcomp struct { Type [64]int8 } type LoopInfo struct { Number int32 Device uint32 Inode uint64 Rdevice uint32 Offset int32 Encrypt_type int32 Encrypt_key_size int32 Flags int32 Name [64]int8 Encrypt_key [32]uint8 Init [2]uint64 Reserved [4]int8 _ [4]byte } type TIPCSubscr struct { Seq TIPCServiceRange Timeout uint32 Filter uint32 Handle [8]int8 } type TIPCSIOCLNReq struct { Peer uint32 Id uint32 Linkname [68]int8 } type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]int8 } type PPSKInfo struct { Assert_sequence uint32 Clear_sequence uint32 Assert_tu PPSKTime Clear_tu PPSKTime Current_mode int32 _ [4]byte } const ( PPS_GETPARAMS = 0x400870a1 PPS_SETPARAMS = 0x800870a2 PPS_GETCAP = 0x400870a3 PPS_FETCH = 0xc00870a4 ) const ( PIDFD_NONBLOCK = 0x80 ) type SysvIpcPerm struct { Key int32 Uid uint32 Gid uint32 Cuid uint32 Cgid uint32 Mode uint32 _ [0]uint8 Seq uint16 _ uint16 _ uint64 _ uint64 } type SysvShmDesc struct { Perm SysvIpcPerm Segsz uint64 Atime int64 Dtime int64 Ctime int64 Cpid int32 Lpid int32 Nattch uint64 _ uint64 _ uint64 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go ================================================ // cgo -godefs -objdir=/tmp/mips64le/cgo -- -Wall -Werror -static -I/tmp/mips64le/include linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64le && linux package unix const ( SizeofPtr = 0x8 SizeofLong = 0x8 ) type ( _C_long int64 ) type Timespec struct { Sec int64 Nsec int64 } type Timeval struct { Sec int64 Usec int64 } type Timex struct { Modes uint32 Offset int64 Freq int64 Maxerror int64 Esterror int64 Status int32 Constant int64 Precision int64 Tolerance int64 Time Timeval Tick int64 Ppsfreq int64 Jitter int64 Shift int32 Stabil int64 Jitcnt int64 Calcnt int64 Errcnt int64 Stbcnt int64 Tai int32 _ [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 Stat_t struct { Dev uint32 Pad1 [3]uint32 Ino uint64 Mode uint32 Nlink uint32 Uid uint32 Gid uint32 Rdev uint32 Pad2 [3]uint32 Size int64 Atim Timespec Mtim Timespec Ctim Timespec Blksize uint32 Pad4 uint32 Blocks int64 } type Dirent struct { Ino uint64 Off int64 Reclen uint16 Type uint8 Name [256]int8 _ [5]byte } type Flock_t struct { Type int16 Whence int16 Start int64 Len int64 Pid int32 _ [4]byte } type DmNameList struct { Dev uint64 Next uint32 Name [0]byte _ [4]byte } const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 ) type RawSockaddrNFCLLCP struct { Sa_family uint16 Dev_idx uint32 Target_idx uint32 Nfc_protocol uint32 Dsap uint8 Ssap uint8 Service_name [63]uint8 Service_name_len uint64 } type RawSockaddr struct { Family uint16 Data [14]int8 } type RawSockaddrAny struct { Addr RawSockaddr Pad [96]int8 } type Iovec struct { Base *byte Len uint64 } type Msghdr struct { Name *byte Namelen uint32 Iov *Iovec Iovlen uint64 Control *byte Controllen uint64 Flags int32 _ [4]byte } type Cmsghdr struct { Len uint64 Level int32 Type int32 } type ifreq struct { Ifrn [16]byte Ifru [24]byte } const ( SizeofSockaddrNFCLLCP = 0x60 SizeofIovec = 0x10 SizeofMsghdr = 0x38 SizeofCmsghdr = 0x10 ) const ( SizeofSockFprog = 0x10 ) type PtraceRegs struct { Regs [32]uint64 Lo uint64 Hi uint64 Epc uint64 Badvaddr uint64 Status uint64 Cause 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 Totalhigh uint64 Freehigh uint64 Unit uint32 _ [0]int8 _ [4]byte } type Ustat_t struct { Tfree int32 Tinode uint64 Fname [6]int8 Fpack [6]int8 _ [4]byte } type EpollEvent struct { Events uint32 _ int32 Fd int32 Pad int32 } const ( OPEN_TREE_CLOEXEC = 0x80000 ) const ( POLLRDHUP = 0x2000 ) type Sigset_t struct { Val [16]uint64 } const _C__NSIG = 0x80 const ( SIG_BLOCK = 0x1 SIG_UNBLOCK = 0x2 SIG_SETMASK = 0x3 ) type Siginfo struct { Signo int32 Code int32 Errno int32 _ int32 _ [112]byte } type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Line uint8 Cc [23]uint8 Ispeed uint32 Ospeed uint32 } type Taskstats struct { Version uint16 Ac_exitcode uint32 Ac_flag uint8 Ac_nice uint8 Cpu_count uint64 Cpu_delay_total uint64 Blkio_count uint64 Blkio_delay_total uint64 Swapin_count uint64 Swapin_delay_total uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]int8 Ac_sched uint8 Ac_pad [3]uint8 _ [4]byte Ac_uid uint32 Ac_gid uint32 Ac_pid uint32 Ac_ppid uint32 Ac_btime uint32 Ac_etime uint64 Ac_utime uint64 Ac_stime uint64 Ac_minflt uint64 Ac_majflt uint64 Coremem uint64 Virtmem uint64 Hiwater_rss uint64 Hiwater_vm uint64 Read_char uint64 Write_char uint64 Read_syscalls uint64 Write_syscalls uint64 Read_bytes uint64 Write_bytes uint64 Cancelled_write_bytes uint64 Nvcsw uint64 Nivcsw uint64 Ac_utimescaled uint64 Ac_stimescaled uint64 Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 Ac_tgid uint32 Ac_tgetime uint64 Ac_exe_dev uint64 Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 Irq_count uint64 Irq_delay_total uint64 } type cpuMask uint64 const ( _NCPUBITS = 0x40 ) const ( CBitFieldMaskBit0 = 0x1 CBitFieldMaskBit1 = 0x2 CBitFieldMaskBit2 = 0x4 CBitFieldMaskBit3 = 0x8 CBitFieldMaskBit4 = 0x10 CBitFieldMaskBit5 = 0x20 CBitFieldMaskBit6 = 0x40 CBitFieldMaskBit7 = 0x80 CBitFieldMaskBit8 = 0x100 CBitFieldMaskBit9 = 0x200 CBitFieldMaskBit10 = 0x400 CBitFieldMaskBit11 = 0x800 CBitFieldMaskBit12 = 0x1000 CBitFieldMaskBit13 = 0x2000 CBitFieldMaskBit14 = 0x4000 CBitFieldMaskBit15 = 0x8000 CBitFieldMaskBit16 = 0x10000 CBitFieldMaskBit17 = 0x20000 CBitFieldMaskBit18 = 0x40000 CBitFieldMaskBit19 = 0x80000 CBitFieldMaskBit20 = 0x100000 CBitFieldMaskBit21 = 0x200000 CBitFieldMaskBit22 = 0x400000 CBitFieldMaskBit23 = 0x800000 CBitFieldMaskBit24 = 0x1000000 CBitFieldMaskBit25 = 0x2000000 CBitFieldMaskBit26 = 0x4000000 CBitFieldMaskBit27 = 0x8000000 CBitFieldMaskBit28 = 0x10000000 CBitFieldMaskBit29 = 0x20000000 CBitFieldMaskBit30 = 0x40000000 CBitFieldMaskBit31 = 0x80000000 CBitFieldMaskBit32 = 0x100000000 CBitFieldMaskBit33 = 0x200000000 CBitFieldMaskBit34 = 0x400000000 CBitFieldMaskBit35 = 0x800000000 CBitFieldMaskBit36 = 0x1000000000 CBitFieldMaskBit37 = 0x2000000000 CBitFieldMaskBit38 = 0x4000000000 CBitFieldMaskBit39 = 0x8000000000 CBitFieldMaskBit40 = 0x10000000000 CBitFieldMaskBit41 = 0x20000000000 CBitFieldMaskBit42 = 0x40000000000 CBitFieldMaskBit43 = 0x80000000000 CBitFieldMaskBit44 = 0x100000000000 CBitFieldMaskBit45 = 0x200000000000 CBitFieldMaskBit46 = 0x400000000000 CBitFieldMaskBit47 = 0x800000000000 CBitFieldMaskBit48 = 0x1000000000000 CBitFieldMaskBit49 = 0x2000000000000 CBitFieldMaskBit50 = 0x4000000000000 CBitFieldMaskBit51 = 0x8000000000000 CBitFieldMaskBit52 = 0x10000000000000 CBitFieldMaskBit53 = 0x20000000000000 CBitFieldMaskBit54 = 0x40000000000000 CBitFieldMaskBit55 = 0x80000000000000 CBitFieldMaskBit56 = 0x100000000000000 CBitFieldMaskBit57 = 0x200000000000000 CBitFieldMaskBit58 = 0x400000000000000 CBitFieldMaskBit59 = 0x800000000000000 CBitFieldMaskBit60 = 0x1000000000000000 CBitFieldMaskBit61 = 0x2000000000000000 CBitFieldMaskBit62 = 0x4000000000000000 CBitFieldMaskBit63 = 0x8000000000000000 ) type SockaddrStorage struct { Family uint16 Data [118]byte _ uint64 } type HDGeometry struct { Heads uint8 Sectors uint8 Cylinders uint16 Start uint64 } type Statfs_t struct { Type int64 Bsize int64 Frsize int64 Blocks uint64 Bfree uint64 Files uint64 Ffree uint64 Bavail uint64 Fsid Fsid Namelen int64 Flags int64 Spare [5]int64 } type TpacketHdr struct { Status uint64 Len uint32 Snaplen uint32 Mac uint16 Net uint16 Sec uint32 Usec uint32 _ [4]byte } const ( SizeofTpacketHdr = 0x20 ) type RTCPLLInfo struct { Ctrl int32 Value int32 Max int32 Min int32 Posmult int32 Negmult int32 Clock int64 } type BlkpgPartition struct { Start int64 Length int64 Pno int32 Devname [64]uint8 Volname [64]uint8 _ [4]byte } const ( BLKPG = 0x20001269 ) type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 Module_name [64]int8 Type uint32 Mask uint32 Refcnt uint32 Flags uint32 } type CryptoStatAEAD struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatAKCipher struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Verify_cnt uint64 Sign_cnt uint64 Err_cnt uint64 } type CryptoStatCipher struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatCompress struct { Type [64]int8 Compress_cnt uint64 Compress_tlen uint64 Decompress_cnt uint64 Decompress_tlen uint64 Err_cnt uint64 } type CryptoStatHash struct { Type [64]int8 Hash_cnt uint64 Hash_tlen uint64 Err_cnt uint64 } type CryptoStatKPP struct { Type [64]int8 Setsecret_cnt uint64 Generate_public_key_cnt uint64 Compute_shared_secret_cnt uint64 Err_cnt uint64 } type CryptoStatRNG struct { Type [64]int8 Generate_cnt uint64 Generate_tlen uint64 Seed_cnt uint64 Err_cnt uint64 } type CryptoStatLarval struct { Type [64]int8 } type CryptoReportLarval struct { Type [64]int8 } type CryptoReportHash struct { Type [64]int8 Blocksize uint32 Digestsize uint32 } type CryptoReportCipher struct { Type [64]int8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 } type CryptoReportBlkCipher struct { Type [64]int8 Geniv [64]int8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 Ivsize uint32 } type CryptoReportAEAD struct { Type [64]int8 Geniv [64]int8 Blocksize uint32 Maxauthsize uint32 Ivsize uint32 } type CryptoReportComp struct { Type [64]int8 } type CryptoReportRNG struct { Type [64]int8 Seedsize uint32 } type CryptoReportAKCipher struct { Type [64]int8 } type CryptoReportKPP struct { Type [64]int8 } type CryptoReportAcomp struct { Type [64]int8 } type LoopInfo struct { Number int32 Device uint32 Inode uint64 Rdevice uint32 Offset int32 Encrypt_type int32 Encrypt_key_size int32 Flags int32 Name [64]int8 Encrypt_key [32]uint8 Init [2]uint64 Reserved [4]int8 _ [4]byte } type TIPCSubscr struct { Seq TIPCServiceRange Timeout uint32 Filter uint32 Handle [8]int8 } type TIPCSIOCLNReq struct { Peer uint32 Id uint32 Linkname [68]int8 } type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]int8 } type PPSKInfo struct { Assert_sequence uint32 Clear_sequence uint32 Assert_tu PPSKTime Clear_tu PPSKTime Current_mode int32 _ [4]byte } const ( PPS_GETPARAMS = 0x400870a1 PPS_SETPARAMS = 0x800870a2 PPS_GETCAP = 0x400870a3 PPS_FETCH = 0xc00870a4 ) const ( PIDFD_NONBLOCK = 0x80 ) type SysvIpcPerm struct { Key int32 Uid uint32 Gid uint32 Cuid uint32 Cgid uint32 Mode uint32 _ [0]uint8 Seq uint16 _ uint16 _ uint64 _ uint64 } type SysvShmDesc struct { Perm SysvIpcPerm Segsz uint64 Atime int64 Dtime int64 Ctime int64 Cpid int32 Lpid int32 Nattch uint64 _ uint64 _ uint64 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go ================================================ // cgo -godefs -objdir=/tmp/mipsle/cgo -- -Wall -Werror -static -I/tmp/mipsle/include linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mipsle && linux package unix const ( SizeofPtr = 0x4 SizeofLong = 0x4 ) type ( _C_long int32 ) 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 _ [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 Stat_t struct { Dev uint32 Pad1 [3]int32 Ino uint64 Mode uint32 Nlink uint32 Uid uint32 Gid uint32 Rdev uint32 Pad2 [3]int32 Size int64 Atim Timespec Mtim Timespec Ctim Timespec Blksize int32 Pad4 int32 Blocks int64 Pad5 [14]int32 } type Dirent struct { Ino uint64 Off int64 Reclen uint16 Type uint8 Name [256]int8 _ [5]byte } type Flock_t struct { Type int16 Whence int16 _ [4]byte Start int64 Len int64 Pid int32 _ [4]byte } type DmNameList struct { Dev uint64 Next uint32 Name [0]byte _ [4]byte } const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 ) type RawSockaddrNFCLLCP struct { Sa_family uint16 Dev_idx uint32 Target_idx uint32 Nfc_protocol uint32 Dsap uint8 Ssap uint8 Service_name [63]uint8 Service_name_len uint32 } type RawSockaddr struct { Family uint16 Data [14]int8 } type RawSockaddrAny struct { Addr RawSockaddr Pad [96]int8 } type Iovec struct { Base *byte Len 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 ifreq struct { Ifrn [16]byte Ifru [16]byte } const ( SizeofSockaddrNFCLLCP = 0x58 SizeofIovec = 0x8 SizeofMsghdr = 0x1c SizeofCmsghdr = 0xc ) const ( SizeofSockFprog = 0x8 ) type PtraceRegs struct { Regs [32]uint64 Lo uint64 Hi uint64 Epc uint64 Badvaddr uint64 Status uint64 Cause uint64 } 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 _ [8]int8 } type Ustat_t struct { Tfree int32 Tinode uint32 Fname [6]int8 Fpack [6]int8 } type EpollEvent struct { Events uint32 PadFd int32 Fd int32 Pad int32 } const ( OPEN_TREE_CLOEXEC = 0x80000 ) const ( POLLRDHUP = 0x2000 ) type Sigset_t struct { Val [32]uint32 } const _C__NSIG = 0x80 const ( SIG_BLOCK = 0x1 SIG_UNBLOCK = 0x2 SIG_SETMASK = 0x3 ) type Siginfo struct { Signo int32 Code int32 Errno int32 _ [116]byte } type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Line uint8 Cc [23]uint8 Ispeed uint32 Ospeed uint32 } type Taskstats struct { Version uint16 Ac_exitcode uint32 Ac_flag uint8 Ac_nice uint8 _ [4]byte Cpu_count uint64 Cpu_delay_total uint64 Blkio_count uint64 Blkio_delay_total uint64 Swapin_count uint64 Swapin_delay_total uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]int8 Ac_sched uint8 Ac_pad [3]uint8 _ [4]byte Ac_uid uint32 Ac_gid uint32 Ac_pid uint32 Ac_ppid uint32 Ac_btime uint32 _ [4]byte Ac_etime uint64 Ac_utime uint64 Ac_stime uint64 Ac_minflt uint64 Ac_majflt uint64 Coremem uint64 Virtmem uint64 Hiwater_rss uint64 Hiwater_vm uint64 Read_char uint64 Write_char uint64 Read_syscalls uint64 Write_syscalls uint64 Read_bytes uint64 Write_bytes uint64 Cancelled_write_bytes uint64 Nvcsw uint64 Nivcsw uint64 Ac_utimescaled uint64 Ac_stimescaled uint64 Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 Ac_tgid uint32 _ [4]byte Ac_tgetime uint64 Ac_exe_dev uint64 Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 Irq_count uint64 Irq_delay_total uint64 } type cpuMask uint32 const ( _NCPUBITS = 0x20 ) const ( CBitFieldMaskBit0 = 0x1 CBitFieldMaskBit1 = 0x2 CBitFieldMaskBit2 = 0x4 CBitFieldMaskBit3 = 0x8 CBitFieldMaskBit4 = 0x10 CBitFieldMaskBit5 = 0x20 CBitFieldMaskBit6 = 0x40 CBitFieldMaskBit7 = 0x80 CBitFieldMaskBit8 = 0x100 CBitFieldMaskBit9 = 0x200 CBitFieldMaskBit10 = 0x400 CBitFieldMaskBit11 = 0x800 CBitFieldMaskBit12 = 0x1000 CBitFieldMaskBit13 = 0x2000 CBitFieldMaskBit14 = 0x4000 CBitFieldMaskBit15 = 0x8000 CBitFieldMaskBit16 = 0x10000 CBitFieldMaskBit17 = 0x20000 CBitFieldMaskBit18 = 0x40000 CBitFieldMaskBit19 = 0x80000 CBitFieldMaskBit20 = 0x100000 CBitFieldMaskBit21 = 0x200000 CBitFieldMaskBit22 = 0x400000 CBitFieldMaskBit23 = 0x800000 CBitFieldMaskBit24 = 0x1000000 CBitFieldMaskBit25 = 0x2000000 CBitFieldMaskBit26 = 0x4000000 CBitFieldMaskBit27 = 0x8000000 CBitFieldMaskBit28 = 0x10000000 CBitFieldMaskBit29 = 0x20000000 CBitFieldMaskBit30 = 0x40000000 CBitFieldMaskBit31 = 0x80000000 CBitFieldMaskBit32 = 0x100000000 CBitFieldMaskBit33 = 0x200000000 CBitFieldMaskBit34 = 0x400000000 CBitFieldMaskBit35 = 0x800000000 CBitFieldMaskBit36 = 0x1000000000 CBitFieldMaskBit37 = 0x2000000000 CBitFieldMaskBit38 = 0x4000000000 CBitFieldMaskBit39 = 0x8000000000 CBitFieldMaskBit40 = 0x10000000000 CBitFieldMaskBit41 = 0x20000000000 CBitFieldMaskBit42 = 0x40000000000 CBitFieldMaskBit43 = 0x80000000000 CBitFieldMaskBit44 = 0x100000000000 CBitFieldMaskBit45 = 0x200000000000 CBitFieldMaskBit46 = 0x400000000000 CBitFieldMaskBit47 = 0x800000000000 CBitFieldMaskBit48 = 0x1000000000000 CBitFieldMaskBit49 = 0x2000000000000 CBitFieldMaskBit50 = 0x4000000000000 CBitFieldMaskBit51 = 0x8000000000000 CBitFieldMaskBit52 = 0x10000000000000 CBitFieldMaskBit53 = 0x20000000000000 CBitFieldMaskBit54 = 0x40000000000000 CBitFieldMaskBit55 = 0x80000000000000 CBitFieldMaskBit56 = 0x100000000000000 CBitFieldMaskBit57 = 0x200000000000000 CBitFieldMaskBit58 = 0x400000000000000 CBitFieldMaskBit59 = 0x800000000000000 CBitFieldMaskBit60 = 0x1000000000000000 CBitFieldMaskBit61 = 0x2000000000000000 CBitFieldMaskBit62 = 0x4000000000000000 CBitFieldMaskBit63 = 0x8000000000000000 ) type SockaddrStorage struct { Family uint16 Data [122]byte _ uint32 } type HDGeometry struct { Heads uint8 Sectors uint8 Cylinders uint16 Start uint32 } type Statfs_t struct { Type int32 Bsize int32 Frsize int32 _ [4]byte Blocks uint64 Bfree uint64 Files uint64 Ffree uint64 Bavail uint64 Fsid Fsid Namelen int32 Flags int32 Spare [5]int32 _ [4]byte } type TpacketHdr struct { Status uint32 Len uint32 Snaplen uint32 Mac uint16 Net uint16 Sec uint32 Usec uint32 } const ( SizeofTpacketHdr = 0x18 ) type RTCPLLInfo struct { Ctrl int32 Value int32 Max int32 Min int32 Posmult int32 Negmult int32 Clock int32 } type BlkpgPartition struct { Start int64 Length int64 Pno int32 Devname [64]uint8 Volname [64]uint8 _ [4]byte } const ( BLKPG = 0x20001269 ) type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 Module_name [64]int8 Type uint32 Mask uint32 Refcnt uint32 Flags uint32 } type CryptoStatAEAD struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatAKCipher struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Verify_cnt uint64 Sign_cnt uint64 Err_cnt uint64 } type CryptoStatCipher struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatCompress struct { Type [64]int8 Compress_cnt uint64 Compress_tlen uint64 Decompress_cnt uint64 Decompress_tlen uint64 Err_cnt uint64 } type CryptoStatHash struct { Type [64]int8 Hash_cnt uint64 Hash_tlen uint64 Err_cnt uint64 } type CryptoStatKPP struct { Type [64]int8 Setsecret_cnt uint64 Generate_public_key_cnt uint64 Compute_shared_secret_cnt uint64 Err_cnt uint64 } type CryptoStatRNG struct { Type [64]int8 Generate_cnt uint64 Generate_tlen uint64 Seed_cnt uint64 Err_cnt uint64 } type CryptoStatLarval struct { Type [64]int8 } type CryptoReportLarval struct { Type [64]int8 } type CryptoReportHash struct { Type [64]int8 Blocksize uint32 Digestsize uint32 } type CryptoReportCipher struct { Type [64]int8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 } type CryptoReportBlkCipher struct { Type [64]int8 Geniv [64]int8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 Ivsize uint32 } type CryptoReportAEAD struct { Type [64]int8 Geniv [64]int8 Blocksize uint32 Maxauthsize uint32 Ivsize uint32 } type CryptoReportComp struct { Type [64]int8 } type CryptoReportRNG struct { Type [64]int8 Seedsize uint32 } type CryptoReportAKCipher struct { Type [64]int8 } type CryptoReportKPP struct { Type [64]int8 } type CryptoReportAcomp struct { Type [64]int8 } type LoopInfo struct { Number int32 Device uint32 Inode uint32 Rdevice uint32 Offset int32 Encrypt_type int32 Encrypt_key_size int32 Flags int32 Name [64]int8 Encrypt_key [32]uint8 Init [2]uint32 Reserved [4]int8 } type TIPCSubscr struct { Seq TIPCServiceRange Timeout uint32 Filter uint32 Handle [8]int8 } type TIPCSIOCLNReq struct { Peer uint32 Id uint32 Linkname [68]int8 } type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]int8 } type PPSKInfo struct { Assert_sequence uint32 Clear_sequence uint32 Assert_tu PPSKTime Clear_tu PPSKTime Current_mode int32 _ [4]byte } const ( PPS_GETPARAMS = 0x400470a1 PPS_SETPARAMS = 0x800470a2 PPS_GETCAP = 0x400470a3 PPS_FETCH = 0xc00470a4 ) const ( PIDFD_NONBLOCK = 0x80 ) type SysvIpcPerm struct { Key int32 Uid uint32 Gid uint32 Cuid uint32 Cgid uint32 Mode uint32 _ [0]uint8 Seq uint16 _ uint16 _ uint32 _ uint32 } type SysvShmDesc struct { Perm SysvIpcPerm Segsz uint32 Atime uint32 Dtime uint32 Ctime uint32 Cpid int32 Lpid int32 Nattch uint32 Atime_high uint16 Dtime_high uint16 Ctime_high uint16 _ uint16 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go ================================================ // cgo -godefs -objdir=/tmp/ppc/cgo -- -Wall -Werror -static -I/tmp/ppc/include linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc && linux package unix const ( SizeofPtr = 0x4 SizeofLong = 0x4 ) type ( _C_long int32 ) 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 _ [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 Stat_t struct { Dev uint64 Ino uint64 Mode uint32 Nlink uint32 Uid uint32 Gid uint32 Rdev uint64 _ uint16 _ [4]byte Size int64 Blksize int32 _ [4]byte Blocks int64 Atim Timespec Mtim Timespec Ctim Timespec _ uint32 _ uint32 } type Dirent struct { Ino uint64 Off int64 Reclen uint16 Type uint8 Name [256]uint8 _ [5]byte } type Flock_t struct { Type int16 Whence int16 _ [4]byte Start int64 Len int64 Pid int32 _ [4]byte } type DmNameList struct { Dev uint64 Next uint32 Name [0]byte _ [4]byte } const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 ) type RawSockaddrNFCLLCP struct { Sa_family uint16 Dev_idx uint32 Target_idx uint32 Nfc_protocol uint32 Dsap uint8 Ssap uint8 Service_name [63]uint8 Service_name_len uint32 } type RawSockaddr struct { Family uint16 Data [14]uint8 } type RawSockaddrAny struct { Addr RawSockaddr Pad [96]uint8 } type Iovec struct { Base *byte Len 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 ifreq struct { Ifrn [16]byte Ifru [16]byte } const ( SizeofSockaddrNFCLLCP = 0x58 SizeofIovec = 0x8 SizeofMsghdr = 0x1c SizeofCmsghdr = 0xc ) const ( SizeofSockFprog = 0x8 ) type PtraceRegs struct { Gpr [32]uint32 Nip uint32 Msr uint32 Orig_gpr3 uint32 Ctr uint32 Link uint32 Xer uint32 Ccr uint32 Mq uint32 Trap uint32 Dar uint32 Dsisr uint32 Result 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 _ [8]uint8 } type Ustat_t struct { Tfree int32 Tinode uint32 Fname [6]uint8 Fpack [6]uint8 } type EpollEvent struct { Events uint32 _ int32 Fd int32 Pad int32 } const ( OPEN_TREE_CLOEXEC = 0x80000 ) const ( POLLRDHUP = 0x2000 ) type Sigset_t struct { Val [32]uint32 } const _C__NSIG = 0x41 const ( SIG_BLOCK = 0x0 SIG_UNBLOCK = 0x1 SIG_SETMASK = 0x2 ) type Siginfo struct { Signo int32 Errno int32 Code int32 _ [116]byte } type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Cc [19]uint8 Line uint8 Ispeed uint32 Ospeed uint32 } type Taskstats struct { Version uint16 Ac_exitcode uint32 Ac_flag uint8 Ac_nice uint8 _ [4]byte Cpu_count uint64 Cpu_delay_total uint64 Blkio_count uint64 Blkio_delay_total uint64 Swapin_count uint64 Swapin_delay_total uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]uint8 Ac_sched uint8 Ac_pad [3]uint8 _ [4]byte Ac_uid uint32 Ac_gid uint32 Ac_pid uint32 Ac_ppid uint32 Ac_btime uint32 _ [4]byte Ac_etime uint64 Ac_utime uint64 Ac_stime uint64 Ac_minflt uint64 Ac_majflt uint64 Coremem uint64 Virtmem uint64 Hiwater_rss uint64 Hiwater_vm uint64 Read_char uint64 Write_char uint64 Read_syscalls uint64 Write_syscalls uint64 Read_bytes uint64 Write_bytes uint64 Cancelled_write_bytes uint64 Nvcsw uint64 Nivcsw uint64 Ac_utimescaled uint64 Ac_stimescaled uint64 Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 Ac_tgid uint32 _ [4]byte Ac_tgetime uint64 Ac_exe_dev uint64 Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 Irq_count uint64 Irq_delay_total uint64 } type cpuMask uint32 const ( _NCPUBITS = 0x20 ) const ( CBitFieldMaskBit0 = 0x8000000000000000 CBitFieldMaskBit1 = 0x4000000000000000 CBitFieldMaskBit2 = 0x2000000000000000 CBitFieldMaskBit3 = 0x1000000000000000 CBitFieldMaskBit4 = 0x800000000000000 CBitFieldMaskBit5 = 0x400000000000000 CBitFieldMaskBit6 = 0x200000000000000 CBitFieldMaskBit7 = 0x100000000000000 CBitFieldMaskBit8 = 0x80000000000000 CBitFieldMaskBit9 = 0x40000000000000 CBitFieldMaskBit10 = 0x20000000000000 CBitFieldMaskBit11 = 0x10000000000000 CBitFieldMaskBit12 = 0x8000000000000 CBitFieldMaskBit13 = 0x4000000000000 CBitFieldMaskBit14 = 0x2000000000000 CBitFieldMaskBit15 = 0x1000000000000 CBitFieldMaskBit16 = 0x800000000000 CBitFieldMaskBit17 = 0x400000000000 CBitFieldMaskBit18 = 0x200000000000 CBitFieldMaskBit19 = 0x100000000000 CBitFieldMaskBit20 = 0x80000000000 CBitFieldMaskBit21 = 0x40000000000 CBitFieldMaskBit22 = 0x20000000000 CBitFieldMaskBit23 = 0x10000000000 CBitFieldMaskBit24 = 0x8000000000 CBitFieldMaskBit25 = 0x4000000000 CBitFieldMaskBit26 = 0x2000000000 CBitFieldMaskBit27 = 0x1000000000 CBitFieldMaskBit28 = 0x800000000 CBitFieldMaskBit29 = 0x400000000 CBitFieldMaskBit30 = 0x200000000 CBitFieldMaskBit31 = 0x100000000 CBitFieldMaskBit32 = 0x80000000 CBitFieldMaskBit33 = 0x40000000 CBitFieldMaskBit34 = 0x20000000 CBitFieldMaskBit35 = 0x10000000 CBitFieldMaskBit36 = 0x8000000 CBitFieldMaskBit37 = 0x4000000 CBitFieldMaskBit38 = 0x2000000 CBitFieldMaskBit39 = 0x1000000 CBitFieldMaskBit40 = 0x800000 CBitFieldMaskBit41 = 0x400000 CBitFieldMaskBit42 = 0x200000 CBitFieldMaskBit43 = 0x100000 CBitFieldMaskBit44 = 0x80000 CBitFieldMaskBit45 = 0x40000 CBitFieldMaskBit46 = 0x20000 CBitFieldMaskBit47 = 0x10000 CBitFieldMaskBit48 = 0x8000 CBitFieldMaskBit49 = 0x4000 CBitFieldMaskBit50 = 0x2000 CBitFieldMaskBit51 = 0x1000 CBitFieldMaskBit52 = 0x800 CBitFieldMaskBit53 = 0x400 CBitFieldMaskBit54 = 0x200 CBitFieldMaskBit55 = 0x100 CBitFieldMaskBit56 = 0x80 CBitFieldMaskBit57 = 0x40 CBitFieldMaskBit58 = 0x20 CBitFieldMaskBit59 = 0x10 CBitFieldMaskBit60 = 0x8 CBitFieldMaskBit61 = 0x4 CBitFieldMaskBit62 = 0x2 CBitFieldMaskBit63 = 0x1 ) type SockaddrStorage struct { Family uint16 Data [122]byte _ uint32 } type HDGeometry struct { Heads uint8 Sectors uint8 Cylinders uint16 Start uint32 } 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 _ [4]byte } type TpacketHdr struct { Status uint32 Len uint32 Snaplen uint32 Mac uint16 Net uint16 Sec uint32 Usec uint32 } const ( SizeofTpacketHdr = 0x18 ) type RTCPLLInfo struct { Ctrl int32 Value int32 Max int32 Min int32 Posmult int32 Negmult int32 Clock int32 } type BlkpgPartition struct { Start int64 Length int64 Pno int32 Devname [64]uint8 Volname [64]uint8 _ [4]byte } const ( BLKPG = 0x20001269 ) type CryptoUserAlg struct { Name [64]uint8 Driver_name [64]uint8 Module_name [64]uint8 Type uint32 Mask uint32 Refcnt uint32 Flags uint32 } type CryptoStatAEAD struct { Type [64]uint8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatAKCipher struct { Type [64]uint8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Verify_cnt uint64 Sign_cnt uint64 Err_cnt uint64 } type CryptoStatCipher struct { Type [64]uint8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatCompress struct { Type [64]uint8 Compress_cnt uint64 Compress_tlen uint64 Decompress_cnt uint64 Decompress_tlen uint64 Err_cnt uint64 } type CryptoStatHash struct { Type [64]uint8 Hash_cnt uint64 Hash_tlen uint64 Err_cnt uint64 } type CryptoStatKPP struct { Type [64]uint8 Setsecret_cnt uint64 Generate_public_key_cnt uint64 Compute_shared_secret_cnt uint64 Err_cnt uint64 } type CryptoStatRNG struct { Type [64]uint8 Generate_cnt uint64 Generate_tlen uint64 Seed_cnt uint64 Err_cnt uint64 } type CryptoStatLarval struct { Type [64]uint8 } type CryptoReportLarval struct { Type [64]uint8 } type CryptoReportHash struct { Type [64]uint8 Blocksize uint32 Digestsize uint32 } type CryptoReportCipher struct { Type [64]uint8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 } type CryptoReportBlkCipher struct { Type [64]uint8 Geniv [64]uint8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 Ivsize uint32 } type CryptoReportAEAD struct { Type [64]uint8 Geniv [64]uint8 Blocksize uint32 Maxauthsize uint32 Ivsize uint32 } type CryptoReportComp struct { Type [64]uint8 } type CryptoReportRNG struct { Type [64]uint8 Seedsize uint32 } type CryptoReportAKCipher struct { Type [64]uint8 } type CryptoReportKPP struct { Type [64]uint8 } type CryptoReportAcomp struct { Type [64]uint8 } type LoopInfo struct { Number int32 Device uint32 Inode uint32 Rdevice uint32 Offset int32 Encrypt_type int32 Encrypt_key_size int32 Flags int32 Name [64]uint8 Encrypt_key [32]uint8 Init [2]uint32 Reserved [4]uint8 } type TIPCSubscr struct { Seq TIPCServiceRange Timeout uint32 Filter uint32 Handle [8]uint8 } type TIPCSIOCLNReq struct { Peer uint32 Id uint32 Linkname [68]uint8 } type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]uint8 } type PPSKInfo struct { Assert_sequence uint32 Clear_sequence uint32 Assert_tu PPSKTime Clear_tu PPSKTime Current_mode int32 _ [4]byte } const ( PPS_GETPARAMS = 0x400470a1 PPS_SETPARAMS = 0x800470a2 PPS_GETCAP = 0x400470a3 PPS_FETCH = 0xc00470a4 ) const ( PIDFD_NONBLOCK = 0x800 ) type SysvIpcPerm struct { Key int32 Uid uint32 Gid uint32 Cuid uint32 Cgid uint32 Mode uint32 Seq uint32 _ uint32 _ uint64 _ uint64 } type SysvShmDesc struct { Perm SysvIpcPerm Atime_high uint32 Atime uint32 Dtime_high uint32 Dtime uint32 Ctime_high uint32 Ctime uint32 _ uint32 Segsz uint32 Cpid int32 Lpid int32 Nattch uint32 _ uint32 _ uint32 _ [4]byte } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go ================================================ // cgo -godefs -objdir=/tmp/ppc64/cgo -- -Wall -Werror -static -I/tmp/ppc64/include linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64 && linux package unix const ( SizeofPtr = 0x8 SizeofLong = 0x8 ) type ( _C_long int64 ) type Timespec struct { Sec int64 Nsec int64 } type Timeval struct { Sec int64 Usec int64 } type Timex struct { Modes uint32 Offset int64 Freq int64 Maxerror int64 Esterror int64 Status int32 Constant int64 Precision int64 Tolerance int64 Time Timeval Tick int64 Ppsfreq int64 Jitter int64 Shift int32 Stabil int64 Jitcnt int64 Calcnt int64 Errcnt int64 Stbcnt int64 Tai int32 _ [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 Stat_t struct { Dev uint64 Ino uint64 Nlink uint64 Mode uint32 Uid uint32 Gid uint32 _ int32 Rdev uint64 Size int64 Blksize int64 Blocks int64 Atim Timespec Mtim Timespec Ctim Timespec _ uint64 _ uint64 _ uint64 } type Dirent struct { Ino uint64 Off int64 Reclen uint16 Type uint8 Name [256]uint8 _ [5]byte } type Flock_t struct { Type int16 Whence int16 Start int64 Len int64 Pid int32 _ [4]byte } type DmNameList struct { Dev uint64 Next uint32 Name [0]byte _ [4]byte } const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 ) type RawSockaddrNFCLLCP struct { Sa_family uint16 Dev_idx uint32 Target_idx uint32 Nfc_protocol uint32 Dsap uint8 Ssap uint8 Service_name [63]uint8 Service_name_len uint64 } type RawSockaddr struct { Family uint16 Data [14]uint8 } type RawSockaddrAny struct { Addr RawSockaddr Pad [96]uint8 } type Iovec struct { Base *byte Len uint64 } type Msghdr struct { Name *byte Namelen uint32 Iov *Iovec Iovlen uint64 Control *byte Controllen uint64 Flags int32 _ [4]byte } type Cmsghdr struct { Len uint64 Level int32 Type int32 } type ifreq struct { Ifrn [16]byte Ifru [24]byte } const ( SizeofSockaddrNFCLLCP = 0x60 SizeofIovec = 0x10 SizeofMsghdr = 0x38 SizeofCmsghdr = 0x10 ) const ( SizeofSockFprog = 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 Totalhigh uint64 Freehigh uint64 Unit uint32 _ [0]uint8 _ [4]byte } type Ustat_t struct { Tfree int32 Tinode uint64 Fname [6]uint8 Fpack [6]uint8 _ [4]byte } type EpollEvent struct { Events uint32 _ int32 Fd int32 Pad int32 } const ( OPEN_TREE_CLOEXEC = 0x80000 ) const ( POLLRDHUP = 0x2000 ) type Sigset_t struct { Val [16]uint64 } const _C__NSIG = 0x41 const ( SIG_BLOCK = 0x0 SIG_UNBLOCK = 0x1 SIG_SETMASK = 0x2 ) type Siginfo struct { Signo int32 Errno int32 Code int32 _ int32 _ [112]byte } type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Cc [19]uint8 Line uint8 Ispeed uint32 Ospeed uint32 } type Taskstats struct { Version uint16 Ac_exitcode uint32 Ac_flag uint8 Ac_nice uint8 Cpu_count uint64 Cpu_delay_total uint64 Blkio_count uint64 Blkio_delay_total uint64 Swapin_count uint64 Swapin_delay_total uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]uint8 Ac_sched uint8 Ac_pad [3]uint8 _ [4]byte Ac_uid uint32 Ac_gid uint32 Ac_pid uint32 Ac_ppid uint32 Ac_btime uint32 Ac_etime uint64 Ac_utime uint64 Ac_stime uint64 Ac_minflt uint64 Ac_majflt uint64 Coremem uint64 Virtmem uint64 Hiwater_rss uint64 Hiwater_vm uint64 Read_char uint64 Write_char uint64 Read_syscalls uint64 Write_syscalls uint64 Read_bytes uint64 Write_bytes uint64 Cancelled_write_bytes uint64 Nvcsw uint64 Nivcsw uint64 Ac_utimescaled uint64 Ac_stimescaled uint64 Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 Ac_tgid uint32 Ac_tgetime uint64 Ac_exe_dev uint64 Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 Irq_count uint64 Irq_delay_total uint64 } type cpuMask uint64 const ( _NCPUBITS = 0x40 ) const ( CBitFieldMaskBit0 = 0x8000000000000000 CBitFieldMaskBit1 = 0x4000000000000000 CBitFieldMaskBit2 = 0x2000000000000000 CBitFieldMaskBit3 = 0x1000000000000000 CBitFieldMaskBit4 = 0x800000000000000 CBitFieldMaskBit5 = 0x400000000000000 CBitFieldMaskBit6 = 0x200000000000000 CBitFieldMaskBit7 = 0x100000000000000 CBitFieldMaskBit8 = 0x80000000000000 CBitFieldMaskBit9 = 0x40000000000000 CBitFieldMaskBit10 = 0x20000000000000 CBitFieldMaskBit11 = 0x10000000000000 CBitFieldMaskBit12 = 0x8000000000000 CBitFieldMaskBit13 = 0x4000000000000 CBitFieldMaskBit14 = 0x2000000000000 CBitFieldMaskBit15 = 0x1000000000000 CBitFieldMaskBit16 = 0x800000000000 CBitFieldMaskBit17 = 0x400000000000 CBitFieldMaskBit18 = 0x200000000000 CBitFieldMaskBit19 = 0x100000000000 CBitFieldMaskBit20 = 0x80000000000 CBitFieldMaskBit21 = 0x40000000000 CBitFieldMaskBit22 = 0x20000000000 CBitFieldMaskBit23 = 0x10000000000 CBitFieldMaskBit24 = 0x8000000000 CBitFieldMaskBit25 = 0x4000000000 CBitFieldMaskBit26 = 0x2000000000 CBitFieldMaskBit27 = 0x1000000000 CBitFieldMaskBit28 = 0x800000000 CBitFieldMaskBit29 = 0x400000000 CBitFieldMaskBit30 = 0x200000000 CBitFieldMaskBit31 = 0x100000000 CBitFieldMaskBit32 = 0x80000000 CBitFieldMaskBit33 = 0x40000000 CBitFieldMaskBit34 = 0x20000000 CBitFieldMaskBit35 = 0x10000000 CBitFieldMaskBit36 = 0x8000000 CBitFieldMaskBit37 = 0x4000000 CBitFieldMaskBit38 = 0x2000000 CBitFieldMaskBit39 = 0x1000000 CBitFieldMaskBit40 = 0x800000 CBitFieldMaskBit41 = 0x400000 CBitFieldMaskBit42 = 0x200000 CBitFieldMaskBit43 = 0x100000 CBitFieldMaskBit44 = 0x80000 CBitFieldMaskBit45 = 0x40000 CBitFieldMaskBit46 = 0x20000 CBitFieldMaskBit47 = 0x10000 CBitFieldMaskBit48 = 0x8000 CBitFieldMaskBit49 = 0x4000 CBitFieldMaskBit50 = 0x2000 CBitFieldMaskBit51 = 0x1000 CBitFieldMaskBit52 = 0x800 CBitFieldMaskBit53 = 0x400 CBitFieldMaskBit54 = 0x200 CBitFieldMaskBit55 = 0x100 CBitFieldMaskBit56 = 0x80 CBitFieldMaskBit57 = 0x40 CBitFieldMaskBit58 = 0x20 CBitFieldMaskBit59 = 0x10 CBitFieldMaskBit60 = 0x8 CBitFieldMaskBit61 = 0x4 CBitFieldMaskBit62 = 0x2 CBitFieldMaskBit63 = 0x1 ) type SockaddrStorage struct { Family uint16 Data [118]byte _ uint64 } type HDGeometry struct { Heads uint8 Sectors uint8 Cylinders uint16 Start 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 TpacketHdr struct { Status uint64 Len uint32 Snaplen uint32 Mac uint16 Net uint16 Sec uint32 Usec uint32 _ [4]byte } const ( SizeofTpacketHdr = 0x20 ) type RTCPLLInfo struct { Ctrl int32 Value int32 Max int32 Min int32 Posmult int32 Negmult int32 Clock int64 } type BlkpgPartition struct { Start int64 Length int64 Pno int32 Devname [64]uint8 Volname [64]uint8 _ [4]byte } const ( BLKPG = 0x20001269 ) type CryptoUserAlg struct { Name [64]uint8 Driver_name [64]uint8 Module_name [64]uint8 Type uint32 Mask uint32 Refcnt uint32 Flags uint32 } type CryptoStatAEAD struct { Type [64]uint8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatAKCipher struct { Type [64]uint8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Verify_cnt uint64 Sign_cnt uint64 Err_cnt uint64 } type CryptoStatCipher struct { Type [64]uint8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatCompress struct { Type [64]uint8 Compress_cnt uint64 Compress_tlen uint64 Decompress_cnt uint64 Decompress_tlen uint64 Err_cnt uint64 } type CryptoStatHash struct { Type [64]uint8 Hash_cnt uint64 Hash_tlen uint64 Err_cnt uint64 } type CryptoStatKPP struct { Type [64]uint8 Setsecret_cnt uint64 Generate_public_key_cnt uint64 Compute_shared_secret_cnt uint64 Err_cnt uint64 } type CryptoStatRNG struct { Type [64]uint8 Generate_cnt uint64 Generate_tlen uint64 Seed_cnt uint64 Err_cnt uint64 } type CryptoStatLarval struct { Type [64]uint8 } type CryptoReportLarval struct { Type [64]uint8 } type CryptoReportHash struct { Type [64]uint8 Blocksize uint32 Digestsize uint32 } type CryptoReportCipher struct { Type [64]uint8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 } type CryptoReportBlkCipher struct { Type [64]uint8 Geniv [64]uint8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 Ivsize uint32 } type CryptoReportAEAD struct { Type [64]uint8 Geniv [64]uint8 Blocksize uint32 Maxauthsize uint32 Ivsize uint32 } type CryptoReportComp struct { Type [64]uint8 } type CryptoReportRNG struct { Type [64]uint8 Seedsize uint32 } type CryptoReportAKCipher struct { Type [64]uint8 } type CryptoReportKPP struct { Type [64]uint8 } type CryptoReportAcomp struct { Type [64]uint8 } type LoopInfo struct { Number int32 Device uint64 Inode uint64 Rdevice uint64 Offset int32 Encrypt_type int32 Encrypt_key_size int32 Flags int32 Name [64]uint8 Encrypt_key [32]uint8 Init [2]uint64 Reserved [4]uint8 _ [4]byte } type TIPCSubscr struct { Seq TIPCServiceRange Timeout uint32 Filter uint32 Handle [8]uint8 } type TIPCSIOCLNReq struct { Peer uint32 Id uint32 Linkname [68]uint8 } type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]uint8 } type PPSKInfo struct { Assert_sequence uint32 Clear_sequence uint32 Assert_tu PPSKTime Clear_tu PPSKTime Current_mode int32 _ [4]byte } const ( PPS_GETPARAMS = 0x400870a1 PPS_SETPARAMS = 0x800870a2 PPS_GETCAP = 0x400870a3 PPS_FETCH = 0xc00870a4 ) const ( PIDFD_NONBLOCK = 0x800 ) type SysvIpcPerm struct { Key int32 Uid uint32 Gid uint32 Cuid uint32 Cgid uint32 Mode uint32 Seq uint32 _ uint32 _ uint64 _ uint64 } type SysvShmDesc struct { Perm SysvIpcPerm Atime int64 Dtime int64 Ctime int64 Segsz uint64 Cpid int32 Lpid int32 Nattch uint64 _ uint64 _ uint64 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go ================================================ // cgo -godefs -objdir=/tmp/ppc64le/cgo -- -Wall -Werror -static -I/tmp/ppc64le/include linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64le && linux package unix const ( SizeofPtr = 0x8 SizeofLong = 0x8 ) type ( _C_long int64 ) type Timespec struct { Sec int64 Nsec int64 } type Timeval struct { Sec int64 Usec int64 } type Timex struct { Modes uint32 Offset int64 Freq int64 Maxerror int64 Esterror int64 Status int32 Constant int64 Precision int64 Tolerance int64 Time Timeval Tick int64 Ppsfreq int64 Jitter int64 Shift int32 Stabil int64 Jitcnt int64 Calcnt int64 Errcnt int64 Stbcnt int64 Tai int32 _ [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 Stat_t struct { Dev uint64 Ino uint64 Nlink uint64 Mode uint32 Uid uint32 Gid uint32 _ int32 Rdev uint64 Size int64 Blksize int64 Blocks int64 Atim Timespec Mtim Timespec Ctim Timespec _ uint64 _ uint64 _ uint64 } type Dirent struct { Ino uint64 Off int64 Reclen uint16 Type uint8 Name [256]uint8 _ [5]byte } type Flock_t struct { Type int16 Whence int16 Start int64 Len int64 Pid int32 _ [4]byte } type DmNameList struct { Dev uint64 Next uint32 Name [0]byte _ [4]byte } const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 ) type RawSockaddrNFCLLCP struct { Sa_family uint16 Dev_idx uint32 Target_idx uint32 Nfc_protocol uint32 Dsap uint8 Ssap uint8 Service_name [63]uint8 Service_name_len uint64 } type RawSockaddr struct { Family uint16 Data [14]uint8 } type RawSockaddrAny struct { Addr RawSockaddr Pad [96]uint8 } type Iovec struct { Base *byte Len uint64 } type Msghdr struct { Name *byte Namelen uint32 Iov *Iovec Iovlen uint64 Control *byte Controllen uint64 Flags int32 _ [4]byte } type Cmsghdr struct { Len uint64 Level int32 Type int32 } type ifreq struct { Ifrn [16]byte Ifru [24]byte } const ( SizeofSockaddrNFCLLCP = 0x60 SizeofIovec = 0x10 SizeofMsghdr = 0x38 SizeofCmsghdr = 0x10 ) const ( SizeofSockFprog = 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 Totalhigh uint64 Freehigh uint64 Unit uint32 _ [0]uint8 _ [4]byte } type Ustat_t struct { Tfree int32 Tinode uint64 Fname [6]uint8 Fpack [6]uint8 _ [4]byte } type EpollEvent struct { Events uint32 _ int32 Fd int32 Pad int32 } const ( OPEN_TREE_CLOEXEC = 0x80000 ) const ( POLLRDHUP = 0x2000 ) type Sigset_t struct { Val [16]uint64 } const _C__NSIG = 0x41 const ( SIG_BLOCK = 0x0 SIG_UNBLOCK = 0x1 SIG_SETMASK = 0x2 ) type Siginfo struct { Signo int32 Errno int32 Code int32 _ int32 _ [112]byte } type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Cc [19]uint8 Line uint8 Ispeed uint32 Ospeed uint32 } type Taskstats struct { Version uint16 Ac_exitcode uint32 Ac_flag uint8 Ac_nice uint8 Cpu_count uint64 Cpu_delay_total uint64 Blkio_count uint64 Blkio_delay_total uint64 Swapin_count uint64 Swapin_delay_total uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]uint8 Ac_sched uint8 Ac_pad [3]uint8 _ [4]byte Ac_uid uint32 Ac_gid uint32 Ac_pid uint32 Ac_ppid uint32 Ac_btime uint32 Ac_etime uint64 Ac_utime uint64 Ac_stime uint64 Ac_minflt uint64 Ac_majflt uint64 Coremem uint64 Virtmem uint64 Hiwater_rss uint64 Hiwater_vm uint64 Read_char uint64 Write_char uint64 Read_syscalls uint64 Write_syscalls uint64 Read_bytes uint64 Write_bytes uint64 Cancelled_write_bytes uint64 Nvcsw uint64 Nivcsw uint64 Ac_utimescaled uint64 Ac_stimescaled uint64 Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 Ac_tgid uint32 Ac_tgetime uint64 Ac_exe_dev uint64 Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 Irq_count uint64 Irq_delay_total uint64 } type cpuMask uint64 const ( _NCPUBITS = 0x40 ) const ( CBitFieldMaskBit0 = 0x1 CBitFieldMaskBit1 = 0x2 CBitFieldMaskBit2 = 0x4 CBitFieldMaskBit3 = 0x8 CBitFieldMaskBit4 = 0x10 CBitFieldMaskBit5 = 0x20 CBitFieldMaskBit6 = 0x40 CBitFieldMaskBit7 = 0x80 CBitFieldMaskBit8 = 0x100 CBitFieldMaskBit9 = 0x200 CBitFieldMaskBit10 = 0x400 CBitFieldMaskBit11 = 0x800 CBitFieldMaskBit12 = 0x1000 CBitFieldMaskBit13 = 0x2000 CBitFieldMaskBit14 = 0x4000 CBitFieldMaskBit15 = 0x8000 CBitFieldMaskBit16 = 0x10000 CBitFieldMaskBit17 = 0x20000 CBitFieldMaskBit18 = 0x40000 CBitFieldMaskBit19 = 0x80000 CBitFieldMaskBit20 = 0x100000 CBitFieldMaskBit21 = 0x200000 CBitFieldMaskBit22 = 0x400000 CBitFieldMaskBit23 = 0x800000 CBitFieldMaskBit24 = 0x1000000 CBitFieldMaskBit25 = 0x2000000 CBitFieldMaskBit26 = 0x4000000 CBitFieldMaskBit27 = 0x8000000 CBitFieldMaskBit28 = 0x10000000 CBitFieldMaskBit29 = 0x20000000 CBitFieldMaskBit30 = 0x40000000 CBitFieldMaskBit31 = 0x80000000 CBitFieldMaskBit32 = 0x100000000 CBitFieldMaskBit33 = 0x200000000 CBitFieldMaskBit34 = 0x400000000 CBitFieldMaskBit35 = 0x800000000 CBitFieldMaskBit36 = 0x1000000000 CBitFieldMaskBit37 = 0x2000000000 CBitFieldMaskBit38 = 0x4000000000 CBitFieldMaskBit39 = 0x8000000000 CBitFieldMaskBit40 = 0x10000000000 CBitFieldMaskBit41 = 0x20000000000 CBitFieldMaskBit42 = 0x40000000000 CBitFieldMaskBit43 = 0x80000000000 CBitFieldMaskBit44 = 0x100000000000 CBitFieldMaskBit45 = 0x200000000000 CBitFieldMaskBit46 = 0x400000000000 CBitFieldMaskBit47 = 0x800000000000 CBitFieldMaskBit48 = 0x1000000000000 CBitFieldMaskBit49 = 0x2000000000000 CBitFieldMaskBit50 = 0x4000000000000 CBitFieldMaskBit51 = 0x8000000000000 CBitFieldMaskBit52 = 0x10000000000000 CBitFieldMaskBit53 = 0x20000000000000 CBitFieldMaskBit54 = 0x40000000000000 CBitFieldMaskBit55 = 0x80000000000000 CBitFieldMaskBit56 = 0x100000000000000 CBitFieldMaskBit57 = 0x200000000000000 CBitFieldMaskBit58 = 0x400000000000000 CBitFieldMaskBit59 = 0x800000000000000 CBitFieldMaskBit60 = 0x1000000000000000 CBitFieldMaskBit61 = 0x2000000000000000 CBitFieldMaskBit62 = 0x4000000000000000 CBitFieldMaskBit63 = 0x8000000000000000 ) type SockaddrStorage struct { Family uint16 Data [118]byte _ uint64 } type HDGeometry struct { Heads uint8 Sectors uint8 Cylinders uint16 Start 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 TpacketHdr struct { Status uint64 Len uint32 Snaplen uint32 Mac uint16 Net uint16 Sec uint32 Usec uint32 _ [4]byte } const ( SizeofTpacketHdr = 0x20 ) type RTCPLLInfo struct { Ctrl int32 Value int32 Max int32 Min int32 Posmult int32 Negmult int32 Clock int64 } type BlkpgPartition struct { Start int64 Length int64 Pno int32 Devname [64]uint8 Volname [64]uint8 _ [4]byte } const ( BLKPG = 0x20001269 ) type CryptoUserAlg struct { Name [64]uint8 Driver_name [64]uint8 Module_name [64]uint8 Type uint32 Mask uint32 Refcnt uint32 Flags uint32 } type CryptoStatAEAD struct { Type [64]uint8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatAKCipher struct { Type [64]uint8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Verify_cnt uint64 Sign_cnt uint64 Err_cnt uint64 } type CryptoStatCipher struct { Type [64]uint8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatCompress struct { Type [64]uint8 Compress_cnt uint64 Compress_tlen uint64 Decompress_cnt uint64 Decompress_tlen uint64 Err_cnt uint64 } type CryptoStatHash struct { Type [64]uint8 Hash_cnt uint64 Hash_tlen uint64 Err_cnt uint64 } type CryptoStatKPP struct { Type [64]uint8 Setsecret_cnt uint64 Generate_public_key_cnt uint64 Compute_shared_secret_cnt uint64 Err_cnt uint64 } type CryptoStatRNG struct { Type [64]uint8 Generate_cnt uint64 Generate_tlen uint64 Seed_cnt uint64 Err_cnt uint64 } type CryptoStatLarval struct { Type [64]uint8 } type CryptoReportLarval struct { Type [64]uint8 } type CryptoReportHash struct { Type [64]uint8 Blocksize uint32 Digestsize uint32 } type CryptoReportCipher struct { Type [64]uint8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 } type CryptoReportBlkCipher struct { Type [64]uint8 Geniv [64]uint8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 Ivsize uint32 } type CryptoReportAEAD struct { Type [64]uint8 Geniv [64]uint8 Blocksize uint32 Maxauthsize uint32 Ivsize uint32 } type CryptoReportComp struct { Type [64]uint8 } type CryptoReportRNG struct { Type [64]uint8 Seedsize uint32 } type CryptoReportAKCipher struct { Type [64]uint8 } type CryptoReportKPP struct { Type [64]uint8 } type CryptoReportAcomp struct { Type [64]uint8 } type LoopInfo struct { Number int32 Device uint64 Inode uint64 Rdevice uint64 Offset int32 Encrypt_type int32 Encrypt_key_size int32 Flags int32 Name [64]uint8 Encrypt_key [32]uint8 Init [2]uint64 Reserved [4]uint8 _ [4]byte } type TIPCSubscr struct { Seq TIPCServiceRange Timeout uint32 Filter uint32 Handle [8]uint8 } type TIPCSIOCLNReq struct { Peer uint32 Id uint32 Linkname [68]uint8 } type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]uint8 } type PPSKInfo struct { Assert_sequence uint32 Clear_sequence uint32 Assert_tu PPSKTime Clear_tu PPSKTime Current_mode int32 _ [4]byte } const ( PPS_GETPARAMS = 0x400870a1 PPS_SETPARAMS = 0x800870a2 PPS_GETCAP = 0x400870a3 PPS_FETCH = 0xc00870a4 ) const ( PIDFD_NONBLOCK = 0x800 ) type SysvIpcPerm struct { Key int32 Uid uint32 Gid uint32 Cuid uint32 Cgid uint32 Mode uint32 Seq uint32 _ uint32 _ uint64 _ uint64 } type SysvShmDesc struct { Perm SysvIpcPerm Atime int64 Dtime int64 Ctime int64 Segsz uint64 Cpid int32 Lpid int32 Nattch uint64 _ uint64 _ uint64 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go ================================================ // cgo -godefs -objdir=/tmp/riscv64/cgo -- -Wall -Werror -static -I/tmp/riscv64/include linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && linux package unix const ( SizeofPtr = 0x8 SizeofLong = 0x8 ) type ( _C_long int64 ) type Timespec struct { Sec int64 Nsec int64 } type Timeval struct { Sec int64 Usec int64 } type Timex struct { Modes uint32 Offset int64 Freq int64 Maxerror int64 Esterror int64 Status int32 Constant int64 Precision int64 Tolerance int64 Time Timeval Tick int64 Ppsfreq int64 Jitter int64 Shift int32 Stabil int64 Jitcnt int64 Calcnt int64 Errcnt int64 Stbcnt int64 Tai int32 _ [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 Stat_t struct { Dev uint64 Ino uint64 Mode uint32 Nlink uint32 Uid uint32 Gid uint32 Rdev uint64 _ uint64 Size int64 Blksize int32 _ int32 Blocks int64 Atim Timespec Mtim Timespec Ctim Timespec _ [2]int32 } type Dirent struct { Ino uint64 Off int64 Reclen uint16 Type uint8 Name [256]uint8 _ [5]byte } type Flock_t struct { Type int16 Whence int16 Start int64 Len int64 Pid int32 _ [4]byte } type DmNameList struct { Dev uint64 Next uint32 Name [0]byte _ [4]byte } const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 ) type RawSockaddrNFCLLCP struct { Sa_family uint16 Dev_idx uint32 Target_idx uint32 Nfc_protocol uint32 Dsap uint8 Ssap uint8 Service_name [63]uint8 Service_name_len uint64 } type RawSockaddr struct { Family uint16 Data [14]uint8 } type RawSockaddrAny struct { Addr RawSockaddr Pad [96]uint8 } type Iovec struct { Base *byte Len uint64 } type Msghdr struct { Name *byte Namelen uint32 Iov *Iovec Iovlen uint64 Control *byte Controllen uint64 Flags int32 _ [4]byte } type Cmsghdr struct { Len uint64 Level int32 Type int32 } type ifreq struct { Ifrn [16]byte Ifru [24]byte } const ( SizeofSockaddrNFCLLCP = 0x60 SizeofIovec = 0x10 SizeofMsghdr = 0x38 SizeofCmsghdr = 0x10 ) const ( SizeofSockFprog = 0x10 ) type PtraceRegs struct { Pc uint64 Ra uint64 Sp uint64 Gp uint64 Tp uint64 T0 uint64 T1 uint64 T2 uint64 S0 uint64 S1 uint64 A0 uint64 A1 uint64 A2 uint64 A3 uint64 A4 uint64 A5 uint64 A6 uint64 A7 uint64 S2 uint64 S3 uint64 S4 uint64 S5 uint64 S6 uint64 S7 uint64 S8 uint64 S9 uint64 S10 uint64 S11 uint64 T3 uint64 T4 uint64 T5 uint64 T6 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 Totalhigh uint64 Freehigh uint64 Unit uint32 _ [0]uint8 _ [4]byte } type Ustat_t struct { Tfree int32 Tinode uint64 Fname [6]uint8 Fpack [6]uint8 _ [4]byte } type EpollEvent struct { Events uint32 _ int32 Fd int32 Pad int32 } const ( OPEN_TREE_CLOEXEC = 0x80000 ) const ( POLLRDHUP = 0x2000 ) type Sigset_t struct { Val [16]uint64 } const _C__NSIG = 0x41 const ( SIG_BLOCK = 0x0 SIG_UNBLOCK = 0x1 SIG_SETMASK = 0x2 ) type Siginfo struct { Signo int32 Errno int32 Code int32 _ int32 _ [112]byte } type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Line uint8 Cc [19]uint8 Ispeed uint32 Ospeed uint32 } type Taskstats struct { Version uint16 Ac_exitcode uint32 Ac_flag uint8 Ac_nice uint8 Cpu_count uint64 Cpu_delay_total uint64 Blkio_count uint64 Blkio_delay_total uint64 Swapin_count uint64 Swapin_delay_total uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]uint8 Ac_sched uint8 Ac_pad [3]uint8 _ [4]byte Ac_uid uint32 Ac_gid uint32 Ac_pid uint32 Ac_ppid uint32 Ac_btime uint32 Ac_etime uint64 Ac_utime uint64 Ac_stime uint64 Ac_minflt uint64 Ac_majflt uint64 Coremem uint64 Virtmem uint64 Hiwater_rss uint64 Hiwater_vm uint64 Read_char uint64 Write_char uint64 Read_syscalls uint64 Write_syscalls uint64 Read_bytes uint64 Write_bytes uint64 Cancelled_write_bytes uint64 Nvcsw uint64 Nivcsw uint64 Ac_utimescaled uint64 Ac_stimescaled uint64 Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 Ac_tgid uint32 Ac_tgetime uint64 Ac_exe_dev uint64 Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 Irq_count uint64 Irq_delay_total uint64 } type cpuMask uint64 const ( _NCPUBITS = 0x40 ) const ( CBitFieldMaskBit0 = 0x1 CBitFieldMaskBit1 = 0x2 CBitFieldMaskBit2 = 0x4 CBitFieldMaskBit3 = 0x8 CBitFieldMaskBit4 = 0x10 CBitFieldMaskBit5 = 0x20 CBitFieldMaskBit6 = 0x40 CBitFieldMaskBit7 = 0x80 CBitFieldMaskBit8 = 0x100 CBitFieldMaskBit9 = 0x200 CBitFieldMaskBit10 = 0x400 CBitFieldMaskBit11 = 0x800 CBitFieldMaskBit12 = 0x1000 CBitFieldMaskBit13 = 0x2000 CBitFieldMaskBit14 = 0x4000 CBitFieldMaskBit15 = 0x8000 CBitFieldMaskBit16 = 0x10000 CBitFieldMaskBit17 = 0x20000 CBitFieldMaskBit18 = 0x40000 CBitFieldMaskBit19 = 0x80000 CBitFieldMaskBit20 = 0x100000 CBitFieldMaskBit21 = 0x200000 CBitFieldMaskBit22 = 0x400000 CBitFieldMaskBit23 = 0x800000 CBitFieldMaskBit24 = 0x1000000 CBitFieldMaskBit25 = 0x2000000 CBitFieldMaskBit26 = 0x4000000 CBitFieldMaskBit27 = 0x8000000 CBitFieldMaskBit28 = 0x10000000 CBitFieldMaskBit29 = 0x20000000 CBitFieldMaskBit30 = 0x40000000 CBitFieldMaskBit31 = 0x80000000 CBitFieldMaskBit32 = 0x100000000 CBitFieldMaskBit33 = 0x200000000 CBitFieldMaskBit34 = 0x400000000 CBitFieldMaskBit35 = 0x800000000 CBitFieldMaskBit36 = 0x1000000000 CBitFieldMaskBit37 = 0x2000000000 CBitFieldMaskBit38 = 0x4000000000 CBitFieldMaskBit39 = 0x8000000000 CBitFieldMaskBit40 = 0x10000000000 CBitFieldMaskBit41 = 0x20000000000 CBitFieldMaskBit42 = 0x40000000000 CBitFieldMaskBit43 = 0x80000000000 CBitFieldMaskBit44 = 0x100000000000 CBitFieldMaskBit45 = 0x200000000000 CBitFieldMaskBit46 = 0x400000000000 CBitFieldMaskBit47 = 0x800000000000 CBitFieldMaskBit48 = 0x1000000000000 CBitFieldMaskBit49 = 0x2000000000000 CBitFieldMaskBit50 = 0x4000000000000 CBitFieldMaskBit51 = 0x8000000000000 CBitFieldMaskBit52 = 0x10000000000000 CBitFieldMaskBit53 = 0x20000000000000 CBitFieldMaskBit54 = 0x40000000000000 CBitFieldMaskBit55 = 0x80000000000000 CBitFieldMaskBit56 = 0x100000000000000 CBitFieldMaskBit57 = 0x200000000000000 CBitFieldMaskBit58 = 0x400000000000000 CBitFieldMaskBit59 = 0x800000000000000 CBitFieldMaskBit60 = 0x1000000000000000 CBitFieldMaskBit61 = 0x2000000000000000 CBitFieldMaskBit62 = 0x4000000000000000 CBitFieldMaskBit63 = 0x8000000000000000 ) type SockaddrStorage struct { Family uint16 Data [118]byte _ uint64 } type HDGeometry struct { Heads uint8 Sectors uint8 Cylinders uint16 Start 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 TpacketHdr struct { Status uint64 Len uint32 Snaplen uint32 Mac uint16 Net uint16 Sec uint32 Usec uint32 _ [4]byte } const ( SizeofTpacketHdr = 0x20 ) type RTCPLLInfo struct { Ctrl int32 Value int32 Max int32 Min int32 Posmult int32 Negmult int32 Clock int64 } type BlkpgPartition struct { Start int64 Length int64 Pno int32 Devname [64]uint8 Volname [64]uint8 _ [4]byte } const ( BLKPG = 0x1269 ) type CryptoUserAlg struct { Name [64]uint8 Driver_name [64]uint8 Module_name [64]uint8 Type uint32 Mask uint32 Refcnt uint32 Flags uint32 } type CryptoStatAEAD struct { Type [64]uint8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatAKCipher struct { Type [64]uint8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Verify_cnt uint64 Sign_cnt uint64 Err_cnt uint64 } type CryptoStatCipher struct { Type [64]uint8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatCompress struct { Type [64]uint8 Compress_cnt uint64 Compress_tlen uint64 Decompress_cnt uint64 Decompress_tlen uint64 Err_cnt uint64 } type CryptoStatHash struct { Type [64]uint8 Hash_cnt uint64 Hash_tlen uint64 Err_cnt uint64 } type CryptoStatKPP struct { Type [64]uint8 Setsecret_cnt uint64 Generate_public_key_cnt uint64 Compute_shared_secret_cnt uint64 Err_cnt uint64 } type CryptoStatRNG struct { Type [64]uint8 Generate_cnt uint64 Generate_tlen uint64 Seed_cnt uint64 Err_cnt uint64 } type CryptoStatLarval struct { Type [64]uint8 } type CryptoReportLarval struct { Type [64]uint8 } type CryptoReportHash struct { Type [64]uint8 Blocksize uint32 Digestsize uint32 } type CryptoReportCipher struct { Type [64]uint8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 } type CryptoReportBlkCipher struct { Type [64]uint8 Geniv [64]uint8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 Ivsize uint32 } type CryptoReportAEAD struct { Type [64]uint8 Geniv [64]uint8 Blocksize uint32 Maxauthsize uint32 Ivsize uint32 } type CryptoReportComp struct { Type [64]uint8 } type CryptoReportRNG struct { Type [64]uint8 Seedsize uint32 } type CryptoReportAKCipher struct { Type [64]uint8 } type CryptoReportKPP struct { Type [64]uint8 } type CryptoReportAcomp struct { Type [64]uint8 } type LoopInfo struct { Number int32 Device uint32 Inode uint64 Rdevice uint32 Offset int32 Encrypt_type int32 Encrypt_key_size int32 Flags int32 Name [64]uint8 Encrypt_key [32]uint8 Init [2]uint64 Reserved [4]uint8 _ [4]byte } type TIPCSubscr struct { Seq TIPCServiceRange Timeout uint32 Filter uint32 Handle [8]uint8 } type TIPCSIOCLNReq struct { Peer uint32 Id uint32 Linkname [68]uint8 } type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]uint8 } type PPSKInfo struct { Assert_sequence uint32 Clear_sequence uint32 Assert_tu PPSKTime Clear_tu PPSKTime Current_mode int32 _ [4]byte } const ( PPS_GETPARAMS = 0x800870a1 PPS_SETPARAMS = 0x400870a2 PPS_GETCAP = 0x800870a3 PPS_FETCH = 0xc00870a4 ) const ( PIDFD_NONBLOCK = 0x800 ) type SysvIpcPerm struct { Key int32 Uid uint32 Gid uint32 Cuid uint32 Cgid uint32 Mode uint32 _ [0]uint8 Seq uint16 _ uint16 _ uint64 _ uint64 } type SysvShmDesc struct { Perm SysvIpcPerm Segsz uint64 Atime int64 Dtime int64 Ctime int64 Cpid int32 Lpid int32 Nattch uint64 _ uint64 _ uint64 } type RISCVHWProbePairs struct { Key int64 Value uint64 } const ( RISCV_HWPROBE_KEY_MVENDORID = 0x0 RISCV_HWPROBE_KEY_MARCHID = 0x1 RISCV_HWPROBE_KEY_MIMPID = 0x2 RISCV_HWPROBE_KEY_BASE_BEHAVIOR = 0x3 RISCV_HWPROBE_BASE_BEHAVIOR_IMA = 0x1 RISCV_HWPROBE_KEY_IMA_EXT_0 = 0x4 RISCV_HWPROBE_IMA_FD = 0x1 RISCV_HWPROBE_IMA_C = 0x2 RISCV_HWPROBE_IMA_V = 0x4 RISCV_HWPROBE_EXT_ZBA = 0x8 RISCV_HWPROBE_EXT_ZBB = 0x10 RISCV_HWPROBE_EXT_ZBS = 0x20 RISCV_HWPROBE_KEY_CPUPERF_0 = 0x5 RISCV_HWPROBE_MISALIGNED_UNKNOWN = 0x0 RISCV_HWPROBE_MISALIGNED_EMULATED = 0x1 RISCV_HWPROBE_MISALIGNED_SLOW = 0x2 RISCV_HWPROBE_MISALIGNED_FAST = 0x3 RISCV_HWPROBE_MISALIGNED_UNSUPPORTED = 0x4 RISCV_HWPROBE_MISALIGNED_MASK = 0x7 ) ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go ================================================ // cgo -godefs -objdir=/tmp/s390x/cgo -- -Wall -Werror -static -I/tmp/s390x/include -fsigned-char linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build s390x && linux package unix const ( SizeofPtr = 0x8 SizeofLong = 0x8 ) type ( _C_long int64 ) type Timespec struct { Sec int64 Nsec int64 } type Timeval struct { Sec int64 Usec int64 } type Timex struct { Modes uint32 Offset int64 Freq int64 Maxerror int64 Esterror int64 Status int32 Constant int64 Precision int64 Tolerance int64 Time Timeval Tick int64 Ppsfreq int64 Jitter int64 Shift int32 Stabil int64 Jitcnt int64 Calcnt int64 Errcnt int64 Stbcnt int64 Tai int32 _ [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 Stat_t struct { Dev uint64 Ino uint64 Nlink uint64 Mode uint32 Uid uint32 Gid uint32 _ int32 Rdev uint64 Size int64 Atim Timespec Mtim Timespec Ctim Timespec Blksize int64 Blocks int64 _ [3]int64 } type Dirent struct { Ino uint64 Off int64 Reclen uint16 Type uint8 Name [256]int8 _ [5]byte } type Flock_t struct { Type int16 Whence int16 Start int64 Len int64 Pid int32 _ [4]byte } type DmNameList struct { Dev uint64 Next uint32 Name [0]byte _ [4]byte } const ( FADV_DONTNEED = 0x6 FADV_NOREUSE = 0x7 ) type RawSockaddrNFCLLCP struct { Sa_family uint16 Dev_idx uint32 Target_idx uint32 Nfc_protocol uint32 Dsap uint8 Ssap uint8 Service_name [63]uint8 Service_name_len uint64 } type RawSockaddr struct { Family uint16 Data [14]int8 } type RawSockaddrAny struct { Addr RawSockaddr Pad [96]int8 } type Iovec struct { Base *byte Len uint64 } type Msghdr struct { Name *byte Namelen uint32 Iov *Iovec Iovlen uint64 Control *byte Controllen uint64 Flags int32 _ [4]byte } type Cmsghdr struct { Len uint64 Level int32 Type int32 } type ifreq struct { Ifrn [16]byte Ifru [24]byte } const ( SizeofSockaddrNFCLLCP = 0x60 SizeofIovec = 0x10 SizeofMsghdr = 0x38 SizeofCmsghdr = 0x10 ) const ( SizeofSockFprog = 0x10 ) type PtraceRegs struct { Psw PtracePsw Gprs [16]uint64 Acrs [16]uint32 Orig_gpr2 uint64 Fp_regs PtraceFpregs Per_info PtracePer Ieee_instruction_pointer uint64 } type PtracePsw struct { Mask uint64 Addr uint64 } type PtraceFpregs struct { Fpc uint32 Fprs [16]float64 } type PtracePer struct { Control_regs [3]uint64 _ [8]byte Starting_addr uint64 Ending_addr uint64 Perc_atmid uint16 Address uint64 Access_id uint8 _ [7]byte } 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 Totalhigh uint64 Freehigh uint64 Unit uint32 _ [0]int8 _ [4]byte } type Ustat_t struct { Tfree int32 Tinode uint64 Fname [6]int8 Fpack [6]int8 _ [4]byte } type EpollEvent struct { Events uint32 _ int32 Fd int32 Pad int32 } const ( OPEN_TREE_CLOEXEC = 0x80000 ) const ( POLLRDHUP = 0x2000 ) type Sigset_t struct { Val [16]uint64 } const _C__NSIG = 0x41 const ( SIG_BLOCK = 0x0 SIG_UNBLOCK = 0x1 SIG_SETMASK = 0x2 ) type Siginfo struct { Signo int32 Errno int32 Code int32 _ int32 _ [112]byte } type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Line uint8 Cc [19]uint8 Ispeed uint32 Ospeed uint32 } type Taskstats struct { Version uint16 Ac_exitcode uint32 Ac_flag uint8 Ac_nice uint8 Cpu_count uint64 Cpu_delay_total uint64 Blkio_count uint64 Blkio_delay_total uint64 Swapin_count uint64 Swapin_delay_total uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]int8 Ac_sched uint8 Ac_pad [3]uint8 _ [4]byte Ac_uid uint32 Ac_gid uint32 Ac_pid uint32 Ac_ppid uint32 Ac_btime uint32 Ac_etime uint64 Ac_utime uint64 Ac_stime uint64 Ac_minflt uint64 Ac_majflt uint64 Coremem uint64 Virtmem uint64 Hiwater_rss uint64 Hiwater_vm uint64 Read_char uint64 Write_char uint64 Read_syscalls uint64 Write_syscalls uint64 Read_bytes uint64 Write_bytes uint64 Cancelled_write_bytes uint64 Nvcsw uint64 Nivcsw uint64 Ac_utimescaled uint64 Ac_stimescaled uint64 Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 Ac_tgid uint32 Ac_tgetime uint64 Ac_exe_dev uint64 Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 Irq_count uint64 Irq_delay_total uint64 } type cpuMask uint64 const ( _NCPUBITS = 0x40 ) const ( CBitFieldMaskBit0 = 0x8000000000000000 CBitFieldMaskBit1 = 0x4000000000000000 CBitFieldMaskBit2 = 0x2000000000000000 CBitFieldMaskBit3 = 0x1000000000000000 CBitFieldMaskBit4 = 0x800000000000000 CBitFieldMaskBit5 = 0x400000000000000 CBitFieldMaskBit6 = 0x200000000000000 CBitFieldMaskBit7 = 0x100000000000000 CBitFieldMaskBit8 = 0x80000000000000 CBitFieldMaskBit9 = 0x40000000000000 CBitFieldMaskBit10 = 0x20000000000000 CBitFieldMaskBit11 = 0x10000000000000 CBitFieldMaskBit12 = 0x8000000000000 CBitFieldMaskBit13 = 0x4000000000000 CBitFieldMaskBit14 = 0x2000000000000 CBitFieldMaskBit15 = 0x1000000000000 CBitFieldMaskBit16 = 0x800000000000 CBitFieldMaskBit17 = 0x400000000000 CBitFieldMaskBit18 = 0x200000000000 CBitFieldMaskBit19 = 0x100000000000 CBitFieldMaskBit20 = 0x80000000000 CBitFieldMaskBit21 = 0x40000000000 CBitFieldMaskBit22 = 0x20000000000 CBitFieldMaskBit23 = 0x10000000000 CBitFieldMaskBit24 = 0x8000000000 CBitFieldMaskBit25 = 0x4000000000 CBitFieldMaskBit26 = 0x2000000000 CBitFieldMaskBit27 = 0x1000000000 CBitFieldMaskBit28 = 0x800000000 CBitFieldMaskBit29 = 0x400000000 CBitFieldMaskBit30 = 0x200000000 CBitFieldMaskBit31 = 0x100000000 CBitFieldMaskBit32 = 0x80000000 CBitFieldMaskBit33 = 0x40000000 CBitFieldMaskBit34 = 0x20000000 CBitFieldMaskBit35 = 0x10000000 CBitFieldMaskBit36 = 0x8000000 CBitFieldMaskBit37 = 0x4000000 CBitFieldMaskBit38 = 0x2000000 CBitFieldMaskBit39 = 0x1000000 CBitFieldMaskBit40 = 0x800000 CBitFieldMaskBit41 = 0x400000 CBitFieldMaskBit42 = 0x200000 CBitFieldMaskBit43 = 0x100000 CBitFieldMaskBit44 = 0x80000 CBitFieldMaskBit45 = 0x40000 CBitFieldMaskBit46 = 0x20000 CBitFieldMaskBit47 = 0x10000 CBitFieldMaskBit48 = 0x8000 CBitFieldMaskBit49 = 0x4000 CBitFieldMaskBit50 = 0x2000 CBitFieldMaskBit51 = 0x1000 CBitFieldMaskBit52 = 0x800 CBitFieldMaskBit53 = 0x400 CBitFieldMaskBit54 = 0x200 CBitFieldMaskBit55 = 0x100 CBitFieldMaskBit56 = 0x80 CBitFieldMaskBit57 = 0x40 CBitFieldMaskBit58 = 0x20 CBitFieldMaskBit59 = 0x10 CBitFieldMaskBit60 = 0x8 CBitFieldMaskBit61 = 0x4 CBitFieldMaskBit62 = 0x2 CBitFieldMaskBit63 = 0x1 ) type SockaddrStorage struct { Family uint16 Data [118]byte _ uint64 } type HDGeometry struct { Heads uint8 Sectors uint8 Cylinders uint16 Start uint64 } type Statfs_t struct { Type uint32 Bsize uint32 Blocks uint64 Bfree uint64 Bavail uint64 Files uint64 Ffree uint64 Fsid Fsid Namelen uint32 Frsize uint32 Flags uint32 Spare [4]uint32 _ [4]byte } type TpacketHdr struct { Status uint64 Len uint32 Snaplen uint32 Mac uint16 Net uint16 Sec uint32 Usec uint32 _ [4]byte } const ( SizeofTpacketHdr = 0x20 ) type RTCPLLInfo struct { Ctrl int32 Value int32 Max int32 Min int32 Posmult int32 Negmult int32 Clock int64 } type BlkpgPartition struct { Start int64 Length int64 Pno int32 Devname [64]uint8 Volname [64]uint8 _ [4]byte } const ( BLKPG = 0x1269 ) type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 Module_name [64]int8 Type uint32 Mask uint32 Refcnt uint32 Flags uint32 } type CryptoStatAEAD struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatAKCipher struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Verify_cnt uint64 Sign_cnt uint64 Err_cnt uint64 } type CryptoStatCipher struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatCompress struct { Type [64]int8 Compress_cnt uint64 Compress_tlen uint64 Decompress_cnt uint64 Decompress_tlen uint64 Err_cnt uint64 } type CryptoStatHash struct { Type [64]int8 Hash_cnt uint64 Hash_tlen uint64 Err_cnt uint64 } type CryptoStatKPP struct { Type [64]int8 Setsecret_cnt uint64 Generate_public_key_cnt uint64 Compute_shared_secret_cnt uint64 Err_cnt uint64 } type CryptoStatRNG struct { Type [64]int8 Generate_cnt uint64 Generate_tlen uint64 Seed_cnt uint64 Err_cnt uint64 } type CryptoStatLarval struct { Type [64]int8 } type CryptoReportLarval struct { Type [64]int8 } type CryptoReportHash struct { Type [64]int8 Blocksize uint32 Digestsize uint32 } type CryptoReportCipher struct { Type [64]int8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 } type CryptoReportBlkCipher struct { Type [64]int8 Geniv [64]int8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 Ivsize uint32 } type CryptoReportAEAD struct { Type [64]int8 Geniv [64]int8 Blocksize uint32 Maxauthsize uint32 Ivsize uint32 } type CryptoReportComp struct { Type [64]int8 } type CryptoReportRNG struct { Type [64]int8 Seedsize uint32 } type CryptoReportAKCipher struct { Type [64]int8 } type CryptoReportKPP struct { Type [64]int8 } type CryptoReportAcomp struct { Type [64]int8 } type LoopInfo struct { Number int32 Device uint16 Inode uint64 Rdevice uint16 Offset int32 Encrypt_type int32 Encrypt_key_size int32 Flags int32 Name [64]int8 Encrypt_key [32]uint8 Init [2]uint64 Reserved [4]int8 _ [4]byte } type TIPCSubscr struct { Seq TIPCServiceRange Timeout uint32 Filter uint32 Handle [8]int8 } type TIPCSIOCLNReq struct { Peer uint32 Id uint32 Linkname [68]int8 } type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]int8 } type PPSKInfo struct { Assert_sequence uint32 Clear_sequence uint32 Assert_tu PPSKTime Clear_tu PPSKTime Current_mode int32 _ [4]byte } const ( PPS_GETPARAMS = 0x800870a1 PPS_SETPARAMS = 0x400870a2 PPS_GETCAP = 0x800870a3 PPS_FETCH = 0xc00870a4 ) const ( PIDFD_NONBLOCK = 0x800 ) type SysvIpcPerm struct { Key int32 Uid uint32 Gid uint32 Cuid uint32 Cgid uint32 Mode uint32 _ uint16 Seq uint16 _ uint64 _ uint64 } type SysvShmDesc struct { Perm SysvIpcPerm Segsz uint64 Atime int64 Dtime int64 Ctime int64 Cpid int32 Lpid int32 Nattch uint64 _ uint64 _ uint64 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go ================================================ // cgo -godefs -objdir=/tmp/sparc64/cgo -- -Wall -Werror -static -I/tmp/sparc64/include linux/types.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build sparc64 && linux package unix const ( SizeofPtr = 0x8 SizeofLong = 0x8 ) type ( _C_long int64 ) type Timespec struct { Sec int64 Nsec int64 } type Timeval struct { Sec int64 Usec int32 _ [4]byte } type Timex struct { Modes uint32 Offset int64 Freq int64 Maxerror int64 Esterror int64 Status int32 Constant int64 Precision int64 Tolerance int64 Time Timeval Tick int64 Ppsfreq int64 Jitter int64 Shift int32 Stabil int64 Jitcnt int64 Calcnt int64 Errcnt int64 Stbcnt int64 Tai int32 _ [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 Stat_t struct { Dev uint64 _ uint16 Ino uint64 Mode uint32 Nlink uint32 Uid uint32 Gid uint32 Rdev uint64 _ uint16 Size int64 Blksize int64 Blocks int64 Atim Timespec Mtim Timespec Ctim Timespec _ uint64 _ uint64 } type Dirent struct { Ino uint64 Off int64 Reclen uint16 Type uint8 Name [256]int8 _ [5]byte } type Flock_t struct { Type int16 Whence int16 Start int64 Len int64 Pid int32 _ int16 _ [2]byte } type DmNameList struct { Dev uint64 Next uint32 Name [0]byte _ [4]byte } const ( FADV_DONTNEED = 0x4 FADV_NOREUSE = 0x5 ) type RawSockaddrNFCLLCP struct { Sa_family uint16 Dev_idx uint32 Target_idx uint32 Nfc_protocol uint32 Dsap uint8 Ssap uint8 Service_name [63]uint8 Service_name_len uint64 } type RawSockaddr struct { Family uint16 Data [14]int8 } type RawSockaddrAny struct { Addr RawSockaddr Pad [96]int8 } type Iovec struct { Base *byte Len uint64 } type Msghdr struct { Name *byte Namelen uint32 Iov *Iovec Iovlen uint64 Control *byte Controllen uint64 Flags int32 _ [4]byte } type Cmsghdr struct { Len uint64 Level int32 Type int32 } type ifreq struct { Ifrn [16]byte Ifru [24]byte } const ( SizeofSockaddrNFCLLCP = 0x60 SizeofIovec = 0x10 SizeofMsghdr = 0x38 SizeofCmsghdr = 0x10 ) const ( SizeofSockFprog = 0x10 ) type PtraceRegs struct { Regs [16]uint64 Tstate uint64 Tpc uint64 Tnpc uint64 Y uint32 Magic uint32 } 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 Totalhigh uint64 Freehigh uint64 Unit uint32 _ [0]int8 _ [4]byte } type Ustat_t struct { Tfree int32 Tinode uint64 Fname [6]int8 Fpack [6]int8 _ [4]byte } type EpollEvent struct { Events uint32 _ int32 Fd int32 Pad int32 } const ( OPEN_TREE_CLOEXEC = 0x400000 ) const ( POLLRDHUP = 0x800 ) type Sigset_t struct { Val [16]uint64 } const _C__NSIG = 0x41 const ( SIG_BLOCK = 0x1 SIG_UNBLOCK = 0x2 SIG_SETMASK = 0x4 ) type Siginfo struct { Signo int32 Errno int32 Code int32 _ int32 _ [112]byte } type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Line uint8 Cc [19]uint8 Ispeed uint32 Ospeed uint32 } type Taskstats struct { Version uint16 Ac_exitcode uint32 Ac_flag uint8 Ac_nice uint8 Cpu_count uint64 Cpu_delay_total uint64 Blkio_count uint64 Blkio_delay_total uint64 Swapin_count uint64 Swapin_delay_total uint64 Cpu_run_real_total uint64 Cpu_run_virtual_total uint64 Ac_comm [32]int8 Ac_sched uint8 Ac_pad [3]uint8 _ [4]byte Ac_uid uint32 Ac_gid uint32 Ac_pid uint32 Ac_ppid uint32 Ac_btime uint32 Ac_etime uint64 Ac_utime uint64 Ac_stime uint64 Ac_minflt uint64 Ac_majflt uint64 Coremem uint64 Virtmem uint64 Hiwater_rss uint64 Hiwater_vm uint64 Read_char uint64 Write_char uint64 Read_syscalls uint64 Write_syscalls uint64 Read_bytes uint64 Write_bytes uint64 Cancelled_write_bytes uint64 Nvcsw uint64 Nivcsw uint64 Ac_utimescaled uint64 Ac_stimescaled uint64 Cpu_scaled_run_real_total uint64 Freepages_count uint64 Freepages_delay_total uint64 Thrashing_count uint64 Thrashing_delay_total uint64 Ac_btime64 uint64 Compact_count uint64 Compact_delay_total uint64 Ac_tgid uint32 Ac_tgetime uint64 Ac_exe_dev uint64 Ac_exe_inode uint64 Wpcopy_count uint64 Wpcopy_delay_total uint64 Irq_count uint64 Irq_delay_total uint64 } type cpuMask uint64 const ( _NCPUBITS = 0x40 ) const ( CBitFieldMaskBit0 = 0x8000000000000000 CBitFieldMaskBit1 = 0x4000000000000000 CBitFieldMaskBit2 = 0x2000000000000000 CBitFieldMaskBit3 = 0x1000000000000000 CBitFieldMaskBit4 = 0x800000000000000 CBitFieldMaskBit5 = 0x400000000000000 CBitFieldMaskBit6 = 0x200000000000000 CBitFieldMaskBit7 = 0x100000000000000 CBitFieldMaskBit8 = 0x80000000000000 CBitFieldMaskBit9 = 0x40000000000000 CBitFieldMaskBit10 = 0x20000000000000 CBitFieldMaskBit11 = 0x10000000000000 CBitFieldMaskBit12 = 0x8000000000000 CBitFieldMaskBit13 = 0x4000000000000 CBitFieldMaskBit14 = 0x2000000000000 CBitFieldMaskBit15 = 0x1000000000000 CBitFieldMaskBit16 = 0x800000000000 CBitFieldMaskBit17 = 0x400000000000 CBitFieldMaskBit18 = 0x200000000000 CBitFieldMaskBit19 = 0x100000000000 CBitFieldMaskBit20 = 0x80000000000 CBitFieldMaskBit21 = 0x40000000000 CBitFieldMaskBit22 = 0x20000000000 CBitFieldMaskBit23 = 0x10000000000 CBitFieldMaskBit24 = 0x8000000000 CBitFieldMaskBit25 = 0x4000000000 CBitFieldMaskBit26 = 0x2000000000 CBitFieldMaskBit27 = 0x1000000000 CBitFieldMaskBit28 = 0x800000000 CBitFieldMaskBit29 = 0x400000000 CBitFieldMaskBit30 = 0x200000000 CBitFieldMaskBit31 = 0x100000000 CBitFieldMaskBit32 = 0x80000000 CBitFieldMaskBit33 = 0x40000000 CBitFieldMaskBit34 = 0x20000000 CBitFieldMaskBit35 = 0x10000000 CBitFieldMaskBit36 = 0x8000000 CBitFieldMaskBit37 = 0x4000000 CBitFieldMaskBit38 = 0x2000000 CBitFieldMaskBit39 = 0x1000000 CBitFieldMaskBit40 = 0x800000 CBitFieldMaskBit41 = 0x400000 CBitFieldMaskBit42 = 0x200000 CBitFieldMaskBit43 = 0x100000 CBitFieldMaskBit44 = 0x80000 CBitFieldMaskBit45 = 0x40000 CBitFieldMaskBit46 = 0x20000 CBitFieldMaskBit47 = 0x10000 CBitFieldMaskBit48 = 0x8000 CBitFieldMaskBit49 = 0x4000 CBitFieldMaskBit50 = 0x2000 CBitFieldMaskBit51 = 0x1000 CBitFieldMaskBit52 = 0x800 CBitFieldMaskBit53 = 0x400 CBitFieldMaskBit54 = 0x200 CBitFieldMaskBit55 = 0x100 CBitFieldMaskBit56 = 0x80 CBitFieldMaskBit57 = 0x40 CBitFieldMaskBit58 = 0x20 CBitFieldMaskBit59 = 0x10 CBitFieldMaskBit60 = 0x8 CBitFieldMaskBit61 = 0x4 CBitFieldMaskBit62 = 0x2 CBitFieldMaskBit63 = 0x1 ) type SockaddrStorage struct { Family uint16 Data [118]byte _ uint64 } type HDGeometry struct { Heads uint8 Sectors uint8 Cylinders uint16 Start 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 TpacketHdr struct { Status uint64 Len uint32 Snaplen uint32 Mac uint16 Net uint16 Sec uint32 Usec uint32 _ [4]byte } const ( SizeofTpacketHdr = 0x20 ) type RTCPLLInfo struct { Ctrl int32 Value int32 Max int32 Min int32 Posmult int32 Negmult int32 Clock int64 } type BlkpgPartition struct { Start int64 Length int64 Pno int32 Devname [64]uint8 Volname [64]uint8 _ [4]byte } const ( BLKPG = 0x20001269 ) type CryptoUserAlg struct { Name [64]int8 Driver_name [64]int8 Module_name [64]int8 Type uint32 Mask uint32 Refcnt uint32 Flags uint32 } type CryptoStatAEAD struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatAKCipher struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Verify_cnt uint64 Sign_cnt uint64 Err_cnt uint64 } type CryptoStatCipher struct { Type [64]int8 Encrypt_cnt uint64 Encrypt_tlen uint64 Decrypt_cnt uint64 Decrypt_tlen uint64 Err_cnt uint64 } type CryptoStatCompress struct { Type [64]int8 Compress_cnt uint64 Compress_tlen uint64 Decompress_cnt uint64 Decompress_tlen uint64 Err_cnt uint64 } type CryptoStatHash struct { Type [64]int8 Hash_cnt uint64 Hash_tlen uint64 Err_cnt uint64 } type CryptoStatKPP struct { Type [64]int8 Setsecret_cnt uint64 Generate_public_key_cnt uint64 Compute_shared_secret_cnt uint64 Err_cnt uint64 } type CryptoStatRNG struct { Type [64]int8 Generate_cnt uint64 Generate_tlen uint64 Seed_cnt uint64 Err_cnt uint64 } type CryptoStatLarval struct { Type [64]int8 } type CryptoReportLarval struct { Type [64]int8 } type CryptoReportHash struct { Type [64]int8 Blocksize uint32 Digestsize uint32 } type CryptoReportCipher struct { Type [64]int8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 } type CryptoReportBlkCipher struct { Type [64]int8 Geniv [64]int8 Blocksize uint32 Min_keysize uint32 Max_keysize uint32 Ivsize uint32 } type CryptoReportAEAD struct { Type [64]int8 Geniv [64]int8 Blocksize uint32 Maxauthsize uint32 Ivsize uint32 } type CryptoReportComp struct { Type [64]int8 } type CryptoReportRNG struct { Type [64]int8 Seedsize uint32 } type CryptoReportAKCipher struct { Type [64]int8 } type CryptoReportKPP struct { Type [64]int8 } type CryptoReportAcomp struct { Type [64]int8 } type LoopInfo struct { Number int32 Device uint32 Inode uint64 Rdevice uint32 Offset int32 Encrypt_type int32 Encrypt_key_size int32 Flags int32 Name [64]int8 Encrypt_key [32]uint8 Init [2]uint64 Reserved [4]int8 _ [4]byte } type TIPCSubscr struct { Seq TIPCServiceRange Timeout uint32 Filter uint32 Handle [8]int8 } type TIPCSIOCLNReq struct { Peer uint32 Id uint32 Linkname [68]int8 } type TIPCSIOCNodeIDReq struct { Peer uint32 Id [16]int8 } type PPSKInfo struct { Assert_sequence uint32 Clear_sequence uint32 Assert_tu PPSKTime Clear_tu PPSKTime Current_mode int32 _ [4]byte } const ( PPS_GETPARAMS = 0x400870a1 PPS_SETPARAMS = 0x800870a2 PPS_GETCAP = 0x400870a3 PPS_FETCH = 0xc00870a4 ) const ( PIDFD_NONBLOCK = 0x4000 ) type SysvIpcPerm struct { Key int32 Uid uint32 Gid uint32 Cuid uint32 Cgid uint32 Mode uint32 _ uint16 Seq uint16 _ uint64 _ uint64 } type SysvShmDesc struct { Perm SysvIpcPerm Atime int64 Dtime int64 Ctime int64 Segsz uint64 Cpid int32 Lpid int32 Nattch uint64 _ uint64 _ uint64 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go ================================================ // cgo -godefs types_netbsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //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 Atim Timespec Mtim Timespec Ctim Timespec Btim Timespec Size int64 Blocks int64 Blksize uint32 Flags uint32 Gen uint32 Spare [2]uint32 } type Statfs_t [0]byte type Statvfs_t struct { Flag uint32 Bsize uint32 Frsize uint32 Iosize uint32 Blocks uint64 Bfree uint64 Bavail uint64 Bresvd uint64 Files uint64 Ffree uint64 Favail uint64 Fresvd uint64 Syncreads uint64 Syncwrites uint64 Asyncreads uint64 Asyncwrites uint64 Fsidx Fsid Fsid uint32 Namemax uint32 Owner uint32 Spare [4]uint32 Fstypename [32]byte Mntonname [1024]byte Mntfromname [1024]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 } const ( PathMax = 0x400 ) const ( ST_WAIT = 0x1 ST_NOWAIT = 0x2 ) 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 [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 SizeofIovec = 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 Winsize struct { Row uint16 Col uint16 Xpixel uint16 Ypixel uint16 } type Ptmget struct { Cfd int32 Sfd int32 Cn [1024]byte Sn [1024]byte } const ( AT_FDCWD = -0x64 AT_EACCESS = 0x100 AT_SYMLINK_NOFOLLOW = 0x200 AT_SYMLINK_FOLLOW = 0x400 AT_REMOVEDIR = 0x800 ) type PollFd struct { Fd int32 Events int16 Revents int16 } const ( POLLERR = 0x8 POLLHUP = 0x10 POLLIN = 0x1 POLLNVAL = 0x20 POLLOUT = 0x4 POLLPRI = 0x2 POLLRDBAND = 0x80 POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) 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 } type Utsname struct { Sysname [256]byte Nodename [256]byte Release [256]byte Version [256]byte Machine [256]byte } const SizeofUvmexp = 0x278 type Uvmexp struct { Pagesize int64 Pagemask int64 Pageshift int64 Npages int64 Free int64 Active int64 Inactive int64 Paging int64 Wired int64 Zeropages int64 Reserve_pagedaemon int64 Reserve_kernel int64 Freemin int64 Freetarg int64 Inactarg int64 Wiredmax int64 Nswapdev int64 Swpages int64 Swpginuse int64 Swpgonly int64 Nswget int64 Unused1 int64 Cpuhit int64 Cpumiss int64 Faults int64 Traps int64 Intrs int64 Swtch int64 Softs int64 Syscalls int64 Pageins int64 Swapins int64 Swapouts int64 Pgswapin int64 Pgswapout int64 Forks int64 Forks_ppwait int64 Forks_sharevm int64 Pga_zerohit int64 Pga_zeromiss int64 Zeroaborts int64 Fltnoram int64 Fltnoanon int64 Fltpgwait int64 Fltpgrele int64 Fltrelck int64 Fltrelckok int64 Fltanget int64 Fltanretry int64 Fltamcopy int64 Fltnamap int64 Fltnomap int64 Fltlget int64 Fltget int64 Flt_anon int64 Flt_acow int64 Flt_obj int64 Flt_prcopy int64 Flt_przero int64 Pdwoke int64 Pdrevs int64 Unused4 int64 Pdfreed int64 Pdscans int64 Pdanscan int64 Pdobscan int64 Pdreact int64 Pdbusy int64 Pdpageouts int64 Pdpending int64 Pddeact int64 Anonpages int64 Filepages int64 Execpages int64 Colorhit int64 Colormiss int64 Ncolors int64 Bootpages int64 Poolpages int64 } const SizeofClockinfo = 0x14 type Clockinfo struct { Hz int32 Tick int32 Tickadj int32 Stathz int32 Profhz int32 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go ================================================ // cgo -godefs types_netbsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //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 _ [4]byte Ino uint64 Nlink uint32 Uid uint32 Gid uint32 _ [4]byte Rdev uint64 Atim Timespec Mtim Timespec Ctim Timespec Btim Timespec Size int64 Blocks int64 Blksize uint32 Flags uint32 Gen uint32 Spare [2]uint32 _ [4]byte } type Statfs_t [0]byte type Statvfs_t struct { Flag uint64 Bsize uint64 Frsize uint64 Iosize uint64 Blocks uint64 Bfree uint64 Bavail uint64 Bresvd uint64 Files uint64 Ffree uint64 Favail uint64 Fresvd uint64 Syncreads uint64 Syncwrites uint64 Asyncreads uint64 Asyncwrites uint64 Fsidx Fsid Fsid uint64 Namemax uint64 Owner uint32 Spare [4]uint32 Fstypename [32]byte Mntonname [1024]byte Mntfromname [1024]byte _ [4]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 } const ( PathMax = 0x400 ) const ( ST_WAIT = 0x1 ST_NOWAIT = 0x2 ) 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 [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 SizeofIovec = 0x10 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 Winsize struct { Row uint16 Col uint16 Xpixel uint16 Ypixel uint16 } type Ptmget struct { Cfd int32 Sfd int32 Cn [1024]byte Sn [1024]byte } const ( AT_FDCWD = -0x64 AT_EACCESS = 0x100 AT_SYMLINK_NOFOLLOW = 0x200 AT_SYMLINK_FOLLOW = 0x400 AT_REMOVEDIR = 0x800 ) type PollFd struct { Fd int32 Events int16 Revents int16 } const ( POLLERR = 0x8 POLLHUP = 0x10 POLLIN = 0x1 POLLNVAL = 0x20 POLLOUT = 0x4 POLLPRI = 0x2 POLLRDBAND = 0x80 POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) 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 } type Utsname struct { Sysname [256]byte Nodename [256]byte Release [256]byte Version [256]byte Machine [256]byte } const SizeofUvmexp = 0x278 type Uvmexp struct { Pagesize int64 Pagemask int64 Pageshift int64 Npages int64 Free int64 Active int64 Inactive int64 Paging int64 Wired int64 Zeropages int64 Reserve_pagedaemon int64 Reserve_kernel int64 Freemin int64 Freetarg int64 Inactarg int64 Wiredmax int64 Nswapdev int64 Swpages int64 Swpginuse int64 Swpgonly int64 Nswget int64 Unused1 int64 Cpuhit int64 Cpumiss int64 Faults int64 Traps int64 Intrs int64 Swtch int64 Softs int64 Syscalls int64 Pageins int64 Swapins int64 Swapouts int64 Pgswapin int64 Pgswapout int64 Forks int64 Forks_ppwait int64 Forks_sharevm int64 Pga_zerohit int64 Pga_zeromiss int64 Zeroaborts int64 Fltnoram int64 Fltnoanon int64 Fltpgwait int64 Fltpgrele int64 Fltrelck int64 Fltrelckok int64 Fltanget int64 Fltanretry int64 Fltamcopy int64 Fltnamap int64 Fltnomap int64 Fltlget int64 Fltget int64 Flt_anon int64 Flt_acow int64 Flt_obj int64 Flt_prcopy int64 Flt_przero int64 Pdwoke int64 Pdrevs int64 Unused4 int64 Pdfreed int64 Pdscans int64 Pdanscan int64 Pdobscan int64 Pdreact int64 Pdbusy int64 Pdpageouts int64 Pdpending int64 Pddeact int64 Anonpages int64 Filepages int64 Execpages int64 Colorhit int64 Colormiss int64 Ncolors int64 Bootpages int64 Poolpages int64 } const SizeofClockinfo = 0x14 type Clockinfo struct { Hz int32 Tick int32 Tickadj int32 Stathz int32 Profhz int32 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go ================================================ // cgo -godefs types_netbsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //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 _ [4]byte Ino uint64 Nlink uint32 Uid uint32 Gid uint32 _ [4]byte Rdev uint64 Atim Timespec Mtim Timespec Ctim Timespec Btim Timespec Size int64 Blocks int64 Blksize uint32 Flags uint32 Gen uint32 Spare [2]uint32 _ [4]byte } type Statfs_t [0]byte type Statvfs_t struct { Flag uint32 Bsize uint32 Frsize uint32 Iosize uint32 Blocks uint64 Bfree uint64 Bavail uint64 Bresvd uint64 Files uint64 Ffree uint64 Favail uint64 Fresvd uint64 Syncreads uint64 Syncwrites uint64 Asyncreads uint64 Asyncwrites uint64 Fsidx Fsid Fsid uint32 Namemax uint32 Owner uint32 Spare [4]uint32 Fstypename [32]byte Mntonname [1024]byte Mntfromname [1024]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 } const ( PathMax = 0x400 ) const ( ST_WAIT = 0x1 ST_NOWAIT = 0x2 ) 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 [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 SizeofIovec = 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 Winsize struct { Row uint16 Col uint16 Xpixel uint16 Ypixel uint16 } type Ptmget struct { Cfd int32 Sfd int32 Cn [1024]byte Sn [1024]byte } const ( AT_FDCWD = -0x64 AT_EACCESS = 0x100 AT_SYMLINK_NOFOLLOW = 0x200 AT_SYMLINK_FOLLOW = 0x400 AT_REMOVEDIR = 0x800 ) type PollFd struct { Fd int32 Events int16 Revents int16 } const ( POLLERR = 0x8 POLLHUP = 0x10 POLLIN = 0x1 POLLNVAL = 0x20 POLLOUT = 0x4 POLLPRI = 0x2 POLLRDBAND = 0x80 POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) 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 } type Utsname struct { Sysname [256]byte Nodename [256]byte Release [256]byte Version [256]byte Machine [256]byte } const SizeofUvmexp = 0x278 type Uvmexp struct { Pagesize int64 Pagemask int64 Pageshift int64 Npages int64 Free int64 Active int64 Inactive int64 Paging int64 Wired int64 Zeropages int64 Reserve_pagedaemon int64 Reserve_kernel int64 Freemin int64 Freetarg int64 Inactarg int64 Wiredmax int64 Nswapdev int64 Swpages int64 Swpginuse int64 Swpgonly int64 Nswget int64 Unused1 int64 Cpuhit int64 Cpumiss int64 Faults int64 Traps int64 Intrs int64 Swtch int64 Softs int64 Syscalls int64 Pageins int64 Swapins int64 Swapouts int64 Pgswapin int64 Pgswapout int64 Forks int64 Forks_ppwait int64 Forks_sharevm int64 Pga_zerohit int64 Pga_zeromiss int64 Zeroaborts int64 Fltnoram int64 Fltnoanon int64 Fltpgwait int64 Fltpgrele int64 Fltrelck int64 Fltrelckok int64 Fltanget int64 Fltanretry int64 Fltamcopy int64 Fltnamap int64 Fltnomap int64 Fltlget int64 Fltget int64 Flt_anon int64 Flt_acow int64 Flt_obj int64 Flt_prcopy int64 Flt_przero int64 Pdwoke int64 Pdrevs int64 Unused4 int64 Pdfreed int64 Pdscans int64 Pdanscan int64 Pdobscan int64 Pdreact int64 Pdbusy int64 Pdpageouts int64 Pdpending int64 Pddeact int64 Anonpages int64 Filepages int64 Execpages int64 Colorhit int64 Colormiss int64 Ncolors int64 Bootpages int64 Poolpages int64 } const SizeofClockinfo = 0x14 type Clockinfo struct { Hz int32 Tick int32 Tickadj int32 Stathz int32 Profhz int32 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go ================================================ // cgo -godefs types_netbsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && 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 _ [4]byte Ino uint64 Nlink uint32 Uid uint32 Gid uint32 _ [4]byte Rdev uint64 Atim Timespec Mtim Timespec Ctim Timespec Btim Timespec Size int64 Blocks int64 Blksize uint32 Flags uint32 Gen uint32 Spare [2]uint32 _ [4]byte } type Statfs_t [0]byte type Statvfs_t struct { Flag uint64 Bsize uint64 Frsize uint64 Iosize uint64 Blocks uint64 Bfree uint64 Bavail uint64 Bresvd uint64 Files uint64 Ffree uint64 Favail uint64 Fresvd uint64 Syncreads uint64 Syncwrites uint64 Asyncreads uint64 Asyncwrites uint64 Fsidx Fsid Fsid uint64 Namemax uint64 Owner uint32 Spare [4]uint32 Fstypename [32]byte Mntonname [1024]byte Mntfromname [1024]byte _ [4]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 } const ( PathMax = 0x400 ) const ( ST_WAIT = 0x1 ST_NOWAIT = 0x2 ) 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 [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 SizeofIovec = 0x10 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 Winsize struct { Row uint16 Col uint16 Xpixel uint16 Ypixel uint16 } type Ptmget struct { Cfd int32 Sfd int32 Cn [1024]byte Sn [1024]byte } const ( AT_FDCWD = -0x64 AT_EACCESS = 0x100 AT_SYMLINK_NOFOLLOW = 0x200 AT_SYMLINK_FOLLOW = 0x400 AT_REMOVEDIR = 0x800 ) type PollFd struct { Fd int32 Events int16 Revents int16 } const ( POLLERR = 0x8 POLLHUP = 0x10 POLLIN = 0x1 POLLNVAL = 0x20 POLLOUT = 0x4 POLLPRI = 0x2 POLLRDBAND = 0x80 POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) 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 } type Utsname struct { Sysname [256]byte Nodename [256]byte Release [256]byte Version [256]byte Machine [256]byte } const SizeofUvmexp = 0x278 type Uvmexp struct { Pagesize int64 Pagemask int64 Pageshift int64 Npages int64 Free int64 Active int64 Inactive int64 Paging int64 Wired int64 Zeropages int64 Reserve_pagedaemon int64 Reserve_kernel int64 Freemin int64 Freetarg int64 Inactarg int64 Wiredmax int64 Nswapdev int64 Swpages int64 Swpginuse int64 Swpgonly int64 Nswget int64 Unused1 int64 Cpuhit int64 Cpumiss int64 Faults int64 Traps int64 Intrs int64 Swtch int64 Softs int64 Syscalls int64 Pageins int64 Swapins int64 Swapouts int64 Pgswapin int64 Pgswapout int64 Forks int64 Forks_ppwait int64 Forks_sharevm int64 Pga_zerohit int64 Pga_zeromiss int64 Zeroaborts int64 Fltnoram int64 Fltnoanon int64 Fltpgwait int64 Fltpgrele int64 Fltrelck int64 Fltrelckok int64 Fltanget int64 Fltanretry int64 Fltamcopy int64 Fltnamap int64 Fltnomap int64 Fltlget int64 Fltget int64 Flt_anon int64 Flt_acow int64 Flt_obj int64 Flt_prcopy int64 Flt_przero int64 Pdwoke int64 Pdrevs int64 Unused4 int64 Pdfreed int64 Pdscans int64 Pdanscan int64 Pdobscan int64 Pdreact int64 Pdbusy int64 Pdpageouts int64 Pdpending int64 Pddeact int64 Anonpages int64 Filepages int64 Execpages int64 Colorhit int64 Colormiss int64 Ncolors int64 Bootpages int64 Poolpages int64 } const SizeofClockinfo = 0x14 type Clockinfo struct { Hz int32 Tick int32 Tickadj int32 Stathz int32 Profhz int32 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go ================================================ // cgo -godefs types_openbsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //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 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 int32 Flags uint32 Gen uint32 _ 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]byte F_mntonname [90]byte F_mntfromname [90]byte F_mntfromspec [90]byte _ [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 _ [4]uint8 Name [256]int8 } type Fsid struct { Val [2]int32 } const ( PathMax = 0x400 ) 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 SizeofIovec = 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 = 0xa0 SizeofIfData = 0x88 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 Rdomain uint32 Baudrate uint64 Ipackets uint64 Ierrors uint64 Opackets uint64 Oerrors uint64 Collisions uint64 Ibytes uint64 Obytes uint64 Imcasts uint64 Omcasts uint64 Iqdrops uint64 Oqdrops uint64 Noproto uint64 Capabilities uint32 Lastchange Timeval } 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 } const ( SizeofBpfVersion = 0x4 SizeofBpfStat = 0x8 SizeofBpfProgram = 0x8 SizeofBpfInsn = 0x8 SizeofBpfHdr = 0x18 ) 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 Ifidx uint16 Flowid uint16 Flags uint8 Drops uint8 } 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 } type Winsize struct { Row uint16 Col uint16 Xpixel uint16 Ypixel uint16 } const ( AT_FDCWD = -0x64 AT_EACCESS = 0x1 AT_SYMLINK_NOFOLLOW = 0x2 AT_SYMLINK_FOLLOW = 0x4 AT_REMOVEDIR = 0x8 ) type PollFd struct { Fd int32 Events int16 Revents int16 } const ( POLLERR = 0x8 POLLHUP = 0x10 POLLIN = 0x1 POLLNVAL = 0x20 POLLOUT = 0x4 POLLPRI = 0x2 POLLRDBAND = 0x80 POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) type Sigset_t uint32 type Utsname struct { Sysname [256]byte Nodename [256]byte Release [256]byte Version [256]byte Machine [256]byte } const SizeofUvmexp = 0x158 type Uvmexp struct { Pagesize int32 Pagemask int32 Pageshift int32 Npages int32 Free int32 Active int32 Inactive int32 Paging int32 Wired int32 Zeropages int32 Reserve_pagedaemon int32 Reserve_kernel int32 Unused01 int32 Vnodepages int32 Vtextpages int32 Freemin int32 Freetarg int32 Inactarg int32 Wiredmax int32 Anonmin int32 Vtextmin int32 Vnodemin int32 Anonminpct int32 Vtextminpct int32 Vnodeminpct int32 Nswapdev int32 Swpages int32 Swpginuse int32 Swpgonly int32 Nswget int32 Nanon int32 Unused05 int32 Unused06 int32 Faults int32 Traps int32 Intrs int32 Swtch int32 Softs int32 Syscalls int32 Pageins int32 Unused07 int32 Unused08 int32 Pgswapin int32 Pgswapout int32 Forks int32 Forks_ppwait int32 Forks_sharevm int32 Pga_zerohit int32 Pga_zeromiss int32 Unused09 int32 Fltnoram int32 Fltnoanon int32 Fltnoamap int32 Fltpgwait int32 Fltpgrele int32 Fltrelck int32 Fltrelckok int32 Fltanget int32 Fltanretry int32 Fltamcopy int32 Fltnamap int32 Fltnomap int32 Fltlget int32 Fltget int32 Flt_anon int32 Flt_acow int32 Flt_obj int32 Flt_prcopy int32 Flt_przero int32 Pdwoke int32 Pdrevs int32 Pdswout int32 Pdfreed int32 Pdscans int32 Pdanscan int32 Pdobscan int32 Pdreact int32 Pdbusy int32 Pdpageouts int32 Pdpending int32 Pddeact int32 Unused11 int32 Unused12 int32 Unused13 int32 Fpswtch int32 Kmapent int32 } const SizeofClockinfo = 0x10 type Clockinfo struct { Hz int32 Tick int32 Stathz int32 Profhz int32 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go ================================================ // cgo -godefs types_openbsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //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 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 int32 Flags uint32 Gen uint32 _ 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]byte F_mntonname [90]byte F_mntfromname [90]byte F_mntfromspec [90]byte _ [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 _ [4]uint8 Name [256]int8 } type Fsid struct { Val [2]int32 } const ( PathMax = 0x400 ) 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 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 SizeofIovec = 0x10 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 = 0xa8 SizeofIfData = 0x90 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 Rdomain uint32 Baudrate uint64 Ipackets uint64 Ierrors uint64 Opackets uint64 Oerrors uint64 Collisions uint64 Ibytes uint64 Obytes uint64 Imcasts uint64 Omcasts uint64 Iqdrops uint64 Oqdrops uint64 Noproto uint64 Capabilities uint32 Lastchange Timeval } 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 } const ( SizeofBpfVersion = 0x4 SizeofBpfStat = 0x8 SizeofBpfProgram = 0x10 SizeofBpfInsn = 0x8 SizeofBpfHdr = 0x18 ) 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 Ifidx uint16 Flowid uint16 Flags uint8 Drops uint8 } 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 } type Winsize struct { Row uint16 Col uint16 Xpixel uint16 Ypixel uint16 } const ( AT_FDCWD = -0x64 AT_EACCESS = 0x1 AT_SYMLINK_NOFOLLOW = 0x2 AT_SYMLINK_FOLLOW = 0x4 AT_REMOVEDIR = 0x8 ) type PollFd struct { Fd int32 Events int16 Revents int16 } const ( POLLERR = 0x8 POLLHUP = 0x10 POLLIN = 0x1 POLLNVAL = 0x20 POLLOUT = 0x4 POLLPRI = 0x2 POLLRDBAND = 0x80 POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) type Sigset_t uint32 type Utsname struct { Sysname [256]byte Nodename [256]byte Release [256]byte Version [256]byte Machine [256]byte } const SizeofUvmexp = 0x158 type Uvmexp struct { Pagesize int32 Pagemask int32 Pageshift int32 Npages int32 Free int32 Active int32 Inactive int32 Paging int32 Wired int32 Zeropages int32 Reserve_pagedaemon int32 Reserve_kernel int32 Unused01 int32 Vnodepages int32 Vtextpages int32 Freemin int32 Freetarg int32 Inactarg int32 Wiredmax int32 Anonmin int32 Vtextmin int32 Vnodemin int32 Anonminpct int32 Vtextminpct int32 Vnodeminpct int32 Nswapdev int32 Swpages int32 Swpginuse int32 Swpgonly int32 Nswget int32 Nanon int32 Unused05 int32 Unused06 int32 Faults int32 Traps int32 Intrs int32 Swtch int32 Softs int32 Syscalls int32 Pageins int32 Unused07 int32 Unused08 int32 Pgswapin int32 Pgswapout int32 Forks int32 Forks_ppwait int32 Forks_sharevm int32 Pga_zerohit int32 Pga_zeromiss int32 Unused09 int32 Fltnoram int32 Fltnoanon int32 Fltnoamap int32 Fltpgwait int32 Fltpgrele int32 Fltrelck int32 Fltrelckok int32 Fltanget int32 Fltanretry int32 Fltamcopy int32 Fltnamap int32 Fltnomap int32 Fltlget int32 Fltget int32 Flt_anon int32 Flt_acow int32 Flt_obj int32 Flt_prcopy int32 Flt_przero int32 Pdwoke int32 Pdrevs int32 Pdswout int32 Pdfreed int32 Pdscans int32 Pdanscan int32 Pdobscan int32 Pdreact int32 Pdbusy int32 Pdpageouts int32 Pdpending int32 Pddeact int32 Unused11 int32 Unused12 int32 Unused13 int32 Fpswtch int32 Kmapent int32 } const SizeofClockinfo = 0x10 type Clockinfo struct { Hz int32 Tick int32 Stathz int32 Profhz int32 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go ================================================ // cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm && 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 _ [4]byte } type Timeval struct { Sec int64 Usec int32 _ [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 { 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 int32 Flags uint32 Gen uint32 _ [4]byte _ Timespec } type Statfs_t struct { F_flags uint32 F_bsize uint32 F_iosize uint32 _ [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]byte F_mntonname [90]byte F_mntfromname [90]byte F_mntfromspec [90]byte _ [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 _ [4]uint8 Name [256]int8 } type Fsid struct { Val [2]int32 } const ( PathMax = 0x400 ) 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 SizeofIovec = 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 _ [4]byte Data int64 Udata *byte _ [4]byte } type FdSet struct { Bits [32]uint32 } const ( SizeofIfMsghdr = 0xa8 SizeofIfData = 0x90 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 Rdomain uint32 Baudrate uint64 Ipackets uint64 Ierrors uint64 Opackets uint64 Oerrors uint64 Collisions uint64 Ibytes uint64 Obytes uint64 Imcasts uint64 Omcasts uint64 Iqdrops uint64 Oqdrops uint64 Noproto uint64 Capabilities uint32 _ [4]byte Lastchange Timeval } 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 } const ( SizeofBpfVersion = 0x4 SizeofBpfStat = 0x8 SizeofBpfProgram = 0x8 SizeofBpfInsn = 0x8 SizeofBpfHdr = 0x18 ) 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 Ifidx uint16 Flowid uint16 Flags uint8 Drops uint8 } 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 } type Winsize struct { Row uint16 Col uint16 Xpixel uint16 Ypixel uint16 } const ( AT_FDCWD = -0x64 AT_EACCESS = 0x1 AT_SYMLINK_NOFOLLOW = 0x2 AT_SYMLINK_FOLLOW = 0x4 AT_REMOVEDIR = 0x8 ) type PollFd struct { Fd int32 Events int16 Revents int16 } const ( POLLERR = 0x8 POLLHUP = 0x10 POLLIN = 0x1 POLLNVAL = 0x20 POLLOUT = 0x4 POLLPRI = 0x2 POLLRDBAND = 0x80 POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) type Sigset_t uint32 type Utsname struct { Sysname [256]byte Nodename [256]byte Release [256]byte Version [256]byte Machine [256]byte } const SizeofUvmexp = 0x158 type Uvmexp struct { Pagesize int32 Pagemask int32 Pageshift int32 Npages int32 Free int32 Active int32 Inactive int32 Paging int32 Wired int32 Zeropages int32 Reserve_pagedaemon int32 Reserve_kernel int32 Unused01 int32 Vnodepages int32 Vtextpages int32 Freemin int32 Freetarg int32 Inactarg int32 Wiredmax int32 Anonmin int32 Vtextmin int32 Vnodemin int32 Anonminpct int32 Vtextminpct int32 Vnodeminpct int32 Nswapdev int32 Swpages int32 Swpginuse int32 Swpgonly int32 Nswget int32 Nanon int32 Unused05 int32 Unused06 int32 Faults int32 Traps int32 Intrs int32 Swtch int32 Softs int32 Syscalls int32 Pageins int32 Unused07 int32 Unused08 int32 Pgswapin int32 Pgswapout int32 Forks int32 Forks_ppwait int32 Forks_sharevm int32 Pga_zerohit int32 Pga_zeromiss int32 Unused09 int32 Fltnoram int32 Fltnoanon int32 Fltnoamap int32 Fltpgwait int32 Fltpgrele int32 Fltrelck int32 Fltrelckok int32 Fltanget int32 Fltanretry int32 Fltamcopy int32 Fltnamap int32 Fltnomap int32 Fltlget int32 Fltget int32 Flt_anon int32 Flt_acow int32 Flt_obj int32 Flt_prcopy int32 Flt_przero int32 Pdwoke int32 Pdrevs int32 Pdswout int32 Pdfreed int32 Pdscans int32 Pdanscan int32 Pdobscan int32 Pdreact int32 Pdbusy int32 Pdpageouts int32 Pdpending int32 Pddeact int32 Unused11 int32 Unused12 int32 Unused13 int32 Fpswtch int32 Kmapent int32 } const SizeofClockinfo = 0x10 type Clockinfo struct { Hz int32 Tick int32 Stathz int32 Profhz int32 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go ================================================ // cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build arm64 && 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 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 int32 Flags uint32 Gen uint32 _ 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]byte F_mntonname [90]byte F_mntfromname [90]byte F_mntfromspec [90]byte _ [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 _ [4]uint8 Name [256]int8 } type Fsid struct { Val [2]int32 } const ( PathMax = 0x400 ) 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 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 SizeofIovec = 0x10 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 = 0xa8 SizeofIfData = 0x90 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 Rdomain uint32 Baudrate uint64 Ipackets uint64 Ierrors uint64 Opackets uint64 Oerrors uint64 Collisions uint64 Ibytes uint64 Obytes uint64 Imcasts uint64 Omcasts uint64 Iqdrops uint64 Oqdrops uint64 Noproto uint64 Capabilities uint32 Lastchange Timeval } 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 } const ( SizeofBpfVersion = 0x4 SizeofBpfStat = 0x8 SizeofBpfProgram = 0x10 SizeofBpfInsn = 0x8 SizeofBpfHdr = 0x18 ) 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 Ifidx uint16 Flowid uint16 Flags uint8 Drops uint8 } 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 } type Winsize struct { Row uint16 Col uint16 Xpixel uint16 Ypixel uint16 } const ( AT_FDCWD = -0x64 AT_EACCESS = 0x1 AT_SYMLINK_NOFOLLOW = 0x2 AT_SYMLINK_FOLLOW = 0x4 AT_REMOVEDIR = 0x8 ) type PollFd struct { Fd int32 Events int16 Revents int16 } const ( POLLERR = 0x8 POLLHUP = 0x10 POLLIN = 0x1 POLLNVAL = 0x20 POLLOUT = 0x4 POLLPRI = 0x2 POLLRDBAND = 0x80 POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) type Sigset_t uint32 type Utsname struct { Sysname [256]byte Nodename [256]byte Release [256]byte Version [256]byte Machine [256]byte } const SizeofUvmexp = 0x158 type Uvmexp struct { Pagesize int32 Pagemask int32 Pageshift int32 Npages int32 Free int32 Active int32 Inactive int32 Paging int32 Wired int32 Zeropages int32 Reserve_pagedaemon int32 Reserve_kernel int32 Unused01 int32 Vnodepages int32 Vtextpages int32 Freemin int32 Freetarg int32 Inactarg int32 Wiredmax int32 Anonmin int32 Vtextmin int32 Vnodemin int32 Anonminpct int32 Vtextminpct int32 Vnodeminpct int32 Nswapdev int32 Swpages int32 Swpginuse int32 Swpgonly int32 Nswget int32 Nanon int32 Unused05 int32 Unused06 int32 Faults int32 Traps int32 Intrs int32 Swtch int32 Softs int32 Syscalls int32 Pageins int32 Unused07 int32 Unused08 int32 Pgswapin int32 Pgswapout int32 Forks int32 Forks_ppwait int32 Forks_sharevm int32 Pga_zerohit int32 Pga_zeromiss int32 Unused09 int32 Fltnoram int32 Fltnoanon int32 Fltnoamap int32 Fltpgwait int32 Fltpgrele int32 Fltrelck int32 Fltrelckok int32 Fltanget int32 Fltanretry int32 Fltamcopy int32 Fltnamap int32 Fltnomap int32 Fltlget int32 Fltget int32 Flt_anon int32 Flt_acow int32 Flt_obj int32 Flt_prcopy int32 Flt_przero int32 Pdwoke int32 Pdrevs int32 Pdswout int32 Pdfreed int32 Pdscans int32 Pdanscan int32 Pdobscan int32 Pdreact int32 Pdbusy int32 Pdpageouts int32 Pdpending int32 Pddeact int32 Unused11 int32 Unused12 int32 Unused13 int32 Fpswtch int32 Kmapent int32 } const SizeofClockinfo = 0x10 type Clockinfo struct { Hz int32 Tick int32 Stathz int32 Profhz int32 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go ================================================ // cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build mips64 && 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 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 int32 Flags uint32 Gen uint32 _ 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]byte F_mntonname [90]byte F_mntfromname [90]byte F_mntfromspec [90]byte _ [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 _ [4]uint8 Name [256]int8 } type Fsid struct { Val [2]int32 } const ( PathMax = 0x400 ) 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 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 SizeofIovec = 0x10 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 = 0xa8 SizeofIfData = 0x90 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 Rdomain uint32 Baudrate uint64 Ipackets uint64 Ierrors uint64 Opackets uint64 Oerrors uint64 Collisions uint64 Ibytes uint64 Obytes uint64 Imcasts uint64 Omcasts uint64 Iqdrops uint64 Oqdrops uint64 Noproto uint64 Capabilities uint32 Lastchange Timeval } 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 } const ( SizeofBpfVersion = 0x4 SizeofBpfStat = 0x8 SizeofBpfProgram = 0x10 SizeofBpfInsn = 0x8 SizeofBpfHdr = 0x18 ) 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 Ifidx uint16 Flowid uint16 Flags uint8 Drops uint8 } 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 } type Winsize struct { Row uint16 Col uint16 Xpixel uint16 Ypixel uint16 } const ( AT_FDCWD = -0x64 AT_EACCESS = 0x1 AT_SYMLINK_NOFOLLOW = 0x2 AT_SYMLINK_FOLLOW = 0x4 AT_REMOVEDIR = 0x8 ) type PollFd struct { Fd int32 Events int16 Revents int16 } const ( POLLERR = 0x8 POLLHUP = 0x10 POLLIN = 0x1 POLLNVAL = 0x20 POLLOUT = 0x4 POLLPRI = 0x2 POLLRDBAND = 0x80 POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) type Sigset_t uint32 type Utsname struct { Sysname [256]byte Nodename [256]byte Release [256]byte Version [256]byte Machine [256]byte } const SizeofUvmexp = 0x158 type Uvmexp struct { Pagesize int32 Pagemask int32 Pageshift int32 Npages int32 Free int32 Active int32 Inactive int32 Paging int32 Wired int32 Zeropages int32 Reserve_pagedaemon int32 Reserve_kernel int32 Unused01 int32 Vnodepages int32 Vtextpages int32 Freemin int32 Freetarg int32 Inactarg int32 Wiredmax int32 Anonmin int32 Vtextmin int32 Vnodemin int32 Anonminpct int32 Vtextminpct int32 Vnodeminpct int32 Nswapdev int32 Swpages int32 Swpginuse int32 Swpgonly int32 Nswget int32 Nanon int32 Unused05 int32 Unused06 int32 Faults int32 Traps int32 Intrs int32 Swtch int32 Softs int32 Syscalls int32 Pageins int32 Unused07 int32 Unused08 int32 Pgswapin int32 Pgswapout int32 Forks int32 Forks_ppwait int32 Forks_sharevm int32 Pga_zerohit int32 Pga_zeromiss int32 Unused09 int32 Fltnoram int32 Fltnoanon int32 Fltnoamap int32 Fltpgwait int32 Fltpgrele int32 Fltrelck int32 Fltrelckok int32 Fltanget int32 Fltanretry int32 Fltamcopy int32 Fltnamap int32 Fltnomap int32 Fltlget int32 Fltget int32 Flt_anon int32 Flt_acow int32 Flt_obj int32 Flt_prcopy int32 Flt_przero int32 Pdwoke int32 Pdrevs int32 Pdswout int32 Pdfreed int32 Pdscans int32 Pdanscan int32 Pdobscan int32 Pdreact int32 Pdbusy int32 Pdpageouts int32 Pdpending int32 Pddeact int32 Unused11 int32 Unused12 int32 Unused13 int32 Fpswtch int32 Kmapent int32 } const SizeofClockinfo = 0x10 type Clockinfo struct { Hz int32 Tick int32 Stathz int32 Profhz int32 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_openbsd_ppc64.go ================================================ // cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build ppc64 && 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 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 int32 Flags uint32 Gen uint32 _ 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]byte F_mntonname [90]byte F_mntfromname [90]byte F_mntfromspec [90]byte _ [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 _ [4]uint8 Name [256]int8 } type Fsid struct { Val [2]int32 } const ( PathMax = 0x400 ) 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 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 SizeofIovec = 0x10 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 = 0xa8 SizeofIfData = 0x90 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 Rdomain uint32 Baudrate uint64 Ipackets uint64 Ierrors uint64 Opackets uint64 Oerrors uint64 Collisions uint64 Ibytes uint64 Obytes uint64 Imcasts uint64 Omcasts uint64 Iqdrops uint64 Oqdrops uint64 Noproto uint64 Capabilities uint32 Lastchange Timeval } 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{} const ( SizeofBpfVersion = 0x4 SizeofBpfStat = 0x8 SizeofBpfProgram = 0x10 SizeofBpfInsn = 0x8 SizeofBpfHdr = 0x18 ) 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 Ifidx uint16 Flowid uint16 Flags uint8 Drops uint8 } 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 } type Winsize struct { Row uint16 Col uint16 Xpixel uint16 Ypixel uint16 } const ( AT_FDCWD = -0x64 AT_EACCESS = 0x1 AT_SYMLINK_NOFOLLOW = 0x2 AT_SYMLINK_FOLLOW = 0x4 AT_REMOVEDIR = 0x8 ) type PollFd struct { Fd int32 Events int16 Revents int16 } const ( POLLERR = 0x8 POLLHUP = 0x10 POLLIN = 0x1 POLLNVAL = 0x20 POLLOUT = 0x4 POLLPRI = 0x2 POLLRDBAND = 0x80 POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) type Sigset_t uint32 type Utsname struct { Sysname [256]byte Nodename [256]byte Release [256]byte Version [256]byte Machine [256]byte } const SizeofUvmexp = 0x158 type Uvmexp struct { Pagesize int32 Pagemask int32 Pageshift int32 Npages int32 Free int32 Active int32 Inactive int32 Paging int32 Wired int32 Zeropages int32 Reserve_pagedaemon int32 Reserve_kernel int32 Unused01 int32 Vnodepages int32 Vtextpages int32 Freemin int32 Freetarg int32 Inactarg int32 Wiredmax int32 Anonmin int32 Vtextmin int32 Vnodemin int32 Anonminpct int32 Vtextminpct int32 Vnodeminpct int32 Nswapdev int32 Swpages int32 Swpginuse int32 Swpgonly int32 Nswget int32 Nanon int32 Unused05 int32 Unused06 int32 Faults int32 Traps int32 Intrs int32 Swtch int32 Softs int32 Syscalls int32 Pageins int32 Unused07 int32 Unused08 int32 Pgswapin int32 Pgswapout int32 Forks int32 Forks_ppwait int32 Forks_sharevm int32 Pga_zerohit int32 Pga_zeromiss int32 Unused09 int32 Fltnoram int32 Fltnoanon int32 Fltnoamap int32 Fltpgwait int32 Fltpgrele int32 Fltrelck int32 Fltrelckok int32 Fltanget int32 Fltanretry int32 Fltamcopy int32 Fltnamap int32 Fltnomap int32 Fltlget int32 Fltget int32 Flt_anon int32 Flt_acow int32 Flt_obj int32 Flt_prcopy int32 Flt_przero int32 Pdwoke int32 Pdrevs int32 Pdswout int32 Pdfreed int32 Pdscans int32 Pdanscan int32 Pdobscan int32 Pdreact int32 Pdbusy int32 Pdpageouts int32 Pdpending int32 Pddeact int32 Unused11 int32 Unused12 int32 Unused13 int32 Fpswtch int32 Kmapent int32 } const SizeofClockinfo = 0x10 type Clockinfo struct { Hz int32 Tick int32 Stathz int32 Profhz int32 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_openbsd_riscv64.go ================================================ // cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build riscv64 && 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 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 int32 Flags uint32 Gen uint32 _ 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]byte F_mntonname [90]byte F_mntfromname [90]byte F_mntfromspec [90]byte _ [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 _ [4]uint8 Name [256]int8 } type Fsid struct { Val [2]int32 } const ( PathMax = 0x400 ) 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 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 SizeofIovec = 0x10 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 = 0xa8 SizeofIfData = 0x90 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 Rdomain uint32 Baudrate uint64 Ipackets uint64 Ierrors uint64 Opackets uint64 Oerrors uint64 Collisions uint64 Ibytes uint64 Obytes uint64 Imcasts uint64 Omcasts uint64 Iqdrops uint64 Oqdrops uint64 Noproto uint64 Capabilities uint32 Lastchange Timeval } 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{} const ( SizeofBpfVersion = 0x4 SizeofBpfStat = 0x8 SizeofBpfProgram = 0x10 SizeofBpfInsn = 0x8 SizeofBpfHdr = 0x18 ) 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 Ifidx uint16 Flowid uint16 Flags uint8 Drops uint8 } 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 } type Winsize struct { Row uint16 Col uint16 Xpixel uint16 Ypixel uint16 } const ( AT_FDCWD = -0x64 AT_EACCESS = 0x1 AT_SYMLINK_NOFOLLOW = 0x2 AT_SYMLINK_FOLLOW = 0x4 AT_REMOVEDIR = 0x8 ) type PollFd struct { Fd int32 Events int16 Revents int16 } const ( POLLERR = 0x8 POLLHUP = 0x10 POLLIN = 0x1 POLLNVAL = 0x20 POLLOUT = 0x4 POLLPRI = 0x2 POLLRDBAND = 0x80 POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) type Sigset_t uint32 type Utsname struct { Sysname [256]byte Nodename [256]byte Release [256]byte Version [256]byte Machine [256]byte } const SizeofUvmexp = 0x158 type Uvmexp struct { Pagesize int32 Pagemask int32 Pageshift int32 Npages int32 Free int32 Active int32 Inactive int32 Paging int32 Wired int32 Zeropages int32 Reserve_pagedaemon int32 Reserve_kernel int32 Unused01 int32 Vnodepages int32 Vtextpages int32 Freemin int32 Freetarg int32 Inactarg int32 Wiredmax int32 Anonmin int32 Vtextmin int32 Vnodemin int32 Anonminpct int32 Vtextminpct int32 Vnodeminpct int32 Nswapdev int32 Swpages int32 Swpginuse int32 Swpgonly int32 Nswget int32 Nanon int32 Unused05 int32 Unused06 int32 Faults int32 Traps int32 Intrs int32 Swtch int32 Softs int32 Syscalls int32 Pageins int32 Unused07 int32 Unused08 int32 Pgswapin int32 Pgswapout int32 Forks int32 Forks_ppwait int32 Forks_sharevm int32 Pga_zerohit int32 Pga_zeromiss int32 Unused09 int32 Fltnoram int32 Fltnoanon int32 Fltnoamap int32 Fltpgwait int32 Fltpgrele int32 Fltrelck int32 Fltrelckok int32 Fltanget int32 Fltanretry int32 Fltamcopy int32 Fltnamap int32 Fltnomap int32 Fltlget int32 Fltget int32 Flt_anon int32 Flt_acow int32 Flt_obj int32 Flt_prcopy int32 Flt_przero int32 Pdwoke int32 Pdrevs int32 Pdswout int32 Pdfreed int32 Pdscans int32 Pdanscan int32 Pdobscan int32 Pdreact int32 Pdbusy int32 Pdpageouts int32 Pdpending int32 Pddeact int32 Unused11 int32 Unused12 int32 Unused13 int32 Fpswtch int32 Kmapent int32 } const SizeofClockinfo = 0x10 type Clockinfo struct { Hz int32 Tick int32 Stathz int32 Profhz int32 } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go ================================================ // cgo -godefs types_solaris.go | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. //go:build amd64 && solaris package unix const ( SizeofPtr = 0x8 SizeofShort = 0x2 SizeofInt = 0x4 SizeofLong = 0x8 SizeofLongLong = 0x8 PathMax = 0x400 MaxHostNameLen = 0x100 ) 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 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 Blocks int64 Fstype [16]int8 } type Flock_t struct { Type int16 Whence int16 Start int64 Len int64 Sysid int32 Pid int32 Pad [4]int64 } type Dirent struct { Ino uint64 Off int64 Reclen uint16 Name [1]int8 _ [5]byte } type _Fsblkcnt_t uint64 type Statvfs_t struct { Bsize uint64 Frsize uint64 Blocks uint64 Bfree uint64 Bavail uint64 Files uint64 Ffree uint64 Favail uint64 Fsid uint64 Basetype [16]int8 Flag uint64 Namemax uint64 Fstr [32]int8 } 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 _ 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 *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 Iov *Iovec Iovlen int32 Accrights *int8 Accrightslen int32 _ [4]byte } 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 = 0x20 SizeofSockaddrAny = 0xfc SizeofSockaddrUnix = 0x6e SizeofSockaddrDatalink = 0xfc SizeofLinger = 0x8 SizeofIovec = 0x10 SizeofIPMreq = 0x8 SizeofIPv6Mreq = 0x14 SizeofMsghdr = 0x30 SizeofCmsghdr = 0xc SizeofInet4Pktinfo = 0xc SizeofInet6Pktinfo = 0x14 SizeofIPv6MTUInfo = 0x24 SizeofICMPv6Filter = 0x20 ) type FdSet struct { Bits [1024]int64 } type Utsname struct { Sysname [257]byte Nodename [257]byte Release [257]byte Version [257]byte Machine [257]byte } type Ustat_t struct { Tfree int64 Tinode uint64 Fname [6]int8 Fpack [6]int8 _ [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 Data IfData } type IfData struct { Type uint8 Addrlen uint8 Hdrlen 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 Lastchange Timeval32 } type IfaMsghdr struct { Msglen uint16 Version uint8 Type uint8 Addrs int32 Flags int32 Index uint16 Metric int32 } type RtMsghdr struct { Msglen uint16 Version uint8 Type uint8 Index uint16 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 _ [13]uint64 } type BpfProgram struct { Len uint32 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 _ [2]byte } type Termios struct { Iflag uint32 Oflag uint32 Cflag uint32 Lflag uint32 Cc [19]uint8 _ [1]byte } type Termio struct { Iflag uint16 Oflag uint16 Cflag uint16 Lflag uint16 Line int8 Cc [8]uint8 _ [1]byte } type Winsize struct { Row uint16 Col uint16 Xpixel uint16 Ypixel uint16 } type PollFd struct { Fd int32 Events int16 Revents int16 } const ( POLLERR = 0x8 POLLHUP = 0x10 POLLIN = 0x1 POLLNVAL = 0x20 POLLOUT = 0x4 POLLPRI = 0x2 POLLRDBAND = 0x80 POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 ) type fileObj struct { Atim Timespec Mtim Timespec Ctim Timespec Pad [3]uint64 Name *int8 } type portEvent struct { Events int32 Source uint16 Pad uint16 Object uint64 User *byte } const ( PORT_SOURCE_AIO = 0x1 PORT_SOURCE_TIMER = 0x2 PORT_SOURCE_USER = 0x3 PORT_SOURCE_FD = 0x4 PORT_SOURCE_ALERT = 0x5 PORT_SOURCE_MQ = 0x6 PORT_SOURCE_FILE = 0x7 PORT_ALERT_SET = 0x1 PORT_ALERT_UPDATE = 0x2 PORT_ALERT_INVALID = 0x3 FILE_ACCESS = 0x1 FILE_MODIFIED = 0x2 FILE_ATTRIB = 0x4 FILE_TRUNC = 0x100000 FILE_NOFOLLOW = 0x10000000 FILE_DELETE = 0x10 FILE_RENAME_TO = 0x20 FILE_RENAME_FROM = 0x40 UNMOUNTED = 0x20000000 MOUNTEDOVER = 0x40000000 FILE_EXCEPTION = 0x60000070 ) const ( TUNNEWPPA = 0x540001 TUNSETPPA = 0x540002 I_STR = 0x5308 I_POP = 0x5303 I_PUSH = 0x5302 I_LINK = 0x530c I_UNLINK = 0x530d I_PLINK = 0x5316 I_PUNLINK = 0x5317 IF_UNITSEL = -0x7ffb8cca ) type strbuf struct { Maxlen int32 Len int32 Buf *int8 } type Strioctl struct { Cmd int32 Timout int32 Len int32 Dp *int8 } type Lifreq struct { Name [32]int8 Lifru1 [4]byte Type uint32 Lifru [336]byte } ================================================ FILE: vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go ================================================ // Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build zos && s390x // Hand edited based on ztypes_linux_s390x.go // TODO: auto-generate. package unix const ( SizeofPtr = 0x8 SizeofShort = 0x2 SizeofInt = 0x4 SizeofLong = 0x8 SizeofLongLong = 0x8 PathMax = 0x1000 ) const ( SizeofSockaddrAny = 128 SizeofCmsghdr = 12 SizeofIPMreq = 8 SizeofIPv6Mreq = 20 SizeofICMPv6Filter = 32 SizeofIPv6MTUInfo = 32 SizeofInet4Pktinfo = 8 SizeofInet6Pktinfo = 20 SizeofLinger = 8 SizeofSockaddrInet4 = 16 SizeofSockaddrInet6 = 28 SizeofTCPInfo = 0x68 SizeofUcred = 12 ) 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 timeval_zos struct { //correct (with padding and all) Sec int64 _ [4]byte // pad Usec int32 } type Tms struct { //clock_t is 4-byte unsigned int in zos Utime uint32 Stime uint32 Cutime uint32 Cstime uint32 } type Time_t int64 type Utimbuf struct { Actime int64 Modtime int64 } type Utsname struct { Sysname [16]byte Nodename [32]byte Release [8]byte Version [8]byte Machine [16]byte } type Ucred struct { Pid int32 Uid uint32 Gid uint32 } type RawSockaddrInet4 struct { Len uint8 Family uint8 Port uint16 Addr [4]byte /* in_addr */ Zero [8]uint8 } 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 [108]int8 } type RawSockaddr struct { Len uint8 Family uint8 Data [14]uint8 } type RawSockaddrAny struct { Addr RawSockaddr _ [112]uint8 // pad } 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 Iov *Iovec Control *byte Flags int32 Namelen int32 Iovlen int32 Controllen int32 } type Cmsghdr struct { Len int32 Level int32 Type int32 } type Inet4Pktinfo struct { Addr [4]byte /* in_addr */ Ifindex uint32 } type Inet6Pktinfo struct { Addr [16]byte /* in6_addr */ Ifindex uint32 } type IPv6MTUInfo struct { Addr RawSockaddrInet6 Mtu uint32 } type ICMPv6Filter struct { Data [8]uint32 } type TCPInfo struct { State uint8 Ca_state uint8 Retransmits uint8 Probes uint8 Backoff uint8 Options uint8 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 } type _Gid_t uint32 type rusage_zos struct { Utime timeval_zos Stime timeval_zos } 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 } // { int, short, short } in poll.h type PollFd struct { Fd int32 Events int16 Revents int16 } type Stat_t struct { //Linux Definition Dev uint64 Ino uint64 Nlink uint64 Mode uint32 Uid uint32 Gid uint32 _ int32 Rdev uint64 Size int64 Atim Timespec Mtim Timespec Ctim Timespec Blksize int64 Blocks int64 _ [3]int64 } type Stat_LE_t struct { _ [4]byte // eye catcher Length uint16 Version uint16 Mode int32 Ino uint32 Dev uint32 Nlink int32 Uid int32 Gid int32 Size int64 Atim31 [4]byte Mtim31 [4]byte Ctim31 [4]byte Rdev uint32 Auditoraudit uint32 Useraudit uint32 Blksize int32 Creatim31 [4]byte AuditID [16]byte _ [4]byte // rsrvd1 File_tag struct { Ccsid uint16 Txtflag uint16 // aggregating Txflag:1 deferred:1 rsvflags:14 } CharsetID [8]byte Blocks int64 Genvalue uint32 Reftim31 [4]byte Fid [8]byte Filefmt byte Fspflag2 byte _ [2]byte // rsrvd2 Ctimemsec int32 Seclabel [8]byte _ [4]byte // rsrvd3 _ [4]byte // rsrvd4 Atim Time_t Mtim Time_t Ctim Time_t Creatim Time_t Reftim Time_t _ [24]byte // rsrvd5 } type Statvfs_t struct { ID [4]byte Len int32 Bsize uint64 Blocks uint64 Usedspace uint64 Bavail uint64 Flag uint64 Maxfilesize int64 _ [16]byte Frsize uint64 Bfree uint64 Files uint32 Ffree uint32 Favail uint32 Namemax31 uint32 Invarsec uint32 _ [4]byte Fsid uint64 Namemax uint64 } type Statfs_t struct { Type uint64 Bsize uint64 Blocks uint64 Bfree uint64 Bavail uint64 Files uint32 Ffree uint32 Fsid uint64 Namelen uint64 Frsize uint64 Flags uint64 _ [4]uint64 } type direntLE struct { Reclen uint16 Namlen uint16 Ino uint32 Extra uintptr Name [256]byte } type Dirent struct { Ino uint64 Off int64 Reclen uint16 Type uint8 Name [256]uint8 _ [5]byte } type FdSet struct { Bits [64]int32 } // This struct is packed on z/OS so it can't be used directly. type Flock_t struct { Type int16 Whence int16 Start int64 Len int64 Pid int32 } type Termios struct { Cflag uint32 Iflag uint32 Lflag uint32 Oflag uint32 Cc [11]uint8 } type Winsize struct { Row uint16 Col uint16 Xpixel uint16 Ypixel uint16 } type W_Mnth struct { Hid [4]byte Size int32 Cur1 int32 //32bit pointer Cur2 int32 //^ Devno uint32 _ [4]byte } type W_Mntent struct { Fstype uint32 Mode uint32 Dev uint32 Parentdev uint32 Rootino uint32 Status byte Ddname [9]byte Fstname [9]byte Fsname [45]byte Pathlen uint32 Mountpoint [1024]byte Jobname [8]byte PID int32 Parmoffset int32 Parmlen int16 Owner [8]byte Quiesceowner [8]byte _ [38]byte } type EpollEvent struct { Events uint32 _ int32 Fd int32 Pad int32 } type InotifyEvent struct { Wd int32 Mask uint32 Cookie uint32 Len uint32 Name string } const ( SizeofInotifyEvent = 0x10 ) type ConsMsg2 struct { Cm2Format uint16 Cm2R1 uint16 Cm2Msglength uint32 Cm2Msg *byte Cm2R2 [4]byte Cm2R3 [4]byte Cm2Routcde *uint32 Cm2Descr *uint32 Cm2Msgflag uint32 Cm2Token uint32 Cm2Msgid *uint32 Cm2R4 [4]byte Cm2DomToken uint32 Cm2DomMsgid *uint32 Cm2ModCartptr *byte Cm2ModConsidptr *byte Cm2MsgCart [8]byte Cm2MsgConsid [4]byte Cm2R5 [12]byte } const ( CC_modify = 1 CC_stop = 2 CONSOLE_FORMAT_2 = 2 CONSOLE_FORMAT_3 = 3 CONSOLE_HRDCPY = 0x80000000 ) type OpenHow struct { Flags uint64 Mode uint64 Resolve uint64 } const SizeofOpenHow = 0x18 const ( RESOLVE_CACHED = 0x20 RESOLVE_BENEATH = 0x8 RESOLVE_IN_ROOT = 0x10 RESOLVE_NO_MAGICLINKS = 0x2 RESOLVE_NO_SYMLINKS = 0x4 RESOLVE_NO_XDEV = 0x1 ) type Siginfo struct { Signo int32 Errno int32 Code int32 Pid int32 Uid uint32 _ [44]byte } type SysvIpcPerm struct { Uid uint32 Gid uint32 Cuid uint32 Cgid uint32 Mode int32 } type SysvShmDesc struct { Perm SysvIpcPerm _ [4]byte Lpid int32 Cpid int32 Nattch uint32 _ [4]byte _ [4]byte _ [4]byte _ int32 _ uint8 _ uint8 _ uint16 _ *byte Segsz uint64 Atime Time_t Dtime Time_t Ctime Time_t } type SysvShmDesc64 struct { Perm SysvIpcPerm _ [4]byte Lpid int32 Cpid int32 Nattch uint32 _ [4]byte _ [4]byte _ [4]byte _ int32 _ byte _ uint8 _ uint16 _ *byte Segsz uint64 Atime int64 Dtime int64 Ctime int64 } ================================================ FILE: vendor/golang.org/x/sys/windows/aliases.go ================================================ // Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build windows package windows import "syscall" type Errno = syscall.Errno type SysProcAttr = syscall.SysProcAttr ================================================ FILE: vendor/golang.org/x/sys/windows/dll_windows.go ================================================ // 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" ) // We need to use LoadLibrary and GetProcAddress from the Go runtime, because // the these symbols are loaded by the system linker and are required to // dynamically load additional symbols. Note that in the Go runtime, these // return syscall.Handle and syscall.Errno, but these are the same, in fact, // as windows.Handle and windows.Errno, and we intend to keep these the same. //go:linkname syscall_loadlibrary syscall.loadlibrary func syscall_loadlibrary(filename *uint16) (handle Handle, err Errno) //go:linkname syscall_getprocaddress syscall.getprocaddress func syscall_getprocaddress(handle Handle, procname *uint8) (proc uintptr, err Errno) // DLLError describes reasons for DLL load failures. type DLLError struct { Err error ObjName string Msg string } func (e *DLLError) Error() string { return e.Msg } func (e *DLLError) Unwrap() error { return e.Err } // A DLL implements access to a single DLL. type DLL struct { Name string Handle Handle } // LoadDLL loads DLL file into memory. // // Warning: using LoadDLL without an absolute path name is subject to // DLL preloading attacks. To safely load a system DLL, use LazyDLL // with System set to true, or use LoadLibraryEx directly. func LoadDLL(name string) (dll *DLL, err error) { namep, err := UTF16PtrFromString(name) if err != nil { return nil, err } h, e := syscall_loadlibrary(namep) if e != 0 { return nil, &DLLError{ Err: e, ObjName: name, Msg: "Failed to load " + name + ": " + e.Error(), } } d := &DLL{ Name: name, 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 := syscall_getprocaddress(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 } // FindProcByOrdinal searches DLL d for procedure by ordinal and returns *Proc // if found. It returns an error if search fails. func (d *DLL) FindProcByOrdinal(ordinal uintptr) (proc *Proc, err error) { a, e := GetProcAddressByOrdinal(d.Handle, ordinal) name := "#" + itoa(int(ordinal)) if e != nil { 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 } // MustFindProcByOrdinal is like FindProcByOrdinal but panics if search fails. func (d *DLL) MustFindProcByOrdinal(ordinal uintptr) *Proc { p, e := d.FindProcByOrdinal(ordinal) 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 } //go:uintptrescapes // Call executes procedure p with arguments a. It will panic, if more than 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)) + ".") } } // 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 { Name string // System determines whether the DLL must be loaded from the // Windows System directory, bypassing the normal DLL search // path. System bool mu sync.Mutex dll *DLL // non nil once DLL is loaded } // 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 { return nil } d.mu.Lock() defer d.mu.Unlock() if d.dll != nil { return nil } // kernel32.dll is special, since it's where LoadLibraryEx comes from. // The kernel already special-cases its name, so it's always // loaded from system32. var dll *DLL var err error if d.Name == "kernel32.dll" { dll, err = LoadDLL(d.Name) } else { dll, err = loadLibraryEx(d.Name, d.System) } if err != nil { return err } // 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} } // NewLazySystemDLL is like NewLazyDLL, but will only // search Windows System directory for the DLL if name is // a base name (like "advapi32.dll"). func NewLazySystemDLL(name string) *LazyDLL { return &LazyDLL{Name: name, System: true} } // A LazyProc implements access to a procedure inside a LazyDLL. // It delays the lookup until the Addr method is called. type LazyProc struct { Name string mu sync.Mutex 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. // It will panic if the procedure cannot be found. func (p *LazyProc) Addr() uintptr { p.mustFind() return p.proc.Addr() } //go:uintptrescapes // Call executes procedure p with arguments a. It will panic, if more than 15 arguments // are supplied. It will also panic if the procedure cannot be found. // // 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...) } var canDoSearchSystem32Once struct { sync.Once v bool } func initCanDoSearchSystem32() { // https://msdn.microsoft.com/en-us/library/ms684179(v=vs.85).aspx says: // "Windows 7, Windows Server 2008 R2, Windows Vista, and Windows // Server 2008: The LOAD_LIBRARY_SEARCH_* flags are available on // systems that have KB2533623 installed. To determine whether the // flags are available, use GetProcAddress to get the address of the // AddDllDirectory, RemoveDllDirectory, or SetDefaultDllDirectories // function. If GetProcAddress succeeds, the LOAD_LIBRARY_SEARCH_* // flags can be used with LoadLibraryEx." canDoSearchSystem32Once.v = (modkernel32.NewProc("AddDllDirectory").Find() == nil) } func canDoSearchSystem32() bool { canDoSearchSystem32Once.Do(initCanDoSearchSystem32) return canDoSearchSystem32Once.v } func isBaseName(name string) bool { for _, c := range name { if c == ':' || c == '/' || c == '\\' { return false } } return true } // loadLibraryEx wraps the Windows LoadLibraryEx function. // // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms684179(v=vs.85).aspx // // If name is not an absolute path, LoadLibraryEx searches for the DLL // in a variety of automatic locations unless constrained by flags. // See: https://msdn.microsoft.com/en-us/library/ff919712%28VS.85%29.aspx func loadLibraryEx(name string, system bool) (*DLL, error) { loadDLL := name var flags uintptr if system { if canDoSearchSystem32() { flags = LOAD_LIBRARY_SEARCH_SYSTEM32 } else if isBaseName(name) { // WindowsXP or unpatched Windows machine // trying to load "foo.dll" out of the system // folder, but LoadLibraryEx doesn't support // that yet on their system, so emulate it. systemdir, err := GetSystemDirectory() if err != nil { return nil, err } loadDLL = systemdir + "\\" + name } } h, err := LoadLibraryEx(loadDLL, 0, flags) if err != nil { return nil, err } return &DLL{Name: name, Handle: h}, nil } type errString string func (s errString) Error() string { return string(s) } ================================================ FILE: vendor/golang.org/x/sys/windows/env_windows.go ================================================ // 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" "unsafe" ) 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() } // Returns a default environment associated with the token, rather than the current // process. If inheritExisting is true, then this environment also inherits the // environment of the current process. func (token Token) Environ(inheritExisting bool) (env []string, err error) { var block *uint16 err = CreateEnvironmentBlock(&block, token, inheritExisting) if err != nil { return nil, err } defer DestroyEnvironmentBlock(block) size := unsafe.Sizeof(*block) for *block != 0 { // find NUL terminator end := unsafe.Pointer(block) for *(*uint16)(end) != 0 { end = unsafe.Add(end, size) } entry := unsafe.Slice(block, (uintptr(end)-uintptr(unsafe.Pointer(block)))/size) env = append(env, UTF16ToString(entry)) block = (*uint16)(unsafe.Add(end, size)) } return env, nil } func Unsetenv(key string) error { return syscall.Unsetenv(key) } ================================================ FILE: vendor/golang.org/x/sys/windows/eventlog.go ================================================ // 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. //go: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 ================================================ FILE: vendor/golang.org/x/sys/windows/exec_windows.go ================================================ // 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 import ( errorspkg "errors" "unsafe" ) // 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 // Reserve space for quotes. } 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]) } // ComposeCommandLine escapes and joins the given arguments suitable for use as a Windows command line, // in CreateProcess's CommandLine argument, CreateService/ChangeServiceConfig's BinaryPathName argument, // or any program that uses CommandLineToArgv. func ComposeCommandLine(args []string) string { if len(args) == 0 { return "" } // Per https://learn.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-commandlinetoargvw: // “This function accepts command lines that contain a program name; the // program name can be enclosed in quotation marks or not.” // // Unfortunately, it provides no means of escaping interior quotation marks // within that program name, and we have no way to report them here. prog := args[0] mustQuote := len(prog) == 0 for i := 0; i < len(prog); i++ { c := prog[i] if c <= ' ' || (c == '"' && i == 0) { // Force quotes for not only the ASCII space and tab as described in the // MSDN article, but also ASCII control characters. // The documentation for CommandLineToArgvW doesn't say what happens when // the first argument is not a valid program name, but it empirically // seems to drop unquoted control characters. mustQuote = true break } } var commandLine []byte if mustQuote { commandLine = make([]byte, 0, len(prog)+2) commandLine = append(commandLine, '"') for i := 0; i < len(prog); i++ { c := prog[i] if c == '"' { // This quote would interfere with our surrounding quotes. // We have no way to report an error, so just strip out // the offending character instead. continue } commandLine = append(commandLine, c) } commandLine = append(commandLine, '"') } else { if len(args) == 1 { // args[0] is a valid command line representing itself. // No need to allocate a new slice or string for it. return prog } commandLine = []byte(prog) } for _, arg := range args[1:] { commandLine = append(commandLine, ' ') // TODO(bcmills): since we're already appending to a slice, it would be nice // to avoid the intermediate allocations of EscapeArg. // Perhaps we can factor out an appendEscapedArg function. commandLine = append(commandLine, EscapeArg(arg)...) } return string(commandLine) } // DecomposeCommandLine breaks apart its argument command line into unescaped parts using CommandLineToArgv, // as gathered from GetCommandLine, QUERY_SERVICE_CONFIG's BinaryPathName argument, or elsewhere that // command lines are passed around. // DecomposeCommandLine returns an error if commandLine contains NUL. func DecomposeCommandLine(commandLine string) ([]string, error) { if len(commandLine) == 0 { return []string{}, nil } utf16CommandLine, err := UTF16FromString(commandLine) if err != nil { return nil, errorspkg.New("string with NUL passed to DecomposeCommandLine") } var argc int32 argv, err := commandLineToArgv(&utf16CommandLine[0], &argc) if err != nil { return nil, err } defer LocalFree(Handle(unsafe.Pointer(argv))) var args []string for _, p := range unsafe.Slice(argv, argc) { args = append(args, UTF16PtrToString(p)) } return args, nil } // CommandLineToArgv parses a Unicode command line string and sets // argc to the number of parsed arguments. // // The returned memory should be freed using a single call to LocalFree. // // Note that although the return type of CommandLineToArgv indicates 8192 // entries of up to 8192 characters each, the actual count of parsed arguments // may exceed 8192, and the documentation for CommandLineToArgvW does not mention // any bound on the lengths of the individual argument strings. // (See https://go.dev/issue/63236.) func CommandLineToArgv(cmd *uint16, argc *int32) (argv *[8192]*[8192]uint16, err error) { argp, err := commandLineToArgv(cmd, argc) argv = (*[8192]*[8192]uint16)(unsafe.Pointer(argp)) return argv, err } 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 } } } // NewProcThreadAttributeList allocates a new ProcThreadAttributeListContainer, with the requested maximum number of attributes. func NewProcThreadAttributeList(maxAttrCount uint32) (*ProcThreadAttributeListContainer, error) { var size uintptr err := initializeProcThreadAttributeList(nil, maxAttrCount, 0, &size) if err != ERROR_INSUFFICIENT_BUFFER { if err == nil { return nil, errorspkg.New("unable to query buffer size from InitializeProcThreadAttributeList") } return nil, err } alloc, err := LocalAlloc(LMEM_FIXED, uint32(size)) if err != nil { return nil, err } // size is guaranteed to be ≥1 by InitializeProcThreadAttributeList. al := &ProcThreadAttributeListContainer{data: (*ProcThreadAttributeList)(unsafe.Pointer(alloc))} err = initializeProcThreadAttributeList(al.data, maxAttrCount, 0, &size) if err != nil { return nil, err } return al, err } // Update modifies the ProcThreadAttributeList using UpdateProcThreadAttribute. func (al *ProcThreadAttributeListContainer) Update(attribute uintptr, value unsafe.Pointer, size uintptr) error { al.pointers = append(al.pointers, value) return updateProcThreadAttribute(al.data, 0, attribute, value, size, nil, nil) } // Delete frees ProcThreadAttributeList's resources. func (al *ProcThreadAttributeListContainer) Delete() { deleteProcThreadAttributeList(al.data) LocalFree(Handle(unsafe.Pointer(al.data))) al.data = nil al.pointers = nil } // List returns the actual ProcThreadAttributeList to be passed to StartupInfoEx. func (al *ProcThreadAttributeListContainer) List() *ProcThreadAttributeList { return al.data } ================================================ FILE: vendor/golang.org/x/sys/windows/memory_windows.go ================================================ // Copyright 2017 The Go 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 const ( MEM_COMMIT = 0x00001000 MEM_RESERVE = 0x00002000 MEM_DECOMMIT = 0x00004000 MEM_RELEASE = 0x00008000 MEM_RESET = 0x00080000 MEM_TOP_DOWN = 0x00100000 MEM_WRITE_WATCH = 0x00200000 MEM_PHYSICAL = 0x00400000 MEM_RESET_UNDO = 0x01000000 MEM_LARGE_PAGES = 0x20000000 PAGE_NOACCESS = 0x00000001 PAGE_READONLY = 0x00000002 PAGE_READWRITE = 0x00000004 PAGE_WRITECOPY = 0x00000008 PAGE_EXECUTE = 0x00000010 PAGE_EXECUTE_READ = 0x00000020 PAGE_EXECUTE_READWRITE = 0x00000040 PAGE_EXECUTE_WRITECOPY = 0x00000080 PAGE_GUARD = 0x00000100 PAGE_NOCACHE = 0x00000200 PAGE_WRITECOMBINE = 0x00000400 PAGE_TARGETS_INVALID = 0x40000000 PAGE_TARGETS_NO_UPDATE = 0x40000000 QUOTA_LIMITS_HARDWS_MIN_DISABLE = 0x00000002 QUOTA_LIMITS_HARDWS_MIN_ENABLE = 0x00000001 QUOTA_LIMITS_HARDWS_MAX_DISABLE = 0x00000008 QUOTA_LIMITS_HARDWS_MAX_ENABLE = 0x00000004 ) type MemoryBasicInformation struct { BaseAddress uintptr AllocationBase uintptr AllocationProtect uint32 PartitionId uint16 RegionSize uintptr State uint32 Protect uint32 Type uint32 } ================================================ FILE: vendor/golang.org/x/sys/windows/mkerrors.bash ================================================ #!/bin/bash # Copyright 2019 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. set -e shopt -s nullglob winerror="$(printf '%s\n' "/mnt/c/Program Files (x86)/Windows Kits/"/*/Include/*/shared/winerror.h | sort -Vr | head -n 1)" [[ -n $winerror ]] || { echo "Unable to find winerror.h" >&2; exit 1; } ntstatus="$(printf '%s\n' "/mnt/c/Program Files (x86)/Windows Kits/"/*/Include/*/shared/ntstatus.h | sort -Vr | head -n 1)" [[ -n $ntstatus ]] || { echo "Unable to find ntstatus.h" >&2; exit 1; } declare -A errors { echo "// Code generated by 'mkerrors.bash'; DO NOT EDIT." echo echo "package windows" echo "import \"syscall\"" echo "const (" while read -r line; do unset vtype if [[ $line =~ ^#define\ +([A-Z0-9_]+k?)\ +([A-Z0-9_]+\()?([A-Z][A-Z0-9_]+k?)\)? ]]; then key="${BASH_REMATCH[1]}" value="${BASH_REMATCH[3]}" elif [[ $line =~ ^#define\ +([A-Z0-9_]+k?)\ +([A-Z0-9_]+\()?((0x)?[0-9A-Fa-f]+)L?\)? ]]; then key="${BASH_REMATCH[1]}" value="${BASH_REMATCH[3]}" vtype="${BASH_REMATCH[2]}" elif [[ $line =~ ^#define\ +([A-Z0-9_]+k?)\ +\(\(([A-Z]+)\)((0x)?[0-9A-Fa-f]+)L?\) ]]; then key="${BASH_REMATCH[1]}" value="${BASH_REMATCH[3]}" vtype="${BASH_REMATCH[2]}" else continue fi [[ -n $key && -n $value ]] || continue [[ -z ${errors["$key"]} ]] || continue errors["$key"]="$value" if [[ -v vtype ]]; then if [[ $key == FACILITY_* || $key == NO_ERROR ]]; then vtype="" elif [[ $vtype == *HANDLE* || $vtype == *HRESULT* ]]; then vtype="Handle" else vtype="syscall.Errno" fi last_vtype="$vtype" else vtype="" if [[ $last_vtype == Handle && $value == NO_ERROR ]]; then value="S_OK" elif [[ $last_vtype == syscall.Errno && $value == NO_ERROR ]]; then value="ERROR_SUCCESS" fi fi echo "$key $vtype = $value" done < "$winerror" while read -r line; do [[ $line =~ ^#define\ (STATUS_[^\s]+)\ +\(\(NTSTATUS\)((0x)?[0-9a-fA-F]+)L?\) ]] || continue echo "${BASH_REMATCH[1]} NTStatus = ${BASH_REMATCH[2]}" done < "$ntstatus" echo ")" } | gofmt > "zerrors_windows.go" ================================================ FILE: vendor/golang.org/x/sys/windows/mkknownfolderids.bash ================================================ #!/bin/bash # Copyright 2019 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. set -e shopt -s nullglob knownfolders="$(printf '%s\n' "/mnt/c/Program Files (x86)/Windows Kits/"/*/Include/*/um/KnownFolders.h | sort -Vr | head -n 1)" [[ -n $knownfolders ]] || { echo "Unable to find KnownFolders.h" >&2; exit 1; } { echo "// Code generated by 'mkknownfolderids.bash'; DO NOT EDIT." echo echo "package windows" echo "type KNOWNFOLDERID GUID" echo "var (" while read -r line; do [[ $line =~ DEFINE_KNOWN_FOLDER\((FOLDERID_[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+),[\t\ ]*(0x[^,]+)\) ]] || continue printf "%s = &KNOWNFOLDERID{0x%08x, 0x%04x, 0x%04x, [8]byte{0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x}}\n" \ "${BASH_REMATCH[1]}" $(( "${BASH_REMATCH[2]}" )) $(( "${BASH_REMATCH[3]}" )) $(( "${BASH_REMATCH[4]}" )) \ $(( "${BASH_REMATCH[5]}" )) $(( "${BASH_REMATCH[6]}" )) $(( "${BASH_REMATCH[7]}" )) $(( "${BASH_REMATCH[8]}" )) \ $(( "${BASH_REMATCH[9]}" )) $(( "${BASH_REMATCH[10]}" )) $(( "${BASH_REMATCH[11]}" )) $(( "${BASH_REMATCH[12]}" )) done < "$knownfolders" echo ")" } | gofmt > "zknownfolderids_windows.go" ================================================ FILE: vendor/golang.org/x/sys/windows/mksyscall.go ================================================ // 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. //go:build generate package windows //go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go setupapi_windows.go ================================================ FILE: vendor/golang.org/x/sys/windows/race.go ================================================ // 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. //go: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) } ================================================ FILE: vendor/golang.org/x/sys/windows/race0.go ================================================ // 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. //go: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) { } ================================================ FILE: vendor/golang.org/x/sys/windows/security_windows.go ================================================ // 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 ( 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 //sys NetUserEnum(serverName *uint16, level uint32, filter uint32, buf **byte, prefMaxLen uint32, entriesRead *uint32, totalEntries *uint32, resumeHandle *uint32) (neterr error) = netapi32.NetUserEnum 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 ) // Predefined domain-relative RIDs for local groups. // See https://msdn.microsoft.com/en-us/library/windows/desktop/aa379649(v=vs.85).aspx const ( DOMAIN_ALIAS_RID_ADMINS = 0x220 DOMAIN_ALIAS_RID_USERS = 0x221 DOMAIN_ALIAS_RID_GUESTS = 0x222 DOMAIN_ALIAS_RID_POWER_USERS = 0x223 DOMAIN_ALIAS_RID_ACCOUNT_OPS = 0x224 DOMAIN_ALIAS_RID_SYSTEM_OPS = 0x225 DOMAIN_ALIAS_RID_PRINT_OPS = 0x226 DOMAIN_ALIAS_RID_BACKUP_OPS = 0x227 DOMAIN_ALIAS_RID_REPLICATOR = 0x228 DOMAIN_ALIAS_RID_RAS_SERVERS = 0x229 DOMAIN_ALIAS_RID_PREW2KCOMPACCESS = 0x22a DOMAIN_ALIAS_RID_REMOTE_DESKTOP_USERS = 0x22b DOMAIN_ALIAS_RID_NETWORK_CONFIGURATION_OPS = 0x22c DOMAIN_ALIAS_RID_INCOMING_FOREST_TRUST_BUILDERS = 0x22d DOMAIN_ALIAS_RID_MONITORING_USERS = 0x22e DOMAIN_ALIAS_RID_LOGGING_USERS = 0x22f DOMAIN_ALIAS_RID_AUTHORIZATIONACCESS = 0x230 DOMAIN_ALIAS_RID_TS_LICENSE_SERVERS = 0x231 DOMAIN_ALIAS_RID_DCOM_USERS = 0x232 DOMAIN_ALIAS_RID_IUSERS = 0x238 DOMAIN_ALIAS_RID_CRYPTO_OPERATORS = 0x239 DOMAIN_ALIAS_RID_CACHEABLE_PRINCIPALS_GROUP = 0x23b DOMAIN_ALIAS_RID_NON_CACHEABLE_PRINCIPALS_GROUP = 0x23c DOMAIN_ALIAS_RID_EVENT_LOG_READERS_GROUP = 0x23d DOMAIN_ALIAS_RID_CERTSVC_DCOM_ACCESS_GROUP = 0x23e ) //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 createWellKnownSid(sidType WELL_KNOWN_SID_TYPE, domainSid *SID, sid *SID, sizeSid *uint32) (err error) = advapi32.CreateWellKnownSid //sys isWellKnownSid(sid *SID, sidType WELL_KNOWN_SID_TYPE) (isWellKnown bool) = advapi32.IsWellKnownSid //sys FreeSid(sid *SID) (err error) [failretval!=0] = advapi32.FreeSid //sys EqualSid(sid1 *SID, sid2 *SID) (isEqual bool) = advapi32.EqualSid //sys getSidIdentifierAuthority(sid *SID) (authority *SidIdentifierAuthority) = advapi32.GetSidIdentifierAuthority //sys getSidSubAuthorityCount(sid *SID) (count *uint8) = advapi32.GetSidSubAuthorityCount //sys getSidSubAuthority(sid *SID, index uint32) (subAuthority *uint32) = advapi32.GetSidSubAuthority //sys isValidSid(sid *SID) (isValid bool) = advapi32.IsValidSid // 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 { var s *uint16 e := ConvertSidToStringSid(sid, &s) if e != nil { return "" } defer LocalFree((Handle)(unsafe.Pointer(s))) return UTF16ToString((*[256]uint16)(unsafe.Pointer(s))[:]) } // 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 } // IdentifierAuthority returns the identifier authority of the SID. func (sid *SID) IdentifierAuthority() SidIdentifierAuthority { return *getSidIdentifierAuthority(sid) } // SubAuthorityCount returns the number of sub-authorities in the SID. func (sid *SID) SubAuthorityCount() uint8 { return *getSidSubAuthorityCount(sid) } // SubAuthority returns the sub-authority of the SID as specified by // the index, which must be less than sid.SubAuthorityCount(). func (sid *SID) SubAuthority(idx uint32) uint32 { if idx >= uint32(sid.SubAuthorityCount()) { panic("sub-authority index out of range") } return *getSidSubAuthority(sid, idx) } // IsValid returns whether the SID has a valid revision and length. func (sid *SID) IsValid() bool { return isValidSid(sid) } // Equals compares two SIDs for equality. func (sid *SID) Equals(sid2 *SID) bool { return EqualSid(sid, sid2) } // IsWellKnown determines whether the SID matches the well-known sidType. func (sid *SID) IsWellKnown(sidType WELL_KNOWN_SID_TYPE) bool { return isWellKnownSid(sid, sidType) } // 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 } } } // Various types of pre-specified SIDs that can be synthesized and compared at runtime. type WELL_KNOWN_SID_TYPE uint32 const ( WinNullSid = 0 WinWorldSid = 1 WinLocalSid = 2 WinCreatorOwnerSid = 3 WinCreatorGroupSid = 4 WinCreatorOwnerServerSid = 5 WinCreatorGroupServerSid = 6 WinNtAuthoritySid = 7 WinDialupSid = 8 WinNetworkSid = 9 WinBatchSid = 10 WinInteractiveSid = 11 WinServiceSid = 12 WinAnonymousSid = 13 WinProxySid = 14 WinEnterpriseControllersSid = 15 WinSelfSid = 16 WinAuthenticatedUserSid = 17 WinRestrictedCodeSid = 18 WinTerminalServerSid = 19 WinRemoteLogonIdSid = 20 WinLogonIdsSid = 21 WinLocalSystemSid = 22 WinLocalServiceSid = 23 WinNetworkServiceSid = 24 WinBuiltinDomainSid = 25 WinBuiltinAdministratorsSid = 26 WinBuiltinUsersSid = 27 WinBuiltinGuestsSid = 28 WinBuiltinPowerUsersSid = 29 WinBuiltinAccountOperatorsSid = 30 WinBuiltinSystemOperatorsSid = 31 WinBuiltinPrintOperatorsSid = 32 WinBuiltinBackupOperatorsSid = 33 WinBuiltinReplicatorSid = 34 WinBuiltinPreWindows2000CompatibleAccessSid = 35 WinBuiltinRemoteDesktopUsersSid = 36 WinBuiltinNetworkConfigurationOperatorsSid = 37 WinAccountAdministratorSid = 38 WinAccountGuestSid = 39 WinAccountKrbtgtSid = 40 WinAccountDomainAdminsSid = 41 WinAccountDomainUsersSid = 42 WinAccountDomainGuestsSid = 43 WinAccountComputersSid = 44 WinAccountControllersSid = 45 WinAccountCertAdminsSid = 46 WinAccountSchemaAdminsSid = 47 WinAccountEnterpriseAdminsSid = 48 WinAccountPolicyAdminsSid = 49 WinAccountRasAndIasServersSid = 50 WinNTLMAuthenticationSid = 51 WinDigestAuthenticationSid = 52 WinSChannelAuthenticationSid = 53 WinThisOrganizationSid = 54 WinOtherOrganizationSid = 55 WinBuiltinIncomingForestTrustBuildersSid = 56 WinBuiltinPerfMonitoringUsersSid = 57 WinBuiltinPerfLoggingUsersSid = 58 WinBuiltinAuthorizationAccessSid = 59 WinBuiltinTerminalServerLicenseServersSid = 60 WinBuiltinDCOMUsersSid = 61 WinBuiltinIUsersSid = 62 WinIUserSid = 63 WinBuiltinCryptoOperatorsSid = 64 WinUntrustedLabelSid = 65 WinLowLabelSid = 66 WinMediumLabelSid = 67 WinHighLabelSid = 68 WinSystemLabelSid = 69 WinWriteRestrictedCodeSid = 70 WinCreatorOwnerRightsSid = 71 WinCacheablePrincipalsGroupSid = 72 WinNonCacheablePrincipalsGroupSid = 73 WinEnterpriseReadonlyControllersSid = 74 WinAccountReadonlyControllersSid = 75 WinBuiltinEventLogReadersGroup = 76 WinNewEnterpriseReadonlyControllersSid = 77 WinBuiltinCertSvcDComAccessGroup = 78 WinMediumPlusLabelSid = 79 WinLocalLogonSid = 80 WinConsoleLogonSid = 81 WinThisOrganizationCertificateSid = 82 WinApplicationPackageAuthoritySid = 83 WinBuiltinAnyPackageSid = 84 WinCapabilityInternetClientSid = 85 WinCapabilityInternetClientServerSid = 86 WinCapabilityPrivateNetworkClientServerSid = 87 WinCapabilityPicturesLibrarySid = 88 WinCapabilityVideosLibrarySid = 89 WinCapabilityMusicLibrarySid = 90 WinCapabilityDocumentsLibrarySid = 91 WinCapabilitySharedUserCertificatesSid = 92 WinCapabilityEnterpriseAuthenticationSid = 93 WinCapabilityRemovableStorageSid = 94 WinBuiltinRDSRemoteAccessServersSid = 95 WinBuiltinRDSEndpointServersSid = 96 WinBuiltinRDSManagementServersSid = 97 WinUserModeDriversSid = 98 WinBuiltinHyperVAdminsSid = 99 WinAccountCloneableControllersSid = 100 WinBuiltinAccessControlAssistanceOperatorsSid = 101 WinBuiltinRemoteManagementUsersSid = 102 WinAuthenticationAuthorityAssertedSid = 103 WinAuthenticationServiceAssertedSid = 104 WinLocalAccountSid = 105 WinLocalAccountAndAdministratorSid = 106 WinAccountProtectedUsersSid = 107 WinCapabilityAppointmentsSid = 108 WinCapabilityContactsSid = 109 WinAccountDefaultSystemManagedSid = 110 WinBuiltinDefaultSystemManagedGroupSid = 111 WinBuiltinStorageReplicaAdminsSid = 112 WinAccountKeyAdminsSid = 113 WinAccountEnterpriseKeyAdminsSid = 114 WinAuthenticationKeyTrustSid = 115 WinAuthenticationKeyPropertyMFASid = 116 WinAuthenticationKeyPropertyAttestationSid = 117 WinAuthenticationFreshKeyAuthSid = 118 WinBuiltinDeviceOwnersSid = 119 ) // Creates a SID for a well-known predefined alias, generally using the constants of the form // Win*Sid, for the local machine. func CreateWellKnownSid(sidType WELL_KNOWN_SID_TYPE) (*SID, error) { return CreateWellKnownDomainSid(sidType, nil) } // Creates a SID for a well-known predefined alias, generally using the constants of the form // Win*Sid, for the domain specified by the domainSid parameter. func CreateWellKnownDomainSid(sidType WELL_KNOWN_SID_TYPE, domainSid *SID) (*SID, error) { n := uint32(50) for { b := make([]byte, n) sid := (*SID)(unsafe.Pointer(&b[0])) err := createWellKnownSid(sidType, domainSid, sid, &n) if err == nil { return sid, nil } if err != ERROR_INSUFFICIENT_BUFFER { return nil, err } if n <= uint32(len(b)) { return nil, err } } } 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_ADJUST_SESSIONID 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_ADJUST_SESSIONID 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 ) // Group attributes inside of Tokengroups.Groups[i].Attributes const ( SE_GROUP_MANDATORY = 0x00000001 SE_GROUP_ENABLED_BY_DEFAULT = 0x00000002 SE_GROUP_ENABLED = 0x00000004 SE_GROUP_OWNER = 0x00000008 SE_GROUP_USE_FOR_DENY_ONLY = 0x00000010 SE_GROUP_INTEGRITY = 0x00000020 SE_GROUP_INTEGRITY_ENABLED = 0x00000040 SE_GROUP_LOGON_ID = 0xC0000000 SE_GROUP_RESOURCE = 0x20000000 SE_GROUP_VALID_ATTRIBUTES = SE_GROUP_MANDATORY | SE_GROUP_ENABLED_BY_DEFAULT | SE_GROUP_ENABLED | SE_GROUP_OWNER | SE_GROUP_USE_FOR_DENY_ONLY | SE_GROUP_LOGON_ID | SE_GROUP_RESOURCE | SE_GROUP_INTEGRITY | SE_GROUP_INTEGRITY_ENABLED ) // Privilege attributes const ( SE_PRIVILEGE_ENABLED_BY_DEFAULT = 0x00000001 SE_PRIVILEGE_ENABLED = 0x00000002 SE_PRIVILEGE_REMOVED = 0x00000004 SE_PRIVILEGE_USED_FOR_ACCESS = 0x80000000 SE_PRIVILEGE_VALID_ATTRIBUTES = SE_PRIVILEGE_ENABLED_BY_DEFAULT | SE_PRIVILEGE_ENABLED | SE_PRIVILEGE_REMOVED | SE_PRIVILEGE_USED_FOR_ACCESS ) // Token types const ( TokenPrimary = 1 TokenImpersonation = 2 ) // Impersonation levels const ( SecurityAnonymous = 0 SecurityIdentification = 1 SecurityImpersonation = 2 SecurityDelegation = 3 ) type LUID struct { LowPart uint32 HighPart int32 } type LUIDAndAttributes struct { Luid LUID Attributes uint32 } 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 // Use AllGroups() for iterating. } // AllGroups returns a slice that can be used to iterate over the groups in g. func (g *Tokengroups) AllGroups() []SIDAndAttributes { return (*[(1 << 28) - 1]SIDAndAttributes)(unsafe.Pointer(&g.Groups[0]))[:g.GroupCount:g.GroupCount] } type Tokenprivileges struct { PrivilegeCount uint32 Privileges [1]LUIDAndAttributes // Use AllPrivileges() for iterating. } // AllPrivileges returns a slice that can be used to iterate over the privileges in p. func (p *Tokenprivileges) AllPrivileges() []LUIDAndAttributes { return (*[(1 << 27) - 1]LUIDAndAttributes)(unsafe.Pointer(&p.Privileges[0]))[:p.PrivilegeCount:p.PrivilegeCount] } type Tokenmandatorylabel struct { Label SIDAndAttributes } func (tml *Tokenmandatorylabel) Size() uint32 { return uint32(unsafe.Sizeof(Tokenmandatorylabel{})) + GetLengthSid(tml.Label.Sid) } // Authorization Functions //sys checkTokenMembership(tokenHandle Token, sidToCheck *SID, isMember *int32) (err error) = advapi32.CheckTokenMembership //sys isTokenRestricted(tokenHandle Token) (ret bool, err error) [!failretval] = advapi32.IsTokenRestricted //sys OpenProcessToken(process Handle, access uint32, token *Token) (err error) = advapi32.OpenProcessToken //sys OpenThreadToken(thread Handle, access uint32, openAsSelf bool, token *Token) (err error) = advapi32.OpenThreadToken //sys ImpersonateSelf(impersonationlevel uint32) (err error) = advapi32.ImpersonateSelf //sys RevertToSelf() (err error) = advapi32.RevertToSelf //sys SetThreadToken(thread *Handle, token Token) (err error) = advapi32.SetThreadToken //sys LookupPrivilegeValue(systemname *uint16, name *uint16, luid *LUID) (err error) = advapi32.LookupPrivilegeValueW //sys AdjustTokenPrivileges(token Token, disableAllPrivileges bool, newstate *Tokenprivileges, buflen uint32, prevstate *Tokenprivileges, returnlen *uint32) (err error) = advapi32.AdjustTokenPrivileges //sys AdjustTokenGroups(token Token, resetToDefault bool, newstate *Tokengroups, buflen uint32, prevstate *Tokengroups, returnlen *uint32) (err error) = advapi32.AdjustTokenGroups //sys GetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint32, returnedLen *uint32) (err error) = advapi32.GetTokenInformation //sys SetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint32) (err error) = advapi32.SetTokenInformation //sys DuplicateTokenEx(existingToken Token, desiredAccess uint32, tokenAttributes *SecurityAttributes, impersonationLevel uint32, tokenType uint32, newToken *Token) (err error) = advapi32.DuplicateTokenEx //sys GetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) = userenv.GetUserProfileDirectoryW //sys getSystemDirectory(dir *uint16, dirLen uint32) (len uint32, err error) = kernel32.GetSystemDirectoryW //sys getWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) = kernel32.GetWindowsDirectoryW //sys getSystemWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) = kernel32.GetSystemWindowsDirectoryW // 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 an access token associated with current // process with TOKEN_QUERY access. It is a real token that needs to be closed. // // Deprecated: Explicitly call OpenProcessToken(CurrentProcess(), ...) // with the desired access instead, or use GetCurrentProcessToken for a // TOKEN_QUERY token. func OpenCurrentProcessToken() (Token, error) { var token Token err := OpenProcessToken(CurrentProcess(), TOKEN_QUERY, &token) return token, err } // GetCurrentProcessToken returns the access token associated with // the current process. It is a pseudo token that does not need // to be closed. func GetCurrentProcessToken() Token { return Token(^uintptr(4 - 1)) } // GetCurrentThreadToken return the access token associated with // the current thread. It is a pseudo token that does not need // to be closed. func GetCurrentThreadToken() Token { return Token(^uintptr(5 - 1)) } // GetCurrentThreadEffectiveToken returns the effective access token // associated with the current thread. It is a pseudo token that does // not need to be closed. func GetCurrentThreadEffectiveToken() Token { return Token(^uintptr(6 - 1)) } // 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 } } } // IsElevated returns whether the current token is elevated from a UAC perspective. func (token Token) IsElevated() bool { var isElevated uint32 var outLen uint32 err := GetTokenInformation(token, TokenElevation, (*byte)(unsafe.Pointer(&isElevated)), uint32(unsafe.Sizeof(isElevated)), &outLen) if err != nil { return false } return outLen == uint32(unsafe.Sizeof(isElevated)) && isElevated != 0 } // GetLinkedToken returns the linked token, which may be an elevated UAC token. func (token Token) GetLinkedToken() (Token, error) { var linkedToken Token var outLen uint32 err := GetTokenInformation(token, TokenLinkedToken, (*byte)(unsafe.Pointer(&linkedToken)), uint32(unsafe.Sizeof(linkedToken)), &outLen) if err != nil { return Token(0), err } return linkedToken, nil } // GetSystemDirectory retrieves the path to current location of the system // directory, which is typically, though not always, `C:\Windows\System32`. func GetSystemDirectory() (string, error) { n := uint32(MAX_PATH) for { b := make([]uint16, n) l, e := getSystemDirectory(&b[0], n) if e != nil { return "", e } if l <= n { return UTF16ToString(b[:l]), nil } n = l } } // GetWindowsDirectory retrieves the path to current location of the Windows // directory, which is typically, though not always, `C:\Windows`. This may // be a private user directory in the case that the application is running // under a terminal server. func GetWindowsDirectory() (string, error) { n := uint32(MAX_PATH) for { b := make([]uint16, n) l, e := getWindowsDirectory(&b[0], n) if e != nil { return "", e } if l <= n { return UTF16ToString(b[:l]), nil } n = l } } // GetSystemWindowsDirectory retrieves the path to current location of the // Windows directory, which is typically, though not always, `C:\Windows`. func GetSystemWindowsDirectory() (string, error) { n := uint32(MAX_PATH) for { b := make([]uint16, n) l, e := getSystemWindowsDirectory(&b[0], n) if e != nil { return "", e } if l <= n { return UTF16ToString(b[:l]), nil } n = l } } // IsMember reports whether the access token t is a member of the provided SID. func (t Token) IsMember(sid *SID) (bool, error) { var b int32 if e := checkTokenMembership(t, sid, &b); e != nil { return false, e } return b != 0, nil } // IsRestricted reports whether the access token t is a restricted token. func (t Token) IsRestricted() (isRestricted bool, err error) { isRestricted, err = isTokenRestricted(t) if !isRestricted && err == syscall.EINVAL { // If err is EINVAL, this returned ERROR_SUCCESS indicating a non-restricted token. err = nil } return } const ( WTS_CONSOLE_CONNECT = 0x1 WTS_CONSOLE_DISCONNECT = 0x2 WTS_REMOTE_CONNECT = 0x3 WTS_REMOTE_DISCONNECT = 0x4 WTS_SESSION_LOGON = 0x5 WTS_SESSION_LOGOFF = 0x6 WTS_SESSION_LOCK = 0x7 WTS_SESSION_UNLOCK = 0x8 WTS_SESSION_REMOTE_CONTROL = 0x9 WTS_SESSION_CREATE = 0xa WTS_SESSION_TERMINATE = 0xb ) const ( WTSActive = 0 WTSConnected = 1 WTSConnectQuery = 2 WTSShadow = 3 WTSDisconnected = 4 WTSIdle = 5 WTSListen = 6 WTSReset = 7 WTSDown = 8 WTSInit = 9 ) type WTSSESSION_NOTIFICATION struct { Size uint32 SessionID uint32 } type WTS_SESSION_INFO struct { SessionID uint32 WindowStationName *uint16 State uint32 } //sys WTSQueryUserToken(session uint32, token *Token) (err error) = wtsapi32.WTSQueryUserToken //sys WTSEnumerateSessions(handle Handle, reserved uint32, version uint32, sessions **WTS_SESSION_INFO, count *uint32) (err error) = wtsapi32.WTSEnumerateSessionsW //sys WTSFreeMemory(ptr uintptr) = wtsapi32.WTSFreeMemory //sys WTSGetActiveConsoleSessionId() (sessionID uint32) type ACL struct { aclRevision byte sbz1 byte aclSize uint16 AceCount uint16 sbz2 uint16 } type SECURITY_DESCRIPTOR struct { revision byte sbz1 byte control SECURITY_DESCRIPTOR_CONTROL owner *SID group *SID sacl *ACL dacl *ACL } type SECURITY_QUALITY_OF_SERVICE struct { Length uint32 ImpersonationLevel uint32 ContextTrackingMode byte EffectiveOnly byte } // Constants for the ContextTrackingMode field of SECURITY_QUALITY_OF_SERVICE. const ( SECURITY_STATIC_TRACKING = 0 SECURITY_DYNAMIC_TRACKING = 1 ) type SecurityAttributes struct { Length uint32 SecurityDescriptor *SECURITY_DESCRIPTOR InheritHandle uint32 } type SE_OBJECT_TYPE uint32 // Constants for type SE_OBJECT_TYPE const ( SE_UNKNOWN_OBJECT_TYPE = 0 SE_FILE_OBJECT = 1 SE_SERVICE = 2 SE_PRINTER = 3 SE_REGISTRY_KEY = 4 SE_LMSHARE = 5 SE_KERNEL_OBJECT = 6 SE_WINDOW_OBJECT = 7 SE_DS_OBJECT = 8 SE_DS_OBJECT_ALL = 9 SE_PROVIDER_DEFINED_OBJECT = 10 SE_WMIGUID_OBJECT = 11 SE_REGISTRY_WOW64_32KEY = 12 SE_REGISTRY_WOW64_64KEY = 13 ) type SECURITY_INFORMATION uint32 // Constants for type SECURITY_INFORMATION const ( OWNER_SECURITY_INFORMATION = 0x00000001 GROUP_SECURITY_INFORMATION = 0x00000002 DACL_SECURITY_INFORMATION = 0x00000004 SACL_SECURITY_INFORMATION = 0x00000008 LABEL_SECURITY_INFORMATION = 0x00000010 ATTRIBUTE_SECURITY_INFORMATION = 0x00000020 SCOPE_SECURITY_INFORMATION = 0x00000040 BACKUP_SECURITY_INFORMATION = 0x00010000 PROTECTED_DACL_SECURITY_INFORMATION = 0x80000000 PROTECTED_SACL_SECURITY_INFORMATION = 0x40000000 UNPROTECTED_DACL_SECURITY_INFORMATION = 0x20000000 UNPROTECTED_SACL_SECURITY_INFORMATION = 0x10000000 ) type SECURITY_DESCRIPTOR_CONTROL uint16 // Constants for type SECURITY_DESCRIPTOR_CONTROL const ( SE_OWNER_DEFAULTED = 0x0001 SE_GROUP_DEFAULTED = 0x0002 SE_DACL_PRESENT = 0x0004 SE_DACL_DEFAULTED = 0x0008 SE_SACL_PRESENT = 0x0010 SE_SACL_DEFAULTED = 0x0020 SE_DACL_AUTO_INHERIT_REQ = 0x0100 SE_SACL_AUTO_INHERIT_REQ = 0x0200 SE_DACL_AUTO_INHERITED = 0x0400 SE_SACL_AUTO_INHERITED = 0x0800 SE_DACL_PROTECTED = 0x1000 SE_SACL_PROTECTED = 0x2000 SE_RM_CONTROL_VALID = 0x4000 SE_SELF_RELATIVE = 0x8000 ) type ACCESS_MASK uint32 // Constants for type ACCESS_MASK const ( DELETE = 0x00010000 READ_CONTROL = 0x00020000 WRITE_DAC = 0x00040000 WRITE_OWNER = 0x00080000 SYNCHRONIZE = 0x00100000 STANDARD_RIGHTS_REQUIRED = 0x000F0000 STANDARD_RIGHTS_READ = READ_CONTROL STANDARD_RIGHTS_WRITE = READ_CONTROL STANDARD_RIGHTS_EXECUTE = READ_CONTROL STANDARD_RIGHTS_ALL = 0x001F0000 SPECIFIC_RIGHTS_ALL = 0x0000FFFF ACCESS_SYSTEM_SECURITY = 0x01000000 MAXIMUM_ALLOWED = 0x02000000 GENERIC_READ = 0x80000000 GENERIC_WRITE = 0x40000000 GENERIC_EXECUTE = 0x20000000 GENERIC_ALL = 0x10000000 ) type ACCESS_MODE uint32 // Constants for type ACCESS_MODE const ( NOT_USED_ACCESS = 0 GRANT_ACCESS = 1 SET_ACCESS = 2 DENY_ACCESS = 3 REVOKE_ACCESS = 4 SET_AUDIT_SUCCESS = 5 SET_AUDIT_FAILURE = 6 ) // Constants for AceFlags and Inheritance fields const ( NO_INHERITANCE = 0x0 SUB_OBJECTS_ONLY_INHERIT = 0x1 SUB_CONTAINERS_ONLY_INHERIT = 0x2 SUB_CONTAINERS_AND_OBJECTS_INHERIT = 0x3 INHERIT_NO_PROPAGATE = 0x4 INHERIT_ONLY = 0x8 INHERITED_ACCESS_ENTRY = 0x10 INHERITED_PARENT = 0x10000000 INHERITED_GRANDPARENT = 0x20000000 OBJECT_INHERIT_ACE = 0x1 CONTAINER_INHERIT_ACE = 0x2 NO_PROPAGATE_INHERIT_ACE = 0x4 INHERIT_ONLY_ACE = 0x8 INHERITED_ACE = 0x10 VALID_INHERIT_FLAGS = 0x1F ) type MULTIPLE_TRUSTEE_OPERATION uint32 // Constants for MULTIPLE_TRUSTEE_OPERATION const ( NO_MULTIPLE_TRUSTEE = 0 TRUSTEE_IS_IMPERSONATE = 1 ) type TRUSTEE_FORM uint32 // Constants for TRUSTEE_FORM const ( TRUSTEE_IS_SID = 0 TRUSTEE_IS_NAME = 1 TRUSTEE_BAD_FORM = 2 TRUSTEE_IS_OBJECTS_AND_SID = 3 TRUSTEE_IS_OBJECTS_AND_NAME = 4 ) type TRUSTEE_TYPE uint32 // Constants for TRUSTEE_TYPE const ( TRUSTEE_IS_UNKNOWN = 0 TRUSTEE_IS_USER = 1 TRUSTEE_IS_GROUP = 2 TRUSTEE_IS_DOMAIN = 3 TRUSTEE_IS_ALIAS = 4 TRUSTEE_IS_WELL_KNOWN_GROUP = 5 TRUSTEE_IS_DELETED = 6 TRUSTEE_IS_INVALID = 7 TRUSTEE_IS_COMPUTER = 8 ) // Constants for ObjectsPresent field const ( ACE_OBJECT_TYPE_PRESENT = 0x1 ACE_INHERITED_OBJECT_TYPE_PRESENT = 0x2 ) type EXPLICIT_ACCESS struct { AccessPermissions ACCESS_MASK AccessMode ACCESS_MODE Inheritance uint32 Trustee TRUSTEE } // https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-ace_header type ACE_HEADER struct { AceType uint8 AceFlags uint8 AceSize uint16 } // https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-access_allowed_ace type ACCESS_ALLOWED_ACE struct { Header ACE_HEADER Mask ACCESS_MASK SidStart uint32 } const ( // Constants for AceType // https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-ace_header ACCESS_ALLOWED_ACE_TYPE = 0 ACCESS_DENIED_ACE_TYPE = 1 ) // This type is the union inside of TRUSTEE and must be created using one of the TrusteeValueFrom* functions. type TrusteeValue uintptr func TrusteeValueFromString(str string) TrusteeValue { return TrusteeValue(unsafe.Pointer(StringToUTF16Ptr(str))) } func TrusteeValueFromSID(sid *SID) TrusteeValue { return TrusteeValue(unsafe.Pointer(sid)) } func TrusteeValueFromObjectsAndSid(objectsAndSid *OBJECTS_AND_SID) TrusteeValue { return TrusteeValue(unsafe.Pointer(objectsAndSid)) } func TrusteeValueFromObjectsAndName(objectsAndName *OBJECTS_AND_NAME) TrusteeValue { return TrusteeValue(unsafe.Pointer(objectsAndName)) } type TRUSTEE struct { MultipleTrustee *TRUSTEE MultipleTrusteeOperation MULTIPLE_TRUSTEE_OPERATION TrusteeForm TRUSTEE_FORM TrusteeType TRUSTEE_TYPE TrusteeValue TrusteeValue } type OBJECTS_AND_SID struct { ObjectsPresent uint32 ObjectTypeGuid GUID InheritedObjectTypeGuid GUID Sid *SID } type OBJECTS_AND_NAME struct { ObjectsPresent uint32 ObjectType SE_OBJECT_TYPE ObjectTypeName *uint16 InheritedObjectTypeName *uint16 Name *uint16 } //sys getSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) = advapi32.GetSecurityInfo //sys SetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) = advapi32.SetSecurityInfo //sys getNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) = advapi32.GetNamedSecurityInfoW //sys SetNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) = advapi32.SetNamedSecurityInfoW //sys SetKernelObjectSecurity(handle Handle, securityInformation SECURITY_INFORMATION, securityDescriptor *SECURITY_DESCRIPTOR) (err error) = advapi32.SetKernelObjectSecurity //sys buildSecurityDescriptor(owner *TRUSTEE, group *TRUSTEE, countAccessEntries uint32, accessEntries *EXPLICIT_ACCESS, countAuditEntries uint32, auditEntries *EXPLICIT_ACCESS, oldSecurityDescriptor *SECURITY_DESCRIPTOR, sizeNewSecurityDescriptor *uint32, newSecurityDescriptor **SECURITY_DESCRIPTOR) (ret error) = advapi32.BuildSecurityDescriptorW //sys initializeSecurityDescriptor(absoluteSD *SECURITY_DESCRIPTOR, revision uint32) (err error) = advapi32.InitializeSecurityDescriptor //sys getSecurityDescriptorControl(sd *SECURITY_DESCRIPTOR, control *SECURITY_DESCRIPTOR_CONTROL, revision *uint32) (err error) = advapi32.GetSecurityDescriptorControl //sys getSecurityDescriptorDacl(sd *SECURITY_DESCRIPTOR, daclPresent *bool, dacl **ACL, daclDefaulted *bool) (err error) = advapi32.GetSecurityDescriptorDacl //sys getSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent *bool, sacl **ACL, saclDefaulted *bool) (err error) = advapi32.GetSecurityDescriptorSacl //sys getSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner **SID, ownerDefaulted *bool) (err error) = advapi32.GetSecurityDescriptorOwner //sys getSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group **SID, groupDefaulted *bool) (err error) = advapi32.GetSecurityDescriptorGroup //sys getSecurityDescriptorLength(sd *SECURITY_DESCRIPTOR) (len uint32) = advapi32.GetSecurityDescriptorLength //sys getSecurityDescriptorRMControl(sd *SECURITY_DESCRIPTOR, rmControl *uint8) (ret error) [failretval!=0] = advapi32.GetSecurityDescriptorRMControl //sys isValidSecurityDescriptor(sd *SECURITY_DESCRIPTOR) (isValid bool) = advapi32.IsValidSecurityDescriptor //sys setSecurityDescriptorControl(sd *SECURITY_DESCRIPTOR, controlBitsOfInterest SECURITY_DESCRIPTOR_CONTROL, controlBitsToSet SECURITY_DESCRIPTOR_CONTROL) (err error) = advapi32.SetSecurityDescriptorControl //sys setSecurityDescriptorDacl(sd *SECURITY_DESCRIPTOR, daclPresent bool, dacl *ACL, daclDefaulted bool) (err error) = advapi32.SetSecurityDescriptorDacl //sys setSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent bool, sacl *ACL, saclDefaulted bool) (err error) = advapi32.SetSecurityDescriptorSacl //sys setSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner *SID, ownerDefaulted bool) (err error) = advapi32.SetSecurityDescriptorOwner //sys setSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group *SID, groupDefaulted bool) (err error) = advapi32.SetSecurityDescriptorGroup //sys setSecurityDescriptorRMControl(sd *SECURITY_DESCRIPTOR, rmControl *uint8) = advapi32.SetSecurityDescriptorRMControl //sys convertStringSecurityDescriptorToSecurityDescriptor(str string, revision uint32, sd **SECURITY_DESCRIPTOR, size *uint32) (err error) = advapi32.ConvertStringSecurityDescriptorToSecurityDescriptorW //sys convertSecurityDescriptorToStringSecurityDescriptor(sd *SECURITY_DESCRIPTOR, revision uint32, securityInformation SECURITY_INFORMATION, str **uint16, strLen *uint32) (err error) = advapi32.ConvertSecurityDescriptorToStringSecurityDescriptorW //sys makeAbsoluteSD(selfRelativeSD *SECURITY_DESCRIPTOR, absoluteSD *SECURITY_DESCRIPTOR, absoluteSDSize *uint32, dacl *ACL, daclSize *uint32, sacl *ACL, saclSize *uint32, owner *SID, ownerSize *uint32, group *SID, groupSize *uint32) (err error) = advapi32.MakeAbsoluteSD //sys makeSelfRelativeSD(absoluteSD *SECURITY_DESCRIPTOR, selfRelativeSD *SECURITY_DESCRIPTOR, selfRelativeSDSize *uint32) (err error) = advapi32.MakeSelfRelativeSD //sys setEntriesInAcl(countExplicitEntries uint32, explicitEntries *EXPLICIT_ACCESS, oldACL *ACL, newACL **ACL) (ret error) = advapi32.SetEntriesInAclW //sys GetAce(acl *ACL, aceIndex uint32, pAce **ACCESS_ALLOWED_ACE) (err error) = advapi32.GetAce // Control returns the security descriptor control bits. func (sd *SECURITY_DESCRIPTOR) Control() (control SECURITY_DESCRIPTOR_CONTROL, revision uint32, err error) { err = getSecurityDescriptorControl(sd, &control, &revision) return } // SetControl sets the security descriptor control bits. func (sd *SECURITY_DESCRIPTOR) SetControl(controlBitsOfInterest SECURITY_DESCRIPTOR_CONTROL, controlBitsToSet SECURITY_DESCRIPTOR_CONTROL) error { return setSecurityDescriptorControl(sd, controlBitsOfInterest, controlBitsToSet) } // RMControl returns the security descriptor resource manager control bits. func (sd *SECURITY_DESCRIPTOR) RMControl() (control uint8, err error) { err = getSecurityDescriptorRMControl(sd, &control) return } // SetRMControl sets the security descriptor resource manager control bits. func (sd *SECURITY_DESCRIPTOR) SetRMControl(rmControl uint8) { setSecurityDescriptorRMControl(sd, &rmControl) } // DACL returns the security descriptor DACL and whether it was defaulted. The dacl return value may be nil // if a DACL exists but is an "empty DACL", meaning fully permissive. If the DACL does not exist, err returns // ERROR_OBJECT_NOT_FOUND. func (sd *SECURITY_DESCRIPTOR) DACL() (dacl *ACL, defaulted bool, err error) { var present bool err = getSecurityDescriptorDacl(sd, &present, &dacl, &defaulted) if !present { err = ERROR_OBJECT_NOT_FOUND } return } // SetDACL sets the absolute security descriptor DACL. func (absoluteSD *SECURITY_DESCRIPTOR) SetDACL(dacl *ACL, present, defaulted bool) error { return setSecurityDescriptorDacl(absoluteSD, present, dacl, defaulted) } // SACL returns the security descriptor SACL and whether it was defaulted. The sacl return value may be nil // if a SACL exists but is an "empty SACL", meaning fully permissive. If the SACL does not exist, err returns // ERROR_OBJECT_NOT_FOUND. func (sd *SECURITY_DESCRIPTOR) SACL() (sacl *ACL, defaulted bool, err error) { var present bool err = getSecurityDescriptorSacl(sd, &present, &sacl, &defaulted) if !present { err = ERROR_OBJECT_NOT_FOUND } return } // SetSACL sets the absolute security descriptor SACL. func (absoluteSD *SECURITY_DESCRIPTOR) SetSACL(sacl *ACL, present, defaulted bool) error { return setSecurityDescriptorSacl(absoluteSD, present, sacl, defaulted) } // Owner returns the security descriptor owner and whether it was defaulted. func (sd *SECURITY_DESCRIPTOR) Owner() (owner *SID, defaulted bool, err error) { err = getSecurityDescriptorOwner(sd, &owner, &defaulted) return } // SetOwner sets the absolute security descriptor owner. func (absoluteSD *SECURITY_DESCRIPTOR) SetOwner(owner *SID, defaulted bool) error { return setSecurityDescriptorOwner(absoluteSD, owner, defaulted) } // Group returns the security descriptor group and whether it was defaulted. func (sd *SECURITY_DESCRIPTOR) Group() (group *SID, defaulted bool, err error) { err = getSecurityDescriptorGroup(sd, &group, &defaulted) return } // SetGroup sets the absolute security descriptor owner. func (absoluteSD *SECURITY_DESCRIPTOR) SetGroup(group *SID, defaulted bool) error { return setSecurityDescriptorGroup(absoluteSD, group, defaulted) } // Length returns the length of the security descriptor. func (sd *SECURITY_DESCRIPTOR) Length() uint32 { return getSecurityDescriptorLength(sd) } // IsValid returns whether the security descriptor is valid. func (sd *SECURITY_DESCRIPTOR) IsValid() bool { return isValidSecurityDescriptor(sd) } // String returns the SDDL form of the security descriptor, with a function signature that can be // used with %v formatting directives. func (sd *SECURITY_DESCRIPTOR) String() string { var sddl *uint16 err := convertSecurityDescriptorToStringSecurityDescriptor(sd, 1, 0xff, &sddl, nil) if err != nil { return "" } defer LocalFree(Handle(unsafe.Pointer(sddl))) return UTF16PtrToString(sddl) } // ToAbsolute converts a self-relative security descriptor into an absolute one. func (selfRelativeSD *SECURITY_DESCRIPTOR) ToAbsolute() (absoluteSD *SECURITY_DESCRIPTOR, err error) { control, _, err := selfRelativeSD.Control() if err != nil { return } if control&SE_SELF_RELATIVE == 0 { err = ERROR_INVALID_PARAMETER return } var absoluteSDSize, daclSize, saclSize, ownerSize, groupSize uint32 err = makeAbsoluteSD(selfRelativeSD, nil, &absoluteSDSize, nil, &daclSize, nil, &saclSize, nil, &ownerSize, nil, &groupSize) switch err { case ERROR_INSUFFICIENT_BUFFER: case nil: // makeAbsoluteSD is expected to fail, but it succeeds. return nil, ERROR_INTERNAL_ERROR default: return nil, err } if absoluteSDSize > 0 { absoluteSD = (*SECURITY_DESCRIPTOR)(unsafe.Pointer(&make([]byte, absoluteSDSize)[0])) } var ( dacl *ACL sacl *ACL owner *SID group *SID ) if daclSize > 0 { dacl = (*ACL)(unsafe.Pointer(&make([]byte, daclSize)[0])) } if saclSize > 0 { sacl = (*ACL)(unsafe.Pointer(&make([]byte, saclSize)[0])) } if ownerSize > 0 { owner = (*SID)(unsafe.Pointer(&make([]byte, ownerSize)[0])) } if groupSize > 0 { group = (*SID)(unsafe.Pointer(&make([]byte, groupSize)[0])) } err = makeAbsoluteSD(selfRelativeSD, absoluteSD, &absoluteSDSize, dacl, &daclSize, sacl, &saclSize, owner, &ownerSize, group, &groupSize) return } // ToSelfRelative converts an absolute security descriptor into a self-relative one. func (absoluteSD *SECURITY_DESCRIPTOR) ToSelfRelative() (selfRelativeSD *SECURITY_DESCRIPTOR, err error) { control, _, err := absoluteSD.Control() if err != nil { return } if control&SE_SELF_RELATIVE != 0 { err = ERROR_INVALID_PARAMETER return } var selfRelativeSDSize uint32 err = makeSelfRelativeSD(absoluteSD, nil, &selfRelativeSDSize) switch err { case ERROR_INSUFFICIENT_BUFFER: case nil: // makeSelfRelativeSD is expected to fail, but it succeeds. return nil, ERROR_INTERNAL_ERROR default: return nil, err } if selfRelativeSDSize > 0 { selfRelativeSD = (*SECURITY_DESCRIPTOR)(unsafe.Pointer(&make([]byte, selfRelativeSDSize)[0])) } err = makeSelfRelativeSD(absoluteSD, selfRelativeSD, &selfRelativeSDSize) return } func (selfRelativeSD *SECURITY_DESCRIPTOR) copySelfRelativeSecurityDescriptor() *SECURITY_DESCRIPTOR { sdLen := int(selfRelativeSD.Length()) const min = int(unsafe.Sizeof(SECURITY_DESCRIPTOR{})) if sdLen < min { sdLen = min } src := unsafe.Slice((*byte)(unsafe.Pointer(selfRelativeSD)), sdLen) // SECURITY_DESCRIPTOR has pointers in it, which means checkptr expects for it to // be aligned properly. When we're copying a Windows-allocated struct to a // Go-allocated one, make sure that the Go allocation is aligned to the // pointer size. const psize = int(unsafe.Sizeof(uintptr(0))) alloc := make([]uintptr, (sdLen+psize-1)/psize) dst := unsafe.Slice((*byte)(unsafe.Pointer(&alloc[0])), sdLen) copy(dst, src) return (*SECURITY_DESCRIPTOR)(unsafe.Pointer(&dst[0])) } // SecurityDescriptorFromString converts an SDDL string describing a security descriptor into a // self-relative security descriptor object allocated on the Go heap. func SecurityDescriptorFromString(sddl string) (sd *SECURITY_DESCRIPTOR, err error) { var winHeapSD *SECURITY_DESCRIPTOR err = convertStringSecurityDescriptorToSecurityDescriptor(sddl, 1, &winHeapSD, nil) if err != nil { return } defer LocalFree(Handle(unsafe.Pointer(winHeapSD))) return winHeapSD.copySelfRelativeSecurityDescriptor(), nil } // GetSecurityInfo queries the security information for a given handle and returns the self-relative security // descriptor result on the Go heap. func GetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION) (sd *SECURITY_DESCRIPTOR, err error) { var winHeapSD *SECURITY_DESCRIPTOR err = getSecurityInfo(handle, objectType, securityInformation, nil, nil, nil, nil, &winHeapSD) if err != nil { return } defer LocalFree(Handle(unsafe.Pointer(winHeapSD))) return winHeapSD.copySelfRelativeSecurityDescriptor(), nil } // GetNamedSecurityInfo queries the security information for a given named object and returns the self-relative security // descriptor result on the Go heap. func GetNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION) (sd *SECURITY_DESCRIPTOR, err error) { var winHeapSD *SECURITY_DESCRIPTOR err = getNamedSecurityInfo(objectName, objectType, securityInformation, nil, nil, nil, nil, &winHeapSD) if err != nil { return } defer LocalFree(Handle(unsafe.Pointer(winHeapSD))) return winHeapSD.copySelfRelativeSecurityDescriptor(), nil } // BuildSecurityDescriptor makes a new security descriptor using the input trustees, explicit access lists, and // prior security descriptor to be merged, any of which can be nil, returning the self-relative security descriptor // result on the Go heap. func BuildSecurityDescriptor(owner *TRUSTEE, group *TRUSTEE, accessEntries []EXPLICIT_ACCESS, auditEntries []EXPLICIT_ACCESS, mergedSecurityDescriptor *SECURITY_DESCRIPTOR) (sd *SECURITY_DESCRIPTOR, err error) { var winHeapSD *SECURITY_DESCRIPTOR var winHeapSDSize uint32 var firstAccessEntry *EXPLICIT_ACCESS if len(accessEntries) > 0 { firstAccessEntry = &accessEntries[0] } var firstAuditEntry *EXPLICIT_ACCESS if len(auditEntries) > 0 { firstAuditEntry = &auditEntries[0] } err = buildSecurityDescriptor(owner, group, uint32(len(accessEntries)), firstAccessEntry, uint32(len(auditEntries)), firstAuditEntry, mergedSecurityDescriptor, &winHeapSDSize, &winHeapSD) if err != nil { return } defer LocalFree(Handle(unsafe.Pointer(winHeapSD))) return winHeapSD.copySelfRelativeSecurityDescriptor(), nil } // NewSecurityDescriptor creates and initializes a new absolute security descriptor. func NewSecurityDescriptor() (absoluteSD *SECURITY_DESCRIPTOR, err error) { absoluteSD = &SECURITY_DESCRIPTOR{} err = initializeSecurityDescriptor(absoluteSD, 1) return } // ACLFromEntries returns a new ACL on the Go heap containing a list of explicit entries as well as those of another ACL. // Both explicitEntries and mergedACL are optional and can be nil. func ACLFromEntries(explicitEntries []EXPLICIT_ACCESS, mergedACL *ACL) (acl *ACL, err error) { var firstExplicitEntry *EXPLICIT_ACCESS if len(explicitEntries) > 0 { firstExplicitEntry = &explicitEntries[0] } var winHeapACL *ACL err = setEntriesInAcl(uint32(len(explicitEntries)), firstExplicitEntry, mergedACL, &winHeapACL) if err != nil { return } defer LocalFree(Handle(unsafe.Pointer(winHeapACL))) aclBytes := make([]byte, winHeapACL.aclSize) copy(aclBytes, (*[(1 << 31) - 1]byte)(unsafe.Pointer(winHeapACL))[:len(aclBytes):len(aclBytes)]) return (*ACL)(unsafe.Pointer(&aclBytes[0])), nil } ================================================ FILE: vendor/golang.org/x/sys/windows/service.go ================================================ // 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. //go: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 ) 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 SC_ACTION_NONE = 0 SC_ACTION_RESTART = 1 SC_ACTION_REBOOT = 2 SC_ACTION_RUN_COMMAND = 3 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_ACCEPT_PRESHUTDOWN = 256 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_CONTROL_PRESHUTDOWN = 15 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 SERVICE_CONFIG_DELAYED_AUTO_START_INFO = 3 SERVICE_CONFIG_FAILURE_ACTIONS_FLAG = 4 SERVICE_CONFIG_SERVICE_SID_INFO = 5 SERVICE_CONFIG_REQUIRED_PRIVILEGES_INFO = 6 SERVICE_CONFIG_PRESHUTDOWN_INFO = 7 SERVICE_CONFIG_TRIGGER_INFO = 8 SERVICE_CONFIG_PREFERRED_NODE = 9 SERVICE_CONFIG_LAUNCH_PROTECTED = 12 SERVICE_SID_TYPE_NONE = 0 SERVICE_SID_TYPE_UNRESTRICTED = 1 SERVICE_SID_TYPE_RESTRICTED = 2 | SERVICE_SID_TYPE_UNRESTRICTED SC_ENUM_PROCESS_INFO = 0 SERVICE_NOTIFY_STATUS_CHANGE = 2 SERVICE_NOTIFY_STOPPED = 0x00000001 SERVICE_NOTIFY_START_PENDING = 0x00000002 SERVICE_NOTIFY_STOP_PENDING = 0x00000004 SERVICE_NOTIFY_RUNNING = 0x00000008 SERVICE_NOTIFY_CONTINUE_PENDING = 0x00000010 SERVICE_NOTIFY_PAUSE_PENDING = 0x00000020 SERVICE_NOTIFY_PAUSED = 0x00000040 SERVICE_NOTIFY_CREATED = 0x00000080 SERVICE_NOTIFY_DELETED = 0x00000100 SERVICE_NOTIFY_DELETE_PENDING = 0x00000200 SC_EVENT_DATABASE_CHANGE = 0 SC_EVENT_PROPERTY_CHANGE = 1 SC_EVENT_STATUS_CHANGE = 2 SERVICE_START_REASON_DEMAND = 0x00000001 SERVICE_START_REASON_AUTO = 0x00000002 SERVICE_START_REASON_TRIGGER = 0x00000004 SERVICE_START_REASON_RESTART_ON_FAILURE = 0x00000008 SERVICE_START_REASON_DELAYEDAUTO = 0x00000010 SERVICE_DYNAMIC_INFORMATION_LEVEL_START_REASON = 1 ) type ENUM_SERVICE_STATUS struct { ServiceName *uint16 DisplayName *uint16 ServiceStatus SERVICE_STATUS } 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 } type SERVICE_DELAYED_AUTO_START_INFO struct { IsDelayedAutoStartUp uint32 } type SERVICE_STATUS_PROCESS struct { ServiceType uint32 CurrentState uint32 ControlsAccepted uint32 Win32ExitCode uint32 ServiceSpecificExitCode uint32 CheckPoint uint32 WaitHint uint32 ProcessId uint32 ServiceFlags uint32 } type ENUM_SERVICE_STATUS_PROCESS struct { ServiceName *uint16 DisplayName *uint16 ServiceStatusProcess SERVICE_STATUS_PROCESS } type SERVICE_NOTIFY struct { Version uint32 NotifyCallback uintptr Context uintptr NotificationStatus uint32 ServiceStatus SERVICE_STATUS_PROCESS NotificationTriggered uint32 ServiceNames *uint16 } type SERVICE_FAILURE_ACTIONS struct { ResetPeriod uint32 RebootMsg *uint16 Command *uint16 ActionsCount uint32 Actions *SC_ACTION } type SERVICE_FAILURE_ACTIONS_FLAG struct { FailureActionsOnNonCrashFailures int32 } type SC_ACTION struct { Type uint32 Delay uint32 } type QUERY_SERVICE_LOCK_STATUS struct { IsLocked uint32 LockOwner *uint16 LockDuration uint32 } //sys OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle Handle, err error) [failretval==0] = advapi32.OpenSCManagerW //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 QueryServiceLockStatus(mgr Handle, lockStatus *QUERY_SERVICE_LOCK_STATUS, bufSize uint32, bytesNeeded *uint32) (err error) = advapi32.QueryServiceLockStatusW //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 //sys EnumServicesStatusEx(mgr Handle, infoLevel uint32, serviceType uint32, serviceState uint32, services *byte, bufSize uint32, bytesNeeded *uint32, servicesReturned *uint32, resumeHandle *uint32, groupName *uint16) (err error) = advapi32.EnumServicesStatusExW //sys QueryServiceStatusEx(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) = advapi32.QueryServiceStatusEx //sys NotifyServiceStatusChange(service Handle, notifyMask uint32, notifier *SERVICE_NOTIFY) (ret error) = advapi32.NotifyServiceStatusChangeW //sys SubscribeServiceChangeNotifications(service Handle, eventType uint32, callback uintptr, callbackCtx uintptr, subscription *uintptr) (ret error) = sechost.SubscribeServiceChangeNotifications? //sys UnsubscribeServiceChangeNotifications(subscription uintptr) = sechost.UnsubscribeServiceChangeNotifications? //sys RegisterServiceCtrlHandlerEx(serviceName *uint16, handlerProc uintptr, context uintptr) (handle Handle, err error) = advapi32.RegisterServiceCtrlHandlerExW //sys QueryServiceDynamicInformation(service Handle, infoLevel uint32, dynamicInfo unsafe.Pointer) (err error) = advapi32.QueryServiceDynamicInformation? //sys EnumDependentServices(service Handle, activityState uint32, services *ENUM_SERVICE_STATUS, buffSize uint32, bytesNeeded *uint32, servicesReturned *uint32) (err error) = advapi32.EnumDependentServicesW ================================================ FILE: vendor/golang.org/x/sys/windows/setupapi_windows.go ================================================ // Copyright 2021 The Go 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 ( "encoding/binary" "errors" "fmt" "runtime" "strings" "syscall" "unsafe" ) // This file contains functions that wrap SetupAPI.dll and CfgMgr32.dll, // core system functions for managing hardware devices, drivers, and the PnP tree. // Information about these APIs can be found at: // https://docs.microsoft.com/en-us/windows-hardware/drivers/install/setupapi // https://docs.microsoft.com/en-us/windows/win32/devinst/cfgmgr32- const ( ERROR_EXPECTED_SECTION_NAME Errno = 0x20000000 | 0xC0000000 | 0 ERROR_BAD_SECTION_NAME_LINE Errno = 0x20000000 | 0xC0000000 | 1 ERROR_SECTION_NAME_TOO_LONG Errno = 0x20000000 | 0xC0000000 | 2 ERROR_GENERAL_SYNTAX Errno = 0x20000000 | 0xC0000000 | 3 ERROR_WRONG_INF_STYLE Errno = 0x20000000 | 0xC0000000 | 0x100 ERROR_SECTION_NOT_FOUND Errno = 0x20000000 | 0xC0000000 | 0x101 ERROR_LINE_NOT_FOUND Errno = 0x20000000 | 0xC0000000 | 0x102 ERROR_NO_BACKUP Errno = 0x20000000 | 0xC0000000 | 0x103 ERROR_NO_ASSOCIATED_CLASS Errno = 0x20000000 | 0xC0000000 | 0x200 ERROR_CLASS_MISMATCH Errno = 0x20000000 | 0xC0000000 | 0x201 ERROR_DUPLICATE_FOUND Errno = 0x20000000 | 0xC0000000 | 0x202 ERROR_NO_DRIVER_SELECTED Errno = 0x20000000 | 0xC0000000 | 0x203 ERROR_KEY_DOES_NOT_EXIST Errno = 0x20000000 | 0xC0000000 | 0x204 ERROR_INVALID_DEVINST_NAME Errno = 0x20000000 | 0xC0000000 | 0x205 ERROR_INVALID_CLASS Errno = 0x20000000 | 0xC0000000 | 0x206 ERROR_DEVINST_ALREADY_EXISTS Errno = 0x20000000 | 0xC0000000 | 0x207 ERROR_DEVINFO_NOT_REGISTERED Errno = 0x20000000 | 0xC0000000 | 0x208 ERROR_INVALID_REG_PROPERTY Errno = 0x20000000 | 0xC0000000 | 0x209 ERROR_NO_INF Errno = 0x20000000 | 0xC0000000 | 0x20A ERROR_NO_SUCH_DEVINST Errno = 0x20000000 | 0xC0000000 | 0x20B ERROR_CANT_LOAD_CLASS_ICON Errno = 0x20000000 | 0xC0000000 | 0x20C ERROR_INVALID_CLASS_INSTALLER Errno = 0x20000000 | 0xC0000000 | 0x20D ERROR_DI_DO_DEFAULT Errno = 0x20000000 | 0xC0000000 | 0x20E ERROR_DI_NOFILECOPY Errno = 0x20000000 | 0xC0000000 | 0x20F ERROR_INVALID_HWPROFILE Errno = 0x20000000 | 0xC0000000 | 0x210 ERROR_NO_DEVICE_SELECTED Errno = 0x20000000 | 0xC0000000 | 0x211 ERROR_DEVINFO_LIST_LOCKED Errno = 0x20000000 | 0xC0000000 | 0x212 ERROR_DEVINFO_DATA_LOCKED Errno = 0x20000000 | 0xC0000000 | 0x213 ERROR_DI_BAD_PATH Errno = 0x20000000 | 0xC0000000 | 0x214 ERROR_NO_CLASSINSTALL_PARAMS Errno = 0x20000000 | 0xC0000000 | 0x215 ERROR_FILEQUEUE_LOCKED Errno = 0x20000000 | 0xC0000000 | 0x216 ERROR_BAD_SERVICE_INSTALLSECT Errno = 0x20000000 | 0xC0000000 | 0x217 ERROR_NO_CLASS_DRIVER_LIST Errno = 0x20000000 | 0xC0000000 | 0x218 ERROR_NO_ASSOCIATED_SERVICE Errno = 0x20000000 | 0xC0000000 | 0x219 ERROR_NO_DEFAULT_DEVICE_INTERFACE Errno = 0x20000000 | 0xC0000000 | 0x21A ERROR_DEVICE_INTERFACE_ACTIVE Errno = 0x20000000 | 0xC0000000 | 0x21B ERROR_DEVICE_INTERFACE_REMOVED Errno = 0x20000000 | 0xC0000000 | 0x21C ERROR_BAD_INTERFACE_INSTALLSECT Errno = 0x20000000 | 0xC0000000 | 0x21D ERROR_NO_SUCH_INTERFACE_CLASS Errno = 0x20000000 | 0xC0000000 | 0x21E ERROR_INVALID_REFERENCE_STRING Errno = 0x20000000 | 0xC0000000 | 0x21F ERROR_INVALID_MACHINENAME Errno = 0x20000000 | 0xC0000000 | 0x220 ERROR_REMOTE_COMM_FAILURE Errno = 0x20000000 | 0xC0000000 | 0x221 ERROR_MACHINE_UNAVAILABLE Errno = 0x20000000 | 0xC0000000 | 0x222 ERROR_NO_CONFIGMGR_SERVICES Errno = 0x20000000 | 0xC0000000 | 0x223 ERROR_INVALID_PROPPAGE_PROVIDER Errno = 0x20000000 | 0xC0000000 | 0x224 ERROR_NO_SUCH_DEVICE_INTERFACE Errno = 0x20000000 | 0xC0000000 | 0x225 ERROR_DI_POSTPROCESSING_REQUIRED Errno = 0x20000000 | 0xC0000000 | 0x226 ERROR_INVALID_COINSTALLER Errno = 0x20000000 | 0xC0000000 | 0x227 ERROR_NO_COMPAT_DRIVERS Errno = 0x20000000 | 0xC0000000 | 0x228 ERROR_NO_DEVICE_ICON Errno = 0x20000000 | 0xC0000000 | 0x229 ERROR_INVALID_INF_LOGCONFIG Errno = 0x20000000 | 0xC0000000 | 0x22A ERROR_DI_DONT_INSTALL Errno = 0x20000000 | 0xC0000000 | 0x22B ERROR_INVALID_FILTER_DRIVER Errno = 0x20000000 | 0xC0000000 | 0x22C ERROR_NON_WINDOWS_NT_DRIVER Errno = 0x20000000 | 0xC0000000 | 0x22D ERROR_NON_WINDOWS_DRIVER Errno = 0x20000000 | 0xC0000000 | 0x22E ERROR_NO_CATALOG_FOR_OEM_INF Errno = 0x20000000 | 0xC0000000 | 0x22F ERROR_DEVINSTALL_QUEUE_NONNATIVE Errno = 0x20000000 | 0xC0000000 | 0x230 ERROR_NOT_DISABLEABLE Errno = 0x20000000 | 0xC0000000 | 0x231 ERROR_CANT_REMOVE_DEVINST Errno = 0x20000000 | 0xC0000000 | 0x232 ERROR_INVALID_TARGET Errno = 0x20000000 | 0xC0000000 | 0x233 ERROR_DRIVER_NONNATIVE Errno = 0x20000000 | 0xC0000000 | 0x234 ERROR_IN_WOW64 Errno = 0x20000000 | 0xC0000000 | 0x235 ERROR_SET_SYSTEM_RESTORE_POINT Errno = 0x20000000 | 0xC0000000 | 0x236 ERROR_SCE_DISABLED Errno = 0x20000000 | 0xC0000000 | 0x238 ERROR_UNKNOWN_EXCEPTION Errno = 0x20000000 | 0xC0000000 | 0x239 ERROR_PNP_REGISTRY_ERROR Errno = 0x20000000 | 0xC0000000 | 0x23A ERROR_REMOTE_REQUEST_UNSUPPORTED Errno = 0x20000000 | 0xC0000000 | 0x23B ERROR_NOT_AN_INSTALLED_OEM_INF Errno = 0x20000000 | 0xC0000000 | 0x23C ERROR_INF_IN_USE_BY_DEVICES Errno = 0x20000000 | 0xC0000000 | 0x23D ERROR_DI_FUNCTION_OBSOLETE Errno = 0x20000000 | 0xC0000000 | 0x23E ERROR_NO_AUTHENTICODE_CATALOG Errno = 0x20000000 | 0xC0000000 | 0x23F ERROR_AUTHENTICODE_DISALLOWED Errno = 0x20000000 | 0xC0000000 | 0x240 ERROR_AUTHENTICODE_TRUSTED_PUBLISHER Errno = 0x20000000 | 0xC0000000 | 0x241 ERROR_AUTHENTICODE_TRUST_NOT_ESTABLISHED Errno = 0x20000000 | 0xC0000000 | 0x242 ERROR_AUTHENTICODE_PUBLISHER_NOT_TRUSTED Errno = 0x20000000 | 0xC0000000 | 0x243 ERROR_SIGNATURE_OSATTRIBUTE_MISMATCH Errno = 0x20000000 | 0xC0000000 | 0x244 ERROR_ONLY_VALIDATE_VIA_AUTHENTICODE Errno = 0x20000000 | 0xC0000000 | 0x245 ERROR_DEVICE_INSTALLER_NOT_READY Errno = 0x20000000 | 0xC0000000 | 0x246 ERROR_DRIVER_STORE_ADD_FAILED Errno = 0x20000000 | 0xC0000000 | 0x247 ERROR_DEVICE_INSTALL_BLOCKED Errno = 0x20000000 | 0xC0000000 | 0x248 ERROR_DRIVER_INSTALL_BLOCKED Errno = 0x20000000 | 0xC0000000 | 0x249 ERROR_WRONG_INF_TYPE Errno = 0x20000000 | 0xC0000000 | 0x24A ERROR_FILE_HASH_NOT_IN_CATALOG Errno = 0x20000000 | 0xC0000000 | 0x24B ERROR_DRIVER_STORE_DELETE_FAILED Errno = 0x20000000 | 0xC0000000 | 0x24C ERROR_UNRECOVERABLE_STACK_OVERFLOW Errno = 0x20000000 | 0xC0000000 | 0x300 EXCEPTION_SPAPI_UNRECOVERABLE_STACK_OVERFLOW Errno = ERROR_UNRECOVERABLE_STACK_OVERFLOW ERROR_NO_DEFAULT_INTERFACE_DEVICE Errno = ERROR_NO_DEFAULT_DEVICE_INTERFACE ERROR_INTERFACE_DEVICE_ACTIVE Errno = ERROR_DEVICE_INTERFACE_ACTIVE ERROR_INTERFACE_DEVICE_REMOVED Errno = ERROR_DEVICE_INTERFACE_REMOVED ERROR_NO_SUCH_INTERFACE_DEVICE Errno = ERROR_NO_SUCH_DEVICE_INTERFACE ) const ( MAX_DEVICE_ID_LEN = 200 MAX_DEVNODE_ID_LEN = MAX_DEVICE_ID_LEN MAX_GUID_STRING_LEN = 39 // 38 chars + terminator null MAX_CLASS_NAME_LEN = 32 MAX_PROFILE_LEN = 80 MAX_CONFIG_VALUE = 9999 MAX_INSTANCE_VALUE = 9999 CONFIGMG_VERSION = 0x0400 ) // Maximum string length constants const ( LINE_LEN = 256 // Windows 9x-compatible maximum for displayable strings coming from a device INF. MAX_INF_STRING_LENGTH = 4096 // Actual maximum size of an INF string (including string substitutions). MAX_INF_SECTION_NAME_LENGTH = 255 // For Windows 9x compatibility, INF section names should be constrained to 32 characters. MAX_TITLE_LEN = 60 MAX_INSTRUCTION_LEN = 256 MAX_LABEL_LEN = 30 MAX_SERVICE_NAME_LEN = 256 MAX_SUBTITLE_LEN = 256 ) const ( // SP_MAX_MACHINENAME_LENGTH defines maximum length of a machine name in the format expected by ConfigMgr32 CM_Connect_Machine (i.e., "\\\\MachineName\0"). SP_MAX_MACHINENAME_LENGTH = MAX_PATH + 3 ) // HSPFILEQ is type for setup file queue type HSPFILEQ uintptr // DevInfo holds reference to device information set type DevInfo Handle // DEVINST is a handle usually recognized by cfgmgr32 APIs type DEVINST uint32 // DevInfoData is a device information structure (references a device instance that is a member of a device information set) type DevInfoData struct { size uint32 ClassGUID GUID DevInst DEVINST _ uintptr } // DevInfoListDetailData is a structure for detailed information on a device information set (used for SetupDiGetDeviceInfoListDetail which supersedes the functionality of SetupDiGetDeviceInfoListClass). type DevInfoListDetailData struct { size uint32 // Use unsafeSizeOf method ClassGUID GUID RemoteMachineHandle Handle remoteMachineName [SP_MAX_MACHINENAME_LENGTH]uint16 } func (*DevInfoListDetailData) unsafeSizeOf() uint32 { if unsafe.Sizeof(uintptr(0)) == 4 { // Windows declares this with pshpack1.h return uint32(unsafe.Offsetof(DevInfoListDetailData{}.remoteMachineName) + unsafe.Sizeof(DevInfoListDetailData{}.remoteMachineName)) } return uint32(unsafe.Sizeof(DevInfoListDetailData{})) } func (data *DevInfoListDetailData) RemoteMachineName() string { return UTF16ToString(data.remoteMachineName[:]) } func (data *DevInfoListDetailData) SetRemoteMachineName(remoteMachineName string) error { str, err := UTF16FromString(remoteMachineName) if err != nil { return err } copy(data.remoteMachineName[:], str) return nil } // DI_FUNCTION is function type for device installer type DI_FUNCTION uint32 const ( DIF_SELECTDEVICE DI_FUNCTION = 0x00000001 DIF_INSTALLDEVICE DI_FUNCTION = 0x00000002 DIF_ASSIGNRESOURCES DI_FUNCTION = 0x00000003 DIF_PROPERTIES DI_FUNCTION = 0x00000004 DIF_REMOVE DI_FUNCTION = 0x00000005 DIF_FIRSTTIMESETUP DI_FUNCTION = 0x00000006 DIF_FOUNDDEVICE DI_FUNCTION = 0x00000007 DIF_SELECTCLASSDRIVERS DI_FUNCTION = 0x00000008 DIF_VALIDATECLASSDRIVERS DI_FUNCTION = 0x00000009 DIF_INSTALLCLASSDRIVERS DI_FUNCTION = 0x0000000A DIF_CALCDISKSPACE DI_FUNCTION = 0x0000000B DIF_DESTROYPRIVATEDATA DI_FUNCTION = 0x0000000C DIF_VALIDATEDRIVER DI_FUNCTION = 0x0000000D DIF_DETECT DI_FUNCTION = 0x0000000F DIF_INSTALLWIZARD DI_FUNCTION = 0x00000010 DIF_DESTROYWIZARDDATA DI_FUNCTION = 0x00000011 DIF_PROPERTYCHANGE DI_FUNCTION = 0x00000012 DIF_ENABLECLASS DI_FUNCTION = 0x00000013 DIF_DETECTVERIFY DI_FUNCTION = 0x00000014 DIF_INSTALLDEVICEFILES DI_FUNCTION = 0x00000015 DIF_UNREMOVE DI_FUNCTION = 0x00000016 DIF_SELECTBESTCOMPATDRV DI_FUNCTION = 0x00000017 DIF_ALLOW_INSTALL DI_FUNCTION = 0x00000018 DIF_REGISTERDEVICE DI_FUNCTION = 0x00000019 DIF_NEWDEVICEWIZARD_PRESELECT DI_FUNCTION = 0x0000001A DIF_NEWDEVICEWIZARD_SELECT DI_FUNCTION = 0x0000001B DIF_NEWDEVICEWIZARD_PREANALYZE DI_FUNCTION = 0x0000001C DIF_NEWDEVICEWIZARD_POSTANALYZE DI_FUNCTION = 0x0000001D DIF_NEWDEVICEWIZARD_FINISHINSTALL DI_FUNCTION = 0x0000001E DIF_INSTALLINTERFACES DI_FUNCTION = 0x00000020 DIF_DETECTCANCEL DI_FUNCTION = 0x00000021 DIF_REGISTER_COINSTALLERS DI_FUNCTION = 0x00000022 DIF_ADDPROPERTYPAGE_ADVANCED DI_FUNCTION = 0x00000023 DIF_ADDPROPERTYPAGE_BASIC DI_FUNCTION = 0x00000024 DIF_TROUBLESHOOTER DI_FUNCTION = 0x00000026 DIF_POWERMESSAGEWAKE DI_FUNCTION = 0x00000027 DIF_ADDREMOTEPROPERTYPAGE_ADVANCED DI_FUNCTION = 0x00000028 DIF_UPDATEDRIVER_UI DI_FUNCTION = 0x00000029 DIF_FINISHINSTALL_ACTION DI_FUNCTION = 0x0000002A ) // DevInstallParams is device installation parameters structure (associated with a particular device information element, or globally with a device information set) type DevInstallParams struct { size uint32 Flags DI_FLAGS FlagsEx DI_FLAGSEX hwndParent uintptr InstallMsgHandler uintptr InstallMsgHandlerContext uintptr FileQueue HSPFILEQ _ uintptr _ uint32 driverPath [MAX_PATH]uint16 } func (params *DevInstallParams) DriverPath() string { return UTF16ToString(params.driverPath[:]) } func (params *DevInstallParams) SetDriverPath(driverPath string) error { str, err := UTF16FromString(driverPath) if err != nil { return err } copy(params.driverPath[:], str) return nil } // DI_FLAGS is SP_DEVINSTALL_PARAMS.Flags values type DI_FLAGS uint32 const ( // Flags for choosing a device DI_SHOWOEM DI_FLAGS = 0x00000001 // support Other... button DI_SHOWCOMPAT DI_FLAGS = 0x00000002 // show compatibility list DI_SHOWCLASS DI_FLAGS = 0x00000004 // show class list DI_SHOWALL DI_FLAGS = 0x00000007 // both class & compat list shown DI_NOVCP DI_FLAGS = 0x00000008 // don't create a new copy queue--use caller-supplied FileQueue DI_DIDCOMPAT DI_FLAGS = 0x00000010 // Searched for compatible devices DI_DIDCLASS DI_FLAGS = 0x00000020 // Searched for class devices DI_AUTOASSIGNRES DI_FLAGS = 0x00000040 // No UI for resources if possible // Flags returned by DiInstallDevice to indicate need to reboot/restart DI_NEEDRESTART DI_FLAGS = 0x00000080 // Reboot required to take effect DI_NEEDREBOOT DI_FLAGS = 0x00000100 // "" // Flags for device installation DI_NOBROWSE DI_FLAGS = 0x00000200 // no Browse... in InsertDisk // Flags set by DiBuildDriverInfoList DI_MULTMFGS DI_FLAGS = 0x00000400 // Set if multiple manufacturers in class driver list // Flag indicates that device is disabled DI_DISABLED DI_FLAGS = 0x00000800 // Set if device disabled // Flags for Device/Class Properties DI_GENERALPAGE_ADDED DI_FLAGS = 0x00001000 DI_RESOURCEPAGE_ADDED DI_FLAGS = 0x00002000 // Flag to indicate the setting properties for this Device (or class) caused a change so the Dev Mgr UI probably needs to be updated. DI_PROPERTIES_CHANGE DI_FLAGS = 0x00004000 // Flag to indicate that the sorting from the INF file should be used. DI_INF_IS_SORTED DI_FLAGS = 0x00008000 // Flag to indicate that only the INF specified by SP_DEVINSTALL_PARAMS.DriverPath should be searched. DI_ENUMSINGLEINF DI_FLAGS = 0x00010000 // Flag that prevents ConfigMgr from removing/re-enumerating devices during device // registration, installation, and deletion. DI_DONOTCALLCONFIGMG DI_FLAGS = 0x00020000 // The following flag can be used to install a device disabled DI_INSTALLDISABLED DI_FLAGS = 0x00040000 // Flag that causes SetupDiBuildDriverInfoList to build a device's compatible driver // list from its existing class driver list, instead of the normal INF search. DI_COMPAT_FROM_CLASS DI_FLAGS = 0x00080000 // This flag is set if the Class Install params should be used. DI_CLASSINSTALLPARAMS DI_FLAGS = 0x00100000 // This flag is set if the caller of DiCallClassInstaller does NOT want the internal default action performed if the Class installer returns ERROR_DI_DO_DEFAULT. DI_NODI_DEFAULTACTION DI_FLAGS = 0x00200000 // Flags for device installation DI_QUIETINSTALL DI_FLAGS = 0x00800000 // don't confuse the user with questions or excess info DI_NOFILECOPY DI_FLAGS = 0x01000000 // No file Copy necessary DI_FORCECOPY DI_FLAGS = 0x02000000 // Force files to be copied from install path DI_DRIVERPAGE_ADDED DI_FLAGS = 0x04000000 // Prop provider added Driver page. DI_USECI_SELECTSTRINGS DI_FLAGS = 0x08000000 // Use Class Installer Provided strings in the Select Device Dlg DI_OVERRIDE_INFFLAGS DI_FLAGS = 0x10000000 // Override INF flags DI_PROPS_NOCHANGEUSAGE DI_FLAGS = 0x20000000 // No Enable/Disable in General Props DI_NOSELECTICONS DI_FLAGS = 0x40000000 // No small icons in select device dialogs DI_NOWRITE_IDS DI_FLAGS = 0x80000000 // Don't write HW & Compat IDs on install ) // DI_FLAGSEX is SP_DEVINSTALL_PARAMS.FlagsEx values type DI_FLAGSEX uint32 const ( DI_FLAGSEX_CI_FAILED DI_FLAGSEX = 0x00000004 // Failed to Load/Call class installer DI_FLAGSEX_FINISHINSTALL_ACTION DI_FLAGSEX = 0x00000008 // Class/co-installer wants to get a DIF_FINISH_INSTALL action in client context. DI_FLAGSEX_DIDINFOLIST DI_FLAGSEX = 0x00000010 // Did the Class Info List DI_FLAGSEX_DIDCOMPATINFO DI_FLAGSEX = 0x00000020 // Did the Compat Info List DI_FLAGSEX_FILTERCLASSES DI_FLAGSEX = 0x00000040 DI_FLAGSEX_SETFAILEDINSTALL DI_FLAGSEX = 0x00000080 DI_FLAGSEX_DEVICECHANGE DI_FLAGSEX = 0x00000100 DI_FLAGSEX_ALWAYSWRITEIDS DI_FLAGSEX = 0x00000200 DI_FLAGSEX_PROPCHANGE_PENDING DI_FLAGSEX = 0x00000400 // One or more device property sheets have had changes made to them, and need to have a DIF_PROPERTYCHANGE occur. DI_FLAGSEX_ALLOWEXCLUDEDDRVS DI_FLAGSEX = 0x00000800 DI_FLAGSEX_NOUIONQUERYREMOVE DI_FLAGSEX = 0x00001000 DI_FLAGSEX_USECLASSFORCOMPAT DI_FLAGSEX = 0x00002000 // Use the device's class when building compat drv list. (Ignored if DI_COMPAT_FROM_CLASS flag is specified.) DI_FLAGSEX_NO_DRVREG_MODIFY DI_FLAGSEX = 0x00008000 // Don't run AddReg and DelReg for device's software (driver) key. DI_FLAGSEX_IN_SYSTEM_SETUP DI_FLAGSEX = 0x00010000 // Installation is occurring during initial system setup. DI_FLAGSEX_INET_DRIVER DI_FLAGSEX = 0x00020000 // Driver came from Windows Update DI_FLAGSEX_APPENDDRIVERLIST DI_FLAGSEX = 0x00040000 // Cause SetupDiBuildDriverInfoList to append a new driver list to an existing list. DI_FLAGSEX_PREINSTALLBACKUP DI_FLAGSEX = 0x00080000 // not used DI_FLAGSEX_BACKUPONREPLACE DI_FLAGSEX = 0x00100000 // not used DI_FLAGSEX_DRIVERLIST_FROM_URL DI_FLAGSEX = 0x00200000 // build driver list from INF(s) retrieved from URL specified in SP_DEVINSTALL_PARAMS.DriverPath (empty string means Windows Update website) DI_FLAGSEX_EXCLUDE_OLD_INET_DRIVERS DI_FLAGSEX = 0x00800000 // Don't include old Internet drivers when building a driver list. Ignored on Windows Vista and later. DI_FLAGSEX_POWERPAGE_ADDED DI_FLAGSEX = 0x01000000 // class installer added their own power page DI_FLAGSEX_FILTERSIMILARDRIVERS DI_FLAGSEX = 0x02000000 // only include similar drivers in class list DI_FLAGSEX_INSTALLEDDRIVER DI_FLAGSEX = 0x04000000 // only add the installed driver to the class or compat driver list. Used in calls to SetupDiBuildDriverInfoList DI_FLAGSEX_NO_CLASSLIST_NODE_MERGE DI_FLAGSEX = 0x08000000 // Don't remove identical driver nodes from the class list DI_FLAGSEX_ALTPLATFORM_DRVSEARCH DI_FLAGSEX = 0x10000000 // Build driver list based on alternate platform information specified in associated file queue DI_FLAGSEX_RESTART_DEVICE_ONLY DI_FLAGSEX = 0x20000000 // only restart the device drivers are being installed on as opposed to restarting all devices using those drivers. DI_FLAGSEX_RECURSIVESEARCH DI_FLAGSEX = 0x40000000 // Tell SetupDiBuildDriverInfoList to do a recursive search DI_FLAGSEX_SEARCH_PUBLISHED_INFS DI_FLAGSEX = 0x80000000 // Tell SetupDiBuildDriverInfoList to do a "published INF" search ) // ClassInstallHeader is the first member of any class install parameters structure. It contains the device installation request code that defines the format of the rest of the install parameters structure. type ClassInstallHeader struct { size uint32 InstallFunction DI_FUNCTION } func MakeClassInstallHeader(installFunction DI_FUNCTION) *ClassInstallHeader { hdr := &ClassInstallHeader{InstallFunction: installFunction} hdr.size = uint32(unsafe.Sizeof(*hdr)) return hdr } // DICS_STATE specifies values indicating a change in a device's state type DICS_STATE uint32 const ( DICS_ENABLE DICS_STATE = 0x00000001 // The device is being enabled. DICS_DISABLE DICS_STATE = 0x00000002 // The device is being disabled. DICS_PROPCHANGE DICS_STATE = 0x00000003 // The properties of the device have changed. DICS_START DICS_STATE = 0x00000004 // The device is being started (if the request is for the currently active hardware profile). DICS_STOP DICS_STATE = 0x00000005 // The device is being stopped. The driver stack will be unloaded and the CSCONFIGFLAG_DO_NOT_START flag will be set for the device. ) // DICS_FLAG specifies the scope of a device property change type DICS_FLAG uint32 const ( DICS_FLAG_GLOBAL DICS_FLAG = 0x00000001 // make change in all hardware profiles DICS_FLAG_CONFIGSPECIFIC DICS_FLAG = 0x00000002 // make change in specified profile only DICS_FLAG_CONFIGGENERAL DICS_FLAG = 0x00000004 // 1 or more hardware profile-specific changes to follow (obsolete) ) // PropChangeParams is a structure corresponding to a DIF_PROPERTYCHANGE install function. type PropChangeParams struct { ClassInstallHeader ClassInstallHeader StateChange DICS_STATE Scope DICS_FLAG HwProfile uint32 } // DI_REMOVEDEVICE specifies the scope of the device removal type DI_REMOVEDEVICE uint32 const ( DI_REMOVEDEVICE_GLOBAL DI_REMOVEDEVICE = 0x00000001 // Make this change in all hardware profiles. Remove information about the device from the registry. DI_REMOVEDEVICE_CONFIGSPECIFIC DI_REMOVEDEVICE = 0x00000002 // Make this change to only the hardware profile specified by HwProfile. this flag only applies to root-enumerated devices. When Windows removes the device from the last hardware profile in which it was configured, Windows performs a global removal. ) // RemoveDeviceParams is a structure corresponding to a DIF_REMOVE install function. type RemoveDeviceParams struct { ClassInstallHeader ClassInstallHeader Scope DI_REMOVEDEVICE HwProfile uint32 } // DrvInfoData is driver information structure (member of a driver info list that may be associated with a particular device instance, or (globally) with a device information set) type DrvInfoData struct { size uint32 DriverType uint32 _ uintptr description [LINE_LEN]uint16 mfgName [LINE_LEN]uint16 providerName [LINE_LEN]uint16 DriverDate Filetime DriverVersion uint64 } func (data *DrvInfoData) Description() string { return UTF16ToString(data.description[:]) } func (data *DrvInfoData) SetDescription(description string) error { str, err := UTF16FromString(description) if err != nil { return err } copy(data.description[:], str) return nil } func (data *DrvInfoData) MfgName() string { return UTF16ToString(data.mfgName[:]) } func (data *DrvInfoData) SetMfgName(mfgName string) error { str, err := UTF16FromString(mfgName) if err != nil { return err } copy(data.mfgName[:], str) return nil } func (data *DrvInfoData) ProviderName() string { return UTF16ToString(data.providerName[:]) } func (data *DrvInfoData) SetProviderName(providerName string) error { str, err := UTF16FromString(providerName) if err != nil { return err } copy(data.providerName[:], str) return nil } // IsNewer method returns true if DrvInfoData date and version is newer than supplied parameters. func (data *DrvInfoData) IsNewer(driverDate Filetime, driverVersion uint64) bool { if data.DriverDate.HighDateTime > driverDate.HighDateTime { return true } if data.DriverDate.HighDateTime < driverDate.HighDateTime { return false } if data.DriverDate.LowDateTime > driverDate.LowDateTime { return true } if data.DriverDate.LowDateTime < driverDate.LowDateTime { return false } if data.DriverVersion > driverVersion { return true } if data.DriverVersion < driverVersion { return false } return false } // DrvInfoDetailData is driver information details structure (provides detailed information about a particular driver information structure) type DrvInfoDetailData struct { size uint32 // Use unsafeSizeOf method InfDate Filetime compatIDsOffset uint32 compatIDsLength uint32 _ uintptr sectionName [LINE_LEN]uint16 infFileName [MAX_PATH]uint16 drvDescription [LINE_LEN]uint16 hardwareID [1]uint16 } func (*DrvInfoDetailData) unsafeSizeOf() uint32 { if unsafe.Sizeof(uintptr(0)) == 4 { // Windows declares this with pshpack1.h return uint32(unsafe.Offsetof(DrvInfoDetailData{}.hardwareID) + unsafe.Sizeof(DrvInfoDetailData{}.hardwareID)) } return uint32(unsafe.Sizeof(DrvInfoDetailData{})) } func (data *DrvInfoDetailData) SectionName() string { return UTF16ToString(data.sectionName[:]) } func (data *DrvInfoDetailData) InfFileName() string { return UTF16ToString(data.infFileName[:]) } func (data *DrvInfoDetailData) DrvDescription() string { return UTF16ToString(data.drvDescription[:]) } func (data *DrvInfoDetailData) HardwareID() string { if data.compatIDsOffset > 1 { bufW := data.getBuf() return UTF16ToString(bufW[:wcslen(bufW)]) } return "" } func (data *DrvInfoDetailData) CompatIDs() []string { a := make([]string, 0) if data.compatIDsLength > 0 { bufW := data.getBuf() bufW = bufW[data.compatIDsOffset : data.compatIDsOffset+data.compatIDsLength] for i := 0; i < len(bufW); { j := i + wcslen(bufW[i:]) if i < j { a = append(a, UTF16ToString(bufW[i:j])) } i = j + 1 } } return a } func (data *DrvInfoDetailData) getBuf() []uint16 { len := (data.size - uint32(unsafe.Offsetof(data.hardwareID))) / 2 sl := struct { addr *uint16 len int cap int }{&data.hardwareID[0], int(len), int(len)} return *(*[]uint16)(unsafe.Pointer(&sl)) } // IsCompatible method tests if given hardware ID matches the driver or is listed on the compatible ID list. func (data *DrvInfoDetailData) IsCompatible(hwid string) bool { hwidLC := strings.ToLower(hwid) if strings.ToLower(data.HardwareID()) == hwidLC { return true } a := data.CompatIDs() for i := range a { if strings.ToLower(a[i]) == hwidLC { return true } } return false } // DICD flags control SetupDiCreateDeviceInfo type DICD uint32 const ( DICD_GENERATE_ID DICD = 0x00000001 DICD_INHERIT_CLASSDRVS DICD = 0x00000002 ) // SUOI flags control SetupUninstallOEMInf type SUOI uint32 const ( SUOI_FORCEDELETE SUOI = 0x0001 ) // SPDIT flags to distinguish between class drivers and // device drivers. (Passed in 'DriverType' parameter of // driver information list APIs) type SPDIT uint32 const ( SPDIT_NODRIVER SPDIT = 0x00000000 SPDIT_CLASSDRIVER SPDIT = 0x00000001 SPDIT_COMPATDRIVER SPDIT = 0x00000002 ) // DIGCF flags control what is included in the device information set built by SetupDiGetClassDevs type DIGCF uint32 const ( DIGCF_DEFAULT DIGCF = 0x00000001 // only valid with DIGCF_DEVICEINTERFACE DIGCF_PRESENT DIGCF = 0x00000002 DIGCF_ALLCLASSES DIGCF = 0x00000004 DIGCF_PROFILE DIGCF = 0x00000008 DIGCF_DEVICEINTERFACE DIGCF = 0x00000010 ) // DIREG specifies values for SetupDiCreateDevRegKey, SetupDiOpenDevRegKey, and SetupDiDeleteDevRegKey. type DIREG uint32 const ( DIREG_DEV DIREG = 0x00000001 // Open/Create/Delete device key DIREG_DRV DIREG = 0x00000002 // Open/Create/Delete driver key DIREG_BOTH DIREG = 0x00000004 // Delete both driver and Device key ) // SPDRP specifies device registry property codes // (Codes marked as read-only (R) may only be used for // SetupDiGetDeviceRegistryProperty) // // These values should cover the same set of registry properties // as defined by the CM_DRP codes in cfgmgr32.h. // // Note that SPDRP codes are zero based while CM_DRP codes are one based! type SPDRP uint32 const ( SPDRP_DEVICEDESC SPDRP = 0x00000000 // DeviceDesc (R/W) SPDRP_HARDWAREID SPDRP = 0x00000001 // HardwareID (R/W) SPDRP_COMPATIBLEIDS SPDRP = 0x00000002 // CompatibleIDs (R/W) SPDRP_SERVICE SPDRP = 0x00000004 // Service (R/W) SPDRP_CLASS SPDRP = 0x00000007 // Class (R--tied to ClassGUID) SPDRP_CLASSGUID SPDRP = 0x00000008 // ClassGUID (R/W) SPDRP_DRIVER SPDRP = 0x00000009 // Driver (R/W) SPDRP_CONFIGFLAGS SPDRP = 0x0000000A // ConfigFlags (R/W) SPDRP_MFG SPDRP = 0x0000000B // Mfg (R/W) SPDRP_FRIENDLYNAME SPDRP = 0x0000000C // FriendlyName (R/W) SPDRP_LOCATION_INFORMATION SPDRP = 0x0000000D // LocationInformation (R/W) SPDRP_PHYSICAL_DEVICE_OBJECT_NAME SPDRP = 0x0000000E // PhysicalDeviceObjectName (R) SPDRP_CAPABILITIES SPDRP = 0x0000000F // Capabilities (R) SPDRP_UI_NUMBER SPDRP = 0x00000010 // UiNumber (R) SPDRP_UPPERFILTERS SPDRP = 0x00000011 // UpperFilters (R/W) SPDRP_LOWERFILTERS SPDRP = 0x00000012 // LowerFilters (R/W) SPDRP_BUSTYPEGUID SPDRP = 0x00000013 // BusTypeGUID (R) SPDRP_LEGACYBUSTYPE SPDRP = 0x00000014 // LegacyBusType (R) SPDRP_BUSNUMBER SPDRP = 0x00000015 // BusNumber (R) SPDRP_ENUMERATOR_NAME SPDRP = 0x00000016 // Enumerator Name (R) SPDRP_SECURITY SPDRP = 0x00000017 // Security (R/W, binary form) SPDRP_SECURITY_SDS SPDRP = 0x00000018 // Security (W, SDS form) SPDRP_DEVTYPE SPDRP = 0x00000019 // Device Type (R/W) SPDRP_EXCLUSIVE SPDRP = 0x0000001A // Device is exclusive-access (R/W) SPDRP_CHARACTERISTICS SPDRP = 0x0000001B // Device Characteristics (R/W) SPDRP_ADDRESS SPDRP = 0x0000001C // Device Address (R) SPDRP_UI_NUMBER_DESC_FORMAT SPDRP = 0x0000001D // UiNumberDescFormat (R/W) SPDRP_DEVICE_POWER_DATA SPDRP = 0x0000001E // Device Power Data (R) SPDRP_REMOVAL_POLICY SPDRP = 0x0000001F // Removal Policy (R) SPDRP_REMOVAL_POLICY_HW_DEFAULT SPDRP = 0x00000020 // Hardware Removal Policy (R) SPDRP_REMOVAL_POLICY_OVERRIDE SPDRP = 0x00000021 // Removal Policy Override (RW) SPDRP_INSTALL_STATE SPDRP = 0x00000022 // Device Install State (R) SPDRP_LOCATION_PATHS SPDRP = 0x00000023 // Device Location Paths (R) SPDRP_BASE_CONTAINERID SPDRP = 0x00000024 // Base ContainerID (R) SPDRP_MAXIMUM_PROPERTY SPDRP = 0x00000025 // Upper bound on ordinals ) // DEVPROPTYPE represents the property-data-type identifier that specifies the // data type of a device property value in the unified device property model. type DEVPROPTYPE uint32 const ( DEVPROP_TYPEMOD_ARRAY DEVPROPTYPE = 0x00001000 DEVPROP_TYPEMOD_LIST DEVPROPTYPE = 0x00002000 DEVPROP_TYPE_EMPTY DEVPROPTYPE = 0x00000000 DEVPROP_TYPE_NULL DEVPROPTYPE = 0x00000001 DEVPROP_TYPE_SBYTE DEVPROPTYPE = 0x00000002 DEVPROP_TYPE_BYTE DEVPROPTYPE = 0x00000003 DEVPROP_TYPE_INT16 DEVPROPTYPE = 0x00000004 DEVPROP_TYPE_UINT16 DEVPROPTYPE = 0x00000005 DEVPROP_TYPE_INT32 DEVPROPTYPE = 0x00000006 DEVPROP_TYPE_UINT32 DEVPROPTYPE = 0x00000007 DEVPROP_TYPE_INT64 DEVPROPTYPE = 0x00000008 DEVPROP_TYPE_UINT64 DEVPROPTYPE = 0x00000009 DEVPROP_TYPE_FLOAT DEVPROPTYPE = 0x0000000A DEVPROP_TYPE_DOUBLE DEVPROPTYPE = 0x0000000B DEVPROP_TYPE_DECIMAL DEVPROPTYPE = 0x0000000C DEVPROP_TYPE_GUID DEVPROPTYPE = 0x0000000D DEVPROP_TYPE_CURRENCY DEVPROPTYPE = 0x0000000E DEVPROP_TYPE_DATE DEVPROPTYPE = 0x0000000F DEVPROP_TYPE_FILETIME DEVPROPTYPE = 0x00000010 DEVPROP_TYPE_BOOLEAN DEVPROPTYPE = 0x00000011 DEVPROP_TYPE_STRING DEVPROPTYPE = 0x00000012 DEVPROP_TYPE_STRING_LIST DEVPROPTYPE = DEVPROP_TYPE_STRING | DEVPROP_TYPEMOD_LIST DEVPROP_TYPE_SECURITY_DESCRIPTOR DEVPROPTYPE = 0x00000013 DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING DEVPROPTYPE = 0x00000014 DEVPROP_TYPE_DEVPROPKEY DEVPROPTYPE = 0x00000015 DEVPROP_TYPE_DEVPROPTYPE DEVPROPTYPE = 0x00000016 DEVPROP_TYPE_BINARY DEVPROPTYPE = DEVPROP_TYPE_BYTE | DEVPROP_TYPEMOD_ARRAY DEVPROP_TYPE_ERROR DEVPROPTYPE = 0x00000017 DEVPROP_TYPE_NTSTATUS DEVPROPTYPE = 0x00000018 DEVPROP_TYPE_STRING_INDIRECT DEVPROPTYPE = 0x00000019 MAX_DEVPROP_TYPE DEVPROPTYPE = 0x00000019 MAX_DEVPROP_TYPEMOD DEVPROPTYPE = 0x00002000 DEVPROP_MASK_TYPE DEVPROPTYPE = 0x00000FFF DEVPROP_MASK_TYPEMOD DEVPROPTYPE = 0x0000F000 ) // DEVPROPGUID specifies a property category. type DEVPROPGUID GUID // DEVPROPID uniquely identifies the property within the property category. type DEVPROPID uint32 const DEVPROPID_FIRST_USABLE DEVPROPID = 2 // DEVPROPKEY represents a device property key for a device property in the // unified device property model. type DEVPROPKEY struct { FmtID DEVPROPGUID PID DEVPROPID } // CONFIGRET is a return value or error code from cfgmgr32 APIs type CONFIGRET uint32 func (ret CONFIGRET) Error() string { if win32Error, ok := ret.Unwrap().(Errno); ok { return fmt.Sprintf("%s (CfgMgr error: 0x%08x)", win32Error.Error(), uint32(ret)) } return fmt.Sprintf("CfgMgr error: 0x%08x", uint32(ret)) } func (ret CONFIGRET) Win32Error(defaultError Errno) Errno { return cm_MapCrToWin32Err(ret, defaultError) } func (ret CONFIGRET) Unwrap() error { const noMatch = Errno(^uintptr(0)) win32Error := ret.Win32Error(noMatch) if win32Error == noMatch { return nil } return win32Error } const ( CR_SUCCESS CONFIGRET = 0x00000000 CR_DEFAULT CONFIGRET = 0x00000001 CR_OUT_OF_MEMORY CONFIGRET = 0x00000002 CR_INVALID_POINTER CONFIGRET = 0x00000003 CR_INVALID_FLAG CONFIGRET = 0x00000004 CR_INVALID_DEVNODE CONFIGRET = 0x00000005 CR_INVALID_DEVINST = CR_INVALID_DEVNODE CR_INVALID_RES_DES CONFIGRET = 0x00000006 CR_INVALID_LOG_CONF CONFIGRET = 0x00000007 CR_INVALID_ARBITRATOR CONFIGRET = 0x00000008 CR_INVALID_NODELIST CONFIGRET = 0x00000009 CR_DEVNODE_HAS_REQS CONFIGRET = 0x0000000A CR_DEVINST_HAS_REQS = CR_DEVNODE_HAS_REQS CR_INVALID_RESOURCEID CONFIGRET = 0x0000000B CR_DLVXD_NOT_FOUND CONFIGRET = 0x0000000C CR_NO_SUCH_DEVNODE CONFIGRET = 0x0000000D CR_NO_SUCH_DEVINST = CR_NO_SUCH_DEVNODE CR_NO_MORE_LOG_CONF CONFIGRET = 0x0000000E CR_NO_MORE_RES_DES CONFIGRET = 0x0000000F CR_ALREADY_SUCH_DEVNODE CONFIGRET = 0x00000010 CR_ALREADY_SUCH_DEVINST = CR_ALREADY_SUCH_DEVNODE CR_INVALID_RANGE_LIST CONFIGRET = 0x00000011 CR_INVALID_RANGE CONFIGRET = 0x00000012 CR_FAILURE CONFIGRET = 0x00000013 CR_NO_SUCH_LOGICAL_DEV CONFIGRET = 0x00000014 CR_CREATE_BLOCKED CONFIGRET = 0x00000015 CR_NOT_SYSTEM_VM CONFIGRET = 0x00000016 CR_REMOVE_VETOED CONFIGRET = 0x00000017 CR_APM_VETOED CONFIGRET = 0x00000018 CR_INVALID_LOAD_TYPE CONFIGRET = 0x00000019 CR_BUFFER_SMALL CONFIGRET = 0x0000001A CR_NO_ARBITRATOR CONFIGRET = 0x0000001B CR_NO_REGISTRY_HANDLE CONFIGRET = 0x0000001C CR_REGISTRY_ERROR CONFIGRET = 0x0000001D CR_INVALID_DEVICE_ID CONFIGRET = 0x0000001E CR_INVALID_DATA CONFIGRET = 0x0000001F CR_INVALID_API CONFIGRET = 0x00000020 CR_DEVLOADER_NOT_READY CONFIGRET = 0x00000021 CR_NEED_RESTART CONFIGRET = 0x00000022 CR_NO_MORE_HW_PROFILES CONFIGRET = 0x00000023 CR_DEVICE_NOT_THERE CONFIGRET = 0x00000024 CR_NO_SUCH_VALUE CONFIGRET = 0x00000025 CR_WRONG_TYPE CONFIGRET = 0x00000026 CR_INVALID_PRIORITY CONFIGRET = 0x00000027 CR_NOT_DISABLEABLE CONFIGRET = 0x00000028 CR_FREE_RESOURCES CONFIGRET = 0x00000029 CR_QUERY_VETOED CONFIGRET = 0x0000002A CR_CANT_SHARE_IRQ CONFIGRET = 0x0000002B CR_NO_DEPENDENT CONFIGRET = 0x0000002C CR_SAME_RESOURCES CONFIGRET = 0x0000002D CR_NO_SUCH_REGISTRY_KEY CONFIGRET = 0x0000002E CR_INVALID_MACHINENAME CONFIGRET = 0x0000002F CR_REMOTE_COMM_FAILURE CONFIGRET = 0x00000030 CR_MACHINE_UNAVAILABLE CONFIGRET = 0x00000031 CR_NO_CM_SERVICES CONFIGRET = 0x00000032 CR_ACCESS_DENIED CONFIGRET = 0x00000033 CR_CALL_NOT_IMPLEMENTED CONFIGRET = 0x00000034 CR_INVALID_PROPERTY CONFIGRET = 0x00000035 CR_DEVICE_INTERFACE_ACTIVE CONFIGRET = 0x00000036 CR_NO_SUCH_DEVICE_INTERFACE CONFIGRET = 0x00000037 CR_INVALID_REFERENCE_STRING CONFIGRET = 0x00000038 CR_INVALID_CONFLICT_LIST CONFIGRET = 0x00000039 CR_INVALID_INDEX CONFIGRET = 0x0000003A CR_INVALID_STRUCTURE_SIZE CONFIGRET = 0x0000003B NUM_CR_RESULTS CONFIGRET = 0x0000003C ) const ( CM_GET_DEVICE_INTERFACE_LIST_PRESENT = 0 // only currently 'live' device interfaces CM_GET_DEVICE_INTERFACE_LIST_ALL_DEVICES = 1 // all registered device interfaces, live or not ) const ( DN_ROOT_ENUMERATED = 0x00000001 // Was enumerated by ROOT DN_DRIVER_LOADED = 0x00000002 // Has Register_Device_Driver DN_ENUM_LOADED = 0x00000004 // Has Register_Enumerator DN_STARTED = 0x00000008 // Is currently configured DN_MANUAL = 0x00000010 // Manually installed DN_NEED_TO_ENUM = 0x00000020 // May need reenumeration DN_NOT_FIRST_TIME = 0x00000040 // Has received a config DN_HARDWARE_ENUM = 0x00000080 // Enum generates hardware ID DN_LIAR = 0x00000100 // Lied about can reconfig once DN_HAS_MARK = 0x00000200 // Not CM_Create_DevInst lately DN_HAS_PROBLEM = 0x00000400 // Need device installer DN_FILTERED = 0x00000800 // Is filtered DN_MOVED = 0x00001000 // Has been moved DN_DISABLEABLE = 0x00002000 // Can be disabled DN_REMOVABLE = 0x00004000 // Can be removed DN_PRIVATE_PROBLEM = 0x00008000 // Has a private problem DN_MF_PARENT = 0x00010000 // Multi function parent DN_MF_CHILD = 0x00020000 // Multi function child DN_WILL_BE_REMOVED = 0x00040000 // DevInst is being removed DN_NOT_FIRST_TIMEE = 0x00080000 // Has received a config enumerate DN_STOP_FREE_RES = 0x00100000 // When child is stopped, free resources DN_REBAL_CANDIDATE = 0x00200000 // Don't skip during rebalance DN_BAD_PARTIAL = 0x00400000 // This devnode's log_confs do not have same resources DN_NT_ENUMERATOR = 0x00800000 // This devnode's is an NT enumerator DN_NT_DRIVER = 0x01000000 // This devnode's is an NT driver DN_NEEDS_LOCKING = 0x02000000 // Devnode need lock resume processing DN_ARM_WAKEUP = 0x04000000 // Devnode can be the wakeup device DN_APM_ENUMERATOR = 0x08000000 // APM aware enumerator DN_APM_DRIVER = 0x10000000 // APM aware driver DN_SILENT_INSTALL = 0x20000000 // Silent install DN_NO_SHOW_IN_DM = 0x40000000 // No show in device manager DN_BOOT_LOG_PROB = 0x80000000 // Had a problem during preassignment of boot log conf DN_NEED_RESTART = DN_LIAR // System needs to be restarted for this Devnode to work properly DN_DRIVER_BLOCKED = DN_NOT_FIRST_TIME // One or more drivers are blocked from loading for this Devnode DN_LEGACY_DRIVER = DN_MOVED // This device is using a legacy driver DN_CHILD_WITH_INVALID_ID = DN_HAS_MARK // One or more children have invalid IDs DN_DEVICE_DISCONNECTED = DN_NEEDS_LOCKING // The function driver for a device reported that the device is not connected. Typically this means a wireless device is out of range. DN_QUERY_REMOVE_PENDING = DN_MF_PARENT // Device is part of a set of related devices collectively pending query-removal DN_QUERY_REMOVE_ACTIVE = DN_MF_CHILD // Device is actively engaged in a query-remove IRP DN_CHANGEABLE_FLAGS = DN_NOT_FIRST_TIME | DN_HARDWARE_ENUM | DN_HAS_MARK | DN_DISABLEABLE | DN_REMOVABLE | DN_MF_CHILD | DN_MF_PARENT | DN_NOT_FIRST_TIMEE | DN_STOP_FREE_RES | DN_REBAL_CANDIDATE | DN_NT_ENUMERATOR | DN_NT_DRIVER | DN_SILENT_INSTALL | DN_NO_SHOW_IN_DM ) //sys setupDiCreateDeviceInfoListEx(classGUID *GUID, hwndParent uintptr, machineName *uint16, reserved uintptr) (handle DevInfo, err error) [failretval==DevInfo(InvalidHandle)] = setupapi.SetupDiCreateDeviceInfoListExW // SetupDiCreateDeviceInfoListEx function creates an empty device information set on a remote or a local computer and optionally associates the set with a device setup class. func SetupDiCreateDeviceInfoListEx(classGUID *GUID, hwndParent uintptr, machineName string) (deviceInfoSet DevInfo, err error) { var machineNameUTF16 *uint16 if machineName != "" { machineNameUTF16, err = UTF16PtrFromString(machineName) if err != nil { return } } return setupDiCreateDeviceInfoListEx(classGUID, hwndParent, machineNameUTF16, 0) } //sys setupDiGetDeviceInfoListDetail(deviceInfoSet DevInfo, deviceInfoSetDetailData *DevInfoListDetailData) (err error) = setupapi.SetupDiGetDeviceInfoListDetailW // SetupDiGetDeviceInfoListDetail function retrieves information associated with a device information set including the class GUID, remote computer handle, and remote computer name. func SetupDiGetDeviceInfoListDetail(deviceInfoSet DevInfo) (deviceInfoSetDetailData *DevInfoListDetailData, err error) { data := &DevInfoListDetailData{} data.size = data.unsafeSizeOf() return data, setupDiGetDeviceInfoListDetail(deviceInfoSet, data) } // DeviceInfoListDetail method retrieves information associated with a device information set including the class GUID, remote computer handle, and remote computer name. func (deviceInfoSet DevInfo) DeviceInfoListDetail() (*DevInfoListDetailData, error) { return SetupDiGetDeviceInfoListDetail(deviceInfoSet) } //sys setupDiCreateDeviceInfo(deviceInfoSet DevInfo, DeviceName *uint16, classGUID *GUID, DeviceDescription *uint16, hwndParent uintptr, CreationFlags DICD, deviceInfoData *DevInfoData) (err error) = setupapi.SetupDiCreateDeviceInfoW // SetupDiCreateDeviceInfo function creates a new device information element and adds it as a new member to the specified device information set. func SetupDiCreateDeviceInfo(deviceInfoSet DevInfo, deviceName string, classGUID *GUID, deviceDescription string, hwndParent uintptr, creationFlags DICD) (deviceInfoData *DevInfoData, err error) { deviceNameUTF16, err := UTF16PtrFromString(deviceName) if err != nil { return } var deviceDescriptionUTF16 *uint16 if deviceDescription != "" { deviceDescriptionUTF16, err = UTF16PtrFromString(deviceDescription) if err != nil { return } } data := &DevInfoData{} data.size = uint32(unsafe.Sizeof(*data)) return data, setupDiCreateDeviceInfo(deviceInfoSet, deviceNameUTF16, classGUID, deviceDescriptionUTF16, hwndParent, creationFlags, data) } // CreateDeviceInfo method creates a new device information element and adds it as a new member to the specified device information set. func (deviceInfoSet DevInfo) CreateDeviceInfo(deviceName string, classGUID *GUID, deviceDescription string, hwndParent uintptr, creationFlags DICD) (*DevInfoData, error) { return SetupDiCreateDeviceInfo(deviceInfoSet, deviceName, classGUID, deviceDescription, hwndParent, creationFlags) } //sys setupDiEnumDeviceInfo(deviceInfoSet DevInfo, memberIndex uint32, deviceInfoData *DevInfoData) (err error) = setupapi.SetupDiEnumDeviceInfo // SetupDiEnumDeviceInfo function returns a DevInfoData structure that specifies a device information element in a device information set. func SetupDiEnumDeviceInfo(deviceInfoSet DevInfo, memberIndex int) (*DevInfoData, error) { data := &DevInfoData{} data.size = uint32(unsafe.Sizeof(*data)) return data, setupDiEnumDeviceInfo(deviceInfoSet, uint32(memberIndex), data) } // EnumDeviceInfo method returns a DevInfoData structure that specifies a device information element in a device information set. func (deviceInfoSet DevInfo) EnumDeviceInfo(memberIndex int) (*DevInfoData, error) { return SetupDiEnumDeviceInfo(deviceInfoSet, memberIndex) } // SetupDiDestroyDeviceInfoList function deletes a device information set and frees all associated memory. //sys SetupDiDestroyDeviceInfoList(deviceInfoSet DevInfo) (err error) = setupapi.SetupDiDestroyDeviceInfoList // Close method deletes a device information set and frees all associated memory. func (deviceInfoSet DevInfo) Close() error { return SetupDiDestroyDeviceInfoList(deviceInfoSet) } //sys SetupDiBuildDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT) (err error) = setupapi.SetupDiBuildDriverInfoList // BuildDriverInfoList method builds a list of drivers that is associated with a specific device or with the global class driver list for a device information set. func (deviceInfoSet DevInfo) BuildDriverInfoList(deviceInfoData *DevInfoData, driverType SPDIT) error { return SetupDiBuildDriverInfoList(deviceInfoSet, deviceInfoData, driverType) } //sys SetupDiCancelDriverInfoSearch(deviceInfoSet DevInfo) (err error) = setupapi.SetupDiCancelDriverInfoSearch // CancelDriverInfoSearch method cancels a driver list search that is currently in progress in a different thread. func (deviceInfoSet DevInfo) CancelDriverInfoSearch() error { return SetupDiCancelDriverInfoSearch(deviceInfoSet) } //sys setupDiEnumDriverInfo(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT, memberIndex uint32, driverInfoData *DrvInfoData) (err error) = setupapi.SetupDiEnumDriverInfoW // SetupDiEnumDriverInfo function enumerates the members of a driver list. func SetupDiEnumDriverInfo(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT, memberIndex int) (*DrvInfoData, error) { data := &DrvInfoData{} data.size = uint32(unsafe.Sizeof(*data)) return data, setupDiEnumDriverInfo(deviceInfoSet, deviceInfoData, driverType, uint32(memberIndex), data) } // EnumDriverInfo method enumerates the members of a driver list. func (deviceInfoSet DevInfo) EnumDriverInfo(deviceInfoData *DevInfoData, driverType SPDIT, memberIndex int) (*DrvInfoData, error) { return SetupDiEnumDriverInfo(deviceInfoSet, deviceInfoData, driverType, memberIndex) } //sys setupDiGetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (err error) = setupapi.SetupDiGetSelectedDriverW // SetupDiGetSelectedDriver function retrieves the selected driver for a device information set or a particular device information element. func SetupDiGetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (*DrvInfoData, error) { data := &DrvInfoData{} data.size = uint32(unsafe.Sizeof(*data)) return data, setupDiGetSelectedDriver(deviceInfoSet, deviceInfoData, data) } // SelectedDriver method retrieves the selected driver for a device information set or a particular device information element. func (deviceInfoSet DevInfo) SelectedDriver(deviceInfoData *DevInfoData) (*DrvInfoData, error) { return SetupDiGetSelectedDriver(deviceInfoSet, deviceInfoData) } //sys SetupDiSetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (err error) = setupapi.SetupDiSetSelectedDriverW // SetSelectedDriver method sets, or resets, the selected driver for a device information element or the selected class driver for a device information set. func (deviceInfoSet DevInfo) SetSelectedDriver(deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) error { return SetupDiSetSelectedDriver(deviceInfoSet, deviceInfoData, driverInfoData) } //sys setupDiGetDriverInfoDetail(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData, driverInfoDetailData *DrvInfoDetailData, driverInfoDetailDataSize uint32, requiredSize *uint32) (err error) = setupapi.SetupDiGetDriverInfoDetailW // SetupDiGetDriverInfoDetail function retrieves driver information detail for a device information set or a particular device information element in the device information set. func SetupDiGetDriverInfoDetail(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (*DrvInfoDetailData, error) { reqSize := uint32(2048) for { buf := make([]byte, reqSize) data := (*DrvInfoDetailData)(unsafe.Pointer(&buf[0])) data.size = data.unsafeSizeOf() err := setupDiGetDriverInfoDetail(deviceInfoSet, deviceInfoData, driverInfoData, data, uint32(len(buf)), &reqSize) if err == ERROR_INSUFFICIENT_BUFFER { continue } if err != nil { return nil, err } data.size = reqSize return data, nil } } // DriverInfoDetail method retrieves driver information detail for a device information set or a particular device information element in the device information set. func (deviceInfoSet DevInfo) DriverInfoDetail(deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (*DrvInfoDetailData, error) { return SetupDiGetDriverInfoDetail(deviceInfoSet, deviceInfoData, driverInfoData) } //sys SetupDiDestroyDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT) (err error) = setupapi.SetupDiDestroyDriverInfoList // DestroyDriverInfoList method deletes a driver list. func (deviceInfoSet DevInfo) DestroyDriverInfoList(deviceInfoData *DevInfoData, driverType SPDIT) error { return SetupDiDestroyDriverInfoList(deviceInfoSet, deviceInfoData, driverType) } //sys setupDiGetClassDevsEx(classGUID *GUID, Enumerator *uint16, hwndParent uintptr, Flags DIGCF, deviceInfoSet DevInfo, machineName *uint16, reserved uintptr) (handle DevInfo, err error) [failretval==DevInfo(InvalidHandle)] = setupapi.SetupDiGetClassDevsExW // SetupDiGetClassDevsEx function returns a handle to a device information set that contains requested device information elements for a local or a remote computer. func SetupDiGetClassDevsEx(classGUID *GUID, enumerator string, hwndParent uintptr, flags DIGCF, deviceInfoSet DevInfo, machineName string) (handle DevInfo, err error) { var enumeratorUTF16 *uint16 if enumerator != "" { enumeratorUTF16, err = UTF16PtrFromString(enumerator) if err != nil { return } } var machineNameUTF16 *uint16 if machineName != "" { machineNameUTF16, err = UTF16PtrFromString(machineName) if err != nil { return } } return setupDiGetClassDevsEx(classGUID, enumeratorUTF16, hwndParent, flags, deviceInfoSet, machineNameUTF16, 0) } // SetupDiCallClassInstaller function calls the appropriate class installer, and any registered co-installers, with the specified installation request (DIF code). //sys SetupDiCallClassInstaller(installFunction DI_FUNCTION, deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) = setupapi.SetupDiCallClassInstaller // CallClassInstaller member calls the appropriate class installer, and any registered co-installers, with the specified installation request (DIF code). func (deviceInfoSet DevInfo) CallClassInstaller(installFunction DI_FUNCTION, deviceInfoData *DevInfoData) error { return SetupDiCallClassInstaller(installFunction, deviceInfoSet, deviceInfoData) } // SetupDiOpenDevRegKey function opens a registry key for device-specific configuration information. //sys SetupDiOpenDevRegKey(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, Scope DICS_FLAG, HwProfile uint32, KeyType DIREG, samDesired uint32) (key Handle, err error) [failretval==InvalidHandle] = setupapi.SetupDiOpenDevRegKey // OpenDevRegKey method opens a registry key for device-specific configuration information. func (deviceInfoSet DevInfo) OpenDevRegKey(DeviceInfoData *DevInfoData, Scope DICS_FLAG, HwProfile uint32, KeyType DIREG, samDesired uint32) (Handle, error) { return SetupDiOpenDevRegKey(deviceInfoSet, DeviceInfoData, Scope, HwProfile, KeyType, samDesired) } //sys setupDiGetDeviceProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, propertyKey *DEVPROPKEY, propertyType *DEVPROPTYPE, propertyBuffer *byte, propertyBufferSize uint32, requiredSize *uint32, flags uint32) (err error) = setupapi.SetupDiGetDevicePropertyW // SetupDiGetDeviceProperty function retrieves a specified device instance property. func SetupDiGetDeviceProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, propertyKey *DEVPROPKEY) (value interface{}, err error) { reqSize := uint32(256) for { var dataType DEVPROPTYPE buf := make([]byte, reqSize) err = setupDiGetDeviceProperty(deviceInfoSet, deviceInfoData, propertyKey, &dataType, &buf[0], uint32(len(buf)), &reqSize, 0) if err == ERROR_INSUFFICIENT_BUFFER { continue } if err != nil { return } switch dataType { case DEVPROP_TYPE_STRING: ret := UTF16ToString(bufToUTF16(buf)) runtime.KeepAlive(buf) return ret, nil } return nil, errors.New("unimplemented property type") } } //sys setupDiGetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP, propertyRegDataType *uint32, propertyBuffer *byte, propertyBufferSize uint32, requiredSize *uint32) (err error) = setupapi.SetupDiGetDeviceRegistryPropertyW // SetupDiGetDeviceRegistryProperty function retrieves a specified Plug and Play device property. func SetupDiGetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP) (value interface{}, err error) { reqSize := uint32(256) for { var dataType uint32 buf := make([]byte, reqSize) err = setupDiGetDeviceRegistryProperty(deviceInfoSet, deviceInfoData, property, &dataType, &buf[0], uint32(len(buf)), &reqSize) if err == ERROR_INSUFFICIENT_BUFFER { continue } if err != nil { return } return getRegistryValue(buf[:reqSize], dataType) } } func getRegistryValue(buf []byte, dataType uint32) (interface{}, error) { switch dataType { case REG_SZ: ret := UTF16ToString(bufToUTF16(buf)) runtime.KeepAlive(buf) return ret, nil case REG_EXPAND_SZ: value := UTF16ToString(bufToUTF16(buf)) if value == "" { return "", nil } p, err := syscall.UTF16PtrFromString(value) if err != nil { return "", err } ret := make([]uint16, 100) for { n, err := ExpandEnvironmentStrings(p, &ret[0], uint32(len(ret))) if err != nil { return "", err } if n <= uint32(len(ret)) { return UTF16ToString(ret[:n]), nil } ret = make([]uint16, n) } case REG_BINARY: return buf, nil case REG_DWORD_LITTLE_ENDIAN: return binary.LittleEndian.Uint32(buf), nil case REG_DWORD_BIG_ENDIAN: return binary.BigEndian.Uint32(buf), nil case REG_MULTI_SZ: bufW := bufToUTF16(buf) a := []string{} for i := 0; i < len(bufW); { j := i + wcslen(bufW[i:]) if i < j { a = append(a, UTF16ToString(bufW[i:j])) } i = j + 1 } runtime.KeepAlive(buf) return a, nil case REG_QWORD_LITTLE_ENDIAN: return binary.LittleEndian.Uint64(buf), nil default: return nil, fmt.Errorf("Unsupported registry value type: %v", dataType) } } // bufToUTF16 function reinterprets []byte buffer as []uint16 func bufToUTF16(buf []byte) []uint16 { sl := struct { addr *uint16 len int cap int }{(*uint16)(unsafe.Pointer(&buf[0])), len(buf) / 2, cap(buf) / 2} return *(*[]uint16)(unsafe.Pointer(&sl)) } // utf16ToBuf function reinterprets []uint16 as []byte func utf16ToBuf(buf []uint16) []byte { sl := struct { addr *byte len int cap int }{(*byte)(unsafe.Pointer(&buf[0])), len(buf) * 2, cap(buf) * 2} return *(*[]byte)(unsafe.Pointer(&sl)) } func wcslen(str []uint16) int { for i := 0; i < len(str); i++ { if str[i] == 0 { return i } } return len(str) } // DeviceRegistryProperty method retrieves a specified Plug and Play device property. func (deviceInfoSet DevInfo) DeviceRegistryProperty(deviceInfoData *DevInfoData, property SPDRP) (interface{}, error) { return SetupDiGetDeviceRegistryProperty(deviceInfoSet, deviceInfoData, property) } //sys setupDiSetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP, propertyBuffer *byte, propertyBufferSize uint32) (err error) = setupapi.SetupDiSetDeviceRegistryPropertyW // SetupDiSetDeviceRegistryProperty function sets a Plug and Play device property for a device. func SetupDiSetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP, propertyBuffers []byte) error { return setupDiSetDeviceRegistryProperty(deviceInfoSet, deviceInfoData, property, &propertyBuffers[0], uint32(len(propertyBuffers))) } // SetDeviceRegistryProperty function sets a Plug and Play device property for a device. func (deviceInfoSet DevInfo) SetDeviceRegistryProperty(deviceInfoData *DevInfoData, property SPDRP, propertyBuffers []byte) error { return SetupDiSetDeviceRegistryProperty(deviceInfoSet, deviceInfoData, property, propertyBuffers) } // SetDeviceRegistryPropertyString method sets a Plug and Play device property string for a device. func (deviceInfoSet DevInfo) SetDeviceRegistryPropertyString(deviceInfoData *DevInfoData, property SPDRP, str string) error { str16, err := UTF16FromString(str) if err != nil { return err } err = SetupDiSetDeviceRegistryProperty(deviceInfoSet, deviceInfoData, property, utf16ToBuf(append(str16, 0))) runtime.KeepAlive(str16) return err } //sys setupDiGetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, deviceInstallParams *DevInstallParams) (err error) = setupapi.SetupDiGetDeviceInstallParamsW // SetupDiGetDeviceInstallParams function retrieves device installation parameters for a device information set or a particular device information element. func SetupDiGetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (*DevInstallParams, error) { params := &DevInstallParams{} params.size = uint32(unsafe.Sizeof(*params)) return params, setupDiGetDeviceInstallParams(deviceInfoSet, deviceInfoData, params) } // DeviceInstallParams method retrieves device installation parameters for a device information set or a particular device information element. func (deviceInfoSet DevInfo) DeviceInstallParams(deviceInfoData *DevInfoData) (*DevInstallParams, error) { return SetupDiGetDeviceInstallParams(deviceInfoSet, deviceInfoData) } //sys setupDiGetDeviceInstanceId(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, instanceId *uint16, instanceIdSize uint32, instanceIdRequiredSize *uint32) (err error) = setupapi.SetupDiGetDeviceInstanceIdW // SetupDiGetDeviceInstanceId function retrieves the instance ID of the device. func SetupDiGetDeviceInstanceId(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (string, error) { reqSize := uint32(1024) for { buf := make([]uint16, reqSize) err := setupDiGetDeviceInstanceId(deviceInfoSet, deviceInfoData, &buf[0], uint32(len(buf)), &reqSize) if err == ERROR_INSUFFICIENT_BUFFER { continue } if err != nil { return "", err } return UTF16ToString(buf), nil } } // DeviceInstanceID method retrieves the instance ID of the device. func (deviceInfoSet DevInfo) DeviceInstanceID(deviceInfoData *DevInfoData) (string, error) { return SetupDiGetDeviceInstanceId(deviceInfoSet, deviceInfoData) } // SetupDiGetClassInstallParams function retrieves class installation parameters for a device information set or a particular device information element. //sys SetupDiGetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32, requiredSize *uint32) (err error) = setupapi.SetupDiGetClassInstallParamsW // ClassInstallParams method retrieves class installation parameters for a device information set or a particular device information element. func (deviceInfoSet DevInfo) ClassInstallParams(deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32, requiredSize *uint32) error { return SetupDiGetClassInstallParams(deviceInfoSet, deviceInfoData, classInstallParams, classInstallParamsSize, requiredSize) } //sys SetupDiSetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, deviceInstallParams *DevInstallParams) (err error) = setupapi.SetupDiSetDeviceInstallParamsW // SetDeviceInstallParams member sets device installation parameters for a device information set or a particular device information element. func (deviceInfoSet DevInfo) SetDeviceInstallParams(deviceInfoData *DevInfoData, deviceInstallParams *DevInstallParams) error { return SetupDiSetDeviceInstallParams(deviceInfoSet, deviceInfoData, deviceInstallParams) } // SetupDiSetClassInstallParams function sets or clears class install parameters for a device information set or a particular device information element. //sys SetupDiSetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32) (err error) = setupapi.SetupDiSetClassInstallParamsW // SetClassInstallParams method sets or clears class install parameters for a device information set or a particular device information element. func (deviceInfoSet DevInfo) SetClassInstallParams(deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32) error { return SetupDiSetClassInstallParams(deviceInfoSet, deviceInfoData, classInstallParams, classInstallParamsSize) } //sys setupDiClassNameFromGuidEx(classGUID *GUID, className *uint16, classNameSize uint32, requiredSize *uint32, machineName *uint16, reserved uintptr) (err error) = setupapi.SetupDiClassNameFromGuidExW // SetupDiClassNameFromGuidEx function retrieves the class name associated with a class GUID. The class can be installed on a local or remote computer. func SetupDiClassNameFromGuidEx(classGUID *GUID, machineName string) (className string, err error) { var classNameUTF16 [MAX_CLASS_NAME_LEN]uint16 var machineNameUTF16 *uint16 if machineName != "" { machineNameUTF16, err = UTF16PtrFromString(machineName) if err != nil { return } } err = setupDiClassNameFromGuidEx(classGUID, &classNameUTF16[0], MAX_CLASS_NAME_LEN, nil, machineNameUTF16, 0) if err != nil { return } className = UTF16ToString(classNameUTF16[:]) return } //sys setupDiClassGuidsFromNameEx(className *uint16, classGuidList *GUID, classGuidListSize uint32, requiredSize *uint32, machineName *uint16, reserved uintptr) (err error) = setupapi.SetupDiClassGuidsFromNameExW // SetupDiClassGuidsFromNameEx function retrieves the GUIDs associated with the specified class name. This resulting list contains the classes currently installed on a local or remote computer. func SetupDiClassGuidsFromNameEx(className string, machineName string) ([]GUID, error) { classNameUTF16, err := UTF16PtrFromString(className) if err != nil { return nil, err } var machineNameUTF16 *uint16 if machineName != "" { machineNameUTF16, err = UTF16PtrFromString(machineName) if err != nil { return nil, err } } reqSize := uint32(4) for { buf := make([]GUID, reqSize) err = setupDiClassGuidsFromNameEx(classNameUTF16, &buf[0], uint32(len(buf)), &reqSize, machineNameUTF16, 0) if err == ERROR_INSUFFICIENT_BUFFER { continue } if err != nil { return nil, err } return buf[:reqSize], nil } } //sys setupDiGetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) = setupapi.SetupDiGetSelectedDevice // SetupDiGetSelectedDevice function retrieves the selected device information element in a device information set. func SetupDiGetSelectedDevice(deviceInfoSet DevInfo) (*DevInfoData, error) { data := &DevInfoData{} data.size = uint32(unsafe.Sizeof(*data)) return data, setupDiGetSelectedDevice(deviceInfoSet, data) } // SelectedDevice method retrieves the selected device information element in a device information set. func (deviceInfoSet DevInfo) SelectedDevice() (*DevInfoData, error) { return SetupDiGetSelectedDevice(deviceInfoSet) } // SetupDiSetSelectedDevice function sets a device information element as the selected member of a device information set. This function is typically used by an installation wizard. //sys SetupDiSetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) = setupapi.SetupDiSetSelectedDevice // SetSelectedDevice method sets a device information element as the selected member of a device information set. This function is typically used by an installation wizard. func (deviceInfoSet DevInfo) SetSelectedDevice(deviceInfoData *DevInfoData) error { return SetupDiSetSelectedDevice(deviceInfoSet, deviceInfoData) } //sys setupUninstallOEMInf(infFileName *uint16, flags SUOI, reserved uintptr) (err error) = setupapi.SetupUninstallOEMInfW // SetupUninstallOEMInf uninstalls the specified driver. func SetupUninstallOEMInf(infFileName string, flags SUOI) error { infFileName16, err := UTF16PtrFromString(infFileName) if err != nil { return err } return setupUninstallOEMInf(infFileName16, flags, 0) } //sys cm_MapCrToWin32Err(configRet CONFIGRET, defaultWin32Error Errno) (ret Errno) = CfgMgr32.CM_MapCrToWin32Err //sys cm_Get_Device_Interface_List_Size(len *uint32, interfaceClass *GUID, deviceID *uint16, flags uint32) (ret CONFIGRET) = CfgMgr32.CM_Get_Device_Interface_List_SizeW //sys cm_Get_Device_Interface_List(interfaceClass *GUID, deviceID *uint16, buffer *uint16, bufferLen uint32, flags uint32) (ret CONFIGRET) = CfgMgr32.CM_Get_Device_Interface_ListW func CM_Get_Device_Interface_List(deviceID string, interfaceClass *GUID, flags uint32) ([]string, error) { deviceID16, err := UTF16PtrFromString(deviceID) if err != nil { return nil, err } var buf []uint16 var buflen uint32 for { if ret := cm_Get_Device_Interface_List_Size(&buflen, interfaceClass, deviceID16, flags); ret != CR_SUCCESS { return nil, ret } buf = make([]uint16, buflen) if ret := cm_Get_Device_Interface_List(interfaceClass, deviceID16, &buf[0], buflen, flags); ret == CR_SUCCESS { break } else if ret != CR_BUFFER_SMALL { return nil, ret } } var interfaces []string for i := 0; i < len(buf); { j := i + wcslen(buf[i:]) if i < j { interfaces = append(interfaces, UTF16ToString(buf[i:j])) } i = j + 1 } if interfaces == nil { return nil, ERROR_NO_SUCH_DEVICE_INTERFACE } return interfaces, nil } //sys cm_Get_DevNode_Status(status *uint32, problemNumber *uint32, devInst DEVINST, flags uint32) (ret CONFIGRET) = CfgMgr32.CM_Get_DevNode_Status func CM_Get_DevNode_Status(status *uint32, problemNumber *uint32, devInst DEVINST, flags uint32) error { ret := cm_Get_DevNode_Status(status, problemNumber, devInst, flags) if ret == CR_SUCCESS { return nil } return ret } ================================================ FILE: vendor/golang.org/x/sys/windows/str.go ================================================ // 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. //go: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:]) } ================================================ FILE: vendor/golang.org/x/sys/windows/syscall.go ================================================ // 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. //go: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 ( "bytes" "strings" "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) { if strings.IndexByte(s, 0) != -1 { 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 } // ByteSliceToString returns a string form of the text represented by the slice s, with a terminating NUL and any // bytes after the NUL removed. func ByteSliceToString(s []byte) string { if i := bytes.IndexByte(s, 0); i != -1 { s = s[:i] } return string(s) } // BytePtrToString takes a pointer to a sequence of text and returns the corresponding string. // If the pointer is nil, it returns the empty string. It assumes that the text sequence is terminated // at a zero byte; if the zero byte is not present, the program may crash. func BytePtrToString(p *byte) string { if p == nil { return "" } if *p == 0 { return "" } // Find NUL terminator. n := 0 for ptr := unsafe.Pointer(p); *(*byte)(ptr) != 0; n++ { ptr = unsafe.Pointer(uintptr(ptr) + 1) } return string(unsafe.Slice(p, n)) } // 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 } ================================================ FILE: vendor/golang.org/x/sys/windows/syscall_windows.go ================================================ // 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" "fmt" "runtime" "sync" "syscall" "time" "unicode/utf16" "unsafe" ) type ( Handle uintptr HWND uintptr ) const ( InvalidHandle = ^Handle(0) InvalidHWND = ^HWND(0) // Flags for DefineDosDevice. DDD_EXACT_MATCH_ON_REMOVE = 0x00000004 DDD_NO_BROADCAST_SYSTEM = 0x00000008 DDD_RAW_TARGET_PATH = 0x00000001 DDD_REMOVE_DEFINITION = 0x00000002 // Return values for GetDriveType. DRIVE_UNKNOWN = 0 DRIVE_NO_ROOT_DIR = 1 DRIVE_REMOVABLE = 2 DRIVE_FIXED = 3 DRIVE_REMOTE = 4 DRIVE_CDROM = 5 DRIVE_RAMDISK = 6 // File system flags from GetVolumeInformation and GetVolumeInformationByHandle. FILE_CASE_SENSITIVE_SEARCH = 0x00000001 FILE_CASE_PRESERVED_NAMES = 0x00000002 FILE_FILE_COMPRESSION = 0x00000010 FILE_DAX_VOLUME = 0x20000000 FILE_NAMED_STREAMS = 0x00040000 FILE_PERSISTENT_ACLS = 0x00000008 FILE_READ_ONLY_VOLUME = 0x00080000 FILE_SEQUENTIAL_WRITE_ONCE = 0x00100000 FILE_SUPPORTS_ENCRYPTION = 0x00020000 FILE_SUPPORTS_EXTENDED_ATTRIBUTES = 0x00800000 FILE_SUPPORTS_HARD_LINKS = 0x00400000 FILE_SUPPORTS_OBJECT_IDS = 0x00010000 FILE_SUPPORTS_OPEN_BY_FILE_ID = 0x01000000 FILE_SUPPORTS_REPARSE_POINTS = 0x00000080 FILE_SUPPORTS_SPARSE_FILES = 0x00000040 FILE_SUPPORTS_TRANSACTIONS = 0x00200000 FILE_SUPPORTS_USN_JOURNAL = 0x02000000 FILE_UNICODE_ON_DISK = 0x00000004 FILE_VOLUME_IS_COMPRESSED = 0x00008000 FILE_VOLUME_QUOTAS = 0x00000020 // Flags for LockFileEx. LOCKFILE_FAIL_IMMEDIATELY = 0x00000001 LOCKFILE_EXCLUSIVE_LOCK = 0x00000002 // Return value of SleepEx and other APC functions WAIT_IO_COMPLETION = 0x000000C0 ) // 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) { return syscall.UTF16FromString(s) } // UTF16ToString returns the UTF-8 encoding of the UTF-16 sequence s, // with a terminating NUL and any bytes after the NUL removed. func UTF16ToString(s []uint16) string { return syscall.UTF16ToString(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 } // UTF16PtrToString takes a pointer to a UTF-16 sequence and returns the corresponding UTF-8 encoded string. // If the pointer is nil, it returns the empty string. It assumes that the UTF-16 sequence is terminated // at a zero word; if the zero word is not present, the program may crash. func UTF16PtrToString(p *uint16) string { if p == nil { return "" } if *p == 0 { return "" } // Find NUL terminator. n := 0 for ptr := unsafe.Pointer(p); *(*uint16)(ptr) != 0; n++ { ptr = unsafe.Pointer(uintptr(ptr) + unsafe.Sizeof(*p)) } return UTF16ToString(unsafe.Slice(p, n)) } func Getpagesize() int { return 4096 } // NewCallback converts a Go function to a function pointer conforming to the stdcall calling convention. // This is useful when interoperating with Windows code requiring callbacks. // The argument is expected to be a function with one uintptr-sized result. The function must not have arguments with size larger than the size of uintptr. func NewCallback(fn interface{}) uintptr { return syscall.NewCallback(fn) } // NewCallbackCDecl converts a Go function to a function pointer conforming to the cdecl calling convention. // This is useful when interoperating with Windows code requiring callbacks. // The argument is expected to be a function with one uintptr-sized result. The function must not have arguments with size larger than the size of uintptr. func NewCallbackCDecl(fn interface{}) uintptr { return syscall.NewCallbackCDecl(fn) } // windows api calls //sys GetLastError() (lasterr error) //sys LoadLibrary(libname string) (handle Handle, err error) = LoadLibraryW //sys LoadLibraryEx(libname string, zero Handle, flags uintptr) (handle Handle, err error) = LoadLibraryExW //sys FreeLibrary(handle Handle) (err error) //sys GetProcAddress(module Handle, procname string) (proc uintptr, err error) //sys GetModuleFileName(module Handle, filename *uint16, size uint32) (n uint32, err error) = kernel32.GetModuleFileNameW //sys GetModuleHandleEx(flags uint32, moduleName *uint16, module *Handle) (err error) = kernel32.GetModuleHandleExW //sys SetDefaultDllDirectories(directoryFlags uint32) (err error) //sys AddDllDirectory(path *uint16) (cookie uintptr, err error) = kernel32.AddDllDirectory //sys RemoveDllDirectory(cookie uintptr) (err error) = kernel32.RemoveDllDirectory //sys SetDllDirectory(path string) (err error) = kernel32.SetDllDirectoryW //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 IsWow64Process(handle Handle, isWow64 *bool) (err error) = IsWow64Process //sys IsWow64Process2(handle Handle, processMachine *uint16, nativeMachine *uint16) (err error) = IsWow64Process2? //sys CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile Handle) (handle Handle, err error) [failretval==InvalidHandle] = CreateFileW //sys CreateNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *SecurityAttributes) (handle Handle, err error) [failretval==InvalidHandle] = CreateNamedPipeW //sys ConnectNamedPipe(pipe Handle, overlapped *Overlapped) (err error) //sys DisconnectNamedPipe(pipe Handle) (err error) //sys GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) //sys GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) = GetNamedPipeHandleStateW //sys SetNamedPipeHandleState(pipe Handle, state *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32) (err error) = SetNamedPipeHandleState //sys readFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) = ReadFile //sys writeFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) = WriteFile //sys GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wait bool) (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 uint32) (handle Handle, err error) [failretval==InvalidHandle] //sys SetStdHandle(stdhandle uint32, handle Handle) (err error) //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 GetFileInformationByHandleEx(handle Handle, class uint32, outBuffer *byte, outBufferLen uint32) (err error) //sys SetFileInformationByHandle(handle Handle, class uint32, inBuffer *byte, inBufferLen uint32) (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 MoveFileEx(from *uint16, to *uint16, flags uint32) (err error) = MoveFileExW //sys LockFileEx(file Handle, flags uint32, reserved uint32, bytesLow uint32, bytesHigh uint32, overlapped *Overlapped) (err error) //sys UnlockFileEx(file Handle, reserved uint32, bytesLow uint32, bytesHigh uint32, overlapped *Overlapped) (err error) //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 SetFileValidData(handle Handle, validDataLength int64) (err error) //sys GetSystemTimeAsFileTime(time *Filetime) //sys GetSystemTimePreciseAsFileTime(time *Filetime) //sys GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) [failretval==0xffffffff] //sys CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uintptr, threadcnt uint32) (handle Handle, err error) //sys GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uintptr, overlapped **Overlapped, timeout uint32) (err error) //sys PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uintptr, 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 CreateProcessAsUser(token Token, appName *uint16, commandLine *uint16, procSecurity *SecurityAttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlags uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) = advapi32.CreateProcessAsUserW //sys initializeProcThreadAttributeList(attrlist *ProcThreadAttributeList, attrcount uint32, flags uint32, size *uintptr) (err error) = InitializeProcThreadAttributeList //sys deleteProcThreadAttributeList(attrlist *ProcThreadAttributeList) = DeleteProcThreadAttributeList //sys updateProcThreadAttribute(attrlist *ProcThreadAttributeList, flags uint32, attr uintptr, value unsafe.Pointer, size uintptr, prevvalue unsafe.Pointer, returnedsize *uintptr) (err error) = UpdateProcThreadAttribute //sys OpenProcess(desiredAccess uint32, inheritHandle bool, processId uint32) (handle Handle, err error) //sys ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *uint16, showCmd int32) (err error) [failretval<=32] = shell32.ShellExecuteW //sys GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) = user32.GetWindowThreadProcessId //sys LoadKeyboardLayout(name *uint16, flags uint32) (hkl Handle, err error) [failretval==0] = user32.LoadKeyboardLayoutW //sys UnloadKeyboardLayout(hkl Handle) (err error) = user32.UnloadKeyboardLayout //sys GetKeyboardLayout(tid uint32) (hkl Handle) = user32.GetKeyboardLayout //sys ToUnicodeEx(vkey uint32, scancode uint32, keystate *byte, pwszBuff *uint16, cchBuff int32, flags uint32, hkl Handle) (ret int32) = user32.ToUnicodeEx //sys GetShellWindow() (shellWindow HWND) = user32.GetShellWindow //sys MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) [failretval==0] = user32.MessageBoxW //sys ExitWindowsEx(flags uint32, reason uint32) (err error) = user32.ExitWindowsEx //sys shGetKnownFolderPath(id *KNOWNFOLDERID, flags uint32, token Token, path **uint16) (ret error) = shell32.SHGetKnownFolderPath //sys TerminateProcess(handle Handle, exitcode uint32) (err error) //sys GetExitCodeProcess(handle Handle, exitcode *uint32) (err error) //sys getStartupInfo(startupInfo *StartupInfo) = GetStartupInfoW //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 waitForMultipleObjects(count uint32, handles uintptr, waitAll bool, waitMilliseconds uint32) (event uint32, err error) [failretval==0xffffffff] = WaitForMultipleObjects //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 ExpandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32, err error) = kernel32.ExpandEnvironmentStringsW //sys CreateEnvironmentBlock(block **uint16, token Token, inheritExisting bool) (err error) = userenv.CreateEnvironmentBlock //sys DestroyEnvironmentBlock(block *uint16) (err error) = userenv.DestroyEnvironmentBlock //sys getTickCount64() (ms uint64) = kernel32.GetTickCount64 //sys GetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) //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 **uint16, err error) [failretval==nil] = shell32.CommandLineToArgvW //sys LocalFree(hmem Handle) (handle Handle, err error) [failretval!=0] //sys LocalAlloc(flags uint32, length uint32) (ptr uintptr, err error) //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 GetFinalPathNameByHandle(file Handle, filePath *uint16, filePathSize uint32, flags uint32) (n uint32, err error) = kernel32.GetFinalPathNameByHandleW //sys CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) [failretval == 0 || e1 == ERROR_ALREADY_EXISTS] = 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 VirtualAlloc(address uintptr, size uintptr, alloctype uint32, protect uint32) (value uintptr, err error) = kernel32.VirtualAlloc //sys VirtualFree(address uintptr, size uintptr, freetype uint32) (err error) = kernel32.VirtualFree //sys VirtualProtect(address uintptr, size uintptr, newprotect uint32, oldprotect *uint32) (err error) = kernel32.VirtualProtect //sys VirtualProtectEx(process Handle, address uintptr, size uintptr, newProtect uint32, oldProtect *uint32) (err error) = kernel32.VirtualProtectEx //sys VirtualQuery(address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) = kernel32.VirtualQuery //sys VirtualQueryEx(process Handle, address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) = kernel32.VirtualQueryEx //sys ReadProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesRead *uintptr) (err error) = kernel32.ReadProcessMemory //sys WriteProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesWritten *uintptr) (err error) = kernel32.WriteProcessMemory //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 FindFirstChangeNotification(path string, watchSubtree bool, notifyFilter uint32) (handle Handle, err error) [failretval==InvalidHandle] = kernel32.FindFirstChangeNotificationW //sys FindNextChangeNotification(handle Handle) (err error) //sys FindCloseChangeNotification(handle Handle) (err error) //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) = 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 CertDeleteCertificateFromStore(certContext *CertContext) (err error) = crypt32.CertDeleteCertificateFromStore //sys CertDuplicateCertificateContext(certContext *CertContext) (dupContext *CertContext) = crypt32.CertDuplicateCertificateContext //sys PFXImportCertStore(pfx *CryptDataBlob, password *uint16, flags uint32) (store Handle, err error) = crypt32.PFXImportCertStore //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 CertGetNameString(certContext *CertContext, nameType uint32, flags uint32, typePara unsafe.Pointer, name *uint16, size uint32) (chars uint32) = crypt32.CertGetNameStringW //sys CertFindExtension(objId *byte, countExtensions uint32, extensions *CertExtension) (ret *CertExtension) = crypt32.CertFindExtension //sys CertFindCertificateInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevCertContext *CertContext) (cert *CertContext, err error) [failretval==nil] = crypt32.CertFindCertificateInStore //sys CertFindChainInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevChainContext *CertChainContext) (certchain *CertChainContext, err error) [failretval==nil] = crypt32.CertFindChainInStore //sys CryptAcquireCertificatePrivateKey(cert *CertContext, flags uint32, parameters unsafe.Pointer, cryptProvOrNCryptKey *Handle, keySpec *uint32, callerFreeProvOrNCryptKey *bool) (err error) = crypt32.CryptAcquireCertificatePrivateKey //sys CryptQueryObject(objectType uint32, object unsafe.Pointer, expectedContentTypeFlags uint32, expectedFormatTypeFlags uint32, flags uint32, msgAndCertEncodingType *uint32, contentType *uint32, formatType *uint32, certStore *Handle, msg *Handle, context *unsafe.Pointer) (err error) = crypt32.CryptQueryObject //sys CryptDecodeObject(encodingType uint32, structType *byte, encodedBytes *byte, lenEncodedBytes uint32, flags uint32, decoded unsafe.Pointer, decodedLen *uint32) (err error) = crypt32.CryptDecodeObject //sys CryptProtectData(dataIn *DataBlob, name *uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) = crypt32.CryptProtectData //sys CryptUnprotectData(dataIn *DataBlob, name **uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) = crypt32.CryptUnprotectData //sys WinVerifyTrustEx(hwnd HWND, actionId *GUID, data *WinTrustData) (ret error) = wintrust.WinVerifyTrustEx //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 RegNotifyChangeKeyValue(key Handle, watchSubtree bool, notifyFilter uint32, event Handle, asynchronous bool) (regerrno error) = advapi32.RegNotifyChangeKeyValue //sys GetCurrentProcessId() (pid uint32) = kernel32.GetCurrentProcessId //sys ProcessIdToSessionId(pid uint32, sessionid *uint32) (err error) = kernel32.ProcessIdToSessionId //sys ClosePseudoConsole(console Handle) = kernel32.ClosePseudoConsole //sys createPseudoConsole(size uint32, in Handle, out Handle, flags uint32, pconsole *Handle) (hr error) = kernel32.CreatePseudoConsole //sys GetConsoleMode(console Handle, mode *uint32) (err error) = kernel32.GetConsoleMode //sys SetConsoleMode(console Handle, mode uint32) (err error) = kernel32.SetConsoleMode //sys GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) = kernel32.GetConsoleScreenBufferInfo //sys setConsoleCursorPosition(console Handle, position uint32) (err error) = kernel32.SetConsoleCursorPosition //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 resizePseudoConsole(pconsole Handle, size uint32) (hr error) = kernel32.ResizePseudoConsole //sys CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) [failretval==InvalidHandle] = kernel32.CreateToolhelp32Snapshot //sys Module32First(snapshot Handle, moduleEntry *ModuleEntry32) (err error) = kernel32.Module32FirstW //sys Module32Next(snapshot Handle, moduleEntry *ModuleEntry32) (err error) = kernel32.Module32NextW //sys Process32First(snapshot Handle, procEntry *ProcessEntry32) (err error) = kernel32.Process32FirstW //sys Process32Next(snapshot Handle, procEntry *ProcessEntry32) (err error) = kernel32.Process32NextW //sys Thread32First(snapshot Handle, threadEntry *ThreadEntry32) (err error) //sys Thread32Next(snapshot Handle, threadEntry *ThreadEntry32) (err error) //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 *SecurityAttributes, manualReset uint32, initialState uint32, name *uint16) (handle Handle, err error) [failretval == 0 || e1 == ERROR_ALREADY_EXISTS] = kernel32.CreateEventW //sys CreateEventEx(eventAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) [failretval == 0 || e1 == ERROR_ALREADY_EXISTS] = kernel32.CreateEventExW //sys OpenEvent(desiredAccess uint32, inheritHandle bool, name *uint16) (handle Handle, err error) = kernel32.OpenEventW //sys SetEvent(event Handle) (err error) = kernel32.SetEvent //sys ResetEvent(event Handle) (err error) = kernel32.ResetEvent //sys PulseEvent(event Handle) (err error) = kernel32.PulseEvent //sys CreateMutex(mutexAttrs *SecurityAttributes, initialOwner bool, name *uint16) (handle Handle, err error) [failretval == 0 || e1 == ERROR_ALREADY_EXISTS] = kernel32.CreateMutexW //sys CreateMutexEx(mutexAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) [failretval == 0 || e1 == ERROR_ALREADY_EXISTS] = kernel32.CreateMutexExW //sys OpenMutex(desiredAccess uint32, inheritHandle bool, name *uint16) (handle Handle, err error) = kernel32.OpenMutexW //sys ReleaseMutex(mutex Handle) (err error) = kernel32.ReleaseMutex //sys SleepEx(milliseconds uint32, alertable bool) (ret uint32) = kernel32.SleepEx //sys CreateJobObject(jobAttr *SecurityAttributes, name *uint16) (handle Handle, err error) = kernel32.CreateJobObjectW //sys AssignProcessToJobObject(job Handle, process Handle) (err error) = kernel32.AssignProcessToJobObject //sys TerminateJobObject(job Handle, exitCode uint32) (err error) = kernel32.TerminateJobObject //sys SetErrorMode(mode uint32) (ret uint32) = kernel32.SetErrorMode //sys ResumeThread(thread Handle) (ret uint32, err error) [failretval==0xffffffff] = kernel32.ResumeThread //sys SetPriorityClass(process Handle, priorityClass uint32) (err error) = kernel32.SetPriorityClass //sys GetPriorityClass(process Handle) (ret uint32, err error) = kernel32.GetPriorityClass //sys QueryInformationJobObject(job Handle, JobObjectInformationClass int32, JobObjectInformation uintptr, JobObjectInformationLength uint32, retlen *uint32) (err error) = kernel32.QueryInformationJobObject //sys SetInformationJobObject(job Handle, JobObjectInformationClass uint32, JobObjectInformation uintptr, JobObjectInformationLength uint32) (ret int, err error) //sys GenerateConsoleCtrlEvent(ctrlEvent uint32, processGroupID uint32) (err error) //sys GetProcessId(process Handle) (id uint32, err error) //sys QueryFullProcessImageName(proc Handle, flags uint32, exeName *uint16, size *uint32) (err error) = kernel32.QueryFullProcessImageNameW //sys OpenThread(desiredAccess uint32, inheritHandle bool, threadId uint32) (handle Handle, err error) //sys SetProcessPriorityBoost(process Handle, disable bool) (err error) = kernel32.SetProcessPriorityBoost //sys GetProcessWorkingSetSizeEx(hProcess Handle, lpMinimumWorkingSetSize *uintptr, lpMaximumWorkingSetSize *uintptr, flags *uint32) //sys SetProcessWorkingSetSizeEx(hProcess Handle, dwMinimumWorkingSetSize uintptr, dwMaximumWorkingSetSize uintptr, flags uint32) (err error) //sys ClearCommBreak(handle Handle) (err error) //sys ClearCommError(handle Handle, lpErrors *uint32, lpStat *ComStat) (err error) //sys EscapeCommFunction(handle Handle, dwFunc uint32) (err error) //sys GetCommState(handle Handle, lpDCB *DCB) (err error) //sys GetCommModemStatus(handle Handle, lpModemStat *uint32) (err error) //sys GetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) //sys PurgeComm(handle Handle, dwFlags uint32) (err error) //sys SetCommBreak(handle Handle) (err error) //sys SetCommMask(handle Handle, dwEvtMask uint32) (err error) //sys SetCommState(handle Handle, lpDCB *DCB) (err error) //sys SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) //sys SetupComm(handle Handle, dwInQueue uint32, dwOutQueue uint32) (err error) //sys WaitCommEvent(handle Handle, lpEvtMask *uint32, lpOverlapped *Overlapped) (err error) //sys GetActiveProcessorCount(groupNumber uint16) (ret uint32) //sys GetMaximumProcessorCount(groupNumber uint16) (ret uint32) //sys EnumWindows(enumFunc uintptr, param unsafe.Pointer) (err error) = user32.EnumWindows //sys EnumChildWindows(hwnd HWND, enumFunc uintptr, param unsafe.Pointer) = user32.EnumChildWindows //sys GetClassName(hwnd HWND, className *uint16, maxCount int32) (copied int32, err error) = user32.GetClassNameW //sys GetDesktopWindow() (hwnd HWND) = user32.GetDesktopWindow //sys GetForegroundWindow() (hwnd HWND) = user32.GetForegroundWindow //sys IsWindow(hwnd HWND) (isWindow bool) = user32.IsWindow //sys IsWindowUnicode(hwnd HWND) (isUnicode bool) = user32.IsWindowUnicode //sys IsWindowVisible(hwnd HWND) (isVisible bool) = user32.IsWindowVisible //sys GetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) = user32.GetGUIThreadInfo //sys GetLargePageMinimum() (size uintptr) // Volume Management Functions //sys DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) = DefineDosDeviceW //sys DeleteVolumeMountPoint(volumeMountPoint *uint16) (err error) = DeleteVolumeMountPointW //sys FindFirstVolume(volumeName *uint16, bufferLength uint32) (handle Handle, err error) [failretval==InvalidHandle] = FindFirstVolumeW //sys FindFirstVolumeMountPoint(rootPathName *uint16, volumeMountPoint *uint16, bufferLength uint32) (handle Handle, err error) [failretval==InvalidHandle] = FindFirstVolumeMountPointW //sys FindNextVolume(findVolume Handle, volumeName *uint16, bufferLength uint32) (err error) = FindNextVolumeW //sys FindNextVolumeMountPoint(findVolumeMountPoint Handle, volumeMountPoint *uint16, bufferLength uint32) (err error) = FindNextVolumeMountPointW //sys FindVolumeClose(findVolume Handle) (err error) //sys FindVolumeMountPointClose(findVolumeMountPoint Handle) (err error) //sys GetDiskFreeSpaceEx(directoryName *uint16, freeBytesAvailableToCaller *uint64, totalNumberOfBytes *uint64, totalNumberOfFreeBytes *uint64) (err error) = GetDiskFreeSpaceExW //sys GetDriveType(rootPathName *uint16) (driveType uint32) = GetDriveTypeW //sys GetLogicalDrives() (drivesBitMask uint32, err error) [failretval==0] //sys GetLogicalDriveStrings(bufferLength uint32, buffer *uint16) (n uint32, err error) [failretval==0] = GetLogicalDriveStringsW //sys GetVolumeInformation(rootPathName *uint16, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) = GetVolumeInformationW //sys GetVolumeInformationByHandle(file Handle, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) = GetVolumeInformationByHandleW //sys GetVolumeNameForVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16, bufferlength uint32) (err error) = GetVolumeNameForVolumeMountPointW //sys GetVolumePathName(fileName *uint16, volumePathName *uint16, bufferLength uint32) (err error) = GetVolumePathNameW //sys GetVolumePathNamesForVolumeName(volumeName *uint16, volumePathNames *uint16, bufferLength uint32, returnLength *uint32) (err error) = GetVolumePathNamesForVolumeNameW //sys QueryDosDevice(deviceName *uint16, targetPath *uint16, max uint32) (n uint32, err error) [failretval==0] = QueryDosDeviceW //sys SetVolumeLabel(rootPathName *uint16, volumeName *uint16) (err error) = SetVolumeLabelW //sys SetVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16) (err error) = SetVolumeMountPointW //sys InitiateSystemShutdownEx(machineName *uint16, message *uint16, timeout uint32, forceAppsClosed bool, rebootAfterShutdown bool, reason uint32) (err error) = advapi32.InitiateSystemShutdownExW //sys SetProcessShutdownParameters(level uint32, flags uint32) (err error) = kernel32.SetProcessShutdownParameters //sys GetProcessShutdownParameters(level *uint32, flags *uint32) (err error) = kernel32.GetProcessShutdownParameters //sys clsidFromString(lpsz *uint16, pclsid *GUID) (ret error) = ole32.CLSIDFromString //sys stringFromGUID2(rguid *GUID, lpsz *uint16, cchMax int32) (chars int32) = ole32.StringFromGUID2 //sys coCreateGuid(pguid *GUID) (ret error) = ole32.CoCreateGuid //sys CoTaskMemFree(address unsafe.Pointer) = ole32.CoTaskMemFree //sys CoInitializeEx(reserved uintptr, coInit uint32) (ret error) = ole32.CoInitializeEx //sys CoUninitialize() = ole32.CoUninitialize //sys CoGetObject(name *uint16, bindOpts *BIND_OPTS3, guid *GUID, functionTable **uintptr) (ret error) = ole32.CoGetObject //sys getProcessPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetProcessPreferredUILanguages //sys getThreadPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetThreadPreferredUILanguages //sys getUserPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetUserPreferredUILanguages //sys getSystemPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) = kernel32.GetSystemPreferredUILanguages //sys findResource(module Handle, name uintptr, resType uintptr) (resInfo Handle, err error) = kernel32.FindResourceW //sys SizeofResource(module Handle, resInfo Handle) (size uint32, err error) = kernel32.SizeofResource //sys LoadResource(module Handle, resInfo Handle) (resData Handle, err error) = kernel32.LoadResource //sys LockResource(resData Handle) (addr uintptr, err error) = kernel32.LockResource // Version APIs //sys GetFileVersionInfoSize(filename string, zeroHandle *Handle) (bufSize uint32, err error) = version.GetFileVersionInfoSizeW //sys GetFileVersionInfo(filename string, handle uint32, bufSize uint32, buffer unsafe.Pointer) (err error) = version.GetFileVersionInfoW //sys VerQueryValue(block unsafe.Pointer, subBlock string, pointerToBufferPointer unsafe.Pointer, bufSize *uint32) (err error) = version.VerQueryValueW // Process Status API (PSAPI) //sys enumProcesses(processIds *uint32, nSize uint32, bytesReturned *uint32) (err error) = psapi.EnumProcesses //sys EnumProcessModules(process Handle, module *Handle, cb uint32, cbNeeded *uint32) (err error) = psapi.EnumProcessModules //sys EnumProcessModulesEx(process Handle, module *Handle, cb uint32, cbNeeded *uint32, filterFlag uint32) (err error) = psapi.EnumProcessModulesEx //sys GetModuleInformation(process Handle, module Handle, modinfo *ModuleInfo, cb uint32) (err error) = psapi.GetModuleInformation //sys GetModuleFileNameEx(process Handle, module Handle, filename *uint16, size uint32) (err error) = psapi.GetModuleFileNameExW //sys GetModuleBaseName(process Handle, module Handle, baseName *uint16, size uint32) (err error) = psapi.GetModuleBaseNameW //sys QueryWorkingSetEx(process Handle, pv uintptr, cb uint32) (err error) = psapi.QueryWorkingSetEx // NT Native APIs //sys rtlNtStatusToDosErrorNoTeb(ntstatus NTStatus) (ret syscall.Errno) = ntdll.RtlNtStatusToDosErrorNoTeb //sys rtlGetVersion(info *OsVersionInfoEx) (ntstatus error) = ntdll.RtlGetVersion //sys rtlGetNtVersionNumbers(majorVersion *uint32, minorVersion *uint32, buildNumber *uint32) = ntdll.RtlGetNtVersionNumbers //sys RtlGetCurrentPeb() (peb *PEB) = ntdll.RtlGetCurrentPeb //sys RtlInitUnicodeString(destinationString *NTUnicodeString, sourceString *uint16) = ntdll.RtlInitUnicodeString //sys RtlInitString(destinationString *NTString, sourceString *byte) = ntdll.RtlInitString //sys NtCreateFile(handle *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, allocationSize *int64, attributes uint32, share uint32, disposition uint32, options uint32, eabuffer uintptr, ealength uint32) (ntstatus error) = ntdll.NtCreateFile //sys NtCreateNamedPipeFile(pipe *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, share uint32, disposition uint32, options uint32, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (ntstatus error) = ntdll.NtCreateNamedPipeFile //sys NtSetInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte, inBufferLen uint32, class uint32) (ntstatus error) = ntdll.NtSetInformationFile //sys RtlDosPathNameToNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) = ntdll.RtlDosPathNameToNtPathName_U_WithStatus //sys RtlDosPathNameToRelativeNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) = ntdll.RtlDosPathNameToRelativeNtPathName_U_WithStatus //sys RtlDefaultNpAcl(acl **ACL) (ntstatus error) = ntdll.RtlDefaultNpAcl //sys NtQueryInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32, retLen *uint32) (ntstatus error) = ntdll.NtQueryInformationProcess //sys NtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32) (ntstatus error) = ntdll.NtSetInformationProcess //sys NtQuerySystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32, retLen *uint32) (ntstatus error) = ntdll.NtQuerySystemInformation //sys NtSetSystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32) (ntstatus error) = ntdll.NtSetSystemInformation //sys RtlAddFunctionTable(functionTable *RUNTIME_FUNCTION, entryCount uint32, baseAddress uintptr) (ret bool) = ntdll.RtlAddFunctionTable //sys RtlDeleteFunctionTable(functionTable *RUNTIME_FUNCTION) (ret bool) = ntdll.RtlDeleteFunctionTable // Desktop Window Manager API (Dwmapi) //sys DwmGetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) = dwmapi.DwmGetWindowAttribute //sys DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) = dwmapi.DwmSetWindowAttribute // Windows Multimedia API //sys TimeBeginPeriod (period uint32) (err error) [failretval != 0] = winmm.timeBeginPeriod //sys TimeEndPeriod (period uint32) (err error) [failretval != 0] = winmm.timeEndPeriod // syscall interface implementation for other packages // GetCurrentProcess returns the handle for the current process. // It is a pseudo handle that does not need to be closed. // The returned error is always nil. // // Deprecated: use CurrentProcess for the same Handle without the nil // error. func GetCurrentProcess() (Handle, error) { return CurrentProcess(), nil } // CurrentProcess returns the handle for the current process. // It is a pseudo handle that does not need to be closed. func CurrentProcess() Handle { return Handle(^uintptr(1 - 1)) } // GetCurrentThread returns the handle for the current thread. // It is a pseudo handle that does not need to be closed. // The returned error is always nil. // // Deprecated: use CurrentThread for the same Handle without the nil // error. func GetCurrentThread() (Handle, error) { return CurrentThread(), nil } // CurrentThread returns the handle for the current thread. // It is a pseudo handle that does not need to be closed. func CurrentThread() Handle { return Handle(^uintptr(2 - 1)) } // GetProcAddressByOrdinal retrieves the address of the exported // function from module by ordinal. func GetProcAddressByOrdinal(module Handle, ordinal uintptr) (proc uintptr, err error) { r0, _, e1 := syscall.Syscall(procGetProcAddress.Addr(), 2, uintptr(module), ordinal, 0) proc = uintptr(r0) if proc == 0 { err = errnoErr(e1) } return } 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 } var attrs uint32 = FILE_ATTRIBUTE_NORMAL if perm&S_IWRITE == 0 { attrs = FILE_ATTRIBUTE_READONLY } h, e := CreateFile(pathp, access, sharemode, sa, createmode, attrs, 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 } 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 } return int(done), nil } func ReadFile(fd Handle, p []byte, done *uint32, overlapped *Overlapped) error { err := readFile(fd, p, done, overlapped) if raceenabled { if *done > 0 { raceWriteRange(unsafe.Pointer(&p[0]), int(*done)) } raceAcquire(unsafe.Pointer(&ioSync)) } return err } func WriteFile(fd Handle, p []byte, done *uint32, overlapped *Overlapped) error { if raceenabled { raceReleaseMerge(unsafe.Pointer(&ioSync)) } err := writeFile(fd, p, done, overlapped) if raceenabled && *done > 0 { raceReadRange(unsafe.Pointer(&p[0]), int(*done)) } return err } 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(stdhandle uint32) (fd Handle) { r, _ := GetStdHandle(stdhandle) 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 MoveFileEx(from, to, MOVEFILE_REPLACE_EXISTING) } 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 DurationSinceBoot() time.Duration { return time.Duration(getTickCount64()) * time.Millisecond } 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 CloseHandle(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 CloseHandle(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) { 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 LoadGetSystemTimePreciseAsFileTime() error { return procGetSystemTimePreciseAsFileTime.Find() } func LoadCancelIoEx() error { return procCancelIoEx.Find() } func LoadSetFileCompletionNotificationModes() error { return procSetFileCompletionNotificationModes.Find() } func WaitForMultipleObjects(handles []Handle, waitAll bool, waitMilliseconds uint32) (event uint32, err error) { // Every other win32 array API takes arguments as "pointer, count", except for this function. So we // can't declare it as a usual [] type, because mksyscall will use the opposite order. We therefore // trivially stub this ourselves. var handlePtr *Handle if len(handles) > 0 { handlePtr = &handles[0] } return waitForMultipleObjects(uint32(len(handles)), uintptr(unsafe.Pointer(handlePtr)), waitAll, waitMilliseconds) } // 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 WSALookupServiceBegin(querySet *WSAQUERYSET, flags uint32, handle *Handle) (err error) [failretval==socket_error] = ws2_32.WSALookupServiceBeginW //sys WSALookupServiceNext(handle Handle, flags uint32, size *int32, querySet *WSAQUERYSET) (err error) [failretval==socket_error] = ws2_32.WSALookupServiceNextW //sys WSALookupServiceEnd(handle Handle) (err error) [failretval==socket_error] = ws2_32.WSALookupServiceEnd //sys socket(af int32, typ int32, protocol int32) (handle Handle, err error) [failretval==InvalidHandle] = ws2_32.socket //sys sendto(s Handle, buf []byte, flags int32, to unsafe.Pointer, tolen int32) (err error) [failretval==socket_error] = ws2_32.sendto //sys recvfrom(s Handle, buf []byte, flags int32, from *RawSockaddrAny, fromlen *int32) (n int32, err error) [failretval==-1] = ws2_32.recvfrom //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 WSASocket(af int32, typ int32, protocol int32, protoInfo *WSAProtocolInfo, group uint32, flags uint32) (handle Handle, err error) [failretval==InvalidHandle] = ws2_32.WSASocketW //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 //sys WSAGetOverlappedResult(h Handle, o *Overlapped, bytes *uint32, wait bool, flags *uint32) (err error) = ws2_32.WSAGetOverlappedResult //sys GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) = iphlpapi.GetAdaptersAddresses //sys GetACP() (acp uint32) = kernel32.GetACP //sys MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) = kernel32.MultiByteToWideChar //sys getBestInterfaceEx(sockaddr unsafe.Pointer, pdwBestIfIndex *uint32) (errcode error) = iphlpapi.GetBestInterfaceEx // 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 [100]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) sa.raw.Addr = sa.Addr 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 sa.raw.Addr = sa.Addr return unsafe.Pointer(&sa.raw), int32(unsafe.Sizeof(sa.raw)), nil } type RawSockaddrUnix struct { Family uint16 Path [UNIX_PATH_MAX]int8 } type SockaddrUnix struct { Name string raw RawSockaddrUnix } func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, int32, error) { name := sa.Name n := len(name) if n > len(sa.raw.Path) { return nil, 0, syscall.EINVAL } if n == len(sa.raw.Path) && name[0] != '@' { return nil, 0, syscall.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 := int32(2) if n > 0 { sl += int32(n) + 1 } if sa.raw.Path[0] == '@' || (sa.raw.Path[0] == 0 && sl > 3) { // Check sl > 3 so we don't change unnamed socket behavior. sa.raw.Path[0] = 0 // Don't count trailing NUL for abstract address. sl-- } return unsafe.Pointer(&sa.raw), sl, nil } type RawSockaddrBth struct { AddressFamily [2]byte BtAddr [8]byte ServiceClassId [16]byte Port [4]byte } type SockaddrBth struct { BtAddr uint64 ServiceClassId GUID Port uint32 raw RawSockaddrBth } func (sa *SockaddrBth) sockaddr() (unsafe.Pointer, int32, error) { family := AF_BTH sa.raw = RawSockaddrBth{ AddressFamily: *(*[2]byte)(unsafe.Pointer(&family)), BtAddr: *(*[8]byte)(unsafe.Pointer(&sa.BtAddr)), Port: *(*[4]byte)(unsafe.Pointer(&sa.Port)), ServiceClassId: *(*[16]byte)(unsafe.Pointer(&sa.ServiceClassId)), } return unsafe.Pointer(&sa.raw), int32(unsafe.Sizeof(sa.raw)), nil } func (rsa *RawSockaddrAny) Sockaddr() (Sockaddr, error) { switch rsa.Addr.Family { 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++ } sa.Name = string(unsafe.Slice((*byte)(unsafe.Pointer(&pp.Path[0])), n)) 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]) sa.Addr = pp.Addr 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 sa.Addr = pp.Addr 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 GetBestInterfaceEx(sa Sockaddr, pdwBestIfIndex *uint32) (err error) { ptr, _, err := sa.sockaddr() if err != nil { return err } return getBestInterfaceEx(ptr, pdwBestIfIndex) } 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) { var rsa unsafe.Pointer var l int32 if to != nil { 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) } var sendRecvMsgFunc struct { once sync.Once sendAddr uintptr recvAddr uintptr err error } func loadWSASendRecvMsg() error { sendRecvMsgFunc.once.Do(func() { var s Handle s, sendRecvMsgFunc.err = Socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP) if sendRecvMsgFunc.err != nil { return } defer CloseHandle(s) var n uint32 sendRecvMsgFunc.err = WSAIoctl(s, SIO_GET_EXTENSION_FUNCTION_POINTER, (*byte)(unsafe.Pointer(&WSAID_WSARECVMSG)), uint32(unsafe.Sizeof(WSAID_WSARECVMSG)), (*byte)(unsafe.Pointer(&sendRecvMsgFunc.recvAddr)), uint32(unsafe.Sizeof(sendRecvMsgFunc.recvAddr)), &n, nil, 0) if sendRecvMsgFunc.err != nil { return } sendRecvMsgFunc.err = WSAIoctl(s, SIO_GET_EXTENSION_FUNCTION_POINTER, (*byte)(unsafe.Pointer(&WSAID_WSASENDMSG)), uint32(unsafe.Sizeof(WSAID_WSASENDMSG)), (*byte)(unsafe.Pointer(&sendRecvMsgFunc.sendAddr)), uint32(unsafe.Sizeof(sendRecvMsgFunc.sendAddr)), &n, nil, 0) }) return sendRecvMsgFunc.err } func WSASendMsg(fd Handle, msg *WSAMsg, flags uint32, bytesSent *uint32, overlapped *Overlapped, croutine *byte) error { err := loadWSASendRecvMsg() if err != nil { return err } r1, _, e1 := syscall.Syscall6(sendRecvMsgFunc.sendAddr, 6, uintptr(fd), uintptr(unsafe.Pointer(msg)), uintptr(flags), uintptr(unsafe.Pointer(bytesSent)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine))) if r1 == socket_error { err = errnoErr(e1) } return err } func WSARecvMsg(fd Handle, msg *WSAMsg, bytesReceived *uint32, overlapped *Overlapped, croutine *byte) error { err := loadWSASendRecvMsg() if err != nil { return err } r1, _, e1 := syscall.Syscall6(sendRecvMsgFunc.recvAddr, 5, uintptr(fd), uintptr(unsafe.Pointer(msg)), uintptr(unsafe.Pointer(bytesReceived)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0) if r1 == socket_error { err = errnoErr(e1) } return err } // 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) { var rsa RawSockaddrAny l := int32(unsafe.Sizeof(rsa)) n32, err := recvfrom(fd, p, int32(flags), &rsa, &l) n = int(n32) if err != nil { return } from, err = rsa.Sockaddr() return } func Sendto(fd Handle, p []byte, flags int, to Sockaddr) (err error) { ptr, l, err := to.sockaddr() if err != nil { return err } return sendto(fd, p, int32(flags), ptr, l) } 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) { v := int32(0) l := int32(unsafe.Sizeof(v)) err := Getsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&v)), &l) return int(v), err } 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 EnumProcesses(processIds []uint32, bytesReturned *uint32) error { // EnumProcesses syscall expects the size parameter to be in bytes, but the code generated with mksyscall uses // the length of the processIds slice instead. Hence, this wrapper function is added to fix the discrepancy. var p *uint32 if len(processIds) > 0 { p = &processIds[0] } size := uint32(len(processIds) * 4) return enumProcesses(p, size, bytesReturned) } 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 } // GUIDFromString parses a string in the form of // "{XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" into a GUID. func GUIDFromString(str string) (GUID, error) { guid := GUID{} str16, err := syscall.UTF16PtrFromString(str) if err != nil { return guid, err } err = clsidFromString(str16, &guid) if err != nil { return guid, err } return guid, nil } // GenerateGUID creates a new random GUID. func GenerateGUID() (GUID, error) { guid := GUID{} err := coCreateGuid(&guid) if err != nil { return guid, err } return guid, nil } // String returns the canonical string form of the GUID, // in the form of "{XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}". func (guid GUID) String() string { var str [100]uint16 chars := stringFromGUID2(&guid, &str[0], int32(len(str))) if chars <= 1 { return "" } return string(utf16.Decode(str[:chars-1])) } // KnownFolderPath returns a well-known folder path for the current user, specified by one of // the FOLDERID_ constants, and chosen and optionally created based on a KF_ flag. func KnownFolderPath(folderID *KNOWNFOLDERID, flags uint32) (string, error) { return Token(0).KnownFolderPath(folderID, flags) } // KnownFolderPath returns a well-known folder path for the user token, specified by one of // the FOLDERID_ constants, and chosen and optionally created based on a KF_ flag. func (t Token) KnownFolderPath(folderID *KNOWNFOLDERID, flags uint32) (string, error) { var p *uint16 err := shGetKnownFolderPath(folderID, flags, t, &p) if err != nil { return "", err } defer CoTaskMemFree(unsafe.Pointer(p)) return UTF16PtrToString(p), nil } // RtlGetVersion returns the version of the underlying operating system, ignoring // manifest semantics but is affected by the application compatibility layer. func RtlGetVersion() *OsVersionInfoEx { info := &OsVersionInfoEx{} info.osVersionInfoSize = uint32(unsafe.Sizeof(*info)) // According to documentation, this function always succeeds. // The function doesn't even check the validity of the // osVersionInfoSize member. Disassembling ntdll.dll indicates // that the documentation is indeed correct about that. _ = rtlGetVersion(info) return info } // RtlGetNtVersionNumbers returns the version of the underlying operating system, // ignoring manifest semantics and the application compatibility layer. func RtlGetNtVersionNumbers() (majorVersion, minorVersion, buildNumber uint32) { rtlGetNtVersionNumbers(&majorVersion, &minorVersion, &buildNumber) buildNumber &= 0xffff return } // GetProcessPreferredUILanguages retrieves the process preferred UI languages. func GetProcessPreferredUILanguages(flags uint32) ([]string, error) { return getUILanguages(flags, getProcessPreferredUILanguages) } // GetThreadPreferredUILanguages retrieves the thread preferred UI languages for the current thread. func GetThreadPreferredUILanguages(flags uint32) ([]string, error) { return getUILanguages(flags, getThreadPreferredUILanguages) } // GetUserPreferredUILanguages retrieves information about the user preferred UI languages. func GetUserPreferredUILanguages(flags uint32) ([]string, error) { return getUILanguages(flags, getUserPreferredUILanguages) } // GetSystemPreferredUILanguages retrieves the system preferred UI languages. func GetSystemPreferredUILanguages(flags uint32) ([]string, error) { return getUILanguages(flags, getSystemPreferredUILanguages) } func getUILanguages(flags uint32, f func(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) error) ([]string, error) { size := uint32(128) for { var numLanguages uint32 buf := make([]uint16, size) err := f(flags, &numLanguages, &buf[0], &size) if err == ERROR_INSUFFICIENT_BUFFER { continue } if err != nil { return nil, err } buf = buf[:size] if numLanguages == 0 || len(buf) == 0 { // GetProcessPreferredUILanguages may return numLanguages==0 with "\0\0" return []string{}, nil } if buf[len(buf)-1] == 0 { buf = buf[:len(buf)-1] // remove terminating null } languages := make([]string, 0, numLanguages) from := 0 for i, c := range buf { if c == 0 { languages = append(languages, string(utf16.Decode(buf[from:i]))) from = i + 1 } } return languages, nil } } func SetConsoleCursorPosition(console Handle, position Coord) error { return setConsoleCursorPosition(console, *((*uint32)(unsafe.Pointer(&position)))) } func GetStartupInfo(startupInfo *StartupInfo) error { getStartupInfo(startupInfo) return nil } func (s NTStatus) Errno() syscall.Errno { return rtlNtStatusToDosErrorNoTeb(s) } func langID(pri, sub uint16) uint32 { return uint32(sub)<<10 | uint32(pri) } func (s NTStatus) Error() string { b := make([]uint16, 300) n, err := FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_FROM_HMODULE|FORMAT_MESSAGE_ARGUMENT_ARRAY, modntdll.Handle(), uint32(s), langID(LANG_ENGLISH, SUBLANG_ENGLISH_US), b, nil) if err != nil { return fmt.Sprintf("NTSTATUS 0x%08x", uint32(s)) } // trim terminating \r and \n for ; n > 0 && (b[n-1] == '\n' || b[n-1] == '\r'); n-- { } return string(utf16.Decode(b[:n])) } // NewNTUnicodeString returns a new NTUnicodeString structure for use with native // NT APIs that work over the NTUnicodeString type. Note that most Windows APIs // do not use NTUnicodeString, and instead UTF16PtrFromString should be used for // the more common *uint16 string type. func NewNTUnicodeString(s string) (*NTUnicodeString, error) { var u NTUnicodeString s16, err := UTF16PtrFromString(s) if err != nil { return nil, err } RtlInitUnicodeString(&u, s16) return &u, nil } // Slice returns a uint16 slice that aliases the data in the NTUnicodeString. func (s *NTUnicodeString) Slice() []uint16 { slice := unsafe.Slice(s.Buffer, s.MaximumLength) return slice[:s.Length] } func (s *NTUnicodeString) String() string { return UTF16ToString(s.Slice()) } // NewNTString returns a new NTString structure for use with native // NT APIs that work over the NTString type. Note that most Windows APIs // do not use NTString, and instead UTF16PtrFromString should be used for // the more common *uint16 string type. func NewNTString(s string) (*NTString, error) { var nts NTString s8, err := BytePtrFromString(s) if err != nil { return nil, err } RtlInitString(&nts, s8) return &nts, nil } // Slice returns a byte slice that aliases the data in the NTString. func (s *NTString) Slice() []byte { slice := unsafe.Slice(s.Buffer, s.MaximumLength) return slice[:s.Length] } func (s *NTString) String() string { return ByteSliceToString(s.Slice()) } // FindResource resolves a resource of the given name and resource type. func FindResource(module Handle, name, resType ResourceIDOrString) (Handle, error) { var namePtr, resTypePtr uintptr var name16, resType16 *uint16 var err error resolvePtr := func(i interface{}, keep **uint16) (uintptr, error) { switch v := i.(type) { case string: *keep, err = UTF16PtrFromString(v) if err != nil { return 0, err } return uintptr(unsafe.Pointer(*keep)), nil case ResourceID: return uintptr(v), nil } return 0, errorspkg.New("parameter must be a ResourceID or a string") } namePtr, err = resolvePtr(name, &name16) if err != nil { return 0, err } resTypePtr, err = resolvePtr(resType, &resType16) if err != nil { return 0, err } resInfo, err := findResource(module, namePtr, resTypePtr) runtime.KeepAlive(name16) runtime.KeepAlive(resType16) return resInfo, err } func LoadResourceData(module, resInfo Handle) (data []byte, err error) { size, err := SizeofResource(module, resInfo) if err != nil { return } resData, err := LoadResource(module, resInfo) if err != nil { return } ptr, err := LockResource(resData) if err != nil { return } data = unsafe.Slice((*byte)(unsafe.Pointer(ptr)), size) return } // PSAPI_WORKING_SET_EX_BLOCK contains extended working set information for a page. type PSAPI_WORKING_SET_EX_BLOCK uint64 // Valid returns the validity of this page. // If this bit is 1, the subsequent members are valid; otherwise they should be ignored. func (b PSAPI_WORKING_SET_EX_BLOCK) Valid() bool { return (b & 1) == 1 } // ShareCount is the number of processes that share this page. The maximum value of this member is 7. func (b PSAPI_WORKING_SET_EX_BLOCK) ShareCount() uint64 { return b.intField(1, 3) } // Win32Protection is the memory protection attributes of the page. For a list of values, see // https://docs.microsoft.com/en-us/windows/win32/memory/memory-protection-constants func (b PSAPI_WORKING_SET_EX_BLOCK) Win32Protection() uint64 { return b.intField(4, 11) } // Shared returns the shared status of this page. // If this bit is 1, the page can be shared. func (b PSAPI_WORKING_SET_EX_BLOCK) Shared() bool { return (b & (1 << 15)) == 1 } // Node is the NUMA node. The maximum value of this member is 63. func (b PSAPI_WORKING_SET_EX_BLOCK) Node() uint64 { return b.intField(16, 6) } // Locked returns the locked status of this page. // If this bit is 1, the virtual page is locked in physical memory. func (b PSAPI_WORKING_SET_EX_BLOCK) Locked() bool { return (b & (1 << 22)) == 1 } // LargePage returns the large page status of this page. // If this bit is 1, the page is a large page. func (b PSAPI_WORKING_SET_EX_BLOCK) LargePage() bool { return (b & (1 << 23)) == 1 } // Bad returns the bad status of this page. // If this bit is 1, the page is has been reported as bad. func (b PSAPI_WORKING_SET_EX_BLOCK) Bad() bool { return (b & (1 << 31)) == 1 } // intField extracts an integer field in the PSAPI_WORKING_SET_EX_BLOCK union. func (b PSAPI_WORKING_SET_EX_BLOCK) intField(start, length int) uint64 { var mask PSAPI_WORKING_SET_EX_BLOCK for pos := start; pos < start+length; pos++ { mask |= (1 << pos) } masked := b & mask return uint64(masked >> start) } // PSAPI_WORKING_SET_EX_INFORMATION contains extended working set information for a process. type PSAPI_WORKING_SET_EX_INFORMATION struct { // The virtual address. VirtualAddress Pointer // A PSAPI_WORKING_SET_EX_BLOCK union that indicates the attributes of the page at VirtualAddress. VirtualAttributes PSAPI_WORKING_SET_EX_BLOCK } // CreatePseudoConsole creates a windows pseudo console. func CreatePseudoConsole(size Coord, in Handle, out Handle, flags uint32, pconsole *Handle) error { // We need this wrapper to manually cast Coord to uint32. The autogenerated wrappers only // accept arguments that can be casted to uintptr, and Coord can't. return createPseudoConsole(*((*uint32)(unsafe.Pointer(&size))), in, out, flags, pconsole) } // ResizePseudoConsole resizes the internal buffers of the pseudo console to the width and height specified in `size`. func ResizePseudoConsole(pconsole Handle, size Coord) error { // We need this wrapper to manually cast Coord to uint32. The autogenerated wrappers only // accept arguments that can be casted to uintptr, and Coord can't. return resizePseudoConsole(pconsole, *((*uint32)(unsafe.Pointer(&size)))) } // DCB constants. See https://learn.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-dcb. const ( CBR_110 = 110 CBR_300 = 300 CBR_600 = 600 CBR_1200 = 1200 CBR_2400 = 2400 CBR_4800 = 4800 CBR_9600 = 9600 CBR_14400 = 14400 CBR_19200 = 19200 CBR_38400 = 38400 CBR_57600 = 57600 CBR_115200 = 115200 CBR_128000 = 128000 CBR_256000 = 256000 DTR_CONTROL_DISABLE = 0x00000000 DTR_CONTROL_ENABLE = 0x00000010 DTR_CONTROL_HANDSHAKE = 0x00000020 RTS_CONTROL_DISABLE = 0x00000000 RTS_CONTROL_ENABLE = 0x00001000 RTS_CONTROL_HANDSHAKE = 0x00002000 RTS_CONTROL_TOGGLE = 0x00003000 NOPARITY = 0 ODDPARITY = 1 EVENPARITY = 2 MARKPARITY = 3 SPACEPARITY = 4 ONESTOPBIT = 0 ONE5STOPBITS = 1 TWOSTOPBITS = 2 ) // EscapeCommFunction constants. See https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-escapecommfunction. const ( SETXOFF = 1 SETXON = 2 SETRTS = 3 CLRRTS = 4 SETDTR = 5 CLRDTR = 6 SETBREAK = 8 CLRBREAK = 9 ) // PurgeComm constants. See https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-purgecomm. const ( PURGE_TXABORT = 0x0001 PURGE_RXABORT = 0x0002 PURGE_TXCLEAR = 0x0004 PURGE_RXCLEAR = 0x0008 ) // SetCommMask constants. See https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setcommmask. const ( EV_RXCHAR = 0x0001 EV_RXFLAG = 0x0002 EV_TXEMPTY = 0x0004 EV_CTS = 0x0008 EV_DSR = 0x0010 EV_RLSD = 0x0020 EV_BREAK = 0x0040 EV_ERR = 0x0080 EV_RING = 0x0100 ) ================================================ FILE: vendor/golang.org/x/sys/windows/types_windows.go ================================================ // 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 ( "net" "syscall" "unsafe" ) // NTStatus corresponds with NTSTATUS, error values returned by ntdll.dll and // other native functions. type NTStatus uint32 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 ( FILE_READ_DATA = 0x00000001 FILE_READ_ATTRIBUTES = 0x00000080 FILE_READ_EA = 0x00000008 FILE_WRITE_DATA = 0x00000002 FILE_WRITE_ATTRIBUTES = 0x00000100 FILE_WRITE_EA = 0x00000010 FILE_APPEND_DATA = 0x00000004 FILE_EXECUTE = 0x00000020 FILE_GENERIC_READ = STANDARD_RIGHTS_READ | FILE_READ_DATA | FILE_READ_ATTRIBUTES | FILE_READ_EA | SYNCHRONIZE FILE_GENERIC_WRITE = STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | FILE_APPEND_DATA | SYNCHRONIZE FILE_GENERIC_EXECUTE = STANDARD_RIGHTS_EXECUTE | FILE_READ_ATTRIBUTES | FILE_EXECUTE | SYNCHRONIZE FILE_LIST_DIRECTORY = 0x00000001 FILE_TRAVERSE = 0x00000020 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_DEVICE = 0x00000040 FILE_ATTRIBUTE_NORMAL = 0x00000080 FILE_ATTRIBUTE_TEMPORARY = 0x00000100 FILE_ATTRIBUTE_SPARSE_FILE = 0x00000200 FILE_ATTRIBUTE_REPARSE_POINT = 0x00000400 FILE_ATTRIBUTE_COMPRESSED = 0x00000800 FILE_ATTRIBUTE_OFFLINE = 0x00001000 FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = 0x00002000 FILE_ATTRIBUTE_ENCRYPTED = 0x00004000 FILE_ATTRIBUTE_INTEGRITY_STREAM = 0x00008000 FILE_ATTRIBUTE_VIRTUAL = 0x00010000 FILE_ATTRIBUTE_NO_SCRUB_DATA = 0x00020000 FILE_ATTRIBUTE_RECALL_ON_OPEN = 0x00040000 FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS = 0x00400000 INVALID_FILE_ATTRIBUTES = 0xffffffff CREATE_NEW = 1 CREATE_ALWAYS = 2 OPEN_EXISTING = 3 OPEN_ALWAYS = 4 TRUNCATE_EXISTING = 5 FILE_FLAG_OPEN_REQUIRING_OPLOCK = 0x00040000 FILE_FLAG_FIRST_PIPE_INSTANCE = 0x00080000 FILE_FLAG_OPEN_NO_RECALL = 0x00100000 FILE_FLAG_OPEN_REPARSE_POINT = 0x00200000 FILE_FLAG_SESSION_AWARE = 0x00800000 FILE_FLAG_POSIX_SEMANTICS = 0x01000000 FILE_FLAG_BACKUP_SEMANTICS = 0x02000000 FILE_FLAG_DELETE_ON_CLOSE = 0x04000000 FILE_FLAG_SEQUENTIAL_SCAN = 0x08000000 FILE_FLAG_RANDOM_ACCESS = 0x10000000 FILE_FLAG_NO_BUFFERING = 0x20000000 FILE_FLAG_OVERLAPPED = 0x40000000 FILE_FLAG_WRITE_THROUGH = 0x80000000 HANDLE_FLAG_INHERIT = 0x00000001 STARTF_USESTDHANDLES = 0x00000100 STARTF_USESHOWWINDOW = 0x00000001 DUPLICATE_CLOSE_SOURCE = 0x00000001 DUPLICATE_SAME_ACCESS = 0x00000002 STD_INPUT_HANDLE = -10 & (1<<32 - 1) STD_OUTPUT_HANDLE = -11 & (1<<32 - 1) STD_ERROR_HANDLE = -12 & (1<<32 - 1) 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_MODULE_NAME32 = 255 MAX_COMPUTERNAME_LENGTH = 15 MAX_DHCPV6_DUID_LENGTH = 130 MAX_DNS_SUFFIX_STRING_LENGTH = 256 TIME_ZONE_ID_UNKNOWN = 0 TIME_ZONE_ID_STANDARD = 1 TIME_ZONE_ID_DAYLIGHT = 2 IGNORE = 0 INFINITE = 0xffffffff WAIT_ABANDONED = 0x00000080 WAIT_OBJECT_0 = 0x00000000 WAIT_FAILED = 0xFFFFFFFF // Access rights for process. PROCESS_CREATE_PROCESS = 0x0080 PROCESS_CREATE_THREAD = 0x0002 PROCESS_DUP_HANDLE = 0x0040 PROCESS_QUERY_INFORMATION = 0x0400 PROCESS_QUERY_LIMITED_INFORMATION = 0x1000 PROCESS_SET_INFORMATION = 0x0200 PROCESS_SET_QUOTA = 0x0100 PROCESS_SUSPEND_RESUME = 0x0800 PROCESS_TERMINATE = 0x0001 PROCESS_VM_OPERATION = 0x0008 PROCESS_VM_READ = 0x0010 PROCESS_VM_WRITE = 0x0020 // Access rights for thread. THREAD_DIRECT_IMPERSONATION = 0x0200 THREAD_GET_CONTEXT = 0x0008 THREAD_IMPERSONATE = 0x0100 THREAD_QUERY_INFORMATION = 0x0040 THREAD_QUERY_LIMITED_INFORMATION = 0x0800 THREAD_SET_CONTEXT = 0x0010 THREAD_SET_INFORMATION = 0x0020 THREAD_SET_LIMITED_INFORMATION = 0x0400 THREAD_SET_THREAD_TOKEN = 0x0080 THREAD_SUSPEND_RESUME = 0x0002 THREAD_TERMINATE = 0x0001 FILE_MAP_COPY = 0x01 FILE_MAP_WRITE = 0x02 FILE_MAP_READ = 0x04 FILE_MAP_EXECUTE = 0x20 CTRL_C_EVENT = 0 CTRL_BREAK_EVENT = 1 CTRL_CLOSE_EVENT = 2 CTRL_LOGOFF_EVENT = 5 CTRL_SHUTDOWN_EVENT = 6 // Windows reserves errors >= 1<<29 for application use. APPLICATION_ERROR = 1 << 29 ) const ( // Process creation flags. CREATE_BREAKAWAY_FROM_JOB = 0x01000000 CREATE_DEFAULT_ERROR_MODE = 0x04000000 CREATE_NEW_CONSOLE = 0x00000010 CREATE_NEW_PROCESS_GROUP = 0x00000200 CREATE_NO_WINDOW = 0x08000000 CREATE_PROTECTED_PROCESS = 0x00040000 CREATE_PRESERVE_CODE_AUTHZ_LEVEL = 0x02000000 CREATE_SEPARATE_WOW_VDM = 0x00000800 CREATE_SHARED_WOW_VDM = 0x00001000 CREATE_SUSPENDED = 0x00000004 CREATE_UNICODE_ENVIRONMENT = 0x00000400 DEBUG_ONLY_THIS_PROCESS = 0x00000002 DEBUG_PROCESS = 0x00000001 DETACHED_PROCESS = 0x00000008 EXTENDED_STARTUPINFO_PRESENT = 0x00080000 INHERIT_PARENT_AFFINITY = 0x00010000 ) const ( // attributes for ProcThreadAttributeList PROC_THREAD_ATTRIBUTE_PARENT_PROCESS = 0x00020000 PROC_THREAD_ATTRIBUTE_HANDLE_LIST = 0x00020002 PROC_THREAD_ATTRIBUTE_GROUP_AFFINITY = 0x00030003 PROC_THREAD_ATTRIBUTE_PREFERRED_NODE = 0x00020004 PROC_THREAD_ATTRIBUTE_IDEAL_PROCESSOR = 0x00030005 PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY = 0x00020007 PROC_THREAD_ATTRIBUTE_UMS_THREAD = 0x00030006 PROC_THREAD_ATTRIBUTE_PROTECTION_LEVEL = 0x0002000b PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE = 0x00020016 ) 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 ( // flags for EnumProcessModulesEx LIST_MODULES_32BIT = 0x01 LIST_MODULES_64BIT = 0x02 LIST_MODULES_ALL = 0x03 LIST_MODULES_DEFAULT = 0x00 ) const ( // filters for ReadDirectoryChangesW and FindFirstChangeNotificationW 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 /* certenrolld_begin -- PROV_RSA_*/ 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 /* dwFlags definitions for CryptAcquireContext */ CRYPT_VERIFYCONTEXT = 0xF0000000 CRYPT_NEWKEYSET = 0x00000008 CRYPT_DELETEKEYSET = 0x00000010 CRYPT_MACHINE_KEYSET = 0x00000020 CRYPT_SILENT = 0x00000040 CRYPT_DEFAULT_CONTAINER_OPTIONAL = 0x00000080 /* Flags for PFXImportCertStore */ CRYPT_EXPORTABLE = 0x00000001 CRYPT_USER_PROTECTED = 0x00000002 CRYPT_USER_KEYSET = 0x00001000 PKCS12_PREFER_CNG_KSP = 0x00000100 PKCS12_ALWAYS_CNG_KSP = 0x00000200 PKCS12_ALLOW_OVERWRITE_KEY = 0x00004000 PKCS12_NO_PERSIST_KEY = 0x00008000 PKCS12_INCLUDE_EXTENDED_PROPERTIES = 0x00000010 /* Flags for CryptAcquireCertificatePrivateKey */ CRYPT_ACQUIRE_CACHE_FLAG = 0x00000001 CRYPT_ACQUIRE_USE_PROV_INFO_FLAG = 0x00000002 CRYPT_ACQUIRE_COMPARE_KEY_FLAG = 0x00000004 CRYPT_ACQUIRE_NO_HEALING = 0x00000008 CRYPT_ACQUIRE_SILENT_FLAG = 0x00000040 CRYPT_ACQUIRE_WINDOW_HANDLE_FLAG = 0x00000080 CRYPT_ACQUIRE_NCRYPT_KEY_FLAGS_MASK = 0x00070000 CRYPT_ACQUIRE_ALLOW_NCRYPT_KEY_FLAG = 0x00010000 CRYPT_ACQUIRE_PREFER_NCRYPT_KEY_FLAG = 0x00020000 CRYPT_ACQUIRE_ONLY_NCRYPT_KEY_FLAG = 0x00040000 /* pdwKeySpec for CryptAcquireCertificatePrivateKey */ AT_KEYEXCHANGE = 1 AT_SIGNATURE = 2 CERT_NCRYPT_KEY_SPEC = 0xFFFFFFFF /* Default usage match type is AND with value zero */ USAGE_MATCH_TYPE_AND = 0 USAGE_MATCH_TYPE_OR = 1 /* msgAndCertEncodingType values for CertOpenStore function */ X509_ASN_ENCODING = 0x00000001 PKCS_7_ASN_ENCODING = 0x00010000 /* storeProvider values for CertOpenStore function */ CERT_STORE_PROV_MSG = 1 CERT_STORE_PROV_MEMORY = 2 CERT_STORE_PROV_FILE = 3 CERT_STORE_PROV_REG = 4 CERT_STORE_PROV_PKCS7 = 5 CERT_STORE_PROV_SERIALIZED = 6 CERT_STORE_PROV_FILENAME_A = 7 CERT_STORE_PROV_FILENAME_W = 8 CERT_STORE_PROV_FILENAME = CERT_STORE_PROV_FILENAME_W CERT_STORE_PROV_SYSTEM_A = 9 CERT_STORE_PROV_SYSTEM_W = 10 CERT_STORE_PROV_SYSTEM = CERT_STORE_PROV_SYSTEM_W CERT_STORE_PROV_COLLECTION = 11 CERT_STORE_PROV_SYSTEM_REGISTRY_A = 12 CERT_STORE_PROV_SYSTEM_REGISTRY_W = 13 CERT_STORE_PROV_SYSTEM_REGISTRY = CERT_STORE_PROV_SYSTEM_REGISTRY_W CERT_STORE_PROV_PHYSICAL_W = 14 CERT_STORE_PROV_PHYSICAL = CERT_STORE_PROV_PHYSICAL_W CERT_STORE_PROV_SMART_CARD_W = 15 CERT_STORE_PROV_SMART_CARD = CERT_STORE_PROV_SMART_CARD_W CERT_STORE_PROV_LDAP_W = 16 CERT_STORE_PROV_LDAP = CERT_STORE_PROV_LDAP_W CERT_STORE_PROV_PKCS12 = 17 /* store characteristics (low WORD of flag) for CertOpenStore function */ CERT_STORE_NO_CRYPT_RELEASE_FLAG = 0x00000001 CERT_STORE_SET_LOCALIZED_NAME_FLAG = 0x00000002 CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG = 0x00000004 CERT_STORE_DELETE_FLAG = 0x00000010 CERT_STORE_UNSAFE_PHYSICAL_FLAG = 0x00000020 CERT_STORE_SHARE_STORE_FLAG = 0x00000040 CERT_STORE_SHARE_CONTEXT_FLAG = 0x00000080 CERT_STORE_MANIFOLD_FLAG = 0x00000100 CERT_STORE_ENUM_ARCHIVED_FLAG = 0x00000200 CERT_STORE_UPDATE_KEYID_FLAG = 0x00000400 CERT_STORE_BACKUP_RESTORE_FLAG = 0x00000800 CERT_STORE_MAXIMUM_ALLOWED_FLAG = 0x00001000 CERT_STORE_CREATE_NEW_FLAG = 0x00002000 CERT_STORE_OPEN_EXISTING_FLAG = 0x00004000 CERT_STORE_READONLY_FLAG = 0x00008000 /* store locations (high WORD of flag) for CertOpenStore function */ CERT_SYSTEM_STORE_CURRENT_USER = 0x00010000 CERT_SYSTEM_STORE_LOCAL_MACHINE = 0x00020000 CERT_SYSTEM_STORE_CURRENT_SERVICE = 0x00040000 CERT_SYSTEM_STORE_SERVICES = 0x00050000 CERT_SYSTEM_STORE_USERS = 0x00060000 CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY = 0x00070000 CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY = 0x00080000 CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE = 0x00090000 CERT_SYSTEM_STORE_UNPROTECTED_FLAG = 0x40000000 CERT_SYSTEM_STORE_RELOCATE_FLAG = 0x80000000 /* Miscellaneous high-WORD flags for CertOpenStore function */ CERT_REGISTRY_STORE_REMOTE_FLAG = 0x00010000 CERT_REGISTRY_STORE_SERIALIZED_FLAG = 0x00020000 CERT_REGISTRY_STORE_ROAMING_FLAG = 0x00040000 CERT_REGISTRY_STORE_MY_IE_DIRTY_FLAG = 0x00080000 CERT_REGISTRY_STORE_LM_GPT_FLAG = 0x01000000 CERT_REGISTRY_STORE_CLIENT_GPT_FLAG = 0x80000000 CERT_FILE_STORE_COMMIT_ENABLE_FLAG = 0x00010000 CERT_LDAP_STORE_SIGN_FLAG = 0x00010000 CERT_LDAP_STORE_AREC_EXCLUSIVE_FLAG = 0x00020000 CERT_LDAP_STORE_OPENED_FLAG = 0x00040000 CERT_LDAP_STORE_UNBIND_FLAG = 0x00080000 /* addDisposition values for CertAddCertificateContextToStore function */ CERT_STORE_ADD_NEW = 1 CERT_STORE_ADD_USE_EXISTING = 2 CERT_STORE_ADD_REPLACE_EXISTING = 3 CERT_STORE_ADD_ALWAYS = 4 CERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES = 5 CERT_STORE_ADD_NEWER = 6 CERT_STORE_ADD_NEWER_INHERIT_PROPERTIES = 7 /* ErrorStatus values for CertTrustStatus struct */ 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_PARTIAL_CHAIN = 0x00010000 CERT_TRUST_CTL_IS_NOT_TIME_VALID = 0x00020000 CERT_TRUST_CTL_IS_NOT_SIGNATURE_VALID = 0x00040000 CERT_TRUST_CTL_IS_NOT_VALID_FOR_USAGE = 0x00080000 CERT_TRUST_HAS_WEAK_SIGNATURE = 0x00100000 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 /* InfoStatus values for CertTrustStatus struct */ CERT_TRUST_HAS_EXACT_MATCH_ISSUER = 0x00000001 CERT_TRUST_HAS_KEY_MATCH_ISSUER = 0x00000002 CERT_TRUST_HAS_NAME_MATCH_ISSUER = 0x00000004 CERT_TRUST_IS_SELF_SIGNED = 0x00000008 CERT_TRUST_HAS_PREFERRED_ISSUER = 0x00000100 CERT_TRUST_HAS_ISSUANCE_CHAIN_POLICY = 0x00000400 CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS = 0x00000400 CERT_TRUST_IS_PEER_TRUSTED = 0x00000800 CERT_TRUST_HAS_CRL_VALIDITY_EXTENDED = 0x00001000 CERT_TRUST_IS_FROM_EXCLUSIVE_TRUST_STORE = 0x00002000 CERT_TRUST_IS_CA_TRUSTED = 0x00004000 CERT_TRUST_IS_COMPLEX_CHAIN = 0x00010000 /* Certificate Information Flags */ CERT_INFO_VERSION_FLAG = 1 CERT_INFO_SERIAL_NUMBER_FLAG = 2 CERT_INFO_SIGNATURE_ALGORITHM_FLAG = 3 CERT_INFO_ISSUER_FLAG = 4 CERT_INFO_NOT_BEFORE_FLAG = 5 CERT_INFO_NOT_AFTER_FLAG = 6 CERT_INFO_SUBJECT_FLAG = 7 CERT_INFO_SUBJECT_PUBLIC_KEY_INFO_FLAG = 8 CERT_INFO_ISSUER_UNIQUE_ID_FLAG = 9 CERT_INFO_SUBJECT_UNIQUE_ID_FLAG = 10 CERT_INFO_EXTENSION_FLAG = 11 /* dwFindType for CertFindCertificateInStore */ CERT_COMPARE_MASK = 0xFFFF CERT_COMPARE_SHIFT = 16 CERT_COMPARE_ANY = 0 CERT_COMPARE_SHA1_HASH = 1 CERT_COMPARE_NAME = 2 CERT_COMPARE_ATTR = 3 CERT_COMPARE_MD5_HASH = 4 CERT_COMPARE_PROPERTY = 5 CERT_COMPARE_PUBLIC_KEY = 6 CERT_COMPARE_HASH = CERT_COMPARE_SHA1_HASH CERT_COMPARE_NAME_STR_A = 7 CERT_COMPARE_NAME_STR_W = 8 CERT_COMPARE_KEY_SPEC = 9 CERT_COMPARE_ENHKEY_USAGE = 10 CERT_COMPARE_CTL_USAGE = CERT_COMPARE_ENHKEY_USAGE CERT_COMPARE_SUBJECT_CERT = 11 CERT_COMPARE_ISSUER_OF = 12 CERT_COMPARE_EXISTING = 13 CERT_COMPARE_SIGNATURE_HASH = 14 CERT_COMPARE_KEY_IDENTIFIER = 15 CERT_COMPARE_CERT_ID = 16 CERT_COMPARE_CROSS_CERT_DIST_POINTS = 17 CERT_COMPARE_PUBKEY_MD5_HASH = 18 CERT_COMPARE_SUBJECT_INFO_ACCESS = 19 CERT_COMPARE_HASH_STR = 20 CERT_COMPARE_HAS_PRIVATE_KEY = 21 CERT_FIND_ANY = (CERT_COMPARE_ANY << CERT_COMPARE_SHIFT) CERT_FIND_SHA1_HASH = (CERT_COMPARE_SHA1_HASH << CERT_COMPARE_SHIFT) CERT_FIND_MD5_HASH = (CERT_COMPARE_MD5_HASH << CERT_COMPARE_SHIFT) CERT_FIND_SIGNATURE_HASH = (CERT_COMPARE_SIGNATURE_HASH << CERT_COMPARE_SHIFT) CERT_FIND_KEY_IDENTIFIER = (CERT_COMPARE_KEY_IDENTIFIER << CERT_COMPARE_SHIFT) CERT_FIND_HASH = CERT_FIND_SHA1_HASH CERT_FIND_PROPERTY = (CERT_COMPARE_PROPERTY << CERT_COMPARE_SHIFT) CERT_FIND_PUBLIC_KEY = (CERT_COMPARE_PUBLIC_KEY << CERT_COMPARE_SHIFT) CERT_FIND_SUBJECT_NAME = (CERT_COMPARE_NAME<> 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 // The Microsoft documentation for this struct¹ describes three additional // fields: dwFileType, dwCreatorType, and wFinderFlags. However, those fields // are empirically only present in the macOS port of the Win32 API,² and thus // not needed for binaries built for Windows. // // ¹ https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-win32_find_dataw describe // ² https://golang.org/issue/42637#issuecomment-760715755. } 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 StartupInfoEx struct { StartupInfo ProcThreadAttributeList *ProcThreadAttributeList } // ProcThreadAttributeList is a placeholder type to represent a PROC_THREAD_ATTRIBUTE_LIST. // // To create a *ProcThreadAttributeList, use NewProcThreadAttributeList, update // it with ProcThreadAttributeListContainer.Update, free its memory using // ProcThreadAttributeListContainer.Delete, and access the list itself using // ProcThreadAttributeListContainer.List. type ProcThreadAttributeList struct{} type ProcThreadAttributeListContainer struct { data *ProcThreadAttributeList pointers []unsafe.Pointer } 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 ThreadEntry32 struct { Size uint32 Usage uint32 ThreadID uint32 OwnerProcessID uint32 BasePri int32 DeltaPri int32 Flags uint32 } type ModuleEntry32 struct { Size uint32 ModuleID uint32 ProcessID uint32 GlblcntUsage uint32 ProccntUsage uint32 ModBaseAddr uintptr ModBaseSize uint32 ModuleHandle Handle Module [MAX_MODULE_NAME32 + 1]uint16 ExePath [MAX_PATH]uint16 } const SizeofModuleEntry32 = unsafe.Sizeof(ModuleEntry32{}) 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_NETBIOS = 17 AF_INET6 = 23 AF_IRDA = 26 AF_BTH = 32 SOCK_STREAM = 1 SOCK_DGRAM = 2 SOCK_RAW = 3 SOCK_RDM = 4 SOCK_SEQPACKET = 5 IPPROTO_IP = 0 IPPROTO_ICMP = 1 IPPROTO_IGMP = 2 BTHPROTO_RFCOMM = 3 IPPROTO_TCP = 6 IPPROTO_UDP = 17 IPPROTO_IPV6 = 41 IPPROTO_ICMPV6 = 58 IPPROTO_RM = 113 SOL_SOCKET = 0xffff SO_REUSEADDR = 4 SO_KEEPALIVE = 8 SO_DONTROUTE = 16 SO_BROADCAST = 32 SO_LINGER = 128 SO_RCVBUF = 0x1002 SO_RCVTIMEO = 0x1006 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_HDRINCL = 0x2 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 IP_PKTINFO = 0x13 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 IPV6_PKTINFO = 0x13 MSG_OOB = 0x1 MSG_PEEK = 0x2 MSG_DONTROUTE = 0x4 MSG_WAITALL = 0x8 MSG_TRUNC = 0x0100 MSG_CTRUNC = 0x0200 MSG_BCAST = 0x0400 MSG_MCAST = 0x0800 SOMAXCONN = 0x7fffffff TCP_NODELAY = 1 TCP_EXPEDITED_1122 = 2 TCP_KEEPALIVE = 3 TCP_MAXSEG = 4 TCP_MAXRT = 5 TCP_STDURG = 6 TCP_NOURG = 7 TCP_ATMARK = 8 TCP_NOSYNRETRIES = 9 TCP_TIMESTAMPS = 10 TCP_OFFLOAD_PREFERENCE = 11 TCP_CONGESTION_ALGORITHM = 12 TCP_DELAY_FIN_ACK = 13 TCP_MAXRTMS = 14 TCP_FASTOPEN = 15 TCP_KEEPCNT = 16 TCP_KEEPIDLE = TCP_KEEPALIVE TCP_KEEPINTVL = 17 TCP_FAIL_CONNECT_ON_ICMP_ERROR = 18 TCP_ICMP_ERROR_INFO = 19 UDP_NOCHECKSUM = 1 UDP_SEND_MSG_SIZE = 2 UDP_RECV_MAX_COALESCED_SIZE = 3 UDP_CHECKSUM_COVERAGE = 20 UDP_COALESCED_INFO = 3 SHUT_RD = 0 SHUT_WR = 1 SHUT_RDWR = 2 WSADESCRIPTION_LEN = 256 WSASYS_STATUS_LEN = 128 ) type WSABuf struct { Len uint32 Buf *byte } type WSAMsg struct { Name *syscall.RawSockaddrAny Namelen int32 Buffers *WSABuf BufferCount uint32 Control WSABuf Flags uint32 } // Flags for WSASocket const ( WSA_FLAG_OVERLAPPED = 0x01 WSA_FLAG_MULTIPOINT_C_ROOT = 0x02 WSA_FLAG_MULTIPOINT_C_LEAF = 0x04 WSA_FLAG_MULTIPOINT_D_ROOT = 0x08 WSA_FLAG_MULTIPOINT_D_LEAF = 0x10 WSA_FLAG_ACCESS_SYSTEM_SECURITY = 0x40 WSA_FLAG_NO_HANDLE_INHERIT = 0x80 WSA_FLAG_REGISTERED_IO = 0x100 ) // 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 ( // flags inside DNSRecord.Dw DnsSectionQuestion = 0x0000 DnsSectionAnswer = 0x0001 DnsSectionAuthority = 0x0002 DnsSectionAdditional = 0x0003 ) const ( // flags of WSALookupService LUP_DEEP = 0x0001 LUP_CONTAINERS = 0x0002 LUP_NOCONTAINERS = 0x0004 LUP_NEAREST = 0x0008 LUP_RETURN_NAME = 0x0010 LUP_RETURN_TYPE = 0x0020 LUP_RETURN_VERSION = 0x0040 LUP_RETURN_COMMENT = 0x0080 LUP_RETURN_ADDR = 0x0100 LUP_RETURN_BLOB = 0x0200 LUP_RETURN_ALIASES = 0x0400 LUP_RETURN_QUERY_STRING = 0x0800 LUP_RETURN_ALL = 0x0FF0 LUP_RES_SERVICE = 0x8000 LUP_FLUSHCACHE = 0x1000 LUP_FLUSHPREVIOUS = 0x2000 LUP_NON_AUTHORITATIVE = 0x4000 LUP_SECURE = 0x8000 LUP_RETURN_PREFERRED_NAMES = 0x10000 LUP_DNS_ONLY = 0x20000 LUP_ADDRCONFIG = 0x100000 LUP_DUAL_ADDR = 0x200000 LUP_FILESERVER = 0x400000 LUP_DISABLE_IDN_ENCODING = 0x00800000 LUP_API_ANSI = 0x01000000 LUP_RESOLUTION_HANDLE = 0x80000000 ) const ( // values of WSAQUERYSET's namespace NS_ALL = 0 NS_DNS = 12 NS_NLA = 15 NS_BTH = 16 NS_EMAIL = 37 NS_PNRPNAME = 38 NS_PNRPCLOUD = 39 ) 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 CertInfo struct { Version uint32 SerialNumber CryptIntegerBlob SignatureAlgorithm CryptAlgorithmIdentifier Issuer CertNameBlob NotBefore Filetime NotAfter Filetime Subject CertNameBlob SubjectPublicKeyInfo CertPublicKeyInfo IssuerUniqueId CryptBitBlob SubjectUniqueId CryptBitBlob CountExtensions uint32 Extensions *CertExtension } type CertExtension struct { ObjId *byte Critical int32 Value CryptObjidBlob } type CryptAlgorithmIdentifier struct { ObjId *byte Parameters CryptObjidBlob } type CertPublicKeyInfo struct { Algorithm CryptAlgorithmIdentifier PublicKey CryptBitBlob } type DataBlob struct { Size uint32 Data *byte } type CryptIntegerBlob DataBlob type CryptUintBlob DataBlob type CryptObjidBlob DataBlob type CertNameBlob DataBlob type CertRdnValueBlob DataBlob type CertBlob DataBlob type CrlBlob DataBlob type CryptDataBlob DataBlob type CryptHashBlob DataBlob type CryptDigestBlob DataBlob type CryptDerBlob DataBlob type CryptAttrBlob DataBlob type CryptBitBlob struct { Size uint32 Data *byte UnusedBits uint32 } type CertContext struct { EncodingType uint32 EncodedCert *byte Length uint32 CertInfo *CertInfo Store Handle } type CertChainContext struct { Size uint32 TrustStatus CertTrustStatus ChainCount uint32 Chains **CertSimpleChain LowerQualityChainCount uint32 LowerQualityChains **CertChainContext HasRevocationFreshnessTime uint32 RevocationFreshnessTime uint32 } type CertTrustListInfo struct { // Not implemented } type CertSimpleChain struct { Size uint32 TrustStatus CertTrustStatus NumElements uint32 Elements **CertChainElement TrustListInfo *CertTrustListInfo HasRevocationFreshnessTime uint32 RevocationFreshnessTime uint32 } type CertChainElement struct { Size uint32 CertContext *CertContext TrustStatus CertTrustStatus RevocationInfo *CertRevocationInfo IssuanceUsage *CertEnhKeyUsage ApplicationUsage *CertEnhKeyUsage ExtendedErrorInfo *uint16 } type CertRevocationCrlInfo struct { // Not implemented } type CertRevocationInfo struct { Size uint32 RevocationResult uint32 RevocationOid *byte OidSpecificInfo Pointer HasFreshnessTime uint32 FreshnessTime uint32 CrlInfo *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 Pointer } type SSLExtraCertChainPolicyPara struct { Size uint32 AuthType uint32 Checks uint32 ServerName *uint16 } type CertChainPolicyStatus struct { Size uint32 Error uint32 ChainIndex uint32 ElementIndex uint32 ExtraPolicyStatus Pointer } type CertPolicyInfo struct { Identifier *byte CountQualifiers uint32 Qualifiers *CertPolicyQualifierInfo } type CertPoliciesInfo struct { Count uint32 PolicyInfos *CertPolicyInfo } type CertPolicyQualifierInfo struct { // Not implemented } type CertStrongSignPara struct { Size uint32 InfoChoice uint32 InfoOrSerializedInfoOrOID unsafe.Pointer } type CryptProtectPromptStruct struct { Size uint32 PromptFlags uint32 App HWND Prompt *uint16 } type CertChainFindByIssuerPara struct { Size uint32 UsageIdentifier *byte KeySpec uint32 AcquirePrivateKeyFlags uint32 IssuerCount uint32 Issuer Pointer FindCallback Pointer FindArg Pointer IssuerChainIndex *uint32 IssuerElementIndex *uint32 } type WinTrustData struct { Size uint32 PolicyCallbackData uintptr SIPClientData uintptr UIChoice uint32 RevocationChecks uint32 UnionChoice uint32 FileOrCatalogOrBlobOrSgnrOrCert unsafe.Pointer StateAction uint32 StateData Handle URLReference *uint16 ProvFlags uint32 UIContext uint32 SignatureSettings *WinTrustSignatureSettings } type WinTrustFileInfo struct { Size uint32 FilePath *uint16 File Handle KnownSubject *GUID } type WinTrustSignatureSettings struct { Size uint32 Index uint32 Flags uint32 SecondarySigs uint32 VerifiedSigIndex uint32 CryptoPolicy *CertStrongSignPara } 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 ) const ( EVENT_MODIFY_STATE = 0x0002 EVENT_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3 MUTANT_QUERY_STATE = 0x0001 MUTANT_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | MUTANT_QUERY_STATE SEMAPHORE_MODIFY_STATE = 0x0002 SEMAPHORE_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3 TIMER_QUERY_STATE = 0x0001 TIMER_MODIFY_STATE = 0x0002 TIMER_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | TIMER_QUERY_STATE | TIMER_MODIFY_STATE MUTEX_MODIFY_STATE = MUTANT_QUERY_STATE MUTEX_ALL_ACCESS = MUTANT_ALL_ACCESS CREATE_EVENT_MANUAL_RESET = 0x1 CREATE_EVENT_INITIAL_SET = 0x2 CREATE_MUTEX_INITIAL_OWNER = 0x1 ) 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}, } var WSAID_WSASENDMSG = GUID{ 0xa441e712, 0x754f, 0x43ca, [8]byte{0x84, 0xa7, 0x0d, 0xee, 0x44, 0xcf, 0x60, 0x6d}, } var WSAID_WSARECVMSG = GUID{ 0xf689d7c8, 0x6f1f, 0x436b, [8]byte{0x8a, 0x53, 0xe5, 0x4f, 0xe3, 0x51, 0xc3, 0x22}, } 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_CREATE_OR_GET_OBJECT_ID = 0x0900C0 FSCTL_DELETE_OBJECT_ID = 0x0900A0 FSCTL_DELETE_REPARSE_POINT = 0x0900AC FSCTL_DUPLICATE_EXTENTS_TO_FILE = 0x098344 FSCTL_DUPLICATE_EXTENTS_TO_FILE_EX = 0x0983E8 FSCTL_FILESYSTEM_GET_STATISTICS = 0x090060 FSCTL_FILE_LEVEL_TRIM = 0x098208 FSCTL_FIND_FILES_BY_SID = 0x09008F FSCTL_GET_COMPRESSION = 0x09003C FSCTL_GET_INTEGRITY_INFORMATION = 0x09027C FSCTL_GET_NTFS_VOLUME_DATA = 0x090064 FSCTL_GET_REFS_VOLUME_DATA = 0x0902D8 FSCTL_GET_OBJECT_ID = 0x09009C FSCTL_GET_REPARSE_POINT = 0x0900A8 FSCTL_GET_RETRIEVAL_POINTER_COUNT = 0x09042B FSCTL_GET_RETRIEVAL_POINTERS = 0x090073 FSCTL_GET_RETRIEVAL_POINTERS_AND_REFCOUNT = 0x0903D3 FSCTL_IS_PATHNAME_VALID = 0x09002C FSCTL_LMR_SET_LINK_TRACKING_INFORMATION = 0x1400EC FSCTL_MARK_HANDLE = 0x0900FC FSCTL_OFFLOAD_READ = 0x094264 FSCTL_OFFLOAD_WRITE = 0x098268 FSCTL_PIPE_PEEK = 0x11400C FSCTL_PIPE_TRANSCEIVE = 0x11C017 FSCTL_PIPE_WAIT = 0x110018 FSCTL_QUERY_ALLOCATED_RANGES = 0x0940CF FSCTL_QUERY_FAT_BPB = 0x090058 FSCTL_QUERY_FILE_REGIONS = 0x090284 FSCTL_QUERY_ON_DISK_VOLUME_INFO = 0x09013C FSCTL_QUERY_SPARING_INFO = 0x090138 FSCTL_READ_FILE_USN_DATA = 0x0900EB FSCTL_RECALL_FILE = 0x090117 FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT = 0x090440 FSCTL_SET_COMPRESSION = 0x09C040 FSCTL_SET_DEFECT_MANAGEMENT = 0x098134 FSCTL_SET_ENCRYPTION = 0x0900D7 FSCTL_SET_INTEGRITY_INFORMATION = 0x09C280 FSCTL_SET_INTEGRITY_INFORMATION_EX = 0x090380 FSCTL_SET_OBJECT_ID = 0x090098 FSCTL_SET_OBJECT_ID_EXTENDED = 0x0900BC FSCTL_SET_REPARSE_POINT = 0x0900A4 FSCTL_SET_SPARSE = 0x0900C4 FSCTL_SET_ZERO_DATA = 0x0980C8 FSCTL_SET_ZERO_ON_DEALLOCATION = 0x090194 FSCTL_SIS_COPYFILE = 0x090100 FSCTL_WRITE_USN_CLOSE_RECORD = 0x0900EF 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 ) // For MessageBox() const ( MB_OK = 0x00000000 MB_OKCANCEL = 0x00000001 MB_ABORTRETRYIGNORE = 0x00000002 MB_YESNOCANCEL = 0x00000003 MB_YESNO = 0x00000004 MB_RETRYCANCEL = 0x00000005 MB_CANCELTRYCONTINUE = 0x00000006 MB_ICONHAND = 0x00000010 MB_ICONQUESTION = 0x00000020 MB_ICONEXCLAMATION = 0x00000030 MB_ICONASTERISK = 0x00000040 MB_USERICON = 0x00000080 MB_ICONWARNING = MB_ICONEXCLAMATION MB_ICONERROR = MB_ICONHAND MB_ICONINFORMATION = MB_ICONASTERISK MB_ICONSTOP = MB_ICONHAND MB_DEFBUTTON1 = 0x00000000 MB_DEFBUTTON2 = 0x00000100 MB_DEFBUTTON3 = 0x00000200 MB_DEFBUTTON4 = 0x00000300 MB_APPLMODAL = 0x00000000 MB_SYSTEMMODAL = 0x00001000 MB_TASKMODAL = 0x00002000 MB_HELP = 0x00004000 MB_NOFOCUS = 0x00008000 MB_SETFOREGROUND = 0x00010000 MB_DEFAULT_DESKTOP_ONLY = 0x00020000 MB_TOPMOST = 0x00040000 MB_RIGHT = 0x00080000 MB_RTLREADING = 0x00100000 MB_SERVICE_NOTIFICATION = 0x00200000 ) const ( MOVEFILE_REPLACE_EXISTING = 0x1 MOVEFILE_COPY_ALLOWED = 0x2 MOVEFILE_DELAY_UNTIL_REBOOT = 0x4 MOVEFILE_WRITE_THROUGH = 0x8 MOVEFILE_CREATE_HARDLINK = 0x10 MOVEFILE_FAIL_IF_NOT_TRACKABLE = 0x20 ) // Flags for GetAdaptersAddresses, see // https://learn.microsoft.com/en-us/windows/win32/api/iphlpapi/nf-iphlpapi-getadaptersaddresses. const ( GAA_FLAG_SKIP_UNICAST = 0x1 GAA_FLAG_SKIP_ANYCAST = 0x2 GAA_FLAG_SKIP_MULTICAST = 0x4 GAA_FLAG_SKIP_DNS_SERVER = 0x8 GAA_FLAG_INCLUDE_PREFIX = 0x10 GAA_FLAG_SKIP_FRIENDLY_NAME = 0x20 GAA_FLAG_INCLUDE_WINS_INFO = 0x40 GAA_FLAG_INCLUDE_GATEWAYS = 0x80 GAA_FLAG_INCLUDE_ALL_INTERFACES = 0x100 GAA_FLAG_INCLUDE_ALL_COMPARTMENTS = 0x200 GAA_FLAG_INCLUDE_TUNNEL_BINDINGORDER = 0x400 ) const ( IF_TYPE_OTHER = 1 IF_TYPE_ETHERNET_CSMACD = 6 IF_TYPE_ISO88025_TOKENRING = 9 IF_TYPE_PPP = 23 IF_TYPE_SOFTWARE_LOOPBACK = 24 IF_TYPE_ATM = 37 IF_TYPE_IEEE80211 = 71 IF_TYPE_TUNNEL = 131 IF_TYPE_IEEE1394 = 144 ) // Enum NL_PREFIX_ORIGIN for [IpAdapterUnicastAddress], see // https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_prefix_origin const ( IpPrefixOriginOther = 0 IpPrefixOriginManual = 1 IpPrefixOriginWellKnown = 2 IpPrefixOriginDhcp = 3 IpPrefixOriginRouterAdvertisement = 4 IpPrefixOriginUnchanged = 1 << 4 ) // Enum NL_SUFFIX_ORIGIN for [IpAdapterUnicastAddress], see // https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_suffix_origin const ( NlsoOther = 0 NlsoManual = 1 NlsoWellKnown = 2 NlsoDhcp = 3 NlsoLinkLayerAddress = 4 NlsoRandom = 5 IpSuffixOriginOther = 0 IpSuffixOriginManual = 1 IpSuffixOriginWellKnown = 2 IpSuffixOriginDhcp = 3 IpSuffixOriginLinkLayerAddress = 4 IpSuffixOriginRandom = 5 IpSuffixOriginUnchanged = 1 << 4 ) // Enum NL_DAD_STATE for [IpAdapterUnicastAddress], see // https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_dad_state const ( NldsInvalid = 0 NldsTentative = 1 NldsDuplicate = 2 NldsDeprecated = 3 NldsPreferred = 4 IpDadStateInvalid = 0 IpDadStateTentative = 1 IpDadStateDuplicate = 2 IpDadStateDeprecated = 3 IpDadStatePreferred = 4 ) type SocketAddress struct { Sockaddr *syscall.RawSockaddrAny SockaddrLength int32 } // IP returns an IPv4 or IPv6 address, or nil if the underlying SocketAddress is neither. func (addr *SocketAddress) IP() net.IP { if uintptr(addr.SockaddrLength) >= unsafe.Sizeof(RawSockaddrInet4{}) && addr.Sockaddr.Addr.Family == AF_INET { return (*RawSockaddrInet4)(unsafe.Pointer(addr.Sockaddr)).Addr[:] } else if uintptr(addr.SockaddrLength) >= unsafe.Sizeof(RawSockaddrInet6{}) && addr.Sockaddr.Addr.Family == AF_INET6 { return (*RawSockaddrInet6)(unsafe.Pointer(addr.Sockaddr)).Addr[:] } return nil } type IpAdapterUnicastAddress struct { Length uint32 Flags uint32 Next *IpAdapterUnicastAddress Address SocketAddress PrefixOrigin int32 SuffixOrigin int32 DadState int32 ValidLifetime uint32 PreferredLifetime uint32 LeaseLifetime uint32 OnLinkPrefixLength uint8 } type IpAdapterAnycastAddress struct { Length uint32 Flags uint32 Next *IpAdapterAnycastAddress Address SocketAddress } type IpAdapterMulticastAddress struct { Length uint32 Flags uint32 Next *IpAdapterMulticastAddress Address SocketAddress } type IpAdapterDnsServerAdapter struct { Length uint32 Reserved uint32 Next *IpAdapterDnsServerAdapter Address SocketAddress } type IpAdapterPrefix struct { Length uint32 Flags uint32 Next *IpAdapterPrefix Address SocketAddress PrefixLength uint32 } type IpAdapterAddresses struct { Length uint32 IfIndex uint32 Next *IpAdapterAddresses AdapterName *byte FirstUnicastAddress *IpAdapterUnicastAddress FirstAnycastAddress *IpAdapterAnycastAddress FirstMulticastAddress *IpAdapterMulticastAddress FirstDnsServerAddress *IpAdapterDnsServerAdapter DnsSuffix *uint16 Description *uint16 FriendlyName *uint16 PhysicalAddress [syscall.MAX_ADAPTER_ADDRESS_LENGTH]byte PhysicalAddressLength uint32 Flags uint32 Mtu uint32 IfType uint32 OperStatus uint32 Ipv6IfIndex uint32 ZoneIndices [16]uint32 FirstPrefix *IpAdapterPrefix TransmitLinkSpeed uint64 ReceiveLinkSpeed uint64 FirstWinsServerAddress *IpAdapterWinsServerAddress FirstGatewayAddress *IpAdapterGatewayAddress Ipv4Metric uint32 Ipv6Metric uint32 Luid uint64 Dhcpv4Server SocketAddress CompartmentId uint32 NetworkGuid GUID ConnectionType uint32 TunnelType uint32 Dhcpv6Server SocketAddress Dhcpv6ClientDuid [MAX_DHCPV6_DUID_LENGTH]byte Dhcpv6ClientDuidLength uint32 Dhcpv6Iaid uint32 FirstDnsSuffix *IpAdapterDNSSuffix } type IpAdapterWinsServerAddress struct { Length uint32 Reserved uint32 Next *IpAdapterWinsServerAddress Address SocketAddress } type IpAdapterGatewayAddress struct { Length uint32 Reserved uint32 Next *IpAdapterGatewayAddress Address SocketAddress } type IpAdapterDNSSuffix struct { Next *IpAdapterDNSSuffix String [MAX_DNS_SUFFIX_STRING_LENGTH]uint16 } const ( IfOperStatusUp = 1 IfOperStatusDown = 2 IfOperStatusTesting = 3 IfOperStatusUnknown = 4 IfOperStatusDormant = 5 IfOperStatusNotPresent = 6 IfOperStatusLowerLayerDown = 7 ) // Console related constants used for the mode parameter to SetConsoleMode. See // https://docs.microsoft.com/en-us/windows/console/setconsolemode for details. const ( ENABLE_PROCESSED_INPUT = 0x1 ENABLE_LINE_INPUT = 0x2 ENABLE_ECHO_INPUT = 0x4 ENABLE_WINDOW_INPUT = 0x8 ENABLE_MOUSE_INPUT = 0x10 ENABLE_INSERT_MODE = 0x20 ENABLE_QUICK_EDIT_MODE = 0x40 ENABLE_EXTENDED_FLAGS = 0x80 ENABLE_AUTO_POSITION = 0x100 ENABLE_VIRTUAL_TERMINAL_INPUT = 0x200 ENABLE_PROCESSED_OUTPUT = 0x1 ENABLE_WRAP_AT_EOL_OUTPUT = 0x2 ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x4 DISABLE_NEWLINE_AUTO_RETURN = 0x8 ENABLE_LVB_GRID_WORLDWIDE = 0x10 ) // Pseudo console related constants used for the flags parameter to // CreatePseudoConsole. See: https://learn.microsoft.com/en-us/windows/console/createpseudoconsole const ( PSEUDOCONSOLE_INHERIT_CURSOR = 0x1 ) type Coord struct { X int16 Y int16 } type SmallRect struct { Left int16 Top int16 Right int16 Bottom int16 } // Used with GetConsoleScreenBuffer to retrieve information about a console // screen buffer. See // https://docs.microsoft.com/en-us/windows/console/console-screen-buffer-info-str // for details. type ConsoleScreenBufferInfo struct { Size Coord CursorPosition Coord Attributes uint16 Window SmallRect MaximumWindowSize Coord } const UNIX_PATH_MAX = 108 // defined in afunix.h const ( // flags for JOBOBJECT_BASIC_LIMIT_INFORMATION.LimitFlags JOB_OBJECT_LIMIT_ACTIVE_PROCESS = 0x00000008 JOB_OBJECT_LIMIT_AFFINITY = 0x00000010 JOB_OBJECT_LIMIT_BREAKAWAY_OK = 0x00000800 JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION = 0x00000400 JOB_OBJECT_LIMIT_JOB_MEMORY = 0x00000200 JOB_OBJECT_LIMIT_JOB_TIME = 0x00000004 JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE = 0x00002000 JOB_OBJECT_LIMIT_PRESERVE_JOB_TIME = 0x00000040 JOB_OBJECT_LIMIT_PRIORITY_CLASS = 0x00000020 JOB_OBJECT_LIMIT_PROCESS_MEMORY = 0x00000100 JOB_OBJECT_LIMIT_PROCESS_TIME = 0x00000002 JOB_OBJECT_LIMIT_SCHEDULING_CLASS = 0x00000080 JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK = 0x00001000 JOB_OBJECT_LIMIT_SUBSET_AFFINITY = 0x00004000 JOB_OBJECT_LIMIT_WORKINGSET = 0x00000001 ) type IO_COUNTERS struct { ReadOperationCount uint64 WriteOperationCount uint64 OtherOperationCount uint64 ReadTransferCount uint64 WriteTransferCount uint64 OtherTransferCount uint64 } type JOBOBJECT_EXTENDED_LIMIT_INFORMATION struct { BasicLimitInformation JOBOBJECT_BASIC_LIMIT_INFORMATION IoInfo IO_COUNTERS ProcessMemoryLimit uintptr JobMemoryLimit uintptr PeakProcessMemoryUsed uintptr PeakJobMemoryUsed uintptr } const ( // UIRestrictionsClass JOB_OBJECT_UILIMIT_DESKTOP = 0x00000040 JOB_OBJECT_UILIMIT_DISPLAYSETTINGS = 0x00000010 JOB_OBJECT_UILIMIT_EXITWINDOWS = 0x00000080 JOB_OBJECT_UILIMIT_GLOBALATOMS = 0x00000020 JOB_OBJECT_UILIMIT_HANDLES = 0x00000001 JOB_OBJECT_UILIMIT_READCLIPBOARD = 0x00000002 JOB_OBJECT_UILIMIT_SYSTEMPARAMETERS = 0x00000008 JOB_OBJECT_UILIMIT_WRITECLIPBOARD = 0x00000004 ) type JOBOBJECT_BASIC_UI_RESTRICTIONS struct { UIRestrictionsClass uint32 } const ( // JobObjectInformationClass for QueryInformationJobObject and SetInformationJobObject JobObjectAssociateCompletionPortInformation = 7 JobObjectBasicAccountingInformation = 1 JobObjectBasicAndIoAccountingInformation = 8 JobObjectBasicLimitInformation = 2 JobObjectBasicProcessIdList = 3 JobObjectBasicUIRestrictions = 4 JobObjectCpuRateControlInformation = 15 JobObjectEndOfJobTimeInformation = 6 JobObjectExtendedLimitInformation = 9 JobObjectGroupInformation = 11 JobObjectGroupInformationEx = 14 JobObjectLimitViolationInformation = 13 JobObjectLimitViolationInformation2 = 34 JobObjectNetRateControlInformation = 32 JobObjectNotificationLimitInformation = 12 JobObjectNotificationLimitInformation2 = 33 JobObjectSecurityLimitInformation = 5 ) const ( KF_FLAG_DEFAULT = 0x00000000 KF_FLAG_FORCE_APP_DATA_REDIRECTION = 0x00080000 KF_FLAG_RETURN_FILTER_REDIRECTION_TARGET = 0x00040000 KF_FLAG_FORCE_PACKAGE_REDIRECTION = 0x00020000 KF_FLAG_NO_PACKAGE_REDIRECTION = 0x00010000 KF_FLAG_FORCE_APPCONTAINER_REDIRECTION = 0x00020000 KF_FLAG_NO_APPCONTAINER_REDIRECTION = 0x00010000 KF_FLAG_CREATE = 0x00008000 KF_FLAG_DONT_VERIFY = 0x00004000 KF_FLAG_DONT_UNEXPAND = 0x00002000 KF_FLAG_NO_ALIAS = 0x00001000 KF_FLAG_INIT = 0x00000800 KF_FLAG_DEFAULT_PATH = 0x00000400 KF_FLAG_NOT_PARENT_RELATIVE = 0x00000200 KF_FLAG_SIMPLE_IDLIST = 0x00000100 KF_FLAG_ALIAS_ONLY = 0x80000000 ) type OsVersionInfoEx struct { osVersionInfoSize uint32 MajorVersion uint32 MinorVersion uint32 BuildNumber uint32 PlatformId uint32 CsdVersion [128]uint16 ServicePackMajor uint16 ServicePackMinor uint16 SuiteMask uint16 ProductType byte _ byte } const ( EWX_LOGOFF = 0x00000000 EWX_SHUTDOWN = 0x00000001 EWX_REBOOT = 0x00000002 EWX_FORCE = 0x00000004 EWX_POWEROFF = 0x00000008 EWX_FORCEIFHUNG = 0x00000010 EWX_QUICKRESOLVE = 0x00000020 EWX_RESTARTAPPS = 0x00000040 EWX_HYBRID_SHUTDOWN = 0x00400000 EWX_BOOTOPTIONS = 0x01000000 SHTDN_REASON_FLAG_COMMENT_REQUIRED = 0x01000000 SHTDN_REASON_FLAG_DIRTY_PROBLEM_ID_REQUIRED = 0x02000000 SHTDN_REASON_FLAG_CLEAN_UI = 0x04000000 SHTDN_REASON_FLAG_DIRTY_UI = 0x08000000 SHTDN_REASON_FLAG_USER_DEFINED = 0x40000000 SHTDN_REASON_FLAG_PLANNED = 0x80000000 SHTDN_REASON_MAJOR_OTHER = 0x00000000 SHTDN_REASON_MAJOR_NONE = 0x00000000 SHTDN_REASON_MAJOR_HARDWARE = 0x00010000 SHTDN_REASON_MAJOR_OPERATINGSYSTEM = 0x00020000 SHTDN_REASON_MAJOR_SOFTWARE = 0x00030000 SHTDN_REASON_MAJOR_APPLICATION = 0x00040000 SHTDN_REASON_MAJOR_SYSTEM = 0x00050000 SHTDN_REASON_MAJOR_POWER = 0x00060000 SHTDN_REASON_MAJOR_LEGACY_API = 0x00070000 SHTDN_REASON_MINOR_OTHER = 0x00000000 SHTDN_REASON_MINOR_NONE = 0x000000ff SHTDN_REASON_MINOR_MAINTENANCE = 0x00000001 SHTDN_REASON_MINOR_INSTALLATION = 0x00000002 SHTDN_REASON_MINOR_UPGRADE = 0x00000003 SHTDN_REASON_MINOR_RECONFIG = 0x00000004 SHTDN_REASON_MINOR_HUNG = 0x00000005 SHTDN_REASON_MINOR_UNSTABLE = 0x00000006 SHTDN_REASON_MINOR_DISK = 0x00000007 SHTDN_REASON_MINOR_PROCESSOR = 0x00000008 SHTDN_REASON_MINOR_NETWORKCARD = 0x00000009 SHTDN_REASON_MINOR_POWER_SUPPLY = 0x0000000a SHTDN_REASON_MINOR_CORDUNPLUGGED = 0x0000000b SHTDN_REASON_MINOR_ENVIRONMENT = 0x0000000c SHTDN_REASON_MINOR_HARDWARE_DRIVER = 0x0000000d SHTDN_REASON_MINOR_OTHERDRIVER = 0x0000000e SHTDN_REASON_MINOR_BLUESCREEN = 0x0000000F SHTDN_REASON_MINOR_SERVICEPACK = 0x00000010 SHTDN_REASON_MINOR_HOTFIX = 0x00000011 SHTDN_REASON_MINOR_SECURITYFIX = 0x00000012 SHTDN_REASON_MINOR_SECURITY = 0x00000013 SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY = 0x00000014 SHTDN_REASON_MINOR_WMI = 0x00000015 SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL = 0x00000016 SHTDN_REASON_MINOR_HOTFIX_UNINSTALL = 0x00000017 SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL = 0x00000018 SHTDN_REASON_MINOR_MMC = 0x00000019 SHTDN_REASON_MINOR_SYSTEMRESTORE = 0x0000001a SHTDN_REASON_MINOR_TERMSRV = 0x00000020 SHTDN_REASON_MINOR_DC_PROMOTION = 0x00000021 SHTDN_REASON_MINOR_DC_DEMOTION = 0x00000022 SHTDN_REASON_UNKNOWN = SHTDN_REASON_MINOR_NONE SHTDN_REASON_LEGACY_API = SHTDN_REASON_MAJOR_LEGACY_API | SHTDN_REASON_FLAG_PLANNED SHTDN_REASON_VALID_BIT_MASK = 0xc0ffffff SHUTDOWN_NORETRY = 0x1 ) // Flags used for GetModuleHandleEx const ( GET_MODULE_HANDLE_EX_FLAG_PIN = 1 GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT = 2 GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS = 4 ) // MUI function flag values const ( MUI_LANGUAGE_ID = 0x4 MUI_LANGUAGE_NAME = 0x8 MUI_MERGE_SYSTEM_FALLBACK = 0x10 MUI_MERGE_USER_FALLBACK = 0x20 MUI_UI_FALLBACK = MUI_MERGE_SYSTEM_FALLBACK | MUI_MERGE_USER_FALLBACK MUI_THREAD_LANGUAGES = 0x40 MUI_CONSOLE_FILTER = 0x100 MUI_COMPLEX_SCRIPT_FILTER = 0x200 MUI_RESET_FILTERS = 0x001 MUI_USER_PREFERRED_UI_LANGUAGES = 0x10 MUI_USE_INSTALLED_LANGUAGES = 0x20 MUI_USE_SEARCH_ALL_LANGUAGES = 0x40 MUI_LANG_NEUTRAL_PE_FILE = 0x100 MUI_NON_LANG_NEUTRAL_FILE = 0x200 MUI_MACHINE_LANGUAGE_SETTINGS = 0x400 MUI_FILETYPE_NOT_LANGUAGE_NEUTRAL = 0x001 MUI_FILETYPE_LANGUAGE_NEUTRAL_MAIN = 0x002 MUI_FILETYPE_LANGUAGE_NEUTRAL_MUI = 0x004 MUI_QUERY_TYPE = 0x001 MUI_QUERY_CHECKSUM = 0x002 MUI_QUERY_LANGUAGE_NAME = 0x004 MUI_QUERY_RESOURCE_TYPES = 0x008 MUI_FILEINFO_VERSION = 0x001 MUI_FULL_LANGUAGE = 0x01 MUI_PARTIAL_LANGUAGE = 0x02 MUI_LIP_LANGUAGE = 0x04 MUI_LANGUAGE_INSTALLED = 0x20 MUI_LANGUAGE_LICENSED = 0x40 ) // FILE_INFO_BY_HANDLE_CLASS constants for SetFileInformationByHandle/GetFileInformationByHandleEx const ( FileBasicInfo = 0 FileStandardInfo = 1 FileNameInfo = 2 FileRenameInfo = 3 FileDispositionInfo = 4 FileAllocationInfo = 5 FileEndOfFileInfo = 6 FileStreamInfo = 7 FileCompressionInfo = 8 FileAttributeTagInfo = 9 FileIdBothDirectoryInfo = 10 FileIdBothDirectoryRestartInfo = 11 FileIoPriorityHintInfo = 12 FileRemoteProtocolInfo = 13 FileFullDirectoryInfo = 14 FileFullDirectoryRestartInfo = 15 FileStorageInfo = 16 FileAlignmentInfo = 17 FileIdInfo = 18 FileIdExtdDirectoryInfo = 19 FileIdExtdDirectoryRestartInfo = 20 FileDispositionInfoEx = 21 FileRenameInfoEx = 22 FileCaseSensitiveInfo = 23 FileNormalizedNameInfo = 24 ) // LoadLibrary flags for determining from where to search for a DLL const ( DONT_RESOLVE_DLL_REFERENCES = 0x1 LOAD_LIBRARY_AS_DATAFILE = 0x2 LOAD_WITH_ALTERED_SEARCH_PATH = 0x8 LOAD_IGNORE_CODE_AUTHZ_LEVEL = 0x10 LOAD_LIBRARY_AS_IMAGE_RESOURCE = 0x20 LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE = 0x40 LOAD_LIBRARY_REQUIRE_SIGNED_TARGET = 0x80 LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR = 0x100 LOAD_LIBRARY_SEARCH_APPLICATION_DIR = 0x200 LOAD_LIBRARY_SEARCH_USER_DIRS = 0x400 LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x800 LOAD_LIBRARY_SEARCH_DEFAULT_DIRS = 0x1000 LOAD_LIBRARY_SAFE_CURRENT_DIRS = 0x00002000 LOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER = 0x00004000 LOAD_LIBRARY_OS_INTEGRITY_CONTINUITY = 0x00008000 ) // RegNotifyChangeKeyValue notifyFilter flags. const ( // REG_NOTIFY_CHANGE_NAME notifies the caller if a subkey is added or deleted. REG_NOTIFY_CHANGE_NAME = 0x00000001 // REG_NOTIFY_CHANGE_ATTRIBUTES notifies the caller of changes to the attributes of the key, such as the security descriptor information. REG_NOTIFY_CHANGE_ATTRIBUTES = 0x00000002 // REG_NOTIFY_CHANGE_LAST_SET notifies the caller of changes to a value of the key. This can include adding or deleting a value, or changing an existing value. REG_NOTIFY_CHANGE_LAST_SET = 0x00000004 // REG_NOTIFY_CHANGE_SECURITY notifies the caller of changes to the security descriptor of the key. REG_NOTIFY_CHANGE_SECURITY = 0x00000008 // REG_NOTIFY_THREAD_AGNOSTIC indicates that the lifetime of the registration must not be tied to the lifetime of the thread issuing the RegNotifyChangeKeyValue call. Note: This flag value is only supported in Windows 8 and later. REG_NOTIFY_THREAD_AGNOSTIC = 0x10000000 ) type CommTimeouts struct { ReadIntervalTimeout uint32 ReadTotalTimeoutMultiplier uint32 ReadTotalTimeoutConstant uint32 WriteTotalTimeoutMultiplier uint32 WriteTotalTimeoutConstant uint32 } // NTUnicodeString is a UTF-16 string for NT native APIs, corresponding to UNICODE_STRING. type NTUnicodeString struct { Length uint16 MaximumLength uint16 Buffer *uint16 } // NTString is an ANSI string for NT native APIs, corresponding to STRING. type NTString struct { Length uint16 MaximumLength uint16 Buffer *byte } type LIST_ENTRY struct { Flink *LIST_ENTRY Blink *LIST_ENTRY } type RUNTIME_FUNCTION struct { BeginAddress uint32 EndAddress uint32 UnwindData uint32 } type LDR_DATA_TABLE_ENTRY struct { reserved1 [2]uintptr InMemoryOrderLinks LIST_ENTRY reserved2 [2]uintptr DllBase uintptr reserved3 [2]uintptr FullDllName NTUnicodeString reserved4 [8]byte reserved5 [3]uintptr reserved6 uintptr TimeDateStamp uint32 } type PEB_LDR_DATA struct { reserved1 [8]byte reserved2 [3]uintptr InMemoryOrderModuleList LIST_ENTRY } type CURDIR struct { DosPath NTUnicodeString Handle Handle } type RTL_DRIVE_LETTER_CURDIR struct { Flags uint16 Length uint16 TimeStamp uint32 DosPath NTString } type RTL_USER_PROCESS_PARAMETERS struct { MaximumLength, Length uint32 Flags, DebugFlags uint32 ConsoleHandle Handle ConsoleFlags uint32 StandardInput, StandardOutput, StandardError Handle CurrentDirectory CURDIR DllPath NTUnicodeString ImagePathName NTUnicodeString CommandLine NTUnicodeString Environment unsafe.Pointer StartingX, StartingY, CountX, CountY, CountCharsX, CountCharsY, FillAttribute uint32 WindowFlags, ShowWindowFlags uint32 WindowTitle, DesktopInfo, ShellInfo, RuntimeData NTUnicodeString CurrentDirectories [32]RTL_DRIVE_LETTER_CURDIR EnvironmentSize, EnvironmentVersion uintptr PackageDependencyData unsafe.Pointer ProcessGroupId uint32 LoaderThreads uint32 RedirectionDllName NTUnicodeString HeapPartitionName NTUnicodeString DefaultThreadpoolCpuSetMasks uintptr DefaultThreadpoolCpuSetMaskCount uint32 } type PEB struct { reserved1 [2]byte BeingDebugged byte BitField byte reserved3 uintptr ImageBaseAddress uintptr Ldr *PEB_LDR_DATA ProcessParameters *RTL_USER_PROCESS_PARAMETERS reserved4 [3]uintptr AtlThunkSListPtr uintptr reserved5 uintptr reserved6 uint32 reserved7 uintptr reserved8 uint32 AtlThunkSListPtr32 uint32 reserved9 [45]uintptr reserved10 [96]byte PostProcessInitRoutine uintptr reserved11 [128]byte reserved12 [1]uintptr SessionId uint32 } type OBJECT_ATTRIBUTES struct { Length uint32 RootDirectory Handle ObjectName *NTUnicodeString Attributes uint32 SecurityDescriptor *SECURITY_DESCRIPTOR SecurityQoS *SECURITY_QUALITY_OF_SERVICE } // Values for the Attributes member of OBJECT_ATTRIBUTES. const ( OBJ_INHERIT = 0x00000002 OBJ_PERMANENT = 0x00000010 OBJ_EXCLUSIVE = 0x00000020 OBJ_CASE_INSENSITIVE = 0x00000040 OBJ_OPENIF = 0x00000080 OBJ_OPENLINK = 0x00000100 OBJ_KERNEL_HANDLE = 0x00000200 OBJ_FORCE_ACCESS_CHECK = 0x00000400 OBJ_IGNORE_IMPERSONATED_DEVICEMAP = 0x00000800 OBJ_DONT_REPARSE = 0x00001000 OBJ_VALID_ATTRIBUTES = 0x00001FF2 ) type IO_STATUS_BLOCK struct { Status NTStatus Information uintptr } type RTLP_CURDIR_REF struct { RefCount int32 Handle Handle } type RTL_RELATIVE_NAME struct { RelativeName NTUnicodeString ContainingDirectory Handle CurDirRef *RTLP_CURDIR_REF } const ( // CreateDisposition flags for NtCreateFile and NtCreateNamedPipeFile. FILE_SUPERSEDE = 0x00000000 FILE_OPEN = 0x00000001 FILE_CREATE = 0x00000002 FILE_OPEN_IF = 0x00000003 FILE_OVERWRITE = 0x00000004 FILE_OVERWRITE_IF = 0x00000005 FILE_MAXIMUM_DISPOSITION = 0x00000005 // CreateOptions flags for NtCreateFile and NtCreateNamedPipeFile. FILE_DIRECTORY_FILE = 0x00000001 FILE_WRITE_THROUGH = 0x00000002 FILE_SEQUENTIAL_ONLY = 0x00000004 FILE_NO_INTERMEDIATE_BUFFERING = 0x00000008 FILE_SYNCHRONOUS_IO_ALERT = 0x00000010 FILE_SYNCHRONOUS_IO_NONALERT = 0x00000020 FILE_NON_DIRECTORY_FILE = 0x00000040 FILE_CREATE_TREE_CONNECTION = 0x00000080 FILE_COMPLETE_IF_OPLOCKED = 0x00000100 FILE_NO_EA_KNOWLEDGE = 0x00000200 FILE_OPEN_REMOTE_INSTANCE = 0x00000400 FILE_RANDOM_ACCESS = 0x00000800 FILE_DELETE_ON_CLOSE = 0x00001000 FILE_OPEN_BY_FILE_ID = 0x00002000 FILE_OPEN_FOR_BACKUP_INTENT = 0x00004000 FILE_NO_COMPRESSION = 0x00008000 FILE_OPEN_REQUIRING_OPLOCK = 0x00010000 FILE_DISALLOW_EXCLUSIVE = 0x00020000 FILE_RESERVE_OPFILTER = 0x00100000 FILE_OPEN_REPARSE_POINT = 0x00200000 FILE_OPEN_NO_RECALL = 0x00400000 FILE_OPEN_FOR_FREE_SPACE_QUERY = 0x00800000 // Parameter constants for NtCreateNamedPipeFile. FILE_PIPE_BYTE_STREAM_TYPE = 0x00000000 FILE_PIPE_MESSAGE_TYPE = 0x00000001 FILE_PIPE_ACCEPT_REMOTE_CLIENTS = 0x00000000 FILE_PIPE_REJECT_REMOTE_CLIENTS = 0x00000002 FILE_PIPE_TYPE_VALID_MASK = 0x00000003 FILE_PIPE_BYTE_STREAM_MODE = 0x00000000 FILE_PIPE_MESSAGE_MODE = 0x00000001 FILE_PIPE_QUEUE_OPERATION = 0x00000000 FILE_PIPE_COMPLETE_OPERATION = 0x00000001 FILE_PIPE_INBOUND = 0x00000000 FILE_PIPE_OUTBOUND = 0x00000001 FILE_PIPE_FULL_DUPLEX = 0x00000002 FILE_PIPE_DISCONNECTED_STATE = 0x00000001 FILE_PIPE_LISTENING_STATE = 0x00000002 FILE_PIPE_CONNECTED_STATE = 0x00000003 FILE_PIPE_CLOSING_STATE = 0x00000004 FILE_PIPE_CLIENT_END = 0x00000000 FILE_PIPE_SERVER_END = 0x00000001 ) const ( // FileInformationClass for NtSetInformationFile FileBasicInformation = 4 FileRenameInformation = 10 FileDispositionInformation = 13 FilePositionInformation = 14 FileEndOfFileInformation = 20 FileValidDataLengthInformation = 39 FileShortNameInformation = 40 FileIoPriorityHintInformation = 43 FileReplaceCompletionInformation = 61 FileDispositionInformationEx = 64 FileCaseSensitiveInformation = 71 FileLinkInformation = 72 FileCaseSensitiveInformationForceAccessCheck = 75 FileKnownFolderInformation = 76 // Flags for FILE_RENAME_INFORMATION FILE_RENAME_REPLACE_IF_EXISTS = 0x00000001 FILE_RENAME_POSIX_SEMANTICS = 0x00000002 FILE_RENAME_SUPPRESS_PIN_STATE_INHERITANCE = 0x00000004 FILE_RENAME_SUPPRESS_STORAGE_RESERVE_INHERITANCE = 0x00000008 FILE_RENAME_NO_INCREASE_AVAILABLE_SPACE = 0x00000010 FILE_RENAME_NO_DECREASE_AVAILABLE_SPACE = 0x00000020 FILE_RENAME_PRESERVE_AVAILABLE_SPACE = 0x00000030 FILE_RENAME_IGNORE_READONLY_ATTRIBUTE = 0x00000040 FILE_RENAME_FORCE_RESIZE_TARGET_SR = 0x00000080 FILE_RENAME_FORCE_RESIZE_SOURCE_SR = 0x00000100 FILE_RENAME_FORCE_RESIZE_SR = 0x00000180 // Flags for FILE_DISPOSITION_INFORMATION_EX FILE_DISPOSITION_DO_NOT_DELETE = 0x00000000 FILE_DISPOSITION_DELETE = 0x00000001 FILE_DISPOSITION_POSIX_SEMANTICS = 0x00000002 FILE_DISPOSITION_FORCE_IMAGE_SECTION_CHECK = 0x00000004 FILE_DISPOSITION_ON_CLOSE = 0x00000008 FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE = 0x00000010 // Flags for FILE_CASE_SENSITIVE_INFORMATION FILE_CS_FLAG_CASE_SENSITIVE_DIR = 0x00000001 // Flags for FILE_LINK_INFORMATION FILE_LINK_REPLACE_IF_EXISTS = 0x00000001 FILE_LINK_POSIX_SEMANTICS = 0x00000002 FILE_LINK_SUPPRESS_STORAGE_RESERVE_INHERITANCE = 0x00000008 FILE_LINK_NO_INCREASE_AVAILABLE_SPACE = 0x00000010 FILE_LINK_NO_DECREASE_AVAILABLE_SPACE = 0x00000020 FILE_LINK_PRESERVE_AVAILABLE_SPACE = 0x00000030 FILE_LINK_IGNORE_READONLY_ATTRIBUTE = 0x00000040 FILE_LINK_FORCE_RESIZE_TARGET_SR = 0x00000080 FILE_LINK_FORCE_RESIZE_SOURCE_SR = 0x00000100 FILE_LINK_FORCE_RESIZE_SR = 0x00000180 ) // ProcessInformationClasses for NtQueryInformationProcess and NtSetInformationProcess. const ( ProcessBasicInformation = iota ProcessQuotaLimits ProcessIoCounters ProcessVmCounters ProcessTimes ProcessBasePriority ProcessRaisePriority ProcessDebugPort ProcessExceptionPort ProcessAccessToken ProcessLdtInformation ProcessLdtSize ProcessDefaultHardErrorMode ProcessIoPortHandlers ProcessPooledUsageAndLimits ProcessWorkingSetWatch ProcessUserModeIOPL ProcessEnableAlignmentFaultFixup ProcessPriorityClass ProcessWx86Information ProcessHandleCount ProcessAffinityMask ProcessPriorityBoost ProcessDeviceMap ProcessSessionInformation ProcessForegroundInformation ProcessWow64Information ProcessImageFileName ProcessLUIDDeviceMapsEnabled ProcessBreakOnTermination ProcessDebugObjectHandle ProcessDebugFlags ProcessHandleTracing ProcessIoPriority ProcessExecuteFlags ProcessTlsInformation ProcessCookie ProcessImageInformation ProcessCycleTime ProcessPagePriority ProcessInstrumentationCallback ProcessThreadStackAllocation ProcessWorkingSetWatchEx ProcessImageFileNameWin32 ProcessImageFileMapping ProcessAffinityUpdateMode ProcessMemoryAllocationMode ProcessGroupInformation ProcessTokenVirtualizationEnabled ProcessConsoleHostProcess ProcessWindowInformation ProcessHandleInformation ProcessMitigationPolicy ProcessDynamicFunctionTableInformation ProcessHandleCheckingMode ProcessKeepAliveCount ProcessRevokeFileHandles ProcessWorkingSetControl ProcessHandleTable ProcessCheckStackExtentsMode ProcessCommandLineInformation ProcessProtectionInformation ProcessMemoryExhaustion ProcessFaultInformation ProcessTelemetryIdInformation ProcessCommitReleaseInformation ProcessDefaultCpuSetsInformation ProcessAllowedCpuSetsInformation ProcessSubsystemProcess ProcessJobMemoryInformation ProcessInPrivate ProcessRaiseUMExceptionOnInvalidHandleClose ProcessIumChallengeResponse ProcessChildProcessInformation ProcessHighGraphicsPriorityInformation ProcessSubsystemInformation ProcessEnergyValues ProcessActivityThrottleState ProcessActivityThrottlePolicy ProcessWin32kSyscallFilterInformation ProcessDisableSystemAllowedCpuSets ProcessWakeInformation ProcessEnergyTrackingState ProcessManageWritesToExecutableMemory ProcessCaptureTrustletLiveDump ProcessTelemetryCoverage ProcessEnclaveInformation ProcessEnableReadWriteVmLogging ProcessUptimeInformation ProcessImageSection ProcessDebugAuthInformation ProcessSystemResourceManagement ProcessSequenceNumber ProcessLoaderDetour ProcessSecurityDomainInformation ProcessCombineSecurityDomainsInformation ProcessEnableLogging ProcessLeapSecondInformation ProcessFiberShadowStackAllocation ProcessFreeFiberShadowStackAllocation ProcessAltSystemCallInformation ProcessDynamicEHContinuationTargets ProcessDynamicEnforcedCetCompatibleRanges ) type PROCESS_BASIC_INFORMATION struct { ExitStatus NTStatus PebBaseAddress *PEB AffinityMask uintptr BasePriority int32 UniqueProcessId uintptr InheritedFromUniqueProcessId uintptr } type SYSTEM_PROCESS_INFORMATION struct { NextEntryOffset uint32 NumberOfThreads uint32 WorkingSetPrivateSize int64 HardFaultCount uint32 NumberOfThreadsHighWatermark uint32 CycleTime uint64 CreateTime int64 UserTime int64 KernelTime int64 ImageName NTUnicodeString BasePriority int32 UniqueProcessID uintptr InheritedFromUniqueProcessID uintptr HandleCount uint32 SessionID uint32 UniqueProcessKey *uint32 PeakVirtualSize uintptr VirtualSize uintptr PageFaultCount uint32 PeakWorkingSetSize uintptr WorkingSetSize uintptr QuotaPeakPagedPoolUsage uintptr QuotaPagedPoolUsage uintptr QuotaPeakNonPagedPoolUsage uintptr QuotaNonPagedPoolUsage uintptr PagefileUsage uintptr PeakPagefileUsage uintptr PrivatePageCount uintptr ReadOperationCount int64 WriteOperationCount int64 OtherOperationCount int64 ReadTransferCount int64 WriteTransferCount int64 OtherTransferCount int64 } // SystemInformationClasses for NtQuerySystemInformation and NtSetSystemInformation const ( SystemBasicInformation = iota SystemProcessorInformation SystemPerformanceInformation SystemTimeOfDayInformation SystemPathInformation SystemProcessInformation SystemCallCountInformation SystemDeviceInformation SystemProcessorPerformanceInformation SystemFlagsInformation SystemCallTimeInformation SystemModuleInformation SystemLocksInformation SystemStackTraceInformation SystemPagedPoolInformation SystemNonPagedPoolInformation SystemHandleInformation SystemObjectInformation SystemPageFileInformation SystemVdmInstemulInformation SystemVdmBopInformation SystemFileCacheInformation SystemPoolTagInformation SystemInterruptInformation SystemDpcBehaviorInformation SystemFullMemoryInformation SystemLoadGdiDriverInformation SystemUnloadGdiDriverInformation SystemTimeAdjustmentInformation SystemSummaryMemoryInformation SystemMirrorMemoryInformation SystemPerformanceTraceInformation systemObsolete0 SystemExceptionInformation SystemCrashDumpStateInformation SystemKernelDebuggerInformation SystemContextSwitchInformation SystemRegistryQuotaInformation SystemExtendServiceTableInformation SystemPrioritySeperation SystemVerifierAddDriverInformation SystemVerifierRemoveDriverInformation SystemProcessorIdleInformation SystemLegacyDriverInformation SystemCurrentTimeZoneInformation SystemLookasideInformation SystemTimeSlipNotification SystemSessionCreate SystemSessionDetach SystemSessionInformation SystemRangeStartInformation SystemVerifierInformation SystemVerifierThunkExtend SystemSessionProcessInformation SystemLoadGdiDriverInSystemSpace SystemNumaProcessorMap SystemPrefetcherInformation SystemExtendedProcessInformation SystemRecommendedSharedDataAlignment SystemComPlusPackage SystemNumaAvailableMemory SystemProcessorPowerInformation SystemEmulationBasicInformation SystemEmulationProcessorInformation SystemExtendedHandleInformation SystemLostDelayedWriteInformation SystemBigPoolInformation SystemSessionPoolTagInformation SystemSessionMappedViewInformation SystemHotpatchInformation SystemObjectSecurityMode SystemWatchdogTimerHandler SystemWatchdogTimerInformation SystemLogicalProcessorInformation SystemWow64SharedInformationObsolete SystemRegisterFirmwareTableInformationHandler SystemFirmwareTableInformation SystemModuleInformationEx SystemVerifierTriageInformation SystemSuperfetchInformation SystemMemoryListInformation SystemFileCacheInformationEx SystemThreadPriorityClientIdInformation SystemProcessorIdleCycleTimeInformation SystemVerifierCancellationInformation SystemProcessorPowerInformationEx SystemRefTraceInformation SystemSpecialPoolInformation SystemProcessIdInformation SystemErrorPortInformation SystemBootEnvironmentInformation SystemHypervisorInformation SystemVerifierInformationEx SystemTimeZoneInformation SystemImageFileExecutionOptionsInformation SystemCoverageInformation SystemPrefetchPatchInformation SystemVerifierFaultsInformation SystemSystemPartitionInformation SystemSystemDiskInformation SystemProcessorPerformanceDistribution SystemNumaProximityNodeInformation SystemDynamicTimeZoneInformation SystemCodeIntegrityInformation SystemProcessorMicrocodeUpdateInformation SystemProcessorBrandString SystemVirtualAddressInformation SystemLogicalProcessorAndGroupInformation SystemProcessorCycleTimeInformation SystemStoreInformation SystemRegistryAppendString SystemAitSamplingValue SystemVhdBootInformation SystemCpuQuotaInformation SystemNativeBasicInformation systemSpare1 SystemLowPriorityIoInformation SystemTpmBootEntropyInformation SystemVerifierCountersInformation SystemPagedPoolInformationEx SystemSystemPtesInformationEx SystemNodeDistanceInformation SystemAcpiAuditInformation SystemBasicPerformanceInformation SystemQueryPerformanceCounterInformation SystemSessionBigPoolInformation SystemBootGraphicsInformation SystemScrubPhysicalMemoryInformation SystemBadPageInformation SystemProcessorProfileControlArea SystemCombinePhysicalMemoryInformation SystemEntropyInterruptTimingCallback SystemConsoleInformation SystemPlatformBinaryInformation SystemThrottleNotificationInformation SystemHypervisorProcessorCountInformation SystemDeviceDataInformation SystemDeviceDataEnumerationInformation SystemMemoryTopologyInformation SystemMemoryChannelInformation SystemBootLogoInformation SystemProcessorPerformanceInformationEx systemSpare0 SystemSecureBootPolicyInformation SystemPageFileInformationEx SystemSecureBootInformation SystemEntropyInterruptTimingRawInformation SystemPortableWorkspaceEfiLauncherInformation SystemFullProcessInformation SystemKernelDebuggerInformationEx SystemBootMetadataInformation SystemSoftRebootInformation SystemElamCertificateInformation SystemOfflineDumpConfigInformation SystemProcessorFeaturesInformation SystemRegistryReconciliationInformation SystemEdidInformation SystemManufacturingInformation SystemEnergyEstimationConfigInformation SystemHypervisorDetailInformation SystemProcessorCycleStatsInformation SystemVmGenerationCountInformation SystemTrustedPlatformModuleInformation SystemKernelDebuggerFlags SystemCodeIntegrityPolicyInformation SystemIsolatedUserModeInformation SystemHardwareSecurityTestInterfaceResultsInformation SystemSingleModuleInformation SystemAllowedCpuSetsInformation SystemDmaProtectionInformation SystemInterruptCpuSetsInformation SystemSecureBootPolicyFullInformation SystemCodeIntegrityPolicyFullInformation SystemAffinitizedInterruptProcessorInformation SystemRootSiloInformation ) type RTL_PROCESS_MODULE_INFORMATION struct { Section Handle MappedBase uintptr ImageBase uintptr ImageSize uint32 Flags uint32 LoadOrderIndex uint16 InitOrderIndex uint16 LoadCount uint16 OffsetToFileName uint16 FullPathName [256]byte } type RTL_PROCESS_MODULES struct { NumberOfModules uint32 Modules [1]RTL_PROCESS_MODULE_INFORMATION } // Constants for LocalAlloc flags. const ( LMEM_FIXED = 0x0 LMEM_MOVEABLE = 0x2 LMEM_NOCOMPACT = 0x10 LMEM_NODISCARD = 0x20 LMEM_ZEROINIT = 0x40 LMEM_MODIFY = 0x80 LMEM_DISCARDABLE = 0xf00 LMEM_VALID_FLAGS = 0xf72 LMEM_INVALID_HANDLE = 0x8000 LHND = LMEM_MOVEABLE | LMEM_ZEROINIT LPTR = LMEM_FIXED | LMEM_ZEROINIT NONZEROLHND = LMEM_MOVEABLE NONZEROLPTR = LMEM_FIXED ) // Constants for the CreateNamedPipe-family of functions. const ( PIPE_ACCESS_INBOUND = 0x1 PIPE_ACCESS_OUTBOUND = 0x2 PIPE_ACCESS_DUPLEX = 0x3 PIPE_CLIENT_END = 0x0 PIPE_SERVER_END = 0x1 PIPE_WAIT = 0x0 PIPE_NOWAIT = 0x1 PIPE_READMODE_BYTE = 0x0 PIPE_READMODE_MESSAGE = 0x2 PIPE_TYPE_BYTE = 0x0 PIPE_TYPE_MESSAGE = 0x4 PIPE_ACCEPT_REMOTE_CLIENTS = 0x0 PIPE_REJECT_REMOTE_CLIENTS = 0x8 PIPE_UNLIMITED_INSTANCES = 255 ) // Constants for security attributes when opening named pipes. const ( SECURITY_ANONYMOUS = SecurityAnonymous << 16 SECURITY_IDENTIFICATION = SecurityIdentification << 16 SECURITY_IMPERSONATION = SecurityImpersonation << 16 SECURITY_DELEGATION = SecurityDelegation << 16 SECURITY_CONTEXT_TRACKING = 0x40000 SECURITY_EFFECTIVE_ONLY = 0x80000 SECURITY_SQOS_PRESENT = 0x100000 SECURITY_VALID_SQOS_FLAGS = 0x1f0000 ) // ResourceID represents a 16-bit resource identifier, traditionally created with the MAKEINTRESOURCE macro. type ResourceID uint16 // ResourceIDOrString must be either a ResourceID, to specify a resource or resource type by ID, // or a string, to specify a resource or resource type by name. type ResourceIDOrString interface{} // Predefined resource names and types. var ( // Predefined names. CREATEPROCESS_MANIFEST_RESOURCE_ID ResourceID = 1 ISOLATIONAWARE_MANIFEST_RESOURCE_ID ResourceID = 2 ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID ResourceID = 3 ISOLATIONPOLICY_MANIFEST_RESOURCE_ID ResourceID = 4 ISOLATIONPOLICY_BROWSER_MANIFEST_RESOURCE_ID ResourceID = 5 MINIMUM_RESERVED_MANIFEST_RESOURCE_ID ResourceID = 1 // inclusive MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID ResourceID = 16 // inclusive // Predefined types. RT_CURSOR ResourceID = 1 RT_BITMAP ResourceID = 2 RT_ICON ResourceID = 3 RT_MENU ResourceID = 4 RT_DIALOG ResourceID = 5 RT_STRING ResourceID = 6 RT_FONTDIR ResourceID = 7 RT_FONT ResourceID = 8 RT_ACCELERATOR ResourceID = 9 RT_RCDATA ResourceID = 10 RT_MESSAGETABLE ResourceID = 11 RT_GROUP_CURSOR ResourceID = 12 RT_GROUP_ICON ResourceID = 14 RT_VERSION ResourceID = 16 RT_DLGINCLUDE ResourceID = 17 RT_PLUGPLAY ResourceID = 19 RT_VXD ResourceID = 20 RT_ANICURSOR ResourceID = 21 RT_ANIICON ResourceID = 22 RT_HTML ResourceID = 23 RT_MANIFEST ResourceID = 24 ) type VS_FIXEDFILEINFO struct { Signature uint32 StrucVersion uint32 FileVersionMS uint32 FileVersionLS uint32 ProductVersionMS uint32 ProductVersionLS uint32 FileFlagsMask uint32 FileFlags uint32 FileOS uint32 FileType uint32 FileSubtype uint32 FileDateMS uint32 FileDateLS uint32 } type COAUTHIDENTITY struct { User *uint16 UserLength uint32 Domain *uint16 DomainLength uint32 Password *uint16 PasswordLength uint32 Flags uint32 } type COAUTHINFO struct { AuthnSvc uint32 AuthzSvc uint32 ServerPrincName *uint16 AuthnLevel uint32 ImpersonationLevel uint32 AuthIdentityData *COAUTHIDENTITY Capabilities uint32 } type COSERVERINFO struct { Reserved1 uint32 Aame *uint16 AuthInfo *COAUTHINFO Reserved2 uint32 } type BIND_OPTS3 struct { CbStruct uint32 Flags uint32 Mode uint32 TickCountDeadline uint32 TrackFlags uint32 ClassContext uint32 Locale uint32 ServerInfo *COSERVERINFO Hwnd HWND } const ( CLSCTX_INPROC_SERVER = 0x1 CLSCTX_INPROC_HANDLER = 0x2 CLSCTX_LOCAL_SERVER = 0x4 CLSCTX_INPROC_SERVER16 = 0x8 CLSCTX_REMOTE_SERVER = 0x10 CLSCTX_INPROC_HANDLER16 = 0x20 CLSCTX_RESERVED1 = 0x40 CLSCTX_RESERVED2 = 0x80 CLSCTX_RESERVED3 = 0x100 CLSCTX_RESERVED4 = 0x200 CLSCTX_NO_CODE_DOWNLOAD = 0x400 CLSCTX_RESERVED5 = 0x800 CLSCTX_NO_CUSTOM_MARSHAL = 0x1000 CLSCTX_ENABLE_CODE_DOWNLOAD = 0x2000 CLSCTX_NO_FAILURE_LOG = 0x4000 CLSCTX_DISABLE_AAA = 0x8000 CLSCTX_ENABLE_AAA = 0x10000 CLSCTX_FROM_DEFAULT_CONTEXT = 0x20000 CLSCTX_ACTIVATE_32_BIT_SERVER = 0x40000 CLSCTX_ACTIVATE_64_BIT_SERVER = 0x80000 CLSCTX_ENABLE_CLOAKING = 0x100000 CLSCTX_APPCONTAINER = 0x400000 CLSCTX_ACTIVATE_AAA_AS_IU = 0x800000 CLSCTX_PS_DLL = 0x80000000 COINIT_MULTITHREADED = 0x0 COINIT_APARTMENTTHREADED = 0x2 COINIT_DISABLE_OLE1DDE = 0x4 COINIT_SPEED_OVER_MEMORY = 0x8 ) // Flag for QueryFullProcessImageName. const PROCESS_NAME_NATIVE = 1 type ModuleInfo struct { BaseOfDll uintptr SizeOfImage uint32 EntryPoint uintptr } const ALL_PROCESSOR_GROUPS = 0xFFFF type Rect struct { Left int32 Top int32 Right int32 Bottom int32 } type GUIThreadInfo struct { Size uint32 Flags uint32 Active HWND Focus HWND Capture HWND MenuOwner HWND MoveSize HWND CaretHandle HWND CaretRect Rect } const ( DWMWA_NCRENDERING_ENABLED = 1 DWMWA_NCRENDERING_POLICY = 2 DWMWA_TRANSITIONS_FORCEDISABLED = 3 DWMWA_ALLOW_NCPAINT = 4 DWMWA_CAPTION_BUTTON_BOUNDS = 5 DWMWA_NONCLIENT_RTL_LAYOUT = 6 DWMWA_FORCE_ICONIC_REPRESENTATION = 7 DWMWA_FLIP3D_POLICY = 8 DWMWA_EXTENDED_FRAME_BOUNDS = 9 DWMWA_HAS_ICONIC_BITMAP = 10 DWMWA_DISALLOW_PEEK = 11 DWMWA_EXCLUDED_FROM_PEEK = 12 DWMWA_CLOAK = 13 DWMWA_CLOAKED = 14 DWMWA_FREEZE_REPRESENTATION = 15 DWMWA_PASSIVE_UPDATE_MODE = 16 DWMWA_USE_HOSTBACKDROPBRUSH = 17 DWMWA_USE_IMMERSIVE_DARK_MODE = 20 DWMWA_WINDOW_CORNER_PREFERENCE = 33 DWMWA_BORDER_COLOR = 34 DWMWA_CAPTION_COLOR = 35 DWMWA_TEXT_COLOR = 36 DWMWA_VISIBLE_FRAME_BORDER_THICKNESS = 37 ) type WSAQUERYSET struct { Size uint32 ServiceInstanceName *uint16 ServiceClassId *GUID Version *WSAVersion Comment *uint16 NameSpace uint32 NSProviderId *GUID Context *uint16 NumberOfProtocols uint32 AfpProtocols *AFProtocols QueryString *uint16 NumberOfCsAddrs uint32 SaBuffer *CSAddrInfo OutputFlags uint32 Blob *BLOB } type WSAVersion struct { Version uint32 EnumerationOfComparison int32 } type AFProtocols struct { AddressFamily int32 Protocol int32 } type CSAddrInfo struct { LocalAddr SocketAddress RemoteAddr SocketAddress SocketType int32 Protocol int32 } type BLOB struct { Size uint32 BlobData *byte } type ComStat struct { Flags uint32 CBInQue uint32 CBOutQue uint32 } type DCB struct { DCBlength uint32 BaudRate uint32 Flags uint32 wReserved uint16 XonLim uint16 XoffLim uint16 ByteSize uint8 Parity uint8 StopBits uint8 XonChar byte XoffChar byte ErrorChar byte EofChar byte EvtChar byte wReserved1 uint16 } // Keyboard Layout Flags. // See https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-loadkeyboardlayoutw const ( KLF_ACTIVATE = 0x00000001 KLF_SUBSTITUTE_OK = 0x00000002 KLF_REORDER = 0x00000008 KLF_REPLACELANG = 0x00000010 KLF_NOTELLSHELL = 0x00000080 KLF_SETFORPROCESS = 0x00000100 ) ================================================ FILE: vendor/golang.org/x/sys/windows/types_windows_386.go ================================================ // 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 } type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { PerProcessUserTimeLimit int64 PerJobUserTimeLimit int64 LimitFlags uint32 MinimumWorkingSetSize uintptr MaximumWorkingSetSize uintptr ActiveProcessLimit uint32 Affinity uintptr PriorityClass uint32 SchedulingClass uint32 _ uint32 // pad to 8 byte boundary } ================================================ FILE: vendor/golang.org/x/sys/windows/types_windows_amd64.go ================================================ // 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 } type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { PerProcessUserTimeLimit int64 PerJobUserTimeLimit int64 LimitFlags uint32 MinimumWorkingSetSize uintptr MaximumWorkingSetSize uintptr ActiveProcessLimit uint32 Affinity uintptr PriorityClass uint32 SchedulingClass uint32 } ================================================ FILE: vendor/golang.org/x/sys/windows/types_windows_arm.go ================================================ // Copyright 2018 The Go 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 } type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { PerProcessUserTimeLimit int64 PerJobUserTimeLimit int64 LimitFlags uint32 MinimumWorkingSetSize uintptr MaximumWorkingSetSize uintptr ActiveProcessLimit uint32 Affinity uintptr PriorityClass uint32 SchedulingClass uint32 _ uint32 // pad to 8 byte boundary } ================================================ FILE: vendor/golang.org/x/sys/windows/types_windows_arm64.go ================================================ // 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 } type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { PerProcessUserTimeLimit int64 PerJobUserTimeLimit int64 LimitFlags uint32 MinimumWorkingSetSize uintptr MaximumWorkingSetSize uintptr ActiveProcessLimit uint32 Affinity uintptr PriorityClass uint32 SchedulingClass uint32 } ================================================ FILE: vendor/golang.org/x/sys/windows/zerrors_windows.go ================================================ // Code generated by 'mkerrors.bash'; DO NOT EDIT. package windows import "syscall" const ( FACILITY_NULL = 0 FACILITY_RPC = 1 FACILITY_DISPATCH = 2 FACILITY_STORAGE = 3 FACILITY_ITF = 4 FACILITY_WIN32 = 7 FACILITY_WINDOWS = 8 FACILITY_SSPI = 9 FACILITY_SECURITY = 9 FACILITY_CONTROL = 10 FACILITY_CERT = 11 FACILITY_INTERNET = 12 FACILITY_MEDIASERVER = 13 FACILITY_MSMQ = 14 FACILITY_SETUPAPI = 15 FACILITY_SCARD = 16 FACILITY_COMPLUS = 17 FACILITY_AAF = 18 FACILITY_URT = 19 FACILITY_ACS = 20 FACILITY_DPLAY = 21 FACILITY_UMI = 22 FACILITY_SXS = 23 FACILITY_WINDOWS_CE = 24 FACILITY_HTTP = 25 FACILITY_USERMODE_COMMONLOG = 26 FACILITY_WER = 27 FACILITY_USERMODE_FILTER_MANAGER = 31 FACILITY_BACKGROUNDCOPY = 32 FACILITY_CONFIGURATION = 33 FACILITY_WIA = 33 FACILITY_STATE_MANAGEMENT = 34 FACILITY_METADIRECTORY = 35 FACILITY_WINDOWSUPDATE = 36 FACILITY_DIRECTORYSERVICE = 37 FACILITY_GRAPHICS = 38 FACILITY_SHELL = 39 FACILITY_NAP = 39 FACILITY_TPM_SERVICES = 40 FACILITY_TPM_SOFTWARE = 41 FACILITY_UI = 42 FACILITY_XAML = 43 FACILITY_ACTION_QUEUE = 44 FACILITY_PLA = 48 FACILITY_WINDOWS_SETUP = 48 FACILITY_FVE = 49 FACILITY_FWP = 50 FACILITY_WINRM = 51 FACILITY_NDIS = 52 FACILITY_USERMODE_HYPERVISOR = 53 FACILITY_CMI = 54 FACILITY_USERMODE_VIRTUALIZATION = 55 FACILITY_USERMODE_VOLMGR = 56 FACILITY_BCD = 57 FACILITY_USERMODE_VHD = 58 FACILITY_USERMODE_HNS = 59 FACILITY_SDIAG = 60 FACILITY_WEBSERVICES = 61 FACILITY_WINPE = 61 FACILITY_WPN = 62 FACILITY_WINDOWS_STORE = 63 FACILITY_INPUT = 64 FACILITY_EAP = 66 FACILITY_WINDOWS_DEFENDER = 80 FACILITY_OPC = 81 FACILITY_XPS = 82 FACILITY_MBN = 84 FACILITY_POWERSHELL = 84 FACILITY_RAS = 83 FACILITY_P2P_INT = 98 FACILITY_P2P = 99 FACILITY_DAF = 100 FACILITY_BLUETOOTH_ATT = 101 FACILITY_AUDIO = 102 FACILITY_STATEREPOSITORY = 103 FACILITY_VISUALCPP = 109 FACILITY_SCRIPT = 112 FACILITY_PARSE = 113 FACILITY_BLB = 120 FACILITY_BLB_CLI = 121 FACILITY_WSBAPP = 122 FACILITY_BLBUI = 128 FACILITY_USN = 129 FACILITY_USERMODE_VOLSNAP = 130 FACILITY_TIERING = 131 FACILITY_WSB_ONLINE = 133 FACILITY_ONLINE_ID = 134 FACILITY_DEVICE_UPDATE_AGENT = 135 FACILITY_DRVSERVICING = 136 FACILITY_DLS = 153 FACILITY_DELIVERY_OPTIMIZATION = 208 FACILITY_USERMODE_SPACES = 231 FACILITY_USER_MODE_SECURITY_CORE = 232 FACILITY_USERMODE_LICENSING = 234 FACILITY_SOS = 160 FACILITY_DEBUGGERS = 176 FACILITY_SPP = 256 FACILITY_RESTORE = 256 FACILITY_DMSERVER = 256 FACILITY_DEPLOYMENT_SERVICES_SERVER = 257 FACILITY_DEPLOYMENT_SERVICES_IMAGING = 258 FACILITY_DEPLOYMENT_SERVICES_MANAGEMENT = 259 FACILITY_DEPLOYMENT_SERVICES_UTIL = 260 FACILITY_DEPLOYMENT_SERVICES_BINLSVC = 261 FACILITY_DEPLOYMENT_SERVICES_PXE = 263 FACILITY_DEPLOYMENT_SERVICES_TFTP = 264 FACILITY_DEPLOYMENT_SERVICES_TRANSPORT_MANAGEMENT = 272 FACILITY_DEPLOYMENT_SERVICES_DRIVER_PROVISIONING = 278 FACILITY_DEPLOYMENT_SERVICES_MULTICAST_SERVER = 289 FACILITY_DEPLOYMENT_SERVICES_MULTICAST_CLIENT = 290 FACILITY_DEPLOYMENT_SERVICES_CONTENT_PROVIDER = 293 FACILITY_LINGUISTIC_SERVICES = 305 FACILITY_AUDIOSTREAMING = 1094 FACILITY_ACCELERATOR = 1536 FACILITY_WMAAECMA = 1996 FACILITY_DIRECTMUSIC = 2168 FACILITY_DIRECT3D10 = 2169 FACILITY_DXGI = 2170 FACILITY_DXGI_DDI = 2171 FACILITY_DIRECT3D11 = 2172 FACILITY_DIRECT3D11_DEBUG = 2173 FACILITY_DIRECT3D12 = 2174 FACILITY_DIRECT3D12_DEBUG = 2175 FACILITY_LEAP = 2184 FACILITY_AUDCLNT = 2185 FACILITY_WINCODEC_DWRITE_DWM = 2200 FACILITY_WINML = 2192 FACILITY_DIRECT2D = 2201 FACILITY_DEFRAG = 2304 FACILITY_USERMODE_SDBUS = 2305 FACILITY_JSCRIPT = 2306 FACILITY_PIDGENX = 2561 FACILITY_EAS = 85 FACILITY_WEB = 885 FACILITY_WEB_SOCKET = 886 FACILITY_MOBILE = 1793 FACILITY_SQLITE = 1967 FACILITY_UTC = 1989 FACILITY_WEP = 2049 FACILITY_SYNCENGINE = 2050 FACILITY_XBOX = 2339 FACILITY_GAME = 2340 FACILITY_PIX = 2748 ERROR_SUCCESS syscall.Errno = 0 NO_ERROR = 0 SEC_E_OK Handle = 0x00000000 ERROR_INVALID_FUNCTION syscall.Errno = 1 ERROR_FILE_NOT_FOUND syscall.Errno = 2 ERROR_PATH_NOT_FOUND syscall.Errno = 3 ERROR_TOO_MANY_OPEN_FILES syscall.Errno = 4 ERROR_ACCESS_DENIED syscall.Errno = 5 ERROR_INVALID_HANDLE syscall.Errno = 6 ERROR_ARENA_TRASHED syscall.Errno = 7 ERROR_NOT_ENOUGH_MEMORY syscall.Errno = 8 ERROR_INVALID_BLOCK syscall.Errno = 9 ERROR_BAD_ENVIRONMENT syscall.Errno = 10 ERROR_BAD_FORMAT syscall.Errno = 11 ERROR_INVALID_ACCESS syscall.Errno = 12 ERROR_INVALID_DATA syscall.Errno = 13 ERROR_OUTOFMEMORY syscall.Errno = 14 ERROR_INVALID_DRIVE syscall.Errno = 15 ERROR_CURRENT_DIRECTORY syscall.Errno = 16 ERROR_NOT_SAME_DEVICE syscall.Errno = 17 ERROR_NO_MORE_FILES syscall.Errno = 18 ERROR_WRITE_PROTECT syscall.Errno = 19 ERROR_BAD_UNIT syscall.Errno = 20 ERROR_NOT_READY syscall.Errno = 21 ERROR_BAD_COMMAND syscall.Errno = 22 ERROR_CRC syscall.Errno = 23 ERROR_BAD_LENGTH syscall.Errno = 24 ERROR_SEEK syscall.Errno = 25 ERROR_NOT_DOS_DISK syscall.Errno = 26 ERROR_SECTOR_NOT_FOUND syscall.Errno = 27 ERROR_OUT_OF_PAPER syscall.Errno = 28 ERROR_WRITE_FAULT syscall.Errno = 29 ERROR_READ_FAULT syscall.Errno = 30 ERROR_GEN_FAILURE syscall.Errno = 31 ERROR_SHARING_VIOLATION syscall.Errno = 32 ERROR_LOCK_VIOLATION syscall.Errno = 33 ERROR_WRONG_DISK syscall.Errno = 34 ERROR_SHARING_BUFFER_EXCEEDED syscall.Errno = 36 ERROR_HANDLE_EOF syscall.Errno = 38 ERROR_HANDLE_DISK_FULL syscall.Errno = 39 ERROR_NOT_SUPPORTED syscall.Errno = 50 ERROR_REM_NOT_LIST syscall.Errno = 51 ERROR_DUP_NAME syscall.Errno = 52 ERROR_BAD_NETPATH syscall.Errno = 53 ERROR_NETWORK_BUSY syscall.Errno = 54 ERROR_DEV_NOT_EXIST syscall.Errno = 55 ERROR_TOO_MANY_CMDS syscall.Errno = 56 ERROR_ADAP_HDW_ERR syscall.Errno = 57 ERROR_BAD_NET_RESP syscall.Errno = 58 ERROR_UNEXP_NET_ERR syscall.Errno = 59 ERROR_BAD_REM_ADAP syscall.Errno = 60 ERROR_PRINTQ_FULL syscall.Errno = 61 ERROR_NO_SPOOL_SPACE syscall.Errno = 62 ERROR_PRINT_CANCELLED syscall.Errno = 63 ERROR_NETNAME_DELETED syscall.Errno = 64 ERROR_NETWORK_ACCESS_DENIED syscall.Errno = 65 ERROR_BAD_DEV_TYPE syscall.Errno = 66 ERROR_BAD_NET_NAME syscall.Errno = 67 ERROR_TOO_MANY_NAMES syscall.Errno = 68 ERROR_TOO_MANY_SESS syscall.Errno = 69 ERROR_SHARING_PAUSED syscall.Errno = 70 ERROR_REQ_NOT_ACCEP syscall.Errno = 71 ERROR_REDIR_PAUSED syscall.Errno = 72 ERROR_FILE_EXISTS syscall.Errno = 80 ERROR_CANNOT_MAKE syscall.Errno = 82 ERROR_FAIL_I24 syscall.Errno = 83 ERROR_OUT_OF_STRUCTURES syscall.Errno = 84 ERROR_ALREADY_ASSIGNED syscall.Errno = 85 ERROR_INVALID_PASSWORD syscall.Errno = 86 ERROR_INVALID_PARAMETER syscall.Errno = 87 ERROR_NET_WRITE_FAULT syscall.Errno = 88 ERROR_NO_PROC_SLOTS syscall.Errno = 89 ERROR_TOO_MANY_SEMAPHORES syscall.Errno = 100 ERROR_EXCL_SEM_ALREADY_OWNED syscall.Errno = 101 ERROR_SEM_IS_SET syscall.Errno = 102 ERROR_TOO_MANY_SEM_REQUESTS syscall.Errno = 103 ERROR_INVALID_AT_INTERRUPT_TIME syscall.Errno = 104 ERROR_SEM_OWNER_DIED syscall.Errno = 105 ERROR_SEM_USER_LIMIT syscall.Errno = 106 ERROR_DISK_CHANGE syscall.Errno = 107 ERROR_DRIVE_LOCKED syscall.Errno = 108 ERROR_BROKEN_PIPE syscall.Errno = 109 ERROR_OPEN_FAILED syscall.Errno = 110 ERROR_BUFFER_OVERFLOW syscall.Errno = 111 ERROR_DISK_FULL syscall.Errno = 112 ERROR_NO_MORE_SEARCH_HANDLES syscall.Errno = 113 ERROR_INVALID_TARGET_HANDLE syscall.Errno = 114 ERROR_INVALID_CATEGORY syscall.Errno = 117 ERROR_INVALID_VERIFY_SWITCH syscall.Errno = 118 ERROR_BAD_DRIVER_LEVEL syscall.Errno = 119 ERROR_CALL_NOT_IMPLEMENTED syscall.Errno = 120 ERROR_SEM_TIMEOUT syscall.Errno = 121 ERROR_INSUFFICIENT_BUFFER syscall.Errno = 122 ERROR_INVALID_NAME syscall.Errno = 123 ERROR_INVALID_LEVEL syscall.Errno = 124 ERROR_NO_VOLUME_LABEL syscall.Errno = 125 ERROR_MOD_NOT_FOUND syscall.Errno = 126 ERROR_PROC_NOT_FOUND syscall.Errno = 127 ERROR_WAIT_NO_CHILDREN syscall.Errno = 128 ERROR_CHILD_NOT_COMPLETE syscall.Errno = 129 ERROR_DIRECT_ACCESS_HANDLE syscall.Errno = 130 ERROR_NEGATIVE_SEEK syscall.Errno = 131 ERROR_SEEK_ON_DEVICE syscall.Errno = 132 ERROR_IS_JOIN_TARGET syscall.Errno = 133 ERROR_IS_JOINED syscall.Errno = 134 ERROR_IS_SUBSTED syscall.Errno = 135 ERROR_NOT_JOINED syscall.Errno = 136 ERROR_NOT_SUBSTED syscall.Errno = 137 ERROR_JOIN_TO_JOIN syscall.Errno = 138 ERROR_SUBST_TO_SUBST syscall.Errno = 139 ERROR_JOIN_TO_SUBST syscall.Errno = 140 ERROR_SUBST_TO_JOIN syscall.Errno = 141 ERROR_BUSY_DRIVE syscall.Errno = 142 ERROR_SAME_DRIVE syscall.Errno = 143 ERROR_DIR_NOT_ROOT syscall.Errno = 144 ERROR_DIR_NOT_EMPTY syscall.Errno = 145 ERROR_IS_SUBST_PATH syscall.Errno = 146 ERROR_IS_JOIN_PATH syscall.Errno = 147 ERROR_PATH_BUSY syscall.Errno = 148 ERROR_IS_SUBST_TARGET syscall.Errno = 149 ERROR_SYSTEM_TRACE syscall.Errno = 150 ERROR_INVALID_EVENT_COUNT syscall.Errno = 151 ERROR_TOO_MANY_MUXWAITERS syscall.Errno = 152 ERROR_INVALID_LIST_FORMAT syscall.Errno = 153 ERROR_LABEL_TOO_LONG syscall.Errno = 154 ERROR_TOO_MANY_TCBS syscall.Errno = 155 ERROR_SIGNAL_REFUSED syscall.Errno = 156 ERROR_DISCARDED syscall.Errno = 157 ERROR_NOT_LOCKED syscall.Errno = 158 ERROR_BAD_THREADID_ADDR syscall.Errno = 159 ERROR_BAD_ARGUMENTS syscall.Errno = 160 ERROR_BAD_PATHNAME syscall.Errno = 161 ERROR_SIGNAL_PENDING syscall.Errno = 162 ERROR_MAX_THRDS_REACHED syscall.Errno = 164 ERROR_LOCK_FAILED syscall.Errno = 167 ERROR_BUSY syscall.Errno = 170 ERROR_DEVICE_SUPPORT_IN_PROGRESS syscall.Errno = 171 ERROR_CANCEL_VIOLATION syscall.Errno = 173 ERROR_ATOMIC_LOCKS_NOT_SUPPORTED syscall.Errno = 174 ERROR_INVALID_SEGMENT_NUMBER syscall.Errno = 180 ERROR_INVALID_ORDINAL syscall.Errno = 182 ERROR_ALREADY_EXISTS syscall.Errno = 183 ERROR_INVALID_FLAG_NUMBER syscall.Errno = 186 ERROR_SEM_NOT_FOUND syscall.Errno = 187 ERROR_INVALID_STARTING_CODESEG syscall.Errno = 188 ERROR_INVALID_STACKSEG syscall.Errno = 189 ERROR_INVALID_MODULETYPE syscall.Errno = 190 ERROR_INVALID_EXE_SIGNATURE syscall.Errno = 191 ERROR_EXE_MARKED_INVALID syscall.Errno = 192 ERROR_BAD_EXE_FORMAT syscall.Errno = 193 ERROR_ITERATED_DATA_EXCEEDS_64k syscall.Errno = 194 ERROR_INVALID_MINALLOCSIZE syscall.Errno = 195 ERROR_DYNLINK_FROM_INVALID_RING syscall.Errno = 196 ERROR_IOPL_NOT_ENABLED syscall.Errno = 197 ERROR_INVALID_SEGDPL syscall.Errno = 198 ERROR_AUTODATASEG_EXCEEDS_64k syscall.Errno = 199 ERROR_RING2SEG_MUST_BE_MOVABLE syscall.Errno = 200 ERROR_RELOC_CHAIN_XEEDS_SEGLIM syscall.Errno = 201 ERROR_INFLOOP_IN_RELOC_CHAIN syscall.Errno = 202 ERROR_ENVVAR_NOT_FOUND syscall.Errno = 203 ERROR_NO_SIGNAL_SENT syscall.Errno = 205 ERROR_FILENAME_EXCED_RANGE syscall.Errno = 206 ERROR_RING2_STACK_IN_USE syscall.Errno = 207 ERROR_META_EXPANSION_TOO_LONG syscall.Errno = 208 ERROR_INVALID_SIGNAL_NUMBER syscall.Errno = 209 ERROR_THREAD_1_INACTIVE syscall.Errno = 210 ERROR_LOCKED syscall.Errno = 212 ERROR_TOO_MANY_MODULES syscall.Errno = 214 ERROR_NESTING_NOT_ALLOWED syscall.Errno = 215 ERROR_EXE_MACHINE_TYPE_MISMATCH syscall.Errno = 216 ERROR_EXE_CANNOT_MODIFY_SIGNED_BINARY syscall.Errno = 217 ERROR_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY syscall.Errno = 218 ERROR_FILE_CHECKED_OUT syscall.Errno = 220 ERROR_CHECKOUT_REQUIRED syscall.Errno = 221 ERROR_BAD_FILE_TYPE syscall.Errno = 222 ERROR_FILE_TOO_LARGE syscall.Errno = 223 ERROR_FORMS_AUTH_REQUIRED syscall.Errno = 224 ERROR_VIRUS_INFECTED syscall.Errno = 225 ERROR_VIRUS_DELETED syscall.Errno = 226 ERROR_PIPE_LOCAL syscall.Errno = 229 ERROR_BAD_PIPE syscall.Errno = 230 ERROR_PIPE_BUSY syscall.Errno = 231 ERROR_NO_DATA syscall.Errno = 232 ERROR_PIPE_NOT_CONNECTED syscall.Errno = 233 ERROR_MORE_DATA syscall.Errno = 234 ERROR_NO_WORK_DONE syscall.Errno = 235 ERROR_VC_DISCONNECTED syscall.Errno = 240 ERROR_INVALID_EA_NAME syscall.Errno = 254 ERROR_EA_LIST_INCONSISTENT syscall.Errno = 255 WAIT_TIMEOUT syscall.Errno = 258 ERROR_NO_MORE_ITEMS syscall.Errno = 259 ERROR_CANNOT_COPY syscall.Errno = 266 ERROR_DIRECTORY syscall.Errno = 267 ERROR_EAS_DIDNT_FIT syscall.Errno = 275 ERROR_EA_FILE_CORRUPT syscall.Errno = 276 ERROR_EA_TABLE_FULL syscall.Errno = 277 ERROR_INVALID_EA_HANDLE syscall.Errno = 278 ERROR_EAS_NOT_SUPPORTED syscall.Errno = 282 ERROR_NOT_OWNER syscall.Errno = 288 ERROR_TOO_MANY_POSTS syscall.Errno = 298 ERROR_PARTIAL_COPY syscall.Errno = 299 ERROR_OPLOCK_NOT_GRANTED syscall.Errno = 300 ERROR_INVALID_OPLOCK_PROTOCOL syscall.Errno = 301 ERROR_DISK_TOO_FRAGMENTED syscall.Errno = 302 ERROR_DELETE_PENDING syscall.Errno = 303 ERROR_INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING syscall.Errno = 304 ERROR_SHORT_NAMES_NOT_ENABLED_ON_VOLUME syscall.Errno = 305 ERROR_SECURITY_STREAM_IS_INCONSISTENT syscall.Errno = 306 ERROR_INVALID_LOCK_RANGE syscall.Errno = 307 ERROR_IMAGE_SUBSYSTEM_NOT_PRESENT syscall.Errno = 308 ERROR_NOTIFICATION_GUID_ALREADY_DEFINED syscall.Errno = 309 ERROR_INVALID_EXCEPTION_HANDLER syscall.Errno = 310 ERROR_DUPLICATE_PRIVILEGES syscall.Errno = 311 ERROR_NO_RANGES_PROCESSED syscall.Errno = 312 ERROR_NOT_ALLOWED_ON_SYSTEM_FILE syscall.Errno = 313 ERROR_DISK_RESOURCES_EXHAUSTED syscall.Errno = 314 ERROR_INVALID_TOKEN syscall.Errno = 315 ERROR_DEVICE_FEATURE_NOT_SUPPORTED syscall.Errno = 316 ERROR_MR_MID_NOT_FOUND syscall.Errno = 317 ERROR_SCOPE_NOT_FOUND syscall.Errno = 318 ERROR_UNDEFINED_SCOPE syscall.Errno = 319 ERROR_INVALID_CAP syscall.Errno = 320 ERROR_DEVICE_UNREACHABLE syscall.Errno = 321 ERROR_DEVICE_NO_RESOURCES syscall.Errno = 322 ERROR_DATA_CHECKSUM_ERROR syscall.Errno = 323 ERROR_INTERMIXED_KERNEL_EA_OPERATION syscall.Errno = 324 ERROR_FILE_LEVEL_TRIM_NOT_SUPPORTED syscall.Errno = 326 ERROR_OFFSET_ALIGNMENT_VIOLATION syscall.Errno = 327 ERROR_INVALID_FIELD_IN_PARAMETER_LIST syscall.Errno = 328 ERROR_OPERATION_IN_PROGRESS syscall.Errno = 329 ERROR_BAD_DEVICE_PATH syscall.Errno = 330 ERROR_TOO_MANY_DESCRIPTORS syscall.Errno = 331 ERROR_SCRUB_DATA_DISABLED syscall.Errno = 332 ERROR_NOT_REDUNDANT_STORAGE syscall.Errno = 333 ERROR_RESIDENT_FILE_NOT_SUPPORTED syscall.Errno = 334 ERROR_COMPRESSED_FILE_NOT_SUPPORTED syscall.Errno = 335 ERROR_DIRECTORY_NOT_SUPPORTED syscall.Errno = 336 ERROR_NOT_READ_FROM_COPY syscall.Errno = 337 ERROR_FT_WRITE_FAILURE syscall.Errno = 338 ERROR_FT_DI_SCAN_REQUIRED syscall.Errno = 339 ERROR_INVALID_KERNEL_INFO_VERSION syscall.Errno = 340 ERROR_INVALID_PEP_INFO_VERSION syscall.Errno = 341 ERROR_OBJECT_NOT_EXTERNALLY_BACKED syscall.Errno = 342 ERROR_EXTERNAL_BACKING_PROVIDER_UNKNOWN syscall.Errno = 343 ERROR_COMPRESSION_NOT_BENEFICIAL syscall.Errno = 344 ERROR_STORAGE_TOPOLOGY_ID_MISMATCH syscall.Errno = 345 ERROR_BLOCKED_BY_PARENTAL_CONTROLS syscall.Errno = 346 ERROR_BLOCK_TOO_MANY_REFERENCES syscall.Errno = 347 ERROR_MARKED_TO_DISALLOW_WRITES syscall.Errno = 348 ERROR_ENCLAVE_FAILURE syscall.Errno = 349 ERROR_FAIL_NOACTION_REBOOT syscall.Errno = 350 ERROR_FAIL_SHUTDOWN syscall.Errno = 351 ERROR_FAIL_RESTART syscall.Errno = 352 ERROR_MAX_SESSIONS_REACHED syscall.Errno = 353 ERROR_NETWORK_ACCESS_DENIED_EDP syscall.Errno = 354 ERROR_DEVICE_HINT_NAME_BUFFER_TOO_SMALL syscall.Errno = 355 ERROR_EDP_POLICY_DENIES_OPERATION syscall.Errno = 356 ERROR_EDP_DPL_POLICY_CANT_BE_SATISFIED syscall.Errno = 357 ERROR_CLOUD_FILE_SYNC_ROOT_METADATA_CORRUPT syscall.Errno = 358 ERROR_DEVICE_IN_MAINTENANCE syscall.Errno = 359 ERROR_NOT_SUPPORTED_ON_DAX syscall.Errno = 360 ERROR_DAX_MAPPING_EXISTS syscall.Errno = 361 ERROR_CLOUD_FILE_PROVIDER_NOT_RUNNING syscall.Errno = 362 ERROR_CLOUD_FILE_METADATA_CORRUPT syscall.Errno = 363 ERROR_CLOUD_FILE_METADATA_TOO_LARGE syscall.Errno = 364 ERROR_CLOUD_FILE_PROPERTY_BLOB_TOO_LARGE syscall.Errno = 365 ERROR_CLOUD_FILE_PROPERTY_BLOB_CHECKSUM_MISMATCH syscall.Errno = 366 ERROR_CHILD_PROCESS_BLOCKED syscall.Errno = 367 ERROR_STORAGE_LOST_DATA_PERSISTENCE syscall.Errno = 368 ERROR_FILE_SYSTEM_VIRTUALIZATION_UNAVAILABLE syscall.Errno = 369 ERROR_FILE_SYSTEM_VIRTUALIZATION_METADATA_CORRUPT syscall.Errno = 370 ERROR_FILE_SYSTEM_VIRTUALIZATION_BUSY syscall.Errno = 371 ERROR_FILE_SYSTEM_VIRTUALIZATION_PROVIDER_UNKNOWN syscall.Errno = 372 ERROR_GDI_HANDLE_LEAK syscall.Errno = 373 ERROR_CLOUD_FILE_TOO_MANY_PROPERTY_BLOBS syscall.Errno = 374 ERROR_CLOUD_FILE_PROPERTY_VERSION_NOT_SUPPORTED syscall.Errno = 375 ERROR_NOT_A_CLOUD_FILE syscall.Errno = 376 ERROR_CLOUD_FILE_NOT_IN_SYNC syscall.Errno = 377 ERROR_CLOUD_FILE_ALREADY_CONNECTED syscall.Errno = 378 ERROR_CLOUD_FILE_NOT_SUPPORTED syscall.Errno = 379 ERROR_CLOUD_FILE_INVALID_REQUEST syscall.Errno = 380 ERROR_CLOUD_FILE_READ_ONLY_VOLUME syscall.Errno = 381 ERROR_CLOUD_FILE_CONNECTED_PROVIDER_ONLY syscall.Errno = 382 ERROR_CLOUD_FILE_VALIDATION_FAILED syscall.Errno = 383 ERROR_SMB1_NOT_AVAILABLE syscall.Errno = 384 ERROR_FILE_SYSTEM_VIRTUALIZATION_INVALID_OPERATION syscall.Errno = 385 ERROR_CLOUD_FILE_AUTHENTICATION_FAILED syscall.Errno = 386 ERROR_CLOUD_FILE_INSUFFICIENT_RESOURCES syscall.Errno = 387 ERROR_CLOUD_FILE_NETWORK_UNAVAILABLE syscall.Errno = 388 ERROR_CLOUD_FILE_UNSUCCESSFUL syscall.Errno = 389 ERROR_CLOUD_FILE_NOT_UNDER_SYNC_ROOT syscall.Errno = 390 ERROR_CLOUD_FILE_IN_USE syscall.Errno = 391 ERROR_CLOUD_FILE_PINNED syscall.Errno = 392 ERROR_CLOUD_FILE_REQUEST_ABORTED syscall.Errno = 393 ERROR_CLOUD_FILE_PROPERTY_CORRUPT syscall.Errno = 394 ERROR_CLOUD_FILE_ACCESS_DENIED syscall.Errno = 395 ERROR_CLOUD_FILE_INCOMPATIBLE_HARDLINKS syscall.Errno = 396 ERROR_CLOUD_FILE_PROPERTY_LOCK_CONFLICT syscall.Errno = 397 ERROR_CLOUD_FILE_REQUEST_CANCELED syscall.Errno = 398 ERROR_EXTERNAL_SYSKEY_NOT_SUPPORTED syscall.Errno = 399 ERROR_THREAD_MODE_ALREADY_BACKGROUND syscall.Errno = 400 ERROR_THREAD_MODE_NOT_BACKGROUND syscall.Errno = 401 ERROR_PROCESS_MODE_ALREADY_BACKGROUND syscall.Errno = 402 ERROR_PROCESS_MODE_NOT_BACKGROUND syscall.Errno = 403 ERROR_CLOUD_FILE_PROVIDER_TERMINATED syscall.Errno = 404 ERROR_NOT_A_CLOUD_SYNC_ROOT syscall.Errno = 405 ERROR_FILE_PROTECTED_UNDER_DPL syscall.Errno = 406 ERROR_VOLUME_NOT_CLUSTER_ALIGNED syscall.Errno = 407 ERROR_NO_PHYSICALLY_ALIGNED_FREE_SPACE_FOUND syscall.Errno = 408 ERROR_APPX_FILE_NOT_ENCRYPTED syscall.Errno = 409 ERROR_RWRAW_ENCRYPTED_FILE_NOT_ENCRYPTED syscall.Errno = 410 ERROR_RWRAW_ENCRYPTED_INVALID_EDATAINFO_FILEOFFSET syscall.Errno = 411 ERROR_RWRAW_ENCRYPTED_INVALID_EDATAINFO_FILERANGE syscall.Errno = 412 ERROR_RWRAW_ENCRYPTED_INVALID_EDATAINFO_PARAMETER syscall.Errno = 413 ERROR_LINUX_SUBSYSTEM_NOT_PRESENT syscall.Errno = 414 ERROR_FT_READ_FAILURE syscall.Errno = 415 ERROR_STORAGE_RESERVE_ID_INVALID syscall.Errno = 416 ERROR_STORAGE_RESERVE_DOES_NOT_EXIST syscall.Errno = 417 ERROR_STORAGE_RESERVE_ALREADY_EXISTS syscall.Errno = 418 ERROR_STORAGE_RESERVE_NOT_EMPTY syscall.Errno = 419 ERROR_NOT_A_DAX_VOLUME syscall.Errno = 420 ERROR_NOT_DAX_MAPPABLE syscall.Errno = 421 ERROR_TIME_SENSITIVE_THREAD syscall.Errno = 422 ERROR_DPL_NOT_SUPPORTED_FOR_USER syscall.Errno = 423 ERROR_CASE_DIFFERING_NAMES_IN_DIR syscall.Errno = 424 ERROR_FILE_NOT_SUPPORTED syscall.Errno = 425 ERROR_CLOUD_FILE_REQUEST_TIMEOUT syscall.Errno = 426 ERROR_NO_TASK_QUEUE syscall.Errno = 427 ERROR_SRC_SRV_DLL_LOAD_FAILED syscall.Errno = 428 ERROR_NOT_SUPPORTED_WITH_BTT syscall.Errno = 429 ERROR_ENCRYPTION_DISABLED syscall.Errno = 430 ERROR_ENCRYPTING_METADATA_DISALLOWED syscall.Errno = 431 ERROR_CANT_CLEAR_ENCRYPTION_FLAG syscall.Errno = 432 ERROR_NO_SUCH_DEVICE syscall.Errno = 433 ERROR_CAPAUTHZ_NOT_DEVUNLOCKED syscall.Errno = 450 ERROR_CAPAUTHZ_CHANGE_TYPE syscall.Errno = 451 ERROR_CAPAUTHZ_NOT_PROVISIONED syscall.Errno = 452 ERROR_CAPAUTHZ_NOT_AUTHORIZED syscall.Errno = 453 ERROR_CAPAUTHZ_NO_POLICY syscall.Errno = 454 ERROR_CAPAUTHZ_DB_CORRUPTED syscall.Errno = 455 ERROR_CAPAUTHZ_SCCD_INVALID_CATALOG syscall.Errno = 456 ERROR_CAPAUTHZ_SCCD_NO_AUTH_ENTITY syscall.Errno = 457 ERROR_CAPAUTHZ_SCCD_PARSE_ERROR syscall.Errno = 458 ERROR_CAPAUTHZ_SCCD_DEV_MODE_REQUIRED syscall.Errno = 459 ERROR_CAPAUTHZ_SCCD_NO_CAPABILITY_MATCH syscall.Errno = 460 ERROR_PNP_QUERY_REMOVE_DEVICE_TIMEOUT syscall.Errno = 480 ERROR_PNP_QUERY_REMOVE_RELATED_DEVICE_TIMEOUT syscall.Errno = 481 ERROR_PNP_QUERY_REMOVE_UNRELATED_DEVICE_TIMEOUT syscall.Errno = 482 ERROR_DEVICE_HARDWARE_ERROR syscall.Errno = 483 ERROR_INVALID_ADDRESS syscall.Errno = 487 ERROR_VRF_CFG_ENABLED syscall.Errno = 1183 ERROR_PARTITION_TERMINATING syscall.Errno = 1184 ERROR_USER_PROFILE_LOAD syscall.Errno = 500 ERROR_ARITHMETIC_OVERFLOW syscall.Errno = 534 ERROR_PIPE_CONNECTED syscall.Errno = 535 ERROR_PIPE_LISTENING syscall.Errno = 536 ERROR_VERIFIER_STOP syscall.Errno = 537 ERROR_ABIOS_ERROR syscall.Errno = 538 ERROR_WX86_WARNING syscall.Errno = 539 ERROR_WX86_ERROR syscall.Errno = 540 ERROR_TIMER_NOT_CANCELED syscall.Errno = 541 ERROR_UNWIND syscall.Errno = 542 ERROR_BAD_STACK syscall.Errno = 543 ERROR_INVALID_UNWIND_TARGET syscall.Errno = 544 ERROR_INVALID_PORT_ATTRIBUTES syscall.Errno = 545 ERROR_PORT_MESSAGE_TOO_LONG syscall.Errno = 546 ERROR_INVALID_QUOTA_LOWER syscall.Errno = 547 ERROR_DEVICE_ALREADY_ATTACHED syscall.Errno = 548 ERROR_INSTRUCTION_MISALIGNMENT syscall.Errno = 549 ERROR_PROFILING_NOT_STARTED syscall.Errno = 550 ERROR_PROFILING_NOT_STOPPED syscall.Errno = 551 ERROR_COULD_NOT_INTERPRET syscall.Errno = 552 ERROR_PROFILING_AT_LIMIT syscall.Errno = 553 ERROR_CANT_WAIT syscall.Errno = 554 ERROR_CANT_TERMINATE_SELF syscall.Errno = 555 ERROR_UNEXPECTED_MM_CREATE_ERR syscall.Errno = 556 ERROR_UNEXPECTED_MM_MAP_ERROR syscall.Errno = 557 ERROR_UNEXPECTED_MM_EXTEND_ERR syscall.Errno = 558 ERROR_BAD_FUNCTION_TABLE syscall.Errno = 559 ERROR_NO_GUID_TRANSLATION syscall.Errno = 560 ERROR_INVALID_LDT_SIZE syscall.Errno = 561 ERROR_INVALID_LDT_OFFSET syscall.Errno = 563 ERROR_INVALID_LDT_DESCRIPTOR syscall.Errno = 564 ERROR_TOO_MANY_THREADS syscall.Errno = 565 ERROR_THREAD_NOT_IN_PROCESS syscall.Errno = 566 ERROR_PAGEFILE_QUOTA_EXCEEDED syscall.Errno = 567 ERROR_LOGON_SERVER_CONFLICT syscall.Errno = 568 ERROR_SYNCHRONIZATION_REQUIRED syscall.Errno = 569 ERROR_NET_OPEN_FAILED syscall.Errno = 570 ERROR_IO_PRIVILEGE_FAILED syscall.Errno = 571 ERROR_CONTROL_C_EXIT syscall.Errno = 572 ERROR_MISSING_SYSTEMFILE syscall.Errno = 573 ERROR_UNHANDLED_EXCEPTION syscall.Errno = 574 ERROR_APP_INIT_FAILURE syscall.Errno = 575 ERROR_PAGEFILE_CREATE_FAILED syscall.Errno = 576 ERROR_INVALID_IMAGE_HASH syscall.Errno = 577 ERROR_NO_PAGEFILE syscall.Errno = 578 ERROR_ILLEGAL_FLOAT_CONTEXT syscall.Errno = 579 ERROR_NO_EVENT_PAIR syscall.Errno = 580 ERROR_DOMAIN_CTRLR_CONFIG_ERROR syscall.Errno = 581 ERROR_ILLEGAL_CHARACTER syscall.Errno = 582 ERROR_UNDEFINED_CHARACTER syscall.Errno = 583 ERROR_FLOPPY_VOLUME syscall.Errno = 584 ERROR_BIOS_FAILED_TO_CONNECT_INTERRUPT syscall.Errno = 585 ERROR_BACKUP_CONTROLLER syscall.Errno = 586 ERROR_MUTANT_LIMIT_EXCEEDED syscall.Errno = 587 ERROR_FS_DRIVER_REQUIRED syscall.Errno = 588 ERROR_CANNOT_LOAD_REGISTRY_FILE syscall.Errno = 589 ERROR_DEBUG_ATTACH_FAILED syscall.Errno = 590 ERROR_SYSTEM_PROCESS_TERMINATED syscall.Errno = 591 ERROR_DATA_NOT_ACCEPTED syscall.Errno = 592 ERROR_VDM_HARD_ERROR syscall.Errno = 593 ERROR_DRIVER_CANCEL_TIMEOUT syscall.Errno = 594 ERROR_REPLY_MESSAGE_MISMATCH syscall.Errno = 595 ERROR_LOST_WRITEBEHIND_DATA syscall.Errno = 596 ERROR_CLIENT_SERVER_PARAMETERS_INVALID syscall.Errno = 597 ERROR_NOT_TINY_STREAM syscall.Errno = 598 ERROR_STACK_OVERFLOW_READ syscall.Errno = 599 ERROR_CONVERT_TO_LARGE syscall.Errno = 600 ERROR_FOUND_OUT_OF_SCOPE syscall.Errno = 601 ERROR_ALLOCATE_BUCKET syscall.Errno = 602 ERROR_MARSHALL_OVERFLOW syscall.Errno = 603 ERROR_INVALID_VARIANT syscall.Errno = 604 ERROR_BAD_COMPRESSION_BUFFER syscall.Errno = 605 ERROR_AUDIT_FAILED syscall.Errno = 606 ERROR_TIMER_RESOLUTION_NOT_SET syscall.Errno = 607 ERROR_INSUFFICIENT_LOGON_INFO syscall.Errno = 608 ERROR_BAD_DLL_ENTRYPOINT syscall.Errno = 609 ERROR_BAD_SERVICE_ENTRYPOINT syscall.Errno = 610 ERROR_IP_ADDRESS_CONFLICT1 syscall.Errno = 611 ERROR_IP_ADDRESS_CONFLICT2 syscall.Errno = 612 ERROR_REGISTRY_QUOTA_LIMIT syscall.Errno = 613 ERROR_NO_CALLBACK_ACTIVE syscall.Errno = 614 ERROR_PWD_TOO_SHORT syscall.Errno = 615 ERROR_PWD_TOO_RECENT syscall.Errno = 616 ERROR_PWD_HISTORY_CONFLICT syscall.Errno = 617 ERROR_UNSUPPORTED_COMPRESSION syscall.Errno = 618 ERROR_INVALID_HW_PROFILE syscall.Errno = 619 ERROR_INVALID_PLUGPLAY_DEVICE_PATH syscall.Errno = 620 ERROR_QUOTA_LIST_INCONSISTENT syscall.Errno = 621 ERROR_EVALUATION_EXPIRATION syscall.Errno = 622 ERROR_ILLEGAL_DLL_RELOCATION syscall.Errno = 623 ERROR_DLL_INIT_FAILED_LOGOFF syscall.Errno = 624 ERROR_VALIDATE_CONTINUE syscall.Errno = 625 ERROR_NO_MORE_MATCHES syscall.Errno = 626 ERROR_RANGE_LIST_CONFLICT syscall.Errno = 627 ERROR_SERVER_SID_MISMATCH syscall.Errno = 628 ERROR_CANT_ENABLE_DENY_ONLY syscall.Errno = 629 ERROR_FLOAT_MULTIPLE_FAULTS syscall.Errno = 630 ERROR_FLOAT_MULTIPLE_TRAPS syscall.Errno = 631 ERROR_NOINTERFACE syscall.Errno = 632 ERROR_DRIVER_FAILED_SLEEP syscall.Errno = 633 ERROR_CORRUPT_SYSTEM_FILE syscall.Errno = 634 ERROR_COMMITMENT_MINIMUM syscall.Errno = 635 ERROR_PNP_RESTART_ENUMERATION syscall.Errno = 636 ERROR_SYSTEM_IMAGE_BAD_SIGNATURE syscall.Errno = 637 ERROR_PNP_REBOOT_REQUIRED syscall.Errno = 638 ERROR_INSUFFICIENT_POWER syscall.Errno = 639 ERROR_MULTIPLE_FAULT_VIOLATION syscall.Errno = 640 ERROR_SYSTEM_SHUTDOWN syscall.Errno = 641 ERROR_PORT_NOT_SET syscall.Errno = 642 ERROR_DS_VERSION_CHECK_FAILURE syscall.Errno = 643 ERROR_RANGE_NOT_FOUND syscall.Errno = 644 ERROR_NOT_SAFE_MODE_DRIVER syscall.Errno = 646 ERROR_FAILED_DRIVER_ENTRY syscall.Errno = 647 ERROR_DEVICE_ENUMERATION_ERROR syscall.Errno = 648 ERROR_MOUNT_POINT_NOT_RESOLVED syscall.Errno = 649 ERROR_INVALID_DEVICE_OBJECT_PARAMETER syscall.Errno = 650 ERROR_MCA_OCCURED syscall.Errno = 651 ERROR_DRIVER_DATABASE_ERROR syscall.Errno = 652 ERROR_SYSTEM_HIVE_TOO_LARGE syscall.Errno = 653 ERROR_DRIVER_FAILED_PRIOR_UNLOAD syscall.Errno = 654 ERROR_VOLSNAP_PREPARE_HIBERNATE syscall.Errno = 655 ERROR_HIBERNATION_FAILURE syscall.Errno = 656 ERROR_PWD_TOO_LONG syscall.Errno = 657 ERROR_FILE_SYSTEM_LIMITATION syscall.Errno = 665 ERROR_ASSERTION_FAILURE syscall.Errno = 668 ERROR_ACPI_ERROR syscall.Errno = 669 ERROR_WOW_ASSERTION syscall.Errno = 670 ERROR_PNP_BAD_MPS_TABLE syscall.Errno = 671 ERROR_PNP_TRANSLATION_FAILED syscall.Errno = 672 ERROR_PNP_IRQ_TRANSLATION_FAILED syscall.Errno = 673 ERROR_PNP_INVALID_ID syscall.Errno = 674 ERROR_WAKE_SYSTEM_DEBUGGER syscall.Errno = 675 ERROR_HANDLES_CLOSED syscall.Errno = 676 ERROR_EXTRANEOUS_INFORMATION syscall.Errno = 677 ERROR_RXACT_COMMIT_NECESSARY syscall.Errno = 678 ERROR_MEDIA_CHECK syscall.Errno = 679 ERROR_GUID_SUBSTITUTION_MADE syscall.Errno = 680 ERROR_STOPPED_ON_SYMLINK syscall.Errno = 681 ERROR_LONGJUMP syscall.Errno = 682 ERROR_PLUGPLAY_QUERY_VETOED syscall.Errno = 683 ERROR_UNWIND_CONSOLIDATE syscall.Errno = 684 ERROR_REGISTRY_HIVE_RECOVERED syscall.Errno = 685 ERROR_DLL_MIGHT_BE_INSECURE syscall.Errno = 686 ERROR_DLL_MIGHT_BE_INCOMPATIBLE syscall.Errno = 687 ERROR_DBG_EXCEPTION_NOT_HANDLED syscall.Errno = 688 ERROR_DBG_REPLY_LATER syscall.Errno = 689 ERROR_DBG_UNABLE_TO_PROVIDE_HANDLE syscall.Errno = 690 ERROR_DBG_TERMINATE_THREAD syscall.Errno = 691 ERROR_DBG_TERMINATE_PROCESS syscall.Errno = 692 ERROR_DBG_CONTROL_C syscall.Errno = 693 ERROR_DBG_PRINTEXCEPTION_C syscall.Errno = 694 ERROR_DBG_RIPEXCEPTION syscall.Errno = 695 ERROR_DBG_CONTROL_BREAK syscall.Errno = 696 ERROR_DBG_COMMAND_EXCEPTION syscall.Errno = 697 ERROR_OBJECT_NAME_EXISTS syscall.Errno = 698 ERROR_THREAD_WAS_SUSPENDED syscall.Errno = 699 ERROR_IMAGE_NOT_AT_BASE syscall.Errno = 700 ERROR_RXACT_STATE_CREATED syscall.Errno = 701 ERROR_SEGMENT_NOTIFICATION syscall.Errno = 702 ERROR_BAD_CURRENT_DIRECTORY syscall.Errno = 703 ERROR_FT_READ_RECOVERY_FROM_BACKUP syscall.Errno = 704 ERROR_FT_WRITE_RECOVERY syscall.Errno = 705 ERROR_IMAGE_MACHINE_TYPE_MISMATCH syscall.Errno = 706 ERROR_RECEIVE_PARTIAL syscall.Errno = 707 ERROR_RECEIVE_EXPEDITED syscall.Errno = 708 ERROR_RECEIVE_PARTIAL_EXPEDITED syscall.Errno = 709 ERROR_EVENT_DONE syscall.Errno = 710 ERROR_EVENT_PENDING syscall.Errno = 711 ERROR_CHECKING_FILE_SYSTEM syscall.Errno = 712 ERROR_FATAL_APP_EXIT syscall.Errno = 713 ERROR_PREDEFINED_HANDLE syscall.Errno = 714 ERROR_WAS_UNLOCKED syscall.Errno = 715 ERROR_SERVICE_NOTIFICATION syscall.Errno = 716 ERROR_WAS_LOCKED syscall.Errno = 717 ERROR_LOG_HARD_ERROR syscall.Errno = 718 ERROR_ALREADY_WIN32 syscall.Errno = 719 ERROR_IMAGE_MACHINE_TYPE_MISMATCH_EXE syscall.Errno = 720 ERROR_NO_YIELD_PERFORMED syscall.Errno = 721 ERROR_TIMER_RESUME_IGNORED syscall.Errno = 722 ERROR_ARBITRATION_UNHANDLED syscall.Errno = 723 ERROR_CARDBUS_NOT_SUPPORTED syscall.Errno = 724 ERROR_MP_PROCESSOR_MISMATCH syscall.Errno = 725 ERROR_HIBERNATED syscall.Errno = 726 ERROR_RESUME_HIBERNATION syscall.Errno = 727 ERROR_FIRMWARE_UPDATED syscall.Errno = 728 ERROR_DRIVERS_LEAKING_LOCKED_PAGES syscall.Errno = 729 ERROR_WAKE_SYSTEM syscall.Errno = 730 ERROR_WAIT_1 syscall.Errno = 731 ERROR_WAIT_2 syscall.Errno = 732 ERROR_WAIT_3 syscall.Errno = 733 ERROR_WAIT_63 syscall.Errno = 734 ERROR_ABANDONED_WAIT_0 syscall.Errno = 735 ERROR_ABANDONED_WAIT_63 syscall.Errno = 736 ERROR_USER_APC syscall.Errno = 737 ERROR_KERNEL_APC syscall.Errno = 738 ERROR_ALERTED syscall.Errno = 739 ERROR_ELEVATION_REQUIRED syscall.Errno = 740 ERROR_REPARSE syscall.Errno = 741 ERROR_OPLOCK_BREAK_IN_PROGRESS syscall.Errno = 742 ERROR_VOLUME_MOUNTED syscall.Errno = 743 ERROR_RXACT_COMMITTED syscall.Errno = 744 ERROR_NOTIFY_CLEANUP syscall.Errno = 745 ERROR_PRIMARY_TRANSPORT_CONNECT_FAILED syscall.Errno = 746 ERROR_PAGE_FAULT_TRANSITION syscall.Errno = 747 ERROR_PAGE_FAULT_DEMAND_ZERO syscall.Errno = 748 ERROR_PAGE_FAULT_COPY_ON_WRITE syscall.Errno = 749 ERROR_PAGE_FAULT_GUARD_PAGE syscall.Errno = 750 ERROR_PAGE_FAULT_PAGING_FILE syscall.Errno = 751 ERROR_CACHE_PAGE_LOCKED syscall.Errno = 752 ERROR_CRASH_DUMP syscall.Errno = 753 ERROR_BUFFER_ALL_ZEROS syscall.Errno = 754 ERROR_REPARSE_OBJECT syscall.Errno = 755 ERROR_RESOURCE_REQUIREMENTS_CHANGED syscall.Errno = 756 ERROR_TRANSLATION_COMPLETE syscall.Errno = 757 ERROR_NOTHING_TO_TERMINATE syscall.Errno = 758 ERROR_PROCESS_NOT_IN_JOB syscall.Errno = 759 ERROR_PROCESS_IN_JOB syscall.Errno = 760 ERROR_VOLSNAP_HIBERNATE_READY syscall.Errno = 761 ERROR_FSFILTER_OP_COMPLETED_SUCCESSFULLY syscall.Errno = 762 ERROR_INTERRUPT_VECTOR_ALREADY_CONNECTED syscall.Errno = 763 ERROR_INTERRUPT_STILL_CONNECTED syscall.Errno = 764 ERROR_WAIT_FOR_OPLOCK syscall.Errno = 765 ERROR_DBG_EXCEPTION_HANDLED syscall.Errno = 766 ERROR_DBG_CONTINUE syscall.Errno = 767 ERROR_CALLBACK_POP_STACK syscall.Errno = 768 ERROR_COMPRESSION_DISABLED syscall.Errno = 769 ERROR_CANTFETCHBACKWARDS syscall.Errno = 770 ERROR_CANTSCROLLBACKWARDS syscall.Errno = 771 ERROR_ROWSNOTRELEASED syscall.Errno = 772 ERROR_BAD_ACCESSOR_FLAGS syscall.Errno = 773 ERROR_ERRORS_ENCOUNTERED syscall.Errno = 774 ERROR_NOT_CAPABLE syscall.Errno = 775 ERROR_REQUEST_OUT_OF_SEQUENCE syscall.Errno = 776 ERROR_VERSION_PARSE_ERROR syscall.Errno = 777 ERROR_BADSTARTPOSITION syscall.Errno = 778 ERROR_MEMORY_HARDWARE syscall.Errno = 779 ERROR_DISK_REPAIR_DISABLED syscall.Errno = 780 ERROR_INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE syscall.Errno = 781 ERROR_SYSTEM_POWERSTATE_TRANSITION syscall.Errno = 782 ERROR_SYSTEM_POWERSTATE_COMPLEX_TRANSITION syscall.Errno = 783 ERROR_MCA_EXCEPTION syscall.Errno = 784 ERROR_ACCESS_AUDIT_BY_POLICY syscall.Errno = 785 ERROR_ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY syscall.Errno = 786 ERROR_ABANDON_HIBERFILE syscall.Errno = 787 ERROR_LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED syscall.Errno = 788 ERROR_LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR syscall.Errno = 789 ERROR_LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR syscall.Errno = 790 ERROR_BAD_MCFG_TABLE syscall.Errno = 791 ERROR_DISK_REPAIR_REDIRECTED syscall.Errno = 792 ERROR_DISK_REPAIR_UNSUCCESSFUL syscall.Errno = 793 ERROR_CORRUPT_LOG_OVERFULL syscall.Errno = 794 ERROR_CORRUPT_LOG_CORRUPTED syscall.Errno = 795 ERROR_CORRUPT_LOG_UNAVAILABLE syscall.Errno = 796 ERROR_CORRUPT_LOG_DELETED_FULL syscall.Errno = 797 ERROR_CORRUPT_LOG_CLEARED syscall.Errno = 798 ERROR_ORPHAN_NAME_EXHAUSTED syscall.Errno = 799 ERROR_OPLOCK_SWITCHED_TO_NEW_HANDLE syscall.Errno = 800 ERROR_CANNOT_GRANT_REQUESTED_OPLOCK syscall.Errno = 801 ERROR_CANNOT_BREAK_OPLOCK syscall.Errno = 802 ERROR_OPLOCK_HANDLE_CLOSED syscall.Errno = 803 ERROR_NO_ACE_CONDITION syscall.Errno = 804 ERROR_INVALID_ACE_CONDITION syscall.Errno = 805 ERROR_FILE_HANDLE_REVOKED syscall.Errno = 806 ERROR_IMAGE_AT_DIFFERENT_BASE syscall.Errno = 807 ERROR_ENCRYPTED_IO_NOT_POSSIBLE syscall.Errno = 808 ERROR_FILE_METADATA_OPTIMIZATION_IN_PROGRESS syscall.Errno = 809 ERROR_QUOTA_ACTIVITY syscall.Errno = 810 ERROR_HANDLE_REVOKED syscall.Errno = 811 ERROR_CALLBACK_INVOKE_INLINE syscall.Errno = 812 ERROR_CPU_SET_INVALID syscall.Errno = 813 ERROR_ENCLAVE_NOT_TERMINATED syscall.Errno = 814 ERROR_ENCLAVE_VIOLATION syscall.Errno = 815 ERROR_EA_ACCESS_DENIED syscall.Errno = 994 ERROR_OPERATION_ABORTED syscall.Errno = 995 ERROR_IO_INCOMPLETE syscall.Errno = 996 ERROR_IO_PENDING syscall.Errno = 997 ERROR_NOACCESS syscall.Errno = 998 ERROR_SWAPERROR syscall.Errno = 999 ERROR_STACK_OVERFLOW syscall.Errno = 1001 ERROR_INVALID_MESSAGE syscall.Errno = 1002 ERROR_CAN_NOT_COMPLETE syscall.Errno = 1003 ERROR_INVALID_FLAGS syscall.Errno = 1004 ERROR_UNRECOGNIZED_VOLUME syscall.Errno = 1005 ERROR_FILE_INVALID syscall.Errno = 1006 ERROR_FULLSCREEN_MODE syscall.Errno = 1007 ERROR_NO_TOKEN syscall.Errno = 1008 ERROR_BADDB syscall.Errno = 1009 ERROR_BADKEY syscall.Errno = 1010 ERROR_CANTOPEN syscall.Errno = 1011 ERROR_CANTREAD syscall.Errno = 1012 ERROR_CANTWRITE syscall.Errno = 1013 ERROR_REGISTRY_RECOVERED syscall.Errno = 1014 ERROR_REGISTRY_CORRUPT syscall.Errno = 1015 ERROR_REGISTRY_IO_FAILED syscall.Errno = 1016 ERROR_NOT_REGISTRY_FILE syscall.Errno = 1017 ERROR_KEY_DELETED syscall.Errno = 1018 ERROR_NO_LOG_SPACE syscall.Errno = 1019 ERROR_KEY_HAS_CHILDREN syscall.Errno = 1020 ERROR_CHILD_MUST_BE_VOLATILE syscall.Errno = 1021 ERROR_NOTIFY_ENUM_DIR syscall.Errno = 1022 ERROR_DEPENDENT_SERVICES_RUNNING syscall.Errno = 1051 ERROR_INVALID_SERVICE_CONTROL syscall.Errno = 1052 ERROR_SERVICE_REQUEST_TIMEOUT syscall.Errno = 1053 ERROR_SERVICE_NO_THREAD syscall.Errno = 1054 ERROR_SERVICE_DATABASE_LOCKED syscall.Errno = 1055 ERROR_SERVICE_ALREADY_RUNNING syscall.Errno = 1056 ERROR_INVALID_SERVICE_ACCOUNT syscall.Errno = 1057 ERROR_SERVICE_DISABLED syscall.Errno = 1058 ERROR_CIRCULAR_DEPENDENCY syscall.Errno = 1059 ERROR_SERVICE_DOES_NOT_EXIST syscall.Errno = 1060 ERROR_SERVICE_CANNOT_ACCEPT_CTRL syscall.Errno = 1061 ERROR_SERVICE_NOT_ACTIVE syscall.Errno = 1062 ERROR_FAILED_SERVICE_CONTROLLER_CONNECT syscall.Errno = 1063 ERROR_EXCEPTION_IN_SERVICE syscall.Errno = 1064 ERROR_DATABASE_DOES_NOT_EXIST syscall.Errno = 1065 ERROR_SERVICE_SPECIFIC_ERROR syscall.Errno = 1066 ERROR_PROCESS_ABORTED syscall.Errno = 1067 ERROR_SERVICE_DEPENDENCY_FAIL syscall.Errno = 1068 ERROR_SERVICE_LOGON_FAILED syscall.Errno = 1069 ERROR_SERVICE_START_HANG syscall.Errno = 1070 ERROR_INVALID_SERVICE_LOCK syscall.Errno = 1071 ERROR_SERVICE_MARKED_FOR_DELETE syscall.Errno = 1072 ERROR_SERVICE_EXISTS syscall.Errno = 1073 ERROR_ALREADY_RUNNING_LKG syscall.Errno = 1074 ERROR_SERVICE_DEPENDENCY_DELETED syscall.Errno = 1075 ERROR_BOOT_ALREADY_ACCEPTED syscall.Errno = 1076 ERROR_SERVICE_NEVER_STARTED syscall.Errno = 1077 ERROR_DUPLICATE_SERVICE_NAME syscall.Errno = 1078 ERROR_DIFFERENT_SERVICE_ACCOUNT syscall.Errno = 1079 ERROR_CANNOT_DETECT_DRIVER_FAILURE syscall.Errno = 1080 ERROR_CANNOT_DETECT_PROCESS_ABORT syscall.Errno = 1081 ERROR_NO_RECOVERY_PROGRAM syscall.Errno = 1082 ERROR_SERVICE_NOT_IN_EXE syscall.Errno = 1083 ERROR_NOT_SAFEBOOT_SERVICE syscall.Errno = 1084 ERROR_END_OF_MEDIA syscall.Errno = 1100 ERROR_FILEMARK_DETECTED syscall.Errno = 1101 ERROR_BEGINNING_OF_MEDIA syscall.Errno = 1102 ERROR_SETMARK_DETECTED syscall.Errno = 1103 ERROR_NO_DATA_DETECTED syscall.Errno = 1104 ERROR_PARTITION_FAILURE syscall.Errno = 1105 ERROR_INVALID_BLOCK_LENGTH syscall.Errno = 1106 ERROR_DEVICE_NOT_PARTITIONED syscall.Errno = 1107 ERROR_UNABLE_TO_LOCK_MEDIA syscall.Errno = 1108 ERROR_UNABLE_TO_UNLOAD_MEDIA syscall.Errno = 1109 ERROR_MEDIA_CHANGED syscall.Errno = 1110 ERROR_BUS_RESET syscall.Errno = 1111 ERROR_NO_MEDIA_IN_DRIVE syscall.Errno = 1112 ERROR_NO_UNICODE_TRANSLATION syscall.Errno = 1113 ERROR_DLL_INIT_FAILED syscall.Errno = 1114 ERROR_SHUTDOWN_IN_PROGRESS syscall.Errno = 1115 ERROR_NO_SHUTDOWN_IN_PROGRESS syscall.Errno = 1116 ERROR_IO_DEVICE syscall.Errno = 1117 ERROR_SERIAL_NO_DEVICE syscall.Errno = 1118 ERROR_IRQ_BUSY syscall.Errno = 1119 ERROR_MORE_WRITES syscall.Errno = 1120 ERROR_COUNTER_TIMEOUT syscall.Errno = 1121 ERROR_FLOPPY_ID_MARK_NOT_FOUND syscall.Errno = 1122 ERROR_FLOPPY_WRONG_CYLINDER syscall.Errno = 1123 ERROR_FLOPPY_UNKNOWN_ERROR syscall.Errno = 1124 ERROR_FLOPPY_BAD_REGISTERS syscall.Errno = 1125 ERROR_DISK_RECALIBRATE_FAILED syscall.Errno = 1126 ERROR_DISK_OPERATION_FAILED syscall.Errno = 1127 ERROR_DISK_RESET_FAILED syscall.Errno = 1128 ERROR_EOM_OVERFLOW syscall.Errno = 1129 ERROR_NOT_ENOUGH_SERVER_MEMORY syscall.Errno = 1130 ERROR_POSSIBLE_DEADLOCK syscall.Errno = 1131 ERROR_MAPPED_ALIGNMENT syscall.Errno = 1132 ERROR_SET_POWER_STATE_VETOED syscall.Errno = 1140 ERROR_SET_POWER_STATE_FAILED syscall.Errno = 1141 ERROR_TOO_MANY_LINKS syscall.Errno = 1142 ERROR_OLD_WIN_VERSION syscall.Errno = 1150 ERROR_APP_WRONG_OS syscall.Errno = 1151 ERROR_SINGLE_INSTANCE_APP syscall.Errno = 1152 ERROR_RMODE_APP syscall.Errno = 1153 ERROR_INVALID_DLL syscall.Errno = 1154 ERROR_NO_ASSOCIATION syscall.Errno = 1155 ERROR_DDE_FAIL syscall.Errno = 1156 ERROR_DLL_NOT_FOUND syscall.Errno = 1157 ERROR_NO_MORE_USER_HANDLES syscall.Errno = 1158 ERROR_MESSAGE_SYNC_ONLY syscall.Errno = 1159 ERROR_SOURCE_ELEMENT_EMPTY syscall.Errno = 1160 ERROR_DESTINATION_ELEMENT_FULL syscall.Errno = 1161 ERROR_ILLEGAL_ELEMENT_ADDRESS syscall.Errno = 1162 ERROR_MAGAZINE_NOT_PRESENT syscall.Errno = 1163 ERROR_DEVICE_REINITIALIZATION_NEEDED syscall.Errno = 1164 ERROR_DEVICE_REQUIRES_CLEANING syscall.Errno = 1165 ERROR_DEVICE_DOOR_OPEN syscall.Errno = 1166 ERROR_DEVICE_NOT_CONNECTED syscall.Errno = 1167 ERROR_NOT_FOUND syscall.Errno = 1168 ERROR_NO_MATCH syscall.Errno = 1169 ERROR_SET_NOT_FOUND syscall.Errno = 1170 ERROR_POINT_NOT_FOUND syscall.Errno = 1171 ERROR_NO_TRACKING_SERVICE syscall.Errno = 1172 ERROR_NO_VOLUME_ID syscall.Errno = 1173 ERROR_UNABLE_TO_REMOVE_REPLACED syscall.Errno = 1175 ERROR_UNABLE_TO_MOVE_REPLACEMENT syscall.Errno = 1176 ERROR_UNABLE_TO_MOVE_REPLACEMENT_2 syscall.Errno = 1177 ERROR_JOURNAL_DELETE_IN_PROGRESS syscall.Errno = 1178 ERROR_JOURNAL_NOT_ACTIVE syscall.Errno = 1179 ERROR_POTENTIAL_FILE_FOUND syscall.Errno = 1180 ERROR_JOURNAL_ENTRY_DELETED syscall.Errno = 1181 ERROR_SHUTDOWN_IS_SCHEDULED syscall.Errno = 1190 ERROR_SHUTDOWN_USERS_LOGGED_ON syscall.Errno = 1191 ERROR_BAD_DEVICE syscall.Errno = 1200 ERROR_CONNECTION_UNAVAIL syscall.Errno = 1201 ERROR_DEVICE_ALREADY_REMEMBERED syscall.Errno = 1202 ERROR_NO_NET_OR_BAD_PATH syscall.Errno = 1203 ERROR_BAD_PROVIDER syscall.Errno = 1204 ERROR_CANNOT_OPEN_PROFILE syscall.Errno = 1205 ERROR_BAD_PROFILE syscall.Errno = 1206 ERROR_NOT_CONTAINER syscall.Errno = 1207 ERROR_EXTENDED_ERROR syscall.Errno = 1208 ERROR_INVALID_GROUPNAME syscall.Errno = 1209 ERROR_INVALID_COMPUTERNAME syscall.Errno = 1210 ERROR_INVALID_EVENTNAME syscall.Errno = 1211 ERROR_INVALID_DOMAINNAME syscall.Errno = 1212 ERROR_INVALID_SERVICENAME syscall.Errno = 1213 ERROR_INVALID_NETNAME syscall.Errno = 1214 ERROR_INVALID_SHARENAME syscall.Errno = 1215 ERROR_INVALID_PASSWORDNAME syscall.Errno = 1216 ERROR_INVALID_MESSAGENAME syscall.Errno = 1217 ERROR_INVALID_MESSAGEDEST syscall.Errno = 1218 ERROR_SESSION_CREDENTIAL_CONFLICT syscall.Errno = 1219 ERROR_REMOTE_SESSION_LIMIT_EXCEEDED syscall.Errno = 1220 ERROR_DUP_DOMAINNAME syscall.Errno = 1221 ERROR_NO_NETWORK syscall.Errno = 1222 ERROR_CANCELLED syscall.Errno = 1223 ERROR_USER_MAPPED_FILE syscall.Errno = 1224 ERROR_CONNECTION_REFUSED syscall.Errno = 1225 ERROR_GRACEFUL_DISCONNECT syscall.Errno = 1226 ERROR_ADDRESS_ALREADY_ASSOCIATED syscall.Errno = 1227 ERROR_ADDRESS_NOT_ASSOCIATED syscall.Errno = 1228 ERROR_CONNECTION_INVALID syscall.Errno = 1229 ERROR_CONNECTION_ACTIVE syscall.Errno = 1230 ERROR_NETWORK_UNREACHABLE syscall.Errno = 1231 ERROR_HOST_UNREACHABLE syscall.Errno = 1232 ERROR_PROTOCOL_UNREACHABLE syscall.Errno = 1233 ERROR_PORT_UNREACHABLE syscall.Errno = 1234 ERROR_REQUEST_ABORTED syscall.Errno = 1235 ERROR_CONNECTION_ABORTED syscall.Errno = 1236 ERROR_RETRY syscall.Errno = 1237 ERROR_CONNECTION_COUNT_LIMIT syscall.Errno = 1238 ERROR_LOGIN_TIME_RESTRICTION syscall.Errno = 1239 ERROR_LOGIN_WKSTA_RESTRICTION syscall.Errno = 1240 ERROR_INCORRECT_ADDRESS syscall.Errno = 1241 ERROR_ALREADY_REGISTERED syscall.Errno = 1242 ERROR_SERVICE_NOT_FOUND syscall.Errno = 1243 ERROR_NOT_AUTHENTICATED syscall.Errno = 1244 ERROR_NOT_LOGGED_ON syscall.Errno = 1245 ERROR_CONTINUE syscall.Errno = 1246 ERROR_ALREADY_INITIALIZED syscall.Errno = 1247 ERROR_NO_MORE_DEVICES syscall.Errno = 1248 ERROR_NO_SUCH_SITE syscall.Errno = 1249 ERROR_DOMAIN_CONTROLLER_EXISTS syscall.Errno = 1250 ERROR_ONLY_IF_CONNECTED syscall.Errno = 1251 ERROR_OVERRIDE_NOCHANGES syscall.Errno = 1252 ERROR_BAD_USER_PROFILE syscall.Errno = 1253 ERROR_NOT_SUPPORTED_ON_SBS syscall.Errno = 1254 ERROR_SERVER_SHUTDOWN_IN_PROGRESS syscall.Errno = 1255 ERROR_HOST_DOWN syscall.Errno = 1256 ERROR_NON_ACCOUNT_SID syscall.Errno = 1257 ERROR_NON_DOMAIN_SID syscall.Errno = 1258 ERROR_APPHELP_BLOCK syscall.Errno = 1259 ERROR_ACCESS_DISABLED_BY_POLICY syscall.Errno = 1260 ERROR_REG_NAT_CONSUMPTION syscall.Errno = 1261 ERROR_CSCSHARE_OFFLINE syscall.Errno = 1262 ERROR_PKINIT_FAILURE syscall.Errno = 1263 ERROR_SMARTCARD_SUBSYSTEM_FAILURE syscall.Errno = 1264 ERROR_DOWNGRADE_DETECTED syscall.Errno = 1265 ERROR_MACHINE_LOCKED syscall.Errno = 1271 ERROR_SMB_GUEST_LOGON_BLOCKED syscall.Errno = 1272 ERROR_CALLBACK_SUPPLIED_INVALID_DATA syscall.Errno = 1273 ERROR_SYNC_FOREGROUND_REFRESH_REQUIRED syscall.Errno = 1274 ERROR_DRIVER_BLOCKED syscall.Errno = 1275 ERROR_INVALID_IMPORT_OF_NON_DLL syscall.Errno = 1276 ERROR_ACCESS_DISABLED_WEBBLADE syscall.Errno = 1277 ERROR_ACCESS_DISABLED_WEBBLADE_TAMPER syscall.Errno = 1278 ERROR_RECOVERY_FAILURE syscall.Errno = 1279 ERROR_ALREADY_FIBER syscall.Errno = 1280 ERROR_ALREADY_THREAD syscall.Errno = 1281 ERROR_STACK_BUFFER_OVERRUN syscall.Errno = 1282 ERROR_PARAMETER_QUOTA_EXCEEDED syscall.Errno = 1283 ERROR_DEBUGGER_INACTIVE syscall.Errno = 1284 ERROR_DELAY_LOAD_FAILED syscall.Errno = 1285 ERROR_VDM_DISALLOWED syscall.Errno = 1286 ERROR_UNIDENTIFIED_ERROR syscall.Errno = 1287 ERROR_INVALID_CRUNTIME_PARAMETER syscall.Errno = 1288 ERROR_BEYOND_VDL syscall.Errno = 1289 ERROR_INCOMPATIBLE_SERVICE_SID_TYPE syscall.Errno = 1290 ERROR_DRIVER_PROCESS_TERMINATED syscall.Errno = 1291 ERROR_IMPLEMENTATION_LIMIT syscall.Errno = 1292 ERROR_PROCESS_IS_PROTECTED syscall.Errno = 1293 ERROR_SERVICE_NOTIFY_CLIENT_LAGGING syscall.Errno = 1294 ERROR_DISK_QUOTA_EXCEEDED syscall.Errno = 1295 ERROR_CONTENT_BLOCKED syscall.Errno = 1296 ERROR_INCOMPATIBLE_SERVICE_PRIVILEGE syscall.Errno = 1297 ERROR_APP_HANG syscall.Errno = 1298 ERROR_INVALID_LABEL syscall.Errno = 1299 ERROR_NOT_ALL_ASSIGNED syscall.Errno = 1300 ERROR_SOME_NOT_MAPPED syscall.Errno = 1301 ERROR_NO_QUOTAS_FOR_ACCOUNT syscall.Errno = 1302 ERROR_LOCAL_USER_SESSION_KEY syscall.Errno = 1303 ERROR_NULL_LM_PASSWORD syscall.Errno = 1304 ERROR_UNKNOWN_REVISION syscall.Errno = 1305 ERROR_REVISION_MISMATCH syscall.Errno = 1306 ERROR_INVALID_OWNER syscall.Errno = 1307 ERROR_INVALID_PRIMARY_GROUP syscall.Errno = 1308 ERROR_NO_IMPERSONATION_TOKEN syscall.Errno = 1309 ERROR_CANT_DISABLE_MANDATORY syscall.Errno = 1310 ERROR_NO_LOGON_SERVERS syscall.Errno = 1311 ERROR_NO_SUCH_LOGON_SESSION syscall.Errno = 1312 ERROR_NO_SUCH_PRIVILEGE syscall.Errno = 1313 ERROR_PRIVILEGE_NOT_HELD syscall.Errno = 1314 ERROR_INVALID_ACCOUNT_NAME syscall.Errno = 1315 ERROR_USER_EXISTS syscall.Errno = 1316 ERROR_NO_SUCH_USER syscall.Errno = 1317 ERROR_GROUP_EXISTS syscall.Errno = 1318 ERROR_NO_SUCH_GROUP syscall.Errno = 1319 ERROR_MEMBER_IN_GROUP syscall.Errno = 1320 ERROR_MEMBER_NOT_IN_GROUP syscall.Errno = 1321 ERROR_LAST_ADMIN syscall.Errno = 1322 ERROR_WRONG_PASSWORD syscall.Errno = 1323 ERROR_ILL_FORMED_PASSWORD syscall.Errno = 1324 ERROR_PASSWORD_RESTRICTION syscall.Errno = 1325 ERROR_LOGON_FAILURE syscall.Errno = 1326 ERROR_ACCOUNT_RESTRICTION syscall.Errno = 1327 ERROR_INVALID_LOGON_HOURS syscall.Errno = 1328 ERROR_INVALID_WORKSTATION syscall.Errno = 1329 ERROR_PASSWORD_EXPIRED syscall.Errno = 1330 ERROR_ACCOUNT_DISABLED syscall.Errno = 1331 ERROR_NONE_MAPPED syscall.Errno = 1332 ERROR_TOO_MANY_LUIDS_REQUESTED syscall.Errno = 1333 ERROR_LUIDS_EXHAUSTED syscall.Errno = 1334 ERROR_INVALID_SUB_AUTHORITY syscall.Errno = 1335 ERROR_INVALID_ACL syscall.Errno = 1336 ERROR_INVALID_SID syscall.Errno = 1337 ERROR_INVALID_SECURITY_DESCR syscall.Errno = 1338 ERROR_BAD_INHERITANCE_ACL syscall.Errno = 1340 ERROR_SERVER_DISABLED syscall.Errno = 1341 ERROR_SERVER_NOT_DISABLED syscall.Errno = 1342 ERROR_INVALID_ID_AUTHORITY syscall.Errno = 1343 ERROR_ALLOTTED_SPACE_EXCEEDED syscall.Errno = 1344 ERROR_INVALID_GROUP_ATTRIBUTES syscall.Errno = 1345 ERROR_BAD_IMPERSONATION_LEVEL syscall.Errno = 1346 ERROR_CANT_OPEN_ANONYMOUS syscall.Errno = 1347 ERROR_BAD_VALIDATION_CLASS syscall.Errno = 1348 ERROR_BAD_TOKEN_TYPE syscall.Errno = 1349 ERROR_NO_SECURITY_ON_OBJECT syscall.Errno = 1350 ERROR_CANT_ACCESS_DOMAIN_INFO syscall.Errno = 1351 ERROR_INVALID_SERVER_STATE syscall.Errno = 1352 ERROR_INVALID_DOMAIN_STATE syscall.Errno = 1353 ERROR_INVALID_DOMAIN_ROLE syscall.Errno = 1354 ERROR_NO_SUCH_DOMAIN syscall.Errno = 1355 ERROR_DOMAIN_EXISTS syscall.Errno = 1356 ERROR_DOMAIN_LIMIT_EXCEEDED syscall.Errno = 1357 ERROR_INTERNAL_DB_CORRUPTION syscall.Errno = 1358 ERROR_INTERNAL_ERROR syscall.Errno = 1359 ERROR_GENERIC_NOT_MAPPED syscall.Errno = 1360 ERROR_BAD_DESCRIPTOR_FORMAT syscall.Errno = 1361 ERROR_NOT_LOGON_PROCESS syscall.Errno = 1362 ERROR_LOGON_SESSION_EXISTS syscall.Errno = 1363 ERROR_NO_SUCH_PACKAGE syscall.Errno = 1364 ERROR_BAD_LOGON_SESSION_STATE syscall.Errno = 1365 ERROR_LOGON_SESSION_COLLISION syscall.Errno = 1366 ERROR_INVALID_LOGON_TYPE syscall.Errno = 1367 ERROR_CANNOT_IMPERSONATE syscall.Errno = 1368 ERROR_RXACT_INVALID_STATE syscall.Errno = 1369 ERROR_RXACT_COMMIT_FAILURE syscall.Errno = 1370 ERROR_SPECIAL_ACCOUNT syscall.Errno = 1371 ERROR_SPECIAL_GROUP syscall.Errno = 1372 ERROR_SPECIAL_USER syscall.Errno = 1373 ERROR_MEMBERS_PRIMARY_GROUP syscall.Errno = 1374 ERROR_TOKEN_ALREADY_IN_USE syscall.Errno = 1375 ERROR_NO_SUCH_ALIAS syscall.Errno = 1376 ERROR_MEMBER_NOT_IN_ALIAS syscall.Errno = 1377 ERROR_MEMBER_IN_ALIAS syscall.Errno = 1378 ERROR_ALIAS_EXISTS syscall.Errno = 1379 ERROR_LOGON_NOT_GRANTED syscall.Errno = 1380 ERROR_TOO_MANY_SECRETS syscall.Errno = 1381 ERROR_SECRET_TOO_LONG syscall.Errno = 1382 ERROR_INTERNAL_DB_ERROR syscall.Errno = 1383 ERROR_TOO_MANY_CONTEXT_IDS syscall.Errno = 1384 ERROR_LOGON_TYPE_NOT_GRANTED syscall.Errno = 1385 ERROR_NT_CROSS_ENCRYPTION_REQUIRED syscall.Errno = 1386 ERROR_NO_SUCH_MEMBER syscall.Errno = 1387 ERROR_INVALID_MEMBER syscall.Errno = 1388 ERROR_TOO_MANY_SIDS syscall.Errno = 1389 ERROR_LM_CROSS_ENCRYPTION_REQUIRED syscall.Errno = 1390 ERROR_NO_INHERITANCE syscall.Errno = 1391 ERROR_FILE_CORRUPT syscall.Errno = 1392 ERROR_DISK_CORRUPT syscall.Errno = 1393 ERROR_NO_USER_SESSION_KEY syscall.Errno = 1394 ERROR_LICENSE_QUOTA_EXCEEDED syscall.Errno = 1395 ERROR_WRONG_TARGET_NAME syscall.Errno = 1396 ERROR_MUTUAL_AUTH_FAILED syscall.Errno = 1397 ERROR_TIME_SKEW syscall.Errno = 1398 ERROR_CURRENT_DOMAIN_NOT_ALLOWED syscall.Errno = 1399 ERROR_INVALID_WINDOW_HANDLE syscall.Errno = 1400 ERROR_INVALID_MENU_HANDLE syscall.Errno = 1401 ERROR_INVALID_CURSOR_HANDLE syscall.Errno = 1402 ERROR_INVALID_ACCEL_HANDLE syscall.Errno = 1403 ERROR_INVALID_HOOK_HANDLE syscall.Errno = 1404 ERROR_INVALID_DWP_HANDLE syscall.Errno = 1405 ERROR_TLW_WITH_WSCHILD syscall.Errno = 1406 ERROR_CANNOT_FIND_WND_CLASS syscall.Errno = 1407 ERROR_WINDOW_OF_OTHER_THREAD syscall.Errno = 1408 ERROR_HOTKEY_ALREADY_REGISTERED syscall.Errno = 1409 ERROR_CLASS_ALREADY_EXISTS syscall.Errno = 1410 ERROR_CLASS_DOES_NOT_EXIST syscall.Errno = 1411 ERROR_CLASS_HAS_WINDOWS syscall.Errno = 1412 ERROR_INVALID_INDEX syscall.Errno = 1413 ERROR_INVALID_ICON_HANDLE syscall.Errno = 1414 ERROR_PRIVATE_DIALOG_INDEX syscall.Errno = 1415 ERROR_LISTBOX_ID_NOT_FOUND syscall.Errno = 1416 ERROR_NO_WILDCARD_CHARACTERS syscall.Errno = 1417 ERROR_CLIPBOARD_NOT_OPEN syscall.Errno = 1418 ERROR_HOTKEY_NOT_REGISTERED syscall.Errno = 1419 ERROR_WINDOW_NOT_DIALOG syscall.Errno = 1420 ERROR_CONTROL_ID_NOT_FOUND syscall.Errno = 1421 ERROR_INVALID_COMBOBOX_MESSAGE syscall.Errno = 1422 ERROR_WINDOW_NOT_COMBOBOX syscall.Errno = 1423 ERROR_INVALID_EDIT_HEIGHT syscall.Errno = 1424 ERROR_DC_NOT_FOUND syscall.Errno = 1425 ERROR_INVALID_HOOK_FILTER syscall.Errno = 1426 ERROR_INVALID_FILTER_PROC syscall.Errno = 1427 ERROR_HOOK_NEEDS_HMOD syscall.Errno = 1428 ERROR_GLOBAL_ONLY_HOOK syscall.Errno = 1429 ERROR_JOURNAL_HOOK_SET syscall.Errno = 1430 ERROR_HOOK_NOT_INSTALLED syscall.Errno = 1431 ERROR_INVALID_LB_MESSAGE syscall.Errno = 1432 ERROR_SETCOUNT_ON_BAD_LB syscall.Errno = 1433 ERROR_LB_WITHOUT_TABSTOPS syscall.Errno = 1434 ERROR_DESTROY_OBJECT_OF_OTHER_THREAD syscall.Errno = 1435 ERROR_CHILD_WINDOW_MENU syscall.Errno = 1436 ERROR_NO_SYSTEM_MENU syscall.Errno = 1437 ERROR_INVALID_MSGBOX_STYLE syscall.Errno = 1438 ERROR_INVALID_SPI_VALUE syscall.Errno = 1439 ERROR_SCREEN_ALREADY_LOCKED syscall.Errno = 1440 ERROR_HWNDS_HAVE_DIFF_PARENT syscall.Errno = 1441 ERROR_NOT_CHILD_WINDOW syscall.Errno = 1442 ERROR_INVALID_GW_COMMAND syscall.Errno = 1443 ERROR_INVALID_THREAD_ID syscall.Errno = 1444 ERROR_NON_MDICHILD_WINDOW syscall.Errno = 1445 ERROR_POPUP_ALREADY_ACTIVE syscall.Errno = 1446 ERROR_NO_SCROLLBARS syscall.Errno = 1447 ERROR_INVALID_SCROLLBAR_RANGE syscall.Errno = 1448 ERROR_INVALID_SHOWWIN_COMMAND syscall.Errno = 1449 ERROR_NO_SYSTEM_RESOURCES syscall.Errno = 1450 ERROR_NONPAGED_SYSTEM_RESOURCES syscall.Errno = 1451 ERROR_PAGED_SYSTEM_RESOURCES syscall.Errno = 1452 ERROR_WORKING_SET_QUOTA syscall.Errno = 1453 ERROR_PAGEFILE_QUOTA syscall.Errno = 1454 ERROR_COMMITMENT_LIMIT syscall.Errno = 1455 ERROR_MENU_ITEM_NOT_FOUND syscall.Errno = 1456 ERROR_INVALID_KEYBOARD_HANDLE syscall.Errno = 1457 ERROR_HOOK_TYPE_NOT_ALLOWED syscall.Errno = 1458 ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION syscall.Errno = 1459 ERROR_TIMEOUT syscall.Errno = 1460 ERROR_INVALID_MONITOR_HANDLE syscall.Errno = 1461 ERROR_INCORRECT_SIZE syscall.Errno = 1462 ERROR_SYMLINK_CLASS_DISABLED syscall.Errno = 1463 ERROR_SYMLINK_NOT_SUPPORTED syscall.Errno = 1464 ERROR_XML_PARSE_ERROR syscall.Errno = 1465 ERROR_XMLDSIG_ERROR syscall.Errno = 1466 ERROR_RESTART_APPLICATION syscall.Errno = 1467 ERROR_WRONG_COMPARTMENT syscall.Errno = 1468 ERROR_AUTHIP_FAILURE syscall.Errno = 1469 ERROR_NO_NVRAM_RESOURCES syscall.Errno = 1470 ERROR_NOT_GUI_PROCESS syscall.Errno = 1471 ERROR_EVENTLOG_FILE_CORRUPT syscall.Errno = 1500 ERROR_EVENTLOG_CANT_START syscall.Errno = 1501 ERROR_LOG_FILE_FULL syscall.Errno = 1502 ERROR_EVENTLOG_FILE_CHANGED syscall.Errno = 1503 ERROR_CONTAINER_ASSIGNED syscall.Errno = 1504 ERROR_JOB_NO_CONTAINER syscall.Errno = 1505 ERROR_INVALID_TASK_NAME syscall.Errno = 1550 ERROR_INVALID_TASK_INDEX syscall.Errno = 1551 ERROR_THREAD_ALREADY_IN_TASK syscall.Errno = 1552 ERROR_INSTALL_SERVICE_FAILURE syscall.Errno = 1601 ERROR_INSTALL_USEREXIT syscall.Errno = 1602 ERROR_INSTALL_FAILURE syscall.Errno = 1603 ERROR_INSTALL_SUSPEND syscall.Errno = 1604 ERROR_UNKNOWN_PRODUCT syscall.Errno = 1605 ERROR_UNKNOWN_FEATURE syscall.Errno = 1606 ERROR_UNKNOWN_COMPONENT syscall.Errno = 1607 ERROR_UNKNOWN_PROPERTY syscall.Errno = 1608 ERROR_INVALID_HANDLE_STATE syscall.Errno = 1609 ERROR_BAD_CONFIGURATION syscall.Errno = 1610 ERROR_INDEX_ABSENT syscall.Errno = 1611 ERROR_INSTALL_SOURCE_ABSENT syscall.Errno = 1612 ERROR_INSTALL_PACKAGE_VERSION syscall.Errno = 1613 ERROR_PRODUCT_UNINSTALLED syscall.Errno = 1614 ERROR_BAD_QUERY_SYNTAX syscall.Errno = 1615 ERROR_INVALID_FIELD syscall.Errno = 1616 ERROR_DEVICE_REMOVED syscall.Errno = 1617 ERROR_INSTALL_ALREADY_RUNNING syscall.Errno = 1618 ERROR_INSTALL_PACKAGE_OPEN_FAILED syscall.Errno = 1619 ERROR_INSTALL_PACKAGE_INVALID syscall.Errno = 1620 ERROR_INSTALL_UI_FAILURE syscall.Errno = 1621 ERROR_INSTALL_LOG_FAILURE syscall.Errno = 1622 ERROR_INSTALL_LANGUAGE_UNSUPPORTED syscall.Errno = 1623 ERROR_INSTALL_TRANSFORM_FAILURE syscall.Errno = 1624 ERROR_INSTALL_PACKAGE_REJECTED syscall.Errno = 1625 ERROR_FUNCTION_NOT_CALLED syscall.Errno = 1626 ERROR_FUNCTION_FAILED syscall.Errno = 1627 ERROR_INVALID_TABLE syscall.Errno = 1628 ERROR_DATATYPE_MISMATCH syscall.Errno = 1629 ERROR_UNSUPPORTED_TYPE syscall.Errno = 1630 ERROR_CREATE_FAILED syscall.Errno = 1631 ERROR_INSTALL_TEMP_UNWRITABLE syscall.Errno = 1632 ERROR_INSTALL_PLATFORM_UNSUPPORTED syscall.Errno = 1633 ERROR_INSTALL_NOTUSED syscall.Errno = 1634 ERROR_PATCH_PACKAGE_OPEN_FAILED syscall.Errno = 1635 ERROR_PATCH_PACKAGE_INVALID syscall.Errno = 1636 ERROR_PATCH_PACKAGE_UNSUPPORTED syscall.Errno = 1637 ERROR_PRODUCT_VERSION syscall.Errno = 1638 ERROR_INVALID_COMMAND_LINE syscall.Errno = 1639 ERROR_INSTALL_REMOTE_DISALLOWED syscall.Errno = 1640 ERROR_SUCCESS_REBOOT_INITIATED syscall.Errno = 1641 ERROR_PATCH_TARGET_NOT_FOUND syscall.Errno = 1642 ERROR_PATCH_PACKAGE_REJECTED syscall.Errno = 1643 ERROR_INSTALL_TRANSFORM_REJECTED syscall.Errno = 1644 ERROR_INSTALL_REMOTE_PROHIBITED syscall.Errno = 1645 ERROR_PATCH_REMOVAL_UNSUPPORTED syscall.Errno = 1646 ERROR_UNKNOWN_PATCH syscall.Errno = 1647 ERROR_PATCH_NO_SEQUENCE syscall.Errno = 1648 ERROR_PATCH_REMOVAL_DISALLOWED syscall.Errno = 1649 ERROR_INVALID_PATCH_XML syscall.Errno = 1650 ERROR_PATCH_MANAGED_ADVERTISED_PRODUCT syscall.Errno = 1651 ERROR_INSTALL_SERVICE_SAFEBOOT syscall.Errno = 1652 ERROR_FAIL_FAST_EXCEPTION syscall.Errno = 1653 ERROR_INSTALL_REJECTED syscall.Errno = 1654 ERROR_DYNAMIC_CODE_BLOCKED syscall.Errno = 1655 ERROR_NOT_SAME_OBJECT syscall.Errno = 1656 ERROR_STRICT_CFG_VIOLATION syscall.Errno = 1657 ERROR_SET_CONTEXT_DENIED syscall.Errno = 1660 ERROR_CROSS_PARTITION_VIOLATION syscall.Errno = 1661 RPC_S_INVALID_STRING_BINDING syscall.Errno = 1700 RPC_S_WRONG_KIND_OF_BINDING syscall.Errno = 1701 RPC_S_INVALID_BINDING syscall.Errno = 1702 RPC_S_PROTSEQ_NOT_SUPPORTED syscall.Errno = 1703 RPC_S_INVALID_RPC_PROTSEQ syscall.Errno = 1704 RPC_S_INVALID_STRING_UUID syscall.Errno = 1705 RPC_S_INVALID_ENDPOINT_FORMAT syscall.Errno = 1706 RPC_S_INVALID_NET_ADDR syscall.Errno = 1707 RPC_S_NO_ENDPOINT_FOUND syscall.Errno = 1708 RPC_S_INVALID_TIMEOUT syscall.Errno = 1709 RPC_S_OBJECT_NOT_FOUND syscall.Errno = 1710 RPC_S_ALREADY_REGISTERED syscall.Errno = 1711 RPC_S_TYPE_ALREADY_REGISTERED syscall.Errno = 1712 RPC_S_ALREADY_LISTENING syscall.Errno = 1713 RPC_S_NO_PROTSEQS_REGISTERED syscall.Errno = 1714 RPC_S_NOT_LISTENING syscall.Errno = 1715 RPC_S_UNKNOWN_MGR_TYPE syscall.Errno = 1716 RPC_S_UNKNOWN_IF syscall.Errno = 1717 RPC_S_NO_BINDINGS syscall.Errno = 1718 RPC_S_NO_PROTSEQS syscall.Errno = 1719 RPC_S_CANT_CREATE_ENDPOINT syscall.Errno = 1720 RPC_S_OUT_OF_RESOURCES syscall.Errno = 1721 RPC_S_SERVER_UNAVAILABLE syscall.Errno = 1722 RPC_S_SERVER_TOO_BUSY syscall.Errno = 1723 RPC_S_INVALID_NETWORK_OPTIONS syscall.Errno = 1724 RPC_S_NO_CALL_ACTIVE syscall.Errno = 1725 RPC_S_CALL_FAILED syscall.Errno = 1726 RPC_S_CALL_FAILED_DNE syscall.Errno = 1727 RPC_S_PROTOCOL_ERROR syscall.Errno = 1728 RPC_S_PROXY_ACCESS_DENIED syscall.Errno = 1729 RPC_S_UNSUPPORTED_TRANS_SYN syscall.Errno = 1730 RPC_S_UNSUPPORTED_TYPE syscall.Errno = 1732 RPC_S_INVALID_TAG syscall.Errno = 1733 RPC_S_INVALID_BOUND syscall.Errno = 1734 RPC_S_NO_ENTRY_NAME syscall.Errno = 1735 RPC_S_INVALID_NAME_SYNTAX syscall.Errno = 1736 RPC_S_UNSUPPORTED_NAME_SYNTAX syscall.Errno = 1737 RPC_S_UUID_NO_ADDRESS syscall.Errno = 1739 RPC_S_DUPLICATE_ENDPOINT syscall.Errno = 1740 RPC_S_UNKNOWN_AUTHN_TYPE syscall.Errno = 1741 RPC_S_MAX_CALLS_TOO_SMALL syscall.Errno = 1742 RPC_S_STRING_TOO_LONG syscall.Errno = 1743 RPC_S_PROTSEQ_NOT_FOUND syscall.Errno = 1744 RPC_S_PROCNUM_OUT_OF_RANGE syscall.Errno = 1745 RPC_S_BINDING_HAS_NO_AUTH syscall.Errno = 1746 RPC_S_UNKNOWN_AUTHN_SERVICE syscall.Errno = 1747 RPC_S_UNKNOWN_AUTHN_LEVEL syscall.Errno = 1748 RPC_S_INVALID_AUTH_IDENTITY syscall.Errno = 1749 RPC_S_UNKNOWN_AUTHZ_SERVICE syscall.Errno = 1750 EPT_S_INVALID_ENTRY syscall.Errno = 1751 EPT_S_CANT_PERFORM_OP syscall.Errno = 1752 EPT_S_NOT_REGISTERED syscall.Errno = 1753 RPC_S_NOTHING_TO_EXPORT syscall.Errno = 1754 RPC_S_INCOMPLETE_NAME syscall.Errno = 1755 RPC_S_INVALID_VERS_OPTION syscall.Errno = 1756 RPC_S_NO_MORE_MEMBERS syscall.Errno = 1757 RPC_S_NOT_ALL_OBJS_UNEXPORTED syscall.Errno = 1758 RPC_S_INTERFACE_NOT_FOUND syscall.Errno = 1759 RPC_S_ENTRY_ALREADY_EXISTS syscall.Errno = 1760 RPC_S_ENTRY_NOT_FOUND syscall.Errno = 1761 RPC_S_NAME_SERVICE_UNAVAILABLE syscall.Errno = 1762 RPC_S_INVALID_NAF_ID syscall.Errno = 1763 RPC_S_CANNOT_SUPPORT syscall.Errno = 1764 RPC_S_NO_CONTEXT_AVAILABLE syscall.Errno = 1765 RPC_S_INTERNAL_ERROR syscall.Errno = 1766 RPC_S_ZERO_DIVIDE syscall.Errno = 1767 RPC_S_ADDRESS_ERROR syscall.Errno = 1768 RPC_S_FP_DIV_ZERO syscall.Errno = 1769 RPC_S_FP_UNDERFLOW syscall.Errno = 1770 RPC_S_FP_OVERFLOW syscall.Errno = 1771 RPC_X_NO_MORE_ENTRIES syscall.Errno = 1772 RPC_X_SS_CHAR_TRANS_OPEN_FAIL syscall.Errno = 1773 RPC_X_SS_CHAR_TRANS_SHORT_FILE syscall.Errno = 1774 RPC_X_SS_IN_NULL_CONTEXT syscall.Errno = 1775 RPC_X_SS_CONTEXT_DAMAGED syscall.Errno = 1777 RPC_X_SS_HANDLES_MISMATCH syscall.Errno = 1778 RPC_X_SS_CANNOT_GET_CALL_HANDLE syscall.Errno = 1779 RPC_X_NULL_REF_POINTER syscall.Errno = 1780 RPC_X_ENUM_VALUE_OUT_OF_RANGE syscall.Errno = 1781 RPC_X_BYTE_COUNT_TOO_SMALL syscall.Errno = 1782 RPC_X_BAD_STUB_DATA syscall.Errno = 1783 ERROR_INVALID_USER_BUFFER syscall.Errno = 1784 ERROR_UNRECOGNIZED_MEDIA syscall.Errno = 1785 ERROR_NO_TRUST_LSA_SECRET syscall.Errno = 1786 ERROR_NO_TRUST_SAM_ACCOUNT syscall.Errno = 1787 ERROR_TRUSTED_DOMAIN_FAILURE syscall.Errno = 1788 ERROR_TRUSTED_RELATIONSHIP_FAILURE syscall.Errno = 1789 ERROR_TRUST_FAILURE syscall.Errno = 1790 RPC_S_CALL_IN_PROGRESS syscall.Errno = 1791 ERROR_NETLOGON_NOT_STARTED syscall.Errno = 1792 ERROR_ACCOUNT_EXPIRED syscall.Errno = 1793 ERROR_REDIRECTOR_HAS_OPEN_HANDLES syscall.Errno = 1794 ERROR_PRINTER_DRIVER_ALREADY_INSTALLED syscall.Errno = 1795 ERROR_UNKNOWN_PORT syscall.Errno = 1796 ERROR_UNKNOWN_PRINTER_DRIVER syscall.Errno = 1797 ERROR_UNKNOWN_PRINTPROCESSOR syscall.Errno = 1798 ERROR_INVALID_SEPARATOR_FILE syscall.Errno = 1799 ERROR_INVALID_PRIORITY syscall.Errno = 1800 ERROR_INVALID_PRINTER_NAME syscall.Errno = 1801 ERROR_PRINTER_ALREADY_EXISTS syscall.Errno = 1802 ERROR_INVALID_PRINTER_COMMAND syscall.Errno = 1803 ERROR_INVALID_DATATYPE syscall.Errno = 1804 ERROR_INVALID_ENVIRONMENT syscall.Errno = 1805 RPC_S_NO_MORE_BINDINGS syscall.Errno = 1806 ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT syscall.Errno = 1807 ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT syscall.Errno = 1808 ERROR_NOLOGON_SERVER_TRUST_ACCOUNT syscall.Errno = 1809 ERROR_DOMAIN_TRUST_INCONSISTENT syscall.Errno = 1810 ERROR_SERVER_HAS_OPEN_HANDLES syscall.Errno = 1811 ERROR_RESOURCE_DATA_NOT_FOUND syscall.Errno = 1812 ERROR_RESOURCE_TYPE_NOT_FOUND syscall.Errno = 1813 ERROR_RESOURCE_NAME_NOT_FOUND syscall.Errno = 1814 ERROR_RESOURCE_LANG_NOT_FOUND syscall.Errno = 1815 ERROR_NOT_ENOUGH_QUOTA syscall.Errno = 1816 RPC_S_NO_INTERFACES syscall.Errno = 1817 RPC_S_CALL_CANCELLED syscall.Errno = 1818 RPC_S_BINDING_INCOMPLETE syscall.Errno = 1819 RPC_S_COMM_FAILURE syscall.Errno = 1820 RPC_S_UNSUPPORTED_AUTHN_LEVEL syscall.Errno = 1821 RPC_S_NO_PRINC_NAME syscall.Errno = 1822 RPC_S_NOT_RPC_ERROR syscall.Errno = 1823 RPC_S_UUID_LOCAL_ONLY syscall.Errno = 1824 RPC_S_SEC_PKG_ERROR syscall.Errno = 1825 RPC_S_NOT_CANCELLED syscall.Errno = 1826 RPC_X_INVALID_ES_ACTION syscall.Errno = 1827 RPC_X_WRONG_ES_VERSION syscall.Errno = 1828 RPC_X_WRONG_STUB_VERSION syscall.Errno = 1829 RPC_X_INVALID_PIPE_OBJECT syscall.Errno = 1830 RPC_X_WRONG_PIPE_ORDER syscall.Errno = 1831 RPC_X_WRONG_PIPE_VERSION syscall.Errno = 1832 RPC_S_COOKIE_AUTH_FAILED syscall.Errno = 1833 RPC_S_DO_NOT_DISTURB syscall.Errno = 1834 RPC_S_SYSTEM_HANDLE_COUNT_EXCEEDED syscall.Errno = 1835 RPC_S_SYSTEM_HANDLE_TYPE_MISMATCH syscall.Errno = 1836 RPC_S_GROUP_MEMBER_NOT_FOUND syscall.Errno = 1898 EPT_S_CANT_CREATE syscall.Errno = 1899 RPC_S_INVALID_OBJECT syscall.Errno = 1900 ERROR_INVALID_TIME syscall.Errno = 1901 ERROR_INVALID_FORM_NAME syscall.Errno = 1902 ERROR_INVALID_FORM_SIZE syscall.Errno = 1903 ERROR_ALREADY_WAITING syscall.Errno = 1904 ERROR_PRINTER_DELETED syscall.Errno = 1905 ERROR_INVALID_PRINTER_STATE syscall.Errno = 1906 ERROR_PASSWORD_MUST_CHANGE syscall.Errno = 1907 ERROR_DOMAIN_CONTROLLER_NOT_FOUND syscall.Errno = 1908 ERROR_ACCOUNT_LOCKED_OUT syscall.Errno = 1909 OR_INVALID_OXID syscall.Errno = 1910 OR_INVALID_OID syscall.Errno = 1911 OR_INVALID_SET syscall.Errno = 1912 RPC_S_SEND_INCOMPLETE syscall.Errno = 1913 RPC_S_INVALID_ASYNC_HANDLE syscall.Errno = 1914 RPC_S_INVALID_ASYNC_CALL syscall.Errno = 1915 RPC_X_PIPE_CLOSED syscall.Errno = 1916 RPC_X_PIPE_DISCIPLINE_ERROR syscall.Errno = 1917 RPC_X_PIPE_EMPTY syscall.Errno = 1918 ERROR_NO_SITENAME syscall.Errno = 1919 ERROR_CANT_ACCESS_FILE syscall.Errno = 1920 ERROR_CANT_RESOLVE_FILENAME syscall.Errno = 1921 RPC_S_ENTRY_TYPE_MISMATCH syscall.Errno = 1922 RPC_S_NOT_ALL_OBJS_EXPORTED syscall.Errno = 1923 RPC_S_INTERFACE_NOT_EXPORTED syscall.Errno = 1924 RPC_S_PROFILE_NOT_ADDED syscall.Errno = 1925 RPC_S_PRF_ELT_NOT_ADDED syscall.Errno = 1926 RPC_S_PRF_ELT_NOT_REMOVED syscall.Errno = 1927 RPC_S_GRP_ELT_NOT_ADDED syscall.Errno = 1928 RPC_S_GRP_ELT_NOT_REMOVED syscall.Errno = 1929 ERROR_KM_DRIVER_BLOCKED syscall.Errno = 1930 ERROR_CONTEXT_EXPIRED syscall.Errno = 1931 ERROR_PER_USER_TRUST_QUOTA_EXCEEDED syscall.Errno = 1932 ERROR_ALL_USER_TRUST_QUOTA_EXCEEDED syscall.Errno = 1933 ERROR_USER_DELETE_TRUST_QUOTA_EXCEEDED syscall.Errno = 1934 ERROR_AUTHENTICATION_FIREWALL_FAILED syscall.Errno = 1935 ERROR_REMOTE_PRINT_CONNECTIONS_BLOCKED syscall.Errno = 1936 ERROR_NTLM_BLOCKED syscall.Errno = 1937 ERROR_PASSWORD_CHANGE_REQUIRED syscall.Errno = 1938 ERROR_LOST_MODE_LOGON_RESTRICTION syscall.Errno = 1939 ERROR_INVALID_PIXEL_FORMAT syscall.Errno = 2000 ERROR_BAD_DRIVER syscall.Errno = 2001 ERROR_INVALID_WINDOW_STYLE syscall.Errno = 2002 ERROR_METAFILE_NOT_SUPPORTED syscall.Errno = 2003 ERROR_TRANSFORM_NOT_SUPPORTED syscall.Errno = 2004 ERROR_CLIPPING_NOT_SUPPORTED syscall.Errno = 2005 ERROR_INVALID_CMM syscall.Errno = 2010 ERROR_INVALID_PROFILE syscall.Errno = 2011 ERROR_TAG_NOT_FOUND syscall.Errno = 2012 ERROR_TAG_NOT_PRESENT syscall.Errno = 2013 ERROR_DUPLICATE_TAG syscall.Errno = 2014 ERROR_PROFILE_NOT_ASSOCIATED_WITH_DEVICE syscall.Errno = 2015 ERROR_PROFILE_NOT_FOUND syscall.Errno = 2016 ERROR_INVALID_COLORSPACE syscall.Errno = 2017 ERROR_ICM_NOT_ENABLED syscall.Errno = 2018 ERROR_DELETING_ICM_XFORM syscall.Errno = 2019 ERROR_INVALID_TRANSFORM syscall.Errno = 2020 ERROR_COLORSPACE_MISMATCH syscall.Errno = 2021 ERROR_INVALID_COLORINDEX syscall.Errno = 2022 ERROR_PROFILE_DOES_NOT_MATCH_DEVICE syscall.Errno = 2023 ERROR_CONNECTED_OTHER_PASSWORD syscall.Errno = 2108 ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT syscall.Errno = 2109 ERROR_BAD_USERNAME syscall.Errno = 2202 ERROR_NOT_CONNECTED syscall.Errno = 2250 ERROR_OPEN_FILES syscall.Errno = 2401 ERROR_ACTIVE_CONNECTIONS syscall.Errno = 2402 ERROR_DEVICE_IN_USE syscall.Errno = 2404 ERROR_UNKNOWN_PRINT_MONITOR syscall.Errno = 3000 ERROR_PRINTER_DRIVER_IN_USE syscall.Errno = 3001 ERROR_SPOOL_FILE_NOT_FOUND syscall.Errno = 3002 ERROR_SPL_NO_STARTDOC syscall.Errno = 3003 ERROR_SPL_NO_ADDJOB syscall.Errno = 3004 ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED syscall.Errno = 3005 ERROR_PRINT_MONITOR_ALREADY_INSTALLED syscall.Errno = 3006 ERROR_INVALID_PRINT_MONITOR syscall.Errno = 3007 ERROR_PRINT_MONITOR_IN_USE syscall.Errno = 3008 ERROR_PRINTER_HAS_JOBS_QUEUED syscall.Errno = 3009 ERROR_SUCCESS_REBOOT_REQUIRED syscall.Errno = 3010 ERROR_SUCCESS_RESTART_REQUIRED syscall.Errno = 3011 ERROR_PRINTER_NOT_FOUND syscall.Errno = 3012 ERROR_PRINTER_DRIVER_WARNED syscall.Errno = 3013 ERROR_PRINTER_DRIVER_BLOCKED syscall.Errno = 3014 ERROR_PRINTER_DRIVER_PACKAGE_IN_USE syscall.Errno = 3015 ERROR_CORE_DRIVER_PACKAGE_NOT_FOUND syscall.Errno = 3016 ERROR_FAIL_REBOOT_REQUIRED syscall.Errno = 3017 ERROR_FAIL_REBOOT_INITIATED syscall.Errno = 3018 ERROR_PRINTER_DRIVER_DOWNLOAD_NEEDED syscall.Errno = 3019 ERROR_PRINT_JOB_RESTART_REQUIRED syscall.Errno = 3020 ERROR_INVALID_PRINTER_DRIVER_MANIFEST syscall.Errno = 3021 ERROR_PRINTER_NOT_SHAREABLE syscall.Errno = 3022 ERROR_REQUEST_PAUSED syscall.Errno = 3050 ERROR_APPEXEC_CONDITION_NOT_SATISFIED syscall.Errno = 3060 ERROR_APPEXEC_HANDLE_INVALIDATED syscall.Errno = 3061 ERROR_APPEXEC_INVALID_HOST_GENERATION syscall.Errno = 3062 ERROR_APPEXEC_UNEXPECTED_PROCESS_REGISTRATION syscall.Errno = 3063 ERROR_APPEXEC_INVALID_HOST_STATE syscall.Errno = 3064 ERROR_APPEXEC_NO_DONOR syscall.Errno = 3065 ERROR_APPEXEC_HOST_ID_MISMATCH syscall.Errno = 3066 ERROR_APPEXEC_UNKNOWN_USER syscall.Errno = 3067 ERROR_IO_REISSUE_AS_CACHED syscall.Errno = 3950 ERROR_WINS_INTERNAL syscall.Errno = 4000 ERROR_CAN_NOT_DEL_LOCAL_WINS syscall.Errno = 4001 ERROR_STATIC_INIT syscall.Errno = 4002 ERROR_INC_BACKUP syscall.Errno = 4003 ERROR_FULL_BACKUP syscall.Errno = 4004 ERROR_REC_NON_EXISTENT syscall.Errno = 4005 ERROR_RPL_NOT_ALLOWED syscall.Errno = 4006 PEERDIST_ERROR_CONTENTINFO_VERSION_UNSUPPORTED syscall.Errno = 4050 PEERDIST_ERROR_CANNOT_PARSE_CONTENTINFO syscall.Errno = 4051 PEERDIST_ERROR_MISSING_DATA syscall.Errno = 4052 PEERDIST_ERROR_NO_MORE syscall.Errno = 4053 PEERDIST_ERROR_NOT_INITIALIZED syscall.Errno = 4054 PEERDIST_ERROR_ALREADY_INITIALIZED syscall.Errno = 4055 PEERDIST_ERROR_SHUTDOWN_IN_PROGRESS syscall.Errno = 4056 PEERDIST_ERROR_INVALIDATED syscall.Errno = 4057 PEERDIST_ERROR_ALREADY_EXISTS syscall.Errno = 4058 PEERDIST_ERROR_OPERATION_NOTFOUND syscall.Errno = 4059 PEERDIST_ERROR_ALREADY_COMPLETED syscall.Errno = 4060 PEERDIST_ERROR_OUT_OF_BOUNDS syscall.Errno = 4061 PEERDIST_ERROR_VERSION_UNSUPPORTED syscall.Errno = 4062 PEERDIST_ERROR_INVALID_CONFIGURATION syscall.Errno = 4063 PEERDIST_ERROR_NOT_LICENSED syscall.Errno = 4064 PEERDIST_ERROR_SERVICE_UNAVAILABLE syscall.Errno = 4065 PEERDIST_ERROR_TRUST_FAILURE syscall.Errno = 4066 ERROR_DHCP_ADDRESS_CONFLICT syscall.Errno = 4100 ERROR_WMI_GUID_NOT_FOUND syscall.Errno = 4200 ERROR_WMI_INSTANCE_NOT_FOUND syscall.Errno = 4201 ERROR_WMI_ITEMID_NOT_FOUND syscall.Errno = 4202 ERROR_WMI_TRY_AGAIN syscall.Errno = 4203 ERROR_WMI_DP_NOT_FOUND syscall.Errno = 4204 ERROR_WMI_UNRESOLVED_INSTANCE_REF syscall.Errno = 4205 ERROR_WMI_ALREADY_ENABLED syscall.Errno = 4206 ERROR_WMI_GUID_DISCONNECTED syscall.Errno = 4207 ERROR_WMI_SERVER_UNAVAILABLE syscall.Errno = 4208 ERROR_WMI_DP_FAILED syscall.Errno = 4209 ERROR_WMI_INVALID_MOF syscall.Errno = 4210 ERROR_WMI_INVALID_REGINFO syscall.Errno = 4211 ERROR_WMI_ALREADY_DISABLED syscall.Errno = 4212 ERROR_WMI_READ_ONLY syscall.Errno = 4213 ERROR_WMI_SET_FAILURE syscall.Errno = 4214 ERROR_NOT_APPCONTAINER syscall.Errno = 4250 ERROR_APPCONTAINER_REQUIRED syscall.Errno = 4251 ERROR_NOT_SUPPORTED_IN_APPCONTAINER syscall.Errno = 4252 ERROR_INVALID_PACKAGE_SID_LENGTH syscall.Errno = 4253 ERROR_INVALID_MEDIA syscall.Errno = 4300 ERROR_INVALID_LIBRARY syscall.Errno = 4301 ERROR_INVALID_MEDIA_POOL syscall.Errno = 4302 ERROR_DRIVE_MEDIA_MISMATCH syscall.Errno = 4303 ERROR_MEDIA_OFFLINE syscall.Errno = 4304 ERROR_LIBRARY_OFFLINE syscall.Errno = 4305 ERROR_EMPTY syscall.Errno = 4306 ERROR_NOT_EMPTY syscall.Errno = 4307 ERROR_MEDIA_UNAVAILABLE syscall.Errno = 4308 ERROR_RESOURCE_DISABLED syscall.Errno = 4309 ERROR_INVALID_CLEANER syscall.Errno = 4310 ERROR_UNABLE_TO_CLEAN syscall.Errno = 4311 ERROR_OBJECT_NOT_FOUND syscall.Errno = 4312 ERROR_DATABASE_FAILURE syscall.Errno = 4313 ERROR_DATABASE_FULL syscall.Errno = 4314 ERROR_MEDIA_INCOMPATIBLE syscall.Errno = 4315 ERROR_RESOURCE_NOT_PRESENT syscall.Errno = 4316 ERROR_INVALID_OPERATION syscall.Errno = 4317 ERROR_MEDIA_NOT_AVAILABLE syscall.Errno = 4318 ERROR_DEVICE_NOT_AVAILABLE syscall.Errno = 4319 ERROR_REQUEST_REFUSED syscall.Errno = 4320 ERROR_INVALID_DRIVE_OBJECT syscall.Errno = 4321 ERROR_LIBRARY_FULL syscall.Errno = 4322 ERROR_MEDIUM_NOT_ACCESSIBLE syscall.Errno = 4323 ERROR_UNABLE_TO_LOAD_MEDIUM syscall.Errno = 4324 ERROR_UNABLE_TO_INVENTORY_DRIVE syscall.Errno = 4325 ERROR_UNABLE_TO_INVENTORY_SLOT syscall.Errno = 4326 ERROR_UNABLE_TO_INVENTORY_TRANSPORT syscall.Errno = 4327 ERROR_TRANSPORT_FULL syscall.Errno = 4328 ERROR_CONTROLLING_IEPORT syscall.Errno = 4329 ERROR_UNABLE_TO_EJECT_MOUNTED_MEDIA syscall.Errno = 4330 ERROR_CLEANER_SLOT_SET syscall.Errno = 4331 ERROR_CLEANER_SLOT_NOT_SET syscall.Errno = 4332 ERROR_CLEANER_CARTRIDGE_SPENT syscall.Errno = 4333 ERROR_UNEXPECTED_OMID syscall.Errno = 4334 ERROR_CANT_DELETE_LAST_ITEM syscall.Errno = 4335 ERROR_MESSAGE_EXCEEDS_MAX_SIZE syscall.Errno = 4336 ERROR_VOLUME_CONTAINS_SYS_FILES syscall.Errno = 4337 ERROR_INDIGENOUS_TYPE syscall.Errno = 4338 ERROR_NO_SUPPORTING_DRIVES syscall.Errno = 4339 ERROR_CLEANER_CARTRIDGE_INSTALLED syscall.Errno = 4340 ERROR_IEPORT_FULL syscall.Errno = 4341 ERROR_FILE_OFFLINE syscall.Errno = 4350 ERROR_REMOTE_STORAGE_NOT_ACTIVE syscall.Errno = 4351 ERROR_REMOTE_STORAGE_MEDIA_ERROR syscall.Errno = 4352 ERROR_NOT_A_REPARSE_POINT syscall.Errno = 4390 ERROR_REPARSE_ATTRIBUTE_CONFLICT syscall.Errno = 4391 ERROR_INVALID_REPARSE_DATA syscall.Errno = 4392 ERROR_REPARSE_TAG_INVALID syscall.Errno = 4393 ERROR_REPARSE_TAG_MISMATCH syscall.Errno = 4394 ERROR_REPARSE_POINT_ENCOUNTERED syscall.Errno = 4395 ERROR_APP_DATA_NOT_FOUND syscall.Errno = 4400 ERROR_APP_DATA_EXPIRED syscall.Errno = 4401 ERROR_APP_DATA_CORRUPT syscall.Errno = 4402 ERROR_APP_DATA_LIMIT_EXCEEDED syscall.Errno = 4403 ERROR_APP_DATA_REBOOT_REQUIRED syscall.Errno = 4404 ERROR_SECUREBOOT_ROLLBACK_DETECTED syscall.Errno = 4420 ERROR_SECUREBOOT_POLICY_VIOLATION syscall.Errno = 4421 ERROR_SECUREBOOT_INVALID_POLICY syscall.Errno = 4422 ERROR_SECUREBOOT_POLICY_PUBLISHER_NOT_FOUND syscall.Errno = 4423 ERROR_SECUREBOOT_POLICY_NOT_SIGNED syscall.Errno = 4424 ERROR_SECUREBOOT_NOT_ENABLED syscall.Errno = 4425 ERROR_SECUREBOOT_FILE_REPLACED syscall.Errno = 4426 ERROR_SECUREBOOT_POLICY_NOT_AUTHORIZED syscall.Errno = 4427 ERROR_SECUREBOOT_POLICY_UNKNOWN syscall.Errno = 4428 ERROR_SECUREBOOT_POLICY_MISSING_ANTIROLLBACKVERSION syscall.Errno = 4429 ERROR_SECUREBOOT_PLATFORM_ID_MISMATCH syscall.Errno = 4430 ERROR_SECUREBOOT_POLICY_ROLLBACK_DETECTED syscall.Errno = 4431 ERROR_SECUREBOOT_POLICY_UPGRADE_MISMATCH syscall.Errno = 4432 ERROR_SECUREBOOT_REQUIRED_POLICY_FILE_MISSING syscall.Errno = 4433 ERROR_SECUREBOOT_NOT_BASE_POLICY syscall.Errno = 4434 ERROR_SECUREBOOT_NOT_SUPPLEMENTAL_POLICY syscall.Errno = 4435 ERROR_OFFLOAD_READ_FLT_NOT_SUPPORTED syscall.Errno = 4440 ERROR_OFFLOAD_WRITE_FLT_NOT_SUPPORTED syscall.Errno = 4441 ERROR_OFFLOAD_READ_FILE_NOT_SUPPORTED syscall.Errno = 4442 ERROR_OFFLOAD_WRITE_FILE_NOT_SUPPORTED syscall.Errno = 4443 ERROR_ALREADY_HAS_STREAM_ID syscall.Errno = 4444 ERROR_SMR_GARBAGE_COLLECTION_REQUIRED syscall.Errno = 4445 ERROR_WOF_WIM_HEADER_CORRUPT syscall.Errno = 4446 ERROR_WOF_WIM_RESOURCE_TABLE_CORRUPT syscall.Errno = 4447 ERROR_WOF_FILE_RESOURCE_TABLE_CORRUPT syscall.Errno = 4448 ERROR_VOLUME_NOT_SIS_ENABLED syscall.Errno = 4500 ERROR_SYSTEM_INTEGRITY_ROLLBACK_DETECTED syscall.Errno = 4550 ERROR_SYSTEM_INTEGRITY_POLICY_VIOLATION syscall.Errno = 4551 ERROR_SYSTEM_INTEGRITY_INVALID_POLICY syscall.Errno = 4552 ERROR_SYSTEM_INTEGRITY_POLICY_NOT_SIGNED syscall.Errno = 4553 ERROR_SYSTEM_INTEGRITY_TOO_MANY_POLICIES syscall.Errno = 4554 ERROR_SYSTEM_INTEGRITY_SUPPLEMENTAL_POLICY_NOT_AUTHORIZED syscall.Errno = 4555 ERROR_VSM_NOT_INITIALIZED syscall.Errno = 4560 ERROR_VSM_DMA_PROTECTION_NOT_IN_USE syscall.Errno = 4561 ERROR_PLATFORM_MANIFEST_NOT_AUTHORIZED syscall.Errno = 4570 ERROR_PLATFORM_MANIFEST_INVALID syscall.Errno = 4571 ERROR_PLATFORM_MANIFEST_FILE_NOT_AUTHORIZED syscall.Errno = 4572 ERROR_PLATFORM_MANIFEST_CATALOG_NOT_AUTHORIZED syscall.Errno = 4573 ERROR_PLATFORM_MANIFEST_BINARY_ID_NOT_FOUND syscall.Errno = 4574 ERROR_PLATFORM_MANIFEST_NOT_ACTIVE syscall.Errno = 4575 ERROR_PLATFORM_MANIFEST_NOT_SIGNED syscall.Errno = 4576 ERROR_DEPENDENT_RESOURCE_EXISTS syscall.Errno = 5001 ERROR_DEPENDENCY_NOT_FOUND syscall.Errno = 5002 ERROR_DEPENDENCY_ALREADY_EXISTS syscall.Errno = 5003 ERROR_RESOURCE_NOT_ONLINE syscall.Errno = 5004 ERROR_HOST_NODE_NOT_AVAILABLE syscall.Errno = 5005 ERROR_RESOURCE_NOT_AVAILABLE syscall.Errno = 5006 ERROR_RESOURCE_NOT_FOUND syscall.Errno = 5007 ERROR_SHUTDOWN_CLUSTER syscall.Errno = 5008 ERROR_CANT_EVICT_ACTIVE_NODE syscall.Errno = 5009 ERROR_OBJECT_ALREADY_EXISTS syscall.Errno = 5010 ERROR_OBJECT_IN_LIST syscall.Errno = 5011 ERROR_GROUP_NOT_AVAILABLE syscall.Errno = 5012 ERROR_GROUP_NOT_FOUND syscall.Errno = 5013 ERROR_GROUP_NOT_ONLINE syscall.Errno = 5014 ERROR_HOST_NODE_NOT_RESOURCE_OWNER syscall.Errno = 5015 ERROR_HOST_NODE_NOT_GROUP_OWNER syscall.Errno = 5016 ERROR_RESMON_CREATE_FAILED syscall.Errno = 5017 ERROR_RESMON_ONLINE_FAILED syscall.Errno = 5018 ERROR_RESOURCE_ONLINE syscall.Errno = 5019 ERROR_QUORUM_RESOURCE syscall.Errno = 5020 ERROR_NOT_QUORUM_CAPABLE syscall.Errno = 5021 ERROR_CLUSTER_SHUTTING_DOWN syscall.Errno = 5022 ERROR_INVALID_STATE syscall.Errno = 5023 ERROR_RESOURCE_PROPERTIES_STORED syscall.Errno = 5024 ERROR_NOT_QUORUM_CLASS syscall.Errno = 5025 ERROR_CORE_RESOURCE syscall.Errno = 5026 ERROR_QUORUM_RESOURCE_ONLINE_FAILED syscall.Errno = 5027 ERROR_QUORUMLOG_OPEN_FAILED syscall.Errno = 5028 ERROR_CLUSTERLOG_CORRUPT syscall.Errno = 5029 ERROR_CLUSTERLOG_RECORD_EXCEEDS_MAXSIZE syscall.Errno = 5030 ERROR_CLUSTERLOG_EXCEEDS_MAXSIZE syscall.Errno = 5031 ERROR_CLUSTERLOG_CHKPOINT_NOT_FOUND syscall.Errno = 5032 ERROR_CLUSTERLOG_NOT_ENOUGH_SPACE syscall.Errno = 5033 ERROR_QUORUM_OWNER_ALIVE syscall.Errno = 5034 ERROR_NETWORK_NOT_AVAILABLE syscall.Errno = 5035 ERROR_NODE_NOT_AVAILABLE syscall.Errno = 5036 ERROR_ALL_NODES_NOT_AVAILABLE syscall.Errno = 5037 ERROR_RESOURCE_FAILED syscall.Errno = 5038 ERROR_CLUSTER_INVALID_NODE syscall.Errno = 5039 ERROR_CLUSTER_NODE_EXISTS syscall.Errno = 5040 ERROR_CLUSTER_JOIN_IN_PROGRESS syscall.Errno = 5041 ERROR_CLUSTER_NODE_NOT_FOUND syscall.Errno = 5042 ERROR_CLUSTER_LOCAL_NODE_NOT_FOUND syscall.Errno = 5043 ERROR_CLUSTER_NETWORK_EXISTS syscall.Errno = 5044 ERROR_CLUSTER_NETWORK_NOT_FOUND syscall.Errno = 5045 ERROR_CLUSTER_NETINTERFACE_EXISTS syscall.Errno = 5046 ERROR_CLUSTER_NETINTERFACE_NOT_FOUND syscall.Errno = 5047 ERROR_CLUSTER_INVALID_REQUEST syscall.Errno = 5048 ERROR_CLUSTER_INVALID_NETWORK_PROVIDER syscall.Errno = 5049 ERROR_CLUSTER_NODE_DOWN syscall.Errno = 5050 ERROR_CLUSTER_NODE_UNREACHABLE syscall.Errno = 5051 ERROR_CLUSTER_NODE_NOT_MEMBER syscall.Errno = 5052 ERROR_CLUSTER_JOIN_NOT_IN_PROGRESS syscall.Errno = 5053 ERROR_CLUSTER_INVALID_NETWORK syscall.Errno = 5054 ERROR_CLUSTER_NODE_UP syscall.Errno = 5056 ERROR_CLUSTER_IPADDR_IN_USE syscall.Errno = 5057 ERROR_CLUSTER_NODE_NOT_PAUSED syscall.Errno = 5058 ERROR_CLUSTER_NO_SECURITY_CONTEXT syscall.Errno = 5059 ERROR_CLUSTER_NETWORK_NOT_INTERNAL syscall.Errno = 5060 ERROR_CLUSTER_NODE_ALREADY_UP syscall.Errno = 5061 ERROR_CLUSTER_NODE_ALREADY_DOWN syscall.Errno = 5062 ERROR_CLUSTER_NETWORK_ALREADY_ONLINE syscall.Errno = 5063 ERROR_CLUSTER_NETWORK_ALREADY_OFFLINE syscall.Errno = 5064 ERROR_CLUSTER_NODE_ALREADY_MEMBER syscall.Errno = 5065 ERROR_CLUSTER_LAST_INTERNAL_NETWORK syscall.Errno = 5066 ERROR_CLUSTER_NETWORK_HAS_DEPENDENTS syscall.Errno = 5067 ERROR_INVALID_OPERATION_ON_QUORUM syscall.Errno = 5068 ERROR_DEPENDENCY_NOT_ALLOWED syscall.Errno = 5069 ERROR_CLUSTER_NODE_PAUSED syscall.Errno = 5070 ERROR_NODE_CANT_HOST_RESOURCE syscall.Errno = 5071 ERROR_CLUSTER_NODE_NOT_READY syscall.Errno = 5072 ERROR_CLUSTER_NODE_SHUTTING_DOWN syscall.Errno = 5073 ERROR_CLUSTER_JOIN_ABORTED syscall.Errno = 5074 ERROR_CLUSTER_INCOMPATIBLE_VERSIONS syscall.Errno = 5075 ERROR_CLUSTER_MAXNUM_OF_RESOURCES_EXCEEDED syscall.Errno = 5076 ERROR_CLUSTER_SYSTEM_CONFIG_CHANGED syscall.Errno = 5077 ERROR_CLUSTER_RESOURCE_TYPE_NOT_FOUND syscall.Errno = 5078 ERROR_CLUSTER_RESTYPE_NOT_SUPPORTED syscall.Errno = 5079 ERROR_CLUSTER_RESNAME_NOT_FOUND syscall.Errno = 5080 ERROR_CLUSTER_NO_RPC_PACKAGES_REGISTERED syscall.Errno = 5081 ERROR_CLUSTER_OWNER_NOT_IN_PREFLIST syscall.Errno = 5082 ERROR_CLUSTER_DATABASE_SEQMISMATCH syscall.Errno = 5083 ERROR_RESMON_INVALID_STATE syscall.Errno = 5084 ERROR_CLUSTER_GUM_NOT_LOCKER syscall.Errno = 5085 ERROR_QUORUM_DISK_NOT_FOUND syscall.Errno = 5086 ERROR_DATABASE_BACKUP_CORRUPT syscall.Errno = 5087 ERROR_CLUSTER_NODE_ALREADY_HAS_DFS_ROOT syscall.Errno = 5088 ERROR_RESOURCE_PROPERTY_UNCHANGEABLE syscall.Errno = 5089 ERROR_NO_ADMIN_ACCESS_POINT syscall.Errno = 5090 ERROR_CLUSTER_MEMBERSHIP_INVALID_STATE syscall.Errno = 5890 ERROR_CLUSTER_QUORUMLOG_NOT_FOUND syscall.Errno = 5891 ERROR_CLUSTER_MEMBERSHIP_HALT syscall.Errno = 5892 ERROR_CLUSTER_INSTANCE_ID_MISMATCH syscall.Errno = 5893 ERROR_CLUSTER_NETWORK_NOT_FOUND_FOR_IP syscall.Errno = 5894 ERROR_CLUSTER_PROPERTY_DATA_TYPE_MISMATCH syscall.Errno = 5895 ERROR_CLUSTER_EVICT_WITHOUT_CLEANUP syscall.Errno = 5896 ERROR_CLUSTER_PARAMETER_MISMATCH syscall.Errno = 5897 ERROR_NODE_CANNOT_BE_CLUSTERED syscall.Errno = 5898 ERROR_CLUSTER_WRONG_OS_VERSION syscall.Errno = 5899 ERROR_CLUSTER_CANT_CREATE_DUP_CLUSTER_NAME syscall.Errno = 5900 ERROR_CLUSCFG_ALREADY_COMMITTED syscall.Errno = 5901 ERROR_CLUSCFG_ROLLBACK_FAILED syscall.Errno = 5902 ERROR_CLUSCFG_SYSTEM_DISK_DRIVE_LETTER_CONFLICT syscall.Errno = 5903 ERROR_CLUSTER_OLD_VERSION syscall.Errno = 5904 ERROR_CLUSTER_MISMATCHED_COMPUTER_ACCT_NAME syscall.Errno = 5905 ERROR_CLUSTER_NO_NET_ADAPTERS syscall.Errno = 5906 ERROR_CLUSTER_POISONED syscall.Errno = 5907 ERROR_CLUSTER_GROUP_MOVING syscall.Errno = 5908 ERROR_CLUSTER_RESOURCE_TYPE_BUSY syscall.Errno = 5909 ERROR_RESOURCE_CALL_TIMED_OUT syscall.Errno = 5910 ERROR_INVALID_CLUSTER_IPV6_ADDRESS syscall.Errno = 5911 ERROR_CLUSTER_INTERNAL_INVALID_FUNCTION syscall.Errno = 5912 ERROR_CLUSTER_PARAMETER_OUT_OF_BOUNDS syscall.Errno = 5913 ERROR_CLUSTER_PARTIAL_SEND syscall.Errno = 5914 ERROR_CLUSTER_REGISTRY_INVALID_FUNCTION syscall.Errno = 5915 ERROR_CLUSTER_INVALID_STRING_TERMINATION syscall.Errno = 5916 ERROR_CLUSTER_INVALID_STRING_FORMAT syscall.Errno = 5917 ERROR_CLUSTER_DATABASE_TRANSACTION_IN_PROGRESS syscall.Errno = 5918 ERROR_CLUSTER_DATABASE_TRANSACTION_NOT_IN_PROGRESS syscall.Errno = 5919 ERROR_CLUSTER_NULL_DATA syscall.Errno = 5920 ERROR_CLUSTER_PARTIAL_READ syscall.Errno = 5921 ERROR_CLUSTER_PARTIAL_WRITE syscall.Errno = 5922 ERROR_CLUSTER_CANT_DESERIALIZE_DATA syscall.Errno = 5923 ERROR_DEPENDENT_RESOURCE_PROPERTY_CONFLICT syscall.Errno = 5924 ERROR_CLUSTER_NO_QUORUM syscall.Errno = 5925 ERROR_CLUSTER_INVALID_IPV6_NETWORK syscall.Errno = 5926 ERROR_CLUSTER_INVALID_IPV6_TUNNEL_NETWORK syscall.Errno = 5927 ERROR_QUORUM_NOT_ALLOWED_IN_THIS_GROUP syscall.Errno = 5928 ERROR_DEPENDENCY_TREE_TOO_COMPLEX syscall.Errno = 5929 ERROR_EXCEPTION_IN_RESOURCE_CALL syscall.Errno = 5930 ERROR_CLUSTER_RHS_FAILED_INITIALIZATION syscall.Errno = 5931 ERROR_CLUSTER_NOT_INSTALLED syscall.Errno = 5932 ERROR_CLUSTER_RESOURCES_MUST_BE_ONLINE_ON_THE_SAME_NODE syscall.Errno = 5933 ERROR_CLUSTER_MAX_NODES_IN_CLUSTER syscall.Errno = 5934 ERROR_CLUSTER_TOO_MANY_NODES syscall.Errno = 5935 ERROR_CLUSTER_OBJECT_ALREADY_USED syscall.Errno = 5936 ERROR_NONCORE_GROUPS_FOUND syscall.Errno = 5937 ERROR_FILE_SHARE_RESOURCE_CONFLICT syscall.Errno = 5938 ERROR_CLUSTER_EVICT_INVALID_REQUEST syscall.Errno = 5939 ERROR_CLUSTER_SINGLETON_RESOURCE syscall.Errno = 5940 ERROR_CLUSTER_GROUP_SINGLETON_RESOURCE syscall.Errno = 5941 ERROR_CLUSTER_RESOURCE_PROVIDER_FAILED syscall.Errno = 5942 ERROR_CLUSTER_RESOURCE_CONFIGURATION_ERROR syscall.Errno = 5943 ERROR_CLUSTER_GROUP_BUSY syscall.Errno = 5944 ERROR_CLUSTER_NOT_SHARED_VOLUME syscall.Errno = 5945 ERROR_CLUSTER_INVALID_SECURITY_DESCRIPTOR syscall.Errno = 5946 ERROR_CLUSTER_SHARED_VOLUMES_IN_USE syscall.Errno = 5947 ERROR_CLUSTER_USE_SHARED_VOLUMES_API syscall.Errno = 5948 ERROR_CLUSTER_BACKUP_IN_PROGRESS syscall.Errno = 5949 ERROR_NON_CSV_PATH syscall.Errno = 5950 ERROR_CSV_VOLUME_NOT_LOCAL syscall.Errno = 5951 ERROR_CLUSTER_WATCHDOG_TERMINATING syscall.Errno = 5952 ERROR_CLUSTER_RESOURCE_VETOED_MOVE_INCOMPATIBLE_NODES syscall.Errno = 5953 ERROR_CLUSTER_INVALID_NODE_WEIGHT syscall.Errno = 5954 ERROR_CLUSTER_RESOURCE_VETOED_CALL syscall.Errno = 5955 ERROR_RESMON_SYSTEM_RESOURCES_LACKING syscall.Errno = 5956 ERROR_CLUSTER_RESOURCE_VETOED_MOVE_NOT_ENOUGH_RESOURCES_ON_DESTINATION syscall.Errno = 5957 ERROR_CLUSTER_RESOURCE_VETOED_MOVE_NOT_ENOUGH_RESOURCES_ON_SOURCE syscall.Errno = 5958 ERROR_CLUSTER_GROUP_QUEUED syscall.Errno = 5959 ERROR_CLUSTER_RESOURCE_LOCKED_STATUS syscall.Errno = 5960 ERROR_CLUSTER_SHARED_VOLUME_FAILOVER_NOT_ALLOWED syscall.Errno = 5961 ERROR_CLUSTER_NODE_DRAIN_IN_PROGRESS syscall.Errno = 5962 ERROR_CLUSTER_DISK_NOT_CONNECTED syscall.Errno = 5963 ERROR_DISK_NOT_CSV_CAPABLE syscall.Errno = 5964 ERROR_RESOURCE_NOT_IN_AVAILABLE_STORAGE syscall.Errno = 5965 ERROR_CLUSTER_SHARED_VOLUME_REDIRECTED syscall.Errno = 5966 ERROR_CLUSTER_SHARED_VOLUME_NOT_REDIRECTED syscall.Errno = 5967 ERROR_CLUSTER_CANNOT_RETURN_PROPERTIES syscall.Errno = 5968 ERROR_CLUSTER_RESOURCE_CONTAINS_UNSUPPORTED_DIFF_AREA_FOR_SHARED_VOLUMES syscall.Errno = 5969 ERROR_CLUSTER_RESOURCE_IS_IN_MAINTENANCE_MODE syscall.Errno = 5970 ERROR_CLUSTER_AFFINITY_CONFLICT syscall.Errno = 5971 ERROR_CLUSTER_RESOURCE_IS_REPLICA_VIRTUAL_MACHINE syscall.Errno = 5972 ERROR_CLUSTER_UPGRADE_INCOMPATIBLE_VERSIONS syscall.Errno = 5973 ERROR_CLUSTER_UPGRADE_FIX_QUORUM_NOT_SUPPORTED syscall.Errno = 5974 ERROR_CLUSTER_UPGRADE_RESTART_REQUIRED syscall.Errno = 5975 ERROR_CLUSTER_UPGRADE_IN_PROGRESS syscall.Errno = 5976 ERROR_CLUSTER_UPGRADE_INCOMPLETE syscall.Errno = 5977 ERROR_CLUSTER_NODE_IN_GRACE_PERIOD syscall.Errno = 5978 ERROR_CLUSTER_CSV_IO_PAUSE_TIMEOUT syscall.Errno = 5979 ERROR_NODE_NOT_ACTIVE_CLUSTER_MEMBER syscall.Errno = 5980 ERROR_CLUSTER_RESOURCE_NOT_MONITORED syscall.Errno = 5981 ERROR_CLUSTER_RESOURCE_DOES_NOT_SUPPORT_UNMONITORED syscall.Errno = 5982 ERROR_CLUSTER_RESOURCE_IS_REPLICATED syscall.Errno = 5983 ERROR_CLUSTER_NODE_ISOLATED syscall.Errno = 5984 ERROR_CLUSTER_NODE_QUARANTINED syscall.Errno = 5985 ERROR_CLUSTER_DATABASE_UPDATE_CONDITION_FAILED syscall.Errno = 5986 ERROR_CLUSTER_SPACE_DEGRADED syscall.Errno = 5987 ERROR_CLUSTER_TOKEN_DELEGATION_NOT_SUPPORTED syscall.Errno = 5988 ERROR_CLUSTER_CSV_INVALID_HANDLE syscall.Errno = 5989 ERROR_CLUSTER_CSV_SUPPORTED_ONLY_ON_COORDINATOR syscall.Errno = 5990 ERROR_GROUPSET_NOT_AVAILABLE syscall.Errno = 5991 ERROR_GROUPSET_NOT_FOUND syscall.Errno = 5992 ERROR_GROUPSET_CANT_PROVIDE syscall.Errno = 5993 ERROR_CLUSTER_FAULT_DOMAIN_PARENT_NOT_FOUND syscall.Errno = 5994 ERROR_CLUSTER_FAULT_DOMAIN_INVALID_HIERARCHY syscall.Errno = 5995 ERROR_CLUSTER_FAULT_DOMAIN_FAILED_S2D_VALIDATION syscall.Errno = 5996 ERROR_CLUSTER_FAULT_DOMAIN_S2D_CONNECTIVITY_LOSS syscall.Errno = 5997 ERROR_CLUSTER_INVALID_INFRASTRUCTURE_FILESERVER_NAME syscall.Errno = 5998 ERROR_CLUSTERSET_MANAGEMENT_CLUSTER_UNREACHABLE syscall.Errno = 5999 ERROR_ENCRYPTION_FAILED syscall.Errno = 6000 ERROR_DECRYPTION_FAILED syscall.Errno = 6001 ERROR_FILE_ENCRYPTED syscall.Errno = 6002 ERROR_NO_RECOVERY_POLICY syscall.Errno = 6003 ERROR_NO_EFS syscall.Errno = 6004 ERROR_WRONG_EFS syscall.Errno = 6005 ERROR_NO_USER_KEYS syscall.Errno = 6006 ERROR_FILE_NOT_ENCRYPTED syscall.Errno = 6007 ERROR_NOT_EXPORT_FORMAT syscall.Errno = 6008 ERROR_FILE_READ_ONLY syscall.Errno = 6009 ERROR_DIR_EFS_DISALLOWED syscall.Errno = 6010 ERROR_EFS_SERVER_NOT_TRUSTED syscall.Errno = 6011 ERROR_BAD_RECOVERY_POLICY syscall.Errno = 6012 ERROR_EFS_ALG_BLOB_TOO_BIG syscall.Errno = 6013 ERROR_VOLUME_NOT_SUPPORT_EFS syscall.Errno = 6014 ERROR_EFS_DISABLED syscall.Errno = 6015 ERROR_EFS_VERSION_NOT_SUPPORT syscall.Errno = 6016 ERROR_CS_ENCRYPTION_INVALID_SERVER_RESPONSE syscall.Errno = 6017 ERROR_CS_ENCRYPTION_UNSUPPORTED_SERVER syscall.Errno = 6018 ERROR_CS_ENCRYPTION_EXISTING_ENCRYPTED_FILE syscall.Errno = 6019 ERROR_CS_ENCRYPTION_NEW_ENCRYPTED_FILE syscall.Errno = 6020 ERROR_CS_ENCRYPTION_FILE_NOT_CSE syscall.Errno = 6021 ERROR_ENCRYPTION_POLICY_DENIES_OPERATION syscall.Errno = 6022 ERROR_WIP_ENCRYPTION_FAILED syscall.Errno = 6023 ERROR_NO_BROWSER_SERVERS_FOUND syscall.Errno = 6118 SCHED_E_SERVICE_NOT_LOCALSYSTEM syscall.Errno = 6200 ERROR_LOG_SECTOR_INVALID syscall.Errno = 6600 ERROR_LOG_SECTOR_PARITY_INVALID syscall.Errno = 6601 ERROR_LOG_SECTOR_REMAPPED syscall.Errno = 6602 ERROR_LOG_BLOCK_INCOMPLETE syscall.Errno = 6603 ERROR_LOG_INVALID_RANGE syscall.Errno = 6604 ERROR_LOG_BLOCKS_EXHAUSTED syscall.Errno = 6605 ERROR_LOG_READ_CONTEXT_INVALID syscall.Errno = 6606 ERROR_LOG_RESTART_INVALID syscall.Errno = 6607 ERROR_LOG_BLOCK_VERSION syscall.Errno = 6608 ERROR_LOG_BLOCK_INVALID syscall.Errno = 6609 ERROR_LOG_READ_MODE_INVALID syscall.Errno = 6610 ERROR_LOG_NO_RESTART syscall.Errno = 6611 ERROR_LOG_METADATA_CORRUPT syscall.Errno = 6612 ERROR_LOG_METADATA_INVALID syscall.Errno = 6613 ERROR_LOG_METADATA_INCONSISTENT syscall.Errno = 6614 ERROR_LOG_RESERVATION_INVALID syscall.Errno = 6615 ERROR_LOG_CANT_DELETE syscall.Errno = 6616 ERROR_LOG_CONTAINER_LIMIT_EXCEEDED syscall.Errno = 6617 ERROR_LOG_START_OF_LOG syscall.Errno = 6618 ERROR_LOG_POLICY_ALREADY_INSTALLED syscall.Errno = 6619 ERROR_LOG_POLICY_NOT_INSTALLED syscall.Errno = 6620 ERROR_LOG_POLICY_INVALID syscall.Errno = 6621 ERROR_LOG_POLICY_CONFLICT syscall.Errno = 6622 ERROR_LOG_PINNED_ARCHIVE_TAIL syscall.Errno = 6623 ERROR_LOG_RECORD_NONEXISTENT syscall.Errno = 6624 ERROR_LOG_RECORDS_RESERVED_INVALID syscall.Errno = 6625 ERROR_LOG_SPACE_RESERVED_INVALID syscall.Errno = 6626 ERROR_LOG_TAIL_INVALID syscall.Errno = 6627 ERROR_LOG_FULL syscall.Errno = 6628 ERROR_COULD_NOT_RESIZE_LOG syscall.Errno = 6629 ERROR_LOG_MULTIPLEXED syscall.Errno = 6630 ERROR_LOG_DEDICATED syscall.Errno = 6631 ERROR_LOG_ARCHIVE_NOT_IN_PROGRESS syscall.Errno = 6632 ERROR_LOG_ARCHIVE_IN_PROGRESS syscall.Errno = 6633 ERROR_LOG_EPHEMERAL syscall.Errno = 6634 ERROR_LOG_NOT_ENOUGH_CONTAINERS syscall.Errno = 6635 ERROR_LOG_CLIENT_ALREADY_REGISTERED syscall.Errno = 6636 ERROR_LOG_CLIENT_NOT_REGISTERED syscall.Errno = 6637 ERROR_LOG_FULL_HANDLER_IN_PROGRESS syscall.Errno = 6638 ERROR_LOG_CONTAINER_READ_FAILED syscall.Errno = 6639 ERROR_LOG_CONTAINER_WRITE_FAILED syscall.Errno = 6640 ERROR_LOG_CONTAINER_OPEN_FAILED syscall.Errno = 6641 ERROR_LOG_CONTAINER_STATE_INVALID syscall.Errno = 6642 ERROR_LOG_STATE_INVALID syscall.Errno = 6643 ERROR_LOG_PINNED syscall.Errno = 6644 ERROR_LOG_METADATA_FLUSH_FAILED syscall.Errno = 6645 ERROR_LOG_INCONSISTENT_SECURITY syscall.Errno = 6646 ERROR_LOG_APPENDED_FLUSH_FAILED syscall.Errno = 6647 ERROR_LOG_PINNED_RESERVATION syscall.Errno = 6648 ERROR_INVALID_TRANSACTION syscall.Errno = 6700 ERROR_TRANSACTION_NOT_ACTIVE syscall.Errno = 6701 ERROR_TRANSACTION_REQUEST_NOT_VALID syscall.Errno = 6702 ERROR_TRANSACTION_NOT_REQUESTED syscall.Errno = 6703 ERROR_TRANSACTION_ALREADY_ABORTED syscall.Errno = 6704 ERROR_TRANSACTION_ALREADY_COMMITTED syscall.Errno = 6705 ERROR_TM_INITIALIZATION_FAILED syscall.Errno = 6706 ERROR_RESOURCEMANAGER_READ_ONLY syscall.Errno = 6707 ERROR_TRANSACTION_NOT_JOINED syscall.Errno = 6708 ERROR_TRANSACTION_SUPERIOR_EXISTS syscall.Errno = 6709 ERROR_CRM_PROTOCOL_ALREADY_EXISTS syscall.Errno = 6710 ERROR_TRANSACTION_PROPAGATION_FAILED syscall.Errno = 6711 ERROR_CRM_PROTOCOL_NOT_FOUND syscall.Errno = 6712 ERROR_TRANSACTION_INVALID_MARSHALL_BUFFER syscall.Errno = 6713 ERROR_CURRENT_TRANSACTION_NOT_VALID syscall.Errno = 6714 ERROR_TRANSACTION_NOT_FOUND syscall.Errno = 6715 ERROR_RESOURCEMANAGER_NOT_FOUND syscall.Errno = 6716 ERROR_ENLISTMENT_NOT_FOUND syscall.Errno = 6717 ERROR_TRANSACTIONMANAGER_NOT_FOUND syscall.Errno = 6718 ERROR_TRANSACTIONMANAGER_NOT_ONLINE syscall.Errno = 6719 ERROR_TRANSACTIONMANAGER_RECOVERY_NAME_COLLISION syscall.Errno = 6720 ERROR_TRANSACTION_NOT_ROOT syscall.Errno = 6721 ERROR_TRANSACTION_OBJECT_EXPIRED syscall.Errno = 6722 ERROR_TRANSACTION_RESPONSE_NOT_ENLISTED syscall.Errno = 6723 ERROR_TRANSACTION_RECORD_TOO_LONG syscall.Errno = 6724 ERROR_IMPLICIT_TRANSACTION_NOT_SUPPORTED syscall.Errno = 6725 ERROR_TRANSACTION_INTEGRITY_VIOLATED syscall.Errno = 6726 ERROR_TRANSACTIONMANAGER_IDENTITY_MISMATCH syscall.Errno = 6727 ERROR_RM_CANNOT_BE_FROZEN_FOR_SNAPSHOT syscall.Errno = 6728 ERROR_TRANSACTION_MUST_WRITETHROUGH syscall.Errno = 6729 ERROR_TRANSACTION_NO_SUPERIOR syscall.Errno = 6730 ERROR_HEURISTIC_DAMAGE_POSSIBLE syscall.Errno = 6731 ERROR_TRANSACTIONAL_CONFLICT syscall.Errno = 6800 ERROR_RM_NOT_ACTIVE syscall.Errno = 6801 ERROR_RM_METADATA_CORRUPT syscall.Errno = 6802 ERROR_DIRECTORY_NOT_RM syscall.Errno = 6803 ERROR_TRANSACTIONS_UNSUPPORTED_REMOTE syscall.Errno = 6805 ERROR_LOG_RESIZE_INVALID_SIZE syscall.Errno = 6806 ERROR_OBJECT_NO_LONGER_EXISTS syscall.Errno = 6807 ERROR_STREAM_MINIVERSION_NOT_FOUND syscall.Errno = 6808 ERROR_STREAM_MINIVERSION_NOT_VALID syscall.Errno = 6809 ERROR_MINIVERSION_INACCESSIBLE_FROM_SPECIFIED_TRANSACTION syscall.Errno = 6810 ERROR_CANT_OPEN_MINIVERSION_WITH_MODIFY_INTENT syscall.Errno = 6811 ERROR_CANT_CREATE_MORE_STREAM_MINIVERSIONS syscall.Errno = 6812 ERROR_REMOTE_FILE_VERSION_MISMATCH syscall.Errno = 6814 ERROR_HANDLE_NO_LONGER_VALID syscall.Errno = 6815 ERROR_NO_TXF_METADATA syscall.Errno = 6816 ERROR_LOG_CORRUPTION_DETECTED syscall.Errno = 6817 ERROR_CANT_RECOVER_WITH_HANDLE_OPEN syscall.Errno = 6818 ERROR_RM_DISCONNECTED syscall.Errno = 6819 ERROR_ENLISTMENT_NOT_SUPERIOR syscall.Errno = 6820 ERROR_RECOVERY_NOT_NEEDED syscall.Errno = 6821 ERROR_RM_ALREADY_STARTED syscall.Errno = 6822 ERROR_FILE_IDENTITY_NOT_PERSISTENT syscall.Errno = 6823 ERROR_CANT_BREAK_TRANSACTIONAL_DEPENDENCY syscall.Errno = 6824 ERROR_CANT_CROSS_RM_BOUNDARY syscall.Errno = 6825 ERROR_TXF_DIR_NOT_EMPTY syscall.Errno = 6826 ERROR_INDOUBT_TRANSACTIONS_EXIST syscall.Errno = 6827 ERROR_TM_VOLATILE syscall.Errno = 6828 ERROR_ROLLBACK_TIMER_EXPIRED syscall.Errno = 6829 ERROR_TXF_ATTRIBUTE_CORRUPT syscall.Errno = 6830 ERROR_EFS_NOT_ALLOWED_IN_TRANSACTION syscall.Errno = 6831 ERROR_TRANSACTIONAL_OPEN_NOT_ALLOWED syscall.Errno = 6832 ERROR_LOG_GROWTH_FAILED syscall.Errno = 6833 ERROR_TRANSACTED_MAPPING_UNSUPPORTED_REMOTE syscall.Errno = 6834 ERROR_TXF_METADATA_ALREADY_PRESENT syscall.Errno = 6835 ERROR_TRANSACTION_SCOPE_CALLBACKS_NOT_SET syscall.Errno = 6836 ERROR_TRANSACTION_REQUIRED_PROMOTION syscall.Errno = 6837 ERROR_CANNOT_EXECUTE_FILE_IN_TRANSACTION syscall.Errno = 6838 ERROR_TRANSACTIONS_NOT_FROZEN syscall.Errno = 6839 ERROR_TRANSACTION_FREEZE_IN_PROGRESS syscall.Errno = 6840 ERROR_NOT_SNAPSHOT_VOLUME syscall.Errno = 6841 ERROR_NO_SAVEPOINT_WITH_OPEN_FILES syscall.Errno = 6842 ERROR_DATA_LOST_REPAIR syscall.Errno = 6843 ERROR_SPARSE_NOT_ALLOWED_IN_TRANSACTION syscall.Errno = 6844 ERROR_TM_IDENTITY_MISMATCH syscall.Errno = 6845 ERROR_FLOATED_SECTION syscall.Errno = 6846 ERROR_CANNOT_ACCEPT_TRANSACTED_WORK syscall.Errno = 6847 ERROR_CANNOT_ABORT_TRANSACTIONS syscall.Errno = 6848 ERROR_BAD_CLUSTERS syscall.Errno = 6849 ERROR_COMPRESSION_NOT_ALLOWED_IN_TRANSACTION syscall.Errno = 6850 ERROR_VOLUME_DIRTY syscall.Errno = 6851 ERROR_NO_LINK_TRACKING_IN_TRANSACTION syscall.Errno = 6852 ERROR_OPERATION_NOT_SUPPORTED_IN_TRANSACTION syscall.Errno = 6853 ERROR_EXPIRED_HANDLE syscall.Errno = 6854 ERROR_TRANSACTION_NOT_ENLISTED syscall.Errno = 6855 ERROR_CTX_WINSTATION_NAME_INVALID syscall.Errno = 7001 ERROR_CTX_INVALID_PD syscall.Errno = 7002 ERROR_CTX_PD_NOT_FOUND syscall.Errno = 7003 ERROR_CTX_WD_NOT_FOUND syscall.Errno = 7004 ERROR_CTX_CANNOT_MAKE_EVENTLOG_ENTRY syscall.Errno = 7005 ERROR_CTX_SERVICE_NAME_COLLISION syscall.Errno = 7006 ERROR_CTX_CLOSE_PENDING syscall.Errno = 7007 ERROR_CTX_NO_OUTBUF syscall.Errno = 7008 ERROR_CTX_MODEM_INF_NOT_FOUND syscall.Errno = 7009 ERROR_CTX_INVALID_MODEMNAME syscall.Errno = 7010 ERROR_CTX_MODEM_RESPONSE_ERROR syscall.Errno = 7011 ERROR_CTX_MODEM_RESPONSE_TIMEOUT syscall.Errno = 7012 ERROR_CTX_MODEM_RESPONSE_NO_CARRIER syscall.Errno = 7013 ERROR_CTX_MODEM_RESPONSE_NO_DIALTONE syscall.Errno = 7014 ERROR_CTX_MODEM_RESPONSE_BUSY syscall.Errno = 7015 ERROR_CTX_MODEM_RESPONSE_VOICE syscall.Errno = 7016 ERROR_CTX_TD_ERROR syscall.Errno = 7017 ERROR_CTX_WINSTATION_NOT_FOUND syscall.Errno = 7022 ERROR_CTX_WINSTATION_ALREADY_EXISTS syscall.Errno = 7023 ERROR_CTX_WINSTATION_BUSY syscall.Errno = 7024 ERROR_CTX_BAD_VIDEO_MODE syscall.Errno = 7025 ERROR_CTX_GRAPHICS_INVALID syscall.Errno = 7035 ERROR_CTX_LOGON_DISABLED syscall.Errno = 7037 ERROR_CTX_NOT_CONSOLE syscall.Errno = 7038 ERROR_CTX_CLIENT_QUERY_TIMEOUT syscall.Errno = 7040 ERROR_CTX_CONSOLE_DISCONNECT syscall.Errno = 7041 ERROR_CTX_CONSOLE_CONNECT syscall.Errno = 7042 ERROR_CTX_SHADOW_DENIED syscall.Errno = 7044 ERROR_CTX_WINSTATION_ACCESS_DENIED syscall.Errno = 7045 ERROR_CTX_INVALID_WD syscall.Errno = 7049 ERROR_CTX_SHADOW_INVALID syscall.Errno = 7050 ERROR_CTX_SHADOW_DISABLED syscall.Errno = 7051 ERROR_CTX_CLIENT_LICENSE_IN_USE syscall.Errno = 7052 ERROR_CTX_CLIENT_LICENSE_NOT_SET syscall.Errno = 7053 ERROR_CTX_LICENSE_NOT_AVAILABLE syscall.Errno = 7054 ERROR_CTX_LICENSE_CLIENT_INVALID syscall.Errno = 7055 ERROR_CTX_LICENSE_EXPIRED syscall.Errno = 7056 ERROR_CTX_SHADOW_NOT_RUNNING syscall.Errno = 7057 ERROR_CTX_SHADOW_ENDED_BY_MODE_CHANGE syscall.Errno = 7058 ERROR_ACTIVATION_COUNT_EXCEEDED syscall.Errno = 7059 ERROR_CTX_WINSTATIONS_DISABLED syscall.Errno = 7060 ERROR_CTX_ENCRYPTION_LEVEL_REQUIRED syscall.Errno = 7061 ERROR_CTX_SESSION_IN_USE syscall.Errno = 7062 ERROR_CTX_NO_FORCE_LOGOFF syscall.Errno = 7063 ERROR_CTX_ACCOUNT_RESTRICTION syscall.Errno = 7064 ERROR_RDP_PROTOCOL_ERROR syscall.Errno = 7065 ERROR_CTX_CDM_CONNECT syscall.Errno = 7066 ERROR_CTX_CDM_DISCONNECT syscall.Errno = 7067 ERROR_CTX_SECURITY_LAYER_ERROR syscall.Errno = 7068 ERROR_TS_INCOMPATIBLE_SESSIONS syscall.Errno = 7069 ERROR_TS_VIDEO_SUBSYSTEM_ERROR syscall.Errno = 7070 FRS_ERR_INVALID_API_SEQUENCE syscall.Errno = 8001 FRS_ERR_STARTING_SERVICE syscall.Errno = 8002 FRS_ERR_STOPPING_SERVICE syscall.Errno = 8003 FRS_ERR_INTERNAL_API syscall.Errno = 8004 FRS_ERR_INTERNAL syscall.Errno = 8005 FRS_ERR_SERVICE_COMM syscall.Errno = 8006 FRS_ERR_INSUFFICIENT_PRIV syscall.Errno = 8007 FRS_ERR_AUTHENTICATION syscall.Errno = 8008 FRS_ERR_PARENT_INSUFFICIENT_PRIV syscall.Errno = 8009 FRS_ERR_PARENT_AUTHENTICATION syscall.Errno = 8010 FRS_ERR_CHILD_TO_PARENT_COMM syscall.Errno = 8011 FRS_ERR_PARENT_TO_CHILD_COMM syscall.Errno = 8012 FRS_ERR_SYSVOL_POPULATE syscall.Errno = 8013 FRS_ERR_SYSVOL_POPULATE_TIMEOUT syscall.Errno = 8014 FRS_ERR_SYSVOL_IS_BUSY syscall.Errno = 8015 FRS_ERR_SYSVOL_DEMOTE syscall.Errno = 8016 FRS_ERR_INVALID_SERVICE_PARAMETER syscall.Errno = 8017 DS_S_SUCCESS = ERROR_SUCCESS ERROR_DS_NOT_INSTALLED syscall.Errno = 8200 ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY syscall.Errno = 8201 ERROR_DS_NO_ATTRIBUTE_OR_VALUE syscall.Errno = 8202 ERROR_DS_INVALID_ATTRIBUTE_SYNTAX syscall.Errno = 8203 ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED syscall.Errno = 8204 ERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS syscall.Errno = 8205 ERROR_DS_BUSY syscall.Errno = 8206 ERROR_DS_UNAVAILABLE syscall.Errno = 8207 ERROR_DS_NO_RIDS_ALLOCATED syscall.Errno = 8208 ERROR_DS_NO_MORE_RIDS syscall.Errno = 8209 ERROR_DS_INCORRECT_ROLE_OWNER syscall.Errno = 8210 ERROR_DS_RIDMGR_INIT_ERROR syscall.Errno = 8211 ERROR_DS_OBJ_CLASS_VIOLATION syscall.Errno = 8212 ERROR_DS_CANT_ON_NON_LEAF syscall.Errno = 8213 ERROR_DS_CANT_ON_RDN syscall.Errno = 8214 ERROR_DS_CANT_MOD_OBJ_CLASS syscall.Errno = 8215 ERROR_DS_CROSS_DOM_MOVE_ERROR syscall.Errno = 8216 ERROR_DS_GC_NOT_AVAILABLE syscall.Errno = 8217 ERROR_SHARED_POLICY syscall.Errno = 8218 ERROR_POLICY_OBJECT_NOT_FOUND syscall.Errno = 8219 ERROR_POLICY_ONLY_IN_DS syscall.Errno = 8220 ERROR_PROMOTION_ACTIVE syscall.Errno = 8221 ERROR_NO_PROMOTION_ACTIVE syscall.Errno = 8222 ERROR_DS_OPERATIONS_ERROR syscall.Errno = 8224 ERROR_DS_PROTOCOL_ERROR syscall.Errno = 8225 ERROR_DS_TIMELIMIT_EXCEEDED syscall.Errno = 8226 ERROR_DS_SIZELIMIT_EXCEEDED syscall.Errno = 8227 ERROR_DS_ADMIN_LIMIT_EXCEEDED syscall.Errno = 8228 ERROR_DS_COMPARE_FALSE syscall.Errno = 8229 ERROR_DS_COMPARE_TRUE syscall.Errno = 8230 ERROR_DS_AUTH_METHOD_NOT_SUPPORTED syscall.Errno = 8231 ERROR_DS_STRONG_AUTH_REQUIRED syscall.Errno = 8232 ERROR_DS_INAPPROPRIATE_AUTH syscall.Errno = 8233 ERROR_DS_AUTH_UNKNOWN syscall.Errno = 8234 ERROR_DS_REFERRAL syscall.Errno = 8235 ERROR_DS_UNAVAILABLE_CRIT_EXTENSION syscall.Errno = 8236 ERROR_DS_CONFIDENTIALITY_REQUIRED syscall.Errno = 8237 ERROR_DS_INAPPROPRIATE_MATCHING syscall.Errno = 8238 ERROR_DS_CONSTRAINT_VIOLATION syscall.Errno = 8239 ERROR_DS_NO_SUCH_OBJECT syscall.Errno = 8240 ERROR_DS_ALIAS_PROBLEM syscall.Errno = 8241 ERROR_DS_INVALID_DN_SYNTAX syscall.Errno = 8242 ERROR_DS_IS_LEAF syscall.Errno = 8243 ERROR_DS_ALIAS_DEREF_PROBLEM syscall.Errno = 8244 ERROR_DS_UNWILLING_TO_PERFORM syscall.Errno = 8245 ERROR_DS_LOOP_DETECT syscall.Errno = 8246 ERROR_DS_NAMING_VIOLATION syscall.Errno = 8247 ERROR_DS_OBJECT_RESULTS_TOO_LARGE syscall.Errno = 8248 ERROR_DS_AFFECTS_MULTIPLE_DSAS syscall.Errno = 8249 ERROR_DS_SERVER_DOWN syscall.Errno = 8250 ERROR_DS_LOCAL_ERROR syscall.Errno = 8251 ERROR_DS_ENCODING_ERROR syscall.Errno = 8252 ERROR_DS_DECODING_ERROR syscall.Errno = 8253 ERROR_DS_FILTER_UNKNOWN syscall.Errno = 8254 ERROR_DS_PARAM_ERROR syscall.Errno = 8255 ERROR_DS_NOT_SUPPORTED syscall.Errno = 8256 ERROR_DS_NO_RESULTS_RETURNED syscall.Errno = 8257 ERROR_DS_CONTROL_NOT_FOUND syscall.Errno = 8258 ERROR_DS_CLIENT_LOOP syscall.Errno = 8259 ERROR_DS_REFERRAL_LIMIT_EXCEEDED syscall.Errno = 8260 ERROR_DS_SORT_CONTROL_MISSING syscall.Errno = 8261 ERROR_DS_OFFSET_RANGE_ERROR syscall.Errno = 8262 ERROR_DS_RIDMGR_DISABLED syscall.Errno = 8263 ERROR_DS_ROOT_MUST_BE_NC syscall.Errno = 8301 ERROR_DS_ADD_REPLICA_INHIBITED syscall.Errno = 8302 ERROR_DS_ATT_NOT_DEF_IN_SCHEMA syscall.Errno = 8303 ERROR_DS_MAX_OBJ_SIZE_EXCEEDED syscall.Errno = 8304 ERROR_DS_OBJ_STRING_NAME_EXISTS syscall.Errno = 8305 ERROR_DS_NO_RDN_DEFINED_IN_SCHEMA syscall.Errno = 8306 ERROR_DS_RDN_DOESNT_MATCH_SCHEMA syscall.Errno = 8307 ERROR_DS_NO_REQUESTED_ATTS_FOUND syscall.Errno = 8308 ERROR_DS_USER_BUFFER_TO_SMALL syscall.Errno = 8309 ERROR_DS_ATT_IS_NOT_ON_OBJ syscall.Errno = 8310 ERROR_DS_ILLEGAL_MOD_OPERATION syscall.Errno = 8311 ERROR_DS_OBJ_TOO_LARGE syscall.Errno = 8312 ERROR_DS_BAD_INSTANCE_TYPE syscall.Errno = 8313 ERROR_DS_MASTERDSA_REQUIRED syscall.Errno = 8314 ERROR_DS_OBJECT_CLASS_REQUIRED syscall.Errno = 8315 ERROR_DS_MISSING_REQUIRED_ATT syscall.Errno = 8316 ERROR_DS_ATT_NOT_DEF_FOR_CLASS syscall.Errno = 8317 ERROR_DS_ATT_ALREADY_EXISTS syscall.Errno = 8318 ERROR_DS_CANT_ADD_ATT_VALUES syscall.Errno = 8320 ERROR_DS_SINGLE_VALUE_CONSTRAINT syscall.Errno = 8321 ERROR_DS_RANGE_CONSTRAINT syscall.Errno = 8322 ERROR_DS_ATT_VAL_ALREADY_EXISTS syscall.Errno = 8323 ERROR_DS_CANT_REM_MISSING_ATT syscall.Errno = 8324 ERROR_DS_CANT_REM_MISSING_ATT_VAL syscall.Errno = 8325 ERROR_DS_ROOT_CANT_BE_SUBREF syscall.Errno = 8326 ERROR_DS_NO_CHAINING syscall.Errno = 8327 ERROR_DS_NO_CHAINED_EVAL syscall.Errno = 8328 ERROR_DS_NO_PARENT_OBJECT syscall.Errno = 8329 ERROR_DS_PARENT_IS_AN_ALIAS syscall.Errno = 8330 ERROR_DS_CANT_MIX_MASTER_AND_REPS syscall.Errno = 8331 ERROR_DS_CHILDREN_EXIST syscall.Errno = 8332 ERROR_DS_OBJ_NOT_FOUND syscall.Errno = 8333 ERROR_DS_ALIASED_OBJ_MISSING syscall.Errno = 8334 ERROR_DS_BAD_NAME_SYNTAX syscall.Errno = 8335 ERROR_DS_ALIAS_POINTS_TO_ALIAS syscall.Errno = 8336 ERROR_DS_CANT_DEREF_ALIAS syscall.Errno = 8337 ERROR_DS_OUT_OF_SCOPE syscall.Errno = 8338 ERROR_DS_OBJECT_BEING_REMOVED syscall.Errno = 8339 ERROR_DS_CANT_DELETE_DSA_OBJ syscall.Errno = 8340 ERROR_DS_GENERIC_ERROR syscall.Errno = 8341 ERROR_DS_DSA_MUST_BE_INT_MASTER syscall.Errno = 8342 ERROR_DS_CLASS_NOT_DSA syscall.Errno = 8343 ERROR_DS_INSUFF_ACCESS_RIGHTS syscall.Errno = 8344 ERROR_DS_ILLEGAL_SUPERIOR syscall.Errno = 8345 ERROR_DS_ATTRIBUTE_OWNED_BY_SAM syscall.Errno = 8346 ERROR_DS_NAME_TOO_MANY_PARTS syscall.Errno = 8347 ERROR_DS_NAME_TOO_LONG syscall.Errno = 8348 ERROR_DS_NAME_VALUE_TOO_LONG syscall.Errno = 8349 ERROR_DS_NAME_UNPARSEABLE syscall.Errno = 8350 ERROR_DS_NAME_TYPE_UNKNOWN syscall.Errno = 8351 ERROR_DS_NOT_AN_OBJECT syscall.Errno = 8352 ERROR_DS_SEC_DESC_TOO_SHORT syscall.Errno = 8353 ERROR_DS_SEC_DESC_INVALID syscall.Errno = 8354 ERROR_DS_NO_DELETED_NAME syscall.Errno = 8355 ERROR_DS_SUBREF_MUST_HAVE_PARENT syscall.Errno = 8356 ERROR_DS_NCNAME_MUST_BE_NC syscall.Errno = 8357 ERROR_DS_CANT_ADD_SYSTEM_ONLY syscall.Errno = 8358 ERROR_DS_CLASS_MUST_BE_CONCRETE syscall.Errno = 8359 ERROR_DS_INVALID_DMD syscall.Errno = 8360 ERROR_DS_OBJ_GUID_EXISTS syscall.Errno = 8361 ERROR_DS_NOT_ON_BACKLINK syscall.Errno = 8362 ERROR_DS_NO_CROSSREF_FOR_NC syscall.Errno = 8363 ERROR_DS_SHUTTING_DOWN syscall.Errno = 8364 ERROR_DS_UNKNOWN_OPERATION syscall.Errno = 8365 ERROR_DS_INVALID_ROLE_OWNER syscall.Errno = 8366 ERROR_DS_COULDNT_CONTACT_FSMO syscall.Errno = 8367 ERROR_DS_CROSS_NC_DN_RENAME syscall.Errno = 8368 ERROR_DS_CANT_MOD_SYSTEM_ONLY syscall.Errno = 8369 ERROR_DS_REPLICATOR_ONLY syscall.Errno = 8370 ERROR_DS_OBJ_CLASS_NOT_DEFINED syscall.Errno = 8371 ERROR_DS_OBJ_CLASS_NOT_SUBCLASS syscall.Errno = 8372 ERROR_DS_NAME_REFERENCE_INVALID syscall.Errno = 8373 ERROR_DS_CROSS_REF_EXISTS syscall.Errno = 8374 ERROR_DS_CANT_DEL_MASTER_CROSSREF syscall.Errno = 8375 ERROR_DS_SUBTREE_NOTIFY_NOT_NC_HEAD syscall.Errno = 8376 ERROR_DS_NOTIFY_FILTER_TOO_COMPLEX syscall.Errno = 8377 ERROR_DS_DUP_RDN syscall.Errno = 8378 ERROR_DS_DUP_OID syscall.Errno = 8379 ERROR_DS_DUP_MAPI_ID syscall.Errno = 8380 ERROR_DS_DUP_SCHEMA_ID_GUID syscall.Errno = 8381 ERROR_DS_DUP_LDAP_DISPLAY_NAME syscall.Errno = 8382 ERROR_DS_SEMANTIC_ATT_TEST syscall.Errno = 8383 ERROR_DS_SYNTAX_MISMATCH syscall.Errno = 8384 ERROR_DS_EXISTS_IN_MUST_HAVE syscall.Errno = 8385 ERROR_DS_EXISTS_IN_MAY_HAVE syscall.Errno = 8386 ERROR_DS_NONEXISTENT_MAY_HAVE syscall.Errno = 8387 ERROR_DS_NONEXISTENT_MUST_HAVE syscall.Errno = 8388 ERROR_DS_AUX_CLS_TEST_FAIL syscall.Errno = 8389 ERROR_DS_NONEXISTENT_POSS_SUP syscall.Errno = 8390 ERROR_DS_SUB_CLS_TEST_FAIL syscall.Errno = 8391 ERROR_DS_BAD_RDN_ATT_ID_SYNTAX syscall.Errno = 8392 ERROR_DS_EXISTS_IN_AUX_CLS syscall.Errno = 8393 ERROR_DS_EXISTS_IN_SUB_CLS syscall.Errno = 8394 ERROR_DS_EXISTS_IN_POSS_SUP syscall.Errno = 8395 ERROR_DS_RECALCSCHEMA_FAILED syscall.Errno = 8396 ERROR_DS_TREE_DELETE_NOT_FINISHED syscall.Errno = 8397 ERROR_DS_CANT_DELETE syscall.Errno = 8398 ERROR_DS_ATT_SCHEMA_REQ_ID syscall.Errno = 8399 ERROR_DS_BAD_ATT_SCHEMA_SYNTAX syscall.Errno = 8400 ERROR_DS_CANT_CACHE_ATT syscall.Errno = 8401 ERROR_DS_CANT_CACHE_CLASS syscall.Errno = 8402 ERROR_DS_CANT_REMOVE_ATT_CACHE syscall.Errno = 8403 ERROR_DS_CANT_REMOVE_CLASS_CACHE syscall.Errno = 8404 ERROR_DS_CANT_RETRIEVE_DN syscall.Errno = 8405 ERROR_DS_MISSING_SUPREF syscall.Errno = 8406 ERROR_DS_CANT_RETRIEVE_INSTANCE syscall.Errno = 8407 ERROR_DS_CODE_INCONSISTENCY syscall.Errno = 8408 ERROR_DS_DATABASE_ERROR syscall.Errno = 8409 ERROR_DS_GOVERNSID_MISSING syscall.Errno = 8410 ERROR_DS_MISSING_EXPECTED_ATT syscall.Errno = 8411 ERROR_DS_NCNAME_MISSING_CR_REF syscall.Errno = 8412 ERROR_DS_SECURITY_CHECKING_ERROR syscall.Errno = 8413 ERROR_DS_SCHEMA_NOT_LOADED syscall.Errno = 8414 ERROR_DS_SCHEMA_ALLOC_FAILED syscall.Errno = 8415 ERROR_DS_ATT_SCHEMA_REQ_SYNTAX syscall.Errno = 8416 ERROR_DS_GCVERIFY_ERROR syscall.Errno = 8417 ERROR_DS_DRA_SCHEMA_MISMATCH syscall.Errno = 8418 ERROR_DS_CANT_FIND_DSA_OBJ syscall.Errno = 8419 ERROR_DS_CANT_FIND_EXPECTED_NC syscall.Errno = 8420 ERROR_DS_CANT_FIND_NC_IN_CACHE syscall.Errno = 8421 ERROR_DS_CANT_RETRIEVE_CHILD syscall.Errno = 8422 ERROR_DS_SECURITY_ILLEGAL_MODIFY syscall.Errno = 8423 ERROR_DS_CANT_REPLACE_HIDDEN_REC syscall.Errno = 8424 ERROR_DS_BAD_HIERARCHY_FILE syscall.Errno = 8425 ERROR_DS_BUILD_HIERARCHY_TABLE_FAILED syscall.Errno = 8426 ERROR_DS_CONFIG_PARAM_MISSING syscall.Errno = 8427 ERROR_DS_COUNTING_AB_INDICES_FAILED syscall.Errno = 8428 ERROR_DS_HIERARCHY_TABLE_MALLOC_FAILED syscall.Errno = 8429 ERROR_DS_INTERNAL_FAILURE syscall.Errno = 8430 ERROR_DS_UNKNOWN_ERROR syscall.Errno = 8431 ERROR_DS_ROOT_REQUIRES_CLASS_TOP syscall.Errno = 8432 ERROR_DS_REFUSING_FSMO_ROLES syscall.Errno = 8433 ERROR_DS_MISSING_FSMO_SETTINGS syscall.Errno = 8434 ERROR_DS_UNABLE_TO_SURRENDER_ROLES syscall.Errno = 8435 ERROR_DS_DRA_GENERIC syscall.Errno = 8436 ERROR_DS_DRA_INVALID_PARAMETER syscall.Errno = 8437 ERROR_DS_DRA_BUSY syscall.Errno = 8438 ERROR_DS_DRA_BAD_DN syscall.Errno = 8439 ERROR_DS_DRA_BAD_NC syscall.Errno = 8440 ERROR_DS_DRA_DN_EXISTS syscall.Errno = 8441 ERROR_DS_DRA_INTERNAL_ERROR syscall.Errno = 8442 ERROR_DS_DRA_INCONSISTENT_DIT syscall.Errno = 8443 ERROR_DS_DRA_CONNECTION_FAILED syscall.Errno = 8444 ERROR_DS_DRA_BAD_INSTANCE_TYPE syscall.Errno = 8445 ERROR_DS_DRA_OUT_OF_MEM syscall.Errno = 8446 ERROR_DS_DRA_MAIL_PROBLEM syscall.Errno = 8447 ERROR_DS_DRA_REF_ALREADY_EXISTS syscall.Errno = 8448 ERROR_DS_DRA_REF_NOT_FOUND syscall.Errno = 8449 ERROR_DS_DRA_OBJ_IS_REP_SOURCE syscall.Errno = 8450 ERROR_DS_DRA_DB_ERROR syscall.Errno = 8451 ERROR_DS_DRA_NO_REPLICA syscall.Errno = 8452 ERROR_DS_DRA_ACCESS_DENIED syscall.Errno = 8453 ERROR_DS_DRA_NOT_SUPPORTED syscall.Errno = 8454 ERROR_DS_DRA_RPC_CANCELLED syscall.Errno = 8455 ERROR_DS_DRA_SOURCE_DISABLED syscall.Errno = 8456 ERROR_DS_DRA_SINK_DISABLED syscall.Errno = 8457 ERROR_DS_DRA_NAME_COLLISION syscall.Errno = 8458 ERROR_DS_DRA_SOURCE_REINSTALLED syscall.Errno = 8459 ERROR_DS_DRA_MISSING_PARENT syscall.Errno = 8460 ERROR_DS_DRA_PREEMPTED syscall.Errno = 8461 ERROR_DS_DRA_ABANDON_SYNC syscall.Errno = 8462 ERROR_DS_DRA_SHUTDOWN syscall.Errno = 8463 ERROR_DS_DRA_INCOMPATIBLE_PARTIAL_SET syscall.Errno = 8464 ERROR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA syscall.Errno = 8465 ERROR_DS_DRA_EXTN_CONNECTION_FAILED syscall.Errno = 8466 ERROR_DS_INSTALL_SCHEMA_MISMATCH syscall.Errno = 8467 ERROR_DS_DUP_LINK_ID syscall.Errno = 8468 ERROR_DS_NAME_ERROR_RESOLVING syscall.Errno = 8469 ERROR_DS_NAME_ERROR_NOT_FOUND syscall.Errno = 8470 ERROR_DS_NAME_ERROR_NOT_UNIQUE syscall.Errno = 8471 ERROR_DS_NAME_ERROR_NO_MAPPING syscall.Errno = 8472 ERROR_DS_NAME_ERROR_DOMAIN_ONLY syscall.Errno = 8473 ERROR_DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING syscall.Errno = 8474 ERROR_DS_CONSTRUCTED_ATT_MOD syscall.Errno = 8475 ERROR_DS_WRONG_OM_OBJ_CLASS syscall.Errno = 8476 ERROR_DS_DRA_REPL_PENDING syscall.Errno = 8477 ERROR_DS_DS_REQUIRED syscall.Errno = 8478 ERROR_DS_INVALID_LDAP_DISPLAY_NAME syscall.Errno = 8479 ERROR_DS_NON_BASE_SEARCH syscall.Errno = 8480 ERROR_DS_CANT_RETRIEVE_ATTS syscall.Errno = 8481 ERROR_DS_BACKLINK_WITHOUT_LINK syscall.Errno = 8482 ERROR_DS_EPOCH_MISMATCH syscall.Errno = 8483 ERROR_DS_SRC_NAME_MISMATCH syscall.Errno = 8484 ERROR_DS_SRC_AND_DST_NC_IDENTICAL syscall.Errno = 8485 ERROR_DS_DST_NC_MISMATCH syscall.Errno = 8486 ERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC syscall.Errno = 8487 ERROR_DS_SRC_GUID_MISMATCH syscall.Errno = 8488 ERROR_DS_CANT_MOVE_DELETED_OBJECT syscall.Errno = 8489 ERROR_DS_PDC_OPERATION_IN_PROGRESS syscall.Errno = 8490 ERROR_DS_CROSS_DOMAIN_CLEANUP_REQD syscall.Errno = 8491 ERROR_DS_ILLEGAL_XDOM_MOVE_OPERATION syscall.Errno = 8492 ERROR_DS_CANT_WITH_ACCT_GROUP_MEMBERSHPS syscall.Errno = 8493 ERROR_DS_NC_MUST_HAVE_NC_PARENT syscall.Errno = 8494 ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE syscall.Errno = 8495 ERROR_DS_DST_DOMAIN_NOT_NATIVE syscall.Errno = 8496 ERROR_DS_MISSING_INFRASTRUCTURE_CONTAINER syscall.Errno = 8497 ERROR_DS_CANT_MOVE_ACCOUNT_GROUP syscall.Errno = 8498 ERROR_DS_CANT_MOVE_RESOURCE_GROUP syscall.Errno = 8499 ERROR_DS_INVALID_SEARCH_FLAG syscall.Errno = 8500 ERROR_DS_NO_TREE_DELETE_ABOVE_NC syscall.Errno = 8501 ERROR_DS_COULDNT_LOCK_TREE_FOR_DELETE syscall.Errno = 8502 ERROR_DS_COULDNT_IDENTIFY_OBJECTS_FOR_TREE_DELETE syscall.Errno = 8503 ERROR_DS_SAM_INIT_FAILURE syscall.Errno = 8504 ERROR_DS_SENSITIVE_GROUP_VIOLATION syscall.Errno = 8505 ERROR_DS_CANT_MOD_PRIMARYGROUPID syscall.Errno = 8506 ERROR_DS_ILLEGAL_BASE_SCHEMA_MOD syscall.Errno = 8507 ERROR_DS_NONSAFE_SCHEMA_CHANGE syscall.Errno = 8508 ERROR_DS_SCHEMA_UPDATE_DISALLOWED syscall.Errno = 8509 ERROR_DS_CANT_CREATE_UNDER_SCHEMA syscall.Errno = 8510 ERROR_DS_INSTALL_NO_SRC_SCH_VERSION syscall.Errno = 8511 ERROR_DS_INSTALL_NO_SCH_VERSION_IN_INIFILE syscall.Errno = 8512 ERROR_DS_INVALID_GROUP_TYPE syscall.Errno = 8513 ERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN syscall.Errno = 8514 ERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN syscall.Errno = 8515 ERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER syscall.Errno = 8516 ERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER syscall.Errno = 8517 ERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER syscall.Errno = 8518 ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER syscall.Errno = 8519 ERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER syscall.Errno = 8520 ERROR_DS_HAVE_PRIMARY_MEMBERS syscall.Errno = 8521 ERROR_DS_STRING_SD_CONVERSION_FAILED syscall.Errno = 8522 ERROR_DS_NAMING_MASTER_GC syscall.Errno = 8523 ERROR_DS_DNS_LOOKUP_FAILURE syscall.Errno = 8524 ERROR_DS_COULDNT_UPDATE_SPNS syscall.Errno = 8525 ERROR_DS_CANT_RETRIEVE_SD syscall.Errno = 8526 ERROR_DS_KEY_NOT_UNIQUE syscall.Errno = 8527 ERROR_DS_WRONG_LINKED_ATT_SYNTAX syscall.Errno = 8528 ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD syscall.Errno = 8529 ERROR_DS_SAM_NEED_BOOTKEY_FLOPPY syscall.Errno = 8530 ERROR_DS_CANT_START syscall.Errno = 8531 ERROR_DS_INIT_FAILURE syscall.Errno = 8532 ERROR_DS_NO_PKT_PRIVACY_ON_CONNECTION syscall.Errno = 8533 ERROR_DS_SOURCE_DOMAIN_IN_FOREST syscall.Errno = 8534 ERROR_DS_DESTINATION_DOMAIN_NOT_IN_FOREST syscall.Errno = 8535 ERROR_DS_DESTINATION_AUDITING_NOT_ENABLED syscall.Errno = 8536 ERROR_DS_CANT_FIND_DC_FOR_SRC_DOMAIN syscall.Errno = 8537 ERROR_DS_SRC_OBJ_NOT_GROUP_OR_USER syscall.Errno = 8538 ERROR_DS_SRC_SID_EXISTS_IN_FOREST syscall.Errno = 8539 ERROR_DS_SRC_AND_DST_OBJECT_CLASS_MISMATCH syscall.Errno = 8540 ERROR_SAM_INIT_FAILURE syscall.Errno = 8541 ERROR_DS_DRA_SCHEMA_INFO_SHIP syscall.Errno = 8542 ERROR_DS_DRA_SCHEMA_CONFLICT syscall.Errno = 8543 ERROR_DS_DRA_EARLIER_SCHEMA_CONFLICT syscall.Errno = 8544 ERROR_DS_DRA_OBJ_NC_MISMATCH syscall.Errno = 8545 ERROR_DS_NC_STILL_HAS_DSAS syscall.Errno = 8546 ERROR_DS_GC_REQUIRED syscall.Errno = 8547 ERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY syscall.Errno = 8548 ERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS syscall.Errno = 8549 ERROR_DS_CANT_ADD_TO_GC syscall.Errno = 8550 ERROR_DS_NO_CHECKPOINT_WITH_PDC syscall.Errno = 8551 ERROR_DS_SOURCE_AUDITING_NOT_ENABLED syscall.Errno = 8552 ERROR_DS_CANT_CREATE_IN_NONDOMAIN_NC syscall.Errno = 8553 ERROR_DS_INVALID_NAME_FOR_SPN syscall.Errno = 8554 ERROR_DS_FILTER_USES_CONTRUCTED_ATTRS syscall.Errno = 8555 ERROR_DS_UNICODEPWD_NOT_IN_QUOTES syscall.Errno = 8556 ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED syscall.Errno = 8557 ERROR_DS_MUST_BE_RUN_ON_DST_DC syscall.Errno = 8558 ERROR_DS_SRC_DC_MUST_BE_SP4_OR_GREATER syscall.Errno = 8559 ERROR_DS_CANT_TREE_DELETE_CRITICAL_OBJ syscall.Errno = 8560 ERROR_DS_INIT_FAILURE_CONSOLE syscall.Errno = 8561 ERROR_DS_SAM_INIT_FAILURE_CONSOLE syscall.Errno = 8562 ERROR_DS_FOREST_VERSION_TOO_HIGH syscall.Errno = 8563 ERROR_DS_DOMAIN_VERSION_TOO_HIGH syscall.Errno = 8564 ERROR_DS_FOREST_VERSION_TOO_LOW syscall.Errno = 8565 ERROR_DS_DOMAIN_VERSION_TOO_LOW syscall.Errno = 8566 ERROR_DS_INCOMPATIBLE_VERSION syscall.Errno = 8567 ERROR_DS_LOW_DSA_VERSION syscall.Errno = 8568 ERROR_DS_NO_BEHAVIOR_VERSION_IN_MIXEDDOMAIN syscall.Errno = 8569 ERROR_DS_NOT_SUPPORTED_SORT_ORDER syscall.Errno = 8570 ERROR_DS_NAME_NOT_UNIQUE syscall.Errno = 8571 ERROR_DS_MACHINE_ACCOUNT_CREATED_PRENT4 syscall.Errno = 8572 ERROR_DS_OUT_OF_VERSION_STORE syscall.Errno = 8573 ERROR_DS_INCOMPATIBLE_CONTROLS_USED syscall.Errno = 8574 ERROR_DS_NO_REF_DOMAIN syscall.Errno = 8575 ERROR_DS_RESERVED_LINK_ID syscall.Errno = 8576 ERROR_DS_LINK_ID_NOT_AVAILABLE syscall.Errno = 8577 ERROR_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER syscall.Errno = 8578 ERROR_DS_MODIFYDN_DISALLOWED_BY_INSTANCE_TYPE syscall.Errno = 8579 ERROR_DS_NO_OBJECT_MOVE_IN_SCHEMA_NC syscall.Errno = 8580 ERROR_DS_MODIFYDN_DISALLOWED_BY_FLAG syscall.Errno = 8581 ERROR_DS_MODIFYDN_WRONG_GRANDPARENT syscall.Errno = 8582 ERROR_DS_NAME_ERROR_TRUST_REFERRAL syscall.Errno = 8583 ERROR_NOT_SUPPORTED_ON_STANDARD_SERVER syscall.Errno = 8584 ERROR_DS_CANT_ACCESS_REMOTE_PART_OF_AD syscall.Errno = 8585 ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE_V2 syscall.Errno = 8586 ERROR_DS_THREAD_LIMIT_EXCEEDED syscall.Errno = 8587 ERROR_DS_NOT_CLOSEST syscall.Errno = 8588 ERROR_DS_CANT_DERIVE_SPN_WITHOUT_SERVER_REF syscall.Errno = 8589 ERROR_DS_SINGLE_USER_MODE_FAILED syscall.Errno = 8590 ERROR_DS_NTDSCRIPT_SYNTAX_ERROR syscall.Errno = 8591 ERROR_DS_NTDSCRIPT_PROCESS_ERROR syscall.Errno = 8592 ERROR_DS_DIFFERENT_REPL_EPOCHS syscall.Errno = 8593 ERROR_DS_DRS_EXTENSIONS_CHANGED syscall.Errno = 8594 ERROR_DS_REPLICA_SET_CHANGE_NOT_ALLOWED_ON_DISABLED_CR syscall.Errno = 8595 ERROR_DS_NO_MSDS_INTID syscall.Errno = 8596 ERROR_DS_DUP_MSDS_INTID syscall.Errno = 8597 ERROR_DS_EXISTS_IN_RDNATTID syscall.Errno = 8598 ERROR_DS_AUTHORIZATION_FAILED syscall.Errno = 8599 ERROR_DS_INVALID_SCRIPT syscall.Errno = 8600 ERROR_DS_REMOTE_CROSSREF_OP_FAILED syscall.Errno = 8601 ERROR_DS_CROSS_REF_BUSY syscall.Errno = 8602 ERROR_DS_CANT_DERIVE_SPN_FOR_DELETED_DOMAIN syscall.Errno = 8603 ERROR_DS_CANT_DEMOTE_WITH_WRITEABLE_NC syscall.Errno = 8604 ERROR_DS_DUPLICATE_ID_FOUND syscall.Errno = 8605 ERROR_DS_INSUFFICIENT_ATTR_TO_CREATE_OBJECT syscall.Errno = 8606 ERROR_DS_GROUP_CONVERSION_ERROR syscall.Errno = 8607 ERROR_DS_CANT_MOVE_APP_BASIC_GROUP syscall.Errno = 8608 ERROR_DS_CANT_MOVE_APP_QUERY_GROUP syscall.Errno = 8609 ERROR_DS_ROLE_NOT_VERIFIED syscall.Errno = 8610 ERROR_DS_WKO_CONTAINER_CANNOT_BE_SPECIAL syscall.Errno = 8611 ERROR_DS_DOMAIN_RENAME_IN_PROGRESS syscall.Errno = 8612 ERROR_DS_EXISTING_AD_CHILD_NC syscall.Errno = 8613 ERROR_DS_REPL_LIFETIME_EXCEEDED syscall.Errno = 8614 ERROR_DS_DISALLOWED_IN_SYSTEM_CONTAINER syscall.Errno = 8615 ERROR_DS_LDAP_SEND_QUEUE_FULL syscall.Errno = 8616 ERROR_DS_DRA_OUT_SCHEDULE_WINDOW syscall.Errno = 8617 ERROR_DS_POLICY_NOT_KNOWN syscall.Errno = 8618 ERROR_NO_SITE_SETTINGS_OBJECT syscall.Errno = 8619 ERROR_NO_SECRETS syscall.Errno = 8620 ERROR_NO_WRITABLE_DC_FOUND syscall.Errno = 8621 ERROR_DS_NO_SERVER_OBJECT syscall.Errno = 8622 ERROR_DS_NO_NTDSA_OBJECT syscall.Errno = 8623 ERROR_DS_NON_ASQ_SEARCH syscall.Errno = 8624 ERROR_DS_AUDIT_FAILURE syscall.Errno = 8625 ERROR_DS_INVALID_SEARCH_FLAG_SUBTREE syscall.Errno = 8626 ERROR_DS_INVALID_SEARCH_FLAG_TUPLE syscall.Errno = 8627 ERROR_DS_HIERARCHY_TABLE_TOO_DEEP syscall.Errno = 8628 ERROR_DS_DRA_CORRUPT_UTD_VECTOR syscall.Errno = 8629 ERROR_DS_DRA_SECRETS_DENIED syscall.Errno = 8630 ERROR_DS_RESERVED_MAPI_ID syscall.Errno = 8631 ERROR_DS_MAPI_ID_NOT_AVAILABLE syscall.Errno = 8632 ERROR_DS_DRA_MISSING_KRBTGT_SECRET syscall.Errno = 8633 ERROR_DS_DOMAIN_NAME_EXISTS_IN_FOREST syscall.Errno = 8634 ERROR_DS_FLAT_NAME_EXISTS_IN_FOREST syscall.Errno = 8635 ERROR_INVALID_USER_PRINCIPAL_NAME syscall.Errno = 8636 ERROR_DS_OID_MAPPED_GROUP_CANT_HAVE_MEMBERS syscall.Errno = 8637 ERROR_DS_OID_NOT_FOUND syscall.Errno = 8638 ERROR_DS_DRA_RECYCLED_TARGET syscall.Errno = 8639 ERROR_DS_DISALLOWED_NC_REDIRECT syscall.Errno = 8640 ERROR_DS_HIGH_ADLDS_FFL syscall.Errno = 8641 ERROR_DS_HIGH_DSA_VERSION syscall.Errno = 8642 ERROR_DS_LOW_ADLDS_FFL syscall.Errno = 8643 ERROR_DOMAIN_SID_SAME_AS_LOCAL_WORKSTATION syscall.Errno = 8644 ERROR_DS_UNDELETE_SAM_VALIDATION_FAILED syscall.Errno = 8645 ERROR_INCORRECT_ACCOUNT_TYPE syscall.Errno = 8646 ERROR_DS_SPN_VALUE_NOT_UNIQUE_IN_FOREST syscall.Errno = 8647 ERROR_DS_UPN_VALUE_NOT_UNIQUE_IN_FOREST syscall.Errno = 8648 ERROR_DS_MISSING_FOREST_TRUST syscall.Errno = 8649 ERROR_DS_VALUE_KEY_NOT_UNIQUE syscall.Errno = 8650 DNS_ERROR_RESPONSE_CODES_BASE syscall.Errno = 9000 DNS_ERROR_RCODE_NO_ERROR = ERROR_SUCCESS DNS_ERROR_MASK syscall.Errno = 0x00002328 DNS_ERROR_RCODE_FORMAT_ERROR syscall.Errno = 9001 DNS_ERROR_RCODE_SERVER_FAILURE syscall.Errno = 9002 DNS_ERROR_RCODE_NAME_ERROR syscall.Errno = 9003 DNS_ERROR_RCODE_NOT_IMPLEMENTED syscall.Errno = 9004 DNS_ERROR_RCODE_REFUSED syscall.Errno = 9005 DNS_ERROR_RCODE_YXDOMAIN syscall.Errno = 9006 DNS_ERROR_RCODE_YXRRSET syscall.Errno = 9007 DNS_ERROR_RCODE_NXRRSET syscall.Errno = 9008 DNS_ERROR_RCODE_NOTAUTH syscall.Errno = 9009 DNS_ERROR_RCODE_NOTZONE syscall.Errno = 9010 DNS_ERROR_RCODE_BADSIG syscall.Errno = 9016 DNS_ERROR_RCODE_BADKEY syscall.Errno = 9017 DNS_ERROR_RCODE_BADTIME syscall.Errno = 9018 DNS_ERROR_RCODE_LAST = DNS_ERROR_RCODE_BADTIME DNS_ERROR_DNSSEC_BASE syscall.Errno = 9100 DNS_ERROR_KEYMASTER_REQUIRED syscall.Errno = 9101 DNS_ERROR_NOT_ALLOWED_ON_SIGNED_ZONE syscall.Errno = 9102 DNS_ERROR_NSEC3_INCOMPATIBLE_WITH_RSA_SHA1 syscall.Errno = 9103 DNS_ERROR_NOT_ENOUGH_SIGNING_KEY_DESCRIPTORS syscall.Errno = 9104 DNS_ERROR_UNSUPPORTED_ALGORITHM syscall.Errno = 9105 DNS_ERROR_INVALID_KEY_SIZE syscall.Errno = 9106 DNS_ERROR_SIGNING_KEY_NOT_ACCESSIBLE syscall.Errno = 9107 DNS_ERROR_KSP_DOES_NOT_SUPPORT_PROTECTION syscall.Errno = 9108 DNS_ERROR_UNEXPECTED_DATA_PROTECTION_ERROR syscall.Errno = 9109 DNS_ERROR_UNEXPECTED_CNG_ERROR syscall.Errno = 9110 DNS_ERROR_UNKNOWN_SIGNING_PARAMETER_VERSION syscall.Errno = 9111 DNS_ERROR_KSP_NOT_ACCESSIBLE syscall.Errno = 9112 DNS_ERROR_TOO_MANY_SKDS syscall.Errno = 9113 DNS_ERROR_INVALID_ROLLOVER_PERIOD syscall.Errno = 9114 DNS_ERROR_INVALID_INITIAL_ROLLOVER_OFFSET syscall.Errno = 9115 DNS_ERROR_ROLLOVER_IN_PROGRESS syscall.Errno = 9116 DNS_ERROR_STANDBY_KEY_NOT_PRESENT syscall.Errno = 9117 DNS_ERROR_NOT_ALLOWED_ON_ZSK syscall.Errno = 9118 DNS_ERROR_NOT_ALLOWED_ON_ACTIVE_SKD syscall.Errno = 9119 DNS_ERROR_ROLLOVER_ALREADY_QUEUED syscall.Errno = 9120 DNS_ERROR_NOT_ALLOWED_ON_UNSIGNED_ZONE syscall.Errno = 9121 DNS_ERROR_BAD_KEYMASTER syscall.Errno = 9122 DNS_ERROR_INVALID_SIGNATURE_VALIDITY_PERIOD syscall.Errno = 9123 DNS_ERROR_INVALID_NSEC3_ITERATION_COUNT syscall.Errno = 9124 DNS_ERROR_DNSSEC_IS_DISABLED syscall.Errno = 9125 DNS_ERROR_INVALID_XML syscall.Errno = 9126 DNS_ERROR_NO_VALID_TRUST_ANCHORS syscall.Errno = 9127 DNS_ERROR_ROLLOVER_NOT_POKEABLE syscall.Errno = 9128 DNS_ERROR_NSEC3_NAME_COLLISION syscall.Errno = 9129 DNS_ERROR_NSEC_INCOMPATIBLE_WITH_NSEC3_RSA_SHA1 syscall.Errno = 9130 DNS_ERROR_PACKET_FMT_BASE syscall.Errno = 9500 DNS_INFO_NO_RECORDS syscall.Errno = 9501 DNS_ERROR_BAD_PACKET syscall.Errno = 9502 DNS_ERROR_NO_PACKET syscall.Errno = 9503 DNS_ERROR_RCODE syscall.Errno = 9504 DNS_ERROR_UNSECURE_PACKET syscall.Errno = 9505 DNS_STATUS_PACKET_UNSECURE = DNS_ERROR_UNSECURE_PACKET DNS_REQUEST_PENDING syscall.Errno = 9506 DNS_ERROR_NO_MEMORY = ERROR_OUTOFMEMORY DNS_ERROR_INVALID_NAME = ERROR_INVALID_NAME DNS_ERROR_INVALID_DATA = ERROR_INVALID_DATA DNS_ERROR_GENERAL_API_BASE syscall.Errno = 9550 DNS_ERROR_INVALID_TYPE syscall.Errno = 9551 DNS_ERROR_INVALID_IP_ADDRESS syscall.Errno = 9552 DNS_ERROR_INVALID_PROPERTY syscall.Errno = 9553 DNS_ERROR_TRY_AGAIN_LATER syscall.Errno = 9554 DNS_ERROR_NOT_UNIQUE syscall.Errno = 9555 DNS_ERROR_NON_RFC_NAME syscall.Errno = 9556 DNS_STATUS_FQDN syscall.Errno = 9557 DNS_STATUS_DOTTED_NAME syscall.Errno = 9558 DNS_STATUS_SINGLE_PART_NAME syscall.Errno = 9559 DNS_ERROR_INVALID_NAME_CHAR syscall.Errno = 9560 DNS_ERROR_NUMERIC_NAME syscall.Errno = 9561 DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER syscall.Errno = 9562 DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION syscall.Errno = 9563 DNS_ERROR_CANNOT_FIND_ROOT_HINTS syscall.Errno = 9564 DNS_ERROR_INCONSISTENT_ROOT_HINTS syscall.Errno = 9565 DNS_ERROR_DWORD_VALUE_TOO_SMALL syscall.Errno = 9566 DNS_ERROR_DWORD_VALUE_TOO_LARGE syscall.Errno = 9567 DNS_ERROR_BACKGROUND_LOADING syscall.Errno = 9568 DNS_ERROR_NOT_ALLOWED_ON_RODC syscall.Errno = 9569 DNS_ERROR_NOT_ALLOWED_UNDER_DNAME syscall.Errno = 9570 DNS_ERROR_DELEGATION_REQUIRED syscall.Errno = 9571 DNS_ERROR_INVALID_POLICY_TABLE syscall.Errno = 9572 DNS_ERROR_ADDRESS_REQUIRED syscall.Errno = 9573 DNS_ERROR_ZONE_BASE syscall.Errno = 9600 DNS_ERROR_ZONE_DOES_NOT_EXIST syscall.Errno = 9601 DNS_ERROR_NO_ZONE_INFO syscall.Errno = 9602 DNS_ERROR_INVALID_ZONE_OPERATION syscall.Errno = 9603 DNS_ERROR_ZONE_CONFIGURATION_ERROR syscall.Errno = 9604 DNS_ERROR_ZONE_HAS_NO_SOA_RECORD syscall.Errno = 9605 DNS_ERROR_ZONE_HAS_NO_NS_RECORDS syscall.Errno = 9606 DNS_ERROR_ZONE_LOCKED syscall.Errno = 9607 DNS_ERROR_ZONE_CREATION_FAILED syscall.Errno = 9608 DNS_ERROR_ZONE_ALREADY_EXISTS syscall.Errno = 9609 DNS_ERROR_AUTOZONE_ALREADY_EXISTS syscall.Errno = 9610 DNS_ERROR_INVALID_ZONE_TYPE syscall.Errno = 9611 DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP syscall.Errno = 9612 DNS_ERROR_ZONE_NOT_SECONDARY syscall.Errno = 9613 DNS_ERROR_NEED_SECONDARY_ADDRESSES syscall.Errno = 9614 DNS_ERROR_WINS_INIT_FAILED syscall.Errno = 9615 DNS_ERROR_NEED_WINS_SERVERS syscall.Errno = 9616 DNS_ERROR_NBSTAT_INIT_FAILED syscall.Errno = 9617 DNS_ERROR_SOA_DELETE_INVALID syscall.Errno = 9618 DNS_ERROR_FORWARDER_ALREADY_EXISTS syscall.Errno = 9619 DNS_ERROR_ZONE_REQUIRES_MASTER_IP syscall.Errno = 9620 DNS_ERROR_ZONE_IS_SHUTDOWN syscall.Errno = 9621 DNS_ERROR_ZONE_LOCKED_FOR_SIGNING syscall.Errno = 9622 DNS_ERROR_DATAFILE_BASE syscall.Errno = 9650 DNS_ERROR_PRIMARY_REQUIRES_DATAFILE syscall.Errno = 9651 DNS_ERROR_INVALID_DATAFILE_NAME syscall.Errno = 9652 DNS_ERROR_DATAFILE_OPEN_FAILURE syscall.Errno = 9653 DNS_ERROR_FILE_WRITEBACK_FAILED syscall.Errno = 9654 DNS_ERROR_DATAFILE_PARSING syscall.Errno = 9655 DNS_ERROR_DATABASE_BASE syscall.Errno = 9700 DNS_ERROR_RECORD_DOES_NOT_EXIST syscall.Errno = 9701 DNS_ERROR_RECORD_FORMAT syscall.Errno = 9702 DNS_ERROR_NODE_CREATION_FAILED syscall.Errno = 9703 DNS_ERROR_UNKNOWN_RECORD_TYPE syscall.Errno = 9704 DNS_ERROR_RECORD_TIMED_OUT syscall.Errno = 9705 DNS_ERROR_NAME_NOT_IN_ZONE syscall.Errno = 9706 DNS_ERROR_CNAME_LOOP syscall.Errno = 9707 DNS_ERROR_NODE_IS_CNAME syscall.Errno = 9708 DNS_ERROR_CNAME_COLLISION syscall.Errno = 9709 DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT syscall.Errno = 9710 DNS_ERROR_RECORD_ALREADY_EXISTS syscall.Errno = 9711 DNS_ERROR_SECONDARY_DATA syscall.Errno = 9712 DNS_ERROR_NO_CREATE_CACHE_DATA syscall.Errno = 9713 DNS_ERROR_NAME_DOES_NOT_EXIST syscall.Errno = 9714 DNS_WARNING_PTR_CREATE_FAILED syscall.Errno = 9715 DNS_WARNING_DOMAIN_UNDELETED syscall.Errno = 9716 DNS_ERROR_DS_UNAVAILABLE syscall.Errno = 9717 DNS_ERROR_DS_ZONE_ALREADY_EXISTS syscall.Errno = 9718 DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE syscall.Errno = 9719 DNS_ERROR_NODE_IS_DNAME syscall.Errno = 9720 DNS_ERROR_DNAME_COLLISION syscall.Errno = 9721 DNS_ERROR_ALIAS_LOOP syscall.Errno = 9722 DNS_ERROR_OPERATION_BASE syscall.Errno = 9750 DNS_INFO_AXFR_COMPLETE syscall.Errno = 9751 DNS_ERROR_AXFR syscall.Errno = 9752 DNS_INFO_ADDED_LOCAL_WINS syscall.Errno = 9753 DNS_ERROR_SECURE_BASE syscall.Errno = 9800 DNS_STATUS_CONTINUE_NEEDED syscall.Errno = 9801 DNS_ERROR_SETUP_BASE syscall.Errno = 9850 DNS_ERROR_NO_TCPIP syscall.Errno = 9851 DNS_ERROR_NO_DNS_SERVERS syscall.Errno = 9852 DNS_ERROR_DP_BASE syscall.Errno = 9900 DNS_ERROR_DP_DOES_NOT_EXIST syscall.Errno = 9901 DNS_ERROR_DP_ALREADY_EXISTS syscall.Errno = 9902 DNS_ERROR_DP_NOT_ENLISTED syscall.Errno = 9903 DNS_ERROR_DP_ALREADY_ENLISTED syscall.Errno = 9904 DNS_ERROR_DP_NOT_AVAILABLE syscall.Errno = 9905 DNS_ERROR_DP_FSMO_ERROR syscall.Errno = 9906 DNS_ERROR_RRL_NOT_ENABLED syscall.Errno = 9911 DNS_ERROR_RRL_INVALID_WINDOW_SIZE syscall.Errno = 9912 DNS_ERROR_RRL_INVALID_IPV4_PREFIX syscall.Errno = 9913 DNS_ERROR_RRL_INVALID_IPV6_PREFIX syscall.Errno = 9914 DNS_ERROR_RRL_INVALID_TC_RATE syscall.Errno = 9915 DNS_ERROR_RRL_INVALID_LEAK_RATE syscall.Errno = 9916 DNS_ERROR_RRL_LEAK_RATE_LESSTHAN_TC_RATE syscall.Errno = 9917 DNS_ERROR_VIRTUALIZATION_INSTANCE_ALREADY_EXISTS syscall.Errno = 9921 DNS_ERROR_VIRTUALIZATION_INSTANCE_DOES_NOT_EXIST syscall.Errno = 9922 DNS_ERROR_VIRTUALIZATION_TREE_LOCKED syscall.Errno = 9923 DNS_ERROR_INVAILD_VIRTUALIZATION_INSTANCE_NAME syscall.Errno = 9924 DNS_ERROR_DEFAULT_VIRTUALIZATION_INSTANCE syscall.Errno = 9925 DNS_ERROR_ZONESCOPE_ALREADY_EXISTS syscall.Errno = 9951 DNS_ERROR_ZONESCOPE_DOES_NOT_EXIST syscall.Errno = 9952 DNS_ERROR_DEFAULT_ZONESCOPE syscall.Errno = 9953 DNS_ERROR_INVALID_ZONESCOPE_NAME syscall.Errno = 9954 DNS_ERROR_NOT_ALLOWED_WITH_ZONESCOPES syscall.Errno = 9955 DNS_ERROR_LOAD_ZONESCOPE_FAILED syscall.Errno = 9956 DNS_ERROR_ZONESCOPE_FILE_WRITEBACK_FAILED syscall.Errno = 9957 DNS_ERROR_INVALID_SCOPE_NAME syscall.Errno = 9958 DNS_ERROR_SCOPE_DOES_NOT_EXIST syscall.Errno = 9959 DNS_ERROR_DEFAULT_SCOPE syscall.Errno = 9960 DNS_ERROR_INVALID_SCOPE_OPERATION syscall.Errno = 9961 DNS_ERROR_SCOPE_LOCKED syscall.Errno = 9962 DNS_ERROR_SCOPE_ALREADY_EXISTS syscall.Errno = 9963 DNS_ERROR_POLICY_ALREADY_EXISTS syscall.Errno = 9971 DNS_ERROR_POLICY_DOES_NOT_EXIST syscall.Errno = 9972 DNS_ERROR_POLICY_INVALID_CRITERIA syscall.Errno = 9973 DNS_ERROR_POLICY_INVALID_SETTINGS syscall.Errno = 9974 DNS_ERROR_CLIENT_SUBNET_IS_ACCESSED syscall.Errno = 9975 DNS_ERROR_CLIENT_SUBNET_DOES_NOT_EXIST syscall.Errno = 9976 DNS_ERROR_CLIENT_SUBNET_ALREADY_EXISTS syscall.Errno = 9977 DNS_ERROR_SUBNET_DOES_NOT_EXIST syscall.Errno = 9978 DNS_ERROR_SUBNET_ALREADY_EXISTS syscall.Errno = 9979 DNS_ERROR_POLICY_LOCKED syscall.Errno = 9980 DNS_ERROR_POLICY_INVALID_WEIGHT syscall.Errno = 9981 DNS_ERROR_POLICY_INVALID_NAME syscall.Errno = 9982 DNS_ERROR_POLICY_MISSING_CRITERIA syscall.Errno = 9983 DNS_ERROR_INVALID_CLIENT_SUBNET_NAME syscall.Errno = 9984 DNS_ERROR_POLICY_PROCESSING_ORDER_INVALID syscall.Errno = 9985 DNS_ERROR_POLICY_SCOPE_MISSING syscall.Errno = 9986 DNS_ERROR_POLICY_SCOPE_NOT_ALLOWED syscall.Errno = 9987 DNS_ERROR_SERVERSCOPE_IS_REFERENCED syscall.Errno = 9988 DNS_ERROR_ZONESCOPE_IS_REFERENCED syscall.Errno = 9989 DNS_ERROR_POLICY_INVALID_CRITERIA_CLIENT_SUBNET syscall.Errno = 9990 DNS_ERROR_POLICY_INVALID_CRITERIA_TRANSPORT_PROTOCOL syscall.Errno = 9991 DNS_ERROR_POLICY_INVALID_CRITERIA_NETWORK_PROTOCOL syscall.Errno = 9992 DNS_ERROR_POLICY_INVALID_CRITERIA_INTERFACE syscall.Errno = 9993 DNS_ERROR_POLICY_INVALID_CRITERIA_FQDN syscall.Errno = 9994 DNS_ERROR_POLICY_INVALID_CRITERIA_QUERY_TYPE syscall.Errno = 9995 DNS_ERROR_POLICY_INVALID_CRITERIA_TIME_OF_DAY syscall.Errno = 9996 WSABASEERR syscall.Errno = 10000 WSAEINTR syscall.Errno = 10004 WSAEBADF syscall.Errno = 10009 WSAEACCES syscall.Errno = 10013 WSAEFAULT syscall.Errno = 10014 WSAEINVAL syscall.Errno = 10022 WSAEMFILE syscall.Errno = 10024 WSAEWOULDBLOCK syscall.Errno = 10035 WSAEINPROGRESS syscall.Errno = 10036 WSAEALREADY syscall.Errno = 10037 WSAENOTSOCK syscall.Errno = 10038 WSAEDESTADDRREQ syscall.Errno = 10039 WSAEMSGSIZE syscall.Errno = 10040 WSAEPROTOTYPE syscall.Errno = 10041 WSAENOPROTOOPT syscall.Errno = 10042 WSAEPROTONOSUPPORT syscall.Errno = 10043 WSAESOCKTNOSUPPORT syscall.Errno = 10044 WSAEOPNOTSUPP syscall.Errno = 10045 WSAEPFNOSUPPORT syscall.Errno = 10046 WSAEAFNOSUPPORT syscall.Errno = 10047 WSAEADDRINUSE syscall.Errno = 10048 WSAEADDRNOTAVAIL syscall.Errno = 10049 WSAENETDOWN syscall.Errno = 10050 WSAENETUNREACH syscall.Errno = 10051 WSAENETRESET syscall.Errno = 10052 WSAECONNABORTED syscall.Errno = 10053 WSAECONNRESET syscall.Errno = 10054 WSAENOBUFS syscall.Errno = 10055 WSAEISCONN syscall.Errno = 10056 WSAENOTCONN syscall.Errno = 10057 WSAESHUTDOWN syscall.Errno = 10058 WSAETOOMANYREFS syscall.Errno = 10059 WSAETIMEDOUT syscall.Errno = 10060 WSAECONNREFUSED syscall.Errno = 10061 WSAELOOP syscall.Errno = 10062 WSAENAMETOOLONG syscall.Errno = 10063 WSAEHOSTDOWN syscall.Errno = 10064 WSAEHOSTUNREACH syscall.Errno = 10065 WSAENOTEMPTY syscall.Errno = 10066 WSAEPROCLIM syscall.Errno = 10067 WSAEUSERS syscall.Errno = 10068 WSAEDQUOT syscall.Errno = 10069 WSAESTALE syscall.Errno = 10070 WSAEREMOTE syscall.Errno = 10071 WSASYSNOTREADY syscall.Errno = 10091 WSAVERNOTSUPPORTED syscall.Errno = 10092 WSANOTINITIALISED syscall.Errno = 10093 WSAEDISCON syscall.Errno = 10101 WSAENOMORE syscall.Errno = 10102 WSAECANCELLED syscall.Errno = 10103 WSAEINVALIDPROCTABLE syscall.Errno = 10104 WSAEINVALIDPROVIDER syscall.Errno = 10105 WSAEPROVIDERFAILEDINIT syscall.Errno = 10106 WSASYSCALLFAILURE syscall.Errno = 10107 WSASERVICE_NOT_FOUND syscall.Errno = 10108 WSATYPE_NOT_FOUND syscall.Errno = 10109 WSA_E_NO_MORE syscall.Errno = 10110 WSA_E_CANCELLED syscall.Errno = 10111 WSAEREFUSED syscall.Errno = 10112 WSAHOST_NOT_FOUND syscall.Errno = 11001 WSATRY_AGAIN syscall.Errno = 11002 WSANO_RECOVERY syscall.Errno = 11003 WSANO_DATA syscall.Errno = 11004 WSA_QOS_RECEIVERS syscall.Errno = 11005 WSA_QOS_SENDERS syscall.Errno = 11006 WSA_QOS_NO_SENDERS syscall.Errno = 11007 WSA_QOS_NO_RECEIVERS syscall.Errno = 11008 WSA_QOS_REQUEST_CONFIRMED syscall.Errno = 11009 WSA_QOS_ADMISSION_FAILURE syscall.Errno = 11010 WSA_QOS_POLICY_FAILURE syscall.Errno = 11011 WSA_QOS_BAD_STYLE syscall.Errno = 11012 WSA_QOS_BAD_OBJECT syscall.Errno = 11013 WSA_QOS_TRAFFIC_CTRL_ERROR syscall.Errno = 11014 WSA_QOS_GENERIC_ERROR syscall.Errno = 11015 WSA_QOS_ESERVICETYPE syscall.Errno = 11016 WSA_QOS_EFLOWSPEC syscall.Errno = 11017 WSA_QOS_EPROVSPECBUF syscall.Errno = 11018 WSA_QOS_EFILTERSTYLE syscall.Errno = 11019 WSA_QOS_EFILTERTYPE syscall.Errno = 11020 WSA_QOS_EFILTERCOUNT syscall.Errno = 11021 WSA_QOS_EOBJLENGTH syscall.Errno = 11022 WSA_QOS_EFLOWCOUNT syscall.Errno = 11023 WSA_QOS_EUNKOWNPSOBJ syscall.Errno = 11024 WSA_QOS_EPOLICYOBJ syscall.Errno = 11025 WSA_QOS_EFLOWDESC syscall.Errno = 11026 WSA_QOS_EPSFLOWSPEC syscall.Errno = 11027 WSA_QOS_EPSFILTERSPEC syscall.Errno = 11028 WSA_QOS_ESDMODEOBJ syscall.Errno = 11029 WSA_QOS_ESHAPERATEOBJ syscall.Errno = 11030 WSA_QOS_RESERVED_PETYPE syscall.Errno = 11031 WSA_SECURE_HOST_NOT_FOUND syscall.Errno = 11032 WSA_IPSEC_NAME_POLICY_ERROR syscall.Errno = 11033 ERROR_IPSEC_QM_POLICY_EXISTS syscall.Errno = 13000 ERROR_IPSEC_QM_POLICY_NOT_FOUND syscall.Errno = 13001 ERROR_IPSEC_QM_POLICY_IN_USE syscall.Errno = 13002 ERROR_IPSEC_MM_POLICY_EXISTS syscall.Errno = 13003 ERROR_IPSEC_MM_POLICY_NOT_FOUND syscall.Errno = 13004 ERROR_IPSEC_MM_POLICY_IN_USE syscall.Errno = 13005 ERROR_IPSEC_MM_FILTER_EXISTS syscall.Errno = 13006 ERROR_IPSEC_MM_FILTER_NOT_FOUND syscall.Errno = 13007 ERROR_IPSEC_TRANSPORT_FILTER_EXISTS syscall.Errno = 13008 ERROR_IPSEC_TRANSPORT_FILTER_NOT_FOUND syscall.Errno = 13009 ERROR_IPSEC_MM_AUTH_EXISTS syscall.Errno = 13010 ERROR_IPSEC_MM_AUTH_NOT_FOUND syscall.Errno = 13011 ERROR_IPSEC_MM_AUTH_IN_USE syscall.Errno = 13012 ERROR_IPSEC_DEFAULT_MM_POLICY_NOT_FOUND syscall.Errno = 13013 ERROR_IPSEC_DEFAULT_MM_AUTH_NOT_FOUND syscall.Errno = 13014 ERROR_IPSEC_DEFAULT_QM_POLICY_NOT_FOUND syscall.Errno = 13015 ERROR_IPSEC_TUNNEL_FILTER_EXISTS syscall.Errno = 13016 ERROR_IPSEC_TUNNEL_FILTER_NOT_FOUND syscall.Errno = 13017 ERROR_IPSEC_MM_FILTER_PENDING_DELETION syscall.Errno = 13018 ERROR_IPSEC_TRANSPORT_FILTER_PENDING_DELETION syscall.Errno = 13019 ERROR_IPSEC_TUNNEL_FILTER_PENDING_DELETION syscall.Errno = 13020 ERROR_IPSEC_MM_POLICY_PENDING_DELETION syscall.Errno = 13021 ERROR_IPSEC_MM_AUTH_PENDING_DELETION syscall.Errno = 13022 ERROR_IPSEC_QM_POLICY_PENDING_DELETION syscall.Errno = 13023 WARNING_IPSEC_MM_POLICY_PRUNED syscall.Errno = 13024 WARNING_IPSEC_QM_POLICY_PRUNED syscall.Errno = 13025 ERROR_IPSEC_IKE_NEG_STATUS_BEGIN syscall.Errno = 13800 ERROR_IPSEC_IKE_AUTH_FAIL syscall.Errno = 13801 ERROR_IPSEC_IKE_ATTRIB_FAIL syscall.Errno = 13802 ERROR_IPSEC_IKE_NEGOTIATION_PENDING syscall.Errno = 13803 ERROR_IPSEC_IKE_GENERAL_PROCESSING_ERROR syscall.Errno = 13804 ERROR_IPSEC_IKE_TIMED_OUT syscall.Errno = 13805 ERROR_IPSEC_IKE_NO_CERT syscall.Errno = 13806 ERROR_IPSEC_IKE_SA_DELETED syscall.Errno = 13807 ERROR_IPSEC_IKE_SA_REAPED syscall.Errno = 13808 ERROR_IPSEC_IKE_MM_ACQUIRE_DROP syscall.Errno = 13809 ERROR_IPSEC_IKE_QM_ACQUIRE_DROP syscall.Errno = 13810 ERROR_IPSEC_IKE_QUEUE_DROP_MM syscall.Errno = 13811 ERROR_IPSEC_IKE_QUEUE_DROP_NO_MM syscall.Errno = 13812 ERROR_IPSEC_IKE_DROP_NO_RESPONSE syscall.Errno = 13813 ERROR_IPSEC_IKE_MM_DELAY_DROP syscall.Errno = 13814 ERROR_IPSEC_IKE_QM_DELAY_DROP syscall.Errno = 13815 ERROR_IPSEC_IKE_ERROR syscall.Errno = 13816 ERROR_IPSEC_IKE_CRL_FAILED syscall.Errno = 13817 ERROR_IPSEC_IKE_INVALID_KEY_USAGE syscall.Errno = 13818 ERROR_IPSEC_IKE_INVALID_CERT_TYPE syscall.Errno = 13819 ERROR_IPSEC_IKE_NO_PRIVATE_KEY syscall.Errno = 13820 ERROR_IPSEC_IKE_SIMULTANEOUS_REKEY syscall.Errno = 13821 ERROR_IPSEC_IKE_DH_FAIL syscall.Errno = 13822 ERROR_IPSEC_IKE_CRITICAL_PAYLOAD_NOT_RECOGNIZED syscall.Errno = 13823 ERROR_IPSEC_IKE_INVALID_HEADER syscall.Errno = 13824 ERROR_IPSEC_IKE_NO_POLICY syscall.Errno = 13825 ERROR_IPSEC_IKE_INVALID_SIGNATURE syscall.Errno = 13826 ERROR_IPSEC_IKE_KERBEROS_ERROR syscall.Errno = 13827 ERROR_IPSEC_IKE_NO_PUBLIC_KEY syscall.Errno = 13828 ERROR_IPSEC_IKE_PROCESS_ERR syscall.Errno = 13829 ERROR_IPSEC_IKE_PROCESS_ERR_SA syscall.Errno = 13830 ERROR_IPSEC_IKE_PROCESS_ERR_PROP syscall.Errno = 13831 ERROR_IPSEC_IKE_PROCESS_ERR_TRANS syscall.Errno = 13832 ERROR_IPSEC_IKE_PROCESS_ERR_KE syscall.Errno = 13833 ERROR_IPSEC_IKE_PROCESS_ERR_ID syscall.Errno = 13834 ERROR_IPSEC_IKE_PROCESS_ERR_CERT syscall.Errno = 13835 ERROR_IPSEC_IKE_PROCESS_ERR_CERT_REQ syscall.Errno = 13836 ERROR_IPSEC_IKE_PROCESS_ERR_HASH syscall.Errno = 13837 ERROR_IPSEC_IKE_PROCESS_ERR_SIG syscall.Errno = 13838 ERROR_IPSEC_IKE_PROCESS_ERR_NONCE syscall.Errno = 13839 ERROR_IPSEC_IKE_PROCESS_ERR_NOTIFY syscall.Errno = 13840 ERROR_IPSEC_IKE_PROCESS_ERR_DELETE syscall.Errno = 13841 ERROR_IPSEC_IKE_PROCESS_ERR_VENDOR syscall.Errno = 13842 ERROR_IPSEC_IKE_INVALID_PAYLOAD syscall.Errno = 13843 ERROR_IPSEC_IKE_LOAD_SOFT_SA syscall.Errno = 13844 ERROR_IPSEC_IKE_SOFT_SA_TORN_DOWN syscall.Errno = 13845 ERROR_IPSEC_IKE_INVALID_COOKIE syscall.Errno = 13846 ERROR_IPSEC_IKE_NO_PEER_CERT syscall.Errno = 13847 ERROR_IPSEC_IKE_PEER_CRL_FAILED syscall.Errno = 13848 ERROR_IPSEC_IKE_POLICY_CHANGE syscall.Errno = 13849 ERROR_IPSEC_IKE_NO_MM_POLICY syscall.Errno = 13850 ERROR_IPSEC_IKE_NOTCBPRIV syscall.Errno = 13851 ERROR_IPSEC_IKE_SECLOADFAIL syscall.Errno = 13852 ERROR_IPSEC_IKE_FAILSSPINIT syscall.Errno = 13853 ERROR_IPSEC_IKE_FAILQUERYSSP syscall.Errno = 13854 ERROR_IPSEC_IKE_SRVACQFAIL syscall.Errno = 13855 ERROR_IPSEC_IKE_SRVQUERYCRED syscall.Errno = 13856 ERROR_IPSEC_IKE_GETSPIFAIL syscall.Errno = 13857 ERROR_IPSEC_IKE_INVALID_FILTER syscall.Errno = 13858 ERROR_IPSEC_IKE_OUT_OF_MEMORY syscall.Errno = 13859 ERROR_IPSEC_IKE_ADD_UPDATE_KEY_FAILED syscall.Errno = 13860 ERROR_IPSEC_IKE_INVALID_POLICY syscall.Errno = 13861 ERROR_IPSEC_IKE_UNKNOWN_DOI syscall.Errno = 13862 ERROR_IPSEC_IKE_INVALID_SITUATION syscall.Errno = 13863 ERROR_IPSEC_IKE_DH_FAILURE syscall.Errno = 13864 ERROR_IPSEC_IKE_INVALID_GROUP syscall.Errno = 13865 ERROR_IPSEC_IKE_ENCRYPT syscall.Errno = 13866 ERROR_IPSEC_IKE_DECRYPT syscall.Errno = 13867 ERROR_IPSEC_IKE_POLICY_MATCH syscall.Errno = 13868 ERROR_IPSEC_IKE_UNSUPPORTED_ID syscall.Errno = 13869 ERROR_IPSEC_IKE_INVALID_HASH syscall.Errno = 13870 ERROR_IPSEC_IKE_INVALID_HASH_ALG syscall.Errno = 13871 ERROR_IPSEC_IKE_INVALID_HASH_SIZE syscall.Errno = 13872 ERROR_IPSEC_IKE_INVALID_ENCRYPT_ALG syscall.Errno = 13873 ERROR_IPSEC_IKE_INVALID_AUTH_ALG syscall.Errno = 13874 ERROR_IPSEC_IKE_INVALID_SIG syscall.Errno = 13875 ERROR_IPSEC_IKE_LOAD_FAILED syscall.Errno = 13876 ERROR_IPSEC_IKE_RPC_DELETE syscall.Errno = 13877 ERROR_IPSEC_IKE_BENIGN_REINIT syscall.Errno = 13878 ERROR_IPSEC_IKE_INVALID_RESPONDER_LIFETIME_NOTIFY syscall.Errno = 13879 ERROR_IPSEC_IKE_INVALID_MAJOR_VERSION syscall.Errno = 13880 ERROR_IPSEC_IKE_INVALID_CERT_KEYLEN syscall.Errno = 13881 ERROR_IPSEC_IKE_MM_LIMIT syscall.Errno = 13882 ERROR_IPSEC_IKE_NEGOTIATION_DISABLED syscall.Errno = 13883 ERROR_IPSEC_IKE_QM_LIMIT syscall.Errno = 13884 ERROR_IPSEC_IKE_MM_EXPIRED syscall.Errno = 13885 ERROR_IPSEC_IKE_PEER_MM_ASSUMED_INVALID syscall.Errno = 13886 ERROR_IPSEC_IKE_CERT_CHAIN_POLICY_MISMATCH syscall.Errno = 13887 ERROR_IPSEC_IKE_UNEXPECTED_MESSAGE_ID syscall.Errno = 13888 ERROR_IPSEC_IKE_INVALID_AUTH_PAYLOAD syscall.Errno = 13889 ERROR_IPSEC_IKE_DOS_COOKIE_SENT syscall.Errno = 13890 ERROR_IPSEC_IKE_SHUTTING_DOWN syscall.Errno = 13891 ERROR_IPSEC_IKE_CGA_AUTH_FAILED syscall.Errno = 13892 ERROR_IPSEC_IKE_PROCESS_ERR_NATOA syscall.Errno = 13893 ERROR_IPSEC_IKE_INVALID_MM_FOR_QM syscall.Errno = 13894 ERROR_IPSEC_IKE_QM_EXPIRED syscall.Errno = 13895 ERROR_IPSEC_IKE_TOO_MANY_FILTERS syscall.Errno = 13896 ERROR_IPSEC_IKE_NEG_STATUS_END syscall.Errno = 13897 ERROR_IPSEC_IKE_KILL_DUMMY_NAP_TUNNEL syscall.Errno = 13898 ERROR_IPSEC_IKE_INNER_IP_ASSIGNMENT_FAILURE syscall.Errno = 13899 ERROR_IPSEC_IKE_REQUIRE_CP_PAYLOAD_MISSING syscall.Errno = 13900 ERROR_IPSEC_KEY_MODULE_IMPERSONATION_NEGOTIATION_PENDING syscall.Errno = 13901 ERROR_IPSEC_IKE_COEXISTENCE_SUPPRESS syscall.Errno = 13902 ERROR_IPSEC_IKE_RATELIMIT_DROP syscall.Errno = 13903 ERROR_IPSEC_IKE_PEER_DOESNT_SUPPORT_MOBIKE syscall.Errno = 13904 ERROR_IPSEC_IKE_AUTHORIZATION_FAILURE syscall.Errno = 13905 ERROR_IPSEC_IKE_STRONG_CRED_AUTHORIZATION_FAILURE syscall.Errno = 13906 ERROR_IPSEC_IKE_AUTHORIZATION_FAILURE_WITH_OPTIONAL_RETRY syscall.Errno = 13907 ERROR_IPSEC_IKE_STRONG_CRED_AUTHORIZATION_AND_CERTMAP_FAILURE syscall.Errno = 13908 ERROR_IPSEC_IKE_NEG_STATUS_EXTENDED_END syscall.Errno = 13909 ERROR_IPSEC_BAD_SPI syscall.Errno = 13910 ERROR_IPSEC_SA_LIFETIME_EXPIRED syscall.Errno = 13911 ERROR_IPSEC_WRONG_SA syscall.Errno = 13912 ERROR_IPSEC_REPLAY_CHECK_FAILED syscall.Errno = 13913 ERROR_IPSEC_INVALID_PACKET syscall.Errno = 13914 ERROR_IPSEC_INTEGRITY_CHECK_FAILED syscall.Errno = 13915 ERROR_IPSEC_CLEAR_TEXT_DROP syscall.Errno = 13916 ERROR_IPSEC_AUTH_FIREWALL_DROP syscall.Errno = 13917 ERROR_IPSEC_THROTTLE_DROP syscall.Errno = 13918 ERROR_IPSEC_DOSP_BLOCK syscall.Errno = 13925 ERROR_IPSEC_DOSP_RECEIVED_MULTICAST syscall.Errno = 13926 ERROR_IPSEC_DOSP_INVALID_PACKET syscall.Errno = 13927 ERROR_IPSEC_DOSP_STATE_LOOKUP_FAILED syscall.Errno = 13928 ERROR_IPSEC_DOSP_MAX_ENTRIES syscall.Errno = 13929 ERROR_IPSEC_DOSP_KEYMOD_NOT_ALLOWED syscall.Errno = 13930 ERROR_IPSEC_DOSP_NOT_INSTALLED syscall.Errno = 13931 ERROR_IPSEC_DOSP_MAX_PER_IP_RATELIMIT_QUEUES syscall.Errno = 13932 ERROR_SXS_SECTION_NOT_FOUND syscall.Errno = 14000 ERROR_SXS_CANT_GEN_ACTCTX syscall.Errno = 14001 ERROR_SXS_INVALID_ACTCTXDATA_FORMAT syscall.Errno = 14002 ERROR_SXS_ASSEMBLY_NOT_FOUND syscall.Errno = 14003 ERROR_SXS_MANIFEST_FORMAT_ERROR syscall.Errno = 14004 ERROR_SXS_MANIFEST_PARSE_ERROR syscall.Errno = 14005 ERROR_SXS_ACTIVATION_CONTEXT_DISABLED syscall.Errno = 14006 ERROR_SXS_KEY_NOT_FOUND syscall.Errno = 14007 ERROR_SXS_VERSION_CONFLICT syscall.Errno = 14008 ERROR_SXS_WRONG_SECTION_TYPE syscall.Errno = 14009 ERROR_SXS_THREAD_QUERIES_DISABLED syscall.Errno = 14010 ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET syscall.Errno = 14011 ERROR_SXS_UNKNOWN_ENCODING_GROUP syscall.Errno = 14012 ERROR_SXS_UNKNOWN_ENCODING syscall.Errno = 14013 ERROR_SXS_INVALID_XML_NAMESPACE_URI syscall.Errno = 14014 ERROR_SXS_ROOT_MANIFEST_DEPENDENCY_NOT_INSTALLED syscall.Errno = 14015 ERROR_SXS_LEAF_MANIFEST_DEPENDENCY_NOT_INSTALLED syscall.Errno = 14016 ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE syscall.Errno = 14017 ERROR_SXS_MANIFEST_MISSING_REQUIRED_DEFAULT_NAMESPACE syscall.Errno = 14018 ERROR_SXS_MANIFEST_INVALID_REQUIRED_DEFAULT_NAMESPACE syscall.Errno = 14019 ERROR_SXS_PRIVATE_MANIFEST_CROSS_PATH_WITH_REPARSE_POINT syscall.Errno = 14020 ERROR_SXS_DUPLICATE_DLL_NAME syscall.Errno = 14021 ERROR_SXS_DUPLICATE_WINDOWCLASS_NAME syscall.Errno = 14022 ERROR_SXS_DUPLICATE_CLSID syscall.Errno = 14023 ERROR_SXS_DUPLICATE_IID syscall.Errno = 14024 ERROR_SXS_DUPLICATE_TLBID syscall.Errno = 14025 ERROR_SXS_DUPLICATE_PROGID syscall.Errno = 14026 ERROR_SXS_DUPLICATE_ASSEMBLY_NAME syscall.Errno = 14027 ERROR_SXS_FILE_HASH_MISMATCH syscall.Errno = 14028 ERROR_SXS_POLICY_PARSE_ERROR syscall.Errno = 14029 ERROR_SXS_XML_E_MISSINGQUOTE syscall.Errno = 14030 ERROR_SXS_XML_E_COMMENTSYNTAX syscall.Errno = 14031 ERROR_SXS_XML_E_BADSTARTNAMECHAR syscall.Errno = 14032 ERROR_SXS_XML_E_BADNAMECHAR syscall.Errno = 14033 ERROR_SXS_XML_E_BADCHARINSTRING syscall.Errno = 14034 ERROR_SXS_XML_E_XMLDECLSYNTAX syscall.Errno = 14035 ERROR_SXS_XML_E_BADCHARDATA syscall.Errno = 14036 ERROR_SXS_XML_E_MISSINGWHITESPACE syscall.Errno = 14037 ERROR_SXS_XML_E_EXPECTINGTAGEND syscall.Errno = 14038 ERROR_SXS_XML_E_MISSINGSEMICOLON syscall.Errno = 14039 ERROR_SXS_XML_E_UNBALANCEDPAREN syscall.Errno = 14040 ERROR_SXS_XML_E_INTERNALERROR syscall.Errno = 14041 ERROR_SXS_XML_E_UNEXPECTED_WHITESPACE syscall.Errno = 14042 ERROR_SXS_XML_E_INCOMPLETE_ENCODING syscall.Errno = 14043 ERROR_SXS_XML_E_MISSING_PAREN syscall.Errno = 14044 ERROR_SXS_XML_E_EXPECTINGCLOSEQUOTE syscall.Errno = 14045 ERROR_SXS_XML_E_MULTIPLE_COLONS syscall.Errno = 14046 ERROR_SXS_XML_E_INVALID_DECIMAL syscall.Errno = 14047 ERROR_SXS_XML_E_INVALID_HEXIDECIMAL syscall.Errno = 14048 ERROR_SXS_XML_E_INVALID_UNICODE syscall.Errno = 14049 ERROR_SXS_XML_E_WHITESPACEORQUESTIONMARK syscall.Errno = 14050 ERROR_SXS_XML_E_UNEXPECTEDENDTAG syscall.Errno = 14051 ERROR_SXS_XML_E_UNCLOSEDTAG syscall.Errno = 14052 ERROR_SXS_XML_E_DUPLICATEATTRIBUTE syscall.Errno = 14053 ERROR_SXS_XML_E_MULTIPLEROOTS syscall.Errno = 14054 ERROR_SXS_XML_E_INVALIDATROOTLEVEL syscall.Errno = 14055 ERROR_SXS_XML_E_BADXMLDECL syscall.Errno = 14056 ERROR_SXS_XML_E_MISSINGROOT syscall.Errno = 14057 ERROR_SXS_XML_E_UNEXPECTEDEOF syscall.Errno = 14058 ERROR_SXS_XML_E_BADPEREFINSUBSET syscall.Errno = 14059 ERROR_SXS_XML_E_UNCLOSEDSTARTTAG syscall.Errno = 14060 ERROR_SXS_XML_E_UNCLOSEDENDTAG syscall.Errno = 14061 ERROR_SXS_XML_E_UNCLOSEDSTRING syscall.Errno = 14062 ERROR_SXS_XML_E_UNCLOSEDCOMMENT syscall.Errno = 14063 ERROR_SXS_XML_E_UNCLOSEDDECL syscall.Errno = 14064 ERROR_SXS_XML_E_UNCLOSEDCDATA syscall.Errno = 14065 ERROR_SXS_XML_E_RESERVEDNAMESPACE syscall.Errno = 14066 ERROR_SXS_XML_E_INVALIDENCODING syscall.Errno = 14067 ERROR_SXS_XML_E_INVALIDSWITCH syscall.Errno = 14068 ERROR_SXS_XML_E_BADXMLCASE syscall.Errno = 14069 ERROR_SXS_XML_E_INVALID_STANDALONE syscall.Errno = 14070 ERROR_SXS_XML_E_UNEXPECTED_STANDALONE syscall.Errno = 14071 ERROR_SXS_XML_E_INVALID_VERSION syscall.Errno = 14072 ERROR_SXS_XML_E_MISSINGEQUALS syscall.Errno = 14073 ERROR_SXS_PROTECTION_RECOVERY_FAILED syscall.Errno = 14074 ERROR_SXS_PROTECTION_PUBLIC_KEY_TOO_SHORT syscall.Errno = 14075 ERROR_SXS_PROTECTION_CATALOG_NOT_VALID syscall.Errno = 14076 ERROR_SXS_UNTRANSLATABLE_HRESULT syscall.Errno = 14077 ERROR_SXS_PROTECTION_CATALOG_FILE_MISSING syscall.Errno = 14078 ERROR_SXS_MISSING_ASSEMBLY_IDENTITY_ATTRIBUTE syscall.Errno = 14079 ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME syscall.Errno = 14080 ERROR_SXS_ASSEMBLY_MISSING syscall.Errno = 14081 ERROR_SXS_CORRUPT_ACTIVATION_STACK syscall.Errno = 14082 ERROR_SXS_CORRUPTION syscall.Errno = 14083 ERROR_SXS_EARLY_DEACTIVATION syscall.Errno = 14084 ERROR_SXS_INVALID_DEACTIVATION syscall.Errno = 14085 ERROR_SXS_MULTIPLE_DEACTIVATION syscall.Errno = 14086 ERROR_SXS_PROCESS_TERMINATION_REQUESTED syscall.Errno = 14087 ERROR_SXS_RELEASE_ACTIVATION_CONTEXT syscall.Errno = 14088 ERROR_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY syscall.Errno = 14089 ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE syscall.Errno = 14090 ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME syscall.Errno = 14091 ERROR_SXS_IDENTITY_DUPLICATE_ATTRIBUTE syscall.Errno = 14092 ERROR_SXS_IDENTITY_PARSE_ERROR syscall.Errno = 14093 ERROR_MALFORMED_SUBSTITUTION_STRING syscall.Errno = 14094 ERROR_SXS_INCORRECT_PUBLIC_KEY_TOKEN syscall.Errno = 14095 ERROR_UNMAPPED_SUBSTITUTION_STRING syscall.Errno = 14096 ERROR_SXS_ASSEMBLY_NOT_LOCKED syscall.Errno = 14097 ERROR_SXS_COMPONENT_STORE_CORRUPT syscall.Errno = 14098 ERROR_ADVANCED_INSTALLER_FAILED syscall.Errno = 14099 ERROR_XML_ENCODING_MISMATCH syscall.Errno = 14100 ERROR_SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT syscall.Errno = 14101 ERROR_SXS_IDENTITIES_DIFFERENT syscall.Errno = 14102 ERROR_SXS_ASSEMBLY_IS_NOT_A_DEPLOYMENT syscall.Errno = 14103 ERROR_SXS_FILE_NOT_PART_OF_ASSEMBLY syscall.Errno = 14104 ERROR_SXS_MANIFEST_TOO_BIG syscall.Errno = 14105 ERROR_SXS_SETTING_NOT_REGISTERED syscall.Errno = 14106 ERROR_SXS_TRANSACTION_CLOSURE_INCOMPLETE syscall.Errno = 14107 ERROR_SMI_PRIMITIVE_INSTALLER_FAILED syscall.Errno = 14108 ERROR_GENERIC_COMMAND_FAILED syscall.Errno = 14109 ERROR_SXS_FILE_HASH_MISSING syscall.Errno = 14110 ERROR_SXS_DUPLICATE_ACTIVATABLE_CLASS syscall.Errno = 14111 ERROR_EVT_INVALID_CHANNEL_PATH syscall.Errno = 15000 ERROR_EVT_INVALID_QUERY syscall.Errno = 15001 ERROR_EVT_PUBLISHER_METADATA_NOT_FOUND syscall.Errno = 15002 ERROR_EVT_EVENT_TEMPLATE_NOT_FOUND syscall.Errno = 15003 ERROR_EVT_INVALID_PUBLISHER_NAME syscall.Errno = 15004 ERROR_EVT_INVALID_EVENT_DATA syscall.Errno = 15005 ERROR_EVT_CHANNEL_NOT_FOUND syscall.Errno = 15007 ERROR_EVT_MALFORMED_XML_TEXT syscall.Errno = 15008 ERROR_EVT_SUBSCRIPTION_TO_DIRECT_CHANNEL syscall.Errno = 15009 ERROR_EVT_CONFIGURATION_ERROR syscall.Errno = 15010 ERROR_EVT_QUERY_RESULT_STALE syscall.Errno = 15011 ERROR_EVT_QUERY_RESULT_INVALID_POSITION syscall.Errno = 15012 ERROR_EVT_NON_VALIDATING_MSXML syscall.Errno = 15013 ERROR_EVT_FILTER_ALREADYSCOPED syscall.Errno = 15014 ERROR_EVT_FILTER_NOTELTSET syscall.Errno = 15015 ERROR_EVT_FILTER_INVARG syscall.Errno = 15016 ERROR_EVT_FILTER_INVTEST syscall.Errno = 15017 ERROR_EVT_FILTER_INVTYPE syscall.Errno = 15018 ERROR_EVT_FILTER_PARSEERR syscall.Errno = 15019 ERROR_EVT_FILTER_UNSUPPORTEDOP syscall.Errno = 15020 ERROR_EVT_FILTER_UNEXPECTEDTOKEN syscall.Errno = 15021 ERROR_EVT_INVALID_OPERATION_OVER_ENABLED_DIRECT_CHANNEL syscall.Errno = 15022 ERROR_EVT_INVALID_CHANNEL_PROPERTY_VALUE syscall.Errno = 15023 ERROR_EVT_INVALID_PUBLISHER_PROPERTY_VALUE syscall.Errno = 15024 ERROR_EVT_CHANNEL_CANNOT_ACTIVATE syscall.Errno = 15025 ERROR_EVT_FILTER_TOO_COMPLEX syscall.Errno = 15026 ERROR_EVT_MESSAGE_NOT_FOUND syscall.Errno = 15027 ERROR_EVT_MESSAGE_ID_NOT_FOUND syscall.Errno = 15028 ERROR_EVT_UNRESOLVED_VALUE_INSERT syscall.Errno = 15029 ERROR_EVT_UNRESOLVED_PARAMETER_INSERT syscall.Errno = 15030 ERROR_EVT_MAX_INSERTS_REACHED syscall.Errno = 15031 ERROR_EVT_EVENT_DEFINITION_NOT_FOUND syscall.Errno = 15032 ERROR_EVT_MESSAGE_LOCALE_NOT_FOUND syscall.Errno = 15033 ERROR_EVT_VERSION_TOO_OLD syscall.Errno = 15034 ERROR_EVT_VERSION_TOO_NEW syscall.Errno = 15035 ERROR_EVT_CANNOT_OPEN_CHANNEL_OF_QUERY syscall.Errno = 15036 ERROR_EVT_PUBLISHER_DISABLED syscall.Errno = 15037 ERROR_EVT_FILTER_OUT_OF_RANGE syscall.Errno = 15038 ERROR_EC_SUBSCRIPTION_CANNOT_ACTIVATE syscall.Errno = 15080 ERROR_EC_LOG_DISABLED syscall.Errno = 15081 ERROR_EC_CIRCULAR_FORWARDING syscall.Errno = 15082 ERROR_EC_CREDSTORE_FULL syscall.Errno = 15083 ERROR_EC_CRED_NOT_FOUND syscall.Errno = 15084 ERROR_EC_NO_ACTIVE_CHANNEL syscall.Errno = 15085 ERROR_MUI_FILE_NOT_FOUND syscall.Errno = 15100 ERROR_MUI_INVALID_FILE syscall.Errno = 15101 ERROR_MUI_INVALID_RC_CONFIG syscall.Errno = 15102 ERROR_MUI_INVALID_LOCALE_NAME syscall.Errno = 15103 ERROR_MUI_INVALID_ULTIMATEFALLBACK_NAME syscall.Errno = 15104 ERROR_MUI_FILE_NOT_LOADED syscall.Errno = 15105 ERROR_RESOURCE_ENUM_USER_STOP syscall.Errno = 15106 ERROR_MUI_INTLSETTINGS_UILANG_NOT_INSTALLED syscall.Errno = 15107 ERROR_MUI_INTLSETTINGS_INVALID_LOCALE_NAME syscall.Errno = 15108 ERROR_MRM_RUNTIME_NO_DEFAULT_OR_NEUTRAL_RESOURCE syscall.Errno = 15110 ERROR_MRM_INVALID_PRICONFIG syscall.Errno = 15111 ERROR_MRM_INVALID_FILE_TYPE syscall.Errno = 15112 ERROR_MRM_UNKNOWN_QUALIFIER syscall.Errno = 15113 ERROR_MRM_INVALID_QUALIFIER_VALUE syscall.Errno = 15114 ERROR_MRM_NO_CANDIDATE syscall.Errno = 15115 ERROR_MRM_NO_MATCH_OR_DEFAULT_CANDIDATE syscall.Errno = 15116 ERROR_MRM_RESOURCE_TYPE_MISMATCH syscall.Errno = 15117 ERROR_MRM_DUPLICATE_MAP_NAME syscall.Errno = 15118 ERROR_MRM_DUPLICATE_ENTRY syscall.Errno = 15119 ERROR_MRM_INVALID_RESOURCE_IDENTIFIER syscall.Errno = 15120 ERROR_MRM_FILEPATH_TOO_LONG syscall.Errno = 15121 ERROR_MRM_UNSUPPORTED_DIRECTORY_TYPE syscall.Errno = 15122 ERROR_MRM_INVALID_PRI_FILE syscall.Errno = 15126 ERROR_MRM_NAMED_RESOURCE_NOT_FOUND syscall.Errno = 15127 ERROR_MRM_MAP_NOT_FOUND syscall.Errno = 15135 ERROR_MRM_UNSUPPORTED_PROFILE_TYPE syscall.Errno = 15136 ERROR_MRM_INVALID_QUALIFIER_OPERATOR syscall.Errno = 15137 ERROR_MRM_INDETERMINATE_QUALIFIER_VALUE syscall.Errno = 15138 ERROR_MRM_AUTOMERGE_ENABLED syscall.Errno = 15139 ERROR_MRM_TOO_MANY_RESOURCES syscall.Errno = 15140 ERROR_MRM_UNSUPPORTED_FILE_TYPE_FOR_MERGE syscall.Errno = 15141 ERROR_MRM_UNSUPPORTED_FILE_TYPE_FOR_LOAD_UNLOAD_PRI_FILE syscall.Errno = 15142 ERROR_MRM_NO_CURRENT_VIEW_ON_THREAD syscall.Errno = 15143 ERROR_DIFFERENT_PROFILE_RESOURCE_MANAGER_EXIST syscall.Errno = 15144 ERROR_OPERATION_NOT_ALLOWED_FROM_SYSTEM_COMPONENT syscall.Errno = 15145 ERROR_MRM_DIRECT_REF_TO_NON_DEFAULT_RESOURCE syscall.Errno = 15146 ERROR_MRM_GENERATION_COUNT_MISMATCH syscall.Errno = 15147 ERROR_PRI_MERGE_VERSION_MISMATCH syscall.Errno = 15148 ERROR_PRI_MERGE_MISSING_SCHEMA syscall.Errno = 15149 ERROR_PRI_MERGE_LOAD_FILE_FAILED syscall.Errno = 15150 ERROR_PRI_MERGE_ADD_FILE_FAILED syscall.Errno = 15151 ERROR_PRI_MERGE_WRITE_FILE_FAILED syscall.Errno = 15152 ERROR_PRI_MERGE_MULTIPLE_PACKAGE_FAMILIES_NOT_ALLOWED syscall.Errno = 15153 ERROR_PRI_MERGE_MULTIPLE_MAIN_PACKAGES_NOT_ALLOWED syscall.Errno = 15154 ERROR_PRI_MERGE_BUNDLE_PACKAGES_NOT_ALLOWED syscall.Errno = 15155 ERROR_PRI_MERGE_MAIN_PACKAGE_REQUIRED syscall.Errno = 15156 ERROR_PRI_MERGE_RESOURCE_PACKAGE_REQUIRED syscall.Errno = 15157 ERROR_PRI_MERGE_INVALID_FILE_NAME syscall.Errno = 15158 ERROR_MRM_PACKAGE_NOT_FOUND syscall.Errno = 15159 ERROR_MRM_MISSING_DEFAULT_LANGUAGE syscall.Errno = 15160 ERROR_MCA_INVALID_CAPABILITIES_STRING syscall.Errno = 15200 ERROR_MCA_INVALID_VCP_VERSION syscall.Errno = 15201 ERROR_MCA_MONITOR_VIOLATES_MCCS_SPECIFICATION syscall.Errno = 15202 ERROR_MCA_MCCS_VERSION_MISMATCH syscall.Errno = 15203 ERROR_MCA_UNSUPPORTED_MCCS_VERSION syscall.Errno = 15204 ERROR_MCA_INTERNAL_ERROR syscall.Errno = 15205 ERROR_MCA_INVALID_TECHNOLOGY_TYPE_RETURNED syscall.Errno = 15206 ERROR_MCA_UNSUPPORTED_COLOR_TEMPERATURE syscall.Errno = 15207 ERROR_AMBIGUOUS_SYSTEM_DEVICE syscall.Errno = 15250 ERROR_SYSTEM_DEVICE_NOT_FOUND syscall.Errno = 15299 ERROR_HASH_NOT_SUPPORTED syscall.Errno = 15300 ERROR_HASH_NOT_PRESENT syscall.Errno = 15301 ERROR_SECONDARY_IC_PROVIDER_NOT_REGISTERED syscall.Errno = 15321 ERROR_GPIO_CLIENT_INFORMATION_INVALID syscall.Errno = 15322 ERROR_GPIO_VERSION_NOT_SUPPORTED syscall.Errno = 15323 ERROR_GPIO_INVALID_REGISTRATION_PACKET syscall.Errno = 15324 ERROR_GPIO_OPERATION_DENIED syscall.Errno = 15325 ERROR_GPIO_INCOMPATIBLE_CONNECT_MODE syscall.Errno = 15326 ERROR_GPIO_INTERRUPT_ALREADY_UNMASKED syscall.Errno = 15327 ERROR_CANNOT_SWITCH_RUNLEVEL syscall.Errno = 15400 ERROR_INVALID_RUNLEVEL_SETTING syscall.Errno = 15401 ERROR_RUNLEVEL_SWITCH_TIMEOUT syscall.Errno = 15402 ERROR_RUNLEVEL_SWITCH_AGENT_TIMEOUT syscall.Errno = 15403 ERROR_RUNLEVEL_SWITCH_IN_PROGRESS syscall.Errno = 15404 ERROR_SERVICES_FAILED_AUTOSTART syscall.Errno = 15405 ERROR_COM_TASK_STOP_PENDING syscall.Errno = 15501 ERROR_INSTALL_OPEN_PACKAGE_FAILED syscall.Errno = 15600 ERROR_INSTALL_PACKAGE_NOT_FOUND syscall.Errno = 15601 ERROR_INSTALL_INVALID_PACKAGE syscall.Errno = 15602 ERROR_INSTALL_RESOLVE_DEPENDENCY_FAILED syscall.Errno = 15603 ERROR_INSTALL_OUT_OF_DISK_SPACE syscall.Errno = 15604 ERROR_INSTALL_NETWORK_FAILURE syscall.Errno = 15605 ERROR_INSTALL_REGISTRATION_FAILURE syscall.Errno = 15606 ERROR_INSTALL_DEREGISTRATION_FAILURE syscall.Errno = 15607 ERROR_INSTALL_CANCEL syscall.Errno = 15608 ERROR_INSTALL_FAILED syscall.Errno = 15609 ERROR_REMOVE_FAILED syscall.Errno = 15610 ERROR_PACKAGE_ALREADY_EXISTS syscall.Errno = 15611 ERROR_NEEDS_REMEDIATION syscall.Errno = 15612 ERROR_INSTALL_PREREQUISITE_FAILED syscall.Errno = 15613 ERROR_PACKAGE_REPOSITORY_CORRUPTED syscall.Errno = 15614 ERROR_INSTALL_POLICY_FAILURE syscall.Errno = 15615 ERROR_PACKAGE_UPDATING syscall.Errno = 15616 ERROR_DEPLOYMENT_BLOCKED_BY_POLICY syscall.Errno = 15617 ERROR_PACKAGES_IN_USE syscall.Errno = 15618 ERROR_RECOVERY_FILE_CORRUPT syscall.Errno = 15619 ERROR_INVALID_STAGED_SIGNATURE syscall.Errno = 15620 ERROR_DELETING_EXISTING_APPLICATIONDATA_STORE_FAILED syscall.Errno = 15621 ERROR_INSTALL_PACKAGE_DOWNGRADE syscall.Errno = 15622 ERROR_SYSTEM_NEEDS_REMEDIATION syscall.Errno = 15623 ERROR_APPX_INTEGRITY_FAILURE_CLR_NGEN syscall.Errno = 15624 ERROR_RESILIENCY_FILE_CORRUPT syscall.Errno = 15625 ERROR_INSTALL_FIREWALL_SERVICE_NOT_RUNNING syscall.Errno = 15626 ERROR_PACKAGE_MOVE_FAILED syscall.Errno = 15627 ERROR_INSTALL_VOLUME_NOT_EMPTY syscall.Errno = 15628 ERROR_INSTALL_VOLUME_OFFLINE syscall.Errno = 15629 ERROR_INSTALL_VOLUME_CORRUPT syscall.Errno = 15630 ERROR_NEEDS_REGISTRATION syscall.Errno = 15631 ERROR_INSTALL_WRONG_PROCESSOR_ARCHITECTURE syscall.Errno = 15632 ERROR_DEV_SIDELOAD_LIMIT_EXCEEDED syscall.Errno = 15633 ERROR_INSTALL_OPTIONAL_PACKAGE_REQUIRES_MAIN_PACKAGE syscall.Errno = 15634 ERROR_PACKAGE_NOT_SUPPORTED_ON_FILESYSTEM syscall.Errno = 15635 ERROR_PACKAGE_MOVE_BLOCKED_BY_STREAMING syscall.Errno = 15636 ERROR_INSTALL_OPTIONAL_PACKAGE_APPLICATIONID_NOT_UNIQUE syscall.Errno = 15637 ERROR_PACKAGE_STAGING_ONHOLD syscall.Errno = 15638 ERROR_INSTALL_INVALID_RELATED_SET_UPDATE syscall.Errno = 15639 ERROR_INSTALL_OPTIONAL_PACKAGE_REQUIRES_MAIN_PACKAGE_FULLTRUST_CAPABILITY syscall.Errno = 15640 ERROR_DEPLOYMENT_BLOCKED_BY_USER_LOG_OFF syscall.Errno = 15641 ERROR_PROVISION_OPTIONAL_PACKAGE_REQUIRES_MAIN_PACKAGE_PROVISIONED syscall.Errno = 15642 ERROR_PACKAGES_REPUTATION_CHECK_FAILED syscall.Errno = 15643 ERROR_PACKAGES_REPUTATION_CHECK_TIMEDOUT syscall.Errno = 15644 ERROR_DEPLOYMENT_OPTION_NOT_SUPPORTED syscall.Errno = 15645 ERROR_APPINSTALLER_ACTIVATION_BLOCKED syscall.Errno = 15646 ERROR_REGISTRATION_FROM_REMOTE_DRIVE_NOT_SUPPORTED syscall.Errno = 15647 ERROR_APPX_RAW_DATA_WRITE_FAILED syscall.Errno = 15648 ERROR_DEPLOYMENT_BLOCKED_BY_VOLUME_POLICY_PACKAGE syscall.Errno = 15649 ERROR_DEPLOYMENT_BLOCKED_BY_VOLUME_POLICY_MACHINE syscall.Errno = 15650 ERROR_DEPLOYMENT_BLOCKED_BY_PROFILE_POLICY syscall.Errno = 15651 ERROR_DEPLOYMENT_FAILED_CONFLICTING_MUTABLE_PACKAGE_DIRECTORY syscall.Errno = 15652 ERROR_SINGLETON_RESOURCE_INSTALLED_IN_ACTIVE_USER syscall.Errno = 15653 ERROR_DIFFERENT_VERSION_OF_PACKAGED_SERVICE_INSTALLED syscall.Errno = 15654 ERROR_SERVICE_EXISTS_AS_NON_PACKAGED_SERVICE syscall.Errno = 15655 ERROR_PACKAGED_SERVICE_REQUIRES_ADMIN_PRIVILEGES syscall.Errno = 15656 APPMODEL_ERROR_NO_PACKAGE syscall.Errno = 15700 APPMODEL_ERROR_PACKAGE_RUNTIME_CORRUPT syscall.Errno = 15701 APPMODEL_ERROR_PACKAGE_IDENTITY_CORRUPT syscall.Errno = 15702 APPMODEL_ERROR_NO_APPLICATION syscall.Errno = 15703 APPMODEL_ERROR_DYNAMIC_PROPERTY_READ_FAILED syscall.Errno = 15704 APPMODEL_ERROR_DYNAMIC_PROPERTY_INVALID syscall.Errno = 15705 APPMODEL_ERROR_PACKAGE_NOT_AVAILABLE syscall.Errno = 15706 APPMODEL_ERROR_NO_MUTABLE_DIRECTORY syscall.Errno = 15707 ERROR_STATE_LOAD_STORE_FAILED syscall.Errno = 15800 ERROR_STATE_GET_VERSION_FAILED syscall.Errno = 15801 ERROR_STATE_SET_VERSION_FAILED syscall.Errno = 15802 ERROR_STATE_STRUCTURED_RESET_FAILED syscall.Errno = 15803 ERROR_STATE_OPEN_CONTAINER_FAILED syscall.Errno = 15804 ERROR_STATE_CREATE_CONTAINER_FAILED syscall.Errno = 15805 ERROR_STATE_DELETE_CONTAINER_FAILED syscall.Errno = 15806 ERROR_STATE_READ_SETTING_FAILED syscall.Errno = 15807 ERROR_STATE_WRITE_SETTING_FAILED syscall.Errno = 15808 ERROR_STATE_DELETE_SETTING_FAILED syscall.Errno = 15809 ERROR_STATE_QUERY_SETTING_FAILED syscall.Errno = 15810 ERROR_STATE_READ_COMPOSITE_SETTING_FAILED syscall.Errno = 15811 ERROR_STATE_WRITE_COMPOSITE_SETTING_FAILED syscall.Errno = 15812 ERROR_STATE_ENUMERATE_CONTAINER_FAILED syscall.Errno = 15813 ERROR_STATE_ENUMERATE_SETTINGS_FAILED syscall.Errno = 15814 ERROR_STATE_COMPOSITE_SETTING_VALUE_SIZE_LIMIT_EXCEEDED syscall.Errno = 15815 ERROR_STATE_SETTING_VALUE_SIZE_LIMIT_EXCEEDED syscall.Errno = 15816 ERROR_STATE_SETTING_NAME_SIZE_LIMIT_EXCEEDED syscall.Errno = 15817 ERROR_STATE_CONTAINER_NAME_SIZE_LIMIT_EXCEEDED syscall.Errno = 15818 ERROR_API_UNAVAILABLE syscall.Errno = 15841 STORE_ERROR_UNLICENSED syscall.Errno = 15861 STORE_ERROR_UNLICENSED_USER syscall.Errno = 15862 STORE_ERROR_PENDING_COM_TRANSACTION syscall.Errno = 15863 STORE_ERROR_LICENSE_REVOKED syscall.Errno = 15864 SEVERITY_SUCCESS syscall.Errno = 0 SEVERITY_ERROR syscall.Errno = 1 FACILITY_NT_BIT = 0x10000000 E_NOT_SET = ERROR_NOT_FOUND E_NOT_VALID_STATE = ERROR_INVALID_STATE E_NOT_SUFFICIENT_BUFFER = ERROR_INSUFFICIENT_BUFFER E_TIME_SENSITIVE_THREAD = ERROR_TIME_SENSITIVE_THREAD E_NO_TASK_QUEUE = ERROR_NO_TASK_QUEUE NOERROR syscall.Errno = 0 E_UNEXPECTED Handle = 0x8000FFFF E_NOTIMPL Handle = 0x80004001 E_OUTOFMEMORY Handle = 0x8007000E E_INVALIDARG Handle = 0x80070057 E_NOINTERFACE Handle = 0x80004002 E_POINTER Handle = 0x80004003 E_HANDLE Handle = 0x80070006 E_ABORT Handle = 0x80004004 E_FAIL Handle = 0x80004005 E_ACCESSDENIED Handle = 0x80070005 E_PENDING Handle = 0x8000000A E_BOUNDS Handle = 0x8000000B E_CHANGED_STATE Handle = 0x8000000C E_ILLEGAL_STATE_CHANGE Handle = 0x8000000D E_ILLEGAL_METHOD_CALL Handle = 0x8000000E RO_E_METADATA_NAME_NOT_FOUND Handle = 0x8000000F RO_E_METADATA_NAME_IS_NAMESPACE Handle = 0x80000010 RO_E_METADATA_INVALID_TYPE_FORMAT Handle = 0x80000011 RO_E_INVALID_METADATA_FILE Handle = 0x80000012 RO_E_CLOSED Handle = 0x80000013 RO_E_EXCLUSIVE_WRITE Handle = 0x80000014 RO_E_CHANGE_NOTIFICATION_IN_PROGRESS Handle = 0x80000015 RO_E_ERROR_STRING_NOT_FOUND Handle = 0x80000016 E_STRING_NOT_NULL_TERMINATED Handle = 0x80000017 E_ILLEGAL_DELEGATE_ASSIGNMENT Handle = 0x80000018 E_ASYNC_OPERATION_NOT_STARTED Handle = 0x80000019 E_APPLICATION_EXITING Handle = 0x8000001A E_APPLICATION_VIEW_EXITING Handle = 0x8000001B RO_E_MUST_BE_AGILE Handle = 0x8000001C RO_E_UNSUPPORTED_FROM_MTA Handle = 0x8000001D RO_E_COMMITTED Handle = 0x8000001E RO_E_BLOCKED_CROSS_ASTA_CALL Handle = 0x8000001F RO_E_CANNOT_ACTIVATE_FULL_TRUST_SERVER Handle = 0x80000020 RO_E_CANNOT_ACTIVATE_UNIVERSAL_APPLICATION_SERVER Handle = 0x80000021 CO_E_INIT_TLS Handle = 0x80004006 CO_E_INIT_SHARED_ALLOCATOR Handle = 0x80004007 CO_E_INIT_MEMORY_ALLOCATOR Handle = 0x80004008 CO_E_INIT_CLASS_CACHE Handle = 0x80004009 CO_E_INIT_RPC_CHANNEL Handle = 0x8000400A CO_E_INIT_TLS_SET_CHANNEL_CONTROL Handle = 0x8000400B CO_E_INIT_TLS_CHANNEL_CONTROL Handle = 0x8000400C CO_E_INIT_UNACCEPTED_USER_ALLOCATOR Handle = 0x8000400D CO_E_INIT_SCM_MUTEX_EXISTS Handle = 0x8000400E CO_E_INIT_SCM_FILE_MAPPING_EXISTS Handle = 0x8000400F CO_E_INIT_SCM_MAP_VIEW_OF_FILE Handle = 0x80004010 CO_E_INIT_SCM_EXEC_FAILURE Handle = 0x80004011 CO_E_INIT_ONLY_SINGLE_THREADED Handle = 0x80004012 CO_E_CANT_REMOTE Handle = 0x80004013 CO_E_BAD_SERVER_NAME Handle = 0x80004014 CO_E_WRONG_SERVER_IDENTITY Handle = 0x80004015 CO_E_OLE1DDE_DISABLED Handle = 0x80004016 CO_E_RUNAS_SYNTAX Handle = 0x80004017 CO_E_CREATEPROCESS_FAILURE Handle = 0x80004018 CO_E_RUNAS_CREATEPROCESS_FAILURE Handle = 0x80004019 CO_E_RUNAS_LOGON_FAILURE Handle = 0x8000401A CO_E_LAUNCH_PERMSSION_DENIED Handle = 0x8000401B CO_E_START_SERVICE_FAILURE Handle = 0x8000401C CO_E_REMOTE_COMMUNICATION_FAILURE Handle = 0x8000401D CO_E_SERVER_START_TIMEOUT Handle = 0x8000401E CO_E_CLSREG_INCONSISTENT Handle = 0x8000401F CO_E_IIDREG_INCONSISTENT Handle = 0x80004020 CO_E_NOT_SUPPORTED Handle = 0x80004021 CO_E_RELOAD_DLL Handle = 0x80004022 CO_E_MSI_ERROR Handle = 0x80004023 CO_E_ATTEMPT_TO_CREATE_OUTSIDE_CLIENT_CONTEXT Handle = 0x80004024 CO_E_SERVER_PAUSED Handle = 0x80004025 CO_E_SERVER_NOT_PAUSED Handle = 0x80004026 CO_E_CLASS_DISABLED Handle = 0x80004027 CO_E_CLRNOTAVAILABLE Handle = 0x80004028 CO_E_ASYNC_WORK_REJECTED Handle = 0x80004029 CO_E_SERVER_INIT_TIMEOUT Handle = 0x8000402A CO_E_NO_SECCTX_IN_ACTIVATE Handle = 0x8000402B CO_E_TRACKER_CONFIG Handle = 0x80004030 CO_E_THREADPOOL_CONFIG Handle = 0x80004031 CO_E_SXS_CONFIG Handle = 0x80004032 CO_E_MALFORMED_SPN Handle = 0x80004033 CO_E_UNREVOKED_REGISTRATION_ON_APARTMENT_SHUTDOWN Handle = 0x80004034 CO_E_PREMATURE_STUB_RUNDOWN Handle = 0x80004035 S_OK Handle = 0 S_FALSE Handle = 1 OLE_E_FIRST Handle = 0x80040000 OLE_E_LAST Handle = 0x800400FF OLE_S_FIRST Handle = 0x00040000 OLE_S_LAST Handle = 0x000400FF OLE_E_OLEVERB Handle = 0x80040000 OLE_E_ADVF Handle = 0x80040001 OLE_E_ENUM_NOMORE Handle = 0x80040002 OLE_E_ADVISENOTSUPPORTED Handle = 0x80040003 OLE_E_NOCONNECTION Handle = 0x80040004 OLE_E_NOTRUNNING Handle = 0x80040005 OLE_E_NOCACHE Handle = 0x80040006 OLE_E_BLANK Handle = 0x80040007 OLE_E_CLASSDIFF Handle = 0x80040008 OLE_E_CANT_GETMONIKER Handle = 0x80040009 OLE_E_CANT_BINDTOSOURCE Handle = 0x8004000A OLE_E_STATIC Handle = 0x8004000B OLE_E_PROMPTSAVECANCELLED Handle = 0x8004000C OLE_E_INVALIDRECT Handle = 0x8004000D OLE_E_WRONGCOMPOBJ Handle = 0x8004000E OLE_E_INVALIDHWND Handle = 0x8004000F OLE_E_NOT_INPLACEACTIVE Handle = 0x80040010 OLE_E_CANTCONVERT Handle = 0x80040011 OLE_E_NOSTORAGE Handle = 0x80040012 DV_E_FORMATETC Handle = 0x80040064 DV_E_DVTARGETDEVICE Handle = 0x80040065 DV_E_STGMEDIUM Handle = 0x80040066 DV_E_STATDATA Handle = 0x80040067 DV_E_LINDEX Handle = 0x80040068 DV_E_TYMED Handle = 0x80040069 DV_E_CLIPFORMAT Handle = 0x8004006A DV_E_DVASPECT Handle = 0x8004006B DV_E_DVTARGETDEVICE_SIZE Handle = 0x8004006C DV_E_NOIVIEWOBJECT Handle = 0x8004006D DRAGDROP_E_FIRST syscall.Errno = 0x80040100 DRAGDROP_E_LAST syscall.Errno = 0x8004010F DRAGDROP_S_FIRST syscall.Errno = 0x00040100 DRAGDROP_S_LAST syscall.Errno = 0x0004010F DRAGDROP_E_NOTREGISTERED Handle = 0x80040100 DRAGDROP_E_ALREADYREGISTERED Handle = 0x80040101 DRAGDROP_E_INVALIDHWND Handle = 0x80040102 DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED Handle = 0x80040103 CLASSFACTORY_E_FIRST syscall.Errno = 0x80040110 CLASSFACTORY_E_LAST syscall.Errno = 0x8004011F CLASSFACTORY_S_FIRST syscall.Errno = 0x00040110 CLASSFACTORY_S_LAST syscall.Errno = 0x0004011F CLASS_E_NOAGGREGATION Handle = 0x80040110 CLASS_E_CLASSNOTAVAILABLE Handle = 0x80040111 CLASS_E_NOTLICENSED Handle = 0x80040112 MARSHAL_E_FIRST syscall.Errno = 0x80040120 MARSHAL_E_LAST syscall.Errno = 0x8004012F MARSHAL_S_FIRST syscall.Errno = 0x00040120 MARSHAL_S_LAST syscall.Errno = 0x0004012F DATA_E_FIRST syscall.Errno = 0x80040130 DATA_E_LAST syscall.Errno = 0x8004013F DATA_S_FIRST syscall.Errno = 0x00040130 DATA_S_LAST syscall.Errno = 0x0004013F VIEW_E_FIRST syscall.Errno = 0x80040140 VIEW_E_LAST syscall.Errno = 0x8004014F VIEW_S_FIRST syscall.Errno = 0x00040140 VIEW_S_LAST syscall.Errno = 0x0004014F VIEW_E_DRAW Handle = 0x80040140 REGDB_E_FIRST syscall.Errno = 0x80040150 REGDB_E_LAST syscall.Errno = 0x8004015F REGDB_S_FIRST syscall.Errno = 0x00040150 REGDB_S_LAST syscall.Errno = 0x0004015F REGDB_E_READREGDB Handle = 0x80040150 REGDB_E_WRITEREGDB Handle = 0x80040151 REGDB_E_KEYMISSING Handle = 0x80040152 REGDB_E_INVALIDVALUE Handle = 0x80040153 REGDB_E_CLASSNOTREG Handle = 0x80040154 REGDB_E_IIDNOTREG Handle = 0x80040155 REGDB_E_BADTHREADINGMODEL Handle = 0x80040156 REGDB_E_PACKAGEPOLICYVIOLATION Handle = 0x80040157 CAT_E_FIRST syscall.Errno = 0x80040160 CAT_E_LAST syscall.Errno = 0x80040161 CAT_E_CATIDNOEXIST Handle = 0x80040160 CAT_E_NODESCRIPTION Handle = 0x80040161 CS_E_FIRST syscall.Errno = 0x80040164 CS_E_LAST syscall.Errno = 0x8004016F CS_E_PACKAGE_NOTFOUND Handle = 0x80040164 CS_E_NOT_DELETABLE Handle = 0x80040165 CS_E_CLASS_NOTFOUND Handle = 0x80040166 CS_E_INVALID_VERSION Handle = 0x80040167 CS_E_NO_CLASSSTORE Handle = 0x80040168 CS_E_OBJECT_NOTFOUND Handle = 0x80040169 CS_E_OBJECT_ALREADY_EXISTS Handle = 0x8004016A CS_E_INVALID_PATH Handle = 0x8004016B CS_E_NETWORK_ERROR Handle = 0x8004016C CS_E_ADMIN_LIMIT_EXCEEDED Handle = 0x8004016D CS_E_SCHEMA_MISMATCH Handle = 0x8004016E CS_E_INTERNAL_ERROR Handle = 0x8004016F CACHE_E_FIRST syscall.Errno = 0x80040170 CACHE_E_LAST syscall.Errno = 0x8004017F CACHE_S_FIRST syscall.Errno = 0x00040170 CACHE_S_LAST syscall.Errno = 0x0004017F CACHE_E_NOCACHE_UPDATED Handle = 0x80040170 OLEOBJ_E_FIRST syscall.Errno = 0x80040180 OLEOBJ_E_LAST syscall.Errno = 0x8004018F OLEOBJ_S_FIRST syscall.Errno = 0x00040180 OLEOBJ_S_LAST syscall.Errno = 0x0004018F OLEOBJ_E_NOVERBS Handle = 0x80040180 OLEOBJ_E_INVALIDVERB Handle = 0x80040181 CLIENTSITE_E_FIRST syscall.Errno = 0x80040190 CLIENTSITE_E_LAST syscall.Errno = 0x8004019F CLIENTSITE_S_FIRST syscall.Errno = 0x00040190 CLIENTSITE_S_LAST syscall.Errno = 0x0004019F INPLACE_E_NOTUNDOABLE Handle = 0x800401A0 INPLACE_E_NOTOOLSPACE Handle = 0x800401A1 INPLACE_E_FIRST syscall.Errno = 0x800401A0 INPLACE_E_LAST syscall.Errno = 0x800401AF INPLACE_S_FIRST syscall.Errno = 0x000401A0 INPLACE_S_LAST syscall.Errno = 0x000401AF ENUM_E_FIRST syscall.Errno = 0x800401B0 ENUM_E_LAST syscall.Errno = 0x800401BF ENUM_S_FIRST syscall.Errno = 0x000401B0 ENUM_S_LAST syscall.Errno = 0x000401BF CONVERT10_E_FIRST syscall.Errno = 0x800401C0 CONVERT10_E_LAST syscall.Errno = 0x800401CF CONVERT10_S_FIRST syscall.Errno = 0x000401C0 CONVERT10_S_LAST syscall.Errno = 0x000401CF CONVERT10_E_OLESTREAM_GET Handle = 0x800401C0 CONVERT10_E_OLESTREAM_PUT Handle = 0x800401C1 CONVERT10_E_OLESTREAM_FMT Handle = 0x800401C2 CONVERT10_E_OLESTREAM_BITMAP_TO_DIB Handle = 0x800401C3 CONVERT10_E_STG_FMT Handle = 0x800401C4 CONVERT10_E_STG_NO_STD_STREAM Handle = 0x800401C5 CONVERT10_E_STG_DIB_TO_BITMAP Handle = 0x800401C6 CLIPBRD_E_FIRST syscall.Errno = 0x800401D0 CLIPBRD_E_LAST syscall.Errno = 0x800401DF CLIPBRD_S_FIRST syscall.Errno = 0x000401D0 CLIPBRD_S_LAST syscall.Errno = 0x000401DF CLIPBRD_E_CANT_OPEN Handle = 0x800401D0 CLIPBRD_E_CANT_EMPTY Handle = 0x800401D1 CLIPBRD_E_CANT_SET Handle = 0x800401D2 CLIPBRD_E_BAD_DATA Handle = 0x800401D3 CLIPBRD_E_CANT_CLOSE Handle = 0x800401D4 MK_E_FIRST syscall.Errno = 0x800401E0 MK_E_LAST syscall.Errno = 0x800401EF MK_S_FIRST syscall.Errno = 0x000401E0 MK_S_LAST syscall.Errno = 0x000401EF MK_E_CONNECTMANUALLY Handle = 0x800401E0 MK_E_EXCEEDEDDEADLINE Handle = 0x800401E1 MK_E_NEEDGENERIC Handle = 0x800401E2 MK_E_UNAVAILABLE Handle = 0x800401E3 MK_E_SYNTAX Handle = 0x800401E4 MK_E_NOOBJECT Handle = 0x800401E5 MK_E_INVALIDEXTENSION Handle = 0x800401E6 MK_E_INTERMEDIATEINTERFACENOTSUPPORTED Handle = 0x800401E7 MK_E_NOTBINDABLE Handle = 0x800401E8 MK_E_NOTBOUND Handle = 0x800401E9 MK_E_CANTOPENFILE Handle = 0x800401EA MK_E_MUSTBOTHERUSER Handle = 0x800401EB MK_E_NOINVERSE Handle = 0x800401EC MK_E_NOSTORAGE Handle = 0x800401ED MK_E_NOPREFIX Handle = 0x800401EE MK_E_ENUMERATION_FAILED Handle = 0x800401EF CO_E_FIRST syscall.Errno = 0x800401F0 CO_E_LAST syscall.Errno = 0x800401FF CO_S_FIRST syscall.Errno = 0x000401F0 CO_S_LAST syscall.Errno = 0x000401FF CO_E_NOTINITIALIZED Handle = 0x800401F0 CO_E_ALREADYINITIALIZED Handle = 0x800401F1 CO_E_CANTDETERMINECLASS Handle = 0x800401F2 CO_E_CLASSSTRING Handle = 0x800401F3 CO_E_IIDSTRING Handle = 0x800401F4 CO_E_APPNOTFOUND Handle = 0x800401F5 CO_E_APPSINGLEUSE Handle = 0x800401F6 CO_E_ERRORINAPP Handle = 0x800401F7 CO_E_DLLNOTFOUND Handle = 0x800401F8 CO_E_ERRORINDLL Handle = 0x800401F9 CO_E_WRONGOSFORAPP Handle = 0x800401FA CO_E_OBJNOTREG Handle = 0x800401FB CO_E_OBJISREG Handle = 0x800401FC CO_E_OBJNOTCONNECTED Handle = 0x800401FD CO_E_APPDIDNTREG Handle = 0x800401FE CO_E_RELEASED Handle = 0x800401FF EVENT_E_FIRST syscall.Errno = 0x80040200 EVENT_E_LAST syscall.Errno = 0x8004021F EVENT_S_FIRST syscall.Errno = 0x00040200 EVENT_S_LAST syscall.Errno = 0x0004021F EVENT_S_SOME_SUBSCRIBERS_FAILED Handle = 0x00040200 EVENT_E_ALL_SUBSCRIBERS_FAILED Handle = 0x80040201 EVENT_S_NOSUBSCRIBERS Handle = 0x00040202 EVENT_E_QUERYSYNTAX Handle = 0x80040203 EVENT_E_QUERYFIELD Handle = 0x80040204 EVENT_E_INTERNALEXCEPTION Handle = 0x80040205 EVENT_E_INTERNALERROR Handle = 0x80040206 EVENT_E_INVALID_PER_USER_SID Handle = 0x80040207 EVENT_E_USER_EXCEPTION Handle = 0x80040208 EVENT_E_TOO_MANY_METHODS Handle = 0x80040209 EVENT_E_MISSING_EVENTCLASS Handle = 0x8004020A EVENT_E_NOT_ALL_REMOVED Handle = 0x8004020B EVENT_E_COMPLUS_NOT_INSTALLED Handle = 0x8004020C EVENT_E_CANT_MODIFY_OR_DELETE_UNCONFIGURED_OBJECT Handle = 0x8004020D EVENT_E_CANT_MODIFY_OR_DELETE_CONFIGURED_OBJECT Handle = 0x8004020E EVENT_E_INVALID_EVENT_CLASS_PARTITION Handle = 0x8004020F EVENT_E_PER_USER_SID_NOT_LOGGED_ON Handle = 0x80040210 TPC_E_INVALID_PROPERTY Handle = 0x80040241 TPC_E_NO_DEFAULT_TABLET Handle = 0x80040212 TPC_E_UNKNOWN_PROPERTY Handle = 0x8004021B TPC_E_INVALID_INPUT_RECT Handle = 0x80040219 TPC_E_INVALID_STROKE Handle = 0x80040222 TPC_E_INITIALIZE_FAIL Handle = 0x80040223 TPC_E_NOT_RELEVANT Handle = 0x80040232 TPC_E_INVALID_PACKET_DESCRIPTION Handle = 0x80040233 TPC_E_RECOGNIZER_NOT_REGISTERED Handle = 0x80040235 TPC_E_INVALID_RIGHTS Handle = 0x80040236 TPC_E_OUT_OF_ORDER_CALL Handle = 0x80040237 TPC_E_QUEUE_FULL Handle = 0x80040238 TPC_E_INVALID_CONFIGURATION Handle = 0x80040239 TPC_E_INVALID_DATA_FROM_RECOGNIZER Handle = 0x8004023A TPC_S_TRUNCATED Handle = 0x00040252 TPC_S_INTERRUPTED Handle = 0x00040253 TPC_S_NO_DATA_TO_PROCESS Handle = 0x00040254 XACT_E_FIRST syscall.Errno = 0x8004D000 XACT_E_LAST syscall.Errno = 0x8004D02B XACT_S_FIRST syscall.Errno = 0x0004D000 XACT_S_LAST syscall.Errno = 0x0004D010 XACT_E_ALREADYOTHERSINGLEPHASE Handle = 0x8004D000 XACT_E_CANTRETAIN Handle = 0x8004D001 XACT_E_COMMITFAILED Handle = 0x8004D002 XACT_E_COMMITPREVENTED Handle = 0x8004D003 XACT_E_HEURISTICABORT Handle = 0x8004D004 XACT_E_HEURISTICCOMMIT Handle = 0x8004D005 XACT_E_HEURISTICDAMAGE Handle = 0x8004D006 XACT_E_HEURISTICDANGER Handle = 0x8004D007 XACT_E_ISOLATIONLEVEL Handle = 0x8004D008 XACT_E_NOASYNC Handle = 0x8004D009 XACT_E_NOENLIST Handle = 0x8004D00A XACT_E_NOISORETAIN Handle = 0x8004D00B XACT_E_NORESOURCE Handle = 0x8004D00C XACT_E_NOTCURRENT Handle = 0x8004D00D XACT_E_NOTRANSACTION Handle = 0x8004D00E XACT_E_NOTSUPPORTED Handle = 0x8004D00F XACT_E_UNKNOWNRMGRID Handle = 0x8004D010 XACT_E_WRONGSTATE Handle = 0x8004D011 XACT_E_WRONGUOW Handle = 0x8004D012 XACT_E_XTIONEXISTS Handle = 0x8004D013 XACT_E_NOIMPORTOBJECT Handle = 0x8004D014 XACT_E_INVALIDCOOKIE Handle = 0x8004D015 XACT_E_INDOUBT Handle = 0x8004D016 XACT_E_NOTIMEOUT Handle = 0x8004D017 XACT_E_ALREADYINPROGRESS Handle = 0x8004D018 XACT_E_ABORTED Handle = 0x8004D019 XACT_E_LOGFULL Handle = 0x8004D01A XACT_E_TMNOTAVAILABLE Handle = 0x8004D01B XACT_E_CONNECTION_DOWN Handle = 0x8004D01C XACT_E_CONNECTION_DENIED Handle = 0x8004D01D XACT_E_REENLISTTIMEOUT Handle = 0x8004D01E XACT_E_TIP_CONNECT_FAILED Handle = 0x8004D01F XACT_E_TIP_PROTOCOL_ERROR Handle = 0x8004D020 XACT_E_TIP_PULL_FAILED Handle = 0x8004D021 XACT_E_DEST_TMNOTAVAILABLE Handle = 0x8004D022 XACT_E_TIP_DISABLED Handle = 0x8004D023 XACT_E_NETWORK_TX_DISABLED Handle = 0x8004D024 XACT_E_PARTNER_NETWORK_TX_DISABLED Handle = 0x8004D025 XACT_E_XA_TX_DISABLED Handle = 0x8004D026 XACT_E_UNABLE_TO_READ_DTC_CONFIG Handle = 0x8004D027 XACT_E_UNABLE_TO_LOAD_DTC_PROXY Handle = 0x8004D028 XACT_E_ABORTING Handle = 0x8004D029 XACT_E_PUSH_COMM_FAILURE Handle = 0x8004D02A XACT_E_PULL_COMM_FAILURE Handle = 0x8004D02B XACT_E_LU_TX_DISABLED Handle = 0x8004D02C XACT_E_CLERKNOTFOUND Handle = 0x8004D080 XACT_E_CLERKEXISTS Handle = 0x8004D081 XACT_E_RECOVERYINPROGRESS Handle = 0x8004D082 XACT_E_TRANSACTIONCLOSED Handle = 0x8004D083 XACT_E_INVALIDLSN Handle = 0x8004D084 XACT_E_REPLAYREQUEST Handle = 0x8004D085 XACT_S_ASYNC Handle = 0x0004D000 XACT_S_DEFECT Handle = 0x0004D001 XACT_S_READONLY Handle = 0x0004D002 XACT_S_SOMENORETAIN Handle = 0x0004D003 XACT_S_OKINFORM Handle = 0x0004D004 XACT_S_MADECHANGESCONTENT Handle = 0x0004D005 XACT_S_MADECHANGESINFORM Handle = 0x0004D006 XACT_S_ALLNORETAIN Handle = 0x0004D007 XACT_S_ABORTING Handle = 0x0004D008 XACT_S_SINGLEPHASE Handle = 0x0004D009 XACT_S_LOCALLY_OK Handle = 0x0004D00A XACT_S_LASTRESOURCEMANAGER Handle = 0x0004D010 CONTEXT_E_FIRST syscall.Errno = 0x8004E000 CONTEXT_E_LAST syscall.Errno = 0x8004E02F CONTEXT_S_FIRST syscall.Errno = 0x0004E000 CONTEXT_S_LAST syscall.Errno = 0x0004E02F CONTEXT_E_ABORTED Handle = 0x8004E002 CONTEXT_E_ABORTING Handle = 0x8004E003 CONTEXT_E_NOCONTEXT Handle = 0x8004E004 CONTEXT_E_WOULD_DEADLOCK Handle = 0x8004E005 CONTEXT_E_SYNCH_TIMEOUT Handle = 0x8004E006 CONTEXT_E_OLDREF Handle = 0x8004E007 CONTEXT_E_ROLENOTFOUND Handle = 0x8004E00C CONTEXT_E_TMNOTAVAILABLE Handle = 0x8004E00F CO_E_ACTIVATIONFAILED Handle = 0x8004E021 CO_E_ACTIVATIONFAILED_EVENTLOGGED Handle = 0x8004E022 CO_E_ACTIVATIONFAILED_CATALOGERROR Handle = 0x8004E023 CO_E_ACTIVATIONFAILED_TIMEOUT Handle = 0x8004E024 CO_E_INITIALIZATIONFAILED Handle = 0x8004E025 CONTEXT_E_NOJIT Handle = 0x8004E026 CONTEXT_E_NOTRANSACTION Handle = 0x8004E027 CO_E_THREADINGMODEL_CHANGED Handle = 0x8004E028 CO_E_NOIISINTRINSICS Handle = 0x8004E029 CO_E_NOCOOKIES Handle = 0x8004E02A CO_E_DBERROR Handle = 0x8004E02B CO_E_NOTPOOLED Handle = 0x8004E02C CO_E_NOTCONSTRUCTED Handle = 0x8004E02D CO_E_NOSYNCHRONIZATION Handle = 0x8004E02E CO_E_ISOLEVELMISMATCH Handle = 0x8004E02F CO_E_CALL_OUT_OF_TX_SCOPE_NOT_ALLOWED Handle = 0x8004E030 CO_E_EXIT_TRANSACTION_SCOPE_NOT_CALLED Handle = 0x8004E031 OLE_S_USEREG Handle = 0x00040000 OLE_S_STATIC Handle = 0x00040001 OLE_S_MAC_CLIPFORMAT Handle = 0x00040002 DRAGDROP_S_DROP Handle = 0x00040100 DRAGDROP_S_CANCEL Handle = 0x00040101 DRAGDROP_S_USEDEFAULTCURSORS Handle = 0x00040102 DATA_S_SAMEFORMATETC Handle = 0x00040130 VIEW_S_ALREADY_FROZEN Handle = 0x00040140 CACHE_S_FORMATETC_NOTSUPPORTED Handle = 0x00040170 CACHE_S_SAMECACHE Handle = 0x00040171 CACHE_S_SOMECACHES_NOTUPDATED Handle = 0x00040172 OLEOBJ_S_INVALIDVERB Handle = 0x00040180 OLEOBJ_S_CANNOT_DOVERB_NOW Handle = 0x00040181 OLEOBJ_S_INVALIDHWND Handle = 0x00040182 INPLACE_S_TRUNCATED Handle = 0x000401A0 CONVERT10_S_NO_PRESENTATION Handle = 0x000401C0 MK_S_REDUCED_TO_SELF Handle = 0x000401E2 MK_S_ME Handle = 0x000401E4 MK_S_HIM Handle = 0x000401E5 MK_S_US Handle = 0x000401E6 MK_S_MONIKERALREADYREGISTERED Handle = 0x000401E7 SCHED_S_TASK_READY Handle = 0x00041300 SCHED_S_TASK_RUNNING Handle = 0x00041301 SCHED_S_TASK_DISABLED Handle = 0x00041302 SCHED_S_TASK_HAS_NOT_RUN Handle = 0x00041303 SCHED_S_TASK_NO_MORE_RUNS Handle = 0x00041304 SCHED_S_TASK_NOT_SCHEDULED Handle = 0x00041305 SCHED_S_TASK_TERMINATED Handle = 0x00041306 SCHED_S_TASK_NO_VALID_TRIGGERS Handle = 0x00041307 SCHED_S_EVENT_TRIGGER Handle = 0x00041308 SCHED_E_TRIGGER_NOT_FOUND Handle = 0x80041309 SCHED_E_TASK_NOT_READY Handle = 0x8004130A SCHED_E_TASK_NOT_RUNNING Handle = 0x8004130B SCHED_E_SERVICE_NOT_INSTALLED Handle = 0x8004130C SCHED_E_CANNOT_OPEN_TASK Handle = 0x8004130D SCHED_E_INVALID_TASK Handle = 0x8004130E SCHED_E_ACCOUNT_INFORMATION_NOT_SET Handle = 0x8004130F SCHED_E_ACCOUNT_NAME_NOT_FOUND Handle = 0x80041310 SCHED_E_ACCOUNT_DBASE_CORRUPT Handle = 0x80041311 SCHED_E_NO_SECURITY_SERVICES Handle = 0x80041312 SCHED_E_UNKNOWN_OBJECT_VERSION Handle = 0x80041313 SCHED_E_UNSUPPORTED_ACCOUNT_OPTION Handle = 0x80041314 SCHED_E_SERVICE_NOT_RUNNING Handle = 0x80041315 SCHED_E_UNEXPECTEDNODE Handle = 0x80041316 SCHED_E_NAMESPACE Handle = 0x80041317 SCHED_E_INVALIDVALUE Handle = 0x80041318 SCHED_E_MISSINGNODE Handle = 0x80041319 SCHED_E_MALFORMEDXML Handle = 0x8004131A SCHED_S_SOME_TRIGGERS_FAILED Handle = 0x0004131B SCHED_S_BATCH_LOGON_PROBLEM Handle = 0x0004131C SCHED_E_TOO_MANY_NODES Handle = 0x8004131D SCHED_E_PAST_END_BOUNDARY Handle = 0x8004131E SCHED_E_ALREADY_RUNNING Handle = 0x8004131F SCHED_E_USER_NOT_LOGGED_ON Handle = 0x80041320 SCHED_E_INVALID_TASK_HASH Handle = 0x80041321 SCHED_E_SERVICE_NOT_AVAILABLE Handle = 0x80041322 SCHED_E_SERVICE_TOO_BUSY Handle = 0x80041323 SCHED_E_TASK_ATTEMPTED Handle = 0x80041324 SCHED_S_TASK_QUEUED Handle = 0x00041325 SCHED_E_TASK_DISABLED Handle = 0x80041326 SCHED_E_TASK_NOT_V1_COMPAT Handle = 0x80041327 SCHED_E_START_ON_DEMAND Handle = 0x80041328 SCHED_E_TASK_NOT_UBPM_COMPAT Handle = 0x80041329 SCHED_E_DEPRECATED_FEATURE_USED Handle = 0x80041330 CO_E_CLASS_CREATE_FAILED Handle = 0x80080001 CO_E_SCM_ERROR Handle = 0x80080002 CO_E_SCM_RPC_FAILURE Handle = 0x80080003 CO_E_BAD_PATH Handle = 0x80080004 CO_E_SERVER_EXEC_FAILURE Handle = 0x80080005 CO_E_OBJSRV_RPC_FAILURE Handle = 0x80080006 MK_E_NO_NORMALIZED Handle = 0x80080007 CO_E_SERVER_STOPPING Handle = 0x80080008 MEM_E_INVALID_ROOT Handle = 0x80080009 MEM_E_INVALID_LINK Handle = 0x80080010 MEM_E_INVALID_SIZE Handle = 0x80080011 CO_S_NOTALLINTERFACES Handle = 0x00080012 CO_S_MACHINENAMENOTFOUND Handle = 0x00080013 CO_E_MISSING_DISPLAYNAME Handle = 0x80080015 CO_E_RUNAS_VALUE_MUST_BE_AAA Handle = 0x80080016 CO_E_ELEVATION_DISABLED Handle = 0x80080017 APPX_E_PACKAGING_INTERNAL Handle = 0x80080200 APPX_E_INTERLEAVING_NOT_ALLOWED Handle = 0x80080201 APPX_E_RELATIONSHIPS_NOT_ALLOWED Handle = 0x80080202 APPX_E_MISSING_REQUIRED_FILE Handle = 0x80080203 APPX_E_INVALID_MANIFEST Handle = 0x80080204 APPX_E_INVALID_BLOCKMAP Handle = 0x80080205 APPX_E_CORRUPT_CONTENT Handle = 0x80080206 APPX_E_BLOCK_HASH_INVALID Handle = 0x80080207 APPX_E_REQUESTED_RANGE_TOO_LARGE Handle = 0x80080208 APPX_E_INVALID_SIP_CLIENT_DATA Handle = 0x80080209 APPX_E_INVALID_KEY_INFO Handle = 0x8008020A APPX_E_INVALID_CONTENTGROUPMAP Handle = 0x8008020B APPX_E_INVALID_APPINSTALLER Handle = 0x8008020C APPX_E_DELTA_BASELINE_VERSION_MISMATCH Handle = 0x8008020D APPX_E_DELTA_PACKAGE_MISSING_FILE Handle = 0x8008020E APPX_E_INVALID_DELTA_PACKAGE Handle = 0x8008020F APPX_E_DELTA_APPENDED_PACKAGE_NOT_ALLOWED Handle = 0x80080210 APPX_E_INVALID_PACKAGING_LAYOUT Handle = 0x80080211 APPX_E_INVALID_PACKAGESIGNCONFIG Handle = 0x80080212 APPX_E_RESOURCESPRI_NOT_ALLOWED Handle = 0x80080213 APPX_E_FILE_COMPRESSION_MISMATCH Handle = 0x80080214 APPX_E_INVALID_PAYLOAD_PACKAGE_EXTENSION Handle = 0x80080215 APPX_E_INVALID_ENCRYPTION_EXCLUSION_FILE_LIST Handle = 0x80080216 BT_E_SPURIOUS_ACTIVATION Handle = 0x80080300 DISP_E_UNKNOWNINTERFACE Handle = 0x80020001 DISP_E_MEMBERNOTFOUND Handle = 0x80020003 DISP_E_PARAMNOTFOUND Handle = 0x80020004 DISP_E_TYPEMISMATCH Handle = 0x80020005 DISP_E_UNKNOWNNAME Handle = 0x80020006 DISP_E_NONAMEDARGS Handle = 0x80020007 DISP_E_BADVARTYPE Handle = 0x80020008 DISP_E_EXCEPTION Handle = 0x80020009 DISP_E_OVERFLOW Handle = 0x8002000A DISP_E_BADINDEX Handle = 0x8002000B DISP_E_UNKNOWNLCID Handle = 0x8002000C DISP_E_ARRAYISLOCKED Handle = 0x8002000D DISP_E_BADPARAMCOUNT Handle = 0x8002000E DISP_E_PARAMNOTOPTIONAL Handle = 0x8002000F DISP_E_BADCALLEE Handle = 0x80020010 DISP_E_NOTACOLLECTION Handle = 0x80020011 DISP_E_DIVBYZERO Handle = 0x80020012 DISP_E_BUFFERTOOSMALL Handle = 0x80020013 TYPE_E_BUFFERTOOSMALL Handle = 0x80028016 TYPE_E_FIELDNOTFOUND Handle = 0x80028017 TYPE_E_INVDATAREAD Handle = 0x80028018 TYPE_E_UNSUPFORMAT Handle = 0x80028019 TYPE_E_REGISTRYACCESS Handle = 0x8002801C TYPE_E_LIBNOTREGISTERED Handle = 0x8002801D TYPE_E_UNDEFINEDTYPE Handle = 0x80028027 TYPE_E_QUALIFIEDNAMEDISALLOWED Handle = 0x80028028 TYPE_E_INVALIDSTATE Handle = 0x80028029 TYPE_E_WRONGTYPEKIND Handle = 0x8002802A TYPE_E_ELEMENTNOTFOUND Handle = 0x8002802B TYPE_E_AMBIGUOUSNAME Handle = 0x8002802C TYPE_E_NAMECONFLICT Handle = 0x8002802D TYPE_E_UNKNOWNLCID Handle = 0x8002802E TYPE_E_DLLFUNCTIONNOTFOUND Handle = 0x8002802F TYPE_E_BADMODULEKIND Handle = 0x800288BD TYPE_E_SIZETOOBIG Handle = 0x800288C5 TYPE_E_DUPLICATEID Handle = 0x800288C6 TYPE_E_INVALIDID Handle = 0x800288CF TYPE_E_TYPEMISMATCH Handle = 0x80028CA0 TYPE_E_OUTOFBOUNDS Handle = 0x80028CA1 TYPE_E_IOERROR Handle = 0x80028CA2 TYPE_E_CANTCREATETMPFILE Handle = 0x80028CA3 TYPE_E_CANTLOADLIBRARY Handle = 0x80029C4A TYPE_E_INCONSISTENTPROPFUNCS Handle = 0x80029C83 TYPE_E_CIRCULARTYPE Handle = 0x80029C84 STG_E_INVALIDFUNCTION Handle = 0x80030001 STG_E_FILENOTFOUND Handle = 0x80030002 STG_E_PATHNOTFOUND Handle = 0x80030003 STG_E_TOOMANYOPENFILES Handle = 0x80030004 STG_E_ACCESSDENIED Handle = 0x80030005 STG_E_INVALIDHANDLE Handle = 0x80030006 STG_E_INSUFFICIENTMEMORY Handle = 0x80030008 STG_E_INVALIDPOINTER Handle = 0x80030009 STG_E_NOMOREFILES Handle = 0x80030012 STG_E_DISKISWRITEPROTECTED Handle = 0x80030013 STG_E_SEEKERROR Handle = 0x80030019 STG_E_WRITEFAULT Handle = 0x8003001D STG_E_READFAULT Handle = 0x8003001E STG_E_SHAREVIOLATION Handle = 0x80030020 STG_E_LOCKVIOLATION Handle = 0x80030021 STG_E_FILEALREADYEXISTS Handle = 0x80030050 STG_E_INVALIDPARAMETER Handle = 0x80030057 STG_E_MEDIUMFULL Handle = 0x80030070 STG_E_PROPSETMISMATCHED Handle = 0x800300F0 STG_E_ABNORMALAPIEXIT Handle = 0x800300FA STG_E_INVALIDHEADER Handle = 0x800300FB STG_E_INVALIDNAME Handle = 0x800300FC STG_E_UNKNOWN Handle = 0x800300FD STG_E_UNIMPLEMENTEDFUNCTION Handle = 0x800300FE STG_E_INVALIDFLAG Handle = 0x800300FF STG_E_INUSE Handle = 0x80030100 STG_E_NOTCURRENT Handle = 0x80030101 STG_E_REVERTED Handle = 0x80030102 STG_E_CANTSAVE Handle = 0x80030103 STG_E_OLDFORMAT Handle = 0x80030104 STG_E_OLDDLL Handle = 0x80030105 STG_E_SHAREREQUIRED Handle = 0x80030106 STG_E_NOTFILEBASEDSTORAGE Handle = 0x80030107 STG_E_EXTANTMARSHALLINGS Handle = 0x80030108 STG_E_DOCFILECORRUPT Handle = 0x80030109 STG_E_BADBASEADDRESS Handle = 0x80030110 STG_E_DOCFILETOOLARGE Handle = 0x80030111 STG_E_NOTSIMPLEFORMAT Handle = 0x80030112 STG_E_INCOMPLETE Handle = 0x80030201 STG_E_TERMINATED Handle = 0x80030202 STG_S_CONVERTED Handle = 0x00030200 STG_S_BLOCK Handle = 0x00030201 STG_S_RETRYNOW Handle = 0x00030202 STG_S_MONITORING Handle = 0x00030203 STG_S_MULTIPLEOPENS Handle = 0x00030204 STG_S_CONSOLIDATIONFAILED Handle = 0x00030205 STG_S_CANNOTCONSOLIDATE Handle = 0x00030206 STG_S_POWER_CYCLE_REQUIRED Handle = 0x00030207 STG_E_FIRMWARE_SLOT_INVALID Handle = 0x80030208 STG_E_FIRMWARE_IMAGE_INVALID Handle = 0x80030209 STG_E_DEVICE_UNRESPONSIVE Handle = 0x8003020A STG_E_STATUS_COPY_PROTECTION_FAILURE Handle = 0x80030305 STG_E_CSS_AUTHENTICATION_FAILURE Handle = 0x80030306 STG_E_CSS_KEY_NOT_PRESENT Handle = 0x80030307 STG_E_CSS_KEY_NOT_ESTABLISHED Handle = 0x80030308 STG_E_CSS_SCRAMBLED_SECTOR Handle = 0x80030309 STG_E_CSS_REGION_MISMATCH Handle = 0x8003030A STG_E_RESETS_EXHAUSTED Handle = 0x8003030B RPC_E_CALL_REJECTED Handle = 0x80010001 RPC_E_CALL_CANCELED Handle = 0x80010002 RPC_E_CANTPOST_INSENDCALL Handle = 0x80010003 RPC_E_CANTCALLOUT_INASYNCCALL Handle = 0x80010004 RPC_E_CANTCALLOUT_INEXTERNALCALL Handle = 0x80010005 RPC_E_CONNECTION_TERMINATED Handle = 0x80010006 RPC_E_SERVER_DIED Handle = 0x80010007 RPC_E_CLIENT_DIED Handle = 0x80010008 RPC_E_INVALID_DATAPACKET Handle = 0x80010009 RPC_E_CANTTRANSMIT_CALL Handle = 0x8001000A RPC_E_CLIENT_CANTMARSHAL_DATA Handle = 0x8001000B RPC_E_CLIENT_CANTUNMARSHAL_DATA Handle = 0x8001000C RPC_E_SERVER_CANTMARSHAL_DATA Handle = 0x8001000D RPC_E_SERVER_CANTUNMARSHAL_DATA Handle = 0x8001000E RPC_E_INVALID_DATA Handle = 0x8001000F RPC_E_INVALID_PARAMETER Handle = 0x80010010 RPC_E_CANTCALLOUT_AGAIN Handle = 0x80010011 RPC_E_SERVER_DIED_DNE Handle = 0x80010012 RPC_E_SYS_CALL_FAILED Handle = 0x80010100 RPC_E_OUT_OF_RESOURCES Handle = 0x80010101 RPC_E_ATTEMPTED_MULTITHREAD Handle = 0x80010102 RPC_E_NOT_REGISTERED Handle = 0x80010103 RPC_E_FAULT Handle = 0x80010104 RPC_E_SERVERFAULT Handle = 0x80010105 RPC_E_CHANGED_MODE Handle = 0x80010106 RPC_E_INVALIDMETHOD Handle = 0x80010107 RPC_E_DISCONNECTED Handle = 0x80010108 RPC_E_RETRY Handle = 0x80010109 RPC_E_SERVERCALL_RETRYLATER Handle = 0x8001010A RPC_E_SERVERCALL_REJECTED Handle = 0x8001010B RPC_E_INVALID_CALLDATA Handle = 0x8001010C RPC_E_CANTCALLOUT_ININPUTSYNCCALL Handle = 0x8001010D RPC_E_WRONG_THREAD Handle = 0x8001010E RPC_E_THREAD_NOT_INIT Handle = 0x8001010F RPC_E_VERSION_MISMATCH Handle = 0x80010110 RPC_E_INVALID_HEADER Handle = 0x80010111 RPC_E_INVALID_EXTENSION Handle = 0x80010112 RPC_E_INVALID_IPID Handle = 0x80010113 RPC_E_INVALID_OBJECT Handle = 0x80010114 RPC_S_CALLPENDING Handle = 0x80010115 RPC_S_WAITONTIMER Handle = 0x80010116 RPC_E_CALL_COMPLETE Handle = 0x80010117 RPC_E_UNSECURE_CALL Handle = 0x80010118 RPC_E_TOO_LATE Handle = 0x80010119 RPC_E_NO_GOOD_SECURITY_PACKAGES Handle = 0x8001011A RPC_E_ACCESS_DENIED Handle = 0x8001011B RPC_E_REMOTE_DISABLED Handle = 0x8001011C RPC_E_INVALID_OBJREF Handle = 0x8001011D RPC_E_NO_CONTEXT Handle = 0x8001011E RPC_E_TIMEOUT Handle = 0x8001011F RPC_E_NO_SYNC Handle = 0x80010120 RPC_E_FULLSIC_REQUIRED Handle = 0x80010121 RPC_E_INVALID_STD_NAME Handle = 0x80010122 CO_E_FAILEDTOIMPERSONATE Handle = 0x80010123 CO_E_FAILEDTOGETSECCTX Handle = 0x80010124 CO_E_FAILEDTOOPENTHREADTOKEN Handle = 0x80010125 CO_E_FAILEDTOGETTOKENINFO Handle = 0x80010126 CO_E_TRUSTEEDOESNTMATCHCLIENT Handle = 0x80010127 CO_E_FAILEDTOQUERYCLIENTBLANKET Handle = 0x80010128 CO_E_FAILEDTOSETDACL Handle = 0x80010129 CO_E_ACCESSCHECKFAILED Handle = 0x8001012A CO_E_NETACCESSAPIFAILED Handle = 0x8001012B CO_E_WRONGTRUSTEENAMESYNTAX Handle = 0x8001012C CO_E_INVALIDSID Handle = 0x8001012D CO_E_CONVERSIONFAILED Handle = 0x8001012E CO_E_NOMATCHINGSIDFOUND Handle = 0x8001012F CO_E_LOOKUPACCSIDFAILED Handle = 0x80010130 CO_E_NOMATCHINGNAMEFOUND Handle = 0x80010131 CO_E_LOOKUPACCNAMEFAILED Handle = 0x80010132 CO_E_SETSERLHNDLFAILED Handle = 0x80010133 CO_E_FAILEDTOGETWINDIR Handle = 0x80010134 CO_E_PATHTOOLONG Handle = 0x80010135 CO_E_FAILEDTOGENUUID Handle = 0x80010136 CO_E_FAILEDTOCREATEFILE Handle = 0x80010137 CO_E_FAILEDTOCLOSEHANDLE Handle = 0x80010138 CO_E_EXCEEDSYSACLLIMIT Handle = 0x80010139 CO_E_ACESINWRONGORDER Handle = 0x8001013A CO_E_INCOMPATIBLESTREAMVERSION Handle = 0x8001013B CO_E_FAILEDTOOPENPROCESSTOKEN Handle = 0x8001013C CO_E_DECODEFAILED Handle = 0x8001013D CO_E_ACNOTINITIALIZED Handle = 0x8001013F CO_E_CANCEL_DISABLED Handle = 0x80010140 RPC_E_UNEXPECTED Handle = 0x8001FFFF ERROR_AUDITING_DISABLED Handle = 0xC0090001 ERROR_ALL_SIDS_FILTERED Handle = 0xC0090002 ERROR_BIZRULES_NOT_ENABLED Handle = 0xC0090003 NTE_BAD_UID Handle = 0x80090001 NTE_BAD_HASH Handle = 0x80090002 NTE_BAD_KEY Handle = 0x80090003 NTE_BAD_LEN Handle = 0x80090004 NTE_BAD_DATA Handle = 0x80090005 NTE_BAD_SIGNATURE Handle = 0x80090006 NTE_BAD_VER Handle = 0x80090007 NTE_BAD_ALGID Handle = 0x80090008 NTE_BAD_FLAGS Handle = 0x80090009 NTE_BAD_TYPE Handle = 0x8009000A NTE_BAD_KEY_STATE Handle = 0x8009000B NTE_BAD_HASH_STATE Handle = 0x8009000C NTE_NO_KEY Handle = 0x8009000D NTE_NO_MEMORY Handle = 0x8009000E NTE_EXISTS Handle = 0x8009000F NTE_PERM Handle = 0x80090010 NTE_NOT_FOUND Handle = 0x80090011 NTE_DOUBLE_ENCRYPT Handle = 0x80090012 NTE_BAD_PROVIDER Handle = 0x80090013 NTE_BAD_PROV_TYPE Handle = 0x80090014 NTE_BAD_PUBLIC_KEY Handle = 0x80090015 NTE_BAD_KEYSET Handle = 0x80090016 NTE_PROV_TYPE_NOT_DEF Handle = 0x80090017 NTE_PROV_TYPE_ENTRY_BAD Handle = 0x80090018 NTE_KEYSET_NOT_DEF Handle = 0x80090019 NTE_KEYSET_ENTRY_BAD Handle = 0x8009001A NTE_PROV_TYPE_NO_MATCH Handle = 0x8009001B NTE_SIGNATURE_FILE_BAD Handle = 0x8009001C NTE_PROVIDER_DLL_FAIL Handle = 0x8009001D NTE_PROV_DLL_NOT_FOUND Handle = 0x8009001E NTE_BAD_KEYSET_PARAM Handle = 0x8009001F NTE_FAIL Handle = 0x80090020 NTE_SYS_ERR Handle = 0x80090021 NTE_SILENT_CONTEXT Handle = 0x80090022 NTE_TOKEN_KEYSET_STORAGE_FULL Handle = 0x80090023 NTE_TEMPORARY_PROFILE Handle = 0x80090024 NTE_FIXEDPARAMETER Handle = 0x80090025 NTE_INVALID_HANDLE Handle = 0x80090026 NTE_INVALID_PARAMETER Handle = 0x80090027 NTE_BUFFER_TOO_SMALL Handle = 0x80090028 NTE_NOT_SUPPORTED Handle = 0x80090029 NTE_NO_MORE_ITEMS Handle = 0x8009002A NTE_BUFFERS_OVERLAP Handle = 0x8009002B NTE_DECRYPTION_FAILURE Handle = 0x8009002C NTE_INTERNAL_ERROR Handle = 0x8009002D NTE_UI_REQUIRED Handle = 0x8009002E NTE_HMAC_NOT_SUPPORTED Handle = 0x8009002F NTE_DEVICE_NOT_READY Handle = 0x80090030 NTE_AUTHENTICATION_IGNORED Handle = 0x80090031 NTE_VALIDATION_FAILED Handle = 0x80090032 NTE_INCORRECT_PASSWORD Handle = 0x80090033 NTE_ENCRYPTION_FAILURE Handle = 0x80090034 NTE_DEVICE_NOT_FOUND Handle = 0x80090035 NTE_USER_CANCELLED Handle = 0x80090036 NTE_PASSWORD_CHANGE_REQUIRED Handle = 0x80090037 NTE_NOT_ACTIVE_CONSOLE Handle = 0x80090038 SEC_E_INSUFFICIENT_MEMORY Handle = 0x80090300 SEC_E_INVALID_HANDLE Handle = 0x80090301 SEC_E_UNSUPPORTED_FUNCTION Handle = 0x80090302 SEC_E_TARGET_UNKNOWN Handle = 0x80090303 SEC_E_INTERNAL_ERROR Handle = 0x80090304 SEC_E_SECPKG_NOT_FOUND Handle = 0x80090305 SEC_E_NOT_OWNER Handle = 0x80090306 SEC_E_CANNOT_INSTALL Handle = 0x80090307 SEC_E_INVALID_TOKEN Handle = 0x80090308 SEC_E_CANNOT_PACK Handle = 0x80090309 SEC_E_QOP_NOT_SUPPORTED Handle = 0x8009030A SEC_E_NO_IMPERSONATION Handle = 0x8009030B SEC_E_LOGON_DENIED Handle = 0x8009030C SEC_E_UNKNOWN_CREDENTIALS Handle = 0x8009030D SEC_E_NO_CREDENTIALS Handle = 0x8009030E SEC_E_MESSAGE_ALTERED Handle = 0x8009030F SEC_E_OUT_OF_SEQUENCE Handle = 0x80090310 SEC_E_NO_AUTHENTICATING_AUTHORITY Handle = 0x80090311 SEC_I_CONTINUE_NEEDED Handle = 0x00090312 SEC_I_COMPLETE_NEEDED Handle = 0x00090313 SEC_I_COMPLETE_AND_CONTINUE Handle = 0x00090314 SEC_I_LOCAL_LOGON Handle = 0x00090315 SEC_I_GENERIC_EXTENSION_RECEIVED Handle = 0x00090316 SEC_E_BAD_PKGID Handle = 0x80090316 SEC_E_CONTEXT_EXPIRED Handle = 0x80090317 SEC_I_CONTEXT_EXPIRED Handle = 0x00090317 SEC_E_INCOMPLETE_MESSAGE Handle = 0x80090318 SEC_E_INCOMPLETE_CREDENTIALS Handle = 0x80090320 SEC_E_BUFFER_TOO_SMALL Handle = 0x80090321 SEC_I_INCOMPLETE_CREDENTIALS Handle = 0x00090320 SEC_I_RENEGOTIATE Handle = 0x00090321 SEC_E_WRONG_PRINCIPAL Handle = 0x80090322 SEC_I_NO_LSA_CONTEXT Handle = 0x00090323 SEC_E_TIME_SKEW Handle = 0x80090324 SEC_E_UNTRUSTED_ROOT Handle = 0x80090325 SEC_E_ILLEGAL_MESSAGE Handle = 0x80090326 SEC_E_CERT_UNKNOWN Handle = 0x80090327 SEC_E_CERT_EXPIRED Handle = 0x80090328 SEC_E_ENCRYPT_FAILURE Handle = 0x80090329 SEC_E_DECRYPT_FAILURE Handle = 0x80090330 SEC_E_ALGORITHM_MISMATCH Handle = 0x80090331 SEC_E_SECURITY_QOS_FAILED Handle = 0x80090332 SEC_E_UNFINISHED_CONTEXT_DELETED Handle = 0x80090333 SEC_E_NO_TGT_REPLY Handle = 0x80090334 SEC_E_NO_IP_ADDRESSES Handle = 0x80090335 SEC_E_WRONG_CREDENTIAL_HANDLE Handle = 0x80090336 SEC_E_CRYPTO_SYSTEM_INVALID Handle = 0x80090337 SEC_E_MAX_REFERRALS_EXCEEDED Handle = 0x80090338 SEC_E_MUST_BE_KDC Handle = 0x80090339 SEC_E_STRONG_CRYPTO_NOT_SUPPORTED Handle = 0x8009033A SEC_E_TOO_MANY_PRINCIPALS Handle = 0x8009033B SEC_E_NO_PA_DATA Handle = 0x8009033C SEC_E_PKINIT_NAME_MISMATCH Handle = 0x8009033D SEC_E_SMARTCARD_LOGON_REQUIRED Handle = 0x8009033E SEC_E_SHUTDOWN_IN_PROGRESS Handle = 0x8009033F SEC_E_KDC_INVALID_REQUEST Handle = 0x80090340 SEC_E_KDC_UNABLE_TO_REFER Handle = 0x80090341 SEC_E_KDC_UNKNOWN_ETYPE Handle = 0x80090342 SEC_E_UNSUPPORTED_PREAUTH Handle = 0x80090343 SEC_E_DELEGATION_REQUIRED Handle = 0x80090345 SEC_E_BAD_BINDINGS Handle = 0x80090346 SEC_E_MULTIPLE_ACCOUNTS Handle = 0x80090347 SEC_E_NO_KERB_KEY Handle = 0x80090348 SEC_E_CERT_WRONG_USAGE Handle = 0x80090349 SEC_E_DOWNGRADE_DETECTED Handle = 0x80090350 SEC_E_SMARTCARD_CERT_REVOKED Handle = 0x80090351 SEC_E_ISSUING_CA_UNTRUSTED Handle = 0x80090352 SEC_E_REVOCATION_OFFLINE_C Handle = 0x80090353 SEC_E_PKINIT_CLIENT_FAILURE Handle = 0x80090354 SEC_E_SMARTCARD_CERT_EXPIRED Handle = 0x80090355 SEC_E_NO_S4U_PROT_SUPPORT Handle = 0x80090356 SEC_E_CROSSREALM_DELEGATION_FAILURE Handle = 0x80090357 SEC_E_REVOCATION_OFFLINE_KDC Handle = 0x80090358 SEC_E_ISSUING_CA_UNTRUSTED_KDC Handle = 0x80090359 SEC_E_KDC_CERT_EXPIRED Handle = 0x8009035A SEC_E_KDC_CERT_REVOKED Handle = 0x8009035B SEC_I_SIGNATURE_NEEDED Handle = 0x0009035C SEC_E_INVALID_PARAMETER Handle = 0x8009035D SEC_E_DELEGATION_POLICY Handle = 0x8009035E SEC_E_POLICY_NLTM_ONLY Handle = 0x8009035F SEC_I_NO_RENEGOTIATION Handle = 0x00090360 SEC_E_NO_CONTEXT Handle = 0x80090361 SEC_E_PKU2U_CERT_FAILURE Handle = 0x80090362 SEC_E_MUTUAL_AUTH_FAILED Handle = 0x80090363 SEC_I_MESSAGE_FRAGMENT Handle = 0x00090364 SEC_E_ONLY_HTTPS_ALLOWED Handle = 0x80090365 SEC_I_CONTINUE_NEEDED_MESSAGE_OK Handle = 0x00090366 SEC_E_APPLICATION_PROTOCOL_MISMATCH Handle = 0x80090367 SEC_I_ASYNC_CALL_PENDING Handle = 0x00090368 SEC_E_INVALID_UPN_NAME Handle = 0x80090369 SEC_E_EXT_BUFFER_TOO_SMALL Handle = 0x8009036A SEC_E_INSUFFICIENT_BUFFERS Handle = 0x8009036B SEC_E_NO_SPM = SEC_E_INTERNAL_ERROR SEC_E_NOT_SUPPORTED = SEC_E_UNSUPPORTED_FUNCTION CRYPT_E_MSG_ERROR Handle = 0x80091001 CRYPT_E_UNKNOWN_ALGO Handle = 0x80091002 CRYPT_E_OID_FORMAT Handle = 0x80091003 CRYPT_E_INVALID_MSG_TYPE Handle = 0x80091004 CRYPT_E_UNEXPECTED_ENCODING Handle = 0x80091005 CRYPT_E_AUTH_ATTR_MISSING Handle = 0x80091006 CRYPT_E_HASH_VALUE Handle = 0x80091007 CRYPT_E_INVALID_INDEX Handle = 0x80091008 CRYPT_E_ALREADY_DECRYPTED Handle = 0x80091009 CRYPT_E_NOT_DECRYPTED Handle = 0x8009100A CRYPT_E_RECIPIENT_NOT_FOUND Handle = 0x8009100B CRYPT_E_CONTROL_TYPE Handle = 0x8009100C CRYPT_E_ISSUER_SERIALNUMBER Handle = 0x8009100D CRYPT_E_SIGNER_NOT_FOUND Handle = 0x8009100E CRYPT_E_ATTRIBUTES_MISSING Handle = 0x8009100F CRYPT_E_STREAM_MSG_NOT_READY Handle = 0x80091010 CRYPT_E_STREAM_INSUFFICIENT_DATA Handle = 0x80091011 CRYPT_I_NEW_PROTECTION_REQUIRED Handle = 0x00091012 CRYPT_E_BAD_LEN Handle = 0x80092001 CRYPT_E_BAD_ENCODE Handle = 0x80092002 CRYPT_E_FILE_ERROR Handle = 0x80092003 CRYPT_E_NOT_FOUND Handle = 0x80092004 CRYPT_E_EXISTS Handle = 0x80092005 CRYPT_E_NO_PROVIDER Handle = 0x80092006 CRYPT_E_SELF_SIGNED Handle = 0x80092007 CRYPT_E_DELETED_PREV Handle = 0x80092008 CRYPT_E_NO_MATCH Handle = 0x80092009 CRYPT_E_UNEXPECTED_MSG_TYPE Handle = 0x8009200A CRYPT_E_NO_KEY_PROPERTY Handle = 0x8009200B CRYPT_E_NO_DECRYPT_CERT Handle = 0x8009200C CRYPT_E_BAD_MSG Handle = 0x8009200D CRYPT_E_NO_SIGNER Handle = 0x8009200E CRYPT_E_PENDING_CLOSE Handle = 0x8009200F CRYPT_E_REVOKED Handle = 0x80092010 CRYPT_E_NO_REVOCATION_DLL Handle = 0x80092011 CRYPT_E_NO_REVOCATION_CHECK Handle = 0x80092012 CRYPT_E_REVOCATION_OFFLINE Handle = 0x80092013 CRYPT_E_NOT_IN_REVOCATION_DATABASE Handle = 0x80092014 CRYPT_E_INVALID_NUMERIC_STRING Handle = 0x80092020 CRYPT_E_INVALID_PRINTABLE_STRING Handle = 0x80092021 CRYPT_E_INVALID_IA5_STRING Handle = 0x80092022 CRYPT_E_INVALID_X500_STRING Handle = 0x80092023 CRYPT_E_NOT_CHAR_STRING Handle = 0x80092024 CRYPT_E_FILERESIZED Handle = 0x80092025 CRYPT_E_SECURITY_SETTINGS Handle = 0x80092026 CRYPT_E_NO_VERIFY_USAGE_DLL Handle = 0x80092027 CRYPT_E_NO_VERIFY_USAGE_CHECK Handle = 0x80092028 CRYPT_E_VERIFY_USAGE_OFFLINE Handle = 0x80092029 CRYPT_E_NOT_IN_CTL Handle = 0x8009202A CRYPT_E_NO_TRUSTED_SIGNER Handle = 0x8009202B CRYPT_E_MISSING_PUBKEY_PARA Handle = 0x8009202C CRYPT_E_OBJECT_LOCATOR_OBJECT_NOT_FOUND Handle = 0x8009202D CRYPT_E_OSS_ERROR Handle = 0x80093000 OSS_MORE_BUF Handle = 0x80093001 OSS_NEGATIVE_UINTEGER Handle = 0x80093002 OSS_PDU_RANGE Handle = 0x80093003 OSS_MORE_INPUT Handle = 0x80093004 OSS_DATA_ERROR Handle = 0x80093005 OSS_BAD_ARG Handle = 0x80093006 OSS_BAD_VERSION Handle = 0x80093007 OSS_OUT_MEMORY Handle = 0x80093008 OSS_PDU_MISMATCH Handle = 0x80093009 OSS_LIMITED Handle = 0x8009300A OSS_BAD_PTR Handle = 0x8009300B OSS_BAD_TIME Handle = 0x8009300C OSS_INDEFINITE_NOT_SUPPORTED Handle = 0x8009300D OSS_MEM_ERROR Handle = 0x8009300E OSS_BAD_TABLE Handle = 0x8009300F OSS_TOO_LONG Handle = 0x80093010 OSS_CONSTRAINT_VIOLATED Handle = 0x80093011 OSS_FATAL_ERROR Handle = 0x80093012 OSS_ACCESS_SERIALIZATION_ERROR Handle = 0x80093013 OSS_NULL_TBL Handle = 0x80093014 OSS_NULL_FCN Handle = 0x80093015 OSS_BAD_ENCRULES Handle = 0x80093016 OSS_UNAVAIL_ENCRULES Handle = 0x80093017 OSS_CANT_OPEN_TRACE_WINDOW Handle = 0x80093018 OSS_UNIMPLEMENTED Handle = 0x80093019 OSS_OID_DLL_NOT_LINKED Handle = 0x8009301A OSS_CANT_OPEN_TRACE_FILE Handle = 0x8009301B OSS_TRACE_FILE_ALREADY_OPEN Handle = 0x8009301C OSS_TABLE_MISMATCH Handle = 0x8009301D OSS_TYPE_NOT_SUPPORTED Handle = 0x8009301E OSS_REAL_DLL_NOT_LINKED Handle = 0x8009301F OSS_REAL_CODE_NOT_LINKED Handle = 0x80093020 OSS_OUT_OF_RANGE Handle = 0x80093021 OSS_COPIER_DLL_NOT_LINKED Handle = 0x80093022 OSS_CONSTRAINT_DLL_NOT_LINKED Handle = 0x80093023 OSS_COMPARATOR_DLL_NOT_LINKED Handle = 0x80093024 OSS_COMPARATOR_CODE_NOT_LINKED Handle = 0x80093025 OSS_MEM_MGR_DLL_NOT_LINKED Handle = 0x80093026 OSS_PDV_DLL_NOT_LINKED Handle = 0x80093027 OSS_PDV_CODE_NOT_LINKED Handle = 0x80093028 OSS_API_DLL_NOT_LINKED Handle = 0x80093029 OSS_BERDER_DLL_NOT_LINKED Handle = 0x8009302A OSS_PER_DLL_NOT_LINKED Handle = 0x8009302B OSS_OPEN_TYPE_ERROR Handle = 0x8009302C OSS_MUTEX_NOT_CREATED Handle = 0x8009302D OSS_CANT_CLOSE_TRACE_FILE Handle = 0x8009302E CRYPT_E_ASN1_ERROR Handle = 0x80093100 CRYPT_E_ASN1_INTERNAL Handle = 0x80093101 CRYPT_E_ASN1_EOD Handle = 0x80093102 CRYPT_E_ASN1_CORRUPT Handle = 0x80093103 CRYPT_E_ASN1_LARGE Handle = 0x80093104 CRYPT_E_ASN1_CONSTRAINT Handle = 0x80093105 CRYPT_E_ASN1_MEMORY Handle = 0x80093106 CRYPT_E_ASN1_OVERFLOW Handle = 0x80093107 CRYPT_E_ASN1_BADPDU Handle = 0x80093108 CRYPT_E_ASN1_BADARGS Handle = 0x80093109 CRYPT_E_ASN1_BADREAL Handle = 0x8009310A CRYPT_E_ASN1_BADTAG Handle = 0x8009310B CRYPT_E_ASN1_CHOICE Handle = 0x8009310C CRYPT_E_ASN1_RULE Handle = 0x8009310D CRYPT_E_ASN1_UTF8 Handle = 0x8009310E CRYPT_E_ASN1_PDU_TYPE Handle = 0x80093133 CRYPT_E_ASN1_NYI Handle = 0x80093134 CRYPT_E_ASN1_EXTENDED Handle = 0x80093201 CRYPT_E_ASN1_NOEOD Handle = 0x80093202 CERTSRV_E_BAD_REQUESTSUBJECT Handle = 0x80094001 CERTSRV_E_NO_REQUEST Handle = 0x80094002 CERTSRV_E_BAD_REQUESTSTATUS Handle = 0x80094003 CERTSRV_E_PROPERTY_EMPTY Handle = 0x80094004 CERTSRV_E_INVALID_CA_CERTIFICATE Handle = 0x80094005 CERTSRV_E_SERVER_SUSPENDED Handle = 0x80094006 CERTSRV_E_ENCODING_LENGTH Handle = 0x80094007 CERTSRV_E_ROLECONFLICT Handle = 0x80094008 CERTSRV_E_RESTRICTEDOFFICER Handle = 0x80094009 CERTSRV_E_KEY_ARCHIVAL_NOT_CONFIGURED Handle = 0x8009400A CERTSRV_E_NO_VALID_KRA Handle = 0x8009400B CERTSRV_E_BAD_REQUEST_KEY_ARCHIVAL Handle = 0x8009400C CERTSRV_E_NO_CAADMIN_DEFINED Handle = 0x8009400D CERTSRV_E_BAD_RENEWAL_CERT_ATTRIBUTE Handle = 0x8009400E CERTSRV_E_NO_DB_SESSIONS Handle = 0x8009400F CERTSRV_E_ALIGNMENT_FAULT Handle = 0x80094010 CERTSRV_E_ENROLL_DENIED Handle = 0x80094011 CERTSRV_E_TEMPLATE_DENIED Handle = 0x80094012 CERTSRV_E_DOWNLEVEL_DC_SSL_OR_UPGRADE Handle = 0x80094013 CERTSRV_E_ADMIN_DENIED_REQUEST Handle = 0x80094014 CERTSRV_E_NO_POLICY_SERVER Handle = 0x80094015 CERTSRV_E_WEAK_SIGNATURE_OR_KEY Handle = 0x80094016 CERTSRV_E_KEY_ATTESTATION_NOT_SUPPORTED Handle = 0x80094017 CERTSRV_E_ENCRYPTION_CERT_REQUIRED Handle = 0x80094018 CERTSRV_E_UNSUPPORTED_CERT_TYPE Handle = 0x80094800 CERTSRV_E_NO_CERT_TYPE Handle = 0x80094801 CERTSRV_E_TEMPLATE_CONFLICT Handle = 0x80094802 CERTSRV_E_SUBJECT_ALT_NAME_REQUIRED Handle = 0x80094803 CERTSRV_E_ARCHIVED_KEY_REQUIRED Handle = 0x80094804 CERTSRV_E_SMIME_REQUIRED Handle = 0x80094805 CERTSRV_E_BAD_RENEWAL_SUBJECT Handle = 0x80094806 CERTSRV_E_BAD_TEMPLATE_VERSION Handle = 0x80094807 CERTSRV_E_TEMPLATE_POLICY_REQUIRED Handle = 0x80094808 CERTSRV_E_SIGNATURE_POLICY_REQUIRED Handle = 0x80094809 CERTSRV_E_SIGNATURE_COUNT Handle = 0x8009480A CERTSRV_E_SIGNATURE_REJECTED Handle = 0x8009480B CERTSRV_E_ISSUANCE_POLICY_REQUIRED Handle = 0x8009480C CERTSRV_E_SUBJECT_UPN_REQUIRED Handle = 0x8009480D CERTSRV_E_SUBJECT_DIRECTORY_GUID_REQUIRED Handle = 0x8009480E CERTSRV_E_SUBJECT_DNS_REQUIRED Handle = 0x8009480F CERTSRV_E_ARCHIVED_KEY_UNEXPECTED Handle = 0x80094810 CERTSRV_E_KEY_LENGTH Handle = 0x80094811 CERTSRV_E_SUBJECT_EMAIL_REQUIRED Handle = 0x80094812 CERTSRV_E_UNKNOWN_CERT_TYPE Handle = 0x80094813 CERTSRV_E_CERT_TYPE_OVERLAP Handle = 0x80094814 CERTSRV_E_TOO_MANY_SIGNATURES Handle = 0x80094815 CERTSRV_E_RENEWAL_BAD_PUBLIC_KEY Handle = 0x80094816 CERTSRV_E_INVALID_EK Handle = 0x80094817 CERTSRV_E_INVALID_IDBINDING Handle = 0x80094818 CERTSRV_E_INVALID_ATTESTATION Handle = 0x80094819 CERTSRV_E_KEY_ATTESTATION Handle = 0x8009481A CERTSRV_E_CORRUPT_KEY_ATTESTATION Handle = 0x8009481B CERTSRV_E_EXPIRED_CHALLENGE Handle = 0x8009481C CERTSRV_E_INVALID_RESPONSE Handle = 0x8009481D CERTSRV_E_INVALID_REQUESTID Handle = 0x8009481E CERTSRV_E_REQUEST_PRECERTIFICATE_MISMATCH Handle = 0x8009481F CERTSRV_E_PENDING_CLIENT_RESPONSE Handle = 0x80094820 XENROLL_E_KEY_NOT_EXPORTABLE Handle = 0x80095000 XENROLL_E_CANNOT_ADD_ROOT_CERT Handle = 0x80095001 XENROLL_E_RESPONSE_KA_HASH_NOT_FOUND Handle = 0x80095002 XENROLL_E_RESPONSE_UNEXPECTED_KA_HASH Handle = 0x80095003 XENROLL_E_RESPONSE_KA_HASH_MISMATCH Handle = 0x80095004 XENROLL_E_KEYSPEC_SMIME_MISMATCH Handle = 0x80095005 TRUST_E_SYSTEM_ERROR Handle = 0x80096001 TRUST_E_NO_SIGNER_CERT Handle = 0x80096002 TRUST_E_COUNTER_SIGNER Handle = 0x80096003 TRUST_E_CERT_SIGNATURE Handle = 0x80096004 TRUST_E_TIME_STAMP Handle = 0x80096005 TRUST_E_BAD_DIGEST Handle = 0x80096010 TRUST_E_MALFORMED_SIGNATURE Handle = 0x80096011 TRUST_E_BASIC_CONSTRAINTS Handle = 0x80096019 TRUST_E_FINANCIAL_CRITERIA Handle = 0x8009601E MSSIPOTF_E_OUTOFMEMRANGE Handle = 0x80097001 MSSIPOTF_E_CANTGETOBJECT Handle = 0x80097002 MSSIPOTF_E_NOHEADTABLE Handle = 0x80097003 MSSIPOTF_E_BAD_MAGICNUMBER Handle = 0x80097004 MSSIPOTF_E_BAD_OFFSET_TABLE Handle = 0x80097005 MSSIPOTF_E_TABLE_TAGORDER Handle = 0x80097006 MSSIPOTF_E_TABLE_LONGWORD Handle = 0x80097007 MSSIPOTF_E_BAD_FIRST_TABLE_PLACEMENT Handle = 0x80097008 MSSIPOTF_E_TABLES_OVERLAP Handle = 0x80097009 MSSIPOTF_E_TABLE_PADBYTES Handle = 0x8009700A MSSIPOTF_E_FILETOOSMALL Handle = 0x8009700B MSSIPOTF_E_TABLE_CHECKSUM Handle = 0x8009700C MSSIPOTF_E_FILE_CHECKSUM Handle = 0x8009700D MSSIPOTF_E_FAILED_POLICY Handle = 0x80097010 MSSIPOTF_E_FAILED_HINTS_CHECK Handle = 0x80097011 MSSIPOTF_E_NOT_OPENTYPE Handle = 0x80097012 MSSIPOTF_E_FILE Handle = 0x80097013 MSSIPOTF_E_CRYPT Handle = 0x80097014 MSSIPOTF_E_BADVERSION Handle = 0x80097015 MSSIPOTF_E_DSIG_STRUCTURE Handle = 0x80097016 MSSIPOTF_E_PCONST_CHECK Handle = 0x80097017 MSSIPOTF_E_STRUCTURE Handle = 0x80097018 ERROR_CRED_REQUIRES_CONFIRMATION Handle = 0x80097019 NTE_OP_OK syscall.Errno = 0 TRUST_E_PROVIDER_UNKNOWN Handle = 0x800B0001 TRUST_E_ACTION_UNKNOWN Handle = 0x800B0002 TRUST_E_SUBJECT_FORM_UNKNOWN Handle = 0x800B0003 TRUST_E_SUBJECT_NOT_TRUSTED Handle = 0x800B0004 DIGSIG_E_ENCODE Handle = 0x800B0005 DIGSIG_E_DECODE Handle = 0x800B0006 DIGSIG_E_EXTENSIBILITY Handle = 0x800B0007 DIGSIG_E_CRYPTO Handle = 0x800B0008 PERSIST_E_SIZEDEFINITE Handle = 0x800B0009 PERSIST_E_SIZEINDEFINITE Handle = 0x800B000A PERSIST_E_NOTSELFSIZING Handle = 0x800B000B TRUST_E_NOSIGNATURE Handle = 0x800B0100 CERT_E_EXPIRED Handle = 0x800B0101 CERT_E_VALIDITYPERIODNESTING Handle = 0x800B0102 CERT_E_ROLE Handle = 0x800B0103 CERT_E_PATHLENCONST Handle = 0x800B0104 CERT_E_CRITICAL Handle = 0x800B0105 CERT_E_PURPOSE Handle = 0x800B0106 CERT_E_ISSUERCHAINING Handle = 0x800B0107 CERT_E_MALFORMED Handle = 0x800B0108 CERT_E_UNTRUSTEDROOT Handle = 0x800B0109 CERT_E_CHAINING Handle = 0x800B010A TRUST_E_FAIL Handle = 0x800B010B CERT_E_REVOKED Handle = 0x800B010C CERT_E_UNTRUSTEDTESTROOT Handle = 0x800B010D CERT_E_REVOCATION_FAILURE Handle = 0x800B010E CERT_E_CN_NO_MATCH Handle = 0x800B010F CERT_E_WRONG_USAGE Handle = 0x800B0110 TRUST_E_EXPLICIT_DISTRUST Handle = 0x800B0111 CERT_E_UNTRUSTEDCA Handle = 0x800B0112 CERT_E_INVALID_POLICY Handle = 0x800B0113 CERT_E_INVALID_NAME Handle = 0x800B0114 SPAPI_E_EXPECTED_SECTION_NAME Handle = 0x800F0000 SPAPI_E_BAD_SECTION_NAME_LINE Handle = 0x800F0001 SPAPI_E_SECTION_NAME_TOO_LONG Handle = 0x800F0002 SPAPI_E_GENERAL_SYNTAX Handle = 0x800F0003 SPAPI_E_WRONG_INF_STYLE Handle = 0x800F0100 SPAPI_E_SECTION_NOT_FOUND Handle = 0x800F0101 SPAPI_E_LINE_NOT_FOUND Handle = 0x800F0102 SPAPI_E_NO_BACKUP Handle = 0x800F0103 SPAPI_E_NO_ASSOCIATED_CLASS Handle = 0x800F0200 SPAPI_E_CLASS_MISMATCH Handle = 0x800F0201 SPAPI_E_DUPLICATE_FOUND Handle = 0x800F0202 SPAPI_E_NO_DRIVER_SELECTED Handle = 0x800F0203 SPAPI_E_KEY_DOES_NOT_EXIST Handle = 0x800F0204 SPAPI_E_INVALID_DEVINST_NAME Handle = 0x800F0205 SPAPI_E_INVALID_CLASS Handle = 0x800F0206 SPAPI_E_DEVINST_ALREADY_EXISTS Handle = 0x800F0207 SPAPI_E_DEVINFO_NOT_REGISTERED Handle = 0x800F0208 SPAPI_E_INVALID_REG_PROPERTY Handle = 0x800F0209 SPAPI_E_NO_INF Handle = 0x800F020A SPAPI_E_NO_SUCH_DEVINST Handle = 0x800F020B SPAPI_E_CANT_LOAD_CLASS_ICON Handle = 0x800F020C SPAPI_E_INVALID_CLASS_INSTALLER Handle = 0x800F020D SPAPI_E_DI_DO_DEFAULT Handle = 0x800F020E SPAPI_E_DI_NOFILECOPY Handle = 0x800F020F SPAPI_E_INVALID_HWPROFILE Handle = 0x800F0210 SPAPI_E_NO_DEVICE_SELECTED Handle = 0x800F0211 SPAPI_E_DEVINFO_LIST_LOCKED Handle = 0x800F0212 SPAPI_E_DEVINFO_DATA_LOCKED Handle = 0x800F0213 SPAPI_E_DI_BAD_PATH Handle = 0x800F0214 SPAPI_E_NO_CLASSINSTALL_PARAMS Handle = 0x800F0215 SPAPI_E_FILEQUEUE_LOCKED Handle = 0x800F0216 SPAPI_E_BAD_SERVICE_INSTALLSECT Handle = 0x800F0217 SPAPI_E_NO_CLASS_DRIVER_LIST Handle = 0x800F0218 SPAPI_E_NO_ASSOCIATED_SERVICE Handle = 0x800F0219 SPAPI_E_NO_DEFAULT_DEVICE_INTERFACE Handle = 0x800F021A SPAPI_E_DEVICE_INTERFACE_ACTIVE Handle = 0x800F021B SPAPI_E_DEVICE_INTERFACE_REMOVED Handle = 0x800F021C SPAPI_E_BAD_INTERFACE_INSTALLSECT Handle = 0x800F021D SPAPI_E_NO_SUCH_INTERFACE_CLASS Handle = 0x800F021E SPAPI_E_INVALID_REFERENCE_STRING Handle = 0x800F021F SPAPI_E_INVALID_MACHINENAME Handle = 0x800F0220 SPAPI_E_REMOTE_COMM_FAILURE Handle = 0x800F0221 SPAPI_E_MACHINE_UNAVAILABLE Handle = 0x800F0222 SPAPI_E_NO_CONFIGMGR_SERVICES Handle = 0x800F0223 SPAPI_E_INVALID_PROPPAGE_PROVIDER Handle = 0x800F0224 SPAPI_E_NO_SUCH_DEVICE_INTERFACE Handle = 0x800F0225 SPAPI_E_DI_POSTPROCESSING_REQUIRED Handle = 0x800F0226 SPAPI_E_INVALID_COINSTALLER Handle = 0x800F0227 SPAPI_E_NO_COMPAT_DRIVERS Handle = 0x800F0228 SPAPI_E_NO_DEVICE_ICON Handle = 0x800F0229 SPAPI_E_INVALID_INF_LOGCONFIG Handle = 0x800F022A SPAPI_E_DI_DONT_INSTALL Handle = 0x800F022B SPAPI_E_INVALID_FILTER_DRIVER Handle = 0x800F022C SPAPI_E_NON_WINDOWS_NT_DRIVER Handle = 0x800F022D SPAPI_E_NON_WINDOWS_DRIVER Handle = 0x800F022E SPAPI_E_NO_CATALOG_FOR_OEM_INF Handle = 0x800F022F SPAPI_E_DEVINSTALL_QUEUE_NONNATIVE Handle = 0x800F0230 SPAPI_E_NOT_DISABLEABLE Handle = 0x800F0231 SPAPI_E_CANT_REMOVE_DEVINST Handle = 0x800F0232 SPAPI_E_INVALID_TARGET Handle = 0x800F0233 SPAPI_E_DRIVER_NONNATIVE Handle = 0x800F0234 SPAPI_E_IN_WOW64 Handle = 0x800F0235 SPAPI_E_SET_SYSTEM_RESTORE_POINT Handle = 0x800F0236 SPAPI_E_INCORRECTLY_COPIED_INF Handle = 0x800F0237 SPAPI_E_SCE_DISABLED Handle = 0x800F0238 SPAPI_E_UNKNOWN_EXCEPTION Handle = 0x800F0239 SPAPI_E_PNP_REGISTRY_ERROR Handle = 0x800F023A SPAPI_E_REMOTE_REQUEST_UNSUPPORTED Handle = 0x800F023B SPAPI_E_NOT_AN_INSTALLED_OEM_INF Handle = 0x800F023C SPAPI_E_INF_IN_USE_BY_DEVICES Handle = 0x800F023D SPAPI_E_DI_FUNCTION_OBSOLETE Handle = 0x800F023E SPAPI_E_NO_AUTHENTICODE_CATALOG Handle = 0x800F023F SPAPI_E_AUTHENTICODE_DISALLOWED Handle = 0x800F0240 SPAPI_E_AUTHENTICODE_TRUSTED_PUBLISHER Handle = 0x800F0241 SPAPI_E_AUTHENTICODE_TRUST_NOT_ESTABLISHED Handle = 0x800F0242 SPAPI_E_AUTHENTICODE_PUBLISHER_NOT_TRUSTED Handle = 0x800F0243 SPAPI_E_SIGNATURE_OSATTRIBUTE_MISMATCH Handle = 0x800F0244 SPAPI_E_ONLY_VALIDATE_VIA_AUTHENTICODE Handle = 0x800F0245 SPAPI_E_DEVICE_INSTALLER_NOT_READY Handle = 0x800F0246 SPAPI_E_DRIVER_STORE_ADD_FAILED Handle = 0x800F0247 SPAPI_E_DEVICE_INSTALL_BLOCKED Handle = 0x800F0248 SPAPI_E_DRIVER_INSTALL_BLOCKED Handle = 0x800F0249 SPAPI_E_WRONG_INF_TYPE Handle = 0x800F024A SPAPI_E_FILE_HASH_NOT_IN_CATALOG Handle = 0x800F024B SPAPI_E_DRIVER_STORE_DELETE_FAILED Handle = 0x800F024C SPAPI_E_UNRECOVERABLE_STACK_OVERFLOW Handle = 0x800F0300 SPAPI_E_ERROR_NOT_INSTALLED Handle = 0x800F1000 SCARD_S_SUCCESS = S_OK SCARD_F_INTERNAL_ERROR Handle = 0x80100001 SCARD_E_CANCELLED Handle = 0x80100002 SCARD_E_INVALID_HANDLE Handle = 0x80100003 SCARD_E_INVALID_PARAMETER Handle = 0x80100004 SCARD_E_INVALID_TARGET Handle = 0x80100005 SCARD_E_NO_MEMORY Handle = 0x80100006 SCARD_F_WAITED_TOO_LONG Handle = 0x80100007 SCARD_E_INSUFFICIENT_BUFFER Handle = 0x80100008 SCARD_E_UNKNOWN_READER Handle = 0x80100009 SCARD_E_TIMEOUT Handle = 0x8010000A SCARD_E_SHARING_VIOLATION Handle = 0x8010000B SCARD_E_NO_SMARTCARD Handle = 0x8010000C SCARD_E_UNKNOWN_CARD Handle = 0x8010000D SCARD_E_CANT_DISPOSE Handle = 0x8010000E SCARD_E_PROTO_MISMATCH Handle = 0x8010000F SCARD_E_NOT_READY Handle = 0x80100010 SCARD_E_INVALID_VALUE Handle = 0x80100011 SCARD_E_SYSTEM_CANCELLED Handle = 0x80100012 SCARD_F_COMM_ERROR Handle = 0x80100013 SCARD_F_UNKNOWN_ERROR Handle = 0x80100014 SCARD_E_INVALID_ATR Handle = 0x80100015 SCARD_E_NOT_TRANSACTED Handle = 0x80100016 SCARD_E_READER_UNAVAILABLE Handle = 0x80100017 SCARD_P_SHUTDOWN Handle = 0x80100018 SCARD_E_PCI_TOO_SMALL Handle = 0x80100019 SCARD_E_READER_UNSUPPORTED Handle = 0x8010001A SCARD_E_DUPLICATE_READER Handle = 0x8010001B SCARD_E_CARD_UNSUPPORTED Handle = 0x8010001C SCARD_E_NO_SERVICE Handle = 0x8010001D SCARD_E_SERVICE_STOPPED Handle = 0x8010001E SCARD_E_UNEXPECTED Handle = 0x8010001F SCARD_E_ICC_INSTALLATION Handle = 0x80100020 SCARD_E_ICC_CREATEORDER Handle = 0x80100021 SCARD_E_UNSUPPORTED_FEATURE Handle = 0x80100022 SCARD_E_DIR_NOT_FOUND Handle = 0x80100023 SCARD_E_FILE_NOT_FOUND Handle = 0x80100024 SCARD_E_NO_DIR Handle = 0x80100025 SCARD_E_NO_FILE Handle = 0x80100026 SCARD_E_NO_ACCESS Handle = 0x80100027 SCARD_E_WRITE_TOO_MANY Handle = 0x80100028 SCARD_E_BAD_SEEK Handle = 0x80100029 SCARD_E_INVALID_CHV Handle = 0x8010002A SCARD_E_UNKNOWN_RES_MNG Handle = 0x8010002B SCARD_E_NO_SUCH_CERTIFICATE Handle = 0x8010002C SCARD_E_CERTIFICATE_UNAVAILABLE Handle = 0x8010002D SCARD_E_NO_READERS_AVAILABLE Handle = 0x8010002E SCARD_E_COMM_DATA_LOST Handle = 0x8010002F SCARD_E_NO_KEY_CONTAINER Handle = 0x80100030 SCARD_E_SERVER_TOO_BUSY Handle = 0x80100031 SCARD_E_PIN_CACHE_EXPIRED Handle = 0x80100032 SCARD_E_NO_PIN_CACHE Handle = 0x80100033 SCARD_E_READ_ONLY_CARD Handle = 0x80100034 SCARD_W_UNSUPPORTED_CARD Handle = 0x80100065 SCARD_W_UNRESPONSIVE_CARD Handle = 0x80100066 SCARD_W_UNPOWERED_CARD Handle = 0x80100067 SCARD_W_RESET_CARD Handle = 0x80100068 SCARD_W_REMOVED_CARD Handle = 0x80100069 SCARD_W_SECURITY_VIOLATION Handle = 0x8010006A SCARD_W_WRONG_CHV Handle = 0x8010006B SCARD_W_CHV_BLOCKED Handle = 0x8010006C SCARD_W_EOF Handle = 0x8010006D SCARD_W_CANCELLED_BY_USER Handle = 0x8010006E SCARD_W_CARD_NOT_AUTHENTICATED Handle = 0x8010006F SCARD_W_CACHE_ITEM_NOT_FOUND Handle = 0x80100070 SCARD_W_CACHE_ITEM_STALE Handle = 0x80100071 SCARD_W_CACHE_ITEM_TOO_BIG Handle = 0x80100072 COMADMIN_E_OBJECTERRORS Handle = 0x80110401 COMADMIN_E_OBJECTINVALID Handle = 0x80110402 COMADMIN_E_KEYMISSING Handle = 0x80110403 COMADMIN_E_ALREADYINSTALLED Handle = 0x80110404 COMADMIN_E_APP_FILE_WRITEFAIL Handle = 0x80110407 COMADMIN_E_APP_FILE_READFAIL Handle = 0x80110408 COMADMIN_E_APP_FILE_VERSION Handle = 0x80110409 COMADMIN_E_BADPATH Handle = 0x8011040A COMADMIN_E_APPLICATIONEXISTS Handle = 0x8011040B COMADMIN_E_ROLEEXISTS Handle = 0x8011040C COMADMIN_E_CANTCOPYFILE Handle = 0x8011040D COMADMIN_E_NOUSER Handle = 0x8011040F COMADMIN_E_INVALIDUSERIDS Handle = 0x80110410 COMADMIN_E_NOREGISTRYCLSID Handle = 0x80110411 COMADMIN_E_BADREGISTRYPROGID Handle = 0x80110412 COMADMIN_E_AUTHENTICATIONLEVEL Handle = 0x80110413 COMADMIN_E_USERPASSWDNOTVALID Handle = 0x80110414 COMADMIN_E_CLSIDORIIDMISMATCH Handle = 0x80110418 COMADMIN_E_REMOTEINTERFACE Handle = 0x80110419 COMADMIN_E_DLLREGISTERSERVER Handle = 0x8011041A COMADMIN_E_NOSERVERSHARE Handle = 0x8011041B COMADMIN_E_DLLLOADFAILED Handle = 0x8011041D COMADMIN_E_BADREGISTRYLIBID Handle = 0x8011041E COMADMIN_E_APPDIRNOTFOUND Handle = 0x8011041F COMADMIN_E_REGISTRARFAILED Handle = 0x80110423 COMADMIN_E_COMPFILE_DOESNOTEXIST Handle = 0x80110424 COMADMIN_E_COMPFILE_LOADDLLFAIL Handle = 0x80110425 COMADMIN_E_COMPFILE_GETCLASSOBJ Handle = 0x80110426 COMADMIN_E_COMPFILE_CLASSNOTAVAIL Handle = 0x80110427 COMADMIN_E_COMPFILE_BADTLB Handle = 0x80110428 COMADMIN_E_COMPFILE_NOTINSTALLABLE Handle = 0x80110429 COMADMIN_E_NOTCHANGEABLE Handle = 0x8011042A COMADMIN_E_NOTDELETEABLE Handle = 0x8011042B COMADMIN_E_SESSION Handle = 0x8011042C COMADMIN_E_COMP_MOVE_LOCKED Handle = 0x8011042D COMADMIN_E_COMP_MOVE_BAD_DEST Handle = 0x8011042E COMADMIN_E_REGISTERTLB Handle = 0x80110430 COMADMIN_E_SYSTEMAPP Handle = 0x80110433 COMADMIN_E_COMPFILE_NOREGISTRAR Handle = 0x80110434 COMADMIN_E_COREQCOMPINSTALLED Handle = 0x80110435 COMADMIN_E_SERVICENOTINSTALLED Handle = 0x80110436 COMADMIN_E_PROPERTYSAVEFAILED Handle = 0x80110437 COMADMIN_E_OBJECTEXISTS Handle = 0x80110438 COMADMIN_E_COMPONENTEXISTS Handle = 0x80110439 COMADMIN_E_REGFILE_CORRUPT Handle = 0x8011043B COMADMIN_E_PROPERTY_OVERFLOW Handle = 0x8011043C COMADMIN_E_NOTINREGISTRY Handle = 0x8011043E COMADMIN_E_OBJECTNOTPOOLABLE Handle = 0x8011043F COMADMIN_E_APPLID_MATCHES_CLSID Handle = 0x80110446 COMADMIN_E_ROLE_DOES_NOT_EXIST Handle = 0x80110447 COMADMIN_E_START_APP_NEEDS_COMPONENTS Handle = 0x80110448 COMADMIN_E_REQUIRES_DIFFERENT_PLATFORM Handle = 0x80110449 COMADMIN_E_CAN_NOT_EXPORT_APP_PROXY Handle = 0x8011044A COMADMIN_E_CAN_NOT_START_APP Handle = 0x8011044B COMADMIN_E_CAN_NOT_EXPORT_SYS_APP Handle = 0x8011044C COMADMIN_E_CANT_SUBSCRIBE_TO_COMPONENT Handle = 0x8011044D COMADMIN_E_EVENTCLASS_CANT_BE_SUBSCRIBER Handle = 0x8011044E COMADMIN_E_LIB_APP_PROXY_INCOMPATIBLE Handle = 0x8011044F COMADMIN_E_BASE_PARTITION_ONLY Handle = 0x80110450 COMADMIN_E_START_APP_DISABLED Handle = 0x80110451 COMADMIN_E_CAT_DUPLICATE_PARTITION_NAME Handle = 0x80110457 COMADMIN_E_CAT_INVALID_PARTITION_NAME Handle = 0x80110458 COMADMIN_E_CAT_PARTITION_IN_USE Handle = 0x80110459 COMADMIN_E_FILE_PARTITION_DUPLICATE_FILES Handle = 0x8011045A COMADMIN_E_CAT_IMPORTED_COMPONENTS_NOT_ALLOWED Handle = 0x8011045B COMADMIN_E_AMBIGUOUS_APPLICATION_NAME Handle = 0x8011045C COMADMIN_E_AMBIGUOUS_PARTITION_NAME Handle = 0x8011045D COMADMIN_E_REGDB_NOTINITIALIZED Handle = 0x80110472 COMADMIN_E_REGDB_NOTOPEN Handle = 0x80110473 COMADMIN_E_REGDB_SYSTEMERR Handle = 0x80110474 COMADMIN_E_REGDB_ALREADYRUNNING Handle = 0x80110475 COMADMIN_E_MIG_VERSIONNOTSUPPORTED Handle = 0x80110480 COMADMIN_E_MIG_SCHEMANOTFOUND Handle = 0x80110481 COMADMIN_E_CAT_BITNESSMISMATCH Handle = 0x80110482 COMADMIN_E_CAT_UNACCEPTABLEBITNESS Handle = 0x80110483 COMADMIN_E_CAT_WRONGAPPBITNESS Handle = 0x80110484 COMADMIN_E_CAT_PAUSE_RESUME_NOT_SUPPORTED Handle = 0x80110485 COMADMIN_E_CAT_SERVERFAULT Handle = 0x80110486 COMQC_E_APPLICATION_NOT_QUEUED Handle = 0x80110600 COMQC_E_NO_QUEUEABLE_INTERFACES Handle = 0x80110601 COMQC_E_QUEUING_SERVICE_NOT_AVAILABLE Handle = 0x80110602 COMQC_E_NO_IPERSISTSTREAM Handle = 0x80110603 COMQC_E_BAD_MESSAGE Handle = 0x80110604 COMQC_E_UNAUTHENTICATED Handle = 0x80110605 COMQC_E_UNTRUSTED_ENQUEUER Handle = 0x80110606 MSDTC_E_DUPLICATE_RESOURCE Handle = 0x80110701 COMADMIN_E_OBJECT_PARENT_MISSING Handle = 0x80110808 COMADMIN_E_OBJECT_DOES_NOT_EXIST Handle = 0x80110809 COMADMIN_E_APP_NOT_RUNNING Handle = 0x8011080A COMADMIN_E_INVALID_PARTITION Handle = 0x8011080B COMADMIN_E_SVCAPP_NOT_POOLABLE_OR_RECYCLABLE Handle = 0x8011080D COMADMIN_E_USER_IN_SET Handle = 0x8011080E COMADMIN_E_CANTRECYCLELIBRARYAPPS Handle = 0x8011080F COMADMIN_E_CANTRECYCLESERVICEAPPS Handle = 0x80110811 COMADMIN_E_PROCESSALREADYRECYCLED Handle = 0x80110812 COMADMIN_E_PAUSEDPROCESSMAYNOTBERECYCLED Handle = 0x80110813 COMADMIN_E_CANTMAKEINPROCSERVICE Handle = 0x80110814 COMADMIN_E_PROGIDINUSEBYCLSID Handle = 0x80110815 COMADMIN_E_DEFAULT_PARTITION_NOT_IN_SET Handle = 0x80110816 COMADMIN_E_RECYCLEDPROCESSMAYNOTBEPAUSED Handle = 0x80110817 COMADMIN_E_PARTITION_ACCESSDENIED Handle = 0x80110818 COMADMIN_E_PARTITION_MSI_ONLY Handle = 0x80110819 COMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_1_0_FORMAT Handle = 0x8011081A COMADMIN_E_LEGACYCOMPS_NOT_ALLOWED_IN_NONBASE_PARTITIONS Handle = 0x8011081B COMADMIN_E_COMP_MOVE_SOURCE Handle = 0x8011081C COMADMIN_E_COMP_MOVE_DEST Handle = 0x8011081D COMADMIN_E_COMP_MOVE_PRIVATE Handle = 0x8011081E COMADMIN_E_BASEPARTITION_REQUIRED_IN_SET Handle = 0x8011081F COMADMIN_E_CANNOT_ALIAS_EVENTCLASS Handle = 0x80110820 COMADMIN_E_PRIVATE_ACCESSDENIED Handle = 0x80110821 COMADMIN_E_SAFERINVALID Handle = 0x80110822 COMADMIN_E_REGISTRY_ACCESSDENIED Handle = 0x80110823 COMADMIN_E_PARTITIONS_DISABLED Handle = 0x80110824 WER_S_REPORT_DEBUG Handle = 0x001B0000 WER_S_REPORT_UPLOADED Handle = 0x001B0001 WER_S_REPORT_QUEUED Handle = 0x001B0002 WER_S_DISABLED Handle = 0x001B0003 WER_S_SUSPENDED_UPLOAD Handle = 0x001B0004 WER_S_DISABLED_QUEUE Handle = 0x001B0005 WER_S_DISABLED_ARCHIVE Handle = 0x001B0006 WER_S_REPORT_ASYNC Handle = 0x001B0007 WER_S_IGNORE_ASSERT_INSTANCE Handle = 0x001B0008 WER_S_IGNORE_ALL_ASSERTS Handle = 0x001B0009 WER_S_ASSERT_CONTINUE Handle = 0x001B000A WER_S_THROTTLED Handle = 0x001B000B WER_S_REPORT_UPLOADED_CAB Handle = 0x001B000C WER_E_CRASH_FAILURE Handle = 0x801B8000 WER_E_CANCELED Handle = 0x801B8001 WER_E_NETWORK_FAILURE Handle = 0x801B8002 WER_E_NOT_INITIALIZED Handle = 0x801B8003 WER_E_ALREADY_REPORTING Handle = 0x801B8004 WER_E_DUMP_THROTTLED Handle = 0x801B8005 WER_E_INSUFFICIENT_CONSENT Handle = 0x801B8006 WER_E_TOO_HEAVY Handle = 0x801B8007 ERROR_FLT_IO_COMPLETE Handle = 0x001F0001 ERROR_FLT_NO_HANDLER_DEFINED Handle = 0x801F0001 ERROR_FLT_CONTEXT_ALREADY_DEFINED Handle = 0x801F0002 ERROR_FLT_INVALID_ASYNCHRONOUS_REQUEST Handle = 0x801F0003 ERROR_FLT_DISALLOW_FAST_IO Handle = 0x801F0004 ERROR_FLT_INVALID_NAME_REQUEST Handle = 0x801F0005 ERROR_FLT_NOT_SAFE_TO_POST_OPERATION Handle = 0x801F0006 ERROR_FLT_NOT_INITIALIZED Handle = 0x801F0007 ERROR_FLT_FILTER_NOT_READY Handle = 0x801F0008 ERROR_FLT_POST_OPERATION_CLEANUP Handle = 0x801F0009 ERROR_FLT_INTERNAL_ERROR Handle = 0x801F000A ERROR_FLT_DELETING_OBJECT Handle = 0x801F000B ERROR_FLT_MUST_BE_NONPAGED_POOL Handle = 0x801F000C ERROR_FLT_DUPLICATE_ENTRY Handle = 0x801F000D ERROR_FLT_CBDQ_DISABLED Handle = 0x801F000E ERROR_FLT_DO_NOT_ATTACH Handle = 0x801F000F ERROR_FLT_DO_NOT_DETACH Handle = 0x801F0010 ERROR_FLT_INSTANCE_ALTITUDE_COLLISION Handle = 0x801F0011 ERROR_FLT_INSTANCE_NAME_COLLISION Handle = 0x801F0012 ERROR_FLT_FILTER_NOT_FOUND Handle = 0x801F0013 ERROR_FLT_VOLUME_NOT_FOUND Handle = 0x801F0014 ERROR_FLT_INSTANCE_NOT_FOUND Handle = 0x801F0015 ERROR_FLT_CONTEXT_ALLOCATION_NOT_FOUND Handle = 0x801F0016 ERROR_FLT_INVALID_CONTEXT_REGISTRATION Handle = 0x801F0017 ERROR_FLT_NAME_CACHE_MISS Handle = 0x801F0018 ERROR_FLT_NO_DEVICE_OBJECT Handle = 0x801F0019 ERROR_FLT_VOLUME_ALREADY_MOUNTED Handle = 0x801F001A ERROR_FLT_ALREADY_ENLISTED Handle = 0x801F001B ERROR_FLT_CONTEXT_ALREADY_LINKED Handle = 0x801F001C ERROR_FLT_NO_WAITER_FOR_REPLY Handle = 0x801F0020 ERROR_FLT_REGISTRATION_BUSY Handle = 0x801F0023 ERROR_HUNG_DISPLAY_DRIVER_THREAD Handle = 0x80260001 DWM_E_COMPOSITIONDISABLED Handle = 0x80263001 DWM_E_REMOTING_NOT_SUPPORTED Handle = 0x80263002 DWM_E_NO_REDIRECTION_SURFACE_AVAILABLE Handle = 0x80263003 DWM_E_NOT_QUEUING_PRESENTS Handle = 0x80263004 DWM_E_ADAPTER_NOT_FOUND Handle = 0x80263005 DWM_S_GDI_REDIRECTION_SURFACE Handle = 0x00263005 DWM_E_TEXTURE_TOO_LARGE Handle = 0x80263007 DWM_S_GDI_REDIRECTION_SURFACE_BLT_VIA_GDI Handle = 0x00263008 ERROR_MONITOR_NO_DESCRIPTOR Handle = 0x00261001 ERROR_MONITOR_UNKNOWN_DESCRIPTOR_FORMAT Handle = 0x00261002 ERROR_MONITOR_INVALID_DESCRIPTOR_CHECKSUM Handle = 0xC0261003 ERROR_MONITOR_INVALID_STANDARD_TIMING_BLOCK Handle = 0xC0261004 ERROR_MONITOR_WMI_DATABLOCK_REGISTRATION_FAILED Handle = 0xC0261005 ERROR_MONITOR_INVALID_SERIAL_NUMBER_MONDSC_BLOCK Handle = 0xC0261006 ERROR_MONITOR_INVALID_USER_FRIENDLY_MONDSC_BLOCK Handle = 0xC0261007 ERROR_MONITOR_NO_MORE_DESCRIPTOR_DATA Handle = 0xC0261008 ERROR_MONITOR_INVALID_DETAILED_TIMING_BLOCK Handle = 0xC0261009 ERROR_MONITOR_INVALID_MANUFACTURE_DATE Handle = 0xC026100A ERROR_GRAPHICS_NOT_EXCLUSIVE_MODE_OWNER Handle = 0xC0262000 ERROR_GRAPHICS_INSUFFICIENT_DMA_BUFFER Handle = 0xC0262001 ERROR_GRAPHICS_INVALID_DISPLAY_ADAPTER Handle = 0xC0262002 ERROR_GRAPHICS_ADAPTER_WAS_RESET Handle = 0xC0262003 ERROR_GRAPHICS_INVALID_DRIVER_MODEL Handle = 0xC0262004 ERROR_GRAPHICS_PRESENT_MODE_CHANGED Handle = 0xC0262005 ERROR_GRAPHICS_PRESENT_OCCLUDED Handle = 0xC0262006 ERROR_GRAPHICS_PRESENT_DENIED Handle = 0xC0262007 ERROR_GRAPHICS_CANNOTCOLORCONVERT Handle = 0xC0262008 ERROR_GRAPHICS_DRIVER_MISMATCH Handle = 0xC0262009 ERROR_GRAPHICS_PARTIAL_DATA_POPULATED Handle = 0x4026200A ERROR_GRAPHICS_PRESENT_REDIRECTION_DISABLED Handle = 0xC026200B ERROR_GRAPHICS_PRESENT_UNOCCLUDED Handle = 0xC026200C ERROR_GRAPHICS_WINDOWDC_NOT_AVAILABLE Handle = 0xC026200D ERROR_GRAPHICS_WINDOWLESS_PRESENT_DISABLED Handle = 0xC026200E ERROR_GRAPHICS_PRESENT_INVALID_WINDOW Handle = 0xC026200F ERROR_GRAPHICS_PRESENT_BUFFER_NOT_BOUND Handle = 0xC0262010 ERROR_GRAPHICS_VAIL_STATE_CHANGED Handle = 0xC0262011 ERROR_GRAPHICS_INDIRECT_DISPLAY_ABANDON_SWAPCHAIN Handle = 0xC0262012 ERROR_GRAPHICS_INDIRECT_DISPLAY_DEVICE_STOPPED Handle = 0xC0262013 ERROR_GRAPHICS_NO_VIDEO_MEMORY Handle = 0xC0262100 ERROR_GRAPHICS_CANT_LOCK_MEMORY Handle = 0xC0262101 ERROR_GRAPHICS_ALLOCATION_BUSY Handle = 0xC0262102 ERROR_GRAPHICS_TOO_MANY_REFERENCES Handle = 0xC0262103 ERROR_GRAPHICS_TRY_AGAIN_LATER Handle = 0xC0262104 ERROR_GRAPHICS_TRY_AGAIN_NOW Handle = 0xC0262105 ERROR_GRAPHICS_ALLOCATION_INVALID Handle = 0xC0262106 ERROR_GRAPHICS_UNSWIZZLING_APERTURE_UNAVAILABLE Handle = 0xC0262107 ERROR_GRAPHICS_UNSWIZZLING_APERTURE_UNSUPPORTED Handle = 0xC0262108 ERROR_GRAPHICS_CANT_EVICT_PINNED_ALLOCATION Handle = 0xC0262109 ERROR_GRAPHICS_INVALID_ALLOCATION_USAGE Handle = 0xC0262110 ERROR_GRAPHICS_CANT_RENDER_LOCKED_ALLOCATION Handle = 0xC0262111 ERROR_GRAPHICS_ALLOCATION_CLOSED Handle = 0xC0262112 ERROR_GRAPHICS_INVALID_ALLOCATION_INSTANCE Handle = 0xC0262113 ERROR_GRAPHICS_INVALID_ALLOCATION_HANDLE Handle = 0xC0262114 ERROR_GRAPHICS_WRONG_ALLOCATION_DEVICE Handle = 0xC0262115 ERROR_GRAPHICS_ALLOCATION_CONTENT_LOST Handle = 0xC0262116 ERROR_GRAPHICS_GPU_EXCEPTION_ON_DEVICE Handle = 0xC0262200 ERROR_GRAPHICS_SKIP_ALLOCATION_PREPARATION Handle = 0x40262201 ERROR_GRAPHICS_INVALID_VIDPN_TOPOLOGY Handle = 0xC0262300 ERROR_GRAPHICS_VIDPN_TOPOLOGY_NOT_SUPPORTED Handle = 0xC0262301 ERROR_GRAPHICS_VIDPN_TOPOLOGY_CURRENTLY_NOT_SUPPORTED Handle = 0xC0262302 ERROR_GRAPHICS_INVALID_VIDPN Handle = 0xC0262303 ERROR_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE Handle = 0xC0262304 ERROR_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET Handle = 0xC0262305 ERROR_GRAPHICS_VIDPN_MODALITY_NOT_SUPPORTED Handle = 0xC0262306 ERROR_GRAPHICS_MODE_NOT_PINNED Handle = 0x00262307 ERROR_GRAPHICS_INVALID_VIDPN_SOURCEMODESET Handle = 0xC0262308 ERROR_GRAPHICS_INVALID_VIDPN_TARGETMODESET Handle = 0xC0262309 ERROR_GRAPHICS_INVALID_FREQUENCY Handle = 0xC026230A ERROR_GRAPHICS_INVALID_ACTIVE_REGION Handle = 0xC026230B ERROR_GRAPHICS_INVALID_TOTAL_REGION Handle = 0xC026230C ERROR_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE_MODE Handle = 0xC0262310 ERROR_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET_MODE Handle = 0xC0262311 ERROR_GRAPHICS_PINNED_MODE_MUST_REMAIN_IN_SET Handle = 0xC0262312 ERROR_GRAPHICS_PATH_ALREADY_IN_TOPOLOGY Handle = 0xC0262313 ERROR_GRAPHICS_MODE_ALREADY_IN_MODESET Handle = 0xC0262314 ERROR_GRAPHICS_INVALID_VIDEOPRESENTSOURCESET Handle = 0xC0262315 ERROR_GRAPHICS_INVALID_VIDEOPRESENTTARGETSET Handle = 0xC0262316 ERROR_GRAPHICS_SOURCE_ALREADY_IN_SET Handle = 0xC0262317 ERROR_GRAPHICS_TARGET_ALREADY_IN_SET Handle = 0xC0262318 ERROR_GRAPHICS_INVALID_VIDPN_PRESENT_PATH Handle = 0xC0262319 ERROR_GRAPHICS_NO_RECOMMENDED_VIDPN_TOPOLOGY Handle = 0xC026231A ERROR_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGESET Handle = 0xC026231B ERROR_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE Handle = 0xC026231C ERROR_GRAPHICS_FREQUENCYRANGE_NOT_IN_SET Handle = 0xC026231D ERROR_GRAPHICS_NO_PREFERRED_MODE Handle = 0x0026231E ERROR_GRAPHICS_FREQUENCYRANGE_ALREADY_IN_SET Handle = 0xC026231F ERROR_GRAPHICS_STALE_MODESET Handle = 0xC0262320 ERROR_GRAPHICS_INVALID_MONITOR_SOURCEMODESET Handle = 0xC0262321 ERROR_GRAPHICS_INVALID_MONITOR_SOURCE_MODE Handle = 0xC0262322 ERROR_GRAPHICS_NO_RECOMMENDED_FUNCTIONAL_VIDPN Handle = 0xC0262323 ERROR_GRAPHICS_MODE_ID_MUST_BE_UNIQUE Handle = 0xC0262324 ERROR_GRAPHICS_EMPTY_ADAPTER_MONITOR_MODE_SUPPORT_INTERSECTION Handle = 0xC0262325 ERROR_GRAPHICS_VIDEO_PRESENT_TARGETS_LESS_THAN_SOURCES Handle = 0xC0262326 ERROR_GRAPHICS_PATH_NOT_IN_TOPOLOGY Handle = 0xC0262327 ERROR_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_SOURCE Handle = 0xC0262328 ERROR_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_TARGET Handle = 0xC0262329 ERROR_GRAPHICS_INVALID_MONITORDESCRIPTORSET Handle = 0xC026232A ERROR_GRAPHICS_INVALID_MONITORDESCRIPTOR Handle = 0xC026232B ERROR_GRAPHICS_MONITORDESCRIPTOR_NOT_IN_SET Handle = 0xC026232C ERROR_GRAPHICS_MONITORDESCRIPTOR_ALREADY_IN_SET Handle = 0xC026232D ERROR_GRAPHICS_MONITORDESCRIPTOR_ID_MUST_BE_UNIQUE Handle = 0xC026232E ERROR_GRAPHICS_INVALID_VIDPN_TARGET_SUBSET_TYPE Handle = 0xC026232F ERROR_GRAPHICS_RESOURCES_NOT_RELATED Handle = 0xC0262330 ERROR_GRAPHICS_SOURCE_ID_MUST_BE_UNIQUE Handle = 0xC0262331 ERROR_GRAPHICS_TARGET_ID_MUST_BE_UNIQUE Handle = 0xC0262332 ERROR_GRAPHICS_NO_AVAILABLE_VIDPN_TARGET Handle = 0xC0262333 ERROR_GRAPHICS_MONITOR_COULD_NOT_BE_ASSOCIATED_WITH_ADAPTER Handle = 0xC0262334 ERROR_GRAPHICS_NO_VIDPNMGR Handle = 0xC0262335 ERROR_GRAPHICS_NO_ACTIVE_VIDPN Handle = 0xC0262336 ERROR_GRAPHICS_STALE_VIDPN_TOPOLOGY Handle = 0xC0262337 ERROR_GRAPHICS_MONITOR_NOT_CONNECTED Handle = 0xC0262338 ERROR_GRAPHICS_SOURCE_NOT_IN_TOPOLOGY Handle = 0xC0262339 ERROR_GRAPHICS_INVALID_PRIMARYSURFACE_SIZE Handle = 0xC026233A ERROR_GRAPHICS_INVALID_VISIBLEREGION_SIZE Handle = 0xC026233B ERROR_GRAPHICS_INVALID_STRIDE Handle = 0xC026233C ERROR_GRAPHICS_INVALID_PIXELFORMAT Handle = 0xC026233D ERROR_GRAPHICS_INVALID_COLORBASIS Handle = 0xC026233E ERROR_GRAPHICS_INVALID_PIXELVALUEACCESSMODE Handle = 0xC026233F ERROR_GRAPHICS_TARGET_NOT_IN_TOPOLOGY Handle = 0xC0262340 ERROR_GRAPHICS_NO_DISPLAY_MODE_MANAGEMENT_SUPPORT Handle = 0xC0262341 ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE Handle = 0xC0262342 ERROR_GRAPHICS_CANT_ACCESS_ACTIVE_VIDPN Handle = 0xC0262343 ERROR_GRAPHICS_INVALID_PATH_IMPORTANCE_ORDINAL Handle = 0xC0262344 ERROR_GRAPHICS_INVALID_PATH_CONTENT_GEOMETRY_TRANSFORMATION Handle = 0xC0262345 ERROR_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_SUPPORTED Handle = 0xC0262346 ERROR_GRAPHICS_INVALID_GAMMA_RAMP Handle = 0xC0262347 ERROR_GRAPHICS_GAMMA_RAMP_NOT_SUPPORTED Handle = 0xC0262348 ERROR_GRAPHICS_MULTISAMPLING_NOT_SUPPORTED Handle = 0xC0262349 ERROR_GRAPHICS_MODE_NOT_IN_MODESET Handle = 0xC026234A ERROR_GRAPHICS_DATASET_IS_EMPTY Handle = 0x0026234B ERROR_GRAPHICS_NO_MORE_ELEMENTS_IN_DATASET Handle = 0x0026234C ERROR_GRAPHICS_INVALID_VIDPN_TOPOLOGY_RECOMMENDATION_REASON Handle = 0xC026234D ERROR_GRAPHICS_INVALID_PATH_CONTENT_TYPE Handle = 0xC026234E ERROR_GRAPHICS_INVALID_COPYPROTECTION_TYPE Handle = 0xC026234F ERROR_GRAPHICS_UNASSIGNED_MODESET_ALREADY_EXISTS Handle = 0xC0262350 ERROR_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_PINNED Handle = 0x00262351 ERROR_GRAPHICS_INVALID_SCANLINE_ORDERING Handle = 0xC0262352 ERROR_GRAPHICS_TOPOLOGY_CHANGES_NOT_ALLOWED Handle = 0xC0262353 ERROR_GRAPHICS_NO_AVAILABLE_IMPORTANCE_ORDINALS Handle = 0xC0262354 ERROR_GRAPHICS_INCOMPATIBLE_PRIVATE_FORMAT Handle = 0xC0262355 ERROR_GRAPHICS_INVALID_MODE_PRUNING_ALGORITHM Handle = 0xC0262356 ERROR_GRAPHICS_INVALID_MONITOR_CAPABILITY_ORIGIN Handle = 0xC0262357 ERROR_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE_CONSTRAINT Handle = 0xC0262358 ERROR_GRAPHICS_MAX_NUM_PATHS_REACHED Handle = 0xC0262359 ERROR_GRAPHICS_CANCEL_VIDPN_TOPOLOGY_AUGMENTATION Handle = 0xC026235A ERROR_GRAPHICS_INVALID_CLIENT_TYPE Handle = 0xC026235B ERROR_GRAPHICS_CLIENTVIDPN_NOT_SET Handle = 0xC026235C ERROR_GRAPHICS_SPECIFIED_CHILD_ALREADY_CONNECTED Handle = 0xC0262400 ERROR_GRAPHICS_CHILD_DESCRIPTOR_NOT_SUPPORTED Handle = 0xC0262401 ERROR_GRAPHICS_UNKNOWN_CHILD_STATUS Handle = 0x4026242F ERROR_GRAPHICS_NOT_A_LINKED_ADAPTER Handle = 0xC0262430 ERROR_GRAPHICS_LEADLINK_NOT_ENUMERATED Handle = 0xC0262431 ERROR_GRAPHICS_CHAINLINKS_NOT_ENUMERATED Handle = 0xC0262432 ERROR_GRAPHICS_ADAPTER_CHAIN_NOT_READY Handle = 0xC0262433 ERROR_GRAPHICS_CHAINLINKS_NOT_STARTED Handle = 0xC0262434 ERROR_GRAPHICS_CHAINLINKS_NOT_POWERED_ON Handle = 0xC0262435 ERROR_GRAPHICS_INCONSISTENT_DEVICE_LINK_STATE Handle = 0xC0262436 ERROR_GRAPHICS_LEADLINK_START_DEFERRED Handle = 0x40262437 ERROR_GRAPHICS_NOT_POST_DEVICE_DRIVER Handle = 0xC0262438 ERROR_GRAPHICS_POLLING_TOO_FREQUENTLY Handle = 0x40262439 ERROR_GRAPHICS_START_DEFERRED Handle = 0x4026243A ERROR_GRAPHICS_ADAPTER_ACCESS_NOT_EXCLUDED Handle = 0xC026243B ERROR_GRAPHICS_DEPENDABLE_CHILD_STATUS Handle = 0x4026243C ERROR_GRAPHICS_OPM_NOT_SUPPORTED Handle = 0xC0262500 ERROR_GRAPHICS_COPP_NOT_SUPPORTED Handle = 0xC0262501 ERROR_GRAPHICS_UAB_NOT_SUPPORTED Handle = 0xC0262502 ERROR_GRAPHICS_OPM_INVALID_ENCRYPTED_PARAMETERS Handle = 0xC0262503 ERROR_GRAPHICS_OPM_NO_VIDEO_OUTPUTS_EXIST Handle = 0xC0262505 ERROR_GRAPHICS_OPM_INTERNAL_ERROR Handle = 0xC026250B ERROR_GRAPHICS_OPM_INVALID_HANDLE Handle = 0xC026250C ERROR_GRAPHICS_PVP_INVALID_CERTIFICATE_LENGTH Handle = 0xC026250E ERROR_GRAPHICS_OPM_SPANNING_MODE_ENABLED Handle = 0xC026250F ERROR_GRAPHICS_OPM_THEATER_MODE_ENABLED Handle = 0xC0262510 ERROR_GRAPHICS_PVP_HFS_FAILED Handle = 0xC0262511 ERROR_GRAPHICS_OPM_INVALID_SRM Handle = 0xC0262512 ERROR_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_HDCP Handle = 0xC0262513 ERROR_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_ACP Handle = 0xC0262514 ERROR_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_CGMSA Handle = 0xC0262515 ERROR_GRAPHICS_OPM_HDCP_SRM_NEVER_SET Handle = 0xC0262516 ERROR_GRAPHICS_OPM_RESOLUTION_TOO_HIGH Handle = 0xC0262517 ERROR_GRAPHICS_OPM_ALL_HDCP_HARDWARE_ALREADY_IN_USE Handle = 0xC0262518 ERROR_GRAPHICS_OPM_VIDEO_OUTPUT_NO_LONGER_EXISTS Handle = 0xC026251A ERROR_GRAPHICS_OPM_SESSION_TYPE_CHANGE_IN_PROGRESS Handle = 0xC026251B ERROR_GRAPHICS_OPM_VIDEO_OUTPUT_DOES_NOT_HAVE_COPP_SEMANTICS Handle = 0xC026251C ERROR_GRAPHICS_OPM_INVALID_INFORMATION_REQUEST Handle = 0xC026251D ERROR_GRAPHICS_OPM_DRIVER_INTERNAL_ERROR Handle = 0xC026251E ERROR_GRAPHICS_OPM_VIDEO_OUTPUT_DOES_NOT_HAVE_OPM_SEMANTICS Handle = 0xC026251F ERROR_GRAPHICS_OPM_SIGNALING_NOT_SUPPORTED Handle = 0xC0262520 ERROR_GRAPHICS_OPM_INVALID_CONFIGURATION_REQUEST Handle = 0xC0262521 ERROR_GRAPHICS_I2C_NOT_SUPPORTED Handle = 0xC0262580 ERROR_GRAPHICS_I2C_DEVICE_DOES_NOT_EXIST Handle = 0xC0262581 ERROR_GRAPHICS_I2C_ERROR_TRANSMITTING_DATA Handle = 0xC0262582 ERROR_GRAPHICS_I2C_ERROR_RECEIVING_DATA Handle = 0xC0262583 ERROR_GRAPHICS_DDCCI_VCP_NOT_SUPPORTED Handle = 0xC0262584 ERROR_GRAPHICS_DDCCI_INVALID_DATA Handle = 0xC0262585 ERROR_GRAPHICS_DDCCI_MONITOR_RETURNED_INVALID_TIMING_STATUS_BYTE Handle = 0xC0262586 ERROR_GRAPHICS_MCA_INVALID_CAPABILITIES_STRING Handle = 0xC0262587 ERROR_GRAPHICS_MCA_INTERNAL_ERROR Handle = 0xC0262588 ERROR_GRAPHICS_DDCCI_INVALID_MESSAGE_COMMAND Handle = 0xC0262589 ERROR_GRAPHICS_DDCCI_INVALID_MESSAGE_LENGTH Handle = 0xC026258A ERROR_GRAPHICS_DDCCI_INVALID_MESSAGE_CHECKSUM Handle = 0xC026258B ERROR_GRAPHICS_INVALID_PHYSICAL_MONITOR_HANDLE Handle = 0xC026258C ERROR_GRAPHICS_MONITOR_NO_LONGER_EXISTS Handle = 0xC026258D ERROR_GRAPHICS_DDCCI_CURRENT_CURRENT_VALUE_GREATER_THAN_MAXIMUM_VALUE Handle = 0xC02625D8 ERROR_GRAPHICS_MCA_INVALID_VCP_VERSION Handle = 0xC02625D9 ERROR_GRAPHICS_MCA_MONITOR_VIOLATES_MCCS_SPECIFICATION Handle = 0xC02625DA ERROR_GRAPHICS_MCA_MCCS_VERSION_MISMATCH Handle = 0xC02625DB ERROR_GRAPHICS_MCA_UNSUPPORTED_MCCS_VERSION Handle = 0xC02625DC ERROR_GRAPHICS_MCA_INVALID_TECHNOLOGY_TYPE_RETURNED Handle = 0xC02625DE ERROR_GRAPHICS_MCA_UNSUPPORTED_COLOR_TEMPERATURE Handle = 0xC02625DF ERROR_GRAPHICS_ONLY_CONSOLE_SESSION_SUPPORTED Handle = 0xC02625E0 ERROR_GRAPHICS_NO_DISPLAY_DEVICE_CORRESPONDS_TO_NAME Handle = 0xC02625E1 ERROR_GRAPHICS_DISPLAY_DEVICE_NOT_ATTACHED_TO_DESKTOP Handle = 0xC02625E2 ERROR_GRAPHICS_MIRRORING_DEVICES_NOT_SUPPORTED Handle = 0xC02625E3 ERROR_GRAPHICS_INVALID_POINTER Handle = 0xC02625E4 ERROR_GRAPHICS_NO_MONITORS_CORRESPOND_TO_DISPLAY_DEVICE Handle = 0xC02625E5 ERROR_GRAPHICS_PARAMETER_ARRAY_TOO_SMALL Handle = 0xC02625E6 ERROR_GRAPHICS_INTERNAL_ERROR Handle = 0xC02625E7 ERROR_GRAPHICS_SESSION_TYPE_CHANGE_IN_PROGRESS Handle = 0xC02605E8 NAP_E_INVALID_PACKET Handle = 0x80270001 NAP_E_MISSING_SOH Handle = 0x80270002 NAP_E_CONFLICTING_ID Handle = 0x80270003 NAP_E_NO_CACHED_SOH Handle = 0x80270004 NAP_E_STILL_BOUND Handle = 0x80270005 NAP_E_NOT_REGISTERED Handle = 0x80270006 NAP_E_NOT_INITIALIZED Handle = 0x80270007 NAP_E_MISMATCHED_ID Handle = 0x80270008 NAP_E_NOT_PENDING Handle = 0x80270009 NAP_E_ID_NOT_FOUND Handle = 0x8027000A NAP_E_MAXSIZE_TOO_SMALL Handle = 0x8027000B NAP_E_SERVICE_NOT_RUNNING Handle = 0x8027000C NAP_S_CERT_ALREADY_PRESENT Handle = 0x0027000D NAP_E_ENTITY_DISABLED Handle = 0x8027000E NAP_E_NETSH_GROUPPOLICY_ERROR Handle = 0x8027000F NAP_E_TOO_MANY_CALLS Handle = 0x80270010 NAP_E_SHV_CONFIG_EXISTED Handle = 0x80270011 NAP_E_SHV_CONFIG_NOT_FOUND Handle = 0x80270012 NAP_E_SHV_TIMEOUT Handle = 0x80270013 TPM_E_ERROR_MASK Handle = 0x80280000 TPM_E_AUTHFAIL Handle = 0x80280001 TPM_E_BADINDEX Handle = 0x80280002 TPM_E_BAD_PARAMETER Handle = 0x80280003 TPM_E_AUDITFAILURE Handle = 0x80280004 TPM_E_CLEAR_DISABLED Handle = 0x80280005 TPM_E_DEACTIVATED Handle = 0x80280006 TPM_E_DISABLED Handle = 0x80280007 TPM_E_DISABLED_CMD Handle = 0x80280008 TPM_E_FAIL Handle = 0x80280009 TPM_E_BAD_ORDINAL Handle = 0x8028000A TPM_E_INSTALL_DISABLED Handle = 0x8028000B TPM_E_INVALID_KEYHANDLE Handle = 0x8028000C TPM_E_KEYNOTFOUND Handle = 0x8028000D TPM_E_INAPPROPRIATE_ENC Handle = 0x8028000E TPM_E_MIGRATEFAIL Handle = 0x8028000F TPM_E_INVALID_PCR_INFO Handle = 0x80280010 TPM_E_NOSPACE Handle = 0x80280011 TPM_E_NOSRK Handle = 0x80280012 TPM_E_NOTSEALED_BLOB Handle = 0x80280013 TPM_E_OWNER_SET Handle = 0x80280014 TPM_E_RESOURCES Handle = 0x80280015 TPM_E_SHORTRANDOM Handle = 0x80280016 TPM_E_SIZE Handle = 0x80280017 TPM_E_WRONGPCRVAL Handle = 0x80280018 TPM_E_BAD_PARAM_SIZE Handle = 0x80280019 TPM_E_SHA_THREAD Handle = 0x8028001A TPM_E_SHA_ERROR Handle = 0x8028001B TPM_E_FAILEDSELFTEST Handle = 0x8028001C TPM_E_AUTH2FAIL Handle = 0x8028001D TPM_E_BADTAG Handle = 0x8028001E TPM_E_IOERROR Handle = 0x8028001F TPM_E_ENCRYPT_ERROR Handle = 0x80280020 TPM_E_DECRYPT_ERROR Handle = 0x80280021 TPM_E_INVALID_AUTHHANDLE Handle = 0x80280022 TPM_E_NO_ENDORSEMENT Handle = 0x80280023 TPM_E_INVALID_KEYUSAGE Handle = 0x80280024 TPM_E_WRONG_ENTITYTYPE Handle = 0x80280025 TPM_E_INVALID_POSTINIT Handle = 0x80280026 TPM_E_INAPPROPRIATE_SIG Handle = 0x80280027 TPM_E_BAD_KEY_PROPERTY Handle = 0x80280028 TPM_E_BAD_MIGRATION Handle = 0x80280029 TPM_E_BAD_SCHEME Handle = 0x8028002A TPM_E_BAD_DATASIZE Handle = 0x8028002B TPM_E_BAD_MODE Handle = 0x8028002C TPM_E_BAD_PRESENCE Handle = 0x8028002D TPM_E_BAD_VERSION Handle = 0x8028002E TPM_E_NO_WRAP_TRANSPORT Handle = 0x8028002F TPM_E_AUDITFAIL_UNSUCCESSFUL Handle = 0x80280030 TPM_E_AUDITFAIL_SUCCESSFUL Handle = 0x80280031 TPM_E_NOTRESETABLE Handle = 0x80280032 TPM_E_NOTLOCAL Handle = 0x80280033 TPM_E_BAD_TYPE Handle = 0x80280034 TPM_E_INVALID_RESOURCE Handle = 0x80280035 TPM_E_NOTFIPS Handle = 0x80280036 TPM_E_INVALID_FAMILY Handle = 0x80280037 TPM_E_NO_NV_PERMISSION Handle = 0x80280038 TPM_E_REQUIRES_SIGN Handle = 0x80280039 TPM_E_KEY_NOTSUPPORTED Handle = 0x8028003A TPM_E_AUTH_CONFLICT Handle = 0x8028003B TPM_E_AREA_LOCKED Handle = 0x8028003C TPM_E_BAD_LOCALITY Handle = 0x8028003D TPM_E_READ_ONLY Handle = 0x8028003E TPM_E_PER_NOWRITE Handle = 0x8028003F TPM_E_FAMILYCOUNT Handle = 0x80280040 TPM_E_WRITE_LOCKED Handle = 0x80280041 TPM_E_BAD_ATTRIBUTES Handle = 0x80280042 TPM_E_INVALID_STRUCTURE Handle = 0x80280043 TPM_E_KEY_OWNER_CONTROL Handle = 0x80280044 TPM_E_BAD_COUNTER Handle = 0x80280045 TPM_E_NOT_FULLWRITE Handle = 0x80280046 TPM_E_CONTEXT_GAP Handle = 0x80280047 TPM_E_MAXNVWRITES Handle = 0x80280048 TPM_E_NOOPERATOR Handle = 0x80280049 TPM_E_RESOURCEMISSING Handle = 0x8028004A TPM_E_DELEGATE_LOCK Handle = 0x8028004B TPM_E_DELEGATE_FAMILY Handle = 0x8028004C TPM_E_DELEGATE_ADMIN Handle = 0x8028004D TPM_E_TRANSPORT_NOTEXCLUSIVE Handle = 0x8028004E TPM_E_OWNER_CONTROL Handle = 0x8028004F TPM_E_DAA_RESOURCES Handle = 0x80280050 TPM_E_DAA_INPUT_DATA0 Handle = 0x80280051 TPM_E_DAA_INPUT_DATA1 Handle = 0x80280052 TPM_E_DAA_ISSUER_SETTINGS Handle = 0x80280053 TPM_E_DAA_TPM_SETTINGS Handle = 0x80280054 TPM_E_DAA_STAGE Handle = 0x80280055 TPM_E_DAA_ISSUER_VALIDITY Handle = 0x80280056 TPM_E_DAA_WRONG_W Handle = 0x80280057 TPM_E_BAD_HANDLE Handle = 0x80280058 TPM_E_BAD_DELEGATE Handle = 0x80280059 TPM_E_BADCONTEXT Handle = 0x8028005A TPM_E_TOOMANYCONTEXTS Handle = 0x8028005B TPM_E_MA_TICKET_SIGNATURE Handle = 0x8028005C TPM_E_MA_DESTINATION Handle = 0x8028005D TPM_E_MA_SOURCE Handle = 0x8028005E TPM_E_MA_AUTHORITY Handle = 0x8028005F TPM_E_PERMANENTEK Handle = 0x80280061 TPM_E_BAD_SIGNATURE Handle = 0x80280062 TPM_E_NOCONTEXTSPACE Handle = 0x80280063 TPM_20_E_ASYMMETRIC Handle = 0x80280081 TPM_20_E_ATTRIBUTES Handle = 0x80280082 TPM_20_E_HASH Handle = 0x80280083 TPM_20_E_VALUE Handle = 0x80280084 TPM_20_E_HIERARCHY Handle = 0x80280085 TPM_20_E_KEY_SIZE Handle = 0x80280087 TPM_20_E_MGF Handle = 0x80280088 TPM_20_E_MODE Handle = 0x80280089 TPM_20_E_TYPE Handle = 0x8028008A TPM_20_E_HANDLE Handle = 0x8028008B TPM_20_E_KDF Handle = 0x8028008C TPM_20_E_RANGE Handle = 0x8028008D TPM_20_E_AUTH_FAIL Handle = 0x8028008E TPM_20_E_NONCE Handle = 0x8028008F TPM_20_E_PP Handle = 0x80280090 TPM_20_E_SCHEME Handle = 0x80280092 TPM_20_E_SIZE Handle = 0x80280095 TPM_20_E_SYMMETRIC Handle = 0x80280096 TPM_20_E_TAG Handle = 0x80280097 TPM_20_E_SELECTOR Handle = 0x80280098 TPM_20_E_INSUFFICIENT Handle = 0x8028009A TPM_20_E_SIGNATURE Handle = 0x8028009B TPM_20_E_KEY Handle = 0x8028009C TPM_20_E_POLICY_FAIL Handle = 0x8028009D TPM_20_E_INTEGRITY Handle = 0x8028009F TPM_20_E_TICKET Handle = 0x802800A0 TPM_20_E_RESERVED_BITS Handle = 0x802800A1 TPM_20_E_BAD_AUTH Handle = 0x802800A2 TPM_20_E_EXPIRED Handle = 0x802800A3 TPM_20_E_POLICY_CC Handle = 0x802800A4 TPM_20_E_BINDING Handle = 0x802800A5 TPM_20_E_CURVE Handle = 0x802800A6 TPM_20_E_ECC_POINT Handle = 0x802800A7 TPM_20_E_INITIALIZE Handle = 0x80280100 TPM_20_E_FAILURE Handle = 0x80280101 TPM_20_E_SEQUENCE Handle = 0x80280103 TPM_20_E_PRIVATE Handle = 0x8028010B TPM_20_E_HMAC Handle = 0x80280119 TPM_20_E_DISABLED Handle = 0x80280120 TPM_20_E_EXCLUSIVE Handle = 0x80280121 TPM_20_E_ECC_CURVE Handle = 0x80280123 TPM_20_E_AUTH_TYPE Handle = 0x80280124 TPM_20_E_AUTH_MISSING Handle = 0x80280125 TPM_20_E_POLICY Handle = 0x80280126 TPM_20_E_PCR Handle = 0x80280127 TPM_20_E_PCR_CHANGED Handle = 0x80280128 TPM_20_E_UPGRADE Handle = 0x8028012D TPM_20_E_TOO_MANY_CONTEXTS Handle = 0x8028012E TPM_20_E_AUTH_UNAVAILABLE Handle = 0x8028012F TPM_20_E_REBOOT Handle = 0x80280130 TPM_20_E_UNBALANCED Handle = 0x80280131 TPM_20_E_COMMAND_SIZE Handle = 0x80280142 TPM_20_E_COMMAND_CODE Handle = 0x80280143 TPM_20_E_AUTHSIZE Handle = 0x80280144 TPM_20_E_AUTH_CONTEXT Handle = 0x80280145 TPM_20_E_NV_RANGE Handle = 0x80280146 TPM_20_E_NV_SIZE Handle = 0x80280147 TPM_20_E_NV_LOCKED Handle = 0x80280148 TPM_20_E_NV_AUTHORIZATION Handle = 0x80280149 TPM_20_E_NV_UNINITIALIZED Handle = 0x8028014A TPM_20_E_NV_SPACE Handle = 0x8028014B TPM_20_E_NV_DEFINED Handle = 0x8028014C TPM_20_E_BAD_CONTEXT Handle = 0x80280150 TPM_20_E_CPHASH Handle = 0x80280151 TPM_20_E_PARENT Handle = 0x80280152 TPM_20_E_NEEDS_TEST Handle = 0x80280153 TPM_20_E_NO_RESULT Handle = 0x80280154 TPM_20_E_SENSITIVE Handle = 0x80280155 TPM_E_COMMAND_BLOCKED Handle = 0x80280400 TPM_E_INVALID_HANDLE Handle = 0x80280401 TPM_E_DUPLICATE_VHANDLE Handle = 0x80280402 TPM_E_EMBEDDED_COMMAND_BLOCKED Handle = 0x80280403 TPM_E_EMBEDDED_COMMAND_UNSUPPORTED Handle = 0x80280404 TPM_E_RETRY Handle = 0x80280800 TPM_E_NEEDS_SELFTEST Handle = 0x80280801 TPM_E_DOING_SELFTEST Handle = 0x80280802 TPM_E_DEFEND_LOCK_RUNNING Handle = 0x80280803 TPM_20_E_CONTEXT_GAP Handle = 0x80280901 TPM_20_E_OBJECT_MEMORY Handle = 0x80280902 TPM_20_E_SESSION_MEMORY Handle = 0x80280903 TPM_20_E_MEMORY Handle = 0x80280904 TPM_20_E_SESSION_HANDLES Handle = 0x80280905 TPM_20_E_OBJECT_HANDLES Handle = 0x80280906 TPM_20_E_LOCALITY Handle = 0x80280907 TPM_20_E_YIELDED Handle = 0x80280908 TPM_20_E_CANCELED Handle = 0x80280909 TPM_20_E_TESTING Handle = 0x8028090A TPM_20_E_NV_RATE Handle = 0x80280920 TPM_20_E_LOCKOUT Handle = 0x80280921 TPM_20_E_RETRY Handle = 0x80280922 TPM_20_E_NV_UNAVAILABLE Handle = 0x80280923 TBS_E_INTERNAL_ERROR Handle = 0x80284001 TBS_E_BAD_PARAMETER Handle = 0x80284002 TBS_E_INVALID_OUTPUT_POINTER Handle = 0x80284003 TBS_E_INVALID_CONTEXT Handle = 0x80284004 TBS_E_INSUFFICIENT_BUFFER Handle = 0x80284005 TBS_E_IOERROR Handle = 0x80284006 TBS_E_INVALID_CONTEXT_PARAM Handle = 0x80284007 TBS_E_SERVICE_NOT_RUNNING Handle = 0x80284008 TBS_E_TOO_MANY_TBS_CONTEXTS Handle = 0x80284009 TBS_E_TOO_MANY_RESOURCES Handle = 0x8028400A TBS_E_SERVICE_START_PENDING Handle = 0x8028400B TBS_E_PPI_NOT_SUPPORTED Handle = 0x8028400C TBS_E_COMMAND_CANCELED Handle = 0x8028400D TBS_E_BUFFER_TOO_LARGE Handle = 0x8028400E TBS_E_TPM_NOT_FOUND Handle = 0x8028400F TBS_E_SERVICE_DISABLED Handle = 0x80284010 TBS_E_NO_EVENT_LOG Handle = 0x80284011 TBS_E_ACCESS_DENIED Handle = 0x80284012 TBS_E_PROVISIONING_NOT_ALLOWED Handle = 0x80284013 TBS_E_PPI_FUNCTION_UNSUPPORTED Handle = 0x80284014 TBS_E_OWNERAUTH_NOT_FOUND Handle = 0x80284015 TBS_E_PROVISIONING_INCOMPLETE Handle = 0x80284016 TPMAPI_E_INVALID_STATE Handle = 0x80290100 TPMAPI_E_NOT_ENOUGH_DATA Handle = 0x80290101 TPMAPI_E_TOO_MUCH_DATA Handle = 0x80290102 TPMAPI_E_INVALID_OUTPUT_POINTER Handle = 0x80290103 TPMAPI_E_INVALID_PARAMETER Handle = 0x80290104 TPMAPI_E_OUT_OF_MEMORY Handle = 0x80290105 TPMAPI_E_BUFFER_TOO_SMALL Handle = 0x80290106 TPMAPI_E_INTERNAL_ERROR Handle = 0x80290107 TPMAPI_E_ACCESS_DENIED Handle = 0x80290108 TPMAPI_E_AUTHORIZATION_FAILED Handle = 0x80290109 TPMAPI_E_INVALID_CONTEXT_HANDLE Handle = 0x8029010A TPMAPI_E_TBS_COMMUNICATION_ERROR Handle = 0x8029010B TPMAPI_E_TPM_COMMAND_ERROR Handle = 0x8029010C TPMAPI_E_MESSAGE_TOO_LARGE Handle = 0x8029010D TPMAPI_E_INVALID_ENCODING Handle = 0x8029010E TPMAPI_E_INVALID_KEY_SIZE Handle = 0x8029010F TPMAPI_E_ENCRYPTION_FAILED Handle = 0x80290110 TPMAPI_E_INVALID_KEY_PARAMS Handle = 0x80290111 TPMAPI_E_INVALID_MIGRATION_AUTHORIZATION_BLOB Handle = 0x80290112 TPMAPI_E_INVALID_PCR_INDEX Handle = 0x80290113 TPMAPI_E_INVALID_DELEGATE_BLOB Handle = 0x80290114 TPMAPI_E_INVALID_CONTEXT_PARAMS Handle = 0x80290115 TPMAPI_E_INVALID_KEY_BLOB Handle = 0x80290116 TPMAPI_E_INVALID_PCR_DATA Handle = 0x80290117 TPMAPI_E_INVALID_OWNER_AUTH Handle = 0x80290118 TPMAPI_E_FIPS_RNG_CHECK_FAILED Handle = 0x80290119 TPMAPI_E_EMPTY_TCG_LOG Handle = 0x8029011A TPMAPI_E_INVALID_TCG_LOG_ENTRY Handle = 0x8029011B TPMAPI_E_TCG_SEPARATOR_ABSENT Handle = 0x8029011C TPMAPI_E_TCG_INVALID_DIGEST_ENTRY Handle = 0x8029011D TPMAPI_E_POLICY_DENIES_OPERATION Handle = 0x8029011E TPMAPI_E_NV_BITS_NOT_DEFINED Handle = 0x8029011F TPMAPI_E_NV_BITS_NOT_READY Handle = 0x80290120 TPMAPI_E_SEALING_KEY_NOT_AVAILABLE Handle = 0x80290121 TPMAPI_E_NO_AUTHORIZATION_CHAIN_FOUND Handle = 0x80290122 TPMAPI_E_SVN_COUNTER_NOT_AVAILABLE Handle = 0x80290123 TPMAPI_E_OWNER_AUTH_NOT_NULL Handle = 0x80290124 TPMAPI_E_ENDORSEMENT_AUTH_NOT_NULL Handle = 0x80290125 TPMAPI_E_AUTHORIZATION_REVOKED Handle = 0x80290126 TPMAPI_E_MALFORMED_AUTHORIZATION_KEY Handle = 0x80290127 TPMAPI_E_AUTHORIZING_KEY_NOT_SUPPORTED Handle = 0x80290128 TPMAPI_E_INVALID_AUTHORIZATION_SIGNATURE Handle = 0x80290129 TPMAPI_E_MALFORMED_AUTHORIZATION_POLICY Handle = 0x8029012A TPMAPI_E_MALFORMED_AUTHORIZATION_OTHER Handle = 0x8029012B TPMAPI_E_SEALING_KEY_CHANGED Handle = 0x8029012C TBSIMP_E_BUFFER_TOO_SMALL Handle = 0x80290200 TBSIMP_E_CLEANUP_FAILED Handle = 0x80290201 TBSIMP_E_INVALID_CONTEXT_HANDLE Handle = 0x80290202 TBSIMP_E_INVALID_CONTEXT_PARAM Handle = 0x80290203 TBSIMP_E_TPM_ERROR Handle = 0x80290204 TBSIMP_E_HASH_BAD_KEY Handle = 0x80290205 TBSIMP_E_DUPLICATE_VHANDLE Handle = 0x80290206 TBSIMP_E_INVALID_OUTPUT_POINTER Handle = 0x80290207 TBSIMP_E_INVALID_PARAMETER Handle = 0x80290208 TBSIMP_E_RPC_INIT_FAILED Handle = 0x80290209 TBSIMP_E_SCHEDULER_NOT_RUNNING Handle = 0x8029020A TBSIMP_E_COMMAND_CANCELED Handle = 0x8029020B TBSIMP_E_OUT_OF_MEMORY Handle = 0x8029020C TBSIMP_E_LIST_NO_MORE_ITEMS Handle = 0x8029020D TBSIMP_E_LIST_NOT_FOUND Handle = 0x8029020E TBSIMP_E_NOT_ENOUGH_SPACE Handle = 0x8029020F TBSIMP_E_NOT_ENOUGH_TPM_CONTEXTS Handle = 0x80290210 TBSIMP_E_COMMAND_FAILED Handle = 0x80290211 TBSIMP_E_UNKNOWN_ORDINAL Handle = 0x80290212 TBSIMP_E_RESOURCE_EXPIRED Handle = 0x80290213 TBSIMP_E_INVALID_RESOURCE Handle = 0x80290214 TBSIMP_E_NOTHING_TO_UNLOAD Handle = 0x80290215 TBSIMP_E_HASH_TABLE_FULL Handle = 0x80290216 TBSIMP_E_TOO_MANY_TBS_CONTEXTS Handle = 0x80290217 TBSIMP_E_TOO_MANY_RESOURCES Handle = 0x80290218 TBSIMP_E_PPI_NOT_SUPPORTED Handle = 0x80290219 TBSIMP_E_TPM_INCOMPATIBLE Handle = 0x8029021A TBSIMP_E_NO_EVENT_LOG Handle = 0x8029021B TPM_E_PPI_ACPI_FAILURE Handle = 0x80290300 TPM_E_PPI_USER_ABORT Handle = 0x80290301 TPM_E_PPI_BIOS_FAILURE Handle = 0x80290302 TPM_E_PPI_NOT_SUPPORTED Handle = 0x80290303 TPM_E_PPI_BLOCKED_IN_BIOS Handle = 0x80290304 TPM_E_PCP_ERROR_MASK Handle = 0x80290400 TPM_E_PCP_DEVICE_NOT_READY Handle = 0x80290401 TPM_E_PCP_INVALID_HANDLE Handle = 0x80290402 TPM_E_PCP_INVALID_PARAMETER Handle = 0x80290403 TPM_E_PCP_FLAG_NOT_SUPPORTED Handle = 0x80290404 TPM_E_PCP_NOT_SUPPORTED Handle = 0x80290405 TPM_E_PCP_BUFFER_TOO_SMALL Handle = 0x80290406 TPM_E_PCP_INTERNAL_ERROR Handle = 0x80290407 TPM_E_PCP_AUTHENTICATION_FAILED Handle = 0x80290408 TPM_E_PCP_AUTHENTICATION_IGNORED Handle = 0x80290409 TPM_E_PCP_POLICY_NOT_FOUND Handle = 0x8029040A TPM_E_PCP_PROFILE_NOT_FOUND Handle = 0x8029040B TPM_E_PCP_VALIDATION_FAILED Handle = 0x8029040C TPM_E_PCP_WRONG_PARENT Handle = 0x8029040E TPM_E_KEY_NOT_LOADED Handle = 0x8029040F TPM_E_NO_KEY_CERTIFICATION Handle = 0x80290410 TPM_E_KEY_NOT_FINALIZED Handle = 0x80290411 TPM_E_ATTESTATION_CHALLENGE_NOT_SET Handle = 0x80290412 TPM_E_NOT_PCR_BOUND Handle = 0x80290413 TPM_E_KEY_ALREADY_FINALIZED Handle = 0x80290414 TPM_E_KEY_USAGE_POLICY_NOT_SUPPORTED Handle = 0x80290415 TPM_E_KEY_USAGE_POLICY_INVALID Handle = 0x80290416 TPM_E_SOFT_KEY_ERROR Handle = 0x80290417 TPM_E_KEY_NOT_AUTHENTICATED Handle = 0x80290418 TPM_E_PCP_KEY_NOT_AIK Handle = 0x80290419 TPM_E_KEY_NOT_SIGNING_KEY Handle = 0x8029041A TPM_E_LOCKED_OUT Handle = 0x8029041B TPM_E_CLAIM_TYPE_NOT_SUPPORTED Handle = 0x8029041C TPM_E_VERSION_NOT_SUPPORTED Handle = 0x8029041D TPM_E_BUFFER_LENGTH_MISMATCH Handle = 0x8029041E TPM_E_PCP_IFX_RSA_KEY_CREATION_BLOCKED Handle = 0x8029041F TPM_E_PCP_TICKET_MISSING Handle = 0x80290420 TPM_E_PCP_RAW_POLICY_NOT_SUPPORTED Handle = 0x80290421 TPM_E_PCP_KEY_HANDLE_INVALIDATED Handle = 0x80290422 TPM_E_PCP_UNSUPPORTED_PSS_SALT Handle = 0x40290423 TPM_E_ZERO_EXHAUST_ENABLED Handle = 0x80290500 PLA_E_DCS_NOT_FOUND Handle = 0x80300002 PLA_E_DCS_IN_USE Handle = 0x803000AA PLA_E_TOO_MANY_FOLDERS Handle = 0x80300045 PLA_E_NO_MIN_DISK Handle = 0x80300070 PLA_E_DCS_ALREADY_EXISTS Handle = 0x803000B7 PLA_S_PROPERTY_IGNORED Handle = 0x00300100 PLA_E_PROPERTY_CONFLICT Handle = 0x80300101 PLA_E_DCS_SINGLETON_REQUIRED Handle = 0x80300102 PLA_E_CREDENTIALS_REQUIRED Handle = 0x80300103 PLA_E_DCS_NOT_RUNNING Handle = 0x80300104 PLA_E_CONFLICT_INCL_EXCL_API Handle = 0x80300105 PLA_E_NETWORK_EXE_NOT_VALID Handle = 0x80300106 PLA_E_EXE_ALREADY_CONFIGURED Handle = 0x80300107 PLA_E_EXE_PATH_NOT_VALID Handle = 0x80300108 PLA_E_DC_ALREADY_EXISTS Handle = 0x80300109 PLA_E_DCS_START_WAIT_TIMEOUT Handle = 0x8030010A PLA_E_DC_START_WAIT_TIMEOUT Handle = 0x8030010B PLA_E_REPORT_WAIT_TIMEOUT Handle = 0x8030010C PLA_E_NO_DUPLICATES Handle = 0x8030010D PLA_E_EXE_FULL_PATH_REQUIRED Handle = 0x8030010E PLA_E_INVALID_SESSION_NAME Handle = 0x8030010F PLA_E_PLA_CHANNEL_NOT_ENABLED Handle = 0x80300110 PLA_E_TASKSCHED_CHANNEL_NOT_ENABLED Handle = 0x80300111 PLA_E_RULES_MANAGER_FAILED Handle = 0x80300112 PLA_E_CABAPI_FAILURE Handle = 0x80300113 FVE_E_LOCKED_VOLUME Handle = 0x80310000 FVE_E_NOT_ENCRYPTED Handle = 0x80310001 FVE_E_NO_TPM_BIOS Handle = 0x80310002 FVE_E_NO_MBR_METRIC Handle = 0x80310003 FVE_E_NO_BOOTSECTOR_METRIC Handle = 0x80310004 FVE_E_NO_BOOTMGR_METRIC Handle = 0x80310005 FVE_E_WRONG_BOOTMGR Handle = 0x80310006 FVE_E_SECURE_KEY_REQUIRED Handle = 0x80310007 FVE_E_NOT_ACTIVATED Handle = 0x80310008 FVE_E_ACTION_NOT_ALLOWED Handle = 0x80310009 FVE_E_AD_SCHEMA_NOT_INSTALLED Handle = 0x8031000A FVE_E_AD_INVALID_DATATYPE Handle = 0x8031000B FVE_E_AD_INVALID_DATASIZE Handle = 0x8031000C FVE_E_AD_NO_VALUES Handle = 0x8031000D FVE_E_AD_ATTR_NOT_SET Handle = 0x8031000E FVE_E_AD_GUID_NOT_FOUND Handle = 0x8031000F FVE_E_BAD_INFORMATION Handle = 0x80310010 FVE_E_TOO_SMALL Handle = 0x80310011 FVE_E_SYSTEM_VOLUME Handle = 0x80310012 FVE_E_FAILED_WRONG_FS Handle = 0x80310013 FVE_E_BAD_PARTITION_SIZE Handle = 0x80310014 FVE_E_NOT_SUPPORTED Handle = 0x80310015 FVE_E_BAD_DATA Handle = 0x80310016 FVE_E_VOLUME_NOT_BOUND Handle = 0x80310017 FVE_E_TPM_NOT_OWNED Handle = 0x80310018 FVE_E_NOT_DATA_VOLUME Handle = 0x80310019 FVE_E_AD_INSUFFICIENT_BUFFER Handle = 0x8031001A FVE_E_CONV_READ Handle = 0x8031001B FVE_E_CONV_WRITE Handle = 0x8031001C FVE_E_KEY_REQUIRED Handle = 0x8031001D FVE_E_CLUSTERING_NOT_SUPPORTED Handle = 0x8031001E FVE_E_VOLUME_BOUND_ALREADY Handle = 0x8031001F FVE_E_OS_NOT_PROTECTED Handle = 0x80310020 FVE_E_PROTECTION_DISABLED Handle = 0x80310021 FVE_E_RECOVERY_KEY_REQUIRED Handle = 0x80310022 FVE_E_FOREIGN_VOLUME Handle = 0x80310023 FVE_E_OVERLAPPED_UPDATE Handle = 0x80310024 FVE_E_TPM_SRK_AUTH_NOT_ZERO Handle = 0x80310025 FVE_E_FAILED_SECTOR_SIZE Handle = 0x80310026 FVE_E_FAILED_AUTHENTICATION Handle = 0x80310027 FVE_E_NOT_OS_VOLUME Handle = 0x80310028 FVE_E_AUTOUNLOCK_ENABLED Handle = 0x80310029 FVE_E_WRONG_BOOTSECTOR Handle = 0x8031002A FVE_E_WRONG_SYSTEM_FS Handle = 0x8031002B FVE_E_POLICY_PASSWORD_REQUIRED Handle = 0x8031002C FVE_E_CANNOT_SET_FVEK_ENCRYPTED Handle = 0x8031002D FVE_E_CANNOT_ENCRYPT_NO_KEY Handle = 0x8031002E FVE_E_BOOTABLE_CDDVD Handle = 0x80310030 FVE_E_PROTECTOR_EXISTS Handle = 0x80310031 FVE_E_RELATIVE_PATH Handle = 0x80310032 FVE_E_PROTECTOR_NOT_FOUND Handle = 0x80310033 FVE_E_INVALID_KEY_FORMAT Handle = 0x80310034 FVE_E_INVALID_PASSWORD_FORMAT Handle = 0x80310035 FVE_E_FIPS_RNG_CHECK_FAILED Handle = 0x80310036 FVE_E_FIPS_PREVENTS_RECOVERY_PASSWORD Handle = 0x80310037 FVE_E_FIPS_PREVENTS_EXTERNAL_KEY_EXPORT Handle = 0x80310038 FVE_E_NOT_DECRYPTED Handle = 0x80310039 FVE_E_INVALID_PROTECTOR_TYPE Handle = 0x8031003A FVE_E_NO_PROTECTORS_TO_TEST Handle = 0x8031003B FVE_E_KEYFILE_NOT_FOUND Handle = 0x8031003C FVE_E_KEYFILE_INVALID Handle = 0x8031003D FVE_E_KEYFILE_NO_VMK Handle = 0x8031003E FVE_E_TPM_DISABLED Handle = 0x8031003F FVE_E_NOT_ALLOWED_IN_SAFE_MODE Handle = 0x80310040 FVE_E_TPM_INVALID_PCR Handle = 0x80310041 FVE_E_TPM_NO_VMK Handle = 0x80310042 FVE_E_PIN_INVALID Handle = 0x80310043 FVE_E_AUTH_INVALID_APPLICATION Handle = 0x80310044 FVE_E_AUTH_INVALID_CONFIG Handle = 0x80310045 FVE_E_FIPS_DISABLE_PROTECTION_NOT_ALLOWED Handle = 0x80310046 FVE_E_FS_NOT_EXTENDED Handle = 0x80310047 FVE_E_FIRMWARE_TYPE_NOT_SUPPORTED Handle = 0x80310048 FVE_E_NO_LICENSE Handle = 0x80310049 FVE_E_NOT_ON_STACK Handle = 0x8031004A FVE_E_FS_MOUNTED Handle = 0x8031004B FVE_E_TOKEN_NOT_IMPERSONATED Handle = 0x8031004C FVE_E_DRY_RUN_FAILED Handle = 0x8031004D FVE_E_REBOOT_REQUIRED Handle = 0x8031004E FVE_E_DEBUGGER_ENABLED Handle = 0x8031004F FVE_E_RAW_ACCESS Handle = 0x80310050 FVE_E_RAW_BLOCKED Handle = 0x80310051 FVE_E_BCD_APPLICATIONS_PATH_INCORRECT Handle = 0x80310052 FVE_E_NOT_ALLOWED_IN_VERSION Handle = 0x80310053 FVE_E_NO_AUTOUNLOCK_MASTER_KEY Handle = 0x80310054 FVE_E_MOR_FAILED Handle = 0x80310055 FVE_E_HIDDEN_VOLUME Handle = 0x80310056 FVE_E_TRANSIENT_STATE Handle = 0x80310057 FVE_E_PUBKEY_NOT_ALLOWED Handle = 0x80310058 FVE_E_VOLUME_HANDLE_OPEN Handle = 0x80310059 FVE_E_NO_FEATURE_LICENSE Handle = 0x8031005A FVE_E_INVALID_STARTUP_OPTIONS Handle = 0x8031005B FVE_E_POLICY_RECOVERY_PASSWORD_NOT_ALLOWED Handle = 0x8031005C FVE_E_POLICY_RECOVERY_PASSWORD_REQUIRED Handle = 0x8031005D FVE_E_POLICY_RECOVERY_KEY_NOT_ALLOWED Handle = 0x8031005E FVE_E_POLICY_RECOVERY_KEY_REQUIRED Handle = 0x8031005F FVE_E_POLICY_STARTUP_PIN_NOT_ALLOWED Handle = 0x80310060 FVE_E_POLICY_STARTUP_PIN_REQUIRED Handle = 0x80310061 FVE_E_POLICY_STARTUP_KEY_NOT_ALLOWED Handle = 0x80310062 FVE_E_POLICY_STARTUP_KEY_REQUIRED Handle = 0x80310063 FVE_E_POLICY_STARTUP_PIN_KEY_NOT_ALLOWED Handle = 0x80310064 FVE_E_POLICY_STARTUP_PIN_KEY_REQUIRED Handle = 0x80310065 FVE_E_POLICY_STARTUP_TPM_NOT_ALLOWED Handle = 0x80310066 FVE_E_POLICY_STARTUP_TPM_REQUIRED Handle = 0x80310067 FVE_E_POLICY_INVALID_PIN_LENGTH Handle = 0x80310068 FVE_E_KEY_PROTECTOR_NOT_SUPPORTED Handle = 0x80310069 FVE_E_POLICY_PASSPHRASE_NOT_ALLOWED Handle = 0x8031006A FVE_E_POLICY_PASSPHRASE_REQUIRED Handle = 0x8031006B FVE_E_FIPS_PREVENTS_PASSPHRASE Handle = 0x8031006C FVE_E_OS_VOLUME_PASSPHRASE_NOT_ALLOWED Handle = 0x8031006D FVE_E_INVALID_BITLOCKER_OID Handle = 0x8031006E FVE_E_VOLUME_TOO_SMALL Handle = 0x8031006F FVE_E_DV_NOT_SUPPORTED_ON_FS Handle = 0x80310070 FVE_E_DV_NOT_ALLOWED_BY_GP Handle = 0x80310071 FVE_E_POLICY_USER_CERTIFICATE_NOT_ALLOWED Handle = 0x80310072 FVE_E_POLICY_USER_CERTIFICATE_REQUIRED Handle = 0x80310073 FVE_E_POLICY_USER_CERT_MUST_BE_HW Handle = 0x80310074 FVE_E_POLICY_USER_CONFIGURE_FDV_AUTOUNLOCK_NOT_ALLOWED Handle = 0x80310075 FVE_E_POLICY_USER_CONFIGURE_RDV_AUTOUNLOCK_NOT_ALLOWED Handle = 0x80310076 FVE_E_POLICY_USER_CONFIGURE_RDV_NOT_ALLOWED Handle = 0x80310077 FVE_E_POLICY_USER_ENABLE_RDV_NOT_ALLOWED Handle = 0x80310078 FVE_E_POLICY_USER_DISABLE_RDV_NOT_ALLOWED Handle = 0x80310079 FVE_E_POLICY_INVALID_PASSPHRASE_LENGTH Handle = 0x80310080 FVE_E_POLICY_PASSPHRASE_TOO_SIMPLE Handle = 0x80310081 FVE_E_RECOVERY_PARTITION Handle = 0x80310082 FVE_E_POLICY_CONFLICT_FDV_RK_OFF_AUK_ON Handle = 0x80310083 FVE_E_POLICY_CONFLICT_RDV_RK_OFF_AUK_ON Handle = 0x80310084 FVE_E_NON_BITLOCKER_OID Handle = 0x80310085 FVE_E_POLICY_PROHIBITS_SELFSIGNED Handle = 0x80310086 FVE_E_POLICY_CONFLICT_RO_AND_STARTUP_KEY_REQUIRED Handle = 0x80310087 FVE_E_CONV_RECOVERY_FAILED Handle = 0x80310088 FVE_E_VIRTUALIZED_SPACE_TOO_BIG Handle = 0x80310089 FVE_E_POLICY_CONFLICT_OSV_RP_OFF_ADB_ON Handle = 0x80310090 FVE_E_POLICY_CONFLICT_FDV_RP_OFF_ADB_ON Handle = 0x80310091 FVE_E_POLICY_CONFLICT_RDV_RP_OFF_ADB_ON Handle = 0x80310092 FVE_E_NON_BITLOCKER_KU Handle = 0x80310093 FVE_E_PRIVATEKEY_AUTH_FAILED Handle = 0x80310094 FVE_E_REMOVAL_OF_DRA_FAILED Handle = 0x80310095 FVE_E_OPERATION_NOT_SUPPORTED_ON_VISTA_VOLUME Handle = 0x80310096 FVE_E_CANT_LOCK_AUTOUNLOCK_ENABLED_VOLUME Handle = 0x80310097 FVE_E_FIPS_HASH_KDF_NOT_ALLOWED Handle = 0x80310098 FVE_E_ENH_PIN_INVALID Handle = 0x80310099 FVE_E_INVALID_PIN_CHARS Handle = 0x8031009A FVE_E_INVALID_DATUM_TYPE Handle = 0x8031009B FVE_E_EFI_ONLY Handle = 0x8031009C FVE_E_MULTIPLE_NKP_CERTS Handle = 0x8031009D FVE_E_REMOVAL_OF_NKP_FAILED Handle = 0x8031009E FVE_E_INVALID_NKP_CERT Handle = 0x8031009F FVE_E_NO_EXISTING_PIN Handle = 0x803100A0 FVE_E_PROTECTOR_CHANGE_PIN_MISMATCH Handle = 0x803100A1 FVE_E_PIN_PROTECTOR_CHANGE_BY_STD_USER_DISALLOWED Handle = 0x803100A2 FVE_E_PROTECTOR_CHANGE_MAX_PIN_CHANGE_ATTEMPTS_REACHED Handle = 0x803100A3 FVE_E_POLICY_PASSPHRASE_REQUIRES_ASCII Handle = 0x803100A4 FVE_E_FULL_ENCRYPTION_NOT_ALLOWED_ON_TP_STORAGE Handle = 0x803100A5 FVE_E_WIPE_NOT_ALLOWED_ON_TP_STORAGE Handle = 0x803100A6 FVE_E_KEY_LENGTH_NOT_SUPPORTED_BY_EDRIVE Handle = 0x803100A7 FVE_E_NO_EXISTING_PASSPHRASE Handle = 0x803100A8 FVE_E_PROTECTOR_CHANGE_PASSPHRASE_MISMATCH Handle = 0x803100A9 FVE_E_PASSPHRASE_TOO_LONG Handle = 0x803100AA FVE_E_NO_PASSPHRASE_WITH_TPM Handle = 0x803100AB FVE_E_NO_TPM_WITH_PASSPHRASE Handle = 0x803100AC FVE_E_NOT_ALLOWED_ON_CSV_STACK Handle = 0x803100AD FVE_E_NOT_ALLOWED_ON_CLUSTER Handle = 0x803100AE FVE_E_EDRIVE_NO_FAILOVER_TO_SW Handle = 0x803100AF FVE_E_EDRIVE_BAND_IN_USE Handle = 0x803100B0 FVE_E_EDRIVE_DISALLOWED_BY_GP Handle = 0x803100B1 FVE_E_EDRIVE_INCOMPATIBLE_VOLUME Handle = 0x803100B2 FVE_E_NOT_ALLOWED_TO_UPGRADE_WHILE_CONVERTING Handle = 0x803100B3 FVE_E_EDRIVE_DV_NOT_SUPPORTED Handle = 0x803100B4 FVE_E_NO_PREBOOT_KEYBOARD_DETECTED Handle = 0x803100B5 FVE_E_NO_PREBOOT_KEYBOARD_OR_WINRE_DETECTED Handle = 0x803100B6 FVE_E_POLICY_REQUIRES_STARTUP_PIN_ON_TOUCH_DEVICE Handle = 0x803100B7 FVE_E_POLICY_REQUIRES_RECOVERY_PASSWORD_ON_TOUCH_DEVICE Handle = 0x803100B8 FVE_E_WIPE_CANCEL_NOT_APPLICABLE Handle = 0x803100B9 FVE_E_SECUREBOOT_DISABLED Handle = 0x803100BA FVE_E_SECUREBOOT_CONFIGURATION_INVALID Handle = 0x803100BB FVE_E_EDRIVE_DRY_RUN_FAILED Handle = 0x803100BC FVE_E_SHADOW_COPY_PRESENT Handle = 0x803100BD FVE_E_POLICY_INVALID_ENHANCED_BCD_SETTINGS Handle = 0x803100BE FVE_E_EDRIVE_INCOMPATIBLE_FIRMWARE Handle = 0x803100BF FVE_E_PROTECTOR_CHANGE_MAX_PASSPHRASE_CHANGE_ATTEMPTS_REACHED Handle = 0x803100C0 FVE_E_PASSPHRASE_PROTECTOR_CHANGE_BY_STD_USER_DISALLOWED Handle = 0x803100C1 FVE_E_LIVEID_ACCOUNT_SUSPENDED Handle = 0x803100C2 FVE_E_LIVEID_ACCOUNT_BLOCKED Handle = 0x803100C3 FVE_E_NOT_PROVISIONED_ON_ALL_VOLUMES Handle = 0x803100C4 FVE_E_DE_FIXED_DATA_NOT_SUPPORTED Handle = 0x803100C5 FVE_E_DE_HARDWARE_NOT_COMPLIANT Handle = 0x803100C6 FVE_E_DE_WINRE_NOT_CONFIGURED Handle = 0x803100C7 FVE_E_DE_PROTECTION_SUSPENDED Handle = 0x803100C8 FVE_E_DE_OS_VOLUME_NOT_PROTECTED Handle = 0x803100C9 FVE_E_DE_DEVICE_LOCKEDOUT Handle = 0x803100CA FVE_E_DE_PROTECTION_NOT_YET_ENABLED Handle = 0x803100CB FVE_E_INVALID_PIN_CHARS_DETAILED Handle = 0x803100CC FVE_E_DEVICE_LOCKOUT_COUNTER_UNAVAILABLE Handle = 0x803100CD FVE_E_DEVICELOCKOUT_COUNTER_MISMATCH Handle = 0x803100CE FVE_E_BUFFER_TOO_LARGE Handle = 0x803100CF FVE_E_NO_SUCH_CAPABILITY_ON_TARGET Handle = 0x803100D0 FVE_E_DE_PREVENTED_FOR_OS Handle = 0x803100D1 FVE_E_DE_VOLUME_OPTED_OUT Handle = 0x803100D2 FVE_E_DE_VOLUME_NOT_SUPPORTED Handle = 0x803100D3 FVE_E_EOW_NOT_SUPPORTED_IN_VERSION Handle = 0x803100D4 FVE_E_ADBACKUP_NOT_ENABLED Handle = 0x803100D5 FVE_E_VOLUME_EXTEND_PREVENTS_EOW_DECRYPT Handle = 0x803100D6 FVE_E_NOT_DE_VOLUME Handle = 0x803100D7 FVE_E_PROTECTION_CANNOT_BE_DISABLED Handle = 0x803100D8 FVE_E_OSV_KSR_NOT_ALLOWED Handle = 0x803100D9 FVE_E_AD_BACKUP_REQUIRED_POLICY_NOT_SET_OS_DRIVE Handle = 0x803100DA FVE_E_AD_BACKUP_REQUIRED_POLICY_NOT_SET_FIXED_DRIVE Handle = 0x803100DB FVE_E_AD_BACKUP_REQUIRED_POLICY_NOT_SET_REMOVABLE_DRIVE Handle = 0x803100DC FVE_E_KEY_ROTATION_NOT_SUPPORTED Handle = 0x803100DD FVE_E_EXECUTE_REQUEST_SENT_TOO_SOON Handle = 0x803100DE FVE_E_KEY_ROTATION_NOT_ENABLED Handle = 0x803100DF FVE_E_DEVICE_NOT_JOINED Handle = 0x803100E0 FWP_E_CALLOUT_NOT_FOUND Handle = 0x80320001 FWP_E_CONDITION_NOT_FOUND Handle = 0x80320002 FWP_E_FILTER_NOT_FOUND Handle = 0x80320003 FWP_E_LAYER_NOT_FOUND Handle = 0x80320004 FWP_E_PROVIDER_NOT_FOUND Handle = 0x80320005 FWP_E_PROVIDER_CONTEXT_NOT_FOUND Handle = 0x80320006 FWP_E_SUBLAYER_NOT_FOUND Handle = 0x80320007 FWP_E_NOT_FOUND Handle = 0x80320008 FWP_E_ALREADY_EXISTS Handle = 0x80320009 FWP_E_IN_USE Handle = 0x8032000A FWP_E_DYNAMIC_SESSION_IN_PROGRESS Handle = 0x8032000B FWP_E_WRONG_SESSION Handle = 0x8032000C FWP_E_NO_TXN_IN_PROGRESS Handle = 0x8032000D FWP_E_TXN_IN_PROGRESS Handle = 0x8032000E FWP_E_TXN_ABORTED Handle = 0x8032000F FWP_E_SESSION_ABORTED Handle = 0x80320010 FWP_E_INCOMPATIBLE_TXN Handle = 0x80320011 FWP_E_TIMEOUT Handle = 0x80320012 FWP_E_NET_EVENTS_DISABLED Handle = 0x80320013 FWP_E_INCOMPATIBLE_LAYER Handle = 0x80320014 FWP_E_KM_CLIENTS_ONLY Handle = 0x80320015 FWP_E_LIFETIME_MISMATCH Handle = 0x80320016 FWP_E_BUILTIN_OBJECT Handle = 0x80320017 FWP_E_TOO_MANY_CALLOUTS Handle = 0x80320018 FWP_E_NOTIFICATION_DROPPED Handle = 0x80320019 FWP_E_TRAFFIC_MISMATCH Handle = 0x8032001A FWP_E_INCOMPATIBLE_SA_STATE Handle = 0x8032001B FWP_E_NULL_POINTER Handle = 0x8032001C FWP_E_INVALID_ENUMERATOR Handle = 0x8032001D FWP_E_INVALID_FLAGS Handle = 0x8032001E FWP_E_INVALID_NET_MASK Handle = 0x8032001F FWP_E_INVALID_RANGE Handle = 0x80320020 FWP_E_INVALID_INTERVAL Handle = 0x80320021 FWP_E_ZERO_LENGTH_ARRAY Handle = 0x80320022 FWP_E_NULL_DISPLAY_NAME Handle = 0x80320023 FWP_E_INVALID_ACTION_TYPE Handle = 0x80320024 FWP_E_INVALID_WEIGHT Handle = 0x80320025 FWP_E_MATCH_TYPE_MISMATCH Handle = 0x80320026 FWP_E_TYPE_MISMATCH Handle = 0x80320027 FWP_E_OUT_OF_BOUNDS Handle = 0x80320028 FWP_E_RESERVED Handle = 0x80320029 FWP_E_DUPLICATE_CONDITION Handle = 0x8032002A FWP_E_DUPLICATE_KEYMOD Handle = 0x8032002B FWP_E_ACTION_INCOMPATIBLE_WITH_LAYER Handle = 0x8032002C FWP_E_ACTION_INCOMPATIBLE_WITH_SUBLAYER Handle = 0x8032002D FWP_E_CONTEXT_INCOMPATIBLE_WITH_LAYER Handle = 0x8032002E FWP_E_CONTEXT_INCOMPATIBLE_WITH_CALLOUT Handle = 0x8032002F FWP_E_INCOMPATIBLE_AUTH_METHOD Handle = 0x80320030 FWP_E_INCOMPATIBLE_DH_GROUP Handle = 0x80320031 FWP_E_EM_NOT_SUPPORTED Handle = 0x80320032 FWP_E_NEVER_MATCH Handle = 0x80320033 FWP_E_PROVIDER_CONTEXT_MISMATCH Handle = 0x80320034 FWP_E_INVALID_PARAMETER Handle = 0x80320035 FWP_E_TOO_MANY_SUBLAYERS Handle = 0x80320036 FWP_E_CALLOUT_NOTIFICATION_FAILED Handle = 0x80320037 FWP_E_INVALID_AUTH_TRANSFORM Handle = 0x80320038 FWP_E_INVALID_CIPHER_TRANSFORM Handle = 0x80320039 FWP_E_INCOMPATIBLE_CIPHER_TRANSFORM Handle = 0x8032003A FWP_E_INVALID_TRANSFORM_COMBINATION Handle = 0x8032003B FWP_E_DUPLICATE_AUTH_METHOD Handle = 0x8032003C FWP_E_INVALID_TUNNEL_ENDPOINT Handle = 0x8032003D FWP_E_L2_DRIVER_NOT_READY Handle = 0x8032003E FWP_E_KEY_DICTATOR_ALREADY_REGISTERED Handle = 0x8032003F FWP_E_KEY_DICTATION_INVALID_KEYING_MATERIAL Handle = 0x80320040 FWP_E_CONNECTIONS_DISABLED Handle = 0x80320041 FWP_E_INVALID_DNS_NAME Handle = 0x80320042 FWP_E_STILL_ON Handle = 0x80320043 FWP_E_IKEEXT_NOT_RUNNING Handle = 0x80320044 FWP_E_DROP_NOICMP Handle = 0x80320104 WS_S_ASYNC Handle = 0x003D0000 WS_S_END Handle = 0x003D0001 WS_E_INVALID_FORMAT Handle = 0x803D0000 WS_E_OBJECT_FAULTED Handle = 0x803D0001 WS_E_NUMERIC_OVERFLOW Handle = 0x803D0002 WS_E_INVALID_OPERATION Handle = 0x803D0003 WS_E_OPERATION_ABORTED Handle = 0x803D0004 WS_E_ENDPOINT_ACCESS_DENIED Handle = 0x803D0005 WS_E_OPERATION_TIMED_OUT Handle = 0x803D0006 WS_E_OPERATION_ABANDONED Handle = 0x803D0007 WS_E_QUOTA_EXCEEDED Handle = 0x803D0008 WS_E_NO_TRANSLATION_AVAILABLE Handle = 0x803D0009 WS_E_SECURITY_VERIFICATION_FAILURE Handle = 0x803D000A WS_E_ADDRESS_IN_USE Handle = 0x803D000B WS_E_ADDRESS_NOT_AVAILABLE Handle = 0x803D000C WS_E_ENDPOINT_NOT_FOUND Handle = 0x803D000D WS_E_ENDPOINT_NOT_AVAILABLE Handle = 0x803D000E WS_E_ENDPOINT_FAILURE Handle = 0x803D000F WS_E_ENDPOINT_UNREACHABLE Handle = 0x803D0010 WS_E_ENDPOINT_ACTION_NOT_SUPPORTED Handle = 0x803D0011 WS_E_ENDPOINT_TOO_BUSY Handle = 0x803D0012 WS_E_ENDPOINT_FAULT_RECEIVED Handle = 0x803D0013 WS_E_ENDPOINT_DISCONNECTED Handle = 0x803D0014 WS_E_PROXY_FAILURE Handle = 0x803D0015 WS_E_PROXY_ACCESS_DENIED Handle = 0x803D0016 WS_E_NOT_SUPPORTED Handle = 0x803D0017 WS_E_PROXY_REQUIRES_BASIC_AUTH Handle = 0x803D0018 WS_E_PROXY_REQUIRES_DIGEST_AUTH Handle = 0x803D0019 WS_E_PROXY_REQUIRES_NTLM_AUTH Handle = 0x803D001A WS_E_PROXY_REQUIRES_NEGOTIATE_AUTH Handle = 0x803D001B WS_E_SERVER_REQUIRES_BASIC_AUTH Handle = 0x803D001C WS_E_SERVER_REQUIRES_DIGEST_AUTH Handle = 0x803D001D WS_E_SERVER_REQUIRES_NTLM_AUTH Handle = 0x803D001E WS_E_SERVER_REQUIRES_NEGOTIATE_AUTH Handle = 0x803D001F WS_E_INVALID_ENDPOINT_URL Handle = 0x803D0020 WS_E_OTHER Handle = 0x803D0021 WS_E_SECURITY_TOKEN_EXPIRED Handle = 0x803D0022 WS_E_SECURITY_SYSTEM_FAILURE Handle = 0x803D0023 ERROR_NDIS_INTERFACE_CLOSING syscall.Errno = 0x80340002 ERROR_NDIS_BAD_VERSION syscall.Errno = 0x80340004 ERROR_NDIS_BAD_CHARACTERISTICS syscall.Errno = 0x80340005 ERROR_NDIS_ADAPTER_NOT_FOUND syscall.Errno = 0x80340006 ERROR_NDIS_OPEN_FAILED syscall.Errno = 0x80340007 ERROR_NDIS_DEVICE_FAILED syscall.Errno = 0x80340008 ERROR_NDIS_MULTICAST_FULL syscall.Errno = 0x80340009 ERROR_NDIS_MULTICAST_EXISTS syscall.Errno = 0x8034000A ERROR_NDIS_MULTICAST_NOT_FOUND syscall.Errno = 0x8034000B ERROR_NDIS_REQUEST_ABORTED syscall.Errno = 0x8034000C ERROR_NDIS_RESET_IN_PROGRESS syscall.Errno = 0x8034000D ERROR_NDIS_NOT_SUPPORTED syscall.Errno = 0x803400BB ERROR_NDIS_INVALID_PACKET syscall.Errno = 0x8034000F ERROR_NDIS_ADAPTER_NOT_READY syscall.Errno = 0x80340011 ERROR_NDIS_INVALID_LENGTH syscall.Errno = 0x80340014 ERROR_NDIS_INVALID_DATA syscall.Errno = 0x80340015 ERROR_NDIS_BUFFER_TOO_SHORT syscall.Errno = 0x80340016 ERROR_NDIS_INVALID_OID syscall.Errno = 0x80340017 ERROR_NDIS_ADAPTER_REMOVED syscall.Errno = 0x80340018 ERROR_NDIS_UNSUPPORTED_MEDIA syscall.Errno = 0x80340019 ERROR_NDIS_GROUP_ADDRESS_IN_USE syscall.Errno = 0x8034001A ERROR_NDIS_FILE_NOT_FOUND syscall.Errno = 0x8034001B ERROR_NDIS_ERROR_READING_FILE syscall.Errno = 0x8034001C ERROR_NDIS_ALREADY_MAPPED syscall.Errno = 0x8034001D ERROR_NDIS_RESOURCE_CONFLICT syscall.Errno = 0x8034001E ERROR_NDIS_MEDIA_DISCONNECTED syscall.Errno = 0x8034001F ERROR_NDIS_INVALID_ADDRESS syscall.Errno = 0x80340022 ERROR_NDIS_INVALID_DEVICE_REQUEST syscall.Errno = 0x80340010 ERROR_NDIS_PAUSED syscall.Errno = 0x8034002A ERROR_NDIS_INTERFACE_NOT_FOUND syscall.Errno = 0x8034002B ERROR_NDIS_UNSUPPORTED_REVISION syscall.Errno = 0x8034002C ERROR_NDIS_INVALID_PORT syscall.Errno = 0x8034002D ERROR_NDIS_INVALID_PORT_STATE syscall.Errno = 0x8034002E ERROR_NDIS_LOW_POWER_STATE syscall.Errno = 0x8034002F ERROR_NDIS_REINIT_REQUIRED syscall.Errno = 0x80340030 ERROR_NDIS_NO_QUEUES syscall.Errno = 0x80340031 ERROR_NDIS_DOT11_AUTO_CONFIG_ENABLED syscall.Errno = 0x80342000 ERROR_NDIS_DOT11_MEDIA_IN_USE syscall.Errno = 0x80342001 ERROR_NDIS_DOT11_POWER_STATE_INVALID syscall.Errno = 0x80342002 ERROR_NDIS_PM_WOL_PATTERN_LIST_FULL syscall.Errno = 0x80342003 ERROR_NDIS_PM_PROTOCOL_OFFLOAD_LIST_FULL syscall.Errno = 0x80342004 ERROR_NDIS_DOT11_AP_CHANNEL_CURRENTLY_NOT_AVAILABLE syscall.Errno = 0x80342005 ERROR_NDIS_DOT11_AP_BAND_CURRENTLY_NOT_AVAILABLE syscall.Errno = 0x80342006 ERROR_NDIS_DOT11_AP_CHANNEL_NOT_ALLOWED syscall.Errno = 0x80342007 ERROR_NDIS_DOT11_AP_BAND_NOT_ALLOWED syscall.Errno = 0x80342008 ERROR_NDIS_INDICATION_REQUIRED syscall.Errno = 0x00340001 ERROR_NDIS_OFFLOAD_POLICY syscall.Errno = 0xC034100F ERROR_NDIS_OFFLOAD_CONNECTION_REJECTED syscall.Errno = 0xC0341012 ERROR_NDIS_OFFLOAD_PATH_REJECTED syscall.Errno = 0xC0341013 ERROR_HV_INVALID_HYPERCALL_CODE syscall.Errno = 0xC0350002 ERROR_HV_INVALID_HYPERCALL_INPUT syscall.Errno = 0xC0350003 ERROR_HV_INVALID_ALIGNMENT syscall.Errno = 0xC0350004 ERROR_HV_INVALID_PARAMETER syscall.Errno = 0xC0350005 ERROR_HV_ACCESS_DENIED syscall.Errno = 0xC0350006 ERROR_HV_INVALID_PARTITION_STATE syscall.Errno = 0xC0350007 ERROR_HV_OPERATION_DENIED syscall.Errno = 0xC0350008 ERROR_HV_UNKNOWN_PROPERTY syscall.Errno = 0xC0350009 ERROR_HV_PROPERTY_VALUE_OUT_OF_RANGE syscall.Errno = 0xC035000A ERROR_HV_INSUFFICIENT_MEMORY syscall.Errno = 0xC035000B ERROR_HV_PARTITION_TOO_DEEP syscall.Errno = 0xC035000C ERROR_HV_INVALID_PARTITION_ID syscall.Errno = 0xC035000D ERROR_HV_INVALID_VP_INDEX syscall.Errno = 0xC035000E ERROR_HV_INVALID_PORT_ID syscall.Errno = 0xC0350011 ERROR_HV_INVALID_CONNECTION_ID syscall.Errno = 0xC0350012 ERROR_HV_INSUFFICIENT_BUFFERS syscall.Errno = 0xC0350013 ERROR_HV_NOT_ACKNOWLEDGED syscall.Errno = 0xC0350014 ERROR_HV_INVALID_VP_STATE syscall.Errno = 0xC0350015 ERROR_HV_ACKNOWLEDGED syscall.Errno = 0xC0350016 ERROR_HV_INVALID_SAVE_RESTORE_STATE syscall.Errno = 0xC0350017 ERROR_HV_INVALID_SYNIC_STATE syscall.Errno = 0xC0350018 ERROR_HV_OBJECT_IN_USE syscall.Errno = 0xC0350019 ERROR_HV_INVALID_PROXIMITY_DOMAIN_INFO syscall.Errno = 0xC035001A ERROR_HV_NO_DATA syscall.Errno = 0xC035001B ERROR_HV_INACTIVE syscall.Errno = 0xC035001C ERROR_HV_NO_RESOURCES syscall.Errno = 0xC035001D ERROR_HV_FEATURE_UNAVAILABLE syscall.Errno = 0xC035001E ERROR_HV_INSUFFICIENT_BUFFER syscall.Errno = 0xC0350033 ERROR_HV_INSUFFICIENT_DEVICE_DOMAINS syscall.Errno = 0xC0350038 ERROR_HV_CPUID_FEATURE_VALIDATION syscall.Errno = 0xC035003C ERROR_HV_CPUID_XSAVE_FEATURE_VALIDATION syscall.Errno = 0xC035003D ERROR_HV_PROCESSOR_STARTUP_TIMEOUT syscall.Errno = 0xC035003E ERROR_HV_SMX_ENABLED syscall.Errno = 0xC035003F ERROR_HV_INVALID_LP_INDEX syscall.Errno = 0xC0350041 ERROR_HV_INVALID_REGISTER_VALUE syscall.Errno = 0xC0350050 ERROR_HV_INVALID_VTL_STATE syscall.Errno = 0xC0350051 ERROR_HV_NX_NOT_DETECTED syscall.Errno = 0xC0350055 ERROR_HV_INVALID_DEVICE_ID syscall.Errno = 0xC0350057 ERROR_HV_INVALID_DEVICE_STATE syscall.Errno = 0xC0350058 ERROR_HV_PENDING_PAGE_REQUESTS syscall.Errno = 0x00350059 ERROR_HV_PAGE_REQUEST_INVALID syscall.Errno = 0xC0350060 ERROR_HV_INVALID_CPU_GROUP_ID syscall.Errno = 0xC035006F ERROR_HV_INVALID_CPU_GROUP_STATE syscall.Errno = 0xC0350070 ERROR_HV_OPERATION_FAILED syscall.Errno = 0xC0350071 ERROR_HV_NOT_ALLOWED_WITH_NESTED_VIRT_ACTIVE syscall.Errno = 0xC0350072 ERROR_HV_INSUFFICIENT_ROOT_MEMORY syscall.Errno = 0xC0350073 ERROR_HV_NOT_PRESENT syscall.Errno = 0xC0351000 ERROR_VID_DUPLICATE_HANDLER syscall.Errno = 0xC0370001 ERROR_VID_TOO_MANY_HANDLERS syscall.Errno = 0xC0370002 ERROR_VID_QUEUE_FULL syscall.Errno = 0xC0370003 ERROR_VID_HANDLER_NOT_PRESENT syscall.Errno = 0xC0370004 ERROR_VID_INVALID_OBJECT_NAME syscall.Errno = 0xC0370005 ERROR_VID_PARTITION_NAME_TOO_LONG syscall.Errno = 0xC0370006 ERROR_VID_MESSAGE_QUEUE_NAME_TOO_LONG syscall.Errno = 0xC0370007 ERROR_VID_PARTITION_ALREADY_EXISTS syscall.Errno = 0xC0370008 ERROR_VID_PARTITION_DOES_NOT_EXIST syscall.Errno = 0xC0370009 ERROR_VID_PARTITION_NAME_NOT_FOUND syscall.Errno = 0xC037000A ERROR_VID_MESSAGE_QUEUE_ALREADY_EXISTS syscall.Errno = 0xC037000B ERROR_VID_EXCEEDED_MBP_ENTRY_MAP_LIMIT syscall.Errno = 0xC037000C ERROR_VID_MB_STILL_REFERENCED syscall.Errno = 0xC037000D ERROR_VID_CHILD_GPA_PAGE_SET_CORRUPTED syscall.Errno = 0xC037000E ERROR_VID_INVALID_NUMA_SETTINGS syscall.Errno = 0xC037000F ERROR_VID_INVALID_NUMA_NODE_INDEX syscall.Errno = 0xC0370010 ERROR_VID_NOTIFICATION_QUEUE_ALREADY_ASSOCIATED syscall.Errno = 0xC0370011 ERROR_VID_INVALID_MEMORY_BLOCK_HANDLE syscall.Errno = 0xC0370012 ERROR_VID_PAGE_RANGE_OVERFLOW syscall.Errno = 0xC0370013 ERROR_VID_INVALID_MESSAGE_QUEUE_HANDLE syscall.Errno = 0xC0370014 ERROR_VID_INVALID_GPA_RANGE_HANDLE syscall.Errno = 0xC0370015 ERROR_VID_NO_MEMORY_BLOCK_NOTIFICATION_QUEUE syscall.Errno = 0xC0370016 ERROR_VID_MEMORY_BLOCK_LOCK_COUNT_EXCEEDED syscall.Errno = 0xC0370017 ERROR_VID_INVALID_PPM_HANDLE syscall.Errno = 0xC0370018 ERROR_VID_MBPS_ARE_LOCKED syscall.Errno = 0xC0370019 ERROR_VID_MESSAGE_QUEUE_CLOSED syscall.Errno = 0xC037001A ERROR_VID_VIRTUAL_PROCESSOR_LIMIT_EXCEEDED syscall.Errno = 0xC037001B ERROR_VID_STOP_PENDING syscall.Errno = 0xC037001C ERROR_VID_INVALID_PROCESSOR_STATE syscall.Errno = 0xC037001D ERROR_VID_EXCEEDED_KM_CONTEXT_COUNT_LIMIT syscall.Errno = 0xC037001E ERROR_VID_KM_INTERFACE_ALREADY_INITIALIZED syscall.Errno = 0xC037001F ERROR_VID_MB_PROPERTY_ALREADY_SET_RESET syscall.Errno = 0xC0370020 ERROR_VID_MMIO_RANGE_DESTROYED syscall.Errno = 0xC0370021 ERROR_VID_INVALID_CHILD_GPA_PAGE_SET syscall.Errno = 0xC0370022 ERROR_VID_RESERVE_PAGE_SET_IS_BEING_USED syscall.Errno = 0xC0370023 ERROR_VID_RESERVE_PAGE_SET_TOO_SMALL syscall.Errno = 0xC0370024 ERROR_VID_MBP_ALREADY_LOCKED_USING_RESERVED_PAGE syscall.Errno = 0xC0370025 ERROR_VID_MBP_COUNT_EXCEEDED_LIMIT syscall.Errno = 0xC0370026 ERROR_VID_SAVED_STATE_CORRUPT syscall.Errno = 0xC0370027 ERROR_VID_SAVED_STATE_UNRECOGNIZED_ITEM syscall.Errno = 0xC0370028 ERROR_VID_SAVED_STATE_INCOMPATIBLE syscall.Errno = 0xC0370029 ERROR_VID_VTL_ACCESS_DENIED syscall.Errno = 0xC037002A ERROR_VMCOMPUTE_TERMINATED_DURING_START syscall.Errno = 0xC0370100 ERROR_VMCOMPUTE_IMAGE_MISMATCH syscall.Errno = 0xC0370101 ERROR_VMCOMPUTE_HYPERV_NOT_INSTALLED syscall.Errno = 0xC0370102 ERROR_VMCOMPUTE_OPERATION_PENDING syscall.Errno = 0xC0370103 ERROR_VMCOMPUTE_TOO_MANY_NOTIFICATIONS syscall.Errno = 0xC0370104 ERROR_VMCOMPUTE_INVALID_STATE syscall.Errno = 0xC0370105 ERROR_VMCOMPUTE_UNEXPECTED_EXIT syscall.Errno = 0xC0370106 ERROR_VMCOMPUTE_TERMINATED syscall.Errno = 0xC0370107 ERROR_VMCOMPUTE_CONNECT_FAILED syscall.Errno = 0xC0370108 ERROR_VMCOMPUTE_TIMEOUT syscall.Errno = 0xC0370109 ERROR_VMCOMPUTE_CONNECTION_CLOSED syscall.Errno = 0xC037010A ERROR_VMCOMPUTE_UNKNOWN_MESSAGE syscall.Errno = 0xC037010B ERROR_VMCOMPUTE_UNSUPPORTED_PROTOCOL_VERSION syscall.Errno = 0xC037010C ERROR_VMCOMPUTE_INVALID_JSON syscall.Errno = 0xC037010D ERROR_VMCOMPUTE_SYSTEM_NOT_FOUND syscall.Errno = 0xC037010E ERROR_VMCOMPUTE_SYSTEM_ALREADY_EXISTS syscall.Errno = 0xC037010F ERROR_VMCOMPUTE_SYSTEM_ALREADY_STOPPED syscall.Errno = 0xC0370110 ERROR_VMCOMPUTE_PROTOCOL_ERROR syscall.Errno = 0xC0370111 ERROR_VMCOMPUTE_INVALID_LAYER syscall.Errno = 0xC0370112 ERROR_VMCOMPUTE_WINDOWS_INSIDER_REQUIRED syscall.Errno = 0xC0370113 HCS_E_TERMINATED_DURING_START Handle = 0x80370100 HCS_E_IMAGE_MISMATCH Handle = 0x80370101 HCS_E_HYPERV_NOT_INSTALLED Handle = 0x80370102 HCS_E_INVALID_STATE Handle = 0x80370105 HCS_E_UNEXPECTED_EXIT Handle = 0x80370106 HCS_E_TERMINATED Handle = 0x80370107 HCS_E_CONNECT_FAILED Handle = 0x80370108 HCS_E_CONNECTION_TIMEOUT Handle = 0x80370109 HCS_E_CONNECTION_CLOSED Handle = 0x8037010A HCS_E_UNKNOWN_MESSAGE Handle = 0x8037010B HCS_E_UNSUPPORTED_PROTOCOL_VERSION Handle = 0x8037010C HCS_E_INVALID_JSON Handle = 0x8037010D HCS_E_SYSTEM_NOT_FOUND Handle = 0x8037010E HCS_E_SYSTEM_ALREADY_EXISTS Handle = 0x8037010F HCS_E_SYSTEM_ALREADY_STOPPED Handle = 0x80370110 HCS_E_PROTOCOL_ERROR Handle = 0x80370111 HCS_E_INVALID_LAYER Handle = 0x80370112 HCS_E_WINDOWS_INSIDER_REQUIRED Handle = 0x80370113 HCS_E_SERVICE_NOT_AVAILABLE Handle = 0x80370114 HCS_E_OPERATION_NOT_STARTED Handle = 0x80370115 HCS_E_OPERATION_ALREADY_STARTED Handle = 0x80370116 HCS_E_OPERATION_PENDING Handle = 0x80370117 HCS_E_OPERATION_TIMEOUT Handle = 0x80370118 HCS_E_OPERATION_SYSTEM_CALLBACK_ALREADY_SET Handle = 0x80370119 HCS_E_OPERATION_RESULT_ALLOCATION_FAILED Handle = 0x8037011A HCS_E_ACCESS_DENIED Handle = 0x8037011B HCS_E_GUEST_CRITICAL_ERROR Handle = 0x8037011C ERROR_VNET_VIRTUAL_SWITCH_NAME_NOT_FOUND syscall.Errno = 0xC0370200 ERROR_VID_REMOTE_NODE_PARENT_GPA_PAGES_USED syscall.Errno = 0x80370001 WHV_E_UNKNOWN_CAPABILITY Handle = 0x80370300 WHV_E_INSUFFICIENT_BUFFER Handle = 0x80370301 WHV_E_UNKNOWN_PROPERTY Handle = 0x80370302 WHV_E_UNSUPPORTED_HYPERVISOR_CONFIG Handle = 0x80370303 WHV_E_INVALID_PARTITION_CONFIG Handle = 0x80370304 WHV_E_GPA_RANGE_NOT_FOUND Handle = 0x80370305 WHV_E_VP_ALREADY_EXISTS Handle = 0x80370306 WHV_E_VP_DOES_NOT_EXIST Handle = 0x80370307 WHV_E_INVALID_VP_STATE Handle = 0x80370308 WHV_E_INVALID_VP_REGISTER_NAME Handle = 0x80370309 ERROR_VSMB_SAVED_STATE_FILE_NOT_FOUND syscall.Errno = 0xC0370400 ERROR_VSMB_SAVED_STATE_CORRUPT syscall.Errno = 0xC0370401 ERROR_VOLMGR_INCOMPLETE_REGENERATION syscall.Errno = 0x80380001 ERROR_VOLMGR_INCOMPLETE_DISK_MIGRATION syscall.Errno = 0x80380002 ERROR_VOLMGR_DATABASE_FULL syscall.Errno = 0xC0380001 ERROR_VOLMGR_DISK_CONFIGURATION_CORRUPTED syscall.Errno = 0xC0380002 ERROR_VOLMGR_DISK_CONFIGURATION_NOT_IN_SYNC syscall.Errno = 0xC0380003 ERROR_VOLMGR_PACK_CONFIG_UPDATE_FAILED syscall.Errno = 0xC0380004 ERROR_VOLMGR_DISK_CONTAINS_NON_SIMPLE_VOLUME syscall.Errno = 0xC0380005 ERROR_VOLMGR_DISK_DUPLICATE syscall.Errno = 0xC0380006 ERROR_VOLMGR_DISK_DYNAMIC syscall.Errno = 0xC0380007 ERROR_VOLMGR_DISK_ID_INVALID syscall.Errno = 0xC0380008 ERROR_VOLMGR_DISK_INVALID syscall.Errno = 0xC0380009 ERROR_VOLMGR_DISK_LAST_VOTER syscall.Errno = 0xC038000A ERROR_VOLMGR_DISK_LAYOUT_INVALID syscall.Errno = 0xC038000B ERROR_VOLMGR_DISK_LAYOUT_NON_BASIC_BETWEEN_BASIC_PARTITIONS syscall.Errno = 0xC038000C ERROR_VOLMGR_DISK_LAYOUT_NOT_CYLINDER_ALIGNED syscall.Errno = 0xC038000D ERROR_VOLMGR_DISK_LAYOUT_PARTITIONS_TOO_SMALL syscall.Errno = 0xC038000E ERROR_VOLMGR_DISK_LAYOUT_PRIMARY_BETWEEN_LOGICAL_PARTITIONS syscall.Errno = 0xC038000F ERROR_VOLMGR_DISK_LAYOUT_TOO_MANY_PARTITIONS syscall.Errno = 0xC0380010 ERROR_VOLMGR_DISK_MISSING syscall.Errno = 0xC0380011 ERROR_VOLMGR_DISK_NOT_EMPTY syscall.Errno = 0xC0380012 ERROR_VOLMGR_DISK_NOT_ENOUGH_SPACE syscall.Errno = 0xC0380013 ERROR_VOLMGR_DISK_REVECTORING_FAILED syscall.Errno = 0xC0380014 ERROR_VOLMGR_DISK_SECTOR_SIZE_INVALID syscall.Errno = 0xC0380015 ERROR_VOLMGR_DISK_SET_NOT_CONTAINED syscall.Errno = 0xC0380016 ERROR_VOLMGR_DISK_USED_BY_MULTIPLE_MEMBERS syscall.Errno = 0xC0380017 ERROR_VOLMGR_DISK_USED_BY_MULTIPLE_PLEXES syscall.Errno = 0xC0380018 ERROR_VOLMGR_DYNAMIC_DISK_NOT_SUPPORTED syscall.Errno = 0xC0380019 ERROR_VOLMGR_EXTENT_ALREADY_USED syscall.Errno = 0xC038001A ERROR_VOLMGR_EXTENT_NOT_CONTIGUOUS syscall.Errno = 0xC038001B ERROR_VOLMGR_EXTENT_NOT_IN_PUBLIC_REGION syscall.Errno = 0xC038001C ERROR_VOLMGR_EXTENT_NOT_SECTOR_ALIGNED syscall.Errno = 0xC038001D ERROR_VOLMGR_EXTENT_OVERLAPS_EBR_PARTITION syscall.Errno = 0xC038001E ERROR_VOLMGR_EXTENT_VOLUME_LENGTHS_DO_NOT_MATCH syscall.Errno = 0xC038001F ERROR_VOLMGR_FAULT_TOLERANT_NOT_SUPPORTED syscall.Errno = 0xC0380020 ERROR_VOLMGR_INTERLEAVE_LENGTH_INVALID syscall.Errno = 0xC0380021 ERROR_VOLMGR_MAXIMUM_REGISTERED_USERS syscall.Errno = 0xC0380022 ERROR_VOLMGR_MEMBER_IN_SYNC syscall.Errno = 0xC0380023 ERROR_VOLMGR_MEMBER_INDEX_DUPLICATE syscall.Errno = 0xC0380024 ERROR_VOLMGR_MEMBER_INDEX_INVALID syscall.Errno = 0xC0380025 ERROR_VOLMGR_MEMBER_MISSING syscall.Errno = 0xC0380026 ERROR_VOLMGR_MEMBER_NOT_DETACHED syscall.Errno = 0xC0380027 ERROR_VOLMGR_MEMBER_REGENERATING syscall.Errno = 0xC0380028 ERROR_VOLMGR_ALL_DISKS_FAILED syscall.Errno = 0xC0380029 ERROR_VOLMGR_NO_REGISTERED_USERS syscall.Errno = 0xC038002A ERROR_VOLMGR_NO_SUCH_USER syscall.Errno = 0xC038002B ERROR_VOLMGR_NOTIFICATION_RESET syscall.Errno = 0xC038002C ERROR_VOLMGR_NUMBER_OF_MEMBERS_INVALID syscall.Errno = 0xC038002D ERROR_VOLMGR_NUMBER_OF_PLEXES_INVALID syscall.Errno = 0xC038002E ERROR_VOLMGR_PACK_DUPLICATE syscall.Errno = 0xC038002F ERROR_VOLMGR_PACK_ID_INVALID syscall.Errno = 0xC0380030 ERROR_VOLMGR_PACK_INVALID syscall.Errno = 0xC0380031 ERROR_VOLMGR_PACK_NAME_INVALID syscall.Errno = 0xC0380032 ERROR_VOLMGR_PACK_OFFLINE syscall.Errno = 0xC0380033 ERROR_VOLMGR_PACK_HAS_QUORUM syscall.Errno = 0xC0380034 ERROR_VOLMGR_PACK_WITHOUT_QUORUM syscall.Errno = 0xC0380035 ERROR_VOLMGR_PARTITION_STYLE_INVALID syscall.Errno = 0xC0380036 ERROR_VOLMGR_PARTITION_UPDATE_FAILED syscall.Errno = 0xC0380037 ERROR_VOLMGR_PLEX_IN_SYNC syscall.Errno = 0xC0380038 ERROR_VOLMGR_PLEX_INDEX_DUPLICATE syscall.Errno = 0xC0380039 ERROR_VOLMGR_PLEX_INDEX_INVALID syscall.Errno = 0xC038003A ERROR_VOLMGR_PLEX_LAST_ACTIVE syscall.Errno = 0xC038003B ERROR_VOLMGR_PLEX_MISSING syscall.Errno = 0xC038003C ERROR_VOLMGR_PLEX_REGENERATING syscall.Errno = 0xC038003D ERROR_VOLMGR_PLEX_TYPE_INVALID syscall.Errno = 0xC038003E ERROR_VOLMGR_PLEX_NOT_RAID5 syscall.Errno = 0xC038003F ERROR_VOLMGR_PLEX_NOT_SIMPLE syscall.Errno = 0xC0380040 ERROR_VOLMGR_STRUCTURE_SIZE_INVALID syscall.Errno = 0xC0380041 ERROR_VOLMGR_TOO_MANY_NOTIFICATION_REQUESTS syscall.Errno = 0xC0380042 ERROR_VOLMGR_TRANSACTION_IN_PROGRESS syscall.Errno = 0xC0380043 ERROR_VOLMGR_UNEXPECTED_DISK_LAYOUT_CHANGE syscall.Errno = 0xC0380044 ERROR_VOLMGR_VOLUME_CONTAINS_MISSING_DISK syscall.Errno = 0xC0380045 ERROR_VOLMGR_VOLUME_ID_INVALID syscall.Errno = 0xC0380046 ERROR_VOLMGR_VOLUME_LENGTH_INVALID syscall.Errno = 0xC0380047 ERROR_VOLMGR_VOLUME_LENGTH_NOT_SECTOR_SIZE_MULTIPLE syscall.Errno = 0xC0380048 ERROR_VOLMGR_VOLUME_NOT_MIRRORED syscall.Errno = 0xC0380049 ERROR_VOLMGR_VOLUME_NOT_RETAINED syscall.Errno = 0xC038004A ERROR_VOLMGR_VOLUME_OFFLINE syscall.Errno = 0xC038004B ERROR_VOLMGR_VOLUME_RETAINED syscall.Errno = 0xC038004C ERROR_VOLMGR_NUMBER_OF_EXTENTS_INVALID syscall.Errno = 0xC038004D ERROR_VOLMGR_DIFFERENT_SECTOR_SIZE syscall.Errno = 0xC038004E ERROR_VOLMGR_BAD_BOOT_DISK syscall.Errno = 0xC038004F ERROR_VOLMGR_PACK_CONFIG_OFFLINE syscall.Errno = 0xC0380050 ERROR_VOLMGR_PACK_CONFIG_ONLINE syscall.Errno = 0xC0380051 ERROR_VOLMGR_NOT_PRIMARY_PACK syscall.Errno = 0xC0380052 ERROR_VOLMGR_PACK_LOG_UPDATE_FAILED syscall.Errno = 0xC0380053 ERROR_VOLMGR_NUMBER_OF_DISKS_IN_PLEX_INVALID syscall.Errno = 0xC0380054 ERROR_VOLMGR_NUMBER_OF_DISKS_IN_MEMBER_INVALID syscall.Errno = 0xC0380055 ERROR_VOLMGR_VOLUME_MIRRORED syscall.Errno = 0xC0380056 ERROR_VOLMGR_PLEX_NOT_SIMPLE_SPANNED syscall.Errno = 0xC0380057 ERROR_VOLMGR_NO_VALID_LOG_COPIES syscall.Errno = 0xC0380058 ERROR_VOLMGR_PRIMARY_PACK_PRESENT syscall.Errno = 0xC0380059 ERROR_VOLMGR_NUMBER_OF_DISKS_INVALID syscall.Errno = 0xC038005A ERROR_VOLMGR_MIRROR_NOT_SUPPORTED syscall.Errno = 0xC038005B ERROR_VOLMGR_RAID5_NOT_SUPPORTED syscall.Errno = 0xC038005C ERROR_BCD_NOT_ALL_ENTRIES_IMPORTED syscall.Errno = 0x80390001 ERROR_BCD_TOO_MANY_ELEMENTS syscall.Errno = 0xC0390002 ERROR_BCD_NOT_ALL_ENTRIES_SYNCHRONIZED syscall.Errno = 0x80390003 ERROR_VHD_DRIVE_FOOTER_MISSING syscall.Errno = 0xC03A0001 ERROR_VHD_DRIVE_FOOTER_CHECKSUM_MISMATCH syscall.Errno = 0xC03A0002 ERROR_VHD_DRIVE_FOOTER_CORRUPT syscall.Errno = 0xC03A0003 ERROR_VHD_FORMAT_UNKNOWN syscall.Errno = 0xC03A0004 ERROR_VHD_FORMAT_UNSUPPORTED_VERSION syscall.Errno = 0xC03A0005 ERROR_VHD_SPARSE_HEADER_CHECKSUM_MISMATCH syscall.Errno = 0xC03A0006 ERROR_VHD_SPARSE_HEADER_UNSUPPORTED_VERSION syscall.Errno = 0xC03A0007 ERROR_VHD_SPARSE_HEADER_CORRUPT syscall.Errno = 0xC03A0008 ERROR_VHD_BLOCK_ALLOCATION_FAILURE syscall.Errno = 0xC03A0009 ERROR_VHD_BLOCK_ALLOCATION_TABLE_CORRUPT syscall.Errno = 0xC03A000A ERROR_VHD_INVALID_BLOCK_SIZE syscall.Errno = 0xC03A000B ERROR_VHD_BITMAP_MISMATCH syscall.Errno = 0xC03A000C ERROR_VHD_PARENT_VHD_NOT_FOUND syscall.Errno = 0xC03A000D ERROR_VHD_CHILD_PARENT_ID_MISMATCH syscall.Errno = 0xC03A000E ERROR_VHD_CHILD_PARENT_TIMESTAMP_MISMATCH syscall.Errno = 0xC03A000F ERROR_VHD_METADATA_READ_FAILURE syscall.Errno = 0xC03A0010 ERROR_VHD_METADATA_WRITE_FAILURE syscall.Errno = 0xC03A0011 ERROR_VHD_INVALID_SIZE syscall.Errno = 0xC03A0012 ERROR_VHD_INVALID_FILE_SIZE syscall.Errno = 0xC03A0013 ERROR_VIRTDISK_PROVIDER_NOT_FOUND syscall.Errno = 0xC03A0014 ERROR_VIRTDISK_NOT_VIRTUAL_DISK syscall.Errno = 0xC03A0015 ERROR_VHD_PARENT_VHD_ACCESS_DENIED syscall.Errno = 0xC03A0016 ERROR_VHD_CHILD_PARENT_SIZE_MISMATCH syscall.Errno = 0xC03A0017 ERROR_VHD_DIFFERENCING_CHAIN_CYCLE_DETECTED syscall.Errno = 0xC03A0018 ERROR_VHD_DIFFERENCING_CHAIN_ERROR_IN_PARENT syscall.Errno = 0xC03A0019 ERROR_VIRTUAL_DISK_LIMITATION syscall.Errno = 0xC03A001A ERROR_VHD_INVALID_TYPE syscall.Errno = 0xC03A001B ERROR_VHD_INVALID_STATE syscall.Errno = 0xC03A001C ERROR_VIRTDISK_UNSUPPORTED_DISK_SECTOR_SIZE syscall.Errno = 0xC03A001D ERROR_VIRTDISK_DISK_ALREADY_OWNED syscall.Errno = 0xC03A001E ERROR_VIRTDISK_DISK_ONLINE_AND_WRITABLE syscall.Errno = 0xC03A001F ERROR_CTLOG_TRACKING_NOT_INITIALIZED syscall.Errno = 0xC03A0020 ERROR_CTLOG_LOGFILE_SIZE_EXCEEDED_MAXSIZE syscall.Errno = 0xC03A0021 ERROR_CTLOG_VHD_CHANGED_OFFLINE syscall.Errno = 0xC03A0022 ERROR_CTLOG_INVALID_TRACKING_STATE syscall.Errno = 0xC03A0023 ERROR_CTLOG_INCONSISTENT_TRACKING_FILE syscall.Errno = 0xC03A0024 ERROR_VHD_RESIZE_WOULD_TRUNCATE_DATA syscall.Errno = 0xC03A0025 ERROR_VHD_COULD_NOT_COMPUTE_MINIMUM_VIRTUAL_SIZE syscall.Errno = 0xC03A0026 ERROR_VHD_ALREADY_AT_OR_BELOW_MINIMUM_VIRTUAL_SIZE syscall.Errno = 0xC03A0027 ERROR_VHD_METADATA_FULL syscall.Errno = 0xC03A0028 ERROR_VHD_INVALID_CHANGE_TRACKING_ID syscall.Errno = 0xC03A0029 ERROR_VHD_CHANGE_TRACKING_DISABLED syscall.Errno = 0xC03A002A ERROR_VHD_MISSING_CHANGE_TRACKING_INFORMATION syscall.Errno = 0xC03A0030 ERROR_QUERY_STORAGE_ERROR syscall.Errno = 0x803A0001 HCN_E_NETWORK_NOT_FOUND Handle = 0x803B0001 HCN_E_ENDPOINT_NOT_FOUND Handle = 0x803B0002 HCN_E_LAYER_NOT_FOUND Handle = 0x803B0003 HCN_E_SWITCH_NOT_FOUND Handle = 0x803B0004 HCN_E_SUBNET_NOT_FOUND Handle = 0x803B0005 HCN_E_ADAPTER_NOT_FOUND Handle = 0x803B0006 HCN_E_PORT_NOT_FOUND Handle = 0x803B0007 HCN_E_POLICY_NOT_FOUND Handle = 0x803B0008 HCN_E_VFP_PORTSETTING_NOT_FOUND Handle = 0x803B0009 HCN_E_INVALID_NETWORK Handle = 0x803B000A HCN_E_INVALID_NETWORK_TYPE Handle = 0x803B000B HCN_E_INVALID_ENDPOINT Handle = 0x803B000C HCN_E_INVALID_POLICY Handle = 0x803B000D HCN_E_INVALID_POLICY_TYPE Handle = 0x803B000E HCN_E_INVALID_REMOTE_ENDPOINT_OPERATION Handle = 0x803B000F HCN_E_NETWORK_ALREADY_EXISTS Handle = 0x803B0010 HCN_E_LAYER_ALREADY_EXISTS Handle = 0x803B0011 HCN_E_POLICY_ALREADY_EXISTS Handle = 0x803B0012 HCN_E_PORT_ALREADY_EXISTS Handle = 0x803B0013 HCN_E_ENDPOINT_ALREADY_ATTACHED Handle = 0x803B0014 HCN_E_REQUEST_UNSUPPORTED Handle = 0x803B0015 HCN_E_MAPPING_NOT_SUPPORTED Handle = 0x803B0016 HCN_E_DEGRADED_OPERATION Handle = 0x803B0017 HCN_E_SHARED_SWITCH_MODIFICATION Handle = 0x803B0018 HCN_E_GUID_CONVERSION_FAILURE Handle = 0x803B0019 HCN_E_REGKEY_FAILURE Handle = 0x803B001A HCN_E_INVALID_JSON Handle = 0x803B001B HCN_E_INVALID_JSON_REFERENCE Handle = 0x803B001C HCN_E_ENDPOINT_SHARING_DISABLED Handle = 0x803B001D HCN_E_INVALID_IP Handle = 0x803B001E HCN_E_SWITCH_EXTENSION_NOT_FOUND Handle = 0x803B001F HCN_E_MANAGER_STOPPED Handle = 0x803B0020 GCN_E_MODULE_NOT_FOUND Handle = 0x803B0021 GCN_E_NO_REQUEST_HANDLERS Handle = 0x803B0022 GCN_E_REQUEST_UNSUPPORTED Handle = 0x803B0023 GCN_E_RUNTIMEKEYS_FAILED Handle = 0x803B0024 GCN_E_NETADAPTER_TIMEOUT Handle = 0x803B0025 GCN_E_NETADAPTER_NOT_FOUND Handle = 0x803B0026 GCN_E_NETCOMPARTMENT_NOT_FOUND Handle = 0x803B0027 GCN_E_NETINTERFACE_NOT_FOUND Handle = 0x803B0028 GCN_E_DEFAULTNAMESPACE_EXISTS Handle = 0x803B0029 HCN_E_ICS_DISABLED Handle = 0x803B002A HCN_E_ENDPOINT_NAMESPACE_ALREADY_EXISTS Handle = 0x803B002B HCN_E_ENTITY_HAS_REFERENCES Handle = 0x803B002C HCN_E_INVALID_INTERNAL_PORT Handle = 0x803B002D HCN_E_NAMESPACE_ATTACH_FAILED Handle = 0x803B002E HCN_E_ADDR_INVALID_OR_RESERVED Handle = 0x803B002F SDIAG_E_CANCELLED syscall.Errno = 0x803C0100 SDIAG_E_SCRIPT syscall.Errno = 0x803C0101 SDIAG_E_POWERSHELL syscall.Errno = 0x803C0102 SDIAG_E_MANAGEDHOST syscall.Errno = 0x803C0103 SDIAG_E_NOVERIFIER syscall.Errno = 0x803C0104 SDIAG_S_CANNOTRUN syscall.Errno = 0x003C0105 SDIAG_E_DISABLED syscall.Errno = 0x803C0106 SDIAG_E_TRUST syscall.Errno = 0x803C0107 SDIAG_E_CANNOTRUN syscall.Errno = 0x803C0108 SDIAG_E_VERSION syscall.Errno = 0x803C0109 SDIAG_E_RESOURCE syscall.Errno = 0x803C010A SDIAG_E_ROOTCAUSE syscall.Errno = 0x803C010B WPN_E_CHANNEL_CLOSED Handle = 0x803E0100 WPN_E_CHANNEL_REQUEST_NOT_COMPLETE Handle = 0x803E0101 WPN_E_INVALID_APP Handle = 0x803E0102 WPN_E_OUTSTANDING_CHANNEL_REQUEST Handle = 0x803E0103 WPN_E_DUPLICATE_CHANNEL Handle = 0x803E0104 WPN_E_PLATFORM_UNAVAILABLE Handle = 0x803E0105 WPN_E_NOTIFICATION_POSTED Handle = 0x803E0106 WPN_E_NOTIFICATION_HIDDEN Handle = 0x803E0107 WPN_E_NOTIFICATION_NOT_POSTED Handle = 0x803E0108 WPN_E_CLOUD_DISABLED Handle = 0x803E0109 WPN_E_CLOUD_INCAPABLE Handle = 0x803E0110 WPN_E_CLOUD_AUTH_UNAVAILABLE Handle = 0x803E011A WPN_E_CLOUD_SERVICE_UNAVAILABLE Handle = 0x803E011B WPN_E_FAILED_LOCK_SCREEN_UPDATE_INTIALIZATION Handle = 0x803E011C WPN_E_NOTIFICATION_DISABLED Handle = 0x803E0111 WPN_E_NOTIFICATION_INCAPABLE Handle = 0x803E0112 WPN_E_INTERNET_INCAPABLE Handle = 0x803E0113 WPN_E_NOTIFICATION_TYPE_DISABLED Handle = 0x803E0114 WPN_E_NOTIFICATION_SIZE Handle = 0x803E0115 WPN_E_TAG_SIZE Handle = 0x803E0116 WPN_E_ACCESS_DENIED Handle = 0x803E0117 WPN_E_DUPLICATE_REGISTRATION Handle = 0x803E0118 WPN_E_PUSH_NOTIFICATION_INCAPABLE Handle = 0x803E0119 WPN_E_DEV_ID_SIZE Handle = 0x803E0120 WPN_E_TAG_ALPHANUMERIC Handle = 0x803E012A WPN_E_INVALID_HTTP_STATUS_CODE Handle = 0x803E012B WPN_E_OUT_OF_SESSION Handle = 0x803E0200 WPN_E_POWER_SAVE Handle = 0x803E0201 WPN_E_IMAGE_NOT_FOUND_IN_CACHE Handle = 0x803E0202 WPN_E_ALL_URL_NOT_COMPLETED Handle = 0x803E0203 WPN_E_INVALID_CLOUD_IMAGE Handle = 0x803E0204 WPN_E_NOTIFICATION_ID_MATCHED Handle = 0x803E0205 WPN_E_CALLBACK_ALREADY_REGISTERED Handle = 0x803E0206 WPN_E_TOAST_NOTIFICATION_DROPPED Handle = 0x803E0207 WPN_E_STORAGE_LOCKED Handle = 0x803E0208 WPN_E_GROUP_SIZE Handle = 0x803E0209 WPN_E_GROUP_ALPHANUMERIC Handle = 0x803E020A WPN_E_CLOUD_DISABLED_FOR_APP Handle = 0x803E020B E_MBN_CONTEXT_NOT_ACTIVATED Handle = 0x80548201 E_MBN_BAD_SIM Handle = 0x80548202 E_MBN_DATA_CLASS_NOT_AVAILABLE Handle = 0x80548203 E_MBN_INVALID_ACCESS_STRING Handle = 0x80548204 E_MBN_MAX_ACTIVATED_CONTEXTS Handle = 0x80548205 E_MBN_PACKET_SVC_DETACHED Handle = 0x80548206 E_MBN_PROVIDER_NOT_VISIBLE Handle = 0x80548207 E_MBN_RADIO_POWER_OFF Handle = 0x80548208 E_MBN_SERVICE_NOT_ACTIVATED Handle = 0x80548209 E_MBN_SIM_NOT_INSERTED Handle = 0x8054820A E_MBN_VOICE_CALL_IN_PROGRESS Handle = 0x8054820B E_MBN_INVALID_CACHE Handle = 0x8054820C E_MBN_NOT_REGISTERED Handle = 0x8054820D E_MBN_PROVIDERS_NOT_FOUND Handle = 0x8054820E E_MBN_PIN_NOT_SUPPORTED Handle = 0x8054820F E_MBN_PIN_REQUIRED Handle = 0x80548210 E_MBN_PIN_DISABLED Handle = 0x80548211 E_MBN_FAILURE Handle = 0x80548212 E_MBN_INVALID_PROFILE Handle = 0x80548218 E_MBN_DEFAULT_PROFILE_EXIST Handle = 0x80548219 E_MBN_SMS_ENCODING_NOT_SUPPORTED Handle = 0x80548220 E_MBN_SMS_FILTER_NOT_SUPPORTED Handle = 0x80548221 E_MBN_SMS_INVALID_MEMORY_INDEX Handle = 0x80548222 E_MBN_SMS_LANG_NOT_SUPPORTED Handle = 0x80548223 E_MBN_SMS_MEMORY_FAILURE Handle = 0x80548224 E_MBN_SMS_NETWORK_TIMEOUT Handle = 0x80548225 E_MBN_SMS_UNKNOWN_SMSC_ADDRESS Handle = 0x80548226 E_MBN_SMS_FORMAT_NOT_SUPPORTED Handle = 0x80548227 E_MBN_SMS_OPERATION_NOT_ALLOWED Handle = 0x80548228 E_MBN_SMS_MEMORY_FULL Handle = 0x80548229 PEER_E_IPV6_NOT_INSTALLED Handle = 0x80630001 PEER_E_NOT_INITIALIZED Handle = 0x80630002 PEER_E_CANNOT_START_SERVICE Handle = 0x80630003 PEER_E_NOT_LICENSED Handle = 0x80630004 PEER_E_INVALID_GRAPH Handle = 0x80630010 PEER_E_DBNAME_CHANGED Handle = 0x80630011 PEER_E_DUPLICATE_GRAPH Handle = 0x80630012 PEER_E_GRAPH_NOT_READY Handle = 0x80630013 PEER_E_GRAPH_SHUTTING_DOWN Handle = 0x80630014 PEER_E_GRAPH_IN_USE Handle = 0x80630015 PEER_E_INVALID_DATABASE Handle = 0x80630016 PEER_E_TOO_MANY_ATTRIBUTES Handle = 0x80630017 PEER_E_CONNECTION_NOT_FOUND Handle = 0x80630103 PEER_E_CONNECT_SELF Handle = 0x80630106 PEER_E_ALREADY_LISTENING Handle = 0x80630107 PEER_E_NODE_NOT_FOUND Handle = 0x80630108 PEER_E_CONNECTION_FAILED Handle = 0x80630109 PEER_E_CONNECTION_NOT_AUTHENTICATED Handle = 0x8063010A PEER_E_CONNECTION_REFUSED Handle = 0x8063010B PEER_E_CLASSIFIER_TOO_LONG Handle = 0x80630201 PEER_E_TOO_MANY_IDENTITIES Handle = 0x80630202 PEER_E_NO_KEY_ACCESS Handle = 0x80630203 PEER_E_GROUPS_EXIST Handle = 0x80630204 PEER_E_RECORD_NOT_FOUND Handle = 0x80630301 PEER_E_DATABASE_ACCESSDENIED Handle = 0x80630302 PEER_E_DBINITIALIZATION_FAILED Handle = 0x80630303 PEER_E_MAX_RECORD_SIZE_EXCEEDED Handle = 0x80630304 PEER_E_DATABASE_ALREADY_PRESENT Handle = 0x80630305 PEER_E_DATABASE_NOT_PRESENT Handle = 0x80630306 PEER_E_IDENTITY_NOT_FOUND Handle = 0x80630401 PEER_E_EVENT_HANDLE_NOT_FOUND Handle = 0x80630501 PEER_E_INVALID_SEARCH Handle = 0x80630601 PEER_E_INVALID_ATTRIBUTES Handle = 0x80630602 PEER_E_INVITATION_NOT_TRUSTED Handle = 0x80630701 PEER_E_CHAIN_TOO_LONG Handle = 0x80630703 PEER_E_INVALID_TIME_PERIOD Handle = 0x80630705 PEER_E_CIRCULAR_CHAIN_DETECTED Handle = 0x80630706 PEER_E_CERT_STORE_CORRUPTED Handle = 0x80630801 PEER_E_NO_CLOUD Handle = 0x80631001 PEER_E_CLOUD_NAME_AMBIGUOUS Handle = 0x80631005 PEER_E_INVALID_RECORD Handle = 0x80632010 PEER_E_NOT_AUTHORIZED Handle = 0x80632020 PEER_E_PASSWORD_DOES_NOT_MEET_POLICY Handle = 0x80632021 PEER_E_DEFERRED_VALIDATION Handle = 0x80632030 PEER_E_INVALID_GROUP_PROPERTIES Handle = 0x80632040 PEER_E_INVALID_PEER_NAME Handle = 0x80632050 PEER_E_INVALID_CLASSIFIER Handle = 0x80632060 PEER_E_INVALID_FRIENDLY_NAME Handle = 0x80632070 PEER_E_INVALID_ROLE_PROPERTY Handle = 0x80632071 PEER_E_INVALID_CLASSIFIER_PROPERTY Handle = 0x80632072 PEER_E_INVALID_RECORD_EXPIRATION Handle = 0x80632080 PEER_E_INVALID_CREDENTIAL_INFO Handle = 0x80632081 PEER_E_INVALID_CREDENTIAL Handle = 0x80632082 PEER_E_INVALID_RECORD_SIZE Handle = 0x80632083 PEER_E_UNSUPPORTED_VERSION Handle = 0x80632090 PEER_E_GROUP_NOT_READY Handle = 0x80632091 PEER_E_GROUP_IN_USE Handle = 0x80632092 PEER_E_INVALID_GROUP Handle = 0x80632093 PEER_E_NO_MEMBERS_FOUND Handle = 0x80632094 PEER_E_NO_MEMBER_CONNECTIONS Handle = 0x80632095 PEER_E_UNABLE_TO_LISTEN Handle = 0x80632096 PEER_E_IDENTITY_DELETED Handle = 0x806320A0 PEER_E_SERVICE_NOT_AVAILABLE Handle = 0x806320A1 PEER_E_CONTACT_NOT_FOUND Handle = 0x80636001 PEER_S_GRAPH_DATA_CREATED Handle = 0x00630001 PEER_S_NO_EVENT_DATA Handle = 0x00630002 PEER_S_ALREADY_CONNECTED Handle = 0x00632000 PEER_S_SUBSCRIPTION_EXISTS Handle = 0x00636000 PEER_S_NO_CONNECTIVITY Handle = 0x00630005 PEER_S_ALREADY_A_MEMBER Handle = 0x00630006 PEER_E_CANNOT_CONVERT_PEER_NAME Handle = 0x80634001 PEER_E_INVALID_PEER_HOST_NAME Handle = 0x80634002 PEER_E_NO_MORE Handle = 0x80634003 PEER_E_PNRP_DUPLICATE_PEER_NAME Handle = 0x80634005 PEER_E_INVITE_CANCELLED Handle = 0x80637000 PEER_E_INVITE_RESPONSE_NOT_AVAILABLE Handle = 0x80637001 PEER_E_NOT_SIGNED_IN Handle = 0x80637003 PEER_E_PRIVACY_DECLINED Handle = 0x80637004 PEER_E_TIMEOUT Handle = 0x80637005 PEER_E_INVALID_ADDRESS Handle = 0x80637007 PEER_E_FW_EXCEPTION_DISABLED Handle = 0x80637008 PEER_E_FW_BLOCKED_BY_POLICY Handle = 0x80637009 PEER_E_FW_BLOCKED_BY_SHIELDS_UP Handle = 0x8063700A PEER_E_FW_DECLINED Handle = 0x8063700B UI_E_CREATE_FAILED Handle = 0x802A0001 UI_E_SHUTDOWN_CALLED Handle = 0x802A0002 UI_E_ILLEGAL_REENTRANCY Handle = 0x802A0003 UI_E_OBJECT_SEALED Handle = 0x802A0004 UI_E_VALUE_NOT_SET Handle = 0x802A0005 UI_E_VALUE_NOT_DETERMINED Handle = 0x802A0006 UI_E_INVALID_OUTPUT Handle = 0x802A0007 UI_E_BOOLEAN_EXPECTED Handle = 0x802A0008 UI_E_DIFFERENT_OWNER Handle = 0x802A0009 UI_E_AMBIGUOUS_MATCH Handle = 0x802A000A UI_E_FP_OVERFLOW Handle = 0x802A000B UI_E_WRONG_THREAD Handle = 0x802A000C UI_E_STORYBOARD_ACTIVE Handle = 0x802A0101 UI_E_STORYBOARD_NOT_PLAYING Handle = 0x802A0102 UI_E_START_KEYFRAME_AFTER_END Handle = 0x802A0103 UI_E_END_KEYFRAME_NOT_DETERMINED Handle = 0x802A0104 UI_E_LOOPS_OVERLAP Handle = 0x802A0105 UI_E_TRANSITION_ALREADY_USED Handle = 0x802A0106 UI_E_TRANSITION_NOT_IN_STORYBOARD Handle = 0x802A0107 UI_E_TRANSITION_ECLIPSED Handle = 0x802A0108 UI_E_TIME_BEFORE_LAST_UPDATE Handle = 0x802A0109 UI_E_TIMER_CLIENT_ALREADY_CONNECTED Handle = 0x802A010A UI_E_INVALID_DIMENSION Handle = 0x802A010B UI_E_PRIMITIVE_OUT_OF_BOUNDS Handle = 0x802A010C UI_E_WINDOW_CLOSED Handle = 0x802A0201 E_BLUETOOTH_ATT_INVALID_HANDLE Handle = 0x80650001 E_BLUETOOTH_ATT_READ_NOT_PERMITTED Handle = 0x80650002 E_BLUETOOTH_ATT_WRITE_NOT_PERMITTED Handle = 0x80650003 E_BLUETOOTH_ATT_INVALID_PDU Handle = 0x80650004 E_BLUETOOTH_ATT_INSUFFICIENT_AUTHENTICATION Handle = 0x80650005 E_BLUETOOTH_ATT_REQUEST_NOT_SUPPORTED Handle = 0x80650006 E_BLUETOOTH_ATT_INVALID_OFFSET Handle = 0x80650007 E_BLUETOOTH_ATT_INSUFFICIENT_AUTHORIZATION Handle = 0x80650008 E_BLUETOOTH_ATT_PREPARE_QUEUE_FULL Handle = 0x80650009 E_BLUETOOTH_ATT_ATTRIBUTE_NOT_FOUND Handle = 0x8065000A E_BLUETOOTH_ATT_ATTRIBUTE_NOT_LONG Handle = 0x8065000B E_BLUETOOTH_ATT_INSUFFICIENT_ENCRYPTION_KEY_SIZE Handle = 0x8065000C E_BLUETOOTH_ATT_INVALID_ATTRIBUTE_VALUE_LENGTH Handle = 0x8065000D E_BLUETOOTH_ATT_UNLIKELY Handle = 0x8065000E E_BLUETOOTH_ATT_INSUFFICIENT_ENCRYPTION Handle = 0x8065000F E_BLUETOOTH_ATT_UNSUPPORTED_GROUP_TYPE Handle = 0x80650010 E_BLUETOOTH_ATT_INSUFFICIENT_RESOURCES Handle = 0x80650011 E_BLUETOOTH_ATT_UNKNOWN_ERROR Handle = 0x80651000 E_AUDIO_ENGINE_NODE_NOT_FOUND Handle = 0x80660001 E_HDAUDIO_EMPTY_CONNECTION_LIST Handle = 0x80660002 E_HDAUDIO_CONNECTION_LIST_NOT_SUPPORTED Handle = 0x80660003 E_HDAUDIO_NO_LOGICAL_DEVICES_CREATED Handle = 0x80660004 E_HDAUDIO_NULL_LINKED_LIST_ENTRY Handle = 0x80660005 STATEREPOSITORY_E_CONCURRENCY_LOCKING_FAILURE Handle = 0x80670001 STATEREPOSITORY_E_STATEMENT_INPROGRESS Handle = 0x80670002 STATEREPOSITORY_E_CONFIGURATION_INVALID Handle = 0x80670003 STATEREPOSITORY_E_UNKNOWN_SCHEMA_VERSION Handle = 0x80670004 STATEREPOSITORY_ERROR_DICTIONARY_CORRUPTED Handle = 0x80670005 STATEREPOSITORY_E_BLOCKED Handle = 0x80670006 STATEREPOSITORY_E_BUSY_RETRY Handle = 0x80670007 STATEREPOSITORY_E_BUSY_RECOVERY_RETRY Handle = 0x80670008 STATEREPOSITORY_E_LOCKED_RETRY Handle = 0x80670009 STATEREPOSITORY_E_LOCKED_SHAREDCACHE_RETRY Handle = 0x8067000A STATEREPOSITORY_E_TRANSACTION_REQUIRED Handle = 0x8067000B STATEREPOSITORY_E_BUSY_TIMEOUT_EXCEEDED Handle = 0x8067000C STATEREPOSITORY_E_BUSY_RECOVERY_TIMEOUT_EXCEEDED Handle = 0x8067000D STATEREPOSITORY_E_LOCKED_TIMEOUT_EXCEEDED Handle = 0x8067000E STATEREPOSITORY_E_LOCKED_SHAREDCACHE_TIMEOUT_EXCEEDED Handle = 0x8067000F STATEREPOSITORY_E_SERVICE_STOP_IN_PROGRESS Handle = 0x80670010 STATEREPOSTORY_E_NESTED_TRANSACTION_NOT_SUPPORTED Handle = 0x80670011 STATEREPOSITORY_ERROR_CACHE_CORRUPTED Handle = 0x80670012 STATEREPOSITORY_TRANSACTION_CALLER_ID_CHANGED Handle = 0x00670013 STATEREPOSITORY_TRANSACTION_IN_PROGRESS Handle = 0x00670014 ERROR_SPACES_POOL_WAS_DELETED Handle = 0x00E70001 ERROR_SPACES_FAULT_DOMAIN_TYPE_INVALID Handle = 0x80E70001 ERROR_SPACES_INTERNAL_ERROR Handle = 0x80E70002 ERROR_SPACES_RESILIENCY_TYPE_INVALID Handle = 0x80E70003 ERROR_SPACES_DRIVE_SECTOR_SIZE_INVALID Handle = 0x80E70004 ERROR_SPACES_DRIVE_REDUNDANCY_INVALID Handle = 0x80E70006 ERROR_SPACES_NUMBER_OF_DATA_COPIES_INVALID Handle = 0x80E70007 ERROR_SPACES_PARITY_LAYOUT_INVALID Handle = 0x80E70008 ERROR_SPACES_INTERLEAVE_LENGTH_INVALID Handle = 0x80E70009 ERROR_SPACES_NUMBER_OF_COLUMNS_INVALID Handle = 0x80E7000A ERROR_SPACES_NOT_ENOUGH_DRIVES Handle = 0x80E7000B ERROR_SPACES_EXTENDED_ERROR Handle = 0x80E7000C ERROR_SPACES_PROVISIONING_TYPE_INVALID Handle = 0x80E7000D ERROR_SPACES_ALLOCATION_SIZE_INVALID Handle = 0x80E7000E ERROR_SPACES_ENCLOSURE_AWARE_INVALID Handle = 0x80E7000F ERROR_SPACES_WRITE_CACHE_SIZE_INVALID Handle = 0x80E70010 ERROR_SPACES_NUMBER_OF_GROUPS_INVALID Handle = 0x80E70011 ERROR_SPACES_DRIVE_OPERATIONAL_STATE_INVALID Handle = 0x80E70012 ERROR_SPACES_ENTRY_INCOMPLETE Handle = 0x80E70013 ERROR_SPACES_ENTRY_INVALID Handle = 0x80E70014 ERROR_VOLSNAP_BOOTFILE_NOT_VALID Handle = 0x80820001 ERROR_VOLSNAP_ACTIVATION_TIMEOUT Handle = 0x80820002 ERROR_TIERING_NOT_SUPPORTED_ON_VOLUME Handle = 0x80830001 ERROR_TIERING_VOLUME_DISMOUNT_IN_PROGRESS Handle = 0x80830002 ERROR_TIERING_STORAGE_TIER_NOT_FOUND Handle = 0x80830003 ERROR_TIERING_INVALID_FILE_ID Handle = 0x80830004 ERROR_TIERING_WRONG_CLUSTER_NODE Handle = 0x80830005 ERROR_TIERING_ALREADY_PROCESSING Handle = 0x80830006 ERROR_TIERING_CANNOT_PIN_OBJECT Handle = 0x80830007 ERROR_TIERING_FILE_IS_NOT_PINNED Handle = 0x80830008 ERROR_NOT_A_TIERED_VOLUME Handle = 0x80830009 ERROR_ATTRIBUTE_NOT_PRESENT Handle = 0x8083000A ERROR_SECCORE_INVALID_COMMAND Handle = 0xC0E80000 ERROR_NO_APPLICABLE_APP_LICENSES_FOUND Handle = 0xC0EA0001 ERROR_CLIP_LICENSE_NOT_FOUND Handle = 0xC0EA0002 ERROR_CLIP_DEVICE_LICENSE_MISSING Handle = 0xC0EA0003 ERROR_CLIP_LICENSE_INVALID_SIGNATURE Handle = 0xC0EA0004 ERROR_CLIP_KEYHOLDER_LICENSE_MISSING_OR_INVALID Handle = 0xC0EA0005 ERROR_CLIP_LICENSE_EXPIRED Handle = 0xC0EA0006 ERROR_CLIP_LICENSE_SIGNED_BY_UNKNOWN_SOURCE Handle = 0xC0EA0007 ERROR_CLIP_LICENSE_NOT_SIGNED Handle = 0xC0EA0008 ERROR_CLIP_LICENSE_HARDWARE_ID_OUT_OF_TOLERANCE Handle = 0xC0EA0009 ERROR_CLIP_LICENSE_DEVICE_ID_MISMATCH Handle = 0xC0EA000A DXGI_STATUS_OCCLUDED Handle = 0x087A0001 DXGI_STATUS_CLIPPED Handle = 0x087A0002 DXGI_STATUS_NO_REDIRECTION Handle = 0x087A0004 DXGI_STATUS_NO_DESKTOP_ACCESS Handle = 0x087A0005 DXGI_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE Handle = 0x087A0006 DXGI_STATUS_MODE_CHANGED Handle = 0x087A0007 DXGI_STATUS_MODE_CHANGE_IN_PROGRESS Handle = 0x087A0008 DXGI_ERROR_INVALID_CALL Handle = 0x887A0001 DXGI_ERROR_NOT_FOUND Handle = 0x887A0002 DXGI_ERROR_MORE_DATA Handle = 0x887A0003 DXGI_ERROR_UNSUPPORTED Handle = 0x887A0004 DXGI_ERROR_DEVICE_REMOVED Handle = 0x887A0005 DXGI_ERROR_DEVICE_HUNG Handle = 0x887A0006 DXGI_ERROR_DEVICE_RESET Handle = 0x887A0007 DXGI_ERROR_WAS_STILL_DRAWING Handle = 0x887A000A DXGI_ERROR_FRAME_STATISTICS_DISJOINT Handle = 0x887A000B DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE Handle = 0x887A000C DXGI_ERROR_DRIVER_INTERNAL_ERROR Handle = 0x887A0020 DXGI_ERROR_NONEXCLUSIVE Handle = 0x887A0021 DXGI_ERROR_NOT_CURRENTLY_AVAILABLE Handle = 0x887A0022 DXGI_ERROR_REMOTE_CLIENT_DISCONNECTED Handle = 0x887A0023 DXGI_ERROR_REMOTE_OUTOFMEMORY Handle = 0x887A0024 DXGI_ERROR_ACCESS_LOST Handle = 0x887A0026 DXGI_ERROR_WAIT_TIMEOUT Handle = 0x887A0027 DXGI_ERROR_SESSION_DISCONNECTED Handle = 0x887A0028 DXGI_ERROR_RESTRICT_TO_OUTPUT_STALE Handle = 0x887A0029 DXGI_ERROR_CANNOT_PROTECT_CONTENT Handle = 0x887A002A DXGI_ERROR_ACCESS_DENIED Handle = 0x887A002B DXGI_ERROR_NAME_ALREADY_EXISTS Handle = 0x887A002C DXGI_ERROR_SDK_COMPONENT_MISSING Handle = 0x887A002D DXGI_ERROR_NOT_CURRENT Handle = 0x887A002E DXGI_ERROR_HW_PROTECTION_OUTOFMEMORY Handle = 0x887A0030 DXGI_ERROR_DYNAMIC_CODE_POLICY_VIOLATION Handle = 0x887A0031 DXGI_ERROR_NON_COMPOSITED_UI Handle = 0x887A0032 DXGI_STATUS_UNOCCLUDED Handle = 0x087A0009 DXGI_STATUS_DDA_WAS_STILL_DRAWING Handle = 0x087A000A DXGI_ERROR_MODE_CHANGE_IN_PROGRESS Handle = 0x887A0025 DXGI_STATUS_PRESENT_REQUIRED Handle = 0x087A002F DXGI_ERROR_CACHE_CORRUPT Handle = 0x887A0033 DXGI_ERROR_CACHE_FULL Handle = 0x887A0034 DXGI_ERROR_CACHE_HASH_COLLISION Handle = 0x887A0035 DXGI_ERROR_ALREADY_EXISTS Handle = 0x887A0036 DXGI_DDI_ERR_WASSTILLDRAWING Handle = 0x887B0001 DXGI_DDI_ERR_UNSUPPORTED Handle = 0x887B0002 DXGI_DDI_ERR_NONEXCLUSIVE Handle = 0x887B0003 D3D10_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS Handle = 0x88790001 D3D10_ERROR_FILE_NOT_FOUND Handle = 0x88790002 D3D11_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS Handle = 0x887C0001 D3D11_ERROR_FILE_NOT_FOUND Handle = 0x887C0002 D3D11_ERROR_TOO_MANY_UNIQUE_VIEW_OBJECTS Handle = 0x887C0003 D3D11_ERROR_DEFERRED_CONTEXT_MAP_WITHOUT_INITIAL_DISCARD Handle = 0x887C0004 D3D12_ERROR_ADAPTER_NOT_FOUND Handle = 0x887E0001 D3D12_ERROR_DRIVER_VERSION_MISMATCH Handle = 0x887E0002 D2DERR_WRONG_STATE Handle = 0x88990001 D2DERR_NOT_INITIALIZED Handle = 0x88990002 D2DERR_UNSUPPORTED_OPERATION Handle = 0x88990003 D2DERR_SCANNER_FAILED Handle = 0x88990004 D2DERR_SCREEN_ACCESS_DENIED Handle = 0x88990005 D2DERR_DISPLAY_STATE_INVALID Handle = 0x88990006 D2DERR_ZERO_VECTOR Handle = 0x88990007 D2DERR_INTERNAL_ERROR Handle = 0x88990008 D2DERR_DISPLAY_FORMAT_NOT_SUPPORTED Handle = 0x88990009 D2DERR_INVALID_CALL Handle = 0x8899000A D2DERR_NO_HARDWARE_DEVICE Handle = 0x8899000B D2DERR_RECREATE_TARGET Handle = 0x8899000C D2DERR_TOO_MANY_SHADER_ELEMENTS Handle = 0x8899000D D2DERR_SHADER_COMPILE_FAILED Handle = 0x8899000E D2DERR_MAX_TEXTURE_SIZE_EXCEEDED Handle = 0x8899000F D2DERR_UNSUPPORTED_VERSION Handle = 0x88990010 D2DERR_BAD_NUMBER Handle = 0x88990011 D2DERR_WRONG_FACTORY Handle = 0x88990012 D2DERR_LAYER_ALREADY_IN_USE Handle = 0x88990013 D2DERR_POP_CALL_DID_NOT_MATCH_PUSH Handle = 0x88990014 D2DERR_WRONG_RESOURCE_DOMAIN Handle = 0x88990015 D2DERR_PUSH_POP_UNBALANCED Handle = 0x88990016 D2DERR_RENDER_TARGET_HAS_LAYER_OR_CLIPRECT Handle = 0x88990017 D2DERR_INCOMPATIBLE_BRUSH_TYPES Handle = 0x88990018 D2DERR_WIN32_ERROR Handle = 0x88990019 D2DERR_TARGET_NOT_GDI_COMPATIBLE Handle = 0x8899001A D2DERR_TEXT_EFFECT_IS_WRONG_TYPE Handle = 0x8899001B D2DERR_TEXT_RENDERER_NOT_RELEASED Handle = 0x8899001C D2DERR_EXCEEDS_MAX_BITMAP_SIZE Handle = 0x8899001D D2DERR_INVALID_GRAPH_CONFIGURATION Handle = 0x8899001E D2DERR_INVALID_INTERNAL_GRAPH_CONFIGURATION Handle = 0x8899001F D2DERR_CYCLIC_GRAPH Handle = 0x88990020 D2DERR_BITMAP_CANNOT_DRAW Handle = 0x88990021 D2DERR_OUTSTANDING_BITMAP_REFERENCES Handle = 0x88990022 D2DERR_ORIGINAL_TARGET_NOT_BOUND Handle = 0x88990023 D2DERR_INVALID_TARGET Handle = 0x88990024 D2DERR_BITMAP_BOUND_AS_TARGET Handle = 0x88990025 D2DERR_INSUFFICIENT_DEVICE_CAPABILITIES Handle = 0x88990026 D2DERR_INTERMEDIATE_TOO_LARGE Handle = 0x88990027 D2DERR_EFFECT_IS_NOT_REGISTERED Handle = 0x88990028 D2DERR_INVALID_PROPERTY Handle = 0x88990029 D2DERR_NO_SUBPROPERTIES Handle = 0x8899002A D2DERR_PRINT_JOB_CLOSED Handle = 0x8899002B D2DERR_PRINT_FORMAT_NOT_SUPPORTED Handle = 0x8899002C D2DERR_TOO_MANY_TRANSFORM_INPUTS Handle = 0x8899002D D2DERR_INVALID_GLYPH_IMAGE Handle = 0x8899002E DWRITE_E_FILEFORMAT Handle = 0x88985000 DWRITE_E_UNEXPECTED Handle = 0x88985001 DWRITE_E_NOFONT Handle = 0x88985002 DWRITE_E_FILENOTFOUND Handle = 0x88985003 DWRITE_E_FILEACCESS Handle = 0x88985004 DWRITE_E_FONTCOLLECTIONOBSOLETE Handle = 0x88985005 DWRITE_E_ALREADYREGISTERED Handle = 0x88985006 DWRITE_E_CACHEFORMAT Handle = 0x88985007 DWRITE_E_CACHEVERSION Handle = 0x88985008 DWRITE_E_UNSUPPORTEDOPERATION Handle = 0x88985009 DWRITE_E_TEXTRENDERERINCOMPATIBLE Handle = 0x8898500A DWRITE_E_FLOWDIRECTIONCONFLICTS Handle = 0x8898500B DWRITE_E_NOCOLOR Handle = 0x8898500C DWRITE_E_REMOTEFONT Handle = 0x8898500D DWRITE_E_DOWNLOADCANCELLED Handle = 0x8898500E DWRITE_E_DOWNLOADFAILED Handle = 0x8898500F DWRITE_E_TOOMANYDOWNLOADS Handle = 0x88985010 WINCODEC_ERR_WRONGSTATE Handle = 0x88982F04 WINCODEC_ERR_VALUEOUTOFRANGE Handle = 0x88982F05 WINCODEC_ERR_UNKNOWNIMAGEFORMAT Handle = 0x88982F07 WINCODEC_ERR_UNSUPPORTEDVERSION Handle = 0x88982F0B WINCODEC_ERR_NOTINITIALIZED Handle = 0x88982F0C WINCODEC_ERR_ALREADYLOCKED Handle = 0x88982F0D WINCODEC_ERR_PROPERTYNOTFOUND Handle = 0x88982F40 WINCODEC_ERR_PROPERTYNOTSUPPORTED Handle = 0x88982F41 WINCODEC_ERR_PROPERTYSIZE Handle = 0x88982F42 WINCODEC_ERR_CODECPRESENT Handle = 0x88982F43 WINCODEC_ERR_CODECNOTHUMBNAIL Handle = 0x88982F44 WINCODEC_ERR_PALETTEUNAVAILABLE Handle = 0x88982F45 WINCODEC_ERR_CODECTOOMANYSCANLINES Handle = 0x88982F46 WINCODEC_ERR_INTERNALERROR Handle = 0x88982F48 WINCODEC_ERR_SOURCERECTDOESNOTMATCHDIMENSIONS Handle = 0x88982F49 WINCODEC_ERR_COMPONENTNOTFOUND Handle = 0x88982F50 WINCODEC_ERR_IMAGESIZEOUTOFRANGE Handle = 0x88982F51 WINCODEC_ERR_TOOMUCHMETADATA Handle = 0x88982F52 WINCODEC_ERR_BADIMAGE Handle = 0x88982F60 WINCODEC_ERR_BADHEADER Handle = 0x88982F61 WINCODEC_ERR_FRAMEMISSING Handle = 0x88982F62 WINCODEC_ERR_BADMETADATAHEADER Handle = 0x88982F63 WINCODEC_ERR_BADSTREAMDATA Handle = 0x88982F70 WINCODEC_ERR_STREAMWRITE Handle = 0x88982F71 WINCODEC_ERR_STREAMREAD Handle = 0x88982F72 WINCODEC_ERR_STREAMNOTAVAILABLE Handle = 0x88982F73 WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT Handle = 0x88982F80 WINCODEC_ERR_UNSUPPORTEDOPERATION Handle = 0x88982F81 WINCODEC_ERR_INVALIDREGISTRATION Handle = 0x88982F8A WINCODEC_ERR_COMPONENTINITIALIZEFAILURE Handle = 0x88982F8B WINCODEC_ERR_INSUFFICIENTBUFFER Handle = 0x88982F8C WINCODEC_ERR_DUPLICATEMETADATAPRESENT Handle = 0x88982F8D WINCODEC_ERR_PROPERTYUNEXPECTEDTYPE Handle = 0x88982F8E WINCODEC_ERR_UNEXPECTEDSIZE Handle = 0x88982F8F WINCODEC_ERR_INVALIDQUERYREQUEST Handle = 0x88982F90 WINCODEC_ERR_UNEXPECTEDMETADATATYPE Handle = 0x88982F91 WINCODEC_ERR_REQUESTONLYVALIDATMETADATAROOT Handle = 0x88982F92 WINCODEC_ERR_INVALIDQUERYCHARACTER Handle = 0x88982F93 WINCODEC_ERR_WIN32ERROR Handle = 0x88982F94 WINCODEC_ERR_INVALIDPROGRESSIVELEVEL Handle = 0x88982F95 WINCODEC_ERR_INVALIDJPEGSCANINDEX Handle = 0x88982F96 MILERR_OBJECTBUSY Handle = 0x88980001 MILERR_INSUFFICIENTBUFFER Handle = 0x88980002 MILERR_WIN32ERROR Handle = 0x88980003 MILERR_SCANNER_FAILED Handle = 0x88980004 MILERR_SCREENACCESSDENIED Handle = 0x88980005 MILERR_DISPLAYSTATEINVALID Handle = 0x88980006 MILERR_NONINVERTIBLEMATRIX Handle = 0x88980007 MILERR_ZEROVECTOR Handle = 0x88980008 MILERR_TERMINATED Handle = 0x88980009 MILERR_BADNUMBER Handle = 0x8898000A MILERR_INTERNALERROR Handle = 0x88980080 MILERR_DISPLAYFORMATNOTSUPPORTED Handle = 0x88980084 MILERR_INVALIDCALL Handle = 0x88980085 MILERR_ALREADYLOCKED Handle = 0x88980086 MILERR_NOTLOCKED Handle = 0x88980087 MILERR_DEVICECANNOTRENDERTEXT Handle = 0x88980088 MILERR_GLYPHBITMAPMISSED Handle = 0x88980089 MILERR_MALFORMEDGLYPHCACHE Handle = 0x8898008A MILERR_GENERIC_IGNORE Handle = 0x8898008B MILERR_MALFORMED_GUIDELINE_DATA Handle = 0x8898008C MILERR_NO_HARDWARE_DEVICE Handle = 0x8898008D MILERR_NEED_RECREATE_AND_PRESENT Handle = 0x8898008E MILERR_ALREADY_INITIALIZED Handle = 0x8898008F MILERR_MISMATCHED_SIZE Handle = 0x88980090 MILERR_NO_REDIRECTION_SURFACE_AVAILABLE Handle = 0x88980091 MILERR_REMOTING_NOT_SUPPORTED Handle = 0x88980092 MILERR_QUEUED_PRESENT_NOT_SUPPORTED Handle = 0x88980093 MILERR_NOT_QUEUING_PRESENTS Handle = 0x88980094 MILERR_NO_REDIRECTION_SURFACE_RETRY_LATER Handle = 0x88980095 MILERR_TOOMANYSHADERELEMNTS Handle = 0x88980096 MILERR_MROW_READLOCK_FAILED Handle = 0x88980097 MILERR_MROW_UPDATE_FAILED Handle = 0x88980098 MILERR_SHADER_COMPILE_FAILED Handle = 0x88980099 MILERR_MAX_TEXTURE_SIZE_EXCEEDED Handle = 0x8898009A MILERR_QPC_TIME_WENT_BACKWARD Handle = 0x8898009B MILERR_DXGI_ENUMERATION_OUT_OF_SYNC Handle = 0x8898009D MILERR_ADAPTER_NOT_FOUND Handle = 0x8898009E MILERR_COLORSPACE_NOT_SUPPORTED Handle = 0x8898009F MILERR_PREFILTER_NOT_SUPPORTED Handle = 0x889800A0 MILERR_DISPLAYID_ACCESS_DENIED Handle = 0x889800A1 UCEERR_INVALIDPACKETHEADER Handle = 0x88980400 UCEERR_UNKNOWNPACKET Handle = 0x88980401 UCEERR_ILLEGALPACKET Handle = 0x88980402 UCEERR_MALFORMEDPACKET Handle = 0x88980403 UCEERR_ILLEGALHANDLE Handle = 0x88980404 UCEERR_HANDLELOOKUPFAILED Handle = 0x88980405 UCEERR_RENDERTHREADFAILURE Handle = 0x88980406 UCEERR_CTXSTACKFRSTTARGETNULL Handle = 0x88980407 UCEERR_CONNECTIONIDLOOKUPFAILED Handle = 0x88980408 UCEERR_BLOCKSFULL Handle = 0x88980409 UCEERR_MEMORYFAILURE Handle = 0x8898040A UCEERR_PACKETRECORDOUTOFRANGE Handle = 0x8898040B UCEERR_ILLEGALRECORDTYPE Handle = 0x8898040C UCEERR_OUTOFHANDLES Handle = 0x8898040D UCEERR_UNCHANGABLE_UPDATE_ATTEMPTED Handle = 0x8898040E UCEERR_NO_MULTIPLE_WORKER_THREADS Handle = 0x8898040F UCEERR_REMOTINGNOTSUPPORTED Handle = 0x88980410 UCEERR_MISSINGENDCOMMAND Handle = 0x88980411 UCEERR_MISSINGBEGINCOMMAND Handle = 0x88980412 UCEERR_CHANNELSYNCTIMEDOUT Handle = 0x88980413 UCEERR_CHANNELSYNCABANDONED Handle = 0x88980414 UCEERR_UNSUPPORTEDTRANSPORTVERSION Handle = 0x88980415 UCEERR_TRANSPORTUNAVAILABLE Handle = 0x88980416 UCEERR_FEEDBACK_UNSUPPORTED Handle = 0x88980417 UCEERR_COMMANDTRANSPORTDENIED Handle = 0x88980418 UCEERR_GRAPHICSSTREAMUNAVAILABLE Handle = 0x88980419 UCEERR_GRAPHICSSTREAMALREADYOPEN Handle = 0x88980420 UCEERR_TRANSPORTDISCONNECTED Handle = 0x88980421 UCEERR_TRANSPORTOVERLOADED Handle = 0x88980422 UCEERR_PARTITION_ZOMBIED Handle = 0x88980423 MILAVERR_NOCLOCK Handle = 0x88980500 MILAVERR_NOMEDIATYPE Handle = 0x88980501 MILAVERR_NOVIDEOMIXER Handle = 0x88980502 MILAVERR_NOVIDEOPRESENTER Handle = 0x88980503 MILAVERR_NOREADYFRAMES Handle = 0x88980504 MILAVERR_MODULENOTLOADED Handle = 0x88980505 MILAVERR_WMPFACTORYNOTREGISTERED Handle = 0x88980506 MILAVERR_INVALIDWMPVERSION Handle = 0x88980507 MILAVERR_INSUFFICIENTVIDEORESOURCES Handle = 0x88980508 MILAVERR_VIDEOACCELERATIONNOTAVAILABLE Handle = 0x88980509 MILAVERR_REQUESTEDTEXTURETOOBIG Handle = 0x8898050A MILAVERR_SEEKFAILED Handle = 0x8898050B MILAVERR_UNEXPECTEDWMPFAILURE Handle = 0x8898050C MILAVERR_MEDIAPLAYERCLOSED Handle = 0x8898050D MILAVERR_UNKNOWNHARDWAREERROR Handle = 0x8898050E MILEFFECTSERR_UNKNOWNPROPERTY Handle = 0x8898060E MILEFFECTSERR_EFFECTNOTPARTOFGROUP Handle = 0x8898060F MILEFFECTSERR_NOINPUTSOURCEATTACHED Handle = 0x88980610 MILEFFECTSERR_CONNECTORNOTCONNECTED Handle = 0x88980611 MILEFFECTSERR_CONNECTORNOTASSOCIATEDWITHEFFECT Handle = 0x88980612 MILEFFECTSERR_RESERVED Handle = 0x88980613 MILEFFECTSERR_CYCLEDETECTED Handle = 0x88980614 MILEFFECTSERR_EFFECTINMORETHANONEGRAPH Handle = 0x88980615 MILEFFECTSERR_EFFECTALREADYINAGRAPH Handle = 0x88980616 MILEFFECTSERR_EFFECTHASNOCHILDREN Handle = 0x88980617 MILEFFECTSERR_ALREADYATTACHEDTOLISTENER Handle = 0x88980618 MILEFFECTSERR_NOTAFFINETRANSFORM Handle = 0x88980619 MILEFFECTSERR_EMPTYBOUNDS Handle = 0x8898061A MILEFFECTSERR_OUTPUTSIZETOOLARGE Handle = 0x8898061B DWMERR_STATE_TRANSITION_FAILED Handle = 0x88980700 DWMERR_THEME_FAILED Handle = 0x88980701 DWMERR_CATASTROPHIC_FAILURE Handle = 0x88980702 DCOMPOSITION_ERROR_WINDOW_ALREADY_COMPOSED Handle = 0x88980800 DCOMPOSITION_ERROR_SURFACE_BEING_RENDERED Handle = 0x88980801 DCOMPOSITION_ERROR_SURFACE_NOT_BEING_RENDERED Handle = 0x88980802 ONL_E_INVALID_AUTHENTICATION_TARGET Handle = 0x80860001 ONL_E_ACCESS_DENIED_BY_TOU Handle = 0x80860002 ONL_E_INVALID_APPLICATION Handle = 0x80860003 ONL_E_PASSWORD_UPDATE_REQUIRED Handle = 0x80860004 ONL_E_ACCOUNT_UPDATE_REQUIRED Handle = 0x80860005 ONL_E_FORCESIGNIN Handle = 0x80860006 ONL_E_ACCOUNT_LOCKED Handle = 0x80860007 ONL_E_PARENTAL_CONSENT_REQUIRED Handle = 0x80860008 ONL_E_EMAIL_VERIFICATION_REQUIRED Handle = 0x80860009 ONL_E_ACCOUNT_SUSPENDED_COMPROIMISE Handle = 0x8086000A ONL_E_ACCOUNT_SUSPENDED_ABUSE Handle = 0x8086000B ONL_E_ACTION_REQUIRED Handle = 0x8086000C ONL_CONNECTION_COUNT_LIMIT Handle = 0x8086000D ONL_E_CONNECTED_ACCOUNT_CAN_NOT_SIGNOUT Handle = 0x8086000E ONL_E_USER_AUTHENTICATION_REQUIRED Handle = 0x8086000F ONL_E_REQUEST_THROTTLED Handle = 0x80860010 FA_E_MAX_PERSISTED_ITEMS_REACHED Handle = 0x80270220 FA_E_HOMEGROUP_NOT_AVAILABLE Handle = 0x80270222 E_MONITOR_RESOLUTION_TOO_LOW Handle = 0x80270250 E_ELEVATED_ACTIVATION_NOT_SUPPORTED Handle = 0x80270251 E_UAC_DISABLED Handle = 0x80270252 E_FULL_ADMIN_NOT_SUPPORTED Handle = 0x80270253 E_APPLICATION_NOT_REGISTERED Handle = 0x80270254 E_MULTIPLE_EXTENSIONS_FOR_APPLICATION Handle = 0x80270255 E_MULTIPLE_PACKAGES_FOR_FAMILY Handle = 0x80270256 E_APPLICATION_MANAGER_NOT_RUNNING Handle = 0x80270257 S_STORE_LAUNCHED_FOR_REMEDIATION Handle = 0x00270258 S_APPLICATION_ACTIVATION_ERROR_HANDLED_BY_DIALOG Handle = 0x00270259 E_APPLICATION_ACTIVATION_TIMED_OUT Handle = 0x8027025A E_APPLICATION_ACTIVATION_EXEC_FAILURE Handle = 0x8027025B E_APPLICATION_TEMPORARY_LICENSE_ERROR Handle = 0x8027025C E_APPLICATION_TRIAL_LICENSE_EXPIRED Handle = 0x8027025D E_SKYDRIVE_ROOT_TARGET_FILE_SYSTEM_NOT_SUPPORTED Handle = 0x80270260 E_SKYDRIVE_ROOT_TARGET_OVERLAP Handle = 0x80270261 E_SKYDRIVE_ROOT_TARGET_CANNOT_INDEX Handle = 0x80270262 E_SKYDRIVE_FILE_NOT_UPLOADED Handle = 0x80270263 E_SKYDRIVE_UPDATE_AVAILABILITY_FAIL Handle = 0x80270264 E_SKYDRIVE_ROOT_TARGET_VOLUME_ROOT_NOT_SUPPORTED Handle = 0x80270265 E_SYNCENGINE_FILE_SIZE_OVER_LIMIT Handle = 0x8802B001 E_SYNCENGINE_FILE_SIZE_EXCEEDS_REMAINING_QUOTA Handle = 0x8802B002 E_SYNCENGINE_UNSUPPORTED_FILE_NAME Handle = 0x8802B003 E_SYNCENGINE_FOLDER_ITEM_COUNT_LIMIT_EXCEEDED Handle = 0x8802B004 E_SYNCENGINE_FILE_SYNC_PARTNER_ERROR Handle = 0x8802B005 E_SYNCENGINE_SYNC_PAUSED_BY_SERVICE Handle = 0x8802B006 E_SYNCENGINE_FILE_IDENTIFIER_UNKNOWN Handle = 0x8802C002 E_SYNCENGINE_SERVICE_AUTHENTICATION_FAILED Handle = 0x8802C003 E_SYNCENGINE_UNKNOWN_SERVICE_ERROR Handle = 0x8802C004 E_SYNCENGINE_SERVICE_RETURNED_UNEXPECTED_SIZE Handle = 0x8802C005 E_SYNCENGINE_REQUEST_BLOCKED_BY_SERVICE Handle = 0x8802C006 E_SYNCENGINE_REQUEST_BLOCKED_DUE_TO_CLIENT_ERROR Handle = 0x8802C007 E_SYNCENGINE_FOLDER_INACCESSIBLE Handle = 0x8802D001 E_SYNCENGINE_UNSUPPORTED_FOLDER_NAME Handle = 0x8802D002 E_SYNCENGINE_UNSUPPORTED_MARKET Handle = 0x8802D003 E_SYNCENGINE_PATH_LENGTH_LIMIT_EXCEEDED Handle = 0x8802D004 E_SYNCENGINE_REMOTE_PATH_LENGTH_LIMIT_EXCEEDED Handle = 0x8802D005 E_SYNCENGINE_CLIENT_UPDATE_NEEDED Handle = 0x8802D006 E_SYNCENGINE_PROXY_AUTHENTICATION_REQUIRED Handle = 0x8802D007 E_SYNCENGINE_STORAGE_SERVICE_PROVISIONING_FAILED Handle = 0x8802D008 E_SYNCENGINE_UNSUPPORTED_REPARSE_POINT Handle = 0x8802D009 E_SYNCENGINE_STORAGE_SERVICE_BLOCKED Handle = 0x8802D00A E_SYNCENGINE_FOLDER_IN_REDIRECTION Handle = 0x8802D00B EAS_E_POLICY_NOT_MANAGED_BY_OS Handle = 0x80550001 EAS_E_POLICY_COMPLIANT_WITH_ACTIONS Handle = 0x80550002 EAS_E_REQUESTED_POLICY_NOT_ENFORCEABLE Handle = 0x80550003 EAS_E_CURRENT_USER_HAS_BLANK_PASSWORD Handle = 0x80550004 EAS_E_REQUESTED_POLICY_PASSWORD_EXPIRATION_INCOMPATIBLE Handle = 0x80550005 EAS_E_USER_CANNOT_CHANGE_PASSWORD Handle = 0x80550006 EAS_E_ADMINS_HAVE_BLANK_PASSWORD Handle = 0x80550007 EAS_E_ADMINS_CANNOT_CHANGE_PASSWORD Handle = 0x80550008 EAS_E_LOCAL_CONTROLLED_USERS_CANNOT_CHANGE_PASSWORD Handle = 0x80550009 EAS_E_PASSWORD_POLICY_NOT_ENFORCEABLE_FOR_CONNECTED_ADMINS Handle = 0x8055000A EAS_E_CONNECTED_ADMINS_NEED_TO_CHANGE_PASSWORD Handle = 0x8055000B EAS_E_PASSWORD_POLICY_NOT_ENFORCEABLE_FOR_CURRENT_CONNECTED_USER Handle = 0x8055000C EAS_E_CURRENT_CONNECTED_USER_NEED_TO_CHANGE_PASSWORD Handle = 0x8055000D WEB_E_UNSUPPORTED_FORMAT Handle = 0x83750001 WEB_E_INVALID_XML Handle = 0x83750002 WEB_E_MISSING_REQUIRED_ELEMENT Handle = 0x83750003 WEB_E_MISSING_REQUIRED_ATTRIBUTE Handle = 0x83750004 WEB_E_UNEXPECTED_CONTENT Handle = 0x83750005 WEB_E_RESOURCE_TOO_LARGE Handle = 0x83750006 WEB_E_INVALID_JSON_STRING Handle = 0x83750007 WEB_E_INVALID_JSON_NUMBER Handle = 0x83750008 WEB_E_JSON_VALUE_NOT_FOUND Handle = 0x83750009 HTTP_E_STATUS_UNEXPECTED Handle = 0x80190001 HTTP_E_STATUS_UNEXPECTED_REDIRECTION Handle = 0x80190003 HTTP_E_STATUS_UNEXPECTED_CLIENT_ERROR Handle = 0x80190004 HTTP_E_STATUS_UNEXPECTED_SERVER_ERROR Handle = 0x80190005 HTTP_E_STATUS_AMBIGUOUS Handle = 0x8019012C HTTP_E_STATUS_MOVED Handle = 0x8019012D HTTP_E_STATUS_REDIRECT Handle = 0x8019012E HTTP_E_STATUS_REDIRECT_METHOD Handle = 0x8019012F HTTP_E_STATUS_NOT_MODIFIED Handle = 0x80190130 HTTP_E_STATUS_USE_PROXY Handle = 0x80190131 HTTP_E_STATUS_REDIRECT_KEEP_VERB Handle = 0x80190133 HTTP_E_STATUS_BAD_REQUEST Handle = 0x80190190 HTTP_E_STATUS_DENIED Handle = 0x80190191 HTTP_E_STATUS_PAYMENT_REQ Handle = 0x80190192 HTTP_E_STATUS_FORBIDDEN Handle = 0x80190193 HTTP_E_STATUS_NOT_FOUND Handle = 0x80190194 HTTP_E_STATUS_BAD_METHOD Handle = 0x80190195 HTTP_E_STATUS_NONE_ACCEPTABLE Handle = 0x80190196 HTTP_E_STATUS_PROXY_AUTH_REQ Handle = 0x80190197 HTTP_E_STATUS_REQUEST_TIMEOUT Handle = 0x80190198 HTTP_E_STATUS_CONFLICT Handle = 0x80190199 HTTP_E_STATUS_GONE Handle = 0x8019019A HTTP_E_STATUS_LENGTH_REQUIRED Handle = 0x8019019B HTTP_E_STATUS_PRECOND_FAILED Handle = 0x8019019C HTTP_E_STATUS_REQUEST_TOO_LARGE Handle = 0x8019019D HTTP_E_STATUS_URI_TOO_LONG Handle = 0x8019019E HTTP_E_STATUS_UNSUPPORTED_MEDIA Handle = 0x8019019F HTTP_E_STATUS_RANGE_NOT_SATISFIABLE Handle = 0x801901A0 HTTP_E_STATUS_EXPECTATION_FAILED Handle = 0x801901A1 HTTP_E_STATUS_SERVER_ERROR Handle = 0x801901F4 HTTP_E_STATUS_NOT_SUPPORTED Handle = 0x801901F5 HTTP_E_STATUS_BAD_GATEWAY Handle = 0x801901F6 HTTP_E_STATUS_SERVICE_UNAVAIL Handle = 0x801901F7 HTTP_E_STATUS_GATEWAY_TIMEOUT Handle = 0x801901F8 HTTP_E_STATUS_VERSION_NOT_SUP Handle = 0x801901F9 E_INVALID_PROTOCOL_OPERATION Handle = 0x83760001 E_INVALID_PROTOCOL_FORMAT Handle = 0x83760002 E_PROTOCOL_EXTENSIONS_NOT_SUPPORTED Handle = 0x83760003 E_SUBPROTOCOL_NOT_SUPPORTED Handle = 0x83760004 E_PROTOCOL_VERSION_NOT_SUPPORTED Handle = 0x83760005 INPUT_E_OUT_OF_ORDER Handle = 0x80400000 INPUT_E_REENTRANCY Handle = 0x80400001 INPUT_E_MULTIMODAL Handle = 0x80400002 INPUT_E_PACKET Handle = 0x80400003 INPUT_E_FRAME Handle = 0x80400004 INPUT_E_HISTORY Handle = 0x80400005 INPUT_E_DEVICE_INFO Handle = 0x80400006 INPUT_E_TRANSFORM Handle = 0x80400007 INPUT_E_DEVICE_PROPERTY Handle = 0x80400008 INET_E_INVALID_URL Handle = 0x800C0002 INET_E_NO_SESSION Handle = 0x800C0003 INET_E_CANNOT_CONNECT Handle = 0x800C0004 INET_E_RESOURCE_NOT_FOUND Handle = 0x800C0005 INET_E_OBJECT_NOT_FOUND Handle = 0x800C0006 INET_E_DATA_NOT_AVAILABLE Handle = 0x800C0007 INET_E_DOWNLOAD_FAILURE Handle = 0x800C0008 INET_E_AUTHENTICATION_REQUIRED Handle = 0x800C0009 INET_E_NO_VALID_MEDIA Handle = 0x800C000A INET_E_CONNECTION_TIMEOUT Handle = 0x800C000B INET_E_INVALID_REQUEST Handle = 0x800C000C INET_E_UNKNOWN_PROTOCOL Handle = 0x800C000D INET_E_SECURITY_PROBLEM Handle = 0x800C000E INET_E_CANNOT_LOAD_DATA Handle = 0x800C000F INET_E_CANNOT_INSTANTIATE_OBJECT Handle = 0x800C0010 INET_E_INVALID_CERTIFICATE Handle = 0x800C0019 INET_E_REDIRECT_FAILED Handle = 0x800C0014 INET_E_REDIRECT_TO_DIR Handle = 0x800C0015 ERROR_DBG_CREATE_PROCESS_FAILURE_LOCKDOWN Handle = 0x80B00001 ERROR_DBG_ATTACH_PROCESS_FAILURE_LOCKDOWN Handle = 0x80B00002 ERROR_DBG_CONNECT_SERVER_FAILURE_LOCKDOWN Handle = 0x80B00003 ERROR_DBG_START_SERVER_FAILURE_LOCKDOWN Handle = 0x80B00004 ERROR_IO_PREEMPTED Handle = 0x89010001 JSCRIPT_E_CANTEXECUTE Handle = 0x89020001 WEP_E_NOT_PROVISIONED_ON_ALL_VOLUMES Handle = 0x88010001 WEP_E_FIXED_DATA_NOT_SUPPORTED Handle = 0x88010002 WEP_E_HARDWARE_NOT_COMPLIANT Handle = 0x88010003 WEP_E_LOCK_NOT_CONFIGURED Handle = 0x88010004 WEP_E_PROTECTION_SUSPENDED Handle = 0x88010005 WEP_E_NO_LICENSE Handle = 0x88010006 WEP_E_OS_NOT_PROTECTED Handle = 0x88010007 WEP_E_UNEXPECTED_FAIL Handle = 0x88010008 WEP_E_BUFFER_TOO_LARGE Handle = 0x88010009 ERROR_SVHDX_ERROR_STORED Handle = 0xC05C0000 ERROR_SVHDX_ERROR_NOT_AVAILABLE Handle = 0xC05CFF00 ERROR_SVHDX_UNIT_ATTENTION_AVAILABLE Handle = 0xC05CFF01 ERROR_SVHDX_UNIT_ATTENTION_CAPACITY_DATA_CHANGED Handle = 0xC05CFF02 ERROR_SVHDX_UNIT_ATTENTION_RESERVATIONS_PREEMPTED Handle = 0xC05CFF03 ERROR_SVHDX_UNIT_ATTENTION_RESERVATIONS_RELEASED Handle = 0xC05CFF04 ERROR_SVHDX_UNIT_ATTENTION_REGISTRATIONS_PREEMPTED Handle = 0xC05CFF05 ERROR_SVHDX_UNIT_ATTENTION_OPERATING_DEFINITION_CHANGED Handle = 0xC05CFF06 ERROR_SVHDX_RESERVATION_CONFLICT Handle = 0xC05CFF07 ERROR_SVHDX_WRONG_FILE_TYPE Handle = 0xC05CFF08 ERROR_SVHDX_VERSION_MISMATCH Handle = 0xC05CFF09 ERROR_VHD_SHARED Handle = 0xC05CFF0A ERROR_SVHDX_NO_INITIATOR Handle = 0xC05CFF0B ERROR_VHDSET_BACKING_STORAGE_NOT_FOUND Handle = 0xC05CFF0C ERROR_SMB_NO_PREAUTH_INTEGRITY_HASH_OVERLAP Handle = 0xC05D0000 ERROR_SMB_BAD_CLUSTER_DIALECT Handle = 0xC05D0001 WININET_E_OUT_OF_HANDLES Handle = 0x80072EE1 WININET_E_TIMEOUT Handle = 0x80072EE2 WININET_E_EXTENDED_ERROR Handle = 0x80072EE3 WININET_E_INTERNAL_ERROR Handle = 0x80072EE4 WININET_E_INVALID_URL Handle = 0x80072EE5 WININET_E_UNRECOGNIZED_SCHEME Handle = 0x80072EE6 WININET_E_NAME_NOT_RESOLVED Handle = 0x80072EE7 WININET_E_PROTOCOL_NOT_FOUND Handle = 0x80072EE8 WININET_E_INVALID_OPTION Handle = 0x80072EE9 WININET_E_BAD_OPTION_LENGTH Handle = 0x80072EEA WININET_E_OPTION_NOT_SETTABLE Handle = 0x80072EEB WININET_E_SHUTDOWN Handle = 0x80072EEC WININET_E_INCORRECT_USER_NAME Handle = 0x80072EED WININET_E_INCORRECT_PASSWORD Handle = 0x80072EEE WININET_E_LOGIN_FAILURE Handle = 0x80072EEF WININET_E_INVALID_OPERATION Handle = 0x80072EF0 WININET_E_OPERATION_CANCELLED Handle = 0x80072EF1 WININET_E_INCORRECT_HANDLE_TYPE Handle = 0x80072EF2 WININET_E_INCORRECT_HANDLE_STATE Handle = 0x80072EF3 WININET_E_NOT_PROXY_REQUEST Handle = 0x80072EF4 WININET_E_REGISTRY_VALUE_NOT_FOUND Handle = 0x80072EF5 WININET_E_BAD_REGISTRY_PARAMETER Handle = 0x80072EF6 WININET_E_NO_DIRECT_ACCESS Handle = 0x80072EF7 WININET_E_NO_CONTEXT Handle = 0x80072EF8 WININET_E_NO_CALLBACK Handle = 0x80072EF9 WININET_E_REQUEST_PENDING Handle = 0x80072EFA WININET_E_INCORRECT_FORMAT Handle = 0x80072EFB WININET_E_ITEM_NOT_FOUND Handle = 0x80072EFC WININET_E_CANNOT_CONNECT Handle = 0x80072EFD WININET_E_CONNECTION_ABORTED Handle = 0x80072EFE WININET_E_CONNECTION_RESET Handle = 0x80072EFF WININET_E_FORCE_RETRY Handle = 0x80072F00 WININET_E_INVALID_PROXY_REQUEST Handle = 0x80072F01 WININET_E_NEED_UI Handle = 0x80072F02 WININET_E_HANDLE_EXISTS Handle = 0x80072F04 WININET_E_SEC_CERT_DATE_INVALID Handle = 0x80072F05 WININET_E_SEC_CERT_CN_INVALID Handle = 0x80072F06 WININET_E_HTTP_TO_HTTPS_ON_REDIR Handle = 0x80072F07 WININET_E_HTTPS_TO_HTTP_ON_REDIR Handle = 0x80072F08 WININET_E_MIXED_SECURITY Handle = 0x80072F09 WININET_E_CHG_POST_IS_NON_SECURE Handle = 0x80072F0A WININET_E_POST_IS_NON_SECURE Handle = 0x80072F0B WININET_E_CLIENT_AUTH_CERT_NEEDED Handle = 0x80072F0C WININET_E_INVALID_CA Handle = 0x80072F0D WININET_E_CLIENT_AUTH_NOT_SETUP Handle = 0x80072F0E WININET_E_ASYNC_THREAD_FAILED Handle = 0x80072F0F WININET_E_REDIRECT_SCHEME_CHANGE Handle = 0x80072F10 WININET_E_DIALOG_PENDING Handle = 0x80072F11 WININET_E_RETRY_DIALOG Handle = 0x80072F12 WININET_E_NO_NEW_CONTAINERS Handle = 0x80072F13 WININET_E_HTTPS_HTTP_SUBMIT_REDIR Handle = 0x80072F14 WININET_E_SEC_CERT_ERRORS Handle = 0x80072F17 WININET_E_SEC_CERT_REV_FAILED Handle = 0x80072F19 WININET_E_HEADER_NOT_FOUND Handle = 0x80072F76 WININET_E_DOWNLEVEL_SERVER Handle = 0x80072F77 WININET_E_INVALID_SERVER_RESPONSE Handle = 0x80072F78 WININET_E_INVALID_HEADER Handle = 0x80072F79 WININET_E_INVALID_QUERY_REQUEST Handle = 0x80072F7A WININET_E_HEADER_ALREADY_EXISTS Handle = 0x80072F7B WININET_E_REDIRECT_FAILED Handle = 0x80072F7C WININET_E_SECURITY_CHANNEL_ERROR Handle = 0x80072F7D WININET_E_UNABLE_TO_CACHE_FILE Handle = 0x80072F7E WININET_E_TCPIP_NOT_INSTALLED Handle = 0x80072F7F WININET_E_DISCONNECTED Handle = 0x80072F83 WININET_E_SERVER_UNREACHABLE Handle = 0x80072F84 WININET_E_PROXY_SERVER_UNREACHABLE Handle = 0x80072F85 WININET_E_BAD_AUTO_PROXY_SCRIPT Handle = 0x80072F86 WININET_E_UNABLE_TO_DOWNLOAD_SCRIPT Handle = 0x80072F87 WININET_E_SEC_INVALID_CERT Handle = 0x80072F89 WININET_E_SEC_CERT_REVOKED Handle = 0x80072F8A WININET_E_FAILED_DUETOSECURITYCHECK Handle = 0x80072F8B WININET_E_NOT_INITIALIZED Handle = 0x80072F8C WININET_E_LOGIN_FAILURE_DISPLAY_ENTITY_BODY Handle = 0x80072F8E WININET_E_DECODING_FAILED Handle = 0x80072F8F WININET_E_NOT_REDIRECTED Handle = 0x80072F80 WININET_E_COOKIE_NEEDS_CONFIRMATION Handle = 0x80072F81 WININET_E_COOKIE_DECLINED Handle = 0x80072F82 WININET_E_REDIRECT_NEEDS_CONFIRMATION Handle = 0x80072F88 SQLITE_E_ERROR Handle = 0x87AF0001 SQLITE_E_INTERNAL Handle = 0x87AF0002 SQLITE_E_PERM Handle = 0x87AF0003 SQLITE_E_ABORT Handle = 0x87AF0004 SQLITE_E_BUSY Handle = 0x87AF0005 SQLITE_E_LOCKED Handle = 0x87AF0006 SQLITE_E_NOMEM Handle = 0x87AF0007 SQLITE_E_READONLY Handle = 0x87AF0008 SQLITE_E_INTERRUPT Handle = 0x87AF0009 SQLITE_E_IOERR Handle = 0x87AF000A SQLITE_E_CORRUPT Handle = 0x87AF000B SQLITE_E_NOTFOUND Handle = 0x87AF000C SQLITE_E_FULL Handle = 0x87AF000D SQLITE_E_CANTOPEN Handle = 0x87AF000E SQLITE_E_PROTOCOL Handle = 0x87AF000F SQLITE_E_EMPTY Handle = 0x87AF0010 SQLITE_E_SCHEMA Handle = 0x87AF0011 SQLITE_E_TOOBIG Handle = 0x87AF0012 SQLITE_E_CONSTRAINT Handle = 0x87AF0013 SQLITE_E_MISMATCH Handle = 0x87AF0014 SQLITE_E_MISUSE Handle = 0x87AF0015 SQLITE_E_NOLFS Handle = 0x87AF0016 SQLITE_E_AUTH Handle = 0x87AF0017 SQLITE_E_FORMAT Handle = 0x87AF0018 SQLITE_E_RANGE Handle = 0x87AF0019 SQLITE_E_NOTADB Handle = 0x87AF001A SQLITE_E_NOTICE Handle = 0x87AF001B SQLITE_E_WARNING Handle = 0x87AF001C SQLITE_E_ROW Handle = 0x87AF0064 SQLITE_E_DONE Handle = 0x87AF0065 SQLITE_E_IOERR_READ Handle = 0x87AF010A SQLITE_E_IOERR_SHORT_READ Handle = 0x87AF020A SQLITE_E_IOERR_WRITE Handle = 0x87AF030A SQLITE_E_IOERR_FSYNC Handle = 0x87AF040A SQLITE_E_IOERR_DIR_FSYNC Handle = 0x87AF050A SQLITE_E_IOERR_TRUNCATE Handle = 0x87AF060A SQLITE_E_IOERR_FSTAT Handle = 0x87AF070A SQLITE_E_IOERR_UNLOCK Handle = 0x87AF080A SQLITE_E_IOERR_RDLOCK Handle = 0x87AF090A SQLITE_E_IOERR_DELETE Handle = 0x87AF0A0A SQLITE_E_IOERR_BLOCKED Handle = 0x87AF0B0A SQLITE_E_IOERR_NOMEM Handle = 0x87AF0C0A SQLITE_E_IOERR_ACCESS Handle = 0x87AF0D0A SQLITE_E_IOERR_CHECKRESERVEDLOCK Handle = 0x87AF0E0A SQLITE_E_IOERR_LOCK Handle = 0x87AF0F0A SQLITE_E_IOERR_CLOSE Handle = 0x87AF100A SQLITE_E_IOERR_DIR_CLOSE Handle = 0x87AF110A SQLITE_E_IOERR_SHMOPEN Handle = 0x87AF120A SQLITE_E_IOERR_SHMSIZE Handle = 0x87AF130A SQLITE_E_IOERR_SHMLOCK Handle = 0x87AF140A SQLITE_E_IOERR_SHMMAP Handle = 0x87AF150A SQLITE_E_IOERR_SEEK Handle = 0x87AF160A SQLITE_E_IOERR_DELETE_NOENT Handle = 0x87AF170A SQLITE_E_IOERR_MMAP Handle = 0x87AF180A SQLITE_E_IOERR_GETTEMPPATH Handle = 0x87AF190A SQLITE_E_IOERR_CONVPATH Handle = 0x87AF1A0A SQLITE_E_IOERR_VNODE Handle = 0x87AF1A02 SQLITE_E_IOERR_AUTH Handle = 0x87AF1A03 SQLITE_E_LOCKED_SHAREDCACHE Handle = 0x87AF0106 SQLITE_E_BUSY_RECOVERY Handle = 0x87AF0105 SQLITE_E_BUSY_SNAPSHOT Handle = 0x87AF0205 SQLITE_E_CANTOPEN_NOTEMPDIR Handle = 0x87AF010E SQLITE_E_CANTOPEN_ISDIR Handle = 0x87AF020E SQLITE_E_CANTOPEN_FULLPATH Handle = 0x87AF030E SQLITE_E_CANTOPEN_CONVPATH Handle = 0x87AF040E SQLITE_E_CORRUPT_VTAB Handle = 0x87AF010B SQLITE_E_READONLY_RECOVERY Handle = 0x87AF0108 SQLITE_E_READONLY_CANTLOCK Handle = 0x87AF0208 SQLITE_E_READONLY_ROLLBACK Handle = 0x87AF0308 SQLITE_E_READONLY_DBMOVED Handle = 0x87AF0408 SQLITE_E_ABORT_ROLLBACK Handle = 0x87AF0204 SQLITE_E_CONSTRAINT_CHECK Handle = 0x87AF0113 SQLITE_E_CONSTRAINT_COMMITHOOK Handle = 0x87AF0213 SQLITE_E_CONSTRAINT_FOREIGNKEY Handle = 0x87AF0313 SQLITE_E_CONSTRAINT_FUNCTION Handle = 0x87AF0413 SQLITE_E_CONSTRAINT_NOTNULL Handle = 0x87AF0513 SQLITE_E_CONSTRAINT_PRIMARYKEY Handle = 0x87AF0613 SQLITE_E_CONSTRAINT_TRIGGER Handle = 0x87AF0713 SQLITE_E_CONSTRAINT_UNIQUE Handle = 0x87AF0813 SQLITE_E_CONSTRAINT_VTAB Handle = 0x87AF0913 SQLITE_E_CONSTRAINT_ROWID Handle = 0x87AF0A13 SQLITE_E_NOTICE_RECOVER_WAL Handle = 0x87AF011B SQLITE_E_NOTICE_RECOVER_ROLLBACK Handle = 0x87AF021B SQLITE_E_WARNING_AUTOINDEX Handle = 0x87AF011C UTC_E_TOGGLE_TRACE_STARTED Handle = 0x87C51001 UTC_E_ALTERNATIVE_TRACE_CANNOT_PREEMPT Handle = 0x87C51002 UTC_E_AOT_NOT_RUNNING Handle = 0x87C51003 UTC_E_SCRIPT_TYPE_INVALID Handle = 0x87C51004 UTC_E_SCENARIODEF_NOT_FOUND Handle = 0x87C51005 UTC_E_TRACEPROFILE_NOT_FOUND Handle = 0x87C51006 UTC_E_FORWARDER_ALREADY_ENABLED Handle = 0x87C51007 UTC_E_FORWARDER_ALREADY_DISABLED Handle = 0x87C51008 UTC_E_EVENTLOG_ENTRY_MALFORMED Handle = 0x87C51009 UTC_E_DIAGRULES_SCHEMAVERSION_MISMATCH Handle = 0x87C5100A UTC_E_SCRIPT_TERMINATED Handle = 0x87C5100B UTC_E_INVALID_CUSTOM_FILTER Handle = 0x87C5100C UTC_E_TRACE_NOT_RUNNING Handle = 0x87C5100D UTC_E_REESCALATED_TOO_QUICKLY Handle = 0x87C5100E UTC_E_ESCALATION_ALREADY_RUNNING Handle = 0x87C5100F UTC_E_PERFTRACK_ALREADY_TRACING Handle = 0x87C51010 UTC_E_REACHED_MAX_ESCALATIONS Handle = 0x87C51011 UTC_E_FORWARDER_PRODUCER_MISMATCH Handle = 0x87C51012 UTC_E_INTENTIONAL_SCRIPT_FAILURE Handle = 0x87C51013 UTC_E_SQM_INIT_FAILED Handle = 0x87C51014 UTC_E_NO_WER_LOGGER_SUPPORTED Handle = 0x87C51015 UTC_E_TRACERS_DONT_EXIST Handle = 0x87C51016 UTC_E_WINRT_INIT_FAILED Handle = 0x87C51017 UTC_E_SCENARIODEF_SCHEMAVERSION_MISMATCH Handle = 0x87C51018 UTC_E_INVALID_FILTER Handle = 0x87C51019 UTC_E_EXE_TERMINATED Handle = 0x87C5101A UTC_E_ESCALATION_NOT_AUTHORIZED Handle = 0x87C5101B UTC_E_SETUP_NOT_AUTHORIZED Handle = 0x87C5101C UTC_E_CHILD_PROCESS_FAILED Handle = 0x87C5101D UTC_E_COMMAND_LINE_NOT_AUTHORIZED Handle = 0x87C5101E UTC_E_CANNOT_LOAD_SCENARIO_EDITOR_XML Handle = 0x87C5101F UTC_E_ESCALATION_TIMED_OUT Handle = 0x87C51020 UTC_E_SETUP_TIMED_OUT Handle = 0x87C51021 UTC_E_TRIGGER_MISMATCH Handle = 0x87C51022 UTC_E_TRIGGER_NOT_FOUND Handle = 0x87C51023 UTC_E_SIF_NOT_SUPPORTED Handle = 0x87C51024 UTC_E_DELAY_TERMINATED Handle = 0x87C51025 UTC_E_DEVICE_TICKET_ERROR Handle = 0x87C51026 UTC_E_TRACE_BUFFER_LIMIT_EXCEEDED Handle = 0x87C51027 UTC_E_API_RESULT_UNAVAILABLE Handle = 0x87C51028 UTC_E_RPC_TIMEOUT Handle = 0x87C51029 UTC_E_RPC_WAIT_FAILED Handle = 0x87C5102A UTC_E_API_BUSY Handle = 0x87C5102B UTC_E_TRACE_MIN_DURATION_REQUIREMENT_NOT_MET Handle = 0x87C5102C UTC_E_EXCLUSIVITY_NOT_AVAILABLE Handle = 0x87C5102D UTC_E_GETFILE_FILE_PATH_NOT_APPROVED Handle = 0x87C5102E UTC_E_ESCALATION_DIRECTORY_ALREADY_EXISTS Handle = 0x87C5102F UTC_E_TIME_TRIGGER_ON_START_INVALID Handle = 0x87C51030 UTC_E_TIME_TRIGGER_ONLY_VALID_ON_SINGLE_TRANSITION Handle = 0x87C51031 UTC_E_TIME_TRIGGER_INVALID_TIME_RANGE Handle = 0x87C51032 UTC_E_MULTIPLE_TIME_TRIGGER_ON_SINGLE_STATE Handle = 0x87C51033 UTC_E_BINARY_MISSING Handle = 0x87C51034 UTC_E_NETWORK_CAPTURE_NOT_ALLOWED Handle = 0x87C51035 UTC_E_FAILED_TO_RESOLVE_CONTAINER_ID Handle = 0x87C51036 UTC_E_UNABLE_TO_RESOLVE_SESSION Handle = 0x87C51037 UTC_E_THROTTLED Handle = 0x87C51038 UTC_E_UNAPPROVED_SCRIPT Handle = 0x87C51039 UTC_E_SCRIPT_MISSING Handle = 0x87C5103A UTC_E_SCENARIO_THROTTLED Handle = 0x87C5103B UTC_E_API_NOT_SUPPORTED Handle = 0x87C5103C UTC_E_GETFILE_EXTERNAL_PATH_NOT_APPROVED Handle = 0x87C5103D UTC_E_TRY_GET_SCENARIO_TIMEOUT_EXCEEDED Handle = 0x87C5103E UTC_E_CERT_REV_FAILED Handle = 0x87C5103F UTC_E_FAILED_TO_START_NDISCAP Handle = 0x87C51040 UTC_E_KERNELDUMP_LIMIT_REACHED Handle = 0x87C51041 UTC_E_MISSING_AGGREGATE_EVENT_TAG Handle = 0x87C51042 UTC_E_INVALID_AGGREGATION_STRUCT Handle = 0x87C51043 UTC_E_ACTION_NOT_SUPPORTED_IN_DESTINATION Handle = 0x87C51044 UTC_E_FILTER_MISSING_ATTRIBUTE Handle = 0x87C51045 UTC_E_FILTER_INVALID_TYPE Handle = 0x87C51046 UTC_E_FILTER_VARIABLE_NOT_FOUND Handle = 0x87C51047 UTC_E_FILTER_FUNCTION_RESTRICTED Handle = 0x87C51048 UTC_E_FILTER_VERSION_MISMATCH Handle = 0x87C51049 UTC_E_FILTER_INVALID_FUNCTION Handle = 0x87C51050 UTC_E_FILTER_INVALID_FUNCTION_PARAMS Handle = 0x87C51051 UTC_E_FILTER_INVALID_COMMAND Handle = 0x87C51052 UTC_E_FILTER_ILLEGAL_EVAL Handle = 0x87C51053 UTC_E_TTTRACER_RETURNED_ERROR Handle = 0x87C51054 UTC_E_AGENT_DIAGNOSTICS_TOO_LARGE Handle = 0x87C51055 UTC_E_FAILED_TO_RECEIVE_AGENT_DIAGNOSTICS Handle = 0x87C51056 UTC_E_SCENARIO_HAS_NO_ACTIONS Handle = 0x87C51057 UTC_E_TTTRACER_STORAGE_FULL Handle = 0x87C51058 UTC_E_INSUFFICIENT_SPACE_TO_START_TRACE Handle = 0x87C51059 UTC_E_ESCALATION_CANCELLED_AT_SHUTDOWN Handle = 0x87C5105A UTC_E_GETFILEINFOACTION_FILE_NOT_APPROVED Handle = 0x87C5105B UTC_E_SETREGKEYACTION_TYPE_NOT_APPROVED Handle = 0x87C5105C WINML_ERR_INVALID_DEVICE Handle = 0x88900001 WINML_ERR_INVALID_BINDING Handle = 0x88900002 WINML_ERR_VALUE_NOTFOUND Handle = 0x88900003 WINML_ERR_SIZE_MISMATCH Handle = 0x88900004 STATUS_WAIT_0 NTStatus = 0x00000000 STATUS_SUCCESS NTStatus = 0x00000000 STATUS_WAIT_1 NTStatus = 0x00000001 STATUS_WAIT_2 NTStatus = 0x00000002 STATUS_WAIT_3 NTStatus = 0x00000003 STATUS_WAIT_63 NTStatus = 0x0000003F STATUS_ABANDONED NTStatus = 0x00000080 STATUS_ABANDONED_WAIT_0 NTStatus = 0x00000080 STATUS_ABANDONED_WAIT_63 NTStatus = 0x000000BF STATUS_USER_APC NTStatus = 0x000000C0 STATUS_ALREADY_COMPLETE NTStatus = 0x000000FF STATUS_KERNEL_APC NTStatus = 0x00000100 STATUS_ALERTED NTStatus = 0x00000101 STATUS_TIMEOUT NTStatus = 0x00000102 STATUS_PENDING NTStatus = 0x00000103 STATUS_REPARSE NTStatus = 0x00000104 STATUS_MORE_ENTRIES NTStatus = 0x00000105 STATUS_NOT_ALL_ASSIGNED NTStatus = 0x00000106 STATUS_SOME_NOT_MAPPED NTStatus = 0x00000107 STATUS_OPLOCK_BREAK_IN_PROGRESS NTStatus = 0x00000108 STATUS_VOLUME_MOUNTED NTStatus = 0x00000109 STATUS_RXACT_COMMITTED NTStatus = 0x0000010A STATUS_NOTIFY_CLEANUP NTStatus = 0x0000010B STATUS_NOTIFY_ENUM_DIR NTStatus = 0x0000010C STATUS_NO_QUOTAS_FOR_ACCOUNT NTStatus = 0x0000010D STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED NTStatus = 0x0000010E STATUS_PAGE_FAULT_TRANSITION NTStatus = 0x00000110 STATUS_PAGE_FAULT_DEMAND_ZERO NTStatus = 0x00000111 STATUS_PAGE_FAULT_COPY_ON_WRITE NTStatus = 0x00000112 STATUS_PAGE_FAULT_GUARD_PAGE NTStatus = 0x00000113 STATUS_PAGE_FAULT_PAGING_FILE NTStatus = 0x00000114 STATUS_CACHE_PAGE_LOCKED NTStatus = 0x00000115 STATUS_CRASH_DUMP NTStatus = 0x00000116 STATUS_BUFFER_ALL_ZEROS NTStatus = 0x00000117 STATUS_REPARSE_OBJECT NTStatus = 0x00000118 STATUS_RESOURCE_REQUIREMENTS_CHANGED NTStatus = 0x00000119 STATUS_TRANSLATION_COMPLETE NTStatus = 0x00000120 STATUS_DS_MEMBERSHIP_EVALUATED_LOCALLY NTStatus = 0x00000121 STATUS_NOTHING_TO_TERMINATE NTStatus = 0x00000122 STATUS_PROCESS_NOT_IN_JOB NTStatus = 0x00000123 STATUS_PROCESS_IN_JOB NTStatus = 0x00000124 STATUS_VOLSNAP_HIBERNATE_READY NTStatus = 0x00000125 STATUS_FSFILTER_OP_COMPLETED_SUCCESSFULLY NTStatus = 0x00000126 STATUS_INTERRUPT_VECTOR_ALREADY_CONNECTED NTStatus = 0x00000127 STATUS_INTERRUPT_STILL_CONNECTED NTStatus = 0x00000128 STATUS_PROCESS_CLONED NTStatus = 0x00000129 STATUS_FILE_LOCKED_WITH_ONLY_READERS NTStatus = 0x0000012A STATUS_FILE_LOCKED_WITH_WRITERS NTStatus = 0x0000012B STATUS_VALID_IMAGE_HASH NTStatus = 0x0000012C STATUS_VALID_CATALOG_HASH NTStatus = 0x0000012D STATUS_VALID_STRONG_CODE_HASH NTStatus = 0x0000012E STATUS_GHOSTED NTStatus = 0x0000012F STATUS_DATA_OVERWRITTEN NTStatus = 0x00000130 STATUS_RESOURCEMANAGER_READ_ONLY NTStatus = 0x00000202 STATUS_RING_PREVIOUSLY_EMPTY NTStatus = 0x00000210 STATUS_RING_PREVIOUSLY_FULL NTStatus = 0x00000211 STATUS_RING_PREVIOUSLY_ABOVE_QUOTA NTStatus = 0x00000212 STATUS_RING_NEWLY_EMPTY NTStatus = 0x00000213 STATUS_RING_SIGNAL_OPPOSITE_ENDPOINT NTStatus = 0x00000214 STATUS_OPLOCK_SWITCHED_TO_NEW_HANDLE NTStatus = 0x00000215 STATUS_OPLOCK_HANDLE_CLOSED NTStatus = 0x00000216 STATUS_WAIT_FOR_OPLOCK NTStatus = 0x00000367 STATUS_REPARSE_GLOBAL NTStatus = 0x00000368 STATUS_FLT_IO_COMPLETE NTStatus = 0x001C0001 STATUS_OBJECT_NAME_EXISTS NTStatus = 0x40000000 STATUS_THREAD_WAS_SUSPENDED NTStatus = 0x40000001 STATUS_WORKING_SET_LIMIT_RANGE NTStatus = 0x40000002 STATUS_IMAGE_NOT_AT_BASE NTStatus = 0x40000003 STATUS_RXACT_STATE_CREATED NTStatus = 0x40000004 STATUS_SEGMENT_NOTIFICATION NTStatus = 0x40000005 STATUS_LOCAL_USER_SESSION_KEY NTStatus = 0x40000006 STATUS_BAD_CURRENT_DIRECTORY NTStatus = 0x40000007 STATUS_SERIAL_MORE_WRITES NTStatus = 0x40000008 STATUS_REGISTRY_RECOVERED NTStatus = 0x40000009 STATUS_FT_READ_RECOVERY_FROM_BACKUP NTStatus = 0x4000000A STATUS_FT_WRITE_RECOVERY NTStatus = 0x4000000B STATUS_SERIAL_COUNTER_TIMEOUT NTStatus = 0x4000000C STATUS_NULL_LM_PASSWORD NTStatus = 0x4000000D STATUS_IMAGE_MACHINE_TYPE_MISMATCH NTStatus = 0x4000000E STATUS_RECEIVE_PARTIAL NTStatus = 0x4000000F STATUS_RECEIVE_EXPEDITED NTStatus = 0x40000010 STATUS_RECEIVE_PARTIAL_EXPEDITED NTStatus = 0x40000011 STATUS_EVENT_DONE NTStatus = 0x40000012 STATUS_EVENT_PENDING NTStatus = 0x40000013 STATUS_CHECKING_FILE_SYSTEM NTStatus = 0x40000014 STATUS_FATAL_APP_EXIT NTStatus = 0x40000015 STATUS_PREDEFINED_HANDLE NTStatus = 0x40000016 STATUS_WAS_UNLOCKED NTStatus = 0x40000017 STATUS_SERVICE_NOTIFICATION NTStatus = 0x40000018 STATUS_WAS_LOCKED NTStatus = 0x40000019 STATUS_LOG_HARD_ERROR NTStatus = 0x4000001A STATUS_ALREADY_WIN32 NTStatus = 0x4000001B STATUS_WX86_UNSIMULATE NTStatus = 0x4000001C STATUS_WX86_CONTINUE NTStatus = 0x4000001D STATUS_WX86_SINGLE_STEP NTStatus = 0x4000001E STATUS_WX86_BREAKPOINT NTStatus = 0x4000001F STATUS_WX86_EXCEPTION_CONTINUE NTStatus = 0x40000020 STATUS_WX86_EXCEPTION_LASTCHANCE NTStatus = 0x40000021 STATUS_WX86_EXCEPTION_CHAIN NTStatus = 0x40000022 STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE NTStatus = 0x40000023 STATUS_NO_YIELD_PERFORMED NTStatus = 0x40000024 STATUS_TIMER_RESUME_IGNORED NTStatus = 0x40000025 STATUS_ARBITRATION_UNHANDLED NTStatus = 0x40000026 STATUS_CARDBUS_NOT_SUPPORTED NTStatus = 0x40000027 STATUS_WX86_CREATEWX86TIB NTStatus = 0x40000028 STATUS_MP_PROCESSOR_MISMATCH NTStatus = 0x40000029 STATUS_HIBERNATED NTStatus = 0x4000002A STATUS_RESUME_HIBERNATION NTStatus = 0x4000002B STATUS_FIRMWARE_UPDATED NTStatus = 0x4000002C STATUS_DRIVERS_LEAKING_LOCKED_PAGES NTStatus = 0x4000002D STATUS_MESSAGE_RETRIEVED NTStatus = 0x4000002E STATUS_SYSTEM_POWERSTATE_TRANSITION NTStatus = 0x4000002F STATUS_ALPC_CHECK_COMPLETION_LIST NTStatus = 0x40000030 STATUS_SYSTEM_POWERSTATE_COMPLEX_TRANSITION NTStatus = 0x40000031 STATUS_ACCESS_AUDIT_BY_POLICY NTStatus = 0x40000032 STATUS_ABANDON_HIBERFILE NTStatus = 0x40000033 STATUS_BIZRULES_NOT_ENABLED NTStatus = 0x40000034 STATUS_FT_READ_FROM_COPY NTStatus = 0x40000035 STATUS_IMAGE_AT_DIFFERENT_BASE NTStatus = 0x40000036 STATUS_PATCH_DEFERRED NTStatus = 0x40000037 STATUS_HEURISTIC_DAMAGE_POSSIBLE NTStatus = 0x40190001 STATUS_GUARD_PAGE_VIOLATION NTStatus = 0x80000001 STATUS_DATATYPE_MISALIGNMENT NTStatus = 0x80000002 STATUS_BREAKPOINT NTStatus = 0x80000003 STATUS_SINGLE_STEP NTStatus = 0x80000004 STATUS_BUFFER_OVERFLOW NTStatus = 0x80000005 STATUS_NO_MORE_FILES NTStatus = 0x80000006 STATUS_WAKE_SYSTEM_DEBUGGER NTStatus = 0x80000007 STATUS_HANDLES_CLOSED NTStatus = 0x8000000A STATUS_NO_INHERITANCE NTStatus = 0x8000000B STATUS_GUID_SUBSTITUTION_MADE NTStatus = 0x8000000C STATUS_PARTIAL_COPY NTStatus = 0x8000000D STATUS_DEVICE_PAPER_EMPTY NTStatus = 0x8000000E STATUS_DEVICE_POWERED_OFF NTStatus = 0x8000000F STATUS_DEVICE_OFF_LINE NTStatus = 0x80000010 STATUS_DEVICE_BUSY NTStatus = 0x80000011 STATUS_NO_MORE_EAS NTStatus = 0x80000012 STATUS_INVALID_EA_NAME NTStatus = 0x80000013 STATUS_EA_LIST_INCONSISTENT NTStatus = 0x80000014 STATUS_INVALID_EA_FLAG NTStatus = 0x80000015 STATUS_VERIFY_REQUIRED NTStatus = 0x80000016 STATUS_EXTRANEOUS_INFORMATION NTStatus = 0x80000017 STATUS_RXACT_COMMIT_NECESSARY NTStatus = 0x80000018 STATUS_NO_MORE_ENTRIES NTStatus = 0x8000001A STATUS_FILEMARK_DETECTED NTStatus = 0x8000001B STATUS_MEDIA_CHANGED NTStatus = 0x8000001C STATUS_BUS_RESET NTStatus = 0x8000001D STATUS_END_OF_MEDIA NTStatus = 0x8000001E STATUS_BEGINNING_OF_MEDIA NTStatus = 0x8000001F STATUS_MEDIA_CHECK NTStatus = 0x80000020 STATUS_SETMARK_DETECTED NTStatus = 0x80000021 STATUS_NO_DATA_DETECTED NTStatus = 0x80000022 STATUS_REDIRECTOR_HAS_OPEN_HANDLES NTStatus = 0x80000023 STATUS_SERVER_HAS_OPEN_HANDLES NTStatus = 0x80000024 STATUS_ALREADY_DISCONNECTED NTStatus = 0x80000025 STATUS_LONGJUMP NTStatus = 0x80000026 STATUS_CLEANER_CARTRIDGE_INSTALLED NTStatus = 0x80000027 STATUS_PLUGPLAY_QUERY_VETOED NTStatus = 0x80000028 STATUS_UNWIND_CONSOLIDATE NTStatus = 0x80000029 STATUS_REGISTRY_HIVE_RECOVERED NTStatus = 0x8000002A STATUS_DLL_MIGHT_BE_INSECURE NTStatus = 0x8000002B STATUS_DLL_MIGHT_BE_INCOMPATIBLE NTStatus = 0x8000002C STATUS_STOPPED_ON_SYMLINK NTStatus = 0x8000002D STATUS_CANNOT_GRANT_REQUESTED_OPLOCK NTStatus = 0x8000002E STATUS_NO_ACE_CONDITION NTStatus = 0x8000002F STATUS_DEVICE_SUPPORT_IN_PROGRESS NTStatus = 0x80000030 STATUS_DEVICE_POWER_CYCLE_REQUIRED NTStatus = 0x80000031 STATUS_NO_WORK_DONE NTStatus = 0x80000032 STATUS_CLUSTER_NODE_ALREADY_UP NTStatus = 0x80130001 STATUS_CLUSTER_NODE_ALREADY_DOWN NTStatus = 0x80130002 STATUS_CLUSTER_NETWORK_ALREADY_ONLINE NTStatus = 0x80130003 STATUS_CLUSTER_NETWORK_ALREADY_OFFLINE NTStatus = 0x80130004 STATUS_CLUSTER_NODE_ALREADY_MEMBER NTStatus = 0x80130005 STATUS_FLT_BUFFER_TOO_SMALL NTStatus = 0x801C0001 STATUS_FVE_PARTIAL_METADATA NTStatus = 0x80210001 STATUS_FVE_TRANSIENT_STATE NTStatus = 0x80210002 STATUS_CLOUD_FILE_PROPERTY_BLOB_CHECKSUM_MISMATCH NTStatus = 0x8000CF00 STATUS_UNSUCCESSFUL NTStatus = 0xC0000001 STATUS_NOT_IMPLEMENTED NTStatus = 0xC0000002 STATUS_INVALID_INFO_CLASS NTStatus = 0xC0000003 STATUS_INFO_LENGTH_MISMATCH NTStatus = 0xC0000004 STATUS_ACCESS_VIOLATION NTStatus = 0xC0000005 STATUS_IN_PAGE_ERROR NTStatus = 0xC0000006 STATUS_PAGEFILE_QUOTA NTStatus = 0xC0000007 STATUS_INVALID_HANDLE NTStatus = 0xC0000008 STATUS_BAD_INITIAL_STACK NTStatus = 0xC0000009 STATUS_BAD_INITIAL_PC NTStatus = 0xC000000A STATUS_INVALID_CID NTStatus = 0xC000000B STATUS_TIMER_NOT_CANCELED NTStatus = 0xC000000C STATUS_INVALID_PARAMETER NTStatus = 0xC000000D STATUS_NO_SUCH_DEVICE NTStatus = 0xC000000E STATUS_NO_SUCH_FILE NTStatus = 0xC000000F STATUS_INVALID_DEVICE_REQUEST NTStatus = 0xC0000010 STATUS_END_OF_FILE NTStatus = 0xC0000011 STATUS_WRONG_VOLUME NTStatus = 0xC0000012 STATUS_NO_MEDIA_IN_DEVICE NTStatus = 0xC0000013 STATUS_UNRECOGNIZED_MEDIA NTStatus = 0xC0000014 STATUS_NONEXISTENT_SECTOR NTStatus = 0xC0000015 STATUS_MORE_PROCESSING_REQUIRED NTStatus = 0xC0000016 STATUS_NO_MEMORY NTStatus = 0xC0000017 STATUS_CONFLICTING_ADDRESSES NTStatus = 0xC0000018 STATUS_NOT_MAPPED_VIEW NTStatus = 0xC0000019 STATUS_UNABLE_TO_FREE_VM NTStatus = 0xC000001A STATUS_UNABLE_TO_DELETE_SECTION NTStatus = 0xC000001B STATUS_INVALID_SYSTEM_SERVICE NTStatus = 0xC000001C STATUS_ILLEGAL_INSTRUCTION NTStatus = 0xC000001D STATUS_INVALID_LOCK_SEQUENCE NTStatus = 0xC000001E STATUS_INVALID_VIEW_SIZE NTStatus = 0xC000001F STATUS_INVALID_FILE_FOR_SECTION NTStatus = 0xC0000020 STATUS_ALREADY_COMMITTED NTStatus = 0xC0000021 STATUS_ACCESS_DENIED NTStatus = 0xC0000022 STATUS_BUFFER_TOO_SMALL NTStatus = 0xC0000023 STATUS_OBJECT_TYPE_MISMATCH NTStatus = 0xC0000024 STATUS_NONCONTINUABLE_EXCEPTION NTStatus = 0xC0000025 STATUS_INVALID_DISPOSITION NTStatus = 0xC0000026 STATUS_UNWIND NTStatus = 0xC0000027 STATUS_BAD_STACK NTStatus = 0xC0000028 STATUS_INVALID_UNWIND_TARGET NTStatus = 0xC0000029 STATUS_NOT_LOCKED NTStatus = 0xC000002A STATUS_PARITY_ERROR NTStatus = 0xC000002B STATUS_UNABLE_TO_DECOMMIT_VM NTStatus = 0xC000002C STATUS_NOT_COMMITTED NTStatus = 0xC000002D STATUS_INVALID_PORT_ATTRIBUTES NTStatus = 0xC000002E STATUS_PORT_MESSAGE_TOO_LONG NTStatus = 0xC000002F STATUS_INVALID_PARAMETER_MIX NTStatus = 0xC0000030 STATUS_INVALID_QUOTA_LOWER NTStatus = 0xC0000031 STATUS_DISK_CORRUPT_ERROR NTStatus = 0xC0000032 STATUS_OBJECT_NAME_INVALID NTStatus = 0xC0000033 STATUS_OBJECT_NAME_NOT_FOUND NTStatus = 0xC0000034 STATUS_OBJECT_NAME_COLLISION NTStatus = 0xC0000035 STATUS_PORT_DO_NOT_DISTURB NTStatus = 0xC0000036 STATUS_PORT_DISCONNECTED NTStatus = 0xC0000037 STATUS_DEVICE_ALREADY_ATTACHED NTStatus = 0xC0000038 STATUS_OBJECT_PATH_INVALID NTStatus = 0xC0000039 STATUS_OBJECT_PATH_NOT_FOUND NTStatus = 0xC000003A STATUS_OBJECT_PATH_SYNTAX_BAD NTStatus = 0xC000003B STATUS_DATA_OVERRUN NTStatus = 0xC000003C STATUS_DATA_LATE_ERROR NTStatus = 0xC000003D STATUS_DATA_ERROR NTStatus = 0xC000003E STATUS_CRC_ERROR NTStatus = 0xC000003F STATUS_SECTION_TOO_BIG NTStatus = 0xC0000040 STATUS_PORT_CONNECTION_REFUSED NTStatus = 0xC0000041 STATUS_INVALID_PORT_HANDLE NTStatus = 0xC0000042 STATUS_SHARING_VIOLATION NTStatus = 0xC0000043 STATUS_QUOTA_EXCEEDED NTStatus = 0xC0000044 STATUS_INVALID_PAGE_PROTECTION NTStatus = 0xC0000045 STATUS_MUTANT_NOT_OWNED NTStatus = 0xC0000046 STATUS_SEMAPHORE_LIMIT_EXCEEDED NTStatus = 0xC0000047 STATUS_PORT_ALREADY_SET NTStatus = 0xC0000048 STATUS_SECTION_NOT_IMAGE NTStatus = 0xC0000049 STATUS_SUSPEND_COUNT_EXCEEDED NTStatus = 0xC000004A STATUS_THREAD_IS_TERMINATING NTStatus = 0xC000004B STATUS_BAD_WORKING_SET_LIMIT NTStatus = 0xC000004C STATUS_INCOMPATIBLE_FILE_MAP NTStatus = 0xC000004D STATUS_SECTION_PROTECTION NTStatus = 0xC000004E STATUS_EAS_NOT_SUPPORTED NTStatus = 0xC000004F STATUS_EA_TOO_LARGE NTStatus = 0xC0000050 STATUS_NONEXISTENT_EA_ENTRY NTStatus = 0xC0000051 STATUS_NO_EAS_ON_FILE NTStatus = 0xC0000052 STATUS_EA_CORRUPT_ERROR NTStatus = 0xC0000053 STATUS_FILE_LOCK_CONFLICT NTStatus = 0xC0000054 STATUS_LOCK_NOT_GRANTED NTStatus = 0xC0000055 STATUS_DELETE_PENDING NTStatus = 0xC0000056 STATUS_CTL_FILE_NOT_SUPPORTED NTStatus = 0xC0000057 STATUS_UNKNOWN_REVISION NTStatus = 0xC0000058 STATUS_REVISION_MISMATCH NTStatus = 0xC0000059 STATUS_INVALID_OWNER NTStatus = 0xC000005A STATUS_INVALID_PRIMARY_GROUP NTStatus = 0xC000005B STATUS_NO_IMPERSONATION_TOKEN NTStatus = 0xC000005C STATUS_CANT_DISABLE_MANDATORY NTStatus = 0xC000005D STATUS_NO_LOGON_SERVERS NTStatus = 0xC000005E STATUS_NO_SUCH_LOGON_SESSION NTStatus = 0xC000005F STATUS_NO_SUCH_PRIVILEGE NTStatus = 0xC0000060 STATUS_PRIVILEGE_NOT_HELD NTStatus = 0xC0000061 STATUS_INVALID_ACCOUNT_NAME NTStatus = 0xC0000062 STATUS_USER_EXISTS NTStatus = 0xC0000063 STATUS_NO_SUCH_USER NTStatus = 0xC0000064 STATUS_GROUP_EXISTS NTStatus = 0xC0000065 STATUS_NO_SUCH_GROUP NTStatus = 0xC0000066 STATUS_MEMBER_IN_GROUP NTStatus = 0xC0000067 STATUS_MEMBER_NOT_IN_GROUP NTStatus = 0xC0000068 STATUS_LAST_ADMIN NTStatus = 0xC0000069 STATUS_WRONG_PASSWORD NTStatus = 0xC000006A STATUS_ILL_FORMED_PASSWORD NTStatus = 0xC000006B STATUS_PASSWORD_RESTRICTION NTStatus = 0xC000006C STATUS_LOGON_FAILURE NTStatus = 0xC000006D STATUS_ACCOUNT_RESTRICTION NTStatus = 0xC000006E STATUS_INVALID_LOGON_HOURS NTStatus = 0xC000006F STATUS_INVALID_WORKSTATION NTStatus = 0xC0000070 STATUS_PASSWORD_EXPIRED NTStatus = 0xC0000071 STATUS_ACCOUNT_DISABLED NTStatus = 0xC0000072 STATUS_NONE_MAPPED NTStatus = 0xC0000073 STATUS_TOO_MANY_LUIDS_REQUESTED NTStatus = 0xC0000074 STATUS_LUIDS_EXHAUSTED NTStatus = 0xC0000075 STATUS_INVALID_SUB_AUTHORITY NTStatus = 0xC0000076 STATUS_INVALID_ACL NTStatus = 0xC0000077 STATUS_INVALID_SID NTStatus = 0xC0000078 STATUS_INVALID_SECURITY_DESCR NTStatus = 0xC0000079 STATUS_PROCEDURE_NOT_FOUND NTStatus = 0xC000007A STATUS_INVALID_IMAGE_FORMAT NTStatus = 0xC000007B STATUS_NO_TOKEN NTStatus = 0xC000007C STATUS_BAD_INHERITANCE_ACL NTStatus = 0xC000007D STATUS_RANGE_NOT_LOCKED NTStatus = 0xC000007E STATUS_DISK_FULL NTStatus = 0xC000007F STATUS_SERVER_DISABLED NTStatus = 0xC0000080 STATUS_SERVER_NOT_DISABLED NTStatus = 0xC0000081 STATUS_TOO_MANY_GUIDS_REQUESTED NTStatus = 0xC0000082 STATUS_GUIDS_EXHAUSTED NTStatus = 0xC0000083 STATUS_INVALID_ID_AUTHORITY NTStatus = 0xC0000084 STATUS_AGENTS_EXHAUSTED NTStatus = 0xC0000085 STATUS_INVALID_VOLUME_LABEL NTStatus = 0xC0000086 STATUS_SECTION_NOT_EXTENDED NTStatus = 0xC0000087 STATUS_NOT_MAPPED_DATA NTStatus = 0xC0000088 STATUS_RESOURCE_DATA_NOT_FOUND NTStatus = 0xC0000089 STATUS_RESOURCE_TYPE_NOT_FOUND NTStatus = 0xC000008A STATUS_RESOURCE_NAME_NOT_FOUND NTStatus = 0xC000008B STATUS_ARRAY_BOUNDS_EXCEEDED NTStatus = 0xC000008C STATUS_FLOAT_DENORMAL_OPERAND NTStatus = 0xC000008D STATUS_FLOAT_DIVIDE_BY_ZERO NTStatus = 0xC000008E STATUS_FLOAT_INEXACT_RESULT NTStatus = 0xC000008F STATUS_FLOAT_INVALID_OPERATION NTStatus = 0xC0000090 STATUS_FLOAT_OVERFLOW NTStatus = 0xC0000091 STATUS_FLOAT_STACK_CHECK NTStatus = 0xC0000092 STATUS_FLOAT_UNDERFLOW NTStatus = 0xC0000093 STATUS_INTEGER_DIVIDE_BY_ZERO NTStatus = 0xC0000094 STATUS_INTEGER_OVERFLOW NTStatus = 0xC0000095 STATUS_PRIVILEGED_INSTRUCTION NTStatus = 0xC0000096 STATUS_TOO_MANY_PAGING_FILES NTStatus = 0xC0000097 STATUS_FILE_INVALID NTStatus = 0xC0000098 STATUS_ALLOTTED_SPACE_EXCEEDED NTStatus = 0xC0000099 STATUS_INSUFFICIENT_RESOURCES NTStatus = 0xC000009A STATUS_DFS_EXIT_PATH_FOUND NTStatus = 0xC000009B STATUS_DEVICE_DATA_ERROR NTStatus = 0xC000009C STATUS_DEVICE_NOT_CONNECTED NTStatus = 0xC000009D STATUS_DEVICE_POWER_FAILURE NTStatus = 0xC000009E STATUS_FREE_VM_NOT_AT_BASE NTStatus = 0xC000009F STATUS_MEMORY_NOT_ALLOCATED NTStatus = 0xC00000A0 STATUS_WORKING_SET_QUOTA NTStatus = 0xC00000A1 STATUS_MEDIA_WRITE_PROTECTED NTStatus = 0xC00000A2 STATUS_DEVICE_NOT_READY NTStatus = 0xC00000A3 STATUS_INVALID_GROUP_ATTRIBUTES NTStatus = 0xC00000A4 STATUS_BAD_IMPERSONATION_LEVEL NTStatus = 0xC00000A5 STATUS_CANT_OPEN_ANONYMOUS NTStatus = 0xC00000A6 STATUS_BAD_VALIDATION_CLASS NTStatus = 0xC00000A7 STATUS_BAD_TOKEN_TYPE NTStatus = 0xC00000A8 STATUS_BAD_MASTER_BOOT_RECORD NTStatus = 0xC00000A9 STATUS_INSTRUCTION_MISALIGNMENT NTStatus = 0xC00000AA STATUS_INSTANCE_NOT_AVAILABLE NTStatus = 0xC00000AB STATUS_PIPE_NOT_AVAILABLE NTStatus = 0xC00000AC STATUS_INVALID_PIPE_STATE NTStatus = 0xC00000AD STATUS_PIPE_BUSY NTStatus = 0xC00000AE STATUS_ILLEGAL_FUNCTION NTStatus = 0xC00000AF STATUS_PIPE_DISCONNECTED NTStatus = 0xC00000B0 STATUS_PIPE_CLOSING NTStatus = 0xC00000B1 STATUS_PIPE_CONNECTED NTStatus = 0xC00000B2 STATUS_PIPE_LISTENING NTStatus = 0xC00000B3 STATUS_INVALID_READ_MODE NTStatus = 0xC00000B4 STATUS_IO_TIMEOUT NTStatus = 0xC00000B5 STATUS_FILE_FORCED_CLOSED NTStatus = 0xC00000B6 STATUS_PROFILING_NOT_STARTED NTStatus = 0xC00000B7 STATUS_PROFILING_NOT_STOPPED NTStatus = 0xC00000B8 STATUS_COULD_NOT_INTERPRET NTStatus = 0xC00000B9 STATUS_FILE_IS_A_DIRECTORY NTStatus = 0xC00000BA STATUS_NOT_SUPPORTED NTStatus = 0xC00000BB STATUS_REMOTE_NOT_LISTENING NTStatus = 0xC00000BC STATUS_DUPLICATE_NAME NTStatus = 0xC00000BD STATUS_BAD_NETWORK_PATH NTStatus = 0xC00000BE STATUS_NETWORK_BUSY NTStatus = 0xC00000BF STATUS_DEVICE_DOES_NOT_EXIST NTStatus = 0xC00000C0 STATUS_TOO_MANY_COMMANDS NTStatus = 0xC00000C1 STATUS_ADAPTER_HARDWARE_ERROR NTStatus = 0xC00000C2 STATUS_INVALID_NETWORK_RESPONSE NTStatus = 0xC00000C3 STATUS_UNEXPECTED_NETWORK_ERROR NTStatus = 0xC00000C4 STATUS_BAD_REMOTE_ADAPTER NTStatus = 0xC00000C5 STATUS_PRINT_QUEUE_FULL NTStatus = 0xC00000C6 STATUS_NO_SPOOL_SPACE NTStatus = 0xC00000C7 STATUS_PRINT_CANCELLED NTStatus = 0xC00000C8 STATUS_NETWORK_NAME_DELETED NTStatus = 0xC00000C9 STATUS_NETWORK_ACCESS_DENIED NTStatus = 0xC00000CA STATUS_BAD_DEVICE_TYPE NTStatus = 0xC00000CB STATUS_BAD_NETWORK_NAME NTStatus = 0xC00000CC STATUS_TOO_MANY_NAMES NTStatus = 0xC00000CD STATUS_TOO_MANY_SESSIONS NTStatus = 0xC00000CE STATUS_SHARING_PAUSED NTStatus = 0xC00000CF STATUS_REQUEST_NOT_ACCEPTED NTStatus = 0xC00000D0 STATUS_REDIRECTOR_PAUSED NTStatus = 0xC00000D1 STATUS_NET_WRITE_FAULT NTStatus = 0xC00000D2 STATUS_PROFILING_AT_LIMIT NTStatus = 0xC00000D3 STATUS_NOT_SAME_DEVICE NTStatus = 0xC00000D4 STATUS_FILE_RENAMED NTStatus = 0xC00000D5 STATUS_VIRTUAL_CIRCUIT_CLOSED NTStatus = 0xC00000D6 STATUS_NO_SECURITY_ON_OBJECT NTStatus = 0xC00000D7 STATUS_CANT_WAIT NTStatus = 0xC00000D8 STATUS_PIPE_EMPTY NTStatus = 0xC00000D9 STATUS_CANT_ACCESS_DOMAIN_INFO NTStatus = 0xC00000DA STATUS_CANT_TERMINATE_SELF NTStatus = 0xC00000DB STATUS_INVALID_SERVER_STATE NTStatus = 0xC00000DC STATUS_INVALID_DOMAIN_STATE NTStatus = 0xC00000DD STATUS_INVALID_DOMAIN_ROLE NTStatus = 0xC00000DE STATUS_NO_SUCH_DOMAIN NTStatus = 0xC00000DF STATUS_DOMAIN_EXISTS NTStatus = 0xC00000E0 STATUS_DOMAIN_LIMIT_EXCEEDED NTStatus = 0xC00000E1 STATUS_OPLOCK_NOT_GRANTED NTStatus = 0xC00000E2 STATUS_INVALID_OPLOCK_PROTOCOL NTStatus = 0xC00000E3 STATUS_INTERNAL_DB_CORRUPTION NTStatus = 0xC00000E4 STATUS_INTERNAL_ERROR NTStatus = 0xC00000E5 STATUS_GENERIC_NOT_MAPPED NTStatus = 0xC00000E6 STATUS_BAD_DESCRIPTOR_FORMAT NTStatus = 0xC00000E7 STATUS_INVALID_USER_BUFFER NTStatus = 0xC00000E8 STATUS_UNEXPECTED_IO_ERROR NTStatus = 0xC00000E9 STATUS_UNEXPECTED_MM_CREATE_ERR NTStatus = 0xC00000EA STATUS_UNEXPECTED_MM_MAP_ERROR NTStatus = 0xC00000EB STATUS_UNEXPECTED_MM_EXTEND_ERR NTStatus = 0xC00000EC STATUS_NOT_LOGON_PROCESS NTStatus = 0xC00000ED STATUS_LOGON_SESSION_EXISTS NTStatus = 0xC00000EE STATUS_INVALID_PARAMETER_1 NTStatus = 0xC00000EF STATUS_INVALID_PARAMETER_2 NTStatus = 0xC00000F0 STATUS_INVALID_PARAMETER_3 NTStatus = 0xC00000F1 STATUS_INVALID_PARAMETER_4 NTStatus = 0xC00000F2 STATUS_INVALID_PARAMETER_5 NTStatus = 0xC00000F3 STATUS_INVALID_PARAMETER_6 NTStatus = 0xC00000F4 STATUS_INVALID_PARAMETER_7 NTStatus = 0xC00000F5 STATUS_INVALID_PARAMETER_8 NTStatus = 0xC00000F6 STATUS_INVALID_PARAMETER_9 NTStatus = 0xC00000F7 STATUS_INVALID_PARAMETER_10 NTStatus = 0xC00000F8 STATUS_INVALID_PARAMETER_11 NTStatus = 0xC00000F9 STATUS_INVALID_PARAMETER_12 NTStatus = 0xC00000FA STATUS_REDIRECTOR_NOT_STARTED NTStatus = 0xC00000FB STATUS_REDIRECTOR_STARTED NTStatus = 0xC00000FC STATUS_STACK_OVERFLOW NTStatus = 0xC00000FD STATUS_NO_SUCH_PACKAGE NTStatus = 0xC00000FE STATUS_BAD_FUNCTION_TABLE NTStatus = 0xC00000FF STATUS_VARIABLE_NOT_FOUND NTStatus = 0xC0000100 STATUS_DIRECTORY_NOT_EMPTY NTStatus = 0xC0000101 STATUS_FILE_CORRUPT_ERROR NTStatus = 0xC0000102 STATUS_NOT_A_DIRECTORY NTStatus = 0xC0000103 STATUS_BAD_LOGON_SESSION_STATE NTStatus = 0xC0000104 STATUS_LOGON_SESSION_COLLISION NTStatus = 0xC0000105 STATUS_NAME_TOO_LONG NTStatus = 0xC0000106 STATUS_FILES_OPEN NTStatus = 0xC0000107 STATUS_CONNECTION_IN_USE NTStatus = 0xC0000108 STATUS_MESSAGE_NOT_FOUND NTStatus = 0xC0000109 STATUS_PROCESS_IS_TERMINATING NTStatus = 0xC000010A STATUS_INVALID_LOGON_TYPE NTStatus = 0xC000010B STATUS_NO_GUID_TRANSLATION NTStatus = 0xC000010C STATUS_CANNOT_IMPERSONATE NTStatus = 0xC000010D STATUS_IMAGE_ALREADY_LOADED NTStatus = 0xC000010E STATUS_ABIOS_NOT_PRESENT NTStatus = 0xC000010F STATUS_ABIOS_LID_NOT_EXIST NTStatus = 0xC0000110 STATUS_ABIOS_LID_ALREADY_OWNED NTStatus = 0xC0000111 STATUS_ABIOS_NOT_LID_OWNER NTStatus = 0xC0000112 STATUS_ABIOS_INVALID_COMMAND NTStatus = 0xC0000113 STATUS_ABIOS_INVALID_LID NTStatus = 0xC0000114 STATUS_ABIOS_SELECTOR_NOT_AVAILABLE NTStatus = 0xC0000115 STATUS_ABIOS_INVALID_SELECTOR NTStatus = 0xC0000116 STATUS_NO_LDT NTStatus = 0xC0000117 STATUS_INVALID_LDT_SIZE NTStatus = 0xC0000118 STATUS_INVALID_LDT_OFFSET NTStatus = 0xC0000119 STATUS_INVALID_LDT_DESCRIPTOR NTStatus = 0xC000011A STATUS_INVALID_IMAGE_NE_FORMAT NTStatus = 0xC000011B STATUS_RXACT_INVALID_STATE NTStatus = 0xC000011C STATUS_RXACT_COMMIT_FAILURE NTStatus = 0xC000011D STATUS_MAPPED_FILE_SIZE_ZERO NTStatus = 0xC000011E STATUS_TOO_MANY_OPENED_FILES NTStatus = 0xC000011F STATUS_CANCELLED NTStatus = 0xC0000120 STATUS_CANNOT_DELETE NTStatus = 0xC0000121 STATUS_INVALID_COMPUTER_NAME NTStatus = 0xC0000122 STATUS_FILE_DELETED NTStatus = 0xC0000123 STATUS_SPECIAL_ACCOUNT NTStatus = 0xC0000124 STATUS_SPECIAL_GROUP NTStatus = 0xC0000125 STATUS_SPECIAL_USER NTStatus = 0xC0000126 STATUS_MEMBERS_PRIMARY_GROUP NTStatus = 0xC0000127 STATUS_FILE_CLOSED NTStatus = 0xC0000128 STATUS_TOO_MANY_THREADS NTStatus = 0xC0000129 STATUS_THREAD_NOT_IN_PROCESS NTStatus = 0xC000012A STATUS_TOKEN_ALREADY_IN_USE NTStatus = 0xC000012B STATUS_PAGEFILE_QUOTA_EXCEEDED NTStatus = 0xC000012C STATUS_COMMITMENT_LIMIT NTStatus = 0xC000012D STATUS_INVALID_IMAGE_LE_FORMAT NTStatus = 0xC000012E STATUS_INVALID_IMAGE_NOT_MZ NTStatus = 0xC000012F STATUS_INVALID_IMAGE_PROTECT NTStatus = 0xC0000130 STATUS_INVALID_IMAGE_WIN_16 NTStatus = 0xC0000131 STATUS_LOGON_SERVER_CONFLICT NTStatus = 0xC0000132 STATUS_TIME_DIFFERENCE_AT_DC NTStatus = 0xC0000133 STATUS_SYNCHRONIZATION_REQUIRED NTStatus = 0xC0000134 STATUS_DLL_NOT_FOUND NTStatus = 0xC0000135 STATUS_OPEN_FAILED NTStatus = 0xC0000136 STATUS_IO_PRIVILEGE_FAILED NTStatus = 0xC0000137 STATUS_ORDINAL_NOT_FOUND NTStatus = 0xC0000138 STATUS_ENTRYPOINT_NOT_FOUND NTStatus = 0xC0000139 STATUS_CONTROL_C_EXIT NTStatus = 0xC000013A STATUS_LOCAL_DISCONNECT NTStatus = 0xC000013B STATUS_REMOTE_DISCONNECT NTStatus = 0xC000013C STATUS_REMOTE_RESOURCES NTStatus = 0xC000013D STATUS_LINK_FAILED NTStatus = 0xC000013E STATUS_LINK_TIMEOUT NTStatus = 0xC000013F STATUS_INVALID_CONNECTION NTStatus = 0xC0000140 STATUS_INVALID_ADDRESS NTStatus = 0xC0000141 STATUS_DLL_INIT_FAILED NTStatus = 0xC0000142 STATUS_MISSING_SYSTEMFILE NTStatus = 0xC0000143 STATUS_UNHANDLED_EXCEPTION NTStatus = 0xC0000144 STATUS_APP_INIT_FAILURE NTStatus = 0xC0000145 STATUS_PAGEFILE_CREATE_FAILED NTStatus = 0xC0000146 STATUS_NO_PAGEFILE NTStatus = 0xC0000147 STATUS_INVALID_LEVEL NTStatus = 0xC0000148 STATUS_WRONG_PASSWORD_CORE NTStatus = 0xC0000149 STATUS_ILLEGAL_FLOAT_CONTEXT NTStatus = 0xC000014A STATUS_PIPE_BROKEN NTStatus = 0xC000014B STATUS_REGISTRY_CORRUPT NTStatus = 0xC000014C STATUS_REGISTRY_IO_FAILED NTStatus = 0xC000014D STATUS_NO_EVENT_PAIR NTStatus = 0xC000014E STATUS_UNRECOGNIZED_VOLUME NTStatus = 0xC000014F STATUS_SERIAL_NO_DEVICE_INITED NTStatus = 0xC0000150 STATUS_NO_SUCH_ALIAS NTStatus = 0xC0000151 STATUS_MEMBER_NOT_IN_ALIAS NTStatus = 0xC0000152 STATUS_MEMBER_IN_ALIAS NTStatus = 0xC0000153 STATUS_ALIAS_EXISTS NTStatus = 0xC0000154 STATUS_LOGON_NOT_GRANTED NTStatus = 0xC0000155 STATUS_TOO_MANY_SECRETS NTStatus = 0xC0000156 STATUS_SECRET_TOO_LONG NTStatus = 0xC0000157 STATUS_INTERNAL_DB_ERROR NTStatus = 0xC0000158 STATUS_FULLSCREEN_MODE NTStatus = 0xC0000159 STATUS_TOO_MANY_CONTEXT_IDS NTStatus = 0xC000015A STATUS_LOGON_TYPE_NOT_GRANTED NTStatus = 0xC000015B STATUS_NOT_REGISTRY_FILE NTStatus = 0xC000015C STATUS_NT_CROSS_ENCRYPTION_REQUIRED NTStatus = 0xC000015D STATUS_DOMAIN_CTRLR_CONFIG_ERROR NTStatus = 0xC000015E STATUS_FT_MISSING_MEMBER NTStatus = 0xC000015F STATUS_ILL_FORMED_SERVICE_ENTRY NTStatus = 0xC0000160 STATUS_ILLEGAL_CHARACTER NTStatus = 0xC0000161 STATUS_UNMAPPABLE_CHARACTER NTStatus = 0xC0000162 STATUS_UNDEFINED_CHARACTER NTStatus = 0xC0000163 STATUS_FLOPPY_VOLUME NTStatus = 0xC0000164 STATUS_FLOPPY_ID_MARK_NOT_FOUND NTStatus = 0xC0000165 STATUS_FLOPPY_WRONG_CYLINDER NTStatus = 0xC0000166 STATUS_FLOPPY_UNKNOWN_ERROR NTStatus = 0xC0000167 STATUS_FLOPPY_BAD_REGISTERS NTStatus = 0xC0000168 STATUS_DISK_RECALIBRATE_FAILED NTStatus = 0xC0000169 STATUS_DISK_OPERATION_FAILED NTStatus = 0xC000016A STATUS_DISK_RESET_FAILED NTStatus = 0xC000016B STATUS_SHARED_IRQ_BUSY NTStatus = 0xC000016C STATUS_FT_ORPHANING NTStatus = 0xC000016D STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT NTStatus = 0xC000016E STATUS_PARTITION_FAILURE NTStatus = 0xC0000172 STATUS_INVALID_BLOCK_LENGTH NTStatus = 0xC0000173 STATUS_DEVICE_NOT_PARTITIONED NTStatus = 0xC0000174 STATUS_UNABLE_TO_LOCK_MEDIA NTStatus = 0xC0000175 STATUS_UNABLE_TO_UNLOAD_MEDIA NTStatus = 0xC0000176 STATUS_EOM_OVERFLOW NTStatus = 0xC0000177 STATUS_NO_MEDIA NTStatus = 0xC0000178 STATUS_NO_SUCH_MEMBER NTStatus = 0xC000017A STATUS_INVALID_MEMBER NTStatus = 0xC000017B STATUS_KEY_DELETED NTStatus = 0xC000017C STATUS_NO_LOG_SPACE NTStatus = 0xC000017D STATUS_TOO_MANY_SIDS NTStatus = 0xC000017E STATUS_LM_CROSS_ENCRYPTION_REQUIRED NTStatus = 0xC000017F STATUS_KEY_HAS_CHILDREN NTStatus = 0xC0000180 STATUS_CHILD_MUST_BE_VOLATILE NTStatus = 0xC0000181 STATUS_DEVICE_CONFIGURATION_ERROR NTStatus = 0xC0000182 STATUS_DRIVER_INTERNAL_ERROR NTStatus = 0xC0000183 STATUS_INVALID_DEVICE_STATE NTStatus = 0xC0000184 STATUS_IO_DEVICE_ERROR NTStatus = 0xC0000185 STATUS_DEVICE_PROTOCOL_ERROR NTStatus = 0xC0000186 STATUS_BACKUP_CONTROLLER NTStatus = 0xC0000187 STATUS_LOG_FILE_FULL NTStatus = 0xC0000188 STATUS_TOO_LATE NTStatus = 0xC0000189 STATUS_NO_TRUST_LSA_SECRET NTStatus = 0xC000018A STATUS_NO_TRUST_SAM_ACCOUNT NTStatus = 0xC000018B STATUS_TRUSTED_DOMAIN_FAILURE NTStatus = 0xC000018C STATUS_TRUSTED_RELATIONSHIP_FAILURE NTStatus = 0xC000018D STATUS_EVENTLOG_FILE_CORRUPT NTStatus = 0xC000018E STATUS_EVENTLOG_CANT_START NTStatus = 0xC000018F STATUS_TRUST_FAILURE NTStatus = 0xC0000190 STATUS_MUTANT_LIMIT_EXCEEDED NTStatus = 0xC0000191 STATUS_NETLOGON_NOT_STARTED NTStatus = 0xC0000192 STATUS_ACCOUNT_EXPIRED NTStatus = 0xC0000193 STATUS_POSSIBLE_DEADLOCK NTStatus = 0xC0000194 STATUS_NETWORK_CREDENTIAL_CONFLICT NTStatus = 0xC0000195 STATUS_REMOTE_SESSION_LIMIT NTStatus = 0xC0000196 STATUS_EVENTLOG_FILE_CHANGED NTStatus = 0xC0000197 STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT NTStatus = 0xC0000198 STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT NTStatus = 0xC0000199 STATUS_NOLOGON_SERVER_TRUST_ACCOUNT NTStatus = 0xC000019A STATUS_DOMAIN_TRUST_INCONSISTENT NTStatus = 0xC000019B STATUS_FS_DRIVER_REQUIRED NTStatus = 0xC000019C STATUS_IMAGE_ALREADY_LOADED_AS_DLL NTStatus = 0xC000019D STATUS_INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING NTStatus = 0xC000019E STATUS_SHORT_NAMES_NOT_ENABLED_ON_VOLUME NTStatus = 0xC000019F STATUS_SECURITY_STREAM_IS_INCONSISTENT NTStatus = 0xC00001A0 STATUS_INVALID_LOCK_RANGE NTStatus = 0xC00001A1 STATUS_INVALID_ACE_CONDITION NTStatus = 0xC00001A2 STATUS_IMAGE_SUBSYSTEM_NOT_PRESENT NTStatus = 0xC00001A3 STATUS_NOTIFICATION_GUID_ALREADY_DEFINED NTStatus = 0xC00001A4 STATUS_INVALID_EXCEPTION_HANDLER NTStatus = 0xC00001A5 STATUS_DUPLICATE_PRIVILEGES NTStatus = 0xC00001A6 STATUS_NOT_ALLOWED_ON_SYSTEM_FILE NTStatus = 0xC00001A7 STATUS_REPAIR_NEEDED NTStatus = 0xC00001A8 STATUS_QUOTA_NOT_ENABLED NTStatus = 0xC00001A9 STATUS_NO_APPLICATION_PACKAGE NTStatus = 0xC00001AA STATUS_FILE_METADATA_OPTIMIZATION_IN_PROGRESS NTStatus = 0xC00001AB STATUS_NOT_SAME_OBJECT NTStatus = 0xC00001AC STATUS_FATAL_MEMORY_EXHAUSTION NTStatus = 0xC00001AD STATUS_ERROR_PROCESS_NOT_IN_JOB NTStatus = 0xC00001AE STATUS_CPU_SET_INVALID NTStatus = 0xC00001AF STATUS_IO_DEVICE_INVALID_DATA NTStatus = 0xC00001B0 STATUS_IO_UNALIGNED_WRITE NTStatus = 0xC00001B1 STATUS_NETWORK_OPEN_RESTRICTION NTStatus = 0xC0000201 STATUS_NO_USER_SESSION_KEY NTStatus = 0xC0000202 STATUS_USER_SESSION_DELETED NTStatus = 0xC0000203 STATUS_RESOURCE_LANG_NOT_FOUND NTStatus = 0xC0000204 STATUS_INSUFF_SERVER_RESOURCES NTStatus = 0xC0000205 STATUS_INVALID_BUFFER_SIZE NTStatus = 0xC0000206 STATUS_INVALID_ADDRESS_COMPONENT NTStatus = 0xC0000207 STATUS_INVALID_ADDRESS_WILDCARD NTStatus = 0xC0000208 STATUS_TOO_MANY_ADDRESSES NTStatus = 0xC0000209 STATUS_ADDRESS_ALREADY_EXISTS NTStatus = 0xC000020A STATUS_ADDRESS_CLOSED NTStatus = 0xC000020B STATUS_CONNECTION_DISCONNECTED NTStatus = 0xC000020C STATUS_CONNECTION_RESET NTStatus = 0xC000020D STATUS_TOO_MANY_NODES NTStatus = 0xC000020E STATUS_TRANSACTION_ABORTED NTStatus = 0xC000020F STATUS_TRANSACTION_TIMED_OUT NTStatus = 0xC0000210 STATUS_TRANSACTION_NO_RELEASE NTStatus = 0xC0000211 STATUS_TRANSACTION_NO_MATCH NTStatus = 0xC0000212 STATUS_TRANSACTION_RESPONDED NTStatus = 0xC0000213 STATUS_TRANSACTION_INVALID_ID NTStatus = 0xC0000214 STATUS_TRANSACTION_INVALID_TYPE NTStatus = 0xC0000215 STATUS_NOT_SERVER_SESSION NTStatus = 0xC0000216 STATUS_NOT_CLIENT_SESSION NTStatus = 0xC0000217 STATUS_CANNOT_LOAD_REGISTRY_FILE NTStatus = 0xC0000218 STATUS_DEBUG_ATTACH_FAILED NTStatus = 0xC0000219 STATUS_SYSTEM_PROCESS_TERMINATED NTStatus = 0xC000021A STATUS_DATA_NOT_ACCEPTED NTStatus = 0xC000021B STATUS_NO_BROWSER_SERVERS_FOUND NTStatus = 0xC000021C STATUS_VDM_HARD_ERROR NTStatus = 0xC000021D STATUS_DRIVER_CANCEL_TIMEOUT NTStatus = 0xC000021E STATUS_REPLY_MESSAGE_MISMATCH NTStatus = 0xC000021F STATUS_MAPPED_ALIGNMENT NTStatus = 0xC0000220 STATUS_IMAGE_CHECKSUM_MISMATCH NTStatus = 0xC0000221 STATUS_LOST_WRITEBEHIND_DATA NTStatus = 0xC0000222 STATUS_CLIENT_SERVER_PARAMETERS_INVALID NTStatus = 0xC0000223 STATUS_PASSWORD_MUST_CHANGE NTStatus = 0xC0000224 STATUS_NOT_FOUND NTStatus = 0xC0000225 STATUS_NOT_TINY_STREAM NTStatus = 0xC0000226 STATUS_RECOVERY_FAILURE NTStatus = 0xC0000227 STATUS_STACK_OVERFLOW_READ NTStatus = 0xC0000228 STATUS_FAIL_CHECK NTStatus = 0xC0000229 STATUS_DUPLICATE_OBJECTID NTStatus = 0xC000022A STATUS_OBJECTID_EXISTS NTStatus = 0xC000022B STATUS_CONVERT_TO_LARGE NTStatus = 0xC000022C STATUS_RETRY NTStatus = 0xC000022D STATUS_FOUND_OUT_OF_SCOPE NTStatus = 0xC000022E STATUS_ALLOCATE_BUCKET NTStatus = 0xC000022F STATUS_PROPSET_NOT_FOUND NTStatus = 0xC0000230 STATUS_MARSHALL_OVERFLOW NTStatus = 0xC0000231 STATUS_INVALID_VARIANT NTStatus = 0xC0000232 STATUS_DOMAIN_CONTROLLER_NOT_FOUND NTStatus = 0xC0000233 STATUS_ACCOUNT_LOCKED_OUT NTStatus = 0xC0000234 STATUS_HANDLE_NOT_CLOSABLE NTStatus = 0xC0000235 STATUS_CONNECTION_REFUSED NTStatus = 0xC0000236 STATUS_GRACEFUL_DISCONNECT NTStatus = 0xC0000237 STATUS_ADDRESS_ALREADY_ASSOCIATED NTStatus = 0xC0000238 STATUS_ADDRESS_NOT_ASSOCIATED NTStatus = 0xC0000239 STATUS_CONNECTION_INVALID NTStatus = 0xC000023A STATUS_CONNECTION_ACTIVE NTStatus = 0xC000023B STATUS_NETWORK_UNREACHABLE NTStatus = 0xC000023C STATUS_HOST_UNREACHABLE NTStatus = 0xC000023D STATUS_PROTOCOL_UNREACHABLE NTStatus = 0xC000023E STATUS_PORT_UNREACHABLE NTStatus = 0xC000023F STATUS_REQUEST_ABORTED NTStatus = 0xC0000240 STATUS_CONNECTION_ABORTED NTStatus = 0xC0000241 STATUS_BAD_COMPRESSION_BUFFER NTStatus = 0xC0000242 STATUS_USER_MAPPED_FILE NTStatus = 0xC0000243 STATUS_AUDIT_FAILED NTStatus = 0xC0000244 STATUS_TIMER_RESOLUTION_NOT_SET NTStatus = 0xC0000245 STATUS_CONNECTION_COUNT_LIMIT NTStatus = 0xC0000246 STATUS_LOGIN_TIME_RESTRICTION NTStatus = 0xC0000247 STATUS_LOGIN_WKSTA_RESTRICTION NTStatus = 0xC0000248 STATUS_IMAGE_MP_UP_MISMATCH NTStatus = 0xC0000249 STATUS_INSUFFICIENT_LOGON_INFO NTStatus = 0xC0000250 STATUS_BAD_DLL_ENTRYPOINT NTStatus = 0xC0000251 STATUS_BAD_SERVICE_ENTRYPOINT NTStatus = 0xC0000252 STATUS_LPC_REPLY_LOST NTStatus = 0xC0000253 STATUS_IP_ADDRESS_CONFLICT1 NTStatus = 0xC0000254 STATUS_IP_ADDRESS_CONFLICT2 NTStatus = 0xC0000255 STATUS_REGISTRY_QUOTA_LIMIT NTStatus = 0xC0000256 STATUS_PATH_NOT_COVERED NTStatus = 0xC0000257 STATUS_NO_CALLBACK_ACTIVE NTStatus = 0xC0000258 STATUS_LICENSE_QUOTA_EXCEEDED NTStatus = 0xC0000259 STATUS_PWD_TOO_SHORT NTStatus = 0xC000025A STATUS_PWD_TOO_RECENT NTStatus = 0xC000025B STATUS_PWD_HISTORY_CONFLICT NTStatus = 0xC000025C STATUS_PLUGPLAY_NO_DEVICE NTStatus = 0xC000025E STATUS_UNSUPPORTED_COMPRESSION NTStatus = 0xC000025F STATUS_INVALID_HW_PROFILE NTStatus = 0xC0000260 STATUS_INVALID_PLUGPLAY_DEVICE_PATH NTStatus = 0xC0000261 STATUS_DRIVER_ORDINAL_NOT_FOUND NTStatus = 0xC0000262 STATUS_DRIVER_ENTRYPOINT_NOT_FOUND NTStatus = 0xC0000263 STATUS_RESOURCE_NOT_OWNED NTStatus = 0xC0000264 STATUS_TOO_MANY_LINKS NTStatus = 0xC0000265 STATUS_QUOTA_LIST_INCONSISTENT NTStatus = 0xC0000266 STATUS_FILE_IS_OFFLINE NTStatus = 0xC0000267 STATUS_EVALUATION_EXPIRATION NTStatus = 0xC0000268 STATUS_ILLEGAL_DLL_RELOCATION NTStatus = 0xC0000269 STATUS_LICENSE_VIOLATION NTStatus = 0xC000026A STATUS_DLL_INIT_FAILED_LOGOFF NTStatus = 0xC000026B STATUS_DRIVER_UNABLE_TO_LOAD NTStatus = 0xC000026C STATUS_DFS_UNAVAILABLE NTStatus = 0xC000026D STATUS_VOLUME_DISMOUNTED NTStatus = 0xC000026E STATUS_WX86_INTERNAL_ERROR NTStatus = 0xC000026F STATUS_WX86_FLOAT_STACK_CHECK NTStatus = 0xC0000270 STATUS_VALIDATE_CONTINUE NTStatus = 0xC0000271 STATUS_NO_MATCH NTStatus = 0xC0000272 STATUS_NO_MORE_MATCHES NTStatus = 0xC0000273 STATUS_NOT_A_REPARSE_POINT NTStatus = 0xC0000275 STATUS_IO_REPARSE_TAG_INVALID NTStatus = 0xC0000276 STATUS_IO_REPARSE_TAG_MISMATCH NTStatus = 0xC0000277 STATUS_IO_REPARSE_DATA_INVALID NTStatus = 0xC0000278 STATUS_IO_REPARSE_TAG_NOT_HANDLED NTStatus = 0xC0000279 STATUS_PWD_TOO_LONG NTStatus = 0xC000027A STATUS_STOWED_EXCEPTION NTStatus = 0xC000027B STATUS_CONTEXT_STOWED_EXCEPTION NTStatus = 0xC000027C STATUS_REPARSE_POINT_NOT_RESOLVED NTStatus = 0xC0000280 STATUS_DIRECTORY_IS_A_REPARSE_POINT NTStatus = 0xC0000281 STATUS_RANGE_LIST_CONFLICT NTStatus = 0xC0000282 STATUS_SOURCE_ELEMENT_EMPTY NTStatus = 0xC0000283 STATUS_DESTINATION_ELEMENT_FULL NTStatus = 0xC0000284 STATUS_ILLEGAL_ELEMENT_ADDRESS NTStatus = 0xC0000285 STATUS_MAGAZINE_NOT_PRESENT NTStatus = 0xC0000286 STATUS_REINITIALIZATION_NEEDED NTStatus = 0xC0000287 STATUS_DEVICE_REQUIRES_CLEANING NTStatus = 0x80000288 STATUS_DEVICE_DOOR_OPEN NTStatus = 0x80000289 STATUS_ENCRYPTION_FAILED NTStatus = 0xC000028A STATUS_DECRYPTION_FAILED NTStatus = 0xC000028B STATUS_RANGE_NOT_FOUND NTStatus = 0xC000028C STATUS_NO_RECOVERY_POLICY NTStatus = 0xC000028D STATUS_NO_EFS NTStatus = 0xC000028E STATUS_WRONG_EFS NTStatus = 0xC000028F STATUS_NO_USER_KEYS NTStatus = 0xC0000290 STATUS_FILE_NOT_ENCRYPTED NTStatus = 0xC0000291 STATUS_NOT_EXPORT_FORMAT NTStatus = 0xC0000292 STATUS_FILE_ENCRYPTED NTStatus = 0xC0000293 STATUS_WAKE_SYSTEM NTStatus = 0x40000294 STATUS_WMI_GUID_NOT_FOUND NTStatus = 0xC0000295 STATUS_WMI_INSTANCE_NOT_FOUND NTStatus = 0xC0000296 STATUS_WMI_ITEMID_NOT_FOUND NTStatus = 0xC0000297 STATUS_WMI_TRY_AGAIN NTStatus = 0xC0000298 STATUS_SHARED_POLICY NTStatus = 0xC0000299 STATUS_POLICY_OBJECT_NOT_FOUND NTStatus = 0xC000029A STATUS_POLICY_ONLY_IN_DS NTStatus = 0xC000029B STATUS_VOLUME_NOT_UPGRADED NTStatus = 0xC000029C STATUS_REMOTE_STORAGE_NOT_ACTIVE NTStatus = 0xC000029D STATUS_REMOTE_STORAGE_MEDIA_ERROR NTStatus = 0xC000029E STATUS_NO_TRACKING_SERVICE NTStatus = 0xC000029F STATUS_SERVER_SID_MISMATCH NTStatus = 0xC00002A0 STATUS_DS_NO_ATTRIBUTE_OR_VALUE NTStatus = 0xC00002A1 STATUS_DS_INVALID_ATTRIBUTE_SYNTAX NTStatus = 0xC00002A2 STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED NTStatus = 0xC00002A3 STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS NTStatus = 0xC00002A4 STATUS_DS_BUSY NTStatus = 0xC00002A5 STATUS_DS_UNAVAILABLE NTStatus = 0xC00002A6 STATUS_DS_NO_RIDS_ALLOCATED NTStatus = 0xC00002A7 STATUS_DS_NO_MORE_RIDS NTStatus = 0xC00002A8 STATUS_DS_INCORRECT_ROLE_OWNER NTStatus = 0xC00002A9 STATUS_DS_RIDMGR_INIT_ERROR NTStatus = 0xC00002AA STATUS_DS_OBJ_CLASS_VIOLATION NTStatus = 0xC00002AB STATUS_DS_CANT_ON_NON_LEAF NTStatus = 0xC00002AC STATUS_DS_CANT_ON_RDN NTStatus = 0xC00002AD STATUS_DS_CANT_MOD_OBJ_CLASS NTStatus = 0xC00002AE STATUS_DS_CROSS_DOM_MOVE_FAILED NTStatus = 0xC00002AF STATUS_DS_GC_NOT_AVAILABLE NTStatus = 0xC00002B0 STATUS_DIRECTORY_SERVICE_REQUIRED NTStatus = 0xC00002B1 STATUS_REPARSE_ATTRIBUTE_CONFLICT NTStatus = 0xC00002B2 STATUS_CANT_ENABLE_DENY_ONLY NTStatus = 0xC00002B3 STATUS_FLOAT_MULTIPLE_FAULTS NTStatus = 0xC00002B4 STATUS_FLOAT_MULTIPLE_TRAPS NTStatus = 0xC00002B5 STATUS_DEVICE_REMOVED NTStatus = 0xC00002B6 STATUS_JOURNAL_DELETE_IN_PROGRESS NTStatus = 0xC00002B7 STATUS_JOURNAL_NOT_ACTIVE NTStatus = 0xC00002B8 STATUS_NOINTERFACE NTStatus = 0xC00002B9 STATUS_DS_RIDMGR_DISABLED NTStatus = 0xC00002BA STATUS_DS_ADMIN_LIMIT_EXCEEDED NTStatus = 0xC00002C1 STATUS_DRIVER_FAILED_SLEEP NTStatus = 0xC00002C2 STATUS_MUTUAL_AUTHENTICATION_FAILED NTStatus = 0xC00002C3 STATUS_CORRUPT_SYSTEM_FILE NTStatus = 0xC00002C4 STATUS_DATATYPE_MISALIGNMENT_ERROR NTStatus = 0xC00002C5 STATUS_WMI_READ_ONLY NTStatus = 0xC00002C6 STATUS_WMI_SET_FAILURE NTStatus = 0xC00002C7 STATUS_COMMITMENT_MINIMUM NTStatus = 0xC00002C8 STATUS_REG_NAT_CONSUMPTION NTStatus = 0xC00002C9 STATUS_TRANSPORT_FULL NTStatus = 0xC00002CA STATUS_DS_SAM_INIT_FAILURE NTStatus = 0xC00002CB STATUS_ONLY_IF_CONNECTED NTStatus = 0xC00002CC STATUS_DS_SENSITIVE_GROUP_VIOLATION NTStatus = 0xC00002CD STATUS_PNP_RESTART_ENUMERATION NTStatus = 0xC00002CE STATUS_JOURNAL_ENTRY_DELETED NTStatus = 0xC00002CF STATUS_DS_CANT_MOD_PRIMARYGROUPID NTStatus = 0xC00002D0 STATUS_SYSTEM_IMAGE_BAD_SIGNATURE NTStatus = 0xC00002D1 STATUS_PNP_REBOOT_REQUIRED NTStatus = 0xC00002D2 STATUS_POWER_STATE_INVALID NTStatus = 0xC00002D3 STATUS_DS_INVALID_GROUP_TYPE NTStatus = 0xC00002D4 STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN NTStatus = 0xC00002D5 STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN NTStatus = 0xC00002D6 STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER NTStatus = 0xC00002D7 STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER NTStatus = 0xC00002D8 STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER NTStatus = 0xC00002D9 STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER NTStatus = 0xC00002DA STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER NTStatus = 0xC00002DB STATUS_DS_HAVE_PRIMARY_MEMBERS NTStatus = 0xC00002DC STATUS_WMI_NOT_SUPPORTED NTStatus = 0xC00002DD STATUS_INSUFFICIENT_POWER NTStatus = 0xC00002DE STATUS_SAM_NEED_BOOTKEY_PASSWORD NTStatus = 0xC00002DF STATUS_SAM_NEED_BOOTKEY_FLOPPY NTStatus = 0xC00002E0 STATUS_DS_CANT_START NTStatus = 0xC00002E1 STATUS_DS_INIT_FAILURE NTStatus = 0xC00002E2 STATUS_SAM_INIT_FAILURE NTStatus = 0xC00002E3 STATUS_DS_GC_REQUIRED NTStatus = 0xC00002E4 STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY NTStatus = 0xC00002E5 STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS NTStatus = 0xC00002E6 STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED NTStatus = 0xC00002E7 STATUS_MULTIPLE_FAULT_VIOLATION NTStatus = 0xC00002E8 STATUS_CURRENT_DOMAIN_NOT_ALLOWED NTStatus = 0xC00002E9 STATUS_CANNOT_MAKE NTStatus = 0xC00002EA STATUS_SYSTEM_SHUTDOWN NTStatus = 0xC00002EB STATUS_DS_INIT_FAILURE_CONSOLE NTStatus = 0xC00002EC STATUS_DS_SAM_INIT_FAILURE_CONSOLE NTStatus = 0xC00002ED STATUS_UNFINISHED_CONTEXT_DELETED NTStatus = 0xC00002EE STATUS_NO_TGT_REPLY NTStatus = 0xC00002EF STATUS_OBJECTID_NOT_FOUND NTStatus = 0xC00002F0 STATUS_NO_IP_ADDRESSES NTStatus = 0xC00002F1 STATUS_WRONG_CREDENTIAL_HANDLE NTStatus = 0xC00002F2 STATUS_CRYPTO_SYSTEM_INVALID NTStatus = 0xC00002F3 STATUS_MAX_REFERRALS_EXCEEDED NTStatus = 0xC00002F4 STATUS_MUST_BE_KDC NTStatus = 0xC00002F5 STATUS_STRONG_CRYPTO_NOT_SUPPORTED NTStatus = 0xC00002F6 STATUS_TOO_MANY_PRINCIPALS NTStatus = 0xC00002F7 STATUS_NO_PA_DATA NTStatus = 0xC00002F8 STATUS_PKINIT_NAME_MISMATCH NTStatus = 0xC00002F9 STATUS_SMARTCARD_LOGON_REQUIRED NTStatus = 0xC00002FA STATUS_KDC_INVALID_REQUEST NTStatus = 0xC00002FB STATUS_KDC_UNABLE_TO_REFER NTStatus = 0xC00002FC STATUS_KDC_UNKNOWN_ETYPE NTStatus = 0xC00002FD STATUS_SHUTDOWN_IN_PROGRESS NTStatus = 0xC00002FE STATUS_SERVER_SHUTDOWN_IN_PROGRESS NTStatus = 0xC00002FF STATUS_NOT_SUPPORTED_ON_SBS NTStatus = 0xC0000300 STATUS_WMI_GUID_DISCONNECTED NTStatus = 0xC0000301 STATUS_WMI_ALREADY_DISABLED NTStatus = 0xC0000302 STATUS_WMI_ALREADY_ENABLED NTStatus = 0xC0000303 STATUS_MFT_TOO_FRAGMENTED NTStatus = 0xC0000304 STATUS_COPY_PROTECTION_FAILURE NTStatus = 0xC0000305 STATUS_CSS_AUTHENTICATION_FAILURE NTStatus = 0xC0000306 STATUS_CSS_KEY_NOT_PRESENT NTStatus = 0xC0000307 STATUS_CSS_KEY_NOT_ESTABLISHED NTStatus = 0xC0000308 STATUS_CSS_SCRAMBLED_SECTOR NTStatus = 0xC0000309 STATUS_CSS_REGION_MISMATCH NTStatus = 0xC000030A STATUS_CSS_RESETS_EXHAUSTED NTStatus = 0xC000030B STATUS_PASSWORD_CHANGE_REQUIRED NTStatus = 0xC000030C STATUS_LOST_MODE_LOGON_RESTRICTION NTStatus = 0xC000030D STATUS_PKINIT_FAILURE NTStatus = 0xC0000320 STATUS_SMARTCARD_SUBSYSTEM_FAILURE NTStatus = 0xC0000321 STATUS_NO_KERB_KEY NTStatus = 0xC0000322 STATUS_HOST_DOWN NTStatus = 0xC0000350 STATUS_UNSUPPORTED_PREAUTH NTStatus = 0xC0000351 STATUS_EFS_ALG_BLOB_TOO_BIG NTStatus = 0xC0000352 STATUS_PORT_NOT_SET NTStatus = 0xC0000353 STATUS_DEBUGGER_INACTIVE NTStatus = 0xC0000354 STATUS_DS_VERSION_CHECK_FAILURE NTStatus = 0xC0000355 STATUS_AUDITING_DISABLED NTStatus = 0xC0000356 STATUS_PRENT4_MACHINE_ACCOUNT NTStatus = 0xC0000357 STATUS_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER NTStatus = 0xC0000358 STATUS_INVALID_IMAGE_WIN_32 NTStatus = 0xC0000359 STATUS_INVALID_IMAGE_WIN_64 NTStatus = 0xC000035A STATUS_BAD_BINDINGS NTStatus = 0xC000035B STATUS_NETWORK_SESSION_EXPIRED NTStatus = 0xC000035C STATUS_APPHELP_BLOCK NTStatus = 0xC000035D STATUS_ALL_SIDS_FILTERED NTStatus = 0xC000035E STATUS_NOT_SAFE_MODE_DRIVER NTStatus = 0xC000035F STATUS_ACCESS_DISABLED_BY_POLICY_DEFAULT NTStatus = 0xC0000361 STATUS_ACCESS_DISABLED_BY_POLICY_PATH NTStatus = 0xC0000362 STATUS_ACCESS_DISABLED_BY_POLICY_PUBLISHER NTStatus = 0xC0000363 STATUS_ACCESS_DISABLED_BY_POLICY_OTHER NTStatus = 0xC0000364 STATUS_FAILED_DRIVER_ENTRY NTStatus = 0xC0000365 STATUS_DEVICE_ENUMERATION_ERROR NTStatus = 0xC0000366 STATUS_MOUNT_POINT_NOT_RESOLVED NTStatus = 0xC0000368 STATUS_INVALID_DEVICE_OBJECT_PARAMETER NTStatus = 0xC0000369 STATUS_MCA_OCCURED NTStatus = 0xC000036A STATUS_DRIVER_BLOCKED_CRITICAL NTStatus = 0xC000036B STATUS_DRIVER_BLOCKED NTStatus = 0xC000036C STATUS_DRIVER_DATABASE_ERROR NTStatus = 0xC000036D STATUS_SYSTEM_HIVE_TOO_LARGE NTStatus = 0xC000036E STATUS_INVALID_IMPORT_OF_NON_DLL NTStatus = 0xC000036F STATUS_DS_SHUTTING_DOWN NTStatus = 0x40000370 STATUS_NO_SECRETS NTStatus = 0xC0000371 STATUS_ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY NTStatus = 0xC0000372 STATUS_FAILED_STACK_SWITCH NTStatus = 0xC0000373 STATUS_HEAP_CORRUPTION NTStatus = 0xC0000374 STATUS_SMARTCARD_WRONG_PIN NTStatus = 0xC0000380 STATUS_SMARTCARD_CARD_BLOCKED NTStatus = 0xC0000381 STATUS_SMARTCARD_CARD_NOT_AUTHENTICATED NTStatus = 0xC0000382 STATUS_SMARTCARD_NO_CARD NTStatus = 0xC0000383 STATUS_SMARTCARD_NO_KEY_CONTAINER NTStatus = 0xC0000384 STATUS_SMARTCARD_NO_CERTIFICATE NTStatus = 0xC0000385 STATUS_SMARTCARD_NO_KEYSET NTStatus = 0xC0000386 STATUS_SMARTCARD_IO_ERROR NTStatus = 0xC0000387 STATUS_DOWNGRADE_DETECTED NTStatus = 0xC0000388 STATUS_SMARTCARD_CERT_REVOKED NTStatus = 0xC0000389 STATUS_ISSUING_CA_UNTRUSTED NTStatus = 0xC000038A STATUS_REVOCATION_OFFLINE_C NTStatus = 0xC000038B STATUS_PKINIT_CLIENT_FAILURE NTStatus = 0xC000038C STATUS_SMARTCARD_CERT_EXPIRED NTStatus = 0xC000038D STATUS_DRIVER_FAILED_PRIOR_UNLOAD NTStatus = 0xC000038E STATUS_SMARTCARD_SILENT_CONTEXT NTStatus = 0xC000038F STATUS_PER_USER_TRUST_QUOTA_EXCEEDED NTStatus = 0xC0000401 STATUS_ALL_USER_TRUST_QUOTA_EXCEEDED NTStatus = 0xC0000402 STATUS_USER_DELETE_TRUST_QUOTA_EXCEEDED NTStatus = 0xC0000403 STATUS_DS_NAME_NOT_UNIQUE NTStatus = 0xC0000404 STATUS_DS_DUPLICATE_ID_FOUND NTStatus = 0xC0000405 STATUS_DS_GROUP_CONVERSION_ERROR NTStatus = 0xC0000406 STATUS_VOLSNAP_PREPARE_HIBERNATE NTStatus = 0xC0000407 STATUS_USER2USER_REQUIRED NTStatus = 0xC0000408 STATUS_STACK_BUFFER_OVERRUN NTStatus = 0xC0000409 STATUS_NO_S4U_PROT_SUPPORT NTStatus = 0xC000040A STATUS_CROSSREALM_DELEGATION_FAILURE NTStatus = 0xC000040B STATUS_REVOCATION_OFFLINE_KDC NTStatus = 0xC000040C STATUS_ISSUING_CA_UNTRUSTED_KDC NTStatus = 0xC000040D STATUS_KDC_CERT_EXPIRED NTStatus = 0xC000040E STATUS_KDC_CERT_REVOKED NTStatus = 0xC000040F STATUS_PARAMETER_QUOTA_EXCEEDED NTStatus = 0xC0000410 STATUS_HIBERNATION_FAILURE NTStatus = 0xC0000411 STATUS_DELAY_LOAD_FAILED NTStatus = 0xC0000412 STATUS_AUTHENTICATION_FIREWALL_FAILED NTStatus = 0xC0000413 STATUS_VDM_DISALLOWED NTStatus = 0xC0000414 STATUS_HUNG_DISPLAY_DRIVER_THREAD NTStatus = 0xC0000415 STATUS_INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE NTStatus = 0xC0000416 STATUS_INVALID_CRUNTIME_PARAMETER NTStatus = 0xC0000417 STATUS_NTLM_BLOCKED NTStatus = 0xC0000418 STATUS_DS_SRC_SID_EXISTS_IN_FOREST NTStatus = 0xC0000419 STATUS_DS_DOMAIN_NAME_EXISTS_IN_FOREST NTStatus = 0xC000041A STATUS_DS_FLAT_NAME_EXISTS_IN_FOREST NTStatus = 0xC000041B STATUS_INVALID_USER_PRINCIPAL_NAME NTStatus = 0xC000041C STATUS_FATAL_USER_CALLBACK_EXCEPTION NTStatus = 0xC000041D STATUS_ASSERTION_FAILURE NTStatus = 0xC0000420 STATUS_VERIFIER_STOP NTStatus = 0xC0000421 STATUS_CALLBACK_POP_STACK NTStatus = 0xC0000423 STATUS_INCOMPATIBLE_DRIVER_BLOCKED NTStatus = 0xC0000424 STATUS_HIVE_UNLOADED NTStatus = 0xC0000425 STATUS_COMPRESSION_DISABLED NTStatus = 0xC0000426 STATUS_FILE_SYSTEM_LIMITATION NTStatus = 0xC0000427 STATUS_INVALID_IMAGE_HASH NTStatus = 0xC0000428 STATUS_NOT_CAPABLE NTStatus = 0xC0000429 STATUS_REQUEST_OUT_OF_SEQUENCE NTStatus = 0xC000042A STATUS_IMPLEMENTATION_LIMIT NTStatus = 0xC000042B STATUS_ELEVATION_REQUIRED NTStatus = 0xC000042C STATUS_NO_SECURITY_CONTEXT NTStatus = 0xC000042D STATUS_PKU2U_CERT_FAILURE NTStatus = 0xC000042F STATUS_BEYOND_VDL NTStatus = 0xC0000432 STATUS_ENCOUNTERED_WRITE_IN_PROGRESS NTStatus = 0xC0000433 STATUS_PTE_CHANGED NTStatus = 0xC0000434 STATUS_PURGE_FAILED NTStatus = 0xC0000435 STATUS_CRED_REQUIRES_CONFIRMATION NTStatus = 0xC0000440 STATUS_CS_ENCRYPTION_INVALID_SERVER_RESPONSE NTStatus = 0xC0000441 STATUS_CS_ENCRYPTION_UNSUPPORTED_SERVER NTStatus = 0xC0000442 STATUS_CS_ENCRYPTION_EXISTING_ENCRYPTED_FILE NTStatus = 0xC0000443 STATUS_CS_ENCRYPTION_NEW_ENCRYPTED_FILE NTStatus = 0xC0000444 STATUS_CS_ENCRYPTION_FILE_NOT_CSE NTStatus = 0xC0000445 STATUS_INVALID_LABEL NTStatus = 0xC0000446 STATUS_DRIVER_PROCESS_TERMINATED NTStatus = 0xC0000450 STATUS_AMBIGUOUS_SYSTEM_DEVICE NTStatus = 0xC0000451 STATUS_SYSTEM_DEVICE_NOT_FOUND NTStatus = 0xC0000452 STATUS_RESTART_BOOT_APPLICATION NTStatus = 0xC0000453 STATUS_INSUFFICIENT_NVRAM_RESOURCES NTStatus = 0xC0000454 STATUS_INVALID_SESSION NTStatus = 0xC0000455 STATUS_THREAD_ALREADY_IN_SESSION NTStatus = 0xC0000456 STATUS_THREAD_NOT_IN_SESSION NTStatus = 0xC0000457 STATUS_INVALID_WEIGHT NTStatus = 0xC0000458 STATUS_REQUEST_PAUSED NTStatus = 0xC0000459 STATUS_NO_RANGES_PROCESSED NTStatus = 0xC0000460 STATUS_DISK_RESOURCES_EXHAUSTED NTStatus = 0xC0000461 STATUS_NEEDS_REMEDIATION NTStatus = 0xC0000462 STATUS_DEVICE_FEATURE_NOT_SUPPORTED NTStatus = 0xC0000463 STATUS_DEVICE_UNREACHABLE NTStatus = 0xC0000464 STATUS_INVALID_TOKEN NTStatus = 0xC0000465 STATUS_SERVER_UNAVAILABLE NTStatus = 0xC0000466 STATUS_FILE_NOT_AVAILABLE NTStatus = 0xC0000467 STATUS_DEVICE_INSUFFICIENT_RESOURCES NTStatus = 0xC0000468 STATUS_PACKAGE_UPDATING NTStatus = 0xC0000469 STATUS_NOT_READ_FROM_COPY NTStatus = 0xC000046A STATUS_FT_WRITE_FAILURE NTStatus = 0xC000046B STATUS_FT_DI_SCAN_REQUIRED NTStatus = 0xC000046C STATUS_OBJECT_NOT_EXTERNALLY_BACKED NTStatus = 0xC000046D STATUS_EXTERNAL_BACKING_PROVIDER_UNKNOWN NTStatus = 0xC000046E STATUS_COMPRESSION_NOT_BENEFICIAL NTStatus = 0xC000046F STATUS_DATA_CHECKSUM_ERROR NTStatus = 0xC0000470 STATUS_INTERMIXED_KERNEL_EA_OPERATION NTStatus = 0xC0000471 STATUS_TRIM_READ_ZERO_NOT_SUPPORTED NTStatus = 0xC0000472 STATUS_TOO_MANY_SEGMENT_DESCRIPTORS NTStatus = 0xC0000473 STATUS_INVALID_OFFSET_ALIGNMENT NTStatus = 0xC0000474 STATUS_INVALID_FIELD_IN_PARAMETER_LIST NTStatus = 0xC0000475 STATUS_OPERATION_IN_PROGRESS NTStatus = 0xC0000476 STATUS_INVALID_INITIATOR_TARGET_PATH NTStatus = 0xC0000477 STATUS_SCRUB_DATA_DISABLED NTStatus = 0xC0000478 STATUS_NOT_REDUNDANT_STORAGE NTStatus = 0xC0000479 STATUS_RESIDENT_FILE_NOT_SUPPORTED NTStatus = 0xC000047A STATUS_COMPRESSED_FILE_NOT_SUPPORTED NTStatus = 0xC000047B STATUS_DIRECTORY_NOT_SUPPORTED NTStatus = 0xC000047C STATUS_IO_OPERATION_TIMEOUT NTStatus = 0xC000047D STATUS_SYSTEM_NEEDS_REMEDIATION NTStatus = 0xC000047E STATUS_APPX_INTEGRITY_FAILURE_CLR_NGEN NTStatus = 0xC000047F STATUS_SHARE_UNAVAILABLE NTStatus = 0xC0000480 STATUS_APISET_NOT_HOSTED NTStatus = 0xC0000481 STATUS_APISET_NOT_PRESENT NTStatus = 0xC0000482 STATUS_DEVICE_HARDWARE_ERROR NTStatus = 0xC0000483 STATUS_FIRMWARE_SLOT_INVALID NTStatus = 0xC0000484 STATUS_FIRMWARE_IMAGE_INVALID NTStatus = 0xC0000485 STATUS_STORAGE_TOPOLOGY_ID_MISMATCH NTStatus = 0xC0000486 STATUS_WIM_NOT_BOOTABLE NTStatus = 0xC0000487 STATUS_BLOCKED_BY_PARENTAL_CONTROLS NTStatus = 0xC0000488 STATUS_NEEDS_REGISTRATION NTStatus = 0xC0000489 STATUS_QUOTA_ACTIVITY NTStatus = 0xC000048A STATUS_CALLBACK_INVOKE_INLINE NTStatus = 0xC000048B STATUS_BLOCK_TOO_MANY_REFERENCES NTStatus = 0xC000048C STATUS_MARKED_TO_DISALLOW_WRITES NTStatus = 0xC000048D STATUS_NETWORK_ACCESS_DENIED_EDP NTStatus = 0xC000048E STATUS_ENCLAVE_FAILURE NTStatus = 0xC000048F STATUS_PNP_NO_COMPAT_DRIVERS NTStatus = 0xC0000490 STATUS_PNP_DRIVER_PACKAGE_NOT_FOUND NTStatus = 0xC0000491 STATUS_PNP_DRIVER_CONFIGURATION_NOT_FOUND NTStatus = 0xC0000492 STATUS_PNP_DRIVER_CONFIGURATION_INCOMPLETE NTStatus = 0xC0000493 STATUS_PNP_FUNCTION_DRIVER_REQUIRED NTStatus = 0xC0000494 STATUS_PNP_DEVICE_CONFIGURATION_PENDING NTStatus = 0xC0000495 STATUS_DEVICE_HINT_NAME_BUFFER_TOO_SMALL NTStatus = 0xC0000496 STATUS_PACKAGE_NOT_AVAILABLE NTStatus = 0xC0000497 STATUS_DEVICE_IN_MAINTENANCE NTStatus = 0xC0000499 STATUS_NOT_SUPPORTED_ON_DAX NTStatus = 0xC000049A STATUS_FREE_SPACE_TOO_FRAGMENTED NTStatus = 0xC000049B STATUS_DAX_MAPPING_EXISTS NTStatus = 0xC000049C STATUS_CHILD_PROCESS_BLOCKED NTStatus = 0xC000049D STATUS_STORAGE_LOST_DATA_PERSISTENCE NTStatus = 0xC000049E STATUS_VRF_CFG_ENABLED NTStatus = 0xC000049F STATUS_PARTITION_TERMINATING NTStatus = 0xC00004A0 STATUS_EXTERNAL_SYSKEY_NOT_SUPPORTED NTStatus = 0xC00004A1 STATUS_ENCLAVE_VIOLATION NTStatus = 0xC00004A2 STATUS_FILE_PROTECTED_UNDER_DPL NTStatus = 0xC00004A3 STATUS_VOLUME_NOT_CLUSTER_ALIGNED NTStatus = 0xC00004A4 STATUS_NO_PHYSICALLY_ALIGNED_FREE_SPACE_FOUND NTStatus = 0xC00004A5 STATUS_APPX_FILE_NOT_ENCRYPTED NTStatus = 0xC00004A6 STATUS_RWRAW_ENCRYPTED_FILE_NOT_ENCRYPTED NTStatus = 0xC00004A7 STATUS_RWRAW_ENCRYPTED_INVALID_EDATAINFO_FILEOFFSET NTStatus = 0xC00004A8 STATUS_RWRAW_ENCRYPTED_INVALID_EDATAINFO_FILERANGE NTStatus = 0xC00004A9 STATUS_RWRAW_ENCRYPTED_INVALID_EDATAINFO_PARAMETER NTStatus = 0xC00004AA STATUS_FT_READ_FAILURE NTStatus = 0xC00004AB STATUS_PATCH_CONFLICT NTStatus = 0xC00004AC STATUS_STORAGE_RESERVE_ID_INVALID NTStatus = 0xC00004AD STATUS_STORAGE_RESERVE_DOES_NOT_EXIST NTStatus = 0xC00004AE STATUS_STORAGE_RESERVE_ALREADY_EXISTS NTStatus = 0xC00004AF STATUS_STORAGE_RESERVE_NOT_EMPTY NTStatus = 0xC00004B0 STATUS_NOT_A_DAX_VOLUME NTStatus = 0xC00004B1 STATUS_NOT_DAX_MAPPABLE NTStatus = 0xC00004B2 STATUS_CASE_DIFFERING_NAMES_IN_DIR NTStatus = 0xC00004B3 STATUS_FILE_NOT_SUPPORTED NTStatus = 0xC00004B4 STATUS_NOT_SUPPORTED_WITH_BTT NTStatus = 0xC00004B5 STATUS_ENCRYPTION_DISABLED NTStatus = 0xC00004B6 STATUS_ENCRYPTING_METADATA_DISALLOWED NTStatus = 0xC00004B7 STATUS_CANT_CLEAR_ENCRYPTION_FLAG NTStatus = 0xC00004B8 STATUS_INVALID_TASK_NAME NTStatus = 0xC0000500 STATUS_INVALID_TASK_INDEX NTStatus = 0xC0000501 STATUS_THREAD_ALREADY_IN_TASK NTStatus = 0xC0000502 STATUS_CALLBACK_BYPASS NTStatus = 0xC0000503 STATUS_UNDEFINED_SCOPE NTStatus = 0xC0000504 STATUS_INVALID_CAP NTStatus = 0xC0000505 STATUS_NOT_GUI_PROCESS NTStatus = 0xC0000506 STATUS_DEVICE_HUNG NTStatus = 0xC0000507 STATUS_CONTAINER_ASSIGNED NTStatus = 0xC0000508 STATUS_JOB_NO_CONTAINER NTStatus = 0xC0000509 STATUS_DEVICE_UNRESPONSIVE NTStatus = 0xC000050A STATUS_REPARSE_POINT_ENCOUNTERED NTStatus = 0xC000050B STATUS_ATTRIBUTE_NOT_PRESENT NTStatus = 0xC000050C STATUS_NOT_A_TIERED_VOLUME NTStatus = 0xC000050D STATUS_ALREADY_HAS_STREAM_ID NTStatus = 0xC000050E STATUS_JOB_NOT_EMPTY NTStatus = 0xC000050F STATUS_ALREADY_INITIALIZED NTStatus = 0xC0000510 STATUS_ENCLAVE_NOT_TERMINATED NTStatus = 0xC0000511 STATUS_ENCLAVE_IS_TERMINATING NTStatus = 0xC0000512 STATUS_SMB1_NOT_AVAILABLE NTStatus = 0xC0000513 STATUS_SMR_GARBAGE_COLLECTION_REQUIRED NTStatus = 0xC0000514 STATUS_INTERRUPTED NTStatus = 0xC0000515 STATUS_THREAD_NOT_RUNNING NTStatus = 0xC0000516 STATUS_FAIL_FAST_EXCEPTION NTStatus = 0xC0000602 STATUS_IMAGE_CERT_REVOKED NTStatus = 0xC0000603 STATUS_DYNAMIC_CODE_BLOCKED NTStatus = 0xC0000604 STATUS_IMAGE_CERT_EXPIRED NTStatus = 0xC0000605 STATUS_STRICT_CFG_VIOLATION NTStatus = 0xC0000606 STATUS_SET_CONTEXT_DENIED NTStatus = 0xC000060A STATUS_CROSS_PARTITION_VIOLATION NTStatus = 0xC000060B STATUS_PORT_CLOSED NTStatus = 0xC0000700 STATUS_MESSAGE_LOST NTStatus = 0xC0000701 STATUS_INVALID_MESSAGE NTStatus = 0xC0000702 STATUS_REQUEST_CANCELED NTStatus = 0xC0000703 STATUS_RECURSIVE_DISPATCH NTStatus = 0xC0000704 STATUS_LPC_RECEIVE_BUFFER_EXPECTED NTStatus = 0xC0000705 STATUS_LPC_INVALID_CONNECTION_USAGE NTStatus = 0xC0000706 STATUS_LPC_REQUESTS_NOT_ALLOWED NTStatus = 0xC0000707 STATUS_RESOURCE_IN_USE NTStatus = 0xC0000708 STATUS_HARDWARE_MEMORY_ERROR NTStatus = 0xC0000709 STATUS_THREADPOOL_HANDLE_EXCEPTION NTStatus = 0xC000070A STATUS_THREADPOOL_SET_EVENT_ON_COMPLETION_FAILED NTStatus = 0xC000070B STATUS_THREADPOOL_RELEASE_SEMAPHORE_ON_COMPLETION_FAILED NTStatus = 0xC000070C STATUS_THREADPOOL_RELEASE_MUTEX_ON_COMPLETION_FAILED NTStatus = 0xC000070D STATUS_THREADPOOL_FREE_LIBRARY_ON_COMPLETION_FAILED NTStatus = 0xC000070E STATUS_THREADPOOL_RELEASED_DURING_OPERATION NTStatus = 0xC000070F STATUS_CALLBACK_RETURNED_WHILE_IMPERSONATING NTStatus = 0xC0000710 STATUS_APC_RETURNED_WHILE_IMPERSONATING NTStatus = 0xC0000711 STATUS_PROCESS_IS_PROTECTED NTStatus = 0xC0000712 STATUS_MCA_EXCEPTION NTStatus = 0xC0000713 STATUS_CERTIFICATE_MAPPING_NOT_UNIQUE NTStatus = 0xC0000714 STATUS_SYMLINK_CLASS_DISABLED NTStatus = 0xC0000715 STATUS_INVALID_IDN_NORMALIZATION NTStatus = 0xC0000716 STATUS_NO_UNICODE_TRANSLATION NTStatus = 0xC0000717 STATUS_ALREADY_REGISTERED NTStatus = 0xC0000718 STATUS_CONTEXT_MISMATCH NTStatus = 0xC0000719 STATUS_PORT_ALREADY_HAS_COMPLETION_LIST NTStatus = 0xC000071A STATUS_CALLBACK_RETURNED_THREAD_PRIORITY NTStatus = 0xC000071B STATUS_INVALID_THREAD NTStatus = 0xC000071C STATUS_CALLBACK_RETURNED_TRANSACTION NTStatus = 0xC000071D STATUS_CALLBACK_RETURNED_LDR_LOCK NTStatus = 0xC000071E STATUS_CALLBACK_RETURNED_LANG NTStatus = 0xC000071F STATUS_CALLBACK_RETURNED_PRI_BACK NTStatus = 0xC0000720 STATUS_CALLBACK_RETURNED_THREAD_AFFINITY NTStatus = 0xC0000721 STATUS_LPC_HANDLE_COUNT_EXCEEDED NTStatus = 0xC0000722 STATUS_EXECUTABLE_MEMORY_WRITE NTStatus = 0xC0000723 STATUS_KERNEL_EXECUTABLE_MEMORY_WRITE NTStatus = 0xC0000724 STATUS_ATTACHED_EXECUTABLE_MEMORY_WRITE NTStatus = 0xC0000725 STATUS_TRIGGERED_EXECUTABLE_MEMORY_WRITE NTStatus = 0xC0000726 STATUS_DISK_REPAIR_DISABLED NTStatus = 0xC0000800 STATUS_DS_DOMAIN_RENAME_IN_PROGRESS NTStatus = 0xC0000801 STATUS_DISK_QUOTA_EXCEEDED NTStatus = 0xC0000802 STATUS_DATA_LOST_REPAIR NTStatus = 0x80000803 STATUS_CONTENT_BLOCKED NTStatus = 0xC0000804 STATUS_BAD_CLUSTERS NTStatus = 0xC0000805 STATUS_VOLUME_DIRTY NTStatus = 0xC0000806 STATUS_DISK_REPAIR_REDIRECTED NTStatus = 0x40000807 STATUS_DISK_REPAIR_UNSUCCESSFUL NTStatus = 0xC0000808 STATUS_CORRUPT_LOG_OVERFULL NTStatus = 0xC0000809 STATUS_CORRUPT_LOG_CORRUPTED NTStatus = 0xC000080A STATUS_CORRUPT_LOG_UNAVAILABLE NTStatus = 0xC000080B STATUS_CORRUPT_LOG_DELETED_FULL NTStatus = 0xC000080C STATUS_CORRUPT_LOG_CLEARED NTStatus = 0xC000080D STATUS_ORPHAN_NAME_EXHAUSTED NTStatus = 0xC000080E STATUS_PROACTIVE_SCAN_IN_PROGRESS NTStatus = 0xC000080F STATUS_ENCRYPTED_IO_NOT_POSSIBLE NTStatus = 0xC0000810 STATUS_CORRUPT_LOG_UPLEVEL_RECORDS NTStatus = 0xC0000811 STATUS_FILE_CHECKED_OUT NTStatus = 0xC0000901 STATUS_CHECKOUT_REQUIRED NTStatus = 0xC0000902 STATUS_BAD_FILE_TYPE NTStatus = 0xC0000903 STATUS_FILE_TOO_LARGE NTStatus = 0xC0000904 STATUS_FORMS_AUTH_REQUIRED NTStatus = 0xC0000905 STATUS_VIRUS_INFECTED NTStatus = 0xC0000906 STATUS_VIRUS_DELETED NTStatus = 0xC0000907 STATUS_BAD_MCFG_TABLE NTStatus = 0xC0000908 STATUS_CANNOT_BREAK_OPLOCK NTStatus = 0xC0000909 STATUS_BAD_KEY NTStatus = 0xC000090A STATUS_BAD_DATA NTStatus = 0xC000090B STATUS_NO_KEY NTStatus = 0xC000090C STATUS_FILE_HANDLE_REVOKED NTStatus = 0xC0000910 STATUS_WOW_ASSERTION NTStatus = 0xC0009898 STATUS_INVALID_SIGNATURE NTStatus = 0xC000A000 STATUS_HMAC_NOT_SUPPORTED NTStatus = 0xC000A001 STATUS_AUTH_TAG_MISMATCH NTStatus = 0xC000A002 STATUS_INVALID_STATE_TRANSITION NTStatus = 0xC000A003 STATUS_INVALID_KERNEL_INFO_VERSION NTStatus = 0xC000A004 STATUS_INVALID_PEP_INFO_VERSION NTStatus = 0xC000A005 STATUS_HANDLE_REVOKED NTStatus = 0xC000A006 STATUS_EOF_ON_GHOSTED_RANGE NTStatus = 0xC000A007 STATUS_IPSEC_QUEUE_OVERFLOW NTStatus = 0xC000A010 STATUS_ND_QUEUE_OVERFLOW NTStatus = 0xC000A011 STATUS_HOPLIMIT_EXCEEDED NTStatus = 0xC000A012 STATUS_PROTOCOL_NOT_SUPPORTED NTStatus = 0xC000A013 STATUS_FASTPATH_REJECTED NTStatus = 0xC000A014 STATUS_LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED NTStatus = 0xC000A080 STATUS_LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR NTStatus = 0xC000A081 STATUS_LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR NTStatus = 0xC000A082 STATUS_XML_PARSE_ERROR NTStatus = 0xC000A083 STATUS_XMLDSIG_ERROR NTStatus = 0xC000A084 STATUS_WRONG_COMPARTMENT NTStatus = 0xC000A085 STATUS_AUTHIP_FAILURE NTStatus = 0xC000A086 STATUS_DS_OID_MAPPED_GROUP_CANT_HAVE_MEMBERS NTStatus = 0xC000A087 STATUS_DS_OID_NOT_FOUND NTStatus = 0xC000A088 STATUS_INCORRECT_ACCOUNT_TYPE NTStatus = 0xC000A089 STATUS_HASH_NOT_SUPPORTED NTStatus = 0xC000A100 STATUS_HASH_NOT_PRESENT NTStatus = 0xC000A101 STATUS_SECONDARY_IC_PROVIDER_NOT_REGISTERED NTStatus = 0xC000A121 STATUS_GPIO_CLIENT_INFORMATION_INVALID NTStatus = 0xC000A122 STATUS_GPIO_VERSION_NOT_SUPPORTED NTStatus = 0xC000A123 STATUS_GPIO_INVALID_REGISTRATION_PACKET NTStatus = 0xC000A124 STATUS_GPIO_OPERATION_DENIED NTStatus = 0xC000A125 STATUS_GPIO_INCOMPATIBLE_CONNECT_MODE NTStatus = 0xC000A126 STATUS_GPIO_INTERRUPT_ALREADY_UNMASKED NTStatus = 0x8000A127 STATUS_CANNOT_SWITCH_RUNLEVEL NTStatus = 0xC000A141 STATUS_INVALID_RUNLEVEL_SETTING NTStatus = 0xC000A142 STATUS_RUNLEVEL_SWITCH_TIMEOUT NTStatus = 0xC000A143 STATUS_SERVICES_FAILED_AUTOSTART NTStatus = 0x4000A144 STATUS_RUNLEVEL_SWITCH_AGENT_TIMEOUT NTStatus = 0xC000A145 STATUS_RUNLEVEL_SWITCH_IN_PROGRESS NTStatus = 0xC000A146 STATUS_NOT_APPCONTAINER NTStatus = 0xC000A200 STATUS_NOT_SUPPORTED_IN_APPCONTAINER NTStatus = 0xC000A201 STATUS_INVALID_PACKAGE_SID_LENGTH NTStatus = 0xC000A202 STATUS_LPAC_ACCESS_DENIED NTStatus = 0xC000A203 STATUS_ADMINLESS_ACCESS_DENIED NTStatus = 0xC000A204 STATUS_APP_DATA_NOT_FOUND NTStatus = 0xC000A281 STATUS_APP_DATA_EXPIRED NTStatus = 0xC000A282 STATUS_APP_DATA_CORRUPT NTStatus = 0xC000A283 STATUS_APP_DATA_LIMIT_EXCEEDED NTStatus = 0xC000A284 STATUS_APP_DATA_REBOOT_REQUIRED NTStatus = 0xC000A285 STATUS_OFFLOAD_READ_FLT_NOT_SUPPORTED NTStatus = 0xC000A2A1 STATUS_OFFLOAD_WRITE_FLT_NOT_SUPPORTED NTStatus = 0xC000A2A2 STATUS_OFFLOAD_READ_FILE_NOT_SUPPORTED NTStatus = 0xC000A2A3 STATUS_OFFLOAD_WRITE_FILE_NOT_SUPPORTED NTStatus = 0xC000A2A4 STATUS_WOF_WIM_HEADER_CORRUPT NTStatus = 0xC000A2A5 STATUS_WOF_WIM_RESOURCE_TABLE_CORRUPT NTStatus = 0xC000A2A6 STATUS_WOF_FILE_RESOURCE_TABLE_CORRUPT NTStatus = 0xC000A2A7 STATUS_FILE_SYSTEM_VIRTUALIZATION_UNAVAILABLE NTStatus = 0xC000CE01 STATUS_FILE_SYSTEM_VIRTUALIZATION_METADATA_CORRUPT NTStatus = 0xC000CE02 STATUS_FILE_SYSTEM_VIRTUALIZATION_BUSY NTStatus = 0xC000CE03 STATUS_FILE_SYSTEM_VIRTUALIZATION_PROVIDER_UNKNOWN NTStatus = 0xC000CE04 STATUS_FILE_SYSTEM_VIRTUALIZATION_INVALID_OPERATION NTStatus = 0xC000CE05 STATUS_CLOUD_FILE_SYNC_ROOT_METADATA_CORRUPT NTStatus = 0xC000CF00 STATUS_CLOUD_FILE_PROVIDER_NOT_RUNNING NTStatus = 0xC000CF01 STATUS_CLOUD_FILE_METADATA_CORRUPT NTStatus = 0xC000CF02 STATUS_CLOUD_FILE_METADATA_TOO_LARGE NTStatus = 0xC000CF03 STATUS_CLOUD_FILE_PROPERTY_BLOB_TOO_LARGE NTStatus = 0x8000CF04 STATUS_CLOUD_FILE_TOO_MANY_PROPERTY_BLOBS NTStatus = 0x8000CF05 STATUS_CLOUD_FILE_PROPERTY_VERSION_NOT_SUPPORTED NTStatus = 0xC000CF06 STATUS_NOT_A_CLOUD_FILE NTStatus = 0xC000CF07 STATUS_CLOUD_FILE_NOT_IN_SYNC NTStatus = 0xC000CF08 STATUS_CLOUD_FILE_ALREADY_CONNECTED NTStatus = 0xC000CF09 STATUS_CLOUD_FILE_NOT_SUPPORTED NTStatus = 0xC000CF0A STATUS_CLOUD_FILE_INVALID_REQUEST NTStatus = 0xC000CF0B STATUS_CLOUD_FILE_READ_ONLY_VOLUME NTStatus = 0xC000CF0C STATUS_CLOUD_FILE_CONNECTED_PROVIDER_ONLY NTStatus = 0xC000CF0D STATUS_CLOUD_FILE_VALIDATION_FAILED NTStatus = 0xC000CF0E STATUS_CLOUD_FILE_AUTHENTICATION_FAILED NTStatus = 0xC000CF0F STATUS_CLOUD_FILE_INSUFFICIENT_RESOURCES NTStatus = 0xC000CF10 STATUS_CLOUD_FILE_NETWORK_UNAVAILABLE NTStatus = 0xC000CF11 STATUS_CLOUD_FILE_UNSUCCESSFUL NTStatus = 0xC000CF12 STATUS_CLOUD_FILE_NOT_UNDER_SYNC_ROOT NTStatus = 0xC000CF13 STATUS_CLOUD_FILE_IN_USE NTStatus = 0xC000CF14 STATUS_CLOUD_FILE_PINNED NTStatus = 0xC000CF15 STATUS_CLOUD_FILE_REQUEST_ABORTED NTStatus = 0xC000CF16 STATUS_CLOUD_FILE_PROPERTY_CORRUPT NTStatus = 0xC000CF17 STATUS_CLOUD_FILE_ACCESS_DENIED NTStatus = 0xC000CF18 STATUS_CLOUD_FILE_INCOMPATIBLE_HARDLINKS NTStatus = 0xC000CF19 STATUS_CLOUD_FILE_PROPERTY_LOCK_CONFLICT NTStatus = 0xC000CF1A STATUS_CLOUD_FILE_REQUEST_CANCELED NTStatus = 0xC000CF1B STATUS_CLOUD_FILE_PROVIDER_TERMINATED NTStatus = 0xC000CF1D STATUS_NOT_A_CLOUD_SYNC_ROOT NTStatus = 0xC000CF1E STATUS_CLOUD_FILE_REQUEST_TIMEOUT NTStatus = 0xC000CF1F STATUS_ACPI_INVALID_OPCODE NTStatus = 0xC0140001 STATUS_ACPI_STACK_OVERFLOW NTStatus = 0xC0140002 STATUS_ACPI_ASSERT_FAILED NTStatus = 0xC0140003 STATUS_ACPI_INVALID_INDEX NTStatus = 0xC0140004 STATUS_ACPI_INVALID_ARGUMENT NTStatus = 0xC0140005 STATUS_ACPI_FATAL NTStatus = 0xC0140006 STATUS_ACPI_INVALID_SUPERNAME NTStatus = 0xC0140007 STATUS_ACPI_INVALID_ARGTYPE NTStatus = 0xC0140008 STATUS_ACPI_INVALID_OBJTYPE NTStatus = 0xC0140009 STATUS_ACPI_INVALID_TARGETTYPE NTStatus = 0xC014000A STATUS_ACPI_INCORRECT_ARGUMENT_COUNT NTStatus = 0xC014000B STATUS_ACPI_ADDRESS_NOT_MAPPED NTStatus = 0xC014000C STATUS_ACPI_INVALID_EVENTTYPE NTStatus = 0xC014000D STATUS_ACPI_HANDLER_COLLISION NTStatus = 0xC014000E STATUS_ACPI_INVALID_DATA NTStatus = 0xC014000F STATUS_ACPI_INVALID_REGION NTStatus = 0xC0140010 STATUS_ACPI_INVALID_ACCESS_SIZE NTStatus = 0xC0140011 STATUS_ACPI_ACQUIRE_GLOBAL_LOCK NTStatus = 0xC0140012 STATUS_ACPI_ALREADY_INITIALIZED NTStatus = 0xC0140013 STATUS_ACPI_NOT_INITIALIZED NTStatus = 0xC0140014 STATUS_ACPI_INVALID_MUTEX_LEVEL NTStatus = 0xC0140015 STATUS_ACPI_MUTEX_NOT_OWNED NTStatus = 0xC0140016 STATUS_ACPI_MUTEX_NOT_OWNER NTStatus = 0xC0140017 STATUS_ACPI_RS_ACCESS NTStatus = 0xC0140018 STATUS_ACPI_INVALID_TABLE NTStatus = 0xC0140019 STATUS_ACPI_REG_HANDLER_FAILED NTStatus = 0xC0140020 STATUS_ACPI_POWER_REQUEST_FAILED NTStatus = 0xC0140021 STATUS_CTX_WINSTATION_NAME_INVALID NTStatus = 0xC00A0001 STATUS_CTX_INVALID_PD NTStatus = 0xC00A0002 STATUS_CTX_PD_NOT_FOUND NTStatus = 0xC00A0003 STATUS_CTX_CDM_CONNECT NTStatus = 0x400A0004 STATUS_CTX_CDM_DISCONNECT NTStatus = 0x400A0005 STATUS_CTX_CLOSE_PENDING NTStatus = 0xC00A0006 STATUS_CTX_NO_OUTBUF NTStatus = 0xC00A0007 STATUS_CTX_MODEM_INF_NOT_FOUND NTStatus = 0xC00A0008 STATUS_CTX_INVALID_MODEMNAME NTStatus = 0xC00A0009 STATUS_CTX_RESPONSE_ERROR NTStatus = 0xC00A000A STATUS_CTX_MODEM_RESPONSE_TIMEOUT NTStatus = 0xC00A000B STATUS_CTX_MODEM_RESPONSE_NO_CARRIER NTStatus = 0xC00A000C STATUS_CTX_MODEM_RESPONSE_NO_DIALTONE NTStatus = 0xC00A000D STATUS_CTX_MODEM_RESPONSE_BUSY NTStatus = 0xC00A000E STATUS_CTX_MODEM_RESPONSE_VOICE NTStatus = 0xC00A000F STATUS_CTX_TD_ERROR NTStatus = 0xC00A0010 STATUS_CTX_LICENSE_CLIENT_INVALID NTStatus = 0xC00A0012 STATUS_CTX_LICENSE_NOT_AVAILABLE NTStatus = 0xC00A0013 STATUS_CTX_LICENSE_EXPIRED NTStatus = 0xC00A0014 STATUS_CTX_WINSTATION_NOT_FOUND NTStatus = 0xC00A0015 STATUS_CTX_WINSTATION_NAME_COLLISION NTStatus = 0xC00A0016 STATUS_CTX_WINSTATION_BUSY NTStatus = 0xC00A0017 STATUS_CTX_BAD_VIDEO_MODE NTStatus = 0xC00A0018 STATUS_CTX_GRAPHICS_INVALID NTStatus = 0xC00A0022 STATUS_CTX_NOT_CONSOLE NTStatus = 0xC00A0024 STATUS_CTX_CLIENT_QUERY_TIMEOUT NTStatus = 0xC00A0026 STATUS_CTX_CONSOLE_DISCONNECT NTStatus = 0xC00A0027 STATUS_CTX_CONSOLE_CONNECT NTStatus = 0xC00A0028 STATUS_CTX_SHADOW_DENIED NTStatus = 0xC00A002A STATUS_CTX_WINSTATION_ACCESS_DENIED NTStatus = 0xC00A002B STATUS_CTX_INVALID_WD NTStatus = 0xC00A002E STATUS_CTX_WD_NOT_FOUND NTStatus = 0xC00A002F STATUS_CTX_SHADOW_INVALID NTStatus = 0xC00A0030 STATUS_CTX_SHADOW_DISABLED NTStatus = 0xC00A0031 STATUS_RDP_PROTOCOL_ERROR NTStatus = 0xC00A0032 STATUS_CTX_CLIENT_LICENSE_NOT_SET NTStatus = 0xC00A0033 STATUS_CTX_CLIENT_LICENSE_IN_USE NTStatus = 0xC00A0034 STATUS_CTX_SHADOW_ENDED_BY_MODE_CHANGE NTStatus = 0xC00A0035 STATUS_CTX_SHADOW_NOT_RUNNING NTStatus = 0xC00A0036 STATUS_CTX_LOGON_DISABLED NTStatus = 0xC00A0037 STATUS_CTX_SECURITY_LAYER_ERROR NTStatus = 0xC00A0038 STATUS_TS_INCOMPATIBLE_SESSIONS NTStatus = 0xC00A0039 STATUS_TS_VIDEO_SUBSYSTEM_ERROR NTStatus = 0xC00A003A STATUS_PNP_BAD_MPS_TABLE NTStatus = 0xC0040035 STATUS_PNP_TRANSLATION_FAILED NTStatus = 0xC0040036 STATUS_PNP_IRQ_TRANSLATION_FAILED NTStatus = 0xC0040037 STATUS_PNP_INVALID_ID NTStatus = 0xC0040038 STATUS_IO_REISSUE_AS_CACHED NTStatus = 0xC0040039 STATUS_MUI_FILE_NOT_FOUND NTStatus = 0xC00B0001 STATUS_MUI_INVALID_FILE NTStatus = 0xC00B0002 STATUS_MUI_INVALID_RC_CONFIG NTStatus = 0xC00B0003 STATUS_MUI_INVALID_LOCALE_NAME NTStatus = 0xC00B0004 STATUS_MUI_INVALID_ULTIMATEFALLBACK_NAME NTStatus = 0xC00B0005 STATUS_MUI_FILE_NOT_LOADED NTStatus = 0xC00B0006 STATUS_RESOURCE_ENUM_USER_STOP NTStatus = 0xC00B0007 STATUS_FLT_NO_HANDLER_DEFINED NTStatus = 0xC01C0001 STATUS_FLT_CONTEXT_ALREADY_DEFINED NTStatus = 0xC01C0002 STATUS_FLT_INVALID_ASYNCHRONOUS_REQUEST NTStatus = 0xC01C0003 STATUS_FLT_DISALLOW_FAST_IO NTStatus = 0xC01C0004 STATUS_FLT_INVALID_NAME_REQUEST NTStatus = 0xC01C0005 STATUS_FLT_NOT_SAFE_TO_POST_OPERATION NTStatus = 0xC01C0006 STATUS_FLT_NOT_INITIALIZED NTStatus = 0xC01C0007 STATUS_FLT_FILTER_NOT_READY NTStatus = 0xC01C0008 STATUS_FLT_POST_OPERATION_CLEANUP NTStatus = 0xC01C0009 STATUS_FLT_INTERNAL_ERROR NTStatus = 0xC01C000A STATUS_FLT_DELETING_OBJECT NTStatus = 0xC01C000B STATUS_FLT_MUST_BE_NONPAGED_POOL NTStatus = 0xC01C000C STATUS_FLT_DUPLICATE_ENTRY NTStatus = 0xC01C000D STATUS_FLT_CBDQ_DISABLED NTStatus = 0xC01C000E STATUS_FLT_DO_NOT_ATTACH NTStatus = 0xC01C000F STATUS_FLT_DO_NOT_DETACH NTStatus = 0xC01C0010 STATUS_FLT_INSTANCE_ALTITUDE_COLLISION NTStatus = 0xC01C0011 STATUS_FLT_INSTANCE_NAME_COLLISION NTStatus = 0xC01C0012 STATUS_FLT_FILTER_NOT_FOUND NTStatus = 0xC01C0013 STATUS_FLT_VOLUME_NOT_FOUND NTStatus = 0xC01C0014 STATUS_FLT_INSTANCE_NOT_FOUND NTStatus = 0xC01C0015 STATUS_FLT_CONTEXT_ALLOCATION_NOT_FOUND NTStatus = 0xC01C0016 STATUS_FLT_INVALID_CONTEXT_REGISTRATION NTStatus = 0xC01C0017 STATUS_FLT_NAME_CACHE_MISS NTStatus = 0xC01C0018 STATUS_FLT_NO_DEVICE_OBJECT NTStatus = 0xC01C0019 STATUS_FLT_VOLUME_ALREADY_MOUNTED NTStatus = 0xC01C001A STATUS_FLT_ALREADY_ENLISTED NTStatus = 0xC01C001B STATUS_FLT_CONTEXT_ALREADY_LINKED NTStatus = 0xC01C001C STATUS_FLT_NO_WAITER_FOR_REPLY NTStatus = 0xC01C0020 STATUS_FLT_REGISTRATION_BUSY NTStatus = 0xC01C0023 STATUS_SXS_SECTION_NOT_FOUND NTStatus = 0xC0150001 STATUS_SXS_CANT_GEN_ACTCTX NTStatus = 0xC0150002 STATUS_SXS_INVALID_ACTCTXDATA_FORMAT NTStatus = 0xC0150003 STATUS_SXS_ASSEMBLY_NOT_FOUND NTStatus = 0xC0150004 STATUS_SXS_MANIFEST_FORMAT_ERROR NTStatus = 0xC0150005 STATUS_SXS_MANIFEST_PARSE_ERROR NTStatus = 0xC0150006 STATUS_SXS_ACTIVATION_CONTEXT_DISABLED NTStatus = 0xC0150007 STATUS_SXS_KEY_NOT_FOUND NTStatus = 0xC0150008 STATUS_SXS_VERSION_CONFLICT NTStatus = 0xC0150009 STATUS_SXS_WRONG_SECTION_TYPE NTStatus = 0xC015000A STATUS_SXS_THREAD_QUERIES_DISABLED NTStatus = 0xC015000B STATUS_SXS_ASSEMBLY_MISSING NTStatus = 0xC015000C STATUS_SXS_RELEASE_ACTIVATION_CONTEXT NTStatus = 0x4015000D STATUS_SXS_PROCESS_DEFAULT_ALREADY_SET NTStatus = 0xC015000E STATUS_SXS_EARLY_DEACTIVATION NTStatus = 0xC015000F STATUS_SXS_INVALID_DEACTIVATION NTStatus = 0xC0150010 STATUS_SXS_MULTIPLE_DEACTIVATION NTStatus = 0xC0150011 STATUS_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY NTStatus = 0xC0150012 STATUS_SXS_PROCESS_TERMINATION_REQUESTED NTStatus = 0xC0150013 STATUS_SXS_CORRUPT_ACTIVATION_STACK NTStatus = 0xC0150014 STATUS_SXS_CORRUPTION NTStatus = 0xC0150015 STATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE NTStatus = 0xC0150016 STATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME NTStatus = 0xC0150017 STATUS_SXS_IDENTITY_DUPLICATE_ATTRIBUTE NTStatus = 0xC0150018 STATUS_SXS_IDENTITY_PARSE_ERROR NTStatus = 0xC0150019 STATUS_SXS_COMPONENT_STORE_CORRUPT NTStatus = 0xC015001A STATUS_SXS_FILE_HASH_MISMATCH NTStatus = 0xC015001B STATUS_SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT NTStatus = 0xC015001C STATUS_SXS_IDENTITIES_DIFFERENT NTStatus = 0xC015001D STATUS_SXS_ASSEMBLY_IS_NOT_A_DEPLOYMENT NTStatus = 0xC015001E STATUS_SXS_FILE_NOT_PART_OF_ASSEMBLY NTStatus = 0xC015001F STATUS_ADVANCED_INSTALLER_FAILED NTStatus = 0xC0150020 STATUS_XML_ENCODING_MISMATCH NTStatus = 0xC0150021 STATUS_SXS_MANIFEST_TOO_BIG NTStatus = 0xC0150022 STATUS_SXS_SETTING_NOT_REGISTERED NTStatus = 0xC0150023 STATUS_SXS_TRANSACTION_CLOSURE_INCOMPLETE NTStatus = 0xC0150024 STATUS_SMI_PRIMITIVE_INSTALLER_FAILED NTStatus = 0xC0150025 STATUS_GENERIC_COMMAND_FAILED NTStatus = 0xC0150026 STATUS_SXS_FILE_HASH_MISSING NTStatus = 0xC0150027 STATUS_CLUSTER_INVALID_NODE NTStatus = 0xC0130001 STATUS_CLUSTER_NODE_EXISTS NTStatus = 0xC0130002 STATUS_CLUSTER_JOIN_IN_PROGRESS NTStatus = 0xC0130003 STATUS_CLUSTER_NODE_NOT_FOUND NTStatus = 0xC0130004 STATUS_CLUSTER_LOCAL_NODE_NOT_FOUND NTStatus = 0xC0130005 STATUS_CLUSTER_NETWORK_EXISTS NTStatus = 0xC0130006 STATUS_CLUSTER_NETWORK_NOT_FOUND NTStatus = 0xC0130007 STATUS_CLUSTER_NETINTERFACE_EXISTS NTStatus = 0xC0130008 STATUS_CLUSTER_NETINTERFACE_NOT_FOUND NTStatus = 0xC0130009 STATUS_CLUSTER_INVALID_REQUEST NTStatus = 0xC013000A STATUS_CLUSTER_INVALID_NETWORK_PROVIDER NTStatus = 0xC013000B STATUS_CLUSTER_NODE_DOWN NTStatus = 0xC013000C STATUS_CLUSTER_NODE_UNREACHABLE NTStatus = 0xC013000D STATUS_CLUSTER_NODE_NOT_MEMBER NTStatus = 0xC013000E STATUS_CLUSTER_JOIN_NOT_IN_PROGRESS NTStatus = 0xC013000F STATUS_CLUSTER_INVALID_NETWORK NTStatus = 0xC0130010 STATUS_CLUSTER_NO_NET_ADAPTERS NTStatus = 0xC0130011 STATUS_CLUSTER_NODE_UP NTStatus = 0xC0130012 STATUS_CLUSTER_NODE_PAUSED NTStatus = 0xC0130013 STATUS_CLUSTER_NODE_NOT_PAUSED NTStatus = 0xC0130014 STATUS_CLUSTER_NO_SECURITY_CONTEXT NTStatus = 0xC0130015 STATUS_CLUSTER_NETWORK_NOT_INTERNAL NTStatus = 0xC0130016 STATUS_CLUSTER_POISONED NTStatus = 0xC0130017 STATUS_CLUSTER_NON_CSV_PATH NTStatus = 0xC0130018 STATUS_CLUSTER_CSV_VOLUME_NOT_LOCAL NTStatus = 0xC0130019 STATUS_CLUSTER_CSV_READ_OPLOCK_BREAK_IN_PROGRESS NTStatus = 0xC0130020 STATUS_CLUSTER_CSV_AUTO_PAUSE_ERROR NTStatus = 0xC0130021 STATUS_CLUSTER_CSV_REDIRECTED NTStatus = 0xC0130022 STATUS_CLUSTER_CSV_NOT_REDIRECTED NTStatus = 0xC0130023 STATUS_CLUSTER_CSV_VOLUME_DRAINING NTStatus = 0xC0130024 STATUS_CLUSTER_CSV_SNAPSHOT_CREATION_IN_PROGRESS NTStatus = 0xC0130025 STATUS_CLUSTER_CSV_VOLUME_DRAINING_SUCCEEDED_DOWNLEVEL NTStatus = 0xC0130026 STATUS_CLUSTER_CSV_NO_SNAPSHOTS NTStatus = 0xC0130027 STATUS_CSV_IO_PAUSE_TIMEOUT NTStatus = 0xC0130028 STATUS_CLUSTER_CSV_INVALID_HANDLE NTStatus = 0xC0130029 STATUS_CLUSTER_CSV_SUPPORTED_ONLY_ON_COORDINATOR NTStatus = 0xC0130030 STATUS_CLUSTER_CAM_TICKET_REPLAY_DETECTED NTStatus = 0xC0130031 STATUS_TRANSACTIONAL_CONFLICT NTStatus = 0xC0190001 STATUS_INVALID_TRANSACTION NTStatus = 0xC0190002 STATUS_TRANSACTION_NOT_ACTIVE NTStatus = 0xC0190003 STATUS_TM_INITIALIZATION_FAILED NTStatus = 0xC0190004 STATUS_RM_NOT_ACTIVE NTStatus = 0xC0190005 STATUS_RM_METADATA_CORRUPT NTStatus = 0xC0190006 STATUS_TRANSACTION_NOT_JOINED NTStatus = 0xC0190007 STATUS_DIRECTORY_NOT_RM NTStatus = 0xC0190008 STATUS_COULD_NOT_RESIZE_LOG NTStatus = 0x80190009 STATUS_TRANSACTIONS_UNSUPPORTED_REMOTE NTStatus = 0xC019000A STATUS_LOG_RESIZE_INVALID_SIZE NTStatus = 0xC019000B STATUS_REMOTE_FILE_VERSION_MISMATCH NTStatus = 0xC019000C STATUS_CRM_PROTOCOL_ALREADY_EXISTS NTStatus = 0xC019000F STATUS_TRANSACTION_PROPAGATION_FAILED NTStatus = 0xC0190010 STATUS_CRM_PROTOCOL_NOT_FOUND NTStatus = 0xC0190011 STATUS_TRANSACTION_SUPERIOR_EXISTS NTStatus = 0xC0190012 STATUS_TRANSACTION_REQUEST_NOT_VALID NTStatus = 0xC0190013 STATUS_TRANSACTION_NOT_REQUESTED NTStatus = 0xC0190014 STATUS_TRANSACTION_ALREADY_ABORTED NTStatus = 0xC0190015 STATUS_TRANSACTION_ALREADY_COMMITTED NTStatus = 0xC0190016 STATUS_TRANSACTION_INVALID_MARSHALL_BUFFER NTStatus = 0xC0190017 STATUS_CURRENT_TRANSACTION_NOT_VALID NTStatus = 0xC0190018 STATUS_LOG_GROWTH_FAILED NTStatus = 0xC0190019 STATUS_OBJECT_NO_LONGER_EXISTS NTStatus = 0xC0190021 STATUS_STREAM_MINIVERSION_NOT_FOUND NTStatus = 0xC0190022 STATUS_STREAM_MINIVERSION_NOT_VALID NTStatus = 0xC0190023 STATUS_MINIVERSION_INACCESSIBLE_FROM_SPECIFIED_TRANSACTION NTStatus = 0xC0190024 STATUS_CANT_OPEN_MINIVERSION_WITH_MODIFY_INTENT NTStatus = 0xC0190025 STATUS_CANT_CREATE_MORE_STREAM_MINIVERSIONS NTStatus = 0xC0190026 STATUS_HANDLE_NO_LONGER_VALID NTStatus = 0xC0190028 STATUS_NO_TXF_METADATA NTStatus = 0x80190029 STATUS_LOG_CORRUPTION_DETECTED NTStatus = 0xC0190030 STATUS_CANT_RECOVER_WITH_HANDLE_OPEN NTStatus = 0x80190031 STATUS_RM_DISCONNECTED NTStatus = 0xC0190032 STATUS_ENLISTMENT_NOT_SUPERIOR NTStatus = 0xC0190033 STATUS_RECOVERY_NOT_NEEDED NTStatus = 0x40190034 STATUS_RM_ALREADY_STARTED NTStatus = 0x40190035 STATUS_FILE_IDENTITY_NOT_PERSISTENT NTStatus = 0xC0190036 STATUS_CANT_BREAK_TRANSACTIONAL_DEPENDENCY NTStatus = 0xC0190037 STATUS_CANT_CROSS_RM_BOUNDARY NTStatus = 0xC0190038 STATUS_TXF_DIR_NOT_EMPTY NTStatus = 0xC0190039 STATUS_INDOUBT_TRANSACTIONS_EXIST NTStatus = 0xC019003A STATUS_TM_VOLATILE NTStatus = 0xC019003B STATUS_ROLLBACK_TIMER_EXPIRED NTStatus = 0xC019003C STATUS_TXF_ATTRIBUTE_CORRUPT NTStatus = 0xC019003D STATUS_EFS_NOT_ALLOWED_IN_TRANSACTION NTStatus = 0xC019003E STATUS_TRANSACTIONAL_OPEN_NOT_ALLOWED NTStatus = 0xC019003F STATUS_TRANSACTED_MAPPING_UNSUPPORTED_REMOTE NTStatus = 0xC0190040 STATUS_TXF_METADATA_ALREADY_PRESENT NTStatus = 0x80190041 STATUS_TRANSACTION_SCOPE_CALLBACKS_NOT_SET NTStatus = 0x80190042 STATUS_TRANSACTION_REQUIRED_PROMOTION NTStatus = 0xC0190043 STATUS_CANNOT_EXECUTE_FILE_IN_TRANSACTION NTStatus = 0xC0190044 STATUS_TRANSACTIONS_NOT_FROZEN NTStatus = 0xC0190045 STATUS_TRANSACTION_FREEZE_IN_PROGRESS NTStatus = 0xC0190046 STATUS_NOT_SNAPSHOT_VOLUME NTStatus = 0xC0190047 STATUS_NO_SAVEPOINT_WITH_OPEN_FILES NTStatus = 0xC0190048 STATUS_SPARSE_NOT_ALLOWED_IN_TRANSACTION NTStatus = 0xC0190049 STATUS_TM_IDENTITY_MISMATCH NTStatus = 0xC019004A STATUS_FLOATED_SECTION NTStatus = 0xC019004B STATUS_CANNOT_ACCEPT_TRANSACTED_WORK NTStatus = 0xC019004C STATUS_CANNOT_ABORT_TRANSACTIONS NTStatus = 0xC019004D STATUS_TRANSACTION_NOT_FOUND NTStatus = 0xC019004E STATUS_RESOURCEMANAGER_NOT_FOUND NTStatus = 0xC019004F STATUS_ENLISTMENT_NOT_FOUND NTStatus = 0xC0190050 STATUS_TRANSACTIONMANAGER_NOT_FOUND NTStatus = 0xC0190051 STATUS_TRANSACTIONMANAGER_NOT_ONLINE NTStatus = 0xC0190052 STATUS_TRANSACTIONMANAGER_RECOVERY_NAME_COLLISION NTStatus = 0xC0190053 STATUS_TRANSACTION_NOT_ROOT NTStatus = 0xC0190054 STATUS_TRANSACTION_OBJECT_EXPIRED NTStatus = 0xC0190055 STATUS_COMPRESSION_NOT_ALLOWED_IN_TRANSACTION NTStatus = 0xC0190056 STATUS_TRANSACTION_RESPONSE_NOT_ENLISTED NTStatus = 0xC0190057 STATUS_TRANSACTION_RECORD_TOO_LONG NTStatus = 0xC0190058 STATUS_NO_LINK_TRACKING_IN_TRANSACTION NTStatus = 0xC0190059 STATUS_OPERATION_NOT_SUPPORTED_IN_TRANSACTION NTStatus = 0xC019005A STATUS_TRANSACTION_INTEGRITY_VIOLATED NTStatus = 0xC019005B STATUS_TRANSACTIONMANAGER_IDENTITY_MISMATCH NTStatus = 0xC019005C STATUS_RM_CANNOT_BE_FROZEN_FOR_SNAPSHOT NTStatus = 0xC019005D STATUS_TRANSACTION_MUST_WRITETHROUGH NTStatus = 0xC019005E STATUS_TRANSACTION_NO_SUPERIOR NTStatus = 0xC019005F STATUS_EXPIRED_HANDLE NTStatus = 0xC0190060 STATUS_TRANSACTION_NOT_ENLISTED NTStatus = 0xC0190061 STATUS_LOG_SECTOR_INVALID NTStatus = 0xC01A0001 STATUS_LOG_SECTOR_PARITY_INVALID NTStatus = 0xC01A0002 STATUS_LOG_SECTOR_REMAPPED NTStatus = 0xC01A0003 STATUS_LOG_BLOCK_INCOMPLETE NTStatus = 0xC01A0004 STATUS_LOG_INVALID_RANGE NTStatus = 0xC01A0005 STATUS_LOG_BLOCKS_EXHAUSTED NTStatus = 0xC01A0006 STATUS_LOG_READ_CONTEXT_INVALID NTStatus = 0xC01A0007 STATUS_LOG_RESTART_INVALID NTStatus = 0xC01A0008 STATUS_LOG_BLOCK_VERSION NTStatus = 0xC01A0009 STATUS_LOG_BLOCK_INVALID NTStatus = 0xC01A000A STATUS_LOG_READ_MODE_INVALID NTStatus = 0xC01A000B STATUS_LOG_NO_RESTART NTStatus = 0x401A000C STATUS_LOG_METADATA_CORRUPT NTStatus = 0xC01A000D STATUS_LOG_METADATA_INVALID NTStatus = 0xC01A000E STATUS_LOG_METADATA_INCONSISTENT NTStatus = 0xC01A000F STATUS_LOG_RESERVATION_INVALID NTStatus = 0xC01A0010 STATUS_LOG_CANT_DELETE NTStatus = 0xC01A0011 STATUS_LOG_CONTAINER_LIMIT_EXCEEDED NTStatus = 0xC01A0012 STATUS_LOG_START_OF_LOG NTStatus = 0xC01A0013 STATUS_LOG_POLICY_ALREADY_INSTALLED NTStatus = 0xC01A0014 STATUS_LOG_POLICY_NOT_INSTALLED NTStatus = 0xC01A0015 STATUS_LOG_POLICY_INVALID NTStatus = 0xC01A0016 STATUS_LOG_POLICY_CONFLICT NTStatus = 0xC01A0017 STATUS_LOG_PINNED_ARCHIVE_TAIL NTStatus = 0xC01A0018 STATUS_LOG_RECORD_NONEXISTENT NTStatus = 0xC01A0019 STATUS_LOG_RECORDS_RESERVED_INVALID NTStatus = 0xC01A001A STATUS_LOG_SPACE_RESERVED_INVALID NTStatus = 0xC01A001B STATUS_LOG_TAIL_INVALID NTStatus = 0xC01A001C STATUS_LOG_FULL NTStatus = 0xC01A001D STATUS_LOG_MULTIPLEXED NTStatus = 0xC01A001E STATUS_LOG_DEDICATED NTStatus = 0xC01A001F STATUS_LOG_ARCHIVE_NOT_IN_PROGRESS NTStatus = 0xC01A0020 STATUS_LOG_ARCHIVE_IN_PROGRESS NTStatus = 0xC01A0021 STATUS_LOG_EPHEMERAL NTStatus = 0xC01A0022 STATUS_LOG_NOT_ENOUGH_CONTAINERS NTStatus = 0xC01A0023 STATUS_LOG_CLIENT_ALREADY_REGISTERED NTStatus = 0xC01A0024 STATUS_LOG_CLIENT_NOT_REGISTERED NTStatus = 0xC01A0025 STATUS_LOG_FULL_HANDLER_IN_PROGRESS NTStatus = 0xC01A0026 STATUS_LOG_CONTAINER_READ_FAILED NTStatus = 0xC01A0027 STATUS_LOG_CONTAINER_WRITE_FAILED NTStatus = 0xC01A0028 STATUS_LOG_CONTAINER_OPEN_FAILED NTStatus = 0xC01A0029 STATUS_LOG_CONTAINER_STATE_INVALID NTStatus = 0xC01A002A STATUS_LOG_STATE_INVALID NTStatus = 0xC01A002B STATUS_LOG_PINNED NTStatus = 0xC01A002C STATUS_LOG_METADATA_FLUSH_FAILED NTStatus = 0xC01A002D STATUS_LOG_INCONSISTENT_SECURITY NTStatus = 0xC01A002E STATUS_LOG_APPENDED_FLUSH_FAILED NTStatus = 0xC01A002F STATUS_LOG_PINNED_RESERVATION NTStatus = 0xC01A0030 STATUS_VIDEO_HUNG_DISPLAY_DRIVER_THREAD NTStatus = 0xC01B00EA STATUS_VIDEO_HUNG_DISPLAY_DRIVER_THREAD_RECOVERED NTStatus = 0x801B00EB STATUS_VIDEO_DRIVER_DEBUG_REPORT_REQUEST NTStatus = 0x401B00EC STATUS_MONITOR_NO_DESCRIPTOR NTStatus = 0xC01D0001 STATUS_MONITOR_UNKNOWN_DESCRIPTOR_FORMAT NTStatus = 0xC01D0002 STATUS_MONITOR_INVALID_DESCRIPTOR_CHECKSUM NTStatus = 0xC01D0003 STATUS_MONITOR_INVALID_STANDARD_TIMING_BLOCK NTStatus = 0xC01D0004 STATUS_MONITOR_WMI_DATABLOCK_REGISTRATION_FAILED NTStatus = 0xC01D0005 STATUS_MONITOR_INVALID_SERIAL_NUMBER_MONDSC_BLOCK NTStatus = 0xC01D0006 STATUS_MONITOR_INVALID_USER_FRIENDLY_MONDSC_BLOCK NTStatus = 0xC01D0007 STATUS_MONITOR_NO_MORE_DESCRIPTOR_DATA NTStatus = 0xC01D0008 STATUS_MONITOR_INVALID_DETAILED_TIMING_BLOCK NTStatus = 0xC01D0009 STATUS_MONITOR_INVALID_MANUFACTURE_DATE NTStatus = 0xC01D000A STATUS_GRAPHICS_NOT_EXCLUSIVE_MODE_OWNER NTStatus = 0xC01E0000 STATUS_GRAPHICS_INSUFFICIENT_DMA_BUFFER NTStatus = 0xC01E0001 STATUS_GRAPHICS_INVALID_DISPLAY_ADAPTER NTStatus = 0xC01E0002 STATUS_GRAPHICS_ADAPTER_WAS_RESET NTStatus = 0xC01E0003 STATUS_GRAPHICS_INVALID_DRIVER_MODEL NTStatus = 0xC01E0004 STATUS_GRAPHICS_PRESENT_MODE_CHANGED NTStatus = 0xC01E0005 STATUS_GRAPHICS_PRESENT_OCCLUDED NTStatus = 0xC01E0006 STATUS_GRAPHICS_PRESENT_DENIED NTStatus = 0xC01E0007 STATUS_GRAPHICS_CANNOTCOLORCONVERT NTStatus = 0xC01E0008 STATUS_GRAPHICS_DRIVER_MISMATCH NTStatus = 0xC01E0009 STATUS_GRAPHICS_PARTIAL_DATA_POPULATED NTStatus = 0x401E000A STATUS_GRAPHICS_PRESENT_REDIRECTION_DISABLED NTStatus = 0xC01E000B STATUS_GRAPHICS_PRESENT_UNOCCLUDED NTStatus = 0xC01E000C STATUS_GRAPHICS_WINDOWDC_NOT_AVAILABLE NTStatus = 0xC01E000D STATUS_GRAPHICS_WINDOWLESS_PRESENT_DISABLED NTStatus = 0xC01E000E STATUS_GRAPHICS_PRESENT_INVALID_WINDOW NTStatus = 0xC01E000F STATUS_GRAPHICS_PRESENT_BUFFER_NOT_BOUND NTStatus = 0xC01E0010 STATUS_GRAPHICS_VAIL_STATE_CHANGED NTStatus = 0xC01E0011 STATUS_GRAPHICS_INDIRECT_DISPLAY_ABANDON_SWAPCHAIN NTStatus = 0xC01E0012 STATUS_GRAPHICS_INDIRECT_DISPLAY_DEVICE_STOPPED NTStatus = 0xC01E0013 STATUS_GRAPHICS_NO_VIDEO_MEMORY NTStatus = 0xC01E0100 STATUS_GRAPHICS_CANT_LOCK_MEMORY NTStatus = 0xC01E0101 STATUS_GRAPHICS_ALLOCATION_BUSY NTStatus = 0xC01E0102 STATUS_GRAPHICS_TOO_MANY_REFERENCES NTStatus = 0xC01E0103 STATUS_GRAPHICS_TRY_AGAIN_LATER NTStatus = 0xC01E0104 STATUS_GRAPHICS_TRY_AGAIN_NOW NTStatus = 0xC01E0105 STATUS_GRAPHICS_ALLOCATION_INVALID NTStatus = 0xC01E0106 STATUS_GRAPHICS_UNSWIZZLING_APERTURE_UNAVAILABLE NTStatus = 0xC01E0107 STATUS_GRAPHICS_UNSWIZZLING_APERTURE_UNSUPPORTED NTStatus = 0xC01E0108 STATUS_GRAPHICS_CANT_EVICT_PINNED_ALLOCATION NTStatus = 0xC01E0109 STATUS_GRAPHICS_INVALID_ALLOCATION_USAGE NTStatus = 0xC01E0110 STATUS_GRAPHICS_CANT_RENDER_LOCKED_ALLOCATION NTStatus = 0xC01E0111 STATUS_GRAPHICS_ALLOCATION_CLOSED NTStatus = 0xC01E0112 STATUS_GRAPHICS_INVALID_ALLOCATION_INSTANCE NTStatus = 0xC01E0113 STATUS_GRAPHICS_INVALID_ALLOCATION_HANDLE NTStatus = 0xC01E0114 STATUS_GRAPHICS_WRONG_ALLOCATION_DEVICE NTStatus = 0xC01E0115 STATUS_GRAPHICS_ALLOCATION_CONTENT_LOST NTStatus = 0xC01E0116 STATUS_GRAPHICS_GPU_EXCEPTION_ON_DEVICE NTStatus = 0xC01E0200 STATUS_GRAPHICS_SKIP_ALLOCATION_PREPARATION NTStatus = 0x401E0201 STATUS_GRAPHICS_INVALID_VIDPN_TOPOLOGY NTStatus = 0xC01E0300 STATUS_GRAPHICS_VIDPN_TOPOLOGY_NOT_SUPPORTED NTStatus = 0xC01E0301 STATUS_GRAPHICS_VIDPN_TOPOLOGY_CURRENTLY_NOT_SUPPORTED NTStatus = 0xC01E0302 STATUS_GRAPHICS_INVALID_VIDPN NTStatus = 0xC01E0303 STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE NTStatus = 0xC01E0304 STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET NTStatus = 0xC01E0305 STATUS_GRAPHICS_VIDPN_MODALITY_NOT_SUPPORTED NTStatus = 0xC01E0306 STATUS_GRAPHICS_MODE_NOT_PINNED NTStatus = 0x401E0307 STATUS_GRAPHICS_INVALID_VIDPN_SOURCEMODESET NTStatus = 0xC01E0308 STATUS_GRAPHICS_INVALID_VIDPN_TARGETMODESET NTStatus = 0xC01E0309 STATUS_GRAPHICS_INVALID_FREQUENCY NTStatus = 0xC01E030A STATUS_GRAPHICS_INVALID_ACTIVE_REGION NTStatus = 0xC01E030B STATUS_GRAPHICS_INVALID_TOTAL_REGION NTStatus = 0xC01E030C STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE_MODE NTStatus = 0xC01E0310 STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET_MODE NTStatus = 0xC01E0311 STATUS_GRAPHICS_PINNED_MODE_MUST_REMAIN_IN_SET NTStatus = 0xC01E0312 STATUS_GRAPHICS_PATH_ALREADY_IN_TOPOLOGY NTStatus = 0xC01E0313 STATUS_GRAPHICS_MODE_ALREADY_IN_MODESET NTStatus = 0xC01E0314 STATUS_GRAPHICS_INVALID_VIDEOPRESENTSOURCESET NTStatus = 0xC01E0315 STATUS_GRAPHICS_INVALID_VIDEOPRESENTTARGETSET NTStatus = 0xC01E0316 STATUS_GRAPHICS_SOURCE_ALREADY_IN_SET NTStatus = 0xC01E0317 STATUS_GRAPHICS_TARGET_ALREADY_IN_SET NTStatus = 0xC01E0318 STATUS_GRAPHICS_INVALID_VIDPN_PRESENT_PATH NTStatus = 0xC01E0319 STATUS_GRAPHICS_NO_RECOMMENDED_VIDPN_TOPOLOGY NTStatus = 0xC01E031A STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGESET NTStatus = 0xC01E031B STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE NTStatus = 0xC01E031C STATUS_GRAPHICS_FREQUENCYRANGE_NOT_IN_SET NTStatus = 0xC01E031D STATUS_GRAPHICS_NO_PREFERRED_MODE NTStatus = 0x401E031E STATUS_GRAPHICS_FREQUENCYRANGE_ALREADY_IN_SET NTStatus = 0xC01E031F STATUS_GRAPHICS_STALE_MODESET NTStatus = 0xC01E0320 STATUS_GRAPHICS_INVALID_MONITOR_SOURCEMODESET NTStatus = 0xC01E0321 STATUS_GRAPHICS_INVALID_MONITOR_SOURCE_MODE NTStatus = 0xC01E0322 STATUS_GRAPHICS_NO_RECOMMENDED_FUNCTIONAL_VIDPN NTStatus = 0xC01E0323 STATUS_GRAPHICS_MODE_ID_MUST_BE_UNIQUE NTStatus = 0xC01E0324 STATUS_GRAPHICS_EMPTY_ADAPTER_MONITOR_MODE_SUPPORT_INTERSECTION NTStatus = 0xC01E0325 STATUS_GRAPHICS_VIDEO_PRESENT_TARGETS_LESS_THAN_SOURCES NTStatus = 0xC01E0326 STATUS_GRAPHICS_PATH_NOT_IN_TOPOLOGY NTStatus = 0xC01E0327 STATUS_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_SOURCE NTStatus = 0xC01E0328 STATUS_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_TARGET NTStatus = 0xC01E0329 STATUS_GRAPHICS_INVALID_MONITORDESCRIPTORSET NTStatus = 0xC01E032A STATUS_GRAPHICS_INVALID_MONITORDESCRIPTOR NTStatus = 0xC01E032B STATUS_GRAPHICS_MONITORDESCRIPTOR_NOT_IN_SET NTStatus = 0xC01E032C STATUS_GRAPHICS_MONITORDESCRIPTOR_ALREADY_IN_SET NTStatus = 0xC01E032D STATUS_GRAPHICS_MONITORDESCRIPTOR_ID_MUST_BE_UNIQUE NTStatus = 0xC01E032E STATUS_GRAPHICS_INVALID_VIDPN_TARGET_SUBSET_TYPE NTStatus = 0xC01E032F STATUS_GRAPHICS_RESOURCES_NOT_RELATED NTStatus = 0xC01E0330 STATUS_GRAPHICS_SOURCE_ID_MUST_BE_UNIQUE NTStatus = 0xC01E0331 STATUS_GRAPHICS_TARGET_ID_MUST_BE_UNIQUE NTStatus = 0xC01E0332 STATUS_GRAPHICS_NO_AVAILABLE_VIDPN_TARGET NTStatus = 0xC01E0333 STATUS_GRAPHICS_MONITOR_COULD_NOT_BE_ASSOCIATED_WITH_ADAPTER NTStatus = 0xC01E0334 STATUS_GRAPHICS_NO_VIDPNMGR NTStatus = 0xC01E0335 STATUS_GRAPHICS_NO_ACTIVE_VIDPN NTStatus = 0xC01E0336 STATUS_GRAPHICS_STALE_VIDPN_TOPOLOGY NTStatus = 0xC01E0337 STATUS_GRAPHICS_MONITOR_NOT_CONNECTED NTStatus = 0xC01E0338 STATUS_GRAPHICS_SOURCE_NOT_IN_TOPOLOGY NTStatus = 0xC01E0339 STATUS_GRAPHICS_INVALID_PRIMARYSURFACE_SIZE NTStatus = 0xC01E033A STATUS_GRAPHICS_INVALID_VISIBLEREGION_SIZE NTStatus = 0xC01E033B STATUS_GRAPHICS_INVALID_STRIDE NTStatus = 0xC01E033C STATUS_GRAPHICS_INVALID_PIXELFORMAT NTStatus = 0xC01E033D STATUS_GRAPHICS_INVALID_COLORBASIS NTStatus = 0xC01E033E STATUS_GRAPHICS_INVALID_PIXELVALUEACCESSMODE NTStatus = 0xC01E033F STATUS_GRAPHICS_TARGET_NOT_IN_TOPOLOGY NTStatus = 0xC01E0340 STATUS_GRAPHICS_NO_DISPLAY_MODE_MANAGEMENT_SUPPORT NTStatus = 0xC01E0341 STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE NTStatus = 0xC01E0342 STATUS_GRAPHICS_CANT_ACCESS_ACTIVE_VIDPN NTStatus = 0xC01E0343 STATUS_GRAPHICS_INVALID_PATH_IMPORTANCE_ORDINAL NTStatus = 0xC01E0344 STATUS_GRAPHICS_INVALID_PATH_CONTENT_GEOMETRY_TRANSFORMATION NTStatus = 0xC01E0345 STATUS_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_SUPPORTED NTStatus = 0xC01E0346 STATUS_GRAPHICS_INVALID_GAMMA_RAMP NTStatus = 0xC01E0347 STATUS_GRAPHICS_GAMMA_RAMP_NOT_SUPPORTED NTStatus = 0xC01E0348 STATUS_GRAPHICS_MULTISAMPLING_NOT_SUPPORTED NTStatus = 0xC01E0349 STATUS_GRAPHICS_MODE_NOT_IN_MODESET NTStatus = 0xC01E034A STATUS_GRAPHICS_DATASET_IS_EMPTY NTStatus = 0x401E034B STATUS_GRAPHICS_NO_MORE_ELEMENTS_IN_DATASET NTStatus = 0x401E034C STATUS_GRAPHICS_INVALID_VIDPN_TOPOLOGY_RECOMMENDATION_REASON NTStatus = 0xC01E034D STATUS_GRAPHICS_INVALID_PATH_CONTENT_TYPE NTStatus = 0xC01E034E STATUS_GRAPHICS_INVALID_COPYPROTECTION_TYPE NTStatus = 0xC01E034F STATUS_GRAPHICS_UNASSIGNED_MODESET_ALREADY_EXISTS NTStatus = 0xC01E0350 STATUS_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_PINNED NTStatus = 0x401E0351 STATUS_GRAPHICS_INVALID_SCANLINE_ORDERING NTStatus = 0xC01E0352 STATUS_GRAPHICS_TOPOLOGY_CHANGES_NOT_ALLOWED NTStatus = 0xC01E0353 STATUS_GRAPHICS_NO_AVAILABLE_IMPORTANCE_ORDINALS NTStatus = 0xC01E0354 STATUS_GRAPHICS_INCOMPATIBLE_PRIVATE_FORMAT NTStatus = 0xC01E0355 STATUS_GRAPHICS_INVALID_MODE_PRUNING_ALGORITHM NTStatus = 0xC01E0356 STATUS_GRAPHICS_INVALID_MONITOR_CAPABILITY_ORIGIN NTStatus = 0xC01E0357 STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE_CONSTRAINT NTStatus = 0xC01E0358 STATUS_GRAPHICS_MAX_NUM_PATHS_REACHED NTStatus = 0xC01E0359 STATUS_GRAPHICS_CANCEL_VIDPN_TOPOLOGY_AUGMENTATION NTStatus = 0xC01E035A STATUS_GRAPHICS_INVALID_CLIENT_TYPE NTStatus = 0xC01E035B STATUS_GRAPHICS_CLIENTVIDPN_NOT_SET NTStatus = 0xC01E035C STATUS_GRAPHICS_SPECIFIED_CHILD_ALREADY_CONNECTED NTStatus = 0xC01E0400 STATUS_GRAPHICS_CHILD_DESCRIPTOR_NOT_SUPPORTED NTStatus = 0xC01E0401 STATUS_GRAPHICS_UNKNOWN_CHILD_STATUS NTStatus = 0x401E042F STATUS_GRAPHICS_NOT_A_LINKED_ADAPTER NTStatus = 0xC01E0430 STATUS_GRAPHICS_LEADLINK_NOT_ENUMERATED NTStatus = 0xC01E0431 STATUS_GRAPHICS_CHAINLINKS_NOT_ENUMERATED NTStatus = 0xC01E0432 STATUS_GRAPHICS_ADAPTER_CHAIN_NOT_READY NTStatus = 0xC01E0433 STATUS_GRAPHICS_CHAINLINKS_NOT_STARTED NTStatus = 0xC01E0434 STATUS_GRAPHICS_CHAINLINKS_NOT_POWERED_ON NTStatus = 0xC01E0435 STATUS_GRAPHICS_INCONSISTENT_DEVICE_LINK_STATE NTStatus = 0xC01E0436 STATUS_GRAPHICS_LEADLINK_START_DEFERRED NTStatus = 0x401E0437 STATUS_GRAPHICS_NOT_POST_DEVICE_DRIVER NTStatus = 0xC01E0438 STATUS_GRAPHICS_POLLING_TOO_FREQUENTLY NTStatus = 0x401E0439 STATUS_GRAPHICS_START_DEFERRED NTStatus = 0x401E043A STATUS_GRAPHICS_ADAPTER_ACCESS_NOT_EXCLUDED NTStatus = 0xC01E043B STATUS_GRAPHICS_DEPENDABLE_CHILD_STATUS NTStatus = 0x401E043C STATUS_GRAPHICS_OPM_NOT_SUPPORTED NTStatus = 0xC01E0500 STATUS_GRAPHICS_COPP_NOT_SUPPORTED NTStatus = 0xC01E0501 STATUS_GRAPHICS_UAB_NOT_SUPPORTED NTStatus = 0xC01E0502 STATUS_GRAPHICS_OPM_INVALID_ENCRYPTED_PARAMETERS NTStatus = 0xC01E0503 STATUS_GRAPHICS_OPM_NO_PROTECTED_OUTPUTS_EXIST NTStatus = 0xC01E0505 STATUS_GRAPHICS_OPM_INTERNAL_ERROR NTStatus = 0xC01E050B STATUS_GRAPHICS_OPM_INVALID_HANDLE NTStatus = 0xC01E050C STATUS_GRAPHICS_PVP_INVALID_CERTIFICATE_LENGTH NTStatus = 0xC01E050E STATUS_GRAPHICS_OPM_SPANNING_MODE_ENABLED NTStatus = 0xC01E050F STATUS_GRAPHICS_OPM_THEATER_MODE_ENABLED NTStatus = 0xC01E0510 STATUS_GRAPHICS_PVP_HFS_FAILED NTStatus = 0xC01E0511 STATUS_GRAPHICS_OPM_INVALID_SRM NTStatus = 0xC01E0512 STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_HDCP NTStatus = 0xC01E0513 STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_ACP NTStatus = 0xC01E0514 STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_CGMSA NTStatus = 0xC01E0515 STATUS_GRAPHICS_OPM_HDCP_SRM_NEVER_SET NTStatus = 0xC01E0516 STATUS_GRAPHICS_OPM_RESOLUTION_TOO_HIGH NTStatus = 0xC01E0517 STATUS_GRAPHICS_OPM_ALL_HDCP_HARDWARE_ALREADY_IN_USE NTStatus = 0xC01E0518 STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_NO_LONGER_EXISTS NTStatus = 0xC01E051A STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_COPP_SEMANTICS NTStatus = 0xC01E051C STATUS_GRAPHICS_OPM_INVALID_INFORMATION_REQUEST NTStatus = 0xC01E051D STATUS_GRAPHICS_OPM_DRIVER_INTERNAL_ERROR NTStatus = 0xC01E051E STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_OPM_SEMANTICS NTStatus = 0xC01E051F STATUS_GRAPHICS_OPM_SIGNALING_NOT_SUPPORTED NTStatus = 0xC01E0520 STATUS_GRAPHICS_OPM_INVALID_CONFIGURATION_REQUEST NTStatus = 0xC01E0521 STATUS_GRAPHICS_I2C_NOT_SUPPORTED NTStatus = 0xC01E0580 STATUS_GRAPHICS_I2C_DEVICE_DOES_NOT_EXIST NTStatus = 0xC01E0581 STATUS_GRAPHICS_I2C_ERROR_TRANSMITTING_DATA NTStatus = 0xC01E0582 STATUS_GRAPHICS_I2C_ERROR_RECEIVING_DATA NTStatus = 0xC01E0583 STATUS_GRAPHICS_DDCCI_VCP_NOT_SUPPORTED NTStatus = 0xC01E0584 STATUS_GRAPHICS_DDCCI_INVALID_DATA NTStatus = 0xC01E0585 STATUS_GRAPHICS_DDCCI_MONITOR_RETURNED_INVALID_TIMING_STATUS_BYTE NTStatus = 0xC01E0586 STATUS_GRAPHICS_DDCCI_INVALID_CAPABILITIES_STRING NTStatus = 0xC01E0587 STATUS_GRAPHICS_MCA_INTERNAL_ERROR NTStatus = 0xC01E0588 STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_COMMAND NTStatus = 0xC01E0589 STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_LENGTH NTStatus = 0xC01E058A STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_CHECKSUM NTStatus = 0xC01E058B STATUS_GRAPHICS_INVALID_PHYSICAL_MONITOR_HANDLE NTStatus = 0xC01E058C STATUS_GRAPHICS_MONITOR_NO_LONGER_EXISTS NTStatus = 0xC01E058D STATUS_GRAPHICS_ONLY_CONSOLE_SESSION_SUPPORTED NTStatus = 0xC01E05E0 STATUS_GRAPHICS_NO_DISPLAY_DEVICE_CORRESPONDS_TO_NAME NTStatus = 0xC01E05E1 STATUS_GRAPHICS_DISPLAY_DEVICE_NOT_ATTACHED_TO_DESKTOP NTStatus = 0xC01E05E2 STATUS_GRAPHICS_MIRRORING_DEVICES_NOT_SUPPORTED NTStatus = 0xC01E05E3 STATUS_GRAPHICS_INVALID_POINTER NTStatus = 0xC01E05E4 STATUS_GRAPHICS_NO_MONITORS_CORRESPOND_TO_DISPLAY_DEVICE NTStatus = 0xC01E05E5 STATUS_GRAPHICS_PARAMETER_ARRAY_TOO_SMALL NTStatus = 0xC01E05E6 STATUS_GRAPHICS_INTERNAL_ERROR NTStatus = 0xC01E05E7 STATUS_GRAPHICS_SESSION_TYPE_CHANGE_IN_PROGRESS NTStatus = 0xC01E05E8 STATUS_FVE_LOCKED_VOLUME NTStatus = 0xC0210000 STATUS_FVE_NOT_ENCRYPTED NTStatus = 0xC0210001 STATUS_FVE_BAD_INFORMATION NTStatus = 0xC0210002 STATUS_FVE_TOO_SMALL NTStatus = 0xC0210003 STATUS_FVE_FAILED_WRONG_FS NTStatus = 0xC0210004 STATUS_FVE_BAD_PARTITION_SIZE NTStatus = 0xC0210005 STATUS_FVE_FS_NOT_EXTENDED NTStatus = 0xC0210006 STATUS_FVE_FS_MOUNTED NTStatus = 0xC0210007 STATUS_FVE_NO_LICENSE NTStatus = 0xC0210008 STATUS_FVE_ACTION_NOT_ALLOWED NTStatus = 0xC0210009 STATUS_FVE_BAD_DATA NTStatus = 0xC021000A STATUS_FVE_VOLUME_NOT_BOUND NTStatus = 0xC021000B STATUS_FVE_NOT_DATA_VOLUME NTStatus = 0xC021000C STATUS_FVE_CONV_READ_ERROR NTStatus = 0xC021000D STATUS_FVE_CONV_WRITE_ERROR NTStatus = 0xC021000E STATUS_FVE_OVERLAPPED_UPDATE NTStatus = 0xC021000F STATUS_FVE_FAILED_SECTOR_SIZE NTStatus = 0xC0210010 STATUS_FVE_FAILED_AUTHENTICATION NTStatus = 0xC0210011 STATUS_FVE_NOT_OS_VOLUME NTStatus = 0xC0210012 STATUS_FVE_KEYFILE_NOT_FOUND NTStatus = 0xC0210013 STATUS_FVE_KEYFILE_INVALID NTStatus = 0xC0210014 STATUS_FVE_KEYFILE_NO_VMK NTStatus = 0xC0210015 STATUS_FVE_TPM_DISABLED NTStatus = 0xC0210016 STATUS_FVE_TPM_SRK_AUTH_NOT_ZERO NTStatus = 0xC0210017 STATUS_FVE_TPM_INVALID_PCR NTStatus = 0xC0210018 STATUS_FVE_TPM_NO_VMK NTStatus = 0xC0210019 STATUS_FVE_PIN_INVALID NTStatus = 0xC021001A STATUS_FVE_AUTH_INVALID_APPLICATION NTStatus = 0xC021001B STATUS_FVE_AUTH_INVALID_CONFIG NTStatus = 0xC021001C STATUS_FVE_DEBUGGER_ENABLED NTStatus = 0xC021001D STATUS_FVE_DRY_RUN_FAILED NTStatus = 0xC021001E STATUS_FVE_BAD_METADATA_POINTER NTStatus = 0xC021001F STATUS_FVE_OLD_METADATA_COPY NTStatus = 0xC0210020 STATUS_FVE_REBOOT_REQUIRED NTStatus = 0xC0210021 STATUS_FVE_RAW_ACCESS NTStatus = 0xC0210022 STATUS_FVE_RAW_BLOCKED NTStatus = 0xC0210023 STATUS_FVE_NO_AUTOUNLOCK_MASTER_KEY NTStatus = 0xC0210024 STATUS_FVE_MOR_FAILED NTStatus = 0xC0210025 STATUS_FVE_NO_FEATURE_LICENSE NTStatus = 0xC0210026 STATUS_FVE_POLICY_USER_DISABLE_RDV_NOT_ALLOWED NTStatus = 0xC0210027 STATUS_FVE_CONV_RECOVERY_FAILED NTStatus = 0xC0210028 STATUS_FVE_VIRTUALIZED_SPACE_TOO_BIG NTStatus = 0xC0210029 STATUS_FVE_INVALID_DATUM_TYPE NTStatus = 0xC021002A STATUS_FVE_VOLUME_TOO_SMALL NTStatus = 0xC0210030 STATUS_FVE_ENH_PIN_INVALID NTStatus = 0xC0210031 STATUS_FVE_FULL_ENCRYPTION_NOT_ALLOWED_ON_TP_STORAGE NTStatus = 0xC0210032 STATUS_FVE_WIPE_NOT_ALLOWED_ON_TP_STORAGE NTStatus = 0xC0210033 STATUS_FVE_NOT_ALLOWED_ON_CSV_STACK NTStatus = 0xC0210034 STATUS_FVE_NOT_ALLOWED_ON_CLUSTER NTStatus = 0xC0210035 STATUS_FVE_NOT_ALLOWED_TO_UPGRADE_WHILE_CONVERTING NTStatus = 0xC0210036 STATUS_FVE_WIPE_CANCEL_NOT_APPLICABLE NTStatus = 0xC0210037 STATUS_FVE_EDRIVE_DRY_RUN_FAILED NTStatus = 0xC0210038 STATUS_FVE_SECUREBOOT_DISABLED NTStatus = 0xC0210039 STATUS_FVE_SECUREBOOT_CONFIG_CHANGE NTStatus = 0xC021003A STATUS_FVE_DEVICE_LOCKEDOUT NTStatus = 0xC021003B STATUS_FVE_VOLUME_EXTEND_PREVENTS_EOW_DECRYPT NTStatus = 0xC021003C STATUS_FVE_NOT_DE_VOLUME NTStatus = 0xC021003D STATUS_FVE_PROTECTION_DISABLED NTStatus = 0xC021003E STATUS_FVE_PROTECTION_CANNOT_BE_DISABLED NTStatus = 0xC021003F STATUS_FVE_OSV_KSR_NOT_ALLOWED NTStatus = 0xC0210040 STATUS_FWP_CALLOUT_NOT_FOUND NTStatus = 0xC0220001 STATUS_FWP_CONDITION_NOT_FOUND NTStatus = 0xC0220002 STATUS_FWP_FILTER_NOT_FOUND NTStatus = 0xC0220003 STATUS_FWP_LAYER_NOT_FOUND NTStatus = 0xC0220004 STATUS_FWP_PROVIDER_NOT_FOUND NTStatus = 0xC0220005 STATUS_FWP_PROVIDER_CONTEXT_NOT_FOUND NTStatus = 0xC0220006 STATUS_FWP_SUBLAYER_NOT_FOUND NTStatus = 0xC0220007 STATUS_FWP_NOT_FOUND NTStatus = 0xC0220008 STATUS_FWP_ALREADY_EXISTS NTStatus = 0xC0220009 STATUS_FWP_IN_USE NTStatus = 0xC022000A STATUS_FWP_DYNAMIC_SESSION_IN_PROGRESS NTStatus = 0xC022000B STATUS_FWP_WRONG_SESSION NTStatus = 0xC022000C STATUS_FWP_NO_TXN_IN_PROGRESS NTStatus = 0xC022000D STATUS_FWP_TXN_IN_PROGRESS NTStatus = 0xC022000E STATUS_FWP_TXN_ABORTED NTStatus = 0xC022000F STATUS_FWP_SESSION_ABORTED NTStatus = 0xC0220010 STATUS_FWP_INCOMPATIBLE_TXN NTStatus = 0xC0220011 STATUS_FWP_TIMEOUT NTStatus = 0xC0220012 STATUS_FWP_NET_EVENTS_DISABLED NTStatus = 0xC0220013 STATUS_FWP_INCOMPATIBLE_LAYER NTStatus = 0xC0220014 STATUS_FWP_KM_CLIENTS_ONLY NTStatus = 0xC0220015 STATUS_FWP_LIFETIME_MISMATCH NTStatus = 0xC0220016 STATUS_FWP_BUILTIN_OBJECT NTStatus = 0xC0220017 STATUS_FWP_TOO_MANY_CALLOUTS NTStatus = 0xC0220018 STATUS_FWP_NOTIFICATION_DROPPED NTStatus = 0xC0220019 STATUS_FWP_TRAFFIC_MISMATCH NTStatus = 0xC022001A STATUS_FWP_INCOMPATIBLE_SA_STATE NTStatus = 0xC022001B STATUS_FWP_NULL_POINTER NTStatus = 0xC022001C STATUS_FWP_INVALID_ENUMERATOR NTStatus = 0xC022001D STATUS_FWP_INVALID_FLAGS NTStatus = 0xC022001E STATUS_FWP_INVALID_NET_MASK NTStatus = 0xC022001F STATUS_FWP_INVALID_RANGE NTStatus = 0xC0220020 STATUS_FWP_INVALID_INTERVAL NTStatus = 0xC0220021 STATUS_FWP_ZERO_LENGTH_ARRAY NTStatus = 0xC0220022 STATUS_FWP_NULL_DISPLAY_NAME NTStatus = 0xC0220023 STATUS_FWP_INVALID_ACTION_TYPE NTStatus = 0xC0220024 STATUS_FWP_INVALID_WEIGHT NTStatus = 0xC0220025 STATUS_FWP_MATCH_TYPE_MISMATCH NTStatus = 0xC0220026 STATUS_FWP_TYPE_MISMATCH NTStatus = 0xC0220027 STATUS_FWP_OUT_OF_BOUNDS NTStatus = 0xC0220028 STATUS_FWP_RESERVED NTStatus = 0xC0220029 STATUS_FWP_DUPLICATE_CONDITION NTStatus = 0xC022002A STATUS_FWP_DUPLICATE_KEYMOD NTStatus = 0xC022002B STATUS_FWP_ACTION_INCOMPATIBLE_WITH_LAYER NTStatus = 0xC022002C STATUS_FWP_ACTION_INCOMPATIBLE_WITH_SUBLAYER NTStatus = 0xC022002D STATUS_FWP_CONTEXT_INCOMPATIBLE_WITH_LAYER NTStatus = 0xC022002E STATUS_FWP_CONTEXT_INCOMPATIBLE_WITH_CALLOUT NTStatus = 0xC022002F STATUS_FWP_INCOMPATIBLE_AUTH_METHOD NTStatus = 0xC0220030 STATUS_FWP_INCOMPATIBLE_DH_GROUP NTStatus = 0xC0220031 STATUS_FWP_EM_NOT_SUPPORTED NTStatus = 0xC0220032 STATUS_FWP_NEVER_MATCH NTStatus = 0xC0220033 STATUS_FWP_PROVIDER_CONTEXT_MISMATCH NTStatus = 0xC0220034 STATUS_FWP_INVALID_PARAMETER NTStatus = 0xC0220035 STATUS_FWP_TOO_MANY_SUBLAYERS NTStatus = 0xC0220036 STATUS_FWP_CALLOUT_NOTIFICATION_FAILED NTStatus = 0xC0220037 STATUS_FWP_INVALID_AUTH_TRANSFORM NTStatus = 0xC0220038 STATUS_FWP_INVALID_CIPHER_TRANSFORM NTStatus = 0xC0220039 STATUS_FWP_INCOMPATIBLE_CIPHER_TRANSFORM NTStatus = 0xC022003A STATUS_FWP_INVALID_TRANSFORM_COMBINATION NTStatus = 0xC022003B STATUS_FWP_DUPLICATE_AUTH_METHOD NTStatus = 0xC022003C STATUS_FWP_INVALID_TUNNEL_ENDPOINT NTStatus = 0xC022003D STATUS_FWP_L2_DRIVER_NOT_READY NTStatus = 0xC022003E STATUS_FWP_KEY_DICTATOR_ALREADY_REGISTERED NTStatus = 0xC022003F STATUS_FWP_KEY_DICTATION_INVALID_KEYING_MATERIAL NTStatus = 0xC0220040 STATUS_FWP_CONNECTIONS_DISABLED NTStatus = 0xC0220041 STATUS_FWP_INVALID_DNS_NAME NTStatus = 0xC0220042 STATUS_FWP_STILL_ON NTStatus = 0xC0220043 STATUS_FWP_IKEEXT_NOT_RUNNING NTStatus = 0xC0220044 STATUS_FWP_TCPIP_NOT_READY NTStatus = 0xC0220100 STATUS_FWP_INJECT_HANDLE_CLOSING NTStatus = 0xC0220101 STATUS_FWP_INJECT_HANDLE_STALE NTStatus = 0xC0220102 STATUS_FWP_CANNOT_PEND NTStatus = 0xC0220103 STATUS_FWP_DROP_NOICMP NTStatus = 0xC0220104 STATUS_NDIS_CLOSING NTStatus = 0xC0230002 STATUS_NDIS_BAD_VERSION NTStatus = 0xC0230004 STATUS_NDIS_BAD_CHARACTERISTICS NTStatus = 0xC0230005 STATUS_NDIS_ADAPTER_NOT_FOUND NTStatus = 0xC0230006 STATUS_NDIS_OPEN_FAILED NTStatus = 0xC0230007 STATUS_NDIS_DEVICE_FAILED NTStatus = 0xC0230008 STATUS_NDIS_MULTICAST_FULL NTStatus = 0xC0230009 STATUS_NDIS_MULTICAST_EXISTS NTStatus = 0xC023000A STATUS_NDIS_MULTICAST_NOT_FOUND NTStatus = 0xC023000B STATUS_NDIS_REQUEST_ABORTED NTStatus = 0xC023000C STATUS_NDIS_RESET_IN_PROGRESS NTStatus = 0xC023000D STATUS_NDIS_NOT_SUPPORTED NTStatus = 0xC02300BB STATUS_NDIS_INVALID_PACKET NTStatus = 0xC023000F STATUS_NDIS_ADAPTER_NOT_READY NTStatus = 0xC0230011 STATUS_NDIS_INVALID_LENGTH NTStatus = 0xC0230014 STATUS_NDIS_INVALID_DATA NTStatus = 0xC0230015 STATUS_NDIS_BUFFER_TOO_SHORT NTStatus = 0xC0230016 STATUS_NDIS_INVALID_OID NTStatus = 0xC0230017 STATUS_NDIS_ADAPTER_REMOVED NTStatus = 0xC0230018 STATUS_NDIS_UNSUPPORTED_MEDIA NTStatus = 0xC0230019 STATUS_NDIS_GROUP_ADDRESS_IN_USE NTStatus = 0xC023001A STATUS_NDIS_FILE_NOT_FOUND NTStatus = 0xC023001B STATUS_NDIS_ERROR_READING_FILE NTStatus = 0xC023001C STATUS_NDIS_ALREADY_MAPPED NTStatus = 0xC023001D STATUS_NDIS_RESOURCE_CONFLICT NTStatus = 0xC023001E STATUS_NDIS_MEDIA_DISCONNECTED NTStatus = 0xC023001F STATUS_NDIS_INVALID_ADDRESS NTStatus = 0xC0230022 STATUS_NDIS_INVALID_DEVICE_REQUEST NTStatus = 0xC0230010 STATUS_NDIS_PAUSED NTStatus = 0xC023002A STATUS_NDIS_INTERFACE_NOT_FOUND NTStatus = 0xC023002B STATUS_NDIS_UNSUPPORTED_REVISION NTStatus = 0xC023002C STATUS_NDIS_INVALID_PORT NTStatus = 0xC023002D STATUS_NDIS_INVALID_PORT_STATE NTStatus = 0xC023002E STATUS_NDIS_LOW_POWER_STATE NTStatus = 0xC023002F STATUS_NDIS_REINIT_REQUIRED NTStatus = 0xC0230030 STATUS_NDIS_NO_QUEUES NTStatus = 0xC0230031 STATUS_NDIS_DOT11_AUTO_CONFIG_ENABLED NTStatus = 0xC0232000 STATUS_NDIS_DOT11_MEDIA_IN_USE NTStatus = 0xC0232001 STATUS_NDIS_DOT11_POWER_STATE_INVALID NTStatus = 0xC0232002 STATUS_NDIS_PM_WOL_PATTERN_LIST_FULL NTStatus = 0xC0232003 STATUS_NDIS_PM_PROTOCOL_OFFLOAD_LIST_FULL NTStatus = 0xC0232004 STATUS_NDIS_DOT11_AP_CHANNEL_CURRENTLY_NOT_AVAILABLE NTStatus = 0xC0232005 STATUS_NDIS_DOT11_AP_BAND_CURRENTLY_NOT_AVAILABLE NTStatus = 0xC0232006 STATUS_NDIS_DOT11_AP_CHANNEL_NOT_ALLOWED NTStatus = 0xC0232007 STATUS_NDIS_DOT11_AP_BAND_NOT_ALLOWED NTStatus = 0xC0232008 STATUS_NDIS_INDICATION_REQUIRED NTStatus = 0x40230001 STATUS_NDIS_OFFLOAD_POLICY NTStatus = 0xC023100F STATUS_NDIS_OFFLOAD_CONNECTION_REJECTED NTStatus = 0xC0231012 STATUS_NDIS_OFFLOAD_PATH_REJECTED NTStatus = 0xC0231013 STATUS_TPM_ERROR_MASK NTStatus = 0xC0290000 STATUS_TPM_AUTHFAIL NTStatus = 0xC0290001 STATUS_TPM_BADINDEX NTStatus = 0xC0290002 STATUS_TPM_BAD_PARAMETER NTStatus = 0xC0290003 STATUS_TPM_AUDITFAILURE NTStatus = 0xC0290004 STATUS_TPM_CLEAR_DISABLED NTStatus = 0xC0290005 STATUS_TPM_DEACTIVATED NTStatus = 0xC0290006 STATUS_TPM_DISABLED NTStatus = 0xC0290007 STATUS_TPM_DISABLED_CMD NTStatus = 0xC0290008 STATUS_TPM_FAIL NTStatus = 0xC0290009 STATUS_TPM_BAD_ORDINAL NTStatus = 0xC029000A STATUS_TPM_INSTALL_DISABLED NTStatus = 0xC029000B STATUS_TPM_INVALID_KEYHANDLE NTStatus = 0xC029000C STATUS_TPM_KEYNOTFOUND NTStatus = 0xC029000D STATUS_TPM_INAPPROPRIATE_ENC NTStatus = 0xC029000E STATUS_TPM_MIGRATEFAIL NTStatus = 0xC029000F STATUS_TPM_INVALID_PCR_INFO NTStatus = 0xC0290010 STATUS_TPM_NOSPACE NTStatus = 0xC0290011 STATUS_TPM_NOSRK NTStatus = 0xC0290012 STATUS_TPM_NOTSEALED_BLOB NTStatus = 0xC0290013 STATUS_TPM_OWNER_SET NTStatus = 0xC0290014 STATUS_TPM_RESOURCES NTStatus = 0xC0290015 STATUS_TPM_SHORTRANDOM NTStatus = 0xC0290016 STATUS_TPM_SIZE NTStatus = 0xC0290017 STATUS_TPM_WRONGPCRVAL NTStatus = 0xC0290018 STATUS_TPM_BAD_PARAM_SIZE NTStatus = 0xC0290019 STATUS_TPM_SHA_THREAD NTStatus = 0xC029001A STATUS_TPM_SHA_ERROR NTStatus = 0xC029001B STATUS_TPM_FAILEDSELFTEST NTStatus = 0xC029001C STATUS_TPM_AUTH2FAIL NTStatus = 0xC029001D STATUS_TPM_BADTAG NTStatus = 0xC029001E STATUS_TPM_IOERROR NTStatus = 0xC029001F STATUS_TPM_ENCRYPT_ERROR NTStatus = 0xC0290020 STATUS_TPM_DECRYPT_ERROR NTStatus = 0xC0290021 STATUS_TPM_INVALID_AUTHHANDLE NTStatus = 0xC0290022 STATUS_TPM_NO_ENDORSEMENT NTStatus = 0xC0290023 STATUS_TPM_INVALID_KEYUSAGE NTStatus = 0xC0290024 STATUS_TPM_WRONG_ENTITYTYPE NTStatus = 0xC0290025 STATUS_TPM_INVALID_POSTINIT NTStatus = 0xC0290026 STATUS_TPM_INAPPROPRIATE_SIG NTStatus = 0xC0290027 STATUS_TPM_BAD_KEY_PROPERTY NTStatus = 0xC0290028 STATUS_TPM_BAD_MIGRATION NTStatus = 0xC0290029 STATUS_TPM_BAD_SCHEME NTStatus = 0xC029002A STATUS_TPM_BAD_DATASIZE NTStatus = 0xC029002B STATUS_TPM_BAD_MODE NTStatus = 0xC029002C STATUS_TPM_BAD_PRESENCE NTStatus = 0xC029002D STATUS_TPM_BAD_VERSION NTStatus = 0xC029002E STATUS_TPM_NO_WRAP_TRANSPORT NTStatus = 0xC029002F STATUS_TPM_AUDITFAIL_UNSUCCESSFUL NTStatus = 0xC0290030 STATUS_TPM_AUDITFAIL_SUCCESSFUL NTStatus = 0xC0290031 STATUS_TPM_NOTRESETABLE NTStatus = 0xC0290032 STATUS_TPM_NOTLOCAL NTStatus = 0xC0290033 STATUS_TPM_BAD_TYPE NTStatus = 0xC0290034 STATUS_TPM_INVALID_RESOURCE NTStatus = 0xC0290035 STATUS_TPM_NOTFIPS NTStatus = 0xC0290036 STATUS_TPM_INVALID_FAMILY NTStatus = 0xC0290037 STATUS_TPM_NO_NV_PERMISSION NTStatus = 0xC0290038 STATUS_TPM_REQUIRES_SIGN NTStatus = 0xC0290039 STATUS_TPM_KEY_NOTSUPPORTED NTStatus = 0xC029003A STATUS_TPM_AUTH_CONFLICT NTStatus = 0xC029003B STATUS_TPM_AREA_LOCKED NTStatus = 0xC029003C STATUS_TPM_BAD_LOCALITY NTStatus = 0xC029003D STATUS_TPM_READ_ONLY NTStatus = 0xC029003E STATUS_TPM_PER_NOWRITE NTStatus = 0xC029003F STATUS_TPM_FAMILYCOUNT NTStatus = 0xC0290040 STATUS_TPM_WRITE_LOCKED NTStatus = 0xC0290041 STATUS_TPM_BAD_ATTRIBUTES NTStatus = 0xC0290042 STATUS_TPM_INVALID_STRUCTURE NTStatus = 0xC0290043 STATUS_TPM_KEY_OWNER_CONTROL NTStatus = 0xC0290044 STATUS_TPM_BAD_COUNTER NTStatus = 0xC0290045 STATUS_TPM_NOT_FULLWRITE NTStatus = 0xC0290046 STATUS_TPM_CONTEXT_GAP NTStatus = 0xC0290047 STATUS_TPM_MAXNVWRITES NTStatus = 0xC0290048 STATUS_TPM_NOOPERATOR NTStatus = 0xC0290049 STATUS_TPM_RESOURCEMISSING NTStatus = 0xC029004A STATUS_TPM_DELEGATE_LOCK NTStatus = 0xC029004B STATUS_TPM_DELEGATE_FAMILY NTStatus = 0xC029004C STATUS_TPM_DELEGATE_ADMIN NTStatus = 0xC029004D STATUS_TPM_TRANSPORT_NOTEXCLUSIVE NTStatus = 0xC029004E STATUS_TPM_OWNER_CONTROL NTStatus = 0xC029004F STATUS_TPM_DAA_RESOURCES NTStatus = 0xC0290050 STATUS_TPM_DAA_INPUT_DATA0 NTStatus = 0xC0290051 STATUS_TPM_DAA_INPUT_DATA1 NTStatus = 0xC0290052 STATUS_TPM_DAA_ISSUER_SETTINGS NTStatus = 0xC0290053 STATUS_TPM_DAA_TPM_SETTINGS NTStatus = 0xC0290054 STATUS_TPM_DAA_STAGE NTStatus = 0xC0290055 STATUS_TPM_DAA_ISSUER_VALIDITY NTStatus = 0xC0290056 STATUS_TPM_DAA_WRONG_W NTStatus = 0xC0290057 STATUS_TPM_BAD_HANDLE NTStatus = 0xC0290058 STATUS_TPM_BAD_DELEGATE NTStatus = 0xC0290059 STATUS_TPM_BADCONTEXT NTStatus = 0xC029005A STATUS_TPM_TOOMANYCONTEXTS NTStatus = 0xC029005B STATUS_TPM_MA_TICKET_SIGNATURE NTStatus = 0xC029005C STATUS_TPM_MA_DESTINATION NTStatus = 0xC029005D STATUS_TPM_MA_SOURCE NTStatus = 0xC029005E STATUS_TPM_MA_AUTHORITY NTStatus = 0xC029005F STATUS_TPM_PERMANENTEK NTStatus = 0xC0290061 STATUS_TPM_BAD_SIGNATURE NTStatus = 0xC0290062 STATUS_TPM_NOCONTEXTSPACE NTStatus = 0xC0290063 STATUS_TPM_20_E_ASYMMETRIC NTStatus = 0xC0290081 STATUS_TPM_20_E_ATTRIBUTES NTStatus = 0xC0290082 STATUS_TPM_20_E_HASH NTStatus = 0xC0290083 STATUS_TPM_20_E_VALUE NTStatus = 0xC0290084 STATUS_TPM_20_E_HIERARCHY NTStatus = 0xC0290085 STATUS_TPM_20_E_KEY_SIZE NTStatus = 0xC0290087 STATUS_TPM_20_E_MGF NTStatus = 0xC0290088 STATUS_TPM_20_E_MODE NTStatus = 0xC0290089 STATUS_TPM_20_E_TYPE NTStatus = 0xC029008A STATUS_TPM_20_E_HANDLE NTStatus = 0xC029008B STATUS_TPM_20_E_KDF NTStatus = 0xC029008C STATUS_TPM_20_E_RANGE NTStatus = 0xC029008D STATUS_TPM_20_E_AUTH_FAIL NTStatus = 0xC029008E STATUS_TPM_20_E_NONCE NTStatus = 0xC029008F STATUS_TPM_20_E_PP NTStatus = 0xC0290090 STATUS_TPM_20_E_SCHEME NTStatus = 0xC0290092 STATUS_TPM_20_E_SIZE NTStatus = 0xC0290095 STATUS_TPM_20_E_SYMMETRIC NTStatus = 0xC0290096 STATUS_TPM_20_E_TAG NTStatus = 0xC0290097 STATUS_TPM_20_E_SELECTOR NTStatus = 0xC0290098 STATUS_TPM_20_E_INSUFFICIENT NTStatus = 0xC029009A STATUS_TPM_20_E_SIGNATURE NTStatus = 0xC029009B STATUS_TPM_20_E_KEY NTStatus = 0xC029009C STATUS_TPM_20_E_POLICY_FAIL NTStatus = 0xC029009D STATUS_TPM_20_E_INTEGRITY NTStatus = 0xC029009F STATUS_TPM_20_E_TICKET NTStatus = 0xC02900A0 STATUS_TPM_20_E_RESERVED_BITS NTStatus = 0xC02900A1 STATUS_TPM_20_E_BAD_AUTH NTStatus = 0xC02900A2 STATUS_TPM_20_E_EXPIRED NTStatus = 0xC02900A3 STATUS_TPM_20_E_POLICY_CC NTStatus = 0xC02900A4 STATUS_TPM_20_E_BINDING NTStatus = 0xC02900A5 STATUS_TPM_20_E_CURVE NTStatus = 0xC02900A6 STATUS_TPM_20_E_ECC_POINT NTStatus = 0xC02900A7 STATUS_TPM_20_E_INITIALIZE NTStatus = 0xC0290100 STATUS_TPM_20_E_FAILURE NTStatus = 0xC0290101 STATUS_TPM_20_E_SEQUENCE NTStatus = 0xC0290103 STATUS_TPM_20_E_PRIVATE NTStatus = 0xC029010B STATUS_TPM_20_E_HMAC NTStatus = 0xC0290119 STATUS_TPM_20_E_DISABLED NTStatus = 0xC0290120 STATUS_TPM_20_E_EXCLUSIVE NTStatus = 0xC0290121 STATUS_TPM_20_E_ECC_CURVE NTStatus = 0xC0290123 STATUS_TPM_20_E_AUTH_TYPE NTStatus = 0xC0290124 STATUS_TPM_20_E_AUTH_MISSING NTStatus = 0xC0290125 STATUS_TPM_20_E_POLICY NTStatus = 0xC0290126 STATUS_TPM_20_E_PCR NTStatus = 0xC0290127 STATUS_TPM_20_E_PCR_CHANGED NTStatus = 0xC0290128 STATUS_TPM_20_E_UPGRADE NTStatus = 0xC029012D STATUS_TPM_20_E_TOO_MANY_CONTEXTS NTStatus = 0xC029012E STATUS_TPM_20_E_AUTH_UNAVAILABLE NTStatus = 0xC029012F STATUS_TPM_20_E_REBOOT NTStatus = 0xC0290130 STATUS_TPM_20_E_UNBALANCED NTStatus = 0xC0290131 STATUS_TPM_20_E_COMMAND_SIZE NTStatus = 0xC0290142 STATUS_TPM_20_E_COMMAND_CODE NTStatus = 0xC0290143 STATUS_TPM_20_E_AUTHSIZE NTStatus = 0xC0290144 STATUS_TPM_20_E_AUTH_CONTEXT NTStatus = 0xC0290145 STATUS_TPM_20_E_NV_RANGE NTStatus = 0xC0290146 STATUS_TPM_20_E_NV_SIZE NTStatus = 0xC0290147 STATUS_TPM_20_E_NV_LOCKED NTStatus = 0xC0290148 STATUS_TPM_20_E_NV_AUTHORIZATION NTStatus = 0xC0290149 STATUS_TPM_20_E_NV_UNINITIALIZED NTStatus = 0xC029014A STATUS_TPM_20_E_NV_SPACE NTStatus = 0xC029014B STATUS_TPM_20_E_NV_DEFINED NTStatus = 0xC029014C STATUS_TPM_20_E_BAD_CONTEXT NTStatus = 0xC0290150 STATUS_TPM_20_E_CPHASH NTStatus = 0xC0290151 STATUS_TPM_20_E_PARENT NTStatus = 0xC0290152 STATUS_TPM_20_E_NEEDS_TEST NTStatus = 0xC0290153 STATUS_TPM_20_E_NO_RESULT NTStatus = 0xC0290154 STATUS_TPM_20_E_SENSITIVE NTStatus = 0xC0290155 STATUS_TPM_COMMAND_BLOCKED NTStatus = 0xC0290400 STATUS_TPM_INVALID_HANDLE NTStatus = 0xC0290401 STATUS_TPM_DUPLICATE_VHANDLE NTStatus = 0xC0290402 STATUS_TPM_EMBEDDED_COMMAND_BLOCKED NTStatus = 0xC0290403 STATUS_TPM_EMBEDDED_COMMAND_UNSUPPORTED NTStatus = 0xC0290404 STATUS_TPM_RETRY NTStatus = 0xC0290800 STATUS_TPM_NEEDS_SELFTEST NTStatus = 0xC0290801 STATUS_TPM_DOING_SELFTEST NTStatus = 0xC0290802 STATUS_TPM_DEFEND_LOCK_RUNNING NTStatus = 0xC0290803 STATUS_TPM_COMMAND_CANCELED NTStatus = 0xC0291001 STATUS_TPM_TOO_MANY_CONTEXTS NTStatus = 0xC0291002 STATUS_TPM_NOT_FOUND NTStatus = 0xC0291003 STATUS_TPM_ACCESS_DENIED NTStatus = 0xC0291004 STATUS_TPM_INSUFFICIENT_BUFFER NTStatus = 0xC0291005 STATUS_TPM_PPI_FUNCTION_UNSUPPORTED NTStatus = 0xC0291006 STATUS_PCP_ERROR_MASK NTStatus = 0xC0292000 STATUS_PCP_DEVICE_NOT_READY NTStatus = 0xC0292001 STATUS_PCP_INVALID_HANDLE NTStatus = 0xC0292002 STATUS_PCP_INVALID_PARAMETER NTStatus = 0xC0292003 STATUS_PCP_FLAG_NOT_SUPPORTED NTStatus = 0xC0292004 STATUS_PCP_NOT_SUPPORTED NTStatus = 0xC0292005 STATUS_PCP_BUFFER_TOO_SMALL NTStatus = 0xC0292006 STATUS_PCP_INTERNAL_ERROR NTStatus = 0xC0292007 STATUS_PCP_AUTHENTICATION_FAILED NTStatus = 0xC0292008 STATUS_PCP_AUTHENTICATION_IGNORED NTStatus = 0xC0292009 STATUS_PCP_POLICY_NOT_FOUND NTStatus = 0xC029200A STATUS_PCP_PROFILE_NOT_FOUND NTStatus = 0xC029200B STATUS_PCP_VALIDATION_FAILED NTStatus = 0xC029200C STATUS_PCP_DEVICE_NOT_FOUND NTStatus = 0xC029200D STATUS_PCP_WRONG_PARENT NTStatus = 0xC029200E STATUS_PCP_KEY_NOT_LOADED NTStatus = 0xC029200F STATUS_PCP_NO_KEY_CERTIFICATION NTStatus = 0xC0292010 STATUS_PCP_KEY_NOT_FINALIZED NTStatus = 0xC0292011 STATUS_PCP_ATTESTATION_CHALLENGE_NOT_SET NTStatus = 0xC0292012 STATUS_PCP_NOT_PCR_BOUND NTStatus = 0xC0292013 STATUS_PCP_KEY_ALREADY_FINALIZED NTStatus = 0xC0292014 STATUS_PCP_KEY_USAGE_POLICY_NOT_SUPPORTED NTStatus = 0xC0292015 STATUS_PCP_KEY_USAGE_POLICY_INVALID NTStatus = 0xC0292016 STATUS_PCP_SOFT_KEY_ERROR NTStatus = 0xC0292017 STATUS_PCP_KEY_NOT_AUTHENTICATED NTStatus = 0xC0292018 STATUS_PCP_KEY_NOT_AIK NTStatus = 0xC0292019 STATUS_PCP_KEY_NOT_SIGNING_KEY NTStatus = 0xC029201A STATUS_PCP_LOCKED_OUT NTStatus = 0xC029201B STATUS_PCP_CLAIM_TYPE_NOT_SUPPORTED NTStatus = 0xC029201C STATUS_PCP_TPM_VERSION_NOT_SUPPORTED NTStatus = 0xC029201D STATUS_PCP_BUFFER_LENGTH_MISMATCH NTStatus = 0xC029201E STATUS_PCP_IFX_RSA_KEY_CREATION_BLOCKED NTStatus = 0xC029201F STATUS_PCP_TICKET_MISSING NTStatus = 0xC0292020 STATUS_PCP_RAW_POLICY_NOT_SUPPORTED NTStatus = 0xC0292021 STATUS_PCP_KEY_HANDLE_INVALIDATED NTStatus = 0xC0292022 STATUS_PCP_UNSUPPORTED_PSS_SALT NTStatus = 0x40292023 STATUS_RTPM_CONTEXT_CONTINUE NTStatus = 0x00293000 STATUS_RTPM_CONTEXT_COMPLETE NTStatus = 0x00293001 STATUS_RTPM_NO_RESULT NTStatus = 0xC0293002 STATUS_RTPM_PCR_READ_INCOMPLETE NTStatus = 0xC0293003 STATUS_RTPM_INVALID_CONTEXT NTStatus = 0xC0293004 STATUS_RTPM_UNSUPPORTED_CMD NTStatus = 0xC0293005 STATUS_TPM_ZERO_EXHAUST_ENABLED NTStatus = 0xC0294000 STATUS_HV_INVALID_HYPERCALL_CODE NTStatus = 0xC0350002 STATUS_HV_INVALID_HYPERCALL_INPUT NTStatus = 0xC0350003 STATUS_HV_INVALID_ALIGNMENT NTStatus = 0xC0350004 STATUS_HV_INVALID_PARAMETER NTStatus = 0xC0350005 STATUS_HV_ACCESS_DENIED NTStatus = 0xC0350006 STATUS_HV_INVALID_PARTITION_STATE NTStatus = 0xC0350007 STATUS_HV_OPERATION_DENIED NTStatus = 0xC0350008 STATUS_HV_UNKNOWN_PROPERTY NTStatus = 0xC0350009 STATUS_HV_PROPERTY_VALUE_OUT_OF_RANGE NTStatus = 0xC035000A STATUS_HV_INSUFFICIENT_MEMORY NTStatus = 0xC035000B STATUS_HV_PARTITION_TOO_DEEP NTStatus = 0xC035000C STATUS_HV_INVALID_PARTITION_ID NTStatus = 0xC035000D STATUS_HV_INVALID_VP_INDEX NTStatus = 0xC035000E STATUS_HV_INVALID_PORT_ID NTStatus = 0xC0350011 STATUS_HV_INVALID_CONNECTION_ID NTStatus = 0xC0350012 STATUS_HV_INSUFFICIENT_BUFFERS NTStatus = 0xC0350013 STATUS_HV_NOT_ACKNOWLEDGED NTStatus = 0xC0350014 STATUS_HV_INVALID_VP_STATE NTStatus = 0xC0350015 STATUS_HV_ACKNOWLEDGED NTStatus = 0xC0350016 STATUS_HV_INVALID_SAVE_RESTORE_STATE NTStatus = 0xC0350017 STATUS_HV_INVALID_SYNIC_STATE NTStatus = 0xC0350018 STATUS_HV_OBJECT_IN_USE NTStatus = 0xC0350019 STATUS_HV_INVALID_PROXIMITY_DOMAIN_INFO NTStatus = 0xC035001A STATUS_HV_NO_DATA NTStatus = 0xC035001B STATUS_HV_INACTIVE NTStatus = 0xC035001C STATUS_HV_NO_RESOURCES NTStatus = 0xC035001D STATUS_HV_FEATURE_UNAVAILABLE NTStatus = 0xC035001E STATUS_HV_INSUFFICIENT_BUFFER NTStatus = 0xC0350033 STATUS_HV_INSUFFICIENT_DEVICE_DOMAINS NTStatus = 0xC0350038 STATUS_HV_CPUID_FEATURE_VALIDATION_ERROR NTStatus = 0xC035003C STATUS_HV_CPUID_XSAVE_FEATURE_VALIDATION_ERROR NTStatus = 0xC035003D STATUS_HV_PROCESSOR_STARTUP_TIMEOUT NTStatus = 0xC035003E STATUS_HV_SMX_ENABLED NTStatus = 0xC035003F STATUS_HV_INVALID_LP_INDEX NTStatus = 0xC0350041 STATUS_HV_INVALID_REGISTER_VALUE NTStatus = 0xC0350050 STATUS_HV_INVALID_VTL_STATE NTStatus = 0xC0350051 STATUS_HV_NX_NOT_DETECTED NTStatus = 0xC0350055 STATUS_HV_INVALID_DEVICE_ID NTStatus = 0xC0350057 STATUS_HV_INVALID_DEVICE_STATE NTStatus = 0xC0350058 STATUS_HV_PENDING_PAGE_REQUESTS NTStatus = 0x00350059 STATUS_HV_PAGE_REQUEST_INVALID NTStatus = 0xC0350060 STATUS_HV_INVALID_CPU_GROUP_ID NTStatus = 0xC035006F STATUS_HV_INVALID_CPU_GROUP_STATE NTStatus = 0xC0350070 STATUS_HV_OPERATION_FAILED NTStatus = 0xC0350071 STATUS_HV_NOT_ALLOWED_WITH_NESTED_VIRT_ACTIVE NTStatus = 0xC0350072 STATUS_HV_INSUFFICIENT_ROOT_MEMORY NTStatus = 0xC0350073 STATUS_HV_NOT_PRESENT NTStatus = 0xC0351000 STATUS_VID_DUPLICATE_HANDLER NTStatus = 0xC0370001 STATUS_VID_TOO_MANY_HANDLERS NTStatus = 0xC0370002 STATUS_VID_QUEUE_FULL NTStatus = 0xC0370003 STATUS_VID_HANDLER_NOT_PRESENT NTStatus = 0xC0370004 STATUS_VID_INVALID_OBJECT_NAME NTStatus = 0xC0370005 STATUS_VID_PARTITION_NAME_TOO_LONG NTStatus = 0xC0370006 STATUS_VID_MESSAGE_QUEUE_NAME_TOO_LONG NTStatus = 0xC0370007 STATUS_VID_PARTITION_ALREADY_EXISTS NTStatus = 0xC0370008 STATUS_VID_PARTITION_DOES_NOT_EXIST NTStatus = 0xC0370009 STATUS_VID_PARTITION_NAME_NOT_FOUND NTStatus = 0xC037000A STATUS_VID_MESSAGE_QUEUE_ALREADY_EXISTS NTStatus = 0xC037000B STATUS_VID_EXCEEDED_MBP_ENTRY_MAP_LIMIT NTStatus = 0xC037000C STATUS_VID_MB_STILL_REFERENCED NTStatus = 0xC037000D STATUS_VID_CHILD_GPA_PAGE_SET_CORRUPTED NTStatus = 0xC037000E STATUS_VID_INVALID_NUMA_SETTINGS NTStatus = 0xC037000F STATUS_VID_INVALID_NUMA_NODE_INDEX NTStatus = 0xC0370010 STATUS_VID_NOTIFICATION_QUEUE_ALREADY_ASSOCIATED NTStatus = 0xC0370011 STATUS_VID_INVALID_MEMORY_BLOCK_HANDLE NTStatus = 0xC0370012 STATUS_VID_PAGE_RANGE_OVERFLOW NTStatus = 0xC0370013 STATUS_VID_INVALID_MESSAGE_QUEUE_HANDLE NTStatus = 0xC0370014 STATUS_VID_INVALID_GPA_RANGE_HANDLE NTStatus = 0xC0370015 STATUS_VID_NO_MEMORY_BLOCK_NOTIFICATION_QUEUE NTStatus = 0xC0370016 STATUS_VID_MEMORY_BLOCK_LOCK_COUNT_EXCEEDED NTStatus = 0xC0370017 STATUS_VID_INVALID_PPM_HANDLE NTStatus = 0xC0370018 STATUS_VID_MBPS_ARE_LOCKED NTStatus = 0xC0370019 STATUS_VID_MESSAGE_QUEUE_CLOSED NTStatus = 0xC037001A STATUS_VID_VIRTUAL_PROCESSOR_LIMIT_EXCEEDED NTStatus = 0xC037001B STATUS_VID_STOP_PENDING NTStatus = 0xC037001C STATUS_VID_INVALID_PROCESSOR_STATE NTStatus = 0xC037001D STATUS_VID_EXCEEDED_KM_CONTEXT_COUNT_LIMIT NTStatus = 0xC037001E STATUS_VID_KM_INTERFACE_ALREADY_INITIALIZED NTStatus = 0xC037001F STATUS_VID_MB_PROPERTY_ALREADY_SET_RESET NTStatus = 0xC0370020 STATUS_VID_MMIO_RANGE_DESTROYED NTStatus = 0xC0370021 STATUS_VID_INVALID_CHILD_GPA_PAGE_SET NTStatus = 0xC0370022 STATUS_VID_RESERVE_PAGE_SET_IS_BEING_USED NTStatus = 0xC0370023 STATUS_VID_RESERVE_PAGE_SET_TOO_SMALL NTStatus = 0xC0370024 STATUS_VID_MBP_ALREADY_LOCKED_USING_RESERVED_PAGE NTStatus = 0xC0370025 STATUS_VID_MBP_COUNT_EXCEEDED_LIMIT NTStatus = 0xC0370026 STATUS_VID_SAVED_STATE_CORRUPT NTStatus = 0xC0370027 STATUS_VID_SAVED_STATE_UNRECOGNIZED_ITEM NTStatus = 0xC0370028 STATUS_VID_SAVED_STATE_INCOMPATIBLE NTStatus = 0xC0370029 STATUS_VID_VTL_ACCESS_DENIED NTStatus = 0xC037002A STATUS_VID_REMOTE_NODE_PARENT_GPA_PAGES_USED NTStatus = 0x80370001 STATUS_IPSEC_BAD_SPI NTStatus = 0xC0360001 STATUS_IPSEC_SA_LIFETIME_EXPIRED NTStatus = 0xC0360002 STATUS_IPSEC_WRONG_SA NTStatus = 0xC0360003 STATUS_IPSEC_REPLAY_CHECK_FAILED NTStatus = 0xC0360004 STATUS_IPSEC_INVALID_PACKET NTStatus = 0xC0360005 STATUS_IPSEC_INTEGRITY_CHECK_FAILED NTStatus = 0xC0360006 STATUS_IPSEC_CLEAR_TEXT_DROP NTStatus = 0xC0360007 STATUS_IPSEC_AUTH_FIREWALL_DROP NTStatus = 0xC0360008 STATUS_IPSEC_THROTTLE_DROP NTStatus = 0xC0360009 STATUS_IPSEC_DOSP_BLOCK NTStatus = 0xC0368000 STATUS_IPSEC_DOSP_RECEIVED_MULTICAST NTStatus = 0xC0368001 STATUS_IPSEC_DOSP_INVALID_PACKET NTStatus = 0xC0368002 STATUS_IPSEC_DOSP_STATE_LOOKUP_FAILED NTStatus = 0xC0368003 STATUS_IPSEC_DOSP_MAX_ENTRIES NTStatus = 0xC0368004 STATUS_IPSEC_DOSP_KEYMOD_NOT_ALLOWED NTStatus = 0xC0368005 STATUS_IPSEC_DOSP_MAX_PER_IP_RATELIMIT_QUEUES NTStatus = 0xC0368006 STATUS_VOLMGR_INCOMPLETE_REGENERATION NTStatus = 0x80380001 STATUS_VOLMGR_INCOMPLETE_DISK_MIGRATION NTStatus = 0x80380002 STATUS_VOLMGR_DATABASE_FULL NTStatus = 0xC0380001 STATUS_VOLMGR_DISK_CONFIGURATION_CORRUPTED NTStatus = 0xC0380002 STATUS_VOLMGR_DISK_CONFIGURATION_NOT_IN_SYNC NTStatus = 0xC0380003 STATUS_VOLMGR_PACK_CONFIG_UPDATE_FAILED NTStatus = 0xC0380004 STATUS_VOLMGR_DISK_CONTAINS_NON_SIMPLE_VOLUME NTStatus = 0xC0380005 STATUS_VOLMGR_DISK_DUPLICATE NTStatus = 0xC0380006 STATUS_VOLMGR_DISK_DYNAMIC NTStatus = 0xC0380007 STATUS_VOLMGR_DISK_ID_INVALID NTStatus = 0xC0380008 STATUS_VOLMGR_DISK_INVALID NTStatus = 0xC0380009 STATUS_VOLMGR_DISK_LAST_VOTER NTStatus = 0xC038000A STATUS_VOLMGR_DISK_LAYOUT_INVALID NTStatus = 0xC038000B STATUS_VOLMGR_DISK_LAYOUT_NON_BASIC_BETWEEN_BASIC_PARTITIONS NTStatus = 0xC038000C STATUS_VOLMGR_DISK_LAYOUT_NOT_CYLINDER_ALIGNED NTStatus = 0xC038000D STATUS_VOLMGR_DISK_LAYOUT_PARTITIONS_TOO_SMALL NTStatus = 0xC038000E STATUS_VOLMGR_DISK_LAYOUT_PRIMARY_BETWEEN_LOGICAL_PARTITIONS NTStatus = 0xC038000F STATUS_VOLMGR_DISK_LAYOUT_TOO_MANY_PARTITIONS NTStatus = 0xC0380010 STATUS_VOLMGR_DISK_MISSING NTStatus = 0xC0380011 STATUS_VOLMGR_DISK_NOT_EMPTY NTStatus = 0xC0380012 STATUS_VOLMGR_DISK_NOT_ENOUGH_SPACE NTStatus = 0xC0380013 STATUS_VOLMGR_DISK_REVECTORING_FAILED NTStatus = 0xC0380014 STATUS_VOLMGR_DISK_SECTOR_SIZE_INVALID NTStatus = 0xC0380015 STATUS_VOLMGR_DISK_SET_NOT_CONTAINED NTStatus = 0xC0380016 STATUS_VOLMGR_DISK_USED_BY_MULTIPLE_MEMBERS NTStatus = 0xC0380017 STATUS_VOLMGR_DISK_USED_BY_MULTIPLE_PLEXES NTStatus = 0xC0380018 STATUS_VOLMGR_DYNAMIC_DISK_NOT_SUPPORTED NTStatus = 0xC0380019 STATUS_VOLMGR_EXTENT_ALREADY_USED NTStatus = 0xC038001A STATUS_VOLMGR_EXTENT_NOT_CONTIGUOUS NTStatus = 0xC038001B STATUS_VOLMGR_EXTENT_NOT_IN_PUBLIC_REGION NTStatus = 0xC038001C STATUS_VOLMGR_EXTENT_NOT_SECTOR_ALIGNED NTStatus = 0xC038001D STATUS_VOLMGR_EXTENT_OVERLAPS_EBR_PARTITION NTStatus = 0xC038001E STATUS_VOLMGR_EXTENT_VOLUME_LENGTHS_DO_NOT_MATCH NTStatus = 0xC038001F STATUS_VOLMGR_FAULT_TOLERANT_NOT_SUPPORTED NTStatus = 0xC0380020 STATUS_VOLMGR_INTERLEAVE_LENGTH_INVALID NTStatus = 0xC0380021 STATUS_VOLMGR_MAXIMUM_REGISTERED_USERS NTStatus = 0xC0380022 STATUS_VOLMGR_MEMBER_IN_SYNC NTStatus = 0xC0380023 STATUS_VOLMGR_MEMBER_INDEX_DUPLICATE NTStatus = 0xC0380024 STATUS_VOLMGR_MEMBER_INDEX_INVALID NTStatus = 0xC0380025 STATUS_VOLMGR_MEMBER_MISSING NTStatus = 0xC0380026 STATUS_VOLMGR_MEMBER_NOT_DETACHED NTStatus = 0xC0380027 STATUS_VOLMGR_MEMBER_REGENERATING NTStatus = 0xC0380028 STATUS_VOLMGR_ALL_DISKS_FAILED NTStatus = 0xC0380029 STATUS_VOLMGR_NO_REGISTERED_USERS NTStatus = 0xC038002A STATUS_VOLMGR_NO_SUCH_USER NTStatus = 0xC038002B STATUS_VOLMGR_NOTIFICATION_RESET NTStatus = 0xC038002C STATUS_VOLMGR_NUMBER_OF_MEMBERS_INVALID NTStatus = 0xC038002D STATUS_VOLMGR_NUMBER_OF_PLEXES_INVALID NTStatus = 0xC038002E STATUS_VOLMGR_PACK_DUPLICATE NTStatus = 0xC038002F STATUS_VOLMGR_PACK_ID_INVALID NTStatus = 0xC0380030 STATUS_VOLMGR_PACK_INVALID NTStatus = 0xC0380031 STATUS_VOLMGR_PACK_NAME_INVALID NTStatus = 0xC0380032 STATUS_VOLMGR_PACK_OFFLINE NTStatus = 0xC0380033 STATUS_VOLMGR_PACK_HAS_QUORUM NTStatus = 0xC0380034 STATUS_VOLMGR_PACK_WITHOUT_QUORUM NTStatus = 0xC0380035 STATUS_VOLMGR_PARTITION_STYLE_INVALID NTStatus = 0xC0380036 STATUS_VOLMGR_PARTITION_UPDATE_FAILED NTStatus = 0xC0380037 STATUS_VOLMGR_PLEX_IN_SYNC NTStatus = 0xC0380038 STATUS_VOLMGR_PLEX_INDEX_DUPLICATE NTStatus = 0xC0380039 STATUS_VOLMGR_PLEX_INDEX_INVALID NTStatus = 0xC038003A STATUS_VOLMGR_PLEX_LAST_ACTIVE NTStatus = 0xC038003B STATUS_VOLMGR_PLEX_MISSING NTStatus = 0xC038003C STATUS_VOLMGR_PLEX_REGENERATING NTStatus = 0xC038003D STATUS_VOLMGR_PLEX_TYPE_INVALID NTStatus = 0xC038003E STATUS_VOLMGR_PLEX_NOT_RAID5 NTStatus = 0xC038003F STATUS_VOLMGR_PLEX_NOT_SIMPLE NTStatus = 0xC0380040 STATUS_VOLMGR_STRUCTURE_SIZE_INVALID NTStatus = 0xC0380041 STATUS_VOLMGR_TOO_MANY_NOTIFICATION_REQUESTS NTStatus = 0xC0380042 STATUS_VOLMGR_TRANSACTION_IN_PROGRESS NTStatus = 0xC0380043 STATUS_VOLMGR_UNEXPECTED_DISK_LAYOUT_CHANGE NTStatus = 0xC0380044 STATUS_VOLMGR_VOLUME_CONTAINS_MISSING_DISK NTStatus = 0xC0380045 STATUS_VOLMGR_VOLUME_ID_INVALID NTStatus = 0xC0380046 STATUS_VOLMGR_VOLUME_LENGTH_INVALID NTStatus = 0xC0380047 STATUS_VOLMGR_VOLUME_LENGTH_NOT_SECTOR_SIZE_MULTIPLE NTStatus = 0xC0380048 STATUS_VOLMGR_VOLUME_NOT_MIRRORED NTStatus = 0xC0380049 STATUS_VOLMGR_VOLUME_NOT_RETAINED NTStatus = 0xC038004A STATUS_VOLMGR_VOLUME_OFFLINE NTStatus = 0xC038004B STATUS_VOLMGR_VOLUME_RETAINED NTStatus = 0xC038004C STATUS_VOLMGR_NUMBER_OF_EXTENTS_INVALID NTStatus = 0xC038004D STATUS_VOLMGR_DIFFERENT_SECTOR_SIZE NTStatus = 0xC038004E STATUS_VOLMGR_BAD_BOOT_DISK NTStatus = 0xC038004F STATUS_VOLMGR_PACK_CONFIG_OFFLINE NTStatus = 0xC0380050 STATUS_VOLMGR_PACK_CONFIG_ONLINE NTStatus = 0xC0380051 STATUS_VOLMGR_NOT_PRIMARY_PACK NTStatus = 0xC0380052 STATUS_VOLMGR_PACK_LOG_UPDATE_FAILED NTStatus = 0xC0380053 STATUS_VOLMGR_NUMBER_OF_DISKS_IN_PLEX_INVALID NTStatus = 0xC0380054 STATUS_VOLMGR_NUMBER_OF_DISKS_IN_MEMBER_INVALID NTStatus = 0xC0380055 STATUS_VOLMGR_VOLUME_MIRRORED NTStatus = 0xC0380056 STATUS_VOLMGR_PLEX_NOT_SIMPLE_SPANNED NTStatus = 0xC0380057 STATUS_VOLMGR_NO_VALID_LOG_COPIES NTStatus = 0xC0380058 STATUS_VOLMGR_PRIMARY_PACK_PRESENT NTStatus = 0xC0380059 STATUS_VOLMGR_NUMBER_OF_DISKS_INVALID NTStatus = 0xC038005A STATUS_VOLMGR_MIRROR_NOT_SUPPORTED NTStatus = 0xC038005B STATUS_VOLMGR_RAID5_NOT_SUPPORTED NTStatus = 0xC038005C STATUS_BCD_NOT_ALL_ENTRIES_IMPORTED NTStatus = 0x80390001 STATUS_BCD_TOO_MANY_ELEMENTS NTStatus = 0xC0390002 STATUS_BCD_NOT_ALL_ENTRIES_SYNCHRONIZED NTStatus = 0x80390003 STATUS_VHD_DRIVE_FOOTER_MISSING NTStatus = 0xC03A0001 STATUS_VHD_DRIVE_FOOTER_CHECKSUM_MISMATCH NTStatus = 0xC03A0002 STATUS_VHD_DRIVE_FOOTER_CORRUPT NTStatus = 0xC03A0003 STATUS_VHD_FORMAT_UNKNOWN NTStatus = 0xC03A0004 STATUS_VHD_FORMAT_UNSUPPORTED_VERSION NTStatus = 0xC03A0005 STATUS_VHD_SPARSE_HEADER_CHECKSUM_MISMATCH NTStatus = 0xC03A0006 STATUS_VHD_SPARSE_HEADER_UNSUPPORTED_VERSION NTStatus = 0xC03A0007 STATUS_VHD_SPARSE_HEADER_CORRUPT NTStatus = 0xC03A0008 STATUS_VHD_BLOCK_ALLOCATION_FAILURE NTStatus = 0xC03A0009 STATUS_VHD_BLOCK_ALLOCATION_TABLE_CORRUPT NTStatus = 0xC03A000A STATUS_VHD_INVALID_BLOCK_SIZE NTStatus = 0xC03A000B STATUS_VHD_BITMAP_MISMATCH NTStatus = 0xC03A000C STATUS_VHD_PARENT_VHD_NOT_FOUND NTStatus = 0xC03A000D STATUS_VHD_CHILD_PARENT_ID_MISMATCH NTStatus = 0xC03A000E STATUS_VHD_CHILD_PARENT_TIMESTAMP_MISMATCH NTStatus = 0xC03A000F STATUS_VHD_METADATA_READ_FAILURE NTStatus = 0xC03A0010 STATUS_VHD_METADATA_WRITE_FAILURE NTStatus = 0xC03A0011 STATUS_VHD_INVALID_SIZE NTStatus = 0xC03A0012 STATUS_VHD_INVALID_FILE_SIZE NTStatus = 0xC03A0013 STATUS_VIRTDISK_PROVIDER_NOT_FOUND NTStatus = 0xC03A0014 STATUS_VIRTDISK_NOT_VIRTUAL_DISK NTStatus = 0xC03A0015 STATUS_VHD_PARENT_VHD_ACCESS_DENIED NTStatus = 0xC03A0016 STATUS_VHD_CHILD_PARENT_SIZE_MISMATCH NTStatus = 0xC03A0017 STATUS_VHD_DIFFERENCING_CHAIN_CYCLE_DETECTED NTStatus = 0xC03A0018 STATUS_VHD_DIFFERENCING_CHAIN_ERROR_IN_PARENT NTStatus = 0xC03A0019 STATUS_VIRTUAL_DISK_LIMITATION NTStatus = 0xC03A001A STATUS_VHD_INVALID_TYPE NTStatus = 0xC03A001B STATUS_VHD_INVALID_STATE NTStatus = 0xC03A001C STATUS_VIRTDISK_UNSUPPORTED_DISK_SECTOR_SIZE NTStatus = 0xC03A001D STATUS_VIRTDISK_DISK_ALREADY_OWNED NTStatus = 0xC03A001E STATUS_VIRTDISK_DISK_ONLINE_AND_WRITABLE NTStatus = 0xC03A001F STATUS_CTLOG_TRACKING_NOT_INITIALIZED NTStatus = 0xC03A0020 STATUS_CTLOG_LOGFILE_SIZE_EXCEEDED_MAXSIZE NTStatus = 0xC03A0021 STATUS_CTLOG_VHD_CHANGED_OFFLINE NTStatus = 0xC03A0022 STATUS_CTLOG_INVALID_TRACKING_STATE NTStatus = 0xC03A0023 STATUS_CTLOG_INCONSISTENT_TRACKING_FILE NTStatus = 0xC03A0024 STATUS_VHD_METADATA_FULL NTStatus = 0xC03A0028 STATUS_VHD_INVALID_CHANGE_TRACKING_ID NTStatus = 0xC03A0029 STATUS_VHD_CHANGE_TRACKING_DISABLED NTStatus = 0xC03A002A STATUS_VHD_MISSING_CHANGE_TRACKING_INFORMATION NTStatus = 0xC03A0030 STATUS_VHD_RESIZE_WOULD_TRUNCATE_DATA NTStatus = 0xC03A0031 STATUS_VHD_COULD_NOT_COMPUTE_MINIMUM_VIRTUAL_SIZE NTStatus = 0xC03A0032 STATUS_VHD_ALREADY_AT_OR_BELOW_MINIMUM_VIRTUAL_SIZE NTStatus = 0xC03A0033 STATUS_QUERY_STORAGE_ERROR NTStatus = 0x803A0001 STATUS_GDI_HANDLE_LEAK NTStatus = 0x803F0001 STATUS_RKF_KEY_NOT_FOUND NTStatus = 0xC0400001 STATUS_RKF_DUPLICATE_KEY NTStatus = 0xC0400002 STATUS_RKF_BLOB_FULL NTStatus = 0xC0400003 STATUS_RKF_STORE_FULL NTStatus = 0xC0400004 STATUS_RKF_FILE_BLOCKED NTStatus = 0xC0400005 STATUS_RKF_ACTIVE_KEY NTStatus = 0xC0400006 STATUS_RDBSS_RESTART_OPERATION NTStatus = 0xC0410001 STATUS_RDBSS_CONTINUE_OPERATION NTStatus = 0xC0410002 STATUS_RDBSS_POST_OPERATION NTStatus = 0xC0410003 STATUS_RDBSS_RETRY_LOOKUP NTStatus = 0xC0410004 STATUS_BTH_ATT_INVALID_HANDLE NTStatus = 0xC0420001 STATUS_BTH_ATT_READ_NOT_PERMITTED NTStatus = 0xC0420002 STATUS_BTH_ATT_WRITE_NOT_PERMITTED NTStatus = 0xC0420003 STATUS_BTH_ATT_INVALID_PDU NTStatus = 0xC0420004 STATUS_BTH_ATT_INSUFFICIENT_AUTHENTICATION NTStatus = 0xC0420005 STATUS_BTH_ATT_REQUEST_NOT_SUPPORTED NTStatus = 0xC0420006 STATUS_BTH_ATT_INVALID_OFFSET NTStatus = 0xC0420007 STATUS_BTH_ATT_INSUFFICIENT_AUTHORIZATION NTStatus = 0xC0420008 STATUS_BTH_ATT_PREPARE_QUEUE_FULL NTStatus = 0xC0420009 STATUS_BTH_ATT_ATTRIBUTE_NOT_FOUND NTStatus = 0xC042000A STATUS_BTH_ATT_ATTRIBUTE_NOT_LONG NTStatus = 0xC042000B STATUS_BTH_ATT_INSUFFICIENT_ENCRYPTION_KEY_SIZE NTStatus = 0xC042000C STATUS_BTH_ATT_INVALID_ATTRIBUTE_VALUE_LENGTH NTStatus = 0xC042000D STATUS_BTH_ATT_UNLIKELY NTStatus = 0xC042000E STATUS_BTH_ATT_INSUFFICIENT_ENCRYPTION NTStatus = 0xC042000F STATUS_BTH_ATT_UNSUPPORTED_GROUP_TYPE NTStatus = 0xC0420010 STATUS_BTH_ATT_INSUFFICIENT_RESOURCES NTStatus = 0xC0420011 STATUS_BTH_ATT_UNKNOWN_ERROR NTStatus = 0xC0421000 STATUS_SECUREBOOT_ROLLBACK_DETECTED NTStatus = 0xC0430001 STATUS_SECUREBOOT_POLICY_VIOLATION NTStatus = 0xC0430002 STATUS_SECUREBOOT_INVALID_POLICY NTStatus = 0xC0430003 STATUS_SECUREBOOT_POLICY_PUBLISHER_NOT_FOUND NTStatus = 0xC0430004 STATUS_SECUREBOOT_POLICY_NOT_SIGNED NTStatus = 0xC0430005 STATUS_SECUREBOOT_NOT_ENABLED NTStatus = 0x80430006 STATUS_SECUREBOOT_FILE_REPLACED NTStatus = 0xC0430007 STATUS_SECUREBOOT_POLICY_NOT_AUTHORIZED NTStatus = 0xC0430008 STATUS_SECUREBOOT_POLICY_UNKNOWN NTStatus = 0xC0430009 STATUS_SECUREBOOT_POLICY_MISSING_ANTIROLLBACKVERSION NTStatus = 0xC043000A STATUS_SECUREBOOT_PLATFORM_ID_MISMATCH NTStatus = 0xC043000B STATUS_SECUREBOOT_POLICY_ROLLBACK_DETECTED NTStatus = 0xC043000C STATUS_SECUREBOOT_POLICY_UPGRADE_MISMATCH NTStatus = 0xC043000D STATUS_SECUREBOOT_REQUIRED_POLICY_FILE_MISSING NTStatus = 0xC043000E STATUS_SECUREBOOT_NOT_BASE_POLICY NTStatus = 0xC043000F STATUS_SECUREBOOT_NOT_SUPPLEMENTAL_POLICY NTStatus = 0xC0430010 STATUS_PLATFORM_MANIFEST_NOT_AUTHORIZED NTStatus = 0xC0EB0001 STATUS_PLATFORM_MANIFEST_INVALID NTStatus = 0xC0EB0002 STATUS_PLATFORM_MANIFEST_FILE_NOT_AUTHORIZED NTStatus = 0xC0EB0003 STATUS_PLATFORM_MANIFEST_CATALOG_NOT_AUTHORIZED NTStatus = 0xC0EB0004 STATUS_PLATFORM_MANIFEST_BINARY_ID_NOT_FOUND NTStatus = 0xC0EB0005 STATUS_PLATFORM_MANIFEST_NOT_ACTIVE NTStatus = 0xC0EB0006 STATUS_PLATFORM_MANIFEST_NOT_SIGNED NTStatus = 0xC0EB0007 STATUS_SYSTEM_INTEGRITY_ROLLBACK_DETECTED NTStatus = 0xC0E90001 STATUS_SYSTEM_INTEGRITY_POLICY_VIOLATION NTStatus = 0xC0E90002 STATUS_SYSTEM_INTEGRITY_INVALID_POLICY NTStatus = 0xC0E90003 STATUS_SYSTEM_INTEGRITY_POLICY_NOT_SIGNED NTStatus = 0xC0E90004 STATUS_SYSTEM_INTEGRITY_TOO_MANY_POLICIES NTStatus = 0xC0E90005 STATUS_SYSTEM_INTEGRITY_SUPPLEMENTAL_POLICY_NOT_AUTHORIZED NTStatus = 0xC0E90006 STATUS_NO_APPLICABLE_APP_LICENSES_FOUND NTStatus = 0xC0EA0001 STATUS_CLIP_LICENSE_NOT_FOUND NTStatus = 0xC0EA0002 STATUS_CLIP_DEVICE_LICENSE_MISSING NTStatus = 0xC0EA0003 STATUS_CLIP_LICENSE_INVALID_SIGNATURE NTStatus = 0xC0EA0004 STATUS_CLIP_KEYHOLDER_LICENSE_MISSING_OR_INVALID NTStatus = 0xC0EA0005 STATUS_CLIP_LICENSE_EXPIRED NTStatus = 0xC0EA0006 STATUS_CLIP_LICENSE_SIGNED_BY_UNKNOWN_SOURCE NTStatus = 0xC0EA0007 STATUS_CLIP_LICENSE_NOT_SIGNED NTStatus = 0xC0EA0008 STATUS_CLIP_LICENSE_HARDWARE_ID_OUT_OF_TOLERANCE NTStatus = 0xC0EA0009 STATUS_CLIP_LICENSE_DEVICE_ID_MISMATCH NTStatus = 0xC0EA000A STATUS_AUDIO_ENGINE_NODE_NOT_FOUND NTStatus = 0xC0440001 STATUS_HDAUDIO_EMPTY_CONNECTION_LIST NTStatus = 0xC0440002 STATUS_HDAUDIO_CONNECTION_LIST_NOT_SUPPORTED NTStatus = 0xC0440003 STATUS_HDAUDIO_NO_LOGICAL_DEVICES_CREATED NTStatus = 0xC0440004 STATUS_HDAUDIO_NULL_LINKED_LIST_ENTRY NTStatus = 0xC0440005 STATUS_SPACES_REPAIRED NTStatus = 0x00E70000 STATUS_SPACES_PAUSE NTStatus = 0x00E70001 STATUS_SPACES_COMPLETE NTStatus = 0x00E70002 STATUS_SPACES_REDIRECT NTStatus = 0x00E70003 STATUS_SPACES_FAULT_DOMAIN_TYPE_INVALID NTStatus = 0xC0E70001 STATUS_SPACES_RESILIENCY_TYPE_INVALID NTStatus = 0xC0E70003 STATUS_SPACES_DRIVE_SECTOR_SIZE_INVALID NTStatus = 0xC0E70004 STATUS_SPACES_DRIVE_REDUNDANCY_INVALID NTStatus = 0xC0E70006 STATUS_SPACES_NUMBER_OF_DATA_COPIES_INVALID NTStatus = 0xC0E70007 STATUS_SPACES_INTERLEAVE_LENGTH_INVALID NTStatus = 0xC0E70009 STATUS_SPACES_NUMBER_OF_COLUMNS_INVALID NTStatus = 0xC0E7000A STATUS_SPACES_NOT_ENOUGH_DRIVES NTStatus = 0xC0E7000B STATUS_SPACES_EXTENDED_ERROR NTStatus = 0xC0E7000C STATUS_SPACES_PROVISIONING_TYPE_INVALID NTStatus = 0xC0E7000D STATUS_SPACES_ALLOCATION_SIZE_INVALID NTStatus = 0xC0E7000E STATUS_SPACES_ENCLOSURE_AWARE_INVALID NTStatus = 0xC0E7000F STATUS_SPACES_WRITE_CACHE_SIZE_INVALID NTStatus = 0xC0E70010 STATUS_SPACES_NUMBER_OF_GROUPS_INVALID NTStatus = 0xC0E70011 STATUS_SPACES_DRIVE_OPERATIONAL_STATE_INVALID NTStatus = 0xC0E70012 STATUS_SPACES_UPDATE_COLUMN_STATE NTStatus = 0xC0E70013 STATUS_SPACES_MAP_REQUIRED NTStatus = 0xC0E70014 STATUS_SPACES_UNSUPPORTED_VERSION NTStatus = 0xC0E70015 STATUS_SPACES_CORRUPT_METADATA NTStatus = 0xC0E70016 STATUS_SPACES_DRT_FULL NTStatus = 0xC0E70017 STATUS_SPACES_INCONSISTENCY NTStatus = 0xC0E70018 STATUS_SPACES_LOG_NOT_READY NTStatus = 0xC0E70019 STATUS_SPACES_NO_REDUNDANCY NTStatus = 0xC0E7001A STATUS_SPACES_DRIVE_NOT_READY NTStatus = 0xC0E7001B STATUS_SPACES_DRIVE_SPLIT NTStatus = 0xC0E7001C STATUS_SPACES_DRIVE_LOST_DATA NTStatus = 0xC0E7001D STATUS_SPACES_ENTRY_INCOMPLETE NTStatus = 0xC0E7001E STATUS_SPACES_ENTRY_INVALID NTStatus = 0xC0E7001F STATUS_SPACES_MARK_DIRTY NTStatus = 0xC0E70020 STATUS_VOLSNAP_BOOTFILE_NOT_VALID NTStatus = 0xC0500003 STATUS_VOLSNAP_ACTIVATION_TIMEOUT NTStatus = 0xC0500004 STATUS_IO_PREEMPTED NTStatus = 0xC0510001 STATUS_SVHDX_ERROR_STORED NTStatus = 0xC05C0000 STATUS_SVHDX_ERROR_NOT_AVAILABLE NTStatus = 0xC05CFF00 STATUS_SVHDX_UNIT_ATTENTION_AVAILABLE NTStatus = 0xC05CFF01 STATUS_SVHDX_UNIT_ATTENTION_CAPACITY_DATA_CHANGED NTStatus = 0xC05CFF02 STATUS_SVHDX_UNIT_ATTENTION_RESERVATIONS_PREEMPTED NTStatus = 0xC05CFF03 STATUS_SVHDX_UNIT_ATTENTION_RESERVATIONS_RELEASED NTStatus = 0xC05CFF04 STATUS_SVHDX_UNIT_ATTENTION_REGISTRATIONS_PREEMPTED NTStatus = 0xC05CFF05 STATUS_SVHDX_UNIT_ATTENTION_OPERATING_DEFINITION_CHANGED NTStatus = 0xC05CFF06 STATUS_SVHDX_RESERVATION_CONFLICT NTStatus = 0xC05CFF07 STATUS_SVHDX_WRONG_FILE_TYPE NTStatus = 0xC05CFF08 STATUS_SVHDX_VERSION_MISMATCH NTStatus = 0xC05CFF09 STATUS_VHD_SHARED NTStatus = 0xC05CFF0A STATUS_SVHDX_NO_INITIATOR NTStatus = 0xC05CFF0B STATUS_VHDSET_BACKING_STORAGE_NOT_FOUND NTStatus = 0xC05CFF0C STATUS_SMB_NO_PREAUTH_INTEGRITY_HASH_OVERLAP NTStatus = 0xC05D0000 STATUS_SMB_BAD_CLUSTER_DIALECT NTStatus = 0xC05D0001 STATUS_SMB_GUEST_LOGON_BLOCKED NTStatus = 0xC05D0002 STATUS_SECCORE_INVALID_COMMAND NTStatus = 0xC0E80000 STATUS_VSM_NOT_INITIALIZED NTStatus = 0xC0450000 STATUS_VSM_DMA_PROTECTION_NOT_IN_USE NTStatus = 0xC0450001 STATUS_APPEXEC_CONDITION_NOT_SATISFIED NTStatus = 0xC0EC0000 STATUS_APPEXEC_HANDLE_INVALIDATED NTStatus = 0xC0EC0001 STATUS_APPEXEC_INVALID_HOST_GENERATION NTStatus = 0xC0EC0002 STATUS_APPEXEC_UNEXPECTED_PROCESS_REGISTRATION NTStatus = 0xC0EC0003 STATUS_APPEXEC_INVALID_HOST_STATE NTStatus = 0xC0EC0004 STATUS_APPEXEC_NO_DONOR NTStatus = 0xC0EC0005 STATUS_APPEXEC_HOST_ID_MISMATCH NTStatus = 0xC0EC0006 STATUS_APPEXEC_UNKNOWN_USER NTStatus = 0xC0EC0007 ) ================================================ FILE: vendor/golang.org/x/sys/windows/zknownfolderids_windows.go ================================================ // Code generated by 'mkknownfolderids.bash'; DO NOT EDIT. package windows type KNOWNFOLDERID GUID var ( FOLDERID_NetworkFolder = &KNOWNFOLDERID{0xd20beec4, 0x5ca8, 0x4905, [8]byte{0xae, 0x3b, 0xbf, 0x25, 0x1e, 0xa0, 0x9b, 0x53}} FOLDERID_ComputerFolder = &KNOWNFOLDERID{0x0ac0837c, 0xbbf8, 0x452a, [8]byte{0x85, 0x0d, 0x79, 0xd0, 0x8e, 0x66, 0x7c, 0xa7}} FOLDERID_InternetFolder = &KNOWNFOLDERID{0x4d9f7874, 0x4e0c, 0x4904, [8]byte{0x96, 0x7b, 0x40, 0xb0, 0xd2, 0x0c, 0x3e, 0x4b}} FOLDERID_ControlPanelFolder = &KNOWNFOLDERID{0x82a74aeb, 0xaeb4, 0x465c, [8]byte{0xa0, 0x14, 0xd0, 0x97, 0xee, 0x34, 0x6d, 0x63}} FOLDERID_PrintersFolder = &KNOWNFOLDERID{0x76fc4e2d, 0xd6ad, 0x4519, [8]byte{0xa6, 0x63, 0x37, 0xbd, 0x56, 0x06, 0x81, 0x85}} FOLDERID_SyncManagerFolder = &KNOWNFOLDERID{0x43668bf8, 0xc14e, 0x49b2, [8]byte{0x97, 0xc9, 0x74, 0x77, 0x84, 0xd7, 0x84, 0xb7}} FOLDERID_SyncSetupFolder = &KNOWNFOLDERID{0x0f214138, 0xb1d3, 0x4a90, [8]byte{0xbb, 0xa9, 0x27, 0xcb, 0xc0, 0xc5, 0x38, 0x9a}} FOLDERID_ConflictFolder = &KNOWNFOLDERID{0x4bfefb45, 0x347d, 0x4006, [8]byte{0xa5, 0xbe, 0xac, 0x0c, 0xb0, 0x56, 0x71, 0x92}} FOLDERID_SyncResultsFolder = &KNOWNFOLDERID{0x289a9a43, 0xbe44, 0x4057, [8]byte{0xa4, 0x1b, 0x58, 0x7a, 0x76, 0xd7, 0xe7, 0xf9}} FOLDERID_RecycleBinFolder = &KNOWNFOLDERID{0xb7534046, 0x3ecb, 0x4c18, [8]byte{0xbe, 0x4e, 0x64, 0xcd, 0x4c, 0xb7, 0xd6, 0xac}} FOLDERID_ConnectionsFolder = &KNOWNFOLDERID{0x6f0cd92b, 0x2e97, 0x45d1, [8]byte{0x88, 0xff, 0xb0, 0xd1, 0x86, 0xb8, 0xde, 0xdd}} FOLDERID_Fonts = &KNOWNFOLDERID{0xfd228cb7, 0xae11, 0x4ae3, [8]byte{0x86, 0x4c, 0x16, 0xf3, 0x91, 0x0a, 0xb8, 0xfe}} FOLDERID_Desktop = &KNOWNFOLDERID{0xb4bfcc3a, 0xdb2c, 0x424c, [8]byte{0xb0, 0x29, 0x7f, 0xe9, 0x9a, 0x87, 0xc6, 0x41}} FOLDERID_Startup = &KNOWNFOLDERID{0xb97d20bb, 0xf46a, 0x4c97, [8]byte{0xba, 0x10, 0x5e, 0x36, 0x08, 0x43, 0x08, 0x54}} FOLDERID_Programs = &KNOWNFOLDERID{0xa77f5d77, 0x2e2b, 0x44c3, [8]byte{0xa6, 0xa2, 0xab, 0xa6, 0x01, 0x05, 0x4a, 0x51}} FOLDERID_StartMenu = &KNOWNFOLDERID{0x625b53c3, 0xab48, 0x4ec1, [8]byte{0xba, 0x1f, 0xa1, 0xef, 0x41, 0x46, 0xfc, 0x19}} FOLDERID_Recent = &KNOWNFOLDERID{0xae50c081, 0xebd2, 0x438a, [8]byte{0x86, 0x55, 0x8a, 0x09, 0x2e, 0x34, 0x98, 0x7a}} FOLDERID_SendTo = &KNOWNFOLDERID{0x8983036c, 0x27c0, 0x404b, [8]byte{0x8f, 0x08, 0x10, 0x2d, 0x10, 0xdc, 0xfd, 0x74}} FOLDERID_Documents = &KNOWNFOLDERID{0xfdd39ad0, 0x238f, 0x46af, [8]byte{0xad, 0xb4, 0x6c, 0x85, 0x48, 0x03, 0x69, 0xc7}} FOLDERID_Favorites = &KNOWNFOLDERID{0x1777f761, 0x68ad, 0x4d8a, [8]byte{0x87, 0xbd, 0x30, 0xb7, 0x59, 0xfa, 0x33, 0xdd}} FOLDERID_NetHood = &KNOWNFOLDERID{0xc5abbf53, 0xe17f, 0x4121, [8]byte{0x89, 0x00, 0x86, 0x62, 0x6f, 0xc2, 0xc9, 0x73}} FOLDERID_PrintHood = &KNOWNFOLDERID{0x9274bd8d, 0xcfd1, 0x41c3, [8]byte{0xb3, 0x5e, 0xb1, 0x3f, 0x55, 0xa7, 0x58, 0xf4}} FOLDERID_Templates = &KNOWNFOLDERID{0xa63293e8, 0x664e, 0x48db, [8]byte{0xa0, 0x79, 0xdf, 0x75, 0x9e, 0x05, 0x09, 0xf7}} FOLDERID_CommonStartup = &KNOWNFOLDERID{0x82a5ea35, 0xd9cd, 0x47c5, [8]byte{0x96, 0x29, 0xe1, 0x5d, 0x2f, 0x71, 0x4e, 0x6e}} FOLDERID_CommonPrograms = &KNOWNFOLDERID{0x0139d44e, 0x6afe, 0x49f2, [8]byte{0x86, 0x90, 0x3d, 0xaf, 0xca, 0xe6, 0xff, 0xb8}} FOLDERID_CommonStartMenu = &KNOWNFOLDERID{0xa4115719, 0xd62e, 0x491d, [8]byte{0xaa, 0x7c, 0xe7, 0x4b, 0x8b, 0xe3, 0xb0, 0x67}} FOLDERID_PublicDesktop = &KNOWNFOLDERID{0xc4aa340d, 0xf20f, 0x4863, [8]byte{0xaf, 0xef, 0xf8, 0x7e, 0xf2, 0xe6, 0xba, 0x25}} FOLDERID_ProgramData = &KNOWNFOLDERID{0x62ab5d82, 0xfdc1, 0x4dc3, [8]byte{0xa9, 0xdd, 0x07, 0x0d, 0x1d, 0x49, 0x5d, 0x97}} FOLDERID_CommonTemplates = &KNOWNFOLDERID{0xb94237e7, 0x57ac, 0x4347, [8]byte{0x91, 0x51, 0xb0, 0x8c, 0x6c, 0x32, 0xd1, 0xf7}} FOLDERID_PublicDocuments = &KNOWNFOLDERID{0xed4824af, 0xdce4, 0x45a8, [8]byte{0x81, 0xe2, 0xfc, 0x79, 0x65, 0x08, 0x36, 0x34}} FOLDERID_RoamingAppData = &KNOWNFOLDERID{0x3eb685db, 0x65f9, 0x4cf6, [8]byte{0xa0, 0x3a, 0xe3, 0xef, 0x65, 0x72, 0x9f, 0x3d}} FOLDERID_LocalAppData = &KNOWNFOLDERID{0xf1b32785, 0x6fba, 0x4fcf, [8]byte{0x9d, 0x55, 0x7b, 0x8e, 0x7f, 0x15, 0x70, 0x91}} FOLDERID_LocalAppDataLow = &KNOWNFOLDERID{0xa520a1a4, 0x1780, 0x4ff6, [8]byte{0xbd, 0x18, 0x16, 0x73, 0x43, 0xc5, 0xaf, 0x16}} FOLDERID_InternetCache = &KNOWNFOLDERID{0x352481e8, 0x33be, 0x4251, [8]byte{0xba, 0x85, 0x60, 0x07, 0xca, 0xed, 0xcf, 0x9d}} FOLDERID_Cookies = &KNOWNFOLDERID{0x2b0f765d, 0xc0e9, 0x4171, [8]byte{0x90, 0x8e, 0x08, 0xa6, 0x11, 0xb8, 0x4f, 0xf6}} FOLDERID_History = &KNOWNFOLDERID{0xd9dc8a3b, 0xb784, 0x432e, [8]byte{0xa7, 0x81, 0x5a, 0x11, 0x30, 0xa7, 0x59, 0x63}} FOLDERID_System = &KNOWNFOLDERID{0x1ac14e77, 0x02e7, 0x4e5d, [8]byte{0xb7, 0x44, 0x2e, 0xb1, 0xae, 0x51, 0x98, 0xb7}} FOLDERID_SystemX86 = &KNOWNFOLDERID{0xd65231b0, 0xb2f1, 0x4857, [8]byte{0xa4, 0xce, 0xa8, 0xe7, 0xc6, 0xea, 0x7d, 0x27}} FOLDERID_Windows = &KNOWNFOLDERID{0xf38bf404, 0x1d43, 0x42f2, [8]byte{0x93, 0x05, 0x67, 0xde, 0x0b, 0x28, 0xfc, 0x23}} FOLDERID_Profile = &KNOWNFOLDERID{0x5e6c858f, 0x0e22, 0x4760, [8]byte{0x9a, 0xfe, 0xea, 0x33, 0x17, 0xb6, 0x71, 0x73}} FOLDERID_Pictures = &KNOWNFOLDERID{0x33e28130, 0x4e1e, 0x4676, [8]byte{0x83, 0x5a, 0x98, 0x39, 0x5c, 0x3b, 0xc3, 0xbb}} FOLDERID_ProgramFilesX86 = &KNOWNFOLDERID{0x7c5a40ef, 0xa0fb, 0x4bfc, [8]byte{0x87, 0x4a, 0xc0, 0xf2, 0xe0, 0xb9, 0xfa, 0x8e}} FOLDERID_ProgramFilesCommonX86 = &KNOWNFOLDERID{0xde974d24, 0xd9c6, 0x4d3e, [8]byte{0xbf, 0x91, 0xf4, 0x45, 0x51, 0x20, 0xb9, 0x17}} FOLDERID_ProgramFilesX64 = &KNOWNFOLDERID{0x6d809377, 0x6af0, 0x444b, [8]byte{0x89, 0x57, 0xa3, 0x77, 0x3f, 0x02, 0x20, 0x0e}} FOLDERID_ProgramFilesCommonX64 = &KNOWNFOLDERID{0x6365d5a7, 0x0f0d, 0x45e5, [8]byte{0x87, 0xf6, 0x0d, 0xa5, 0x6b, 0x6a, 0x4f, 0x7d}} FOLDERID_ProgramFiles = &KNOWNFOLDERID{0x905e63b6, 0xc1bf, 0x494e, [8]byte{0xb2, 0x9c, 0x65, 0xb7, 0x32, 0xd3, 0xd2, 0x1a}} FOLDERID_ProgramFilesCommon = &KNOWNFOLDERID{0xf7f1ed05, 0x9f6d, 0x47a2, [8]byte{0xaa, 0xae, 0x29, 0xd3, 0x17, 0xc6, 0xf0, 0x66}} FOLDERID_UserProgramFiles = &KNOWNFOLDERID{0x5cd7aee2, 0x2219, 0x4a67, [8]byte{0xb8, 0x5d, 0x6c, 0x9c, 0xe1, 0x56, 0x60, 0xcb}} FOLDERID_UserProgramFilesCommon = &KNOWNFOLDERID{0xbcbd3057, 0xca5c, 0x4622, [8]byte{0xb4, 0x2d, 0xbc, 0x56, 0xdb, 0x0a, 0xe5, 0x16}} FOLDERID_AdminTools = &KNOWNFOLDERID{0x724ef170, 0xa42d, 0x4fef, [8]byte{0x9f, 0x26, 0xb6, 0x0e, 0x84, 0x6f, 0xba, 0x4f}} FOLDERID_CommonAdminTools = &KNOWNFOLDERID{0xd0384e7d, 0xbac3, 0x4797, [8]byte{0x8f, 0x14, 0xcb, 0xa2, 0x29, 0xb3, 0x92, 0xb5}} FOLDERID_Music = &KNOWNFOLDERID{0x4bd8d571, 0x6d19, 0x48d3, [8]byte{0xbe, 0x97, 0x42, 0x22, 0x20, 0x08, 0x0e, 0x43}} FOLDERID_Videos = &KNOWNFOLDERID{0x18989b1d, 0x99b5, 0x455b, [8]byte{0x84, 0x1c, 0xab, 0x7c, 0x74, 0xe4, 0xdd, 0xfc}} FOLDERID_Ringtones = &KNOWNFOLDERID{0xc870044b, 0xf49e, 0x4126, [8]byte{0xa9, 0xc3, 0xb5, 0x2a, 0x1f, 0xf4, 0x11, 0xe8}} FOLDERID_PublicPictures = &KNOWNFOLDERID{0xb6ebfb86, 0x6907, 0x413c, [8]byte{0x9a, 0xf7, 0x4f, 0xc2, 0xab, 0xf0, 0x7c, 0xc5}} FOLDERID_PublicMusic = &KNOWNFOLDERID{0x3214fab5, 0x9757, 0x4298, [8]byte{0xbb, 0x61, 0x92, 0xa9, 0xde, 0xaa, 0x44, 0xff}} FOLDERID_PublicVideos = &KNOWNFOLDERID{0x2400183a, 0x6185, 0x49fb, [8]byte{0xa2, 0xd8, 0x4a, 0x39, 0x2a, 0x60, 0x2b, 0xa3}} FOLDERID_PublicRingtones = &KNOWNFOLDERID{0xe555ab60, 0x153b, 0x4d17, [8]byte{0x9f, 0x04, 0xa5, 0xfe, 0x99, 0xfc, 0x15, 0xec}} FOLDERID_ResourceDir = &KNOWNFOLDERID{0x8ad10c31, 0x2adb, 0x4296, [8]byte{0xa8, 0xf7, 0xe4, 0x70, 0x12, 0x32, 0xc9, 0x72}} FOLDERID_LocalizedResourcesDir = &KNOWNFOLDERID{0x2a00375e, 0x224c, 0x49de, [8]byte{0xb8, 0xd1, 0x44, 0x0d, 0xf7, 0xef, 0x3d, 0xdc}} FOLDERID_CommonOEMLinks = &KNOWNFOLDERID{0xc1bae2d0, 0x10df, 0x4334, [8]byte{0xbe, 0xdd, 0x7a, 0xa2, 0x0b, 0x22, 0x7a, 0x9d}} FOLDERID_CDBurning = &KNOWNFOLDERID{0x9e52ab10, 0xf80d, 0x49df, [8]byte{0xac, 0xb8, 0x43, 0x30, 0xf5, 0x68, 0x78, 0x55}} FOLDERID_UserProfiles = &KNOWNFOLDERID{0x0762d272, 0xc50a, 0x4bb0, [8]byte{0xa3, 0x82, 0x69, 0x7d, 0xcd, 0x72, 0x9b, 0x80}} FOLDERID_Playlists = &KNOWNFOLDERID{0xde92c1c7, 0x837f, 0x4f69, [8]byte{0xa3, 0xbb, 0x86, 0xe6, 0x31, 0x20, 0x4a, 0x23}} FOLDERID_SamplePlaylists = &KNOWNFOLDERID{0x15ca69b3, 0x30ee, 0x49c1, [8]byte{0xac, 0xe1, 0x6b, 0x5e, 0xc3, 0x72, 0xaf, 0xb5}} FOLDERID_SampleMusic = &KNOWNFOLDERID{0xb250c668, 0xf57d, 0x4ee1, [8]byte{0xa6, 0x3c, 0x29, 0x0e, 0xe7, 0xd1, 0xaa, 0x1f}} FOLDERID_SamplePictures = &KNOWNFOLDERID{0xc4900540, 0x2379, 0x4c75, [8]byte{0x84, 0x4b, 0x64, 0xe6, 0xfa, 0xf8, 0x71, 0x6b}} FOLDERID_SampleVideos = &KNOWNFOLDERID{0x859ead94, 0x2e85, 0x48ad, [8]byte{0xa7, 0x1a, 0x09, 0x69, 0xcb, 0x56, 0xa6, 0xcd}} FOLDERID_PhotoAlbums = &KNOWNFOLDERID{0x69d2cf90, 0xfc33, 0x4fb7, [8]byte{0x9a, 0x0c, 0xeb, 0xb0, 0xf0, 0xfc, 0xb4, 0x3c}} FOLDERID_Public = &KNOWNFOLDERID{0xdfdf76a2, 0xc82a, 0x4d63, [8]byte{0x90, 0x6a, 0x56, 0x44, 0xac, 0x45, 0x73, 0x85}} FOLDERID_ChangeRemovePrograms = &KNOWNFOLDERID{0xdf7266ac, 0x9274, 0x4867, [8]byte{0x8d, 0x55, 0x3b, 0xd6, 0x61, 0xde, 0x87, 0x2d}} FOLDERID_AppUpdates = &KNOWNFOLDERID{0xa305ce99, 0xf527, 0x492b, [8]byte{0x8b, 0x1a, 0x7e, 0x76, 0xfa, 0x98, 0xd6, 0xe4}} FOLDERID_AddNewPrograms = &KNOWNFOLDERID{0xde61d971, 0x5ebc, 0x4f02, [8]byte{0xa3, 0xa9, 0x6c, 0x82, 0x89, 0x5e, 0x5c, 0x04}} FOLDERID_Downloads = &KNOWNFOLDERID{0x374de290, 0x123f, 0x4565, [8]byte{0x91, 0x64, 0x39, 0xc4, 0x92, 0x5e, 0x46, 0x7b}} FOLDERID_PublicDownloads = &KNOWNFOLDERID{0x3d644c9b, 0x1fb8, 0x4f30, [8]byte{0x9b, 0x45, 0xf6, 0x70, 0x23, 0x5f, 0x79, 0xc0}} FOLDERID_SavedSearches = &KNOWNFOLDERID{0x7d1d3a04, 0xdebb, 0x4115, [8]byte{0x95, 0xcf, 0x2f, 0x29, 0xda, 0x29, 0x20, 0xda}} FOLDERID_QuickLaunch = &KNOWNFOLDERID{0x52a4f021, 0x7b75, 0x48a9, [8]byte{0x9f, 0x6b, 0x4b, 0x87, 0xa2, 0x10, 0xbc, 0x8f}} FOLDERID_Contacts = &KNOWNFOLDERID{0x56784854, 0xc6cb, 0x462b, [8]byte{0x81, 0x69, 0x88, 0xe3, 0x50, 0xac, 0xb8, 0x82}} FOLDERID_SidebarParts = &KNOWNFOLDERID{0xa75d362e, 0x50fc, 0x4fb7, [8]byte{0xac, 0x2c, 0xa8, 0xbe, 0xaa, 0x31, 0x44, 0x93}} FOLDERID_SidebarDefaultParts = &KNOWNFOLDERID{0x7b396e54, 0x9ec5, 0x4300, [8]byte{0xbe, 0x0a, 0x24, 0x82, 0xeb, 0xae, 0x1a, 0x26}} FOLDERID_PublicGameTasks = &KNOWNFOLDERID{0xdebf2536, 0xe1a8, 0x4c59, [8]byte{0xb6, 0xa2, 0x41, 0x45, 0x86, 0x47, 0x6a, 0xea}} FOLDERID_GameTasks = &KNOWNFOLDERID{0x054fae61, 0x4dd8, 0x4787, [8]byte{0x80, 0xb6, 0x09, 0x02, 0x20, 0xc4, 0xb7, 0x00}} FOLDERID_SavedGames = &KNOWNFOLDERID{0x4c5c32ff, 0xbb9d, 0x43b0, [8]byte{0xb5, 0xb4, 0x2d, 0x72, 0xe5, 0x4e, 0xaa, 0xa4}} FOLDERID_Games = &KNOWNFOLDERID{0xcac52c1a, 0xb53d, 0x4edc, [8]byte{0x92, 0xd7, 0x6b, 0x2e, 0x8a, 0xc1, 0x94, 0x34}} FOLDERID_SEARCH_MAPI = &KNOWNFOLDERID{0x98ec0e18, 0x2098, 0x4d44, [8]byte{0x86, 0x44, 0x66, 0x97, 0x93, 0x15, 0xa2, 0x81}} FOLDERID_SEARCH_CSC = &KNOWNFOLDERID{0xee32e446, 0x31ca, 0x4aba, [8]byte{0x81, 0x4f, 0xa5, 0xeb, 0xd2, 0xfd, 0x6d, 0x5e}} FOLDERID_Links = &KNOWNFOLDERID{0xbfb9d5e0, 0xc6a9, 0x404c, [8]byte{0xb2, 0xb2, 0xae, 0x6d, 0xb6, 0xaf, 0x49, 0x68}} FOLDERID_UsersFiles = &KNOWNFOLDERID{0xf3ce0f7c, 0x4901, 0x4acc, [8]byte{0x86, 0x48, 0xd5, 0xd4, 0x4b, 0x04, 0xef, 0x8f}} FOLDERID_UsersLibraries = &KNOWNFOLDERID{0xa302545d, 0xdeff, 0x464b, [8]byte{0xab, 0xe8, 0x61, 0xc8, 0x64, 0x8d, 0x93, 0x9b}} FOLDERID_SearchHome = &KNOWNFOLDERID{0x190337d1, 0xb8ca, 0x4121, [8]byte{0xa6, 0x39, 0x6d, 0x47, 0x2d, 0x16, 0x97, 0x2a}} FOLDERID_OriginalImages = &KNOWNFOLDERID{0x2c36c0aa, 0x5812, 0x4b87, [8]byte{0xbf, 0xd0, 0x4c, 0xd0, 0xdf, 0xb1, 0x9b, 0x39}} FOLDERID_DocumentsLibrary = &KNOWNFOLDERID{0x7b0db17d, 0x9cd2, 0x4a93, [8]byte{0x97, 0x33, 0x46, 0xcc, 0x89, 0x02, 0x2e, 0x7c}} FOLDERID_MusicLibrary = &KNOWNFOLDERID{0x2112ab0a, 0xc86a, 0x4ffe, [8]byte{0xa3, 0x68, 0x0d, 0xe9, 0x6e, 0x47, 0x01, 0x2e}} FOLDERID_PicturesLibrary = &KNOWNFOLDERID{0xa990ae9f, 0xa03b, 0x4e80, [8]byte{0x94, 0xbc, 0x99, 0x12, 0xd7, 0x50, 0x41, 0x04}} FOLDERID_VideosLibrary = &KNOWNFOLDERID{0x491e922f, 0x5643, 0x4af4, [8]byte{0xa7, 0xeb, 0x4e, 0x7a, 0x13, 0x8d, 0x81, 0x74}} FOLDERID_RecordedTVLibrary = &KNOWNFOLDERID{0x1a6fdba2, 0xf42d, 0x4358, [8]byte{0xa7, 0x98, 0xb7, 0x4d, 0x74, 0x59, 0x26, 0xc5}} FOLDERID_HomeGroup = &KNOWNFOLDERID{0x52528a6b, 0xb9e3, 0x4add, [8]byte{0xb6, 0x0d, 0x58, 0x8c, 0x2d, 0xba, 0x84, 0x2d}} FOLDERID_HomeGroupCurrentUser = &KNOWNFOLDERID{0x9b74b6a3, 0x0dfd, 0x4f11, [8]byte{0x9e, 0x78, 0x5f, 0x78, 0x00, 0xf2, 0xe7, 0x72}} FOLDERID_DeviceMetadataStore = &KNOWNFOLDERID{0x5ce4a5e9, 0xe4eb, 0x479d, [8]byte{0xb8, 0x9f, 0x13, 0x0c, 0x02, 0x88, 0x61, 0x55}} FOLDERID_Libraries = &KNOWNFOLDERID{0x1b3ea5dc, 0xb587, 0x4786, [8]byte{0xb4, 0xef, 0xbd, 0x1d, 0xc3, 0x32, 0xae, 0xae}} FOLDERID_PublicLibraries = &KNOWNFOLDERID{0x48daf80b, 0xe6cf, 0x4f4e, [8]byte{0xb8, 0x00, 0x0e, 0x69, 0xd8, 0x4e, 0xe3, 0x84}} FOLDERID_UserPinned = &KNOWNFOLDERID{0x9e3995ab, 0x1f9c, 0x4f13, [8]byte{0xb8, 0x27, 0x48, 0xb2, 0x4b, 0x6c, 0x71, 0x74}} FOLDERID_ImplicitAppShortcuts = &KNOWNFOLDERID{0xbcb5256f, 0x79f6, 0x4cee, [8]byte{0xb7, 0x25, 0xdc, 0x34, 0xe4, 0x02, 0xfd, 0x46}} FOLDERID_AccountPictures = &KNOWNFOLDERID{0x008ca0b1, 0x55b4, 0x4c56, [8]byte{0xb8, 0xa8, 0x4d, 0xe4, 0xb2, 0x99, 0xd3, 0xbe}} FOLDERID_PublicUserTiles = &KNOWNFOLDERID{0x0482af6c, 0x08f1, 0x4c34, [8]byte{0x8c, 0x90, 0xe1, 0x7e, 0xc9, 0x8b, 0x1e, 0x17}} FOLDERID_AppsFolder = &KNOWNFOLDERID{0x1e87508d, 0x89c2, 0x42f0, [8]byte{0x8a, 0x7e, 0x64, 0x5a, 0x0f, 0x50, 0xca, 0x58}} FOLDERID_StartMenuAllPrograms = &KNOWNFOLDERID{0xf26305ef, 0x6948, 0x40b9, [8]byte{0xb2, 0x55, 0x81, 0x45, 0x3d, 0x09, 0xc7, 0x85}} FOLDERID_CommonStartMenuPlaces = &KNOWNFOLDERID{0xa440879f, 0x87a0, 0x4f7d, [8]byte{0xb7, 0x00, 0x02, 0x07, 0xb9, 0x66, 0x19, 0x4a}} FOLDERID_ApplicationShortcuts = &KNOWNFOLDERID{0xa3918781, 0xe5f2, 0x4890, [8]byte{0xb3, 0xd9, 0xa7, 0xe5, 0x43, 0x32, 0x32, 0x8c}} FOLDERID_RoamingTiles = &KNOWNFOLDERID{0x00bcfc5a, 0xed94, 0x4e48, [8]byte{0x96, 0xa1, 0x3f, 0x62, 0x17, 0xf2, 0x19, 0x90}} FOLDERID_RoamedTileImages = &KNOWNFOLDERID{0xaaa8d5a5, 0xf1d6, 0x4259, [8]byte{0xba, 0xa8, 0x78, 0xe7, 0xef, 0x60, 0x83, 0x5e}} FOLDERID_Screenshots = &KNOWNFOLDERID{0xb7bede81, 0xdf94, 0x4682, [8]byte{0xa7, 0xd8, 0x57, 0xa5, 0x26, 0x20, 0xb8, 0x6f}} FOLDERID_CameraRoll = &KNOWNFOLDERID{0xab5fb87b, 0x7ce2, 0x4f83, [8]byte{0x91, 0x5d, 0x55, 0x08, 0x46, 0xc9, 0x53, 0x7b}} FOLDERID_SkyDrive = &KNOWNFOLDERID{0xa52bba46, 0xe9e1, 0x435f, [8]byte{0xb3, 0xd9, 0x28, 0xda, 0xa6, 0x48, 0xc0, 0xf6}} FOLDERID_OneDrive = &KNOWNFOLDERID{0xa52bba46, 0xe9e1, 0x435f, [8]byte{0xb3, 0xd9, 0x28, 0xda, 0xa6, 0x48, 0xc0, 0xf6}} FOLDERID_SkyDriveDocuments = &KNOWNFOLDERID{0x24d89e24, 0x2f19, 0x4534, [8]byte{0x9d, 0xde, 0x6a, 0x66, 0x71, 0xfb, 0xb8, 0xfe}} FOLDERID_SkyDrivePictures = &KNOWNFOLDERID{0x339719b5, 0x8c47, 0x4894, [8]byte{0x94, 0xc2, 0xd8, 0xf7, 0x7a, 0xdd, 0x44, 0xa6}} FOLDERID_SkyDriveMusic = &KNOWNFOLDERID{0xc3f2459e, 0x80d6, 0x45dc, [8]byte{0xbf, 0xef, 0x1f, 0x76, 0x9f, 0x2b, 0xe7, 0x30}} FOLDERID_SkyDriveCameraRoll = &KNOWNFOLDERID{0x767e6811, 0x49cb, 0x4273, [8]byte{0x87, 0xc2, 0x20, 0xf3, 0x55, 0xe1, 0x08, 0x5b}} FOLDERID_SearchHistory = &KNOWNFOLDERID{0x0d4c3db6, 0x03a3, 0x462f, [8]byte{0xa0, 0xe6, 0x08, 0x92, 0x4c, 0x41, 0xb5, 0xd4}} FOLDERID_SearchTemplates = &KNOWNFOLDERID{0x7e636bfe, 0xdfa9, 0x4d5e, [8]byte{0xb4, 0x56, 0xd7, 0xb3, 0x98, 0x51, 0xd8, 0xa9}} FOLDERID_CameraRollLibrary = &KNOWNFOLDERID{0x2b20df75, 0x1eda, 0x4039, [8]byte{0x80, 0x97, 0x38, 0x79, 0x82, 0x27, 0xd5, 0xb7}} FOLDERID_SavedPictures = &KNOWNFOLDERID{0x3b193882, 0xd3ad, 0x4eab, [8]byte{0x96, 0x5a, 0x69, 0x82, 0x9d, 0x1f, 0xb5, 0x9f}} FOLDERID_SavedPicturesLibrary = &KNOWNFOLDERID{0xe25b5812, 0xbe88, 0x4bd9, [8]byte{0x94, 0xb0, 0x29, 0x23, 0x34, 0x77, 0xb6, 0xc3}} FOLDERID_RetailDemo = &KNOWNFOLDERID{0x12d4c69e, 0x24ad, 0x4923, [8]byte{0xbe, 0x19, 0x31, 0x32, 0x1c, 0x43, 0xa7, 0x67}} FOLDERID_Device = &KNOWNFOLDERID{0x1c2ac1dc, 0x4358, 0x4b6c, [8]byte{0x97, 0x33, 0xaf, 0x21, 0x15, 0x65, 0x76, 0xf0}} FOLDERID_DevelopmentFiles = &KNOWNFOLDERID{0xdbe8e08e, 0x3053, 0x4bbc, [8]byte{0xb1, 0x83, 0x2a, 0x7b, 0x2b, 0x19, 0x1e, 0x59}} FOLDERID_Objects3D = &KNOWNFOLDERID{0x31c0dd25, 0x9439, 0x4f12, [8]byte{0xbf, 0x41, 0x7f, 0xf4, 0xed, 0xa3, 0x87, 0x22}} FOLDERID_AppCaptures = &KNOWNFOLDERID{0xedc0fe71, 0x98d8, 0x4f4a, [8]byte{0xb9, 0x20, 0xc8, 0xdc, 0x13, 0x3c, 0xb1, 0x65}} FOLDERID_LocalDocuments = &KNOWNFOLDERID{0xf42ee2d3, 0x909f, 0x4907, [8]byte{0x88, 0x71, 0x4c, 0x22, 0xfc, 0x0b, 0xf7, 0x56}} FOLDERID_LocalPictures = &KNOWNFOLDERID{0x0ddd015d, 0xb06c, 0x45d5, [8]byte{0x8c, 0x4c, 0xf5, 0x97, 0x13, 0x85, 0x46, 0x39}} FOLDERID_LocalVideos = &KNOWNFOLDERID{0x35286a68, 0x3c57, 0x41a1, [8]byte{0xbb, 0xb1, 0x0e, 0xae, 0x73, 0xd7, 0x6c, 0x95}} FOLDERID_LocalMusic = &KNOWNFOLDERID{0xa0c69a99, 0x21c8, 0x4671, [8]byte{0x87, 0x03, 0x79, 0x34, 0x16, 0x2f, 0xcf, 0x1d}} FOLDERID_LocalDownloads = &KNOWNFOLDERID{0x7d83ee9b, 0x2244, 0x4e70, [8]byte{0xb1, 0xf5, 0x53, 0x93, 0x04, 0x2a, 0xf1, 0xe4}} FOLDERID_RecordedCalls = &KNOWNFOLDERID{0x2f8b40c2, 0x83ed, 0x48ee, [8]byte{0xb3, 0x83, 0xa1, 0xf1, 0x57, 0xec, 0x6f, 0x9a}} FOLDERID_AllAppMods = &KNOWNFOLDERID{0x7ad67899, 0x66af, 0x43ba, [8]byte{0x91, 0x56, 0x6a, 0xad, 0x42, 0xe6, 0xc5, 0x96}} FOLDERID_CurrentAppMods = &KNOWNFOLDERID{0x3db40b20, 0x2a30, 0x4dbe, [8]byte{0x91, 0x7e, 0x77, 0x1d, 0xd2, 0x1d, 0xd0, 0x99}} FOLDERID_AppDataDesktop = &KNOWNFOLDERID{0xb2c5e279, 0x7add, 0x439f, [8]byte{0xb2, 0x8c, 0xc4, 0x1f, 0xe1, 0xbb, 0xf6, 0x72}} FOLDERID_AppDataDocuments = &KNOWNFOLDERID{0x7be16610, 0x1f7f, 0x44ac, [8]byte{0xbf, 0xf0, 0x83, 0xe1, 0x5f, 0x2f, 0xfc, 0xa1}} FOLDERID_AppDataFavorites = &KNOWNFOLDERID{0x7cfbefbc, 0xde1f, 0x45aa, [8]byte{0xb8, 0x43, 0xa5, 0x42, 0xac, 0x53, 0x6c, 0xc9}} FOLDERID_AppDataProgramData = &KNOWNFOLDERID{0x559d40a3, 0xa036, 0x40fa, [8]byte{0xaf, 0x61, 0x84, 0xcb, 0x43, 0x0a, 0x4d, 0x34}} ) ================================================ FILE: vendor/golang.org/x/sys/windows/zsyscall_windows.go ================================================ // Code generated by 'go generate'; DO NOT EDIT. package windows import ( "syscall" "unsafe" ) var _ unsafe.Pointer // Do the interface allocations only once for common // Errno values. const ( errnoERROR_IO_PENDING = 997 ) var ( errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING) errERROR_EINVAL error = syscall.EINVAL ) // errnoErr returns common boxed Errno values, to prevent // allocations at runtime. func errnoErr(e syscall.Errno) error { switch e { case 0: return errERROR_EINVAL case errnoERROR_IO_PENDING: return errERROR_IO_PENDING } // TODO: add more here, after collecting data on the common // error values see on Windows. (perhaps when running // all.bat?) return e } var ( modCfgMgr32 = NewLazySystemDLL("CfgMgr32.dll") modadvapi32 = NewLazySystemDLL("advapi32.dll") modcrypt32 = NewLazySystemDLL("crypt32.dll") moddnsapi = NewLazySystemDLL("dnsapi.dll") moddwmapi = NewLazySystemDLL("dwmapi.dll") modiphlpapi = NewLazySystemDLL("iphlpapi.dll") modkernel32 = NewLazySystemDLL("kernel32.dll") modmswsock = NewLazySystemDLL("mswsock.dll") modnetapi32 = NewLazySystemDLL("netapi32.dll") modntdll = NewLazySystemDLL("ntdll.dll") modole32 = NewLazySystemDLL("ole32.dll") modpsapi = NewLazySystemDLL("psapi.dll") modsechost = NewLazySystemDLL("sechost.dll") modsecur32 = NewLazySystemDLL("secur32.dll") modsetupapi = NewLazySystemDLL("setupapi.dll") modshell32 = NewLazySystemDLL("shell32.dll") moduser32 = NewLazySystemDLL("user32.dll") moduserenv = NewLazySystemDLL("userenv.dll") modversion = NewLazySystemDLL("version.dll") modwinmm = NewLazySystemDLL("winmm.dll") modwintrust = NewLazySystemDLL("wintrust.dll") modws2_32 = NewLazySystemDLL("ws2_32.dll") modwtsapi32 = NewLazySystemDLL("wtsapi32.dll") procCM_Get_DevNode_Status = modCfgMgr32.NewProc("CM_Get_DevNode_Status") procCM_Get_Device_Interface_ListW = modCfgMgr32.NewProc("CM_Get_Device_Interface_ListW") procCM_Get_Device_Interface_List_SizeW = modCfgMgr32.NewProc("CM_Get_Device_Interface_List_SizeW") procCM_MapCrToWin32Err = modCfgMgr32.NewProc("CM_MapCrToWin32Err") procAdjustTokenGroups = modadvapi32.NewProc("AdjustTokenGroups") procAdjustTokenPrivileges = modadvapi32.NewProc("AdjustTokenPrivileges") procAllocateAndInitializeSid = modadvapi32.NewProc("AllocateAndInitializeSid") procBuildSecurityDescriptorW = modadvapi32.NewProc("BuildSecurityDescriptorW") procChangeServiceConfig2W = modadvapi32.NewProc("ChangeServiceConfig2W") procChangeServiceConfigW = modadvapi32.NewProc("ChangeServiceConfigW") procCheckTokenMembership = modadvapi32.NewProc("CheckTokenMembership") procCloseServiceHandle = modadvapi32.NewProc("CloseServiceHandle") procControlService = modadvapi32.NewProc("ControlService") procConvertSecurityDescriptorToStringSecurityDescriptorW = modadvapi32.NewProc("ConvertSecurityDescriptorToStringSecurityDescriptorW") procConvertSidToStringSidW = modadvapi32.NewProc("ConvertSidToStringSidW") procConvertStringSecurityDescriptorToSecurityDescriptorW = modadvapi32.NewProc("ConvertStringSecurityDescriptorToSecurityDescriptorW") procConvertStringSidToSidW = modadvapi32.NewProc("ConvertStringSidToSidW") procCopySid = modadvapi32.NewProc("CopySid") procCreateProcessAsUserW = modadvapi32.NewProc("CreateProcessAsUserW") procCreateServiceW = modadvapi32.NewProc("CreateServiceW") procCreateWellKnownSid = modadvapi32.NewProc("CreateWellKnownSid") procCryptAcquireContextW = modadvapi32.NewProc("CryptAcquireContextW") procCryptGenRandom = modadvapi32.NewProc("CryptGenRandom") procCryptReleaseContext = modadvapi32.NewProc("CryptReleaseContext") procDeleteService = modadvapi32.NewProc("DeleteService") procDeregisterEventSource = modadvapi32.NewProc("DeregisterEventSource") procDuplicateTokenEx = modadvapi32.NewProc("DuplicateTokenEx") procEnumDependentServicesW = modadvapi32.NewProc("EnumDependentServicesW") procEnumServicesStatusExW = modadvapi32.NewProc("EnumServicesStatusExW") procEqualSid = modadvapi32.NewProc("EqualSid") procFreeSid = modadvapi32.NewProc("FreeSid") procGetAce = modadvapi32.NewProc("GetAce") procGetLengthSid = modadvapi32.NewProc("GetLengthSid") procGetNamedSecurityInfoW = modadvapi32.NewProc("GetNamedSecurityInfoW") procGetSecurityDescriptorControl = modadvapi32.NewProc("GetSecurityDescriptorControl") procGetSecurityDescriptorDacl = modadvapi32.NewProc("GetSecurityDescriptorDacl") procGetSecurityDescriptorGroup = modadvapi32.NewProc("GetSecurityDescriptorGroup") procGetSecurityDescriptorLength = modadvapi32.NewProc("GetSecurityDescriptorLength") procGetSecurityDescriptorOwner = modadvapi32.NewProc("GetSecurityDescriptorOwner") procGetSecurityDescriptorRMControl = modadvapi32.NewProc("GetSecurityDescriptorRMControl") procGetSecurityDescriptorSacl = modadvapi32.NewProc("GetSecurityDescriptorSacl") procGetSecurityInfo = modadvapi32.NewProc("GetSecurityInfo") procGetSidIdentifierAuthority = modadvapi32.NewProc("GetSidIdentifierAuthority") procGetSidSubAuthority = modadvapi32.NewProc("GetSidSubAuthority") procGetSidSubAuthorityCount = modadvapi32.NewProc("GetSidSubAuthorityCount") procGetTokenInformation = modadvapi32.NewProc("GetTokenInformation") procImpersonateSelf = modadvapi32.NewProc("ImpersonateSelf") procInitializeSecurityDescriptor = modadvapi32.NewProc("InitializeSecurityDescriptor") procInitiateSystemShutdownExW = modadvapi32.NewProc("InitiateSystemShutdownExW") procIsTokenRestricted = modadvapi32.NewProc("IsTokenRestricted") procIsValidSecurityDescriptor = modadvapi32.NewProc("IsValidSecurityDescriptor") procIsValidSid = modadvapi32.NewProc("IsValidSid") procIsWellKnownSid = modadvapi32.NewProc("IsWellKnownSid") procLookupAccountNameW = modadvapi32.NewProc("LookupAccountNameW") procLookupAccountSidW = modadvapi32.NewProc("LookupAccountSidW") procLookupPrivilegeValueW = modadvapi32.NewProc("LookupPrivilegeValueW") procMakeAbsoluteSD = modadvapi32.NewProc("MakeAbsoluteSD") procMakeSelfRelativeSD = modadvapi32.NewProc("MakeSelfRelativeSD") procNotifyServiceStatusChangeW = modadvapi32.NewProc("NotifyServiceStatusChangeW") procOpenProcessToken = modadvapi32.NewProc("OpenProcessToken") procOpenSCManagerW = modadvapi32.NewProc("OpenSCManagerW") procOpenServiceW = modadvapi32.NewProc("OpenServiceW") procOpenThreadToken = modadvapi32.NewProc("OpenThreadToken") procQueryServiceConfig2W = modadvapi32.NewProc("QueryServiceConfig2W") procQueryServiceConfigW = modadvapi32.NewProc("QueryServiceConfigW") procQueryServiceDynamicInformation = modadvapi32.NewProc("QueryServiceDynamicInformation") procQueryServiceLockStatusW = modadvapi32.NewProc("QueryServiceLockStatusW") procQueryServiceStatus = modadvapi32.NewProc("QueryServiceStatus") procQueryServiceStatusEx = modadvapi32.NewProc("QueryServiceStatusEx") procRegCloseKey = modadvapi32.NewProc("RegCloseKey") procRegEnumKeyExW = modadvapi32.NewProc("RegEnumKeyExW") procRegNotifyChangeKeyValue = modadvapi32.NewProc("RegNotifyChangeKeyValue") procRegOpenKeyExW = modadvapi32.NewProc("RegOpenKeyExW") procRegQueryInfoKeyW = modadvapi32.NewProc("RegQueryInfoKeyW") procRegQueryValueExW = modadvapi32.NewProc("RegQueryValueExW") procRegisterEventSourceW = modadvapi32.NewProc("RegisterEventSourceW") procRegisterServiceCtrlHandlerExW = modadvapi32.NewProc("RegisterServiceCtrlHandlerExW") procReportEventW = modadvapi32.NewProc("ReportEventW") procRevertToSelf = modadvapi32.NewProc("RevertToSelf") procSetEntriesInAclW = modadvapi32.NewProc("SetEntriesInAclW") procSetKernelObjectSecurity = modadvapi32.NewProc("SetKernelObjectSecurity") procSetNamedSecurityInfoW = modadvapi32.NewProc("SetNamedSecurityInfoW") procSetSecurityDescriptorControl = modadvapi32.NewProc("SetSecurityDescriptorControl") procSetSecurityDescriptorDacl = modadvapi32.NewProc("SetSecurityDescriptorDacl") procSetSecurityDescriptorGroup = modadvapi32.NewProc("SetSecurityDescriptorGroup") procSetSecurityDescriptorOwner = modadvapi32.NewProc("SetSecurityDescriptorOwner") procSetSecurityDescriptorRMControl = modadvapi32.NewProc("SetSecurityDescriptorRMControl") procSetSecurityDescriptorSacl = modadvapi32.NewProc("SetSecurityDescriptorSacl") procSetSecurityInfo = modadvapi32.NewProc("SetSecurityInfo") procSetServiceStatus = modadvapi32.NewProc("SetServiceStatus") procSetThreadToken = modadvapi32.NewProc("SetThreadToken") procSetTokenInformation = modadvapi32.NewProc("SetTokenInformation") procStartServiceCtrlDispatcherW = modadvapi32.NewProc("StartServiceCtrlDispatcherW") procStartServiceW = modadvapi32.NewProc("StartServiceW") procCertAddCertificateContextToStore = modcrypt32.NewProc("CertAddCertificateContextToStore") procCertCloseStore = modcrypt32.NewProc("CertCloseStore") procCertCreateCertificateContext = modcrypt32.NewProc("CertCreateCertificateContext") procCertDeleteCertificateFromStore = modcrypt32.NewProc("CertDeleteCertificateFromStore") procCertDuplicateCertificateContext = modcrypt32.NewProc("CertDuplicateCertificateContext") procCertEnumCertificatesInStore = modcrypt32.NewProc("CertEnumCertificatesInStore") procCertFindCertificateInStore = modcrypt32.NewProc("CertFindCertificateInStore") procCertFindChainInStore = modcrypt32.NewProc("CertFindChainInStore") procCertFindExtension = modcrypt32.NewProc("CertFindExtension") procCertFreeCertificateChain = modcrypt32.NewProc("CertFreeCertificateChain") procCertFreeCertificateContext = modcrypt32.NewProc("CertFreeCertificateContext") procCertGetCertificateChain = modcrypt32.NewProc("CertGetCertificateChain") procCertGetNameStringW = modcrypt32.NewProc("CertGetNameStringW") procCertOpenStore = modcrypt32.NewProc("CertOpenStore") procCertOpenSystemStoreW = modcrypt32.NewProc("CertOpenSystemStoreW") procCertVerifyCertificateChainPolicy = modcrypt32.NewProc("CertVerifyCertificateChainPolicy") procCryptAcquireCertificatePrivateKey = modcrypt32.NewProc("CryptAcquireCertificatePrivateKey") procCryptDecodeObject = modcrypt32.NewProc("CryptDecodeObject") procCryptProtectData = modcrypt32.NewProc("CryptProtectData") procCryptQueryObject = modcrypt32.NewProc("CryptQueryObject") procCryptUnprotectData = modcrypt32.NewProc("CryptUnprotectData") procPFXImportCertStore = modcrypt32.NewProc("PFXImportCertStore") procDnsNameCompare_W = moddnsapi.NewProc("DnsNameCompare_W") procDnsQuery_W = moddnsapi.NewProc("DnsQuery_W") procDnsRecordListFree = moddnsapi.NewProc("DnsRecordListFree") procDwmGetWindowAttribute = moddwmapi.NewProc("DwmGetWindowAttribute") procDwmSetWindowAttribute = moddwmapi.NewProc("DwmSetWindowAttribute") procGetAdaptersAddresses = modiphlpapi.NewProc("GetAdaptersAddresses") procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo") procGetBestInterfaceEx = modiphlpapi.NewProc("GetBestInterfaceEx") procGetIfEntry = modiphlpapi.NewProc("GetIfEntry") procAddDllDirectory = modkernel32.NewProc("AddDllDirectory") procAssignProcessToJobObject = modkernel32.NewProc("AssignProcessToJobObject") procCancelIo = modkernel32.NewProc("CancelIo") procCancelIoEx = modkernel32.NewProc("CancelIoEx") procClearCommBreak = modkernel32.NewProc("ClearCommBreak") procClearCommError = modkernel32.NewProc("ClearCommError") procCloseHandle = modkernel32.NewProc("CloseHandle") procClosePseudoConsole = modkernel32.NewProc("ClosePseudoConsole") procConnectNamedPipe = modkernel32.NewProc("ConnectNamedPipe") procCreateDirectoryW = modkernel32.NewProc("CreateDirectoryW") procCreateEventExW = modkernel32.NewProc("CreateEventExW") procCreateEventW = modkernel32.NewProc("CreateEventW") procCreateFileMappingW = modkernel32.NewProc("CreateFileMappingW") procCreateFileW = modkernel32.NewProc("CreateFileW") procCreateHardLinkW = modkernel32.NewProc("CreateHardLinkW") procCreateIoCompletionPort = modkernel32.NewProc("CreateIoCompletionPort") procCreateJobObjectW = modkernel32.NewProc("CreateJobObjectW") procCreateMutexExW = modkernel32.NewProc("CreateMutexExW") procCreateMutexW = modkernel32.NewProc("CreateMutexW") procCreateNamedPipeW = modkernel32.NewProc("CreateNamedPipeW") procCreatePipe = modkernel32.NewProc("CreatePipe") procCreateProcessW = modkernel32.NewProc("CreateProcessW") procCreatePseudoConsole = modkernel32.NewProc("CreatePseudoConsole") procCreateSymbolicLinkW = modkernel32.NewProc("CreateSymbolicLinkW") procCreateToolhelp32Snapshot = modkernel32.NewProc("CreateToolhelp32Snapshot") procDefineDosDeviceW = modkernel32.NewProc("DefineDosDeviceW") procDeleteFileW = modkernel32.NewProc("DeleteFileW") procDeleteProcThreadAttributeList = modkernel32.NewProc("DeleteProcThreadAttributeList") procDeleteVolumeMountPointW = modkernel32.NewProc("DeleteVolumeMountPointW") procDeviceIoControl = modkernel32.NewProc("DeviceIoControl") procDisconnectNamedPipe = modkernel32.NewProc("DisconnectNamedPipe") procDuplicateHandle = modkernel32.NewProc("DuplicateHandle") procEscapeCommFunction = modkernel32.NewProc("EscapeCommFunction") procExitProcess = modkernel32.NewProc("ExitProcess") procExpandEnvironmentStringsW = modkernel32.NewProc("ExpandEnvironmentStringsW") procFindClose = modkernel32.NewProc("FindClose") procFindCloseChangeNotification = modkernel32.NewProc("FindCloseChangeNotification") procFindFirstChangeNotificationW = modkernel32.NewProc("FindFirstChangeNotificationW") procFindFirstFileW = modkernel32.NewProc("FindFirstFileW") procFindFirstVolumeMountPointW = modkernel32.NewProc("FindFirstVolumeMountPointW") procFindFirstVolumeW = modkernel32.NewProc("FindFirstVolumeW") procFindNextChangeNotification = modkernel32.NewProc("FindNextChangeNotification") procFindNextFileW = modkernel32.NewProc("FindNextFileW") procFindNextVolumeMountPointW = modkernel32.NewProc("FindNextVolumeMountPointW") procFindNextVolumeW = modkernel32.NewProc("FindNextVolumeW") procFindResourceW = modkernel32.NewProc("FindResourceW") procFindVolumeClose = modkernel32.NewProc("FindVolumeClose") procFindVolumeMountPointClose = modkernel32.NewProc("FindVolumeMountPointClose") procFlushFileBuffers = modkernel32.NewProc("FlushFileBuffers") procFlushViewOfFile = modkernel32.NewProc("FlushViewOfFile") procFormatMessageW = modkernel32.NewProc("FormatMessageW") procFreeEnvironmentStringsW = modkernel32.NewProc("FreeEnvironmentStringsW") procFreeLibrary = modkernel32.NewProc("FreeLibrary") procGenerateConsoleCtrlEvent = modkernel32.NewProc("GenerateConsoleCtrlEvent") procGetACP = modkernel32.NewProc("GetACP") procGetActiveProcessorCount = modkernel32.NewProc("GetActiveProcessorCount") procGetCommModemStatus = modkernel32.NewProc("GetCommModemStatus") procGetCommState = modkernel32.NewProc("GetCommState") procGetCommTimeouts = modkernel32.NewProc("GetCommTimeouts") procGetCommandLineW = modkernel32.NewProc("GetCommandLineW") procGetComputerNameExW = modkernel32.NewProc("GetComputerNameExW") procGetComputerNameW = modkernel32.NewProc("GetComputerNameW") procGetConsoleMode = modkernel32.NewProc("GetConsoleMode") procGetConsoleScreenBufferInfo = modkernel32.NewProc("GetConsoleScreenBufferInfo") procGetCurrentDirectoryW = modkernel32.NewProc("GetCurrentDirectoryW") procGetCurrentProcessId = modkernel32.NewProc("GetCurrentProcessId") procGetCurrentThreadId = modkernel32.NewProc("GetCurrentThreadId") procGetDiskFreeSpaceExW = modkernel32.NewProc("GetDiskFreeSpaceExW") procGetDriveTypeW = modkernel32.NewProc("GetDriveTypeW") procGetEnvironmentStringsW = modkernel32.NewProc("GetEnvironmentStringsW") procGetEnvironmentVariableW = modkernel32.NewProc("GetEnvironmentVariableW") procGetExitCodeProcess = modkernel32.NewProc("GetExitCodeProcess") procGetFileAttributesExW = modkernel32.NewProc("GetFileAttributesExW") procGetFileAttributesW = modkernel32.NewProc("GetFileAttributesW") procGetFileInformationByHandle = modkernel32.NewProc("GetFileInformationByHandle") procGetFileInformationByHandleEx = modkernel32.NewProc("GetFileInformationByHandleEx") procGetFileTime = modkernel32.NewProc("GetFileTime") procGetFileType = modkernel32.NewProc("GetFileType") procGetFinalPathNameByHandleW = modkernel32.NewProc("GetFinalPathNameByHandleW") procGetFullPathNameW = modkernel32.NewProc("GetFullPathNameW") procGetLargePageMinimum = modkernel32.NewProc("GetLargePageMinimum") procGetLastError = modkernel32.NewProc("GetLastError") procGetLogicalDriveStringsW = modkernel32.NewProc("GetLogicalDriveStringsW") procGetLogicalDrives = modkernel32.NewProc("GetLogicalDrives") procGetLongPathNameW = modkernel32.NewProc("GetLongPathNameW") procGetMaximumProcessorCount = modkernel32.NewProc("GetMaximumProcessorCount") procGetModuleFileNameW = modkernel32.NewProc("GetModuleFileNameW") procGetModuleHandleExW = modkernel32.NewProc("GetModuleHandleExW") procGetNamedPipeHandleStateW = modkernel32.NewProc("GetNamedPipeHandleStateW") procGetNamedPipeInfo = modkernel32.NewProc("GetNamedPipeInfo") procGetOverlappedResult = modkernel32.NewProc("GetOverlappedResult") procGetPriorityClass = modkernel32.NewProc("GetPriorityClass") procGetProcAddress = modkernel32.NewProc("GetProcAddress") procGetProcessId = modkernel32.NewProc("GetProcessId") procGetProcessPreferredUILanguages = modkernel32.NewProc("GetProcessPreferredUILanguages") procGetProcessShutdownParameters = modkernel32.NewProc("GetProcessShutdownParameters") procGetProcessTimes = modkernel32.NewProc("GetProcessTimes") procGetProcessWorkingSetSizeEx = modkernel32.NewProc("GetProcessWorkingSetSizeEx") procGetQueuedCompletionStatus = modkernel32.NewProc("GetQueuedCompletionStatus") procGetShortPathNameW = modkernel32.NewProc("GetShortPathNameW") procGetStartupInfoW = modkernel32.NewProc("GetStartupInfoW") procGetStdHandle = modkernel32.NewProc("GetStdHandle") procGetSystemDirectoryW = modkernel32.NewProc("GetSystemDirectoryW") procGetSystemPreferredUILanguages = modkernel32.NewProc("GetSystemPreferredUILanguages") procGetSystemTimeAsFileTime = modkernel32.NewProc("GetSystemTimeAsFileTime") procGetSystemTimePreciseAsFileTime = modkernel32.NewProc("GetSystemTimePreciseAsFileTime") procGetSystemWindowsDirectoryW = modkernel32.NewProc("GetSystemWindowsDirectoryW") procGetTempPathW = modkernel32.NewProc("GetTempPathW") procGetThreadPreferredUILanguages = modkernel32.NewProc("GetThreadPreferredUILanguages") procGetTickCount64 = modkernel32.NewProc("GetTickCount64") procGetTimeZoneInformation = modkernel32.NewProc("GetTimeZoneInformation") procGetUserPreferredUILanguages = modkernel32.NewProc("GetUserPreferredUILanguages") procGetVersion = modkernel32.NewProc("GetVersion") procGetVolumeInformationByHandleW = modkernel32.NewProc("GetVolumeInformationByHandleW") procGetVolumeInformationW = modkernel32.NewProc("GetVolumeInformationW") procGetVolumeNameForVolumeMountPointW = modkernel32.NewProc("GetVolumeNameForVolumeMountPointW") procGetVolumePathNameW = modkernel32.NewProc("GetVolumePathNameW") procGetVolumePathNamesForVolumeNameW = modkernel32.NewProc("GetVolumePathNamesForVolumeNameW") procGetWindowsDirectoryW = modkernel32.NewProc("GetWindowsDirectoryW") procInitializeProcThreadAttributeList = modkernel32.NewProc("InitializeProcThreadAttributeList") procIsWow64Process = modkernel32.NewProc("IsWow64Process") procIsWow64Process2 = modkernel32.NewProc("IsWow64Process2") procLoadLibraryExW = modkernel32.NewProc("LoadLibraryExW") procLoadLibraryW = modkernel32.NewProc("LoadLibraryW") procLoadResource = modkernel32.NewProc("LoadResource") procLocalAlloc = modkernel32.NewProc("LocalAlloc") procLocalFree = modkernel32.NewProc("LocalFree") procLockFileEx = modkernel32.NewProc("LockFileEx") procLockResource = modkernel32.NewProc("LockResource") procMapViewOfFile = modkernel32.NewProc("MapViewOfFile") procModule32FirstW = modkernel32.NewProc("Module32FirstW") procModule32NextW = modkernel32.NewProc("Module32NextW") procMoveFileExW = modkernel32.NewProc("MoveFileExW") procMoveFileW = modkernel32.NewProc("MoveFileW") procMultiByteToWideChar = modkernel32.NewProc("MultiByteToWideChar") procOpenEventW = modkernel32.NewProc("OpenEventW") procOpenMutexW = modkernel32.NewProc("OpenMutexW") procOpenProcess = modkernel32.NewProc("OpenProcess") procOpenThread = modkernel32.NewProc("OpenThread") procPostQueuedCompletionStatus = modkernel32.NewProc("PostQueuedCompletionStatus") procProcess32FirstW = modkernel32.NewProc("Process32FirstW") procProcess32NextW = modkernel32.NewProc("Process32NextW") procProcessIdToSessionId = modkernel32.NewProc("ProcessIdToSessionId") procPulseEvent = modkernel32.NewProc("PulseEvent") procPurgeComm = modkernel32.NewProc("PurgeComm") procQueryDosDeviceW = modkernel32.NewProc("QueryDosDeviceW") procQueryFullProcessImageNameW = modkernel32.NewProc("QueryFullProcessImageNameW") procQueryInformationJobObject = modkernel32.NewProc("QueryInformationJobObject") procReadConsoleW = modkernel32.NewProc("ReadConsoleW") procReadDirectoryChangesW = modkernel32.NewProc("ReadDirectoryChangesW") procReadFile = modkernel32.NewProc("ReadFile") procReadProcessMemory = modkernel32.NewProc("ReadProcessMemory") procReleaseMutex = modkernel32.NewProc("ReleaseMutex") procRemoveDirectoryW = modkernel32.NewProc("RemoveDirectoryW") procRemoveDllDirectory = modkernel32.NewProc("RemoveDllDirectory") procResetEvent = modkernel32.NewProc("ResetEvent") procResizePseudoConsole = modkernel32.NewProc("ResizePseudoConsole") procResumeThread = modkernel32.NewProc("ResumeThread") procSetCommBreak = modkernel32.NewProc("SetCommBreak") procSetCommMask = modkernel32.NewProc("SetCommMask") procSetCommState = modkernel32.NewProc("SetCommState") procSetCommTimeouts = modkernel32.NewProc("SetCommTimeouts") procSetConsoleCursorPosition = modkernel32.NewProc("SetConsoleCursorPosition") procSetConsoleMode = modkernel32.NewProc("SetConsoleMode") procSetCurrentDirectoryW = modkernel32.NewProc("SetCurrentDirectoryW") procSetDefaultDllDirectories = modkernel32.NewProc("SetDefaultDllDirectories") procSetDllDirectoryW = modkernel32.NewProc("SetDllDirectoryW") procSetEndOfFile = modkernel32.NewProc("SetEndOfFile") procSetEnvironmentVariableW = modkernel32.NewProc("SetEnvironmentVariableW") procSetErrorMode = modkernel32.NewProc("SetErrorMode") procSetEvent = modkernel32.NewProc("SetEvent") procSetFileAttributesW = modkernel32.NewProc("SetFileAttributesW") procSetFileCompletionNotificationModes = modkernel32.NewProc("SetFileCompletionNotificationModes") procSetFileInformationByHandle = modkernel32.NewProc("SetFileInformationByHandle") procSetFilePointer = modkernel32.NewProc("SetFilePointer") procSetFileTime = modkernel32.NewProc("SetFileTime") procSetFileValidData = modkernel32.NewProc("SetFileValidData") procSetHandleInformation = modkernel32.NewProc("SetHandleInformation") procSetInformationJobObject = modkernel32.NewProc("SetInformationJobObject") procSetNamedPipeHandleState = modkernel32.NewProc("SetNamedPipeHandleState") procSetPriorityClass = modkernel32.NewProc("SetPriorityClass") procSetProcessPriorityBoost = modkernel32.NewProc("SetProcessPriorityBoost") procSetProcessShutdownParameters = modkernel32.NewProc("SetProcessShutdownParameters") procSetProcessWorkingSetSizeEx = modkernel32.NewProc("SetProcessWorkingSetSizeEx") procSetStdHandle = modkernel32.NewProc("SetStdHandle") procSetVolumeLabelW = modkernel32.NewProc("SetVolumeLabelW") procSetVolumeMountPointW = modkernel32.NewProc("SetVolumeMountPointW") procSetupComm = modkernel32.NewProc("SetupComm") procSizeofResource = modkernel32.NewProc("SizeofResource") procSleepEx = modkernel32.NewProc("SleepEx") procTerminateJobObject = modkernel32.NewProc("TerminateJobObject") procTerminateProcess = modkernel32.NewProc("TerminateProcess") procThread32First = modkernel32.NewProc("Thread32First") procThread32Next = modkernel32.NewProc("Thread32Next") procUnlockFileEx = modkernel32.NewProc("UnlockFileEx") procUnmapViewOfFile = modkernel32.NewProc("UnmapViewOfFile") procUpdateProcThreadAttribute = modkernel32.NewProc("UpdateProcThreadAttribute") procVirtualAlloc = modkernel32.NewProc("VirtualAlloc") procVirtualFree = modkernel32.NewProc("VirtualFree") procVirtualLock = modkernel32.NewProc("VirtualLock") procVirtualProtect = modkernel32.NewProc("VirtualProtect") procVirtualProtectEx = modkernel32.NewProc("VirtualProtectEx") procVirtualQuery = modkernel32.NewProc("VirtualQuery") procVirtualQueryEx = modkernel32.NewProc("VirtualQueryEx") procVirtualUnlock = modkernel32.NewProc("VirtualUnlock") procWTSGetActiveConsoleSessionId = modkernel32.NewProc("WTSGetActiveConsoleSessionId") procWaitCommEvent = modkernel32.NewProc("WaitCommEvent") procWaitForMultipleObjects = modkernel32.NewProc("WaitForMultipleObjects") procWaitForSingleObject = modkernel32.NewProc("WaitForSingleObject") procWriteConsoleW = modkernel32.NewProc("WriteConsoleW") procWriteFile = modkernel32.NewProc("WriteFile") procWriteProcessMemory = modkernel32.NewProc("WriteProcessMemory") procAcceptEx = modmswsock.NewProc("AcceptEx") procGetAcceptExSockaddrs = modmswsock.NewProc("GetAcceptExSockaddrs") procTransmitFile = modmswsock.NewProc("TransmitFile") procNetApiBufferFree = modnetapi32.NewProc("NetApiBufferFree") procNetGetJoinInformation = modnetapi32.NewProc("NetGetJoinInformation") procNetUserEnum = modnetapi32.NewProc("NetUserEnum") procNetUserGetInfo = modnetapi32.NewProc("NetUserGetInfo") procNtCreateFile = modntdll.NewProc("NtCreateFile") procNtCreateNamedPipeFile = modntdll.NewProc("NtCreateNamedPipeFile") procNtQueryInformationProcess = modntdll.NewProc("NtQueryInformationProcess") procNtQuerySystemInformation = modntdll.NewProc("NtQuerySystemInformation") procNtSetInformationFile = modntdll.NewProc("NtSetInformationFile") procNtSetInformationProcess = modntdll.NewProc("NtSetInformationProcess") procNtSetSystemInformation = modntdll.NewProc("NtSetSystemInformation") procRtlAddFunctionTable = modntdll.NewProc("RtlAddFunctionTable") procRtlDefaultNpAcl = modntdll.NewProc("RtlDefaultNpAcl") procRtlDeleteFunctionTable = modntdll.NewProc("RtlDeleteFunctionTable") procRtlDosPathNameToNtPathName_U_WithStatus = modntdll.NewProc("RtlDosPathNameToNtPathName_U_WithStatus") procRtlDosPathNameToRelativeNtPathName_U_WithStatus = modntdll.NewProc("RtlDosPathNameToRelativeNtPathName_U_WithStatus") procRtlGetCurrentPeb = modntdll.NewProc("RtlGetCurrentPeb") procRtlGetNtVersionNumbers = modntdll.NewProc("RtlGetNtVersionNumbers") procRtlGetVersion = modntdll.NewProc("RtlGetVersion") procRtlInitString = modntdll.NewProc("RtlInitString") procRtlInitUnicodeString = modntdll.NewProc("RtlInitUnicodeString") procRtlNtStatusToDosErrorNoTeb = modntdll.NewProc("RtlNtStatusToDosErrorNoTeb") procCLSIDFromString = modole32.NewProc("CLSIDFromString") procCoCreateGuid = modole32.NewProc("CoCreateGuid") procCoGetObject = modole32.NewProc("CoGetObject") procCoInitializeEx = modole32.NewProc("CoInitializeEx") procCoTaskMemFree = modole32.NewProc("CoTaskMemFree") procCoUninitialize = modole32.NewProc("CoUninitialize") procStringFromGUID2 = modole32.NewProc("StringFromGUID2") procEnumProcessModules = modpsapi.NewProc("EnumProcessModules") procEnumProcessModulesEx = modpsapi.NewProc("EnumProcessModulesEx") procEnumProcesses = modpsapi.NewProc("EnumProcesses") procGetModuleBaseNameW = modpsapi.NewProc("GetModuleBaseNameW") procGetModuleFileNameExW = modpsapi.NewProc("GetModuleFileNameExW") procGetModuleInformation = modpsapi.NewProc("GetModuleInformation") procQueryWorkingSetEx = modpsapi.NewProc("QueryWorkingSetEx") procSubscribeServiceChangeNotifications = modsechost.NewProc("SubscribeServiceChangeNotifications") procUnsubscribeServiceChangeNotifications = modsechost.NewProc("UnsubscribeServiceChangeNotifications") procGetUserNameExW = modsecur32.NewProc("GetUserNameExW") procTranslateNameW = modsecur32.NewProc("TranslateNameW") procSetupDiBuildDriverInfoList = modsetupapi.NewProc("SetupDiBuildDriverInfoList") procSetupDiCallClassInstaller = modsetupapi.NewProc("SetupDiCallClassInstaller") procSetupDiCancelDriverInfoSearch = modsetupapi.NewProc("SetupDiCancelDriverInfoSearch") procSetupDiClassGuidsFromNameExW = modsetupapi.NewProc("SetupDiClassGuidsFromNameExW") procSetupDiClassNameFromGuidExW = modsetupapi.NewProc("SetupDiClassNameFromGuidExW") procSetupDiCreateDeviceInfoListExW = modsetupapi.NewProc("SetupDiCreateDeviceInfoListExW") procSetupDiCreateDeviceInfoW = modsetupapi.NewProc("SetupDiCreateDeviceInfoW") procSetupDiDestroyDeviceInfoList = modsetupapi.NewProc("SetupDiDestroyDeviceInfoList") procSetupDiDestroyDriverInfoList = modsetupapi.NewProc("SetupDiDestroyDriverInfoList") procSetupDiEnumDeviceInfo = modsetupapi.NewProc("SetupDiEnumDeviceInfo") procSetupDiEnumDriverInfoW = modsetupapi.NewProc("SetupDiEnumDriverInfoW") procSetupDiGetClassDevsExW = modsetupapi.NewProc("SetupDiGetClassDevsExW") procSetupDiGetClassInstallParamsW = modsetupapi.NewProc("SetupDiGetClassInstallParamsW") procSetupDiGetDeviceInfoListDetailW = modsetupapi.NewProc("SetupDiGetDeviceInfoListDetailW") procSetupDiGetDeviceInstallParamsW = modsetupapi.NewProc("SetupDiGetDeviceInstallParamsW") procSetupDiGetDeviceInstanceIdW = modsetupapi.NewProc("SetupDiGetDeviceInstanceIdW") procSetupDiGetDevicePropertyW = modsetupapi.NewProc("SetupDiGetDevicePropertyW") procSetupDiGetDeviceRegistryPropertyW = modsetupapi.NewProc("SetupDiGetDeviceRegistryPropertyW") procSetupDiGetDriverInfoDetailW = modsetupapi.NewProc("SetupDiGetDriverInfoDetailW") procSetupDiGetSelectedDevice = modsetupapi.NewProc("SetupDiGetSelectedDevice") procSetupDiGetSelectedDriverW = modsetupapi.NewProc("SetupDiGetSelectedDriverW") procSetupDiOpenDevRegKey = modsetupapi.NewProc("SetupDiOpenDevRegKey") procSetupDiSetClassInstallParamsW = modsetupapi.NewProc("SetupDiSetClassInstallParamsW") procSetupDiSetDeviceInstallParamsW = modsetupapi.NewProc("SetupDiSetDeviceInstallParamsW") procSetupDiSetDeviceRegistryPropertyW = modsetupapi.NewProc("SetupDiSetDeviceRegistryPropertyW") procSetupDiSetSelectedDevice = modsetupapi.NewProc("SetupDiSetSelectedDevice") procSetupDiSetSelectedDriverW = modsetupapi.NewProc("SetupDiSetSelectedDriverW") procSetupUninstallOEMInfW = modsetupapi.NewProc("SetupUninstallOEMInfW") procCommandLineToArgvW = modshell32.NewProc("CommandLineToArgvW") procSHGetKnownFolderPath = modshell32.NewProc("SHGetKnownFolderPath") procShellExecuteW = modshell32.NewProc("ShellExecuteW") procEnumChildWindows = moduser32.NewProc("EnumChildWindows") procEnumWindows = moduser32.NewProc("EnumWindows") procExitWindowsEx = moduser32.NewProc("ExitWindowsEx") procGetClassNameW = moduser32.NewProc("GetClassNameW") procGetDesktopWindow = moduser32.NewProc("GetDesktopWindow") procGetForegroundWindow = moduser32.NewProc("GetForegroundWindow") procGetGUIThreadInfo = moduser32.NewProc("GetGUIThreadInfo") procGetKeyboardLayout = moduser32.NewProc("GetKeyboardLayout") procGetShellWindow = moduser32.NewProc("GetShellWindow") procGetWindowThreadProcessId = moduser32.NewProc("GetWindowThreadProcessId") procIsWindow = moduser32.NewProc("IsWindow") procIsWindowUnicode = moduser32.NewProc("IsWindowUnicode") procIsWindowVisible = moduser32.NewProc("IsWindowVisible") procLoadKeyboardLayoutW = moduser32.NewProc("LoadKeyboardLayoutW") procMessageBoxW = moduser32.NewProc("MessageBoxW") procToUnicodeEx = moduser32.NewProc("ToUnicodeEx") procUnloadKeyboardLayout = moduser32.NewProc("UnloadKeyboardLayout") procCreateEnvironmentBlock = moduserenv.NewProc("CreateEnvironmentBlock") procDestroyEnvironmentBlock = moduserenv.NewProc("DestroyEnvironmentBlock") procGetUserProfileDirectoryW = moduserenv.NewProc("GetUserProfileDirectoryW") procGetFileVersionInfoSizeW = modversion.NewProc("GetFileVersionInfoSizeW") procGetFileVersionInfoW = modversion.NewProc("GetFileVersionInfoW") procVerQueryValueW = modversion.NewProc("VerQueryValueW") proctimeBeginPeriod = modwinmm.NewProc("timeBeginPeriod") proctimeEndPeriod = modwinmm.NewProc("timeEndPeriod") procWinVerifyTrustEx = modwintrust.NewProc("WinVerifyTrustEx") procFreeAddrInfoW = modws2_32.NewProc("FreeAddrInfoW") procGetAddrInfoW = modws2_32.NewProc("GetAddrInfoW") procWSACleanup = modws2_32.NewProc("WSACleanup") procWSAEnumProtocolsW = modws2_32.NewProc("WSAEnumProtocolsW") procWSAGetOverlappedResult = modws2_32.NewProc("WSAGetOverlappedResult") procWSAIoctl = modws2_32.NewProc("WSAIoctl") procWSALookupServiceBeginW = modws2_32.NewProc("WSALookupServiceBeginW") procWSALookupServiceEnd = modws2_32.NewProc("WSALookupServiceEnd") procWSALookupServiceNextW = modws2_32.NewProc("WSALookupServiceNextW") procWSARecv = modws2_32.NewProc("WSARecv") procWSARecvFrom = modws2_32.NewProc("WSARecvFrom") procWSASend = modws2_32.NewProc("WSASend") procWSASendTo = modws2_32.NewProc("WSASendTo") procWSASocketW = modws2_32.NewProc("WSASocketW") procWSAStartup = modws2_32.NewProc("WSAStartup") procbind = modws2_32.NewProc("bind") procclosesocket = modws2_32.NewProc("closesocket") procconnect = modws2_32.NewProc("connect") procgethostbyname = modws2_32.NewProc("gethostbyname") procgetpeername = modws2_32.NewProc("getpeername") procgetprotobyname = modws2_32.NewProc("getprotobyname") procgetservbyname = modws2_32.NewProc("getservbyname") procgetsockname = modws2_32.NewProc("getsockname") procgetsockopt = modws2_32.NewProc("getsockopt") proclisten = modws2_32.NewProc("listen") procntohs = modws2_32.NewProc("ntohs") procrecvfrom = modws2_32.NewProc("recvfrom") procsendto = modws2_32.NewProc("sendto") procsetsockopt = modws2_32.NewProc("setsockopt") procshutdown = modws2_32.NewProc("shutdown") procsocket = modws2_32.NewProc("socket") procWTSEnumerateSessionsW = modwtsapi32.NewProc("WTSEnumerateSessionsW") procWTSFreeMemory = modwtsapi32.NewProc("WTSFreeMemory") procWTSQueryUserToken = modwtsapi32.NewProc("WTSQueryUserToken") ) func cm_Get_DevNode_Status(status *uint32, problemNumber *uint32, devInst DEVINST, flags uint32) (ret CONFIGRET) { r0, _, _ := syscall.Syscall6(procCM_Get_DevNode_Status.Addr(), 4, uintptr(unsafe.Pointer(status)), uintptr(unsafe.Pointer(problemNumber)), uintptr(devInst), uintptr(flags), 0, 0) ret = CONFIGRET(r0) return } func cm_Get_Device_Interface_List(interfaceClass *GUID, deviceID *uint16, buffer *uint16, bufferLen uint32, flags uint32) (ret CONFIGRET) { r0, _, _ := syscall.Syscall6(procCM_Get_Device_Interface_ListW.Addr(), 5, uintptr(unsafe.Pointer(interfaceClass)), uintptr(unsafe.Pointer(deviceID)), uintptr(unsafe.Pointer(buffer)), uintptr(bufferLen), uintptr(flags), 0) ret = CONFIGRET(r0) return } func cm_Get_Device_Interface_List_Size(len *uint32, interfaceClass *GUID, deviceID *uint16, flags uint32) (ret CONFIGRET) { r0, _, _ := syscall.Syscall6(procCM_Get_Device_Interface_List_SizeW.Addr(), 4, uintptr(unsafe.Pointer(len)), uintptr(unsafe.Pointer(interfaceClass)), uintptr(unsafe.Pointer(deviceID)), uintptr(flags), 0, 0) ret = CONFIGRET(r0) return } func cm_MapCrToWin32Err(configRet CONFIGRET, defaultWin32Error Errno) (ret Errno) { r0, _, _ := syscall.Syscall(procCM_MapCrToWin32Err.Addr(), 2, uintptr(configRet), uintptr(defaultWin32Error), 0) ret = Errno(r0) return } func AdjustTokenGroups(token Token, resetToDefault bool, newstate *Tokengroups, buflen uint32, prevstate *Tokengroups, returnlen *uint32) (err error) { var _p0 uint32 if resetToDefault { _p0 = 1 } r1, _, e1 := syscall.Syscall6(procAdjustTokenGroups.Addr(), 6, uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(newstate)), uintptr(buflen), uintptr(unsafe.Pointer(prevstate)), uintptr(unsafe.Pointer(returnlen))) if r1 == 0 { err = errnoErr(e1) } return } func AdjustTokenPrivileges(token Token, disableAllPrivileges bool, newstate *Tokenprivileges, buflen uint32, prevstate *Tokenprivileges, returnlen *uint32) (err error) { var _p0 uint32 if disableAllPrivileges { _p0 = 1 } r1, _, e1 := syscall.Syscall6(procAdjustTokenPrivileges.Addr(), 6, uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(newstate)), uintptr(buflen), uintptr(unsafe.Pointer(prevstate)), uintptr(unsafe.Pointer(returnlen))) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func buildSecurityDescriptor(owner *TRUSTEE, group *TRUSTEE, countAccessEntries uint32, accessEntries *EXPLICIT_ACCESS, countAuditEntries uint32, auditEntries *EXPLICIT_ACCESS, oldSecurityDescriptor *SECURITY_DESCRIPTOR, sizeNewSecurityDescriptor *uint32, newSecurityDescriptor **SECURITY_DESCRIPTOR) (ret error) { r0, _, _ := syscall.Syscall9(procBuildSecurityDescriptorW.Addr(), 9, uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(countAccessEntries), uintptr(unsafe.Pointer(accessEntries)), uintptr(countAuditEntries), uintptr(unsafe.Pointer(auditEntries)), uintptr(unsafe.Pointer(oldSecurityDescriptor)), uintptr(unsafe.Pointer(sizeNewSecurityDescriptor)), uintptr(unsafe.Pointer(newSecurityDescriptor))) if r0 != 0 { ret = syscall.Errno(r0) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func checkTokenMembership(tokenHandle Token, sidToCheck *SID, isMember *int32) (err error) { r1, _, e1 := syscall.Syscall(procCheckTokenMembership.Addr(), 3, uintptr(tokenHandle), uintptr(unsafe.Pointer(sidToCheck)), uintptr(unsafe.Pointer(isMember))) if r1 == 0 { err = errnoErr(e1) } return } func CloseServiceHandle(handle Handle) (err error) { r1, _, e1 := syscall.Syscall(procCloseServiceHandle.Addr(), 1, uintptr(handle), 0, 0) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func convertSecurityDescriptorToStringSecurityDescriptor(sd *SECURITY_DESCRIPTOR, revision uint32, securityInformation SECURITY_INFORMATION, str **uint16, strLen *uint32) (err error) { r1, _, e1 := syscall.Syscall6(procConvertSecurityDescriptorToStringSecurityDescriptorW.Addr(), 5, uintptr(unsafe.Pointer(sd)), uintptr(revision), uintptr(securityInformation), uintptr(unsafe.Pointer(str)), uintptr(unsafe.Pointer(strLen)), 0) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func convertStringSecurityDescriptorToSecurityDescriptor(str string, revision uint32, sd **SECURITY_DESCRIPTOR, size *uint32) (err error) { var _p0 *uint16 _p0, err = syscall.UTF16PtrFromString(str) if err != nil { return } return _convertStringSecurityDescriptorToSecurityDescriptor(_p0, revision, sd, size) } func _convertStringSecurityDescriptorToSecurityDescriptor(str *uint16, revision uint32, sd **SECURITY_DESCRIPTOR, size *uint32) (err error) { r1, _, e1 := syscall.Syscall6(procConvertStringSecurityDescriptorToSecurityDescriptorW.Addr(), 4, uintptr(unsafe.Pointer(str)), uintptr(revision), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(size)), 0, 0) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func CreateProcessAsUser(token Token, 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 } r1, _, e1 := syscall.Syscall12(procCreateProcessAsUserW.Addr(), 11, uintptr(token), 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) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func createWellKnownSid(sidType WELL_KNOWN_SID_TYPE, domainSid *SID, sid *SID, sizeSid *uint32) (err error) { r1, _, e1 := syscall.Syscall6(procCreateWellKnownSid.Addr(), 4, uintptr(sidType), uintptr(unsafe.Pointer(domainSid)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sizeSid)), 0, 0) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func CryptReleaseContext(provhandle Handle, flags uint32) (err error) { r1, _, e1 := syscall.Syscall(procCryptReleaseContext.Addr(), 2, uintptr(provhandle), uintptr(flags), 0) if r1 == 0 { err = errnoErr(e1) } return } func DeleteService(service Handle) (err error) { r1, _, e1 := syscall.Syscall(procDeleteService.Addr(), 1, uintptr(service), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func DeregisterEventSource(handle Handle) (err error) { r1, _, e1 := syscall.Syscall(procDeregisterEventSource.Addr(), 1, uintptr(handle), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func DuplicateTokenEx(existingToken Token, desiredAccess uint32, tokenAttributes *SecurityAttributes, impersonationLevel uint32, tokenType uint32, newToken *Token) (err error) { r1, _, e1 := syscall.Syscall6(procDuplicateTokenEx.Addr(), 6, uintptr(existingToken), uintptr(desiredAccess), uintptr(unsafe.Pointer(tokenAttributes)), uintptr(impersonationLevel), uintptr(tokenType), uintptr(unsafe.Pointer(newToken))) if r1 == 0 { err = errnoErr(e1) } return } func EnumDependentServices(service Handle, activityState uint32, services *ENUM_SERVICE_STATUS, buffSize uint32, bytesNeeded *uint32, servicesReturned *uint32) (err error) { r1, _, e1 := syscall.Syscall6(procEnumDependentServicesW.Addr(), 6, uintptr(service), uintptr(activityState), uintptr(unsafe.Pointer(services)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), uintptr(unsafe.Pointer(servicesReturned))) if r1 == 0 { err = errnoErr(e1) } return } func EnumServicesStatusEx(mgr Handle, infoLevel uint32, serviceType uint32, serviceState uint32, services *byte, bufSize uint32, bytesNeeded *uint32, servicesReturned *uint32, resumeHandle *uint32, groupName *uint16) (err error) { r1, _, e1 := syscall.Syscall12(procEnumServicesStatusExW.Addr(), 10, uintptr(mgr), uintptr(infoLevel), uintptr(serviceType), uintptr(serviceState), uintptr(unsafe.Pointer(services)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), uintptr(unsafe.Pointer(servicesReturned)), uintptr(unsafe.Pointer(resumeHandle)), uintptr(unsafe.Pointer(groupName)), 0, 0) if r1 == 0 { err = errnoErr(e1) } 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 FreeSid(sid *SID) (err error) { r1, _, e1 := syscall.Syscall(procFreeSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0) if r1 != 0 { err = errnoErr(e1) } return } func GetAce(acl *ACL, aceIndex uint32, pAce **ACCESS_ALLOWED_ACE) (err error) { r1, _, e1 := syscall.Syscall(procGetAce.Addr(), 3, uintptr(unsafe.Pointer(acl)), uintptr(aceIndex), uintptr(unsafe.Pointer(pAce))) if r1 == 0 { err = errnoErr(e1) } return } func GetLengthSid(sid *SID) (len uint32) { r0, _, _ := syscall.Syscall(procGetLengthSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0) len = uint32(r0) return } func getNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) { var _p0 *uint16 _p0, ret = syscall.UTF16PtrFromString(objectName) if ret != nil { return } return _getNamedSecurityInfo(_p0, objectType, securityInformation, owner, group, dacl, sacl, sd) } func _getNamedSecurityInfo(objectName *uint16, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) { r0, _, _ := syscall.Syscall9(procGetNamedSecurityInfoW.Addr(), 8, uintptr(unsafe.Pointer(objectName)), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(sd)), 0) if r0 != 0 { ret = syscall.Errno(r0) } return } func getSecurityDescriptorControl(sd *SECURITY_DESCRIPTOR, control *SECURITY_DESCRIPTOR_CONTROL, revision *uint32) (err error) { r1, _, e1 := syscall.Syscall(procGetSecurityDescriptorControl.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(control)), uintptr(unsafe.Pointer(revision))) if r1 == 0 { err = errnoErr(e1) } return } func getSecurityDescriptorDacl(sd *SECURITY_DESCRIPTOR, daclPresent *bool, dacl **ACL, daclDefaulted *bool) (err error) { var _p0 uint32 if *daclPresent { _p0 = 1 } var _p1 uint32 if *daclDefaulted { _p1 = 1 } r1, _, e1 := syscall.Syscall6(procGetSecurityDescriptorDacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(&_p0)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(&_p1)), 0, 0) *daclPresent = _p0 != 0 *daclDefaulted = _p1 != 0 if r1 == 0 { err = errnoErr(e1) } return } func getSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group **SID, groupDefaulted *bool) (err error) { var _p0 uint32 if *groupDefaulted { _p0 = 1 } r1, _, e1 := syscall.Syscall(procGetSecurityDescriptorGroup.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(&_p0))) *groupDefaulted = _p0 != 0 if r1 == 0 { err = errnoErr(e1) } return } func getSecurityDescriptorLength(sd *SECURITY_DESCRIPTOR) (len uint32) { r0, _, _ := syscall.Syscall(procGetSecurityDescriptorLength.Addr(), 1, uintptr(unsafe.Pointer(sd)), 0, 0) len = uint32(r0) return } func getSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner **SID, ownerDefaulted *bool) (err error) { var _p0 uint32 if *ownerDefaulted { _p0 = 1 } r1, _, e1 := syscall.Syscall(procGetSecurityDescriptorOwner.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(&_p0))) *ownerDefaulted = _p0 != 0 if r1 == 0 { err = errnoErr(e1) } return } func getSecurityDescriptorRMControl(sd *SECURITY_DESCRIPTOR, rmControl *uint8) (ret error) { r0, _, _ := syscall.Syscall(procGetSecurityDescriptorRMControl.Addr(), 2, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(rmControl)), 0) if r0 != 0 { ret = syscall.Errno(r0) } return } func getSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent *bool, sacl **ACL, saclDefaulted *bool) (err error) { var _p0 uint32 if *saclPresent { _p0 = 1 } var _p1 uint32 if *saclDefaulted { _p1 = 1 } r1, _, e1 := syscall.Syscall6(procGetSecurityDescriptorSacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(&_p0)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(&_p1)), 0, 0) *saclPresent = _p0 != 0 *saclDefaulted = _p1 != 0 if r1 == 0 { err = errnoErr(e1) } return } func getSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner **SID, group **SID, dacl **ACL, sacl **ACL, sd **SECURITY_DESCRIPTOR) (ret error) { r0, _, _ := syscall.Syscall9(procGetSecurityInfo.Addr(), 8, uintptr(handle), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(sd)), 0) if r0 != 0 { ret = syscall.Errno(r0) } return } func getSidIdentifierAuthority(sid *SID) (authority *SidIdentifierAuthority) { r0, _, _ := syscall.Syscall(procGetSidIdentifierAuthority.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0) authority = (*SidIdentifierAuthority)(unsafe.Pointer(r0)) return } func getSidSubAuthority(sid *SID, index uint32) (subAuthority *uint32) { r0, _, _ := syscall.Syscall(procGetSidSubAuthority.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(index), 0) subAuthority = (*uint32)(unsafe.Pointer(r0)) return } func getSidSubAuthorityCount(sid *SID) (count *uint8) { r0, _, _ := syscall.Syscall(procGetSidSubAuthorityCount.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0) count = (*uint8)(unsafe.Pointer(r0)) return } func GetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint32, returnedLen *uint32) (err error) { r1, _, e1 := syscall.Syscall6(procGetTokenInformation.Addr(), 5, uintptr(token), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen), uintptr(unsafe.Pointer(returnedLen)), 0) if r1 == 0 { err = errnoErr(e1) } return } func ImpersonateSelf(impersonationlevel uint32) (err error) { r1, _, e1 := syscall.Syscall(procImpersonateSelf.Addr(), 1, uintptr(impersonationlevel), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func initializeSecurityDescriptor(absoluteSD *SECURITY_DESCRIPTOR, revision uint32) (err error) { r1, _, e1 := syscall.Syscall(procInitializeSecurityDescriptor.Addr(), 2, uintptr(unsafe.Pointer(absoluteSD)), uintptr(revision), 0) if r1 == 0 { err = errnoErr(e1) } return } func InitiateSystemShutdownEx(machineName *uint16, message *uint16, timeout uint32, forceAppsClosed bool, rebootAfterShutdown bool, reason uint32) (err error) { var _p0 uint32 if forceAppsClosed { _p0 = 1 } var _p1 uint32 if rebootAfterShutdown { _p1 = 1 } r1, _, e1 := syscall.Syscall6(procInitiateSystemShutdownExW.Addr(), 6, uintptr(unsafe.Pointer(machineName)), uintptr(unsafe.Pointer(message)), uintptr(timeout), uintptr(_p0), uintptr(_p1), uintptr(reason)) if r1 == 0 { err = errnoErr(e1) } return } func isTokenRestricted(tokenHandle Token) (ret bool, err error) { r0, _, e1 := syscall.Syscall(procIsTokenRestricted.Addr(), 1, uintptr(tokenHandle), 0, 0) ret = r0 != 0 if !ret { err = errnoErr(e1) } return } func isValidSecurityDescriptor(sd *SECURITY_DESCRIPTOR) (isValid bool) { r0, _, _ := syscall.Syscall(procIsValidSecurityDescriptor.Addr(), 1, uintptr(unsafe.Pointer(sd)), 0, 0) isValid = r0 != 0 return } func isValidSid(sid *SID) (isValid bool) { r0, _, _ := syscall.Syscall(procIsValidSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0) isValid = r0 != 0 return } func isWellKnownSid(sid *SID, sidType WELL_KNOWN_SID_TYPE) (isWellKnown bool) { r0, _, _ := syscall.Syscall(procIsWellKnownSid.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(sidType), 0) isWellKnown = r0 != 0 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func LookupPrivilegeValue(systemname *uint16, name *uint16, luid *LUID) (err error) { r1, _, e1 := syscall.Syscall(procLookupPrivilegeValueW.Addr(), 3, uintptr(unsafe.Pointer(systemname)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(luid))) if r1 == 0 { err = errnoErr(e1) } return } func makeAbsoluteSD(selfRelativeSD *SECURITY_DESCRIPTOR, absoluteSD *SECURITY_DESCRIPTOR, absoluteSDSize *uint32, dacl *ACL, daclSize *uint32, sacl *ACL, saclSize *uint32, owner *SID, ownerSize *uint32, group *SID, groupSize *uint32) (err error) { r1, _, e1 := syscall.Syscall12(procMakeAbsoluteSD.Addr(), 11, uintptr(unsafe.Pointer(selfRelativeSD)), uintptr(unsafe.Pointer(absoluteSD)), uintptr(unsafe.Pointer(absoluteSDSize)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(daclSize)), uintptr(unsafe.Pointer(sacl)), uintptr(unsafe.Pointer(saclSize)), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(ownerSize)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(groupSize)), 0) if r1 == 0 { err = errnoErr(e1) } return } func makeSelfRelativeSD(absoluteSD *SECURITY_DESCRIPTOR, selfRelativeSD *SECURITY_DESCRIPTOR, selfRelativeSDSize *uint32) (err error) { r1, _, e1 := syscall.Syscall(procMakeSelfRelativeSD.Addr(), 3, uintptr(unsafe.Pointer(absoluteSD)), uintptr(unsafe.Pointer(selfRelativeSD)), uintptr(unsafe.Pointer(selfRelativeSDSize))) if r1 == 0 { err = errnoErr(e1) } return } func NotifyServiceStatusChange(service Handle, notifyMask uint32, notifier *SERVICE_NOTIFY) (ret error) { r0, _, _ := syscall.Syscall(procNotifyServiceStatusChangeW.Addr(), 3, uintptr(service), uintptr(notifyMask), uintptr(unsafe.Pointer(notifier))) if r0 != 0 { ret = syscall.Errno(r0) } return } func OpenProcessToken(process Handle, access uint32, token *Token) (err error) { r1, _, e1 := syscall.Syscall(procOpenProcessToken.Addr(), 3, uintptr(process), uintptr(access), uintptr(unsafe.Pointer(token))) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func OpenThreadToken(thread Handle, access uint32, openAsSelf bool, token *Token) (err error) { var _p0 uint32 if openAsSelf { _p0 = 1 } r1, _, e1 := syscall.Syscall6(procOpenThreadToken.Addr(), 4, uintptr(thread), uintptr(access), uintptr(_p0), uintptr(unsafe.Pointer(token)), 0, 0) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func QueryServiceDynamicInformation(service Handle, infoLevel uint32, dynamicInfo unsafe.Pointer) (err error) { err = procQueryServiceDynamicInformation.Find() if err != nil { return } r1, _, e1 := syscall.Syscall(procQueryServiceDynamicInformation.Addr(), 3, uintptr(service), uintptr(infoLevel), uintptr(dynamicInfo)) if r1 == 0 { err = errnoErr(e1) } return } func QueryServiceLockStatus(mgr Handle, lockStatus *QUERY_SERVICE_LOCK_STATUS, bufSize uint32, bytesNeeded *uint32) (err error) { r1, _, e1 := syscall.Syscall6(procQueryServiceLockStatusW.Addr(), 4, uintptr(mgr), uintptr(unsafe.Pointer(lockStatus)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), 0, 0) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func QueryServiceStatusEx(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) { r1, _, e1 := syscall.Syscall6(procQueryServiceStatusEx.Addr(), 5, uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(buff)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), 0) if r1 == 0 { err = errnoErr(e1) } 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 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 RegNotifyChangeKeyValue(key Handle, watchSubtree bool, notifyFilter uint32, event Handle, asynchronous bool) (regerrno error) { var _p0 uint32 if watchSubtree { _p0 = 1 } var _p1 uint32 if asynchronous { _p1 = 1 } r0, _, _ := syscall.Syscall6(procRegNotifyChangeKeyValue.Addr(), 5, uintptr(key), uintptr(_p0), uintptr(notifyFilter), uintptr(event), uintptr(_p1), 0) if r0 != 0 { regerrno = syscall.Errno(r0) } 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 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 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 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 { err = errnoErr(e1) } return } func RegisterServiceCtrlHandlerEx(serviceName *uint16, handlerProc uintptr, context uintptr) (handle Handle, err error) { r0, _, e1 := syscall.Syscall(procRegisterServiceCtrlHandlerExW.Addr(), 3, uintptr(unsafe.Pointer(serviceName)), uintptr(handlerProc), uintptr(context)) handle = Handle(r0) if handle == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func RevertToSelf() (err error) { r1, _, e1 := syscall.Syscall(procRevertToSelf.Addr(), 0, 0, 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func setEntriesInAcl(countExplicitEntries uint32, explicitEntries *EXPLICIT_ACCESS, oldACL *ACL, newACL **ACL) (ret error) { r0, _, _ := syscall.Syscall6(procSetEntriesInAclW.Addr(), 4, uintptr(countExplicitEntries), uintptr(unsafe.Pointer(explicitEntries)), uintptr(unsafe.Pointer(oldACL)), uintptr(unsafe.Pointer(newACL)), 0, 0) if r0 != 0 { ret = syscall.Errno(r0) } return } func SetKernelObjectSecurity(handle Handle, securityInformation SECURITY_INFORMATION, securityDescriptor *SECURITY_DESCRIPTOR) (err error) { r1, _, e1 := syscall.Syscall(procSetKernelObjectSecurity.Addr(), 3, uintptr(handle), uintptr(securityInformation), uintptr(unsafe.Pointer(securityDescriptor))) if r1 == 0 { err = errnoErr(e1) } return } func SetNamedSecurityInfo(objectName string, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) { var _p0 *uint16 _p0, ret = syscall.UTF16PtrFromString(objectName) if ret != nil { return } return _SetNamedSecurityInfo(_p0, objectType, securityInformation, owner, group, dacl, sacl) } func _SetNamedSecurityInfo(objectName *uint16, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) { r0, _, _ := syscall.Syscall9(procSetNamedSecurityInfoW.Addr(), 7, uintptr(unsafe.Pointer(objectName)), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), 0, 0) if r0 != 0 { ret = syscall.Errno(r0) } return } func setSecurityDescriptorControl(sd *SECURITY_DESCRIPTOR, controlBitsOfInterest SECURITY_DESCRIPTOR_CONTROL, controlBitsToSet SECURITY_DESCRIPTOR_CONTROL) (err error) { r1, _, e1 := syscall.Syscall(procSetSecurityDescriptorControl.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(controlBitsOfInterest), uintptr(controlBitsToSet)) if r1 == 0 { err = errnoErr(e1) } return } func setSecurityDescriptorDacl(sd *SECURITY_DESCRIPTOR, daclPresent bool, dacl *ACL, daclDefaulted bool) (err error) { var _p0 uint32 if daclPresent { _p0 = 1 } var _p1 uint32 if daclDefaulted { _p1 = 1 } r1, _, e1 := syscall.Syscall6(procSetSecurityDescriptorDacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(_p0), uintptr(unsafe.Pointer(dacl)), uintptr(_p1), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func setSecurityDescriptorGroup(sd *SECURITY_DESCRIPTOR, group *SID, groupDefaulted bool) (err error) { var _p0 uint32 if groupDefaulted { _p0 = 1 } r1, _, e1 := syscall.Syscall(procSetSecurityDescriptorGroup.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(group)), uintptr(_p0)) if r1 == 0 { err = errnoErr(e1) } return } func setSecurityDescriptorOwner(sd *SECURITY_DESCRIPTOR, owner *SID, ownerDefaulted bool) (err error) { var _p0 uint32 if ownerDefaulted { _p0 = 1 } r1, _, e1 := syscall.Syscall(procSetSecurityDescriptorOwner.Addr(), 3, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(owner)), uintptr(_p0)) if r1 == 0 { err = errnoErr(e1) } return } func setSecurityDescriptorRMControl(sd *SECURITY_DESCRIPTOR, rmControl *uint8) { syscall.Syscall(procSetSecurityDescriptorRMControl.Addr(), 2, uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(rmControl)), 0) return } func setSecurityDescriptorSacl(sd *SECURITY_DESCRIPTOR, saclPresent bool, sacl *ACL, saclDefaulted bool) (err error) { var _p0 uint32 if saclPresent { _p0 = 1 } var _p1 uint32 if saclDefaulted { _p1 = 1 } r1, _, e1 := syscall.Syscall6(procSetSecurityDescriptorSacl.Addr(), 4, uintptr(unsafe.Pointer(sd)), uintptr(_p0), uintptr(unsafe.Pointer(sacl)), uintptr(_p1), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func SetSecurityInfo(handle Handle, objectType SE_OBJECT_TYPE, securityInformation SECURITY_INFORMATION, owner *SID, group *SID, dacl *ACL, sacl *ACL) (ret error) { r0, _, _ := syscall.Syscall9(procSetSecurityInfo.Addr(), 7, uintptr(handle), uintptr(objectType), uintptr(securityInformation), uintptr(unsafe.Pointer(owner)), uintptr(unsafe.Pointer(group)), uintptr(unsafe.Pointer(dacl)), uintptr(unsafe.Pointer(sacl)), 0, 0) if r0 != 0 { ret = syscall.Errno(r0) } 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 { err = errnoErr(e1) } return } func SetThreadToken(thread *Handle, token Token) (err error) { r1, _, e1 := syscall.Syscall(procSetThreadToken.Addr(), 2, uintptr(unsafe.Pointer(thread)), uintptr(token), 0) if r1 == 0 { err = errnoErr(e1) } return } func SetTokenInformation(token Token, infoClass uint32, info *byte, infoLen uint32) (err error) { r1, _, e1 := syscall.Syscall6(procSetTokenInformation.Addr(), 4, uintptr(token), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen), 0, 0) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func CertCloseStore(store Handle, flags uint32) (err error) { r1, _, e1 := syscall.Syscall(procCertCloseStore.Addr(), 2, uintptr(store), uintptr(flags), 0) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func CertDeleteCertificateFromStore(certContext *CertContext) (err error) { r1, _, e1 := syscall.Syscall(procCertDeleteCertificateFromStore.Addr(), 1, uintptr(unsafe.Pointer(certContext)), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func CertDuplicateCertificateContext(certContext *CertContext) (dupContext *CertContext) { r0, _, _ := syscall.Syscall(procCertDuplicateCertificateContext.Addr(), 1, uintptr(unsafe.Pointer(certContext)), 0, 0) dupContext = (*CertContext)(unsafe.Pointer(r0)) 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 { err = errnoErr(e1) } return } func CertFindCertificateInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevCertContext *CertContext) (cert *CertContext, err error) { r0, _, e1 := syscall.Syscall6(procCertFindCertificateInStore.Addr(), 6, uintptr(store), uintptr(certEncodingType), uintptr(findFlags), uintptr(findType), uintptr(findPara), uintptr(unsafe.Pointer(prevCertContext))) cert = (*CertContext)(unsafe.Pointer(r0)) if cert == nil { err = errnoErr(e1) } return } func CertFindChainInStore(store Handle, certEncodingType uint32, findFlags uint32, findType uint32, findPara unsafe.Pointer, prevChainContext *CertChainContext) (certchain *CertChainContext, err error) { r0, _, e1 := syscall.Syscall6(procCertFindChainInStore.Addr(), 6, uintptr(store), uintptr(certEncodingType), uintptr(findFlags), uintptr(findType), uintptr(findPara), uintptr(unsafe.Pointer(prevChainContext))) certchain = (*CertChainContext)(unsafe.Pointer(r0)) if certchain == nil { err = errnoErr(e1) } return } func CertFindExtension(objId *byte, countExtensions uint32, extensions *CertExtension) (ret *CertExtension) { r0, _, _ := syscall.Syscall(procCertFindExtension.Addr(), 3, uintptr(unsafe.Pointer(objId)), uintptr(countExtensions), uintptr(unsafe.Pointer(extensions))) ret = (*CertExtension)(unsafe.Pointer(r0)) return } func CertFreeCertificateChain(ctx *CertChainContext) { syscall.Syscall(procCertFreeCertificateChain.Addr(), 1, uintptr(unsafe.Pointer(ctx)), 0, 0) return } func CertFreeCertificateContext(ctx *CertContext) (err error) { r1, _, e1 := syscall.Syscall(procCertFreeCertificateContext.Addr(), 1, uintptr(unsafe.Pointer(ctx)), 0, 0) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func CertGetNameString(certContext *CertContext, nameType uint32, flags uint32, typePara unsafe.Pointer, name *uint16, size uint32) (chars uint32) { r0, _, _ := syscall.Syscall6(procCertGetNameStringW.Addr(), 6, uintptr(unsafe.Pointer(certContext)), uintptr(nameType), uintptr(flags), uintptr(typePara), uintptr(unsafe.Pointer(name)), uintptr(size)) chars = uint32(r0) 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 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func CryptAcquireCertificatePrivateKey(cert *CertContext, flags uint32, parameters unsafe.Pointer, cryptProvOrNCryptKey *Handle, keySpec *uint32, callerFreeProvOrNCryptKey *bool) (err error) { var _p0 uint32 if *callerFreeProvOrNCryptKey { _p0 = 1 } r1, _, e1 := syscall.Syscall6(procCryptAcquireCertificatePrivateKey.Addr(), 6, uintptr(unsafe.Pointer(cert)), uintptr(flags), uintptr(parameters), uintptr(unsafe.Pointer(cryptProvOrNCryptKey)), uintptr(unsafe.Pointer(keySpec)), uintptr(unsafe.Pointer(&_p0))) *callerFreeProvOrNCryptKey = _p0 != 0 if r1 == 0 { err = errnoErr(e1) } return } func CryptDecodeObject(encodingType uint32, structType *byte, encodedBytes *byte, lenEncodedBytes uint32, flags uint32, decoded unsafe.Pointer, decodedLen *uint32) (err error) { r1, _, e1 := syscall.Syscall9(procCryptDecodeObject.Addr(), 7, uintptr(encodingType), uintptr(unsafe.Pointer(structType)), uintptr(unsafe.Pointer(encodedBytes)), uintptr(lenEncodedBytes), uintptr(flags), uintptr(decoded), uintptr(unsafe.Pointer(decodedLen)), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func CryptProtectData(dataIn *DataBlob, name *uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) { r1, _, e1 := syscall.Syscall9(procCryptProtectData.Addr(), 7, uintptr(unsafe.Pointer(dataIn)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(optionalEntropy)), uintptr(reserved), uintptr(unsafe.Pointer(promptStruct)), uintptr(flags), uintptr(unsafe.Pointer(dataOut)), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func CryptQueryObject(objectType uint32, object unsafe.Pointer, expectedContentTypeFlags uint32, expectedFormatTypeFlags uint32, flags uint32, msgAndCertEncodingType *uint32, contentType *uint32, formatType *uint32, certStore *Handle, msg *Handle, context *unsafe.Pointer) (err error) { r1, _, e1 := syscall.Syscall12(procCryptQueryObject.Addr(), 11, uintptr(objectType), uintptr(object), uintptr(expectedContentTypeFlags), uintptr(expectedFormatTypeFlags), uintptr(flags), uintptr(unsafe.Pointer(msgAndCertEncodingType)), uintptr(unsafe.Pointer(contentType)), uintptr(unsafe.Pointer(formatType)), uintptr(unsafe.Pointer(certStore)), uintptr(unsafe.Pointer(msg)), uintptr(unsafe.Pointer(context)), 0) if r1 == 0 { err = errnoErr(e1) } return } func CryptUnprotectData(dataIn *DataBlob, name **uint16, optionalEntropy *DataBlob, reserved uintptr, promptStruct *CryptProtectPromptStruct, flags uint32, dataOut *DataBlob) (err error) { r1, _, e1 := syscall.Syscall9(procCryptUnprotectData.Addr(), 7, uintptr(unsafe.Pointer(dataIn)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(optionalEntropy)), uintptr(reserved), uintptr(unsafe.Pointer(promptStruct)), uintptr(flags), uintptr(unsafe.Pointer(dataOut)), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func PFXImportCertStore(pfx *CryptDataBlob, password *uint16, flags uint32) (store Handle, err error) { r0, _, e1 := syscall.Syscall(procPFXImportCertStore.Addr(), 3, uintptr(unsafe.Pointer(pfx)), uintptr(unsafe.Pointer(password)), uintptr(flags)) store = Handle(r0) if store == 0 { err = errnoErr(e1) } 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 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 DwmGetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) { r0, _, _ := syscall.Syscall6(procDwmGetWindowAttribute.Addr(), 4, uintptr(hwnd), uintptr(attribute), uintptr(value), uintptr(size), 0, 0) if r0 != 0 { ret = syscall.Errno(r0) } return } func DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) { r0, _, _ := syscall.Syscall6(procDwmSetWindowAttribute.Addr(), 4, uintptr(hwnd), uintptr(attribute), uintptr(value), uintptr(size), 0, 0) if r0 != 0 { ret = syscall.Errno(r0) } return } func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) { r0, _, _ := syscall.Syscall6(procGetAdaptersAddresses.Addr(), 5, uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer)), 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 getBestInterfaceEx(sockaddr unsafe.Pointer, pdwBestIfIndex *uint32) (errcode error) { r0, _, _ := syscall.Syscall(procGetBestInterfaceEx.Addr(), 2, uintptr(sockaddr), uintptr(unsafe.Pointer(pdwBestIfIndex)), 0) if r0 != 0 { errcode = syscall.Errno(r0) } 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 AddDllDirectory(path *uint16) (cookie uintptr, err error) { r0, _, e1 := syscall.Syscall(procAddDllDirectory.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0) cookie = uintptr(r0) if cookie == 0 { err = errnoErr(e1) } return } func AssignProcessToJobObject(job Handle, process Handle) (err error) { r1, _, e1 := syscall.Syscall(procAssignProcessToJobObject.Addr(), 2, uintptr(job), uintptr(process), 0) if r1 == 0 { err = errnoErr(e1) } return } func CancelIo(s Handle) (err error) { r1, _, e1 := syscall.Syscall(procCancelIo.Addr(), 1, uintptr(s), 0, 0) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func ClearCommBreak(handle Handle) (err error) { r1, _, e1 := syscall.Syscall(procClearCommBreak.Addr(), 1, uintptr(handle), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func ClearCommError(handle Handle, lpErrors *uint32, lpStat *ComStat) (err error) { r1, _, e1 := syscall.Syscall(procClearCommError.Addr(), 3, uintptr(handle), uintptr(unsafe.Pointer(lpErrors)), uintptr(unsafe.Pointer(lpStat))) if r1 == 0 { err = errnoErr(e1) } return } func CloseHandle(handle Handle) (err error) { r1, _, e1 := syscall.Syscall(procCloseHandle.Addr(), 1, uintptr(handle), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func ClosePseudoConsole(console Handle) { syscall.Syscall(procClosePseudoConsole.Addr(), 1, uintptr(console), 0, 0) return } func ConnectNamedPipe(pipe Handle, overlapped *Overlapped) (err error) { r1, _, e1 := syscall.Syscall(procConnectNamedPipe.Addr(), 2, uintptr(pipe), uintptr(unsafe.Pointer(overlapped)), 0) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func CreateEventEx(eventAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) { r0, _, e1 := syscall.Syscall6(procCreateEventExW.Addr(), 4, uintptr(unsafe.Pointer(eventAttrs)), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(desiredAccess), 0, 0) handle = Handle(r0) if handle == 0 || e1 == ERROR_ALREADY_EXISTS { err = errnoErr(e1) } return } func CreateEvent(eventAttrs *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 || e1 == ERROR_ALREADY_EXISTS { err = errnoErr(e1) } 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 || e1 == ERROR_ALREADY_EXISTS { err = errnoErr(e1) } return } func CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile Handle) (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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uintptr, 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 { err = errnoErr(e1) } return } func CreateJobObject(jobAttr *SecurityAttributes, name *uint16) (handle Handle, err error) { r0, _, e1 := syscall.Syscall(procCreateJobObjectW.Addr(), 2, uintptr(unsafe.Pointer(jobAttr)), uintptr(unsafe.Pointer(name)), 0) handle = Handle(r0) if handle == 0 { err = errnoErr(e1) } return } func CreateMutexEx(mutexAttrs *SecurityAttributes, name *uint16, flags uint32, desiredAccess uint32) (handle Handle, err error) { r0, _, e1 := syscall.Syscall6(procCreateMutexExW.Addr(), 4, uintptr(unsafe.Pointer(mutexAttrs)), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(desiredAccess), 0, 0) handle = Handle(r0) if handle == 0 || e1 == ERROR_ALREADY_EXISTS { err = errnoErr(e1) } return } func CreateMutex(mutexAttrs *SecurityAttributes, initialOwner bool, name *uint16) (handle Handle, err error) { var _p0 uint32 if initialOwner { _p0 = 1 } r0, _, e1 := syscall.Syscall(procCreateMutexW.Addr(), 3, uintptr(unsafe.Pointer(mutexAttrs)), uintptr(_p0), uintptr(unsafe.Pointer(name))) handle = Handle(r0) if handle == 0 || e1 == ERROR_ALREADY_EXISTS { err = errnoErr(e1) } return } func CreateNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *SecurityAttributes) (handle Handle, err error) { r0, _, e1 := syscall.Syscall9(procCreateNamedPipeW.Addr(), 8, uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(pipeMode), uintptr(maxInstances), uintptr(outSize), uintptr(inSize), uintptr(defaultTimeout), uintptr(unsafe.Pointer(sa)), 0) handle = Handle(r0) if handle == InvalidHandle { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 } 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 { err = errnoErr(e1) } return } func createPseudoConsole(size uint32, in Handle, out Handle, flags uint32, pconsole *Handle) (hr error) { r0, _, _ := syscall.Syscall6(procCreatePseudoConsole.Addr(), 5, uintptr(size), uintptr(in), uintptr(out), uintptr(flags), uintptr(unsafe.Pointer(pconsole)), 0) if r0 != 0 { hr = syscall.Errno(r0) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) { r1, _, e1 := syscall.Syscall(procDefineDosDeviceW.Addr(), 3, uintptr(flags), uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath))) if r1 == 0 { err = errnoErr(e1) } return } func DeleteFile(path *uint16) (err error) { r1, _, e1 := syscall.Syscall(procDeleteFileW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func deleteProcThreadAttributeList(attrlist *ProcThreadAttributeList) { syscall.Syscall(procDeleteProcThreadAttributeList.Addr(), 1, uintptr(unsafe.Pointer(attrlist)), 0, 0) return } func DeleteVolumeMountPoint(volumeMountPoint *uint16) (err error) { r1, _, e1 := syscall.Syscall(procDeleteVolumeMountPointW.Addr(), 1, uintptr(unsafe.Pointer(volumeMountPoint)), 0, 0) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func DisconnectNamedPipe(pipe Handle) (err error) { r1, _, e1 := syscall.Syscall(procDisconnectNamedPipe.Addr(), 1, uintptr(pipe), 0, 0) if r1 == 0 { err = errnoErr(e1) } 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 } 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 { err = errnoErr(e1) } return } func EscapeCommFunction(handle Handle, dwFunc uint32) (err error) { r1, _, e1 := syscall.Syscall(procEscapeCommFunction.Addr(), 2, uintptr(handle), uintptr(dwFunc), 0) if r1 == 0 { err = errnoErr(e1) } return } func ExitProcess(exitcode uint32) { syscall.Syscall(procExitProcess.Addr(), 1, uintptr(exitcode), 0, 0) 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 { err = errnoErr(e1) } return } func FindClose(handle Handle) (err error) { r1, _, e1 := syscall.Syscall(procFindClose.Addr(), 1, uintptr(handle), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func FindCloseChangeNotification(handle Handle) (err error) { r1, _, e1 := syscall.Syscall(procFindCloseChangeNotification.Addr(), 1, uintptr(handle), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func FindFirstChangeNotification(path string, watchSubtree bool, notifyFilter uint32) (handle Handle, err error) { var _p0 *uint16 _p0, err = syscall.UTF16PtrFromString(path) if err != nil { return } return _FindFirstChangeNotification(_p0, watchSubtree, notifyFilter) } func _FindFirstChangeNotification(path *uint16, watchSubtree bool, notifyFilter uint32) (handle Handle, err error) { var _p1 uint32 if watchSubtree { _p1 = 1 } r0, _, e1 := syscall.Syscall(procFindFirstChangeNotificationW.Addr(), 3, uintptr(unsafe.Pointer(path)), uintptr(_p1), uintptr(notifyFilter)) handle = Handle(r0) if handle == InvalidHandle { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func FindFirstVolumeMountPoint(rootPathName *uint16, volumeMountPoint *uint16, bufferLength uint32) (handle Handle, err error) { r0, _, e1 := syscall.Syscall(procFindFirstVolumeMountPointW.Addr(), 3, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(bufferLength)) handle = Handle(r0) if handle == InvalidHandle { err = errnoErr(e1) } return } func FindFirstVolume(volumeName *uint16, bufferLength uint32) (handle Handle, err error) { r0, _, e1 := syscall.Syscall(procFindFirstVolumeW.Addr(), 2, uintptr(unsafe.Pointer(volumeName)), uintptr(bufferLength), 0) handle = Handle(r0) if handle == InvalidHandle { err = errnoErr(e1) } return } func FindNextChangeNotification(handle Handle) (err error) { r1, _, e1 := syscall.Syscall(procFindNextChangeNotification.Addr(), 1, uintptr(handle), 0, 0) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func FindNextVolumeMountPoint(findVolumeMountPoint Handle, volumeMountPoint *uint16, bufferLength uint32) (err error) { r1, _, e1 := syscall.Syscall(procFindNextVolumeMountPointW.Addr(), 3, uintptr(findVolumeMountPoint), uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(bufferLength)) if r1 == 0 { err = errnoErr(e1) } return } func FindNextVolume(findVolume Handle, volumeName *uint16, bufferLength uint32) (err error) { r1, _, e1 := syscall.Syscall(procFindNextVolumeW.Addr(), 3, uintptr(findVolume), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferLength)) if r1 == 0 { err = errnoErr(e1) } return } func findResource(module Handle, name uintptr, resType uintptr) (resInfo Handle, err error) { r0, _, e1 := syscall.Syscall(procFindResourceW.Addr(), 3, uintptr(module), uintptr(name), uintptr(resType)) resInfo = Handle(r0) if resInfo == 0 { err = errnoErr(e1) } return } func FindVolumeClose(findVolume Handle) (err error) { r1, _, e1 := syscall.Syscall(procFindVolumeClose.Addr(), 1, uintptr(findVolume), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func FindVolumeMountPointClose(findVolumeMountPoint Handle) (err error) { r1, _, e1 := syscall.Syscall(procFindVolumeMountPointClose.Addr(), 1, uintptr(findVolumeMountPoint), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func FlushFileBuffers(handle Handle) (err error) { r1, _, e1 := syscall.Syscall(procFlushFileBuffers.Addr(), 1, uintptr(handle), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func FlushViewOfFile(addr uintptr, length uintptr) (err error) { r1, _, e1 := syscall.Syscall(procFlushViewOfFile.Addr(), 2, uintptr(addr), uintptr(length), 0) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func FreeEnvironmentStrings(envs *uint16) (err error) { r1, _, e1 := syscall.Syscall(procFreeEnvironmentStringsW.Addr(), 1, uintptr(unsafe.Pointer(envs)), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func FreeLibrary(handle Handle) (err error) { r1, _, e1 := syscall.Syscall(procFreeLibrary.Addr(), 1, uintptr(handle), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func GenerateConsoleCtrlEvent(ctrlEvent uint32, processGroupID uint32) (err error) { r1, _, e1 := syscall.Syscall(procGenerateConsoleCtrlEvent.Addr(), 2, uintptr(ctrlEvent), uintptr(processGroupID), 0) if r1 == 0 { err = errnoErr(e1) } return } func GetACP() (acp uint32) { r0, _, _ := syscall.Syscall(procGetACP.Addr(), 0, 0, 0, 0) acp = uint32(r0) return } func GetActiveProcessorCount(groupNumber uint16) (ret uint32) { r0, _, _ := syscall.Syscall(procGetActiveProcessorCount.Addr(), 1, uintptr(groupNumber), 0, 0) ret = uint32(r0) return } func GetCommModemStatus(handle Handle, lpModemStat *uint32) (err error) { r1, _, e1 := syscall.Syscall(procGetCommModemStatus.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(lpModemStat)), 0) if r1 == 0 { err = errnoErr(e1) } return } func GetCommState(handle Handle, lpDCB *DCB) (err error) { r1, _, e1 := syscall.Syscall(procGetCommState.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(lpDCB)), 0) if r1 == 0 { err = errnoErr(e1) } return } func GetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) { r1, _, e1 := syscall.Syscall(procGetCommTimeouts.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(timeouts)), 0) if r1 == 0 { err = errnoErr(e1) } return } func GetCommandLine() (cmd *uint16) { r0, _, _ := syscall.Syscall(procGetCommandLineW.Addr(), 0, 0, 0, 0) cmd = (*uint16)(unsafe.Pointer(r0)) 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) { r1, _, e1 := syscall.Syscall(procGetConsoleScreenBufferInfo.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(info)), 0) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func GetCurrentProcessId() (pid uint32) { r0, _, _ := syscall.Syscall(procGetCurrentProcessId.Addr(), 0, 0, 0, 0) pid = uint32(r0) return } func GetCurrentThreadId() (id uint32) { r0, _, _ := syscall.Syscall(procGetCurrentThreadId.Addr(), 0, 0, 0, 0) id = uint32(r0) return } func GetDiskFreeSpaceEx(directoryName *uint16, freeBytesAvailableToCaller *uint64, totalNumberOfBytes *uint64, totalNumberOfFreeBytes *uint64) (err error) { r1, _, e1 := syscall.Syscall6(procGetDiskFreeSpaceExW.Addr(), 4, uintptr(unsafe.Pointer(directoryName)), uintptr(unsafe.Pointer(freeBytesAvailableToCaller)), uintptr(unsafe.Pointer(totalNumberOfBytes)), uintptr(unsafe.Pointer(totalNumberOfFreeBytes)), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func GetDriveType(rootPathName *uint16) (driveType uint32) { r0, _, _ := syscall.Syscall(procGetDriveTypeW.Addr(), 1, uintptr(unsafe.Pointer(rootPathName)), 0, 0) driveType = uint32(r0) 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func GetFileInformationByHandleEx(handle Handle, class uint32, outBuffer *byte, outBufferLen uint32) (err error) { r1, _, e1 := syscall.Syscall6(procGetFileInformationByHandleEx.Addr(), 4, uintptr(handle), uintptr(class), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferLen), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func GetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) { r1, _, e1 := syscall.Syscall6(procGetFileTime.Addr(), 4, uintptr(handle), uintptr(unsafe.Pointer(ctime)), uintptr(unsafe.Pointer(atime)), uintptr(unsafe.Pointer(wtime)), 0, 0) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func GetFinalPathNameByHandle(file Handle, filePath *uint16, filePathSize uint32, flags uint32) (n uint32, err error) { r0, _, e1 := syscall.Syscall6(procGetFinalPathNameByHandleW.Addr(), 4, uintptr(file), uintptr(unsafe.Pointer(filePath)), uintptr(filePathSize), uintptr(flags), 0, 0) n = uint32(r0) if n == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func GetLargePageMinimum() (size uintptr) { r0, _, _ := syscall.Syscall(procGetLargePageMinimum.Addr(), 0, 0, 0, 0) size = uintptr(r0) return } func GetLastError() (lasterr error) { r0, _, _ := syscall.Syscall(procGetLastError.Addr(), 0, 0, 0, 0) if r0 != 0 { lasterr = syscall.Errno(r0) } return } func GetLogicalDriveStrings(bufferLength uint32, buffer *uint16) (n uint32, err error) { r0, _, e1 := syscall.Syscall(procGetLogicalDriveStringsW.Addr(), 2, uintptr(bufferLength), uintptr(unsafe.Pointer(buffer)), 0) n = uint32(r0) if n == 0 { err = errnoErr(e1) } return } func GetLogicalDrives() (drivesBitMask uint32, err error) { r0, _, e1 := syscall.Syscall(procGetLogicalDrives.Addr(), 0, 0, 0, 0) drivesBitMask = uint32(r0) if drivesBitMask == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func GetMaximumProcessorCount(groupNumber uint16) (ret uint32) { r0, _, _ := syscall.Syscall(procGetMaximumProcessorCount.Addr(), 1, uintptr(groupNumber), 0, 0) ret = uint32(r0) return } func GetModuleFileName(module Handle, filename *uint16, size uint32) (n uint32, err error) { r0, _, e1 := syscall.Syscall(procGetModuleFileNameW.Addr(), 3, uintptr(module), uintptr(unsafe.Pointer(filename)), uintptr(size)) n = uint32(r0) if n == 0 { err = errnoErr(e1) } return } func GetModuleHandleEx(flags uint32, moduleName *uint16, module *Handle) (err error) { r1, _, e1 := syscall.Syscall(procGetModuleHandleExW.Addr(), 3, uintptr(flags), uintptr(unsafe.Pointer(moduleName)), uintptr(unsafe.Pointer(module))) if r1 == 0 { err = errnoErr(e1) } return } func GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) { r1, _, e1 := syscall.Syscall9(procGetNamedPipeHandleStateW.Addr(), 7, uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(curInstances)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)), uintptr(unsafe.Pointer(userName)), uintptr(maxUserNameSize), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) { r1, _, e1 := syscall.Syscall6(procGetNamedPipeInfo.Addr(), 5, uintptr(pipe), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(outSize)), uintptr(unsafe.Pointer(inSize)), uintptr(unsafe.Pointer(maxInstances)), 0) if r1 == 0 { err = errnoErr(e1) } return } func GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wait bool) (err error) { var _p0 uint32 if wait { _p0 = 1 } r1, _, e1 := syscall.Syscall6(procGetOverlappedResult.Addr(), 4, uintptr(handle), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(done)), uintptr(_p0), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func GetPriorityClass(process Handle) (ret uint32, err error) { r0, _, e1 := syscall.Syscall(procGetPriorityClass.Addr(), 1, uintptr(process), 0, 0) ret = uint32(r0) if ret == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func GetProcessId(process Handle) (id uint32, err error) { r0, _, e1 := syscall.Syscall(procGetProcessId.Addr(), 1, uintptr(process), 0, 0) id = uint32(r0) if id == 0 { err = errnoErr(e1) } return } func getProcessPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) { r1, _, e1 := syscall.Syscall6(procGetProcessPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func GetProcessShutdownParameters(level *uint32, flags *uint32) (err error) { r1, _, e1 := syscall.Syscall(procGetProcessShutdownParameters.Addr(), 2, uintptr(unsafe.Pointer(level)), uintptr(unsafe.Pointer(flags)), 0) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func GetProcessWorkingSetSizeEx(hProcess Handle, lpMinimumWorkingSetSize *uintptr, lpMaximumWorkingSetSize *uintptr, flags *uint32) { syscall.Syscall6(procGetProcessWorkingSetSizeEx.Addr(), 4, uintptr(hProcess), uintptr(unsafe.Pointer(lpMinimumWorkingSetSize)), uintptr(unsafe.Pointer(lpMaximumWorkingSetSize)), uintptr(unsafe.Pointer(flags)), 0, 0) return } func GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uintptr, 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func getStartupInfo(startupInfo *StartupInfo) { syscall.Syscall(procGetStartupInfoW.Addr(), 1, uintptr(unsafe.Pointer(startupInfo)), 0, 0) return } func GetStdHandle(stdhandle uint32) (handle Handle, err error) { r0, _, e1 := syscall.Syscall(procGetStdHandle.Addr(), 1, uintptr(stdhandle), 0, 0) handle = Handle(r0) if handle == InvalidHandle { err = errnoErr(e1) } return } func getSystemDirectory(dir *uint16, dirLen uint32) (len uint32, err error) { r0, _, e1 := syscall.Syscall(procGetSystemDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(dir)), uintptr(dirLen), 0) len = uint32(r0) if len == 0 { err = errnoErr(e1) } return } func getSystemPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) { r1, _, e1 := syscall.Syscall6(procGetSystemPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func GetSystemTimeAsFileTime(time *Filetime) { syscall.Syscall(procGetSystemTimeAsFileTime.Addr(), 1, uintptr(unsafe.Pointer(time)), 0, 0) return } func GetSystemTimePreciseAsFileTime(time *Filetime) { syscall.Syscall(procGetSystemTimePreciseAsFileTime.Addr(), 1, uintptr(unsafe.Pointer(time)), 0, 0) return } func getSystemWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) { r0, _, e1 := syscall.Syscall(procGetSystemWindowsDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(dir)), uintptr(dirLen), 0) len = uint32(r0) if len == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func getThreadPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) { r1, _, e1 := syscall.Syscall6(procGetThreadPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func getTickCount64() (ms uint64) { r0, _, _ := syscall.Syscall(procGetTickCount64.Addr(), 0, 0, 0, 0) ms = uint64(r0) 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 { err = errnoErr(e1) } return } func getUserPreferredUILanguages(flags uint32, numLanguages *uint32, buf *uint16, bufSize *uint32) (err error) { r1, _, e1 := syscall.Syscall6(procGetUserPreferredUILanguages.Addr(), 4, uintptr(flags), uintptr(unsafe.Pointer(numLanguages)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(bufSize)), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func GetVersion() (ver uint32, err error) { r0, _, e1 := syscall.Syscall(procGetVersion.Addr(), 0, 0, 0, 0) ver = uint32(r0) if ver == 0 { err = errnoErr(e1) } return } func GetVolumeInformationByHandle(file Handle, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) { r1, _, e1 := syscall.Syscall9(procGetVolumeInformationByHandleW.Addr(), 8, uintptr(file), uintptr(unsafe.Pointer(volumeNameBuffer)), uintptr(volumeNameSize), uintptr(unsafe.Pointer(volumeNameSerialNumber)), uintptr(unsafe.Pointer(maximumComponentLength)), uintptr(unsafe.Pointer(fileSystemFlags)), uintptr(unsafe.Pointer(fileSystemNameBuffer)), uintptr(fileSystemNameSize), 0) if r1 == 0 { err = errnoErr(e1) } return } func GetVolumeInformation(rootPathName *uint16, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) { r1, _, e1 := syscall.Syscall9(procGetVolumeInformationW.Addr(), 8, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeNameBuffer)), uintptr(volumeNameSize), uintptr(unsafe.Pointer(volumeNameSerialNumber)), uintptr(unsafe.Pointer(maximumComponentLength)), uintptr(unsafe.Pointer(fileSystemFlags)), uintptr(unsafe.Pointer(fileSystemNameBuffer)), uintptr(fileSystemNameSize), 0) if r1 == 0 { err = errnoErr(e1) } return } func GetVolumeNameForVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16, bufferlength uint32) (err error) { r1, _, e1 := syscall.Syscall(procGetVolumeNameForVolumeMountPointW.Addr(), 3, uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(unsafe.Pointer(volumeName)), uintptr(bufferlength)) if r1 == 0 { err = errnoErr(e1) } return } func GetVolumePathName(fileName *uint16, volumePathName *uint16, bufferLength uint32) (err error) { r1, _, e1 := syscall.Syscall(procGetVolumePathNameW.Addr(), 3, uintptr(unsafe.Pointer(fileName)), uintptr(unsafe.Pointer(volumePathName)), uintptr(bufferLength)) if r1 == 0 { err = errnoErr(e1) } return } func GetVolumePathNamesForVolumeName(volumeName *uint16, volumePathNames *uint16, bufferLength uint32, returnLength *uint32) (err error) { r1, _, e1 := syscall.Syscall6(procGetVolumePathNamesForVolumeNameW.Addr(), 4, uintptr(unsafe.Pointer(volumeName)), uintptr(unsafe.Pointer(volumePathNames)), uintptr(bufferLength), uintptr(unsafe.Pointer(returnLength)), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func getWindowsDirectory(dir *uint16, dirLen uint32) (len uint32, err error) { r0, _, e1 := syscall.Syscall(procGetWindowsDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(dir)), uintptr(dirLen), 0) len = uint32(r0) if len == 0 { err = errnoErr(e1) } return } func initializeProcThreadAttributeList(attrlist *ProcThreadAttributeList, attrcount uint32, flags uint32, size *uintptr) (err error) { r1, _, e1 := syscall.Syscall6(procInitializeProcThreadAttributeList.Addr(), 4, uintptr(unsafe.Pointer(attrlist)), uintptr(attrcount), uintptr(flags), uintptr(unsafe.Pointer(size)), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func IsWow64Process(handle Handle, isWow64 *bool) (err error) { var _p0 uint32 if *isWow64 { _p0 = 1 } r1, _, e1 := syscall.Syscall(procIsWow64Process.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(&_p0)), 0) *isWow64 = _p0 != 0 if r1 == 0 { err = errnoErr(e1) } return } func IsWow64Process2(handle Handle, processMachine *uint16, nativeMachine *uint16) (err error) { err = procIsWow64Process2.Find() if err != nil { return } r1, _, e1 := syscall.Syscall(procIsWow64Process2.Addr(), 3, uintptr(handle), uintptr(unsafe.Pointer(processMachine)), uintptr(unsafe.Pointer(nativeMachine))) if r1 == 0 { err = errnoErr(e1) } return } func LoadLibraryEx(libname string, zero Handle, flags uintptr) (handle Handle, err error) { var _p0 *uint16 _p0, err = syscall.UTF16PtrFromString(libname) if err != nil { return } return _LoadLibraryEx(_p0, zero, flags) } func _LoadLibraryEx(libname *uint16, zero Handle, flags uintptr) (handle Handle, err error) { r0, _, e1 := syscall.Syscall(procLoadLibraryExW.Addr(), 3, uintptr(unsafe.Pointer(libname)), uintptr(zero), uintptr(flags)) handle = Handle(r0) if handle == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func LoadResource(module Handle, resInfo Handle) (resData Handle, err error) { r0, _, e1 := syscall.Syscall(procLoadResource.Addr(), 2, uintptr(module), uintptr(resInfo), 0) resData = Handle(r0) if resData == 0 { err = errnoErr(e1) } return } func LocalAlloc(flags uint32, length uint32) (ptr uintptr, err error) { r0, _, e1 := syscall.Syscall(procLocalAlloc.Addr(), 2, uintptr(flags), uintptr(length), 0) ptr = uintptr(r0) if ptr == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func LockFileEx(file Handle, flags uint32, reserved uint32, bytesLow uint32, bytesHigh uint32, overlapped *Overlapped) (err error) { r1, _, e1 := syscall.Syscall6(procLockFileEx.Addr(), 6, uintptr(file), uintptr(flags), uintptr(reserved), uintptr(bytesLow), uintptr(bytesHigh), uintptr(unsafe.Pointer(overlapped))) if r1 == 0 { err = errnoErr(e1) } return } func LockResource(resData Handle) (addr uintptr, err error) { r0, _, e1 := syscall.Syscall(procLockResource.Addr(), 1, uintptr(resData), 0, 0) addr = uintptr(r0) if addr == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func Module32First(snapshot Handle, moduleEntry *ModuleEntry32) (err error) { r1, _, e1 := syscall.Syscall(procModule32FirstW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(moduleEntry)), 0) if r1 == 0 { err = errnoErr(e1) } return } func Module32Next(snapshot Handle, moduleEntry *ModuleEntry32) (err error) { r1, _, e1 := syscall.Syscall(procModule32NextW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(moduleEntry)), 0) if r1 == 0 { err = errnoErr(e1) } return } func MoveFileEx(from *uint16, to *uint16, flags uint32) (err error) { r1, _, e1 := syscall.Syscall(procMoveFileExW.Addr(), 3, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), uintptr(flags)) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) { r0, _, e1 := syscall.Syscall6(procMultiByteToWideChar.Addr(), 6, uintptr(codePage), uintptr(dwFlags), uintptr(unsafe.Pointer(str)), uintptr(nstr), uintptr(unsafe.Pointer(wchar)), uintptr(nwchar)) nwrite = int32(r0) if nwrite == 0 { err = errnoErr(e1) } return } func OpenEvent(desiredAccess uint32, inheritHandle bool, name *uint16) (handle Handle, err error) { var _p0 uint32 if inheritHandle { _p0 = 1 } r0, _, e1 := syscall.Syscall(procOpenEventW.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(unsafe.Pointer(name))) handle = Handle(r0) if handle == 0 { err = errnoErr(e1) } return } func OpenMutex(desiredAccess uint32, inheritHandle bool, name *uint16) (handle Handle, err error) { var _p0 uint32 if inheritHandle { _p0 = 1 } r0, _, e1 := syscall.Syscall(procOpenMutexW.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(unsafe.Pointer(name))) handle = Handle(r0) if handle == 0 { err = errnoErr(e1) } return } func OpenProcess(desiredAccess uint32, inheritHandle bool, processId uint32) (handle Handle, err error) { var _p0 uint32 if inheritHandle { _p0 = 1 } r0, _, e1 := syscall.Syscall(procOpenProcess.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(processId)) handle = Handle(r0) if handle == 0 { err = errnoErr(e1) } return } func OpenThread(desiredAccess uint32, inheritHandle bool, threadId uint32) (handle Handle, err error) { var _p0 uint32 if inheritHandle { _p0 = 1 } r0, _, e1 := syscall.Syscall(procOpenThread.Addr(), 3, uintptr(desiredAccess), uintptr(_p0), uintptr(threadId)) handle = Handle(r0) if handle == 0 { err = errnoErr(e1) } return } func PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uintptr, 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func ProcessIdToSessionId(pid uint32, sessionid *uint32) (err error) { r1, _, e1 := syscall.Syscall(procProcessIdToSessionId.Addr(), 2, uintptr(pid), uintptr(unsafe.Pointer(sessionid)), 0) if r1 == 0 { err = errnoErr(e1) } return } func PulseEvent(event Handle) (err error) { r1, _, e1 := syscall.Syscall(procPulseEvent.Addr(), 1, uintptr(event), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func PurgeComm(handle Handle, dwFlags uint32) (err error) { r1, _, e1 := syscall.Syscall(procPurgeComm.Addr(), 2, uintptr(handle), uintptr(dwFlags), 0) if r1 == 0 { err = errnoErr(e1) } return } func QueryDosDevice(deviceName *uint16, targetPath *uint16, max uint32) (n uint32, err error) { r0, _, e1 := syscall.Syscall(procQueryDosDeviceW.Addr(), 3, uintptr(unsafe.Pointer(deviceName)), uintptr(unsafe.Pointer(targetPath)), uintptr(max)) n = uint32(r0) if n == 0 { err = errnoErr(e1) } return } func QueryFullProcessImageName(proc Handle, flags uint32, exeName *uint16, size *uint32) (err error) { r1, _, e1 := syscall.Syscall6(procQueryFullProcessImageNameW.Addr(), 4, uintptr(proc), uintptr(flags), uintptr(unsafe.Pointer(exeName)), uintptr(unsafe.Pointer(size)), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func QueryInformationJobObject(job Handle, JobObjectInformationClass int32, JobObjectInformation uintptr, JobObjectInformationLength uint32, retlen *uint32) (err error) { r1, _, e1 := syscall.Syscall6(procQueryInformationJobObject.Addr(), 5, uintptr(job), uintptr(JobObjectInformationClass), uintptr(JobObjectInformation), uintptr(JobObjectInformationLength), uintptr(unsafe.Pointer(retlen)), 0) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func ReadProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesRead *uintptr) (err error) { r1, _, e1 := syscall.Syscall6(procReadProcessMemory.Addr(), 5, uintptr(process), uintptr(baseAddress), uintptr(unsafe.Pointer(buffer)), uintptr(size), uintptr(unsafe.Pointer(numberOfBytesRead)), 0) if r1 == 0 { err = errnoErr(e1) } return } func ReleaseMutex(mutex Handle) (err error) { r1, _, e1 := syscall.Syscall(procReleaseMutex.Addr(), 1, uintptr(mutex), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func RemoveDirectory(path *uint16) (err error) { r1, _, e1 := syscall.Syscall(procRemoveDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func RemoveDllDirectory(cookie uintptr) (err error) { r1, _, e1 := syscall.Syscall(procRemoveDllDirectory.Addr(), 1, uintptr(cookie), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func ResetEvent(event Handle) (err error) { r1, _, e1 := syscall.Syscall(procResetEvent.Addr(), 1, uintptr(event), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func resizePseudoConsole(pconsole Handle, size uint32) (hr error) { r0, _, _ := syscall.Syscall(procResizePseudoConsole.Addr(), 2, uintptr(pconsole), uintptr(size), 0) if r0 != 0 { hr = syscall.Errno(r0) } return } func ResumeThread(thread Handle) (ret uint32, err error) { r0, _, e1 := syscall.Syscall(procResumeThread.Addr(), 1, uintptr(thread), 0, 0) ret = uint32(r0) if ret == 0xffffffff { err = errnoErr(e1) } return } func SetCommBreak(handle Handle) (err error) { r1, _, e1 := syscall.Syscall(procSetCommBreak.Addr(), 1, uintptr(handle), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func SetCommMask(handle Handle, dwEvtMask uint32) (err error) { r1, _, e1 := syscall.Syscall(procSetCommMask.Addr(), 2, uintptr(handle), uintptr(dwEvtMask), 0) if r1 == 0 { err = errnoErr(e1) } return } func SetCommState(handle Handle, lpDCB *DCB) (err error) { r1, _, e1 := syscall.Syscall(procSetCommState.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(lpDCB)), 0) if r1 == 0 { err = errnoErr(e1) } return } func SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) { r1, _, e1 := syscall.Syscall(procSetCommTimeouts.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(timeouts)), 0) if r1 == 0 { err = errnoErr(e1) } return } func setConsoleCursorPosition(console Handle, position uint32) (err error) { r1, _, e1 := syscall.Syscall(procSetConsoleCursorPosition.Addr(), 2, uintptr(console), uintptr(position), 0) if r1 == 0 { err = errnoErr(e1) } return } func SetConsoleMode(console Handle, mode uint32) (err error) { r1, _, e1 := syscall.Syscall(procSetConsoleMode.Addr(), 2, uintptr(console), uintptr(mode), 0) if r1 == 0 { err = errnoErr(e1) } return } func SetCurrentDirectory(path *uint16) (err error) { r1, _, e1 := syscall.Syscall(procSetCurrentDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func SetDefaultDllDirectories(directoryFlags uint32) (err error) { r1, _, e1 := syscall.Syscall(procSetDefaultDllDirectories.Addr(), 1, uintptr(directoryFlags), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func SetDllDirectory(path string) (err error) { var _p0 *uint16 _p0, err = syscall.UTF16PtrFromString(path) if err != nil { return } return _SetDllDirectory(_p0) } func _SetDllDirectory(path *uint16) (err error) { r1, _, e1 := syscall.Syscall(procSetDllDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func SetEndOfFile(handle Handle) (err error) { r1, _, e1 := syscall.Syscall(procSetEndOfFile.Addr(), 1, uintptr(handle), 0, 0) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func SetErrorMode(mode uint32) (ret uint32) { r0, _, _ := syscall.Syscall(procSetErrorMode.Addr(), 1, uintptr(mode), 0, 0) ret = uint32(r0) return } func SetEvent(event Handle) (err error) { r1, _, e1 := syscall.Syscall(procSetEvent.Addr(), 1, uintptr(event), 0, 0) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func SetFileCompletionNotificationModes(handle Handle, flags uint8) (err error) { r1, _, e1 := syscall.Syscall(procSetFileCompletionNotificationModes.Addr(), 2, uintptr(handle), uintptr(flags), 0) if r1 == 0 { err = errnoErr(e1) } return } func SetFileInformationByHandle(handle Handle, class uint32, inBuffer *byte, inBufferLen uint32) (err error) { r1, _, e1 := syscall.Syscall6(procSetFileInformationByHandle.Addr(), 4, uintptr(handle), uintptr(class), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferLen), 0, 0) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func SetFileValidData(handle Handle, validDataLength int64) (err error) { r1, _, e1 := syscall.Syscall(procSetFileValidData.Addr(), 2, uintptr(handle), uintptr(validDataLength), 0) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func SetInformationJobObject(job Handle, JobObjectInformationClass uint32, JobObjectInformation uintptr, JobObjectInformationLength uint32) (ret int, err error) { r0, _, e1 := syscall.Syscall6(procSetInformationJobObject.Addr(), 4, uintptr(job), uintptr(JobObjectInformationClass), uintptr(JobObjectInformation), uintptr(JobObjectInformationLength), 0, 0) ret = int(r0) if ret == 0 { err = errnoErr(e1) } return } func SetNamedPipeHandleState(pipe Handle, state *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32) (err error) { r1, _, e1 := syscall.Syscall6(procSetNamedPipeHandleState.Addr(), 4, uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func SetPriorityClass(process Handle, priorityClass uint32) (err error) { r1, _, e1 := syscall.Syscall(procSetPriorityClass.Addr(), 2, uintptr(process), uintptr(priorityClass), 0) if r1 == 0 { err = errnoErr(e1) } return } func SetProcessPriorityBoost(process Handle, disable bool) (err error) { var _p0 uint32 if disable { _p0 = 1 } r1, _, e1 := syscall.Syscall(procSetProcessPriorityBoost.Addr(), 2, uintptr(process), uintptr(_p0), 0) if r1 == 0 { err = errnoErr(e1) } return } func SetProcessShutdownParameters(level uint32, flags uint32) (err error) { r1, _, e1 := syscall.Syscall(procSetProcessShutdownParameters.Addr(), 2, uintptr(level), uintptr(flags), 0) if r1 == 0 { err = errnoErr(e1) } return } func SetProcessWorkingSetSizeEx(hProcess Handle, dwMinimumWorkingSetSize uintptr, dwMaximumWorkingSetSize uintptr, flags uint32) (err error) { r1, _, e1 := syscall.Syscall6(procSetProcessWorkingSetSizeEx.Addr(), 4, uintptr(hProcess), uintptr(dwMinimumWorkingSetSize), uintptr(dwMaximumWorkingSetSize), uintptr(flags), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func SetStdHandle(stdhandle uint32, handle Handle) (err error) { r1, _, e1 := syscall.Syscall(procSetStdHandle.Addr(), 2, uintptr(stdhandle), uintptr(handle), 0) if r1 == 0 { err = errnoErr(e1) } return } func SetVolumeLabel(rootPathName *uint16, volumeName *uint16) (err error) { r1, _, e1 := syscall.Syscall(procSetVolumeLabelW.Addr(), 2, uintptr(unsafe.Pointer(rootPathName)), uintptr(unsafe.Pointer(volumeName)), 0) if r1 == 0 { err = errnoErr(e1) } return } func SetVolumeMountPoint(volumeMountPoint *uint16, volumeName *uint16) (err error) { r1, _, e1 := syscall.Syscall(procSetVolumeMountPointW.Addr(), 2, uintptr(unsafe.Pointer(volumeMountPoint)), uintptr(unsafe.Pointer(volumeName)), 0) if r1 == 0 { err = errnoErr(e1) } return } func SetupComm(handle Handle, dwInQueue uint32, dwOutQueue uint32) (err error) { r1, _, e1 := syscall.Syscall(procSetupComm.Addr(), 3, uintptr(handle), uintptr(dwInQueue), uintptr(dwOutQueue)) if r1 == 0 { err = errnoErr(e1) } return } func SizeofResource(module Handle, resInfo Handle) (size uint32, err error) { r0, _, e1 := syscall.Syscall(procSizeofResource.Addr(), 2, uintptr(module), uintptr(resInfo), 0) size = uint32(r0) if size == 0 { err = errnoErr(e1) } return } func SleepEx(milliseconds uint32, alertable bool) (ret uint32) { var _p0 uint32 if alertable { _p0 = 1 } r0, _, _ := syscall.Syscall(procSleepEx.Addr(), 2, uintptr(milliseconds), uintptr(_p0), 0) ret = uint32(r0) return } func TerminateJobObject(job Handle, exitCode uint32) (err error) { r1, _, e1 := syscall.Syscall(procTerminateJobObject.Addr(), 2, uintptr(job), uintptr(exitCode), 0) if r1 == 0 { err = errnoErr(e1) } return } func TerminateProcess(handle Handle, exitcode uint32) (err error) { r1, _, e1 := syscall.Syscall(procTerminateProcess.Addr(), 2, uintptr(handle), uintptr(exitcode), 0) if r1 == 0 { err = errnoErr(e1) } return } func Thread32First(snapshot Handle, threadEntry *ThreadEntry32) (err error) { r1, _, e1 := syscall.Syscall(procThread32First.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(threadEntry)), 0) if r1 == 0 { err = errnoErr(e1) } return } func Thread32Next(snapshot Handle, threadEntry *ThreadEntry32) (err error) { r1, _, e1 := syscall.Syscall(procThread32Next.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(threadEntry)), 0) if r1 == 0 { err = errnoErr(e1) } return } func UnlockFileEx(file Handle, reserved uint32, bytesLow uint32, bytesHigh uint32, overlapped *Overlapped) (err error) { r1, _, e1 := syscall.Syscall6(procUnlockFileEx.Addr(), 5, uintptr(file), uintptr(reserved), uintptr(bytesLow), uintptr(bytesHigh), uintptr(unsafe.Pointer(overlapped)), 0) if r1 == 0 { err = errnoErr(e1) } return } func UnmapViewOfFile(addr uintptr) (err error) { r1, _, e1 := syscall.Syscall(procUnmapViewOfFile.Addr(), 1, uintptr(addr), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func updateProcThreadAttribute(attrlist *ProcThreadAttributeList, flags uint32, attr uintptr, value unsafe.Pointer, size uintptr, prevvalue unsafe.Pointer, returnedsize *uintptr) (err error) { r1, _, e1 := syscall.Syscall9(procUpdateProcThreadAttribute.Addr(), 7, uintptr(unsafe.Pointer(attrlist)), uintptr(flags), uintptr(attr), uintptr(value), uintptr(size), uintptr(prevvalue), uintptr(unsafe.Pointer(returnedsize)), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func VirtualAlloc(address uintptr, size uintptr, alloctype uint32, protect uint32) (value uintptr, err error) { r0, _, e1 := syscall.Syscall6(procVirtualAlloc.Addr(), 4, uintptr(address), uintptr(size), uintptr(alloctype), uintptr(protect), 0, 0) value = uintptr(r0) if value == 0 { err = errnoErr(e1) } return } func VirtualFree(address uintptr, size uintptr, freetype uint32) (err error) { r1, _, e1 := syscall.Syscall(procVirtualFree.Addr(), 3, uintptr(address), uintptr(size), uintptr(freetype)) if r1 == 0 { err = errnoErr(e1) } return } func VirtualLock(addr uintptr, length uintptr) (err error) { r1, _, e1 := syscall.Syscall(procVirtualLock.Addr(), 2, uintptr(addr), uintptr(length), 0) if r1 == 0 { err = errnoErr(e1) } return } func VirtualProtect(address uintptr, size uintptr, newprotect uint32, oldprotect *uint32) (err error) { r1, _, e1 := syscall.Syscall6(procVirtualProtect.Addr(), 4, uintptr(address), uintptr(size), uintptr(newprotect), uintptr(unsafe.Pointer(oldprotect)), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func VirtualProtectEx(process Handle, address uintptr, size uintptr, newProtect uint32, oldProtect *uint32) (err error) { r1, _, e1 := syscall.Syscall6(procVirtualProtectEx.Addr(), 5, uintptr(process), uintptr(address), uintptr(size), uintptr(newProtect), uintptr(unsafe.Pointer(oldProtect)), 0) if r1 == 0 { err = errnoErr(e1) } return } func VirtualQuery(address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) { r1, _, e1 := syscall.Syscall(procVirtualQuery.Addr(), 3, uintptr(address), uintptr(unsafe.Pointer(buffer)), uintptr(length)) if r1 == 0 { err = errnoErr(e1) } return } func VirtualQueryEx(process Handle, address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) { r1, _, e1 := syscall.Syscall6(procVirtualQueryEx.Addr(), 4, uintptr(process), uintptr(address), uintptr(unsafe.Pointer(buffer)), uintptr(length), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func VirtualUnlock(addr uintptr, length uintptr) (err error) { r1, _, e1 := syscall.Syscall(procVirtualUnlock.Addr(), 2, uintptr(addr), uintptr(length), 0) if r1 == 0 { err = errnoErr(e1) } return } func WTSGetActiveConsoleSessionId() (sessionID uint32) { r0, _, _ := syscall.Syscall(procWTSGetActiveConsoleSessionId.Addr(), 0, 0, 0, 0) sessionID = uint32(r0) return } func WaitCommEvent(handle Handle, lpEvtMask *uint32, lpOverlapped *Overlapped) (err error) { r1, _, e1 := syscall.Syscall(procWaitCommEvent.Addr(), 3, uintptr(handle), uintptr(unsafe.Pointer(lpEvtMask)), uintptr(unsafe.Pointer(lpOverlapped))) if r1 == 0 { err = errnoErr(e1) } return } func waitForMultipleObjects(count uint32, handles uintptr, waitAll bool, waitMilliseconds uint32) (event uint32, err error) { var _p0 uint32 if waitAll { _p0 = 1 } r0, _, e1 := syscall.Syscall6(procWaitForMultipleObjects.Addr(), 4, uintptr(count), uintptr(handles), uintptr(_p0), uintptr(waitMilliseconds), 0, 0) event = uint32(r0) if event == 0xffffffff { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func WriteProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesWritten *uintptr) (err error) { r1, _, e1 := syscall.Syscall6(procWriteProcessMemory.Addr(), 5, uintptr(process), uintptr(baseAddress), uintptr(unsafe.Pointer(buffer)), uintptr(size), uintptr(unsafe.Pointer(numberOfBytesWritten)), 0) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 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 { err = errnoErr(e1) } 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 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 NetUserEnum(serverName *uint16, level uint32, filter uint32, buf **byte, prefMaxLen uint32, entriesRead *uint32, totalEntries *uint32, resumeHandle *uint32) (neterr error) { r0, _, _ := syscall.Syscall9(procNetUserEnum.Addr(), 8, uintptr(unsafe.Pointer(serverName)), uintptr(level), uintptr(filter), uintptr(unsafe.Pointer(buf)), uintptr(prefMaxLen), uintptr(unsafe.Pointer(entriesRead)), uintptr(unsafe.Pointer(totalEntries)), uintptr(unsafe.Pointer(resumeHandle)), 0) if r0 != 0 { neterr = syscall.Errno(r0) } 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 NtCreateFile(handle *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, allocationSize *int64, attributes uint32, share uint32, disposition uint32, options uint32, eabuffer uintptr, ealength uint32) (ntstatus error) { r0, _, _ := syscall.Syscall12(procNtCreateFile.Addr(), 11, uintptr(unsafe.Pointer(handle)), uintptr(access), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(allocationSize)), uintptr(attributes), uintptr(share), uintptr(disposition), uintptr(options), uintptr(eabuffer), uintptr(ealength), 0) if r0 != 0 { ntstatus = NTStatus(r0) } return } func NtCreateNamedPipeFile(pipe *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, share uint32, disposition uint32, options uint32, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (ntstatus error) { r0, _, _ := syscall.Syscall15(procNtCreateNamedPipeFile.Addr(), 14, uintptr(unsafe.Pointer(pipe)), uintptr(access), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(share), uintptr(disposition), uintptr(options), uintptr(typ), uintptr(readMode), uintptr(completionMode), uintptr(maxInstances), uintptr(inboundQuota), uintptr(outputQuota), uintptr(unsafe.Pointer(timeout)), 0) if r0 != 0 { ntstatus = NTStatus(r0) } return } func NtQueryInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32, retLen *uint32) (ntstatus error) { r0, _, _ := syscall.Syscall6(procNtQueryInformationProcess.Addr(), 5, uintptr(proc), uintptr(procInfoClass), uintptr(procInfo), uintptr(procInfoLen), uintptr(unsafe.Pointer(retLen)), 0) if r0 != 0 { ntstatus = NTStatus(r0) } return } func NtQuerySystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32, retLen *uint32) (ntstatus error) { r0, _, _ := syscall.Syscall6(procNtQuerySystemInformation.Addr(), 4, uintptr(sysInfoClass), uintptr(sysInfo), uintptr(sysInfoLen), uintptr(unsafe.Pointer(retLen)), 0, 0) if r0 != 0 { ntstatus = NTStatus(r0) } return } func NtSetInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte, inBufferLen uint32, class uint32) (ntstatus error) { r0, _, _ := syscall.Syscall6(procNtSetInformationFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferLen), uintptr(class), 0) if r0 != 0 { ntstatus = NTStatus(r0) } return } func NtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32) (ntstatus error) { r0, _, _ := syscall.Syscall6(procNtSetInformationProcess.Addr(), 4, uintptr(proc), uintptr(procInfoClass), uintptr(procInfo), uintptr(procInfoLen), 0, 0) if r0 != 0 { ntstatus = NTStatus(r0) } return } func NtSetSystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32) (ntstatus error) { r0, _, _ := syscall.Syscall(procNtSetSystemInformation.Addr(), 3, uintptr(sysInfoClass), uintptr(sysInfo), uintptr(sysInfoLen)) if r0 != 0 { ntstatus = NTStatus(r0) } return } func RtlAddFunctionTable(functionTable *RUNTIME_FUNCTION, entryCount uint32, baseAddress uintptr) (ret bool) { r0, _, _ := syscall.Syscall(procRtlAddFunctionTable.Addr(), 3, uintptr(unsafe.Pointer(functionTable)), uintptr(entryCount), uintptr(baseAddress)) ret = r0 != 0 return } func RtlDefaultNpAcl(acl **ACL) (ntstatus error) { r0, _, _ := syscall.Syscall(procRtlDefaultNpAcl.Addr(), 1, uintptr(unsafe.Pointer(acl)), 0, 0) if r0 != 0 { ntstatus = NTStatus(r0) } return } func RtlDeleteFunctionTable(functionTable *RUNTIME_FUNCTION) (ret bool) { r0, _, _ := syscall.Syscall(procRtlDeleteFunctionTable.Addr(), 1, uintptr(unsafe.Pointer(functionTable)), 0, 0) ret = r0 != 0 return } func RtlDosPathNameToNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) { r0, _, _ := syscall.Syscall6(procRtlDosPathNameToNtPathName_U_WithStatus.Addr(), 4, uintptr(unsafe.Pointer(dosName)), uintptr(unsafe.Pointer(ntName)), uintptr(unsafe.Pointer(ntFileNamePart)), uintptr(unsafe.Pointer(relativeName)), 0, 0) if r0 != 0 { ntstatus = NTStatus(r0) } return } func RtlDosPathNameToRelativeNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) { r0, _, _ := syscall.Syscall6(procRtlDosPathNameToRelativeNtPathName_U_WithStatus.Addr(), 4, uintptr(unsafe.Pointer(dosName)), uintptr(unsafe.Pointer(ntName)), uintptr(unsafe.Pointer(ntFileNamePart)), uintptr(unsafe.Pointer(relativeName)), 0, 0) if r0 != 0 { ntstatus = NTStatus(r0) } return } func RtlGetCurrentPeb() (peb *PEB) { r0, _, _ := syscall.Syscall(procRtlGetCurrentPeb.Addr(), 0, 0, 0, 0) peb = (*PEB)(unsafe.Pointer(r0)) return } func rtlGetNtVersionNumbers(majorVersion *uint32, minorVersion *uint32, buildNumber *uint32) { syscall.Syscall(procRtlGetNtVersionNumbers.Addr(), 3, uintptr(unsafe.Pointer(majorVersion)), uintptr(unsafe.Pointer(minorVersion)), uintptr(unsafe.Pointer(buildNumber))) return } func rtlGetVersion(info *OsVersionInfoEx) (ntstatus error) { r0, _, _ := syscall.Syscall(procRtlGetVersion.Addr(), 1, uintptr(unsafe.Pointer(info)), 0, 0) if r0 != 0 { ntstatus = NTStatus(r0) } return } func RtlInitString(destinationString *NTString, sourceString *byte) { syscall.Syscall(procRtlInitString.Addr(), 2, uintptr(unsafe.Pointer(destinationString)), uintptr(unsafe.Pointer(sourceString)), 0) return } func RtlInitUnicodeString(destinationString *NTUnicodeString, sourceString *uint16) { syscall.Syscall(procRtlInitUnicodeString.Addr(), 2, uintptr(unsafe.Pointer(destinationString)), uintptr(unsafe.Pointer(sourceString)), 0) return } func rtlNtStatusToDosErrorNoTeb(ntstatus NTStatus) (ret syscall.Errno) { r0, _, _ := syscall.Syscall(procRtlNtStatusToDosErrorNoTeb.Addr(), 1, uintptr(ntstatus), 0, 0) ret = syscall.Errno(r0) return } func clsidFromString(lpsz *uint16, pclsid *GUID) (ret error) { r0, _, _ := syscall.Syscall(procCLSIDFromString.Addr(), 2, uintptr(unsafe.Pointer(lpsz)), uintptr(unsafe.Pointer(pclsid)), 0) if r0 != 0 { ret = syscall.Errno(r0) } return } func coCreateGuid(pguid *GUID) (ret error) { r0, _, _ := syscall.Syscall(procCoCreateGuid.Addr(), 1, uintptr(unsafe.Pointer(pguid)), 0, 0) if r0 != 0 { ret = syscall.Errno(r0) } return } func CoGetObject(name *uint16, bindOpts *BIND_OPTS3, guid *GUID, functionTable **uintptr) (ret error) { r0, _, _ := syscall.Syscall6(procCoGetObject.Addr(), 4, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(bindOpts)), uintptr(unsafe.Pointer(guid)), uintptr(unsafe.Pointer(functionTable)), 0, 0) if r0 != 0 { ret = syscall.Errno(r0) } return } func CoInitializeEx(reserved uintptr, coInit uint32) (ret error) { r0, _, _ := syscall.Syscall(procCoInitializeEx.Addr(), 2, uintptr(reserved), uintptr(coInit), 0) if r0 != 0 { ret = syscall.Errno(r0) } return } func CoTaskMemFree(address unsafe.Pointer) { syscall.Syscall(procCoTaskMemFree.Addr(), 1, uintptr(address), 0, 0) return } func CoUninitialize() { syscall.Syscall(procCoUninitialize.Addr(), 0, 0, 0, 0) return } func stringFromGUID2(rguid *GUID, lpsz *uint16, cchMax int32) (chars int32) { r0, _, _ := syscall.Syscall(procStringFromGUID2.Addr(), 3, uintptr(unsafe.Pointer(rguid)), uintptr(unsafe.Pointer(lpsz)), uintptr(cchMax)) chars = int32(r0) return } func EnumProcessModules(process Handle, module *Handle, cb uint32, cbNeeded *uint32) (err error) { r1, _, e1 := syscall.Syscall6(procEnumProcessModules.Addr(), 4, uintptr(process), uintptr(unsafe.Pointer(module)), uintptr(cb), uintptr(unsafe.Pointer(cbNeeded)), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func EnumProcessModulesEx(process Handle, module *Handle, cb uint32, cbNeeded *uint32, filterFlag uint32) (err error) { r1, _, e1 := syscall.Syscall6(procEnumProcessModulesEx.Addr(), 5, uintptr(process), uintptr(unsafe.Pointer(module)), uintptr(cb), uintptr(unsafe.Pointer(cbNeeded)), uintptr(filterFlag), 0) if r1 == 0 { err = errnoErr(e1) } return } func enumProcesses(processIds *uint32, nSize uint32, bytesReturned *uint32) (err error) { r1, _, e1 := syscall.Syscall(procEnumProcesses.Addr(), 3, uintptr(unsafe.Pointer(processIds)), uintptr(nSize), uintptr(unsafe.Pointer(bytesReturned))) if r1 == 0 { err = errnoErr(e1) } return } func GetModuleBaseName(process Handle, module Handle, baseName *uint16, size uint32) (err error) { r1, _, e1 := syscall.Syscall6(procGetModuleBaseNameW.Addr(), 4, uintptr(process), uintptr(module), uintptr(unsafe.Pointer(baseName)), uintptr(size), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func GetModuleFileNameEx(process Handle, module Handle, filename *uint16, size uint32) (err error) { r1, _, e1 := syscall.Syscall6(procGetModuleFileNameExW.Addr(), 4, uintptr(process), uintptr(module), uintptr(unsafe.Pointer(filename)), uintptr(size), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func GetModuleInformation(process Handle, module Handle, modinfo *ModuleInfo, cb uint32) (err error) { r1, _, e1 := syscall.Syscall6(procGetModuleInformation.Addr(), 4, uintptr(process), uintptr(module), uintptr(unsafe.Pointer(modinfo)), uintptr(cb), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func QueryWorkingSetEx(process Handle, pv uintptr, cb uint32) (err error) { r1, _, e1 := syscall.Syscall(procQueryWorkingSetEx.Addr(), 3, uintptr(process), uintptr(pv), uintptr(cb)) if r1 == 0 { err = errnoErr(e1) } return } func SubscribeServiceChangeNotifications(service Handle, eventType uint32, callback uintptr, callbackCtx uintptr, subscription *uintptr) (ret error) { ret = procSubscribeServiceChangeNotifications.Find() if ret != nil { return } r0, _, _ := syscall.Syscall6(procSubscribeServiceChangeNotifications.Addr(), 5, uintptr(service), uintptr(eventType), uintptr(callback), uintptr(callbackCtx), uintptr(unsafe.Pointer(subscription)), 0) if r0 != 0 { ret = syscall.Errno(r0) } return } func UnsubscribeServiceChangeNotifications(subscription uintptr) (err error) { err = procUnsubscribeServiceChangeNotifications.Find() if err != nil { return } syscall.Syscall(procUnsubscribeServiceChangeNotifications.Addr(), 1, uintptr(subscription), 0, 0) 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func SetupDiBuildDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT) (err error) { r1, _, e1 := syscall.Syscall(procSetupDiBuildDriverInfoList.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType)) if r1 == 0 { err = errnoErr(e1) } return } func SetupDiCallClassInstaller(installFunction DI_FUNCTION, deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) { r1, _, e1 := syscall.Syscall(procSetupDiCallClassInstaller.Addr(), 3, uintptr(installFunction), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData))) if r1 == 0 { err = errnoErr(e1) } return } func SetupDiCancelDriverInfoSearch(deviceInfoSet DevInfo) (err error) { r1, _, e1 := syscall.Syscall(procSetupDiCancelDriverInfoSearch.Addr(), 1, uintptr(deviceInfoSet), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func setupDiClassGuidsFromNameEx(className *uint16, classGuidList *GUID, classGuidListSize uint32, requiredSize *uint32, machineName *uint16, reserved uintptr) (err error) { r1, _, e1 := syscall.Syscall6(procSetupDiClassGuidsFromNameExW.Addr(), 6, uintptr(unsafe.Pointer(className)), uintptr(unsafe.Pointer(classGuidList)), uintptr(classGuidListSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(unsafe.Pointer(machineName)), uintptr(reserved)) if r1 == 0 { err = errnoErr(e1) } return } func setupDiClassNameFromGuidEx(classGUID *GUID, className *uint16, classNameSize uint32, requiredSize *uint32, machineName *uint16, reserved uintptr) (err error) { r1, _, e1 := syscall.Syscall6(procSetupDiClassNameFromGuidExW.Addr(), 6, uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(className)), uintptr(classNameSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(unsafe.Pointer(machineName)), uintptr(reserved)) if r1 == 0 { err = errnoErr(e1) } return } func setupDiCreateDeviceInfoListEx(classGUID *GUID, hwndParent uintptr, machineName *uint16, reserved uintptr) (handle DevInfo, err error) { r0, _, e1 := syscall.Syscall6(procSetupDiCreateDeviceInfoListExW.Addr(), 4, uintptr(unsafe.Pointer(classGUID)), uintptr(hwndParent), uintptr(unsafe.Pointer(machineName)), uintptr(reserved), 0, 0) handle = DevInfo(r0) if handle == DevInfo(InvalidHandle) { err = errnoErr(e1) } return } func setupDiCreateDeviceInfo(deviceInfoSet DevInfo, DeviceName *uint16, classGUID *GUID, DeviceDescription *uint16, hwndParent uintptr, CreationFlags DICD, deviceInfoData *DevInfoData) (err error) { r1, _, e1 := syscall.Syscall9(procSetupDiCreateDeviceInfoW.Addr(), 7, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(DeviceName)), uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(DeviceDescription)), uintptr(hwndParent), uintptr(CreationFlags), uintptr(unsafe.Pointer(deviceInfoData)), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func SetupDiDestroyDeviceInfoList(deviceInfoSet DevInfo) (err error) { r1, _, e1 := syscall.Syscall(procSetupDiDestroyDeviceInfoList.Addr(), 1, uintptr(deviceInfoSet), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func SetupDiDestroyDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT) (err error) { r1, _, e1 := syscall.Syscall(procSetupDiDestroyDriverInfoList.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType)) if r1 == 0 { err = errnoErr(e1) } return } func setupDiEnumDeviceInfo(deviceInfoSet DevInfo, memberIndex uint32, deviceInfoData *DevInfoData) (err error) { r1, _, e1 := syscall.Syscall(procSetupDiEnumDeviceInfo.Addr(), 3, uintptr(deviceInfoSet), uintptr(memberIndex), uintptr(unsafe.Pointer(deviceInfoData))) if r1 == 0 { err = errnoErr(e1) } return } func setupDiEnumDriverInfo(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT, memberIndex uint32, driverInfoData *DrvInfoData) (err error) { r1, _, e1 := syscall.Syscall6(procSetupDiEnumDriverInfoW.Addr(), 5, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType), uintptr(memberIndex), uintptr(unsafe.Pointer(driverInfoData)), 0) if r1 == 0 { err = errnoErr(e1) } return } func setupDiGetClassDevsEx(classGUID *GUID, Enumerator *uint16, hwndParent uintptr, Flags DIGCF, deviceInfoSet DevInfo, machineName *uint16, reserved uintptr) (handle DevInfo, err error) { r0, _, e1 := syscall.Syscall9(procSetupDiGetClassDevsExW.Addr(), 7, uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(Enumerator)), uintptr(hwndParent), uintptr(Flags), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(machineName)), uintptr(reserved), 0, 0) handle = DevInfo(r0) if handle == DevInfo(InvalidHandle) { err = errnoErr(e1) } return } func SetupDiGetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32, requiredSize *uint32) (err error) { r1, _, e1 := syscall.Syscall6(procSetupDiGetClassInstallParamsW.Addr(), 5, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(classInstallParams)), uintptr(classInstallParamsSize), uintptr(unsafe.Pointer(requiredSize)), 0) if r1 == 0 { err = errnoErr(e1) } return } func setupDiGetDeviceInfoListDetail(deviceInfoSet DevInfo, deviceInfoSetDetailData *DevInfoListDetailData) (err error) { r1, _, e1 := syscall.Syscall(procSetupDiGetDeviceInfoListDetailW.Addr(), 2, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoSetDetailData)), 0) if r1 == 0 { err = errnoErr(e1) } return } func setupDiGetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, deviceInstallParams *DevInstallParams) (err error) { r1, _, e1 := syscall.Syscall(procSetupDiGetDeviceInstallParamsW.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(deviceInstallParams))) if r1 == 0 { err = errnoErr(e1) } return } func setupDiGetDeviceInstanceId(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, instanceId *uint16, instanceIdSize uint32, instanceIdRequiredSize *uint32) (err error) { r1, _, e1 := syscall.Syscall6(procSetupDiGetDeviceInstanceIdW.Addr(), 5, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(instanceId)), uintptr(instanceIdSize), uintptr(unsafe.Pointer(instanceIdRequiredSize)), 0) if r1 == 0 { err = errnoErr(e1) } return } func setupDiGetDeviceProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, propertyKey *DEVPROPKEY, propertyType *DEVPROPTYPE, propertyBuffer *byte, propertyBufferSize uint32, requiredSize *uint32, flags uint32) (err error) { r1, _, e1 := syscall.Syscall9(procSetupDiGetDevicePropertyW.Addr(), 8, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(propertyKey)), uintptr(unsafe.Pointer(propertyType)), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(flags), 0) if r1 == 0 { err = errnoErr(e1) } return } func setupDiGetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP, propertyRegDataType *uint32, propertyBuffer *byte, propertyBufferSize uint32, requiredSize *uint32) (err error) { r1, _, e1 := syscall.Syscall9(procSetupDiGetDeviceRegistryPropertyW.Addr(), 7, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(property), uintptr(unsafe.Pointer(propertyRegDataType)), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize), uintptr(unsafe.Pointer(requiredSize)), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func setupDiGetDriverInfoDetail(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData, driverInfoDetailData *DrvInfoDetailData, driverInfoDetailDataSize uint32, requiredSize *uint32) (err error) { r1, _, e1 := syscall.Syscall6(procSetupDiGetDriverInfoDetailW.Addr(), 6, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData)), uintptr(unsafe.Pointer(driverInfoDetailData)), uintptr(driverInfoDetailDataSize), uintptr(unsafe.Pointer(requiredSize))) if r1 == 0 { err = errnoErr(e1) } return } func setupDiGetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) { r1, _, e1 := syscall.Syscall(procSetupDiGetSelectedDevice.Addr(), 2, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), 0) if r1 == 0 { err = errnoErr(e1) } return } func setupDiGetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (err error) { r1, _, e1 := syscall.Syscall(procSetupDiGetSelectedDriverW.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData))) if r1 == 0 { err = errnoErr(e1) } return } func SetupDiOpenDevRegKey(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, Scope DICS_FLAG, HwProfile uint32, KeyType DIREG, samDesired uint32) (key Handle, err error) { r0, _, e1 := syscall.Syscall6(procSetupDiOpenDevRegKey.Addr(), 6, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(Scope), uintptr(HwProfile), uintptr(KeyType), uintptr(samDesired)) key = Handle(r0) if key == InvalidHandle { err = errnoErr(e1) } return } func SetupDiSetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32) (err error) { r1, _, e1 := syscall.Syscall6(procSetupDiSetClassInstallParamsW.Addr(), 4, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(classInstallParams)), uintptr(classInstallParamsSize), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func SetupDiSetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, deviceInstallParams *DevInstallParams) (err error) { r1, _, e1 := syscall.Syscall(procSetupDiSetDeviceInstallParamsW.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(deviceInstallParams))) if r1 == 0 { err = errnoErr(e1) } return } func setupDiSetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP, propertyBuffer *byte, propertyBufferSize uint32) (err error) { r1, _, e1 := syscall.Syscall6(procSetupDiSetDeviceRegistryPropertyW.Addr(), 5, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(property), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize), 0) if r1 == 0 { err = errnoErr(e1) } return } func SetupDiSetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) { r1, _, e1 := syscall.Syscall(procSetupDiSetSelectedDevice.Addr(), 2, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), 0) if r1 == 0 { err = errnoErr(e1) } return } func SetupDiSetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (err error) { r1, _, e1 := syscall.Syscall(procSetupDiSetSelectedDriverW.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData))) if r1 == 0 { err = errnoErr(e1) } return } func setupUninstallOEMInf(infFileName *uint16, flags SUOI, reserved uintptr) (err error) { r1, _, e1 := syscall.Syscall(procSetupUninstallOEMInfW.Addr(), 3, uintptr(unsafe.Pointer(infFileName)), uintptr(flags), uintptr(reserved)) if r1 == 0 { err = errnoErr(e1) } return } func commandLineToArgv(cmd *uint16, argc *int32) (argv **uint16, err error) { r0, _, e1 := syscall.Syscall(procCommandLineToArgvW.Addr(), 2, uintptr(unsafe.Pointer(cmd)), uintptr(unsafe.Pointer(argc)), 0) argv = (**uint16)(unsafe.Pointer(r0)) if argv == nil { err = errnoErr(e1) } return } func shGetKnownFolderPath(id *KNOWNFOLDERID, flags uint32, token Token, path **uint16) (ret error) { r0, _, _ := syscall.Syscall6(procSHGetKnownFolderPath.Addr(), 4, uintptr(unsafe.Pointer(id)), uintptr(flags), uintptr(token), uintptr(unsafe.Pointer(path)), 0, 0) if r0 != 0 { ret = syscall.Errno(r0) } return } func ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *uint16, showCmd int32) (err error) { r1, _, e1 := syscall.Syscall6(procShellExecuteW.Addr(), 6, uintptr(hwnd), uintptr(unsafe.Pointer(verb)), uintptr(unsafe.Pointer(file)), uintptr(unsafe.Pointer(args)), uintptr(unsafe.Pointer(cwd)), uintptr(showCmd)) if r1 <= 32 { err = errnoErr(e1) } return } func EnumChildWindows(hwnd HWND, enumFunc uintptr, param unsafe.Pointer) { syscall.Syscall(procEnumChildWindows.Addr(), 3, uintptr(hwnd), uintptr(enumFunc), uintptr(param)) return } func EnumWindows(enumFunc uintptr, param unsafe.Pointer) (err error) { r1, _, e1 := syscall.Syscall(procEnumWindows.Addr(), 2, uintptr(enumFunc), uintptr(param), 0) if r1 == 0 { err = errnoErr(e1) } return } func ExitWindowsEx(flags uint32, reason uint32) (err error) { r1, _, e1 := syscall.Syscall(procExitWindowsEx.Addr(), 2, uintptr(flags), uintptr(reason), 0) if r1 == 0 { err = errnoErr(e1) } return } func GetClassName(hwnd HWND, className *uint16, maxCount int32) (copied int32, err error) { r0, _, e1 := syscall.Syscall(procGetClassNameW.Addr(), 3, uintptr(hwnd), uintptr(unsafe.Pointer(className)), uintptr(maxCount)) copied = int32(r0) if copied == 0 { err = errnoErr(e1) } return } func GetDesktopWindow() (hwnd HWND) { r0, _, _ := syscall.Syscall(procGetDesktopWindow.Addr(), 0, 0, 0, 0) hwnd = HWND(r0) return } func GetForegroundWindow() (hwnd HWND) { r0, _, _ := syscall.Syscall(procGetForegroundWindow.Addr(), 0, 0, 0, 0) hwnd = HWND(r0) return } func GetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) { r1, _, e1 := syscall.Syscall(procGetGUIThreadInfo.Addr(), 2, uintptr(thread), uintptr(unsafe.Pointer(info)), 0) if r1 == 0 { err = errnoErr(e1) } return } func GetKeyboardLayout(tid uint32) (hkl Handle) { r0, _, _ := syscall.Syscall(procGetKeyboardLayout.Addr(), 1, uintptr(tid), 0, 0) hkl = Handle(r0) return } func GetShellWindow() (shellWindow HWND) { r0, _, _ := syscall.Syscall(procGetShellWindow.Addr(), 0, 0, 0, 0) shellWindow = HWND(r0) return } func GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) { r0, _, e1 := syscall.Syscall(procGetWindowThreadProcessId.Addr(), 2, uintptr(hwnd), uintptr(unsafe.Pointer(pid)), 0) tid = uint32(r0) if tid == 0 { err = errnoErr(e1) } return } func IsWindow(hwnd HWND) (isWindow bool) { r0, _, _ := syscall.Syscall(procIsWindow.Addr(), 1, uintptr(hwnd), 0, 0) isWindow = r0 != 0 return } func IsWindowUnicode(hwnd HWND) (isUnicode bool) { r0, _, _ := syscall.Syscall(procIsWindowUnicode.Addr(), 1, uintptr(hwnd), 0, 0) isUnicode = r0 != 0 return } func IsWindowVisible(hwnd HWND) (isVisible bool) { r0, _, _ := syscall.Syscall(procIsWindowVisible.Addr(), 1, uintptr(hwnd), 0, 0) isVisible = r0 != 0 return } func LoadKeyboardLayout(name *uint16, flags uint32) (hkl Handle, err error) { r0, _, e1 := syscall.Syscall(procLoadKeyboardLayoutW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(flags), 0) hkl = Handle(r0) if hkl == 0 { err = errnoErr(e1) } return } func MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) { r0, _, e1 := syscall.Syscall6(procMessageBoxW.Addr(), 4, uintptr(hwnd), uintptr(unsafe.Pointer(text)), uintptr(unsafe.Pointer(caption)), uintptr(boxtype), 0, 0) ret = int32(r0) if ret == 0 { err = errnoErr(e1) } return } func ToUnicodeEx(vkey uint32, scancode uint32, keystate *byte, pwszBuff *uint16, cchBuff int32, flags uint32, hkl Handle) (ret int32) { r0, _, _ := syscall.Syscall9(procToUnicodeEx.Addr(), 7, uintptr(vkey), uintptr(scancode), uintptr(unsafe.Pointer(keystate)), uintptr(unsafe.Pointer(pwszBuff)), uintptr(cchBuff), uintptr(flags), uintptr(hkl), 0, 0) ret = int32(r0) return } func UnloadKeyboardLayout(hkl Handle) (err error) { r1, _, e1 := syscall.Syscall(procUnloadKeyboardLayout.Addr(), 1, uintptr(hkl), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func CreateEnvironmentBlock(block **uint16, token Token, inheritExisting bool) (err error) { var _p0 uint32 if inheritExisting { _p0 = 1 } r1, _, e1 := syscall.Syscall(procCreateEnvironmentBlock.Addr(), 3, uintptr(unsafe.Pointer(block)), uintptr(token), uintptr(_p0)) if r1 == 0 { err = errnoErr(e1) } return } func DestroyEnvironmentBlock(block *uint16) (err error) { r1, _, e1 := syscall.Syscall(procDestroyEnvironmentBlock.Addr(), 1, uintptr(unsafe.Pointer(block)), 0, 0) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func GetFileVersionInfoSize(filename string, zeroHandle *Handle) (bufSize uint32, err error) { var _p0 *uint16 _p0, err = syscall.UTF16PtrFromString(filename) if err != nil { return } return _GetFileVersionInfoSize(_p0, zeroHandle) } func _GetFileVersionInfoSize(filename *uint16, zeroHandle *Handle) (bufSize uint32, err error) { r0, _, e1 := syscall.Syscall(procGetFileVersionInfoSizeW.Addr(), 2, uintptr(unsafe.Pointer(filename)), uintptr(unsafe.Pointer(zeroHandle)), 0) bufSize = uint32(r0) if bufSize == 0 { err = errnoErr(e1) } return } func GetFileVersionInfo(filename string, handle uint32, bufSize uint32, buffer unsafe.Pointer) (err error) { var _p0 *uint16 _p0, err = syscall.UTF16PtrFromString(filename) if err != nil { return } return _GetFileVersionInfo(_p0, handle, bufSize, buffer) } func _GetFileVersionInfo(filename *uint16, handle uint32, bufSize uint32, buffer unsafe.Pointer) (err error) { r1, _, e1 := syscall.Syscall6(procGetFileVersionInfoW.Addr(), 4, uintptr(unsafe.Pointer(filename)), uintptr(handle), uintptr(bufSize), uintptr(buffer), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func VerQueryValue(block unsafe.Pointer, subBlock string, pointerToBufferPointer unsafe.Pointer, bufSize *uint32) (err error) { var _p0 *uint16 _p0, err = syscall.UTF16PtrFromString(subBlock) if err != nil { return } return _VerQueryValue(block, _p0, pointerToBufferPointer, bufSize) } func _VerQueryValue(block unsafe.Pointer, subBlock *uint16, pointerToBufferPointer unsafe.Pointer, bufSize *uint32) (err error) { r1, _, e1 := syscall.Syscall6(procVerQueryValueW.Addr(), 4, uintptr(block), uintptr(unsafe.Pointer(subBlock)), uintptr(pointerToBufferPointer), uintptr(unsafe.Pointer(bufSize)), 0, 0) if r1 == 0 { err = errnoErr(e1) } return } func TimeBeginPeriod(period uint32) (err error) { r1, _, e1 := syscall.Syscall(proctimeBeginPeriod.Addr(), 1, uintptr(period), 0, 0) if r1 != 0 { err = errnoErr(e1) } return } func TimeEndPeriod(period uint32) (err error) { r1, _, e1 := syscall.Syscall(proctimeEndPeriod.Addr(), 1, uintptr(period), 0, 0) if r1 != 0 { err = errnoErr(e1) } return } func WinVerifyTrustEx(hwnd HWND, actionId *GUID, data *WinTrustData) (ret error) { r0, _, _ := syscall.Syscall(procWinVerifyTrustEx.Addr(), 3, uintptr(hwnd), uintptr(unsafe.Pointer(actionId)), uintptr(unsafe.Pointer(data))) if r0 != 0 { ret = syscall.Errno(r0) } return } func FreeAddrInfoW(addrinfo *AddrinfoW) { syscall.Syscall(procFreeAddrInfoW.Addr(), 1, uintptr(unsafe.Pointer(addrinfo)), 0, 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 WSACleanup() (err error) { r1, _, e1 := syscall.Syscall(procWSACleanup.Addr(), 0, 0, 0, 0) if r1 == socket_error { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func WSAGetOverlappedResult(h Handle, o *Overlapped, bytes *uint32, wait bool, flags *uint32) (err error) { var _p0 uint32 if wait { _p0 = 1 } r1, _, e1 := syscall.Syscall6(procWSAGetOverlappedResult.Addr(), 5, uintptr(h), uintptr(unsafe.Pointer(o)), uintptr(unsafe.Pointer(bytes)), uintptr(_p0), uintptr(unsafe.Pointer(flags)), 0) if r1 == 0 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func WSALookupServiceBegin(querySet *WSAQUERYSET, flags uint32, handle *Handle) (err error) { r1, _, e1 := syscall.Syscall(procWSALookupServiceBeginW.Addr(), 3, uintptr(unsafe.Pointer(querySet)), uintptr(flags), uintptr(unsafe.Pointer(handle))) if r1 == socket_error { err = errnoErr(e1) } return } func WSALookupServiceEnd(handle Handle) (err error) { r1, _, e1 := syscall.Syscall(procWSALookupServiceEnd.Addr(), 1, uintptr(handle), 0, 0) if r1 == socket_error { err = errnoErr(e1) } return } func WSALookupServiceNext(handle Handle, flags uint32, size *int32, querySet *WSAQUERYSET) (err error) { r1, _, e1 := syscall.Syscall6(procWSALookupServiceNextW.Addr(), 4, uintptr(handle), uintptr(flags), uintptr(unsafe.Pointer(size)), uintptr(unsafe.Pointer(querySet)), 0, 0) if r1 == socket_error { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func WSASocket(af int32, typ int32, protocol int32, protoInfo *WSAProtocolInfo, group uint32, flags uint32) (handle Handle, err error) { r0, _, e1 := syscall.Syscall6(procWSASocketW.Addr(), 6, uintptr(af), uintptr(typ), uintptr(protocol), uintptr(unsafe.Pointer(protoInfo)), uintptr(group), uintptr(flags)) handle = Handle(r0) if handle == InvalidHandle { err = errnoErr(e1) } 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 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 { err = errnoErr(e1) } return } func Closesocket(s Handle) (err error) { r1, _, e1 := syscall.Syscall(procclosesocket.Addr(), 1, uintptr(s), 0, 0) if r1 == socket_error { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func Ntohs(netshort uint16) (u uint16) { r0, _, _ := syscall.Syscall(procntohs.Addr(), 1, uintptr(netshort), 0, 0) u = uint16(r0) return } func recvfrom(s Handle, buf []byte, flags int32, from *RawSockaddrAny, fromlen *int32) (n int32, err error) { var _p0 *byte if len(buf) > 0 { _p0 = &buf[0] } r0, _, e1 := syscall.Syscall6(procrecvfrom.Addr(), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) n = int32(r0) if n == -1 { err = errnoErr(e1) } return } func sendto(s Handle, buf []byte, flags int32, to unsafe.Pointer, tolen int32) (err error) { var _p0 *byte if len(buf) > 0 { _p0 = &buf[0] } r1, _, e1 := syscall.Syscall6(procsendto.Addr(), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(tolen)) if r1 == socket_error { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } 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 { err = errnoErr(e1) } return } func WTSEnumerateSessions(handle Handle, reserved uint32, version uint32, sessions **WTS_SESSION_INFO, count *uint32) (err error) { r1, _, e1 := syscall.Syscall6(procWTSEnumerateSessionsW.Addr(), 5, uintptr(handle), uintptr(reserved), uintptr(version), uintptr(unsafe.Pointer(sessions)), uintptr(unsafe.Pointer(count)), 0) if r1 == 0 { err = errnoErr(e1) } return } func WTSFreeMemory(ptr uintptr) { syscall.Syscall(procWTSFreeMemory.Addr(), 1, uintptr(ptr), 0, 0) return } func WTSQueryUserToken(session uint32, token *Token) (err error) { r1, _, e1 := syscall.Syscall(procWTSQueryUserToken.Addr(), 2, uintptr(session), uintptr(unsafe.Pointer(token)), 0) if r1 == 0 { err = errnoErr(e1) } return } ================================================ FILE: vendor/golang.org/x/term/CONTRIBUTING.md ================================================ # 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. Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file. ================================================ FILE: vendor/golang.org/x/term/LICENSE ================================================ 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. ================================================ FILE: vendor/golang.org/x/term/PATENTS ================================================ 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. ================================================ FILE: vendor/golang.org/x/term/README.md ================================================ # Go terminal/console support [![Go Reference](https://pkg.go.dev/badge/golang.org/x/term.svg)](https://pkg.go.dev/golang.org/x/term) This repository provides Go terminal and console support packages. ## Download/Install The easiest way to install is to run `go get -u golang.org/x/term`. You can also manually git clone the repository to `$GOPATH/src/golang.org/x/term`. ## Report Issues / Send Patches This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html. The main issue tracker for the term repository is located at https://github.com/golang/go/issues. Prefix your issue with "x/term:" in the subject line, so it is easy to find. ================================================ FILE: vendor/golang.org/x/term/codereview.cfg ================================================ issuerepo: golang/go ================================================ FILE: vendor/golang.org/x/term/term.go ================================================ // Copyright 2019 The Go 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 term provides support functions for dealing with terminals, as // commonly found on UNIX systems. // // Putting a terminal into raw mode is the most common requirement: // // oldState, err := term.MakeRaw(int(os.Stdin.Fd())) // if err != nil { // panic(err) // } // defer term.Restore(int(os.Stdin.Fd()), oldState) // // Note that on non-Unix systems os.Stdin.Fd() may not be 0. package term // State contains the state of a terminal. type State struct { state } // IsTerminal returns whether the given file descriptor is a terminal. func IsTerminal(fd int) bool { return isTerminal(fd) } // MakeRaw puts the terminal connected to the given file descriptor into raw // mode and returns the previous state of the terminal so that it can be // restored. func MakeRaw(fd int) (*State, error) { return makeRaw(fd) } // GetState returns the current state of a terminal which may be useful to // restore the terminal after a signal. func GetState(fd int) (*State, error) { return getState(fd) } // Restore restores the terminal connected to the given file descriptor to a // previous state. func Restore(fd int, oldState *State) error { return restore(fd, oldState) } // GetSize returns the visible dimensions of the given terminal. // // These dimensions don't include any scrollback buffer height. func GetSize(fd int) (width, height int, err error) { return getSize(fd) } // ReadPassword reads a line of input from a terminal without local echo. This // is commonly used for inputting passwords and other sensitive data. The slice // returned does not include the \n. func ReadPassword(fd int) ([]byte, error) { return readPassword(fd) } ================================================ FILE: vendor/golang.org/x/term/term_plan9.go ================================================ // Copyright 2019 The Go 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 term import ( "fmt" "runtime" "golang.org/x/sys/plan9" ) type state struct{} func isTerminal(fd int) bool { path, err := plan9.Fd2path(fd) if err != nil { return false } return path == "/dev/cons" || path == "/mnt/term/dev/cons" } func makeRaw(fd int) (*State, error) { return nil, fmt.Errorf("terminal: MakeRaw not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) } func getState(fd int) (*State, error) { return nil, fmt.Errorf("terminal: GetState not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) } func restore(fd int, state *State) error { return fmt.Errorf("terminal: Restore not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) } func getSize(fd int) (width, height int, err error) { return 0, 0, fmt.Errorf("terminal: GetSize not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) } func readPassword(fd int) ([]byte, error) { return nil, fmt.Errorf("terminal: ReadPassword not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) } ================================================ FILE: vendor/golang.org/x/term/term_unix.go ================================================ // Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos package term import ( "golang.org/x/sys/unix" ) type state struct { termios unix.Termios } func isTerminal(fd int) bool { _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) return err == nil } func makeRaw(fd int) (*State, error) { termios, err := unix.IoctlGetTermios(fd, ioctlReadTermios) if err != nil { return nil, err } oldState := State{state{termios: *termios}} // This attempts to replicate the behaviour documented for cfmakeraw in // the termios(3) manpage. termios.Iflag &^= unix.IGNBRK | unix.BRKINT | unix.PARMRK | unix.ISTRIP | unix.INLCR | unix.IGNCR | unix.ICRNL | unix.IXON termios.Oflag &^= unix.OPOST termios.Lflag &^= unix.ECHO | unix.ECHONL | unix.ICANON | unix.ISIG | unix.IEXTEN termios.Cflag &^= unix.CSIZE | unix.PARENB termios.Cflag |= unix.CS8 termios.Cc[unix.VMIN] = 1 termios.Cc[unix.VTIME] = 0 if err := unix.IoctlSetTermios(fd, ioctlWriteTermios, termios); err != nil { return nil, err } return &oldState, nil } func getState(fd int) (*State, error) { termios, err := unix.IoctlGetTermios(fd, ioctlReadTermios) if err != nil { return nil, err } return &State{state{termios: *termios}}, nil } func restore(fd int, state *State) error { return unix.IoctlSetTermios(fd, ioctlWriteTermios, &state.termios) } func getSize(fd int) (width, height int, err error) { ws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ) if err != nil { return 0, 0, err } return int(ws.Col), int(ws.Row), nil } // passwordReader is an io.Reader that reads from a specific file descriptor. type passwordReader int func (r passwordReader) Read(buf []byte) (int, error) { return unix.Read(int(r), buf) } func readPassword(fd int) ([]byte, error) { termios, err := unix.IoctlGetTermios(fd, ioctlReadTermios) if err != nil { return nil, err } newState := *termios newState.Lflag &^= unix.ECHO newState.Lflag |= unix.ICANON | unix.ISIG newState.Iflag |= unix.ICRNL if err := unix.IoctlSetTermios(fd, ioctlWriteTermios, &newState); err != nil { return nil, err } defer unix.IoctlSetTermios(fd, ioctlWriteTermios, termios) return readPasswordLine(passwordReader(fd)) } ================================================ FILE: vendor/golang.org/x/term/term_unix_bsd.go ================================================ // 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. //go:build darwin || dragonfly || freebsd || netbsd || openbsd package term import "golang.org/x/sys/unix" const ioctlReadTermios = unix.TIOCGETA const ioctlWriteTermios = unix.TIOCSETA ================================================ FILE: vendor/golang.org/x/term/term_unix_other.go ================================================ // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build aix || linux || solaris || zos package term import "golang.org/x/sys/unix" const ioctlReadTermios = unix.TCGETS const ioctlWriteTermios = unix.TCSETS ================================================ FILE: vendor/golang.org/x/term/term_unsupported.go ================================================ // Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !zos && !windows && !solaris && !plan9 package term import ( "fmt" "runtime" ) type state struct{} func isTerminal(fd int) bool { return false } func makeRaw(fd int) (*State, error) { return nil, fmt.Errorf("terminal: MakeRaw not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) } func getState(fd int) (*State, error) { return nil, fmt.Errorf("terminal: GetState not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) } func restore(fd int, state *State) error { return fmt.Errorf("terminal: Restore not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) } func getSize(fd int) (width, height int, err error) { return 0, 0, fmt.Errorf("terminal: GetSize not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) } func readPassword(fd int) ([]byte, error) { return nil, fmt.Errorf("terminal: ReadPassword not implemented on %s/%s", runtime.GOOS, runtime.GOARCH) } ================================================ FILE: vendor/golang.org/x/term/term_windows.go ================================================ // Copyright 2019 The Go 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 term import ( "os" "golang.org/x/sys/windows" ) type state struct { mode uint32 } func isTerminal(fd int) bool { var st uint32 err := windows.GetConsoleMode(windows.Handle(fd), &st) return err == nil } func makeRaw(fd int) (*State, error) { var st uint32 if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil { return nil, err } raw := st &^ (windows.ENABLE_ECHO_INPUT | windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT | windows.ENABLE_PROCESSED_OUTPUT) if err := windows.SetConsoleMode(windows.Handle(fd), raw); err != nil { return nil, err } return &State{state{st}}, nil } func getState(fd int) (*State, error) { var st uint32 if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil { return nil, err } return &State{state{st}}, nil } func restore(fd int, state *State) error { return windows.SetConsoleMode(windows.Handle(fd), state.mode) } func getSize(fd int) (width, height int, err error) { var info windows.ConsoleScreenBufferInfo if err := windows.GetConsoleScreenBufferInfo(windows.Handle(fd), &info); err != nil { return 0, 0, err } return int(info.Window.Right - info.Window.Left + 1), int(info.Window.Bottom - info.Window.Top + 1), nil } func readPassword(fd int) ([]byte, error) { var st uint32 if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil { return nil, err } old := st st &^= (windows.ENABLE_ECHO_INPUT | windows.ENABLE_LINE_INPUT) st |= (windows.ENABLE_PROCESSED_OUTPUT | windows.ENABLE_PROCESSED_INPUT) if err := windows.SetConsoleMode(windows.Handle(fd), st); err != nil { return nil, err } defer windows.SetConsoleMode(windows.Handle(fd), old) var h windows.Handle p, _ := windows.GetCurrentProcess() if err := windows.DuplicateHandle(p, windows.Handle(fd), p, &h, 0, false, windows.DUPLICATE_SAME_ACCESS); err != nil { return nil, err } f := os.NewFile(uintptr(h), "stdin") defer f.Close() return readPasswordLine(f) } ================================================ FILE: vendor/golang.org/x/term/terminal.go ================================================ // 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 term import ( "bytes" "io" "runtime" "strconv" "sync" "unicode/utf8" ) // EscapeCodes contains escape sequences that can be written to the terminal in // order to achieve different styles of text. type EscapeCodes struct { // Foreground colors Black, Red, Green, Yellow, Blue, Magenta, Cyan, White []byte // Reset all attributes Reset []byte } var vt100EscapeCodes = EscapeCodes{ Black: []byte{keyEscape, '[', '3', '0', 'm'}, Red: []byte{keyEscape, '[', '3', '1', 'm'}, Green: []byte{keyEscape, '[', '3', '2', 'm'}, Yellow: []byte{keyEscape, '[', '3', '3', 'm'}, Blue: []byte{keyEscape, '[', '3', '4', 'm'}, Magenta: []byte{keyEscape, '[', '3', '5', 'm'}, Cyan: []byte{keyEscape, '[', '3', '6', 'm'}, White: []byte{keyEscape, '[', '3', '7', 'm'}, Reset: []byte{keyEscape, '[', '0', 'm'}, } // Terminal contains the state for running a VT100 terminal that is capable of // reading lines of input. type Terminal struct { // AutoCompleteCallback, if non-null, is called for each keypress with // the full input line and the current position of the cursor (in // bytes, as an index into |line|). If it returns ok=false, the key // press is processed normally. Otherwise it returns a replacement line // and the new cursor position. AutoCompleteCallback func(line string, pos int, key rune) (newLine string, newPos int, ok bool) // Escape contains a pointer to the escape codes for this terminal. // It's always a valid pointer, although the escape codes themselves // may be empty if the terminal doesn't support them. Escape *EscapeCodes // lock protects the terminal and the state in this object from // concurrent processing of a key press and a Write() call. lock sync.Mutex c io.ReadWriter prompt []rune // line is the current line being entered. line []rune // pos is the logical position of the cursor in line pos int // echo is true if local echo is enabled echo bool // pasteActive is true iff there is a bracketed paste operation in // progress. pasteActive bool // cursorX contains the current X value of the cursor where the left // edge is 0. cursorY contains the row number where the first row of // the current line is 0. cursorX, cursorY int // maxLine is the greatest value of cursorY so far. maxLine int termWidth, termHeight int // outBuf contains the terminal data to be sent. outBuf []byte // remainder contains the remainder of any partial key sequences after // a read. It aliases into inBuf. remainder []byte inBuf [256]byte // history contains previously entered commands so that they can be // accessed with the up and down keys. history stRingBuffer // historyIndex stores the currently accessed history entry, where zero // means the immediately previous entry. historyIndex int // When navigating up and down the history it's possible to return to // the incomplete, initial line. That value is stored in // historyPending. historyPending string } // NewTerminal runs a VT100 terminal on the given ReadWriter. If the ReadWriter is // a local terminal, that terminal must first have been put into raw mode. // prompt is a string that is written at the start of each input line (i.e. // "> "). func NewTerminal(c io.ReadWriter, prompt string) *Terminal { return &Terminal{ Escape: &vt100EscapeCodes, c: c, prompt: []rune(prompt), termWidth: 80, termHeight: 24, echo: true, historyIndex: -1, } } const ( keyCtrlC = 3 keyCtrlD = 4 keyCtrlU = 21 keyEnter = '\r' keyEscape = 27 keyBackspace = 127 keyUnknown = 0xd800 /* UTF-16 surrogate area */ + iota keyUp keyDown keyLeft keyRight keyAltLeft keyAltRight keyHome keyEnd keyDeleteWord keyDeleteLine keyClearScreen keyPasteStart keyPasteEnd ) var ( crlf = []byte{'\r', '\n'} pasteStart = []byte{keyEscape, '[', '2', '0', '0', '~'} pasteEnd = []byte{keyEscape, '[', '2', '0', '1', '~'} ) // bytesToKey tries to parse a key sequence from b. If successful, it returns // the key and the remainder of the input. Otherwise it returns utf8.RuneError. func bytesToKey(b []byte, pasteActive bool) (rune, []byte) { if len(b) == 0 { return utf8.RuneError, nil } if !pasteActive { switch b[0] { case 1: // ^A return keyHome, b[1:] case 2: // ^B return keyLeft, b[1:] case 5: // ^E return keyEnd, b[1:] case 6: // ^F return keyRight, b[1:] case 8: // ^H return keyBackspace, b[1:] case 11: // ^K return keyDeleteLine, b[1:] case 12: // ^L return keyClearScreen, b[1:] case 23: // ^W return keyDeleteWord, b[1:] case 14: // ^N return keyDown, b[1:] case 16: // ^P return keyUp, b[1:] } } if b[0] != keyEscape { if !utf8.FullRune(b) { return utf8.RuneError, b } r, l := utf8.DecodeRune(b) return r, b[l:] } if !pasteActive && len(b) >= 3 && b[0] == keyEscape && b[1] == '[' { switch b[2] { case 'A': return keyUp, b[3:] case 'B': return keyDown, b[3:] case 'C': return keyRight, b[3:] case 'D': return keyLeft, b[3:] case 'H': return keyHome, b[3:] case 'F': return keyEnd, b[3:] } } if !pasteActive && len(b) >= 6 && b[0] == keyEscape && b[1] == '[' && b[2] == '1' && b[3] == ';' && b[4] == '3' { switch b[5] { case 'C': return keyAltRight, b[6:] case 'D': return keyAltLeft, b[6:] } } if !pasteActive && len(b) >= 6 && bytes.Equal(b[:6], pasteStart) { return keyPasteStart, b[6:] } if pasteActive && len(b) >= 6 && bytes.Equal(b[:6], pasteEnd) { return keyPasteEnd, b[6:] } // If we get here then we have a key that we don't recognise, or a // partial sequence. It's not clear how one should find the end of a // sequence without knowing them all, but it seems that [a-zA-Z~] only // appears at the end of a sequence. for i, c := range b[0:] { if c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c == '~' { return keyUnknown, b[i+1:] } } return utf8.RuneError, b } // queue appends data to the end of t.outBuf func (t *Terminal) queue(data []rune) { t.outBuf = append(t.outBuf, []byte(string(data))...) } var space = []rune{' '} func isPrintable(key rune) bool { isInSurrogateArea := key >= 0xd800 && key <= 0xdbff return key >= 32 && !isInSurrogateArea } // moveCursorToPos appends data to t.outBuf which will move the cursor to the // given, logical position in the text. func (t *Terminal) moveCursorToPos(pos int) { if !t.echo { return } x := visualLength(t.prompt) + pos y := x / t.termWidth x = x % t.termWidth up := 0 if y < t.cursorY { up = t.cursorY - y } down := 0 if y > t.cursorY { down = y - t.cursorY } left := 0 if x < t.cursorX { left = t.cursorX - x } right := 0 if x > t.cursorX { right = x - t.cursorX } t.cursorX = x t.cursorY = y t.move(up, down, left, right) } func (t *Terminal) move(up, down, left, right int) { m := []rune{} // 1 unit up can be expressed as ^[[A or ^[A // 5 units up can be expressed as ^[[5A if up == 1 { m = append(m, keyEscape, '[', 'A') } else if up > 1 { m = append(m, keyEscape, '[') m = append(m, []rune(strconv.Itoa(up))...) m = append(m, 'A') } if down == 1 { m = append(m, keyEscape, '[', 'B') } else if down > 1 { m = append(m, keyEscape, '[') m = append(m, []rune(strconv.Itoa(down))...) m = append(m, 'B') } if right == 1 { m = append(m, keyEscape, '[', 'C') } else if right > 1 { m = append(m, keyEscape, '[') m = append(m, []rune(strconv.Itoa(right))...) m = append(m, 'C') } if left == 1 { m = append(m, keyEscape, '[', 'D') } else if left > 1 { m = append(m, keyEscape, '[') m = append(m, []rune(strconv.Itoa(left))...) m = append(m, 'D') } t.queue(m) } func (t *Terminal) clearLineToRight() { op := []rune{keyEscape, '[', 'K'} t.queue(op) } const maxLineLength = 4096 func (t *Terminal) setLine(newLine []rune, newPos int) { if t.echo { t.moveCursorToPos(0) t.writeLine(newLine) for i := len(newLine); i < len(t.line); i++ { t.writeLine(space) } t.moveCursorToPos(newPos) } t.line = newLine t.pos = newPos } func (t *Terminal) advanceCursor(places int) { t.cursorX += places t.cursorY += t.cursorX / t.termWidth if t.cursorY > t.maxLine { t.maxLine = t.cursorY } t.cursorX = t.cursorX % t.termWidth if places > 0 && t.cursorX == 0 { // Normally terminals will advance the current position // when writing a character. But that doesn't happen // for the last character in a line. However, when // writing a character (except a new line) that causes // a line wrap, the position will be advanced two // places. // // So, if we are stopping at the end of a line, we // need to write a newline so that our cursor can be // advanced to the next line. t.outBuf = append(t.outBuf, '\r', '\n') } } func (t *Terminal) eraseNPreviousChars(n int) { if n == 0 { return } if t.pos < n { n = t.pos } t.pos -= n t.moveCursorToPos(t.pos) copy(t.line[t.pos:], t.line[n+t.pos:]) t.line = t.line[:len(t.line)-n] if t.echo { t.writeLine(t.line[t.pos:]) for i := 0; i < n; i++ { t.queue(space) } t.advanceCursor(n) t.moveCursorToPos(t.pos) } } // countToLeftWord returns then number of characters from the cursor to the // start of the previous word. func (t *Terminal) countToLeftWord() int { if t.pos == 0 { return 0 } pos := t.pos - 1 for pos > 0 { if t.line[pos] != ' ' { break } pos-- } for pos > 0 { if t.line[pos] == ' ' { pos++ break } pos-- } return t.pos - pos } // countToRightWord returns then number of characters from the cursor to the // start of the next word. func (t *Terminal) countToRightWord() int { pos := t.pos for pos < len(t.line) { if t.line[pos] == ' ' { break } pos++ } for pos < len(t.line) { if t.line[pos] != ' ' { break } pos++ } return pos - t.pos } // visualLength returns the number of visible glyphs in s. func visualLength(runes []rune) int { inEscapeSeq := false length := 0 for _, r := range runes { switch { case inEscapeSeq: if (r >= 'a' && r <= 'z') || (r >= 'A' && r <= 'Z') { inEscapeSeq = false } case r == '\x1b': inEscapeSeq = true default: length++ } } return length } // handleKey processes the given key and, optionally, returns a line of text // that the user has entered. func (t *Terminal) handleKey(key rune) (line string, ok bool) { if t.pasteActive && key != keyEnter { t.addKeyToLine(key) return } switch key { case keyBackspace: if t.pos == 0 { return } t.eraseNPreviousChars(1) case keyAltLeft: // move left by a word. t.pos -= t.countToLeftWord() t.moveCursorToPos(t.pos) case keyAltRight: // move right by a word. t.pos += t.countToRightWord() t.moveCursorToPos(t.pos) case keyLeft: if t.pos == 0 { return } t.pos-- t.moveCursorToPos(t.pos) case keyRight: if t.pos == len(t.line) { return } t.pos++ t.moveCursorToPos(t.pos) case keyHome: if t.pos == 0 { return } t.pos = 0 t.moveCursorToPos(t.pos) case keyEnd: if t.pos == len(t.line) { return } t.pos = len(t.line) t.moveCursorToPos(t.pos) case keyUp: entry, ok := t.history.NthPreviousEntry(t.historyIndex + 1) if !ok { return "", false } if t.historyIndex == -1 { t.historyPending = string(t.line) } t.historyIndex++ runes := []rune(entry) t.setLine(runes, len(runes)) case keyDown: switch t.historyIndex { case -1: return case 0: runes := []rune(t.historyPending) t.setLine(runes, len(runes)) t.historyIndex-- default: entry, ok := t.history.NthPreviousEntry(t.historyIndex - 1) if ok { t.historyIndex-- runes := []rune(entry) t.setLine(runes, len(runes)) } } case keyEnter: t.moveCursorToPos(len(t.line)) t.queue([]rune("\r\n")) line = string(t.line) ok = true t.line = t.line[:0] t.pos = 0 t.cursorX = 0 t.cursorY = 0 t.maxLine = 0 case keyDeleteWord: // Delete zero or more spaces and then one or more characters. t.eraseNPreviousChars(t.countToLeftWord()) case keyDeleteLine: // Delete everything from the current cursor position to the // end of line. for i := t.pos; i < len(t.line); i++ { t.queue(space) t.advanceCursor(1) } t.line = t.line[:t.pos] t.moveCursorToPos(t.pos) case keyCtrlD: // Erase the character under the current position. // The EOF case when the line is empty is handled in // readLine(). if t.pos < len(t.line) { t.pos++ t.eraseNPreviousChars(1) } case keyCtrlU: t.eraseNPreviousChars(t.pos) case keyClearScreen: // Erases the screen and moves the cursor to the home position. t.queue([]rune("\x1b[2J\x1b[H")) t.queue(t.prompt) t.cursorX, t.cursorY = 0, 0 t.advanceCursor(visualLength(t.prompt)) t.setLine(t.line, t.pos) default: if t.AutoCompleteCallback != nil { prefix := string(t.line[:t.pos]) suffix := string(t.line[t.pos:]) t.lock.Unlock() newLine, newPos, completeOk := t.AutoCompleteCallback(prefix+suffix, len(prefix), key) t.lock.Lock() if completeOk { t.setLine([]rune(newLine), utf8.RuneCount([]byte(newLine)[:newPos])) return } } if !isPrintable(key) { return } if len(t.line) == maxLineLength { return } t.addKeyToLine(key) } return } // addKeyToLine inserts the given key at the current position in the current // line. func (t *Terminal) addKeyToLine(key rune) { if len(t.line) == cap(t.line) { newLine := make([]rune, len(t.line), 2*(1+len(t.line))) copy(newLine, t.line) t.line = newLine } t.line = t.line[:len(t.line)+1] copy(t.line[t.pos+1:], t.line[t.pos:]) t.line[t.pos] = key if t.echo { t.writeLine(t.line[t.pos:]) } t.pos++ t.moveCursorToPos(t.pos) } func (t *Terminal) writeLine(line []rune) { for len(line) != 0 { remainingOnLine := t.termWidth - t.cursorX todo := len(line) if todo > remainingOnLine { todo = remainingOnLine } t.queue(line[:todo]) t.advanceCursor(visualLength(line[:todo])) line = line[todo:] } } // writeWithCRLF writes buf to w but replaces all occurrences of \n with \r\n. func writeWithCRLF(w io.Writer, buf []byte) (n int, err error) { for len(buf) > 0 { i := bytes.IndexByte(buf, '\n') todo := len(buf) if i >= 0 { todo = i } var nn int nn, err = w.Write(buf[:todo]) n += nn if err != nil { return n, err } buf = buf[todo:] if i >= 0 { if _, err = w.Write(crlf); err != nil { return n, err } n++ buf = buf[1:] } } return n, nil } func (t *Terminal) Write(buf []byte) (n int, err error) { t.lock.Lock() defer t.lock.Unlock() if t.cursorX == 0 && t.cursorY == 0 { // This is the easy case: there's nothing on the screen that we // have to move out of the way. return writeWithCRLF(t.c, buf) } // We have a prompt and possibly user input on the screen. We // have to clear it first. t.move(0 /* up */, 0 /* down */, t.cursorX /* left */, 0 /* right */) t.cursorX = 0 t.clearLineToRight() for t.cursorY > 0 { t.move(1 /* up */, 0, 0, 0) t.cursorY-- t.clearLineToRight() } if _, err = t.c.Write(t.outBuf); err != nil { return } t.outBuf = t.outBuf[:0] if n, err = writeWithCRLF(t.c, buf); err != nil { return } t.writeLine(t.prompt) if t.echo { t.writeLine(t.line) } t.moveCursorToPos(t.pos) if _, err = t.c.Write(t.outBuf); err != nil { return } t.outBuf = t.outBuf[:0] return } // ReadPassword temporarily changes the prompt and reads a password, without // echo, from the terminal. func (t *Terminal) ReadPassword(prompt string) (line string, err error) { t.lock.Lock() defer t.lock.Unlock() oldPrompt := t.prompt t.prompt = []rune(prompt) t.echo = false line, err = t.readLine() t.prompt = oldPrompt t.echo = true return } // ReadLine returns a line of input from the terminal. func (t *Terminal) ReadLine() (line string, err error) { t.lock.Lock() defer t.lock.Unlock() return t.readLine() } func (t *Terminal) readLine() (line string, err error) { // t.lock must be held at this point if t.cursorX == 0 && t.cursorY == 0 { t.writeLine(t.prompt) t.c.Write(t.outBuf) t.outBuf = t.outBuf[:0] } lineIsPasted := t.pasteActive for { rest := t.remainder lineOk := false for !lineOk { var key rune key, rest = bytesToKey(rest, t.pasteActive) if key == utf8.RuneError { break } if !t.pasteActive { if key == keyCtrlD { if len(t.line) == 0 { return "", io.EOF } } if key == keyCtrlC { return "", io.EOF } if key == keyPasteStart { t.pasteActive = true if len(t.line) == 0 { lineIsPasted = true } continue } } else if key == keyPasteEnd { t.pasteActive = false continue } if !t.pasteActive { lineIsPasted = false } line, lineOk = t.handleKey(key) } if len(rest) > 0 { n := copy(t.inBuf[:], rest) t.remainder = t.inBuf[:n] } else { t.remainder = nil } t.c.Write(t.outBuf) t.outBuf = t.outBuf[:0] if lineOk { if t.echo { t.historyIndex = -1 t.history.Add(line) } if lineIsPasted { err = ErrPasteIndicator } return } // t.remainder is a slice at the beginning of t.inBuf // containing a partial key sequence readBuf := t.inBuf[len(t.remainder):] var n int t.lock.Unlock() n, err = t.c.Read(readBuf) t.lock.Lock() if err != nil { return } t.remainder = t.inBuf[:n+len(t.remainder)] } } // SetPrompt sets the prompt to be used when reading subsequent lines. func (t *Terminal) SetPrompt(prompt string) { t.lock.Lock() defer t.lock.Unlock() t.prompt = []rune(prompt) } func (t *Terminal) clearAndRepaintLinePlusNPrevious(numPrevLines int) { // Move cursor to column zero at the start of the line. t.move(t.cursorY, 0, t.cursorX, 0) t.cursorX, t.cursorY = 0, 0 t.clearLineToRight() for t.cursorY < numPrevLines { // Move down a line t.move(0, 1, 0, 0) t.cursorY++ t.clearLineToRight() } // Move back to beginning. t.move(t.cursorY, 0, 0, 0) t.cursorX, t.cursorY = 0, 0 t.queue(t.prompt) t.advanceCursor(visualLength(t.prompt)) t.writeLine(t.line) t.moveCursorToPos(t.pos) } func (t *Terminal) SetSize(width, height int) error { t.lock.Lock() defer t.lock.Unlock() if width == 0 { width = 1 } oldWidth := t.termWidth t.termWidth, t.termHeight = width, height switch { case width == oldWidth: // If the width didn't change then nothing else needs to be // done. return nil case len(t.line) == 0 && t.cursorX == 0 && t.cursorY == 0: // If there is nothing on current line and no prompt printed, // just do nothing return nil case width < oldWidth: // Some terminals (e.g. xterm) will truncate lines that were // too long when shinking. Others, (e.g. gnome-terminal) will // attempt to wrap them. For the former, repainting t.maxLine // works great, but that behaviour goes badly wrong in the case // of the latter because they have doubled every full line. // We assume that we are working on a terminal that wraps lines // and adjust the cursor position based on every previous line // wrapping and turning into two. This causes the prompt on // xterms to move upwards, which isn't great, but it avoids a // huge mess with gnome-terminal. if t.cursorX >= t.termWidth { t.cursorX = t.termWidth - 1 } t.cursorY *= 2 t.clearAndRepaintLinePlusNPrevious(t.maxLine * 2) case width > oldWidth: // If the terminal expands then our position calculations will // be wrong in the future because we think the cursor is // |t.pos| chars into the string, but there will be a gap at // the end of any wrapped line. // // But the position will actually be correct until we move, so // we can move back to the beginning and repaint everything. t.clearAndRepaintLinePlusNPrevious(t.maxLine) } _, err := t.c.Write(t.outBuf) t.outBuf = t.outBuf[:0] return err } type pasteIndicatorError struct{} func (pasteIndicatorError) Error() string { return "terminal: ErrPasteIndicator not correctly handled" } // ErrPasteIndicator may be returned from ReadLine as the error, in addition // to valid line data. It indicates that bracketed paste mode is enabled and // that the returned line consists only of pasted data. Programs may wish to // interpret pasted data more literally than typed data. var ErrPasteIndicator = pasteIndicatorError{} // SetBracketedPasteMode requests that the terminal bracket paste operations // with markers. Not all terminals support this but, if it is supported, then // enabling this mode will stop any autocomplete callback from running due to // pastes. Additionally, any lines that are completely pasted will be returned // from ReadLine with the error set to ErrPasteIndicator. func (t *Terminal) SetBracketedPasteMode(on bool) { if on { io.WriteString(t.c, "\x1b[?2004h") } else { io.WriteString(t.c, "\x1b[?2004l") } } // stRingBuffer is a ring buffer of strings. type stRingBuffer struct { // entries contains max elements. entries []string max int // head contains the index of the element most recently added to the ring. head int // size contains the number of elements in the ring. size int } func (s *stRingBuffer) Add(a string) { if s.entries == nil { const defaultNumEntries = 100 s.entries = make([]string, defaultNumEntries) s.max = defaultNumEntries } s.head = (s.head + 1) % s.max s.entries[s.head] = a if s.size < s.max { s.size++ } } // NthPreviousEntry returns the value passed to the nth previous call to Add. // If n is zero then the immediately prior value is returned, if one, then the // next most recent, and so on. If such an element doesn't exist then ok is // false. func (s *stRingBuffer) NthPreviousEntry(n int) (value string, ok bool) { if n < 0 || n >= s.size { return "", false } index := s.head - n if index < 0 { index += s.max } return s.entries[index], true } // readPasswordLine reads from reader until it finds \n or io.EOF. // The slice returned does not include the \n. // readPasswordLine also ignores any \r it finds. // Windows uses \r as end of line. So, on Windows, readPasswordLine // reads until it finds \r and ignores any \n it finds during processing. func readPasswordLine(reader io.Reader) ([]byte, error) { var buf [1]byte var ret []byte for { n, err := reader.Read(buf[:]) if n > 0 { switch buf[0] { case '\b': if len(ret) > 0 { ret = ret[:len(ret)-1] } case '\n': if runtime.GOOS != "windows" { return ret, nil } // otherwise ignore \n case '\r': if runtime.GOOS == "windows" { return ret, nil } // otherwise ignore \r default: ret = append(ret, buf[0]) } continue } if err != nil { if err == io.EOF && len(ret) > 0 { return ret, nil } return ret, err } } } ================================================ FILE: vendor/golang.org/x/text/LICENSE ================================================ 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. ================================================ FILE: vendor/golang.org/x/text/PATENTS ================================================ 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. ================================================ FILE: vendor/golang.org/x/text/encoding/encoding.go ================================================ // 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 encoding defines an interface for character encodings, such as Shift // JIS and Windows 1252, that can convert to and from UTF-8. // // Encoding implementations are provided in other packages, such as // golang.org/x/text/encoding/charmap and // golang.org/x/text/encoding/japanese. package encoding // import "golang.org/x/text/encoding" import ( "errors" "io" "strconv" "unicode/utf8" "golang.org/x/text/encoding/internal/identifier" "golang.org/x/text/transform" ) // TODO: // - There seems to be some inconsistency in when decoders return errors // and when not. Also documentation seems to suggest they shouldn't return // errors at all (except for UTF-16). // - Encoders seem to rely on or at least benefit from the input being in NFC // normal form. Perhaps add an example how users could prepare their output. // Encoding is a character set encoding that can be transformed to and from // UTF-8. type Encoding interface { // NewDecoder returns a Decoder. NewDecoder() *Decoder // NewEncoder returns an Encoder. NewEncoder() *Encoder } // A Decoder converts bytes to UTF-8. It implements transform.Transformer. // // Transforming source bytes that are not of that encoding will not result in an // error per se. Each byte that cannot be transcoded will be represented in the // output by the UTF-8 encoding of '\uFFFD', the replacement rune. type Decoder struct { transform.Transformer // This forces external creators of Decoders to use names in struct // initializers, allowing for future extendibility without having to break // code. _ struct{} } // Bytes converts the given encoded bytes to UTF-8. It returns the converted // bytes or nil, err if any error occurred. func (d *Decoder) Bytes(b []byte) ([]byte, error) { b, _, err := transform.Bytes(d, b) if err != nil { return nil, err } return b, nil } // String converts the given encoded string to UTF-8. It returns the converted // string or "", err if any error occurred. func (d *Decoder) String(s string) (string, error) { s, _, err := transform.String(d, s) if err != nil { return "", err } return s, nil } // Reader wraps another Reader to decode its bytes. // // The Decoder may not be used for any other operation as long as the returned // Reader is in use. func (d *Decoder) Reader(r io.Reader) io.Reader { return transform.NewReader(r, d) } // An Encoder converts bytes from UTF-8. It implements transform.Transformer. // // Each rune that cannot be transcoded will result in an error. In this case, // the transform will consume all source byte up to, not including the offending // rune. Transforming source bytes that are not valid UTF-8 will be replaced by // `\uFFFD`. To return early with an error instead, use transform.Chain to // preprocess the data with a UTF8Validator. type Encoder struct { transform.Transformer // This forces external creators of Encoders to use names in struct // initializers, allowing for future extendibility without having to break // code. _ struct{} } // Bytes converts bytes from UTF-8. It returns the converted bytes or nil, err if // any error occurred. func (e *Encoder) Bytes(b []byte) ([]byte, error) { b, _, err := transform.Bytes(e, b) if err != nil { return nil, err } return b, nil } // String converts a string from UTF-8. It returns the converted string or // "", err if any error occurred. func (e *Encoder) String(s string) (string, error) { s, _, err := transform.String(e, s) if err != nil { return "", err } return s, nil } // Writer wraps another Writer to encode its UTF-8 output. // // The Encoder may not be used for any other operation as long as the returned // Writer is in use. func (e *Encoder) Writer(w io.Writer) io.Writer { return transform.NewWriter(w, e) } // ASCIISub is the ASCII substitute character, as recommended by // https://unicode.org/reports/tr36/#Text_Comparison const ASCIISub = '\x1a' // Nop is the nop encoding. Its transformed bytes are the same as the source // bytes; it does not replace invalid UTF-8 sequences. var Nop Encoding = nop{} type nop struct{} func (nop) NewDecoder() *Decoder { return &Decoder{Transformer: transform.Nop} } func (nop) NewEncoder() *Encoder { return &Encoder{Transformer: transform.Nop} } // Replacement is the replacement encoding. Decoding from the replacement // encoding yields a single '\uFFFD' replacement rune. Encoding from UTF-8 to // the replacement encoding yields the same as the source bytes except that // invalid UTF-8 is converted to '\uFFFD'. // // It is defined at http://encoding.spec.whatwg.org/#replacement var Replacement Encoding = replacement{} type replacement struct{} func (replacement) NewDecoder() *Decoder { return &Decoder{Transformer: replacementDecoder{}} } func (replacement) NewEncoder() *Encoder { return &Encoder{Transformer: replacementEncoder{}} } func (replacement) ID() (mib identifier.MIB, other string) { return identifier.Replacement, "" } type replacementDecoder struct{ transform.NopResetter } func (replacementDecoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { if len(dst) < 3 { return 0, 0, transform.ErrShortDst } if atEOF { const fffd = "\ufffd" dst[0] = fffd[0] dst[1] = fffd[1] dst[2] = fffd[2] nDst = 3 } return nDst, len(src), nil } type replacementEncoder struct{ transform.NopResetter } func (replacementEncoder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { r, size := rune(0), 0 for ; nSrc < len(src); nSrc += size { r = rune(src[nSrc]) // Decode a 1-byte rune. if r < utf8.RuneSelf { size = 1 } else { // Decode a multi-byte rune. r, size = utf8.DecodeRune(src[nSrc:]) if size == 1 { // All valid runes of size 1 (those below utf8.RuneSelf) were // handled above. We have invalid UTF-8 or we haven't seen the // full character yet. if !atEOF && !utf8.FullRune(src[nSrc:]) { err = transform.ErrShortSrc break } r = '\ufffd' } } if nDst+utf8.RuneLen(r) > len(dst) { err = transform.ErrShortDst break } nDst += utf8.EncodeRune(dst[nDst:], r) } return nDst, nSrc, err } // HTMLEscapeUnsupported wraps encoders to replace source runes outside the // repertoire of the destination encoding with HTML escape sequences. // // This wrapper exists to comply to URL and HTML forms requiring a // non-terminating legacy encoder. The produced sequences may lead to data // loss as they are indistinguishable from legitimate input. To avoid this // issue, use UTF-8 encodings whenever possible. func HTMLEscapeUnsupported(e *Encoder) *Encoder { return &Encoder{Transformer: &errorHandler{e, errorToHTML}} } // ReplaceUnsupported wraps encoders to replace source runes outside the // repertoire of the destination encoding with an encoding-specific // replacement. // // This wrapper is only provided for backwards compatibility and legacy // handling. Its use is strongly discouraged. Use UTF-8 whenever possible. func ReplaceUnsupported(e *Encoder) *Encoder { return &Encoder{Transformer: &errorHandler{e, errorToReplacement}} } type errorHandler struct { *Encoder handler func(dst []byte, r rune, err repertoireError) (n int, ok bool) } // TODO: consider making this error public in some form. type repertoireError interface { Replacement() byte } func (h errorHandler) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { nDst, nSrc, err = h.Transformer.Transform(dst, src, atEOF) for err != nil { rerr, ok := err.(repertoireError) if !ok { return nDst, nSrc, err } r, sz := utf8.DecodeRune(src[nSrc:]) n, ok := h.handler(dst[nDst:], r, rerr) if !ok { return nDst, nSrc, transform.ErrShortDst } err = nil nDst += n if nSrc += sz; nSrc < len(src) { var dn, sn int dn, sn, err = h.Transformer.Transform(dst[nDst:], src[nSrc:], atEOF) nDst += dn nSrc += sn } } return nDst, nSrc, err } func errorToHTML(dst []byte, r rune, err repertoireError) (n int, ok bool) { buf := [8]byte{} b := strconv.AppendUint(buf[:0], uint64(r), 10) if n = len(b) + len("&#;"); n >= len(dst) { return 0, false } dst[0] = '&' dst[1] = '#' dst[copy(dst[2:], b)+2] = ';' return n, true } func errorToReplacement(dst []byte, r rune, err repertoireError) (n int, ok bool) { if len(dst) == 0 { return 0, false } dst[0] = err.Replacement() return 1, true } // ErrInvalidUTF8 means that a transformer encountered invalid UTF-8. var ErrInvalidUTF8 = errors.New("encoding: invalid UTF-8") // UTF8Validator is a transformer that returns ErrInvalidUTF8 on the first // input byte that is not valid UTF-8. var UTF8Validator transform.Transformer = utf8Validator{} type utf8Validator struct{ transform.NopResetter } func (utf8Validator) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { n := len(src) if n > len(dst) { n = len(dst) } for i := 0; i < n; { if c := src[i]; c < utf8.RuneSelf { dst[i] = c i++ continue } _, size := utf8.DecodeRune(src[i:]) if size == 1 { // All valid runes of size 1 (those below utf8.RuneSelf) were // handled above. We have invalid UTF-8 or we haven't seen the // full character yet. err = ErrInvalidUTF8 if !atEOF && !utf8.FullRune(src[i:]) { err = transform.ErrShortSrc } return i, i, err } if i+size > len(dst) { return i, i, transform.ErrShortDst } for ; size > 0; size-- { dst[i] = src[i] i++ } } if len(src) > len(dst) { err = transform.ErrShortDst } return n, n, err } ================================================ FILE: vendor/golang.org/x/text/encoding/internal/identifier/identifier.go ================================================ // 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. //go:generate go run gen.go // Package identifier defines the contract between implementations of Encoding // and Index by defining identifiers that uniquely identify standardized coded // character sets (CCS) and character encoding schemes (CES), which we will // together refer to as encodings, for which Encoding implementations provide // converters to and from UTF-8. This package is typically only of concern to // implementers of Indexes and Encodings. // // One part of the identifier is the MIB code, which is defined by IANA and // uniquely identifies a CCS or CES. Each code is associated with data that // references authorities, official documentation as well as aliases and MIME // names. // // Not all CESs are covered by the IANA registry. The "other" string that is // returned by ID can be used to identify other character sets or versions of // existing ones. // // It is recommended that each package that provides a set of Encodings provide // the All and Common variables to reference all supported encodings and // commonly used subset. This allows Index implementations to include all // available encodings without explicitly referencing or knowing about them. package identifier // Note: this package is internal, but could be made public if there is a need // for writing third-party Indexes and Encodings. // References: // - http://source.icu-project.org/repos/icu/icu/trunk/source/data/mappings/convrtrs.txt // - http://www.iana.org/assignments/character-sets/character-sets.xhtml // - http://www.iana.org/assignments/ianacharset-mib/ianacharset-mib // - http://www.ietf.org/rfc/rfc2978.txt // - https://www.unicode.org/reports/tr22/ // - http://www.w3.org/TR/encoding/ // - https://encoding.spec.whatwg.org/ // - https://encoding.spec.whatwg.org/encodings.json // - https://tools.ietf.org/html/rfc6657#section-5 // Interface can be implemented by Encodings to define the CCS or CES for which // it implements conversions. type Interface interface { // ID returns an encoding identifier. Exactly one of the mib and other // values should be non-zero. // // In the usual case it is only necessary to indicate the MIB code. The // other string can be used to specify encodings for which there is no MIB, // such as "x-mac-dingbat". // // The other string may only contain the characters a-z, A-Z, 0-9, - and _. ID() (mib MIB, other string) // NOTE: the restrictions on the encoding are to allow extending the syntax // with additional information such as versions, vendors and other variants. } // A MIB identifies an encoding. It is derived from the IANA MIB codes and adds // some identifiers for some encodings that are not covered by the IANA // standard. // // See http://www.iana.org/assignments/ianacharset-mib. type MIB uint16 // These additional MIB types are not defined in IANA. They are added because // they are common and defined within the text repo. const ( // Unofficial marks the start of encodings not registered by IANA. Unofficial MIB = 10000 + iota // Replacement is the WhatWG replacement encoding. Replacement // XUserDefined is the code for x-user-defined. XUserDefined // MacintoshCyrillic is the code for x-mac-cyrillic. MacintoshCyrillic ) ================================================ FILE: vendor/golang.org/x/text/encoding/internal/identifier/mib.go ================================================ // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. package identifier const ( // ASCII is the MIB identifier with IANA name US-ASCII (MIME: US-ASCII). // // ANSI X3.4-1986 // Reference: RFC2046 ASCII MIB = 3 // ISOLatin1 is the MIB identifier with IANA name ISO_8859-1:1987 (MIME: ISO-8859-1). // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISOLatin1 MIB = 4 // ISOLatin2 is the MIB identifier with IANA name ISO_8859-2:1987 (MIME: ISO-8859-2). // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISOLatin2 MIB = 5 // ISOLatin3 is the MIB identifier with IANA name ISO_8859-3:1988 (MIME: ISO-8859-3). // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISOLatin3 MIB = 6 // ISOLatin4 is the MIB identifier with IANA name ISO_8859-4:1988 (MIME: ISO-8859-4). // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISOLatin4 MIB = 7 // ISOLatinCyrillic is the MIB identifier with IANA name ISO_8859-5:1988 (MIME: ISO-8859-5). // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISOLatinCyrillic MIB = 8 // ISOLatinArabic is the MIB identifier with IANA name ISO_8859-6:1987 (MIME: ISO-8859-6). // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISOLatinArabic MIB = 9 // ISOLatinGreek is the MIB identifier with IANA name ISO_8859-7:1987 (MIME: ISO-8859-7). // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1947 // Reference: RFC1345 ISOLatinGreek MIB = 10 // ISOLatinHebrew is the MIB identifier with IANA name ISO_8859-8:1988 (MIME: ISO-8859-8). // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISOLatinHebrew MIB = 11 // ISOLatin5 is the MIB identifier with IANA name ISO_8859-9:1989 (MIME: ISO-8859-9). // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISOLatin5 MIB = 12 // ISOLatin6 is the MIB identifier with IANA name ISO-8859-10 (MIME: ISO-8859-10). // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISOLatin6 MIB = 13 // ISOTextComm is the MIB identifier with IANA name ISO_6937-2-add. // // ISO-IR: International Register of Escape Sequences and ISO 6937-2:1983 // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISOTextComm MIB = 14 // HalfWidthKatakana is the MIB identifier with IANA name JIS_X0201. // // JIS X 0201-1976. One byte only, this is equivalent to // JIS/Roman (similar to ASCII) plus eight-bit half-width // Katakana // Reference: RFC1345 HalfWidthKatakana MIB = 15 // JISEncoding is the MIB identifier with IANA name JIS_Encoding. // // JIS X 0202-1991. Uses ISO 2022 escape sequences to // shift code sets as documented in JIS X 0202-1991. JISEncoding MIB = 16 // ShiftJIS is the MIB identifier with IANA name Shift_JIS (MIME: Shift_JIS). // // This charset is an extension of csHalfWidthKatakana by // adding graphic characters in JIS X 0208. The CCS's are // JIS X0201:1997 and JIS X0208:1997. The // complete definition is shown in Appendix 1 of JIS // X0208:1997. // This charset can be used for the top-level media type "text". ShiftJIS MIB = 17 // EUCPkdFmtJapanese is the MIB identifier with IANA name Extended_UNIX_Code_Packed_Format_for_Japanese (MIME: EUC-JP). // // Standardized by OSF, UNIX International, and UNIX Systems // Laboratories Pacific. Uses ISO 2022 rules to select // code set 0: US-ASCII (a single 7-bit byte set) // code set 1: JIS X0208-1990 (a double 8-bit byte set) // restricted to A0-FF in both bytes // code set 2: Half Width Katakana (a single 7-bit byte set) // requiring SS2 as the character prefix // code set 3: JIS X0212-1990 (a double 7-bit byte set) // restricted to A0-FF in both bytes // requiring SS3 as the character prefix EUCPkdFmtJapanese MIB = 18 // EUCFixWidJapanese is the MIB identifier with IANA name Extended_UNIX_Code_Fixed_Width_for_Japanese. // // Used in Japan. Each character is 2 octets. // code set 0: US-ASCII (a single 7-bit byte set) // 1st byte = 00 // 2nd byte = 20-7E // code set 1: JIS X0208-1990 (a double 7-bit byte set) // restricted to A0-FF in both bytes // code set 2: Half Width Katakana (a single 7-bit byte set) // 1st byte = 00 // 2nd byte = A0-FF // code set 3: JIS X0212-1990 (a double 7-bit byte set) // restricted to A0-FF in // the first byte // and 21-7E in the second byte EUCFixWidJapanese MIB = 19 // ISO4UnitedKingdom is the MIB identifier with IANA name BS_4730. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO4UnitedKingdom MIB = 20 // ISO11SwedishForNames is the MIB identifier with IANA name SEN_850200_C. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO11SwedishForNames MIB = 21 // ISO15Italian is the MIB identifier with IANA name IT. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO15Italian MIB = 22 // ISO17Spanish is the MIB identifier with IANA name ES. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO17Spanish MIB = 23 // ISO21German is the MIB identifier with IANA name DIN_66003. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO21German MIB = 24 // ISO60Norwegian1 is the MIB identifier with IANA name NS_4551-1. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO60Norwegian1 MIB = 25 // ISO69French is the MIB identifier with IANA name NF_Z_62-010. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO69French MIB = 26 // ISO10646UTF1 is the MIB identifier with IANA name ISO-10646-UTF-1. // // Universal Transfer Format (1), this is the multibyte // encoding, that subsets ASCII-7. It does not have byte // ordering issues. ISO10646UTF1 MIB = 27 // ISO646basic1983 is the MIB identifier with IANA name ISO_646.basic:1983. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO646basic1983 MIB = 28 // INVARIANT is the MIB identifier with IANA name INVARIANT. // // Reference: RFC1345 INVARIANT MIB = 29 // ISO2IntlRefVersion is the MIB identifier with IANA name ISO_646.irv:1983. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO2IntlRefVersion MIB = 30 // NATSSEFI is the MIB identifier with IANA name NATS-SEFI. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 NATSSEFI MIB = 31 // NATSSEFIADD is the MIB identifier with IANA name NATS-SEFI-ADD. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 NATSSEFIADD MIB = 32 // NATSDANO is the MIB identifier with IANA name NATS-DANO. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 NATSDANO MIB = 33 // NATSDANOADD is the MIB identifier with IANA name NATS-DANO-ADD. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 NATSDANOADD MIB = 34 // ISO10Swedish is the MIB identifier with IANA name SEN_850200_B. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO10Swedish MIB = 35 // KSC56011987 is the MIB identifier with IANA name KS_C_5601-1987. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 KSC56011987 MIB = 36 // ISO2022KR is the MIB identifier with IANA name ISO-2022-KR (MIME: ISO-2022-KR). // // rfc1557 (see also KS_C_5601-1987) // Reference: RFC1557 ISO2022KR MIB = 37 // EUCKR is the MIB identifier with IANA name EUC-KR (MIME: EUC-KR). // // rfc1557 (see also KS_C_5861-1992) // Reference: RFC1557 EUCKR MIB = 38 // ISO2022JP is the MIB identifier with IANA name ISO-2022-JP (MIME: ISO-2022-JP). // // rfc1468 (see also rfc2237 ) // Reference: RFC1468 ISO2022JP MIB = 39 // ISO2022JP2 is the MIB identifier with IANA name ISO-2022-JP-2 (MIME: ISO-2022-JP-2). // // rfc1554 // Reference: RFC1554 ISO2022JP2 MIB = 40 // ISO13JISC6220jp is the MIB identifier with IANA name JIS_C6220-1969-jp. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO13JISC6220jp MIB = 41 // ISO14JISC6220ro is the MIB identifier with IANA name JIS_C6220-1969-ro. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO14JISC6220ro MIB = 42 // ISO16Portuguese is the MIB identifier with IANA name PT. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO16Portuguese MIB = 43 // ISO18Greek7Old is the MIB identifier with IANA name greek7-old. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO18Greek7Old MIB = 44 // ISO19LatinGreek is the MIB identifier with IANA name latin-greek. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO19LatinGreek MIB = 45 // ISO25French is the MIB identifier with IANA name NF_Z_62-010_(1973). // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO25French MIB = 46 // ISO27LatinGreek1 is the MIB identifier with IANA name Latin-greek-1. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO27LatinGreek1 MIB = 47 // ISO5427Cyrillic is the MIB identifier with IANA name ISO_5427. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO5427Cyrillic MIB = 48 // ISO42JISC62261978 is the MIB identifier with IANA name JIS_C6226-1978. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO42JISC62261978 MIB = 49 // ISO47BSViewdata is the MIB identifier with IANA name BS_viewdata. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO47BSViewdata MIB = 50 // ISO49INIS is the MIB identifier with IANA name INIS. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO49INIS MIB = 51 // ISO50INIS8 is the MIB identifier with IANA name INIS-8. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO50INIS8 MIB = 52 // ISO51INISCyrillic is the MIB identifier with IANA name INIS-cyrillic. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO51INISCyrillic MIB = 53 // ISO54271981 is the MIB identifier with IANA name ISO_5427:1981. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO54271981 MIB = 54 // ISO5428Greek is the MIB identifier with IANA name ISO_5428:1980. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO5428Greek MIB = 55 // ISO57GB1988 is the MIB identifier with IANA name GB_1988-80. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO57GB1988 MIB = 56 // ISO58GB231280 is the MIB identifier with IANA name GB_2312-80. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO58GB231280 MIB = 57 // ISO61Norwegian2 is the MIB identifier with IANA name NS_4551-2. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO61Norwegian2 MIB = 58 // ISO70VideotexSupp1 is the MIB identifier with IANA name videotex-suppl. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO70VideotexSupp1 MIB = 59 // ISO84Portuguese2 is the MIB identifier with IANA name PT2. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO84Portuguese2 MIB = 60 // ISO85Spanish2 is the MIB identifier with IANA name ES2. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO85Spanish2 MIB = 61 // ISO86Hungarian is the MIB identifier with IANA name MSZ_7795.3. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO86Hungarian MIB = 62 // ISO87JISX0208 is the MIB identifier with IANA name JIS_C6226-1983. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO87JISX0208 MIB = 63 // ISO88Greek7 is the MIB identifier with IANA name greek7. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO88Greek7 MIB = 64 // ISO89ASMO449 is the MIB identifier with IANA name ASMO_449. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO89ASMO449 MIB = 65 // ISO90 is the MIB identifier with IANA name iso-ir-90. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO90 MIB = 66 // ISO91JISC62291984a is the MIB identifier with IANA name JIS_C6229-1984-a. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO91JISC62291984a MIB = 67 // ISO92JISC62991984b is the MIB identifier with IANA name JIS_C6229-1984-b. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO92JISC62991984b MIB = 68 // ISO93JIS62291984badd is the MIB identifier with IANA name JIS_C6229-1984-b-add. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO93JIS62291984badd MIB = 69 // ISO94JIS62291984hand is the MIB identifier with IANA name JIS_C6229-1984-hand. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO94JIS62291984hand MIB = 70 // ISO95JIS62291984handadd is the MIB identifier with IANA name JIS_C6229-1984-hand-add. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO95JIS62291984handadd MIB = 71 // ISO96JISC62291984kana is the MIB identifier with IANA name JIS_C6229-1984-kana. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO96JISC62291984kana MIB = 72 // ISO2033 is the MIB identifier with IANA name ISO_2033-1983. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO2033 MIB = 73 // ISO99NAPLPS is the MIB identifier with IANA name ANSI_X3.110-1983. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO99NAPLPS MIB = 74 // ISO102T617bit is the MIB identifier with IANA name T.61-7bit. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO102T617bit MIB = 75 // ISO103T618bit is the MIB identifier with IANA name T.61-8bit. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO103T618bit MIB = 76 // ISO111ECMACyrillic is the MIB identifier with IANA name ECMA-cyrillic. // // ISO registry ISO111ECMACyrillic MIB = 77 // ISO121Canadian1 is the MIB identifier with IANA name CSA_Z243.4-1985-1. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO121Canadian1 MIB = 78 // ISO122Canadian2 is the MIB identifier with IANA name CSA_Z243.4-1985-2. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO122Canadian2 MIB = 79 // ISO123CSAZ24341985gr is the MIB identifier with IANA name CSA_Z243.4-1985-gr. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO123CSAZ24341985gr MIB = 80 // ISO88596E is the MIB identifier with IANA name ISO_8859-6-E (MIME: ISO-8859-6-E). // // rfc1556 // Reference: RFC1556 ISO88596E MIB = 81 // ISO88596I is the MIB identifier with IANA name ISO_8859-6-I (MIME: ISO-8859-6-I). // // rfc1556 // Reference: RFC1556 ISO88596I MIB = 82 // ISO128T101G2 is the MIB identifier with IANA name T.101-G2. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO128T101G2 MIB = 83 // ISO88598E is the MIB identifier with IANA name ISO_8859-8-E (MIME: ISO-8859-8-E). // // rfc1556 // Reference: RFC1556 ISO88598E MIB = 84 // ISO88598I is the MIB identifier with IANA name ISO_8859-8-I (MIME: ISO-8859-8-I). // // rfc1556 // Reference: RFC1556 ISO88598I MIB = 85 // ISO139CSN369103 is the MIB identifier with IANA name CSN_369103. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO139CSN369103 MIB = 86 // ISO141JUSIB1002 is the MIB identifier with IANA name JUS_I.B1.002. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO141JUSIB1002 MIB = 87 // ISO143IECP271 is the MIB identifier with IANA name IEC_P27-1. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO143IECP271 MIB = 88 // ISO146Serbian is the MIB identifier with IANA name JUS_I.B1.003-serb. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO146Serbian MIB = 89 // ISO147Macedonian is the MIB identifier with IANA name JUS_I.B1.003-mac. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO147Macedonian MIB = 90 // ISO150GreekCCITT is the MIB identifier with IANA name greek-ccitt. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO150GreekCCITT MIB = 91 // ISO151Cuba is the MIB identifier with IANA name NC_NC00-10:81. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO151Cuba MIB = 92 // ISO6937Add is the MIB identifier with IANA name ISO_6937-2-25. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO6937Add MIB = 93 // ISO153GOST1976874 is the MIB identifier with IANA name GOST_19768-74. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO153GOST1976874 MIB = 94 // ISO8859Supp is the MIB identifier with IANA name ISO_8859-supp. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO8859Supp MIB = 95 // ISO10367Box is the MIB identifier with IANA name ISO_10367-box. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO10367Box MIB = 96 // ISO158Lap is the MIB identifier with IANA name latin-lap. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO158Lap MIB = 97 // ISO159JISX02121990 is the MIB identifier with IANA name JIS_X0212-1990. // // ISO-IR: International Register of Escape Sequences // Note: The current registration authority is IPSJ/ITSCJ, Japan. // Reference: RFC1345 ISO159JISX02121990 MIB = 98 // ISO646Danish is the MIB identifier with IANA name DS_2089. // // Danish Standard, DS 2089, February 1974 // Reference: RFC1345 ISO646Danish MIB = 99 // USDK is the MIB identifier with IANA name us-dk. // // Reference: RFC1345 USDK MIB = 100 // DKUS is the MIB identifier with IANA name dk-us. // // Reference: RFC1345 DKUS MIB = 101 // KSC5636 is the MIB identifier with IANA name KSC5636. // // Reference: RFC1345 KSC5636 MIB = 102 // Unicode11UTF7 is the MIB identifier with IANA name UNICODE-1-1-UTF-7. // // rfc1642 // Reference: RFC1642 Unicode11UTF7 MIB = 103 // ISO2022CN is the MIB identifier with IANA name ISO-2022-CN. // // rfc1922 // Reference: RFC1922 ISO2022CN MIB = 104 // ISO2022CNEXT is the MIB identifier with IANA name ISO-2022-CN-EXT. // // rfc1922 // Reference: RFC1922 ISO2022CNEXT MIB = 105 // UTF8 is the MIB identifier with IANA name UTF-8. // // rfc3629 // Reference: RFC3629 UTF8 MIB = 106 // ISO885913 is the MIB identifier with IANA name ISO-8859-13. // // ISO See https://www.iana.org/assignments/charset-reg/ISO-8859-13 https://www.iana.org/assignments/charset-reg/ISO-8859-13 ISO885913 MIB = 109 // ISO885914 is the MIB identifier with IANA name ISO-8859-14. // // ISO See https://www.iana.org/assignments/charset-reg/ISO-8859-14 ISO885914 MIB = 110 // ISO885915 is the MIB identifier with IANA name ISO-8859-15. // // ISO // Please see: https://www.iana.org/assignments/charset-reg/ISO-8859-15 ISO885915 MIB = 111 // ISO885916 is the MIB identifier with IANA name ISO-8859-16. // // ISO ISO885916 MIB = 112 // GBK is the MIB identifier with IANA name GBK. // // Chinese IT Standardization Technical Committee // Please see: https://www.iana.org/assignments/charset-reg/GBK GBK MIB = 113 // GB18030 is the MIB identifier with IANA name GB18030. // // Chinese IT Standardization Technical Committee // Please see: https://www.iana.org/assignments/charset-reg/GB18030 GB18030 MIB = 114 // OSDEBCDICDF0415 is the MIB identifier with IANA name OSD_EBCDIC_DF04_15. // // Fujitsu-Siemens standard mainframe EBCDIC encoding // Please see: https://www.iana.org/assignments/charset-reg/OSD-EBCDIC-DF04-15 OSDEBCDICDF0415 MIB = 115 // OSDEBCDICDF03IRV is the MIB identifier with IANA name OSD_EBCDIC_DF03_IRV. // // Fujitsu-Siemens standard mainframe EBCDIC encoding // Please see: https://www.iana.org/assignments/charset-reg/OSD-EBCDIC-DF03-IRV OSDEBCDICDF03IRV MIB = 116 // OSDEBCDICDF041 is the MIB identifier with IANA name OSD_EBCDIC_DF04_1. // // Fujitsu-Siemens standard mainframe EBCDIC encoding // Please see: https://www.iana.org/assignments/charset-reg/OSD-EBCDIC-DF04-1 OSDEBCDICDF041 MIB = 117 // ISO115481 is the MIB identifier with IANA name ISO-11548-1. // // See https://www.iana.org/assignments/charset-reg/ISO-11548-1 ISO115481 MIB = 118 // KZ1048 is the MIB identifier with IANA name KZ-1048. // // See https://www.iana.org/assignments/charset-reg/KZ-1048 KZ1048 MIB = 119 // Unicode is the MIB identifier with IANA name ISO-10646-UCS-2. // // the 2-octet Basic Multilingual Plane, aka Unicode // this needs to specify network byte order: the standard // does not specify (it is a 16-bit integer space) Unicode MIB = 1000 // UCS4 is the MIB identifier with IANA name ISO-10646-UCS-4. // // the full code space. (same comment about byte order, // these are 31-bit numbers. UCS4 MIB = 1001 // UnicodeASCII is the MIB identifier with IANA name ISO-10646-UCS-Basic. // // ASCII subset of Unicode. Basic Latin = collection 1 // See ISO 10646, Appendix A UnicodeASCII MIB = 1002 // UnicodeLatin1 is the MIB identifier with IANA name ISO-10646-Unicode-Latin1. // // ISO Latin-1 subset of Unicode. Basic Latin and Latin-1 // Supplement = collections 1 and 2. See ISO 10646, // Appendix A. See rfc1815 . UnicodeLatin1 MIB = 1003 // UnicodeJapanese is the MIB identifier with IANA name ISO-10646-J-1. // // ISO 10646 Japanese, see rfc1815 . UnicodeJapanese MIB = 1004 // UnicodeIBM1261 is the MIB identifier with IANA name ISO-Unicode-IBM-1261. // // IBM Latin-2, -3, -5, Extended Presentation Set, GCSGID: 1261 UnicodeIBM1261 MIB = 1005 // UnicodeIBM1268 is the MIB identifier with IANA name ISO-Unicode-IBM-1268. // // IBM Latin-4 Extended Presentation Set, GCSGID: 1268 UnicodeIBM1268 MIB = 1006 // UnicodeIBM1276 is the MIB identifier with IANA name ISO-Unicode-IBM-1276. // // IBM Cyrillic Greek Extended Presentation Set, GCSGID: 1276 UnicodeIBM1276 MIB = 1007 // UnicodeIBM1264 is the MIB identifier with IANA name ISO-Unicode-IBM-1264. // // IBM Arabic Presentation Set, GCSGID: 1264 UnicodeIBM1264 MIB = 1008 // UnicodeIBM1265 is the MIB identifier with IANA name ISO-Unicode-IBM-1265. // // IBM Hebrew Presentation Set, GCSGID: 1265 UnicodeIBM1265 MIB = 1009 // Unicode11 is the MIB identifier with IANA name UNICODE-1-1. // // rfc1641 // Reference: RFC1641 Unicode11 MIB = 1010 // SCSU is the MIB identifier with IANA name SCSU. // // SCSU See https://www.iana.org/assignments/charset-reg/SCSU SCSU MIB = 1011 // UTF7 is the MIB identifier with IANA name UTF-7. // // rfc2152 // Reference: RFC2152 UTF7 MIB = 1012 // UTF16BE is the MIB identifier with IANA name UTF-16BE. // // rfc2781 // Reference: RFC2781 UTF16BE MIB = 1013 // UTF16LE is the MIB identifier with IANA name UTF-16LE. // // rfc2781 // Reference: RFC2781 UTF16LE MIB = 1014 // UTF16 is the MIB identifier with IANA name UTF-16. // // rfc2781 // Reference: RFC2781 UTF16 MIB = 1015 // CESU8 is the MIB identifier with IANA name CESU-8. // // https://www.unicode.org/reports/tr26 CESU8 MIB = 1016 // UTF32 is the MIB identifier with IANA name UTF-32. // // https://www.unicode.org/reports/tr19/ UTF32 MIB = 1017 // UTF32BE is the MIB identifier with IANA name UTF-32BE. // // https://www.unicode.org/reports/tr19/ UTF32BE MIB = 1018 // UTF32LE is the MIB identifier with IANA name UTF-32LE. // // https://www.unicode.org/reports/tr19/ UTF32LE MIB = 1019 // BOCU1 is the MIB identifier with IANA name BOCU-1. // // https://www.unicode.org/notes/tn6/ BOCU1 MIB = 1020 // UTF7IMAP is the MIB identifier with IANA name UTF-7-IMAP. // // Note: This charset is used to encode Unicode in IMAP mailbox names; // see section 5.1.3 of rfc3501 . It should never be used // outside this context. A name has been assigned so that charset processing // implementations can refer to it in a consistent way. UTF7IMAP MIB = 1021 // Windows30Latin1 is the MIB identifier with IANA name ISO-8859-1-Windows-3.0-Latin-1. // // Extended ISO 8859-1 Latin-1 for Windows 3.0. // PCL Symbol Set id: 9U Windows30Latin1 MIB = 2000 // Windows31Latin1 is the MIB identifier with IANA name ISO-8859-1-Windows-3.1-Latin-1. // // Extended ISO 8859-1 Latin-1 for Windows 3.1. // PCL Symbol Set id: 19U Windows31Latin1 MIB = 2001 // Windows31Latin2 is the MIB identifier with IANA name ISO-8859-2-Windows-Latin-2. // // Extended ISO 8859-2. Latin-2 for Windows 3.1. // PCL Symbol Set id: 9E Windows31Latin2 MIB = 2002 // Windows31Latin5 is the MIB identifier with IANA name ISO-8859-9-Windows-Latin-5. // // Extended ISO 8859-9. Latin-5 for Windows 3.1 // PCL Symbol Set id: 5T Windows31Latin5 MIB = 2003 // HPRoman8 is the MIB identifier with IANA name hp-roman8. // // LaserJet IIP Printer User's Manual, // HP part no 33471-90901, Hewlet-Packard, June 1989. // Reference: RFC1345 HPRoman8 MIB = 2004 // AdobeStandardEncoding is the MIB identifier with IANA name Adobe-Standard-Encoding. // // PostScript Language Reference Manual // PCL Symbol Set id: 10J AdobeStandardEncoding MIB = 2005 // VenturaUS is the MIB identifier with IANA name Ventura-US. // // Ventura US. ASCII plus characters typically used in // publishing, like pilcrow, copyright, registered, trade mark, // section, dagger, and double dagger in the range A0 (hex) // to FF (hex). // PCL Symbol Set id: 14J VenturaUS MIB = 2006 // VenturaInternational is the MIB identifier with IANA name Ventura-International. // // Ventura International. ASCII plus coded characters similar // to Roman8. // PCL Symbol Set id: 13J VenturaInternational MIB = 2007 // DECMCS is the MIB identifier with IANA name DEC-MCS. // // VAX/VMS User's Manual, // Order Number: AI-Y517A-TE, April 1986. // Reference: RFC1345 DECMCS MIB = 2008 // PC850Multilingual is the MIB identifier with IANA name IBM850. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 PC850Multilingual MIB = 2009 // PC8DanishNorwegian is the MIB identifier with IANA name PC8-Danish-Norwegian. // // PC Danish Norwegian // 8-bit PC set for Danish Norwegian // PCL Symbol Set id: 11U PC8DanishNorwegian MIB = 2012 // PC862LatinHebrew is the MIB identifier with IANA name IBM862. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 PC862LatinHebrew MIB = 2013 // PC8Turkish is the MIB identifier with IANA name PC8-Turkish. // // PC Latin Turkish. PCL Symbol Set id: 9T PC8Turkish MIB = 2014 // IBMSymbols is the MIB identifier with IANA name IBM-Symbols. // // Presentation Set, CPGID: 259 IBMSymbols MIB = 2015 // IBMThai is the MIB identifier with IANA name IBM-Thai. // // Presentation Set, CPGID: 838 IBMThai MIB = 2016 // HPLegal is the MIB identifier with IANA name HP-Legal. // // PCL 5 Comparison Guide, Hewlett-Packard, // HP part number 5961-0510, October 1992 // PCL Symbol Set id: 1U HPLegal MIB = 2017 // HPPiFont is the MIB identifier with IANA name HP-Pi-font. // // PCL 5 Comparison Guide, Hewlett-Packard, // HP part number 5961-0510, October 1992 // PCL Symbol Set id: 15U HPPiFont MIB = 2018 // HPMath8 is the MIB identifier with IANA name HP-Math8. // // PCL 5 Comparison Guide, Hewlett-Packard, // HP part number 5961-0510, October 1992 // PCL Symbol Set id: 8M HPMath8 MIB = 2019 // HPPSMath is the MIB identifier with IANA name Adobe-Symbol-Encoding. // // PostScript Language Reference Manual // PCL Symbol Set id: 5M HPPSMath MIB = 2020 // HPDesktop is the MIB identifier with IANA name HP-DeskTop. // // PCL 5 Comparison Guide, Hewlett-Packard, // HP part number 5961-0510, October 1992 // PCL Symbol Set id: 7J HPDesktop MIB = 2021 // VenturaMath is the MIB identifier with IANA name Ventura-Math. // // PCL 5 Comparison Guide, Hewlett-Packard, // HP part number 5961-0510, October 1992 // PCL Symbol Set id: 6M VenturaMath MIB = 2022 // MicrosoftPublishing is the MIB identifier with IANA name Microsoft-Publishing. // // PCL 5 Comparison Guide, Hewlett-Packard, // HP part number 5961-0510, October 1992 // PCL Symbol Set id: 6J MicrosoftPublishing MIB = 2023 // Windows31J is the MIB identifier with IANA name Windows-31J. // // Windows Japanese. A further extension of Shift_JIS // to include NEC special characters (Row 13), NEC // selection of IBM extensions (Rows 89 to 92), and IBM // extensions (Rows 115 to 119). The CCS's are // JIS X0201:1997, JIS X0208:1997, and these extensions. // This charset can be used for the top-level media type "text", // but it is of limited or specialized use (see rfc2278 ). // PCL Symbol Set id: 19K Windows31J MIB = 2024 // GB2312 is the MIB identifier with IANA name GB2312 (MIME: GB2312). // // Chinese for People's Republic of China (PRC) mixed one byte, // two byte set: // 20-7E = one byte ASCII // A1-FE = two byte PRC Kanji // See GB 2312-80 // PCL Symbol Set Id: 18C GB2312 MIB = 2025 // Big5 is the MIB identifier with IANA name Big5 (MIME: Big5). // // Chinese for Taiwan Multi-byte set. // PCL Symbol Set Id: 18T Big5 MIB = 2026 // Macintosh is the MIB identifier with IANA name macintosh. // // The Unicode Standard ver1.0, ISBN 0-201-56788-1, Oct 1991 // Reference: RFC1345 Macintosh MIB = 2027 // IBM037 is the MIB identifier with IANA name IBM037. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 IBM037 MIB = 2028 // IBM038 is the MIB identifier with IANA name IBM038. // // IBM 3174 Character Set Ref, GA27-3831-02, March 1990 // Reference: RFC1345 IBM038 MIB = 2029 // IBM273 is the MIB identifier with IANA name IBM273. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 IBM273 MIB = 2030 // IBM274 is the MIB identifier with IANA name IBM274. // // IBM 3174 Character Set Ref, GA27-3831-02, March 1990 // Reference: RFC1345 IBM274 MIB = 2031 // IBM275 is the MIB identifier with IANA name IBM275. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 IBM275 MIB = 2032 // IBM277 is the MIB identifier with IANA name IBM277. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 IBM277 MIB = 2033 // IBM278 is the MIB identifier with IANA name IBM278. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 IBM278 MIB = 2034 // IBM280 is the MIB identifier with IANA name IBM280. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 IBM280 MIB = 2035 // IBM281 is the MIB identifier with IANA name IBM281. // // IBM 3174 Character Set Ref, GA27-3831-02, March 1990 // Reference: RFC1345 IBM281 MIB = 2036 // IBM284 is the MIB identifier with IANA name IBM284. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 IBM284 MIB = 2037 // IBM285 is the MIB identifier with IANA name IBM285. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 IBM285 MIB = 2038 // IBM290 is the MIB identifier with IANA name IBM290. // // IBM 3174 Character Set Ref, GA27-3831-02, March 1990 // Reference: RFC1345 IBM290 MIB = 2039 // IBM297 is the MIB identifier with IANA name IBM297. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 IBM297 MIB = 2040 // IBM420 is the MIB identifier with IANA name IBM420. // // IBM NLS RM Vol2 SE09-8002-01, March 1990, // IBM NLS RM p 11-11 // Reference: RFC1345 IBM420 MIB = 2041 // IBM423 is the MIB identifier with IANA name IBM423. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 IBM423 MIB = 2042 // IBM424 is the MIB identifier with IANA name IBM424. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 IBM424 MIB = 2043 // PC8CodePage437 is the MIB identifier with IANA name IBM437. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 PC8CodePage437 MIB = 2011 // IBM500 is the MIB identifier with IANA name IBM500. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 IBM500 MIB = 2044 // IBM851 is the MIB identifier with IANA name IBM851. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 IBM851 MIB = 2045 // PCp852 is the MIB identifier with IANA name IBM852. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 PCp852 MIB = 2010 // IBM855 is the MIB identifier with IANA name IBM855. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 IBM855 MIB = 2046 // IBM857 is the MIB identifier with IANA name IBM857. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 IBM857 MIB = 2047 // IBM860 is the MIB identifier with IANA name IBM860. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 IBM860 MIB = 2048 // IBM861 is the MIB identifier with IANA name IBM861. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 IBM861 MIB = 2049 // IBM863 is the MIB identifier with IANA name IBM863. // // IBM Keyboard layouts and code pages, PN 07G4586 June 1991 // Reference: RFC1345 IBM863 MIB = 2050 // IBM864 is the MIB identifier with IANA name IBM864. // // IBM Keyboard layouts and code pages, PN 07G4586 June 1991 // Reference: RFC1345 IBM864 MIB = 2051 // IBM865 is the MIB identifier with IANA name IBM865. // // IBM DOS 3.3 Ref (Abridged), 94X9575 (Feb 1987) // Reference: RFC1345 IBM865 MIB = 2052 // IBM868 is the MIB identifier with IANA name IBM868. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 IBM868 MIB = 2053 // IBM869 is the MIB identifier with IANA name IBM869. // // IBM Keyboard layouts and code pages, PN 07G4586 June 1991 // Reference: RFC1345 IBM869 MIB = 2054 // IBM870 is the MIB identifier with IANA name IBM870. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 IBM870 MIB = 2055 // IBM871 is the MIB identifier with IANA name IBM871. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 IBM871 MIB = 2056 // IBM880 is the MIB identifier with IANA name IBM880. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 IBM880 MIB = 2057 // IBM891 is the MIB identifier with IANA name IBM891. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 IBM891 MIB = 2058 // IBM903 is the MIB identifier with IANA name IBM903. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 IBM903 MIB = 2059 // IBBM904 is the MIB identifier with IANA name IBM904. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 IBBM904 MIB = 2060 // IBM905 is the MIB identifier with IANA name IBM905. // // IBM 3174 Character Set Ref, GA27-3831-02, March 1990 // Reference: RFC1345 IBM905 MIB = 2061 // IBM918 is the MIB identifier with IANA name IBM918. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 IBM918 MIB = 2062 // IBM1026 is the MIB identifier with IANA name IBM1026. // // IBM NLS RM Vol2 SE09-8002-01, March 1990 // Reference: RFC1345 IBM1026 MIB = 2063 // IBMEBCDICATDE is the MIB identifier with IANA name EBCDIC-AT-DE. // // IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987 // Reference: RFC1345 IBMEBCDICATDE MIB = 2064 // EBCDICATDEA is the MIB identifier with IANA name EBCDIC-AT-DE-A. // // IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987 // Reference: RFC1345 EBCDICATDEA MIB = 2065 // EBCDICCAFR is the MIB identifier with IANA name EBCDIC-CA-FR. // // IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987 // Reference: RFC1345 EBCDICCAFR MIB = 2066 // EBCDICDKNO is the MIB identifier with IANA name EBCDIC-DK-NO. // // IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987 // Reference: RFC1345 EBCDICDKNO MIB = 2067 // EBCDICDKNOA is the MIB identifier with IANA name EBCDIC-DK-NO-A. // // IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987 // Reference: RFC1345 EBCDICDKNOA MIB = 2068 // EBCDICFISE is the MIB identifier with IANA name EBCDIC-FI-SE. // // IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987 // Reference: RFC1345 EBCDICFISE MIB = 2069 // EBCDICFISEA is the MIB identifier with IANA name EBCDIC-FI-SE-A. // // IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987 // Reference: RFC1345 EBCDICFISEA MIB = 2070 // EBCDICFR is the MIB identifier with IANA name EBCDIC-FR. // // IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987 // Reference: RFC1345 EBCDICFR MIB = 2071 // EBCDICIT is the MIB identifier with IANA name EBCDIC-IT. // // IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987 // Reference: RFC1345 EBCDICIT MIB = 2072 // EBCDICPT is the MIB identifier with IANA name EBCDIC-PT. // // IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987 // Reference: RFC1345 EBCDICPT MIB = 2073 // EBCDICES is the MIB identifier with IANA name EBCDIC-ES. // // IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987 // Reference: RFC1345 EBCDICES MIB = 2074 // EBCDICESA is the MIB identifier with IANA name EBCDIC-ES-A. // // IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987 // Reference: RFC1345 EBCDICESA MIB = 2075 // EBCDICESS is the MIB identifier with IANA name EBCDIC-ES-S. // // IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987 // Reference: RFC1345 EBCDICESS MIB = 2076 // EBCDICUK is the MIB identifier with IANA name EBCDIC-UK. // // IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987 // Reference: RFC1345 EBCDICUK MIB = 2077 // EBCDICUS is the MIB identifier with IANA name EBCDIC-US. // // IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987 // Reference: RFC1345 EBCDICUS MIB = 2078 // Unknown8BiT is the MIB identifier with IANA name UNKNOWN-8BIT. // // Reference: RFC1428 Unknown8BiT MIB = 2079 // Mnemonic is the MIB identifier with IANA name MNEMONIC. // // rfc1345 , also known as "mnemonic+ascii+38" // Reference: RFC1345 Mnemonic MIB = 2080 // Mnem is the MIB identifier with IANA name MNEM. // // rfc1345 , also known as "mnemonic+ascii+8200" // Reference: RFC1345 Mnem MIB = 2081 // VISCII is the MIB identifier with IANA name VISCII. // // rfc1456 // Reference: RFC1456 VISCII MIB = 2082 // VIQR is the MIB identifier with IANA name VIQR. // // rfc1456 // Reference: RFC1456 VIQR MIB = 2083 // KOI8R is the MIB identifier with IANA name KOI8-R (MIME: KOI8-R). // // rfc1489 , based on GOST-19768-74, ISO-6937/8, // INIS-Cyrillic, ISO-5427. // Reference: RFC1489 KOI8R MIB = 2084 // HZGB2312 is the MIB identifier with IANA name HZ-GB-2312. // // rfc1842 , rfc1843 rfc1843 rfc1842 HZGB2312 MIB = 2085 // IBM866 is the MIB identifier with IANA name IBM866. // // IBM NLDG Volume 2 (SE09-8002-03) August 1994 IBM866 MIB = 2086 // PC775Baltic is the MIB identifier with IANA name IBM775. // // HP PCL 5 Comparison Guide (P/N 5021-0329) pp B-13, 1996 PC775Baltic MIB = 2087 // KOI8U is the MIB identifier with IANA name KOI8-U. // // rfc2319 // Reference: RFC2319 KOI8U MIB = 2088 // IBM00858 is the MIB identifier with IANA name IBM00858. // // IBM See https://www.iana.org/assignments/charset-reg/IBM00858 IBM00858 MIB = 2089 // IBM00924 is the MIB identifier with IANA name IBM00924. // // IBM See https://www.iana.org/assignments/charset-reg/IBM00924 IBM00924 MIB = 2090 // IBM01140 is the MIB identifier with IANA name IBM01140. // // IBM See https://www.iana.org/assignments/charset-reg/IBM01140 IBM01140 MIB = 2091 // IBM01141 is the MIB identifier with IANA name IBM01141. // // IBM See https://www.iana.org/assignments/charset-reg/IBM01141 IBM01141 MIB = 2092 // IBM01142 is the MIB identifier with IANA name IBM01142. // // IBM See https://www.iana.org/assignments/charset-reg/IBM01142 IBM01142 MIB = 2093 // IBM01143 is the MIB identifier with IANA name IBM01143. // // IBM See https://www.iana.org/assignments/charset-reg/IBM01143 IBM01143 MIB = 2094 // IBM01144 is the MIB identifier with IANA name IBM01144. // // IBM See https://www.iana.org/assignments/charset-reg/IBM01144 IBM01144 MIB = 2095 // IBM01145 is the MIB identifier with IANA name IBM01145. // // IBM See https://www.iana.org/assignments/charset-reg/IBM01145 IBM01145 MIB = 2096 // IBM01146 is the MIB identifier with IANA name IBM01146. // // IBM See https://www.iana.org/assignments/charset-reg/IBM01146 IBM01146 MIB = 2097 // IBM01147 is the MIB identifier with IANA name IBM01147. // // IBM See https://www.iana.org/assignments/charset-reg/IBM01147 IBM01147 MIB = 2098 // IBM01148 is the MIB identifier with IANA name IBM01148. // // IBM See https://www.iana.org/assignments/charset-reg/IBM01148 IBM01148 MIB = 2099 // IBM01149 is the MIB identifier with IANA name IBM01149. // // IBM See https://www.iana.org/assignments/charset-reg/IBM01149 IBM01149 MIB = 2100 // Big5HKSCS is the MIB identifier with IANA name Big5-HKSCS. // // See https://www.iana.org/assignments/charset-reg/Big5-HKSCS Big5HKSCS MIB = 2101 // IBM1047 is the MIB identifier with IANA name IBM1047. // // IBM1047 (EBCDIC Latin 1/Open Systems) https://www-1.ibm.com/servers/eserver/iseries/software/globalization/pdf/cp01047z.pdf IBM1047 MIB = 2102 // PTCP154 is the MIB identifier with IANA name PTCP154. // // See https://www.iana.org/assignments/charset-reg/PTCP154 PTCP154 MIB = 2103 // Amiga1251 is the MIB identifier with IANA name Amiga-1251. // // See https://www.amiga.ultranet.ru/Amiga-1251.html Amiga1251 MIB = 2104 // KOI7switched is the MIB identifier with IANA name KOI7-switched. // // See https://www.iana.org/assignments/charset-reg/KOI7-switched KOI7switched MIB = 2105 // BRF is the MIB identifier with IANA name BRF. // // See https://www.iana.org/assignments/charset-reg/BRF BRF MIB = 2106 // TSCII is the MIB identifier with IANA name TSCII. // // See https://www.iana.org/assignments/charset-reg/TSCII TSCII MIB = 2107 // CP51932 is the MIB identifier with IANA name CP51932. // // See https://www.iana.org/assignments/charset-reg/CP51932 CP51932 MIB = 2108 // Windows874 is the MIB identifier with IANA name windows-874. // // See https://www.iana.org/assignments/charset-reg/windows-874 Windows874 MIB = 2109 // Windows1250 is the MIB identifier with IANA name windows-1250. // // Microsoft https://www.iana.org/assignments/charset-reg/windows-1250 Windows1250 MIB = 2250 // Windows1251 is the MIB identifier with IANA name windows-1251. // // Microsoft https://www.iana.org/assignments/charset-reg/windows-1251 Windows1251 MIB = 2251 // Windows1252 is the MIB identifier with IANA name windows-1252. // // Microsoft https://www.iana.org/assignments/charset-reg/windows-1252 Windows1252 MIB = 2252 // Windows1253 is the MIB identifier with IANA name windows-1253. // // Microsoft https://www.iana.org/assignments/charset-reg/windows-1253 Windows1253 MIB = 2253 // Windows1254 is the MIB identifier with IANA name windows-1254. // // Microsoft https://www.iana.org/assignments/charset-reg/windows-1254 Windows1254 MIB = 2254 // Windows1255 is the MIB identifier with IANA name windows-1255. // // Microsoft https://www.iana.org/assignments/charset-reg/windows-1255 Windows1255 MIB = 2255 // Windows1256 is the MIB identifier with IANA name windows-1256. // // Microsoft https://www.iana.org/assignments/charset-reg/windows-1256 Windows1256 MIB = 2256 // Windows1257 is the MIB identifier with IANA name windows-1257. // // Microsoft https://www.iana.org/assignments/charset-reg/windows-1257 Windows1257 MIB = 2257 // Windows1258 is the MIB identifier with IANA name windows-1258. // // Microsoft https://www.iana.org/assignments/charset-reg/windows-1258 Windows1258 MIB = 2258 // TIS620 is the MIB identifier with IANA name TIS-620. // // Thai Industrial Standards Institute (TISI) TIS620 MIB = 2259 // CP50220 is the MIB identifier with IANA name CP50220. // // See https://www.iana.org/assignments/charset-reg/CP50220 CP50220 MIB = 2260 ) ================================================ FILE: vendor/golang.org/x/text/transform/transform.go ================================================ // 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 transform provides reader and writer wrappers that transform the // bytes passing through as well as various transformations. Example // transformations provided by other packages include normalization and // conversion between character sets. package transform // import "golang.org/x/text/transform" import ( "bytes" "errors" "io" "unicode/utf8" ) var ( // ErrShortDst means that the destination buffer was too short to // receive all of the transformed bytes. ErrShortDst = errors.New("transform: short destination buffer") // ErrShortSrc means that the source buffer has insufficient data to // complete the transformation. ErrShortSrc = errors.New("transform: short source buffer") // ErrEndOfSpan means that the input and output (the transformed input) // are not identical. ErrEndOfSpan = errors.New("transform: input and output are not identical") // errInconsistentByteCount means that Transform returned success (nil // error) but also returned nSrc inconsistent with the src argument. errInconsistentByteCount = errors.New("transform: inconsistent byte count returned") // errShortInternal means that an internal buffer is not large enough // to make progress and the Transform operation must be aborted. errShortInternal = errors.New("transform: short internal buffer") ) // Transformer transforms bytes. type Transformer interface { // Transform writes to dst the transformed bytes read from src, and // returns the number of dst bytes written and src bytes read. The // atEOF argument tells whether src represents the last bytes of the // input. // // Callers should always process the nDst bytes produced and account // for the nSrc bytes consumed before considering the error err. // // A nil error means that all of the transformed bytes (whether freshly // transformed from src or left over from previous Transform calls) // were written to dst. A nil error can be returned regardless of // whether atEOF is true. If err is nil then nSrc must equal len(src); // the converse is not necessarily true. // // ErrShortDst means that dst was too short to receive all of the // transformed bytes. ErrShortSrc means that src had insufficient data // to complete the transformation. If both conditions apply, then // either error may be returned. Other than the error conditions listed // here, implementations are free to report other errors that arise. Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) // Reset resets the state and allows a Transformer to be reused. Reset() } // SpanningTransformer extends the Transformer interface with a Span method // that determines how much of the input already conforms to the Transformer. type SpanningTransformer interface { Transformer // Span returns a position in src such that transforming src[:n] results in // identical output src[:n] for these bytes. It does not necessarily return // the largest such n. The atEOF argument tells whether src represents the // last bytes of the input. // // Callers should always account for the n bytes consumed before // considering the error err. // // A nil error means that all input bytes are known to be identical to the // output produced by the Transformer. A nil error can be returned // regardless of whether atEOF is true. If err is nil, then n must // equal len(src); the converse is not necessarily true. // // ErrEndOfSpan means that the Transformer output may differ from the // input after n bytes. Note that n may be len(src), meaning that the output // would contain additional bytes after otherwise identical output. // ErrShortSrc means that src had insufficient data to determine whether the // remaining bytes would change. Other than the error conditions listed // here, implementations are free to report other errors that arise. // // Calling Span can modify the Transformer state as a side effect. In // effect, it does the transformation just as calling Transform would, only // without copying to a destination buffer and only up to a point it can // determine the input and output bytes are the same. This is obviously more // limited than calling Transform, but can be more efficient in terms of // copying and allocating buffers. Calls to Span and Transform may be // interleaved. Span(src []byte, atEOF bool) (n int, err error) } // NopResetter can be embedded by implementations of Transformer to add a nop // Reset method. type NopResetter struct{} // Reset implements the Reset method of the Transformer interface. func (NopResetter) Reset() {} // Reader wraps another io.Reader by transforming the bytes read. type Reader struct { r io.Reader t Transformer err error // dst[dst0:dst1] contains bytes that have been transformed by t but // not yet copied out via Read. dst []byte dst0, dst1 int // src[src0:src1] contains bytes that have been read from r but not // yet transformed through t. src []byte src0, src1 int // transformComplete is whether the transformation is complete, // regardless of whether or not it was successful. transformComplete bool } const defaultBufSize = 4096 // NewReader returns a new Reader that wraps r by transforming the bytes read // via t. It calls Reset on t. func NewReader(r io.Reader, t Transformer) *Reader { t.Reset() return &Reader{ r: r, t: t, dst: make([]byte, defaultBufSize), src: make([]byte, defaultBufSize), } } // Read implements the io.Reader interface. func (r *Reader) Read(p []byte) (int, error) { n, err := 0, error(nil) for { // Copy out any transformed bytes and return the final error if we are done. if r.dst0 != r.dst1 { n = copy(p, r.dst[r.dst0:r.dst1]) r.dst0 += n if r.dst0 == r.dst1 && r.transformComplete { return n, r.err } return n, nil } else if r.transformComplete { return 0, r.err } // Try to transform some source bytes, or to flush the transformer if we // are out of source bytes. We do this even if r.r.Read returned an error. // As the io.Reader documentation says, "process the n > 0 bytes returned // before considering the error". if r.src0 != r.src1 || r.err != nil { r.dst0 = 0 r.dst1, n, err = r.t.Transform(r.dst, r.src[r.src0:r.src1], r.err == io.EOF) r.src0 += n switch { case err == nil: if r.src0 != r.src1 { r.err = errInconsistentByteCount } // The Transform call was successful; we are complete if we // cannot read more bytes into src. r.transformComplete = r.err != nil continue case err == ErrShortDst && (r.dst1 != 0 || n != 0): // Make room in dst by copying out, and try again. continue case err == ErrShortSrc && r.src1-r.src0 != len(r.src) && r.err == nil: // Read more bytes into src via the code below, and try again. default: r.transformComplete = true // The reader error (r.err) takes precedence over the // transformer error (err) unless r.err is nil or io.EOF. if r.err == nil || r.err == io.EOF { r.err = err } continue } } // Move any untransformed source bytes to the start of the buffer // and read more bytes. if r.src0 != 0 { r.src0, r.src1 = 0, copy(r.src, r.src[r.src0:r.src1]) } n, r.err = r.r.Read(r.src[r.src1:]) r.src1 += n } } // TODO: implement ReadByte (and ReadRune??). // Writer wraps another io.Writer by transforming the bytes read. // The user needs to call Close to flush unwritten bytes that may // be buffered. type Writer struct { w io.Writer t Transformer dst []byte // src[:n] contains bytes that have not yet passed through t. src []byte n int } // NewWriter returns a new Writer that wraps w by transforming the bytes written // via t. It calls Reset on t. func NewWriter(w io.Writer, t Transformer) *Writer { t.Reset() return &Writer{ w: w, t: t, dst: make([]byte, defaultBufSize), src: make([]byte, defaultBufSize), } } // Write implements the io.Writer interface. If there are not enough // bytes available to complete a Transform, the bytes will be buffered // for the next write. Call Close to convert the remaining bytes. func (w *Writer) Write(data []byte) (n int, err error) { src := data if w.n > 0 { // Append bytes from data to the last remainder. // TODO: limit the amount copied on first try. n = copy(w.src[w.n:], data) w.n += n src = w.src[:w.n] } for { nDst, nSrc, err := w.t.Transform(w.dst, src, false) if _, werr := w.w.Write(w.dst[:nDst]); werr != nil { return n, werr } src = src[nSrc:] if w.n == 0 { n += nSrc } else if len(src) <= n { // Enough bytes from w.src have been consumed. We make src point // to data instead to reduce the copying. w.n = 0 n -= len(src) src = data[n:] if n < len(data) && (err == nil || err == ErrShortSrc) { continue } } switch err { case ErrShortDst: // This error is okay as long as we are making progress. if nDst > 0 || nSrc > 0 { continue } case ErrShortSrc: if len(src) < len(w.src) { m := copy(w.src, src) // If w.n > 0, bytes from data were already copied to w.src and n // was already set to the number of bytes consumed. if w.n == 0 { n += m } w.n = m err = nil } else if nDst > 0 || nSrc > 0 { // Not enough buffer to store the remainder. Keep processing as // long as there is progress. Without this case, transforms that // require a lookahead larger than the buffer may result in an // error. This is not something one may expect to be common in // practice, but it may occur when buffers are set to small // sizes during testing. continue } case nil: if w.n > 0 { err = errInconsistentByteCount } } return n, err } } // Close implements the io.Closer interface. func (w *Writer) Close() error { src := w.src[:w.n] for { nDst, nSrc, err := w.t.Transform(w.dst, src, true) if _, werr := w.w.Write(w.dst[:nDst]); werr != nil { return werr } if err != ErrShortDst { return err } src = src[nSrc:] } } type nop struct{ NopResetter } func (nop) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { n := copy(dst, src) if n < len(src) { err = ErrShortDst } return n, n, err } func (nop) Span(src []byte, atEOF bool) (n int, err error) { return len(src), nil } type discard struct{ NopResetter } func (discard) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { return 0, len(src), nil } var ( // Discard is a Transformer for which all Transform calls succeed // by consuming all bytes and writing nothing. Discard Transformer = discard{} // Nop is a SpanningTransformer that copies src to dst. Nop SpanningTransformer = nop{} ) // chain is a sequence of links. A chain with N Transformers has N+1 links and // N+1 buffers. Of those N+1 buffers, the first and last are the src and dst // buffers given to chain.Transform and the middle N-1 buffers are intermediate // buffers owned by the chain. The i'th link transforms bytes from the i'th // buffer chain.link[i].b at read offset chain.link[i].p to the i+1'th buffer // chain.link[i+1].b at write offset chain.link[i+1].n, for i in [0, N). type chain struct { link []link err error // errStart is the index at which the error occurred plus 1. Processing // errStart at this level at the next call to Transform. As long as // errStart > 0, chain will not consume any more source bytes. errStart int } func (c *chain) fatalError(errIndex int, err error) { if i := errIndex + 1; i > c.errStart { c.errStart = i c.err = err } } type link struct { t Transformer // b[p:n] holds the bytes to be transformed by t. b []byte p int n int } func (l *link) src() []byte { return l.b[l.p:l.n] } func (l *link) dst() []byte { return l.b[l.n:] } // Chain returns a Transformer that applies t in sequence. func Chain(t ...Transformer) Transformer { if len(t) == 0 { return nop{} } c := &chain{link: make([]link, len(t)+1)} for i, tt := range t { c.link[i].t = tt } // Allocate intermediate buffers. b := make([][defaultBufSize]byte, len(t)-1) for i := range b { c.link[i+1].b = b[i][:] } return c } // Reset resets the state of Chain. It calls Reset on all the Transformers. func (c *chain) Reset() { for i, l := range c.link { if l.t != nil { l.t.Reset() } c.link[i].p, c.link[i].n = 0, 0 } } // TODO: make chain use Span (is going to be fun to implement!) // Transform applies the transformers of c in sequence. func (c *chain) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { // Set up src and dst in the chain. srcL := &c.link[0] dstL := &c.link[len(c.link)-1] srcL.b, srcL.p, srcL.n = src, 0, len(src) dstL.b, dstL.n = dst, 0 var lastFull, needProgress bool // for detecting progress // i is the index of the next Transformer to apply, for i in [low, high]. // low is the lowest index for which c.link[low] may still produce bytes. // high is the highest index for which c.link[high] has a Transformer. // The error returned by Transform determines whether to increase or // decrease i. We try to completely fill a buffer before converting it. for low, i, high := c.errStart, c.errStart, len(c.link)-2; low <= i && i <= high; { in, out := &c.link[i], &c.link[i+1] nDst, nSrc, err0 := in.t.Transform(out.dst(), in.src(), atEOF && low == i) out.n += nDst in.p += nSrc if i > 0 && in.p == in.n { in.p, in.n = 0, 0 } needProgress, lastFull = lastFull, false switch err0 { case ErrShortDst: // Process the destination buffer next. Return if we are already // at the high index. if i == high { return dstL.n, srcL.p, ErrShortDst } if out.n != 0 { i++ // If the Transformer at the next index is not able to process any // source bytes there is nothing that can be done to make progress // and the bytes will remain unprocessed. lastFull is used to // detect this and break out of the loop with a fatal error. lastFull = true continue } // The destination buffer was too small, but is completely empty. // Return a fatal error as this transformation can never complete. c.fatalError(i, errShortInternal) case ErrShortSrc: if i == 0 { // Save ErrShortSrc in err. All other errors take precedence. err = ErrShortSrc break } // Source bytes were depleted before filling up the destination buffer. // Verify we made some progress, move the remaining bytes to the errStart // and try to get more source bytes. if needProgress && nSrc == 0 || in.n-in.p == len(in.b) { // There were not enough source bytes to proceed while the source // buffer cannot hold any more bytes. Return a fatal error as this // transformation can never complete. c.fatalError(i, errShortInternal) break } // in.b is an internal buffer and we can make progress. in.p, in.n = 0, copy(in.b, in.src()) fallthrough case nil: // if i == low, we have depleted the bytes at index i or any lower levels. // In that case we increase low and i. In all other cases we decrease i to // fetch more bytes before proceeding to the next index. if i > low { i-- continue } default: c.fatalError(i, err0) } // Exhausted level low or fatal error: increase low and continue // to process the bytes accepted so far. i++ low = i } // If c.errStart > 0, this means we found a fatal error. We will clear // all upstream buffers. At this point, no more progress can be made // downstream, as Transform would have bailed while handling ErrShortDst. if c.errStart > 0 { for i := 1; i < c.errStart; i++ { c.link[i].p, c.link[i].n = 0, 0 } err, c.errStart, c.err = c.err, 0, nil } return dstL.n, srcL.p, err } // Deprecated: Use runes.Remove instead. func RemoveFunc(f func(r rune) bool) Transformer { return removeF(f) } type removeF func(r rune) bool func (removeF) Reset() {} // Transform implements the Transformer interface. func (t removeF) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { for r, sz := rune(0), 0; len(src) > 0; src = src[sz:] { if r = rune(src[0]); r < utf8.RuneSelf { sz = 1 } else { r, sz = utf8.DecodeRune(src) if sz == 1 { // Invalid rune. if !atEOF && !utf8.FullRune(src) { err = ErrShortSrc break } // We replace illegal bytes with RuneError. Not doing so might // otherwise turn a sequence of invalid UTF-8 into valid UTF-8. // The resulting byte sequence may subsequently contain runes // for which t(r) is true that were passed unnoticed. if !t(r) { if nDst+3 > len(dst) { err = ErrShortDst break } nDst += copy(dst[nDst:], "\uFFFD") } nSrc++ continue } } if !t(r) { if nDst+sz > len(dst) { err = ErrShortDst break } nDst += copy(dst[nDst:], src[:sz]) } nSrc += sz } return } // grow returns a new []byte that is longer than b, and copies the first n bytes // of b to the start of the new slice. func grow(b []byte, n int) []byte { m := len(b) if m <= 32 { m = 64 } else if m <= 256 { m *= 2 } else { m += m >> 1 } buf := make([]byte, m) copy(buf, b[:n]) return buf } const initialBufSize = 128 // String returns a string with the result of converting s[:n] using t, where // n <= len(s). If err == nil, n will be len(s). It calls Reset on t. func String(t Transformer, s string) (result string, n int, err error) { t.Reset() if s == "" { // Fast path for the common case for empty input. Results in about a // 86% reduction of running time for BenchmarkStringLowerEmpty. if _, _, err := t.Transform(nil, nil, true); err == nil { return "", 0, nil } } // Allocate only once. Note that both dst and src escape when passed to // Transform. buf := [2 * initialBufSize]byte{} dst := buf[:initialBufSize:initialBufSize] src := buf[initialBufSize : 2*initialBufSize] // The input string s is transformed in multiple chunks (starting with a // chunk size of initialBufSize). nDst and nSrc are per-chunk (or // per-Transform-call) indexes, pDst and pSrc are overall indexes. nDst, nSrc := 0, 0 pDst, pSrc := 0, 0 // pPrefix is the length of a common prefix: the first pPrefix bytes of the // result will equal the first pPrefix bytes of s. It is not guaranteed to // be the largest such value, but if pPrefix, len(result) and len(s) are // all equal after the final transform (i.e. calling Transform with atEOF // being true returned nil error) then we don't need to allocate a new // result string. pPrefix := 0 for { // Invariant: pDst == pPrefix && pSrc == pPrefix. n := copy(src, s[pSrc:]) nDst, nSrc, err = t.Transform(dst, src[:n], pSrc+n == len(s)) pDst += nDst pSrc += nSrc // TODO: let transformers implement an optional Spanner interface, akin // to norm's QuickSpan. This would even allow us to avoid any allocation. if !bytes.Equal(dst[:nDst], src[:nSrc]) { break } pPrefix = pSrc if err == ErrShortDst { // A buffer can only be short if a transformer modifies its input. break } else if err == ErrShortSrc { if nSrc == 0 { // No progress was made. break } // Equal so far and !atEOF, so continue checking. } else if err != nil || pPrefix == len(s) { return string(s[:pPrefix]), pPrefix, err } } // Post-condition: pDst == pPrefix + nDst && pSrc == pPrefix + nSrc. // We have transformed the first pSrc bytes of the input s to become pDst // transformed bytes. Those transformed bytes are discontiguous: the first // pPrefix of them equal s[:pPrefix] and the last nDst of them equal // dst[:nDst]. We copy them around, into a new dst buffer if necessary, so // that they become one contiguous slice: dst[:pDst]. if pPrefix != 0 { newDst := dst if pDst > len(newDst) { newDst = make([]byte, len(s)+nDst-nSrc) } copy(newDst[pPrefix:pDst], dst[:nDst]) copy(newDst[:pPrefix], s[:pPrefix]) dst = newDst } // Prevent duplicate Transform calls with atEOF being true at the end of // the input. Also return if we have an unrecoverable error. if (err == nil && pSrc == len(s)) || (err != nil && err != ErrShortDst && err != ErrShortSrc) { return string(dst[:pDst]), pSrc, err } // Transform the remaining input, growing dst and src buffers as necessary. for { n := copy(src, s[pSrc:]) atEOF := pSrc+n == len(s) nDst, nSrc, err := t.Transform(dst[pDst:], src[:n], atEOF) pDst += nDst pSrc += nSrc // If we got ErrShortDst or ErrShortSrc, do not grow as long as we can // make progress. This may avoid excessive allocations. if err == ErrShortDst { if nDst == 0 { dst = grow(dst, pDst) } } else if err == ErrShortSrc { if atEOF { return string(dst[:pDst]), pSrc, err } if nSrc == 0 { src = grow(src, 0) } } else if err != nil || pSrc == len(s) { return string(dst[:pDst]), pSrc, err } } } // Bytes returns a new byte slice with the result of converting b[:n] using t, // where n <= len(b). If err == nil, n will be len(b). It calls Reset on t. func Bytes(t Transformer, b []byte) (result []byte, n int, err error) { return doAppend(t, 0, make([]byte, len(b)), b) } // Append appends the result of converting src[:n] using t to dst, where // n <= len(src), If err == nil, n will be len(src). It calls Reset on t. func Append(t Transformer, dst, src []byte) (result []byte, n int, err error) { if len(dst) == cap(dst) { n := len(src) + len(dst) // It is okay for this to be 0. b := make([]byte, n) dst = b[:copy(b, dst)] } return doAppend(t, len(dst), dst[:cap(dst)], src) } func doAppend(t Transformer, pDst int, dst, src []byte) (result []byte, n int, err error) { t.Reset() pSrc := 0 for { nDst, nSrc, err := t.Transform(dst[pDst:], src[pSrc:], true) pDst += nDst pSrc += nSrc if err != ErrShortDst { return dst[:pDst], pSrc, err } // Grow the destination buffer, but do not grow as long as we can make // progress. This may avoid excessive allocations. if nDst == 0 { dst = grow(dst, pDst) } } } ================================================ FILE: vendor/golang.org/x/xerrors/LICENSE ================================================ Copyright (c) 2019 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. ================================================ FILE: vendor/golang.org/x/xerrors/PATENTS ================================================ 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. ================================================ FILE: vendor/golang.org/x/xerrors/README ================================================ This repository holds the transition packages for the new Go 1.13 error values. See golang.org/design/29934-error-values. ================================================ FILE: vendor/golang.org/x/xerrors/adaptor.go ================================================ // Copyright 2018 The Go 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 xerrors import ( "bytes" "fmt" "io" "reflect" "strconv" ) // FormatError calls the FormatError method of f with an errors.Printer // configured according to s and verb, and writes the result to s. func FormatError(f Formatter, s fmt.State, verb rune) { // Assuming this function is only called from the Format method, and given // that FormatError takes precedence over Format, it cannot be called from // any package that supports errors.Formatter. It is therefore safe to // disregard that State may be a specific printer implementation and use one // of our choice instead. // limitations: does not support printing error as Go struct. var ( sep = " " // separator before next error p = &state{State: s} direct = true ) var err error = f switch verb { // Note that this switch must match the preference order // for ordinary string printing (%#v before %+v, and so on). case 'v': if s.Flag('#') { if stringer, ok := err.(fmt.GoStringer); ok { io.WriteString(&p.buf, stringer.GoString()) goto exit } // proceed as if it were %v } else if s.Flag('+') { p.printDetail = true sep = "\n - " } case 's': case 'q', 'x', 'X': // Use an intermediate buffer in the rare cases that precision, // truncation, or one of the alternative verbs (q, x, and X) are // specified. direct = false default: p.buf.WriteString("%!") p.buf.WriteRune(verb) p.buf.WriteByte('(') switch { case err != nil: p.buf.WriteString(reflect.TypeOf(f).String()) default: p.buf.WriteString("") } p.buf.WriteByte(')') io.Copy(s, &p.buf) return } loop: for { switch v := err.(type) { case Formatter: err = v.FormatError((*printer)(p)) case fmt.Formatter: v.Format(p, 'v') break loop default: io.WriteString(&p.buf, v.Error()) break loop } if err == nil { break } if p.needColon || !p.printDetail { p.buf.WriteByte(':') p.needColon = false } p.buf.WriteString(sep) p.inDetail = false p.needNewline = false } exit: width, okW := s.Width() prec, okP := s.Precision() if !direct || (okW && width > 0) || okP { // Construct format string from State s. format := []byte{'%'} if s.Flag('-') { format = append(format, '-') } if s.Flag('+') { format = append(format, '+') } if s.Flag(' ') { format = append(format, ' ') } if okW { format = strconv.AppendInt(format, int64(width), 10) } if okP { format = append(format, '.') format = strconv.AppendInt(format, int64(prec), 10) } format = append(format, string(verb)...) fmt.Fprintf(s, string(format), p.buf.String()) } else { io.Copy(s, &p.buf) } } var detailSep = []byte("\n ") // state tracks error printing state. It implements fmt.State. type state struct { fmt.State buf bytes.Buffer printDetail bool inDetail bool needColon bool needNewline bool } func (s *state) Write(b []byte) (n int, err error) { if s.printDetail { if len(b) == 0 { return 0, nil } if s.inDetail && s.needColon { s.needNewline = true if b[0] == '\n' { b = b[1:] } } k := 0 for i, c := range b { if s.needNewline { if s.inDetail && s.needColon { s.buf.WriteByte(':') s.needColon = false } s.buf.Write(detailSep) s.needNewline = false } if c == '\n' { s.buf.Write(b[k:i]) k = i + 1 s.needNewline = true } } s.buf.Write(b[k:]) if !s.inDetail { s.needColon = true } } else if !s.inDetail { s.buf.Write(b) } return len(b), nil } // printer wraps a state to implement an xerrors.Printer. type printer state func (s *printer) Print(args ...interface{}) { if !s.inDetail || s.printDetail { fmt.Fprint((*state)(s), args...) } } func (s *printer) Printf(format string, args ...interface{}) { if !s.inDetail || s.printDetail { fmt.Fprintf((*state)(s), format, args...) } } func (s *printer) Detail() bool { s.inDetail = true return s.printDetail } ================================================ FILE: vendor/golang.org/x/xerrors/codereview.cfg ================================================ issuerepo: golang/go ================================================ FILE: vendor/golang.org/x/xerrors/doc.go ================================================ // Copyright 2019 The Go 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 xerrors implements functions to manipulate errors. // // This package is based on the Go 2 proposal for error values: // https://golang.org/design/29934-error-values // // These functions were incorporated into the standard library's errors package // in Go 1.13: // - Is // - As // - Unwrap // // Also, Errorf's %w verb was incorporated into fmt.Errorf. // // Use this package to get equivalent behavior in all supported Go versions. // // No other features of this package were included in Go 1.13, and at present // there are no plans to include any of them. package xerrors // import "golang.org/x/xerrors" ================================================ FILE: vendor/golang.org/x/xerrors/errors.go ================================================ // 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 xerrors import "fmt" // errorString is a trivial implementation of error. type errorString struct { s string frame Frame } // New returns an error that formats as the given text. // // The returned error contains a Frame set to the caller's location and // implements Formatter to show this information when printed with details. func New(text string) error { return &errorString{text, Caller(1)} } func (e *errorString) Error() string { return e.s } func (e *errorString) Format(s fmt.State, v rune) { FormatError(e, s, v) } func (e *errorString) FormatError(p Printer) (next error) { p.Print(e.s) e.frame.Format(p) return nil } ================================================ FILE: vendor/golang.org/x/xerrors/fmt.go ================================================ // Copyright 2018 The Go 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 xerrors import ( "fmt" "strings" "unicode" "unicode/utf8" "golang.org/x/xerrors/internal" ) const percentBangString = "%!" // Errorf formats according to a format specifier and returns the string as a // value that satisfies error. // // The returned error includes the file and line number of the caller when // formatted with additional detail enabled. If the last argument is an error // the returned error's Format method will return it if the format string ends // with ": %s", ": %v", or ": %w". If the last argument is an error and the // format string ends with ": %w", the returned error implements an Unwrap // method returning it. // // If the format specifier includes a %w verb with an error operand in a // position other than at the end, the returned error will still implement an // Unwrap method returning the operand, but the error's Format method will not // return the wrapped error. // // It is invalid to include more than one %w verb or to supply it with an // operand that does not implement the error interface. The %w verb is otherwise // a synonym for %v. func Errorf(format string, a ...interface{}) error { format = formatPlusW(format) // Support a ": %[wsv]" suffix, which works well with xerrors.Formatter. wrap := strings.HasSuffix(format, ": %w") idx, format2, ok := parsePercentW(format) percentWElsewhere := !wrap && idx >= 0 if !percentWElsewhere && (wrap || strings.HasSuffix(format, ": %s") || strings.HasSuffix(format, ": %v")) { err := errorAt(a, len(a)-1) if err == nil { return &noWrapError{fmt.Sprintf(format, a...), nil, Caller(1)} } // TODO: this is not entirely correct. The error value could be // printed elsewhere in format if it mixes numbered with unnumbered // substitutions. With relatively small changes to doPrintf we can // have it optionally ignore extra arguments and pass the argument // list in its entirety. msg := fmt.Sprintf(format[:len(format)-len(": %s")], a[:len(a)-1]...) frame := Frame{} if internal.EnableTrace { frame = Caller(1) } if wrap { return &wrapError{msg, err, frame} } return &noWrapError{msg, err, frame} } // Support %w anywhere. // TODO: don't repeat the wrapped error's message when %w occurs in the middle. msg := fmt.Sprintf(format2, a...) if idx < 0 { return &noWrapError{msg, nil, Caller(1)} } err := errorAt(a, idx) if !ok || err == nil { // Too many %ws or argument of %w is not an error. Approximate the Go // 1.13 fmt.Errorf message. return &noWrapError{fmt.Sprintf("%sw(%s)", percentBangString, msg), nil, Caller(1)} } frame := Frame{} if internal.EnableTrace { frame = Caller(1) } return &wrapError{msg, err, frame} } func errorAt(args []interface{}, i int) error { if i < 0 || i >= len(args) { return nil } err, ok := args[i].(error) if !ok { return nil } return err } // formatPlusW is used to avoid the vet check that will barf at %w. func formatPlusW(s string) string { return s } // Return the index of the only %w in format, or -1 if none. // Also return a rewritten format string with %w replaced by %v, and // false if there is more than one %w. // TODO: handle "%[N]w". func parsePercentW(format string) (idx int, newFormat string, ok bool) { // Loosely copied from golang.org/x/tools/go/analysis/passes/printf/printf.go. idx = -1 ok = true n := 0 sz := 0 var isW bool for i := 0; i < len(format); i += sz { if format[i] != '%' { sz = 1 continue } // "%%" is not a format directive. if i+1 < len(format) && format[i+1] == '%' { sz = 2 continue } sz, isW = parsePrintfVerb(format[i:]) if isW { if idx >= 0 { ok = false } else { idx = n } // "Replace" the last character, the 'w', with a 'v'. p := i + sz - 1 format = format[:p] + "v" + format[p+1:] } n++ } return idx, format, ok } // Parse the printf verb starting with a % at s[0]. // Return how many bytes it occupies and whether the verb is 'w'. func parsePrintfVerb(s string) (int, bool) { // Assume only that the directive is a sequence of non-letters followed by a single letter. sz := 0 var r rune for i := 1; i < len(s); i += sz { r, sz = utf8.DecodeRuneInString(s[i:]) if unicode.IsLetter(r) { return i + sz, r == 'w' } } return len(s), false } type noWrapError struct { msg string err error frame Frame } func (e *noWrapError) Error() string { return fmt.Sprint(e) } func (e *noWrapError) Format(s fmt.State, v rune) { FormatError(e, s, v) } func (e *noWrapError) FormatError(p Printer) (next error) { p.Print(e.msg) e.frame.Format(p) return e.err } type wrapError struct { msg string err error frame Frame } func (e *wrapError) Error() string { return fmt.Sprint(e) } func (e *wrapError) Format(s fmt.State, v rune) { FormatError(e, s, v) } func (e *wrapError) FormatError(p Printer) (next error) { p.Print(e.msg) e.frame.Format(p) return e.err } func (e *wrapError) Unwrap() error { return e.err } ================================================ FILE: vendor/golang.org/x/xerrors/format.go ================================================ // Copyright 2018 The Go 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 xerrors // A Formatter formats error messages. type Formatter interface { error // FormatError prints the receiver's first error and returns the next error in // the error chain, if any. FormatError(p Printer) (next error) } // A Printer formats error messages. // // The most common implementation of Printer is the one provided by package fmt // during Printf (as of Go 1.13). Localization packages such as golang.org/x/text/message // typically provide their own implementations. type Printer interface { // Print appends args to the message output. Print(args ...interface{}) // Printf writes a formatted string. Printf(format string, args ...interface{}) // Detail reports whether error detail is requested. // After the first call to Detail, all text written to the Printer // is formatted as additional detail, or ignored when // detail has not been requested. // If Detail returns false, the caller can avoid printing the detail at all. Detail() bool } ================================================ FILE: vendor/golang.org/x/xerrors/frame.go ================================================ // Copyright 2018 The Go 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 xerrors import ( "runtime" ) // A Frame contains part of a call stack. type Frame struct { // Make room for three PCs: the one we were asked for, what it called, // and possibly a PC for skipPleaseUseCallersFrames. See: // https://go.googlesource.com/go/+/032678e0fb/src/runtime/extern.go#169 frames [3]uintptr } // Caller returns a Frame that describes a frame on the caller's stack. // The argument skip is the number of frames to skip over. // Caller(0) returns the frame for the caller of Caller. func Caller(skip int) Frame { var s Frame runtime.Callers(skip+1, s.frames[:]) return s } // location reports the file, line, and function of a frame. // // The returned function may be "" even if file and line are not. func (f Frame) location() (function, file string, line int) { frames := runtime.CallersFrames(f.frames[:]) if _, ok := frames.Next(); !ok { return "", "", 0 } fr, ok := frames.Next() if !ok { return "", "", 0 } return fr.Function, fr.File, fr.Line } // Format prints the stack as error detail. // It should be called from an error's Format implementation // after printing any other error detail. func (f Frame) Format(p Printer) { if p.Detail() { function, file, line := f.location() if function != "" { p.Printf("%s\n ", function) } if file != "" { p.Printf("%s:%d\n", file, line) } } } ================================================ FILE: vendor/golang.org/x/xerrors/internal/internal.go ================================================ // Copyright 2018 The Go 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 internal // EnableTrace indicates whether stack information should be recorded in errors. var EnableTrace = true ================================================ FILE: vendor/golang.org/x/xerrors/wrap.go ================================================ // Copyright 2018 The Go 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 xerrors import ( "reflect" ) // A Wrapper provides context around another error. type Wrapper interface { // Unwrap returns the next error in the error chain. // If there is no next error, Unwrap returns nil. Unwrap() error } // Opaque returns an error with the same error formatting as err // but that does not match err and cannot be unwrapped. func Opaque(err error) error { return noWrapper{err} } type noWrapper struct { error } func (e noWrapper) FormatError(p Printer) (next error) { if f, ok := e.error.(Formatter); ok { return f.FormatError(p) } p.Print(e.error) return nil } // Unwrap returns the result of calling the Unwrap method on err, if err implements // Unwrap. Otherwise, Unwrap returns nil. func Unwrap(err error) error { u, ok := err.(Wrapper) if !ok { return nil } return u.Unwrap() } // Is reports whether any error in err's chain matches target. // // An error is considered to match a target if it is equal to that target or if // it implements a method Is(error) bool such that Is(target) returns true. func Is(err, target error) bool { if target == nil { return err == target } isComparable := reflect.TypeOf(target).Comparable() for { if isComparable && err == target { return true } if x, ok := err.(interface{ Is(error) bool }); ok && x.Is(target) { return true } // TODO: consider supporing target.Is(err). This would allow // user-definable predicates, but also may allow for coping with sloppy // APIs, thereby making it easier to get away with them. if err = Unwrap(err); err == nil { return false } } } // As finds the first error in err's chain that matches the type to which target // points, and if so, sets the target to its value and returns true. An error // matches a type if it is assignable to the target type, or if it has a method // As(interface{}) bool such that As(target) returns true. As will panic if target // is not a non-nil pointer to a type which implements error or is of interface type. // // The As method should set the target to its value and return true if err // matches the type to which target points. func As(err error, target interface{}) bool { if target == nil { panic("errors: target cannot be nil") } val := reflect.ValueOf(target) typ := val.Type() if typ.Kind() != reflect.Ptr || val.IsNil() { panic("errors: target must be a non-nil pointer") } if e := typ.Elem(); e.Kind() != reflect.Interface && !e.Implements(errorType) { panic("errors: *target must be interface or implement error") } targetType := typ.Elem() for err != nil { if reflect.TypeOf(err).AssignableTo(targetType) { val.Elem().Set(reflect.ValueOf(err)) return true } if x, ok := err.(interface{ As(interface{}) bool }); ok && x.As(target) { return true } err = Unwrap(err) } return false } var errorType = reflect.TypeOf((*error)(nil)).Elem() ================================================ FILE: vendor/gopkg.in/yaml.v3/LICENSE ================================================ This project is covered by two different licenses: MIT and Apache. #### MIT License #### The following files were ported to Go from C files of libyaml, and thus are still covered by their original MIT license, with the additional copyright staring in 2011 when the project was ported over: apic.go emitterc.go parserc.go readerc.go scannerc.go writerc.go yamlh.go yamlprivateh.go Copyright (c) 2006-2010 Kirill Simonov Copyright (c) 2006-2011 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. ### Apache License ### All the remaining project files are covered by the Apache license: Copyright (c) 2011-2019 Canonical Ltd Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/gopkg.in/yaml.v3/NOTICE ================================================ Copyright 2011-2016 Canonical Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: vendor/gopkg.in/yaml.v3/README.md ================================================ # 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.2, but preserves some behavior from 1.1 for backwards compatibility. Specifically, as of v3 of the yaml package: - YAML 1.1 bools (_yes/no, on/off_) are supported as long as they are being decoded into a typed bool value. Otherwise they behave as a string. Booleans in YAML 1.2 are _true/false_ only. - Octals encode and decode as _0777_ per YAML 1.1, rather than _0o777_ as specified in YAML 1.2, because most parsers still use the old format. Octals in the _0o777_ format are supported though, so new files work. - Does not support base-60 floats. These are gone from YAML 1.2, and were actually never supported by this package as it's clearly a poor choice. and offers backwards compatibility with YAML 1.1 in some cases. 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.v3*. To install it, run: go get gopkg.in/yaml.v3 API documentation ----------------- If opened in a browser, the import path itself leads to the API documentation: - [https://gopkg.in/yaml.v3](https://gopkg.in/yaml.v3) API stability ------------- The package API for yaml v3 will remain stable as described in [gopkg.in](https://gopkg.in). License ------- The yaml package is licensed under the MIT and Apache License 2.0 licenses. Please see the LICENSE file for details. Example ------- ```Go package main import ( "fmt" "log" "gopkg.in/yaml.v3" ) var data = ` a: Easy! b: c: 2 d: [3, 4] ` // Note: struct fields must be public in order for unmarshal to // correctly populate the data. type T struct { A string B struct { RenamedC int `yaml:"c"` D []int `yaml:",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 ``` ================================================ FILE: vendor/gopkg.in/yaml.v3/apic.go ================================================ // // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 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. package yaml import ( "io" ) 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 } // Reader read handler. func yaml_reader_read_handler(parser *yaml_parser_t, buffer []byte) (n int, err error) { return parser.input_reader.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_reader(parser *yaml_parser_t, r io.Reader) { if parser.read_handler != nil { panic("must set the input source only once") } parser.read_handler = yaml_reader_read_handler parser.input_reader = r } // 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) { *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), best_width: -1, } } // 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 } // yaml_writer_write_handler uses emitter.output_writer to write the // emitted text. func yaml_writer_write_handler(emitter *yaml_emitter_t, buffer []byte) error { _, err := emitter.output_writer.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_writer(emitter *yaml_emitter_t, w io.Writer) { if emitter.write_handler != nil { panic("must set the output target only once") } emitter.write_handler = yaml_writer_write_handler emitter.output_writer = w } // 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) { *event = yaml_event_t{ typ: yaml_STREAM_START_EVENT, encoding: encoding, } } // Create STREAM-END. func yaml_stream_end_event_initialize(event *yaml_event_t) { *event = yaml_event_t{ typ: yaml_STREAM_END_EVENT, } } // 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, ) { *event = yaml_event_t{ typ: yaml_DOCUMENT_START_EVENT, version_directive: version_directive, tag_directives: tag_directives, implicit: implicit, } } // Create DOCUMENT-END. func yaml_document_end_event_initialize(event *yaml_event_t, implicit bool) { *event = yaml_event_t{ typ: yaml_DOCUMENT_END_EVENT, implicit: implicit, } } // Create ALIAS. func yaml_alias_event_initialize(event *yaml_event_t, anchor []byte) bool { *event = yaml_event_t{ typ: yaml_ALIAS_EVENT, anchor: anchor, } return true } // 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) { *event = yaml_event_t{ typ: yaml_MAPPING_START_EVENT, anchor: anchor, tag: tag, implicit: implicit, style: yaml_style_t(style), } } // Create MAPPING-END. func yaml_mapping_end_event_initialize(event *yaml_event_t) { *event = yaml_event_t{ typ: yaml_MAPPING_END_EVENT, } } // 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 compiler 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 //} // // ================================================ FILE: vendor/gopkg.in/yaml.v3/decode.go ================================================ // // Copyright (c) 2011-2019 Canonical Ltd // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package yaml import ( "encoding" "encoding/base64" "fmt" "io" "math" "reflect" "strconv" "time" ) // ---------------------------------------------------------------------------- // Parser, produces a node tree out of a libyaml event stream. type parser struct { parser yaml_parser_t event yaml_event_t doc *Node anchors map[string]*Node doneInit bool textless bool } 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) return &p } func newParserFromReader(r io.Reader) *parser { p := parser{} if !yaml_parser_initialize(&p.parser) { panic("failed to initialize YAML emitter") } yaml_parser_set_input_reader(&p.parser, r) return &p } func (p *parser) init() { if p.doneInit { return } p.anchors = make(map[string]*Node) p.expect(yaml_STREAM_START_EVENT) p.doneInit = true } func (p *parser) destroy() { if p.event.typ != yaml_NO_EVENT { yaml_event_delete(&p.event) } yaml_parser_delete(&p.parser) } // expect consumes an event from the event stream and // checks that it's of the expected type. func (p *parser) expect(e yaml_event_type_t) { if p.event.typ == yaml_NO_EVENT { if !yaml_parser_parse(&p.parser, &p.event) { p.fail() } } if p.event.typ == yaml_STREAM_END_EVENT { failf("attempted to go past the end of stream; corrupted value?") } if p.event.typ != e { p.parser.problem = fmt.Sprintf("expected %s event but got %s", e, p.event.typ) p.fail() } yaml_event_delete(&p.event) p.event.typ = yaml_NO_EVENT } // peek peeks at the next event in the event stream, // puts the results into p.event and returns the event type. func (p *parser) peek() yaml_event_type_t { if p.event.typ != yaml_NO_EVENT { return p.event.typ } // It's curious choice from the underlying API to generally return a // positive result on success, but on this case return true in an error // scenario. This was the source of bugs in the past (issue #666). if !yaml_parser_parse(&p.parser, &p.event) || p.parser.error != yaml_NO_ERROR { p.fail() } return p.event.typ } func (p *parser) fail() { var where string var line int if p.parser.context_mark.line != 0 { line = p.parser.context_mark.line // Scanner errors don't iterate line before returning error if p.parser.error == yaml_SCANNER_ERROR { line++ } } else if p.parser.problem_mark.line != 0 { line = p.parser.problem_mark.line // Scanner errors don't iterate line before returning error if p.parser.error == yaml_SCANNER_ERROR { 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 { n.Anchor = string(anchor) p.anchors[n.Anchor] = n } } func (p *parser) parse() *Node { p.init() switch p.peek() { 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 case yaml_TAIL_COMMENT_EVENT: panic("internal error: unexpected tail comment event (please report)") default: panic("internal error: attempted to parse unknown event (please report): " + p.event.typ.String()) } } func (p *parser) node(kind Kind, defaultTag, tag, value string) *Node { var style Style if tag != "" && tag != "!" { tag = shortTag(tag) style = TaggedStyle } else if defaultTag != "" { tag = defaultTag } else if kind == ScalarNode { tag, _ = resolve("", value) } n := &Node{ Kind: kind, Tag: tag, Value: value, Style: style, } if !p.textless { n.Line = p.event.start_mark.line + 1 n.Column = p.event.start_mark.column + 1 n.HeadComment = string(p.event.head_comment) n.LineComment = string(p.event.line_comment) n.FootComment = string(p.event.foot_comment) } return n } func (p *parser) parseChild(parent *Node) *Node { child := p.parse() parent.Content = append(parent.Content, child) return child } func (p *parser) document() *Node { n := p.node(DocumentNode, "", "", "") p.doc = n p.expect(yaml_DOCUMENT_START_EVENT) p.parseChild(n) if p.peek() == yaml_DOCUMENT_END_EVENT { n.FootComment = string(p.event.foot_comment) } p.expect(yaml_DOCUMENT_END_EVENT) return n } func (p *parser) alias() *Node { n := p.node(AliasNode, "", "", string(p.event.anchor)) n.Alias = p.anchors[n.Value] if n.Alias == nil { failf("unknown anchor '%s' referenced", n.Value) } p.expect(yaml_ALIAS_EVENT) return n } func (p *parser) scalar() *Node { var parsedStyle = p.event.scalar_style() var nodeStyle Style switch { case parsedStyle&yaml_DOUBLE_QUOTED_SCALAR_STYLE != 0: nodeStyle = DoubleQuotedStyle case parsedStyle&yaml_SINGLE_QUOTED_SCALAR_STYLE != 0: nodeStyle = SingleQuotedStyle case parsedStyle&yaml_LITERAL_SCALAR_STYLE != 0: nodeStyle = LiteralStyle case parsedStyle&yaml_FOLDED_SCALAR_STYLE != 0: nodeStyle = FoldedStyle } var nodeValue = string(p.event.value) var nodeTag = string(p.event.tag) var defaultTag string if nodeStyle == 0 { if nodeValue == "<<" { defaultTag = mergeTag } } else { defaultTag = strTag } n := p.node(ScalarNode, defaultTag, nodeTag, nodeValue) n.Style |= nodeStyle p.anchor(n, p.event.anchor) p.expect(yaml_SCALAR_EVENT) return n } func (p *parser) sequence() *Node { n := p.node(SequenceNode, seqTag, string(p.event.tag), "") if p.event.sequence_style()&yaml_FLOW_SEQUENCE_STYLE != 0 { n.Style |= FlowStyle } p.anchor(n, p.event.anchor) p.expect(yaml_SEQUENCE_START_EVENT) for p.peek() != yaml_SEQUENCE_END_EVENT { p.parseChild(n) } n.LineComment = string(p.event.line_comment) n.FootComment = string(p.event.foot_comment) p.expect(yaml_SEQUENCE_END_EVENT) return n } func (p *parser) mapping() *Node { n := p.node(MappingNode, mapTag, string(p.event.tag), "") block := true if p.event.mapping_style()&yaml_FLOW_MAPPING_STYLE != 0 { block = false n.Style |= FlowStyle } p.anchor(n, p.event.anchor) p.expect(yaml_MAPPING_START_EVENT) for p.peek() != yaml_MAPPING_END_EVENT { k := p.parseChild(n) if block && k.FootComment != "" { // Must be a foot comment for the prior value when being dedented. if len(n.Content) > 2 { n.Content[len(n.Content)-3].FootComment = k.FootComment k.FootComment = "" } } v := p.parseChild(n) if k.FootComment == "" && v.FootComment != "" { k.FootComment = v.FootComment v.FootComment = "" } if p.peek() == yaml_TAIL_COMMENT_EVENT { if k.FootComment == "" { k.FootComment = string(p.event.foot_comment) } p.expect(yaml_TAIL_COMMENT_EVENT) } } n.LineComment = string(p.event.line_comment) n.FootComment = string(p.event.foot_comment) if n.Style&FlowStyle == 0 && n.FootComment != "" && len(n.Content) > 1 { n.Content[len(n.Content)-2].FootComment = n.FootComment n.FootComment = "" } p.expect(yaml_MAPPING_END_EVENT) return n } // ---------------------------------------------------------------------------- // Decoder, unmarshals a node into a provided value. type decoder struct { doc *Node aliases map[*Node]bool terrors []string stringMapType reflect.Type generalMapType reflect.Type knownFields bool uniqueKeys bool decodeCount int aliasCount int aliasDepth int mergedFields map[interface{}]bool } var ( nodeType = reflect.TypeOf(Node{}) durationType = reflect.TypeOf(time.Duration(0)) stringMapType = reflect.TypeOf(map[string]interface{}{}) generalMapType = reflect.TypeOf(map[interface{}]interface{}{}) ifaceType = generalMapType.Elem() timeType = reflect.TypeOf(time.Time{}) ptrTimeType = reflect.TypeOf(&time.Time{}) ) func newDecoder() *decoder { d := &decoder{ stringMapType: stringMapType, generalMapType: generalMapType, uniqueKeys: true, } d.aliases = make(map[*Node]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 != seqTag && tag != mapTag { 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, shortTag(tag), value, out.Type())) } func (d *decoder) callUnmarshaler(n *Node, u Unmarshaler) (good bool) { err := u.UnmarshalYAML(n) if e, ok := err.(*TypeError); ok { d.terrors = append(d.terrors, e.Errors...) return false } if err != nil { fail(err) } return true } func (d *decoder) callObsoleteUnmarshaler(n *Node, u obsoleteUnmarshaler) (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.ShortTag() == nullTag { 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() { outi := out.Addr().Interface() if u, ok := outi.(Unmarshaler); ok { good = d.callUnmarshaler(n, u) return out, true, good } if u, ok := outi.(obsoleteUnmarshaler); ok { good = d.callObsoleteUnmarshaler(n, u) return out, true, good } } } return out, false, false } func (d *decoder) fieldByIndex(n *Node, v reflect.Value, index []int) (field reflect.Value) { if n.ShortTag() == nullTag { return reflect.Value{} } for _, num := range index { for { if v.Kind() == reflect.Ptr { if v.IsNil() { v.Set(reflect.New(v.Type().Elem())) } v = v.Elem() continue } break } v = v.Field(num) } return v } const ( // 400,000 decode operations is ~500kb of dense object declarations, or // ~5kb of dense object declarations with 10000% alias expansion alias_ratio_range_low = 400000 // 4,000,000 decode operations is ~5MB of dense object declarations, or // ~4.5MB of dense object declarations with 10% alias expansion alias_ratio_range_high = 4000000 // alias_ratio_range is the range over which we scale allowed alias ratios alias_ratio_range = float64(alias_ratio_range_high - alias_ratio_range_low) ) func allowedAliasRatio(decodeCount int) float64 { switch { case decodeCount <= alias_ratio_range_low: // allow 99% to come from alias expansion for small-to-medium documents return 0.99 case decodeCount >= alias_ratio_range_high: // allow 10% to come from alias expansion for very large documents return 0.10 default: // scale smoothly from 99% down to 10% over the range. // this maps to 396,000 - 400,000 allowed alias-driven decodes over the range. // 400,000 decode operations is ~100MB of allocations in worst-case scenarios (single-item maps). return 0.99 - 0.89*(float64(decodeCount-alias_ratio_range_low)/alias_ratio_range) } } func (d *decoder) unmarshal(n *Node, out reflect.Value) (good bool) { d.decodeCount++ if d.aliasDepth > 0 { d.aliasCount++ } if d.aliasCount > 100 && d.decodeCount > 1000 && float64(d.aliasCount)/float64(d.decodeCount) > allowedAliasRatio(d.decodeCount) { failf("document contains excessive aliasing") } if out.Type() == nodeType { out.Set(reflect.ValueOf(n).Elem()) return true } 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) case 0: if n.IsZero() { return d.null(out) } fallthrough default: failf("cannot decode node with unknown kind %d", n.Kind) } return good } func (d *decoder) document(n *Node, out reflect.Value) (good bool) { if len(n.Content) == 1 { d.doc = n d.unmarshal(n.Content[0], out) return true } return false } func (d *decoder) alias(n *Node, out reflect.Value) (good bool) { if d.aliases[n] { // TODO this could actually be allowed in some circumstances. failf("anchor '%s' value contains itself", n.Value) } d.aliases[n] = true d.aliasDepth++ good = d.unmarshal(n.Alias, out) d.aliasDepth-- delete(d.aliases, n) return good } var zeroValue reflect.Value func resetMap(out reflect.Value) { for _, k := range out.MapKeys() { out.SetMapIndex(k, zeroValue) } } func (d *decoder) null(out reflect.Value) bool { if out.CanAddr() { switch out.Kind() { case reflect.Interface, reflect.Ptr, reflect.Map, reflect.Slice: out.Set(reflect.Zero(out.Type())) return true } } return false } func (d *decoder) scalar(n *Node, out reflect.Value) bool { var tag string var resolved interface{} if n.indicatedString() { tag = strTag resolved = n.Value } else { tag, resolved = resolve(n.Tag, n.Value) if tag == binaryTag { data, err := base64.StdEncoding.DecodeString(resolved.(string)) if err != nil { failf("!!binary value contains invalid base64 data") } resolved = string(data) } } if resolved == nil { return d.null(out) } if resolvedv := reflect.ValueOf(resolved); out.Type() == resolvedv.Type() { // We've resolved to exactly the type we want, so use that. out.Set(resolvedv) return true } // Perhaps we can use the value as a TextUnmarshaler to // set its value. if out.CanAddr() { u, ok := out.Addr().Interface().(encoding.TextUnmarshaler) if ok { var text []byte if tag == binaryTag { text = []byte(resolved.(string)) } else { // We let any value be unmarshaled into TextUnmarshaler. // That might be more lax than we'd like, but the // TextUnmarshaler itself should bowl out any dubious values. text = []byte(n.Value) } err := u.UnmarshalText(text) if err != nil { fail(err) } return true } } switch out.Kind() { case reflect.String: if tag == binaryTag { out.SetString(resolved.(string)) return true } out.SetString(n.Value) return true case reflect.Interface: out.Set(reflect.ValueOf(resolved)) return true case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: // This used to work in v2, but it's very unfriendly. isDuration := out.Type() == durationType switch resolved := resolved.(type) { case int: if !isDuration && !out.OverflowInt(int64(resolved)) { out.SetInt(int64(resolved)) return true } case int64: if !isDuration && !out.OverflowInt(resolved) { out.SetInt(resolved) return true } case uint64: if !isDuration && resolved <= math.MaxInt64 && !out.OverflowInt(int64(resolved)) { out.SetInt(int64(resolved)) return true } case float64: if !isDuration && resolved <= math.MaxInt64 && !out.OverflowInt(int64(resolved)) { out.SetInt(int64(resolved)) return true } case string: if out.Type() == durationType { d, err := time.ParseDuration(resolved) if err == nil { out.SetInt(int64(d)) return 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)) return true } case int64: if resolved >= 0 && !out.OverflowUint(uint64(resolved)) { out.SetUint(uint64(resolved)) return true } case uint64: if !out.OverflowUint(uint64(resolved)) { out.SetUint(uint64(resolved)) return true } case float64: if resolved <= math.MaxUint64 && !out.OverflowUint(uint64(resolved)) { out.SetUint(uint64(resolved)) return true } } case reflect.Bool: switch resolved := resolved.(type) { case bool: out.SetBool(resolved) return true case string: // This offers some compatibility with the 1.1 spec (https://yaml.org/type/bool.html). // It only works if explicitly attempting to unmarshal into a typed bool value. switch resolved { case "y", "Y", "yes", "Yes", "YES", "on", "On", "ON": out.SetBool(true) return true case "n", "N", "no", "No", "NO", "off", "Off", "OFF": out.SetBool(false) return true } } case reflect.Float32, reflect.Float64: switch resolved := resolved.(type) { case int: out.SetFloat(float64(resolved)) return true case int64: out.SetFloat(float64(resolved)) return true case uint64: out.SetFloat(float64(resolved)) return true case float64: out.SetFloat(resolved) return true } case reflect.Struct: if resolvedv := reflect.ValueOf(resolved); out.Type() == resolvedv.Type() { out.Set(resolvedv) return true } case reflect.Ptr: panic("yaml internal error: please report the issue") } d.terror(n, tag, out) return false } 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.Content) var iface reflect.Value switch out.Kind() { case reflect.Slice: out.Set(reflect.MakeSlice(out.Type(), l, l)) case reflect.Array: if l != out.Len() { failf("invalid array: want %d elements but got %d", out.Len(), 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, seqTag, 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.Content[i], e); ok { out.Index(j).Set(e) j++ } } if out.Kind() != reflect.Array { 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) { l := len(n.Content) if d.uniqueKeys { nerrs := len(d.terrors) for i := 0; i < l; i += 2 { ni := n.Content[i] for j := i + 2; j < l; j += 2 { nj := n.Content[j] if ni.Kind == nj.Kind && ni.Value == nj.Value { d.terrors = append(d.terrors, fmt.Sprintf("line %d: mapping key %#v already defined at line %d", nj.Line, nj.Value, ni.Line)) } } } if len(d.terrors) > nerrs { return false } } switch out.Kind() { case reflect.Struct: return d.mappingStruct(n, out) case reflect.Map: // okay case reflect.Interface: iface := out if isStringMap(n) { out = reflect.MakeMap(d.stringMapType) } else { out = reflect.MakeMap(d.generalMapType) } iface.Set(out) default: d.terror(n, mapTag, out) return false } outt := out.Type() kt := outt.Key() et := outt.Elem() stringMapType := d.stringMapType generalMapType := d.generalMapType if outt.Elem() == ifaceType { if outt.Key().Kind() == reflect.String { d.stringMapType = outt } else if outt.Key() == ifaceType { d.generalMapType = outt } } mergedFields := d.mergedFields d.mergedFields = nil var mergeNode *Node mapIsNew := false if out.IsNil() { out.Set(reflect.MakeMap(outt)) mapIsNew = true } for i := 0; i < l; i += 2 { if isMerge(n.Content[i]) { mergeNode = n.Content[i+1] continue } k := reflect.New(kt).Elem() if d.unmarshal(n.Content[i], k) { if mergedFields != nil { ki := k.Interface() if mergedFields[ki] { continue } mergedFields[ki] = true } 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.Content[i+1], e) || n.Content[i+1].ShortTag() == nullTag && (mapIsNew || !out.MapIndex(k).IsValid()) { out.SetMapIndex(k, e) } } } d.mergedFields = mergedFields if mergeNode != nil { d.merge(n, mergeNode, out) } d.stringMapType = stringMapType d.generalMapType = generalMapType return true } func isStringMap(n *Node) bool { if n.Kind != MappingNode { return false } l := len(n.Content) for i := 0; i < l; i += 2 { shortTag := n.Content[i].ShortTag() if shortTag != strTag && shortTag != mergeTag { return false } } return true } func (d *decoder) mappingStruct(n *Node, out reflect.Value) (good bool) { sinfo, err := getStructInfo(out.Type()) if err != nil { panic(err) } var inlineMap reflect.Value var elemType reflect.Type if sinfo.InlineMap != -1 { inlineMap = out.Field(sinfo.InlineMap) elemType = inlineMap.Type().Elem() } for _, index := range sinfo.InlineUnmarshalers { field := d.fieldByIndex(n, out, index) d.prepare(n, field) } mergedFields := d.mergedFields d.mergedFields = nil var mergeNode *Node var doneFields []bool if d.uniqueKeys { doneFields = make([]bool, len(sinfo.FieldsList)) } name := settableValueOf("") l := len(n.Content) for i := 0; i < l; i += 2 { ni := n.Content[i] if isMerge(ni) { mergeNode = n.Content[i+1] continue } if !d.unmarshal(ni, name) { continue } sname := name.String() if mergedFields != nil { if mergedFields[sname] { continue } mergedFields[sname] = true } if info, ok := sinfo.FieldsMap[sname]; ok { if d.uniqueKeys { if doneFields[info.Id] { d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s already set in type %s", ni.Line, name.String(), out.Type())) continue } doneFields[info.Id] = true } var field reflect.Value if info.Inline == nil { field = out.Field(info.Num) } else { field = d.fieldByIndex(n, out, info.Inline) } d.unmarshal(n.Content[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.Content[i+1], value) inlineMap.SetMapIndex(name, value) } else if d.knownFields { d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s not found in type %s", ni.Line, name.String(), out.Type())) } } d.mergedFields = mergedFields if mergeNode != nil { d.merge(n, mergeNode, out) } return true } func failWantMap() { failf("map merge requires map or sequence of maps as the value") } func (d *decoder) merge(parent *Node, merge *Node, out reflect.Value) { mergedFields := d.mergedFields if mergedFields == nil { d.mergedFields = make(map[interface{}]bool) for i := 0; i < len(parent.Content); i += 2 { k := reflect.New(ifaceType).Elem() if d.unmarshal(parent.Content[i], k) { d.mergedFields[k.Interface()] = true } } } switch merge.Kind { case MappingNode: d.unmarshal(merge, out) case AliasNode: if merge.Alias != nil && merge.Alias.Kind != MappingNode { failWantMap() } d.unmarshal(merge, out) case SequenceNode: for i := 0; i < len(merge.Content); i++ { ni := merge.Content[i] if ni.Kind == AliasNode { if ni.Alias != nil && ni.Alias.Kind != MappingNode { failWantMap() } } else if ni.Kind != MappingNode { failWantMap() } d.unmarshal(ni, out) } default: failWantMap() } d.mergedFields = mergedFields } func isMerge(n *Node) bool { return n.Kind == ScalarNode && n.Value == "<<" && (n.Tag == "" || n.Tag == "!" || shortTag(n.Tag) == mergeTag) } ================================================ FILE: vendor/gopkg.in/yaml.v3/emitterc.go ================================================ // // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 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. package yaml import ( "bytes" "fmt" ) // 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") } if emitter.column == 0 { emitter.space_above = true } emitter.column = 0 emitter.line++ // [Go] Do this here and below and drop from everywhere else (see commented lines). emitter.indention = true 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 } if emitter.column == 0 { emitter.space_above = true } emitter.column = 0 emitter.line++ // [Go] Do this here and above and drop from everywhere else (see commented lines). emitter.indention = true } 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 { // [Go] This was changed so that indentations are more regular. if emitter.states[len(emitter.states)-1] == yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE { // The first indent inside a sequence will just skip the "- " indicator. emitter.indent += 2 } else { // Everything else aligns to the chosen indentation. emitter.indent = emitter.best_indent*((emitter.indent+emitter.best_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, false) case yaml_EMIT_FLOW_SEQUENCE_TRAIL_ITEM_STATE: return yaml_emitter_emit_flow_sequence_item(emitter, event, false, true) case yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE: return yaml_emitter_emit_flow_sequence_item(emitter, event, false, false) case yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE: return yaml_emitter_emit_flow_mapping_key(emitter, event, true, false) case yaml_EMIT_FLOW_MAPPING_TRAIL_KEY_STATE: return yaml_emitter_emit_flow_mapping_key(emitter, event, false, true) case yaml_EMIT_FLOW_MAPPING_KEY_STATE: return yaml_emitter_emit_flow_mapping_key(emitter, event, false, 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 emitter.space_above = true emitter.foot_indent = -1 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 || true { if !yaml_emitter_write_indent(emitter) { return false } } } if len(emitter.head_comment) > 0 { if !yaml_emitter_process_head_comment(emitter) { return false } if !put_break(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) if !yaml_emitter_process_head_comment(emitter) { return false } if !yaml_emitter_emit_node(emitter, event, true, false, false, false) { return false } if !yaml_emitter_process_line_comment(emitter) { return false } if !yaml_emitter_process_foot_comment(emitter) { return false } return true } // 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") } // [Go] Force document foot separation. emitter.foot_indent = 0 if !yaml_emitter_process_foot_comment(emitter) { return false } emitter.foot_indent = -1 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, trail 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 { if emitter.canonical && !first && !trail { if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { return false } } emitter.flow_level-- emitter.indent = emitter.indents[len(emitter.indents)-1] emitter.indents = emitter.indents[:len(emitter.indents)-1] if emitter.column == 0 || emitter.canonical && !first { if !yaml_emitter_write_indent(emitter) { return false } } if !yaml_emitter_write_indicator(emitter, []byte{']'}, false, false, false) { return false } if !yaml_emitter_process_line_comment(emitter) { return false } if !yaml_emitter_process_foot_comment(emitter) { return false } emitter.state = emitter.states[len(emitter.states)-1] emitter.states = emitter.states[:len(emitter.states)-1] return true } if !first && !trail { if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { return false } } if !yaml_emitter_process_head_comment(emitter) { return false } if emitter.column == 0 { if !yaml_emitter_write_indent(emitter) { return false } } if emitter.canonical || emitter.column > emitter.best_width { if !yaml_emitter_write_indent(emitter) { return false } } if len(emitter.line_comment)+len(emitter.foot_comment)+len(emitter.tail_comment) > 0 { emitter.states = append(emitter.states, yaml_EMIT_FLOW_SEQUENCE_TRAIL_ITEM_STATE) } else { emitter.states = append(emitter.states, yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE) } if !yaml_emitter_emit_node(emitter, event, false, true, false, false) { return false } if len(emitter.line_comment)+len(emitter.foot_comment)+len(emitter.tail_comment) > 0 { if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { return false } } if !yaml_emitter_process_line_comment(emitter) { return false } if !yaml_emitter_process_foot_comment(emitter) { return false } return true } // Expect a flow key node. func yaml_emitter_emit_flow_mapping_key(emitter *yaml_emitter_t, event *yaml_event_t, first, trail 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 { if (emitter.canonical || len(emitter.head_comment)+len(emitter.foot_comment)+len(emitter.tail_comment) > 0) && !first && !trail { if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { return false } } if !yaml_emitter_process_head_comment(emitter) { return false } 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_indent(emitter) { return false } } if !yaml_emitter_write_indicator(emitter, []byte{'}'}, false, false, false) { return false } if !yaml_emitter_process_line_comment(emitter) { return false } if !yaml_emitter_process_foot_comment(emitter) { return false } emitter.state = emitter.states[len(emitter.states)-1] emitter.states = emitter.states[:len(emitter.states)-1] return true } if !first && !trail { if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { return false } } if !yaml_emitter_process_head_comment(emitter) { return false } if emitter.column == 0 { if !yaml_emitter_write_indent(emitter) { 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 } } if len(emitter.line_comment)+len(emitter.foot_comment)+len(emitter.tail_comment) > 0 { emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_TRAIL_KEY_STATE) } else { emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_KEY_STATE) } if !yaml_emitter_emit_node(emitter, event, false, false, true, false) { return false } if len(emitter.line_comment)+len(emitter.foot_comment)+len(emitter.tail_comment) > 0 { if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { return false } } if !yaml_emitter_process_line_comment(emitter) { return false } if !yaml_emitter_process_foot_comment(emitter) { return false } return true } // 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, false) { 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_process_head_comment(emitter) { return false } 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) if !yaml_emitter_emit_node(emitter, event, false, true, false, false) { return false } if !yaml_emitter_process_line_comment(emitter) { return false } if !yaml_emitter_process_foot_comment(emitter) { return false } return true } // 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 !yaml_emitter_process_head_comment(emitter) { 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 len(emitter.line_comment) > 0 { // [Go] A line comment was provided for the key. That's unusual as the // scanner associates line comments with the value. Either way, // save the line comment and render it appropriately later. emitter.key_line_comment = emitter.line_comment emitter.line_comment = nil } 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 } } if len(emitter.key_line_comment) > 0 { // [Go] Line comments are generally associated with the value, but when there's // no value on the same line as a mapping key they end up attached to the // key itself. if event.typ == yaml_SCALAR_EVENT { if len(emitter.line_comment) == 0 { // A scalar is coming and it has no line comments by itself yet, // so just let it handle the line comment as usual. If it has a // line comment, we can't have both so the one from the key is lost. emitter.line_comment = emitter.key_line_comment emitter.key_line_comment = nil } } else if event.sequence_style() != yaml_FLOW_SEQUENCE_STYLE && (event.typ == yaml_MAPPING_START_EVENT || event.typ == yaml_SEQUENCE_START_EVENT) { // An indented block follows, so write the comment right now. emitter.line_comment, emitter.key_line_comment = emitter.key_line_comment, emitter.line_comment if !yaml_emitter_process_line_comment(emitter) { return false } emitter.line_comment, emitter.key_line_comment = emitter.key_line_comment, emitter.line_comment } } emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_KEY_STATE) if !yaml_emitter_emit_node(emitter, event, false, false, true, false) { return false } if !yaml_emitter_process_line_comment(emitter) { return false } if !yaml_emitter_process_foot_comment(emitter) { return false } return true } func yaml_emitter_silent_nil_event(emitter *yaml_emitter_t, event *yaml_event_t) bool { return event.typ == yaml_SCALAR_EVENT && event.implicit && !emitter.canonical && len(emitter.scalar_data.value) == 0 } // 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, fmt.Sprintf("expected SCALAR, SEQUENCE-START, MAPPING-START, or ALIAS, but got %v", event.typ)) } } // 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 anchor. 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") } // Write a head comment. func yaml_emitter_process_head_comment(emitter *yaml_emitter_t) bool { if len(emitter.tail_comment) > 0 { if !yaml_emitter_write_indent(emitter) { return false } if !yaml_emitter_write_comment(emitter, emitter.tail_comment) { return false } emitter.tail_comment = emitter.tail_comment[:0] emitter.foot_indent = emitter.indent if emitter.foot_indent < 0 { emitter.foot_indent = 0 } } if len(emitter.head_comment) == 0 { return true } if !yaml_emitter_write_indent(emitter) { return false } if !yaml_emitter_write_comment(emitter, emitter.head_comment) { return false } emitter.head_comment = emitter.head_comment[:0] return true } // Write an line comment. func yaml_emitter_process_line_comment(emitter *yaml_emitter_t) bool { if len(emitter.line_comment) == 0 { return true } if !emitter.whitespace { if !put(emitter, ' ') { return false } } if !yaml_emitter_write_comment(emitter, emitter.line_comment) { return false } emitter.line_comment = emitter.line_comment[:0] return true } // Write a foot comment. func yaml_emitter_process_foot_comment(emitter *yaml_emitter_t) bool { if len(emitter.foot_comment) == 0 { return true } if !yaml_emitter_write_indent(emitter) { return false } if !yaml_emitter_write_comment(emitter, emitter.foot_comment) { return false } emitter.foot_comment = emitter.foot_comment[:0] emitter.foot_indent = emitter.indent if emitter.foot_indent < 0 { emitter.foot_indent = 0 } return true } // 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 tab_characters = false leading_space = false leading_break = false trailing_space = false trailing_break = false break_space = false space_break = false preceded_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 } preceded_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 preceded_by_whitespace { flow_indicators = true block_indicators = true } } } if value[i] == '\t' { tab_characters = true } else 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. preceded_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 || tab_characters || special_characters { 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.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 if len(event.head_comment) > 0 { emitter.head_comment = event.head_comment } if len(event.line_comment) > 0 { emitter.line_comment = event.line_comment } if len(event.foot_comment) > 0 { emitter.foot_comment = event.foot_comment } if len(event.tail_comment) > 0 { emitter.tail_comment = event.tail_comment } 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 } } if emitter.foot_indent == indent { if !put_break(emitter) { return false } } for emitter.column < indent { if !put(emitter, ' ') { return false } } emitter.whitespace = true //emitter.indention = true emitter.space_above = false emitter.foot_indent = -1 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 len(value) > 0 && !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 } } if len(value) > 0 { 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 !yaml_emitter_process_line_comment(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 !yaml_emitter_process_line_comment(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 } func yaml_emitter_write_comment(emitter *yaml_emitter_t, comment []byte) bool { breaks := false pound := false for i := 0; i < len(comment); { if is_break(comment, i) { if !write_break(emitter, comment, &i) { return false } //emitter.indention = true breaks = true pound = false } else { if breaks && !yaml_emitter_write_indent(emitter) { return false } if !pound { if comment[i] != '#' && (!put(emitter, '#') || !put(emitter, ' ')) { return false } pound = true } if !write(emitter, comment, &i) { return false } emitter.indention = false breaks = false } } if !breaks && !put_break(emitter) { return false } emitter.whitespace = true //emitter.indention = true return true } ================================================ FILE: vendor/gopkg.in/yaml.v3/encode.go ================================================ // // Copyright (c) 2011-2019 Canonical Ltd // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package yaml import ( "encoding" "fmt" "io" "reflect" "regexp" "sort" "strconv" "strings" "time" "unicode/utf8" ) type encoder struct { emitter yaml_emitter_t event yaml_event_t out []byte flow bool indent int doneInit bool } func newEncoder() *encoder { e := &encoder{} yaml_emitter_initialize(&e.emitter) yaml_emitter_set_output_string(&e.emitter, &e.out) yaml_emitter_set_unicode(&e.emitter, true) return e } func newEncoderWithWriter(w io.Writer) *encoder { e := &encoder{} yaml_emitter_initialize(&e.emitter) yaml_emitter_set_output_writer(&e.emitter, w) yaml_emitter_set_unicode(&e.emitter, true) return e } func (e *encoder) init() { if e.doneInit { return } if e.indent == 0 { e.indent = 4 } e.emitter.best_indent = e.indent yaml_stream_start_event_initialize(&e.event, yaml_UTF8_ENCODING) e.emit() e.doneInit = true } func (e *encoder) finish() { e.emitter.open_ended = false 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. e.must(yaml_emitter_emit(&e.emitter, &e.event)) } 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) marshalDoc(tag string, in reflect.Value) { e.init() var node *Node if in.IsValid() { node, _ = in.Interface().(*Node) } if node != nil && node.Kind == DocumentNode { e.nodev(in) } else { yaml_document_start_event_initialize(&e.event, nil, nil, true) e.emit() e.marshal(tag, in) yaml_document_end_event_initialize(&e.event, true) e.emit() } } func (e *encoder) marshal(tag string, in reflect.Value) { tag = shortTag(tag) if !in.IsValid() || in.Kind() == reflect.Ptr && in.IsNil() { e.nilv() return } iface := in.Interface() switch value := iface.(type) { case *Node: e.nodev(in) return case Node: if !in.CanAddr() { var n = reflect.New(in.Type()).Elem() n.Set(in) in = n } e.nodev(in.Addr()) return case time.Time: e.timev(tag, in) return case *time.Time: e.timev(tag, in.Elem()) return case time.Duration: e.stringv(tag, reflect.ValueOf(value.String())) return case Marshaler: v, err := value.MarshalYAML() if err != nil { fail(err) } if v == nil { e.nilv() return } e.marshal(tag, reflect.ValueOf(v)) return case encoding.TextMarshaler: text, err := value.MarshalText() if err != nil { fail(err) } in = reflect.ValueOf(string(text)) case nil: e.nilv() return } switch in.Kind() { case reflect.Interface: e.marshal(tag, in.Elem()) case reflect.Map: e.mapv(tag, in) case reflect.Ptr: e.marshal(tag, in.Elem()) case reflect.Struct: e.structv(tag, in) case reflect.Slice, reflect.Array: e.slicev(tag, in) case reflect.String: e.stringv(tag, in) case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: 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) fieldByIndex(v reflect.Value, index []int) (field reflect.Value) { for _, num := range index { for { if v.Kind() == reflect.Ptr { if v.IsNil() { return reflect.Value{} } v = v.Elem() continue } break } v = v.Field(num) } return v } 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 = e.fieldByIndex(in, info.Inline) if !value.IsValid() { continue } } 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("cannot 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 } yaml_mapping_start_event_initialize(&e.event, nil, []byte(tag), implicit, style) e.emit() f() 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_]*)?$`) // isOldBool returns whether s is bool notation as defined in YAML 1.1. // // We continue to force strings that YAML 1.1 would interpret as booleans to be // rendered as quotes strings so that the marshalled output valid for YAML 1.1 // parsing. func isOldBool(s string) (result bool) { switch s { case "y", "Y", "yes", "Yes", "YES", "on", "On", "ON", "n", "N", "no", "No", "NO", "off", "Off", "OFF": return true default: return false } } func (e *encoder) stringv(tag string, in reflect.Value) { var style yaml_scalar_style_t s := in.String() canUsePlain := true switch { case !utf8.ValidString(s): if tag == binaryTag { failf("explicitly tagged !!binary data must be base64-encoded") } if tag != "" { failf("cannot marshal invalid UTF-8 data as %s", shortTag(tag)) } // It can't be encoded directly as YAML so use a binary tag // and encode it as base64. tag = binaryTag s = encodeBase64(s) case tag == "": // Check to see if it would resolve to a specific // tag when encoded unquoted. If it doesn't, // there's no need to quote it. rtag, _ := resolve("", s) canUsePlain = rtag == strTag && !(isBase60Float(s) || isOldBool(s)) } // Note: it's possible for user code to emit invalid YAML // if they explicitly specify a tag and a string containing // text that's incompatible with that tag. switch { case strings.Contains(s, "\n"): if e.flow { style = yaml_DOUBLE_QUOTED_SCALAR_STYLE } else { style = yaml_LITERAL_SCALAR_STYLE } case canUsePlain: style = yaml_PLAIN_SCALAR_STYLE default: style = yaml_DOUBLE_QUOTED_SCALAR_STYLE } e.emitScalar(s, "", tag, style, nil, nil, nil, nil) } 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, nil, nil, nil, nil) } func (e *encoder) intv(tag string, in reflect.Value) { s := strconv.FormatInt(in.Int(), 10) e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil) } func (e *encoder) uintv(tag string, in reflect.Value) { s := strconv.FormatUint(in.Uint(), 10) e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil) } func (e *encoder) timev(tag string, in reflect.Value) { t := in.Interface().(time.Time) s := t.Format(time.RFC3339Nano) e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil) } func (e *encoder) floatv(tag string, in reflect.Value) { // Issue #352: When formatting, use the precision of the underlying value precision := 64 if in.Kind() == reflect.Float32 { precision = 32 } s := strconv.FormatFloat(in.Float(), 'g', -1, precision) switch s { case "+Inf": s = ".inf" case "-Inf": s = "-.inf" case "NaN": s = ".nan" } e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil) } func (e *encoder) nilv() { e.emitScalar("null", "", "", yaml_PLAIN_SCALAR_STYLE, nil, nil, nil, nil) } func (e *encoder) emitScalar(value, anchor, tag string, style yaml_scalar_style_t, head, line, foot, tail []byte) { // TODO Kill this function. Replace all initialize calls by their underlining Go literals. implicit := tag == "" if !implicit { tag = longTag(tag) } e.must(yaml_scalar_event_initialize(&e.event, []byte(anchor), []byte(tag), []byte(value), implicit, implicit, style)) e.event.head_comment = head e.event.line_comment = line e.event.foot_comment = foot e.event.tail_comment = tail e.emit() } func (e *encoder) nodev(in reflect.Value) { e.node(in.Interface().(*Node), "") } func (e *encoder) node(node *Node, tail string) { // Zero nodes behave as nil. if node.Kind == 0 && node.IsZero() { e.nilv() return } // If the tag was not explicitly requested, and dropping it won't change the // implicit tag of the value, don't include it in the presentation. var tag = node.Tag var stag = shortTag(tag) var forceQuoting bool if tag != "" && node.Style&TaggedStyle == 0 { if node.Kind == ScalarNode { if stag == strTag && node.Style&(SingleQuotedStyle|DoubleQuotedStyle|LiteralStyle|FoldedStyle) != 0 { tag = "" } else { rtag, _ := resolve("", node.Value) if rtag == stag { tag = "" } else if stag == strTag { tag = "" forceQuoting = true } } } else { var rtag string switch node.Kind { case MappingNode: rtag = mapTag case SequenceNode: rtag = seqTag } if rtag == stag { tag = "" } } } switch node.Kind { case DocumentNode: yaml_document_start_event_initialize(&e.event, nil, nil, true) e.event.head_comment = []byte(node.HeadComment) e.emit() for _, node := range node.Content { e.node(node, "") } yaml_document_end_event_initialize(&e.event, true) e.event.foot_comment = []byte(node.FootComment) e.emit() case SequenceNode: style := yaml_BLOCK_SEQUENCE_STYLE if node.Style&FlowStyle != 0 { style = yaml_FLOW_SEQUENCE_STYLE } e.must(yaml_sequence_start_event_initialize(&e.event, []byte(node.Anchor), []byte(longTag(tag)), tag == "", style)) e.event.head_comment = []byte(node.HeadComment) e.emit() for _, node := range node.Content { e.node(node, "") } e.must(yaml_sequence_end_event_initialize(&e.event)) e.event.line_comment = []byte(node.LineComment) e.event.foot_comment = []byte(node.FootComment) e.emit() case MappingNode: style := yaml_BLOCK_MAPPING_STYLE if node.Style&FlowStyle != 0 { style = yaml_FLOW_MAPPING_STYLE } yaml_mapping_start_event_initialize(&e.event, []byte(node.Anchor), []byte(longTag(tag)), tag == "", style) e.event.tail_comment = []byte(tail) e.event.head_comment = []byte(node.HeadComment) e.emit() // The tail logic below moves the foot comment of prior keys to the following key, // since the value for each key may be a nested structure and the foot needs to be // processed only the entirety of the value is streamed. The last tail is processed // with the mapping end event. var tail string for i := 0; i+1 < len(node.Content); i += 2 { k := node.Content[i] foot := k.FootComment if foot != "" { kopy := *k kopy.FootComment = "" k = &kopy } e.node(k, tail) tail = foot v := node.Content[i+1] e.node(v, "") } yaml_mapping_end_event_initialize(&e.event) e.event.tail_comment = []byte(tail) e.event.line_comment = []byte(node.LineComment) e.event.foot_comment = []byte(node.FootComment) e.emit() case AliasNode: yaml_alias_event_initialize(&e.event, []byte(node.Value)) e.event.head_comment = []byte(node.HeadComment) e.event.line_comment = []byte(node.LineComment) e.event.foot_comment = []byte(node.FootComment) e.emit() case ScalarNode: value := node.Value if !utf8.ValidString(value) { if stag == binaryTag { failf("explicitly tagged !!binary data must be base64-encoded") } if stag != "" { failf("cannot marshal invalid UTF-8 data as %s", stag) } // It can't be encoded directly as YAML so use a binary tag // and encode it as base64. tag = binaryTag value = encodeBase64(value) } style := yaml_PLAIN_SCALAR_STYLE switch { case node.Style&DoubleQuotedStyle != 0: style = yaml_DOUBLE_QUOTED_SCALAR_STYLE case node.Style&SingleQuotedStyle != 0: style = yaml_SINGLE_QUOTED_SCALAR_STYLE case node.Style&LiteralStyle != 0: style = yaml_LITERAL_SCALAR_STYLE case node.Style&FoldedStyle != 0: style = yaml_FOLDED_SCALAR_STYLE case strings.Contains(value, "\n"): style = yaml_LITERAL_SCALAR_STYLE case forceQuoting: style = yaml_DOUBLE_QUOTED_SCALAR_STYLE } e.emitScalar(value, node.Anchor, tag, style, []byte(node.HeadComment), []byte(node.LineComment), []byte(node.FootComment), []byte(tail)) default: failf("cannot encode node with unknown kind %d", node.Kind) } } ================================================ FILE: vendor/gopkg.in/yaml.v3/parserc.go ================================================ // // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 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. 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) { token := &parser.tokens[parser.tokens_head] yaml_parser_unfold_comments(parser, token) return token } return nil } // yaml_parser_unfold_comments walks through the comments queue and joins all // comments behind the position of the provided token into the respective // top-level comment slices in the parser. func yaml_parser_unfold_comments(parser *yaml_parser_t, token *yaml_token_t) { for parser.comments_head < len(parser.comments) && token.start_mark.index >= parser.comments[parser.comments_head].token_mark.index { comment := &parser.comments[parser.comments_head] if len(comment.head) > 0 { if token.typ == yaml_BLOCK_END_TOKEN { // No heads on ends, so keep comment.head for a follow up token. break } if len(parser.head_comment) > 0 { parser.head_comment = append(parser.head_comment, '\n') } parser.head_comment = append(parser.head_comment, comment.head...) } if len(comment.foot) > 0 { if len(parser.foot_comment) > 0 { parser.foot_comment = append(parser.foot_comment, '\n') } parser.foot_comment = append(parser.foot_comment, comment.foot...) } if len(comment.line) > 0 { if len(parser.line_comment) > 0 { parser.line_comment = append(parser.line_comment, '\n') } parser.line_comment = append(parser.line_comment, comment.line...) } *comment = yaml_comment_t{} parser.comments_head++ } } // 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") } } // 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 var head_comment []byte if len(parser.head_comment) > 0 { // [Go] Scan the header comment backwards, and if an empty line is found, break // the header so the part before the last empty line goes into the // document header, while the bottom of it goes into a follow up event. for i := len(parser.head_comment) - 1; i > 0; i-- { if parser.head_comment[i] == '\n' { if i == len(parser.head_comment)-1 { head_comment = parser.head_comment[:i] parser.head_comment = parser.head_comment[i+1:] break } else if parser.head_comment[i-1] == '\n' { head_comment = parser.head_comment[:i-1] parser.head_comment = parser.head_comment[i+1:] break } } } } *event = yaml_event_t{ typ: yaml_DOCUMENT_START_EVENT, start_mark: token.start_mark, end_mark: token.end_mark, head_comment: head_comment, } } 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, } yaml_parser_set_event_comments(parser, event) if len(event.head_comment) > 0 && len(event.foot_comment) == 0 { event.foot_comment = event.head_comment event.head_comment = nil } return true } func yaml_parser_set_event_comments(parser *yaml_parser_t, event *yaml_event_t) { event.head_comment = parser.head_comment event.line_comment = parser.line_comment event.foot_comment = parser.foot_comment parser.head_comment = nil parser.line_comment = nil parser.foot_comment = nil parser.tail_comment = nil parser.stem_comment = nil } // 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, } yaml_parser_set_event_comments(parser, event) 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), } yaml_parser_set_event_comments(parser, event) 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), } yaml_parser_set_event_comments(parser, event) 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), } yaml_parser_set_event_comments(parser, event) 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), } if parser.stem_comment != nil { event.head_comment = parser.stem_comment parser.stem_comment = nil } 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), } if parser.stem_comment != nil { event.head_comment = parser.stem_comment parser.stem_comment = nil } 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) if token == nil { return false } 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 prior_head_len := len(parser.head_comment) skip_token(parser) yaml_parser_split_stem_comment(parser, prior_head_len) 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 prior_head_len := len(parser.head_comment) skip_token(parser) yaml_parser_split_stem_comment(parser, prior_head_len) 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 } // Split stem comment from head comment. // // When a sequence or map is found under a sequence entry, the former head comment // is assigned to the underlying sequence or map as a whole, not the individual // sequence or map entry as would be expected otherwise. To handle this case the // previous head comment is moved aside as the stem comment. func yaml_parser_split_stem_comment(parser *yaml_parser_t, stem_len int) { if stem_len == 0 { return } token := peek_token(parser) if token == nil || token.typ != yaml_BLOCK_SEQUENCE_START_TOKEN && token.typ != yaml_BLOCK_MAPPING_START_TOKEN { return } parser.stem_comment = parser.head_comment[:stem_len] if len(parser.head_comment) == stem_len { parser.head_comment = nil } else { // Copy suffix to prevent very strange bugs if someone ever appends // further bytes to the prefix in the stem_comment slice above. parser.head_comment = append([]byte(nil), parser.head_comment[stem_len+1:]...) } } // 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) if token == nil { return false } parser.marks = append(parser.marks, token.start_mark) skip_token(parser) } token := peek_token(parser) if token == nil { return false } // [Go] A tail comment was left from the prior mapping value processed. Emit an event // as it needs to be processed with that value and not the following key. if len(parser.tail_comment) > 0 { *event = yaml_event_t{ typ: yaml_TAIL_COMMENT_EVENT, start_mark: token.start_mark, end_mark: token.end_mark, foot_comment: parser.tail_comment, } parser.tail_comment = nil return true } 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, } yaml_parser_set_event_comments(parser, event) 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) if token == nil { return false } 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, } yaml_parser_set_event_comments(parser, event) 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, } yaml_parser_set_event_comments(parser, event) 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 } ================================================ FILE: vendor/gopkg.in/yaml.v3/readerc.go ================================================ // // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 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. 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") } // [Go] This function was changed to guarantee the requested length size at EOF. // The fact we need to do this is pretty awful, but the description above implies // for that to be the case, and there are tests // 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) { // [Go] ACTUALLY! Read the documentation of this function above. // This is just broken. To return true, we need to have the // given length in the buffer. Not doing that means every single // check that calls this function to make sure the buffer has a // given length is Go) panicking; or C) accessing invalid memory. //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 { low, high = 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) buffer_len += 1 } 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)) buffer_len += 2 } 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)) buffer_len += 3 } 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 += 4 } parser.unread++ } // On EOF, put NUL into the buffer and return. if parser.eof { parser.buffer[buffer_len] = 0 buffer_len++ parser.unread++ break } } // [Go] Read the documentation of this function above. To return true, // we need to have the given length in the buffer. Not doing that means // every single check that calls this function to make sure the buffer // has a given length is Go) panicking; or C) accessing invalid memory. // This happens here due to the EOF above breaking early. for buffer_len < length { parser.buffer[buffer_len] = 0 buffer_len++ } parser.buffer = parser.buffer[:buffer_len] return true } ================================================ FILE: vendor/gopkg.in/yaml.v3/resolve.go ================================================ // // Copyright (c) 2011-2019 Canonical Ltd // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package yaml import ( "encoding/base64" "math" "regexp" "strconv" "strings" "time" ) 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, boolTag, []string{"true", "True", "TRUE"}}, {false, boolTag, []string{"false", "False", "FALSE"}}, {nil, nullTag, []string{"", "~", "null", "Null", "NULL"}}, {math.NaN(), floatTag, []string{".nan", ".NaN", ".NAN"}}, {math.Inf(+1), floatTag, []string{".inf", ".Inf", ".INF"}}, {math.Inf(+1), floatTag, []string{"+.inf", "+.Inf", "+.INF"}}, {math.Inf(-1), floatTag, []string{"-.inf", "-.Inf", "-.INF"}}, {"<<", mergeTag, []string{"<<"}}, } m := resolveMap for _, item := range resolveMapList { for _, s := range item.l { m[s] = resolveMapItem{item.v, item.tag} } } } const ( nullTag = "!!null" boolTag = "!!bool" strTag = "!!str" intTag = "!!int" floatTag = "!!float" timestampTag = "!!timestamp" seqTag = "!!seq" mapTag = "!!map" binaryTag = "!!binary" mergeTag = "!!merge" ) var longTags = make(map[string]string) var shortTags = make(map[string]string) func init() { for _, stag := range []string{nullTag, boolTag, strTag, intTag, floatTag, timestampTag, seqTag, mapTag, binaryTag, mergeTag} { ltag := longTag(stag) longTags[stag] = ltag shortTags[ltag] = stag } } const longTagPrefix = "tag:yaml.org,2002:" func shortTag(tag string) string { if strings.HasPrefix(tag, longTagPrefix) { if stag, ok := shortTags[tag]; ok { return stag } return "!!" + tag[len(longTagPrefix):] } return tag } func longTag(tag string) string { if strings.HasPrefix(tag, "!!") { if ltag, ok := longTags[tag]; ok { return ltag } return longTagPrefix + tag[2:] } return tag } func resolvableTag(tag string) bool { switch tag { case "", strTag, boolTag, intTag, floatTag, nullTag, timestampTag: return true } return false } var yamlStyleFloat = regexp.MustCompile(`^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$`) func resolve(tag string, in string) (rtag string, out interface{}) { tag = shortTag(tag) if !resolvableTag(tag) { return tag, in } defer func() { switch tag { case "", rtag, strTag, binaryTag: return case floatTag: if rtag == intTag { switch v := out.(type) { case int64: rtag = floatTag out = float64(v) return case int: rtag = floatTag out = float64(v) 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 != strTag && tag != binaryTag { // 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 floatTag, floatv } case 'D', 'S': // Int, float, or timestamp. // Only try values as a timestamp if the value is unquoted or there's an explicit // !!timestamp tag. if tag == "" || tag == timestampTag { t, ok := parseTimestamp(in) if ok { return timestampTag, t } } plain := strings.Replace(in, "_", "", -1) intv, err := strconv.ParseInt(plain, 0, 64) if err == nil { if intv == int64(int(intv)) { return intTag, int(intv) } else { return intTag, intv } } uintv, err := strconv.ParseUint(plain, 0, 64) if err == nil { return intTag, uintv } if yamlStyleFloat.MatchString(plain) { floatv, err := strconv.ParseFloat(plain, 64) if err == nil { return floatTag, floatv } } if strings.HasPrefix(plain, "0b") { intv, err := strconv.ParseInt(plain[2:], 2, 64) if err == nil { if intv == int64(int(intv)) { return intTag, int(intv) } else { return intTag, intv } } uintv, err := strconv.ParseUint(plain[2:], 2, 64) if err == nil { return intTag, uintv } } else if strings.HasPrefix(plain, "-0b") { intv, err := strconv.ParseInt("-"+plain[3:], 2, 64) if err == nil { if true || intv == int64(int(intv)) { return intTag, int(intv) } else { return intTag, intv } } } // Octals as introduced in version 1.2 of the spec. // Octals from the 1.1 spec, spelled as 0777, are still // decoded by default in v3 as well for compatibility. // May be dropped in v4 depending on how usage evolves. if strings.HasPrefix(plain, "0o") { intv, err := strconv.ParseInt(plain[2:], 8, 64) if err == nil { if intv == int64(int(intv)) { return intTag, int(intv) } else { return intTag, intv } } uintv, err := strconv.ParseUint(plain[2:], 8, 64) if err == nil { return intTag, uintv } } else if strings.HasPrefix(plain, "-0o") { intv, err := strconv.ParseInt("-"+plain[3:], 8, 64) if err == nil { if true || intv == int64(int(intv)) { return intTag, int(intv) } else { return intTag, intv } } } default: panic("internal error: missing handler for resolver table: " + string(rune(hint)) + " (with " + in + ")") } } return strTag, 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]) } // This is a subset of the formats allowed by the regular expression // defined at http://yaml.org/type/timestamp.html. var allowedTimestampFormats = []string{ "2006-1-2T15:4:5.999999999Z07:00", // RCF3339Nano with short date fields. "2006-1-2t15:4:5.999999999Z07:00", // RFC3339Nano with short date fields and lower-case "t". "2006-1-2 15:4:5.999999999", // space separated with no time zone "2006-1-2", // date only // Notable exception: time.Parse cannot handle: "2001-12-14 21:59:43.10 -5" // from the set of examples. } // parseTimestamp parses s as a timestamp string and // returns the timestamp and reports whether it succeeded. // Timestamp formats are defined at http://yaml.org/type/timestamp.html func parseTimestamp(s string) (time.Time, bool) { // TODO write code to check all the formats supported by // http://yaml.org/type/timestamp.html instead of using time.Parse. // Quick check: all date formats start with YYYY-. i := 0 for ; i < len(s); i++ { if c := s[i]; c < '0' || c > '9' { break } } if i != 4 || i == len(s) || s[i] != '-' { return time.Time{}, false } for _, format := range allowedTimestampFormats { if t, err := time.Parse(format, s); err == nil { return t, true } } return time.Time{}, false } ================================================ FILE: vendor/gopkg.in/yaml.v3/scannerc.go ================================================ // // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 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. package yaml import ( "bytes" "fmt" ) // Introduction // ************ // // The following notes assume that you are familiar with the YAML specification // (http://yaml.org/spec/1.2/spec.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) { if !is_blank(parser.buffer, parser.buffer_pos) { parser.newlines = 0 } 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 parser.newlines++ } 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]) parser.newlines++ } } // Copy a character to a string buffer and advance pointers. func read(parser *yaml_parser_t, s []byte) []byte { if !is_blank(parser.buffer, parser.buffer_pos) { parser.newlines = 0 } 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-- parser.newlines++ 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, problem) } 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 { // [Go] The comment parsing logic requires a lookahead of two tokens // so that foot comments may be parsed in time of associating them // with the tokens that are parsed before them, and also for line // comments to be transformed into head comments in some edge cases. if parser.tokens_head < len(parser.tokens)-2 { // If a potential simple key is at the head position, we need to fetch // the next token to disambiguate it. head_tok_idx, ok := parser.simple_keys_by_tok[parser.tokens_parsed] if !ok { break } else if valid, ok := yaml_simple_key_is_valid(parser, &parser.simple_keys[head_tok_idx]); !ok { return false } else if !valid { 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) (ok 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) } scan_mark := parser.mark // Eat whitespaces and comments until we reach the next token. if !yaml_parser_scan_to_next_token(parser) { return false } // [Go] While unrolling indents, transform the head comments of prior // indentation levels observed after scan_start into foot comments at // the respective indexes. // Check the indentation level against the current column. if !yaml_parser_unroll_indent(parser, parser.mark.column, scan_mark) { 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) } comment_mark := parser.mark if len(parser.tokens) > 0 && (parser.flow_level == 0 && buf[pos] == ':' || parser.flow_level > 0 && buf[pos] == ',') { // Associate any following comments with the prior token. comment_mark = parser.tokens[len(parser.tokens)-1].start_mark } defer func() { if !ok { return } if len(parser.tokens) > 0 && parser.tokens[len(parser.tokens)-1].typ == yaml_BLOCK_ENTRY_TOKEN { // Sequence indicators alone have no line comments. It becomes // a head comment for whatever follows. return } if !yaml_parser_scan_line_comment(parser, comment_mark) { ok = false return } }() // 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] TODO 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") } func yaml_simple_key_is_valid(parser *yaml_parser_t, simple_key *yaml_simple_key_t) (valid, ok bool) { if !simple_key.possible { return false, true } // The 1.2 specification says: // // "If the ? indicator is omitted, parsing needs to see past the // implicit key to recognize it as such. To limit the amount of // lookahead required, the “:” indicator must appear at most 1024 // Unicode characters beyond the start of the key. In addition, the key // is restricted to a single line." // if 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 false, yaml_parser_set_scanner_error(parser, "while scanning a simple key", simple_key.mark, "could not find expected ':'") } simple_key.possible = false return false, true } return true, 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 // // 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), mark: parser.mark, } if !yaml_parser_remove_simple_key(parser) { return false } parser.simple_keys[len(parser.simple_keys)-1] = simple_key parser.simple_keys_by_tok[simple_key.token_number] = len(parser.simple_keys) - 1 } 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 delete(parser.simple_keys_by_tok, parser.simple_keys[i].token_number) } return true } // max_flow_level limits the flow_level const max_flow_level = 10000 // 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{ possible: false, required: false, token_number: parser.tokens_parsed + (len(parser.tokens) - parser.tokens_head), mark: parser.mark, }) // Increase the flow level. parser.flow_level++ if parser.flow_level > max_flow_level { return yaml_parser_set_scanner_error(parser, "while increasing flow level", parser.simple_keys[len(parser.simple_keys)-1].mark, fmt.Sprintf("exceeded max depth of %d", max_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-- last := len(parser.simple_keys) - 1 delete(parser.simple_keys_by_tok, parser.simple_keys[last].token_number) parser.simple_keys = parser.simple_keys[:last] } return true } // max_indents limits the indents stack size const max_indents = 10000 // 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 if len(parser.indents) > max_indents { return yaml_parser_set_scanner_error(parser, "while increasing indent level", parser.simple_keys[len(parser.simple_keys)-1].mark, fmt.Sprintf("exceeded max depth of %d", max_indents)) } // 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 indentation level, append // the BLOCK-END token. func yaml_parser_unroll_indent(parser *yaml_parser_t, column int, scan_mark yaml_mark_t) bool { // In the flow context, do nothing. if parser.flow_level > 0 { return true } block_mark := scan_mark block_mark.index-- // Loop through the indentation levels in the stack. for parser.indent > column { // [Go] Reposition the end token before potential following // foot comments of parent blocks. For that, search // backwards for recent comments that were at the same // indent as the block that is ending now. stop_index := block_mark.index for i := len(parser.comments) - 1; i >= 0; i-- { comment := &parser.comments[i] if comment.end_mark.index < stop_index { // Don't go back beyond the start of the comment/whitespace scan, unless column < 0. // If requested indent column is < 0, then the document is over and everything else // is a foot anyway. break } if comment.start_mark.column == parser.indent+1 { // This is a good match. But maybe there's a former comment // at that same indent level, so keep searching. block_mark = comment.start_mark } // While the end of the former comment matches with // the start of the following one, we know there's // nothing in between and scanning is still safe. stop_index = comment.scan_mark.index } // Create a token and append it to the queue. token := yaml_token_t{ typ: yaml_BLOCK_END_TOKEN, start_mark: block_mark, end_mark: block_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{}) parser.simple_keys_by_tok = make(map[int]int) // 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, parser.mark) { 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, parser.mark) { 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, parser.mark) { 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 valid, ok := yaml_simple_key_is_valid(parser, simple_key); !ok { return false } else if valid { // 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 delete(parser.simple_keys_by_tok, simple_key.token_number) // 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 { scan_mark := parser.mark // 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 } } // Check if we just had a line comment under a sequence entry that // looks more like a header to the following content. Similar to this: // // - # The comment // - Some data // // If so, transform the line comment to a head comment and reposition. if len(parser.comments) > 0 && len(parser.tokens) > 1 { tokenA := parser.tokens[len(parser.tokens)-2] tokenB := parser.tokens[len(parser.tokens)-1] comment := &parser.comments[len(parser.comments)-1] if tokenA.typ == yaml_BLOCK_SEQUENCE_START_TOKEN && tokenB.typ == yaml_BLOCK_ENTRY_TOKEN && len(comment.line) > 0 && !is_break(parser.buffer, parser.buffer_pos) { // If it was in the prior line, reposition so it becomes a // header of the follow up token. Otherwise, keep it in place // so it becomes a header of the former. comment.head = comment.line comment.line = nil if comment.start_mark.line == parser.mark.line-1 { comment.token_mark = parser.mark } } } // Eat a comment until a line break. if parser.buffer[parser.buffer_pos] == '#' { if !yaml_parser_scan_comments(parser, scan_mark) { 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 unknown 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] == '#' { // [Go] Discard this inline comment for the time being. //if !yaml_parser_scan_line_comment(parser, start_mark) { // return false //} 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 && string(s) != "!" { 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 hasTag := len(head) > 0 // 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] TODO 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 } hasTag = true } if !hasTag { 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 indentation 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 indentation indicator equal to 0") return false } // Get the indentation 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 indentation 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] == '#' { if !yaml_parser_scan_line_comment(parser, start_mark) { return false } 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 indentation 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 indentation 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 indentation spaces and line breaks for a block scalar. Determine the // indentation 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 indentation spaces and line breaks. max_indent := 0 for { // Eat the indentation 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 indentation. 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 indentation 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 } } if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { 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. 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 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] == '}')) { 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 characters that abuse indentation. 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 violates indentation") 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 indentation 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 } func yaml_parser_scan_line_comment(parser *yaml_parser_t, token_mark yaml_mark_t) bool { if parser.newlines > 0 { return true } var start_mark yaml_mark_t var text []byte for peek := 0; peek < 512; peek++ { if parser.unread < peek+1 && !yaml_parser_update_buffer(parser, peek+1) { break } if is_blank(parser.buffer, parser.buffer_pos+peek) { continue } if parser.buffer[parser.buffer_pos+peek] == '#' { seen := parser.mark.index+peek for { if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { return false } if is_breakz(parser.buffer, parser.buffer_pos) { if parser.mark.index >= seen { break } if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { return false } skip_line(parser) } else if parser.mark.index >= seen { if len(text) == 0 { start_mark = parser.mark } text = read(parser, text) } else { skip(parser) } } } break } if len(text) > 0 { parser.comments = append(parser.comments, yaml_comment_t{ token_mark: token_mark, start_mark: start_mark, line: text, }) } return true } func yaml_parser_scan_comments(parser *yaml_parser_t, scan_mark yaml_mark_t) bool { token := parser.tokens[len(parser.tokens)-1] if token.typ == yaml_FLOW_ENTRY_TOKEN && len(parser.tokens) > 1 { token = parser.tokens[len(parser.tokens)-2] } var token_mark = token.start_mark var start_mark yaml_mark_t var next_indent = parser.indent if next_indent < 0 { next_indent = 0 } var recent_empty = false var first_empty = parser.newlines <= 1 var line = parser.mark.line var column = parser.mark.column var text []byte // The foot line is the place where a comment must start to // still be considered as a foot of the prior content. // If there's some content in the currently parsed line, then // the foot is the line below it. var foot_line = -1 if scan_mark.line > 0 { foot_line = parser.mark.line-parser.newlines+1 if parser.newlines == 0 && parser.mark.column > 1 { foot_line++ } } var peek = 0 for ; peek < 512; peek++ { if parser.unread < peek+1 && !yaml_parser_update_buffer(parser, peek+1) { break } column++ if is_blank(parser.buffer, parser.buffer_pos+peek) { continue } c := parser.buffer[parser.buffer_pos+peek] var close_flow = parser.flow_level > 0 && (c == ']' || c == '}') if close_flow || is_breakz(parser.buffer, parser.buffer_pos+peek) { // Got line break or terminator. if close_flow || !recent_empty { if close_flow || first_empty && (start_mark.line == foot_line && token.typ != yaml_VALUE_TOKEN || start_mark.column-1 < next_indent) { // This is the first empty line and there were no empty lines before, // so this initial part of the comment is a foot of the prior token // instead of being a head for the following one. Split it up. // Alternatively, this might also be the last comment inside a flow // scope, so it must be a footer. if len(text) > 0 { if start_mark.column-1 < next_indent { // If dedented it's unrelated to the prior token. token_mark = start_mark } parser.comments = append(parser.comments, yaml_comment_t{ scan_mark: scan_mark, token_mark: token_mark, start_mark: start_mark, end_mark: yaml_mark_t{parser.mark.index + peek, line, column}, foot: text, }) scan_mark = yaml_mark_t{parser.mark.index + peek, line, column} token_mark = scan_mark text = nil } } else { if len(text) > 0 && parser.buffer[parser.buffer_pos+peek] != 0 { text = append(text, '\n') } } } if !is_break(parser.buffer, parser.buffer_pos+peek) { break } first_empty = false recent_empty = true column = 0 line++ continue } if len(text) > 0 && (close_flow || column-1 < next_indent && column != start_mark.column) { // The comment at the different indentation is a foot of the // preceding data rather than a head of the upcoming one. parser.comments = append(parser.comments, yaml_comment_t{ scan_mark: scan_mark, token_mark: token_mark, start_mark: start_mark, end_mark: yaml_mark_t{parser.mark.index + peek, line, column}, foot: text, }) scan_mark = yaml_mark_t{parser.mark.index + peek, line, column} token_mark = scan_mark text = nil } if parser.buffer[parser.buffer_pos+peek] != '#' { break } if len(text) == 0 { start_mark = yaml_mark_t{parser.mark.index + peek, line, column} } else { text = append(text, '\n') } recent_empty = false // Consume until after the consumed comment line. seen := parser.mark.index+peek for { if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { return false } if is_breakz(parser.buffer, parser.buffer_pos) { if parser.mark.index >= seen { break } if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { return false } skip_line(parser) } else if parser.mark.index >= seen { text = read(parser, text) } else { skip(parser) } } peek = 0 column = 0 line = parser.mark.line next_indent = parser.indent if next_indent < 0 { next_indent = 0 } } if len(text) > 0 { parser.comments = append(parser.comments, yaml_comment_t{ scan_mark: scan_mark, token_mark: start_mark, start_mark: start_mark, end_mark: yaml_mark_t{parser.mark.index + peek - 1, line, column}, head: text, }) } return true } ================================================ FILE: vendor/gopkg.in/yaml.v3/sorter.go ================================================ // // Copyright (c) 2011-2019 Canonical Ltd // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. 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()) digits := false for i := 0; i < len(ar) && i < len(br); i++ { if ar[i] == br[i] { digits = unicode.IsDigit(ar[i]) continue } al := unicode.IsLetter(ar[i]) bl := unicode.IsLetter(br[i]) if al && bl { return ar[i] < br[i] } if al || bl { if digits { return al } else { return bl } } var ai, bi int var an, bn int64 if ar[i] == '0' || br[i] == '0' { for j := i - 1; j >= 0 && unicode.IsDigit(ar[j]); j-- { if ar[j] != '0' { an = 1 bn = 1 break } } } 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") } ================================================ FILE: vendor/gopkg.in/yaml.v3/writerc.go ================================================ // // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 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. 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 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 } ================================================ FILE: vendor/gopkg.in/yaml.v3/yaml.go ================================================ // // Copyright (c) 2011-2019 Canonical Ltd // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // 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" "io" "reflect" "strings" "sync" "unicode/utf8" ) // The Unmarshaler interface may be implemented by types to customize their // behavior when being unmarshaled from a YAML document. type Unmarshaler interface { UnmarshalYAML(value *Node) error } type obsoleteUnmarshaler 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) { return unmarshal(in, out, false) } // A Decoder reads and decodes YAML values from an input stream. type Decoder struct { parser *parser knownFields bool } // NewDecoder returns a new decoder that reads from r. // // The decoder introduces its own buffering and may read // data from r beyond the YAML values requested. func NewDecoder(r io.Reader) *Decoder { return &Decoder{ parser: newParserFromReader(r), } } // KnownFields ensures that the keys in decoded mappings to // exist as fields in the struct being decoded into. func (dec *Decoder) KnownFields(enable bool) { dec.knownFields = enable } // Decode reads the next YAML-encoded value from its input // and stores it in the value pointed to by v. // // See the documentation for Unmarshal for details about the // conversion of YAML into a Go value. func (dec *Decoder) Decode(v interface{}) (err error) { d := newDecoder() d.knownFields = dec.knownFields defer handleErr(&err) node := dec.parser.parse() if node == nil { return io.EOF } out := reflect.ValueOf(v) if out.Kind() == reflect.Ptr && !out.IsNil() { out = out.Elem() } d.unmarshal(node, out) if len(d.terrors) > 0 { return &TypeError{d.terrors} } return nil } // Decode decodes the node and stores its data into the value pointed to by v. // // See the documentation for Unmarshal for details about the // conversion of YAML into a Go value. func (n *Node) Decode(v interface{}) (err error) { d := newDecoder() defer handleErr(&err) out := reflect.ValueOf(v) if out.Kind() == reflect.Ptr && !out.IsNil() { out = out.Elem() } d.unmarshal(n, out) if len(d.terrors) > 0 { return &TypeError{d.terrors} } return nil } func unmarshal(in []byte, out interface{}, strict bool) (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 marshalled if they are exported (have an upper case // first letter), and are marshalled 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. // Zero valued structs will be omitted if all their public // fields are zero, unless they implement an IsZero // method (see the IsZeroer interface type), in which // case the field will be excluded if IsZero returns true. // // 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 `yaml:"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.marshalDoc("", reflect.ValueOf(in)) e.finish() out = e.out return } // An Encoder writes YAML values to an output stream. type Encoder struct { encoder *encoder } // NewEncoder returns a new encoder that writes to w. // The Encoder should be closed after use to flush all data // to w. func NewEncoder(w io.Writer) *Encoder { return &Encoder{ encoder: newEncoderWithWriter(w), } } // Encode writes the YAML encoding of v to the stream. // If multiple items are encoded to the stream, the // second and subsequent document will be preceded // with a "---" document separator, but the first will not. // // See the documentation for Marshal for details about the conversion of Go // values to YAML. func (e *Encoder) Encode(v interface{}) (err error) { defer handleErr(&err) e.encoder.marshalDoc("", reflect.ValueOf(v)) return nil } // Encode encodes value v and stores its representation in n. // // See the documentation for Marshal for details about the // conversion of Go values into YAML. func (n *Node) Encode(v interface{}) (err error) { defer handleErr(&err) e := newEncoder() defer e.destroy() e.marshalDoc("", reflect.ValueOf(v)) e.finish() p := newParser(e.out) p.textless = true defer p.destroy() doc := p.parse() *n = *doc.Content[0] return nil } // SetIndent changes the used indentation used when encoding. func (e *Encoder) SetIndent(spaces int) { if spaces < 0 { panic("yaml: cannot indent to a negative number of spaces") } e.encoder.indent = spaces } // Close closes the encoder by writing any remaining data. // It does not write a stream terminating string "...". func (e *Encoder) Close() (err error) { defer handleErr(&err) e.encoder.finish() return nil } 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 ")) } type Kind uint32 const ( DocumentNode Kind = 1 << iota SequenceNode MappingNode ScalarNode AliasNode ) type Style uint32 const ( TaggedStyle Style = 1 << iota DoubleQuotedStyle SingleQuotedStyle LiteralStyle FoldedStyle FlowStyle ) // Node represents an element in the YAML document hierarchy. While documents // are typically encoded and decoded into higher level types, such as structs // and maps, Node is an intermediate representation that allows detailed // control over the content being decoded or encoded. // // It's worth noting that although Node offers access into details such as // line numbers, colums, and comments, the content when re-encoded will not // have its original textual representation preserved. An effort is made to // render the data plesantly, and to preserve comments near the data they // describe, though. // // Values that make use of the Node type interact with the yaml package in the // same way any other type would do, by encoding and decoding yaml data // directly or indirectly into them. // // For example: // // var person struct { // Name string // Address yaml.Node // } // err := yaml.Unmarshal(data, &person) // // Or by itself: // // var person Node // err := yaml.Unmarshal(data, &person) // type Node struct { // Kind defines whether the node is a document, a mapping, a sequence, // a scalar value, or an alias to another node. The specific data type of // scalar nodes may be obtained via the ShortTag and LongTag methods. Kind Kind // Style allows customizing the apperance of the node in the tree. Style Style // Tag holds the YAML tag defining the data type for the value. // When decoding, this field will always be set to the resolved tag, // even when it wasn't explicitly provided in the YAML content. // When encoding, if this field is unset the value type will be // implied from the node properties, and if it is set, it will only // be serialized into the representation if TaggedStyle is used or // the implicit tag diverges from the provided one. Tag string // Value holds the unescaped and unquoted represenation of the value. Value string // Anchor holds the anchor name for this node, which allows aliases to point to it. Anchor string // Alias holds the node that this alias points to. Only valid when Kind is AliasNode. Alias *Node // Content holds contained nodes for documents, mappings, and sequences. Content []*Node // HeadComment holds any comments in the lines preceding the node and // not separated by an empty line. HeadComment string // LineComment holds any comments at the end of the line where the node is in. LineComment string // FootComment holds any comments following the node and before empty lines. FootComment string // Line and Column hold the node position in the decoded YAML text. // These fields are not respected when encoding the node. Line int Column int } // IsZero returns whether the node has all of its fields unset. func (n *Node) IsZero() bool { return n.Kind == 0 && n.Style == 0 && n.Tag == "" && n.Value == "" && n.Anchor == "" && n.Alias == nil && n.Content == nil && n.HeadComment == "" && n.LineComment == "" && n.FootComment == "" && n.Line == 0 && n.Column == 0 } // LongTag returns the long form of the tag that indicates the data type for // the node. If the Tag field isn't explicitly defined, one will be computed // based on the node properties. func (n *Node) LongTag() string { return longTag(n.ShortTag()) } // ShortTag returns the short form of the YAML tag that indicates data type for // the node. If the Tag field isn't explicitly defined, one will be computed // based on the node properties. func (n *Node) ShortTag() string { if n.indicatedString() { return strTag } if n.Tag == "" || n.Tag == "!" { switch n.Kind { case MappingNode: return mapTag case SequenceNode: return seqTag case AliasNode: if n.Alias != nil { return n.Alias.ShortTag() } case ScalarNode: tag, _ := resolve("", n.Value) return tag case 0: // Special case to make the zero value convenient. if n.IsZero() { return nullTag } } return "" } return shortTag(n.Tag) } func (n *Node) indicatedString() bool { return n.Kind == ScalarNode && (shortTag(n.Tag) == strTag || (n.Tag == "" || n.Tag == "!") && n.Style&(SingleQuotedStyle|DoubleQuotedStyle|LiteralStyle|FoldedStyle) != 0) } // SetString is a convenience function that sets the node to a string value // and defines its style in a pleasant way depending on its content. func (n *Node) SetString(s string) { n.Kind = ScalarNode if utf8.ValidString(s) { n.Value = s n.Tag = strTag } else { n.Value = encodeBase64(s) n.Tag = binaryTag } if strings.Contains(n.Value, "\n") { n.Style = LiteralStyle } } // -------------------------------------------------------------------------- // 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 // InlineUnmarshalers holds indexes to inlined fields that // contain unmarshaler values. InlineUnmarshalers [][]int } type fieldInfo struct { Key string Num int OmitEmpty bool Flow bool // Id holds the unique field identifier, so we can cheaply // check for field duplicates without maintaining an extra map. Id int // 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 var unmarshalerType reflect.Type func init() { var v Unmarshaler unmarshalerType = reflect.ValueOf(&v).Elem().Type() } 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 inlineUnmarshalers := [][]int(nil) for i := 0; i != n; i++ { field := st.Field(i) if field.PkgPath != "" && !field.Anonymous { 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, reflect.Ptr: ftype := field.Type for ftype.Kind() == reflect.Ptr { ftype = ftype.Elem() } if ftype.Kind() != reflect.Struct { return nil, errors.New("option ,inline may only be used on a struct or map field") } if reflect.PtrTo(ftype).Implements(unmarshalerType) { inlineUnmarshalers = append(inlineUnmarshalers, []int{i}) } else { sinfo, err := getStructInfo(ftype) if err != nil { return nil, err } for _, index := range sinfo.InlineUnmarshalers { inlineUnmarshalers = append(inlineUnmarshalers, append([]int{i}, index...)) } 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...) } finfo.Id = len(fieldsList) fieldsMap[finfo.Key] = finfo fieldsList = append(fieldsList, finfo) } } default: return nil, errors.New("option ,inline may only be used on a struct or map 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) } info.Id = len(fieldsList) fieldsList = append(fieldsList, info) fieldsMap[info.Key] = info } sinfo = &structInfo{ FieldsMap: fieldsMap, FieldsList: fieldsList, InlineMap: inlineMap, InlineUnmarshalers: inlineUnmarshalers, } fieldMapMutex.Lock() structMap[st] = sinfo fieldMapMutex.Unlock() return sinfo, nil } // IsZeroer is used to check whether an object is zero to // determine whether it should be omitted when marshaling // with the omitempty flag. One notable implementation // is time.Time. type IsZeroer interface { IsZero() bool } func isZero(v reflect.Value) bool { kind := v.Kind() if z, ok := v.Interface().(IsZeroer); ok { if (kind == reflect.Ptr || kind == reflect.Interface) && v.IsNil() { return true } return z.IsZero() } switch 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 } ================================================ FILE: vendor/gopkg.in/yaml.v3/yamlh.go ================================================ // // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 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. package yaml import ( "fmt" "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 = 0 yaml_PLAIN_SCALAR_STYLE yaml_scalar_style_t = 1 << iota // 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. yaml_TAIL_COMMENT_EVENT ) var eventStrings = []string{ yaml_NO_EVENT: "none", yaml_STREAM_START_EVENT: "stream start", yaml_STREAM_END_EVENT: "stream end", yaml_DOCUMENT_START_EVENT: "document start", yaml_DOCUMENT_END_EVENT: "document end", yaml_ALIAS_EVENT: "alias", yaml_SCALAR_EVENT: "scalar", yaml_SEQUENCE_START_EVENT: "sequence start", yaml_SEQUENCE_END_EVENT: "sequence end", yaml_MAPPING_START_EVENT: "mapping start", yaml_MAPPING_END_EVENT: "mapping end", yaml_TAIL_COMMENT_EVENT: "tail comment", } func (e yaml_event_type_t) String() string { if e < 0 || int(e) >= len(eventStrings) { return fmt.Sprintf("unknown event %d", e) } return eventStrings[e] } // 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 comments head_comment []byte line_comment []byte foot_comment []byte tail_comment []byte // 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 occurred. 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_reader 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. newlines int // The number of line breaks since last non-break/non-blank character 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. // Comments head_comment []byte // The current head comments line_comment []byte // The current line comments foot_comment []byte // The current foot comments tail_comment []byte // Foot comment that happens at the end of a block. stem_comment []byte // Comment in item preceding a nested structure (list inside list item, etc) comments []yaml_comment_t // The folded comments for all parsed tokens comments_head int // 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. simple_keys_by_tok map[int]int // possible simple_key indexes indexed by token_number // 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. } type yaml_comment_t struct { scan_mark yaml_mark_t // Position where scanning for comments started token_mark yaml_mark_t // Position after which tokens will be associated with this comment start_mark yaml_mark_t // Position of '#' comment mark end_mark yaml_mark_t // Position where comment terminated head []byte line []byte foot []byte } // 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_TRAIL_ITEM_STATE // Expect the next item of a flow sequence, with the comma already written out 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_TRAIL_KEY_STATE // Expect the next key of a flow mapping, with the comma already written out 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_writer 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? space_above bool // Is there's an empty line above? foot_indent int // The indent used to write the foot comment above, or -1 if none. // 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. } // Comments head_comment []byte line_comment []byte foot_comment []byte tail_comment []byte key_line_comment []byte // 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. } ================================================ FILE: vendor/gopkg.in/yaml.v3/yamlprivateh.go ================================================ // // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 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. 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 } ================================================ FILE: vendor/modules.txt ================================================ # github.com/Microsoft/go-winio v0.6.2 ## explicit; go 1.21 github.com/Microsoft/go-winio github.com/Microsoft/go-winio/internal/fs github.com/Microsoft/go-winio/internal/socket github.com/Microsoft/go-winio/internal/stringbuffer github.com/Microsoft/go-winio/pkg/guid # github.com/OpenPeeDeeP/xdg v0.2.1-0.20190312153938-4ba9e1eb294c ## explicit github.com/OpenPeeDeeP/xdg # github.com/boz/go-throttle v0.0.0-20160922054636-fdc4eab740c1 ## explicit github.com/boz/go-throttle # github.com/cloudfoundry/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21 ## explicit github.com/cloudfoundry/jibber_jabber # github.com/containerd/errdefs v1.0.0 ## explicit; go 1.20 github.com/containerd/errdefs # github.com/containerd/errdefs/pkg v0.3.0 ## explicit; go 1.22 github.com/containerd/errdefs/pkg/errhttp github.com/containerd/errdefs/pkg/internal/cause # github.com/containerd/log v0.1.0 ## explicit; go 1.20 github.com/containerd/log # github.com/davecgh/go-spew v1.1.1 ## explicit github.com/davecgh/go-spew/spew # github.com/distribution/reference v0.6.0 ## explicit; go 1.20 github.com/distribution/reference # github.com/docker/cli v27.1.1+incompatible ## explicit github.com/docker/cli/cli/config github.com/docker/cli/cli/config/configfile github.com/docker/cli/cli/config/credentials github.com/docker/cli/cli/config/types github.com/docker/cli/cli/connhelper github.com/docker/cli/cli/connhelper/commandconn github.com/docker/cli/cli/connhelper/ssh github.com/docker/cli/cli/context github.com/docker/cli/cli/context/docker github.com/docker/cli/cli/context/store # github.com/docker/docker v28.5.2+incompatible ## explicit github.com/docker/docker/api github.com/docker/docker/api/types github.com/docker/docker/api/types/blkiodev github.com/docker/docker/api/types/build github.com/docker/docker/api/types/checkpoint github.com/docker/docker/api/types/common github.com/docker/docker/api/types/container github.com/docker/docker/api/types/events github.com/docker/docker/api/types/filters github.com/docker/docker/api/types/image github.com/docker/docker/api/types/mount github.com/docker/docker/api/types/network github.com/docker/docker/api/types/registry github.com/docker/docker/api/types/storage github.com/docker/docker/api/types/strslice github.com/docker/docker/api/types/swarm github.com/docker/docker/api/types/swarm/runtime github.com/docker/docker/api/types/system github.com/docker/docker/api/types/time github.com/docker/docker/api/types/versions github.com/docker/docker/api/types/volume github.com/docker/docker/client github.com/docker/docker/errdefs github.com/docker/docker/pkg/ioutils github.com/docker/docker/pkg/stdcopy # github.com/docker/docker-credential-helpers v0.8.2 ## explicit; go 1.19 github.com/docker/docker-credential-helpers/client github.com/docker/docker-credential-helpers/credentials # github.com/docker/go-connections v0.5.0 ## explicit; go 1.18 github.com/docker/go-connections/nat github.com/docker/go-connections/sockets github.com/docker/go-connections/tlsconfig # github.com/docker/go-units v0.5.0 ## explicit github.com/docker/go-units # github.com/fatih/color v1.10.0 ## explicit; go 1.13 github.com/fatih/color # github.com/felixge/httpsnoop v1.0.4 ## explicit; go 1.13 github.com/felixge/httpsnoop # github.com/fvbommel/sortorder v1.1.0 ## explicit; go 1.13 github.com/fvbommel/sortorder # github.com/gdamore/encoding v1.0.1 ## explicit; go 1.9 github.com/gdamore/encoding # github.com/gdamore/tcell/v2 v2.7.4 ## explicit; go 1.12 github.com/gdamore/tcell/v2 github.com/gdamore/tcell/v2/terminfo github.com/gdamore/tcell/v2/terminfo/a/aixterm github.com/gdamore/tcell/v2/terminfo/a/alacritty github.com/gdamore/tcell/v2/terminfo/a/ansi github.com/gdamore/tcell/v2/terminfo/b/beterm github.com/gdamore/tcell/v2/terminfo/base github.com/gdamore/tcell/v2/terminfo/c/cygwin github.com/gdamore/tcell/v2/terminfo/d/dtterm github.com/gdamore/tcell/v2/terminfo/dynamic github.com/gdamore/tcell/v2/terminfo/e/emacs github.com/gdamore/tcell/v2/terminfo/extended github.com/gdamore/tcell/v2/terminfo/f/foot github.com/gdamore/tcell/v2/terminfo/g/gnome github.com/gdamore/tcell/v2/terminfo/h/hpterm github.com/gdamore/tcell/v2/terminfo/k/konsole github.com/gdamore/tcell/v2/terminfo/k/kterm github.com/gdamore/tcell/v2/terminfo/l/linux github.com/gdamore/tcell/v2/terminfo/p/pcansi github.com/gdamore/tcell/v2/terminfo/r/rxvt github.com/gdamore/tcell/v2/terminfo/s/screen github.com/gdamore/tcell/v2/terminfo/s/simpleterm github.com/gdamore/tcell/v2/terminfo/s/sun github.com/gdamore/tcell/v2/terminfo/t/tmux github.com/gdamore/tcell/v2/terminfo/v/vt100 github.com/gdamore/tcell/v2/terminfo/v/vt102 github.com/gdamore/tcell/v2/terminfo/v/vt220 github.com/gdamore/tcell/v2/terminfo/v/vt320 github.com/gdamore/tcell/v2/terminfo/v/vt400 github.com/gdamore/tcell/v2/terminfo/v/vt420 github.com/gdamore/tcell/v2/terminfo/v/vt52 github.com/gdamore/tcell/v2/terminfo/w/wy50 github.com/gdamore/tcell/v2/terminfo/w/wy60 github.com/gdamore/tcell/v2/terminfo/w/wy99_ansi github.com/gdamore/tcell/v2/terminfo/x/xfce github.com/gdamore/tcell/v2/terminfo/x/xterm github.com/gdamore/tcell/v2/terminfo/x/xterm_kitty # github.com/go-errors/errors v1.5.1 ## explicit; go 1.14 github.com/go-errors/errors # github.com/go-logr/logr v1.4.2 ## explicit; go 1.18 github.com/go-logr/logr github.com/go-logr/logr/funcr # github.com/go-logr/stdr v1.2.2 ## explicit; go 1.16 github.com/go-logr/stdr # github.com/goccy/go-yaml v1.11.0 ## explicit; go 1.18 github.com/goccy/go-yaml github.com/goccy/go-yaml/ast github.com/goccy/go-yaml/internal/errors github.com/goccy/go-yaml/lexer github.com/goccy/go-yaml/parser github.com/goccy/go-yaml/printer github.com/goccy/go-yaml/scanner github.com/goccy/go-yaml/token # github.com/gookit/color v1.5.0 ## explicit; go 1.13 github.com/gookit/color # github.com/imdario/mergo v0.3.16 ## explicit; go 1.13 github.com/imdario/mergo # github.com/integrii/flaggy v1.4.0 ## explicit; go 1.12 github.com/integrii/flaggy # github.com/jesseduffield/asciigraph v0.0.0-20190605104717-6d88e39309ee ## explicit github.com/jesseduffield/asciigraph # github.com/jesseduffield/gocui v0.3.1-0.20240418080333-8cd33929c513 ## explicit; go 1.12 github.com/jesseduffield/gocui # github.com/jesseduffield/kill v0.0.0-20220618033138-bfbe04675d10 ## explicit; go 1.18 github.com/jesseduffield/kill # github.com/jesseduffield/lazycore v0.0.0-20221023210126-718a4caea996 ## explicit; go 1.18 github.com/jesseduffield/lazycore/pkg/boxlayout github.com/jesseduffield/lazycore/pkg/utils # github.com/jesseduffield/yaml v0.0.0-20190702115811-b900b7e08b56 ## explicit github.com/jesseduffield/yaml # github.com/lucasb-eyer/go-colorful v1.2.0 ## explicit; go 1.12 github.com/lucasb-eyer/go-colorful # github.com/mattn/go-colorable v0.1.8 ## explicit; go 1.13 github.com/mattn/go-colorable # github.com/mattn/go-isatty v0.0.12 ## explicit; go 1.12 github.com/mattn/go-isatty # github.com/mattn/go-runewidth v0.0.15 ## explicit; go 1.9 github.com/mattn/go-runewidth # github.com/mcuadros/go-lookup v0.0.0-20171110082742-5650f26be767 ## explicit github.com/mcuadros/go-lookup # github.com/mgutz/str v1.2.0 ## explicit github.com/mgutz/str # github.com/moby/docker-image-spec v1.3.1 ## explicit; go 1.18 github.com/moby/docker-image-spec/specs-go/v1 # github.com/moby/sys/atomicwriter v0.1.0 ## explicit; go 1.18 github.com/moby/sys/atomicwriter # github.com/moby/sys/sequential v0.6.0 ## explicit; go 1.17 github.com/moby/sys/sequential # github.com/moby/term v0.5.0 ## explicit; go 1.18 # github.com/morikuni/aec v1.0.0 ## explicit # github.com/onsi/ginkgo v1.8.0 ## explicit # github.com/onsi/gomega v1.5.0 ## explicit # github.com/opencontainers/go-digest v1.0.0 ## explicit; go 1.13 github.com/opencontainers/go-digest # github.com/opencontainers/image-spec v1.1.0 ## explicit; go 1.18 github.com/opencontainers/image-spec/specs-go github.com/opencontainers/image-spec/specs-go/v1 # github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 ## explicit github.com/petermattis/goid # github.com/pkg/errors v0.9.1 ## explicit github.com/pkg/errors # github.com/pmezard/go-difflib v1.0.0 ## explicit github.com/pmezard/go-difflib/difflib # github.com/rivo/uniseg v0.4.7 ## explicit; go 1.18 github.com/rivo/uniseg # github.com/samber/lo v1.31.0 ## explicit; go 1.18 github.com/samber/lo # github.com/sasha-s/go-deadlock v0.3.1 ## explicit github.com/sasha-s/go-deadlock # github.com/sirupsen/logrus v1.9.3 ## explicit; go 1.13 github.com/sirupsen/logrus # github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad ## explicit github.com/spkg/bom # github.com/stretchr/testify v1.9.0 ## explicit; go 1.17 github.com/stretchr/testify/assert # github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 ## explicit; go 1.15 github.com/xo/terminfo # go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 ## explicit; go 1.21 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil # go.opentelemetry.io/otel v1.28.0 ## explicit; go 1.21 go.opentelemetry.io/otel go.opentelemetry.io/otel/attribute go.opentelemetry.io/otel/baggage go.opentelemetry.io/otel/codes go.opentelemetry.io/otel/internal go.opentelemetry.io/otel/internal/attribute go.opentelemetry.io/otel/internal/baggage go.opentelemetry.io/otel/internal/global go.opentelemetry.io/otel/propagation go.opentelemetry.io/otel/semconv/v1.20.0 go.opentelemetry.io/otel/semconv/v1.24.0 # go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 ## explicit; go 1.21 # go.opentelemetry.io/otel/metric v1.28.0 ## explicit; go 1.21 go.opentelemetry.io/otel/metric go.opentelemetry.io/otel/metric/embedded # go.opentelemetry.io/otel/sdk v1.28.0 ## explicit; go 1.21 # go.opentelemetry.io/otel/trace v1.28.0 ## explicit; go 1.21 go.opentelemetry.io/otel/trace go.opentelemetry.io/otel/trace/embedded # golang.org/x/crypto v0.24.0 ## explicit; go 1.18 # golang.org/x/exp v0.0.0-20231006140011-7918f672742d ## explicit; go 1.20 golang.org/x/exp/constraints # golang.org/x/sys v0.24.0 ## explicit; go 1.18 golang.org/x/sys/plan9 golang.org/x/sys/unix golang.org/x/sys/windows # golang.org/x/term v0.21.0 ## explicit; go 1.18 golang.org/x/term # golang.org/x/text v0.16.0 ## explicit; go 1.18 golang.org/x/text/encoding golang.org/x/text/encoding/internal/identifier golang.org/x/text/transform # golang.org/x/time v0.5.0 ## explicit; go 1.18 # golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 ## explicit; go 1.11 golang.org/x/xerrors golang.org/x/xerrors/internal # gopkg.in/yaml.v3 v3.0.1 ## explicit gopkg.in/yaml.v3 # gotest.tools/v3 v3.5.1 ## explicit; go 1.17